commit 62fb9874f5da54fdb243003b386128037319b219 Author: Linus Torvalds Date: Sun Jun 27 15:21:11 2021 -0700 Linux 5.13 commit b4b27b9eed8ebdbf9f3046197d29d733c8c944f3 Author: Linus Torvalds Date: Sun Jun 27 13:32:54 2021 -0700 Revert "signal: Allow tasks to cache one sigqueue struct" This reverts commits 4bad58ebc8bc4f20d89cff95417c9b4674769709 (and 399f8dd9a866e107639eabd3c1979cd526ca3a98, which tried to fix it). I do not believe these are correct, and I'm about to release 5.13, so am reverting them out of an abundance of caution. The locking is odd, and appears broken. On the allocation side (in __sigqueue_alloc()), the locking is somewhat straightforward: it depends on sighand->siglock. Since one caller doesn't hold that lock, it further then tests 'sigqueue_flags' to avoid the case with no locks held. On the freeing side (in sigqueue_cache_or_free()), there is no locking at all, and the logic instead depends on 'current' being a single thread, and not able to race with itself. To make things more exciting, there's also the data race between freeing a signal and allocating one, which is handled by using WRITE_ONCE() and READ_ONCE(), and being mutually exclusive wrt the initial state (ie freeing will only free if the old state was NULL, while allocating will obviously only use the value if it was non-NULL, so only one or the other will actually act on the value). However, while the free->alloc paths do seem mutually exclusive thanks to just the data value dependency, it's not clear what the memory ordering constraints are on it. Could writes from the previous allocation possibly be delayed and seen by the new allocation later, causing logical inconsistencies? So it's all very exciting and unusual. And in particular, it seems that the freeing side is incorrect in depending on "current" being single-threaded. Yes, 'current' is a single thread, but in the presense of asynchronous events even a single thread can have data races. And such asynchronous events can and do happen, with interrupts causing signals to be flushed and thus free'd (for example - sending a SIGCONT/SIGSTOP can happen from interrupt context, and can flush previously queued process control signals). So regardless of all the other questions about the memory ordering and locking for this new cached allocation, the sigqueue_cache_or_free() assumptions seem to be fundamentally incorrect. It may be that people will show me the errors of my ways, and tell me why this is all safe after all. We can reinstate it if so. But my current belief is that the WRITE_ONCE() that sets the cached entry needs to be a smp_store_release(), and the READ_ONCE() that finds a cached entry needs to be a smp_load_acquire() to handle memory ordering correctly. And the sequence in sigqueue_cache_or_free() would need to either use a lock or at least be interrupt-safe some way (perhaps by using something like the percpu 'cmpxchg': it doesn't need to be SMP-safe, but like the percpu operations it needs to be interrupt-safe). Fixes: 399f8dd9a866 ("signal: Prevent sigqueue caching after task got released") Fixes: 4bad58ebc8bc ("signal: Allow tasks to cache one sigqueue struct") Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Oleg Nesterov Cc: Christian Brauner Signed-off-by: Linus Torvalds commit 625acffd7ae2c52898d249e6c5c39f348db0d8df Merge: b7050b242430f 67147e96a332b Author: Linus Torvalds Date: Sat Jun 26 09:50:10 2021 -0700 Merge tag 's390-5.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix a couple of late pt_regs flags handling findings of conversion to generic entry. - Fix potential register clobbering in stack switch helper. - Fix thread/group masks for offline cpus. - Fix cleanup of mdev resources when remove callback is invoked in vfio-ap code. * tag 's390-5.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/stack: fix possible register corruption with stack switch helper s390/topology: clear thread/group maps for offline cpus s390/vfio-ap: clean up mdev resources when remove callback invoked s390: clear pt_regs::flags on irq entry s390: fix system call restart with multiple signals commit b7050b242430f3170e0b57f5f55136e44cb8dc66 Merge: e2f527b58e811 67e2996f72c71 Author: Linus Torvalds Date: Fri Jun 25 19:06:24 2021 -0700 Merge tag 'pinctrl-v5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Two last-minute fixes: - Put an fwnode in the errorpath in the SGPIO driver - Fix the number of GPIO lines per bank in the STM32 driver" * tag 'pinctrl-v5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: stm32: fix the reported number of GPIO lines per bank pinctrl: microchip-sgpio: Put fwnode in error case during ->probe() commit e2f527b58e8115dae15ae344215accdd7a42e5ba Merge: 7ce32ac6fb2fc d1b7f92035c6f Author: Linus Torvalds Date: Fri Jun 25 15:59:14 2021 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two small fixes, both in upper layer drivers (scsi disk and cdrom). The sd one is fixing a commit changing revalidation that came from the block tree a while ago (5.10) and the sr one adds handling of a condition we didn't previously handle for manually removed media" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: sd: Call sd_revalidate_disk() for ioctl(BLKRRPART) scsi: sr: Return appropriate error code when disk is ejected commit 7ce32ac6fb2fc73584b567c73ae0c47528954ec6 Merge: 808e9df477757 72a461adbe88a Author: Linus Torvalds Date: Fri Jun 25 11:05:03 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "24 patches, based on 4a09d388f2ab382f217a764e6a152b3f614246f6. Subsystems affected by this patch series: mm (thp, vmalloc, hugetlb, memory-failure, and pagealloc), nilfs2, kthread, MAINTAINERS, and mailmap" * emailed patches from Andrew Morton : (24 commits) mailmap: add Marek's other e-mail address and identity without diacritics MAINTAINERS: fix Marek's identity again mm/page_alloc: do bulk array bounds check after checking populated elements mm/page_alloc: __alloc_pages_bulk(): do bounds check before accessing array mm/hwpoison: do not lock page again when me_huge_page() successfully recovers mm,hwpoison: return -EHWPOISON to denote that the page has already been poisoned mm/memory-failure: use a mutex to avoid memory_failure() races mm, futex: fix shared futex pgoff on shmem huge page kthread: prevent deadlock when kthread_mod_delayed_work() races with kthread_cancel_delayed_work_sync() kthread_worker: split code for canceling the delayed work timer mm/vmalloc: unbreak kasan vmalloc support KVM: s390: prepare for hugepage vmalloc mm/vmalloc: add vmalloc_no_huge nilfs2: fix memory leak in nilfs_sysfs_delete_device_group mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk() mm/thp: fix page_vma_mapped_walk() if THP mapped by ptes mm: page_vma_mapped_walk(): get vma_address_end() earlier mm: page_vma_mapped_walk(): use goto instead of while (1) mm: page_vma_mapped_walk(): add a level of indentation mm: page_vma_mapped_walk(): crossing page table boundary ... commit 808e9df477757955a9644ca323010339be0c40ee Author: Gleb Fotengauer-Malinovskiy Date: Fri Jun 25 20:36:55 2021 +0300 userfaultfd: uapi: fix UFFDIO_CONTINUE ioctl request definition This ioctl request reads from uffdio_continue structure written by userspace which justifies _IOC_WRITE flag. It also writes back to that structure which justifies _IOC_READ flag. See NOTEs in include/uapi/asm-generic/ioctl.h for more information. Fixes: f619147104c8 ("userfaultfd: add UFFDIO_CONTINUE ioctl") Signed-off-by: Gleb Fotengauer-Malinovskiy Acked-by: Peter Xu Reviewed-by: Axel Rasmussen Reviewed-by: Dmitry V. Levin Signed-off-by: Linus Torvalds commit 55fcd4493da5ac8a0f7a0b3b5ae8448aee2041bb Merge: 7764c62f9848c 4ca070ef0dd88 Author: Linus Torvalds Date: Fri Jun 25 10:44:03 2021 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Three more driver bugfixes and an annotation fix for the core" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: robotfuzz-osif: fix control-request directions i2c: dev: Add __user annotation i2c: cp2615: check for allocation failure in cp2615_i2c_recv() i2c: i801: Ensure that SMBHSTSTS_INUSE_STS is cleared when leaving i801_access commit 7764c62f9848cd4585801019168a6272240ab4d3 Merge: b960e01474519 5dca69e26fe97 Author: Linus Torvalds Date: Fri Jun 25 10:30:28 2021 -0700 Merge tag 'devprop-5.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework fix from Rafael Wysocki: "Fix a NULL pointer dereference introduced by a recent commit and occurring when device_remove_software_node() is used with a device that has never been registered (Heikki Krogerus)" * tag 'devprop-5.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: software node: Handle software node injection to an existing device properly commit b960e0147451915b5d4cd208b7abd3b07ceaf1a2 Merge: 616a99dd146a7 3de218ff39b9e Author: Linus Torvalds Date: Fri Jun 25 10:19:01 2021 -0700 Merge tag 'for-linus-5.13b-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "A fix for a regression introduced in 5.12: when migrating an irq related to a Xen user event to another cpu, a race might result in a WARN() triggering" * tag 'for-linus-5.13b-rc8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/events: reset active flag for lateeoi events later commit 616a99dd146a799d0cac43f884a3a46571bd2796 Merge: 94ca94bbbb5f5 f8be156be163a Author: Linus Torvalds Date: Fri Jun 25 10:15:35 2021 -0700 Merge tag 'for-linus-urgent' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "A selftests fix for ARM, and the fix for page reference count underflow. This is a very small fix that was provided by Nick Piggin and tested by myself" * tag 'for-linus-urgent' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: do not allow mapping valid but non-reference-counted pages KVM: selftests: Fix mapping length truncation in m{,un}map() commit 94ca94bbbb5f50180ecaac31566dfe5ed44c7994 Merge: edf54d9d0ae0a f9dfb5e390fab Author: Linus Torvalds Date: Fri Jun 25 10:00:25 2021 -0700 Merge tag 'x86_urgent_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "Two more urgent FPU fixes: - prevent unprivileged userspace from reinitializing supervisor states - prepare init_fpstate, which is the buffer used when initializing FPU state, properly in case the skip-writing-state-components XSAVE* variants are used" * tag 'x86_urgent_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/fpu: Make init_fpstate correct with optimized XSAVE x86/fpu: Preserve supervisor states in sanitize_restored_user_xstate() commit edf54d9d0ae0a230199a58e57b46c2d4b37a1462 Merge: 9e736cf7d6f0d 03af4c7bad8ca Author: Linus Torvalds Date: Fri Jun 25 09:50:30 2021 -0700 Merge tag 'ceph-for-5.13-rc8' of https://github.com/ceph/ceph-client Pull ceph fixes from Ilya Dryomov: "Two regression fixes from the merge window: one in the auth code affecting old clusters and one in the filesystem for proper propagation of MDS request errors. Also included a locking fix for async creates, marked for stable" * tag 'ceph-for-5.13-rc8' of https://github.com/ceph/ceph-client: libceph: set global_id as soon as we get an auth ticket libceph: don't pass result into ac->ops->handle_reply() ceph: fix error handling in ceph_atomic_open and ceph_lookup ceph: must hold snap_rwsem when filling inode for async create commit 9e736cf7d6f0dac63855ba74c94b85898485ba7a Merge: c13e3021331ed 827a746f405d2 Author: Linus Torvalds Date: Fri Jun 25 09:41:29 2021 -0700 Merge tag 'netfs-fixes-20210621' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull netfs fixes from David Howells: "This contains patches to fix netfs_write_begin() and afs_write_end() in the following ways: (1) In netfs_write_begin(), extract the decision about whether to skip a page out to its own helper and have that clear around the region to be written, but not clear that region. This requires the filesystem to patch it up afterwards if the hole doesn't get completely filled. (2) Use offset_in_thp() in (1) rather than manually calculating the offset into the page. (3) Due to (1), afs_write_end() now needs to handle short data write into the page by generic_perform_write(). I've adopted an analogous approach to ceph of just returning 0 in this case and letting the caller go round again. It also adds a note that (in the future) the len parameter may extend beyond the page allocated. This is because the page allocation is deferred to write_begin() and that gets to decide what size of THP to allocate." Jeff Layton points out: "The netfs fix in particular fixes a data corruption bug in cephfs" * tag 'netfs-fixes-20210621' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: netfs: fix test for whether we can skip read when writing beyond EOF afs: Fix afs_write_end() to handle short writes commit c13e3021331ed7736996fe61d6f26983ac3b84cc Merge: e41fc7c8e275d c6414e1a2bd26 Author: Linus Torvalds Date: Fri Jun 25 09:32:57 2021 -0700 Merge tag 'gpio-fixes-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - fix wake-up interrupt support on gpio-mxc - zero the padding bytes in a structure passed to user-space in the GPIO character device - require HAS_IOPORT_MAP in two drivers that need it to fix a Kbuild issue * tag 'gpio-fixes-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: AMD8111 and TQMX86 require HAS_IOPORT_MAP gpiolib: cdev: zero padding during conversion to gpioline_info_changed gpio: mxc: Fix disabled interrupt wake-up support commit e41fc7c8e275ddb292556698c7b60a1bf1199920 Merge: 44db63d1ad8d7 5c6d4f97267f0 Author: Linus Torvalds Date: Fri Jun 25 09:20:22 2021 -0700 Merge tag 'sound-5.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Two small changes have been cherry-picked as a last material for 5.13: a coverage after UMN revert action and a stale MAINTAINERS entry fix" * tag 'sound-5.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: MAINTAINERS: remove Timur Tabi from Freescale SOC sound drivers ASoC: rt5645: Avoid upgrading static warnings to errors commit c6414e1a2bd26b0071e2b9d6034621f705dfd4c0 Author: Johannes Berg Date: Fri Jun 25 10:37:34 2021 +0200 gpio: AMD8111 and TQMX86 require HAS_IOPORT_MAP Both of these drivers use ioport_map(), so they need to depend on HAS_IOPORT_MAP. Otherwise, they cannot be built even with COMPILE_TEST on architectures without an ioport implementation, such as ARCH=um. Reported-by: kernel test robot Signed-off-by: Johannes Berg Signed-off-by: Bartosz Golaszewski commit 72a461adbe88acf6a8cc5dba7720cf94d7056154 Author: Marek Behún Date: Thu Jun 24 18:40:13 2021 -0700 mailmap: add Marek's other e-mail address and identity without diacritics Some of my commits were sent with identities Marek Behun Marek Behún while the correct one is Marek Behún Put this into mailmap so that git shortlog prints all my commits under one identity. Link: https://lkml.kernel.org/r/20210616113624.19351-2-kabel@kernel.org Signed-off-by: Marek Behún Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ee924d3ddd4561b7e6671bd431ff55bb9a24c47c Author: Marek Behún Date: Thu Jun 24 18:40:10 2021 -0700 MAINTAINERS: fix Marek's identity again Fix my name to use diacritics, since MAINTAINERS supports it. Fix my e-mail address in MAINTAINERS' marvell10g PHY driver description, I accidentally put my other e-mail address here. Link: https://lkml.kernel.org/r/20210616113624.19351-1-kabel@kernel.org Signed-off-by: Marek Behún Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b3b64ebd38225d8032b5db42938d969b602040c2 Author: Mel Gorman Date: Thu Jun 24 18:40:07 2021 -0700 mm/page_alloc: do bulk array bounds check after checking populated elements Dan Carpenter reported the following The patch 0f87d9d30f21: "mm/page_alloc: add an array-based interface to the bulk page allocator" from Apr 29, 2021, leads to the following static checker warning: mm/page_alloc.c:5338 __alloc_pages_bulk() warn: potentially one past the end of array 'page_array[nr_populated]' The problem can occur if an array is passed in that is fully populated. That potentially ends up allocating a single page and storing it past the end of the array. This patch returns 0 if the array is fully populated. Link: https://lkml.kernel.org/r/20210618125102.GU30378@techsingularity.net Fixes: 0f87d9d30f21 ("mm/page_alloc: add an array-based interface to the bulk page allocator") Signed-off-by: Mel Gorman Reported-by: Dan Carpenter Cc: Jesper Dangaard Brouer Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b08e50dd64489e3997029d204f761cb57a3762d2 Author: Rasmus Villemoes Date: Thu Jun 24 18:40:04 2021 -0700 mm/page_alloc: __alloc_pages_bulk(): do bounds check before accessing array In the event that somebody would call this with an already fully populated page_array, the last loop iteration would do an access beyond the end of page_array. It's of course extremely unlikely that would ever be done, but this triggers my internal static analyzer. Also, if it really is not supposed to be invoked this way (i.e., with no NULL entries in page_array), the nr_populated Acked-by: Mel Gorman Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ea6d0630100b285f059d0a8d8e86f38a46407536 Author: Naoya Horiguchi Date: Thu Jun 24 18:40:01 2021 -0700 mm/hwpoison: do not lock page again when me_huge_page() successfully recovers Currently me_huge_page() temporary unlocks page to perform some actions then locks it again later. My testcase (which calls hard-offline on some tail page in a hugetlb, then accesses the address of the hugetlb range) showed that page allocation code detects this page lock on buddy page and printed out "BUG: Bad page state" message. check_new_page_bad() does not consider a page with __PG_HWPOISON as bad page, so this flag works as kind of filter, but this filtering doesn't work in this case because the "bad page" is not the actual hwpoisoned page. So stop locking page again. Actions to be taken depend on the page type of the error, so page unlocking should be done in ->action() callbacks. So let's make it assumed and change all existing callbacks that way. Link: https://lkml.kernel.org/r/20210609072029.74645-1-nao.horiguchi@gmail.com Fixes: commit 78bb920344b8 ("mm: hwpoison: dissolve in-use hugepage in unrecoverable memory error") Signed-off-by: Naoya Horiguchi Cc: Oscar Salvador Cc: Michal Hocko Cc: Tony Luck Cc: "Aneesh Kumar K.V" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 47af12bae17f99b5e77f8651cb7f3e1877610acf Author: Aili Yao Date: Thu Jun 24 18:39:58 2021 -0700 mm,hwpoison: return -EHWPOISON to denote that the page has already been poisoned When memory_failure() is called with MF_ACTION_REQUIRED on the page that has already been hwpoisoned, memory_failure() could fail to send SIGBUS to the affected process, which results in infinite loop of MCEs. Currently memory_failure() returns 0 if it's called for already hwpoisoned page, then the caller, kill_me_maybe(), could return without sending SIGBUS to current process. An action required MCE is raised when the current process accesses to the broken memory, so no SIGBUS means that the current process continues to run and access to the error page again soon, so running into MCE loop. This issue can arise for example in the following scenarios: - Two or more threads access to the poisoned page concurrently. If local MCE is enabled, MCE handler independently handles the MCE events. So there's a race among MCE events, and the second or latter threads fall into the situation in question. - If there was a precedent memory error event and memory_failure() for the event failed to unmap the error page for some reason, the subsequent memory access to the error page triggers the MCE loop situation. To fix the issue, make memory_failure() return an error code when the error page has already been hwpoisoned. This allows memory error handler to control how it sends signals to userspace. And make sure that any process touching a hwpoisoned page should get a SIGBUS even in "already hwpoisoned" path of memory_failure() as is done in page fault path. Link: https://lkml.kernel.org/r/20210521030156.2612074-3-nao.horiguchi@gmail.com Signed-off-by: Aili Yao Signed-off-by: Naoya Horiguchi Reviewed-by: Oscar Salvador Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Borislav Petkov Cc: David Hildenbrand Cc: Jue Wang Cc: Tony Luck Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 171936ddaf97e6f4e1264f4128bb5cf15691339c Author: Tony Luck Date: Thu Jun 24 18:39:55 2021 -0700 mm/memory-failure: use a mutex to avoid memory_failure() races Patch series "mm,hwpoison: fix sending SIGBUS for Action Required MCE", v5. I wrote this patchset to materialize what I think is the current allowable solution mentioned by the previous discussion [1]. I simply borrowed Tony's mutex patch and Aili's return code patch, then I queued another one to find error virtual address in the best effort manner. I know that this is not a perfect solution, but should work for some typical case. [1]: https://lore.kernel.org/linux-mm/20210331192540.2141052f@alex-virtual-machine/ This patch (of 2): There can be races when multiple CPUs consume poison from the same page. The first into memory_failure() atomically sets the HWPoison page flag and begins hunting for tasks that map this page. Eventually it invalidates those mappings and may send a SIGBUS to the affected tasks. But while all that work is going on, other CPUs see a "success" return code from memory_failure() and so they believe the error has been handled and continue executing. Fix by wrapping most of the internal parts of memory_failure() in a mutex. [akpm@linux-foundation.org: make mf_mutex local to memory_failure()] Link: https://lkml.kernel.org/r/20210521030156.2612074-1-nao.horiguchi@gmail.com Link: https://lkml.kernel.org/r/20210521030156.2612074-2-nao.horiguchi@gmail.com Signed-off-by: Tony Luck Signed-off-by: Naoya Horiguchi Reviewed-by: Borislav Petkov Reviewed-by: Oscar Salvador Cc: Aili Yao Cc: Andy Lutomirski Cc: Borislav Petkov Cc: David Hildenbrand Cc: Jue Wang Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fe19bd3dae3d15d2fbfdb3de8839a6ea0fe94264 Author: Hugh Dickins Date: Thu Jun 24 18:39:52 2021 -0700 mm, futex: fix shared futex pgoff on shmem huge page If more than one futex is placed on a shmem huge page, it can happen that waking the second wakes the first instead, and leaves the second waiting: the key's shared.pgoff is wrong. When 3.11 commit 13d60f4b6ab5 ("futex: Take hugepages into account when generating futex_key"), the only shared huge pages came from hugetlbfs, and the code added to deal with its exceptional page->index was put into hugetlb source. Then that was missed when 4.8 added shmem huge pages. page_to_pgoff() is what others use for this nowadays: except that, as currently written, it gives the right answer on hugetlbfs head, but nonsense on hugetlbfs tails. Fix that by calling hugetlbfs-specific hugetlb_basepage_index() on PageHuge tails as well as on head. Yes, it's unconventional to declare hugetlb_basepage_index() there in pagemap.h, rather than in hugetlb.h; but I do not expect anything but page_to_pgoff() ever to need it. [akpm@linux-foundation.org: give hugetlb_basepage_index() prototype the correct scope] Link: https://lkml.kernel.org/r/b17d946b-d09-326e-b42a-52884c36df32@google.com Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Reported-by: Neel Natu Signed-off-by: Hugh Dickins Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Thomas Gleixner Cc: "Kirill A. Shutemov" Cc: Zhang Yi Cc: Mel Gorman Cc: Mike Kravetz Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Darren Hart Cc: Davidlohr Bueso Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5fa54346caf67b4b1b10b1f390316ae466da4d53 Author: Petr Mladek Date: Thu Jun 24 18:39:48 2021 -0700 kthread: prevent deadlock when kthread_mod_delayed_work() races with kthread_cancel_delayed_work_sync() The system might hang with the following backtrace: schedule+0x80/0x100 schedule_timeout+0x48/0x138 wait_for_common+0xa4/0x134 wait_for_completion+0x1c/0x2c kthread_flush_work+0x114/0x1cc kthread_cancel_work_sync.llvm.16514401384283632983+0xe8/0x144 kthread_cancel_delayed_work_sync+0x18/0x2c xxxx_pm_notify+0xb0/0xd8 blocking_notifier_call_chain_robust+0x80/0x194 pm_notifier_call_chain_robust+0x28/0x4c suspend_prepare+0x40/0x260 enter_state+0x80/0x3f4 pm_suspend+0x60/0xdc state_store+0x108/0x144 kobj_attr_store+0x38/0x88 sysfs_kf_write+0x64/0xc0 kernfs_fop_write_iter+0x108/0x1d0 vfs_write+0x2f4/0x368 ksys_write+0x7c/0xec It is caused by the following race between kthread_mod_delayed_work() and kthread_cancel_delayed_work_sync(): CPU0 CPU1 Context: Thread A Context: Thread B kthread_mod_delayed_work() spin_lock() __kthread_cancel_work() spin_unlock() del_timer_sync() kthread_cancel_delayed_work_sync() spin_lock() __kthread_cancel_work() spin_unlock() del_timer_sync() spin_lock() work->canceling++ spin_unlock spin_lock() queue_delayed_work() // dwork is put into the worker->delayed_work_list spin_unlock() kthread_flush_work() // flush_work is put at the tail of the dwork wait_for_completion() Context: IRQ kthread_delayed_work_timer_fn() spin_lock() list_del_init(&work->node); spin_unlock() BANG: flush_work is not longer linked and will never get proceed. The problem is that kthread_mod_delayed_work() checks work->canceling flag before canceling the timer. A simple solution is to (re)check work->canceling after __kthread_cancel_work(). But then it is not clear what should be returned when __kthread_cancel_work() removed the work from the queue (list) and it can't queue it again with the new @delay. The return value might be used for reference counting. The caller has to know whether a new work has been queued or an existing one was replaced. The proper solution is that kthread_mod_delayed_work() will remove the work from the queue (list) _only_ when work->canceling is not set. The flag must be checked after the timer is stopped and the remaining operations can be done under worker->lock. Note that kthread_mod_delayed_work() could remove the timer and then bail out. It is fine. The other canceling caller needs to cancel the timer as well. The important thing is that the queue (list) manipulation is done atomically under worker->lock. Link: https://lkml.kernel.org/r/20210610133051.15337-3-pmladek@suse.com Fixes: 9a6b06c8d9a220860468a ("kthread: allow to modify delayed kthread work") Signed-off-by: Petr Mladek Reported-by: Martin Liu Cc: Cc: Minchan Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Oleg Nesterov Cc: Tejun Heo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34b3d5344719d14fd2185b2d9459b3abcb8cf9d8 Author: Petr Mladek Date: Thu Jun 24 18:39:45 2021 -0700 kthread_worker: split code for canceling the delayed work timer Patch series "kthread_worker: Fix race between kthread_mod_delayed_work() and kthread_cancel_delayed_work_sync()". This patchset fixes the race between kthread_mod_delayed_work() and kthread_cancel_delayed_work_sync() including proper return value handling. This patch (of 2): Simple code refactoring as a preparation step for fixing a race between kthread_mod_delayed_work() and kthread_cancel_delayed_work_sync(). It does not modify the existing behavior. Link: https://lkml.kernel.org/r/20210610133051.15337-2-pmladek@suse.com Signed-off-by: Petr Mladek Cc: Cc: Martin Liu Cc: Minchan Kim Cc: Nathan Chancellor Cc: Nick Desaulniers Cc: Oleg Nesterov Cc: Tejun Heo Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ca3027b726be681c8e6292b5a81ebcde7581710 Author: Daniel Axtens Date: Thu Jun 24 18:39:42 2021 -0700 mm/vmalloc: unbreak kasan vmalloc support In commit 121e6f3258fe ("mm/vmalloc: hugepage vmalloc mappings"), __vmalloc_node_range was changed such that __get_vm_area_node was no longer called with the requested/real size of the vmalloc allocation, but rather with a rounded-up size. This means that __get_vm_area_node called kasan_unpoision_vmalloc() with a rounded up size rather than the real size. This led to it allowing access to too much memory and so missing vmalloc OOBs and failing the kasan kunit tests. Pass the real size and the desired shift into __get_vm_area_node. This allows it to round up the size for the underlying allocators while still unpoisioning the correct quantity of shadow memory. Adjust the other call-sites to pass in PAGE_SHIFT for the shift value. Link: https://lkml.kernel.org/r/20210617081330.98629-1-dja@axtens.net Link: https://bugzilla.kernel.org/show_bug.cgi?id=213335 Fixes: 121e6f3258fe ("mm/vmalloc: hugepage vmalloc mappings") Signed-off-by: Daniel Axtens Tested-by: David Gow Reviewed-by: Nicholas Piggin Reviewed-by: Uladzislau Rezki (Sony) Tested-by: Andrey Konovalov Acked-by: Andrey Konovalov Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 185cca24e977411495d57ec71e43350b69c08e63 Author: Claudio Imbrenda Date: Thu Jun 24 18:39:39 2021 -0700 KVM: s390: prepare for hugepage vmalloc The Create Secure Configuration Ultravisor Call does not support using large pages for the virtual memory area. This is a hardware limitation. This patch replaces the vzalloc call with an almost equivalent call to the newly introduced vmalloc_no_huge function, which guarantees that only small pages will be used for the backing. The new call will not clear the allocated memory, but that has never been an actual requirement. Link: https://lkml.kernel.org/r/20210614132357.10202-3-imbrenda@linux.ibm.com Fixes: 121e6f3258fe3 ("mm/vmalloc: hugepage vmalloc mappings") Signed-off-by: Claudio Imbrenda Reviewed-by: Janosch Frank Acked-by: Christian Borntraeger Acked-by: Nicholas Piggin Reviewed-by: David Hildenbrand Cc: Nicholas Piggin Cc: Uladzislau Rezki (Sony) Cc: Catalin Marinas Cc: Thomas Gleixner Cc: Ingo Molnar Cc: David Rientjes Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15a64f5a8870b5610b616a4aa753262dfaa5d76e Author: Claudio Imbrenda Date: Thu Jun 24 18:39:36 2021 -0700 mm/vmalloc: add vmalloc_no_huge Patch series "mm: add vmalloc_no_huge and use it", v4. Add vmalloc_no_huge() and export it, so modules can allocate memory with small pages. Use the newly added vmalloc_no_huge() in KVM on s390 to get around a hardware limitation. This patch (of 2): Commit 121e6f3258fe3 ("mm/vmalloc: hugepage vmalloc mappings") added support for hugepage vmalloc mappings, it also added the flag VM_NO_HUGE_VMAP for __vmalloc_node_range to request the allocation to be performed with 0-order non-huge pages. This flag is not accessible when calling vmalloc, the only option is to call directly __vmalloc_node_range, which is not exported. This means that a module can't vmalloc memory with small pages. Case in point: KVM on s390x needs to vmalloc a large area, and it needs to be mapped with non-huge pages, because of a hardware limitation. This patch adds the function vmalloc_no_huge, which works like vmalloc, but it is guaranteed to always back the mapping using small pages. This new function is exported, therefore it is usable by modules. [akpm@linux-foundation.org: whitespace fixes, per Christoph] Link: https://lkml.kernel.org/r/20210614132357.10202-1-imbrenda@linux.ibm.com Link: https://lkml.kernel.org/r/20210614132357.10202-2-imbrenda@linux.ibm.com Fixes: 121e6f3258fe3 ("mm/vmalloc: hugepage vmalloc mappings") Signed-off-by: Claudio Imbrenda Reviewed-by: Uladzislau Rezki (Sony) Acked-by: Nicholas Piggin Reviewed-by: David Hildenbrand Acked-by: David Rientjes Cc: Uladzislau Rezki (Sony) Cc: Catalin Marinas Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Christoph Hellwig Cc: Cornelia Huck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8fd0c1b0647a6bda4067ee0cd61e8395954b6f28 Author: Pavel Skripkin Date: Thu Jun 24 18:39:33 2021 -0700 nilfs2: fix memory leak in nilfs_sysfs_delete_device_group My local syzbot instance hit memory leak in nilfs2. The problem was in missing kobject_put() in nilfs_sysfs_delete_device_group(). kobject_del() does not call kobject_cleanup() for passed kobject and it leads to leaking duped kobject name if kobject_put() was not called. Fail log: BUG: memory leak unreferenced object 0xffff8880596171e0 (size 8): comm "syz-executor379", pid 8381, jiffies 4294980258 (age 21.100s) hex dump (first 8 bytes): 6c 6f 6f 70 30 00 00 00 loop0... backtrace: kstrdup+0x36/0x70 mm/util.c:60 kstrdup_const+0x53/0x80 mm/util.c:83 kvasprintf_const+0x108/0x190 lib/kasprintf.c:48 kobject_set_name_vargs+0x56/0x150 lib/kobject.c:289 kobject_add_varg lib/kobject.c:384 [inline] kobject_init_and_add+0xc9/0x160 lib/kobject.c:473 nilfs_sysfs_create_device_group+0x150/0x800 fs/nilfs2/sysfs.c:999 init_nilfs+0xe26/0x12b0 fs/nilfs2/the_nilfs.c:637 Link: https://lkml.kernel.org/r/20210612140559.20022-1-paskripkin@gmail.com Fixes: da7141fb78db ("nilfs2: add /sys/fs/nilfs2/ group") Signed-off-by: Pavel Skripkin Acked-by: Ryusuke Konishi Cc: Michael L. Semon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7a69d8ba88d8dcee7ef00e91d413a4bd003a814 Author: Hugh Dickins Date: Thu Jun 24 18:39:30 2021 -0700 mm/thp: another PVMW_SYNC fix in page_vma_mapped_walk() Aha! Shouldn't that quick scan over pte_none()s make sure that it holds ptlock in the PVMW_SYNC case? That too might have been responsible for BUGs or WARNs in split_huge_page_to_list() or its unmap_page(), though I've never seen any. Link: https://lkml.kernel.org/r/1bdf384c-8137-a149-2a1e-475a4791c3c@google.com Link: https://lore.kernel.org/linux-mm/20210412180659.B9E3.409509F4@e16-tech.com/ Fixes: ace71a19cec5 ("mm: introduce page_vma_mapped_walk()") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Tested-by: Wang Yugui Cc: Alistair Popple Cc: Matthew Wilcox Cc: Peter Xu Cc: Ralph Campbell Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a9a7504d9beaf395481faa91e70e2fd08f7a3dde Author: Hugh Dickins Date: Thu Jun 24 18:39:26 2021 -0700 mm/thp: fix page_vma_mapped_walk() if THP mapped by ptes Running certain tests with a DEBUG_VM kernel would crash within hours, on the total_mapcount BUG() in split_huge_page_to_list(), while trying to free up some memory by punching a hole in a shmem huge page: split's try_to_unmap() was unable to find all the mappings of the page (which, on a !DEBUG_VM kernel, would then keep the huge page pinned in memory). Crash dumps showed two tail pages of a shmem huge page remained mapped by pte: ptes in a non-huge-aligned vma of a gVisor process, at the end of a long unmapped range; and no page table had yet been allocated for the head of the huge page to be mapped into. Although designed to handle these odd misaligned huge-page-mapped-by-pte cases, page_vma_mapped_walk() falls short by returning false prematurely when !pmd_present or !pud_present or !p4d_present or !pgd_present: there are cases when a huge page may span the boundary, with ptes present in the next. Restructure page_vma_mapped_walk() as a loop to continue in these cases, while keeping its layout much as before. Add a step_forward() helper to advance pvmw->address across those boundaries: originally I tried to use mm's standard p?d_addr_end() macros, but hit the same crash 512 times less often: because of the way redundant levels are folded together, but folded differently in different configurations, it was just too difficult to use them correctly; and step_forward() is simpler anyway. Link: https://lkml.kernel.org/r/fedb8632-1798-de42-f39e-873551d5bc81@google.com Fixes: ace71a19cec5 ("mm: introduce page_vma_mapped_walk()") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Alistair Popple Cc: Matthew Wilcox Cc: Peter Xu Cc: Ralph Campbell Cc: Wang Yugui Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a765c417d876cc635f628365ec9aa6f09470069a Author: Hugh Dickins Date: Thu Jun 24 18:39:23 2021 -0700 mm: page_vma_mapped_walk(): get vma_address_end() earlier page_vma_mapped_walk() cleanup: get THP's vma_address_end() at the start, rather than later at next_pte. It's a little unnecessary overhead on the first call, but makes for a simpler loop in the following commit. Link: https://lkml.kernel.org/r/4542b34d-862f-7cb4-bb22-e0df6ce830a2@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Alistair Popple Cc: Matthew Wilcox Cc: Peter Xu Cc: Ralph Campbell Cc: Wang Yugui Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 474466301dfd8b39a10c01db740645f3f7ae9a28 Author: Hugh Dickins Date: Thu Jun 24 18:39:20 2021 -0700 mm: page_vma_mapped_walk(): use goto instead of while (1) page_vma_mapped_walk() cleanup: add a label this_pte, matching next_pte, and use "goto this_pte", in place of the "while (1)" loop at the end. Link: https://lkml.kernel.org/r/a52b234a-851-3616-2525-f42736e8934@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Alistair Popple Cc: Matthew Wilcox Cc: Peter Xu Cc: Ralph Campbell Cc: Wang Yugui Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b3807a91aca7d21c05d5790612e49969117a72b9 Author: Hugh Dickins Date: Thu Jun 24 18:39:17 2021 -0700 mm: page_vma_mapped_walk(): add a level of indentation page_vma_mapped_walk() cleanup: add a level of indentation to much of the body, making no functional change in this commit, but reducing the later diff when this is all converted to a loop. [hughd@google.com: : page_vma_mapped_walk(): add a level of indentation fix] Link: https://lkml.kernel.org/r/7f817555-3ce1-c785-e438-87d8efdcaf26@google.com Link: https://lkml.kernel.org/r/efde211-f3e2-fe54-977-ef481419e7f3@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Alistair Popple Cc: Matthew Wilcox Cc: Peter Xu Cc: Ralph Campbell Cc: Wang Yugui Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 448282487483d6fa5b2eeeafaa0acc681e544a9c Author: Hugh Dickins Date: Thu Jun 24 18:39:14 2021 -0700 mm: page_vma_mapped_walk(): crossing page table boundary page_vma_mapped_walk() cleanup: adjust the test for crossing page table boundary - I believe pvmw->address is always page-aligned, but nothing else here assumed that; and remember to reset pvmw->pte to NULL after unmapping the page table, though I never saw any bug from that. Link: https://lkml.kernel.org/r/799b3f9c-2a9e-dfef-5d89-26e9f76fd97@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Alistair Popple Cc: Matthew Wilcox Cc: Peter Xu Cc: Ralph Campbell Cc: Wang Yugui Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e2e1d4076c77b3671cf8ce702535ae7dee3acf89 Author: Hugh Dickins Date: Thu Jun 24 18:39:10 2021 -0700 mm: page_vma_mapped_walk(): prettify PVMW_MIGRATION block page_vma_mapped_walk() cleanup: rearrange the !pmd_present() block to follow the same "return not_found, return not_found, return true" pattern as the block above it (note: returning not_found there is never premature, since existence or prior existence of huge pmd guarantees good alignment). Link: https://lkml.kernel.org/r/378c8650-1488-2edf-9647-32a53cf2e21@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Reviewed-by: Peter Xu Cc: Alistair Popple Cc: Matthew Wilcox Cc: Ralph Campbell Cc: Wang Yugui Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3306d3119ceacc43ea8b141a73e21fea68eec30c Author: Hugh Dickins Date: Thu Jun 24 18:39:07 2021 -0700 mm: page_vma_mapped_walk(): use pmde for *pvmw->pmd page_vma_mapped_walk() cleanup: re-evaluate pmde after taking lock, then use it in subsequent tests, instead of repeatedly dereferencing pointer. Link: https://lkml.kernel.org/r/53fbc9d-891e-46b2-cb4b-468c3b19238e@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Reviewed-by: Peter Xu Cc: Alistair Popple Cc: Matthew Wilcox Cc: Ralph Campbell Cc: Wang Yugui Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d0fd5987657cb0c9756ce684e3a74c0f6351728 Author: Hugh Dickins Date: Thu Jun 24 18:39:04 2021 -0700 mm: page_vma_mapped_walk(): settle PageHuge on entry page_vma_mapped_walk() cleanup: get the hugetlbfs PageHuge case out of the way at the start, so no need to worry about it later. Link: https://lkml.kernel.org/r/e31a483c-6d73-a6bb-26c5-43c3b880a2@google.com Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Reviewed-by: Peter Xu Cc: Alistair Popple Cc: "Kirill A. Shutemov" Cc: Matthew Wilcox Cc: Ralph Campbell Cc: Wang Yugui Cc: Will Deacon Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f003c03bd29e6f46fef1b9a8e8d636ac732286d5 Author: Hugh Dickins Date: Thu Jun 24 18:39:01 2021 -0700 mm: page_vma_mapped_walk(): use page for pvmw->page Patch series "mm: page_vma_mapped_walk() cleanup and THP fixes". I've marked all of these for stable: many are merely cleanups, but I think they are much better before the main fix than after. This patch (of 11): page_vma_mapped_walk() cleanup: sometimes the local copy of pvwm->page was used, sometimes pvmw->page itself: use the local copy "page" throughout. Link: https://lkml.kernel.org/r/589b358c-febc-c88e-d4c2-7834b37fa7bf@google.com Link: https://lkml.kernel.org/r/88e67645-f467-c279-bf5e-af4b5c6b13eb@google.com Signed-off-by: Hugh Dickins Reviewed-by: Alistair Popple Acked-by: Kirill A. Shutemov Reviewed-by: Peter Xu Cc: Yang Shi Cc: Wang Yugui Cc: Matthew Wilcox Cc: Ralph Campbell Cc: Zi Yan Cc: Will Deacon Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 44db63d1ad8d71c6932cbe007eb41f31c434d140 Merge: 4a09d388f2ab3 5e0e7a407675d Author: Linus Torvalds Date: Thu Jun 24 13:27:07 2021 -0700 Merge tag 'drm-fixes-2021-06-25' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "This is a bit bigger than I'd like at this stage, and I guess last week was extra quiet, but it's mostly one fix across three drivers to wait for buffer move pinning to complete. There was one locking change that got reverted so it's just noise. Otherwise the amdgpu/nouveau changes are for known regressions, and otherwise it's just misc changes in kmb/atmel/vc4 drivers. Summary: core: - auth locking change + brown paper bag revert radeon/nouveau/amdgpu/ttm: - wait for BO to be pinned after moving it (same fix in three drivers) amdgpu: - Revert GFX9/10 doorbell fixes, we just end up trading one bug for another - Potential memory corruption fix in framebuffer handling nouveau: - fix regression checking dma addresses kmb: - error return fix atmel-hlcdc: - fix kernel warnings at boot - enable async flips vc4: - fix CPU hang due to power management" * tag 'drm-fixes-2021-06-25' of git://anongit.freedesktop.org/drm/drm: drm/nouveau: fix dma_address check for CPU/GPU sync drm/kmb: Fix error return code in kmb_hw_init() drm/amdgpu: wait for moving fence after pinning drm/radeon: wait for moving fence after pinning drm/nouveau: wait for moving fence after pinning v2 Revert "drm: add a locked version of drm_is_current_master" Revert "drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue." Revert "drm/amdgpu/gfx10: enlarge CP_MEC_DOORBELL_RANGE_UPPER to cover full doorbell." drm/amdgpu: Call drm_framebuffer_init last for framebuffer init drm: add a locked version of drm_is_current_master drm/atmel-hlcdc: Allow async page flips drm/panel: ld9040: reference spi_device_id table drm: atmel_hlcdc: Enable the crtc vblank prior to crtc usage. drm/vc4: hdmi: Make sure the controller is powered in detect drm/vc4: hdmi: Move the HSM clock enable to runtime_pm commit 4ca070ef0dd885616ef294d269a9bf8e3b258e1a Author: Johan Hovold Date: Mon May 24 11:09:12 2021 +0200 i2c: robotfuzz-osif: fix control-request directions The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Control transfers without a data stage are treated as OUT requests by the USB stack and should be using usb_sndctrlpipe(). Failing to do so will now trigger a warning. Fix the OSIFI2C_SET_BIT_RATE and OSIFI2C_STOP requests which erroneously used the osif_usb_read() helper and set the IN direction bit. Reported-by: syzbot+9d7dadd15b8819d73f41@syzkaller.appspotmail.com Fixes: 83e53a8f120f ("i2c: Add bus driver for for OSIF USB i2c device.") Cc: stable@vger.kernel.org # 3.14 Signed-off-by: Johan Hovold Signed-off-by: Wolfram Sang commit 5e0e7a407675d9f50f1d840214beaec42293b79b Merge: efea0c12a47bc d330099115597 Author: Dave Airlie Date: Fri Jun 25 05:44:32 2021 +1000 Merge tag 'drm-misc-fixes-2021-06-24' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes A DMA address check for nouveau, an error code return fix for kmb, fixes to wait for a moving fence after pinning the BO for amdgpu, nouveau and radeon, a crtc and async page flip fix for atmel-hlcdc and a cpu hang fix for vc4. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210624190353.wyizoil3wqrrxz5d@gilmour commit 3265a7e6b41bae8608e7e91ac6798de5e5564164 Author: Andreas Hecht Date: Thu Jun 24 17:25:35 2021 +0200 i2c: dev: Add __user annotation Fix Sparse warnings: drivers/i2c/i2c-dev.c:546:19: warning: incorrect type in assignment (different address spaces) drivers/i2c/i2c-dev.c:549:53: warning: incorrect type in argument 2 (different address spaces) compat_ptr() returns a pointer tagged __user which gets assigned to a pointer missing the __user annotation. The same pointer is passed to copy_from_user() as an argument where it is expected to have the __user annotation. Fix both by adding the __user annotation to the pointer. Fixes: 7d5cb45655f2 ("i2c compat ioctls: move to ->compat_ioctl()") Signed-off-by: Andreas Hecht Signed-off-by: Wolfram Sang commit 03af4c7bad8ca59143bca488b90b3775d10d7f94 Author: Ilya Dryomov Date: Mon Jun 21 12:17:40 2021 +0200 libceph: set global_id as soon as we get an auth ticket Commit 61ca49a9105f ("libceph: don't set global_id until we get an auth ticket") delayed the setting of global_id too much. It is set only after all tickets are received, but in pre-nautilus clusters an auth ticket and the service tickets are obtained in separate steps (for a total of three MAuth replies). When the service tickets are requested, global_id is used to build an authorizer; if global_id is still 0 we never get them and fail to establish the session. Moving the setting of global_id into protocol implementations. This way global_id can be set exactly when an auth ticket is received, not sooner nor later. Fixes: 61ca49a9105f ("libceph: don't set global_id until we get an auth ticket") Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit 3c0d0894320cc517fda657c69939cd0313d0b4e2 Author: Ilya Dryomov Date: Mon Jun 21 11:53:38 2021 +0200 libceph: don't pass result into ac->ops->handle_reply() There is no result to pass in msgr2 case because authentication failures are reported through auth_bad_method frame and in MAuth case an error is returned immediately. Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit 4a09d388f2ab382f217a764e6a152b3f614246f6 Merge: 7749b0337b4e9 103a5348c22c3 Author: Linus Torvalds Date: Thu Jun 24 10:53:05 2021 -0700 Merge tag 'mmc-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fix from Ulf Hansson: "Use memcpy_to/fromio for dram-access-quirk in the meson-gx host driver" * tag 'mmc-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: meson-gx: use memcpy_to/fromio for dram-access-quirk commit 7749b0337b4e92d83f7e04b86434dcf4fe531377 Merge: 666751701b6e4 399f8dd9a866e Author: Linus Torvalds Date: Thu Jun 24 09:06:19 2021 -0700 Merge tag 'core-urgent-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull sigqueue cache fix from Ingo Molnar: "Fix a memory leak in the recently introduced sigqueue cache" * tag 'core-urgent-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: signal: Prevent sigqueue caching after task got released commit 666751701b6e4b6b6ebc82186434806fa8a09cf3 Merge: df50110004963 fdaba61ef8a26 Author: Linus Torvalds Date: Thu Jun 24 08:58:23 2021 -0700 Merge tag 'sched-urgent-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "A last minute cgroup bandwidth scheduling fix for a recently introduced logic fail which triggered a kernel warning by LTP's cfs_bandwidth01 test" * tag 'sched-urgent-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Ensure that the CFS parent is added after unthrottling commit df5011000496355d8508d56cd3ce45b1196b8b43 Merge: c0e457851fffd 7f049fbdd57f6 Author: Linus Torvalds Date: Thu Jun 24 08:55:12 2021 -0700 Merge tag 'perf-urgent-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 perf fix from Ingo Molnar: "An LBR buffer fix for code that probably only worked accidentally" * tag 'perf-urgent-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/lbr: Zero the xstate buffer on allocation commit f8be156be163a052a067306417cd0ff679068c97 Author: Nicholas Piggin Date: Thu Jun 24 08:29:04 2021 -0400 KVM: do not allow mapping valid but non-reference-counted pages It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which take a reference to the page, which takes it from 0 to 1. When the reference is dropped, this will free the page incorrectly. Fix this by only taking a reference on valid pages if it was non-zero, which indicates it is participating in normal refcounting (and can be released with put_page). This addresses CVE-2021-22543. Signed-off-by: Nicholas Piggin Tested-by: Paolo Bonzini Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit c0e457851fffd90eac14ad2528dfea3994945c28 Merge: 7426cedc7dad6 49faa77759b21 Author: Linus Torvalds Date: Thu Jun 24 08:47:33 2021 -0700 Merge tag 'objtool-urgent-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "Address a number of objtool warnings that got reported. No change in behavior intended, but code generation might be impacted by commit 1f008d46f124 ("x86: Always inline task_size_max()")" * tag 'objtool-urgent-2021-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/lockdep: Improve noinstr vs errors x86: Always inline task_size_max() x86/xen: Fix noinstr fail in exc_xen_unknown_trap() x86/xen: Fix noinstr fail in xen_pv_evtchn_do_upcall() x86/entry: Fix noinstr fail in __do_fast_syscall_32() objtool/x86: Ignore __x86_indirect_alt_* symbols commit d330099115597bbc238d6758a4930e72b49ea9ba Author: Christian König Date: Fri Jun 11 14:34:50 2021 +0200 drm/nouveau: fix dma_address check for CPU/GPU sync AGP for example doesn't have a dma_address array. Signed-off-by: Christian König Acked-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210614110517.1624-1-christian.koenig@amd.com commit 3de218ff39b9e3f0d453fe3154f12a174de44b25 Author: Juergen Gross Date: Wed Jun 23 15:09:13 2021 +0200 xen/events: reset active flag for lateeoi events later In order to avoid a race condition for user events when changing cpu affinity reset the active flag only when EOI-ing the event. This is working fine as all user events are lateeoi events. Note that lateeoi_ack_mask_dynirq() is not modified as there is no explicit call to xen_irq_lateeoi() expected later. Cc: stable@vger.kernel.org Reported-by: Julien Grall Fixes: b6622798bc50b62 ("xen/events: avoid handling the same event on two cpus at the same time") Tested-by: Julien Grall Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210623130913.9405-1-jgross@suse.com Signed-off-by: Juergen Gross commit 5c6d4f97267f02f47acea8a652265348ec12de51 Author: Timur Tabi Date: Sun Jun 20 11:01:35 2021 -0500 MAINTAINERS: remove Timur Tabi from Freescale SOC sound drivers I haven't touched these drivers in seven years, and none of the patches sent to me these days affect code that I wrote. The other maintainers are doing a very good job without me. Signed-off-by: Timur Tabi Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20210620160135.28651-1-timur@kernel.org Signed-off-by: Mark Brown (cherry picked from commit 50b1ce617d66d04f1f9006e51793e6cffcdec6ea) Signed-off-by: Takashi Iwai commit 10043bb6af4230c57aeabaee02e6a42302f18d0f Author: Mark Brown Date: Tue Jun 8 17:07:13 2021 +0100 ASoC: rt5645: Avoid upgrading static warnings to errors One of the fixes reverted as part of the UMN fallout was actually fine, however rather than undoing the revert the process that handled all this stuff resulted in a patch which attempted to add extra error checks instead. Unfortunately this new change wasn't really based on a good understanding of the subsystem APIs and bypassed the usual patch flow without ensuring it was reviewed by people with subsystem knowledge and was merged as a fix rather than during the merge window. The effect of the new fix is to upgrade what were previously warnings on static data in the code to hard errors on that data. If this actually happens then it would break existing systems, if it doesn't happen then the change has no effect so this was not a safe change to apply as a fix to the release candidates. Since the new code has not been tested and doesn't in practice improve error handling revert it instead, and also drop the original revert since the original fix was fine. This takes the driver back to what it was in -rc1. Fixes: 5e70b8e22b64e ("ASoC: rt5645: add error checking to rt5645_probe function") Fixes: 1e0ce84215dbf ("Revert "ASoC: rt5645: fix a NULL pointer dereference") Signed-off-by: Mark Brown Cc: Greg Kroah-Hartman Cc: Phillip Potter Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210608160713.21040-1-broonie@kernel.org Signed-off-by: Mark Brown (cherry picked from commit 916cccb5078eee57fce131c5fe18e417545083e2) Signed-off-by: Takashi Iwai commit 309505dd56854c1f9744c9a2b8aa40d897002bca Author: Zenghui Yu Date: Thu Jun 24 15:09:31 2021 +0800 KVM: selftests: Fix mapping length truncation in m{,un}map() max_mem_slots is now declared as uint32_t. The result of (0x200000 * 32767) is unexpectedly truncated to be 0xffe00000, whilst we actually need to allocate about, 63GB. Cast max_mem_slots to size_t in both mmap() and munmap() to fix the length truncation. We'll otherwise see the failure on arm64 thanks to the access_ok() checking in __kvm_set_memory_region(), as the unmapped VA happen to go beyond the task's allowed address space. # ./set_memory_region_test Allowed number of memory slots: 32767 Adding slots 0..32766, each memory region with 2048K size ==== Test Assertion Failure ==== set_memory_region_test.c:391: ret == 0 pid=94861 tid=94861 errno=22 - Invalid argument 1 0x00000000004015a7: test_add_max_memory_regions at set_memory_region_test.c:389 2 (inlined by) main at set_memory_region_test.c:426 3 0x0000ffffb8e67bdf: ?? ??:0 4 0x00000000004016db: _start at :? KVM_SET_USER_MEMORY_REGION IOCTL failed, rc: -1 errno: 22 slot: 2615 Fixes: 3bf0fcd75434 ("KVM: selftests: Speed up set_memory_region_test") Signed-off-by: Zenghui Yu Message-Id: <20210624070931.565-1-yuzenghui@huawei.com> Signed-off-by: Paolo Bonzini commit efea0c12a47bc41d22dbe6499a5fd8a5a856b792 Merge: 13311e74253fe ee5468b9f1d3b Author: Dave Airlie Date: Thu Jun 24 17:06:12 2021 +1000 Merge tag 'amd-drm-fixes-5.13-2021-06-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.13-2021-06-21: amdgpu: - Revert GFX9, 10 doorbell fixes, we just end up trading one bug for another - Potential memory corruption fix in framebuffer handling Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210621214132.4004-1-alexander.deucher@amd.com commit 7f049fbdd57f6ea71dc741d903c19c73b2f70950 Author: Thomas Gleixner Date: Fri Jun 11 15:03:16 2021 +0200 perf/x86/intel/lbr: Zero the xstate buffer on allocation XRSTORS requires a valid xstate buffer to work correctly. XSAVES does not guarantee to write a fully valid buffer according to the SDM: "XSAVES does not write to any parts of the XSAVE header other than the XSTATE_BV and XCOMP_BV fields." XRSTORS triggers a #GP: "If bytes 63:16 of the XSAVE header are not all zero." It's dubious at best how this can work at all when the buffer is not zeroed before use. Allocate the buffers with __GFP_ZERO to prevent XRSTORS failure. Fixes: ce711ea3cab9 ("perf/x86/intel/lbr: Support XSAVES/XRSTORS for LBR context switch") Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/87wnr0wo2z.ffs@nanos.tec.linutronix.de commit 7426cedc7dad67bf3c71ea6cc29ab7822e1a453f Merge: 7266f2030eb0e f422316c8e9d3 Author: Linus Torvalds Date: Wed Jun 23 11:29:15 2021 -0700 Merge tag 'spi-fix-v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A couple of small, driver specific fixes that arrived in the past few weeks" * tag 'spi-fix-v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-nxp-fspi: move the register operation after the clock enable spi: tegra20-slink: Ensure SPI controller reset is deasserted commit 5dca69e26fe97f17d4a6cbd6872103c868577b14 Author: Heikki Krogerus Date: Wed Jun 23 16:14:21 2021 +0300 software node: Handle software node injection to an existing device properly The function software_node_notify() - the function that creates and removes the symlinks between the node and the device - was called unconditionally in device_add_software_node() and device_remove_software_node(), but it needs to be called in those functions only in the special case where the node is added to a device that has already been registered. This fixes NULL pointer dereference that happens if device_remove_software_node() is used with device that was never registered. Fixes: b622b24519f5 ("software node: Allow node addition to already existing device") Reported-and-tested-by: Dominik Brodowski Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Signed-off-by: Rafael J. Wysocki commit 7266f2030eb0e17c442aa6cf527263828eed79bd Merge: 8fd2ed1c01dd9 4d6035f9bf4ea Author: Linus Torvalds Date: Wed Jun 23 09:40:55 2021 -0700 Merge tag 'pm-5.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Revert a recent PCI power management commit that causes initialization issues to appear on some systems" * tag 'pm-5.13-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "PCI: PM: Do not read power state in pci_enable_device_flags()" commit 8fd2ed1c01dd96396c39dfa203c54705c6b6e03b Merge: 0c18f29aae7ce 5f89468e2f060 Author: Linus Torvalds Date: Wed Jun 23 09:04:07 2021 -0700 Merge branch 'stable/for-linus-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb fix from Konrad Rzeszutek Wilk: "A fix for the regression for the DMA operations where the offset was ignored and corruptions would appear. Going forward there will be a cleanups to make the offset and alignment logic more clearer and better test-cases to help with this" * 'stable/for-linus-5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: manipulate orig_addr when tlb_addr has offset commit d1b7f92035c6fb42529ada531e2cbf3534544c82 Author: Christoph Hellwig Date: Thu Jun 17 13:55:04 2021 +0200 scsi: sd: Call sd_revalidate_disk() for ioctl(BLKRRPART) While the disk state has nothing to do with partitions, BLKRRPART is used to force a full revalidate after things like a disk format for historical reasons. Restore that behavior. Link: https://lore.kernel.org/r/20210617115504.1732350-1-hch@lst.de Fixes: 471bd0af544b ("sd: use bdev_check_media_change") Reported-by: Xiang Chen Tested-by: Xiang Chen Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen commit 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 Author: Mimi Zohar Date: Tue Jun 22 13:36:41 2021 +0200 module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/sig_enforce dependent on CONFIG_MODULE_SIG=y. Fixes: fda784e50aac ("module: export module signature enforcement status") Reported-by: Nayna Jain Tested-by: Mimi Zohar Tested-by: Jessica Yu Signed-off-by: Mimi Zohar Signed-off-by: Jessica Yu Signed-off-by: Linus Torvalds commit 6fd8f323b3e4e5290d02174559308669507c00dd Author: Zhen Lei Date: Thu May 13 21:46:38 2021 +0800 drm/kmb: Fix error return code in kmb_hw_init() When the call to platform_get_irq() to obtain the IRQ of the lcd fails, the returned error code should be propagated. However, we currently do not explicitly assign this error code to 'ret'. As a result, 0 was incorrectly returned. Fixes: 7f7b96a8a0a1 ("drm/kmb: Add support for KeemBay Display") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Anitha Chrisanthus Link: https://patchwork.freedesktop.org/patch/msgid/20210513134639.6541-1-thunder.leizhen@huawei.com commit 4d6035f9bf4ea12776322746a216e856dfe46698 Author: Rafael J. Wysocki Date: Tue Jun 22 17:35:18 2021 +0200 Revert "PCI: PM: Do not read power state in pci_enable_device_flags()" Revert commit 4514d991d992 ("PCI: PM: Do not read power state in pci_enable_device_flags()") that is reported to cause PCI device initialization issues on some systems. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213481 Link: https://lore.kernel.org/linux-acpi/YNDoGICcg0V8HhpQ@eldamar.lan Reported-by: Michael Reported-by: Salvatore Bonaccorso Fixes: 4514d991d992 ("PCI: PM: Do not read power state in pci_enable_device_flags()") Signed-off-by: Rafael J. Wysocki commit 399f8dd9a866e107639eabd3c1979cd526ca3a98 Author: Thomas Gleixner Date: Tue Jun 22 01:08:30 2021 +0200 signal: Prevent sigqueue caching after task got released syzbot reported a memory leak related to sigqueue caching. The assumption that a task cannot cache a sigqueue after the signal handler has been dropped and exit_task_sigqueue_cache() has been invoked turns out to be wrong. Such a task can still invoke release_task(other_task), which cleans up the signals of 'other_task' and ends up in sigqueue_cache_or_free(), which in turn will cache the signal because task->sigqueue_cache is NULL. That's obviously bogus because nothing will free the cached signal of that task anymore, so the cached item is leaked. This happens when e.g. the last non-leader thread exits and reaps the zombie leader. Prevent this by setting tsk::sigqueue_cache to an error pointer value in exit_task_sigqueue_cache() which forces any subsequent invocation of sigqueue_cache_or_free() from that task to hand the sigqueue back to the kmemcache. Add comments to all relevant places. Fixes: 4bad58ebc8bc ("signal: Allow tasks to cache one sigqueue struct") Reported-by: syzbot+0bac5fec63d4f399ba98@syzkaller.appspotmail.com Signed-off-by: Thomas Gleixner Reviewed-by: Oleg Nesterov Acked-by: Christian Brauner Link: https://lore.kernel.org/r/878s32g6j5.ffs@nanos.tec.linutronix.de commit 8ddf5b9bb479570a3825d70fecfb9399bc15700c Author: Christian König Date: Mon Jun 21 14:29:14 2021 +0200 drm/amdgpu: wait for moving fence after pinning We actually need to wait for the moving fence after pinning the BO to make sure that the pin is completed. Signed-off-by: Christian König Reviewed-by: Daniel Vetter References: https://lore.kernel.org/dri-devel/20210621151758.2347474-1-daniel.vetter@ffwll.ch/ CC: stable@kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210622114506.106349-3-christian.koenig@amd.com commit 4b41726aae563273bb4b4a9462ba51ce4d372f78 Author: Christian König Date: Mon Jun 21 13:43:05 2021 +0200 drm/radeon: wait for moving fence after pinning We actually need to wait for the moving fence after pinning the BO to make sure that the pin is completed. Signed-off-by: Christian König Reviewed-by: Daniel Vetter References: https://lore.kernel.org/dri-devel/20210621151758.2347474-1-daniel.vetter@ffwll.ch/ CC: stable@kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210622114506.106349-2-christian.koenig@amd.com commit 17b11f71795abdce46f62a808f906857e525cea8 Author: Christian König Date: Mon Jun 21 13:36:35 2021 +0200 drm/nouveau: wait for moving fence after pinning v2 We actually need to wait for the moving fence after pinning the BO to make sure that the pin is completed. v2: grab the lock while waiting Signed-off-by: Christian König Reviewed-by: Daniel Vetter References: https://lore.kernel.org/dri-devel/20210621151758.2347474-1-daniel.vetter@ffwll.ch/ CC: stable@kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210622114506.106349-1-christian.koenig@amd.com commit fdaba61ef8a268d4136d0a113d153f7a89eb9984 Author: Rik van Riel Date: Mon Jun 21 19:43:30 2021 +0200 sched/fair: Ensure that the CFS parent is added after unthrottling Ensure that a CFS parent will be in the list whenever one of its children is also in the list. A warning on rq->tmp_alone_branch != &rq->leaf_cfs_rq_list has been reported while running LTP test cfs_bandwidth01. Odin Ugedal found the root cause: $ tree /sys/fs/cgroup/ltp/ -d --charset=ascii /sys/fs/cgroup/ltp/ |-- drain `-- test-6851 `-- level2 |-- level3a | |-- worker1 | `-- worker2 `-- level3b `-- worker3 Timeline (ish): - worker3 gets throttled - level3b is decayed, since it has no more load - level2 get throttled - worker3 get unthrottled - level2 get unthrottled - worker3 is added to list - level3b is not added to list, since nr_running==0 and is decayed [ Vincent Guittot: Rebased and updated to fix for the reported warning. ] Fixes: a7b359fc6a37 ("sched/fair: Correctly insert cfs_rq's to list on unthrottle") Reported-by: Sachin Sant Suggested-by: Vincent Guittot Signed-off-by: Rik van Riel Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Sachin Sant Acked-by: Odin Ugedal Link: https://lore.kernel.org/r/20210621174330.11258-1-vincent.guittot@linaro.org commit 49faa77759b211fff344898edc23bb780707fff5 Author: Peter Zijlstra Date: Mon Jun 21 13:12:38 2021 +0200 locking/lockdep: Improve noinstr vs errors Better handle the failure paths. vmlinux.o: warning: objtool: debug_locks_off()+0x23: call to console_verbose() leaves .noinstr.text section vmlinux.o: warning: objtool: debug_locks_off()+0x19: call to __kasan_check_write() leaves .noinstr.text section debug_locks_off+0x19/0x40: instrument_atomic_write at include/linux/instrumented.h:86 (inlined by) __debug_locks_off at include/linux/debug_locks.h:17 (inlined by) debug_locks_off at lib/debug_locks.c:41 Fixes: 6eebad1ad303 ("lockdep: __always_inline more for noinstr") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210621120120.784404944@infradead.org commit 1f008d46f1243899d27fd034ab5c41985bd16cee Author: Peter Zijlstra Date: Mon Jun 21 13:12:37 2021 +0200 x86: Always inline task_size_max() Fix: vmlinux.o: warning: objtool: handle_bug()+0x10: call to task_size_max() leaves .noinstr.text section When #UD isn't a BUG, we shouldn't violate noinstr (we'll still probably die, but that's another story). Fixes: 025768a966a3 ("x86/cpu: Use alternative to generate the TASK_SIZE_MAX constant") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210621120120.682468274@infradead.org commit 4c9c26f1e67648f41f28f8c997c5c9467a3dbbe4 Author: Peter Zijlstra Date: Mon Jun 21 13:12:36 2021 +0200 x86/xen: Fix noinstr fail in exc_xen_unknown_trap() Fix: vmlinux.o: warning: objtool: exc_xen_unknown_trap()+0x7: call to printk() leaves .noinstr.text section Fixes: 2e92493637a0 ("x86/xen: avoid warning in Xen pv guest with CONFIG_AMD_MEM_ENCRYPT enabled") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210621120120.606560778@infradead.org commit 84e60065df9ef03759115a7e48c04bbc0d292165 Author: Peter Zijlstra Date: Mon Jun 21 13:12:35 2021 +0200 x86/xen: Fix noinstr fail in xen_pv_evtchn_do_upcall() Fix: vmlinux.o: warning: objtool: xen_pv_evtchn_do_upcall()+0x23: call to irq_enter_rcu() leaves .noinstr.text section Fixes: 359f01d1816f ("x86/entry: Use run_sysvec_on_irqstack_cond() for XEN upcall") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210621120120.532960208@infradead.org commit 240001d4e3041832e8a2654adc3ccf1683132b92 Author: Peter Zijlstra Date: Mon Jun 21 13:12:34 2021 +0200 x86/entry: Fix noinstr fail in __do_fast_syscall_32() Fix: vmlinux.o: warning: objtool: __do_fast_syscall_32()+0xf5: call to trace_hardirqs_off() leaves .noinstr.text section Fixes: 5d5675df792f ("x86/entry: Fix entry/exit mismatch on failed fast 32-bit syscalls") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210621120120.467898710@infradead.org commit 7a971e2c0767b6fc9a77c4108eceff0509c61cdb Author: Jeff Layton Date: Wed Jun 2 12:46:07 2021 -0400 ceph: fix error handling in ceph_atomic_open and ceph_lookup Commit aa60cfc3f7ee broke the error handling in these functions such that they don't handle non-ENOENT errors from ceph_mdsc_do_request properly. Move the checking of -ENOENT out of ceph_handle_snapdir and into the callers, and if we get a different error, return it immediately. Fixes: aa60cfc3f7ee ("ceph: don't use d_add in ceph_handle_snapdir") Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 27171ae6a0fdc75571e5bf3d0961631a1e4fb765 Author: Jeff Layton Date: Tue Jun 1 09:40:25 2021 -0400 ceph: must hold snap_rwsem when filling inode for async create ...and add a lockdep assertion for it to ceph_fill_inode(). Cc: stable@vger.kernel.org # v5.7+ Fixes: 9a8d03ca2e2c3 ("ceph: attempt to do async create when possible") Signed-off-by: Jeff Layton Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit f9dfb5e390fab2df9f7944bb91e7705aba14cd26 Author: Thomas Gleixner Date: Fri Jun 18 16:18:25 2021 +0200 x86/fpu: Make init_fpstate correct with optimized XSAVE The XSAVE init code initializes all enabled and supported components with XRSTOR(S) to init state. Then it XSAVEs the state of the components back into init_fpstate which is used in several places to fill in the init state of components. This works correctly with XSAVE, but not with XSAVEOPT and XSAVES because those use the init optimization and skip writing state of components which are in init state. So init_fpstate.xsave still contains all zeroes after this operation. There are two ways to solve that: 1) Use XSAVE unconditionally, but that requires to reshuffle the buffer when XSAVES is enabled because XSAVES uses compacted format. 2) Save the components which are known to have a non-zero init state by other means. Looking deeper, #2 is the right thing to do because all components the kernel supports have all-zeroes init state except the legacy features (FP, SSE). Those cannot be hard coded because the states are not identical on all CPUs, but they can be saved with FXSAVE which avoids all conditionals. Use FXSAVE to save the legacy FP/SSE components in init_fpstate along with a BUILD_BUG_ON() which reminds developers to validate that a newly added component has all zeroes init state. As a bonus remove the now unused copy_xregs_to_kernel_booting() crutch. The XSAVE and reshuffle method can still be implemented in the unlikely case that components are added which have a non-zero init state and no other means to save them. For now, FXSAVE is just simple and good enough. [ bp: Fix a typo or two in the text. ] Fixes: 6bad06b76892 ("x86, xsave: Use xsaveopt in context-switch path when supported") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210618143444.587311343@linutronix.de commit 9301982c424a003c0095bf157154a85bf5322bd0 Author: Thomas Gleixner Date: Fri Jun 18 16:18:24 2021 +0200 x86/fpu: Preserve supervisor states in sanitize_restored_user_xstate() sanitize_restored_user_xstate() preserves the supervisor states only when the fx_only argument is zero, which allows unprivileged user space to put supervisor states back into init state. Preserve them unconditionally. [ bp: Fix a typo or two in the text. ] Fixes: 5d6b6a6f9b5c ("x86/fpu/xstate: Update sanitize_restored_xstate() for supervisor xstates") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210618143444.438635017@linutronix.de commit f54b3ca7ea1e5e02f481cf4ca54568e57bd66086 Author: Daniel Vetter Date: Tue Jun 22 09:54:09 2021 +0200 Revert "drm: add a locked version of drm_is_current_master" This reverts commit 1815d9c86e3090477fbde066ff314a7e9721ee0f. Unfortunately this inverts the locking hierarchy, so back to the drawing board. Full lockdep splat below: ====================================================== WARNING: possible circular locking dependency detected 5.13.0-rc7-CI-CI_DRM_10254+ #1 Not tainted ------------------------------------------------------ kms_frontbuffer/1087 is trying to acquire lock: ffff88810dcd01a8 (&dev->master_mutex){+.+.}-{3:3}, at: drm_is_current_master+0x1b/0x40 but task is already holding lock: ffff88810dcd0488 (&dev->mode_config.mutex){+.+.}-{3:3}, at: drm_mode_getconnector+0x1c6/0x4a0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&dev->mode_config.mutex){+.+.}-{3:3}: __mutex_lock+0xab/0x970 drm_client_modeset_probe+0x22e/0xca0 __drm_fb_helper_initial_config_and_unlock+0x42/0x540 intel_fbdev_initial_config+0xf/0x20 [i915] async_run_entry_fn+0x28/0x130 process_one_work+0x26d/0x5c0 worker_thread+0x37/0x380 kthread+0x144/0x170 ret_from_fork+0x1f/0x30 -> #1 (&client->modeset_mutex){+.+.}-{3:3}: __mutex_lock+0xab/0x970 drm_client_modeset_commit_locked+0x1c/0x180 drm_client_modeset_commit+0x1c/0x40 __drm_fb_helper_restore_fbdev_mode_unlocked+0x88/0xb0 drm_fb_helper_set_par+0x34/0x40 intel_fbdev_set_par+0x11/0x40 [i915] fbcon_init+0x270/0x4f0 visual_init+0xc6/0x130 do_bind_con_driver+0x1e5/0x2d0 do_take_over_console+0x10e/0x180 do_fbcon_takeover+0x53/0xb0 register_framebuffer+0x22d/0x310 __drm_fb_helper_initial_config_and_unlock+0x36c/0x540 intel_fbdev_initial_config+0xf/0x20 [i915] async_run_entry_fn+0x28/0x130 process_one_work+0x26d/0x5c0 worker_thread+0x37/0x380 kthread+0x144/0x170 ret_from_fork+0x1f/0x30 -> #0 (&dev->master_mutex){+.+.}-{3:3}: __lock_acquire+0x151e/0x2590 lock_acquire+0xd1/0x3d0 __mutex_lock+0xab/0x970 drm_is_current_master+0x1b/0x40 drm_mode_getconnector+0x37e/0x4a0 drm_ioctl_kernel+0xa8/0xf0 drm_ioctl+0x1e8/0x390 __x64_sys_ioctl+0x6a/0xa0 do_syscall_64+0x39/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Chain exists of: &dev->master_mutex --> &client->modeset_mutex --> &dev->mode_config.mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dev->mode_config.mutex); lock(&client->modeset_mutex); lock(&dev->mode_config.mutex); lock(&dev->master_mutex); *** DEADLOCK *** 1 lock held by kms_frontbuffer/1087: #0: ffff88810dcd0488 (&dev->mode_config.mutex){+.+.}-{3:3}, at: drm_mode_getconnector+0x1c6/0x4a0 stack backtrace: CPU: 7 PID: 1087 Comm: kms_frontbuffer Not tainted 5.13.0-rc7-CI-CI_DRM_10254+ #1 Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3234.A01.1906141750 06/14/2019 Call Trace: dump_stack+0x7f/0xad check_noncircular+0x12e/0x150 __lock_acquire+0x151e/0x2590 lock_acquire+0xd1/0x3d0 __mutex_lock+0xab/0x970 drm_is_current_master+0x1b/0x40 drm_mode_getconnector+0x37e/0x4a0 drm_ioctl_kernel+0xa8/0xf0 drm_ioctl+0x1e8/0x390 __x64_sys_ioctl+0x6a/0xa0 do_syscall_64+0x39/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae Note that this broke the intel-gfx CI pretty much across the board because it has to reboot machines after it hits a lockdep splat. Testcase: igt/debugfs_test/read_all_entries Acked-by: Petri Latvala Fixes: 1815d9c86e30 ("drm: add a locked version of drm_is_current_master") Cc: Desmond Cheong Zhi Xi Cc: Emil Velikov Cc: stable@vger.kernel.org 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/20210622075409.2673805-1-daniel.vetter@ffwll.ch commit cb8f63b8cbf39845244f3ccae43bb7e63bd70543 Author: Gabriel Knezek Date: Mon Jun 21 15:28:59 2021 -0700 gpiolib: cdev: zero padding during conversion to gpioline_info_changed When userspace requests a GPIO v1 line info changed event, lineinfo_watch_read() populates and returns the gpioline_info_changed structure. It contains 5 words of padding at the end which are not initialized before being returned to userspace. Zero the structure in gpio_v2_line_info_change_to_v1() before populating its contents. Fixes: aad955842d1c ("gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL") Signed-off-by: Gabriel Knezek Reviewed-by: Kent Gibson Signed-off-by: Bartosz Golaszewski commit ee5468b9f1d3bf48082eed351dace14598e8ca39 Author: Yifan Zhang Date: Sat Jun 19 11:40:54 2021 +0800 Revert "drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue." This reverts commit 4cbbe34807938e6e494e535a68d5ff64edac3f20. Reason for revert: side effect of enlarging CP_MEC_DOORBELL_RANGE may cause some APUs fail to enter gfxoff in certain user cases. Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit baacf52a473b24e10322b67757ddb92ab8d86717 Author: Yifan Zhang Date: Sat Jun 19 11:39:43 2021 +0800 Revert "drm/amdgpu/gfx10: enlarge CP_MEC_DOORBELL_RANGE_UPPER to cover full doorbell." This reverts commit 1c0b0efd148d5b24c4932ddb3fa03c8edd6097b3. Reason for revert: Side effect of enlarging CP_MEC_DOORBELL_RANGE may cause some APUs fail to enter gfxoff in certain user cases. Signed-off-by: Yifan Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4c6a23188e26339fd3dbc78e6ce6fe0fc4009553 Author: Michel Dänzer Date: Wed Jun 16 12:46:51 2021 +0200 drm/amdgpu: Call drm_framebuffer_init last for framebuffer init Once drm_framebuffer_init has returned 0, the framebuffer is hooked up to the reference counting machinery and can no longer be destroyed with a simple kfree. Therefore, it must be called last. If drm_framebuffer_init returns 0 but its caller then returns non-0, there will likely be memory corruption fireworks down the road. The following lead me to this fix: [ 12.891228] kernel BUG at lib/list_debug.c:25! [...] [ 12.891263] RIP: 0010:__list_add_valid+0x4b/0x70 [...] [ 12.891324] Call Trace: [ 12.891330] drm_framebuffer_init+0xb5/0x100 [drm] [ 12.891378] amdgpu_display_gem_fb_verify_and_init+0x47/0x120 [amdgpu] [ 12.891592] ? amdgpu_display_user_framebuffer_create+0x10d/0x1f0 [amdgpu] [ 12.891794] amdgpu_display_user_framebuffer_create+0x126/0x1f0 [amdgpu] [ 12.891995] drm_internal_framebuffer_create+0x378/0x3f0 [drm] [ 12.892036] ? drm_internal_framebuffer_create+0x3f0/0x3f0 [drm] [ 12.892075] drm_mode_addfb2+0x34/0xd0 [drm] [ 12.892115] ? drm_internal_framebuffer_create+0x3f0/0x3f0 [drm] [ 12.892153] drm_ioctl_kernel+0xe2/0x150 [drm] [ 12.892193] drm_ioctl+0x3da/0x460 [drm] [ 12.892232] ? drm_internal_framebuffer_create+0x3f0/0x3f0 [drm] [ 12.892274] amdgpu_drm_ioctl+0x43/0x80 [amdgpu] [ 12.892475] __se_sys_ioctl+0x72/0xc0 [ 12.892483] do_syscall_64+0x33/0x40 [ 12.892491] entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: f258907fdd835e "drm/amdgpu: Verify bo size can fit framebuffer size on init." Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 827a746f405d25f79560c7868474aec5aee174e1 Author: Jeff Layton Date: Sun Jun 13 19:33:45 2021 -0400 netfs: fix test for whether we can skip read when writing beyond EOF It's not sufficient to skip reading when the pos is beyond the EOF. There may be data at the head of the page that we need to fill in before the write. Add a new helper function that corrects and clarifies the logic of when we can skip reads, and have it only zero out the part of the page that won't have data copied in for the write. Finally, don't set the page Uptodate after zeroing. It's not up to date since the write data won't have been copied in yet. [DH made the following changes: - Prefixed the new function with "netfs_". - Don't call zero_user_segments() for a full-page write. - Altered the beyond-last-page check to avoid a DIV instruction and got rid of then-redundant zero-length file check. ] Fixes: e1b1240c1ff5f ("netfs: Add write_begin helper") Reported-by: Andrew W Elble Signed-off-by: Jeff Layton Signed-off-by: David Howells Reviewed-by: Matthew Wilcox (Oracle) cc: ceph-devel@vger.kernel.org Link: https://lore.kernel.org/r/20210613233345.113565-1-jlayton@kernel.org/ Link: https://lore.kernel.org/r/162367683365.460125.4467036947364047314.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/162391826758.1173366.11794946719301590013.stgit@warthog.procyon.org.uk/ # v2 commit 66e9c6a86b800f60b1e1ea1ff7271f9e6ed1fa96 Author: David Howells Date: Mon Jun 14 14:13:41 2021 +0100 afs: Fix afs_write_end() to handle short writes Fix afs_write_end() to correctly handle a short copy into the intended write region of the page. Two things are necessary: (1) If the page is not up to date, then we should just return 0 (ie. indicating a zero-length copy). The loop in generic_perform_write() will go around again, possibly breaking up the iterator into discrete chunks[1]. This is analogous to commit b9de313cf05fe08fa59efaf19756ec5283af672a for ceph. (2) The page should not have been set uptodate if it wasn't completely set up by netfs_write_begin() (this will be fixed in the next patch), so we need to set uptodate here in such a case. Also remove the assertion that was checking that the page was set uptodate since it's now set uptodate if it wasn't already a few lines above. The assertion was from when uptodate was set elsewhere. Changes: v3: Remove the handling of len exceeding the end of the page. Fixes: 3003bbd0697b ("afs: Use the netfs_write_begin() helper") Reported-by: Jeff Layton Signed-off-by: David Howells Acked-by: Jeff Layton Reviewed-by: Matthew Wilcox (Oracle) cc: Al Viro cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/YMwVp268KTzTf8cN@zeniv-ca.linux.org.uk/ [1] Link: https://lore.kernel.org/r/162367682522.460125.5652091227576721609.stgit@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/162391825688.1173366.3437507255136307904.stgit@warthog.procyon.org.uk/ # v2 commit 3093e6cca3ba7d47848068cb256c489675125181 Author: Loic Poulain Date: Thu Jun 17 15:54:13 2021 +0200 gpio: mxc: Fix disabled interrupt wake-up support A disabled/masked interrupt marked as wakeup source must be re-enable and unmasked in order to be able to wake-up the host. That can be done by flaging the irqchip with IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND. Note: It 'sometimes' works without that change, but only thanks to the lazy generic interrupt disabling (keeping interrupt unmasked). Reported-by: Michal Koziel Signed-off-by: Loic Poulain Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit a96bfed64c8986d6404e553f18203cae1f5ac7e6 Merge: 13311e74253fe dad7b9896a5db Author: Linus Torvalds Date: Mon Jun 21 09:49:48 2021 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: - fix gcc 10 compiler regression with cpu_init() * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 9081/1: fix gcc-10 thumb2-kernel regression commit 1815d9c86e3090477fbde066ff314a7e9721ee0f Author: Desmond Cheong Zhi Xi Date: Sun Jun 20 19:03:26 2021 +0800 drm: add a locked version of drm_is_current_master While checking the master status of the DRM file in drm_is_current_master(), the device's master mutex should be held. Without the mutex, the pointer fpriv->master may be freed concurrently by another process calling drm_setmaster_ioctl(). This could lead to use-after-free errors when the pointer is subsequently dereferenced in drm_lease_owner(). The callers of drm_is_current_master() from drm_auth.c hold the device's master mutex, but external callers do not. Hence, we implement drm_is_current_master_locked() to be used within drm_auth.c, and modify drm_is_current_master() to grab the device's master mutex before checking the master status. Reported-by: Daniel Vetter Signed-off-by: Desmond Cheong Zhi Xi Reviewed-by: Emil Velikov Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210620110327.4964-2-desmondcheongzx@gmail.com commit 31197d3a0f1caeb60fb01f6755e28347e4f44037 Author: Peter Zijlstra Date: Mon Jun 21 16:13:55 2021 +0200 objtool/x86: Ignore __x86_indirect_alt_* symbols Because the __x86_indirect_alt* symbols are just that, objtool will try and validate them as regular symbols, instead of the alternative replacements that they are. This goes sideways for FRAME_POINTER=y builds; which generate a fair amount of warnings. Fixes: 9bc0bb50727c ("objtool/x86: Rewrite retpoline thunk calls") Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/YNCgxwLBiK9wclYJ@hirez.programming.kicks-ass.net commit 5f89468e2f060031cd89fd4287298e0eaf246bf6 Author: Bumyong Lee Date: Mon May 10 18:10:04 2021 +0900 swiotlb: manipulate orig_addr when tlb_addr has offset in case of driver wants to sync part of ranges with offset, swiotlb_tbl_sync_single() copies from orig_addr base to tlb_addr with offset and ends up with data mismatch. It was removed from "swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single", but said logic has to be added back in. From Linus's email: "That commit which the removed the offset calculation entirely, because the old (unsigned long)tlb_addr & (IO_TLB_SIZE - 1) was wrong, but instead of removing it, I think it should have just fixed it to be (tlb_addr - mem->start) & (IO_TLB_SIZE - 1); instead. That way the slot offset always matches the slot index calculation." (Unfortunatly that broke NVMe). The use-case that drivers are hitting is as follow: 1. Get dma_addr_t from dma_map_single() dma_addr_t tlb_addr = dma_map_single(dev, vaddr, vsize, DMA_TO_DEVICE); |<---------------vsize------------->| +-----------------------------------+ | | original buffer +-----------------------------------+ vaddr swiotlb_align_offset |<----->|<---------------vsize------------->| +-------+-----------------------------------+ | | | swiotlb buffer +-------+-----------------------------------+ tlb_addr 2. Do something 3. Sync dma_addr_t through dma_sync_single_for_device(..) dma_sync_single_for_device(dev, tlb_addr + offset, size, DMA_TO_DEVICE); Error case. Copy data to original buffer but it is from base addr (instead of base addr + offset) in original buffer: swiotlb_align_offset |<----->|<- offset ->|<- size ->| +-------+-----------------------------------+ | | |##########| | swiotlb buffer +-------+-----------------------------------+ tlb_addr |<- size ->| +-----------------------------------+ |##########| | original buffer +-----------------------------------+ vaddr The fix is to copy the data to the original buffer and take into account the offset, like so: swiotlb_align_offset |<----->|<- offset ->|<- size ->| +-------+-----------------------------------+ | | |##########| | swiotlb buffer +-------+-----------------------------------+ tlb_addr |<- offset ->|<- size ->| +-----------------------------------+ | |##########| | original buffer +-----------------------------------+ vaddr [One fix which was Linus's that made more sense to as it created a symmetry would break NVMe. The reason for that is the: unsigned int offset = (tlb_addr - mem->start) & (IO_TLB_SIZE - 1); would come up with the proper offset, but it would lose the alignment (which this patch contains).] Fixes: 16fc3cef33a0 ("swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single") Signed-off-by: Bumyong Lee Signed-off-by: Chanho Park Reviewed-by: Christoph Hellwig Reported-by: Dominique MARTINET Reported-by: Horia Geantă Tested-by: Horia Geantă CC: stable@vger.kernel.org Signed-off-by: Konrad Rzeszutek Wilk commit 67147e96a332b56c7206238162771d82467f86c0 Author: Heiko Carstens Date: Fri Jun 18 16:58:47 2021 +0200 s390/stack: fix possible register corruption with stack switch helper The CALL_ON_STACK macro is used to call a C function from inline assembly, and therefore must consider the C ABI, which says that only registers 6-13, and 15 are non-volatile (restored by the called function). The inline assembly incorrectly marks all registers used to pass parameters to the called function as read-only input operands, instead of operands that are read and written to. This might result in register corruption depending on usage, compiler, and compile options. Fix this by marking all operands used to pass parameters as read/write operands. To keep the code simple even register 6, if used, is marked as read-write operand. Fixes: ff340d2472ec ("s390: add stack switch helper") Cc: # 4.20 Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 9e3d62d55bf455d4f9fdf2ede5c8756410c64102 Author: Sven Schnelle Date: Tue Jun 15 15:05:22 2021 +0200 s390/topology: clear thread/group maps for offline cpus The current code doesn't clear the thread/group maps for offline CPUs. This may cause kernel crashes like the one bewlow in common code that assumes if a CPU has sibblings it is online. Unable to handle kernel pointer dereference in virtual kernel address space Call Trace: [<000000013a4b8c3c>] blk_mq_map_swqueue+0x10c/0x388 ([<000000013a4b8bcc>] blk_mq_map_swqueue+0x9c/0x388) [<000000013a4b9300>] blk_mq_init_allocated_queue+0x448/0x478 [<000000013a4b9416>] blk_mq_init_queue+0x4e/0x90 [<000003ff8019d3e6>] loop_add+0x106/0x278 [loop] [<000003ff801b8148>] loop_init+0x148/0x1000 [loop] [<0000000139de4924>] do_one_initcall+0x3c/0x1e0 [<0000000139ef449a>] do_init_module+0x6a/0x2a0 [<0000000139ef61bc>] __do_sys_finit_module+0xa4/0xc0 [<0000000139de9e6e>] do_syscall+0x7e/0xd0 [<000000013a8e0aec>] __do_syscall+0xbc/0x110 [<000000013a8ee2e8>] system_call+0x78/0xa0 Fixes: 52aeda7accb6 ("s390/topology: remove offline CPUs from CPU topology masks") Cc: # 5.7+ Reported-by: Marius Hillenbrand Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 8c0795d2a0f50e2b131f5b2a8c2795939a94058e Author: Tony Krowiak Date: Wed Jun 9 18:46:32 2021 -0400 s390/vfio-ap: clean up mdev resources when remove callback invoked The mdev remove callback for the vfio_ap device driver bails out with -EBUSY if the mdev is in use by a KVM guest (i.e., the KVM pointer in the struct ap_matrix_mdev is not NULL). The intended purpose was to prevent the mdev from being removed while in use. There are two problems with this scenario: 1. Returning a non-zero return code from the remove callback does not prevent the removal of the mdev. 2. The KVM pointer in the struct ap_matrix_mdev will always be NULL because the remove callback will not get invoked until the mdev fd is closed. When the mdev fd is closed, the mdev release callback is invoked and clears the KVM pointer from the struct ap_matrix_mdev. Let's go ahead and remove the check for KVM in the remove callback and allow the cleanup of mdev resources to proceed. Signed-off-by: Tony Krowiak Reviewed-by: Jason Gunthorpe Link: https://lore.kernel.org/r/20210609224634.575156-2-akrowiak@linux.ibm.com Signed-off-by: Vasily Gorbik commit ca1f4d702d534387aa1f16379edb3b03cdb6ceda Author: Sven Schnelle Date: Fri Jun 11 16:08:18 2021 +0200 s390: clear pt_regs::flags on irq entry The current irq entry code doesn't initialize pt_regs::flags. On exit to user mode arch_do_signal_or_restart() tests whether PIF_SYSCALL is set, which might yield wrong results. Fix this by clearing pt_regs::flags in the entry.S irq handler code. Reported-by: Heiko Carstens Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Fixes: 56e62a737028 ("s390: convert to generic entry") Cc: # 5.12 Signed-off-by: Vasily Gorbik commit fc66127dc3396338f287c3b494dfbf102547e770 Author: Sven Schnelle Date: Fri Jun 11 10:27:51 2021 +0200 s390: fix system call restart with multiple signals glibc complained with "The futex facility returned an unexpected error code.". It turned out that the futex syscall returned -ERESTARTSYS because a signal is pending. arch_do_signal_or_restart() restored the syscall parameters (nameley regs->gprs[2]) and set PIF_SYSCALL_RESTART. When another signal is made pending later in the exit loop arch_do_signal_or_restart() is called again. This function clears PIF_SYSCALL_RESTART and checks the return code which is set in regs->gprs[2]. However, regs->gprs[2] was restored in the previous run and no longer contains -ERESTARTSYS, so PIF_SYSCALL_RESTART isn't set again and the syscall is skipped. Fix this by not clearing PIF_SYSCALL_RESTART - it is already cleared in __do_syscall() when the syscall is restarted. Reported-by: Bjoern Walk Signed-off-by: Sven Schnelle Reviewed-by: Heiko Carstens Fixes: 56e62a737028 ("s390: convert to generic entry") Cc: # 5.12 Signed-off-by: Vasily Gorbik commit 13311e74253fe64329390df80bed3f07314ddd61 Author: Linus Torvalds Date: Sun Jun 20 15:03:15 2021 -0700 Linux 5.13-rc7 commit 2269583753d2b8fdd3c861a516ff0cdbfcf4ef0b Author: Dan Carpenter Date: Wed May 12 13:06:41 2021 +0300 i2c: cp2615: check for allocation failure in cp2615_i2c_recv() We need to add a check for if the kzalloc() fails. Fixes: 4a7695429ead ("i2c: cp2615: add i2c driver for Silicon Labs' CP2615 Digital Audio Bridge") Signed-off-by: Dan Carpenter Reviewed-by: Bence Csókás Signed-off-by: Wolfram Sang commit 065b6211a87746e196b56759a70c7851418dd741 Author: Heiner Kallweit Date: Sun Jun 6 15:55:55 2021 +0200 i2c: i801: Ensure that SMBHSTSTS_INUSE_STS is cleared when leaving i801_access As explained in [0] currently we may leave SMBHSTSTS_INUSE_STS set, thus potentially breaking ACPI/BIOS usage of the SMBUS device. Seems patch [0] needs a little bit more of review effort, therefore I'd suggest to apply a part of it as quick win. Just clearing SMBHSTSTS_INUSE_STS when leaving i801_access() should fix the referenced issue and leaves more time for discussing a more sophisticated locking handling. [0] https://www.spinics.net/lists/linux-i2c/msg51558.html Fixes: 01590f361e94 ("i2c: i801: Instantiate SPD EEPROMs automatically") Suggested-by: Hector Martin Signed-off-by: Heiner Kallweit Reviewed-by: Hector Martin Reviewed-by: Jean Delvare Tested-by: Jean Delvare Signed-off-by: Wolfram Sang commit cba5e97280f53ec7feb656fcdf0ec00a5c6dd539 Merge: 9df7f15ee9224 a7b359fc6a37f Author: Linus Torvalds Date: Sun Jun 20 09:44:52 2021 -0700 Merge tag 'sched_urgent_for_v5.13_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Borislav Petkov: "A single fix to restore fairness between control groups with equal priority" * tag 'sched_urgent_for_v5.13_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Correctly insert cfs_rq's to list on unthrottle commit 9df7f15ee922429dcd6bcde68559ccb23f2dbd20 Merge: 8363e795eb79a a13d0f8d117ca Author: Linus Torvalds Date: Sun Jun 20 09:38:14 2021 -0700 Merge tag 'irq_urgent_for_v5.13_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Borislav Petkov: "A single fix for GICv3 to not take an interrupt in an NMI context" * tag 'irq_urgent_for_v5.13_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3: Workaround inconsistent PMR setting on NMI entry commit 8363e795eb79a74c857ba89e3b04668a33fe3344 Merge: b84a7c286cecf 28e5e44aa3f4e Author: Linus Torvalds Date: Sun Jun 20 09:09:58 2021 -0700 Merge tag 'x86_urgent_for_v5.13_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "A first set of urgent fixes to the FPU/XSTATE handling mess^W code. (There's a lot more in the pipe): - Prevent corruption of the XSTATE buffer in signal handling by validating what is being copied from userspace first. - Invalidate other task's preserved FPU registers on XRSTOR failure (#PF) because latter can still modify some of them. - Restore the proper PKRU value in case userspace modified it - Reset FPU state when signal restoring fails Other: - Map EFI boot services data memory as encrypted in a SEV guest so that the guest can access it and actually boot properly - Two SGX correctness fixes: proper resources freeing and a NUMA fix" * tag 'x86_urgent_for_v5.13_rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Avoid truncating memblocks for SGX memory x86/sgx: Add missing xa_destroy() when virtual EPC is destroyed x86/fpu: Reset state for all signal restore failures x86/pkru: Write hardware init value to PKRU when xstate is init x86/process: Check PF_KTHREAD and not current->mm for kernel threads x86/fpu: Invalidate FPU state after a failed XRSTOR from a user buffer x86/fpu: Prevent state corruption in __fpu__restore_sig() x86/ioremap: Map EFI-reserved memory as encrypted for SEV commit b84a7c286cecf0604a5f8bd5dfcd5e1ca7233e15 Merge: 913ec3c22ef42 60b7ed54a41b5 Author: Linus Torvalds Date: Sat Jun 19 16:50:23 2021 -0700 Merge tag 'powerpc-5.13-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fix initrd corruption caused by our recent change to use relative jump labels. Fix a crash using perf record on systems without a hardware PMU backend. Rework our 64-bit signal handling slighty to make it more closely match the old behaviour, after the recent change to use unsafe user accessors. Thanks to Anastasia Kovaleva, Athira Rajeev, Christophe Leroy, Daniel Axtens, Greg Kurz, and Roman Bolshakov" * tag 'powerpc-5.13-6' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set powerpc: Fix initrd corruption with relative jump labels powerpc/signal64: Copy siginfo before changing regs->nip powerpc/mem: Add back missing header to fix 'no previous prototype' error commit 913ec3c22ef425d63dd0bc81fb008ce7f9bcb07b Merge: d9403d307dba1 1792a59eab959 Author: Linus Torvalds Date: Sat Jun 19 14:50:43 2021 -0700 Merge tag 'perf-tools-fixes-for-v5.13-2021-06-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix refcount usage when processing PERF_RECORD_KSYMBOL. - 'perf stat' metric group fixes. - Fix 'perf test' non-bash issue with stat bpf counters. - Update unistd, in.h and socket.h with the kernel sources, silencing perf build warnings. * tag 'perf-tools-fixes-for-v5.13-2021-06-19' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: tools headers UAPI: Sync linux/in.h copy with the kernel sources tools headers UAPI: Sync asm-generic/unistd.h with the kernel original perf beauty: Update copy of linux/socket.h with the kernel sources perf test: Fix non-bash issue with stat bpf counters perf machine: Fix refcount usage when processing PERF_RECORD_KSYMBOL perf metricgroup: Return error code from metricgroup__add_metric_sys_event_iter() perf metricgroup: Fix find_evsel_group() event selector commit e541845ae0858616c52dd97df4bf91568c7a7a1b Author: Dan Sneddon Date: Tue Mar 30 08:17:20 2021 -0700 drm/atmel-hlcdc: Allow async page flips The driver is capable of doing async page flips so we need to tell the core to allow them. Signed-off-by: Dan Sneddon Tested-by: Ludovic Desroches Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210330151721.6616-1-dan.sneddon@microchip.com commit af42167f53ec18b0856387fc119b28c8c1ba98a1 Author: Krzysztof Kozlowski Date: Wed May 26 08:30:02 2021 -0400 drm/panel: ld9040: reference spi_device_id table Reference the spi_device_id table to silence W=1 warning: drivers/gpu/drm/panel/panel-samsung-ld9040.c:377:35: warning: ‘ld9040_ids’ defined but not used [-Wunused-const-variable=] This also would be needed for matching the driver if booted without CONFIG_OF (although it's not necessarily real case). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210526123002.12913-1-krzysztof.kozlowski@canonical.com commit e484028bf39c0c87c499dc782dc9cd3bb72c0ab5 Author: Dan Sneddon Date: Wed Jun 2 09:08:45 2021 -0700 drm: atmel_hlcdc: Enable the crtc vblank prior to crtc usage. 'commit eec44d44a3d2 ("drm/atmel: Use drm_atomic_helper_commit")' removed the home-grown handling of atomic commits and exposed an issue in the crtc atomic commit handling where vblank is expected to be enabled but hasn't yet, causing kernel warnings during boot. This patch cleans up the crtc vblank handling thus removing the warning on boot. Fixes: eec44d44a3d2 ("drm/atmel: Use drm_atomic_helper_commit") Signed-off-by: Dan Sneddon Signed-off-by: Sam Ravnborg Link: https://patchwork.freedesktop.org/patch/msgid/20210602160846.5013-1-dan.sneddon@microchip.com commit d9403d307dba1a71ee6462b22300c2d3be773b1c Merge: e14c779adebeb 7ede12b01b59d Author: Linus Torvalds Date: Sat Jun 19 08:45:34 2021 -0700 Merge tag 'riscv-for-linus-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A build fix to always build modules with the 'medany' code model, as the module loader doesn't support 'medlow'. - A Kconfig warning fix for the SiFive errata. - A pair of fixes that for regressions to the recent memory layout changes. - A fix for the FU740 device tree. * tag 'riscv-for-linus-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: dts: fu740: fix cache-controller interrupts riscv: Ensure BPF_JIT_REGION_START aligned with PMD size riscv: kasan: Fix MODULES_VADDR evaluation due to local variables' name riscv: sifive: fix Kconfig errata warning riscv32: Use medany C model for modules commit e14c779adebebe4b4aeeefb3cc09f376bec966c5 Merge: 9ed13a17e38e0 e73a99f3287a7 Author: Linus Torvalds Date: Sat Jun 19 08:39:13 2021 -0700 Merge tag 's390-5.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: - Fix zcrypt ioctl hang due to AP queue msg counter dropping below 0 when pending requests are purged. - Two fixes for the machine check handler in the entry code. * tag 's390-5.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/ap: Fix hanging ioctl caused by wrong msg counter s390/mcck: fix invalid KVM guest condition check s390/mcck: fix calculation of SIE critical section size commit 1792a59eab9593de2eae36c40c5a22d70f52c026 Author: Arnaldo Carvalho de Melo Date: Sat Jun 19 10:15:22 2021 -0300 tools headers UAPI: Sync linux/in.h copy with the kernel sources To pick the changes in: 321827477360934d ("icmp: don't send out ICMP messages with a source address of 0.0.0.0") That don't result in any change in tooling, as INADDR_ are not used to generate id->string tables used by 'perf trace'. This addresses this 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: David S. Miller Cc: Toke Høiland-Jørgensen Signed-off-by: Arnaldo Carvalho de Melo commit 17d27fc314cba0205eec8966735a7a241cc8a5e0 Author: Arnaldo Carvalho de Melo Date: Sat Jun 19 10:11:46 2021 -0300 tools headers UAPI: Sync asm-generic/unistd.h with the kernel original To pick the changes in: 8b1462b67f23da54 ("quota: finish disable quotactl_path syscall") Those headers are used in some arches to generate the syscall table used in 'perf trace' to translate syscall numbers into strings. This addresses this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Cc: Jan Kara Cc: Marcin Juszkiewicz Signed-off-by: Arnaldo Carvalho de Melo commit ef83f9efe8461b8fd71eb60b53dbb6a5dd7b39e9 Author: Arnaldo Carvalho de Melo Date: Sat Jun 19 10:09:08 2021 -0300 perf beauty: Update copy of linux/socket.h with the kernel sources To pick the changes in: ea6932d70e223e02 ("net: make get_net_ns return error if NET_NS is disabled") That don't result in any changes in the tables generated from that header. This silences this perf build warning: Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h' diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Cc: Changbin Du Cc: David S. Miller Signed-off-by: Arnaldo Carvalho de Melo commit 482698c2f848f9dee1a5bd949793c2fe6a71adc5 Author: Ian Rogers Date: Thu Jun 17 11:42:13 2021 -0700 perf test: Fix non-bash issue with stat bpf counters $(( .. )) is a bash feature but the test's interpreter is !/bin/sh, switch the code to use expr. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: bpf@vger.kernel.org Link: http://lore.kernel.org/lkml/20210617184216.2075588-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit c087e9480cf33672ef2c6cce4348d754988b8437 Author: Riccardo Mancini Date: Sat Jun 12 19:37:48 2021 +0200 perf machine: Fix refcount usage when processing PERF_RECORD_KSYMBOL ASan reported a memory leak of BPF-related ksymbols map and dso. The leak is caused by refount never reaching 0, due to missing __put calls in the function machine__process_ksymbol_register. Once the dso is inserted in the map, dso__put() should be called (map__new2() increases the refcount to 2). The same thing applies for the map when it's inserted into maps (maps__insert() increases the refcount to 2). $ sudo ./perf record -- sleep 5 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.025 MB perf.data (8 samples) ] ================================================================= ==297735==ERROR: LeakSanitizer: detected memory leaks Direct leak of 6992 byte(s) in 19 object(s) allocated from: #0 0x4f43c7 in calloc (/home/user/linux/tools/perf/perf+0x4f43c7) #1 0x8e4e53 in map__new2 /home/user/linux/tools/perf/util/map.c:216:20 #2 0x8cf68c in machine__process_ksymbol_register /home/user/linux/tools/perf/util/machine.c:778:10 [...] Indirect leak of 8702 byte(s) in 19 object(s) allocated from: #0 0x4f43c7 in calloc (/home/user/linux/tools/perf/perf+0x4f43c7) #1 0x8728d7 in dso__new_id /home/user/linux/tools/perf/util/dso.c:1256:20 #2 0x872015 in dso__new /home/user/linux/tools/perf/util/dso.c:1295:9 #3 0x8cf623 in machine__process_ksymbol_register /home/user/linux/tools/perf/util/machine.c:774:21 [...] Indirect leak of 1520 byte(s) in 19 object(s) allocated from: #0 0x4f43c7 in calloc (/home/user/linux/tools/perf/perf+0x4f43c7) #1 0x87b3da in symbol__new /home/user/linux/tools/perf/util/symbol.c:269:23 #2 0x888954 in map__process_kallsym_symbol /home/user/linux/tools/perf/util/symbol.c:710:8 [...] Indirect leak of 1406 byte(s) in 19 object(s) allocated from: #0 0x4f43c7 in calloc (/home/user/linux/tools/perf/perf+0x4f43c7) #1 0x87b3da in symbol__new /home/user/linux/tools/perf/util/symbol.c:269:23 #2 0x8cfbd8 in machine__process_ksymbol_register /home/user/linux/tools/perf/util/machine.c:803:8 [...] Signed-off-by: Riccardo Mancini Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiapeng Chong Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tommi Rantala Link: http://lore.kernel.org/lkml/20210612173751.188582-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit fe7a98b9d9b36e5c8a22d76b67d29721f153f66e Author: John Garry Date: Thu Jun 10 22:33:00 2021 +0800 perf metricgroup: Return error code from metricgroup__add_metric_sys_event_iter() The error code is not set at all in the sys event iter function. This may lead to an uninitialized value of "ret" in metricgroup__add_metric() when no CPU metric is added. Fix by properly setting the error code. It is not necessary to init "ret" to 0 in metricgroup__add_metric(), as if we have no CPU or sys event metric matching, then "has_match" should be 0 and "ret" is set to -EINVAL. However gcc cannot detect that it may not have been set after the map_for_each_metric() loop for CPU metrics, which is strange. Fixes: be335ec28efa8 ("perf metricgroup: Support adding metrics for system PMUs") Signed-off-by: John Garry Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1623335580-187317-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit fc96ec4d5d4155c61cbafd49fb2dd403c899a9f4 Author: John Garry Date: Thu Jun 10 22:32:59 2021 +0800 perf metricgroup: Fix find_evsel_group() event selector The following command segfaults on my x86 broadwell: $ ./perf stat -M frontend_bound,retiring,backend_bound,bad_speculation sleep 1 WARNING: grouped events cpus do not match, disabling group: anon group { raw 0x10e } anon group { raw 0x10e } perf: util/evsel.c:1596: get_group_fd: Assertion `!(!leader->core.fd)' failed. Aborted (core dumped) The issue shows itself as a use-after-free in evlist__check_cpu_maps(), whereby the leader of an event selector (evsel) has been deleted (yet we still attempt to verify for an evsel). Fundamentally the problem comes from metricgroup__setup_events() -> find_evsel_group(), and has developed from the previous fix attempt in commit 9c880c24cb0d ("perf metricgroup: Fix for metrics containing duration_time"). The problem now is that the logic in checking if an evsel is in the same group is subtly broken for the "cycles" event. For the "cycles" event, the pmu_name is NULL; however the logic in find_evsel_group() may set an event matched against "cycles" as used, when it should not be. This leads to a condition where an evsel is set, yet its leader is not. Fix the check for evsel pmu_name by not matching evsels when either has a NULL pmu_name. There is still a pre-existing metric issue whereby the ordering of the metrics may break the 'stat' function, as discussed at: https://lore.kernel.org/lkml/49c6fccb-b716-1bf0-18a6-cace1cdb66b9@huawei.com/ Fixes: 9c880c24cb0d ("perf metricgroup: Fix for metrics containing duration_time") Signed-off-by: John Garry Tested-by: Arnaldo Carvalho de Melo # On a Thinkpad T450S Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1623335580-187317-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 7ede12b01b59dc67bef2e2035297dd2da5bfe427 Author: David Abdurachmanov Date: Sat Jun 12 17:43:57 2021 -0700 riscv: dts: fu740: fix cache-controller interrupts The order of interrupt numbers is incorrect. The order for FU740 is: DirError, DataError, DataFail, DirFail From SiFive FU740-C000 Manual: 19 - L2 Cache DirError 20 - L2 Cache DirFail 21 - L2 Cache DataError 22 - L2 Cache DataFail Signed-off-by: David Abdurachmanov Signed-off-by: Palmer Dabbelt commit 3a02764c372c50ff7917fde5c6961f6cdb81d9d5 Author: Jisheng Zhang Date: Fri Jun 18 22:09:13 2021 +0800 riscv: Ensure BPF_JIT_REGION_START aligned with PMD size Andreas reported commit fc8504765ec5 ("riscv: bpf: Avoid breaking W^X") breaks booting with one kind of defconfig, I reproduced a kernel panic with the defconfig: [ 0.138553] Unable to handle kernel paging request at virtual address ffffffff81201220 [ 0.139159] Oops [#1] [ 0.139303] Modules linked in: [ 0.139601] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-rc5-default+ #1 [ 0.139934] Hardware name: riscv-virtio,qemu (DT) [ 0.140193] epc : __memset+0xc4/0xfc [ 0.140416] ra : skb_flow_dissector_init+0x1e/0x82 [ 0.140609] epc : ffffffff8029806c ra : ffffffff8033be78 sp : ffffffe001647da0 [ 0.140878] gp : ffffffff81134b08 tp : ffffffe001654380 t0 : ffffffff81201158 [ 0.141156] t1 : 0000000000000002 t2 : 0000000000000154 s0 : ffffffe001647dd0 [ 0.141424] s1 : ffffffff80a43250 a0 : ffffffff81201220 a1 : 0000000000000000 [ 0.141654] a2 : 000000000000003c a3 : ffffffff81201258 a4 : 0000000000000064 [ 0.141893] a5 : ffffffff8029806c a6 : 0000000000000040 a7 : ffffffffffffffff [ 0.142126] s2 : ffffffff81201220 s3 : 0000000000000009 s4 : ffffffff81135088 [ 0.142353] s5 : ffffffff81135038 s6 : ffffffff8080ce80 s7 : ffffffff80800438 [ 0.142584] s8 : ffffffff80bc6578 s9 : 0000000000000008 s10: ffffffff806000ac [ 0.142810] s11: 0000000000000000 t3 : fffffffffffffffc t4 : 0000000000000000 [ 0.143042] t5 : 0000000000000155 t6 : 00000000000003ff [ 0.143220] status: 0000000000000120 badaddr: ffffffff81201220 cause: 000000000000000f [ 0.143560] [] __memset+0xc4/0xfc [ 0.143859] [] init_default_flow_dissectors+0x22/0x60 [ 0.144092] [] do_one_initcall+0x3e/0x168 [ 0.144278] [] kernel_init_freeable+0x1c8/0x224 [ 0.144479] [] kernel_init+0x12/0x110 [ 0.144658] [] ret_from_exception+0x0/0xc [ 0.145124] ---[ end trace f1e9643daa46d591 ]--- After some investigation, I think I found the root cause: commit 2bfc6cd81bd ("move kernel mapping outside of linear mapping") moves BPF JIT region after the kernel: | #define BPF_JIT_REGION_START PFN_ALIGN((unsigned long)&_end) The &_end is unlikely aligned with PMD size, so the front bpf jit region sits with part of kernel .data section in one PMD size mapping. But kernel is mapped in PMD SIZE, when bpf_jit_binary_lock_ro() is called to make the first bpf jit prog ROX, we will make part of kernel .data section RO too, so when we write to, for example memset the .data section, MMU will trigger a store page fault. To fix the issue, we need to ensure the BPF JIT region is PMD size aligned. This patch acchieve this goal by restoring the BPF JIT region to original position, I.E the 128MB before kernel .text section. The modification to kasan_init.c is inspired by Alexandre. Fixes: fc8504765ec5 ("riscv: bpf: Avoid breaking W^X") Reported-by: Andreas Schwab Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 314b781706e337b8cbde98cfefd3975863e032f2 Author: Jisheng Zhang Date: Fri Jun 18 22:01:36 2021 +0800 riscv: kasan: Fix MODULES_VADDR evaluation due to local variables' name commit 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") makes use of MODULES_VADDR to populate kernel, BPF, modules mapping. Currently, MODULES_VADDR is defined as below for RV64: | #define MODULES_VADDR (PFN_ALIGN((unsigned long)&_end) - SZ_2G) But kasan_init() has two local variables which are also named as _start, _end, so MODULES_VADDR is evaluated with the local variable _end rather than the global "_end" as we expected. Fix this issue by renaming the two local variables. Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 7dd753ca59d6c8cc09aa1ed24f7657524803c7f3 Author: ManYi Li Date: Fri Jun 11 17:44:02 2021 +0800 scsi: sr: Return appropriate error code when disk is ejected Handle a reported media event code of 3. This indicates that the media has been removed from the drive and user intervention is required to proceed. Return DISK_EVENT_EJECT_REQUEST in that case. Link: https://lore.kernel.org/r/20210611094402.23884-1-limanyi@uniontech.com Signed-off-by: ManYi Li Signed-off-by: Martin K. Petersen commit 9ed13a17e38e0537e24d9b507645002bf8d0201f Merge: 6fab154a33ba9 9cca0c2d70149 Author: Linus Torvalds Date: Fri Jun 18 18:55:29 2021 -0700 Merge tag 'net-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.13-rc7, including fixes from wireless, bpf, bluetooth, netfilter and can. Current release - regressions: - mlxsw: spectrum_qdisc: Pass handle, not band number to find_class() to fix modifying offloaded qdiscs - lantiq: net: fix duplicated skb in rx descriptor ring - rtnetlink: fix regression in bridge VLAN configuration, empty info is not an error, bot-generated "fix" was not needed - libbpf: s/rx/tx/ typo on umem->rx_ring_setup_done to fix umem creation Current release - new code bugs: - ethtool: fix NULL pointer dereference during module EEPROM dump via the new netlink API - mlx5e: don't update netdev RQs with PTP-RQ, the special purpose queue should not be visible to the stack - mlx5e: select special PTP queue only for SKBTX_HW_TSTAMP skbs - mlx5e: verify dev is present in get devlink port ndo, avoid a panic Previous releases - regressions: - neighbour: allow NUD_NOARP entries to be force GCed - further fixes for fallout from reorg of WiFi locking (staging: rtl8723bs, mac80211, cfg80211) - skbuff: fix incorrect msg_zerocopy copy notifications - mac80211: fix NULL ptr deref for injected rate info - Revert "net/mlx5: Arm only EQs with EQEs" it may cause missed IRQs Previous releases - always broken: - bpf: more speculative execution fixes - netfilter: nft_fib_ipv6: skip ipv6 packets from any to link-local - udp: fix race between close() and udp_abort() resulting in a panic - fix out of bounds when parsing TCP options before packets are validated (in netfilter: synproxy, tc: sch_cake and mptcp) - mptcp: improve operation under memory pressure, add missing wake-ups - mptcp: fix double-lock/soft lookup in subflow_error_report() - bridge: fix races (null pointer deref and UAF) in vlan tunnel egress - ena: fix DMA mapping function issues in XDP - rds: fix memory leak in rds_recvmsg Misc: - vrf: allow larger MTUs - icmp: don't send out ICMP messages with a source address of 0.0.0.0 - cdc_ncm: switch to eth%d interface naming" * tag 'net-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (139 commits) net: ethernet: fix potential use-after-free in ec_bhf_remove selftests/net: Add icmp.sh for testing ICMP dummy address responses icmp: don't send out ICMP messages with a source address of 0.0.0.0 net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY net: ll_temac: Fix TX BD buffer overwrite net: ll_temac: Add memory-barriers for TX BD access net: ll_temac: Make sure to free skb when it is completely used MAINTAINERS: add Guvenc as SMC maintainer bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path bnxt_en: Fix TQM fastpath ring backing store computation bnxt_en: Rediscover PHY capabilities after firmware reset cxgb4: fix wrong shift. mac80211: handle various extensible elements correctly mac80211: reset profile_periodicity/ema_ap cfg80211: avoid double free of PMSR request cfg80211: make certificate generation more robust mac80211: minstrel_ht: fix sample time check net: qed: Fix memcpy() overflow of qed_dcbx_params() net: cdc_eem: fix tx fixup skb leak net: hamradio: fix memory leak in mkiss_close ... commit 6fab154a33ba9b3574ba74a86ed085e0ed8454cb Merge: 728a748b3ff70 f9f28e5bd0bae Author: Linus Torvalds Date: Fri Jun 18 16:39:03 2021 -0700 Merge tag 'for-5.13-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "One more fix, for a space accounting bug in zoned mode. It happens when a block group is switched back rw->ro and unusable bytes (due to zoned constraints) are subtracted twice. It has user visible effects so I consider it important enough for late -rc inclusion and backport to stable" * tag 'for-5.13-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: zoned: fix negative space_info->bytes_readonly commit 728a748b3ff70326f652ab92081d639dc51269ea Merge: 9620ad86d0e3e f18139966d072 Author: Linus Torvalds Date: Fri Jun 18 13:54:11 2021 -0700 Merge tag 'pci-v5.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Clear 64-bit flag for host bridge windows below 4GB to fix a resource allocation regression added in -rc1 (Punit Agrawal) - Fix tegra194 MCFG quirk build regressions added in -rc1 (Jon Hunter) - Avoid secondary bus resets on TI KeyStone C667X devices (Antti Järvinen) - Avoid secondary bus resets on some NVIDIA GPUs (Shanker Donthineni) - Work around FLR erratum on Huawei Intelligent NIC VF (Chiqijun) - Avoid broken ATS on AMD Navi14 GPU (Evan Quan) - Trust Broadcom BCM57414 NIC to isolate functions even though it doesn't advertise ACS support (Sriharsha Basavapatna) - Work around AMD RS690 BIOSes that don't configure DMA above 4GB (Mikel Rychliski) - Fix panic during PIO transfer on Aardvark controller (Pali Rohár) * tag 'pci-v5.13-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: aardvark: Fix kernel panic during PIO transfer PCI: Add AMD RS690 quirk to enable 64-bit DMA PCI: Add ACS quirk for Broadcom BCM57414 NIC PCI: Mark AMD Navi14 GPU ATS as broken PCI: Work around Huawei Intelligent NIC VF FLR erratum PCI: Mark some NVIDIA GPUs to avoid bus reset PCI: Mark TI C667X to avoid bus reset PCI: tegra194: Fix MCFG quirk build regressions PCI: of: Clear 64-bit flag for non-prefetchable memory below 4GB commit 9620ad86d0e3e8fda4a23efc22e0b2ae4ded1105 Author: Matthew Wilcox (Oracle) Date: Wed Jun 16 22:22:28 2021 +0100 afs: Re-enable freezing once a page fault is interrupted If a task is killed during a page fault, it does not currently call sb_end_pagefault(), which means that the filesystem cannot be frozen at any time thereafter. This may be reported by lockdep like this: ==================================== WARNING: fsstress/10757 still has locks held! 5.13.0-rc4-build4+ #91 Not tainted ------------------------------------ 1 lock held by fsstress/10757: #0: ffff888104eac530 ( sb_pagefaults as filesystem freezing is modelled as a lock. Fix this by removing all the direct returns from within the function, and using 'ret' to indicate whether we were interrupted or successful. Fixes: 1cf7a1518aef ("afs: Implement shared-writeable mmap") Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20210616154900.1958373-1-willy@infradead.org/ Signed-off-by: Linus Torvalds commit 9cca0c2d70149160407bda9a9446ce0c29b6e6c6 Author: Pavel Skripkin Date: Fri Jun 18 16:49:02 2021 +0300 net: ethernet: fix potential use-after-free in ec_bhf_remove static void ec_bhf_remove(struct pci_dev *dev) { ... struct ec_bhf_priv *priv = netdev_priv(net_dev); unregister_netdev(net_dev); free_netdev(net_dev); pci_iounmap(dev, priv->dma_io); pci_iounmap(dev, priv->io); ... } priv is netdev private data, but it is used after free_netdev(). It can cause use-after-free when accessing priv pointer. So, fix it by moving free_netdev() after pci_iounmap() calls. Fixes: 6af55ff52b02 ("Driver for Beckhoff CX5020 EtherCAT master module.") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit 0d1dc9e1f4c03c2819f0557226c5322e405be3cb Merge: 7e9838b7915e2 652e8363bbc7d Author: David S. Miller Date: Fri Jun 18 12:22:55 2021 -0700 Merge tag 'mac80211-for-net-2021-06-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== A couple of straggler fixes: * a minstrel HT sample check fix * peer measurement could double-free on races * certificate file generation at build time could sometimes hang * some parameters weren't reset between connections in mac80211 * some extensible elements were treated as non- extensible, possibly causuing bad connections (or failures) if the AP adds data ==================== Signed-off-by: David S. Miller commit 7e9838b7915e29ae0dfe4a3e5f007c9dc6ab9b45 Author: Toke Høiland-Jørgensen Date: Fri Jun 18 13:04:36 2021 +0200 selftests/net: Add icmp.sh for testing ICMP dummy address responses This adds a new icmp.sh selftest for testing that the kernel will respond correctly with an ICMP unreachable message with the dummy (192.0.0.8) source address when there are no IPv4 addresses configured to use as source addresses. Signed-off-by: Toke Høiland-Jørgensen Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 321827477360934dc040e9d3c626bf1de6c3ab3c Author: Toke Høiland-Jørgensen Date: Fri Jun 18 13:04:35 2021 +0200 icmp: don't send out ICMP messages with a source address of 0.0.0.0 When constructing ICMP response messages, the kernel will try to pick a suitable source address for the outgoing packet. However, if no IPv4 addresses are configured on the system at all, this will fail and we end up producing an ICMP message with a source address of 0.0.0.0. This can happen on a box routing IPv4 traffic via v6 nexthops, for instance. Since 0.0.0.0 is not generally routable on the internet, there's a good chance that such ICMP messages will never make it back to the sender of the original packet that the ICMP message was sent in response to. This, in turn, can create connectivity and PMTUd problems for senders. Fortunately, RFC7600 reserves a dummy address to be used as a source for ICMP messages (192.0.0.8/32), so let's teach the kernel to substitute that address as a last resort if the regular source address selection procedure fails. Below is a quick example reproducing this issue with network namespaces: ip netns add ns0 ip l add type veth peer netns ns0 ip l set dev veth0 up ip a add 10.0.0.1/24 dev veth0 ip a add fc00:dead:cafe:42::1/64 dev veth0 ip r add 10.1.0.0/24 via inet6 fc00:dead:cafe:42::2 ip -n ns0 l set dev veth0 up ip -n ns0 a add fc00:dead:cafe:42::2/64 dev veth0 ip -n ns0 r add 10.0.0.0/24 via inet6 fc00:dead:cafe:42::1 ip netns exec ns0 sysctl -w net.ipv4.icmp_ratelimit=0 ip netns exec ns0 sysctl -w net.ipv4.ip_forward=1 tcpdump -tpni veth0 -c 2 icmp & ping -w 1 10.1.0.1 > /dev/null tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on veth0, link-type EN10MB (Ethernet), snapshot length 262144 bytes IP 10.0.0.1 > 10.1.0.1: ICMP echo request, id 29, seq 1, length 64 IP 0.0.0.0 > 10.0.0.1: ICMP net 10.1.0.1 unreachable, length 92 2 packets captured 2 packets received by filter 0 packets dropped by kernel With this patch the above capture changes to: IP 10.0.0.1 > 10.1.0.1: ICMP echo request, id 31127, seq 1, length 64 IP 192.0.0.8 > 10.0.0.1: ICMP net 10.1.0.1 unreachable, length 92 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Juliusz Chroboczek Reviewed-by: David Ahern Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit f6396341194234e9b01cd7538bc2c6ac4501ab14 Author: Esben Haabendal Date: Fri Jun 18 12:52:38 2021 +0200 net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY As documented in Documentation/networking/driver.rst, the ndo_start_xmit method must not return NETDEV_TX_BUSY under any normal circumstances, and as recommended, we simply stop the tx queue in advance, when there is a risk that the next xmit would cause a NETDEV_TX_BUSY return. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit c364df2489b8ef2f5e3159b1dff1ff1fdb16040d Author: Esben Haabendal Date: Fri Jun 18 12:52:33 2021 +0200 net: ll_temac: Fix TX BD buffer overwrite Just as the initial check, we need to ensure num_frag+1 buffers available, as that is the number of buffers we are going to use. This fixes a buffer overflow, which might be seen during heavy network load. Complete lockup of TEMAC was reproducible within about 10 minutes of a particular load. Fixes: 84823ff80f74 ("net: ll_temac: Fix race condition causing TX hang") Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit 28d9fab458b16bcd83f9dd07ede3d585c3e1a69e Author: Esben Haabendal Date: Fri Jun 18 12:52:28 2021 +0200 net: ll_temac: Add memory-barriers for TX BD access Add a couple of memory-barriers to ensure correct ordering of read/write access to TX BDs. In xmit_done, we should ensure that reading the additional BD fields are only done after STS_CTRL_APP0_CMPLT bit is set. When xmit_done marks the BD as free by setting APP0=0, we need to ensure that the other BD fields are reset first, so we avoid racing with the xmit path, which writes to the same fields. Finally, making sure to read APP0 of next BD after the current BD, ensures that we see all available buffers. Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit 6aa32217a9a446275440ee8724b1ecaf1838df47 Author: Esben Haabendal Date: Fri Jun 18 12:52:23 2021 +0200 net: ll_temac: Make sure to free skb when it is completely used With the skb pointer piggy-backed on the TX BD, we have a simple and efficient way to free the skb buffer when the frame has been transmitted. But in order to avoid freeing the skb while there are still fragments from the skb in use, we need to piggy-back on the TX BD of the skb, not the first. Without this, we are doing use-after-free on the DMA side, when the first BD of a multi TX BD packet is seen as completed in xmit_done, and the remaining BDs are still being processed. Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Esben Haabendal Signed-off-by: David S. Miller commit 35036d69b9bd6f06201f8e2f6b9cadb21ad1e093 Author: Karsten Graul Date: Fri Jun 18 09:00:30 2021 +0200 MAINTAINERS: add Guvenc as SMC maintainer Add Guvenc as maintainer for Shared Memory Communications (SMC) Sockets. Cc: Julian Wiedmann Acked-by: Guvenc Gulce Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit b6a258c10ea68f6bc60eee555abb7783d25aa4c0 Merge: 39eb028183bc7 03400aaa69f91 Author: David S. Miller Date: Fri Jun 18 12:00:27 2021 -0700 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes This patchset includes 3 small bug fixes to reinitialize PHY capabilities after firmware reset, setup the chip's internal TQM fastpath ring backing memory properly for RoCE traffic, and to free ethtool related memory if driver probe fails. ==================== Signed-off-by: David S. Miller commit 03400aaa69f916a376e11526cf591901a96a3a5c Author: Somnath Kotur Date: Fri Jun 18 02:07:27 2021 -0400 bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path bnxt_ethtool_init() may have allocated some memory and we need to call bnxt_ethtool_free() to properly unwind if bnxt_init_one() fails. Fixes: 7c3809181468 ("bnxt_en: Refactor bnxt_init_one() and turn on TPA support on 57500 chips.") Signed-off-by: Somnath Kotur Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit c12e1643d2738bcd4e26252ce531878841dd3f38 Author: Rukhsana Ansari Date: Fri Jun 18 02:07:26 2021 -0400 bnxt_en: Fix TQM fastpath ring backing store computation TQM fastpath ring needs to be sized to store both the requester and responder side of RoCE QPs in TQM for supporting bi-directional tests. Fix bnxt_alloc_ctx_mem() to multiply the RoCE QPs by a factor of 2 when computing the number of entries for TQM fastpath ring. This fixes an RX pipeline stall issue when running bi-directional max RoCE QP tests. Fixes: c7dd7ab4b204 ("bnxt_en: Improve TQM ring context memory sizing formulas.") Signed-off-by: Rukhsana Ansari Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0afd6a4e8028cc487c240b6cfe04094e45a306e4 Author: Michael Chan Date: Fri Jun 18 02:07:25 2021 -0400 bnxt_en: Rediscover PHY capabilities after firmware reset There is a missing bnxt_probe_phy() call in bnxt_fw_init_one() to rediscover the PHY capabilities after a firmware reset. This can cause some PHY related functionalities to fail after a firmware reset. For example, in multi-host, the ability for any host to configure the PHY settings may be lost after a firmware reset. Fixes: ec5d31e3c15d ("bnxt_en: Handle firmware reset status during IF_UP.") Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 39eb028183bc7378bb6187067e20bf6d8c836407 Author: Pavel Machek Date: Fri Jun 18 11:29:48 2021 +0200 cxgb4: fix wrong shift. While fixing coverity warning, commit dd2c79677375 introduced typo in shift value. Fix that. Signed-off-by: Pavel Machek (CIP) Fixes: dd2c79677375 ("cxgb4: Fix unintentional sign extension issues") Signed-off-by: David S. Miller commit b1edae0d5f2e79e2bdc523c1459f8c52ad26485f Merge: 89fec7420354f 110febc0148f8 Author: Linus Torvalds Date: Fri Jun 18 11:09:23 2021 -0700 Merge tag 'arc-5.13-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - ARCv2 userspace ABI not populating a few registers - Unbork CONFIG_HARDENED_USERCOPY for ARC * tag 'arc-5.13-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: fix CONFIG_HARDENED_USERCOPY ARCv2: save ABI registers across signal handling commit 89fec7420354ff2d23ed46e62aaea402587efd1c Merge: 0f4022a490ad6 89529d8b8f8da Author: Linus Torvalds Date: Fri Jun 18 10:57:09 2021 -0700 Merge tag 'trace-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Have recordmcount check for valid st_shndx otherwise some archs may have invalid references for the mcount location. - Two fixes done for mapping pids to task names. Traces were not showing the names of tasks when they should have. - Fix to trace_clock_global() to prevent it from going backwards * tag 'trace-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Do no increment trace_clock_global() by one tracing: Do not stop recording comms if the trace file is being read tracing: Do not stop recording cmdlines when tracing is off recordmcount: Correct st_shndx handling commit 0f4022a490ad68846062186f481defd53be69743 Merge: 944293bcee92a 6262e1b906a1b Author: Linus Torvalds Date: Fri Jun 18 10:50:41 2021 -0700 Merge tag 'printk-for-5.13-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk fixup from Petr Mladek: "Fix misplaced EXPORT_SYMBOL(vsprintf)" * tag 'printk-for-5.13-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: printk: Move EXPORT_SYMBOL() closer to vprintk definition commit 944293bcee92acb1cfbbd315f833b4384bfd35fa Merge: e2c8f8e57ba66 771fac5e26c17 Author: Linus Torvalds Date: Fri Jun 18 10:42:36 2021 -0700 Merge tag 'pm-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fix from Rafael Wysocki: "Remove recently added frequency invariance support from the CPPC cpufreq driver, because it has turned out to be problematic and it cannot be fixed properly on time for 5.13 (Viresh Kumar)" * tag 'pm-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "cpufreq: CPPC: Add support for frequency invariance" commit e2c8f8e57ba66aa4bef6990bc9228a29440cf987 Merge: c3bf96eaa4c4e a7d8d1c7a7f73 Author: Linus Torvalds Date: Fri Jun 18 10:39:32 2021 -0700 Merge tag 'usb-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are three small USB fixes for reported problems for 5.13-rc7. They include: - disable autosuspend for a cypress USB hub - fix the battery charger detection for the chipidea driver - fix a kernel panic in the dwc3 driver due to a previous change in 5.13-rc1. All have been in linux-next with no reported problems" * tag 'usb-5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: usb: core: hub: Disable autosuspend for Cypress CY7C65632 usb: chipidea: imx: Fix Battery Charger 1.2 CDP detection usb: dwc3: core: fix kernel panic when do reboot commit 28e5e44aa3f4e0e0370864ed008fb5e2d85f4dc8 Author: Fan Du Date: Thu Jun 17 12:46:57 2021 -0700 x86/mm: Avoid truncating memblocks for SGX memory tl;dr: Several SGX users reported seeing the following message on NUMA systems: sgx: [Firmware Bug]: Unable to map EPC section to online node. Fallback to the NUMA node 0. This turned out to be the memblock code mistakenly throwing away SGX memory. === Full Changelog === The 'max_pfn' variable represents the highest known RAM address. It can be used, for instance, to quickly determine for which physical addresses there is mem_map[] space allocated. The numa_meminfo code makes an effort to throw out ("trim") all memory blocks which are above 'max_pfn'. SGX memory is not considered RAM (it is marked as "Reserved" in the e820) and is not taken into account by max_pfn. Despite this, SGX memory areas have NUMA affinity and are enumerated in the ACPI SRAT table. The existing SGX code uses the numa_meminfo mechanism to look up the NUMA affinity for its memory areas. In cases where SGX memory was above max_pfn (usually just the one EPC section in the last highest NUMA node), the numa_memblock is truncated at 'max_pfn', which is below the SGX memory. When the SGX code tries to look up the affinity of this memory, it fails and produces an error message: sgx: [Firmware Bug]: Unable to map EPC section to online node. Fallback to the NUMA node 0. and assigns the memory to NUMA node 0. Instead of silently truncating the memory block at 'max_pfn' and dropping the SGX memory, add the truncated portion to 'numa_reserved_meminfo'. This allows the SGX code to later determine the NUMA affinity of its 'Reserved' area. Before, numa_meminfo looked like this (from 'crash'): blk = { start = 0x0, end = 0x2080000000, nid = 0x0 } { start = 0x2080000000, end = 0x4000000000, nid = 0x1 } numa_reserved_meminfo is empty. With this, numa_meminfo looks like this: blk = { start = 0x0, end = 0x2080000000, nid = 0x0 } { start = 0x2080000000, end = 0x4000000000, nid = 0x1 } and numa_reserved_meminfo has an entry for node 1's SGX memory: blk = { start = 0x4000000000, end = 0x4080000000, nid = 0x1 } [ daveh: completely rewrote/reworked changelog ] Fixes: 5d30f92e7631 ("x86/NUMA: Provide a range-to-target_node lookup facility") Reported-by: Reinette Chatre Signed-off-by: Fan Du Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov Reviewed-by: Jarkko Sakkinen Reviewed-by: Dan Williams Reviewed-by: Dave Hansen Cc: Link: https://lkml.kernel.org/r/20210617194657.0A99CB22@viggo.jf.intel.com commit c3bf96eaa4c4e701fee04665bea70867cf5e8388 Merge: fd0aa1a4567d0 c55338d34cc24 Author: Linus Torvalds Date: Fri Jun 18 10:36:18 2021 -0700 Merge tag 'drm-fixes-2021-06-18' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Not much happening in fixes land this week only one PR for two amdgpu powergating fixes was waiting for me, maybe something will show up over the weekend, maybe not. amdgpu: - GFX9 and 10 powergating fixes" * tag 'drm-fixes-2021-06-18' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu/gfx10: enlarge CP_MEC_DOORBELL_RANGE_UPPER to cover full doorbell. drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue. commit f18139966d072dab8e4398c95ce955a9742e04f7 Author: Pali Rohár Date: Tue Jun 8 22:36:55 2021 +0200 PCI: aardvark: Fix kernel panic during PIO transfer Trying to start a new PIO transfer by writing value 0 in PIO_START register when previous transfer has not yet completed (which is indicated by value 1 in PIO_START) causes an External Abort on CPU, which results in kernel panic: SError Interrupt on CPU0, code 0xbf000002 -- SError Kernel panic - not syncing: Asynchronous SError Interrupt To prevent kernel panic, it is required to reject a new PIO transfer when previous one has not finished yet. If previous PIO transfer is not finished yet, the kernel may issue a new PIO request only if the previous PIO transfer timed out. In the past the root cause of this issue was incorrectly identified (as it often happens during link retraining or after link down event) and special hack was implemented in Trusted Firmware to catch all SError events in EL3, to ignore errors with code 0xbf000002 and not forwarding any other errors to kernel and instead throw panic from EL3 Trusted Firmware handler. Links to discussion and patches about this issue: https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/commit/?id=3c7dcdac5c50 https://lore.kernel.org/linux-pci/20190316161243.29517-1-repk@triplefau.lt/ https://lore.kernel.org/linux-pci/971be151d24312cc533989a64bd454b4@www.loen.fr/ https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/1541 But the real cause was the fact that during link retraining or after link down event the PIO transfer may take longer time, up to the 1.44s until it times out. This increased probability that a new PIO transfer would be issued by kernel while previous one has not finished yet. After applying this change into the kernel, it is possible to revert the mentioned TF-A hack and SError events do not have to be caught in TF-A EL3. Link: https://lore.kernel.org/r/20210608203655.31228-1-pali@kernel.org Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Reviewed-by: Marek Behún Cc: stable@vger.kernel.org # 7fbcb5da811b ("PCI: aardvark: Don't rely on jiffies while holding spinlock") commit cacf994a91d3a55c0c2f853d6429cd7b86113915 Author: Mikel Rychliski Date: Fri Jun 11 17:48:23 2021 -0400 PCI: Add AMD RS690 quirk to enable 64-bit DMA Although the AMD RS690 chipset has 64-bit DMA support, BIOS implementations sometimes fail to configure the memory limit registers correctly. The Acer F690GVM mainboard uses this chipset and a Marvell 88E8056 NIC. The sky2 driver programs the NIC to use 64-bit DMA, which will not work: sky2 0000:02:00.0: error interrupt status=0x8 sky2 0000:02:00.0 eth0: tx timeout sky2 0000:02:00.0 eth0: transmit ring 0 .. 22 report=0 done=0 Other drivers required by this mainboard either don't support 64-bit DMA, or have it disabled using driver specific quirks. For example, the ahci driver has quirks to enable or disable 64-bit DMA depending on the BIOS version (see ahci_sb600_enable_64bit() in ahci.c). This ahci quirk matches against the SB600 SATA controller, but the real issue is almost certainly with the RS690 PCI host that it was commonly attached to. To avoid this issue in all drivers with 64-bit DMA support, fix the configuration of the PCI host. If the kernel is aware of physical memory above 4GB, but the BIOS never configured the PCI host with this information, update the registers with our values. [bhelgaas: drop PCI_DEVICE_ID_ATI_RS690 definition] Link: https://lore.kernel.org/r/20210611214823.4898-1-mikel@mikelr.com Signed-off-by: Mikel Rychliski Signed-off-by: Bjorn Helgaas commit db2f77e2bd99dbd2fb23ddde58f0fae392fe3338 Author: Sriharsha Basavapatna Date: Fri May 21 21:13:17 2021 -0400 PCI: Add ACS quirk for Broadcom BCM57414 NIC The Broadcom BCM57414 NIC may be a multi-function device. While it does not advertise an ACS capability, peer-to-peer transactions are not possible between the individual functions, so it is safe to treat them as fully isolated. Add an ACS quirk for this device so the functions can be in independent IOMMU groups and attached individually to userspace applications using VFIO. [bhelgaas: commit log] Link: https://lore.kernel.org/r/1621645997-16251-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org commit e8946a53e2a698c148b3b3ed732f43c7747fbeb6 Author: Evan Quan Date: Wed Jun 2 10:12:55 2021 +0800 PCI: Mark AMD Navi14 GPU ATS as broken Observed unexpected GPU hang during runpm stress test on 0x7341 rev 0x00. Further debugging shows broken ATS is related. Disable ATS on this part. Similar issues on other devices: a2da5d8cc0b0 ("PCI: Mark AMD Raven iGPU ATS as broken in some platforms") 45beb31d3afb ("PCI: Mark AMD Navi10 GPU rev 0x00 ATS as broken") 5e89cd303e3a ("PCI: Mark AMD Navi14 GPU rev 0xc5 ATS as broken") Suggested-by: Alex Deucher Link: https://lore.kernel.org/r/20210602021255.939090-1-evan.quan@amd.com Signed-off-by: Evan Quan Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński Cc: stable@vger.kernel.org commit ce00322c2365e1f7b0312f2f493539c833465d97 Author: Chiqijun Date: Mon May 24 17:44:07 2021 -0500 PCI: Work around Huawei Intelligent NIC VF FLR erratum pcie_flr() starts a Function Level Reset (FLR), waits 100ms (the maximum time allowed for FLR completion by PCIe r5.0, sec 6.6.2), and waits for the FLR to complete. It assumes the FLR is complete when a config read returns valid data. When we do an FLR on several Huawei Intelligent NIC VFs at the same time, firmware on the NIC processes them serially. The VF may respond to config reads before the firmware has completed its reset processing. If we bind a driver to the VF (e.g., by assigning the VF to a virtual machine) in the interval between the successful config read and completion of the firmware reset processing, the NIC VF driver may fail to load. Prevent this driver failure by waiting for the NIC firmware to complete its reset processing. Not all NIC firmware supports this feature. [bhelgaas: commit log] Link: https://support.huawei.com/enterprise/en/doc/EDOC1100063073/87950645/vm-oss-occasionally-fail-to-load-the-in200-driver-when-the-vf-performs-flr Link: https://lore.kernel.org/r/20210414132301.1793-1-chiqijun@huawei.com Signed-off-by: Chiqijun Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson Cc: stable@vger.kernel.org commit 4c207e7121fa92b66bf1896bf8ccb9edfb0f9731 Author: Shanker Donthineni Date: Tue Jun 8 11:18:56 2021 +0530 PCI: Mark some NVIDIA GPUs to avoid bus reset Some NVIDIA GPU devices do not work with SBR. Triggering SBR leaves the device inoperable for the current system boot. It requires a system hard-reboot to get the GPU device back to normal operating condition post-SBR. For the affected devices, enable NO_BUS_RESET quirk to avoid the issue. This issue will be fixed in the next generation of hardware. Link: https://lore.kernel.org/r/20210608054857.18963-8-ameynarkhede03@gmail.com Signed-off-by: Shanker Donthineni Signed-off-by: Bjorn Helgaas Reviewed-by: Sinan Kaya Cc: stable@vger.kernel.org commit b5cf198e74a91073d12839a3e2db99994a39995d Author: Antti Järvinen Date: Mon Mar 15 10:26:06 2021 +0000 PCI: Mark TI C667X to avoid bus reset Some TI KeyStone C667X devices do not support bus/hot reset. The PCIESS automatically disables LTSSM when Secondary Bus Reset is received and device stops working. Prevent bus reset for these devices. With this change, the device can be assigned to VMs with VFIO, but it will leak state between VMs. Reference: https://e2e.ti.com/support/processors/f/791/t/954382 Link: https://lore.kernel.org/r/20210315102606.17153-1-antti.jarvinen@gmail.com Signed-off-by: Antti Järvinen Signed-off-by: Bjorn Helgaas Reviewed-by: Kishon Vijay Abraham I Cc: stable@vger.kernel.org commit a512360f45c930e14a262056e5f742797bc5d3f2 Author: Jon Hunter Date: Thu Jun 10 07:41:34 2021 +0100 PCI: tegra194: Fix MCFG quirk build regressions 7f100744749e ("PCI: tegra: Add Tegra194 MCFG quirks for ECAM errata") caused a few build regressions: - 7f100744749e removed the Makefile rule for CONFIG_PCIE_TEGRA194, so pcie-tegra.c can no longer be built as a module. Restore that rule. - 7f100744749e added "#ifdef CONFIG_PCIE_TEGRA194" around the native driver, but that's only set when the driver is built-in (for a module, CONFIG_PCIE_TEGRA194_MODULE is defined). The ACPI quirk is completely independent of the rest of the native driver, so move the quirk to its own file and remove the #ifdef in the native driver. - 7f100744749e added symbols that are always defined but used only when CONFIG_PCIEASPM, which causes warnings when CONFIG_PCIEASPM is not set: drivers/pci/controller/dwc/pcie-tegra194.c:259:18: warning: ‘event_cntr_data_offset’ defined but not used [-Wunused-const-variable=] drivers/pci/controller/dwc/pcie-tegra194.c:250:18: warning: ‘event_cntr_ctrl_offset’ defined but not used [-Wunused-const-variable=] drivers/pci/controller/dwc/pcie-tegra194.c:243:27: warning: ‘pcie_gen_freq’ defined but not used [-Wunused-const-variable=] Fixes: 7f100744749e ("PCI: tegra: Add Tegra194 MCFG quirks for ECAM errata") Link: https://lore.kernel.org/r/20210610064134.336781-1-jonathanh@nvidia.com Signed-off-by: Jon Hunter Signed-off-by: Bjorn Helgaas Reviewed-by: Thierry Reding commit 3bd6b8271ee660803c5694cc25420c499c5c0592 Author: Punit Agrawal Date: Tue Jun 15 08:04:57 2021 +0900 PCI: of: Clear 64-bit flag for non-prefetchable memory below 4GB Alexandru and Qu reported this resource allocation failure on ROCKPro64 v2 and ROCK Pi 4B, both based on the RK3399: pci_bus 0000:00: root bus resource [mem 0xfa000000-0xfbdfffff 64bit] pci 0000:00:00.0: PCI bridge to [bus 01] pci 0000:00:00.0: BAR 14: no space for [mem size 0x00100000] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00003fff 64bit] "BAR 14" is the PCI bridge's 32-bit non-prefetchable window, and our PCI allocation code isn't smart enough to allocate it in a host bridge window marked as 64-bit, even though this should work fine. A DT host bridge description includes the windows from the CPU address space to the PCI bus space. On a few architectures (microblaze, powerpc, sparc), the DT may also describe PCI devices themselves, including their BARs. Before 9d57e61bf723 ("of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses"), of_bus_pci_get_flags() ignored the fact that some DT addresses described 64-bit windows and BARs. That was a problem because the virtio virtual NIC has a 32-bit BAR and a 64-bit BAR, and the driver couldn't distinguish them. 9d57e61bf723 set IORESOURCE_MEM_64 for those 64-bit DT ranges, which fixed the virtio driver. But it also set IORESOURCE_MEM_64 for host bridge windows, which exposed the fact that the PCI allocator isn't smart enough to put 32-bit resources in those 64-bit windows. Clear IORESOURCE_MEM_64 from host bridge windows since we don't need that information. Suggested-by: Bjorn Helgaas Fixes: 9d57e61bf723 ("of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses") Link: https://lore.kernel.org/r/20210614230457.752811-1-punitagrawal@gmail.com Reported-at: https://lore.kernel.org/lkml/7a1e2ebc-f7d8-8431-d844-41a9c36a8911@arm.com/ Reported-at: https://lore.kernel.org/lkml/YMyTUv7Jsd89PGci@m4/T/#u Reported-by: Alexandru Elisei Reported-by: Qu Wenruo Tested-by: Alexandru Elisei Tested-by: Domenico Andreoli Signed-off-by: Punit Agrawal Signed-off-by: Bjorn Helgaas Reviewed-by: Rob Herring Acked-by: Ard Biesheuvel commit 89529d8b8f8daf92d9979382b8d2eb39966846ea Author: Steven Rostedt (VMware) Date: Thu Jun 17 17:12:35 2021 -0400 tracing: Do no increment trace_clock_global() by one The trace_clock_global() tries to make sure the events between CPUs is somewhat in order. A global value is used and updated by the latest read of a clock. If one CPU is ahead by a little, and is read by another CPU, a lock is taken, and if the timestamp of the other CPU is behind, it will simply use the other CPUs timestamp. The lock is also only taken with a "trylock" due to tracing, and strange recursions can happen. The lock is not taken at all in NMI context. In the case where the lock is not able to be taken, the non synced timestamp is returned. But it will not be less than the saved global timestamp. The problem arises because when the time goes "backwards" the time returned is the saved timestamp plus 1. If the lock is not taken, and the plus one to the timestamp is returned, there's a small race that can cause the time to go backwards! CPU0 CPU1 ---- ---- trace_clock_global() { ts = clock() [ 1000 ] trylock(clock_lock) [ success ] global_ts = ts; [ 1000 ] trace_clock_global() { ts = clock() [ 999 ] if (ts < global_ts) ts = global_ts + 1 [ 1001 ] trylock(clock_lock) [ fail ] return ts [ 1001] } unlock(clock_lock); return ts; [ 1000 ] } trace_clock_global() { ts = clock() [ 1000 ] if (ts < global_ts) [ false 1000 == 1000 ] trylock(clock_lock) [ success ] global_ts = ts; [ 1000 ] unlock(clock_lock) return ts; [ 1000 ] } The above case shows to reads of trace_clock_global() on the same CPU, but the second read returns one less than the first read. That is, time when backwards, and this is not what is allowed by trace_clock_global(). This was triggered by heavy tracing and the ring buffer checker that tests for the clock going backwards: Ring buffer clock went backwards: 20613921464 -> 20613921463 ------------[ cut here ]------------ WARNING: CPU: 2 PID: 0 at kernel/trace/ring_buffer.c:3412 check_buffer+0x1b9/0x1c0 Modules linked in: [..] [CPU: 2]TIME DOES NOT MATCH expected:20620711698 actual:20620711697 delta:6790234 before:20613921463 after:20613921463 [20613915818] PAGE TIME STAMP [20613915818] delta:0 [20613915819] delta:1 [20613916035] delta:216 [20613916465] delta:430 [20613916575] delta:110 [20613916749] delta:174 [20613917248] delta:499 [20613917333] delta:85 [20613917775] delta:442 [20613917921] delta:146 [20613918321] delta:400 [20613918568] delta:247 [20613918768] delta:200 [20613919306] delta:538 [20613919353] delta:47 [20613919980] delta:627 [20613920296] delta:316 [20613920571] delta:275 [20613920862] delta:291 [20613921152] delta:290 [20613921464] delta:312 [20613921464] delta:0 TIME EXTEND [20613921464] delta:0 This happened more than once, and always for an off by one result. It also started happening after commit aafe104aa9096 was added. Cc: stable@vger.kernel.org Fixes: aafe104aa9096 ("tracing: Restructure trace_clock_global() to never block") Signed-off-by: Steven Rostedt (VMware) commit 4fdd595e4f9a1ff6d93ec702eaecae451cfc6591 Author: Steven Rostedt (VMware) Date: Thu Jun 17 14:32:34 2021 -0400 tracing: Do not stop recording comms if the trace file is being read A while ago, when the "trace" file was opened, tracing was stopped, and code was added to stop recording the comms to saved_cmdlines, for mapping of the pids to the task name. Code has been added that only records the comm if a trace event occurred, and there's no reason to not trace it if the trace file is opened. Cc: stable@vger.kernel.org Fixes: 7ffbd48d5cab2 ("tracing: Cache comms only after an event occurred") Signed-off-by: Steven Rostedt (VMware) commit 85550c83da421fb12dc1816c45012e1e638d2b38 Author: Steven Rostedt (VMware) Date: Thu Jun 17 13:47:25 2021 -0400 tracing: Do not stop recording cmdlines when tracing is off The saved_cmdlines is used to map pids to the task name, such that the output of the tracing does not just show pids, but also gives a human readable name for the task. If the name is not mapped, the output looks like this: <...>-1316 [005] ...2 132.044039: ... Instead of this: gnome-shell-1316 [005] ...2 132.044039: ... The names are updated when tracing is running, but are skipped if tracing is stopped. Unfortunately, this stops the recording of the names if the top level tracer is stopped, and not if there's other tracers active. The recording of a name only happens when a new event is written into a ring buffer, so there is no need to test if tracing is on or not. If tracing is off, then no event is written and no need to test if tracing is off or not. Remove the check, as it hides the names of tasks for events in the instance buffers. Cc: stable@vger.kernel.org Fixes: 7ffbd48d5cab2 ("tracing: Cache comms only after an event occurred") Signed-off-by: Steven Rostedt (VMware) commit fb780761e7bd9f2e94f5b9a296ead6b35b944206 Author: Peter Zijlstra Date: Wed Jun 16 23:41:26 2021 +0800 recordmcount: Correct st_shndx handling One should only use st_shndx when >SHN_UNDEF and = SHN_LORESERVE && st_shndx != SHN_XINDEX. Link: https://lore.kernel.org/lkml/20210607023839.26387-1-mark-pk.tsai@mediatek.com/ Link: https://lkml.kernel.org/r/20210616154126.2794-1-mark-pk.tsai@mediatek.com Reported-by: Mark-PK Tsai Tested-by: Mark-PK Tsai Signed-off-by: Peter Zijlstra (Intel) [handle endianness of sym->st_shndx] Signed-off-by: Mark-PK Tsai Signed-off-by: Steven Rostedt (VMware) commit 67e2996f72c71ebe4ac2fcbcf77e54479bb7aa11 Author: Fabien Dessenne Date: Thu Jun 17 16:46:29 2021 +0200 pinctrl: stm32: fix the reported number of GPIO lines per bank Each GPIO bank supports a variable number of lines which is usually 16, but is less in some cases : this is specified by the last argument of the "gpio-ranges" bank node property. Report to the framework, the actual number of lines, so the libgpiod gpioinfo command lists the actually existing GPIO lines. Fixes: 1dc9d289154b ("pinctrl: stm32: add possibility to use gpio-ranges to declare bank range") Signed-off-by: Fabien Dessenne Link: https://lore.kernel.org/r/20210617144629.2557693-1-fabien.dessenne@foss.st.com Signed-off-by: Linus Walleij commit 652e8363bbc7d149fa194a5cbf30b1001c0274b0 Author: Johannes Berg Date: Fri Jun 18 13:41:45 2021 +0300 mac80211: handle various extensible elements correctly Various elements are parsed with a requirement to have an exact size, when really we should only check that they have the minimum size that we need. Check only that and therefore ignore any additional data that they might carry. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.cd101f8040a4.Iadf0e9b37b100c6c6e79c7b298cc657c2be9151a@changeid Signed-off-by: Johannes Berg commit bbc6f03ff26e7b71d6135a7b78ce40e7dee3d86a Author: Johannes Berg Date: Fri Jun 18 13:41:49 2021 +0300 mac80211: reset profile_periodicity/ema_ap Apparently we never clear these values, so they'll remain set since the setting of them is conditional. Clear the values in the relevant other cases. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.316e32d136a9.I2a12e51814258e1e1b526103894f4b9f19a91c8d@changeid Signed-off-by: Johannes Berg commit 0288e5e16a2e18f0b7e61a2b70d9037fc6e4abeb Author: Avraham Stern Date: Fri Jun 18 13:41:31 2021 +0300 cfg80211: avoid double free of PMSR request If cfg80211_pmsr_process_abort() moves all the PMSR requests that need to be freed into a local list before aborting and freeing them. As a result, it is possible that cfg80211_pmsr_complete() will run in parallel and free the same PMSR request. Fix it by freeing the request in cfg80211_pmsr_complete() only if it is still in the original pmsr list. Cc: stable@vger.kernel.org Fixes: 9bb7e0f24e7e ("cfg80211: add peer measurement with FTM initiator API") Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.1fbef57e269a.I00294bebdb0680b892f8d1d5c871fd9dbe785a5e@changeid Signed-off-by: Johannes Berg commit b5642479b0f7168fe16d156913533fe65ab4f8d5 Author: Johannes Berg Date: Fri Jun 18 13:41:29 2021 +0300 cfg80211: make certificate generation more robust If all net/wireless/certs/*.hex files are deleted, the build will hang at this point since the 'cat' command will have no arguments. Do "echo | cat - ..." so that even if the "..." part is empty, the whole thing won't hang. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210618133832.c989056c3664.Ic3b77531d00b30b26dcd69c64e55ae2f60c3f31e@changeid Signed-off-by: Johannes Berg commit 1236af327af476731aa548dfcbbefb1a3ec6726a Author: Felix Fietkau Date: Thu Jun 17 12:38:54 2021 +0200 mac80211: minstrel_ht: fix sample time check We need to skip sampling if the next sample time is after jiffies, not before. This patch fixes an issue where in some cases only very little sampling (or none at all) is performed, leading to really bad data rates Fixes: 80d55154b2f8 ("mac80211: minstrel_ht: significantly redesign the rate probing strategy") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau Link: https://lore.kernel.org/r/20210617103854.61875-1-nbd@nbd.name Signed-off-by: Johannes Berg commit 76b7f8fae30a9249f820e019f1e62eca992751a2 Author: Andy Shevchenko Date: Sun Jun 6 22:19:40 2021 +0300 pinctrl: microchip-sgpio: Put fwnode in error case during ->probe() device_for_each_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes: 7e5ea974e61c ("pinctrl: pinctrl-microchip-sgpio: Add pinctrl driver for Microsemi Serial GPIO") Cc: Lars Povlsen Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210606191940.29312-1-andy.shevchenko@gmail.com Signed-off-by: Linus Walleij commit 60b7ed54a41b550d50caf7f2418db4a7e75b5bdc Author: Athira Rajeev Date: Thu Jun 17 13:55:06 2021 -0400 powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set On systems without any specific PMU driver support registered, running perf record causes Oops. The relevant portion from call trace: BUG: Kernel NULL pointer dereference on read at 0x00000040 Faulting instruction address: 0xc0021f0c Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=4K PREEMPT CMPCPRO SAF3000 DIE NOTIFICATION CPU: 0 PID: 442 Comm: null_syscall Not tainted 5.13.0-rc6-s3k-dev-01645-g7649ee3d2957 #5164 NIP: c0021f0c LR: c00e8ad8 CTR: c00d8a5c NIP perf_instruction_pointer+0x10/0x60 LR perf_prepare_sample+0x344/0x674 Call Trace: perf_prepare_sample+0x7c/0x674 (unreliable) perf_event_output_forward+0x3c/0x94 __perf_event_overflow+0x74/0x14c perf_swevent_hrtimer+0xf8/0x170 __hrtimer_run_queues.constprop.0+0x160/0x318 hrtimer_interrupt+0x148/0x3b0 timer_interrupt+0xc4/0x22c Decrementer_virt+0xb8/0xbc During perf record session, perf_instruction_pointer() is called to capture the sample IP. This function in core-book3s accesses ppmu->flags. If a platform specific PMU driver is not registered, ppmu is set to NULL and accessing its members results in a crash. Fix this crash by checking if ppmu is set. Fixes: 2ca13a4cc56c ("powerpc/perf: Use regs->nip when SIAR is zero") Cc: stable@vger.kernel.org # v5.11+ Reported-by: Christophe Leroy Signed-off-by: Athira Rajeev Tested-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1623952506-1431-1-git-send-email-atrajeev@linux.vnet.ibm.com commit c55338d34cc2434d4ff9de89498f91171bd1f120 Merge: 009c9aa5be652 1c0b0efd148d5 Author: Dave Airlie Date: Fri Jun 18 11:15:04 2021 +1000 Merge tag 'amd-drm-fixes-5.13-2021-06-16' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.13-2021-06-16: amdgpu: - GFX9 and 10 powergating fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210616204913.4368-1-alexander.deucher@amd.com commit fd0aa1a4567d0f09e1bfe367a950b004f99ac290 Merge: 39519f6a56e39 d8ac05ea13d78 Author: Linus Torvalds Date: Thu Jun 17 13:14:53 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Miscellaneous bugfixes. The main interesting one is a NULL pointer dereference reported by syzkaller ("KVM: x86: Immediately reset the MMU context when the SMM flag is cleared")" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: selftests: Fix kvm_check_cap() assertion KVM: x86/mmu: Calculate and check "full" mmu_role for nested MMU KVM: X86: Fix x86_emulator slab cache leak KVM: SVM: Call SEV Guest Decommission if ASID binding fails KVM: x86: Immediately reset the MMU context when the SMM flag is cleared KVM: x86: Fix fall-through warnings for Clang KVM: SVM: fix doc warnings KVM: selftests: Fix compiling errors when initializing the static structure kvm: LAPIC: Restore guard to prevent illegal APIC register access commit 1c200f832e14420fa770193f9871f4ce2df00d07 Author: Kees Cook Date: Thu Jun 17 10:09:53 2021 -0700 net: qed: Fix memcpy() overflow of qed_dcbx_params() The source (&dcbx_info->operational.params) and dest (&p_hwfn->p_dcbx_info->set.config.params) are both struct qed_dcbx_params (560 bytes), not struct qed_dcbx_admin_params (564 bytes), which is used as the memcpy() size. However it seems that struct qed_dcbx_operational_params (dcbx_info->operational)'s layout matches struct qed_dcbx_admin_params (p_hwfn->p_dcbx_info->set.config)'s 4 byte difference (3 padding, 1 byte for "valid"). On the assumption that the size is wrong (rather than the source structure type), adjust the memcpy() size argument to be 4 bytes smaller and add a BUILD_BUG_ON() to validate any changes to the structure sizes. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit c3b26fdf1b32f91c7a3bc743384b4a298ab53ad7 Author: Linyu Yuan Date: Thu Jun 17 07:32:32 2021 +0800 net: cdc_eem: fix tx fixup skb leak when usbnet transmit a skb, eem fixup it in eem_tx_fixup(), if skb_copy_expand() failed, it return NULL, usbnet_start_xmit() will have no chance to free original skb. fix it by free orginal skb in eem_tx_fixup() first, then check skb clone status, if failed, return NULL to usbnet. Fixes: 9f722c0978b0 ("usbnet: CDC EEM support (v5)") Signed-off-by: Linyu Yuan Reviewed-by: Greg Kroah-Hartman Signed-off-by: David S. Miller commit bc39f6792ede3a830b1893c9133636b9f6991e59 Merge: 7edcc68230149 0232fc2ddcf4f Author: David S. Miller Date: Thu Jun 17 11:26:30 2021 -0700 Merge tag 'mlx5-fixes-2021-06-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2021-06-16 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. ==================== Signed-off-by: David S. Miller commit 7edcc682301492380fbdd604b4516af5ae667a13 Author: Pavel Skripkin Date: Wed Jun 16 22:09:06 2021 +0300 net: hamradio: fix memory leak in mkiss_close My local syzbot instance hit memory leak in mkiss_open()[1]. The problem was in missing free_netdev() in mkiss_close(). In mkiss_open() netdevice is allocated and then registered, but in mkiss_close() netdevice was only unregistered, but not freed. Fail log: BUG: memory leak unreferenced object 0xffff8880281ba000 (size 4096): comm "syz-executor.1", pid 11443, jiffies 4295046091 (age 17.660s) hex dump (first 32 bytes): 61 78 30 00 00 00 00 00 00 00 00 00 00 00 00 00 ax0............. 00 27 fa 2a 80 88 ff ff 00 00 00 00 00 00 00 00 .'.*............ backtrace: [] kvmalloc_node+0x61/0xf0 [] alloc_netdev_mqs+0x98/0xe80 [] mkiss_open+0xb2/0x6f0 [1] [] tty_ldisc_open+0x9b/0x110 [] tty_set_ldisc+0x2e8/0x670 [] tty_ioctl+0xda3/0x1440 [] __x64_sys_ioctl+0x193/0x200 [] do_syscall_64+0x3a/0xb0 [] entry_SYSCALL_64_after_hwframe+0x44/0xae BUG: memory leak unreferenced object 0xffff8880141a9a00 (size 96): comm "syz-executor.1", pid 11443, jiffies 4295046091 (age 17.660s) hex dump (first 32 bytes): e8 a2 1b 28 80 88 ff ff e8 a2 1b 28 80 88 ff ff ...(.......(.... 98 92 9c aa b0 40 02 00 00 00 00 00 00 00 00 00 .....@.......... backtrace: [] __hw_addr_create_ex+0x5b/0x310 [] __hw_addr_add_ex+0x1f8/0x2b0 [] dev_addr_init+0x10b/0x1f0 [] alloc_netdev_mqs+0x13b/0xe80 [] mkiss_open+0xb2/0x6f0 [1] [] tty_ldisc_open+0x9b/0x110 [] tty_set_ldisc+0x2e8/0x670 [] tty_ioctl+0xda3/0x1440 [] __x64_sys_ioctl+0x193/0x200 [] do_syscall_64+0x3a/0xb0 [] entry_SYSCALL_64_after_hwframe+0x44/0xae BUG: memory leak unreferenced object 0xffff8880219bfc00 (size 512): comm "syz-executor.1", pid 11443, jiffies 4295046091 (age 17.660s) hex dump (first 32 bytes): 00 a0 1b 28 80 88 ff ff 80 8f b1 8d ff ff ff ff ...(............ 80 8f b1 8d ff ff ff ff 00 00 00 00 00 00 00 00 ................ backtrace: [] kvmalloc_node+0x61/0xf0 [] alloc_netdev_mqs+0x777/0xe80 [] mkiss_open+0xb2/0x6f0 [1] [] tty_ldisc_open+0x9b/0x110 [] tty_set_ldisc+0x2e8/0x670 [] tty_ioctl+0xda3/0x1440 [] __x64_sys_ioctl+0x193/0x200 [] do_syscall_64+0x3a/0xb0 [] entry_SYSCALL_64_after_hwframe+0x44/0xae BUG: memory leak unreferenced object 0xffff888029b2b200 (size 256): comm "syz-executor.1", pid 11443, jiffies 4295046091 (age 17.660s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kvmalloc_node+0x61/0xf0 [] alloc_netdev_mqs+0x912/0xe80 [] mkiss_open+0xb2/0x6f0 [1] [] tty_ldisc_open+0x9b/0x110 [] tty_set_ldisc+0x2e8/0x670 [] tty_ioctl+0xda3/0x1440 [] __x64_sys_ioctl+0x193/0x200 [] do_syscall_64+0x3a/0xb0 [] entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 815f62bf7427 ("[PATCH] SMP rewrite of mkiss") Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit c19c8c0e666f9259e2fc4d2fa4b9ff8e3b40ee5d Author: Christophe JAILLET Date: Wed Jun 16 20:43:37 2021 +0200 be2net: Fix an error handling path in 'be_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: d6b6d9877878 ("be2net: use PCIe AER capability") Signed-off-by: Christophe JAILLET Acked-by: Somnath Kotur Signed-off-by: David S. Miller commit d8ac05ea13d789d5491a5920d70a05659015441d Author: Fuad Tabba Date: Tue Jun 15 16:04:43 2021 +0100 KVM: selftests: Fix kvm_check_cap() assertion KVM_CHECK_EXTENSION ioctl can return any negative value on error, and not necessarily -1. Change the assertion to reflect that. Signed-off-by: Fuad Tabba Message-Id: <20210615150443.1183365-1-tabba@google.com> Signed-off-by: Paolo Bonzini commit 39519f6a56e398544d270fcb548de99b54421d43 Merge: 70585216fe773 8b1462b67f23d Author: Linus Torvalds Date: Thu Jun 17 09:49:48 2021 -0700 Merge tag 'fixes_for_v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota and fanotify fixes from Jan Kara: "A fixup finishing disabling of quotactl_path() syscall (I've missed archs using different way to declare syscalls) and a fix of an fd leak in error handling path of fanotify" * tag 'fixes_for_v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: finish disable quotactl_path syscall fanotify: fix copy_event_to_user() fid error clean up commit a7d8d1c7a7f73e780aa9ae74926ae5985b2f895f Author: Andrew Lunn Date: Mon Jun 14 17:55:23 2021 +0200 usb: core: hub: Disable autosuspend for Cypress CY7C65632 The Cypress CY7C65632 appears to have an issue with auto suspend and detecting devices, not too dissimilar to the SMSC 5534B hub. It is easiest to reproduce by connecting multiple mass storage devices to the hub at the same time. On a Lenovo Yoga, around 1 in 3 attempts result in the devices not being detected. It is however possible to make them appear using lsusb -v. Disabling autosuspend for this hub resolves the issue. Fixes: 1208f9e1d758 ("USB: hub: Fix the broken detection of USB3 device in SMSC hub") Cc: stable@vger.kernel.org Signed-off-by: Andrew Lunn Link: https://lore.kernel.org/r/20210614155524.2228800-1-andrew@lunn.ch Signed-off-by: Greg Kroah-Hartman commit a13d0f8d117ca6b7885b51c4b21fe8d5a9eae714 Merge: 009c9aa5be652 382e6e177bc1c Author: Thomas Gleixner Date: Thu Jun 17 15:22:31 2021 +0200 Merge tag 'irqchip-fixes-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - Fix GICv3 NMI handling where an IRQ could be mistakenly handled as a NMI, with disatrous effects Link: https://lore.kernel.org/r/20210610171127.2404752-1-maz@kernel.org commit f9f28e5bd0baee9708c9011897196f06ae3a2733 Author: Naohiro Aota Date: Thu Jun 17 13:56:18 2021 +0900 btrfs: zoned: fix negative space_info->bytes_readonly Consider we have a using block group on zoned btrfs. |<- ZU ->|<- used ->|<---free--->| `- Alloc offset ZU: Zone unusable Marking the block group read-only will migrate the zone unusable bytes to the read-only bytes. So, we will have this. |<- RO ->|<- used ->|<--- RO --->| RO: Read only When marking it back to read-write, btrfs_dec_block_group_ro() subtracts the above "RO" bytes from the space_info->bytes_readonly. And, it moves the zone unusable bytes back and again subtracts those bytes from the space_info->bytes_readonly, leading to negative bytes_readonly. This can be observed in the output as eg.: Data, single: total=512.00MiB, used=165.21MiB, zone_unusable=16.00EiB Data, single: total=536870912, used=173256704, zone_unusable=18446744073603186688 This commit fixes the issue by reordering the operations. Link: https://github.com/naota/linux/issues/37 Reported-by: David Sterba Fixes: 169e0da91a21 ("btrfs: zoned: track unusable bytes for zones") CC: stable@vger.kernel.org # 5.12+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit 0232fc2ddcf4ffe01069fd1aa07922652120f44a Author: Aya Levin Date: Thu Jun 10 14:20:28 2021 +0300 net/mlx5: Reset mkey index on creation Reset only the index part of the mkey and keep the variant part. On devlink reload, driver recreates mkeys, so the mkey index may change. Trying to preserve the variant part of the mkey, driver mistakenly merged the mkey index with current value. In case of a devlink reload, current value of index part is dirty, so the index may be corrupted. Fixes: 54c62e13ad76 ("{IB,net}/mlx5: Setup mkey variant before mr create command invocation") Signed-off-by: Aya Levin Signed-off-by: Amir Tzin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a5ae8fc9058e37437c8c1f82b3d412b4abd1b9e6 Author: Dmytro Linkin Date: Fri May 14 11:14:19 2021 +0300 net/mlx5e: Don't create devices during unload flow Running devlink reload command for port in switchdev mode cause resources to corrupt: driver can't release allocated EQ and reclaim memory pages, because "rdma" auxiliary device had add CQs which blocks EQ from deletion. Erroneous sequence happens during reload-down phase, and is following: 1. detach device - suspends auxiliary devices which support it, destroys others. During this step "eth-rep" and "rdma-rep" are destroyed, "eth" - suspended. 2. disable SRIOV - moves device to legacy mode; as part of disablement - rescans drivers. This step adds "rdma" auxiliary device. 3. destroy EQ table - . Driver shouldn't create any device during unload flows. To handle that implement MLX5_PRIV_FLAGS_DETACH flag, set it on device detach and unset on device attach. If flag is set do no-op on drivers rescan. Fixes: a925b5e309c9 ("net/mlx5: Register mlx5 devices to auxiliary virtual bus") Signed-off-by: Dmytro Linkin Reviewed-by: Leon Romanovsky Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 65fb7d109abe3a1a9f1c2d3ba7e1249bc978d5f0 Author: Alex Vesker Date: Tue Jun 1 18:10:06 2021 +0300 net/mlx5: DR, Fix STEv1 incorrect L3 decapsulation padding Decapsulation L3 on small inner packets which are less than 64 Bytes was done incorrectly. In small packets there is an extra padding added in L2 which should not be included in L3 length. The issue was that after decapL3 the extra L2 padding caused an update on the L3 length. To avoid this issue the new header is pushed to the beginning of the packet (offset 0) which should not cause a HW reparse and update the L3 length. Fixes: c349b4137cfd ("net/mlx5: DR, Add STEv1 modify header logic") Reviewed-by: Erez Shitrit Reviewed-by: Yevgeny Kliteynik Signed-off-by: Alex Vesker Signed-off-by: Saeed Mahameed commit c7d6c19b3bde66d7aebbe93e0f9e6d9ff57fc3fa Author: Parav Pandit Date: Thu Jun 10 18:39:53 2021 +0300 net/mlx5: SF_DEV, remove SF device on invalid state When auxiliary bus autoprobe is disabled and SF is in ACTIVE state, on SF port deletion it transitions from ACTIVE->ALLOCATED->INVALID. When VHCA event handler queries the state, it is already transition to INVALID state. In this scenario, event handler missed to delete the SF device. Fix it by deleting the SF when SF state is INVALID. Fixes: 90d010b8634b ("net/mlx5: SF, Add auxiliary device support") Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit ca36fc4d77b35b8d142cf1ed0eae5ec2e071dc3c Author: Parav Pandit Date: Tue Jun 8 19:03:24 2021 +0300 net/mlx5: E-Switch, Allow setting GUID for host PF vport E-switch should be able to set the GUID of host PF vport. Currently it returns an error. This results in below error when user attempts to configure MAC address of the PF of an external controller. $ devlink port function set pci/0000:03:00.0/196608 \ hw_addr 00:00:00:11:22:33 mlx5_core 0000:03:00.0: mlx5_esw_set_vport_mac_locked:1876:(pid 6715):\ "Failed to set vport 0 node guid, err = -22. RDMA_CM will not function properly for this VF." Check for zero vport is no longer needed. Fixes: 330077d14de1 ("net/mlx5: E-switch, Supporting setting devlink port function mac address") Signed-off-by: Yuval Avnery Signed-off-by: Parav Pandit Reviewed-by: Bodong Wang Reviewed-by: Alaa Hleihel Signed-off-by: Saeed Mahameed commit bbc8222dc49db8d49add0f27bcac33f4b92193dc Author: Parav Pandit Date: Tue Jun 8 19:14:08 2021 +0300 net/mlx5: E-Switch, Read PF mac address External controller PF's MAC address is not read from the device during vport setup. Fail to read this results in showing all zeros to user while the factory programmed MAC is a valid value. $ devlink port show eth1 -jp { "port": { "pci/0000:03:00.0/196608": { "type": "eth", "netdev": "eth1", "flavour": "pcipf", "controller": 1, "pfnum": 0, "splittable": false, "function": { "hw_addr": "00:00:00:00:00:00" } } } } Hence, read it when enabling a vport. After the fix, $ devlink port show eth1 -jp { "port": { "pci/0000:03:00.0/196608": { "type": "eth", "netdev": "eth1", "flavour": "pcipf", "controller": 1, "pfnum": 0, "splittable": false, "function": { "hw_addr": "98:03:9b:a0:60:11" } } } } Fixes: f099fde16db3 ("net/mlx5: E-switch, Support querying port function mac address") Signed-off-by: Bodong Wang Signed-off-by: Parav Pandit Reviewed-by: Alaa Hleihel Signed-off-by: Saeed Mahameed commit 2058cc9c8041fde9c0bdd8e868c72b137cff8563 Author: Leon Romanovsky Date: Sun Mar 21 19:57:14 2021 +0200 net/mlx5: Check that driver was probed prior attaching the device The device can be requested to be attached despite being not probed. This situation is possible if devlink reload races with module removal, and the following kernel panic is an outcome of such race. mlx5_core 0000:00:09.0: firmware version: 4.7.9999 mlx5_core 0000:00:09.0: 0.000 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x255 link) BUG: unable to handle page fault for address: fffffffffffffff0 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 3218067 P4D 3218067 PUD 321a067 PMD 0 Oops: 0000 [#1] SMP KASAN NOPTI CPU: 7 PID: 250 Comm: devlink Not tainted 5.12.0-rc2+ #2836 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:mlx5_attach_device+0x80/0x280 [mlx5_core] Code: f8 48 c1 e8 03 42 80 3c 38 00 0f 85 80 01 00 00 48 8b 45 68 48 8d 78 f0 48 89 fe 48 c1 ee 03 42 80 3c 3e 00 0f 85 70 01 00 00 <48> 8b 40 f0 48 85 c0 74 0d 48 89 ef ff d0 85 c0 0f 85 84 05 0e 00 RSP: 0018:ffff8880129675f0 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff827407f1 RDX: 1ffff110011336cf RSI: 1ffffffffffffffe RDI: fffffffffffffff0 RBP: ffff888008e0c000 R08: 0000000000000008 R09: ffffffffa0662ee7 R10: fffffbfff40cc5dc R11: 0000000000000000 R12: ffff88800ea002e0 R13: ffffed1001d459f7 R14: ffffffffa05ef4f8 R15: dffffc0000000000 FS: 00007f51dfeaf740(0000) GS:ffff88806d5c0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffffffffffff0 CR3: 000000000bc82006 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: mlx5_load_one+0x117/0x1d0 [mlx5_core] devlink_reload+0x2d5/0x520 ? devlink_remote_reload_actions_performed+0x30/0x30 ? mutex_trylock+0x24b/0x2d0 ? devlink_nl_cmd_reload+0x62b/0x1070 devlink_nl_cmd_reload+0x66d/0x1070 ? devlink_reload+0x520/0x520 ? devlink_nl_pre_doit+0x64/0x4d0 genl_family_rcv_msg_doit+0x1e9/0x2f0 ? mutex_lock_io_nested+0x1130/0x1130 ? genl_family_rcv_msg_attrs_parse.constprop.0+0x240/0x240 ? security_capable+0x51/0x90 genl_rcv_msg+0x27f/0x4a0 ? genl_get_cmd+0x3c0/0x3c0 ? lock_acquire+0x1a9/0x6d0 ? devlink_reload+0x520/0x520 ? lock_release+0x6c0/0x6c0 netlink_rcv_skb+0x11d/0x340 ? genl_get_cmd+0x3c0/0x3c0 ? netlink_ack+0x9f0/0x9f0 ? lock_release+0x1f9/0x6c0 genl_rcv+0x24/0x40 netlink_unicast+0x433/0x700 ? netlink_attachskb+0x730/0x730 ? _copy_from_iter_full+0x178/0x650 ? __alloc_skb+0x113/0x2b0 netlink_sendmsg+0x6f1/0xbd0 ? netlink_unicast+0x700/0x700 ? netlink_unicast+0x700/0x700 sock_sendmsg+0xb0/0xe0 __sys_sendto+0x193/0x240 ? __x64_sys_getpeername+0xb0/0xb0 ? copy_page_range+0x2300/0x2300 ? __up_read+0x1a1/0x7b0 ? do_user_addr_fault+0x219/0xdc0 __x64_sys_sendto+0xdd/0x1b0 ? syscall_enter_from_user_mode+0x1d/0x50 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f51dffb514a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 76 c3 0f 1f 44 00 00 55 48 83 ec 30 44 89 4c RSP: 002b:00007ffcaef22e78 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f51dffb514a RDX: 0000000000000030 RSI: 000055750daf2440 RDI: 0000000000000003 RBP: 000055750daf2410 R08: 00007f51e0081200 R09: 000000000000000c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Modules linked in: mlx5_core(-) ptp pps_core ib_ipoib rdma_ucm rdma_cm iw_cm ib_cm ib_umad ib_uverbs ib_core [last unloaded: mlx5_ib] CR2: fffffffffffffff0 ---[ end trace 7789831bfe74fa42 ]--- Fixes: a925b5e309c9 ("net/mlx5: Register mlx5 devices to auxiliary virtual bus") Signed-off-by: Leon Romanovsky Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 94a4b8414d3e91104873007b659252f855ee344a Author: Leon Romanovsky Date: Mon Mar 8 15:41:55 2021 +0200 net/mlx5: Fix error path for set HCA defaults In the case of the failure to execute mlx5_core_set_hca_defaults(), we used wrong goto label to execute error unwind flow. Fixes: 5bef709d76a2 ("net/mlx5: Enable host PF HCA after eswitch is initialized") Reviewed-by: Saeed Mahameed Reviewed-by: Moshe Shemesh Signed-off-by: Leon Romanovsky Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit e73a99f3287a740a07d6618e9470f4d6cb217da8 Author: Harald Freudenberger Date: Tue Jun 1 08:27:29 2021 +0200 s390/ap: Fix hanging ioctl caused by wrong msg counter When a AP queue is switched to soft offline, all pending requests are purged out of the pending requests list and 'received' by the upper layer like zcrypt device drivers. This is also done for requests which are already enqueued into the firmware queue. A request in a firmware queue may eventually produce an response message, but there is no waiting process any more. However, the response was counted with the queue_counter and as this counter was reset to 0 with the offline switch, the pending response caused the queue_counter to get negative. The next request increased this counter to 0 (instead of 1) which caused the ap code to assume there is nothing to receive and so the response for this valid request was never tried to fetch from the firmware queue. This all caused a queue to not work properly after a switch offline/online and in the end processes to hang forever when trying to send a crypto request after an queue offline/online switch cicle. Fixed by a) making sure the counter does not drop below 0 and b) on a successful enqueue of a message has at least a value of 1. Additionally a warning is emitted, when a reply can't get assigned to a waiting process. This may be normal operation (process had timeout or has been killed) but may give a hint that something unexpected happened (like this odd behavior described above). Signed-off-by: Harald Freudenberger Cc: stable@vger.kernel.org Signed-off-by: Vasily Gorbik commit 1c0b0efd148d5b24c4932ddb3fa03c8edd6097b3 Author: Yifan Zhang Date: Thu Jun 10 10:10:07 2021 +0800 drm/amdgpu/gfx10: enlarge CP_MEC_DOORBELL_RANGE_UPPER to cover full doorbell. If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4cbbe34807938e6e494e535a68d5ff64edac3f20 Author: Yifan Zhang Date: Thu Jun 10 09:55:01 2021 +0800 drm/amdgpu/gfx9: fix the doorbell missing when in CGPG issue. If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue. Signed-off-by: Yifan Zhang Reviewed-by: Felix Kuehling Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit da5ac772cfe2a03058b0accfac03fad60c46c24d Author: Kees Cook Date: Wed Jun 16 12:53:59 2021 -0700 r8169: Avoid memcpy() over-reading of ETH_SS_STATS In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. The memcpy() is copying the entire structure, not just the first array. Adjust the source argument so the compiler can do appropriate bounds checking. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 224004fbb033600715dbd626bceec10bfd9c58bc Author: Kees Cook Date: Wed Jun 16 12:53:33 2021 -0700 sh_eth: Avoid memcpy() over-reading of ETH_SS_STATS In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. The memcpy() is copying the entire structure, not just the first array. Adjust the source argument so the compiler can do appropriate bounds checking. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 99718abdc00e86e4f286dd836408e2834886c16e Author: Kees Cook Date: Wed Jun 16 12:53:03 2021 -0700 r8152: Avoid memcpy() over-reading of ETH_SS_STATS In preparation for FORTIFY_SOURCE performing compile-time and run-time field bounds checking for memcpy(), memmove(), and memset(), avoid intentionally reading across neighboring array fields. The memcpy() is copying the entire structure, not just the first array. Adjust the source argument so the compiler can do appropriate bounds checking. Signed-off-by: Kees Cook Signed-off-by: David S. Miller commit 1b29df0e2e802cb15a5196c936f494161ec97502 Author: Andrea Righi Date: Wed Jun 16 16:57:27 2021 +0200 selftests: net: use bash to run udpgro_fwd test case udpgro_fwd.sh contains many bash specific operators ("[[", "local -r"), but it's using /bin/sh; in some distro /bin/sh is mapped to /bin/dash, that doesn't support such operators. Force the test to use /bin/bash explicitly and prevent false positive test failures. Signed-off-by: Andrea Righi Signed-off-by: David S. Miller commit a494bd642d9120648b06bb7d28ce6d05f55a7819 Author: Eric Dumazet Date: Wed Jun 16 07:47:15 2021 -0700 net/af_unix: fix a data-race in unix_dgram_sendmsg / unix_release_sock While unix_may_send(sk, osk) is called while osk is locked, it appears unix_release_sock() can overwrite unix_peer() after this lock has been released, making KCSAN unhappy. Changing unix_release_sock() to access/change unix_peer() before lock is released should fix this issue. BUG: KCSAN: data-race in unix_dgram_sendmsg / unix_release_sock write to 0xffff88810465a338 of 8 bytes by task 20852 on cpu 1: unix_release_sock+0x4ed/0x6e0 net/unix/af_unix.c:558 unix_release+0x2f/0x50 net/unix/af_unix.c:859 __sock_release net/socket.c:599 [inline] sock_close+0x6c/0x150 net/socket.c:1258 __fput+0x25b/0x4e0 fs/file_table.c:280 ____fput+0x11/0x20 fs/file_table.c:313 task_work_run+0xae/0x130 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x156/0x190 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302 do_syscall_64+0x56/0x90 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff88810465a338 of 8 bytes by task 20888 on cpu 0: unix_may_send net/unix/af_unix.c:189 [inline] unix_dgram_sendmsg+0x923/0x1610 net/unix/af_unix.c:1712 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x360/0x4d0 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmmsg+0x315/0x4b0 net/socket.c:2490 __do_sys_sendmmsg net/socket.c:2519 [inline] __se_sys_sendmmsg net/socket.c:2516 [inline] __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2516 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0xffff888167905400 -> 0x0000000000000000 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 20888 Comm: syz-executor.0 Not tainted 5.13.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 0fd158b89b50b3a31c97a639ff496e1c59686e97 Author: Andrea Righi Date: Wed Jun 16 16:03:21 2021 +0200 selftests: net: veth: make test compatible with dash veth.sh is a shell script that uses /bin/sh; some distro (Ubuntu for example) use dash as /bin/sh and in this case the test reports the following error: # ./veth.sh: 21: local: -r: bad variable name # ./veth.sh: 21: local: -r: bad variable name This happens because dash doesn't support the option "-r" with local. Moreover, in case of missing bpf object, the script is exiting -1, that is an illegal number for dash: exit: Illegal number: -1 Change the script to be compatible both with bash and dash and prevent the errors above. Signed-off-by: Andrea Righi Signed-off-by: David S. Miller commit 1d2ac2033d790f5deaf3d6edfff6a4d901949de2 Merge: e82a35aead2fd e032f7c9c7cef Author: David S. Miller Date: Wed Jun 16 12:48:18 2021 -0700 Merge branch 'net-packet-data-races' Eric Dumazet says: ==================== net/packet: annotate data races KCSAN sent two reports about data races in af_packet. Nothing serious, but worth fixing. ==================== Signed-off-by: David S. Miller commit e032f7c9c7cefffcfb79b9fc16c53011d2d9d11f Author: Eric Dumazet Date: Wed Jun 16 06:42:02 2021 -0700 net/packet: annotate accesses to po->ifindex Like prior patch, we need to annotate lockless accesses to po->ifindex For instance, packet_getname() is reading po->ifindex (twice) while another thread is able to change po->ifindex. KCSAN reported: BUG: KCSAN: data-race in packet_do_bind / packet_getname write to 0xffff888143ce3cbc of 4 bytes by task 25573 on cpu 1: packet_do_bind+0x420/0x7e0 net/packet/af_packet.c:3191 packet_bind+0xc3/0xd0 net/packet/af_packet.c:3255 __sys_bind+0x200/0x290 net/socket.c:1637 __do_sys_bind net/socket.c:1648 [inline] __se_sys_bind net/socket.c:1646 [inline] __x64_sys_bind+0x3d/0x50 net/socket.c:1646 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff888143ce3cbc of 4 bytes by task 25578 on cpu 0: packet_getname+0x5b/0x1a0 net/packet/af_packet.c:3525 __sys_getsockname+0x10e/0x1a0 net/socket.c:1887 __do_sys_getsockname net/socket.c:1902 [inline] __se_sys_getsockname net/socket.c:1899 [inline] __x64_sys_getsockname+0x3e/0x50 net/socket.c:1899 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x00000000 -> 0x00000001 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 25578 Comm: syz-executor.5 Not tainted 5.13.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit c7d2ef5dd4b03ed0ee1d13bc0c55f9cf62d49bd6 Author: Eric Dumazet Date: Wed Jun 16 06:42:01 2021 -0700 net/packet: annotate accesses to po->bind tpacket_snd(), packet_snd(), packet_getname() and packet_seq_show() can read po->num without holding a lock. This means other threads can change po->num at the same time. KCSAN complained about this known fact [1] Add READ_ONCE()/WRITE_ONCE() to address the issue. [1] BUG: KCSAN: data-race in packet_do_bind / packet_sendmsg write to 0xffff888131a0dcc0 of 2 bytes by task 24714 on cpu 0: packet_do_bind+0x3ab/0x7e0 net/packet/af_packet.c:3181 packet_bind+0xc3/0xd0 net/packet/af_packet.c:3255 __sys_bind+0x200/0x290 net/socket.c:1637 __do_sys_bind net/socket.c:1648 [inline] __se_sys_bind net/socket.c:1646 [inline] __x64_sys_bind+0x3d/0x50 net/socket.c:1646 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff888131a0dcc0 of 2 bytes by task 24719 on cpu 1: packet_snd net/packet/af_packet.c:2899 [inline] packet_sendmsg+0x317/0x3570 net/packet/af_packet.c:3040 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x360/0x4d0 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmsg+0x1ed/0x270 net/socket.c:2433 __do_sys_sendmsg net/socket.c:2442 [inline] __se_sys_sendmsg net/socket.c:2440 [inline] __x64_sys_sendmsg+0x42/0x50 net/socket.c:2440 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x0000 -> 0x1200 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 24719 Comm: syz-executor.5 Not tainted 5.13.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit e82a35aead2fd6d6df461291e634be07f71364b9 Merge: d8e2973029b8b 91c02557174be Author: David S. Miller Date: Wed Jun 16 12:44:11 2021 -0700 Merge tag 'linux-can-fixes-for-5.13-20210616' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-06-16 this is a pull request of 4 patches for net/master. The first patch is by Oleksij Rempel and fixes a Use-after-Free found by syzbot in the j1939 stack. The next patch is by Tetsuo Handa and fixes hung task detected by syzbot in the bcm, raw and isotp protocols. Norbert Slusarek's patch fixes a infoleak in bcm's struct bcm_msg_head. Pavel Skripkin's patch fixes a memory leak in the mcba_usb driver. ==================== Signed-off-by: David S. Miller commit d8e2973029b8b2ce477b564824431f3385c77083 Author: Chengyang Fan Date: Wed Jun 16 17:59:25 2021 +0800 net: ipv4: fix memory leak in ip_mc_add1_src BUG: memory leak unreferenced object 0xffff888101bc4c00 (size 32): comm "syz-executor527", pid 360, jiffies 4294807421 (age 19.329s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 01 00 00 00 00 00 00 00 ac 14 14 bb 00 00 02 00 ................ backtrace: [<00000000f17c5244>] kmalloc include/linux/slab.h:558 [inline] [<00000000f17c5244>] kzalloc include/linux/slab.h:688 [inline] [<00000000f17c5244>] ip_mc_add1_src net/ipv4/igmp.c:1971 [inline] [<00000000f17c5244>] ip_mc_add_src+0x95f/0xdb0 net/ipv4/igmp.c:2095 [<000000001cb99709>] ip_mc_source+0x84c/0xea0 net/ipv4/igmp.c:2416 [<0000000052cf19ed>] do_ip_setsockopt net/ipv4/ip_sockglue.c:1294 [inline] [<0000000052cf19ed>] ip_setsockopt+0x114b/0x30c0 net/ipv4/ip_sockglue.c:1423 [<00000000477edfbc>] raw_setsockopt+0x13d/0x170 net/ipv4/raw.c:857 [<00000000e75ca9bb>] __sys_setsockopt+0x158/0x270 net/socket.c:2117 [<00000000bdb993a8>] __do_sys_setsockopt net/socket.c:2128 [inline] [<00000000bdb993a8>] __se_sys_setsockopt net/socket.c:2125 [inline] [<00000000bdb993a8>] __x64_sys_setsockopt+0xba/0x150 net/socket.c:2125 [<000000006a1ffdbd>] do_syscall_64+0x40/0x80 arch/x86/entry/common.c:47 [<00000000b11467c4>] entry_SYSCALL_64_after_hwframe+0x44/0xae In commit 24803f38a5c0 ("igmp: do not remove igmp souce list info when set link down"), the ip_mc_clear_src() in ip_mc_destroy_dev() was removed, because it was also called in igmpv3_clear_delrec(). Rough callgraph: inetdev_destroy -> ip_mc_destroy_dev -> igmpv3_clear_delrec -> ip_mc_clear_src -> RCU_INIT_POINTER(dev->ip_ptr, NULL) However, ip_mc_clear_src() called in igmpv3_clear_delrec() doesn't release in_dev->mc_list->sources. And RCU_INIT_POINTER() assigns the NULL to dev->ip_ptr. As a result, in_dev cannot be obtained through inetdev_by_index() and then in_dev->mc_list->sources cannot be released by ip_mc_del1_src() in the sock_close. Rough call sequence goes like: sock_close -> __sock_release -> inet_release -> ip_mc_drop_socket -> inetdev_by_index -> ip_mc_leave_src -> ip_mc_del_src -> ip_mc_del1_src So we still need to call ip_mc_clear_src() in ip_mc_destroy_dev() to free in_dev->mc_list->sources. Fixes: 24803f38a5c0 ("igmp: do not remove igmp souce list info ...") Reported-by: Hulk Robot Signed-off-by: Chengyang Fan Acked-by: Hangbin Liu Signed-off-by: David S. Miller commit c0d982bf825f81d86f4f0b44436c255873881c19 Merge: 56b786d86694e d23765646e71b Author: David S. Miller Date: Wed Jun 16 12:39:21 2021 -0700 Merge branch 'fec-ptp-fixes' Joakim Zhang says: ==================== net: fixes for fec ptp Small fixes for fec ptp. ==================== Signed-off-by: David S. Miller commit d23765646e71b43ed2b809930411ba5c0aadee7b Author: Joakim Zhang Date: Wed Jun 16 17:14:26 2021 +0800 net: fec_ptp: fix issue caused by refactor the fec_devtype Commit da722186f654 ("net: fec: set GPR bit on suspend by DT configuration.") refactor the fec_devtype, need adjust ptp driver accordingly. Fixes: da722186f654 ("net: fec: set GPR bit on suspend by DT configuration.") Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit cb3cefe3f3f8af27c6076ef7d1f00350f502055d Author: Fugang Duan Date: Wed Jun 16 17:14:25 2021 +0800 net: fec_ptp: add clock rate zero check Add clock rate zero check to fix coverity issue of "divide by 0". Fixes: commit 85bd1798b24a ("net: fec: fix spin_lock dead lock") Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 56b786d86694e079d8aad9b314e015cd4ac02a3d Author: Dongliang Mu Date: Wed Jun 16 10:48:33 2021 +0800 net: usb: fix possible use-after-free in smsc75xx_bind The commit 46a8b29c6306 ("net: usb: fix memory leak in smsc75xx_bind") fails to clean up the work scheduled in smsc75xx_reset-> smsc75xx_set_multicast, which leads to use-after-free if the work is scheduled to start after the deallocation. In addition, this patch also removes a dangling pointer - dev->data[0]. This patch calls cancel_work_sync to cancel the scheduled work and set the dangling pointer to NULL. Fixes: 46a8b29c6306 ("net: usb: fix memory leak in smsc75xx_bind") Signed-off-by: Dongliang Mu Signed-off-by: David S. Miller commit 8f269102baf788aecfcbbc6313b6bceb54c9b990 Author: Joakim Zhang Date: Wed Jun 16 17:10:24 2021 +0800 net: stmmac: disable clocks in stmmac_remove_config_dt() Platform drivers may call stmmac_probe_config_dt() to parse dt, could call stmmac_remove_config_dt() in error handing after dt parsed, so need disable clocks in stmmac_remove_config_dt(). Go through all platforms drivers which use stmmac_probe_config_dt(), none of them disable clocks manually, so it's safe to disable them in stmmac_remove_config_dt(). Fixes: commit d2ed0a7755fe ("net: ethernet: stmmac: fix of-node and fixed-link-phydev leaks") Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 70585216fe7730d9fb5453d3e2804e149d0fe201 Merge: 6b00bc639f1f2 ccbd6283a9b64 Author: Linus Torvalds Date: Wed Jun 16 09:40:28 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "18 patches. Subsystems affected by this patch series: mm (memory-failure, swap, slub, hugetlb, memory-failure, slub, thp, sparsemem), and coredump" * emailed patches from Andrew Morton : mm/sparse: fix check_usemap_section_nr warnings mm: thp: replace DEBUG_VM BUG with VM_WARN when unmap fails for split mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page() mm/thp: fix page_address_in_vma() on file THP tails mm/thp: fix vma_address() if virtual address below file offset mm/thp: try_to_unmap() use TTU_SYNC for safe splitting mm/thp: make is_huge_zero_pmd() safe and quicker mm/thp: fix __split_huge_pmd_locked() on shmem migration entry mm, thp: use head page in __migration_entry_wait() mm/slub.c: include swab.h crash_core, vmcoreinfo: append 'SECTION_SIZE_BITS' to vmcoreinfo mm/memory-failure: make sure wait for page writeback in memory_failure mm/hugetlb: expand restore_reserve_on_error functionality mm/slub: actually fix freelist pointer vs redzoning mm/slub: fix redzoning for small allocations mm/slub: clarify verification reporting mm/swap: fix pte_same_as_swp() not removing uffd-wp bit when compare mm,hwpoison: fix race with hugetlb page allocation commit ccbd6283a9b640c8d5c2b44db318fd72a63338ff Author: Miles Chen Date: Tue Jun 15 18:24:10 2021 -0700 mm/sparse: fix check_usemap_section_nr warnings I see a "virt_to_phys used for non-linear address" warning from check_usemap_section_nr() on arm64 platforms. In current implementation of NODE_DATA, if CONFIG_NEED_MULTIPLE_NODES=y, pglist_data is dynamically allocated and assigned to node_data[]. For example, in arch/arm64/include/asm/mmzone.h: extern struct pglist_data *node_data[]; #define NODE_DATA(nid) (node_data[(nid)]) If CONFIG_NEED_MULTIPLE_NODES=n, pglist_data is defined as a global variable named "contig_page_data". For example, in include/linux/mmzone.h: extern struct pglist_data contig_page_data; #define NODE_DATA(nid) (&contig_page_data) If CONFIG_DEBUG_VIRTUAL is not enabled, __pa() can handle both dynamically allocated linear addresses and symbol addresses. However, if (CONFIG_DEBUG_VIRTUAL=y && CONFIG_NEED_MULTIPLE_NODES=n) we can see the "virt_to_phys used for non-linear address" warning because that &contig_page_data is not a linear address on arm64. Warning message: virt_to_phys used for non-linear address: (contig_page_data+0x0/0x1c00) WARNING: CPU: 0 PID: 0 at arch/arm64/mm/physaddr.c:15 __virt_to_phys+0x58/0x68 Modules linked in: CPU: 0 PID: 0 Comm: swapper Tainted: G W 5.13.0-rc1-00074-g1140ab592e2e #3 Hardware name: linux,dummy-virt (DT) pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO BTYPE=--) Call trace: __virt_to_phys+0x58/0x68 check_usemap_section_nr+0x50/0xfc sparse_init_nid+0x1ac/0x28c sparse_init+0x1c4/0x1e0 bootmem_init+0x60/0x90 setup_arch+0x184/0x1f0 start_kernel+0x78/0x488 To fix it, create a small function to handle both translation. Link: https://lkml.kernel.org/r/1623058729-27264-1-git-send-email-miles.chen@mediatek.com Signed-off-by: Miles Chen Cc: Mike Rapoport Cc: Baoquan He Cc: Kazu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 504e070dc08f757bccaed6d05c0f53ecbfac8a23 Author: Yang Shi Date: Tue Jun 15 18:24:07 2021 -0700 mm: thp: replace DEBUG_VM BUG with VM_WARN when unmap fails for split When debugging the bug reported by Wang Yugui [1], try_to_unmap() may fail, but the first VM_BUG_ON_PAGE() just checks page_mapcount() however it may miss the failure when head page is unmapped but other subpage is mapped. Then the second DEBUG_VM BUG() that check total mapcount would catch it. This may incur some confusion. As this is not a fatal issue, so consolidate the two DEBUG_VM checks into one VM_WARN_ON_ONCE_PAGE(). [1] https://lore.kernel.org/linux-mm/20210412180659.B9E3.409509F4@e16-tech.com/ Link: https://lkml.kernel.org/r/d0f0db68-98b8-ebfb-16dc-f29df24cf012@google.com Signed-off-by: Yang Shi Reviewed-by: Zi Yan Acked-by: Kirill A. Shutemov Signed-off-by: Hugh Dickins Cc: Alistair Popple Cc: Jan Kara Cc: Jue Wang Cc: "Matthew Wilcox (Oracle)" Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Cc: Wang Yugui Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22061a1ffabdb9c3385de159c5db7aac3a4df1cc Author: Hugh Dickins Date: Tue Jun 15 18:24:03 2021 -0700 mm/thp: unmap_mapping_page() to fix THP truncate_cleanup_page() There is a race between THP unmapping and truncation, when truncate sees pmd_none() and skips the entry, after munmap's zap_huge_pmd() cleared it, but before its page_remove_rmap() gets to decrement compound_mapcount: generating false "BUG: Bad page cache" reports that the page is still mapped when deleted. This commit fixes that, but not in the way I hoped. The first attempt used try_to_unmap(page, TTU_SYNC|TTU_IGNORE_MLOCK) instead of unmap_mapping_range() in truncate_cleanup_page(): it has often been an annoyance that we usually call unmap_mapping_range() with no pages locked, but there apply it to a single locked page. try_to_unmap() looks more suitable for a single locked page. However, try_to_unmap_one() contains a VM_BUG_ON_PAGE(!pvmw.pte,page): it is used to insert THP migration entries, but not used to unmap THPs. Copy zap_huge_pmd() and add THP handling now? Perhaps, but their TLB needs are different, I'm too ignorant of the DAX cases, and couldn't decide how far to go for anon+swap. Set that aside. The second attempt took a different tack: make no change in truncate.c, but modify zap_huge_pmd() to insert an invalidated huge pmd instead of clearing it initially, then pmd_clear() between page_remove_rmap() and unlocking at the end. Nice. But powerpc blows that approach out of the water, with its serialize_against_pte_lookup(), and interesting pgtable usage. It would need serious help to get working on powerpc (with a minor optimization issue on s390 too). Set that aside. Just add an "if (page_mapped(page)) synchronize_rcu();" or other such delay, after unmapping in truncate_cleanup_page()? Perhaps, but though that's likely to reduce or eliminate the number of incidents, it would give less assurance of whether we had identified the problem correctly. This successful iteration introduces "unmap_mapping_page(page)" instead of try_to_unmap(), and goes the usual unmap_mapping_range_tree() route, with an addition to details. Then zap_pmd_range() watches for this case, and does spin_unlock(pmd_lock) if so - just like page_vma_mapped_walk() now does in the PVMW_SYNC case. Not pretty, but safe. Note that unmap_mapping_page() is doing a VM_BUG_ON(!PageLocked) to assert its interface; but currently that's only used to make sure that page->mapping is stable, and zap_pmd_range() doesn't care if the page is locked or not. Along these lines, in invalidate_inode_pages2_range() move the initial unmap_mapping_range() out from under page lock, before then calling unmap_mapping_page() under page lock if still mapped. Link: https://lkml.kernel.org/r/a2a4a148-cdd8-942c-4ef8-51b77f643dbe@google.com Fixes: fc127da085c2 ("truncate: handle file thp") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Reviewed-by: Yang Shi Cc: Alistair Popple Cc: Jan Kara Cc: Jue Wang Cc: "Matthew Wilcox (Oracle)" Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Cc: Wang Yugui Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 31657170deaf1d8d2f6a1955fbc6fa9d228be036 Author: Jue Wang Date: Tue Jun 15 18:24:00 2021 -0700 mm/thp: fix page_address_in_vma() on file THP tails Anon THP tails were already supported, but memory-failure may need to use page_address_in_vma() on file THP tails, which its page->mapping check did not permit: fix it. hughd adds: no current usage is known to hit the issue, but this does fix a subtle trap in a general helper: best fixed in stable sooner than later. Link: https://lkml.kernel.org/r/a0d9b53-bf5d-8bab-ac5-759dc61819c1@google.com Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Signed-off-by: Jue Wang Signed-off-by: Hugh Dickins Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Yang Shi Acked-by: Kirill A. Shutemov Cc: Alistair Popple Cc: Jan Kara Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Cc: Wang Yugui Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 494334e43c16d63b878536a26505397fce6ff3a2 Author: Hugh Dickins Date: Tue Jun 15 18:23:56 2021 -0700 mm/thp: fix vma_address() if virtual address below file offset Running certain tests with a DEBUG_VM kernel would crash within hours, on the total_mapcount BUG() in split_huge_page_to_list(), while trying to free up some memory by punching a hole in a shmem huge page: split's try_to_unmap() was unable to find all the mappings of the page (which, on a !DEBUG_VM kernel, would then keep the huge page pinned in memory). When that BUG() was changed to a WARN(), it would later crash on the VM_BUG_ON_VMA(end < vma->vm_start || start >= vma->vm_end, vma) in mm/internal.h:vma_address(), used by rmap_walk_file() for try_to_unmap(). vma_address() is usually correct, but there's a wraparound case when the vm_start address is unusually low, but vm_pgoff not so low: vma_address() chooses max(start, vma->vm_start), but that decides on the wrong address, because start has become almost ULONG_MAX. Rewrite vma_address() to be more careful about vm_pgoff; move the VM_BUG_ON_VMA() out of it, returning -EFAULT for errors, so that it can be safely used from page_mapped_in_vma() and page_address_in_vma() too. Add vma_address_end() to apply similar care to end address calculation, in page_vma_mapped_walk() and page_mkclean_one() and try_to_unmap_one(); though it raises a question of whether callers would do better to supply pvmw->end to page_vma_mapped_walk() - I chose not, for a smaller patch. An irritation is that their apparent generality breaks down on KSM pages, which cannot be located by the page->index that page_to_pgoff() uses: as commit 4b0ece6fa016 ("mm: migrate: fix remove_migration_pte() for ksm pages") once discovered. I dithered over the best thing to do about that, and have ended up with a VM_BUG_ON_PAGE(PageKsm) in both vma_address() and vma_address_end(); though the only place in danger of using it on them was try_to_unmap_one(). Sidenote: vma_address() and vma_address_end() now use compound_nr() on a head page, instead of thp_size(): to make the right calculation on a hugetlbfs page, whether or not THPs are configured. try_to_unmap() is used on hugetlbfs pages, but perhaps the wrong calculation never mattered. Link: https://lkml.kernel.org/r/caf1c1a3-7cfb-7f8f-1beb-ba816e932825@google.com Fixes: a8fa41ad2f6f ("mm, rmap: check all VMAs that PTE-mapped THP can be part of") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Cc: Alistair Popple Cc: Jan Kara Cc: Jue Wang Cc: "Matthew Wilcox (Oracle)" Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Cc: Wang Yugui Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 732ed55823fc3ad998d43b86bf771887bcc5ec67 Author: Hugh Dickins Date: Tue Jun 15 18:23:53 2021 -0700 mm/thp: try_to_unmap() use TTU_SYNC for safe splitting Stressing huge tmpfs often crashed on unmap_page()'s VM_BUG_ON_PAGE (!unmap_success): with dump_page() showing mapcount:1, but then its raw struct page output showing _mapcount ffffffff i.e. mapcount 0. And even if that particular VM_BUG_ON_PAGE(!unmap_success) is removed, it is immediately followed by a VM_BUG_ON_PAGE(compound_mapcount(head)), and further down an IS_ENABLED(CONFIG_DEBUG_VM) total_mapcount BUG(): all indicative of some mapcount difficulty in development here perhaps. But the !CONFIG_DEBUG_VM path handles the failures correctly and silently. I believe the problem is that once a racing unmap has cleared pte or pmd, try_to_unmap_one() may skip taking the page table lock, and emerge from try_to_unmap() before the racing task has reached decrementing mapcount. Instead of abandoning the unsafe VM_BUG_ON_PAGE(), and the ones that follow, use PVMW_SYNC in try_to_unmap_one() in this case: adding TTU_SYNC to the options, and passing that from unmap_page(). When CONFIG_DEBUG_VM, or for non-debug too? Consensus is to do the same for both: the slight overhead added should rarely matter, except perhaps if splitting sparsely-populated multiply-mapped shmem. Once confident that bugs are fixed, TTU_SYNC here can be removed, and the race tolerated. Link: https://lkml.kernel.org/r/c1e95853-8bcd-d8fd-55fa-e7f2488e78f@google.com Fixes: fec89c109f3a ("thp: rewrite freeze_page()/unfreeze_page() with generic rmap walkers") Signed-off-by: Hugh Dickins Cc: Alistair Popple Cc: Jan Kara Cc: Jue Wang Cc: Kirill A. Shutemov Cc: "Matthew Wilcox (Oracle)" Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Cc: Wang Yugui Cc: Yang Shi Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b77e8c8cde581dadab9a0f1543a347e24315f11 Author: Hugh Dickins Date: Tue Jun 15 18:23:49 2021 -0700 mm/thp: make is_huge_zero_pmd() safe and quicker Most callers of is_huge_zero_pmd() supply a pmd already verified present; but a few (notably zap_huge_pmd()) do not - it might be a pmd migration entry, in which the pfn is encoded differently from a present pmd: which might pass the is_huge_zero_pmd() test (though not on x86, since L1TF forced us to protect against that); or perhaps even crash in pmd_page() applied to a swap-like entry. Make it safe by adding pmd_present() check into is_huge_zero_pmd() itself; and make it quicker by saving huge_zero_pfn, so that is_huge_zero_pmd() will not need to do that pmd_page() lookup each time. __split_huge_pmd_locked() checked pmd_trans_huge() before: that worked, but is unnecessary now that is_huge_zero_pmd() checks present. Link: https://lkml.kernel.org/r/21ea9ca-a1f5-8b90-5e88-95fb1c49bbfa@google.com Fixes: e71769ae5260 ("mm: enable thp migration for shmem thp") Signed-off-by: Hugh Dickins Acked-by: Kirill A. Shutemov Reviewed-by: Yang Shi Cc: Alistair Popple Cc: Jan Kara Cc: Jue Wang Cc: "Matthew Wilcox (Oracle)" Cc: Miaohe Lin Cc: Minchan Kim Cc: Naoya Horiguchi Cc: Oscar Salvador Cc: Peter Xu Cc: Ralph Campbell Cc: Shakeel Butt Cc: Wang Yugui Cc: Zi Yan Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99fa8a48203d62b3743d866fc48ef6abaee682be Author: Hugh Dickins Date: Tue Jun 15 18:23:45 2021 -0700 mm/thp: fix __split_huge_pmd_locked() on shmem migration entry Patch series "mm/thp: fix THP splitting unmap BUGs and related", v10. Here is v2 batch of long-standing THP bug fixes that I had not got around to sending before, but prompted now by Wang Yugui's report https://lore.kernel.org/linux-mm/20210412180659.B9E3.409509F4@e16-tech.com/ Wang Yugui has tested a rollup of these fixes applied to 5.10.39, and they have done no harm, but have *not* fixed that issue: something more is needed and I have no idea of what. This patch (of 7): Stressing huge tmpfs page migration racing hole punch often crashed on the VM_BUG_ON(!pmd_present) in pmdp_huge_clear_flush(), with DEBUG_VM=y kernel; or shortly afterwards, on a bad dereference in __split_huge_pmd_locked() when DEBUG_VM=n. They forgot to allow for pmd migration entries in the non-anonymous case. Full disclosure: those particular experiments were on a kernel with more relaxed mmap_lock and i_mmap_rwsem locking, and were not repeated on the vanilla kernel: it is conceivable that stricter locking happens to avoid those cases, or makes them less likely; but __split_huge_pmd_locked() already allowed for pmd migration entries when handling anonymous THPs, so this commit brings the shmem and file THP handling into line. And while there: use old_pmd rather than _pmd, as in the following blocks; and make it clearer to the eye that the !vma_is_anonymous() block is self-contained, making an early return after accounting for unmapping. Link: https://lkml.kernel.org/r/af88612-1473-2eaa-903-8d1a448b26@google.com Link: https://lkml.kernel.org/r/dd221a99-efb3-cd1d-6256-7e646af29314@google.com Fixes: e71769ae5260 ("mm: enable thp migration for shmem thp") Signed-off-by: Hugh Dickins Cc: Kirill A. Shutemov Cc: Yang Shi Cc: Wang Yugui Cc: "Matthew Wilcox (Oracle)" Cc: Naoya Horiguchi Cc: Alistair Popple Cc: Ralph Campbell Cc: Zi Yan Cc: Miaohe Lin Cc: Minchan Kim Cc: Jue Wang Cc: Peter Xu Cc: Jan Kara Cc: Shakeel Butt Cc: Oscar Salvador Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ffc90cbb2970ab88b66ea51dd580469eede57b67 Author: Xu Yu Date: Tue Jun 15 18:23:42 2021 -0700 mm, thp: use head page in __migration_entry_wait() We notice that hung task happens in a corner but practical scenario when CONFIG_PREEMPT_NONE is enabled, as follows. Process 0 Process 1 Process 2..Inf split_huge_page_to_list unmap_page split_huge_pmd_address __migration_entry_wait(head) __migration_entry_wait(tail) remap_page (roll back) remove_migration_ptes rmap_walk_anon cond_resched Where __migration_entry_wait(tail) is occurred in kernel space, e.g., copy_to_user in fstat, which will immediately fault again without rescheduling, and thus occupy the cpu fully. When there are too many processes performing __migration_entry_wait on tail page, remap_page will never be done after cond_resched. This makes __migration_entry_wait operate on the compound head page, thus waits for remap_page to complete, whether the THP is split successfully or roll back. Note that put_and_wait_on_page_locked helps to drop the page reference acquired with get_page_unless_zero, as soon as the page is on the wait queue, before actually waiting. So splitting the THP is only prevented for a brief interval. Link: https://lkml.kernel.org/r/b9836c1dd522e903891760af9f0c86a2cce987eb.1623144009.git.xuyu@linux.alibaba.com Fixes: ba98828088ad ("thp: add option to setup migration entries during PMD split") Suggested-by: Hugh Dickins Signed-off-by: Gang Deng Signed-off-by: Xu Yu Acked-by: Kirill A. Shutemov Acked-by: Hugh Dickins Cc: Matthew Wilcox Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1b3865d016815cbd69a1879ca1c8a8901fda1072 Author: Andrew Morton Date: Tue Jun 15 18:23:39 2021 -0700 mm/slub.c: include swab.h Fixes build with CONFIG_SLAB_FREELIST_HARDENED=y. Hopefully. But it's the right thing to do anwyay. Fixes: 1ad53d9fa3f61 ("slub: improve bit diffusion for freelist ptr obfuscation") Link: https://bugzilla.kernel.org/show_bug.cgi?id=213417 Reported-by: Acked-by: Kees Cook Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4f5aecdff25f59fb5ea456d5152a913906ecf287 Author: Pingfan Liu Date: Tue Jun 15 18:23:36 2021 -0700 crash_core, vmcoreinfo: append 'SECTION_SIZE_BITS' to vmcoreinfo As mentioned in kernel commit 1d50e5d0c505 ("crash_core, vmcoreinfo: Append 'MAX_PHYSMEM_BITS' to vmcoreinfo"), SECTION_SIZE_BITS in the formula: #define SECTIONS_SHIFT (MAX_PHYSMEM_BITS - SECTION_SIZE_BITS) Besides SECTIONS_SHIFT, SECTION_SIZE_BITS is also used to calculate PAGES_PER_SECTION in makedumpfile just like kernel. Unfortunately, this arch-dependent macro SECTION_SIZE_BITS changes, e.g. recently in kernel commit f0b13ee23241 ("arm64/sparsemem: reduce SECTION_SIZE_BITS"). But user space wants a stable interface to get this info. Such info is impossible to be deduced from a crashdump vmcore. Hence append SECTION_SIZE_BITS to vmcoreinfo. Link: https://lkml.kernel.org/r/20210608103359.84907-1-kernelfans@gmail.com Link: http://lists.infradead.org/pipermail/kexec/2021-June/022676.html Signed-off-by: Pingfan Liu Acked-by: Baoquan He Cc: Bhupesh Sharma Cc: Kazuhito Hagio Cc: Dave Young Cc: Boris Petkov Cc: Ingo Molnar Cc: Thomas Gleixner Cc: James Morse Cc: Mark Rutland Cc: Will Deacon Cc: Catalin Marinas Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Dave Anderson Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8675d291ac007e1c636870db880f837a9ea112a Author: yangerkun Date: Tue Jun 15 18:23:32 2021 -0700 mm/memory-failure: make sure wait for page writeback in memory_failure Our syzkaller trigger the "BUG_ON(!list_empty(&inode->i_wb_list))" in clear_inode: kernel BUG at fs/inode.c:519! Internal error: Oops - BUG: 0 [#1] SMP Modules linked in: Process syz-executor.0 (pid: 249, stack limit = 0x00000000a12409d7) CPU: 1 PID: 249 Comm: syz-executor.0 Not tainted 4.19.95 Hardware name: linux,dummy-virt (DT) pstate: 80000005 (Nzcv daif -PAN -UAO) pc : clear_inode+0x280/0x2a8 lr : clear_inode+0x280/0x2a8 Call trace: clear_inode+0x280/0x2a8 ext4_clear_inode+0x38/0xe8 ext4_free_inode+0x130/0xc68 ext4_evict_inode+0xb20/0xcb8 evict+0x1a8/0x3c0 iput+0x344/0x460 do_unlinkat+0x260/0x410 __arm64_sys_unlinkat+0x6c/0xc0 el0_svc_common+0xdc/0x3b0 el0_svc_handler+0xf8/0x160 el0_svc+0x10/0x218 Kernel panic - not syncing: Fatal exception A crash dump of this problem show that someone called __munlock_pagevec to clear page LRU without lock_page: do_mmap -> mmap_region -> do_munmap -> munlock_vma_pages_range -> __munlock_pagevec. As a result memory_failure will call identify_page_state without wait_on_page_writeback. And after truncate_error_page clear the mapping of this page. end_page_writeback won't call sb_clear_inode_writeback to clear inode->i_wb_list. That will trigger BUG_ON in clear_inode! Fix it by checking PageWriteback too to help determine should we skip wait_on_page_writeback. Link: https://lkml.kernel.org/r/20210604084705.3729204-1-yangerkun@huawei.com Fixes: 0bc1f8b0682c ("hwpoison: fix the handling path of the victimized page frame that belong to non-LRU") Signed-off-by: yangerkun Acked-by: Naoya Horiguchi Cc: Jan Kara Cc: Theodore Ts'o Cc: Oscar Salvador Cc: Yu Kuai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 846be08578edb81f02bc8534577e6c367ef34f41 Author: Mike Kravetz Date: Tue Jun 15 18:23:29 2021 -0700 mm/hugetlb: expand restore_reserve_on_error functionality The routine restore_reserve_on_error is called to restore reservation information when an error occurs after page allocation. The routine alloc_huge_page modifies the mapping reserve map and potentially the reserve count during allocation. If code calling alloc_huge_page encounters an error after allocation and needs to free the page, the reservation information needs to be adjusted. Currently, restore_reserve_on_error only takes action on pages for which the reserve count was adjusted(HPageRestoreReserve flag). There is nothing wrong with these adjustments. However, alloc_huge_page ALWAYS modifies the reserve map during allocation even if the reserve count is not adjusted. This can cause issues as observed during development of this patch [1]. One specific series of operations causing an issue is: - Create a shared hugetlb mapping Reservations for all pages created by default - Fault in a page in the mapping Reservation exists so reservation count is decremented - Punch a hole in the file/mapping at index previously faulted Reservation and any associated pages will be removed - Allocate a page to fill the hole No reservation entry, so reserve count unmodified Reservation entry added to map by alloc_huge_page - Error after allocation and before instantiating the page Reservation entry remains in map - Allocate a page to fill the hole Reservation entry exists, so decrement reservation count This will cause a reservation count underflow as the reservation count was decremented twice for the same index. A user would observe a very large number for HugePages_Rsvd in /proc/meminfo. This would also likely cause subsequent allocations of hugetlb pages to fail as it would 'appear' that all pages are reserved. This sequence of operations is unlikely to happen, however they were easily reproduced and observed using hacked up code as described in [1]. Address the issue by having the routine restore_reserve_on_error take action on pages where HPageRestoreReserve is not set. In this case, we need to remove any reserve map entry created by alloc_huge_page. A new helper routine vma_del_reservation assists with this operation. There are three callers of alloc_huge_page which do not currently call restore_reserve_on error before freeing a page on error paths. Add those missing calls. [1] https://lore.kernel.org/linux-mm/20210528005029.88088-1-almasrymina@google.com/ Link: https://lkml.kernel.org/r/20210607204510.22617-1-mike.kravetz@oracle.com Fixes: 96b96a96ddee ("mm/hugetlb: fix huge page reservation leak in private mapping error paths" Signed-off-by: Mike Kravetz Reviewed-by: Mina Almasry Cc: Axel Rasmussen Cc: Peter Xu Cc: Muchun Song Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e41a49fadbc80b60b48d3c095d9e2ee7ef7c9a8e Author: Kees Cook Date: Tue Jun 15 18:23:26 2021 -0700 mm/slub: actually fix freelist pointer vs redzoning It turns out that SLUB redzoning ("slub_debug=Z") checks from s->object_size rather than from s->inuse (which is normally bumped to make room for the freelist pointer), so a cache created with an object size less than 24 would have the freelist pointer written beyond s->object_size, causing the redzone to be corrupted by the freelist pointer. This was very visible with "slub_debug=ZF": BUG test (Tainted: G B ): Right Redzone overwritten ----------------------------------------------------------------------------- INFO: 0xffff957ead1c05de-0xffff957ead1c05df @offset=1502. First byte 0x1a instead of 0xbb INFO: Slab 0xffffef3950b47000 objects=170 used=170 fp=0x0000000000000000 flags=0x8000000000000200 INFO: Object 0xffff957ead1c05d8 @offset=1496 fp=0xffff957ead1c0620 Redzone (____ptrval____): bb bb bb bb bb bb bb bb ........ Object (____ptrval____): 00 00 00 00 00 f6 f4 a5 ........ Redzone (____ptrval____): 40 1d e8 1a aa @.... Padding (____ptrval____): 00 00 00 00 00 00 00 00 ........ Adjust the offset to stay within s->object_size. (Note that no caches of in this size range are known to exist in the kernel currently.) Link: https://lkml.kernel.org/r/20210608183955.280836-4-keescook@chromium.org Link: https://lore.kernel.org/linux-mm/20200807160627.GA1420741@elver.google.com/ Link: https://lore.kernel.org/lkml/0f7dd7b2-7496-5e2d-9488-2ec9f8e90441@suse.cz/Fixes: 89b83f282d8b (slub: avoid redzone when choosing freepointer location) Link: https://lore.kernel.org/lkml/CANpmjNOwZ5VpKQn+SYWovTkFB4VsT-RPwyENBmaK0dLcpqStkA@mail.gmail.com Signed-off-by: Kees Cook Reported-by: Marco Elver Reported-by: "Lin, Zhenpeng" Tested-by: Marco Elver Acked-by: Vlastimil Babka Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: Pekka Enberg Cc: Roman Gushchin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74c1d3e081533825f2611e46edea1fcdc0701985 Author: Kees Cook Date: Tue Jun 15 18:23:22 2021 -0700 mm/slub: fix redzoning for small allocations The redzone area for SLUB exists between s->object_size and s->inuse (which is at least the word-aligned object_size). If a cache were created with an object_size smaller than sizeof(void *), the in-object stored freelist pointer would overwrite the redzone (e.g. with boot param "slub_debug=ZF"): BUG test (Tainted: G B ): Right Redzone overwritten ----------------------------------------------------------------------------- INFO: 0xffff957ead1c05de-0xffff957ead1c05df @offset=1502. First byte 0x1a instead of 0xbb INFO: Slab 0xffffef3950b47000 objects=170 used=170 fp=0x0000000000000000 flags=0x8000000000000200 INFO: Object 0xffff957ead1c05d8 @offset=1496 fp=0xffff957ead1c0620 Redzone (____ptrval____): bb bb bb bb bb bb bb bb ........ Object (____ptrval____): f6 f4 a5 40 1d e8 ...@.. Redzone (____ptrval____): 1a aa .. Padding (____ptrval____): 00 00 00 00 00 00 00 00 ........ Store the freelist pointer out of line when object_size is smaller than sizeof(void *) and redzoning is enabled. Additionally remove the "smaller than sizeof(void *)" check under CONFIG_DEBUG_VM in kmem_cache_sanity_check() as it is now redundant: SLAB and SLOB both handle small sizes. (Note that no caches within this size range are known to exist in the kernel currently.) Link: https://lkml.kernel.org/r/20210608183955.280836-3-keescook@chromium.org Fixes: 81819f0fc828 ("SLUB core") Signed-off-by: Kees Cook Acked-by: Vlastimil Babka Cc: Christoph Lameter Cc: David Rientjes Cc: Joonsoo Kim Cc: "Lin, Zhenpeng" Cc: Marco Elver Cc: Pekka Enberg Cc: Roman Gushchin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8669dbab2ae56085c128894b181c2aa50f97e368 Author: Kees Cook Date: Tue Jun 15 18:23:19 2021 -0700 mm/slub: clarify verification reporting Patch series "Actually fix freelist pointer vs redzoning", v4. This fixes redzoning vs the freelist pointer (both for middle-position and very small caches). Both are "theoretical" fixes, in that I see no evidence of such small-sized caches actually be used in the kernel, but that's no reason to let the bugs continue to exist, especially since people doing local development keep tripping over it. :) This patch (of 3): Instead of repeating "Redzone" and "Poison", clarify which sides of those zones got tripped. Additionally fix column alignment in the trailer. Before: BUG test (Tainted: G B ): Redzone overwritten ... Redzone (____ptrval____): bb bb bb bb bb bb bb bb ........ Object (____ptrval____): f6 f4 a5 40 1d e8 ...@.. Redzone (____ptrval____): 1a aa .. Padding (____ptrval____): 00 00 00 00 00 00 00 00 ........ After: BUG test (Tainted: G B ): Right Redzone overwritten ... Redzone (____ptrval____): bb bb bb bb bb bb bb bb ........ Object (____ptrval____): f6 f4 a5 40 1d e8 ...@.. Redzone (____ptrval____): 1a aa .. Padding (____ptrval____): 00 00 00 00 00 00 00 00 ........ The earlier commits that slowly resulted in the "Before" reporting were: d86bd1bece6f ("mm/slub: support left redzone") ffc79d288000 ("slub: use print_hex_dump") 2492268472e7 ("SLUB: change error reporting format to follow lockdep loosely") Link: https://lkml.kernel.org/r/20210608183955.280836-1-keescook@chromium.org Link: https://lkml.kernel.org/r/20210608183955.280836-2-keescook@chromium.org Link: https://lore.kernel.org/lkml/cfdb11d7-fb8e-e578-c939-f7f5fb69a6bd@suse.cz/ Signed-off-by: Kees Cook Acked-by: Vlastimil Babka Cc: Marco Elver Cc: "Lin, Zhenpeng" Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Roman Gushchin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 099dd6878b9b12d6bbfa6bf29ce0c8ddd38f6901 Author: Peter Xu Date: Tue Jun 15 18:23:16 2021 -0700 mm/swap: fix pte_same_as_swp() not removing uffd-wp bit when compare I found it by pure code review, that pte_same_as_swp() of unuse_vma() didn't take uffd-wp bit into account when comparing ptes. pte_same_as_swp() returning false negative could cause failure to swapoff swap ptes that was wr-protected by userfaultfd. Link: https://lkml.kernel.org/r/20210603180546.9083-1-peterx@redhat.com Fixes: f45ec5ff16a7 ("userfaultfd: wp: support swap and page migration") Signed-off-by: Peter Xu Acked-by: Hugh Dickins Cc: Andrea Arcangeli Cc: [5.7+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 25182f05ffed0b45602438693e4eed5d7f3ebadd Author: Naoya Horiguchi Date: Tue Jun 15 18:23:13 2021 -0700 mm,hwpoison: fix race with hugetlb page allocation When hugetlb page fault (under overcommitting situation) and memory_failure() race, VM_BUG_ON_PAGE() is triggered by the following race: CPU0: CPU1: gather_surplus_pages() page = alloc_surplus_huge_page() memory_failure_hugetlb() get_hwpoison_page(page) __get_hwpoison_page(page) get_page_unless_zero(page) zero = put_page_testzero(page) VM_BUG_ON_PAGE(!zero, page) enqueue_huge_page(h, page) put_page(page) __get_hwpoison_page() only checks the page refcount before taking an additional one for memory error handling, which is not enough because there's a time window where compound pages have non-zero refcount during hugetlb page initialization. So make __get_hwpoison_page() check page status a bit more for hugetlb pages with get_hwpoison_huge_page(). Checking hugetlb-specific flags under hugetlb_lock makes sure that the hugetlb page is not transitive. It's notable that another new function, HWPoisonHandlable(), is helpful to prevent a race against other transitive page states (like a generic compound page just before PageHuge becomes true). Link: https://lkml.kernel.org/r/20210603233632.2964832-2-nao.horiguchi@gmail.com Fixes: ead07f6a867b ("mm/memory-failure: introduce get_hwpoison_page() for consistent refcount handling") Signed-off-by: Naoya Horiguchi Reported-by: Muchun Song Acked-by: Mike Kravetz Cc: Oscar Salvador Cc: Michal Hocko Cc: Tony Luck Cc: [5.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6b00bc639f1f2beeff3595e1bab9faaa51d23b01 Merge: cc9aaa2b07b94 9041575348b21 Author: Linus Torvalds Date: Wed Jun 16 09:03:52 2021 -0700 Merge tag 'dmaengine-fix-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine fixes from Vinod Koul: "A bunch of driver fixes, notably: - More idxd fixes for driver unregister, error handling and bus assignment - HAS_IOMEM depends fix for few drivers - lock fix in pl330 driver - xilinx drivers fixes for initialize registers, missing dependencies and limiting descriptor IDs - mediatek descriptor management fixes" * tag 'dmaengine-fix-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma dmaengine: mediatek: do not issue a new desc if one is still current dmaengine: mediatek: free the proper desc in desc_free handler dmaengine: ipu: fix doc warning in ipu_irq.c dmaengine: rcar-dmac: Fix PM reference leak in rcar_dmac_probe() dmaengine: idxd: Fix missing error code in idxd_cdev_open() dmaengine: stedma40: add missing iounmap() on error in d40_probe() dmaengine: SF_PDMA depends on HAS_IOMEM dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM dmaengine: ALTERA_MSGDMA depends on HAS_IOMEM dmaengine: idxd: Add missing cleanup for early error out in probe call dmaengine: xilinx: dpdma: Limit descriptor IDs to 16 bits dmaengine: xilinx: dpdma: Add missing dependencies to Kconfig dmaengine: stm32-mdma: fix PM reference leak in stm32_mdma_alloc_chan_resourc() dmaengine: zynqmp_dma: Fix PM reference leak in zynqmp_dma_alloc_chan_resourc() dmaengine: xilinx: dpdma: initialize registers before request_irq dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc dmaengine: fsl-dpaa2-qdma: Fix error return code in two functions dmaengine: idxd: add missing dsa driver unregister dmaengine: idxd: add engine 'struct device' missing bus type assignment commit cc9aaa2b07b948b036c8a3c48bd73fd700b5a139 Merge: 94f0b2d4a1d0c 0236526d76b87 Author: Linus Torvalds Date: Wed Jun 16 08:57:44 2021 -0700 Merge tag 'clang-features-v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull clang LTO fix from Kees Cook: "It seems Clang has been scrubbing through the missing LTO IR flags for Clang 13, and the last of these 'only with LTO' flags is fixed now. I've asked that they please consider making these changes in a less 'break all the Clang kernel builds' kind of way in the future. :P Summary: - The '-warn-stack-size' option under LTO has moved in Clang 13 (Tor Vic)" * tag 'clang-features-v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: Makefile: lto: Pass -warn-stack-size only on LLD < 13.0.0 commit 9984d6664ce9dcbbc713962539eaf7636ea246c2 Author: Maxime Ripard Date: Tue May 25 11:10:59 2021 +0200 drm/vc4: hdmi: Make sure the controller is powered in detect If the HPD GPIO is not available and drm_probe_ddc fails, we end up reading the HDMI_HOTPLUG register, but the controller might be powered off resulting in a CPU hang. Make sure we have the power domain and the HSM clock powered during the detect cycle to prevent the hang from happening. Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver") Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210525091059.234116-4-maxime@cerno.tech commit 411efa18e4b03840553ff58ad9b4621b82a30c04 Author: Maxime Ripard Date: Tue May 25 11:10:58 2021 +0200 drm/vc4: hdmi: Move the HSM clock enable to runtime_pm In order to access the HDMI controller, we need to make sure the HSM clock is enabled. If we were to access it with the clock disabled, the CPU would completely hang, resulting in an hard crash. Since we have different code path that would require it, let's move that clock enable / disable to runtime_pm that will take care of the reference counting for us. Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver") Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Link: https://patchwork.freedesktop.org/patch/msgid/20210525091059.234116-3-maxime@cerno.tech commit 91c02557174be7f72e46ed7311e3bea1939840b0 Author: Pavel Skripkin Date: Thu Jun 10 00:58:33 2021 +0300 can: mcba_usb: fix memory leak in mcba_usb Syzbot reported memory leak in SocketCAN driver for Microchip CAN BUS Analyzer Tool. The problem was in unfreed usb_coherent. In mcba_usb_start() 20 coherent buffers are allocated and there is nothing, that frees them: 1) In callback function the urb is resubmitted and that's all 2) In disconnect function urbs are simply killed, but URB_FREE_BUFFER is not set (see mcba_usb_start) and this flag cannot be used with coherent buffers. Fail log: | [ 1354.053291][ T8413] mcba_usb 1-1:0.0 can0: device disconnected | [ 1367.059384][ T8420] kmemleak: 20 new suspected memory leaks (see /sys/kernel/debug/kmem) So, all allocated buffers should be freed with usb_free_coherent() explicitly NOTE: The same pattern for allocating and freeing coherent buffers is used in drivers/net/can/usb/kvaser_usb/kvaser_usb_core.c Fixes: 51f3baad7de9 ("can: mcba_usb: Add support for Microchip CAN BUS Analyzer") Link: https://lore.kernel.org/r/20210609215833.30393-1-paskripkin@gmail.com Cc: linux-stable Reported-and-tested-by: syzbot+57281c762a3922e14dfe@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Marc Kleine-Budde commit 5e87ddbe3942e27e939bdc02deb8579b0cbd8ecc Author: Norbert Slusarek Date: Sat Jun 12 22:18:54 2021 +0200 can: bcm: fix infoleak in struct bcm_msg_head On 64-bit systems, struct bcm_msg_head has an added padding of 4 bytes between struct members count and ival1. Even though all struct members are initialized, the 4-byte hole will contain data from the kernel stack. This patch zeroes out struct bcm_msg_head before usage, preventing infoleaks to userspace. Fixes: ffd980f976e7 ("[CAN]: Add broadcast manager (bcm) protocol") Link: https://lore.kernel.org/r/trinity-7c1b2e82-e34f-4885-8060-2cd7a13769ce-1623532166177@3c-app-gmx-bs52 Cc: linux-stable Signed-off-by: Norbert Slusarek Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit 8d0caedb759683041d9db82069937525999ada53 Author: Tetsuo Handa Date: Sat Jun 5 19:26:35 2021 +0900 can: bcm/raw/isotp: use per module netdevice notifier syzbot is reporting hung task at register_netdevice_notifier() [1] and unregister_netdevice_notifier() [2], for cleanup_net() might perform time consuming operations while CAN driver's raw/bcm/isotp modules are calling {register,unregister}_netdevice_notifier() on each socket. Change raw/bcm/isotp modules to call register_netdevice_notifier() from module's __init function and call unregister_netdevice_notifier() from module's __exit function, as with gw/j1939 modules are doing. Link: https://syzkaller.appspot.com/bug?id=391b9498827788b3cc6830226d4ff5be87107c30 [1] Link: https://syzkaller.appspot.com/bug?id=1724d278c83ca6e6df100a2e320c10d991cf2bce [2] Link: https://lore.kernel.org/r/54a5f451-05ed-f977-8534-79e7aa2bcc8f@i-love.sakura.ne.jp Cc: linux-stable Reported-by: syzbot Reported-by: syzbot Reviewed-by: Kirill Tkhai Tested-by: syzbot Tested-by: Oliver Hartkopp Signed-off-by: Tetsuo Handa Signed-off-by: Marc Kleine-Budde commit 2030043e616cab40f510299f09b636285e0a3678 Author: Oleksij Rempel Date: Fri May 21 13:57:20 2021 +0200 can: j1939: fix Use-after-Free, hold skb ref while in use This patch fixes a Use-after-Free found by the syzbot. The problem is that a skb is taken from the per-session skb queue, without incrementing the ref count. This leads to a Use-after-Free if the skb is taken concurrently from the session queue due to a CTS. Fixes: 9d71dd0c7009 ("can: add support of SAE J1939 protocol") Link: https://lore.kernel.org/r/20210521115720.7533-1-o.rempel@pengutronix.de Cc: Hillf Danton Cc: linux-stable Reported-by: syzbot+220c1a29987a9a490903@syzkaller.appspotmail.com Reported-by: syzbot+45199c1b73b4013525cf@syzkaller.appspotmail.com Signed-off-by: Oleksij Rempel Signed-off-by: Marc Kleine-Budde commit 6262e1b906a1ba12688ea6039453b4a088dbaf44 Author: Punit Agrawal Date: Tue Jun 15 08:56:35 2021 +0900 printk: Move EXPORT_SYMBOL() closer to vprintk definition Commit 28e1745b9fa2 ("printk: rename vprintk_func to vprintk") while improving readability by removing vprintk indirection, inadvertently placed the EXPORT_SYMBOL() for the newly renamed function at the end of the file. For reader sanity, and as is convention move the EXPORT_SYMBOL() declaration just after the end of the function. Fixes: 28e1745b9fa2 ("printk: rename vprintk_func to vprintk") Signed-off-by: Punit Agrawal Acked-by: Rasmus Villemoes Acked-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210614235635.887365-1-punitagrawal@gmail.com commit 60ed39db6e861f4a42dfa75f9b53f10093f6d672 Merge: 4bf584a03eec6 c6d580d96f140 Author: Greg Kroah-Hartman Date: Wed Jun 16 09:33:39 2021 +0200 Merge tag 'usb-v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: One bug fix for USB charger detection at imx7d and imx8m series SoCs * tag 'usb-v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: imx: Fix Battery Charger 1.2 CDP detection commit c6d580d96f140596d69220f60ce0cfbea4ee5c0f Author: Breno Lima Date: Mon Jun 14 13:50:13 2021 -0400 usb: chipidea: imx: Fix Battery Charger 1.2 CDP detection i.MX8MM cannot detect certain CDP USB HUBs. usbmisc_imx.c driver is not following CDP timing requirements defined by USB BC 1.2 specification and section 3.2.4 Detection Timing CDP. During Primary Detection the i.MX device should turn on VDP_SRC and IDM_SINK for a minimum of 40ms (TVDPSRC_ON). After a time of TVDPSRC_ON, the i.MX is allowed to check the status of the D- line. Current implementation is waiting between 1ms and 2ms, and certain BC 1.2 complaint USB HUBs cannot be detected. Increase delay to 40ms allowing enough time for primary detection. During secondary detection the i.MX is required to disable VDP_SRC and IDM_SNK, and enable VDM_SRC and IDP_SINK for at least 40ms (TVDMSRC_ON). Current implementation is not disabling VDP_SRC and IDM_SNK, introduce disable sequence in imx7d_charger_secondary_detection() function. VDM_SRC and IDP_SINK should be enabled for at least 40ms (TVDMSRC_ON). Increase delay allowing enough time for detection. Cc: Fixes: 746f316b753a ("usb: chipidea: introduce imx7d USB charger detection") Signed-off-by: Breno Lima Signed-off-by: Jun Li Link: https://lore.kernel.org/r/20210614175013.495808-1-breno.lima@nxp.com Signed-off-by: Peter Chen commit a4f0377db1254373513b992ff31a351a7111f0fd Merge: 7ea6cd16f1599 973377ffe8148 Author: David S. Miller Date: Tue Jun 15 15:26:07 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-06-15 The following pull-request contains BPF updates for your *net* tree. We've added 5 non-merge commits during the last 11 day(s) which contain a total of 10 files changed, 115 insertions(+), 16 deletions(-). The main changes are: 1) Fix marking incorrect umem ring as done in libbpf's xsk_socket__create_shared() helper, from Kev Jackson. 2) Fix oob leakage under a spectre v1 type confusion attack, from Daniel Borkmann. ==================== Signed-off-by: David S. Miller commit 7ea6cd16f1599c1eac6018751eadbc5fc736b99a Author: Aleksander Jan Bajkowski Date: Tue Jun 15 22:42:57 2021 +0200 lantiq: net: fix duplicated skb in rx descriptor ring The previous commit didn't fix the bug properly. By mistake, it replaces the pointer of the next skb in the descriptor ring instead of the current one. As a result, the two descriptors are assigned the same SKB. The error is seen during the iperf test when skb_put tries to insert a second packet and exceeds the available buffer. Fixes: c7718ee96dbc ("net: lantiq: fix memory corruption in RX ring ") Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: David S. Miller commit 057d49334c02a79af81c30a8d240e641bd6f1741 Author: Kristian Evensen Date: Tue Jun 15 12:01:51 2021 +0200 qmi_wwan: Do not call netif_rx from rx_fixup When the QMI_WWAN_FLAG_PASS_THROUGH is set, netif_rx() is called from qmi_wwan_rx_fixup(). When the call to netif_rx() is successful (which is most of the time), usbnet_skb_return() is called (from rx_process()). usbnet_skb_return() will then call netif_rx() a second time for the same skb. Simplify the code and avoid the redundant netif_rx() call by changing qmi_wwan_rx_fixup() to always return 1 when QMI_WWAN_FLAG_PASS_THROUGH is set. We then leave it up to the existing infrastructure to call netif_rx(). Suggested-by: Bjørn Mork Signed-off-by: Kristian Evensen Signed-off-by: David S. Miller commit c1a3d4067309451e68c33dbd356032549cc0bd8e Author: Maciej Żenczykowski Date: Tue Jun 15 01:05:49 2021 -0700 net: cdc_ncm: switch to eth%d interface naming This is meant to make the host side cdc_ncm interface consistently named just like the older CDC protocols: cdc_ether & cdc_ecm (and even rndis_host), which all use 'FLAG_ETHER | FLAG_POINTTOPOINT'. include/linux/usb/usbnet.h: #define FLAG_ETHER 0x0020 /* maybe use "eth%d" names */ #define FLAG_WLAN 0x0080 /* use "wlan%d" names */ #define FLAG_WWAN 0x0400 /* use "wwan%d" names */ #define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ drivers/net/usb/usbnet.c @ line 1711: strcpy (net->name, "usb%d"); ... // heuristic: "usb%d" for links we know are two-host, // else "eth%d" when there's reasonable doubt. userspace // can rename the link if it knows better. if ((dev->driver_info->flags & FLAG_ETHER) != 0 && ((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 || (net->dev_addr [0] & 0x02) == 0)) strcpy (net->name, "eth%d"); /* WLAN devices should always be named "wlan%d" */ if ((dev->driver_info->flags & FLAG_WLAN) != 0) strcpy(net->name, "wlan%d"); /* WWAN devices should always be named "wwan%d" */ if ((dev->driver_info->flags & FLAG_WWAN) != 0) strcpy(net->name, "wwan%d"); So by using ETHER | POINTTOPOINT the interface naming is either usb%d or eth%d based on the global uniqueness of the mac address of the device. Without this 2.5gbps ethernet dongles which all seem to use the cdc_ncm driver end up being called usb%d instead of eth%d even though they're definitely not two-host. (All 1gbps & 5gbps ethernet usb dongles I've tested don't hit this problem due to use of different drivers, primarily r8152 and aqc111) Fixes tag is based purely on git blame, and is really just here to make sure this hits LTS branches newer than v4.5. Cc: Lorenzo Colitti Fixes: 4d06dd537f95 ("cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind") Signed-off-by: Maciej Żenczykowski Signed-off-by: David S. Miller commit e34492dea68d4f09e9989e518fc76cd41909d707 Author: Changbin Du Date: Tue Jun 15 07:52:43 2021 +0800 net: inline function get_net_ns_by_fd if NET_NS is disabled The function get_net_ns_by_fd() could be inlined when NET_NS is not enabled. Signed-off-by: Changbin Du Signed-off-by: David S. Miller commit 475b92f932168a78da8109acd10bfb7578b8f2bb Author: Jakub Kicinski Date: Mon Jun 14 15:24:05 2021 -0700 ptp: improve max_adj check against unreasonable values Scaled PPM conversion to PPB may (on 64bit systems) result in a value larger than s32 can hold (freq/scaled_ppm is a long). This means the kernel will not correctly reject unreasonably high ->freq values (e.g. > 4294967295ppb, 281474976645 scaled PPM). The conversion is equivalent to a division by ~66 (65.536), so the value of ppb is always smaller than ppm, but not small enough to assume narrowing the type from long -> s32 is okay. Note that reasonable user space (e.g. ptp4l) will not use such high values, anyway, 4289046510ppb ~= 4.3x, so the fix is somewhat pedantic. Fixes: d39a743511cd ("ptp: validate the requested frequency adjustment.") Fixes: d94ba80ebbea ("ptp: Added a brand new class driver for ptp clocks.") Signed-off-by: Jakub Kicinski Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 94f0b2d4a1d0c52035aef425da5e022bd2cb1c71 Author: Linus Torvalds Date: Tue Jun 15 09:26:19 2021 -0700 proc: only require mm_struct for writing Commit 591a22c14d3f ("proc: Track /proc/$pid/attr/ opener mm_struct") we started using __mem_open() to track the mm_struct at open-time, so that we could then check it for writes. But that also ended up making the permission checks at open time much stricter - and not just for writes, but for reads too. And that in turn caused a regression for at least Fedora 29, where NIC interfaces fail to start when using NetworkManager. Since only the write side wanted the mm_struct test, ignore any failures by __mem_open() at open time, leaving reads unaffected. The write() time verification of the mm_struct pointer will then catch the failure case because a NULL pointer will not match a valid 'current->mm'. Link: https://lore.kernel.org/netdev/YMjTlp2FSJYvoyFa@unreal/ Fixes: 591a22c14d3f ("proc: Track /proc/$pid/attr/ opener mm_struct") Reported-and-tested-by: Leon Romanovsky Cc: Kees Cook Cc: Christian Brauner Cc: Andrea Righi Signed-off-by: Linus Torvalds commit 4692bc775d2180a937335ccba0edce557103d44a Author: Kai Huang Date: Tue Jun 15 22:16:39 2021 +1200 x86/sgx: Add missing xa_destroy() when virtual EPC is destroyed xa_destroy() needs to be called to destroy a virtual EPC's page array before calling kfree() to free the virtual EPC. Currently it is not called so add the missing xa_destroy(). Fixes: 540745ddbc70 ("x86/sgx: Introduce virtual EPC for use by KVM guests") Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Tested-by: Yang Zhong Link: https://lkml.kernel.org/r/20210615101639.291929-1-kai.huang@intel.com commit a33d62662d275cee22888fa7760fe09d5b9cd1f9 Author: Dan Carpenter Date: Tue Jun 15 08:39:52 2021 +0100 afs: Fix an IS_ERR() vs NULL check The proc_symlink() function returns NULL on error, it doesn't return error pointers. Fixes: 5b86d4ff5dce ("afs: Implement network namespacing") Signed-off-by: Dan Carpenter Signed-off-by: David Howells cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/YLjMRKX40pTrJvgf@mwanda/ Signed-off-by: Linus Torvalds commit 478036c4cd1a16e613a2f883d79c03cf187faacb Author: Michael Ellerman Date: Mon Jun 14 23:14:40 2021 +1000 powerpc: Fix initrd corruption with relative jump labels Commit b0b3b2c78ec0 ("powerpc: Switch to relative jump labels") switched us to using relative jump labels. That involves changing the code, target and key members in struct jump_entry to be relative to the address of the jump_entry, rather than absolute addresses. We have two static inlines that create a struct jump_entry, arch_static_branch() and arch_static_branch_jump(), as well as an asm macro ARCH_STATIC_BRANCH, which is used by the pseries-only hypervisor tracing code. Unfortunately we missed updating the key to be a relative reference in ARCH_STATIC_BRANCH. That causes a pseries kernel to have a handful of jump_entry structs with bad key values. Instead of being a relative reference they instead hold the full address of the key. However the code doesn't expect that, it still adds the key value to the address of the jump_entry (see jump_entry_key()) expecting to get a pointer to a key somewhere in kernel data. The table of jump_entry structs sits in rodata, which comes after the kernel text. In a typical build this will be somewhere around 15MB. The address of the key will be somewhere in data, typically around 20MB. Adding the two values together gets us a pointer somewhere around 45MB. We then call static_key_set_entries() with that bad pointer and modify some members of the struct static_key we think we are pointing at. A pseries kernel is typically ~30MB in size, so writing to ~45MB won't corrupt the kernel itself. However if we're booting with an initrd, depending on the size and exact location of the initrd, we can corrupt the initrd. Depending on how exactly we corrupt the initrd it can either cause the system to not boot, or just corrupt one of the files in the initrd. The fix is simply to make the key value relative to the jump_entry struct in the ARCH_STATIC_BRANCH macro. Fixes: b0b3b2c78ec0 ("powerpc: Switch to relative jump labels") Reported-by: Anastasia Kovaleva Reported-by: Roman Bolshakov Reported-by: Greg Kurz Reported-by: Daniel Axtens Signed-off-by: Michael Ellerman Tested-by: Daniel Axtens Tested-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210614131440.312360-1-mpe@ellerman.id.au commit 4bf584a03eec674975ee9fe36c8583d9d470dab1 Author: Peter Chen Date: Tue Jun 8 18:56:56 2021 +0800 usb: dwc3: core: fix kernel panic when do reboot When do system reboot, it calls dwc3_shutdown and the whole debugfs for dwc3 has removed first, when the gadget tries to do deinit, and remove debugfs for its endpoints, it meets NULL pointer dereference issue when call debugfs_lookup. Fix it by removing the whole dwc3 debugfs later than dwc3_drd_exit. [ 2924.958838] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000002 .... [ 2925.030994] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) [ 2925.037005] pc : inode_permission+0x2c/0x198 [ 2925.041281] lr : lookup_one_len_common+0xb0/0xf8 [ 2925.045903] sp : ffff80001276ba70 [ 2925.049218] x29: ffff80001276ba70 x28: ffff0000c01f0000 x27: 0000000000000000 [ 2925.056364] x26: ffff800011791e70 x25: 0000000000000008 x24: dead000000000100 [ 2925.063510] x23: dead000000000122 x22: 0000000000000000 x21: 0000000000000001 [ 2925.070652] x20: ffff8000122c6188 x19: 0000000000000000 x18: 0000000000000000 [ 2925.077797] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000004 [ 2925.084943] x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000000000030 [ 2925.092087] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f x9 : ffff8000102b2420 [ 2925.099232] x8 : 7f7f7f7f7f7f7f7f x7 : feff73746e2f6f64 x6 : 0000000000008080 [ 2925.106378] x5 : 61c8864680b583eb x4 : 209e6ec2d263dbb7 x3 : 000074756f307065 [ 2925.113523] x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffff8000122c6188 [ 2925.120671] Call trace: [ 2925.123119] inode_permission+0x2c/0x198 [ 2925.127042] lookup_one_len_common+0xb0/0xf8 [ 2925.131315] lookup_one_len_unlocked+0x34/0xb0 [ 2925.135764] lookup_positive_unlocked+0x14/0x50 [ 2925.140296] debugfs_lookup+0x68/0xa0 [ 2925.143964] dwc3_gadget_free_endpoints+0x84/0xb0 [ 2925.148675] dwc3_gadget_exit+0x28/0x78 [ 2925.152518] dwc3_drd_exit+0x100/0x1f8 [ 2925.156267] dwc3_remove+0x11c/0x120 [ 2925.159851] dwc3_shutdown+0x14/0x20 [ 2925.163432] platform_shutdown+0x28/0x38 [ 2925.167360] device_shutdown+0x15c/0x378 [ 2925.171291] kernel_restart_prepare+0x3c/0x48 [ 2925.175650] kernel_restart+0x1c/0x68 [ 2925.179316] __do_sys_reboot+0x218/0x240 [ 2925.183247] __arm64_sys_reboot+0x28/0x30 [ 2925.187262] invoke_syscall+0x48/0x100 [ 2925.191017] el0_svc_common.constprop.0+0x48/0xc8 [ 2925.195726] do_el0_svc+0x28/0x88 [ 2925.199045] el0_svc+0x20/0x30 [ 2925.202104] el0_sync_handler+0xa8/0xb0 [ 2925.205942] el0_sync+0x148/0x180 [ 2925.209270] Code: a9025bf5 2a0203f5 121f0056 370802b5 (79400660) [ 2925.215372] ---[ end trace 124254d8e485a58b ]--- [ 2925.220012] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 2925.227676] Kernel Offset: disabled [ 2925.231164] CPU features: 0x00001001,20000846 [ 2925.235521] Memory Limit: none [ 2925.238580] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- Fixes: 8d396bb0a5b6 ("usb: dwc3: debugfs: Add and remove endpoint dirs dynamically") Cc: Jack Pham Tested-by: Jack Pham Signed-off-by: Peter Chen Link: https://lore.kernel.org/r/20210608105656.10795-1-peter.chen@kernel.org (cherry picked from commit 2a042767814bd0edf2619f06fecd374e266ea068) Link: https://lore.kernel.org/r/20210615080847.GA10432@jackp-linux.qualcomm.com Signed-off-by: Greg Kroah-Hartman commit 8b1462b67f23da548f27b779a36b8ea75f5ef249 Author: Marcin Juszkiewicz Date: Mon Jun 14 17:37:12 2021 +0200 quota: finish disable quotactl_path syscall In commit 5b9fedb31e47 ("quota: Disable quotactl_path syscall") Jan Kara disabled quotactl_path syscall on several architectures. This commit disables it on all architectures using unified list of system calls: - arm64 - arc - csky - h8300 - hexagon - nds32 - nios2 - openrisc - riscv (32/64) CC: Jan Kara CC: Christian Brauner CC: Sascha Hauer Link: https://lore.kernel.org/lkml/20210512153621.n5u43jsytbik4yze@wittgenstein Link: https://lore.kernel.org/r/20210614153712.313707-1-marcin@juszkiewicz.com.pl Fixes: 5b9fedb31e47 ("quota: Disable quotactl_path syscall") Acked-by: Christian Brauner Signed-off-by: Marcin Juszkiewicz Signed-off-by: Jan Kara commit 0236526d76b87c1dc2cbe3eb31ae29be5b0ca151 Author: Tor Vic Date: Sun Jun 13 13:07:49 2021 +0000 Makefile: lto: Pass -warn-stack-size only on LLD < 13.0.0 Since LLVM commit fc018eb, the '-warn-stack-size' flag has been dropped [1], leading to the following error message when building with Clang-13 and LLD-13: ld.lld: error: -plugin-opt=-: ld.lld: Unknown command line argument '-warn-stack-size=2048'. Try: 'ld.lld --help' ld.lld: Did you mean '--asan-stack=2048'? In the same way as with commit 2398ce80152a ("x86, lto: Pass -stack-alignment only on LLD < 13.0.0") , make '-warn-stack-size' conditional on LLD < 13.0.0. [1] https://reviews.llvm.org/D103928 Fixes: 24845dcb170e ("Makefile: LTO: have linker check -Wframe-larger-than") Cc: stable@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1377 Signed-off-by: Tor Vic Reviewed-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/7631bab7-a8ab-f884-ab54-f4198976125c@mailbox.org commit 2214fb53006e6cfa6371b706070cb99794c68c3b Author: Subash Abhinov Kasiviswanathan Date: Mon Jun 14 15:03:25 2021 -0600 net: mhi_net: Update the transmit handler prototype Update the function prototype of mhi_ndo_xmit to match ndo_start_xmit. This otherwise leads to run time failures when CFI is enabled in kernel. Fixes: 3ffec6a14f24 ("net: Add mhi-net driver") Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller commit 973377ffe8148180b2651825b92ae91988141b05 Author: Daniel Borkmann Date: Mon May 31 12:34:24 2021 +0000 bpf, selftests: Adjust few selftest outcomes wrt unreachable code In almost all cases from test_verifier that have been changed in here, we've had an unreachable path with a load from a register which has an invalid address on purpose. This was basically to make sure that we never walk this path and to have the verifier complain if it would otherwise. Change it to match on the right error for unprivileged given we now test these paths under speculative execution. There's one case where we match on exact # of insns_processed. Due to the extra path, this will of course mismatch on unprivileged. Thus, restrict the test->insn_processed check to privileged-only. In one other case, we result in a 'pointer comparison prohibited' error. This is similarly due to verifying an 'invalid' branch where we end up with a value pointer on one side of the comparison. Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit 9183671af6dbf60a1219371d4ed73e23f43b49db Author: Daniel Borkmann Date: Fri May 28 15:47:32 2021 +0000 bpf: Fix leakage under speculation on mispredicted branches The verifier only enumerates valid control-flow paths and skips paths that are unreachable in the non-speculative domain. And so it can miss issues under speculative execution on mispredicted branches. For example, a type confusion has been demonstrated with the following crafted program: // r0 = pointer to a map array entry // r6 = pointer to readable stack slot // r9 = scalar controlled by attacker 1: r0 = *(u64 *)(r0) // cache miss 2: if r0 != 0x0 goto line 4 3: r6 = r9 4: if r0 != 0x1 goto line 6 5: r9 = *(u8 *)(r6) 6: // leak r9 Since line 3 runs iff r0 == 0 and line 5 runs iff r0 == 1, the verifier concludes that the pointer dereference on line 5 is safe. But: if the attacker trains both the branches to fall-through, such that the following is speculatively executed ... r6 = r9 r9 = *(u8 *)(r6) // leak r9 ... then the program will dereference an attacker-controlled value and could leak its content under speculative execution via side-channel. This requires to mistrain the branch predictor, which can be rather tricky, because the branches are mutually exclusive. However such training can be done at congruent addresses in user space using different branches that are not mutually exclusive. That is, by training branches in user space ... A: if r0 != 0x0 goto line C B: ... C: if r0 != 0x0 goto line D D: ... ... such that addresses A and C collide to the same CPU branch prediction entries in the PHT (pattern history table) as those of the BPF program's lines 2 and 4, respectively. A non-privileged attacker could simply brute force such collisions in the PHT until observing the attack succeeding. Alternative methods to mistrain the branch predictor are also possible that avoid brute forcing the collisions in the PHT. A reliable attack has been demonstrated, for example, using the following crafted program: // r0 = pointer to a [control] map array entry // r7 = *(u64 *)(r0 + 0), training/attack phase // r8 = *(u64 *)(r0 + 8), oob address // [...] // r0 = pointer to a [data] map array entry 1: if r7 == 0x3 goto line 3 2: r8 = r0 // crafted sequence of conditional jumps to separate the conditional // branch in line 193 from the current execution flow 3: if r0 != 0x0 goto line 5 4: if r0 == 0x0 goto exit 5: if r0 != 0x0 goto line 7 6: if r0 == 0x0 goto exit [...] 187: if r0 != 0x0 goto line 189 188: if r0 == 0x0 goto exit // load any slowly-loaded value (due to cache miss in phase 3) ... 189: r3 = *(u64 *)(r0 + 0x1200) // ... and turn it into known zero for verifier, while preserving slowly- // loaded dependency when executing: 190: r3 &= 1 191: r3 &= 2 // speculatively bypassed phase dependency 192: r7 += r3 193: if r7 == 0x3 goto exit 194: r4 = *(u8 *)(r8 + 0) // leak r4 As can be seen, in training phase (phase != 0x3), the condition in line 1 turns into false and therefore r8 with the oob address is overridden with the valid map value address, which in line 194 we can read out without issues. However, in attack phase, line 2 is skipped, and due to the cache miss in line 189 where the map value is (zeroed and later) added to the phase register, the condition in line 193 takes the fall-through path due to prior branch predictor training, where under speculation, it'll load the byte at oob address r8 (unknown scalar type at that point) which could then be leaked via side-channel. One way to mitigate these is to 'branch off' an unreachable path, meaning, the current verification path keeps following the is_branch_taken() path and we push the other branch to the verification stack. Given this is unreachable from the non-speculative domain, this branch's vstate is explicitly marked as speculative. This is needed for two reasons: i) if this path is solely seen from speculative execution, then we later on still want the dead code elimination to kick in in order to sanitize these instructions with jmp-1s, and ii) to ensure that paths walked in the non-speculative domain are not pruned from earlier walks of paths walked in the speculative domain. Additionally, for robustness, we mark the registers which have been part of the conditional as unknown in the speculative path given there should be no assumptions made on their content. The fix in here mitigates type confusion attacks described earlier due to i) all code paths in the BPF program being explored and ii) existing verifier logic already ensuring that given memory access instruction references one specific data structure. An alternative to this fix that has also been looked at in this scope was to mark aux->alu_state at the jump instruction with a BPF_JMP_TAKEN state as well as direction encoding (always-goto, always-fallthrough, unknown), such that mixing of different always-* directions themselves as well as mixing of always-* with unknown directions would cause a program rejection by the verifier, e.g. programs with constructs like 'if ([...]) { x = 0; } else { x = 1; }' with subsequent 'if (x == 1) { [...] }'. For unprivileged, this would result in only single direction always-* taken paths, and unknown taken paths being allowed, such that the former could be patched from a conditional jump to an unconditional jump (ja). Compared to this approach here, it would have two downsides: i) valid programs that otherwise are not performing any pointer arithmetic, etc, would potentially be rejected/broken, and ii) we are required to turn off path pruning for unprivileged, where both can be avoided in this work through pushing the invalid branch to the verification stack. The issue was originally discovered by Adam and Ofek, and later independently discovered and reported as a result of Benedict and Piotr's research work. Fixes: b2157399cc98 ("bpf: prevent out-of-bounds speculation") Reported-by: Adam Morrison Reported-by: Ofek Kirzner Reported-by: Benedict Schlueter Reported-by: Piotr Krysiuk Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Reviewed-by: Benedict Schlueter Reviewed-by: Piotr Krysiuk Acked-by: Alexei Starovoitov commit fe9a5ca7e370e613a9a75a13008a3845ea759d6e Author: Daniel Borkmann Date: Fri May 28 13:47:27 2021 +0000 bpf: Do not mark insn as seen under speculative path verification ... in such circumstances, we do not want to mark the instruction as seen given the goal is still to jmp-1 rewrite/sanitize dead code, if it is not reachable from the non-speculative path verification. We do however want to verify it for safety regardless. With the patch as-is all the insns that have been marked as seen before the patch will also be marked as seen after the patch (just with a potentially different non-zero count). An upcoming patch will also verify paths that are unreachable in the non-speculative domain, hence this extension is needed. Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Reviewed-by: Benedict Schlueter Reviewed-by: Piotr Krysiuk Acked-by: Alexei Starovoitov commit d203b0fd863a2261e5d00b97f3d060c4c2a6db71 Author: Daniel Borkmann Date: Fri May 28 13:03:30 2021 +0000 bpf: Inherit expanded/patched seen count from old aux data Instead of relying on current env->pass_cnt, use the seen count from the old aux data in adjust_insn_aux_data(), and expand it to the new range of patched instructions. This change is valid given we always expand 1:n with n>=1, so what applies to the old/original instruction needs to apply for the replacement as well. Not relying on env->pass_cnt is a prerequisite for a later change where we want to avoid marking an instruction seen when verified under speculative execution path. Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Reviewed-by: Benedict Schlueter Reviewed-by: Piotr Krysiuk Acked-by: Alexei Starovoitov commit 45deacc731d73de7495e3004f7d8d92eb4c1d9eb Merge: ad9d24c9429e2 995fca15b73ff Author: David S. Miller Date: Mon Jun 14 14:00:57 2021 -0700 Merge tag 'for-net-2021-06-14' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - Fix crash on SMP when debug is enabled ==================== Signed-off-by: David S. Miller commit a7b359fc6a37faaf472125867c8dc5a068c90982 Author: Odin Ugedal Date: Sat Jun 12 13:28:15 2021 +0200 sched/fair: Correctly insert cfs_rq's to list on unthrottle Fix an issue where fairness is decreased since cfs_rq's can end up not being decayed properly. For two sibling control groups with the same priority, this can often lead to a load ratio of 99/1 (!!). This happens because when a cfs_rq is throttled, all the descendant cfs_rq's will be removed from the leaf list. When they initial cfs_rq is unthrottled, it will currently only re add descendant cfs_rq's if they have one or more entities enqueued. This is not a perfect heuristic. Instead, we insert all cfs_rq's that contain one or more enqueued entities, or it its load is not completely decayed. Can often lead to situations like this for equally weighted control groups: $ ps u -C stress USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 10009 88.8 0.0 3676 100 pts/1 R+ 11:04 0:13 stress --cpu 1 root 10023 3.0 0.0 3676 104 pts/1 R+ 11:04 0:00 stress --cpu 1 Fixes: 31bc6aeaab1d ("sched/fair: Optimize update_blocked_averages()") [vingo: !SMP build fix] Signed-off-by: Odin Ugedal Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20210612112815.61678-1-odin@uged.al commit 995fca15b73ff8f92888cc2d5d95f17ffdac74ba Author: Luiz Augusto von Dentz Date: Mon Jun 14 10:46:44 2021 -0700 Bluetooth: SMP: Fix crash when receiving new connection when debug is enabled When receiving a new connection pchan->conn won't be initialized so the code cannot use bt_dev_dbg as the pointer to hci_dev won't be accessible. Fixes: 2e1614f7d61e4 ("Bluetooth: SMP: Convert BT_ERR/BT_DBG to bt_dev_err/bt_dev_dbg") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit ad9d24c9429e2159d1e279dc3a83191ccb4daf1d Author: Pavel Skripkin Date: Mon Jun 14 15:06:50 2021 +0300 net: qrtr: fix OOB Read in qrtr_endpoint_post Syzbot reported slab-out-of-bounds Read in qrtr_endpoint_post. The problem was in wrong _size_ type: if (len != ALIGN(size, 4) + hdrlen) goto err; If size from qrtr_hdr is 4294967293 (0xfffffffd), the result of ALIGN(size, 4) will be 0. In case of len == hdrlen and size == 4294967293 in header this check won't fail and skb_put_data(skb, data + hdrlen, size); will read out of bound from data, which is hdrlen allocated block. Fixes: 194ccc88297a ("net: qrtr: Support decoding incoming v2 packets") Reported-and-tested-by: syzbot+1917d778024161609247@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Reviewed-by: Bjorn Andersson Signed-off-by: David S. Miller commit b87b04f5019e821c8c6c7761f258402e43500a1f Author: David Ahern Date: Sat Jun 12 18:24:59 2021 -0600 ipv4: Fix device used for dst_alloc with local routes Oliver reported a use case where deleting a VRF device can hang waiting for the refcnt to drop to 0. The root cause is that the dst is allocated against the VRF device but cached on the loopback device. The use case (added to the selftests) has an implicit VRF crossing due to the ordering of the FIB rules (lookup local is before the l3mdev rule, but the problem occurs even if the FIB rules are re-ordered with local after l3mdev because the VRF table does not have a default route to terminate the lookup). The end result is is that the FIB lookup returns the loopback device as the nexthop, but the ingress device is in a VRF. The mismatch causes the dst alloc against the VRF device but then cached on the loopback. The fix is to bring the trick used for IPv6 (see ip6_rt_get_dev_rcu): pick the dst alloc device based the fib lookup result but with checks that the result has a nexthop device (e.g., not an unreachable or prohibit entry). Fixes: f5a0aab84b74 ("net: ipv4: dst for local input routes should use l3mdev if relevant") Reported-by: Oliver Herms Signed-off-by: David Ahern Signed-off-by: David S. Miller commit 58af3d3d54e87bfc1f936e16c04ade3369d34011 Author: Pavel Skripkin Date: Sat Jun 12 17:51:22 2021 +0300 net: caif: fix memory leak in ldisc_open Syzbot reported memory leak in tty_init_dev(). The problem was in unputted tty in ldisc_open() static int ldisc_open(struct tty_struct *tty) { ... ser->tty = tty_kref_get(tty); ... result = register_netdevice(dev); if (result) { rtnl_unlock(); free_netdev(dev); return -ENODEV; } ... } Ser pointer is netdev private_data, so after free_netdev() this pointer goes away with unputted tty reference. So, fix it by adding tty_kref_put() before freeing netdev. Reported-and-tested-by: syzbot+f303e045423e617d2cad@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit 09427c1915f754ebe7d3d8e54e79bbee48afe916 Author: Rahul Lakkireddy Date: Sat Jun 12 19:20:44 2021 +0530 cxgb4: fix wrong ethtool n-tuple rule lookup The TID returned during successful filter creation is relative to the region in which the filter is created. Using it directly always returns Hi Prio/Normal filter region's entry for the first couple of entries, even though the rule is actually inserted in Hash region. Fix by analyzing in which region the filter has been inserted and save the absolute TID to be used for lookup later. Fixes: db43b30cd89c ("cxgb4: add ethtool n-tuple filter deletion") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 49a10c7b176295f8fafb338911cf028e97f65f4d Author: Christophe JAILLET Date: Sat Jun 12 14:53:12 2021 +0200 netxen_nic: Fix an error handling path in 'netxen_nic_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: e87ad5539343 ("netxen: support pci error handlers") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit cb3376604a676e0302258b01893911bdd7aa5278 Author: Christophe JAILLET Date: Sat Jun 12 14:37:46 2021 +0200 qlcnic: Fix an error handling path in 'qlcnic_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: 451724c821c1 ("qlcnic: aer support") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit e175aef902697826d344ce3a12189329848fe898 Author: Jakub Kicinski Date: Fri Jun 11 18:49:48 2021 -0700 ethtool: strset: fix message length calculation Outer nest for ETHTOOL_A_STRSET_STRINGSETS is not accounted for. This may result in ETHTOOL_MSG_STRSET_GET producing a warning like: calculated message payload length (684) not sufficient WARNING: CPU: 0 PID: 30967 at net/ethtool/netlink.c:369 ethnl_default_doit+0x87a/0xa20 and a splat. As usually with such warnings three conditions must be met for the warning to trigger: - there must be no skb size rounding up (e.g. reply_size of 684); - string set must be per-device (so that the header gets populated); - the device name must be at least 12 characters long. all in all with current user space it looks like reading priv flags is the only place this could potentially happen. Or with syzbot :) Reported-by: syzbot+59aa77b92d06cd5a54f2@syzkaller.appspotmail.com Fixes: 71921690f974 ("ethtool: provide string sets with STRSET_GET request") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 994c393bb6886d6d94d628475b274a8cb3fc67a4 Author: Alex Elder Date: Fri Jun 11 13:26:00 2021 -0500 net: qualcomm: rmnet: don't over-count statistics The purpose of the loop using u64_stats_fetch_*_irq() is to ensure statistics on a given CPU are collected atomically. If one of the statistics values gets updated within the begin/retry window, the loop will run again. Currently the statistics totals are updated inside that window. This means that if the loop ever retries, the statistics for the CPU will be counted more than once. Fix this by taking a snapshot of a CPU's statistics inside the protected window, and then updating the counters with the snapshot values after exiting the loop. (Also add a newline at the end of this file...) Fixes: 192c4b5d48f2a ("net: qualcomm: rmnet: Add support for 64 bit stats") Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 4f667b8e049e716a0533fc927f50310fe6e40d22 Author: Tyson Moore Date: Sat Jun 12 02:54:11 2021 -0400 sch_cake: revise docs for RFC 8622 LE PHB support Commit b8392808eb3fc28e ("sch_cake: add RFC 8622 LE PHB support to CAKE diffserv handling") added the LE mark to the Bulk tin. Update the comments to reflect the change. Signed-off-by: Tyson Moore Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit f422316c8e9d3c4aff3c56549dfb44a677d02f14 Author: Haibo Chen Date: Thu Jun 10 17:24:33 2021 +0800 spi: spi-nxp-fspi: move the register operation after the clock enable Move the register operation after the clock enable, otherwise system will stuck when this driver probe. Fixes: 71d80563b076 ("spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts") Signed-off-by: Haibo Chen Link: https://lore.kernel.org/r/1623317073-25158-1-git-send-email-haibo.chen@nxp.com Signed-off-by: Mark Brown commit 771fac5e26c17845de8c679e6a947a4371e86ffc Author: Viresh Kumar Date: Fri Jun 11 08:48:02 2021 +0530 Revert "cpufreq: CPPC: Add support for frequency invariance" This reverts commit 4c38f2df71c8e33c0b64865992d693f5022eeaad. There are few races in the frequency invariance support for CPPC driver, namely the driver doesn't stop the kthread_work and irq_work on policy exit during suspend/resume or CPU hotplug. A proper fix won't be possible for the 5.13-rc, as it requires a lot of changes. Lets revert the patch instead for now. Fixes: 4c38f2df71c8 ("cpufreq: CPPC: Add support for frequency invariance") Reported-by: Qian Cai Signed-off-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit e41d6c3f4f9b4804e53ca87aba8ee11ada606c77 Author: Michael Ellerman Date: Tue Jun 8 23:46:05 2021 +1000 powerpc/signal64: Copy siginfo before changing regs->nip In commit 96d7a4e06fab ("powerpc/signal64: Rewrite handle_rt_signal64() to minimise uaccess switches") the 64-bit signal code was rearranged to use user_write_access_begin/end(). As part of that change the call to copy_siginfo_to_user() was moved later in the function, so that it could be done after the user_write_access_end(). In particular it was moved after we modify regs->nip to point to the signal trampoline. That means if copy_siginfo_to_user() fails we exit handle_rt_signal64() with an error but with regs->nip modified, whereas previously we would not modify regs->nip until the copy succeeded. Returning an error from signal delivery but with regs->nip updated leaves the process in a sort of half-delivered state. We do immediately force a SEGV in signal_setup_done(), called from do_signal(), so the process should never run in the half-delivered state. However that SEGV is not delivered until we've gone around to do_notify_resume() again, so it's possible some tracing could observe the half-delivered state. There are other cases where we fail signal delivery with regs partly updated, eg. the write to newsp and SA_SIGINFO, but the latter at least is very unlikely to fail as it reads back from the frame we just wrote to. Looking at other arches they seem to be more careful about leaving regs unchanged until the copy operations have succeeded, and in general that seems like good hygenie. So although the current behaviour is not cleary buggy, it's also not clearly correct. So move the call to copy_siginfo_to_user() up prior to the modification of regs->nip, which is closer to the old behaviour, and easier to reason about. Fixes: 96d7a4e06fab ("powerpc/signal64: Rewrite handle_rt_signal64() to minimise uaccess switches") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210608134605.2783677-1-mpe@ellerman.id.au commit 103a5348c22c3fca8b96c735a9e353b8a0801842 Author: Neil Armstrong Date: Wed Jun 9 17:02:30 2021 +0200 mmc: meson-gx: use memcpy_to/fromio for dram-access-quirk It has been reported that usage of memcpy() to/from an iomem mapping is invalid, and a recent arm64 memcpy update [1] triggers a memory abort when dram-access-quirk is used on the G12A/G12B platforms. This adds a local sg_copy_to_buffer which makes usage of io versions of memcpy when dram-access-quirk is enabled. [1] 285133040e6c ("arm64: Import latest memcpy()/memmove() implementation") Fixes: acdc8e71d9bb ("mmc: meson-gx: add dram-access-quirk") Reported-by: Marek Szyprowski Suggested-by: Mark Rutland Signed-off-by: Neil Armstrong Tested-by: Marek Szyprowski Link: https://lore.kernel.org/r/20210609150230.9291-1-narmstrong@baylibre.com Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit f644bc449b37cc32d3ce7b36a88073873aa21bd5 Author: Matthew Bobrowski Date: Fri Jun 11 13:32:06 2021 +1000 fanotify: fix copy_event_to_user() fid error clean up Ensure that clean up is performed on the allocated file descriptor and struct file object in the event that an error is encountered while copying fid info objects. Currently, we return directly to the caller when an error is experienced in the fid info copying helper, which isn't ideal given that the listener process could be left with a dangling file descriptor in their fdtable. Fixes: 5e469c830fdb ("fanotify: copy event fid info to user") Fixes: 44d705b0370b ("fanotify: report name info for FAN_DIR_MODIFY event") Link: https://lore.kernel.org/linux-fsdevel/YMKv1U7tNPK955ho@google.com/T/#m15361cd6399dad4396aad650de25dbf6b312288e Link: https://lore.kernel.org/r/1ef8ae9100101eb1a91763c516c2e9a3a3b112bd.1623376346.git.repnop@google.com Signed-off-by: Matthew Bobrowski Signed-off-by: Jan Kara commit 009c9aa5be652675a06d5211e1640e02bbb1c33d Author: Linus Torvalds Date: Sun Jun 13 14:43:10 2021 -0700 Linux 5.13-rc6 commit e4e453434a199cdfa1e1e5cc723d8736f522354a Merge: 960f0716d80fb 36524112aba32 Author: Linus Torvalds Date: Sun Jun 13 12:41:47 2021 -0700 Merge tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Correct buffer copying when peeking events - Sync cpufeatures/disabled-features.h header with the kernel sources * tag 'perf-tools-fixes-for-v5.13-2021-06-13' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: tools headers cpufeatures: Sync with the kernel sources perf session: Correct buffer copying when peeking events commit 960f0716d80fb8241356ba862a4c377c7250121f Merge: 331a6edb30af2 c3aba897c6e67 Author: Linus Torvalds Date: Sun Jun 13 12:32:59 2021 -0700 Merge tag 'nfs-for-5.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Highlights include: Stable fixes: - Fix use-after-free in nfs4_init_client() Bugfixes: - Fix deadlock between nfs4_evict_inode() and nfs4_opendata_get_inode() - Fix second deadlock in nfs4_evict_inode() - nfs4_proc_set_acl should not change the value of NFS_CAP_UIDGID_NOMAP - Fix setting of the NFS_CAP_SECURITY_LABEL capability" * tag 'nfs-for-5.13-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: NFSv4: Fix second deadlock in nfs4_evict_inode() NFSv4: Fix deadlock between nfs4_evict_inode() and nfs4_opendata_get_inode() NFS: FMODE_READ and friends are C macros, not enum types NFS: Fix a potential NULL dereference in nfs_get_client() NFS: Fix use-after-free in nfs4_init_client() NFS: Ensure the NFS_CAP_SECURITY_LABEL capability is set when appropriate NFSv4: nfs4_proc_set_acl needs to restore NFS_CAP_UIDGID_NOMAP on error. commit 331a6edb30af2b06fcc7f2bf734c6f4984b48a31 Merge: 8ecfa36cd4db3 1e0d4e6225996 Author: Linus Torvalds Date: Sun Jun 13 12:25:33 2021 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Four reasonably small fixes to the core for scsi host allocation failure paths. The root problem is that we're not freeing the memory allocated by dev_set_name(), which involves a rejig of may of the free on error paths to do put_device() instead of kfree which, in turn, has several other knock on ramifications and inspection turned up a few other lurking bugs" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: core: Only put parent device if host state differs from SHOST_CREATED scsi: core: Put .shost_dev in failure path if host state changes to RUNNING scsi: core: Fix failure handling of scsi_add_host_with_dma() scsi: core: Fix error handling of scsi_host_alloc() commit 01f5315dd7327b53a5f538b74a2338a651b1832d Author: Randy Dunlap Date: Sat May 22 14:20:36 2021 -0700 riscv: sifive: fix Kconfig errata warning The SOC_SIFIVE Kconfig entry unconditionally selects ERRATA_SIFIVE. However, ERRATA_SIFIVE depends on RISCV_ERRATA_ALTERNATIVE, which is not set, so SOC_SIFIVE should either depend on or select RISCV_ERRATA_ALTERNATIVE. Use 'select' here to quieten the Kconfig warning. WARNING: unmet direct dependencies detected for ERRATA_SIFIVE Depends on [n]: RISCV_ERRATA_ALTERNATIVE [=n] Selected by [y]: - SOC_SIFIVE [=y] Fixes: 1a0e5dbd3723 ("riscv: sifive: Add SiFive alternative ports") Signed-off-by: Randy Dunlap Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: linux-riscv@lists.infradead.org Cc: Vincent Chen Signed-off-by: Palmer Dabbelt commit 5d2388dbf84adebeb6d9742164be8d32728e4269 Author: Khem Raj Date: Sun Jun 6 15:09:40 2021 -0700 riscv32: Use medany C model for modules When CONFIG_CMODEL_MEDLOW is used it ends up generating riscv_hi20_rela relocations in modules which are not resolved during runtime and following errors would be seen [ 4.802714] virtio_input: target 00000000c1539090 can not be addressed by the 32-bit offset from PC = 39148b7b [ 4.854800] virtio_input: target 00000000c1539090 can not be addressed by the 32-bit offset from PC = 9774456d Signed-off-by: Khem Raj Signed-off-by: Palmer Dabbelt commit 8ecfa36cd4db3275bf3b6c6f32c7e3c6bb537de2 Merge: 2e3025434a6ba 0ddd7eaffa644 Author: Linus Torvalds Date: Sat Jun 12 13:57:49 2021 -0700 Merge tag 'riscv-for-linus-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A pair of XIP fixes: one to fix alternatives, and one to turn off the rest of the features that require code modification - A fix to a type that was causing some alternatives to break - A build fix for BUILTIN_DTB * tag 'riscv-for-linus-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: Fix BUILTIN_DTB for sifive and microchip soc riscv: alternative: fix typo in macro name riscv: code patching only works on !XIP_KERNEL riscv: xip: support runtime trap patching commit 2e3025434a6ba090c85871a1d4080ff784109e1f Author: Feng Tang Date: Fri Jun 11 09:54:42 2021 +0800 mm: relocate 'write_protect_seq' in struct mm_struct 0day robot reported a 9.2% regression for will-it-scale mmap1 test case[1], caused by commit 57efa1fe5957 ("mm/gup: prevent gup_fast from racing with COW during fork"). Further debug shows the regression is due to that commit changes the offset of hot fields 'mmap_lock' inside structure 'mm_struct', thus some cache alignment changes. From the perf data, the contention for 'mmap_lock' is very severe and takes around 95% cpu cycles, and it is a rw_semaphore struct rw_semaphore { atomic_long_t count; /* 8 bytes */ atomic_long_t owner; /* 8 bytes */ struct optimistic_spin_queue osq; /* spinner MCS lock */ ... Before commit 57efa1fe5957 adds the 'write_protect_seq', it happens to have a very optimal cache alignment layout, as Linus explained: "and before the addition of the 'write_protect_seq' field, the mmap_sem was at offset 120 in 'struct mm_struct'. Which meant that count and owner were in two different cachelines, and then when you have contention and spend time in rwsem_down_write_slowpath(), this is probably *exactly* the kind of layout you want. Because first the rwsem_write_trylock() will do a cmpxchg on the first cacheline (for the optimistic fast-path), and then in the case of contention, rwsem_down_write_slowpath() will just access the second cacheline. Which is probably just optimal for a load that spends a lot of time contended - new waiters touch that first cacheline, and then they queue themselves up on the second cacheline." After the commit, the rw_semaphore is at offset 128, which means the 'count' and 'owner' fields are now in the same cacheline, and causes more cache bouncing. Currently there are 3 "#ifdef CONFIG_XXX" before 'mmap_lock' which will affect its offset: CONFIG_MMU CONFIG_MEMBARRIER CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES The layout above is on 64 bits system with 0day's default kernel config (similar to RHEL-8.3's config), in which all these 3 options are 'y'. And the layout can vary with different kernel configs. Relayouting a structure is usually a double-edged sword, as sometimes it can helps one case, but hurt other cases. For this case, one solution is, as the newly added 'write_protect_seq' is a 4 bytes long seqcount_t (when CONFIG_DEBUG_LOCK_ALLOC=n), placing it into an existing 4 bytes hole in 'mm_struct' will not change other fields' alignment, while restoring the regression. Link: https://lore.kernel.org/lkml/20210525031636.GB7744@xsang-OptiPlex-9020/ [1] Reported-by: kernel test robot Signed-off-by: Feng Tang Reviewed-by: John Hubbard Reviewed-by: Jason Gunthorpe Cc: Peter Xu Signed-off-by: Linus Torvalds commit ea6932d70e223e02fea3ae20a4feff05d7c1ea9a Author: Changbin Du Date: Fri Jun 11 22:29:59 2021 +0800 net: make get_net_ns return error if NET_NS is disabled There is a panic in socket ioctl cmd SIOCGSKNS when NET_NS is not enabled. The reason is that nsfs tries to access ns->ops but the proc_ns_operations is not implemented in this case. [7.670023] Unable to handle kernel NULL pointer dereference at virtual address 00000010 [7.670268] pgd = 32b54000 [7.670544] [00000010] *pgd=00000000 [7.671861] Internal error: Oops: 5 [#1] SMP ARM [7.672315] Modules linked in: [7.672918] CPU: 0 PID: 1 Comm: systemd Not tainted 5.13.0-rc3-00375-g6799d4f2da49 #16 [7.673309] Hardware name: Generic DT based system [7.673642] PC is at nsfs_evict+0x24/0x30 [7.674486] LR is at clear_inode+0x20/0x9c The same to tun SIOCGSKNS command. To fix this problem, we make get_net_ns() return -EINVAL when NET_NS is disabled. Meanwhile move it to right place net/core/net_namespace.c. Signed-off-by: Changbin Du Fixes: c62cce2caee5 ("net: add an ioctl to get a socket network namespace") Cc: Cong Wang Cc: Jakub Kicinski Cc: David Laight Cc: Christian Brauner Suggested-by: Jakub Kicinski Acked-by: Christian Brauner Signed-off-by: David S. Miller commit 43cb5d49a99b3ecd9fef9826899aac948c3048da Merge: c46fe4aa8271e 7c4363d394853 Author: Linus Torvalds Date: Sat Jun 12 12:34:49 2021 -0700 Merge tag 'usb-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a number of tiny USB fixes for 5.13-rc6. There are more than I would normally like, but there's been a bunch of people banging on the gadget and dwc3 and typec code recently for I think an Android release, which has resulted in a number of small fixes. It's nice to see companies send fixes upstream for this type of work, a notable change from years ago. Anyway, fixes in here are: - usb-serial device id updates - usb-serial cp210x driver fixes for broken firmware versions - typec fixes for crazy charging devices and other reported problems - dwc3 fixes for reported problems found - gadget fixes for reported problems - tiny xhci fixes - other small fixes for reported issues. - revert of a problem fix found by linux-next testing All of these have passed 0-day and linux-next testing with no reported problems (the revert for the found linux-next build problem included)" * tag 'usb-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (44 commits) Revert "usb: gadget: fsl: Re-enable driver for ARM SoCs" usb: typec: mux: Fix copy-paste mistake in typec_mux_match usb: typec: ucsi: Clear PPM capability data in ucsi_init() error path usb: gadget: fsl: Re-enable driver for ARM SoCs usb: typec: wcove: Use LE to CPU conversion when accessing msg->header USB: serial: cp210x: fix CP2102N-A01 modem control USB: serial: cp210x: fix alternate function for CP2102N QFN20 usb: misc: brcmstb-usb-pinmap: check return value after calling platform_get_resource() usb: dwc3: ep0: fix NULL pointer exception usb: gadget: eem: fix wrong eem header operation usb: typec: intel_pmc_mux: Put ACPI device using acpi_dev_put() usb: typec: intel_pmc_mux: Add missed error check for devm_ioremap_resource() usb: typec: intel_pmc_mux: Put fwnode in error case during ->probe() usb: typec: tcpm: Do not finish VDM AMS for retrying Responses usb: fix various gadget panics on 10gbps cabling usb: fix various gadgets null ptr deref on 10gbps cabling. usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir usb: f_ncm: only first packet of aggregate needs to start timer USB: f_ncm: ncm_bitrate (speed) is unsigned MAINTAINERS: usb: add entry for isp1760 ... commit c46fe4aa8271e97b520dc72018688e083460127c Merge: 0d50658834f9f 7c3e8d9df265b Author: Linus Torvalds Date: Sat Jun 12 12:27:05 2021 -0700 Merge tag 'tty-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull serial driver fix from Greg KH: "A single 8250_exar serial driver fix for a reported problem with a change that happened in 5.13-rc1. It has been in linux-next with no reported problems" * tag 'tty-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: 8250_exar: Avoid NULL pointer dereference at ->exit() commit 0d50658834f9f655559f07ee61f227c435d8e481 Merge: 87a7f7368be5b e9de1ecadeab5 Author: Linus Torvalds Date: Sat Jun 12 12:23:54 2021 -0700 Merge tag 'staging-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging driver fixes from Greg KH: "Two tiny staging driver fixes: - ralink-gdma driver authorship information fixed up - rtl8723bs driver fix for reported regression Both have been in linux-next for a while with no reported problems" * tag 'staging-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: staging: ralink-gdma: Remove incorrect author information staging: rtl8723bs: Fix uninitialized variables commit 87a7f7368be5bfdc43c2b46a6703880ab25cbd1f Merge: 1dfa2e77bbd50 f501b6a2312e2 Author: Linus Torvalds Date: Sat Jun 12 12:18:49 2021 -0700 Merge tag 'driver-core-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fix from Greg KH: "A single debugfs fix for 5.13-rc6, fixing a bug in debugfs_read_file_str() that showed up in 5.13-rc1. It has been in linux-next for a full week with no reported problems" * tag 'driver-core-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: debugfs: Fix debugfs_read_file_str() commit 1dfa2e77bbd5053d11f8f3f8987b4503badafb09 Merge: 141415d7379a0 3df4fce739e2b Author: Linus Torvalds Date: Sat Jun 12 12:13:55 2021 -0700 Merge tag 'char-misc-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some small misc driver fixes for 5.13-rc6 that fix some reported problems: - Tiny phy driver fixes for reported issues - rtsx regression for when the device suspended - mhi driver fix for a use-after-free All of these have been in linux-next for a few days with no reported issues" * tag 'char-misc-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG bus: mhi: pci-generic: Fix hibernation bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove() bus: mhi: pci_generic: T99W175: update channel name from AT to DUN phy: Sparx5 Eth SerDes: check return value after calling platform_get_resource() phy: ralink: phy-mt7621-pci: drop 'of_match_ptr' to fix -Wunused-const-variable phy: ti: Fix an error code in wiz_probe() phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init() phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe() phy: usb: Fix misuse of IS_ENABLED commit 141415d7379a02f0a75b1a7611d6b50928b3c46d Merge: efc1fd601a751 30e9857a13490 Author: Linus Torvalds Date: Sat Jun 12 12:06:24 2021 -0700 Merge tag 'pinctrl-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Fix some documentation warnings for Allwinner - Fix duplicated GPIO groups on Qualcomm SDX55 - Fix a double enablement bug in the Ralink driver - Fix the Qualcomm SC8180x Kconfig so the driver can be selected. * tag 'pinctrl-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: qcom: Make it possible to select SC8180x TLMM pinctrl: ralink: rt2880: avoid to error in calls is pin is already enabled pinctrl: qcom: Fix duplication in gpio_groups pinctrl: aspeed: Fix minor documentation error commit efc1fd601a751d39a189c3ebe14008aea69a5e37 Merge: b2568eeb961c1 85f3f17b5db2d Author: Linus Torvalds Date: Sat Jun 12 11:59:58 2021 -0700 Merge tag 'block-5.13-2021-06-12' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A few fixes that should go into 5.13: - Fix a regression deadlock introduced in this release between open and remove of a bdev (Christoph) - Fix an async_xor md regression in this release (Xiao) - Fix bcache oversized read issue (Coly)" * tag 'block-5.13-2021-06-12' of git://git.kernel.dk/linux-block: block: loop: fix deadlock between open and remove async_xor: check src_offs is not NULL before updating it bcache: avoid oversized read request in cache missing code path bcache: remove bcache device self-defined readahead commit b2568eeb961c1bb79ada9c2b90f65f625054adaf Merge: 99f925947ab0f 9690557e22d63 Author: Linus Torvalds Date: Sat Jun 12 11:53:20 2021 -0700 Merge tag 'io_uring-5.13-2021-06-12' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Just an API change for the registration changes that went into this release. Better to get it sorted out now than before it's too late" * tag 'io_uring-5.13-2021-06-12' of git://git.kernel.dk/linux-block: io_uring: add feature flag for rsrc tags io_uring: change registration/upd/rsrc tagging ABI commit 99f925947ab0fd5c17b74460d8b32f1aa1c86e3a Merge: 191aaf6cc4a7d 68d7a190682aa Author: Linus Torvalds Date: Sat Jun 12 11:41:28 2021 -0700 Merge tag 'sched-urgent-2021-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Misc fixes: - Fix performance regression caused by lack of intended batching of RCU callbacks by over-eager NOHZ-full code. - Fix cgroups related corruption of load_avg and load_sum metrics. - Three fixes to fix blocked load, util_sum/runnable_sum and util_est tracking bugs" * tag 'sched-urgent-2021-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix util_est UTIL_AVG_UNCHANGED handling sched/pelt: Ensure that *_sum is always synced with *_avg tick/nohz: Only check for RCU deferred wakeup on user/guest entry when needed sched/fair: Make sure to update tg contrib for blocked load sched/fair: Keep load_avg and load_sum synced commit 191aaf6cc4a7db907520f18af3a90b260e7dd091 Merge: 768895fb774d7 a8383dfb21387 Author: Linus Torvalds Date: Sat Jun 12 11:34:49 2021 -0700 Merge tag 'perf-urgent-2021-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Misc fixes: - Fix the NMI watchdog on ancient Intel CPUs - Remove a misguided, NMI-unsafe KASAN callback from the NMI-safe irq_work path used by perf. - Fix uncore events on Ice Lake servers. - Someone booted maxcpus=1 on an SNB-EP, and the uncore driver emitted warnings and was probably buggy. Fix it. - KCSAN found a genuine data race in the core perf code. Somewhat ironically the bug was introduced through a recent race fix. :-/ In our defense, the new race window was much more narrow. Fix it" * tag 'perf-urgent-2021-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/nmi_watchdog: Fix old-style NMI watchdog regression on old Intel CPUs irq_work: Make irq_work_queue() NMI-safe again perf/x86/intel/uncore: Fix M2M event umask for Ice Lake server perf/x86/intel/uncore: Fix a kernel WARNING triggered by maxcpus=1 perf: Fix data race between pin_count increment/decrement commit 768895fb774d7af32d17cf3a455b0bd6df272f14 Merge: ad347abe4a987 2d49b721dc18c Author: Linus Torvalds Date: Sat Jun 12 11:10:28 2021 -0700 Merge tag 'objtool-urgent-2021-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "Two objtool fixes: - fix a bug that corrupts the code by mistakenly rewriting conditional jumps - fix another bug generating an incorrect ELF symbol table during retpoline rewriting" * tag 'objtool-urgent-2021-06-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Only rewrite unconditional retpoline thunk calls objtool: Fix .symtab_shndx handling for elf_create_undef_symbol() commit 0ddd7eaffa644baa78e247bbd220ab7195b1eed6 Author: Alexandre Ghiti Date: Fri Jun 4 14:06:39 2021 +0200 riscv: Fix BUILTIN_DTB for sifive and microchip soc Fix BUILTIN_DTB config which resulted in a dtb that was actually not built into the Linux image: in the same manner as Canaan soc does, create an object file from the dtb file that will get linked into the Linux image. Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit ad347abe4a9876b1f65f408ab467137e88f77eb4 Merge: 548843c096d08 3e08a9f9760f4 Author: Linus Torvalds Date: Fri Jun 11 17:05:03 2021 -0700 Merge tag 'trace-v5.13-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: - Fix the length check in the temp buffer filter - Fix build failure in bootconfig tools for "fallthrough" macro - Fix error return of bootconfig apply_xbc() routine * tag 'trace-v5.13-rc5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Correct the length check which causes memory corruption ftrace: Do not blindly read the ip address in ftrace_bug() tools/bootconfig: Fix a build error accroding to undefined fallthrough tools/bootconfig: Fix error return code in apply_xbc() commit 548843c096d08b6c24d2aa1b73783da37c96bb0a Merge: e65b7914b2abf 2398ce80152aa Author: Linus Torvalds Date: Fri Jun 11 16:29:53 2021 -0700 Merge tag 'clang-features-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull clang LTO fix from Kees Cook: "Clang 13 fixed some IR behavior for LTO, but this broke work-arounds used in the kernel. Handle changes to needed LTO flags in Clang 13 (Tor Vic)" * tag 'clang-features-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: x86, lto: Pass -stack-alignment only on LLD < 13.0.0 commit e65b7914b2abfff4fde9dcca22bbab99fab5ba05 Merge: f21b807c3cf8c dbec64b11c65d Author: Linus Torvalds Date: Fri Jun 11 16:27:18 2021 -0700 Merge tag 'gpio-fixes-for-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fix from Bartosz Golaszewski: "Fix a shift-out-of-bounds error in gpio-wcd934x" * tag 'gpio-fixes-for-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: wcd934x: Fix shift-out-of-bounds error commit 1adb20f0d496b2c61e9aa1f4761b8d71f93d258e Author: Jisheng Zhang Date: Fri Jun 11 15:16:11 2021 +0800 net: stmmac: dwmac1000: Fix extended MAC address registers definition The register starts from 0x800 is the 16th MAC address register rather than the first one. Fixes: cffb13f4d6fb ("stmmac: extend mac addr reg and fix perfect filering") Signed-off-by: Jisheng Zhang Signed-off-by: David S. Miller commit f21b807c3cf8cd7c5ca9e406b27bf1cd2f1c1238 Merge: 929d931f2b40d 7de5c0d70c779 Author: Linus Torvalds Date: Fri Jun 11 12:33:38 2021 -0700 Merge tag 'drm-fixes-2021-06-11' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Another week of fixes, nothing too crazy, but a few all over the place. Two locking fixes in the core/ttm area, a couple of small driver fixes (radeon, sun4i, mcde, vc4). Then msm and amdgpu have a set of fixes each, mostly for smaller things, though the msm has a DSI fix for a black screen. I haven't seen any intel fixes this week so they may have a few that may or may not wait for next week. drm: - auth locking fix ttm: - locking fix amdgpu: - Use kvzmalloc in amdgu_bo_create - Use drm_dbg_kms for reporting failure to get a GEM FB - Fix some register offsets for Sienna Cichlid - Fix fall-through warning radeon: - memcpy_to/from_io fixes msm: - NULL ptr deref fix - CP_PROTECT reg programming fix - incorrect register shift fix - DSI blank screen fix sun4i: - hdmi output probing fix mcde: - DSI pipeline calc fix vc4: - out of bounds fix" * tag 'drm-fixes-2021-06-11' of git://anongit.freedesktop.org/drm/drm: drm/msm/dsi: Stash away calculated vco frequency on recalc drm: Lock pointer access in drm_master_release() drm/mcde: Fix off by 10^3 in calculation drm/msm/a6xx: avoid shadow NULL reference in failure path drm/msm/a6xx: fix incorrectly set uavflagprd_inv field for A650 drm/msm/a6xx: update/fix CP_PROTECT initialization radeon: use memcpy_to/fromio for UVD fw upload drm/amd/pm: Fix fall-through warning for Clang drm/amdgpu: Fix incorrect register offsets for Sienna Cichlid drm/amdgpu: Use drm_dbg_kms for reporting failure to get a GEM FB drm/amdgpu: switch kzalloc to kvzalloc in amdgpu_bo_create drm/msm: Init mm_list before accessing it for use_vram path drm: Fix use-after-free read in drm_getunique() drm/vc4: fix vc4_atomic_commit_tail() logic drm/ttm: fix deref of bo->ttm without holding the lock v2 drm/sun4i: dw-hdmi: Make HDMI PHY into a platform device commit f4cdcae03f9cfbfd6a74b8d785c92a6b48fd833e Merge: 33e381448cf7a 6d297540f75d7 Author: David S. Miller Date: Fri Jun 11 11:15:01 2021 -0700 Merge branch 'cxgb4-fixes' Rahul Lakkireddy says: ==================== cxgb4: bug fixes for ethtool flash ops This series of patches add bug fixes in ethtool flash operations. Patch 1 fixes an endianness issue when writing boot image to flash after the device ID has been updated. Patch 2 fixes sleep in atomic when writing PHY firmware to flash. Patch 3 fixes issue with PHY firmware image not getting written to flash when chip is still running. -==================== Signed-off-by: David S. Miller commit 6d297540f75d759489054e8b07932208fc4db2cb Author: Rahul Lakkireddy Date: Fri Jun 11 12:17:47 2021 +0530 cxgb4: halt chip before flashing PHY firmware image When using firmware-assisted PHY firmware image write to flash, halt the chip before beginning the flash write operation to allow the running firmware to store the image persistently. Otherwise, the running firmware will only store the PHY image in local on-chip RAM, which will be lost after next reset. Fixes: 4ee339e1e92a ("cxgb4: add support to flash PHY image") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit f046bd0ae15d8a0bbe57d4647da182420f720c3d Author: Rahul Lakkireddy Date: Fri Jun 11 12:17:46 2021 +0530 cxgb4: fix sleep in atomic when flashing PHY firmware Before writing new PHY firmware to on-chip memory, driver queries firmware for current running PHY firmware version, which can result in sleep waiting for reply. So, move spinlock closer to the actual on-chip memory write operation, instead of taking it at the callers. Fixes: 5fff701c838e ("cxgb4: always sync access when flashing PHY firmware") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 42a2039753a7f758ba5c85cb199fcf10dc2111eb Author: Rahul Lakkireddy Date: Fri Jun 11 12:17:45 2021 +0530 cxgb4: fix endianness when flashing boot image Boot images are copied to memory and updated with current underlying device ID before flashing them to adapter. Ensure the updated images are always flashed in Big Endian to allow the firmware to read the new images during boot properly. Fixes: 550883558f17 ("cxgb4: add support to flash boot image") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 33e381448cf7a05d76ac0b47d4a6531ecd0e5c53 Author: Christophe JAILLET Date: Fri Jun 11 08:13:39 2021 +0200 alx: Fix an error handling path in 'alx_probe()' If an error occurs after a 'pci_enable_pcie_error_reporting()' call, it must be undone by a corresponding 'pci_disable_pcie_error_reporting()' call, as already done in the remove function. Fixes: ab69bde6b2e9 ("alx: add a simple AR816x/AR817x device driver") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 929d931f2b40d7c24587818cf6c1f7a6473c363f Merge: d17bcc5ede561 8929ef8d4dfd5 Author: Linus Torvalds Date: Fri Jun 11 11:02:56 2021 -0700 Merge tag 'devicetree-fixes-for-5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fix from Rob Herring: "A single fix for broken media/renesas,drif.yaml binding schema" * tag 'devicetree-fixes-for-5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: media: dt-bindings: media: renesas,drif: Fix fck definition commit 85f3f17b5db2dd9f8a094a0ddc665555135afd22 Merge: 990e78116d380 9be148e408df7 Author: Jens Axboe Date: Fri Jun 11 11:56:08 2021 -0600 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.13 Pull MD related fix from Song. * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: async_xor: check src_offs is not NULL before updating it commit d17bcc5ede561750c10e842f53f21f3acbde52d3 Merge: fd2cd569a4363 bc8865ab32bb8 Author: Linus Torvalds Date: Fri Jun 11 10:53:43 2021 -0700 Merge tag 'acpi-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These revert a problematic recent commit and fix a regression introduced during the 5.12 development cycle. Specifics: - Revert recent commit that attempted to fix the FACS table reference counting but introduced a problem with accessing the hardware signature after hibernation (Zhang Rui). - Fix regression in the _OSC handling that broke the loading of ACPI tables on some systems (Mika Westerberg)" * tag 'acpi-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: Pass the same capabilities to the _OSC regardless of the query flag Revert "ACPI: sleep: Put the FACS table after using it" commit 990e78116d38059c9306cf0560c1c4ed1cf358d3 Author: Christoph Hellwig Date: Sat Jun 5 17:09:50 2021 +0300 block: loop: fix deadlock between open and remove Commit c76f48eb5c08 ("block: take bd_mutex around delete_partitions in del_gendisk") adds disk->part0->bd_mutex in del_gendisk(), this way causes the following AB/BA deadlock between removing loop and opening loop: 1) loop_control_ioctl(LOOP_CTL_REMOVE) -> mutex_lock(&loop_ctl_mutex) -> del_gendisk -> mutex_lock(&disk->part0->bd_mutex) 2) blkdev_get_by_dev -> mutex_lock(&disk->part0->bd_mutex) -> lo_open -> mutex_lock(&loop_ctl_mutex) Add a new Lo_deleting state to remove the need for clearing ->private_data and thus holding loop_ctl_mutex in the ioctl LOOP_CTL_REMOVE path. Based on an analysis and earlier patch from Ming Lei . Reported-by: Colin Ian King Fixes: c76f48eb5c08 ("block: take bd_mutex around delete_partitions in del_gendisk") Signed-off-by: Christoph Hellwig Tested-by: Colin Ian King Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210605140950.5800-1-hch@lst.de Signed-off-by: Jens Axboe commit fd2cd569a43635877771c00b8a2f4f26275e5562 Merge: 4244b5d8725b2 83e197a8414c0 Author: Linus Torvalds Date: Fri Jun 11 10:47:10 2021 -0700 Merge tag 'sound-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A bit more commits than expected at this time, but likely it's the last shot before the final. Many of changes are device-specific fix-ups for various ASoC drivers, while a few usual HD-audio quirks and a FireWire fix, as well as a couple of ALSA / ASoC core fixes. All look nice and small, and nothing to scare much" * tag 'sound-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: seq: Fix race of snd_seq_timer_open() ALSA: hda/realtek: fix mute/micmute LEDs for HP ZBook Power G8 ALSA: hda/realtek: headphone and mic don't work on an Acer laptop ASoC: qcom: lpass-cpu: Fix pop noise during audio capture begin ALSA: firewire-lib: fix the context to call snd_pcm_stop_xrun() ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 840 Aero G8 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP EliteBook x360 1040 G8 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Elite Dragonfly G2 ASoC: rt5682: Fix the fast discharge for headset unplugging in soundwire mode ASoC: tas2562: Fix TDM_CFG0_SAMPRATE values ASoC: meson: gx-card: fix sound-dai dt schema ASoC: AMD Renoir: Remove fix for DMI entry on Lenovo 2020 platforms ASoC: AMD Renoir - add DMI entry for Lenovo 2020 AMD platforms ASoC: SOF: reset enabled_cores state at suspend ASoC: fsl-asoc-card: Set .owner attribute when registering card. ASoC: topology: Fix spelling mistake "vesion" -> "version" ASoC: rt5659: Fix the lost powers for the HDA header ASoC: core: Fix Null-point-dereference in fmt_single_name() commit 2398ce80152aae33b9501ef54452e09e8e8d4262 Author: Tor Vic Date: Thu Jun 10 20:58:06 2021 +0000 x86, lto: Pass -stack-alignment only on LLD < 13.0.0 Since LLVM commit 3787ee4, the '-stack-alignment' flag has been dropped [1], leading to the following error message when building a LTO kernel with Clang-13 and LLD-13: ld.lld: error: -plugin-opt=-: ld.lld: Unknown command line argument '-stack-alignment=8'. Try 'ld.lld --help' ld.lld: Did you mean '--stackrealign=8'? It also appears that the '-code-model' flag is not necessary anymore starting with LLVM-9 [2]. Drop '-code-model' and make '-stack-alignment' conditional on LLD < 13.0.0. These flags were necessary because these flags were not encoded in the IR properly, so the link would restart optimizations without them. Now there are properly encoded in the IR, and these flags exposing implementation details are no longer necessary. [1] https://reviews.llvm.org/D103048 [2] https://reviews.llvm.org/D52322 Cc: stable@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1377 Signed-off-by: Tor Vic Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/f2c018ee-5999-741e-58d4-e482d5246067@mailbox.org commit da9ef50f545f86ffe6ff786174d26500c4db737a Author: Praneeth Bajjuri Date: Wed Jun 9 19:43:42 2021 -0500 net: phy: dp83867: perform soft reset and retain established link Current logic is performing hard reset and causing the programmed registers to be wiped out. as per datasheet: https://www.ti.com/lit/ds/symlink/dp83867cr.pdf 8.6.26 Control Register (CTRL) do SW_RESTART to perform a reset not including the registers, If performed when link is already present, it will drop the link and trigger re-auto negotiation. Signed-off-by: Praneeth Bajjuri Signed-off-by: Geet Modi Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4244b5d8725b28bde37eb2f979385bf782b5dde8 Merge: f30dc8f94e4ff e13d112724140 Author: Linus Torvalds Date: Fri Jun 11 10:07:50 2021 -0700 Merge tag 'hwmon-for-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Fixes for tps23861, scpi-hwmon, and corsair-psu drivers, plus a bindings fix for TI ADS7828" * tag 'hwmon-for-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (tps23861) correct shunt LSB values hwmon: (tps23861) set current shunt value hwmon: (tps23861) define regmap max register hwmon: (scpi-hwmon) shows the negative temperature properly hwmon: (corsair-psu) fix suspend behavior dt-bindings: hwmon: Fix typo in TI ADS7828 bindings commit f30dc8f94e4ffe0e0524fbf79cb6602f48068b4f Merge: 06af8679449d4 6687cd72aa911 Author: Linus Torvalds Date: Fri Jun 11 10:02:30 2021 -0700 Merge tag 'mmc-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC fixes from Ulf Hansson: "A couple of MMC fixes to the Renesas SDHI driver: - Fix HS400 on R-Car M3-W+ - Abort tuning when timeout detected" * tag 'mmc-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+ mmc: renesas_sdhi: abort tuning when timeout detected commit bc8865ab32bb8d71b607cf73a8367ceebda88767 Merge: f1ffa9d4cccc8 159d8c274fd92 Author: Rafael J. Wysocki Date: Fri Jun 11 17:57:24 2021 +0200 Merge branch 'acpi-bus' * acpi-bus: ACPI: Pass the same capabilities to the _OSC regardless of the query flag commit 654430efde27248be563df9a88631204b5fe2df2 Author: Sean Christopherson Date: Thu Jun 10 15:00:26 2021 -0700 KVM: x86/mmu: Calculate and check "full" mmu_role for nested MMU Calculate and check the full mmu_role when initializing the MMU context for the nested MMU, where "full" means the bits and pieces of the role that aren't handled by kvm_calc_mmu_role_common(). While the nested MMU isn't used for shadow paging, things like the number of levels in the guest's page tables are surprisingly important when walking the guest page tables. Failure to reinitialize the nested MMU context if L2's paging mode changes can result in unexpected and/or missed page faults, and likely other explosions. E.g. if an L1 vCPU is running both a 32-bit PAE L2 and a 64-bit L2, the "common" role calculation will yield the same role for both L2s. If the 64-bit L2 is run after the 32-bit PAE L2, L0 will fail to reinitialize the nested MMU context, ultimately resulting in a bad walk of L2's page tables as the MMU will still have a guest root_level of PT32E_ROOT_LEVEL. WARNING: CPU: 4 PID: 167334 at arch/x86/kvm/vmx/vmx.c:3075 ept_save_pdptrs+0x15/0xe0 [kvm_intel] Modules linked in: kvm_intel] CPU: 4 PID: 167334 Comm: CPU 3/KVM Not tainted 5.13.0-rc1-d849817d5673-reqs #185 Hardware name: ASUS Q87M-E/Q87M-E, BIOS 1102 03/03/2014 RIP: 0010:ept_save_pdptrs+0x15/0xe0 [kvm_intel] Code: <0f> 0b c3 f6 87 d8 02 00f RSP: 0018:ffffbba702dbba00 EFLAGS: 00010202 RAX: 0000000000000011 RBX: 0000000000000002 RCX: ffffffff810a2c08 RDX: ffff91d7bc30acc0 RSI: 0000000000000011 RDI: ffff91d7bc30a600 RBP: ffff91d7bc30a600 R08: 0000000000000010 R09: 0000000000000007 R10: 0000000000000000 R11: 0000000000000000 R12: ffff91d7bc30a600 R13: ffff91d7bc30acc0 R14: ffff91d67c123460 R15: 0000000115d7e005 FS: 00007fe8e9ffb700(0000) GS:ffff91d90fb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 000000029f15a001 CR4: 00000000001726e0 Call Trace: kvm_pdptr_read+0x3a/0x40 [kvm] paging64_walk_addr_generic+0x327/0x6a0 [kvm] paging64_gva_to_gpa_nested+0x3f/0xb0 [kvm] kvm_fetch_guest_virt+0x4c/0xb0 [kvm] __do_insn_fetch_bytes+0x11a/0x1f0 [kvm] x86_decode_insn+0x787/0x1490 [kvm] x86_decode_emulated_instruction+0x58/0x1e0 [kvm] x86_emulate_instruction+0x122/0x4f0 [kvm] vmx_handle_exit+0x120/0x660 [kvm_intel] kvm_arch_vcpu_ioctl_run+0xe25/0x1cb0 [kvm] kvm_vcpu_ioctl+0x211/0x5a0 [kvm] __x64_sys_ioctl+0x83/0xb0 do_syscall_64+0x40/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae Cc: Vitaly Kuznetsov Cc: stable@vger.kernel.org Fixes: bf627a928837 ("x86/kvm/mmu: check if MMU reconfiguration is needed in init_kvm_nested_mmu()") Signed-off-by: Sean Christopherson Message-Id: <20210610220026.1364486-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 36524112aba3246d1240c1791c72b26fa54008a3 Author: Arnaldo Carvalho de Melo Date: Tue Jun 8 13:46:18 2021 -0300 tools headers cpufeatures: Sync with the kernel sources To pick the changes in: fb35d30fe5b06cc2 ("x86/cpufeatures: Assign dedicated feature word for CPUID_0x8000001F[EAX]") e7b6385b01d8e9fb ("x86/cpufeatures: Add Intel SGX hardware bits") 1478b99a76534b6c ("x86/cpufeatures: Mark ENQCMD as disabled when configured out") That don't cause any change in the tools, just silences this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h Cc: Borislav Petkov Cc: Fenghua Yu Cc: Sean Christopherson Signed-off-by: Arnaldo Carvalho de Melo commit 197eecb6ecae0b04bd694432f640ff75597fed9c Author: Leo Yan Date: Sat Jun 5 13:29:57 2021 +0800 perf session: Correct buffer copying when peeking events When peeking an event, it has a short path and a long path. The short path uses the session pointer "one_mmap_addr" to directly fetch the event; and the long path needs to read out the event header and the following event data from file and fill into the buffer pointer passed through the argument "buf". The issue is in the long path that it copies the event header and event data into the same destination address which pointer "buf", this means the event header is overwritten. We are just lucky to run into the short path in most cases, so we don't hit the issue in the long path. This patch adds the offset "hdr_sz" to the pointer "buf" when copying the event data, so that it can reserve the event header which can be used properly by its caller. Fixes: 5a52f33adf02 ("perf session: Add perf_session__peek_event()") Signed-off-by: Leo Yan Acked-by: Adrian Hunter Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210605052957.1070720-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit dfdc0a714d241bfbf951886c373cd1ae463fcc25 Author: Wanpeng Li Date: Thu Jun 10 21:59:33 2021 -0700 KVM: X86: Fix x86_emulator slab cache leak Commit c9b8b07cded58 (KVM: x86: Dynamically allocate per-vCPU emulation context) tries to allocate per-vCPU emulation context dynamically, however, the x86_emulator slab cache is still exiting after the kvm module is unload as below after destroying the VM and unloading the kvm module. grep x86_emulator /proc/slabinfo x86_emulator 36 36 2672 12 8 : tunables 0 0 0 : slabdata 3 3 0 This patch fixes this slab cache leak by destroying the x86_emulator slab cache when the kvm module is unloaded. Fixes: c9b8b07cded58 (KVM: x86: Dynamically allocate per-vCPU emulation context) Cc: stable@vger.kernel.org Signed-off-by: Wanpeng Li Message-Id: <1623387573-5969-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 934002cd660b035b926438244b4294e647507e13 Author: Alper Gun Date: Thu Jun 10 17:46:04 2021 +0000 KVM: SVM: Call SEV Guest Decommission if ASID binding fails Send SEV_CMD_DECOMMISSION command to PSP firmware if ASID binding fails. If a failure happens after a successful LAUNCH_START command, a decommission command should be executed. Otherwise, guest context will be unfreed inside the AMD SP. After the firmware will not have memory to allocate more SEV guest context, LAUNCH_START command will begin to fail with SEV_RET_RESOURCE_LIMIT error. The existing code calls decommission inside sev_unbind_asid, but it is not called if a failure happens before guest activation succeeds. If sev_bind_asid fails, decommission is never called. PSP firmware has a limit for the number of guests. If sev_asid_binding fails many times, PSP firmware will not have resources to create another guest context. Cc: stable@vger.kernel.org Fixes: 59414c989220 ("KVM: SVM: Add support for KVM_SEV_LAUNCH_START command") Reported-by: Peter Gonda Signed-off-by: Alper Gun Reviewed-by: Marc Orr Signed-off-by: Paolo Bonzini Message-Id: <20210610174604.2554090-1-alpergun@google.com> commit 7c4363d3948535e6a9116a325b2fb56eab6b88ff Merge: abd062886cd10 63a8eef70ccb5 Author: Greg Kroah-Hartman Date: Fri Jun 11 12:32:49 2021 +0200 Merge tag 'usb-serial-5.13-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.13-rc6 Here are two fixes for the cp210x driver. The first fixes a regression with early revisions of the CP2102N which specifically broke some ESP32 development boards. The second makes sure that the pin configuration is detected properly also for the CP2102N QFN20 package. Both have been in linux-next over night and with no reported issues. * tag 'usb-serial-5.13-rc6' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: cp210x: fix CP2102N-A01 modem control USB: serial: cp210x: fix alternate function for CP2102N QFN20 commit abd062886cd103196b4f26cf735c3a3619dec76b Author: Greg Kroah-Hartman Date: Fri Jun 11 09:18:47 2021 +0200 Revert "usb: gadget: fsl: Re-enable driver for ARM SoCs" This reverts commit e0e8b6abe8c862229ba00cdd806e8598cdef00bb. Turns out this breaks the build. We had numerous reports of problems from linux-next and 0-day about this not working properly, so revert it for now until it can be figured out properly. The build errors are: arm-linux-gnueabi-ld: fsl_udc_core.c:(.text+0x29d4): undefined reference to `fsl_udc_clk_finalize' arm-linux-gnueabi-ld: fsl_udc_core.c:(.text+0x2ba8): undefined reference to `fsl_udc_clk_release' fsl_udc_core.c:(.text+0x2848): undefined reference to `fsl_udc_clk_init' fsl_udc_core.c:(.text+0xe88): undefined reference to `fsl_udc_clk_release' Reported-by: Stephen Rothwell Reported-by: kernel test robot Fixes: e0e8b6abe8c8 ("usb: gadget: fsl: Re-enable driver for ARM SoCs") Cc: stable Cc: Joel Stanley Cc: Leo Li Cc: Peter Chen Cc: Arnd Bergmann Cc: Felipe Balbi Cc: Shawn Guo Cc: Ran Wang Signed-off-by: Greg Kroah-Hartman commit 2d49b721dc18c113d5221f4cf5a6104eb66cb7f2 Author: Peter Zijlstra Date: Thu Jun 10 09:04:29 2021 +0200 objtool: Only rewrite unconditional retpoline thunk calls It turns out that the compilers generate conditional branches to the retpoline thunks like: 5d5: 0f 85 00 00 00 00 jne 5db 5d7: R_X86_64_PLT32 __x86_indirect_thunk_r11-0x4 while the rewrite can only handle JMP/CALL to the thunks. The result is the alternative wrecking the code. Make sure to skip writing the alternatives for conditional branches. Fixes: 9bc0bb50727c ("objtool/x86: Rewrite retpoline thunk calls") Reported-by: Lukasz Majczak Reported-by: Nathan Chancellor Signed-off-by: Peter Zijlstra (Intel) Tested-by: Nathan Chancellor commit 858cf860494fab545abfa206d17efcb8bee73e36 Author: Vitaly Wool Date: Mon May 31 12:33:10 2021 +0300 riscv: alternative: fix typo in macro name alternative-macros.h defines ALT_NEW_CONTENT in its assembly part and ALT_NEW_CONSTENT in the C part. Most likely it is the latter that is wrong. Fixes: 6f4eea90465ad (riscv: Introduce alternative mechanism to apply errata solution) Signed-off-by: Vitaly Wool Signed-off-by: Palmer Dabbelt commit 9be148e408df7d361ec5afd6299b7736ff3928b0 Author: Xiao Ni Date: Fri May 28 14:16:38 2021 +0800 async_xor: check src_offs is not NULL before updating it When PAGE_SIZE is greater than 4kB, multiple stripes may share the same page. Thus, src_offs is added to async_xor_offs() with array of offsets. However, async_xor() passes NULL src_offs to async_xor_offs(). In such case, src_offs should not be updated. Add a check before the update. Fixes: ceaf2966ab08(async_xor: increase src_offs when dropping destination page) Cc: stable@vger.kernel.org # v5.10+ Reported-by: Oleksandr Shchirskyi Tested-by: Oleksandr Shchirskyi Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit 7de5c0d70c779454785dd2431707df5b841eaeaf Merge: 750643a99e677 ab8363d3875a8 Author: Dave Airlie Date: Fri Jun 11 11:17:09 2021 +1000 Merge tag 'amd-drm-fixes-5.13-2021-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.13-2021-06-09: amdgpu: - Use kvzmalloc in amdgu_bo_create - Use drm_dbg_kms for reporting failure to get a GEM FB - Fix some register offsets for Sienna Cichlid - Fix fall-through warning radeon: - memcpy_to/from_io fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210610035631.3943-1-alexander.deucher@amd.com commit 750643a99e6774e65028201a54cf621d5e43dc9c Merge: 43f44f5bd1970 c336a5ee98470 Author: Dave Airlie Date: Fri Jun 11 10:59:49 2021 +1000 Merge tag 'drm-misc-fixes-2021-06-10' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes One fix for snu4i that prevents it from probing, two locking fixes for ttm and drm_auth, one off-by-x1000 fix for mcde and a fix for vc4 to prevent an out-of-bounds access. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210610171653.lqsoadxrhdk73cdy@gilmour commit 43f44f5bd1970fafb259152e1c9d8e6daf0f362d Merge: 614124bea77e4 170b763597d3a Author: Dave Airlie Date: Fri Jun 11 10:45:27 2021 +1000 Merge tag 'drm-msm-fixes-2021-06-10' of https://gitlab.freedesktop.org/drm/msm into drm-fixes - NULL ptr deref fix - CP_PROTECT reg programming fix - incorrect register shift fix - DSI blank screen fix Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvbcz0=QxGYnX9u7cD1SCvFSx20dzrZuOccjtRRBTJd5Q@mail.gmail.com commit 110febc0148f8ab867344061d5cf95ee1e1ebb3e Author: Vineet Gupta Date: Fri Feb 26 10:35:39 2021 -0800 ARC: fix CONFIG_HARDENED_USERCOPY Currently enabling this triggers a warning | usercopy: Kernel memory overwrite attempt detected to kernel text (offset 155633, size 11)! | usercopy: BUG: failure at mm/usercopy.c:99/usercopy_abort()! | |gcc generated __builtin_trap |Path: /bin/busybox |CPU: 0 PID: 84 Comm: init Not tainted 5.4.22 | |[ECR ]: 0x00090005 => gcc generated __builtin_trap |[EFA ]: 0x9024fcaa |[BLINK ]: usercopy_abort+0x8a/0x8c |[ERET ]: memfd_fcntl+0x0/0x470 |[STAT32]: 0x80080802 : IE K |... |... |Stack Trace: | memfd_fcntl+0x0/0x470 | usercopy_abort+0x8a/0x8c | __check_object_size+0x10e/0x138 | copy_strings+0x1f4/0x38c | __do_execve_file+0x352/0x848 | EV_Trap+0xcc/0xd0 The issue is triggered by an allocation in "init reclaimed" region. ARC _stext emcompasses the init region (for historical reasons we wanted the init.text to be under .text as well). This however trips up __check_object_size()->check_kernel_text_object() which treats this as object bleeding into kernel text. Fix that by rezoning _stext to start from regular kernel .text and leave out .init altogether. Fixes: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/15 Reported-by: Evgeniy Didin Reviewed-by: Kees Cook Signed-off-by: Vineet Gupta commit 96f1b00138cb8f04c742c82d0a7c460b2202e887 Author: Vineet Gupta Date: Tue Jun 8 19:39:25 2021 -0700 ARCv2: save ABI registers across signal handling ARCv2 has some configuration dependent registers (r30, r58, r59) which could be targetted by the compiler. To keep the ABI stable, these were unconditionally part of the glibc ABI (sysdeps/unix/sysv/linux/arc/sys/ucontext.h:mcontext_t) however we missed populating them (by saving/restoring them across signal handling). This patch fixes the issue by - adding arcv2 ABI regs to kernel struct sigcontext - populating them during signal handling Change to struct sigcontext might seem like a glibc ABI change (although it primarily uses ucontext_t:mcontext_t) but the fact is - it has only been extended (existing fields are not touched) - the old sigcontext was ABI incomplete to begin with anyways Fixes: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/53 Cc: Tested-by: kernel test robot Reported-by: Vladimir Isaev Signed-off-by: Vineet Gupta commit 232e3683b4ee529a0643fa45b3f0f6c06590aca2 Merge: 22488e45501ec 499ada5073361 Author: David S. Miller Date: Thu Jun 10 16:47:45 2021 -0700 Merge branch 'mptcp-fixes' Mat Martineau says: ==================== mptcp: More v5.13 fixes Here's another batch of MPTCP fixes for v5.13. Patch 1 cleans up memory accounting between the MPTCP-level socket and the subflows to more reliably transfer forward allocated memory under pressure. Patch 2 wakes up socket readers more reliably. Patch 3 changes a WARN_ONCE to a pr_debug. Patch 4 changes the selftests to only use syncookies in test cases where they do not cause spurious failures. Patch 5 modifies socket error reporting to avoid a possible soft lockup. ==================== Signed-off-by: David S. Miller commit 499ada5073361c631f2a3c4a8aed44d53b6f82ec Author: Paolo Abeni Date: Thu Jun 10 15:59:44 2021 -0700 mptcp: fix soft lookup in subflow_error_report() Maxim reported a soft lookup in subflow_error_report(): watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:0] RIP: 0010:native_queued_spin_lock_slowpath RSP: 0018:ffffa859c0003bc0 EFLAGS: 00000202 RAX: 0000000000000101 RBX: 0000000000000001 RCX: 0000000000000000 RDX: ffff9195c2772d88 RSI: 0000000000000000 RDI: ffff9195c2772d88 RBP: ffff9195c2772d00 R08: 00000000000067b0 R09: c6e31da9eb1e44f4 R10: ffff9195ef379700 R11: ffff9195edb50710 R12: ffff9195c2772d88 R13: ffff9195f500e3d0 R14: ffff9195ef379700 R15: ffff9195ef379700 FS: 0000000000000000(0000) GS:ffff91961f400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c000407000 CR3: 0000000002988000 CR4: 00000000000006f0 Call Trace: _raw_spin_lock_bh subflow_error_report mptcp_subflow_data_available __mptcp_move_skbs_from_subflow mptcp_data_ready tcp_data_queue tcp_rcv_established tcp_v4_do_rcv tcp_v4_rcv ip_protocol_deliver_rcu ip_local_deliver_finish __netif_receive_skb_one_core netif_receive_skb rtl8139_poll 8139too __napi_poll net_rx_action __do_softirq __irq_exit_rcu common_interrupt The calling function - mptcp_subflow_data_available() - can be invoked from different contexts: - plain ssk socket lock - ssk socket lock + mptcp_data_lock - ssk socket lock + mptcp_data_lock + msk socket lock. Since subflow_error_report() tries to acquire the mptcp_data_lock, the latter two call chains will cause soft lookup. This change addresses the issue moving the error reporting call to outer functions, where the held locks list is known and the we can acquire only the needed one. Reported-by: Maxim Galaganov Fixes: 15cc10453398 ("mptcp: deliver ssk errors to msk") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/199 Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 2395da0e17935ce9158cdfae433962bdb6cbfa67 Author: Paolo Abeni Date: Thu Jun 10 15:59:43 2021 -0700 selftests: mptcp: enable syncookie only in absence of reorders Syncookie validation may fail for OoO packets, causing spurious resets and self-tests failures, so let's force syncookie only for tests iteration with no OoO. Fixes: fed61c4b584c ("selftests: mptcp: make 2nd net namespace use tcp syn cookies unconditionally") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/198 Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 61e710227e97172355d5f150d5c78c64175d9fb2 Author: Paolo Abeni Date: Thu Jun 10 15:59:42 2021 -0700 mptcp: do not warn on bad input from the network warn_bad_map() produces a kernel WARN on bad input coming from the network. Use pr_debug() to avoid spamming the system log. Additionally, when the right bound check fails, warn_bad_map() reports the wrong ssn value, let's fix it. Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/107 Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 99d1055ce2469dca3dd14be0991ff8133e25e3d0 Author: Paolo Abeni Date: Thu Jun 10 15:59:41 2021 -0700 mptcp: wake-up readers only for in sequence data Currently we rely on the subflow->data_avail field, which is subject to races: ssk1 skb len = 500 DSS(seq=1, len=1000, off=0) # data_avail == MPTCP_SUBFLOW_DATA_AVAIL ssk2 skb len = 500 DSS(seq = 501, len=1000) # data_avail == MPTCP_SUBFLOW_DATA_AVAIL ssk1 skb len = 500 DSS(seq = 1, len=1000, off =500) # still data_avail == MPTCP_SUBFLOW_DATA_AVAIL, # as the skb is covered by a pre-existing map, # which was in-sequence at reception time. Instead we can explicitly check if some has been received in-sequence, propagating the info from __mptcp_move_skbs_from_subflow(). Additionally add the 'ONCE' annotation to the 'data_avail' memory access, as msk will read it outside the subflow socket lock. Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 72f961320d5d15bfcb26dbe3edaa3f7d25fd2c8a Author: Paolo Abeni Date: Thu Jun 10 15:59:40 2021 -0700 mptcp: try harder to borrow memory from subflow under pressure If the host is under sever memory pressure, and RX forward memory allocation for the msk fails, we try to borrow the required memory from the ingress subflow. The current attempt is a bit flaky: if skb->truesize is less than SK_MEM_QUANTUM, the ssk will not release any memory, and the next schedule will fail again. Instead, directly move the required amount of pages from the ssk to the msk, if available Fixes: 9c3f94e1681b ("mptcp: add missing memory scheduling in the rx path") Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 42e0e0b453bc6ead49c573ed512502069627546b Author: Jisheng Zhang Date: Tue May 11 00:28:38 2021 +0800 riscv: code patching only works on !XIP_KERNEL Some features which need code patching such as KPROBES, DYNAMIC_FTRACE KGDB can only work on !XIP_KERNEL. Add dependencies for these features that rely on code patching. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 5e63215c2f64079fbd011df5005c8bea63f149c2 Author: Vitaly Wool Date: Mon May 31 11:53:42 2021 +0300 riscv: xip: support runtime trap patching RISCV_ERRATA_ALTERNATIVE patches text at runtime which is currently not possible when the kernel is executed from the flash in XIP mode. Since runtime patching concerns only traps at the moment, let's just have all the traps reside in RAM anyway if RISCV_ERRATA_ALTERNATIVE is set. Thus, these functions will be patch-able even when the .text section is in flash. Signed-off-by: Vitaly Wool Signed-off-by: Palmer Dabbelt commit 9690557e22d63f13534fd167d293ac8ed8b104f9 Author: Pavel Begunkov Date: Thu Jun 10 16:37:38 2021 +0100 io_uring: add feature flag for rsrc tags Add IORING_FEAT_RSRC_TAGS indicating that io_uring supports a bunch of new IORING_REGISTER operations, in particular IORING_REGISTER_[FILES[,UPDATE]2,BUFFERS[2,UPDATE]] that support rsrc tagging, and also indicating implemented dynamic fixed buffer updates. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9b995d4045b6c6b4ab7510ca124fd25ac2203af7.1623339162.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 992da01aa932b432ef8dc3885fa76415b5dbe43f Author: Pavel Begunkov Date: Thu Jun 10 16:37:37 2021 +0100 io_uring: change registration/upd/rsrc tagging ABI There are ABI moments about recently added rsrc registration/update and tagging that might become a nuisance in the future. First, IORING_REGISTER_RSRC[_UPD] hide different types of resources under it, so breaks fine control over them by restrictions. It works for now, but once those are wanted under restrictions it would require a rework. It was also inconvenient trying to fit a new resource not supporting all the features (e.g. dynamic update) into the interface, so better to return to IORING_REGISTER_* top level dispatching. Second, register/update were considered to accept a type of resource, however that's not a good idea because there might be several ways of registration of a single resource type, e.g. we may want to add non-contig buffers or anything more exquisite as dma mapped memory. So, remove IORING_RSRC_[FILE,BUFFER] out of the ABI, and place them internally for now to limit changes. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9b554897a7c17ad6e3becc48dfed2f7af9f423d5.1623339162.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 22488e45501eca74653b502b194eb0eb25d2ad00 Merge: 0280f429dc21d 12f36e9bf678a Author: David S. Miller Date: Thu Jun 10 14:33:56 2021 -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) Fix a crash when stateful expression with its own gc callback is used in a set definition. 2) Skip IPv6 packets from any link-local address in IPv6 fib expression. Add a selftest for this scenario, from Florian Westphal. ==================== Signed-off-by: David S. Miller commit 0280f429dc21d7b8196c401990eab6abe630006f Merge: d1b5bee4c8be0 ba91c49dedbde Author: David S. Miller Date: Thu Jun 10 14:26:18 2021 -0700 Merge branch 'tcp-options-oob-fixes' Maxim Mikityanskiy says: ==================== Fix out of bounds when parsing TCP options This series fixes out-of-bounds access in various places in the kernel where parsing of TCP options takes place. Fortunately, many more occurrences don't have this bug. v2 changes: synproxy: Added an early return when length < 0 to avoid calling skb_header_pointer with negative length. sch_cake: Added doff validation to avoid parsing garbage. ==================== Signed-off-by: David S. Miller commit ba91c49dedbde758ba0b72f57ac90b06ddf8e548 Author: Maxim Mikityanskiy Date: Thu Jun 10 19:40:31 2021 +0300 sch_cake: Fix out of bounds when parsing TCP options and header The TCP option parser in cake qdisc (cake_get_tcpopt and cake_tcph_may_drop) could read one byte out of bounds. When the length is 1, the execution flow gets into the loop, reads one byte of the opcode, and if the opcode is neither TCPOPT_EOL nor TCPOPT_NOP, it reads one more byte, which exceeds the length of 1. This fix is inspired by commit 9609dad263f8 ("ipv4: tcp_input: fix stack out of bounds when parsing TCP options."). v2 changes: Added doff validation in cake_get_tcphdr to avoid parsing garbage as TCP header. Although it wasn't strictly an out-of-bounds access (memory was allocated), garbage values could be read where CAKE expected the TCP header if doff was smaller than 5. Cc: Young Xiao <92siuyang@gmail.com> Fixes: 8b7138814f29 ("sch_cake: Add optional ACK filter") Signed-off-by: Maxim Mikityanskiy Acked-by: Toke Høiland-Jørgensen Signed-off-by: David S. Miller commit 07718be265680dcf496347d475ce1a5442f55ad7 Author: Maxim Mikityanskiy Date: Thu Jun 10 19:40:30 2021 +0300 mptcp: Fix out of bounds when parsing TCP options The TCP option parser in mptcp (mptcp_get_options) could read one byte out of bounds. When the length is 1, the execution flow gets into the loop, reads one byte of the opcode, and if the opcode is neither TCPOPT_EOL nor TCPOPT_NOP, it reads one more byte, which exceeds the length of 1. This fix is inspired by commit 9609dad263f8 ("ipv4: tcp_input: fix stack out of bounds when parsing TCP options."). Cc: Young Xiao <92siuyang@gmail.com> Fixes: cec37a6e41aa ("mptcp: Handle MP_CAPABLE options for outgoing connections") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Mat Martineau Signed-off-by: David S. Miller commit 5fc177ab759418c9537433e63301096e733fb915 Author: Maxim Mikityanskiy Date: Thu Jun 10 19:40:29 2021 +0300 netfilter: synproxy: Fix out of bounds when parsing TCP options The TCP option parser in synproxy (synproxy_parse_options) could read one byte out of bounds. When the length is 1, the execution flow gets into the loop, reads one byte of the opcode, and if the opcode is neither TCPOPT_EOL nor TCPOPT_NOP, it reads one more byte, which exceeds the length of 1. This fix is inspired by commit 9609dad263f8 ("ipv4: tcp_input: fix stack out of bounds when parsing TCP options."). v2 changes: Added an early return when length < 0 to avoid calling skb_header_pointer with negative length. Cc: Young Xiao <92siuyang@gmail.com> Fixes: 48b1de4c110a ("netfilter: add SYNPROXY core/target") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Florian Westphal Signed-off-by: David S. Miller commit d1b5bee4c8be01585033be9b3a8878789285285f Author: Eric Dumazet Date: Thu Jun 10 09:00:12 2021 -0700 net/packet: annotate data race in packet_sendmsg() There is a known race in packet_sendmsg(), addressed in commit 32d3182cd2cd ("net/packet: fix race in tpacket_snd()") Now we have data_race(), we can use it to avoid a future KCSAN warning, as syzbot loves stressing af_packet sockets :) Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit b71eaed8c04f72a919a9c44e83e4ee254e69e7f3 Author: Eric Dumazet Date: Thu Jun 10 07:44:11 2021 -0700 inet: annotate date races around sk->sk_txhash UDP sendmsg() path can be lockless, it is possible for another thread to re-connect an change sk->sk_txhash under us. There is no serious impact, but we can use READ_ONCE()/WRITE_ONCE() pair to document the race. BUG: KCSAN: data-race in __ip4_datagram_connect / skb_set_owner_w write to 0xffff88813397920c of 4 bytes by task 30997 on cpu 1: sk_set_txhash include/net/sock.h:1937 [inline] __ip4_datagram_connect+0x69e/0x710 net/ipv4/datagram.c:75 __ip6_datagram_connect+0x551/0x840 net/ipv6/datagram.c:189 ip6_datagram_connect+0x2a/0x40 net/ipv6/datagram.c:272 inet_dgram_connect+0xfd/0x180 net/ipv4/af_inet.c:580 __sys_connect_file net/socket.c:1837 [inline] __sys_connect+0x245/0x280 net/socket.c:1854 __do_sys_connect net/socket.c:1864 [inline] __se_sys_connect net/socket.c:1861 [inline] __x64_sys_connect+0x3d/0x50 net/socket.c:1861 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff88813397920c of 4 bytes by task 31039 on cpu 0: skb_set_hash_from_sk include/net/sock.h:2211 [inline] skb_set_owner_w+0x118/0x220 net/core/sock.c:2101 sock_alloc_send_pskb+0x452/0x4e0 net/core/sock.c:2359 sock_alloc_send_skb+0x2d/0x40 net/core/sock.c:2373 __ip6_append_data+0x1743/0x21a0 net/ipv6/ip6_output.c:1621 ip6_make_skb+0x258/0x420 net/ipv6/ip6_output.c:1983 udpv6_sendmsg+0x160a/0x16b0 net/ipv6/udp.c:1527 inet6_sendmsg+0x5f/0x80 net/ipv6/af_inet6.c:642 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x360/0x4d0 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmmsg+0x315/0x4b0 net/socket.c:2490 __do_sys_sendmmsg net/socket.c:2519 [inline] __se_sys_sendmmsg net/socket.c:2516 [inline] __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2516 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0xbca3c43d -> 0xfdb309e0 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 31039 Comm: syz-executor.2 Not tainted 5.13.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit f13ef10059ccf5f4ed201cd050176df62ec25bb8 Author: Eric Dumazet Date: Thu Jun 10 07:27:37 2021 -0700 net: annotate data race in sock_error() sock_error() is known to be racy. The code avoids an atomic operation is sk_err is zero, and this field could be changed under us, this is fine. Sysbot reported: BUG: KCSAN: data-race in sock_alloc_send_pskb / unix_release_sock write to 0xffff888131855630 of 4 bytes by task 9365 on cpu 1: unix_release_sock+0x2e9/0x6e0 net/unix/af_unix.c:550 unix_release+0x2f/0x50 net/unix/af_unix.c:859 __sock_release net/socket.c:599 [inline] sock_close+0x6c/0x150 net/socket.c:1258 __fput+0x25b/0x4e0 fs/file_table.c:280 ____fput+0x11/0x20 fs/file_table.c:313 task_work_run+0xae/0x130 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x156/0x190 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301 do_syscall_64+0x56/0x90 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff888131855630 of 4 bytes by task 9385 on cpu 0: sock_error include/net/sock.h:2269 [inline] sock_alloc_send_pskb+0xe4/0x4e0 net/core/sock.c:2336 unix_dgram_sendmsg+0x478/0x1610 net/unix/af_unix.c:1671 unix_seqpacket_sendmsg+0xc2/0x100 net/unix/af_unix.c:2055 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x360/0x4d0 net/socket.c:2350 __sys_sendmsg_sock+0x25/0x30 net/socket.c:2416 io_sendmsg fs/io_uring.c:4367 [inline] io_issue_sqe+0x231a/0x6750 fs/io_uring.c:6135 __io_queue_sqe+0xe9/0x360 fs/io_uring.c:6414 __io_req_task_submit fs/io_uring.c:2039 [inline] io_async_task_func+0x312/0x590 fs/io_uring.c:5074 __tctx_task_work fs/io_uring.c:1910 [inline] tctx_task_work+0x1d4/0x3d0 fs/io_uring.c:1924 task_work_run+0xae/0x130 kernel/task_work.c:164 tracehook_notify_signal include/linux/tracehook.h:212 [inline] handle_signal_work kernel/entry/common.c:145 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0xf8/0x190 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301 do_syscall_64+0x56/0x90 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x00000000 -> 0x00000068 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 9385 Comm: syz-executor.3 Not tainted 5.13.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 172947ac678e426cc8eb0e4107017d1fb38c6037 Merge: 9d44fa3e50cc9 cfc579f9d89af Author: David S. Miller Date: Thu Jun 10 14:06:43 2021 -0700 Merge branch 'bridge-egress-fixes' Nikolay Aleksandrov says: ==================== net: bridge: vlan tunnel egress path fixes These two fixes take care of tunnel_dst problems in the vlan tunnel egress path. Patch 01 fixes a null ptr deref due to the lockless use of tunnel_dst pointer without checking it first, and patch 02 fixes a use-after-free issue due to wrong dst refcounting (dst_clone() -> dst_hold_safe()). Both fix the same commit and should be queued for stable backports: Fixes: 11538d039ac6 ("bridge: vlan dst_metadata hooks in ingress and egress paths") v2: no changes, added stable list to CC ==================== Signed-off-by: David S. Miller commit cfc579f9d89af4ada58c69b03bcaa4887840f3b3 Author: Nikolay Aleksandrov Date: Thu Jun 10 15:04:11 2021 +0300 net: bridge: fix vlan tunnel dst refcnt when egressing The egress tunnel code uses dst_clone() and directly sets the result which is wrong because the entry might have 0 refcnt or be already deleted, causing number of problems. It also triggers the WARN_ON() in dst_hold()[1] when a refcnt couldn't be taken. Fix it by using dst_hold_safe() and checking if a reference was actually taken before setting the dst. [1] dmesg WARN_ON log and following refcnt errors WARNING: CPU: 5 PID: 38 at include/net/dst.h:230 br_handle_egress_vlan_tunnel+0x10b/0x134 [bridge] Modules linked in: 8021q garp mrp bridge stp llc bonding ipv6 virtio_net CPU: 5 PID: 38 Comm: ksoftirqd/5 Kdump: loaded Tainted: G W 5.13.0-rc3+ #360 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014 RIP: 0010:br_handle_egress_vlan_tunnel+0x10b/0x134 [bridge] Code: e8 85 bc 01 e1 45 84 f6 74 90 45 31 f6 85 db 48 c7 c7 a0 02 19 a0 41 0f 94 c6 31 c9 31 d2 44 89 f6 e8 64 bc 01 e1 85 db 75 02 <0f> 0b 31 c9 31 d2 44 89 f6 48 c7 c7 70 02 19 a0 e8 4b bc 01 e1 49 RSP: 0018:ffff8881003d39e8 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffffffffa01902a0 RBP: ffff8881040c6700 R08: 0000000000000000 R09: 0000000000000001 R10: 2ce93d0054fe0d00 R11: 54fe0d00000e0000 R12: ffff888109515000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000401 FS: 0000000000000000(0000) GS:ffff88822bf40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f42ba70f030 CR3: 0000000109926000 CR4: 00000000000006e0 Call Trace: br_handle_vlan+0xbc/0xca [bridge] __br_forward+0x23/0x164 [bridge] deliver_clone+0x41/0x48 [bridge] br_handle_frame_finish+0x36f/0x3aa [bridge] ? skb_dst+0x2e/0x38 [bridge] ? br_handle_ingress_vlan_tunnel+0x3e/0x1c8 [bridge] ? br_handle_frame_finish+0x3aa/0x3aa [bridge] br_handle_frame+0x2c3/0x377 [bridge] ? __skb_pull+0x33/0x51 ? vlan_do_receive+0x4f/0x36a ? br_handle_frame_finish+0x3aa/0x3aa [bridge] __netif_receive_skb_core+0x539/0x7c6 ? __list_del_entry_valid+0x16e/0x1c2 __netif_receive_skb_list_core+0x6d/0xd6 netif_receive_skb_list_internal+0x1d9/0x1fa gro_normal_list+0x22/0x3e dev_gro_receive+0x55b/0x600 ? detach_buf_split+0x58/0x140 napi_gro_receive+0x94/0x12e virtnet_poll+0x15d/0x315 [virtio_net] __napi_poll+0x2c/0x1c9 net_rx_action+0xe6/0x1fb __do_softirq+0x115/0x2d8 run_ksoftirqd+0x18/0x20 smpboot_thread_fn+0x183/0x19c ? smpboot_unregister_percpu_thread+0x66/0x66 kthread+0x10a/0x10f ? kthread_mod_delayed_work+0xb6/0xb6 ret_from_fork+0x22/0x30 ---[ end trace 49f61b07f775fd2b ]--- dst_release: dst:00000000c02d677a refcnt:-1 dst_release underflow Cc: stable@vger.kernel.org Fixes: 11538d039ac6 ("bridge: vlan dst_metadata hooks in ingress and egress paths") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 58e2071742e38f29f051b709a5cca014ba51166f Author: Nikolay Aleksandrov Date: Thu Jun 10 15:04:10 2021 +0300 net: bridge: fix vlan tunnel dst null pointer dereference This patch fixes a tunnel_dst null pointer dereference due to lockless access in the tunnel egress path. When deleting a vlan tunnel the tunnel_dst pointer is set to NULL without waiting a grace period (i.e. while it's still usable) and packets egressing are dereferencing it without checking. Use READ/WRITE_ONCE to annotate the lockless use of tunnel_id, use RCU for accessing tunnel_dst and make sure it is read only once and checked in the egress path. The dst is already properly RCU protected so we don't need to do anything fancy than to make sure tunnel_id and tunnel_dst are read only once and checked in the egress path. Cc: stable@vger.kernel.org Fixes: 11538d039ac6 ("bridge: vlan dst_metadata hooks in ingress and egress paths") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 06af8679449d4ed282df13191fc52d5ba28ec536 Author: Eric W. Biederman Date: Thu Jun 10 15:11:11 2021 -0500 coredump: Limit what can interrupt coredumps Olivier Langlois has been struggling with coredumps being incompletely written in processes using io_uring. Olivier Langlois writes: > io_uring is a big user of task_work and any event that io_uring made a > task waiting for that occurs during the core dump generation will > generate a TIF_NOTIFY_SIGNAL. > > Here are the detailed steps of the problem: > 1. io_uring calls vfs_poll() to install a task to a file wait queue > with io_async_wake() as the wakeup function cb from io_arm_poll_handler() > 2. wakeup function ends up calling task_work_add() with TWA_SIGNAL > 3. task_work_add() sets the TIF_NOTIFY_SIGNAL bit by calling > set_notify_signal() The coredump code deliberately supports being interrupted by SIGKILL, and depends upon prepare_signal to filter out all other signals. Now that signal_pending includes wake ups for TIF_NOTIFY_SIGNAL this hack in dump_emitted by the coredump code no longer works. Make the coredump code more robust by explicitly testing for all of the wakeup conditions the coredump code supports. This prevents new wakeup conditions from breaking the coredump code, as well as fixing the current issue. The filesystem code that the coredump code uses already limits itself to only aborting on fatal_signal_pending. So it should not develop surprising wake-up reasons either. v2: Don't remove the now unnecessary code in prepare_signal. Cc: stable@vger.kernel.org Fixes: 12db8b690010 ("entry: Add support for TIF_NOTIFY_SIGNAL") Reported-by: Olivier Langlois Signed-off-by: "Eric W. Biederman" Signed-off-by: Linus Torvalds commit 9d44fa3e50cc91691896934d106c86e4027e61ca Author: Zheng Yongjun Date: Thu Jun 10 09:41:36 2021 +0800 ping: Check return value of function 'ping_queue_rcv_skb' Function 'ping_queue_rcv_skb' not always return success, which will also return fail. If not check the wrong return value of it, lead to function `ping_rcv` return success. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 3bdd5ee0ec8c14131d560da492e6df452c6fdd75 Author: Willem de Bruijn Date: Wed Jun 9 18:41:57 2021 -0400 skbuff: fix incorrect msg_zerocopy copy notifications msg_zerocopy signals if a send operation required copying with a flag in serr->ee.ee_code. This field can be incorrect as of the below commit, as a result of both structs uarg and serr pointing into the same skb->cb[]. uarg->zerocopy must be read before skb->cb[] is reinitialized to hold serr. Similar to other fields len, hi and lo, use a local variable to temporarily hold the value. This was not a problem before, when the value was passed as a function argument. Fixes: 75518851a2a0 ("skbuff: Push status and refcounts into sock_zerocopy_callback") Reported-by: Talal Ahmad Signed-off-by: Willem de Bruijn Acked-by: Soheil Hassas Yeganeh Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit 388fa7f13d61074ba3aaedce0f47ff92441c0b1a Merge: 6cde05ab93df7 54e1217b90486 Author: David S. Miller Date: Thu Jun 10 13:38:46 2021 -0700 Merge tag 'mlx5-fixes-2021-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-fixes-2021-06-09 ==================== Signed-off-by: David S. Miller commit f09eacca59d27efc15001795c33dbc78ca070732 Merge: 29a877d576847 b7e24eb1caa5f Author: Linus Torvalds Date: Thu Jun 10 12:01:22 2021 -0700 Merge branch 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fix from Tejun Heo: "This is a high priority but low risk fix for a cgroup1 bug where rename(2) can change a cgroup's name to something which can break parsing of /proc/PID/cgroup" * 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup1: don't allow '\n' in renaming commit 142d0b24c1b17139f1aaaacae7542a38aa85640f Author: Bjorn Andersson Date: Wed Jun 9 17:21:32 2021 -0700 usb: typec: mux: Fix copy-paste mistake in typec_mux_match Fix the copy-paste mistake in the return path of typec_mux_match(), where dev is considered a member of struct typec_switch rather than struct typec_mux. The two structs are identical in regards to having the struct device as the first entry, so this provides no functional change. Fixes: 3370db35193b ("usb: typec: Registering real device entries for the muxes") Reviewed-by: Heikki Krogerus Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210610002132.3088083-1-bjorn.andersson@linaro.org Signed-off-by: Greg Kroah-Hartman commit f247f0a82a4f8c3bfed178d8fd9e069d1424ee4e Author: Mayank Rana Date: Wed Jun 9 00:35:35 2021 -0700 usb: typec: ucsi: Clear PPM capability data in ucsi_init() error path If ucsi_init() fails for some reason (e.g. ucsi_register_port() fails or general communication failure to the PPM), particularly at any point after the GET_CAPABILITY command had been issued, this results in unwinding the initialization and returning an error. However the ucsi structure's ucsi_capability member retains its current value, including likely a non-zero num_connectors. And because ucsi_init() itself is done in a workqueue a UCSI interface driver will be unaware that it failed and may think the ucsi_register() call was completely successful. Later, if ucsi_unregister() is called, due to this stale ucsi->cap value it would try to access the items in the ucsi->connector array which might not be in a proper state or not even allocated at all and results in NULL or invalid pointer dereference. Fix this by clearing the ucsi->cap value to 0 during the error path of ucsi_init() in order to prevent a later ucsi_unregister() from entering the connector cleanup loop. Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") Cc: stable@vger.kernel.org Acked-by: Heikki Krogerus Signed-off-by: Mayank Rana Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210609073535.5094-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit e0e8b6abe8c862229ba00cdd806e8598cdef00bb Author: Joel Stanley Date: Thu Jun 10 13:19:57 2021 +0930 usb: gadget: fsl: Re-enable driver for ARM SoCs The commit a390bef7db1f ("usb: gadget: fsl_mxc_udc: Remove the driver") dropped the ARCH_MXC dependency from USB_FSL_USB2, leaving it depending solely on FSL_SOC. FSL_SOC is powerpc only; it was briefly available on ARM in 2014 but was removed by commit cfd074ad8600 ("ARM: imx: temporarily remove CONFIG_SOC_FSL from LS1021A"). Therefore the driver can no longer be enabled on ARM platforms. This appears to be a mistake as arm64's ARCH_LAYERSCAPE and arm32 SOC_LS1021A SoCs use this symbol. It's enabled in these defconfigs: arch/arm/configs/imx_v6_v7_defconfig:CONFIG_USB_FSL_USB2=y arch/arm/configs/multi_v7_defconfig:CONFIG_USB_FSL_USB2=y arch/powerpc/configs/mgcoge_defconfig:CONFIG_USB_FSL_USB2=y arch/powerpc/configs/mpc512x_defconfig:CONFIG_USB_FSL_USB2=y To fix, expand the dependencies so USB_FSL_USB2 can be enabled on the ARM platforms, and with COMPILE_TEST. Fixes: a390bef7db1f ("usb: gadget: fsl_mxc_udc: Remove the driver") Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210610034957.93376-1-joel@jms.id.au Cc: stable Signed-off-by: Greg Kroah-Hartman commit d5ab95da2a41567440097c277c5771ad13928dad Author: Andy Shevchenko Date: Wed Jun 9 20:22:02 2021 +0300 usb: typec: wcove: Use LE to CPU conversion when accessing msg->header As LKP noticed the Sparse is not happy about strict type handling: .../typec/tcpm/wcove.c:380:50: sparse: expected unsigned short [usertype] header .../typec/tcpm/wcove.c:380:50: sparse: got restricted __le16 const [usertype] header Fix this by switching to use pd_header_cnt_le() instead of pd_header_cnt() in the affected code. Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCPM code together") Fixes: 3c4fb9f16921 ("usb: typec: wcove: start using tcpm for USB PD support") Reported-by: kernel test robot Reviewed-by: Heikki Krogerus Reviewed-by: Guenter Roeck Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210609172202.83377-1-andriy.shevchenko@linux.intel.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 29a877d5768471c5ed97ea967c0ee9436b8c03fc Merge: cd1245d75ce93 2ba0aa2feebda Author: Linus Torvalds Date: Thu Jun 10 10:53:04 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "A mixture of small bug fixes and a small security issue: - WARN_ON when IPoIB is automatically moved between namespaces - Long standing bug where mlx5 would use the wrong page for the doorbell recovery memory if fork is used - Security fix for mlx4 that disables the timestamp feature - Several crashers for mlx5 - Plug a recent mlx5 memory leak for the sig_mr" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: IB/mlx5: Fix initializing CQ fragments buffer RDMA/mlx5: Delete right entry from MR signature database RDMA: Verify port when creating flow rule RDMA/mlx5: Block FDB rules when not in switchdev mode RDMA/mlx4: Do not map the core_clock page to user space unless enabled RDMA/mlx5: Use different doorbell memory for different processes RDMA/ipoib: Fix warning caused by destroying non-initial netns commit 382e6e177bc1c02473e56591fe5083ae1e4904f6 Author: Marc Zyngier Date: Thu Jun 10 15:13:46 2021 +0100 irqchip/gic-v3: Workaround inconsistent PMR setting on NMI entry The arm64 entry code suffers from an annoying issue on taking a NMI, as it sets PMR to a value that actually allows IRQs to be acknowledged. This is done for consistency with other parts of the code, and is in the process of being fixed. This shouldn't be a problem, as we are not enabling interrupts whilst in NMI context. However, in the infortunate scenario that we took a spurious NMI (retired before the read of IAR) *and* that there is an IRQ pending at the same time, we'll ack the IRQ in NMI context. Too bad. In order to avoid deadlocks while running something like perf, teach the GICv3 driver about this situation: if we were in a context where no interrupt should have fired, transiently set PMR to a value that only allows NMIs before acking the pending interrupt, and restore the original value after that. This papers over the core issue for the time being, and makes NMIs great again. Sort of. Fixes: 4d6a38da8e79e94c ("arm64: entry: always set GIC_PRIO_PSR_I_SET during entry") Co-developed-by: Mark Rutland Signed-off-by: Mark Rutland Signed-off-by: Marc Zyngier Reviewed-by: Mark Rutland Link: https://lore.kernel.org/lkml/20210610145731.1350460-1-maz@kernel.org commit e13d1127241404f1c3eb1379ac4dd100eaf385b4 Author: Robert Marko Date: Thu Jun 10 00:07:28 2021 +0200 hwmon: (tps23861) correct shunt LSB values Current shunt LSB values got reversed during in the original driver commit. So, correct the current shunt LSB values according to the datasheet. This caused reading slightly skewed current values. Fixes: fff7b8ab2255 ("hwmon: add Texas Instruments TPS23861 driver") Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210609220728.499879-3-robert.marko@sartura.hr Signed-off-by: Guenter Roeck commit b325d3526e14942d42c392c2ac9fbea59c22894c Author: Robert Marko Date: Thu Jun 10 00:07:27 2021 +0200 hwmon: (tps23861) set current shunt value TPS23861 has a configuration bit for setting of the current shunt value used on the board. Its bit 0 of the General Mask 1 register. According to the datasheet bit values are: 0 for 255 mOhm (Default) 1 for 250 mOhm So, configure the bit before registering the hwmon device according to the value passed in the DTS or default one if none is passed. This caused potentially reading slightly skewed values due to max current value being 1.02A when 250mOhm shunt is used instead of 1.0A when 255mOhm is used. Fixes: fff7b8ab2255 ("hwmon: add Texas Instruments TPS23861 driver") Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210609220728.499879-2-robert.marko@sartura.hr Signed-off-by: Guenter Roeck commit fb8543fb863e89baa433b4d716d73395caa1b7f4 Author: Robert Marko Date: Thu Jun 10 00:07:26 2021 +0200 hwmon: (tps23861) define regmap max register Define the max register address the device supports. This allows reading the whole register space via regmap debugfs, without it only register 0x0 is visible. This was forgotten in the original driver commit. Fixes: fff7b8ab2255 ("hwmon: add Texas Instruments TPS23861 driver") Signed-off-by: Robert Marko Link: https://lore.kernel.org/r/20210609220728.499879-1-robert.marko@sartura.hr Signed-off-by: Guenter Roeck commit 83e197a8414c0ba545e7e3916ce05f836f349273 Author: Takashi Iwai Date: Thu Jun 10 17:20:59 2021 +0200 ALSA: seq: Fix race of snd_seq_timer_open() The timer instance per queue is exclusive, and snd_seq_timer_open() should have managed the concurrent accesses. It looks as if it's checking the already existing timer instance at the beginning, but it's not right, because there is no protection, hence any later concurrent call of snd_seq_timer_open() may override the timer instance easily. This may result in UAF, as the leftover timer instance can keep running while the queue itself gets closed, as spotted by syzkaller recently. For avoiding the race, add a proper check at the assignment of tmr->timeri again, and return -EBUSY if it's been already registered. Reported-by: syzbot+ddc1260a83ed1cbf6fb5@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/000000000000dce34f05c42f110c@google.com Link: https://lore.kernel.org/r/20210610152059.24633-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 63a8eef70ccb5199534dec56fed9759d214bfe55 Author: Johan Hovold Date: Wed Jun 9 18:15:09 2021 +0200 USB: serial: cp210x: fix CP2102N-A01 modem control CP2102N revision A01 (firmware version <= 1.0.4) has a buggy flow-control implementation that uses the ulXonLimit instead of ulFlowReplace field of the flow-control settings structure (erratum CP2102N_E104). A recent change that set the input software flow-control limits incidentally broke RTS control for these devices when CRTSCTS is not set as the new limits would always enable hardware flow control. Fix this by explicitly disabling flow control for the buggy firmware versions and only updating the input software flow-control limits when IXOFF is requested. This makes sure that the terminal settings matches the default zero ulXonLimit (ulFlowReplace) for these devices. Link: https://lore.kernel.org/r/20210609161509.9459-1-johan@kernel.org Reported-by: David Frey Reported-by: Alex Villacís Lasso Tested-by: Alex Villacís Lasso Fixes: f61309d9c96a ("USB: serial: cp210x: set IXOFF thresholds") Cc: stable@vger.kernel.org # 5.12 Signed-off-by: Johan Hovold commit 170b763597d3a0a79f135e4d83a38462c3964fdf Author: Stephen Boyd Date: Tue Jun 8 12:55:19 2021 -0700 drm/msm/dsi: Stash away calculated vco frequency on recalc A problem was reported on CoachZ devices where the display wouldn't come up, or it would be distorted. It turns out that the PLL code here wasn't getting called once dsi_pll_10nm_vco_recalc_rate() started returning the same exact frequency, down to the Hz, that the bootloader was setting instead of 0 when the clk was registered with the clk framework. After commit 001d8dc33875 ("drm/msm/dsi: remove temp data from global pll structure") we use a hardcoded value for the parent clk frequency, i.e. VCO_REF_CLK_RATE, and we also hardcode the value for FRAC_BITS, instead of getting it from the config structure. This combination of changes to the recalc function allows us to properly calculate the frequency of the PLL regardless of whether or not the PLL has been clk_prepare()d or clk_set_rate()d. That's a good improvement. Unfortunately, this means that now we won't call down into the PLL clk driver when we call clk_set_rate() because the frequency calculated in the framework matches the frequency that is set in hardware. If the rate is the same as what we want it should be OK to not call the set_rate PLL op. The real problem is that the prepare op in this driver uses a private struct member to stash away the vco frequency so that it can call the set_rate op directly during prepare. Once the set_rate op is never called because recalc_rate told us the rate is the same, we don't set this private struct member before the prepare op runs, so we try to call the set_rate function directly with a frequency of 0. This effectively kills the PLL and configures it for a rate that won't work. Calling set_rate from prepare is really quite bad and will confuse any downstream clks about what the rate actually is of their parent. Fixing that will be a rather large change though so we leave that to later. For now, let's stash away the rate we calculate during recalc so that the prepare op knows what frequency to set, instead of 0. This way things keep working and the display can enable the PLL properly. In the future, we should remove that code from the prepare op so that it doesn't even try to call the set rate function. Cc: Dmitry Baryshkov Cc: Abhinav Kumar Fixes: 001d8dc33875 ("drm/msm/dsi: remove temp data from global pll structure") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210608195519.125561-1-swboyd@chromium.org Signed-off-by: Rob Clark commit b7e24eb1caa5f8da20d405d262dba67943aedc42 Author: Alexander Kuznetsov Date: Wed Jun 9 10:17:19 2021 +0300 cgroup1: don't allow '\n' in renaming cgroup_mkdir() have restriction on newline usage in names: $ mkdir $'/sys/fs/cgroup/cpu/test\ntest2' mkdir: cannot create directory '/sys/fs/cgroup/cpu/test\ntest2': Invalid argument But in cgroup1_rename() such check is missed. This allows us to make /proc//cgroup unparsable: $ mkdir /sys/fs/cgroup/cpu/test $ mv /sys/fs/cgroup/cpu/test $'/sys/fs/cgroup/cpu/test\ntest2' $ echo $$ > $'/sys/fs/cgroup/cpu/test\ntest2' $ cat /proc/self/cgroup 11:pids:/ 10:freezer:/ 9:hugetlb:/ 8:cpuset:/ 7:blkio:/user.slice 6:memory:/user.slice 5:net_cls,net_prio:/ 4:perf_event:/ 3:devices:/user.slice 2:cpu,cpuacct:/test test2 1:name=systemd:/ 0::/ Signed-off-by: Alexander Kuznetsov Reported-by: Andrey Krasichkov Acked-by: Dmitry Yakunin Cc: stable@vger.kernel.org Signed-off-by: Tejun Heo commit 78fcb2c91adfec8ce3a2ba6b4d0dda89f2f4a7c6 Author: Sean Christopherson Date: Wed Jun 9 11:56:11 2021 -0700 KVM: x86: Immediately reset the MMU context when the SMM flag is cleared Immediately reset the MMU context when the vCPU's SMM flag is cleared so that the SMM flag in the MMU role is always synchronized with the vCPU's flag. If RSM fails (which isn't correctly emulated), KVM will bail without calling post_leave_smm() and leave the MMU in a bad state. The bad MMU role can lead to a NULL pointer dereference when grabbing a shadow page's rmap for a page fault as the initial lookups for the gfn will happen with the vCPU's SMM flag (=0), whereas the rmap lookup will use the shadow page's SMM flag, which comes from the MMU (=1). SMM has an entirely different set of memslots, and so the initial lookup can find a memslot (SMM=0) and then explode on the rmap memslot lookup (SMM=1). general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 PID: 8410 Comm: syz-executor382 Not tainted 5.13.0-rc5-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__gfn_to_rmap arch/x86/kvm/mmu/mmu.c:935 [inline] RIP: 0010:gfn_to_rmap+0x2b0/0x4d0 arch/x86/kvm/mmu/mmu.c:947 Code: <42> 80 3c 20 00 74 08 4c 89 ff e8 f1 79 a9 00 4c 89 fb 4d 8b 37 44 RSP: 0018:ffffc90000ffef98 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff888015b9f414 RCX: ffff888019669c40 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 RBP: 0000000000000001 R08: ffffffff811d9cdb R09: ffffed10065a6002 R10: ffffed10065a6002 R11: 0000000000000000 R12: dffffc0000000000 R13: 0000000000000003 R14: 0000000000000001 R15: 0000000000000000 FS: 000000000124b300(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000028e31000 CR4: 00000000001526e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rmap_add arch/x86/kvm/mmu/mmu.c:965 [inline] mmu_set_spte+0x862/0xe60 arch/x86/kvm/mmu/mmu.c:2604 __direct_map arch/x86/kvm/mmu/mmu.c:2862 [inline] direct_page_fault+0x1f74/0x2b70 arch/x86/kvm/mmu/mmu.c:3769 kvm_mmu_do_page_fault arch/x86/kvm/mmu.h:124 [inline] kvm_mmu_page_fault+0x199/0x1440 arch/x86/kvm/mmu/mmu.c:5065 vmx_handle_exit+0x26/0x160 arch/x86/kvm/vmx/vmx.c:6122 vcpu_enter_guest+0x3bdd/0x9630 arch/x86/kvm/x86.c:9428 vcpu_run+0x416/0xc20 arch/x86/kvm/x86.c:9494 kvm_arch_vcpu_ioctl_run+0x4e8/0xa40 arch/x86/kvm/x86.c:9722 kvm_vcpu_ioctl+0x70f/0xbb0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3460 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:1069 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:1055 do_syscall_64+0x3f/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x440ce9 Cc: stable@vger.kernel.org Reported-by: syzbot+fb0b6a7e8713aeb0319c@syzkaller.appspotmail.com Fixes: 9ec19493fb86 ("KVM: x86: clear SMM flags before loading state while leaving SMM") Signed-off-by: Sean Christopherson Message-Id: <20210609185619.992058-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2ba0aa2feebda680ecfc3c552e867cf4d1b05a3a Author: Alaa Hleihel Date: Thu Jun 10 10:34:27 2021 +0300 IB/mlx5: Fix initializing CQ fragments buffer The function init_cq_frag_buf() can be called to initialize the current CQ fragments buffer cq->buf, or the temporary cq->resize_buf that is filled during CQ resize operation. However, the offending commit started to use function get_cqe() for getting the CQEs, the issue with this change is that get_cqe() always returns CQEs from cq->buf, which leads us to initialize the wrong buffer, and in case of enlarging the CQ we try to access elements beyond the size of the current cq->buf and eventually hit a kernel panic. [exception RIP: init_cq_frag_buf+103] [ffff9f799ddcbcd8] mlx5_ib_resize_cq at ffffffffc0835d60 [mlx5_ib] [ffff9f799ddcbdb0] ib_resize_cq at ffffffffc05270df [ib_core] [ffff9f799ddcbdc0] llt_rdma_setup_qp at ffffffffc0a6a712 [llt] [ffff9f799ddcbe10] llt_rdma_cc_event_action at ffffffffc0a6b411 [llt] [ffff9f799ddcbe98] llt_rdma_client_conn_thread at ffffffffc0a6bb75 [llt] [ffff9f799ddcbec8] kthread at ffffffffa66c5da1 [ffff9f799ddcbf50] ret_from_fork_nospec_begin at ffffffffa6d95ddd Fix it by getting the needed CQE by calling mlx5_frag_buf_get_wqe() that takes the correct source buffer as a parameter. Fixes: 388ca8be0037 ("IB/mlx5: Implement fragmented completion queue (CQ)") Link: https://lore.kernel.org/r/90a0e8c924093cfa50a482880ad7e7edb73dc19a.1623309971.git.leonro@nvidia.com Signed-off-by: Alaa Hleihel Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6466f03fdf98dd78b9453deb8a7cb0d887c09fec Author: Aharon Landau Date: Thu Jun 10 10:34:26 2021 +0300 RDMA/mlx5: Delete right entry from MR signature database The value mr->sig is stored in the entry upon mr allocation, however, ibmr is wrongly entered here as "old", therefore, xa_cmpxchg() does not replace the entry with NULL, which leads to the following trace: WARNING: CPU: 28 PID: 2078 at drivers/infiniband/hw/mlx5/main.c:3643 mlx5_ib_stage_init_cleanup+0x4d/0x60 [mlx5_ib] Modules linked in: nvme_rdma nvme_fabrics nvme_core 8021q garp mrp bonding bridge stp llc rfkill rpcrdma sunrpc rdma_ucm ib_srpt ib_isert iscsi_tad CPU: 28 PID: 2078 Comm: reboot Tainted: G X --------- --- 5.13.0-0.rc2.19.el9.x86_64 #1 Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 2.9.1 12/07/2018 RIP: 0010:mlx5_ib_stage_init_cleanup+0x4d/0x60 [mlx5_ib] Code: 8d bb 70 1f 00 00 be 00 01 00 00 e8 9d 94 ce da 48 3d 00 01 00 00 75 02 5b c3 0f 0b 5b c3 0f 0b 48 83 bb b0 20 00 00 00 74 d5 <0f> 0b eb d1 4 RSP: 0018:ffffa8db06d33c90 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff97f890a44000 RCX: ffff97f900ec0160 RDX: 0000000000000000 RSI: 0000000080080001 RDI: ffff97f890a44000 RBP: ffffffffc0c189b8 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000300 R12: ffff97f890a44000 R13: ffffffffc0c36030 R14: 00000000fee1dead R15: 0000000000000000 FS: 00007f0d5a8a3b40(0000) GS:ffff98077fb80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000555acbf4f450 CR3: 00000002a6f56002 CR4: 00000000001706e0 Call Trace: mlx5r_remove+0x39/0x60 [mlx5_ib] auxiliary_bus_remove+0x1b/0x30 __device_release_driver+0x17a/0x230 device_release_driver+0x24/0x30 bus_remove_device+0xdb/0x140 device_del+0x18b/0x3e0 mlx5_detach_device+0x59/0x90 [mlx5_core] mlx5_unload_one+0x22/0x60 [mlx5_core] shutdown+0x31/0x3a [mlx5_core] pci_device_shutdown+0x34/0x60 device_shutdown+0x15b/0x1c0 __do_sys_reboot.cold+0x2f/0x5b ? vfs_writev+0xc7/0x140 ? handle_mm_fault+0xc5/0x290 ? do_writev+0x6b/0x110 do_syscall_64+0x40/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: e6fb246ccafb ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()") Link: https://lore.kernel.org/r/f3f585ea0db59c2a78f94f65eedeafc5a2374993.1623309971.git.leonro@nvidia.com Signed-off-by: Aharon Landau Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2adcb4c5a52a2623cd2b43efa7041e74d19f3a5e Author: Maor Gottlieb Date: Thu Jun 10 10:34:25 2021 +0300 RDMA: Verify port when creating flow rule Validate port value provided by the user and with that remove no longer needed validation by the driver. The missing check in the mlx5_ib driver could cause to the below oops. Call trace: _create_flow_rule+0x2d4/0xf28 [mlx5_ib] mlx5_ib_create_flow+0x2d0/0x5b0 [mlx5_ib] ib_uverbs_ex_create_flow+0x4cc/0x624 [ib_uverbs] ib_uverbs_handler_UVERBS_METHOD_INVOKE_WRITE+0xd4/0x150 [ib_uverbs] ib_uverbs_cmd_verbs.isra.7+0xb28/0xc50 [ib_uverbs] ib_uverbs_ioctl+0x158/0x1d0 [ib_uverbs] do_vfs_ioctl+0xd0/0xaf0 ksys_ioctl+0x84/0xb4 __arm64_sys_ioctl+0x28/0xc4 el0_svc_common.constprop.3+0xa4/0x254 el0_svc_handler+0x84/0xa0 el0_svc+0x10/0x26c Code: b9401260 f9615681 51000400 8b001c20 (f9403c1a) Fixes: 436f2ad05a0b ("IB/core: Export ib_create/destroy_flow through uverbs") Link: https://lore.kernel.org/r/faad30dc5219a01727f47db3dc2f029d07c82c00.1623309971.git.leonro@nvidia.com Reviewed-by: Mark Bloch Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 551912d286e940e63abe9e005f434691ee24fd15 Author: Gustavo A. R. Silva Date: Fri May 28 15:07:56 2021 -0500 KVM: x86: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Message-Id: <20210528200756.GA39320@embeddedor> Signed-off-by: Paolo Bonzini commit 02ffbe6351f5c88337143bcbc649832ded7445c0 Author: ChenXiaoSong Date: Wed Jun 9 20:22:17 2021 +0800 KVM: SVM: fix doc warnings Fix kernel-doc warnings: arch/x86/kvm/svm/avic.c:233: warning: Function parameter or member 'activate' not described in 'avic_update_access_page' arch/x86/kvm/svm/avic.c:233: warning: Function parameter or member 'kvm' not described in 'avic_update_access_page' arch/x86/kvm/svm/avic.c:781: warning: Function parameter or member 'e' not described in 'get_pi_vcpu_info' arch/x86/kvm/svm/avic.c:781: warning: Function parameter or member 'kvm' not described in 'get_pi_vcpu_info' arch/x86/kvm/svm/avic.c:781: warning: Function parameter or member 'svm' not described in 'get_pi_vcpu_info' arch/x86/kvm/svm/avic.c:781: warning: Function parameter or member 'vcpu_info' not described in 'get_pi_vcpu_info' arch/x86/kvm/svm/avic.c:1009: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: ChenXiaoSong Message-Id: <20210609122217.2967131-1-chenxiaosong2@huawei.com> Signed-off-by: Paolo Bonzini commit 95bf69b400f41fbba7a2dc49b0152dd7bdc9a508 Author: Yanan Wang Date: Thu Jun 10 16:54:18 2021 +0800 KVM: selftests: Fix compiling errors when initializing the static structure Errors like below were produced from test_util.c when compiling the KVM selftests on my local platform. lib/test_util.c: In function 'vm_mem_backing_src_alias': lib/test_util.c:177:12: error: initializer element is not constant .flag = anon_flags, ^~~~~~~~~~ lib/test_util.c:177:12: note: (near initialization for 'aliases[0].flag') The reason is that we are using non-const expressions to initialize the static structure, which will probably trigger a compiling error/warning on stricter GCC versions. Fix it by converting the two const variables "anon_flags" and "anon_huge_flags" into more stable macros. Fixes: b3784bc28ccc0 ("KVM: selftests: refactor vm_mem_backing_src_type flags") Reported-by: Zenghui Yu Signed-off-by: Yanan Wang Message-Id: <20210610085418.35544-1-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit c336a5ee984708db4826ef9e47d184e638e29717 Author: Desmond Cheong Zhi Xi Date: Wed Jun 9 17:21:19 2021 +0800 drm: Lock pointer access in drm_master_release() This patch eliminates the following smatch warning: drivers/gpu/drm/drm_auth.c:320 drm_master_release() warn: unlocked access 'master' (line 318) expected lock '&dev->master_mutex' The 'file_priv->master' field should be protected by the mutex lock to '&dev->master_mutex'. This is because other processes can concurrently modify this field and free the current 'file_priv->master' pointer. This could result in a use-after-free error when 'master' is dereferenced in subsequent function calls to 'drm_legacy_lock_master_cleanup()' or to 'drm_lease_revoke()'. An example of a scenario that would produce this error can be seen from a similar bug in 'drm_getunique()' that was reported by Syzbot: https://syzkaller.appspot.com/bug?id=148d2f1dfac64af52ffd27b661981a540724f803 In the Syzbot report, another process concurrently acquired the device's master mutex in 'drm_setmaster_ioctl()', then overwrote 'fpriv->master' in 'drm_new_set_master()'. The old value of 'fpriv->master' was subsequently freed before the mutex was unlocked. Reported-by: Dan Carpenter Signed-off-by: Desmond Cheong Zhi Xi Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210609092119.173590-1-desmondcheongzx@gmail.com commit 584fd3b31889852d0d6f3dd1e3d8e9619b660d2c Author: Peter Zijlstra Date: Mon Jun 7 11:45:58 2021 +0200 objtool: Fix .symtab_shndx handling for elf_create_undef_symbol() When an ELF object uses extended symbol section indexes (IOW it has a .symtab_shndx section), these must be kept in sync with the regular symbol table (.symtab). So for every new symbol we emit, make sure to also emit a .symtab_shndx value to keep the arrays of equal size. Note: since we're writing an UNDEF symbol, most GElf_Sym fields will be 0 and we can repurpose one (st_size) to host the 0 for the xshndx value. Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()") Reported-by: Nick Desaulniers Suggested-by: Fangrui Song Signed-off-by: Peter Zijlstra (Intel) Tested-by: Nick Desaulniers Link: https://lkml.kernel.org/r/YL3q1qFO9QIRL/BA@hirez.programming.kicks-ass.net commit a8383dfb2138742a1bb77b481ada047aededa2ba Author: CodyYao-oc Date: Mon Jun 7 10:53:35 2021 +0800 x86/nmi_watchdog: Fix old-style NMI watchdog regression on old Intel CPUs The following commit: 3a4ac121c2ca ("x86/perf: Add hardware performance events support for Zhaoxin CPU.") Got the old-style NMI watchdog logic wrong and broke it for basically every Intel CPU where it was active. Which is only truly old CPUs, so few people noticed. On CPUs with perf events support we turn off the old-style NMI watchdog, so it was pretty pointless to add the logic for X86_VENDOR_ZHAOXIN to begin with ... :-/ Anyway, the fix is to restore the old logic and add a 'break'. [ mingo: Wrote a new changelog. ] Fixes: 3a4ac121c2ca ("x86/perf: Add hardware performance events support for Zhaoxin CPU.") Signed-off-by: CodyYao-oc Signed-off-by: Ingo Molnar Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210607025335.9643-1-CodyYao-oc@zhaoxin.com commit 156172a13ff0626d8e23276e741c7e2cb2f3b572 Author: Peter Zijlstra Date: Tue Jun 8 19:54:15 2021 +0200 irq_work: Make irq_work_queue() NMI-safe again Someone carelessly put NMI unsafe code in irq_work_queue(), breaking just about every single user. Also, someone has a terrible comment style. Fixes: e2b5bcf9f5ba ("irq_work: record irq_work_queue() call stack") Reported-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/YL+uBq8LzXXZsYVf@hirez.programming.kicks-ass.net commit 6f7ec77cc8b64ff5037c1945e4650c65c458037d Author: Stefan Agner Date: Fri May 28 22:39:31 2021 +0200 USB: serial: cp210x: fix alternate function for CP2102N QFN20 The QFN20 part has a different GPIO/port function assignment. The configuration struct bit field ordered as TX/RX/RS485/WAKEUP/CLK which exactly matches GPIO0-3 for QFN24/28. However, QFN20 has a different GPIO to primary function assignment. Special case QFN20 to follow to properly detect which GPIOs are available. Signed-off-by: Stefan Agner Link: https://lore.kernel.org/r/51830b2b24118eb0f77c5c9ac64ffb2f519dbb1d.1622218300.git.stefan@agner.ch Fixes: c8acfe0aadbe ("USB: serial: cp210x: implement GPIO support for CP2102N") Cc: stable@vger.kernel.org # 4.19 Signed-off-by: Johan Hovold commit efa165504943f2128d50f63de0c02faf6dcceb0d Author: Thomas Gleixner Date: Wed Jun 9 21:18:00 2021 +0200 x86/fpu: Reset state for all signal restore failures If access_ok() or fpregs_soft_set() fails in __fpu__restore_sig() then the function just returns but does not clear the FPU state as it does for all other fatal failures. Clear the FPU state for these failures as well. Fixes: 72a671ced66d ("x86, fpu: Unify signal handling code paths for x86 and x86_64 kernels") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/87mtryyhhz.ffs@nanos.tec.linutronix.de commit 54e1217b90486c94b26f24dcee1ee5ef5372f832 Author: Aya Levin Date: Wed May 26 10:40:36 2021 +0300 net/mlx5e: Block offload of outer header csum for GRE tunnel The device is able to offload either the outer header csum or inner header csum. The driver utilizes the inner csum offload. So, prohibit setting of tx-gre-csum-segmentation and let it be: off[fixed]. Fixes: 2729984149e6 ("net/mlx5e: Support TSO and TX checksum offloads for GRE tunnels") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 6d6727dddc7f93fcc155cb8d0c49c29ae0e71122 Author: Aya Levin Date: Mon May 10 14:34:58 2021 +0300 net/mlx5e: Block offload of outer header csum for UDP tunnels The device is able to offload either the outer header csum or inner header csum. The driver utilizes the inner csum offload. Hence, block setting of tx-udp_tnl-csum-segmentation and set it to off[fixed]. Fixes: b49663c8fb49 ("net/mlx5e: Add support for UDP tunnel segmentation with outer checksum offload") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 7a545077cb6701957e84c7f158630bb5c984e648 Author: Shay Drory Date: Thu Feb 25 12:27:53 2021 +0200 Revert "net/mlx5: Arm only EQs with EQEs" In the scenario described below, an EQ can remain in FIRED state which can result in missing an interrupt generation. The scenario: device mlx5_core driver ------ ---------------- EQ1.eqe generated EQ1.MSI-X sent EQ1.state = FIRED EQ2.eqe generated mlx5_irq() polls - eq1_eqes() arm eq1 polls - eq2_eqes() arm eq2 EQ2.MSI-X sent EQ2.state = FIRED mlx5_irq() polls - eq2_eqes() -- no eqes found driver skips EQ arming; ->EQ2 remains fired, misses generating interrupt. Hence, always arm the EQ by reverting the cited commit in fixes tag. Fixes: d894892dda25 ("net/mlx5: Arm only EQs with EQEs") Signed-off-by: Shay Drory Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit a6ee6f5f1082c416f9bfffbae1a87feff8a6ab3d Author: Aya Levin Date: Mon Apr 19 11:58:31 2021 +0300 net/mlx5e: Fix select queue to consider SKBTX_HW_TSTAMP Steering packets to PTP-SQ should be done only if the SKB has SKBTX_HW_TSTAMP set in the tx_flags. While here, take the function into a header and inline it. Set the whole condition to select the PTP-SQ to unlikely. Fixes: 24c22dd0918b ("net/mlx5e: Add states to PTP channel") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 9ae8c18c5e4d8814d3b405a07712fa5464070e3e Author: Aya Levin Date: Thu Apr 29 10:03:20 2021 +0300 net/mlx5e: Don't update netdev RQs with PTP-RQ Since the driver opens the PTP-RQ under channel 0, it appears to the stack as if the SKB was received on rxq0. So from thew stack POV there are still the same number of RX queues. Fixes: 960fbfe222a4 ("net/mlx5e: Allow coexistence of CQE compression and HW TS PTP") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 11f5ac3e05c134d333afe6f84ab10e22bc0a5d5a Author: Chris Mi Date: Wed Apr 28 19:39:26 2021 +0800 net/mlx5e: Verify dev is present in get devlink port ndo When changing eswitch mode, the netdev is detached from the hardware resources. So verify dev is present in get devlink port ndo. Otherwise, we will hit the following panic: [241535.973539] RIP: 0010:__devlink_port_phys_port_name_get+0x13/0x1b0 [241535.976471] RSP: 0018:ffff9eaf0ae1b7c8 EFLAGS: 00010292 [241535.977471] RAX: 000000000002d370 RBX: 000000000002d370 RCX: 0000000000000000 [241535.978479] RDX: 0000000000000010 RSI: ffff9eaf0ae1b858 RDI: 000000000002d370 [241535.979482] RBP: ffff9eaf0ae1b7e0 R08: 000000000000002a R09: ffff8888d54d13da [241535.980486] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8888e6700000 [241535.981491] R13: ffff9eaf0ae1b858 R14: 0000000000000010 R15: 0000000000000000 [241535.982489] FS: 00007fd374ef3740(0000) GS:ffff88909ea00000(0000) knlGS:0000000000000000 [241535.983494] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [241535.984487] CR2: 000000000002d444 CR3: 000000089fd26006 CR4: 00000000003706e0 [241535.985502] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [241535.986499] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [241535.987477] Call Trace: [241535.988426] ? nla_put_64bit+0x71/0xa0 [241535.989368] devlink_compat_phys_port_name_get+0x50/0xa0 [241535.990312] dev_get_phys_port_name+0x4b/0x60 [241535.991252] rtnl_fill_ifinfo+0x57b/0xcb0 [241535.992192] rtnl_dump_ifinfo+0x58f/0x6d0 [241535.993123] ? ksize+0x14/0x20 [241535.994033] ? __alloc_skb+0xe8/0x250 [241535.994935] netlink_dump+0x17c/0x300 [241535.995821] netlink_recvmsg+0x1de/0x2c0 [241535.996677] sock_recvmsg+0x70/0x80 [241535.997518] ____sys_recvmsg+0x9b/0x1b0 [241535.998360] ? iovec_from_user+0x82/0x120 [241535.999202] ? __import_iovec+0x2c/0x130 [241536.000031] ___sys_recvmsg+0x94/0x130 [241536.000850] ? __handle_mm_fault+0x56d/0x6e0 [241536.001668] __sys_recvmsg+0x5f/0xb0 [241536.002464] ? syscall_enter_from_user_mode+0x2b/0x80 [241536.003242] __x64_sys_recvmsg+0x1f/0x30 [241536.004008] do_syscall_64+0x38/0x50 [241536.004767] entry_SYSCALL_64_after_hwframe+0x44/0xae [241536.005532] RIP: 0033:0x7fd375014f47 Fixes: 2ff349c5edfe ("net/mlx5e: Verify dev is present in some ndos") Signed-off-by: Roi Dayan Signed-off-by: Chris Mi Signed-off-by: Saeed Mahameed commit 4aaf96ac8b45d8e2e019b6b53cce65a73c4ace2c Author: Maor Gottlieb Date: Sun Jun 6 11:23:41 2021 +0300 net/mlx5: DR, Don't use SW steering when RoCE is not supported SW steering uses RC QP to write/read to/from ICM, hence it's not supported when RoCE is not supported as well. Fixes: 70605ea545e8 ("net/mlx5: DR, Expose APIs for direct rule managing") Signed-off-by: Maor Gottlieb Reviewed-by: Alex Vesker Reviewed-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit c189716b2a7c1d2d8658e269735273caa1c38b54 Author: Maor Gottlieb Date: Sun Jun 6 11:20:46 2021 +0300 net/mlx5: Consider RoCE cap before init RDMA resources Check if RoCE is supported by the device before enable it in the vport context and create all the RDMA steering objects. Fixes: 80f09dfc237f ("net/mlx5: Eswitch, enable RoCE loopback traffic") Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit a3e5fd9314dfc4314a9567cde96e1aef83a7458a Author: Dima Chumak Date: Wed May 26 13:45:10 2021 +0300 net/mlx5e: Fix page reclaim for dead peer hairpin When adding a hairpin flow, a firmware-side send queue is created for the peer net device, which claims some host memory pages for its internal ring buffer. If the peer net device is removed/unbound before the hairpin flow is deleted, then the send queue is not destroyed which leads to a stack trace on pci device remove: [ 748.005230] mlx5_core 0000:08:00.2: wait_func:1094:(pid 12985): MANAGE_PAGES(0x108) timeout. Will cause a leak of a command resource [ 748.005231] mlx5_core 0000:08:00.2: reclaim_pages:514:(pid 12985): failed reclaiming pages: err -110 [ 748.001835] mlx5_core 0000:08:00.2: mlx5_reclaim_root_pages:653:(pid 12985): failed reclaiming pages (-110) for func id 0x0 [ 748.002171] ------------[ cut here ]------------ [ 748.001177] FW pages counter is 4 after reclaiming all pages [ 748.001186] WARNING: CPU: 1 PID: 12985 at drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:685 mlx5_reclaim_startup_pages+0x34b/0x460 [mlx5_core] [ +0.002771] Modules linked in: cls_flower mlx5_ib mlx5_core ptp pps_core act_mirred sch_ingress openvswitch nsh xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xt_addrtype iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 br_netfilter rpcrdma rdma_ucm ib_iser libiscsi scsi_transport_iscsi rdma_cm ib_umad ib_ipoib iw_cm ib_cm ib_uverbs ib_core overlay fuse [last unloaded: pps_core] [ 748.007225] CPU: 1 PID: 12985 Comm: tee Not tainted 5.12.0+ #1 [ 748.001376] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 748.002315] RIP: 0010:mlx5_reclaim_startup_pages+0x34b/0x460 [mlx5_core] [ 748.001679] Code: 28 00 00 00 0f 85 22 01 00 00 48 81 c4 b0 00 00 00 31 c0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 48 c7 c7 40 cc 19 a1 e8 9f 71 0e e2 <0f> 0b e9 30 ff ff ff 48 c7 c7 a0 cc 19 a1 e8 8c 71 0e e2 0f 0b e9 [ 748.003781] RSP: 0018:ffff88815220faf8 EFLAGS: 00010286 [ 748.001149] RAX: 0000000000000000 RBX: ffff8881b4900280 RCX: 0000000000000000 [ 748.001445] RDX: 0000000000000027 RSI: 0000000000000004 RDI: ffffed102a441f51 [ 748.001614] RBP: 00000000000032b9 R08: 0000000000000001 R09: ffffed1054a15ee8 [ 748.001446] R10: ffff8882a50af73b R11: ffffed1054a15ee7 R12: fffffbfff07c1e30 [ 748.001447] R13: dffffc0000000000 R14: ffff8881b492cba8 R15: 0000000000000000 [ 748.001429] FS: 00007f58bd08b580(0000) GS:ffff8882a5080000(0000) knlGS:0000000000000000 [ 748.001695] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 748.001309] CR2: 000055a026351740 CR3: 00000001d3b48006 CR4: 0000000000370ea0 [ 748.001506] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 748.001483] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 748.001654] Call Trace: [ 748.000576] ? mlx5_satisfy_startup_pages+0x290/0x290 [mlx5_core] [ 748.001416] ? mlx5_cmd_teardown_hca+0xa2/0xd0 [mlx5_core] [ 748.001354] ? mlx5_cmd_init_hca+0x280/0x280 [mlx5_core] [ 748.001203] mlx5_function_teardown+0x30/0x60 [mlx5_core] [ 748.001275] mlx5_uninit_one+0xa7/0xc0 [mlx5_core] [ 748.001200] remove_one+0x5f/0xc0 [mlx5_core] [ 748.001075] pci_device_remove+0x9f/0x1d0 [ 748.000833] device_release_driver_internal+0x1e0/0x490 [ 748.001207] unbind_store+0x19f/0x200 [ 748.000942] ? sysfs_file_ops+0x170/0x170 [ 748.001000] kernfs_fop_write_iter+0x2bc/0x450 [ 748.000970] new_sync_write+0x373/0x610 [ 748.001124] ? new_sync_read+0x600/0x600 [ 748.001057] ? lock_acquire+0x4d6/0x700 [ 748.000908] ? lockdep_hardirqs_on_prepare+0x400/0x400 [ 748.001126] ? fd_install+0x1c9/0x4d0 [ 748.000951] vfs_write+0x4d0/0x800 [ 748.000804] ksys_write+0xf9/0x1d0 [ 748.000868] ? __x64_sys_read+0xb0/0xb0 [ 748.000811] ? filp_open+0x50/0x50 [ 748.000919] ? syscall_enter_from_user_mode+0x1d/0x50 [ 748.001223] do_syscall_64+0x3f/0x80 [ 748.000892] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 748.001026] RIP: 0033:0x7f58bcfb22f7 [ 748.000944] Code: 0d 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 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 [ 748.003925] RSP: 002b:00007fffd7f2aaa8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 [ 748.001732] RAX: ffffffffffffffda RBX: 000000000000000d RCX: 00007f58bcfb22f7 [ 748.001426] RDX: 000000000000000d RSI: 00007fffd7f2abc0 RDI: 0000000000000003 [ 748.001746] RBP: 00007fffd7f2abc0 R08: 0000000000000000 R09: 0000000000000001 [ 748.001631] R10: 00000000000001b6 R11: 0000000000000246 R12: 000000000000000d [ 748.001537] R13: 00005597ac2c24a0 R14: 000000000000000d R15: 00007f58bd084700 [ 748.001564] irq event stamp: 0 [ 748.000787] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [ 748.001399] hardirqs last disabled at (0): [] copy_process+0x146f/0x5eb0 [ 748.001854] softirqs last enabled at (0): [] copy_process+0x14ae/0x5eb0 [ 748.013431] softirqs last disabled at (0): [<0000000000000000>] 0x0 [ 748.001492] ---[ end trace a6fabd773d1c51ae ]--- Fix by destroying the send queue of a hairpin peer net device that is being removed/unbound, which returns the allocated ring buffer pages to the host. Fixes: 4d8fcf216c90 ("net/mlx5e: Avoid unbounded peer devices when unpairing TC hairpin rules") Signed-off-by: Dima Chumak Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 8ad893e516a77209a1818a2072d2027d87db809f Author: Huy Nguyen Date: Fri May 28 13:20:32 2021 -0500 net/mlx5e: Remove dependency in IPsec initialization flows Currently, IPsec feature is disabled because mlx5e_build_nic_netdev is required to be called after mlx5e_ipsec_init. This requirement is invalid as mlx5e_build_nic_netdev and mlx5e_ipsec_init initialize independent resources. Remove ipsec pointer check in mlx5e_build_nic_netdev so that the two functions can be called at any order. Fixes: 547eede070eb ("net/mlx5e: IPSec, Innova IPSec offload infrastructure") Signed-off-by: Huy Nguyen Reviewed-by: Raed Salem Signed-off-by: Saeed Mahameed commit fb1a3132ee1ac968316e45d21a48703a6db0b6c3 Author: Vlad Buslov Date: Mon May 31 16:28:39 2021 +0300 net/mlx5e: Fix use-after-free of encap entry in neigh update handler Function mlx5e_rep_neigh_update() wasn't updated to accommodate rtnl lock removal from TC filter update path and properly handle concurrent encap entry insertion/deletion which can lead to following use-after-free: [23827.464923] ================================================================== [23827.469446] BUG: KASAN: use-after-free in mlx5e_encap_take+0x72/0x140 [mlx5_core] [23827.470971] Read of size 4 at addr ffff8881d132228c by task kworker/u20:6/21635 [23827.472251] [23827.472615] CPU: 9 PID: 21635 Comm: kworker/u20:6 Not tainted 5.13.0-rc3+ #5 [23827.473788] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [23827.475639] Workqueue: mlx5e mlx5e_rep_neigh_update [mlx5_core] [23827.476731] Call Trace: [23827.477260] dump_stack+0xbb/0x107 [23827.477906] print_address_description.constprop.0+0x18/0x140 [23827.478896] ? mlx5e_encap_take+0x72/0x140 [mlx5_core] [23827.479879] ? mlx5e_encap_take+0x72/0x140 [mlx5_core] [23827.480905] kasan_report.cold+0x7c/0xd8 [23827.481701] ? mlx5e_encap_take+0x72/0x140 [mlx5_core] [23827.482744] kasan_check_range+0x145/0x1a0 [23827.493112] mlx5e_encap_take+0x72/0x140 [mlx5_core] [23827.494054] ? mlx5e_tc_tun_encap_info_equal_generic+0x140/0x140 [mlx5_core] [23827.495296] mlx5e_rep_neigh_update+0x41e/0x5e0 [mlx5_core] [23827.496338] ? mlx5e_rep_neigh_entry_release+0xb80/0xb80 [mlx5_core] [23827.497486] ? read_word_at_a_time+0xe/0x20 [23827.498250] ? strscpy+0xa0/0x2a0 [23827.498889] process_one_work+0x8ac/0x14e0 [23827.499638] ? lockdep_hardirqs_on_prepare+0x400/0x400 [23827.500537] ? pwq_dec_nr_in_flight+0x2c0/0x2c0 [23827.501359] ? rwlock_bug.part.0+0x90/0x90 [23827.502116] worker_thread+0x53b/0x1220 [23827.502831] ? process_one_work+0x14e0/0x14e0 [23827.503627] kthread+0x328/0x3f0 [23827.504254] ? _raw_spin_unlock_irq+0x24/0x40 [23827.505065] ? __kthread_bind_mask+0x90/0x90 [23827.505912] ret_from_fork+0x1f/0x30 [23827.506621] [23827.506987] Allocated by task 28248: [23827.507694] kasan_save_stack+0x1b/0x40 [23827.508476] __kasan_kmalloc+0x7c/0x90 [23827.509197] mlx5e_attach_encap+0xde1/0x1d40 [mlx5_core] [23827.510194] mlx5e_tc_add_fdb_flow+0x397/0xc40 [mlx5_core] [23827.511218] __mlx5e_add_fdb_flow+0x519/0xb30 [mlx5_core] [23827.512234] mlx5e_configure_flower+0x191c/0x4870 [mlx5_core] [23827.513298] tc_setup_cb_add+0x1d5/0x420 [23827.514023] fl_hw_replace_filter+0x382/0x6a0 [cls_flower] [23827.514975] fl_change+0x2ceb/0x4a51 [cls_flower] [23827.515821] tc_new_tfilter+0x89a/0x2070 [23827.516548] rtnetlink_rcv_msg+0x644/0x8c0 [23827.517300] netlink_rcv_skb+0x11d/0x340 [23827.518021] netlink_unicast+0x42b/0x700 [23827.518742] netlink_sendmsg+0x743/0xc20 [23827.519467] sock_sendmsg+0xb2/0xe0 [23827.520131] ____sys_sendmsg+0x590/0x770 [23827.520851] ___sys_sendmsg+0xd8/0x160 [23827.521552] __sys_sendmsg+0xb7/0x140 [23827.522238] do_syscall_64+0x3a/0x70 [23827.522907] entry_SYSCALL_64_after_hwframe+0x44/0xae [23827.523797] [23827.524163] Freed by task 25948: [23827.524780] kasan_save_stack+0x1b/0x40 [23827.525488] kasan_set_track+0x1c/0x30 [23827.526187] kasan_set_free_info+0x20/0x30 [23827.526968] __kasan_slab_free+0xed/0x130 [23827.527709] slab_free_freelist_hook+0xcf/0x1d0 [23827.528528] kmem_cache_free_bulk+0x33a/0x6e0 [23827.529317] kfree_rcu_work+0x55f/0xb70 [23827.530024] process_one_work+0x8ac/0x14e0 [23827.530770] worker_thread+0x53b/0x1220 [23827.531480] kthread+0x328/0x3f0 [23827.532114] ret_from_fork+0x1f/0x30 [23827.532785] [23827.533147] Last potentially related work creation: [23827.534007] kasan_save_stack+0x1b/0x40 [23827.534710] kasan_record_aux_stack+0xab/0xc0 [23827.535492] kvfree_call_rcu+0x31/0x7b0 [23827.536206] mlx5e_tc_del_fdb_flow+0x577/0xef0 [mlx5_core] [23827.537305] mlx5e_flow_put+0x49/0x80 [mlx5_core] [23827.538290] mlx5e_delete_flower+0x6d1/0xe60 [mlx5_core] [23827.539300] tc_setup_cb_destroy+0x18e/0x2f0 [23827.540144] fl_hw_destroy_filter+0x1d2/0x310 [cls_flower] [23827.541148] __fl_delete+0x4dc/0x660 [cls_flower] [23827.541985] fl_delete+0x97/0x160 [cls_flower] [23827.542782] tc_del_tfilter+0x7ab/0x13d0 [23827.543503] rtnetlink_rcv_msg+0x644/0x8c0 [23827.544257] netlink_rcv_skb+0x11d/0x340 [23827.544981] netlink_unicast+0x42b/0x700 [23827.545700] netlink_sendmsg+0x743/0xc20 [23827.546424] sock_sendmsg+0xb2/0xe0 [23827.547084] ____sys_sendmsg+0x590/0x770 [23827.547850] ___sys_sendmsg+0xd8/0x160 [23827.548606] __sys_sendmsg+0xb7/0x140 [23827.549303] do_syscall_64+0x3a/0x70 [23827.549969] entry_SYSCALL_64_after_hwframe+0x44/0xae [23827.550853] [23827.551217] The buggy address belongs to the object at ffff8881d1322200 [23827.551217] which belongs to the cache kmalloc-256 of size 256 [23827.553341] The buggy address is located 140 bytes inside of [23827.553341] 256-byte region [ffff8881d1322200, ffff8881d1322300) [23827.555747] The buggy address belongs to the page: [23827.556847] page:00000000898762aa refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d1320 [23827.558651] head:00000000898762aa order:2 compound_mapcount:0 compound_pincount:0 [23827.559961] flags: 0x2ffff800010200(slab|head|node=0|zone=2|lastcpupid=0x1ffff) [23827.561243] raw: 002ffff800010200 dead000000000100 dead000000000122 ffff888100042b40 [23827.562653] raw: 0000000000000000 0000000000200020 00000001ffffffff 0000000000000000 [23827.564112] page dumped because: kasan: bad access detected [23827.565439] [23827.565932] Memory state around the buggy address: [23827.566917] ffff8881d1322180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [23827.568485] ffff8881d1322200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [23827.569818] >ffff8881d1322280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [23827.571143] ^ [23827.571879] ffff8881d1322300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [23827.573283] ffff8881d1322380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [23827.574654] ================================================================== Most of the necessary logic is already correctly implemented by mlx5e_get_next_valid_encap() helper that is used in neigh stats update handler. Make the handler generic by renaming it to mlx5e_get_next_matching_encap() and use callback to test whether flow is matching instead of hardcoded check for 'valid' flag value. Implement mlx5e_get_next_valid_encap() by calling mlx5e_get_next_matching_encap() with callback that tests encap MLX5_ENCAP_ENTRY_VALID flag. Implement new mlx5e_get_next_init_encap() helper by calling mlx5e_get_next_matching_encap() with callback that tests encap completion result to be non-error and use it in mlx5e_rep_neigh_update() to safely iterate over nhe->encap_list. Remove encap completion logic from mlx5e_rep_update_flows() since the encap entries passed to this function are already guaranteed to be properly initialized by similar code in mlx5e_get_next_init_encap(). Fixes: 2a1f1768fa17 ("net/mlx5e: Refactor neigh update for concurrent execution") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 2bf8d2ae3480da06e64dad3b326ebd2e40c0be86 Author: Yang Li Date: Fri Jun 4 18:08:27 2021 +0800 net/mlx5e: Fix an error code in mlx5e_arfs_create_tables() When the code execute 'if (!priv->fs.arfs->wq)', the value of err is 0. So, we use -ENOMEM to indicate that the function create_singlethread_workqueue() return NULL. Clean up smatch warning: drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c:373 mlx5e_arfs_create_tables() warn: missing error code 'err'. Reported-by: Abaci Robot Fixes: f6755b80d693 ("net/mlx5e: Dynamic alloc arfs table for netdev when needed") Signed-off-by: Yang Li Signed-off-by: Saeed Mahameed commit 6cde05ab93df76746ab1141d48032d7a62133cd8 Merge: 13c62f5371e3e 2e84f6b3773f4 Author: David S. Miller Date: Wed Jun 9 15:45:16 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2021-06-09 This series contains updates to ice driver only. Maciej informs the user when XDP is not supported due to the driver being in the 'safe mode' state. He also adds a parameter to Tx queue configuration to resolve an issue in configuring XDP queues as it cannot rely on using the number Tx or Rx queues. ==================== Signed-off-by: David S. Miller commit 13c62f5371e3eb4fc3400cfa26e64ca75f888008 Author: Marcelo Ricardo Leitner Date: Wed Jun 9 11:23:56 2021 -0300 net/sched: act_ct: handle DNAT tuple collision This this the counterpart of 8aa7b526dc0b ("openvswitch: handle DNAT tuple collision") for act_ct. From that commit changelog: """ With multiple DNAT rules it's possible that after destination translation the resulting tuples collide. ... 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. """ Fixes: 95219afbb980 ("act_ct: support asymmetric conntrack") Signed-off-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit cd1245d75ce93b8fd206f4b34eb58bcfe156d5e9 Merge: a4c30b8691f26 701b54bcb7d0d Author: Linus Torvalds Date: Wed Jun 9 15:23:32 2021 -0700 Merge tag 'platform-drivers-x86-v5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "Assorted pdx86 bug-fixes and some hardware-id additions for 5.13. The mlxreg-hotplug revert is a regression-fix" * tag 'platform-drivers-x86-v5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/mellanox: mlxreg-hotplug: Revert "move to use request_irq by IRQF_NO_AUTOEN flag" platform/surface: dtx: Add missing mutex_destroy() call in failure path platform/surface: aggregator: Fix event disable function platform/x86: thinkpad_acpi: Add X1 Carbon Gen 9 second fan support platform/surface: aggregator_registry: Add support for 13" Intel Surface Laptop 4 platform/surface: aggregator_registry: Update comments for 15" AMD Surface Laptop 4 commit d2e381c4963663bca6f30c3b996fa4dbafe8fcb5 Author: Ido Schimmel Date: Wed Jun 9 14:17:53 2021 +0300 rtnetlink: Fix regression in bridge VLAN configuration Cited commit started returning errors when notification info is not filled by the bridge driver, resulting in the following regression: # ip link add name br1 type bridge vlan_filtering 1 # bridge vlan add dev br1 vid 555 self pvid untagged RTNETLINK answers: Invalid argument As long as the bridge driver does not fill notification info for the bridge device itself, an empty notification should not be considered as an error. This is explained in commit 59ccaaaa49b5 ("bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify"). Fix by removing the error and add a comment to avoid future bugs. Fixes: a8db57c1d285 ("rtnetlink: Fix missing error code in rtnl_bridge_notify()") Signed-off-by: Ido Schimmel Reviewed-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit a4c30b8691f26c6115db6e11ec837c1fb6073953 Merge: a25b088c4ffae ca0760e7d79e2 Author: Linus Torvalds Date: Wed Jun 9 14:48:29 2021 -0700 Merge tag 'compiler-attributes-for-linus-v5.13-rc6' of git://github.com/ojeda/linux Pull compiler attribute update from Miguel Ojeda: "A trivial update to the compiler attributes: Add 'continue' keyword to documentation in comment (from Wei Ming Chen)" * tag 'compiler-attributes-for-linus-v5.13-rc6' of git://github.com/ojeda/linux: Compiler Attributes: Add continue in comment commit a25b088c4ffae97033483064ee4a1075a049bc04 Merge: cc6cf827dd685 4792f9dd12936 Author: Linus Torvalds Date: Wed Jun 9 14:47:16 2021 -0700 Merge tag 'clang-format-for-linus-v5.13-rc6' of git://github.com/ojeda/linux Pull clang-format update from Miguel Ojeda: "The usual update for `clang-format`" * tag 'clang-format-for-linus-v5.13-rc6' of git://github.com/ojeda/linux: clang-format: Update with the latest for_each macro list commit 93124d4a90ba6ef05cabb3b8430d51f2764345c6 Merge: a8b897c7bcd47 a9799541ca346 Author: David S. Miller Date: Wed Jun 9 14:46:21 2021 -0700 Merge tag 'mac80211-for-net-2021-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes berg says: ==================== A fair number of fixes: * fix more fallout from RTNL locking changes * fixes for some of the bugs found by syzbot * drop multicast fragments in mac80211 to align with the spec and what drivers are doing now * fix NULL-ptr deref in radiotap injection ==================== Signed-off-by: David S. Miller commit 218bf772bddd221489c38dde6ef8e917131161f6 Author: Jim Mattson Date: Wed Jun 2 13:52:24 2021 -0700 kvm: LAPIC: Restore guard to prevent illegal APIC register access Per the SDM, "any access that touches bytes 4 through 15 of an APIC register may cause undefined behavior and must not be executed." Worse, such an access in kvm_lapic_reg_read can result in a leak of kernel stack contents. Prior to commit 01402cf81051 ("kvm: LAPIC: write down valid APIC registers"), such an access was explicitly disallowed. Restore the guard that was removed in that commit. Fixes: 01402cf81051 ("kvm: LAPIC: write down valid APIC registers") Signed-off-by: Jim Mattson Reported-by: syzbot Message-Id: <20210602205224.3189316-1-jmattson@google.com> Signed-off-by: Paolo Bonzini commit a8b897c7bcd47f4147d066e22cc01d1026d7640e Author: Paolo Abeni Date: Wed Jun 9 11:49:01 2021 +0200 udp: fix race between close() and udp_abort() Kaustubh reported and diagnosed a panic in udp_lib_lookup(). The root cause is udp_abort() racing with close(). Both racing functions acquire the socket lock, but udp{v6}_destroy_sock() release it before performing destructive actions. We can't easily extend the socket lock scope to avoid the race, instead use the SOCK_DEAD flag to prevent udp_abort from doing any action when the critical race happens. Diagnosed-and-tested-by: Kaustubh Pandey Fixes: 5d77dca82839 ("net: diag: support SOCK_DESTROY for UDP sockets") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit dcd01eeac14486b56a790f5cce9b823440ba5b34 Author: Eric Dumazet Date: Wed Jun 9 00:59:45 2021 -0700 inet: annotate data race in inet_send_prepare() and inet_dgram_connect() Both functions are known to be racy when reading inet_num as we do not want to grab locks for the common case the socket has been bound already. The race is resolved in inet_autobind() by reading again inet_num under the socket lock. syzbot reported: BUG: KCSAN: data-race in inet_send_prepare / udp_lib_get_port write to 0xffff88812cba150e of 2 bytes by task 24135 on cpu 0: udp_lib_get_port+0x4b2/0xe20 net/ipv4/udp.c:308 udp_v6_get_port+0x5e/0x70 net/ipv6/udp.c:89 inet_autobind net/ipv4/af_inet.c:183 [inline] inet_send_prepare+0xd0/0x210 net/ipv4/af_inet.c:807 inet6_sendmsg+0x29/0x80 net/ipv6/af_inet6.c:639 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x360/0x4d0 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmmsg+0x315/0x4b0 net/socket.c:2490 __do_sys_sendmmsg net/socket.c:2519 [inline] __se_sys_sendmmsg net/socket.c:2516 [inline] __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2516 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae read to 0xffff88812cba150e of 2 bytes by task 24132 on cpu 1: inet_send_prepare+0x21/0x210 net/ipv4/af_inet.c:806 inet6_sendmsg+0x29/0x80 net/ipv6/af_inet6.c:639 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x360/0x4d0 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmmsg+0x315/0x4b0 net/socket.c:2490 __do_sys_sendmmsg net/socket.c:2519 [inline] __se_sys_sendmmsg net/socket.c:2516 [inline] __x64_sys_sendmmsg+0x53/0x60 net/socket.c:2516 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae value changed: 0x0000 -> 0x9db4 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 24132 Comm: syz-executor.2 Not tainted 5.13.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 80ec82e3d2c1fab42eeb730aaa7985494a963d3f Author: Austin Kim Date: Wed Jun 9 03:34:25 2021 +0100 net: ethtool: clear heap allocations for ethtool function Several ethtool functions leave heap uncleared (potentially) by drivers. This will leave the unused portion of heap unchanged and might copy the full contents back to userspace. Signed-off-by: Austin Kim Signed-off-by: David S. Miller commit cc6cf827dd6858966cb5086703447cb68186650e Merge: 2f673816b2db3 aefd7f7065567 Author: Linus Torvalds Date: Wed Jun 9 13:34:48 2021 -0700 Merge tag 'for-5.13-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes that people hit during testing. Zoned mode fix: - fix 32bit value wrapping when calculating superblock offsets Error handling fixes: - properly check filesystema and device uuids - properly return errors when marking extents as written - do not write supers if we have an fs error" * tag 'for-5.13-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: promote debugging asserts to full-fledged checks in validate_super btrfs: return value from btrfs_mark_extent_written() in case of error btrfs: zoned: fix zone number to sector/physical calculation btrfs: do not write supers if we have an fs error commit 2e84f6b3773f43263124c76499c0c4ec3f40aa9b Author: Maciej Fijalkowski Date: Thu May 20 08:35:00 2021 +0200 ice: parameterize functions responsible for Tx ring management Commit ae15e0ba1b33 ("ice: Change number of XDP Tx queues to match number of Rx queues") tried to address the incorrect setting of XDP queue count that was based on the Tx queue count, whereas in theory we should provide the XDP queue per Rx queue. However, the routines that setup and destroy the set of Tx resources are still based on the vsi->num_txq. Ice supports the asynchronous Tx/Rx queue count, so for a setup where vsi->num_txq > vsi->num_rxq, ice_vsi_stop_tx_rings and ice_vsi_cfg_txqs will be accessing the vsi->xdp_rings out of the bounds. Parameterize two mentioned functions so they get the size of Tx resources array as the input. Fixes: ae15e0ba1b33 ("ice: Change number of XDP Tx queues to match number of Rx queues") Signed-off-by: Maciej Fijalkowski Tested-by: Kiran Bhandare Signed-off-by: Tony Nguyen commit ebc5399ea1dfcddac31974091086a3379141899b Author: Maciej Fijalkowski Date: Thu May 20 08:34:59 2021 +0200 ice: add ndo_bpf callback for safe mode netdev ops ice driver requires a programmable pipeline firmware package in order to have a support for advanced features. Otherwise, driver falls back to so called 'safe mode'. For that mode, ndo_bpf callback is not exposed and when user tries to load XDP program, the following happens: $ sudo ./xdp1 enp179s0f1 libbpf: Kernel error message: Underlying driver does not support XDP in native mode link set xdp fd failed which is sort of confusing, as there is a native XDP support, but not in the current mode. Improve the user experience by providing the specific ndo_bpf callback dedicated for safe mode which will make use of extack to explicitly let the user know that the DDP package is missing and that's the reason that the XDP can't be loaded onto interface currently. Cc: Jamal Hadi Salim Fixes: efc2214b6047 ("ice: Add support for XDP") Signed-off-by: Maciej Fijalkowski Tested-by: Kiran Bhandare Signed-off-by: Tony Nguyen commit 2f673816b2db30ce6122fe0e5e6a00de20e8d99a Merge: 368094df48e68 4422829e80530 Author: Linus Torvalds Date: Wed Jun 9 13:09:57 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: "Bugfixes, including a TLB flush fix that affects processors without nested page tables" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: fix previous commit for 32-bit builds kvm: avoid speculation-based attacks from out-of-range memslot accesses KVM: x86: Unload MMU on guest TLB flush if TDP disabled to force MMU sync KVM: x86: Ensure liveliness of nested VM-Enter fail tracepoint message selftests: kvm: Add support for customized slot0 memory size KVM: selftests: introduce P47V64 for s390x KVM: x86: Ensure PV TLB flush tracepoint reflects KVM behavior KVM: X86: MMU: Use the correct inherited permissions to get shadow page KVM: LAPIC: Write 0 to TMICT should also cancel vmx-preemption timer KVM: SVM: Fix SEV SEND_START session length & SEND_UPDATE_DATA query length after commit 238eca821cee commit 12f36e9bf678a81d030ca1b693dcda62b55af7c5 Author: Florian Westphal Date: Tue Jun 8 13:48:18 2021 +0200 netfilter: nft_fib_ipv6: skip ipv6 packets from any to link-local The ip6tables rpfilter match has an extra check to skip packets with "::" source address. Extend this to ipv6 fib expression. Else ipv6 duplicate address detection packets will fail rpf route check -- lookup returns -ENETUNREACH. While at it, extend the prerouting check to also cover the ingress hook. Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1543 Fixes: f6d0cbcf09c5 ("netfilter: nf_tables: add fib expression") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 82944421243e5988898f54266687586ba07d889e Author: Florian Westphal Date: Tue Jun 8 13:48:17 2021 +0200 selftests: netfilter: add fib test case There is a bug report on netfilter.org bugzilla pointing to fib expression dropping ipv6 DAD packets. Add a test case that demonstrates this problem. Next patch excludes icmpv6 packets coming from any to linklocal. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ad9f151e560b016b6ad3280b48e42fa11e1a5440 Author: Pablo Neira Ayuso Date: Fri Jun 4 03:07:28 2021 +0200 netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: KASAN: null-ptr-deref in nft_set_elem_expr_alloc+0x84/0xd0 [nf_tables] [4512935.019487] Read of size 8 at addr 0000000000000070 by task nft/23532 [4512935.019494] CPU: 1 PID: 23532 Comm: nft Not tainted 5.12.0-rc4+ #48 [...] [4512935.019502] Call Trace: [4512935.019505] dump_stack+0x89/0xb4 [4512935.019512] ? nft_set_elem_expr_alloc+0x84/0xd0 [nf_tables] [4512935.019536] ? nft_set_elem_expr_alloc+0x84/0xd0 [nf_tables] [4512935.019560] kasan_report.cold.12+0x5f/0xd8 [4512935.019566] ? nft_set_elem_expr_alloc+0x84/0xd0 [nf_tables] [4512935.019590] nft_set_elem_expr_alloc+0x84/0xd0 [nf_tables] [4512935.019615] nf_tables_newset+0xc7f/0x1460 [nf_tables] Reported-by: syzbot+ce96ca2b1d0b37c6422d@syzkaller.appspotmail.com Fixes: 65038428b2c6 ("netfilter: nf_tables: allow to specify stateful expression in set definition") Signed-off-by: Pablo Neira Ayuso commit 78d13552346289bad4a9bf8eabb5eec5e5a321a5 Author: Riwen Lu Date: Fri Jun 4 11:09:59 2021 +0800 hwmon: (scpi-hwmon) shows the negative temperature properly The scpi hwmon shows the sub-zero temperature in an unsigned integer, which would confuse the users when the machine works in low temperature environment. This shows the sub-zero temperature in an signed value and users can get it properly from sensors. Signed-off-by: Riwen Lu Tested-by: Xin Chen Link: https://lore.kernel.org/r/20210604030959.736379-1-luriwen@kylinos.cn Signed-off-by: Guenter Roeck commit 7656cd2177612aa7c299b083ecff30a4d3e9a587 Author: Wilken Gottwalt Date: Thu Jun 3 11:51:02 2021 +0000 hwmon: (corsair-psu) fix suspend behavior During standby some PSUs turn off the microcontroller. A re-init is required during resume or the microcontroller stays unresponsive. Fixes: d115b51e0e56 ("hwmon: add Corsair PSU HID controller driver") Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/YLjCJiVtu5zgTabI@monster.powergraphx.local Signed-off-by: Guenter Roeck commit faffc5d8576ed827e2e8e4d2a3771dbb52667381 Author: Nobuhiro Iwamatsu Date: Mon May 31 22:46:55 2021 +0900 dt-bindings: hwmon: Fix typo in TI ADS7828 bindings Fix typo in example for DT binding, changed from 'comatible' to 'compatible'. Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20210531134655.720462-1-iwamatsu@nigauri.org Signed-off-by: Guenter Roeck commit 3df4fce739e2b263120f528c5e0fe6b2f8937b5b Author: Ricky Wu Date: Mon Jun 7 18:16:34 2021 +0800 misc: rtsx: separate aspm mode into MODE_REG and MODE_CFG aspm (Active State Power Management) rtsx_comm_set_aspm: this function is for driver to make sure not enter power saving when processing of init and card_detcct ASPM_MODE_CFG: 8411 5209 5227 5229 5249 5250 Change back to use original way to control aspm ASPM_MODE_REG: 5227A 524A 5250A 5260 5261 5228 Keep the new way to control aspm Fixes: 121e9c6b5c4c ("misc: rtsx: modify and fix init_hw function") Reported-by: Chris Chiu Tested-by: Gordon Lack Cc: stable Signed-off-by: Ricky Wu Link: https://lore.kernel.org/r/20210607101634.4948-1-ricky_wu@realtek.com Signed-off-by: Greg Kroah-Hartman commit 5f0c2ee1fe8de700dd0d1cdc63e1a7338e2d3a3d Author: Loic Poulain Date: Sun Jun 6 21:07:41 2021 +0530 bus: mhi: pci-generic: Fix hibernation This patch fixes crash after resuming from hibernation. The issue occurs when mhi stack is builtin and so part of the 'restore-kernel', causing the device to be resumed from 'restored kernel' with a no more valid context (memory mappings etc...) and leading to spurious crashes. This patch fixes the issue by implementing proper freeze/restore callbacks. Link: https://lore.kernel.org/r/1622571445-4505-1-git-send-email-loic.poulain@linaro.org Reported-by: Shujun Wang Cc: stable Reviewed-by: Manivannan Sadhasivam Signed-off-by: Loic Poulain Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210606153741.20725-4-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit 0b67808ade8893a1b3608ddd74fac7854786c919 Author: Wei Yongjun Date: Sun Jun 6 21:07:40 2021 +0530 bus: mhi: pci_generic: Fix possible use-after-free in mhi_pci_remove() This driver's remove path calls del_timer(). However, that function does not wait until the timer handler finishes. This means that the timer handler may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling del_timer_sync(), which makes sure the timer handler has finished, and unable to re-schedule itself. Link: https://lore.kernel.org/r/20210413160318.2003699-1-weiyongjun1@huawei.com Fixes: 8562d4fe34a3 ("mhi: pci_generic: Add health-check") Cc: stable Reported-by: Hulk Robot Reviewed-by: Hemant kumar Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Signed-off-by: Wei Yongjun Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210606153741.20725-3-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit c7711c22c6ebc07a19a3dbdf87b05d9aa78f5390 Author: Jarvis Jiang Date: Sun Jun 6 21:07:39 2021 +0530 bus: mhi: pci_generic: T99W175: update channel name from AT to DUN According to MHI v1.1 specification, change the channel name of T99W175 from "AT" to "DUN" (Dial-up networking) for both channel 32 and 33, so that the channels can be bound to the Qcom WWAN control driver, and device node such as /dev/wwan0p3DUN will be generated, which is very useful for debugging modem Link: https://lore.kernel.org/r/20210429014226.21017-1-jarvis.w.jiang@gmail.com [mani: changed the dev node to /dev/wwan0p3DUN] Fixes: aac426562f56 ("bus: mhi: pci_generic: Introduce Foxconn T99W175 support") Reviewed-by: Manivannan Sadhasivam Signed-off-by: Jarvis Jiang Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210606153741.20725-2-manivannan.sadhasivam@linaro.org Signed-off-by: Greg Kroah-Hartman commit a9799541ca34652d9996e45f80e8e03144c12949 Author: Johannes Berg Date: Wed Jun 9 16:13:06 2021 +0200 mac80211: drop multicast fragments These are not permitted by the spec, just drop them. Link: https://lore.kernel.org/r/20210609161305.23def022b750.Ibd6dd3cdce573dae262fcdc47f8ac52b883a9c50@changeid Signed-off-by: Johannes Berg commit f5baf287f5da5641099ad5c809b3b4ebfc08506d Author: Johannes Berg Date: Tue Jun 8 11:32:30 2021 +0200 mac80211: move interface shutdown out of wiphy lock When reconfiguration fails, we shut down everything, but we cannot call cfg80211_shutdown_all_interfaces() with the wiphy mutex held. Since cfg80211 now calls it on resume errors, we only need to do likewise for where we call reconfig (whether directly or indirectly), but not under the wiphy lock. Cc: stable@vger.kernel.org Fixes: 2fe8ef106238 ("cfg80211: change netdev registration/unregistration semantics") Link: https://lore.kernel.org/r/20210608113226.78233c80f548.Iecc104aceb89f0568f50e9670a9cb191a1c8887b@changeid Signed-off-by: Johannes Berg commit 65bec836da8394b1d56bdec2c478dcac21cf12a4 Author: Johannes Berg Date: Tue Jun 8 11:32:29 2021 +0200 cfg80211: shut down interfaces on failed resume If resume fails, we should shut down all interfaces as the hardware is probably dead. This was/is already done now in mac80211, but we need to change that due to locking issues, so move it here and do it without the wiphy lock held. Cc: stable@vger.kernel.org Fixes: 2fe8ef106238 ("cfg80211: change netdev registration/unregistration semantics") Link: https://lore.kernel.org/r/20210608113226.d564ca69de7c.I2e3c3e5d410b72a4f63bade4fb075df041b3d92f@changeid Signed-off-by: Johannes Berg commit 43076c1e074359f11c85d7d1b85ede1bbb8ee6b9 Author: Johannes Berg Date: Tue Jun 8 11:32:28 2021 +0200 cfg80211: fix phy80211 symlink creation When I moved around the code here, I neglected that we could still call register_netdev() or similar without the wiphy mutex held, which then calls cfg80211_register_wdev() - that's also done from cfg80211_register_netdevice(), but the phy80211 symlink creation was only there. Now, the symlink isn't needed for a *pure* wdev, but a netdev not registered via cfg80211_register_wdev() should still have the symlink, so move the creation to the right place. Cc: stable@vger.kernel.org Fixes: 2fe8ef106238 ("cfg80211: change netdev registration/unregistration semantics") Link: https://lore.kernel.org/r/20210608113226.a5dc4c1e488c.Ia42fe663cefe47b0883af78c98f284c5555bbe5d@changeid Signed-off-by: Johannes Berg commit adaed1b9daf5a045be71e923e04b5069d2bee664 Author: Johannes Berg Date: Tue Jun 8 11:32:27 2021 +0200 mac80211: fix 'reset' debugfs locking cfg80211 now calls suspend/resume with the wiphy lock held, and while there's a problem with that needing to be fixed, we should do the same in debugfs. Cc: stable@vger.kernel.org Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Link: https://lore.kernel.org/r/20210608113226.14020430e449.I78e19db0a55a8295a376e15ac4cf77dbb4c6fb51@changeid Signed-off-by: Johannes Berg commit 7c3e8d9df265bd0bdf6e328174cdfba26eb22f1c Author: Andy Shevchenko Date: Tue Jun 8 17:42:37 2021 +0300 serial: 8250_exar: Avoid NULL pointer dereference at ->exit() It's possible that during ->exit() the private_data is NULL, for instance when there was no GPIO device instantiated. Due to this we may not dereference it. Add a respective check. Note, for now ->exit() only makes sense when GPIO device was instantiated, that's why we may use the check for entire function. Fixes: 81171e7d31a6 ("serial: 8250_exar: Constify the software nodes") Reported-by: Maxim Levitsky Signed-off-by: Andy Shevchenko Tested-by: Maxim Levitsky Link: https://lore.kernel.org/r/20210608144239.12697-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 159d8c274fd92438ca6d7068d7a5eeda157227f4 Author: Mika Westerberg Date: Wed Jun 9 13:25:33 2021 +0300 ACPI: Pass the same capabilities to the _OSC regardless of the query flag Commit 719e1f561afb ("ACPI: Execute platform _OSC also with query bit clear") makes acpi_bus_osc_negotiate_platform_control() not only query the platforms capabilities but it also commits the result back to the firmware to report which capabilities are supported by the OS back to the firmware On certain systems the BIOS loads SSDT tables dynamically based on the capabilities the OS claims to support. However, on these systems the _OSC actually clears some of the bits (under certain conditions) so what happens is that now when we call the _OSC twice the second time we pass the cleared values and that results errors like below to appear on the system log: ACPI BIOS Error (bug): Could not resolve symbol [\_PR.PR00._CPC], AE_NOT_FOUND (20210105/psargs-330) ACPI Error: Aborting method \_PR.PR01._CPC due to previous error (AE_NOT_FOUND) (20210105/psparse-529) In addition the ACPI 6.4 spec says following [1]: If the OS declares support of a feature in the Support Field in one call to _OSC, then it must preserve the set state of that bit (declaring support for that feature) in all subsequent calls. Based on the above we can fix the issue by passing the same set of capabilities to the platform wide _OSC in both calls regardless of the query flag. While there drop the context.ret.length checks which were wrong to begin with (as the length is number of bytes not elements). This is already checked in acpi_run_osc() that also returns an error in that case. Includes fixes by Hans de Goede. [1] https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#sequence-of-osc-calls BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213023 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1963717 Fixes: 719e1f561afb ("ACPI: Execute platform _OSC also with query bit clear") Cc: 5.12+ # 5.12+ Signed-off-by: Mika Westerberg Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit c8a570443943304cac2e4186dbce6989b6c2b8b5 Author: Linus Walleij Date: Tue Jun 8 23:33:18 2021 +0200 drm/mcde: Fix off by 10^3 in calculation The calclulation of how many bytes we stuff into the DSI pipeline for video mode panels is off by three orders of magnitude because we did not account for the fact that the DRM mode clock is in kilohertz rather than hertz. This used to be: drm_mode_vrefresh(mode) * mode->htotal * mode->vtotal which would become for example for s6e63m0: 60 x 514 x 831 = 25628040 Hz, but mode->clock is 25628 as it is in kHz. This affects only the Samsung GT-I8190 "Golden" phone right now since it is the only MCDE device with a video mode display. Curiously some specimen work with this code and wild settings in the EOL and empty packets at the end of the display, but I have noticed an eeire flicker until now. Others were not so lucky and got black screens. Cc: Ville Syrjälä Reported-by: Stephan Gerhold Fixes: 920dd1b1425b ("drm/mcde: Use mode->clock instead of reverse calculating it from the vrefresh") Signed-off-by: Linus Walleij Tested-by: Stephan Gerhold Reviewed-by: Stephan Gerhold Link: https://patchwork.freedesktop.org/patch/msgid/20210608213318.3897858-1-linus.walleij@linaro.org commit 30e9857a134905ac0d03ca244b615cc3ff0a076e Author: Bjorn Andersson Date: Tue Jun 8 11:07:02 2021 -0700 pinctrl: qcom: Make it possible to select SC8180x TLMM It's currently not possible to select the SC8180x TLMM driver, due to it selecting PINCTRL_MSM, rather than depending on the same. Fix this. Fixes: 97423113ec4b ("pinctrl: qcom: Add sc8180x TLMM driver") Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210608180702.2064253-1-bjorn.andersson@linaro.org Signed-off-by: Linus Walleij commit 510b80a6a0f1a0d114c6e33bcea64747d127973c Author: Thomas Gleixner Date: Tue Jun 8 16:36:21 2021 +0200 x86/pkru: Write hardware init value to PKRU when xstate is init When user space brings PKRU into init state, then the kernel handling is broken: T1 user space xsave(state) state.header.xfeatures &= ~XFEATURE_MASK_PKRU; xrstor(state) T1 -> kernel schedule() XSAVE(S) -> T1->xsave.header.xfeatures[PKRU] == 0 T1->flags |= TIF_NEED_FPU_LOAD; wrpkru(); schedule() ... pk = get_xsave_addr(&T1->fpu->state.xsave, XFEATURE_PKRU); if (pk) wrpkru(pk->pkru); else wrpkru(DEFAULT_PKRU); Because the xfeatures bit is 0 and therefore the value in the xsave storage is not valid, get_xsave_addr() returns NULL and switch_to() writes the default PKRU. -> FAIL #1! So that wrecks any copy_to/from_user() on the way back to user space which hits memory which is protected by the default PKRU value. Assumed that this does not fail (pure luck) then T1 goes back to user space and because TIF_NEED_FPU_LOAD is set it ends up in switch_fpu_return() __fpregs_load_activate() if (!fpregs_state_valid()) { load_XSTATE_from_task(); } But if nothing touched the FPU between T1 scheduling out and back in, then the fpregs_state is still valid which means switch_fpu_return() does nothing and just clears TIF_NEED_FPU_LOAD. Back to user space with DEFAULT_PKRU loaded. -> FAIL #2! The fix is simple: if get_xsave_addr() returns NULL then set the PKRU value to 0 instead of the restrictive default PKRU value in init_pkru_value. [ bp: Massage in minor nitpicks from folks. ] Fixes: 0cecca9d03c9 ("x86/fpu: Eager switch PKRU state") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Rik van Riel Tested-by: Babu Moger Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210608144346.045616965@linutronix.de commit e9de1ecadeab5fbffd873b9110e969c869554a56 Author: Lars-Peter Clausen Date: Mon Jun 7 12:01:19 2021 +0200 staging: ralink-gdma: Remove incorrect author information Lars did not write the ralink-gdma driver. Looks like his name just got copy&pasted from another similar DMA driver. Remove his name from the copyright and MODULE_AUTHOR. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210607100119.26983-1-lars@metafoo.de Signed-off-by: Greg Kroah-Hartman commit 43c85d770db80cb135f576f8fde6ff1a08e707a4 Author: Wenli Looi Date: Mon Jun 7 23:46:20 2021 -0700 staging: rtl8723bs: Fix uninitialized variables The sinfo.pertid and sinfo.generation variables are not initialized and it causes a crash when we use this as a wireless access point. [ 456.873025] ------------[ cut here ]------------ [ 456.878198] kernel BUG at mm/slub.c:3968! [ 456.882680] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM [ snip ] [ 457.271004] Backtrace: [ 457.273733] [] (kfree) from [] (nl80211_send_station+0x954/0xfc4) [ 457.282481] r9:eccca0c0 r8:e8edfec0 r7:00000000 r6:00000011 r5:e80a9480 r4:e8edfe00 [ 457.291132] [] (nl80211_send_station) from [] (cfg80211_new_sta+0x90/0x1cc) [ 457.300850] r10:e80a9480 r9:e8edfe00 r8:ea678cca r7:00000a20 r6:00000000 r5:ec46d000 [ 457.309586] r4:ec46d9e0 [ 457.312433] [] (cfg80211_new_sta) from [] (rtw_cfg80211_indicate_sta_assoc+0x80/0x9c [r8723bs]) [ 457.324095] r10:00009930 r9:e85b9d80 r8:bf091050 r7:00000000 r6:00000000 r5:0000001c [ 457.332831] r4:c1606788 [ 457.335692] [] (rtw_cfg80211_indicate_sta_assoc [r8723bs]) from [] (rtw_stassoc_event_callback+0x1c8/0x1d4 [r8723bs]) [ 457.349489] r7:ea678cc0 r6:000000a1 r5:f1225f84 r4:f086b000 [ 457.355845] [] (rtw_stassoc_event_callback [r8723bs]) from [] (mlme_evt_hdl+0x8c/0xb4 [r8723bs]) [ 457.367601] r7:c1604900 r6:f086c4b8 r5:00000000 r4:f086c000 [ 457.373959] [] (mlme_evt_hdl [r8723bs]) from [] (rtw_cmd_thread+0x198/0x3d8 [r8723bs]) [ 457.384744] r5:f086e000 r4:f086c000 [ 457.388754] [] (rtw_cmd_thread [r8723bs]) from [] (kthread+0x170/0x174) [ 457.398083] r10:ed7a57e8 r9:bf0367a4 r8:f086b000 r7:e8ede000 r6:00000000 r5:e9975200 [ 457.406828] r4:e8369900 [ 457.409653] [] (kthread) from [] (ret_from_fork+0x14/0x2c) [ 457.417718] Exception stack(0xe8edffb0 to 0xe8edfff8) [ 457.423356] ffa0: 00000000 00000000 00000000 00000000 [ 457.432492] ffc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 457.441618] ffe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 457.449006] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c014a0a4 [ 457.457750] r4:e9975200 [ 457.460574] Code: 1a000003 e5953004 e3130001 1a000000 (e7f001f2) [ 457.467381] ---[ end trace 4acbc8c15e9e6aa7 ]--- Link: https://forum.armbian.com/topic/14727-wifi-ap-kernel-bug-in-kernel-5444/ Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info") Fixes: f5ea9120be2e ("nl80211: add generation number to all dumps") Signed-off-by: Wenli Looi Reviewed-by: Dan Carpenter Cc: stable Link: https://lore.kernel.org/r/20210608064620.74059-1-wlooi@ucalgary.ca Signed-off-by: Greg Kroah-Hartman commit fbf649cd6d64d40c03c5397ecd6b1ae922ba7afc Author: Yang Yingliang Date: Sat Jun 5 16:09:14 2021 +0800 usb: misc: brcmstb-usb-pinmap: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Fixes: 517c4c44b323 ("usb: Add driver to allow any GPIO to be used for 7211 USB signals") Cc: stable Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210605080914.2057758-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit d00889080ab60051627dab1d85831cd9db750e2a Author: Marian-Cristian Rotariu Date: Tue Jun 8 19:26:50 2021 +0300 usb: dwc3: ep0: fix NULL pointer exception There is no validation of the index from dwc3_wIndex_to_dep() and we might be referring a non-existing ep and trigger a NULL pointer exception. In certain configurations we might use fewer eps and the index might wrongly indicate a larger ep index than existing. By adding this validation from the patch we can actually report a wrong index back to the caller. In our usecase we are using a composite device on an older kernel, but upstream might use this fix also. Unfortunately, I cannot describe the hardware for others to reproduce the issue as it is a proprietary implementation. [ 82.958261] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a4 [ 82.966891] Mem abort info: [ 82.969663] ESR = 0x96000006 [ 82.972703] Exception class = DABT (current EL), IL = 32 bits [ 82.978603] SET = 0, FnV = 0 [ 82.981642] EA = 0, S1PTW = 0 [ 82.984765] Data abort info: [ 82.987631] ISV = 0, ISS = 0x00000006 [ 82.991449] CM = 0, WnR = 0 [ 82.994409] user pgtable: 4k pages, 39-bit VAs, pgdp = 00000000c6210ccc [ 83.000999] [00000000000000a4] pgd=0000000053aa5003, pud=0000000053aa5003, pmd=0000000000000000 [ 83.009685] Internal error: Oops: 96000006 [#1] PREEMPT SMP [ 83.026433] Process irq/62-dwc3 (pid: 303, stack limit = 0x000000003985154c) [ 83.033470] CPU: 0 PID: 303 Comm: irq/62-dwc3 Not tainted 4.19.124 #1 [ 83.044836] pstate: 60000085 (nZCv daIf -PAN -UAO) [ 83.049628] pc : dwc3_ep0_handle_feature+0x414/0x43c [ 83.054558] lr : dwc3_ep0_interrupt+0x3b4/0xc94 ... [ 83.141788] Call trace: [ 83.144227] dwc3_ep0_handle_feature+0x414/0x43c [ 83.148823] dwc3_ep0_interrupt+0x3b4/0xc94 [ 83.181546] ---[ end trace aac6b5267d84c32f ]--- Signed-off-by: Marian-Cristian Rotariu Cc: stable Link: https://lore.kernel.org/r/20210608162650.58426-1-marian.c.rotariu@gmail.com Signed-off-by: Greg Kroah-Hartman commit 305f670846a31a261462577dd0b967c4fa796871 Author: Linyu Yuan Date: Wed Jun 9 07:35:47 2021 +0800 usb: gadget: eem: fix wrong eem header operation when skb_clone() or skb_copy_expand() fail, it should pull skb with lengh indicated by header, or not it will read network data and check it as header. Cc: Signed-off-by: Linyu Yuan Link: https://lore.kernel.org/r/20210608233547.3767-1-linyyuan@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 184fa76b87ca36c7e98f152df709bf6f492d8e29 Author: Andy Shevchenko Date: Mon Jun 7 23:50:07 2021 +0300 usb: typec: intel_pmc_mux: Put ACPI device using acpi_dev_put() For ACPI devices we have a symmetric API to put them, so use it in the driver. Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210607205007.71458-3-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit 843fabdd7623271330af07f1b7fbd7fabe33c8de Author: Andy Shevchenko Date: Mon Jun 7 23:50:06 2021 +0300 usb: typec: intel_pmc_mux: Add missed error check for devm_ioremap_resource() devm_ioremap_resource() can return an error, add missed check for it. Fixes: 43d596e32276 ("usb: typec: intel_pmc_mux: Check the port status before connect") Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Cc: stable Link: https://lore.kernel.org/r/20210607205007.71458-2-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1a85b350a7741776a406005b943e3dec02c424ed Author: Andy Shevchenko Date: Mon Jun 7 23:50:05 2021 +0300 usb: typec: intel_pmc_mux: Put fwnode in error case during ->probe() device_get_next_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes: 6701adfa9693 ("usb: typec: driver for Intel PMC mux control") Cc: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Cc: stable Link: https://lore.kernel.org/r/20210607205007.71458-1-andy.shevchenko@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ab14ab1f2db24ffae6c5c39a689660486962e6e Author: Kyle Tso Date: Sun Jun 6 16:14:52 2021 +0800 usb: typec: tcpm: Do not finish VDM AMS for retrying Responses If the VDM responses couldn't be sent successfully, it doesn't need to finish the AMS until the retry count reaches the limit. Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance") Reviewed-by: Guenter Roeck Cc: stable Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210606081452.764032-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 032e288097a553db5653af552dd8035cd2a0ba96 Author: Maciej Żenczykowski Date: Tue Jun 8 19:44:59 2021 -0700 usb: fix various gadget panics on 10gbps cabling usb_assign_descriptors() is called with 5 parameters, the last 4 of which are the usb_descriptor_header for: full-speed (USB1.1 - 12Mbps [including USB1.0 low-speed @ 1.5Mbps), high-speed (USB2.0 - 480Mbps), super-speed (USB3.0 - 5Gbps), super-speed-plus (USB3.1 - 10Gbps). The differences between full/high/super-speed descriptors are usually substantial (due to changes in the maximum usb block size from 64 to 512 to 1024 bytes and other differences in the specs), while the difference between 5 and 10Gbps descriptors may be as little as nothing (in many cases the same tuning is simply good enough). However if a gadget driver calls usb_assign_descriptors() with a NULL descriptor for super-speed-plus and is then used on a max 10gbps configuration, the kernel will crash with a null pointer dereference, when a 10gbps capable device port + cable + host port combination shows up. (This wouldn't happen if the gadget max-speed was set to 5gbps, but it of course defaults to the maximum, and there's no real reason to artificially limit it) The fix is to simply use the 5gbps descriptor as the 10gbps descriptor, if a 10gbps descriptor wasn't provided. Obviously this won't fix the problem if the 5gbps descriptor is also NULL, but such cases can't be so trivially solved (and any such gadgets are unlikely to be used with USB3 ports any way). Cc: Felipe Balbi Cc: Greg Kroah-Hartman Signed-off-by: Maciej Żenczykowski Cc: stable Link: https://lore.kernel.org/r/20210609024459.1126080-1-zenczykowski@gmail.com Signed-off-by: Greg Kroah-Hartman commit 12f7764ac61200e32c916f038bdc08f884b0b604 Author: Thomas Gleixner Date: Tue Jun 8 16:36:20 2021 +0200 x86/process: Check PF_KTHREAD and not current->mm for kernel threads switch_fpu_finish() checks current->mm as indicator for kernel threads. That's wrong because kernel threads can temporarily use a mm of a user process via kthread_use_mm(). Check the task flags for PF_KTHREAD instead. Fixes: 0cecca9d03c9 ("x86/fpu: Eager switch PKRU state") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Rik van Riel Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210608144345.912645927@linutronix.de commit 90c4d05780d47e14a50e11a7f17373104cd47d25 Author: Maciej Żenczykowski Date: Mon Jun 7 21:41:41 2021 -0700 usb: fix various gadgets null ptr deref on 10gbps cabling. This avoids a null pointer dereference in f_{ecm,eem,hid,loopback,printer,rndis,serial,sourcesink,subset,tcm} by simply reusing the 5gbps config for 10gbps. Fixes: eaef50c76057 ("usb: gadget: Update usb_assign_descriptors for SuperSpeedPlus") Cc: Christophe JAILLET Cc: Felipe Balbi Cc: Gustavo A. R. Silva Cc: Lorenzo Colitti Cc: Martin K. Petersen Cc: Michael R Sweet Cc: Mike Christie Cc: Pawel Laszczak Cc: Peter Chen Cc: Sudhakar Panneerselvam Cc: Wei Ming Chen Cc: Will McVicker Cc: Zqiang Reviewed-By: Lorenzo Colitti Cc: stable Signed-off-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20210608044141.3898496-1-zenczykowski@gmail.com Signed-off-by: Greg Kroah-Hartman commit d1658268e43980c071dbffc3d894f6f6c4b6732a Author: Mario Limonciello Date: Thu May 27 10:45:34 2021 -0500 usb: pci-quirks: disable D3cold on xhci suspend for s2idle on AMD Renoir The XHCI controller is required to enter D3hot rather than D3cold for AMD s2idle on this hardware generation. Otherwise, the 'Controller Not Ready' (CNR) bit is not being cleared by host in resume and eventually this results in xhci resume failures during the s2idle wakeup. Link: https://lore.kernel.org/linux-usb/1612527609-7053-1-git-send-email-Prike.Liang@amd.com/ Suggested-by: Prike Liang Signed-off-by: Mario Limonciello Cc: stable # 5.11+ Link: https://lore.kernel.org/r/20210527154534.8900-1-mario.limonciello@amd.com Signed-off-by: Greg Kroah-Hartman commit 1958ff5ad2d4908b44a72bcf564dfe67c981e7fe Author: Maciej Żenczykowski Date: Tue Jun 8 01:54:38 2021 -0700 usb: f_ncm: only first packet of aggregate needs to start timer The reasoning for this change is that if we already had a packet pending, then we also already had a pending timer, and as such there is no need to reschedule it. This also prevents packets getting delayed 60 ms worst case under a tiny packet every 290us transmit load, by keeping the timeout always relative to the first queued up packet. (300us delay * 16KB max aggregation / 80 byte packet =~ 60 ms) As such the first packet is now at most delayed by 300us. Under low transmit load, this will simply result in us sending a shorter aggregate, as originally intended. This patch has the benefit of greatly reducing (by ~10 factor with 1500 byte frames aggregated into 16 kiB) the number of (potentially pretty costly) updates to the hrtimer. Cc: Brooke Basile Cc: Bryan O'Donoghue Cc: Felipe Balbi Cc: Lorenzo Colitti Signed-off-by: Maciej Żenczykowski Link: https://lore.kernel.org/r/20210608085438.813960-1-zenczykowski@gmail.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 3370139745853f7826895293e8ac3aec1430508e Author: Maciej Żenczykowski Date: Mon Jun 7 17:53:44 2021 -0700 USB: f_ncm: ncm_bitrate (speed) is unsigned [ 190.544755] configfs-gadget gadget: notify speed -44967296 This is because 4250000000 - 2**32 is -44967296. Fixes: 9f6ce4240a2b ("usb: gadget: f_ncm.c added") Cc: Brooke Basile Cc: Bryan O'Donoghue Cc: Felipe Balbi Cc: Lorenzo Colitti Cc: Yauheni Kaliuta Cc: Linux USB Mailing List Acked-By: Lorenzo Colitti Signed-off-by: Maciej Żenczykowski Cc: stable Link: https://lore.kernel.org/r/20210608005344.3762668-1-zenczykowski@gmail.com Signed-off-by: Greg Kroah-Hartman commit 40d9e03f414d8b837926a4460788682e59a8c654 Author: Rui Miguel Silva Date: Mon Jun 7 18:00:54 2021 +0100 MAINTAINERS: usb: add entry for isp1760 Giving support for isp1763 made a little revival to this driver, add entry in the MAINTAINERS file with me as maintainer. Acked-by: Laurent Pinchart Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210607170054.220975-1-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman commit a39b7ba35d78b19b90c640a9fa06a8407e40e85d Merge: 1ca01c0805b7e a9aecef198faa Author: Greg Kroah-Hartman Date: Wed Jun 9 10:05:01 2021 +0200 Merge tag 'usb-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Two bug fixes for cdns3 and cdnsp * tag 'usb-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdnsp: Fix deadlock issue in cdnsp_thread_irq_handler usb: cdns3: Enable TDL_CHK only for OUT ep commit 1ca01c0805b7ea1442b435da56b6a145306009b7 Merge: 6fc1db5e6211e bc96c72df33ee Author: Greg Kroah-Hartman Date: Wed Jun 9 10:04:17 2021 +0200 Merge tag 'usb-serial-5.13-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Jonah writes: USB-serial fixes for 5.13-rc5 Here's a fix for some pipe-direction mismatches in the quatech2 driver, and a couple of new device ids for ftdi_sio and omninet (and a related trivial cleanup). All but the ftdi_sio commit have been in linux-next, and with no reported issues. * tag 'usb-serial-5.13-rc5' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: ftdi_sio: add NovaTech OrionMX product ID USB: serial: omninet: update driver description USB: serial: omninet: add device id for Zyxel Omni 56K Plus USB: serial: quatech2: fix control-request directions commit d8778e393afa421f1f117471144f8ce6deb6953a Author: Andy Lutomirski Date: Tue Jun 8 16:36:19 2021 +0200 x86/fpu: Invalidate FPU state after a failed XRSTOR from a user buffer Both Intel and AMD consider it to be architecturally valid for XRSTOR to fail with #PF but nonetheless change the register state. The actual conditions under which this might occur are unclear [1], but it seems plausible that this might be triggered if one sibling thread unmaps a page and invalidates the shared TLB while another sibling thread is executing XRSTOR on the page in question. __fpu__restore_sig() can execute XRSTOR while the hardware registers are preserved on behalf of a different victim task (using the fpu_fpregs_owner_ctx mechanism), and, in theory, XRSTOR could fail but modify the registers. If this happens, then there is a window in which __fpu__restore_sig() could schedule out and the victim task could schedule back in without reloading its own FPU registers. This would result in part of the FPU state that __fpu__restore_sig() was attempting to load leaking into the victim task's user-visible state. Invalidate preserved FPU registers on XRSTOR failure to prevent this situation from corrupting any state. [1] Frequent readers of the errata lists might imagine "complex microarchitectural conditions". Fixes: 1d731e731c4c ("x86/fpu: Add a fastpath to __fpu__restore_sig()") Signed-off-by: Andy Lutomirski Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Rik van Riel Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210608144345.758116583@linutronix.de commit 484cea4f362e1eeb5c869abbfb5f90eae6421b38 Author: Thomas Gleixner Date: Tue Jun 8 16:36:18 2021 +0200 x86/fpu: Prevent state corruption in __fpu__restore_sig() The non-compacted slowpath uses __copy_from_user() and copies the entire user buffer into the kernel buffer, verbatim. This means that the kernel buffer may now contain entirely invalid state on which XRSTOR will #GP. validate_user_xstate_header() can detect some of that corruption, but that leaves the onus on callers to clear the buffer. Prior to XSAVES support, it was possible just to reinitialize the buffer, completely, but with supervisor states that is not longer possible as the buffer clearing code split got it backwards. Fixing that is possible but not corrupting the state in the first place is more robust. Avoid corruption of the kernel XSAVE buffer by using copy_user_to_xstate() which validates the XSAVE header contents before copying the actual states to the kernel. copy_user_to_xstate() was previously only called for compacted-format kernel buffers, but it works for both compacted and non-compacted forms. Using it for the non-compacted form is slower because of multiple __copy_from_user() operations, but that cost is less important than robust code in an already slow path. [ Changelog polished by Dave Hansen ] Fixes: b860eb8dce59 ("x86/fpu/xstate: Define new functions for clearing fpregs and xstates") Reported-by: syzbot+2067e764dbcd10721e2e@syzkaller.appspotmail.com Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Reviewed-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Rik van Riel Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210608144345.611833074@linutronix.de commit 4422829e8053068e0225e4d0ef42dc41ea7c9ef5 Author: Paolo Bonzini Date: Wed Jun 9 01:49:13 2021 -0400 kvm: fix previous commit for 32-bit builds array_index_nospec does not work for uint64_t on 32-bit builds. However, the size of a memory slot must be less than 20 bits wide on those system, since the memory slot must fit in the user address space. So just store it in an unsigned long. Signed-off-by: Paolo Bonzini commit f2386cf7c5f4ff5d7b584f5d92014edd7df6c676 Author: Aleksander Jan Bajkowski Date: Tue Jun 8 23:21:07 2021 +0200 net: lantiq: disable interrupt before sheduling NAPI This patch fixes TX hangs with threaded NAPI enabled. The scheduled NAPI seems to be executed in parallel with the interrupt on second thread. Sometimes it happens that ltq_dma_disable_irq() is executed after xrx200_tx_housekeeping(). The symptom is that TX interrupts are disabled in the DMA controller. As a result, the TX hangs after a few seconds of the iperf test. Scheduling NAPI after disabling interrupts fixes this issue. Tested on Lantiq xRX200 (BT Home Hub 5A). Fixes: 9423361da523 ("net: lantiq: Disable IRQs only if NAPI gets scheduled ") Signed-off-by: Aleksander Jan Bajkowski Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 8929ef8d4dfd53a05913e22561784ece5f6419c7 Author: Fabrizio Castro Date: Thu Apr 8 21:24:36 2021 +0100 media: dt-bindings: media: renesas,drif: Fix fck definition dt_binding_check reports the below error with the latest schema: Documentation/devicetree/bindings/media/renesas,drif.yaml: properties:clock-names:maxItems: False schema does not allow 1 Documentation/devicetree/bindings/media/renesas,drif.yaml: ignoring, error in schema: properties: clock-names: maxItems This patch fixes the problem. Signed-off-by: Fabrizio Castro Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210408202436.3706-1-fabrizio.castro.jz@renesas.com commit 504fd6a5390c30b1b7670768e314dd5d473da06a Author: Shay Agroskin Date: Tue Jun 8 19:42:54 2021 +0300 net: ena: fix DMA mapping function issues in XDP This patch fixes several bugs found when (DMA/LLQ) mapping a packet for transmission. The mapping procedure makes the transmitted packet accessible by the device. When using LLQ, this requires copying the packet's header to push header (which would be passed to LLQ) and creating DMA mapping for the payload (if the packet doesn't fit the maximum push length). When not using LLQ, we map the whole packet with DMA. The following bugs are fixed in the code: 1. Add support for non-LLQ machines: The ena_xdp_tx_map_frame() function assumed that LLQ is supported, and never mapped the whole packet using DMA. On some instances, which don't support LLQ, this causes loss of traffic. 2. Wrong DMA buffer length passed to device: When using LLQ, the first 'tx_max_header_size' bytes of the packet would be copied to push header. The rest of the packet would be copied to a DMA'd buffer. 3. Freeing the XDP buffer twice in case of a mapping error: In case a buffer DMA mapping fails, the function uses xdp_return_frame_rx_napi() to free the RX buffer and returns from the function with an error. XDP frames that fail to xmit get freed by the kernel and so there is no need for this call. Fixes: 548c4940b9f1 ("net: ena: Implement XDP_TX action") Signed-off-by: Shay Agroskin Signed-off-by: David S. Miller commit 1650bdb1c516c248fb06f6d076559ff6437a5853 Author: Vladimir Oltean Date: Tue Jun 8 14:15:35 2021 +0300 net: dsa: felix: re-enable TX flow control in ocelot_port_flush() Because flow control is set up statically in ocelot_init_port(), and not in phylink_mac_link_up(), what happens is that after the blamed commit, the flow control remains disabled after the port flushing procedure. Fixes: eb4733d7cffc ("net: dsa: felix: implement port flushing on .phylink_mac_link_down") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 49bfcbfd989a8f1f23e705759a6bb099de2cff9f Author: Pavel Skripkin Date: Tue Jun 8 11:06:41 2021 +0300 net: rds: fix memory leak in rds_recvmsg Syzbot reported memory leak in rds. The problem was in unputted refcount in case of error. int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, int msg_flags) { ... if (!rds_next_incoming(rs, &inc)) { ... } After this "if" inc refcount incremented and if (rds_cmsg_recv(inc, msg, rs)) { ret = -EFAULT; goto out; } ... out: return ret; } in case of rds_cmsg_recv() fail the refcount won't be decremented. And it's easy to see from ftrace log, that rds_inc_addref() don't have rds_inc_put() pair in rds_recvmsg() after rds_cmsg_recv() 1) | rds_recvmsg() { 1) 3.721 us | rds_inc_addref(); 1) 3.853 us | rds_message_inc_copy_to_user(); 1) + 10.395 us | rds_cmsg_recv(); 1) + 34.260 us | } Fixes: bdbe6fbc6a2f ("RDS: recv.c") Reported-and-tested-by: syzbot+5134cdf021c4ed5aaa5f@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Reviewed-by: Håkon Bugge Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller commit da27a83fd6cc7780fea190e1f5c19e87019da65c Author: Paolo Bonzini Date: Tue Jun 8 15:31:42 2021 -0400 kvm: avoid speculation-based attacks from out-of-range memslot accesses KVM's mechanism for accessing guest memory translates a guest physical address (gpa) to a host virtual address using the right-shifted gpa (also known as gfn) and a struct kvm_memory_slot. The translation is performed in __gfn_to_hva_memslot using the following formula: hva = slot->userspace_addr + (gfn - slot->base_gfn) * PAGE_SIZE It is expected that gfn falls within the boundaries of the guest's physical memory. However, a guest can access invalid physical addresses in such a way that the gfn is invalid. __gfn_to_hva_memslot is called from kvm_vcpu_gfn_to_hva_prot, which first retrieves a memslot through __gfn_to_memslot. While __gfn_to_memslot does check that the gfn falls within the boundaries of the guest's physical memory or not, a CPU can speculate the result of the check and continue execution speculatively using an illegal gfn. The speculation can result in calculating an out-of-bounds hva. If the resulting host virtual address is used to load another guest physical address, this is effectively a Spectre gadget consisting of two consecutive reads, the second of which is data dependent on the first. Right now it's not clear if there are any cases in which this is exploitable. One interesting case was reported by the original author of this patch, and involves visiting guest page tables on x86. Right now these are not vulnerable because the hva read goes through get_user(), which contains an LFENCE speculation barrier. However, there are patches in progress for x86 uaccess.h to mask kernel addresses instead of using LFENCE; once these land, a guest could use speculation to read from the VMM's ring 3 address space. Other architectures such as ARM already use the address masking method, and would be susceptible to this same kind of data-dependent access gadgets. Therefore, this patch proactively protects from these attacks by masking out-of-bounds gfns in __gfn_to_hva_memslot, which blocks speculation of invalid hvas. Sean Christopherson noted that this patch does not cover kvm_read_guest_offset_cached. This however is limited to a few bytes past the end of the cache, and therefore it is unlikely to be useful in the context of building a chain of data dependent accesses. Reported-by: Artemiy Margaritov Co-developed-by: Artemiy Margaritov Signed-off-by: Paolo Bonzini commit b53e84eed08b88fd3ff59e5c2a7f1a69d4004e32 Author: Lai Jiangshan Date: Tue Jun 1 01:22:56 2021 +0800 KVM: x86: Unload MMU on guest TLB flush if TDP disabled to force MMU sync When using shadow paging, unload the guest MMU when emulating a guest TLB flush to ensure all roots are synchronized. From the guest's perspective, flushing the TLB ensures any and all modifications to its PTEs will be recognized by the CPU. Note, unloading the MMU is overkill, but is done to mirror KVM's existing handling of INVPCID(all) and ensure the bug is squashed. Future cleanup can be done to more precisely synchronize roots when servicing a guest TLB flush. If TDP is enabled, synchronizing the MMU is unnecessary even if nested TDP is in play, as a "legacy" TLB flush from L1 does not invalidate L1's TDP mappings. For EPT, an explicit INVEPT is required to invalidate guest-physical mappings; for NPT, guest mappings are always tagged with an ASID and thus can only be invalidated via the VMCB's ASID control. This bug has existed since the introduction of KVM_VCPU_FLUSH_TLB. It was only recently exposed after Linux guests stopped flushing the local CPU's TLB prior to flushing remote TLBs (see commit 4ce94eabac16, "x86/mm/tlb: Flush remote and local TLBs concurrently"), but is also visible in Windows 10 guests. Tested-by: Maxim Levitsky Reviewed-by: Maxim Levitsky Fixes: f38a7b75267f ("KVM: X86: support paravirtualized help for TLB shootdowns") Signed-off-by: Lai Jiangshan [sean: massaged comment and changelog] Message-Id: <20210531172256.2908-1-jiangshanlai@gmail.com> Signed-off-by: Sean Christopherson Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 41fe8d088e96472f63164e213de44ec77be69478 Author: Coly Li Date: Mon Jun 7 20:50:52 2021 +0800 bcache: avoid oversized read request in cache missing code path In the cache missing code path of cached device, if a proper location from the internal B+ tree is matched for a cache miss range, function cached_dev_cache_miss() will be called in cache_lookup_fn() in the following code block, [code block 1] 526 unsigned int sectors = KEY_INODE(k) == s->iop.inode 527 ? min_t(uint64_t, INT_MAX, 528 KEY_START(k) - bio->bi_iter.bi_sector) 529 : INT_MAX; 530 int ret = s->d->cache_miss(b, s, bio, sectors); Here s->d->cache_miss() is the call backfunction pointer initialized as cached_dev_cache_miss(), the last parameter 'sectors' is an important hint to calculate the size of read request to backing device of the missing cache data. Current calculation in above code block may generate oversized value of 'sectors', which consequently may trigger 2 different potential kernel panics by BUG() or BUG_ON() as listed below, 1) BUG_ON() inside bch_btree_insert_key(), [code block 2] 886 BUG_ON(b->ops->is_extents && !KEY_SIZE(k)); 2) BUG() inside biovec_slab(), [code block 3] 51 default: 52 BUG(); 53 return NULL; All the above panics are original from cached_dev_cache_miss() by the oversized parameter 'sectors'. Inside cached_dev_cache_miss(), parameter 'sectors' is used to calculate the size of data read from backing device for the cache missing. This size is stored in s->insert_bio_sectors by the following lines of code, [code block 4] 909 s->insert_bio_sectors = min(sectors, bio_sectors(bio) + reada); Then the actual key inserting to the internal B+ tree is generated and stored in s->iop.replace_key by the following lines of code, [code block 5] 911 s->iop.replace_key = KEY(s->iop.inode, 912 bio->bi_iter.bi_sector + s->insert_bio_sectors, 913 s->insert_bio_sectors); The oversized parameter 'sectors' may trigger panic 1) by BUG_ON() from the above code block. And the bio sending to backing device for the missing data is allocated with hint from s->insert_bio_sectors by the following lines of code, [code block 6] 926 cache_bio = bio_alloc_bioset(GFP_NOWAIT, 927 DIV_ROUND_UP(s->insert_bio_sectors, PAGE_SECTORS), 928 &dc->disk.bio_split); The oversized parameter 'sectors' may trigger panic 2) by BUG() from the agove code block. Now let me explain how the panics happen with the oversized 'sectors'. In code block 5, replace_key is generated by macro KEY(). From the definition of macro KEY(), [code block 7] 71 #define KEY(inode, offset, size) \ 72 ((struct bkey) { \ 73 .high = (1ULL << 63) | ((__u64) (size) << 20) | (inode), \ 74 .low = (offset) \ 75 }) Here 'size' is 16bits width embedded in 64bits member 'high' of struct bkey. But in code block 1, if "KEY_START(k) - bio->bi_iter.bi_sector" is very probably to be larger than (1<<16) - 1, which makes the bkey size calculation in code block 5 is overflowed. In one bug report the value of parameter 'sectors' is 131072 (= 1 << 17), the overflowed 'sectors' results the overflowed s->insert_bio_sectors in code block 4, then makes size field of s->iop.replace_key to be 0 in code block 5. Then the 0- sized s->iop.replace_key is inserted into the internal B+ tree as cache missing check key (a special key to detect and avoid a racing between normal write request and cache missing read request) as, [code block 8] 915 ret = bch_btree_insert_check_key(b, &s->op, &s->iop.replace_key); Then the 0-sized s->iop.replace_key as 3rd parameter triggers the bkey size check BUG_ON() in code block 2, and causes the kernel panic 1). Another kernel panic is from code block 6, is by the bvecs number oversized value s->insert_bio_sectors from code block 4, min(sectors, bio_sectors(bio) + reada) There are two possibility for oversized reresult, - bio_sectors(bio) is valid, but bio_sectors(bio) + reada is oversized. - sectors < bio_sectors(bio) + reada, but sectors is oversized. From a bug report the result of "DIV_ROUND_UP(s->insert_bio_sectors, PAGE_SECTORS)" from code block 6 can be 344, 282, 946, 342 and many other values which larther than BIO_MAX_VECS (a.k.a 256). When calling bio_alloc_bioset() with such larger-than-256 value as the 2nd parameter, this value will eventually be sent to biovec_slab() as parameter 'nr_vecs' in following code path, bio_alloc_bioset() ==> bvec_alloc() ==> biovec_slab() Because parameter 'nr_vecs' is larger-than-256 value, the panic by BUG() in code block 3 is triggered inside biovec_slab(). From the above analysis, we know that the 4th parameter 'sector' sent into cached_dev_cache_miss() may cause overflow in code block 5 and 6, and finally cause kernel panic in code block 2 and 3. And if result of bio_sectors(bio) + reada exceeds valid bvecs number, it may also trigger kernel panic in code block 3 from code block 6. Now the almost-useless readahead size for cache missing request back to backing device is removed, this patch can fix the oversized issue with more simpler method. - add a local variable size_limit, set it by the minimum value from the max bkey size and max bio bvecs number. - set s->insert_bio_sectors by the minimum value from size_limit, sectors, and the sectors size of bio. - replace sectors by s->insert_bio_sectors to do bio_next_split. By the above method with size_limit, s->insert_bio_sectors will never result oversized replace_key size or bio bvecs number. And split bio 'miss' from bio_next_split() will always match the size of 'cache_bio', that is the current maximum bio size we can sent to backing device for fetching the cache missing data. Current problmatic code can be partially found since Linux v3.13-rc1, therefore all maintained stable kernels should try to apply this fix. Reported-by: Alexander Ullrich Reported-by: Diego Ercolani Reported-by: Jan Szubiak Reported-by: Marco Rebhan Reported-by: Matthias Ferdinand Reported-by: Victor Westerhuis Reported-by: Vojtech Pavlik Reported-and-tested-by: Rolf Fokkens Reported-and-tested-by: Thorsten Knabe Signed-off-by: Coly Li Cc: stable@vger.kernel.org Cc: Christoph Hellwig Cc: Kent Overstreet Cc: Nix Cc: Takashi Iwai Link: https://lore.kernel.org/r/20210607125052.21277-3-colyli@suse.de Signed-off-by: Jens Axboe commit 1616a4c2ab1a80893b6890ae93da40a2b1d0c691 Author: Coly Li Date: Mon Jun 7 20:50:51 2021 +0800 bcache: remove bcache device self-defined readahead For read cache missing, bcache defines a readahead size for the read I/O request to the backing device for the missing data. This readahead size is initialized to 0, and almost no one uses it to avoid unnecessary read amplifying onto backing device and write amplifying onto cache device. Considering upper layer file system code has readahead logic allready and works fine with readahead_cache_policy sysfile interface, we don't have to keep bcache self-defined readahead anymore. This patch removes the bcache self-defined readahead for cache missing request for backing device, and the readahead sysfs file interfaces are removed as well. This is the preparation for next patch to fix potential kernel panic due to oversized request in a simpler method. Reported-by: Alexander Ullrich Reported-by: Diego Ercolani Reported-by: Jan Szubiak Reported-by: Marco Rebhan Reported-by: Matthias Ferdinand Reported-by: Victor Westerhuis Reported-by: Vojtech Pavlik Reported-and-tested-by: Rolf Fokkens Reported-and-tested-by: Thorsten Knabe Signed-off-by: Coly Li Reviewed-by: Christoph Hellwig Cc: stable@vger.kernel.org Cc: Kent Overstreet Cc: Nix Cc: Takashi Iwai Link: https://lore.kernel.org/r/20210607125052.21277-2-colyli@suse.de Signed-off-by: Jens Axboe commit 3e08a9f9760f4a70d633c328a76408e62d6f80a3 Author: Liangyan Date: Mon Jun 7 20:57:34 2021 +0800 tracing: Correct the length check which causes memory corruption We've suffered from severe kernel crashes due to memory corruption on our production environment, like, Call Trace: [1640542.554277] general protection fault: 0000 [#1] SMP PTI [1640542.554856] CPU: 17 PID: 26996 Comm: python Kdump: loaded Tainted:G [1640542.556629] RIP: 0010:kmem_cache_alloc+0x90/0x190 [1640542.559074] RSP: 0018:ffffb16faa597df8 EFLAGS: 00010286 [1640542.559587] RAX: 0000000000000000 RBX: 0000000000400200 RCX: 0000000006e931bf [1640542.560323] RDX: 0000000006e931be RSI: 0000000000400200 RDI: ffff9a45ff004300 [1640542.560996] RBP: 0000000000400200 R08: 0000000000023420 R09: 0000000000000000 [1640542.561670] R10: 0000000000000000 R11: 0000000000000000 R12: ffffffff9a20608d [1640542.562366] R13: ffff9a45ff004300 R14: ffff9a45ff004300 R15: 696c662f65636976 [1640542.563128] FS: 00007f45d7c6f740(0000) GS:ffff9a45ff840000(0000) knlGS:0000000000000000 [1640542.563937] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [1640542.564557] CR2: 00007f45d71311a0 CR3: 000000189d63e004 CR4: 00000000003606e0 [1640542.565279] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [1640542.566069] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [1640542.566742] Call Trace: [1640542.567009] anon_vma_clone+0x5d/0x170 [1640542.567417] __split_vma+0x91/0x1a0 [1640542.567777] do_munmap+0x2c6/0x320 [1640542.568128] vm_munmap+0x54/0x70 [1640542.569990] __x64_sys_munmap+0x22/0x30 [1640542.572005] do_syscall_64+0x5b/0x1b0 [1640542.573724] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [1640542.575642] RIP: 0033:0x7f45d6e61e27 James Wang has reproduced it stably on the latest 4.19 LTS. After some debugging, we finally proved that it's due to ftrace buffer out-of-bound access using a debug tool as follows: [ 86.775200] BUG: Out-of-bounds write at addr 0xffff88aefe8b7000 [ 86.780806] no_context+0xdf/0x3c0 [ 86.784327] __do_page_fault+0x252/0x470 [ 86.788367] do_page_fault+0x32/0x140 [ 86.792145] page_fault+0x1e/0x30 [ 86.795576] strncpy_from_unsafe+0x66/0xb0 [ 86.799789] fetch_memory_string+0x25/0x40 [ 86.804002] fetch_deref_string+0x51/0x60 [ 86.808134] kprobe_trace_func+0x32d/0x3a0 [ 86.812347] kprobe_dispatcher+0x45/0x50 [ 86.816385] kprobe_ftrace_handler+0x90/0xf0 [ 86.820779] ftrace_ops_assist_func+0xa1/0x140 [ 86.825340] 0xffffffffc00750bf [ 86.828603] do_sys_open+0x5/0x1f0 [ 86.832124] do_syscall_64+0x5b/0x1b0 [ 86.835900] entry_SYSCALL_64_after_hwframe+0x44/0xa9 commit b220c049d519 ("tracing: Check length before giving out the filter buffer") adds length check to protect trace data overflow introduced in 0fc1b09ff1ff, seems that this fix can't prevent overflow entirely, the length check should also take the sizeof entry->array[0] into account, since this array[0] is filled the length of trace data and occupy addtional space and risk overflow. Link: https://lkml.kernel.org/r/20210607125734.1770447-1-liangyan.peng@linux.alibaba.com Cc: stable@vger.kernel.org Cc: Ingo Molnar Cc: Xunlei Pang Cc: Greg Kroah-Hartman Fixes: b220c049d519 ("tracing: Check length before giving out the filter buffer") Reviewed-by: Xunlei Pang Reviewed-by: yinbinbin Reviewed-by: Wetp Zhang Tested-by: James Wang Signed-off-by: Liangyan Signed-off-by: Steven Rostedt (VMware) commit 6c14133d2d3f768e0a35128faac8aa6ed4815051 Author: Steven Rostedt (VMware) Date: Mon Jun 7 21:39:08 2021 -0400 ftrace: Do not blindly read the ip address in ftrace_bug() It was reported that a bug on arm64 caused a bad ip address to be used for updating into a nop in ftrace_init(), but the error path (rightfully) returned -EINVAL and not -EFAULT, as the bug caused more than one error to occur. But because -EINVAL was returned, the ftrace_bug() tried to report what was at the location of the ip address, and read it directly. This caused the machine to panic, as the ip was not pointing to a valid memory address. Instead, read the ip address with copy_from_kernel_nofault() to safely access the memory, and if it faults, report that the address faulted, otherwise report what was in that location. Link: https://lore.kernel.org/lkml/20210607032329.28671-1-mark-pk.tsai@mediatek.com/ Cc: stable@vger.kernel.org Fixes: 05736a427f7e1 ("ftrace: warn on failure to disable mcount callers") Reported-by: Mark-PK Tsai Tested-by: Mark-PK Tsai Signed-off-by: Steven Rostedt (VMware) commit 824afd55e95c3cb12c55d297a0ae408be1779cc8 Author: Masami Hiramatsu Date: Thu May 13 12:06:33 2021 +0900 tools/bootconfig: Fix a build error accroding to undefined fallthrough Since the "fallthrough" is defined only in the kernel, building lib/bootconfig.c as a part of user-space tools causes a build error. Add a dummy fallthrough to avoid the build error. Link: https://lkml.kernel.org/r/162087519356.442660.11385099982318160180.stgit@devnote2 Cc: Ingo Molnar Cc: stable@vger.kernel.org Fixes: 4c1ca831adb1 ("Revert "lib: Revert use of fallthrough pseudo-keyword in lib/"") Signed-off-by: Masami Hiramatsu Signed-off-by: Steven Rostedt (VMware) commit e8ba0b2b64126381643bb50df3556b139a60545a Author: Zhen Lei Date: Sat May 8 11:42:16 2021 +0800 tools/bootconfig: Fix error return code in apply_xbc() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Link: https://lkml.kernel.org/r/20210508034216.2277-1-thunder.leizhen@huawei.com Fixes: a995e6bc0524 ("tools/bootconfig: Fix to check the write failure correctly") Reported-by: Hulk Robot Acked-by: Masami Hiramatsu Signed-off-by: Zhen Lei Signed-off-by: Steven Rostedt (VMware) commit edc0b0bccc9c80d9a44d3002dcca94984b25e7cf Author: Mark Bloch Date: Mon Jun 7 11:03:12 2021 +0300 RDMA/mlx5: Block FDB rules when not in switchdev mode Allow creating FDB steering rules only when in switchdev mode. The only software model where a userspace application can manipulate FDB entries is when it manages the eswitch. This is only possible in switchdev mode where we expose a single RDMA device with representors for all the vports that are connected to the eswitch. Fixes: 52438be44112 ("RDMA/mlx5: Allow inserting a steering rule to the FDB") Link: https://lore.kernel.org/r/e928ae7c58d07f104716a2a8d730963d1bd01204.1623052923.git.leonro@nvidia.com Reviewed-by: Maor Gottlieb Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit df693f13a18f6eee0355741988f30c7c1e40ed9f Merge: 9bb392f62447d 9f460ae31c443 Author: David S. Miller Date: Tue Jun 8 12:11:21 2021 -0700 Merge tag 'batadv-net-pullrequest-20210608' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here is a batman-adv bugfix: - Avoid WARN_ON timing related checks, by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit 9bb392f62447d73cc7dd7562413a2cd9104c82f8 Author: Nicolas Dichtel Date: Tue Jun 8 16:59:51 2021 +0200 vrf: fix maximum MTU My initial goal was to fix the default MTU, which is set to 65536, ie above the maximum defined in the driver: 65535 (ETH_MAX_MTU). In fact, it's seems more consistent, wrt min_mtu, to set the max_mtu to IP6_MAX_MTU (65535 + sizeof(struct ipv6hdr)) and use it by default. Let's also, for consistency, set the mtu in vrf_setup(). This function calls ether_setup(), which set the mtu to 1500. Thus, the whole mtu config is done in the same function. Before the patch: $ ip link add blue type vrf table 1234 $ ip link list blue 9: blue: mtu 65536 qdisc noop state DOWN mode DEFAULT group default qlen 1000 link/ether fa:f5:27:70:24:2a brd ff:ff:ff:ff:ff:ff $ ip link set dev blue mtu 65535 $ ip link set dev blue mtu 65536 Error: mtu greater than device maximum. Fixes: 5055376a3b44 ("net: vrf: Fix ping failed when vrf mtu is set to 0") CC: Miaohe Lin Signed-off-by: Nicolas Dichtel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit d439aa33a9b917cfbca8a528f13367aff974aeb7 Author: gushengxian Date: Mon Jun 7 19:19:32 2021 -0700 net: appletalk: fix the usage of preposition The preposition "for" should be changed to preposition "of". Signed-off-by: gushengxian Signed-off-by: David S. Miller commit 5ac6b198d7e312bd10ebe7d58c64690dc59cc49a Author: Zheng Yongjun Date: Tue Jun 8 09:53:15 2021 +0800 net: ipv4: Remove unneed BUG() function When 'nla_parse_nested_deprecated' failed, it's no need to BUG() here, return -EINVAL is ok. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit d612c3f3fae221e7ea736d196581c2217304bbbc Author: Nanyong Sun Date: Tue Jun 8 09:51:58 2021 +0800 net: ipv4: fix memory leak in netlbl_cipsov4_add_std Reported by syzkaller: BUG: memory leak unreferenced object 0xffff888105df7000 (size 64): comm "syz-executor842", pid 360, jiffies 4294824824 (age 22.546s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000e67ed558>] kmalloc include/linux/slab.h:590 [inline] [<00000000e67ed558>] kzalloc include/linux/slab.h:720 [inline] [<00000000e67ed558>] netlbl_cipsov4_add_std net/netlabel/netlabel_cipso_v4.c:145 [inline] [<00000000e67ed558>] netlbl_cipsov4_add+0x390/0x2340 net/netlabel/netlabel_cipso_v4.c:416 [<0000000006040154>] genl_family_rcv_msg_doit.isra.0+0x20e/0x320 net/netlink/genetlink.c:739 [<00000000204d7a1c>] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] [<00000000204d7a1c>] genl_rcv_msg+0x2bf/0x4f0 net/netlink/genetlink.c:800 [<00000000c0d6a995>] netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2504 [<00000000d78b9d2c>] genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 [<000000009733081b>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] [<000000009733081b>] netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1340 [<00000000d5fd43b8>] netlink_sendmsg+0x789/0xc70 net/netlink/af_netlink.c:1929 [<000000000a2d1e40>] sock_sendmsg_nosec net/socket.c:654 [inline] [<000000000a2d1e40>] sock_sendmsg+0x139/0x170 net/socket.c:674 [<00000000321d1969>] ____sys_sendmsg+0x658/0x7d0 net/socket.c:2350 [<00000000964e16bc>] ___sys_sendmsg+0xf8/0x170 net/socket.c:2404 [<000000001615e288>] __sys_sendmsg+0xd3/0x190 net/socket.c:2433 [<000000004ee8b6a5>] do_syscall_64+0x37/0x90 arch/x86/entry/common.c:47 [<00000000171c7cee>] entry_SYSCALL_64_after_hwframe+0x44/0xae The memory of doi_def->map.std pointing is allocated in netlbl_cipsov4_add_std, but no place has freed it. It should be freed in cipso_v4_doi_free which frees the cipso DOI resource. Fixes: 96cb8e3313c7a ("[NetLabel]: CIPSOv4 and Unlabeled packet integration") Reported-by: Hulk Robot Signed-off-by: Nanyong Sun Acked-by: Paul Moore Signed-off-by: David S. Miller commit ce86c239e4d218ae6040bec18e6d19a58edb8b7c Author: Jonathan Marek Date: Thu May 13 13:14:00 2021 -0400 drm/msm/a6xx: avoid shadow NULL reference in failure path If a6xx_hw_init() fails before creating the shadow_bo, the a6xx_pm_suspend code referencing it will crash. Change the condition to one that avoids this problem (note: creation of shadow_bo is behind this same condition) Fixes: e8b0b994c3a5 ("drm/msm/a6xx: Clear shadow on suspend") Signed-off-by: Jonathan Marek Reviewed-by: Akhil P Oommen Link: https://lore.kernel.org/r/20210513171431.18632-6-jonathan@marek.ca Signed-off-by: Rob Clark commit b4387eaf3821a4c4241ac3a556e13244eb1fdaa5 Author: Jonathan Marek Date: Thu May 13 13:13:58 2021 -0400 drm/msm/a6xx: fix incorrectly set uavflagprd_inv field for A650 Value was shifted in the wrong direction, resulting in the field always being zero, which is incorrect for A650. Fixes: d0bac4e9cd66 ("drm/msm/a6xx: set ubwc config for A640 and A650") Signed-off-by: Jonathan Marek Reviewed-by: Akhil P Oommen Link: https://lore.kernel.org/r/20210513171431.18632-4-jonathan@marek.ca Signed-off-by: Rob Clark commit 408434036958699a7f50ddec984f7ba33e11a8f5 Author: Jonathan Marek Date: Thu May 13 13:13:59 2021 -0400 drm/msm/a6xx: update/fix CP_PROTECT initialization Update CP_PROTECT register programming based on downstream. A6XX_PROTECT_RW is renamed to A6XX_PROTECT_NORDWR to make things aligned and also be more clear about what it does. Note that this required switching to use the CP_ALWAYS_ON_COUNTER as the GMU counter is not accessible from the cmdstream. Which also means using the CPU counter for the msm_gpu_submit_flush() tracepoint (as catapult depends on being able to compare this to the start/end values captured in cmdstream). This may need to be revisited when IFPC is enabled. Also, compared to downstream, this opens up CP_PERFCTR_CP_SEL as the userspace performance tooling (fdperf and pps-producer) expect to be able to configure the CP counters. Fixes: 4b565ca5a2cb ("drm/msm: Add A6XX device support") Signed-off-by: Jonathan Marek Reviewed-by: Akhil P Oommen Link: https://lore.kernel.org/r/20210513171431.18632-5-jonathan@marek.ca [switch to CP_ALWAYS_ON_COUNTER, open up CP_PERFCNTR_CP_SEL, and spiff up commit msg] Signed-off-by: Rob Clark commit ab8363d3875a83f4901eb1cc00ce8afd24de6c85 Author: Chen Li Date: Fri Jun 4 16:43:02 2021 +0800 radeon: use memcpy_to/fromio for UVD fw upload I met a gpu addr bug recently and the kernel log tells me the pc is memcpy/memset and link register is radeon_uvd_resume. As we know, in some architectures, optimized memcpy/memset may not work well on device memory. Trival memcpy_toio/memset_io can fix this problem. BTW, amdgpu has already done it in: commit ba0b2275a678 ("drm/amdgpu: use memcpy_to/fromio for UVD fw upload"), that's why it has no this issue on the same gpu and platform. Signed-off-by: Chen Li Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 924f41e52fd10f6e573137eef1afea9e9ad09212 Author: Gustavo A. R. Silva Date: Fri Jun 4 00:06:13 2021 -0500 drm/amd/pm: Fix fall-through warning for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit c247c021b13a2ce40dd9ed06f1e18044dcaefd37 Author: Rohit Khaire Date: Fri Jun 4 11:02:56 2021 -0400 drm/amdgpu: Fix incorrect register offsets for Sienna Cichlid RLC_CP_SCHEDULERS and RLC_SPARE_INT0 have different offsets for Sienna Cichlid Signed-off-by: Rohit Khaire Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b71a52f44725a3efab9591621c9dd5f8f9f1b522 Author: Michel Dänzer Date: Wed Jun 2 11:53:05 2021 +0200 drm/amdgpu: Use drm_dbg_kms for reporting failure to get a GEM FB drm_err meant broken user space could spam dmesg. Fixes: f258907fdd835e "drm/amdgpu: Verify bo size can fit framebuffer size on init." Reviewed-by: Christian König Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit 2a48b5911cf2e111a271bffbe5cac443231a4384 Author: Changfeng Date: Wed Jun 2 21:25:56 2021 +0800 drm/amdgpu: switch kzalloc to kvzalloc in amdgpu_bo_create It will cause error when alloc memory larger than 128KB in amdgpu_bo_create->kzalloc. So it needs to switch kzalloc to kvzalloc. Call Trace: alloc_pages_current+0x6a/0xe0 kmalloc_order+0x32/0xb0 kmalloc_order_trace+0x1e/0x80 __kmalloc+0x249/0x2d0 amdgpu_bo_create+0x102/0x500 [amdgpu] ? xas_create+0x264/0x3e0 amdgpu_bo_create_vm+0x32/0x60 [amdgpu] amdgpu_vm_pt_create+0xf5/0x260 [amdgpu] amdgpu_vm_init+0x1fd/0x4d0 [amdgpu] Signed-off-by: Changfeng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit f31500b0d437a2464ca5972d8f5439e156b74960 Author: Sean Christopherson Date: Mon Jun 7 10:57:48 2021 -0700 KVM: x86: Ensure liveliness of nested VM-Enter fail tracepoint message Use the __string() machinery provided by the tracing subystem to make a copy of the string literals consumed by the "nested VM-Enter failed" tracepoint. A complete copy is necessary to ensure that the tracepoint can't outlive the data/memory it consumes and deference stale memory. Because the tracepoint itself is defined by kvm, if kvm-intel and/or kvm-amd are built as modules, the memory holding the string literals defined by the vendor modules will be freed when the module is unloaded, whereas the tracepoint and its data in the ring buffer will live until kvm is unloaded (or "indefinitely" if kvm is built-in). This bug has existed since the tracepoint was added, but was recently exposed by a new check in tracing to detect exactly this type of bug. fmt: '%s%s ' current_buffer: ' vmx_dirty_log_t-140127 [003] .... kvm_nested_vmenter_failed: ' WARNING: CPU: 3 PID: 140134 at kernel/trace/trace.c:3759 trace_check_vprintf+0x3be/0x3e0 CPU: 3 PID: 140134 Comm: less Not tainted 5.13.0-rc1-ce2e73ce600a-req #184 Hardware name: ASUS Q87M-E/Q87M-E, BIOS 1102 03/03/2014 RIP: 0010:trace_check_vprintf+0x3be/0x3e0 Code: <0f> 0b 44 8b 4c 24 1c e9 a9 fe ff ff c6 44 02 ff 00 49 8b 97 b0 20 RSP: 0018:ffffa895cc37bcb0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffffa895cc37bd08 RCX: 0000000000000027 RDX: 0000000000000027 RSI: 00000000ffffdfff RDI: ffff9766cfad74f8 RBP: ffffffffc0a041d4 R08: ffff9766cfad74f0 R09: ffffa895cc37bad8 R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffc0a041d4 R13: ffffffffc0f4dba8 R14: 0000000000000000 R15: ffff976409f2c000 FS: 00007f92fa200740(0000) GS:ffff9766cfac0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000559bd11b0000 CR3: 000000019fbaa002 CR4: 00000000001726e0 Call Trace: trace_event_printf+0x5e/0x80 trace_raw_output_kvm_nested_vmenter_failed+0x3a/0x60 [kvm] print_trace_line+0x1dd/0x4e0 s_show+0x45/0x150 seq_read_iter+0x2d5/0x4c0 seq_read+0x106/0x150 vfs_read+0x98/0x180 ksys_read+0x5f/0xe0 do_syscall_64+0x40/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae Cc: Steven Rostedt Fixes: 380e0055bc7e ("KVM: nVMX: trace nested VM-Enter failures detected by H/W") Signed-off-by: Sean Christopherson Reviewed-by: Steven Rostedt (VMware) Message-Id: <20210607175748.674002-1-seanjc@google.com> commit 368094df48e680fa51cedb68537408cfa64b788e Merge: 374aeb91db48b 107866a8eb0b6 Author: Linus Torvalds Date: Tue Jun 8 10:29:39 2021 -0700 Merge tag 'for-linus-5.13b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fix from Juergen Gross: "A single patch fixing a Xen related security bug: a malicious guest might be able to trigger a 'use after free' issue in the xen-netback driver" * tag 'for-linus-5.13b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen-netback: take a reference to the RX task thread commit f53b16ad64408b5376836708f8cf42dbf1cf6098 Author: Zhenzhong Duan Date: Wed Jun 9 07:38:16 2021 +0800 selftests: kvm: Add support for customized slot0 memory size Until commit 39fe2fc96694 ("selftests: kvm: make allocation of extra memory take effect", 2021-05-27), parameter extra_mem_pages was used only to calculate the page table size for all the memory chunks, because real memory allocation happened with calls of vm_userspace_mem_region_add() after vm_create_default(). Commit 39fe2fc96694 however changed the meaning of extra_mem_pages to the size of memory slot 0. This makes the memory allocation more flexible, but makes it harder to account for the number of pages needed for the page tables. For example, memslot_perf_test has a small amount of memory in slot 0 but a lot in other slots, and adding that memory twice (both in slot 0 and with later calls to vm_userspace_mem_region_add()) causes an error that was fixed in commit 000ac4295339 ("selftests: kvm: fix overlapping addresses in memslot_perf_test", 2021-05-29) Since both uses are sensible, add a new parameter slot0_mem_pages to vm_create_with_vcpus() and some comments to clarify the meaning of slot0_mem_pages and extra_mem_pages. With this change, memslot_perf_test can go back to passing the number of memory pages as extra_mem_pages. Signed-off-by: Zhenzhong Duan Message-Id: <20210608233816.423958-4-zhenzhong.duan@intel.com> [Squashed in a single patch and rewrote the commit message. - Paolo] Signed-off-by: Paolo Bonzini commit 374aeb91db48bb52216bb9308d611c816fb6cacb Merge: 591a22c14d3f4 d4c6399900364 Author: Linus Torvalds Date: Tue Jun 8 10:25:20 2021 -0700 Merge tag 'orphans-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull orphan section fixes from Kees Cook: "These two corner case fixes have been in -next for about a week: - Avoid orphan section in ARM cpuidle (Arnd Bergmann) - Avoid orphan section with !SMP (Nathan Chancellor)" * tag 'orphans-v5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: vmlinux.lds.h: Avoid orphan section with !SMP ARM: cpuidle: Avoid orphan section warning commit 591a22c14d3f45cc38bd1931c593c221df2f1881 Author: Kees Cook Date: Tue Jun 8 10:12:21 2021 -0700 proc: Track /proc/$pid/attr/ opener mm_struct Commit bfb819ea20ce ("proc: Check /proc/$pid/attr/ writes against file opener") tried to make sure that there could not be a confusion between the opener of a /proc/$pid/attr/ file and the writer. It used struct cred to make sure the privileges didn't change. However, there were existing cases where a more privileged thread was passing the opened fd to a differently privileged thread (during container setup). Instead, use mm_struct to track whether the opener and writer are still the same process. (This is what several other proc files already do, though for different reasons.) Reported-by: Christian Brauner Reported-by: Andrea Righi Tested-by: Andrea Righi Fixes: bfb819ea20ce ("proc: Check /proc/$pid/attr/ writes against file opener") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds commit 1bc603af73dd8fb2934306e861009c54f973dcc2 Author: Christian Borntraeger Date: Tue Jun 8 14:39:54 2021 +0200 KVM: selftests: introduce P47V64 for s390x s390x can have up to 47bits of physical guest and 64bits of virtual address bits. Add a new address mode to avoid errors of testcases going beyond 47bits. Signed-off-by: Christian Borntraeger Message-Id: <20210608123954.10991-1-borntraeger@de.ibm.com> Fixes: ef4c9f4f6546 ("KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn()") Cc: stable@vger.kernel.org Reviewed-by: David Matlack Signed-off-by: Paolo Bonzini commit af3511ff7fa2107d6410831f3d71030f5e8d2b25 Author: Lai Jiangshan Date: Tue Jun 1 01:46:28 2021 +0800 KVM: x86: Ensure PV TLB flush tracepoint reflects KVM behavior In record_steal_time(), st->preempted is read twice, and trace_kvm_pv_tlb_flush() might output result inconsistent if kvm_vcpu_flush_tlb_guest() see a different st->preempted later. It is a very trivial problem and hardly has actual harm and can be avoided by reseting and reading st->preempted in atomic way via xchg(). Signed-off-by: Lai Jiangshan Message-Id: <20210531174628.10265-1-jiangshanlai@gmail.com> Signed-off-by: Paolo Bonzini commit 45f56690051c108e3e9a50e34b61aac05d55583d Author: Alexey Minnekhanov Date: Tue May 18 13:26:24 2021 +0300 drm/msm: Init mm_list before accessing it for use_vram path Fix NULL pointer dereference caused by update_inactive() trying to list_del() an uninitialized mm_list who's prev/next pointers are NULL. Fixes: 64fcbde772c7 ("drm/msm: Track potentially evictable objects") Signed-off-by: Alexey Minnekhanov Link: https://lore.kernel.org/r/20210518102624.1193955-1-alexeymin@postmarketos.org Signed-off-by: Rob Clark commit 4c8684fe555e95100030bd330d0a2780ac27952e Merge: 9b1111fa80df2 d38fa9a155b28 Author: Linus Torvalds Date: Tue Jun 8 09:45:00 2021 -0700 Merge tag 'spi-fix-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A small set of SPI fixes that have come up since the merge window, all fairly small fixes for rare cases" * tag 'spi-fix-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: stm32-qspi: Always wait BUSY bit to be cleared in stm32_qspi_wait_cmd() spi: spi-zynq-qspi: Fix some wrong goto jumps & missing error code spi: Cleanup on failure of initial setup spi: bcm2835: Fix out-of-bounds access with more than 4 slaves commit 9b1111fa80df22c8cb6f9f8634693812cb958f4f Merge: dc2557308ede6 cb2381cbecb81 Author: Linus Torvalds Date: Tue Jun 8 09:41:16 2021 -0700 Merge tag 'regulator-fix-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A collection of fixes for the regulator API that have come up since the merge window, including a big batch of fixes from Axel Lin's usual careful and detailed review. The one stand out fix here is Dmitry Baryshkov's fix for an issue where we fail to power on the parents of always on regulators during system startup if they weren't already powered on" * tag 'regulator-fix-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (21 commits) regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios is NULL regulator: hi6421v600: Fix .vsel_mask setting regulator: bd718x7: Fix the BUCK7 voltage setting on BD71837 regulator: atc260x: Fix n_voltages and min_sel for pickable linear ranges regulator: rtmv20: Fix to make regcache value first reading back from HW regulator: mt6315: Fix function prototype for mt6315_map_mode regulator: rtmv20: Add Richtek to Kconfig text regulator: rtmv20: Fix .set_current_limit/.get_current_limit callbacks regulator: hisilicon: use the correct HiSilicon copyright regulator: bd71828: Fix .n_voltages settings regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting regulator: max77620: Silence deferred probe error regulator: max77620: Use device_set_of_node_from_dev() regulator: scmi: Fix off-by-one for linear regulators .n_voltages setting regulator: core: resolve supply for boot-on/always-on regulators regulator: fixed: Ensure enable_counter is correct if reg_domain_disable fails regulator: Check ramp_delay_table for regulator_set_ramp_delay_regmap regulator: fan53880: Fix missing n_voltages setting regulator: da9121: Return REGULATOR_MODE_INVALID for invalid mode regulator: fan53555: fix TCS4525 voltage calulation ... commit b1bd5cba3306691c771d558e94baa73e8b0b96b7 Author: Lai Jiangshan Date: Thu Jun 3 13:24:55 2021 +0800 KVM: X86: MMU: Use the correct inherited permissions to get shadow page When computing the access permissions of a shadow page, use the effective permissions of the walk up to that point, i.e. the logic AND of its parents' permissions. Two guest PxE entries that point at the same table gfn need to be shadowed with different shadow pages if their parents' permissions are different. KVM currently uses the effective permissions of the last non-leaf entry for all non-leaf entries. Because all non-leaf SPTEs have full ("uwx") permissions, and the effective permissions are recorded only in role.access and merged into the leaves, this can lead to incorrect reuse of a shadow page and eventually to a missing guest protection page fault. For example, here is a shared pagetable: pgd[] pud[] pmd[] virtual address pointers /->pmd1(u--)->pte1(uw-)->page1 <- ptr1 (u--) /->pud1(uw-)--->pmd2(uw-)->pte2(uw-)->page2 <- ptr2 (uw-) pgd-| (shared pmd[] as above) \->pud2(u--)--->pmd1(u--)->pte1(uw-)->page1 <- ptr3 (u--) \->pmd2(uw-)->pte2(uw-)->page2 <- ptr4 (u--) pud1 and pud2 point to the same pmd table, so: - ptr1 and ptr3 points to the same page. - ptr2 and ptr4 points to the same page. (pud1 and pud2 here are pud entries, while pmd1 and pmd2 here are pmd entries) - First, the guest reads from ptr1 first and KVM prepares a shadow page table with role.access=u--, from ptr1's pud1 and ptr1's pmd1. "u--" comes from the effective permissions of pgd, pud1 and pmd1, which are stored in pt->access. "u--" is used also to get the pagetable for pud1, instead of "uw-". - Then the guest writes to ptr2 and KVM reuses pud1 which is present. The hypervisor set up a shadow page for ptr2 with pt->access is "uw-" even though the pud1 pmd (because of the incorrect argument to kvm_mmu_get_page in the previous step) has role.access="u--". - Then the guest reads from ptr3. The hypervisor reuses pud1's shadow pmd for pud2, because both use "u--" for their permissions. Thus, the shadow pmd already includes entries for both pmd1 and pmd2. - At last, the guest writes to ptr4. This causes no vmexit or pagefault, because pud1's shadow page structures included an "uw-" page even though its role.access was "u--". Any kind of shared pagetable might have the similar problem when in virtual machine without TDP enabled if the permissions are different from different ancestors. In order to fix the problem, we change pt->access to be an array, and any access in it will not include permissions ANDed from child ptes. The test code is: https://lore.kernel.org/kvm/20210603050537.19605-1-jiangshanlai@gmail.com/ Remember to test it with TDP disabled. The problem had existed long before the commit 41074d07c78b ("KVM: MMU: Fix inherited permissions for emulated guest pte updates"), and it is hard to find which is the culprit. So there is no fixes tag here. Signed-off-by: Lai Jiangshan Message-Id: <20210603052455.21023-1-jiangshanlai@gmail.com> Cc: stable@vger.kernel.org Fixes: cea0f0e7ea54 ("[PATCH] KVM: MMU: Shadow page table caching") Signed-off-by: Paolo Bonzini commit e898da784aed0ea65f7672d941c01dc9b79e6299 Author: Wanpeng Li Date: Mon Jun 7 00:19:43 2021 -0700 KVM: LAPIC: Write 0 to TMICT should also cancel vmx-preemption timer According to the SDM 10.5.4.1: A write of 0 to the initial-count register effectively stops the local APIC timer, in both one-shot and periodic mode. However, the lapic timer oneshot/periodic mode which is emulated by vmx-preemption timer doesn't stop by writing 0 to TMICT since vmx->hv_deadline_tsc is still programmed and the guest will receive the spurious timer interrupt later. This patch fixes it by also cancelling the vmx-preemption timer when writing 0 to the initial-count register. Reviewed-by: Sean Christopherson Signed-off-by: Wanpeng Li Message-Id: <1623050385-100988-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 4f13d471e5d11034d56161af56d0f9396bc0b384 Author: Ashish Kalra Date: Mon Jun 7 06:15:32 2021 +0000 KVM: SVM: Fix SEV SEND_START session length & SEND_UPDATE_DATA query length after commit 238eca821cee Commit 238eca821cee ("KVM: SVM: Allocate SEV command structures on local stack") uses the local stack to allocate the structures used to communicate with the PSP, which were earlier being kzalloced. This breaks SEV live migration for computing the SEND_START session length and SEND_UPDATE_DATA query length as session_len and trans_len and hdr_len fields are not zeroed respectively for the above commands before issuing the SEV Firmware API call, hence the firmware returns incorrect session length and update data header or trans length. Also the SEV Firmware API returns SEV_RET_INVALID_LEN firmware error for these length query API calls, and the return value and the firmware error needs to be passed to the userspace as it is, so need to remove the return check in the KVM code. Signed-off-by: Ashish Kalra Message-Id: <20210607061532.27459-1-Ashish.Kalra@amd.com> Fixes: 238eca821cee ("KVM: SVM: Allocate SEV command structures on local stack") Signed-off-by: Paolo Bonzini commit b436acd1cf7fac0ba987abd22955d98025c80c2b Author: Desmond Cheong Zhi Xi Date: Tue Jun 8 19:04:36 2021 +0800 drm: Fix use-after-free read in drm_getunique() There is a time-of-check-to-time-of-use error in drm_getunique() due to retrieving file_priv->master prior to locking the device's master mutex. An example can be seen in the crash report of the use-after-free error found by Syzbot: https://syzkaller.appspot.com/bug?id=148d2f1dfac64af52ffd27b661981a540724f803 In the report, the master pointer was used after being freed. This is because another process had acquired the device's master mutex in drm_setmaster_ioctl(), then overwrote fpriv->master in drm_new_set_master(). The old value of fpriv->master was subsequently freed before the mutex was unlocked. To fix this, we lock the device's master mutex before retrieving the pointer from from fpriv->master. This patch passes the Syzbot reproducer test. Reported-by: syzbot+c3a706cec1ea99e1c693@syzkaller.appspotmail.com Signed-off-by: Desmond Cheong Zhi Xi Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210608110436.239583-1-desmondcheongzx@gmail.com commit 8a11e84b8056c9daa0ea9d6dbb4d75382fb4a8e0 Author: Mark Rutland Date: Tue Jun 8 09:55:12 2021 +0100 drm/vc4: fix vc4_atomic_commit_tail() logic In vc4_atomic_commit_tail() we iterate of the set of old CRTCs, and attempt to wait on any channels which are still in use. When we iterate over the CRTCs, we have: * `i` - the index of the CRTC * `channel` - the channel a CRTC is using When we check the channel state, we consult: old_hvs_state->fifo_state[channel].in_use ... but when we wait for the channel, we erroneously wait on: old_hvs_state->fifo_state[i].pending_commit ... rather than: old_hvs_state->fifo_state[channel].pending_commit ... and this bogus access has been observed to result in boot-time hangs on some arm64 configurations, and can be detected using KASAN. FIx this by using the correct index. I've tested this on a Raspberry Pi 3 model B v1.2 with KASAN. Trimmed KASAN splat: | ================================================================== | BUG: KASAN: slab-out-of-bounds in vc4_atomic_commit_tail+0x1cc/0x910 | Read of size 8 at addr ffff000007360440 by task kworker/u8:0/7 | CPU: 2 PID: 7 Comm: kworker/u8:0 Not tainted 5.13.0-rc3-00009-g694c523e7267 #3 | | Hardware name: Raspberry Pi 3 Model B (DT) | Workqueue: events_unbound deferred_probe_work_func | Call trace: | dump_backtrace+0x0/0x2b4 | show_stack+0x1c/0x30 | dump_stack+0xfc/0x168 | print_address_description.constprop.0+0x2c/0x2c0 | kasan_report+0x1dc/0x240 | __asan_load8+0x98/0xd4 | vc4_atomic_commit_tail+0x1cc/0x910 | commit_tail+0x100/0x210 | ... | | Allocated by task 7: | kasan_save_stack+0x2c/0x60 | __kasan_kmalloc+0x90/0xb4 | vc4_hvs_channels_duplicate_state+0x60/0x1a0 | drm_atomic_get_private_obj_state+0x144/0x230 | vc4_atomic_check+0x40/0x73c | drm_atomic_check_only+0x998/0xe60 | drm_atomic_commit+0x34/0x94 | drm_client_modeset_commit_atomic+0x2f4/0x3a0 | drm_client_modeset_commit_locked+0x8c/0x230 | drm_client_modeset_commit+0x38/0x60 | drm_fb_helper_set_par+0x104/0x17c | fbcon_init+0x43c/0x970 | visual_init+0x14c/0x1e4 | ... | | The buggy address belongs to the object at ffff000007360400 | which belongs to the cache kmalloc-128 of size 128 | The buggy address is located 64 bytes inside of | 128-byte region [ffff000007360400, ffff000007360480) | The buggy address belongs to the page: | page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7360 | flags: 0x3fffc0000000200(slab|node=0|zone=0|lastcpupid=0xffff) | raw: 03fffc0000000200 dead000000000100 dead000000000122 ffff000004c02300 | raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 | page dumped because: kasan: bad access detected | | Memory state around the buggy address: | ffff000007360300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb | ffff000007360380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc | >ffff000007360400: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc | ^ | ffff000007360480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc | ffff000007360500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb | ================================================================== Link: https://lore.kernel.org/r/4d0c8318-bad8-2be7-e292-fc8f70c198de@samsung.com Link: https://lore.kernel.org/linux-arm-kernel/20210607151740.moncryl5zv3ahq4s@gilmour Signed-off-by: Mark Rutland Reported-by: Marek Szyprowski Cc: Arnd Bergmann Cc: Catalin Marinas Cc: Daniel Vetter Cc: David Airlie Cc: Emma Anholt Cc: Maxime Ripard Cc: Will Deacon Cc: dri-devel@lists.freedesktop.org Acked-by: Arnd Bergmann Tested-by: Marek Szyprowski Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210608085513.2069-1-mark.rutland@arm.com commit a0309c344886c499b6071e7f03658e7f71a9afbb Merge: 600dd2a7e8b62 c8a4556d98510 Author: Takashi Iwai Date: Tue Jun 8 16:59:19 2021 +0200 Merge tag 'asoc-fix-v5.13-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.13 A collection of fixes and device ID updates that have come up in the past few -rcs, none of which stand out particularly. commit 8d651ee9c71bb12fc0c8eb2786b66cbe5aa3e43b Author: Tom Lendacky Date: Tue Jun 8 11:54:33 2021 +0200 x86/ioremap: Map EFI-reserved memory as encrypted for SEV Some drivers require memory that is marked as EFI boot services data. In order for this memory to not be re-used by the kernel after ExitBootServices(), efi_mem_reserve() is used to preserve it by inserting a new EFI memory descriptor and marking it with the EFI_MEMORY_RUNTIME attribute. Under SEV, memory marked with the EFI_MEMORY_RUNTIME attribute needs to be mapped encrypted by Linux, otherwise the kernel might crash at boot like below: EFI Variables Facility v0.08 2004-May-17 general protection fault, probably for non-canonical address 0x3597688770a868b2: 0000 [#1] SMP NOPTI CPU: 13 PID: 1 Comm: swapper/0 Not tainted 5.12.4-2-default #1 openSUSE Tumbleweed Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 RIP: 0010:efi_mokvar_entry_next [...] Call Trace: efi_mokvar_sysfs_init ? efi_mokvar_table_init do_one_initcall ? __kmalloc kernel_init_freeable ? rest_init kernel_init ret_from_fork Expand the __ioremap_check_other() function to additionally check for this other type of boot data reserved at runtime and indicate that it should be mapped encrypted for an SEV guest. [ bp: Massage commit message. ] Fixes: 58c909022a5a ("efi: Support for MOK variable config table") Reported-by: Joerg Roedel Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Tested-by: Joerg Roedel Cc: # 5.10+ Link: https://lkml.kernel.org/r/20210608095439.12668-2-joro@8bytes.org commit 6687cd72aa9112a454a4646986e0402dd1b07d0e Author: Geert Uytterhoeven Date: Fri Jun 4 14:59:43 2021 +0200 mmc: renesas_sdhi: Fix HS400 on R-Car M3-W+ R-Car M3-W ES3.0 is marketed as R-Car M3-W+ (R8A77961), and has its own compatible value "renesas,r8a77961". Hence using soc_device_match() with soc_id = "r8a7796" and revision = "ES3.*" does not actually match running on an R-Car M3-W+ SoC. Fix this by matching with soc_id = "r8a77961" instead. Fixes: a38c078fea0b1393 ("mmc: renesas_sdhi: Avoid bad TAP in HS400") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/ee8af5d631f5331139ffea714539030d97352e93.1622811525.git.geert+renesas@glider.be Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit aceda401e84115bf9121454828f9da63c2a94482 Author: Jon Hunter Date: Tue Jun 8 08:15:18 2021 +0100 spi: tegra20-slink: Ensure SPI controller reset is deasserted Commit 4782c0a5dd88 ("clk: tegra: Don't deassert reset on enabling clocks") removed some legacy code for handling resets on Tegra from within the Tegra clock code. This exposed an issue in the Tegra20 slink driver where the SPI controller reset was not being deasserted as needed during probe. This is causing the Tegra30 Cardhu platform to hang on boot. Fix this by ensuring the SPI controller reset is deasserted during probe. Fixes: 4782c0a5dd88 ("clk: tegra: Don't deassert reset on enabling clocks") Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20210608071518.93037-1-jonathanh@nvidia.com Signed-off-by: Mark Brown commit 2c9017d0b5d3fbf17e69577a42d9e610ca122810 Author: Wolfram Sang Date: Wed Jun 2 09:34:35 2021 +0200 mmc: renesas_sdhi: abort tuning when timeout detected We have to bring the eMMC from sending-data state back to transfer state once we detected a CRC error (timeout) during tuning. So, send a stop command via mmc_abort_tuning(). Fixes: 4f11997773b6 ("mmc: tmio: Add tuning support") Reported-by Yoshihiro Shimoda Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210602073435.5955-1-wsa+renesas@sang-engineering.com Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit 600dd2a7e8b62170d177381cc1303861f48f9780 Author: Jeremy Szu Date: Tue Jun 8 19:47:48 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP ZBook Power G8 The HP ZBook Power G8 using ALC236 codec which using 0x02 to control mute LED and 0x01 to control micmute LED. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210608114750.32009-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit 57c9e21a49b1c196cda28f54de9a5d556ac93f20 Author: Hui Wang Date: Tue Jun 8 10:46:00 2021 +0800 ALSA: hda/realtek: headphone and mic don't work on an Acer laptop There are 2 issues on this machine, the 1st one is mic's plug/unplug can't be detected, that is because the mic is set to manual detecting mode, need to apply ALC255_FIXUP_XIAOMI_HEADSET_MIC to set it to auto detecting mode. The other one is headphone's plug/unplug can't be detected by pulseaudio, that is because the pulseaudio will use ucm2/sof-hda-dsp on this machine, and the ucm2 only handle 'Headphone Jack', but on this machine the headphone's pincfg sets the location to Front, then the alsa mixer name is "Front Headphone Jack" instead of "Headphone Jack", so override the pincfg to change location to Left. BugLink: http://bugs.launchpad.net/bugs/1930188 Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20210608024600.6198-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 2d2ddb589d5925ec7f2d1b17d88a2b36bf536105 Author: Christian König Date: Fri May 28 14:34:38 2021 +0200 drm/ttm: fix deref of bo->ttm without holding the lock v2 We need to grab the resv lock first before doing that check. v2 (chk): simplify the change for -fixes Signed-off-by: Christian König Signed-off-by: Thomas Hellström Reviewed-by: Huang Rui Link: https://patchwork.freedesktop.org/patch/msgid/20210528130041.1683-1-christian.koenig@amd.com commit d5befb224edbe53056c2c18999d630dafb4a08b9 Author: Johannes Berg Date: Mon May 17 16:03:23 2021 +0200 mac80211: fix deadlock in AP/VLAN handling Syzbot reports that when you have AP_VLAN interfaces that are up and close the AP interface they belong to, we get a deadlock. No surprise - since we dev_close() them with the wiphy mutex held, which goes back into the netdev notifier in cfg80211 and tries to acquire the wiphy mutex there. To fix this, we need to do two things: 1) prevent changing iftype while AP_VLANs are up, we can't easily fix this case since cfg80211 already calls us with the wiphy mutex held, but change_interface() is relatively rare in drivers anyway, so changing iftype isn't used much (and userspace has to fall back to down/change/up anyway) 2) pull the dev_close() loop over VLANs out of the wiphy mutex section in the normal stop case Cc: stable@vger.kernel.org Reported-by: syzbot+452ea4fbbef700ff0a56@syzkaller.appspotmail.com Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Link: https://lore.kernel.org/r/20210517160322.9b8f356c0222.I392cb0e2fa5a1a94cf2e637555d702c7e512c1ff@changeid Signed-off-by: Johannes Berg commit 1e0d4e6225996f05271de1ebcb1a7c9381af0b27 Author: Ming Lei Date: Wed Jun 2 21:30:29 2021 +0800 scsi: core: Only put parent device if host state differs from SHOST_CREATED get_device(shost->shost_gendev.parent) is called after host state has switched to SHOST_RUNNING. scsi_host_dev_release() shouldn't release the parent device if host state is still SHOST_CREATED. Link: https://lore.kernel.org/r/20210602133029.2864069-5-ming.lei@redhat.com Cc: Bart Van Assche Cc: John Garry Cc: Hannes Reinecke Tested-by: John Garry Reviewed-by: John Garry Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 11714026c02d613c30a149c3f4c4a15047744529 Author: Ming Lei Date: Wed Jun 2 21:30:28 2021 +0800 scsi: core: Put .shost_dev in failure path if host state changes to RUNNING scsi_host_dev_release() only frees dev_name when host state is SHOST_CREATED. After host state has changed to SHOST_RUNNING, scsi_host_dev_release() no longer cleans up. Fix this by doing a put_device(&shost->shost_dev) in the failure path when host state is SHOST_RUNNING. Move get_device(&shost->shost_gendev) before device_add(&shost->shost_dev) so that scsi_host_cls_release() can do a put on this reference. Link: https://lore.kernel.org/r/20210602133029.2864069-4-ming.lei@redhat.com Cc: Bart Van Assche Cc: Hannes Reinecke Reported-by: John Garry Tested-by: John Garry Reviewed-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 3719f4ff047e20062b8314c23ec3cab84d74c908 Author: Ming Lei Date: Wed Jun 2 21:30:27 2021 +0800 scsi: core: Fix failure handling of scsi_add_host_with_dma() When scsi_add_host_with_dma() returns failure, the caller will call scsi_host_put(shost) to release everything allocated for this host instance. Consequently we can't also free allocated stuff in scsi_add_host_with_dma(), otherwise we will end up with a double free. Strictly speaking, host resource allocations should have been done in scsi_host_alloc(). However, the allocations may need information which is not yet provided by the driver when that function is called. So leave the allocations where they are but rely on host device's release handler to free resources. Link: https://lore.kernel.org/r/20210602133029.2864069-3-ming.lei@redhat.com Cc: Bart Van Assche Cc: John Garry Cc: Hannes Reinecke Tested-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 66a834d092930cf41d809c0e989b13cd6f9ca006 Author: Ming Lei Date: Wed Jun 2 21:30:26 2021 +0800 scsi: core: Fix error handling of scsi_host_alloc() After device is initialized via device_initialize(), or its name is set via dev_set_name(), the device has to be freed via put_device(). Otherwise device name will be leaked because it is allocated dynamically in dev_set_name(). Fix the leak by replacing kfree() with put_device(). Since scsi_host_dev_release() properly handles IDA and kthread removal, remove special-casing these from the error handling as well. Link: https://lore.kernel.org/r/20210602133029.2864069-2-ming.lei@redhat.com Cc: Bart Van Assche Cc: John Garry Cc: Hannes Reinecke Tested-by: John Garry Reviewed-by: Bart Van Assche Reviewed-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 11fc79fc9f2e395aa39fa5baccae62767c5d8280 Author: Kev Jackson Date: Mon Jun 7 14:08:35 2021 +0100 libbpf: Fixes incorrect rx_ring_setup_done When calling xsk_socket__create_shared(), the logic at line 1097 marks a boolean flag true within the xsk_umem structure to track setup progress in order to support multiple calls to the function. However, instead of marking umem->tx_ring_setup_done, the code incorrectly sets umem->rx_ring_setup_done. This leads to improper behaviour when creating and destroying xsk and umem structures. Multiple calls to this function is documented as supported. Fixes: ca7a83e2487a ("libbpf: Only create rx and tx XDP rings when necessary") Signed-off-by: Kev Jackson Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/YL4aU4f3Aaik7CN0@linux-dev commit 7a6b1ab7475fd6478eeaf5c9d1163e7a18125c8f Author: David Ahern Date: Mon Jun 7 11:35:30 2021 -0600 neighbour: allow NUD_NOARP entries to be forced GCed IFF_POINTOPOINT interfaces use NUD_NOARP entries for IPv6. It's possible to fill up the neighbour table with enough entries that it will overflow for valid connections after that. This behaviour is more prevalent after commit 58956317c8de ("neighbor: Improve garbage collection") is applied, as it prevents removal from entries that are not NUD_FAILED, unless they are more than 5s old. Fixes: 58956317c8de (neighbor: Improve garbage collection) Reported-by: Kasper Dupont Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: David Ahern Signed-off-by: David S. Miller commit a47c397bb29fce1751dc755246a2c8deeca5e38f Author: Pavel Skripkin Date: Mon Jun 7 21:46:23 2021 +0300 revert "net: kcm: fix memory leak in kcm_sendmsg" In commit c47cc304990a ("net: kcm: fix memory leak in kcm_sendmsg") I misunderstood the root case of the memory leak and came up with completely broken fix. So, simply revert this commit to avoid GPF reported by syzbot. Im so sorry for this situation. Fixes: c47cc304990a ("net: kcm: fix memory leak in kcm_sendmsg") Reported-by: syzbot+65badd5e74ec62cb67dc@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit aaab3076d7c7f7ebdb9e261ba21ef6af2fb8cba6 Merge: 51c96a561f244 2fd8d84ce3095 Author: David S. Miller Date: Mon Jun 7 13:12:08 2021 -0700 Merge branch 'mlxsw-fixes' Merge branch 'mlxsw-fixes' Ido Schimmel says: ==================== mlxsw: Thermal and qdisc fixes Patches #1-#2 fix wrong validation of burst size in qdisc code and a user triggerable WARN_ON(). Patch #3 fixes a regression in thermal monitoring of transceiver modules and gearboxes. ==================== Signed-off-by: David S. Miller commit 2fd8d84ce3095e8a7b5fe96532c91b1b9e07339c Author: Mykola Kostenok Date: Sun Jun 6 11:24:32 2021 +0300 mlxsw: core: Set thermal zone polling delay argument to real value at init Thermal polling delay argument for modules and gearboxes thermal zones used to be initialized with zero value, while actual delay was used to be set by mlxsw_thermal_set_mode() by thermal operation callback set_mode(). After operations set_mode()/get_mode() have been removed by cited commits, modules and gearboxes thermal zones always have polling time set to zero and do not perform temperature monitoring. Set non-zero "polling_delay" in thermal_zone_device_register() routine, thus, the relevant thermal zones will perform thermal monitoring. Cc: Andrzej Pietrasiewicz Fixes: 5d7bd8aa7c35 ("thermal: Simplify or eliminate unnecessary set_mode() methods") Fixes: 1ee14820fd8e ("thermal: remove get_mode() operation of drivers") Signed-off-by: Mykola Kostenok Acked-by: Vadim Pasternak Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d566ed04e42bbb7144cf52718b77ca5c791abc09 Author: Petr Machata Date: Sun Jun 6 11:24:31 2021 +0300 mlxsw: spectrum_qdisc: Pass handle, not band number to find_class() In mlxsw Qdisc offload, find_class() is an operation that yields a qdisc offload descriptor given a parental qdisc descriptor and a class handle. In __mlxsw_sp_qdisc_ets_graft() however, a band number is passed to that function instead of a handle. This can lead to a trigger of a WARN_ON with the following splat: WARNING: CPU: 3 PID: 808 at drivers/net/ethernet/mellanox/mlxsw/spectrum_qdisc.c:1356 __mlxsw_sp_qdisc_ets_graft+0x115/0x130 [mlxsw_spectrum] [...] Call Trace: mlxsw_sp_setup_tc_prio+0xe3/0x100 [mlxsw_spectrum] qdisc_offload_graft_helper+0x35/0xa0 prio_graft+0x176/0x290 [sch_prio] qdisc_graft+0xb3/0x540 tc_modify_qdisc+0x56a/0x8a0 rtnetlink_rcv_msg+0x12c/0x370 netlink_rcv_skb+0x49/0xf0 netlink_unicast+0x1f6/0x2b0 netlink_sendmsg+0x1fb/0x410 ____sys_sendmsg+0x1f3/0x220 ___sys_sendmsg+0x70/0xb0 __sys_sendmsg+0x54/0xa0 do_syscall_64+0x3a/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xae Since the parent handle is not passed with the offload information, compute it from the band number and qdisc handle. Fixes: 28052e618b04 ("mlxsw: spectrum_qdisc: Track children per qdisc") Reported-by: Maksym Yaremchuk Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 306b9228c097b4101c150ccd262372ded8348644 Author: Petr Machata Date: Sun Jun 6 11:24:30 2021 +0300 mlxsw: reg: Spectrum-3: Enforce lowest max-shaper burst size of 11 A max-shaper is the HW component responsible for delaying egress traffic above a configured transmission rate. Burst size is the amount of traffic that is allowed to pass without accounting. The burst size value needs to be such that it can be expressed as 2^BS * 512 bits, where BS lies in a certain ASIC-dependent range. mlxsw enforces that this holds before attempting to configure the shaper. The assumption for Spectrum-3 was that the lower limit of BS would be 5, like for Spectrum-1. But as of now, the limit is still 11. Therefore fix the driver accordingly, so that incorrect values are rejected early with a proper message. Fixes: 23effa2479ba ("mlxsw: reg: Add max_shaper_bs to QoS ETS Element Configuration") Reported-by: Maksym Yaremchuk Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 51c96a561f244e25a4a2afc7a48b92b4adf8050d Author: Ido Schimmel Date: Sun Jun 6 17:24:22 2021 +0300 ethtool: Fix NULL pointer dereference during module EEPROM dump When get_module_eeprom_by_page() is not implemented by the driver, NULL pointer dereference can occur [1]. Fix by testing if get_module_eeprom_by_page() is implemented instead of get_module_info(). [1] BUG: kernel NULL pointer dereference, address: 0000000000000000 [...] CPU: 0 PID: 251 Comm: ethtool Not tainted 5.13.0-rc3-custom-00940-g3822d0670c9d #989 Call Trace: eeprom_prepare_data+0x101/0x2d0 ethnl_default_doit+0xc2/0x290 genl_family_rcv_msg_doit+0xdc/0x140 genl_rcv_msg+0xd7/0x1d0 netlink_rcv_skb+0x49/0xf0 genl_rcv+0x1f/0x30 netlink_unicast+0x1f6/0x2c0 netlink_sendmsg+0x1f9/0x400 __sys_sendto+0xe1/0x130 __x64_sys_sendto+0x1b/0x20 do_syscall_64+0x3a/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: c97a31f66ebc ("ethtool: wire in generic SFP module access") Signed-off-by: Ido Schimmel Acked-by: Moshe Shemesh Signed-off-by: David S. Miller commit dc2557308ede6bd8a91409fe196ba4b081567809 Author: Marc Dionne Date: Sun Jun 6 21:21:27 2021 +0100 afs: Fix partial writeback of large files on fsync and close In commit e87b03f5830e ("afs: Prepare for use of THPs"), the return value for afs_write_back_from_locked_page was changed from a number of pages to a length in bytes. The loop in afs_writepages_region uses the return value to compute the index that will be used to find dirty pages in the next iteration, but treats it as a number of pages and wrongly multiplies it by PAGE_SIZE. This gives a very large index value, potentially skipping any dirty data that was not covered in the first pass, which is limited to 256M. This causes fsync(), and indirectly close(), to only do a partial writeback of a large file's dirty data. The rest is eventually written back by background threads after dirty_expire_centisecs. Fixes: e87b03f5830e ("afs: Prepare for use of THPs") Signed-off-by: Marc Dionne Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/20210604175504.4055-1-marc.c.dionne@gmail.com/ Signed-off-by: Linus Torvalds commit c8a4556d98510ca05bad8d02265a4918b03a8c0b Author: Srinivasa Rao Mandadapu Date: Fri Jun 4 23:45:45 2021 +0800 ASoC: qcom: lpass-cpu: Fix pop noise during audio capture begin This patch fixes PoP noise of around 15ms observed during audio capture begin. Enables BCLK and LRCLK in snd_soc_dai_ops prepare call for introducing some delay before capture start. (am from https://patchwork.kernel.org/patch/12276369/) (also found at https://lore.kernel.org/r/20210524142114.18676-1-srivasam@codeaurora.org) Co-developed-by: Judy Hsiao Signed-off-by: Judy Hsiao Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210604154545.1198337-1-judyhsiao@chromium.org Signed-off-by: Mark Brown commit 107866a8eb0b664675a260f1ba0655010fac1e08 Author: Roger Pau Monne Date: Mon Jun 7 15:13:15 2021 +0200 xen-netback: take a reference to the RX task thread Do this in order to prevent the task from being freed if the thread returns (which can be triggered by the frontend) before the call to kthread_stop done as part of the backend tear down. Not taking the reference will lead to a use-after-free in that scenario. Such reference was taken before but dropped as part of the rework done in 2ac061ce97f4. Reintroduce the reference taking and add a comment this time explaining why it's needed. This is XSA-374 / CVE-2021-28691. Fixes: 2ac061ce97f4 ('xen/netback: cleanup init and deinit code') Signed-off-by: Roger Pau Monné Cc: stable@vger.kernel.org Reviewed-by: Jan Beulich Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross commit f1ffa9d4cccc8fdf6c03fb1b3429154d22037988 Author: Zhang Rui Date: Thu Jun 3 10:34:14 2021 +0800 Revert "ACPI: sleep: Put the FACS table after using it" Commit 95722237cb2a ("ACPI: sleep: Put the FACS table after using it") puts the FACS table during initialization. But the hardware signature bits in the FACS table need to be accessed, after every hibernation, to compare with the original hardware signature. So there is no reason to release the FACS table mapping after initialization. This reverts commit 95722237cb2ae4f7b73471058cdb19e8f4057c93. An alternative solution is to use acpi_gbl_FACS variable instead, which is mapped by the ACPICA core and never released. Link: https://bugzilla.kernel.org/show_bug.cgi?id=212277 Reported-by: Stephan Hohe Signed-off-by: Zhang Rui Cc: 5.8+ # 5.8+ Signed-off-by: Rafael J. Wysocki commit 9bf3797796f570b34438235a6a537df85832bdad Author: Saravana Kannan Date: Mon Jun 7 10:58:36 2021 +0200 drm/sun4i: dw-hdmi: Make HDMI PHY into a platform device On sunxi boards that use HDMI output, HDMI device probe keeps being avoided indefinitely with these repeated messages in dmesg: platform 1ee0000.hdmi: probe deferral - supplier 1ef0000.hdmi-phy not ready There's a fwnode_link being created with fw_devlink=on between hdmi and hdmi-phy nodes, because both nodes have 'compatible' property set. Fw_devlink code assumes that nodes that have compatible property set will also have a device associated with them by some driver eventually. This is not the case with the current sun8i-hdmi driver. This commit makes sun8i-hdmi-phy into a proper platform device and fixes the display pipeline probe on sunxi boards that use HDMI. More context: https://lkml.org/lkml/2021/5/16/203 Signed-off-by: Saravana Kannan Signed-off-by: Ondrej Jirman Tested-by: Andre Przywara Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210607085836.2827429-1-megous@megous.com commit 1874cb13d5d7cafa61ce93a760093ebc5485b6ab Author: Alexander Gordeev Date: Mon May 17 08:18:12 2021 +0200 s390/mcck: fix invalid KVM guest condition check Wrong condition check is used to decide if a machine check hit while in KVM guest. As result of this check the instruction following the SIE critical section might be considered as still in KVM guest and _CIF_MCCK_GUEST CPU flag mistakenly set as result. Fixes: c929500d7a5a ("s390/nmi: s390: New low level handling for machine check happening in guest") Cc: Signed-off-by: Alexander Gordeev Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit 5bcbe3285fb614c49db6b238253f7daff7e66312 Author: Alexander Gordeev Date: Mon May 17 08:18:11 2021 +0200 s390/mcck: fix calculation of SIE critical section size The size of SIE critical section is calculated wrongly as result of a missed subtraction in commit 0b0ed657fe00 ("s390: remove critical section cleanup from entry.S") Fixes: 0b0ed657fe00 ("s390: remove critical section cleanup from entry.S") Cc: Signed-off-by: Alexander Gordeev Reviewed-by: Christian Borntraeger Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik commit eb367d875f94a228c17c8538e3f2efcf2eb07ead Author: Sergio Paracuellos Date: Fri Jun 4 07:53:37 2021 +0200 pinctrl: ralink: rt2880: avoid to error in calls is pin is already enabled In 'rt2880_pmx_group_enable' driver is printing an error and returning -EBUSY if a pin has been already enabled. This begets anoying messages in the caller when this happens like the following: rt2880-pinmux pinctrl: pcie is already enabled mt7621-pci 1e140000.pcie: Error applying setting, reverse things back To avoid this just print the already enabled message in the pinctrl driver and return 0 instead to not confuse the user with a real bad problem. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210604055337.20407-1-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij commit 9041575348b21ade1fb74d790f1aac85d68198c7 Author: Guillaume Ranquet Date: Thu May 13 21:26:42 2021 +0200 dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma As recommended by the doc in: Documentation/drivers-api/dmaengine/provider.rst Use GFP_NOWAIT to not deplete the emergency pool. Signed-off-by: Guillaume Ranquet Link: https://lore.kernel.org/r/20210513192642.29446-4-granquet@baylibre.com Signed-off-by: Vinod Koul commit 2537b40b0a4f61d2c83900744fe89b09076be9c6 Author: Guillaume Ranquet Date: Thu May 13 21:26:41 2021 +0200 dmaengine: mediatek: do not issue a new desc if one is still current Avoid issuing a new desc if one is still being processed as this can lead to some desc never being marked as completed. Signed-off-by: Guillaume Ranquet Link: https://lore.kernel.org/r/20210513192642.29446-3-granquet@baylibre.com Signed-off-by: Vinod Koul commit 0a2ff58f9f8f95526ecb0ccd7517fefceb96f661 Author: Guillaume Ranquet Date: Thu May 13 21:26:40 2021 +0200 dmaengine: mediatek: free the proper desc in desc_free handler The desc_free handler assumed that the desc we want to free was always the current one associated with the channel. This is seldom the case and this is causing use after free crashes in multiple places (tx/rx/terminate...). BUG: KASAN: use-after-free in mtk_uart_apdma_rx_handler+0x120/0x304 Call trace: dump_backtrace+0x0/0x1b0 show_stack+0x24/0x34 dump_stack+0xe0/0x150 print_address_description+0x8c/0x55c __kasan_report+0x1b8/0x218 kasan_report+0x14/0x20 __asan_load4+0x98/0x9c mtk_uart_apdma_rx_handler+0x120/0x304 mtk_uart_apdma_irq_handler+0x50/0x80 __handle_irq_event_percpu+0xe0/0x210 handle_irq_event+0x8c/0x184 handle_fasteoi_irq+0x1d8/0x3ac __handle_domain_irq+0xb0/0x110 gic_handle_irq+0x50/0xb8 el0_irq_naked+0x60/0x6c Allocated by task 3541: __kasan_kmalloc+0xf0/0x1b0 kasan_kmalloc+0x10/0x1c kmem_cache_alloc_trace+0x90/0x2dc mtk_uart_apdma_prep_slave_sg+0x6c/0x1a0 mtk8250_dma_rx_complete+0x220/0x2e4 vchan_complete+0x290/0x340 tasklet_action_common+0x220/0x298 tasklet_action+0x28/0x34 __do_softirq+0x158/0x35c Freed by task 3541: __kasan_slab_free+0x154/0x224 kasan_slab_free+0x14/0x24 slab_free_freelist_hook+0xf8/0x15c kfree+0xb4/0x278 mtk_uart_apdma_desc_free+0x34/0x44 vchan_complete+0x1bc/0x340 tasklet_action_common+0x220/0x298 tasklet_action+0x28/0x34 __do_softirq+0x158/0x35c The buggy address belongs to the object at ffff000063606800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 176 bytes inside of 256-byte region [ffff000063606800, ffff000063606900) The buggy address belongs to the page: page:fffffe00016d8180 refcount:1 mapcount:0 mapping:ffff00000302f600 index:0x0 compound_mapcount: 0 flags: 0xffff00000010200(slab|head) raw: 0ffff00000010200 dead000000000100 dead000000000122 ffff00000302f600 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Signed-off-by: Guillaume Ranquet Link: https://lore.kernel.org/r/20210513192642.29446-2-granquet@baylibre.com Signed-off-by: Vinod Koul commit 614124bea77e452aa6df7a8714e8bc820b489922 Author: Linus Torvalds Date: Sun Jun 6 15:47:27 2021 -0700 Linux 5.13-rc5 commit 90d56a3d6e0bec69ab58910f4ef56f4ef98d073a Merge: 20e41d9bc8045 e57f5cd99ca60 Author: Linus Torvalds Date: Sun Jun 6 15:39:56 2021 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Five small and fairly minor fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V scsi: ufs: ufs-mediatek: Fix HCI version in some platforms scsi: qedf: Do not put host in qedf_vport_create() unconditionally scsi: lpfc: Fix failure to transmit ABTS on FC link scsi: target: core: Fix warning on realtime kernels commit 0e4bf265b11a00bde9fef6b791bd8ee2d8059701 Author: Manivannan Sadhasivam Date: Wed May 26 13:58:57 2021 +0530 pinctrl: qcom: Fix duplication in gpio_groups "gpio52" and "gpio53" are duplicated in gpio_groups, fix them! Fixes: ac43c44a7a37 ("pinctrl: qcom: Add SDX55 pincontrol driver") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Vinod Koul Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210526082857.174682-1-manivannan.sadhasivam@linaro.org Signed-off-by: Linus Walleij commit 20e41d9bc80456207deb71141147a3de2c34e676 Merge: decad3e1d1ed1 e71f99f2dfb45 Author: Linus Torvalds Date: Sun Jun 6 14:24:13 2021 -0700 Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Miscellaneous ext4 bug fixes" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: Only advertise encrypted_casefold when encryption and unicode are enabled ext4: fix no-key deletion for encrypt+casefold ext4: fix memory leak in ext4_fill_super ext4: fix fast commit alignment issues ext4: fix bug on in ext4_es_cache_extent as ext4_split_extent_at failed ext4: fix accessing uninit percpu counter variable with fast_commit ext4: fix memory leak in ext4_mb_init_backend on error path. commit decad3e1d1ed150588dd9d44beacf82295b9d5a5 Merge: bd7b12aa6081c b9c112f2c223c Author: Linus Torvalds Date: Sun Jun 6 13:00:36 2021 -0700 Merge tag 'arm-soc-fixes-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Olof Johansson: "A set of fixes that have been coming in over the last few weeks, the usual mix of fixes: - DT fixups for TI K3 - SATA drive detection fix for TI DRA7 - Power management fixes and a few build warning removals for OMAP - OP-TEE fix to use standard API for UUID exporting - DT fixes for a handful of i.MX boards And a few other smaller items" * tag 'arm-soc-fixes-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (29 commits) arm64: meson: select COMMON_CLK soc: amlogic: meson-clk-measure: remove redundant dev_err call in meson_msr_probe() ARM: OMAP1: ams-delta: remove unused function ams_delta_camera_power bus: ti-sysc: Fix flakey idling of uarts and stop using swsup_sidle_act ARM: dts: imx: emcon-avari: Fix nxp,pca8574 #gpio-cells ARM: dts: imx7d-pico: Fix the 'tuning-step' property ARM: dts: imx7d-meerkat96: Fix the 'tuning-step' property arm64: dts: freescale: sl28: var1: fix RGMII clock and voltage arm64: dts: freescale: sl28: var4: fix RGMII clock and voltage ARM: imx: pm-imx27: Include "common.h" arm64: dts: zii-ultra: fix 12V_MAIN voltage arm64: dts: zii-ultra: remove second GEN_3V3 regulator instance arm64: dts: ls1028a: fix memory node bus: ti-sysc: Fix am335x resume hang for usb otg module ARM: OMAP2+: Fix build warning when mmc_omap is not built ARM: OMAP1: isp1301-omap: Add missing gpiod_add_lookup_table function ARM: OMAP1: Fix use of possibly uninitialized irq variable optee: use export_uuid() to copy client UUID arm64: dts: ti: k3*: Introduce reg definition for interrupt routers arm64: dts: ti: k3-am65|j721e|am64: Map the dma / navigator subsystem via explicit ranges ... commit bd7b12aa6081c3755b693755d608f58e13798a60 Merge: 773ac53bbfceb 59cc84c802eb9 Author: Linus Torvalds Date: Sun Jun 6 12:39:36 2021 -0700 Merge tag 'powerpc-5.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "Fix our KVM reverse map real-mode handling since we enabled huge vmalloc (in some configurations). Revert a recent change to our IOMMU code which broke some devices. Fix KVM handling of FSCR on P7/P8, which could have possibly let a guest crash it's Qemu. Fix kprobes validation of prefixed instructions across page boundary. Thanks to Alexey Kardashevskiy, Christophe Leroy, Fabiano Rosas, Frederic Barrat, Naveen N. Rao, and Nicholas Piggin" * tag 'powerpc-5.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: Revert "powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs" KVM: PPC: Book3S HV: Save host FSCR in the P7/8 path powerpc: Fix reverse map real-mode address lookup with huge vmalloc powerpc/kprobes: Fix validation of prefixed instructions across page boundary commit 773ac53bbfcebb58ce03577d94ce471cadf3ea18 Merge: f5b6eb1e01820 009767dbf42ac Author: Linus Torvalds Date: Sun Jun 6 12:25:43 2021 -0700 Merge tag 'x86_urgent_for_v5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "A bunch of x86/urgent stuff accumulated for the last two weeks so lemme unload it to you. It should be all totally risk-free, of course. :-) - Fix out-of-spec hardware (1st gen Hygon) which does not implement MSR_AMD64_SEV even though the spec clearly states so, and check CPUID bits first. - Send only one signal to a task when it is a SEGV_PKUERR si_code type. - Do away with all the wankery of reserving X amount of memory in the first megabyte to prevent BIOS corrupting it and simply and unconditionally reserve the whole first megabyte. - Make alternatives NOP optimization work at an arbitrary position within the patched sequence because the compiler can put single-byte NOPs for alignment anywhere in the sequence (32-bit retpoline), vs our previous assumption that the NOPs are only appended. - Force-disable ENQCMD[S] instructions support and remove update_pasid() because of insufficient protection against FPU state modification in an interrupt context, among other xstate horrors which are being addressed at the moment. This one limits the fallout until proper enablement. - Use cpu_feature_enabled() in the idxd driver so that it can be build-time disabled through the defines in disabled-features.h. - Fix LVT thermal setup for SMI delivery mode by making sure the APIC LVT value is read before APIC initialization so that softlockups during boot do not happen at least on one machine. - Mark all legacy interrupts as legacy vectors when the IO-APIC is disabled and when all legacy interrupts are routed through the PIC" * tag 'x86_urgent_for_v5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev: Check SME/SEV support in CPUID first x86/fault: Don't send SIGSEGV twice on SEGV_PKUERR x86/setup: Always reserve the first 1M of RAM x86/alternative: Optimize single-byte NOPs at an arbitrary position x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid() dmaengine: idxd: Use cpu_feature_enabled() x86/thermal: Fix LVT thermal setup for SMI delivery mode x86/apic: Mark _all_ legacy interrupts when IO/APIC is missing commit e71f99f2dfb45f4e7203a0732e85f71ef1d04dab Author: Daniel Rosenberg Date: Thu Jun 3 09:48:49 2021 +0000 ext4: Only advertise encrypted_casefold when encryption and unicode are enabled Encrypted casefolding is only supported when both encryption and casefolding are both enabled in the config. Fixes: 471fbbea7ff7 ("ext4: handle casefolding with encryption") Cc: stable@vger.kernel.org # 5.13+ Signed-off-by: Daniel Rosenberg Link: https://lore.kernel.org/r/20210603094849.314342-1-drosen@google.com Signed-off-by: Theodore Ts'o commit 63e7f1289389c8dff3c766f01ac1cc1c874b2ba5 Author: Daniel Rosenberg Date: Sat May 22 00:41:32 2021 +0000 ext4: fix no-key deletion for encrypt+casefold commit 471fbbea7ff7 ("ext4: handle casefolding with encryption") is missing a few checks for the encryption key which are needed to support deleting enrypted casefolded files when the key is not present. This bug made it impossible to delete encrypted+casefolded directories without the encryption key, due to errors like: W : EXT4-fs warning (device vdc): __ext4fs_dirhash:270: inode #49202: comm Binder:378_4: Siphash requires key Repro steps in kvm-xfstests test appliance: mkfs.ext4 -F -E encoding=utf8 -O encrypt /dev/vdc mount /vdc mkdir /vdc/dir chattr +F /vdc/dir keyid=$(head -c 64 /dev/zero | xfs_io -c add_enckey /vdc | awk '{print $NF}') xfs_io -c "set_encpolicy $keyid" /vdc/dir for i in `seq 1 100`; do mkdir /vdc/dir/$i done xfs_io -c "rm_enckey $keyid" /vdc rm -rf /vdc/dir # fails with the bug Fixes: 471fbbea7ff7 ("ext4: handle casefolding with encryption") Signed-off-by: Daniel Rosenberg Link: https://lore.kernel.org/r/20210522004132.2142563-1-drosen@google.com Signed-off-by: Theodore Ts'o commit afd09b617db3786b6ef3dc43e28fe728cfea84df Author: Alexey Makhalov Date: Fri May 21 07:55:33 2021 +0000 ext4: fix memory leak in ext4_fill_super Buffer head references must be released before calling kill_bdev(); otherwise the buffer head (and its page referenced by b_data) will not be freed by kill_bdev, and subsequently that bh will be leaked. If blocksizes differ, sb_set_blocksize() will kill current buffers and page cache by using kill_bdev(). And then super block will be reread again but using correct blocksize this time. sb_set_blocksize() didn't fully free superblock page and buffer head, and being busy, they were not freed and instead leaked. This can easily be reproduced by calling an infinite loop of: systemctl start .mount, and systemctl stop .mount ... since systemd creates a cgroup for each slice which it mounts, and the bh leak get amplified by a dying memory cgroup that also never gets freed, and memory consumption is much more easily noticed. Fixes: ce40733ce93d ("ext4: Check for return value from sb_set_blocksize") Fixes: ac27a0ec112a ("ext4: initial copy of files from ext3") Link: https://lore.kernel.org/r/20210521075533.95732-1-amakhalov@vmware.com Signed-off-by: Alexey Makhalov Signed-off-by: Theodore Ts'o Cc: stable@kernel.org commit a7ba36bc94f20b6c77f16364b9a23f582ea8faac Author: Harshad Shirwadkar Date: Wed May 19 14:59:20 2021 -0700 ext4: fix fast commit alignment issues Fast commit recovery data on disk may not be aligned. So, when the recovery code reads it, this patch makes sure that fast commit info found on-disk is first memcpy-ed into an aligned variable before accessing it. As a consequence of it, we also remove some macros that could resulted in unaligned accesses. Cc: stable@kernel.org Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20210519215920.2037527-1-harshads@google.com Signed-off-by: Theodore Ts'o commit 082cd4ec240b8734a82a89ffb890216ac98fec68 Author: Ye Bin Date: Thu May 6 22:10:42 2021 +0800 ext4: fix bug on in ext4_es_cache_extent as ext4_split_extent_at failed We got follow bug_on when run fsstress with injecting IO fault: [130747.323114] kernel BUG at fs/ext4/extents_status.c:762! [130747.323117] Internal error: Oops - BUG: 0 [#1] SMP ...... [130747.334329] Call trace: [130747.334553] ext4_es_cache_extent+0x150/0x168 [ext4] [130747.334975] ext4_cache_extents+0x64/0xe8 [ext4] [130747.335368] ext4_find_extent+0x300/0x330 [ext4] [130747.335759] ext4_ext_map_blocks+0x74/0x1178 [ext4] [130747.336179] ext4_map_blocks+0x2f4/0x5f0 [ext4] [130747.336567] ext4_mpage_readpages+0x4a8/0x7a8 [ext4] [130747.336995] ext4_readpage+0x54/0x100 [ext4] [130747.337359] generic_file_buffered_read+0x410/0xae8 [130747.337767] generic_file_read_iter+0x114/0x190 [130747.338152] ext4_file_read_iter+0x5c/0x140 [ext4] [130747.338556] __vfs_read+0x11c/0x188 [130747.338851] vfs_read+0x94/0x150 [130747.339110] ksys_read+0x74/0xf0 This patch's modification is according to Jan Kara's suggestion in: https://patchwork.ozlabs.org/project/linux-ext4/patch/20210428085158.3728201-1-yebin10@huawei.com/ "I see. Now I understand your patch. Honestly, seeing how fragile is trying to fix extent tree after split has failed in the middle, I would probably go even further and make sure we fix the tree properly in case of ENOSPC and EDQUOT (those are easily user triggerable). Anything else indicates a HW problem or fs corruption so I'd rather leave the extent tree as is and don't try to fix it (which also means we will not create overlapping extents)." Cc: stable@kernel.org Signed-off-by: Ye Bin Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210506141042.3298679-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o commit 8e11d62e2e8769fe29d1ae98b44b23c7233eb8a2 Author: Christophe Leroy Date: Sat Jun 5 08:56:09 2021 +0000 powerpc/mem: Add back missing header to fix 'no previous prototype' error Commit b26e8f27253a ("powerpc/mem: Move cache flushing functions into mm/cacheflush.c") removed asm/sparsemem.h which is required when CONFIG_MEMORY_HOTPLUG is selected to get the declaration of create_section_mapping(). Add it back. Fixes: b26e8f27253a ("powerpc/mem: Move cache flushing functions into mm/cacheflush.c") Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3e5b63bb3daab54a1eb9c20221c2e9528c4db9b3.1622883330.git.christophe.leroy@csgroup.eu commit f5b6eb1e018203913dfefcf6fa988649ad11ad6e Merge: e5220dd16778f 57648e860485d Author: Linus Torvalds Date: Sat Jun 5 15:45:11 2021 -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 bugfixes from I2C for v5.13. Usual stuff" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: qcom-geni: Suspend and resume the bus during SYSTEM_SLEEP_PM ops i2c: qcom-geni: Add shutdown callback for i2c i2c: tegra-bpmp: Demote kernel-doc abuses i2c: altera: Fix formatting issue in struct and demote unworthy kernel-doc headers commit b9c112f2c223ce50ef6579c9825a62813b205de4 Merge: 7468bed8f850a cab12badfc99f Author: Olof Johansson Date: Sat Jun 5 15:43:46 2021 -0700 Merge tag 'ti-k3-dt-fixes-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/fixes Devicetree fixes for TI K3 platforms for v5.13 merge window: These minor fixes include: * Fixups for device tree discovered during yaml conversion * Fixups for missing dma-coherent property in j7200 * Removal of camera sensor node from am65 evm dts to overlay as camera sensor boards are variable. * tag 'ti-k3-dt-fixes-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: arm64: dts: ti: k3*: Introduce reg definition for interrupt routers arm64: dts: ti: k3-am65|j721e|am64: Map the dma / navigator subsystem via explicit ranges arm64: dts: ti: k3-*: Rename the TI-SCI node arm64: dts: ti: k3-am65-wakeup: Drop un-necessary properties from dmsc node arm64: dts: ti: k3-am65-wakeup: Add debug region to TI-SCI node arm64: dts: ti: k3-*: Rename the TI-SCI clocks node name arm64: dts: ti: j7200-main: Mark Main NAVSS as dma-coherent arm64: dts: ti: k3-am654-base-board: remove ov5640 Link: https://lore.kernel.org/r/20210518115634.467vgpbzplal5kou@obituary Signed-off-by: Olof Johansson commit 7468bed8f850a6e90884b3b69a74e544a87c3856 Merge: 2f3e4eb179737 673c7aa2436bf Author: Olof Johansson Date: Sat Jun 5 15:43:10 2021 -0700 Merge tag 'optee-fix-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes OP-TEE use export_uuid() to copy UUID * tag 'optee-fix-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee: optee: use export_uuid() to copy client UUID Link: https://lore.kernel.org/r/20210518100712.GA449561@jade Signed-off-by: Olof Johansson commit 2f3e4eb1797370d986f9b07764b72fcde1b377b2 Merge: 94277cb5b4db7 bae989c4bc53f Author: Olof Johansson Date: Sat Jun 5 15:41:40 2021 -0700 Merge tag 'omap-for-v5.13/fixes-pm' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes PM and build warning fixes for omaps While chasing system suspend related regressions, I noticed few other issues related to PM would be good to have fixed: - UART idling does not always work for hardware autoidle features - am335x resume works only the first time unless musb module is loaded Then there are three patches for omap1 related warnings caused by the gpio changes, and one build warning fix for legacy mmc platform code when mmc is built as a loadable module. These can all be merged whenever suitable naturally. I've sent the more urgent SATA regression fix separately although it appears in this pull request too because of the branches merged. * tag 'omap-for-v5.13/fixes-pm' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: ams-delta: remove unused function ams_delta_camera_power bus: ti-sysc: Fix flakey idling of uarts and stop using swsup_sidle_act bus: ti-sysc: Fix am335x resume hang for usb otg module ARM: OMAP2+: Fix build warning when mmc_omap is not built ARM: OMAP1: isp1301-omap: Add missing gpiod_add_lookup_table function ARM: OMAP1: Fix use of possibly uninitialized irq variable Link: https://lore.kernel.org/r/pull-1622614772-543196@atomide.com Signed-off-by: Olof Johansson commit 94277cb5b4db789a0bf25bbae6c0a4d578547315 Merge: 3091a9e74240e db8e712e06874 Author: Olof Johansson Date: Sat Jun 5 15:39:55 2021 -0700 Merge tag 'omap-for-v5.13/fixes-sata' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/fixes Regression fix for TI dra7 SATA not detecting drives The SATA quirk flags are no missing With recent removal of legacy platform data and we need to add the quirk flags to detect drives. * tag 'omap-for-v5.13/fixes-sata' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Fix missing quirk flags for sata Link: https://lore.kernel.org/r/pull-1622613578-121536@atomide.com Signed-off-by: Olof Johansson commit 3091a9e74240e296cbf657bb7ff6bdb7c33720f0 Merge: 3a2d3ae067878 4cce442ffe544 Author: Olof Johansson Date: Sat Jun 5 15:39:22 2021 -0700 Merge tag 'amlogic-fixes-v5.13-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into arm/fixes Amlogic fixes for v5.13-rc1 - arm64: meson: select COMMON_CLK to select a proper implementation of the clock API - soc: amlogic: meson-clk-measure: remove redundant dev_err call in meson_msr_probe() * tag 'amlogic-fixes-v5.13-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux: arm64: meson: select COMMON_CLK soc: amlogic: meson-clk-measure: remove redundant dev_err call in meson_msr_probe() Link: https://lore.kernel.org/r/73e76706-f3f4-bebf-10dd-d2ec9106a234@baylibre.com Signed-off-by: Olof Johansson commit 3a2d3ae06787893138bfb2c3abf5dbc40a76f23d Merge: c4681547bcce7 b73eb6b3b91ff Author: Olof Johansson Date: Sat Jun 5 15:24:10 2021 -0700 Merge tag 'imx-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/fixes i.MX fixes for 5.13: - Fix missing-prototypes warning of 'imx27_pm_init' in i.MX27 platform pm code. - A couple of patches from Fabio Estevam to fix 'tuning-step' property in imx7d-meerkat96 and imx7d-pico DT. - Fix '#gpio-cells' of nxp,pca8574 device in imx6qdl-emcon-avari DT. - A couple of patches from Lucas Stach to fix regulator and voltage for imx8mq-zii-ultra board. - Add missing regulators for imx6q-dhcom to avoid possible instability issues. - Fix memory-controller settings for fsl-ls1028a DT. - Fix RGMII clock and voltage for a couple of fsl-ls1028a-kontron-sl28 boards. - Fix RGMII connection to QCA8334 switch for imx6dl-yapp4 board. * tag 'imx-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx: emcon-avari: Fix nxp,pca8574 #gpio-cells ARM: dts: imx7d-pico: Fix the 'tuning-step' property ARM: dts: imx7d-meerkat96: Fix the 'tuning-step' property arm64: dts: freescale: sl28: var1: fix RGMII clock and voltage arm64: dts: freescale: sl28: var4: fix RGMII clock and voltage ARM: imx: pm-imx27: Include "common.h" arm64: dts: zii-ultra: fix 12V_MAIN voltage arm64: dts: zii-ultra: remove second GEN_3V3 regulator instance arm64: dts: ls1028a: fix memory node ARM: dts: imx6q-dhcom: Add PU,VDD1P1,VDD2P5 regulators ARM: dts: imx6dl-yapp4: Fix RGMII connection to QCA8334 switch Link: https://lore.kernel.org/r/20210527011758.GD8194@dragon Signed-off-by: Olof Johansson commit e5220dd16778fe21d234a64e36cf50b54110025f Merge: af8d9eb840760 2eff0573e0d5a Author: Linus Torvalds Date: Sat Jun 5 10:55:41 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "13 patches. Subsystems affected by this patch series: mips, mm (kfence, debug, pagealloc, memory-hotplug, hugetlb, kasan, and hugetlb), init, proc, lib, ocfs2, and mailmap" * emailed patches from Andrew Morton : mailmap: use private address for Michel Lespinasse ocfs2: fix data corruption by fallocate lib: crc64: fix kernel-doc warning mm, hugetlb: fix simple resv_huge_pages underflow on UFFDIO_COPY mm/kasan/init.c: fix doc warning proc: add .gitignore for proc-subset-pid selftest hugetlb: pass head page to remove_hugetlb_page() drivers/base/memory: fix trying offlining memory blocks with memory holes on aarch64 mm/page_alloc: fix counting of free pages after take off from buddy mm/debug_vm_pgtable: fix alignment for pmd/pud_advanced_tests() pid: take a reference when initializing `cad_pid` kfence: use TASK_IDLE when awaiting allocation Revert "MIPS: make userspace mapping young by default" commit af8d9eb8407601e3a95206831464bfa6f889df38 Merge: 9d32fa5d74b14 160ce364167fa Author: Linus Torvalds Date: Sat Jun 5 10:45:13 2021 -0700 Merge tag 'riscv-for-linus-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - Build with '-mno-relax' when using LLVM's linker, which doesn't support linker relaxation. - A fix to build without SiFive's errata. - A fix to use PAs during init_resources() - A fix to avoid W+X mappings during boot. * tag 'riscv-for-linus-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: RISC-V: Fix memblock_free() usages in init_resources() riscv: skip errata_cip_453.o if CONFIG_ERRATA_SIFIVE_CIP_453 is disabled riscv: mm: Fix W+X mappings at boot riscv: Use -mno-relax when using lld linker commit 2eff0573e0d5a50a42eea41e4d23d5029d4b24fc Author: Michel Lespinasse Date: Fri Jun 4 20:01:45 2021 -0700 mailmap: use private address for Michel Lespinasse Link: https://lkml.kernel.org/r/20210602221225.49446-1-michel@lespinasse.org Signed-off-by: Michel Lespinasse Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6bba4471f0cc1296fe3c2089b9e52442d3074b2e Author: Junxiao Bi Date: Fri Jun 4 20:01:42 2021 -0700 ocfs2: fix data corruption by fallocate When fallocate punches holes out of inode size, if original isize is in the middle of last cluster, then the part from isize to the end of the cluster will be zeroed with buffer write, at that time isize is not yet updated to match the new size, if writeback is kicked in, it will invoke ocfs2_writepage()->block_write_full_page() where the pages out of inode size will be dropped. That will cause file corruption. Fix this by zero out eof blocks when extending the inode size. Running the following command with qemu-image 4.2.1 can get a corrupted coverted image file easily. qemu-img convert -p -t none -T none -f qcow2 $qcow_image \ -O qcow2 -o compat=1.1 $qcow_image.conv The usage of fallocate in qemu is like this, it first punches holes out of inode size, then extend the inode size. fallocate(11, FALLOC_FL_KEEP_SIZE|FALLOC_FL_PUNCH_HOLE, 2276196352, 65536) = 0 fallocate(11, 0, 2276196352, 65536) = 0 v1: https://www.spinics.net/lists/linux-fsdevel/msg193999.html v2: https://lore.kernel.org/linux-fsdevel/20210525093034.GB4112@quack2.suse.cz/T/ Link: https://lkml.kernel.org/r/20210528210648.9124-1-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi Reviewed-by: Joseph Qi Cc: Jan Kara Cc: Mark Fasheh Cc: Joel Becker Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 415f0c835ba799e47ce077b01876568431da1ff3 Author: YueHaibing Date: Fri Jun 4 20:01:39 2021 -0700 lib: crc64: fix kernel-doc warning Fix W=1 kernel build warning: lib/crc64.c:40: warning: bad line: or the previous crc64 value if computing incrementally. Link: https://lkml.kernel.org/r/20210601135851.15444-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Reviewed-by: Coly Li Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d84cf06e3dd8c5c5b547b5d8931015fc536678e5 Author: Mina Almasry Date: Fri Jun 4 20:01:36 2021 -0700 mm, hugetlb: fix simple resv_huge_pages underflow on UFFDIO_COPY The userfaultfd hugetlb tests cause a resv_huge_pages underflow. This happens when hugetlb_mcopy_atomic_pte() is called with !is_continue on an index for which we already have a page in the cache. When this happens, we allocate a second page, double consuming the reservation, and then fail to insert the page into the cache and return -EEXIST. To fix this, we first check if there is a page in the cache which already consumed the reservation, and return -EEXIST immediately if so. There is still a rare condition where we fail to copy the page contents AND race with a call for hugetlb_no_page() for this index and again we will underflow resv_huge_pages. That is fixed in a more complicated patch not targeted for -stable. Test: Hacked the code locally such that resv_huge_pages underflows produce a warning, then: ./tools/testing/selftests/vm/userfaultfd hugetlb_shared 10 2 /tmp/kokonut_test/huge/userfaultfd_test && echo test success ./tools/testing/selftests/vm/userfaultfd hugetlb 10 2 /tmp/kokonut_test/huge/userfaultfd_test && echo test success Both tests succeed and produce no warnings. After the test runs number of free/resv hugepages is correct. [mike.kravetz@oracle.com: changelog fixes] Link: https://lkml.kernel.org/r/20210528004649.85298-1-almasrymina@google.com Fixes: 8fb5debc5fcd ("userfaultfd: hugetlbfs: add hugetlb_mcopy_atomic_pte for userfaultfd support") Signed-off-by: Mina Almasry Reviewed-by: Mike Kravetz Cc: Axel Rasmussen Cc: Peter Xu Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7b6889f54a3c8c4139137a24a3ca12fe52a91dba Author: Yu Kuai Date: Fri Jun 4 20:01:33 2021 -0700 mm/kasan/init.c: fix doc warning Fix gcc W=1 warning: mm/kasan/init.c:228: warning: Function parameter or member 'shadow_start' not described in 'kasan_populate_early_shadow' mm/kasan/init.c:228: warning: Function parameter or member 'shadow_end' not described in 'kasan_populate_early_shadow' Link: https://lkml.kernel.org/r/20210603140700.3045298-1-yukuai3@huawei.com Signed-off-by: Yu Kuai Acked-by: Andrey Ryabinin Cc: Zhang Yi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 263e88d678baa1a2e3f2d5afbdcd9fd3feb80a4d Author: David Matlack Date: Fri Jun 4 20:01:30 2021 -0700 proc: add .gitignore for proc-subset-pid selftest This new selftest needs an entry in the .gitignore file otherwise git will try to track the binary. Link: https://lkml.kernel.org/r/20210601164305.11776-1-dmatlack@google.com Fixes: 268af17ada5855 ("selftests: proc: test subset=pid") Signed-off-by: David Matlack Acked-by: Christian Brauner Cc: Shuah Khan Cc: Alexey Dobriyan Cc: Alexey Gladkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c5da35723a961d8c02ea516da2bcfeb007d7d2c Author: Naoya Horiguchi Date: Fri Jun 4 20:01:27 2021 -0700 hugetlb: pass head page to remove_hugetlb_page() When memory_failure() or soft_offline_page() is called on a tail page of some hugetlb page, "BUG: unable to handle page fault" error can be triggered. remove_hugetlb_page() dereferences page->lru, so it's assumed that the page points to a head page, but one of the caller, dissolve_free_huge_page(), provides remove_hugetlb_page() with 'page' which could be a tail page. So pass 'head' to it, instead. Link: https://lkml.kernel.org/r/20210526235257.2769473-1-nao.horiguchi@gmail.com Fixes: 6eb4e88a6d27 ("hugetlb: create remove_hugetlb_page() to separate functionality") Signed-off-by: Naoya Horiguchi Reviewed-by: Mike Kravetz Reviewed-by: Muchun Song Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: Miaohe Lin Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 928130532e19f2f920840e41bd6b1cae742ea63b Author: David Hildenbrand Date: Fri Jun 4 20:01:24 2021 -0700 drivers/base/memory: fix trying offlining memory blocks with memory holes on aarch64 offline_pages() properly checks for memory holes and bails out. However, we do a page_zone(pfn_to_page(start_pfn)) before calling offline_pages() when offlining a memory block. We should not unconditionally call page_zone(pfn_to_page(start_pfn)) on aarch64 in offlining code, otherwise we can trigger a BUG when hitting a memory hole: kernel BUG at include/linux/mm.h:1383! Internal error: Oops - BUG: 0 [#1] SMP Modules linked in: loop processor efivarfs ip_tables x_tables ext4 mbcache jbd2 dm_mod igb nvme i2c_algo_bit mlx5_core i2c_core nvme_core firmware_class CPU: 13 PID: 1694 Comm: ranbug Not tainted 5.12.0-next-20210524+ #4 Hardware name: MiTAC RAPTOR EV-883832-X3-0001/RAPTOR, BIOS 1.6 06/28/2020 pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) pc : memory_subsys_offline+0x1f8/0x250 lr : memory_subsys_offline+0x1f8/0x250 Call trace: memory_subsys_offline+0x1f8/0x250 device_offline+0x154/0x1d8 online_store+0xa4/0x118 dev_attr_store+0x44/0x78 sysfs_kf_write+0xe8/0x138 kernfs_fop_write_iter+0x26c/0x3d0 new_sync_write+0x2bc/0x4f8 vfs_write+0x718/0xc88 ksys_write+0xf8/0x1e0 __arm64_sys_write+0x74/0xa8 invoke_syscall.constprop.0+0x78/0x1e8 do_el0_svc+0xe4/0x298 el0_svc+0x20/0x30 el0_sync_handler+0xb0/0xb8 el0_sync+0x178/0x180 Kernel panic - not syncing: Oops - BUG: Fatal exception SMP: stopping secondary CPUs Kernel Offset: disabled CPU features: 0x00000251,20000846 Memory Limit: none If nr_vmemmap_pages is set, we know that we are dealing with hotplugged memory that doesn't have any holes. So call page_zone(pfn_to_page(start_pfn)) only when really necessary -- when nr_vmemmap_pages is set and we actually adjust the present pages. Link: https://lkml.kernel.org/r/20210526075226.5572-1-david@redhat.com Fixes: a08a2ae34613 ("mm,memory_hotplug: allocate memmap from the added memory range") Signed-off-by: David Hildenbrand Reported-by: Qian Cai (QUIC) Reviewed-by: Oscar Salvador Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bac9c6fa1f929213bbd0ac9cdf21e8e2f0916828 Author: Ding Hui Date: Fri Jun 4 20:01:21 2021 -0700 mm/page_alloc: fix counting of free pages after take off from buddy Recently we found that there is a lot MemFree left in /proc/meminfo after do a lot of pages soft offline, it's not quite correct. Before Oscar's rework of soft offline for free pages [1], if we soft offline free pages, these pages are left in buddy with HWPoison flag, and NR_FREE_PAGES is not updated immediately. So the difference between NR_FREE_PAGES and real number of available free pages is also even big at the beginning. However, with the workload running, when we catch HWPoison page in any alloc functions subsequently, we will remove it from buddy, meanwhile update the NR_FREE_PAGES and try again, so the NR_FREE_PAGES will get more and more closer to the real number of available free pages. (regardless of unpoison_memory()) Now, for offline free pages, after a successful call take_page_off_buddy(), the page is no longer belong to buddy allocator, and will not be used any more, but we missed accounting NR_FREE_PAGES in this situation, and there is no chance to be updated later. Do update in take_page_off_buddy() like rmqueue() does, but avoid double counting if some one already set_migratetype_isolate() on the page. [1]: commit 06be6ff3d2ec ("mm,hwpoison: rework soft offline for free pages") Link: https://lkml.kernel.org/r/20210526075247.11130-1-dinghui@sangfor.com.cn Fixes: 06be6ff3d2ec ("mm,hwpoison: rework soft offline for free pages") Signed-off-by: Ding Hui Suggested-by: Naoya Horiguchi Reviewed-by: Oscar Salvador Acked-by: David Hildenbrand Acked-by: Naoya Horiguchi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04f7ce3f07ce39b1a3ca03a56b238a53acc52cfd Author: Gerald Schaefer Date: Fri Jun 4 20:01:18 2021 -0700 mm/debug_vm_pgtable: fix alignment for pmd/pud_advanced_tests() In pmd/pud_advanced_tests(), the vaddr is aligned up to the next pmd/pud entry, and so it does not match the given pmdp/pudp and (aligned down) pfn any more. For s390, this results in memory corruption, because the IDTE instruction used e.g. in xxx_get_and_clear() will take the vaddr for some calculations, in combination with the given pmdp. It will then end up with a wrong table origin, ending on ...ff8, and some of those wrongly set low-order bits will also select a wrong pagetable level for the index addition. IDTE could therefore invalidate (or 0x20) something outside of the page tables, depending on the wrongly picked index, which in turn depends on the random vaddr. As result, we sometimes see "BUG task_struct (Not tainted): Padding overwritten" on s390, where one 0x5a padding value got overwritten with 0x7a. Fix this by aligning down, similar to how the pmd/pud_aligned pfns are calculated. Link: https://lkml.kernel.org/r/20210525130043.186290-2-gerald.schaefer@linux.ibm.com Fixes: a5c3b9ffb0f40 ("mm/debug_vm_pgtable: add tests validating advanced arch page table helpers") Signed-off-by: Gerald Schaefer Reviewed-by: Anshuman Khandual Cc: Vineet Gupta Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: [5.9+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0711f0d7050b9e07c44bc159bbc64ac0a1022c7f Author: Mark Rutland Date: Fri Jun 4 20:01:14 2021 -0700 pid: take a reference when initializing `cad_pid` During boot, kernel_init_freeable() initializes `cad_pid` to the init task's struct pid. Later on, we may change `cad_pid` via a sysctl, and when this happens proc_do_cad_pid() will increment the refcount on the new pid via get_pid(), and will decrement the refcount on the old pid via put_pid(). As we never called get_pid() when we initialized `cad_pid`, we decrement a reference we never incremented, can therefore free the init task's struct pid early. As there can be dangling references to the struct pid, we can later encounter a use-after-free (e.g. when delivering signals). This was spotted when fuzzing v5.13-rc3 with Syzkaller, but seems to have been around since the conversion of `cad_pid` to struct pid in commit 9ec52099e4b8 ("[PATCH] replace cad_pid by a struct pid") from the pre-KASAN stone age of v2.6.19. Fix this by getting a reference to the init task's struct pid when we assign it to `cad_pid`. Full KASAN splat below. ================================================================== BUG: KASAN: use-after-free in ns_of_pid include/linux/pid.h:153 [inline] BUG: KASAN: use-after-free in task_active_pid_ns+0xc0/0xc8 kernel/pid.c:509 Read of size 4 at addr ffff23794dda0004 by task syz-executor.0/273 CPU: 1 PID: 273 Comm: syz-executor.0 Not tainted 5.12.0-00001-g9aef892b2d15 #1 Hardware name: linux,dummy-virt (DT) Call trace: ns_of_pid include/linux/pid.h:153 [inline] task_active_pid_ns+0xc0/0xc8 kernel/pid.c:509 do_notify_parent+0x308/0xe60 kernel/signal.c:1950 exit_notify kernel/exit.c:682 [inline] do_exit+0x2334/0x2bd0 kernel/exit.c:845 do_group_exit+0x108/0x2c8 kernel/exit.c:922 get_signal+0x4e4/0x2a88 kernel/signal.c:2781 do_signal arch/arm64/kernel/signal.c:882 [inline] do_notify_resume+0x300/0x970 arch/arm64/kernel/signal.c:936 work_pending+0xc/0x2dc Allocated by task 0: slab_post_alloc_hook+0x50/0x5c0 mm/slab.h:516 slab_alloc_node mm/slub.c:2907 [inline] slab_alloc mm/slub.c:2915 [inline] kmem_cache_alloc+0x1f4/0x4c0 mm/slub.c:2920 alloc_pid+0xdc/0xc00 kernel/pid.c:180 copy_process+0x2794/0x5e18 kernel/fork.c:2129 kernel_clone+0x194/0x13c8 kernel/fork.c:2500 kernel_thread+0xd4/0x110 kernel/fork.c:2552 rest_init+0x44/0x4a0 init/main.c:687 arch_call_rest_init+0x1c/0x28 start_kernel+0x520/0x554 init/main.c:1064 0x0 Freed by task 270: slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x98/0x260 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kmem_cache_free+0x224/0x8e0 mm/slub.c:3177 put_pid.part.4+0xe0/0x1a8 kernel/pid.c:114 put_pid+0x30/0x48 kernel/pid.c:109 proc_do_cad_pid+0x190/0x1b0 kernel/sysctl.c:1401 proc_sys_call_handler+0x338/0x4b0 fs/proc/proc_sysctl.c:591 proc_sys_write+0x34/0x48 fs/proc/proc_sysctl.c:617 call_write_iter include/linux/fs.h:1977 [inline] new_sync_write+0x3ac/0x510 fs/read_write.c:518 vfs_write fs/read_write.c:605 [inline] vfs_write+0x9c4/0x1018 fs/read_write.c:585 ksys_write+0x124/0x240 fs/read_write.c:658 __do_sys_write fs/read_write.c:670 [inline] __se_sys_write fs/read_write.c:667 [inline] __arm64_sys_write+0x78/0xb0 fs/read_write.c:667 __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline] invoke_syscall arch/arm64/kernel/syscall.c:49 [inline] el0_svc_common.constprop.1+0x16c/0x388 arch/arm64/kernel/syscall.c:129 do_el0_svc+0xf8/0x150 arch/arm64/kernel/syscall.c:168 el0_svc+0x28/0x38 arch/arm64/kernel/entry-common.c:416 el0_sync_handler+0x134/0x180 arch/arm64/kernel/entry-common.c:432 el0_sync+0x154/0x180 arch/arm64/kernel/entry.S:701 The buggy address belongs to the object at ffff23794dda0000 which belongs to the cache pid of size 224 The buggy address is located 4 bytes inside of 224-byte region [ffff23794dda0000, ffff23794dda00e0) The buggy address belongs to the page: page:(____ptrval____) refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x4dda0 head:(____ptrval____) order:1 compound_mapcount:0 flags: 0x3fffc0000010200(slab|head) raw: 03fffc0000010200 dead000000000100 dead000000000122 ffff23794d40d080 raw: 0000000000000000 0000000000190019 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff23794dd9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff23794dd9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff23794dda0000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff23794dda0080: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff23794dda0100: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ================================================================== Link: https://lkml.kernel.org/r/20210524172230.38715-1-mark.rutland@arm.com Fixes: 9ec52099e4b8678a ("[PATCH] replace cad_pid by a struct pid") Signed-off-by: Mark Rutland Acked-by: Christian Brauner Cc: Cedric Le Goater Cc: Christian Brauner Cc: Eric W. Biederman Cc: Kees Cook Cc: Paul Mackerras Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8fd0e995cc7b6a7a8a40bc03d52a2cd445beeff4 Author: Marco Elver Date: Fri Jun 4 20:01:11 2021 -0700 kfence: use TASK_IDLE when awaiting allocation Since wait_event() uses TASK_UNINTERRUPTIBLE by default, waiting for an allocation counts towards load. However, for KFENCE, this does not make any sense, since there is no busy work we're awaiting. Instead, use TASK_IDLE via wait_event_idle() to not count towards load. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1185565 Link: https://lkml.kernel.org/r/20210521083209.3740269-1-elver@google.com Fixes: 407f1d8c1b5f ("kfence: await for allocation using wait_event") Signed-off-by: Marco Elver Cc: Mel Gorman Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: David Laight Cc: Hillf Danton Cc: [5.12+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 50c25ee97cf6ab011542167ab590c17012cea4ed Author: Thomas Bogendoerfer Date: Fri Jun 4 20:01:08 2021 -0700 Revert "MIPS: make userspace mapping young by default" This reverts commit f685a533a7fab35c5d069dcd663f59c8e4171a75. The MIPS cache flush logic needs to know whether the mapping was already established to decide how to flush caches. This is done by checking the valid bit in the PTE. The commit above breaks this logic by setting the valid in the PTE in new mappings, which causes kernel crashes. Link: https://lkml.kernel.org/r/20210526094335.92948-1-tsbogend@alpha.franken.de Fixes: f685a533a7f ("MIPS: make userspace mapping young by default") Reported-by: Zhou Yanjie Signed-off-by: Thomas Bogendoerfer Cc: Huang Pei Cc: Nicholas Piggin Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9981b20a5e3694f4625ab5a1ddc98ce7503f6d12 Author: Takashi Sakamoto Date: Sat Jun 5 18:10:54 2021 +0900 ALSA: firewire-lib: fix the context to call snd_pcm_stop_xrun() In the workqueue to queue wake-up event, isochronous context is not processed, thus it's useless to check context for the workqueue to switch status of runtime for PCM substream to XRUN. On the other hand, in software IRQ context of 1394 OHCI, it's needed. This commit fixes the bug introduced when tasklet was replaced with workqueue. Cc: Fixes: 2b3d2987d800 ("ALSA: firewire: Replace tasklet with work") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210605091054.68866-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit dfb06401b4cdfc71e2fc3e19b877ab845cc9f7f7 Author: Jeremy Szu Date: Sat Jun 5 16:25:38 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 840 Aero G8 The HP EliteBook 840 Aero G8 using ALC285 codec which using 0x04 to control mute LED and 0x01 to control micmute LED. In the other hand, there is no output from right channel of speaker. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210605082539.41797-3-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit 61d3e87468fad82dc8e8cb6de7db563ada64b532 Author: Jeremy Szu Date: Sat Jun 5 16:25:37 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP EliteBook x360 1040 G8 The HP EliteBook x360 1040 G8 using ALC285 codec which using 0x04 to control mute LED and 0x01 to control micmute LED. In the other hand, there is no output from right channel of speaker. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210605082539.41797-2-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit 15d295b560e6dd45f839a53ae69e4f63b54eb32f Author: Jeremy Szu Date: Sat Jun 5 16:25:36 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Elite Dragonfly G2 The HP Elite Dragonfly G2 using ALC285 codec which using 0x04 to control mute LED and 0x01 to control micmute LED. In the other hand, there is no output from right channel of speaker. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210605082539.41797-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit bc96c72df33ee81b24d87eab953c73f7bcc04f29 Author: George McCollister Date: Thu Jun 3 19:32:08 2021 -0500 USB: serial: ftdi_sio: add NovaTech OrionMX product ID Add PID for the NovaTech OrionMX so it can be automatically detected. Signed-off-by: George McCollister Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 9d32fa5d74b148b1cba262c0c24b9a27a910909b Merge: 2cb26c15a247a 3822d0670c9d4 Author: Linus Torvalds Date: Fri Jun 4 18:25:39 2021 -0700 Merge tag 'net-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes, including fixes from bpf, wireless, netfilter and wireguard trees. The bpf vs lockdown+audit fix is the most notable. Things haven't slowed down just yet, both in terms of regressions in current release and largish fixes for older code, but we usually see a slowdown only after -rc5. Current release - regressions: - virtio-net: fix page faults and crashes when XDP is enabled - mlx5e: fix HW timestamping with CQE compression, and make sure they are only allowed to coexist with capable devices - stmmac: - fix kernel panic due to NULL pointer dereference of mdio_bus_data - fix double clk unprepare when no PHY device is connected Current release - new code bugs: - mt76: a few fixes for the recent MT7921 devices and runtime power management Previous releases - regressions: - ice: - track AF_XDP ZC enabled queues in bitmap to fix copy mode Tx - fix allowing VF to request more/less queues via virtchnl - correct supported and advertised autoneg by using PHY capabilities - allow all LLDP packets from PF to Tx - kbuild: quote OBJCOPY var to avoid a pahole call break the build Previous releases - always broken: - bpf, lockdown, audit: fix buggy SELinux lockdown permission checks - mt76: address the recent FragAttack vulnerabilities not covered by generic fixes - ipv6: fix KASAN: slab-out-of-bounds Read in fib6_nh_flush_exceptions - Bluetooth: - fix the erroneous flush_work() order, to avoid double free - use correct lock to prevent UAF of hdev object - nfc: fix NULL ptr dereference in llcp_sock_getname() after failed connect - ieee802154: multiple fixes to error checking and return values - igb: fix XDP with PTP enabled - intel: add correct exception tracing for XDP - tls: fix use-after-free when TLS offload device goes down and back up - ipvs: ignore IP_VS_SVC_F_HASHED flag when adding service - netfilter: nft_ct: skip expectations for confirmed conntrack - mptcp: fix falling back to TCP in presence of out of order packets early in connection lifetime - wireguard: switch from O(n) to a O(1) algorithm for maintaining peers, fixing stalls and a large memory leak in the process Misc: - devlink: correct VIRTUAL port to not have phys_port attributes - Bluetooth: fix VIRTIO_ID_BT assigned number - net: return the correct errno code ENOBUF -> ENOMEM - wireguard: - peer: allocate in kmem_cache saving 25% on peer memory - do not use -O3" * tag 'net-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (91 commits) cxgb4: avoid link re-train during TC-MQPRIO configuration sch_htb: fix refcount leak in htb_parent_to_leaf_offload wireguard: allowedips: free empty intermediate nodes when removing single node wireguard: allowedips: allocate nodes in kmem_cache wireguard: allowedips: remove nodes in O(1) wireguard: allowedips: initialize list head in selftest wireguard: peer: allocate in kmem_cache wireguard: use synchronize_net rather than synchronize_rcu wireguard: do not use -O3 wireguard: selftests: make sure rp_filter is disabled on vethc wireguard: selftests: remove old conntrack kconfig value virtchnl: Add missing padding to virtchnl_proto_hdrs ice: Allow all LLDP packets from PF to Tx ice: report supported and advertised autoneg using PHY capabilities ice: handle the VF VSI rebuild failure ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared ice: Fix allowing VF to request more/less queues via virtchnl virtio-net: fix for skb_over_panic inside big mode ipv6: Fix KASAN: slab-out-of-bounds Read in fib6_nh_flush_exceptions fib: Return the correct errno code ... commit 2cb26c15a247a2b2bc9de653773cf21d969bf570 Merge: ff6091075a687 67069a1f0fe5f Author: Linus Torvalds Date: Fri Jun 4 18:15:33 2021 -0700 Merge tag 'perf-tools-fixes-for-v5.13-2021-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix NULL pointer dereference in 'perf probe' when handling DW_AT_const_value when looking for a variable, which is valid. - Fix for capability querying of perf_event_attr.cgroup support in older kernels. - Add missing cloning of evsel->use_config_name. - Honor event config name on --no-merge in 'perf stat'. - Fix some memory leaks found using ASAN. - Fix the perf entry for perf_event_attr setup with make LIBPFM4=1 on s390 z/VM. - Update MIPS UAPI perf_regs.h file. - Fix 'perf stat' BPF counter load return check. * tag 'perf-tools-fixes-for-v5.13-2021-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf env: Fix memory leak of bpf_prog_info_linear member perf symbol-elf: Fix memory leak by freeing sdt_note.args perf stat: Honor event config name on --no-merge perf evsel: Add missing cloning of evsel->use_config_name perf test: Test 17 fails with make LIBPFM4=1 on s390 z/VM perf stat: Fix error return code in bperf__load() perf record: Move probing cgroup sampling support perf probe: Fix NULL pointer dereference in convert_variable_location() perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS commit ff6091075a687676d76b3beb24fa77389b387b00 Merge: 16f0596fc1d78 85aabbd7b315c Author: Linus Torvalds Date: Fri Jun 4 15:19:45 2021 -0700 Merge tag 'pci-v5.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fixes from Bjorn Helgaas: - Fix MSIs for platforms with "msi-map" device-tree property, which we broke in v5.13-rc1 (Jean-Philippe Brucker) - Add Krzysztof Wilczyński as PCI reviewer (Lorenzo Pieralisi) * tag 'pci-v5.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI/MSI: Fix MSIs for generic hosts that use device-tree's "msi-map" MAINTAINERS: Add Krzysztof as PCI host/endpoint controllers reviewer commit 3822d0670c9d4342794d73e0d0e615322b40438e Author: Rahul Lakkireddy Date: Fri Jun 4 16:48:18 2021 +0530 cxgb4: avoid link re-train during TC-MQPRIO configuration When configuring TC-MQPRIO offload, only turn off netdev carrier and don't bring physical link down in hardware. Otherwise, when the physical link is brought up again after configuration, it gets re-trained and stalls ongoing traffic. Also, when firmware is no longer accessible or crashed, avoid sending FLOWC and waiting for reply that will never come. Fix following hung_task_timeout_secs trace seen in these cases. INFO: task tc:20807 blocked for more than 122 seconds. Tainted: G S 5.13.0-rc3+ #122 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:tc state:D stack:14768 pid:20807 ppid: 19366 flags:0x00000000 Call Trace: __schedule+0x27b/0x6a0 schedule+0x37/0xa0 schedule_preempt_disabled+0x5/0x10 __mutex_lock.isra.14+0x2a0/0x4a0 ? netlink_lookup+0x120/0x1a0 ? rtnl_fill_ifinfo+0x10f0/0x10f0 __netlink_dump_start+0x70/0x250 rtnetlink_rcv_msg+0x28b/0x380 ? rtnl_fill_ifinfo+0x10f0/0x10f0 ? rtnl_calcit.isra.42+0x120/0x120 netlink_rcv_skb+0x4b/0xf0 netlink_unicast+0x1a0/0x280 netlink_sendmsg+0x216/0x440 sock_sendmsg+0x56/0x60 __sys_sendto+0xe9/0x150 ? handle_mm_fault+0x6d/0x1b0 ? do_user_addr_fault+0x1c5/0x620 __x64_sys_sendto+0x1f/0x30 do_syscall_64+0x3c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f7f73218321 RSP: 002b:00007ffd19626208 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000055b7c0a8b240 RCX: 00007f7f73218321 RDX: 0000000000000028 RSI: 00007ffd19626210 RDI: 0000000000000003 RBP: 000055b7c08680ff R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000055b7c085f5f6 R13: 000055b7c085f60a R14: 00007ffd19636470 R15: 00007ffd196262a0 Fixes: b1396c2bd675 ("cxgb4: parse and configure TC-MQPRIO offload") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit 944d671d5faa0d78980a3da5c0f04960ef1ad893 Author: Yunjian Wang Date: Fri Jun 4 19:03:18 2021 +0800 sch_htb: fix refcount leak in htb_parent_to_leaf_offload The commit ae81feb7338c ("sch_htb: fix null pointer dereference on a null new_q") fixes a NULL pointer dereference bug, but it is not correct. Because htb_graft_helper properly handles the case when new_q is NULL, and after the previous patch by skipping this call which creates an inconsistency : dev_queue->qdisc will still point to the old qdisc, but cl->parent->leaf.q will point to the new one (which will be noop_qdisc, because new_q was NULL). The code is based on an assumption that these two pointers are the same, so it can lead to refcount leaks. The correct fix is to add a NULL pointer check to protect qdisc_refcount_inc inside htb_parent_to_leaf_offload. Fixes: ae81feb7338c ("sch_htb: fix null pointer dereference on a null new_q") Signed-off-by: Yunjian Wang Suggested-by: Maxim Mikityanskiy Signed-off-by: David S. Miller commit 26821ecd3b489c11ecfbd3942bc7fef7629464b6 Merge: 6fd815bb1ecc5 519d8ab17682d Author: David S. Miller Date: Fri Jun 4 14:27:07 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2021-06-04 This series contains updates to virtchnl header file and ice driver. Brett fixes VF being unable to request a different number of queues then allocated and adds clearing of VF_MBX_ATQLEN register for VF reset. Haiyue handles error of rebuilding VF VSI during reset. Paul fixes reporting of autoneg to use the PHY capabilities. Dave allows LLDP packets without priority of TC_PRIO_CONTROL to be transmitted. Geert Uytterhoeven adds explicit padding to virtchnl_proto_hdrs structure in the virtchnl header file. ==================== Signed-off-by: David S. Miller commit 6fd815bb1ecc5d3cd99a31e0393fba0be517ed04 Merge: 579028dec182c bf7b042dc62a3 Author: David S. Miller Date: Fri Jun 4 14:25:14 2021 -0700 Merge branch 'wireguard-fixes' Jason A. Donenfeld says: ==================== wireguard fixes for 5.13-rc5 Here are bug fixes to WireGuard for 5.13-rc5: 1-2,6) These are small, trivial tweaks to our test harness. 3) Linus thinks -O3 is still dangerous to enable. The code gen wasn't so much different with -O2 either. 4) We were accidentally calling synchronize_rcu instead of synchronize_net while holding the rtnl_lock, resulting in some rather large stalls that hit production machines. 5) Peer allocation was wasting literally hundreds of megabytes on real world deployments, due to oddly sized large objects not fitting nicely into a kmalloc slab. 7-9) We move from an insanely expensive O(n) algorithm to a fast O(1) algorithm, and cleanup a massive memory leak in the process, in which allowed ips churn would leave danging nodes hanging around without cleanup until the interface was removed. The O(1) algorithm eliminates packet stalls and high latency issues, in addition to bringing operations that took as much as 10 minutes down to less than a second. ==================== Signed-off-by: David S. Miller commit bf7b042dc62a31f66d3a41dd4dfc7806f267b307 Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:38 2021 +0200 wireguard: allowedips: free empty intermediate nodes when removing single node When removing single nodes, it's possible that that node's parent is an empty intermediate node, in which case, it too should be removed. Otherwise the trie fills up and never is fully emptied, leading to gradual memory leaks over time for tries that are modified often. There was originally code to do this, but was removed during refactoring in 2016 and never reworked. Now that we have proper parent pointers from the previous commits, we can implement this properly. In order to reduce branching and expensive comparisons, we want to keep the double pointer for parent assignment (which lets us easily chain up to the root), but we still need to actually get the parent's base address. So encode the bit number into the last two bits of the pointer, and pack and unpack it as needed. This is a little bit clumsy but is the fastest and less memory wasteful of the compromises. Note that we align the root struct here to a minimum of 4, because it's embedded into a larger struct, and we're relying on having the bottom two bits for our flag, which would only be 16-bit aligned on m68k. The existing macro-based helpers were a bit unwieldy for adding the bit packing to, so this commit replaces them with safer and clearer ordinary functions. We add a test to the randomized/fuzzer part of the selftests, to free the randomized tries by-peer, refuzz it, and repeat, until it's supposed to be empty, and then then see if that actually resulted in the whole thing being emptied. That combined with kmemcheck should hopefully make sure this commit is doing what it should. Along the way this resulted in various other cleanups of the tests and fixes for recent graphviz. Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit dc680de28ca849dfe589dc15ac56d22505f0ef11 Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:37 2021 +0200 wireguard: allowedips: allocate nodes in kmem_cache The previous commit moved from O(n) to O(1) for removal, but in the process introduced an additional pointer member to a struct that increased the size from 60 to 68 bytes, putting nodes in the 128-byte slab. With deployed systems having as many as 2 million nodes, this represents a significant doubling in memory usage (128 MiB -> 256 MiB). Fix this by using our own kmem_cache, that's sized exactly right. This also makes wireguard's memory usage more transparent in tools like slabtop and /proc/slabinfo. Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Suggested-by: Arnd Bergmann Suggested-by: Matthew Wilcox Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit f634f418c227c912e7ea95a3299efdc9b10e4022 Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:36 2021 +0200 wireguard: allowedips: remove nodes in O(1) Previously, deleting peers would require traversing the entire trie in order to rebalance nodes and safely free them. This meant that removing 1000 peers from a trie with a half million nodes would take an extremely long time, during which we're holding the rtnl lock. Large-scale users were reporting 200ms latencies added to the networking stack as a whole every time their userspace software would queue up significant removals. That's a serious situation. This commit fixes that by maintaining a double pointer to the parent's bit pointer for each node, and then using the already existing node list belonging to each peer to go directly to the node, fix up its pointers, and free it with RCU. This means removal is O(1) instead of O(n), and we don't use gobs of stack. The removal algorithm has the same downside as the code that it fixes: it won't collapse needlessly long runs of fillers. We can enhance that in the future if it ever becomes a problem. This commit documents that limitation with a TODO comment in code, a small but meaningful improvement over the prior situation. Currently the biggest flaw, which the next commit addresses, is that because this increases the node size on 64-bit machines from 60 bytes to 68 bytes. 60 rounds up to 64, but 68 rounds up to 128. So we wind up using twice as much memory per node, because of power-of-two allocations, which is a big bummer. We'll need to figure something out there. Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 46cfe8eee285cde465b420637507884551f5d7ca Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:35 2021 +0200 wireguard: allowedips: initialize list head in selftest The randomized trie tests weren't initializing the dummy peer list head, resulting in a NULL pointer dereference when used. Fix this by initializing it in the randomized trie test, just like we do for the static unit test. While we're at it, all of the other strings like this have the word "self-test", so add it to the missing place here. Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit a4e9f8e3287c9eb6bf70df982870980dd3341863 Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:34 2021 +0200 wireguard: peer: allocate in kmem_cache With deployments having upwards of 600k peers now, this somewhat heavy structure could benefit from more fine-grained allocations. Specifically, instead of using a 2048-byte slab for a 1544-byte object, we can now use 1544-byte objects directly, thus saving almost 25% per-peer, or with 600k peers, that's a savings of 303 MiB. This also makes wireguard's memory usage more transparent in tools like slabtop and /proc/slabinfo. Fixes: 8b5553ace83c ("wireguard: queueing: get rid of per-peer ring buffers") Suggested-by: Arnd Bergmann Suggested-by: Matthew Wilcox Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 24b70eeeb4f46c09487f8155239ebfb1f875774a Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:33 2021 +0200 wireguard: use synchronize_net rather than synchronize_rcu Many of the synchronization points are sometimes called under the rtnl lock, which means we should use synchronize_net rather than synchronize_rcu. Under the hood, this expands to using the expedited flavor of function in the event that rtnl is held, in order to not stall other concurrent changes. This fixes some very, very long delays when removing multiple peers at once, which would cause some operations to take several minutes. Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit cc5060ca0285efe2728bced399a1955a7ce808b2 Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:32 2021 +0200 wireguard: do not use -O3 Apparently, various versions of gcc have O3-related miscompiles. Looking at the difference between -O2 and -O3 for gcc 11 doesn't indicate miscompiles, but the difference also doesn't seem so significant for performance that it's worth risking. Link: https://lore.kernel.org/lkml/CAHk-=wjuoGyxDhAF8SsrTkN0-YfCx7E6jUN3ikC_tn2AKWTTsA@mail.gmail.com/ Link: https://lore.kernel.org/lkml/CAHmME9otB5Wwxp7H8bR_i2uH2esEMvoBMC8uEXBMH9p0q1s6Bw@mail.gmail.com/ Reported-by: Linus Torvalds Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit f8873d11d4121aad35024f9379e431e0c83abead Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:31 2021 +0200 wireguard: selftests: make sure rp_filter is disabled on vethc Some distros may enable strict rp_filter by default, which will prevent vethc from receiving the packets with an unrouteable reverse path address. Reported-by: Hangbin Liu Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit acf2492b51c9a3c4dfb947f4d3477a86d315150f Author: Jason A. Donenfeld Date: Fri Jun 4 17:17:30 2021 +0200 wireguard: selftests: remove old conntrack kconfig value On recent kernels, this config symbol is no longer used. Reported-by: Rui Salvaterra Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") Cc: stable@vger.kernel.org Signed-off-by: Jason A. Donenfeld Signed-off-by: David S. Miller commit 57648e860485de39c800a89f849fdd03c2d31d15 Author: Roja Rani Yarubandi Date: Tue May 25 18:40:51 2021 +0530 i2c: qcom-geni: Suspend and resume the bus during SYSTEM_SLEEP_PM ops Mark bus as suspended during system suspend to block the future transfers. Implement geni_i2c_resume_noirq() to resume the bus. Fixes: 37692de5d523 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller") Signed-off-by: Roja Rani Yarubandi Reviewed-by: Stephen Boyd Signed-off-by: Wolfram Sang commit 9f78c607600ce4f2a952560de26534715236f612 Author: Roja Rani Yarubandi Date: Tue May 25 18:40:50 2021 +0530 i2c: qcom-geni: Add shutdown callback for i2c If the hardware is still accessing memory after SMMU translation is disabled (as part of smmu shutdown callback), then the IOVAs (I/O virtual address) which it was using will go on the bus as the physical addresses which will result in unknown crashes like NoC/interconnect errors. So, implement shutdown callback for i2c driver to suspend the bus during system "reboot" or "shutdown". Fixes: 37692de5d523 ("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller") Signed-off-by: Roja Rani Yarubandi Reviewed-by: Stephen Boyd Signed-off-by: Wolfram Sang commit 701b54bcb7d0d72ee3f032afc900608708409be0 Author: Mykola Kostenok Date: Thu Jun 3 20:28:27 2021 +0300 platform/mellanox: mlxreg-hotplug: Revert "move to use request_irq by IRQF_NO_AUTOEN flag" It causes mlxreg-hotplug probing failure: request_threaded_irq() returns -EINVAL due to true value of condition: ((irqflags & IRQF_SHARED) && (irqflags & IRQF_NO_AUTOEN)) after flag "IRQF_NO_AUTOEN" has been added to: err = devm_request_irq(&pdev->dev, priv->irq, mlxreg_hotplug_irq_handler, IRQF_TRIGGER_FALLING | IRQF_SHARED | IRQF_NO_AUTOEN, "mlxreg-hotplug", priv); This reverts commit bee3ecfed0fc ("platform/mellanox: mlxreg-hotplug: move to use request_irq by IRQF_NO_AUTOEN flag"). Signed-off-by: Mykola Kostenok Acked-by: Vadim Pasternak Link: https://lore.kernel.org/r/20210603172827.2599908-1-c_mykolak@nvidia.com Signed-off-by: Hans de Goede commit 6325ce1542bcee2813558e12055794b7a40d4615 Author: Maximilian Luz Date: Fri Jun 4 15:25:40 2021 +0200 platform/surface: dtx: Add missing mutex_destroy() call in failure path When we fail to open the device file due to DTX being shut down, the mutex is initialized but never destroyed. We are destroying it when releasing the file, so add the missing call in the failure path as well. Fixes: 1d609992832e ("platform/surface: Add DTX driver") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210604132540.533036-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 16f0596fc1d78a1f3ae4628cff962bb297dc908c Merge: 3a3c5ab3d6988 b8b90c1760268 Author: Linus Torvalds Date: Fri Jun 4 10:13:20 2021 -0700 Merge tag 'sound-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A couple of small fixes are found in the ALSA core side at this time; a fix in the new LED handling code and a long-standing (and likely no one would notice) ioctl bug. The rest are usual HD-audio fixes, mostly device-specific quirks but also one major regression fix that was introduced in 5.13" * tag 'sound-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: update the power_state during the direct-complete ALSA: timer: Fix master timer notification ALSA: control led: fix memory leak in snd_ctl_led_register ALSA: hda: Fix for mute key LED for HP Pavilion 15-CK0xx ALSA: hda/cirrus: Set Initial DMIC volume to -26 dB ALSA: hda: Fix a regression in Capture Switch mixer read ALSA: hda: Add AlderLake-M PCI ID commit 009767dbf42ac0dbe3cf48c1ee224f6b778aa85a Author: Pu Wen Date: Wed Jun 2 15:02:07 2021 +0800 x86/sev: Check SME/SEV support in CPUID first The first two bits of the CPUID leaf 0x8000001F EAX indicate whether SEV or SME is supported, respectively. It's better to check whether SEV or SME is actually supported before accessing the MSR_AMD64_SEV to check whether SEV or SME is enabled. This is both a bare-metal issue and a guest/VM issue. Since the first generation Hygon Dhyana CPU doesn't support the MSR_AMD64_SEV, reading that MSR results in a #GP - either directly from hardware in the bare-metal case or via the hypervisor (because the RDMSR is actually intercepted) in the guest/VM case, resulting in a failed boot. And since this is very early in the boot phase, rdmsrl_safe()/native_read_msr_safe() can't be used. So check the CPUID bits first, before accessing the MSR. [ tlendacky: Expand and improve commit message. ] [ bp: Massage commit message. ] Fixes: eab696d8e8b9 ("x86/sev: Do not require Hypervisor CPUID bit for SEV guests") Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Acked-by: Tom Lendacky Cc: # v5.10+ Link: https://lkml.kernel.org/r/20210602070207.2480-1-puwen@hygon.cn commit 3a3c5ab3d6988afdcd63f3fc8e33d157ca1d9c67 Merge: f88cd3fb9df22 37e2f2e800dc6 Author: Linus Torvalds Date: Fri Jun 4 09:30:23 2021 -0700 Merge tag 'drm-fixes-2021-06-04-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Two big regression reverts in here, one for fbdev and one i915. Otherwise it's mostly amdgpu display fixes, and tegra fixes. fb: - revert broken fb_defio patch amdgpu: - Display fixes - FRU EEPROM error handling fix - RAS fix - PSP fix - Releasing pinned BO fix i915: - Revert conversion to io_mapping_map_user() which lead to BUG_ON() - Fix check for error valued returns in a selftest tegra: - SOR power domain race condition fix - build warning fix - runtime pm ref leak fix - modifier fix" * tag 'drm-fixes-2021-06-04-1' of git://anongit.freedesktop.org/drm/drm: amd/display: convert DRM_DEBUG_ATOMIC to drm_dbg_atomic drm/amdgpu: make sure we unpin the UVD BO drm/amd/amdgpu:save psp ring wptr to avoid attack drm/amd/display: Fix potential memory leak in DMUB hw_init drm/amdgpu: Don't query CE and UE errors drm/amd/display: Fix overlay validation by considering cursors drm/amdgpu: refine amdgpu_fru_get_product_info drm/amdgpu: add judgement for dc support drm/amd/display: Fix GPU scaling regression by FS video support drm/amd/display: Allow bandwidth validation for 0 streams. Revert "i915: use io_mapping_map_user" drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest() Revert "fb_defio: Remove custom address_space_operations" drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT drm/tegra: sor: Fix AUX device reference leak drm/tegra: Get ref for DP AUX channel, not its ddc adapter drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update drm/tegra: sor: Fully initialize SOR before registration gpu: host1x: Split up client initalization and registration drm/tegra: sor: Do not leak runtime PM reference commit 519d8ab17682da5f2fae5941d906d85b9fd3593a Author: Geert Uytterhoeven Date: Wed May 19 21:43:50 2021 +0200 virtchnl: Add missing padding to virtchnl_proto_hdrs On m68k (Coldfire M547x): CC drivers/net/ethernet/intel/i40e/i40e_main.o In file included from drivers/net/ethernet/intel/i40e/i40e_prototype.h:9, from drivers/net/ethernet/intel/i40e/i40e.h:41, from drivers/net/ethernet/intel/i40e/i40e_main.c:12: include/linux/avf/virtchnl.h:153:36: warning: division by zero [-Wdiv-by-zero] 153 | { virtchnl_static_assert_##X = (n)/((sizeof(struct X) == (n)) ? 1 : 0) } | ^ include/linux/avf/virtchnl.h:844:1: note: in expansion of macro ‘VIRTCHNL_CHECK_STRUCT_LEN’ 844 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs); | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/avf/virtchnl.h:844:33: error: enumerator value for ‘virtchnl_static_assert_virtchnl_proto_hdrs’ is not an integer constant 844 | VIRTCHNL_CHECK_STRUCT_LEN(2312, virtchnl_proto_hdrs); | ^~~~~~~~~~~~~~~~~~~ On m68k, integers are aligned on addresses that are multiples of two, not four, bytes. Hence the size of a structure containing integers may not be divisible by 4. Fix this by adding explicit padding. Fixes: 1f7ea1cd6a374842 ("ice: Enable FDIR Configure for AVF") Reported-by: kernel test robot Signed-off-by: Geert Uytterhoeven Acked-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit f9f83202b7263ac371d616d6894a2c9ed79158ef Author: Dave Ertman Date: Wed May 5 14:17:59 2021 -0700 ice: Allow all LLDP packets from PF to Tx Currently in the ice driver, the check whether to allow a LLDP packet to egress the interface from the PF_VSI is being based on the SKB's priority field. It checks to see if the packets priority is equal to TC_PRIO_CONTROL. Injected LLDP packets do not always meet this condition. SCAPY defaults to a sk_buff->protocol value of ETH_P_ALL (0x0003) and does not set the priority field. There will be other injection methods (even ones used by end users) that will not correctly configure the socket so that SKB fields are correctly populated. Then ethernet header has to have to correct value for the protocol though. Add a check to also allow packets whose ethhdr->h_proto matches ETH_P_LLDP (0x88CC). Fixes: 0c3a6101ff2d ("ice: Allow egress control packets from PF_VSI") Signed-off-by: Dave Ertman Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 5cd349c349d6ec52862e550d3576893d35ab8ac2 Author: Paul Greenwalt Date: Wed May 5 14:17:58 2021 -0700 ice: report supported and advertised autoneg using PHY capabilities Ethtool incorrectly reported supported and advertised auto-negotiation settings for a backplane PHY image which did not support auto-negotiation. This can occur when using media or PHY type for reporting ethtool supported and advertised auto-negotiation settings. Remove setting supported and advertised auto-negotiation settings based on PHY type in ice_phy_type_to_ethtool(), and MAC type in ice_get_link_ksettings(). Ethtool supported and advertised auto-negotiation settings should be based on the PHY image using the AQ command get PHY capabilities with media. Add setting supported and advertised auto-negotiation settings based get PHY capabilities with media in ice_get_link_ksettings(). Fixes: 48cb27f2fd18 ("ice: Implement handlers for ethtool PHY/link operations") Signed-off-by: Paul Greenwalt Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit c7ee6ce1cf60b7fcdbdd2354d377d00bae3fa2d2 Author: Haiyue Wang Date: Fri Feb 26 13:19:31 2021 -0800 ice: handle the VF VSI rebuild failure VSI rebuild can be failed for LAN queue config, then the VF's VSI will be NULL, the VF reset should be stopped with the VF entering into the disable state. Fixes: 12bb018c538c ("ice: Refactor VF reset") Signed-off-by: Haiyue Wang Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 8679f07a9922068b9b6be81b632f52cac45d1b91 Author: Brett Creeley Date: Fri Feb 26 13:19:21 2021 -0800 ice: Fix VFR issues for AVF drivers that expect ATQLEN cleared Some AVF drivers expect the VF_MBX_ATQLEN register to be cleared for any type of VFR/VFLR. Fix this by clearing the VF_MBX_ATQLEN register at the same time as VF_MBX_ARQLEN. Fixes: 82ba01282cf8 ("ice: clear VF ARQLEN register on reset") Signed-off-by: Brett Creeley Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit f0457690af56673cb0c47af6e25430389a149225 Author: Brett Creeley Date: Fri Feb 26 13:19:20 2021 -0800 ice: Fix allowing VF to request more/less queues via virtchnl Commit 12bb018c538c ("ice: Refactor VF reset") caused a regression that removes the ability for a VF to request a different amount of queues via VIRTCHNL_OP_REQUEST_QUEUES. This prevents VF drivers to either increase or decrease the number of queue pairs they are allocated. Fix this by using the variable vf->num_req_qs when determining the vf->num_vf_qs during VF VSI creation. Fixes: 12bb018c538c ("ice: Refactor VF reset") Signed-off-by: Brett Creeley Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 67069a1f0fe5f9eeca86d954fff2087f5542a008 Author: Riccardo Mancini Date: Thu Jun 3 00:40:23 2021 +0200 perf env: Fix memory leak of bpf_prog_info_linear member ASan reported a memory leak caused by info_linear not being deallocated. The info_linear was allocated during in perf_event__synthesize_one_bpf_prog(). This patch adds the corresponding free() when bpf_prog_info_node is freed in perf_env__purge_bpf(). $ sudo ./perf record -- sleep 5 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.025 MB perf.data (8 samples) ] ================================================================= ==297735==ERROR: LeakSanitizer: detected memory leaks Direct leak of 7688 byte(s) in 19 object(s) allocated from: #0 0x4f420f in malloc (/home/user/linux/tools/perf/perf+0x4f420f) #1 0xc06a74 in bpf_program__get_prog_info_linear /home/user/linux/tools/lib/bpf/libbpf.c:11113:16 #2 0xb426fe in perf_event__synthesize_one_bpf_prog /home/user/linux/tools/perf/util/bpf-event.c:191:16 #3 0xb42008 in perf_event__synthesize_bpf_events /home/user/linux/tools/perf/util/bpf-event.c:410:9 #4 0x594596 in record__synthesize /home/user/linux/tools/perf/builtin-record.c:1490:8 #5 0x58c9ac in __cmd_record /home/user/linux/tools/perf/builtin-record.c:1798:8 #6 0x58990b in cmd_record /home/user/linux/tools/perf/builtin-record.c:2901:8 #7 0x7b2a20 in run_builtin /home/user/linux/tools/perf/perf.c:313:11 #8 0x7b12ff in handle_internal_command /home/user/linux/tools/perf/perf.c:365:8 #9 0x7b2583 in run_argv /home/user/linux/tools/perf/perf.c:409:2 #10 0x7b0d79 in main /home/user/linux/tools/perf/perf.c:539:3 #11 0x7fa357ef6b74 in __libc_start_main /usr/src/debug/glibc-2.33-8.fc34.x86_64/csu/../csu/libc-start.c:332:16 Signed-off-by: Riccardo Mancini Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko 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/20210602224024.300485-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 5405b42c2f08efe67b531799ba2fdb35bac93e70 Author: Jiashuo Liang Date: Tue Jun 1 16:52:03 2021 +0800 x86/fault: Don't send SIGSEGV twice on SEGV_PKUERR __bad_area_nosemaphore() calls both force_sig_pkuerr() and force_sig_fault() when handling SEGV_PKUERR. This does not cause problems because the second signal is filtered by the legacy_queue() check in __send_signal() because in both cases, the signal is SIGSEGV, the second one seeing that the first one is already pending. This causes the kernel to do unnecessary work so send the signal only once for SEGV_PKUERR. [ bp: Massage commit message. ] Fixes: 9db812dbb29d ("signal/x86: Call force_sig_pkuerr from __bad_area_nosemaphore") Suggested-by: "Eric W. Biederman" Signed-off-by: Jiashuo Liang Signed-off-by: Borislav Petkov Acked-by: "Eric W. Biederman" Link: https://lkml.kernel.org/r/20210601085203.40214-1-liangjs@pku.edu.cn commit 69c9ffed6cede9c11697861f654946e3ae95a930 Author: Riccardo Mancini Date: Thu Jun 3 00:08:33 2021 +0200 perf symbol-elf: Fix memory leak by freeing sdt_note.args Reported by ASan. Signed-off-by: Riccardo Mancini Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Fabian Hemmer Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Remi Bernon Cc: Jiri Slaby Link: http://lore.kernel.org/lkml/20210602220833.285226-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 3cc84399e9b60463bc39cf352ffd8bccb92e02bd Author: Namhyung Kim Date: Wed Jun 2 14:22:41 2021 -0700 perf stat: Honor event config name on --no-merge If user gave an event name explicitly, it should be displayed in the output as is. But with --no-merge option it adds a pmu name at the end so might confuse users. Actually this is true for hybrid pmus, I think we should do the same for others. Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210602212241.2175005-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2dc065eae56df804e4da5f8a9e4139033f7ea605 Author: Namhyung Kim Date: Wed Jun 2 14:22:40 2021 -0700 perf evsel: Add missing cloning of evsel->use_config_name The evsel__clone() should copy all fields in the evsel which are set during the event parsing. But it missed the use_config_name field. Fixes: 12279429d862 ("perf stat: Uniquify hybrid event name") Signed-off-by: Namhyung Kim Acked-by: Ian Rogers Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210602212241.2175005-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit f501b6a2312e27fffe671d461770426fe5162184 Author: Dietmar Eggemann Date: Thu May 27 11:11:05 2021 +0200 debugfs: Fix debugfs_read_file_str() Read the entire size of the buffer, including the trailing new line character. Discovered while reading the sched domain names of CPU0: before: cat /sys/kernel/debug/sched/domains/cpu0/domain*/name SMTMCDIE after: cat /sys/kernel/debug/sched/domains/cpu0/domain*/name SMT MC DIE Fixes: 9af0440ec86eb ("debugfs: Implement debugfs_create_str()") Reviewed-by: Steven Rostedt (VMware) Acked-by: Peter Zijlstra (Intel) Signed-off-by: Dietmar Eggemann Link: https://lore.kernel.org/r/20210527091105.258457-1-dietmar.eggemann@arm.com Signed-off-by: Greg Kroah-Hartman commit 49783c6f4a4f49836b5a109ae0daf2f90b0d7713 Author: Oder Chiou Date: Fri Jun 4 14:31:50 2021 +0800 ASoC: rt5682: Fix the fast discharge for headset unplugging in soundwire mode Based on ("5a15cd7fce20b1fd4aece6a0240e2b58cd6a225d"), the setting also should be set in soundwire mode. Signed-off-by: Oder Chiou Link: https://lore.kernel.org/r/20210604063150.29925-1-oder_chiou@realtek.com Signed-off-by: Mark Brown commit 6fc1db5e6211e30fbb1cee8d7925d79d4ed2ae14 Author: Wesley Cheng Date: Fri May 21 17:44:21 2021 -0700 usb: gadget: f_fs: Ensure io_completion_wq is idle during unbind During unbind, ffs_func_eps_disable() will be executed, resulting in completion callbacks for any pending USB requests. When using AIO, irrespective of the completion status, io_data work is queued to io_completion_wq to evaluate and handle the completed requests. Since work runs asynchronously to the unbind() routine, there can be a scenario where the work runs after the USB gadget has been fully removed, resulting in accessing of a resource which has been already freed. (i.e. usb_ep_free_request() accessing the USB ep structure) Explicitly drain the io_completion_wq, instead of relying on the destroy_workqueue() (in ffs_data_put()) to make sure no pending completion work items are running. Signed-off-by: Wesley Cheng Cc: stable Link: https://lore.kernel.org/r/1621644261-1236-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 024236abeba8194c23affedaaa8b1aee7b943890 Author: Li Jun Date: Wed Jun 2 17:57:09 2021 +0800 usb: typec: tcpm: cancel send discover hrtimer when unregister tcpm port Like the state_machine_timer, we should also cancel possible pending send discover identity hrtimer when unregister tcpm port. Fixes: c34e85fa69b9 ("usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work") Reviewed-by: Guenter Roeck Cc: stable Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1622627829-11070-3-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 7ade4805e296c8d1e40c842395bbe478c7210555 Author: Li Jun Date: Wed Jun 2 17:57:08 2021 +0800 usb: typec: tcpm: cancel frs hrtimer when unregister tcpm port Like the state_machine_timer, we should also cancel possible pending frs hrtimer when unregister tcpm port. Fixes: 8dc4bd073663 ("usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)") Cc: stable Reviewed-by: Guenter Roeck Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1622627829-11070-2-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 3a13ff7ef4349d70d1d18378d661117dd5af8efe Author: Li Jun Date: Wed Jun 2 17:57:07 2021 +0800 usb: typec: tcpm: cancel vdm and state machine hrtimer when unregister tcpm port A pending hrtimer may expire after the kthread_worker of tcpm port is destroyed, see below kernel dump when do module unload, fix it by cancel the 2 hrtimers. [ 111.517018] Unable to handle kernel paging request at virtual address ffff8000118cb880 [ 111.518786] blk_update_request: I/O error, dev sda, sector 60061185 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 [ 111.526594] Mem abort info: [ 111.526597] ESR = 0x96000047 [ 111.526600] EC = 0x25: DABT (current EL), IL = 32 bits [ 111.526604] SET = 0, FnV = 0 [ 111.526607] EA = 0, S1PTW = 0 [ 111.526610] Data abort info: [ 111.526612] ISV = 0, ISS = 0x00000047 [ 111.526615] CM = 0, WnR = 1 [ 111.526619] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000041d75000 [ 111.526623] [ffff8000118cb880] pgd=10000001bffff003, p4d=10000001bffff003, pud=10000001bfffe003, pmd=10000001bfffa003, pte=0000000000000000 [ 111.526642] Internal error: Oops: 96000047 [#1] PREEMPT SMP [ 111.526647] Modules linked in: dwc3_imx8mp dwc3 phy_fsl_imx8mq_usb [last unloaded: tcpci] [ 111.526663] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.13.0-rc4-00927-gebbe9dbd802c-dirty #36 [ 111.526670] Hardware name: NXP i.MX8MPlus EVK board (DT) [ 111.526674] pstate: 800000c5 (Nzcv daIF -PAN -UAO -TCO BTYPE=--) [ 111.526681] pc : queued_spin_lock_slowpath+0x1a0/0x390 [ 111.526695] lr : _raw_spin_lock_irqsave+0x88/0xb4 [ 111.526703] sp : ffff800010003e20 [ 111.526706] x29: ffff800010003e20 x28: ffff00017f380180 [ 111.537156] buffer_io_error: 6 callbacks suppressed [ 111.537162] Buffer I/O error on dev sda1, logical block 60040704, async page read [ 111.539932] x27: ffff00017f3801c0 [ 111.539938] x26: ffff800010ba2490 x25: 0000000000000000 x24: 0000000000000001 [ 111.543025] blk_update_request: I/O error, dev sda, sector 60061186 op 0x0:(READ) flags 0x0 phys_seg 7 prio class 0 [ 111.548304] [ 111.548306] x23: 00000000000000c0 x22: ffff0000c2a9f184 x21: ffff00017f380180 [ 111.551374] Buffer I/O error on dev sda1, logical block 60040705, async page read [ 111.554499] [ 111.554503] x20: ffff0000c5f14210 x19: 00000000000000c0 x18: 0000000000000000 [ 111.557391] Buffer I/O error on dev sda1, logical block 60040706, async page read [ 111.561218] [ 111.561222] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 [ 111.564205] Buffer I/O error on dev sda1, logical block 60040707, async page read [ 111.570887] x14: 00000000000000f5 x13: 0000000000000001 x12: 0000000000000040 [ 111.570902] x11: ffff0000c05ac6d8 [ 111.583420] Buffer I/O error on dev sda1, logical block 60040708, async page read [ 111.588978] x10: 0000000000000000 x9 : 0000000000040000 [ 111.588988] x8 : 0000000000000000 [ 111.597173] Buffer I/O error on dev sda1, logical block 60040709, async page read [ 111.605766] x7 : ffff00017f384880 x6 : ffff8000118cb880 [ 111.605777] x5 : ffff00017f384880 [ 111.611094] Buffer I/O error on dev sda1, logical block 60040710, async page read [ 111.617086] x4 : 0000000000000000 x3 : ffff0000c2a9f184 [ 111.617096] x2 : ffff8000118cb880 [ 111.622242] Buffer I/O error on dev sda1, logical block 60040711, async page read [ 111.626927] x1 : ffff8000118cb880 x0 : ffff00017f384888 [ 111.626938] Call trace: [ 111.626942] queued_spin_lock_slowpath+0x1a0/0x390 [ 111.795809] kthread_queue_work+0x30/0xc0 [ 111.799828] state_machine_timer_handler+0x20/0x30 [ 111.804624] __hrtimer_run_queues+0x140/0x1e0 [ 111.808990] hrtimer_interrupt+0xec/0x2c0 [ 111.813004] arch_timer_handler_phys+0x38/0x50 [ 111.817456] handle_percpu_devid_irq+0x88/0x150 [ 111.821991] __handle_domain_irq+0x80/0xe0 [ 111.826093] gic_handle_irq+0xc0/0x140 [ 111.829848] el1_irq+0xbc/0x154 [ 111.832991] arch_cpu_idle+0x1c/0x2c [ 111.836572] default_idle_call+0x24/0x6c [ 111.840497] do_idle+0x238/0x2ac [ 111.843729] cpu_startup_entry+0x2c/0x70 [ 111.847657] rest_init+0xdc/0xec [ 111.850890] arch_call_rest_init+0x14/0x20 [ 111.854988] start_kernel+0x508/0x540 [ 111.858659] Code: 910020e0 8b0200c2 f861d884 aa0203e1 (f8246827) [ 111.864760] ---[ end trace 308b9a4a3dcb73ac ]--- [ 111.869381] Kernel panic - not syncing: Oops: Fatal exception in interrupt [ 111.876258] SMP: stopping secondary CPUs [ 111.880185] Kernel Offset: disabled [ 111.883673] CPU features: 0x00001001,20000846 [ 111.888031] Memory Limit: none [ 111.891090] ---[ end Kernel panic - not syncing: Oops: Fatal exception in interrupt ]--- Fixes: 3ed8e1c2ac99 ("usb: typec: tcpm: Migrate workqueue to RT priority for processing events") Cc: stable Reviewed-by: Guenter Roeck Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1622627829-11070-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 063933f47a7af01650af9c4fbcc5831f1c4eb7d9 Author: Kyle Tso Date: Tue Jun 1 00:49:28 2021 +0800 usb: typec: tcpm: Properly handle Alert and Status Messages When receiving Alert Message, if it is not unexpected but is unsupported for some reason, the port should return Not_Supported Message response. Also, according to PD3.0 Spec 6.5.2.1.4 Event Flags Field, the OTP/OVP/OCP flags in the Event Flags field in Status Message no longer require Get_PPS_Status Message to clear them. Thus remove it when receiving Status Message with those flags being set. In addition, add the missing AMS operations for Status Message. Fixes: 64f7c494a3c0 ("typec: tcpm: Add support for sink PPS related messages") Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance") Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210531164928.2368606-1-kyletso@google.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit aefd7f7065567a4666f42c0fc8cdb379d2e036bf Author: Nikolay Borisov Date: Mon May 31 12:26:01 2021 +0300 btrfs: promote debugging asserts to full-fledged checks in validate_super Syzbot managed to trigger this assert while performing its fuzzing. Turns out it's better to have those asserts turned into full-fledged checks so that in case buggy btrfs images are mounted the users gets an error and mounting is stopped. Alternatively with CONFIG_BTRFS_ASSERT disabled such image would have been erroneously allowed to be mounted. Reported-by: syzbot+a6bf271c02e4fe66b4e4@syzkaller.appspotmail.com CC: stable@vger.kernel.org # 5.4+ Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ add uuids to the messages ] Signed-off-by: David Sterba commit e7b2ec3d3d4ebeb4cff7ae45cf430182fa6a49fb Author: Ritesh Harjani Date: Sun May 30 20:24:05 2021 +0530 btrfs: return value from btrfs_mark_extent_written() in case of error We always return 0 even in case of an error in btrfs_mark_extent_written(). Fix it to return proper error value in case of a failure. All callers handle it. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Ritesh Harjani Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5b434df8778771d181bc19fb4593bca114d1c4eb Author: Naohiro Aota Date: Thu May 27 15:27:32 2021 +0900 btrfs: zoned: fix zone number to sector/physical calculation In btrfs_get_dev_zone_info(), we have "u32 sb_zone" and calculate "sector_t sector" by shifting it. But, this "sector" is calculated in 32bit, leading it to be 0 for the 2nd superblock copy. Since zone number is u32, shifting it to sector (sector_t) or physical address (u64) can easily trigger a missing cast bug like this. This commit introduces helpers to convert zone number to sector/LBA, so we won't fall into the same pitfall again. Reported-by: Dmitry Fomichev Fixes: 12659251ca5d ("btrfs: implement log-structured superblock for ZONED mode") CC: stable@vger.kernel.org # 5.11+ Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Reviewed-by: David Sterba Signed-off-by: David Sterba commit 165ea85f14831f27fc6fe3b02b35e42e50b9ed94 Author: Josef Bacik Date: Wed May 19 17:15:53 2021 -0400 btrfs: do not write supers if we have an fs error Error injection testing uncovered a pretty severe problem where we could end up committing a super that pointed to the wrong tree roots, resulting in transid mismatch errors. The way we commit the transaction is we update the super copy with the current generations and bytenrs of the important roots, and then copy that into our super_for_commit. Then we allow transactions to continue again, we write out the dirty pages for the transaction, and then we write the super. If the write out fails we'll bail and skip writing the supers. However since we've allowed a new transaction to start, we can have a log attempting to sync at this point, which would be blocked on fs_info->tree_log_mutex. Once the commit fails we're allowed to do the log tree commit, which uses super_for_commit, which now points at fs tree's that were not written out. Fix this by checking BTRFS_FS_STATE_ERROR once we acquire the tree_log_mutex. This way if the transaction commit fails we're sure to see this bit set and we can skip writing the super out. This patch fixes this specific transid mismatch error I was seeing with this particular error path. CC: stable@vger.kernel.org # 5.12+ Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4d2aa178d2ad2fb156711113790dde13e9aa2376 Author: Neil Armstrong Date: Tue Jun 1 10:48:30 2021 +0200 usb: dwc3-meson-g12a: fix usb2 PHY glue init when phy0 is disabled When only PHY1 is used (for example on Odroid-HC4), the regmap init code uses the usb2 ports when doesn't initialize the PHY1 regmap entry. This fixes: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 ... pc : regmap_update_bits_base+0x40/0xa0 lr : dwc3_meson_g12a_usb2_init_phy+0x4c/0xf8 ... Call trace: regmap_update_bits_base+0x40/0xa0 dwc3_meson_g12a_usb2_init_phy+0x4c/0xf8 dwc3_meson_g12a_usb2_init+0x7c/0xc8 dwc3_meson_g12a_usb_init+0x28/0x48 dwc3_meson_g12a_probe+0x298/0x540 platform_probe+0x70/0xe0 really_probe+0xf0/0x4d8 driver_probe_device+0xfc/0x168 ... Fixes: 013af227f58a97 ("usb: dwc3: meson-g12a: handle the phy and glue registers separately") Reviewed-by: Martin Blumenstingl Signed-off-by: Neil Armstrong Cc: stable Link: https://lore.kernel.org/r/20210601084830.260196-1-narmstrong@baylibre.com Signed-off-by: Greg Kroah-Hartman commit 1d0d3d818eafe1963ec1eaf302175cd14938188e Author: Christophe JAILLET Date: Fri May 21 18:55:50 2021 +0200 usb: dwc3: meson-g12a: Disable the regulator in the error handling path of the probe If an error occurs after a successful 'regulator_enable()' call, 'regulator_disable()' must be called. Fix the error handling path of the probe accordingly. The remove function doesn't need to be fixed, because the 'regulator_disable()' call is already hidden in 'dwc3_meson_g12a_suspend()' which is called via 'pm_runtime_set_suspended()' in the remove function. Fixes: c99993376f72 ("usb: dwc3: Add Amlogic G12A DWC3 glue") Reviewed-by: Martin Blumenstingl Acked-by: Neil Armstrong Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/79df054046224bbb0716a8c5c2082650290eec86.1621616013.git.christophe.jaillet@wanadoo.fr Cc: stable Signed-off-by: Greg Kroah-Hartman commit 757d2e6065164ae406da3e64458426213c884017 Merge: 8124c8a6b3538 d1ce245fe4092 Author: Greg Kroah-Hartman Date: Fri Jun 4 11:43:33 2021 +0200 Merge tag 'phy-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-linus Vinod writes: phy: fixes for 5.13 Phy driver fixes for few drivers: cadence, mtk-tphy, sparx5, wiz mostly fixing error code and checking return codes etc * tag 'phy-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: phy: Sparx5 Eth SerDes: check return value after calling platform_get_resource() phy: ralink: phy-mt7621-pci: drop 'of_match_ptr' to fix -Wunused-const-variable phy: ti: Fix an error code in wiz_probe() phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init() phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe() phy: usb: Fix misuse of IS_ENABLED commit 80137c18737c30d20ee630e442405236d96898a7 Author: Kyle Tso Date: Tue Jun 1 20:31:51 2021 +0800 usb: typec: tcpm: Fix misuses of AMS invocation tcpm_ams_start is used to initiate an AMS as well as checking Collision Avoidance conditions but not for flagging passive AMS (initiated by the port partner). Fix the misuses of tcpm_ams_start in tcpm_pd_svdm. ATTENTION doesn't need responses so the AMS flag is not needed here. Fixes: 0bc3ee92880d ("usb: typec: tcpm: Properly interrupt VDM AMS") Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210601123151.3441914-5-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 7ac505103572548fd8a50a49b2c22e1588901731 Author: Kyle Tso Date: Tue Jun 1 20:31:50 2021 +0800 usb: typec: tcpm: Introduce snk_vdo_v1 for SVDM version 1.0 The ID Header VDO and Product VDOs defined in USB PD Spec rev 2.0 and rev 3.1 are quite different. Add an additional array snk_vdo_v1 and send it as the response to the port partner if it only supports SVDM version 1.0. Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210601123151.3441914-4-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 55b54c269beef13d88dc30544df34763a90dc815 Author: Kyle Tso Date: Tue Jun 1 20:31:49 2021 +0800 dt-bindings: connector: Add PD rev 2.0 VDO definition Add the VDO definition for USB PD rev 2.0 in the bindings and define a new property snk-vdos-v1 containing legacy VDOs as the responses to the port partner which only supports PD rev 2.0. Reviewed-by: Rob Herring Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210601123151.3441914-3-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit f41bfc7e9c7c1d721c8752f1853cde43e606ad43 Author: Kyle Tso Date: Tue Jun 1 20:31:48 2021 +0800 usb: typec: tcpm: Correct the responses in SVDM Version 2.0 DFP In USB PD Spec Rev 3.1 Ver 1.0, section "6.12.5 Applicability of Structured VDM Commands", DFP is allowed and recommended to respond to Discovery Identity with ACK. And in section "6.4.4.2.5.1 Commands other than Attention", NAK should be returned only when receiving Messages with invalid fields, Messages in wrong situation, or unrecognize Messages. Still keep the original design for SVDM Version 1.0 for backward compatibilities. Fixes: 193a68011fdc ("staging: typec: tcpm: Respond to Discover Identity commands") Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210601123151.3441914-2-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 8f11fe7e40683f8986aff8f1a46361ceca8f42ec Author: Alexandru Elisei Date: Thu Jun 3 16:17:42 2021 +0100 Revert "usb: dwc3: core: Add shutdown callback for dwc3" This reverts commit 568262bf5492a9bb2fcc4c204b8d38fd6be64e28. The commit causes the following panic when shutting down a rockpro64-v2 board: [..] [ 41.684569] xhci-hcd xhci-hcd.2.auto: USB bus 1 deregistered [ 41.686301] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a0 [ 41.687096] Mem abort info: [ 41.687345] ESR = 0x96000004 [ 41.687615] EC = 0x25: DABT (current EL), IL = 32 bits [ 41.688082] SET = 0, FnV = 0 [ 41.688352] EA = 0, S1PTW = 0 [ 41.688628] Data abort info: [ 41.688882] ISV = 0, ISS = 0x00000004 [ 41.689219] CM = 0, WnR = 0 [ 41.689481] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000073b2000 [ 41.690046] [00000000000000a0] pgd=0000000000000000, p4d=0000000000000000 [ 41.690654] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 41.691143] Modules linked in: [ 41.691416] CPU: 5 PID: 1 Comm: shutdown Not tainted 5.13.0-rc4 #43 [ 41.691966] Hardware name: Pine64 RockPro64 v2.0 (DT) [ 41.692409] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--) [ 41.692937] pc : down_read_interruptible+0xec/0x200 [ 41.693373] lr : simple_recursive_removal+0x48/0x280 [ 41.693815] sp : ffff800011fab910 [ 41.694107] x29: ffff800011fab910 x28: ffff0000008fe480 x27: ffff0000008fe4d8 [ 41.694736] x26: ffff800011529a90 x25: 00000000000000a0 x24: ffff800011edd030 [ 41.695364] x23: 0000000000000080 x22: 0000000000000000 x21: ffff800011f23994 [ 41.695992] x20: ffff800011f23998 x19: ffff0000008fe480 x18: ffffffffffffffff [ 41.696620] x17: 000c0400bb44ffff x16: 0000000000000009 x15: ffff800091faba3d [ 41.697248] x14: 0000000000000004 x13: 0000000000000000 x12: 0000000000000020 [ 41.697875] x11: 0101010101010101 x10: 7f7f7f7f7f7f7f7f x9 : 6f6c746364716e62 [ 41.698502] x8 : 7f7f7f7f7f7f7f7f x7 : fefefeff6364626d x6 : 0000000000000440 [ 41.699130] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 00000000000000a0 [ 41.699758] x2 : 0000000000000001 x1 : 0000000000000000 x0 : 00000000000000a0 [ 41.700386] Call trace: [ 41.700602] down_read_interruptible+0xec/0x200 [ 41.701003] debugfs_remove+0x5c/0x80 [ 41.701328] dwc3_debugfs_exit+0x1c/0x6c [ 41.701676] dwc3_remove+0x34/0x1a0 [ 41.701988] platform_remove+0x28/0x60 [ 41.702322] __device_release_driver+0x188/0x22c [ 41.702730] device_release_driver+0x2c/0x44 [ 41.703106] bus_remove_device+0x124/0x130 [ 41.703468] device_del+0x16c/0x424 [ 41.703777] platform_device_del.part.0+0x1c/0x90 [ 41.704193] platform_device_unregister+0x28/0x44 [ 41.704608] of_platform_device_destroy+0xe8/0x100 [ 41.705031] device_for_each_child_reverse+0x64/0xb4 [ 41.705470] of_platform_depopulate+0x40/0x84 [ 41.705853] __dwc3_of_simple_teardown+0x20/0xd4 [ 41.706260] dwc3_of_simple_shutdown+0x14/0x20 [ 41.706652] platform_shutdown+0x28/0x40 [ 41.706998] device_shutdown+0x158/0x330 [ 41.707344] kernel_power_off+0x38/0x7c [ 41.707684] __do_sys_reboot+0x16c/0x2a0 [ 41.708029] __arm64_sys_reboot+0x28/0x34 [ 41.708383] invoke_syscall+0x48/0x114 [ 41.708716] el0_svc_common.constprop.0+0x44/0xdc [ 41.709131] do_el0_svc+0x28/0x90 [ 41.709426] el0_svc+0x2c/0x54 [ 41.709698] el0_sync_handler+0xa4/0x130 [ 41.710045] el0_sync+0x198/0x1c0 [ 41.710342] Code: c8047c62 35ffff84 17fffe5f f9800071 (c85ffc60) [ 41.710881] ---[ end trace 406377df5178f75c ]--- [ 41.711299] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b [ 41.712084] Kernel Offset: disabled [ 41.712391] CPU features: 0x10001031,20000846 [ 41.712775] Memory Limit: none [ 41.713049] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]--- As Felipe explained: "dwc3_shutdown() is just called dwc3_remove() directly, then we end up calling debugfs_remove_recursive() twice." Reverting the commit fixes the panic. Fixes: 568262bf5492 ("usb: dwc3: core: Add shutdown callback for dwc3") Acked-by: Felipe Balbi Signed-off-by: Alexandru Elisei Link: https://lore.kernel.org/r/20210603151742.298243-1-alexandru.elisei@arm.com Signed-off-by: Greg Kroah-Hartman commit 9257bd80b917cc7908abd27ed5a5211964563f62 Author: Kyle Tso Date: Thu May 27 20:10:29 2021 +0800 dt-bindings: connector: Replace BIT macro with generic bit ops BIT macro is not defined. Replace it with generic bit operations. Fixes: 630dce2810b9 ("dt-bindings: connector: Add SVDM VDO properties") Reviewed-by: Rob Herring Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210527121029.583611-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 37e2f2e800dc6d65aa77f9d4dbc4512d841e2f0b Merge: d6273d8f31cda 671cc352acd3e Author: Dave Airlie Date: Fri Jun 4 10:23:23 2021 +1000 Merge tag 'drm/tegra/for-5.13-rc5' of ssh://git.freedesktop.org/git/tegra/linux into drm-fixes drm/tegra: Fixes for v5.13-rc5 The most important change here fixes a race condition that causes either HDA or (more frequently) display to malfunction because they race for enabling the SOR power domain at probe time. Other than that, there's a couple of build warnings for issues introduced in v5.13 as well as some minor fixes, such as reference leak plugs. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20210603144624.788861-1-thierry.reding@gmail.com commit d6273d8f31cdaa7519984951cbfab0a983f219e5 Merge: ff7a24a8fcb30 e7591a8d56bab Author: Dave Airlie Date: Fri Jun 4 09:45:15 2021 +1000 Merge tag 'amd-drm-fixes-5.13-2021-06-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.13-2021-06-02: amdgpu: - Display fixes - FRU EEPROM error handling fix - RAS fix - PSP fix - Releasing pinned BO fix Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210603040410.4080-1-alexander.deucher@amd.com commit 579028dec182c026b9a85725682f1dfbdc825eaa Merge: 1a8024239dacf 1f14a620f30b0 Author: David S. Miller Date: Thu Jun 3 15:32:21 2021 -0700 Merge tag 'for-net-2021-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth bluetooth pull request for net: - Fixes UAF and CVE-2021-3564 - Fix VIRTIO_ID_BT to use an unassigned ID - Fix firmware loading on some Intel Controllers Signed-off-by: David S. Miller commit 1a8024239dacf53fcf39c0f07fbf2712af22864f Author: Xuan Zhuo Date: Fri Jun 4 01:09:01 2021 +0800 virtio-net: fix for skb_over_panic inside big mode In virtio-net's large packet mode, there is a hole in the space behind buf. hdr_padded_len - hdr_len We must take this into account when calculating tailroom. [ 44.544385] skb_put.cold (net/core/skbuff.c:5254 (discriminator 1) net/core/skbuff.c:5252 (discriminator 1)) [ 44.544864] page_to_skb (drivers/net/virtio_net.c:485) [ 44.545361] receive_buf (drivers/net/virtio_net.c:849 drivers/net/virtio_net.c:1131) [ 44.545870] ? netif_receive_skb_list_internal (net/core/dev.c:5714) [ 44.546628] ? dev_gro_receive (net/core/dev.c:6103) [ 44.547135] ? napi_complete_done (./include/linux/list.h:35 net/core/dev.c:5867 net/core/dev.c:5862 net/core/dev.c:6565) [ 44.547672] virtnet_poll (drivers/net/virtio_net.c:1427 drivers/net/virtio_net.c:1525) [ 44.548251] __napi_poll (net/core/dev.c:6985) [ 44.548744] net_rx_action (net/core/dev.c:7054 net/core/dev.c:7139) [ 44.549264] __do_softirq (./arch/x86/include/asm/jump_label.h:19 ./include/linux/jump_label.h:200 ./include/trace/events/irq.h:142 kernel/softirq.c:560) [ 44.549762] irq_exit_rcu (kernel/softirq.c:433 kernel/softirq.c:637 kernel/softirq.c:649) [ 44.551384] common_interrupt (arch/x86/kernel/irq.c:240 (discriminator 13)) [ 44.551991] ? asm_common_interrupt (./arch/x86/include/asm/idtentry.h:638) [ 44.552654] asm_common_interrupt (./arch/x86/include/asm/idtentry.h:638) Fixes: fb32856b16ad ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom") Signed-off-by: Xuan Zhuo Reported-by: Corentin Noël Tested-by: Corentin Noël Signed-off-by: David S. Miller commit e31d57ca146bbd0a7deb7ad8c3380ffa4358e85c Merge: 821bbf79fe46a 373e864cf5240 Author: David S. Miller Date: Thu Jun 3 15:21:58 2021 -0700 Merge tag 'ieee802154-for-davem-2021-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan Stefan Schmidt says: ==================== An update from ieee802154 for your *net* tree. This time we have fixes for the ieee802154 netlink code, as well as a driver fix. Zhen Lei, Wei Yongjun and Yang Li each had a patch to cleanup some return code handling ensuring we actually get a real error code when things fails. Dan Robertson fixed a potential null dereference in our netlink handling. Andy Shevchenko removed of_match_ptr()usage in the mrf24j40 driver. ==================== Signed-off-by: David S. Miller commit 821bbf79fe46a8b1d18aa456e8ed0a3c208c3754 Author: Coco Li Date: Thu Jun 3 07:32:58 2021 +0000 ipv6: Fix KASAN: slab-out-of-bounds Read in fib6_nh_flush_exceptions Reported by syzbot: HEAD commit: 90c911ad Merge tag 'fixes' of git://git.kernel.org/pub/scm.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master dashboard link: https://syzkaller.appspot.com/bug?extid=123aa35098fd3c000eb7 compiler: Debian clang version 11.0.1-2 ================================================================== BUG: KASAN: slab-out-of-bounds in fib6_nh_get_excptn_bucket net/ipv6/route.c:1604 [inline] BUG: KASAN: slab-out-of-bounds in fib6_nh_flush_exceptions+0xbd/0x360 net/ipv6/route.c:1732 Read of size 8 at addr ffff8880145c78f8 by task syz-executor.4/17760 CPU: 0 PID: 17760 Comm: syz-executor.4 Not tainted 5.12.0-rc8-syzkaller #0 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x202/0x31e lib/dump_stack.c:120 print_address_description+0x5f/0x3b0 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report+0x15c/0x200 mm/kasan/report.c:416 fib6_nh_get_excptn_bucket net/ipv6/route.c:1604 [inline] fib6_nh_flush_exceptions+0xbd/0x360 net/ipv6/route.c:1732 fib6_nh_release+0x9a/0x430 net/ipv6/route.c:3536 fib6_info_destroy_rcu+0xcb/0x1c0 net/ipv6/ip6_fib.c:174 rcu_do_batch kernel/rcu/tree.c:2559 [inline] rcu_core+0x8f6/0x1450 kernel/rcu/tree.c:2794 __do_softirq+0x372/0x7a6 kernel/softirq.c:345 invoke_softirq kernel/softirq.c:221 [inline] __irq_exit_rcu+0x22c/0x260 kernel/softirq.c:422 irq_exit_rcu+0x5/0x20 kernel/softirq.c:434 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:632 RIP: 0010:lock_acquire+0x1f6/0x720 kernel/locking/lockdep.c:5515 Code: f6 84 24 a1 00 00 00 02 0f 85 8d 02 00 00 f7 c3 00 02 00 00 49 bd 00 00 00 00 00 fc ff df 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 3d 00 00 00 00 00 4b c7 44 3d 09 00 00 00 00 43 c7 44 3d RSP: 0018:ffffc90009e06560 EFLAGS: 00000206 RAX: 1ffff920013c0cc0 RBX: 0000000000000246 RCX: dffffc0000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffffc90009e066e0 R08: dffffc0000000000 R09: fffffbfff1f992b1 R10: fffffbfff1f992b1 R11: 0000000000000000 R12: 0000000000000000 R13: dffffc0000000000 R14: 0000000000000000 R15: 1ffff920013c0cb4 rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:267 rcu_read_lock include/linux/rcupdate.h:656 [inline] ext4_get_group_info+0xea/0x340 fs/ext4/ext4.h:3231 ext4_mb_prefetch+0x123/0x5d0 fs/ext4/mballoc.c:2212 ext4_mb_regular_allocator+0x8a5/0x28f0 fs/ext4/mballoc.c:2379 ext4_mb_new_blocks+0xc6e/0x24f0 fs/ext4/mballoc.c:4982 ext4_ext_map_blocks+0x2be3/0x7210 fs/ext4/extents.c:4238 ext4_map_blocks+0xab3/0x1cb0 fs/ext4/inode.c:638 ext4_getblk+0x187/0x6c0 fs/ext4/inode.c:848 ext4_bread+0x2a/0x1c0 fs/ext4/inode.c:900 ext4_append+0x1a4/0x360 fs/ext4/namei.c:67 ext4_init_new_dir+0x337/0xa10 fs/ext4/namei.c:2768 ext4_mkdir+0x4b8/0xc00 fs/ext4/namei.c:2814 vfs_mkdir+0x45b/0x640 fs/namei.c:3819 ovl_do_mkdir fs/overlayfs/overlayfs.h:161 [inline] ovl_mkdir_real+0x53/0x1a0 fs/overlayfs/dir.c:146 ovl_create_real+0x280/0x490 fs/overlayfs/dir.c:193 ovl_workdir_create+0x425/0x600 fs/overlayfs/super.c:788 ovl_make_workdir+0xed/0x1140 fs/overlayfs/super.c:1355 ovl_get_workdir fs/overlayfs/super.c:1492 [inline] ovl_fill_super+0x39ee/0x5370 fs/overlayfs/super.c:2035 mount_nodev+0x52/0xe0 fs/super.c:1413 legacy_get_tree+0xea/0x180 fs/fs_context.c:592 vfs_get_tree+0x86/0x270 fs/super.c:1497 do_new_mount fs/namespace.c:2903 [inline] path_mount+0x196f/0x2be0 fs/namespace.c:3233 do_mount fs/namespace.c:3246 [inline] __do_sys_mount fs/namespace.c:3454 [inline] __se_sys_mount+0x2f9/0x3b0 fs/namespace.c:3431 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665f9 Code: ff ff 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 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f68f2b87188 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9 RDX: 00000000200000c0 RSI: 0000000020000000 RDI: 000000000040000a RBP: 00000000004bfbb9 R08: 0000000020000100 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007ffe19002dff R14: 00007f68f2b87300 R15: 0000000000022000 Allocated by task 17768: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] ____kasan_kmalloc+0xc2/0xf0 mm/kasan/common.c:506 kasan_kmalloc include/linux/kasan.h:233 [inline] __kmalloc+0xb4/0x380 mm/slub.c:4055 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:684 [inline] fib6_info_alloc+0x2c/0xd0 net/ipv6/ip6_fib.c:154 ip6_route_info_create+0x55d/0x1a10 net/ipv6/route.c:3638 ip6_route_add+0x22/0x120 net/ipv6/route.c:3728 inet6_rtm_newroute+0x2cd/0x2260 net/ipv6/route.c:5352 rtnetlink_rcv_msg+0xb34/0xe70 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x7de/0x9b0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0xaa6/0xe90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x5a2/0x900 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmsg+0x319/0x400 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0x1b1/0xa30 kernel/rcu/tree.c:3114 fib6_info_release include/net/ip6_fib.h:337 [inline] ip6_route_info_create+0x10c4/0x1a10 net/ipv6/route.c:3718 ip6_route_add+0x22/0x120 net/ipv6/route.c:3728 inet6_rtm_newroute+0x2cd/0x2260 net/ipv6/route.c:5352 rtnetlink_rcv_msg+0xb34/0xe70 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x1f0/0x460 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x7de/0x9b0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0xaa6/0xe90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg net/socket.c:674 [inline] ____sys_sendmsg+0x5a2/0x900 net/socket.c:2350 ___sys_sendmsg net/socket.c:2404 [inline] __sys_sendmsg+0x319/0x400 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to last potentially related work creation: kasan_save_stack+0x27/0x50 mm/kasan/common.c:38 kasan_record_aux_stack+0xee/0x120 mm/kasan/generic.c:345 insert_work+0x54/0x400 kernel/workqueue.c:1331 __queue_work+0x981/0xcc0 kernel/workqueue.c:1497 queue_work_on+0x111/0x200 kernel/workqueue.c:1524 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x283/0x470 kernel/umh.c:433 kobject_uevent_env+0x1349/0x1730 lib/kobject_uevent.c:617 kvm_uevent_notify_change+0x309/0x3b0 arch/x86/kvm/../../../virt/kvm/kvm_main.c:4809 kvm_destroy_vm arch/x86/kvm/../../../virt/kvm/kvm_main.c:877 [inline] kvm_put_kvm+0x9c/0xd10 arch/x86/kvm/../../../virt/kvm/kvm_main.c:920 kvm_vcpu_release+0x53/0x60 arch/x86/kvm/../../../virt/kvm/kvm_main.c:3120 __fput+0x352/0x7b0 fs/file_table.c:280 task_work_run+0x146/0x1c0 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x10b/0x1e0 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x26/0x70 kernel/entry/common.c:301 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff8880145c7800 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 56 bytes to the right of 192-byte region [ffff8880145c7800, ffff8880145c78c0) The buggy address belongs to the page: page:ffffea00005171c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x145c7 flags: 0xfff00000000200(slab) raw: 00fff00000000200 ffffea00006474c0 0000000200000002 ffff888010c41a00 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880145c7780: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8880145c7800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff8880145c7880: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880145c7900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880145c7980: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== In the ip6_route_info_create function, in the case that the nh pointer is not NULL, the fib6_nh in fib6_info has not been allocated. Therefore, when trying to free fib6_info in this error case using fib6_info_release, the function will call fib6_info_destroy_rcu, which it will access fib6_nh_release(f6i->fib6_nh); However, f6i->fib6_nh doesn't have any refcount yet given the lack of allocation causing the reported memory issue above. Therefore, releasing the empty pointer directly instead would be the solution. Fixes: f88d8ea67fbdb ("ipv6: Plumb support for nexthop object in a fib6_info") Fixes: 706ec91916462 ("ipv6: Fix nexthop refcnt leak when creating ipv6 route info") Signed-off-by: Coco Li Cc: David Ahern Reviewed-by: Eric Dumazet Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 5e7a2c6494813e58252caf342f5ddb166ad44d1a Merge: 59607863c54e9 d4826d17b3931 Author: David S. Miller Date: Thu Jun 3 15:17:33 2021 -0700 Merge tag 'wireless-drivers-2021-06-03' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.13 We have only mt76 fixes this time, most important being the fix for A-MSDU injection attacks. mt76 * mitigate A-MSDU injection attacks (CVE-2020-24588) * fix possible array out of bound access in mt7921_mcu_tx_rate_report * various aggregation and HE setting fixes * suspend/resume fix for pci devices * mt7615: fix crash when runtime-pm is not supported ==================== Signed-off-by: David S. Miller commit 59607863c54e9eb3f69afc5257dfe71c38bb751e Author: Zheng Yongjun Date: Wed Jun 2 22:06:58 2021 +0800 fib: Return the correct errno code When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 49251cd00228a3c983651f6bb2f33f6a0b8f152e Author: Zheng Yongjun Date: Wed Jun 2 22:06:40 2021 +0800 net: Return the correct errno code When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit d7736958668c4facc15f421e622ffd718f5be80a Author: Zheng Yongjun Date: Wed Jun 2 22:06:30 2021 +0800 net/x25: Return the correct errno code When kalloc or kmemdup failed, should return ENOMEM rather than ENOBUF. Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit a27fb314cba8cb84cd6456a4699c3330a83c326d Author: Rahul Lakkireddy Date: Wed Jun 2 19:38:59 2021 +0530 cxgb4: fix regression with HASH tc prio value update commit db43b30cd89c ("cxgb4: add ethtool n-tuple filter deletion") has moved searching for next highest priority HASH filter rule to cxgb4_flow_rule_destroy(), which searches the rhashtable before the the rule is removed from it and hence always finds at least 1 entry. Fix by removing the rule from rhashtable first before calling cxgb4_flow_rule_destroy() and hence avoid fetching stale info. Fixes: db43b30cd89c ("cxgb4: add ethtool n-tuple filter deletion") Signed-off-by: Rahul Lakkireddy Signed-off-by: David S. Miller commit e03101824d256c73f21d0672b75175c01cc64fac Merge: 4189777ca84f3 7f5d86669fa4d Author: David S. Miller Date: Thu Jun 3 15:05:07 2021 -0700 Merge branch 'caif-fixes' Pavel Skripkin says: ==================== This patch series fix 2 memory leaks in caif interface. Syzbot reported memory leak in cfserl_create(). The problem was in cfcnfg_add_phy_layer() function. This function accepts struct cflayer *link_support and assign it to corresponting structures, but it can fail in some cases. These cases must be handled to prevent leaking allocated struct cflayer *link_support pointer, because if error accured before assigning link_support pointer to somewhere, this pointer must be freed. Fail log: [ 49.051872][ T7010] caif:cfcnfg_add_phy_layer(): Too many CAIF Link Layers (max 6) [ 49.110236][ T7042] caif:cfcnfg_add_phy_layer(): Too many CAIF Link Layers (max 6) [ 49.134936][ T7045] caif:cfcnfg_add_phy_layer(): Too many CAIF Link Layers (max 6) [ 49.163083][ T7043] caif:cfcnfg_add_phy_layer(): Too many CAIF Link Layers (max 6) [ 55.248950][ T6994] kmemleak: 4 new suspected memory leaks (see /sys/kernel/debug/kmemleak) int cfcnfg_add_phy_layer(..., struct cflayer *link_support, ...) { ... /* CAIF protocol allow maximum 6 link-layers */ for (i = 0; i < 7; i++) { phyid = (dev->ifindex + i) & 0x7; if (phyid == 0) continue; if (cfcnfg_get_phyinfo_rcu(cnfg, phyid) == NULL) goto got_phyid; } pr_warn("Too many CAIF Link Layers (max 6)\n"); goto out; ... if (link_support != NULL) { link_support->id = phyid; layer_set_dn(frml, link_support); layer_set_up(link_support, frml); layer_set_dn(link_support, phy_layer); layer_set_up(phy_layer, link_support); } ... } As you can see, if cfcnfg_add_phy_layer fails before layer_set_*, link_support becomes leaked. So, in this series, I made cfcnfg_add_phy_layer() return an int and added error handling code to prevent leaking link_support pointer in caif_device_notify() and cfusbl_device_notify() functions. ==================== Signed-off-by: David S. Miller commit 7f5d86669fa4d485523ddb1d212e0a2d90bd62bb Author: Pavel Skripkin Date: Thu Jun 3 19:39:35 2021 +0300 net: caif: fix memory leak in cfusbl_device_notify In case of caif_enroll_dev() fail, allocated link_support won't be assigned to the corresponding structure. So simply free allocated pointer in case of error. Fixes: 7ad65bf68d70 ("caif: Add support for CAIF over CDC NCM USB interface") Cc: stable@vger.kernel.org Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit b53558a950a89824938e9811eddfc8efcd94e1bb Author: Pavel Skripkin Date: Thu Jun 3 19:39:11 2021 +0300 net: caif: fix memory leak in caif_device_notify In case of caif_enroll_dev() fail, allocated link_support won't be assigned to the corresponding structure. So simply free allocated pointer in case of error Fixes: 7c18d2205ea7 ("caif: Restructure how link caif link layer enroll") Cc: stable@vger.kernel.org Reported-and-tested-by: syzbot+7ec324747ce876a29db6@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit a2805dca5107d5603f4bbc027e81e20d93476e96 Author: Pavel Skripkin Date: Thu Jun 3 19:38:51 2021 +0300 net: caif: add proper error handling caif_enroll_dev() can fail in some cases. Ingnoring these cases can lead to memory leak due to not assigning link_support pointer to anywhere. Fixes: 7c18d2205ea7 ("caif: Restructure how link caif link layer enroll") Cc: stable@vger.kernel.org Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit bce130e7f392ddde8cfcb09927808ebd5f9c8669 Author: Pavel Skripkin Date: Thu Jun 3 19:38:12 2021 +0300 net: caif: added cfserl_release function Added cfserl_release() function. Cc: stable@vger.kernel.org Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit 4189777ca84f3f576767119a005f810c53f39995 Merge: 86b84066dc8fb e102db780e1c1 Author: David S. Miller Date: Thu Jun 3 15:02:55 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Tony Nguyen says: ==================== This series contains updates to igb, igc, ixgbe, ixgbevf, i40e and ice drivers. Kurt Kanzenbach fixes XDP for igb when PTP is enabled by pulling the timestamp and adjusting appropriate values prior to XDP operations. Magnus adds missing exception tracing for XDP on igb, igc, ixgbe, ixgbevf, i40e and ice drivers. Maciej adds tracking of AF_XDP zero copy enabled queues to resolve an issue with copy mode Tx for the ice driver. Note: Patch 7 will conflict when merged with net-next. Please carry these changes forward. IGC_XDP_TX and IGC_XDP_REDIRECT will need to be changed to return to conform with the net-next changes. Let me know if you have issues. ==================== Signed-off-by: David S. Miller commit ff7a24a8fcb30adfea878d14c394300a087016ba Merge: 59dda702c95df b87482dfe800f Author: Dave Airlie Date: Fri Jun 4 07:29:25 2021 +1000 Merge tag 'drm-intel-fixes-2021-06-03' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.13-rc5: - Revert conversion to io_mapping_map_user() which lead to BUG_ON() - Fix check for error valued returns in a selftest Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87lf7rpcmp.fsf@intel.com commit 59dda702c95df5aee657d5945e7dc93dbf60de6b Merge: 8124c8a6b3538 0b78f8bcf4951 Author: Dave Airlie Date: Fri Jun 4 07:29:00 2021 +1000 Merge tag 'drm-misc-fixes-2021-06-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes One fix for a fb_defio breakage Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210603085321.l5l6flslj632yqse@gilmour commit 86b84066dc8fbb93221000e60946960cf7d54587 Merge: c47cc304990a2 ff40e51043af6 Author: David S. Miller Date: Thu Jun 3 14:17:42 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-06-02 The following pull-request contains BPF updates for your *net* tree. We've added 2 non-merge commits during the last 7 day(s) which contain a total of 4 files changed, 19 insertions(+), 24 deletions(-). The main changes are: 1) Fix pahole BTF generation when ccache is used, from Javier Martinez Canillas. 2) Fix BPF lockdown hooks in bpf_probe_read_kernel{,_str}() helpers which caused a deadlock from bcc programs, triggered OOM killer from audit side and didn't work generally with SELinux policy rules due to pointing to wrong task struct, from Daniel Borkmann. ==================== Signed-off-by: David S. Miller commit c47cc304990a2813995b1a92bbc11d0bb9a19ea9 Author: Pavel Skripkin Date: Wed Jun 2 22:26:40 2021 +0300 net: kcm: fix memory leak in kcm_sendmsg Syzbot reported memory leak in kcm_sendmsg()[1]. The problem was in non-freed frag_list in case of error. In the while loop: if (head == skb) skb_shinfo(head)->frag_list = tskb; else skb->next = tskb; frag_list filled with skbs, but nothing was freeing them. backtrace: [<0000000094c02615>] __alloc_skb+0x5e/0x250 net/core/skbuff.c:198 [<00000000e5386cbd>] alloc_skb include/linux/skbuff.h:1083 [inline] [<00000000e5386cbd>] kcm_sendmsg+0x3b6/0xa50 net/kcm/kcmsock.c:967 [1] [<00000000f1613a8a>] sock_sendmsg_nosec net/socket.c:652 [inline] [<00000000f1613a8a>] sock_sendmsg+0x4c/0x60 net/socket.c:672 Reported-and-tested-by: syzbot+b039f5699bd82e1fb011@syzkaller.appspotmail.com Fixes: ab7ac4eb9832 ("kcm: Kernel Connection Multiplexor module") Cc: stable@vger.kernel.org Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit 1f14a620f30b01234f8b61df396f513e2ec4887f Author: Luiz Augusto von Dentz Date: Fri Apr 30 16:05:01 2021 -0700 Bluetooth: btusb: Fix failing to init controllers with operation firmware Some firmware when operation don't may have broken versions leading to error like the following: [ 6.176482] Bluetooth: hci0: Firmware revision 0.0 build 121 week 7 2021 [ 6.177906] bluetooth hci0: Direct firmware load for intel/ibt-20-0-0.sfi failed with error -2 [ 6.177910] Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-20-0-0.sfi (-2) Since we load the firmware file just to check if its version had changed comparing to the one already loaded we can just skip since the firmware is already operation. Fixes: ac0565462e330 ("Bluetooth: btintel: Check firmware version before download") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit a83d958504734f78f42b1e3392d93816297e790a Author: Marcel Holtmann Date: Thu Jun 3 21:20:26 2021 +0200 Bluetooth: Fix VIRTIO_ID_BT assigned number It turned out that the VIRTIO_ID_* are not assigned in the virtio_ids.h file in the upstream kernel. Picking the next free one was wrong and there is a process that has been followed now. See https://github.com/oasis-tcs/virtio-spec/issues/108 for details. Fixes: afd2daa26c7a ("Bluetooth: Add support for virtio transport driver") Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit 261ba78cc364ad595cead555a7d2a61471eac165 Author: zhang kai Date: Wed Jun 2 18:36:26 2021 +0800 sit: set name of device back to struct parms addrconf_set_sit_dstaddr will use parms->name. Signed-off-by: zhang kai Signed-off-by: David S. Miller commit a8db57c1d285c758adc7fb43d6e2bad2554106e1 Author: Jiapeng Chong Date: Wed Jun 2 18:15:04 2021 +0800 rtnetlink: Fix missing error code in rtnl_bridge_notify() The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'err'. Eliminate the follow smatch warning: net/core/rtnetlink.c:4834 rtnl_bridge_notify() warn: missing error code 'err'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 59717f3931f0009a735b4c44daf37b0e2322e989 Merge: ab00f3e051e85 8971ee8b08775 Author: David S. Miller Date: Thu Jun 3 13:49:08 2021 -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 allow to add conntrack helper extension for confirmed conntracks in the nf_tables ct expectation support. 2) Fix bogus EBUSY in nfnetlink_cthelper when NFCTH_PRIV_DATA_LEN is passed on userspace helper updates. ==================== Signed-off-by: David S. Miller commit de2646f34a5bdfa04fb079bfaaada992b87c6a55 Author: Lee Jones Date: Thu May 20 20:01:04 2021 +0100 i2c: tegra-bpmp: Demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-tegra-bpmp.c:86: warning: Function parameter or member 'i2c' not described in 'tegra_bpmp_serialize_i2c_msg' drivers/i2c/busses/i2c-tegra-bpmp.c:86: warning: Function parameter or member 'request' not described in 'tegra_bpmp_serialize_i2c_msg' drivers/i2c/busses/i2c-tegra-bpmp.c:86: warning: Function parameter or member 'msgs' not described in 'tegra_bpmp_serialize_i2c_msg' drivers/i2c/busses/i2c-tegra-bpmp.c:86: warning: Function parameter or member 'num' not described in 'tegra_bpmp_serialize_i2c_msg' drivers/i2c/busses/i2c-tegra-bpmp.c:86: warning: expecting prototype for The serialized I2C format is simply the following(). Prototype was for tegra_bpmp_serialize_i2c_msg() instead drivers/i2c/busses/i2c-tegra-bpmp.c:130: warning: Function parameter or member 'i2c' not described in 'tegra_bpmp_i2c_deserialize' drivers/i2c/busses/i2c-tegra-bpmp.c:130: warning: Function parameter or member 'response' not described in 'tegra_bpmp_i2c_deserialize' drivers/i2c/busses/i2c-tegra-bpmp.c:130: warning: Function parameter or member 'msgs' not described in 'tegra_bpmp_i2c_deserialize' drivers/i2c/busses/i2c-tegra-bpmp.c:130: warning: Function parameter or member 'num' not described in 'tegra_bpmp_i2c_deserialize' drivers/i2c/busses/i2c-tegra-bpmp.c:130: warning: expecting prototype for The data in the BPMP(). Prototype was for tegra_bpmp_i2c_deserialize() instead Signed-off-by: Lee Jones Acked-by: Thierry Reding Signed-off-by: Wolfram Sang commit a4931dcab1dedf67caa231ff2c9b0a6bb40139af Author: Lee Jones Date: Thu May 20 20:00:53 2021 +0100 i2c: altera: Fix formatting issue in struct and demote unworthy kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-altera.c:74: warning: cannot understand function prototype: 'struct altr_i2c_dev ' drivers/i2c/busses/i2c-altera.c:180: warning: Function parameter or member 'idev' not described in 'altr_i2c_transfer' drivers/i2c/busses/i2c-altera.c:180: warning: Function parameter or member 'data' not described in 'altr_i2c_transfer' drivers/i2c/busses/i2c-altera.c:193: warning: Function parameter or member 'idev' not described in 'altr_i2c_empty_rx_fifo' drivers/i2c/busses/i2c-altera.c:209: warning: Function parameter or member 'idev' not described in 'altr_i2c_fill_tx_fifo' Signed-off-by: Lee Jones Signed-off-by: Wolfram Sang commit f88cd3fb9df228e5ce4e13ec3dbad671ddb2146e Merge: 143d28dcf2383 dc51ff91cf2d1 Author: Linus Torvalds Date: Thu Jun 3 11:52:24 2021 -0700 Merge tag 'vfio-v5.13-rc5' of git://github.com/awilliam/linux-vfio Pull VFIO fixes from Alex Williamson: - Fix error path return value (Zhen Lei) - Add vfio-pci CONFIG_MMU dependency (Randy Dunlap) - Replace open coding with struct_size() (Gustavo A. R. Silva) - Fix sample driver error path (Wei Yongjun) - Fix vfio-platform error path module_put() (Max Gurtovoy) * tag 'vfio-v5.13-rc5' of git://github.com/awilliam/linux-vfio: vfio/platform: fix module_put call in error flow samples: vfio-mdev: fix error handing in mdpy_fb_probe() vfio/iommu_type1: Use struct_size() for kzalloc() vfio/pci: zap_vma_ptes() needs MMU vfio/pci: Fix error return code in vfio_ecap_init() commit 143d28dcf23837a7e4c6a09e8ab369fdda81c0e7 Merge: ec955023967cf e369edbb0d8ce Author: Linus Torvalds Date: Thu Jun 3 11:47:08 2021 -0700 Merge tag 'block-5.13-2021-06-03' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "NVMe fixes from Christoph: - Fix corruption in RDMA in-capsule SGLs (Sagi Grimberg) - nvme-loop reset fixes (Hannes Reinecke) - nvmet fix for freeing unallocated p2pmem (Max Gurtovoy)" * tag 'block-5.13-2021-06-03' of git://git.kernel.dk/linux-block: nvmet: fix freeing unallocated p2pmem nvme-loop: do not warn for deleted controllers during reset nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue() nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues() nvme-rdma: fix in-casule data send for chained sgls commit ec955023967cf9d8669c0bf62fc13aeea002ef9e Merge: fd2ff2774e90a 216e5835966a7 Author: Linus Torvalds Date: Thu Jun 3 11:41:00 2021 -0700 Merge tag 'io_uring-5.13-2021-06-03' of git://git.kernel.dk/linux-block Pull io_uring fix from Jens Axboe: "Just a single one-liner fix for an accounting regression in this release" * tag 'io_uring-5.13-2021-06-03' of git://git.kernel.dk/linux-block: io_uring: fix misaccounting fix buf pinned pages commit fd2ff2774e90a0ba58f1158d7ea095af51f31644 Merge: 324c92e5e0ee0 503d1acb01826 Author: Linus Torvalds Date: Thu Jun 3 11:37:14 2021 -0700 Merge tag 'for-5.13-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "Error handling improvements, caught by error injection: - handle errors during checksum deletion - set error on mapping when ordered extent io cannot be finished - inode link count fixup in tree-log - missing return value checks for inode updates in tree-log - abort transaction in rename exchange if adding second reference fails Fixes: - fix fsync failure after writes to prealloc extents - fix deadlock when cloning inline extents and low on available space - fix compressed writes that cross stripe boundary" * tag 'for-5.13-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: MAINTAINERS: add btrfs IRC link btrfs: fix deadlock when cloning inline extents and low on available space btrfs: fix fsync failure and transaction abort after writes to prealloc extents btrfs: abort in rename_exchange if we fail to insert the second ref btrfs: check error value from btrfs_update_inode in tree log btrfs: fixup error handling in fixup_inode_link_counts btrfs: mark ordered extent and inode with error if we fail to finish btrfs: return errors from btrfs_del_csums in cleanup_ref_head btrfs: fix error handling in btrfs_del_csums btrfs: fix compressed writes that cross stripe boundary commit cb2381cbecb81a8893b2d1e1af29bc2e5531df27 Author: Axel Lin Date: Thu Jun 3 17:49:44 2021 +0800 regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios is NULL devm_gpiod_get_array_optional may return NULL if no GPIO was assigned. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210603094944.1114156-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 8d396bb0a5b62b326f6be7594d8bd46b088296bd Author: Jack Pham Date: Sat May 29 12:29:32 2021 -0700 usb: dwc3: debugfs: Add and remove endpoint dirs dynamically The DWC3 DebugFS directory and files are currently created once during probe. This includes creation of subdirectories for each of the gadget's endpoints. This works fine for peripheral-only controllers, as dwc3_core_init_mode() calls dwc3_gadget_init() just prior to calling dwc3_debugfs_init(). However, for dual-role controllers, dwc3_core_init_mode() will instead call dwc3_drd_init() which is problematic in a few ways. First, the initial state must be determined, then dwc3_set_mode() will have to schedule drd_work and by then dwc3_debugfs_init() could have already been invoked. Even if the initial mode is peripheral, dwc3_gadget_init() happens after the DebugFS files are created, and worse so if the initial state is host and the controller switches to peripheral much later. And secondly, even if the gadget endpoints' debug entries were successfully created, if the controller exits peripheral mode, its dwc3_eps are freed so the debug files would now hold stale references. So it is best if the DebugFS endpoint entries are created and removed dynamically at the same time the underlying dwc3_eps are. Do this by calling dwc3_debugfs_create_endpoint_dir() as each endpoint is created, and conversely remove the DebugFS entry when the endpoint is freed. Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") Cc: stable Reviewed-by: Peter Chen Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210529192932.22912-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit f1d4d47c5851b348b7713007e152bc68b94d728b Author: Mike Rapoport Date: Tue Jun 1 10:53:52 2021 +0300 x86/setup: Always reserve the first 1M of RAM There are BIOSes that are known to corrupt the memory under 1M, or more precisely under 640K because the memory above 640K is anyway reserved for the EGA/VGA frame buffer and BIOS. To prevent usage of the memory that will be potentially clobbered by the kernel, the beginning of the memory is always reserved. The exact size of the reserved area is determined by CONFIG_X86_RESERVE_LOW build time and the "reservelow=" command line option. The reserved range may be from 4K to 640K with the default of 64K. There are also configurations that reserve the entire 1M range, like machines with SandyBridge graphic devices or systems that enable crash kernel. In addition to the potentially clobbered memory, EBDA of unknown size may be as low as 128K and the memory above that EBDA start is also reserved early. It would have been possible to reserve the entire range under 1M unless for the real mode trampoline that must reside in that area. To accommodate placement of the real mode trampoline and keep the memory safe from being clobbered by BIOS, reserve the first 64K of RAM before memory allocations are possible and then, after the real mode trampoline is allocated, reserve the entire range from 0 to 1M. Update trim_snb_memory() and reserve_real_mode() to avoid redundant reservations of the same memory range. Also make sure the memory under 1M is not getting freed by efi_free_boot_services(). [ bp: Massage commit message and comments. ] Fixes: a799c2bd29d1 ("x86/setup: Consolidate early memory reservations") Signed-off-by: Mike Rapoport Signed-off-by: Borislav Petkov Tested-by: Hugh Dickins Link: https://bugzilla.kernel.org/show_bug.cgi?id=213177 Link: https://lkml.kernel.org/r/20210601075354.5149-2-rppt@kernel.org commit 404e5a12691fe797486475fe28cc0b80cb8bef2c Author: Shay Drory Date: Thu Jun 3 16:19:39 2021 +0300 RDMA/mlx4: Do not map the core_clock page to user space unless enabled Currently when mlx4 maps the hca_core_clock page to the user space there are read-modifiable registers, one of which is semaphore, on this page as well as the clock counter. If user reads the wrong offset, it can modify the semaphore and hang the device. Do not map the hca_core_clock page to the user space unless the device has been put in a backwards compatibility mode to support this feature. After this patch, mlx4 core_clock won't be mapped to user space on the majority of existing devices and the uverbs device time feature in ibv_query_rt_values_ex() will be disabled. Fixes: 52033cfb5aab ("IB/mlx4: Add mmap call to map the hardware clock") Link: https://lore.kernel.org/r/9632304e0d6790af84b3b706d8c18732bc0d5e27.1622726305.git.leonro@nvidia.com Signed-off-by: Shay Drory Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a0ffb4c12f7fa89163e228e6f27df09b46631db1 Author: Mark Zhang Date: Thu Jun 3 16:18:03 2021 +0300 RDMA/mlx5: Use different doorbell memory for different processes In a fork scenario, the parent and child can have same virtual address and also share the uverbs fd. That causes to the list_for_each_entry search return same doorbell physical page for all processes, even though that page has been COW' or copied. This patch takes the mm_struct into consideration during search, to make sure that VA's belonging to different processes are not intermixed. Resolves the malfunction of uverbs after fork in some specific cases. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Link: https://lore.kernel.org/r/feacc23fe0bc6e1088c6824d5583798745e72405.1622726212.git.leonro@nvidia.com Reviewed-by: Jason Gunthorpe Signed-off-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e102db780e1c14f10c70dafa7684af22a745b51d Author: Maciej Fijalkowski Date: Tue Apr 27 21:52:09 2021 +0200 ice: track AF_XDP ZC enabled queues in bitmap Commit c7a219048e45 ("ice: Remove xsk_buff_pool from VSI structure") silently introduced a regression and broke the Tx side of AF_XDP in copy mode. xsk_pool on ice_ring is set only based on the existence of the XDP prog on the VSI which in turn picks ice_clean_tx_irq_zc to be executed. That is not something that should happen for copy mode as it should use the regular data path ice_clean_tx_irq. This results in a following splat when xdpsock is run in txonly or l2fwd scenarios in copy mode: [ 106.050195] BUG: kernel NULL pointer dereference, address: 0000000000000030 [ 106.057269] #PF: supervisor read access in kernel mode [ 106.062493] #PF: error_code(0x0000) - not-present page [ 106.067709] PGD 0 P4D 0 [ 106.070293] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 106.074721] CPU: 61 PID: 0 Comm: swapper/61 Not tainted 5.12.0-rc2+ #45 [ 106.081436] Hardware name: Intel Corporation S2600WFT/S2600WFT, BIOS SE5C620.86B.02.01.0008.031920191559 03/19/2019 [ 106.092027] RIP: 0010:xp_raw_get_dma+0x36/0x50 [ 106.096551] Code: 74 14 48 b8 ff ff ff ff ff ff 00 00 48 21 f0 48 c1 ee 30 48 01 c6 48 8b 87 90 00 00 00 48 89 f2 81 e6 ff 0f 00 00 48 c1 ea 0c <48> 8b 04 d0 48 83 e0 fe 48 01 f0 c3 66 66 2e 0f 1f 84 00 00 00 00 [ 106.115588] RSP: 0018:ffffc9000d694e50 EFLAGS: 00010206 [ 106.120893] RAX: 0000000000000000 RBX: ffff88984b8c8a00 RCX: ffff889852581800 [ 106.128137] RDX: 0000000000000006 RSI: 0000000000000000 RDI: ffff88984cd8b800 [ 106.135383] RBP: ffff888123b50001 R08: ffff889896800000 R09: 0000000000000800 [ 106.142628] R10: 0000000000000000 R11: ffffffff826060c0 R12: 00000000000000ff [ 106.149872] R13: 0000000000000000 R14: 0000000000000040 R15: ffff888123b50018 [ 106.157117] FS: 0000000000000000(0000) GS:ffff8897e0f40000(0000) knlGS:0000000000000000 [ 106.165332] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 106.171163] CR2: 0000000000000030 CR3: 000000000560a004 CR4: 00000000007706e0 [ 106.178408] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 106.185653] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 106.192898] PKRU: 55555554 [ 106.195653] Call Trace: [ 106.198143] [ 106.200196] ice_clean_tx_irq_zc+0x183/0x2a0 [ice] [ 106.205087] ice_napi_poll+0x3e/0x590 [ice] [ 106.209356] __napi_poll+0x2a/0x160 [ 106.212911] net_rx_action+0xd6/0x200 [ 106.216634] __do_softirq+0xbf/0x29b [ 106.220274] irq_exit_rcu+0x88/0xc0 [ 106.223819] common_interrupt+0x7b/0xa0 [ 106.227719] [ 106.229857] asm_common_interrupt+0x1e/0x40 Fix this by introducing the bitmap of queues that are zero-copy enabled, where each bit, corresponding to a queue id that xsk pool is being configured on, will be set/cleared within ice_xsk_pool_{en,dis}able and checked within ice_xsk_pool(). The latter is a function used for deciding which napi poll routine is executed. Idea is being taken from our other drivers such as i40e and ixgbe. Fixes: c7a219048e45 ("ice: Remove xsk_buff_pool from VSI structure") Signed-off-by: Maciej Fijalkowski Tested-by: Kiran Bhandare Signed-off-by: Tony Nguyen commit 45ce08594ec3a9f81a6dedeccd1ec785e6907405 Author: Magnus Karlsson Date: Mon May 10 11:38:54 2021 +0200 igc: add correct exception tracing for XDP Add missing exception tracing to XDP when a number of different errors can occur. The support was only partial. Several errors where not logged which would confuse the user quite a lot not knowing where and why the packets disappeared. Fixes: 73f1071c1d29 ("igc: Add support for XDP_TX action") Fixes: 4ff320361092 ("igc: Add support for XDP_REDIRECT action") Reported-by: Jesper Dangaard Brouer Signed-off-by: Magnus Karlsson Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit faae81420d162551b6ef2d804aafc00f4cd68e0e Author: Magnus Karlsson Date: Mon May 10 11:38:53 2021 +0200 ixgbevf: add correct exception tracing for XDP Add missing exception tracing to XDP when a number of different errors can occur. The support was only partial. Several errors where not logged which would confuse the user quite a lot not knowing where and why the packets disappeared. Fixes: 21092e9ce8b1 ("ixgbevf: Add support for XDP_TX action") Reported-by: Jesper Dangaard Brouer Signed-off-by: Magnus Karlsson Tested-by: Vishakha Jambekar Signed-off-by: Tony Nguyen commit 74431c40b9c5fa673fff83ec157a76a69efd5c72 Author: Magnus Karlsson Date: Mon May 10 11:38:52 2021 +0200 igb: add correct exception tracing for XDP Add missing exception tracing to XDP when a number of different errors can occur. The support was only partial. Several errors where not logged which would confuse the user quite a lot not knowing where and why the packets disappeared. Fixes: 9cbc948b5a20 ("igb: add XDP support") Reported-by: Jesper Dangaard Brouer Signed-off-by: Magnus Karlsson Tested-by: Vishakha Jambekar Signed-off-by: Tony Nguyen commit 8281356b1cab1cccc71412eb4cf28b99d6bb2c19 Author: Magnus Karlsson Date: Mon May 10 11:38:51 2021 +0200 ixgbe: add correct exception tracing for XDP Add missing exception tracing to XDP when a number of different errors can occur. The support was only partial. Several errors where not logged which would confuse the user quite a lot not knowing where and why the packets disappeared. Fixes: 33fdc82f0883 ("ixgbe: add support for XDP_TX action") Fixes: d0bcacd0a130 ("ixgbe: add AF_XDP zero-copy Rx support") Reported-by: Jesper Dangaard Brouer Signed-off-by: Magnus Karlsson Tested-by: Vishakha Jambekar Signed-off-by: Tony Nguyen commit 89d65df024c59988291f643b4e45d1528c51aef9 Author: Magnus Karlsson Date: Mon May 10 11:38:50 2021 +0200 ice: add correct exception tracing for XDP Add missing exception tracing to XDP when a number of different errors can occur. The support was only partial. Several errors where not logged which would confuse the user quite a lot not knowing where and why the packets disappeared. Fixes: efc2214b6047 ("ice: Add support for XDP") Fixes: 2d4238f55697 ("ice: Add support for AF_XDP") Reported-by: Jesper Dangaard Brouer Signed-off-by: Magnus Karlsson Tested-by: Kiran Bhandare Signed-off-by: Tony Nguyen commit f6c10b48f8c8da44adaff730d8e700b6272add2b Author: Magnus Karlsson Date: Mon May 10 11:38:49 2021 +0200 i40e: add correct exception tracing for XDP Add missing exception tracing to XDP when a number of different errors can occur. The support was only partial. Several errors where not logged which would confuse the user quite a lot not knowing where and why the packets disappeared. Fixes: 74608d17fe29 ("i40e: add support for XDP_TX action") Fixes: 0a714186d3c0 ("i40e: add AF_XDP zero-copy Rx support") Reported-by: Jesper Dangaard Brouer Signed-off-by: Magnus Karlsson Tested-by: Kiran Bhandare Signed-off-by: Tony Nguyen commit 5379260852b013902abbca691926b3ac1cac36d5 Author: Kurt Kanzenbach Date: Mon May 3 09:28:00 2021 +0200 igb: Fix XDP with PTP enabled When using native XDP with the igb driver, the XDP frame data doesn't point to the beginning of the packet. It's off by 16 bytes. Everything works as expected with XDP skb mode. Actually these 16 bytes are used to store the packet timestamps. Therefore, pull the timestamp before executing any XDP operations and adjust all other code accordingly. The igc driver does it like that as well. Tested with Intel i210 card and AF_XDP sockets. Fixes: 9cbc948b5a20 ("igb: add XDP support") Signed-off-by: Kurt Kanzenbach Acked-by: Jesper Dangaard Brouer Tested-by: Sandeep Penigalapati Signed-off-by: Tony Nguyen commit 2b31e8ed96b260ce2c22bd62ecbb9458399e3b62 Author: Borislav Petkov Date: Tue Jun 1 17:51:22 2021 +0200 x86/alternative: Optimize single-byte NOPs at an arbitrary position Up until now the assumption was that an alternative patching site would have some instructions at the beginning and trailing single-byte NOPs (0x90) padding. Therefore, the patching machinery would go and optimize those single-byte NOPs into longer ones. However, this assumption is broken on 32-bit when code like hv_do_hypercall() in hyperv_init() would use the ratpoline speculation killer CALL_NOSPEC. The 32-bit version of that macro would align certain insns to 16 bytes, leading to the compiler issuing a one or more single-byte NOPs, depending on the holes it needs to fill for alignment. That would lead to the warning in optimize_nops() to fire: ------------[ cut here ]------------ Not a NOP at 0xc27fb598 WARNING: CPU: 0 PID: 0 at arch/x86/kernel/alternative.c:211 optimize_nops.isra.13 due to that function verifying whether all of the following bytes really are single-byte NOPs. Therefore, carve out the NOP padding into a separate function and call it for each NOP range beginning with a single-byte NOP. Fixes: 23c1ad538f4f ("x86/alternatives: Optimize optimize_nops()") Reported-by: Richard Narron Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://bugzilla.kernel.org/show_bug.cgi?id=213301 Link: https://lkml.kernel.org/r/20210601212125.17145-1-bp@alien8.de commit 9bfecd05833918526cc7357d55e393393440c5fa Author: Thomas Gleixner Date: Sat May 29 11:17:30 2021 +0200 x86/cpufeatures: Force disable X86_FEATURE_ENQCMD and remove update_pasid() While digesting the XSAVE-related horrors which got introduced with the supervisor/user split, the recent addition of ENQCMD-related functionality got on the radar and turned out to be similarly broken. update_pasid(), which is only required when X86_FEATURE_ENQCMD is available, is invoked from two places: 1) From switch_to() for the incoming task 2) Via a SMP function call from the IOMMU/SMV code #1 is half-ways correct as it hacks around the brokenness of get_xsave_addr() by enforcing the state to be 'present', but all the conditionals in that code are completely pointless for that. Also the invocation is just useless overhead because at that point it's guaranteed that TIF_NEED_FPU_LOAD is set on the incoming task and all of this can be handled at return to user space. #2 is broken beyond repair. The comment in the code claims that it is safe to invoke this in an IPI, but that's just wishful thinking. FPU state of a running task is protected by fregs_lock() which is nothing else than a local_bh_disable(). As BH-disabled regions run usually with interrupts enabled the IPI can hit a code section which modifies FPU state and there is absolutely no guarantee that any of the assumptions which are made for the IPI case is true. Also the IPI is sent to all CPUs in mm_cpumask(mm), but the IPI is invoked with a NULL pointer argument, so it can hit a completely unrelated task and unconditionally force an update for nothing. Worse, it can hit a kernel thread which operates on a user space address space and set a random PASID for it. The offending commit does not cleanly revert, but it's sufficient to force disable X86_FEATURE_ENQCMD and to remove the broken update_pasid() code to make this dysfunctional all over the place. Anything more complex would require more surgery and none of the related functions outside of the x86 core code are blatantly wrong, so removing those would be overkill. As nothing enables the PASID bit in the IA32_XSS MSR yet, which is required to make this actually work, this cannot result in a regression except for related out of tree train-wrecks, but they are broken already today. Fixes: 20f0afd1fb3d ("x86/mmu: Allocate/free a PASID") Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Acked-by: Andy Lutomirski Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/87mtsd6gr9.ffs@nanos.tec.linutronix.de commit 74b2fc882d380d8fafc2a26f01d401c2a7beeadb Author: Borislav Petkov Date: Wed Jun 2 12:07:52 2021 +0200 dmaengine: idxd: Use cpu_feature_enabled() When testing x86 feature bits, use cpu_feature_enabled() so that build-disabled features can remain off, regardless of what CPUID says. Fixes: 8e50d392652f ("dmaengine: idxd: Add shared workqueue support") Signed-off-by: Borislav Petkov Reviewed-by: Thomas Gleixner Acked-By: Vinod Koul Cc: commit c3aba897c6e67fa464ec02b1f17911577d619713 Author: Trond Myklebust Date: Tue Jun 1 11:35:56 2021 -0400 NFSv4: Fix second deadlock in nfs4_evict_inode() If the inode is being evicted but has to return a layout first, then that too can cause a deadlock in the corner case where the server reboots. Signed-off-by: Trond Myklebust commit dfe1fe75e00e4c724ede7b9e593f6f680e446c5f Author: Trond Myklebust Date: Tue Jun 1 11:10:05 2021 -0400 NFSv4: Fix deadlock between nfs4_evict_inode() and nfs4_opendata_get_inode() If the inode is being evicted, but has to return a delegation first, then it can cause a deadlock in the corner case where the server reboots before the delegreturn completes, but while the call to iget5_locked() in nfs4_opendata_get_inode() is waiting for the inode free to complete. Since the open call still holds a session slot, the reboot recovery cannot proceed. In order to break the logjam, we can turn the delegation return into a privileged operation for the case where we're evicting the inode. We know that in that case, there can be no other state recovery operation that conflicts. Reported-by: zhangxiaoxu (A) Fixes: 5fcdfacc01f3 ("NFSv4: Return delegations synchronously in evict_inode") Signed-off-by: Trond Myklebust commit d1b5c230e9cb6dddeab23f0f0c808e2b1c28d1b6 Author: Chuck Lever Date: Thu Jun 3 10:12:43 2021 -0400 NFS: FMODE_READ and friends are C macros, not enum types Address a sparse warning: CHECK fs/nfs/nfstrace.c fs/nfs/nfstrace.c: note: in included file (through /home/cel/src/linux/rpc-over-tls/include/trace/trace_events.h, /home/cel/src/linux/rpc-over-tls/include/trace/define_trace.h, ...): fs/nfs/./nfstrace.h:424:1: warning: incorrect type in initializer (different base types) fs/nfs/./nfstrace.h:424:1: expected unsigned long eval_value fs/nfs/./nfstrace.h:424:1: got restricted fmode_t [usertype] fs/nfs/./nfstrace.h:425:1: warning: incorrect type in initializer (different base types) fs/nfs/./nfstrace.h:425:1: expected unsigned long eval_value fs/nfs/./nfstrace.h:425:1: got restricted fmode_t [usertype] fs/nfs/./nfstrace.h:426:1: warning: incorrect type in initializer (different base types) fs/nfs/./nfstrace.h:426:1: expected unsigned long eval_value fs/nfs/./nfstrace.h:426:1: got restricted fmode_t [usertype] Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 09226e8303beeec10f2ff844d2e46d1371dc58e0 Author: Dan Carpenter Date: Thu Jun 3 15:37:53 2021 +0300 NFS: Fix a potential NULL dereference in nfs_get_client() None of the callers are expecting NULL returns from nfs_get_client() so this code will lead to an Oops. It's better to return an error pointer. I expect that this is dead code so hopefully no one is affected. Fixes: 31434f496abb ("nfs: check hostname in nfs_get_client") Signed-off-by: Dan Carpenter Signed-off-by: Trond Myklebust commit 476bdb04c501fc64bf3b8464ffddefc8dbe01577 Author: Anna Schumaker Date: Wed Jun 2 14:31:20 2021 -0400 NFS: Fix use-after-free in nfs4_init_client() KASAN reports a use-after-free when attempting to mount two different exports through two different NICs that belong to the same server. Olga was able to hit this with kernels starting somewhere between 5.7 and 5.10, but I traced the patch that introduced the clear_bit() call to 4.13. So something must have changed in the refcounting of the clp pointer to make this call to nfs_put_client() the very last one. Fixes: 8dcbec6d20 ("NFSv41: Handle EXCHID4_FLAG_CONFIRMED_R during NFSv4.1 migration") Cc: stable@vger.kernel.org # 4.13+ Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust commit 0b4f132b15f988831dfca8f96af272e437eacf05 Author: Scott Mayhew Date: Wed Jun 2 13:13:11 2021 -0400 NFS: Ensure the NFS_CAP_SECURITY_LABEL capability is set when appropriate Commit ce62b114bbad ("NFS: Split attribute support out from the server capabilities") removed the logic from _nfs4_server_capabilities() that sets the NFS_CAP_SECURITY_LABEL capability based on the presence of FATTR4_WORD2_SECURITY_LABEL in the attr_bitmask of the server's response. Now NFS_CAP_SECURITY_LABEL is never set, which breaks labelled NFS. This was replaced with logic that clears the NFS_ATTR_FATTR_V4_SECURITY_LABEL bit in the newly added fattr_valid field based on the absence of FATTR4_WORD2_SECURITY_LABEL in the attr_bitmask of the server's response. This essentially has no effect since there's nothing looks for that bit in fattr_supported. So revert that part of the commit, but adding the logic that sets NFS_CAP_SECURITY_LABEL near where the other capabilities are set in _nfs4_server_capabilities(). Fixes: ce62b114bbad ("NFS: Split attribute support out from the server capabilities") Signed-off-by: Scott Mayhew Signed-off-by: Trond Myklebust commit 68d7a190682aa4eb02db477328088ebad15acc83 Author: Dietmar Eggemann Date: Wed Jun 2 16:58:08 2021 +0200 sched/fair: Fix util_est UTIL_AVG_UNCHANGED handling The util_est internal UTIL_AVG_UNCHANGED flag which is used to prevent unnecessary util_est updates uses the LSB of util_est.enqueued. It is exposed via _task_util_est() (and task_util_est()). Commit 92a801e5d5b7 ("sched/fair: Mask UTIL_AVG_UNCHANGED usages") mentions that the LSB is lost for util_est resolution but find_energy_efficient_cpu() checks if task_util_est() returns 0 to return prev_cpu early. _task_util_est() returns the max value of util_est.ewma and util_est.enqueued or'ed w/ UTIL_AVG_UNCHANGED. So task_util_est() returning the max of task_util() and _task_util_est() will never return 0 under the default SCHED_FEAT(UTIL_EST, true). To fix this use the MSB of util_est.enqueued instead and keep the flag util_est internal, i.e. don't export it via _task_util_est(). The maximal possible util_avg value for a task is 1024 so the MSB of 'unsigned int util_est.enqueued' isn't used to store a util value. As a caveat the code behind the util_est_se trace point has to filter UTIL_AVG_UNCHANGED to see the real util_est.enqueued value which should be easy to do. This also fixes an issue report by Xuewen Yan that util_est_update() only used UTIL_AVG_UNCHANGED for the subtrahend of the equation: last_enqueued_diff = ue.enqueued - (task_util() | UTIL_AVG_UNCHANGED) Fixes: b89997aa88f0b sched/pelt: Fix task util_est update filtering Signed-off-by: Dietmar Eggemann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Xuewen Yan Reviewed-by: Vincent Donnefort Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20210602145808.1562603-1-dietmar.eggemann@arm.com commit e369edbb0d8cee50efa6375d5c598a04b7cb3032 Merge: a4b58f1721eb4 bcd9a0797d73e Author: Jens Axboe Date: Thu Jun 3 07:42:27 2021 -0600 Merge tag 'nvme-5.13-2021-06-03' of git://git.infradead.org/nvme into block-5.13 Pull NVMe fixes from Christoph: "nvme fixes for Linux 5.13: - fix corruption in RDMA in-capsule SGLs (Sagi Grimberg) - nvme-loop reset fixes (Hannes Reinecke) - nvmet fix for freeing unallocated p2pmem (Max Gurtovoy)" * tag 'nvme-5.13-2021-06-03' of git://git.infradead.org/nvme: nvmet: fix freeing unallocated p2pmem nvme-loop: do not warn for deleted controllers during reset nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue() nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues() nvme-rdma: fix in-casule data send for chained sgls commit 503d1acb01826b42e5afb496dfcc32751bec9478 Author: David Sterba Date: Thu Jun 3 15:36:52 2021 +0200 MAINTAINERS: add btrfs IRC link We haven't had an IRC link before but now it's a good time to announce where to reach the community. Signed-off-by: David Sterba commit d38fa9a155b2829b7e2cfcf8a4171b6dd3672808 Author: Patrice Chotard Date: Thu Jun 3 09:34:21 2021 +0200 spi: stm32-qspi: Always wait BUSY bit to be cleared in stm32_qspi_wait_cmd() In U-boot side, an issue has been encountered when QSPI source clock is running at low frequency (24 MHz for example), waiting for TCF bit to be set didn't ensure that all data has been send out the FIFO, we should also wait that BUSY bit is cleared. To prevent similar issue in kernel driver, we implement similar behavior by always waiting BUSY bit to be cleared. Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20210603073421.8441-1-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit 50bec7fb4cb1bcf9d387046b6dec7186590791ec Author: Axel Lin Date: Sat May 29 09:32:36 2021 +0800 regulator: hi6421v600: Fix .vsel_mask setting Take ldo3_voltages as example, the ARRAY_SIZE(ldo3_voltages) is 16. i.e. the valid selector is 0 ~ 0xF. But in current code the vsel_mask is "(1 << 15) - 1", i.e. 0x7FFF. Fix it. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210529013236.373847-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 8bef925e37bdc9b6554b85eda16ced9a8e3c135f Author: Richard Weinberger Date: Sun May 30 22:34:46 2021 +0200 ASoC: tas2562: Fix TDM_CFG0_SAMPRATE values TAS2562_TDM_CFG0_SAMPRATE_MASK starts at bit 1, not 0. So all values need to be left shifted by 1. Signed-off-by: Richard Weinberger Link: https://lore.kernel.org/r/20210530203446.19022-1-richard@nod.at Signed-off-by: Mark Brown commit d031d99b02eaf7363c33f5b27b38086cc8104082 Author: Jerome Brunet Date: Mon May 24 11:34:48 2021 +0200 ASoC: meson: gx-card: fix sound-dai dt schema There is a fair amount of warnings when running 'make dtbs_check' with amlogic,gx-sound-card.yaml. Ex: arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:1: missing phandle tag in 0 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0:2: missing phandle tag in 0 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dt.yaml: sound: dai-link-0:sound-dai:0: [66, 0, 0] is too long The reason is that the sound-dai phandle provided has cells, and in such case the schema should use 'phandle-array' instead of 'phandle'. Fixes: fd00366b8e41 ("ASoC: meson: gx: add sound card dt-binding documentation") Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210524093448.357140-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 320232caf1d8febea17312dab4b2dfe02e033520 Author: Mark Pearson Date: Wed Jun 2 13:12:51 2021 -0400 ASoC: AMD Renoir: Remove fix for DMI entry on Lenovo 2020 platforms Unfortunately the previous patch to fix issues using the AMD ACP bridge has the side effect of breaking the dmic in other cases and needs to be reverted. Removing the changes while we revisit the fix and find something better. Apologies for the churn. Suggested-by: Gabriel Craciunescu Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20210602171251.3243-1-markpearson@lenovo.com Signed-off-by: Mark Brown commit acbef0922c7db4f5ca57d6b5573f104baa485e88 Author: Yang Yingliang Date: Thu Jun 3 15:24:25 2021 +0800 dmaengine: ipu: fix doc warning in ipu_irq.c Fix the following make W=1 warning and correct description: drivers/dma/ipu/ipu_irq.c:238: warning: expecting prototype for ipu_irq_map(). Prototype was for ipu_irq_unmap() instead Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210603072425.2973570-1-yangyingliang@huawei.com Signed-off-by: Vinod Koul commit dea8464ddf553803382efb753b6727dbf3931d06 Author: Zou Wei Date: Mon May 31 14:36:03 2021 +0800 dmaengine: rcar-dmac: Fix PM reference leak in rcar_dmac_probe() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Zou Wei Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/1622442963-54095-1-git-send-email-zou_wei@huawei.com Signed-off-by: Vinod Koul commit b430e1d65ef6eeee42c4e53028f8dfcc6abc728b Author: Maximilian Luz Date: Thu Jun 3 02:06:36 2021 +0200 platform/surface: aggregator: Fix event disable function Disabling events silently fails due to the wrong command ID being used. Instead of the command ID for the disable call, the command ID for the enable call was being used. This causes the disable call to enable the event instead. As the event is already enabled when we call this function, the EC silently drops this command and does nothing. Use the correct command ID for disabling the event to fix this. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210603000636.568846-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit fcf6631f3736985ec89bdd76392d3c7bfb60119f Author: Vincent Guittot Date: Tue Jun 1 10:58:32 2021 +0200 sched/pelt: Ensure that *_sum is always synced with *_avg Rounding in PELT calculation happening when entities are attached/detached of a cfs_rq can result into situations where util/runnable_avg is not null but util/runnable_sum is. This is normally not possible so we need to ensure that util/runnable_sum stays synced with util/runnable_avg. detach_entity_load_avg() is the last place where we don't sync util/runnable_sum with util/runnbale_avg when moving some sched_entities Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210601085832.12626-1-vincent.guittot@linaro.org commit dad7b9896a5dbac5da8275d5a6147c65c81fb5f2 Author: Arnd Bergmann Date: Fri May 14 11:26:37 2021 +0100 ARM: 9081/1: fix gcc-10 thumb2-kernel regression When building the kernel wtih gcc-10 or higher using the CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y flag, the compiler picks a slightly different set of registers for the inline assembly in cpu_init() that subsequently results in a corrupt kernel stack as well as remaining in FIQ mode. If a banked register is used for the last argument, the wrong version of that register gets loaded into CPSR_c. When building in Arm mode, the arguments are passed as immediate values and the bug cannot happen. This got introduced when Daniel reworked the FIQ handling and was technically always broken, but happened to work with both clang and gcc before gcc-10 as long as they picked one of the lower registers. This is probably an indication that still very few people build the kernel in Thumb2 mode. Marek pointed out the problem on IRC, Arnd narrowed it down to this inline assembly and Russell pinpointed the exact bug. Change the constraints to force the final mode switch to use a non-banked register for the argument to ensure that the correct constant gets loaded. Another alternative would be to always use registers for the constant arguments to avoid the #ifdef that has now become more complex. Cc: # v3.18+ Cc: Daniel Thompson Reported-by: Marek Vasut Acked-by: Ard Biesheuvel Fixes: c0e7f7ee717e ("ARM: 8150/3: fiq: Replace default FIQ handler") Signed-off-by: Arnd Bergmann Signed-off-by: Russell King commit 373e864cf52403b0974c2f23ca8faf9104234555 Author: Wei Yongjun Date: Wed May 19 14:16:14 2021 +0000 ieee802154: fix error return code in ieee802154_llsec_getparams() Fix to return negative error code -ENOBUFS from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3e9c156e2c21 ("ieee802154: add netlink interfaces for llsec") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210519141614.3040055-1-weiyongjun1@huawei.com Signed-off-by: Stefan Schmidt commit 79c6b8ed30e54b401c873dbad2511f2a1c525fd5 Author: Zhen Lei Date: Sat May 8 14:25:17 2021 +0800 ieee802154: fix error return code in ieee802154_add_iface() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: be51da0f3e34 ("ieee802154: Stop using NLA_PUT*().") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210508062517.2574-1-thunder.leizhen@huawei.com Signed-off-by: Stefan Schmidt commit aab53e6756caadeb908a70d5bcdf5a24baf34ad8 Author: Andy Shevchenko Date: Mon May 31 16:22:26 2021 +0300 net: ieee802154: mrf24j40: Drop unneeded of_match_ptr() Driver can be used in different environments and moreover, when compiled with !OF, the compiler may issue a warning due to unused mrf24j40_of_match variable. Hence drop unneeded of_match_ptr() call. While at it, update headers block to reflect above changes. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210531132226.47081-1-andriy.shevchenko@linux.intel.com Signed-off-by: Stefan Schmidt commit ad6f5cc5f6c261f881e44ecd750f17952df2b496 Author: Yang Li Date: Sun Apr 25 18:24:59 2021 +0800 net/ieee802154: drop unneeded assignment in llsec_iter_devkeys() In order to keep the code style consistency of the whole file, redundant return value ‘rc’ and its assignments should be deleted The clang_analyzer complains as follows: net/ieee802154/nl-mac.c:1203:12: warning: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc' No functional change, only more efficient. Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1619346299-40237-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Stefan Schmidt commit b8b90c17602689eeaa5b219d104bbc215d1225cc Author: Hui Wang Date: Wed Jun 2 22:54:24 2021 +0800 ALSA: hda: update the power_state during the direct-complete The patch_realtek.c needs to check if the power_state.event equals PM_EVENT_SUSPEND, after using the direct-complete, the suspend() and resume() will be skipped if the codec is already rt_suspended, in this case, the patch_realtek.c will always get PM_EVENT_ON even the system is really resumed from S3. We could set power_state to PMSG_SUSPEND in the prepare(), if other PM functions are called before complete(), those functions will override power_state; if no other PM functions are called before complete(), we could know the suspend() and resume() are skipped since only S3 pm functions could be skipped by direct-complete, in this case set power_state to PMSG_RESUME in the complete(). This could guarantee the first time of calling hda_codec_runtime_resume() after complete() has the correct power_state. Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20210602145424.3132-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 9c1fe96bded935369f8340c2ac2e9e189f697d5d Author: Takashi Iwai Date: Wed Jun 2 13:38:23 2021 +0200 ALSA: timer: Fix master timer notification snd_timer_notify1() calls the notification to each slave for a master event, but it passes a wrong event number. It should be +10 offset, corresponding to SNDRV_TIMER_EVENT_MXXX, but it's incorrectly with +100 offset. Casually this was spotted by UBSAN check via syzkaller. Reported-by: syzbot+d102fa5b35335a7e544e@syzkaller.appspotmail.com Reviewed-by: Jaroslav Kysela Cc: Link: https://lore.kernel.org/r/000000000000e5560e05c3bd1d63@google.com Link: https://lore.kernel.org/r/20210602113823.23777-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 99b18e88a1cf737ae924123d63b46d9a3d17b1af Author: Jiapeng Chong Date: Wed Jun 2 18:07:26 2021 +0800 dmaengine: idxd: Fix missing error code in idxd_cdev_open() The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'rc'. Eliminate the follow smatch warning: drivers/dma/idxd/cdev.c:113 idxd_cdev_open() warn: missing error code 'rc'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Dave Jiang Link: https://lore.kernel.org/r/1622628446-87909-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Vinod Koul commit d1ce245fe409241ed6168c835a5b55ef52bdb6a9 Author: Yang Yingliang Date: Thu Jun 3 13:10:14 2021 +0800 phy: Sparx5 Eth SerDes: check return value after calling platform_get_resource() It will cause null-ptr-deref if platform_get_resource() returns NULL, we need check the return value. Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210603051014.2674744-1-yangyingliang@huawei.com Signed-off-by: Vinod Koul commit d6e9e8e5dd53419814eb54803b4ab3682b55cebe Author: Sergio Paracuellos Date: Thu Jun 3 06:32:19 2021 +0200 phy: ralink: phy-mt7621-pci: drop 'of_match_ptr' to fix -Wunused-const-variable The of_device_id is included unconditionally by of.h header and used in the driver as well. Remove of_match_ptr to fix W=1 compile test warning with !CONFIG_OF: drivers/phy/ralink/phy-mt7621-pci.c:341:34: warning: unused variable 'mt7621_pci_phy_ids' [-Wunused-const-variable] Reported-by: kernel test robot Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210603043219.32646-1-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit b45f189a19b38e01676628db79cd3eeb1333516e Author: Ritesh Harjani Date: Thu Apr 29 16:13:44 2021 +0530 ext4: fix accessing uninit percpu counter variable with fast_commit When running generic/527 with fast_commit configuration, the following issue is seen on Power. With fast_commit, during ext4_fc_replay() (which can be called from ext4_fill_super()), if inode eviction happens then it can access an uninitialized percpu counter variable. This patch adds the check before accessing the counters in ext4_free_inode() path. [ 321.165371] run fstests generic/527 at 2021-04-29 08:38:43 [ 323.027786] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: block_validity. Quota mode: none. [ 323.618772] BUG: Unable to handle kernel data access on read at 0x1fbd80000 [ 323.619767] Faulting instruction address: 0xc000000000bae78c cpu 0x1: Vector: 300 (Data Access) at [c000000010706ef0] pc: c000000000bae78c: percpu_counter_add_batch+0x3c/0x100 lr: c0000000006d0bb0: ext4_free_inode+0x780/0xb90 pid = 5593, comm = mount ext4_free_inode+0x780/0xb90 ext4_evict_inode+0xa8c/0xc60 evict+0xfc/0x1e0 ext4_fc_replay+0xc50/0x20f0 do_one_pass+0xfe0/0x1350 jbd2_journal_recover+0x184/0x2e0 jbd2_journal_load+0x1c0/0x4a0 ext4_fill_super+0x2458/0x4200 mount_bdev+0x1dc/0x290 ext4_mount+0x28/0x40 legacy_get_tree+0x4c/0xa0 vfs_get_tree+0x4c/0x120 path_mount+0xcf8/0xd70 do_mount+0x80/0xd0 sys_mount+0x3fc/0x490 system_call_exception+0x384/0x3d0 system_call_common+0xec/0x278 Cc: stable@kernel.org Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Signed-off-by: Ritesh Harjani Reviewed-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/6cceb9a75c54bef8fa9696c1b08c8df5ff6169e2.1619692410.git.riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o commit e7591a8d56bab89c617dae055446b6337ec32dc9 Author: Simon Ser Date: Wed May 26 13:55:50 2021 +0000 amd/display: convert DRM_DEBUG_ATOMIC to drm_dbg_atomic This allows to tie the log message to a specific DRM device. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit 07438603a07e52f1c6aa731842bd298d2725b7be Author: Nirmoy Das Date: Fri May 28 16:54:16 2021 +0200 drm/amdgpu: make sure we unpin the UVD BO Releasing pinned BOs is illegal now. UVD 6 was missing from: commit 2f40801dc553 ("drm/amdgpu: make sure we unpin the UVD BO") Fixes: 2f40801dc553 ("drm/amdgpu: make sure we unpin the UVD BO") Cc: stable@vger.kernel.org Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 2370eba9f552eaae3d8aa1f70b8e9eec5c560f9e Author: Victor Zhao Date: Thu Mar 18 13:44:35 2021 +0800 drm/amd/amdgpu:save psp ring wptr to avoid attack [Why] When some tools performing psp mailbox attack, the readback value of register can be a random value which may break psp. [How] Use a psp wptr cache machanism to aovid the change made by attack. v2: unify change and add detailed reason Signed-off-by: Victor Zhao Signed-off-by: Jingwen Chen Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit c5699e2d863f58221044efdc3fa712dd32d55cde Author: Roman Li Date: Mon May 10 11:58:54 2021 -0400 drm/amd/display: Fix potential memory leak in DMUB hw_init [Why] On resume we perform DMUB hw_init which allocates memory: dm_resume->dm_dmub_hw_init->dc_dmub_srv_create->kzalloc That results in memory leak in suspend/resume scenarios. [How] Allocate memory for the DC wrapper to DMUB only if it was not allocated before. No need to reallocate it on suspend/resume. Signed-off-by: Lang Yu Signed-off-by: Roman Li Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dce3d8e1d070900e0feeb06787a319ff9379212c Author: Luben Tuikov Date: Wed May 12 12:33:23 2021 -0400 drm/amdgpu: Don't query CE and UE errors On QUERY2 IOCTL don't query counts of correctable and uncorrectable errors, since when RAS is enabled and supported on Vega20 server boards, this takes insurmountably long time, in O(n^3), which slows the system down to the point of it being unusable when we have GUI up. Fixes: ae363a212b14 ("drm/amdgpu: Add a new flag to AMDGPU_CTX_OP_QUERY_STATE2") Cc: Alexander Deucher Cc: stable@vger.kernel.org Signed-off-by: Luben Tuikov Reviewed-by: Alexander Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 33f409e60eb0c59a4d0d06a62ab4642a988e17f7 Author: Rodrigo Siqueira Date: Fri May 14 07:47:34 2021 -0400 drm/amd/display: Fix overlay validation by considering cursors A few weeks ago, we saw a two cursor issue in a ChromeOS system. We fixed it in the commit: drm/amd/display: Fix two cursor duplication when using overlay (read the commit message for more details) After this change, we noticed that some IGT subtests related to kms_plane and kms_plane_scaling started to fail. After investigating this issue, we noticed that all subtests that fail have a primary plane covering the overlay plane, which is currently rejected by amdgpu dm. Fail those IGT tests highlight that our verification was too broad and compromises the overlay usage in our drive. This patch fixes this issue by ensuring that we only reject commits where the primary plane is not fully covered by the overlay when the cursor hardware is enabled. With this fix, all IGT tests start to pass again, which means our overlay support works as expected. Cc: Tianci.Yin Cc: Harry Wentland Cc: Nicholas Choi Cc: Bhawanpreet Lakha Cc: Nicholas Kazlauskas Cc: Mark Yacoub Cc: Daniel Wheeler Tested-by: Daniel Wheeler Signed-off-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 5cfc912582e13b05d71fb7acc4ec69ddfa9af320 Author: Jiansong Chen Date: Tue May 25 14:14:58 2021 +0800 drm/amdgpu: refine amdgpu_fru_get_product_info 1. eliminate potential array index out of bounds. 2. return meaningful value for failure. Signed-off-by: Jiansong Chen Reviewed-by: Jack Gui Signed-off-by: Alex Deucher commit 147feb007685cbb765b16a834d4f00675d589bb4 Author: Asher Song Date: Fri May 21 17:11:33 2021 +0800 drm/amdgpu: add judgement for dc support Drop DC initialization when DCN is harvested in VBIOS. The way doesn't affect virtual display ip initialization. Signed-off-by: Likun Gao Signed-off-by: Asher Song Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit a53085c1d20f914590fe446d01d4546150758983 Author: Nicholas Kazlauskas Date: Wed May 19 16:12:19 2021 -0400 drm/amd/display: Fix GPU scaling regression by FS video support [Why] FS video support regressed GPU scaling and the scaled buffer ends up stuck in the top left of the screen at native size - full, aspect, center scaling modes do not function. This is because decide_crtc_timing_for_drm_display_mode() does not get called when scaling is enabled. [How] Split recalculate timing and scaling into two different flags. We don't want to call drm_mode_set_crtcinfo() for scaling, but we do want to call it for FS video. Optimize and move preferred_refresh calculation next to decide_crtc_timing_for_drm_display_mode() like it used to be since that's not used for FS video. We don't need to copy over the VIC or polarity in the case of FS video modes because those don't change. Fixes: 6f59f229f8ed7a ("drm/amd/display: Skip modeset for front porch change") Cc: Aurabindo Pillai Signed-off-by: Nicholas Kazlauskas Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit ba8e59773ae59818695d1e20b8939282da80ec8c Author: Bindu Ramamurthy Date: Thu May 20 10:06:04 2021 -0400 drm/amd/display: Allow bandwidth validation for 0 streams. [Why] Bandwidth calculations are triggered for non zero streams, and in case of 0 streams, these calculations were skipped with pstate status not being updated. [How] As the pstate status is applicable for non zero streams, check added for allowing 0 streams inline with dcn internal bandwidth validations. Signed-off-by: Bindu Ramamurthy Reviewed-by: Roman Li Signed-off-by: Alex Deucher commit ab00f3e051e851a8458f0d0eb1bb426deadb6619 Author: Wong Vee Khee Date: Wed Jun 2 10:31:25 2021 +0800 net: stmmac: fix issue where clk is being unprepared twice In the case of MDIO bus registration failure due to no external PHY devices is connected to the MAC, clk_disable_unprepare() is called in stmmac_bus_clk_config() and intel_eth_pci_probe() respectively. The second call in intel_eth_pci_probe() will caused the following:- [ 16.578605] intel-eth-pci 0000:00:1e.5: No PHY found [ 16.583778] intel-eth-pci 0000:00:1e.5: stmmac_dvr_probe: MDIO bus (id: 2) registration failed [ 16.680181] ------------[ cut here ]------------ [ 16.684861] stmmac-0000:00:1e.5 already disabled [ 16.689547] WARNING: CPU: 13 PID: 2053 at drivers/clk/clk.c:952 clk_core_disable+0x96/0x1b0 [ 16.697963] Modules linked in: dwc3 iTCO_wdt mei_hdcp iTCO_vendor_support udc_core x86_pkg_temp_thermal kvm_intel marvell10g kvm sch_fq_codel nfsd irqbypass dwmac_intel(+) stmmac uio ax88179_178a pcs_xpcs phylink uhid spi_pxa2xx_platform usbnet mei_me pcspkr tpm_crb mii i2c_i801 dw_dmac dwc3_pci thermal dw_dmac_core intel_rapl_msr libphy i2c_smbus mei tpm_tis intel_th_gth tpm_tis_core tpm intel_th_acpi intel_pmc_core intel_th i915 fuse configfs snd_hda_intel snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_pcm snd_timer snd soundcore [ 16.746785] CPU: 13 PID: 2053 Comm: systemd-udevd Tainted: G U 5.13.0-rc3-intel-lts #76 [ 16.756134] Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-S ADP-S DRR4 CRB, BIOS ADLIFSI1.R00.1494.B00.2012031421 12/03/2020 [ 16.769465] RIP: 0010:clk_core_disable+0x96/0x1b0 [ 16.774222] Code: 00 8b 05 45 96 17 01 85 c0 7f 24 48 8b 5b 30 48 85 db 74 a5 8b 43 7c 85 c0 75 93 48 8b 33 48 c7 c7 6e 32 cc b7 e8 b2 5d 52 00 <0f> 0b 5b 5d c3 65 8b 05 76 31 18 49 89 c0 48 0f a3 05 bc 92 1a 01 [ 16.793016] RSP: 0018:ffffa44580523aa0 EFLAGS: 00010086 [ 16.798287] RAX: 0000000000000000 RBX: ffff8d7d0eb70a00 RCX: 0000000000000000 [ 16.805435] RDX: 0000000000000002 RSI: ffffffffb7c62d5f RDI: 00000000ffffffff [ 16.812610] RBP: 0000000000000287 R08: 0000000000000000 R09: ffffa445805238d0 [ 16.819759] R10: 0000000000000001 R11: 0000000000000001 R12: ffff8d7d0eb70a00 [ 16.826904] R13: ffff8d7d027370c8 R14: 0000000000000006 R15: ffffa44580523ad0 [ 16.834047] FS: 00007f9882fa2600(0000) GS:ffff8d80a0940000(0000) knlGS:0000000000000000 [ 16.842177] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.847966] CR2: 00007f9882bea3d8 CR3: 000000010b126001 CR4: 0000000000370ee0 [ 16.855144] Call Trace: [ 16.857614] clk_core_disable_lock+0x1b/0x30 [ 16.861941] intel_eth_pci_probe.cold+0x11d/0x136 [dwmac_intel] [ 16.867913] pci_device_probe+0xcf/0x150 [ 16.871890] really_probe+0xf5/0x3e0 [ 16.875526] driver_probe_device+0x64/0x150 [ 16.879763] device_driver_attach+0x53/0x60 [ 16.883998] __driver_attach+0x9f/0x150 [ 16.887883] ? device_driver_attach+0x60/0x60 [ 16.892288] ? device_driver_attach+0x60/0x60 [ 16.896698] bus_for_each_dev+0x77/0xc0 [ 16.900583] bus_add_driver+0x184/0x1f0 [ 16.904469] driver_register+0x6c/0xc0 [ 16.908268] ? 0xffffffffc07ae000 [ 16.911598] do_one_initcall+0x4a/0x210 [ 16.915489] ? kmem_cache_alloc_trace+0x305/0x4e0 [ 16.920247] do_init_module+0x5c/0x230 [ 16.924057] load_module+0x2894/0x2b70 [ 16.927857] ? __do_sys_finit_module+0xb5/0x120 [ 16.932441] __do_sys_finit_module+0xb5/0x120 [ 16.936845] do_syscall_64+0x42/0x80 [ 16.940476] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 16.945586] RIP: 0033:0x7f98830e5ccd [ 16.949177] 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 8b 0d 93 31 0c 00 f7 d8 64 89 01 48 [ 16.967970] RSP: 002b:00007ffc66b60168 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 16.975583] RAX: ffffffffffffffda RBX: 000055885de35ef0 RCX: 00007f98830e5ccd [ 16.982725] RDX: 0000000000000000 RSI: 00007f98832541e3 RDI: 0000000000000012 [ 16.989868] RBP: 0000000000020000 R08: 0000000000000000 R09: 0000000000000000 [ 16.997042] R10: 0000000000000012 R11: 0000000000000246 R12: 00007f98832541e3 [ 17.004222] R13: 0000000000000000 R14: 0000000000000000 R15: 00007ffc66b60328 [ 17.011369] ---[ end trace df06a3dab26b988c ]--- [ 17.016062] ------------[ cut here ]------------ [ 17.020701] stmmac-0000:00:1e.5 already unprepared Removing the stmmac_bus_clks_config() call in stmmac_dvr_probe and let dwmac-intel to handle the unprepare and disable of the clk device. Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver") Cc: Joakim Zhang Signed-off-by: Wong Vee Khee Reviewed-by: Joakim Zhang Signed-off-by: David S. Miller commit b508d5fb69c2211a1b860fc058aafbefc3b3c3cd Author: Josh Triplett Date: Tue Jun 1 18:38:41 2021 -0700 net: ipconfig: Don't override command-line hostnames or domains If the user specifies a hostname or domain name as part of the ip= command-line option, preserve it and don't overwrite it with one supplied by DHCP/BOOTP. For instance, ip=::::myhostname::dhcp will use "myhostname" rather than ignoring and overwriting it. Fix the comment on ic_bootp_string that suggests it only copies a string "if not already set"; it doesn't have any such logic. Signed-off-by: Josh Triplett Signed-off-by: David S. Miller commit dd62766239d54e00201a6a75b6b348f816bb96af Merge: b000372627ce9 216214c64a8c1 Author: David S. Miller Date: Wed Jun 2 13:12:00 2021 -0700 Merge tag 'mlx5-fixes-2021-06-01' of git://git.kernel.org/pub/scm/linu x/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2021-06-01 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. ==================== Signed-off-by: David S. Miller commit ff40e51043af63715ab413995ff46996ecf9583f Author: Daniel Borkmann Date: Fri May 28 09:16:31 2021 +0000 bpf, lockdown, audit: Fix buggy SELinux lockdown permission checks Commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") added an implementation of the locked_down LSM hook to SELinux, with the aim to restrict which domains are allowed to perform operations that would breach lockdown. This is indirectly also getting audit subsystem involved to report events. The latter is problematic, as reported by Ondrej and Serhei, since it can bring down the whole system via audit: 1) The audit events that are triggered due to calls to security_locked_down() can OOM kill a machine, see below details [0]. 2) It also seems to be causing a deadlock via avc_has_perm()/slow_avc_audit() when trying to wake up kauditd, for example, when using trace_sched_switch() tracepoint, see details in [1]. Triggering this was not via some hypothetical corner case, but with existing tools like runqlat & runqslower from bcc, for example, which make use of this tracepoint. Rough call sequence goes like: rq_lock(rq) -> -------------------------+ trace_sched_switch() -> | bpf_prog_xyz() -> +-> deadlock selinux_lockdown() -> | audit_log_end() -> | wake_up_interruptible() -> | try_to_wake_up() -> | rq_lock(rq) --------------+ What's worse is that the intention of 59438b46471a to further restrict lockdown settings for specific applications in respect to the global lockdown policy is completely broken for BPF. The SELinux policy rule for the current lockdown check looks something like this: allow : lockdown { }; However, this doesn't match with the 'current' task where the security_locked_down() is executed, example: httpd does a syscall. There is a tracing program attached to the syscall which triggers a BPF program to run, which ends up doing a bpf_probe_read_kernel{,_str}() helper call. The selinux_lockdown() hook does the permission check against 'current', that is, httpd in this example. httpd has literally zero relation to this tracing program, and it would be nonsensical having to write an SELinux policy rule against httpd to let the tracing helper pass. The policy in this case needs to be against the entity that is installing the BPF program. For example, if bpftrace would generate a histogram of syscall counts by user space application: bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @[comm] = count(); }' bpftrace would then go and generate a BPF program from this internally. One way of doing it [for the sake of the example] could be to call bpf_get_current_task() helper and then access current->comm via one of bpf_probe_read_kernel{,_str}() helpers. So the program itself has nothing to do with httpd or any other random app doing a syscall here. The BPF program _explicitly initiated_ the lockdown check. The allow/deny policy belongs in the context of bpftrace: meaning, you want to grant bpftrace access to use these helpers, but other tracers on the system like my_random_tracer _not_. Therefore fix all three issues at the same time by taking a completely different approach for the security_locked_down() hook, that is, move the check into the program verification phase where we actually retrieve the BPF func proto. This also reliably gets the task (current) that is trying to install the BPF tracing program, e.g. bpftrace/bcc/perf/systemtap/etc, and it also fixes the OOM since we're moving this out of the BPF helper's fast-path which can be called several millions of times per second. The check is then also in line with other security_locked_down() hooks in the system where the enforcement is performed at open/load time, for example, open_kcore() for /proc/kcore access or module_sig_check() for module signatures just to pick few random ones. What's out of scope in the fix as well as in other security_locked_down() hook locations /outside/ of BPF subsystem is that if the lockdown policy changes on the fly there is no retrospective action. This requires a different discussion, potentially complex infrastructure, and it's also not clear whether this can be solved generically. Either way, it is out of scope for a suitable stable fix which this one is targeting. Note that the breakage is specifically on 59438b46471a where it started to rely on 'current' as UAPI behavior, and _not_ earlier infrastructure such as 9d1f8be5cf42 ("bpf: Restrict bpf when kernel lockdown is in confidentiality mode"). [0] https://bugzilla.redhat.com/show_bug.cgi?id=1955585, Jakub Hrozek says: I starting seeing this with F-34. When I run a container that is traced with BPF to record the syscalls it is doing, auditd is flooded with messages like: type=AVC msg=audit(1619784520.593:282387): avc: denied { confidentiality } for pid=476 comm="auditd" lockdown_reason="use of bpf to read kernel RAM" scontext=system_u:system_r:auditd_t:s0 tcontext=system_u:system_r:auditd_t:s0 tclass=lockdown permissive=0 This seems to be leading to auditd running out of space in the backlog buffer and eventually OOMs the machine. [...] auditd running at 99% CPU presumably processing all the messages, eventually I get: Apr 30 12:20:42 fedora kernel: audit: backlog limit exceeded Apr 30 12:20:42 fedora kernel: audit: backlog limit exceeded Apr 30 12:20:42 fedora kernel: audit: audit_backlog=2152579 > audit_backlog_limit=64 Apr 30 12:20:42 fedora kernel: audit: audit_backlog=2152626 > audit_backlog_limit=64 Apr 30 12:20:42 fedora kernel: audit: audit_backlog=2152694 > audit_backlog_limit=64 Apr 30 12:20:42 fedora kernel: audit: audit_lost=6878426 audit_rate_limit=0 audit_backlog_limit=64 Apr 30 12:20:45 fedora kernel: oci-seccomp-bpf invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=-1000 Apr 30 12:20:45 fedora kernel: CPU: 0 PID: 13284 Comm: oci-seccomp-bpf Not tainted 5.11.12-300.fc34.x86_64 #1 Apr 30 12:20:45 fedora kernel: Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-2.fc32 04/01/2014 [...] [1] https://lore.kernel.org/linux-audit/CANYvDQN7H5tVp47fbYcRasv4XF07eUbsDwT_eDCHXJUj43J7jQ@mail.gmail.com/, Serhei Makarov says: Upstream kernel 5.11.0-rc7 and later was found to deadlock during a bpf_probe_read_compat() call within a sched_switch tracepoint. The problem is reproducible with the reg_alloc3 testcase from SystemTap's BPF backend testsuite on x86_64 as well as the runqlat, runqslower tools from bcc on ppc64le. Example stack trace: [...] [ 730.868702] stack backtrace: [ 730.869590] CPU: 1 PID: 701 Comm: in:imjournal Not tainted, 5.12.0-0.rc2.20210309git144c79ef3353.166.fc35.x86_64 #1 [ 730.871605] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 [ 730.873278] Call Trace: [ 730.873770] dump_stack+0x7f/0xa1 [ 730.874433] check_noncircular+0xdf/0x100 [ 730.875232] __lock_acquire+0x1202/0x1e10 [ 730.876031] ? __lock_acquire+0xfc0/0x1e10 [ 730.876844] lock_acquire+0xc2/0x3a0 [ 730.877551] ? __wake_up_common_lock+0x52/0x90 [ 730.878434] ? lock_acquire+0xc2/0x3a0 [ 730.879186] ? lock_is_held_type+0xa7/0x120 [ 730.880044] ? skb_queue_tail+0x1b/0x50 [ 730.880800] _raw_spin_lock_irqsave+0x4d/0x90 [ 730.881656] ? __wake_up_common_lock+0x52/0x90 [ 730.882532] __wake_up_common_lock+0x52/0x90 [ 730.883375] audit_log_end+0x5b/0x100 [ 730.884104] slow_avc_audit+0x69/0x90 [ 730.884836] avc_has_perm+0x8b/0xb0 [ 730.885532] selinux_lockdown+0xa5/0xd0 [ 730.886297] security_locked_down+0x20/0x40 [ 730.887133] bpf_probe_read_compat+0x66/0xd0 [ 730.887983] bpf_prog_250599c5469ac7b5+0x10f/0x820 [ 730.888917] trace_call_bpf+0xe9/0x240 [ 730.889672] perf_trace_run_bpf_submit+0x4d/0xc0 [ 730.890579] perf_trace_sched_switch+0x142/0x180 [ 730.891485] ? __schedule+0x6d8/0xb20 [ 730.892209] __schedule+0x6d8/0xb20 [ 730.892899] schedule+0x5b/0xc0 [ 730.893522] exit_to_user_mode_prepare+0x11d/0x240 [ 730.894457] syscall_exit_to_user_mode+0x27/0x70 [ 730.895361] entry_SYSCALL_64_after_hwframe+0x44/0xae [...] Fixes: 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") Reported-by: Ondrej Mosnacek Reported-by: Jakub Hrozek Reported-by: Serhei Makarov Reported-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Tested-by: Jiri Olsa Cc: Paul Moore Cc: James Morris Cc: Jerome Marchand Cc: Frank Eigler Cc: Linus Torvalds Link: https://lore.kernel.org/bpf/01135120-8bf7-df2e-cff0-1d73f1f841c3@iogearbox.net commit d4c6399900364facd84c9e35ce1540b6046c345f Author: Nathan Chancellor Date: Wed May 5 17:14:11 2021 -0700 vmlinux.lds.h: Avoid orphan section with !SMP With x86_64_defconfig and the following configs, there is an orphan section warning: CONFIG_SMP=n CONFIG_AMD_MEM_ENCRYPT=y CONFIG_HYPERVISOR_GUEST=y CONFIG_KVM=y CONFIG_PARAVIRT=y ld: warning: orphan section `.data..decrypted' from `arch/x86/kernel/cpu/vmware.o' being placed in section `.data..decrypted' ld: warning: orphan section `.data..decrypted' from `arch/x86/kernel/kvm.o' being placed in section `.data..decrypted' These sections are created with DEFINE_PER_CPU_DECRYPTED, which ultimately turns into __PCPU_ATTRS, which in turn has a section attribute with a value of PER_CPU_BASE_SECTION + the section name. When CONFIG_SMP is not set, the base section is .data and that is not currently handled in any linker script. Add .data..decrypted to PERCPU_DECRYPTED_SECTION, which is included in PERCPU_INPUT -> PERCPU_SECTION, which is include in the x86 linker script when either CONFIG_X86_64 or CONFIG_SMP is unset, taking care of the warning. Fixes: ac26963a1175 ("percpu: Introduce DEFINE_PER_CPU_DECRYPTED") Link: https://github.com/ClangBuiltLinux/linux/issues/1360 Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Tested-by: Nick Desaulniers # build Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210506001410.1026691-1-nathan@kernel.org commit d94b93a9101573eb75b819dee94b1417acff631b Author: Arnd Bergmann Date: Wed Dec 30 16:54:56 2020 +0100 ARM: cpuidle: Avoid orphan section warning Since commit 83109d5d5fba ("x86/build: Warn on orphan section placement"), we get a warning for objects in orphan sections. The cpuidle implementation for OMAP causes this when CONFIG_CPU_IDLE is disabled: arm-linux-gnueabi-ld: warning: orphan section `__cpuidle_method_of_table' from `arch/arm/mach-omap2/pm33xx-core.o' being placed in section `__cpuidle_method_of_table' arm-linux-gnueabi-ld: warning: orphan section `__cpuidle_method_of_table' from `arch/arm/mach-omap2/pm33xx-core.o' being placed in section `__cpuidle_method_of_table' arm-linux-gnueabi-ld: warning: orphan section `__cpuidle_method_of_table' from `arch/arm/mach-omap2/pm33xx-core.o' being placed in section `__cpuidle_method_of_table' Change the definition of CPUIDLE_METHOD_OF_DECLARE() to silently drop the table and all code referenced from it when CONFIG_CPU_IDLE is disabled. Fixes: 06ee7a950b6a ("ARM: OMAP2+: pm33xx-core: Add cpuidle_ops for am335x/am437x") Signed-off-by: Arnd Bergmann Reviewed-by: Miguel Ojeda Reviewed-by: Nick Desaulniers Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20201230155506.1085689-1-arnd@kernel.org commit 324c92e5e0ee0e993bdb106fac407846ed677f6b Merge: 0372b6dd6cfef e169fba4f4647 Author: Linus Torvalds Date: Wed Jun 2 08:53:37 2021 -1000 Merge tag 'efi-urgent-2021-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "A handful of EFI fixes: - Fix/robustify a diagnostic printk - Fix a (normally not triggered) parser bug in the libstub code - Allow !EFI_MEMORY_XP && !EFI_MEMORY_RO entries in the memory map - Stop RISC-V from crashing on boot if there's no FDT table" * tag 'efi-urgent-2021-06-02' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi: cper: fix snprintf() use in cper_dimm_err_location() efi/libstub: prevent read overflow in find_file_option() efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared efi/fdt: fix panic when no valid fdt found commit 0372b6dd6cfef9db032e0ed83a6ddfb84d9920dc Merge: 3bfc6ffb616f1 e4dfe10837121 Author: Linus Torvalds Date: Wed Jun 2 08:46:57 2021 -1000 Merge tag 'acpi-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a mutex object memory leak in ACPICA occurring during object deletion that was introduced in 5.12-rc1 (Erik Kaneda)" * tag 'acpi-5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Clean up context mutex during object deletion commit 3bfc6ffb616f14dc268aa121b71637ef06654e92 Merge: 231bc53906676 f0fb26c456a30 Author: Linus Torvalds Date: Wed Jun 2 08:41:45 2021 -1000 Merge tag 'hwmon-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "The most notable fix is for the q54sj108a2 driver to let it actually instantiate. Also attribute fixes for pmbus/isl68137, pmbus/fsp-3y, and dell-smm-hwmon drivers" * tag 'hwmon-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon/pmbus: (q54sj108a2) The PMBUS_MFR_ID is actually 6 chars instead of 5 hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_3 for RAA228228 hwmon: (pmbus/fsp-3y) Fix FSP-3Y YH-5151E VOUT hwmon: (dell-smm-hwmon) Fix index values commit a3e74fb9247cd530dca246699d5eb5a691884d32 Author: Kamal Heib Date: Tue May 25 18:01:34 2021 +0300 RDMA/ipoib: Fix warning caused by destroying non-initial netns After the commit 5ce2dced8e95 ("RDMA/ipoib: Set rtnl_link_ops for ipoib interfaces"), if the IPoIB device is moved to non-initial netns, destroying that netns lets the device vanish instead of moving it back to the initial netns, This is happening because default_device_exit() skips the interfaces due to having rtnl_link_ops set. Steps to reporoduce: ip netns add foo ip link set mlx5_ib0 netns foo ip netns delete foo WARNING: CPU: 1 PID: 704 at net/core/dev.c:11435 netdev_exit+0x3f/0x50 Modules linked in: xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 nft_compat nft_counter nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink tun d fuse CPU: 1 PID: 704 Comm: kworker/u64:3 Tainted: G S W 5.13.0-rc1+ #1 Hardware name: Dell Inc. PowerEdge R630/02C2CP, BIOS 2.1.5 04/11/2016 Workqueue: netns cleanup_net RIP: 0010:netdev_exit+0x3f/0x50 Code: 48 8b bb 30 01 00 00 e8 ef 81 b1 ff 48 81 fb c0 3a 54 a1 74 13 48 8b 83 90 00 00 00 48 81 c3 90 00 00 00 48 39 d8 75 02 5b c3 <0f> 0b 5b c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 RSP: 0018:ffffb297079d7e08 EFLAGS: 00010206 RAX: ffff8eb542c00040 RBX: ffff8eb541333150 RCX: 000000008010000d RDX: 000000008010000e RSI: 000000008010000d RDI: ffff8eb440042c00 RBP: ffffb297079d7e48 R08: 0000000000000001 R09: ffffffff9fdeac00 R10: ffff8eb5003be000 R11: 0000000000000001 R12: ffffffffa1545620 R13: ffffffffa1545628 R14: 0000000000000000 R15: ffffffffa1543b20 FS: 0000000000000000(0000) GS:ffff8ed37fa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005601b5f4c2e8 CR3: 0000001fc8c10002 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ops_exit_list.isra.9+0x36/0x70 cleanup_net+0x234/0x390 process_one_work+0x1cb/0x360 ? process_one_work+0x360/0x360 worker_thread+0x30/0x370 ? process_one_work+0x360/0x360 kthread+0x116/0x130 ? kthread_park+0x80/0x80 ret_from_fork+0x22/0x30 To avoid the above warning and later on the kernel panic that could happen on shutdown due to a NULL pointer dereference, make sure to set the netns_refund flag that was introduced by commit 3a5ca857079e ("can: dev: Move device back to init netns on owning netns delete") to properly restore the IPoIB interfaces to the initial netns. Fixes: 5ce2dced8e95 ("RDMA/ipoib: Set rtnl_link_ops for ipoib interfaces") Link: https://lore.kernel.org/r/20210525150134.139342-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6490fa565534fa83593278267785a694fd378a2b Author: Kyle Tso Date: Fri May 28 16:16:13 2021 +0800 usb: pd: Set PD_T_SINK_WAIT_CAP to 310ms Current timer PD_T_SINK_WAIT_CAP is set to 240ms which will violate the SinkWaitCapTimer (tTypeCSinkWaitCap 310 - 620 ms) defined in the PD Spec if the port is faster enough when running the state machine. Set it to the lower bound 310ms to ensure the timeout is in Spec. Fixes: f0690a25a140 ("staging: typec: USB Type-C Port Manager (tcpm)") Cc: stable Reviewed-by: Guenter Roeck Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210528081613.730661-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit b65ba0c362be665192381cc59e3ac3ef6f0dd1e1 Author: Thomas Petazzoni Date: Fri May 28 16:04:46 2021 +0200 usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling In commit 92af4fc6ec33 ("usb: musb: Fix suspend with devices connected for a64"), the logic to support the MUSB_QUIRK_B_DISCONNECT_99 quirk was modified to only conditionally schedule the musb->irq_work delayed work. This commit badly breaks ECM Gadget on AM335X. Indeed, with this commit, one can observe massive packet loss: $ ping 192.168.0.100 ... 15 packets transmitted, 3 received, 80% packet loss, time 14316ms Reverting this commit brings back a properly functioning ECM Gadget. An analysis of the commit seems to indicate that a mistake was made: the previous code was not falling through into the MUSB_QUIRK_B_INVALID_VBUS_91, but now it is, unless the condition is taken. Changing the logic to be as it was before the problematic commit *and* only conditionally scheduling musb->irq_work resolves the regression: $ ping 192.168.0.100 ... 64 packets transmitted, 64 received, 0% packet loss, time 64475ms Fixes: 92af4fc6ec33 ("usb: musb: Fix suspend with devices connected for a64") Cc: stable@vger.kernel.org Tested-by: Alexandre Belloni Tested-by: Drew Fustini Acked-by: Tony Lindgren Signed-off-by: Thomas Petazzoni Link: https://lore.kernel.org/r/20210528140446.278076-1-thomas.petazzoni@bootlin.com Signed-off-by: Greg Kroah-Hartman commit 03715ea2e3dbbc56947137ce3b4ac18a726b2f87 Author: Jack Pham Date: Fri May 28 09:04:05 2021 -0700 usb: dwc3: gadget: Bail from dwc3_gadget_exit() if dwc->gadget is NULL There exists a possible scenario in which dwc3_gadget_init() can fail: during during host -> peripheral mode switch in dwc3_set_mode(), and a pending gadget driver fails to bind. Then, if the DRD undergoes another mode switch from peripheral->host the resulting dwc3_gadget_exit() will attempt to reference an invalid and dangling dwc->gadget pointer as well as call dma_free_coherent() on unmapped DMA pointers. The exact scenario can be reproduced as follows: - Start DWC3 in peripheral mode - Configure ConfigFS gadget with FunctionFS instance (or use g_ffs) - Run FunctionFS userspace application (open EPs, write descriptors, etc) - Bind gadget driver to DWC3's UDC - Switch DWC3 to host mode => dwc3_gadget_exit() is called. usb_del_gadget() will put the ConfigFS driver instance on the gadget_driver_pending_list - Stop FunctionFS application (closes the ep files) - Switch DWC3 to peripheral mode => dwc3_gadget_init() fails as usb_add_gadget() calls check_pending_gadget_drivers() and attempts to rebind the UDC to the ConfigFS gadget but fails with -19 (-ENODEV) because the FFS instance is not in FFS_ACTIVE state (userspace has not re-opened and written the descriptors yet, i.e. desc_ready!=0). - Switch DWC3 back to host mode => dwc3_gadget_exit() is called again, but this time dwc->gadget is invalid. Although it can be argued that userspace should take responsibility for ensuring that the FunctionFS application be ready prior to allowing the composite driver bind to the UDC, failure to do so should not result in a panic from the kernel driver. Fix this by setting dwc->gadget to NULL in the failure path of dwc3_gadget_init() and add a check to dwc3_gadget_exit() to bail out unless the gadget pointer is valid. Fixes: e81a7018d93a ("usb: dwc3: allocate gadget structure dynamically") Cc: Reviewed-by: Peter Chen Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210528160405.17550-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 8212937305f84ef73ea81036dafb80c557583d4b Author: Wesley Cheng Date: Thu May 20 21:23:57 2021 -0700 usb: dwc3: gadget: Disable gadget IRQ during pullup disable Current sequence utilizes dwc3_gadget_disable_irq() alongside synchronize_irq() to ensure that no further DWC3 events are generated. However, the dwc3_gadget_disable_irq() API only disables device specific events. Endpoint events can still be generated. Briefly disable the interrupt line, so that the cleanup code can run to prevent device and endpoint events. (i.e. __dwc3_gadget_stop() and dwc3_stop_active_transfers() respectively) Without doing so, it can lead to both the interrupt handler and the pullup disable routine both writing to the GEVNTCOUNT register, which will cause an incorrect count being read from future interrupts. Fixes: ae7e86108b12 ("usb: dwc3: Stop active transfers before halting the controller") Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1621571037-1424-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit b87482dfe800f326f8f5b0093273ee6bd5b5fe9f Author: Matthew Auld Date: Thu May 27 19:51:45 2021 +0100 Revert "i915: use io_mapping_map_user" This reverts commit b739f125e4ebd73d10ed30a856574e13649119ed. We are unfortunately seeing more issues like we did in 293837b9ac8d ("Revert "i915: fix remap_io_sg to verify the pgprot""), except this is now for the vm_fault_gtt path, where we are now hitting the same BUG_ON(!pte_none(*pte)): [10887.466150] kernel BUG at mm/memory.c:2183! [10887.466162] invalid opcode: 0000 [#1] PREEMPT SMP PTI [10887.466168] CPU: 0 PID: 7775 Comm: ffmpeg Tainted: G U 5.13.0-rc3-CI-Nightly #1 [10887.466174] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./J4205-ITX, BIOS P1.40 07/14/2017 [10887.466177] RIP: 0010:remap_pfn_range_notrack+0x30f/0x440 [10887.466188] Code: e8 96 d7 e0 ff 84 c0 0f 84 27 01 00 00 48 ba 00 f0 ff ff ff ff 0f 00 4c 89 e0 48 c1 e0 0c 4d 85 ed 75 96 48 21 d0 31 f6 eb a9 <0f> 0b 48 39 37 0f 85 0e 01 00 00 48 8b 0c 24 48 39 4f 08 0f 85 00 [10887.466193] RSP: 0018:ffffc90006e33c50 EFLAGS: 00010286 [10887.466198] RAX: 800000000000002f RBX: 00007f5e01800000 RCX: 0000000000000028 [10887.466201] RDX: 0000000000000001 RSI: ffffea0000000000 RDI: 0000000000000000 [10887.466204] RBP: ffffea000033fea8 R08: 800000000000002f R09: ffff8881072256e0 [10887.466207] R10: ffffc9000b84fff8 R11: 0000000017dab000 R12: 0000000000089f9f [10887.466210] R13: 800000000000002f R14: 00007f5e017e4000 R15: ffff88800cffaf20 [10887.466213] FS: 00007f5e04849640(0000) GS:ffff888278000000(0000) knlGS:0000000000000000 [10887.466216] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [10887.466220] CR2: 00007fd9b191a2ac CR3: 00000001829ac000 CR4: 00000000003506f0 [10887.466223] Call Trace: [10887.466233] vm_fault_gtt+0x1ca/0x5d0 [i915] [10887.466381] ? ktime_get+0x38/0x90 [10887.466389] __do_fault+0x37/0x90 [10887.466395] __handle_mm_fault+0xc46/0x1200 [10887.466402] handle_mm_fault+0xce/0x2a0 [10887.466407] do_user_addr_fault+0x1c5/0x660 Reverting this commit is reported to fix the issue. Reported-by: Eero Tamminen References: https://gitlab.freedesktop.org/drm/intel/-/issues/3519 Fixes: b739f125e4eb ("i915: use io_mapping_map_user") Cc: Christoph Hellwig Cc: Daniel Vetter Signed-off-by: Matthew Auld Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210527185145.458021-1-matthew.auld@intel.com (cherry picked from commit 0e4fe0c9f2f981f26e01b73f3c465ca314c4f9c0) Signed-off-by: Jani Nikula commit 10c1f0cbcea93beec5d3bdc02b1a3b577b4985e7 Author: Zhihao Cheng Date: Tue Jun 1 09:19:35 2021 +0000 drm/i915/selftests: Fix return value check in live_breadcrumbs_smoketest() In case of error, the function live_context() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 52c0fdb25c7c ("drm/i915: Replace global breadcrumbs with per-context interrupt tracking") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/33c46ef24cd547d0ad21dc106441491a@intel.com [tursulin: Wrap commit text, fix Fixes: tag.] Signed-off-by: Tvrtko Ursulin (cherry picked from commit 8f4caef8d5401b42c6367d46c23da5e0e8111516) Signed-off-by: Jani Nikula commit f131767eefc47de2f8afb7950cdea78397997d66 Author: zpershuai Date: Thu May 27 18:20:57 2021 +0800 spi: spi-zynq-qspi: Fix some wrong goto jumps & missing error code In zynq_qspi_probe function, when enable the device clock is done, the return of all the functions should goto the clk_dis_all label. If num_cs is not right then this should return a negative error code but currently it returns success. Signed-off-by: zpershuai Link: https://lore.kernel.org/r/1622110857-21812-1-git-send-email-zpershuai@gmail.com Signed-off-by: Mark Brown commit bc537e65b09a05923f98a31920d1ab170e648dba Author: Matti Vaittinen Date: Wed Jun 2 08:45:58 2021 +0300 regulator: bd718x7: Fix the BUCK7 voltage setting on BD71837 Changing the BD71837 voltages for other regulators except the first 4 BUCKs should be forbidden when the regulator is enabled. There may be out-of-spec voltage spikes if the voltage of these "non DVS" bucks is changed when enabled. This restriction was accidentally removed when the LDO voltage change was allowed for BD71847. (It was not noticed that the BD71837 BUCK7 used same voltage setting function as LDOs). Additionally this bug causes incorrect voltage monitoring register access. The voltage change function accidentally used for bd71837 BUCK7 is intended to only handle LDO voltage changes. A BD71847 LDO specific voltage monitoring disabling code gets executed on BD71837 and register offsets are wrongly calculated as regulator is assumed to be an LDO. Prevent the BD71837 BUCK7 voltage change when BUCK7 is enabled by using the correct voltage setting operation. Fixes: 9bcbabafa19b ("regulator: bd718x7: remove voltage change restriction from BD71847 LDOs") Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/bd8c00931421fafa57e3fdf46557a83075b7cc17.1622610103.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit 19a0aa9b04c5ab9a063b6ceaf7211ee7d9a9d24d Author: Mark Pearson Date: Mon May 31 10:55:02 2021 -0400 ASoC: AMD Renoir - add DMI entry for Lenovo 2020 AMD platforms More laptops identified where the AMD ACP bridge needs to be blocked or the microphone will not work when connected to HDMI. Use DMI to block the microphone PCM device for these platforms. Suggested-by: Gabriel Craciunescu Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20210531145502.6079-1-markpearson@lenovo.com Signed-off-by: Mark Brown commit 8971ee8b087750a23f3cd4dc55bff2d0303fd267 Author: Pablo Neira Ayuso Date: Fri May 28 13:45:16 2021 +0200 netfilter: nfnetlink_cthelper: hit EBUSY on updates if size mismatches The private helper data size cannot be updated. However, updates that contain NFCTH_PRIV_DATA_LEN might bogusly hit EBUSY even if the size is the same. Fixes: 12f7a505331e ("netfilter: add user-space connection tracking helper infrastructure") Signed-off-by: Pablo Neira Ayuso commit 1710eb913bdcda3917f44d383c32de6bdabfc836 Author: Pablo Neira Ayuso Date: Thu May 27 21:54:42 2021 +0200 netfilter: nft_ct: skip expectations for confirmed conntrack nft_ct_expect_obj_eval() calls nf_ct_ext_add() for a confirmed conntrack entry. However, nf_ct_ext_add() can only be called for !nf_ct_is_confirmed(). [ 1825.349056] WARNING: CPU: 0 PID: 1279 at net/netfilter/nf_conntrack_extend.c:48 nf_ct_xt_add+0x18e/0x1a0 [nf_conntrack] [ 1825.351391] RIP: 0010:nf_ct_ext_add+0x18e/0x1a0 [nf_conntrack] [ 1825.351493] Code: 41 5c 41 5d 41 5e 41 5f c3 41 bc 0a 00 00 00 e9 15 ff ff ff ba 09 00 00 00 31 f6 4c 89 ff e8 69 6c 3d e9 eb 96 45 31 ed eb cd <0f> 0b e9 b1 fe ff ff e8 86 79 14 e9 eb bf 0f 1f 40 00 0f 1f 44 00 [ 1825.351721] RSP: 0018:ffffc90002e1f1e8 EFLAGS: 00010202 [ 1825.351790] RAX: 000000000000000e RBX: ffff88814f5783c0 RCX: ffffffffc0e4f887 [ 1825.351881] RDX: dffffc0000000000 RSI: 0000000000000008 RDI: ffff88814f578440 [ 1825.351971] RBP: 0000000000000000 R08: 0000000000000000 R09: ffff88814f578447 [ 1825.352060] R10: ffffed1029eaf088 R11: 0000000000000001 R12: ffff88814f578440 [ 1825.352150] R13: ffff8882053f3a00 R14: 0000000000000000 R15: 0000000000000a20 [ 1825.352240] FS: 00007f992261c900(0000) GS:ffff889faec00000(0000) knlGS:0000000000000000 [ 1825.352343] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1825.352417] CR2: 000056070a4d1158 CR3: 000000015efe0000 CR4: 0000000000350ee0 [ 1825.352508] Call Trace: [ 1825.352544] nf_ct_helper_ext_add+0x10/0x60 [nf_conntrack] [ 1825.352641] nft_ct_expect_obj_eval+0x1b8/0x1e0 [nft_ct] [ 1825.352716] nft_do_chain+0x232/0x850 [nf_tables] Add the ct helper extension only for unconfirmed conntrack. Skip rule evaluation if the ct helper extension does not exist. Thus, you can only create expectations from the first packet. It should be possible to remove this limitation by adding a new action to attach a generic ct helper to the first packet. Then, use this ct helper extension from follow up packets to create the ct expectation. While at it, add a missing check to skip the template conntrack too and remove check for IPCT_UNTRACK which is implicit to !ct. Fixes: 857b46027d6f ("netfilter: nft_ct: add ct expectations support") Signed-off-by: Pablo Neira Ayuso commit 3ae72f6ab9c1f688bd578cdc252dabce65fdaf57 Author: Dongliang Mu Date: Wed Jun 2 11:41:36 2021 +0800 ALSA: control led: fix memory leak in snd_ctl_led_register The snd_ctl_led_sysfs_add and snd_ctl_led_sysfs_remove should contain the refcount operations in pair. However, snd_ctl_led_sysfs_remove fails to decrease the refcount to zero, which causes device_release never to be invoked. This leads to memory leak to some resources, like struct device_private. In addition, we also free some other similar memory leaks in snd_ctl_led_init/snd_ctl_led_exit. Fix this by replacing device_del to device_unregister in snd_ctl_led_sysfs_remove/snd_ctl_led_init/snd_ctl_led_exit. Note that, when CONFIG_DEBUG_KOBJECT_RELEASE is enabled, put_device will call kobject_release and delay the release of kobject, which will cause use-after-free when the memory backing the kobject is freed at once. Reported-by: syzbot+08a7d8b51ea048a74ffb@syzkaller.appspotmail.com Fixes: a135dfb5de15 ("ALSA: led control - add sysfs kcontrol LED marking layer") Signed-off-by: Dongliang Mu Reviewed-by: Dan Carpenter Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210602034136.2762497-1-mudongliangabcd@gmail.com Signed-off-by: Takashi Iwai commit bcd9a0797d73eeff659582f23277e7ab6e5f18f3 Author: Max Gurtovoy Date: Tue Jun 1 19:22:05 2021 +0300 nvmet: fix freeing unallocated p2pmem In case p2p device was found but the p2p pool is empty, the nvme target is still trying to free the sgl from the p2p pool instead of the regular sgl pool and causing a crash (BUG() is called). Instead, assign the p2p_dev for the request only if it was allocated from p2p pool. This is the crash that was caused: [Sun May 30 19:13:53 2021] ------------[ cut here ]------------ [Sun May 30 19:13:53 2021] kernel BUG at lib/genalloc.c:518! [Sun May 30 19:13:53 2021] invalid opcode: 0000 [#1] SMP PTI ... [Sun May 30 19:13:53 2021] kernel BUG at lib/genalloc.c:518! ... [Sun May 30 19:13:53 2021] RIP: 0010:gen_pool_free_owner+0xa8/0xb0 ... [Sun May 30 19:13:53 2021] Call Trace: [Sun May 30 19:13:53 2021] ------------[ cut here ]------------ [Sun May 30 19:13:53 2021] pci_free_p2pmem+0x2b/0x70 [Sun May 30 19:13:53 2021] pci_p2pmem_free_sgl+0x4f/0x80 [Sun May 30 19:13:53 2021] nvmet_req_free_sgls+0x1e/0x80 [nvmet] [Sun May 30 19:13:53 2021] kernel BUG at lib/genalloc.c:518! [Sun May 30 19:13:53 2021] nvmet_rdma_release_rsp+0x4e/0x1f0 [nvmet_rdma] [Sun May 30 19:13:53 2021] nvmet_rdma_send_done+0x1c/0x60 [nvmet_rdma] Fixes: c6e3f1339812 ("nvmet: add metadata support for block devices") Reviewed-by: Israel Rukshin Signed-off-by: Max Gurtovoy Reviewed-by: Logan Gunthorpe Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 6622f9acd29cd4f6272720e827e6406f5a970cb0 Author: Hannes Reinecke Date: Wed May 26 17:23:18 2021 +0200 nvme-loop: do not warn for deleted controllers during reset During concurrent reset and delete calls the reset workqueue is flushed, causing nvme_loop_reset_ctrl_work() to be executed when the controller is in state DELETING or DELETING_NOIO. But this is expected, so we shouldn't issue a WARN_ON here. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 4237de2f73a669e4f89ac0aa2b44fb1a1d9ec583 Author: Hannes Reinecke Date: Wed May 26 17:23:17 2021 +0200 nvme-loop: check for NVME_LOOP_Q_LIVE in nvme_loop_destroy_admin_queue() We need to check the NVME_LOOP_Q_LIVE flag in nvme_loop_destroy_admin_queue() to protect against duplicate invocations eg during concurrent reset and remove calls. Signed-off-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 1c5f8e882a05de5c011e8c3fbeceb0d1c590eb53 Author: Hannes Reinecke Date: Wed May 26 17:23:16 2021 +0200 nvme-loop: clear NVME_LOOP_Q_LIVE when nvme_loop_configure_admin_queue() fails When the call to nvme_enable_ctrl() in nvme_loop_configure_admin_queue() fails the NVME_LOOP_Q_LIVE flag is not cleared. Signed-off-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit a6c144f3d2e230f2b3ac5ed8c51e0f0391556197 Author: Hannes Reinecke Date: Wed May 26 17:23:15 2021 +0200 nvme-loop: reset queue count to 1 in nvme_loop_destroy_io_queues() The queue count is increased in nvme_loop_init_io_queues(), so we need to reset it to 1 at the end of nvme_loop_destroy_io_queues(). Otherwise the function is not re-entrant safe, and crash will happen during concurrent reset and remove calls. Signed-off-by: Hannes Reinecke Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 160ce364167fabf8df5bebfff1b38fd5d8c146c9 Merge: da2d48808fbd1 8a4102a0cf07c Author: Palmer Dabbelt Date: Tue Jun 1 21:17:08 2021 -0700 Merge remote-tracking branch 'riscv/riscv-wx-mappings' into fixes This single commit is shared between fixes and for-next, as it fixes a concrete bug while likely conflicting with a more invasive cleanup to avoid these oddball mappings entirely. * riscv/riscv-wx-mappings: riscv: mm: Fix W+X mappings at boot commit da2d48808fbd1eddefefe245c6c0e92a9195df8b Author: Wende Tan Date: Sat May 22 17:49:51 2021 +0000 RISC-V: Fix memblock_free() usages in init_resources() `memblock_free()` takes a physical address as its first argument. Fix the wrong usages in `init_resources()`. Fixes: ffe0e526126884cf036a6f724220f1f9b4094fd2 ("RISC-V: Improve init_resources()") Fixes: 797f0375dd2ef5cdc68ac23450cbae9a5c67a74e ("RISC-V: Do not allocate memblock while iterating reserved memblocks") Signed-off-by: Wende Tan Signed-off-by: Palmer Dabbelt commit b75db25c416b9f0edae7cd86c4901c216a52e7a0 Author: Vincent Date: Sat May 22 07:40:15 2021 +0800 riscv: skip errata_cip_453.o if CONFIG_ERRATA_SIFIVE_CIP_453 is disabled The errata_cip_453.o should be built only when the Kconfig CONFIG_ERRATA_SIFIVE_CIP_453 is enabled. Reported-by: kernel test robot Signed-off-by: Vincent Fixes: 0e0d4992517f ("riscv: enable SiFive errata CIP-453 and CIP-1200 Kconfig only if CONFIG_64BIT=y") Signed-off-by: Palmer Dabbelt commit 8a4102a0cf07cc76a18f373f6b49485258cc6af4 Author: Jisheng Zhang Date: Sun May 16 17:00:38 2021 +0800 riscv: mm: Fix W+X mappings at boot When the kernel mapping was moved the last 2GB of the address space, (__va(PFN_PHYS(max_low_pfn))) is much smaller than the .data section start address, the last set_memory_nx() in protect_kernel_text_data() will fail, thus the .data section is still mapped as W+X. This results in below W+X mapping waring at boot. Fix it by passing the correct .data section page num to the set_memory_nx(). [ 0.396516] ------------[ cut here ]------------ [ 0.396889] riscv/mm: Found insecure W+X mapping at address (____ptrval____)/0xffffffff80c00000 [ 0.398347] WARNING: CPU: 0 PID: 1 at arch/riscv/mm/ptdump.c:258 note_page+0x244/0x24a [ 0.398964] Modules linked in: [ 0.399459] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-rc1+ #14 [ 0.400003] Hardware name: riscv-virtio,qemu (DT) [ 0.400591] epc : note_page+0x244/0x24a [ 0.401368] ra : note_page+0x244/0x24a [ 0.401772] epc : ffffffff80007c86 ra : ffffffff80007c86 sp : ffffffe000e7bc30 [ 0.402304] gp : ffffffff80caae88 tp : ffffffe000e70000 t0 : ffffffff80cb80cf [ 0.402800] t1 : ffffffff80cb80c0 t2 : 0000000000000000 s0 : ffffffe000e7bc80 [ 0.403310] s1 : ffffffe000e7bde8 a0 : 0000000000000053 a1 : ffffffff80c83ff0 [ 0.403805] a2 : 0000000000000010 a3 : 0000000000000000 a4 : 6c7e7a5137233100 [ 0.404298] a5 : 6c7e7a5137233100 a6 : 0000000000000030 a7 : ffffffffffffffff [ 0.404849] s2 : ffffffff80e00000 s3 : 0000000040000000 s4 : 0000000000000000 [ 0.405393] s5 : 0000000000000000 s6 : 0000000000000003 s7 : ffffffe000e7bd48 [ 0.405935] s8 : ffffffff81000000 s9 : ffffffffc0000000 s10: ffffffe000e7bd48 [ 0.406476] s11: 0000000000001000 t3 : 0000000000000072 t4 : ffffffffffffffff [ 0.407016] t5 : 0000000000000002 t6 : ffffffe000e7b978 [ 0.407435] status: 0000000000000120 badaddr: 0000000000000000 cause: 0000000000000003 [ 0.408052] Call Trace: [ 0.408343] [] note_page+0x244/0x24a [ 0.408855] [] ptdump_hole+0x14/0x1e [ 0.409263] [] walk_pgd_range+0x2a0/0x376 [ 0.409690] [] walk_page_range_novma+0x4e/0x6e [ 0.410146] [] ptdump_walk_pgd+0x48/0x78 [ 0.410570] [] ptdump_check_wx+0xb4/0xf8 [ 0.410990] [] mark_rodata_ro+0x26/0x2e [ 0.411407] [] kernel_init+0x44/0x108 [ 0.411814] [] ret_from_exception+0x0/0xc [ 0.412309] ---[ end trace 7ec3459f2547ea83 ]--- [ 0.413141] Checked W+X mappings: failed, 512 W+X pages found Fixes: 2bfc6cd81bd17e43 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 231bc539066760aaa44d46818c85b14ca2f56d9f Merge: 00151f515adda a94f66aecdaa4 Author: Linus Torvalds Date: Tue Jun 1 17:26:06 2021 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: - memory leak fix in usbhid from Anirudh Rayabharam - additions for a few new recognized generic key IDs from Dmitry Torokhov - Asus T101HA and Dell K15A quirks from Hans de Goede - memory leak fix in amd_sfh from Basavaraj Natikar - Win8 compatibility and Stylus fixes in multitouch driver from Ahelenia Ziemiańska - NULL pointer dereference fix in hid-magicmouse from Johan Hovold - assorted other small fixes and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (33 commits) HID: asus: Cleanup Asus T101HA keyboard-dock handling HID: magicmouse: fix NULL-deref on disconnect HID: intel-ish-hid: ipc: Add Alder Lake device IDs HID: i2c-hid: fix format string mismatch HID: amd_sfh: Fix memory leak in amd_sfh_work HID: amd_sfh: Use devm_kzalloc() instead of kzalloc() HID: ft260: improve error handling of ft260_hid_feature_report_get() HID: magicmouse: fix crash when disconnecting Magic Trackpad 2 HID: gt683r: add missing MODULE_DEVICE_TABLE HID: pidff: fix error return code in hid_pidff_init() HID: logitech-hidpp: initialize level variable HID: multitouch: Disable event reporting on suspend on the Asus T101HA touchpad HID: core: Remove extraneous empty line before EXPORT_SYMBOL_GPL(hid_check_keys_pressed) HID: hid-sensor-custom: Process failure of sensor_hub_set_feature() HID: i2c-hid: Skip ELAN power-on command after reset HID: usbhid: fix info leak in hid_submit_ctrl HID: Add BUS_VIRTUAL to hid_connect logging HID: multitouch: set Stylus suffix for Stylus-application devices, too HID: multitouch: require Finger field to mark Win8 reports as MT HID: remove the unnecessary redefinition of a macro ... commit e57f5cd99ca60cddf40201b0f4ced9f1938e299c Author: Ewan D. Milne Date: Tue Jun 1 13:52:14 2021 -0400 scsi: scsi_devinfo: Add blacklist entry for HPE OPEN-V Apparently some arrays are now returning "HPE" as the vendor. Link: https://lore.kernel.org/r/20210601175214.25719-1-emilne@redhat.com Signed-off-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 00151f515adda740f4688c529eca61a20359903a Merge: 4d96d3b0efee6 d5b8145455c62 Author: Linus Torvalds Date: Tue Jun 1 17:20:40 2021 -1000 Merge tag 'gfs2-v5.13-rc2-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fix from Andreas Gruenbacher: "Revert broken commit" * tag 'gfs2-v5.13-rc2-fixes2' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: Revert "gfs2: Fix mmap locking for write faults" commit 4d96d3b0efee6416ef0d61b76aaac6f4a2e15b12 Author: Larry Finger Date: Tue Jun 1 14:04:18 2021 -0500 Bluetooth: Add a new USB ID for RTL8822CE Some models of the RTL8822ce utilize a different USB ID. Add this new one to the Bluetooth driver. Signed-off-by: Larry Finger Signed-off-by: Linus Torvalds commit 2c89e41326b16e0a3eb41063e6f585aae5baf4f7 Author: Stanley Chu Date: Mon May 31 14:26:42 2021 +0800 scsi: ufs: ufs-mediatek: Fix HCI version in some platforms Some MediaTek SoC platforms with UFSHCI version below 3.0 have incorrect UFSHCI versions showed in register map. Fix the version by referring to UniPro version which is always correct. Link: https://lore.kernel.org/r/20210531062642.12642-1-stanley.chu@mediatek.com Reviewed-by: Alim Akhtar Signed-off-by: Stanley Chu Signed-off-by: Martin K. Petersen commit 79c932cd6af9829432888c4a0001d01793a09f12 Author: Daniel Wagner Date: Fri May 21 16:34:40 2021 +0200 scsi: qedf: Do not put host in qedf_vport_create() unconditionally Do not drop reference count on vn_port->host in qedf_vport_create() unconditionally. Instead drop the reference count in qedf_vport_destroy(). Link: https://lore.kernel.org/r/20210521143440.84816-1-dwagner@suse.de Reported-by: Javed Hasan Signed-off-by: Daniel Wagner Signed-off-by: Martin K. Petersen commit 216214c64a8c1cb9078c2c0aec7bb4a2f8e75397 Author: Yevgeny Kliteynik Date: Wed Dec 9 16:40:38 2020 +0200 net/mlx5: DR, Create multi-destination flow table with level less than 64 Flow table that contains flow pointing to multiple flow tables or multiple TIRs must have a level lower than 64. In our case it applies to muli- destination flow table. Fix the level of the created table to comply with HW Spec definitions, and still make sure that its level lower than SW-owned tables, so that it would be possible to point from the multi-destination FW table to SW tables. Fixes: 34583beea4b7 ("net/mlx5: DR, Create multi-destination table for SW-steering use") Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 5349cbba754ee54f6cca8b946aa9172f1ac60b8c Author: Aya Levin Date: Mon May 3 17:16:44 2021 +0300 net/mlx5e: Fix conflict with HW TS and CQE compression When a driver's profile doesn't support a dedicated PTP-RQ, configuration of CQE compression while HW TS is configured should fail. Fixes: 885b8cfb161e ("net/mlx5e: Update ethtool setting of CQE compression") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 256f79d13c1d1fe53b2b31ab2089b615bbfcd361 Author: Aya Levin Date: Mon May 3 16:59:55 2021 +0300 net/mlx5e: Fix HW TS with CQE compression according to profile When the driver's profile doesn't support a dedicated PTP-RQ, the PTP accuracy of HW TS is affected by the CQE compression. In this case, turn off CQE compression. Otherwise, the driver crashes: BUG: kernel NULL pointer dereference, address:0000000000000018 ... ... RIP: 0010:mlx5e_ptp_rx_set_fs+0x25/0x1a0 [mlx5_core] ... ... Call Trace: mlx5e_ptp_activate_channel+0xb2/0xf0 [mlx5_core] mlx5e_activate_priv_channels+0x3b9/0x8c0 [mlx5_core] ? __mutex_unlock_slowpath+0x45/0x2a0 ? mlx5e_refresh_tirs+0x151/0x1e0 [mlx5_core] mlx5e_switch_priv_channels+0x1cd/0x2d0 [mlx5_core] ? mlx5e_xdp_allowed+0x150/0x150 [mlx5_core] mlx5e_safe_switch_params+0x118/0x3c0 [mlx5_core] ? __mutex_lock+0x6e/0x8e0 ? mlx5e_hwstamp_set+0xa9/0x300 [mlx5_core] mlx5e_hwstamp_set+0x194/0x300 [mlx5_core] ? dev_ioctl+0x9b/0x3d0 mlx5i_ioctl+0x37/0x60 [mlx5_core] mlx5i_pkey_ioctl+0x12/0x20 [mlx5_core] dev_ioctl+0xa9/0x3d0 sock_ioctl+0x268/0x420 __x64_sys_ioctl+0x3d8/0x790 ? lockdep_hardirqs_on_prepare+0xe4/0x190 do_syscall_64+0x2d/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 960fbfe222a4 ("net/mlx5e: Allow coexistence of CQE compression and HW TS PTP") Signed-off-by: Aya Levin Reviewed-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 2a2c84facd4af661d71be6e81fd9d490ac7fdc53 Author: Roi Dayan Date: Wed May 19 10:00:27 2021 +0300 net/mlx5e: Fix adding encap rules to slow path On some devices the ignore flow level cap is not supported and we shouldn't use it. Setting the dest ft with mlx5_chains_get_tc_end_ft() already gives the correct end ft if ignore flow level cap is supported or not. Fixes: 39ac237ce009 ("net/mlx5: E-Switch, Refactor chains and priorities") Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit afe93f71b5d3cdae7209213ec8ef25210b837b93 Author: Roi Dayan Date: Tue Apr 13 14:35:22 2021 +0300 net/mlx5e: Check for needed capability for cvlan matching If not supported show an error and return instead of trying to offload to the hardware and fail. Fixes: 699e96ddf47f ("net/mlx5e: Support offloading tc double vlan headers match") Reported-by: Pablo Neira Ayuso Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 5940e64281c09976ce2b560244217e610bf9d029 Author: Moshe Shemesh Date: Thu Apr 8 07:30:57 2021 +0300 net/mlx5: Check firmware sync reset requested is set before trying to abort it In case driver sent NACK to firmware on sync reset request, it will get sync reset abort event while it didn't set sync reset requested mode. Thus, on abort sync reset event handler, driver should check reset requested is set before trying to stop sync reset poll. Fixes: 7dd6df329d4c ("net/mlx5: Handle sync reset abort event") Signed-off-by: Moshe Shemesh Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b38742e41177c339e891b74f3925862fa36debb1 Author: Roi Dayan Date: Thu Apr 29 12:13:35 2021 +0300 net/mlx5e: Disable TLS offload for uplink representor TLS offload is not supported in switchdev mode. Fixes: 7a9fb35e8c3a ("net/mlx5e: Do not reload ethernet ports when changing eswitch mode") Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit d8ec92005f806dfa7524e9171eca707c0bb1267e Author: Aya Levin Date: Tue May 25 15:35:25 2021 +0300 net/mlx5e: Fix incompatible casting Device supports setting of a single fec mode at a time, enforce this by bitmap_weight == 1. Input from fec command is in u32, avoid cast to unsigned long and use bitmap_from_arr32 to populate bitmap safely. Fixes: 4bd9d5070b92 ("net/mlx5e: Enforce setting of a single FEC mode") Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b000372627ce9dbbe641dafbf40db0718276ab77 Author: Joe Perches Date: Tue Jun 1 09:38:58 2021 -0700 MAINTAINERS: nfc mailing lists are subscribers-only It looks as if the MAINTAINERS entries for the nfc mailing list should be updated as I just got a "rejected" bounce from the nfc list. ------- Your message to the Linux-nfc mailing-list was rejected for the following reasons: The message is not from a list member ------- Signed-off-by: Joe Perches Signed-off-by: David S. Miller commit 7c0aee3033e737847c5525ce53ab5f7bd21de12d Merge: f336d0b93ae97 c55dcdd435aa6 Author: David S. Miller Date: Tue Jun 1 15:58:05 2021 -0700 Merge branch 'ktls-use-after-free' Maxim Mikityanskiy says: ==================== Fix use-after-free after the TLS device goes down and up This small series fixes a use-after-free bug in the TLS offload code. The first patch is a preparation for the second one, and the second is the fix itself. v2 changes: Remove unneeded EXPORT_SYMBOL_GPL. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit c55dcdd435aa6c6ad6ccac0a4c636d010ee367a4 Author: Maxim Mikityanskiy Date: Tue Jun 1 15:08:00 2021 +0300 net/tls: Fix use-after-free after the TLS device goes down and up When a netdev with active TLS offload goes down, tls_device_down is called to stop the offload and tear down the TLS context. However, the socket stays alive, and it still points to the TLS context, which is now deallocated. If a netdev goes up, while the connection is still active, and the data flow resumes after a number of TCP retransmissions, it will lead to a use-after-free of the TLS context. This commit addresses this bug by keeping the context alive until its normal destruction, and implements the necessary fallbacks, so that the connection can resume in software (non-offloaded) kTLS mode. On the TX side tls_sw_fallback is used to encrypt all packets. The RX side already has all the necessary fallbacks, because receiving non-decrypted packets is supported. The thing needed on the RX side is to block resync requests, which are normally produced after receiving non-decrypted packets. The necessary synchronization is implemented for a graceful teardown: first the fallbacks are deployed, then the driver resources are released (it used to be possible to have a tls_dev_resync after tls_dev_del). A new flag called TLS_RX_DEV_DEGRADED is added to indicate the fallback mode. It's used to skip the RX resync logic completely, as it becomes useless, and some objects may be released (for example, resync_async, which is allocated and freed by the driver). Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure") Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit 05fc8b6cbd4f979a6f25759c4a17dd5f657f7ecd Author: Maxim Mikityanskiy Date: Tue Jun 1 15:07:59 2021 +0300 net/tls: Replace TLS_RX_SYNC_RUNNING with RCU RCU synchronization is guaranteed to finish in finite time, unlike a busy loop that polls a flag. This patch is a preparation for the bugfix in the next patch, where the same synchronize_net() call will also be used to sync with the TX datapath. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit f336d0b93ae978f12c5e27199f828da89b91e56a Author: Jiapeng Chong Date: Tue Jun 1 19:04:51 2021 +0800 ethernet: myri10ge: Fix missing error code in myri10ge_probe() The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'status'. Eliminate the follow smatch warning: drivers/net/ethernet/myricom/myri10ge/myri10ge.c:3818 myri10ge_probe() warn: missing error code 'status'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 53d5fa9b234ea0b1adc810d5d2bf4d815ae7db51 Merge: dd9082f4a9f94 8fb7da9e99079 Author: David S. Miller Date: Tue Jun 1 15:24:11 2021 -0700 Merge branch 'virtio_net-build_skb-fixes' Xuan Zhuo says: ==================== virtio-net: fix for build_skb() The logic of this piece is really messy. Fortunately, my refactored patch can be completed with a small amount of testing. ==================== Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 8fb7da9e990793299c89ed7a4281c235bfdd31f8 Author: Xuan Zhuo Date: Tue Jun 1 14:40:00 2021 +0800 virtio_net: get build_skb() buf by data ptr In the case of merge, the page passed into page_to_skb() may be a head page, not the page where the current data is located. So when trying to get the buf where the data is located, we should get buf based on headroom instead of offset. This patch solves this problem. But if you don't use this patch, the original code can also run, because if the page is not the page of the current data, the calculated tailroom will be less than 0, and will not enter the logic of build_skb() . The significance of this patch is to modify this logical problem, allowing more situations to use build_skb(). Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit 5c37711d9f27bdc83fd5980446be7f4aa2106230 Author: Xuan Zhuo Date: Tue Jun 1 14:39:59 2021 +0800 virtio-net: fix for unable to handle page fault for address In merge mode, when xdp is enabled, if the headroom of buf is smaller than virtnet_get_headroom(), xdp_linearize_page() will be called but the variable of "headroom" is still 0, which leads to wrong logic after entering page_to_skb(). [ 16.600944] BUG: unable to handle page fault for address: ffffecbfff7b43c8[ 16.602175] #PF: supervisor read access in kernel mode [ 16.603350] #PF: error_code(0x0000) - not-present page [ 16.604200] PGD 0 P4D 0 [ 16.604686] Oops: 0000 [#1] SMP PTI [ 16.605306] CPU: 4 PID: 715 Comm: sh Tainted: G B 5.12.0+ #312 [ 16.606429] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/04 [ 16.608217] RIP: 0010:unmap_page_range+0x947/0xde0 [ 16.609014] Code: 00 00 08 00 48 83 f8 01 45 19 e4 41 f7 d4 41 83 e4 03 e9 a4 fd ff ff e8 b7 63 ed ff 4c 89 e0 48 c1 e0 065 [ 16.611863] RSP: 0018:ffffc90002503c58 EFLAGS: 00010286 [ 16.612720] RAX: ffffecbfff7b43c0 RBX: 00007f19f7203000 RCX: ffffffff812ff359 [ 16.613853] RDX: ffff888107778000 RSI: 0000000000000000 RDI: 0000000000000005 [ 16.614976] RBP: ffffea000425e000 R08: 0000000000000000 R09: 3030303030303030 [ 16.616124] R10: ffffffff82ed7d94 R11: 6637303030302052 R12: 7c00000afffded0f [ 16.617276] R13: 0000000000000001 R14: ffff888119ee7010 R15: 00007f19f7202000 [ 16.618423] FS: 0000000000000000(0000) GS:ffff88842fd00000(0000) knlGS:0000000000000000 [ 16.619738] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.620670] CR2: ffffecbfff7b43c8 CR3: 0000000103220005 CR4: 0000000000370ee0 [ 16.621792] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 16.622920] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 16.624047] Call Trace: [ 16.624525] ? release_pages+0x24d/0x730 [ 16.625209] unmap_single_vma+0xa9/0x130 [ 16.625885] unmap_vmas+0x76/0xf0 [ 16.626480] exit_mmap+0xa0/0x210 [ 16.627129] mmput+0x67/0x180 [ 16.627673] do_exit+0x3d1/0xf10 [ 16.628259] ? do_user_addr_fault+0x231/0x840 [ 16.629000] do_group_exit+0x53/0xd0 [ 16.629631] __x64_sys_exit_group+0x1d/0x20 [ 16.630354] do_syscall_64+0x3c/0x80 [ 16.630988] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 16.631828] RIP: 0033:0x7f1a043d0191 [ 16.632464] Code: Unable to access opcode bytes at RIP 0x7f1a043d0167. [ 16.633502] RSP: 002b:00007ffe3d993308 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 [ 16.634737] RAX: ffffffffffffffda RBX: 00007f1a044c9490 RCX: 00007f1a043d0191 [ 16.635857] RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 [ 16.636986] RBP: 0000000000000000 R08: ffffffffffffff88 R09: 0000000000000001 [ 16.638120] R10: 0000000000000008 R11: 0000000000000246 R12: 00007f1a044c9490 [ 16.639245] R13: 0000000000000001 R14: 00007f1a044c9968 R15: 0000000000000000 [ 16.640408] Modules linked in: [ 16.640958] CR2: ffffecbfff7b43c8 [ 16.641557] ---[ end trace bc4891c6ce46354c ]--- [ 16.642335] RIP: 0010:unmap_page_range+0x947/0xde0 [ 16.643135] Code: 00 00 08 00 48 83 f8 01 45 19 e4 41 f7 d4 41 83 e4 03 e9 a4 fd ff ff e8 b7 63 ed ff 4c 89 e0 48 c1 e0 065 [ 16.645983] RSP: 0018:ffffc90002503c58 EFLAGS: 00010286 [ 16.646845] RAX: ffffecbfff7b43c0 RBX: 00007f19f7203000 RCX: ffffffff812ff359 [ 16.647970] RDX: ffff888107778000 RSI: 0000000000000000 RDI: 0000000000000005 [ 16.649091] RBP: ffffea000425e000 R08: 0000000000000000 R09: 3030303030303030 [ 16.650250] R10: ffffffff82ed7d94 R11: 6637303030302052 R12: 7c00000afffded0f [ 16.651394] R13: 0000000000000001 R14: ffff888119ee7010 R15: 00007f19f7202000 [ 16.652529] FS: 0000000000000000(0000) GS:ffff88842fd00000(0000) knlGS:0000000000000000 [ 16.653887] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 16.654841] CR2: ffffecbfff7b43c8 CR3: 0000000103220005 CR4: 0000000000370ee0 [ 16.655992] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 16.657150] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 16.658290] Kernel panic - not syncing: Fatal exception [ 16.659613] Kernel Offset: disabled [ 16.660234] ---[ end Kernel panic - not syncing: Fatal exception ]--- Fixes: fb32856b16ad ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom") Signed-off-by: Xuan Zhuo Acked-by: Jason Wang Signed-off-by: David S. Miller commit dd9082f4a9f94280fbbece641bf8fc0a25f71f7a Author: Alexander Aring Date: Mon May 31 17:00:30 2021 -0400 net: sock: fix in-kernel mark setting This patch fixes the in-kernel mark setting by doing an additional sk_dst_reset() which was introduced by commit 50254256f382 ("sock: Reset dst when changing sk_mark via setsockopt"). The code is now shared to avoid any further suprises when changing the socket mark value. Fixes: 84d1c617402e ("net: sock: add sock_set_mark") Reported-by: Marcelo Ricardo Leitner Signed-off-by: Alexander Aring Signed-off-by: David S. Miller commit 4ef8d857b5f494e62bce9085031563fda35f9563 Author: Vladimir Oltean Date: Mon May 31 13:20:45 2021 +0300 net: dsa: tag_8021q: fix the VLAN IDs used for encoding sub-VLANs When using sub-VLANs in the range of 1-7, the resulting value from: rx_vid = dsa_8021q_rx_vid_subvlan(ds, port, subvlan); is wrong according to the description from tag_8021q.c: | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | +-----------+-----+-----------------+-----------+-----------------------+ | DIR | SVL | SWITCH_ID | SUBVLAN | PORT | +-----------+-----+-----------------+-----------+-----------------------+ For example, when ds->index == 0, port == 3 and subvlan == 1, dsa_8021q_rx_vid_subvlan() returns 1027, same as it returns for subvlan == 0, but it should have returned 1043. This is because the low portion of the subvlan bits are not masked properly when writing into the 12-bit VLAN value. They are masked into bits 4:3, but they should be masked into bits 5:4. Fixes: 3eaae1d05f2b ("net: dsa: tag_8021q: support up to 8 VLANs per port using sub-VLANs") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d5b8145455c629e7f157d2da46a9b2fba483f235 Author: Andreas Gruenbacher Date: Tue Jun 1 22:53:27 2021 +0200 Revert "gfs2: Fix mmap locking for write faults" This reverts commit b7f55d928e75557295c1ac280c291b738905b6fb. As explained by Linus in [*], write faults on a mmap region are reads from a filesysten point of view, so taking the inode glock exclusively on write faults is incorrect. Instead, when a page is marked writable, the .page_mkwrite vm operation will be called, which is where the exclusive lock taking needs to happen. I got this wrong because of a broken test case that made me believe .page_mkwrite isn't getting called when it actually is. [*] https://lore.kernel.org/lkml/CAHk-=wj8EWr_D65i4oRSj2FTbrc6RdNydNNCGxeabRnwtoU=3Q@mail.gmail.com/ Signed-off-by: Andreas Gruenbacher commit f8849e206ef52b584cd9227255f4724f0cc900bb Author: Dai Ngo Date: Wed May 19 17:15:10 2021 -0400 NFSv4: nfs4_proc_set_acl needs to restore NFS_CAP_UIDGID_NOMAP on error. Currently if __nfs4_proc_set_acl fails with NFS4ERR_BADOWNER it re-enables the idmapper by clearing NFS_CAP_UIDGID_NOMAP before retrying again. The NFS_CAP_UIDGID_NOMAP remains cleared even if the retry fails. This causes problem for subsequent setattr requests for v4 server that does not have idmapping configured. This patch modifies nfs4_proc_set_acl to detect NFS4ERR_BADOWNER and NFS4ERR_BADNAME and skips the retry, since the kernel isn't involved in encoding the ACEs, and return -EINVAL. Steps to reproduce the problem: # mount -o vers=4.1,sec=sys server:/export/test /tmp/mnt # touch /tmp/mnt/file1 # chown 99 /tmp/mnt/file1 # nfs4_setfacl -a A::unknown.user@xyz.com:wrtncy /tmp/mnt/file1 Failed setxattr operation: Invalid argument # chown 99 /tmp/mnt/file1 chown: changing ownership of ‘/tmp/mnt/file1’: Invalid argument # umount /tmp/mnt # mount -o vers=4.1,sec=sys server:/export/test /tmp/mnt # chown 99 /tmp/mnt/file1 # v2: detect NFS4ERR_BADOWNER and NFS4ERR_BADNAME and skip retry in nfs4_proc_set_acl. Signed-off-by: Dai Ngo Signed-off-by: Trond Myklebust commit 0b78f8bcf4951af30b0ae83ea4fad27d641ab617 Author: Matthew Wilcox Date: Tue Jun 1 15:30:30 2021 +0100 Revert "fb_defio: Remove custom address_space_operations" Commit ccf953d8f3d6 makes framebuffers which use deferred I/O stop displaying updates after the first one. This is because the pages handled by fb_defio no longer have a page_mapping(). That prevents page_mkclean() from marking the PTEs as clean, and so writes are only noticed the first time. Reported-by: Andy Shevchenko Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/YLZEhv0cpZp8uVE3@casper.infradead.org commit 848ff3768684701a4ce73a2ec0e5d438d4e2b0da Author: Kan Liang Date: Tue Jun 1 06:09:03 2021 -0700 perf/x86/intel/uncore: Fix M2M event umask for Ice Lake server Perf tool errors out with the latest event list for the Ice Lake server. event syntax error: 'unc_m2m_imc_reads.to_pmm' \___ value too big for format, maximum is 255 The same as the Snow Ridge server, the M2M uncore unit in the Ice Lake server has the unit mask extension field as well. Fixes: 2b3b76b5ec67 ("perf/x86/intel/uncore: Add Ice Lake server uncore support") Reported-by: Jin Yao Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/1622552943-119174-1-git-send-email-kan.liang@linux.intel.com commit f677ec94f6fb9d895f40403bd54236f7763c29db Author: Thomas Richter Date: Fri May 28 11:10:50 2021 +0200 perf test: Test 17 fails with make LIBPFM4=1 on s390 z/VM This test case fails on s390 virtual machine z/VM which has no PMU support when the perf tool is built with LIBPFM4=1. Using make LIBPFM4=1 builds the perf tool with support for libpfm event notation. The command line flag --pfm-events is valid: # ./perf record --pfm-events cycles -- true [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.001 MB perf.data (2 samples) ] # However the command 'perf test -Fv 17' fails on s390 z/VM virtual machine with LIBPFM4=1: # perf test -Fv 17 17: Setup struct perf_event_attr : --- start --- ..... running './tests/attr/test-record-group2' unsupp './tests/attr/test-record-group2' running './tests/attr/test-record-pfm-period' expected exclude_hv=0, got 1 FAILED './tests/attr/test-record-pfm-period' - match failure ---- end ---- Setup struct perf_event_attr: FAILED! When --pfm-event system is not supported, the test returns unsupported and continues. Here is an example using a virtual machine on x86 and Fedora 34: [root@f33 perf]# perf test -Fv 17 17: Setup struct perf_event_attr : --- start --- ..... running './tests/attr/test-record-group2' unsupp './tests/attr/test-record-group2' running './tests/attr/test-record-pfm-period' unsupp './tests/attr/test-record-pfm-period' .... The issue is file ./tests/attr/test-record-pfm-period which requires perf event attribute member exclude_hv to be zero. This is not the case on s390 where the value of exclude_hv is one when executing on a z/VM virtual machine without PMU hardware support. Fix this by allowing value exlucde_hv to be zero or one. Output before: # /usr/bin/python ./tests/attr.py -d ./tests/attr/ -t \ test-record-pfm-period -p ./perf -vvv 2>&1| fgrep match matching [event:base-record] match: [event:base-record] matches [] FAILED './tests/attr//test-record-pfm-period' - match failure # Output after: # /usr/bin/python ./tests/attr.py -d ./tests/attr/ -t \ test-record-pfm-period -p ./perf -vvv 2>&1| fgrep match matching [event:base-record] match: [event:base-record] matches ['event-1-0-6', 'event-1-0-5'] matched Background: Using libpfm library ends up in this function call sequence pfm_get_perf_event_encoding() +-- pfm_get_os_event_encoding() +-- pfmlib_perf_event_encode() is called when no hardware specific PMU unit can be detected as in the s390 z/VM virtual machine case. This uses the "perf_events generic PMU" data structure which sets exclude_hv to 1 per default. Using this PMU that test case always fails. That is the reason why exclude_hv attribute setting varies. Version 2: As suggested by Ian Rogers make perf_event_attribute member exclude_hv more robust and accept value 0 or 1 to handle more test cases which might fail on s390 virtual machine z/VM. Suggested-by: Ian Rogers Signed-off-by: Thomas Richter Reviewed-by: Ian Rogers Cc: Heiko Carstens Cc: Ian Rogers Cc: Sumanth Korikkar Cc: Sven Schnelle Cc: Vasily Gorbik Link: http://lore.kernel.org/lkml/20210528091050.245838-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit d3fddc355a4a4415e8d43d1faae1be713d65cf5e Author: Yu Kuai Date: Mon May 17 16:12:54 2021 +0800 perf stat: Fix error return code in bperf__load() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Committer notes: Added the missing {} for the now multiline 'if' block, fixing this error: CC /tmp/build/perf/util/bpf_counter.o util/bpf_counter.c: In function ‘bperf__load’: util/bpf_counter.c:523:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 523 | if (evsel->bperf_leader_link_fd < 0 && | ^~ util/bpf_counter.c:526:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 526 | goto out; | ^~~~ cc1: all warnings being treated as errors Fixes: 7fac83aaf2eecc9e ("perf stat: Introduce 'bperf' to share hardware PMCs with BPF") Reported-by: Hulk Robot Signed-off-by: Yu Kuai Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Daniel Borkmann Cc: Peter Zijlstra Cc: Song Liu Cc: Yu Kuai Cc: Zhang Yi Link: http://lore.kernel.org/lkml/20210517081254.1561564-1-yukuai3@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 4f2abe91922ba02bb419d91d92a518e4c805220b Author: Namhyung Kim Date: Thu May 27 11:28:35 2021 -0700 perf record: Move probing cgroup sampling support I found that checking cgroup sampling support using the missing features doesn't work on old kernels. Because it added both attr.cgroup bit and PERF_SAMPLE_CGROUP bit, it needs to check whichever comes first (usually the actual event, not dummy). But it only checks the attr.cgroup bit which is set only in the dummy event so cannot detect failtures due the sample bits. Also we don't ignore the missing feature and retry, it'd be better checking it with the API probing logic. Committer notes: Extracted the minimal part to check using the new cgroup API probe routine, the part that removes the cgroup member can be left for further discussion. Signed-off-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210527182835.1634339-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 3cb17cce1e76ccc5499915a4d7e095a1ad6bf7ff Author: Li Huafei Date: Tue Jun 1 17:27:50 2021 +0800 perf probe: Fix NULL pointer dereference in convert_variable_location() If we just check whether the variable can be converted, 'tvar' should be a null pointer. However, the null pointer check is missing in the 'Constant value' execution path. The following cases can trigger this problem: $ cat test.c #include void main(void) { int a; const int b = 1; asm volatile("mov %1, %0" : "=r"(a): "i"(b)); printf("a: %d\n", a); } $ gcc test.c -o test -O -g $ sudo ./perf probe -x ./test -L "main" 0 void main(void) { 2 int a; const int b = 1; asm volatile("mov %1, %0" : "=r"(a): "i"(b)); 6 printf("a: %d\n", a); } $ sudo ./perf probe -x ./test -V "main:6" Segmentation fault The check on 'tvar' is added. If 'tavr' is a null pointer, we return 0 to indicate that the variable can be converted. Now, we can successfully show the variables that can be accessed. $ sudo ./perf probe -x ./test -V "main:6" Available variables at main:6 @ char* __fmt int a int b However, the variable 'b' cannot be tracked. $ sudo ./perf probe -x ./test -D "main:6 b" Failed to find the location of the 'b' variable at this address. Perhaps it has been optimized out. Use -V with the --range option to show 'b' location range. Error: Failed to add events. This is because __die_find_variable_cb() did not successfully match variable 'b', which has the DW_AT_const_value attribute instead of DW_AT_location. We added support for DW_AT_const_value in __die_find_variable_cb(). With this modification, we can successfully track the variable 'b'. $ sudo ./perf probe -x ./test -D "main:6 b" p:probe_test/main_L6 /home/lhf/test:0x1156 b=\1:s32 Fixes: 66f69b219716 ("perf probe: Support DW_AT_const_value constant value") Signed-off-by: Li Huafei Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Frank Ch. Eigler Cc: Jianlin Lv Cc: Jiri Olsa Cc: Mark Rutland Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Yang Jihong Cc: Zhang Jinhao http://lore.kernel.org/lkml/20210601092750.169601-1-lihuafei1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 6c1ced2f701618e912be6c549139d58c180419ea Author: Tiezhu Yang Date: Tue Jun 1 19:53:56 2021 +0800 perf tools: Copy uapi/asm/perf_regs.h from the kernel for MIPS To allow the build to complete on older systems, where those files are either not uptodate, lacking some recent additions or not present at all. And check if the copy drifts from the kernel. This commit is similar with commit 12f020338a2c ("tools: Copy uapi/asm/perf_regs.h from the kernel") With this commit, we can avoid the following build error in any case: tools/perf/arch/mips/include/perf_regs.h:7:10: fatal error: asm/perf_regs.h: No such file or directory #include ^~~~~~~~~~~~~~~~~ compilation terminated. Signed-off-by: Tiezhu Yang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Xuefeng Li Link: http://lore.kernel.org/lkml/1622548436-12472-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 2ec6f20b33eb4f62ab90bdcd620436c883ec3af6 Author: Lukas Wunner Date: Thu May 27 23:10:56 2021 +0200 spi: Cleanup on failure of initial setup Commit c7299fea6769 ("spi: Fix spi device unregister flow") changed the SPI core's behavior if the ->setup() hook returns an error upon adding an spi_device: Before, the ->cleanup() hook was invoked to free any allocations that were made by ->setup(). With the commit, that's no longer the case, so the ->setup() hook is expected to free the allocations itself. I've identified 5 drivers which depend on the old behavior and am fixing them up hereinafter: spi-bitbang.c spi-fsl-spi.c spi-omap-uwire.c spi-omap2-mcspi.c spi-pxa2xx.c Importantly, ->setup() is not only invoked on spi_device *addition*: It may subsequently be called to *change* SPI parameters. If changing these SPI parameters fails, freeing memory allocations would be wrong. That should only be done if the spi_device is finally destroyed. I am therefore using a bool "initial_setup" in 4 of the affected drivers to differentiate between the invocation on *adding* the spi_device and any subsequent invocations: spi-bitbang.c spi-fsl-spi.c spi-omap-uwire.c spi-omap2-mcspi.c In spi-pxa2xx.c, it seems the ->setup() hook can only fail on spi_device addition, not any subsequent calls. It therefore doesn't need the bool. It's worth noting that 5 other drivers already perform a cleanup if the ->setup() hook fails. Before c7299fea6769, they caused a double-free if ->setup() failed on spi_device addition. Since the commit, they're fine. These drivers are: spi-mpc512x-psc.c spi-pl022.c spi-s3c64xx.c spi-st-ssc4.c spi-tegra114.c (spi-pxa2xx.c also already performs a cleanup, but only in one of several error paths.) Fixes: c7299fea6769 ("spi: Fix spi device unregister flow") Signed-off-by: Lukas Wunner Cc: Saravana Kannan Acked-by: Andy Shevchenko # pxa2xx Link: https://lore.kernel.org/r/f76a0599469f265b69c371538794101fa37b5536.1622149321.git.lukas@wunner.de Signed-off-by: Mark Brown commit 1963fa67d78674a110bc9b2a8b1e226967692f05 Author: Axel Lin Date: Sat May 29 07:01:47 2021 +0800 regulator: atc260x: Fix n_voltages and min_sel for pickable linear ranges The .n_voltages was missed for pickable linear ranges, fix it. The min_sel for each pickable range should be starting from 0. Also fix atc260x_ldo_voltage_range_sel setting (bit 5 - LDO_VOL_SEL in datasheet). Fixes: 3b15ccac161a ("regulator: Add regulator driver for ATC260x PMICs") Signed-off-by: Axel Lin Reviewed-by: Cristian Ciocaltea Link: https://lore.kernel.org/r/20210528230147.363974-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 46639a5e684edd0b80ae9dff220f193feb356277 Author: ChiYuan Huang Date: Tue Jun 1 18:09:15 2021 +0800 regulator: rtmv20: Fix to make regcache value first reading back from HW - Fix to make regcache value first reading back from HW. Signed-off-by: ChiYuan Huang Link: https://lore.kernel.org/r/1622542155-6373-1-git-send-email-u0084500@gmail.com Signed-off-by: Mark Brown commit 89082179ec5028bcd58c87171e08ada035689542 Author: Axel Lin Date: Sun May 30 10:21:09 2021 +0800 regulator: mt6315: Fix function prototype for mt6315_map_mode The .of_map_mode should has below function prototype: unsigned int (*of_map_mode)(unsigned int mode); Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210530022109.425054-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 5f01de6ffae2b00d3795a399d8d630bdae3c8997 Author: Axel Lin Date: Sun May 30 20:41:01 2021 +0800 regulator: rtmv20: Add Richtek to Kconfig text The other Richtek drivers has Richtek prefix, make it consistent. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210530124101.477727-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 86ab21cc39e6b99b7065ab9008c90bec5dec535a Author: Axel Lin Date: Sun May 30 20:41:00 2021 +0800 regulator: rtmv20: Fix .set_current_limit/.get_current_limit callbacks Current code does not set .curr_table and .n_linear_ranges settings, so it cannot use the regulator_get/set_current_limit_regmap helpers. If we setup the curr_table, it will has 200 entries. Implement customized .set_current_limit/.get_current_limit callbacks instead. Fixes: b8c054a5eaf0 ("regulator: rtmv20: Adds support for Richtek RTMV20 load switch regulator") Signed-off-by: Axel Lin Reviewed-by: ChiYuan Huang Link: https://lore.kernel.org/r/20210530124101.477727-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit b640e8a4bd24e17ce24a064d704aba14831651a8 Author: Kai Vehmanen Date: Fri May 28 17:43:30 2021 +0300 ASoC: SOF: reset enabled_cores state at suspend The recent changes to use common code to power up/down DSP cores also removed the reset of the core state at suspend. It turns out this is still needed. When the firmware state is reset to SOF_FW_BOOT_NOT_STARTED, also enabled_cores should be reset, and existing DSP drivers depend on this. BugLink: https://github.com/thesofproject/linux/issues/2824 Fixes: 42077f08b3 ("ASoC: SOF: update dsp core power status in common APIs") Signed-off-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210528144330.2551-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit a8437f05384cb472518ec21bf4fffbe8f0a47378 Author: Nicolas Cavallari Date: Thu May 27 18:34:09 2021 +0200 ASoC: fsl-asoc-card: Set .owner attribute when registering card. Otherwise, when compiled as module, a WARN_ON is triggered: WARNING: CPU: 0 PID: 5 at sound/core/init.c:208 snd_card_new+0x310/0x39c [snd] [...] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.10.39 #1 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Workqueue: events deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xdc/0x104) [] (dump_stack) from [] (__warn+0xd8/0x114) [] (__warn) from [] (warn_slowpath_fmt+0x5c/0xc4) [] (warn_slowpath_fmt) from [] (snd_card_new+0x310/0x39c [snd]) [] (snd_card_new [snd]) from [] (snd_soc_bind_card+0x334/0x9c4 [snd_soc_core]) [] (snd_soc_bind_card [snd_soc_core]) from [] (devm_snd_soc_register_card+0x30/0x6c [snd_soc_core]) [] (devm_snd_soc_register_card [snd_soc_core]) from [] (fsl_asoc_card_probe+0x550/0xcc8 [snd_soc_fsl_asoc_card]) [] (fsl_asoc_card_probe [snd_soc_fsl_asoc_card]) from [] (platform_drv_probe+0x48/0x98) [...] Signed-off-by: Nicolas Cavallari Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20210527163409.22049-1-nicolas.cavallari@green-communications.fr Signed-off-by: Mark Brown commit ce1f25718b2520d0210c24f1e4145d75c5620c9f Author: Colin Ian King Date: Tue Jun 1 11:35:06 2021 +0100 ASoC: topology: Fix spelling mistake "vesion" -> "version" There are spelling mistakes in comments. Fix them. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210601103506.9477-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 901be145a46eb79879367d853194346a549e623d Author: Carlos M Date: Mon May 31 22:20:26 2021 +0200 ALSA: hda: Fix for mute key LED for HP Pavilion 15-CK0xx For the HP Pavilion 15-CK0xx, with audio subsystem ID 0x103c:0x841c, adding a line in patch_realtek.c to apply the ALC269_FIXUP_HP_MUTE_LED_MIC3 fix activates the mute key LED. Signed-off-by: Carlos M Cc: Link: https://lore.kernel.org/r/20210531202026.35427-1-carlos.marr.pz@gmail.com Signed-off-by: Takashi Iwai commit 527ff9550682a3d08066a000435ffd8330bdd729 Author: Stefan Binding Date: Mon May 31 17:37:54 2021 +0100 ALSA: hda/cirrus: Set Initial DMIC volume to -26 dB Previously this fix was applied only to Bullseye variant laptops, and should be applied to Cyborg and Warlock variants. Fixes: 45b14fe200ba ("ALSA: hda/cirrus: Use CS8409 filter to fix abnormal sounds on Bullseye") Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210531163754.136736-1-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 4ac06a1e013cf5fdd963317ffd3b968560f33bba Author: Krzysztof Kozlowski Date: Mon May 31 09:21:38 2021 +0200 nfc: fix NULL ptr dereference in llcp_sock_getname() after failed connect It's possible to trigger NULL pointer dereference by local unprivileged user, when calling getsockname() after failed bind() (e.g. the bind fails because LLCP_SAP_MAX used as SAP): BUG: kernel NULL pointer dereference, address: 0000000000000000 CPU: 1 PID: 426 Comm: llcp_sock_getna Not tainted 5.13.0-rc2-next-20210521+ #9 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1 04/01/2014 Call Trace: llcp_sock_getname+0xb1/0xe0 __sys_getpeername+0x95/0xc0 ? lockdep_hardirqs_on_prepare+0xd5/0x180 ? syscall_enter_from_user_mode+0x1c/0x40 __x64_sys_getpeername+0x11/0x20 do_syscall_64+0x36/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xae This can be reproduced with Syzkaller C repro (bind followed by getpeername): https://syzkaller.appspot.com/x/repro.c?x=14def446e00000 Cc: Fixes: d646960f7986 ("NFC: Initial LLCP support") Reported-by: syzbot+80fb126e7f7d8b1a5914@syzkaller.appspotmail.com Reported-by: butt3rflyh4ck Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210531072138.5219-1-krzysztof.kozlowski@canonical.com Signed-off-by: Jakub Kicinski commit 696770e72f2b42b92ea0a4a98087fb2ba376417a Author: James Smart Date: Fri May 28 14:22:40 2021 -0700 scsi: lpfc: Fix failure to transmit ABTS on FC link The abort_cmd_ia flag in an abort wqe describes whether an ABTS basic link service should be transmitted on the FC link or not. Code added in lpfc_sli4_issue_abort_iotag() set the abort_cmd_ia flag incorrectly, surpressing ABTS transmission. A previous LPFC change to build an abort wqe inverted prior logic that determined whether an ABTS was to be issued on the FC link. Revert this logic to its proper state. Link: https://lore.kernel.org/r/20210528212240.11387-1-jsmart2021@gmail.com Fixes: db7531d2b377 ("scsi: lpfc: Convert abort handling to SLI-3 and SLI-4 handlers") Cc: # v5.11+ Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 515da6f4295c2c42b8c54572cce3d2dd1167c41e Author: Maurizio Lombardi Date: Mon May 31 14:13:26 2021 +0200 scsi: target: core: Fix warning on realtime kernels On realtime kernels, spin_lock_irq*(spinlock_t) do not disable the interrupts, a call to irqs_disabled() will return false thus firing a warning in __transport_wait_for_tasks(). Remove the warning and also replace assert_spin_locked() with lockdep_assert_held() Link: https://lore.kernel.org/r/20210531121326.3649-1-mlombard@redhat.com Reviewed-by: Bart Van Assche Signed-off-by: Maurizio Lombardi Signed-off-by: Martin K. Petersen commit 59cc84c802eb923805e7bba425976a3df5ce35d8 Author: Frederic Barrat Date: Wed May 26 16:45:40 2021 +0200 Revert "powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs" This reverts commit 3c0468d4451eb6b4f6604370639f163f9637a479. That commit was breaking alignment guarantees for the DMA address when allocating coherent mappings, as described in Documentation/core-api/dma-api-howto.rst It was also noticed by Mellanox' driver: [ 1515.763621] mlx5_core c002:01:00.0: mlx5_frag_buf_alloc_node:146:(pid 13402): unexpected map alignment: 0x0800000000c61000, page_shift=16 [ 1515.763635] mlx5_core c002:01:00.0: mlx5_cqwq_create:181:(pid 13402): mlx5_frag_buf_alloc_node() failed, -12 Fixes: 3c0468d4451e ("powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs") Signed-off-by: Frederic Barrat Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210526144540.117795-1-fbarrat@linux.ibm.com commit 9a90ed065a155d13db0d0ffeaad5cc54e51c90c6 Author: Borislav Petkov Date: Thu May 27 11:02:26 2021 +0200 x86/thermal: Fix LVT thermal setup for SMI delivery mode There are machines out there with added value crap^WBIOS which provide an SMI handler for the local APIC thermal sensor interrupt. Out of reset, the BSP on those machines has something like 0x200 in that APIC register (timestamps left in because this whole issue is timing sensitive): [ 0.033858] read lvtthmr: 0x330, val: 0x200 which means: - bit 16 - the interrupt mask bit is clear and thus that interrupt is enabled - bits [10:8] have 010b which means SMI delivery mode. Now, later during boot, when the kernel programs the local APIC, it soft-disables it temporarily through the spurious vector register: setup_local_APIC: ... /* * If this comes from kexec/kcrash the APIC might be enabled in * SPIV. Soft disable it before doing further initialization. */ value = apic_read(APIC_SPIV); value &= ~APIC_SPIV_APIC_ENABLED; apic_write(APIC_SPIV, value); which means (from the SDM): "10.4.7.2 Local APIC State After It Has Been Software Disabled ... * The mask bits for all the LVT entries are set. Attempts to reset these bits will be ignored." And this happens too: [ 0.124111] APIC: Switch to symmetric I/O mode setup [ 0.124117] lvtthmr 0x200 before write 0xf to APIC 0xf0 [ 0.124118] lvtthmr 0x10200 after write 0xf to APIC 0xf0 This results in CPU 0 soft lockups depending on the placement in time when the APIC soft-disable happens. Those soft lockups are not 100% reproducible and the reason for that can only be speculated as no one tells you what SMM does. Likely, it confuses the SMM code that the APIC is disabled and the thermal interrupt doesn't doesn't fire at all, leading to CPU 0 stuck in SMM forever... Now, before 4f432e8bb15b ("x86/mce: Get rid of mcheck_intel_therm_init()") due to how the APIC_LVTTHMR was read before APIC initialization in mcheck_intel_therm_init(), it would read the value with the mask bit 16 clear and then intel_init_thermal() would replicate it onto the APs and all would be peachy - the thermal interrupt would remain enabled. But that commit moved that reading to a later moment in intel_init_thermal(), resulting in reading APIC_LVTTHMR on the BSP too late and with its interrupt mask bit set. Thus, revert back to the old behavior of reading the thermal LVT register before the APIC gets initialized. Fixes: 4f432e8bb15b ("x86/mce: Get rid of mcheck_intel_therm_init()") Reported-by: James Feeney Signed-off-by: Borislav Petkov Cc: Cc: Zhang Rui Cc: Srinivas Pandruvada Link: https://lkml.kernel.org/r/YKIqDdFNaXYd39wz@zn.tnic commit bddc0c411a45d3718ac535a070f349be8eca8d48 Author: Mathy Vanhoef Date: Sun May 30 15:32:26 2021 +0200 mac80211: Fix NULL ptr deref for injected rate info The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") moved the code to validate the radiotap header from ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is possible to share more code with the new Tx queue selection code for injected frames. But at the same time, it now required the call of ieee80211_parse_tx_radiotap at the beginning of functions which wanted to handle the radiotap header. And this broke the rate parser for radiotap header parser. The radiotap parser for rates is operating most of the time only on the data in the actual radiotap header. But for the 802.11a/b/g rates, it must also know the selected band from the chandef information. But this information is only written to the ieee80211_tx_info at the end of the ieee80211_monitor_start_xmit - long after ieee80211_parse_tx_radiotap was already called. The info->band information was therefore always 0 (NL80211_BAND_2GHZ) when the parser code tried to access it. For a 5GHz only device, injecting a frame with 802.11a rates would cause a NULL pointer dereference because local->hw.wiphy->bands[NL80211_BAND_2GHZ] would most likely have been NULL when the radiotap parser searched for the correct rate index of the driver. Cc: stable@vger.kernel.org Reported-by: Ben Greear Fixes: cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") Signed-off-by: Mathy Vanhoef [sven@narfation.org: added commit message] Signed-off-by: Sven Eckelmann Link: https://lore.kernel.org/r/20210530133226.40587-1-sven@narfation.org Signed-off-by: Johannes Berg commit e298aa358f0ca658406d524b6639fe389cb6e11e Author: Du Cheng Date: Mon May 10 12:16:49 2021 +0800 mac80211: fix skb length check in ieee80211_scan_rx() Replace hard-coded compile-time constants for header length check with dynamic determination based on the frame type. Otherwise, we hit a validation WARN_ON in cfg80211 later. Fixes: cd418ba63f0c ("mac80211: convert S1G beacon to scan results") Reported-by: syzbot+405843667e93b9790fc1@syzkaller.appspotmail.com Signed-off-by: Du Cheng Link: https://lore.kernel.org/r/20210510041649.589754-1-ducheng2@gmail.com [style fixes, reword commit message] Signed-off-by: Johannes Berg commit b90f51e8e1f5014c01c82a7bf4c611643d0a8bcb Author: Johannes Berg Date: Mon Apr 26 21:28:02 2021 +0200 staging: rtl8723bs: fix monitor netdev register/unregister Due to the locking changes and callbacks happening inside cfg80211, we need to use cfg80211 versions of the register and unregister functions if called within cfg80211 methods, otherwise deadlocks occur. Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210426212801.3d902cc9e6f4.Ie0b1e0c545920c61400a4b7d0f384ea61feb645a@changeid Signed-off-by: Johannes Berg commit a64b6a25dd9f984ed05fade603a00e2eae787d2f Author: Du Cheng Date: Wed Apr 28 14:39:41 2021 +0800 cfg80211: call cfg80211_leave_ocb when switching away from OCB If the userland switches back-and-forth between NL80211_IFTYPE_OCB and NL80211_IFTYPE_ADHOC via send_msg(NL80211_CMD_SET_INTERFACE), there is a chance where the cleanup cfg80211_leave_ocb() is not called. This leads to initialization of in-use memory (e.g. init u.ibss while in-use by u.ocb) due to a shared struct/union within ieee80211_sub_if_data: struct ieee80211_sub_if_data { ... union { struct ieee80211_if_ap ap; struct ieee80211_if_vlan vlan; struct ieee80211_if_managed mgd; struct ieee80211_if_ibss ibss; // <- shares address struct ieee80211_if_mesh mesh; struct ieee80211_if_ocb ocb; // <- shares address struct ieee80211_if_mntr mntr; struct ieee80211_if_nan nan; } u; ... } Therefore add handling of otype == NL80211_IFTYPE_OCB, during cfg80211_change_iface() to perform cleanup when leaving OCB mode. link to syzkaller bug: https://syzkaller.appspot.com/bug?id=0612dbfa595bf4b9b680ff7b4948257b8e3732d5 Reported-by: syzbot+105896fac213f26056f9@syzkaller.appspotmail.com Signed-off-by: Du Cheng Link: https://lore.kernel.org/r/20210428063941.105161-1-ducheng2@gmail.com Signed-off-by: Johannes Berg commit 34fb4db5abc1fe6708522cbf13f637e0eefb1a50 Author: Brian Norris Date: Wed May 5 13:28:29 2021 -0700 mac80211: correct ieee80211_iterate_active_interfaces_mtx() locking comments Commit a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") dropped usage of RTNL here and replaced it with hw->wiphy->mutex. But we didn't update the comments. Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Brian Norris Link: https://lore.kernel.org/r/20210505202829.1039400-1-briannorris@chromium.org Signed-off-by: Johannes Berg commit bd18de517923903a177508fc8813f44e717b1c00 Author: Johannes Berg Date: Mon May 17 17:04:31 2021 +0200 mac80211_hwsim: drop pending frames on stop Syzbot reports that we may be able to get into a situation where mac80211 has pending ACK frames on shutdown with hwsim. It appears that the reason for this is that syzbot uses the wmediumd hooks to intercept/injection frames, and may shut down hwsim, removing the radio(s), while frames are pending in the air simulation. Clean out the pending queue when the interface is stopped, after this the frames can't be reported back to mac80211 properly anyway. Reported-by: syzbot+a063bbf0b15737362592@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20210517170429.b0f85ab0eda1.Ie42a6ec6b940c971f3441286aeaaae2fe368e29a@changeid Signed-off-by: Johannes Berg commit 0ee4d55534f82a0624701d0bb9fc2304d4529086 Author: Johannes Berg Date: Mon May 17 16:47:17 2021 +0200 mac80211: remove warning in ieee80211_get_sband() Syzbot reports that it's possible to hit this from userspace, by trying to add a station before any other connection setup has been done. Instead of trying to catch this in some other way simply remove the warning, that will appropriately reject the call from userspace. Reported-by: syzbot+7716dbc401d9a437890d@syzkaller.appspotmail.com Link: https://lore.kernel.org/r/20210517164715.f537da276d17.Id05f40ec8761d6a8cc2df87f1aa09c651988a586@changeid Signed-off-by: Johannes Berg commit 08a4b904a2a90246aadd6aa2e4f26abca9037385 Author: Takashi Iwai Date: Mon May 31 20:06:33 2021 +0200 ALSA: hda: Fix a regression in Capture Switch mixer read The recent commit to drop the HDA-specific mute-LED control, e65bf99718b5 ("ALSA: HDA - remove the custom implementation for the audio LED trigger"), caused a regression on the mixer element read for "Capture Switch" when it's built from bind controls. The function create_bind_cap_vol_ctl() creates the snd_kcontrol_new object directly via snd_hda_gen_add_kctl() instead of add_control(). Although the commit above added a workaround for the SNDRV_CTL_ACCESS_READWRITE in add_control() as default, this code path fell out from the radar. As a result, now the driver gives -EPERM error because of the lack of the proper access bit at reading "Capture Switch" element value. Fix the regression by setting the access bit properly. Fixes: e65bf99718b5 ("ALSA: HDA - remove the custom implementation for the audio LED trigger") BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1186634 Link: https://lore.kernel.org/r/20210531180633.27831-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit c2131f7e73c9e9365613e323d65c7b9e5b910f56 Merge: 36c795513a887 1ab19c5de4c53 Author: Linus Torvalds Date: Mon May 31 05:57:22 2021 -1000 Merge tag 'gfs2-v5.13-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 fixes from Andreas Gruenbacher: "Various gfs2 fixes" * tag 'gfs2-v5.13-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix use-after-free in gfs2_glock_shrink_scan gfs2: Fix mmap locking for write faults gfs2: Clean up revokes on normal withdraws gfs2: fix a deadlock on withdraw-during-mount gfs2: fix scheduling while atomic bug in glocks gfs2: Fix I_NEW check in gfs2_dinode_in gfs2: Prevent direct-I/O write fallback errors from getting lost commit 36c795513a88728cc19517354a46a73948c478dd Merge: 8124c8a6b3538 a8b98c808eab3 Author: Linus Torvalds Date: Mon May 31 05:52:22 2021 -1000 Merge tag 'fsnotify_for_v5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify fixes from Jan Kara: "A fix for permission checking with fanotify unpriviledged groups. Also there's a small update in MAINTAINERS file for fanotify" * tag 'fsnotify_for_v5.13-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: fix permission model of unprivileged group MAINTAINERS: Add Matthew Bobrowski as a reviewer commit e305509e678b3a4af2b3cfd410f409f7cdaabb52 Author: Lin Ma Date: Sun May 30 21:37:43 2021 +0800 Bluetooth: use correct lock to prevent UAF of hdev object The hci_sock_dev_event() function will cleanup the hdev object for sockets even if this object may still be in used within the hci_sock_bound_ioctl() function, result in UAF vulnerability. This patch replace the BH context lock to serialize these affairs and prevent the race condition. Signed-off-by: Lin Ma Signed-off-by: Marcel Holtmann commit 671cc352acd3e2b2832b59787ed8027d9f80ccc9 Author: Dmitry Osipenko Date: Sun May 30 22:55:06 2021 +0300 drm/tegra: Correct DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT The format modifier is 64bit, while DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT uses BIT() macro that is 32bit on ARM32. The (modifier &= ~DRM_FORMAT_MOD_NVIDIA_SECTOR_LAYOUT) doesn't work as expected on ARM32 and tegra_fb_get_tiling() fails for the tiled formats on 32bit Tegra because modifier mask isn't applied properly. Use the BIT_ULL() macro to fix this trouble. Fixes: 7b6f846785f4 ("drm/tegra: Support sector layout on Tegra194") Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e4dfe108371214500ee10c2cf19268f53acaa803 Author: Erik Kaneda Date: Fri May 21 15:28:08 2021 -0700 ACPICA: Clean up context mutex during object deletion ACPICA commit bc43c878fd4ff27ba75b1d111b97ee90d4a82707 Fixes: c27f3d011b08 ("Fix race in GenericSerialBus (I2C) and GPIO OpRegion parameter handling") Link: https://github.com/acpica/acpica/commit/bc43c878 Reported-by: John Garry Reported-by: Xiang Chen Tested-by: Xiang Chen Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 1ab19c5de4c537ec0d9b21020395a5b5a6c059b2 Author: Hillf Danton Date: Tue May 18 16:46:25 2021 +0800 gfs2: Fix use-after-free in gfs2_glock_shrink_scan The GLF_LRU flag is checked under lru_lock in gfs2_glock_remove_from_lru() to remove the glock from the lru list in __gfs2_glock_put(). On the shrink scan path, the same flag is cleared under lru_lock but because of cond_resched_lock(&lru_lock) in gfs2_dispose_glock_lru(), progress on the put side can be made without deleting the glock from the lru list. Keep GLF_LRU across the race window opened by cond_resched_lock(&lru_lock) to ensure correct behavior on both sides - clear GLF_LRU after list_del under lru_lock. Reported-by: syzbot Signed-off-by: Hillf Danton Signed-off-by: Andreas Gruenbacher commit b8203ec7f58ae925e10fadd3d136073ae7503a6e Author: Yang Li Date: Tue May 25 18:50:32 2021 +0800 phy: ti: Fix an error code in wiz_probe() When the code execute this if statement, the value of ret is 0. However, we can see from the dev_err() log that the value of ret should be -EINVAL. Clean up smatch warning: drivers/phy/ti/phy-j721e-wiz.c:1216 wiz_probe() warn: missing error code 'ret' Reported-by: Abaci Robot Fixes: c9f9eba06629 ("phy: ti: j721e-wiz: Manage typec-gpio-dir") Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1621939832-65535-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Vinod Koul commit aaac9a1bd370338ce372669eb9a6059d16b929aa Author: Tiezhu Yang Date: Wed May 19 18:37:39 2021 +0800 phy: phy-mtk-tphy: Fix some resource leaks in mtk_phy_init() Use clk_disable_unprepare() in the error path of mtk_phy_init() to fix some resource leaks. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Tiezhu Yang Reviewed-by: Chunfeng Yun Link: https://lore.kernel.org/r/1621420659-15858-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Vinod Koul commit 6411e386db0a477217607015e7d2910d02f75426 Author: Wang Wensheng Date: Mon May 17 01:57:49 2021 +0000 phy: cadence: Sierra: Fix error return code in cdns_sierra_phy_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: a43f72ae136a ("phy: cadence: Sierra: Change MAX_LANES of Sierra to 16") Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Link: https://lore.kernel.org/r/20210517015749.127799-1-wangwensheng4@huawei.com Signed-off-by: Vinod Koul commit 4a0e3ff30980b7601b13dd3b7ee275212b852843 Author: Kan Liang Date: Wed May 26 06:58:47 2021 -0700 perf/x86/intel/uncore: Fix a kernel WARNING triggered by maxcpus=1 A kernel WARNING may be triggered when setting maxcpus=1. The uncore counters are Die-scope. When probing a PCI device, only the BUS information can be retrieved. The uncore driver has to maintain a mapping table used to calculate the logical Die ID from a given BUS#. Before the patch ba9506be4e40, the mapping table stores the mapping information from the BUS# -> a Physical Socket ID. To calculate the logical die ID, perf does, - In snbep_pci2phy_map_init(), retrieve the BUS# -> a Physical Socket ID from the UBOX PCI configure space. - Calculate the mapping information (a BUS# -> a Physical Socket ID) for the other PCI BUS. - In the uncore_pci_probe(), get the physical Socket ID from a given BUS and the mapping table. - Calculate the logical Die ID Since only the logical Die ID is required, with the patch ba9506be4e40, the mapping table stores the mapping information from the BUS# -> a logical Die ID. Now perf does, - In snbep_pci2phy_map_init(), retrieve the BUS# -> a Physical Socket ID from the UBOX PCI configure space. - Calculate the logical Die ID - Calculate the mapping information (a BUS# -> a logical Die ID) for the other PCI BUS. - In the uncore_pci_probe(), get the logical die ID from a given BUS and the mapping table. When calculating the logical Die ID, -1 may be returned, especially when maxcpus=1. Here, -1 means the logical Die ID is not found. But when calculating the mapping information for the other PCI BUS, -1 indicates that it's the other PCI BUS that requires the calculation of the mapping. The driver will mistakenly do the calculation. Uses the -ENODEV to indicate the case which the logical Die ID is not found. The driver will not mess up the mapping table anymore. Fixes: ba9506be4e40 ("perf/x86/intel/uncore: Store the logical die id instead of the physical die id.") Reported-by: John Donnelly Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Acked-by: John Donnelly Tested-by: John Donnelly Link: https://lkml.kernel.org/r/1622037527-156028-1-git-send-email-kan.liang@linux.intel.com commit 6c605f8371159432ec61cbb1488dcf7ad24ad19a Author: Marco Elver Date: Thu May 27 12:47:11 2021 +0200 perf: Fix data race between pin_count increment/decrement KCSAN reports a data race between increment and decrement of pin_count: write to 0xffff888237c2d4e0 of 4 bytes by task 15740 on cpu 1: find_get_context kernel/events/core.c:4617 __do_sys_perf_event_open kernel/events/core.c:12097 [inline] __se_sys_perf_event_open kernel/events/core.c:11933 ... read to 0xffff888237c2d4e0 of 4 bytes by task 15743 on cpu 0: perf_unpin_context kernel/events/core.c:1525 [inline] __do_sys_perf_event_open kernel/events/core.c:12328 [inline] __se_sys_perf_event_open kernel/events/core.c:11933 ... Because neither read-modify-write here is atomic, this can lead to one of the operations being lost, resulting in an inconsistent pin_count. Fix it by adding the missing locking in the CPU-event case. Fixes: fe4b04fa31a6 ("perf: Cure task_oncpu_function_call() races") Reported-by: syzbot+142c9018f5962db69c7e@syzkaller.appspotmail.com Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210527104711.2671610-1-elver@google.com commit f268c3737ecaefcfeecfb4cb5e44958a8976f067 Author: Frederic Weisbecker Date: Thu May 27 13:34:41 2021 +0200 tick/nohz: Only check for RCU deferred wakeup on user/guest entry when needed Checking for and processing RCU-nocb deferred wakeup upon user/guest entry is only relevant when nohz_full runs on the local CPU, otherwise the periodic tick should take care of it. Make sure we don't needlessly pollute these fast-paths as a -3% performance regression on a will-it-scale.per_process_ops has been reported so far. Fixes: 47b8ff194c1f (entry: Explicitly flush pending rcuog wakeup before last rescheduling point) Fixes: 4ae7dc97f726 (entry/kvm: Explicitly flush pending rcuog wakeup before last rescheduling point) Reported-by: kernel test robot Signed-off-by: Frederic Weisbecker Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Paul E. McKenney Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210527113441.465489-1-frederic@kernel.org commit 02da26ad5ed6ea8680e5d01f20661439611ed776 Author: Vincent Guittot Date: Thu May 27 14:29:16 2021 +0200 sched/fair: Make sure to update tg contrib for blocked load During the update of fair blocked load (__update_blocked_fair()), we update the contribution of the cfs in tg->load_avg if cfs_rq's pelt has decayed. Nevertheless, the pelt values of a cfs_rq could have been recently updated while propagating the change of a child. In this case, cfs_rq's pelt will not decayed because it has already been updated and we don't update tg->load_avg. __update_blocked_fair ... for_each_leaf_cfs_rq_safe: child cfs_rq update cfs_rq_load_avg() for child cfs_rq ... update_load_avg(cfs_rq_of(se), se, 0) ... update cfs_rq_load_avg() for parent cfs_rq -propagation of child's load makes parent cfs_rq->load_sum becoming null -UPDATE_TG is not set so it doesn't update parent cfs_rq->tg_load_avg_contrib .. for_each_leaf_cfs_rq_safe: parent cfs_rq update cfs_rq_load_avg() for parent cfs_rq - nothing to do because parent cfs_rq has already been updated recently so cfs_rq->tg_load_avg_contrib is not updated ... parent cfs_rq is decayed list_del_leaf_cfs_rq parent cfs_rq - but it still contibutes to tg->load_avg we must set UPDATE_TG flags when propagting pending load to the parent Fixes: 039ae8bcf7a5 ("sched/fair: Fix O(nr_cgroups) in the load balancing path") Reported-by: Odin Ugedal Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Odin Ugedal Link: https://lkml.kernel.org/r/20210527122916.27683-3-vincent.guittot@linaro.org commit 7c7ad626d9a0ff0a36c1e2a3cfbbc6a13828d5eb Author: Vincent Guittot Date: Thu May 27 14:29:15 2021 +0200 sched/fair: Keep load_avg and load_sum synced when removing a cfs_rq from the list we only check _sum value so we must ensure that _avg and _sum stay synced so load_sum can't be null whereas load_avg is not after propagating load in the cgroup hierarchy. Use load_avg to compute load_sum similarly to what is done for util_sum and runnable_sum. Fixes: 0e2d2aaaae52 ("sched/fair: Rewrite PELT migration propagation") Reported-by: Odin Ugedal Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Odin Ugedal Link: https://lkml.kernel.org/r/20210527122916.27683-2-vincent.guittot@linaro.org commit 4cce442ffe5448ef572adc8b3abe7001b398e709 Author: Jerome Brunet Date: Thu Apr 29 10:38:23 2021 +0200 arm64: meson: select COMMON_CLK This fix the recent removal of clock drivers selection. While it is not necessary to select the clock drivers themselves, we need to select a proper implementation of the clock API, which for the meson, is CCF Fixes: ba66a25536dd ("arm64: meson: ship only the necessary clock controllers") Reviewed-by: Neil Armstrong Signed-off-by: Jerome Brunet Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210429083823.59546-1-jbrunet@baylibre.com commit a06bc96902617e93920fea4ce376b8aca9dd3326 Author: Qiheng Lin Date: Fri Apr 9 19:02:43 2021 +0800 soc: amlogic: meson-clk-measure: remove redundant dev_err call in meson_msr_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Signed-off-by: Kevin Hilman Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210409110243.41-1-linqiheng@huawei.com commit 12b2aaadb6d5ef77434e8db21f469f46fe2d392e Author: Sagi Grimberg Date: Thu May 27 18:16:38 2021 -0700 nvme-rdma: fix in-casule data send for chained sgls We have only 2 inline sg entries and we allow 4 sg entries for the send wr sge. Larger sgls entries will be chained. However when we build in-capsule send wr sge, we iterate without taking into account that the sgl may be chained and still fit in-capsule (which can happen if the sgl is bigger than 2, but lower-equal to 4). Fix in-capsule data mapping to correctly iterate chained sgls. Fixes: 38e1800275d3 ("nvme-rdma: Avoid preallocating big SGL for data") Reported-by: Walker, Benjamin Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Signed-off-by: Christoph Hellwig commit fffdaba402cea79b8d219355487d342ec23f91c6 Author: Yang Yingliang Date: Tue May 18 22:11:08 2021 +0800 dmaengine: stedma40: add missing iounmap() on error in d40_probe() Add the missing iounmap() before return from d40_probe() in the error handling case. Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210518141108.1324127-1-yangyingliang@huawei.com Signed-off-by: Vinod Koul commit 8e2e4f3c58528c6040b5762b666734f8cceba568 Author: Randy Dunlap Date: Fri May 21 19:13:12 2021 -0700 dmaengine: SF_PDMA depends on HAS_IOMEM When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family functions [including ioremap(), devm_ioremap(), etc.] are not available. Drivers that use these functions should depend on HAS_IOMEM so that they do not cause build errors. Mends this build error: s390-linux-ld: drivers/dma/sf-pdma/sf-pdma.o: in function `sf_pdma_probe': sf-pdma.c:(.text+0x1668): undefined reference to `devm_ioremap_resource' Fixes: 6973886ad58e ("dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Green Wan Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/20210522021313.16405-4-rdunlap@infradead.org Signed-off-by: Vinod Koul commit 0cfbb589d67f16fa55b26ae02b69c31b52e344b1 Author: Randy Dunlap Date: Fri May 21 19:13:11 2021 -0700 dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family functions [including ioremap(), devm_ioremap(), etc.] are not available. Drivers that use these functions should depend on HAS_IOMEM so that they do not cause build errors. Rectifies these build errors: s390-linux-ld: drivers/dma/qcom/hidma_mgmt.o: in function `hidma_mgmt_probe': hidma_mgmt.c:(.text+0x780): undefined reference to `devm_ioremap_resource' s390-linux-ld: drivers/dma/qcom/hidma_mgmt.o: in function `hidma_mgmt_init': hidma_mgmt.c:(.init.text+0x126): undefined reference to `of_address_to_resource' s390-linux-ld: hidma_mgmt.c:(.init.text+0x16e): undefined reference to `of_address_to_resource' Fixes: 67a2003e0607 ("dmaengine: add Qualcomm Technologies HIDMA channel driver") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Sinan Kaya Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Link: https://lore.kernel.org/r/20210522021313.16405-3-rdunlap@infradead.org Signed-off-by: Vinod Koul commit 253697b93c2a1c237d34d3ae326e394aeb0ca7b3 Author: Randy Dunlap Date: Fri May 21 19:13:10 2021 -0700 dmaengine: ALTERA_MSGDMA depends on HAS_IOMEM When CONFIG_HAS_IOMEM is not set/enabled, certain iomap() family functions [including ioremap(), devm_ioremap(), etc.] are not available. Drivers that use these functions should depend on HAS_IOMEM so that they do not cause build errors. Repairs this build error: s390-linux-ld: drivers/dma/altera-msgdma.o: in function `request_and_map': altera-msgdma.c:(.text+0x14b0): undefined reference to `devm_ioremap' Fixes: a85c6f1b2921 ("dmaengine: Add driver for Altera / Intel mSGDMA IP core") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Stefan Roese Cc: Vinod Koul Cc: dmaengine@vger.kernel.org Reviewed-by: Stefan Roese Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de Link: https://lore.kernel.org/r/20210522021313.16405-2-rdunlap@infradead.org Signed-off-by: Vinod Koul commit ddf742d4f3f12a6ba1b8e6ecbbf3ae736942f970 Author: Dave Jiang Date: Tue May 25 12:23:37 2021 -0700 dmaengine: idxd: Add missing cleanup for early error out in probe call The probe call stack is missing some cleanup when things fail in the middle. Add the appropriate cleanup routines to make sure we exit gracefully. Fixes: a39c7cd0438e ("dmaengine: idxd: removal of pcim managed mmio mapping") Reported-by: Nikhil Rao Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/162197061707.392656.15760573520817310791.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 9f007e7b6643799e2a6538a5fe04f51c371c6657 Author: Laurent Pinchart Date: Thu May 20 18:24:20 2021 +0300 dmaengine: xilinx: dpdma: Limit descriptor IDs to 16 bits While the descriptor ID is stored in a 32-bit field in the hardware descriptor, only 16 bits are used by the hardware and are reported through the XILINX_DPDMA_CH_DESC_ID register. Failure to handle the wrap-around results in a descriptor ID mismatch after 65536 frames. Fix it. Signed-off-by: Laurent Pinchart Tested-by: Jianqiang Chen Reviewed-by: Jianqiang Chen Link: https://lore.kernel.org/r/20210520152420.23986-5-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit 32828b82fb875b06511918b139d3a3cd93d34262 Author: Laurent Pinchart Date: Thu May 20 18:24:17 2021 +0300 dmaengine: xilinx: dpdma: Add missing dependencies to Kconfig The driver depends on both OF and IOMEM support, express those dependencies in Kconfig. This fixes a build failure on S390 reported by the 0day bot. Reported-by: kernel test robot Signed-off-by: Laurent Pinchart Tested-by: Jianqiang Chen Reviewed-by: Jianqiang Chen Link: https://lore.kernel.org/r/20210520152420.23986-2-laurent.pinchart@ideasonboard.com Signed-off-by: Vinod Koul commit 83eb4868d325b86e18509d0874e911497667cb54 Author: Yu Kuai Date: Mon May 17 16:18:24 2021 +0800 dmaengine: stm32-mdma: fix PM reference leak in stm32_mdma_alloc_chan_resourc() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20210517081826.1564698-2-yukuai3@huawei.com Signed-off-by: Vinod Koul commit 8982d48af36d2562c0f904736b0fc80efc9f2532 Author: Yu Kuai Date: Mon May 17 16:18:26 2021 +0800 dmaengine: zynqmp_dma: Fix PM reference leak in zynqmp_dma_alloc_chan_resourc() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20210517081826.1564698-4-yukuai3@huawei.com Signed-off-by: Vinod Koul commit 8124c8a6b35386f73523d27eacb71b5364a68c4c Author: Linus Torvalds Date: Sun May 30 11:58:25 2021 -1000 Linux 5.13-rc4 commit 593f555fbc6091bbaec8dd2a38b47ee643412e61 Author: Sriranjani P Date: Fri May 28 12:40:56 2021 +0530 net: stmmac: fix kernel panic due to NULL pointer dereference of mdio_bus_data Fixed link does not need mdio bus and in that case mdio_bus_data will not be allocated. Before using mdio_bus_data we should check for NULL. This patch fix the kernel panic due to NULL pointer dereference of mdio_bus_data when it is not allocated. Without this patch we do see following kernel crash caused due to kernel NULL pointer dereference. Call trace: stmmac_dvr_probe+0x3c/0x10b0 dwc_eth_dwmac_probe+0x224/0x378 platform_probe+0x68/0xe0 really_probe+0x130/0x3d8 driver_probe_device+0x68/0xd0 device_driver_attach+0x74/0x80 __driver_attach+0x58/0xf8 bus_for_each_dev+0x7c/0xd8 driver_attach+0x24/0x30 bus_add_driver+0x148/0x1f0 driver_register+0x64/0x120 __platform_driver_register+0x28/0x38 dwc_eth_dwmac_driver_init+0x1c/0x28 do_one_initcall+0x78/0x158 kernel_init_freeable+0x1f0/0x244 kernel_init+0x14/0x118 ret_from_fork+0x10/0x30 Code: f9002bfb 9113e2d9 910e6273 aa0003f7 (f9405c78) ---[ end trace 32d9d41562ddc081 ]--- Fixes: e5e5b771f684 ("net: stmmac: make in-band AN mode parsing is supported for non-DT") Signed-off-by: Sriranjani P Signed-off-by: Pankaj Dubey Link: https://lore.kernel.org/r/20210528071056.35252-1-sriranjani.p@samsung.com Signed-off-by: Jakub Kicinski commit d4826d17b3931cf0d8351d8f614332dd4b71efc4 Author: Felix Fietkau Date: Fri May 28 14:03:04 2021 +0200 mt76: mt7921: remove leftover 80+80 HE capability Fixes interop issues with some APs that disable HE Tx if this is present Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210528120304.34751-1-nbd@nbd.name commit 02de318afa7a06216570ab69e028751590636a0e Author: Lorenzo Bianconi Date: Sat May 15 15:26:12 2021 +0200 mt76: mt7615: do not set MT76_STATE_PM at bootstrap Remove MT76_STATE_PM in mt7615_init_device() and introduce __mt7663s_mcu_drv_pmctrl for fw loading in mt7663s. This patch fixes a crash at bootstrap for device (e.g. mt7622) that do not support runtime-pm Fixes: 7f2bc8ba11a0 ("mt76: connac: introduce wake counter for fw_pmctrl synchronization") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/e5a2618574007113d844874420f7855891abf167.1621085028.git.lorenzo@kernel.org commit 4ad7935df6a566225c3d51900bde8f2f0f8b6de3 Author: Kai Vehmanen Date: Fri May 28 21:51:23 2021 +0300 ALSA: hda: Add AlderLake-M PCI ID Add HD Audio PCI ID for Intel AlderLake-M. Add rules to snd_intel_dsp_find_config() to choose SOF driver for ADL-M systems with PCH-DMIC or Soundwire codecs, and legacy driver for the rest. Signed-off-by: Kai Vehmanen Reviewed-by: Péter Ujfalusi Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210528185123.48332-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit b90e90f40b4ff23c753126008bf4713a42353af6 Merge: 9a76c0ee3a759 8aa0ae4399663 Author: Linus Torvalds Date: Sat May 29 18:24:00 2021 -1000 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "This is a bit larger than usual at rc4 time. The reason is due to Lee's work of fixing newly reported build warnings. The rest is fixes as usual" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (22 commits) MAINTAINERS: adjust to removing i2c designware platform data i2c: s3c2410: fix possible NULL pointer deref on read message after write i2c: mediatek: Disable i2c start_en and clear intr_stat brfore reset i2c: i801: Don't generate an interrupt on bus reset i2c: mpc: implement erratum A-004447 workaround powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P1010 i2c controllers powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P2041 i2c controllers dt-bindings: i2c: mpc: Add fsl,i2c-erratum-a004447 flag i2c: busses: i2c-stm32f4: Remove incorrectly placed ' ' from function name i2c: busses: i2c-st: Fix copy/paste function misnaming issues i2c: busses: i2c-pnx: Provide descriptions for 'alg_data' data structure i2c: busses: i2c-ocores: Place the expected function names into the documentation headers i2c: busses: i2c-eg20t: Fix 'bad line' issue and provide description for 'msgs' param i2c: busses: i2c-designware-master: Fix misnaming of 'i2c_dw_init_master()' i2c: busses: i2c-cadence: Fix incorrectly documented 'enum cdns_i2c_slave_mode' i2c: busses: i2c-ali1563: File headers are not good candidates for kernel-doc i2c: muxes: i2c-arb-gpio-challenge: Demote non-conformant kernel-doc headers i2c: busses: i2c-nomadik: Fix formatting issue pertaining to 'timeout' i2c: sh_mobile: Use new clock calculation formulas for RZ/G2E i2c: I2C_HISI should depend on ACPI ... commit 9a76c0ee3a759c1aaeedaaac9d3831397f264237 Merge: 9d68fe84f8c52 ddc473916955f Author: Linus Torvalds Date: Sat May 29 18:16:09 2021 -1000 Merge tag 'seccomp-fixes-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp fixes from Kees Cook: "This fixes a hard-to-hit race condition in the addfd user_notif feature of seccomp, visible since v5.9. And a small documentation fix" * tag 'seccomp-fixes-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: Refactor notification handler to prepare for new semantics Documentation: seccomp: Fix user notification documentation commit 9d68fe84f8c52942c30febfec289c6219fe4f285 Merge: 75b9c727afccc bab0d47c0ebb5 Author: Linus Torvalds Date: Sat May 29 18:10:10 2021 -1000 Merge tag 'riscv-for-linus-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: "A handful of RISC-V related fixes: - avoid errors when the stack tracing code is tracing itself. - resurrect the memtest= kernel command line argument on RISC-V, which was briefly enabled during the merge window before a refactoring disabled it. - build fix and some warning cleanups" * tag 'riscv-for-linus-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: kexec: Fix W=1 build warnings riscv: kprobes: Fix build error when MMU=n riscv: Select ARCH_USE_MEMTEST riscv: stacktrace: fix the riscv stacktrace when CONFIG_FRAME_POINTER enabled commit 75b9c727afcccff7cbcf1fd14e5e967dd69bab75 Merge: df8c66c4cfb91 0fe0bbe00a6fb Author: Linus Torvalds Date: Sat May 29 17:47:19 2021 -1000 Merge tag 'xfs-5.13-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: "This week's pile mitigates some decades-old problems in how extent size hints interact with realtime volumes, fixes some failures in online shrink, and fixes a problem where directory and symlink shrinking on extremely fragmented filesystems could fail. The most user-notable change here is to point users at our (new) IRC channel on OFTC. Freedom isn't free, it costs folks like you and me; and if you don't kowtow, they'll expel everyone and take over your channel. (Ok, ok, that didn't fit the song lyrics...) Summary: - Fix a bug where unmapping operations end earlier than expected, which can cause chaos on multi-block directory and symlink shrink operations. - Fix an erroneous assert that can trigger if we try to transition a bmap structure from btree format to extents format with zero extents. This was exposed by xfs/538" * tag 'xfs-5.13-fixes-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: bunmapi has unnecessary AG lock ordering issues xfs: btree format inode forks can have zero extents xfs: add new IRC channel to MAINTAINERS xfs: validate extsz hints against rt extent size when rtinherit is set xfs: standardize extent size hint validation xfs: check free AG space when making per-AG reservations commit 216e5835966a709bb87a4d94a7343dd90ab0bd64 Author: Pavel Begunkov Date: Sat May 29 12:01:02 2021 +0100 io_uring: fix misaccounting fix buf pinned pages As Andres reports "... io_sqe_buffer_register() doesn't initialize imu. io_buffer_account_pin() does imu->acct_pages++, before calling io_account_mem(ctx, imu->acct_pages).", leading to evevntual -ENOMEM. Initialise the field. Reported-by: Andres Freund Fixes: 41edf1a5ec967 ("io_uring: keep table of pointers to ubufs") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/438a6f46739ae5e05d9c75a0c8fa235320ff367c.1622285901.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ec3a5cb61146c91f0f7dcec8b7e7157a4879a9ee Author: Khem Raj Date: Fri May 14 14:37:41 2021 -0700 riscv: Use -mno-relax when using lld linker lld does not implement the RISCV relaxation optimizations like GNU ld therefore disable it when building with lld, Also pass it to assembler when using external GNU assembler ( LLVM_IAS != 1 ), this ensures that relevant assembler option is also enabled along. if these options are not used then we see following relocations in objects 0000000000000000 R_RISCV_ALIGN *ABS*+0x0000000000000002 These are then rejected by lld ld.lld: error: capability.c:(.fixup+0x0): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax but the .o is already compiled with -mno-relax Signed-off-by: Khem Raj Reviewed-by: Nathan Chancellor Signed-off-by: Palmer Dabbelt commit ddc473916955f7710d1eb17c1273d91c8622a9fe Author: Sargun Dhillon Date: Mon May 17 12:39:06 2021 -0700 seccomp: Refactor notification handler to prepare for new semantics This refactors the user notification code to have a do / while loop around the completion condition. This has a small change in semantic, in that previously we ignored addfd calls upon wakeup if the notification had been responded to, but instead with the new change we check for an outstanding addfd calls prior to returning to userspace. Rodrigo Campos also identified a bug that can result in addfd causing an early return, when the supervisor didn't actually handle the syscall [1]. [1]: https://lore.kernel.org/lkml/20210413160151.3301-1-rodrigo@kinvolk.io/ Fixes: 7cf97b125455 ("seccomp: Introduce addfd ioctl to seccomp user notifier") Signed-off-by: Sargun Dhillon Acked-by: Tycho Andersen Acked-by: Christian Brauner Signed-off-by: Kees Cook Tested-by: Rodrigo Campos Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210517193908.3113-3-sargun@sargun.me commit df8c66c4cfb91f2372d138b9b714f6df6f506966 Merge: f956cb99b938f 5d8db38ad7660 Author: Linus Torvalds Date: Sat May 29 06:55:55 2021 -1000 Merge tag 'thermal-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal fixes from Daniel Lezcano: - Fix uninitialized error code value for the SPMI adc driver (Yang Yingliang) - Fix kernel doc warning (Yang Li) - Fix wrong read-write thermal trip point initialization (Srinivas Pandruvada) * tag 'thermal-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: thermal/drivers/qcom: Fix error code in adc_tm5_get_dt_channel_data() thermal/ti-soc-thermal: Fix kernel-doc thermal/drivers/intel: Initialize RW trip to THERMAL_TEMP_INVALID commit f956cb99b938fbf0f8262ba335d505b1ffd02c4e Merge: e1a9e3db3bb59 bbf0a94744edf Author: Linus Torvalds Date: Sat May 29 06:41:50 2021 -1000 Merge tag 'char-misc-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are some tiny char/misc driver fixes for 5.13-rc4. Nothing huge here, just some tiny fixes for reported issues: - two interconnect driver fixes - kgdb build warning fix for gcc-11 - hgafb regression fix - soundwire driver fix - mei driver fix All have been in linux-next with no reported issues" * tag 'char-misc-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: mei: request autosuspend after sending rx flow control kgdb: fix gcc-11 warnings harder video: hgafb: correctly handle card detect failure during probe soundwire: qcom: fix handling of qcom,ports-block-pack-mode interconnect: qcom: Add missing MODULE_DEVICE_TABLE interconnect: qcom: bcm-voter: add a missing of_node_put() commit e1a9e3db3bb59c2fa0c0de0b3381c64b3b6ffba7 Merge: 494b99f712d00 0c8713153fbf7 Author: Linus Torvalds Date: Sat May 29 06:33:28 2021 -1000 Merge tag 'driver-core-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are three small driver core / debugfs fixes for 5.13-rc4: - debugfs fix for incorrect "lockdown" mode for selinux accesses - two device link changes, one bugfix and one cleanup All of these have been in linux-next for over a week with no reported problems" * tag 'driver-core-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: drivers: base: Reduce device link removal code duplication drivers: base: Fix device link removal debugfs: fix security_locked_down() call for SELinux commit 494b99f712d00fee7e0927067081954fc493b6d9 Merge: 3837f9a08bdab 54732a5322ff1 Author: Linus Torvalds Date: Sat May 29 06:29:13 2021 -1000 Merge tag 'staging-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver fixes from Greg KH: "Here are some small IIO and staging driver fixes for reported issues for 5.13-rc4. Nothing major here, tiny changes for reported problems, full details are in the shortlog if people are curious. All have been in linux-next for a while with no reported problems" * tag 'staging-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: adc: ad7793: Add missing error code in ad7793_setup() iio: adc: ad7923: Fix undersized rx buffer. iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp() iio: dac: ad5770r: Put fwnode in error case during ->probe() iio: gyro: fxas21002c: balance runtime power in error path staging: emxx_udc: fix loop in _nbu2ss_nuke() staging: iio: cdc: ad7746: avoid overwrite of num_channels iio: adc: ad7192: handle regulator voltage error first iio: adc: ad7192: Avoid disabling a clock that was never enabled. iio: adc: ad7124: Fix potential overflow due to non sequential channel numbers iio: adc: ad7124: Fix missbalanced regulator enable / disable on error. commit 3837f9a08bdab2c9fabe6e52dcfb6cfbfa8be7d6 Merge: 523d0b1e9c42b 56dde68f85be0 Author: Linus Torvalds Date: Sat May 29 06:25:16 2021 -1000 Merge tag 'tty-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty / serial driver fixes from Greg KH: "Here are some small fixes for reported problems for tty and serial drivers for 5.13-rc4. They consist of: - 8250 bugfixes and new device support - lockdown security mode fixup - syzbot found problems fixed - 8250_omap fix for interrupt storm - revert of 8250_omap driver fix as it caused worse problem than the original issue All but the last patch have been in linux-next for a while, the last one is a revert of a problem found in linux-next with the 8250_omap driver change" * tag 'tty-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: Revert "serial: 8250: 8250_omap: Fix possible interrupt storm" serial: 8250_pci: handle FL_NOIRQ board flag serial: rp2: use 'request_firmware' instead of 'request_firmware_nowait' serial: 8250_pci: Add support for new HPE serial device serial: 8250: 8250_omap: Fix possible interrupt storm serial: 8250: Use BIT(x) for UART_{CAP,BUG}_* serial: 8250: Add UART_BUG_TXRACE workaround for Aspeed VUART serial: 8250_dw: Add device HID for new AMD UART controller serial: sh-sci: Fix off-by-one error in FIFO threshold register setting serial: core: fix suspicious security_locked_down() call serial: tegra: Fix a mask operation that is always true commit 523d0b1e9c42b8b8ee906aa040fea465d224b360 Merge: 224478289ca0e a7f2e9272aff1 Author: Linus Torvalds Date: Sat May 29 06:11:21 2021 -1000 Merge tag 'usb-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB / Thunderbolt fixes from Greg KH: "Here are a number of tiny USB and Thunderbolt driver fixes for 5.13-rc4. They consist of: - thunderbolt fixes for some NVM bound issues - xhci fixes for reported problems - control-request fixups - documentation build warning fixes - new usb-serial driver device ids - typec bugfixes for reported issues - usbfs warning fixups (could be triggered from userspace) - other tiny fixes for reported problems. All of these have been in linux-next with no reported issues" * tag 'usb-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (22 commits) xhci: Fix 5.12 regression of missing xHC cache clearing command after a Stall xhci: fix giving back URB with incorrect status regression in 5.12 usb: gadget: udc: renesas_usb3: Fix a race in usb3_start_pipen() usb: typec: tcpm: Respond Not_Supported if no snk_vdo usb: typec: tcpm: Properly interrupt VDM AMS USB: trancevibrator: fix control-request direction usb: Restore the usb_header label usb: typec: tcpm: Use LE to CPU conversion when accessing msg->header usb: typec: ucsi: Clear pending after acking connector change usb: typec: mux: Fix matching with typec_altmode_desc misc/uss720: fix memory leak in uss720_probe usb: dwc3: gadget: Properly track pending and queued SG USB: usbfs: Don't WARN about excessively large memory allocations thunderbolt: usb4: Fix NVM read buffer bounds and offset issue thunderbolt: dma_port: Fix NVM read buffer bounds and offset issue usb: chipidea: udc: assign interrupt number to USB gadget structure usb: cdnsp: Fix lack of removing request from pending list. usb: cdns3: Fix runtime PM imbalance on error USB: serial: pl2303: add device id for ADLINK ND-6530 GC USB: serial: ti_usb_3410_5052: add startech.com device id ... commit 224478289ca0e7abf06a3bc63b06c42a2bf84c69 Merge: 866c4b8a18e26 000ac42953395 Author: Linus Torvalds Date: Sat May 29 06:02:25 2021 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "ARM fixes: - Another state update on exit to userspace fix - Prevent the creation of mixed 32/64 VMs - Fix regression with irqbypass not restarting the guest on failed connect - Fix regression with debug register decoding resulting in overlapping access - Commit exception state on exit to usrspace - Fix the MMU notifier return values - Add missing 'static' qualifiers in the new host stage-2 code x86 fixes: - fix guest missed wakeup with assigned devices - fix WARN reported by syzkaller - do not use BIT() in UAPI headers - make the kvm_amd.avic parameter bool PPC fixes: - make halt polling heuristics consistent with other architectures selftests: - various fixes - new performance selftest memslot_perf_test - test UFFD minor faults in demand_paging_test" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (44 commits) selftests: kvm: fix overlapping addresses in memslot_perf_test KVM: X86: Kill off ctxt->ud KVM: X86: Fix warning caused by stale emulation context KVM: X86: Use kvm_get_linear_rip() in single-step and #DB/#BP interception KVM: x86/mmu: Fix comment mentioning skip_4k KVM: VMX: update vcpu posted-interrupt descriptor when assigning device KVM: rename KVM_REQ_PENDING_TIMER to KVM_REQ_UNBLOCK KVM: x86: add start_assignment hook to kvm_x86_ops KVM: LAPIC: Narrow the timer latency between wait_lapic_expire and world switch selftests: kvm: do only 1 memslot_perf_test run by default KVM: X86: Use _BITUL() macro in UAPI headers KVM: selftests: add shared hugetlbfs backing source type KVM: selftests: allow using UFFD minor faults for demand paging KVM: selftests: create alias mappings when using shared memory KVM: selftests: add shmem backing source type KVM: selftests: refactor vm_mem_backing_src_type flags KVM: selftests: allow different backing source types KVM: selftests: compute correct demand paging size KVM: selftests: simplify setup_demand_paging error handling KVM: selftests: Print a message if /dev/kvm is missing ... commit 866c4b8a18e26b7ae41c45b1af57c82a66089985 Merge: 6799d4f2da496 ffa99c436aa70 Author: Linus Torvalds Date: Sat May 29 05:51:53 2021 -1000 Merge tag 's390-5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Vasily Gorbik: "Fix races in vfio-ccw request handling" * tag 's390-5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: vfio-ccw: Serialize FSM IDLE state with I/O completion vfio-ccw: Reset FSM state to IDLE inside FSM vfio-ccw: Check initialized flag in cp_init() commit 000ac42953395a4f0a63d5db640c5e4c88a548c5 Author: Paolo Bonzini Date: Fri May 28 15:10:58 2021 -0400 selftests: kvm: fix overlapping addresses in memslot_perf_test vm_create allocates memory and maps it close to GPA. This memory is separate from what is allocated in subsequent calls to vm_userspace_mem_region_add, so it is incorrect to pass the test memory size to vm_create_default. Just pass a small fixed amount of memory which can be used later for page table, otherwise GPAs are already allocated at MEM_GPA and the test aborts. Signed-off-by: Paolo Bonzini commit 7d65f9e80646c595e8c853640a9d0768a33e204c Author: Thomas Gleixner Date: Tue May 25 13:08:41 2021 +0200 x86/apic: Mark _all_ legacy interrupts when IO/APIC is missing PIC interrupts do not support affinity setting and they can end up on any online CPU. Therefore, it's required to mark the associated vectors as system-wide reserved. Otherwise, the corresponding irq descriptors are copied to the secondary CPUs but the vectors are not marked as assigned or reserved. This works correctly for the IO/APIC case. When the IO/APIC is disabled via config, kernel command line or lack of enumeration then all legacy interrupts are routed through the PIC, but nothing marks them as system-wide reserved vectors. As a consequence, a subsequent allocation on a secondary CPU can result in allocating one of these vectors, which triggers the BUG() in apic_update_vector() because the interrupt descriptor slot is not empty. Imran tried to work around that by marking those interrupts as allocated when a CPU comes online. But that's wrong in case that the IO/APIC is available and one of the legacy interrupts, e.g. IRQ0, has been switched to PIC mode because then marking them as allocated will fail as they are already marked as system vectors. Stay consistent and update the legacy vectors after attempting IO/APIC initialization and mark them as system vectors in case that no IO/APIC is available. Fixes: 69cde0004a4b ("x86/vector: Use matrix allocator for vector assignment") Reported-by: Imran Khan Signed-off-by: Thomas Gleixner Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210519233928.2157496-1-imran.f.khan@oracle.com commit 6799d4f2da496cab9b3fd26283a8ce3639b1a88d Merge: 0217a27e4d19f 2ef7665dfd888 Author: Linus Torvalds Date: Fri May 28 14:47:48 2021 -1000 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Ten small fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: target: qla2xxx: Wait for stop_phase1 at WWN removal scsi: hisi_sas: Drop free_irq() of devm_request_irq() allocated irq scsi: vmw_pvscsi: Set correct residual data length scsi: bnx2fc: Return failure if io_req is already in ABTS processing scsi: aic7xxx: Remove multiple definition of globals scsi: aic7xxx: Restore several defines for aic7xxx firmware build scsi: target: iblock: Fix smp_processor_id() BUG messages scsi: libsas: Use _safe() loop in sas_resume_port() scsi: target: tcmu: Fix xarray RCU warning scsi: target: core: Avoid smp_processor_id() in preemptible code commit 0217a27e4d19f6ecc81a14de7c5e2d7886af845f Merge: b3dbbae609933 a4b58f1721eb4 Author: Linus Torvalds Date: Fri May 28 14:42:37 2021 -1000 Merge tag 'block-5.13-2021-05-28' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - NVMe pull request (Christoph): - fix a memory leak in nvme_cdev_add (Guoqing Jiang) - fix inline data size comparison in nvmet_tcp_queue_response (Hou Pu) - fix false keep-alive timeout when a controller is torn down (Sagi Grimberg) - fix a nvme-tcp Kconfig dependency (Sagi Grimberg) - short-circuit reconnect retries for FC (Hannes Reinecke) - decode host pathing error for connect (Hannes Reinecke) - MD pull request (Song): - Fix incorrect chunk boundary assert (Christoph) - Fix s390/dasd verification panic (Stefan) * tag 'block-5.13-2021-05-28' of git://git.kernel.dk/linux-block: nvmet: fix false keep-alive timeout when a controller is torn down nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response nvme-tcp: remove incorrect Kconfig dep in BLK_DEV_NVME md/raid5: remove an incorrect assert in in_chunk_boundary s390/dasd: add missing discipline function nvme-fabrics: decode host pathing error for connect nvme-fc: short-circuit reconnect retries nvme: fix potential memory leaks in nvme_cdev_add commit b3dbbae60993365ab4a7ba3f9f6f6eca722b57c1 Merge: 567d1fd853b87 b16ef427adf31 Author: Linus Torvalds Date: Fri May 28 14:35:55 2021 -1000 Merge tag 'io_uring-5.13-2021-05-28' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "A few minor fixes: - Fix an issue with hashed wait removal on exit (Zqiang, Pavel) - Fix a recent data race introduced in this series (Marco)" * tag 'io_uring-5.13-2021-05-28' of git://git.kernel.dk/linux-block: io_uring: fix data race to avoid potential NULL-deref io-wq: Fix UAF when wakeup wqe in hash waitqueue io_uring/io-wq: close io-wq full-stop gap commit 567d1fd853b8786f93ba399c8ff7c8106bed5fe5 Merge: f289d990450cf aeeb517368822 Author: Linus Torvalds Date: Fri May 28 14:28:58 2021 -1000 Merge tag 'drm-fixes-2021-05-29' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Pretty quiet this week, couple of amdgpu, one i915, and a few misc otherwise. ttm: - prevent irrelevant swapout amdgpu: - MultiGPU fan fix - VCN powergating fixes amdkfd: - Fix SDMA register offset error meson: - fix shutdown crash i915: - Re-enable LTTPR non-transparent LT mode for DPCD_REV < 1.4" * tag 'drm-fixes-2021-05-29' of git://anongit.freedesktop.org/drm/drm: drm/ttm: Skip swapout if ttm object is not populated drm/i915: Reenable LTTPR non-transparent LT mode for DPCD_REV<1.4 drm/meson: fix shutdown crash when component not probed drm/amdgpu/jpeg3: add cancel_delayed_work_sync before power gate drm/amdgpu/jpeg2.5: add cancel_delayed_work_sync before power gate drm/amdgpu/jpeg2.0: add cancel_delayed_work_sync before power gate drm/amdgpu/vcn3: add cancel_delayed_work_sync before power gate drm/amdgpu/vcn2.5: add cancel_delayed_work_sync before power gate drm/amdgpu/vcn2.0: add cancel_delayed_work_sync before power gate drm/amdgpu/vcn1: add cancel_delayed_work_sync before power gate drm/amdkfd: correct sienna_cichlid SDMA RLC register offset error drm/amd/pm: correct MGpuFanBoost setting commit f289d990450cfa16869b9ff670e611e5df51f1d9 Merge: 7c0ec89d31e55 8fc4e4aa2bfca Author: Linus Torvalds Date: Fri May 28 14:23:05 2021 -1000 Merge tag 'perf-tools-fixes-for-v5.13-2021-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix error checking of BPF prog attachment in 'perf stat'. - Fix getting maximum number of fds in the vendor events JSON parser. - Move debug initialization earlier, fixing a segfault in some cases. - Fix eventcode of power10 JSON events. * tag 'perf-tools-fixes-for-v5.13-2021-05-28' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf vendor events powerpc: Fix eventcode of power10 JSON events perf stat: Fix error check for bpf_program__attach perf debug: Move debug initialization earlier perf jevents: Fix getting maximum number of fds commit 7c0ec89d31e55d682cd8bf95ca69acc47124fad6 Merge: 5ff2756afde08 1bb56810677f2 Author: Linus Torvalds Date: Fri May 28 14:15:47 2021 -1000 Merge tag '5.13-rc4-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three SMB3 fixes. Two for stable, and the other fixes a problem pointed out with a recently added ioctl" * tag '5.13-rc4-smb3' of git://git.samba.org/sfrench/cifs-2.6: cifs: change format of CIFS_FULL_KEY_DUMP ioctl cifs: fix string declarations and assignments in tracepoints cifs: set server->cipher_type to AES-128-CCM for SMB3.0 commit 6850ec973791a4917003a6f5e2e0243a56e2c1f7 Merge: 44991d61aa120 69ca3d29a7555 Author: Jakub Kicinski Date: Fri May 28 13:51:43 2021 -0700 Merge branch 'mptcp-fixes-for-5-13' Mat Martineau says: ==================== mptcp: Fixes for 5.13 These patches address two issues in MPTCP. Patch 1 fixes a locking issue affecting MPTCP-level retransmissions. Patches 2-4 improve handling of out-of-order packet arrival early in a connection, so it falls back to TCP rather than forcing a reset. Includes a selftest. ==================== Link: https://lore.kernel.org/r/20210527233140.182728-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit 69ca3d29a75554122b998e8dfa20117766f52f48 Author: Paolo Abeni Date: Thu May 27 16:31:40 2021 -0700 mptcp: update selftest for fallback due to OoO The previous commit noted that we can have fallback scenario due to OoO (or packet drop). Update the self-tests accordingly Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit dea2b1ea9c705c5ba351a9174403fd83dbb68fc3 Author: Paolo Abeni Date: Thu May 27 16:31:39 2021 -0700 mptcp: do not reset MP_CAPABLE subflow on mapping errors When some mapping related errors occurs we close the main MPC subflow with a RST. We should instead fallback gracefully to TCP, and do the reset only for MPJ subflows. Fixes: d22f4988ffec ("mptcp: process MP_CAPABLE data option") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/192 Reported-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 06f9a435b3aa12f4de6da91f11fdce8ce7b46205 Author: Paolo Abeni Date: Thu May 27 16:31:38 2021 -0700 mptcp: always parse mptcp options for MPC reqsk In subflow_syn_recv_sock() we currently skip options parsing for OoO packet, given that such packets may not carry the relevant MPC option. If the peer generates an MPC+data TSO packet and some of the early segments are lost or get reorder, we server will ignore the peer key, causing transient, unexpected fallback to TCP. The solution is always parsing the incoming MPTCP options, and do the fallback only for in-order packets. This actually cleans the existing code a bit. Fixes: d22f4988ffec ("mptcp: process MP_CAPABLE data option") Reported-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit b5941f066b4ca331db225a976dae1d6ca8cf0ae3 Author: Paolo Abeni Date: Thu May 27 16:31:37 2021 -0700 mptcp: fix sk_forward_memory corruption on retransmission MPTCP sk_forward_memory handling is a bit special, as such field is protected by the msk socket spin_lock, instead of the plain socket lock. Currently we have a code path updating such field without handling the relevant lock: __mptcp_retrans() -> __mptcp_clean_una_wakeup() Several helpers in __mptcp_clean_una_wakeup() will update sk_forward_alloc, possibly causing such field corruption, as reported by Matthieu. Address the issue providing and using a new variant of blamed function which explicitly acquires the msk spin lock. Fixes: 64b9cea7a0af ("mptcp: fix spurious retransmissions") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/172 Reported-by: Matthieu Baerts Tested-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: Jakub Kicinski commit 5ff2756afde08b266fbb673849899fec694f39f1 Merge: fc683f967aa97 a799b68a7c7ac Author: Linus Torvalds Date: Fri May 28 08:53:19 2021 -1000 Merge tag 'nfs-for-5.13-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client bugfixes from Trond Myklebust: "Stable fixes: - Fix v4.0/v4.1 SEEK_DATA return -ENOTSUPP when set NFS_V4_2 config - Fix Oops in xs_tcp_send_request() when transport is disconnected - Fix a NULL pointer dereference in pnfs_mark_matching_lsegs_return() Bugfixes: - Fix instances where signal_pending() should be fatal_signal_pending() - fix an incorrect limit in filelayout_decode_layout() - Fixes for the SUNRPC backlogged RPC queue - Don't corrupt the value of pg_bytes_written in nfs_do_recoalesce() - Revert commit 586a0787ce35 ("Clean up rpcrdma_prepare_readch()")" * tag 'nfs-for-5.13-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: nfs: Remove trailing semicolon in macros xprtrdma: Revert 586a0787ce35 NFSv4: Fix v4.0/v4.1 SEEK_DATA return -ENOTSUPP when set NFS_V4_2 config NFS: Clean up reset of the mirror accounting variables NFS: Don't corrupt the value of pg_bytes_written in nfs_do_recoalesce() NFS: Fix an Oopsable condition in __nfs_pageio_add_request() SUNRPC: More fixes for backlog congestion SUNRPC: Fix Oops in xs_tcp_send_request() when transport is disconnected NFSv4: Fix a NULL pointer dereference in pnfs_mark_matching_lsegs_return() SUNRPC in case of backlog, hand free slots directly to waiting task pNFS/NFSv4: Remove redundant initialization of 'rd_size' NFS: fix an incorrect limit in filelayout_decode_layout() fs/nfs: Use fatal_signal_pending instead of signal_pending commit fc683f967aa97969463b9578a9e18e484472385f Merge: 8508b97ae2b6c 50dbfae972cbe Author: Linus Torvalds Date: Fri May 28 08:47:50 2021 -1000 Merge tag 'sound-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A slightly high volume at this time due to pending ASoC fixes. While there are a few generic simple-card fixes for regressions, most of the changes are device-specific fixes: ASoC Intel SOF, codec clocks, other codec / platform fixes as well as usual HD-audio and USB-audio" * tag 'sound-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (37 commits) ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook Fury 17 G8 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook Fury 15 G8 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook G8 ALSA: hda/realtek: fix mute/micmute LEDs for HP 855 G8 ALSA: hda/realtek: Chain in pop reduction fixup for ThinkStation P340 ALSA: usb-audio: scarlett2: snd_scarlett_gen2_controls_create() can be static ALSA: hda/realtek: the bass speaker can't output sound on Yoga 9i ALSA: hda/realtek: Headphone volume is controlled by Front mixer ALSA: usb-audio: scarlett2: Improve driver startup messages ALSA: usb-audio: scarlett2: Fix device hang with ehci-pci ALSA: usb-audio: fix control-request direction ASoC: qcom: lpass-cpu: Use optional clk APIs ASoC: cs35l33: fix an error code in probe() ASoC: SOF: Intel: hda: don't send DAI_CONFIG IPC for older firmware ASoC: fsl: fix SND_SOC_IMX_RPMSG dependency ASoC: cs42l52: Minor tidy up of error paths ASoC: cs35l32: Add missing regmap use_single config ASoC: cs35l34: Add missing regmap use_single config ASoC: cs42l73: Add missing regmap use_single config ASoC: cs53l30: Add missing regmap use_single config ... commit 8508b97ae2b6c73c2c09798c9fa9d27ec57ff1dc Merge: afdd14704d7eb 24845dcb170e1 Author: Linus Torvalds Date: Fri May 28 08:31:48 2021 -1000 Merge tag 'clang-features-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull clang feature fixes from Kees Cook: - Correctly pass stack frame size checking under LTO (Nick Desaulniers) - Avoid CFI mismatches by checking initcall_t types (Marco Elver) * tag 'clang-features-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: Makefile: LTO: have linker check -Wframe-larger-than init: verify that function is initcall_t at compile-time commit afdd14704d7eb4d7634cb7ba8d117066fed44282 Merge: 97e5bf604b7a0 78cf0eb926cb1 Author: Linus Torvalds Date: Fri May 28 08:24:13 2021 -1000 Merge tag 'mips-fixes_5.13_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS fixes from Thomas Bogendoerfer: - fix function/preempt trace hangs - a few build fixes * tag 'mips-fixes_5.13_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c MIPS: launch.h: add include guard to prevent build errors MIPS: alchemy: xxs1500: add gpio-au1000.h header file commit a3d2ec9d3c2fa7b6484da6493cc2a57af93cd0a4 Merge: b35491e66c879 66e94d5cafd4d Author: Paolo Bonzini Date: Fri May 28 13:02:03 2021 -0400 Merge tag 'kvmarm-fixes-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 5.13, take #2 - Another state update on exit to userspace fix - Prevent the creation of mixed 32/64 VMs commit b35491e66c87946f380ebf8ab10a7e1f795e5ece Author: Wanpeng Li Date: Thu May 27 17:01:37 2021 -0700 KVM: X86: Kill off ctxt->ud ctxt->ud is consumed only by x86_decode_insn(), we can kill it off by passing emulation_type to x86_decode_insn() and dropping ctxt->ud altogether. Tracking that info in ctxt for literally one call is silly. Suggested-by: Sean Christopherson Signed-off-by: Wanpeng Li Reviewed-by: Sean Christopherson Message-Id: <1622160097-37633-2-git-send-email-wanpengli@tencent.com> commit da6393cdd8aaa354b3a2437cd73ebb34cac958e3 Author: Wanpeng Li Date: Thu May 27 17:01:36 2021 -0700 KVM: X86: Fix warning caused by stale emulation context Reported by syzkaller: WARNING: CPU: 7 PID: 10526 at linux/arch/x86/kvm//x86.c:7621 x86_emulate_instruction+0x41b/0x510 [kvm] RIP: 0010:x86_emulate_instruction+0x41b/0x510 [kvm] Call Trace: kvm_mmu_page_fault+0x126/0x8f0 [kvm] vmx_handle_exit+0x11e/0x680 [kvm_intel] vcpu_enter_guest+0xd95/0x1b40 [kvm] kvm_arch_vcpu_ioctl_run+0x377/0x6a0 [kvm] kvm_vcpu_ioctl+0x389/0x630 [kvm] __x64_sys_ioctl+0x8e/0xd0 do_syscall_64+0x3c/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae Commit 4a1e10d5b5d8 ("KVM: x86: handle hardware breakpoints during emulation()) adds hardware breakpoints check before emulation the instruction and parts of emulation context initialization, actually we don't have the EMULTYPE_NO_DECODE flag here and the emulation context will not be reused. Commit c8848cee74ff ("KVM: x86: set ctxt->have_exception in x86_decode_insn()) triggers the warning because it catches the stale emulation context has #UD, however, it is not during instruction decoding which should result in EMULATION_FAILED. This patch fixes it by moving the second part emulation context initialization into init_emulate_ctxt() and before hardware breakpoints check. The ctxt->ud will be dropped by a follow-up patch. syzkaller source: https://syzkaller.appspot.com/x/repro.c?x=134683fdd00000 Reported-by: syzbot+71271244f206d17f6441@syzkaller.appspotmail.com Fixes: 4a1e10d5b5d8 (KVM: x86: handle hardware breakpoints during emulation) Signed-off-by: Wanpeng Li Reviewed-by: Sean Christopherson Message-Id: <1622160097-37633-1-git-send-email-wanpengli@tencent.com> commit e87e46d5f3182f82d997641d95db01a7feacef92 Author: Yuan Yao Date: Wed May 26 14:38:28 2021 +0800 KVM: X86: Use kvm_get_linear_rip() in single-step and #DB/#BP interception The kvm_get_linear_rip() handles x86/long mode cases well and has better readability, __kvm_set_rflags() also use the paired function kvm_is_linear_rip() to check the vcpu->arch.singlestep_rip set in kvm_arch_vcpu_ioctl_set_guest_debug(), so change the "CS.BASE + RIP" code in kvm_arch_vcpu_ioctl_set_guest_debug() and handle_exception_nmi() to this one. Signed-off-by: Yuan Yao Message-Id: <20210526063828.1173-1-yuan.yao@linux.intel.com> Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit aac902925ea646e461c95edc98a8a57eb0def917 Author: Sargun Dhillon Date: Mon May 17 12:39:05 2021 -0700 Documentation: seccomp: Fix user notification documentation The documentation had some previously incorrect information about how userspace notifications (and responses) were handled due to a change from a previously proposed patchset. Signed-off-by: Sargun Dhillon Acked-by: Tycho Andersen Acked-by: Christian Brauner Signed-off-by: Kees Cook Fixes: 6a21cc50f0c7 ("seccomp: add a return code to trap to userspace") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210517193908.3113-2-sargun@sargun.me commit 8aa0ae439966364da86fc6437375e32f2890c4c3 Author: Lukas Bulwahn Date: Mon Apr 19 08:18:09 2021 +0200 MAINTAINERS: adjust to removing i2c designware platform data Commit 5a517b5bf687 ("i2c: designware: Get rid of legacy platform data") removes ./include/linux/platform_data/i2c-designware.h, but misses to adjust the SYNOPSYS DESIGNWARE I2C DRIVER section in MAINTAINERS. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: include/linux/platform_data/i2c-designware.h Remove the file entry to this removed file as well. Signed-off-by: Lukas Bulwahn Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 1438709e6328925ef496dafd467dbd0353137434 Author: Nicholas Piggin Date: Wed May 26 22:58:51 2021 +1000 KVM: PPC: Book3S HV: Save host FSCR in the P7/8 path Similar to commit 25edcc50d76c ("KVM: PPC: Book3S HV: Save and restore FSCR in the P9 path"), ensure the P7/8 path saves and restores the host FSCR. The logic explained in that patch actually applies there to the old path well: a context switch can be made before kvmppc_vcpu_run_hv restores the host FSCR and returns. Now both the p9 and the p7/8 paths now save and restore their FSCR, it no longer needs to be restored at the end of kvmppc_vcpu_run_hv Fixes: b005255e12a3 ("KVM: PPC: Book3S HV: Context-switch new POWER8 SPRs") Cc: stable@vger.kernel.org # v3.14+ Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210526125851.3436735-1-npiggin@gmail.com commit 5362a4b6ee6136018558ef6b2c4701aa15ebc602 Author: Nicholas Piggin Date: Wed May 26 22:00:05 2021 +1000 powerpc: Fix reverse map real-mode address lookup with huge vmalloc real_vmalloc_addr() does not currently work for huge vmalloc, which is what the reverse map can be allocated with for radix host, hash guest. Extract the hugepage aware equivalent from eeh code into a helper, and convert existing sites including this one to use it. Fixes: 8abddd968a30 ("powerpc/64s/radix: Enable huge vmalloc mappings") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210526120005.3432222-1-npiggin@gmail.com commit 8fc4e4aa2bfca8d32e8bc2a01526ea2da450e6cb Author: Kajol Jain Date: Tue May 25 12:07:23 2021 +0530 perf vendor events powerpc: Fix eventcode of power10 JSON events Fixed the eventcode values in the power10 JSON event files to prepend "0x" since these are hexadecimal values. The patch also changes the event description of the PM_EXEC_STALL_LOAD_FINISH and PM_EXEC_STALL_NTC_FLUSH event and move some events to correct files. Fixes: 32daa5d7899e ("perf vendor events: Initial JSON/events list for power10 platform") Signed-off-by: Kajol Jain Reviewed-by: Paul A. Clarke Tested-by: Nageswara R Sastry Cc: Athira Jajeev Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Ravi Bangoria Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/lkml/20210525063723.1191514-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 82123a3d1d5a306fdf50c968a474cc60fe43a80f Author: Naveen N. Rao Date: Wed May 19 16:17:17 2021 +0530 powerpc/kprobes: Fix validation of prefixed instructions across page boundary When checking if the probed instruction is the suffix of a prefixed instruction, we access the instruction at the previous word. If the probed instruction is the very first word of a module, we can end up trying to access an invalid page. Fix this by skipping the check for all instructions at the beginning of a page. Prefixed instructions cannot cross a 64-byte boundary and as such, we don't expect to encounter a suffix as the very first word in a page for kernel text. Even if there are prefixed instructions crossing a page boundary (from a module, for instance), the instruction will be illegal, so preventing probing on the suffix of such prefix instructions isn't worthwhile. Fixes: b4657f7650ba ("powerpc/kprobes: Don't allow breakpoints on suffixes") Cc: stable@vger.kernel.org # v5.8+ Reported-by: Christophe Leroy Signed-off-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0df9a032a05576a2fa8e97d1b769af2ff0eafbd6.1621416666.git.naveen.n.rao@linux.vnet.ibm.com commit 56dde68f85be0a20935bb4ed996db7a7f68b3202 Author: Greg Kroah-Hartman Date: Fri May 28 10:58:49 2021 +0200 Revert "serial: 8250: 8250_omap: Fix possible interrupt storm" This reverts commit 31fae7c8b18c3f8029a2a5dce97a3182c1a167a0. Tony writes: I just noticed this causes the following regression in Linux next when pressing a key on uart console after boot at least on omap3. This seems to happen on serial_port_in(port, UART_RX) in the quirk handling. So let's drop this. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/YLCCJzkkB4N7LTQS@atomide.com Fixes: 31fae7c8b18c ("serial: 8250: 8250_omap: Fix possible interrupt storm") Reported-by: Tony Lindgren Cc: Jan Kiszka Cc: Vignesh Raghavendra Signed-off-by: Greg Kroah-Hartman commit 24990423267ec283b9d86f07f362b753eb9b0ed5 Author: Krzysztof Kozlowski Date: Wed May 26 08:39:37 2021 -0400 i2c: s3c2410: fix possible NULL pointer deref on read message after write Interrupt handler processes multiple message write requests one after another, till the driver message queue is drained. However if driver encounters a read message without preceding START, it stops the I2C transfer as it is an invalid condition for the controller. At least the comment describes a requirement "the controller forces us to send a new START when we change direction". This stop results in clearing the message queue (i2c->msg = NULL). The code however immediately jumped back to label "retry_write" which dereferenced the "i2c->msg" making it a possible NULL pointer dereference. The Coverity analysis: 1. Condition !is_msgend(i2c), taking false branch. if (!is_msgend(i2c)) { 2. Condition !is_lastmsg(i2c), taking true branch. } else if (!is_lastmsg(i2c)) { 3. Condition i2c->msg->flags & 1, taking true branch. if (i2c->msg->flags & I2C_M_RD) { 4. write_zero_model: Passing i2c to s3c24xx_i2c_stop, which sets i2c->msg to NULL. s3c24xx_i2c_stop(i2c, -EINVAL); 5. Jumping to label retry_write. goto retry_write; 6. var_deref_model: Passing i2c to is_msgend, which dereferences null i2c->msg. if (!is_msgend(i2c)) {" All previous calls to s3c24xx_i2c_stop() in this interrupt service routine are followed by jumping to end of function (acknowledging the interrupt and returning). This seems a reasonable choice also here since message buffer was entirely emptied. Addresses-Coverity: Explicit null dereferenced Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit fed1bd51a504eb96caa38b4f13ab138fc169ea75 Author: Qii Wang Date: Thu May 27 20:04:04 2021 +0800 i2c: mediatek: Disable i2c start_en and clear intr_stat brfore reset The i2c controller driver do dma reset after transfer timeout, but sometimes dma reset will trigger an unexpected DMA_ERR irq. It will cause the i2c controller to continuously send interrupts to the system and cause soft lock-up. So we need to disable i2c start_en and clear intr_stat to stop i2c controller before dma reset when transfer timeout. Fixes: aafced673c06("i2c: mediatek: move dma reset before i2c reset") Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit aeeb517368822e2b24231f5bd43a98ecdbe65d59 Merge: b26389e854f7c e11851429fdc2 Author: Dave Airlie Date: Fri May 28 13:28:18 2021 +1000 Merge tag 'drm-intel-fixes-2021-05-27' of ssh://git.freedesktop.org/git/drm/drm-intel into drm-fixes drm/i915 fixes for v5.13-rc4: - Re-enable LTTPR non-transparent LT mode for DPCD_REV<1.4 Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/875yz4bnmj.fsf@intel.com commit b26389e854f7c2f28e8ea754d169834f1fe7e620 Merge: ac6e9e3d19e4f 35f819d218035 Author: Dave Airlie Date: Fri May 28 13:24:25 2021 +1000 Merge tag 'drm-misc-fixes-2021-05-27' of ssh://git.freedesktop.org/git/drm/drm-misc into drm-fixes A fix in meson for a crash at shutdown and one for TTM to prevent irrelevant swapout Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210527120828.3w7f53krzkslc4ii@gilmour commit c673b7f59e940061467200f1746820a178444bd0 Author: Namhyung Kim Date: Thu May 27 15:00:52 2021 -0700 perf stat: Fix error check for bpf_program__attach It seems the bpf_program__attach() returns a negative error code instead of a NULL pointer in case of error. Fixes: 7fac83aaf2ee ("perf stat: Introduce 'bperf' to share hardware PMCs with BPF") Signed-off-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Song Liu Link: http://lore.kernel.org/lkml/20210527220052.1657578-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ac6e9e3d19e4fd14e1e6b9a5d65c5a847f3dff02 Merge: c4681547bcce7 20ebbfd22f811 Author: Dave Airlie Date: Fri May 28 09:18:04 2021 +1000 Merge tag 'amd-drm-fixes-5.13-2021-05-26' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.13-2021-05-26: amdgpu: - MultiGPU fan fix - VCN powergating fixes amdkfd: - Fix SDMA register offset error Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210527031831.4057-1-alexander.deucher@amd.com commit 44991d61aa120ed3e12f75bb0e0fbd2a84df930d Merge: fb91702b743de 56e4ee82e8500 Author: Jakub Kicinski Date: Thu May 27 15:54:11 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for net: 1) Fix incorrect sockopts unregistration from error path, from Florian Westphal. 2) A few patches to provide better error reporting when missing kernel netfilter options are missing in .config. 3) Fix dormant table flag updates. 4) Memleak in IPVS when adding service with IP_VS_SVC_F_HASHED flag. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: ipvs: ignore IP_VS_SVC_F_HASHED flag when adding service netfilter: nf_tables: fix table flag updates netfilter: nf_tables: extended netlink error reporting for chain type netfilter: nf_tables: missing error reporting for not selected expressions netfilter: conntrack: unregister ipv4 sockopts on error unwind ==================== Link: https://lore.kernel.org/r/20210527190115.98503-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit 97e5bf604b7a0d6e1b3e00fe31d5fd4b9bffeaae Merge: 3c856a3180daf c547addba7096 Author: Linus Torvalds Date: Thu May 27 12:01:26 2021 -1000 Merge branch 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu Pull percpu fixes from Dennis Zhou: "This contains a cleanup to lib/percpu-refcount.c and an update to the MAINTAINERS file to more formally take over support for lib/percpu*" * 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu: MAINTAINERS: Add lib/percpu* as part of percpu entry percpu_ref: Don't opencode percpu_ref_is_dying commit 3c856a3180daf38d33166c0c98da921841588019 Merge: 38747c9a2d221 e69012400b0cb Author: Linus Torvalds Date: Thu May 27 11:58:26 2021 -1000 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: - Don't use contiguous or block mappings for the linear map when KFENCE is enabled. - Fix link in the arch_counter_enforce_ordering() comment. * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: don't use CON and BLK mapping if KFENCE is enabled arm64: Fix stale link in the arch_counter_enforce_ordering() comment commit 38747c9a2d221ad899a1a861777ee79a11ab6e73 Merge: 3224374f7eb08 7e768532b2396 Author: Linus Torvalds Date: Thu May 27 11:54:36 2021 -1000 Merge tag 'for-5.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix DM verity target's 'require_signatures' module_param permissions. - Revert DM snapshot fix from v5.13-rc3 and then properly fix crash when an origin has no snapshots. This allows only the proper fix to go to stable@ (since the original fix was successfully dropped). * tag 'for-5.13/dm-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm snapshot: properly fix a crash when an origin has no snapshots dm snapshot: revert "fix a crash when an origin has no snapshots" dm verity: fix require_signatures module_param permissions commit fb91702b743dec78d6507c53a2dec8a8883f509d Author: Ariel Levkovich Date: Wed May 26 20:01:10 2021 +0300 net/sched: act_ct: Fix ct template allocation for zone 0 Fix current behavior of skipping template allocation in case the ct action is in zone 0. Skipping the allocation may cause the datapath ct code to ignore the entire ct action with all its attributes (commit, nat) in case the ct action in zone 0 was preceded by a ct clear action. The ct clear action sets the ct_state to untracked and resets the skb->_nfct pointer. Under these conditions and without an allocated ct template, the skb->_nfct pointer will remain NULL which will cause the tc ct action handler to exit without handling commit and nat actions, if such exist. For example, the following rule in OVS dp: recirc_id(0x2),ct_state(+new-est-rel-rpl+trk),ct_label(0/0x1), \ in_port(eth0),actions:ct_clear,ct(commit,nat(src=10.11.0.12)), \ recirc(0x37a) Will result in act_ct skipping the commit and nat actions in zone 0. The change removes the skipping of template allocation for zone 0 and treats it the same as any other zone. Fixes: b57dc7c13ea9 ("net/sched: Introduce action ct") Signed-off-by: Ariel Levkovich Acked-by: Marcelo Ricardo Leitner Link: https://lore.kernel.org/r/20210526170110.54864-1-lariel@nvidia.com Signed-off-by: Jakub Kicinski commit 0cc254e5aa37cf05f65bcdcdc0ac5c58010feb33 Author: Paul Blakey Date: Wed May 26 14:44:09 2021 +0300 net/sched: act_ct: Offload connections with commit action Currently established connections are not offloaded if the filter has a "ct commit" action. This behavior will not offload connections of the following scenario: $ tc_filter add dev $DEV ingress protocol ip prio 1 flower \ ct_state -trk \ action ct commit action goto chain 1 $ tc_filter add dev $DEV ingress protocol ip chain 1 prio 1 flower \ action mirred egress redirect dev $DEV2 $ tc_filter add dev $DEV2 ingress protocol ip prio 1 flower \ action ct commit action goto chain 1 $ tc_filter add dev $DEV2 ingress protocol ip prio 1 chain 1 flower \ ct_state +trk+est \ action mirred egress redirect dev $DEV Offload established connections, regardless of the commit flag. Fixes: 46475bb20f4b ("net/sched: act_ct: Software offload of established flows") Reviewed-by: Oz Shlomo Reviewed-by: Jiri Pirko Acked-by: Marcelo Ricardo Leitner Signed-off-by: Paul Blakey Link: https://lore.kernel.org/r/1622029449-27060-1-git-send-email-paulb@nvidia.com Signed-off-by: Jakub Kicinski commit b28d8f0c25a9b0355116cace5f53ea52bd4020c8 Author: Parav Pandit Date: Wed May 26 23:00:27 2021 +0300 devlink: Correct VIRTUAL port to not have phys_port attributes Physical port name, port number attributes do not belong to virtual port flavour. When VF or SF virtual ports are registered they incorrectly append "np0" string in the netdevice name of the VF/SF. Before this fix, VF netdevice name were ens2f0np0v0, ens2f0np0v1 for VF 0 and 1 respectively. After the fix, they are ens2f0v0, ens2f0v1. With this fix, reading /sys/class/net/ens2f0v0/phys_port_name returns -EOPNOTSUPP. Also devlink port show example for 2 VFs on one PF to ensure that any physical port attributes are not exposed. $ devlink port show pci/0000:06:00.0/65535: type eth netdev ens2f0np0 flavour physical port 0 splittable false pci/0000:06:00.3/196608: type eth netdev ens2f0v0 flavour virtual splittable false pci/0000:06:00.4/262144: type eth netdev ens2f0v1 flavour virtual splittable false This change introduces a netdevice name change on systemd/udev version 245 and higher which honors phys_port_name sysfs file for generation of netdevice name. This also aligns to phys_port_name usage which is limited to switchdev ports as described in [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/tree/Documentation/networking/switchdev.rst Fixes: acf1ee44ca5d ("devlink: Introduce devlink port flavour virtual") Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Link: https://lore.kernel.org/r/20210526200027.14008-1-parav@nvidia.com Signed-off-by: Jakub Kicinski commit 76a6d5cd74479e7ec8a7f9a29bce63d5549b6b2e Author: Filipe Manana Date: Tue May 25 11:05:28 2021 +0100 btrfs: fix deadlock when cloning inline extents and low on available space There are a few cases where cloning an inline extent requires copying data into a page of the destination inode. For these cases we are allocating the required data and metadata space while holding a leaf locked. This can result in a deadlock when we are low on available space because allocating the space may flush delalloc and two deadlock scenarios can happen: 1) When starting writeback for an inode with a very small dirty range that fits in an inline extent, we deadlock during the writeback when trying to insert the inline extent, at cow_file_range_inline(), if the extent is going to be located in the leaf for which we are already holding a read lock; 2) After successfully starting writeback, for non-inline extent cases, the async reclaim thread will hang waiting for an ordered extent to complete if the ordered extent completion needs to modify the leaf for which the clone task is holding a read lock (for adding or replacing file extent items). So the cloning task will wait forever on the async reclaim thread to make progress, which in turn is waiting for the ordered extent completion which in turn is waiting to acquire a write lock on the same leaf. So fix this by making sure we release the path (and therefore the leaf) every time we need to copy the inline extent's data into a page of the destination inode, as by that time we do not need to have the leaf locked. Fixes: 05a5a7621ce66c ("Btrfs: implement full reflink support for inline extents") CC: stable@vger.kernel.org # 5.10+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ea7036de0d36c4e6c9508f68789e9567d514333a Author: Filipe Manana Date: Mon May 24 11:35:53 2021 +0100 btrfs: fix fsync failure and transaction abort after writes to prealloc extents When doing a series of partial writes to different ranges of preallocated extents with transaction commits and fsyncs in between, we can end up with a checksum items in a log tree. This causes an fsync to fail with -EIO and abort the transaction, turning the filesystem to RO mode, when syncing the log. For this to happen, we need to have a full fsync of a file following one or more fast fsyncs. The following example reproduces the problem and explains how it happens: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt # Create our test file with 2 preallocated extents. Leave a 1M hole # between them to ensure that we get two file extent items that will # never be merged into a single one. The extents are contiguous on disk, # which will later result in the checksums for their data to be merged # into a single checksum item in the csums btree. # $ xfs_io -f \ -c "falloc 0 1M" \ -c "falloc 3M 3M" \ /mnt/foobar # Now write to the second extent and leave only 1M of it as unwritten, # which corresponds to the file range [4M, 5M[. # # Then fsync the file to flush delalloc and to clear full sync flag from # the inode, so that a future fsync will use the fast code path. # # After the writeback triggered by the fsync we have 3 file extent items # that point to the second extent we previously allocated: # # 1) One file extent item of type BTRFS_FILE_EXTENT_REG that covers the # file range [3M, 4M[ # # 2) One file extent item of type BTRFS_FILE_EXTENT_PREALLOC that covers # the file range [4M, 5M[ # # 3) One file extent item of type BTRFS_FILE_EXTENT_REG that covers the # file range [5M, 6M[ # # All these file extent items have a generation of 6, which is the ID of # the transaction where they were created. The split of the original file # extent item is done at btrfs_mark_extent_written() when ordered extents # complete for the file ranges [3M, 4M[ and [5M, 6M[. # $ xfs_io -c "pwrite -S 0xab 3M 1M" \ -c "pwrite -S 0xef 5M 1M" \ -c "fsync" \ /mnt/foobar # Commit the current transaction. This wipes out the log tree created by # the previous fsync. sync # Now write to the unwritten range of the second extent we allocated, # corresponding to the file range [4M, 5M[, and fsync the file, which # triggers the fast fsync code path. # # The fast fsync code path sees that there is a new extent map covering # the file range [4M, 5M[ and therefore it will log a checksum item # covering the range [1M, 2M[ of the second extent we allocated. # # Also, after the fsync finishes we no longer have the 3 file extent # items that pointed to 3 sections of the second extent we allocated. # Instead we end up with a single file extent item pointing to the whole # extent, with a type of BTRFS_FILE_EXTENT_REG and a generation of 7 (the # current transaction ID). This is due to the file extent item merging we # do when completing ordered extents into ranges that point to unwritten # (preallocated) extents. This merging is done at # btrfs_mark_extent_written(). # $ xfs_io -c "pwrite -S 0xcd 4M 1M" \ -c "fsync" \ /mnt/foobar # Now do some write to our file outside the range of the second extent # that we allocated with fallocate() and truncate the file size from 6M # down to 5M. # # The truncate operation sets the full sync runtime flag on the inode, # forcing the next fsync to use the slow code path. It also changes the # length of the second file extent item so that it represents the file # range [3M, 5M[ and not the range [3M, 6M[ anymore. # # Finally fsync the file. Since this is a fsync that triggers the slow # code path, it will remove all items associated to the inode from the # log tree and then it will scan for file extent items in the # fs/subvolume tree that have a generation matching the current # transaction ID, which is 7. This means it will log 2 file extent # items: # # 1) One for the first extent we allocated, covering the file range # [0, 1M[ # # 2) Another for the first 2M of the second extent we allocated, # covering the file range [3M, 5M[ # # When logging the first file extent item we log a single checksum item # that has all the checksums for the entire extent. # # When logging the second file extent item, we also lookup for the # checksums that are associated with the range [0, 2M[ of the second # extent we allocated (file range [3M, 5M[), and then we log them with # btrfs_csum_file_blocks(). However that results in ending up with a log # that has two checksum items with ranges that overlap: # # 1) One for the range [1M, 2M[ of the second extent we allocated, # corresponding to the file range [4M, 5M[, which we logged in the # previous fsync that used the fast code path; # # 2) One for the ranges [0, 1M[ and [0, 2M[ of the first and second # extents, respectively, corresponding to the files ranges [0, 1M[ # and [3M, 5M[. This one was added during this last fsync that uses # the slow code path and overlaps with the previous one logged by # the previous fast fsync. # # This happens because when logging the checksums for the second # extent, we notice they start at an offset that matches the end of the # checksums item that we logged for the first extent, and because both # extents are contiguous on disk, btrfs_csum_file_blocks() decides to # extend that existing checksums item and append the checksums for the # second extent to this item. The end result is we end up with two # checksum items in the log tree that have overlapping ranges, as # listed before, resulting in the fsync to fail with -EIO and aborting # the transaction, turning the filesystem into RO mode. # $ xfs_io -c "pwrite -S 0xff 0 1M" \ -c "truncate 5M" \ -c "fsync" \ /mnt/foobar fsync: Input/output error After running the example, dmesg/syslog shows the tree checker complained about the checksum items with overlapping ranges and we aborted the transaction: $ dmesg (...) [756289.557487] BTRFS critical (device sdc): corrupt leaf: root=18446744073709551610 block=30720000 slot=5, csum end range (16777216) goes beyond the start range (15728640) of the next csum item [756289.560583] BTRFS info (device sdc): leaf 30720000 gen 7 total ptrs 7 free space 11677 owner 18446744073709551610 [756289.562435] BTRFS info (device sdc): refs 2 lock_owner 0 current 2303929 [756289.563654] item 0 key (257 1 0) itemoff 16123 itemsize 160 [756289.564649] inode generation 6 size 5242880 mode 100600 [756289.565636] item 1 key (257 12 256) itemoff 16107 itemsize 16 [756289.566694] item 2 key (257 108 0) itemoff 16054 itemsize 53 [756289.567725] extent data disk bytenr 13631488 nr 1048576 [756289.568697] extent data offset 0 nr 1048576 ram 1048576 [756289.569689] item 3 key (257 108 1048576) itemoff 16001 itemsize 53 [756289.570682] extent data disk bytenr 0 nr 0 [756289.571363] extent data offset 0 nr 2097152 ram 2097152 [756289.572213] item 4 key (257 108 3145728) itemoff 15948 itemsize 53 [756289.573246] extent data disk bytenr 14680064 nr 3145728 [756289.574121] extent data offset 0 nr 2097152 ram 3145728 [756289.574993] item 5 key (18446744073709551606 128 13631488) itemoff 12876 itemsize 3072 [756289.576113] item 6 key (18446744073709551606 128 15728640) itemoff 11852 itemsize 1024 [756289.577286] BTRFS error (device sdc): block=30720000 write time tree block corruption detected [756289.578644] ------------[ cut here ]------------ [756289.579376] WARNING: CPU: 0 PID: 2303929 at fs/btrfs/disk-io.c:465 csum_one_extent_buffer+0xed/0x100 [btrfs] [756289.580857] Modules linked in: btrfs dm_zero dm_dust loop dm_snapshot (...) [756289.591534] CPU: 0 PID: 2303929 Comm: xfs_io Tainted: G W 5.12.0-rc8-btrfs-next-87 #1 [756289.592580] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [756289.594161] RIP: 0010:csum_one_extent_buffer+0xed/0x100 [btrfs] [756289.595122] Code: 5d c3 e8 76 60 (...) [756289.597509] RSP: 0018:ffffb51b416cb898 EFLAGS: 00010282 [756289.598142] RAX: 0000000000000000 RBX: fffff02b8a365bc0 RCX: 0000000000000000 [756289.598970] RDX: 0000000000000000 RSI: ffffffffa9112421 RDI: 00000000ffffffff [756289.599798] RBP: ffffa06500880000 R08: 0000000000000000 R09: 0000000000000000 [756289.600619] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000 [756289.601456] R13: ffffa0652b1d8980 R14: ffffa06500880000 R15: 0000000000000000 [756289.602278] FS: 00007f08b23c9800(0000) GS:ffffa0682be00000(0000) knlGS:0000000000000000 [756289.603217] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [756289.603892] CR2: 00005652f32d0138 CR3: 000000025d616003 CR4: 0000000000370ef0 [756289.604725] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [756289.605563] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [756289.606400] Call Trace: [756289.606704] btree_csum_one_bio+0x244/0x2b0 [btrfs] [756289.607313] btrfs_submit_metadata_bio+0xb7/0x100 [btrfs] [756289.608040] submit_one_bio+0x61/0x70 [btrfs] [756289.608587] btree_write_cache_pages+0x587/0x610 [btrfs] [756289.609258] ? free_debug_processing+0x1d5/0x240 [756289.609812] ? __module_address+0x28/0xf0 [756289.610298] ? lock_acquire+0x1a0/0x3e0 [756289.610754] ? lock_acquired+0x19f/0x430 [756289.611220] ? lock_acquire+0x1a0/0x3e0 [756289.611675] do_writepages+0x43/0xf0 [756289.612101] ? __filemap_fdatawrite_range+0xa4/0x100 [756289.612800] __filemap_fdatawrite_range+0xc5/0x100 [756289.613393] btrfs_write_marked_extents+0x68/0x160 [btrfs] [756289.614085] btrfs_sync_log+0x21c/0xf20 [btrfs] [756289.614661] ? finish_wait+0x90/0x90 [756289.615096] ? __mutex_unlock_slowpath+0x45/0x2a0 [756289.615661] ? btrfs_log_inode_parent+0x3c9/0xdc0 [btrfs] [756289.616338] ? lock_acquire+0x1a0/0x3e0 [756289.616801] ? lock_acquired+0x19f/0x430 [756289.617284] ? lock_acquire+0x1a0/0x3e0 [756289.617750] ? lock_release+0x214/0x470 [756289.618221] ? lock_acquired+0x19f/0x430 [756289.618704] ? dput+0x20/0x4a0 [756289.619079] ? dput+0x20/0x4a0 [756289.619452] ? lockref_put_or_lock+0x9/0x30 [756289.619969] ? lock_release+0x214/0x470 [756289.620445] ? lock_release+0x214/0x470 [756289.620924] ? lock_release+0x214/0x470 [756289.621415] btrfs_sync_file+0x46a/0x5b0 [btrfs] [756289.621982] do_fsync+0x38/0x70 [756289.622395] __x64_sys_fsync+0x10/0x20 [756289.622907] do_syscall_64+0x33/0x80 [756289.623438] entry_SYSCALL_64_after_hwframe+0x44/0xae [756289.624063] RIP: 0033:0x7f08b27fbb7b [756289.624588] Code: 0f 05 48 3d 00 (...) [756289.626760] RSP: 002b:00007ffe2583f940 EFLAGS: 00000293 ORIG_RAX: 000000000000004a [756289.627639] RAX: ffffffffffffffda RBX: 00005652f32cd0f0 RCX: 00007f08b27fbb7b [756289.628464] RDX: 00005652f32cbca0 RSI: 00005652f32cd110 RDI: 0000000000000003 [756289.629323] RBP: 00005652f32cd110 R08: 0000000000000000 R09: 00007f08b28c4be0 [756289.630172] R10: fffffffffffff39a R11: 0000000000000293 R12: 0000000000000001 [756289.631007] R13: 00005652f32cd0f0 R14: 0000000000000001 R15: 00005652f32cc480 [756289.631819] irq event stamp: 0 [756289.632188] hardirqs last enabled at (0): [<0000000000000000>] 0x0 [756289.632911] hardirqs last disabled at (0): [] copy_process+0x879/0x1cc0 [756289.633893] softirqs last enabled at (0): [] copy_process+0x879/0x1cc0 [756289.634871] softirqs last disabled at (0): [<0000000000000000>] 0x0 [756289.635606] ---[ end trace 0a039fdc16ff3fef ]--- [756289.636179] BTRFS: error (device sdc) in btrfs_sync_log:3136: errno=-5 IO failure [756289.637082] BTRFS info (device sdc): forced readonly Having checksum items covering ranges that overlap is dangerous as in some cases it can lead to having extent ranges for which we miss checksums after log replay or getting the wrong checksum item. There were some fixes in the past for bugs that resulted in this problem, and were explained and fixed by the following commits: 27b9a8122ff71a ("Btrfs: fix csum tree corruption, duplicate and outdated checksums") b84b8390d6009c ("Btrfs: fix file read corruption after extent cloning and fsync") 40e046acbd2f36 ("Btrfs: fix missing data checksums after replaying a log tree") e289f03ea79bbc ("btrfs: fix corrupt log due to concurrent fsync of inodes with shared extents") Fix the issue by making btrfs_csum_file_blocks() taking into account the start offset of the next checksum item when it decides to extend an existing checksum item, so that it never extends the checksum to end at a range that goes beyond the start range of the next checksum item. When we can not access the next checksum item without releasing the path, simply drop the optimization of extending the previous checksum item and fallback to inserting a new checksum item - this happens rarely and the optimization is not significant enough for a log tree in order to justify the extra complexity, as it would only save a few bytes (the size of a struct btrfs_item) of leaf space. This behaviour is only needed when inserting into a log tree because for the regular checksums tree we never have a case where we try to insert a range of checksums that overlap with a range that was previously inserted. A test case for fstests will follow soon. Reported-by: Philipp Fent Link: https://lore.kernel.org/linux-btrfs/93c4600e-5263-5cba-adf0-6f47526e7561@in.tum.de/ CC: stable@vger.kernel.org # 5.4+ Tested-by: Anand Jain Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit dc09ef3562726cd520c8338c1640872a60187af5 Author: Josef Bacik Date: Wed May 19 14:04:21 2021 -0400 btrfs: abort in rename_exchange if we fail to insert the second ref Error injection stress uncovered a problem where we'd leave a dangling inode ref if we failed during a rename_exchange. This happens because we insert the inode ref for one side of the rename, and then for the other side. If this second inode ref insert fails we'll leave the first one dangling and leave a corrupt file system behind. Fix this by aborting if we did the insert for the first inode ref. CC: stable@vger.kernel.org # 4.9+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit f96d44743a44e3332f75d23d2075bb8270900e1d Author: Josef Bacik Date: Wed May 19 11:26:25 2021 -0400 btrfs: check error value from btrfs_update_inode in tree log Error injection testing uncovered a case where we ended up with invalid link counts on an inode. This happened because we failed to notice an error when updating the inode while replaying the tree log, and committed the transaction with an invalid file system. Fix this by checking the return value of btrfs_update_inode. This resolved the link count errors I was seeing, and we already properly handle passing up the error values in these paths. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Johannes Thumshirn Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 011b28acf940eb61c000059dd9e2cfcbf52ed96b Author: Josef Bacik Date: Wed May 19 13:13:15 2021 -0400 btrfs: fixup error handling in fixup_inode_link_counts This function has the following pattern while (1) { ret = whatever(); if (ret) goto out; } ret = 0 out: return ret; However several places in this while loop we simply break; when there's a problem, thus clearing the return value, and in one case we do a return -EIO, and leak the memory for the path. Fix this by re-arranging the loop to deal with ret == 1 coming from btrfs_search_slot, and then simply delete the ret = 0; out: bit so everybody can break if there is an error, which will allow for proper error handling to occur. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit d61bec08b904cf171835db98168f82bc338e92e4 Author: Josef Bacik Date: Wed May 19 09:38:27 2021 -0400 btrfs: mark ordered extent and inode with error if we fail to finish While doing error injection testing I saw that sometimes we'd get an abort that wouldn't stop the current transaction commit from completing. This abort was coming from finish ordered IO, but at this point in the transaction commit we should have gotten an error and stopped. It turns out the abort came from finish ordered io while trying to write out the free space cache. It occurred to me that any failure inside of finish_ordered_io isn't actually raised to the person doing the writing, so we could have any number of failures in this path and think the ordered extent completed successfully and the inode was fine. Fix this by marking the ordered extent with BTRFS_ORDERED_IOERR, and marking the mapping of the inode with mapping_set_error, so any callers that simply call fdatawait will also get the error. With this we're seeing the IO error on the free space inode when we fail to do the finish_ordered_io. CC: stable@vger.kernel.org # 4.19+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 856bd270dc4db209c779ce1e9555c7641ffbc88e Author: Josef Bacik Date: Wed May 19 10:52:46 2021 -0400 btrfs: return errors from btrfs_del_csums in cleanup_ref_head We are unconditionally returning 0 in cleanup_ref_head, despite the fact that btrfs_del_csums could fail. We need to return the error so the transaction gets aborted properly, fix this by returning ret from btrfs_del_csums in cleanup_ref_head. Reviewed-by: Qu Wenruo CC: stable@vger.kernel.org # 4.19+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit b86652be7c83f70bf406bed18ecf55adb9bfb91b Author: Josef Bacik Date: Wed May 19 10:52:45 2021 -0400 btrfs: fix error handling in btrfs_del_csums Error injection stress would sometimes fail with checksums on disk that did not have a corresponding extent. This occurred because the pattern in btrfs_del_csums was while (1) { ret = btrfs_search_slot(); if (ret < 0) break; } ret = 0; out: btrfs_free_path(path); return ret; If we got an error from btrfs_search_slot we'd clear the error because we were breaking instead of goto out. Instead of using goto out, simply handle the cases where we may leave a random value in ret, and get rid of the ret = 0; out: pattern and simply allow break to have the proper error reporting. With this fix we properly abort the transaction and do not commit thinking we successfully deleted the csum. Reviewed-by: Qu Wenruo CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4c80a97d7b02cf68e169118ef2bda0725fc87f6f Author: Qu Wenruo Date: Tue May 25 13:52:43 2021 +0800 btrfs: fix compressed writes that cross stripe boundary [BUG] When running btrfs/027 with "-o compress" mount option, it always crashes with the following call trace: BTRFS critical (device dm-4): mapping failed logical 298901504 bio len 12288 len 8192 ------------[ cut here ]------------ kernel BUG at fs/btrfs/volumes.c:6651! invalid opcode: 0000 [#1] PREEMPT SMP NOPTI CPU: 5 PID: 31089 Comm: kworker/u24:10 Tainted: G OE 5.13.0-rc2-custom+ #26 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Workqueue: btrfs-delalloc btrfs_work_helper [btrfs] RIP: 0010:btrfs_map_bio.cold+0x58/0x5a [btrfs] Call Trace: btrfs_submit_compressed_write+0x2d7/0x470 [btrfs] submit_compressed_extents+0x3b0/0x470 [btrfs] ? mark_held_locks+0x49/0x70 btrfs_work_helper+0x131/0x3e0 [btrfs] process_one_work+0x28f/0x5d0 worker_thread+0x55/0x3c0 ? process_one_work+0x5d0/0x5d0 kthread+0x141/0x160 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x22/0x30 ---[ end trace 63113a3a91f34e68 ]--- [CAUSE] The critical message before the crash means we have a bio at logical bytenr 298901504 length 12288, but only 8192 bytes can fit into one stripe, the remaining 4096 bytes go to another stripe. In btrfs, all bios are properly split to avoid cross stripe boundary, but commit 764c7c9a464b ("btrfs: zoned: fix parallel compressed writes") changed the behavior for compressed writes. Previously if we find our new page can't be fitted into current stripe, ie. "submit == 1" case, we submit current bio without adding current page. submit = btrfs_bio_fits_in_stripe(page, PAGE_SIZE, bio, 0); page->mapping = NULL; if (submit || bio_add_page(bio, page, PAGE_SIZE, 0) < PAGE_SIZE) { But after the modification, we will add the page no matter if it crosses stripe boundary, leading to the above crash. submit = btrfs_bio_fits_in_stripe(page, PAGE_SIZE, bio, 0); if (pg_index == 0 && use_append) len = bio_add_zone_append_page(bio, page, PAGE_SIZE, 0); else len = bio_add_page(bio, page, PAGE_SIZE, 0); page->mapping = NULL; if (submit || len < PAGE_SIZE) { [FIX] It's no longer possible to revert to the original code style as we have two different bio_add_*_page() calls now. The new fix is to skip the bio_add_*_page() call if @submit is true. Also to avoid @len to be uninitialized, always initialize it to zero. If @submit is true, @len will not be checked. If @submit is not true, @len will be the return value of bio_add_*_page() call. Either way, the behavior is still the same as the old code. Reported-by: Josef Bacik Fixes: 764c7c9a464b ("btrfs: zoned: fix parallel compressed writes") Reviewed-by: Johannes Thumshirn Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 1bb56810677f26b78d57a3038054943efd334a1c Author: Aurelien Aptel Date: Fri May 21 17:19:28 2021 +0200 cifs: change format of CIFS_FULL_KEY_DUMP ioctl Make CIFS_FULL_KEY_DUMP ioctl able to return variable-length keys. * userspace needs to pass the struct size along with optional session_id and some space at the end to store keys * if there is enough space kernel returns keys in the extra space and sets the length of each key via xyz_key_length fields This also fixes the build error for get_user() on ARM. Sample program: #include #include #include #include #include struct smb3_full_key_debug_info { uint32_t in_size; uint64_t session_id; uint16_t cipher_type; uint8_t session_key_length; uint8_t server_in_key_length; uint8_t server_out_key_length; uint8_t data[]; /* * return this struct with the keys appended at the end: * uint8_t session_key[session_key_length]; * uint8_t server_in_key[server_in_key_length]; * uint8_t server_out_key[server_out_key_length]; */ } __attribute__((packed)); #define CIFS_IOCTL_MAGIC 0xCF #define CIFS_DUMP_FULL_KEY _IOWR(CIFS_IOCTL_MAGIC, 10, struct smb3_full_key_debug_info) void dump(const void *p, size_t len) { const char *hex = "0123456789ABCDEF"; const uint8_t *b = p; for (int i = 0; i < len; i++) printf("%c%c ", hex[(b[i]>>4)&0xf], hex[b[i]&0xf]); putchar('\n'); } int main(int argc, char **argv) { struct smb3_full_key_debug_info *keys; uint8_t buf[sizeof(*keys)+1024] = {0}; size_t off = 0; int fd, rc; keys = (struct smb3_full_key_debug_info *)&buf; keys->in_size = sizeof(buf); fd = open(argv[1], O_RDONLY); if (fd < 0) perror("open"), exit(1); rc = ioctl(fd, CIFS_DUMP_FULL_KEY, keys); if (rc < 0) perror("ioctl"), exit(1); printf("SessionId "); dump(&keys->session_id, 8); printf("Cipher %04x\n", keys->cipher_type); printf("SessionKey "); dump(keys->data+off, keys->session_key_length); off += keys->session_key_length; printf("ServerIn Key "); dump(keys->data+off, keys->server_in_key_length); off += keys->server_in_key_length; printf("ServerOut Key "); dump(keys->data+off, keys->server_out_key_length); return 0; } Usage: $ gcc -o dumpkeys dumpkeys.c Against Windows Server 2020 preview (with AES-256-GCM support): # mount.cifs //$ip/test /mnt -o "username=administrator,password=foo,vers=3.0,seal" # ./dumpkeys /mnt/somefile SessionId 0D 00 00 00 00 0C 00 00 Cipher 0002 SessionKey AB CD CC 0D E4 15 05 0C 6F 3C 92 90 19 F3 0D 25 ServerIn Key 73 C6 6A C8 6B 08 CF A2 CB 8E A5 7D 10 D1 5B DC ServerOut Key 6D 7E 2B A1 71 9D D7 2B 94 7B BA C4 F0 A5 A4 F8 # umount /mnt With 256 bit keys: # echo 1 > /sys/module/cifs/parameters/require_gcm_256 # mount.cifs //$ip/test /mnt -o "username=administrator,password=foo,vers=3.11,seal" # ./dumpkeys /mnt/somefile SessionId 09 00 00 00 00 0C 00 00 Cipher 0004 SessionKey 93 F5 82 3B 2F B7 2A 50 0B B9 BA 26 FB 8C 8B 03 ServerIn Key 6C 6A 89 B2 CB 7B 78 E8 04 93 37 DA 22 53 47 DF B3 2C 5F 02 26 70 43 DB 8D 33 7B DC 66 D3 75 A9 ServerOut Key 04 11 AA D7 52 C7 A8 0F ED E3 93 3A 65 FE 03 AD 3F 63 03 01 2B C0 1B D7 D7 E5 52 19 7F CC 46 B4 Signed-off-by: Aurelien Aptel Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French commit e4d8716c3dcec47f1557024add24e1f3c09eb24b Author: Jean Delvare Date: Tue May 25 17:03:36 2021 +0200 i2c: i801: Don't generate an interrupt on bus reset Now that the i2c-i801 driver supports interrupts, setting the KILL bit in a attempt to recover from a timed out transaction triggers an interrupt. Unfortunately, the interrupt handler (i801_isr) is not prepared for this situation and will try to process the interrupt as if it was signaling the end of a successful transaction. In the case of a block transaction, this can result in an out-of-range memory access. This condition was reproduced several times by syzbot: https://syzkaller.appspot.com/bug?extid=ed71512d469895b5b34e https://syzkaller.appspot.com/bug?extid=8c8dedc0ba9e03f6c79e https://syzkaller.appspot.com/bug?extid=c8ff0b6d6c73d81b610e https://syzkaller.appspot.com/bug?extid=33f6c360821c399d69eb https://syzkaller.appspot.com/bug?extid=be15dc0b1933f04b043a https://syzkaller.appspot.com/bug?extid=b4d3fd1dfd53e90afd79 So disable interrupts while trying to reset the bus. Interrupts will be enabled again for the following transaction. Fixes: 636752bcb517 ("i2c-i801: Enable IRQ for SMBus transactions") Reported-by: syzbot+b4d3fd1dfd53e90afd79@syzkaller.appspotmail.com Signed-off-by: Jean Delvare Acked-by: Andy Shevchenko Cc: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 8f0cdec8b5fd94135d643662506ee94ae9e98785 Author: Chris Packham Date: Wed May 12 09:20:52 2021 +1200 i2c: mpc: implement erratum A-004447 workaround The P2040/P2041 has an erratum where the normal i2c recovery mechanism does not work. Implement the alternative recovery mechanism documented in the P2040 Chip Errata Rev Q. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 19ae697a1e4edf1d755b413e3aa38da65e2db23b Author: Chris Packham Date: Wed May 12 09:20:51 2021 +1200 powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P1010 i2c controllers The i2c controllers on the P1010 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P1010 Chip Errata Rev L. Signed-off-by: Chris Packham Acked-by: Michael Ellerman Signed-off-by: Wolfram Sang commit 7adc7b225cddcfd0f346d10144fd7a3d3d9f9ea7 Author: Chris Packham Date: Wed May 12 09:20:50 2021 +1200 powerpc/fsl: set fsl,i2c-erratum-a004447 flag for P2041 i2c controllers The i2c controllers on the P2040/P2041 have an erratum where the documented scheme for i2c bus recovery will not work (A-004447). A different mechanism is needed which is documented in the P2040 Chip Errata Rev Q (latest available at the time of writing). Signed-off-by: Chris Packham Acked-by: Michael Ellerman Signed-off-by: Wolfram Sang commit a5063ab976024f72865029646d7c8c9dfa63b595 Author: Chris Packham Date: Wed May 12 09:20:49 2021 +1200 dt-bindings: i2c: mpc: Add fsl,i2c-erratum-a004447 flag Document the fsl,i2c-erratum-a004447 flag which indicates the presence of an i2c erratum on some QorIQ SoCs. Signed-off-by: Chris Packham Acked-by: Rob Herring Signed-off-by: Wolfram Sang commit a00cb25169d508908c6baa886035e0aa9121942a Author: Lee Jones Date: Thu May 20 20:01:03 2021 +0100 i2c: busses: i2c-stm32f4: Remove incorrectly placed ' ' from function name Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-stm32f4.c:321: warning: expecting prototype for stm32f4_i2c_write_ byte()(). Prototype was for stm32f4_i2c_write_byte() instead Signed-off-by: Lee Jones Reviewed-by: Alain Volmat Signed-off-by: Wolfram Sang commit 721a6fe5f9584357617b463e687f379412d1c213 Author: Lee Jones Date: Thu May 20 20:01:02 2021 +0100 i2c: busses: i2c-st: Fix copy/paste function misnaming issues Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-st.c:531: warning: expecting prototype for st_i2c_handle_write(). Prototype was for st_i2c_handle_read() instead drivers/i2c/busses/i2c-st.c:566: warning: expecting prototype for st_i2c_isr(). Prototype was for st_i2c_isr_thread() instead Fix the "enmpty" typo while here. Signed-off-by: Lee Jones Reviewed-by: Alain Volmat Signed-off-by: Wolfram Sang commit 3e0f8672f1685ed1fbbc4b3388fe8093e43e9783 Author: Lee Jones Date: Thu May 20 20:01:00 2021 +0100 i2c: busses: i2c-pnx: Provide descriptions for 'alg_data' data structure Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-pnx.c:147: warning: Function parameter or member 'alg_data' not described in 'i2c_pnx_start' drivers/i2c/busses/i2c-pnx.c:147: warning: Excess function parameter 'adap' description in 'i2c_pnx_start' drivers/i2c/busses/i2c-pnx.c:202: warning: Function parameter or member 'alg_data' not described in 'i2c_pnx_stop' drivers/i2c/busses/i2c-pnx.c:202: warning: Excess function parameter 'adap' description in 'i2c_pnx_stop' drivers/i2c/busses/i2c-pnx.c:231: warning: Function parameter or member 'alg_data' not described in 'i2c_pnx_master_xmit' drivers/i2c/busses/i2c-pnx.c:231: warning: Excess function parameter 'adap' description in 'i2c_pnx_master_xmit' drivers/i2c/busses/i2c-pnx.c:301: warning: Function parameter or member 'alg_data' not described in 'i2c_pnx_master_rcv' drivers/i2c/busses/i2c-pnx.c:301: warning: Excess function parameter 'adap' description in 'i2c_pnx_master_rcv' Signed-off-by: Lee Jones Acked-by: Vladimir Zapolskiy Signed-off-by: Wolfram Sang commit d4c73d41bef08f6d7878cb3e55d7e50df13d02c1 Author: Lee Jones Date: Thu May 20 20:00:59 2021 +0100 i2c: busses: i2c-ocores: Place the expected function names into the documentation headers Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-ocores.c:253: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/i2c/busses/i2c-ocores.c:267: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/i2c/busses/i2c-ocores.c:299: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/i2c/busses/i2c-ocores.c:347: warning: expecting prototype for It handles an IRQ(). Prototype was for ocores_process_polling() instead Signed-off-by: Lee Jones Reviewed-by: Andrew Lunn Reviewed-by: Peter Korsgaard Signed-off-by: Wolfram Sang commit f9f193fc222bd5352a414ba34406303cfedd2c5e Author: Lee Jones Date: Thu May 20 20:00:57 2021 +0100 i2c: busses: i2c-eg20t: Fix 'bad line' issue and provide description for 'msgs' param Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-eg20t.c:151: warning: bad line: PCH i2c controller drivers/i2c/busses/i2c-eg20t.c:369: warning: Function parameter or member 'msgs' not described in 'pch_i2c_writebytes' Signed-off-by: Lee Jones Signed-off-by: Wolfram Sang commit b4c760de3cedd41e63797b7eea73baf2a165dde2 Author: Lee Jones Date: Thu May 20 20:00:56 2021 +0100 i2c: busses: i2c-designware-master: Fix misnaming of 'i2c_dw_init_master()' Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-designware-master.c:176: warning: expecting prototype for i2c_dw_init(). Prototype was for i2c_dw_init_master() instead Signed-off-by: Lee Jones Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 6eb8a473693149f814a5082f395e130e75d41d57 Author: Lee Jones Date: Thu May 20 20:00:55 2021 +0100 i2c: busses: i2c-cadence: Fix incorrectly documented 'enum cdns_i2c_slave_mode' Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-cadence.c:157: warning: expecting prototype for enum cdns_i2c_slave_mode. Prototype was for enum cdns_i2c_slave_state instead Signed-off-by: Lee Jones Reviewed-by: Michal Simek Signed-off-by: Wolfram Sang commit f09aa114c4aff5c5b170be3498b63a006ea46f92 Author: Lee Jones Date: Thu May 20 20:00:52 2021 +0100 i2c: busses: i2c-ali1563: File headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-ali1563.c:24: warning: expecting prototype for i2c(). Prototype was for ALI1563_MAX_TIMEOUT() instead Signed-off-by: Lee Jones Reviewed-by: Jean Delvare Signed-off-by: Wolfram Sang commit 45ce82f5eaedd5868b366d09d921a3205166d625 Author: Lee Jones Date: Thu May 20 20:00:51 2021 +0100 i2c: muxes: i2c-arb-gpio-challenge: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/i2c/muxes/i2c-arb-gpio-challenge.c:43: warning: Function parameter or member 'muxc' not described in 'i2c_arbitrator_select' drivers/i2c/muxes/i2c-arb-gpio-challenge.c:43: warning: Function parameter or member 'chan' not described in 'i2c_arbitrator_select' drivers/i2c/muxes/i2c-arb-gpio-challenge.c:86: warning: Function parameter or member 'muxc' not described in 'i2c_arbitrator_deselect' drivers/i2c/muxes/i2c-arb-gpio-challenge.c:86: warning: Function parameter or member 'chan' not described in 'i2c_arbitrator_deselect' Signed-off-by: Lee Jones Acked-by: Douglas Anderson Acked-by: Peter Rosin Signed-off-by: Wolfram Sang commit 72ab7b6bb1a60bfc7baba1864fa28383dab4f862 Author: Lee Jones Date: Thu May 20 20:00:50 2021 +0100 i2c: busses: i2c-nomadik: Fix formatting issue pertaining to 'timeout' Fixes the following W=1 kernel build warning(s): drivers/i2c/busses/i2c-nomadik.c:184: warning: Function parameter or member 'timeout' not described in 'nmk_i2c_dev' Signed-off-by: Lee Jones Reviewed-by: Linus Walleij Signed-off-by: Wolfram Sang commit eb0688180549e3b72464e9f78df58cb7a5592c7f Author: Shyam Prasad N Date: Fri May 21 06:35:52 2021 +0000 cifs: fix string declarations and assignments in tracepoints We missed using the variable length string macros in several tracepoints. Fixed them in this change. There's probably more useful macros that we can use to print others like flags etc. But I'll submit sepawrate patches for those at a future date. Signed-off-by: Shyam Prasad N Cc: # v5.12 Signed-off-by: Steve French commit 6d2fcfe6b517fe7cbf2687adfb0a16cdcd5d9243 Author: Aurelien Aptel Date: Fri May 21 17:19:27 2021 +0200 cifs: set server->cipher_type to AES-128-CCM for SMB3.0 SMB3.0 doesn't have encryption negotiate context but simply uses the SMB2_GLOBAL_CAP_ENCRYPTION flag. When that flag is present in the neg response cifs.ko uses AES-128-CCM which is the only cipher available in this context. cipher_type was set to the server cipher only when parsing encryption negotiate context (SMB3.1.1). For SMB3.0 it was set to 0. This means cipher_type value can be 0 or 1 for AES-128-CCM. Fix this by checking for SMB3.0 and encryption capability and setting cipher_type appropriately. Signed-off-by: Aurelien Aptel Cc: Signed-off-by: Steve French commit 3224374f7eb08fbb36d3963895da20ff274b8e6a Merge: 96c132f837ff0 9b7ff25d129df Author: Linus Torvalds Date: Thu May 27 08:39:05 2021 -1000 Merge tag 'acpi-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix a recent ACPI power management regression causing boot issues to occur on some systems due to attempts to turn off ACPI power resources that are already off (which should work according to the ACPI specification)" * tag 'acpi-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: power: Refine turning off unused power resources commit ff2e6efda0d5c51b33e2bcc0b0b981ac0a0ef214 Author: Javier Martinez Canillas Date: Wed May 26 23:52:28 2021 +0200 kbuild: Quote OBJCOPY var to avoid a pahole call break the build The ccache tool can be used to speed up cross-compilation, by calling the compiler and binutils through ccache. For example, following should work: $ export ARCH=arm64 CROSS_COMPILE="ccache aarch64-linux-gnu-" $ make M=drivers/gpu/drm/rockchip/ but pahole fails to extract the BTF info from DWARF, breaking the build: CC [M] drivers/gpu/drm/rockchip//rockchipdrm.mod.o LD [M] drivers/gpu/drm/rockchip//rockchipdrm.ko BTF [M] drivers/gpu/drm/rockchip//rockchipdrm.ko aarch64-linux-gnu-objcopy: invalid option -- 'J' Usage: aarch64-linux-gnu-objcopy [option(s)] in-file [out-file] Copies a binary file, possibly transforming it in the process ... make[1]: *** [scripts/Makefile.modpost:156: __modpost] Error 2 make: *** [Makefile:1866: modules] Error 2 this fails because OBJCOPY is set to "ccache aarch64-linux-gnu-copy" and later pahole is executed with the following command line: LLVM_OBJCOPY=$(OBJCOPY) $(PAHOLE) -J --btf_base vmlinux $@ which gets expanded to: LLVM_OBJCOPY=ccache aarch64-linux-gnu-objcopy pahole -J ... instead of: LLVM_OBJCOPY="ccache aarch64-linux-gnu-objcopy" pahole -J ... Fixes: 5f9ae91f7c0d ("kbuild: Build kernel module BTFs if BTF is enabled and pahole supports it") Signed-off-by: Javier Martinez Canillas Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Acked-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/bpf/20210526215228.3729875-1-javierm@redhat.com commit b79b6081c440c0c197a3e8a51e8b9cf343fb210f Author: Thierry Reding Date: Thu May 27 20:09:08 2021 +0200 drm/tegra: sor: Fix AUX device reference leak In the case where the AUX provides an I2C-over-AUX DDC channel, a reference is taken on the AUX parent device of the DDC channel rather than the DDC channel like it would be for regular I2C controllers. To make sure the correct reference is dropped, move the unreferencing code into the SOR driver and make sure not to drop the I2C adapter reference in that case. Signed-off-by: Thierry Reding commit 1d15a10395e5a036f571ac727f202f9572e255f9 Author: Lyude Paul Date: Fri May 14 18:13:05 2021 -0400 drm/tegra: Get ref for DP AUX channel, not its ddc adapter While we're taking a reference of the DDC adapter for a DP AUX channel in tegra_sor_probe() because we're going to be using that adapter with the SOR, now that we've moved where AUX registration happens the actual device structure for the DDC adapter isn't initialized yet. Which means that we can't really take a reference from it to try to keep it around anymore. This should be fine though, because we can just take a reference of its parent instead. v2: * Avoid calling i2c_put_adapter() in tegra_output_remove() for eDP/DP cases Signed-off-by: Lyude Paul Fixes: 39c17ae60ea9 ("drm/tegra: Don't register DP AUX channels before connectors") Cc: Lyude Paul Cc: Thierry Reding Cc: Jonathan Hunter Cc: dri-devel@lists.freedesktop.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Thierry Reding commit 96c132f837ff0639702d04d229da190f636a48b5 Merge: f610a5a29c3cf 0ee74d5a48635 Author: Linus Torvalds Date: Thu May 27 08:06:36 2021 -1000 Merge tag 'iommu-fixes-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu fixes from Joerg Roedel: - Important fix for the AMD IOMMU driver in the recently added page-specific invalidation code to fix a calculation. - Fix a NULL-ptr dereference in the AMD IOMMU driver when a device switches domain types. - Fixes for the Intel VT-d driver to check for allocation failure and do correct cleanup. - Another fix for Intel VT-d to not allow supervisor page requests from devices when using second level page translation. - Add a MODULE_DEVICE_TABLE to the VIRTIO IOMMU driver * tag 'iommu-fixes-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Fix sysfs leak in alloc_iommu() iommu/vt-d: Use user privilege for RID2PASID translation iommu/vt-d: Check for allocation failure in aux_detach_device() iommu/virtio: Add missing MODULE_DEVICE_TABLE iommu/amd: Fix wrong parentheses on page-specific invalidations iommu/amd: Clear DMA ops when switching domain commit c59870e2110e1229a6e4b2457aece6ffe8d68d99 Author: Ian Rogers Date: Wed May 19 09:44:47 2021 -0700 perf debug: Move debug initialization earlier This avoids segfaults during option handlers that use pr_err. For example, "perf --debug nopager list" segfaults before this change. Fixes: 8abceacff87d (perf debug: Add debug_set_file function) 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/20210519164447.2672030-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f610a5a29c3cfb7d37bdfa4ef52f72ea51f24a76 Author: David Howells Date: Thu May 27 11:24:33 2021 +0100 afs: Fix the nlink handling of dir-over-dir rename Fix rename of one directory over another such that the nlink on the deleted directory is cleared to 0 rather than being decremented to 1. This was causing the generic/035 xfstest to fail. Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: David Howells Reviewed-by: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/162194384460.3999479.7605572278074191079.stgit@warthog.procyon.org.uk/ # v1 Signed-off-by: Linus Torvalds commit 6a137caec23aeb9e036cdfd8a46dd8a366460e5d Author: Lin Ma Date: Tue May 25 14:39:02 2021 +0200 Bluetooth: fix the erroneous flush_work() order In the cleanup routine for failed initialization of HCI device, the flush_work(&hdev->rx_work) need to be finished before the flush_work(&hdev->cmd_work). Otherwise, the hci_rx_work() can possibly invoke new cmd_work and cause a bug, like double free, in late processings. This was assigned CVE-2021-3564. This patch reorder the flush_work() to fix this bug. Cc: Marcel Holtmann Cc: Johan Hedberg Cc: Luiz Augusto von Dentz Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-bluetooth@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Lin Ma Signed-off-by: Hao Xiong Cc: stable Signed-off-by: Greg Kroah-Hartman Signed-off-by: Marcel Holtmann commit 6308c44ed6eeadf65c0a7ba68d609773ed860fbb Author: Jack Yu Date: Thu May 27 01:06:51 2021 +0000 ASoC: rt5659: Fix the lost powers for the HDA header The power of "LDO2", "MICBIAS1" and "Mic Det Power" were powered off after the DAPM widgets were added, and these powers were set by the JD settings "RT5659_JD_HDA_HEADER" in the probe function. In the codec probe function, these powers were ignored to prevent them controlled by DAPM. Signed-off-by: Oder Chiou Signed-off-by: Jack Yu Message-Id: <15fced51977b458798ca4eebf03dafb9@realtek.com> Signed-off-by: Mark Brown commit 0fe0bbe00a6fb77adf75085b7d06b71a830dd6f2 Author: Dave Chinner Date: Thu May 27 08:11:01 2021 -0700 xfs: bunmapi has unnecessary AG lock ordering issues large directory block size operations are assert failing because xfs_bunmapi() is not completely removing fragmented directory blocks like so: XFS: Assertion failed: done, file: fs/xfs/libxfs/xfs_dir2.c, line: 677 .... Call Trace: xfs_dir2_shrink_inode+0x1a8/0x210 xfs_dir2_block_to_sf+0x2ae/0x410 xfs_dir2_block_removename+0x21a/0x280 xfs_dir_removename+0x195/0x1d0 xfs_rename+0xb79/0xc50 ? avc_has_perm+0x8d/0x1a0 ? avc_has_perm_noaudit+0x9a/0x120 xfs_vn_rename+0xdb/0x150 vfs_rename+0x719/0xb50 ? __lookup_hash+0x6a/0xa0 do_renameat2+0x413/0x5e0 __x64_sys_rename+0x45/0x50 do_syscall_64+0x3a/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xae We are aborting the bunmapi() pass because of this specific chunk of code: /* * Make sure we don't touch multiple AGF headers out of order * in a single transaction, as that could cause AB-BA deadlocks. */ if (!wasdel && !isrt) { agno = XFS_FSB_TO_AGNO(mp, del.br_startblock); if (prev_agno != NULLAGNUMBER && prev_agno > agno) break; prev_agno = agno; } This is designed to prevent deadlocks in AGF locking when freeing multiple extents by ensuring that we only ever lock in increasing AG number order. Unfortunately, this also violates the "bunmapi will always succeed" semantic that some high level callers depend on, such as xfs_dir2_shrink_inode(), xfs_da_shrink_inode() and xfs_inactive_symlink_rmt(). This AG lock ordering was introduced back in 2017 to fix deadlocks triggered by generic/299 as reported here: https://lore.kernel.org/linux-xfs/800468eb-3ded-9166-20a4-047de8018582@gmail.com/ This codebase is old enough that it was before we were defering all AG based extent freeing from within xfs_bunmapi(). THat is, we never actually lock AGs in xfs_bunmapi() any more - every non-rt based extent free is added to the defer ops list, as is all BMBT block freeing. And RT extents are not RT based, so there's no lock ordering issues associated with them. Hence this AGF lock ordering code is both broken and dead. Let's just remove it so that the large directory block code works reliably again. Tested against xfs/538 and generic/299 which is the original test that exposed the deadlocks that this code fixed. Fixes: 5b094d6dac04 ("xfs: fix multi-AG deadlock in xfs_bunmapi") Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 991c2c5980fb97ae6194f7c46b44f9446629eb4e Author: Dave Chinner Date: Wed May 26 19:57:42 2021 -0700 xfs: btree format inode forks can have zero extents xfs/538 is assert failing with this trace when testing with directory block sizes of 64kB: XFS: Assertion failed: !xfs_need_iread_extents(ifp), file: fs/xfs/libxfs/xfs_bmap.c, line: 608 .... Call Trace: xfs_bmap_btree_to_extents+0x2a9/0x470 ? kmem_cache_alloc+0xe7/0x220 __xfs_bunmapi+0x4ca/0xdf0 xfs_bunmapi+0x1a/0x30 xfs_dir2_shrink_inode+0x71/0x210 xfs_dir2_block_to_sf+0x2ae/0x410 xfs_dir2_block_removename+0x21a/0x280 xfs_dir_removename+0x195/0x1d0 xfs_remove+0x244/0x460 xfs_vn_unlink+0x53/0xa0 ? selinux_inode_unlink+0x13/0x20 vfs_unlink+0x117/0x220 do_unlinkat+0x1a2/0x2d0 __x64_sys_unlink+0x42/0x60 do_syscall_64+0x3a/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xae This is a check to ensure that the extents have been read into memory before we are doing a ifork btree manipulation. This assert is bogus in the above case. We have a fragmented directory block that has more extents in it than can fit in extent format, so the inode data fork is in btree format. xfs_dir2_shrink_inode() asks to remove all remaining 16 filesystem blocks from the inode so it can convert to short form, and __xfs_bunmapi() removes all the extents. We now have a data fork in btree format but have zero extents in the fork. This incorrectly trips the xfs_need_iread_extents() assert because it assumes that an empty extent btree means the extent tree has not been read into memory yet. This is clearly not the case with xfs_bunmapi(), as it has an explicit call to xfs_iread_extents() in it to pull the extents into memory before it starts unmapping. Also, the assert directly after this bogus one is: ASSERT(ifp->if_format == XFS_DINODE_FMT_BTREE); Which covers the context in which it is legal to call xfs_bmap_btree_to_extents just fine. Hence we should just remove the bogus assert as it is clearly wrong and causes a regression. The returns the test behaviour to the pre-existing assert failure in xfs_dir2_shrink_inode() that indicates xfs_bunmapi() has failed to remove all the extents in the range it was asked to unmap. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0ee74d5a48635c848c20f152d0d488bf84641304 Author: Rolf Eike Beer Date: Tue May 25 15:08:02 2021 +0800 iommu/vt-d: Fix sysfs leak in alloc_iommu() iommu_device_sysfs_add() is called before, so is has to be cleaned on subsequent errors. Fixes: 39ab9555c2411 ("iommu: Add sysfs bindings for struct iommu_device") Cc: stable@vger.kernel.org # 4.11.x Signed-off-by: Rolf Eike Beer Acked-by: Lu Baolu Link: https://lore.kernel.org/r/17411490.HIIP88n32C@mobilepool36.emlix.com Link: https://lore.kernel.org/r/20210525070802.361755-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit b16ef427adf31fb4f6522458d37b3fe21d6d03b8 Author: Marco Elver Date: Thu May 27 11:25:48 2021 +0200 io_uring: fix data race to avoid potential NULL-deref Commit ba5ef6dc8a82 ("io_uring: fortify tctx/io_wq cleanup") introduced setting tctx->io_wq to NULL a bit earlier. This has caused KCSAN to detect a data race between accesses to tctx->io_wq: write to 0xffff88811d8df330 of 8 bytes by task 3709 on cpu 1: io_uring_clean_tctx fs/io_uring.c:9042 [inline] __io_uring_cancel fs/io_uring.c:9136 io_uring_files_cancel include/linux/io_uring.h:16 [inline] do_exit kernel/exit.c:781 do_group_exit kernel/exit.c:923 get_signal kernel/signal.c:2835 arch_do_signal_or_restart arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] ... read to 0xffff88811d8df330 of 8 bytes by task 6412 on cpu 0: io_uring_try_cancel_iowq fs/io_uring.c:8911 [inline] io_uring_try_cancel_requests fs/io_uring.c:8933 io_ring_exit_work fs/io_uring.c:8736 process_one_work kernel/workqueue.c:2276 ... With the config used, KCSAN only reports data races with value changes: this implies that in the case here we also know that tctx->io_wq was non-NULL. Therefore, depending on interleaving, we may end up with: [CPU 0] | [CPU 1] io_uring_try_cancel_iowq() | io_uring_clean_tctx() if (!tctx->io_wq) // false | ... ... | tctx->io_wq = NULL io_wq_cancel_cb(tctx->io_wq, ...) | ... -> NULL-deref | Note: It is likely that thus far we've gotten lucky and the compiler optimizes the double-read into a single read into a register -- but this is never guaranteed, and can easily change with a different config! Fix the data race by restoring the previous behaviour, where both setting io_wq to NULL and put of the wq are _serialized_ after concurrent io_uring_try_cancel_iowq() via acquisition of the uring_lock and removal of the node in io_uring_del_task_file(). Fixes: ba5ef6dc8a82 ("io_uring: fortify tctx/io_wq cleanup") Suggested-by: Pavel Begunkov Reported-by: syzbot+bf2b3d0435b9b728946c@syzkaller.appspotmail.com Signed-off-by: Marco Elver Cc: Jens Axboe Link: https://lore.kernel.org/r/20210527092547.2656514-1-elver@google.com Signed-off-by: Jens Axboe commit a94f66aecdaa498d83314cadac466d8b65674b94 Author: Hans de Goede Date: Wed May 5 23:39:34 2021 +0200 HID: asus: Cleanup Asus T101HA keyboard-dock handling There is no need to use a quirk and then return -ENODEV from the asus_probe() function to avoid that hid-asus binds to the hiddev for the USB-interface for the hid-multitouch touchpad. The hid-multitouch hiddev has a group of HID_GROUP_MULTITOUCH_WIN_8, so the same result can be achieved by making the hid_device_id entry for the dock in the asus_devices[] table only match on HID_GROUP_GENERIC instead of having it match HID_GROUP_ANY. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 4b4f6cecca446abcb686c6e6c451d4f1ec1a7497 Author: Johan Hovold Date: Mon May 17 12:04:30 2021 +0200 HID: magicmouse: fix NULL-deref on disconnect Commit 9d7b18668956 ("HID: magicmouse: add support for Apple Magic Trackpad 2") added a sanity check for an Apple trackpad but returned success instead of -ENODEV when the check failed. This means that the remove callback will dereference the never-initialised driver data pointer when the driver is later unbound (e.g. on USB disconnect). Reported-by: syzbot+ee6f6e2e68886ca256a8@syzkaller.appspotmail.com Fixes: 9d7b18668956 ("HID: magicmouse: add support for Apple Magic Trackpad 2") Cc: stable@vger.kernel.org # 4.20 Cc: Claudio Mettler Cc: Marek Wyborski Cc: Sean O'Brien Signed-off-by: Johan Hovold Signed-off-by: Jiri Kosina commit 22db5e0003e1441cd829180cebb42f7a6b7a46b7 Author: Ye Xiang Date: Mon May 17 14:36:09 2021 +0800 HID: intel-ish-hid: ipc: Add Alder Lake device IDs Add Alder Lake PCI device IDs to the supported device list. Signed-off-by: Ye Xiang Signed-off-by: Jiri Kosina commit dc5f9f55502e13ba05731d5046a14620aa2ff456 Author: Arnd Bergmann Date: Fri May 14 15:58:50 2021 +0200 HID: i2c-hid: fix format string mismatch clang doesn't like printing a 32-bit integer using %hX format string: drivers/hid/i2c-hid/i2c-hid-core.c:994:18: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat] client->name, hid->vendor, hid->product); ^~~~~~~~~~~ drivers/hid/i2c-hid/i2c-hid-core.c:994:31: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat] client->name, hid->vendor, hid->product); ^~~~~~~~~~~~ Use an explicit cast to truncate it to the low 16 bits instead. Fixes: 9ee3e06610fd ("HID: i2c-hid: override HID descriptors for certain devices") Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Signed-off-by: Jiri Kosina commit 5ad755fd2b326aa2bc8910b0eb351ee6aece21b1 Author: Basavaraj Natikar Date: Wed May 12 18:41:56 2021 +0530 HID: amd_sfh: Fix memory leak in amd_sfh_work Kmemleak tool detected a memory leak in the amd_sfh driver. ==================== unreferenced object 0xffff88810228ada0 (size 32): comm "insmod", pid 3968, jiffies 4295056001 (age 775.792s) hex dump (first 32 bytes): 00 20 73 1f 81 88 ff ff 00 01 00 00 00 00 ad de . s............. 22 01 00 00 00 00 ad de 01 00 02 00 00 00 00 00 "............... backtrace: [<000000007b4c8799>] kmem_cache_alloc_trace+0x163/0x4f0 [<0000000005326893>] amd_sfh_get_report+0xa4/0x1d0 [amd_sfh] [<000000002a9e5ec4>] amdtp_hid_request+0x62/0x80 [amd_sfh] [<00000000b8a95807>] sensor_hub_get_feature+0x145/0x270 [hid_sensor_hub] [<00000000fda054ee>] hid_sensor_parse_common_attributes+0x215/0x460 [hid_sensor_iio_common] [<0000000021279ecf>] hid_accel_3d_probe+0xff/0x4a0 [hid_sensor_accel_3d] [<00000000915760ce>] platform_probe+0x6a/0xd0 [<0000000060258a1f>] really_probe+0x192/0x620 [<00000000fa812f2d>] driver_probe_device+0x14a/0x1d0 [<000000005e79f7fd>] __device_attach_driver+0xbd/0x110 [<0000000070d15018>] bus_for_each_drv+0xfd/0x160 [<0000000013a3c312>] __device_attach+0x18b/0x220 [<000000008c7b4afc>] device_initial_probe+0x13/0x20 [<00000000e6e99665>] bus_probe_device+0xfe/0x120 [<00000000833fa90b>] device_add+0x6a6/0xe00 [<00000000fa901078>] platform_device_add+0x180/0x380 ==================== The fix is to freeing request_list entry once the processed entry is removed from the request_list. Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Reviewed-by: Shyam Sundar S K Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit e3d6a599969b8244eeb447e372ec3b1eddd7534e Author: Basavaraj Natikar Date: Wed May 12 18:41:55 2021 +0530 HID: amd_sfh: Use devm_kzalloc() instead of kzalloc() Replace kzalloc with devm_kzalloc in driver initialization sequence. The allocation can be tied to the lifetime of the amd_sfh driver. This cleans up an exit & error paths, since the objects does not need to be explicitly freed anymore. Fixes: 4b2c53d93a4b ("SFH:Transport Driver to add support of AMD Sensor Fusion Hub (SFH)") Reviewed-by: Shyam Sundar S K Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina commit 82f09a637dd3215bce5314664f0171cdc3e43bb5 Author: Michael Zaidman Date: Tue May 11 13:12:08 2021 +0300 HID: ft260: improve error handling of ft260_hid_feature_report_get() The ft260_hid_feature_report_get() checks if the return size matches the requested size. But the function can also fail with at least -ENOMEM. Add the < 0 checks. In ft260_hid_feature_report_get(), do not do the memcpy to the caller's buffer if there is an error. Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver") Signed-off-by: Tom Rix Signed-off-by: Michael Zaidman Signed-off-by: Jiri Kosina commit 4fb125192563670e820991de48f8db495ecc7ff7 Author: José Expósito Date: Mon May 10 08:22:37 2021 +0200 HID: magicmouse: fix crash when disconnecting Magic Trackpad 2 When the Apple Magic Trackpad 2 is connected over USB it registers four hid_device report descriptors, however, the driver only handles the one with type HID_TYPE_USBMOUSE and ignores the other three, thus, no driver data is attached to them. When the device is disconnected, the remove callback is called for the four hid_device report descriptors, crashing when the driver data is NULL. Check that the driver data is not NULL before using it in the remove callback. Signed-off-by: José Expósito Signed-off-by: Jiri Kosina commit a4b494099ad657f1cb85436d333cf38870ee95bc Author: Bixuan Cui Date: Sat May 8 11:14:48 2021 +0800 HID: gt683r: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Jiri Kosina commit 3dd653c077efda8152f4dd395359617d577a54cd Author: Zhen Lei Date: Sat May 8 10:47:37 2021 +0800 HID: pidff: fix error return code in hid_pidff_init() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Jiri Kosina commit 81c8bf9170477d453b24a6bc3300d201d641e645 Author: Tom Rix Date: Fri May 7 12:18:19 2021 -0700 HID: logitech-hidpp: initialize level variable Static analysis reports this representative problem hid-logitech-hidpp.c:1356:23: warning: Assigned value is garbage or undefined hidpp->battery.level = level; ^ ~~~~~ In some cases, 'level' is never set in hidpp20_battery_map_status_voltage() Since level is not available on all hw, initialize level to unknown. Fixes: be281368f297 ("hid-logitech-hidpp: read battery voltage from newer devices") Signed-off-by: Tom Rix Reviewed-by: Filipe Laíns Signed-off-by: Jiri Kosina commit 31a4cf1d223dc6144d2e7c679cc3a98f84a1607b Author: Hans de Goede Date: Wed May 5 23:39:32 2021 +0200 HID: multitouch: Disable event reporting on suspend on the Asus T101HA touchpad The Asus T101HA has a problem with spurious wakeups when the lid is closed, this is caused by the screen sitting so close to the touchpad that the touchpad ends up reporting touch events, causing these wakeups. Add a quirk which disables event reporting on suspend when set, and enable this quirk for the Asus T101HA touchpad fixing the spurious wakeups, while still allowing the device to be woken by pressing a key on the keyboard (which is part of the same USB device). Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit e62b91cd8a8d4a18955802b852cac86cd72f79b1 Author: Hans de Goede Date: Wed May 5 23:39:30 2021 +0200 HID: core: Remove extraneous empty line before EXPORT_SYMBOL_GPL(hid_check_keys_pressed) Normally the EXPORT_SYMBOL of a function immediately follows the declaration of the function and all the other functions in hid-core.c follow this pattern, drop the extraneous empty line before the EXPORT_SYMBOL_GPL(hid_check_keys_pressed); line. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit a4b58f1721eb4d7d27e0fdcaba60d204248dcd25 Merge: 094c271addc3e aaeadd7075dc9 Author: Jens Axboe Date: Thu May 27 07:38:12 2021 -0600 Merge tag 'nvme-5.13-2021-05-27' of git://git.infradead.org/nvme into block-5.13 Pull NVMe fixes from Christoph: "nvme fixes for Linux 5.13 - fix a memory leak in nvme_cdev_add (Guoqing Jiang) - fix inline data size comparison in nvmet_tcp_queue_response (Hou Pu) - fix false keep-alive timeout when a controller is torn down (Sagi Grimberg) - fix a nvme-tcp Kconfig dependency (Sagi Grimberg) - short-circuit reconnect retries for FC (Hannes Reinecke) - decode host pathing error for connect (Hannes Reinecke)" * tag 'nvme-5.13-2021-05-27' of git://git.infradead.org/nvme: nvmet: fix false keep-alive timeout when a controller is torn down nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response nvme-tcp: remove incorrect Kconfig dep in BLK_DEV_NVME nvme-fabrics: decode host pathing error for connect nvme-fc: short-circuit reconnect retries nvme: fix potential memory leaks in nvme_cdev_add commit 9808f9be31c68af43f6e531f2c851ebb066513fe Author: Christian Gmeiner Date: Thu May 27 11:54:40 2021 +0200 serial: 8250_pci: handle FL_NOIRQ board flag In commit 8428413b1d14 ("serial: 8250_pci: Implement MSI(-X) support") the way the irq gets allocated was changed. With that change the handling FL_NOIRQ got lost. Restore the old behaviour. Fixes: 8428413b1d14 ("serial: 8250_pci: Implement MSI(-X) support") Cc: Signed-off-by: Christian Gmeiner Link: https://lore.kernel.org/r/20210527095529.26281-1-christian.gmeiner@gmail.com Signed-off-by: Greg Kroah-Hartman commit a799b68a7c7ac97b457aba4ede4122a2a9f536ab Author: Huilong Deng Date: Fri May 21 22:07:37 2021 +0800 nfs: Remove trailing semicolon in macros Macros should not use a trailing semicolon. Signed-off-by: Huilong Deng Signed-off-by: Trond Myklebust commit bbf0a94744edfeee298e4a9ab6fd694d639a5cdf Author: Alexander Usyskin Date: Wed May 26 22:33:34 2021 +0300 mei: request autosuspend after sending rx flow control A rx flow control waiting in the control queue may block autosuspend. Re-request autosuspend after flow control been sent to unblock the transition to the low power state. Cc: Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20210526193334.445759-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 022b93cf2d6af2acfc13fbe399d9babf76d6eb48 Merge: bda7d3ab06f19 1fd86e280d8b2 Author: Greg Kroah-Hartman Date: Thu May 27 15:06:33 2021 +0200 Merge tag 'icc-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-linus Grorgi writes: interconnect fixes for v5.13 This contains two tiny driver fixes: - bcm-voter: Add missing MODULE_DEVICE_TABLE - bcm-voter: Add a missing of_node_put() Signed-off-by: Georgi Djakov * tag 'icc-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: Add missing MODULE_DEVICE_TABLE interconnect: qcom: bcm-voter: add a missing of_node_put() commit bedd9195df3dfea7165e7d6f7519a1568bc41936 Author: David Matlack Date: Wed May 26 16:32:27 2021 +0000 KVM: x86/mmu: Fix comment mentioning skip_4k This comment was left over from a previous version of the patch that introduced wrprot_gfn_range, when skip_4k was passed in instead of min_level. Signed-off-by: David Matlack Message-Id: <20210526163227.3113557-1-dmatlack@google.com> Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit ae605ee9830840f14566a3b1cde27fa8096dbdd4 Author: Chuck Lever Date: Wed May 26 15:35:20 2021 -0400 xprtrdma: Revert 586a0787ce35 Commit 9ed5af268e88 ("SUNRPC: Clean up the handling of page padding in rpc_prepare_reply_pages()") [Dec 2020] affects RPC Replies that have a data payload (i.e., Write chunks). rpcrdma_prepare_readch(), as its name suggests, sets up Read chunks which are data payloads within RPC Calls. Those payloads are constructed by xdr_write_pages(), which continues to stuff the call buffer's tail kvec with the payload's XDR roundup. Thus removing the tail buffer logic in rpcrdma_prepare_readch() was the wrong thing to do. Fixes: 586a0787ce35 ("xprtrdma: Clean up rpcrdma_prepare_readch()") Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit e67afa7ee4a59584d7253e45d7f63b9528819a13 Author: Zhang Xiaoxu Date: Tue May 25 23:32:35 2021 -0400 NFSv4: Fix v4.0/v4.1 SEEK_DATA return -ENOTSUPP when set NFS_V4_2 config Since commit bdcc2cd14e4e ("NFSv4.2: handle NFS-specific llseek errors"), nfs42_proc_llseek would return -EOPNOTSUPP rather than -ENOTSUPP when SEEK_DATA on NFSv4.0/v4.1. This will lead xfstests generic/285 not run on NFSv4.0/v4.1 when set the CONFIG_NFS_V4_2, rather than run failed. Fixes: bdcc2cd14e4e ("NFSv4.2: handle NFS-specific llseek errors") Cc: # 4.2 Signed-off-by: Zhang Xiaoxu Signed-off-by: Trond Myklebust commit a2486020a82eefad686993695eb42d1b64f3f2fd Author: Marcelo Tosatti Date: Wed May 26 14:20:14 2021 -0300 KVM: VMX: update vcpu posted-interrupt descriptor when assigning device For VMX, when a vcpu enters HLT emulation, pi_post_block will: 1) Add vcpu to per-cpu list of blocked vcpus. 2) Program the posted-interrupt descriptor "notification vector" to POSTED_INTR_WAKEUP_VECTOR With interrupt remapping, an interrupt will set the PIR bit for the vector programmed for the device on the CPU, test-and-set the ON bit on the posted interrupt descriptor, and if the ON bit is clear generate an interrupt for the notification vector. This way, the target CPU wakes upon a device interrupt and wakes up the target vcpu. Problem is that pi_post_block only programs the notification vector if kvm_arch_has_assigned_device() is true. Its possible for the following to happen: 1) vcpu V HLTs on pcpu P, kvm_arch_has_assigned_device is false, notification vector is not programmed 2) device is assigned to VM 3) device interrupts vcpu V, sets ON bit (notification vector not programmed, so pcpu P remains in idle) 4) vcpu 0 IPIs vcpu V (in guest), but since pi descriptor ON bit is set, kvm_vcpu_kick is skipped 5) vcpu 0 busy spins on vcpu V's response for several seconds, until RCU watchdog NMIs all vCPUs. To fix this, use the start_assignment kvm_x86_ops callback to kick vcpus out of the halt loop, so the notification vector is properly reprogrammed to the wakeup vector. Reported-by: Pei Zhang Signed-off-by: Marcelo Tosatti Message-Id: <20210526172014.GA29007@fuller.cnet> Signed-off-by: Paolo Bonzini commit 084071d5e9226add45a6031928bf10e6afc855fd Author: Marcelo Tosatti Date: Tue May 25 10:41:17 2021 -0300 KVM: rename KVM_REQ_PENDING_TIMER to KVM_REQ_UNBLOCK KVM_REQ_UNBLOCK will be used to exit a vcpu from its inner vcpu halt emulation loop. Rename KVM_REQ_PENDING_TIMER to KVM_REQ_UNBLOCK, switch PowerPC to arch specific request bit. Signed-off-by: Marcelo Tosatti Message-Id: <20210525134321.303768132@redhat.com> Signed-off-by: Paolo Bonzini commit 57ab87947abfc4e0b0b9864dc4717326a1c28a39 Author: Marcelo Tosatti Date: Tue May 25 10:41:16 2021 -0300 KVM: x86: add start_assignment hook to kvm_x86_ops Add a start_assignment hook to kvm_x86_ops, which is called when kvm_arch_start_assignment is done. The hook is required to update the wakeup vector of a sleeping vCPU when a device is assigned to the guest. Signed-off-by: Marcelo Tosatti Message-Id: <20210525134321.254128742@redhat.com> Reviewed-by: Peter Xu Signed-off-by: Paolo Bonzini commit 9805cf03fdb6828091fe09e4ef0fb544fca3eaf6 Author: Wanpeng Li Date: Tue May 18 05:00:35 2021 -0700 KVM: LAPIC: Narrow the timer latency between wait_lapic_expire and world switch Let's treat lapic_timer_advance_ns automatic tuning logic as hypervisor overhead, move it before wait_lapic_expire instead of between wait_lapic_expire and the world switch, the wait duration should be calculated by the up-to-date guest_tsc after the overhead of automatic tuning logic. This patch reduces ~30+ cycles for kvm-unit-tests/tscdeadline-latency when testing busy waits. Signed-off-by: Wanpeng Li Message-Id: <1621339235-11131-5-git-send-email-wanpengli@tencent.com> Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit fb0f94794bb7558c078ce37b1a6e30d881fd7888 Author: Paolo Bonzini Date: Wed May 26 14:36:14 2021 -0400 selftests: kvm: do only 1 memslot_perf_test run by default The test takes a long time with the current implementation of memslots, so cut the run time a bit. Signed-off-by: Paolo Bonzini commit fb1070d18edb37daf3979662975bc54625a19953 Author: Joe Richey Date: Fri May 21 01:58:43 2021 -0700 KVM: X86: Use _BITUL() macro in UAPI headers Replace BIT() in KVM's UPAI header with _BITUL(). BIT() is not defined in the UAPI headers and its usage may cause userspace build errors. Fixes: fb04a1eddb1a ("KVM: X86: Implement ring-based dirty memory tracking") Signed-off-by: Joe Richey Message-Id: <20210521085849.37676-3-joerichey94@gmail.com> Signed-off-by: Paolo Bonzini commit 33090a884da5e9760f11441ac269f754375f80f5 Author: Axel Rasmussen Date: Wed May 19 13:03:39 2021 -0700 KVM: selftests: add shared hugetlbfs backing source type This lets us run the demand paging test on top of a shared hugetlbfs-backed area. The "shared" is key, as this allows us to exercise userfaultfd minor faults on hugetlbfs. Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-11-axelrasmussen@google.com> Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit a4b9722a5996017264feb19ebe86efe4380f7afb Author: Axel Rasmussen Date: Wed May 19 13:03:38 2021 -0700 KVM: selftests: allow using UFFD minor faults for demand paging UFFD handling of MINOR faults is a new feature whose use case is to speed up demand paging (compared to MISSING faults). So, it's interesting to let this selftest exercise this new mode. Modify the demand paging test to have the option of using UFFD minor faults, as opposed to missing faults. Now, when turning on userfaultfd with '-u', the desired mode has to be specified ("MISSING" or "MINOR"). If we're in minor mode, before registering, prefault via the *alias*. This way, the guest will trigger minor faults, instead of missing faults, and we can UFFDIO_CONTINUE to resolve them. Modify the page fault handler function to use the right ioctl depending on the mode we're running in. In MINOR mode, use UFFDIO_CONTINUE. Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-10-axelrasmussen@google.com> Signed-off-by: Paolo Bonzini commit 94f3f2b31a8a9e8bd30bf6f4903ff84acc612e0e Author: Axel Rasmussen Date: Wed May 19 13:03:37 2021 -0700 KVM: selftests: create alias mappings when using shared memory When a memory region is added with a src_type specifying that it should use some kind of shared memory, also create an alias mapping to the same underlying physical pages. And, add an API so tests can get access to these alias addresses. Basically, for a guest physical address, let us look up the analogous host *alias* address. In a future commit, we'll modify the demand paging test to take advantage of this to exercise UFFD minor faults. The idea is, we pre-fault the underlying pages *via the alias*. When the *guest* faults, it gets a "minor" fault (PTEs don't exist yet, but a page is already in the page cache). Then, the userfaultfd theads can handle the fault: they could potentially modify the underlying memory *via the alias* if they wanted to, and then they install the PTEs and let the guest carry on via a UFFDIO_CONTINUE ioctl. Reviewed-by: Ben Gardon Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-9-axelrasmussen@google.com> Signed-off-by: Paolo Bonzini commit c9befd5958fdf8913db69049d47b6ac1d970af03 Author: Axel Rasmussen Date: Wed May 19 13:03:36 2021 -0700 KVM: selftests: add shmem backing source type This lets us run the demand paging test on top of a shmem-backed area. In follow-up commits, we'll 1) leverage this new capability to create an alias mapping, and then 2) use the alias mapping to exercise UFFD minor faults. Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-8-axelrasmussen@google.com> Signed-off-by: Paolo Bonzini commit b3784bc28ccc0d9b44d265a1d947c8766295ba00 Author: Axel Rasmussen Date: Wed May 19 13:03:35 2021 -0700 KVM: selftests: refactor vm_mem_backing_src_type flags Each struct vm_mem_backing_src_alias has a flags field, which denotes the flags used to mmap() an area of that type. Previously, this field never included MAP_PRIVATE | MAP_ANONYMOUS, because vm_userspace_mem_region_add assumed that *all* types would always use those flags, and so it hardcoded them. In a follow-up commit, we'll add a new type: shmem. Areas of this type must not have MAP_PRIVATE | MAP_ANONYMOUS, and instead they must have MAP_SHARED. So, refactor things. Make it so that the flags field of struct vm_mem_backing_src_alias really is a complete set of flags, and don't add in any extras in vm_userspace_mem_region_add. This will let us easily tack on shmem. Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-7-axelrasmussen@google.com> Signed-off-by: Paolo Bonzini commit 0368c2c1b422c94968b5286f289aed7fe6af93c2 Author: Axel Rasmussen Date: Wed May 19 13:03:34 2021 -0700 KVM: selftests: allow different backing source types Add an argument which lets us specify a different backing memory type for the test. The default is just to use anonymous, matching existing behavior. This is in preparation for testing UFFD minor faults. For that, we'll need to use a new backing memory type which is setup with MAP_SHARED. Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-6-axelrasmussen@google.com> Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit 32ffa4f71e10009498ae6b54da65ab316db967bd Author: Axel Rasmussen Date: Wed May 19 13:03:33 2021 -0700 KVM: selftests: compute correct demand paging size This is a preparatory commit needed before we can use different kinds of backing pages for guest memory. Previously, we used perf_test_args.host_page_size, which is the host's native page size (commonly 4K). For VM_MEM_SRC_ANONYMOUS this turns out to be okay, but in a follow-up commit we want to allow using different kinds of backing memory. Take VM_MEM_SRC_ANONYMOUS_HUGETLB for example. Without this change, if we used that backing page type, when we issued a UFFDIO_COPY ioctl we'd only do so with 4K, rather than the full 2M of a backing hugepage. In this case, UFFDIO_COPY returns -EINVAL (__mcopy_atomic_hugetlb checks the size). Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-5-axelrasmussen@google.com> Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit 25408e5a0246048e3e36d2cd513565ebcc481f51 Author: Axel Rasmussen Date: Wed May 19 13:03:31 2021 -0700 KVM: selftests: simplify setup_demand_paging error handling A small cleanup. Our caller writes: r = setup_demand_paging(...); if (r < 0) exit(-r); Since we're just going to exit anyway, instead of returning an error we can just re-use TEST_ASSERT. This makes the caller simpler, as well as the function itself - no need to write our branches, etc. Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-3-axelrasmussen@google.com> Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit 2aab4b355cbbe1deacfd9349729c43509042b557 Author: David Matlack Date: Tue May 11 20:21:20 2021 +0000 KVM: selftests: Print a message if /dev/kvm is missing If a KVM selftest is run on a machine without /dev/kvm, it will exit silently. Make it easy to tell what's happening by printing an error message. Opportunistically consolidate all codepaths that open /dev/kvm into a single function so they all print the same message. This slightly changes the semantics of vm_is_unrestricted_guest() by changing a TEST_ASSERT() to exit(KSFT_SKIP). However vm_is_unrestricted_guest() is only called in one place (x86_64/mmio_warning_test.c) and that is to determine if the test should be skipped or not. Signed-off-by: David Matlack Message-Id: <20210511202120.1371800-1-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit c887d6a126dfc50b27872527615dd46cb3d96bc1 Author: Axel Rasmussen Date: Wed May 19 13:03:30 2021 -0700 KVM: selftests: trivial comment/logging fixes Some trivial fixes I found while touching related code in this series, factored out into a separate commit for easier reviewing: - s/gor/got/ and add a newline in demand_paging_test.c - s/backing_src/src_type/ in a comment to be consistent with the real function signature in kvm_util.c Signed-off-by: Axel Rasmussen Message-Id: <20210519200339.829146-2-axelrasmussen@google.com> Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit a10453c038a7e97169185405242d20d21de0bb91 Author: David Matlack Date: Fri May 14 23:05:21 2021 +0000 KVM: selftests: Fix hang in hardware_disable_test If /dev/kvm is not available then hardware_disable_test will hang indefinitely because the child process exits before posting to the semaphore for which the parent is waiting. Fix this by making the parent periodically check if the child has exited. We have to be careful to forward the child's exit status to preserve a KSFT_SKIP status. I considered just checking for /dev/kvm before creating the child process, but there are so many other reasons why the child could exit early that it seemed better to handle that as general case. Tested: $ ./hardware_disable_test /dev/kvm not available, skipping test $ echo $? 4 $ modprobe kvm_intel $ ./hardware_disable_test $ echo $? 0 Signed-off-by: David Matlack Message-Id: <20210514230521.2608768-1-dmatlack@google.com> Reviewed-by: Andrew Jones Signed-off-by: Paolo Bonzini commit 50bc913d526beb9937f1eb0159ec63c43234f961 Author: David Matlack Date: Wed May 19 21:13:45 2021 +0000 KVM: selftests: Ignore CPUID.0DH.1H in get_cpuid_test Similar to CPUID.0DH.0H this entry depends on the vCPU's XCR0 register and IA32_XSS MSR. Since this test does not control for either before assigning the vCPU's CPUID, these entries will not necessarily match the supported CPUID exposed by KVM. This fixes get_cpuid_test on Cascade Lake CPUs. Suggested-by: Jim Mattson Signed-off-by: David Matlack Message-Id: <20210519211345.3944063-1-dmatlack@google.com> Signed-off-by: Paolo Bonzini commit ef4c9f4f654622fa15b7a94a9bd1f19e76bb7feb Author: David Matlack Date: Fri May 21 17:38:28 2021 +0000 KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn() vm_get_max_gfn() casts vm->max_gfn from a uint64_t to an unsigned int, which causes the upper 32-bits of the max_gfn to get truncated. Nobody noticed until now likely because vm_get_max_gfn() is only used as a mechanism to create a memslot in an unused region of the guest physical address space (the top), and the top of the 32-bit physical address space was always good enough. This fix reveals a bug in memslot_modification_stress_test which was trying to create a dummy memslot past the end of guest physical memory. Fix that by moving the dummy memslot lower. Fixes: 52200d0d944e ("KVM: selftests: Remove duplicate guest mode handling") Reviewed-by: Venkatesh Srinivas Signed-off-by: David Matlack Message-Id: <20210521173828.1180619-1-dmatlack@google.com> Reviewed-by: Andrew Jones Reviewed-by: Peter Xu Signed-off-by: Paolo Bonzini commit cad347fab142bcb9bebc125b5ba0c1e52ce74fdc Author: Maciej S. Szmigiero Date: Tue Apr 13 16:08:28 2021 +0200 KVM: selftests: add a memslot-related performance benchmark This benchmark contains the following tests: * Map test, where the host unmaps guest memory while the guest writes to it (maps it). The test is designed in a way to make the unmap operation on the host take a negligible amount of time in comparison with the mapping operation in the guest. The test area is actually split in two: the first half is being mapped by the guest while the second half in being unmapped by the host. Then a guest <-> host sync happens and the areas are reversed. * Unmap test which is broadly similar to the above map test, but it is designed in an opposite way: to make the mapping operation in the guest take a negligible amount of time in comparison with the unmap operation on the host. This test is available in two variants: with per-page unmap operation or a chunked one (using 2 MiB chunk size). * Move active area test which involves moving the last (highest gfn) memslot a bit back and forth on the host while the guest is concurrently writing around the area being moved (including over the moved memslot). * Move inactive area test which is similar to the previous move active area test, but now guest writes all happen outside of the area being moved. * Read / write test in which the guest writes to the beginning of each page of the test area while the host writes to the middle of each such page. Then each side checks the values the other side has written. This particular test is not expected to give different results depending on particular memslots implementation, it is meant as a rough sanity check and to provide insight on the spread of test results expected. Each test performs its operation in a loop until a test period ends (this is 5 seconds by default, but it is configurable). Then the total count of loops done is divided by the actual elapsed time to give the test result. The tests have a configurable memslot cap with the "-s" test option, by default the system maximum is used. Each test is repeated a particular number of times (by default 20 times), the best result achieved is printed. The test memory area is divided equally between memslots, the reminder is added to the last memslot. The test area size does not depend on the number of memslots in use. The tests also measure the time that it took to add all these memslots. The best result from the tests that use the whole test area is printed after all the requested tests are done. In general, these tests are designed to use as much memory as possible (within reason) while still doing 100+ loops even on high memslot counts with the default test length. Increasing the test runtime makes it increasingly more likely that some event will happen on the system during the test run, which might lower the test result. Signed-off-by: Maciej S. Szmigiero Reviewed-by: Andrew Jones Message-Id: <8d31bb3d92bc8fa33a9756fa802ee14266ab994e.1618253574.git.maciej.szmigiero@oracle.com> Signed-off-by: Paolo Bonzini commit 22721a56109940f15b673d0f01907b7a7202275e Author: Maciej S. Szmigiero Date: Tue Apr 13 16:08:27 2021 +0200 KVM: selftests: Keep track of memslots more efficiently The KVM selftest framework was using a simple list for keeping track of the memslots currently in use. This resulted in lookups and adding a single memslot being O(n), the later due to linear scanning of the existing memslot set to check for the presence of any conflicting entries. Before this change, benchmarking high count of memslots was more or less impossible as pretty much all the benchmark time was spent in the selftest framework code. We can simply use a rbtree for keeping track of both of gfn and hva. We don't need an interval tree for hva here as we can't have overlapping memslots because we allocate a completely new memory chunk for each new memslot. Signed-off-by: Maciej S. Szmigiero Reviewed-by: Andrew Jones Message-Id: Signed-off-by: Paolo Bonzini commit a13534d6676d2f2a9aa286e27e482b4896ff90e3 Author: Paolo Bonzini Date: Mon May 24 14:27:38 2021 +0200 selftests: kvm: fix potential issue with ELF loading vm_vaddr_alloc() sets up GVA to GPA mapping page by page; therefore, GPAs may not be continuous if same memslot is used for data and page table allocation. kvm_vm_elf_load() however expects a continuous range of HVAs (and thus GPAs) because it does not try to read file data page by page. Fix this mismatch by allocating memory in one step. Reported-by: Zhenzhong Duan Signed-off-by: Paolo Bonzini commit 39fe2fc96694164723846fccf6caa42c3aee6ec4 Author: Zhenzhong Duan Date: Wed May 12 12:31:06 2021 +0800 selftests: kvm: make allocation of extra memory take effect The extra memory pages is missed to be allocated during VM creating. perf_test_util and kvm_page_table_test use it to alloc extra memory currently. Fix it by adding extra_mem_pages to the total memory calculation before allocate. Signed-off-by: Zhenzhong Duan Message-Id: <20210512043107.30076-1-zhenzhong.duan@intel.com> Signed-off-by: Paolo Bonzini commit da6d63a0062a3ee721b84123b83ec093f25759b0 Author: Wanpeng Li Date: Tue May 18 05:00:34 2021 -0700 KVM: X86: hyper-v: Task srcu lock when accessing kvm_memslots() WARNING: suspicious RCU usage 5.13.0-rc1 #4 Not tainted ----------------------------- ./include/linux/kvm_host.h:710 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by hyperv_clock/8318: #0: ffffb6b8cb05a7d8 (&hv->hv_lock){+.+.}-{3:3}, at: kvm_hv_invalidate_tsc_page+0x3e/0xa0 [kvm] stack backtrace: CPU: 3 PID: 8318 Comm: hyperv_clock Not tainted 5.13.0-rc1 #4 Call Trace: dump_stack+0x87/0xb7 lockdep_rcu_suspicious+0xce/0xf0 kvm_write_guest_page+0x1c1/0x1d0 [kvm] kvm_write_guest+0x50/0x90 [kvm] kvm_hv_invalidate_tsc_page+0x79/0xa0 [kvm] kvm_gen_update_masterclock+0x1d/0x110 [kvm] kvm_arch_vm_ioctl+0x2a7/0xc50 [kvm] kvm_vm_ioctl+0x123/0x11d0 [kvm] __x64_sys_ioctl+0x3ed/0x9d0 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae kvm_memslots() will be called by kvm_write_guest(), so we should take the srcu lock. Fixes: e880c6ea5 (KVM: x86: hyper-v: Prevent using not-yet-updated TSC page by secondary CPUs) Reviewed-by: Vitaly Kuznetsov Signed-off-by: Wanpeng Li Message-Id: <1621339235-11131-4-git-send-email-wanpengli@tencent.com> Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 1eff0ada88b48e4ac1e3fe26483b3684fedecd27 Author: Wanpeng Li Date: Tue May 18 05:00:33 2021 -0700 KVM: X86: Fix vCPU preempted state from guest's point of view Commit 66570e966dd9 (kvm: x86: only provide PV features if enabled in guest's CPUID) avoids to access pv tlb shootdown host side logic when this pv feature is not exposed to guest, however, kvm_steal_time.preempted not only leveraged by pv tlb shootdown logic but also mitigate the lock holder preemption issue. From guest's point of view, vCPU is always preempted since we lose the reset of kvm_steal_time.preempted before vmentry if pv tlb shootdown feature is not exposed. This patch fixes it by clearing kvm_steal_time.preempted before vmentry. Fixes: 66570e966dd9 (kvm: x86: only provide PV features if enabled in guest's CPUID) Reviewed-by: Sean Christopherson Cc: stable@vger.kernel.org Signed-off-by: Wanpeng Li Message-Id: <1621339235-11131-3-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 72b268a8e9307a1757f61af080e990b5baa11d2a Author: Wanpeng Li Date: Tue May 18 05:00:32 2021 -0700 KVM: X86: Bail out of direct yield in case of under-committed scenarios In case of under-committed scenarios, vCPUs can be scheduled easily; kvm_vcpu_yield_to adds extra overhead, and it is also common to see when vcpu->ready is true but yield later failing due to p->state is TASK_RUNNING. Let's bail out in such scenarios by checking the length of current cpu runqueue, which can be treated as a hint of under-committed instead of guarantee of accuracy. 30%+ of directed-yield attempts can now avoid the expensive lookups in kvm_sched_yield() in an under-committed scenario. Signed-off-by: Wanpeng Li Message-Id: <1621339235-11131-2-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 6bd5b743686243dae7351d5dcceeb7f171201bb4 Author: Wanpeng Li Date: Tue May 18 05:00:31 2021 -0700 KVM: PPC: exit halt polling on need_resched() This is inspired by commit 262de4102c7bb8 (kvm: exit halt polling on need_resched() as well). Due to PPC implements an arch specific halt polling logic, we have to the need_resched() check there as well. This patch adds a helper function that can be shared between book3s and generic halt-polling loops. Reviewed-by: David Matlack Reviewed-by: Venkatesh Srinivas Cc: Ben Segall Cc: Venkatesh Srinivas Cc: Jim Mattson Cc: David Matlack Cc: Paul Mackerras Cc: Suraj Jitindar Singh Signed-off-by: Wanpeng Li Message-Id: <1621339235-11131-1-git-send-email-wanpengli@tencent.com> [Make the function inline. - Paolo] Signed-off-by: Paolo Bonzini commit 56e4ee82e850026d71223262c07df7d6af3bd872 Author: Julian Anastasov Date: Mon May 24 22:54:57 2021 +0300 ipvs: ignore IP_VS_SVC_F_HASHED flag when adding service syzbot reported memory leak [1] when adding service with HASHED flag. We should ignore this flag both from sockopt and netlink provided data, otherwise the service is not hashed and not visible while releasing resources. [1] BUG: memory leak unreferenced object 0xffff888115227800 (size 512): comm "syz-executor263", pid 8658, jiffies 4294951882 (age 12.560s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmalloc include/linux/slab.h:556 [inline] [] kzalloc include/linux/slab.h:686 [inline] [] ip_vs_add_service+0x598/0x7c0 net/netfilter/ipvs/ip_vs_ctl.c:1343 [] do_ip_vs_set_ctl+0x810/0xa40 net/netfilter/ipvs/ip_vs_ctl.c:2570 [] nf_setsockopt+0x68/0xa0 net/netfilter/nf_sockopt.c:101 [] ip_setsockopt+0x259/0x1ff0 net/ipv4/ip_sockglue.c:1435 [] raw_setsockopt+0x18c/0x1b0 net/ipv4/raw.c:857 [] __sys_setsockopt+0x1b0/0x360 net/socket.c:2117 [] __do_sys_setsockopt net/socket.c:2128 [inline] [] __se_sys_setsockopt net/socket.c:2125 [inline] [] __x64_sys_setsockopt+0x22/0x30 net/socket.c:2125 [] do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 [] entry_SYSCALL_64_after_hwframe+0x44/0xae Reported-and-tested-by: syzbot+e562383183e4b1766930@syzkaller.appspotmail.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Julian Anastasov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit 5d8db38ad7660e4d78f4e2a63f14336f31f07a63 Author: Yang Yingliang Date: Thu May 27 17:26:40 2021 +0800 thermal/drivers/qcom: Fix error code in adc_tm5_get_dt_channel_data() Return -EINVAL when args is invalid instead of 'ret' which is set to zero by a previous successful call to a function. Fixes: ca66dca5eda6 ("thermal: qcom: add support for adc-tm5 PMIC thermal monitor") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210527092640.2070555-1-yangyingliang@huawei.com commit 66e94d5cafd4decd4f92d16a022ea587d7f4094f Author: Marc Zyngier Date: Mon May 24 18:07:52 2021 +0100 KVM: arm64: Prevent mixed-width VM creation It looks like we have tolerated creating mixed-width VMs since... forever. However, that was never the intention, and we'd rather not have to support that pointless complexity. Forbid such a setup by making sure all the vcpus have the same register width. Reported-by: Steven Price Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210524170752.1549797-1-maz@kernel.org commit e3e880bb1518eb10a4b4bb4344ed614d6856f190 Author: Zenghui Yu Date: Wed May 26 22:18:31 2021 +0800 KVM: arm64: Resolve all pending PC updates before immediate exit Commit 26778aaa134a ("KVM: arm64: Commit pending PC adjustemnts before returning to userspace") fixed the PC updating issue by forcing an explicit synchronisation of the exception state on vcpu exit to userspace. However, we forgot to take into account the case where immediate_exit is set by userspace and KVM_RUN will exit immediately. Fix it by resolving all pending PC updates before returning to userspace. Since __kvm_adjust_pc() relies on a loaded vcpu context, I moved the immediate_exit checking right after vcpu_load(). We will get some overhead if immediate_exit is true (which should hopefully be rare). Fixes: 26778aaa134a ("KVM: arm64: Commit pending PC adjustemnts before returning to userspace") Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210526141831.1662-1-yuzenghui@huawei.com Cc: stable@vger.kernel.org # 5.11 commit c0e0436cb4f6627146acdae8c77828f18db01151 Author: Til Jasper Ullrich Date: Tue May 25 17:09:52 2021 +0200 platform/x86: thinkpad_acpi: Add X1 Carbon Gen 9 second fan support The X1 Carbon Gen 9 uses two fans instead of one like the previous generation. This adds support for the second fan. It has been tested on my X1 Carbon Gen 9 (20XXS00100) and works fine. Signed-off-by: Til Jasper Ullrich Link: https://lore.kernel.org/r/20210525150950.14805-1-tju@tju.me Signed-off-by: Hans de Goede commit dbec64b11c65d74f31427e2b9d5746fbf17bf840 Author: Srinivas Kandagatla Date: Tue May 25 17:55:39 2021 +0100 gpio: wcd934x: Fix shift-out-of-bounds error bit-mask for pins 0 to 4 is BIT(0) to BIT(4) however we ended up with BIT(n - 1) which is not right, and this was caught by below usban check UBSAN: shift-out-of-bounds in drivers/gpio/gpio-wcd934x.c:34:14 Fixes: 59c324683400 ("gpio: wcd934x: Add support to wcd934x gpio controller") Signed-off-by: Srinivas Kandagatla Reviewed-by: Andy Shevchenko Reviewed-by: Bjorn Andersson Signed-off-by: Bartosz Golaszewski commit 50dbfae972cbe0e3c631e73c7c58cbc48bfc6a49 Author: Jeremy Szu Date: Thu May 20 01:03:56 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook Fury 17 G8 The HP ZBook Studio 17.3 Inch G8 is using ALC285 codec which is using 0x04 to control mute LED and 0x01 to control micmute LED. In the other hand, there is no output from right channel of speaker. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210519170357.58410-4-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit e650c1a959da49f2b873cb56564b825882c22e7a Author: Jeremy Szu Date: Thu May 20 01:03:55 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook Fury 15 G8 The HP ZBook Fury 15.6 Inch G8 is using ALC285 codec which is using 0x04 to control mute LED and 0x01 to control micmute LED. In the other hand, there is no output from right channel of speaker. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210519170357.58410-3-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit bbe183e07817a46cf8d3d7fc88093df81d23a957 Author: Jeremy Szu Date: Thu May 20 01:03:54 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook G8 The HP ZBook Studio 15.6 Inch G8 is using ALC285 codec which is using 0x04 to control mute LED and 0x01 to control micmute LED. In the other hand, there is no output from right channel of speaker. Therefore, add a quirk to make it works. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210519170357.58410-2-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit 0e68c4b11f1e66d211ad242007e9f1076a6b7709 Author: Jeremy Szu Date: Thu May 20 01:03:53 2021 +0800 ALSA: hda/realtek: fix mute/micmute LEDs for HP 855 G8 The HP EliteBook 855 G8 Notebook PC is using ALC285 codec which needs ALC285_FIXUP_HP_MUTE_LED fixup to make it works. After applying the fixup, the mute/micmute LEDs work good. Signed-off-by: Jeremy Szu Cc: Link: https://lore.kernel.org/r/20210519170357.58410-1-jeremy.szu@canonical.com Signed-off-by: Takashi Iwai commit d7c5303fbc8ac874ae3e597a5a0d3707dc0230b4 Merge: 7ac3a1c1ae515 62f3415db237b Author: Linus Torvalds Date: Wed May 26 17:44:49 2021 -1000 Merge tag 'net-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.13-rc4, including fixes from bpf, netfilter, can and wireless trees. Notably including fixes for the recently announced "FragAttacks" WiFi vulnerabilities. Rather large batch, touching some core parts of the stack, too, but nothing hair-raising. Current release - regressions: - tipc: make node link identity publish thread safe - dsa: felix: re-enable TAS guard band mode - stmmac: correct clocks enabled in stmmac_vlan_rx_kill_vid() - stmmac: fix system hang if change mac address after interface ifdown Current release - new code bugs: - mptcp: avoid OOB access in setsockopt() - bpf: Fix nested bpf_bprintf_prepare with more per-cpu buffers - ethtool: stats: fix a copy-paste error - init correct array size Previous releases - regressions: - sched: fix packet stuck problem for lockless qdisc - net: really orphan skbs tied to closing sk - mlx4: fix EEPROM dump support - bpf: fix alu32 const subreg bound tracking on bitwise operations - bpf: fix mask direction swap upon off reg sign change - bpf, offload: reorder offload callback 'prepare' in verifier - stmmac: Fix MAC WoL not working if PHY does not support WoL - packetmmap: fix only tx timestamp on request - tipc: skb_linearize the head skb when reassembling msgs Previous releases - always broken: - mac80211: address recent "FragAttacks" vulnerabilities - mac80211: do not accept/forward invalid EAPOL frames - mptcp: avoid potential error message floods - bpf, ringbuf: deny reserve of buffers larger than ringbuf to prevent out of buffer writes - bpf: forbid trampoline attach for functions with variable arguments - bpf: add deny list of functions to prevent inf recursion of tracing programs - tls splice: check SPLICE_F_NONBLOCK instead of MSG_DONTWAIT - can: isotp: prevent race between isotp_bind() and isotp_setsockopt() - netfilter: nft_set_pipapo_avx2: Add irq_fpu_usable() check, fallback to non-AVX2 version Misc: - bpf: add kconfig knob for disabling unpriv bpf by default" * tag 'net-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (172 commits) net: phy: Document phydev::dev_flags bits allocation mptcp: validate 'id' when stopping the ADD_ADDR retransmit timer mptcp: avoid error message on infinite mapping mptcp: drop unconditional pr_warn on bad opt mptcp: avoid OOB access in setsockopt() nfp: update maintainer and mailing list addresses net: mvpp2: add buffer header handling in RX bnx2x: Fix missing error code in bnx2x_iov_init_one() net: zero-initialize tc skb extension on allocation net: hns: Fix kernel-doc sctp: fix the proc_handler for sysctl encap_port sctp: add the missing setting for asoc encap_port bpf, selftests: Adjust few selftest result_unpriv outcomes bpf: No need to simulate speculative domain for immediates bpf: Fix mask direction swap upon off reg sign change bpf: Wrap aux data inside bpf_sanitize_info container bpf: Fix BPF_LSM kconfig symbol dependency selftests/bpf: Add test for l3 use of bpf_redirect_peer bpftool: Add sock_release help info for cgroup attach/prog load command net: dsa: microchip: enable phy errata workaround on 9567 ... commit a9aecef198faae3240921b707bc09b602e966fce Author: Pawel Laszczak Date: Wed May 26 08:05:27 2021 +0200 usb: cdnsp: Fix deadlock issue in cdnsp_thread_irq_handler Patch fixes the following critical issue caused by deadlock which has been detected during testing NCM class: smp: csd: Detected non-responsive CSD lock (#1) on CPU#0 smp: csd: CSD lock (#1) unresponsive. .... RIP: 0010:native_queued_spin_lock_slowpath+0x61/0x1d0 RSP: 0018:ffffbc494011cde0 EFLAGS: 00000002 RAX: 0000000000000101 RBX: ffff9ee8116b4a68 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff9ee8116b4658 RBP: ffffbc494011cde0 R08: 0000000000000001 R09: 0000000000000000 R10: ffff9ee8116b4670 R11: 0000000000000000 R12: ffff9ee8116b4658 R13: ffff9ee8116b4670 R14: 0000000000000246 R15: ffff9ee8116b4658 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f7bcc41a830 CR3: 000000007a612003 CR4: 00000000001706e0 Call Trace: do_raw_spin_lock+0xc0/0xd0 _raw_spin_lock_irqsave+0x95/0xa0 cdnsp_gadget_ep_queue.cold+0x88/0x107 [cdnsp_udc_pci] usb_ep_queue+0x35/0x110 eth_start_xmit+0x220/0x3d0 [u_ether] ncm_tx_timeout+0x34/0x40 [usb_f_ncm] ? ncm_free_inst+0x50/0x50 [usb_f_ncm] __hrtimer_run_queues+0xac/0x440 hrtimer_run_softirq+0x8c/0xb0 __do_softirq+0xcf/0x428 asm_call_irq_on_stack+0x12/0x20 do_softirq_own_stack+0x61/0x70 irq_exit_rcu+0xc1/0xd0 sysvec_apic_timer_interrupt+0x52/0xb0 asm_sysvec_apic_timer_interrupt+0x12/0x20 RIP: 0010:do_raw_spin_trylock+0x18/0x40 RSP: 0018:ffffbc494138bda8 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff9ee8116b4658 RCX: 0000000000000000 RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff9ee8116b4658 RBP: ffffbc494138bda8 R08: 0000000000000001 R09: 0000000000000000 R10: ffff9ee8116b4670 R11: 0000000000000000 R12: ffff9ee8116b4658 R13: ffff9ee8116b4670 R14: ffff9ee7b5c73d80 R15: ffff9ee8116b4000 _raw_spin_lock+0x3d/0x70 ? cdnsp_thread_irq_handler.cold+0x32/0x112c [cdnsp_udc_pci] cdnsp_thread_irq_handler.cold+0x32/0x112c [cdnsp_udc_pci] ? cdnsp_remove_request+0x1f0/0x1f0 [cdnsp_udc_pci] ? cdnsp_thread_irq_handler+0x5/0xa0 [cdnsp_udc_pci] ? irq_thread+0xa0/0x1c0 irq_thread_fn+0x28/0x60 irq_thread+0x105/0x1c0 ? __kthread_parkme+0x42/0x90 ? irq_forced_thread_fn+0x90/0x90 ? wake_threads_waitq+0x30/0x30 ? irq_thread_check_affinity+0xe0/0xe0 kthread+0x12a/0x160 ? kthread_park+0x90/0x90 ret_from_fork+0x22/0x30 The root cause of issue is spin_lock/spin_unlock instruction instead spin_lock_irqsave/spin_lock_irqrestore in cdnsp_thread_irq_handler function. Cc: stable@vger.kernel.org Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210526060527.7197-1-pawell@gli-login.cadence.com Signed-off-by: Peter Chen commit ffa99c436aa70c0c0980866523a6ae1023c96768 Merge: 6efb943b8616e 2af7a834a4354 Author: Vasily Gorbik Date: Wed May 26 23:46:34 2021 +0200 Merge tag 'vfio-ccw-20210520' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw into fixes Avoid some races in vfio-ccw request handling. * tag 'vfio-ccw-20210520' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw: vfio-ccw: Serialize FSM IDLE state with I/O completion vfio-ccw: Reset FSM state to IDLE inside FSM vfio-ccw: Check initialized flag in cp_init() Signed-off-by: Vasily Gorbik commit 62f3415db237b8d2aa9a804ff84ce2efa87df179 Author: Florian Fainelli Date: Wed May 26 11:46:17 2021 -0700 net: phy: Document phydev::dev_flags bits allocation Document the phydev::dev_flags bit allocation to allow bits 15:0 to define PHY driver specific behavior, bits 23:16 to be reserved for now, and bits 31:24 to hold generic PHY driver flags. Signed-off-by: Florian Fainelli Reviewed-by: Russell King (Oracle) Link: https://lore.kernel.org/r/20210526184617.3105012-1-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski commit 7ac3a1c1ae5152e1d18cf6df5b6c3c9847535e78 Merge: bfb819ea20ce8 562b4e91d3b22 Author: Linus Torvalds Date: Wed May 26 06:09:23 2021 -1000 Merge tag 'mtd/fixes-for-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull MTD fixes from Miquel Raynal: "MTD parsers: - Fix ofpart subpartitions parsing Raw NAND: - Fix external use of SW Hamming ECC helper (txx9ndfmc, tmio, sharpsl, ndfc, lpc32xx_slc, fsmc, cs553x)" * tag 'mtd/fixes-for-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd: parsers: ofpart: fix parsing subpartitions mtd: rawnand: txx9ndfmc: Fix external use of SW Hamming ECC helper mtd: rawnand: tmio: Fix external use of SW Hamming ECC helper mtd: rawnand: sharpsl: Fix external use of SW Hamming ECC helper mtd: rawnand: ndfc: Fix external use of SW Hamming ECC helper mtd: rawnand: lpc32xx_slc: Fix external use of SW Hamming ECC helper mtd: rawnand: fsmc: Fix external use of SW Hamming ECC helper mtd: rawnand: cs553x: Fix external use of SW Hamming ECC helper commit 9f5815315e0b93146d7b0be4d96ee2d74eeabb98 Author: Darrick J. Wong Date: Tue May 25 22:19:01 2021 -0700 xfs: add new IRC channel to MAINTAINERS Add our new OFTC channel to the MAINTAINERS list so everyone will know where to go. Ignore the XFS wikis, we have no access to them. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 3743c1723bfc62e69dbf022417720eed3f431b29 Author: Zqiang Date: Wed May 26 13:08:26 2021 +0800 io-wq: Fix UAF when wakeup wqe in hash waitqueue BUG: KASAN: use-after-free in __wake_up_common+0x637/0x650 Read of size 8 at addr ffff8880304250d8 by task iou-wrk-28796/28802 Call Trace: __dump_stack [inline] dump_stack+0x141/0x1d7 print_address_description.constprop.0.cold+0x5b/0x2c6 __kasan_report [inline] kasan_report.cold+0x7c/0xd8 __wake_up_common+0x637/0x650 __wake_up_common_lock+0xd0/0x130 io_worker_handle_work+0x9dd/0x1790 io_wqe_worker+0xb2a/0xd40 ret_from_fork+0x1f/0x30 Allocated by task 28798: kzalloc_node [inline] io_wq_create+0x3c4/0xdd0 io_init_wq_offload [inline] io_uring_alloc_task_context+0x1bf/0x6b0 __io_uring_add_task_file+0x29a/0x3c0 io_uring_add_task_file [inline] io_uring_install_fd [inline] io_uring_create [inline] io_uring_setup+0x209a/0x2bd0 do_syscall_64+0x3a/0xb0 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 28798: kfree+0x106/0x2c0 io_wq_destroy+0x182/0x380 io_wq_put [inline] io_wq_put_and_exit+0x7a/0xa0 io_uring_clean_tctx [inline] __io_uring_cancel+0x428/0x530 io_uring_files_cancel do_exit+0x299/0x2a60 do_group_exit+0x125/0x310 get_signal+0x47f/0x2150 arch_do_signal_or_restart+0x2a8/0x1eb0 handle_signal_work[inline] exit_to_user_mode_loop [inline] exit_to_user_mode_prepare+0x171/0x280 __syscall_exit_to_user_mode_work [inline] syscall_exit_to_user_mode+0x19/0x60 do_syscall_64+0x47/0xb0 entry_SYSCALL_64_after_hwframe There are the following scenarios, hash waitqueue is shared by io-wq1 and io-wq2. (note: wqe is worker) io-wq1:worker2 | locks bit1 io-wq2:worker1 | waits bit1 io-wq1:worker3 | waits bit1 io-wq1:worker2 | completes all wqe bit1 work items io-wq1:worker2 | drop bit1, exit io-wq2:worker1 | locks bit1 io-wq1:worker3 | can not locks bit1, waits bit1 and exit io-wq1 | exit and free io-wq1 io-wq2:worker1 | drops bit1 io-wq1:worker3 | be waked up, even though wqe is freed After all iou-wrk belonging to io-wq1 have exited, remove wqe form hash waitqueue, it is guaranteed that there will be no more wqe belonging to io-wq1 in the hash waitqueue. Reported-by: syzbot+6cb11ade52aa17095297@syzkaller.appspotmail.com Signed-off-by: Zqiang Link: https://lore.kernel.org/r/20210526050826.30500-1-qiang.zhang@windriver.com Signed-off-by: Jens Axboe commit 094c271addc3e149e09474934c49a6b98f2d087f Merge: c0c8a8397fa8a cc14626791495 Author: Jens Axboe Date: Wed May 26 08:47:51 2021 -0600 Merge branch 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-5.13 Pull MD fix from Song. * 'md-fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid5: remove an incorrect assert in in_chunk_boundary commit aaeadd7075dc9e184bc7876e9dd7b3bada771df2 Author: Sagi Grimberg Date: Tue May 25 08:49:05 2021 -0700 nvmet: fix false keep-alive timeout when a controller is torn down Controller teardown flow may take some time in case it has many I/O queues, and the host may not send us keep-alive during this period. Hence reset the traffic based keep-alive timer so we don't trigger a controller teardown as a result of a keep-alive expiration. Reported-by: Yi Zhang Signed-off-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Hannes Reinecke Tested-by: Yi Zhang Signed-off-by: Christoph Hellwig commit 25df1acd2d36eb72b14c3d00f6b861b1e00b3aab Author: Hou Pu Date: Thu May 20 19:30:45 2021 +0800 nvmet-tcp: fix inline data size comparison in nvmet_tcp_queue_response Using "<=" instead "<" to compare inline data size. Fixes: bdaf13279192 ("nvmet-tcp: fix a segmentation fault during io parsing error") Signed-off-by: Hou Pu Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 042a3eaad6daeabcfaf163aa44da8ea3cf8b5496 Author: Sagi Grimberg Date: Fri May 21 14:51:15 2021 -0700 nvme-tcp: remove incorrect Kconfig dep in BLK_DEV_NVME We need to select NVME_CORE. Signed-off-by: Sagi Grimberg Reviewed-by: Max Gurtovoy Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 75ea44e356b5de8c817f821c9dd68ae329e82add Author: Felix Fietkau Date: Tue May 25 18:07:58 2021 +0200 perf jevents: Fix getting maximum number of fds On some hosts, rlim.rlim_max can be returned as RLIM_INFINITY. By casting it to int, it is interpreted as -1, which will cause get_maxfds to return 0, causing "Invalid argument" errors in nftw() calls. Fix this by casting the second argument of min() to rlim_t instead. Fixes: 80eeb67fe577 ("perf jevents: Program to convert JSON file") Signed-off-by: Felix Fietkau Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Link: http://lore.kernel.org/lkml/20210525160758.97829-1-nbd@nbd.name Signed-off-by: Arnaldo Carvalho de Melo commit 35f819d218035ddfbc71e7cf62a4849231701e58 Author: xinhui pan Date: Fri May 21 16:31:12 2021 +0800 drm/ttm: Skip swapout if ttm object is not populated Swapping a ttm object which has no backend pages makes no sense. Suggested-by: Christian König Signed-off-by: xinhui pan Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210521083112.33176-1-xinhui.pan@amd.com CC: stable@kernel.org Signed-off-by: Christian König commit bae989c4bc53f861cc1b706aab0194703e9907a8 Author: Maciej Falkowski Date: Thu Apr 1 18:04:34 2021 +0200 ARM: OMAP1: ams-delta: remove unused function ams_delta_camera_power The ams_delta_camera_power() function is unused as reports Clang compilation with omap1_defconfig on linux-next: arch/arm/mach-omap1/board-ams-delta.c:462:12: warning: unused function 'ams_delta_camera_power' [-Wunused-function] static int ams_delta_camera_power(struct device *dev, int power) ^ 1 warning generated. The soc_camera support was dropped without removing ams_delta_camera_power() function, making it unused. Fixes: ce548396a433 ("media: mach-omap1: board-ams-delta.c: remove soc_camera dependencies") Signed-off-by: Maciej Falkowski Reviewed-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Tony Lindgren Link: https://github.com/ClangBuiltLinux/linux/issues/1326 commit 3202f482417cefc0f8fad5aaba6eea00f68141a0 Author: Srinivas Pandruvada Date: Thu Apr 15 11:52:32 2021 -0700 HID: hid-sensor-custom: Process failure of sensor_hub_set_feature() When user modifies a custom feature value and sensor_hub_set_feature() fails, return error. Reported-by: Abaci Robot Signed-off-by: Srinivas Pandruvada Signed-off-by: Jiri Kosina commit 70536bf4eb07ed5d2816ccb274e5e6b41b95a437 Author: Trond Myklebust Date: Tue May 25 11:26:35 2021 -0400 NFS: Clean up reset of the mirror accounting variables Now that nfs_pageio_do_add_request() resets the pg_count, we don't need these other inlined resets. Signed-off-by: Trond Myklebust commit 0d0ea309357dea0d85a82815f02157eb7fcda39f Author: Trond Myklebust Date: Tue May 25 10:40:12 2021 -0400 NFS: Don't corrupt the value of pg_bytes_written in nfs_do_recoalesce() The value of mirror->pg_bytes_written should only be updated after a successful attempt to flush out the requests on the list. Fixes: a7d42ddb3099 ("nfs: add mirroring support to pgio layer") Signed-off-by: Trond Myklebust commit 56517ab958b7c11030e626250c00b9b1a24b41eb Author: Trond Myklebust Date: Tue May 25 10:23:05 2021 -0400 NFS: Fix an Oopsable condition in __nfs_pageio_add_request() Ensure that nfs_pageio_error_cleanup() resets the mirror array contents, so that the structure reflects the fact that it is now empty. Also change the test in nfs_pageio_do_add_request() to be more robust by checking whether or not the list is empty rather than relying on the value of pg_count. Fixes: a7d42ddb3099 ("nfs: add mirroring support to pgio layer") Signed-off-by: Trond Myklebust commit e86be3a04bc4aeaf12f93af35f08f8d4385bcd98 Author: Trond Myklebust Date: Tue May 25 18:43:38 2021 -0400 SUNRPC: More fixes for backlog congestion Ensure that we fix the XPRT_CONGESTED starvation issue for RDMA as well as socket based transports. Ensure we always initialise the request after waking up from the backlog list. Fixes: e877a88d1f06 ("SUNRPC in case of backlog, hand free slots directly to waiting task") Signed-off-by: Trond Myklebust commit 17a91051fe63b40ec651b80097c9fff5b093fdc5 Author: Pavel Begunkov Date: Sun May 23 15:48:39 2021 +0100 io_uring/io-wq: close io-wq full-stop gap There is an old problem with io-wq cancellation where requests should be killed and are in io-wq but are not discoverable, e.g. in @next_hashed or @linked vars of io_worker_handle_work(). It adds some unreliability to individual request canellation, but also may potentially get __io_uring_cancel() stuck. For instance: 1) An __io_uring_cancel()'s cancellation round have not found any request but there are some as desribed. 2) __io_uring_cancel() goes to sleep 3) Then workers wake up and try to execute those hidden requests that happen to be unbound. As we already cancel all requests of io-wq there, set IO_WQ_BIT_EXIT in advance, so preventing 3) from executing unbound requests. The workers will initially break looping because of getting a signal as they are threads of the dying/exec()'ing user task. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/abfcf8c54cb9e8f7bfbad7e9a0cc5433cc70bdc2.1621781238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit cc146267914950b12c2bdee68c1e9e5453c81cde Author: Christoph Hellwig Date: Wed May 19 08:22:15 2021 +0200 md/raid5: remove an incorrect assert in in_chunk_boundary Now that the original bdev is stored in the bio this assert is incorrect and will trigger for any partitioned raid5 device. Reported-by: Florian Dazinger Tested-by: Florian Dazinger Cc: stable@vger.kernel.org # 5.12 Fixes: 309dca309fc3 ("block: store a block_device pointer in struct bio"), Reviewed-by: Guoqing Jiang Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu commit 85aabbd7b315c65673084b6227bee92c00405239 Author: Jean-Philippe Brucker Date: Mon May 10 19:31:30 2021 +0200 PCI/MSI: Fix MSIs for generic hosts that use device-tree's "msi-map" Since commit 9ec37efb8783 ("PCI/MSI: Make pci_host_common_probe() declare its reliance on MSI domains"), platforms that rely on the "msi-map" device-tree property don't get MSIs anymore. On the Arm Fast Model for example [1], the host bridge doesn't have a "msi-parent" property since it doesn't itself generate MSIs, and so doesn't get a MSI domain. It has an "msi-map" property instead to describe MSI controllers of child devices. As a result, due to the new msi_domain check in pci_register_host_bridge(), the whole bus gets PCI_BUS_FLAGS_NO_MSI. Check whether the root complex has an "msi-map" property before giving up on MSIs. [1] arch/arm64/boot/dts/arm/fvp-base-revc.dts Fixes: 9ec37efb8783 ("PCI/MSI: Make pci_host_common_probe() declare its reliance on MSI domains") Link: https://lore.kernel.org/r/20210510173129.750496-1-jean-philippe@linaro.org Signed-off-by: Jean-Philippe Brucker Signed-off-by: Bjorn Helgaas Acked-by: Marc Zyngier commit f5d287126f63f76bcf50cf0b085199cc34f07d74 Merge: 6dfa87b492c03 1bad6fd52be4c Author: David S. Miller Date: Tue May 25 15:59:24 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-05-26 The following pull-request contains BPF updates for your *net* tree. We've added 14 non-merge commits during the last 14 day(s) which contain a total of 17 files changed, 513 insertions(+), 231 deletions(-). The main changes are: 1) Fix bpf_skb_change_head() helper to reset mac_len, from Jussi Maki. 2) Fix masking direction swap upon off-reg sign change, from Daniel Borkmann. 3) Fix BPF offloads in verifier by reordering driver callback, from Yinjun Zhang. 4) BPF selftest for ringbuf mmap ro/rw restrictions, from Andrii Nakryiko. 5) Follow-up fixes to nested bprintf per-cpu buffers, from Florent Revest. 6) Fix bpftool sock_release attach point help info, from Liu Jian. ==================== Signed-off-by: David S. Miller commit 6dfa87b492c039c3c17e70ca0a400d9ee36f34a6 Merge: bab09fe2f6520 d58300c3185b7 Author: David S. Miller Date: Tue May 25 15:56:20 2021 -0700 Merge branch 'mptcp-fixes' Mat Martineau says: ==================== MPTCP fixes Here are a few fixes for the -net tree. Patch 1 fixes an attempt to access a tcp-specific field that does not exist in mptcp sockets. Patches 2 and 3 remove warning/error log output that could be flooded. Patch 4 performs more validation on address advertisement echo packets to improve RFC 8684 compliance. ==================== Signed-off-by: David S. Miller commit d58300c3185b78ab910092488126b97f0abe3ae2 Author: Davide Caratti Date: Tue May 25 14:23:13 2021 -0700 mptcp: validate 'id' when stopping the ADD_ADDR retransmit timer when Linux receives an echo-ed ADD_ADDR, it checks the IP address against the list of "announced" addresses. In case of a positive match, the timer that handles retransmissions is stopped regardless of the 'Address Id' in the received packet: this behaviour does not comply with RFC8684 3.4.1. Fix it by validating the 'Address Id' in received echo-ed ADD_ADDRs. Tested using packetdrill, with the following captured output: unpatched kernel: Out <...> Flags [.], ack 1, win 256, options [mptcp add-addr v1 id 1 198.51.100.2 hmac 0xfd2e62517888fe29,mptcp dss ack 3007449509], length 0 In <...> Flags [.], ack 1, win 257, options [mptcp add-addr v1-echo id 1 1.2.3.4,mptcp dss ack 3013740213], length 0 Out <...> Flags [.], ack 1, win 256, options [mptcp add-addr v1 id 1 198.51.100.2 hmac 0xfd2e62517888fe29,mptcp dss ack 3007449509], length 0 In <...> Flags [.], ack 1, win 257, options [mptcp add-addr v1-echo id 90 198.51.100.2,mptcp dss ack 3013740213], length 0 ^^^ retransmission is stopped here, but 'Address Id' is 90 patched kernel: Out <...> Flags [.], ack 1, win 256, options [mptcp add-addr v1 id 1 198.51.100.2 hmac 0x1cf372d59e05f4b8,mptcp dss ack 3007449509], length 0 In <...> Flags [.], ack 1, win 257, options [mptcp add-addr v1-echo id 1 1.2.3.4,mptcp dss ack 1672384568], length 0 Out <...> Flags [.], ack 1, win 256, options [mptcp add-addr v1 id 1 198.51.100.2 hmac 0x1cf372d59e05f4b8,mptcp dss ack 3007449509], length 0 In <...> Flags [.], ack 1, win 257, options [mptcp add-addr v1-echo id 90 198.51.100.2,mptcp dss ack 1672384568], length 0 Out <...> Flags [.], ack 1, win 256, options [mptcp add-addr v1 id 1 198.51.100.2 hmac 0x1cf372d59e05f4b8,mptcp dss ack 3007449509], length 0 In <...> Flags [.], ack 1, win 257, options [mptcp add-addr v1-echo id 1 198.51.100.2,mptcp dss ack 1672384568], length 0 ^^^ retransmission is stopped here, only when both 'Address Id' and 'IP Address' match Fixes: 00cfd77b9063 ("mptcp: retransmit ADD_ADDR when timeout") Signed-off-by: Davide Caratti Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 3ed0a585bfadb6bd7080f11184adbc9edcce7dbc Author: Paolo Abeni Date: Tue May 25 14:23:12 2021 -0700 mptcp: avoid error message on infinite mapping Another left-over. Avoid flooding dmesg with useless text, we already have a MIB for that event. Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path") Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 3812ce895047afdb78dc750a236515416e0ccded Author: Paolo Abeni Date: Tue May 25 14:23:11 2021 -0700 mptcp: drop unconditional pr_warn on bad opt This is a left-over of early day. A malicious peer can flood the kernel logs with useless messages, just drop it. Fixes: f296234c98a8 ("mptcp: Add handling of incoming MP_JOIN requests") Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 20b5759f21cf53a0e03031bd3fe539e332b13568 Author: Paolo Abeni Date: Tue May 25 14:23:10 2021 -0700 mptcp: avoid OOB access in setsockopt() We can't use tcp_set_congestion_control() on an mptcp socket, as such function can end-up accessing a tcp-specific field - prior_ssthresh - causing an OOB access. To allow propagating the correct ca algo on subflow, cache the ca name at initialization time. Additionally avoid overriding the user-selected CA (if any) at clone time. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/182 Fixes: aa1fbd94e5c7 ("mptcp: sockopt: add TCP_CONGESTION and TCP_INFO") Acked-by: Florian Westphal Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit bab09fe2f65200a67209a360988bc24f3de4b95d Author: Simon Horman Date: Tue May 25 17:47:04 2021 +0200 nfp: update maintainer and mailing list addresses Some of Netronome's activities and people have moved over to Corigine, including NFP driver maintenance and myself. Signed-off-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 17f9c1b63cdd4439523cfcdf5683e5070b911f24 Author: Stefan Chulski Date: Tue May 25 19:04:41 2021 +0300 net: mvpp2: add buffer header handling in RX If Link Partner sends frames larger than RX buffer size, MAC mark it as oversize but still would pass it to the Packet Processor. In this scenario, Packet Processor scatter frame between multiple buffers, but only a single buffer would be returned to the Buffer Manager pool and it would not refill the poll. Patch add handling of oversize error with buffer header handling, so all buffers would be returned to the Buffer Manager pool. Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Reported-by: Russell King Signed-off-by: Stefan Chulski Signed-off-by: David S. Miller commit 65161c35554f7135e6656b3df1ce2c500ca0bdcf Author: Jiapeng Chong Date: Tue May 25 19:00:12 2021 +0800 bnx2x: Fix missing error code in bnx2x_iov_init_one() Eliminate the follow smatch warning: drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1227 bnx2x_iov_init_one() warn: missing error code 'err'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 9453d45ecb6c2199d72e73c993e9d98677a2801b Author: Vlad Buslov Date: Tue May 25 16:21:52 2021 +0300 net: zero-initialize tc skb extension on allocation Function skb_ext_add() doesn't initialize created skb extension with any value and leaves it up to the user. However, since extension of type TC_SKB_EXT originally contained only single value tc_skb_ext->chain its users used to just assign the chain value without setting whole extension memory to zero first. This assumption changed when TC_SKB_EXT extension was extended with additional fields but not all users were updated to initialize the new fields which leads to use of uninitialized memory afterwards. UBSAN log: [ 778.299821] UBSAN: invalid-load in net/openvswitch/flow.c:899:28 [ 778.301495] load of value 107 is not a valid value for type '_Bool' [ 778.303215] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.12.0-rc7+ #2 [ 778.304933] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 [ 778.307901] Call Trace: [ 778.308680] [ 778.309358] dump_stack+0xbb/0x107 [ 778.310307] ubsan_epilogue+0x5/0x40 [ 778.311167] __ubsan_handle_load_invalid_value.cold+0x43/0x48 [ 778.312454] ? memset+0x20/0x40 [ 778.313230] ovs_flow_key_extract.cold+0xf/0x14 [openvswitch] [ 778.314532] ovs_vport_receive+0x19e/0x2e0 [openvswitch] [ 778.315749] ? ovs_vport_find_upcall_portid+0x330/0x330 [openvswitch] [ 778.317188] ? create_prof_cpu_mask+0x20/0x20 [ 778.318220] ? arch_stack_walk+0x82/0xf0 [ 778.319153] ? secondary_startup_64_no_verify+0xb0/0xbb [ 778.320399] ? stack_trace_save+0x91/0xc0 [ 778.321362] ? stack_trace_consume_entry+0x160/0x160 [ 778.322517] ? lock_release+0x52e/0x760 [ 778.323444] netdev_frame_hook+0x323/0x610 [openvswitch] [ 778.324668] ? ovs_netdev_get_vport+0xe0/0xe0 [openvswitch] [ 778.325950] __netif_receive_skb_core+0x771/0x2db0 [ 778.327067] ? lock_downgrade+0x6e0/0x6f0 [ 778.328021] ? lock_acquire+0x565/0x720 [ 778.328940] ? generic_xdp_tx+0x4f0/0x4f0 [ 778.329902] ? inet_gro_receive+0x2a7/0x10a0 [ 778.330914] ? lock_downgrade+0x6f0/0x6f0 [ 778.331867] ? udp4_gro_receive+0x4c4/0x13e0 [ 778.332876] ? lock_release+0x52e/0x760 [ 778.333808] ? dev_gro_receive+0xcc8/0x2380 [ 778.334810] ? lock_downgrade+0x6f0/0x6f0 [ 778.335769] __netif_receive_skb_list_core+0x295/0x820 [ 778.336955] ? process_backlog+0x780/0x780 [ 778.337941] ? mlx5e_rep_tc_netdevice_event_unregister+0x20/0x20 [mlx5_core] [ 778.339613] ? seqcount_lockdep_reader_access.constprop.0+0xa7/0xc0 [ 778.341033] ? kvm_clock_get_cycles+0x14/0x20 [ 778.342072] netif_receive_skb_list_internal+0x5f5/0xcb0 [ 778.343288] ? __kasan_kmalloc+0x7a/0x90 [ 778.344234] ? mlx5e_handle_rx_cqe_mpwrq+0x9e0/0x9e0 [mlx5_core] [ 778.345676] ? mlx5e_xmit_xdp_frame_mpwqe+0x14d0/0x14d0 [mlx5_core] [ 778.347140] ? __netif_receive_skb_list_core+0x820/0x820 [ 778.348351] ? mlx5e_post_rx_mpwqes+0xa6/0x25d0 [mlx5_core] [ 778.349688] ? napi_gro_flush+0x26c/0x3c0 [ 778.350641] napi_complete_done+0x188/0x6b0 [ 778.351627] mlx5e_napi_poll+0x373/0x1b80 [mlx5_core] [ 778.352853] __napi_poll+0x9f/0x510 [ 778.353704] ? mlx5_flow_namespace_set_mode+0x260/0x260 [mlx5_core] [ 778.355158] net_rx_action+0x34c/0xa40 [ 778.356060] ? napi_threaded_poll+0x3d0/0x3d0 [ 778.357083] ? sched_clock_cpu+0x18/0x190 [ 778.358041] ? __common_interrupt+0x8e/0x1a0 [ 778.359045] __do_softirq+0x1ce/0x984 [ 778.359938] __irq_exit_rcu+0x137/0x1d0 [ 778.360865] irq_exit_rcu+0xa/0x20 [ 778.361708] common_interrupt+0x80/0xa0 [ 778.362640] [ 778.363212] asm_common_interrupt+0x1e/0x40 [ 778.364204] RIP: 0010:native_safe_halt+0xe/0x10 [ 778.365273] Code: 4f ff ff ff 4c 89 e7 e8 50 3f 40 fe e9 dc fe ff ff 48 89 df e8 43 3f 40 fe eb 90 cc e9 07 00 00 00 0f 00 2d 74 05 62 00 fb f4 90 e9 07 00 00 00 0f 00 2d 64 05 62 00 f4 c3 cc cc 0f 1f 44 00 [ 778.369355] RSP: 0018:ffffffff84407e48 EFLAGS: 00000246 [ 778.370570] RAX: ffff88842de46a80 RBX: ffffffff84425840 RCX: ffffffff83418468 [ 778.372143] RDX: 000000000026f1da RSI: 0000000000000004 RDI: ffffffff8343af5e [ 778.373722] RBP: fffffbfff0884b08 R08: 0000000000000000 R09: ffff88842de46bcb [ 778.375292] R10: ffffed1085bc8d79 R11: 0000000000000001 R12: 0000000000000000 [ 778.376860] R13: ffffffff851124a0 R14: 0000000000000000 R15: dffffc0000000000 [ 778.378491] ? rcu_eqs_enter.constprop.0+0xb8/0xe0 [ 778.379606] ? default_idle_call+0x5e/0xe0 [ 778.380578] default_idle+0xa/0x10 [ 778.381406] default_idle_call+0x96/0xe0 [ 778.382350] do_idle+0x3d4/0x550 [ 778.383153] ? arch_cpu_idle_exit+0x40/0x40 [ 778.384143] cpu_startup_entry+0x19/0x20 [ 778.385078] start_kernel+0x3c7/0x3e5 [ 778.385978] secondary_startup_64_no_verify+0xb0/0xbb Fix the issue by providing new function tc_skb_ext_alloc() that allocates tc skb extension and initializes its memory to 0 before returning it to the caller. Change all existing users to use new API instead of calling skb_ext_add() directly. Fixes: 038ebb1a713d ("net/sched: act_ct: fix miss set mru for ovs after defrag in act_ct") Fixes: d29334c15d33 ("net/sched: act_api: fix miss set post_ct for ovs after do conntrack in act_ct") Signed-off-by: Vlad Buslov Acked-by: Cong Wang Signed-off-by: David S. Miller commit c1cf1afd8b0f2f1b077df84e90497c07094406fc Author: Yang Li Date: Tue May 25 18:52:47 2021 +0800 net: hns: Fix kernel-doc Fix function name in hns_ethtool.c kernel-doc comment to remove these warnings found by clang_w1. drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:202: warning: expecting prototype for hns_nic_set_link_settings(). Prototype was for hns_nic_set_link_ksettings() instead. drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:837: warning: expecting prototype for get_ethtool_stats(). Prototype was for hns_get_ethtool_stats() instead. drivers/net/ethernet/hisilicon/hns/hns_ethtool.c:894: warning: expecting prototype for get_strings(). Prototype was for hns_get_strings() instead. Reported-by: Abaci Robot Fixes: 'commit 262b38cdb3e4 ("net: ethernet: hisilicon: hns: use phydev from struct net_device")' Signed-off-by: Yang Li Signed-off-by: David S. Miller commit b2540cdce6e22ecf3de54daf5129cc37951348cc Author: Xin Long Date: Mon May 24 22:49:42 2021 -0400 sctp: fix the proc_handler for sysctl encap_port proc_dointvec() cannot do min and max check for setting a value when extra1/extra2 is set, so change it to proc_dointvec_minmax() for sysctl encap_port. Fixes: e8a3001c2120 ("sctp: add encap_port for netns sock asoc and transport") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 297739bd73f6e49d80bac4bfd27f3598b798c0d4 Author: Xin Long Date: Mon May 24 22:49:24 2021 -0400 sctp: add the missing setting for asoc encap_port This patch is to add the missing setting back for asoc encap_port. Fixes: 8dba29603b5c ("sctp: add SCTP_REMOTE_UDP_ENCAPS_PORT sockopt") Signed-off-by: Xin Long Signed-off-by: David S. Miller commit bfb819ea20ce8bbeeba17e1a6418bf8bda91fc28 Author: Kees Cook Date: Tue May 25 12:37:35 2021 -0700 proc: Check /proc/$pid/attr/ writes against file opener Fix another "confused deputy" weakness[1]. Writes to /proc/$pid/attr/ files need to check the opener credentials, since these fds do not transition state across execve(). Without this, it is possible to trick another process (which may have different credentials) to write to its own /proc/$pid/attr/ files, leading to unexpected and possibly exploitable behaviors. [1] https://www.kernel.org/doc/html/latest/security/credentials.html?highlight=confused#open-file-credentials Fixes: 1da177e4c3f41 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Kees Cook Signed-off-by: Linus Torvalds commit 7e768532b2396bcb7fbf6f82384b85c0f1d2f197 Author: Mikulas Patocka Date: Tue May 25 13:17:19 2021 -0400 dm snapshot: properly fix a crash when an origin has no snapshots If an origin target has no snapshots, o->split_boundary is set to 0. This causes BUG_ON(sectors <= 0) in block/bio.c:bio_split(). Fix this by initializing chunk_size, and in turn split_boundary, to rounddown_pow_of_two(UINT_MAX) -- the largest power of two that fits into "unsigned" type. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit f16dba5dc6f094041ab8c356e1e3a48ee0e3c8cd Author: Mikulas Patocka Date: Tue May 25 13:16:21 2021 -0400 dm snapshot: revert "fix a crash when an origin has no snapshots" Commit 7ee06ddc4038f936b0d4459d37a7d4d844fb03db ("dm snapshot: fix a crash when an origin has no snapshots") introduced a regression in snapshot merging - causing the lvm2 test lvcreate-cache-snapshot.sh got stuck in an infinite loop. Even though commit 7ee06ddc4038f936b0d4459d37a7d4d844fb03db was marked for stable@ the stable team was notified to _not_ backport it. Fixes: 7ee06ddc4038 ("dm snapshot: fix a crash when an origin has no snapshots") Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 0c1f3193b1cdd21e7182f97dc9bca7d284d18a15 Author: John Keeping Date: Wed May 12 12:14:21 2021 +0100 dm verity: fix require_signatures module_param permissions The third parameter of module_param() is permissions for the sysfs node but it looks like it is being used as the initial value of the parameter here. In fact, false here equates to omitting the file from sysfs and does not affect the value of require_signatures. Making the parameter writable is not simple because going from false->true is fine but it should not be possible to remove the requirement to verify a signature. But it can be useful to inspect the value of this parameter from userspace, so change the permissions to make a read-only file in sysfs. Signed-off-by: John Keeping Signed-off-by: Mike Snitzer commit 1bad6fd52be4ce12d207e2820ceb0f29ab31fc53 Author: Daniel Borkmann Date: Tue May 4 08:58:25 2021 +0000 bpf, selftests: Adjust few selftest result_unpriv outcomes Given we don't need to simulate the speculative domain for registers with immediates anymore since the verifier uses direct imm-based rewrites instead of having to mask, we can also lift a few cases that were previously rejected. Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov commit a7036191277f9fa68d92f2071ddc38c09b1e5ee5 Author: Daniel Borkmann Date: Tue May 4 08:58:25 2021 +0000 bpf: No need to simulate speculative domain for immediates In 801c6058d14a ("bpf: Fix leakage of uninitialized bpf stack under speculation") we replaced masking logic with direct loads of immediates if the register is a known constant. Given in this case we do not apply any masking, there is also no reason for the operation to be truncated under the speculative domain. Therefore, there is also zero reason for the verifier to branch-off and simulate this case, it only needs to do it for unknown but bounded scalars. As a side-effect, this also enables few test cases that were previously rejected due to simulation under zero truncation. Signed-off-by: Daniel Borkmann Reviewed-by: Piotr Krysiuk Acked-by: Alexei Starovoitov commit bb01a1bba579b4b1c5566af24d95f1767859771e Author: Daniel Borkmann Date: Fri May 21 10:19:22 2021 +0000 bpf: Fix mask direction swap upon off reg sign change Masking direction as indicated via mask_to_left is considered to be calculated once and then used to derive pointer limits. Thus, this needs to be placed into bpf_sanitize_info instead so we can pass it to sanitize_ptr_alu() call after the pointer move. Piotr noticed a corner case where the off reg causes masking direction change which then results in an incorrect final aux->alu_limit. Fixes: 7fedb63a8307 ("bpf: Tighten speculative pointer arithmetic mask") Reported-by: Piotr Krysiuk Signed-off-by: Daniel Borkmann Reviewed-by: Piotr Krysiuk Acked-by: Alexei Starovoitov commit 3d0220f6861d713213b015b582e9f21e5b28d2e0 Author: Daniel Borkmann Date: Fri May 21 10:17:36 2021 +0000 bpf: Wrap aux data inside bpf_sanitize_info container Add a container structure struct bpf_sanitize_info which holds the current aux info, and update call-sites to sanitize_ptr_alu() to pass it in. This is needed for passing in additional state later on. Signed-off-by: Daniel Borkmann Reviewed-by: Piotr Krysiuk Acked-by: Alexei Starovoitov commit c4740e293c93c747e65d53d9aacc2ba8521d1489 Author: Geert Uytterhoeven Date: Thu May 6 13:15:40 2021 +0200 i2c: sh_mobile: Use new clock calculation formulas for RZ/G2E When switching the Gen3 SoCs to the new clock calculation formulas, the match entry for RZ/G2E added in commit 51243b73455f2d12 ("i2c: sh_mobile: Add support for r8a774c0 (RZ/G2E)") was forgotten. Fixes: e8a27567509b2439 ("i2c: sh_mobile: use new clock calculation formulas for Gen3") Signed-off-by: Geert Uytterhoeven Reviewed-by: Fabrizio Castro Signed-off-by: Wolfram Sang commit 52b806e8d6b3c06d5f8415f82d7353695acb2f00 Author: Geert Uytterhoeven Date: Tue May 4 11:06:32 2021 +0200 i2c: I2C_HISI should depend on ACPI The HiSilicon Kunpeng I2C controller driver relies on ACPI to probe for its presence. Hence add a dependency on ACPI, to prevent asking the user about this driver when configuring a kernel without ACPI firmware support. Fixes: d62fbdb99a85730a ("i2c: add support for HiSilicon I2C controller") Signed-off-by: Geert Uytterhoeven Acked-by: Yicong Yang Signed-off-by: Wolfram Sang commit 9dd45bbad947f7cc4f3d4eff7fc02a7e3804e47b Author: Geert Uytterhoeven Date: Mon May 3 09:02:20 2021 +0200 i2c: icy: Remove unused variable new_fwnode in icy_probe() The last user of new_fwnode was removed, leading to: drivers/i2c/busses/i2c-icy.c: In function ‘icy_probe’: drivers/i2c/busses/i2c-icy.c:126:24: warning: unused variable ‘new_fwnode’ [-Wunused-variable] 126 | struct fwnode_handle *new_fwnode; | ^~~~~~~~~~ Fixes: dd7a37102b79ae55 ("i2c: icy: Constify the software node") Signed-off-by: Geert Uytterhoeven Reviewed-by: Max Staudt Signed-off-by: Wolfram Sang commit d4b250562fb89ba6f94156b8bea12b8829cfa9a6 Author: Colin Ian King Date: Sun Nov 3 21:22:04 2019 +0000 i2c: qcom-geni: fix spelling mistake "unepxected" -> "unexpected" There is a spelling mistake in an error message string, fix it. Signed-off-by: Colin Ian King Reviewed-by: Akash Asthana Signed-off-by: Wolfram Sang commit 5c9d706f61336d9f7f285df64c734af778c70f39 Author: Daniel Borkmann Date: Tue May 25 20:35:29 2021 +0200 bpf: Fix BPF_LSM kconfig symbol dependency Similarly as 6bdacdb48e94 ("bpf: Fix BPF_JIT kconfig symbol dependency") we need to detangle the hard BPF_LSM dependency on NET. This was previously implicit by its dependency on BPF_JIT which itself was dependent on NET (but without any actual/real hard dependency code-wise). Given the latter was lifted, so should be the former as BPF_LSMs could well exist on net-less systems. This therefore also fixes a randconfig build error recently reported by Randy: ld: kernel/bpf/bpf_lsm.o: in function `bpf_lsm_func_proto': bpf_lsm.c:(.text+0x1a0): undefined reference to `bpf_sk_storage_get_proto' ld: bpf_lsm.c:(.text+0x1b8): undefined reference to `bpf_sk_storage_delete_proto' [...] Fixes: b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf with core options") Reported-by: Randy Dunlap Signed-off-by: Daniel Borkmann Acked-by: Randy Dunlap Tested-by: Randy Dunlap commit c0c8a8397fa8a74d04915f4d3d28cb4a5d401427 Author: Stefan Haberland Date: Tue May 25 14:50:06 2021 +0200 s390/dasd: add missing discipline function Fix crash with illegal operation exception in dasd_device_tasklet. Commit b72949328869 ("s390/dasd: Prepare for additional path event handling") renamed the verify_path function for ECKD but not for FBA and DIAG. This leads to a panic when the path verification function is called for a FBA or DIAG device. Fix by defining a wrapper function for dasd_generic_verify_path(). Fixes: b72949328869 ("s390/dasd: Prepare for additional path event handling") Cc: #5.11 Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Reviewed-by: Cornelia Huck Link: https://lore.kernel.org/r/20210525125006.157531-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit ad9f25d338605d26acedcaf3ba5fab5ca26f1c10 Merge: b2db6c35ba986 b71c791254ff5 Author: Linus Torvalds Date: Tue May 25 07:31:49 2021 -1000 Merge tag 'netfs-lib-fixes-20200525' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull netfs fixes from David Howells: "A couple of fixes to the new netfs lib: - Pass the AOP flags through from netfs_write_begin() into grab_cache_page_write_begin(). - Automatically enable in Kconfig netfs lib rather than presenting an option for manual enablement" * tag 'netfs-lib-fixes-20200525' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: netfs: Make CONFIG_NETFS_SUPPORT auto-selected rather than manual netfs: Pass flags through to grab_cache_page_write_begin() commit b2db6c35ba986ebe1ddd6b65f21a810346299d7f Author: Gustavo A. R. Silva Date: Tue May 25 15:40:22 2021 +0100 afs: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple fallthrough pseudo-keywords in places where the code is intended to fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David Howells Reviewed-by: Jeffrey Altman cc: linux-afs@lists.infradead.org cc: linux-hardening@vger.kernel.org Link: https://lore.kernel.org/r/51150b54e0b0431a2c401cd54f2c4e7f50e94601.1605896059.git.gustavoars@kernel.org/ # v1 Link: https://lore.kernel.org/r/20210420211615.GA51432@embeddedor/ # v2 Signed-off-by: Linus Torvalds commit 6fd5fb63820a9a1146aba0bba2fdbc1db4b903e7 Author: Jussi Maki Date: Tue May 25 10:29:55 2021 +0000 selftests/bpf: Add test for l3 use of bpf_redirect_peer Add a test case for using bpf_skb_change_head() in combination with bpf_redirect_peer() to redirect a packet from a L3 device to veth and back. The test uses a BPF program that adds L2 headers to the packet coming from a L3 device and then calls bpf_redirect_peer() to redirect the packet to a veth device. The test fails as skb->mac_len is not set properly and thus the ethernet headers are not properly skb_pull'd in cls_bpf_classify(), causing tcp_v4_rcv() to point the TCP header into middle of the IP header. Signed-off-by: Jussi Maki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210525102955.2811090-1-joamaki@gmail.com commit 29c8f40b54a45dd23971e2bc395697731bcffbe1 Author: Peter Ujfalusi Date: Mon May 24 23:37:26 2021 +0300 ALSA: hda/realtek: Chain in pop reduction fixup for ThinkStation P340 Lenovo ThinkStation P340 uses ALC623 codec (SSID 17aa:1048) and it produces bug plock/pop noise over line out (green jack on the back) which can be fixed by applying ALC269_FIXUP_NO_SHUTUP tot he machine. Convert the existing entry for the same SSID to chain to apply this fixup as well. Suggested-by: Takashi Iwai Signed-off-by: Peter Ujfalusi Cc: Link: https://lore.kernel.org/r/20210524203726.2278-1-peter.ujfalusi@linux.intel.com Signed-off-by: Takashi Iwai commit a8deba8547e39f26440101164a3bbc2899c5b305 Author: Liu Jian Date: Tue May 25 09:41:39 2021 +0800 bpftool: Add sock_release help info for cgroup attach/prog load command The help information was not added at the time when the function got added. Fix this and add the missing information to its cli, documentation and bash completion. Fixes: db94cc0b4805 ("bpftool: Add support for BPF_CGROUP_INET_SOCK_RELEASE") Signed-off-by: Liu Jian Signed-off-by: Daniel Borkmann Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20210525014139.323859-1-liujian56@huawei.com commit 78cf0eb926cb1abeff2106bae67752e032fe5f3e Author: Tiezhu Yang Date: Sat May 15 19:02:01 2021 +0800 MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER When update the latest mainline kernel with the following three configs, the kernel hangs during startup: (1) CONFIG_FUNCTION_GRAPH_TRACER=y (2) CONFIG_PREEMPT_TRACER=y (3) CONFIG_FTRACE_STARTUP_TEST=y When update the latest mainline kernel with the above two configs (1) and (2), the kernel starts normally, but it still hangs when execute the following command: echo "function_graph" > /sys/kernel/debug/tracing/current_tracer Without CONFIG_PREEMPT_TRACER=y, the above two kinds of kernel hangs disappeared, so it seems that CONFIG_PREEMPT_TRACER has some influences with function_graph tracer at the first glance. I use ejtag to find out the epc address is related with preempt_enable() in the file arch/mips/lib/mips-atomic.c, because function tracing can trace the preempt_{enable,disable} calls that are traced, replace them with preempt_{enable,disable}_notrace to prevent function tracing from going into an infinite loop, and then it can fix the kernel hang issue. By the way, it seems that this commit is a complement and improvement of commit f93a1a00f2bd ("MIPS: Fix crash that occurs when function tracing is enabled"). Signed-off-by: Tiezhu Yang Cc: Steven Rostedt Signed-off-by: Thomas Bogendoerfer commit fef532ea0cd871afab7d9a7b6e9da99ac2c24371 Author: Randy Dunlap Date: Sun May 16 17:54:17 2021 -0700 MIPS: ralink: export rt_sysc_membase for rt2880_wdt.c rt2880_wdt.c uses (well, attempts to use) rt_sysc_membase. However, when this watchdog driver is built as a loadable module, there is a build error since the rt_sysc_membase symbol is not exported. Export it to quell the build error. ERROR: modpost: "rt_sysc_membase" [drivers/watchdog/rt2880_wdt.ko] undefined! Fixes: 473cf939ff34 ("watchdog: add ralink watchdog driver") Signed-off-by: Randy Dunlap Cc: Guenter Roeck Cc: Wim Van Sebroeck Cc: John Crispin Cc: linux-mips@vger.kernel.org Cc: linux-watchdog@vger.kernel.org Acked-by: Guenter Roeck Signed-off-by: Thomas Bogendoerfer commit 6855adc2c5d9dff08be9e6e01deb319738b28780 Author: Randy Dunlap Date: Thu May 20 22:13:43 2021 -0700 MIPS: launch.h: add include guard to prevent build errors arch/mips/include/asm/mips-boards/launch.h needs an include guard to prevent it from being #included more than once. Prevents these build errors: In file included from ../arch/mips/mti-malta/malta-amon.c:16: ../arch/mips/include/asm/mips-boards/launch.h:8:8: error: redefinition of 'struct cpulaunch' 8 | struct cpulaunch { | ^~~~~~~~~ In file included from ../arch/mips/include/asm/mips-cps.h:13, from ../arch/mips/include/asm/smp-ops.h:16, from ../arch/mips/include/asm/smp.h:21, from ../include/linux/smp.h:114, from ../arch/mips/mti-malta/malta-amon.c:12: ../arch/mips/include/asm/mips-boards/launch.h:8:8: note: originally defined here 8 | struct cpulaunch { | ^~~~~~~~~ make[3]: [../scripts/Makefile.build:273: arch/mips/mti-malta/malta-amon.o] Error 1 (ignored) Fixes: 6decd1aad15f ("MIPS: add support for buggy MT7621S core detection") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Cc: Ilya Lipnitskiy Reviewed-by: Ilya Lipnitskiy Signed-off-by: Thomas Bogendoerfer commit ff4cff962a7eedc73e54b5096693da7f86c61346 Author: Randy Dunlap Date: Sun May 16 17:01:08 2021 -0700 MIPS: alchemy: xxs1500: add gpio-au1000.h header file board-xxs1500.c references 2 functions without declaring them, so add the header file to placate the build. ../arch/mips/alchemy/board-xxs1500.c: In function 'board_setup': ../arch/mips/alchemy/board-xxs1500.c:56:2: error: implicit declaration of function 'alchemy_gpio1_input_enable' [-Werror=implicit-function-declaration] 56 | alchemy_gpio1_input_enable(); ../arch/mips/alchemy/board-xxs1500.c:57:2: error: implicit declaration of function 'alchemy_gpio2_enable'; did you mean 'alchemy_uart_enable'? [-Werror=implicit-function-declaration] 57 | alchemy_gpio2_enable(); Fixes: 8e026910fcd4 ("MIPS: Alchemy: merge GPR/MTX-1/XXS1500 board code into single files") Signed-off-by: Randy Dunlap Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Cc: Manuel Lauss Cc: Ralf Baechle Acked-by: Manuel Lauss Signed-off-by: Thomas Bogendoerfer commit e69012400b0cb42b2070748322cb72f9effec00f Author: Jisheng Zhang Date: Tue May 25 10:45:51 2021 +0800 arm64: mm: don't use CON and BLK mapping if KFENCE is enabled When we added KFENCE support for arm64, we intended that it would force the entire linear map to be mapped at page granularity, but we only enforced this in arch_add_memory() and not in map_mem(), so memory mapped at boot time can be mapped at a larger granularity. When booting a kernel with KFENCE=y and RODATA_FULL=n, this results in the following WARNING at boot: [ 0.000000] ------------[ cut here ]------------ [ 0.000000] WARNING: CPU: 0 PID: 0 at mm/memory.c:2462 apply_to_pmd_range+0xec/0x190 [ 0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.13.0-rc1+ #10 [ 0.000000] Hardware name: linux,dummy-virt (DT) [ 0.000000] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO BTYPE=--) [ 0.000000] pc : apply_to_pmd_range+0xec/0x190 [ 0.000000] lr : __apply_to_page_range+0x94/0x170 [ 0.000000] sp : ffffffc010573e20 [ 0.000000] x29: ffffffc010573e20 x28: ffffff801f400000 x27: ffffff801f401000 [ 0.000000] x26: 0000000000000001 x25: ffffff801f400fff x24: ffffffc010573f28 [ 0.000000] x23: ffffffc01002b710 x22: ffffffc0105fa450 x21: ffffffc010573ee4 [ 0.000000] x20: ffffff801fffb7d0 x19: ffffff801f401000 x18: 00000000fffffffe [ 0.000000] x17: 000000000000003f x16: 000000000000000a x15: ffffffc01060b940 [ 0.000000] x14: 0000000000000000 x13: 0098968000000000 x12: 0000000098968000 [ 0.000000] x11: 0000000000000000 x10: 0000000098968000 x9 : 0000000000000001 [ 0.000000] x8 : 0000000000000000 x7 : ffffffc010573ee4 x6 : 0000000000000001 [ 0.000000] x5 : ffffffc010573f28 x4 : ffffffc01002b710 x3 : 0000000040000000 [ 0.000000] x2 : ffffff801f5fffff x1 : 0000000000000001 x0 : 007800005f400705 [ 0.000000] Call trace: [ 0.000000] apply_to_pmd_range+0xec/0x190 [ 0.000000] __apply_to_page_range+0x94/0x170 [ 0.000000] apply_to_page_range+0x10/0x20 [ 0.000000] __change_memory_common+0x50/0xdc [ 0.000000] set_memory_valid+0x30/0x40 [ 0.000000] kfence_init_pool+0x9c/0x16c [ 0.000000] kfence_init+0x20/0x98 [ 0.000000] start_kernel+0x284/0x3f8 Fixes: 840b23986344 ("arm64, kfence: enable KFENCE for ARM64") Cc: # 5.12.x Signed-off-by: Jisheng Zhang Acked-by: Mark Rutland Acked-by: Marco Elver Tested-by: Marco Elver Link: https://lore.kernel.org/r/20210525104551.2ec37f77@xhacker.debian Signed-off-by: Catalin Marinas commit 2f26dc05af87dfdb8eba831e59878ef3f48767be Author: Maximilian Luz Date: Sun May 23 15:45:27 2021 +0200 platform/surface: aggregator_registry: Add support for 13" Intel Surface Laptop 4 Add support for the 13" Intel version of the Surface Laptop 4. Use the existing node group for the Surface Laptop 3 since the 15" AMD version already shares its WSID HID with its predecessor and there don't seem to be any significant differences with regards to SAM. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210523134528.798887-3-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 5fafeeb4da1a1a3452fb8035e422d779777ed844 Author: Maximilian Luz Date: Sun May 23 15:45:26 2021 +0200 platform/surface: aggregator_registry: Update comments for 15" AMD Surface Laptop 4 The 15" AMD version of the Surface Laptop 4 shares its WSID HID with the 15" AMD version of the Surface Laptop 3. Update the comments accordingly. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210523134528.798887-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit b71c791254ff5e78a124c8949585dccd9e225e06 Author: David Howells Date: Thu May 13 11:40:27 2021 +0100 netfs: Make CONFIG_NETFS_SUPPORT auto-selected rather than manual Make the netfs helper library selected automatically by the things that use it rather than being manually configured, even though it's required[1]. Fixes: 3a5829fefd3b ("netfs: Make a netfs helper module") Reported-by: Geert Uytterhoeven Signed-off-by: David Howells Reviewed-by: Jeff Layton cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/CAMuHMdXJZ7iNQE964CdBOU=vRKVMFzo=YF_eiwsGgqzuvZ+TuA@mail.gmail.com [1] Link: https://lore.kernel.org/r/162090298141.3166007.2971118149366779916.stgit@warthog.procyon.org.uk # v1 commit 19dee613816d5065ad09f2ccc20b35d23dca9f28 Author: David Howells Date: Thu May 13 11:03:32 2021 +0100 netfs: Pass flags through to grab_cache_page_write_begin() In netfs_write_begin(), pass the AOP flags through to grab_cache_page_write_begin() so that a request to use GFP_NOFS is honoured. Fixes: e1b1240c1ff5 ("netfs: Add write_begin helper") Reported-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Reviewed-by: Jeff Layton Reviewed-by: Matthew Wilcox (Oracle) cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/162090295383.3165945.13595101698295243662.stgit@warthog.procyon.org.uk # v1 commit a8b98c808eab3ec8f1b5a64be967b0f4af4cae43 Author: Amir Goldstein Date: Mon May 24 16:53:21 2021 +0300 fanotify: fix permission model of unprivileged group Reporting event->pid should depend on the privileges of the user that initialized the group, not the privileges of the user reading the events. Use an internal group flag FANOTIFY_UNPRIV to record the fact that the group was initialized by an unprivileged user. To be on the safe side, the premissions to setup filesystem and mount marks now require that both the user that initialized the group and the user setting up the mark have CAP_SYS_ADMIN. Link: https://lore.kernel.org/linux-fsdevel/CAOQ4uxiA77_P5vtv7e83g0+9d7B5W9ZTE4GfQEYbWmfT1rA=VA@mail.gmail.com/ Fixes: 7cea2a3c505e ("fanotify: support limited functionality for unprivileged users") Cc: # v5.12+ Link: https://lore.kernel.org/r/20210524135321.2190062-1-amir73il@gmail.com Reviewed-by: Matthew Bobrowski Acked-by: Christian Brauner Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit e11851429fdc23524aa244f76508c3c7aeaefdf6 Author: Imre Deak Date: Thu May 13 00:28:09 2021 +0300 drm/i915: Reenable LTTPR non-transparent LT mode for DPCD_REV<1.4 The driver currently disables the LTTPR non-transparent link training mode for sinks with a DPCD_REV<1.4, based on the following description of the LTTPR DPCD register range in DP standard 2.0 (at the 0xF0000 register description): "" LTTPR-related registers at DPCD Addresses F0000h through F02FFh are valid only for DPCD r1.4 (or higher). """ The transparent link training mode should still work fine, however the implementation for this in some retimer FWs seems to be broken, see the References: link below. After discussions with DP standard authors the above "DPCD r1.4" does not refer to the DPCD revision (stored in the DPCD_REV reg at 0x00000), rather to the "LTTPR field data structure revision" stored in the 0xF0000 reg. An update request has been filed at vesa.org (see wg/Link/documentComment/3746) for the upcoming v2.1 specification to clarify the above description along the following lines: """ LTTPR-related registers at DPCD Addresses F0000h through F02FFh are valid only for LT_TUNABLE_PHY_REPEATER_FIELD_DATA_STRUCTURE_REV 1.4 (or higher) """ Based on my tests Windows uses the non-transparent link training mode for DPCD_REV==1.2 sinks as well (so presumably for all DPCD_REVs), and forcing it to use transparent mode on ICL/TGL platforms leads to the same LT failure as reported at the References: link. Based on the above let's assume that the transparent link training mode is not well tested/supported and align the code to the correct interpretation of what the r1.4 version refers to. Reported-and-tested-by: Casey Harkins Tested-by: Khaled Almahallawy References: https://gitlab.freedesktop.org/drm/intel/-/issues/3415 Fixes: 264613b406eb ("drm/i915: Disable LTTPR support when the DPCD rev < 1.4") Cc: # v5.11+ Signed-off-by: Imre Deak Reviewed-by: Khaled Almahallawy Link: https://patchwork.freedesktop.org/patch/msgid/20210512212809.1234701-1-imre.deak@intel.com (cherry picked from commit cb4920cc40f630b5a247f4ed7d3dea66749df588) Signed-off-by: Jani Nikula commit a7f2e9272aff1ccfe0fc801dab1d5a7a1c6b7ed2 Author: Mathias Nyman Date: Tue May 25 10:41:00 2021 +0300 xhci: Fix 5.12 regression of missing xHC cache clearing command after a Stall If endpoints halts due to a stall then the dequeue pointer read from hardware may already be set ahead of the stalled TRB. After commit 674f8438c121 ("xhci: split handling halted endpoints into two steps") in 5.12 xhci driver won't issue a Set TR Dequeue if hardware dequeue pointer is already in the right place. Turns out the "Set TR Dequeue pointer" command is anyway needed as it in addition to moving the dequeue pointer also clears endpoint state and cache. Fixes: 674f8438c121 ("xhci: split handling halted endpoints into two steps") Cc: # 5.12 Reported-by: Peter Ganzhorn Tested-by: Peter Ganzhorn Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210525074100.1154090-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a80c203c3f1c06d2201c19ae071d0ae770a2b1ca Author: Mathias Nyman Date: Tue May 25 10:40:59 2021 +0300 xhci: fix giving back URB with incorrect status regression in 5.12 5.12 kernel changes how xhci handles cancelled URBs and halted endpoints. Among these changes cancelled and stalled URBs are no longer given back before they are cleared from xHC hardware cache. These changes unfortunately cleared the -EPIPE status of a stalled transfer in one case before giving bak the URB, causing a USB card reader to fail from working. Fixes: 674f8438c121 ("xhci: split handling halted endpoints into two steps") Cc: # 5.12 Reported-by: Peter Ganzhorn Tested-by: Peter Ganzhorn Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210525074100.1154090-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7cfc4ea78fc103ea51ecbacd9236abb5b1c490d2 Author: Neil Armstrong Date: Fri Apr 30 10:27:44 2021 +0200 drm/meson: fix shutdown crash when component not probed When main component is not probed, by example when the dw-hdmi module is not loaded yet or in probe defer, the following crash appears on shutdown: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000038 ... pc : meson_drv_shutdown+0x24/0x50 lr : platform_drv_shutdown+0x20/0x30 ... Call trace: meson_drv_shutdown+0x24/0x50 platform_drv_shutdown+0x20/0x30 device_shutdown+0x158/0x360 kernel_restart_prepare+0x38/0x48 kernel_restart+0x18/0x68 __do_sys_reboot+0x224/0x250 __arm64_sys_reboot+0x24/0x30 ... Simply check if the priv struct has been allocated before using it. Fixes: fa0c16caf3d7 ("drm: meson_drv add shutdown function") Reported-by: Stefan Agner Signed-off-by: Neil Armstrong Tested-by: Martin Blumenstingl Reviewed-by: Martin Blumenstingl Link: https://patchwork.freedesktop.org/patch/msgid/20210430082744.3638743-1-narmstrong@baylibre.com commit 4d9442bf263ac45d495bb7ecf75009e59c0622b2 Author: Hannes Reinecke Date: Fri May 21 10:23:46 2021 +0200 nvme-fabrics: decode host pathing error for connect Add an additional decoding for 'host pathing error' during connect. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Signed-off-by: Christoph Hellwig commit f25f8ef70ce2e85bae1a266dd5de714aefda81d2 Author: Hannes Reinecke Date: Fri May 21 10:23:00 2021 +0200 nvme-fc: short-circuit reconnect retries Returning an nvme status from nvme_fc_create_association() indicates that the association is established, and we should honour the DNR bit. If it's set a reconnect attempt will just return the same error, so we can short-circuit the reconnect attempts and fail the connection directly. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Reviewed-by: Himanshu Madhani Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit 3596a06583a16cf7f76d836440dfba5714c9c710 Author: Guoqing Jiang Date: Fri May 21 15:32:39 2021 +0800 nvme: fix potential memory leaks in nvme_cdev_add We need to call put_device if cdev_device_add failed, otherwise kmemleak has below report. [<0000000024c71758>] kmem_cache_alloc_trace+0x233/0x480 [<00000000ad2813ed>] device_add+0x7ff/0xe10 [<0000000035bc54c4>] cdev_device_add+0x72/0xa0 [<000000006c9aa1e8>] nvme_cdev_add+0xa9/0xf0 [nvme_core] [<000000003c4d492d>] nvme_mpath_set_live+0x251/0x290 [nvme_core] [<00000000889a58da>] nvme_mpath_add_disk+0x268/0x320 [nvme_core] [<00000000192e7161>] nvme_alloc_ns+0x669/0xac0 [nvme_core] [<000000007a1a6041>] nvme_validate_or_alloc_ns+0x156/0x280 [nvme_core] [<000000003a763c35>] nvme_scan_work+0x221/0x3c0 [nvme_core] [<000000009ff10706>] process_one_work+0x5cf/0xb10 [<000000000644ee25>] worker_thread+0x7a/0x680 [<00000000285ebd2f>] kthread+0x1c6/0x210 [<00000000e297c6ea>] ret_from_fork+0x22/0x30 Fixes: 2637baed7801 ("nvme: introduce generic per-namespace chardev") Signed-off-by: Guoqing Jiang Reviewed-by: Javier González Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 56df0c758aff7e5a7c59e2b255d1846f935b2cea Author: Alexandre GRIVEAUX Date: Sun May 23 18:35:22 2021 +0200 USB: serial: omninet: update driver description With the inclusion of Omni 56K Plus, this driver seem to be more common among the family of Zyxel omni modem. Update the driver and module descriptions. Signed-off-by: Alexandre GRIVEAUX [ johan: amend commit message ] Signed-off-by: Johan Hovold commit dad19afce9ad93dda1a10d08afea71b6dd30f19f Merge: 2b899f31f1a6d af2702549d685 Author: Takashi Iwai Date: Tue May 25 08:58:01 2021 +0200 Merge tag 'asoc-fix-v5.13-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v5.13 A collection of fixes that have come in since the merge window, mainly device specific things. The fixes to the generic cards from Morimoto-san are handling regressions that were introduced in the merge window on at least the Kontron sl28-var3-ads2. commit fc0b3dc9a11771c3919eaaaf9d649138b095aa0f Author: Alexandre GRIVEAUX Date: Sun May 23 18:35:21 2021 +0200 USB: serial: omninet: add device id for Zyxel Omni 56K Plus Add device id for Zyxel Omni 56K Plus modem, this modem include: USB chip: NetChip NET2888 Main chip: 901041A F721501APGF Another modem using the same chips is the Zyxel Omni 56K DUO/NEO, could be added with the right USB ID. Signed-off-by: Alexandre GRIVEAUX Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit c8692ad416dcc420ce1b403596a425c8f4c2720b Author: Tony Lindgren Date: Tue May 25 09:08:23 2021 +0300 bus: ti-sysc: Fix flakey idling of uarts and stop using swsup_sidle_act Looks like the swsup_sidle_act quirk handling is unreliable for serial ports. The serial ports just eventually stop idling until woken up and re-idled again. As the serial port not idling blocks any deeper SoC idle states, it's adds an annoying random flakeyness for power management. Let's just switch to swsup_sidle quirk instead like we already do for omap3 uarts. This means we manually idle the port instead of trying to use the hardware autoidle features when not in use. For more details on why the serial ports have been using swsup_idle_act, see commit 66dde54e978a ("ARM: OMAP2+: hwmod-data: UART IP needs software control to manage sidle modes"). It seems that the swsup_idle_act quirk handling is not enough though, and for example the TI Android kernel changed to using swsup_sidle with commit 77c34c84e1e0 ("OMAP4: HWMOD: UART1: disable smart-idle."). Fixes: b4a9a7a38917 ("bus: ti-sysc: Handle swsup idle mode quirks") Cc: Carl Philipp Klemm Cc: Ivan Jelincic Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Cc: Sicelo A. Mhlongo Signed-off-by: Tony Lindgren commit eb8dbe80326c3d44c1e38ee4f40e0d8d3e06f2d0 Author: Johan Hovold Date: Mon May 24 11:17:05 2021 +0200 USB: serial: quatech2: fix control-request directions The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the three requests which erroneously used usb_rcvctrlpipe(). Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver") Cc: stable@vger.kernel.org # 3.5 Signed-off-by: Johan Hovold commit a050a6d2b7e80ca52b2f4141eaf3420d201b72b3 Merge: 1434a3127887a f8b61bd20479c Author: Linus Torvalds Date: Mon May 24 16:03:24 2021 -1000 Merge tag 'perf-tools-fixes-for-v5.13-2021-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tool fixes from Arnaldo Carvalho de Melo: - Fix 'perf script' decoding of Intel PT traces for abort handling and sample instruction bytes. - Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit to Intel PT 'perf script' decoder. - Fixes for the python based Intel PT trace viewer GUI. - Sync UAPI copies (unwire quotactl_path, some comment fixes). - Fix handling of missing kernel software events, such as the recently added 'cgroup-switches', and add the trivial glue for it in the tooling side, since it was added in this merge window. - Add missing initialization of zstd_data in 'perf buildid-list', detected with valgrind's memcheck. - Remove needless event enable/disable when all events uses BPF. - Fix libpfm4 support (63) test error for nested event groups. * tag 'perf-tools-fixes-for-v5.13-2021-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: perf stat: Skip evlist__[enable|disable] when all events uses BPF perf script: Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit perf scripts python: exported-sql-viewer.py: Fix warning display perf scripts python: exported-sql-viewer.py: Fix Array TypeError perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls by elapsed Time report tools headers UAPI: Sync files changed by the quotactl_path unwiring tools headers UAPI: Sync linux/perf_event.h with the kernel sources tools headers UAPI: Sync linux/fs.h with the kernel sources perf parse-events: Check if the software events array slots are populated perf tools: Add 'cgroup-switches' software event perf intel-pt: Remove redundant setting of ptq->insn_len perf intel-pt: Fix sample instruction bytes perf intel-pt: Fix transaction abort handling perf test: Fix libpfm4 support (63) test error for nested event groups tools arch kvm: Sync kvm headers with the kernel sources perf buildid-list: Initialize zstd_data commit 603f000b15f21ce8932f76689c7aa9fe58261cf5 Author: Darrick J. Wong Date: Wed May 12 12:51:26 2021 -0700 xfs: validate extsz hints against rt extent size when rtinherit is set The RTINHERIT bit can be set on a directory so that newly created regular files will have the REALTIME bit set to store their data on the realtime volume. If an extent size hint (and EXTSZINHERIT) are set on the directory, the hint will also be copied into the new file. As pointed out in previous patches, for realtime files we require the extent size hint be an integer multiple of the realtime extent, but we don't perform the same validation on a directory with both RTINHERIT and EXTSZINHERIT set, even though the only use-case of that combination is to propagate extent size hints into new realtime files. This leads to inode corruption errors when the bad values are propagated. Because there may be existing filesystems with such a configuration, we cannot simply amend the inode verifier to trip on these directories and call it a day because that will cause previously "working" filesystems to start throwing errors abruptly. Note that it's valid to have directories with rtinherit set even if there is no realtime volume, in which case the problem does not manifest because rtinherit is ignored if there's no realtime device; and it's possible that someone set the flag, crashed, repaired the filesystem (which clears the hint on the realtime file) and continued. Therefore, mitigate this issue in several ways: First, if we try to write out an inode with both rtinherit/extszinherit set and an unaligned extent size hint, turn off the hint to correct the error. Second, if someone tries to misconfigure a directory via the fssetxattr ioctl, fail the ioctl. Third, reverify both extent size hint values when we propagate heritable inode attributes from parent to child, to prevent misconfigurations from spreading. Signed-off-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Reviewed-by: Brian Foster commit 6b69e485894b355b333bd286f0f0958e41d8754a Author: Darrick J. Wong Date: Wed May 12 12:49:19 2021 -0700 xfs: standardize extent size hint validation While chasing a bug involving invalid extent size hints being propagated into newly created realtime files, I noticed that the xfs_ioctl_setattr checks for the extent size hints weren't the same as the ones now encoded in libxfs and used for validation in repair and mkfs. Because the checks in libxfs are more stringent than the ones in the ioctl, it's possible for a live system to set inode flags that immediately result in corruption warnings. Specifically, it's possible to set an extent size hint on an rtinherit directory without checking if the hint is aligned to the realtime extent size, which makes no sense since that combination is used only to seed new realtime files. Replace the open-coded and inadequate checks with the libxfs verifier versions and update the code comments a bit. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig commit 0f9342513cc78a31a4a272a19b35eee4e8cd7107 Author: Darrick J. Wong Date: Thu May 20 17:15:49 2021 -0700 xfs: check free AG space when making per-AG reservations The new online shrink code exposed a gap in the per-AG reservation code, which is that we only return ENOSPC to callers if the entire fs doesn't have enough free blocks. Except for debugging mode, the reservation init code doesn't ever check that there's enough free space in that AG to cover the reservation. Not having enough space is not considered an immediate fatal error that requires filesystem offlining because (a) it's shouldn't be possible to wind up in that state through normal file operations and (b) even if one did, freeing data blocks would recover the situation. However, online shrink now needs to know if shrinking would not leave enough space so that it can abort the shrink operation. Hence we need to promote this assertion into an actual error return. Observed by running xfs/168 with a 1k block size, though in theory this could happen with any configuration. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino Reviewed-by: Gao Xiang commit d6eef886903c4bb5af41b9a31d4ba11dc7a6f8e8 Author: Sanket Parmar Date: Mon May 17 17:05:12 2021 +0200 usb: cdns3: Enable TDL_CHK only for OUT ep ZLP gets stuck if TDL_CHK bit is set and TDL_FROM_TRB is used as TDL source for IN endpoints. To fix it, TDL_CHK is only enabled for OUT endpoints. Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Reported-by: Aswath Govindraju Signed-off-by: Sanket Parmar Link: https://lore.kernel.org/r/1621263912-13175-1-git-send-email-sparmar@cadence.com Signed-off-by: Peter Chen commit 24845dcb170e16b3100bd49743687648c71387ae Author: Nick Desaulniers Date: Thu Mar 11 17:09:41 2021 -0800 Makefile: LTO: have linker check -Wframe-larger-than -Wframe-larger-than= requires stack frame information, which the frontend cannot provide. This diagnostic is emitted late during compilation once stack frame size is available. When building with LTO, the frontend simply lowers C to LLVM IR and does not have stack frame information, so it cannot emit this diagnostic. When the linker drives LTO, it restarts optimizations and lowers LLVM IR to object code. At that point, it has stack frame information but doesn't know to check for a specific max stack frame size. I consider this a bug in LLVM that we need to fix. There are some details we're working out related to LTO such as which value to use when there are multiple different values specified per TU, or how to propagate these to compiler synthesized routines properly, if at all. Until it's fixed, ensure we don't miss these. At that point we can wrap this in a compiler version guard or revert this based on the minimum support version of Clang. The error message is not generated during link: LTO vmlinux.o ld.lld: warning: stack size limit exceeded (8224) in foobarbaz Cc: Sami Tolvanen Reported-by: Candle Sun Suggested-by: Fangrui Song Signed-off-by: Nick Desaulniers Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210312010942.1546679-1-ndesaulniers@google.com commit 1cb61759d40716643281b8e0f8c7afebc8699249 Author: Marco Elver Date: Fri May 21 09:26:10 2021 +0200 init: verify that function is initcall_t at compile-time In the spirit of making it hard to misuse an interface, add a compile-time assertion in the CONFIG_HAVE_ARCH_PREL32_RELOCATIONS case to verify the initcall function matches initcall_t, because the inline asm bypasses any type-checking the compiler would otherwise do. This will help developers catch incorrect API use in all configurations. A recent example of this is: https://lkml.kernel.org/r/20210514140015.2944744-1-arnd@kernel.org Signed-off-by: Marco Elver Reviewed-by: Miguel Ojeda Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Reviewed-by: Sami Tolvanen Tested-by: Paul E. McKenney Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210521072610.2880286-1-elver@google.com commit 8c42a49738f16af0061f9ae5c2f5a955f268d9e3 Author: George McCollister Date: Mon May 24 15:29:53 2021 -0500 net: dsa: microchip: enable phy errata workaround on 9567 Also enable phy errata workaround on 9567 since has the same errata as the 9477 according to the manufacture's documentation. Signed-off-by: George McCollister Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 46a8b29c6306d8bbfd92b614ef65a47c900d8e70 Author: Pavel Skripkin Date: Mon May 24 23:02:08 2021 +0300 net: usb: fix memory leak in smsc75xx_bind Syzbot reported memory leak in smsc75xx_bind(). The problem was is non-freed memory in case of errors after memory allocation. backtrace: [] kmalloc include/linux/slab.h:556 [inline] [] kzalloc include/linux/slab.h:686 [inline] [] smsc75xx_bind+0x7a/0x334 drivers/net/usb/smsc75xx.c:1460 [] usbnet_probe+0x3b6/0xc30 drivers/net/usb/usbnet.c:1728 Fixes: d0cad871703b ("smsc75xx: SMSC LAN75xx USB gigabit ethernet adapter driver") Cc: stable@kernel.vger.org Reported-and-tested-by: syzbot+b558506ba8165425fee2@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: David S. Miller commit 48b491a5cc74333c4a6a82fe21cea42c055a3b0b Author: George McCollister Date: Mon May 24 13:50:54 2021 -0500 net: hsr: fix mac_len checks Commit 2e9f60932a2c ("net: hsr: check skb can contain struct hsr_ethhdr in fill_frame_info") added the following which resulted in -EINVAL always being returned: if (skb->mac_len < sizeof(struct hsr_ethhdr)) return -EINVAL; mac_len was not being set correctly so this check completely broke HSR/PRP since it was always 14, not 20. Set mac_len correctly and modify the mac_len checks to test in the correct places since sometimes it is legitimately 14. Fixes: 2e9f60932a2c ("net: hsr: check skb can contain struct hsr_ethhdr in fill_frame_info") Signed-off-by: George McCollister Signed-off-by: David S. Miller commit a4dd4fc6105e54393d637450a11d4cddb5fabc4f Author: Saubhik Mukherjee Date: Mon May 24 19:07:12 2021 +0530 net: appletalk: cops: Fix data race in cops_probe1 In cops_probe1(), there is a write to dev->base_addr after requesting an interrupt line and registering the interrupt handler cops_interrupt(). The handler might be called in parallel to handle an interrupt. cops_interrupt() tries to read dev->base_addr leading to a potential data race. So write to dev->base_addr before calling request_irq(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Saubhik Mukherjee Signed-off-by: David S. Miller commit 8d84733dee9f7dfa7a323c59e9bd61b2a83bee3f Author: Yang Li Date: Mon May 24 18:26:03 2021 +0800 thermal/ti-soc-thermal: Fix kernel-doc Fix function name in ti-bandgap.c kernel-doc comment to remove a warning. drivers/thermal/ti-soc-thermal/ti-bandgap.c:787: warning: expecting prototype for ti_bandgap_alert_init(). Prototype was for ti_bandgap_talert_init() instead. Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Suman Anna Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1621851963-36548-1-git-send-email-yang.lee@linux.alibaba.com commit 93c5d741d14b86150e10100de3d85f999e77a03c Merge: 1a6e9a9c68c1f b38e659de966a Author: David S. Miller Date: Mon May 24 13:20:24 2021 -0700 Merge branch 'sja1105-fixes' Vladimir Oltean says: ==================== Fixes for SJA1105 DSA driver This series contains some minor fixes in the sja1105 driver: - improved error handling in the probe path - rejecting an invalid phy-mode specified in the device tree - register access fix for SJA1105P/Q/R/S for the virtual links through the dynamic reconfiguration interface - handling 2 bridge VLANs where the second is supposed to overwrite the first - making sure that the lack of a pvid results in the actual dropping of untagged traffic ==================== Signed-off-by: David S. Miller commit b38e659de966a122fe2cb178c1e39c9bea06bc62 Author: Vladimir Oltean Date: Mon May 24 12:25:27 2021 +0300 net: dsa: sja1105: update existing VLANs from the bridge VLAN list When running this sequence of operations: ip link add br0 type bridge vlan_filtering 1 ip link set swp4 master br0 bridge vlan add dev swp4 vid 1 We observe the traffic sent on swp4 is still untagged, even though the bridge has overwritten the existing VLAN entry: port vlan ids swp4 1 PVID br0 1 PVID Egress Untagged This happens because we didn't consider that the 'bridge vlan add' command just overwrites VLANs like it's nothing. We treat the 'vid 1 pvid untagged' and the 'vid 1' as two separate VLANs, and the first still has precedence when calling sja1105_build_vlan_table. Obviously there is a disagreement regarding semantics, and we end up doing something unexpected from the PoV of the bridge. Let's actually consider an "existing VLAN" to be one which is on the same port, and has the same VLAN ID, as one we already have, and update it if it has different flags than we do. The first blamed commit is the one introducing the bug, the second one is the latest on top of which the bugfix still applies. Fixes: ec5ae61076d0 ("net: dsa: sja1105: save/restore VLANs using a delta commit method") Fixes: 5899ee367ab3 ("net: dsa: tag_8021q: add a context structure") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ed040abca4c1db72dfd3b8483b6ed6bfb7c2571e Author: Vladimir Oltean Date: Mon May 24 12:25:26 2021 +0300 net: dsa: sja1105: use 4095 as the private VLAN for untagged traffic One thing became visible when writing the blamed commit, and that was that STP and PTP frames injected by net/dsa/tag_sja1105.c using the deferred xmit mechanism are always classified to the pvid of the CPU port, regardless of whatever VLAN there might be in these packets. So a decision needed to be taken regarding the mechanism through which we should ensure that delivery of STP and PTP traffic is possible when we are in a VLAN awareness mode that involves tag_8021q. This is because tag_8021q is not concerned with managing the pvid of the CPU port, since as far as tag_8021q is concerned, no traffic should be sent as untagged from the CPU port. So we end up not actually having a pvid on the CPU port if we only listen to tag_8021q, and unless we do something about it. The decision taken at the time was to keep VLAN 1 in the list of priv->dsa_8021q_vlans, and make it a pvid of the CPU port. This ensures that STP and PTP frames can always be sent to the outside world. However there is a problem. If we do the following while we are in the best_effort_vlan_filtering=true mode: ip link add br0 type bridge vlan_filtering 1 ip link set swp2 master br0 bridge vlan del dev swp2 vid 1 Then untagged and pvid-tagged frames should be dropped. But we observe that they aren't, and this is because of the precaution we took that VID 1 is always installed on all ports. So clearly VLAN 1 is not good for this purpose. What about VLAN 0? Well, VLAN 0 is managed by the 8021q module, and that module wants to ensure that 802.1p tagged frames are always received by a port, and are always transmitted as VLAN-tagged (with VLAN ID 0). Whereas we want our STP and PTP frames to be untagged if the stack sent them as untagged - we don't want the driver to just decide out of the blue that it adds VID 0 to some packets. So what to do? Well, there is one other VLAN that is reserved, and that is 4095: $ ip link add link swp2 name swp2.4095 type vlan id 4095 Error: 8021q: Invalid VLAN id. $ bridge vlan add dev swp2 vid 4095 Error: bridge: Vlan id is invalid. After we made this change, VLAN 1 is indeed forwarded and/or dropped according to the bridge VLAN table, there are no further alterations done by the sja1105 driver. Fixes: ec5ae61076d0 ("net: dsa: sja1105: save/restore VLANs using a delta commit method") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6729188d2646709941903052e4b78e1d82c239b9 Author: Vladimir Oltean Date: Mon May 24 12:25:25 2021 +0300 net: dsa: sja1105: error out on unsupported PHY mode The driver continues probing when a port is configured for an unsupported PHY interface type, instead it should stop. Fixes: 8aa9ebccae87 ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit cec279a898a3b004411682f212215ccaea1cd0fb Author: Vladimir Oltean Date: Mon May 24 12:25:24 2021 +0300 net: dsa: sja1105: add error handling in sja1105_setup() If any of sja1105_static_config_load(), sja1105_clocking_setup() or sja1105_devlink_setup() fails, we can't just return in the middle of sja1105_setup() or memory will leak. Add a cleanup path. Fixes: 0a7bdbc23d8a ("net: dsa: sja1105: move devlink param code to sja1105_devlink.c") Fixes: 8aa9ebccae87 ("net: dsa: Introduce driver for NXP SJA1105 5-port L2 switch") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit dc596e3fe63f88e3d1e509f64e7f761cd4135538 Author: Vladimir Oltean Date: Mon May 24 12:25:23 2021 +0300 net: dsa: sja1105: call dsa_unregister_switch when allocating memory fails Unlike other drivers which pretty much end their .probe() execution with dsa_register_switch(), the sja1105 does some extra stuff. When that fails with -ENOMEM, the driver is quick to return that, forgetting to call dsa_unregister_switch(). Not critical, but a bug nonetheless. Fixes: 4d7525085a9b ("net: dsa: sja1105: offload the Credit-Based Shaper qdisc") Fixes: a68578c20a96 ("net: dsa: Make deferred_xmit private to sja1105") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ba61cf167cb77e54c1ec5adb7aa49a22ab3c9b28 Author: Vladimir Oltean Date: Mon May 24 12:25:22 2021 +0300 net: dsa: sja1105: fix VL lookup command packing for P/Q/R/S At the beginning of the sja1105_dynamic_config.c file there is a diagram of the dynamic config interface layout: packed_buf | V +-----------------------------------------+------------------+ | ENTRY BUFFER | COMMAND BUFFER | +-----------------------------------------+------------------+ <----------------------- packed_size ------------------------> So in order to pack/unpack the command bits into the buffer, sja1105_vl_lookup_cmd_packing must first advance the buffer pointer by the length of the entry. This is similar to what the other *cmd_packing functions do. This bug exists because the command packing function for P/Q/R/S was copied from the E/T generation, and on E/T, the command was actually embedded within the entry buffer itself. Fixes: 94f94d4acfb2 ("net: dsa: sja1105: add static tables for virtual links") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1a6e9a9c68c1f183872e4bcc947382111c2e04eb Author: Johan Hovold Date: Mon May 24 11:25:11 2021 +0200 net: hso: fix control-request directions The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the tiocmset and rfkill requests which erroneously used usb_rcvctrlpipe(). Fixes: 72dc1c096c70 ("HSO: add option hso driver") Cc: stable@vger.kernel.org # 2.6.27 Signed-off-by: Johan Hovold Signed-off-by: David S. Miller commit 1a44fb38cc65bc30bac490291412aa1940659fe1 Author: Hayes Wang Date: Mon May 24 14:49:42 2021 +0800 r8152: check the informaton of the device Verify some fields of the USB descriptor to make sure the driver could be used by the device. Besides, remove the check of endpoint number in rtl8152_probe(). usb_find_common_endpoints() includes it. BugLink: https://syzkaller.appspot.com/bug?id=912c9c373656996801b4de61f1e3cb326fe940aa Reported-by: syzbot+95afd23673f5dd295c57@syzkaller.appspotmail.com Fixes: c2198943e33b ("r8152: search the configuration of vendor mode") Signed-off-by: Hayes Wang Reviewed-by: Johan Hovold Signed-off-by: David S. Miller commit 9b76eade16423ef06829cccfe3e100cfce31afcd Author: Taehee Yoo Date: Sun May 23 14:38:53 2021 +0000 sch_dsmark: fix a NULL deref in qdisc_reset() If Qdisc_ops->init() is failed, Qdisc_ops->reset() would be called. When dsmark_init(Qdisc_ops->init()) is failed, it possibly doesn't initialize dsmark_qdisc_data->q. But dsmark_reset(Qdisc_ops->reset()) uses dsmark_qdisc_data->q pointer wihtout any null checking. So, panic would occur. Test commands: sysctl net.core.default_qdisc=dsmark -w ip link add dummy0 type dummy ip link add vw0 link dummy0 type virt_wifi ip link set vw0 up Splat looks like: KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] CPU: 3 PID: 684 Comm: ip Not tainted 5.12.0+ #910 RIP: 0010:qdisc_reset+0x2b/0x680 Code: 1f 44 00 00 48 b8 00 00 00 00 00 fc ff df 41 57 41 56 41 55 41 54 55 48 89 fd 48 83 c7 18 53 48 89 fa 48 c1 ea 03 48 83 ec 20 <80> 3c 02 00 0f 85 09 06 00 00 4c 8b 65 18 0f 1f 44 00 00 65 8b 1d RSP: 0018:ffff88800fda6bf8 EFLAGS: 00010282 RAX: dffffc0000000000 RBX: ffff8880050ed800 RCX: 0000000000000000 RDX: 0000000000000003 RSI: ffffffff99e34100 RDI: 0000000000000018 RBP: 0000000000000000 R08: fffffbfff346b553 R09: fffffbfff346b553 R10: 0000000000000001 R11: fffffbfff346b552 R12: ffffffffc0824940 R13: ffff888109e83800 R14: 00000000ffffffff R15: ffffffffc08249e0 FS: 00007f5042287680(0000) GS:ffff888119800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055ae1f4dbd90 CR3: 0000000006760002 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? rcu_read_lock_bh_held+0xa0/0xa0 dsmark_reset+0x3d/0xf0 [sch_dsmark] qdisc_reset+0xa9/0x680 qdisc_destroy+0x84/0x370 qdisc_create_dflt+0x1fe/0x380 attach_one_default_qdisc.constprop.41+0xa4/0x180 dev_activate+0x4d5/0x8c0 ? __dev_open+0x268/0x390 __dev_open+0x270/0x390 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit dc51ff91cf2d1e9a2d941da483602f71d4a51472 Author: Max Gurtovoy Date: Tue May 18 22:21:31 2021 +0300 vfio/platform: fix module_put call in error flow The ->parent_module is the one that use in try_module_get. It should also be the one the we use in module_put during vfio_platform_open(). Fixes: 32a2d71c4e80 ("vfio: platform: introduce vfio-platform-base module") Signed-off-by: Max Gurtovoy Message-Id: <20210518192133.59195-1-mgurtovoy@nvidia.com> Signed-off-by: Alex Williamson commit 752774ce7793a1f8baa55aae31f3b4caac49cbe4 Author: Wei Yongjun Date: Thu May 20 13:36:41 2021 +0000 samples: vfio-mdev: fix error handing in mdpy_fb_probe() Fix to return a negative error code from the framebuffer_alloc() error handling case instead of 0, also release regions in some error handing cases. Fixes: cacade1946a4 ("sample: vfio mdev display - guest driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Message-Id: <20210520133641.1421378-1-weiyongjun1@huawei.com> Signed-off-by: Alex Williamson commit 78b238147e4d241bc1681d2559477c995f9dcb0a Author: Gustavo A. R. Silva Date: Thu May 13 18:01:55 2021 -0500 vfio/iommu_type1: Use struct_size() for kzalloc() Make use of the struct_size() helper instead of an open-coded version, in order to avoid any potential type mistakes or integer overflows that, in the worst scenario, could lead to heap overflows. This code was detected with the help of Coccinelle and, audited and fixed manually. Signed-off-by: Gustavo A. R. Silva Message-Id: <20210513230155.GA217517@embeddedor> Signed-off-by: Alex Williamson commit 2a55ca37350171d9b43d561528f23d4130097255 Author: Randy Dunlap Date: Sat May 15 12:08:56 2021 -0700 vfio/pci: zap_vma_ptes() needs MMU zap_vma_ptes() is only available when CONFIG_MMU is set/enabled. Without CONFIG_MMU, vfio_pci.o has build errors, so make VFIO_PCI depend on MMU. riscv64-linux-ld: drivers/vfio/pci/vfio_pci.o: in function `vfio_pci_mmap_open': vfio_pci.c:(.text+0x1ec): undefined reference to `zap_vma_ptes' riscv64-linux-ld: drivers/vfio/pci/vfio_pci.o: in function `.L0 ': vfio_pci.c:(.text+0x165c): undefined reference to `zap_vma_ptes' Fixes: 11c4cd07ba11 ("vfio-pci: Fault mmaps to enable vma tracking") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Alex Williamson Cc: Cornelia Huck Cc: kvm@vger.kernel.org Cc: Jason Gunthorpe Cc: Eric Auger Message-Id: <20210515190856.2130-1-rdunlap@infradead.org> Signed-off-by: Alex Williamson commit d1ce2c79156d3baf0830990ab06d296477b93c26 Author: Zhen Lei Date: Sat May 15 10:04:58 2021 +0800 vfio/pci: Fix error return code in vfio_ecap_init() The error code returned from vfio_ext_cap_len() is stored in 'len', not in 'ret'. Fixes: 89e1f7d4c66d ("vfio: Add PCI device driver") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Reviewed-by: Max Gurtovoy Message-Id: <20210515020458.6771-1-thunder.leizhen@huawei.com> Signed-off-by: Alex Williamson commit 1434a3127887a7e708be5f4edd5e36d64d8622f8 Merge: 5df7ae7bed412 08b2b6fdf6b26 Author: Linus Torvalds Date: Mon May 24 07:46:31 2021 -1000 Merge branch 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: - "cgroup_disable=" boot param was being applied too late confusing some subsystems. Fix it by moving application to __setup() time. - Comment spelling fixes. Included here to lower the chance of trivial future merge conflicts. * 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: fix spelling mistakes cgroup: disable controllers at parse time commit 5df7ae7bed412aa3f2e26ee8271abb24885ee557 Merge: f71d49e01be6b 940d71c6462e8 Author: Linus Torvalds Date: Mon May 24 07:28:09 2021 -1000 Merge branch 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "One commit to fix spurious workqueue stall warnings across VM suspensions" * 'for-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: wq: handle VM suspension in stall detection commit f71d49e01be6bb0f96ca33402477162511988e9d Merge: c4681547bcce7 b4e46c9954ad5 Author: Linus Torvalds Date: Mon May 24 07:22:41 2021 -1000 Merge tag 'spi-fix-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "There's some device specific fixes here but also an unusually large number of fixes for the core, including both fixes for breakage introduced on ACPI systems while fixing the long standing confusion about the polarity of GPIO chip selects specified through DT, and fixes for ordering issues on unregistration which have been exposed through the wider usage of devm_." * tag 'spi-fix-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: sc18is602: implement .max_{transfer,message}_size() for the controller spi: sc18is602: don't consider the chip select byte in sc18is602_check_transfer MAINTAINERS: Add Alain Volmat as STM32 SPI maintainer dt-bindings: spi: spi-mux: rename flash node spi: Don't have controller clean up spi device before driver unbind spi: Assume GPIO CS active high in ACPI case spi: sprd: Add missing MODULE_DEVICE_TABLE spi: Switch to signed types for *_native_cs SPI controller fields spi: take the SPI IO-mutex in the spi_set_cs_timing method spi: spi-fsl-dspi: Fix a resource leak in an error handling path spi: spi-zynq-qspi: Fix stack violation bug spi: spi-zynq-qspi: Fix kernel-doc warning spi: altera: Make SPI_ALTERA_CORE invisible spi: Fix spi device unregister flow commit 28a4aa1160d71187a44414dac40b57d1fd9fcd77 Author: Paolo Bonzini Date: Mon May 24 18:22:28 2021 +0200 KVM: SVM: make the avic parameter a bool Make it consistent with kvm_intel.enable_apicv. Suggested-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 377872b3355b9a7f04f25388e2c9399845259c05 Author: Vitaly Kuznetsov Date: Tue May 18 16:43:36 2021 +0200 KVM: VMX: Drop unneeded CONFIG_X86_LOCAL_APIC check CONFIG_X86_LOCAL_APIC is always on when CONFIG_KVM (on x86) since commit e42eef4ba388 ("KVM: add X86_LOCAL_APIC dependency"). Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Message-Id: <20210518144339.1987982-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Sean Christopherson commit 778a136e48be6b1b703328a0a4d6d459cf97449f Author: Vitaly Kuznetsov Date: Tue May 18 16:43:35 2021 +0200 KVM: SVM: Drop unneeded CONFIG_X86_LOCAL_APIC check AVIC dependency on CONFIG_X86_LOCAL_APIC is dead code since commit e42eef4ba388 ("KVM: add X86_LOCAL_APIC dependency"). Suggested-by: Sean Christopherson Signed-off-by: Vitaly Kuznetsov Message-Id: <20210518144339.1987982-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini Reviewed-by: Sean Christopherson commit 08b2b6fdf6b26032f025084ce2893924a0cdb4a2 Author: Zhen Lei Date: Mon May 24 16:29:43 2021 +0800 cgroup: fix spelling mistakes Fix some spelling mistakes in comments: hierarhcy ==> hierarchy automtically ==> automatically overriden ==> overridden In absense of .. or ==> In absence of .. and assocaited ==> associated taget ==> target initate ==> initiate succeded ==> succeeded curremt ==> current udpated ==> updated Signed-off-by: Zhen Lei Signed-off-by: Tejun Heo commit 179d9ba5559a756f4322583388b3213fe4e391b0 Author: Pablo Neira Ayuso Date: Mon May 24 17:10:18 2021 +0200 netfilter: nf_tables: fix table flag updates The dormant flag need to be updated from the preparation phase, otherwise, two consecutive requests to dorm a table in the same batch might try to remove the same hooks twice, resulting in the following warning: hook not found, pf 3 num 0 WARNING: CPU: 0 PID: 334 at net/netfilter/core.c:480 __nf_unregister_net_hook+0x1eb/0x610 net/netfilter/core.c:480 Modules linked in: CPU: 0 PID: 334 Comm: kworker/u4:5 Not tainted 5.12.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net RIP: 0010:__nf_unregister_net_hook+0x1eb/0x610 net/netfilter/core.c:480 This patch is a partial revert of 0ce7cf4127f1 ("netfilter: nftables: update table flags from the commit phase") to restore the previous behaviour. However, there is still another problem: A batch containing a series of dorm-wakeup-dorm table and vice-versa also trigger the warning above since hook unregistration happens from the preparation phase, while hook registration occurs from the commit phase. To fix this problem, this patch adds two internal flags to annotate the original dormant flag status which are __NFT_TABLE_F_WAS_DORMANT and __NFT_TABLE_F_WAS_AWAKEN, to restore it from the abort path. The __NFT_TABLE_F_UPDATE bitmask allows to handle the dormant flag update with one single transaction. Reported-by: syzbot+7ad5cd1615f2d89c6e7e@syzkaller.appspotmail.com Fixes: 0ce7cf4127f1 ("netfilter: nftables: update table flags from the commit phase") Signed-off-by: Pablo Neira Ayuso commit 9b7ff25d129df7c4f61e08382993e1988d56f6a7 Author: Rafael J. Wysocki Date: Fri May 21 15:13:11 2021 +0200 ACPI: power: Refine turning off unused power resources Commit 7e4fdeafa61f ("ACPI: power: Turn off unused power resources unconditionally") dropped the power resource state check from acpi_turn_off_unused_power_resources(), because according to the ACPI specification (e.g. ACPI 6.4, Section 7.2.2) the OS "may run the _OFF method repeatedly, even if the resource is already off". However, it turns out that some systems do not follow the specification in this particular respect and that commit introduced boot issues on them, so refine acpi_turn_off_unused_power_resources() to only turn off power resources without any users after device enumeration and restore its previous behavior in the system-wide resume path. Fixes: 7e4fdeafa61f ("ACPI: power: Turn off unused power resources unconditionally") Link: https://uefi.org/specs/ACPI/6.4/07_Power_and_Performance_Mgmt/declaring-a-power-resource-object.html#off BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=213019 Reported-by: Zhang Rui Tested-by: Zhang Rui Reported-by: Dave Olsthoorn Tested-by: Dave Olsthoorn Reported-by: Shujun Wang Tested-by: Shujun Wang Signed-off-by: Rafael J. Wysocki commit e6809703e164e0e47d99a42084af06a60e386b13 Merge: e752dbc59e124 22c7a18ed5f00 Author: Greg Kroah-Hartman Date: Mon May 24 15:34:06 2021 +0200 Merge tag 'thunderbolt-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fixes for v5.13-rc4 This includes two fixes from Mathias to handle NVM read side properly in certain situations. Both have been in linux-next with no reported issues. * tag 'thunderbolt-for-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: usb4: Fix NVM read buffer bounds and offset issue thunderbolt: dma_port: Fix NVM read buffer bounds and offset issue commit e752dbc59e1241b13b8c4f7b6eb582862e7668fe Author: Yoshihiro Shimoda Date: Mon May 24 15:01:55 2021 +0900 usb: gadget: udc: renesas_usb3: Fix a race in usb3_start_pipen() The usb3_start_pipen() is called by renesas_usb3_ep_queue() and usb3_request_done_pipen() so that usb3_start_pipen() is possible to cause a race when getting usb3_first_req like below: renesas_usb3_ep_queue() spin_lock_irqsave() list_add_tail() spin_unlock_irqrestore() usb3_start_pipen() usb3_first_req = usb3_get_request() --- [1] --- interrupt --- usb3_irq_dma_int() usb3_request_done_pipen() usb3_get_request() usb3_start_pipen() usb3_first_req = usb3_get_request() ... (the req is possible to be finished in the interrupt) The usb3_first_req [1] above may have been finished after the interrupt ended so that this driver caused to start a transfer wrongly. To fix this issue, getting/checking the usb3_first_req are under spin_lock_irqsave() in the same section. Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Cc: stable Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210524060155.1178724-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman commit a20dcf53ea9836387b229c4878f9559cf1b55b71 Author: Kyle Tso Date: Sun May 23 09:58:55 2021 +0800 usb: typec: tcpm: Respond Not_Supported if no snk_vdo If snk_vdo is not populated from fwnode, it implies the port does not support responding to SVDM commands. Not_Supported Message shall be sent if the contract is in PD3. And for PD2, the port shall ignore the commands. Fixes: 193a68011fdc ("staging: typec: tcpm: Respond to Discover Identity commands") Cc: stable Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210523015855.1785484-3-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 0bc3ee92880d910a1d100b73a781904f359e1f1c Author: Kyle Tso Date: Sun May 23 09:58:54 2021 +0800 usb: typec: tcpm: Properly interrupt VDM AMS When a VDM AMS is interrupted by Messages other than VDM, the AMS needs to be finished properly. Also start a VDM AMS if receiving SVDM Commands from the port partner to complement the functionality of tcpm_vdm_ams(). Fixes: 0908c5aca31e ("usb: typec: tcpm: AMS and Collision Avoidance") Cc: stable Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210523015855.1785484-2-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit a072cbda97a9367a84d46e7bf78a47abdbfcaea8 Merge: 8d6ee30c11a95 62499a94ce5b9 Author: Mark Brown Date: Mon May 24 12:54:44 2021 +0100 Merge series "Fix MAX77620 regulator driver regression" from Dmitry Osipenko : Hi, The next-20210521 started to fail on Nexus 7 because of the change to regulator core that caused regression of the MAX77620 regulator driver. The regulator driver is now getting a deferred probe and turned out driver wasn't ready for this. The root of the problem is that OF node of the PMIC MFD sub-device is shared with the PINCTRL sub-device and we need to convey this information to the driver core, otherwise it will try to claim GPIO pin that is already claimed by PINCTRL and fail the probe. Dmitry Osipenko (2): regulator: max77620: Use device_set_of_node_from_dev() regulator: max77620: Silence deferred probe error drivers/regulator/max77620-regulator.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) -- 2.30.2 commit 13817d466eb8713a1ffd254f537402f091d48444 Author: Lukas Wunner Date: Sat May 22 19:49:50 2021 +0200 spi: bcm2835: Fix out-of-bounds access with more than 4 slaves Commit 571e31fa60b3 ("spi: bcm2835: Cache CS register value for ->prepare_message()") limited the number of slaves to 3 at compile-time. The limitation was necessitated by a statically-sized array prepare_cs[] in the driver private data which contains a per-slave register value. The commit sought to enforce the limitation at run-time by setting the controller's num_chipselect to 3: Slaves with a higher chipselect are rejected by spi_add_device(). However the commit neglected that num_chipselect only limits the number of *native* chipselects. If GPIO chipselects are specified in the device tree for more than 3 slaves, num_chipselect is silently raised by of_spi_get_gpio_numbers() and the result are out-of-bounds accesses to the statically-sized array prepare_cs[]. As a bandaid fix which is backportable to stable, raise the number of allowed slaves to 24 (which "ought to be enough for anybody"), enforce the limitation on slave ->setup and revert num_chipselect to 3 (which is the number of native chipselects supported by the controller). An upcoming for-next commit will allow an arbitrary number of slaves. Fixes: 571e31fa60b3 ("spi: bcm2835: Cache CS register value for ->prepare_message()") Reported-by: Joe Burmeister Signed-off-by: Lukas Wunner Cc: stable@vger.kernel.org # v5.4+ Cc: Phil Elwell Link: https://lore.kernel.org/r/75854affc1923309fde05e47494263bde73e5592.1621703210.git.lukas@wunner.de Signed-off-by: Mark Brown commit 8d6ee30c11a95f84974c2d7f590a7012f27b8f15 Author: Hao Fang Date: Sat May 22 18:25:51 2021 +0800 regulator: hisilicon: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/. It should use capital S, according to the official website https://www.hisilicon.com/en. Signed-off-by: Hao Fang Link: https://lore.kernel.org/r/1621679151-15617-1-git-send-email-fanghao11@huawei.com Signed-off-by: Mark Brown commit 4c668630bf8ea90a041fc69c9984486e0f56682d Author: Axel Lin Date: Sun May 23 15:10:45 2021 +0800 regulator: bd71828: Fix .n_voltages settings Current .n_voltages settings do not cover the latest 2 valid selectors, so it fails to set voltage for the hightest voltage support. The latest linear range has step_uV = 0, so it does not matter if we count the .n_voltages to maximum selector + 1 or the first selector of latest linear range + 1. To simplify calculating the n_voltages, let's just set the .n_voltages to maximum selector + 1. Fixes: 522498f8cb8c ("regulator: bd71828: Basic support for ROHM bd71828 PMIC regulators") Signed-off-by: Axel Lin Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210523071045.2168904-2-axel.lin@ingics.com Signed-off-by: Mark Brown commit 0514582a1a5b4ac1a3fd64792826d392d7ae9ddc Author: Axel Lin Date: Sun May 23 15:10:44 2021 +0800 regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting The valid selectors for bd70528 bucks are 0 ~ 0xf, so the .n_voltages should be 16 (0x10). Use 0x10 to make it consistent with BD70528_LDO_VOLTS. Also remove redundant defines for BD70528_BUCK_VOLTS. Signed-off-by: Axel Lin Acked-by: Matti Vaittinen Link: https://lore.kernel.org/r/20210523071045.2168904-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 62499a94ce5b9a41047dbadaad885347b1176079 Author: Dmitry Osipenko Date: Mon May 24 01:42:43 2021 +0300 regulator: max77620: Silence deferred probe error One of previous changes to regulator core causes PMIC regulators to re-probe until supply regulator is registered. Silence noisy error message about the deferred probe. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210523224243.13219-3-digetx@gmail.com Signed-off-by: Mark Brown commit 6f55c5dd1118b3076d11d9cb17f5c5f4bc3a1162 Author: Dmitry Osipenko Date: Mon May 24 01:42:42 2021 +0300 regulator: max77620: Use device_set_of_node_from_dev() The MAX77620 driver fails to re-probe on deferred probe because driver core tries to claim resources that are already claimed by the PINCTRL device. Use device_set_of_node_from_dev() helper which marks OF node as reused, skipping erroneous execution of pinctrl_bind_pins() for the PMIC device on the re-probe. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210523224243.13219-2-digetx@gmail.com Signed-off-by: Mark Brown commit 41daf6ba594d55f201c50280ebcd430590441da1 Author: Kefeng Wang Date: Mon May 24 10:49:41 2021 +0800 ASoC: core: Fix Null-point-dereference in fmt_single_name() Check the return value of devm_kstrdup() in case of Null-point-dereference. Fixes: 45dd9943fce0 ("ASoC: core: remove artificial component and DAI name constraint") Cc: Dmitry Baryshkov Reported-by: Hulk Robot Signed-off-by: Kefeng Wang Link: https://lore.kernel.org/r/20210524024941.159952-1-wangkefeng.wang@huawei.com Signed-off-by: Mark Brown commit 4dd649d130c634415c26df771e09e373f77fc688 Author: Aditya Srivastava Date: Mon May 24 02:39:09 2021 +0530 NFC: nfcmrvl: fix kernel-doc syntax in file headers The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/nfc/nfcmrvl follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc. For e.g., running scripts/kernel-doc -none on drivers/nfc/nfcmrvl/spi.c causes warning: warning: expecting prototype for Marvell NFC(). Prototype was for SPI_WAIT_HANDSHAKE() instead Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 474a2ddaa192777522a7499784f1d60691cd831a Author: DENG Qingfang Date: Sun May 23 22:51:54 2021 +0800 net: dsa: mt7530: fix VLAN traffic leaks PCR_MATRIX field was set to all 1's when VLAN filtering is enabled, but was not reset when it is disabled, which may cause traffic leaks: ip link add br0 type bridge vlan_filtering 1 ip link add br1 type bridge vlan_filtering 1 ip link set swp0 master br0 ip link set swp1 master br1 ip link set br0 type bridge vlan_filtering 0 ip link set br1 type bridge vlan_filtering 0 # traffic in br0 and br1 will start leaking to each other As port_bridge_{add,del} have set up PCR_MATRIX properly, remove the PCR_MATRIX write from mt7530_port_set_vlan_aware. Fixes: 83163f7dca56 ("net: dsa: mediatek: add VLAN support for MT7530") Signed-off-by: DENG Qingfang Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 835744e8b537389d6a448a47d0753734d4777fa4 Merge: 5eff1461a6dec e70f7a11876a1 Author: David S. Miller Date: Sun May 23 17:16:09 2021 -0700 Merge branch 'fq_pie-fixes' Davide Caratti says: ==================== two fixes for the fq_pie scheduler - patch 1/2 restores the possibility to use 65536 flows with fq_pie, preserving the fix for an endless loop in the control plane - patch 2/2 fixes an OOB access that can be observed in the traffic path of fq_pie scheduler, when the classification selects a flow beyond the allocated space. ==================== Signed-off-by: David S. Miller commit e70f7a11876a1a788ceadf75e9e5f7af2c868680 Author: Davide Caratti Date: Sat May 22 15:15:13 2021 +0200 net/sched: fq_pie: fix OOB access in the traffic path the following script: # tc qdisc add dev eth0 handle 0x1 root fq_pie flows 2 # tc qdisc add dev eth0 clsact # tc filter add dev eth0 egress matchall action skbedit priority 0x10002 # ping 192.0.2.2 -I eth0 -c2 -w1 -q produces the following splat: BUG: KASAN: slab-out-of-bounds in fq_pie_qdisc_enqueue+0x1314/0x19d0 [sch_fq_pie] Read of size 4 at addr ffff888171306924 by task ping/942 CPU: 3 PID: 942 Comm: ping Not tainted 5.12.0+ #441 Hardware name: Red Hat KVM, BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/01/2014 Call Trace: dump_stack+0x92/0xc1 print_address_description.constprop.7+0x1a/0x150 kasan_report.cold.13+0x7f/0x111 fq_pie_qdisc_enqueue+0x1314/0x19d0 [sch_fq_pie] __dev_queue_xmit+0x1034/0x2b10 ip_finish_output2+0xc62/0x2120 __ip_finish_output+0x553/0xea0 ip_output+0x1ca/0x4d0 ip_send_skb+0x37/0xa0 raw_sendmsg+0x1c4b/0x2d00 sock_sendmsg+0xdb/0x110 __sys_sendto+0x1d7/0x2b0 __x64_sys_sendto+0xdd/0x1b0 do_syscall_64+0x3c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fe69735c3eb Code: 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 f3 0f 1e fa 48 8d 05 75 42 2c 00 41 89 ca 8b 00 85 c0 75 14 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 75 c3 0f 1f 40 00 41 57 4d 89 c7 41 56 41 89 RSP: 002b:00007fff06d7fb38 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000055e961413700 RCX: 00007fe69735c3eb RDX: 0000000000000040 RSI: 000055e961413700 RDI: 0000000000000003 RBP: 0000000000000040 R08: 000055e961410500 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff06d81260 R13: 00007fff06d7fb40 R14: 00007fff06d7fc30 R15: 000055e96140f0a0 Allocated by task 917: kasan_save_stack+0x19/0x40 __kasan_kmalloc+0x7f/0xa0 __kmalloc_node+0x139/0x280 fq_pie_init+0x555/0x8e8 [sch_fq_pie] qdisc_create+0x407/0x11b0 tc_modify_qdisc+0x3c2/0x17e0 rtnetlink_rcv_msg+0x346/0x8e0 netlink_rcv_skb+0x120/0x380 netlink_unicast+0x439/0x630 netlink_sendmsg+0x719/0xbf0 sock_sendmsg+0xe2/0x110 ____sys_sendmsg+0x5ba/0x890 ___sys_sendmsg+0xe9/0x160 __sys_sendmsg+0xd3/0x170 do_syscall_64+0x3c/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888171306800 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 36 bytes to the right of 256-byte region [ffff888171306800, ffff888171306900) The buggy address belongs to the page: page:00000000bcfb624e refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x171306 head:00000000bcfb624e order:1 compound_mapcount:0 flags: 0x17ffffc0010200(slab|head|node=0|zone=2|lastcpupid=0x1fffff) raw: 0017ffffc0010200 dead000000000100 dead000000000122 ffff888100042b40 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888171306800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888171306880: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc >ffff888171306900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888171306980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888171306a00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fix fq_pie traffic path to avoid selecting 'q->flows + q->flows_cnt' as a valid flow: it's an address beyond the allocated memory. Fixes: ec97ecf1ebe4 ("net: sched: add Flow Queue PIE packet scheduler") CC: stable@vger.kernel.org Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 3a62fed2fd7b6fea96d720e779cafc30dfb3a22e Author: Davide Caratti Date: Sat May 22 15:14:45 2021 +0200 net/sched: fq_pie: re-factor fix for fq_pie endless loop the patch that fixed an endless loop in_fq_pie_init() was not considering that 65535 is a valid class id. The correct bugfix for this infinite loop is to change 'idx' to become an u32, like Colin proposed in the past [1]. Fix this as follows: - restore 65536 as maximum possible values of 'flows_cnt' - use u32 'idx' when iterating on 'q->flows' - fix the TDC selftest This reverts commit bb2f930d6dd708469a587dc9ed1efe1ef969c0bf. [1] https://lore.kernel.org/netdev/20210407163808.499027-1-colin.king@canonical.com/ CC: Colin Ian King CC: stable@vger.kernel.org Fixes: bb2f930d6dd7 ("net/sched: fix infinite loop in sch_fq_pie") Fixes: ec97ecf1ebe4 ("net: sched: add Flow Queue PIE packet scheduler") Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 5eff1461a6dec84f04fafa9128548bad51d96147 Author: Zong Li Date: Sat May 22 17:16:11 2021 +0800 net: macb: ensure the device is available before accessing GEMGXL control registers If runtime power menagement is enabled, the gigabit ethernet PLL would be disabled after macb_probe(). During this period of time, the system would hang up if we try to access GEMGXL control registers. We can't put runtime_pm_get/runtime_pm_put/ there due to the issue of sleep inside atomic section (7fa2955ff70ce453 ("sh_eth: Fix sleeping function called from invalid context"). Add netif_running checking to ensure the device is available before accessing GEMGXL device. Changed in v2: - Use netif_running instead of its own flag Signed-off-by: Zong Li Signed-off-by: David S. Miller commit ad79fd2c42f7626bdf6935cd72134c2a5a59ff2d Author: Stefan Roese Date: Sat May 22 09:56:30 2021 +0200 net: ethernet: mtk_eth_soc: Fix packet statistics support for MT7628/88 The MT7628/88 SoC(s) have other (limited) packet counter registers than currently supported in the mtk_eth_soc driver. This patch adds support for reading these registers, so that the packet statistics are correctly updated. Additionally the defines for the non-MT7628 variant packet counter registers are added and used in this patch instead of using hard coded values. Signed-off-by: Stefan Roese Fixes: 296c9120752b ("net: ethernet: mediatek: Add MT7628/88 SoC support") Cc: Felix Fietkau Cc: John Crispin Cc: Ilya Lipnitskiy Cc: Reto Schneider Cc: Reto Schneider Cc: David S. Miller Signed-off-by: David S. Miller commit 1e69abf98921fa27e2064970b614502d85230f9f Author: Vinicius Costa Gomes Date: Fri May 21 17:46:54 2021 -0700 MAINTAINERS: Add entries for CBS, ETF and taprio qdiscs Add Vinicius Costa Gomes as maintainer for these qdiscs. These qdiscs are all TSN (Time Sensitive Networking) related. Signed-off-by: Vinicius Costa Gomes Acked-by: Cong Wang Signed-off-by: David S. Miller commit c4681547bcce777daf576925a966ffa824edd09d Author: Linus Torvalds Date: Sun May 23 11:42:48 2021 -1000 Linux 5.13-rc3 commit 6ebb6814a1ef9573d8488232b50dc53b394c025a Merge: 0898678c742ee 488e13a489e97 Author: Linus Torvalds Date: Sun May 23 06:32:40 2021 -1000 Merge tag 'perf-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Thomas Gleixner: "Two perf fixes: - Do not check the LBR_TOS MSR when setting up unrelated LBR MSRs as this can cause malfunction when TOS is not supported - Allocate the LBR XSAVE buffers along with the DS buffers upfront because allocating them when adding an event can deadlock" * tag 'perf-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/lbr: Remove cpuc->lbr_xsave allocation from atomic context perf/x86: Avoid touching LBR_TOS MSR for Arch LBR commit 0898678c742ee913691d7f4a1606309825eee33b Merge: f73d2a429334d 3a010c493271f Author: Linus Torvalds Date: Sun May 23 06:30:08 2021 -1000 Merge tag 'locking-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "Two locking fixes: - Invoke the lockdep tracepoints in the correct place so the ordering is correct again - Don't leave the mutex WAITER bit stale when the last waiter is dropping out early due to a signal as that forces all subsequent lock operations needlessly into the slowpath until it's cleaned up again" * tag 'locking-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal locking/lockdep: Correct calling tracepoints commit f73d2a429334dbd30bc9a7e5ef5e07a676d3d499 Merge: 7de7ac8d60697 b4764905ea5b2 Author: Linus Torvalds Date: Sun May 23 06:28:20 2021 -1000 Merge tag 'irq-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: "A few fixes for irqchip drivers: - Allocate interrupt descriptors correctly on Mainstone PXA when SPARSE_IRQ is enabled; otherwise the interrupt association fails - Make the APPLE AIC chip driver depend on APPLE - Remove redundant error output on devm_ioremap_resource() failure" * tag 'irq-urgent-2021-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip: Remove redundant error printing irqchip/apple-aic: APPLE_AIC should depend on ARCH_APPLE ARM: PXA: Fix cplds irqdesc allocation when using legacy mode commit 7de7ac8d60697d844489b6a68649fa9873174eec Merge: 28ceac6959e1d 4954f5b8ef0ba Author: Linus Torvalds Date: Sun May 23 06:12:25 2021 -1000 Merge tag 'x86_urgent_for_v5.13_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: - Fix how SEV handles MMIO accesses by forwarding potential page faults instead of killing the machine and by using the accessors with the exact functionality needed when accessing memory. - Fix a confusion with Clang LTO compiler switches passed to the it - Handle the case gracefully when VMGEXIT has been executed in userspace * tag 'x86_urgent_for_v5.13_rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev-es: Use __put_user()/__get_user() for data accesses x86/sev-es: Forward page-faults which happen during emulation x86/sev-es: Don't return NULL from sev_es_get_ghcb() x86/build: Fix location of '-plugin-opt=' flags x86/sev-es: Invalidate the GHCB after completing VMGEXIT x86/sev-es: Move sev_es_put_ghcb() in prep for follow on patch commit 28ceac6959e1db015729c52ec74e0a4ff496c2b8 Merge: 4d7620341eda3 d72500f992849 Author: Linus Torvalds Date: Sun May 23 06:07:33 2021 -1000 Merge tag 'powerpc-5.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix breakage of strace (and other ptracers etc.) when using the new scv ABI (Power9 or later with glibc >= 2.33). - Fix early_ioremap() on 64-bit, which broke booting on some machines. Thanks to Dmitry V. Levin, Nicholas Piggin, Alexey Kardashevskiy, and Christophe Leroy. * tag 'powerpc-5.13-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64s/syscall: Fix ptrace syscall info with scv syscalls powerpc/64s/syscall: Use pt_regs.trap to distinguish syscall ABI difference between sc and scv syscalls powerpc: Fix early setup to make early_ioremap() work commit e169fba4f464760dd9734c9e39e1c2e88e374f32 Merge: 4ff2473bdb4cf 942859d969de7 Author: Ingo Molnar Date: Sun May 23 11:39:02 2021 +0200 Merge tag 'efi-urgent-for-v5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into efi/urgent Pull EFI fixes for v5.13-rc from Ard Biesheuvel: "A handful of low urgency EFI fixes accumulated over the past couple of months." Signed-off-by: Ingo Molnar commit 2b899f31f1a6db2db4608bac2ac04fe2c4ad89eb Author: kernel test robot Date: Sun May 23 02:09:00 2021 +0800 ALSA: usb-audio: scarlett2: snd_scarlett_gen2_controls_create() can be static sound/usb/mixer_scarlett_gen2.c:2000:5: warning: symbol 'snd_scarlett_gen2_controls_create' was not declared. Should it be static? Fixes: 265d1a90e4fb ("ALSA: usb-audio: scarlett2: Improve driver startup messages") Reported-by: kernel test robot Signed-off-by: kernel test robot Link: https://lore.kernel.org/r/20210522180900.GA83915@f59a3af2f1d9 Signed-off-by: Takashi Iwai commit 4d7620341eda38573a73ab63c33423534fa38eb9 Merge: 34c5c89890d62 c93db682cfb21 Author: Linus Torvalds Date: Sat May 22 19:53:56 2021 -1000 Merge tag 'kbuild-fixes-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild fixes from Masahiro Yamada: - Fix short log indentation for tools builds - Fix dummy-tools to adjust to the latest stackprotector check * tag 'kbuild-fixes-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: dummy-tools: adjust to stricter stackprotector check scripts/jobserver-exec: Fix a typo ("envirnoment") tools build: Fix quiet cmd indentation commit b73eb6b3b91ff7d76cff5f8c7ab92fe0c51e3829 Author: Geert Uytterhoeven Date: Fri May 21 09:54:07 2021 +0200 ARM: dts: imx: emcon-avari: Fix nxp,pca8574 #gpio-cells According to the DT bindings, #gpio-cells must be two. Fixes: 63e71fedc07c4ece ("ARM: dts: Add support for emtrion emCON-MX6 series") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Signed-off-by: Shawn Guo commit 0e2fa4959c4f44815ce33e46e4054eeb0f346053 Author: Fabio Estevam Date: Thu May 20 18:42:13 2021 -0300 ARM: dts: imx7d-pico: Fix the 'tuning-step' property According to Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml, the correct name of the property is 'fsl,tuning-step'. Fix it accordingly. Signed-off-by: Fabio Estevam Fixes: f13f571ac8a1 ("ARM: dts: imx7d-pico: Extend peripherals support") Signed-off-by: Shawn Guo commit 7c8f0338cdacc90fdf6468adafa8e27952987f00 Author: Fabio Estevam Date: Thu May 20 18:42:12 2021 -0300 ARM: dts: imx7d-meerkat96: Fix the 'tuning-step' property According to Documentation/devicetree/bindings/mmc/fsl-imx-esdhc.yaml, the correct name of the property is 'fsl,tuning-step'. Fix it accordingly. Signed-off-by: Fabio Estevam Fixes: ae7b3384b61b ("ARM: dts: Add support for 96Boards Meerkat96 board") Signed-off-by: Shawn Guo commit 52387bb9a4a75b88887383cb91d3995ae6f4044a Author: Michael Walle Date: Fri May 14 20:55:53 2021 +0200 arm64: dts: freescale: sl28: var1: fix RGMII clock and voltage During hardware validation it was noticed that the clock isn't continuously enabled when there is no link. This is because the 125MHz clock is derived from the internal PLL which seems to go into some kind of power-down mode every once in a while. The LS1028A expects a contiuous clock. Thus enable the PLL all the time. Also, the RGMII pad voltage is wrong, it was configured to 2.5V (that is the VDDH regulator). The correct voltage is 1.8V, i.e. the VDDIO regulator. This fix is for the freescale/fsl-ls1028a-kontron-sl28-var1.dts. Fixes: 642856097c18 ("arm64: dts: freescale: sl28: add variant 1") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 25201269c6ec3e9398426962ccdd55428261f7d0 Author: Michael Walle Date: Fri May 14 20:55:52 2021 +0200 arm64: dts: freescale: sl28: var4: fix RGMII clock and voltage During hardware validation it was noticed that the clock isn't continuously enabled when there is no link. This is because the 125MHz clock is derived from the internal PLL which seems to go into some kind of power-down mode every once in a while. The LS1028A expects a contiuous clock. Thus enable the PLL all the time. Also, the RGMII pad voltage is wrong. It was configured to 2.5V (that is the VDDH regulator). The correct voltage is 1.8V, i.e. the VDDIO regulator. This fix is for the freescale/fsl-ls1028a-kontron-sl28-var4.dts. Fixes: 815364d0424e ("arm64: dts: freescale: add Kontron sl28 support") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit bab0d47c0ebb50ae0bcfa4e84986a60113bf7d6b Author: Jisheng Zhang Date: Sun May 9 00:44:43 2021 +0800 riscv: kexec: Fix W=1 build warnings Fixes the following W=1 build warning(s): In file included from include/linux/kexec.h:28, from arch/riscv/kernel/machine_kexec.c:7: arch/riscv/include/asm/kexec.h:45:1: warning: ‘extern’ is not at beginning of declaration [-Wold-style-declaration] 45 | const extern unsigned char riscv_kexec_relocate[]; | ^~~~~ arch/riscv/include/asm/kexec.h:46:1: warning: ‘extern’ is not at beginning of declaration [-Wold-style-declaration] 46 | const extern unsigned int riscv_kexec_relocate_size; | ^~~~~ arch/riscv/kernel/machine_kexec.c:125:6: warning: no previous prototype for ‘machine_shutdown’ [-Wmissing-prototypes] 125 | void machine_shutdown(void) | ^~~~~~~~~~~~~~~~ arch/riscv/kernel/machine_kexec.c:147:1: warning: no previous prototype for ‘machine_crash_shutdown’ [-Wmissing-prototypes] 147 | machine_crash_shutdown(struct pt_regs *regs) | ^~~~~~~~~~~~~~~~~~~~~~ arch/riscv/kernel/machine_kexec.c:23: warning: Function parameter or member 'image' not described in 'kexec_image_info' arch/riscv/kernel/machine_kexec.c:53: warning: Function parameter or member 'image' not described in 'machine_kexec_prepare' arch/riscv/kernel/machine_kexec.c:114: warning: Function parameter or member 'image' not described in 'machine_kexec_cleanup' arch/riscv/kernel/machine_kexec.c:148: warning: Function parameter or member 'regs' not described in 'machine_crash_shutdown' arch/riscv/kernel/machine_kexec.c:167: warning: Function parameter or member 'image' not described in 'machine_kexec' Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 02ccdeed1817a587161ad091887e11ac8a2586b2 Author: Jisheng Zhang Date: Sat May 8 23:43:47 2021 +0800 riscv: kprobes: Fix build error when MMU=n lkp reported a randconfig failure: arch/riscv/kernel/probes/kprobes.c:90:22: error: use of undeclared identifier 'PAGE_KERNEL_READ_EXEC' We implemented the alloc_insn_page() to allocate PAGE_KERNEL_READ_EXEC page for kprobes insn page for STRICT_MODULE_RWX. But if MMU=n, we should fall back to the generic weak alloc_insn_page() by generic kprobe subsystem. Fixes: cdd1b2bd358f ("riscv: kprobes: Implement alloc_insn_page()") Signed-off-by: Jisheng Zhang Reported-by: kernel test robot Signed-off-by: Palmer Dabbelt commit 779b56bb679767712761a79232331f8519402e75 Author: Fabio Estevam Date: Sat May 8 13:03:19 2021 -0300 ARM: imx: pm-imx27: Include "common.h" Since commit 879c0e5e0ac7 ("ARM: imx: Remove i.MX27 board files") the following W=1 build warning is seen: arch/arm/mach-imx/pm-imx27.c:40:13: warning: no previous prototype for 'imx27_pm_init' [-Wmissing-prototypes] Fix it by including the "common.h" header file, which contains the prototype for imx27_pm_init(). Fixes: 879c0e5e0ac7 ("ARM: imx: Remove i.MX27 board files") Reported-by: kernel test robot Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit ac0cbf9d13dccfd09bebc2f8f5697b6d3ffe27c4 Author: Lucas Stach Date: Fri May 7 21:44:40 2021 +0200 arm64: dts: zii-ultra: fix 12V_MAIN voltage As this is a fixed regulator on the board there was no harm in the wrong voltage being specified, apart from a confusing reporting to userspace. Fixes: 4a13b3bec3b4 ("arm64: dts: imx: add Zii Ultra board support") Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit e98d98028989e023e0cbff539dc616c4e5036839 Author: Lucas Stach Date: Fri May 7 21:44:39 2021 +0200 arm64: dts: zii-ultra: remove second GEN_3V3 regulator instance When adding the sound support a second instance of the GEN_3V3 regulator was added by accident. Remove it and point the consumers to the first instance. Fixes: 663a5b5efa51 ("arm64: dts: zii-ultra: add sound support") Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo commit 97a031082320897ee5b06352d0ab3d7cf47321d3 Author: Kefeng Wang Date: Fri May 7 17:47:15 2021 +0800 riscv: Select ARCH_USE_MEMTEST As of commit dce44566192e ("mm/memtest: add ARCH_USE_MEMTEST"), architectures must select ARCH_USE_MEMTESET to enable CONFIG_MEMTEST. Signed-off-by: Kefeng Wang Fixes: f6e5aedf470b ("riscv: Add support for memtest") Signed-off-by: Palmer Dabbelt commit eac2f3059e02382d91f8c887462083841d6ea2a3 Author: Chen Huang Date: Thu Apr 29 07:03:48 2021 +0000 riscv: stacktrace: fix the riscv stacktrace when CONFIG_FRAME_POINTER enabled As [1] and [2] said, the arch_stack_walk should not to trace itself, or it will leave the trace unexpectedly when called. The example is when we do "cat /sys/kernel/debug/page_owner", all pages' stack is the same. arch_stack_walk+0x18/0x20 stack_trace_save+0x40/0x60 register_dummy_stack+0x24/0x5e init_page_owner+0x2e So we use __builtin_frame_address(1) as the first frame to be walked. And mark the arch_stack_walk() noinline. We found that pr_cont will affact pages' stack whose task state is RUNNING when testing "echo t > /proc/sysrq-trigger". So move the place of pr_cont and mark the function dump_backtrace() noinline. Also we move the case when task == NULL into else branch, and test for it in "echo c > /proc/sysrq-trigger". [1] https://lore.kernel.org/lkml/20210319184106.5688-1-mark.rutland@arm.com/ [2] https://lore.kernel.org/lkml/20210317142050.57712-1-chenjun102@huawei.com/ Signed-off-by: Chen Huang Fixes: 5d8544e2d007 ("RISC-V: Generic library routines and assembly") Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit 34c5c89890d6295621b6f09b18e7ead9046634bc Merge: 4ff2473bdb4cf e32905e57358f Author: Linus Torvalds Date: Sat May 22 15:20:20 2021 -1000 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "10 patches. Subsystems affected by this patch series: mm (pagealloc, gup, kasan, and userfaultfd), ipc, selftests, watchdog, bitmap, procfs, and lib" * emailed patches from Andrew Morton : userfaultfd: hugetlbfs: fix new flag usage in error path lib: kunit: suppress a compilation warning of frame size proc: remove Alexey from MAINTAINERS linux/bits.h: fix compilation error with GENMASK watchdog: reliable handling of timestamps kasan: slab: always reset the tag in get_freepointer_safe() tools/testing/selftests/exec: fix link error ipc/mqueue, msg, sem: avoid relying on a stack reference past its expiry Revert "mm/gup: check page posion status for coredump." mm/shuffle: fix section mismatch warning commit e32905e57358fdfb82f9de024534f205b3af7dac Author: Mike Kravetz Date: Sat May 22 17:42:11 2021 -0700 userfaultfd: hugetlbfs: fix new flag usage in error path In commit d6995da31122 ("hugetlb: use page.private for hugetlb specific page flags") the use of PagePrivate to indicate a reservation count should be restored at free time was changed to the hugetlb specific flag HPageRestoreReserve. Changes to a userfaultfd error path as well as a VM_BUG_ON() in remove_inode_hugepages() were overlooked. Users could see incorrect hugetlb reserve counts if they experience an error with a UFFDIO_COPY operation. Specifically, this would be the result of an unlikely copy_huge_page_from_user error. There is not an increased chance of hitting the VM_BUG_ON. Link: https://lkml.kernel.org/r/20210521233952.236434-1-mike.kravetz@oracle.com Fixes: d6995da31122 ("hugetlb: use page.private for hugetlb specific page flags") Signed-off-by: Mike Kravetz Reviewed-by: Mina Almasry Cc: Oscar Salvador Cc: Michal Hocko Cc: Muchun Song Cc: Naoya Horiguchi Cc: David Hildenbrand Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1b6d63938a9d868df01d5bc6e2da212133121b8d Author: Zhen Lei Date: Sat May 22 17:42:08 2021 -0700 lib: kunit: suppress a compilation warning of frame size lib/bitfield_kunit.c: In function `test_bitfields_constants': lib/bitfield_kunit.c:93:1: warning: the frame size of 7456 bytes is larger than 2048 bytes [-Wframe-larger-than=] } ^ As the description of BITFIELD_KUNIT in lib/Kconfig.debug, it "Only useful for kernel devs running the KUnit test harness, and not intended for inclusion into a production build". Therefore, it is not worth modifying variable 'test_bitfields_constants' to clear this warning. Just suppress it. Link: https://lkml.kernel.org/r/20210518094533.7652-1-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei Cc: Shuah Khan Cc: Vitor Massaru Iha Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 43b2ec977ce33b53e2be30999824b584e2be248a Author: Alexey Dobriyan Date: Sat May 22 17:42:05 2021 -0700 proc: remove Alexey from MAINTAINERS People Cc me and I don't have time. Link: https://lkml.kernel.org/r/YKarMxHJBIhMHQIh@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f747e6667ebb2ffb8133486c9cd19800d72b0d98 Author: Rikard Falkeborn Date: Sat May 22 17:42:02 2021 -0700 linux/bits.h: fix compilation error with GENMASK GENMASK() has an input check which uses __builtin_choose_expr() to enable a compile time sanity check of its inputs if they are known at compile time. However, it turns out that __builtin_constant_p() does not always return a compile time constant [0]. It was thought this problem was fixed with gcc 4.9 [1], but apparently this is not the case [2]. Switch to use __is_constexpr() instead which always returns a compile time constant, regardless of its inputs. Link: https://lore.kernel.org/lkml/42b4342b-aefc-a16a-0d43-9f9c0d63ba7a@rasmusvillemoes.dk [0] Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19449 [1] Link: https://lore.kernel.org/lkml/1ac7bbc2-45d9-26ed-0b33-bf382b8d858b@I-love.SAKURA.ne.jp [2] Link: https://lkml.kernel.org/r/20210511203716.117010-1-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Reported-by: Tetsuo Handa Acked-by: Arnd Bergmann Reviewed-by: Andy Shevchenko Cc: Ard Biesheuvel Cc: Yury Norov Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0f90b88dbcd1143e0f408502eba0af97429c502a Author: Petr Mladek Date: Sat May 22 17:41:59 2021 -0700 watchdog: reliable handling of timestamps Commit 9bf3bc949f8a ("watchdog: cleanup handling of false positives") tried to handle a virtual host stopped by the host a more straightforward and cleaner way. But it introduced a risk of false softlockup reports. The virtual host might be stopped at any time, for example between kvm_check_and_clear_guest_paused() and is_softlockup(). As a result, is_softlockup() might read the updated jiffies and detects a softlockup. A solution might be to put back kvm_check_and_clear_guest_paused() after is_softlockup() and detect it. But it would put back the cycle that complicates the logic. In fact, the handling of all the timestamps is not reliable. The code does not guarantee when and how many times the timestamps are read. For example, "period_ts" might be touched anytime also from NMI and re-read in is_softlockup(). It works just by chance. Fix all the problems by making the code even more explicit. 1. Make sure that "now" and "period_ts" timestamps are read only once. They might be changed at anytime by NMI or when the virtual guest is stopped by the host. Note that "now" timestamp does this implicitly because "jiffies" is marked volatile. 2. "now" time must be read first. The state of "period_ts" will decide whether it will be used or the period will get restarted. 3. kvm_check_and_clear_guest_paused() must be called before reading "period_ts". It touches the variable when the guest was stopped. As a result, "now" timestamp is used only when the watchdog was not touched and the guest not stopped in the meantime. "period_ts" is restarted in all other situations. Link: https://lkml.kernel.org/r/YKT55gw+RZfyoFf7@alley Fixes: 9bf3bc949f8aeefeacea4b ("watchdog: cleanup handling of false positives") Signed-off-by: Petr Mladek Reported-by: Sergey Senozhatsky Reviewed-by: Sergey Senozhatsky Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f70b00496f2a0669fdb19a783e613bdbdedcf901 Author: Alexander Potapenko Date: Sat May 22 17:41:56 2021 -0700 kasan: slab: always reset the tag in get_freepointer_safe() With CONFIG_DEBUG_PAGEALLOC enabled, the kernel should also untag the object pointer, as done in get_freepointer(). Failing to do so reportedly leads to SLUB freelist corruptions that manifest as boot-time crashes. Link: https://lkml.kernel.org/r/20210514072228.534418-1-glider@google.com Signed-off-by: Alexander Potapenko Cc: Marco Elver Cc: Vincenzo Frascino Cc: Andrey Ryabinin Cc: Andrey Konovalov Cc: Elliot Berman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4d1cd3b2c5c1c32826454de3a18c6183238d47ed Author: Yang Yingliang Date: Sat May 22 17:41:53 2021 -0700 tools/testing/selftests/exec: fix link error Fix the link error by adding '-static': gcc -Wall -Wl,-z,max-page-size=0x1000 -pie load_address.c -o /home/yang/linux/tools/testing/selftests/exec/load_address_4096 /usr/bin/ld: /tmp/ccopEGun.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stderr@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: /tmp/ccopEGun.o(.text+0x158): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17' /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make: *** [Makefile:25: tools/testing/selftests/exec/load_address_4096] Error 1 Link: https://lkml.kernel.org/r/20210514092422.2367367-1-yangyingliang@huawei.com Fixes: 206e22f01941 ("tools/testing/selftests: add self-test for verifying load alignment") Signed-off-by: Yang Yingliang Cc: Chris Kennelly Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a11ddb37bf367e6b5239b95ca759e5389bb46048 Author: Varad Gautam Date: Sat May 22 17:41:49 2021 -0700 ipc/mqueue, msg, sem: avoid relying on a stack reference past its expiry do_mq_timedreceive calls wq_sleep with a stack local address. The sender (do_mq_timedsend) uses this address to later call pipelined_send. This leads to a very hard to trigger race where a do_mq_timedreceive call might return and leave do_mq_timedsend to rely on an invalid address, causing the following crash: RIP: 0010:wake_q_add_safe+0x13/0x60 Call Trace: __x64_sys_mq_timedsend+0x2a9/0x490 do_syscall_64+0x80/0x680 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f5928e40343 The race occurs as: 1. do_mq_timedreceive calls wq_sleep with the address of `struct ext_wait_queue` on function stack (aliased as `ewq_addr` here) - it holds a valid `struct ext_wait_queue *` as long as the stack has not been overwritten. 2. `ewq_addr` gets added to info->e_wait_q[RECV].list in wq_add, and do_mq_timedsend receives it via wq_get_first_waiter(info, RECV) to call __pipelined_op. 3. Sender calls __pipelined_op::smp_store_release(&this->state, STATE_READY). Here is where the race window begins. (`this` is `ewq_addr`.) 4. If the receiver wakes up now in do_mq_timedreceive::wq_sleep, it will see `state == STATE_READY` and break. 5. do_mq_timedreceive returns, and `ewq_addr` is no longer guaranteed to be a `struct ext_wait_queue *` since it was on do_mq_timedreceive's stack. (Although the address may not get overwritten until another function happens to touch it, which means it can persist around for an indefinite time.) 6. do_mq_timedsend::__pipelined_op() still believes `ewq_addr` is a `struct ext_wait_queue *`, and uses it to find a task_struct to pass to the wake_q_add_safe call. In the lucky case where nothing has overwritten `ewq_addr` yet, `ewq_addr->task` is the right task_struct. In the unlucky case, __pipelined_op::wake_q_add_safe gets handed a bogus address as the receiver's task_struct causing the crash. do_mq_timedsend::__pipelined_op() should not dereference `this` after setting STATE_READY, as the receiver counterpart is now free to return. Change __pipelined_op to call wake_q_add_safe on the receiver's task_struct returned by get_task_struct, instead of dereferencing `this` which sits on the receiver's stack. As Manfred pointed out, the race potentially also exists in ipc/msg.c::expunge_all and ipc/sem.c::wake_up_sem_queue_prepare. Fix those in the same way. Link: https://lkml.kernel.org/r/20210510102950.12551-1-varad.gautam@suse.com Fixes: c5b2cbdbdac563 ("ipc/mqueue.c: update/document memory barriers") Fixes: 8116b54e7e23ef ("ipc/sem.c: document and update memory barriers") Fixes: 0d97a82ba830d8 ("ipc/msg.c: update and document memory barriers") Signed-off-by: Varad Gautam Reported-by: Matthias von Faber Acked-by: Davidlohr Bueso Acked-by: Manfred Spraul Cc: Christian Brauner Cc: Oleg Nesterov Cc: "Eric W. Biederman" Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f10628d2f613195132532e0fbda439eeed8d12a2 Author: Michal Hocko Date: Sat May 22 17:41:46 2021 -0700 Revert "mm/gup: check page posion status for coredump." While reviewing [1] I came across commit d3378e86d182 ("mm/gup: check page posion status for coredump.") and noticed that this patch is broken in two ways. First it doesn't really prevent hwpoison pages from being dumped because hwpoison pages can be marked asynchornously at any time after the check. Secondly, and more importantly, the patch introduces a ref count leak because get_dump_page takes a reference on the page which is not released. It also seems that the patch was merged incorrectly because there were follow up changes not included as well as discussions on how to address the underlying problem [2] Therefore revert the original patch. Link: http://lkml.kernel.org/r/20210429122519.15183-4-david@redhat.com [1] Link: http://lkml.kernel.org/r/57ac524c-b49a-99ec-c1e4-ef5027bfb61b@redhat.com [2] Link: https://lkml.kernel.org/r/20210505135407.31590-1-mhocko@kernel.org Fixes: d3378e86d182 ("mm/gup: check page posion status for coredump.") Signed-off-by: Michal Hocko Reviewed-by: David Hildenbrand Cc: Aili Yao Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9f74dc218c3cfdf0b7f9a95ddae81a081bdb79d Author: Arnd Bergmann Date: Sat May 22 17:41:43 2021 -0700 mm/shuffle: fix section mismatch warning clang sometimes decides not to inline shuffle_zone(), but it calls a __meminit function. Without the extra __meminit annotation we get this warning: WARNING: modpost: vmlinux.o(.text+0x2a86d4): Section mismatch in reference from the function shuffle_zone() to the function .meminit.text:__shuffle_zone() The function shuffle_zone() references the function __meminit __shuffle_zone(). This is often because shuffle_zone lacks a __meminit annotation or the annotation of __shuffle_zone is wrong. shuffle_free_memory() did not show the same problem in my tests, but it could happen in theory as well, so mark both as __meminit. Link: https://lkml.kernel.org/r/20210514135952.2928094-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: David Hildenbrand Reviewed-by: Nathan Chancellor Cc: Nick Desaulniers Cc: Arnd Bergmann Cc: Wei Yang Cc: Dan Williams Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ff2473bdb4cf2bb7d208ccf4418d3d7e6b1652c Merge: b9231dfbcbc00 bc6a385132601 Author: Linus Torvalds Date: Sat May 22 07:40:34 2021 -1000 Merge tag 'block-5.13-2021-05-22' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Fix BLKRRPART and deletion race (Gulam, Christoph) - NVMe pull request (Christoph): - nvme-tcp corruption and timeout fixes (Sagi Grimberg, Keith Busch) - nvme-fc teardown fix (James Smart) - nvmet/nvme-loop memory leak fixes (Wu Bo)" * tag 'block-5.13-2021-05-22' of git://git.kernel.dk/linux-block: block: fix a race between del_gendisk and BLKRRPART block: prevent block device lookups at the beginning of del_gendisk nvme-fc: clear q_live at beginning of association teardown nvme-tcp: rerun io_work if req_list is not empty nvme-tcp: fix possible use-after-completion nvme-loop: fix memory leak in nvme_loop_create_ctrl() nvmet: fix memory leak in nvmet_alloc_ctrl() commit b9231dfbcbc0034cf333fee33c190853daee48c0 Merge: 23d729263037e ba5ef6dc8a827 Author: Linus Torvalds Date: Sat May 22 07:36:36 2021 -1000 Merge tag 'io_uring-5.13-2021-05-22' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "One fix for a regression with poll in this merge window, and another just hardens the io-wq exit path a bit" * tag 'io_uring-5.13-2021-05-22' of git://git.kernel.dk/linux-block: io_uring: fortify tctx/io_wq cleanup io_uring: don't modify req->poll for rw commit 23d729263037eddd7413535c68ccf9472a197ccd Merge: a3969ef463f97 c81d3d2460254 Author: Linus Torvalds Date: Sat May 22 07:33:09 2021 -1000 Merge tag 'for-linus-5.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - a fix for a boot regression when running as PV guest on hardware without NX support - a small series fixing a bug in the Xen pciback driver when configuring a PCI card with multiple virtual functions * tag 'for-linus-5.13b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen-pciback: reconfigure also from backend watch handler xen-pciback: redo VF placement in the virtual topology x86/Xen: swap NX determination and GDT setup on BSP commit dabea675faf16e8682aa478ff3ce65dd775620bc Author: Michael Walle Date: Thu Apr 8 13:02:18 2021 +0200 arm64: dts: ls1028a: fix memory node While enabling EDAC support for the LS1028A it was discovered that the memory node has a wrong endianness setting as well as a wrong interrupt assignment. Fix both. This was tested on a sl28 board. To force ECC errors, you can use the error injection supported by the controller in hardware (with CONFIG_EDAC_DEBUG enabled): # enable error injection $ echo 0x100 > /sys/devices/system/edac/mc/mc0/inject_ctrl # flip lowest bit of the data $ echo 0x1 > /sys/devices/system/edac/mc/mc0/inject_data_lo Fixes: 8897f3255c9c ("arm64: dts: Add support for NXP LS1028A SoC") Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 942859d969de7f6f7f2659a79237a758b42782da Author: Rasmus Villemoes Date: Wed Apr 21 21:46:36 2021 +0200 efi: cper: fix snprintf() use in cper_dimm_err_location() snprintf() should be given the full buffer size, not one less. And it guarantees nul-termination, so doing it manually afterwards is pointless. It's even potentially harmful (though probably not in practice because CPER_REC_LEN is 256), due to the "return how much would have been written had the buffer been big enough" semantics. I.e., if the bank and/or device strings are long enough that the "DIMM location ..." output gets truncated, writing to msg[n] is a buffer overflow. Signed-off-by: Rasmus Villemoes Fixes: 3760cd20402d4 ("CPER: Adjust code flow of some functions") Signed-off-by: Ard Biesheuvel commit c4039b29fe9637e1135912813f830994af4c867f Author: Dan Carpenter Date: Fri Apr 23 14:48:31 2021 +0300 efi/libstub: prevent read overflow in find_file_option() If the buffer has slashes up to the end then this will read past the end of the array. I don't anticipate that this is an issue for many people in real life, but it's the right thing to do and it makes static checkers happy. Fixes: 7a88a6227dc7 ("efi/libstub: Fix path separator regression") Signed-off-by: Dan Carpenter Signed-off-by: Ard Biesheuvel commit 45add3cc99feaaf57d4b6f01d52d532c16a1caee Author: Heiner Kallweit Date: Fri Apr 30 16:22:51 2021 +0200 efi: Allow EFI_MEMORY_XP and EFI_MEMORY_RO both to be cleared UEFI spec 2.9, p.108, table 4-1 lists the scenario that both attributes are cleared with the description "No memory access protection is possible for Entry". So we can have valid entries where both attributes are cleared, so remove the check. Signed-off-by: Heiner Kallweit Fixes: 10f0d2f577053 ("efi: Implement generic support for the Memory Attributes table") Signed-off-by: Ard Biesheuvel commit 668a84c1bfb2b3fd5a10847825a854d63fac7baa Author: Changbin Du Date: Wed Mar 24 22:54:35 2021 +0800 efi/fdt: fix panic when no valid fdt found setup_arch() would invoke efi_init()->efi_get_fdt_params(). If no valid fdt found then initial_boot_params will be null. So we should stop further fdt processing here. I encountered this issue on risc-v. Signed-off-by: Changbin Du Fixes: b91540d52a08b ("RISC-V: Add EFI runtime services") Signed-off-by: Ard Biesheuvel commit 2cbd838e0e48bdaa47e56978a8868f2fdd2b196d Merge: 746e4acf87bca 9e3927f6373da Author: Greg Kroah-Hartman Date: Sat May 22 13:26:29 2021 +0200 Merge tag 'usb-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: Some small bug fixes for both chipidea and cdns USB * tag 'usb-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: chipidea: udc: assign interrupt number to USB gadget structure usb: cdnsp: Fix lack of removing request from pending list. usb: cdns3: Fix runtime PM imbalance on error commit 54732a5322ff1fe0f42f2527fa6f5901a4de5111 Merge: e0112a7c9e847 4ed243b1da169 Author: Greg Kroah-Hartman Date: Sat May 22 09:49:59 2021 +0200 Merge tag 'iio-fixes-5.13b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for the 5.13 cycle A mixed bag of fixes for various drivers. Changes since take 1: Fixed a ; in a tag. adi,ad7124 - Fix miss balanced regulator enable / disable in error path - Fix potential overflow with non sequential channel numbers from dt. adi,ad7192 - Avoid disabling clock that was never enabled in error path + remove - Avoid nasty corner case if regulator voltage is 0 that would result in a good return half way through probe. adi,ad7746 - Avoid overwriting num_channels just after setting it correctly. adi,ad7768 - Buffer passed to iio_push_to_buffers_with_timestamp() too small and not aligned appropriately. adi,ad7793 - Missing return code setting in an error path. adi,ad7923 - Buffer too small after support for more channels added. adi,ad5770r - Missing fwnode_handle_put in error paths. fsl,fxa21002c - Missing runtime pm put in error path. * tag 'iio-fixes-5.13b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: adc: ad7793: Add missing error code in ad7793_setup() iio: adc: ad7923: Fix undersized rx buffer. iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp() iio: dac: ad5770r: Put fwnode in error case during ->probe() iio: gyro: fxas21002c: balance runtime power in error path staging: iio: cdc: ad7746: avoid overwrite of num_channels iio: adc: ad7192: handle regulator voltage error first iio: adc: ad7192: Avoid disabling a clock that was never enabled. iio: adc: ad7124: Fix potential overflow due to non sequential channel numbers iio: adc: ad7124: Fix missbalanced regulator enable / disable on error. commit 4ed243b1da169bcbc1ec5507867e56250c5f1ff9 Author: YueHaibing Date: Fri May 14 16:02:54 2021 +0800 iio: adc: ad7793: Add missing error code in ad7793_setup() Set error code while device ID query failed. Fixes: 88bc30548aae ("IIO: ADC: New driver for AD7792/AD7793 3 Channel SPI ADC") Signed-off-by: YueHaibing Cc: Signed-off-by: Jonathan Cameron commit 01fcf129f61b26d5b3d2d8afb03e770dee271bc8 Author: Jonathan Cameron Date: Sat May 1 17:53:14 2021 +0100 iio: adc: ad7923: Fix undersized rx buffer. Fixes tag is where the max channels became 8, but timestamp space was missing before that. Fixes: 851644a60d20 ("iio: adc: ad7923: Add support for the ad7908/ad7918/ad7928") Signed-off-by: Jonathan Cameron Cc: Daniel Junho Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501165314.511954-3-jic23@kernel.org Cc: commit a1caeebab07e9d72eec534489f47964782b93ba9 Author: Jonathan Cameron Date: Sat May 1 17:53:13 2021 +0100 iio: adc: ad7768-1: Fix too small buffer passed to iio_push_to_buffers_with_timestamp() Add space for the timestamp to be inserted. Also ensure correct alignment for passing to iio_push_to_buffers_with_timestamp() Fixes: a5f8c7da3dbe ("iio: adc: Add AD7768-1 ADC basic support") Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501165314.511954-2-jic23@kernel.org Cc: commit 98b7b0ca0828907dbb706387c11356a45463e2ea Author: Andy Shevchenko Date: Mon May 10 12:56:49 2021 +0300 iio: dac: ad5770r: Put fwnode in error case during ->probe() device_for_each_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes: cbbb819837f6 ("iio: dac: ad5770r: Add AD5770R support") Cc: Alexandru Tachici Signed-off-by: Andy Shevchenko Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210510095649.3302835-1-andy.shevchenko@gmail.com Cc: Signed-off-by: Jonathan Cameron commit 2a54c8c9ebc2006bf72554afc84ffc67768979a0 Author: Rui Miguel Silva Date: Wed May 12 23:39:29 2021 +0100 iio: gyro: fxas21002c: balance runtime power in error path If we fail to read temperature or axis we need to decrement the runtime pm reference count to trigger autosuspend. Add the call to pm_put to do that in case of error. Fixes: a0701b6263ae ("iio: gyro: add core driver for fxas21002c") Suggested-by: Mauro Carvalho Chehab Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/linux-iio/CBBZA9T1OY9C.2611WSV49DV2G@arch-thunder/ Cc: Signed-off-by: Jonathan Cameron commit 9ebaef0540a981093bce5df15af32354d32391d9 Author: Hui Wang Date: Sat May 22 12:26:45 2021 +0800 ALSA: hda/realtek: the bass speaker can't output sound on Yoga 9i The Lenovo Yoga 9i has bass speaker, but the bass speaker can't work, that is because there is an i2s amplifier on that speaker, need to run ideapad_s740_coef() to initialize the amplifier. And also needs to apply ALC285_FIXUP_THINKPAD_HEADSET_JACK to rename the speaker's mixer control name, otherwise the PA can't handle them. BugLink: http://bugs.launchpad.net/bugs/1926165 Signed-off-by: Hui Wang Cc: Link: https://lore.kernel.org/r/20210522042645.14221-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 119b75c150773425a89033215eab4d15d4198f8b Author: Hui Wang Date: Sat May 22 11:47:41 2021 +0800 ALSA: hda/realtek: Headphone volume is controlled by Front mixer On some ASUS and MSI machines, the audio codec is alc1220 and the Headphone is connected to audio mixer 0xf and DAC 0x5, in theory the Headphone volume is controlled by DAC 0x5 (Heapdhone Playback Volume), but somehow it is controlled by DAC 0x2 (Front Playback Volume), maybe this is a defect on the codec alc1220. Because of this issue, the PA couldn't switch the headphone and Lineout correctly, If we apply the quirk CLEVO_P950 to those machines, the Lineout and Headphone will share the audio mixer 0xc and DAC 0x2, and generate Headphone+LO mixer, then PA could handle them when switching between them. BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1206 Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20210522034741.13415-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit a3969ef463f970c6ad99f32ca154fbd2a62bf97a Merge: 45af60e7ced07 e3c2b047475b5 Author: Linus Torvalds Date: Fri May 21 18:45:09 2021 -1000 Merge tag 'xfs-5.13-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs fixes from Darrick Wong: - Fix some math errors in the realtime allocator when extent size hints are applied. - Fix unnecessary short writes to realtime files when free space is fragmented. - Fix a crash when using scrub tracepoints. - Restore ioctl uapi definitions that were accidentally removed in 5.13-rc1. * tag 'xfs-5.13-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: restore old ioctl definitions xfs: fix deadlock retry tracepoint arguments xfs: retry allocations when locality-based search fails xfs: adjust rt allocation minlen when extszhint > rtextsize commit 2ef7665dfd88830f15415ba007c7c9a46be7acd8 Author: Dmitry Bogdanov Date: Thu Apr 15 23:35:54 2021 +0300 scsi: target: qla2xxx: Wait for stop_phase1 at WWN removal Target de-configuration panics at high CPU load because TPGT and WWPN can be removed on separate threads. TPGT removal requests a reset HBA on a separate thread and waits for reset complete (phase1). Due to high CPU load that HBA reset can be delayed for some time. WWPN removal does qlt_stop_phase2(). There it is believed that phase1 has already completed and thus tgt.tgt_ops is subsequently cleared. However, tgt.tgt_ops is needed to process incoming traffic and therefore this will cause one of the following panics: NIP qlt_reset+0x7c/0x220 [qla2xxx] LR qlt_reset+0x68/0x220 [qla2xxx] Call Trace: 0xc000003ffff63a78 (unreliable) qlt_handle_imm_notify+0x800/0x10c0 [qla2xxx] qlt_24xx_atio_pkt+0x208/0x590 [qla2xxx] qlt_24xx_process_atio_queue+0x33c/0x7a0 [qla2xxx] qla83xx_msix_atio_q+0x54/0x90 [qla2xxx] or NIP qlt_24xx_handle_abts+0xd0/0x2a0 [qla2xxx] LR qlt_24xx_handle_abts+0xb4/0x2a0 [qla2xxx] Call Trace: qlt_24xx_handle_abts+0x90/0x2a0 [qla2xxx] (unreliable) qlt_24xx_process_atio_queue+0x500/0x7a0 [qla2xxx] qla83xx_msix_atio_q+0x54/0x90 [qla2xxx] or NIP qlt_create_sess+0x90/0x4e0 [qla2xxx] LR qla24xx_do_nack_work+0xa8/0x180 [qla2xxx] Call Trace: 0xc0000000348fba30 (unreliable) qla24xx_do_nack_work+0xa8/0x180 [qla2xxx] qla2x00_do_work+0x674/0xbf0 [qla2xxx] qla2x00_iocb_work_fn The patch fixes the issue by serializing qlt_stop_phase1() and qlt_stop_phase2() functions to make WWPN removal wait for phase1 completion. Link: https://lore.kernel.org/r/20210415203554.27890-1-d.bogdanov@yadro.com Reviewed-by: Roman Bolshakov Signed-off-by: Dmitry Bogdanov Signed-off-by: Martin K. Petersen commit 7907a021e4bbfa29cccacd2ba2dade894d9a7d4c Author: Yang Yingliang Date: Wed May 19 21:05:19 2021 +0800 scsi: hisi_sas: Drop free_irq() of devm_request_irq() allocated irq irqs allocated with devm_request_irq() should not be freed using free_irq(). Doing so causes a dangling pointer and a subsequent double free. Link: https://lore.kernel.org/r/20210519130519.2661938-1-yangyingliang@huawei.com Reported-by: Hulk Robot Acked-by: John Garry Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen commit e662502b3a782d479e67736a5a1c169a703d853a Author: Matt Wang Date: Wed May 19 09:49:32 2021 +0000 scsi: vmw_pvscsi: Set correct residual data length Some commands (such as INQUIRY) may return less data than the initiator requested. To avoid conducting useless information, set the right residual count to make upper layer aware of this. Before (INQUIRY PAGE 0xB0 with 128B buffer): $ sg_raw -r 128 /dev/sda 12 01 B0 00 80 00 SCSI Status: Good Received 128 bytes of data: 00 00 b0 00 3c 01 00 00 00 00 00 00 00 00 00 00 00 ...<............ 10 00 00 00 00 00 01 00 00 00 00 00 40 00 00 08 00 ...........@.... 20 80 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 .......... ..... 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ After: $ sg_raw -r 128 /dev/sda 12 01 B0 00 80 00 SCSI Status: Good Received 64 bytes of data: 00 00 b0 00 3c 01 00 00 00 00 00 00 00 00 00 00 00 ...<............ 10 00 00 00 00 00 01 00 00 00 00 00 40 00 00 08 00 ...........@.... 20 80 00 00 00 00 00 00 00 00 00 20 00 00 00 00 00 .......... ..... 30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [mkp: clarified description] Link: https://lore.kernel.org/r/03C41093-B62E-43A2-913E-CFC92F1C70C3@vmware.com Signed-off-by: Matt Wang Signed-off-by: Martin K. Petersen commit 122c81c563b0c1c6b15ff76a9159af5ee1f21563 Author: Javed Hasan Date: Tue May 18 23:14:16 2021 -0700 scsi: bnx2fc: Return failure if io_req is already in ABTS processing Return failure from bnx2fc_eh_abort() if io_req is already in ABTS processing. Link: https://lore.kernel.org/r/20210519061416.19321-1-jhasan@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit b4de11dfb569043be2cb38b2b1031e64f8ee0ff6 Author: Tom Rix Date: Mon May 17 13:50:57 2021 -0700 scsi: aic7xxx: Remove multiple definition of globals Building aicasm with gcc 10.2 + gas 26.1 causes these errors: multiple definition of `args'; multiple definition of `yylineno'; args came from the expansion of: STAILQ_HEAD(macro_arg_list, macro_arg) args; The definition of the macro_arg_list structure is needed, the global variable 'args' is not, so delete it. yylineno is defined by flex, so defining it in bison/*.y file is not needed. Also delete this. Link: https://lore.kernel.org/r/20210517205057.1850010-1-trix@redhat.com Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen commit 7e7606330b167a0ff483fb02caed9267bfab69ee Author: Tom Rix Date: Mon May 17 06:24:51 2021 -0700 scsi: aic7xxx: Restore several defines for aic7xxx firmware build With CONFIG_AIC7XXX_BUILD_FIRMWARE, there is this representative error: aicasm: Stopped at file ./drivers/scsi/aic7xxx/aic7xxx.seq, line 271 - Undefined symbol MSG_SIMPLE_Q_TAG referenced MSG_SIMPLE_Q_TAG used to be defined in drivers/scsi/aic7xxx/scsi_message.h as: #define MSG_SIMPLE_Q_TAG 0x20 /* O/O */ The new definition in include/scsi/scsi.h is: #define SIMPLE_QUEUE_TAG 0x20 But aicasm can not handle the all the preprocessor directives in scsi.h, so add MSG_SIMPLE_Q_TAB and other required defines back to scsi_message.h. Link: https://lore.kernel.org/r/20210517132451.1832233-1-trix@redhat.com Fixes: d8cd784ff7b3 ("scsi: aic7xxx: aic79xx: Drop internal SCSI message definition" Signed-off-by: Tom Rix Signed-off-by: Martin K. Petersen commit 45af60e7ced07ae3def41368c3d260dbf496fbce Merge: 8bb14ca1714fa 764c7c9a464b6 Author: Linus Torvalds Date: Fri May 21 13:24:12 2021 -1000 Merge tag 'for-5.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes: - fix unaligned compressed writes in zoned mode - fix false positive lockdep warning when cloning inline extent - remove wrong BUG_ON in tree-log error handling" * tag 'for-5.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: zoned: fix parallel compressed writes btrfs: zoned: pass start block to btrfs_use_zone_append btrfs: do not BUG_ON in link_to_fixup_dir btrfs: release path before starting transaction when cloning inline extent commit 8bb14ca1714fa341d638a5d313c258feae3a8f3f Merge: e8085a07097b2 9687c85dfbf84 Author: Linus Torvalds Date: Fri May 21 13:12:51 2021 -1000 Merge tag '5.13-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Seven smb3 fixes: one for stable, three others fix problems found in testing handle leases, and a compounded request fix" * tag '5.13-rc3-smb3' of git://git.samba.org/sfrench/cifs-2.6: Fix KASAN identified use-after-free issue. Defer close only when lease is enabled. Fix kernel oops when CONFIG_DEBUG_ATOMIC_SLEEP is enabled. cifs: Fix inconsistent indenting cifs: fix memory leak in smb2_copychunk_range SMB3: incorrect file id in requests compounded with open cifs: remove deadstore in cifs_close_all_deferred_files() commit e8085a07097b217adeb2f0cad3ea79ac1f8750e5 Merge: 011ff616ffe8d bdbe871ef0caa Author: Linus Torvalds Date: Fri May 21 13:11:00 2021 -1000 Merge tag 'gpio-fixes-for-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: - add missing MODULE_DEVICE_TABLE in gpio-cadence - fix a kernel doc validator error in gpio-xilinx - don't set parent IRQ affinity in gpio-tegra186 * tag 'gpio-fixes-for-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: tegra186: Don't set parent IRQ affinity gpio: xilinx: Correct kernel doc for xgpio_probe() gpio: cadence: Add missing MODULE_DEVICE_TABLE commit e29f011e8fc04b2cdc742a2b9bbfa1b62518381a Author: Francesco Ruggeri Date: Fri May 21 13:21:14 2021 -0700 ipv6: record frag_max_size in atomic fragments in input path Commit dbd1759e6a9c ("ipv6: on reassembly, record frag_max_size") filled the frag_max_size field in IP6CB in the input path. The field should also be filled in case of atomic fragments. Fixes: dbd1759e6a9c ('ipv6: on reassembly, record frag_max_size') Signed-off-by: Francesco Ruggeri Signed-off-by: David S. Miller commit 8f03eeb6e0a0a0b8d617ee0a4bce729e47130036 Author: Íñigo Huguet Date: Fri May 21 16:38:35 2021 +0200 net:sfc: fix non-freed irq in legacy irq mode SFC driver can be configured via modparam to work using MSI-X, MSI or legacy IRQ interrupts. In the last one, the interrupt was not properly released on module remove. It was not freed because the flag irqs_hooked was not set during initialization in the case of using legacy IRQ. Example of (trimmed) trace during module remove without this fix: remove_proc_entry: removing non-empty directory 'irq/125', leaking at least '0000:3b:00.1' WARNING: CPU: 39 PID: 3658 at fs/proc/generic.c:715 remove_proc_entry+0x15c/0x170 ...trimmed... Call Trace: unregister_irq_proc+0xe3/0x100 free_desc+0x29/0x70 irq_free_descs+0x47/0x70 mp_unmap_irq+0x58/0x60 acpi_unregister_gsi_ioapic+0x2a/0x40 acpi_pci_irq_disable+0x78/0xb0 pci_disable_device+0xd1/0x100 efx_pci_remove+0xa1/0x1e0 [sfc] pci_device_remove+0x38/0xa0 __device_release_driver+0x177/0x230 driver_detach+0xcb/0x110 bus_remove_driver+0x58/0xd0 pci_unregister_driver+0x2a/0xb0 efx_exit_module+0x24/0xf40 [sfc] __do_sys_delete_module.constprop.0+0x171/0x280 ? exit_to_user_mode_prepare+0x83/0x1d0 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f9f9385800b ...trimmed... Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit aced3ce57cd37b5ca332bcacd370d01f5a8c5371 Author: Rao Shoaib Date: Fri May 21 11:08:06 2021 -0700 RDS tcp loopback connection can hang When TCP is used as transport and a program on the system connects to RDS port 16385, connection is accepted but denied per the rules of RDS. However, RDS connections object is left in the list. Next loopback connection will select that connection object as it is at the head of list. The connection attempt will hang as the connection object is set to connect over TCP which is not allowed The issue can be reproduced easily, use rds-ping to ping a local IP address. After that use any program like ncat to connect to the same IP address and port 16385. This will hang so ctrl-c out. Now try rds-ping, it will hang. To fix the issue this patch adds checks to disallow the connection object creation and destroys the connection object. Signed-off-by: Rao Shoaib Signed-off-by: David S. Miller commit 29bf1993fdba17703a836cf098712cf15f96706d Author: Ioana Ciornei Date: Sat May 22 00:01:00 2021 +0300 MAINTAINERS: remove Ioana Radulescu from dpaa2-eth Remove Ioana Radulescu from dpaa2-eth since she is no longer working on the DPAA2 set of drivers. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit c7718ee96dbc2f9c5fc3b578abdf296dd44b9c20 Author: Aleksander Jan Bajkowski Date: Fri May 21 16:45:58 2021 +0200 net: lantiq: fix memory corruption in RX ring In a situation where memory allocation or dma mapping fails, an invalid address is programmed into the descriptor. This can lead to memory corruption. If the memory allocation fails, DMA should reuse the previous skb and mapping and drop the packet. This patch also increments rx drop counter. Fixes: fe1a56420cf2 ("net: lantiq: Add Lantiq / Intel VRX200 Ethernet driver ") Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: David S. Miller commit fc516d3a6aa2c6ffe27d0da8818d13839e023e7e Author: Florian Fainelli Date: Fri May 21 10:46:14 2021 -0700 net: dsa: bcm_sf2: Fix bcm_sf2_reg_rgmii_cntrl() call for non-RGMII port We cannot call bcm_sf2_reg_rgmii_cntrl() for a port that is not RGMII, yet we do that in bcm_sf2_sw_mac_link_up() irrespective of the port's interface. Move that read until we have properly qualified the PHY interface mode. This avoids triggering a warning on 7278 platforms that have GMII ports. Fixes: 55cfeb396965 ("net: dsa: bcm_sf2: add function finding RGMII register") Signed-off-by: Florian Fainelli Acked-by: Rafał Miłecki Signed-off-by: David S. Miller commit e5bfaed7508fd34ae95a79d1eb76c38ecc82c947 Author: Julian Wiedmann Date: Fri May 21 15:28:56 2021 +0200 MAINTAINERS: s390/net: add netdev list Discussions for network-related code should include the netdev list. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 5aaeca258f5540ca5cd4a56758ef03faacb7716d Author: Mike Christie Date: Wed May 19 17:26:40 2021 -0500 scsi: target: iblock: Fix smp_processor_id() BUG messages This has us use raw_smp_processor_id() in iblock's plug_device callout. smp_processor_id() is not needed here, because we are running from a per CPU work item that is also queued to run on a worker thread that is normally bound to a specific CPU. If the worker thread did end up switching CPUs then it's handled the same way we handle when the work got moved to a different CPU's worker thread, where we will just end up sending I/O from the new CPU. Link: https://lore.kernel.org/r/20210519222640.5153-1-michael.christie@oracle.com Fixes: 415ccd9811da ("scsi: target: iblock: Add backend plug/unplug callouts") Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 8c7e7b8486cda21269d393245883c5e4737d5ee7 Author: Dan Carpenter Date: Wed May 19 17:20:27 2021 +0300 scsi: libsas: Use _safe() loop in sas_resume_port() If sas_notify_lldd_dev_found() fails then this code calls: sas_unregister_dev(port, dev); which removes "dev", our list iterator, from the list. This could lead to an endless loop. We need to use list_for_each_entry_safe(). Link: https://lore.kernel.org/r/YKUeq6gwfGcvvhty@mwanda Fixes: 303694eeee5e ("[SCSI] libsas: suspend / resume support") Reviewed-by: John Garry Signed-off-by: Dan Carpenter Signed-off-by: Martin K. Petersen commit 430bfe0576120b52cf7f62116bc7549180da4706 Author: Stefan Roese Date: Thu May 20 10:43:18 2021 +0200 net: ethernet: mtk_eth_soc: Fix DIM support for MT7628/88 When updating to latest mainline for some testing on the GARDENA smart gateway based on the MT7628, I noticed that ethernet does not work any more. Commit e9229ffd550b ("net: ethernet: mtk_eth_soc: implement dynamic interrupt moderation") introduced this problem, as it missed the RX_DIM & TX_DIM configuration for this SoC variant. This patch fixes this by calling mtk_dim_rx() & mtk_dim_tx() in this case as well. Signed-off-by: Stefan Roese Fixes: e9229ffd550b ("net: ethernet: mtk_eth_soc: implement dynamic interrupt moderation") Cc: Felix Fietkau Cc: John Crispin Cc: Ilya Lipnitskiy Cc: Reto Schneider Cc: Reto Schneider Cc: David S. Miller Signed-off-by: David S. Miller commit b4150b68815e9e4447ce169224ed436b419f0153 Author: Bodo Stroesser Date: Wed May 19 15:54:40 2021 +0200 scsi: target: tcmu: Fix xarray RCU warning Commit f5ce815f34bc ("scsi: target: tcmu: Support DATA_BLOCK_SIZE = N * PAGE_SIZE") introduced xas_next() calls to iterate xarray elements. These calls triggered the WARNING "suspicious RCU usage" at tcmu device set up [1]. In the call stack of xas_next(), xas_load() was called. According to its comment, this function requires "the xa_lock or the RCU lock". To avoid the warning: - Guard the small loop calling xas_next() in tcmu_get_empty_block with RCU lock. - In the large loop in tcmu_copy_data using RCU lock would possibly disable preemtion for a long time (copy multi MBs). Therefore replace XA_STATE, xas_set and xas_next with a single xa_load. [1] [ 1899.867091] ============================= [ 1899.871199] WARNING: suspicious RCU usage [ 1899.875310] 5.13.0-rc1+ #41 Not tainted [ 1899.879222] ----------------------------- [ 1899.883299] include/linux/xarray.h:1182 suspicious rcu_dereference_check() usage! [ 1899.890940] other info that might help us debug this: [ 1899.899082] rcu_scheduler_active = 2, debug_locks = 1 [ 1899.905719] 3 locks held by kworker/0:1/1368: [ 1899.910161] #0: ffffa1f8c8b98738 ((wq_completion)target_submission){+.+.}-{0:0}, at: process_one_work+0x1ee/0x580 [ 1899.920732] #1: ffffbd7040cd7e78 ((work_completion)(&q->sq.work)){+.+.}-{0:0}, at: process_one_work+0x1ee/0x580 [ 1899.931146] #2: ffffa1f8d1c99768 (&udev->cmdr_lock){+.+.}-{3:3}, at: tcmu_queue_cmd+0xea/0x160 [target_core_user] [ 1899.941678] stack backtrace: [ 1899.946093] CPU: 0 PID: 1368 Comm: kworker/0:1 Not tainted 5.13.0-rc1+ #41 [ 1899.953070] Hardware name: System manufacturer System Product Name/PRIME Z270-A, BIOS 1302 03/15/2018 [ 1899.962459] Workqueue: target_submission target_queued_submit_work [target_core_mod] [ 1899.970337] Call Trace: [ 1899.972839] dump_stack+0x6d/0x89 [ 1899.976222] xas_descend+0x10e/0x120 [ 1899.979875] xas_load+0x39/0x50 [ 1899.983077] tcmu_get_empty_blocks+0x115/0x1c0 [target_core_user] [ 1899.989318] queue_cmd_ring+0x1da/0x630 [target_core_user] [ 1899.994897] ? rcu_read_lock_sched_held+0x3f/0x70 [ 1899.999695] ? trace_kmalloc+0xa6/0xd0 [ 1900.003501] ? __kmalloc+0x205/0x380 [ 1900.007167] tcmu_queue_cmd+0x12f/0x160 [target_core_user] [ 1900.012746] __target_execute_cmd+0x23/0xa0 [target_core_mod] [ 1900.018589] transport_generic_new_cmd+0x1f3/0x370 [target_core_mod] [ 1900.025046] transport_handle_cdb_direct+0x34/0x50 [target_core_mod] [ 1900.031517] target_queued_submit_work+0x43/0xe0 [target_core_mod] [ 1900.037837] process_one_work+0x268/0x580 [ 1900.041952] ? process_one_work+0x580/0x580 [ 1900.046195] worker_thread+0x55/0x3b0 [ 1900.049921] ? process_one_work+0x580/0x580 [ 1900.054192] kthread+0x143/0x160 [ 1900.057499] ? kthread_create_worker_on_cpu+0x40/0x40 [ 1900.062661] ret_from_fork+0x1f/0x30 Link: https://lore.kernel.org/r/20210519135440.26773-1-bostroesser@gmail.com Fixes: f5ce815f34bc ("scsi: target: tcmu: Support DATA_BLOCK_SIZE = N * PAGE_SIZE") Reported-by: Shin'ichiro Kawasaki Tested-by: Shin'ichiro Kawasaki Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 70ca3c57ff914113f681e657634f7fbfa68e1ad1 Author: Shin'ichiro Kawasaki Date: Sat May 15 16:03:15 2021 +0900 scsi: target: core: Avoid smp_processor_id() in preemptible code The BUG message "BUG: using smp_processor_id() in preemptible [00000000] code" was observed for TCMU devices with kernel config DEBUG_PREEMPT. The message was observed when blktests block/005 was run on TCMU devices with fileio backend or user:zbc backend [1]. The commit 1130b499b4a7 ("scsi: target: tcm_loop: Use LIO wq cmd submission helper") triggered the symptom. The commit modified work queue to handle commands and changed 'current->nr_cpu_allowed' at smp_processor_id() call. The message was also observed at system shutdown when TCMU devices were not cleaned up [2]. The function smp_processor_id() was called in SCSI host work queue for abort handling, and triggered the BUG message. This symptom was observed regardless of the commit 1130b499b4a7 ("scsi: target: tcm_loop: Use LIO wq cmd submission helper"). To avoid the preemptible code check at smp_processor_id(), get CPU ID with raw_smp_processor_id() instead. The CPU ID is used for performance improvement then thread move to other CPU will not affect the code. [1] [ 56.468103] run blktests block/005 at 2021-05-12 14:16:38 [ 57.369473] check_preemption_disabled: 85 callbacks suppressed [ 57.369480] BUG: using smp_processor_id() in preemptible [00000000] code: fio/1511 [ 57.369506] BUG: using smp_processor_id() in preemptible [00000000] code: fio/1510 [ 57.369512] BUG: using smp_processor_id() in preemptible [00000000] code: fio/1506 [ 57.369552] caller is __target_init_cmd+0x157/0x170 [target_core_mod] [ 57.369606] CPU: 4 PID: 1506 Comm: fio Not tainted 5.13.0-rc1+ #34 [ 57.369613] Hardware name: System manufacturer System Product Name/PRIME Z270-A, BIOS 1302 03/15/2018 [ 57.369617] Call Trace: [ 57.369621] BUG: using smp_processor_id() in preemptible [00000000] code: fio/1507 [ 57.369628] dump_stack+0x6d/0x89 [ 57.369642] check_preemption_disabled+0xc8/0xd0 [ 57.369628] caller is __target_init_cmd+0x157/0x170 [target_core_mod] [ 57.369655] __target_init_cmd+0x157/0x170 [target_core_mod] [ 57.369695] target_init_cmd+0x76/0x90 [target_core_mod] [ 57.369732] tcm_loop_queuecommand+0x109/0x210 [tcm_loop] [ 57.369744] scsi_queue_rq+0x38e/0xc40 [ 57.369761] __blk_mq_try_issue_directly+0x109/0x1c0 [ 57.369779] blk_mq_try_issue_directly+0x43/0x90 [ 57.369790] blk_mq_submit_bio+0x4e5/0x5d0 [ 57.369812] submit_bio_noacct+0x46e/0x4e0 [ 57.369830] __blkdev_direct_IO_simple+0x1a3/0x2d0 [ 57.369859] ? set_init_blocksize.isra.0+0x60/0x60 [ 57.369880] generic_file_read_iter+0x89/0x160 [ 57.369898] blkdev_read_iter+0x44/0x60 [ 57.369906] new_sync_read+0x102/0x170 [ 57.369929] vfs_read+0xd4/0x160 [ 57.369941] __x64_sys_pread64+0x6e/0xa0 [ 57.369946] ? lockdep_hardirqs_on+0x79/0x100 [ 57.369958] do_syscall_64+0x3a/0x70 [ 57.369965] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 57.369973] RIP: 0033:0x7f7ed4c1399f [ 57.369979] Code: 08 89 3c 24 48 89 4c 24 18 e8 7d f3 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 48 8b 74 24 08 8b 3c 24 b8 11 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 31 44 89 c7 48 89 04 24 e8 cd f3 ff ff 48 8b [ 57.369983] RSP: 002b:00007ffd7918c580 EFLAGS: 00000293 ORIG_RAX: 0000000000000011 [ 57.369990] RAX: ffffffffffffffda RBX: 00000000015b4540 RCX: 00007f7ed4c1399f [ 57.369993] RDX: 0000000000001000 RSI: 00000000015de000 RDI: 0000000000000009 [ 57.369996] RBP: 00000000015b4540 R08: 0000000000000000 R09: 0000000000000001 [ 57.369999] R10: 0000000000e5c000 R11: 0000000000000293 R12: 00007f7eb5269a70 [ 57.370002] R13: 0000000000000000 R14: 0000000000001000 R15: 00000000015b4568 [ 57.370031] CPU: 7 PID: 1507 Comm: fio Not tainted 5.13.0-rc1+ #34 [ 57.370036] Hardware name: System manufacturer System Product Name/PRIME Z270-A, BIOS 1302 03/15/2018 [ 57.370039] Call Trace: [ 57.370045] dump_stack+0x6d/0x89 [ 57.370056] check_preemption_disabled+0xc8/0xd0 [ 57.370068] __target_init_cmd+0x157/0x170 [target_core_mod] [ 57.370121] target_init_cmd+0x76/0x90 [target_core_mod] [ 57.370178] tcm_loop_queuecommand+0x109/0x210 [tcm_loop] [ 57.370197] scsi_queue_rq+0x38e/0xc40 [ 57.370224] __blk_mq_try_issue_directly+0x109/0x1c0 ... [2] [ 117.458597] BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u16:8 [ 117.467279] caller is __target_init_cmd+0x157/0x170 [target_core_mod] [ 117.473893] CPU: 1 PID: 418 Comm: kworker/u16:6 Not tainted 5.13.0-rc1+ #34 [ 117.481150] Hardware name: System manufacturer System Product Name/PRIME Z270-A, BIOS 8 [ 117.481153] Workqueue: scsi_tmf_7 scmd_eh_abort_handler [ 117.481156] Call Trace: [ 117.481158] dump_stack+0x6d/0x89 [ 117.481162] check_preemption_disabled+0xc8/0xd0 [ 117.512575] target_submit_tmr+0x41/0x150 [target_core_mod] [ 117.519705] tcm_loop_issue_tmr+0xa7/0x100 [tcm_loop] [ 117.524913] tcm_loop_abort_task+0x43/0x60 [tcm_loop] [ 117.530137] scmd_eh_abort_handler+0x7b/0x230 [ 117.534681] process_one_work+0x268/0x580 [ 117.538862] worker_thread+0x55/0x3b0 [ 117.542652] ? process_one_work+0x580/0x580 [ 117.548351] kthread+0x143/0x160 [ 117.551675] ? kthread_create_worker_on_cpu+0x40/0x40 [ 117.556873] ret_from_fork+0x1f/0x30 Link: https://lore.kernel.org/r/20210515070315.215801-1-shinichiro.kawasaki@wdc.com Fixes: 1526d9f10c61 ("scsi: target: Make state_list per CPU") Cc: stable@vger.kernel.org # v5.11+ Reviewed-by: Mike Christie Signed-off-by: Shin'ichiro Kawasaki Signed-off-by: Martin K. Petersen commit 0c8713153fbf7ba4e45172e139d501c86006dc03 Author: Rafael J. Wysocki Date: Fri May 14 14:11:19 2021 +0200 drivers: base: Reduce device link removal code duplication Reduce device link removal code duplication between the cases when SRCU is enabled and when it is disabled by moving the only differing piece of it (which is the removal of the link from the consumer and supplier lists) into a separate wrapper function (defined differently for each of the cases in question). No intentional functional impact. Reviewed-by: Saravana Kannan Signed-off-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/4326215.LvFx2qVVIh@kreacher Signed-off-by: Greg Kroah-Hartman commit 80dd33cf72d1ab4f0af303f1fa242c6d6c8d328f Author: Rafael J. Wysocki Date: Fri May 14 14:10:15 2021 +0200 drivers: base: Fix device link removal When device_link_free() drops references to the supplier and consumer devices of the device link going away and the reference being dropped turns out to be the last one for any of those device objects, its ->release callback will be invoked and it may sleep which goes against the SRCU callback execution requirements. To address this issue, make the device link removal code carry out the device_link_free() actions preceded by SRCU synchronization from a separate work item (the "long" workqueue is used for that, because it does not matter when the device link memory is released and it may take time to get to that point) instead of using SRCU callbacks. While at it, make the code work analogously when SRCU is not enabled to reduce the differences between the SRCU and non-SRCU cases. Fixes: 843e600b8a2b ("driver core: Fix sleeping in invalid context during device link deletion") Cc: stable Reported-by: chenxiang (M) Tested-by: chenxiang (M) Reviewed-by: Saravana Kannan Signed-off-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/5722787.lOV4Wx5bFT@kreacher Signed-off-by: Greg Kroah-Hartman commit f8b61bd20479c094fb421da42fef6b4ff22a589e Author: Song Liu Date: Tue May 11 23:51:16 2021 -0700 perf stat: Skip evlist__[enable|disable] when all events uses BPF When all events of a perf-stat session use BPF, it is not necessary to call evlist__enable() and evlist__disable(). Skip them when all_counters_use_bpf is true. Signed-off-by: Song Liu Reported-by: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo commit f42907e8a4515635615a6ffd44242454ef843c04 Author: Adrian Hunter Date: Fri May 21 20:51:27 2021 +0300 perf script: Add missing PERF_IP_FLAG_CHARS for VM-Entry and VM-Exit Add 'g' (guest) for VM-Entry and 'h' (host) for VM-Exit. Fixes: c025d46cd932c ("perf script: Add branch types for VM-Entry and VM-Exit") Signed-off-by: Adrian Hunter Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20210521175127.27264-1-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f56299a9c998e0bfbd4ab07cafe9eb8444512448 Author: Adrian Hunter Date: Fri May 21 12:20:53 2021 +0300 perf scripts python: exported-sql-viewer.py: Fix warning display Deprecation warnings are useful only for the developer, not an end user. Display warnings only when requested using the python -W option. This stops the display of warnings like: tools/perf/scripts/python/exported-sql-viewer.py:5102: DeprecationWarning: an integer is required (got type PySide2.QtCore.Qt.AlignmentFlag). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python. err = app.exec_() Since the warning can be fixed only in PySide2, we must wait for it to be finally fixed there. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org # v5.3+ Link: http://lore.kernel.org/lkml/20210521092053.25683-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit fd931b2e234a7cc451a7bbb1965d6ce623189158 Author: Adrian Hunter Date: Fri May 21 12:20:52 2021 +0300 perf scripts python: exported-sql-viewer.py: Fix Array TypeError The 'Array' class is present in more than one python standard library. In some versions of Python 3, the following error occurs: Traceback (most recent call last): File "tools/perf/scripts/python/exported-sql-viewer.py", line 4702, in reports_menu.addAction(CreateAction(label, "Create a new window displaying branch events", lambda a=None,x=dbid: self.NewBranchView(x), self)) File "tools/perf/scripts/python/exported-sql-viewer.py", line 4727, in NewBranchView BranchWindow(self.glb, event_id, ReportVars(), self) File "tools/perf/scripts/python/exported-sql-viewer.py", line 3208, in __init__ self.model = LookupCreateModel(model_name, lambda: BranchModel(glb, event_id, report_vars.where_clause)) File "tools/perf/scripts/python/exported-sql-viewer.py", line 343, in LookupCreateModel model = create_fn() File "tools/perf/scripts/python/exported-sql-viewer.py", line 3208, in self.model = LookupCreateModel(model_name, lambda: BranchModel(glb, event_id, report_vars.where_clause)) File "tools/perf/scripts/python/exported-sql-viewer.py", line 3124, in __init__ self.fetcher = SQLFetcher(glb, sql, prep, self.AddSample) File "tools/perf/scripts/python/exported-sql-viewer.py", line 2658, in __init__ self.buffer = Array(c_char, self.buffer_size, lock=False) TypeError: abstract class This apparently happens because Python can be inconsistent about which class of the name 'Array' gets imported. Fix by importing explicitly by name so that only the desired 'Array' gets imported. Fixes: 8392b74b575c3 ("perf scripts python: exported-sql-viewer.py: Add ability to display all the database tables") Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20210521092053.25683-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a6172059758ba1b496ae024cece7d5bdc8d017db Author: Adrian Hunter Date: Fri May 21 12:20:51 2021 +0300 perf scripts python: exported-sql-viewer.py: Fix copy to clipboard from Top Calls by elapsed Time report Provide missing argument to prevent following error when copying a selection to the clipboard: Traceback (most recent call last): File "tools/perf/scripts/python/exported-sql-viewer.py", line 4041, in menu.addAction(CreateAction("&Copy selection", "Copy to clipboard", lambda: CopyCellsToClipboardHdr(self.view), self.view)) File "tools/perf/scripts/python/exported-sql-viewer.py", line 4021, in CopyCellsToClipboardHdr CopyCellsToClipboard(view, False, True) File "tools/perf/scripts/python/exported-sql-viewer.py", line 4018, in CopyCellsToClipboard view.CopyCellsToClipboard(view, as_csv, with_hdr) File "tools/perf/scripts/python/exported-sql-viewer.py", line 3871, in CopyTableCellsToClipboard val = model.headerData(col, Qt.Horizontal) TypeError: headerData() missing 1 required positional argument: 'role' Fixes: 96c43b9a7ab3b ("perf scripts python: exported-sql-viewer.py: Add copy to clipboard") Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20210521092053.25683-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit bffcbe79370e8fda7f1d19899de83aa2a833bf69 Author: Arnaldo Carvalho de Melo Date: Fri May 21 16:14:00 2021 -0300 tools headers UAPI: Sync files changed by the quotactl_path unwiring To pick the changes in this csets: 5b9fedb31e476693 ("quota: Disable quotactl_path syscall") That silences these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl' diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl Warning: Kernel ABI header at 'tools/perf/arch/s390/entry/syscalls/syscall.tbl' differs from latest version at 'arch/s390/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl Warning: Kernel ABI header at 'tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl' differs from latest version at 'arch/mips/kernel/syscalls/syscall_n64.tbl' diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl Cc: Jan Kara Signed-off-by: Arnaldo Carvalho de Melo commit 36cb555fae0875d5416e8514a84a427bec6e4cda Author: Axel Lin Date: Fri May 21 15:30:20 2021 +0800 regulator: scmi: Fix off-by-one for linear regulators .n_voltages setting For linear regulators, the .n_voltages is (max_uv - min_uv) / uv_step + 1. Fixes: 0fbeae70ee7c ("regulator: add SCMI driver") Signed-off-by: Axel Lin Reviewed-by: Cristian Marussi Link: https://lore.kernel.org/r/20210521073020.1944981-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 4224680ee7aaf0f13ab762ffb2a77373737dce5e Author: Arnaldo Carvalho de Melo Date: Fri May 21 16:00:31 2021 -0300 tools headers UAPI: Sync linux/perf_event.h with the kernel sources To pick the trivial change in: 0683b53197b55343 ("signal: Deliver all of the siginfo perf data in _perf") This silences this perf build warning: 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 Cc: Eric W. Biederman Signed-off-by: Arnaldo Carvalho de Melo commit ec347b7c319156c3b488681d1813d08d88499cc6 Author: Arnaldo Carvalho de Melo Date: Fri May 21 16:00:31 2021 -0300 tools headers UAPI: Sync linux/fs.h with the kernel sources To pick the trivial change in: 63c8af5687f6b1b7 ("block: uapi: fix comment about block device ioctl") This silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/fs.h' differs from latest version at 'include/uapi/linux/fs.h' diff -u tools/include/uapi/linux/fs.h include/uapi/linux/fs.h Cc: Damien Le Moal Cc: Jens Axboe Signed-off-by: Arnaldo Carvalho de Melo commit f248d687e99da6799a25bbf53ca1350b84d41077 Merge: 3b2f17ad1770e 011ff616ffe8d Author: Arnaldo Carvalho de Melo Date: Fri May 21 15:59:23 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/urgent To pick up more UAPI updates to sync with tools/. Signed-off-by: Arnaldo Carvalho de Melo commit 016002848c82eeb5d460489ce392d91fe18c475c Author: Zheyu Ma Date: Fri May 21 06:08:43 2021 +0000 serial: rp2: use 'request_firmware' instead of 'request_firmware_nowait' In 'rp2_probe', the driver registers 'rp2_uart_interrupt' then calls 'rp2_fw_cb' through 'request_firmware_nowait'. In 'rp2_fw_cb', if the firmware don't exists, function just return without initializing ports of 'rp2_card'. But now the interrupt handler function has been registered, and when an interrupt comes, 'rp2_uart_interrupt' may access those ports then causing NULL pointer dereference or other bugs. Because the driver does some initialization work in 'rp2_fw_cb', in order to make the driver ready to handle interrupts, 'request_firmware' should be used instead of asynchronous 'request_firmware_nowait'. This report reveals it: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.19.177-gdba4159c14ef-dirty #45 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59- gc9ba5276e321-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xec/0x156 lib/dump_stack.c:118 assign_lock_key kernel/locking/lockdep.c:727 [inline] register_lock_class+0x14e5/0x1ba0 kernel/locking/lockdep.c:753 __lock_acquire+0x187/0x3750 kernel/locking/lockdep.c:3303 lock_acquire+0x124/0x340 kernel/locking/lockdep.c:3907 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x32/0x50 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] rp2_ch_interrupt drivers/tty/serial/rp2.c:466 [inline] rp2_asic_interrupt.isra.9+0x15d/0x990 drivers/tty/serial/rp2.c:493 rp2_uart_interrupt+0x49/0xe0 drivers/tty/serial/rp2.c:504 __handle_irq_event_percpu+0xfb/0x770 kernel/irq/handle.c:149 handle_irq_event_percpu+0x79/0x150 kernel/irq/handle.c:189 handle_irq_event+0xac/0x140 kernel/irq/handle.c:206 handle_fasteoi_irq+0x232/0x5c0 kernel/irq/chip.c:725 generic_handle_irq_desc include/linux/irqdesc.h:155 [inline] handle_irq+0x230/0x3a0 arch/x86/kernel/irq_64.c:87 do_IRQ+0xa7/0x1e0 arch/x86/kernel/irq.c:247 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670 RIP: 0010:native_safe_halt+0x28/0x30 arch/x86/include/asm/irqflags.h:61 Code: 00 00 55 be 04 00 00 00 48 c7 c7 00 c2 2f 8c 48 89 e5 e8 fb 31 e7 f8 8b 05 75 af 8d 03 85 c0 7e 07 0f 00 2d 8a 61 65 00 fb f4 <5d> c3 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 RSP: 0018:ffff88806b71fcc8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffde RAX: 0000000000000000 RBX: ffffffff8bde7e48 RCX: ffffffff88a21285 RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff8c2fc200 RBP: ffff88806b71fcc8 R08: fffffbfff185f840 R09: fffffbfff185f840 R10: 0000000000000001 R11: fffffbfff185f840 R12: 0000000000000002 R13: ffffffff8bea18a0 R14: 0000000000000000 R15: 0000000000000000 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline] default_idle+0x6f/0x360 arch/x86/kernel/process.c:557 arch_cpu_idle+0xf/0x20 arch/x86/kernel/process.c:548 default_idle_call+0x3b/0x60 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x2ab/0x3c0 kernel/sched/idle.c:263 cpu_startup_entry+0xcb/0xe0 kernel/sched/idle.c:369 start_secondary+0x3b8/0x4e0 arch/x86/kernel/smpboot.c:271 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 BUG: unable to handle kernel NULL pointer dereference at 0000000000000010 PGD 8000000056d27067 P4D 8000000056d27067 PUD 56d28067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN PTI CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.19.177-gdba4159c14ef-dirty #45 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59- gc9ba5276e321-prebuilt.qemu.org 04/01/2014 RIP: 0010:readl arch/x86/include/asm/io.h:59 [inline] RIP: 0010:rp2_ch_interrupt drivers/tty/serial/rp2.c:472 [inline] RIP: 0010:rp2_asic_interrupt.isra.9+0x181/0x990 drivers/tty/serial/rp2.c: 493 Code: df e8 43 5d c2 05 48 8d 83 e8 01 00 00 48 89 85 60 ff ff ff 48 c1 e8 03 42 80 3c 30 00 0f 85 aa 07 00 00 48 8b 83 e8 01 00 00 <8b> 40 10 89 c1 89 85 68 ff ff ff 48 8b 83 e8 01 00 00 89 48 10 83 RSP: 0018:ffff88806c287cd0 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff88806ade6820 RCX: ffffffff814300b1 RDX: 1ffff1100d5bcd06 RSI: 0000000000000004 RDI: ffff88806ade6820 RBP: ffff88806c287db8 R08: ffffed100d5bcd05 R09: ffffed100d5bcd05 R10: 0000000000000001 R11: ffffed100d5bcd04 R12: ffffc90001e00000 R13: ffff888069654e10 R14: dffffc0000000000 R15: ffff888069654df0 FS: 0000000000000000(0000) GS:ffff88806c280000(0000) knlGS: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 000000006892c000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rp2_uart_interrupt+0x49/0xe0 drivers/tty/serial/rp2.c:504 __handle_irq_event_percpu+0xfb/0x770 kernel/irq/handle.c:149 handle_irq_event_percpu+0x79/0x150 kernel/irq/handle.c:189 handle_irq_event+0xac/0x140 kernel/irq/handle.c:206 handle_fasteoi_irq+0x232/0x5c0 kernel/irq/chip.c:725 generic_handle_irq_desc include/linux/irqdesc.h:155 [inline] handle_irq+0x230/0x3a0 arch/x86/kernel/irq_64.c:87 do_IRQ+0xa7/0x1e0 arch/x86/kernel/irq.c:247 common_interrupt+0xf/0xf arch/x86/entry/entry_64.S:670 RIP: 0010:native_safe_halt+0x28/0x30 arch/x86/include/asm/irqflags.h:61 Code: 00 00 55 be 04 00 00 00 48 c7 c7 00 c2 2f 8c 48 89 e5 e8 fb 31 e7 f8 8b 05 75 af 8d 03 85 c0 7e 07 0f 00 2d 8a 61 65 00 fb f4 <5d> c3 90 90 90 90 90 90 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 RSP: 0018:ffff88806b71fcc8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffde RAX: 0000000000000000 RBX: ffffffff8bde7e48 RCX: ffffffff88a21285 RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffffffff8c2fc200 RBP: ffff88806b71fcc8 R08: fffffbfff185f840 R09: fffffbfff185f840 R10: 0000000000000001 R11: fffffbfff185f840 R12: 0000000000000002 R13: ffffffff8bea18a0 R14: 0000000000000000 R15: 0000000000000000 arch_safe_halt arch/x86/include/asm/paravirt.h:94 [inline] default_idle+0x6f/0x360 arch/x86/kernel/process.c:557 arch_cpu_idle+0xf/0x20 arch/x86/kernel/process.c:548 default_idle_call+0x3b/0x60 kernel/sched/idle.c:93 cpuidle_idle_call kernel/sched/idle.c:153 [inline] do_idle+0x2ab/0x3c0 kernel/sched/idle.c:263 cpu_startup_entry+0xcb/0xe0 kernel/sched/idle.c:369 start_secondary+0x3b8/0x4e0 arch/x86/kernel/smpboot.c:271 secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243 Modules linked in: Dumping ftrace buffer: (ftrace buffer empty) CR2: 0000000000000010 ---[ end trace 11804dbb55cb1a64 ]--- RIP: 0010:readl arch/x86/include/asm/io.h:59 [inline] RIP: 0010:rp2_ch_interrupt drivers/tty/serial/rp2.c:472 [inline] RIP: 0010:rp2_asic_interrupt.isra.9+0x181/0x990 drivers/tty/serial/rp2.c: 493 Code: df e8 43 5d c2 05 48 8d 83 e8 01 00 00 48 89 85 60 ff ff ff 48 c1 e8 03 42 80 3c 30 00 0f 85 aa 07 00 00 48 8b 83 e8 01 00 00 <8b> 40 10 89 c1 89 85 68 ff ff ff 48 8b 83 e8 01 00 00 89 48 10 83 RSP: 0018:ffff88806c287cd0 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff88806ade6820 RCX: ffffffff814300b1 RDX: 1ffff1100d5bcd06 RSI: 0000000000000004 RDI: ffff88806ade6820 RBP: ffff88806c287db8 R08: ffffed100d5bcd05 R09: ffffed100d5bcd05 R10: 0000000000000001 R11: ffffed100d5bcd04 R12: ffffc90001e00000 R13: ffff888069654e10 R14: dffffc0000000000 R15: ffff888069654df0 FS: 0000000000000000(0000) GS:ffff88806c280000(0000) knlGS: 0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000010 CR3: 000000006892c000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Reported-by: Zheyu Ma Signed-off-by: Zheyu Ma Link: https://lore.kernel.org/r/1621577323-1541-1-git-send-email-zheyuma97@gmail.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 746e4acf87bcacf1406e05ef24a0b7139147c63e Author: Johan Hovold Date: Fri May 21 15:31:09 2021 +0200 USB: trancevibrator: fix control-request direction The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the set-speed request which erroneously used USB_DIR_IN and update the default timeout argument to match (same value). Fixes: 5638e4d92e77 ("USB: add PlayStation 2 Trance Vibrator driver") Cc: stable@vger.kernel.org # 2.6.19 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210521133109.17396-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6a4c8f60da8f86bb7cfce4612f8ae6770b232e05 Merge: 10505b720189e f8e8c1b2f782e Author: Greg Kroah-Hartman Date: Fri May 21 20:07:59 2021 +0200 Merge tag 'usb-serial-5.13-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for 5.13-rc3 Here are some new device ids for various drivers. All have been in linux-next with no reported issues. * tag 'usb-serial-5.13-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: USB: serial: pl2303: add device id for ADLINK ND-6530 GC USB: serial: ti_usb_3410_5052: add startech.com device id USB: serial: option: add Telit LE910-S1 compositions 0x7010, 0x7011 USB: serial: ftdi_sio: add IDs for IDS GmbH Products commit 011ff616ffe8df6b86ee54d14a43c8d1a96a6325 Merge: 5328bf8ba44e3 a1149a6c06ee0 Author: Linus Torvalds Date: Fri May 21 06:31:34 2021 -1000 Merge tag 'mmc-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC host fixes from Ulf Hansson: - Fix SD-card detection on Intel NUC10i3FNK4 (GL9755) - Replace WARN_ONCE with dev_warn_once for scatterlist offsets - Extend check of scatterlist size alignment with SD_IO_RW_EXTENDED * tag 'mmc-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: mmc: sdhci-pci-gli: increase 1.8V regulator wait mmc: meson-gx: also check SD_IO_RW_EXTENDED for scatterlist size alignment mmc: meson-gx: make replace WARN_ONCE with dev_warn_once about scatterlist offset alignment commit 5328bf8ba44e3f92016bbc800f352db922654f1b Merge: a0e31f3a38e77 c17611592d963 Author: Linus Torvalds Date: Fri May 21 06:24:45 2021 -1000 Merge tag 'devicetree-fixes-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Another batch of removing unneeded type references in schemas - Fix some out of date filename references - Convert renesas,drif schema to use DT graph schema * tag 'devicetree-fixes-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: More removals of type references on common properties dt-bindings: media: renesas,drif: Use graph schema leds: Fix reference file name of documentation dt-bindings: phy: cadence-torrent: update reference file of docs commit a0e31f3a38e77612ed8967aaad28db6d3ee674b5 Merge: c1f47ebc9b246 922e3013046b7 Author: Linus Torvalds Date: Fri May 21 06:12:52 2021 -1000 Merge branch 'for-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull siginfo fix from Eric Biederman: "During the merge window an issue with si_perf and the siginfo ABI came up. The alpha and sparc siginfo structure layout had changed with the addition of SIGTRAP TRAP_PERF and the new field si_perf. The reason only alpha and sparc were affected is that they are the only architectures that use si_trapno. Looking deeper it was discovered that si_trapno is used for only a few select signals on alpha and sparc, and that none of the other _sigfault fields past si_addr are used at all. Which means technically no regression on alpha and sparc. While the alignment concerns might be dismissed the abuse of si_errno by SIGTRAP TRAP_PERF does have the potential to cause regressions in existing userspace. While we still have time before userspace starts using and depending on the new definition siginfo for SIGTRAP TRAP_PERF this set of changes cleans up siginfo_t. - The si_trapno field is demoted from magic alpha and sparc status and made an ordinary union member of the _sigfault member of siginfo_t. Without moving it of course. - si_perf is replaced with si_perf_data and si_perf_type ending the abuse of si_errno. - Unnecessary additions to signalfd_siginfo are removed" * 'for-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: signalfd: Remove SIL_PERF_EVENT fields from signalfd_siginfo signal: Deliver all of the siginfo perf data in _perf signal: Factor force_sig_perf out of perf_sigtrap signal: Implement SIL_FAULT_TRAPNO siginfo: Move si_trapno inside the union inside _si_fault commit c1f47ebc9b246e36afaa339cc5ca7ad9d3ae71b2 Merge: 93bb533a340bd 055f23b74b20f Author: Linus Torvalds Date: Fri May 21 06:09:17 2021 -1000 Merge tag 'modules-for-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull module fix from Jessica Yu: "When CONFIG_MODULE_UNLOAD=n, module exit sections get sorted into the init region of the module in order to satisfy the requirements of jump_labels and static_calls. Previously, the exit section check was done in module_init_section(), but the solution there is not completely arch-indepedent as ARM is a special case and supplies its own module_init_section() function. Instead of pushing this logic further to the arch-specific code, switch to an arch-independent solution to check for module exit sections in the core module loader code in layout_sections() instead" * tag 'modules-for-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: check for exit sections in layout_sections() instead of module_init_section() commit 93bb533a340bde2065ecdd8694c8d1852537edd2 Merge: 79a106fc65859 8b549c18ae81d Author: Linus Torvalds Date: Fri May 21 06:06:19 2021 -1000 Merge tag 'for-linus' of git://github.com/openrisc/linux Pull OpenRISC fixes from Stafford Horne: "A few fixes that came in around the time of the merge window" * tag 'for-linus' of git://github.com/openrisc/linux: openrisc: Define memory barrier mb openrisc: mm/init.c: remove unused variable 'end' in paging_init() openrisc: mm/init.c: remove unused memblock_region variable in map_ram() openrisc: Fix a memory leak commit 265d1a90e4fb6d3264d8122fbd10760e5e733be6 Author: Geoffrey D. Bennett Date: Fri May 21 17:50:13 2021 +0930 ALSA: usb-audio: scarlett2: Improve driver startup messages Add separate init function to call the existing controls_create function so a custom error can be displayed if initialisation fails. Use info level instead of error for notifications. Display the VID/PID so device_setup is targeted to the right device. Display "enabled" message to easily confirm that the driver is loaded. Signed-off-by: Geoffrey D. Bennett Cc: Link: https://lore.kernel.org/r/b5d140c65f640faf2427e085fbbc0297b32e5fce.1621584566.git.g@b4.vu Signed-off-by: Takashi Iwai commit 764fa6e686e0107c0357a988d193de04cf047583 Author: Geoffrey D. Bennett Date: Fri May 21 17:50:12 2021 +0930 ALSA: usb-audio: scarlett2: Fix device hang with ehci-pci Use usb_rcvctrlpipe() not usb_sndctrlpipe() for USB control input in the Scarlett Gen 2 mixer driver. This fixes the device hang during initialisation when used with the ehci-pci host driver. Fixes: 9e4d5c1be21f ("ALSA: usb-audio: Scarlett Gen 2 mixer interface") Signed-off-by: Geoffrey D. Bennett Cc: Link: https://lore.kernel.org/r/66a3d05dac325d5b53e4930578e143cef1f50dbe.1621584566.git.g@b4.vu Signed-off-by: Takashi Iwai commit 51cb8e206afd463e66f16869e5ddc95bef107142 Author: Johan Hovold Date: Fri May 21 15:37:42 2021 +0200 ALSA: usb-audio: fix control-request direction The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the UAC2_CS_CUR request which erroneously used usb_sndctrlpipe(). Fixes: 93db51d06b32 ("ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3") Cc: stable@vger.kernel.org # 5.10 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210521133742.18098-1-johan@kernel.org Signed-off-by: Takashi Iwai commit bda7d3ab06f19c02dcef61fefcb9dd954dfd5e4f Author: Greg Kroah-Hartman Date: Thu May 20 15:08:39 2021 +0200 kgdb: fix gcc-11 warnings harder 40cc3a80bb42 ("kgdb: fix gcc-11 warning on indentation") tried to fix up the gcc-11 complaints in this file by just reformatting the #defines. That worked for gcc 11.1.0, but in gcc 11.1.1 as shipped by Fedora 34, the warning came back for one of the #defines. Fix this up again by putting { } around the if statement, now it is quiet again. Fixes: 40cc3a80bb42 ("kgdb: fix gcc-11 warning on indentation") Cc: Arnd Bergmann Cc: Daniel Thompson Cc: Jason Wessel Link: https://lore.kernel.org/r/20210520130839.51987-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 02625c965239b71869326dd0461615f27307ecb3 Author: Anirudh Rayabharam Date: Mon May 17 00:57:14 2021 +0530 video: hgafb: correctly handle card detect failure during probe The return value of hga_card_detect() is not properly handled causing the probe to succeed even though hga_card_detect() failed. Since probe succeeds, hgafb_open() can be called which will end up operating on an unmapped hga_vram. This results in an out-of-bounds access as reported by kernel test robot [1]. To fix this, correctly detect failure of hga_card_detect() by checking for a non-zero error code. [1]: https://lore.kernel.org/lkml/20210516150019.GB25903@xsang-OptiPlex-9020/ Fixes: dc13cac4862c ("video: hgafb: fix potential NULL pointer dereference") Cc: stable Reported-by: kernel test robot Reviewed-by: Igor Matheus Andrade Torrente Signed-off-by: Anirudh Rayabharam Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20210516192714.25823-1-mail@anirudhrb.com Signed-off-by: Greg Kroah-Hartman commit 10505b720189ecc3852596a70a7e391b2a5c5b57 Author: Fabio Estevam Date: Thu May 20 22:36:08 2021 -0300 usb: Restore the usb_header label Commit caa93d9bd2d7 ("usb: Fix up movement of USB core kerneldoc location") removed the reference to the _usb_header label by mistake, which causes the following htmldocs build warning: Documentation/driver-api/usb/writing_usb_driver.rst:129: WARNING: undefined label: usb_header Restore the label. Fixes: caa93d9bd2d7 ("usb: Fix up movement of USB core kerneldoc location") Reported-by: Stephen Rothwell Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210521013608.17957-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit c58bbe3477f75deb7883983e6cf428404a107555 Author: Andy Shevchenko Date: Wed May 19 13:03:58 2021 +0300 usb: typec: tcpm: Use LE to CPU conversion when accessing msg->header Sparse is not happy about strict type handling: .../typec/tcpm/tcpm.c:2720:27: warning: restricted __le16 degrades to integer .../typec/tcpm/tcpm.c:2814:32: warning: restricted __le16 degrades to integer Fix this by converting LE to CPU before use. Fixes: ae8a2ca8a221 ("usb: typec: Group all TCPCI/TCPM code together") Fixes: 64f7c494a3c0 ("typec: tcpm: Add support for sink PPS related messages") Cc: stable Cc: Adam Thomson Reviewed-by: Guenter Roeck Reviewed-by: Adam Thomson Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210519100358.64018-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8c9b3caab3ac26db1da00b8117901640c55a69dd Author: Bjorn Andersson Date: Sat May 15 21:09:53 2021 -0700 usb: typec: ucsi: Clear pending after acking connector change It's possible that the interrupt handler for the UCSI driver signals a connector changes after the handler clears the PENDING bit, but before it has sent the acknowledge request. The result is that the handler is invoked yet again, to ack the same connector change. At least some versions of the Qualcomm UCSI firmware will not handle the second - "spurious" - acknowledgment gracefully. So make sure to not clear the pending flag until the change is acknowledged. Any connector changes coming in after the acknowledgment, that would have the pending flag incorrectly cleared, would afaict be covered by the subsequent connector status check. Fixes: 217504a05532 ("usb: typec: ucsi: Work around PPM losing change information") Cc: stable Reviewed-by: Heikki Krogerus Acked-By: Benjamin Berg Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210516040953.622409-1-bjorn.andersson@linaro.org Signed-off-by: Greg Kroah-Hartman commit acf5631c239dfc53489f739c4ad47f490c5181ff Author: Bjorn Andersson Date: Sat May 15 20:47:30 2021 -0700 usb: typec: mux: Fix matching with typec_altmode_desc In typec_mux_match() "nval" is assigned the number of elements in the "svid" fwnode property, then the variable is used to store the success of the read and finally attempts to loop between 0 and "success" - i.e. not at all - and the code returns indicating that no match was found. Fix this by using a separate variable to track the success of the read, to allow the loop to get a change to find a match. Fixes: 96a6d031ca99 ("usb: typec: mux: Find the muxes by also matching against the device node") Reviewed-by: Heikki Krogerus Cc: stable Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210516034730.621461-1-bjorn.andersson@linaro.org Signed-off-by: Greg Kroah-Hartman commit dcb4b8ad6a448532d8b681b5d1a7036210b622de Author: Dongliang Mu Date: Fri May 14 20:43:48 2021 +0800 misc/uss720: fix memory leak in uss720_probe uss720_probe forgets to decrease the refcount of usbdev in uss720_probe. Fix this by decreasing the refcount of usbdev by usb_put_dev. BUG: memory leak unreferenced object 0xffff888101113800 (size 2048): comm "kworker/0:1", pid 7, jiffies 4294956777 (age 28.870s) hex dump (first 32 bytes): ff ff ff ff 31 00 00 00 00 00 00 00 00 00 00 00 ....1........... 00 00 00 00 00 00 00 00 00 00 00 00 03 00 00 00 ................ backtrace: [] kmalloc include/linux/slab.h:554 [inline] [] kzalloc include/linux/slab.h:684 [inline] [] usb_alloc_dev+0x32/0x450 drivers/usb/core/usb.c:582 [] hub_port_connect drivers/usb/core/hub.c:5129 [inline] [] hub_port_connect_change drivers/usb/core/hub.c:5363 [inline] [] port_event drivers/usb/core/hub.c:5509 [inline] [] hub_event+0x1171/0x20c0 drivers/usb/core/hub.c:5591 [] process_one_work+0x2c9/0x600 kernel/workqueue.c:2275 [] worker_thread+0x59/0x5d0 kernel/workqueue.c:2421 [] kthread+0x178/0x1b0 kernel/kthread.c:292 [] ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Fixes: 0f36163d3abe ("[PATCH] usb: fix uss720 schedule with interrupts off") Cc: stable Reported-by: syzbot+636c58f40a86b4a879e7@syzkaller.appspotmail.com Signed-off-by: Dongliang Mu Link: https://lore.kernel.org/r/20210514124348.6587-1-mudongliangabcd@gmail.com Signed-off-by: Greg Kroah-Hartman commit 25dda9fc56bd90d45f9a4516bcfa5211e61b4290 Author: Thinh Nguyen Date: Wed May 12 20:17:09 2021 -0700 usb: dwc3: gadget: Properly track pending and queued SG The driver incorrectly uses req->num_pending_sgs to track both the number of pending and queued SG entries. It only prepares the next request if the previous is done, and it doesn't update num_pending_sgs until there is TRB completion interrupt. This may starve the controller of more TRBs until the num_pending_sgs is decremented. Fix this by decrementing the num_pending_sgs after they are queued and properly track both num_mapped_sgs and num_queued_sgs. Fixes: c96e6725db9d ("usb: dwc3: gadget: Correct the logic for queuing sgs") Cc: Reported-by: Michael Grzeschik Tested-by: Michael Grzeschik Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/ba24591dbcaad8f244a3e88bd449bb7205a5aec3.1620874069.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 4f2629ea67e7225c3fd292c7fe4f5b3c9d6392de Author: Alan Stern Date: Tue May 18 16:18:35 2021 -0400 USB: usbfs: Don't WARN about excessively large memory allocations Syzbot found that the kernel generates a WARNing if the user tries to submit a bulk transfer through usbfs with a buffer that is way too large. This isn't a bug in the kernel; it's merely an invalid request from the user and the usbfs code does handle it correctly. In theory the same thing can happen with async transfers, or with the packet descriptor table for isochronous transfers. To prevent the MM subsystem from complaining about these bad allocation requests, add the __GFP_NOWARN flag to the kmalloc calls for these buffers. CC: Andrew Morton CC: Reported-and-tested-by: syzbot+882a85c0c8ec4a3e2281@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20210518201835.GA1140918@rowland.harvard.edu Signed-off-by: Greg Kroah-Hartman commit b4e46c9954ad55092502e1e8c44ceb9b6744bade Author: Vladimir Oltean Date: Thu May 20 16:12:38 2021 +0300 spi: sc18is602: implement .max_{transfer,message}_size() for the controller Allow SPI peripherals attached to this controller to know what is the maximum transfer size and message size, so they can limit their transfer lengths properly in case they are otherwise capable of larger transfer sizes. For the sc18is602, this is 200 bytes in both cases, since as far as I understand, it isn't possible to tell the controller to keep the chip select asserted after the STOP command is sent. The controller can support SPI messages larger than 200 bytes if cs_change is set for individual transfers such that the portions with chip select asserted are never longer than 200 bytes. What is not supported is just SPI messages with a continuous chip select larger than 200. I don't think it is possible to express this using the current API, so drivers which do send SPI messages with cs_change can safely just look at the max_transfer_size limit. An example of user for this is sja1105_xfer() in drivers/net/dsa/sja1105/sja1105_spi.c which sends by default 64 * 4 = 256 byte transfers. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210520131238.2903024-3-olteanv@gmail.com Signed-off-by: Mark Brown commit bda7db1d952c3ff7c24c11bc295aa72aaeb98451 Author: Vladimir Oltean Date: Thu May 20 16:12:37 2021 +0300 spi: sc18is602: don't consider the chip select byte in sc18is602_check_transfer For each spi_message, the sc18is602 I2C-to-SPI bridge driver checks the length of each spi_transfer against 200 (the size of the chip's internal buffer) minus hw->tlen (the number of bytes transferred so far). The first byte of the transferred data is the Function ID (the SPI slave's chip select) and as per the documentation of the chip: https://www.nxp.com/docs/en/data-sheet/SC18IS602B.pdf the data buffer is up to 200 bytes deep _without_ accounting for the Function ID byte. However, in sc18is602_txrx(), the driver keeps the Function ID as part of the buffer, and increments hw->tlen from 0 to 1. Combined with the check in sc18is602_check_transfer, this prevents us from issuing a transfer that has exactly 200 bytes in size, but only 199. Adjust the check function to reflect that the Function ID is not part of the 200 byte deep data buffer. Signed-off-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210520131238.2903024-2-olteanv@gmail.com Signed-off-by: Mark Brown commit af2702549d68519ac78228e915d9b2c199056787 Author: Stephen Boyd Date: Wed May 19 18:48:07 2021 -0700 ASoC: qcom: lpass-cpu: Use optional clk APIs This driver spits out a warning for me at boot: sc7180-lpass-cpu 62f00000.lpass: asoc_qcom_lpass_cpu_platform_probe() error getting optional null: -2 but it looks like it is all an optional clk. Use the optional clk APIs here so that we don't see this message and everything else is the same. Cc: Srinivas Kandagatla Cc: Banajit Goswami Fixes: 3e53ac8230c1 ("ASoC: qcom: make osr clock optional") Signed-off-by: Stephen Boyd Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210520014807.3749797-1-swboyd@chromium.org Signed-off-by: Mark Brown commit d33ca7d2e8db435ae0e514877e83e07bbf283baa Merge: 50f09a3dd5877 da096fbccd528 Author: Greg Kroah-Hartman Date: Fri May 21 12:55:39 2021 +0200 Merge tag 'soundwire-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-linus soundwire fixes for v5.13 Fix in qcom driver for handling of qcom,ports-block-pack-mode property. This fixes regression reported in DragonBoard DB845c and Lenovo Yoga C630. * tag 'soundwire-5.13-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: qcom: fix handling of qcom,ports-block-pack-mode commit 3b2f17ad1770e51b8b4e68b5069c4f1ee477eff8 Author: Arnaldo Carvalho de Melo Date: Wed May 19 13:50:31 2021 -0300 perf parse-events: Check if the software events array slots are populated To avoid a NULL pointer dereference when the kernel supports the new feature but the tooling still hasn't an entry for it. This happened with the recently added PERF_COUNT_SW_CGROUP_SWITCHES software event. Reported-by: Thomas Richter Cc: Adrian Hunter Cc: Heiko Carstens Cc: Jiri Olsa Cc: Namhyung Kim Cc: Sumanth Korikkar Link: https://lore.kernel.org/linux-perf-users/YKVESEKRjKtILhog@kernel.org/ Signed-off-by: Arnaldo Carvalho de Melo commit c81d3d24602540f65256f98831d0a25599ea6b87 Author: Jan Beulich Date: Tue May 18 18:14:07 2021 +0200 xen-pciback: reconfigure also from backend watch handler When multiple PCI devices get assigned to a guest right at boot, libxl incrementally populates the backend tree. The writes for the first of the devices trigger the backend watch. In turn xen_pcibk_setup_backend() will set the XenBus state to Initialised, at which point no further reconfigures would happen unless a device got hotplugged. Arrange for reconfigure to also get triggered from the backend watch handler. Signed-off-by: Jan Beulich Cc: stable@vger.kernel.org Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/2337cbd6-94b9-4187-9862-c03ea12e0c61@suse.com Signed-off-by: Juergen Gross commit 4ba50e7c423c29639878c00573288869aa627068 Author: Jan Beulich Date: Tue May 18 18:13:42 2021 +0200 xen-pciback: redo VF placement in the virtual topology The commit referenced below was incomplete: It merely affected what would get written to the vdev- xenstore node. The guest would still find the function at the original function number as long as __xen_pcibk_get_pci_dev() wouldn't be in sync. The same goes for AER wrt __xen_pcibk_get_pcifront_dev(). Undo overriding the function to zero and instead make sure that VFs at function zero remain alone in their slot. This has the added benefit of improving overall capacity, considering that there's only a total of 32 slots available right now (PCI segment and bus can both only ever be zero at present). Fixes: 8a5248fe10b1 ("xen PV passthru: assign SR-IOV virtual functions to separate virtual slots") Signed-off-by: Jan Beulich Cc: stable@vger.kernel.org Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/8def783b-404c-3452-196d-3f3fd4d72c9e@suse.com Signed-off-by: Juergen Gross commit ae897fda4f507e4b239f0bdfd578b3688ca96fb4 Author: Jan Beulich Date: Thu May 20 13:42:42 2021 +0200 x86/Xen: swap NX determination and GDT setup on BSP xen_setup_gdt(), via xen_load_gdt_boot(), wants to adjust page tables. For this to work when NX is not available, x86_configure_nx() needs to be called first. [jgross] Note that this is a revert of 36104cb9012a82e73 ("x86/xen: Delay get_cpu_cap until stack canary is established"), which is possible now that we no longer support running as PV guest in 32-bit mode. Cc: # 5.9 Fixes: 36104cb9012a82e73 ("x86/xen: Delay get_cpu_cap until stack canary is established") Reported-by: Olaf Hering Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/12a866b0-9e89-59f7-ebeb-a2a6cec0987a@suse.com Signed-off-by: Juergen Gross commit 79a106fc6585979022012e65a1e45e3d2d28b77b Merge: ba816d3c265cf dd6ad0516ee38 Author: Linus Torvalds Date: Thu May 20 20:15:43 2021 -1000 Merge tag 'drm-fixes-2021-05-21-1' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Usual collection, mostly amdgpu and some i915 regression fixes. I nearly managed to hose my build/sign machine this week, but I recovered it just in time, and I even got clang12 built. dma-buf: - WARN fix amdgpu: - Fix downscaling ratio on DCN3.x - Fix for non-4K pages - PCO/RV compute hang fix - Dongle fix - Aldebaran codec query support - Refcount leak fix - Use after free fix - Navi12 golden settings updates - GPU reset fixes radeon: - Fix for imported BO handling i915: - Pin the L-shape quirked object as unshrinkable to fix crashes - Disable HiZ Raw Stall Optimization on broken gen7 to fix glitches, gfx corruption - GVT: Move mdev attribute groups into kvmgt module to fix kconfig deps issue exynos: - Correct kerneldoc of fimd_shadow_protect_win function - Drop redundant error messages" * tag 'drm-fixes-2021-05-21-1' of git://anongit.freedesktop.org/drm/drm: dma-buf: fix unintended pin/unpin warnings drm/amdgpu: stop touching sched.ready in the backend drm/amd/amdgpu: fix a potential deadlock in gpu reset drm/amdgpu: update sdma golden setting for Navi12 drm/amdgpu: update gc golden setting for Navi12 drm/amdgpu: Fix a use-after-free drm/amdgpu: add video_codecs query support for aldebaran drm/amd/amdgpu: fix refcount leak drm/amd/display: Disconnect non-DP with no EDID drm/amdgpu: disable 3DCGCG on picasso/raven1 to avoid compute hang drm/amdgpu: Fix GPU TLB update error when PAGE_SIZE > AMDGPU_PAGE_SIZE drm/radeon: use the dummy page for GART if needed drm/amd/display: Use the correct max downscaling value for DCN3.x family drm/i915/gt: Disable HiZ Raw Stall Optimization on broken gen7 drm/i915/gem: Pin the L-shape quirked object as unshrinkable drm/exynos/decon5433: Remove redundant error printing in exynos5433_decon_probe() drm/exynos: Remove redundant error printing in exynos_dsi_probe() drm/exynos: correct exynos_drm_fimd kerneldoc drm/i915/gvt: Move mdev attribute groups into kvmgt module commit dd6ad0516ee38112321e99ce368fddd49ee3b9db Merge: 4996c342b2144 a2b4785f01280 Author: Dave Airlie Date: Fri May 21 14:08:04 2021 +1000 Merge tag 'amd-drm-fixes-5.13-2021-05-19' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.13-2021-05-19: amdgpu: - Fix downscaling ratio on DCN3.x - Fix for non-4K pages - PCO/RV compute hang fix - Dongle fix - Aldebaran codec query support - Refcount leak fix - Use after free fix - Navi12 golden settings updates - GPU reset fixes radeon: - Fix for imported BO handling Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210520022500.4023-1-alexander.deucher@amd.com commit 4996c342b2144ef7e0b39839f504f86f2e0d5525 Merge: af8d80bf7c25b eddd1b8f467f8 Author: Dave Airlie Date: Fri May 21 13:41:41 2021 +1000 Merge tag 'drm-intel-fixes-2021-05-20' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.13-rc3: - Pin the L-shape quirked object as unshrinkable to fix crashes - Disable HiZ Raw Stall Optimization on broken gen7 to fix glitches, gfx corruption - GVT: Move mdev attribute groups into kvmgt module to fix kconfig deps issue Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87a6opehx6.fsf@intel.com commit a8867f4e3809050571c98de7a2d465aff5e4daf5 Author: Phillip Potter Date: Mon Apr 12 08:38:37 2021 +0100 ext4: fix memory leak in ext4_mb_init_backend on error path. Fix a memory leak discovered by syzbot when a file system is corrupted with an illegally large s_log_groups_per_flex. Reported-by: syzbot+aa12d6106ea4ca1b6aae@syzkaller.appspotmail.com Signed-off-by: Phillip Potter Cc: stable@kernel.org Link: https://lore.kernel.org/r/20210412073837.1686-1-phil@philpotter.co.uk Signed-off-by: Theodore Ts'o commit b7f55d928e75557295c1ac280c291b738905b6fb Author: Andreas Gruenbacher Date: Sat May 15 17:27:14 2021 +0200 gfs2: Fix mmap locking for write faults When a write fault occurs, we need to take the inode glock of the underlying inode in exclusive mode. Otherwise, there's no guarantee that the dirty page will be written back to disk. Signed-off-by: Andreas Gruenbacher commit af8d80bf7c25b95bba15d6dc45a71459aa69514d Merge: 7544f3ee01f7e 7e008b02557cc Author: Dave Airlie Date: Fri May 21 11:10:04 2021 +1000 Merge tag 'drm-misc-fixes-2021-05-20' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Just a single fix for a dma-buf related WARN Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210520140808.ds6bk6i3oarmiea6@gilmour commit 7544f3ee01f7e64ae4e0052b7e8ced4acb25aa94 Merge: d07f6ca923ea0 a470c5665b3b9 Author: Dave Airlie Date: Fri May 21 11:02:24 2021 +1000 Merge tag 'exynos-drm-fixes-for-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Fixup - Correct kerneldoc of fimd_shadow_protect_win function. Cleanup - Drop redundant error messages. Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/20210520034747.257687-1-inki.dae@samsung.com commit ba816d3c265cfe9ed0ee8347eab63cf5ac3cf5dc Merge: 921dd23597704 d37316b72e8bf Author: Linus Torvalds Date: Thu May 20 14:46:26 2021 -1000 Merge tag 'arm-soc-fixes-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC fixes from Arnd Bergmann: "Only a small number of fixes so far, including some that I had applied during the merge window, so this is based on the original merge of the other branches. - The largest change is a fix for a reference counting bug in the AMD TEE driver. - Neil Armstrong now co-maintains Amlogic SoC support - Two build warning fixes for renesas device tree files - A sign expansion bug for optee - A DT binding fix for a mismerge" * tag 'arm-soc-fixes-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: npcm: wpcm450: select interrupt controller driver MAINTAINERS: ARM/Amlogic SoCs: add Neil as primary maintainer tee: amdtee: unload TA only when its refcount becomes 0 dt-bindings: nvmem: mediatek: remove duplicate mt8192 line firmware: arm_scmi: Remove duplicate declaration of struct scmi_protocol_handle firmware: arm_scpi: Prevent the ternary sign expansion bug arm64: dts: renesas: Add port@0 node for all CSI-2 nodes to dtsi arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Fix CSI40 ports commit 921dd23597704b31fb3b51c7eae9cf3022846625 Merge: a0d8b0eda3107 976aac5f88298 Author: Linus Torvalds Date: Thu May 20 14:43:33 2021 -1000 Merge branch 'urgent.2021.05.20a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu Pull kcsan fix from Paul McKenney: "Fix for a regression introduced in this merge window by commit e36299efe7d7 ("kcsan, debugfs: Move debugfs file creation out of early init"). The regression is not easy to trigger, requiring a KCSAN build using clang with CONFIG_LTO_CLANG=y. The fix is to simply make the kcsan_debugfs_init() function's type initcall-compatible. This has been posted to the relevant mailing lists:" * 'urgent.2021.05.20a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: kcsan: Fix debugfs initcall return type commit a0d8b0eda3107f5dda4a56623164ced833574ead Merge: a0eb553b6ff65 d1acd81bd6eb6 Author: Linus Torvalds Date: Thu May 20 14:41:35 2021 -1000 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Eight small fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: pm80xx: Fix drives missing during rmmod/insmod loop scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() scsi: qedf: Add pointer checks in qedf_update_link_speed() scsi: ufs: core: Increase the usable queue depth scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic scsi: ufs: ufs-mediatek: Fix power down spec violation commit a0eb553b6ff650faa031a470d048555b0b80a309 Merge: f01da525b3de8 bc8f3d4647a99 Author: Linus Torvalds Date: Thu May 20 14:36:21 2021 -1000 Merge tag 'for-5.13/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper fixes from Mike Snitzer: - Fix a couple DM snapshot target crashes exposed by user-error. - Fix DM integrity target to not use discard optimization, introduced during 5.13 merge, when recalulating. - Fix some sparse warnings in DM integrity target. * tag 'for-5.13/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm integrity: fix sparse warnings dm integrity: revert to not using discard filler when recalulating dm snapshot: fix crash with transient storage and zero chunk size dm snapshot: fix a crash when an origin has no snapshots commit 983c4fcb81d6bd19c6035e5dda6bf1fca058c320 Author: Pablo Neira Ayuso Date: Wed May 19 21:16:40 2021 +0200 netfilter: nf_tables: extended netlink error reporting for chain type Users that forget to select the NAT chain type in netfilter's Kconfig hit ENOENT when adding the basechain. This report is however sparse since it might be the table, the chain or the kernel module that is missing/does not exist. This patch provides extended netlink error reporting for the NFTA_CHAIN_TYPE netlink attribute, which conveys the basechain type. If the user selects a basechain that his custom kernel does not support, the netlink extended error provides a more accurate hint on the described issue. Signed-off-by: Pablo Neira Ayuso commit c781471d67a56d7d4c113669a11ede0463b5c719 Author: Pablo Neira Ayuso Date: Wed May 19 13:32:20 2021 +0200 netfilter: nf_tables: missing error reporting for not selected expressions Sometimes users forget to turn on nftables extensions from Kconfig that they need. In such case, the error reporting from userspace is misleading: $ sudo nft add rule x y counter Error: Could not process rule: No such file or directory add rule x y counter ^^^^^^^^^^^^^^^^^^^^ Add missing NL_SET_BAD_ATTR() to provide a hint: $ nft add rule x y counter Error: Could not process rule: No such file or directory add rule x y counter ^^^^^^^ Fixes: 83d9dcba06c5 ("netfilter: nf_tables: extended netlink error reporting for expressions") Signed-off-by: Pablo Neira Ayuso commit 5cb4a593821f1964d7176b2e48e019ab5a5d4353 Merge: 13a6f31539223 4691ffb18ac90 Author: David S. Miller Date: Thu May 20 15:49:33 2021 -0700 Merge branch 'stmmac-fixes' Joakim Zhang says: ==================== net: fixes for stmmac Two clock fixes for stmmac driver. ==================== Signed-off-by: David S. Miller commit 4691ffb18ac908609aab07d13af7995b6b89d33c Author: Joakim Zhang Date: Thu May 20 20:51:17 2021 +0800 net: stmmac: fix system hang if change mac address after interface ifdown Fix system hang with below sequences: ~# ifconfig ethx down ~# ifconfig ethx hw ether xx:xx:xx:xx:xx:xx After ethx down, stmmac all clocks gated off and then register access causes system hang. Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver") Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit b3dcb312778664bfbe0a73242fa04a628719b066 Author: Joakim Zhang Date: Thu May 20 20:51:16 2021 +0800 net: stmmac: correct clocks enabled in stmmac_vlan_rx_kill_vid() This should be a mistake to fix conflicts when removing RFC tag to repost the patch. Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver") Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 13a6f3153922391e90036ba2267d34eed63196fc Author: Zheyu Ma Date: Thu May 20 12:32:36 2021 +0000 net/qla3xxx: fix schedule while atomic in ql_sem_spinlock When calling the 'ql_sem_spinlock', the driver has already acquired the spin lock, so the driver should not call 'ssleep' in atomic context. This bug can be fixed by using 'mdelay' instead of 'ssleep'. The KASAN's log reveals it: [ 3.238124 ] BUG: scheduling while atomic: swapper/0/1/0x00000002 [ 3.238748 ] 2 locks held by swapper/0/1: [ 3.239151 ] #0: ffff88810177b240 (&dev->mutex){....}-{3:3}, at: __device_driver_lock+0x41/0x60 [ 3.240026 ] #1: ffff888107c60e28 (&qdev->hw_lock){....}-{2:2}, at: ql3xxx_probe+0x2aa/0xea0 [ 3.240873 ] Modules linked in: [ 3.241187 ] irq event stamp: 460854 [ 3.241541 ] hardirqs last enabled at (460853): [] _raw_spin_unlock_irqrestore+0x4f/0x70 [ 3.242245 ] hardirqs last disabled at (460854): [] _raw_spin_lock_irqsave+0x2a/0x70 [ 3.242245 ] softirqs last enabled at (446076): [] __do_softirq+0x2e4/0x4b1 [ 3.242245 ] softirqs last disabled at (446069): [] irq_exit_rcu+0x100/0x110 [ 3.242245 ] Preemption disabled at: [ 3.242245 ] [] ql3xxx_probe+0x2aa/0xea0 [ 3.242245 ] Kernel panic - not syncing: scheduling while atomic [ 3.242245 ] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 5.13.0-rc1-00145 -gee7dc339169-dirty #16 [ 3.242245 ] Call Trace: [ 3.242245 ] dump_stack+0xba/0xf5 [ 3.242245 ] ? ql3xxx_probe+0x1f0/0xea0 [ 3.242245 ] panic+0x15a/0x3f2 [ 3.242245 ] ? vprintk+0x76/0x150 [ 3.242245 ] ? ql3xxx_probe+0x2aa/0xea0 [ 3.242245 ] __schedule_bug+0xae/0xe0 [ 3.242245 ] __schedule+0x72e/0xa00 [ 3.242245 ] schedule+0x43/0xf0 [ 3.242245 ] schedule_timeout+0x28b/0x500 [ 3.242245 ] ? del_timer_sync+0xf0/0xf0 [ 3.242245 ] ? msleep+0x2f/0x70 [ 3.242245 ] msleep+0x59/0x70 [ 3.242245 ] ql3xxx_probe+0x307/0xea0 [ 3.242245 ] ? _raw_spin_unlock_irqrestore+0x3a/0x70 [ 3.242245 ] ? pci_device_remove+0x110/0x110 [ 3.242245 ] local_pci_probe+0x45/0xa0 [ 3.242245 ] pci_device_probe+0x12b/0x1d0 [ 3.242245 ] really_probe+0x2a9/0x610 [ 3.242245 ] driver_probe_device+0x90/0x1d0 [ 3.242245 ] ? mutex_lock_nested+0x1b/0x20 [ 3.242245 ] device_driver_attach+0x68/0x70 [ 3.242245 ] __driver_attach+0x124/0x1b0 [ 3.242245 ] ? device_driver_attach+0x70/0x70 [ 3.242245 ] bus_for_each_dev+0xbb/0x110 [ 3.242245 ] ? rdinit_setup+0x45/0x45 [ 3.242245 ] driver_attach+0x27/0x30 [ 3.242245 ] bus_add_driver+0x1eb/0x2a0 [ 3.242245 ] driver_register+0xa9/0x180 [ 3.242245 ] __pci_register_driver+0x82/0x90 [ 3.242245 ] ? yellowfin_init+0x25/0x25 [ 3.242245 ] ql3xxx_driver_init+0x23/0x25 [ 3.242245 ] do_one_initcall+0x7f/0x3d0 [ 3.242245 ] ? rdinit_setup+0x45/0x45 [ 3.242245 ] ? rcu_read_lock_sched_held+0x4f/0x80 [ 3.242245 ] kernel_init_freeable+0x2aa/0x301 [ 3.242245 ] ? rest_init+0x2c0/0x2c0 [ 3.242245 ] kernel_init+0x18/0x190 [ 3.242245 ] ? rest_init+0x2c0/0x2c0 [ 3.242245 ] ? rest_init+0x2c0/0x2c0 [ 3.242245 ] ret_from_fork+0x1f/0x30 [ 3.242245 ] Dumping ftrace buffer: [ 3.242245 ] (ftrace buffer empty) [ 3.242245 ] Kernel Offset: disabled [ 3.242245 ] Rebooting in 1 seconds. Reported-by: Zheyu Ma Signed-off-by: Zheyu Ma Signed-off-by: David S. Miller commit 503c599a4f53fe3d959aebfd22c34da27da49777 Author: Aditya Srivastava Date: Fri May 21 00:19:15 2021 +0530 net: encx24j600: fix kernel-doc syntax in file headers The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/net/ethernet/microchip/encx24j600 files follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc. For e.g., running scripts/kernel-doc -none drivers/net/ethernet/microchip/encx24j600_hw.h emits: warning: expecting prototype for h(). Prototype was for _ENCX24J600_HW_H() instead Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 63e39d29b3da02e901349f6cd71159818a4737a6 Author: Jesse Brandeburg Date: Thu May 20 11:18:35 2021 -0700 ixgbe: fix large MTU request from VF Check that the MTU value requested by the VF is in the supported range of MTUs before attempting to set the VF large packet enable, otherwise reject the request. This also avoids unnecessary register updates in the case of the 82599 controller. Fixes: 872844ddb9e4 ("ixgbe: Enable jumbo frames support w/ SR-IOV") Co-developed-by: Piotr Skajewski Signed-off-by: Piotr Skajewski Signed-off-by: Jesse Brandeburg Co-developed-by: Mateusz Palczewski Signed-off-by: Mateusz Palczewski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen Signed-off-by: David S. Miller commit 84316ca4e100d8cbfccd9f774e23817cb2059868 Author: Jussi Maki Date: Wed May 19 15:47:42 2021 +0000 bpf: Set mac_len in bpf_skb_change_head The skb_change_head() helper did not set "skb->mac_len", which is problematic when it's used in combination with skb_redirect_peer(). Without it, redirecting a packet from a L3 device such as wireguard to the veth peer device will cause skb->data to point to the middle of the IP header on entry to tcp_v4_rcv() since the L2 header is not pulled correctly due to mac_len=0. Fixes: 3a0af8fd61f9 ("bpf: BPF for lightweight tunnel infrastructure") Signed-off-by: Jussi Maki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210519154743.2554771-2-joamaki@gmail.com commit ceb11679d9fcf3fdb358a310a38760fcbe9b63ed Author: Yinjun Zhang Date: Thu May 20 10:58:34 2021 +0200 bpf, offload: Reorder offload callback 'prepare' in verifier Commit 4976b718c355 ("bpf: Introduce pseudo_btf_id") switched the order of resolve_pseudo_ldimm(), in which some pseudo instructions are rewritten. Thus those rewritten instructions cannot be passed to driver via 'prepare' offload callback. Reorder the 'prepare' offload callback to fix it. Fixes: 4976b718c355 ("bpf: Introduce pseudo_btf_id") Signed-off-by: Yinjun Zhang Signed-off-by: Simon Horman Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210520085834.15023-1-simon.horman@netronome.com commit 0af02eb2a7d76ca85a1ecaf4b3775e2c86408fab Author: Florent Revest Date: Mon May 17 11:28:30 2021 +0200 bpf: Avoid using ARRAY_SIZE on an uninitialized pointer The cppcheck static code analysis reported the following error: if (WARN_ON_ONCE(nest_level > ARRAY_SIZE(bufs->tmp_bufs))) { ^ ARRAY_SIZE is a macro that expands to sizeofs, so bufs is not actually dereferenced at runtime, and the code is actually safe. But to keep things tidy, this patch removes the need for a call to ARRAY_SIZE by extracting the size of the array into a macro. Cppcheck should no longer be confused and the code ends up being a bit cleaner. Fixes: e2d5b2bb769f ("bpf: Fix nested bpf_bprintf_prepare with more per-cpu buffers") Reported-by: kernel test robot Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210517092830.1026418-2-revest@chromium.org commit 8afcc19fbf083a8459284d9a29b4b5ac1cb2396c Author: Florent Revest Date: Mon May 17 11:28:29 2021 +0200 bpf: Clarify a bpf_bprintf_prepare macro The per-cpu buffers contain bprintf data rather than printf arguments. The macro name and comment were a bit confusing, this rewords them in a clearer way. Signed-off-by: Florent Revest Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210517092830.1026418-1-revest@chromium.org commit 704e2beba23c45eaa056b1c03b5e1fb221e03f80 Author: Andrii Nakryiko Date: Fri May 14 11:07:26 2021 -0700 selftests/bpf: Test ringbuf mmap read-only and read-write restrictions Extend ringbuf selftest to validate read/write and read-only restrictions on memory mapping consumer/producer/data pages. Ensure no "escalations" from PROT_READ to PROT_WRITE/PROT_EXEC is allowed. And test that mremap() fails to expand mmap()'ed area. Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210514180726.843157-1-andrii@kernel.org commit 8f1634b82189e715b0f82f16ce54fab43cfedd8a Author: Stanislav Fomichev Date: Fri May 14 10:05:28 2021 -0700 selftests/bpf: Convert static to global in tc_redirect progs Both IFINDEX_SRC and IFINDEX_DST are set from the userspace and it won't work once bpf merges with bpf-next. Fixes: 096eccdef0b3 ("selftests/bpf: Rewrite test_tc_redirect.sh as prog_tests/tc_redirect.c") Signed-off-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210514170528.3750250-1-sdf@google.com commit 6bdacdb48e94ff26c03c6eeeef48c03c5e2f7dd4 Author: Daniel Borkmann Date: Wed May 12 20:57:14 2021 +0200 bpf: Fix BPF_JIT kconfig symbol dependency Randy reported a randconfig build error recently on i386: ld: arch/x86/net/bpf_jit_comp32.o: in function `do_jit': bpf_jit_comp32.c:(.text+0x28c9): undefined reference to `__bpf_call_base' ld: arch/x86/net/bpf_jit_comp32.o: in function `bpf_int_jit_compile': bpf_jit_comp32.c:(.text+0x3694): undefined reference to `bpf_jit_blind_constants' ld: bpf_jit_comp32.c:(.text+0x3719): undefined reference to `bpf_jit_binary_free' ld: bpf_jit_comp32.c:(.text+0x3745): undefined reference to `bpf_jit_binary_alloc' ld: bpf_jit_comp32.c:(.text+0x37d3): undefined reference to `bpf_jit_prog_release_other' [...] The cause was that b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf with core options") moved BPF_JIT from net/Kconfig into kernel/bpf/Kconfig and previously BPF_JIT was guarded by a 'if NET'. However, there is no actual dependency on NET, it's just that menuconfig NET selects BPF. And the latter in turn causes kernel/bpf/core.o to be built which contains above symbols. Randy's randconfig didn't have NET set, and BPF wasn't either, but BPF_JIT otoh was. Detangle this by making BPF_JIT depend on BPF instead. arm64 was the only arch that pulled in its JIT in net/ via obj-$(CONFIG_NET), all others unconditionally pull this dir in via obj-y. Do the same since CONFIG_NET guard there is really useless as we compiled the JIT via obj-$(CONFIG_BPF_JIT) += bpf_jit_comp.o anyway. Fixes: b24abcff918a ("bpf, kconfig: Add consolidated menu entry for bpf with core options") Reported-by: Randy Dunlap Signed-off-by: Daniel Borkmann Acked-by: Randy Dunlap Tested-by: Randy Dunlap commit 20ebbfd22f8115a1e4f60d3d289f66be4d47f1ec Author: James Zhu Date: Wed May 19 12:08:20 2021 -0400 drm/amdgpu/jpeg3: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 23f10a571da5eaa63b7845d16e2f49837e841ab9 Author: James Zhu Date: Wed May 19 12:04:38 2021 -0400 drm/amdgpu/jpeg2.5: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit ff48f6dbf0ff896c98d167a67a5b975fb034356b Author: James Zhu Date: Wed May 19 11:42:48 2021 -0400 drm/amdgpu/jpeg2.0: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4a62542ae064e3b645d6bbf2295a6c05136956c6 Author: James Zhu Date: Mon May 17 16:39:17 2021 -0400 drm/amdgpu/vcn3: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 2fb536ea42d557f39f70c755f68e1aa1ad466c55 Author: James Zhu Date: Wed May 19 11:40:39 2021 -0400 drm/amdgpu/vcn2.5: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 0c6013377b4027e69d8f3e63b6bf556b6cb87802 Author: James Zhu Date: Wed May 19 11:26:32 2021 -0400 drm/amdgpu/vcn2.0: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit b95f045ea35673572ef46d6483ad8bd6d353d63c Author: James Zhu Date: Tue May 18 10:58:22 2021 -0400 drm/amdgpu/vcn1: add cancel_delayed_work_sync before power gate Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit ba515a5821dc0d101ded0379b14b1d1471ebfaba Author: Kevin Wang Date: Wed May 19 11:03:11 2021 +0800 drm/amdkfd: correct sienna_cichlid SDMA RLC register offset error 1.correct KFD SDMA RLC queue register offset error. (all sdma rlc register offset is base on SDMA0.RLC0_RLC0_RB_CNTL) 2.HQD_N_REGS (19+6+7+12) 12: the 2 more resgisters than navi1x (SDMAx_RLCy_MIDCMD_DATA{9,10}) the patch also can be fixed NULL pointer issue when read /sys/kernel/debug/kfd/hqds on sienna_cichlid chip. Signed-off-by: Kevin Wang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 98e48cd9283dbac0e1445ee780889f10b3d1db6a Author: Dmitry Baryshkov Date: Thu May 20 01:12:23 2021 +0300 regulator: core: resolve supply for boot-on/always-on regulators For the boot-on/always-on regulators the set_machine_constrainst() is called before resolving rdev->supply. Thus the code would try to enable rdev before enabling supplying regulator. Enforce resolving supply regulator before enabling rdev. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210519221224.2868496-1-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit 1a0b713c73688c6bafbe6faf8c90390b11b26fc6 Author: Evan Quan Date: Tue May 18 09:01:47 2021 +0800 drm/amd/pm: correct MGpuFanBoost setting No MGpuFanBoost setting for those ASICs which do not support it. Otherwise, it may breaks their fan control feature. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1580 Signed-off-by: Evan Quan Reviewed-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8570e75a55430844a8e85e3458e5701556334ffd Author: David Matlack Date: Wed May 19 21:33:33 2021 +0000 selftests: Add .gitignore for nci test suite Building the nci test suite produces a binary, nci_dev, that git then tries to track. Add a .gitignore file to tell git to ignore this binary. Signed-off-by: David Matlack Signed-off-by: David S. Miller commit 9687c85dfbf84a6a37522626b4d5c5191a695e6c Author: Rohith Surabattula Date: Thu May 20 16:45:01 2021 +0000 Fix KASAN identified use-after-free issue. [ 612.157429] ================================================================== [ 612.158275] BUG: KASAN: use-after-free in process_one_work+0x90/0x9b0 [ 612.158801] Read of size 8 at addr ffff88810a31ca60 by task kworker/2:9/2382 [ 612.159611] CPU: 2 PID: 2382 Comm: kworker/2:9 Tainted: G OE 5.13.0-rc2+ #98 [ 612.159623] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014 [ 612.159640] Workqueue: 0x0 (deferredclose) [ 612.159669] Call Trace: [ 612.159685] dump_stack+0xbb/0x107 [ 612.159711] print_address_description.constprop.0+0x18/0x140 [ 612.159733] ? process_one_work+0x90/0x9b0 [ 612.159743] ? process_one_work+0x90/0x9b0 [ 612.159754] kasan_report.cold+0x7c/0xd8 [ 612.159778] ? lock_is_held_type+0x80/0x130 [ 612.159789] ? process_one_work+0x90/0x9b0 [ 612.159812] kasan_check_range+0x145/0x1a0 [ 612.159834] process_one_work+0x90/0x9b0 [ 612.159877] ? pwq_dec_nr_in_flight+0x110/0x110 [ 612.159914] ? spin_bug+0x90/0x90 [ 612.159967] worker_thread+0x3b6/0x6c0 [ 612.160023] ? process_one_work+0x9b0/0x9b0 [ 612.160038] kthread+0x1dc/0x200 [ 612.160051] ? kthread_create_worker_on_cpu+0xd0/0xd0 [ 612.160092] ret_from_fork+0x1f/0x30 [ 612.160399] Allocated by task 2358: [ 612.160757] kasan_save_stack+0x1b/0x40 [ 612.160768] __kasan_kmalloc+0x9b/0xd0 [ 612.160778] cifs_new_fileinfo+0xb0/0x960 [cifs] [ 612.161170] cifs_open+0xadf/0xf20 [cifs] [ 612.161421] do_dentry_open+0x2aa/0x6b0 [ 612.161432] path_openat+0xbd9/0xfa0 [ 612.161441] do_filp_open+0x11d/0x230 [ 612.161450] do_sys_openat2+0x115/0x240 [ 612.161460] __x64_sys_openat+0xce/0x140 When mod_delayed_work is called to modify the delay of pending work, it might return false and queue a new work when pending work is already scheduled or when try to grab pending work failed. So, Increase the reference count when new work is scheduled to avoid use-after-free. Signed-off-by: Rohith Surabattula Signed-off-by: Steve French commit 940d71c6462e8151c78f28e4919aa8882ff2054e Author: Sergey Senozhatsky Date: Thu May 20 19:14:22 2021 +0900 wq: handle VM suspension in stall detection If VCPU is suspended (VM suspend) in wq_watchdog_timer_fn() then once this VCPU resumes it will see the new jiffies value, while it may take a while before IRQ detects PVCLOCK_GUEST_STOPPED on this VCPU and updates all the watchdogs via pvclock_touch_watchdogs(). There is a small chance of misreported WQ stalls in the meantime, because new jiffies is time_after() old 'ts + thresh'. wq_watchdog_timer_fn() { for_each_pool(pool, pi) { if (time_after(jiffies, ts + thresh)) { pr_emerg("BUG: workqueue lockup - pool"); } } } Save jiffies at the beginning of this function and use that value for stall detection. If VM gets suspended then we continue using "old" jiffies value and old WQ touch timestamps. If IRQ at some point restarts the stall detection cycle (pvclock_touch_watchdogs()) then old jiffies will always be before new 'ts + thresh'. Signed-off-by: Sergey Senozhatsky Signed-off-by: Tejun Heo commit 855bfff9d623e7aff6556bfb6831d324dec8d96a Author: Axel Lin Date: Thu May 20 19:18:11 2021 +0800 regulator: fixed: Ensure enable_counter is correct if reg_domain_disable fails dev_pm_genpd_set_performance_state() may fail, so had better to check it's return value before decreasing priv->enable_counter. Fixes: bf3a28cf4241 ("regulator: fixed: support using power domain for enable/disable") Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210520111811.1806293-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 833bc4cf9754643acc69b3c6b65988ca78df4460 Author: Dan Carpenter Date: Thu May 20 08:08:24 2021 +0300 ASoC: cs35l33: fix an error code in probe() This error path returns zero (success) but it should return -EINVAL. Fixes: 3333cb7187b9 ("ASoC: cs35l33: Initial commit of the cs35l33 CODEC driver.") Signed-off-by: Dan Carpenter Reviewed-by: Charles Keepax Link: https://lore.kernel.org/r/YKXuyGEzhPT35R3G@mwanda Signed-off-by: Mark Brown commit f01da525b3de8e59b2656b55d40c60462098651f Merge: 6aa37a53ff235 463a3f66473b5 Author: Linus Torvalds Date: Thu May 20 06:44:04 2021 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Jason Gunthorpe: "A mixture of small bug fixes, most for longer standing problems: - NULL pointer crash in siw - Various error unwind bugs in siw, rxe, cm - User triggerable errors in uverbs - Minor bugs in mlx5 and rxe drivers" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/uverbs: Fix a NULL vs IS_ERR() bug RDMA/mlx5: Fix query DCT via DEVX RDMA/core: Don't access cm_id after its destruction RDMA/rxe: Return CQE error if invalid lkey was supplied RDMA/mlx5: Recover from fatal event in dual port mode RDMA/mlx5: Verify that DM operation is reasonable RDMA/rxe: Clear all QP fields if creation failed RDMA/core: Prevent divide-by-zero error triggered by the user RDMA/siw: Release xarray entry RDMA/siw: Properly check send and receive CQ pointers commit 6aa37a53ff235a0579d7893c08fd05c2171aafb4 Merge: 9ebd8118162b2 05ca447630334 Author: Linus Torvalds Date: Thu May 20 06:42:21 2021 -1000 Merge tag 'sound-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "All small device-specific fixes here: a series of FireWire audio fixes, UAF and other fixes in USB-audio and co spotted by fuzzer, and a few HD-audio quirks as usual" * tag 'sound-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: line6: Fix racy initialization of LINE6 MIDI ALSA: dice: fix stream format for TC Electronic Konnekt Live at high sampling transfer frequency ALSA: dice: disable double_pcm_frames mode for M-Audio Profire 610, 2626 and Avid M-Box 3 Pro ALSA: intel8x0: Don't update period unless prepared ALSA: hda/realtek: Add some CLOVE SSIDs of ALC293 ALSA: firewire-lib: fix amdtp_packet tracepoints event for packet_index field ALSA: firewire-lib: fix calculation for size of IR context payload ALSA: firewire-lib: fix check for the size of isochronous packet payload ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro ALSA: dice: fix stream format at middle sampling rate for Alesis iO 26 ALSA: hda/realtek: Add fixup for HP Spectre x360 15-df0xxx ALSA: usb-audio: Fix potential out-of-bounce access in MIDI EP parser ALSA: usb-audio: Validate MS endpoint descriptors ALSA: hda: fixup headset for ASUS GU502 laptop ALSA: hda/realtek: reset eapd coeff to default value for alc287 commit 9ebd8118162b220d616d7e29b505dd64a90f75b6 Merge: 50f09a3dd5877 e68671e9e1275 Author: Linus Torvalds Date: Thu May 20 06:40:20 2021 -1000 Merge tag 'platform-drivers-x86-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: "Assorted pdx86 bug-fixes and model-specific quirks for 5.13" * tag 'platform-drivers-x86-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: touchscreen_dmi: Add info for the Chuwi Hi10 Pro (CWI529) tablet platform/x86: touchscreen_dmi: Add info for the Mediacom Winpad 7.0 W700 tablet platform/x86: intel_punit_ipc: Append MODULE_DEVICE_TABLE for ACPI platform/x86: dell-smbios-wmi: Fix oops on rmmod dell_smbios platform/x86: hp-wireless: add AMD's hardware id to the supported list platform/x86: intel_int0002_vgpio: Only call enable_irq_wake() when using s2idle platform/x86: gigabyte-wmi: add support for B550 Aorus Elite platform/x86: gigabyte-wmi: add support for X570 UD platform/x86: gigabyte-wmi: streamline dmi matching platform/mellanox: mlxbf-tmfifo: Fix a memory barrier issue platform/surface: dtx: Fix poll function platform/surface: aggregator: Add platform-drivers-x86 list to MAINTAINERS entry platform/surface: aggregator: avoid clang -Wconstant-conversion warning platform/surface: aggregator: Do not mark interrupt as shared platform/x86: hp_accel: Avoid invoking _INI to speed up resume platform/x86: ideapad-laptop: fix method name typo platform/x86: ideapad-laptop: fix a NULL pointer dereference commit 50f09a3dd5877bda888fc25c3d98937dcfb85539 Merge: 7ac177143caef 2962484dfef8d Author: Linus Torvalds Date: Thu May 20 06:31:52 2021 -1000 Merge tag 'char-misc-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here is a big set of char/misc/other driver fixes for 5.13-rc3. The majority here is the fallout of the umn.edu re-review of all prior submissions. That resulted in a bunch of reverts along with the "correct" changes made, such that there is no regression of any of the potential fixes that were made by those individuals. I would like to thank the over 80 different developers who helped with the review and fixes for this mess. Other than that, there's a few habanna driver fixes for reported issues, and some dyndbg fixes for reported problems. All of these have been in linux-next for a while with no reported problems" * tag 'char-misc-5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (82 commits) misc: eeprom: at24: check suspend status before disable regulator uio_hv_generic: Fix another memory leak in error handling paths uio_hv_generic: Fix a memory leak in error handling paths uio/uio_pci_generic: fix return value changed in refactoring Revert "Revert "ALSA: usx2y: Fix potential NULL pointer dereference"" dyndbg: drop uninformative vpr_info dyndbg: avoid calling dyndbg_emit_prefix when it has no work binder: Return EFAULT if we fail BINDER_ENABLE_ONEWAY_SPAM_DETECTION cdrom: gdrom: initialize global variable at init time brcmfmac: properly check for bus register errors Revert "brcmfmac: add a check for the status of usb_register" video: imsttfb: check for ioremap() failures Revert "video: imsttfb: fix potential NULL pointer dereferences" net: liquidio: Add missing null pointer checks Revert "net: liquidio: fix a NULL pointer dereference" media: gspca: properly check for errors in po1030_probe() Revert "media: gspca: Check the return value of write_bridge for timeout" media: gspca: mt9m111: Check write_bridge for timeout Revert "media: gspca: mt9m111: Check write_bridge for timeout" media: dvb: Add check on sp8870_readreg return ... commit 45e1ba40837ac2f6f4d4716bddb8d44bd7e4a251 Author: Shakeel Butt Date: Wed May 12 13:19:46 2021 -0700 cgroup: disable controllers at parse time This patch effectively reverts the commit a3e72739b7a7 ("cgroup: fix too early usage of static_branch_disable()"). The commit 6041186a3258 ("init: initialize jump labels before command line option parsing") has moved the jump_label_init() before parse_args() which has made the commit a3e72739b7a7 unnecessary. On the other hand there are consequences of disabling the controllers later as there are subsystems doing the controller checks for different decisions. One such incident is reported [1] regarding the memory controller and its impact on memory reclaim code. [1] https://lore.kernel.org/linux-mm/921e53f3-4b13-aab8-4a9e-e83ff15371e4@nec.com Signed-off-by: Shakeel Butt Reported-by: NOMURA JUNICHI(野村 淳一) Signed-off-by: Tejun Heo Tested-by: Jun'ichi Nomura commit 7ac177143caef12b174583e410b7240c33f0289d Merge: c3d0e3fd41b7f 5b9fedb31e476 Author: Linus Torvalds Date: Thu May 20 06:20:15 2021 -1000 Merge tag 'quota_for_v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota fixes from Jan Kara: "The most important part in the pull is disablement of the new syscall quotactl_path() which was added in rc1. The reason is some people at LWN discussion pointed out dirfd would be useful for this path based syscall and Christian Brauner agreed. Without dirfd it may be indeed problematic for containers. So let's just disable the syscall for now when it doesn't have users yet so that we have more time to mull over how to best specify the filesystem we want to work on" * tag 'quota_for_v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: quota: Disable quotactl_path syscall quota: Use 'hlist_for_each_entry' to simplify code commit d275880abce9ac66cb842af828fbc2b1ba8082a0 Author: Trond Myklebust Date: Mon May 17 08:50:11 2021 -0400 SUNRPC: Fix Oops in xs_tcp_send_request() when transport is disconnected If a disconnection occurs while we're trying to reply to a server callback, then we may end up calling xs_tcp_send_request() with a NULL value for transport->inet, which trips up the call to tcp_sock_set_cork(). Fixes: d737e5d41870 ("SUNRPC: Set TCP_CORK until the transmit queue is empty") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust commit a421d218603ffa822a0b8045055c03eae394a7eb Author: Anna Schumaker Date: Wed May 19 12:54:51 2021 -0400 NFSv4: Fix a NULL pointer dereference in pnfs_mark_matching_lsegs_return() Commit de144ff4234f changes _pnfs_return_layout() to call pnfs_mark_matching_lsegs_return() passing NULL as the struct pnfs_layout_range argument. Unfortunately, pnfs_mark_matching_lsegs_return() doesn't check if we have a value here before dereferencing it, causing an oops. I'm able to hit this crash consistently when running connectathon basic tests on NFS v4.1/v4.2 against Ontap. Fixes: de144ff4234f ("NFSv4: Don't discard segments marked for return in _pnfs_return_layout()") Cc: stable@vger.kernel.org Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust commit e877a88d1f069edced4160792f42c2a8e2dba942 Author: NeilBrown Date: Mon May 17 09:59:10 2021 +1000 SUNRPC in case of backlog, hand free slots directly to waiting task If sunrpc.tcp_max_slot_table_entries is small and there are tasks on the backlog queue, then when a request completes it is freed and the first task on the queue is woken. The expectation is that it will wake and claim that request. However if it was a sync task and the waiting process was killed at just that moment, it will wake and NOT claim the request. As long as TASK_CONGESTED remains set, requests can only be claimed by tasks woken from the backlog, and they are woken only as requests are freed, so when a task doesn't claim a request, no other task can ever get that request until TASK_CONGESTED is cleared. Each time this happens the number of available requests is decreased by one. With a sufficiently high workload and sufficiently low setting of max_slot (16 in the case where this was seen), TASK_CONGESTED can remain set for an extended period, and the above scenario (of a process being killed just as its task was woken) can repeat until no requests can be allocated. Then traffic stops. This patch addresses the problem by introducing a positive handover of a request from a completing task to a backlog task - the request is never freed when there is a backlog. When a task is woken it might not already have a request attached in which case it is *not* freed (as with current code) but is initialised (if needed) and used. If it isn't used it will eventually be freed by rpc_exit_task(). xprt_release() is enhanced to be able to correctly release an uninitialised request. Fixes: ba60eb25ff6b ("SUNRPC: Fix a livelock problem in the xprt->backlog queue") Signed-off-by: NeilBrown Signed-off-by: Trond Myklebust commit d1d973950aceecd646ea3bee66764414bfeac072 Author: Yang Li Date: Wed May 12 17:20:04 2021 +0800 pNFS/NFSv4: Remove redundant initialization of 'rd_size' Variable 'rd_size' is being initialized however this value is never read as 'rd_size' is assigned a new value in for statement. Remove the redundant assignment. Clean up clang warning: fs/nfs/pnfs.c:2681:6: warning: Value stored to 'rd_size' during its initialization is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Trond Myklebust commit 769b01ea68b6c49dc3cde6adf7e53927dacbd3a8 Author: Dan Carpenter Date: Tue May 11 11:49:42 2021 +0300 NFS: fix an incorrect limit in filelayout_decode_layout() The "sizeof(struct nfs_fh)" is two bytes too large and could lead to memory corruption. It should be NFS_MAXFHSIZE because that's the size of the ->data[] buffer. I reversed the size of the arguments to put the variable on the left. Fixes: 16b374ca439f ("NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure") Signed-off-by: Dan Carpenter Signed-off-by: Trond Myklebust commit bb002388901151fe35b6697ab116f6ed0721a9ed Author: zhouchuangao Date: Sun May 9 19:34:37 2021 -0700 fs/nfs: Use fatal_signal_pending instead of signal_pending We set the state of the current process to TASK_KILLABLE via prepare_to_wait(). Should we use fatal_signal_pending() to detect the signal here? Fixes: b4868b44c562 ("NFSv4: Wait for stateid updates after CLOSE/OPEN_DOWNGRADE") Signed-off-by: zhouchuangao Signed-off-by: Trond Myklebust commit e3c2b047475b52739bcf178a9e95176c42bbcf8f Author: Darrick J. Wong Date: Wed May 12 16:43:10 2021 -0700 xfs: restore old ioctl definitions These ioctl definitions in xfs_fs.h are part of the userspace ABI and were mistakenly removed during the 5.13 merge window. Fixes: 9fefd5db08ce ("xfs: convert to fileattr") Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig commit 16c9de54dc868c121918f2ae91e46330f919049f Author: Darrick J. Wong Date: Wed May 12 16:41:13 2021 -0700 xfs: fix deadlock retry tracepoint arguments sc->ip is the inode that's being scrubbed, which means that it's not set for scrub types that don't involve inodes. If one of those scrubbers (e.g. inode btrees) returns EDEADLOCK, we'll trip over the null pointer. Fix that by reporting either the file being examined or the file that was used to call scrub. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 676a659b60afb13166371580f3f6f434e9ba6f21 Author: Darrick J. Wong Date: Sun May 9 16:22:55 2021 -0700 xfs: retry allocations when locality-based search fails If a realtime allocation fails because we can't find a sufficiently large free extent satisfying locality rules, relax the locality rules and try again. This reduces the occurrence of short writes to realtime files when the write size is large and the free space is fragmented. This was originally discovered by running generic/186 with the realtime reflink patchset and a 128k cow extent size hint, but the short write symptoms can manifest with a 128k extent size hint and no reflink, so apply the fix now. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson commit e0112a7c9e847ada15a631b88e279d547e8f26a7 Author: Dan Carpenter Date: Wed May 19 17:16:50 2021 +0300 staging: emxx_udc: fix loop in _nbu2ss_nuke() The _nbu2ss_ep_done() function calls: list_del_init(&req->queue); which means that the loop will never exit. Fixes: ca3d253eb967 ("Staging: emxx_udc: Iterate list using list_for_each_entry") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YKUd0sDyjm/lkJfJ@mwanda Signed-off-by: Greg Kroah-Hartman commit e0e24208792080135248f23fdf6d51aa2e04df05 Author: Randy Wright Date: Fri May 14 10:26:54 2021 -0600 serial: 8250_pci: Add support for new HPE serial device Add support for new HPE serial device. It is MSI enabled, but otherwise similar to legacy HP server serial devices. Tested-by: Jerry Hoemann Signed-off-by: Randy Wright Cc: stable Link: https://lore.kernel.org/r/1621009614-28836-1-git-send-email-rwright@hpe.com Signed-off-by: Greg Kroah-Hartman commit 31fae7c8b18c3f8029a2a5dce97a3182c1a167a0 Author: Vignesh Raghavendra Date: Tue May 11 20:49:55 2021 +0530 serial: 8250: 8250_omap: Fix possible interrupt storm It is possible that RX TIMEOUT is signalled after RX FIFO has been drained, in which case a dummy read of RX FIFO is required to clear RX TIMEOUT condition. Otherwise, RX TIMEOUT condition is not cleared leading to an interrupt storm Cc: stable@vger.kernel.org Reported-by: Jan Kiszka Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210511151955.28071-1-vigneshr@ti.com Signed-off-by: Greg Kroah-Hartman commit 1f06f5713f5278b7768031150ceb43d1127b9ad6 Author: Andrew Jeffery Date: Thu May 20 11:43:34 2021 +0930 serial: 8250: Use BIT(x) for UART_{CAP,BUG}_* BIT(x) improves readability and safety with respect to shifts. Reviewed-by: Jiri Slaby Signed-off-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210520021334.497341-3-andrew@aj.id.au Signed-off-by: Greg Kroah-Hartman commit df8f2be2fd0b44b2cb6077068f52e05f0ac40897 Author: Andrew Jeffery Date: Thu May 20 11:43:33 2021 +0930 serial: 8250: Add UART_BUG_TXRACE workaround for Aspeed VUART Aspeed Virtual UARTs directly bridge e.g. the system console UART on the LPC bus to the UART interface on the BMC's internal APB. As such there's no RS-232 signalling involved - the UART interfaces on each bus are directly connected as the producers and consumers of the one set of FIFOs. The APB in the AST2600 generally runs at 100MHz while the LPC bus peaks at 33MHz. The difference in clock speeds exposes a race in the VUART design where a Tx data burst on the APB interface can result in a byte lost on the LPC interface. The symptom is LSR[DR] remains clear on the LPC interface despite data being present in its Rx FIFO, while LSR[THRE] remains clear on the APB interface as the host has not consumed the data the BMC has transmitted. In this state, the UART has stalled and no further data can be transmitted without manual intervention (e.g. resetting the FIFOs, resulting in loss of data). The recommended work-around is to insert a read cycle on the APB interface between writes to THR. Cc: ChiaWei Wang Tested-by: ChiaWei Wang Reviewed-by: Jiri Slaby Signed-off-by: Andrew Jeffery Cc: stable Link: https://lore.kernel.org/r/20210520021334.497341-2-andrew@aj.id.au Signed-off-by: Greg Kroah-Hartman commit d72500f992849d31ebae8f821a023660ddd0dcc2 Author: Nicholas Piggin Date: Thu May 20 21:19:31 2021 +1000 powerpc/64s/syscall: Fix ptrace syscall info with scv syscalls The scv implementation missed updating syscall return value and error value get/set functions to deal with the changed register ABI. This broke ptrace PTRACE_GET_SYSCALL_INFO as well as some kernel auditing and tracing functions. Fix. tools/testing/selftests/ptrace/get_syscall_info now passes when scv is used. Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions") Cc: stable@vger.kernel.org # v5.9+ Reported-by: "Dmitry V. Levin" Signed-off-by: Nicholas Piggin Reviewed-by: Dmitry V. Levin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210520111931.2597127-2-npiggin@gmail.com commit 5665bc35c1ed917ac8fd06cb651317bb47a65b10 Author: Nicholas Piggin Date: Thu May 20 21:19:30 2021 +1000 powerpc/64s/syscall: Use pt_regs.trap to distinguish syscall ABI difference between sc and scv syscalls The sc and scv 0 system calls have different ABI conventions, and ptracers need to know which system call type is being used if they want to look at the syscall registers. Document that pt_regs.trap can be used for this, and fix one in-tree user to work with scv 0 syscalls. Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions") Cc: stable@vger.kernel.org # v5.9+ Reported-by: "Dmitry V. Levin" Suggested-by: "Dmitry V. Levin" Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210520111931.2597127-1-npiggin@gmail.com commit bc6a385132601c29a6da1dbf8148c0d3c9ad36dc Author: Gulam Mohamed Date: Fri May 14 15:18:42 2021 +0200 block: fix a race between del_gendisk and BLKRRPART When BLKRRPART is called concurrently with del_gendisk, the partitions rescan can create a stale partition that will never be be cleaned up. Fix this by checking the the disk is up before rescanning partitions while under bd_mutex. Signed-off-by: Gulam Mohamed [hch: split from a larger patch] Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210514131842.1600568-3-hch@lst.de Signed-off-by: Jens Axboe commit 6c60ff048ca1e0739f39aa25996543c6e662a46c Author: Christoph Hellwig Date: Fri May 14 15:18:41 2021 +0200 block: prevent block device lookups at the beginning of del_gendisk As an artifact of how gendisk lookup used to work in earlier kernels, GENHD_FL_UP is only cleared very late in del_gendisk, and a global lock is used to prevent opens from succeeding while del_gendisk is tearing down the gendisk. Switch to clearing the flag early and under bd_mutex so that callers can use bd_mutex to stabilize the flag, which removes the need for the global mutex. Signed-off-by: Christoph Hellwig Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210514131842.1600568-2-hch@lst.de Signed-off-by: Jens Axboe commit 9a66e6bd7e9ba51d83854aaf7670014e9538e462 Merge: 4bc2082311311 a7d139145a664 Author: Jens Axboe Date: Thu May 20 07:54:49 2021 -0600 Merge tag 'nvme-5.13-2021-05-20' of git://git.infradead.org/nvme into block-5.13 Pull NVMe fixes from Christoph: "nvme fixes for Linux 5.13: - nvme-tcp corruption and timeout fixes (Sagi Grimberg, Keith Busch) - nvme-fc teardown fix (James Smart) - nvmet/nvme-loop memory leak fixes (Wu Bo)" * tag 'nvme-5.13-2021-05-20' of git://git.infradead.org/nvme: nvme-fc: clear q_live at beginning of association teardown nvme-tcp: rerun io_work if req_list is not empty nvme-tcp: fix possible use-after-completion nvme-loop: fix memory leak in nvme_loop_create_ctrl() nvmet: fix memory leak in nvmet_alloc_ctrl() commit 764c7c9a464b68f7c6a5a9ec0b923176a05e8e8f Author: Johannes Thumshirn Date: Wed May 19 00:40:28 2021 +0900 btrfs: zoned: fix parallel compressed writes When multiple processes write data to the same block group on a compressed zoned filesystem, the underlying device could report I/O errors and data corruption is possible. This happens because on a zoned file system, compressed data writes where sent to the device via a REQ_OP_WRITE instead of a REQ_OP_ZONE_APPEND operation. But with REQ_OP_WRITE and parallel submission it cannot be guaranteed that the data is always submitted aligned to the underlying zone's write pointer. The change to using REQ_OP_ZONE_APPEND instead of REQ_OP_WRITE on a zoned filesystem is non intrusive on a regular file system or when submitting to a conventional zone on a zoned filesystem, as it is guarded by btrfs_use_zone_append. Reported-by: David Sterba Fixes: 9d294a685fbc ("btrfs: zoned: enable to mount ZONED incompat flag") CC: stable@vger.kernel.org # 5.12.x: e380adfc213a13: btrfs: zoned: pass start block to btrfs_use_zone_append CC: stable@vger.kernel.org # 5.12.x Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit e380adfc213a13677993c0e35cb48f5a8e61ebb0 Author: Johannes Thumshirn Date: Wed May 19 00:40:27 2021 +0900 btrfs: zoned: pass start block to btrfs_use_zone_append btrfs_use_zone_append only needs the passed in extent_map's block_start member, so there's no need to pass in the full extent map. This also enables the use of btrfs_use_zone_append in places where we only have a start byte but no extent_map. Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit ba5ef6dc8a827a904794210a227cdb94828e8ae7 Author: Pavel Begunkov Date: Thu May 20 13:21:20 2021 +0100 io_uring: fortify tctx/io_wq cleanup We don't want anyone poking into tctx->io_wq awhile it's being destroyed by io_wq_put_and_exit(), and even though it shouldn't even happen, if buggy would be preferable to get a NULL-deref instead of subtle delayed failure or UAF. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/827b021de17926fd807610b3e53a5a5fa8530856.1621513214.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e68671e9e1275dfdda333c3e83b6d28963af16b6 Author: Hans de Goede Date: Thu May 20 11:32:28 2021 +0200 platform/x86: touchscreen_dmi: Add info for the Chuwi Hi10 Pro (CWI529) tablet Add touchscreen info for the Chuwi Hi10 Pro (CWI529) tablet. This includes info for getting the firmware directly from the UEFI, so that the user does not need to manually install the firmware in /lib/firmware/silead. This change will make the touchscreen on these devices work OOTB, without requiring any manual setup. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210520093228.7439-1-hdegoede@redhat.com commit 7e008b02557ccece4d2c31fb0eaf6243cbc87121 Author: Christian König Date: Mon May 17 13:20:17 2021 +0200 dma-buf: fix unintended pin/unpin warnings DMA-buf internal users call the pin/unpin functions without having a dynamic attachment. Avoid the warning and backtrace in the logs. Signed-off-by: Christian König Bugs: https://gitlab.freedesktop.org/drm/intel/-/issues/3481 Fixes: c545781e1c55 ("dma-buf: doc polish for pin/unpin") Reviewed-by: Alex Deucher Reviewed-by: Daniel Vetter CC: stable@kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210517115705.2141-1-christian.koenig@amd.com commit f5456b5d67cf812fd31fe3e130ca216b2e0908e5 Author: Bob Peterson Date: Wed May 19 14:54:02 2021 -0400 gfs2: Clean up revokes on normal withdraws Before this patch, the system ail lists were cleaned up if the logd process withdrew, but on other withdraws, they were not cleaned up. This included the cleaning up of the revokes as well. This patch reorganizes things a bit so that all withdraws (not just logd) clean up the ail lists, including any pending revokes. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 865cc3e9cc0b1d4b81c10d53174bced76decf888 Author: Bob Peterson Date: Tue May 18 09:14:31 2021 -0400 gfs2: fix a deadlock on withdraw-during-mount Before this patch, gfs2 would deadlock because of the following sequence during mount: mount gfs2_fill_super gfs2_make_fs_rw <--- Detects IO error with glock kthread_stop(sdp->sd_quotad_process); <--- Blocked waiting for quotad to finish logd Detects IO error and the need to withdraw calls gfs2_withdraw gfs2_make_fs_ro kthread_stop(sdp->sd_quotad_process); <--- Blocked waiting for quotad to finish gfs2_quotad gfs2_statfs_sync gfs2_glock_wait <---- Blocked waiting for statfs glock to be granted glock_work_func do_xmote <---Detects IO error, can't release glock: blocked on withdraw glops->go_inval glock_blocked_by_withdraw requeue glock work & exit <--- work requeued, blocked by withdraw This patch makes a special exception for the statfs system inode glock, which allows the statfs glock UNLOCK to proceed normally. That allows the quotad daemon to exit during the withdraw, which allows the logd daemon to exit during the withdraw, which allows the mount to exit. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 20265d9a67e40eafd39a8884658ca2e36f05985d Author: Bob Peterson Date: Tue May 18 09:12:10 2021 -0400 gfs2: fix scheduling while atomic bug in glocks Before this patch, in the unlikely event that gfs2_glock_dq encountered a withdraw, it would do a wait_on_bit to wait for its journal to be recovered, but it never released the glock's spin_lock, which caused a scheduling-while-atomic error. This patch unlocks the lockref spin_lock before waiting for recovery. Fixes: 601ef0d52e96 ("gfs2: Force withdraw to replay journals and wait for it to finish") Cc: stable@vger.kernel.org # v5.7+ Reported-by: Alexander Aring Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 4194dec4b4169e5a9a5171db60c2ec00c4d8cf16 Author: Bob Peterson Date: Wed May 19 14:45:56 2021 -0400 gfs2: Fix I_NEW check in gfs2_dinode_in Patch 4a378d8a0d96 added a new check for I_NEW inodes, but unfortunately it used the wrong variable, i_flags. This caused GFS2 to withdraw when gfs2_lookup_by_inum needed to refresh an I_NEW inode. This patch switches to use the correct variable, i_state. Fixes: 4a378d8a0d96 ("gfs2: be careful with inode refresh") Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 43a511c44e58e357a687d61a20cf5ef1dc9e5a7c Author: Andreas Gruenbacher Date: Mon May 10 12:25:59 2021 +0200 gfs2: Prevent direct-I/O write fallback errors from getting lost When a direct I/O write falls entirely and falls back to buffered I/O and the buffered I/O fails, the write failed with return value 0 instead of the error number reported by the buffered I/O. Fix that. Signed-off-by: Andreas Gruenbacher commit 22c7a18ed5f007faccb7527bc890463763214081 Author: Mathias Nyman Date: Thu Mar 25 10:32:50 2021 +0200 thunderbolt: usb4: Fix NVM read buffer bounds and offset issue Up to 64 bytes of data can be read from NVM in one go. Read address must be dword aligned. Data is read into a local buffer. If caller asks to read data starting at an unaligned address then full dword is anyway read from NVM into a local buffer. Data is then copied from the local buffer starting at the unaligned offset to the caller buffer. In cases where asked data length + unaligned offset is over 64 bytes we need to make sure we don't read past the 64 bytes in the local buffer when copying to caller buffer, and make sure that we don't skip copying unaligned offset bytes from local buffer anymore after the first round of 64 byte NVM data read. Fixes: b04079837b20 ("thunderbolt: Add initial support for USB4") Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Signed-off-by: Mika Westerberg commit b106776080a1cf953a1b2fd50cb2a995db4732be Author: Mathias Nyman Date: Tue Apr 27 15:48:29 2021 +0300 thunderbolt: dma_port: Fix NVM read buffer bounds and offset issue Up to 64 bytes of data can be read from NVM in one go. Read address must be dword aligned. Data is read into a local buffer. If caller asks to read data starting at an unaligned address then full dword is anyway read from NVM into a local buffer. Data is then copied from the local buffer starting at the unaligned offset to the caller buffer. In cases where asked data length + unaligned offset is over 64 bytes we need to make sure we don't read past the 64 bytes in the local buffer when copying to caller buffer, and make sure that we don't skip copying unaligned offset bytes from local buffer anymore after the first round of 64 byte NVM data read. Fixes: 3e13676862f9 ("thunderbolt: Add support for DMA configuration based mailbox") Cc: stable@vger.kernel.org Signed-off-by: Mathias Nyman Signed-off-by: Mika Westerberg commit e2f5efd0f0e229bd110eab513e7c0331d61a4649 Author: Alexey Kardashevskiy Date: Thu May 20 13:29:19 2021 +1000 powerpc: Fix early setup to make early_ioremap() work The immediate problem is that after commit 0bd3f9e953bd ("powerpc/legacy_serial: Use early_ioremap()") the kernel silently reboots on some systems. The reason is that early_ioremap() returns broken addresses as it uses slot_virt[] array which initialized with offsets from FIXADDR_TOP == IOREMAP_END+FIXADDR_SIZE == KERN_IO_END - FIXADDR_SIZ + FIXADDR_SIZE == __kernel_io_end which is 0 when early_ioremap_setup() is called. __kernel_io_end is initialized little bit later in early_init_mmu(). This fixes the initialization by swapping early_ioremap_setup() and early_init_mmu(). Fixes: 265c3491c4bc ("powerpc: Add support for GENERIC_EARLY_IOREMAP") Signed-off-by: Alexey Kardashevskiy Reviewed-by: Christophe Leroy [mpe: Drop unrelated cleanup & cleanup change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210520032919.358935-1-aik@ozlabs.ru commit 0ab95c2510b641fb860a773b3d242ef9768a8f66 Author: Rohith Surabattula Date: Mon May 17 11:28:34 2021 +0000 Defer close only when lease is enabled. When smb2 lease parameter is disabled on server. Server grants batch oplock instead of RHW lease by default on open, inode page cache needs to be zapped immediatley upon close as cache is not valid. Signed-off-by: Rohith Surabattula Signed-off-by: Steve French commit 860b69a9d77160d21ca00357fd6c5217f9d41fb1 Author: Rohith Surabattula Date: Wed May 5 10:56:47 2021 +0000 Fix kernel oops when CONFIG_DEBUG_ATOMIC_SLEEP is enabled. Removed oplock_break_received flag which was added to achieve synchronization between oplock handler and open handler by earlier commit. It is not needed because there is an existing lock open_file_lock to achieve the same. find_readable_file takes open_file_lock and then traverses the openFileList. Similarly, cifs_oplock_break while closing the deferred handle (i.e cifsFileInfo_put) takes open_file_lock and then sends close to the server. Added comments for better readability. Signed-off-by: Rohith Surabattula Signed-off-by: Steve French commit e83aa3528a38bddae182a35d0efb5a6c35143c1c Author: Jiapeng Chong Date: Wed May 19 18:47:07 2021 +0800 cifs: Fix inconsistent indenting Eliminate the follow smatch warning: fs/cifs/fs_context.c:1148 smb3_fs_context_parse_param() warn: inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Steve French commit d201d7631ca170b038e7f8921120d05eec70d7c5 Author: Ronnie Sahlberg Date: Wed May 19 08:40:11 2021 +1000 cifs: fix memory leak in smb2_copychunk_range When using smb2_copychunk_range() for large ranges we will run through several iterations of a loop calling SMB2_ioctl() but never actually free the returned buffer except for the final iteration. This leads to memory leaks everytime a large copychunk is requested. Fixes: 9bf0c9cd4314 ("CIFS: Fix SMB2/SMB3 Copy offload support (refcopy) for large files") Cc: Reviewed-by: Aurelien Aptel Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit a2b4785f01280a4291edb9fda69032fc2e4bfd3f Author: Christian König Date: Tue May 18 17:48:02 2021 +0200 drm/amdgpu: stop touching sched.ready in the backend This unfortunately comes up in regular intervals and breaks GPU reset for the engine in question. The sched.ready flag controls if an engine can't get working during hw_init, but should never be set to false during hw_fini. v2: squash in unused variable fix (Alex) Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9c2876d56f1ce9b6b2072f1446fb1e8d1532cb3d Author: Lang Yu Date: Mon May 17 12:47:20 2021 +0800 drm/amd/amdgpu: fix a potential deadlock in gpu reset When amdgpu_ib_ring_tests failed, the reset logic called amdgpu_device_ip_suspend twice, then deadlock occurred. Deadlock log: [ 805.655192] amdgpu 0000:04:00.0: amdgpu: ib ring test failed (-110). [ 806.290952] [drm] free PSP TMR buffer [ 806.319406] ============================================ [ 806.320315] WARNING: possible recursive locking detected [ 806.321225] 5.11.0-custom #1 Tainted: G W OEL [ 806.322135] -------------------------------------------- [ 806.323043] cat/2593 is trying to acquire lock: [ 806.323825] ffff888136b1cdc8 (&adev->dm.dc_lock){+.+.}-{3:3}, at: dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.325668] but task is already holding lock: [ 806.326664] ffff888136b1cdc8 (&adev->dm.dc_lock){+.+.}-{3:3}, at: dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.328430] other info that might help us debug this: [ 806.329539] Possible unsafe locking scenario: [ 806.330549] CPU0 [ 806.330983] ---- [ 806.331416] lock(&adev->dm.dc_lock); [ 806.332086] lock(&adev->dm.dc_lock); [ 806.332738] *** DEADLOCK *** [ 806.333747] May be due to missing lock nesting notation [ 806.334899] 3 locks held by cat/2593: [ 806.335537] #0: ffff888100d3f1b8 (&attr->mutex){+.+.}-{3:3}, at: simple_attr_read+0x4e/0x110 [ 806.337009] #1: ffff888136b1fd78 (&adev->reset_sem){++++}-{3:3}, at: amdgpu_device_lock_adev+0x42/0x94 [amdgpu] [ 806.339018] #2: ffff888136b1cdc8 (&adev->dm.dc_lock){+.+.}-{3:3}, at: dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.340869] stack backtrace: [ 806.341621] CPU: 6 PID: 2593 Comm: cat Tainted: G W OEL 5.11.0-custom #1 [ 806.342921] Hardware name: AMD Celadon-CZN/Celadon-CZN, BIOS WLD0C23N_Weekly_20_12_2 12/23/2020 [ 806.344413] Call Trace: [ 806.344849] dump_stack+0x93/0xbd [ 806.345435] __lock_acquire.cold+0x18a/0x2cf [ 806.346179] lock_acquire+0xca/0x390 [ 806.346807] ? dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.347813] __mutex_lock+0x9b/0x930 [ 806.348454] ? dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.349434] ? amdgpu_device_indirect_rreg+0x58/0x70 [amdgpu] [ 806.350581] ? _raw_spin_unlock_irqrestore+0x47/0x50 [ 806.351437] ? dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.352437] ? rcu_read_lock_sched_held+0x4f/0x80 [ 806.353252] ? rcu_read_lock_sched_held+0x4f/0x80 [ 806.354064] mutex_lock_nested+0x1b/0x20 [ 806.354747] ? mutex_lock_nested+0x1b/0x20 [ 806.355457] dm_suspend+0xb8/0x1d0 [amdgpu] [ 806.356427] ? soc15_common_set_clockgating_state+0x17d/0x19 [amdgpu] [ 806.357736] amdgpu_device_ip_suspend_phase1+0x78/0xd0 [amdgpu] [ 806.360394] amdgpu_device_ip_suspend+0x21/0x70 [amdgpu] [ 806.362926] amdgpu_device_pre_asic_reset+0xb3/0x270 [amdgpu] [ 806.365560] amdgpu_device_gpu_recover.cold+0x679/0x8eb [amdgpu] Signed-off-by: Lang Yu Acked-by: Christian KÃnig Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 77194d8642dd4cb7ea8ced77bfaea55610574c38 Author: Guchun Chen Date: Mon May 17 16:38:00 2021 +0800 drm/amdgpu: update sdma golden setting for Navi12 Current golden setting is out of date. Signed-off-by: Guchun Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 99c45ba5799d6b938bd9bd20edfeb6f3e3e039b9 Author: Guchun Chen Date: Mon May 17 16:35:40 2021 +0800 drm/amdgpu: update gc golden setting for Navi12 Current golden setting is out of date. Signed-off-by: Guchun Chen Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 1e5c37385097c35911b0f8a0c67ffd10ee1af9a2 Author: xinhui pan Date: Tue May 18 10:56:07 2021 +0800 drm/amdgpu: Fix a use-after-free looks like we forget to set ttm->sg to NULL. Hit panic below [ 1235.844104] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b7b4b: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI [ 1235.989074] Call Trace: [ 1235.991751] sg_free_table+0x17/0x20 [ 1235.995667] amdgpu_ttm_backend_unbind.cold+0x4d/0xf7 [amdgpu] [ 1236.002288] amdgpu_ttm_backend_destroy+0x29/0x130 [amdgpu] [ 1236.008464] ttm_tt_destroy+0x1e/0x30 [ttm] [ 1236.013066] ttm_bo_cleanup_memtype_use+0x51/0xa0 [ttm] [ 1236.018783] ttm_bo_release+0x262/0xa50 [ttm] [ 1236.023547] ttm_bo_put+0x82/0xd0 [ttm] [ 1236.027766] amdgpu_bo_unref+0x26/0x50 [amdgpu] [ 1236.032809] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x7aa/0xd90 [amdgpu] [ 1236.040400] kfd_ioctl_alloc_memory_of_gpu+0xe2/0x330 [amdgpu] [ 1236.046912] kfd_ioctl+0x463/0x690 [amdgpu] Signed-off-by: xinhui pan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ab95cb3e1bc44d4376bd8d331b1cff82b99020e3 Author: James Zhu Date: Tue May 18 08:44:23 2021 -0400 drm/amdgpu: add video_codecs query support for aldebaran Add video_codecs query support for aldebaran. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit fa7e6abc75f3d491bc561734312d065dc9dc2a77 Author: Jingwen Chen Date: Mon May 17 16:16:10 2021 +0800 drm/amd/amdgpu: fix refcount leak [Why] the gem object rfb->base.obj[0] is get according to num_planes in amdgpufb_create, but is not put according to num_planes [How] put rfb->base.obj[0] in amdgpu_fbdev_destroy according to num_planes Signed-off-by: Jingwen Chen Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 080039273b126eeb0185a61c045893a25dbc046e Author: Chris Park Date: Tue May 4 16:20:55 2021 -0400 drm/amd/display: Disconnect non-DP with no EDID [Why] Active DP dongles return no EDID when dongle is connected, but VGA display is taken out. Current driver behavior does not remove the active display when this happens, and this is a gap between dongle DTP and dongle behavior. [How] For active DP dongles and non-DP scenario, disconnect sink on detection when no EDID is read due to timeout. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dbd1003d1252db5973dddf20b24bb0106ac52aa2 Author: Changfeng Date: Fri May 14 15:28:25 2021 +0800 drm/amdgpu: disable 3DCGCG on picasso/raven1 to avoid compute hang There is problem with 3DCGCG firmware and it will cause compute test hang on picasso/raven1. It needs to disable 3DCGCG in driver to avoid compute hang. Signed-off-by: Changfeng Reviewed-by: Alex Deucher Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit d53751568359e5b3ffb859b13cbd79dc77a571f1 Author: Yi Li Date: Fri May 14 14:40:39 2021 +0800 drm/amdgpu: Fix GPU TLB update error when PAGE_SIZE > AMDGPU_PAGE_SIZE When PAGE_SIZE is larger than AMDGPU_PAGE_SIZE, the number of GPU TLB entries which need to update in amdgpu_map_buffer() should be multiplied by AMDGPU_GPU_PAGES_IN_CPU_PAGE (PAGE_SIZE / AMDGPU_PAGE_SIZE). Reviewed-by: Christian König Signed-off-by: Yi Li Signed-off-by: Huacai Chen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 22cbdbcfb61acc78d5fc21ebb13ccc0d7e29f793 Author: Florian Westphal Date: Tue May 4 16:40:00 2021 +0200 netfilter: conntrack: unregister ipv4 sockopts on error unwind When ipv6 sockopt register fails, the ipv4 one needs to be removed. Fixes: a0ae2562c6c ("netfilter: conntrack: remove l3proto abstraction") Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0c8df343c200529e6b9820bdfed01814140f75e4 Author: Christian König Date: Wed May 12 10:36:43 2021 +0200 drm/radeon: use the dummy page for GART if needed Imported BOs don't have a pagelist any more. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Fixes: 0575ff3d33cd ("drm/radeon: stop using pages with drm_prime_sg_to_page_addr_arrays v2") CC: stable@vger.kernel.org # 5.12 commit 84c63d040938f64a7dc195696301166e75231bf5 Author: Nikola Cornij Date: Thu May 6 22:46:52 2021 -0400 drm/amd/display: Use the correct max downscaling value for DCN3.x family [why] As per spec, DCN3.x can do 6:1 downscaling and DCN2.x can do 4:1. The max downscaling limit value for DCN2.x is 250, which means it's calculated as 1000 / 4 = 250. For DCN3.x this then gives 1000 / 6 = 167. [how] Set maximum downscaling limit to 167 for DCN3.x Signed-off-by: Nikola Cornij Reviewed-by: Charlene Liu Reviewed-by: Harry Wentland Acked-by: Stylon Wang Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4d52ebc7ace491d58f96d1f4a1cb9070c506b2e7 Author: Johan Hovold Date: Wed May 19 14:47:17 2021 +0200 net: hso: bail out on interrupt URB allocation failure Commit 31db0dbd7244 ("net: hso: check for allocation failure in hso_create_bulk_serial_device()") recently started returning an error when the driver fails to allocate resources for the interrupt endpoint and tiocmget functionality. For consistency let's bail out from probe also if the URB allocation fails. Signed-off-by: Johan Hovold Reviewed-by: Dan Carpenter Signed-off-by: David S. Miller commit d5b3bd6ab5418e34d85f64fba7c6ca02c3cbfb63 Author: Geert Uytterhoeven Date: Wed May 19 15:02:53 2021 +0200 dt-bindings: net: renesas,ether: Update Sergei's email address Update Sergei's email address, as per commit 534a8bf0ccdd7b3f ("MAINTAINERS: switch to my private email for Renesas Ethernet drivers"). Signed-off-by: Geert Uytterhoeven Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 88c380df84fbd03f9b137c2b9d0a44b9f2f553b0 Author: Raju Rangoju Date: Wed May 19 16:48:31 2021 +0530 cxgb4: avoid accessing registers when clearing filters Hardware register having the server TID base can contain invalid values when adapter is in bad state (for example, due to AER fatal error). Reading these invalid values in the register can lead to out-of-bound memory access. So, fix by using the saved server TID base when clearing filters. Fixes: b1a79360ee86 ("cxgb4: Delete all hash and TCAM filters before resource cleanup") Signed-off-by: Raju Rangoju Signed-off-by: David S. Miller commit be338bdafaeb9268b43de481580458c29171a672 Merge: c71b99640d2d3 e63052a5dd3ce Author: David S. Miller Date: Wed May 19 12:19:30 2021 -0700 Merge tag 'mlx5-fixes-2021-05-18' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5 fixes 2021-05-18 This series introduces some fixes to mlx5 driver. Please pull and let me know if there is any problem. ==================== Signed-off-by: David S. Miller commit c71b99640d2d350ee3146452c1057bd59cb2c5e0 Author: YueHaibing Date: Wed May 19 10:10:38 2021 +0800 ethtool: stats: Fix a copy-paste error data->ctrl_stats should be memset with correct size. Fixes: bfad2b979ddc ("ethtool: add interface to read standard MAC Ctrl stats") Signed-off-by: YueHaibing Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 463a3f66473b58d71428a1c3ce69ea52c05440e5 Author: Dan Carpenter Date: Fri May 14 17:18:10 2021 +0300 RDMA/uverbs: Fix a NULL vs IS_ERR() bug The uapi_get_object() function returns error pointers, it never returns NULL. Fixes: 149d3845f4a5 ("RDMA/uverbs: Add a method to introspect handles in a context") Link: https://lore.kernel.org/r/YJ6Got+U7lz+3n9a@mwanda Signed-off-by: Dan Carpenter Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fb6c79d7261afb7e942251254ea47951c2a9a706 Author: Namhyung Kim Date: Wed Feb 10 17:33:27 2021 +0900 perf tools: Add 'cgroup-switches' software event It counts how often cgroups are changed actually during the context switches. # perf stat -a -e context-switches,cgroup-switches -a sleep 1 Performance counter stats for 'system wide': 11,267 context-switches 10,950 cgroup-switches 1.015634369 seconds time elapsed Committer notes: The kernel patches landed in v5.13, but this entry wasn't filled in perf's parse-events tables, which was leading to a segfault when running 'perf list' on a kernel with that feature, as reported by Thomas Richter. Also removed the part touching tools/include/uapi/linux/perf_event.h as it was updated in the usual sync with the kernel UAPI headers, in a previous, already upstream, patch. Signed-off-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Heiko Carstens Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Richter Link: http://lore.kernel.org/lkml/20210210083327.22726-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 4954f5b8ef0baf70fe978d1a99a5f70e4dd5c877 Author: Joerg Roedel Date: Wed May 19 15:52:46 2021 +0200 x86/sev-es: Use __put_user()/__get_user() for data accesses The put_user() and get_user() functions do checks on the address which is passed to them. They check whether the address is actually a user-space address and whether its fine to access it. They also call might_fault() to indicate that they could fault and possibly sleep. All of these checks are neither wanted nor needed in the #VC exception handler, which can be invoked from almost any context and also for MMIO instructions from kernel space on kernel memory. All the #VC handler wants to know is whether a fault happened when the access was tried. This is provided by __put_user()/__get_user(), which just do the access no matter what. Also add comments explaining why __get_user() and __put_user() are the best choice here and why it is safe to use them in this context. Also explain why copy_to/from_user can't be used. In addition, also revert commit 7024f60d6552 ("x86/sev-es: Handle string port IO to kernel memory properly") because using __get_user()/__put_user() fixes the same problem while the above commit introduced several problems: 1) It uses access_ok() which is only allowed in task context. 2) It uses memcpy() which has no fault handling at all and is thus unsafe to use here. [ bp: Fix up commit ID of the reverted commit above. ] Fixes: f980f9c31a92 ("x86/sev-es: Compile early handler code into kernel image") Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org # v5.10+ Link: https://lkml.kernel.org/r/20210519135251.30093-4-joro@8bytes.org commit cfa3b797118eda7d68f9ede9b1a0279192aca653 Author: Maor Gottlieb Date: Wed May 19 11:41:32 2021 +0300 RDMA/mlx5: Fix query DCT via DEVX When executing DEVX command to query QP object, we need to take the QP type from the mlx5_ib_qp struct which hold the driver specific QP types as well, such as DC. Fixes: 34613eb1d2ad ("IB/mlx5: Enable modify and query verbs objects via DEVX") Link: https://lore.kernel.org/r/6eee15d63f09bb70787488e0cf96216e2957f5aa.1621413654.git.leonro@nvidia.com Reviewed-by: Yishai Hadas Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c3d0e3fd41b7f0f5d5d5b6022ab7e813f04ea727 Merge: 293837b9ac8d3 2ca4dcc4909d7 Author: Linus Torvalds Date: Wed May 19 06:12:31 2021 -1000 Merge tag 'fs.idmapped.mount_setattr.v5.13-rc3' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux Pull mount_setattr fix from Christian Brauner: "This makes an underlying idmapping assumption more explicit. We currently don't have any filesystems that support idmapped mounts which are mountable inside a user namespace, i.e. where s_user_ns != init_user_ns. That was a deliberate decision for now as userns root can just mount the filesystem themselves. Express this restriction explicitly and enforce it until there's a real use-case for this. This way we can notice it and will have a chance to adapt and audit our translation helpers and fstests appropriately if we need to support such filesystems" * tag 'fs.idmapped.mount_setattr.v5.13-rc3' of gitolite.kernel.org:pub/scm/linux/kernel/git/brauner/linux: fs/mount_setattr: tighten permission checks commit 293837b9ac8d3021657f44c9d7a14948ec01c5d0 Author: Linus Torvalds Date: Wed May 19 05:55:57 2021 -1000 Revert "i915: fix remap_io_sg to verify the pgprot" This reverts commit b12d691ea5e01db42ccf3b4207e57cb3ce7cfe91. It turns out this is not ready for primetime yet. The intentions are good, but using remap_pfn_range() requires that there is nothing already mapped in the area, and the i915 code seems to very much intentionally remap the same area multiple times. That will then just trigger the BUG_ON(!pte_none(*pte)); in mm/memory.c: remap_pte_range(). There are also reports of mapping type inconsistencies, resulting in warnings and in screen corruption. Link: https://lore.kernel.org/lkml/20210519024322.GA29704@xsang-OptiPlex-9020/ Link: https://lore.kernel.org/lkml/YKUjvoaKKggAmpIR@sf/ Link: https://lore.kernel.org/lkml/b6b61cf0-5874-f4c0-1fcc-4b3848451c31@redhat.com/ Reported-by: kernel test robot Reported-by: Kalle Valo Reported-by: Hans de Goede Reported-by: Sergei Trofimovich Acked-by: Christoph Hellwig Cc: Chris Wilson Cc: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Rodrigo Vivi Cc: Andrew Morton Signed-off-by: Linus Torvalds commit c25bbdb564060adaad5c3a8a10765c13487ba6a3 Author: Joerg Roedel Date: Wed May 19 15:52:45 2021 +0200 x86/sev-es: Forward page-faults which happen during emulation When emulating guest instructions for MMIO or IOIO accesses, the #VC handler might get a page-fault and will not be able to complete. Forward the page-fault in this case to the correct handler instead of killing the machine. Fixes: 0786138c78e7 ("x86/sev-es: Add a Runtime #VC Exception Handler") Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org # v5.10+ Link: https://lkml.kernel.org/r/20210519135251.30093-3-joro@8bytes.org commit c0d46717b95735b0eacfddbcca9df37a49de9c7a Author: Steve French Date: Sat May 15 09:52:22 2021 -0500 SMB3: incorrect file id in requests compounded with open See MS-SMB2 3.2.4.1.4, file ids in compounded requests should be set to 0xFFFFFFFFFFFFFFFF (we were treating it as u32 not u64 and setting it incorrectly). Signed-off-by: Steve French Reported-by: Stefan Metzmacher Reviewed-by: Shyam Prasad N commit b250f2f7792d15bcde98e0456781e2835556d5fa Author: Joerg Roedel Date: Wed May 19 15:52:44 2021 +0200 x86/sev-es: Don't return NULL from sev_es_get_ghcb() sev_es_get_ghcb() is called from several places but only one of them checks the return value. The reaction to returning NULL is always the same: calling panic() and kill the machine. Instead of adding checks to all call sites, move the panic() into the function itself so that it will no longer return NULL. Fixes: 0786138c78e7 ("x86/sev-es: Add a Runtime #VC Exception Handler") Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org # v5.10+ Link: https://lkml.kernel.org/r/20210519135251.30093-2-joro@8bytes.org commit 05ca447630334c323c9e2b788b61133ab75d60d3 Author: Takashi Iwai Date: Tue May 18 10:39:39 2021 +0200 ALSA: line6: Fix racy initialization of LINE6 MIDI The initialization of MIDI devices that are found on some LINE6 drivers are currently done in a racy way; namely, the MIDI buffer instance is allocated and initialized in each private_init callback while the communication with the interface is already started via line6_init_cap_control() call before that point. This may lead to Oops in line6_data_received() when a spurious event is received, as reported by syzkaller. This patch moves the MIDI initialization to line6_init_cap_control() as well instead of the too-lately-called private_init for avoiding the race. Also this reduces slightly more lines, so it's a win-win change. Reported-by: syzbot+0d2b3feb0a2887862e06@syzkallerlkml..appspotmail.com Link: https://lore.kernel.org/r/000000000000a4be9405c28520de@google.com Link: https://lore.kernel.org/r/20210517132725.GA50495@hyeyoo Cc: Hyeonggon Yoo <42.hyeyoo@gmail.com> Cc: Link: https://lore.kernel.org/r/20210518083939.1927-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 39a6172ea88b3117353ae16cbb0a53cd80a9340a Author: Teava Radu Date: Tue May 4 20:57:46 2021 +0200 platform/x86: touchscreen_dmi: Add info for the Mediacom Winpad 7.0 W700 tablet Add touchscreen info for the Mediacom Winpad 7.0 W700 tablet. Tested on 5.11 hirsute. Note: it's hw clone to Wintron surftab 7. Signed-off-by: Teava Radu Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210504185746.175461-6-hdegoede@redhat.com commit bc1eca606d8084465e6f89fd646cc71defbad490 Author: Andy Shevchenko Date: Wed May 19 13:15:21 2021 +0300 platform/x86: intel_punit_ipc: Append MODULE_DEVICE_TABLE for ACPI The intel_punit_ipc driver might be compiled as a module. When udev handles the event of the devices appearing the intel_punit_ipc module is missing. Append MODULE_DEVICE_TABLE for ACPI case to fix the loading issue. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210519101521.79338-1-andriy.shevchenko@linux.intel.com Signed-off-by: Hans de Goede commit 3a53587423d25c87af4b4126a806a0575104b45e Author: Hans de Goede Date: Tue May 18 14:50:27 2021 +0200 platform/x86: dell-smbios-wmi: Fix oops on rmmod dell_smbios init_dell_smbios_wmi() only registers the dell_smbios_wmi_driver on systems where the Dell WMI interface is supported. While exit_dell_smbios_wmi() unregisters it unconditionally, this leads to the following oops: [ 175.722921] ------------[ cut here ]------------ [ 175.722925] Unexpected driver unregister! [ 175.722939] WARNING: CPU: 1 PID: 3630 at drivers/base/driver.c:194 driver_unregister+0x38/0x40 ... [ 175.723089] Call Trace: [ 175.723094] cleanup_module+0x5/0xedd [dell_smbios] ... [ 175.723148] ---[ end trace 064c34e1ad49509d ]--- Make the unregister happen on the same condition the register happens to fix this. Cc: Mario Limonciello Fixes: 1a258e670434 ("platform/x86: dell-smbios-wmi: Add new WMI dispatcher driver") Signed-off-by: Hans de Goede Reviewed-by: Mario Limonciello Reviewed-by: Mark Gross Link: https://lore.kernel.org/r/20210518125027.21824-1-hdegoede@redhat.com commit f048630bdd55eb5379ef35f971639fe52fabe499 Author: Shyam Sundar S K Date: Fri May 14 23:30:47 2021 +0530 platform/x86: hp-wireless: add AMD's hardware id to the supported list Newer AMD based laptops uses AMDI0051 as the hardware id to support the airplane mode button. Adding this to the supported list. Signed-off-by: Shyam Sundar S K Link: https://lore.kernel.org/r/20210514180047.1697543-1-Shyam-sundar.S-k@amd.com Signed-off-by: Hans de Goede commit b68e182a3062e326b891f47152a3a1b84abccf0f Author: Hans de Goede Date: Wed May 12 14:55:23 2021 +0200 platform/x86: intel_int0002_vgpio: Only call enable_irq_wake() when using s2idle Commit 871f1f2bcb01 ("platform/x86: intel_int0002_vgpio: Only implement irq_set_wake on Bay Trail") stopped passing irq_set_wake requests on to the parents IRQ because this was breaking suspend (causing immediate wakeups) on an Asus E202SA. This workaround for the Asus E202SA is causing wakeup by USB keyboard to not work on other devices with Airmont CPU cores such as the Medion Akoya E1239T. In hindsight the problem with the Asus E202SA has nothing to do with Silvermont vs Airmont CPU cores, so the differentiation between the 2 types of CPU cores introduced by the previous fix is wrong. The real issue at hand is s2idle vs S3 suspend where the suspend is mostly handled by firmware. The parent IRQ for the INT0002 device is shared with the ACPI SCI and the real problem is that the INT0002 code should not be messing with the wakeup settings of that IRQ when suspend/resume is being handled by the firmware. Note that on systems which support both s2idle and S3 suspend, which suspend method to use can be changed at runtime. This patch fixes both the Asus E202SA spurious wakeups issue as well as the wakeup by USB keyboard not working on the Medion Akoya E1239T issue. These are both fixed by replacing the old workaround with delaying the enable_irq_wake(parent_irq) call till system-suspend time and protecting it with a !pm_suspend_via_firmware() check so that we still do not call it on devices using firmware-based (S3) suspend such as the Asus E202SA. Note rather then adding #ifdef CONFIG_PM_SLEEP, this commit simply adds a "depends on PM_SLEEP" to the Kconfig since this drivers whole purpose is to deal with wakeup events, so using it without CONFIG_PM_SLEEP makes no sense. Cc: Maxim Mikityanskiy Fixes: 871f1f2bcb01 ("platform/x86: intel_int0002_vgpio: Only implement irq_set_wake on Bay Trail") Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20210512125523.55215-2-hdegoede@redhat.com commit dac282def6f57d251234e7bbb87d21d7a57b26fe Author: Thomas Weißschuh Date: Tue May 11 00:15:45 2021 +0200 platform/x86: gigabyte-wmi: add support for B550 Aorus Elite Reported as working here: https://github.com/t-8ch/linux-gigabyte-wmi-driver/issues/1#issuecomment-837210304 Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20210510221545.412522-3-linux@weissschuh.net Signed-off-by: Hans de Goede commit 8605d64f485fbdb71cb4d55a53085feb000e426e Author: Thomas Weißschuh Date: Tue May 11 00:15:44 2021 +0200 platform/x86: gigabyte-wmi: add support for X570 UD Reported as working here: https://github.com/t-8ch/linux-gigabyte-wmi-driver/issues/4 Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20210510221545.412522-2-linux@weissschuh.net Signed-off-by: Hans de Goede commit 86bf2b8ffec40eb4c278ce393e2b0bf48d335e59 Author: Thomas Weißschuh Date: Tue May 11 00:15:43 2021 +0200 platform/x86: gigabyte-wmi: streamline dmi matching Streamline dmi matching. Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20210510221545.412522-1-linux@weissschuh.net Signed-off-by: Hans de Goede commit 0a0c59724516fabf9705c0d9927fa12319908852 Author: Adrian Hunter Date: Wed May 19 10:45:15 2021 +0300 perf intel-pt: Remove redundant setting of ptq->insn_len Remove redundant "ptq->insn_len = 0" statement. Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/20210519074515.9262-4-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c954eb72b31a9dc56c99b450253ec5b121add320 Author: Adrian Hunter Date: Wed May 19 10:45:14 2021 +0300 perf intel-pt: Fix sample instruction bytes The decoder reports the current instruction if it was decoded. In some cases the current instruction is not decoded, in which case the instruction bytes length must be set to zero. Ensure that is always done. Note perf script can anyway get the instruction bytes for any samples where they are not present. Also note, that there is a redundant "ptq->insn_len = 0" statement which is not removed until a subsequent patch in order to make this patch apply cleanly to stable branches. Example: A machne that supports TSX is required. It will have flag "rtm". Kernel parameter tsx=on may be required. # for w in `cat /proc/cpuinfo | grep -m1 flags `;do echo $w | grep rtm ; done rtm Test program: #include #include int main() { int x = 0; if (_xbegin() == _XBEGIN_STARTED) { x = 1; _xabort(1); } else { printf("x = %d\n", x); } return 0; } Compile with -mrtm i.e. gcc -Wall -Wextra -mrtm xabort.c -o xabort Record: perf record -e intel_pt/cyc/u --filter 'filter main @ ./xabort' ./xabort Before: # perf script --itrace=xe -F+flags,+insn,-period --xed --ns xabort 1478 [007] 92161.431348581: transactions: x 400b81 main+0x14 (/root/xabort) mov $0xffffffff, %eax xabort 1478 [007] 92161.431348624: transactions: tx abrt 400b93 main+0x26 (/root/xabort) mov $0xffffffff, %eax After: # perf script --itrace=xe -F+flags,+insn,-period --xed --ns xabort 1478 [007] 92161.431348581: transactions: x 400b81 main+0x14 (/root/xabort) xbegin 0x6 xabort 1478 [007] 92161.431348624: transactions: tx abrt 400b93 main+0x26 (/root/xabort) xabort $0x1 Fixes: faaa87680b25d ("perf intel-pt/bts: Report instruction bytes and length in sample") Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20210519074515.9262-3-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 687c9e3b1a81d43b233482f781bd4e20561bc390 Author: Axel Lin Date: Wed May 19 21:22:55 2021 +0800 regulator: Check ramp_delay_table for regulator_set_ramp_delay_regmap Return -EINVAL if ramp_delay_table is NULL. Also add WARN_ON since the driver code needs fix if this happened. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210519132255.1683863-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit cb7987837c31b217b28089bbc78922d5c9187869 Author: Adrian Hunter Date: Wed May 19 10:45:13 2021 +0300 perf intel-pt: Fix transaction abort handling When adding support for power events, some handling of FUP packets was unified. That resulted in breaking reporting of TSX aborts, by not considering the associated TIP packet. Fix that. Example: A machine that supports TSX is required. It will have flag "rtm". Kernel parameter tsx=on may be required. # for w in `cat /proc/cpuinfo | grep -m1 flags `;do echo $w | grep rtm ; done rtm Test program: #include #include int main() { int x = 0; if (_xbegin() == _XBEGIN_STARTED) { x = 1; _xabort(1); } else { printf("x = %d\n", x); } return 0; } Compile with -mrtm i.e. gcc -Wall -Wextra -mrtm xabort.c -o xabort Record: perf record -e intel_pt/cyc/u --filter 'filter main @ ./xabort' ./xabort Before: # perf script --itrace=be -F+flags,+addr,-period,-event --ns xabort 1478 [007] 92161.431348552: tr strt 0 [unknown] ([unknown]) => 400b6d main+0x0 (/root/xabort) xabort 1478 [007] 92161.431348624: jmp 400b96 main+0x29 (/root/xabort) => 400bae main+0x41 (/root/xabort) xabort 1478 [007] 92161.431348624: return 400bb4 main+0x47 (/root/xabort) => 400b87 main+0x1a (/root/xabort) xabort 1478 [007] 92161.431348637: jcc 400b8a main+0x1d (/root/xabort) => 400b98 main+0x2b (/root/xabort) xabort 1478 [007] 92161.431348644: tr end call 400ba9 main+0x3c (/root/xabort) => 40f690 printf+0x0 (/root/xabort) xabort 1478 [007] 92161.431360859: tr strt 0 [unknown] ([unknown]) => 400bae main+0x41 (/root/xabort) xabort 1478 [007] 92161.431360882: tr end return 400bb4 main+0x47 (/root/xabort) => 401139 __libc_start_main+0x309 (/root/xabort) After: # perf script --itrace=be -F+flags,+addr,-period,-event --ns xabort 1478 [007] 92161.431348552: tr strt 0 [unknown] ([unknown]) => 400b6d main+0x0 (/root/xabort) xabort 1478 [007] 92161.431348624: tx abrt 400b93 main+0x26 (/root/xabort) => 400b87 main+0x1a (/root/xabort) xabort 1478 [007] 92161.431348637: jcc 400b8a main+0x1d (/root/xabort) => 400b98 main+0x2b (/root/xabort) xabort 1478 [007] 92161.431348644: tr end call 400ba9 main+0x3c (/root/xabort) => 40f690 printf+0x0 (/root/xabort) xabort 1478 [007] 92161.431360859: tr strt 0 [unknown] ([unknown]) => 400bae main+0x41 (/root/xabort) xabort 1478 [007] 92161.431360882: tr end return 400bb4 main+0x47 (/root/xabort) => 401139 __libc_start_main+0x309 (/root/xabort) Fixes: a472e65fc490a ("perf intel-pt: Add decoder support for ptwrite and power event packets") Signed-off-by: Adrian Hunter Cc: Andi Kleen Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lore.kernel.org/lkml/20210519074515.9262-2-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 316a76a58c3f30735e5e416a6dc304d6bb86312d Author: Thomas Richter Date: Mon May 17 16:09:31 2021 +0200 perf test: Fix libpfm4 support (63) test error for nested event groups Compiling perf with make LIBPFM4=1 includes libpfm support and enables test case 63 'Test libpfm4 support'. This test reports an error on all platforms for subtest 63.2 'test groups of --pfm-events'. The reported error message is 'nested event groups not supported' # ./perf test -F 63 63: Test libpfm4 support : 63.1: test of individual --pfm-events : Error: failed to parse event stereolab : event not found Error: failed to parse event stereolab,instructions : event not found Error: failed to parse event instructions,stereolab : event not found Ok 63.2: test groups of --pfm-events : Error: nested event groups not supported <------ Error message here Error: failed to parse event {stereolab} : event not found Error: failed to parse event {instructions,cycles},{instructions,stereolab} :\ event not found Ok # This patch addresses the error message 'nested event groups not supported'. The root cause is function parse_libpfm_events_option() which parses the event string '{},{instructions}' and can not handle a leading empty group notation '{},...'. The code detects the first (empty) group indicator '{' but does not terminate group processing on the following group closing character '}'. So when the second group indicator '{' is detected, the code assumes a nested group and returns an error. With the error message fixed, also change the expected event number to one for the test case to succeed. While at it also fix a memory leak. In good case the function does not free the duplicated string given as first parameter. Output after: # ./perf test -F 63 63: Test libpfm4 support : 63.1: test of individual --pfm-events : Error: failed to parse event stereolab : event not found Error: failed to parse event stereolab,instructions : event not found Error: failed to parse event instructions,stereolab : event not found Ok 63.2: test groups of --pfm-events : Error: failed to parse event {stereolab} : event not found Error: failed to parse event {instructions,cycles},{instructions,stereolab} : \ event not found Ok # Error message 'nested event groups not supported' is gone. Signed-off-by: Thomas Richter Acked-By: Ian Rogers Acked-by: Sumanth Korikkar Cc: Heiko Carstens Cc: Stephane Eranian Cc: Sven Schnelle Cc: Vasily Gorbik Link: http://lore.kernel.org/lkml/20210517140931.2559364-1-tmricht@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 1c0e5701c5e792c090aef0e5b9b8923c334d9324 Author: Liming Sun Date: Fri May 7 20:30:12 2021 -0400 platform/mellanox: mlxbf-tmfifo: Fix a memory barrier issue The virtio framework uses wmb() when updating avail->idx. It guarantees the write order, but not necessarily loading order for the code accessing the memory. This commit adds a load barrier after reading the avail->idx to make sure all the data in the descriptor is visible. It also adds a barrier when returning the packet to virtio framework to make sure read/writes are visible to the virtio code. Fixes: 1357dfd7261f ("platform/mellanox: Add TmFifo driver for Mellanox BlueField Soc") Signed-off-by: Liming Sun Reviewed-by: Vadim Pasternak Link: https://lore.kernel.org/r/1620433812-17911-1-git-send-email-limings@nvidia.com Signed-off-by: Hans de Goede commit 9795d8232a24be9e1e1cc408a6bdc01c40e2cedc Author: Maximilian Luz Date: Thu May 13 15:44:37 2021 +0200 platform/surface: dtx: Fix poll function The poll function should not return -ERESTARTSYS. Furthermore, locking in this function is completely unnecessary. The ddev->lock protects access to the main device and controller (ddev->dev and ddev->ctrl), ensuring that both are and remain valid while being accessed by clients. Both are, however, never accessed in the poll function. The shutdown test (via atomic bit flags) be safely done without locking, so drop locking here entirely. Reported-by: kernel test robot Fixes: 1d609992832e ("platform/surface: Add DTX driver) Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210513134437.2431022-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 773fe1d74404fcb6f0e7e69c3420cf04a6bb56b0 Author: Maximilian Luz Date: Sat May 15 00:19:54 2021 +0200 platform/surface: aggregator: Add platform-drivers-x86 list to MAINTAINERS entry The Surface System Aggregator Module driver entry is currently missing a mailing list. Surface platform drivers are discussed on the platform-driver-x86 list and all other Surface platform drivers have a reference to that list in their entries. So let's add one here as well. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210514221954.5976-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit ba6e1d8422bd476ad79da409639a773c02f0cbad Author: Arnd Bergmann Date: Fri May 14 22:04:36 2021 +0200 platform/surface: aggregator: avoid clang -Wconstant-conversion warning Clang complains about the assignment of SSAM_ANY_IID to ssam_device_uid->instance: drivers/platform/surface/surface_aggregator_registry.c:478:25: error: implicit conversion from 'int' to '__u8' (aka 'unsigned char') changes value from 65535 to 255 [-Werror,-Wconstant-conversion] { SSAM_VDEV(HUB, 0x02, SSAM_ANY_IID, 0x00) }, ~ ^~~~~~~~~~~~ include/linux/surface_aggregator/device.h:71:23: note: expanded from macro 'SSAM_ANY_IID' #define SSAM_ANY_IID 0xffff ^~~~~~ include/linux/surface_aggregator/device.h:126:63: note: expanded from macro 'SSAM_VDEV' SSAM_DEVICE(SSAM_DOMAIN_VIRTUAL, SSAM_VIRTUAL_TC_##cat, tid, iid, fun) ^~~ include/linux/surface_aggregator/device.h:102:41: note: expanded from macro 'SSAM_DEVICE' .instance = ((iid) != SSAM_ANY_IID) ? (iid) : 0, \ ^~~ The assignment doesn't actually happen, but clang checks the type limits before checking whether this assignment is reached. Replace the ?: operator with a __builtin_choose_expr() invocation that avoids the warning for the untaken part. Fixes: eb0e90a82098 ("platform/surface: aggregator: Add dedicated bus and device type") Cc: platform-driver-x86@vger.kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: Nathan Chancellor Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20210514200453.1542978-1-arnd@kernel.org Signed-off-by: Hans de Goede commit 647e6cc979b0675499347ddbac55c83876a20cf9 Author: Maximilian Luz Date: Wed May 5 15:36:35 2021 +0200 platform/surface: aggregator: Do not mark interrupt as shared Having both IRQF_NO_AUTOEN and IRQF_SHARED set causes request_threaded_irq() to return with -EINVAL (see comment in flag validation in that function). As the interrupt is currently not shared between multiple devices, drop the IRQF_SHARED flag. Fixes: 507cf5a2f1e2 ("platform/surface: aggregator: move to use request_irq by IRQF_NO_AUTOEN flag") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210505133635.1499703-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 8c08652614cb7468620a6328b37ca2965cd48283 Author: Ranjani Sridharan Date: Tue May 18 10:41:21 2021 -0700 ASoC: SOF: Intel: hda: don't send DAI_CONFIG IPC for older firmware BE hw_params op was recently added for SSP type DAIs. But sending the DAI_CONFIG IPC during hw_params is not supported with older firmware. So add an ABI check to avoid sending the IPC if the firmware ABI is older than 3.18. Fixes: e12be9fbfb91 ('ASoC: SOF: Intel: HDA: add hw params callback for SSP DAIs') Tested-by: Yong Zhi Reviewed-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210518174121.151601-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 0024430e920f2900654ad83cd081cf52e02a3ef5 Author: Nathan Chancellor Date: Tue May 18 12:01:06 2021 -0700 x86/build: Fix location of '-plugin-opt=' flags Commit b33fff07e3e3 ("x86, build: allow LTO to be selected") added a couple of '-plugin-opt=' flags to KBUILD_LDFLAGS because the code model and stack alignment are not stored in LLVM bitcode. However, these flags were added to KBUILD_LDFLAGS prior to the emulation flag assignment, which uses ':=', so they were overwritten and never added to $(LD) invocations. The absence of these flags caused misalignment issues in the AMDGPU driver when compiling with CONFIG_LTO_CLANG, resulting in general protection faults. Shuffle the assignment below the initial one so that the flags are properly passed along and all of the linker flags stay together. At the same time, avoid any future issues with clobbering flags by changing the emulation flag assignment to '+=' since KBUILD_LDFLAGS is already defined with ':=' in the main Makefile before being exported for modification here as a result of commit: ce99d0bf312d ("kbuild: clear LDFLAGS in the top Makefile") Fixes: b33fff07e3e3 ("x86, build: allow LTO to be selected") Reported-by: Anthony Ruhier Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Tested-by: Anthony Ruhier Cc: stable@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/1374 Link: https://lore.kernel.org/r/20210518190106.60935-1-nathan@kernel.org commit eddd1b8f467f82b8e9e137ef9dbaa842ecca6a2c Merge: 023dfa9602f56 145e06b58f862 Author: Jani Nikula Date: Wed May 19 11:22:23 2021 +0300 Merge tag 'gvt-fixes-2021-05-19' of https://github.com/intel/gvt-linux into drm-intel-fixes gvt-fixes-2021-05-19 - Fix workaround in -rc1 for GVT config (Zhenyu) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20210519074912.GG4589@zhen-hp.sh.intel.com commit 023dfa9602f561952c0e19d74f66614a56d7e57a Author: Simon Rettberg Date: Mon Apr 26 16:11:24 2021 +0200 drm/i915/gt: Disable HiZ Raw Stall Optimization on broken gen7 When resetting CACHE_MODE registers, don't enable HiZ Raw Stall Optimization on Ivybridge GT1 and Baytrail, as it causes severe glitches when rendering any kind of 3D accelerated content. This optimization is disabled on these platforms by default according to official documentation from 01.org. Fixes: ef99a60ffd9b ("drm/i915/gt: Clear CACHE_MODE prior to clearing residuals") BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3081 BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3404 BugLink: https://gitlab.freedesktop.org/drm/intel/-/issues/3071 Reviewed-by: Manuel Bentele Signed-off-by: Simon Rettberg Reviewed-by: Dave Airlie Signed-off-by: Rodrigo Vivi [Rodrigo removed invalid Fixes line] Link: https://patchwork.freedesktop.org/patch/msgid/20210426161124.2b7fd708@dellnichtsogutkiste (cherry picked from commit 929b734ad34b717d6a1b8de97f53bb5616040147) Signed-off-by: Jani Nikula commit 54c80d907400189b09548039be8f3b6e297e8ae3 Author: Lu Baolu Date: Wed May 19 09:50:27 2021 +0800 iommu/vt-d: Use user privilege for RID2PASID translation When first-level page tables are used for IOVA translation, we use user privilege by setting U/S bit in the page table entry. This is to make it consistent with the second level translation, where the U/S enforcement is not available. Clear the SRE (Supervisor Request Enable) field in the pasid table entry of RID2PASID so that requests requesting the supervisor privilege are blocked and treated as DMA remapping faults. Fixes: b802d070a52a1 ("iommu/vt-d: Use iova over first level") Suggested-by: Jacob Pan Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210512064426.3440915-1-baolu.lu@linux.intel.com Link: https://lore.kernel.org/r/20210519015027.108468-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1a590a1c8bf46bf80ea12b657ca44c345531ac80 Author: Dan Carpenter Date: Wed May 19 09:50:26 2021 +0800 iommu/vt-d: Check for allocation failure in aux_detach_device() In current kernels small allocations never fail, but checking for allocation failure is the correct thing to do. Fixes: 18abda7a2d55 ("iommu/vt-d: Fix general protection fault in aux_detach_device()") Signed-off-by: Dan Carpenter Acked-by: Lu Baolu Link: https://lore.kernel.org/r/YJuobKuSn81dOPLd@mwanda Link: https://lore.kernel.org/r/20210519015027.108468-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 036867e93ebf4d7e70eba6a8c72db74ee3760bc3 Author: Chris Wilson Date: Mon May 17 09:46:40 2021 +0100 drm/i915/gem: Pin the L-shape quirked object as unshrinkable When instantiating a tiled object on an L-shaped memory machine, we mark the object as unshrinkable to prevent the shrinker from trying to swap out the pages. We have to do this as we do not know the swizzling on the individual pages, and so the data will be scrambled across swap out/in. Not only do we need to move the object off the shrinker list, we need to mark the object with shrink_pin so that the counter is consistent across calls to madvise. v2: in the madvise ioctl we need to check if the object is currently shrinkable/purgeable, not if the object type supports shrinking Fixes: 0175969e489a ("drm/i915/gem: Use shrinkable status for unknown swizzle quirks") References: https://gitlab.freedesktop.org/drm/intel/-/issues/3293 References: https://gitlab.freedesktop.org/drm/intel/-/issues/3450 Reported-by: Ville Syrjälä Tested-by: Ville Syrjälä Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Cc: # v5.12+ Link: https://patchwork.freedesktop.org/patch/msgid/20210517084640.18862-1-matthew.auld@intel.com (cherry picked from commit 8777d17b68dcfbfbd4d524f444adefae56f41225) Signed-off-by: Jani Nikula commit a7d139145a6640172516b193abf6d2398620aa14 Author: James Smart Date: Mon May 10 21:56:35 2021 -0700 nvme-fc: clear q_live at beginning of association teardown The __nvmf_check_ready() routine used to bounce all filesystem io if the controller state isn't LIVE. However, a later patch changed the logic so that it rejection ends up being based on the Q live check. The FC transport has a slightly different sequence from rdma and tcp for shutting down queues/marking them non-live. FC marks its queue non-live after aborting all ios and waiting for their termination, leaving a rather large window for filesystem io to continue to hit the transport. Unfortunately this resulted in filesystem I/O or applications seeing I/O errors. Change the FC transport to mark the queues non-live at the first sign of teardown for the association (when I/O is initially terminated). Fixes: 73a5379937ec ("nvme-fabrics: allow to queue requests for live queues") Signed-off-by: James Smart Reviewed-by: Sagi Grimberg Reviewed-by: Himanshu Madhani Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit a0fdd1418007f83565d3f2e04b47923ba93a9b8c Author: Keith Busch Date: Mon May 17 15:36:43 2021 -0700 nvme-tcp: rerun io_work if req_list is not empty A possible race condition exists where the request to send data is enqueued from nvme_tcp_handle_r2t()'s will not be observed by nvme_tcp_send_all() if it happens to be running. The driver relies on io_work to send the enqueued request when it is runs again, but the concurrently running nvme_tcp_send_all() may not have released the send_mutex at that time. If no future commands are enqueued to re-kick the io_work, the request will timeout in the SEND_H2C state, resulting in a timeout error like: nvme nvme0: queue 1: timeout request 0x3 type 6 Ensure the io_work continues to run as long as the req_list is not empty. Fixes: db5ad6b7f8cdd ("nvme-tcp: try to send request in queue_rq context") Signed-off-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 825619b09ad351894d2c6fb6705f5b3711d145c7 Author: Sagi Grimberg Date: Mon May 17 14:07:45 2021 -0700 nvme-tcp: fix possible use-after-completion Commit db5ad6b7f8cd ("nvme-tcp: try to send request in queue_rq context") added a second context that may perform a network send. This means that now RX and TX are not serialized in nvme_tcp_io_work and can run concurrently. While there is correct mutual exclusion in the TX path (where the send_mutex protect the queue socket send activity) RX activity, and more specifically request completion may run concurrently. This means we must guarantee that any mutation of the request state related to its lifetime, bytes sent must not be accessed when a completion may have possibly arrived back (and processed). The race may trigger when a request completion arrives, processed _and_ reused as a fresh new request, exactly in the (relatively short) window between the last data payload sent and before the request iov_iter is advanced. Consider the following race: 1. 16K write request is queued 2. The nvme command and the data is sent to the controller (in-capsule or solicited by r2t) 3. After the last payload is sent but before the req.iter is advanced, the controller sends back a completion. 4. The completion is processed, the request is completed, and reused to transfer a new request (write or read) 5. The new request is queued, and the driver reset the request parameters (nvme_tcp_setup_cmd_pdu). 6. Now context in (2) resumes execution and advances the req.iter ==> use-after-completion as this is already a new request. Fix this by making sure the request is not advanced after the last data payload send, knowing that a completion may have arrived already. An alternative solution would have been to delay the request completion or state change waiting for reference counting on the TX path, but besides adding atomic operations to the hot-path, it may present challenges in multi-stage R2T scenarios where a r2t handler needs to be deferred to an async execution. Reported-by: Narayan Ayalasomayajula Tested-by: Anil Mishra Reviewed-by: Keith Busch Cc: stable@vger.kernel.org # v5.8+ Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 03504e3b54cc8118cc26c064e60a0b00c2308708 Author: Wu Bo Date: Wed May 19 13:01:10 2021 +0800 nvme-loop: fix memory leak in nvme_loop_create_ctrl() When creating loop ctrl in nvme_loop_create_ctrl(), if nvme_init_ctrl() fails, the loop ctrl should be freed before jumping to the "out" label. Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver") Signed-off-by: Wu Bo Signed-off-by: Christoph Hellwig commit fec356a61aa3d3a66416b4321f1279e09e0f256f Author: Wu Bo Date: Wed May 19 13:01:09 2021 +0800 nvmet: fix memory leak in nvmet_alloc_ctrl() When creating ctrl in nvmet_alloc_ctrl(), if the cntlid_min is larger than cntlid_max of the subsystem, and jumps to the "out_free_changed_ns_list" label, but the ctrl->sqs lack of be freed. Fix this by jumping to the "out_free_sqs" label. Fixes: 94a39d61f80f ("nvmet: make ctrl-id configurable") Signed-off-by: Wu Bo Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit e63052a5dd3ce7979bff727a8f4bb6d6b3d1317b Author: Jakub Kicinski Date: Wed May 5 13:20:26 2021 -0700 mlx5e: add add missing BH locking around napi_schdule() It's not correct to call napi_schedule() in pure process context. Because we use __raise_softirq_irqoff() we require callers to be in a context which will eventually lead to softirq handling (hardirq, bh disabled, etc.). With code as is users will see: NOHZ tick-stop error: Non-RCU local softirq work is pending, handler #08!!! Fixes: a8dd7ac12fc3 ("net/mlx5e: Generalize RQ activation") Signed-off-by: Jakub Kicinski Signed-off-by: Saeed Mahameed commit 6ff51ab8aa8fcbcddeeefce8ca705b575805d12b Author: Ariel Levkovich Date: Wed Mar 31 10:09:02 2021 +0300 net/mlx5: Set term table as an unmanaged flow table Termination tables are restricted to have the default miss action and cannot be set to forward to another table in case of a miss. If the fs prio of the termination table is not the last one in the list, fs_core will attempt to attach it to another table. Set the unmanaged ft flag when creating the termination table ft and select the tc offload prio for it to prevent fs_core from selecting the forwarding to next ft miss action and use the default one. In addition, set the flow that forwards to the termination table to ignore ft level restrictions since the ft level is not set by fs_core for unamanged fts. Fixes: 249ccc3c95bd ("net/mlx5e: Add support for offloading traffic from uplink to uplink") Signed-off-by: Ariel Levkovich commit 75e8564e919f369cafb3d2b8fd11ec5af7b37416 Author: Leon Romanovsky Date: Sun Apr 25 13:28:10 2021 +0300 net/mlx5: Don't overwrite HCA capabilities when setting MSI-X count During driver probe of device that has dynamic MSI-X feature enabled, the following error is printed in some FW flavour (not released yet). mlx5_core 0000:06:00.0: firmware version: 4.7.4387 mlx5_core 0000:06:00.0: 126.016 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x16 link) mlx5_core 0000:06:00.0: mlx5_cmd_check:777:(pid 70599): SET_HCA_CAP(0x109) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x0) mlx5_core 0000:06:00.0: set_hca_cap:622:(pid 70599): handle_hca_cap failed mlx5_core 0000:06:00.0: mlx5_function_setup:1045:(pid 70599): set_hca_cap failed mlx5_core 0000:06:00.0: probe_one:1465:(pid 70599): mlx5_init_one failed with error code -22 mlx5_core: probe of 0000:06:00.0 failed with error -22 In order to make the setting capability of MSI-X future proof, let's query the current capabilities first. Fixes: 604774add516 ("net/mlx5: Dynamically assign MSI-X vectors count") Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 7c9f131f366ab414691907fa0407124ea2b2f3bc Author: Eli Cohen Date: Thu Apr 22 15:48:10 2021 +0300 {net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table net/mlx5: Expose MPFS configuration API MPFS is the multi physical function switch that bridges traffic between the physical port and any physical functions associated with it. The driver is required to add or remove MAC entries to properly forward incoming traffic to the correct physical function. We export the API to control MPFS so that other drivers, such as mlx5_vdpa are able to add MAC addresses of their network interfaces. The MAC address of the vdpa interface must be configured into the MPFS L2 address. Failing to do so could cause, in some NIC configurations, failure to forward packets to the vdpa network device instance. Fix this by adding calls to update the MPFS table. CC: CC: CC: Fixes: 1a86b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed commit 5e7923acbd86d0ff29269688d8a9c47ad091dd46 Author: Aya Levin Date: Wed Apr 21 14:26:31 2021 +0300 net/mlx5e: Fix error path of updating netdev queues Avoid division by zero in the error flow. In the driver TC number can be either 1 or 8. When TC count is set to 1, driver zero netdev->num_tc. Hence, need to convert it back from 0 to 1 in the error flow. Fixes: fa3748775b92 ("net/mlx5e: Handle errors from netif_set_real_num_{tx,rx}_queues") Signed-off-by: Aya Levin Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 7d1a3d08c8a6398e7497a98cf3f7b73ea13d9939 Author: Vlad Buslov Date: Tue Apr 20 15:16:16 2021 +0300 net/mlx5e: Reject mirroring on source port change encap rules Rules with MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE dest flag are translated to destination FT in eswitch. Currently it is not possible to mirror such rules because firmware doesn't support mixing FT and Vport destinations in single rule when one of them adds encapsulation. Since the only use case for MLX5_ESW_DEST_CHAIN_WITH_SRC_PORT_CHANGE destination is support for tunnel endpoints on VF and trying to offload such rule with mirror action causes either crash in fs_core or firmware error with syndrome 0xff6a1d, reject all such rules in mlx5 TC layer. Fixes: 10742efc20a4 ("net/mlx5e: VF tunnel TX traffic offloading") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 97817fcc684ed01497bd19d0cd4dea699665b9cf Author: Dima Chumak Date: Tue Apr 13 22:43:08 2021 +0300 net/mlx5e: Fix multipath lag activation When handling FIB_EVENT_ENTRY_REPLACE event for a new multipath route, lag activation can be missed if a stale (struct lag_mp)->mfi pointer exists, which was associated with an older multipath route that had been removed. Normally, when a route is removed, it triggers mlx5_lag_fib_event(), which handles FIB_EVENT_ENTRY_DEL and clears mfi pointer. But, if mlx5_lag_check_prereq() condition isn't met, for example when eswitch is in legacy mode, the fib event is skipped and mfi pointer becomes stale. Fix by resetting mfi pointer to NULL every time mlx5_lag_mp_init() is called. Fixes: 544fe7c2e654 ("net/mlx5e: Activate HW multipath and handle port affinity based on FIB events") Signed-off-by: Dima Chumak Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 77ecd10d0a8aaa6e4871d8c63626e4c9fc5e47db Author: Saeed Mahameed Date: Thu Feb 25 11:20:00 2021 -0800 net/mlx5e: reset XPS on error flow if netdev isn't registered yet mlx5e_attach_netdev can be called prior to registering the netdevice: Example stack: ipoib_new_child_link -> ipoib_intf_init-> rdma_init_netdev-> mlx5_rdma_setup_rn-> mlx5e_attach_netdev-> mlx5e_num_channels_changed -> mlx5e_set_default_xps_cpumasks -> netif_set_xps_queue -> __netif_set_xps_queue -> kmalloc If any later stage fails at any point after mlx5e_num_channels_changed() returns, XPS allocated maps will never be freed as they are only freed during netdev unregistration, which will never happen for yet to be registered netdevs. Fixes: 3909a12e7913 ("net/mlx5e: Fix configuration of XPS cpumasks and netdev queues in corner cases") Signed-off-by: Saeed Mahameed Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan commit eb96cc15926f4ddde3a28c42feeffdf002451c24 Author: Roi Dayan Date: Sun May 2 10:25:50 2021 +0300 net/mlx5e: Make sure fib dev exists in fib event For unreachable route entry the fib dev does not exists. Fixes: 8914add2c9e5 ("net/mlx5e: Handle FIB events to update tunnel endpoint device") Reported-by: Dennis Afanasev Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 83026d83186bc48bb41ee4872f339b83f31dfc55 Author: Roi Dayan Date: Mon May 3 18:01:02 2021 +0300 net/mlx5e: Fix null deref accessing lag dev It could be the lag dev is null so stop processing the event. In bond_enslave() the active/backup slave being set before setting the upper dev so first event is without an upper dev. After setting the upper dev with bond_master_upper_dev_link() there is a second event and in that event we have an upper dev. Fixes: 7e51891a237f ("net/mlx5e: Use netdev events to set/del egress acl forward-to-vport rule") Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit fe7738eb3ca3631a75844e790f6cb576c0fe7b00 Author: Dima Chumak Date: Mon Apr 26 15:16:26 2021 +0300 net/mlx5e: Fix nullptr in mlx5e_tc_add_fdb_flow() The result of __dev_get_by_index() is not checked for NULL, which then passed to mlx5e_attach_encap() and gets dereferenced. Also, in case of a successful lookup, the net_device reference count is not incremented, which may result in net_device pointer becoming invalid at any time during mlx5e_attach_encap() execution. Fix by using dev_get_by_index(), which does proper reference counting on the net_device pointer. Also, handle nullptr return value when mirred device is not found. It's safe to call dev_put() on the mirred net_device pointer, right after mlx5e_attach_encap() call, because it's not being saved/copied down the call chain. Fixes: 3c37745ec614 ("net/mlx5e: Properly deal with encap flows add/del under neigh update") Addresses-Coverity: ("Dereference null return value") Signed-off-by: Dima Chumak Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 82041634d96e87b41c600a673f10150d9f21f742 Author: Parav Pandit Date: Fri May 7 10:08:47 2021 +0300 net/mlx5: SF, Fix show state inactive when its inactivated When a SF is inactivated and when it is in a TEARDOWN_REQUEST state, driver still returns its state as active. This is incorrect. Fix it by treating TEARDOWN_REQEUST as inactive state. When a SF is still attached to the driver, on user request to reactivate EINVAL error is returned. Inform user about it with better code EBUSY and informative error message. Fixes: 6a3273217469 ("net/mlx5: SF, Port function state change support") Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit fca086617af864efd20289774901221b2df06b39 Author: Roi Dayan Date: Thu May 13 15:00:53 2021 +0300 net/mlx5: Fix err prints and return when creating termination table Fix print to print correct error code and not using IS_ERR() which will just result in always printing 1. Also return real err instead of always -EOPNOTSUPP. Fixes: 10caabdaad5a ("net/mlx5e: Use termination table for VLAN push actions") Signed-off-by: Roi Dayan Reviewed-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 442b3d7b671bcb779ebdad46edd08051eb8b28d9 Author: Jianbo Liu Date: Fri Apr 30 06:58:29 2021 +0000 net/mlx5: Set reformat action when needed for termination rules For remote mirroring, after the tunnel packets are received, they are decapsulated and sent to representor, then re-encapsulated and sent out over another tunnel. So reformat action is set only when the destination is required to do encapsulation. Fixes: 249ccc3c95bd ("net/mlx5e: Add support for offloading traffic from uplink to uplink") Signed-off-by: Jianbo Liu Reviewed-by: Ariel Levkovich Signed-off-by: Saeed Mahameed commit dca59f4a791960ec73fa15803faa0abe0f92ece2 Author: Dima Chumak Date: Mon Apr 26 15:16:26 2021 +0300 net/mlx5e: Fix nullptr in add_vlan_push_action() The result of dev_get_by_index_rcu() is not checked for NULL and then gets dereferenced immediately. Also, the RCU lock must be held by the caller of dev_get_by_index_rcu(), which isn't satisfied by the call stack. Fix by handling nullptr return value when iflink device is not found. Add RCU locking around dev_get_by_index_rcu() to avoid possible adverse effects while iterating over the net_device's hlist. It is safe not to increment reference count of the net_device pointer in case of a successful lookup, because it's already handled by VLAN code during VLAN device registration (see register_vlan_dev and netdev_upper_dev_link). Fixes: 278748a95aa3 ("net/mlx5e: Offload TC e-switch rules with egress VLAN device") Addresses-Coverity: ("Dereference null return value") Signed-off-by: Dima Chumak Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 3410fbcd47dc6479af4309febf760ccaa5efb472 Author: Maor Gottlieb Date: Wed May 12 13:52:27 2021 +0300 {net, RDMA}/mlx5: Fix override of log_max_qp by other device mlx5_core_dev holds pointer to static profile, hence when the log_max_qp of the profile is override by some device, then it effect all other mlx5 devices that share the same profile. Fix it by having a profile instance for every mlx5 device. Fixes: 883371c453b9 ("net/mlx5: Check FW limitations on log_max_qp before setting it") Signed-off-by: Maor Gottlieb Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 333944c7c3759c546035f1f9b0b4c72bdc5b7878 Author: Souptick Joarder Date: Sun Apr 25 17:56:24 2021 +0530 pinctrl: aspeed: Fix minor documentation error Kernel test robot throws below warning -> drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c:2705: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/pinctrl/aspeed/pinctrl-aspeed-g6.c:2614: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/pinctrl/aspeed/pinctrl-aspeed.c:111: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/pinctrl/aspeed/pinmux-aspeed.c:24: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Fix minor documentation error. Reported-by: kernel test robot Signed-off-by: Souptick Joarder Cc: Randy Dunlap Reviewed-by: Randy Dunlap Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/1619353584-8196-1-git-send-email-jrdr.linux@gmail.com Signed-off-by: Linus Walleij commit 922e3013046b79b444c87eda5baf43afae1326a8 Author: Eric W. Biederman Date: Mon May 3 12:52:43 2021 -0500 signalfd: Remove SIL_PERF_EVENT fields from signalfd_siginfo With the addition of ssi_perf_data and ssi_perf_type struct signalfd_siginfo is dangerously close to running out of space. All that remains is just enough space for two additional 64bit fields. A practice of adding all possible siginfo_t fields into struct singalfd_siginfo can not be supported as adding the missing fields ssi_lower, ssi_upper, and ssi_pkey would require two 64bit fields and one 32bit fields. In practice the fields ssi_perf_data and ssi_perf_type can never be used by signalfd as the signal that generates them always delivers them synchronously to the thread that triggers them. Therefore until someone actually needs the fields ssi_perf_data and ssi_perf_type in signalfd_siginfo remove them. This leaves a bit more room for future expansion. v1: https://lkml.kernel.org/r/20210503203814.25487-12-ebiederm@xmission.com v2: https://lkml.kernel.org/r/20210505141101.11519-12-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20210517195748.8880-5-ebiederm@xmission.com Reviewed-by: Marco Elver Signed-off-by: "Eric W. Biederman" commit 0683b53197b55343a166f1507086823030809a19 Author: Eric W. Biederman Date: Sun May 2 17:28:31 2021 -0500 signal: Deliver all of the siginfo perf data in _perf Don't abuse si_errno and deliver all of the perf data in _perf member of siginfo_t. Note: The data field in the perf data structures in a u64 to allow a pointer to be encoded without needed to implement a 32bit and 64bit version of the same structure. There already exists a 32bit and 64bit versions siginfo_t, and the 32bit version can not include a 64bit member as it only has 32bit alignment. So unsigned long is used in siginfo_t instead of a u64 as unsigned long can encode a pointer on all architectures linux supports. v1: https://lkml.kernel.org/r/m11rarqqx2.fsf_-_@fess.ebiederm.org v2: https://lkml.kernel.org/r/20210503203814.25487-10-ebiederm@xmission.com v3: https://lkml.kernel.org/r/20210505141101.11519-11-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20210517195748.8880-4-ebiederm@xmission.com Reviewed-by: Marco Elver Signed-off-by: "Eric W. Biederman" commit af5eeab7e8e8c2f0fad10e4ab8cc8092012a2d5b Author: Eric W. Biederman Date: Sun May 2 14:27:24 2021 -0500 signal: Factor force_sig_perf out of perf_sigtrap Separate filling in siginfo for TRAP_PERF from deciding that siginal needs to be sent. There are enough little details that need to be correct when properly filling in siginfo_t that it is easy to make mistakes if filling in the siginfo_t is in the same function with other logic. So factor out force_sig_perf to reduce the cognative load of on reviewers, maintainers and implementors. v1: https://lkml.kernel.org/r/m17dkjqqxz.fsf_-_@fess.ebiederm.org v2: https://lkml.kernel.org/r/20210505141101.11519-10-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20210517195748.8880-3-ebiederm@xmission.com Reviewed-by: Marco Elver Acked-by: Peter Zijlstra (Intel) Signed-off-by: "Eric W. Biederman" commit 9abcabe3111811aeae0f3a14e159b14248631875 Author: Eric W. Biederman Date: Fri Apr 30 17:29:36 2021 -0500 signal: Implement SIL_FAULT_TRAPNO Now that si_trapno is part of the union in _si_fault and available on all architectures, add SIL_FAULT_TRAPNO and update siginfo_layout to return SIL_FAULT_TRAPNO when the code assumes si_trapno is valid. There is room for future changes to reduce when si_trapno is valid but this is all that is needed to make si_trapno and the other members of the the union in _sigfault mutually exclusive. Update the code that uses siginfo_layout to deal with SIL_FAULT_TRAPNO and have the same code ignore si_trapno in in all other cases. v1: https://lkml.kernel.org/r/m1o8dvs7s7.fsf_-_@fess.ebiederm.org v2: https://lkml.kernel.org/r/20210505141101.11519-6-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20210517195748.8880-2-ebiederm@xmission.com Reviewed-by: Marco Elver Signed-off-by: "Eric W. Biederman" commit add0b32ef9146a8559a60aed54c37692a5f9d34f Author: Eric W. Biederman Date: Fri Apr 30 17:06:01 2021 -0500 siginfo: Move si_trapno inside the union inside _si_fault It turns out that linux uses si_trapno very sparingly, and as such it can be considered extra information for a very narrow selection of signals, rather than information that is present with every fault reported in siginfo. As such move si_trapno inside the union inside of _si_fault. This results in no change in placement, and makes it eaiser to extend _si_fault in the future as this reduces the number of special cases. In particular with si_trapno included in the union it is no longer a concern that the union must be pointer aligned on most architectures because the union follows immediately after si_addr which is a pointer. This change results in a difference in siginfo field placement on sparc and alpha for the fields si_addr_lsb, si_lower, si_upper, si_pkey, and si_perf. These architectures do not implement the signals that would use si_addr_lsb, si_lower, si_upper, si_pkey, and si_perf. Further these architecture have not yet implemented the userspace that would use si_perf. The point of this change is in fact to correct these placement issues before sparc or alpha grow userspace that cares. This change was discussed[1] and the agreement is that this change is currently safe. [1]: https://lkml.kernel.org/r/CAK8P3a0+uKYwL1NhY6Hvtieghba2hKYGD6hcKx5n8=4Gtt+pHA@mail.gmail.com Acked-by: Marco Elver v1: https://lkml.kernel.org/r/m1tunns7yf.fsf_-_@fess.ebiederm.org v2: https://lkml.kernel.org/r/20210505141101.11519-5-ebiederm@xmission.com Link: https://lkml.kernel.org/r/20210517195748.8880-1-ebiederm@xmission.com Signed-off-by: "Eric W. Biederman" commit c9fd37a9450b23804868d7a5b0d038b32ba466be Merge: 33e6b1674f339 9bb5a495424fd Author: David S. Miller Date: Tue May 18 13:41:04 2021 -0700 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== net: hns3: fixes for -net This series includes some bugfixes for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit 9bb5a495424fd4bfa672eb1f31481248562fa156 Author: Yunsheng Lin Date: Tue May 18 19:36:03 2021 +0800 net: hns3: check the return of skb_checksum_help() Currently skb_checksum_help()'s return is ignored, but it may return error when it fails to allocate memory when linearizing. So adds checking for the return of skb_checksum_help(). Fixes: 76ad4f0ee747("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Fixes: 3db084d28dc0("net: hns3: Fix for vxlan tx checksum bug") Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 73a13d8dbe33e53a12400f2be0f5af169816c67f Author: Huazhong Tan Date: Tue May 18 19:36:02 2021 +0800 net: hns3: fix user's coalesce configuration lost issue Currently, when adaptive is on, the user's coalesce configuration may be overwritten by the dynamic one. The reason is that user's configurations are saved in struct hns3_enet_tqp_vector whose value maybe changed by the dynamic algorithm. To fix it, use struct hns3_nic_priv instead of struct hns3_enet_tqp_vector to save and get the user's configuration. BTW, operations of storing and restoring coalesce info in the reset process are unnecessary now, so remove them as well. Fixes: 434776a5fae2 ("net: hns3: add ethtool_ops.set_coalesce support to PF") Fixes: 7e96adc46633 ("net: hns3: add ethtool_ops.get_coalesce support to PF") Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit a289a7e5c1d49b7d47df9913c1cc81fb48fab613 Author: Jian Shen Date: Tue May 18 19:36:01 2021 +0800 net: hns3: put off calling register_netdev() until client initialize complete Currently, the netdevice is registered before client initializing complete. So there is a timewindow between netdevice available and usable. In this case, if user try to change the channel number or ring param, it may cause the hns3_set_rx_cpu_rmap() being called twice, and report bug. [47199.416502] hns3 0000:35:00.0 eth1: set channels: tqp_num=1, rxfh=0 [47199.430340] hns3 0000:35:00.0 eth1: already uninitialized [47199.438554] hns3 0000:35:00.0: rss changes from 4 to 1 [47199.511854] hns3 0000:35:00.0: Channels changed, rss_size from 4 to 1, tqps from 4 to 1 [47200.163524] ------------[ cut here ]------------ [47200.171674] kernel BUG at lib/cpu_rmap.c:142! [47200.177847] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [47200.185259] Modules linked in: hclge(+) hns3(-) hns3_cae(O) hns_roce_hw_v2 hnae3 vfio_iommu_type1 vfio_pci vfio_virqfd vfio pv680_mii(O) [last unloaded: hclge] [47200.205912] CPU: 1 PID: 8260 Comm: ethtool Tainted: G O 5.11.0-rc3+ #1 [47200.215601] Hardware name: , xxxxxx 02/04/2021 [47200.223052] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--) [47200.230188] pc : cpu_rmap_add+0x38/0x40 [47200.237472] lr : irq_cpu_rmap_add+0x84/0x140 [47200.243291] sp : ffff800010e93a30 [47200.247295] x29: ffff800010e93a30 x28: ffff082100584880 [47200.254155] x27: 0000000000000000 x26: 0000000000000000 [47200.260712] x25: 0000000000000000 x24: 0000000000000004 [47200.267241] x23: ffff08209ba03000 x22: ffff08209ba038c0 [47200.273789] x21: 000000000000003f x20: ffff0820e2bc1680 [47200.280400] x19: ffff0820c970ec80 x18: 00000000000000c0 [47200.286944] x17: 0000000000000000 x16: ffffb43debe4a0d0 [47200.293456] x15: fffffc2082990600 x14: dead000000000122 [47200.300059] x13: ffffffffffffffff x12: 000000000000003e [47200.306606] x11: ffff0820815b8080 x10: ffff53e411988000 [47200.313171] x9 : 0000000000000000 x8 : ffff0820e2bc1700 [47200.319682] x7 : 0000000000000000 x6 : 000000000000003f [47200.326170] x5 : 0000000000000040 x4 : ffff800010e93a20 [47200.332656] x3 : 0000000000000004 x2 : ffff0820c970ec80 [47200.339168] x1 : ffff0820e2bc1680 x0 : 0000000000000004 [47200.346058] Call trace: [47200.349324] cpu_rmap_add+0x38/0x40 [47200.354300] hns3_set_rx_cpu_rmap+0x6c/0xe0 [hns3] [47200.362294] hns3_reset_notify_init_enet+0x1cc/0x340 [hns3] [47200.370049] hns3_change_channels+0x40/0xb0 [hns3] [47200.376770] hns3_set_channels+0x12c/0x2a0 [hns3] [47200.383353] ethtool_set_channels+0x140/0x250 [47200.389772] dev_ethtool+0x714/0x23d0 [47200.394440] dev_ioctl+0x4cc/0x640 [47200.399277] sock_do_ioctl+0x100/0x2a0 [47200.404574] sock_ioctl+0x28c/0x470 [47200.409079] __arm64_sys_ioctl+0xb4/0x100 [47200.415217] el0_svc_common.constprop.0+0x84/0x210 [47200.422088] do_el0_svc+0x28/0x34 [47200.426387] el0_svc+0x28/0x70 [47200.431308] el0_sync_handler+0x1a4/0x1b0 [47200.436477] el0_sync+0x174/0x180 [47200.441562] Code: 11000405 79000c45 f8247861 d65f03c0 (d4210000) [47200.448869] ---[ end trace a01efe4ce42e5f34 ]--- The process is like below: excuting hns3_client_init | register_netdev() | hns3_set_channels() | | hns3_set_rx_cpu_rmap() hns3_reset_notify_uninit_enet() | | | quit without calling function | hns3_free_rx_cpu_rmap for flag | HNS3_NIC_STATE_INITED is unset. | | | hns3_reset_notify_init_enet() | | set HNS3_NIC_STATE_INITED call hns3_set_rx_cpu_rmap()-- crash Fix it by calling register_netdev() at the end of function hns3_client_init(). Fixes: 08a100689d4b ("net: hns3: re-organize vector handle") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit a710b9ffbebaf713f7dbd4dbd9524907e5d66f33 Author: Jiaran Zhang Date: Tue May 18 19:36:00 2021 +0800 net: hns3: fix incorrect resp_msg issue In hclge_mbx_handler(), if there are two consecutive mailbox messages that requires resp_msg, the resp_msg is not cleared after processing the first message, which will cause the resp_msg data of second message incorrect. Fix it by clearing the resp_msg before processing every mailbox message. Fixes: bb5790b71bad ("net: hns3: refactor mailbox response scheme between PF and VF") Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 33e6b1674f339c5d3be56ec9b4921d1ddd14327d Author: Markus Bloechl Date: Tue May 18 11:54:11 2021 +0200 net: lan78xx: advertise tx software timestamping support lan78xx already calls skb_tx_timestamp() in its lan78xx_start_xmit(). Override .get_ts_info to also advertise this capability (SOF_TIMESTAMPING_TX_SOFTWARE) via ethtool. Signed-off-by: Markus Blöchl Signed-off-by: David S. Miller commit be07f056396d6bb40963c45a02951c566ddeef8e Author: Xin Long Date: Tue May 18 10:09:08 2021 +0800 tipc: simplify the finalize work queue This patch is to use "struct work_struct" for the finalize work queue instead of "struct tipc_net_work", as it can get the "net" and "addr" from tipc_net's other members and there is no need to add extra net and addr in tipc_net by defining "struct tipc_net_work". Note that it's safe to get net from tn->bcl as bcl is always released after the finalize work queue is done. Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 9f460ae31c4435fd022c443a6029352217a16ac1 Author: Sven Eckelmann Date: Tue May 18 21:00:27 2021 +0200 batman-adv: Avoid WARN_ON timing related checks The soft/batadv interface for a queued OGM can be changed during the time the OGM was queued for transmission and when the OGM is actually transmitted by the worker. But WARN_ON must be used to denote kernel bugs and not to print simple warnings. A warning can simply be printed using pr_warn. Reported-by: Tetsuo Handa Reported-by: syzbot+c0b807de416427ff3dd1@syzkaller.appspotmail.com Fixes: ef0a937f7a14 ("batman-adv: consider outgoing interface in OGM sending") Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 976aac5f882989e4f6c1b3a7224819bf0e801c6a Author: Arnd Bergmann Date: Fri May 14 16:00:08 2021 +0200 kcsan: Fix debugfs initcall return type clang with CONFIG_LTO_CLANG points out that an initcall function should return an 'int' due to the changes made to the initcall macros in commit 3578ad11f3fb ("init: lto: fix PREL32 relocations"): kernel/kcsan/debugfs.c:274:15: error: returning 'void' from a function with incompatible result type 'int' late_initcall(kcsan_debugfs_init); ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ include/linux/init.h:292:46: note: expanded from macro 'late_initcall' #define late_initcall(fn) __define_initcall(fn, 7) Fixes: e36299efe7d7 ("kcsan, debugfs: Move debugfs file creation out of early init") Cc: stable Reviewed-by: Greg Kroah-Hartman Reviewed-by: Marco Elver Reviewed-by: Nathan Chancellor Reviewed-by: Miguel Ojeda Signed-off-by: Arnd Bergmann Signed-off-by: Paul E. McKenney commit 889d916b6f8a48b8c9489fffcad3b78eedd01a51 Author: Shay Drory Date: Tue May 11 08:48:28 2021 +0300 RDMA/core: Don't access cm_id after its destruction restrack should only be attached to a cm_id while the ID has a valid device pointer. It is set up when the device is first loaded, but not cleared when the device is removed. There is also two copies of the device pointer, one private and one in the public API, and these were left out of sync. Make everything go to NULL together and manipulate restrack right around the device assignments. Found by syzcaller: BUG: KASAN: wild-memory-access in __list_del include/linux/list.h:112 [inline] BUG: KASAN: wild-memory-access in __list_del_entry include/linux/list.h:135 [inline] BUG: KASAN: wild-memory-access in list_del include/linux/list.h:146 [inline] BUG: KASAN: wild-memory-access in cma_cancel_listens drivers/infiniband/core/cma.c:1767 [inline] BUG: KASAN: wild-memory-access in cma_cancel_operation drivers/infiniband/core/cma.c:1795 [inline] BUG: KASAN: wild-memory-access in cma_cancel_operation+0x1f4/0x4b0 drivers/infiniband/core/cma.c:1783 Write of size 8 at addr dead000000000108 by task syz-executor716/334 CPU: 0 PID: 334 Comm: syz-executor716 Not tainted 5.11.0+ #271 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0xbe/0xf9 lib/dump_stack.c:120 __kasan_report mm/kasan/report.c:400 [inline] kasan_report.cold+0x5f/0xd5 mm/kasan/report.c:413 __list_del include/linux/list.h:112 [inline] __list_del_entry include/linux/list.h:135 [inline] list_del include/linux/list.h:146 [inline] cma_cancel_listens drivers/infiniband/core/cma.c:1767 [inline] cma_cancel_operation drivers/infiniband/core/cma.c:1795 [inline] cma_cancel_operation+0x1f4/0x4b0 drivers/infiniband/core/cma.c:1783 _destroy_id+0x29/0x460 drivers/infiniband/core/cma.c:1862 ucma_close_id+0x36/0x50 drivers/infiniband/core/ucma.c:185 ucma_destroy_private_ctx+0x58d/0x5b0 drivers/infiniband/core/ucma.c:576 ucma_close+0x91/0xd0 drivers/infiniband/core/ucma.c:1797 __fput+0x169/0x540 fs/file_table.c:280 task_work_run+0xb7/0x100 kernel/task_work.c:140 exit_task_work include/linux/task_work.h:30 [inline] do_exit+0x7da/0x17f0 kernel/exit.c:825 do_group_exit+0x9e/0x190 kernel/exit.c:922 __do_sys_exit_group kernel/exit.c:933 [inline] __se_sys_exit_group kernel/exit.c:931 [inline] __x64_sys_exit_group+0x2d/0x30 kernel/exit.c:931 do_syscall_64+0x2d/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: 255d0c14b375 ("RDMA/cma: rdma_bind_addr() leaks a cma_dev reference count") Link: https://lore.kernel.org/r/3352ee288fe34f2b44220457a29bfc0548686363.1620711734.git.leonro@nvidia.com Signed-off-by: Shay Drory Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit c37fe6aff89cb0d842993fe2f69e48bf3ebe0ab0 Merge: d7aed20d446d8 d07f6ca923ea0 Author: Mark Brown Date: Tue May 18 17:24:52 2021 +0100 Merge tag 'v5.13-rc2' into spi-5.13 Linux 5.13-rc2 commit 5881fa8dc2de9697a89451f6518e8b3a796c09c6 Author: Ondrej Mosnacek Date: Fri May 7 14:53:04 2021 +0200 debugfs: fix security_locked_down() call for SELinux When (ia->ia_valid & (ATTR_MODE | ATTR_UID | ATTR_GID)) is zero, then the SELinux implementation of the locked_down hook might report a denial even though the operation would actually be allowed. To fix this, make sure that security_locked_down() is called only when the return value will be taken into account (i.e. when changing one of the problematic attributes). Note: this was introduced by commit 5496197f9b08 ("debugfs: Restrict debugfs when the kernel is locked down"), but it didn't matter at that time, as the SELinux support came in later. Fixes: 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") Cc: stable Signed-off-by: Ondrej Mosnacek Link: https://lore.kernel.org/r/20210507125304.144394-1-omosnace@redhat.com Signed-off-by: Greg Kroah-Hartman commit d37316b72e8bf95a52d1c3e93c823d128c09b521 Author: Jonathan Neuschäfer Date: Tue May 18 16:45:14 2021 +0930 ARM: npcm: wpcm450: select interrupt controller driver The interrupt controller driver is necessary in order to have a functioning Linux system on WPCM450. Select it in mach-npcm/Kconfig. Fixes: ece3fe93e8f4 ("ARM: npcm: Introduce Nuvoton WPCM450 SoC") Signed-off-by: Jonathan Neuschäfer Signed-off-by: Joel Stanley Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210513165627.1767093-1-j.neuschaefer@gmx.net Link: https://lore.kernel.org/r/20210518071514.604492-1-joel@jms.id.au' Signed-off-by: Arnd Bergmann commit d7aed20d446d8c87f5e13adf73281056b0064a45 Author: Alain Volmat Date: Wed May 12 07:20:42 2021 +0200 MAINTAINERS: Add Alain Volmat as STM32 SPI maintainer Add Alain Volmat as STM32 SPI maintainer. Signed-off-by: Alain Volmat Reviewed-by: Amelie Delaunay Link: https://lore.kernel.org/r/1620796842-23546-1-git-send-email-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit 0b07154f066ab2c087c342b372be5771145bdc60 Author: Michael Walle Date: Mon May 17 17:39:46 2021 +0200 dt-bindings: spi: spi-mux: rename flash node The recent conversion of the common MTD properties to YAML now mandates a particular node name for SPI flash devices. Reported-by: Rob Herring Signed-off-by: Michael Walle Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210517153946.9502-1-michael@walle.cc Signed-off-by: Mark Brown commit 34991ee96fd8477479dd15adadceb6b28b30d9b0 Author: Axel Lin Date: Mon May 17 18:53:24 2021 +0800 regulator: fan53880: Fix missing n_voltages setting Fixes: e6dea51e2d41 ("regulator: fan53880: Add initial support") Signed-off-by: Axel Lin Acked-by: Christoph Fritz Link: https://lore.kernel.org/r/20210517105325.1227393-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 0b1e552673724832b08d49037cdeeac634a3b319 Author: Axel Lin Date: Mon May 17 13:27:21 2021 +0800 regulator: da9121: Return REGULATOR_MODE_INVALID for invalid mode -EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Fixes: 65ac97042d4e ("regulator: da9121: add mode support") Signed-off-by: Axel Lin Acked-by: Adam Ward Link: https://lore.kernel.org/r/20210517052721.1063375-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit cdf112d4c65f83065793b73b49363123517fdb71 Author: Arnd Bergmann Date: Fri May 14 23:31:14 2021 +0200 ASoC: fsl: fix SND_SOC_IMX_RPMSG dependency Kconfig produces a warning with SND_SOC_FSL_RPMSG=y and SND_IMX_SOC=m: WARNING: unmet direct dependencies detected for SND_SOC_IMX_RPMSG Depends on [m]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && SND_IMX_SOC [=m] && RPMSG [=y] Selected by [y]: - SND_SOC_FSL_RPMSG [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && COMMON_CLK [=y] && RPMSG [=y] && SND_IMX_SOC [=m]!=n Add a dependency to prevent this configuration. Signed-off-by: Arnd Bergmann Acked-by: Shengjiu Wang Link: https://lore.kernel.org/r/20210514213118.630427-1-arnd@kernel.org Signed-off-by: Mark Brown commit 3a010c493271f04578b133de977e0e5dd2848cea Author: Zqiang Date: Mon May 17 11:40:05 2021 +0800 locking/mutex: clear MUTEX_FLAGS if wait_list is empty due to signal When a interruptible mutex locker is interrupted by a signal without acquiring this lock and removed from the wait queue. if the mutex isn't contended enough to have a waiter put into the wait queue again, the setting of the WAITER bit will force mutex locker to go into the slowpath to acquire the lock every time, so if the wait queue is empty, the WAITER bit need to be clear. Fixes: 040a0a371005 ("mutex: Add support for wound/wait style locks") Suggested-by: Peter Zijlstra Signed-off-by: Zqiang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210517034005.30828-1-qiang.zhang@windriver.com commit 89e70d5c583c55088faa2201d397ee30a15704aa Author: Leo Yan Date: Wed May 12 20:09:37 2021 +0800 locking/lockdep: Correct calling tracepoints The commit eb1f00237aca ("lockdep,trace: Expose tracepoints") reverses tracepoints for lock_contended() and lock_acquired(), thus the ftrace log shows the wrong locking sequence that "acquired" event is prior to "contended" event: -0 [001] d.s3 20803.501685: lock_acquire: 0000000008b91ab4 &sg_policy->update_lock -0 [001] d.s3 20803.501686: lock_acquired: 0000000008b91ab4 &sg_policy->update_lock -0 [001] d.s3 20803.501689: lock_contended: 0000000008b91ab4 &sg_policy->update_lock -0 [001] d.s3 20803.501690: lock_release: 0000000008b91ab4 &sg_policy->update_lock This patch fixes calling tracepoints for lock_contended() and lock_acquired(). Fixes: eb1f00237aca ("lockdep,trace: Expose tracepoints") Signed-off-by: Leo Yan Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210512120937.90211-1-leo.yan@linaro.org commit 488e13a489e9707a7e81e1991fdd1f20c0f04689 Author: Like Xu Date: Fri Apr 30 13:22:47 2021 +0800 perf/x86/lbr: Remove cpuc->lbr_xsave allocation from atomic context If the kernel is compiled with the CONFIG_LOCKDEP option, the conditional might_sleep_if() deep in kmem_cache_alloc() will generate the following trace, and potentially cause a deadlock when another LBR event is added: [] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:196 [] Call Trace: [] kmem_cache_alloc+0x36/0x250 [] intel_pmu_lbr_add+0x152/0x170 [] x86_pmu_add+0x83/0xd0 Make it symmetric with the release_lbr_buffers() call and mirror the existing DS buffers. Fixes: c085fb8774 ("perf/x86/intel/lbr: Support XSAVES for arch LBR read") Signed-off-by: Like Xu [peterz: simplified] Signed-off-by: Peter Zijlstra (Intel) Tested-by: Kan Liang Link: https://lkml.kernel.org/r/20210430052247.3079672-2-like.xu@linux.intel.com commit 3317c26a4b413b41364f2c4b83c778c6aba1576d Author: Like Xu Date: Fri Apr 30 13:22:46 2021 +0800 perf/x86: Avoid touching LBR_TOS MSR for Arch LBR The Architecture LBR does not have MSR_LBR_TOS (0x000001c9). In a guest that should support Architecture LBR, check_msr() will be a non-related check for the architecture MSR 0x0 (IA32_P5_MC_ADDR) that is also not supported by KVM. The failure will cause x86_pmu.lbr_nr = 0, thereby preventing the initialization of the guest Arch LBR. Fix it by avoiding this extraneous check in intel_pmu_init() for Arch LBR. Fixes: 47125db27e47 ("perf/x86/intel/lbr: Support Architectural LBR") Signed-off-by: Like Xu [peterz: simpler still] Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210430052247.3079672-1-like.xu@linux.intel.com commit 76d0fc5e9bc650766a90cc3ffd2a29248df0f020 Author: Catalin Marinas Date: Tue May 18 10:08:37 2021 +0100 arm64: Fix stale link in the arch_counter_enforce_ordering() comment With infradead.org archives gone, update the link to lore.kernel.org as these links are deemed stable. Signed-off-by: Catalin Marinas commit 382d91fc0f4f1b13f8a0dcbf7145f4f175b71a18 Author: Bixuan Cui Date: Sat May 8 11:14:51 2021 +0800 iommu/virtio: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Fixes: fa4afd78ea12 ("iommu/virtio: Build virtio-iommu as module") Reviewed-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210508031451.53493-1-cuibixuan@huawei.com Signed-off-by: Joerg Roedel commit a017c567915fd7a017006f8c210e2c6b30ab6fad Author: Nadav Amit Date: Sat May 1 23:59:56 2021 -0700 iommu/amd: Fix wrong parentheses on page-specific invalidations The logic to determine the mask of page-specific invalidations was tested in userspace. As the code was copied into the kernel, the parentheses were mistakenly set in the wrong place, resulting in the wrong mask. Fix it. Cc: Joerg Roedel Cc: Will Deacon Cc: Jiajun Cao Cc: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Fixes: 268aa4548277 ("iommu/amd: Page-specific invalidations for more than one page") Signed-off-by: Nadav Amit Link: https://lore.kernel.org/r/20210502070001.1559127-2-namit@vmware.com Signed-off-by: Joerg Roedel commit d6177a6556f853785867e2ec6d5b7f4906f0d809 Author: Jean-Philippe Brucker Date: Thu Apr 22 11:42:19 2021 +0200 iommu/amd: Clear DMA ops when switching domain Since commit 08a27c1c3ecf ("iommu: Add support to change default domain of an iommu group") a user can switch a device between IOMMU and direct DMA through sysfs. This doesn't work for AMD IOMMU at the moment because dev->dma_ops is not cleared when switching from a DMA to an identity IOMMU domain. The DMA layer thus attempts to use the dma-iommu ops on an identity domain, causing an oops: # echo 0000:00:05.0 > /sys/sys/bus/pci/drivers/e1000e/unbind # echo identity > /sys/bus/pci/devices/0000:00:05.0/iommu_group/type # echo 0000:00:05.0 > /sys/sys/bus/pci/drivers/e1000e/bind ... BUG: kernel NULL pointer dereference, address: 0000000000000028 ... Call Trace: iommu_dma_alloc e1000e_setup_tx_resources e1000e_open Since iommu_change_dev_def_domain() calls probe_finalize() again, clear the dma_ops there like Vt-d does. Fixes: 08a27c1c3ecf ("iommu: Add support to change default domain of an iommu group") Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210422094216.2282097-1-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 4d7b324e231366ea772ab10df46be31273ca39af Author: Tony Lindgren Date: Tue May 18 09:47:23 2021 +0300 bus: ti-sysc: Fix am335x resume hang for usb otg module On am335x, suspend and resume only works once, and the system hangs if suspend is attempted again. However, turns out suspend and resume works fine multiple times if the USB OTG driver for musb controller is loaded. The issue is caused my the interconnect target module losing context during suspend, and it needs a restore on resume to be reconfigure again as debugged earlier by Dave Gerlach . There are also other modules that need a restore on resume, like gpmc as noted by Dave. So let's add a common way to restore an interconnect target module based on a quirk flag. For now, let's enable the quirk for am335x otg only to fix the suspend and resume issue. As gpmc is not causing hangs based on tests with BeagleBone, let's patch gpmc separately. For gpmc, we also need a hardware reset done before restore according to Dave. To reinit the modules, we decouple system suspend from PM runtime. We replace calls to pm_runtime_force_suspend() and pm_runtime_force_resume() with direct calls to internal functions and rely on the driver internal state. There no point trying to handle complex system suspend and resume quirks via PM runtime. This is issue should have already been noticed with commit 1819ef2e2d12 ("bus: ti-sysc: Use swsup quirks also for am335x musb") when quirk handling was added for am335x otg for swsup. But the issue went unnoticed as having musb driver loaded hides the issue, and suspend and resume works once without the driver loaded. Fixes: 1819ef2e2d12 ("bus: ti-sysc: Use swsup quirks also for am335x musb") Suggested-by: Dave Gerlach Signed-off-by: Tony Lindgren commit 4c6fe8c547e3c9e8c15dabdd23c569ee0df3adb1 Author: Takashi Sakamoto Date: Tue May 18 10:26:12 2021 +0900 ALSA: dice: fix stream format for TC Electronic Konnekt Live at high sampling transfer frequency At high sampling transfer frequency, TC Electronic Konnekt Live transfers/receives 6 audio data frames in multi bit linear audio data channel of data block in CIP payload. Current hard-coded stream format is wrong. Cc: Fixes: f1f0f330b1d0 ("ALSA: dice: add parameters of stream formats for models produced by TC Electronic") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518012612.37268-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 9f079c1bdc9087842dc5ac9d81b1d7f2578e81ce Author: Takashi Sakamoto Date: Tue May 18 10:25:10 2021 +0900 ALSA: dice: disable double_pcm_frames mode for M-Audio Profire 610, 2626 and Avid M-Box 3 Pro ALSA dice driver detects jumbo payload at high sampling transfer frequency for below models: * Avid M-Box 3 Pro * M-Audio Profire 610 * M-Audio Profire 2626 Although many DICE-based devices have a quirk at high sampling transfer frequency to multiplex double number of PCM frames into data block than the number in IEC 61883-1/6, the above devices are just compliant to IEC 61883-1/6. This commit disables the mode of double_pcm_frames for the models. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210518012510.37126-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 85ebe5aeef9b0bf4c91ff91652b32f9c54f71d34 Merge: e9aa9c75c58e2 040ab72ee10ea Author: Tony Lindgren Date: Tue May 18 09:45:08 2021 +0300 Merge branch 'fixes-rc1' into fixes commit 040ab72ee10ea88e1883ad143b3e2b77596abc31 Author: Yongqiang Liu Date: Thu Apr 1 13:15:33 2021 +0000 ARM: OMAP2+: Fix build warning when mmc_omap is not built GCC reports the following warning with W=1: arch/arm/mach-omap2/board-n8x0.c:325:19: warning: variable 'index' set but not used [-Wunused-but-set-variable] 325 | int bit, *openp, index; | ^~~~~ Fix this by moving CONFIG_MMC_OMAP to cover the rest codes in the n8x0_mmc_callback(). Signed-off-by: Yongqiang Liu Signed-off-by: Tony Lindgren commit 7c302314f37b44595f180198fca5ca646bce4a5f Author: Maciej Falkowski Date: Thu Apr 1 18:20:32 2021 +0200 ARM: OMAP1: isp1301-omap: Add missing gpiod_add_lookup_table function The gpiod table was added without any usage making it unused as reported by Clang compilation from omap1_defconfig on linux-next: arch/arm/mach-omap1/board-h2.c:347:34: warning: unused variable 'isp1301_gpiod_table' [-Wunused-variable] static struct gpiod_lookup_table isp1301_gpiod_table = { ^ 1 warning generated. The patch adds the missing gpiod_add_lookup_table() function. Signed-off-by: Maciej Falkowski Fixes: f3ef38160e3d ("usb: isp1301-omap: Convert to use GPIO descriptors") Link: https://github.com/ClangBuiltLinux/linux/issues/1325 Signed-off-by: Tony Lindgren commit 3c4e0147c269738a19c7d70cd32395600bcc0714 Author: Maciej Falkowski Date: Thu Apr 1 18:11:27 2021 +0200 ARM: OMAP1: Fix use of possibly uninitialized irq variable The current control flow of IRQ number assignment to `irq` variable allows a request of IRQ of unspecified value, generating a warning under Clang compilation with omap1_defconfig on linux-next: arch/arm/mach-omap1/pm.c:656:11: warning: variable 'irq' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] else if (cpu_is_omap16xx()) ^~~~~~~~~~~~~~~~~ ./arch/arm/mach-omap1/include/mach/soc.h:123:30: note: expanded from macro 'cpu_is_omap16xx' ^~~~~~~~~~~~~ arch/arm/mach-omap1/pm.c:658:18: note: uninitialized use occurs here if (request_irq(irq, omap_wakeup_interrupt, 0, "peripheral wakeup", ^~~ arch/arm/mach-omap1/pm.c:656:7: note: remove the 'if' if its condition is always true else if (cpu_is_omap16xx()) ^~~~~~~~~~~~~~~~~~~~~~ arch/arm/mach-omap1/pm.c:611:9: note: initialize the variable 'irq' to silence this warning int irq; ^ = 0 1 warning generated. The patch provides a default value to the `irq` variable along with a validity check. Signed-off-by: Maciej Falkowski Link: https://github.com/ClangBuiltLinux/linux/issues/1324 Signed-off-by: Tony Lindgren commit 673c7aa2436bfc857b92417f3e590a297c586dde Author: Jens Wiklander Date: Mon Apr 19 18:46:30 2021 +0200 optee: use export_uuid() to copy client UUID Prior to this patch optee_open_session() was making assumptions about the internal format of uuid_t by casting a memory location in a parameter struct to uuid_t *. Fix this using export_uuid() to get a well defined binary representation and also add an octets field in struct optee_msg_param in order to avoid casting. Fixes: c5b4312bea5d ("tee: optee: Add support for session login client UUID generation") Suggested-by: Andy Shevchenko Signed-off-by: Jens Wiklander commit a50c5bebc99c525e7fbc059988c6a5ab8680cb76 Author: Tom Lendacky Date: Mon May 17 12:42:33 2021 -0500 x86/sev-es: Invalidate the GHCB after completing VMGEXIT Since the VMGEXIT instruction can be issued from userspace, invalidate the GHCB after performing VMGEXIT processing in the kernel. Invalidation is only required after userspace is available, so call vc_ghcb_invalidate() from sev_es_put_ghcb(). Update vc_ghcb_invalidate() to additionally clear the GHCB exit code so that it is always presented as 0 when VMGEXIT has been issued by anything else besides the kernel. Fixes: 0786138c78e79 ("x86/sev-es: Add a Runtime #VC Exception Handler") Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/5a8130462e4f0057ee1184509cd056eedd78742b.1621273353.git.thomas.lendacky@amd.com commit fea63d54f7a3e74f8ab489a8b82413a29849a594 Author: Tom Lendacky Date: Mon May 17 12:42:32 2021 -0500 x86/sev-es: Move sev_es_put_ghcb() in prep for follow on patch Move the location of sev_es_put_ghcb() in preparation for an update to it in a follow-on patch. This will better highlight the changes being made to the function. No functional change. Fixes: 0786138c78e79 ("x86/sev-es: Add a Runtime #VC Exception Handler") Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/8c07662ec17d3d82e5c53841a1d9e766d3bdbab6.1621273353.git.thomas.lendacky@amd.com commit 3c91e8efaf4838e4c8e465656e9707b5de26f3db Author: Arnaldo Carvalho de Melo Date: Wed May 12 12:35:07 2021 -0300 tools arch kvm: Sync kvm headers with the kernel sources To pick up the changes from: 70f094f4f01dc4d6 ("KVM: nVMX: Properly pad 'struct kvm_vmx_nested_state_hdr'") That don't entail changes in tooling. This silences these tools/perf build warnings: Warning: Kernel ABI header at 'tools/arch/x86/include/uapi/asm/kvm.h' differs from latest version at 'arch/x86/include/uapi/asm/kvm.h' diff -u tools/arch/x86/include/uapi/asm/kvm.h arch/x86/include/uapi/asm/kvm.h Cc: Paolo Bonzini Cc: Vitaly Kuznetsov Signed-off-by: Arnaldo Carvalho de Melo commit c67d734975a25ba7b6e8f820c13e0d8eb4a2a77c Author: Milian Wolff Date: Thu Apr 29 20:57:59 2021 +0200 perf buildid-list: Initialize zstd_data Fixes segmentation fault when trying to obtain buildid list (e.g. via perf-archive) from a zstd-compressed `perf.data` file: ``` $ perf record -z ls ... [ perf record: Captured and wrote 0,010 MB perf.data, compressed (original 0,001 MB, ratio is 2,190) ] $ memcheck perf buildid-list ... ==57268== Invalid read of size 4 ==57268== at 0x5260D88: ZSTD_decompressStream (in /usr/lib/libzstd.so.1.4.9) ==57268== by 0x4BB51B: zstd_decompress_stream (zstd.c:100) ==57268== by 0x425C6C: perf_session__process_compressed_event (session.c:73) ==57268== by 0x427450: perf_session__process_user_event (session.c:1631) ==57268== by 0x42A609: reader__process_events (session.c:2207) ==57268== by 0x42A609: __perf_session__process_events (session.c:2264) ==57268== by 0x42A609: perf_session__process_events (session.c:2297) ==57268== by 0x343A62: perf_session__list_build_ids (builtin-buildid-list.c:88) ==57268== by 0x343A62: cmd_buildid_list (builtin-buildid-list.c:120) ==57268== by 0x3C7732: run_builtin (perf.c:313) ==57268== by 0x331157: handle_internal_command (perf.c:365) ==57268== by 0x331157: run_argv (perf.c:409) ==57268== by 0x331157: main (perf.c:539) ==57268== Address 0x7470 is not stack'd, malloc'd or (recently) free'd ``` Signed-off-by: Milian Wolff Cc: Alexey Budankov Link: http://lore.kernel.org/lkml/20210429185759.59870-1-milian.wolff@kdab.com Signed-off-by: Arnaldo Carvalho de Melo commit f0fb26c456a30d6009faa2c9d44aa22f5bf88c90 Author: Chu Lin Date: Mon May 17 22:26:06 2021 +0000 hwmon/pmbus: (q54sj108a2) The PMBUS_MFR_ID is actually 6 chars instead of 5 The PMBUS_MFR_ID block is actually 6 chars for q54sj108a2. /sys/bus/i2c/drivers/q54sj108a2_test# iotools smbus_read8 $BUS $ADDR 0x99 0x06 Tested: Devices are able to bind to the q54sj108a2 driver successfully. Signed-off-by: Chu Lin Link: https://lore.kernel.org/r/20210517222606.3457594-1-linchuyuan@google.com Signed-off-by: Guenter Roeck commit 1dde47a66d4fb181830d6fa000e5ea86907b639e Author: Dan Carpenter Date: Mon May 17 12:04:13 2021 +0300 net: mdiobus: get rid of a BUG_ON() We spotted a bug recently during a review where a driver was unregistering a bus that wasn't registered, which would trigger this BUG_ON(). Let's handle that situation more gracefully, and just print a warning and return. Reported-by: Russell King (Oracle) Signed-off-by: Dan Carpenter Reviewed-by: Russell King (Oracle) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 37781fd24f34ce938072f192def8f8d49f382df8 Merge: 1d482e666b8e7 fbd4a28b4fa66 Author: David S. Miller Date: Mon May 17 15:38:40 2021 -0700 Merge branch 'gve-fixes' David Awogbemila says: ==================== GVE bug fixes This patch series includes fixes to some bugs in the gve driver. ==================== Signed-off-by: David S. Miller commit fbd4a28b4fa66faaa7f510c0adc531d37e0a7848 Author: David Awogbemila Date: Mon May 17 14:08:15 2021 -0700 gve: Correct SKB queue index validation. SKBs with skb_get_queue_mapping(skb) == tx_cfg.num_queues should also be considered invalid. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: David Awogbemila Acked-by: Willem de Brujin Signed-off-by: David S. Miller commit f81781835f0adfae8d701545386030d223efcd6f Author: Catherine Sullivan Date: Mon May 17 14:08:14 2021 -0700 gve: Upgrade memory barrier in poll routine As currently written, if the driver checks for more work (via gve_tx_poll or gve_rx_poll) before the device posts work and the irq doorbell is not unmasked (via iowrite32be(GVE_IRQ_ACK | GVE_IRQ_EVENT, ...)) before the device attempts to raise an interrupt, an interrupt is lost and this could potentially lead to the traffic being completely halted. For example, if a tx queue has already been stopped, the driver won't get the chance to complete work and egress will be halted. We need a full memory barrier in the poll routine to ensure that the irq doorbell is unmasked before the driver checks for more work. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: Catherine Sullivan Signed-off-by: David Awogbemila Acked-by: Willem de Brujin Signed-off-by: David S. Miller commit 5218e919c8d06279884aa0baf76778a6817d5b93 Author: David Awogbemila Date: Mon May 17 14:08:13 2021 -0700 gve: Add NULL pointer checks when freeing irqs. When freeing notification blocks, we index priv->msix_vectors. If we failed to allocate priv->msix_vectors (see abort_with_msix_vectors) this could lead to a NULL pointer dereference if the driver is unloaded. Fixes: 893ce44df565 ("gve: Add basic driver framework for Compute Engine Virtual NIC") Signed-off-by: David Awogbemila Acked-by: Willem de Brujin Signed-off-by: David S. Miller commit e96b491a0ffa35a8a9607c193fa4d894ca9fb32f Author: David Awogbemila Date: Mon May 17 14:08:12 2021 -0700 gve: Update mgmt_msix_idx if num_ntfy changes If we do not get the expected number of vectors from pci_enable_msix_range, we update priv->num_ntfy_blks but not priv->mgmt_msix_idx. This patch fixes this so that priv->mgmt_msix_idx is updated accordingly. Fixes: f5cedc84a30d ("gve: Add transmit and receive support") Signed-off-by: David Awogbemila Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 5aec55b46c6238506cdf0c60cd0e42ab77a1e5e0 Author: Catherine Sullivan Date: Mon May 17 14:08:11 2021 -0700 gve: Check TX QPL was actually assigned Correctly check the TX QPL was assigned and unassigned if other steps in the allocation fail. Fixes: f5cedc84a30d (gve: Add transmit and receive support) Signed-off-by: Catherine Sullivan Signed-off-by: David Awogbemila Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit 1d482e666b8e74c7555dbdfbfb77205eeed3ff2d Author: Johannes Berg Date: Mon May 17 16:38:09 2021 +0200 netlink: disable IRQs for netlink_lock_table() Syzbot reports that in mac80211 we have a potential deadlock between our "local->stop_queue_reasons_lock" (spinlock) and netlink's nl_table_lock (rwlock). This is because there's at least one situation in which we might try to send a netlink message with this spinlock held while it is also possible to take the spinlock from a hardirq context, resulting in the following deadlock scenario reported by lockdep: CPU0 CPU1 ---- ---- lock(nl_table_lock); local_irq_disable(); lock(&local->queue_stop_reason_lock); lock(nl_table_lock); lock(&local->queue_stop_reason_lock); This seems valid, we can take the queue_stop_reason_lock in any kind of context ("CPU0"), and call ieee80211_report_ack_skb() with the spinlock held and IRQs disabled ("CPU1") in some code path (ieee80211_do_stop() via ieee80211_free_txskb()). Short of disallowing netlink use in scenarios like these (which would be rather complex in mac80211's case due to the deep callchain), it seems the only fix for this is to disable IRQs while nl_table_lock is held to avoid hitting this scenario, this disallows the "CPU0" portion of the reported deadlock. Note that the writer side (netlink_table_grab()) already disables IRQs for this lock. Unfortunately though, this seems like a huge hammer, and maybe the whole netlink table locking should be reworked. Reported-by: syzbot+69ff9dff50dcfe14ddd4@syzkaller.appspotmail.com Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit 444d7be9532dcfda8e0385226c862fd7e986f607 Author: Julian Wiedmann Date: Mon May 17 10:47:06 2021 +0200 net/smc: remove device from smcd_dev_list after failed device_add() If the device_add() for a smcd_dev fails, there's no cleanup step that rolls back the earlier list_add(). The device subsequently gets freed, and we end up with a corrupted list. Add some error handling that removes the device from the list. Fixes: c6ba7c9ba43d ("net/smc: add base infrastructure for SMC-D and ISM") Signed-off-by: Julian Wiedmann Signed-off-by: Karsten Graul Signed-off-by: David S. Miller commit 35d96e631860226d5dc4de0fad0a415362ec2457 Author: Johannes Berg Date: Mon May 17 16:13:35 2021 +0200 bonding: init notify_work earlier to avoid uninitialized use If bond_kobj_init() or later kzalloc() in bond_alloc_slave() fail, then we call kobject_put() on the slave->kobj. This in turn calls the release function slave_kobj_release() which will always try to cancel_delayed_work_sync(&slave->notify_work), which shouldn't be done on an uninitialized work struct. Always initialize the work struct earlier to avoid problems here. Syzbot bisected this down to a completely pointless commit, some fault injection may have been at work here that caused the alloc failure in the first place, which may interact badly with bisect. Reported-by: syzbot+bfda097c12a00c8cae67@syzkaller.appspotmail.com Signed-off-by: Johannes Berg Acked-by: Jay Vosburgh Signed-off-by: David S. Miller commit 3c814519743a919f8b3c236c0565e24709806d66 Author: Krzysztof Kozlowski Date: Mon May 17 10:19:54 2021 -0400 MAINTAINERS: net: remove stale website link The http://www.linuxfoundation.org/en/Net does not contain networking subsystem description ("Nothing found"). Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit c17611592d9635c443bedc9be901f4463f45c6d5 Author: Rob Herring Date: Mon May 10 15:45:24 2021 -0500 dt-bindings: More removals of type references on common properties Users of common properties shouldn't have a type definition as the common schemas already have one. A few new ones slipped in and *-names was missed in the last clean-up pass. Drop all the unnecessary type references in the tree. A meta-schema update to catch these is pending. Cc: Stephen Boyd Cc: Olivier Moysan Cc: Arnaud Pouliquen Cc: Lars-Peter Clausen Cc: Dmitry Torokhov Cc: Bjorn Andersson Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Liam Girdwood Cc: Fabrice Gasnier Cc: Odelu Kukatla Cc: Alex Elder Cc: Shengjiu Wang Cc: linux-clk@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-iio@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-input@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Mark Brown Acked-by: Georgi Djakov Reviewed-by: Luca Ceresoli Acked-by: Jonathan Cameron Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/20210510204524.617390-1-robh@kernel.org commit 4710ccc52e8e504a5617a889843a18cd06f1ab72 Author: Rob Herring Date: Mon May 10 15:35:14 2021 -0500 dt-bindings: media: renesas,drif: Use graph schema Convert the renesas,drif binding schema to use the graph schema. The binding referred to video-interfaces.txt, but it doesn't actually use any properties from it as 'sync-active' is a custom property. As 'sync-active' is custom, it needs a type definition. Cc: Mauro Carvalho Chehab Cc: Ramesh Shanmugasundaram Cc: linux-media@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Fabrizio Castro Link: https://lore.kernel.org/r/20210510203514.603471-1-robh@kernel.org commit 04c26faa51d1e2fe71cf13c45791f5174c37f986 Author: Xin Long Date: Mon May 17 02:28:58 2021 +0800 tipc: wait and exit until all work queues are done On some host, a crash could be triggered simply by repeating these commands several times: # modprobe tipc # tipc bearer enable media udp name UDP1 localip 127.0.0.1 # rmmod tipc [] BUG: unable to handle kernel paging request at ffffffffc096bb00 [] Workqueue: events 0xffffffffc096bb00 [] Call Trace: [] ? process_one_work+0x1a7/0x360 [] ? worker_thread+0x30/0x390 [] ? create_worker+0x1a0/0x1a0 [] ? kthread+0x116/0x130 [] ? kthread_flush_work_fn+0x10/0x10 [] ? ret_from_fork+0x35/0x40 When removing the TIPC module, the UDP tunnel sock will be delayed to release in a work queue as sock_release() can't be done in rtnl_lock(). If the work queue is schedule to run after the TIPC module is removed, kernel will crash as the work queue function cleanup_beareri() code no longer exists when trying to invoke it. To fix it, this patch introduce a member wq_count in tipc_net to track the numbers of work queues in schedule, and wait and exit until all work queues are done in tipc_exit_net(). Fixes: d0f91938bede ("tipc: add ip/udp media type") Reported-by: Shuang Li Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit 020ef930b826d21c5446fdc9db80fd72a791bc21 Author: Taehee Yoo Date: Sun May 16 14:44:42 2021 +0000 mld: fix panic in mld_newpack() mld_newpack() doesn't allow to allocate high order page, only order-0 allocation is allowed. If headroom size is too large, a kernel panic could occur in skb_put(). Test commands: ip netns del A ip netns del B ip netns add A ip netns add B ip link add veth0 type veth peer name veth1 ip link set veth0 netns A ip link set veth1 netns B ip netns exec A ip link set lo up ip netns exec A ip link set veth0 up ip netns exec A ip -6 a a 2001:db8:0::1/64 dev veth0 ip netns exec B ip link set lo up ip netns exec B ip link set veth1 up ip netns exec B ip -6 a a 2001:db8:0::2/64 dev veth1 for i in {1..99} do let A=$i-1 ip netns exec A ip link add ip6gre$i type ip6gre \ local 2001:db8:$A::1 remote 2001:db8:$A::2 encaplimit 100 ip netns exec A ip -6 a a 2001:db8:$i::1/64 dev ip6gre$i ip netns exec A ip link set ip6gre$i up ip netns exec B ip link add ip6gre$i type ip6gre \ local 2001:db8:$A::2 remote 2001:db8:$A::1 encaplimit 100 ip netns exec B ip -6 a a 2001:db8:$i::2/64 dev ip6gre$i ip netns exec B ip link set ip6gre$i up done Splat looks like: kernel BUG at net/core/skbuff.c:110! invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN PTI CPU: 0 PID: 7 Comm: kworker/0:1 Not tainted 5.12.0+ #891 Workqueue: ipv6_addrconf addrconf_dad_work RIP: 0010:skb_panic+0x15d/0x15f Code: 92 fe 4c 8b 4c 24 10 53 8b 4d 70 45 89 e0 48 c7 c7 00 ae 79 83 41 57 41 56 41 55 48 8b 54 24 a6 26 f9 ff <0f> 0b 48 8b 6c 24 20 89 34 24 e8 4a 4e 92 fe 8b 34 24 48 c7 c1 20 RSP: 0018:ffff88810091f820 EFLAGS: 00010282 RAX: 0000000000000089 RBX: ffff8881086e9000 RCX: 0000000000000000 RDX: 0000000000000089 RSI: 0000000000000008 RDI: ffffed1020123efb RBP: ffff888005f6eac0 R08: ffffed1022fc0031 R09: ffffed1022fc0031 R10: ffff888117e00187 R11: ffffed1022fc0030 R12: 0000000000000028 R13: ffff888008284eb0 R14: 0000000000000ed8 R15: 0000000000000ec0 FS: 0000000000000000(0000) GS:ffff888117c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8b801c5640 CR3: 0000000033c2c006 CR4: 00000000003706f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? ip6_mc_hdr.isra.26.constprop.46+0x12a/0x600 ? ip6_mc_hdr.isra.26.constprop.46+0x12a/0x600 skb_put.cold.104+0x22/0x22 ip6_mc_hdr.isra.26.constprop.46+0x12a/0x600 ? rcu_read_lock_sched_held+0x91/0xc0 mld_newpack+0x398/0x8f0 ? ip6_mc_hdr.isra.26.constprop.46+0x600/0x600 ? lock_contended+0xc40/0xc40 add_grhead.isra.33+0x280/0x380 add_grec+0x5ca/0xff0 ? mld_sendpack+0xf40/0xf40 ? lock_downgrade+0x690/0x690 mld_send_initial_cr.part.34+0xb9/0x180 ipv6_mc_dad_complete+0x15d/0x1b0 addrconf_dad_completed+0x8d2/0xbb0 ? lock_downgrade+0x690/0x690 ? addrconf_rs_timer+0x660/0x660 ? addrconf_dad_work+0x73c/0x10e0 addrconf_dad_work+0x73c/0x10e0 Allowing high order page allocation could fix this problem. Fixes: 72e09ad107e7 ("ipv6: avoid high order allocations") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 9f6f852550d0e1b7735651228116ae9d300f69b3 Author: Zheyu Ma Date: Sun May 16 07:11:40 2021 +0000 isdn: mISDN: netjet: Fix crash in nj_probe: 'nj_setup' in netjet.c might fail with -EIO and in this case 'card->irq' is initialized and is bigger than zero. A subsequent call to 'nj_release' will free the irq that has not been requested. Fix this bug by deleting the previous assignment to 'card->irq' and just keep the assignment before 'request_irq'. The KASAN's log reveals it: [ 3.354615 ] WARNING: CPU: 0 PID: 1 at kernel/irq/manage.c:1826 free_irq+0x100/0x480 [ 3.355112 ] Modules linked in: [ 3.355310 ] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-rc1-00144-g25a1298726e #13 [ 3.355816 ] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 3.356552 ] RIP: 0010:free_irq+0x100/0x480 [ 3.356820 ] Code: 6e 08 74 6f 4d 89 f4 e8 5e ac 09 00 4d 8b 74 24 18 4d 85 f6 75 e3 e8 4f ac 09 00 8b 75 c8 48 c7 c7 78 c1 2e 85 e8 e0 cf f5 ff <0f> 0b 48 8b 75 c0 4c 89 ff e8 72 33 0b 03 48 8b 43 40 4c 8b a0 80 [ 3.358012 ] RSP: 0000:ffffc90000017b48 EFLAGS: 00010082 [ 3.358357 ] RAX: 0000000000000000 RBX: ffff888104dc8000 RCX: 0000000000000000 [ 3.358814 ] RDX: ffff8881003c8000 RSI: ffffffff8124a9e6 RDI: 00000000ffffffff [ 3.359272 ] RBP: ffffc90000017b88 R08: 0000000000000000 R09: 0000000000000000 [ 3.359732 ] R10: ffffc900000179f0 R11: 0000000000001d04 R12: 0000000000000000 [ 3.360195 ] R13: ffff888107dc6000 R14: ffff888107dc6928 R15: ffff888104dc80a8 [ 3.360652 ] FS: 0000000000000000(0000) GS:ffff88817bc00000(0000) knlGS:0000000000000000 [ 3.361170 ] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3.361538 ] CR2: 0000000000000000 CR3: 000000000582e000 CR4: 00000000000006f0 [ 3.362003 ] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 3.362175 ] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 3.362175 ] Call Trace: [ 3.362175 ] nj_release+0x51/0x1e0 [ 3.362175 ] nj_probe+0x450/0x950 [ 3.362175 ] ? pci_device_remove+0x110/0x110 [ 3.362175 ] local_pci_probe+0x45/0xa0 [ 3.362175 ] pci_device_probe+0x12b/0x1d0 [ 3.362175 ] really_probe+0x2a9/0x610 [ 3.362175 ] driver_probe_device+0x90/0x1d0 [ 3.362175 ] ? mutex_lock_nested+0x1b/0x20 [ 3.362175 ] device_driver_attach+0x68/0x70 [ 3.362175 ] __driver_attach+0x124/0x1b0 [ 3.362175 ] ? device_driver_attach+0x70/0x70 [ 3.362175 ] bus_for_each_dev+0xbb/0x110 [ 3.362175 ] ? rdinit_setup+0x45/0x45 [ 3.362175 ] driver_attach+0x27/0x30 [ 3.362175 ] bus_add_driver+0x1eb/0x2a0 [ 3.362175 ] driver_register+0xa9/0x180 [ 3.362175 ] __pci_register_driver+0x82/0x90 [ 3.362175 ] ? w6692_init+0x38/0x38 [ 3.362175 ] nj_init+0x36/0x38 [ 3.362175 ] do_one_initcall+0x7f/0x3d0 [ 3.362175 ] ? rdinit_setup+0x45/0x45 [ 3.362175 ] ? rcu_read_lock_sched_held+0x4f/0x80 [ 3.362175 ] kernel_init_freeable+0x2aa/0x301 [ 3.362175 ] ? rest_init+0x2c0/0x2c0 [ 3.362175 ] kernel_init+0x18/0x190 [ 3.362175 ] ? rest_init+0x2c0/0x2c0 [ 3.362175 ] ? rest_init+0x2c0/0x2c0 [ 3.362175 ] ret_from_fork+0x1f/0x30 [ 3.362175 ] Kernel panic - not syncing: panic_on_warn set ... [ 3.362175 ] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.13.0-rc1-00144-g25a1298726e #13 [ 3.362175 ] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 [ 3.362175 ] Call Trace: [ 3.362175 ] dump_stack+0xba/0xf5 [ 3.362175 ] ? free_irq+0x100/0x480 [ 3.362175 ] panic+0x15a/0x3f2 [ 3.362175 ] ? __warn+0xf2/0x150 [ 3.362175 ] ? free_irq+0x100/0x480 [ 3.362175 ] __warn+0x108/0x150 [ 3.362175 ] ? free_irq+0x100/0x480 [ 3.362175 ] report_bug+0x119/0x1c0 [ 3.362175 ] handle_bug+0x3b/0x80 [ 3.362175 ] exc_invalid_op+0x18/0x70 [ 3.362175 ] asm_exc_invalid_op+0x12/0x20 [ 3.362175 ] RIP: 0010:free_irq+0x100/0x480 [ 3.362175 ] Code: 6e 08 74 6f 4d 89 f4 e8 5e ac 09 00 4d 8b 74 24 18 4d 85 f6 75 e3 e8 4f ac 09 00 8b 75 c8 48 c7 c7 78 c1 2e 85 e8 e0 cf f5 ff <0f> 0b 48 8b 75 c0 4c 89 ff e8 72 33 0b 03 48 8b 43 40 4c 8b a0 80 [ 3.362175 ] RSP: 0000:ffffc90000017b48 EFLAGS: 00010082 [ 3.362175 ] RAX: 0000000000000000 RBX: ffff888104dc8000 RCX: 0000000000000000 [ 3.362175 ] RDX: ffff8881003c8000 RSI: ffffffff8124a9e6 RDI: 00000000ffffffff [ 3.362175 ] RBP: ffffc90000017b88 R08: 0000000000000000 R09: 0000000000000000 [ 3.362175 ] R10: ffffc900000179f0 R11: 0000000000001d04 R12: 0000000000000000 [ 3.362175 ] R13: ffff888107dc6000 R14: ffff888107dc6928 R15: ffff888104dc80a8 [ 3.362175 ] ? vprintk+0x76/0x150 [ 3.362175 ] ? free_irq+0x100/0x480 [ 3.362175 ] nj_release+0x51/0x1e0 [ 3.362175 ] nj_probe+0x450/0x950 [ 3.362175 ] ? pci_device_remove+0x110/0x110 [ 3.362175 ] local_pci_probe+0x45/0xa0 [ 3.362175 ] pci_device_probe+0x12b/0x1d0 [ 3.362175 ] really_probe+0x2a9/0x610 [ 3.362175 ] driver_probe_device+0x90/0x1d0 [ 3.362175 ] ? mutex_lock_nested+0x1b/0x20 [ 3.362175 ] device_driver_attach+0x68/0x70 [ 3.362175 ] __driver_attach+0x124/0x1b0 [ 3.362175 ] ? device_driver_attach+0x70/0x70 [ 3.362175 ] bus_for_each_dev+0xbb/0x110 [ 3.362175 ] ? rdinit_setup+0x45/0x45 [ 3.362175 ] driver_attach+0x27/0x30 [ 3.362175 ] bus_add_driver+0x1eb/0x2a0 [ 3.362175 ] driver_register+0xa9/0x180 [ 3.362175 ] __pci_register_driver+0x82/0x90 [ 3.362175 ] ? w6692_init+0x38/0x38 [ 3.362175 ] nj_init+0x36/0x38 [ 3.362175 ] do_one_initcall+0x7f/0x3d0 [ 3.362175 ] ? rdinit_setup+0x45/0x45 [ 3.362175 ] ? rcu_read_lock_sched_held+0x4f/0x80 [ 3.362175 ] kernel_init_freeable+0x2aa/0x301 [ 3.362175 ] ? rest_init+0x2c0/0x2c0 [ 3.362175 ] kernel_init+0x18/0x190 [ 3.362175 ] ? rest_init+0x2c0/0x2c0 [ 3.362175 ] ? rest_init+0x2c0/0x2c0 [ 3.362175 ] ret_from_fork+0x1f/0x30 [ 3.362175 ] Dumping ftrace buffer: [ 3.362175 ] (ftrace buffer empty) [ 3.362175 ] Kernel Offset: disabled [ 3.362175 ] Rebooting in 1 seconds.. Reported-by: Zheyu Ma Signed-off-by: Zheyu Ma Signed-off-by: David S. Miller commit 3aa21e799419c3f10f52273a30bfa3c77492ea3f Merge: 28c66b6da4087 702279d2ce465 Author: David S. Miller Date: Mon May 17 13:59:45 2021 -0700 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: 2 bug fixes. The first one fixes a bug to properly identify some recently added HyperV device IDs. The second one fixes device context memory set up on systems with 64K page size. Please queue these for -stable as well. Thanks. ==================== Signed-off-by: David S. Miller commit 702279d2ce4650000bb6302013630304e359dc13 Author: Michael Chan Date: Sat May 15 03:25:19 2021 -0400 bnxt_en: Fix context memory setup for 64K page size. There was a typo in the code that checks for 64K BNXT_PAGE_SHIFT in bnxt_hwrm_set_pg_attr(). Fix it and make the code more understandable with a new macro BNXT_SET_CTX_PAGE_ATTR(). Fixes: 1b9394e5a2ad ("bnxt_en: Configure context memory on new devices.") Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ab21494be9dc7d62736c5fcd06be65d49df713ee Author: Andy Gospodarek Date: Sat May 15 03:25:18 2021 -0400 bnxt_en: Include new P5 HV definition in VF check. Otherwise, some of the recently added HyperV VF IDs would not be recognized as VF devices and they would not initialize properly. Fixes: 7fbf359bb2c1 ("bnxt_en: Add PCI IDs for Hyper-V VF devices.") Reviewed-by: Edwin Peer Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 28c66b6da4087b8cfe81c2ec0a46eb6116dafda9 Author: Zhen Lei Date: Sat May 15 15:16:05 2021 +0800 net: bnx2: Fix error return code in bnx2_init_board() Fix to return -EPERM from the error handling case instead of 0, as done elsewhere in this function. Fixes: b6016b767397 ("[BNX2]: New Broadcom gigabit network driver.") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Reviewed-by: Michael Chan Signed-off-by: David S. Miller commit e0652f8bb44d6294eeeac06d703185357f25d50b Author: Dongliang Mu Date: Sat May 15 07:29:06 2021 +0800 NFC: nci: fix memory leak in nci_allocate_device nfcmrvl_disconnect fails to free the hci_dev field in struct nci_dev. Fix this by freeing hci_dev in nci_free_device. BUG: memory leak unreferenced object 0xffff888111ea6800 (size 1024): comm "kworker/1:0", pid 19, jiffies 4294942308 (age 13.580s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 60 fd 0c 81 88 ff ff .........`...... 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000004bc25d43>] kmalloc include/linux/slab.h:552 [inline] [<000000004bc25d43>] kzalloc include/linux/slab.h:682 [inline] [<000000004bc25d43>] nci_hci_allocate+0x21/0xd0 net/nfc/nci/hci.c:784 [<00000000c59cff92>] nci_allocate_device net/nfc/nci/core.c:1170 [inline] [<00000000c59cff92>] nci_allocate_device+0x10b/0x160 net/nfc/nci/core.c:1132 [<00000000006e0a8e>] nfcmrvl_nci_register_dev+0x10a/0x1c0 drivers/nfc/nfcmrvl/main.c:153 [<000000004da1b57e>] nfcmrvl_probe+0x223/0x290 drivers/nfc/nfcmrvl/usb.c:345 [<00000000d506aed9>] usb_probe_interface+0x177/0x370 drivers/usb/core/driver.c:396 [<00000000bc632c92>] really_probe+0x159/0x4a0 drivers/base/dd.c:554 [<00000000f5009125>] driver_probe_device+0x84/0x100 drivers/base/dd.c:740 [<000000000ce658ca>] __device_attach_driver+0xee/0x110 drivers/base/dd.c:846 [<000000007067d05f>] bus_for_each_drv+0xb7/0x100 drivers/base/bus.c:431 [<00000000f8e13372>] __device_attach+0x122/0x250 drivers/base/dd.c:914 [<000000009cf68860>] bus_probe_device+0xc6/0xe0 drivers/base/bus.c:491 [<00000000359c965a>] device_add+0x5be/0xc30 drivers/base/core.c:3109 [<00000000086e4bd3>] usb_set_configuration+0x9d9/0xb90 drivers/usb/core/message.c:2164 [<00000000ca036872>] usb_generic_driver_probe+0x8c/0xc0 drivers/usb/core/generic.c:238 [<00000000d40d36f6>] usb_probe_device+0x5c/0x140 drivers/usb/core/driver.c:293 [<00000000bc632c92>] really_probe+0x159/0x4a0 drivers/base/dd.c:554 Reported-by: syzbot+19bcfc64a8df1318d1c3@syzkaller.appspotmail.com Fixes: 11f54f228643 ("NFC: nci: Add HCI over NCI protocol support") Signed-off-by: Dongliang Mu Signed-off-by: David S. Miller commit 31db0dbd72444abe645d90c20ecb84d668f5af5e Author: Dan Carpenter Date: Fri May 14 17:24:48 2021 +0300 net: hso: check for allocation failure in hso_create_bulk_serial_device() In current kernels, small allocations never actually fail so this patch shouldn't affect runtime. Originally this error handling code written with the idea that if the "serial->tiocmget" allocation failed, then we would continue operating instead of bailing out early. But in later years we added an unchecked dereference on the next line. serial->tiocmget->serial_state_notification = kzalloc(); ^^^^^^^^^^^^^^^^^^ Since these allocations are never going fail in real life, this is mostly a philosophical debate, but I think bailing out early is the correct behavior that the user would want. And generally it's safer to bail as soon an error happens. Fixes: af0de1303c4e ("usb: hso: obey DMA rules in tiocmget") Signed-off-by: Dan Carpenter Reviewed-by: Johan Hovold Signed-off-by: David S. Miller commit b7df21cf1b79ab7026f545e7bf837bd5750ac026 Author: Xin Long Date: Sat May 8 03:57:03 2021 +0800 tipc: skb_linearize the head skb when reassembling msgs It's not a good idea to append the frag skb to a skb's frag_list if the frag_list already has skbs from elsewhere, such as this skb was created by pskb_copy() where the frag_list was cloned (all the skbs in it were skb_get'ed) and shared by multiple skbs. However, the new appended frag skb should have been only seen by the current skb. Otherwise, it will cause use after free crashes as this appended frag skb are seen by multiple skbs but it only got skb_get called once. The same thing happens with a skb updated by pskb_may_pull() with a skb_cloned skb. Li Shuang has reported quite a few crashes caused by this when doing testing over macvlan devices: [] kernel BUG at net/core/skbuff.c:1970! [] Call Trace: [] skb_clone+0x4d/0xb0 [] macvlan_broadcast+0xd8/0x160 [macvlan] [] macvlan_process_broadcast+0x148/0x150 [macvlan] [] process_one_work+0x1a7/0x360 [] worker_thread+0x30/0x390 [] kernel BUG at mm/usercopy.c:102! [] Call Trace: [] __check_heap_object+0xd3/0x100 [] __check_object_size+0xff/0x16b [] simple_copy_to_iter+0x1c/0x30 [] __skb_datagram_iter+0x7d/0x310 [] __skb_datagram_iter+0x2a5/0x310 [] skb_copy_datagram_iter+0x3b/0x90 [] tipc_recvmsg+0x14a/0x3a0 [tipc] [] ____sys_recvmsg+0x91/0x150 [] ___sys_recvmsg+0x7b/0xc0 [] kernel BUG at mm/slub.c:305! [] Call Trace: [] [] kmem_cache_free+0x3ff/0x400 [] __netif_receive_skb_core+0x12c/0xc40 [] ? kmem_cache_alloc+0x12e/0x270 [] netif_receive_skb_internal+0x3d/0xb0 [] ? get_rx_page_info+0x8e/0xa0 [be2net] [] be_poll+0x6ef/0xd00 [be2net] [] ? irq_exit+0x4f/0x100 [] net_rx_action+0x149/0x3b0 ... This patch is to fix it by linearizing the head skb if it has frag_list set in tipc_buf_append(). Note that we choose to do this before calling skb_unshare(), as __skb_linearize() will avoid skb_copy(). Also, we can not just drop the frag_list either as the early time. Fixes: 45c8b7b175ce ("tipc: allow non-linear first fragment buffer") Reported-by: Li Shuang Signed-off-by: Xin Long Acked-by: Jon Maloy Signed-off-by: David S. Miller commit b4764905ea5b2e5314ef3aed96e1c5a5df9318c2 Merge: d07f6ca923ea0 fbb80d5ad400a Author: Thomas Gleixner Date: Mon May 17 19:57:47 2021 +0200 Merge tag 'irqchip-fixes-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Pull irqchip fixes from Marc Zyngier: - Fix PXA Mainstone CPLD irq allocation in legacy mode - Restrict the Apple AIC controller to the Apple platform - Remove a few supperfluous messages on devm_ioremap_resource() failure Link: https://lore.kernel.org/r/20210516122217.13234-1-maz@kernel.org commit 8ac91e6c6033ebc12c5c1e4aa171b81a662bd70f Merge: d07f6ca923ea0 54a40fc3a1da2 Author: Linus Torvalds Date: Mon May 17 09:55:10 2021 -0700 Merge tag 'for-5.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "A few more fixes: - fix fiemap to print extents that could get misreported due to internal extent splitting and logical merging for fiemap output - fix RCU stalls during delayed iputs - fix removed dentries still existing after log is synced" * tag 'for-5.13-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: fix removed dentries still existing after log is synced btrfs: return whole extents in fiemap btrfs: avoid RCU stalls while running delayed iputs btrfs: return 0 for dev_extent_hole_check_zoned hole_start in case of error commit dc07628bd2bbc1da768e265192c28ebd301f509d Author: Leon Romanovsky Date: Tue May 11 08:48:31 2021 +0300 RDMA/rxe: Return CQE error if invalid lkey was supplied RXE is missing update of WQE status in LOCAL_WRITE failures. This caused the following kernel panic if someone sent an atomic operation with an explicitly wrong lkey. [leonro@vm ~]$ mkt test test_atomic_invalid_lkey (tests.test_atomic.AtomicTest) ... WARNING: CPU: 5 PID: 263 at drivers/infiniband/sw/rxe/rxe_comp.c:740 rxe_completer+0x1a6d/0x2e30 [rdma_rxe] Modules linked in: crc32_generic rdma_rxe ip6_udp_tunnel udp_tunnel rdma_ucm rdma_cm ib_umad ib_ipoib iw_cm ib_cm mlx5_ib ib_uverbs ib_core mlx5_core ptp pps_core CPU: 5 PID: 263 Comm: python3 Not tainted 5.13.0-rc1+ #2936 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:rxe_completer+0x1a6d/0x2e30 [rdma_rxe] Code: 03 0f 8e 65 0e 00 00 3b 93 10 06 00 00 0f 84 82 0a 00 00 4c 89 ff 4c 89 44 24 38 e8 2d 74 a9 e1 4c 8b 44 24 38 e9 1c f5 ff ff <0f> 0b e9 0c e8 ff ff b8 05 00 00 00 41 bf 05 00 00 00 e9 ab e7 ff RSP: 0018:ffff8880158af090 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff888016a78000 RCX: ffffffffa0cf1652 RDX: 1ffff9200004b442 RSI: 0000000000000004 RDI: ffffc9000025a210 RBP: dffffc0000000000 R08: 00000000ffffffea R09: ffff88801617740b R10: ffffed1002c2ee81 R11: 0000000000000007 R12: ffff88800f3b63e8 R13: ffff888016a78008 R14: ffffc9000025a180 R15: 000000000000000c FS: 00007f88b622a740(0000) GS:ffff88806d540000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f88b5a1fa10 CR3: 000000000d848004 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rxe_do_task+0x130/0x230 [rdma_rxe] rxe_rcv+0xb11/0x1df0 [rdma_rxe] rxe_loopback+0x157/0x1e0 [rdma_rxe] rxe_responder+0x5532/0x7620 [rdma_rxe] rxe_do_task+0x130/0x230 [rdma_rxe] rxe_rcv+0x9c8/0x1df0 [rdma_rxe] rxe_loopback+0x157/0x1e0 [rdma_rxe] rxe_requester+0x1efd/0x58c0 [rdma_rxe] rxe_do_task+0x130/0x230 [rdma_rxe] rxe_post_send+0x998/0x1860 [rdma_rxe] ib_uverbs_post_send+0xd5f/0x1220 [ib_uverbs] ib_uverbs_write+0x847/0xc80 [ib_uverbs] vfs_write+0x1c5/0x840 ksys_write+0x176/0x1d0 do_syscall_64+0x3f/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/11e7b553f3a6f5371c6bb3f57c494bb52b88af99.1620711734.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Acked-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 97f30d324ce6645a4de4ffb71e4ae9b8ca36ff04 Author: Maor Gottlieb Date: Tue May 11 08:48:29 2021 +0300 RDMA/mlx5: Recover from fatal event in dual port mode When there is fatal event on the slave port, the device is marked as not active. We need to mark it as active again when the slave is recovered to regain full functionality. Fixes: d69a24e03659 ("IB/mlx5: Move IB event processing onto a workqueue") Link: https://lore.kernel.org/r/8906754455bb23019ef223c725d2c0d38acfb80b.1620711734.git.leonro@nvidia.com Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6863b4d7bf19a54e23fc5838b7e66d954444289d Author: Maor Gottlieb Date: Tue May 11 08:48:27 2021 +0300 RDMA/mlx5: Verify that DM operation is reasonable Fix the complaint from smatch by verifing that the user requested DM operation is not greater than 31. divers/infiniband/hw/mlx5/dm.c:220 mlx5_ib_handler_MLX5_IB_METHOD_DM_MAP_OP_ADDR() error: undefined (user controlled) shift '(((1))) << op' Fixes: cea85fa5dbc2 ("RDMA/mlx5: Add support in MEMIC operations") Link: https://lore.kernel.org/r/458b1d7710c3cf01360c8771893f483665569786.1620711734.git.leonro@nvidia.com Reported-by: Dan Carpenter Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b433d090ac63eae4d3182cfc274dbacb0c4ee0ec Author: Kevin Hilman Date: Tue May 11 12:00:54 2021 -0700 MAINTAINERS: ARM/Amlogic SoCs: add Neil as primary maintainer Add Neil as primary maintainer for the Amlogic family of Arm SoCs. I will now act as co-maintainer. Neil is already doing lots of the reviewing, testing and behind the scenes support for users of the upstream kernel on these SoCs, so this is just to formalize the current state of affairs. Thanks Neil for all of your efforts, and keep up the great work! Signed-off-by: Kevin Hilman Acked-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210511190054.26300-1-khilman@baylibre.com' Signed-off-by: Arnd Bergmann commit 8ec51f894bf54ff9a6ffac4d033690e216a71ab0 Merge: 826b5f7659394 9f015b3765bf5 Author: Arnd Bergmann Date: Mon May 17 16:06:01 2021 +0200 Merge tag 'amdtee-fixes-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes AMD-TEE reference count loaded TAs * tag 'amdtee-fixes-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: amdtee: unload TA only when its refcount becomes 0 Link: https://lore.kernel.org/r/20210505110850.GA3434209@jade Signed-off-by: Arnd Bergmann commit 91df99a6eb50d5a1bc70fff4a09a0b7ae6aab96d Author: Josef Bacik Date: Fri May 14 10:56:16 2021 -0400 btrfs: do not BUG_ON in link_to_fixup_dir While doing error injection testing I got the following panic kernel BUG at fs/btrfs/tree-log.c:1862! invalid opcode: 0000 [#1] SMP NOPTI CPU: 1 PID: 7836 Comm: mount Not tainted 5.13.0-rc1+ #305 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-2.fc32 04/01/2014 RIP: 0010:link_to_fixup_dir+0xd5/0xe0 RSP: 0018:ffffb5800180fa30 EFLAGS: 00010216 RAX: fffffffffffffffb RBX: 00000000fffffffb RCX: ffff8f595287faf0 RDX: ffffb5800180fa37 RSI: ffff8f5954978800 RDI: 0000000000000000 RBP: ffff8f5953af9450 R08: 0000000000000019 R09: 0000000000000001 R10: 000151f408682970 R11: 0000000120021001 R12: ffff8f5954978800 R13: ffff8f595287faf0 R14: ffff8f5953c77dd0 R15: 0000000000000065 FS: 00007fc5284c8c40(0000) GS:ffff8f59bbd00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc5287f47c0 CR3: 000000011275e002 CR4: 0000000000370ee0 Call Trace: replay_one_buffer+0x409/0x470 ? btree_read_extent_buffer_pages+0xd0/0x110 walk_up_log_tree+0x157/0x1e0 walk_log_tree+0xa6/0x1d0 btrfs_recover_log_trees+0x1da/0x360 ? replay_one_extent+0x7b0/0x7b0 open_ctree+0x1486/0x1720 btrfs_mount_root.cold+0x12/0xea ? __kmalloc_track_caller+0x12f/0x240 legacy_get_tree+0x24/0x40 vfs_get_tree+0x22/0xb0 vfs_kern_mount.part.0+0x71/0xb0 btrfs_mount+0x10d/0x380 ? vfs_parse_fs_string+0x4d/0x90 legacy_get_tree+0x24/0x40 vfs_get_tree+0x22/0xb0 path_mount+0x433/0xa10 __x64_sys_mount+0xe3/0x120 do_syscall_64+0x3d/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae We can get -EIO or any number of legitimate errors from btrfs_search_slot(), panicing here is not the appropriate response. The error path for this code handles errors properly, simply return the error. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6416954ca75baed71640bf3828625bf165fb9b5e Author: Filipe Manana Date: Fri May 14 10:03:40 2021 +0100 btrfs: release path before starting transaction when cloning inline extent When cloning an inline extent there are a few cases, such as when we have an implicit hole at file offset 0, where we start a transaction while holding a read lock on a leaf. Starting the transaction results in a call to sb_start_intwrite(), which results in doing a read lock on a percpu semaphore. Lockdep doesn't like this and complains about it: [46.580704] ====================================================== [46.580752] WARNING: possible circular locking dependency detected [46.580799] 5.13.0-rc1 #28 Not tainted [46.580832] ------------------------------------------------------ [46.580877] cloner/3835 is trying to acquire lock: [46.580918] c00000001301d638 (sb_internal#2){.+.+}-{0:0}, at: clone_copy_inline_extent+0xe4/0x5a0 [46.581167] [46.581167] but task is already holding lock: [46.581217] c000000007fa2550 (btrfs-tree-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x70/0x1d0 [46.581293] [46.581293] which lock already depends on the new lock. [46.581293] [46.581351] [46.581351] the existing dependency chain (in reverse order) is: [46.581410] [46.581410] -> #1 (btrfs-tree-00){++++}-{3:3}: [46.581464] down_read_nested+0x68/0x200 [46.581536] __btrfs_tree_read_lock+0x70/0x1d0 [46.581577] btrfs_read_lock_root_node+0x88/0x200 [46.581623] btrfs_search_slot+0x298/0xb70 [46.581665] btrfs_set_inode_index+0xfc/0x260 [46.581708] btrfs_new_inode+0x26c/0x950 [46.581749] btrfs_create+0xf4/0x2b0 [46.581782] lookup_open.isra.57+0x55c/0x6a0 [46.581855] path_openat+0x418/0xd20 [46.581888] do_filp_open+0x9c/0x130 [46.581920] do_sys_openat2+0x2ec/0x430 [46.581961] do_sys_open+0x90/0xc0 [46.581993] system_call_exception+0x3d4/0x410 [46.582037] system_call_common+0xec/0x278 [46.582078] [46.582078] -> #0 (sb_internal#2){.+.+}-{0:0}: [46.582135] __lock_acquire+0x1e90/0x2c50 [46.582176] lock_acquire+0x2b4/0x5b0 [46.582263] start_transaction+0x3cc/0x950 [46.582308] clone_copy_inline_extent+0xe4/0x5a0 [46.582353] btrfs_clone+0x5fc/0x880 [46.582388] btrfs_clone_files+0xd8/0x1c0 [46.582434] btrfs_remap_file_range+0x3d8/0x590 [46.582481] do_clone_file_range+0x10c/0x270 [46.582558] vfs_clone_file_range+0x1b0/0x310 [46.582605] ioctl_file_clone+0x90/0x130 [46.582651] do_vfs_ioctl+0x874/0x1ac0 [46.582697] sys_ioctl+0x6c/0x120 [46.582733] system_call_exception+0x3d4/0x410 [46.582777] system_call_common+0xec/0x278 [46.582822] [46.582822] other info that might help us debug this: [46.582822] [46.582888] Possible unsafe locking scenario: [46.582888] [46.582942] CPU0 CPU1 [46.582984] ---- ---- [46.583028] lock(btrfs-tree-00); [46.583062] lock(sb_internal#2); [46.583119] lock(btrfs-tree-00); [46.583174] lock(sb_internal#2); [46.583212] [46.583212] *** DEADLOCK *** [46.583212] [46.583266] 6 locks held by cloner/3835: [46.583299] #0: c00000001301d448 (sb_writers#12){.+.+}-{0:0}, at: ioctl_file_clone+0x90/0x130 [46.583382] #1: c00000000f6d3768 (&sb->s_type->i_mutex_key#15){+.+.}-{3:3}, at: lock_two_nondirectories+0x58/0xc0 [46.583477] #2: c00000000f6d72a8 (&sb->s_type->i_mutex_key#15/4){+.+.}-{3:3}, at: lock_two_nondirectories+0x9c/0xc0 [46.583574] #3: c00000000f6d7138 (&ei->i_mmap_lock){+.+.}-{3:3}, at: btrfs_remap_file_range+0xd0/0x590 [46.583657] #4: c00000000f6d35f8 (&ei->i_mmap_lock/1){+.+.}-{3:3}, at: btrfs_remap_file_range+0xe0/0x590 [46.583743] #5: c000000007fa2550 (btrfs-tree-00){++++}-{3:3}, at: __btrfs_tree_read_lock+0x70/0x1d0 [46.583828] [46.583828] stack backtrace: [46.583872] CPU: 1 PID: 3835 Comm: cloner Not tainted 5.13.0-rc1 #28 [46.583931] Call Trace: [46.583955] [c0000000167c7200] [c000000000c1ee78] dump_stack+0xec/0x144 (unreliable) [46.584052] [c0000000167c7240] [c000000000274058] print_circular_bug.isra.32+0x3a8/0x400 [46.584123] [c0000000167c72e0] [c0000000002741f4] check_noncircular+0x144/0x190 [46.584191] [c0000000167c73b0] [c000000000278fc0] __lock_acquire+0x1e90/0x2c50 [46.584259] [c0000000167c74f0] [c00000000027aa94] lock_acquire+0x2b4/0x5b0 [46.584317] [c0000000167c75e0] [c000000000a0d6cc] start_transaction+0x3cc/0x950 [46.584388] [c0000000167c7690] [c000000000af47a4] clone_copy_inline_extent+0xe4/0x5a0 [46.584457] [c0000000167c77c0] [c000000000af525c] btrfs_clone+0x5fc/0x880 [46.584514] [c0000000167c7990] [c000000000af5698] btrfs_clone_files+0xd8/0x1c0 [46.584583] [c0000000167c7a00] [c000000000af5b58] btrfs_remap_file_range+0x3d8/0x590 [46.584652] [c0000000167c7ae0] [c0000000005d81dc] do_clone_file_range+0x10c/0x270 [46.584722] [c0000000167c7b40] [c0000000005d84f0] vfs_clone_file_range+0x1b0/0x310 [46.584793] [c0000000167c7bb0] [c00000000058bf80] ioctl_file_clone+0x90/0x130 [46.584861] [c0000000167c7c10] [c00000000058c894] do_vfs_ioctl+0x874/0x1ac0 [46.584922] [c0000000167c7d10] [c00000000058db4c] sys_ioctl+0x6c/0x120 [46.584978] [c0000000167c7d60] [c0000000000364a4] system_call_exception+0x3d4/0x410 [46.585046] [c0000000167c7e10] [c00000000000d45c] system_call_common+0xec/0x278 [46.585114] --- interrupt: c00 at 0x7ffff7e22990 [46.585160] NIP: 00007ffff7e22990 LR: 00000001000010ec CTR: 0000000000000000 [46.585224] REGS: c0000000167c7e80 TRAP: 0c00 Not tainted (5.13.0-rc1) [46.585280] MSR: 800000000280f033 CR: 28000244 XER: 00000000 [46.585374] IRQMASK: 0 [46.585374] GPR00: 0000000000000036 00007fffffffdec0 00007ffff7f17100 0000000000000004 [46.585374] GPR04: 000000008020940d 00007fffffffdf40 0000000000000000 0000000000000000 [46.585374] GPR08: 0000000000000004 0000000000000000 0000000000000000 0000000000000000 [46.585374] GPR12: 0000000000000000 00007ffff7ffa940 0000000000000000 0000000000000000 [46.585374] GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 [46.585374] GPR20: 0000000000000000 000000009123683e 00007fffffffdf40 0000000000000000 [46.585374] GPR24: 0000000000000000 0000000000000000 0000000000000000 0000000000000004 [46.585374] GPR28: 0000000100030260 0000000100030280 0000000000000003 000000000000005f [46.585919] NIP [00007ffff7e22990] 0x7ffff7e22990 [46.585964] LR [00000001000010ec] 0x1000010ec [46.586010] --- interrupt: c00 This should be a false positive, as both locks are acquired in read mode. Nevertheless, we don't need to hold a leaf locked when we start the transaction, so just release the leaf (path) before starting it. Reported-by: Ritesh Harjani Link: https://lore.kernel.org/linux-btrfs/20210513214404.xks77p566fglzgum@riteshh-domain/ Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7a274727702cc07d27cdebd36d1d5132abeea12f Author: Pavel Begunkov Date: Mon May 17 12:43:34 2021 +0100 io_uring: don't modify req->poll for rw __io_queue_proc() is used by both poll and apoll, so we should not access req->poll directly but selecting right struct io_poll_iocb depending on use case. Reported-and-tested-by: syzbot+a84b8783366ecb1c65d0@syzkaller.appspotmail.com Fixes: ea6a693d862d ("io_uring: disable multishot poll for double poll add cases") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/4a6a1de31142d8e0250fe2dfd4c8923d82a5bbfc.1621251795.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 5b9fedb31e476693c90d8ee040e7d4c51b3e7cc4 Author: Jan Kara Date: Mon May 17 14:39:56 2021 +0200 quota: Disable quotactl_path syscall In commit fa8b90070a80 ("quota: wire up quotactl_path") we have wired up new quotactl_path syscall. However some people in LWN discussion have objected that the path based syscall is missing dirfd and flags argument which is mostly standard for contemporary path based syscalls. Indeed they have a point and after a discussion with Christian Brauner and Sascha Hauer I've decided to disable the syscall for now and update its API. Since there is no userspace currently using that syscall and it hasn't been released in any major release, we should be fine. CC: Christian Brauner CC: Sascha Hauer Link: https://lore.kernel.org/lkml/20210512153621.n5u43jsytbik4yze@wittgenstein Signed-off-by: Jan Kara commit a470c5665b3b918c31bcc912234862803b10ba00 Author: Zhen Lei Date: Tue May 11 19:27:33 2021 +0800 drm/exynos/decon5433: Remove redundant error printing in exynos5433_decon_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Inki Dae commit 04562956fd41fb22645e47a00cd5cbd601ce4bdd Author: Zhen Lei Date: Tue May 11 17:40:04 2021 +0800 drm/exynos: Remove redundant error printing in exynos_dsi_probe() When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Inki Dae commit b80bfc59c60d8a006fdd7a33352732911ee51397 Author: Krzysztof Kozlowski Date: Mon Apr 5 20:15:24 2021 +0200 drm/exynos: correct exynos_drm_fimd kerneldoc Correct the kerneldoc of fimd_shadow_protect_win() to fix W=1 warnings: drivers/gpu/drm/exynos/exynos_drm_fimd.c:734: warning: expecting prototype for shadow_protect_win(). Prototype was for fimd_shadow_protect_win() instead Signed-off-by: Krzysztof Kozlowski Signed-off-by: Inki Dae commit dc9a91d279b721aef7c4f1a2e2e33631d388446f Author: Nathan Chancellor Date: Thu Apr 15 08:29:14 2021 -0700 drm/tegra: Fix shift overflow in tegra_shared_plane_atomic_update Clang warns: drivers/gpu/drm/tegra/hub.c:513:11: warning: shift count >= width of type [-Wshift-count-overflow] base |= BIT(39); ^~~~~~~ BIT is unsigned long, which is 32-bit on ARCH=arm, hence the overflow warning. Switch to BIT_ULL, which is 64-bit and will not overflow. Fixes: 7b6f846785f4 ("drm/tegra: Support sector layout on Tegra194") Link: https://github.com/ClangBuiltLinux/linux/issues/1351 Signed-off-by: Nathan Chancellor Signed-off-by: Thierry Reding commit 5dea42759bcef74b0802ea64b904409bc37f9045 Author: Thierry Reding Date: Thu Apr 1 17:41:05 2021 +0200 drm/tegra: sor: Fully initialize SOR before registration Before registering the SOR host1x client, make sure that it is fully initialized. This avoids a potential race condition between the SOR's probe and the host1x device initialization in cases where the SOR is the final sub-device to register to a host1x instance. Reported-by: Jonathan Hunter Signed-off-by: Thierry Reding Tested-by: Jon Hunter Signed-off-by: Thierry Reding commit 0cfe5a6e758fb20be8ad3e8f10cb087cc8033eeb Author: Thierry Reding Date: Thu Apr 1 17:41:04 2021 +0200 gpu: host1x: Split up client initalization and registration In some cases we may need to initialize the host1x client first before registering it. This commit adds a new helper that will do nothing but the initialization of the data structure. At the same time, the initialization is removed from the registration function. Note, however, that for simplicity we explicitly initialize the client when the host1x_client_register() function is called, as opposed to the low-level __host1x_client_register() function. This allows existing callers to remain unchanged. Signed-off-by: Thierry Reding commit 73a395c46704304b96bc5e2ee19be31124025c0c Author: Pavel Machek (CIP) Date: Tue Apr 6 13:54:14 2021 +0200 drm/tegra: sor: Do not leak runtime PM reference It's theoretically possible for the runtime PM reference to leak if the code fails anywhere between the pm_runtime_resume_and_get() and pm_runtime_put() calls, so make sure to release the runtime PM reference in that case. Practically this will never happen because none of the functions will fail on Tegra, but it's better for the code to be pedantic in case these assumptions will ever become wrong. Signed-off-by: Pavel Machek (CIP) [treding@nvidia.com: add commit message] Signed-off-by: Thierry Reding commit 145e06b58f8625becc61792a0554726314297a85 Author: Zhenyu Wang Date: Thu May 13 16:39:02 2021 +0800 drm/i915/gvt: Move mdev attribute groups into kvmgt module As kvmgt module contains all handling for VFIO/mdev, leaving mdev attribute groups in gvt module caused dependency issue. Although it was there for possible other hypervisor usage, that turns out never to be true. So this moves all mdev handling into kvmgt module completely to resolve dependency issue. With this fix, no config workaround is required. So revert previous workaround commits: adaeb718d46f ("vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV") and 07e543f4f9d1 ("vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV"). Reviewed-by: Colin Xu Cc: Arnd Bergmann Cc: Jason Gunthorpe Cc: Alex Williamson Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20210513083902.2822350-1-zhenyuw@linux.intel.com commit a4345a7cecfb91ae78cd43d26b0c6a956420761a Merge: ce7ea0cfdc2e9 cb853ded1d25e Author: Paolo Bonzini Date: Mon May 17 09:55:12 2021 +0200 Merge tag 'kvmarm-fixes-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 fixes for 5.13, take #1 - Fix regression with irqbypass not restarting the guest on failed connect - Fix regression with debug register decoding resulting in overlapping access - Commit exception state on exit to usrspace - Fix the MMU notifier return values - Add missing 'static' qualifiers in the new host stage-2 code commit 055f23b74b20f2824ce33047b4cf2e2aa856bf3b Author: Jessica Yu Date: Wed May 12 15:45:46 2021 +0200 module: check for exit sections in layout_sections() instead of module_init_section() Previously, when CONFIG_MODULE_UNLOAD=n, the module loader just does not attempt to load exit sections since it never expects that any code in those sections will ever execute. However, dynamic code patching (alternatives, jump_label and static_call) can have sites in __exit code, even if __exit is never executed. Therefore __exit must be present at runtime, at least for as long as __init code is. Commit 33121347fb1c ("module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD") solves the requirements of jump_labels and static_calls by putting the exit sections in the init region of the module so that they are at least present at init, and discarded afterwards. It does this by including a check for exit sections in module_init_section(), so that it also returns true for exit sections, and the module loader will automatically sort them in the init region of the module. However, the solution there was not completely arch-independent. ARM is a special case where it supplies its own module_{init, exit}_section() functions. Instead of pushing the exit section checks into module_init_section(), just implement the exit section check in layout_sections(), so that we don't have to touch arch-dependent code. Fixes: 33121347fb1c ("module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD") Reviewed-by: Russell King (Oracle) Signed-off-by: Jessica Yu commit 4236a26a6b998c8c4fdc0117b8848a38789c48ae Author: wenhuizhang Date: Thu May 13 12:55:16 2021 -0400 cifs: remove deadstore in cifs_close_all_deferred_files() Deadstore detected by Lukas Bulwahn's CodeChecker Tool (ELISA group). line 741 struct cifsInodeInfo *cinode; line 747 cinode = CIFS_I(d_inode(cfile->dentry)); could be deleted. cinode on filesystem should not be deleted when files are closed, they are representations of some data fields on a physical disk, thus no further action is required. The virtual inode on vfs will be handled by vfs automatically, and the denotation is inode, which is different from the cinode. Signed-off-by: wenhuizhang Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit c93db682cfb213501881072a9200a48ce1dc3c3f Author: Michal Kubecek Date: Sat May 15 12:11:13 2021 +0200 kbuild: dummy-tools: adjust to stricter stackprotector check Commit 3fb0fdb3bbe7 ("x86/stackprotector/32: Make the canary into a regular percpu variable") modified the stackprotector check on 32-bit x86 to check if gcc supports using %fs as canary. Adjust dummy-tools gcc script to pass this new test by returning "%fs" rather than "%gs" if it detects -mstack-protector-guard-reg=fs on command line. Fixes: 3fb0fdb3bbe7 ("x86/stackprotector/32: Make the canary into a regular percpu variable") Signed-off-by: Michal Kubecek Signed-off-by: Masahiro Yamada commit 98a499a11ecdd8cb91d03dd5c034aaf7422f2deb Author: Jonathan Neuschäfer Date: Thu May 13 18:24:02 2021 +0200 scripts/jobserver-exec: Fix a typo ("envirnoment") Signed-off-by: Jonathan Neuschäfer Signed-off-by: Masahiro Yamada commit c6de37dd5e48b883db032aa4dc0547a4858b9f20 Author: Kees Cook Date: Wed Apr 21 11:58:48 2021 -0700 tools build: Fix quiet cmd indentation The tools quiet cmd output has mismatched indentation (and extra space character between cmd name and target name) compared to the rest of kbuild out: HOSTCC scripts/insert-sys-cert LD /srv/code/tools/objtool/arch/x86/objtool-in.o LD /srv/code/tools/objtool/libsubcmd-in.o AR /srv/code/tools/objtool/libsubcmd.a HOSTLD scripts/genksyms/genksyms CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig CC scripts/mod/devicetable-offsets.s MKELF scripts/mod/elfconfig.h HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/file2alias.o HOSTCC scripts/mod/sumversion.o LD /srv/code/tools/objtool/objtool-in.o LINK /srv/code/tools/objtool/objtool HOSTLD scripts/mod/modpost CC kernel/bounds.s Adjust to match the rest of kbuild. Signed-off-by: Kees Cook Signed-off-by: Masahiro Yamada commit 9e3927f6373da54cb17e17f4bd700907e1123d2f Author: Li Jun Date: Fri May 14 18:59:44 2021 +0800 usb: chipidea: udc: assign interrupt number to USB gadget structure Chipidea also need sync interrupt before unbind the udc while gadget remove driver, otherwise setup irq handling may happen while unbind, see below dump generated from android function switch stress test: [ 4703.503056] android_work: sent uevent USB_STATE=CONNECTED [ 4703.514642] android_work: sent uevent USB_STATE=DISCONNECTED [ 4703.651339] android_work: sent uevent USB_STATE=CONNECTED [ 4703.661806] init: Control message: Processed ctl.stop for 'adbd' from pid: 561 (system_server) [ 4703.673469] init: processing action (init.svc.adbd=stopped) from (/system/etc/init/hw/init.usb.configfs.rc:14) [ 4703.676451] Unable to handle kernel read from unreadable memory at virtual address 0000000000000090 [ 4703.676454] Mem abort info: [ 4703.676458] ESR = 0x96000004 [ 4703.676461] EC = 0x25: DABT (current EL), IL = 32 bits [ 4703.676464] SET = 0, FnV = 0 [ 4703.676466] EA = 0, S1PTW = 0 [ 4703.676468] Data abort info: [ 4703.676471] ISV = 0, ISS = 0x00000004 [ 4703.676473] CM = 0, WnR = 0 [ 4703.676478] user pgtable: 4k pages, 48-bit VAs, pgdp=000000004a867000 [ 4703.676481] [0000000000000090] pgd=0000000000000000, p4d=0000000000000000 [ 4703.676503] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 4703.758297] Modules linked in: synaptics_dsx_i2c moal(O) mlan(O) [ 4703.764327] CPU: 0 PID: 235 Comm: lmkd Tainted: G W O 5.10.9-00001-g3f5fd8487c38-dirty #63 [ 4703.773720] Hardware name: NXP i.MX8MNano EVK board (DT) [ 4703.779033] pstate: 60400085 (nZCv daIf +PAN -UAO -TCO BTYPE=--) [ 4703.785046] pc : _raw_write_unlock_bh+0xc0/0x2c8 [ 4703.789667] lr : android_setup+0x4c/0x168 [ 4703.793676] sp : ffff80001256bd80 [ 4703.796989] x29: ffff80001256bd80 x28: 00000000000000a8 [ 4703.802304] x27: ffff800012470000 x26: ffff80006d923000 [ 4703.807616] x25: ffff800012471000 x24: ffff00000b091140 [ 4703.812929] x23: ffff0000077dbd38 x22: ffff0000077da490 [ 4703.818242] x21: ffff80001256be30 x20: 0000000000000000 [ 4703.823554] x19: 0000000000000080 x18: ffff800012561048 [ 4703.828867] x17: 0000000000000000 x16: 0000000000000039 [ 4703.834180] x15: ffff8000106ad258 x14: ffff80001194c277 [ 4703.839493] x13: 0000000000003934 x12: 0000000000000000 [ 4703.844805] x11: 0000000000000000 x10: 0000000000000001 [ 4703.850117] x9 : 0000000000000000 x8 : 0000000000000090 [ 4703.855429] x7 : 6f72646e61203a70 x6 : ffff8000124f2450 [ 4703.860742] x5 : ffffffffffffffff x4 : 0000000000000009 [ 4703.866054] x3 : ffff8000108a290c x2 : ffff00007fb3a9c8 [ 4703.871367] x1 : 0000000000000000 x0 : 0000000000000090 [ 4703.876681] Call trace: [ 4703.879129] _raw_write_unlock_bh+0xc0/0x2c8 [ 4703.883397] android_setup+0x4c/0x168 [ 4703.887059] udc_irq+0x824/0xa9c [ 4703.890287] ci_irq+0x124/0x148 [ 4703.893429] __handle_irq_event_percpu+0x84/0x268 [ 4703.898131] handle_irq_event+0x64/0x14c [ 4703.902054] handle_fasteoi_irq+0x110/0x210 [ 4703.906236] __handle_domain_irq+0x8c/0xd4 [ 4703.910332] gic_handle_irq+0x6c/0x124 [ 4703.914081] el1_irq+0xdc/0x1c0 [ 4703.917221] _raw_spin_unlock_irq+0x20/0x54 [ 4703.921405] finish_task_switch+0x84/0x224 [ 4703.925502] __schedule+0x4a4/0x734 [ 4703.928990] schedule+0xa0/0xe8 [ 4703.932132] do_notify_resume+0x150/0x184 [ 4703.936140] work_pending+0xc/0x40c [ 4703.939633] Code: d5384613 521b0a69 d5184609 f9800111 (885ffd01) [ 4703.945732] ---[ end trace ba5c1875ae49d53c ]--- [ 4703.950350] Kernel panic - not syncing: Oops: Fatal exception in interrupt [ 4703.957223] SMP: stopping secondary CPUs [ 4703.961151] Kernel Offset: disabled [ 4703.964638] CPU features: 0x0240002,2000200c [ 4703.968905] Memory Limit: none [ 4703.971963] Rebooting in 5 seconds.. Tested-by: faqiang.zhu Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1620989984-7653-1-git-send-email-jun.li@nxp.com Signed-off-by: Peter Chen commit 9d5e8492eee017ffdaa9f0957e91d39d83163197 Author: Darrick J. Wong Date: Sun May 9 16:22:54 2021 -0700 xfs: adjust rt allocation minlen when extszhint > rtextsize xfs_bmap_rtalloc doesn't handle realtime extent files with extent size hints larger than the rt volume's extent size properly, because xfs_bmap_extsize_align can adjust the offset/length parameters to try to fit the extent size hint. Under these conditions, minlen has to be large enough so that any allocation returned by xfs_rtallocate_extent will be large enough to cover at least one of the blocks that the caller asked for. If the allocation is too short, bmapi_write will return no mapping for the requested range, which causes ENOSPC errors in other parts of the filesystem. Therefore, adjust minlen upwards to fix this. This can be found by running generic/263 (g/127 or g/522) with a realtime extent size hint that's larger than the rt volume extent size. Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson commit 2a29db088c7ae7121801a0d7a60740ed2d18c4f3 Author: Grant Peltier Date: Fri May 14 16:19:55 2021 -0500 hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_3 for RAA228228 The initial version of the RAA228228 datasheet claimed that the device supported READ_TEMPERATURE_3 but not READ_TEMPERATURE_1. It has since been discovered that the datasheet was incorrect. The RAA228228 does support READ_TEMPERATURE_1 but does not support READ_TEMPERATURE_3. Signed-off-by: Grant Peltier Fixes: 51fb91ed5a6f ("hwmon: (pmbus/isl68137) remove READ_TEMPERATURE_1 telemetry for RAA228228") Link: https://lore.kernel.org/r/20210514211954.GA24646@raspberrypi Signed-off-by: Guenter Roeck commit c2a338c9395eb843a9a11a2385f4b00cd0978494 Author: Václav Kubernát Date: Thu May 13 22:11:10 2021 +0200 hwmon: (pmbus/fsp-3y) Fix FSP-3Y YH-5151E VOUT After testing new YH-5151E devices, we found out that not all YH-5151E work the same. The newly tested devices actually report vout correctly in linear16 (even though they're still YH-5151E). We suspect that it is because these new devices have a different firmware version, but that is unconfirmed. The version cannot be queried through PMBus. The compliant versions of YH-5151E report VOUT_MODE normally, so we turn on the linear11 workaround only if VOUT_MODE doesn't report anything. Signed-off-by: Václav Kubernát Link: https://lore.kernel.org/r/20210513201110.313523-1-kubernat@cesnet.cz Signed-off-by: Guenter Roeck commit 35d470b5fbc9f82feb77b56bb0d5d0b5cd73e9da Author: Armin Wolf Date: Thu May 13 17:45:46 2021 +0200 hwmon: (dell-smm-hwmon) Fix index values When support for up to 10 temp sensors and for disabling automatic BIOS fan control was added, noone updated the index values used for disallowing fan support and fan type calls. Fix those values. Signed-off-by: Armin Wolf Reviewed-by: Pali Rohár Link: https://lore.kernel.org/r/20210513154546.12430-1-W_Armin@gmx.de Fixes: 1bb46a20e73b ("hwmon: (dell-smm) Support up to 10 temp sensors") Signed-off-by: Guenter Roeck commit d07f6ca923ea0927a1024dfccafc5b53b61cfecc Author: Linus Torvalds Date: Sun May 16 15:27:44 2021 -0700 Linux 5.13-rc2 commit 28183dbf54edba614a90ceb6a1e9464b27845309 Merge: 6942d81a8faa1 bb4031b8af804 Author: Linus Torvalds Date: Sun May 16 10:13:14 2021 -0700 Merge tag 'driver-core-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are two driver fixes for driver core changes that happened in 5.13-rc1. The clk driver fix resolves a many-reported issue with booting some devices, and the USB typec fix resolves the reported problem of USB systems on some embedded boards. Both of these have been in linux-next this week with no reported issues" * tag 'driver-core-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: clk: Skip clk provider registration when np is NULL usb: typec: tcpm: Don't block probing of consumers of "connector" nodes commit 6942d81a8faa17d44d1286b63ccb7d920b29d065 Merge: 4a668429e0d32 ba9c25d94dea1 Author: Linus Torvalds Date: Sun May 16 10:06:19 2021 -0700 Merge tag 'staging-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver fixes from Greg KH: "Here are some small IIO driver fixes and one Staging driver fix for 5.13-rc2. Nothing major, just some resolutions for reported problems: - gcc-11 bogus warning fix for rtl8723bs - iio driver tiny fixes All of these have been in linux-next for many days with no reported issues" * tag 'staging-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio: tsl2583: Fix division by a zero lux_val iio: core: return ENODEV if ioctl is unknown iio: core: fix ioctl handlers removal iio: gyro: mpu3050: Fix reported temperature value iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER iio: proximity: pulsedlight: Fix rumtime PM imbalance on error iio: light: gp2ap002: Fix rumtime PM imbalance on error staging: rtl8723bs: avoid bogus gcc warning commit 4a668429e0d32cc91703340849d2332b1882de80 Merge: 8ce3648158d7b 975f94c7d6c30 Author: Linus Torvalds Date: Sun May 16 09:55:05 2021 -0700 Merge tag 'usb-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are some small USB fixes for 5.13-rc2. They consist of a number of resolutions for reported issues: - typec fixes for found problems - xhci fixes and quirk additions - dwc3 driver fixes - minor fixes found by Coverity - cdc-wdm fixes for reported problems All of these have been in linux-next for a few days with no reported issues" * tag 'usb-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (28 commits) usb: core: hub: fix race condition about TRSMRCY of resume usb: typec: tcpm: Fix SINK_DISCOVERY current limit for Rp-default xhci: Add reset resume quirk for AMD xhci controller. usb: xhci: Increase timeout for HC halt xhci: Do not use GFP_KERNEL in (potentially) atomic context xhci: Fix giving back cancelled URBs even if halted endpoint can't reset xhci-pci: Allow host runtime PM as default for Intel Alder Lake xHCI usb: musb: Fix an error message usb: typec: tcpm: Fix wrong handling for Not_Supported in VDM AMS usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4 usb: fotg210-hcd: Fix an error message docs: usb: function: Modify path name usb: dwc3: omap: improve extcon initialization usb: typec: ucsi: Put fwnode in any case during ->probe() usb: typec: tcpm: Fix wrong handling in GET_SINK_CAP usb: dwc2: Remove obsolete MODULE_ constants from platform.c usb: dwc3: imx8mp: fix error return code in dwc3_imx8mp_probe() usb: dwc3: imx8mp: detect dwc3 core node via compatible string usb: dwc3: gadget: Return success always for kick transfer in ep queue ... commit 8ce3648158d7bc9e5035d5a1db02c892905babbf Merge: f44e58bb1905a 3486d2c9be652 Author: Linus Torvalds Date: Sun May 16 09:42:13 2021 -0700 Merge tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer fixes from Thomas Gleixner: "Two fixes for timers: - Use the ALARM feature check in the alarmtimer core code insted of the old method of checking for the set_alarm() callback. Drivers can have that callback set but the feature bit cleared. If such a RTC device is selected then alarms wont work. - Use a proper define to let the preprocessor check whether Hyper-V VDSO clocksource should be active. The code used a constant in an enum with #ifdef, which evaluates to always false and disabled the clocksource for VDSO" * tag 'timers-urgent-2021-05-16' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86 alarmtimer: Check RTC features instead of ops commit f44e58bb1905ada4910f26676d2ea22a35545276 Merge: ccb013c29d2d1 97729b653de52 Author: Linus Torvalds Date: Sun May 16 09:39:04 2021 -0700 Merge tag 'for-linus-5.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - two patches for error path fixes - a small series for fixing a regression with swiotlb with Xen on Arm * tag 'for-linus-5.13b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/swiotlb: check if the swiotlb has already been initialized arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required xen/arm: move xen_swiotlb_detect to arm/swiotlb-xen.h xen/unpopulated-alloc: fix error return code in fill_list() xen/gntdev: fix gntdev_mmap() error exit path commit ccb013c29d2d16e37c9114b1cea19fac5643b173 Merge: 63d1cb53e26a9 a554e740b66a8 Author: Linus Torvalds Date: Sun May 16 09:31:06 2021 -0700 Merge tag 'x86_urgent_for_v5.13_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "The three SEV commits are not really urgent material. But we figured since getting them in now will avoid a huge amount of conflicts between future SEV changes touching tip, the kvm and probably other trees, sending them to you now would be best. The idea is that the tip, kvm etc branches for 5.14 will all base ontop of -rc2 and thus everything will be peachy. What is more, those changes are purely mechanical and defines movement so they should be fine to go now (famous last words). Summary: - Enable -Wundef for the compressed kernel build stage - Reorganize SEV code to streamline and simplify future development" * tag 'x86_urgent_for_v5.13_rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/boot/compressed: Enable -Wundef x86/msr: Rename MSR_K8_SYSCFG to MSR_AMD64_SYSCFG x86/sev: Move GHCB MSR protocol and NAE definitions in a common header x86/sev-es: Rename sev-es.{ch} to sev.{ch} commit c1f0616124c455c5c762b6f123e40bba5df759e6 Author: Takashi Iwai Date: Sun May 16 18:17:55 2021 +0200 ALSA: intel8x0: Don't update period unless prepared The interrupt handler of intel8x0 calls snd_intel8x0_update() whenever the hardware sets the corresponding status bit for each stream. This works fine for most cases as long as the hardware behaves properly. But when the hardware gives a wrong bit set, this leads to a zero- division Oops, and reportedly, this seems what happened on a VM. For fixing the crash, this patch adds a internal flag indicating that the stream is ready to be updated, and check it (as well as the flag being in suspended) to ignore such spurious update. Cc: Reported-and-tested-by: Sergey Senozhatsky Link: https://lore.kernel.org/r/s5h5yzi7uh0.wl-tiwai@suse.de Signed-off-by: Takashi Iwai commit fbb80d5ad400a12ec67214a0e7e9f9497dc9e615 Author: Zhen Lei Date: Tue May 11 20:54:28 2021 +0800 irqchip: Remove redundant error printing When devm_ioremap_resource() fails, a clear enough error message will be printed by its subfunction __devm_ioremap_resource(). The error information contains the device name, failure cause, and possibly resource information. Therefore, remove the error printing here to simplify code and reduce the binary size. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210511125428.6108-2-thunder.leizhen@huawei.com commit 63d1cb53e26a9a4168b84a8981b225c0a9cfa235 Merge: c12a29ed9094b c6ac667b07996 Author: Linus Torvalds Date: Sat May 15 16:39:45 2021 -0700 Merge tag 'powerpc-5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Fix a regression in the conversion of the 64-bit BookE interrupt entry to C. - Fix KVM hosts running with the hash MMU since the recent KVM gfn changes. - Fix a deadlock in our paravirt spinlocks when hcall tracing is enabled. - Several fixes for oopses in our runtime code patching for security mitigations. - A couple of minor fixes for the recent conversion of 32-bit interrupt entry/exit to C. - Fix __get_user() causing spurious crashes in sigreturn due to a bad inline asm constraint, spotted with GCC 11. - A fix for the way we track IRQ masking state vs NMI interrupts when using the new scv system call entry path. - A couple more minor fixes. Thanks to Cédric Le Goater, Christian Zigotzky, Christophe Leroy, Naveen N. Rao, Nicholas Piggin Paul Menzel, and Sean Christopherson. * tag 'powerpc-5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/64e/interrupt: Fix nvgprs being clobbered powerpc/64s: Make NMI record implicitly soft-masked code as irqs disabled powerpc/64s: Fix stf mitigation patching w/strict RWX & hash powerpc/64s: Fix entry flush patching w/strict RWX & hash powerpc/64s: Fix crashes when toggling entry flush barrier powerpc/64s: Fix crashes when toggling stf barrier KVM: PPC: Book3S HV: Fix kvm_unmap_gfn_range_hv() for Hash MMU powerpc/legacy_serial: Fix UBSAN: array-index-out-of-bounds powerpc/signal: Fix possible build failure with unsafe_copy_fpr_{to/from}_user powerpc/uaccess: Fix __get_user() with CONFIG_CC_HAS_ASM_GOTO_OUTPUT powerpc/pseries: warn if recursing into the hcall tracing code powerpc/pseries: use notrace hcall variant for H_CEDE idle powerpc/pseries: Don't trace hcall tracing wrapper powerpc/pseries: Fix hcall tracing recursion in pv queued spinlocks powerpc/syscall: Calling kuap_save_and_lock() is wrong powerpc/interrupts: Fix kuep_unlock() call commit d1acd81bd6eb685aa9fef25624fb36d297f6404e Author: Ajish Koshy Date: Wed May 5 17:31:03 2021 +0530 scsi: pm80xx: Fix drives missing during rmmod/insmod loop When driver is loaded after rmmod some drives are not showing up during discovery. SATA drives are directly attached to the controller connected phys. During device discovery, the IDENTIFY command (qc timeout (cmd 0xec)) is timing out during revalidation. This will trigger abort from host side and controller successfully aborts the command and returns success. Post this successful abort response ATA library decides to mark the disk as NODEV. To overcome this, inside pm8001_scan_start() after phy_start() call, add get start response and wait for few milliseconds to trigger next phy start. This millisecond delay will give sufficient time for the controller state machine to accept next phy start. Link: https://lore.kernel.org/r/20210505120103.24497-1-ajish.koshy@microchip.com Signed-off-by: Ajish Koshy Signed-off-by: Viswas G Signed-off-by: Martin K. Petersen commit 5cb289bf2d7c34ca1abd794ce116c4f19185a1d4 Author: Zhen Lei Date: Fri May 14 17:09:52 2021 +0800 scsi: qla2xxx: Fix error return code in qla82xx_write_flash_dword() Fix to return a negative error code from the error handling case instead of 0 as done elsewhere in this function. Link: https://lore.kernel.org/r/20210514090952.6715-1-thunder.leizhen@huawei.com Fixes: a9083016a531 ("[SCSI] qla2xxx: Add ISP82XX support.") Reported-by: Hulk Robot Reviewed-by: Himanshu Madhani Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit c12a29ed9094b4b9cde8965c12850460b9a79d7c Merge: e7c425b7441a9 3743d55b289c2 Author: Linus Torvalds Date: Sat May 15 10:24:48 2021 -0700 Merge tag 'sched-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Fix an idle CPU selection bug, and an AMD Ryzen maximum frequency enumeration bug" * tag 'sched-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, sched: Fix the AMD CPPC maximum performance value on certain AMD Ryzen generations sched/fair: Fix clearing of has_idle_cores flag in select_idle_cpu() commit e7c425b7441a96b95a75304aed369077f71e3e83 Merge: 077fc64407457 f66c05d6baf36 Author: Linus Torvalds Date: Sat May 15 10:18:23 2021 -0700 Merge tag 'objtool-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fixes from Ingo Molnar: "Fix a couple of endianness bugs that crept in" * tag 'objtool-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool/x86: Fix elf_add_alternative() endianness objtool: Fix elf_create_undef_symbol() endianness commit 077fc64407457d504882a7ba8c3348df4dea8042 Merge: 91b7a0f0637c1 0d3ae948741ac Author: Linus Torvalds Date: Sat May 15 10:13:42 2021 -0700 Merge tag 'irq-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fix from Ingo Molnar: "Fix build warning on SH" * tag 'irq-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sh: Remove unused variable commit 91b7a0f0637c14ce0d252111cf9bca3830e16593 Merge: a4147415bdf15 2515dd6ce8e54 Author: Linus Torvalds Date: Sat May 15 10:00:35 2021 -0700 Merge tag 'core-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 stack randomization fix from Ingo Molnar: "Fix an assembly constraint that affected LLVM up to version 12" * tag 'core-urgent-2021-05-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: stack: Replace "o" output with "r" input constraint commit a4147415bdf152748416e391dd5d6958ad0a96da Merge: f36edc5533b26 86d0c16427253 Author: Linus Torvalds Date: Sat May 15 09:42:27 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "13 patches. Subsystems affected by this patch series: resource, squashfs, hfsplus, modprobe, and mm (hugetlb, slub, userfaultfd, ksm, pagealloc, kasan, pagemap, and ioremap)" * emailed patches from Andrew Morton : mm/ioremap: fix iomap_max_page_shift docs: admin-guide: update description for kernel.modprobe sysctl hfsplus: prevent corruption in shrinking truncate mm/filemap: fix readahead return types kasan: fix unit tests with CONFIG_UBSAN_LOCAL_BOUNDS enabled mm: fix struct page layout on 32-bit systems ksm: revert "use GET_KSM_PAGE_NOLOCK to get ksm page in remove_rmap_item_from_tree()" userfaultfd: release page in error path to avoid BUG_ON squashfs: fix divide error in calculate_skip() kernel/resource: fix return code check in __request_free_mem_region mm, slub: move slub_debug static key enabling outside slab_mutex mm/hugetlb: fix cow where page writtable in child mm/hugetlb: fix F_SEAL_FUTURE_WRITE commit f36edc5533b2653a2d3df2d38cbef25cfd37e32e Merge: 8f4ae0f68c5cb 1d5e4640e5df1 Author: Linus Torvalds Date: Sat May 15 09:01:45 2021 -0700 Merge tag 'arc-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - PAE fixes - syscall num check off-by-one bug - misc fixes * tag 'arc-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: mm: Use max_high_pfn as a HIGHMEM zone border ARC: mm: PAE: use 40-bit physical page mask ARC: entry: fix off-by-one error in syscall number validation ARC: kgdb: add 'fallthrough' to prevent a warning arc: Fix typos/spellos commit 8f4ae0f68c5cb796cda02b7d68b5b5c1ff6365b8 Merge: 5601591035599 4bc2082311311 Author: Linus Torvalds Date: Sat May 15 08:52:30 2021 -0700 Merge tag 'block-5.13-2021-05-14' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - Fix for shared tag set exit (Bart) - Correct ioctl range for zoned ioctls (Damien) - Removed dead/unused function (Lin) - Fix perf regression for shared tags (Ming) - Fix out-of-bounds issue with kyber and preemption (Omar) - BFQ merge fix (Paolo) - Two error handling fixes for nbd (Sun) - Fix weight update in blk-iocost (Tejun) - NVMe pull request (Christoph): - correct the check for using the inline bio in nvmet (Chaitanya Kulkarni) - demote unsupported command warnings (Chaitanya Kulkarni) - fix corruption due to double initializing ANA state (me, Hou Pu) - reset ns->file when open fails (Daniel Wagner) - fix a NULL deref when SEND is completed with error in nvmet-rdma (Michal Kalderon) - Fix kernel-doc warning (Bart) * tag 'block-5.13-2021-05-14' of git://git.kernel.dk/linux-block: block/partitions/efi.c: Fix the efi_partition() kernel-doc header blk-mq: Swap two calls in blk_mq_exit_queue() blk-mq: plug request for shared sbitmap nvmet: use new ana_log_size instead the old one nvmet: seset ns->file when open fails nbd: share nbd_put and return by goto put_nbd nbd: Fix NULL pointer in flush_workqueue blkdev.h: remove unused codes blk_account_rq block, bfq: avoid circular stable merges blk-iocost: fix weight updates of inner active iocgs nvmet: demote fabrics cmd parse err msg to debug nvmet: use helper to remove the duplicate code nvmet: demote discovery cmd parse err msg to debug nvmet-rdma: Fix NULL deref when SEND is completed with error nvmet: fix inline bio check for passthru nvmet: fix inline bio check for bdev-ns nvme-multipath: fix double initialization of ANA state kyber: fix out of bounds access when preempted block: uapi: fix comment about block device ioctl commit 56015910355992f040f6163dcec96642021d2737 Merge: 41f035c062652 489809e2e22b3 Author: Linus Torvalds Date: Sat May 15 08:43:44 2021 -0700 Merge tag 'io_uring-5.13-2021-05-14' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Just a few minor fixes/changes: - Fix issue with double free race for linked timeout completions - Fix reference issue with timeouts - Remove last few places that make SQPOLL special, since it's just an io thread now. - Bump maximum allowed registered buffers, as we don't allocate as much anymore" * tag 'io_uring-5.13-2021-05-14' of git://git.kernel.dk/linux-block: io_uring: increase max number of reg buffers io_uring: further remove sqpoll limits on opcodes io_uring: fix ltout double free on completion race io_uring: fix link timeout refs commit 41f035c0626521fb2fdd694803c3397dbaddc9f3 Merge: a5ce4296b0416 0852b6ca941ef Author: Linus Torvalds Date: Sat May 15 08:37:21 2021 -0700 Merge tag 'erofs-for-5.13-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs fixes from Gao Xiang: "This mainly fixes 1 lcluster-sized pclusters for the big pcluster feature, which can be forcely generated by mkfs as a specific on-disk case for per-(sub)file compression strategies but missed to handle in runtime properly. Also, documentation updates are included to fix the broken illustration due to the ReST conversion by accident and complete the big pcluster introduction. Summary: - update documentation to fix the broken illustration due to ReST conversion by accident at that time and complete the big pcluster introduction - fix 1 lcluster-sized pclusters for the big pcluster feature" * tag 'erofs-for-5.13-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: erofs: fix 1 lcluster-sized pcluster for big pcluster erofs: update documentation about data compression erofs: fix broken illustration in documentation commit a5ce4296b0416b3001c69abef7b5fa751c0f7578 Merge: 393f42f113b60 e9cfd259c6d38 Author: Linus Torvalds Date: Sat May 15 08:32:51 2021 -0700 Merge tag 'libnvdimm-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "A regression fix for a bootup crash condition introduced in this merge window and some other minor fixups: - Fix regression in ACPI NFIT table handling leading to crashes and driver load failures. - Move the nvdimm mailing list - Miscellaneous minor fixups" * tag 'libnvdimm-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: ACPI: NFIT: Fix support for variable 'SPA' structure size MAINTAINERS: Move nvdimm mailing list tools/testing/nvdimm: Make symbol '__nfit_test_ioremap' static libnvdimm: Remove duplicate struct declaration commit 393f42f113b607786207449dc3241d05ec61d5dc Merge: 33f85ca44eec7 237388320deff Author: Linus Torvalds Date: Sat May 15 08:28:08 2021 -0700 Merge tag 'dax-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull dax fixes from Dan Williams: "A fix for a hang condition due to missed wakeups in the filesystem-dax core when exercised by virtiofs. This bug has been there from the beginning, but the condition has not triggered on other filesystems since they hold a lock over invalidation events" * tag 'dax-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Wake up all waiters after invalidating dax entry dax: Add a wakeup mode parameter to put_unlocked_entry() dax: Add an enum for specifying dax wakup mode commit 33f85ca44eec7f1ad4be3f3b8d575845b789f1b3 Merge: ffb324e6f8741 5dce58de4be8a Author: Linus Torvalds Date: Sat May 15 08:18:29 2021 -0700 Merge tag 'drm-fixes-2021-05-15' of git://anongit.freedesktop.org/drm/drm Pull more drm fixes from Dave Airlie: "Looks like I wasn't the only one not fully switched on this week. The msm pull has a missing tag so I missed it, and i915 team were a bit late. In my defence I did have a day with the roof of my home office removed, so was sitting at my kids desk. msm: - dsi regression fix - dma-buf pinning fix - displayport fixes - llc fix i915: - Fix active callback alignment annotations and subsequent crashes - Retract link training strategy to slow and wide, again - Avoid division by zero on gen2 - Use correct width reads for C0DRB3/C1DRB3 registers - Fix double free in pdp allocation failure path - Fix HDMI 2.1 PCON downstream caps check" * tag 'drm-fixes-2021-05-15' of git://anongit.freedesktop.org/drm/drm: drm/i915: Use correct downstream caps for check Src-Ctl mode for PCON drm/i915/overlay: Fix active retire callback alignment drm/i915: Fix crash in auto_retire drm/i915/gt: Fix a double free in gen8_preallocate_top_level_pdp drm/i915: Read C0DRB3/C1DRB3 as 16 bits again drm/i915: Avoid div-by-zero on gen2 drm/i915/dp: Use slow and wide link training for everything drm/msm/dp: initialize audio_comp when audio starts drm/msm/dp: check sink_count before update is_connected status drm/msm: fix minor version to indicate MSM_PARAM_SUSPENDS support drm/msm/dsi: fix msm_dsi_phy_get_clk_provider return code drm/msm/dsi: dsi_phy_28nm_8960: fix uninitialized variable access drm/msm: fix LLC not being enabled for mmu500 targets drm/msm: Do not unpin/evict exported dma-buf's commit ffb324e6f874121f7dce5bdae5e05d02baae7269 Author: Tetsuo Handa Date: Sat May 15 03:00:37 2021 +0000 tty: vt: always invoke vc->vc_sw->con_resize callback syzbot is reporting OOB write at vga16fb_imageblit() [1], for resize_screen() from ioctl(VT_RESIZE) returns 0 without checking whether requested rows/columns fit the amount of memory reserved for the graphical screen if current mode is KD_GRAPHICS. ---------- #include #include #include #include #include #include int main(int argc, char *argv[]) { const int fd = open("/dev/char/4:1", O_RDWR); struct vt_sizes vt = { 0x4100, 2 }; ioctl(fd, KDSETMODE, KD_GRAPHICS); ioctl(fd, VT_RESIZE, &vt); ioctl(fd, KDSETMODE, KD_TEXT); return 0; } ---------- Allow framebuffer drivers to return -EINVAL, by moving vc->vc_mode != KD_GRAPHICS check from resize_screen() to fbcon_resize(). Link: https://syzkaller.appspot.com/bug?extid=1f29e126cf461c4de3b3 [1] Reported-by: syzbot Suggested-by: Linus Torvalds Signed-off-by: Tetsuo Handa Tested-by: syzbot Signed-off-by: Linus Torvalds commit 2c2bdd2372afcfcf24fe11c65ebe3361b7e1cd9f Author: Felix Fietkau Date: Thu May 13 09:03:03 2021 +0200 mt76: validate rx A-MSDU subframes Mitigate A-MSDU injection attacks (CVE-2020-24588) by detecting if the destination address of a subframe equals an RFC1042 (i.e., LLC/SNAP) header, and if so dropping the complete A-MSDU frame. This mitigates known attacks, although new (unknown) aggregation-based attacks may remain possible. This defense works because in A-MSDU aggregation injection attacks, a normal encrypted Wi-Fi frame is turned into an A-MSDU frame. This means the first 6 bytes of the first A-MSDU subframe correspond to an RFC1042 header. In other words, the destination MAC address of the first A-MSDU subframe contains the start of an RFC1042 header during an aggregation attack. We can detect this and thereby prevent this specific attack. For details, see Section 7.2 of "Fragment and Forge: Breaking Wi-Fi Through Frame Aggregation and Fragmentation". Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210513070303.20253-1-nbd@nbd.name commit 509559c35bcd23d5a046624b225cb3e99a9f1481 Author: Lorenzo Bianconi Date: Fri May 7 18:50:19 2021 +0200 mt76: mt76x0e: fix device hang during suspend/resume Similar to usb device, re-initialize mt76x0e device after resume in order to fix mt7630e hang during suspend/resume Reported-by: Luca Trombin Fixes: c2a4d9fbabfb9 ("mt76x0: inital split between pci and usb") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/4812f9611624b34053c1592fd9c175b67d4ffcb4.1620406022.git.lorenzo@kernel.org commit 94bb18b03d43f32e9440e8e350b7f533137c40f6 Author: Felix Fietkau Date: Fri May 7 12:02:11 2021 +0200 mt76: mt7921: fix max aggregation subframes setting The hardware can only handle 64 subframes in rx direction and 128 for tx. Improves throughput with APs that can handle more than that Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210507100211.15709-2-nbd@nbd.name commit d6245712add0af27f64d66793bf9c00f882e2d15 Author: Felix Fietkau Date: Fri May 7 12:02:10 2021 +0200 mt76: connac: fix HT A-MPDU setting field in STA_REC_PHY The MT7921 firmware needs this to enable tx A-MPDU properly Reported-by: Jayden Kuo (郭育辰) Signed-off-by: Felix Fietkau Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210507100211.15709-1-nbd@nbd.name commit 6061fcf4820a2036189d0a6215f75a913f0fb5a1 Author: Lorenzo Bianconi Date: Fri Apr 23 16:27:11 2021 +0200 mt76: connac: do not schedule mac_work if the device is not running Do not run ieee80211_queue_delayed_work for mac work if the worqueue is not initialized yet Fixes: b1bd7bb8121d ("mt76: connac: unschedule mac_work before going to sleep") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/5bfd36a75799c37b12fcb54d17e77fbc2c7a0558.1619187875.git.lorenzo@kernel.org commit d874e6c06952382897d35bf4094193cd44ae91bd Author: Lorenzo Bianconi Date: Fri Apr 23 16:27:09 2021 +0200 mt76: mt7921: fix possible AOOB issue in mt7921_mcu_tx_rate_report Fix possible array out of bound access in mt7921_mcu_tx_rate_report. Remove unnecessary varibable in mt7921_mcu_tx_rate_report Fixes: 1c099ab44727c ("mt76: mt7921: add MCU support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/91a1e8f6b6a3e6a929de560ed68132f6eb421720.1619187875.git.lorenzo@kernel.org commit cb853ded1d25e5b026ce115dbcde69e3d7e2e831 Author: Marc Zyngier Date: Fri May 14 09:05:41 2021 +0100 KVM: arm64: Fix debug register indexing Commit 03fdfb2690099 ("KVM: arm64: Don't write junk to sysregs on reset") flipped the register number to 0 for all the debug registers in the sysreg table, hereby indicating that these registers live in a separate shadow structure. However, the author of this patch failed to realise that all the accessors are using that particular index instead of the register encoding, resulting in all the registers hitting index 0. Not quite a valid implementation of the architecture... Address the issue by fixing all the accessors to use the CRm field of the encoding, which contains the debug register index. Fixes: 03fdfb2690099 ("KVM: arm64: Don't write junk to sysregs on reset") Reported-by: Ricardo Koller Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org commit 26778aaa134a9aefdf5dbaad904054d7be9d656d Author: Marc Zyngier Date: Thu May 6 15:20:12 2021 +0100 KVM: arm64: Commit pending PC adjustemnts before returning to userspace KVM currently updates PC (and the corresponding exception state) using a two phase approach: first by setting a set of flags, then by converting these flags into a state update when the vcpu is about to enter the guest. However, this creates a disconnect with userspace if the vcpu thread returns there with any exception/PC flag set. In this case, the exposed context is wrong, as userspace doesn't have access to these flags (they aren't architectural). It also means that these flags are preserved across a reset, which isn't expected. To solve this problem, force an explicit synchronisation of the exception state on vcpu exit to userspace. As an optimisation for nVHE systems, only perform this when there is something pending. Reported-by: Zenghui Yu Reviewed-by: Alexandru Elisei Reviewed-by: Zenghui Yu Tested-by: Zenghui Yu Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org # 5.11 commit f5e30680616ab09e690b153b7a68ff7dd13e6579 Author: Marc Zyngier Date: Thu May 6 14:31:42 2021 +0100 KVM: arm64: Move __adjust_pc out of line In order to make it easy to call __adjust_pc() from the EL1 code (in the case of nVHE), rename it to __kvm_adjust_pc() and move it out of line. No expected functional change. Reviewed-by: Alexandru Elisei Reviewed-by: Zenghui Yu Tested-by: Zenghui Yu Signed-off-by: Marc Zyngier Cc: stable@vger.kernel.org # 5.11 commit 3fdc15fe8c6445175d61f0fac111d2ee9354e385 Author: Quentin Perret Date: Fri May 14 08:56:40 2021 +0000 KVM: arm64: Mark the host stage-2 memory pools static The host stage-2 memory pools are not used outside of mem_protect.c, mark them static. Fixes: 1025c8c0c6ac ("KVM: arm64: Wrap the host with a stage 2") Reported-by: kernel test robot Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210514085640.3917886-3-qperret@google.com commit eaa9b88dae64254a87d3d83b77afa71ee992f502 Author: Quentin Perret Date: Fri May 14 08:56:39 2021 +0000 KVM: arm64: Mark pkvm_pgtable_mm_ops static It is not used outside of setup.c, mark it static. Fixes:f320bc742bc2 ("KVM: arm64: Prepare the creation of s1 mappings at EL2") Reported-by: kernel test robot Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210514085640.3917886-2-qperret@google.com commit fcb8283920b135bca2916133e2383a501ad57eaa Author: kernel test robot Date: Tue Apr 27 06:33:57 2021 +0800 KVM: arm64: Fix boolreturn.cocci warnings arch/arm64/kvm/mmu.c:1114:9-10: WARNING: return of 0/1 in function 'kvm_age_gfn' with return type bool arch/arm64/kvm/mmu.c:1084:9-10: WARNING: return of 0/1 in function 'kvm_set_spte_gfn' with return type bool arch/arm64/kvm/mmu.c:1127:9-10: WARNING: return of 0/1 in function 'kvm_test_age_gfn' with return type bool arch/arm64/kvm/mmu.c:1070:9-10: WARNING: return of 0/1 in function 'kvm_unmap_gfn_range' with return type bool Return statements in functions returning bool should use true/false instead of 1/0. Generated by: scripts/coccinelle/misc/boolreturn.cocci Fixes: cd4c71835228 ("KVM: arm64: Convert to the gfn-based MMU notifier callbacks") Reported-by: kernel test robot Signed-off-by: kernel test robot Reviewed-by: Sean Christopherson Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210426223357.GA45871@cd4295a34ed8 commit e44b49f623c77bee7451f1a82ccfb969c1028ae2 Author: Zhu Lingshan Date: Sat May 8 15:11:52 2021 +0800 Revert "irqbypass: do not start cons/prod when failed connect" This reverts commit a979a6aa009f3c99689432e0cdb5402a4463fb88. The reverted commit may cause VM freeze on arm64 with GICv4, where stopping a consumer is implemented by suspending the VM. Should the connect fail, the VM will not be resumed, which is a bit of a problem. It also erroneously calls the producer destructor unconditionally, which is unexpected. Reported-by: Shaokun Zhang Suggested-by: Marc Zyngier Acked-by: Jason Wang Acked-by: Michael S. Tsirkin Reviewed-by: Eric Auger Tested-by: Shaokun Zhang Signed-off-by: Zhu Lingshan [maz: tags and cc-stable, commit message update] Signed-off-by: Marc Zyngier Fixes: a979a6aa009f ("irqbypass: do not start cons/prod when failed connect") Link: https://lore.kernel.org/r/3a2c66d6-6ca0-8478-d24b-61e8e3241b20@hisilicon.com Link: https://lore.kernel.org/r/20210508071152.722425-1-lingshan.zhu@intel.com Cc: stable@vger.kernel.org commit 8b549c18ae81dbc36fb11e4aa08b8378c599ca95 Author: Peter Zijlstra Date: Wed Apr 14 14:45:43 2021 +0200 openrisc: Define memory barrier mb This came up in the discussion of the requirements of qspinlock on an architecture. OpenRISC uses qspinlock, but it was noticed that the memmory barrier was not defined. Peter defined it in the mail thread writing: As near as I can tell this should do. The arch spec only lists this one instruction and the text makes it sound like a completion barrier. This is correct so applying this patch. Signed-off-by: Peter Zijlstra [shorne@gmail.com:Turned the mail into a patch] Signed-off-by: Stafford Horne commit 73578af92a0fae6609b955fcc9113e50e413c80f Author: Javed Hasan Date: Wed May 12 00:25:33 2021 -0700 scsi: qedf: Add pointer checks in qedf_update_link_speed() The following trace was observed: [ 14.042059] Call Trace: [ 14.042061] [ 14.042068] qedf_link_update+0x144/0x1f0 [qedf] [ 14.042117] qed_link_update+0x5c/0x80 [qed] [ 14.042135] qed_mcp_handle_link_change+0x2d2/0x410 [qed] [ 14.042155] ? qed_set_ptt+0x70/0x80 [qed] [ 14.042170] ? qed_set_ptt+0x70/0x80 [qed] [ 14.042186] ? qed_rd+0x13/0x40 [qed] [ 14.042205] qed_mcp_handle_events+0x437/0x690 [qed] [ 14.042221] ? qed_set_ptt+0x70/0x80 [qed] [ 14.042239] qed_int_sp_dpc+0x3a6/0x3e0 [qed] [ 14.042245] tasklet_action_common.isra.14+0x5a/0x100 [ 14.042250] __do_softirq+0xe4/0x2f8 [ 14.042253] irq_exit+0xf7/0x100 [ 14.042255] do_IRQ+0x7f/0xd0 [ 14.042257] common_interrupt+0xf/0xf [ 14.042259] API qedf_link_update() is getting called from QED but by that time shost_data is not initialised. This results in a NULL pointer dereference when we try to dereference shost_data while updating supported_speeds. Add a NULL pointer check before dereferencing shost_data. Link: https://lore.kernel.org/r/20210512072533.23618-1-jhasan@marvell.com Fixes: 61d8658b4a43 ("scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.") Reviewed-by: Himanshu Madhani Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 86d0c164272536c732853e19391de5159f860701 Author: Christophe Leroy Date: Fri May 14 17:27:39 2021 -0700 mm/ioremap: fix iomap_max_page_shift iomap_max_page_shift is expected to contain a page shift, so it can't be a 'bool', has to be an 'unsigned int' And fix the default values: P4D_SHIFT is when huge iomap is allowed. However, on some architectures (eg: powerpc book3s/64), P4D_SHIFT is not a constant so it can't be used to initialise a static variable. So, initialise iomap_max_page_shift with a maximum shift supported by the architecture, it is gated by P4D_SHIFT in vmap_try_huge_p4d() anyway. Link: https://lkml.kernel.org/r/ad2d366015794a9f21320dcbdd0a8eb98979e9df.1620898113.git.christophe.leroy@csgroup.eu Fixes: bbc180a5adb0 ("mm: HUGE_VMAP arch support cleanup") Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4d3f25aced3b493e57fd4109e2bc86f0831b23e Author: Rasmus Villemoes Date: Fri May 14 17:27:36 2021 -0700 docs: admin-guide: update description for kernel.modprobe sysctl When I added CONFIG_MODPROBE_PATH, I neglected to update Documentation/. It's still true that this defaults to /sbin/modprobe, but now via a level of indirection. So document that the kernel might have been built with something other than /sbin/modprobe as the initial value. Link: https://lkml.kernel.org/r/20210420125324.1246826-1-linux@rasmusvillemoes.dk Fixes: 17652f4240f7a ("modules: add CONFIG_MODPROBE_PATH") Signed-off-by: Rasmus Villemoes Cc: Jonathan Corbet Cc: Greg Kroah-Hartman Cc: Jessica Yu Cc: Luis Chamberlain Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c3187cf32216313fb316084efac4dab3a8459b1d Author: Jouni Roivas Date: Fri May 14 17:27:33 2021 -0700 hfsplus: prevent corruption in shrinking truncate I believe there are some issues introduced by commit 31651c607151 ("hfsplus: avoid deadlock on file truncation") HFS+ has extent records which always contains 8 extents. In case the first extent record in catalog file gets full, new ones are allocated from extents overflow file. In case shrinking truncate happens to middle of an extent record which locates in extents overflow file, the logic in hfsplus_file_truncate() was changed so that call to hfs_brec_remove() is not guarded any more. Right action would be just freeing the extents that exceed the new size inside extent record by calling hfsplus_free_extents(), and then check if the whole extent record should be removed. However since the guard (blk_cnt > start) is now after the call to hfs_brec_remove(), this has unfortunate effect that the last matching extent record is removed unconditionally. To reproduce this issue, create a file which has at least 10 extents, and then perform shrinking truncate into middle of the last extent record, so that the number of remaining extents is not under or divisible by 8. This causes the last extent record (8 extents) to be removed totally instead of truncating into middle of it. Thus this causes corruption, and lost data. Fix for this is simply checking if the new truncated end is below the start of this extent record, making it safe to remove the full extent record. However call to hfs_brec_remove() can't be moved to it's previous place since we're dropping ->tree_lock and it can cause a race condition and the cached info being invalidated possibly corrupting the node data. Another issue is related to this one. When entering into the block (blk_cnt > start) we are not holding the ->tree_lock. We break out from the loop not holding the lock, but hfs_find_exit() does unlock it. Not sure if it's possible for someone else to take the lock under our feet, but it can cause hard to debug errors and premature unlocking. Even if there's no real risk of it, the locking should still always be kept in balance. Thus taking the lock now just before the check. Link: https://lkml.kernel.org/r/20210429165139.3082828-1-jouni.roivas@tuxera.com Fixes: 31651c607151f ("hfsplus: avoid deadlock on file truncation") Signed-off-by: Jouni Roivas Reviewed-by: Anton Altaparmakov Cc: Anatoly Trosinenko Cc: Viacheslav Dubeyko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 076171a67789ad0107de44c2964f2e46a7d0d7b8 Author: Matthew Wilcox (Oracle) Date: Fri May 14 17:27:30 2021 -0700 mm/filemap: fix readahead return types A readahead request will not allocate more memory than can be represented by a size_t, even on systems that have HIGHMEM available. Change the length functions from returning an loff_t to a size_t. Link: https://lkml.kernel.org/r/20210510201201.1558972-1-willy@infradead.org Fixes: 32c0a6bcaa1f57 ("btrfs: add and use readahead_batch_length") Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Darrick J. Wong Reported-by: Linus Torvalds Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f649dc0e0d7b509c75570ee403723660f5b72ec7 Author: Peter Collingbourne Date: Fri May 14 17:27:27 2021 -0700 kasan: fix unit tests with CONFIG_UBSAN_LOCAL_BOUNDS enabled These tests deliberately access these arrays out of bounds, which will cause the dynamic local bounds checks inserted by CONFIG_UBSAN_LOCAL_BOUNDS to fail and panic the kernel. To avoid this problem, access the arrays via volatile pointers, which will prevent the compiler from being able to determine the array bounds. These accesses use volatile pointers to char (char *volatile) rather than the more conventional pointers to volatile char (volatile char *) because we want to prevent the compiler from making inferences about the pointer itself (i.e. its array bounds), not the data that it refers to. Link: https://lkml.kernel.org/r/20210507025915.1464056-1-pcc@google.com Link: https://linux-review.googlesource.com/id/I90b1713fbfa1bf68ff895aef099ea77b98a7c3b9 Signed-off-by: Peter Collingbourne Tested-by: Alexander Potapenko Reviewed-by: Andrey Konovalov Cc: Peter Collingbourne Cc: George Popescu Cc: Elena Petrova Cc: Evgenii Stepanov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9ddb3c14afba8bc5950ed297f02d4ae05ff35cd1 Author: Matthew Wilcox (Oracle) Date: Fri May 14 17:27:24 2021 -0700 mm: fix struct page layout on 32-bit systems 32-bit architectures which expect 8-byte alignment for 8-byte integers and need 64-bit DMA addresses (arm, mips, ppc) had their struct page inadvertently expanded in 2019. When the dma_addr_t was added, it forced the alignment of the union to 8 bytes, which inserted a 4 byte gap between 'flags' and the union. Fix this by storing the dma_addr_t in one or two adjacent unsigned longs. This restores the alignment to that of an unsigned long. We always store the low bits in the first word to prevent the PageTail bit from being inadvertently set on a big endian platform. If that happened, get_user_pages_fast() racing against a page which was freed and reallocated to the page_pool could dereference a bogus compound_head(), which would be hard to trace back to this cause. Link: https://lkml.kernel.org/r/20210510153211.1504886-1-willy@infradead.org Fixes: c25fff7171be ("mm: add dma_addr_t to struct page") Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Ilias Apalodimas Acked-by: Jesper Dangaard Brouer Acked-by: Vlastimil Babka Tested-by: Matteo Croce Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 628622904b8d229591134e44efd6608a7541eb89 Author: Hugh Dickins Date: Fri May 14 17:27:22 2021 -0700 ksm: revert "use GET_KSM_PAGE_NOLOCK to get ksm page in remove_rmap_item_from_tree()" This reverts commit 3e96b6a2e9ad929a3230a22f4d64a74671a0720b. General Protection Fault in rmap_walk_ksm() under memory pressure: remove_rmap_item_from_tree() needs to take page lock, of course. Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2105092253500.1127@eggly.anvils Signed-off-by: Hugh Dickins Cc: Miaohe Lin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ed9d238c7dbb1fdb63ad96a6184985151b0171c Author: Axel Rasmussen Date: Fri May 14 17:27:19 2021 -0700 userfaultfd: release page in error path to avoid BUG_ON Consider the following sequence of events: 1. Userspace issues a UFFD ioctl, which ends up calling into shmem_mfill_atomic_pte(). We successfully account the blocks, we shmem_alloc_page(), but then the copy_from_user() fails. We return -ENOENT. We don't release the page we allocated. 2. Our caller detects this error code, tries the copy_from_user() after dropping the mmap_lock, and retries, calling back into shmem_mfill_atomic_pte(). 3. Meanwhile, let's say another process filled up the tmpfs being used. 4. So shmem_mfill_atomic_pte() fails to account blocks this time, and immediately returns - without releasing the page. This triggers a BUG_ON in our caller, which asserts that the page should always be consumed, unless -ENOENT is returned. To fix this, detect if we have such a "dangling" page when accounting fails, and if so, release it before returning. Link: https://lkml.kernel.org/r/20210428230858.348400-1-axelrasmussen@google.com Fixes: cb658a453b93 ("userfaultfd: shmem: avoid leaking blocks and used blocks in UFFDIO_COPY") Signed-off-by: Axel Rasmussen Reported-by: Hugh Dickins Acked-by: Hugh Dickins Reviewed-by: Peter Xu Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d6e621de1fceb3b098ebf435ef7ea91ec4838a1a Author: Phillip Lougher Date: Fri May 14 17:27:16 2021 -0700 squashfs: fix divide error in calculate_skip() Sysbot has reported a "divide error" which has been identified as being caused by a corrupted file_size value within the file inode. This value has been corrupted to a much larger value than expected. Calculate_skip() is passed i_size_read(inode) >> msblk->block_log. Due to the file_size value corruption this overflows the int argument/variable in that function, leading to the divide error. This patch changes the function to use u64. This will accommodate any unexpectedly large values due to corruption. The value returned from calculate_skip() is clamped to be never more than SQUASHFS_CACHED_BLKS - 1, or 7. So file_size corruption does not lead to an unexpectedly large return result here. Link: https://lkml.kernel.org/r/20210507152618.9447-1-phillip@squashfs.org.uk Signed-off-by: Phillip Lougher Reported-by: Reported-by: Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb1f065f90cdcdcc704e9e2dc678931317c69a99 Author: Alistair Popple Date: Fri May 14 17:27:13 2021 -0700 kernel/resource: fix return code check in __request_free_mem_region Splitting an earlier version of a patch that allowed calling __request_region() while holding the resource lock into a series of patches required changing the return code for the newly introduced __request_region_locked(). Unfortunately this change was not carried through to a subsequent commit 56fd94919b8b ("kernel/resource: fix locking in request_free_mem_region") in the series. This resulted in a use-after-free due to freeing the struct resource without properly releasing it. Fix this by correcting the return code check so that the struct is not freed if the request to add it was successful. Link: https://lkml.kernel.org/r/20210512073528.22334-1-apopple@nvidia.com Fixes: 56fd94919b8b ("kernel/resource: fix locking in request_free_mem_region") Signed-off-by: Alistair Popple Reported-by: kernel test robot Reviewed-by: David Hildenbrand Cc: Balbir Singh Cc: Dan Williams Cc: Daniel Vetter Cc: Greg Kroah-Hartman Cc: Jerome Glisse Cc: John Hubbard Cc: Muchun Song Cc: Oliver Sang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit afe0c26d1968fe3bbef6a45df945bfeff774ca75 Author: Vlastimil Babka Date: Fri May 14 17:27:10 2021 -0700 mm, slub: move slub_debug static key enabling outside slab_mutex Paul E. McKenney reported [1] that commit 1f0723a4c0df ("mm, slub: enable slub_debug static key when creating cache with explicit debug flags") results in the lockdep complaint: ====================================================== WARNING: possible circular locking dependency detected 5.12.0+ #15 Not tainted ------------------------------------------------------ rcu_torture_sta/109 is trying to acquire lock: ffffffff96063cd0 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_enable+0x9/0x20 but task is already holding lock: ffffffff96173c28 (slab_mutex){+.+.}-{3:3}, at: kmem_cache_create_usercopy+0x2d/0x250 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (slab_mutex){+.+.}-{3:3}: lock_acquire+0xb9/0x3a0 __mutex_lock+0x8d/0x920 slub_cpu_dead+0x15/0xf0 cpuhp_invoke_callback+0x17a/0x7c0 cpuhp_invoke_callback_range+0x3b/0x80 _cpu_down+0xdf/0x2a0 cpu_down+0x2c/0x50 device_offline+0x82/0xb0 remove_cpu+0x1a/0x30 torture_offline+0x80/0x140 torture_onoff+0x147/0x260 kthread+0x10a/0x140 ret_from_fork+0x22/0x30 -> #0 (cpu_hotplug_lock){++++}-{0:0}: check_prev_add+0x8f/0xbf0 __lock_acquire+0x13f0/0x1d80 lock_acquire+0xb9/0x3a0 cpus_read_lock+0x21/0xa0 static_key_enable+0x9/0x20 __kmem_cache_create+0x38d/0x430 kmem_cache_create_usercopy+0x146/0x250 kmem_cache_create+0xd/0x10 rcu_torture_stats+0x79/0x280 kthread+0x10a/0x140 ret_from_fork+0x22/0x30 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(slab_mutex); lock(cpu_hotplug_lock); lock(slab_mutex); lock(cpu_hotplug_lock); *** DEADLOCK *** 1 lock held by rcu_torture_sta/109: #0: ffffffff96173c28 (slab_mutex){+.+.}-{3:3}, at: kmem_cache_create_usercopy+0x2d/0x250 stack backtrace: CPU: 3 PID: 109 Comm: rcu_torture_sta Not tainted 5.12.0+ #15 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.13.0-1ubuntu1.1 04/01/2014 Call Trace: dump_stack+0x6d/0x89 check_noncircular+0xfe/0x110 ? lock_is_held_type+0x98/0x110 check_prev_add+0x8f/0xbf0 __lock_acquire+0x13f0/0x1d80 lock_acquire+0xb9/0x3a0 ? static_key_enable+0x9/0x20 ? mark_held_locks+0x49/0x70 cpus_read_lock+0x21/0xa0 ? static_key_enable+0x9/0x20 static_key_enable+0x9/0x20 __kmem_cache_create+0x38d/0x430 kmem_cache_create_usercopy+0x146/0x250 ? rcu_torture_stats_print+0xd0/0xd0 kmem_cache_create+0xd/0x10 rcu_torture_stats+0x79/0x280 ? rcu_torture_stats_print+0xd0/0xd0 kthread+0x10a/0x140 ? kthread_park+0x80/0x80 ret_from_fork+0x22/0x30 This is because there's one order of locking from the hotplug callbacks: lock(cpu_hotplug_lock); // from hotplug machinery itself lock(slab_mutex); // in e.g. slab_mem_going_offline_callback() And commit 1f0723a4c0df made the reverse sequence possible: lock(slab_mutex); // in kmem_cache_create_usercopy() lock(cpu_hotplug_lock); // kmem_cache_open() -> static_key_enable() The simplest fix is to move static_key_enable() to a place before slab_mutex is taken. That means kmem_cache_create_usercopy() in mm/slab_common.c which is not ideal for SLUB-specific code, but the #ifdef CONFIG_SLUB_DEBUG makes it at least self-contained and obvious. [1] https://lore.kernel.org/lkml/20210502171827.GA3670492@paulmck-ThinkPad-P17-Gen-1/ Link: https://lkml.kernel.org/r/20210504120019.26791-1-vbabka@suse.cz Fixes: 1f0723a4c0df ("mm, slub: enable slub_debug static key when creating cache with explicit debug flags") Signed-off-by: Vlastimil Babka Reported-by: Paul E. McKenney Tested-by: Paul E. McKenney Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84894e1c42e9f25c17f2888e0c0e1505cb727538 Author: Peter Xu Date: Fri May 14 17:27:07 2021 -0700 mm/hugetlb: fix cow where page writtable in child When rework early cow of pinned hugetlb pages, we moved huge_ptep_get() upper but overlooked a side effect that the huge_ptep_get() will fetch the pte after wr-protection. After moving it upwards, we need explicit wr-protect of child pte or we will keep the write bit set in the child process, which could cause data corrution where the child can write to the original page directly. This issue can also be exposed by "memfd_test hugetlbfs" kselftest. Link: https://lkml.kernel.org/r/20210503234356.9097-3-peterx@redhat.com Fixes: 4eae4efa2c299 ("hugetlb: do early cow when page pinned on src mm") Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Cc: Hugh Dickins Cc: Joel Fernandes (Google) Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 22247efd822e6d263f3c8bd327f3f769aea9b1d9 Author: Peter Xu Date: Fri May 14 17:27:04 2021 -0700 mm/hugetlb: fix F_SEAL_FUTURE_WRITE Patch series "mm/hugetlb: Fix issues on file sealing and fork", v2. Hugh reported issue with F_SEAL_FUTURE_WRITE not applied correctly to hugetlbfs, which I can easily verify using the memfd_test program, which seems that the program is hardly run with hugetlbfs pages (as by default shmem). Meanwhile I found another probably even more severe issue on that hugetlb fork won't wr-protect child cow pages, so child can potentially write to parent private pages. Patch 2 addresses that. After this series applied, "memfd_test hugetlbfs" should start to pass. This patch (of 2): F_SEAL_FUTURE_WRITE is missing for hugetlb starting from the first day. There is a test program for that and it fails constantly. $ ./memfd_test hugetlbfs memfd-hugetlb: CREATE memfd-hugetlb: BASIC memfd-hugetlb: SEAL-WRITE memfd-hugetlb: SEAL-FUTURE-WRITE mmap() didn't fail as expected Aborted (core dumped) I think it's probably because no one is really running the hugetlbfs test. Fix it by checking FUTURE_WRITE also in hugetlbfs_file_mmap() as what we do in shmem_mmap(). Generalize a helper for that. Link: https://lkml.kernel.org/r/20210503234356.9097-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20210503234356.9097-2-peterx@redhat.com Fixes: ab3948f58ff84 ("mm/memfd: add an F_SEAL_FUTURE_WRITE seal to memfd") Signed-off-by: Peter Xu Reported-by: Hugh Dickins Reviewed-by: Mike Kravetz Cc: Joel Fernandes (Google) Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d0b2b70eb12e9ffaf95e11b16b230a4e015a536c Author: Bart Van Assche Date: Thu May 13 09:49:12 2021 -0700 scsi: ufs: core: Increase the usable queue depth With the current implementation of the UFS driver active_queues is 1 instead of 0 if all UFS request queues are idle. That causes hctx_may_queue() to divide the queue depth by 2 when queueing a request and hence reduces the usable queue depth. The shared tag set code in the block layer keeps track of the number of active request queues. blk_mq_tag_busy() is called before a request is queued onto a hwq and blk_mq_tag_idle() is called some time after the hwq became idle. blk_mq_tag_idle() is called from inside blk_mq_timeout_work(). Hence, blk_mq_tag_idle() is only called if a timer is associated with each request that is submitted to a request queue that shares a tag set with another request queue. Adds a blk_mq_start_request() call in ufshcd_exec_dev_cmd(). This doubles the queue depth on my test setup from 16 to 32. In addition to increasing the usable queue depth, also fix the documentation of the 'timeout' parameter in the header above ufshcd_exec_dev_cmd(). Link: https://lore.kernel.org/r/20210513164912.5683-1-bvanassche@acm.org Fixes: 7252a3603015 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts") Cc: Can Guo Cc: Alim Akhtar Cc: Avri Altman Cc: Stanley Chu Cc: Bean Huo Cc: Adrian Hunter Reviewed-by: Can Guo Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 56f396146af278135c0ff958c79b5ee1bd22453d Author: Matt Wang Date: Tue May 11 03:04:37 2021 +0000 scsi: BusLogic: Fix 64-bit system enumeration error for Buslogic Commit 391e2f25601e ("[SCSI] BusLogic: Port driver to 64-bit") introduced a serious issue for 64-bit systems. With this commit, 64-bit kernel will enumerate 8*15 non-existing disks. This is caused by the broken CCB structure. The change from u32 data to void *data increased CCB length on 64-bit system, which introduced an extra 4 byte offset of the CDB. This leads to incorrect response to INQUIRY commands during enumeration. Fix disk enumeration failure by reverting the portion of the commit above which switched the data pointer from u32 to void. Link: https://lore.kernel.org/r/C325637F-1166-4340-8F0F-3BCCD59D4D54@vmware.com Acked-by: Khalid Aziz Signed-off-by: Matt Wang Signed-off-by: Martin K. Petersen commit c625b80b9d00f3546722cd77527f9697c8c4c911 Author: Peter Wang Date: Wed May 12 18:01:45 2021 +0800 scsi: ufs: ufs-mediatek: Fix power down spec violation As per spec, e.g. JESD220E chapter 7.2, while powering off the UFS device, RST_N signal should be between VSS(Ground) and VCCQ/VCCQ2. The power down sequence after fixing: Power down: 1. Assert RST_N low 2. Turn-off VCC 3. Turn-off VCCQ/VCCQ2 Link: https://lore.kernel.org/r/1620813706-25331-1-git-send-email-peter.wang@mediatek.com Reviewed-by: Stanley Chu Signed-off-by: Peter Wang Signed-off-by: Martin K. Petersen commit b81ac7841d511d68989534eff5550269e1bf896d Author: Jonathan Davies Date: Fri May 14 14:41:01 2021 +0000 net: cdc_eem: fix URL to CDC EEM 1.0 spec The old URL is no longer accessible. Signed-off-by: Jonathan Davies Signed-off-by: David S. Miller commit a0c5393d5bacbed827ce3e45f53751d2f55d6f6a Merge: 974271e5ed45c dcad9ee9e0663 Author: David S. Miller Date: Fri May 14 15:05:46 2021 -0700 Merge branch 'lockless-qdisc-packet-stuck' Yunsheng Lin says: ==================== ix packet stuck problem for lockless qdisc This patchset fixes the packet stuck problem mentioned in [1]. Patch 1: Add STATE_MISSED flag to fix packet stuck problem. Patch 2: Fix a tx_action rescheduling problem after STATE_MISSED flag is added in patch 1. Patch 3: Fix the significantly higher CPU consumption problem when multiple threads are competing on a saturated outgoing device. V8: Change function name as suggested by Jakub and fix some typo in patch 3, adjust commit log in patch 2, and add Acked-by from Jakub. V7: Fix netif_tx_wake_queue() data race noted by Jakub. V6: Some performance optimization in patch 1 suggested by Jakub and drop NET_XMIT_DROP checking in patch 3. V5: add patch 3 to fix the problem reported by Michal Kubecek. V4: Change STATE_NEED_RESCHEDULE to STATE_MISSED and add patch 2. [1]. https://lkml.org/lkml/2019/10/9/42 ==================== Signed-off-by: David S. Miller commit dcad9ee9e0663d74a89b25b987f9c7be86432812 Author: Yunsheng Lin Date: Fri May 14 11:17:01 2021 +0800 net: sched: fix tx action reschedule issue with stopped queue The netdev qeueue might be stopped when byte queue limit has reached or tx hw ring is full, net_tx_action() may still be rescheduled if STATE_MISSED is set, which consumes unnecessary cpu without dequeuing and transmiting any skb because the netdev queue is stopped, see qdisc_run_end(). This patch fixes it by checking the netdev queue state before calling qdisc_run() and clearing STATE_MISSED if netdev queue is stopped during qdisc_run(), the net_tx_action() is rescheduled again when netdev qeueue is restarted, see netif_tx_wake_queue(). As there is time window between netif_xmit_frozen_or_stopped() checking and STATE_MISSED clearing, between which STATE_MISSED may set by net_tx_action() scheduled by netif_tx_wake_queue(), so set the STATE_MISSED again if netdev queue is restarted. Fixes: 6b3ba9146fe6 ("net: sched: allow qdiscs to handle locking") Reported-by: Michal Kubecek Acked-by: Jakub Kicinski Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 102b55ee92f9fda4dde7a45d2b20538e6e3e3d1e Author: Yunsheng Lin Date: Fri May 14 11:17:00 2021 +0800 net: sched: fix tx action rescheduling issue during deactivation Currently qdisc_run() checks the STATE_DEACTIVATED of lockless qdisc before calling __qdisc_run(), which ultimately clear the STATE_MISSED when all the skb is dequeued. If STATE_DEACTIVATED is set before clearing STATE_MISSED, there may be rescheduling of net_tx_action() at the end of qdisc_run_end(), see below: CPU0(net_tx_atcion) CPU1(__dev_xmit_skb) CPU2(dev_deactivate) . . . . set STATE_MISSED . . __netif_schedule() . . . set STATE_DEACTIVATED . . qdisc_reset() . . . .<--------------- . synchronize_net() clear __QDISC_STATE_SCHED | . . . | . . . | . some_qdisc_is_busy() . | . return *false* . | . . test STATE_DEACTIVATED | . . __qdisc_run() *not* called | . . . | . . test STATE_MISS | . . __netif_schedule()--------| . . . . . . . . __qdisc_run() is not called by net_tx_atcion() in CPU0 because CPU2 has set STATE_DEACTIVATED flag during dev_deactivate(), and STATE_MISSED is only cleared in __qdisc_run(), __netif_schedule is called at the end of qdisc_run_end(), causing tx action rescheduling problem. qdisc_run() called by net_tx_action() runs in the softirq context, which should has the same semantic as the qdisc_run() called by __dev_xmit_skb() protected by rcu_read_lock_bh(). And there is a synchronize_net() between STATE_DEACTIVATED flag being set and qdisc_reset()/some_qdisc_is_busy in dev_deactivate(), we can safely bail out for the deactived lockless qdisc in net_tx_action(), and qdisc_reset() will reset all skb not dequeued yet. So add the rcu_read_lock() explicitly to protect the qdisc_run() and do the STATE_DEACTIVATED checking in net_tx_action() before calling qdisc_run_begin(). Another option is to do the checking in the qdisc_run_end(), but it will add unnecessary overhead for non-tx_action case, because __dev_queue_xmit() will not see qdisc with STATE_DEACTIVATED after synchronize_net(), the qdisc with STATE_DEACTIVATED can only be seen by net_tx_action() because of __netif_schedule(). The STATE_DEACTIVATED checking in qdisc_run() is to avoid race between net_tx_action() and qdisc_reset(), see: commit d518d2ed8640 ("net/sched: fix race between deactivation and dequeue for NOLOCK qdisc"). As the bailout added above for deactived lockless qdisc in net_tx_action() provides better protection for the race without calling qdisc_run() at all, so remove the STATE_DEACTIVATED checking in qdisc_run(). After qdisc_reset(), there is no skb in qdisc to be dequeued, so clear the STATE_MISSED in dev_reset_queue() too. Fixes: 6b3ba9146fe6 ("net: sched: allow qdiscs to handle locking") Acked-by: Jakub Kicinski Signed-off-by: Yunsheng Lin V8: Clearing STATE_MISSED before calling __netif_schedule() has avoid the endless rescheduling problem, but there may still be a unnecessary rescheduling, so adjust the commit log. Signed-off-by: David S. Miller commit a90c57f2cedd52a511f739fb55e6244e22e1a2fb Author: Yunsheng Lin Date: Fri May 14 11:16:59 2021 +0800 net: sched: fix packet stuck problem for lockless qdisc Lockless qdisc has below concurrent problem: cpu0 cpu1 . . q->enqueue . . . qdisc_run_begin() . . . dequeue_skb() . . . sch_direct_xmit() . . . . q->enqueue . qdisc_run_begin() . return and do nothing . . qdisc_run_end() . cpu1 enqueue a skb without calling __qdisc_run() because cpu0 has not released the lock yet and spin_trylock() return false for cpu1 in qdisc_run_begin(), and cpu0 do not see the skb enqueued by cpu1 when calling dequeue_skb() because cpu1 may enqueue the skb after cpu0 calling dequeue_skb() and before cpu0 calling qdisc_run_end(). Lockless qdisc has below another concurrent problem when tx_action is involved: cpu0(serving tx_action) cpu1 cpu2 . . . . q->enqueue . . qdisc_run_begin() . . dequeue_skb() . . . q->enqueue . . . . sch_direct_xmit() . . . qdisc_run_begin() . . return and do nothing . . . clear __QDISC_STATE_SCHED . . qdisc_run_begin() . . return and do nothing . . . . . . qdisc_run_end() . This patch fixes the above data race by: 1. If the first spin_trylock() return false and STATE_MISSED is not set, set STATE_MISSED and retry another spin_trylock() in case other CPU may not see STATE_MISSED after it releases the lock. 2. reschedule if STATE_MISSED is set after the lock is released at the end of qdisc_run_end(). For tx_action case, STATE_MISSED is also set when cpu1 is at the end if qdisc_run_end(), so tx_action will be rescheduled again to dequeue the skb enqueued by cpu2. Clear STATE_MISSED before retrying a dequeuing when dequeuing returns NULL in order to reduce the overhead of the second spin_trylock() and __netif_schedule() calling. Also clear the STATE_MISSED before calling __netif_schedule() at the end of qdisc_run_end() to avoid doing another round of dequeuing in the pfifo_fast_dequeue(). The performance impact of this patch, tested using pktgen and dummy netdev with pfifo_fast qdisc attached: threads without+this_patch with+this_patch delta 1 2.61Mpps 2.60Mpps -0.3% 2 3.97Mpps 3.82Mpps -3.7% 4 5.62Mpps 5.59Mpps -0.5% 8 2.78Mpps 2.77Mpps -0.3% 16 2.22Mpps 2.22Mpps -0.0% Fixes: 6b3ba9146fe6 ("net: sched: allow qdiscs to handle locking") Acked-by: Jakub Kicinski Tested-by: Juergen Gross Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 974271e5ed45cfe4daddbeb16224a2156918530e Author: Jim Ma Date: Fri May 14 11:11:02 2021 +0800 tls splice: check SPLICE_F_NONBLOCK instead of MSG_DONTWAIT In tls_sw_splice_read, checkout MSG_* is inappropriate, should use SPLICE_*, update tls_wait_data to accept nonblock arguments instead of flags for recvmsg and splice. Fixes: c46234ebb4d1 ("tls: RX path for ktls") Signed-off-by: Jim Ma Signed-off-by: David S. Miller commit 75016891357a628d2b8acc09e2b9b2576c18d318 Author: Hoang Le Date: Fri May 14 08:23:03 2021 +0700 Revert "net:tipc: Fix a double free in tipc_sk_mcast_rcv" This reverts commit 6bf24dc0cc0cc43b29ba344b66d78590e687e046. Above fix is not correct and caused memory leak issue. Fixes: 6bf24dc0cc0c ("net:tipc: Fix a double free in tipc_sk_mcast_rcv") Acked-by: Jon Maloy Acked-by: Tung Nguyen Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 5dce58de4be8a4c9f2af3beed3ee9813933a0583 Merge: 89cd34a14e1ca f2f46b878777e Author: Dave Airlie Date: Sat May 15 06:13:22 2021 +1000 Merge tag 'drm-msm-fixes-2021-05-09' of https://gitlab.freedesktop.org/drm/msm into drm-fixes - dsi regression fix - dma-buf pinning fix - displayport fixes - llc fix Signed-off-by: Dave Airlie From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGuqLZDAEJwUFKb6m+h3kyxgjDEKa3DPA1fHA69vxbXH=g@mail.gmail.com commit 25a1298726e97b9d25379986f5d54d9e62ad6e93 Merge: bd3c9cdb21a26 eb01f5353bdaa Author: Linus Torvalds Date: Fri May 14 13:44:51 2021 -0700 Merge tag 'trace-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix trace_check_vprintf() for %.*s The sanity check of all strings being read from the ring buffer to make sure they are in safe memory space did not account for the %.*s notation having another parameter to process (the length). Add that to the check" * tag 'trace-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: tracing: Handle %.*s in trace_check_vprintf() commit 89cd34a14e1ca4979d7b920a6ff1cf07a21eda76 Merge: 08f0cfbf739a5 e4527420ed087 Author: Dave Airlie Date: Sat May 15 06:12:45 2021 +1000 Merge tag 'drm-intel-fixes-2021-05-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes drm/i915 fixes for v5.13-rc2: - Fix active callback alignment annotations and subsequent crashes - Retract link training strategy to slow and wide, again - Avoid division by zero on gen2 - Use correct width reads for C0DRB3/C1DRB3 registers - Fix double free in pdp allocation failure path - Fix HDMI 2.1 PCON downstream caps check Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87a6oxu9ao.fsf@intel.com commit bd3c9cdb21a2674dd0db70199df884828e37abd4 Merge: ac524ece210e0 588a513d34257 Author: Linus Torvalds Date: Fri May 14 10:52:47 2021 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Catalin Marinas: "Fixes and cpucaps.h automatic generation: - Generate cpucaps.h at build time rather than carrying lots of #defines. Merged at -rc1 to avoid some conflicts during the merge window. - Initialise RGSR_EL1.SEED in __cpu_setup() as it may be left as 0 out of reset and the IRG instruction would not function as expected if only the architected pseudorandom number generator is implemented. - Fix potential race condition in __sync_icache_dcache() where the PG_dcache_clean page flag is set before the actual cache maintenance. - Fix header include in BTI kselftests" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Fix race condition on PG_dcache_clean in __sync_icache_dcache() arm64: tools: Add __ASM_CPUCAPS_H to the endif in cpucaps.h arm64: mte: initialize RGSR_EL1.SEED in __cpu_setup kselftest/arm64: Add missing stddef.h include to BTI tests arm64: Generate cpucaps.h commit ac524ece210e0689f037e2d80bee49bb39791792 Merge: b5304a4f9ad88 f395183f9544b Author: Linus Torvalds Date: Fri May 14 10:49:20 2021 -0700 Merge tag 'f2fs-5.13-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs fixes from Jaegeuk Kim: "This fixes some critical bugs such as memory leak in compression flows, kernel panic when handling errors, and swapon failure due to newly added condition check" * tag 'f2fs-5.13-rc1-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: f2fs: return EINVAL for hole cases in swap file f2fs: avoid swapon failure by giving a warning first f2fs: compress: fix to assign cc.cluster_idx correctly f2fs: compress: fix race condition of overwrite vs truncate f2fs: compress: fix to free compress page correctly f2fs: support iflag change given the mask f2fs: avoid null pointer access when handling IPU error commit cab12badfc99f93c1dccf192dd150f94b687a27c Author: Nishanth Menon Date: Tue May 11 14:48:21 2021 -0500 arm64: dts: ti: k3*: Introduce reg definition for interrupt routers Interrupt routers are memory mapped peripherals, that are organized in our dts bus hierarchy to closely represents the actual hardware behavior. However, without explicitly calling out the reg property, using 2021.03+ dt-schema package, this exposes the following problem with dtbs_check: /arch/arm64/boot/dts/ti/k3-am654-base-board.dt.yaml: bus@100000: interrupt-controller0: {'type': 'object'} is not allowed for {'compatible': ['ti,sci-intr'], ..... Even though we don't use interrupt router directly via memory mapped registers and have to use it via the system controller, the hardware block is memory mapped, so describe the base address in device tree. This is a valid, comprehensive description of hardware and permitted by the existing ti,sci-intr schema. Reviewed-by: Tero Kristo Reviewed-by: Lokesh Vutla Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210511194821.13919-1-nm@ti.com commit 9ecdb6d6b11434494af4bad11b03f0dcda1eebbd Author: Nishanth Menon Date: Mon May 10 09:54:29 2021 -0500 arm64: dts: ti: k3-am65|j721e|am64: Map the dma / navigator subsystem via explicit ranges Instead of using empty ranges property, lets map explicitly the address range that is mapped onto the dma / navigator subsystems (navss/dmss). This is also exposed via the dtbs_check with dt-schema newer than 2021.03 version by throwing out following: arch/arm64/boot/dts/ti/k3-am654-base-board.dt.yaml: bus@100000: main-navss: {'type': 'object'} is not allowed for {'compatible': ['simple-mfd'], '#address-cells': [[2]], ..... This has already been correctly done for J7200, however was missed for other k3 SoCs. Fix that oversight. Signed-off-by: Nishanth Menon Reviewed-by: Tero Kristo Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210510145429.8752-1-nm@ti.com commit 9d3c9378f96a95f15881ee3373d2c2f773273fc2 Author: Nishanth Menon Date: Mon May 10 09:50:33 2021 -0500 arm64: dts: ti: k3-*: Rename the TI-SCI node Lets rename the node name of TI-SCI node to be system-controller as it is a better standardized name for the function that TI-SCI plays in the SoC. Signed-off-by: Nishanth Menon Reviewed-by: Tero Kristo Link: https://lore.kernel.org/r/20210510145033.7426-5-nm@ti.com commit 421c06b8761abd7d953148f5b955b4149df9846e Author: Nishanth Menon Date: Mon May 10 09:50:32 2021 -0500 arm64: dts: ti: k3-am65-wakeup: Drop un-necessary properties from dmsc node The DMSC node does'nt require any of "#address-cells", "#size-cells" or "ranges" property as the child nodes are representations of SoC's system controller itself, so align it with the bindings. Signed-off-by: Nishanth Menon Reviewed-by: Tero Kristo Link: https://lore.kernel.org/r/20210510145033.7426-4-nm@ti.com commit 830454bbd628330c3779c3de637b709dae790da0 Author: Nishanth Menon Date: Mon May 10 09:50:31 2021 -0500 arm64: dts: ti: k3-am65-wakeup: Add debug region to TI-SCI node Lets add the TISCI debug region to TI-SCI region in line with TI-SCI documentation[1]. While at it, lets rename the node to indicate the address usage. [1] http://downloads.ti.com/tisci/esd/latest/4_trace/trace.html Signed-off-by: Nishanth Menon Reviewed-by: Tero Kristo Link: https://lore.kernel.org/r/20210510145033.7426-3-nm@ti.com commit a0812885fa7a1074c8003484b8176ffe28d5df68 Author: Nishanth Menon Date: Mon May 10 09:50:30 2021 -0500 arm64: dts: ti: k3-*: Rename the TI-SCI clocks node name We currently use clocks as the node name for the node representing TI-SCI clock nodes. This is better renamed to being clock-controller as that is a better representative of the system controller function as a clock controller for the SoC. Signed-off-by: Nishanth Menon Reviewed-by: Tero Kristo Link: https://lore.kernel.org/r/20210510145033.7426-2-nm@ti.com commit 414ed7fe863a1822c5ddcea080c76ce0b1c6d3fd Merge: e4df1b0c24350 f0b3d338064e1 Author: David S. Miller Date: Fri May 14 10:47:22 2021 -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) Remove the flowtable hardware refresh state, fall back to the existing hardware pending state instead, from Roi Dayan. 2) Fix crash in pipapo avx2 lookup when FPU is in used from user context, from Stefano Brivio. ==================== Signed-off-by: David S. Miller commit 52ae30f55a2a40cff549fac95de82f25403bd387 Author: Vignesh Raghavendra Date: Mon May 10 23:36:01 2021 +0530 arm64: dts: ti: j7200-main: Mark Main NAVSS as dma-coherent Traffic through main NAVSS interconnect is coherent wrt ARM caches on J7200 SoC. Add missing dma-coherent property to main_navss node. Also add dma-ranges to be consistent with mcu_navss node and with AM65/J721e main_navss and mcu_navss nodes. Fixes: d361ed88455fe ("arm64: dts: ti: Add support for J7200 SoC") Signed-off-by: Vignesh Raghavendra Reviewed-by: Peter Ujfalusi Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210510180601.19458-1-vigneshr@ti.com commit df61cd9393845383adc4ea2410f2a91e1d1972b6 Author: Tomi Valkeinen Date: Fri Apr 23 11:31:20 2021 +0300 arm64: dts: ti: k3-am654-base-board: remove ov5640 AM654 EVM boards are not shipped with OV5640 sensor module, it is a separate purchase. OV5640 module is also just one of the possible sensors or capture boards you can connect. However, for some reason, OV5640 has been added to the board dts file, making it cumbersome to use other sensors. Remove the OV5640 from the dts file so that it is easy to use other sensors via DT overlays. Signed-off-by: Tomi Valkeinen Acked-by: Pratyush Yadav Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210423083120.73476-1-tomi.valkeinen@ideasonboard.com commit b5304a4f9ad88a712c26c63691a99c0b9b1b5dc6 Merge: 315d99318179b 08f0cfbf739a5 Author: Linus Torvalds Date: Fri May 14 10:38:16 2021 -0700 Merge tag 'drm-fixes-2021-05-14' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Not much here, mostly amdgpu fixes, with a couple of radeon, and a cosmetic vc4. Two MAINTAINERS file updates also. amdgpu: - Fixes for flexible array conversions - Fix sysfs attribute init - Harvesting fixes - VCN CG/PG fixes for Picasso radeon: - Fixes for flexible array conversions - Fix for flickering on Oland with multiple 4K displays vc4: - drop unused function" * tag 'drm-fixes-2021-05-14' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu: update vcn1.0 Non-DPG suspend sequence drm/amdgpu: set vcn mgcg flag for picasso drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected drm/amdgpu: update the method for harvest IP for specific SKU drm/amdgpu: add judgement when add ip blocks (v2) drm/amd/display: Initialize attribute for hdcp_srm sysfs file drm/amd/pm: Fix out-of-bounds bug drm/radeon/si_dpm: Fix SMU power state load drm/radeon/ni_dpm: Fix booting bug MAINTAINERS: Update address for Emma Anholt MAINTAINERS: Update my e-mail drm/vc4: remove unused function drm/ttm: Do not add non-system domain BO into swap list commit 588a513d34257fdde95a9f0df0202e31998e85c6 Author: Catalin Marinas Date: Fri May 14 10:50:01 2021 +0100 arm64: Fix race condition on PG_dcache_clean in __sync_icache_dcache() To ensure that instructions are observable in a new mapping, the arm64 set_pte_at() implementation cleans the D-cache and invalidates the I-cache to the PoU. As an optimisation, this is only done on executable mappings and the PG_dcache_clean page flag is set to avoid future cache maintenance on the same page. When two different processes map the same page (e.g. private executable file or shared mapping) there's a potential race on checking and setting PG_dcache_clean via set_pte_at() -> __sync_icache_dcache(). While on the fault paths the page is locked (PG_locked), mprotect() does not take the page lock. The result is that one process may see the PG_dcache_clean flag set but the I/D cache maintenance not yet performed. Avoid test_and_set_bit(PG_dcache_clean) in favour of separate test_bit() and set_bit(). In the rare event of a race, the cache maintenance is done twice. Signed-off-by: Catalin Marinas Cc: Cc: Will Deacon Cc: Steven Price Reviewed-by: Steven Price Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210514095001.13236-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas commit 4bc2082311311892742deb2ce04bc335f85ee27a Author: Bart Van Assche Date: Thu May 13 10:17:08 2021 -0700 block/partitions/efi.c: Fix the efi_partition() kernel-doc header Fix the following kernel-doc warning: block/partitions/efi.c:685: warning: wrong kernel-doc identifier on line: * efi_partition(struct parsed_partitions *state) Cc: Alexander Viro Signed-off-by: Bart Van Assche Link: https://lore.kernel.org/r/20210513171708.8391-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 630ef623ed26c18a457cdc070cf24014e50129c2 Author: Bart Van Assche Date: Thu May 13 10:15:29 2021 -0700 blk-mq: Swap two calls in blk_mq_exit_queue() If a tag set is shared across request queues (e.g. SCSI LUNs) then the block layer core keeps track of the number of active request queues in tags->active_queues. blk_mq_tag_busy() and blk_mq_tag_idle() update that atomic counter if the hctx flag BLK_MQ_F_TAG_QUEUE_SHARED is set. Make sure that blk_mq_exit_queue() calls blk_mq_tag_idle() before that flag is cleared by blk_mq_del_queue_tag_set(). Cc: Christoph Hellwig Cc: Ming Lei Cc: Hannes Reinecke Fixes: 0d2602ca30e4 ("blk-mq: improve support for shared tags maps") Signed-off-by: Bart Van Assche Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210513171529.7977-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 03f26d8f11403295de445b6e4e0e57ac57755791 Author: Ming Lei Date: Fri May 14 10:20:52 2021 +0800 blk-mq: plug request for shared sbitmap In case of shared sbitmap, request won't be held in plug list any more sine commit 32bc15afed04 ("blk-mq: Facilitate a shared sbitmap per tagset"), this way makes request merge from flush plug list & batching submission not possible, so cause performance regression. Yanhui reports performance regression when running sequential IO test(libaio, 16 jobs, 8 depth for each job) in VM, and the VM disk is emulated with image stored on xfs/megaraid_sas. Fix the issue by recovering original behavior to allow to hold request in plug list. Cc: Yanhui Ma Cc: John Garry Cc: Bart Van Assche Cc: kashyap.desai@broadcom.com Fixes: 32bc15afed04 ("blk-mq: Facilitate a shared sbitmap per tagset") Signed-off-by: Ming Lei Link: https://lore.kernel.org/r/20210514022052.1047665-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 97729b653de52ba98e08732dd8855586e37a3a31 Author: Stefano Stabellini Date: Wed May 12 13:18:23 2021 -0700 xen/swiotlb: check if the swiotlb has already been initialized xen_swiotlb_init calls swiotlb_late_init_with_tbl, which fails with -ENOMEM if the swiotlb has already been initialized. Add an explicit check io_tlb_default_mem != NULL at the beginning of xen_swiotlb_init. If the swiotlb is already initialized print a warning and return -EEXIST. On x86, the error propagates. On ARM, we don't actually need a special swiotlb buffer (yet), any buffer would do. So ignore the error and continue. CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210512201823.1963-3-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 687842ec50342b716953f5847a49dd337cb6de8c Author: Christoph Hellwig Date: Wed May 12 13:18:22 2021 -0700 arm64: do not set SWIOTLB_NO_FORCE when swiotlb is required Although SWIOTLB_NO_FORCE is meant to allow later calls to swiotlb_init, today dma_direct_map_page returns error if SWIOTLB_NO_FORCE. For now, without a larger overhaul of SWIOTLB_NO_FORCE, the best we can do is to avoid setting SWIOTLB_NO_FORCE in mem_init when we know that it is going to be required later (e.g. Xen requires it). CC: boris.ostrovsky@oracle.com CC: jgross@suse.com CC: catalin.marinas@arm.com CC: will@kernel.org CC: linux-arm-kernel@lists.infradead.org Fixes: 2726bf3ff252 ("swiotlb: Make SWIOTLB_NO_FORCE perform no allocation") Signed-off-by: Christoph Hellwig Signed-off-by: Stefano Stabellini Reviewed-by: Juergen Gross Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210512201823.1963-2-sstabellini@kernel.org Signed-off-by: Juergen Gross commit cb6f6b3384d7825d2a43f2256c5200e3b3956fc8 Author: Stefano Stabellini Date: Wed May 12 13:18:21 2021 -0700 xen/arm: move xen_swiotlb_detect to arm/swiotlb-xen.h Move xen_swiotlb_detect to a static inline function to make it available to !CONFIG_XEN builds. CC: boris.ostrovsky@oracle.com CC: jgross@suse.com Signed-off-by: Stefano Stabellini Reviewed-by: Christoph Hellwig Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20210512201823.1963-1-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 3486d2c9be652a31033363bdd50391b0c8a8fe21 Author: Vitaly Kuznetsov Date: Thu May 13 09:32:46 2021 +0200 clocksource/drivers/hyper-v: Re-enable VDSO_CLOCKMODE_HVCLOCK on X86 Mohammed reports (https://bugzilla.kernel.org/show_bug.cgi?id=213029) the commit e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline") broke vDSO on x86. The problem appears to be that VDSO_CLOCKMODE_HVCLOCK is an enum value in 'enum vdso_clock_mode' and '#ifdef VDSO_CLOCKMODE_HVCLOCK' branch evaluates to false (it is not a define). Use a dedicated HAVE_VDSO_CLOCKMODE_HVCLOCK define instead. Fixes: e4ab4658f1cf ("clocksource/drivers/hyper-v: Handle vDSO differences inline") Reported-by: Mohammed Gamal Suggested-by: Thomas Gleixner Signed-off-by: Vitaly Kuznetsov Signed-off-by: Thomas Gleixner Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20210513073246.1715070-1-vkuznets@redhat.com commit 27e7db56cf3dffd302bd7ddfacb1d405cf671a2a Author: Saravana Kannan Date: Wed May 5 09:47:34 2021 -0700 spi: Don't have controller clean up spi device before driver unbind When a spi device is unregistered and triggers a driver unbind, the driver might need to access the spi device. So, don't have the controller clean up the spi device before the driver is unbound. Clean up the spi device after the driver is unbound. Fixes: c7299fea6769 ("spi: Fix spi device unregister flow") Reported-by: Lukas Wunner Signed-off-by: Saravana Kannan Tested-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210505164734.175546-1-saravanak@google.com Signed-off-by: Mark Brown commit 7c2fc79250cafa1a29befeb60163028ec4720814 Author: Chen Li Date: Tue Apr 27 15:17:45 2021 +0800 phy: usb: Fix misuse of IS_ENABLED While IS_ENABLED() is perfectly fine for CONFIG_* symbols, it is not for other symbols such as __BIG_ENDIAN that is provided directly by the compiler. Switch to use CONFIG_CPU_BIG_ENDIAN instead of __BIG_ENDIAN. Signed-off-by: Chen Li Reviewed-by: Al Cooper Acked-by: Florian Fainelli Fixes: 94583a41047e ("phy: usb: Restructure in preparation for adding 7216 USB support") Link: https://lore.kernel.org/r/87czuggpra.wl-chenli@uniontech.com Signed-off-by: Vinod Koul commit 489809e2e22b3dedc0737163d97eb2b574137b42 Author: Pavel Begunkov Date: Fri May 14 12:06:44 2021 +0100 io_uring: increase max number of reg buffers Since recent changes instead of storing a large array of struct io_mapped_ubuf, we store pointers to them, that is 4 times slimmer and we should not to so worry about restricting max number of registererd buffer slots, increase the limit 4 times. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d3dee1da37f46da416aa96a16bf9e5094e10584d.1620990371.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2d74d0421e5afc1e7be7167ffb7eb8b2cf32343a Author: Pavel Begunkov Date: Fri May 14 12:05:46 2021 +0100 io_uring: further remove sqpoll limits on opcodes There are three types of requests that left disabled for sqpoll, namely epoll ctx, statx, and resources update. Since SQPOLL task is now closely mimics a userspace thread, remove the restrictions. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/909b52d70c45636d8d7897582474ea5aab5eed34.1620990306.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 447c19f3b5074409c794b350b10306e1da1ef4ba Author: Pavel Begunkov Date: Fri May 14 12:02:50 2021 +0100 io_uring: fix ltout double free on completion race Always remove linked timeout on io_link_timeout_fn() from the master request link list, otherwise we may get use-after-free when first io_link_timeout_fn() puts linked timeout in the fail path, and then will be found and put on master's free. Cc: stable@vger.kernel.org # 5.10+ Fixes: 90cd7e424969d ("io_uring: track link timeout's master explicitly") Reported-and-tested-by: syzbot+5a864149dd970b546223@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/69c46bf6ce37fec4fdcd98f0882e18eb07ce693a.1620990121.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2962484dfef8dbb7f9059822bc26ce8a04d0e47c Author: Hsin-Yi Wang Date: Tue Apr 20 21:30:50 2021 +0800 misc: eeprom: at24: check suspend status before disable regulator cd5676db0574 ("misc: eeprom: at24: support pm_runtime control") disables regulator in runtime suspend. If runtime suspend is called before regulator disable, it will results in regulator unbalanced disabling. Fixes: cd5676db0574 ("misc: eeprom: at24: support pm_runtime control") Cc: stable Acked-by: Bartosz Golaszewski Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210420133050.377209-1-hsinyi@chromium.org Signed-off-by: Greg Kroah-Hartman commit 0b0226be3a52dadd965644bc52a807961c2c26df Author: Christophe JAILLET Date: Sun May 9 09:13:12 2021 +0200 uio_hv_generic: Fix another memory leak in error handling paths Memory allocated by 'vmbus_alloc_ring()' at the beginning of the probe function is never freed in the error handling path. Add the missing 'vmbus_free_ring()' call. Note that it is already freed in the .remove function. Fixes: cdfa835c6e5e ("uio_hv_generic: defer opening vmbus until first use") Cc: stable Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/0d86027b8eeed8e6360bc3d52bcdb328ff9bdca1.1620544055.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 3ee098f96b8b6c1a98f7f97915f8873164e6af9d Author: Christophe JAILLET Date: Sun May 9 09:13:03 2021 +0200 uio_hv_generic: Fix a memory leak in error handling paths If 'vmbus_establish_gpadl()' fails, the (recv|send)_gpadl will not be updated and 'hv_uio_cleanup()' in the error handling path will not be able to free the corresponding buffer. In such a case, we need to free the buffer explicitly. Fixes: cdfa835c6e5e ("uio_hv_generic: defer opening vmbus until first use") Cc: stable Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/4fdaff557deef6f0475d02ba7922ddbaa1ab08a6.1620544055.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 156ed0215ef365604f2382d5164c36d3a1cfd98f Author: Martin Ågren Date: Thu Apr 22 21:22:40 2021 +0200 uio/uio_pci_generic: fix return value changed in refactoring Commit ef84928cff58 ("uio/uio_pci_generic: use device-managed function equivalents") was able to simplify various error paths thanks to no longer having to clean up on the way out. Some error paths were dropped, others were simplified. In one of those simplifications, the return value was accidentally changed from -ENODEV to -ENOMEM. Restore the old return value. Fixes: ef84928cff58 ("uio/uio_pci_generic: use device-managed function equivalents") Cc: stable Acked-by: Michael S. Tsirkin Signed-off-by: Martin Ågren Link: https://lore.kernel.org/r/20210422192240.1136373-1-martin.agren@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1d5cfca286178ce81fb0c8a5f5777ef123cd69e4 Author: PeiSen Hou Date: Fri May 14 12:50:48 2021 +0200 ALSA: hda/realtek: Add some CLOVE SSIDs of ALC293 Fix "use as headset mic, without its own jack detect" problen. Signed-off-by: PeiSen Hou Cc: Link: https://lore.kernel.org/r/d0746eaf29f248a5acc30313e3ba4f99@realtek.com Signed-off-by: Takashi Iwai commit 814b43127f4ac69332e809152e30773941438aff Author: Takashi Sakamoto Date: Thu May 13 21:56:52 2021 +0900 ALSA: firewire-lib: fix amdtp_packet tracepoints event for packet_index field The snd_firewire_lib:amdtp_packet tracepoints event includes index of packet processed in a context handling. However in IR context, it is not calculated as expected. Cc: Fixes: 753e717986c2 ("ALSA: firewire-lib: use packet descriptor for IR context") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210513125652.110249-6-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 1be4f21d9984fa9835fae5411a29465dc5aece6f Author: Takashi Sakamoto Date: Thu May 13 21:56:51 2021 +0900 ALSA: firewire-lib: fix calculation for size of IR context payload The quadlets for CIP header is handled as a part of IR context header, thus it doesn't join in IR context payload. However current calculation includes the quadlets in IR context payload. Cc: Fixes: f11453c7cc01 ("ALSA: firewire-lib: use 16 bytes IR context header to separate CIP header") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210513125652.110249-5-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 395f41e2cdac63e7581fb9574e5ac0f02556e34a Author: Takashi Sakamoto Date: Thu May 13 21:56:50 2021 +0900 ALSA: firewire-lib: fix check for the size of isochronous packet payload The check for size of isochronous packet payload just cares of the size of IR context payload without the size of CIP header. Cc: Fixes: f11453c7cc01 ("ALSA: firewire-lib: use 16 bytes IR context header to separate CIP header") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210513125652.110249-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 0edabdfe89581669609eaac5f6a8d0ae6fe95e7f Author: Takashi Sakamoto Date: Thu May 13 21:56:49 2021 +0900 ALSA: bebob/oxfw: fix Kconfig entry for Mackie d.2 Pro Mackie d.2 has an extension card for IEEE 1394 communication, which uses BridgeCo DM1000 ASIC. On the other hand, Mackie d.4 Pro has built-in function for IEEE 1394 communication by Oxford Semiconductor OXFW971, according to schematic diagram available in Mackie website. Although I misunderstood that Mackie d.2 Pro would be also a model with OXFW971, it's wrong. Mackie d.2 Pro is a model which includes the extension card as factory settings. This commit fixes entries in Kconfig and comment in ALSA OXFW driver. Cc: Fixes: fd6f4b0dc167 ("ALSA: bebob: Add skelton for BeBoB based devices") Fixes: ec4dba5053e1 ("ALSA: oxfw: Add support for Behringer/Mackie devices") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210513125652.110249-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 1b6604896e78969baffc1b6cc6bc175f95929ac4 Author: Takashi Sakamoto Date: Thu May 13 21:56:48 2021 +0900 ALSA: dice: fix stream format at middle sampling rate for Alesis iO 26 Alesis iO 26 FireWire has two pairs of digital optical interface. It delivers PCM frames from the interfaces by second isochronous packet streaming. Although both of the interfaces are available at 44.1/48.0 kHz, first one of them is only available at 88.2/96.0 kHz. It reduces the number of PCM samples to 4 in Multi Bit Linear Audio data channel of data blocks on the second isochronous packet streaming. This commit fixes hardcoded stream formats. Cc: Fixes: 28b208f600a3 ("ALSA: dice: add parameters of stream formats for models produced by Alesis") Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210513125652.110249-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit eb8500b874cf295971a6a2a04e14eb0854197a3c Author: Srinivas Pandruvada Date: Fri Apr 30 05:23:43 2021 -0700 thermal/drivers/intel: Initialize RW trip to THERMAL_TEMP_INVALID After commit 81ad4276b505 ("Thermal: Ignore invalid trip points") all user_space governor notifications via RW trip point is broken in intel thermal drivers. This commits marks trip_points with value of 0 during call to thermal_zone_device_register() as invalid. RW trip points can be 0 as user space will set the correct trip temperature later. During driver init, x86_package_temp and all int340x drivers sets RW trip temperature as 0. This results in all these trips marked as invalid by the thermal core. To fix this initialize RW trips to THERMAL_TEMP_INVALID instead of 0. Cc: Signed-off-by: Srinivas Pandruvada Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210430122343.1789899-1-srinivas.pandruvada@linux.intel.com commit c6ac667b07996929835b512de0e9a988977e6abc Author: Nicholas Piggin Date: Fri May 14 14:40:08 2021 +1000 powerpc/64e/interrupt: Fix nvgprs being clobbered Some interrupt handlers have an "extra" that saves 1 or 2 registers (r14, r15) in the paca save area and makes them available to use by the handler. The change to always save nvgprs in exception handlers lead to some interrupt handlers saving those scratch r14 / r15 registers into the interrupt frame's GPR saves, which get restored on interrupt exit. Fix this by always reloading those scratch registers from paca before the EXCEPTION_COMMON that saves nvgprs. Fixes: 4228b2c3d20e ("powerpc/64e/interrupt: always save nvgprs on interrupt") Reported-by: Christian Zigotzky Signed-off-by: Nicholas Piggin Tested-by: Christian Zigotzky Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210514044008.1955783-1-npiggin@gmail.com commit 4ec5feec1ad029bdf7d49bc50ccc0c195eeabe93 Author: Nicholas Piggin Date: Mon May 3 21:17:08 2021 +1000 powerpc/64s: Make NMI record implicitly soft-masked code as irqs disabled scv support introduced the notion of code that implicitly soft-masks irqs due to the instruction addresses. This is required because scv enters the kernel with MSR[EE]=1. If a NMI (including soft-NMI) interrupt hits when we are implicitly soft-masked then its regs->softe does not reflect this because it is derived from the explicit soft mask state (paca->irq_soft_mask). This makes arch_irq_disabled_regs(regs) return false. This can trigger a warning in the soft-NMI watchdog code (shown below). Fix it by having NMI interrupts set regs->softe to disabled in case of interrupting an implicit soft-masked region. ------------[ cut here ]------------ WARNING: CPU: 41 PID: 1103 at arch/powerpc/kernel/watchdog.c:259 soft_nmi_interrupt+0x3e4/0x5f0 CPU: 41 PID: 1103 Comm: (spawn) Not tainted NIP: c000000000039534 LR: c000000000039234 CTR: c000000000009a00 REGS: c000007fffbcf940 TRAP: 0700 Not tainted MSR: 9000000000021033 CR: 22042482 XER: 200400ad CFAR: c000000000039260 IRQMASK: 3 GPR00: c000000000039204 c000007fffbcfbe0 c000000001d6c300 0000000000000003 GPR04: 00007ffffa45d078 0000000000000000 0000000000000008 0000000000000020 GPR08: 0000007ffd4e0000 0000000000000000 c000007ffffceb00 7265677368657265 GPR12: 9000000000009033 c000007ffffceb00 00000f7075bf4480 000000000000002a GPR16: 00000f705745a528 00007ffffa45ddd8 00000f70574d0008 0000000000000000 GPR20: 00000f7075c58d70 00000f7057459c38 0000000000000001 0000000000000040 GPR24: 0000000000000000 0000000000000029 c000000001dae058 0000000000000029 GPR28: 0000000000000000 0000000000000800 0000000000000009 c000007fffbcfd60 NIP [c000000000039534] soft_nmi_interrupt+0x3e4/0x5f0 LR [c000000000039234] soft_nmi_interrupt+0xe4/0x5f0 Call Trace: [c000007fffbcfbe0] [c000000000039204] soft_nmi_interrupt+0xb4/0x5f0 (unreliable) [c000007fffbcfcf0] [c00000000000c0e8] soft_nmi_common+0x138/0x1c4 --- interrupt: 900 at end_real_trampolines+0x0/0x1000 NIP: c000000000003000 LR: 00007ca426adb03c CTR: 900000000280f033 REGS: c000007fffbcfd60 TRAP: 0900 MSR: 9000000000009033 CR: 44042482 XER: 200400ad CFAR: 00007ca426946020 IRQMASK: 0 GPR00: 00000000000000ad 00007ffffa45d050 00007ca426b07f00 0000000000000035 GPR04: 00007ffffa45d078 0000000000000000 0000000000000008 0000000000000020 GPR08: 0000000000000000 0000000000100000 0000000010000000 00007ffffa45d110 GPR12: 0000000000000001 00007ca426d4e680 00000f7075bf4480 000000000000002a GPR16: 00000f705745a528 00007ffffa45ddd8 00000f70574d0008 0000000000000000 GPR20: 00000f7075c58d70 00000f7057459c38 0000000000000001 0000000000000040 GPR24: 0000000000000000 00000f7057473f68 0000000000000003 000000000000041b GPR28: 00007ffffa45d4c4 0000000000000035 0000000000000000 00000f7057473f68 NIP [c000000000003000] end_real_trampolines+0x0/0x1000 LR [00007ca426adb03c] 0x7ca426adb03c --- interrupt: 900 Instruction dump: 60000000 60000000 60420000 38600001 482b3ae5 60000000 e93f0138 a36d0008 7daa6b78 71290001 7f7907b4 4082fd34 <0fe00000> 4bfffd2c 60420000 ea6100a8 ---[ end trace dc75f67d819779da ]--- Fixes: 118178e62e2e ("powerpc: move NMI entry/exit code into wrapper") Reported-by: Cédric Le Goater Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210503111708.758261-1-npiggin@gmail.com commit 5b48ba2fbd77bc68feebd336ffad5ff166782bde Author: Michael Ellerman Date: Fri May 14 00:08:00 2021 +1000 powerpc/64s: Fix stf mitigation patching w/strict RWX & hash The stf entry barrier fallback is unsafe to execute in a semi-patched state, which can happen when enabling/disabling the mitigation with strict kernel RWX enabled and using the hash MMU. See the previous commit for more details. Fix it by changing the order in which we patch the instructions. Note the stf barrier fallback is only used on Power6 or earlier. Fixes: bd573a81312f ("powerpc/mm/64s: Allow STRICT_KERNEL_RWX again") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210513140800.1391706-2-mpe@ellerman.id.au commit 49b39ec248af863781a13aa6d81c5f69a2928094 Author: Michael Ellerman Date: Fri May 14 00:07:59 2021 +1000 powerpc/64s: Fix entry flush patching w/strict RWX & hash The entry flush mitigation can be enabled/disabled at runtime. When this happens it results in the kernel patching its own instructions to enable/disable the mitigation sequence. With strict kernel RWX enabled instruction patching happens via a secondary mapping of the kernel text, so that we don't have to make the primary mapping writable. With the hash MMU this leads to a hash fault, which causes us to execute the exception entry which contains the entry flush mitigation. This means we end up executing the entry flush in a semi-patched state, ie. after we have patched the first instruction but before we patch the second or third instruction of the sequence. On machines with updated firmware the entry flush is a series of special nops, and it's safe to to execute in a semi-patched state. However when using the fallback flush the sequence is mflr/branch/mtlr, and so it's not safe to execute if we have patched out the mflr but not the other two instructions. Doing so leads to us corrputing LR, leading to an oops, for example: # echo 0 > /sys/kernel/debug/powerpc/entry_flush kernel tried to execute exec-protected page (c000000002971000) - exploit attempt? (uid: 0) BUG: Unable to handle kernel instruction fetch Faulting instruction address: 0xc000000002971000 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries CPU: 0 PID: 2215 Comm: bash Not tainted 5.13.0-rc1-00010-gda3bb206c9ce #1 NIP: c000000002971000 LR: c000000002971000 CTR: c000000000120c40 REGS: c000000013243840 TRAP: 0400 Not tainted (5.13.0-rc1-00010-gda3bb206c9ce) MSR: 8000000010009033 CR: 48428482 XER: 00000000 ... NIP 0xc000000002971000 LR 0xc000000002971000 Call Trace: do_patch_instruction+0xc4/0x340 (unreliable) do_entry_flush_fixups+0x100/0x3b0 entry_flush_set+0x50/0xe0 simple_attr_write+0x160/0x1a0 full_proxy_write+0x8c/0x110 vfs_write+0xf0/0x340 ksys_write+0x84/0x140 system_call_exception+0x164/0x2d0 system_call_common+0xec/0x278 The simplest fix is to change the order in which we patch the instructions, so that the sequence is always safe to execute. For the non-fallback flushes it doesn't matter what order we patch in. Fixes: bd573a81312f ("powerpc/mm/64s: Allow STRICT_KERNEL_RWX again") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210513140800.1391706-1-mpe@ellerman.id.au commit aec86b052df6541cc97c5fca44e5934cbea4963b Author: Michael Ellerman Date: Thu May 6 14:49:59 2021 +1000 powerpc/64s: Fix crashes when toggling entry flush barrier The entry flush mitigation can be enabled/disabled at runtime via a debugfs file (entry_flush), which causes the kernel to patch itself to enable/disable the relevant mitigations. However depending on which mitigation we're using, it may not be safe to do that patching while other CPUs are active. For example the following crash: sleeper[15639]: segfault (11) at c000000000004c20 nip c000000000004c20 lr c000000000004c20 Shows that we returned to userspace with a corrupted LR that points into the kernel, due to executing the partially patched call to the fallback entry flush (ie. we missed the LR restore). Fix it by doing the patching under stop machine. The CPUs that aren't doing the patching will be spinning in the core of the stop machine logic. That is currently sufficient for our purposes, because none of the patching we do is to that code or anywhere in the vicinity. Fixes: f79643787e0a ("powerpc/64s: flush L1D on kernel entry") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210506044959.1298123-2-mpe@ellerman.id.au commit 8ec7791bae1327b1c279c5cd6e929c3b12daaf0a Author: Michael Ellerman Date: Thu May 6 14:49:58 2021 +1000 powerpc/64s: Fix crashes when toggling stf barrier The STF (store-to-load forwarding) barrier mitigation can be enabled/disabled at runtime via a debugfs file (stf_barrier), which causes the kernel to patch itself to enable/disable the relevant mitigations. However depending on which mitigation we're using, it may not be safe to do that patching while other CPUs are active. For example the following crash: User access of kernel address (c00000003fff5af0) - exploit attempt? (uid: 0) segfault (11) at c00000003fff5af0 nip 7fff8ad12198 lr 7fff8ad121f8 code 1 code: 40820128 e93c00d0 e9290058 7c292840 40810058 38600000 4bfd9a81 e8410018 code: 2c030006 41810154 3860ffb6 e9210098 7d295279 39400000 40820a3c Shows that we returned to userspace without restoring the user r13 value, due to executing the partially patched STF exit code. Fix it by doing the patching under stop machine. The CPUs that aren't doing the patching will be spinning in the core of the stop machine logic. That is currently sufficient for our purposes, because none of the patching we do is to that code or anywhere in the vicinity. Fixes: a048a07d7f45 ("powerpc/64s: Add support for a store forwarding barrier at kernel entry/exit") Cc: stable@vger.kernel.org # v4.17+ Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210506044959.1298123-1-mpe@ellerman.id.au commit f0b3d338064e1fe7531f0d2977e35f3b334abfb4 Author: Stefano Brivio Date: Mon May 10 07:58:22 2021 +0200 netfilter: nft_set_pipapo_avx2: Add irq_fpu_usable() check, fallback to non-AVX2 version Arturo reported this backtrace: [709732.358791] WARNING: CPU: 3 PID: 456 at arch/x86/kernel/fpu/core.c:128 kernel_fpu_begin_mask+0xae/0xe0 [709732.358793] Modules linked in: binfmt_misc nft_nat nft_chain_nat nf_nat nft_counter nft_ct nf_tables nf_conntrack_netlink nfnetlink 8021q garp stp mrp llc vrf intel_rapl_msr intel_rapl_common skx_edac nfit libnvdimm ipmi_ssif x86_pkg_temp_thermal intel_powerclamp coretemp crc32_pclmul mgag200 ghash_clmulni_intel drm_kms_helper cec aesni_intel drm libaes crypto_simd cryptd glue_helper mei_me dell_smbios iTCO_wdt evdev intel_pmc_bxt iTCO_vendor_support dcdbas pcspkr rapl dell_wmi_descriptor wmi_bmof sg i2c_algo_bit watchdog mei acpi_ipmi ipmi_si button nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ipmi_devintf ipmi_msghandler ip_tables x_tables autofs4 ext4 crc16 mbcache jbd2 dm_mod raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor sd_mod t10_pi crc_t10dif crct10dif_generic raid6_pq libcrc32c crc32c_generic raid1 raid0 multipath linear md_mod ahci libahci tg3 libata xhci_pci libphy xhci_hcd ptp usbcore crct10dif_pclmul crct10dif_common bnxt_en crc32c_intel scsi_mod [709732.358941] pps_core i2c_i801 lpc_ich i2c_smbus wmi usb_common [709732.358957] CPU: 3 PID: 456 Comm: jbd2/dm-0-8 Not tainted 5.10.0-0.bpo.5-amd64 #1 Debian 5.10.24-1~bpo10+1 [709732.358959] Hardware name: Dell Inc. PowerEdge R440/04JN2K, BIOS 2.9.3 09/23/2020 [709732.358964] RIP: 0010:kernel_fpu_begin_mask+0xae/0xe0 [709732.358969] Code: ae 54 24 04 83 e3 01 75 38 48 8b 44 24 08 65 48 33 04 25 28 00 00 00 75 33 48 83 c4 10 5b c3 65 8a 05 5e 21 5e 76 84 c0 74 92 <0f> 0b eb 8e f0 80 4f 01 40 48 81 c7 00 14 00 00 e8 dd fb ff ff eb [709732.358972] RSP: 0018:ffffbb9700304740 EFLAGS: 00010202 [709732.358976] RAX: 0000000000000001 RBX: 0000000000000003 RCX: 0000000000000001 [709732.358979] RDX: ffffbb9700304970 RSI: ffff922fe1952e00 RDI: 0000000000000003 [709732.358981] RBP: ffffbb9700304970 R08: ffff922fc868a600 R09: ffff922fc711e462 [709732.358984] R10: 000000000000005f R11: ffff922ff0b27180 R12: ffffbb9700304960 [709732.358987] R13: ffffbb9700304b08 R14: ffff922fc664b6c8 R15: ffff922fc664b660 [709732.358990] FS: 0000000000000000(0000) GS:ffff92371fec0000(0000) knlGS:0000000000000000 [709732.358993] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [709732.358996] CR2: 0000557a6655bdd0 CR3: 000000026020a001 CR4: 00000000007706e0 [709732.358999] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [709732.359001] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [709732.359003] PKRU: 55555554 [709732.359005] Call Trace: [709732.359009] [709732.359035] nft_pipapo_avx2_lookup+0x4c/0x1cba [nf_tables] [709732.359046] ? sched_clock+0x5/0x10 [709732.359054] ? sched_clock_cpu+0xc/0xb0 [709732.359061] ? record_times+0x16/0x80 [709732.359068] ? plist_add+0xc1/0x100 [709732.359073] ? psi_group_change+0x47/0x230 [709732.359079] ? skb_clone+0x4d/0xb0 [709732.359085] ? enqueue_task_rt+0x22b/0x310 [709732.359098] ? bnxt_start_xmit+0x1e8/0xaf0 [bnxt_en] [709732.359102] ? packet_rcv+0x40/0x4a0 [709732.359121] nft_lookup_eval+0x59/0x160 [nf_tables] [709732.359133] nft_do_chain+0x350/0x500 [nf_tables] [709732.359152] ? nft_lookup_eval+0x59/0x160 [nf_tables] [709732.359163] ? nft_do_chain+0x364/0x500 [nf_tables] [709732.359172] ? fib4_rule_action+0x6d/0x80 [709732.359178] ? fib_rules_lookup+0x107/0x250 [709732.359184] nft_nat_do_chain+0x8a/0xf2 [nft_chain_nat] [709732.359193] nf_nat_inet_fn+0xea/0x210 [nf_nat] [709732.359202] nf_nat_ipv4_out+0x14/0xa0 [nf_nat] [709732.359207] nf_hook_slow+0x44/0xc0 [709732.359214] ip_output+0xd2/0x100 [709732.359221] ? __ip_finish_output+0x210/0x210 [709732.359226] ip_forward+0x37d/0x4a0 [709732.359232] ? ip4_key_hashfn+0xb0/0xb0 [709732.359238] ip_sublist_rcv_finish+0x4f/0x60 [709732.359243] ip_sublist_rcv+0x196/0x220 [709732.359250] ? ip_rcv_finish_core.isra.22+0x400/0x400 [709732.359255] ip_list_rcv+0x137/0x160 [709732.359264] __netif_receive_skb_list_core+0x29b/0x2c0 [709732.359272] netif_receive_skb_list_internal+0x1a6/0x2d0 [709732.359280] gro_normal_list.part.156+0x19/0x40 [709732.359286] napi_complete_done+0x67/0x170 [709732.359298] bnxt_poll+0x105/0x190 [bnxt_en] [709732.359304] ? irqentry_exit+0x29/0x30 [709732.359309] ? asm_common_interrupt+0x1e/0x40 [709732.359315] net_rx_action+0x144/0x3c0 [709732.359322] __do_softirq+0xd5/0x29c [709732.359329] asm_call_irq_on_stack+0xf/0x20 [709732.359332] [709732.359339] do_softirq_own_stack+0x37/0x40 [709732.359346] irq_exit_rcu+0x9d/0xa0 [709732.359353] common_interrupt+0x78/0x130 [709732.359358] asm_common_interrupt+0x1e/0x40 [709732.359366] RIP: 0010:crc_41+0x0/0x1e [crc32c_intel] [709732.359370] Code: ff ff f2 4d 0f 38 f1 93 a8 fe ff ff f2 4c 0f 38 f1 81 b0 fe ff ff f2 4c 0f 38 f1 8a b0 fe ff ff f2 4d 0f 38 f1 93 b0 fe ff ff 4c 0f 38 f1 81 b8 fe ff ff f2 4c 0f 38 f1 8a b8 fe ff ff f2 4d [709732.359373] RSP: 0018:ffffbb97008dfcd0 EFLAGS: 00000246 [709732.359377] RAX: 000000000000002a RBX: 0000000000000400 RCX: ffff922fc591dd50 [709732.359379] RDX: ffff922fc591dea0 RSI: 0000000000000a14 RDI: ffffffffc00dddc0 [709732.359382] RBP: 0000000000001000 R08: 000000000342d8c3 R09: 0000000000000000 [709732.359384] R10: 0000000000000000 R11: ffff922fc591dff0 R12: ffffbb97008dfe58 [709732.359386] R13: 000000000000000a R14: ffff922fd2b91e80 R15: ffff922fef83fe38 [709732.359395] ? crc_43+0x1e/0x1e [crc32c_intel] [709732.359403] ? crc32c_pcl_intel_update+0x97/0xb0 [crc32c_intel] [709732.359419] ? jbd2_journal_commit_transaction+0xaec/0x1a30 [jbd2] [709732.359425] ? irq_exit_rcu+0x3e/0xa0 [709732.359447] ? kjournald2+0xbd/0x270 [jbd2] [709732.359454] ? finish_wait+0x80/0x80 [709732.359470] ? commit_timeout+0x10/0x10 [jbd2] [709732.359476] ? kthread+0x116/0x130 [709732.359481] ? kthread_park+0x80/0x80 [709732.359488] ? ret_from_fork+0x1f/0x30 [709732.359494] ---[ end trace 081a19978e5f09f5 ]--- that is, nft_pipapo_avx2_lookup() uses the FPU running from a softirq that interrupted a kthread, also using the FPU. That's exactly the reason why irq_fpu_usable() is there: use it, and if we can't use the FPU, fall back to the non-AVX2 version of the lookup operation, i.e. nft_pipapo_lookup(). Reported-by: Arturo Borrero Gonzalez Cc: # 5.6.x Fixes: 7400b063969b ("nft_set_pipapo: Introduce AVX2-based lookup implementation") Signed-off-by: Stefano Brivio Signed-off-by: Pablo Neira Ayuso commit c07531c01d8284aedaf95708ea90e76d11af0e21 Author: Roi Dayan Date: Mon May 10 14:50:24 2021 +0300 netfilter: flowtable: Remove redundant hw refresh bit Offloading conns could fail for multiple reasons and a hw refresh bit is set to try to reoffload it in next sw packet. But it could be in some cases and future points that the hw refresh bit is not set but a refresh could succeed. Remove the hw refresh bit and do offload refresh if requested. There won't be a new work entry if a work is already pending anyway as there is the hw pending bit. Fixes: 8b3646d6e0c4 ("net/sched: act_ct: Support refreshing the flow table entries") Signed-off-by: Roi Dayan Signed-off-by: Pablo Neira Ayuso commit 54a40fc3a1da21b52dbf19f72fdc27a2ec740760 Author: Filipe Manana Date: Wed May 12 16:27:16 2021 +0100 btrfs: fix removed dentries still existing after log is synced When we move one inode from one directory to another and both the inode and its previous parent directory were logged before, we are not supposed to have the dentry for the old parent if we have a power failure after the log is synced. Only the new dentry is supposed to exist. Generally this works correctly, however there is a scenario where this is not currently working, because the old parent of the file/directory that was moved is not authoritative for a range that includes the dir index and dir item keys of the old dentry. This case is better explained with the following example and reproducer: # The test requires a very specific layout of keys and items in the # fs/subvolume btree to trigger the bug. So we want to make sure that # on whatever platform we are, we have the same leaf/node size. # # Currently in btrfs the node/leaf size can not be smaller than the page # size (but it can be greater than the page size). So use the largest # supported node/leaf size (64K). $ mkfs.btrfs -f -n 65536 /dev/sdc $ mount /dev/sdc /mnt # "testdir" is inode 257. $ mkdir /mnt/testdir $ chmod 755 /mnt/testdir # Create several empty files to have the directory "testdir" with its # items spread over several leaves (7 in this case). $ for ((i = 1; i <= 1200; i++)); do echo -n > /mnt/testdir/file$i done # Create our test directory "dira", inode number 1458, which gets all # its items in leaf 7. # # The BTRFS_DIR_ITEM_KEY item for inode 257 ("testdir") that points to # the entry named "dira" is in leaf 2, while the BTRFS_DIR_INDEX_KEY # item that points to that entry is in leaf 3. # # For this particular filesystem node size (64K), file count and file # names, we endup with the directory entry items from inode 257 in # leaves 2 and 3, as previously mentioned - what matters for triggering # the bug exercised by this test case is that those items are not placed # in leaf 1, they must be placed in a leaf different from the one # containing the inode item for inode 257. # # The corresponding BTRFS_DIR_ITEM_KEY and BTRFS_DIR_INDEX_KEY items for # the parent inode (257) are the following: # # item 460 key (257 DIR_ITEM 3724298081) itemoff 48344 itemsize 34 # location key (1458 INODE_ITEM 0) type DIR # transid 6 data_len 0 name_len 4 # name: dira # # and: # # item 771 key (257 DIR_INDEX 1202) itemoff 36673 itemsize 34 # location key (1458 INODE_ITEM 0) type DIR # transid 6 data_len 0 name_len 4 # name: dira $ mkdir /mnt/testdir/dira # Make sure everything done so far is durably persisted. $ sync # Now do a change to inode 257 ("testdir") that does not result in # COWing leaves 2 and 3 - the leaves that contain the directory items # pointing to inode 1458 (directory "dira"). # # Changing permissions, the owner/group, updating or adding a xattr, # etc, will not change (COW) leaves 2 and 3. So for the sake of # simplicity change the permissions of inode 257, which results in # updating its inode item and therefore change (COW) only leaf 1. $ chmod 700 /mnt/testdir # Now fsync directory inode 257. # # Since only the first leaf was changed/COWed, we log the inode item of # inode 257 and only the dentries found in the first leaf, all have a # key type of BTRFS_DIR_ITEM_KEY, and no keys of type # BTRFS_DIR_INDEX_KEY, because they sort after the former type and none # exist in the first leaf. # # We also log 3 items that represent ranges for dir items and dir # indexes for which the log is authoritative: # # 1) a key of type BTRFS_DIR_LOG_ITEM_KEY, which indicates the log is # authoritative for all BTRFS_DIR_ITEM_KEY keys that have an offset # in the range [0, 2285968570] (the offset here is the crc32c of the # dentry's name). The value 2285968570 corresponds to the offset of # the first key of leaf 2 (which is of type BTRFS_DIR_ITEM_KEY); # # 2) a key of type BTRFS_DIR_LOG_ITEM_KEY, which indicates the log is # authoritative for all BTRFS_DIR_ITEM_KEY keys that have an offset # in the range [4293818216, (u64)-1] (the offset here is the crc32c # of the dentry's name). The value 4293818216 corresponds to the # offset of the highest key of type BTRFS_DIR_ITEM_KEY plus 1 # (4293818215 + 1), which is located in leaf 2; # # 3) a key of type BTRFS_DIR_LOG_INDEX_KEY, with an offset of 1203, # which indicates the log is authoritative for all keys of type # BTRFS_DIR_INDEX_KEY that have an offset in the range # [1203, (u64)-1]. The value 1203 corresponds to the offset of the # last key of type BTRFS_DIR_INDEX_KEY plus 1 (1202 + 1), which is # located in leaf 3; # # Also, because "testdir" is a directory and inode 1458 ("dira") is a # child directory, we log inode 1458 too. $ xfs_io -c "fsync" /mnt/testdir # Now move "dira", inode 1458, to be a child of the root directory # (inode 256). # # Because this inode was previously logged, when "testdir" was fsynced, # the log is updated so that the old inode reference, referring to inode # 257 as the parent, is deleted and the new inode reference, referring # to inode 256 as the parent, is added to the log. $ mv /mnt/testdir/dira /mnt # Now change some file and fsync it. This guarantees the log changes # made by the previous move/rename operation are persisted. We do not # need to do any special modification to the file, just any change to # any file and sync the log. $ xfs_io -c "pwrite -S 0xab 0 64K" -c "fsync" /mnt/testdir/file1 # Simulate a power failure and then mount again the filesystem to # replay the log tree. We want to verify that we are able to mount the # filesystem, meaning log replay was successful, and that directory # inode 1458 ("dira") only has inode 256 (the filesystem's root) as # its parent (and no longer a child of inode 257). # # It used to happen that during log replay we would end up having # inode 1458 (directory "dira") with 2 hard links, being a child of # inode 257 ("testdir") and inode 256 (the filesystem's root). This # resulted in the tree checker detecting the issue and causing the # mount operation to fail (with -EIO). # # This happened because in the log we have the new name/parent for # inode 1458, which results in adding the new dentry with inode 256 # as the parent, but the previous dentry, under inode 257 was never # removed - this is because the ranges for dir items and dir indexes # of inode 257 for which the log is authoritative do not include the # old dir item and dir index for the dentry of inode 257 referring to # inode 1458: # # - for dir items, the log is authoritative for the ranges # [0, 2285968570] and [4293818216, (u64)-1]. The dir item at inode 257 # pointing to inode 1458 has a key of (257 DIR_ITEM 3724298081), as # previously mentioned, so the dir item is not deleted when the log # replay procedure processes the authoritative ranges, as 3724298081 # is outside both ranges; # # - for dir indexes, the log is authoritative for the range # [1203, (u64)-1], and the dir index item of inode 257 pointing to # inode 1458 has a key of (257 DIR_INDEX 1202), as previously # mentioned, so the dir index item is not deleted when the log # replay procedure processes the authoritative range. $ mount /dev/sdc /mnt mount: /mnt: can't read superblock on /dev/sdc. $ dmesg (...) [87849.840509] BTRFS info (device sdc): start tree-log replay [87849.875719] BTRFS critical (device sdc): corrupt leaf: root=5 block=30539776 slot=554 ino=1458, invalid nlink: has 2 expect no more than 1 for dir [87849.878084] BTRFS info (device sdc): leaf 30539776 gen 7 total ptrs 557 free space 2092 owner 5 [87849.879516] BTRFS info (device sdc): refs 1 lock_owner 0 current 2099108 [87849.880613] item 0 key (1181 1 0) itemoff 65275 itemsize 160 [87849.881544] inode generation 6 size 0 mode 100644 [87849.882692] item 1 key (1181 12 257) itemoff 65258 itemsize 17 (...) [87850.562549] item 556 key (1458 12 257) itemoff 16017 itemsize 14 [87850.563349] BTRFS error (device dm-0): block=30539776 write time tree block corruption detected [87850.564386] ------------[ cut here ]------------ [87850.564920] WARNING: CPU: 3 PID: 2099108 at fs/btrfs/disk-io.c:465 csum_one_extent_buffer+0xed/0x100 [btrfs] [87850.566129] Modules linked in: btrfs dm_zero dm_snapshot (...) [87850.573789] CPU: 3 PID: 2099108 Comm: mount Not tainted 5.12.0-rc8-btrfs-next-86 #1 (...) [87850.587481] Call Trace: [87850.587768] btree_csum_one_bio+0x244/0x2b0 [btrfs] [87850.588354] ? btrfs_bio_fits_in_stripe+0xd8/0x110 [btrfs] [87850.589003] btrfs_submit_metadata_bio+0xb7/0x100 [btrfs] [87850.589654] submit_one_bio+0x61/0x70 [btrfs] [87850.590248] submit_extent_page+0x91/0x2f0 [btrfs] [87850.590842] write_one_eb+0x175/0x440 [btrfs] [87850.591370] ? find_extent_buffer_nolock+0x1c0/0x1c0 [btrfs] [87850.592036] btree_write_cache_pages+0x1e6/0x610 [btrfs] [87850.592665] ? free_debug_processing+0x1d5/0x240 [87850.593209] do_writepages+0x43/0xf0 [87850.593798] ? __filemap_fdatawrite_range+0xa4/0x100 [87850.594391] __filemap_fdatawrite_range+0xc5/0x100 [87850.595196] btrfs_write_marked_extents+0x68/0x160 [btrfs] [87850.596202] btrfs_write_and_wait_transaction.isra.0+0x4d/0xd0 [btrfs] [87850.597377] btrfs_commit_transaction+0x794/0xca0 [btrfs] [87850.598455] ? _raw_spin_unlock_irqrestore+0x32/0x60 [87850.599305] ? kmem_cache_free+0x15a/0x3d0 [87850.600029] btrfs_recover_log_trees+0x346/0x380 [btrfs] [87850.601021] ? replay_one_extent+0x7d0/0x7d0 [btrfs] [87850.601988] open_ctree+0x13c9/0x1698 [btrfs] [87850.602846] btrfs_mount_root.cold+0x13/0xed [btrfs] [87850.603771] ? kmem_cache_alloc_trace+0x7c9/0x930 [87850.604576] ? vfs_parse_fs_string+0x5d/0xb0 [87850.605293] ? kfree+0x276/0x3f0 [87850.605857] legacy_get_tree+0x30/0x50 [87850.606540] vfs_get_tree+0x28/0xc0 [87850.607163] fc_mount+0xe/0x40 [87850.607695] vfs_kern_mount.part.0+0x71/0x90 [87850.608440] btrfs_mount+0x13b/0x3e0 [btrfs] (...) [87850.629477] ---[ end trace 68802022b99a1ea0 ]--- [87850.630849] BTRFS: error (device sdc) in btrfs_commit_transaction:2381: errno=-5 IO failure (Error while writing out transaction) [87850.632422] BTRFS warning (device sdc): Skipping commit of aborted transaction. [87850.633416] BTRFS: error (device sdc) in cleanup_transaction:1978: errno=-5 IO failure [87850.634553] BTRFS: error (device sdc) in btrfs_replay_log:2431: errno=-5 IO failure (Failed to recover log tree) [87850.637529] BTRFS error (device sdc): open_ctree failed In this example the inode we moved was a directory, so it was easy to detect the problem because directories can only have one hard link and the tree checker immediately detects that. If the moved inode was a file, then the log replay would succeed and we would end up having both the new hard link (/mnt/foo) and the old hard link (/mnt/testdir/foo) present, but only the new one should be present. Fix this by forcing re-logging of the old parent directory when logging the new name during a rename operation. This ensures we end up with a log that is authoritative for a range covering the keys for the old dentry, therefore causing the old dentry do be deleted when replaying the log. A test case for fstests will follow up soon. Fixes: 64d6b281ba4db0 ("btrfs: remove unnecessary check_parent_dirs_for_sync()") CC: stable@vger.kernel.org # 5.12+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 15c7745c9a0078edad1f7df5a6bb7b80bc8cca23 Author: Boris Burkov Date: Tue Apr 6 15:31:18 2021 -0700 btrfs: return whole extents in fiemap `xfs_io -c 'fiemap ' ` can give surprising results on btrfs that differ from xfs. btrfs prints out extents trimmed to fit the user input. If the user's fiemap request has an offset, then rather than returning each whole extent which intersects that range, we also trim the start extent to not have start < off. Documentation in filesystems/fiemap.txt and the xfs_io man page suggests that returning the whole extent is expected. Some cases which all yield the same fiemap in xfs, but not btrfs: dd if=/dev/zero of=$f bs=4k count=1 sudo xfs_io -c 'fiemap 0 1024' $f 0: [0..7]: 26624..26631 sudo xfs_io -c 'fiemap 2048 1024' $f 0: [4..7]: 26628..26631 sudo xfs_io -c 'fiemap 2048 4096' $f 0: [4..7]: 26628..26631 sudo xfs_io -c 'fiemap 3584 512' $f 0: [7..7]: 26631..26631 sudo xfs_io -c 'fiemap 4091 5' $f 0: [7..6]: 26631..26630 I believe this is a consequence of the logic for merging contiguous extents represented by separate extent items. That logic needs to track the last offset as it loops through the extent items, which happens to pick up the start offset on the first iteration, and trim off the beginning of the full extent. To fix it, start `off` at 0 rather than `start` so that we keep the iteration/merging intact without cutting off the start of the extent. after the fix, all the above commands give: 0: [0..7]: 26624..26631 The merging logic is exercised by fstest generic/483, and I have written a new fstest for checking we don't have backwards or zero-length fiemaps for cases like those above. Reviewed-by: Josef Bacik Signed-off-by: Boris Burkov Signed-off-by: David Sterba commit 71795ee590111e3636cc3c148289dfa9fa0a5fc3 Author: Josef Bacik Date: Thu Apr 29 10:51:34 2021 -0400 btrfs: avoid RCU stalls while running delayed iputs Generally a delayed iput is added when we might do the final iput, so usually we'll end up sleeping while processing the delayed iputs naturally. However there's no guarantee of this, especially for small files. In production we noticed 5 instances of RCU stalls while testing a kernel release overnight across 1000 machines, so this is relatively common: host count: 5 rcu: INFO: rcu_sched self-detected stall on CPU rcu: ....: (20998 ticks this GP) idle=59e/1/0x4000000000000002 softirq=12333372/12333372 fqs=3208 (t=21031 jiffies g=27810193 q=41075) NMI backtrace for cpu 1 CPU: 1 PID: 1713 Comm: btrfs-cleaner Kdump: loaded Not tainted 5.6.13-0_fbk12_rc1_5520_gec92bffc1ec9 #1 Call Trace: dump_stack+0x50/0x70 nmi_cpu_backtrace.cold.6+0x30/0x65 ? lapic_can_unplug_cpu.cold.30+0x40/0x40 nmi_trigger_cpumask_backtrace+0xba/0xca rcu_dump_cpu_stacks+0x99/0xc7 rcu_sched_clock_irq.cold.90+0x1b2/0x3a3 ? trigger_load_balance+0x5c/0x200 ? tick_sched_do_timer+0x60/0x60 ? tick_sched_do_timer+0x60/0x60 update_process_times+0x24/0x50 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:queued_spin_lock_slowpath+0x17d/0x1b0 RSP: 0018:ffffc9000da5fe48 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: ffff889fa81d0cd8 RCX: 0000000000000029 RDX: ffff889fff86c0c0 RSI: 0000000000080000 RDI: ffff88bfc2da7200 RBP: ffff888f2dcdd768 R08: 0000000001040000 R09: 0000000000000000 R10: 0000000000000001 R11: ffffffff82a55560 R12: ffff88bfc2da7200 R13: 0000000000000000 R14: ffff88bff6c2a360 R15: ffffffff814bd870 ? kzalloc.constprop.57+0x30/0x30 list_lru_add+0x5a/0x100 inode_lru_list_add+0x20/0x40 iput+0x1c1/0x1f0 run_delayed_iput_locked+0x46/0x90 btrfs_run_delayed_iputs+0x3f/0x60 cleaner_kthread+0xf2/0x120 kthread+0x10b/0x130 Fix this by adding a cond_resched_lock() to the loop processing delayed iputs so we can avoid these sort of stalls. CC: stable@vger.kernel.org # 4.9+ Reviewed-by: Rik van Riel Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit d6f67afbdf9df5301641b2ef7ac4030abab3e067 Author: Johannes Thumshirn Date: Mon May 10 22:39:38 2021 +0900 btrfs: return 0 for dev_extent_hole_check_zoned hole_start in case of error Commit 7000babddac6 ("btrfs: assign proper values to a bool variable in dev_extent_hole_check_zoned") assigned false to the hole_start parameter of dev_extent_hole_check_zoned(). The hole_start parameter is not boolean and returns the start location of the found hole. Fixes: 7000babddac6 ("btrfs: assign proper values to a bool variable in dev_extent_hole_check_zoned") Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 08f0cfbf739a5086995f0779bbcb607163128a9a Merge: 1db7aa269ada0 5c1efb5f7682e Author: Dave Airlie Date: Fri May 14 09:20:04 2021 +1000 Merge tag 'amd-drm-fixes-5.13-2021-05-13' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-5.13-2021-05-13: amdgpu: - Fixes for flexible array conversions - Fix sysfs attribute init - Harvesting fixes - VCN CG/PG fixes for Picasso radeon: - Fixes for flexible array conversions - Fix for flickering on Oland with multiple 4K displays Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210513163228.3963-1-alexander.deucher@amd.com commit 1db7aa269ada089c7b8be8d1477a4d3925dc5969 Merge: 875d598db60ac c55b44c9386f3 Author: Dave Airlie Date: Fri May 14 09:19:32 2021 +1000 Merge tag 'drm-misc-fixes-2021-05-13' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes Remove an unused function and a MAINTAINERS update. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210513133617.xq77wwrehpuh7yn2@hendrix commit e4df1b0c24350a0f00229ff895a91f1072bd850d Author: Tao Liu Date: Thu May 13 21:08:00 2021 +0800 openvswitch: meter: fix race when getting now_ms. We have observed meters working unexpected if traffic is 3+Gbit/s with multiple connections. now_ms is not pretected by meter->lock, we may get a negative long_delta_ms when another cpu updated meter->used, then: delta_ms = (u32)long_delta_ms; which will be a large value. band->bucket += delta_ms * band->rate; then we get a wrong band->bucket. OpenVswitch userspace datapath has fixed the same issue[1] some time ago, and we port the implementation to kernel datapath. [1] https://patchwork.ozlabs.org/project/openvswitch/patch/20191025114436.9746-1-i.maximets@ovn.org/ Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure") Signed-off-by: Tao Liu Suggested-by: Ilya Maximets Reviewed-by: Ilya Maximets Signed-off-by: David S. Miller commit c7d8302478ae645c2e9b59f2cf125641875b7dc2 Author: Wei Yongjun Date: Thu May 13 12:46:21 2021 +0000 net: korina: Fix return value check in korina_probe() In case of error, the function devm_platform_ioremap_resource_byname() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: b4cd249a8cc0 ("net: korina: Use devres functions") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 65e302a9bd57b62872040d57eea1201562a7cbb2 Author: Ayush Sawal Date: Thu May 13 15:11:51 2021 +0530 cxgb4/ch_ktls: Clear resources when pf4 device is removed This patch maintain the list of active tids and clear all the active connection resources when DETACH notification comes. Fixes: a8c16e8ed624f ("crypto/chcr: move nic TLS functionality to drivers/net") Signed-off-by: Ayush Sawal Signed-off-by: David S. Miller commit e1d027dd97e1e750669cdc0d3b016a4f54e473eb Author: Christophe JAILLET Date: Thu May 13 09:24:55 2021 +0200 net: mdio: octeon: Fix some double free issues 'bus->mii_bus' has been allocated with 'devm_mdiobus_alloc_size()' in the probe function. So it must not be freed explicitly or there will be a double free. Remove the incorrect 'mdiobus_free' in the error handling path of the probe function and in remove function. Suggested-By: Andrew Lunn Fixes: 35d2aeac9810 ("phy: mdio-octeon: Use devm_mdiobus_alloc_size()") Signed-off-by: Christophe JAILLET Reviewed-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a93a0a15876d2a077a3bc260b387d2457a051f24 Author: Christophe JAILLET Date: Thu May 13 09:44:49 2021 +0200 net: mdio: thunder: Fix a double free issue in the .remove function 'bus->mii_bus' have been allocated with 'devm_mdiobus_alloc_size()' in the probe function. So it must not be freed explicitly or there will be a double free. Remove the incorrect 'mdiobus_free' in the remove function. Fixes: 379d7ac7ca31 ("phy: mdio-thunder: Add driver for Cavium Thunder SoC MDIO buses.") Signed-off-by: Christophe JAILLET Reviewed-by: Russell King Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 27b57bb76a897be80494ee11ee4e85326d19383d Author: Greg Kroah-Hartman Date: Thu May 13 21:40:38 2021 +0200 Revert "Revert "ALSA: usx2y: Fix potential NULL pointer dereference"" This reverts commit 4667a6fc1777ce071504bab570d3599107f4790f. Takashi writes: I have already started working on the bigger cleanup of this driver code based on 5.13-rc1, so could you drop this revert? I missed our previous discussion about this, my fault for applying it. Reported-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman commit 315d99318179b9cd5077ccc9f7f26a164c9fa998 Merge: 2df38a8e9b838 78a6948bbadd0 Author: Linus Torvalds Date: Thu May 13 12:28:10 2021 -0700 Merge tag 'pm-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These close a coverage gap in the intel_pstate driver and fix runtime PM child count imbalance related to interactions with system-wide suspend. Specifics: - Make intel_pstate work as expected on systems where the platform firmware enables HWP even though the HWP EPP support is not advertised (Rafael Wysocki). - Fix possible runtime PM child count imbalance that may occur if other runtime PM functions are called after invoking pm_runtime_force_suspend() and before pm_runtime_force_resume() is called (Tony Lindgren)" * tag 'pm-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM: runtime: Fix unpaired parent child_count for force_resume cpufreq: intel_pstate: Use HWP if enabled by platform firmware commit 2df38a8e9b838c94e08f90f0487a90cea4f92c25 Merge: adc12a7407b28 fd38651716b45 Author: Linus Torvalds Date: Thu May 13 12:22:01 2021 -0700 Merge tag 'acpi-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These revert an unnecessary revert of an ACPI power management commit, add a missing device ID to one of the lists and fix a possible memory leak in an error path. Specifics: - Revert a revert of a recent ACPI power management change that does not need to be reverted after all (Rafael Wysocki). - Add missing fan device ID to the list of device IDs for which the devices should not be put into the ACPI PM domain (Sumeet Pawnikar). - Fix possible memory leak in an error path in the ACPI device enumeration code (Christophe JAILLET)" * tag 'acpi-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: PM: Add ACPI ID of Alder Lake Fan ACPI: scan: Fix a memory leak in an error handling path Revert "Revert "ACPI: scan: Turn off unused power resources during initialization"" commit bc8f3d4647a99468d7733039b6bc9234b6e91df4 Author: Mikulas Patocka Date: Tue May 11 11:41:00 2021 -0400 dm integrity: fix sparse warnings Use the types __le* instead of __u* to fix sparse warnings. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit dbae70d452a0858d62915166d93650c98fe6639c Author: Mikulas Patocka Date: Wed May 12 08:28:43 2021 -0400 dm integrity: revert to not using discard filler when recalulating Revert the commit 7a5b96b4784454ba258e83dc7469ddbacd3aaac3 ("dm integrity: use discard support when recalculating"). There's a bug that when we write some data beyond the current recalculate boundary, the checksum will be rewritten with the discard filler later. And the data will no longer have integrity protection. There's no easy fix for this case. Also, another problematic case is if dm-integrity is used to detect bitrot (random device errors, bit flips, etc); dm-integrity should detect that even for unused sectors. With commit 7a5b96b4784 it can happen that such change is undetected (because discard filler is not a valid checksum). Signed-off-by: Mikulas Patocka Acked-by: Milan Broz Signed-off-by: Mike Snitzer commit a3626bcf5fafad0ded410b269e21f37bdaf2baf4 Author: Jim Cromie Date: Tue May 4 16:22:35 2021 -0600 dyndbg: drop uninformative vpr_info Remove a vpr_info which I added in 2012, when I knew even less than now. In 2020, a simpler pr_fmt stripped it of context, and any remaining value. no functional change. Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20210504222235.1033685-3-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit 640d1eaff2c09e382a23bd831094ebbfaa16fef5 Author: Jim Cromie Date: Tue May 4 16:22:34 2021 -0600 dyndbg: avoid calling dyndbg_emit_prefix when it has no work Wrap function in a static-inline one, which checks flags to avoid calling the function unnecessarily. And hoist its output-buffer initialization to the grand-caller, which is already allocating the buffer on the stack, and can trivially initialize it too. Signed-off-by: Jim Cromie Link: https://lore.kernel.org/r/20210504222235.1033685-2-jim.cromie@gmail.com Signed-off-by: Greg Kroah-Hartman commit c699a0db2d62e3bbb7f0bf35c87edbc8d23e3062 Author: Mikulas Patocka Date: Mon May 10 14:49:05 2021 -0400 dm snapshot: fix crash with transient storage and zero chunk size The following commands will crash the kernel: modprobe brd rd_size=1048576 dmsetup create o --table "0 `blockdev --getsize /dev/ram0` snapshot-origin /dev/ram0" dmsetup create s --table "0 `blockdev --getsize /dev/ram0` snapshot /dev/ram0 /dev/ram1 N 0" The reason is that when we test for zero chunk size, we jump to the label bad_read_metadata without setting the "r" variable. The function snapshot_ctr destroys all the structures and then exits with "r == 0". The kernel then crashes because it falsely believes that snapshot_ctr succeeded. In order to fix the bug, we set the variable "r" to -EINVAL. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer commit fd38651716b45f817a542c34cd5336ff372d06e6 Merge: 0c8bd174f0fc1 2404b87470191 Author: Rafael J. Wysocki Date: Thu May 13 20:39:58 2021 +0200 Merge branch 'acpi-pm' * acpi-pm: ACPI: PM: Add ACPI ID of Alder Lake Fan Revert "Revert "ACPI: scan: Turn off unused power resources during initialization"" commit 78a6948bbadd0da46d318f3b7a954a71e02c39f7 Merge: e5af36b2adb85 c745253e2a691 Author: Rafael J. Wysocki Date: Thu May 13 20:39:07 2021 +0200 Merge branch 'pm-core' * pm-core: PM: runtime: Fix unpaired parent child_count for force_resume commit ced081a436d21a7d34d4d42acb85058f9cf423f2 Author: Luca Stefani Date: Thu May 6 21:37:25 2021 +0200 binder: Return EFAULT if we fail BINDER_ENABLE_ONEWAY_SPAM_DETECTION All the other ioctl paths return EFAULT in case the copy_from_user/copy_to_user call fails, make oneway spam detection follow the same paradigm. Fixes: a7dc1e6f99df ("binder: tell userspace to dump current backtrace when detected oneway spamming") Acked-by: Todd Kjos Acked-by: Christian Brauner Signed-off-by: Luca Stefani Link: https://lore.kernel.org/r/20210506193726.45118-1-luca.stefani.ge1@gmail.com Signed-off-by: Greg Kroah-Hartman commit eb01f5353bdaa59600b29d864819056a0e3de24d Author: Steven Rostedt (VMware) Date: Thu May 13 12:23:24 2021 -0400 tracing: Handle %.*s in trace_check_vprintf() If a trace event uses the %*.s notation, the trace_check_vprintf() will fail and will warn about a bad processing of strings, because it does not take into account the length field when processing the star (*) part. Have it handle this case as well. Link: https://lore.kernel.org/linux-nfs/238C0E2D-C2A4-4578-ADD2-C565B3B99842@oracle.com/ Reported-by: Chuck Lever III Fixes: 9a6944fee68e2 ("tracing: Add a verifier to check string pointers for trace events") Signed-off-by: Steven Rostedt (VMware) commit adc12a7407b28c0f257227a508db83ab00911b74 Merge: d1e7c13a9b0c2 860dafa902595 Author: Linus Torvalds Date: Thu May 13 11:12:51 2021 -0700 Merge branch 'resizex' (patches from Maciej) Merge VT_RESIZEX fixes from Maciej Rozycki: "I got to the bottom of the issue with VT_RESIZEX recently discussed and came up with this small patch series, fixing an additional issue that I originally thought might be broken VGA hardware emulation with my laptop, which however turned out to be intertwined with the original problem and also a regression introduced somewhat later. The fix for that because the first patch, and then to make backporting feasible I had to put a revert of the offending change from last September next, followed by a proper fix for the framebuffer issue that change had tried to address. See individual change descriptions for details. These have been verified with true VGA hardware (a Trident TVGA8900 ISA video adapter) using various combinations of `svgatextmode' and `setfont' command invocations to change both the VT size and the font size, and also switching between the text console and X11, both by starting/stopping the X server and by switching between VTs. All this to ensure bringing the behaviour of VGA text console back to correct operation as it used to be with Linux 2.6.18" * emailed patches from Maciej W. Rozycki : vt: Fix character height handling with VT_RESIZEX vt_ioctl: Revert VT_RESIZEX parameter handling removal vgacon: Record video mode changes with VT_RESIZEX commit 860dafa902595fb5f1d23bbcce1215188c3341e6 Author: Maciej W. Rozycki Date: Thu May 13 11:51:50 2021 +0200 vt: Fix character height handling with VT_RESIZEX Restore the original intent of the VT_RESIZEX ioctl's `v_clin' parameter which is the number of pixel rows per character (cell) rather than the height of the font used. For framebuffer devices the two values are always the same, because the former is inferred from the latter one. For VGA used as a true text mode device these two parameters are independent from each other: the number of pixel rows per character is set in the CRT controller, while font height is in fact hardwired to 32 pixel rows and fonts of heights below that value are handled by padding their data with blanks when loaded to hardware for use by the character generator. One can change the setting in the CRT controller and it will update the screen contents accordingly regardless of the font loaded. The `v_clin' parameter is used by the `vgacon' driver to set the height of the character cell and then the cursor position within. Make the parameter explicit then, by defining a new `vc_cell_height' struct member of `vc_data', set it instead of `vc_font.height' from `v_clin' in the VT_RESIZEX ioctl, and then use it throughout the `vgacon' driver except where actual font data is accessed which as noted above is independent from the CRTC setting. This way the framebuffer console driver is free to ignore the `v_clin' parameter as irrelevant, as it always should have, avoiding any issues attempts to give the parameter a meaning there could have caused, such as one that has led to commit 988d0763361b ("vt_ioctl: make VT_RESIZEX behave like VT_RESIZE"): "syzbot is reporting UAF/OOB read at bit_putcs()/soft_cursor() [1][2], for vt_resizex() from ioctl(VT_RESIZEX) allows setting font height larger than actual font height calculated by con_font_set() from ioctl(PIO_FONT). Since fbcon_set_font() from con_font_set() allocates minimal amount of memory based on actual font height calculated by con_font_set(), use of vt_resizex() can cause UAF/OOB read for font data." The problem first appeared around Linux 2.5.66 which predates our repo history, but the origin could be identified with the old MIPS/Linux repo also at: as commit 9736a3546de7 ("Merge with Linux 2.5.66."), where VT_RESIZEX code in `vt_ioctl' was updated as follows: if (clin) - video_font_height = clin; + vc->vc_font.height = clin; making the parameter apply to framebuffer devices as well, perhaps due to the use of "font" in the name of the original `video_font_height' variable. Use "cell" in the new struct member then to avoid ambiguity. References: [1] https://syzkaller.appspot.com/bug?id=32577e96d88447ded2d3b76d71254fb855245837 [2] https://syzkaller.appspot.com/bug?id=6b8355d27b2b94fb5cedf4655e3a59162d9e48e3 Signed-off-by: Maciej W. Rozycki Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org # v2.6.12+ Signed-off-by: Linus Torvalds commit a90c275eb144c1b755f04769e1f29d832d6daeaf Author: Maciej W. Rozycki Date: Thu May 13 11:51:45 2021 +0200 vt_ioctl: Revert VT_RESIZEX parameter handling removal Revert the removal of code handling extra VT_RESIZEX ioctl's parameters beyond those that VT_RESIZE supports, fixing a functional regression causing `svgatextmode' not to resize the VT anymore. As a consequence of the reverted change when the video adapter is reprogrammed from the original say 80x25 text mode using a 9x16 character cell (720x400 pixel resolution) to say 80x37 text mode and the same character cell (720x592 pixel resolution), the VT geometry does not get updated and only upper two thirds of the screen are used for the VT, and the lower part remains blank. The proportions change according to text mode geometries chosen. Revert the change verbatim then, bringing back previous VT resizing. Signed-off-by: Maciej W. Rozycki Fixes: 988d0763361b ("vt_ioctl: make VT_RESIZEX behave like VT_RESIZE") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Linus Torvalds commit d4d0ad57b3865795c4cde2fb5094c594c2e8f469 Author: Maciej W. Rozycki Date: Thu May 13 11:51:41 2021 +0200 vgacon: Record video mode changes with VT_RESIZEX Fix an issue with VGA console font size changes made after the initial video text mode has been changed with a user tool like `svgatextmode' calling the VT_RESIZEX ioctl. As it stands in that case the original screen geometry continues being used to validate further VT resizing. Consequently when the video adapter is firstly reprogrammed from the original say 80x25 text mode using a 9x16 character cell (720x400 pixel resolution) to say 80x37 text mode and the same character cell (720x592 pixel resolution), and secondly the CRTC character cell updated to 9x8 (by loading a suitable font with the KD_FONT_OP_SET request of the KDFONTOP ioctl), the VT geometry does not get further updated from 80x37 and only upper half of the screen is used for the VT, with the lower half showing rubbish corresponding to whatever happens to be there in the video memory that maps to that part of the screen. Of course the proportions change according to text mode geometries and font sizes chosen. Address the problem then, by updating the text mode geometry defaults rather than checking against them whenever the VT is resized via a user ioctl. Signed-off-by: Maciej W. Rozycki Fixes: e400b6ec4ede ("vt/vgacon: Check if screen resize request comes from userspace") Cc: stable@vger.kernel.org # v2.6.24+ Signed-off-by: Linus Torvalds commit 6bdf2fbc48f104a84606f6165aa8a20d9a7d9074 Merge: bedf78c4cbbbb e181811bd04d8 Author: Jens Axboe Date: Thu May 13 11:07:17 2021 -0600 Merge tag 'nvme-5.13-2021-05-13' of git://git.infradead.org/nvme into block-5.13 Pull NVMe fixes from Christoph: "nvme fix for Linux 5.13 - correct the check for using the inline bio in nvmet (Chaitanya Kulkarni) - demote unsupported command warnings (Chaitanya Kulkarni) - fix corruption due to double initializing ANA state (me, Hou Pu) - reset ns->file when open fails (Daniel Wagner) - fix a NULL deref when SEND is completed with error in nvmet-rdma (Michal Kalderon)" * tag 'nvme-5.13-2021-05-13' of git://git.infradead.org/nvme: nvmet: use new ana_log_size instead the old one nvmet: seset ns->file when open fails nvmet: demote fabrics cmd parse err msg to debug nvmet: use helper to remove the duplicate code nvmet: demote discovery cmd parse err msg to debug nvmet-rdma: Fix NULL deref when SEND is completed with error nvmet: fix inline bio check for passthru nvmet: fix inline bio check for bdev-ns nvme-multipath: fix double initialization of ANA state commit d1e7c13a9b0c27c9440e00865a7c46b7a87767ee Merge: c06a2ba62fc40 3b5169c2eb81e Author: Linus Torvalds Date: Thu May 13 09:58:53 2021 -0700 Merge tag 'hwmon-for-v5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Fix bugs/regressions in adm9240, ltc2992, pmbus/fsp-3y, and occ drivers, plus a minor cleanup in the corsair-psu driver" * tag 'hwmon-for-v5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (adm9240) Fix writes into inX_max attributes hwmon: (ltc2992) Put fwnode in error case during ->probe() hwmon: (pmbus/fsp-3y) Fix FSP-3Y YH-5151E non-compliant vout encoding hwmon: (occ) Fix poll rate limiting hwmon: (corsair-psu) Remove unneeded semicolons commit 9183f01b5e6e32eb3f17b5f3f8d5ad5ac9786c49 Author: Greg Kroah-Hartman Date: Thu May 6 16:00:47 2021 +0200 cdrom: gdrom: initialize global variable at init time As Peter points out, if we were to disconnect and then reconnect this driver from a device, the "global" state of the device would contain odd values and could cause problems. Fix this up by just initializing the whole thing to 0 at probe() time. Ideally this would be a per-device variable, but given the age and the total lack of users of it, that would require a lot of s/./->/g changes for really no good reason. Reported-by: Peter Rosin Cc: Jens Axboe Reviewed-by: Peter Rosin Link: https://lore.kernel.org/r/YJP2j6AU82MqEY2M@kroah.com Signed-off-by: Greg Kroah-Hartman commit 419b4a142a7ece36cebcd434f8ce2af59ef94b85 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:36 2021 +0200 brcmfmac: properly check for bus register errors The brcmfmac driver ignores any errors on initialization with the different busses by deferring the initialization to a workqueue and ignoring all possible errors that might happen. Fix up all of this by only allowing the module to load if all bus registering worked properly. Cc: Kalle Valo Link: https://lore.kernel.org/r/20210503115736.2104747-70-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 30a350947692f794796f563029d29764497f2887 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:35 2021 +0200 Revert "brcmfmac: add a check for the status of usb_register" This reverts commit 42daad3343be4a4e1ee03e30a5f5cc731dadfef5. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit here did nothing to actually help if usb_register() failed, so it gives a "false sense of security" when there is none. The correct solution is to correctly unwind from this error. Cc: Kangjie Lu Cc: Kalle Valo Link: https://lore.kernel.org/r/20210503115736.2104747-69-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 13b7c0390a5d3840e1e2cda8f44a310fdbb982de Author: Greg Kroah-Hartman Date: Mon May 3 13:57:34 2021 +0200 video: imsttfb: check for ioremap() failures We should check if ioremap() were to somehow fail in imsttfb_probe() and handle the unwinding of the resources allocated here properly. Ideally if anyone cares about this driver (it's for a PowerMac era PCI display card), they wouldn't even be using fbdev anymore. Or the devm_* apis could be used, but that's just extra work for diminishing returns... Cc: Finn Thain Cc: Bartlomiej Zolnierkiewicz Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210503115736.2104747-68-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ed04fe8a0e87d7b5ea17d47f4ac9ec962b24814a Author: Greg Kroah-Hartman Date: Mon May 3 13:57:33 2021 +0200 Revert "video: imsttfb: fix potential NULL pointer dereferences" This reverts commit 1d84353d205a953e2381044953b7fa31c8c9702d. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit here, while technically correct, did not fully handle all of the reported issues that the commit stated it was fixing, so revert it until it can be "fixed" fully. Note, ioremap() probably will never fail for old hardware like this, and if anyone actually used this hardware (a PowerMac era PCI display card), they would not be using fbdev anymore. Cc: Kangjie Lu Cc: Aditya Pakki Cc: Finn Thain Cc: Bartlomiej Zolnierkiewicz Reviewed-by: Rob Herring Fixes: 1d84353d205a ("video: imsttfb: fix potential NULL pointer dereferences") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-67-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit dbc97bfd3918ed9268bfc174cae8a7d6b3d51aad Author: Tom Seewald Date: Mon May 3 13:57:32 2021 +0200 net: liquidio: Add missing null pointer checks The functions send_rx_ctrl_cmd() in both liquidio/lio_main.c and liquidio/lio_vf_main.c do not check if the call to octeon_alloc_soft_command() fails and returns a null pointer. Both functions also return void so errors are not propagated back to the caller. Fix these issues by updating both instances of send_rx_ctrl_cmd() to return an integer rather than void, and have them return -ENOMEM if an allocation failure occurs. Also update all callers of send_rx_ctrl_cmd() so that they now check the return value. Cc: David S. Miller Signed-off-by: Tom Seewald Link: https://lore.kernel.org/r/20210503115736.2104747-66-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4fd798a5a89114c1892574c50f2aebd49bc5b4f5 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:31 2021 +0200 Revert "net: liquidio: fix a NULL pointer dereference" This reverts commit fe543b2f174f34a7a751aa08b334fe6b105c4569. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. While the original commit does keep the immediate "NULL dereference" from happening, it does not properly propagate the error back to the callers, AND it does not fix this same identical issue in the drivers/net/ethernet/cavium/liquidio/lio_vf_main.c for some reason. Cc: Kangjie Lu Cc: David S. Miller Link: https://lore.kernel.org/r/20210503115736.2104747-65-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit dacb408ca6f0e34df22b40d8dd5fae7f8e777d84 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:30 2021 +0200 media: gspca: properly check for errors in po1030_probe() If m5602_write_sensor() or m5602_write_bridge() fail, do not continue to initialize the device but return the error to the calling funtion. Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210503115736.2104747-64-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8e23e83c752b54e98102627a1cc09281ad71a299 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:29 2021 +0200 Revert "media: gspca: Check the return value of write_bridge for timeout" This reverts commit a21a0eb56b4e8fe4a330243af8030f890cde2283. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. Different error values should never be "OR" together and expect anything sane to come out of the result. Cc: Aditya Pakki Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210503115736.2104747-63-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e932f5b458eee63d013578ea128b9ff8ef5f5496 Author: Alaa Emad Date: Mon May 3 13:57:28 2021 +0200 media: gspca: mt9m111: Check write_bridge for timeout If m5602_write_bridge times out, it will return a negative error value. So properly check for this and handle the error correctly instead of just ignoring it. Cc: Mauro Carvalho Chehab Signed-off-by: Alaa Emad Link: https://lore.kernel.org/r/20210503115736.2104747-62-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit af44068c581c028fd9897ca75a10fa310d8fc449 Author: Mark Brown Date: Thu May 13 16:18:19 2021 +0100 arm64: tools: Add __ASM_CPUCAPS_H to the endif in cpucaps.h Anshuman suggested this. Suggested-by: Anshuman Khandual Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210513151819.12526-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit d8c3be2fb2079d0cb4cd29d6aba58dbe54771e42 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:27 2021 +0200 Revert "media: gspca: mt9m111: Check write_bridge for timeout" This reverts commit 656025850074f5c1ba2e05be37bda57ba2b8d491. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. Different error values should never be "OR" together and expect anything sane to come out of the result. Cc: Aditya Pakki Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210503115736.2104747-61-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c6d822c56e7fd29e6fa1b1bb91b98f6a1e942b3c Author: Alaa Emad Date: Mon May 3 13:57:26 2021 +0200 media: dvb: Add check on sp8870_readreg return The function sp8870_readreg returns a negative value when i2c_transfer fails so properly check for this and return the error if it happens. Cc: Sean Young Cc: Mauro Carvalho Chehab Signed-off-by: Alaa Emad Link: https://lore.kernel.org/r/20210503115736.2104747-60-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 47e4ff06fa7f5ba4860543a2913bbd0c164640aa Author: Greg Kroah-Hartman Date: Mon May 3 13:57:25 2021 +0200 Revert "media: dvb: Add check on sp8870_readreg" This reverts commit 467a37fba93f2b4fe3ab597ff6a517b22b566882. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. This commit is not properly checking for an error at all, so if a read succeeds from this device, it will error out. Cc: Aditya Pakki Cc: Sean Young Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210503115736.2104747-59-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2da441a6491d93eff8ffff523837fd621dc80389 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:24 2021 +0200 ASoC: cs43130: handle errors in cs43130_probe() properly cs43130_probe() does not do any valid error checking of things it initializes, OR what it does, it does not unwind properly if there are errors. Fix this up by moving the sysfs files to an attribute group so the driver core will correctly add/remove them all at once and handle errors with them, and correctly check for creating a new workqueue and unwinding if that fails. Cc: Mark Brown Link: https://lore.kernel.org/r/20210503115736.2104747-58-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fdda0dd2686ecd1f2e616c9e0366ea71b40c485d Author: Greg Kroah-Hartman Date: Mon May 3 13:57:23 2021 +0200 Revert "ASoC: cs43130: fix a NULL pointer dereference" This reverts commit a2be42f18d409213bb7e7a736e3ef6ba005115bb. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original patch here is not correct, sysfs files that were created are not unwound. Cc: Kangjie Lu Cc: Mark Brown Link: https://lore.kernel.org/r/20210503115736.2104747-57-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5e70b8e22b64eed13d5bbebcb5911dae65bf8c6b Author: Phillip Potter Date: Mon May 3 13:57:22 2021 +0200 ASoC: rt5645: add error checking to rt5645_probe function Check for return value from various snd_soc_dapm_* calls, as many of them can return errors and this should be handled. Also, reintroduce the allocation failure check for rt5645->eq_param as well. Make all areas where return values are checked lead to the end of the function in the case of an error. Finally, introduce a comment explaining how resources here are actually eventually cleaned up by the caller. Cc: Mark Brown Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210503115736.2104747-56-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 1e0ce84215dbfd6065872e5d3755352da34f198b Author: Greg Kroah-Hartman Date: Mon May 3 13:57:21 2021 +0200 Revert "ASoC: rt5645: fix a NULL pointer dereference" This reverts commit 51dd97d1df5fb9ac58b9b358e63e67b530f6ae21. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. Lots of things seem to be still allocated here and must be properly cleaned up if an error happens here. Cc: Kangjie Lu Cc: Mark Brown Link: https://lore.kernel.org/r/20210503115736.2104747-55-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7e79b38fe9a403b065ac5915465f620a8fb3de84 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:20 2021 +0200 libertas: register sysfs groups properly The libertas driver was trying to register sysfs groups "by hand" which causes them to be created _after_ the device is initialized and announced to userspace, which causes races and can prevent userspace tools from seeing the sysfs files correctly. Fix this up by using the built-in sysfs_groups pointers in struct net_device which were created for this very reason, fixing the race condition, and properly allowing for any error that might have occured to be handled properly. Cc: Kalle Valo Link: https://lore.kernel.org/r/20210503115736.2104747-54-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 46651077765c80a0d6f87f3469129a72e49ce91b Author: Greg Kroah-Hartman Date: Mon May 3 13:57:19 2021 +0200 Revert "libertas: add checks for the return value of sysfs_create_group" This reverts commit 434256833d8eb988cb7f3b8a41699e2fe48d9332. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit was incorrect, the error needs to be propagated back to the caller AND if the second group call fails, the first needs to be removed. There are much better ways to solve this, the driver should NOT be calling sysfs_create_group() on its own as it is racing userspace and loosing. Cc: Kangjie Lu Cc: Kalle Valo Link: https://lore.kernel.org/r/20210503115736.2104747-53-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4df2a8b0ad634d98a67e540a4e18a60f943e7d9f Author: Phillip Potter Date: Mon May 3 13:57:18 2021 +0200 dmaengine: qcom_hidma: comment platform_driver_register call Place a comment in hidma_mgmt_init explaining why success must currently be assumed, due to the cleanup issue that would need to be considered were this module ever to be unloadable or were this platform_driver_register call ever to fail. Acked-By: Vinod Koul Acked-By: Sinan Kaya Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210503115736.2104747-52-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 43ed0fcf613a87dd0221ec72d1ade4d6544f2ffc Author: Greg Kroah-Hartman Date: Mon May 3 13:57:17 2021 +0200 Revert "dmaengine: qcom_hidma: Check for driver register failure" This reverts commit a474b3f0428d6b02a538aa10b3c3b722751cb382. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original change is NOT correct, as it does not correctly unwind from the resources that was allocated before the call to platform_driver_register(). Cc: Aditya Pakki Acked-By: Vinod Koul Acked-By: Sinan Kaya Link: https://lore.kernel.org/r/20210503115736.2104747-51-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c6052f09c14bf0ecdd582662e022eb716f9b8022 Author: Phillip Potter Date: Mon May 3 13:57:16 2021 +0200 fs: ecryptfs: remove BUG_ON from crypt_scatterlist crypt_stat memory itself is allocated when inode is created, in ecryptfs_alloc_inode, which returns NULL on failure and is handled by callers, which would prevent us getting to this point. It then calls ecryptfs_init_crypt_stat which allocates crypt_stat->tfm checking for and likewise handling allocation failure. Finally, crypt_stat->flags has ECRYPTFS_STRUCT_INITIALIZED merged into it in ecryptfs_init_crypt_stat as well. Simply put, the conditions that the BUG_ON checks for will never be triggered, as to even get to this function, the relevant conditions will have already been fulfilled (or the inode allocation would fail in the first place and thus no call to this function or those above it). Cc: Tyler Hicks Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210503115736.2104747-50-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e1436df2f2550bc89d832ffd456373fdf5d5b5d7 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:15 2021 +0200 Revert "ecryptfs: replace BUG_ON with error handling code" This reverts commit 2c2a7552dd6465e8fde6bc9cccf8d66ed1c1eb72. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit log for this change was incorrect, no "error handling code" was added, things will blow up just as badly as before if any of these cases ever were true. As this BUG_ON() never fired, and most of these checks are "obviously" never going to be true, let's just revert to the original code for now until this gets unwound to be done correctly in the future. Cc: Aditya Pakki Fixes: 2c2a7552dd64 ("ecryptfs: replace BUG_ON with error handling code") Cc: stable Acked-by: Tyler Hicks Link: https://lore.kernel.org/r/20210503115736.2104747-49-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5265db2ccc735e2783b790d6c19fb5cee8c025ed Author: Phillip Potter Date: Mon May 3 13:57:14 2021 +0200 isdn: mISDN: correctly handle ph_info allocation failure in hfcsusb_ph_info Modify return type of hfcusb_ph_info to int, so that we can pass error value up the call stack when allocation of ph_info fails. Also change three of four call sites to actually account for the memory failure. The fourth, in ph_state_nt, is infeasible to change as it is in turn called by ph_state which is used as a function pointer argument to mISDN_initdchannel, which would necessitate changing its signature and updating all the places where it is used (too many). Fixes original flawed commit (38d22659803a) from the University of Minnesota. Cc: David S. Miller Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210503115736.2104747-48-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 36a2c87f7ed9e305d05b9a5c044cc6c494771504 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:13 2021 +0200 Revert "isdn: mISDN: Fix potential NULL pointer dereference of kzalloc" This reverts commit 38d22659803a033b1b66cd2624c33570c0dde77d. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. While it looks like the original change is correct, it is not, as none of the setup actually happens, and the error value is not propagated upwards. Cc: Aditya Pakki Cc: David S. Miller Link: https://lore.kernel.org/r/20210503115736.2104747-47-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 69ce3ae36dcb03cdf416b0862a45369ddbf50fdf Author: Anirudh Rayabharam Date: Mon May 3 13:57:12 2021 +0200 rapidio: handle create_workqueue() failure In case create_workqueue() fails, release all resources and return -ENOMEM to caller to avoid potential NULL pointer deref later. Move up the create_workequeue() call to return early and avoid unwinding the call to riocm_rx_fill(). Cc: Alexandre Bounine Cc: Matt Porter Cc: Andrew Morton Cc: Linus Torvalds Cc: stable Signed-off-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/20210503115736.2104747-46-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5e68b86c7b7c059c0f0ec4bf8adabe63f84a61eb Author: Greg Kroah-Hartman Date: Mon May 3 13:57:11 2021 +0200 Revert "rapidio: fix a NULL pointer dereference when create_workqueue() fails" This reverts commit 23015b22e47c5409620b1726a677d69e5cd032ba. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit has a memory leak on the error path here, it does not clean up everything properly. Cc: Kangjie Lu Cc: Alexandre Bounine Cc: Matt Porter Cc: Andrew Morton Cc: Linus Torvalds Fixes: 23015b22e47c ("rapidio: fix a NULL pointer dereference when create_workqueue() fails") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-45-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 54433367840b46a1555c8ed36c4c0cfc5dbf1358 Author: Anirudh Rayabharam Date: Mon May 3 13:57:10 2021 +0200 ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd() Propagate error code from failure of ath6kl_wmi_cmd_send() to the caller. Signed-off-by: Anirudh Rayabharam Cc: Kalle Valo Link: https://lore.kernel.org/r/20210503115736.2104747-44-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit efba106f89fc6848726716c101f4c84e88720a9c Author: Greg Kroah-Hartman Date: Mon May 3 13:57:09 2021 +0200 Revert "ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()" This reverts commit fc6a6521556c8250e356ddc6a3f2391aa62dc976. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The change being reverted does NOTHING as the caller to this function does not even look at the return value of the call. So the "claim" that this fixed an an issue is not true. It will be fixed up properly in a future patch by propagating the error up the stack correctly. Cc: Kangjie Lu Cc: Kalle Valo Link: https://lore.kernel.org/r/20210503115736.2104747-43-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c446f0d4702d316e1c6bf621f70e79678d28830a Author: Phillip Potter Date: Mon May 3 13:57:08 2021 +0200 isdn: mISDNinfineon: check/cleanup ioremap failure correctly in setup_io Move hw->cfg.mode and hw->addr.mode assignments from hw->ci->cfg_mode and hw->ci->addr_mode respectively, to be before the subsequent checks for memory IO mode (and possible ioremap calls in this case). Also introduce ioremap error checks at both locations. This allows resources to be properly freed on ioremap failure, as when the caller of setup_io then subsequently calls release_io via its error path, release_io can now correctly determine the mode as it has been set before the ioremap call. Finally, refactor release_io function so that it will call release_mem_region in the memory IO case, regardless of whether or not hw->cfg.p/hw->addr.p are NULL. This means resources are then properly released on failure. This properly implements the original reverted commit (d721fe99f6ad) from the University of Minnesota, whilst also implementing the ioremap check for the hw->ci->cfg_mode if block as well. Cc: David S. Miller Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210503115736.2104747-42-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 04f5b9f539ce314f758d919a14dc7a669f3b7838 Author: Lucas Stankus Date: Tue May 11 17:54:18 2021 -0300 staging: iio: cdc: ad7746: avoid overwrite of num_channels AD7745 devices don't have the CIN2 pins and therefore can't handle related channels. Forcing the number of AD7746 channels may lead to enabling more channels than what the hardware actually supports. Avoid num_channels being overwritten after first assignment. Signed-off-by: Lucas Stankus Fixes: 83e416f458d53 ("staging: iio: adc: Replace, rewrite ad7745 from scratch.") Signed-off-by: Jonathan Cameron Cc: commit b0f27fca5a6c7652e265aae6a4452ce2f2ed64da Author: Alexandru Ardelean Date: Thu May 13 15:07:44 2021 +0300 iio: adc: ad7192: handle regulator voltage error first This change fixes a corner-case, where for a zero regulator value, the driver would exit early, initializing the driver only partially. The driver would be in an unknown state. This change reworks the code to check regulator_voltage() return value for negative (error) first, and return early. This is the more common idiom. Also, this change is removing the 'voltage_uv' variable and using the 'ret' value directly. The only place where 'voltage_uv' is being used is to compute the internal reference voltage, and the type of this variable is 'int' (same are for 'ret'). Using only 'ret' avoids having to assign it on the error path. Fixes: ab0afa65bbc7 ("staging: iio: adc: ad7192: fail probe on get_voltage") Cc: Alexandru Tachici Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Cc: commit e32fe6d90f44922ccbb94016cfc3c238359e3e39 Author: Jonathan Cameron Date: Thu May 13 15:07:43 2021 +0300 iio: adc: ad7192: Avoid disabling a clock that was never enabled. Found by inspection. If the internal clock source is being used, the driver doesn't call clk_prepare_enable() and as such we should not call clk_disable_unprepare() Use the same condition to protect the disable path as is used on the enable one. Note this will all get simplified when the driver moves over to a full devm_ flow, but that would make backporting the fix harder. Fix obviously predates move out of staging, but backporting will become more complex (and is unlikely to happen), hence that patch is given in the fixes tag. Alexandru's sign off is here because he added this patch into a larger series that Jonathan then applied. Fixes: b581f748cce0 ("staging: iio: adc: ad7192: move out of staging") Cc: Alexandru Tachici Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Signed-off-by: Alexandru Ardelean Cc: commit abd7bca23bd4247124265152d00ffd4b2b0d6877 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:07 2021 +0200 Revert "isdn: mISDNinfineon: fix potential NULL pointer dereference" This reverts commit d721fe99f6ada070ae8fc0ec3e01ce5a42def0d9. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit was incorrect, it should have never have used "unlikely()" and if it ever does trigger, resources are left grabbed. Given there are no users for this code around, I'll just revert this and leave it "as is" as the odds that ioremap() will ever fail here is horrendiously low. Cc: Kangjie Lu Cc: David S. Miller Link: https://lore.kernel.org/r/20210503115736.2104747-41-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit dc13cac4862cc68ec74348a80b6942532b7735fa Author: Igor Matheus Andrade Torrente Date: Mon May 3 13:57:06 2021 +0200 video: hgafb: fix potential NULL pointer dereference The return of ioremap if not checked, and can lead to a NULL to be assigned to hga_vram. Potentially leading to a NULL pointer dereference. The fix adds code to deal with this case in the error label and changes how the hgafb_probe handles the return of hga_card_detect. Cc: Ferenc Bakonyi Cc: Bartlomiej Zolnierkiewicz Cc: stable Signed-off-by: Igor Matheus Andrade Torrente Link: https://lore.kernel.org/r/20210503115736.2104747-40-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 58c0cc2d90f1e37c4eb63ae7f164c83830833f78 Author: Greg Kroah-Hartman Date: Mon May 3 13:57:05 2021 +0200 Revert "video: hgafb: fix potential NULL pointer dereference" This reverts commit ec7f6aad57ad29e4e66cc2e18e1e1599ddb02542. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. This patch "looks" correct, but the driver keeps on running and will fail horribly right afterward if this error condition ever trips. So points for trying to resolve an issue, but a huge NEGATIVE value for providing a "fake" fix for the problem as nothing actually got resolved at all. I'll go fix this up properly... Cc: Kangjie Lu Cc: Aditya Pakki Cc: Ferenc Bakonyi Cc: Bartlomiej Zolnierkiewicz Fixes: ec7f6aad57ad ("video: hgafb: fix potential NULL pointer dereference") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-39-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4667a6fc1777ce071504bab570d3599107f4790f Author: Greg Kroah-Hartman Date: Mon May 3 13:57:03 2021 +0200 Revert "ALSA: usx2y: Fix potential NULL pointer dereference" This reverts commit a2c6433ee5a35a8de6d563f6512a26f87835ea0f. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original patch was incorrect, and would leak memory if the error path the patch added was hit. Cc: Aditya Pakki Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20210503115736.2104747-37-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit a28591f61b60fac820c6de59826ffa710e5e314e Author: Atul Gopinathan Date: Mon May 3 13:57:02 2021 +0200 ALSA: sb8: Add a comment note regarding an unused pointer The field "fm_res" of "struct snd_sb8" is never used/dereferenced throughout the sb8.c code. Therefore there is no need for any null value check after the "request_region()". Add a comment note to make developers know about this and prevent any "NULL check" patches on this part of code. Cc: Takashi Iwai Signed-off-by: Atul Gopinathan Link: https://lore.kernel.org/r/20210503115736.2104747-36-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 94f88309f201821073f57ae6005caefa61bf7b7e Author: Greg Kroah-Hartman Date: Mon May 3 13:57:01 2021 +0200 Revert "ALSA: sb8: add a check for request_region" This reverts commit dcd0feac9bab901d5739de51b3f69840851f8919. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit message for this change was incorrect as the code path can never result in a NULL dereference, alluding to the fact that whatever tool was used to "find this" is broken. It's just an optional resource reservation, so removing this check is fine. Cc: Kangjie Lu Acked-by: Takashi Iwai Fixes: dcd0feac9bab ("ALSA: sb8: add a check for request_region") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-35-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 1dacca7fa1ebea47d38d20cd2df37094805d2649 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:59 2021 +0200 Revert "ALSA: gus: add a check of the status of snd_ctl_add" This reverts commit 0f25e000cb4398081748e54f62a902098aa79ec1. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit did nothing if there was an error, except to print out a message, which is pointless. So remove the commit as it gives a "false sense of doing something". Cc: Kangjie Lu Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20210503115736.2104747-33-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2f4a784f40f8d337d6590e2e93f46429052e15ac Author: Phillip Potter Date: Mon May 3 13:56:58 2021 +0200 scsi: ufs: handle cleanup correctly on devm_reset_control_get error Move ufshcd_set_variant call in ufs_hisi_init_common to common error section at end of the function, and then jump to this from the error checking statements for both devm_reset_control_get and ufs_hisi_get_resource. This fixes the original commit (63a06181d7ce) which was reverted due to the University of Minnesota problems. Suggested-by: Greg Kroah-Hartman Cc: Avri Altman Cc: Martin K. Petersen Cc: stable Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210503115736.2104747-32-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4d427b408c4c2ff1676966c72119a3a559f8e39b Author: Greg Kroah-Hartman Date: Mon May 3 13:56:57 2021 +0200 Revert "scsi: ufs: fix a missing check of devm_reset_control_get" This reverts commit 63a06181d7ce169d09843645c50fea1901bc9f0a. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit is incorrect, it does not properly clean up on the error path, so I'll keep the revert and fix it up properly with a follow-on patch. Cc: Kangjie Lu Cc: Avri Altman Cc: Martin K. Petersen Fixes: 63a06181d7ce ("scsi: ufs: fix a missing check of devm_reset_control_get") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-31-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b11701c933112d49b808dee01cb7ff854ba6a77a Author: Tom Seewald Date: Mon May 3 13:56:56 2021 +0200 char: hpet: add checks after calling ioremap The function hpet_resources() calls ioremap() two times, but in both cases it does not check if ioremap() returned a null pointer. Fix this by adding null pointer checks and returning an appropriate error. Signed-off-by: Tom Seewald Link: https://lore.kernel.org/r/20210503115736.2104747-30-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 566f53238da74801b48e985788e5f7c9159e5940 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:55 2021 +0200 Revert "char: hpet: fix a missing check of ioremap" This reverts commit 13bd14a41ce3105d5b1f3cd8b4d1e249d17b6d9b. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. While this is technically correct, it is only fixing ONE of these errors in this function, so the patch is not fully correct. I'll leave this revert and provide a fix for this later that resolves this same "problem" everywhere in this function. Cc: Kangjie Lu Link: https://lore.kernel.org/r/20210503115736.2104747-29-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit d03d1021da6fe7f46efe9f2a7335564e7c9db5ab Author: Atul Gopinathan Date: Mon May 3 13:56:54 2021 +0200 cdrom: gdrom: deallocate struct gdrom_unit fields in remove_gdrom The fields, "toc" and "cd_info", of "struct gdrom_unit gd" are allocated in "probe_gdrom()". Prevent a memory leak by making sure "gd.cd_info" is deallocated in the "remove_gdrom()" function. Also prevent double free of the field "gd.toc" by moving it from the module's exit function to "remove_gdrom()". This is because, in "probe_gdrom()", the function makes sure to deallocate "gd.toc" in case of any errors, so the exit function invoked later would again free "gd.toc". The patch also maintains consistency by deallocating the above mentioned fields in "remove_gdrom()" along with another memory allocated field "gd.disk". Suggested-by: Jens Axboe Cc: Peter Rosin Cc: stable Signed-off-by: Atul Gopinathan Link: https://lore.kernel.org/r/20210503115736.2104747-28-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 257343d3ed557f11d580d0b7c515dc154f64a42b Author: Greg Kroah-Hartman Date: Mon May 3 13:56:53 2021 +0200 Revert "gdrom: fix a memory leak bug" This reverts commit 093c48213ee37c3c3ff1cf5ac1aa2a9d8bc66017. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. Because of this, all submissions from this group must be reverted from the kernel tree and will need to be re-reviewed again to determine if they actually are a valid fix. Until that work is complete, remove this change to ensure that no problems are being introduced into the codebase. Cc: Wenwen Wang Cc: Peter Rosin Cc: Jens Axboe Fixes: 093c48213ee3 ("gdrom: fix a memory leak bug") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-27-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 84460f01cba382553199bc1361f69a872d5abed4 Author: Tom Seewald Date: Mon May 3 13:56:52 2021 +0200 qlcnic: Add null check after calling netdev_alloc_skb The function qlcnic_dl_lb_test() currently calls netdev_alloc_skb() without checking afterwards that the allocation succeeded. Fix this by checking if the skb is NULL and returning an error in such a case. Breaking out of the loop if the skb is NULL is not correct as no error would be reported to the caller and no message would be printed for the user. Cc: David S. Miller Cc: stable Signed-off-by: Tom Seewald Link: https://lore.kernel.org/r/20210503115736.2104747-26-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b95b57dfe7a142bf2446548eb7f49340fd73e78b Author: Greg Kroah-Hartman Date: Mon May 3 13:56:51 2021 +0200 Revert "qlcnic: Avoid potential NULL pointer dereference" This reverts commit 5bf7295fe34a5251b1d241b9736af4697b590670. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. This commit does not properly detect if an error happens because the logic after this loop will not detect that there was a failed allocation. Cc: Aditya Pakki Cc: David S. Miller Fixes: 5bf7295fe34a ("qlcnic: Avoid potential NULL pointer dereference") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-25-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit e6e337708c22f80824b82d4af645f20715730ad0 Author: Du Cheng Date: Mon May 3 13:56:50 2021 +0200 ethernet: sun: niu: fix missing checks of niu_pci_eeprom_read() niu_pci_eeprom_read() may fail, so add checks to its return value and propagate the error up the callstack. An examination of the callstack up to niu_pci_eeprom_read shows that: niu_pci_eeprom_read() // returns int niu_pci_vpd_scan_props() // returns int niu_pci_vpd_fetch() // returns *void* niu_get_invariants() // returns int since niu_pci_vpd_fetch() returns void which breaks the bubbling up, change its return type to int so that error is propagated upwards. Signed-off-by: Du Cheng Cc: Shannon Nelson Cc: David S. Miller Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-24-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7930742d6a0ff091c85b92ef4e076432d8d8cb79 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:49 2021 +0200 Revert "niu: fix missing checks of niu_pci_eeprom_read" This reverts commit 26fd962bde0b15e54234fe762d86bc0349df1de4. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The change here was incorrect. While it is nice to check if niu_pci_eeprom_read() succeeded or not when using the data, any error that might have happened was not propagated upwards properly, causing the kernel to assume that these reads were successful, which results in invalid data in the buffer that was to contain the successfully read data. Cc: Kangjie Lu Cc: Shannon Nelson Cc: David S. Miller Fixes: 26fd962bde0b ("niu: fix missing checks of niu_pci_eeprom_read") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-23-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 0c32a96d000f260b5ebfabb4145a86ae1cd71847 Author: Anirudh Rayabharam Date: Mon May 3 13:56:48 2021 +0200 net: stmicro: handle clk_prepare() failure during init In case clk_prepare() fails, capture and propagate the error code up the stack. If regulator_enable() was called earlier, properly unwind it by calling regulator_disable(). Signed-off-by: Anirudh Rayabharam Cc: David S. Miller Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-22-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit f2a772c51206b0c3f262e4f6a3812c89a650191b Author: Jonathan Cameron Date: Thu May 13 15:07:42 2021 +0300 iio: adc: ad7124: Fix potential overflow due to non sequential channel numbers Channel numbering must start at 0 and then not have any holes, or it is possible to overflow the available storage. Note this bug was introduced as part of a fix to ensure we didn't rely on the ordering of child nodes. So we need to support arbitrary ordering but they all need to be there somewhere. Note I hit this when using qemu to test the rest of this series. Arguably this isn't the best fix, but it is probably the most minimal option for backporting etc. Alexandru's sign-off is here because he carried this patch in a larger set that Jonathan then applied. Fixes: d7857e4ee1ba6 ("iio: adc: ad7124: Fix DT channel configuration") Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Signed-off-by: Alexandru Ardelean Cc: commit 4573472315f0fa461330545ff2aa2f6da0b1ae76 Author: Jonathan Cameron Date: Thu May 13 15:07:41 2021 +0300 iio: adc: ad7124: Fix missbalanced regulator enable / disable on error. If the devm_regulator_get() call succeeded but not the regulator_enable() then regulator_disable() would be called on a regulator that was not enabled. Fix this by moving regulator enabling / disabling over to devm_ management via devm_add_action_or_reset. Alexandru's sign-off here because he pulled Jonathan's patch into a larger set which Jonathan then applied. Fixes: b3af341bbd96 ("iio: adc: Add ad7124 support") Reviewed-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron Signed-off-by: Alexandru Ardelean Cc: commit bee1b0511844c8c79fccf1f2b13472393b6b91f7 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:47 2021 +0200 Revert "net: stmicro: fix a missing check of clk_prepare" This reverts commit f86a3b83833e7cfe558ca4d70b64ebc48903efec. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit causes a memory leak when it is trying to claim it is properly handling errors. Revert this change and fix it up properly in a follow-on commit. Cc: Kangjie Lu Cc: David S. Miller Fixes: f86a3b83833e ("net: stmicro: fix a missing check of clk_prepare") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-21-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 65a67792e3416f7c5d7daa47d99334cbb19a7449 Author: Du Cheng Date: Mon May 3 13:56:46 2021 +0200 net: caif: remove BUG_ON(dev == NULL) in caif_xmit The condition of dev == NULL is impossible in caif_xmit(), hence it is for the removal. Explanation: The static caif_xmit() is only called upon via a function pointer `ndo_start_xmit` defined in include/linux/netdevice.h: ``` struct net_device_ops { ... netdev_tx_t (*ndo_start_xmit)(struct sk_buff *skb, struct net_device *dev); ... } ``` The exhausive list of call points are: ``` drivers/net/ethernet/qualcomm/rmnet/rmnet_map_command.c dev->netdev_ops->ndo_start_xmit(skb, dev); ^ ^ drivers/infiniband/ulp/opa_vnic/opa_vnic_netdev.c struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); ^ ^ return adapter->rn_ops->ndo_start_xmit(skb, netdev); // adapter would crash first ^ ^ drivers/usb/gadget/function/f_ncm.c ncm->netdev->netdev_ops->ndo_start_xmit(NULL, ncm->netdev); ^ ^ include/linux/netdevice.h static inline netdev_tx_t __netdev_start_xmit(... { return ops->ndo_start_xmit(skb, dev); ^ } const struct net_device_ops *ops = dev->netdev_ops; ^ rc = __netdev_start_xmit(ops, skb, dev, more); ^ ``` In each of the enumerated scenarios, it is impossible for the NULL-valued dev to reach the caif_xmit() without crashing the kernel earlier, therefore `BUG_ON(dev == NULL)` is rather useless, hence the removal. Cc: David S. Miller Signed-off-by: Du Cheng Link: https://lore.kernel.org/r/20210503115736.2104747-20-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4df07045fcfd684379a394d0f2aa0cc4067bda2a Author: Greg Kroah-Hartman Date: Mon May 3 13:56:45 2021 +0200 Revert "net: caif: replace BUG_ON with recovery code" This reverts commit c5dea815834c7d2e9fc633785455bc428b7a1956. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original change here was pointless as dev can never be NULL in this function so the claim in the changelog that this "fixes" anything is incorrect (also the developer forgot about panic_on_warn). A follow-up change will resolve this issue properly. Cc: Aditya Pakki Cc: David S. Miller Link: https://lore.kernel.org/r/20210503115736.2104747-19-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit bbeb18f27a44ce6adb00d2316968bc59dc640b9b Author: Anirudh Rayabharam Date: Mon May 3 13:56:44 2021 +0200 net/smc: properly handle workqueue allocation failure In smcd_alloc_dev(), if alloc_ordered_workqueue() fails, properly catch it, clean up and return NULL to let the caller know there was a failure. Move the call to alloc_ordered_workqueue higher in the function in order to abort earlier without needing to unwind the call to device_initialize(). Cc: Ursula Braun Cc: David S. Miller Signed-off-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/20210503115736.2104747-18-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5369ead83f5aff223b6418c99cb1fe9a8f007363 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:43 2021 +0200 Revert "net/smc: fix a NULL pointer dereference" This reverts commit e183d4e414b64711baf7a04e214b61969ca08dfa. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit causes a memory leak and does not properly fix the issue it claims to fix. I will send a follow-on patch to resolve this properly. Cc: Kangjie Lu Cc: Ursula Braun Cc: David S. Miller Link: https://lore.kernel.org/r/20210503115736.2104747-17-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 52202be1cd996cde6e8969a128dc27ee45a7cb5e Author: Anirudh Rayabharam Date: Mon May 3 13:56:42 2021 +0200 net: fujitsu: fix potential null-ptr-deref In fmvj18x_get_hwinfo(), if ioremap fails there will be NULL pointer deref. To fix this, check the return value of ioremap and return -1 to the caller in case of failure. Cc: "David S. Miller" Acked-by: Dominik Brodowski Signed-off-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/20210503115736.2104747-16-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5f94eaa4ee23e80841fa359a372f84cfe25daee1 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:41 2021 +0200 Revert "net: fujitsu: fix a potential NULL pointer dereference" This reverts commit 9f4d6358e11bbc7b839f9419636188e4151fb6e4. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original change does not change any behavior as the caller of this function onlyu checks for "== -1" as an error condition so this error is not handled properly. Remove this change and it will be fixed up properly in a later commit. Cc: Kangjie Lu Cc: David S. Miller Reviewed-by: Dominik Brodowski Link: https://lore.kernel.org/r/20210503115736.2104747-15-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 30b0e0ee9d02b97b68705c46b41444786effc40c Author: Greg Kroah-Hartman Date: Mon May 3 13:56:40 2021 +0200 net: rtlwifi: properly check for alloc_workqueue() failure If alloc_workqueue() fails, properly catch this and propagate the error to the calling functions, so that the devuce initialization will properly error out. Cc: Kalle Valo Cc: Bryan Brattlof Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-14-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 68c5634c4a7278672a3bed00eb5646884257c413 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:39 2021 +0200 Revert "rtlwifi: fix a potential NULL pointer dereference" This reverts commit 765976285a8c8db3f0eb7f033829a899d0c2786e. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. This commit is not correct, it should not have used unlikely() and is not propagating the error properly to the calling function, so it should be reverted at this point in time. Also, if the check failed, the work queue was still assumed to be allocated, so further accesses would have continued to fail, meaning this patch does nothing to solve the root issues at all. Cc: Kangjie Lu Cc: Kalle Valo Cc: Bryan Brattlof Fixes: 765976285a8c ("rtlwifi: fix a potential NULL pointer dereference") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-13-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3890e3dea315f1a257d1b940a2a4e2fa16a7b095 Author: Atul Gopinathan Date: Mon May 3 13:56:38 2021 +0200 serial: max310x: unregister uart driver in case of failure and abort The macro "spi_register_driver" invokes the function "__spi_register_driver()" which has a return type of int and can fail, returning a negative value in such a case. This is currently ignored and the init() function yields success even if the spi driver failed to register. Fix this by collecting the return value of "__spi_register_driver()" and also unregister the uart driver in case of failure. Cc: Jiri Slaby Signed-off-by: Atul Gopinathan Link: https://lore.kernel.org/r/20210503115736.2104747-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b0a85abbe92e1a6f3e8580a4590fa7245de7090b Author: Greg Kroah-Hartman Date: Mon May 3 13:56:37 2021 +0200 Revert "serial: max310x: pass return value of spi_register_driver" This reverts commit 51f689cc11333944c7a457f25ec75fcb41e99410. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. This change did not properly unwind from the error condition, so it was not correct. Cc: Kangjie Lu Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20210503115736.2104747-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6647f7a06eb030a2384ec71f0bb2e78854afabfe Author: Phillip Potter Date: Mon May 3 13:56:36 2021 +0200 leds: lp5523: check return value of lp5xx_read and jump to cleanup code Check return value of lp5xx_read and if non-zero, jump to code at end of the function, causing lp5523_stop_all_engines to be executed before returning the error value up the call chain. This fixes the original commit (248b57015f35) which was reverted due to the University of Minnesota problems. Cc: stable Acked-by: Jacek Anaszewski Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210503115736.2104747-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 8d1beda5f11953ffe135a5213287f0b25b4da41b Author: Greg Kroah-Hartman Date: Mon May 3 13:56:35 2021 +0200 Revert "leds: lp5523: fix a missing check of return value of lp55xx_read" This reverts commit 248b57015f35c94d4eae2fdd8c6febf5cd703900. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit does not properly unwind if there is an error condition so it needs to be reverted at this point in time. Cc: Kangjie Lu Cc: Jacek Anaszewski Cc: stable Fixes: 248b57015f35 ("leds: lp5523: fix a missing check of return value of lp55xx_read") Link: https://lore.kernel.org/r/20210503115736.2104747-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4b059ce1f4b368208c2310925f49be77f15e527b Author: Greg Kroah-Hartman Date: Mon May 3 13:56:34 2021 +0200 Revert "ALSA: sb: fix a missing check of snd_ctl_add" This reverts commit beae77170c60aa786f3e4599c18ead2854d8694d. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It is safe to ignore this error as the mixer element is optional, and the driver is very legacy. Cc: Aditya Pakki Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20210503115736.2104747-8-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fd013265e5b5576a74a033920d6c571e08d7c423 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:33 2021 +0200 Revert "media: usb: gspca: add a missed check for goto_low_power" This reverts commit 5b711870bec4dc9a6d705d41e127e73944fa3650. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to do does nothing useful as a user can do nothing with this information and if an error did happen, the code would continue on as before. Because of this, just revert it. Cc: Kangjie Lu Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210503115736.2104747-7-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 754f39158441f4c0d7a8255209dd9a939f08ce80 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:32 2021 +0200 Revert "serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference" This reverts commit 32f47179833b63de72427131169809065db6745e. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be not be needed at all as the change was useless because this function can only be called when of_match_device matched on something. So it should be reverted. Cc: Aditya Pakki Cc: stable Fixes: 32f47179833b ("serial: mvebu-uart: Fix to avoid a potential NULL pointer dereference") Acked-by: Jiri Slaby Link: https://lore.kernel.org/r/20210503115736.2104747-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 99ae3417672a6d4a3bf68d4fc43d7c6ca074d477 Author: Greg Kroah-Hartman Date: Mon May 3 13:56:31 2021 +0200 Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" This reverts commit 9aa3aa15f4c2f74f47afd6c5db4b420fadf3f315. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, it was determined that this commit is not needed at all so just revert it. Also, the call to lm80_init_client() was not properly handled, so if error handling is needed in the lm80_probe() function, then it should be done properly, not half-baked like the commit being reverted here did. Cc: Kangjie Lu Fixes: 9aa3aa15f4c2 ("hwmon: (lm80) fix a missing check of bus read in lm80 probe") Cc: stable Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20210503115736.2104747-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 3e465fc3846734e9489273d889f19cc17b4cf4bd Author: Greg Kroah-Hartman Date: Mon May 3 13:56:30 2021 +0200 Revert "media: rcar_drif: fix a memory disclosure" This reverts commit d39083234c60519724c6ed59509a2129fd2aed41. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, it was determined that this commit is not needed at all as the media core already prevents memory disclosure on this codepath, so just drop the extra memset happening here. Cc: Kangjie Lu Cc: Geert Uytterhoeven Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Fixes: d39083234c60 ("media: rcar_drif: fix a memory disclosure") Cc: stable Reviewed-by: Mauro Carvalho Chehab Reviewed-by: Fabrizio Castro Link: https://lore.kernel.org/r/20210503115736.2104747-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6a3239a738d86c5e9b5aad17fefe2c2bfd6ced83 Author: Greg Kroah-Hartman Date: Wed Apr 28 09:49:31 2021 +0200 Revert "crypto: cavium/nitrox - add an error message to explain the failure of pci_request_mem_regions" This reverts commit 9fcddaf2e28d779cb946d23838ba6d50f299aa80 as it was submitted under a fake name and we can not knowingly accept anonymous contributions to the repository. This commit was part of a submission "test" to the Linux kernel community by some "researchers" at umn.edu. As outlined at: https://www-users.cs.umn.edu/%7Ekjlu/papers/full-disclosure.pdf it was done so as an attempt to submit a known-buggy patch to see if it could get by our review. However, the submission turned out to actually be correct, and not have a bug in it as the author did not understand how the PCI driver model works at all, and so the submission was accepted. As this change is of useless consequence, there is no loss of functionality in reverting it. Cc: "David S. Miller" Cc: Christophe JAILLET Cc: linux-crypto@vger.kernel.org Acked-by: Herbert Xu Signed-off-by: Greg Kroah-Hartman Email: Herbert Xu Link: https://lore.kernel.org/r/YIkTi9a3nnL50wMq@kroah.com Signed-off-by: Greg Kroah-Hartman commit a73b6a3b4109ce2ed01dbc51a6c1551a6431b53c Author: Darrick J. Wong Date: Wed Apr 28 15:25:34 2021 -0700 ics932s401: fix broken handling of errors when word reading fails In commit b05ae01fdb89, someone tried to make the driver handle i2c read errors by simply zeroing out the register contents, but for some reason left unaltered the code that sets the cached register value the function call return value. The original patch was authored by a member of the Underhanded Mangle-happy Nerds, I'm not terribly surprised. I don't have the hardware anymore so I can't test this, but it seems like a pretty obvious API usage fix to me... Fixes: b05ae01fdb89 ("misc/ics932s401: Add a missing check to i2c_smbus_read_word_data") Signed-off-by: Darrick J. Wong Link: https://lore.kernel.org/r/20210428222534.GJ3122264@magnolia Cc: stable Signed-off-by: Greg Kroah-Hartman commit 3c35d2a960c0077a4cb09bf4989f45d289332ea0 Author: Maximilian Luz Date: Wed May 12 23:04:13 2021 +0200 serial: 8250_dw: Add device HID for new AMD UART controller Add device HID AMDI0022 to the AMD UART controller driver match table and create a platform device for it. This controller can be found on Microsoft Surface Laptop 4 devices and seems similar enough that we can just copy the existing AMDI0020 entries. Cc: # 5.10+ Tested-by: Sachi King Acked-by: Andy Shevchenko # for 8250_dw part Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210512210413.1982933-1-luzmaximilian@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2ea2e019c190ee3973ef7bcaf829d8762e56e635 Author: Geert Uytterhoeven Date: Mon May 10 14:07:55 2021 +0200 serial: sh-sci: Fix off-by-one error in FIFO threshold register setting The Receive FIFO Data Count Trigger field (RTRG[6:0]) in the Receive FIFO Data Count Trigger Register (HSRTRGR) of HSCIF can only hold values ranging from 0-127. As the FIFO size is equal to 128 on HSCIF, the user can write an out-of-range value, touching reserved bits. Fix this by limiting the trigger value to the FIFO size minus one. Reverse the order of the checks, to avoid rx_trig becoming zero if the FIFO size is one. Note that this change has no impact on other SCIF variants, as their maximum supported trigger value is lower than the FIFO size anyway, and the code below takes care of enforcing these limits. Fixes: a380ed461f66d1b8 ("serial: sh-sci: implement FIFO threshold register setting") Reported-by: Linh Phung Reviewed-by: Wolfram Sang Reviewed-by: Ulrich Hecht Signed-off-by: Geert Uytterhoeven Cc: stable Link: https://lore.kernel.org/r/5eff320aef92ffb33d00e57979fd3603bbb4a70f.1620648218.git.geert+renesas@glider.be Signed-off-by: Greg Kroah-Hartman commit 5e722b217ad3cf41f5504db80a68062df82b5242 Author: Ondrej Mosnacek Date: Fri May 7 13:57:19 2021 +0200 serial: core: fix suspicious security_locked_down() call The commit that added this check did so in a very strange way - first security_locked_down() is called, its value stored into retval, and if it's nonzero, then an additional check is made for (change_irq || change_port), and if this is true, the function returns. However, if the goto exit branch is not taken, the code keeps the retval value and continues executing the function. Then, depending on whether uport->ops->verify_port is set, the retval value may or may not be reset to zero and eventually the error value from security_locked_down() may abort the function a few lines below. I will go out on a limb and assume that this isn't the intended behavior and that an error value from security_locked_down() was supposed to abort the function only in case (change_irq || change_port) is true. Note that security_locked_down() should be called last in any series of checks, since the SELinux implementation of this hook will do a check against the policy and generate an audit record in case of denial. If the operation was to carry on after calling security_locked_down(), then the SELinux denial record would be bogus. See commit 59438b46471a ("security,lockdown,selinux: implement SELinux lockdown") for how SELinux implements this hook. Fixes: 794edf30ee6c ("lockdown: Lock down TIOCSSERIAL") Acked-by: Kees Cook Signed-off-by: Ondrej Mosnacek Cc: stable Link: https://lore.kernel.org/r/20210507115719.140799-1-omosnace@redhat.com Signed-off-by: Greg Kroah-Hartman commit 3ddb4ce1e6e3bd112778ab93bbd9092f23a878ec Author: Colin Ian King Date: Mon Apr 26 11:55:14 2021 +0100 serial: tegra: Fix a mask operation that is always true Currently the expression lsr | UART_LSR_TEMT is always true and this seems suspect. I believe the intent was to mask lsr with UART_LSR_TEMT to check that bit, so the expression should be using the & operator instead. Fix this. Fixes: b9c2470fb150 ("serial: tegra: flush the RX fifo on frame error") Signed-off-by: Colin Ian King Cc: stable Link: https://lore.kernel.org/r/20210426105514.23268-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 5c1efb5f7682e2072ca5ce12cd616d432604ecc0 Author: Sathishkumar S Date: Mon May 3 23:57:31 2021 +0530 drm/amdgpu: update vcn1.0 Non-DPG suspend sequence update suspend register settings in Non-DPG mode. Signed-off-by: Sathishkumar S Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 3666f83a11293fd3cbeb3c9e0c3c53a33a48c28b Author: Sathishkumar S Date: Mon May 3 12:34:10 2021 +0530 drm/amdgpu: set vcn mgcg flag for picasso enable vcn mgcg flag for picasso. Signed-off-by: Sathishkumar S Reviewed-by: Leo Liu Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 227545b9a08c68778ddd89428f99c351fc9315ac Author: Kai-Heng Feng Date: Fri Apr 30 12:56:56 2021 +0800 drm/radeon/dpm: Disable sclk switching on Oland when two 4K 60Hz monitors are connected Screen flickers rapidly when two 4K 60Hz monitors are in use. This issue doesn't happen when one monitor is 4K 60Hz (pixelclock 594MHz) and another one is 4K 30Hz (pixelclock 297MHz). The issue is gone after setting "power_dpm_force_performance_level" to "high". Following the indication, we found that the issue occurs when sclk is too low. So resolve the issue by disabling sclk switching when there are two monitors requires high pixelclock (> 297MHz). v2: - Only apply the fix to Oland. Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 5c1a376823c408efd7de30fc300e687c78627f27 Author: Likun Gao Date: Fri May 7 13:56:46 2021 +0800 drm/amdgpu: update the method for harvest IP for specific SKU Update the method of disabling VCN IP for specific SKU for navi1x ASIC, it will judge whether should add the related IP at the function of amdgpu_device_ip_block_add(). Signed-off-by: Likun Gao Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 83a0b8639185f40ab7fc9dd291a057150eb9d238 Author: Likun GAO Date: Thu Apr 29 14:08:13 2021 +0800 drm/amdgpu: add judgement when add ip blocks (v2) Judgement whether to add an sw ip according to the harvest info. v2: fix indentation (Alex) Signed-off-by: Likun Gao Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit fe1c97d008f86f672f0e9265f180c22451ca3b9f Author: David Ward Date: Mon May 10 05:30:39 2021 -0400 drm/amd/display: Initialize attribute for hdcp_srm sysfs file It is stored in dynamically allocated memory, so sysfs_bin_attr_init() must be called to initialize it. (Note: "initialization" only sets the .attr.key member in this struct; it does not change the value of any other members.) Otherwise, when CONFIG_DEBUG_LOCK_ALLOC=y this message appears during boot: BUG: key ffff9248900cd148 has not been registered! Fixes: 9037246bb2da ("drm/amd/display: Add sysfs interface for set/get srm") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1586 Reported-by: Mikhail Gavrilov Signed-off-by: David Ward Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 939baec9e895e75149327c01b775f46c21e12be5 Author: Gustavo A. R. Silva Date: Mon May 10 15:46:18 2021 -0500 drm/amd/pm: Fix out-of-bounds bug Create new structure SISLANDS_SMC_SWSTATE_SINGLE, as initialState.levels and ACPIState.levels are never actually used as flexible arrays. Those arrays can be used as simple objects of type SISLANDS_SMC_HW_PERFORMANCE_LEVEL, instead. Currently, the code fails because flexible array _levels_ in struct SISLANDS_SMC_SWSTATE doesn't allow for code that accesses the first element of initialState.levels and ACPIState.levels arrays: drivers/gpu/drm/amd/pm/powerplay/si_dpm.c: 4820: table->initialState.levels[0].mclk.vDLL_CNTL = 4821: cpu_to_be32(si_pi->clock_registers.dll_cntl); ... 5021: table->ACPIState.levels[0].mclk.vDLL_CNTL = 5022: cpu_to_be32(dll_cntl); because such element cannot be accessed without previously allocating enough dynamic memory for it to exist (which never actually happens). So, there is an out-of-bounds bug in this case. That's why struct SISLANDS_SMC_SWSTATE should only be used as type for object driverState and new struct SISLANDS_SMC_SWSTATE_SINGLE is created as type for objects initialState, ACPIState and ULVState. Also, with the change from one-element array to flexible-array member in commit 0e1aa13ca3ff ("drm/amd/pm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE"), the size of dpmLevels in struct SISLANDS_SMC_STATETABLE should be fixed to be SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE instead of SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1. Fixes: 0e1aa13ca3ff ("drm/amd/pm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 1ddeedaa28e14c4e40c95e3d8026d69eef47eaba Author: Gustavo A. R. Silva Date: Sun May 9 17:55:25 2021 -0500 drm/radeon/si_dpm: Fix SMU power state load Create new structure SISLANDS_SMC_SWSTATE_SINGLE, as initialState.levels and ACPIState.levels are never actually used as flexible arrays. Those arrays can be used as simple objects of type SISLANDS_SMC_HW_PERFORMANCE_LEVEL, instead. Currently, the code fails because flexible array _levels_ in struct SISLANDS_SMC_SWSTATE doesn't allow for code that access the first element of initialState.levels and ACPIState.levels arrays: 4353 table->initialState.levels[0].mclk.vDLL_CNTL = 4354 cpu_to_be32(si_pi->clock_registers.dll_cntl); ... 4555 table->ACPIState.levels[0].mclk.vDLL_CNTL = 4556 cpu_to_be32(dll_cntl); because such element cannot exist without previously allocating any dynamic memory for it (which never actually happens). That's why struct SISLANDS_SMC_SWSTATE should only be used as type for object driverState and new struct SISLANDS_SMC_SWSTATE_SINGLE is created as type for objects initialState, ACPIState and ULVState. Also, with the change from one-element array to flexible-array member in commit 96e27e8d919e ("drm/radeon/si_dpm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE"), the size of dpmLevels in struct SISLANDS_SMC_STATETABLE should be fixed to be SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE instead of SISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1583 Fixes: 96e27e8d919e ("drm/radeon/si_dpm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE") Cc: stable@vger.kernel.org Reported-by: Kai-Heng Feng Tested-by: Kai-Heng Feng Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 5d31950a483381b5444494dfb7fa5ed764193b92 Author: Gustavo A. R. Silva Date: Sun May 9 17:49:26 2021 -0500 drm/radeon/ni_dpm: Fix booting bug Create new structure NISLANDS_SMC_SWSTATE_SINGLE, as initialState.levels and ACPIState.levels are never actually used as flexible arrays. Those arrays can be used as simple objects of type NISLANDS_SMC_HW_PERFORMANCE_LEVEL, instead. Currently, the code fails because flexible array _levels_ in struct NISLANDS_SMC_SWSTATE doesn't allow for code that access the first element of initialState.levels and ACPIState.levels arrays: drivers/gpu/drm/radeon/ni_dpm.c: 1690 table->initialState.levels[0].mclk.vMPLL_AD_FUNC_CNTL = 1691 cpu_to_be32(ni_pi->clock_registers.mpll_ad_func_cntl); ... 1903: table->ACPIState.levels[0].mclk.vMPLL_AD_FUNC_CNTL = cpu_to_be32(mpll_ad_func_cntl); 1904: table->ACPIState.levels[0].mclk.vMPLL_AD_FUNC_CNTL_2 = cpu_to_be32(mpll_ad_func_cntl_2); because such element cannot exist without previously allocating any dynamic memory for it (which never actually happens). That's why struct NISLANDS_SMC_SWSTATE should only be used as type for object driverState and new struct SISLANDS_SMC_SWSTATE_SINGLE is created as type for objects initialState, ACPIState and ULVState. Also, with the change from one-element array to flexible-array member in commit 434fb1e7444a ("drm/radeon/nislands_smc.h: Replace one-element array with flexible-array member in struct NISLANDS_SMC_SWSTATE"), the size of dpmLevels in struct NISLANDS_SMC_STATETABLE should be fixed to be NISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE instead of NISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1. Bug: https://lore.kernel.org/dri-devel/3eedbe78-1fbd-4763-a7f3-ac5665e76a4a@xenosoft.de/ Fixes: 434fb1e7444a ("drm/radeon/nislands_smc.h: Replace one-element array with flexible-array member in struct NISLANDS_SMC_SWSTATE") Cc: stable@vger.kernel.org Reported-by: Christian Zigotzky Tested-by: Christian Zigotzky Link: https://lore.kernel.org/dri-devel/9bb5fcbd-daf5-1669-b3e7-b8624b3c36f9@xenosoft.de/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit e181811bd04d874fe48bbfa1165a82068b58144d Author: Hou Pu Date: Thu May 13 21:04:10 2021 +0800 nvmet: use new ana_log_size instead the old one The new ana_log_size should be used instead of the old one. Or kernel NULL pointer dereference will happen like below: [ 38.957849][ T69] BUG: kernel NULL pointer dereference, address: 000000000000003c [ 38.975550][ T69] #PF: supervisor write access in kernel mode [ 38.975955][ T69] #PF: error_code(0x0002) - not-present page [ 38.976905][ T69] PGD 0 P4D 0 [ 38.979388][ T69] Oops: 0002 [#1] SMP NOPTI [ 38.980488][ T69] CPU: 0 PID: 69 Comm: kworker/0:2 Not tainted 5.12.0+ #54 [ 38.981254][ T69] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 [ 38.982502][ T69] Workqueue: events nvme_loop_execute_work [ 38.985219][ T69] RIP: 0010:memcpy_orig+0x68/0x10f [ 38.986203][ T69] Code: 83 c2 20 eb 44 48 01 d6 48 01 d7 48 83 ea 20 0f 1f 00 48 83 ea 20 4c 8b 46 f8 4c 8b 4e f0 4c 8b 56 e8 4c 8b 5e e0 48 8d 76 e0 <4c> 89 47 f8 4c 89 4f f0 4c 89 57 e8 4c 89 5f e0 48 8d 7f e0 73 d2 [ 38.987677][ T69] RSP: 0018:ffffc900001b7d48 EFLAGS: 00000287 [ 38.987996][ T69] RAX: 0000000000000020 RBX: 0000000000000024 RCX: 0000000000000010 [ 38.988327][ T69] RDX: ffffffffffffffe4 RSI: ffff8881084bc004 RDI: 0000000000000044 [ 38.988620][ T69] RBP: 0000000000000024 R08: 0000000100000000 R09: 0000000000000000 [ 38.988991][ T69] R10: 0000000100000000 R11: 0000000000000001 R12: 0000000000000024 [ 38.989289][ T69] R13: ffff8881084bc000 R14: 0000000000000000 R15: 0000000000000024 [ 38.989845][ T69] FS: 0000000000000000(0000) GS:ffff888237c00000(0000) knlGS:0000000000000000 [ 38.990234][ T69] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 38.990490][ T69] CR2: 000000000000003c CR3: 00000001085b2000 CR4: 00000000000006f0 [ 38.991105][ T69] Call Trace: [ 38.994157][ T69] sg_copy_buffer+0xb8/0xf0 [ 38.995357][ T69] nvmet_copy_to_sgl+0x48/0x6d [ 38.995565][ T69] nvmet_execute_get_log_page_ana+0xd4/0x1cb [ 38.995792][ T69] nvmet_execute_get_log_page+0xc9/0x146 [ 38.995992][ T69] nvme_loop_execute_work+0x3e/0x44 [ 38.996181][ T69] process_one_work+0x1c3/0x3c0 [ 38.996393][ T69] worker_thread+0x44/0x3d0 [ 38.996600][ T69] ? cancel_delayed_work+0x90/0x90 [ 38.996804][ T69] kthread+0xf7/0x130 [ 38.996961][ T69] ? kthread_create_worker_on_cpu+0x70/0x70 [ 38.997171][ T69] ret_from_fork+0x22/0x30 [ 38.997705][ T69] Modules linked in: [ 38.998741][ T69] CR2: 000000000000003c [ 39.000104][ T69] ---[ end trace e719927b609d0fa0 ]--- Fixes: 5e1f689913a4 ("nvme-multipath: fix double initialization of ANA state") Signed-off-by: Hou Pu Signed-off-by: Christoph Hellwig commit 975f94c7d6c306b833628baa9aec3f79db1eb3a1 Author: Chunfeng Yun Date: Wed May 12 10:07:38 2021 +0800 usb: core: hub: fix race condition about TRSMRCY of resume This may happen if the port becomes resume status exactly when usb_port_resume() gets port status, it still need provide a TRSMCRY time before access the device. CC: Reported-by: Tianping Fang Acked-by: Alan Stern Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210512020738.52961-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 12701ce524bc9b7c6345a2425208501fd2c62aad Author: Badhri Jagan Sridharan Date: Mon May 10 14:17:56 2021 -0700 usb: typec: tcpm: Fix SINK_DISCOVERY current limit for Rp-default This is a regression introduced by 1373fefc6243 ("usb: typec: tcpm: Allow slow charging loops to comply to pSnkStby") When Source advertises Rp-default, tcpm would request 500mA when in SINK_DISCOVERY, Type-C spec advises the sink to follow BC1.2 current limits when Rp-default is advertised. [12750.503381] Requesting mux state 1, usb-role 2, orientation 1 [12750.503837] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS] [12751.003891] state change SNK_STARTUP -> SNK_DISCOVERY [12751.003900] Setting voltage/current limit 5000 mV 500 mA This patch restores the behavior where the tcpm would request 0mA when Rp-default is advertised by the source. [   73.174252] Requesting mux state 1, usb-role 2, orientation 1 [   73.174749] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS] [   73.674800] state change SNK_STARTUP -> SNK_DISCOVERY [   73.674808] Setting voltage/current limit 5000 mV 0 mA During SNK_DISCOVERY, Cap the current limit to PD_P_SNK_STDBY_MW / 5 only for slow_charger_loop case. Fixes: 1373fefc6243 ("usb: typec: tcpm: Allow slow charging loops to comply to pSnkStby") Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210510211756.3346954-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 3c128781d8da463761495aaf8898c9ecb4e71528 Author: Sandeep Singh Date: Wed May 12 11:08:16 2021 +0300 xhci: Add reset resume quirk for AMD xhci controller. One of AMD xhci controller require reset on resume. Occasionally AMD xhci controller does not respond to Stop endpoint command. Once the issue happens controller goes into bad state and in that case controller needs to be reset. Cc: Signed-off-by: Sandeep Singh Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210512080816.866037-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ca09b1bea63ab83f4cca3a2ae8bc4f597ec28851 Author: Maximilian Luz Date: Wed May 12 11:08:15 2021 +0300 usb: xhci: Increase timeout for HC halt On some devices (specifically the SC8180x based Surface Pro X with QCOM04A6) HC halt / xhci_halt() times out during boot. Manually binding the xhci-hcd driver at some point later does not exhibit this behavior. To work around this, double XHCI_MAX_HALT_USEC, which also resolves this issue. Cc: Signed-off-by: Maximilian Luz Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210512080816.866037-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit dda32c00c9a0fa103b5d54ef72c477b7aa993679 Author: Christophe JAILLET Date: Wed May 12 11:08:14 2021 +0300 xhci: Do not use GFP_KERNEL in (potentially) atomic context 'xhci_urb_enqueue()' is passed a 'mem_flags' argument, because "URBs may be submitted in interrupt context" (see comment related to 'usb_submit_urb()' in 'drivers/usb/core/urb.c') So this flag should be used in all the calling chain. Up to now, 'xhci_check_maxpacket()' which is only called from 'xhci_urb_enqueue()', uses GFP_KERNEL. Be safe and pass the mem_flags to this function as well. Fixes: ddba5cd0aeff ("xhci: Use command structures when queuing commands on the command ring") Cc: Signed-off-by: Christophe JAILLET Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210512080816.866037-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9b6a126ae58d9edfdde2d5f2e87f7615ea5e0155 Author: Mathias Nyman Date: Wed May 12 11:08:13 2021 +0300 xhci: Fix giving back cancelled URBs even if halted endpoint can't reset Commit 9ebf30007858 ("xhci: Fix halted endpoint at stop endpoint command completion") in 5.12 changes how cancelled URBs are given back. To cancel a URB xhci driver needs to stop the endpoint first. To clear a halted endpoint xhci driver needs to reset the endpoint. In rare cases when an endpoint halt (error) races with a endpoint stop we need to clear the reset before removing, and giving back the cancelled URB. The above change in 5.12 takes care of this, but it also relies on the reset endpoint completion handler to give back the cancelled URBs. There are cases when driver refuses to queue reset endpoint commands, for example when a link suddenly goes to an inactive error state. In this case the cancelled URB is never given back. Fix this by giving back the URB in the stop endpoint if queuing a reset endpoint command fails. Fixes: 9ebf30007858 ("xhci: Fix halted endpoint at stop endpoint command completion") CC: # 5.12 Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210512080816.866037-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b813511135e8b84fa741afdfbab4937919100bef Author: Abhijeet Rao Date: Wed May 12 11:08:12 2021 +0300 xhci-pci: Allow host runtime PM as default for Intel Alder Lake xHCI In the same way as Intel Tiger Lake TCSS (Type-C Subsystem) the Alder Lake TCSS xHCI needs to be runtime suspended whenever possible to allow the TCSS hardware block to enter D3cold and thus save energy. Cc: stable@vger.kernel.org Signed-off-by: Abhijeet Rao Signed-off-by: Nikunj A. Dadhania Signed-off-by: Azhar Shaikh Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210512080816.866037-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3743d55b289c203d8f77b7cd47c24926b9d186ae Author: Huang Rui Date: Sun Apr 25 15:34:51 2021 +0800 x86, sched: Fix the AMD CPPC maximum performance value on certain AMD Ryzen generations Some AMD Ryzen generations has different calculation method on maximum performance. 255 is not for all ASICs, some specific generations should use 166 as the maximum performance. Otherwise, it will report incorrect frequency value like below: ~ → lscpu | grep MHz CPU MHz: 3400.000 CPU max MHz: 7228.3198 CPU min MHz: 2200.0000 [ mingo: Tidied up whitespace use. ] [ Alexander Monakov : fix 225 -> 255 typo. ] Fixes: 41ea667227ba ("x86, sched: Calculate frequency invariance for AMD systems") Fixes: 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies") Reported-by: Jason Bagavatsingham Fixed-by: Alexander Monakov Reviewed-by: Rafael J. Wysocki Signed-off-by: Huang Rui Signed-off-by: Ingo Molnar Tested-by: Jason Bagavatsingham Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210425073451.2557394-1-ray.huang@amd.com Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=211791 Signed-off-by: Ingo Molnar commit 0852b6ca941ef3ff75076e85738877bd3271e1cd Author: Gao Xiang Date: Mon May 10 14:47:15 2021 +0800 erofs: fix 1 lcluster-sized pcluster for big pcluster If the 1st NONHEAD lcluster of a pcluster isn't CBLKCNT lcluster type rather than a HEAD or PLAIN type instead, which means its pclustersize _must_ be 1 lcluster (since its uncompressed size < 2 lclusters), as illustrated below: HEAD HEAD / PLAIN lcluster type ____________ ____________ |_:__________|_________:__| file data (uncompressed) . . .____________. |____________| pcluster data (compressed) Such on-disk case was explained before [1] but missed to be handled properly in the runtime implementation. It can be observed if manually generating 1 lcluster-sized pcluster with 2 lclusters (thus CBLKCNT doesn't exist.) Let's fix it now. [1] https://lore.kernel.org/r/20210407043927.10623-1-xiang@kernel.org Link: https://lore.kernel.org/r/20210510064715.29123-1-xiang@kernel.org Fixes: cec6e93beadf ("erofs: support parsing big pcluster compress indexes") Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 8967b27a6c1c19251989c7ab33c058d16e4a5f53 Author: Marek Vasut Date: Mon Apr 26 12:23:21 2021 +0200 ARM: dts: imx6q-dhcom: Add PU,VDD1P1,VDD2P5 regulators Per schematic, both PU and SOC regulator are supplied from LTC3676 SW1 via VDDSOC_IN rail, add the PU input. Both VDD1P1, VDD2P5 are supplied from LTC3676 SW2 via VDDHIGH_IN rail, add both inputs. While no instability or problems are currently observed, the regulators should be fully described in DT and that description should fully match the hardware, else this might lead to unforseen issues later. Fix this. Fixes: 52c7a088badd ("ARM: dts: imx6q: Add support for the DHCOM iMX6 SoM and PDK2") Reviewed-by: Fabio Estevam Signed-off-by: Marek Vasut Cc: Christoph Niedermaier Cc: Fabio Estevam Cc: Ludwig Zenz Cc: NXP Linux Team Cc: Shawn Guo Cc: stable@vger.kernel.org Reviewed-by: Christoph Niedermaier Signed-off-by: Shawn Guo commit da096fbccd52803db3edd9dd0c5ae4079d31c456 Author: Srinivas Kandagatla Date: Tue May 4 13:59:09 2021 +0100 soundwire: qcom: fix handling of qcom,ports-block-pack-mode Support to "qcom,ports-block-pack-mode" was added at later stages to support a variant of Qualcomm SoundWire controllers available on Apps processor. However the older versions of the SoundWire controller which are embedded in WCD Codecs do not need this property. So returning on error for those cases will break boards like DragonBoard DB845c and Lenovo Yoga C630. This patch fixes error handling on this property considering older usecases. Fixes: a5943e4fb14e ("soundwire: qcom: check of_property_read status") Reported-by: Amit Pundir Signed-off-by: Srinivas Kandagatla Tested-by: Amit Pundir Link: https://lore.kernel.org/r/20210504125909.16108-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit c547addba7096debac4f99cdfe869a32a81081e2 Author: Nikolay Borisov Date: Tue May 11 16:17:37 2021 +0300 MAINTAINERS: Add lib/percpu* as part of percpu entry Without this patch get_maintainers.pl on a patch which modified lib/percpu_refcount.c produces: Jens Axboe (commit_signer:2/5=40%) Ming Lei (commit_signer:2/5=40%,authored:2/5=40%,added_lines:99/114=87%,removed_lines:34/43=79%) "Paul E. McKenney" (commit_signer:1/5=20%,authored:1/5=20%,added_lines:9/114=8%,removed_lines:3/43=7%) Tejun Heo (commit_signer:1/5=20%) Andrew Morton (commit_signer:1/5=20%) Nikolay Borisov (authored:1/5=20%,removed_lines:3/43=7%) Joe Perches (authored:1/5=20%,removed_lines:3/43=7%) linux-kernel@vger.kernel.org (open list) Whereas with the patch applied it now (properly) prints: Dennis Zhou (maintainer:PER-CPU MEMORY ALLOCATOR) Tejun Heo (maintainer:PER-CPU MEMORY ALLOCATOR) Christoph Lameter (maintainer:PER-CPU MEMORY ALLOCATOR) linux-kernel@vger.kernel.org (open list) Signed-off-by: Nikolay Borisov [Dennis: updated list to linux-mm@kvack.org] Signed-off-by: Dennis Zhou commit 0e4a4a08cd78efcaddbc2e4c5ed86b5a5cb8a15e Author: Michal Vokáč Date: Tue Apr 13 16:45:57 2021 +0200 ARM: dts: imx6dl-yapp4: Fix RGMII connection to QCA8334 switch The FEC does not have a PHY so it should not have a phy-handle. It is connected to the switch at RGMII level so we need a fixed-link sub-node on both ends. This was not a problem until the qca8k.c driver was converted to PHYLINK by commit b3591c2a3661 ("net: dsa: qca8k: Switch to PHYLINK instead of PHYLIB"). That commit revealed the FEC configuration was not correct. Fixes: 87489ec3a77f ("ARM: dts: imx: Add Y Soft IOTA Draco, Hydra and Ursa boards") Cc: stable@vger.kernel.org Signed-off-by: Michal Vokáč Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo commit 9e9da02a68d4b7feaa10022fd1135d9b3f2f72d7 Author: Nikolay Borisov Date: Tue May 11 16:16:33 2021 +0300 percpu_ref: Don't opencode percpu_ref_is_dying Signed-off-by: Nikolay Borisov Signed-off-by: Dennis Zhou commit 3b5169c2eb81e822445469a077223f8eb0729a59 Author: Guenter Roeck Date: Wed May 12 15:48:09 2021 -0700 hwmon: (adm9240) Fix writes into inX_max attributes When converting the driver to use the devm_hwmon_device_register_with_info API, the wrong register was selected when writing into inX_max attributes. Fix it. Fixes: 124b7e34a5a6 ("hwmon: (adm9240) Convert to devm_hwmon_device_register_with_info API") Reported-by: Chris Packham Tested-by: Chris Packham Signed-off-by: Guenter Roeck commit c06a2ba62fc401b7aaefd23f5d0bc06d2457ccc1 Merge: 8d02490ccdde9 7240cd2005415 Author: Linus Torvalds Date: Wed May 12 15:38:38 2021 -0700 Merge tag 'docs-5.13-3' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A set of straightforward documentation fixes" * tag 'docs-5.13-3' of git://git.lwn.net/linux: Remove link to nonexistent rocket driver docs docs: networking: device_drivers: fix bad usage of UTF-8 chars docs: hwmon: tmp103.rst: fix bad usage of UTF-8 chars docs: ABI: remove some spurious characters docs: ABI: remove a meaningless UTF-8 character docs: cdrom-standard.rst: get rid of uneeded UTF-8 chars Documentation: drop optional BOMs docs/zh_CN: Remove obsolete translation file commit 8d02490ccdde9aef1ca57d5c87f8c20c2d6b1f5e Merge: dbb5afad100a8 1df83992d9773 Author: Linus Torvalds Date: Wed May 12 15:34:12 2021 -0700 Merge tag 'tpmdd-next-v5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm fixes from Jarkko Sakkinen: "Bug fixes that have came up after the first pull request" * tag 'tpmdd-next-v5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: tpm: fix error return code in tpm2_get_cc_attrs_tbl() tpm, tpm_tis: Reserve locality in tpm_tis_resume() tpm, tpm_tis: Extend locality handling to TPM2 in tpm_tis_gen_interrupt() trusted-keys: match tpm_get_ops on all return paths KEYS: trusted: Fix memory leak on object td commit 4792f9dd12936ec35deced665ae3a4ca8fe98729 Author: Miguel Ojeda Date: Wed May 12 23:32:39 2021 +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 832ce924b1a14e139e184a6da9f5a69a5e47b256 Author: Dan Carpenter Date: Wed May 12 13:02:48 2021 +0300 chelsio/chtls: unlock on error in chtls_pt_recvmsg() This error path needs to release some memory and call release_sock(sk); before returning. Fixes: 6919a8264a32 ("Crypto/chtls: add/delete TLS header in driver") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 4a64541f2cebef54ea8d9f53ac5067328b8e02d8 Author: Krzysztof Kozlowski Date: Wed May 12 10:43:19 2021 -0400 MAINTAINERS: nfc: include linux-nfc mailing list Keep all NFC related patches in existing linux-nfc@lists.01.org mailing list. Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Greer Signed-off-by: David S. Miller commit 8aa5713d8b2ce1ea67bdf212eb61bfcff3c52202 Author: Krzysztof Kozlowski Date: Wed May 12 10:43:18 2021 -0400 MAINTAINERS: nfc: add Krzysztof Kozlowski as maintainer The NFC subsystem is orphaned. I am happy to spend some cycles to review the patches, send pull requests and in general keep the NFC subsystem running. Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Greer Signed-off-by: David S. Miller commit ca14f9597f4fdb3679453aec7bb2807f0b8b7363 Author: Krzysztof Kozlowski Date: Wed May 12 10:00:46 2021 -0400 MAINTAINERS: nfc: drop Clément Perrochaud from NXP-NCI Emails to Clément Perrochaud bounce with permanent error "user does not exist", so remove Clément Perrochaud from NXP-NCI driver maintainers entry. Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Greer Signed-off-by: David S. Miller commit 364642ae80d68e4aa9f89b900f9aea95dd0b1033 Merge: 9c1bb37f8cad5 2b17c400aeb44 Author: David S. Miller Date: Wed May 12 14:08:31 2021 -0700 Merge tag 'linux-can-fixes-for-5.13-20210512' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-05-12 this is a pull request of a single patch for net/master. The patch is by Norbert Slusarek and it fixes a race condition in the CAN ISO-TP socket between isotp_bind() and isotp_setsockopt(). ==================== Signed-off-by: David S. Miller commit 9c1bb37f8cad5e2ee1933fa1da9a6baa7876a8e4 Author: Christophe JAILLET Date: Wed May 12 13:15:29 2021 +0200 ptp: ocp: Fix a resource leak in an error handling path If an error occurs after a successful 'pci_ioremap_bar()' call, it must be undone by a corresponding 'pci_iounmap()' call, as already done in the remove function. Fixes: a7e1abad13f3 ("ptp: Add clock driver for the OpenCompute TimeCard.") Signed-off-by: Christophe JAILLET Acked-by: Richard Cochran Signed-off-by: David S. Miller commit e5cc361e21648b75f935f9571d4003aaee480214 Author: Dan Carpenter Date: Wed May 12 13:11:43 2021 +0300 octeontx2-pf: fix a buffer overflow in otx2_set_rxfh_context() This function is called from ethtool_set_rxfh() and "*rss_context" comes from the user. Add some bounds checking to prevent memory corruption. Fixes: 81a4362016e7 ("octeontx2-pf: Add RSS multi group support") Signed-off-by: Dan Carpenter Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit 6e8005576648a62042a915c2bb40b450f94b6cfc Merge: 171c3b151118a 052fcc4531824 Author: David S. Miller Date: Wed May 12 14:01:50 2021 -0700 Merge branch 'fec-fixes' Joakim Zhang says: ==================== net: fixes for fec driver Two small fixes for fec driver. ==================== Signed-off-by: David S. Miller commit 052fcc4531824c38f8e0ad88213c1be102a0b124 Author: Fugang Duan Date: Wed May 12 10:44:00 2021 +0800 net: fec: add defer probe for of_get_mac_address If MAC address read from nvmem efuse by calling .of_get_mac_address(), but nvmem efuse is registered later than the driver, then it return -EPROBE_DEFER value. So modify the driver to support defer probe when read MAC address from nvmem efuse. Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 619fee9eb13b5d29e4267cb394645608088c28a8 Author: Fugang Duan Date: Wed May 12 10:43:59 2021 +0800 net: fec: fix the potential memory leak in fec_enet_init() If the memory allocated for cbd_base is failed, it should free the memory allocated for the queues, otherwise it causes memory leak. And if the memory allocated for the queues is failed, it can return error directly. Fixes: 59d0f7465644 ("net: fec: init multi queue date structure") Signed-off-by: Fugang Duan Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 171c3b151118a2fe0fc1e2a9d1b5a1570cfe82d2 Author: Richard Sanger Date: Wed May 12 13:31:22 2021 +1200 net: packetmmap: fix only tx timestamp on request The packetmmap tx ring should only return timestamps if requested via setsockopt PACKET_TIMESTAMP, as documented. This allows compatibility with non-timestamp aware user-space code which checks tp_status == TP_STATUS_AVAILABLE; not expecting additional timestamp flags to be set in tp_status. Fixes: b9c32fb27170 ("packet: if hw/sw ts enabled in rx/tx ring, report which ts we got") Cc: Daniel Borkmann Cc: Willem de Bruijn Signed-off-by: Richard Sanger Signed-off-by: David S. Miller commit aa473d6ceb821d7c568c64cca7fff3e86ba9d789 Author: Michael Chan Date: Tue May 11 19:10:50 2021 -0400 bnxt_en: Fix and improve .ndo_features_check(). Jakub Kicinski pointed out that we need to handle ipv6 extension headers and to explicitly check for supported tunnel types in .ndo_features_check(). For ipv6 extension headers, the hardware supports up to 2 ext. headers and each must be <= 64 bytes. For tunneled packets, the supported packets are UDP with supported VXLAN and Geneve ports, GRE, and IPIP. v3: More improvements based on Alexander Duyck's valuable feedback - Remove the jump lable in bnxt_features_check() and restructure it so that the TCP/UDP is check is consolidated in bnxt_exthdr_check(). v2: Add missing step to check inner ipv6 header for UDP and GRE tunnels. Check TCP/UDP next header after skipping ipv6 ext headers for non-tunneled packets and for inner ipv6. (Both feedback from Alexander Duyck) Reviewed-by: Edwin Peer Reviewed-by: Pavan Chebbi Fixes: 1698d600b361 ("bnxt_en: Implement .ndo_features_check().") Signed-off-by: Michael Chan Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 098116e7e640ba677d9e345cbee83d253c13d556 Author: Paolo Abeni Date: Tue May 11 10:35:21 2021 +0200 net: really orphan skbs tied to closing sk If the owing socket is shutting down - e.g. the sock reference count already dropped to 0 and only sk_wmem_alloc is keeping the sock alive, skb_orphan_partial() becomes a no-op. When forwarding packets over veth with GRO enabled, the above causes refcount errors. This change addresses the issue with a plain skb_orphan() call in the critical scenario. Fixes: 9adc89af724f ("net: let skb_orphan_partial wake-up waiters.") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit a554e740b66a83c7560b30e6b50bece37555ced3 Author: Nick Desaulniers Date: Thu Apr 22 12:04:42 2021 -0700 x86/boot/compressed: Enable -Wundef A discussion around -Wundef showed that there were still a few boolean Kconfigs where #if was used rather than #ifdef to guard different code. Kconfig doesn't define boolean configs, which can result in -Wundef warnings. arch/x86/boot/compressed/Makefile resets the CFLAGS used for this directory, and doesn't re-enable -Wundef as the top level Makefile does. If re-added, with RANDOMIZE_BASE and X86_NEED_RELOCS disabled, the following warnings are visible. arch/x86/boot/compressed/misc.h:82:5: warning: 'CONFIG_RANDOMIZE_BASE' is not defined, evaluates to 0 [-Wundef] ^ arch/x86/boot/compressed/misc.c:175:5: warning: 'CONFIG_X86_NEED_RELOCS' is not defined, evaluates to 0 [-Wundef] ^ Simply fix these and re-enable this warning for this directory. Suggested-by: Nathan Chancellor Suggested-by: Joe Perches Signed-off-by: Nick Desaulniers Signed-off-by: Ingo Molnar Acked-by: Kees Cook Reviewed-by: Nathan Chancellor Link: https://lore.kernel.org/r/20210422190450.3903999-1-ndesaulniers@google.com commit e9cfd259c6d386f6235395a13bd4f357a979b2d0 Author: Dan Williams Date: Fri May 7 00:33:50 2021 -0700 ACPI: NFIT: Fix support for variable 'SPA' structure size ACPI 6.4 introduced the "SpaLocationCookie" to the NFIT "System Physical Address (SPA) Range Structure". The presence of that new field is indicated by the ACPI_NFIT_LOCATION_COOKIE_VALID flag. Pre-ACPI-6.4 firmware implementations omit the flag and maintain the original size of the structure. Update the implementation to check that flag to determine the size rather than the ACPI 6.4 compliant definition of 'struct acpi_nfit_system_address' from the Linux ACPICA definitions. Update the test infrastructure for the new expectations as well, i.e. continue to emulate the ACPI 6.3 definition of that structure. Without this fix the kernel fails to validate 'SPA' structures and this leads to a crash in nfit_get_smbios_id() since that routine assumes that SPAs are valid if it finds valid SMBIOS tables. BUG: unable to handle page fault for address: ffffffffffffffa8 [..] Call Trace: skx_get_nvdimm_info+0x56/0x130 [skx_edac] skx_get_dimm_config+0x1f5/0x213 [skx_edac] skx_register_mci+0x132/0x1c0 [skx_edac] Cc: Bob Moore Cc: Erik Kaneda Fixes: cf16b05c607b ("ACPICA: ACPI 6.4: NFIT: add Location Cookie field") Reported-by: Yi Zhang Tested-by: Yi Zhang Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/162037273007.1195827.10907249070709169329.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 3dd4fe4b4dfa34e7487edfe159ef787ba397cfa9 Author: Dan Williams Date: Wed Apr 21 00:05:28 2021 -0700 MAINTAINERS: Move nvdimm mailing list After seeing some users have subscription management trouble, more spam than other Linux development lists, and considering some of the benefits of kernel.org hosted lists, nvdimm and persistent memory development is moving to nvdimm@lists.linux.dev. The old list will remain up until v5.14-rc1 and shutdown thereafter. Cc: Ira Weiny Cc: Oliver O'Halloran Cc: Matthew Wilcox Cc: Jan Kara Cc: Jonathan Corbet Cc: Dave Jiang Cc: Vishal Verma Link: https://lore.kernel.org/r/161898872871.3406469.4054282559340528393.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams commit 7ddb4cc2b885c740523e6ea54a1f4434acfa3368 Author: Zou Wei Date: Tue Apr 20 15:47:47 2021 +0800 tools/testing/nvdimm: Make symbol '__nfit_test_ioremap' static The sparse tool complains as follows: tools/testing/nvdimm/test/iomap.c:65:14: warning: symbol '__nfit_test_ioremap' was not declared. Should it be static? This symbol is not used outside of iomap.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1618904867-25275-1-git-send-email-zou_wei@huawei.com Signed-off-by: Dan Williams commit 681865a03d3ec6ac3dda147044ed2a1a0f49f7bf Author: Wan Jiabing Date: Mon Apr 19 19:27:25 2021 +0800 libnvdimm: Remove duplicate struct declaration struct device is declared at 133rd line. The second declaration is unnecessary, remove it. Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210419112725.42145-1-wanjiabing@vivo.com Signed-off-by: Dan Williams commit 1df83992d977355177810c2b711afc30546c81ce Author: Zhen Lei Date: Wed May 12 21:39:26 2021 +0800 tpm: fix error return code in tpm2_get_cc_attrs_tbl() If the total number of commands queried through TPM2_CAP_COMMANDS is different from that queried through TPM2_CC_GET_CAPABILITY, it indicates an unknown error. In this case, an appropriate error code -EFAULT should be returned. However, we currently do not explicitly assign this error code to 'rc'. As a result, 0 was incorrectly returned. Cc: stable@vger.kernel.org Fixes: 58472f5cd4f6("tpm: validate TPM 2.0 commands") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 8a2d296aaebadd68d9c1f6908667df1d1c84c051 Author: Jarkko Sakkinen Date: Mon May 10 15:28:31 2021 +0300 tpm, tpm_tis: Reserve locality in tpm_tis_resume() Reserve locality in tpm_tis_resume(), as it could be unsert after waking up from a sleep state. Cc: stable@vger.kernel.org Cc: Lino Sanfilippo Reported-by: Hans de Goede Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()") Signed-off-by: Jarkko Sakkinen commit e630af7dfb450d1c00c30077314acf33032ff9e4 Author: Jarkko Sakkinen Date: Mon May 10 15:28:30 2021 +0300 tpm, tpm_tis: Extend locality handling to TPM2 in tpm_tis_gen_interrupt() The earlier fix (linked) only partially fixed the locality handling bug in tpm_tis_gen_interrupt(), i.e. only for TPM 1.x. Extend the locality handling to cover TPM2. Cc: Hans de Goede Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-integrity/20210220125534.20707-1-jarkko@kernel.org/ Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()") Reported-by: Lino Sanfilippo Signed-off-by: Jarkko Sakkinen Tested-by: Lino Sanfilippo commit b3ad7855b7ae3bed4242894d07bdb7f186652dbe Author: Ben Boeckel Date: Thu Apr 29 15:21:56 2021 -0400 trusted-keys: match tpm_get_ops on all return paths The `tpm_get_ops` call at the beginning of the function is not paired with a `tpm_put_ops` on this return path. Cc: stable@vger.kernel.org Fixes: f2219745250f ("security: keys: trusted: use ASN.1 TPM2 key format for the blobs") Reported-by: Dan Carpenter Signed-off-by: Ben Boeckel Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 83a775d5f9bfda95b1c295f95a3a041a40c7f321 Author: Colin Ian King Date: Fri Apr 30 12:37:24 2021 +0100 KEYS: trusted: Fix memory leak on object td Two error return paths are neglecting to free allocated object td, causing a memory leak. Fix this by returning via the error return path that securely kfree's td. Fixes clang scan-build warning: security/keys/trusted-keys/trusted_tpm1.c:496:10: warning: Potential memory leak [unix.Malloc] Cc: stable@vger.kernel.org Fixes: 5df16caada3f ("KEYS: trusted: Fix incorrect handling of tpm_get_random()") Signed-off-by: Colin Ian King Reviewed-by: Nick Desaulniers Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit f66c05d6baf36069c01a02f869bebb75586f2318 Author: Vasily Gorbik Date: Wed May 12 19:42:13 2021 +0200 objtool/x86: Fix elf_add_alternative() endianness Currently x86 kernel cross-compiled on big endian system fails at boot with: kernel BUG at arch/x86/kernel/alternative.c:258! Corresponding bug condition look like the following: BUG_ON(feature >= (NCAPINTS + NBUGINTS) * 32); Fix that by converting alternative feature/cpuid to target endianness. Fixes: 9bc0bb50727c ("objtool/x86: Rewrite retpoline thunk calls") Signed-off-by: Vasily Gorbik Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/patch-2.thread-6c9df9.git-6c9df9a8098d.your-ad-here.call-01620841104-ext-2554@work.hours commit 46c7405df7de8deb97229eacebcee96d61415f3f Author: Vasily Gorbik Date: Wed May 12 19:42:10 2021 +0200 objtool: Fix elf_create_undef_symbol() endianness Currently x86 cross-compilation fails on big endian system with: x86_64-cross-ld: init/main.o: invalid string offset 488112128 >= 6229 for section `.strtab' Mark new ELF data in elf_create_undef_symbol() as symbol, so that libelf does endianness handling correctly. Fixes: 2f2f7e47f052 ("objtool: Add elf_create_undef_symbol()") Signed-off-by: Vasily Gorbik Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/patch-1.thread-6c9df9.git-d39264656387.your-ad-here.call-01620841104-ext-2554@work.hours commit ca0760e7d79e2bb9c342e6b3f925b1ef01c6303e Author: Wei Ming Chen Date: Thu May 6 20:30:51 2021 +0800 Compiler Attributes: Add continue in comment Add "continue;" for switch/case block according to Doc[1] [1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Wei Ming Chen Signed-off-by: Miguel Ojeda commit e4527420ed087f99c6aa2ac22c6d3458c7dc1a94 Author: Ankit Nautiyal Date: Tue May 11 17:39:30 2021 +0530 drm/i915: Use correct downstream caps for check Src-Ctl mode for PCON Fix the typo in DPCD caps used for checking SRC CTL mode of HDMI2.1 PCON v2: Corrected Fixes tag (Jani Nikula). v3: Rebased. Fixes: 04b6603d13be ("drm/i915/display: Configure HDMI2.1 Pcon for FRL only if Src-Ctl mode is available") Cc: Ankit Nautiyal Cc: Uma Shankar Cc: Jani Nikula Cc: "Ville Syrj_l_" Cc: Imre Deak Cc: Manasi Navare Cc: Gwan-gyeong Mun Cc: Lucas De Marchi Cc: Sean Paul Signed-off-by: Ankit Nautiyal Reviewed-by: Swati Sharma Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210511120930.12218-1-ankit.k.nautiyal@intel.com (cherry picked from commit 88a9c5485c48ab60c89612a17fc89f4162bbdb9d) Signed-off-by: Jani Nikula commit a915fe5e9601c632417ef5261af70788d7d23a8a Author: Tvrtko Ursulin Date: Thu Apr 29 09:35:29 2021 +0100 drm/i915/overlay: Fix active retire callback alignment __i915_active_call annotation is required on the retire callback to ensure correct function alignment. Signed-off-by: Tvrtko Ursulin Fixes: a21ce8ad12d2 ("drm/i915/overlay: Switch to using i915_active tracking") Cc: Chris Wilson Cc: Matthew Auld Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210429083530.849546-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit d8e44e4dd221ee283ea60a6fb87bca08807aa0ab) Signed-off-by: Jani Nikula commit 402be8a101190969fc7ff122d07e262df86e132b Author: Stéphane Marchesin Date: Thu Apr 29 03:10:21 2021 +0000 drm/i915: Fix crash in auto_retire The retire logic uses the 2 lower bits of the pointer to the retire function to store flags. However, the auto_retire function is not guaranteed to be aligned to a multiple of 4, which causes crashes as we jump to the wrong address, for example like this: 2021-04-24T18:03:53.804300Z WARNING kernel: [ 516.876901] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI 2021-04-24T18:03:53.804310Z WARNING kernel: [ 516.876906] CPU: 7 PID: 146 Comm: kworker/u16:6 Tainted: G U 5.4.105-13595-g3cd84167b2df #1 2021-04-24T18:03:53.804311Z WARNING kernel: [ 516.876907] Hardware name: Google Volteer2/Volteer2, BIOS Google_Volteer2.13672.76.0 02/22/2021 2021-04-24T18:03:53.804312Z WARNING kernel: [ 516.876911] Workqueue: events_unbound active_work 2021-04-24T18:03:53.804313Z WARNING kernel: [ 516.876914] RIP: 0010:auto_retire+0x1/0x20 2021-04-24T18:03:53.804314Z WARNING kernel: [ 516.876916] Code: e8 01 f2 ff ff eb 02 31 db 48 89 d8 5b 5d c3 0f 1f 44 00 00 55 48 89 e5 f0 ff 87 c8 00 00 00 0f 88 ab 47 4a 00 31 c0 5d c3 0f <1f> 44 00 00 55 48 89 e5 f0 ff 8f c8 00 00 00 0f 88 9a 47 4a 00 74 2021-04-24T18:03:53.804319Z WARNING kernel: [ 516.876918] RSP: 0018:ffff9b4d809fbe38 EFLAGS: 00010286 2021-04-24T18:03:53.804320Z WARNING kernel: [ 516.876919] RAX: 0000000000000007 RBX: ffff927915079600 RCX: 0000000000000007 2021-04-24T18:03:53.804320Z WARNING kernel: [ 516.876921] RDX: ffff9b4d809fbe40 RSI: 0000000000000286 RDI: ffff927915079600 2021-04-24T18:03:53.804321Z WARNING kernel: [ 516.876922] RBP: ffff9b4d809fbe68 R08: 8080808080808080 R09: fefefefefefefeff 2021-04-24T18:03:53.804321Z WARNING kernel: [ 516.876924] R10: 0000000000000010 R11: ffffffff92e44bd8 R12: ffff9279150796a0 2021-04-24T18:03:53.804322Z WARNING kernel: [ 516.876925] R13: ffff92791c368180 R14: ffff927915079640 R15: 000000001c867605 2021-04-24T18:03:53.804323Z WARNING kernel: [ 516.876926] FS: 0000000000000000(0000) GS:ffff92791ffc0000(0000) knlGS:0000000000000000 2021-04-24T18:03:53.804323Z WARNING kernel: [ 516.876928] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 2021-04-24T18:03:53.804324Z WARNING kernel: [ 516.876929] CR2: 0000239514955000 CR3: 00000007f82da001 CR4: 0000000000760ee0 2021-04-24T18:03:53.804325Z WARNING kernel: [ 516.876930] PKRU: 55555554 2021-04-24T18:03:53.804325Z WARNING kernel: [ 516.876931] Call Trace: 2021-04-24T18:03:53.804326Z WARNING kernel: [ 516.876935] __active_retire+0x77/0xcf 2021-04-24T18:03:53.804326Z WARNING kernel: [ 516.876939] process_one_work+0x1da/0x394 2021-04-24T18:03:53.804327Z WARNING kernel: [ 516.876941] worker_thread+0x216/0x375 2021-04-24T18:03:53.804327Z WARNING kernel: [ 516.876944] kthread+0x147/0x156 2021-04-24T18:03:53.804335Z WARNING kernel: [ 516.876946] ? pr_cont_work+0x58/0x58 2021-04-24T18:03:53.804335Z WARNING kernel: [ 516.876948] ? kthread_blkcg+0x2e/0x2e 2021-04-24T18:03:53.804336Z WARNING kernel: [ 516.876950] ret_from_fork+0x1f/0x40 2021-04-24T18:03:53.804336Z WARNING kernel: [ 516.876952] Modules linked in: cdc_mbim cdc_ncm cdc_wdm xt_cgroup rfcomm cmac algif_hash algif_skcipher af_alg xt_MASQUERADE uinput snd_soc_rt5682_sdw snd_soc_rt5682 snd_soc_max98373_sdw snd_soc_max98373 snd_soc_rl6231 regmap_sdw snd_soc_sof_sdw snd_soc_hdac_hdmi snd_soc_dmic snd_hda_codec_hdmi snd_sof_pci snd_sof_intel_hda_common intel_ipu6_psys snd_sof_xtensa_dsp soundwire_intel soundwire_generic_allocation soundwire_cadence snd_sof_intel_hda snd_sof snd_soc_hdac_hda snd_soc_acpi_intel_match snd_soc_acpi snd_hda_ext_core soundwire_bus snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core intel_ipu6_isys videobuf2_dma_contig videobuf2_v4l2 videobuf2_common videobuf2_memops mei_hdcp intel_ipu6 ov2740 ov8856 at24 sx9310 dw9768 v4l2_fwnode cros_ec_typec intel_pmc_mux roles acpi_als typec fuse iio_trig_sysfs cros_ec_light_prox cros_ec_lid_angle cros_ec_sensors cros_ec_sensors_core industrialio_triggered_buffer cros_ec_sensors_ring kfifo_buf industrialio cros_ec_sensorhub 2021-04-24T18:03:53.804337Z WARNING kernel: [ 516.876972] cdc_ether usbnet iwlmvm lzo_rle lzo_compress iwl7000_mac80211 iwlwifi zram cfg80211 r8152 mii btusb btrtl btintel btbcm bluetooth ecdh_generic ecc joydev 2021-04-24T18:03:53.804337Z EMERG kernel: [ 516.879169] gsmi: Log Shutdown Reason 0x03 This change fixes this by aligning the function. Signed-off-by: Stéphane Marchesin Fixes: 229007e02d69 ("drm/i915: Wrap i915_active in a simple kreffed struct") Signed-off-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210429031021.1218091-1-marcheu@chromium.org (cherry picked from commit ca419f407b43cc89942ebc297c7a63d94abbcae4) Signed-off-by: Jani Nikula commit ea995218dddba171fecd05496c69617c5ef3c5b8 Author: Lv Yunlong Date: Mon Apr 26 05:43:40 2021 -0700 drm/i915/gt: Fix a double free in gen8_preallocate_top_level_pdp Our code analyzer reported a double free bug. In gen8_preallocate_top_level_pdp, pde and pde->pt.base are allocated via alloc_pd(vm) with one reference. If pin_pt_dma() failed, pde->pt.base is freed by i915_gem_object_put() with a reference dropped. Then free_pd calls free_px() defined in intel_ppgtt.c, which calls i915_gem_object_put() to put pde->pt.base again. As pde->pt.base is protected by refcount, so the second put will not free pde->pt.base actually. But, maybe it is better to remove the first put? Fixes: 82adf901138cc ("drm/i915/gt: Shrink i915_page_directory's slab bucket") Signed-off-by: Lv Yunlong Reviewed-by: Matthew Auld Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210426124340.4238-1-lyl2019@mail.ustc.edu.cn (cherry picked from commit ac69496fe65cca0611d5917b7d232730ff605bc7) Signed-off-by: Jani Nikula commit 04d019961fd15de92874575536310243a0d4c5c5 Author: Ville Syrjälä Date: Wed Apr 21 18:33:59 2021 +0300 drm/i915: Read C0DRB3/C1DRB3 as 16 bits again We've defined C0DRB3/C1DRB3 as 16 bit registers, so access them as such. Fixes: 1c8242c3a4b2 ("drm/i915: Use unchecked writes for setting up the fences") Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210421153401.13847-3-ville.syrjala@linux.intel.com (cherry picked from commit f765a5b48c667bdada5e49d5e0f23f8c0687b21b) Signed-off-by: Jani Nikula commit 4819d16d91145966ce03818a95169df1fd56b299 Author: Ville Syrjälä Date: Wed Apr 21 18:33:58 2021 +0300 drm/i915: Avoid div-by-zero on gen2 Gen2 tiles are 2KiB in size so i915_gem_object_get_tile_row_size() can in fact return <4KiB, which leads to div-by-zero here. Avoid that. Not sure i915_gem_object_get_tile_row_size() is entirely sane anyway since it doesn't account for the different tile layouts on i8xx/i915... I'm not able to hit this before commit 6846895fde05 ("drm/i915: Replace PIN_NONFAULT with calls to PIN_NOEVICT") and it looks like I also need to run recent version of Mesa. With those in place xonotic trips on this quite easily on my 85x. Cc: stable@vger.kernel.org Reviewed-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210421153401.13847-2-ville.syrjala@linux.intel.com (cherry picked from commit ed52c62d386f764194e0184fdb905d5f24194cae) Signed-off-by: Jani Nikula commit 85428beac80dbcace5b146b218697c73e367dcf5 Author: Daniel Wagner Date: Wed May 12 16:50:05 2021 +0200 nvmet: seset ns->file when open fails Reset the ns->file value to NULL also in the error case in nvmet_file_ns_enable(). The ns->file variable points either to file object or contains the error code after the filp_open() call. This can lead to following problem: When the user first setups an invalid file backend and tries to enable the ns, it will fail. Then the user switches over to a bdev backend and enables successfully the ns. The first received I/O will crash the system because the IO backend is chosen based on the ns->file value: static u16 nvmet_parse_io_cmd(struct nvmet_req *req) { [...] if (req->ns->file) return nvmet_file_parse_io_cmd(req); return nvmet_bdev_parse_io_cmd(req); } Reported-by: Enzo Matsumiya Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit dbb5afad100a828c97e012c6106566d99f041db6 Author: Oleg Nesterov Date: Wed May 12 15:33:08 2021 +0200 ptrace: make ptrace() fail if the tracee changed its pid unexpectedly Suppose we have 2 threads, the group-leader L and a sub-theread T, both parked in ptrace_stop(). Debugger tries to resume both threads and does ptrace(PTRACE_CONT, T); ptrace(PTRACE_CONT, L); If the sub-thread T execs in between, the 2nd PTRACE_CONT doesn not resume the old leader L, it resumes the post-exec thread T which was actually now stopped in PTHREAD_EVENT_EXEC. In this case the PTHREAD_EVENT_EXEC event is lost, and the tracer can't know that the tracee changed its pid. This patch makes ptrace() fail in this case until debugger does wait() and consumes PTHREAD_EVENT_EXEC which reports old_pid. This affects all ptrace requests except the "asynchronous" PTRACE_INTERRUPT/KILL. The patch doesn't add the new PTRACE_ option to not complicate the API, and I _hope_ this won't cause any noticeable regression: - If debugger uses PTRACE_O_TRACEEXEC and the thread did an exec and the tracer does a ptrace request without having consumed the exec event, it's 100% sure that the thread the ptracer thinks it is targeting does not exist anymore, or isn't the same as the one it thinks it is targeting. - To some degree this patch adds nothing new. In the scenario above ptrace(L) can fail with -ESRCH if it is called after the execing sub-thread wakes the leader up and before it "steals" the leader's pid. Test-case: #include #include #include #include #include #include #include #include void *tf(void *arg) { execve("/usr/bin/true", NULL, NULL); assert(0); return NULL; } int main(void) { int leader = fork(); if (!leader) { kill(getpid(), SIGSTOP); pthread_t th; pthread_create(&th, NULL, tf, NULL); for (;;) pause(); return 0; } waitpid(leader, NULL, WSTOPPED); ptrace(PTRACE_SEIZE, leader, 0, PTRACE_O_TRACECLONE | PTRACE_O_TRACEEXEC); waitpid(leader, NULL, 0); ptrace(PTRACE_CONT, leader, 0,0); waitpid(leader, NULL, 0); int status, thread = waitpid(-1, &status, 0); assert(thread > 0 && thread != leader); assert(status == 0x80137f); ptrace(PTRACE_CONT, thread, 0,0); /* * waitid() because waitpid(leader, &status, WNOWAIT) does not * report status. Why ???? * * Why WEXITED? because we have another kernel problem connected * to mt-exec. */ siginfo_t info; assert(waitid(P_PID, leader, &info, WSTOPPED|WEXITED|WNOWAIT) == 0); assert(info.si_pid == leader && info.si_status == 0x0405); /* OK, it sleeps in ptrace(PTRACE_EVENT_EXEC == 0x04) */ assert(ptrace(PTRACE_CONT, leader, 0,0) == -1); assert(errno == ESRCH); assert(leader == waitpid(leader, &status, WNOHANG)); assert(status == 0x04057f); assert(ptrace(PTRACE_CONT, leader, 0,0) == 0); return 0; } Signed-off-by: Oleg Nesterov Reported-by: Simon Marchi Acked-by: "Eric W. Biederman" Acked-by: Pedro Alves Acked-by: Simon Marchi Acked-by: Jan Kratochvil Signed-off-by: Linus Torvalds commit adf1471b2f7636362718cec42cf11599cced9733 Merge: 3d681804efcb6 f8c8871f5eff3 Author: Mark Brown Date: Wed May 12 16:22:53 2021 +0100 Merge series "regulator: fan53555: tcs4525 fix and cleanup" from Peter Geis : The tcs4525 voltage calculation is incorrect, which leads to a deadlock on the rk3566-quartz64 board when loading cpufreq. Fix the voltage calculation to correct the deadlock. While we are at it, add a safety check and clean up the function names to be more accurate. Peter Geis (3): regulator: fan53555: fix TCS4525 voltage calulation regulator: fan53555: only bind tcs4525 to correct chip id regulator: fan53555: fix tcs4525 function names drivers/regulator/fan53555.c | 44 ++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) -- 2.25.1 commit f8c8871f5eff3981eeb13421aca2c1cfda4a5204 Author: Peter Geis Date: Tue May 11 17:13:33 2021 -0400 regulator: fan53555: fix TCS4525 voltage calulation The TCS4525 has 128 voltage steps. With the calculation set to 127 the most significant bit is disregarded which leads to a miscalculation of the voltage by about 200mv. Fix the calculation to end deadlock on the rk3566-quartz64 which uses this as the cpu regulator. Fixes: 914df8faa7d6 ("regulator: fan53555: Add TCS4525 DCDC support") Signed-off-by: Peter Geis Link: https://lore.kernel.org/r/20210511211335.2935163-2-pgwipeout@gmail.com Signed-off-by: Mark Brown commit bedf78c4cbbbb65e42ede5ca2bd21887ef5b7060 Author: Sun Ke Date: Wed May 12 19:43:31 2021 +0800 nbd: share nbd_put and return by goto put_nbd Replace the following two statements by the statement “goto put_nbd;” nbd_put(nbd); return 0; Signed-off-by: Sun Ke Suggested-by: Markus Elfring Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20210512114331.1233964-3-sunke32@huawei.com Signed-off-by: Jens Axboe commit 79ebe9110fa458d58f1fceb078e2068d7ad37390 Author: Sun Ke Date: Wed May 12 19:43:30 2021 +0800 nbd: Fix NULL pointer in flush_workqueue Open /dev/nbdX first, the config_refs will be 1 and the pointers in nbd_device are still null. Disconnect /dev/nbdX, then reference a null recv_workq. The protection by config_refs in nbd_genl_disconnect is useless. [ 656.366194] BUG: kernel NULL pointer dereference, address: 0000000000000020 [ 656.368943] #PF: supervisor write access in kernel mode [ 656.369844] #PF: error_code(0x0002) - not-present page [ 656.370717] PGD 10cc87067 P4D 10cc87067 PUD 1074b4067 PMD 0 [ 656.371693] Oops: 0002 [#1] SMP [ 656.372242] CPU: 5 PID: 7977 Comm: nbd-client Not tainted 5.11.0-rc5-00040-g76c057c84d28 #1 [ 656.373661] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS ?-20190727_073836-buildvm-ppc64le-16.ppc.fedoraproject.org-3.fc31 04/01/2014 [ 656.375904] RIP: 0010:mutex_lock+0x29/0x60 [ 656.376627] Code: 00 0f 1f 44 00 00 55 48 89 fd 48 83 05 6f d7 fe 08 01 e8 7a c3 ff ff 48 83 05 6a d7 fe 08 01 31 c0 65 48 8b 14 25 00 6d 01 00 48 0f b1 55 d [ 656.378934] RSP: 0018:ffffc900005eb9b0 EFLAGS: 00010246 [ 656.379350] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 656.379915] RDX: ffff888104cf2600 RSI: ffffffffaae8f452 RDI: 0000000000000020 [ 656.380473] RBP: 0000000000000020 R08: 0000000000000000 R09: ffff88813bd6b318 [ 656.381039] R10: 00000000000000c7 R11: fefefefefefefeff R12: ffff888102710b40 [ 656.381599] R13: ffffc900005eb9e0 R14: ffffffffb2930680 R15: ffff88810770ef00 [ 656.382166] FS: 00007fdf117ebb40(0000) GS:ffff88813bd40000(0000) knlGS:0000000000000000 [ 656.382806] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 656.383261] CR2: 0000000000000020 CR3: 0000000100c84000 CR4: 00000000000006e0 [ 656.383819] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 656.384370] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 656.384927] Call Trace: [ 656.385111] flush_workqueue+0x92/0x6c0 [ 656.385395] nbd_disconnect_and_put+0x81/0xd0 [ 656.385716] nbd_genl_disconnect+0x125/0x2a0 [ 656.386034] genl_family_rcv_msg_doit.isra.0+0x102/0x1b0 [ 656.386422] genl_rcv_msg+0xfc/0x2b0 [ 656.386685] ? nbd_ioctl+0x490/0x490 [ 656.386954] ? genl_family_rcv_msg_doit.isra.0+0x1b0/0x1b0 [ 656.387354] netlink_rcv_skb+0x62/0x180 [ 656.387638] genl_rcv+0x34/0x60 [ 656.387874] netlink_unicast+0x26d/0x590 [ 656.388162] netlink_sendmsg+0x398/0x6c0 [ 656.388451] ? netlink_rcv_skb+0x180/0x180 [ 656.388750] ____sys_sendmsg+0x1da/0x320 [ 656.389038] ? ____sys_recvmsg+0x130/0x220 [ 656.389334] ___sys_sendmsg+0x8e/0xf0 [ 656.389605] ? ___sys_recvmsg+0xa2/0xf0 [ 656.389889] ? handle_mm_fault+0x1671/0x21d0 [ 656.390201] __sys_sendmsg+0x6d/0xe0 [ 656.390464] __x64_sys_sendmsg+0x23/0x30 [ 656.390751] do_syscall_64+0x45/0x70 [ 656.391017] entry_SYSCALL_64_after_hwframe+0x44/0xa9 To fix it, just add if (nbd->recv_workq) to nbd_disconnect_and_put(). Fixes: e9e006f5fcf2 ("nbd: fix max number of supported devs") Signed-off-by: Sun Ke Reviewed-by: Josef Bacik Link: https://lore.kernel.org/r/20210512114331.1233964-2-sunke32@huawei.com Signed-off-by: Jens Axboe commit f395183f9544ba2f56b25938d6ea7042bd873521 Author: Jaegeuk Kim Date: Wed May 12 07:38:00 2021 -0700 f2fs: return EINVAL for hole cases in swap file This tries to fix xfstests/generic/495. Signed-off-by: Jaegeuk Kim commit 2404b8747019184002823dba7d2f0ecf89d802b7 Author: Sumeet Pawnikar Date: Tue May 11 23:31:42 2021 +0530 ACPI: PM: Add ACPI ID of Alder Lake Fan Add a new unique fan ACPI device ID for Alder Lake to support it in acpi_dev_pm_attach() function. Fixes: 38748bcb940e ("ACPI: DPTF: Support Alder Lake") Signed-off-by: Sumeet Pawnikar Acked-by: Zhang Rui Cc: 5.10+ # 5.10+ Signed-off-by: Rafael J. Wysocki commit 190515f610946db025cdedebde93958b725fb583 Author: Lin Feng Date: Wed May 12 18:01:24 2021 +0800 blkdev.h: remove unused codes blk_account_rq Last users of blk_account_rq gone with patch commit a1ce35fa49852db ("block: remove dead elevator code") and now it gets no caller, it can be safely removed. Signed-off-by: Lin Feng Link: https://lore.kernel.org/r/20210512100124.173769-1-linf@wangsu.com Signed-off-by: Jens Axboe commit 7ea96eefb0097d243af62fc672be9f17b10338b3 Author: Paolo Valente Date: Wed May 12 11:43:52 2021 +0200 block, bfq: avoid circular stable merges BFQ may merge a new bfq_queue, stably, with the last bfq_queue created. In particular, BFQ first waits a little bit for some I/O to flow inside the new queue, say Q2, if this is needed to understand whether it is better or worse to merge Q2 with the last queue created, say Q1. This delayed stable merge is performed by assigning bic->stable_merge_bfqq = Q1, for the bic associated with Q1. Yet, while waiting for some I/O to flow in Q2, a non-stable queue merge of Q2 with Q1 may happen, causing the bic previously associated with Q2 to be associated with exactly Q1 (bic->bfqq = Q1). After that, Q2 and Q1 may happen to be split, and, in the split, Q1 may happen to be recycled as a non-shared bfq_queue. In that case, Q1 may then happen to undergo a stable merge with the bfq_queue pointed by bic->stable_merge_bfqq. Yet bic->stable_merge_bfqq still points to Q1. So Q1 would be merged with itself. This commit fixes this error by intercepting this situation, and canceling the schedule of the stable merge. Fixes: 430a67f9d616 ("block, bfq: merge bursts of newly-created queues") Signed-off-by: Pietro Pedroni Signed-off-by: Paolo Valente Link: https://lore.kernel.org/r/20210512094352.85545-2-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 2ca4dcc4909d787ee153272f7efc2bff3b498720 Author: Christian Brauner Date: Tue May 11 16:30:15 2021 +0200 fs/mount_setattr: tighten permission checks We currently don't have any filesystems that support idmapped mounts which are mountable inside a user namespace. That was a deliberate decision for now as a userns root can just mount the filesystem themselves. So enforce this restriction explicitly until there's a real use-case for this. This way we can notice it and will have a chance to adapt and audit our translation helpers and fstests appropriately if we need to support such filesystems. Cc: Christoph Hellwig Cc: Al Viro Cc: stable@vger.kernel.org CC: linux-fsdevel@vger.kernel.org Suggested-by: Seth Forshee Signed-off-by: Christian Brauner commit 6b69546912a57ff8c31061f98e56383cc0beffd3 Author: Andy Shevchenko Date: Tue May 11 17:09:12 2021 +0300 spi: Assume GPIO CS active high in ACPI case Currently GPIO CS handling, when descriptors are in use, doesn't take into consideration that in ACPI case the default polarity is Active High and can't be altered. Instead we have to use the per-chip definition provided by SPISerialBus() resource. Fixes: 766c6b63aa04 ("spi: fix client driver breakages when using GPIO descriptors") Cc: Liguang Zhang Cc: Jay Fang Cc: Sven Van Asbroeck Signed-off-by: Andy Shevchenko Tested-by: Xin Hao Link: https://lore.kernel.org/r/20210511140912.30757-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 7907cad7d07e0055789ec0c534452f19dfe1fc80 Author: Chunyan Zhang Date: Wed May 12 17:35:34 2021 +0800 spi: sprd: Add missing MODULE_DEVICE_TABLE MODULE_DEVICE_TABLE is used to extract the device information out of the driver and builds a table when being compiled. If using this macro, kernel can find the driver if available when the device is plugged in, and then loads that driver and initializes the device. Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20210512093534.243040-1-zhang.lyra@gmail.com Signed-off-by: Mark Brown commit 3d681804efcb6e5d8089a433402e19179347d7ae Author: Axel Lin Date: Wed May 12 15:58:24 2021 +0800 regulator: cros-ec: Fix error code in dev_err message Show proper error code instead of 0. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210512075824.620580-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 0e49a4de4564b3659a34b0b775d43b6b635b17fa Author: Charles Keepax Date: Tue May 11 18:57:18 2021 +0100 ASoC: cs42l52: Minor tidy up of error paths Fixup a needlessly initialised variable and an unchecked return value. Reported-by: Pierre-Louis Bossart Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210511175718.15416-5-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit b1078e9869531af4f968ba1b9edad51264943bb8 Author: Charles Keepax Date: Tue May 11 18:57:17 2021 +0100 ASoC: cs35l32: Add missing regmap use_single config This device requires single register transactions, this will definely cause problems with the new device ID parsing which uses regmap_bulk_read but might also show up in the cache sync sometimes. Add the missing flags to the regmap_config. Fixes: 283160f1419d ("ASoC: cs35l32: Minor error paths fixups") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210511175718.15416-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 2a682f821941e28fb9ceaa1dd03ccfaea0448101 Author: Charles Keepax Date: Tue May 11 18:57:16 2021 +0100 ASoC: cs35l34: Add missing regmap use_single config This device requires single register transactions, this will definely cause problems with the new device ID parsing which uses regmap_bulk_read but might also show up in the cache sync sometimes. Add the missing flags to the regmap_config. Fixes: 8cb9b001635c ("ASoC: cs35l34: Minor error paths fixups") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210511175718.15416-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 27fb585169024440c1b358da35499fa578d803cd Author: Charles Keepax Date: Tue May 11 18:57:15 2021 +0100 ASoC: cs42l73: Add missing regmap use_single config This device requires single register transactions, this will definely cause problems with the new device ID parsing which uses regmap_bulk_read but might also show up in the cache sync sometimes. Add the missing flags to the regmap_config. Fixes: 26495252fe0d ("ASoC: cs42l73: Minor error paths fixups") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210511175718.15416-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit 96f685974609d4c315669ef33d55dbc43996491e Author: Charles Keepax Date: Tue May 11 18:57:14 2021 +0100 ASoC: cs53l30: Add missing regmap use_single config This device requires single register transactions, this will definely cause problems with the new device ID parsing which uses regmap_bulk_read but might also show up in the cache sync sometimes. Add the missing flags to the regmap_config. Fixes: 4fc81bc88ad9 ("ASoC: cs53l30: Minor error paths fixups") Signed-off-by: Charles Keepax Link: https://lore.kernel.org/r/20210511175718.15416-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown commit e072b2671606c77538d6a4dd5dda80b508cb4816 Author: Zou Wei Date: Wed May 12 11:12:25 2021 +0800 ASoC: sti-sas: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620789145-14936-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown commit 47c1131633ef6210add63b8b5704497023a3462a Author: Kuninori Morimoto Date: Wed May 12 08:09:08 2021 +0900 ASoC: soc-dai.h: Align the word of comment for SND_SOC_DAIFMT_CBC_CFC Let's use "consumer" instead of "follower". Signed-off-by: Kuninori Morimoto Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/8735usc1gr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bdbe871ef0caa660e16461a2a94579d9f9ef7ba4 Author: Jon Hunter Date: Fri May 7 11:34:11 2021 +0100 gpio: tegra186: Don't set parent IRQ affinity When hotplugging CPUs on Tegra186 and Tegra194 errors such as the following are seen ... IRQ63: set affinity failed(-22). IRQ65: set affinity failed(-22). IRQ66: set affinity failed(-22). IRQ67: set affinity failed(-22). Looking at the /proc/interrupts the above are all interrupts associated with GPIOs. The reason why these error messages occur is because there is no 'parent_data' associated with any of the GPIO interrupts and so tegra186_irq_set_affinity() simply returns -EINVAL. To understand why there is no 'parent_data' it is first necessary to understand that in addition to the GPIO interrupts being routed to the interrupt controller (GIC), the interrupts for some GPIOs are also routed to the Tegra Power Management Controller (PMC) to wake up the system from low power states. In order to configure GPIO events as wake events in the PMC, the PMC is configured as IRQ parent domain for the GPIO IRQ domain. Originally the GIC was the IRQ parent domain of the PMC and although this was working, this started causing issues once commit 64a267e9a41c ("irqchip/gic: Configure SGIs as standard interrupts") was added, because technically, the GIC is not a parent of the PMC. Commit c351ab7bf2a5 ("soc/tegra: pmc: Don't create fake interrupt hierarchy levels") fixed this by severing the IRQ domain hierarchy for the Tegra GPIOs and hence, there may be no IRQ parent domain for the GPIOs. The GPIO controllers on Tegra186 and Tegra194 have either one or six interrupt lines to the interrupt controller. For GPIO controllers with six interrupts, the mapping of the GPIO interrupt to the controller interrupt is configurable within the GPIO controller. Currently a default mapping is used, however, it could be possible to use the set affinity callback for the Tegra186 GPIO driver to do something a bit more interesting. Currently, because interrupts for all GPIOs are have the same mapping and any attempts to configure the affinity for a given GPIO can conflict with another that shares the same IRQ, for now it is simpler to just remove set affinity support and this avoids the above warnings being seen. Cc: Fixes: c4e1f7d92cd6 ("gpio: tegra186: Set affinity callback to parent") Signed-off-by: Jon Hunter Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit a0579474effff6a139768b300d8439c2327b3848 Author: Andy Shevchenko Date: Mon May 10 22:46:30 2021 +0300 gpio: xilinx: Correct kernel doc for xgpio_probe() Kernel doc validator complains: .../gpio-xilinx.c:556: warning: expecting prototype for xgpio_of_probe(). Prototype was for xgpio_probe() instead Correct as suggested by changing the name of the function in the doc.. Fixes: 749564ffd52d ("gpio/xilinx: Convert the driver to platform device interface") Signed-off-by: Andy Shevchenko Tested-by: Neeli Srinivas Reviewed-by: Michal Simek Signed-off-by: Bartosz Golaszewski commit 1e948b1752b58c9c570989ab29ceef5b38fdccda Author: Zou Wei Date: Wed May 12 11:17:47 2021 +0800 gpio: cadence: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Signed-off-by: Bartosz Golaszewski commit 2af7a834a435460d546f0cf0a8b8e4d259f1d910 Author: Eric Farman Date: Tue May 11 21:56:31 2021 +0200 vfio-ccw: Serialize FSM IDLE state with I/O completion Today, the stacked call to vfio_ccw_sch_io_todo() does three things: 1) Update a solicited IRB with CP information, and release the CP if the interrupt was the end of a START operation. 2) Copy the IRB data into the io_region, under the protection of the io_mutex 3) Reset the vfio-ccw FSM state to IDLE to acknowledge that vfio-ccw can accept more work. The trouble is that step 3 is (A) invoked for both solicited and unsolicited interrupts, and (B) sitting after the mutex for step 2. This second piece becomes a problem if it processes an interrupt for a CLEAR SUBCHANNEL while another thread initiates a START, thus allowing the CP and FSM states to get out of sync. That is: CPU 1 CPU 2 fsm_do_clear() fsm_irq() fsm_io_request() vfio_ccw_sch_io_todo() fsm_io_helper() Since the FSM state and CP should be kept in sync, let's make a note when the CP is released, and rely on that as an indication that the FSM should also be reset at the end of this routine and open up the device for more work. Signed-off-by: Eric Farman Acked-by: Matthew Rosato Reviewed-by: Cornelia Huck Message-Id: <20210511195631.3995081-4-farman@linux.ibm.com> Signed-off-by: Cornelia Huck commit 6c02ac4c9211edabe17bda437ac97e578756f31b Author: Eric Farman Date: Tue May 11 21:56:30 2021 +0200 vfio-ccw: Reset FSM state to IDLE inside FSM When an I/O request is made, the fsm_io_request() routine moves the FSM state from IDLE to CP_PROCESSING, and then fsm_io_helper() moves it to CP_PENDING if the START SUBCHANNEL received a cc0. Yet, the error case to go from CP_PROCESSING back to IDLE is done after the FSM call returns. Let's move this up into the FSM proper, to provide some better symmetry when unwinding in this case. Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Acked-by: Matthew Rosato Message-Id: <20210511195631.3995081-3-farman@linux.ibm.com> Signed-off-by: Cornelia Huck commit c6c82e0cd8125d30f2f1b29205c7e1a2f1a6785b Author: Eric Farman Date: Tue May 11 21:56:29 2021 +0200 vfio-ccw: Check initialized flag in cp_init() We have a really nice flag in the channel_program struct that indicates if it had been initialized by cp_init(), and use it as a guard in the other cp accessor routines, but not for a duplicate call into cp_init(). The possibility of this occurring is low, because that flow is protected by the private->io_mutex and FSM CP_PROCESSING state. But then why bother checking it in (for example) cp_prefetch() then? Let's just be consistent and check for that in cp_init() too. Fixes: 71189f263f8a3 ("vfio-ccw: make it safe to access channel programs") Signed-off-by: Eric Farman Reviewed-by: Cornelia Huck Acked-by: Matthew Rosato Message-Id: <20210511195631.3995081-2-farman@linux.ibm.com> Signed-off-by: Cornelia Huck commit 02dbb7246c5bbbbe1607ebdc546ba5c454a664b1 Author: Gautham R. Shenoy Date: Tue May 11 20:46:09 2021 +0530 sched/fair: Fix clearing of has_idle_cores flag in select_idle_cpu() In commit: 9fe1f127b913 ("sched/fair: Merge select_idle_core/cpu()") in select_idle_cpu(), we check if an idle core is present in the LLC of the target CPU via the flag "has_idle_cores". We look for the idle core in select_idle_cores(). If select_idle_cores() isn't able to find an idle core/CPU, we need to unset the has_idle_cores flag in the LLC of the target to prevent other CPUs from going down this route. However, the current code is unsetting it in the LLC of the current CPU instead of the target CPU. This patch fixes this issue. Fixes: 9fe1f127b913 ("sched/fair: Merge select_idle_core/cpu()") Signed-off-by: Gautham R. Shenoy Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Reviewed-by: Srikar Dronamraju Acked-by: Mel Gorman Link: https://lore.kernel.org/r/1620746169-13996-1-git-send-email-ego@linux.vnet.ibm.com commit 2b17c400aeb44daf041627722581ade527bb3c1d Author: Norbert Slusarek Date: Wed May 12 00:43:54 2021 +0200 can: isotp: prevent race between isotp_bind() and isotp_setsockopt() A race condition was found in isotp_setsockopt() which allows to change socket options after the socket was bound. For the specific case of SF_BROADCAST support, this might lead to possible use-after-free because can_rx_unregister() is not called. Checking for the flag under the socket lock in isotp_bind() and taking the lock in isotp_setsockopt() fixes the issue. Fixes: 921ca574cd38 ("can: isotp: add SF_BROADCAST support for functional addressing") Link: https://lore.kernel.org/r/trinity-e6ae9efa-9afb-4326-84c0-f3609b9b8168-1620773528307@3c-app-gmx-bs06 Reported-by: Norbert Slusarek Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Norbert Slusarek Acked-by: Oliver Hartkopp Signed-off-by: Marc Kleine-Budde commit ca298241bc229303ff683db7265a2c625a9c00fe Author: Jaegeuk Kim Date: Tue May 11 14:38:47 2021 -0700 f2fs: avoid swapon failure by giving a warning first The final solution can be migrating blocks to form a section-aligned file internally. Meanwhile, let's ask users to do that when preparing the swap file initially like: 1) create() 2) ioctl(F2FS_IOC_SET_PIN_FILE) 3) fallocate() Reported-by: kernel test robot Fixes: 36e4d95891ed ("f2fs: check if swapfile is section-alligned") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e9f4eee9a0023ba22db9560d4cc6ee63f933dae8 Author: Tejun Heo Date: Tue May 11 21:38:36 2021 -0400 blk-iocost: fix weight updates of inner active iocgs When the weight of an active iocg is updated, weight_updated() is called which in turn calls __propagate_weights() to update the active and inuse weights so that the effective hierarchical weights are update accordingly. The current implementation is incorrect for inner active nodes. For an active leaf iocg, inuse can be any value between 1 and active and the difference represents how much the iocg is donating. When weight is updated, as long as inuse is clamped between 1 and the new weight, we're alright and this is what __propagate_weights() currently implements. However, that's not how an active inner node's inuse is set. An inner node's inuse is solely determined by the ratio between the sums of inuse's and active's of its children - ie. they're results of propagating the leaves' active and inuse weights upwards. __propagate_weights() incorrectly applies the same clamping as for a leaf when an active inner node's weight is updated. Consider a hierarchy which looks like the following with saturating workloads in AA and BB. R / \ A B | | AA BB 1. For both A and B, active=100, inuse=100, hwa=0.5, hwi=0.5. 2. echo 200 > A/io.weight 3. __propagate_weights() update A's active to 200 and leave inuse at 100 as it's already between 1 and the new active, making A:active=200, A:inuse=100. As R's active_sum is updated along with A's active, A:hwa=2/3, B:hwa=1/3. However, because the inuses didn't change, the hwi's remain unchanged at 0.5. 4. The weight of A is now twice that of B but AA and BB still have the same hwi of 0.5 and thus are doing the same amount of IOs. Fix it by making __propgate_weights() always calculate the inuse of an active inner iocg based on the ratio of child_inuse_sum to child_active_sum. Signed-off-by: Tejun Heo Reported-by: Dan Schatzberg Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Cc: stable@vger.kernel.org # v5.4+ Link: https://lore.kernel.org/r/YJsxnLZV1MnBcqjj@slm.duckdns.org Signed-off-by: Jens Axboe commit da3bb206c9ceb0736d9e2897ea697acabad35833 Author: Michael Ellerman Date: Tue May 11 20:54:59 2021 +1000 KVM: PPC: Book3S HV: Fix kvm_unmap_gfn_range_hv() for Hash MMU Commit 32b48bf8514c ("KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks") fixed kvm_unmap_gfn_range_hv() by adding a for loop over each gfn in the range. But for the Hash MMU it repeatedly calls kvm_unmap_rmapp() with the first gfn of the range, rather than iterating through the range. This exhibits as strange guest behaviour, sometimes crashing in firmare, or booting and then guest userspace crashing unexpectedly. Fix it by passing the iterator, gfn, to kvm_unmap_rmapp(). Fixes: 32b48bf8514c ("KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks") Reviewed-by: Sean Christopherson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210511105459.800788-1-mpe@ellerman.id.au commit 63970f3c37e75997ed86dbdfdc83df35f2152bb1 Author: Christophe Leroy Date: Sat May 8 06:36:21 2021 +0000 powerpc/legacy_serial: Fix UBSAN: array-index-out-of-bounds UBSAN complains when a pointer is calculated with invalid 'legacy_serial_console' index, allthough the index is verified before dereferencing the pointer. Fix it by checking 'legacy_serial_console' validity before calculating pointers. Fixes: 0bd3f9e953bd ("powerpc/legacy_serial: Use early_ioremap()") Reported-by: Paul Menzel Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210511010712.750096-1-mpe@ellerman.id.au commit bc581dbab26edf0b6acc98c76943b4a0c7d672a2 Author: Christophe Leroy Date: Sat May 8 09:25:44 2021 +0000 powerpc/signal: Fix possible build failure with unsafe_copy_fpr_{to/from}_user When neither CONFIG_VSX nor CONFIG_PPC_FPU_REGS are selected, unsafe_copy_fpr_to_user() and unsafe_copy_fpr_from_user() are doing nothing. Then, unless the 'label' operand is used elsewhere, GCC complains about it being defined but not used. To fix that, add an impossible 'goto label'. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cadc0a328bc8e6c5bf133193e7547d5c10ae7895.1620465920.git.christophe.leroy@csgroup.eu commit 7315e457d6bc342d06ba0b7ee498221c5237a547 Author: Christophe Leroy Date: Sat May 8 09:25:32 2021 +0000 powerpc/uaccess: Fix __get_user() with CONFIG_CC_HAS_ASM_GOTO_OUTPUT Building kernel mainline with GCC 11 leads to following failure when starting 'init': init[1]: bad frame in sys_sigreturn: 7ff5a900 nip 001083cc lr 001083c4 Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b This is an issue due to a segfault happening in __unsafe_restore_general_regs() in a loop copying registers from user to kernel: 10: 7d 09 03 a6 mtctr r8 14: 80 ca 00 00 lwz r6,0(r10) 18: 80 ea 00 04 lwz r7,4(r10) 1c: 90 c9 00 08 stw r6,8(r9) 20: 90 e9 00 0c stw r7,12(r9) 24: 39 0a 00 08 addi r8,r10,8 28: 39 29 00 08 addi r9,r9,8 2c: 81 4a 00 08 lwz r10,8(r10) <== r10 is clobbered here 30: 81 6a 00 0c lwz r11,12(r10) 34: 91 49 00 08 stw r10,8(r9) 38: 91 69 00 0c stw r11,12(r9) 3c: 39 48 00 08 addi r10,r8,8 40: 39 29 00 08 addi r9,r9,8 44: 42 00 ff d0 bdnz 14 <__unsafe_restore_general_regs+0x14> As shown above, this is due to r10 being re-used by GCC. This didn't happen with CLANG. This is fixed by tagging 'x' output as an earlyclobber operand in __get_user_asm2_goto(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cf0a050d124d4f426cdc7a74009d17b01d8d8969.1620465917.git.christophe.leroy@csgroup.eu commit 4f242fc5f2e24412b89e934dad025b10293b2712 Author: Nicholas Piggin Date: Sat May 8 20:14:55 2021 +1000 powerpc/pseries: warn if recursing into the hcall tracing code The hcall tracing code has a recursion check built in, which skips tracing if we are already tracing an hcall. However if the tracing code has problems with recursion, this check may not catch all cases because the tracing code could be invoked from a different tracepoint first, then make an hcall that gets traced, then recurse. Add an explicit warning if recursion is detected here, which might help to notice tracing code making hcalls. Really the core trace code should have its own recursion checking and warnings though. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210508101455.1578318-5-npiggin@gmail.com commit 7058f4b13edd9dd2cb3c5b4fe340d8307dbe0208 Author: Nicholas Piggin Date: Sat May 8 20:14:54 2021 +1000 powerpc/pseries: use notrace hcall variant for H_CEDE idle Rather than special-case H_CEDE in the hcall trace wrappers, make the idle H_CEDE call use plpar_hcall_norets_notrace(). Signed-off-by: Nicholas Piggin Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210508101455.1578318-4-npiggin@gmail.com commit a3f1a39a5643d5c5ed3eee4edd933e0ebfeeed6e Author: Nicholas Piggin Date: Sat May 8 20:14:53 2021 +1000 powerpc/pseries: Don't trace hcall tracing wrapper This doesn't seem very useful to trace before the recursion check, even if the ftrace code has any recursion checks of its own. Be on the safe side and don't trace the hcall trace wrappers. Reported-by: Naveen N. Rao Signed-off-by: Nicholas Piggin Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210508101455.1578318-3-npiggin@gmail.com commit 2c8c89b95831f46a2fb31a8d0fef4601694023ce Author: Nicholas Piggin Date: Sat May 8 20:14:52 2021 +1000 powerpc/pseries: Fix hcall tracing recursion in pv queued spinlocks The paravit queued spinlock slow path adds itself to the queue then calls pv_wait to wait for the lock to become free. This is implemented by calling H_CONFER to donate cycles. When hcall tracing is enabled, this H_CONFER call can lead to a spin lock being taken in the tracing code, which will result in the lock to be taken again, which will also go to the slow path because it queues behind itself and so won't ever make progress. An example trace of a deadlock: __pv_queued_spin_lock_slowpath trace_clock_global ring_buffer_lock_reserve trace_event_buffer_lock_reserve trace_event_buffer_reserve trace_event_raw_event_hcall_exit __trace_hcall_exit plpar_hcall_norets_trace __pv_queued_spin_lock_slowpath trace_clock_global ring_buffer_lock_reserve trace_event_buffer_lock_reserve trace_event_buffer_reserve trace_event_raw_event_rcu_dyntick rcu_irq_exit irq_exit __do_irq call_do_irq do_IRQ hardware_interrupt_common_virt Fix this by introducing plpar_hcall_norets_notrace(), and using that to make SPLPAR virtual processor dispatching hcalls by the paravirt spinlock code. Signed-off-by: Nicholas Piggin Reviewed-by: Naveen N. Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210508101455.1578318-2-npiggin@gmail.com commit 5d510ed78bcfcbbd3b3891cbe79cd7543bce1d05 Author: Christophe Leroy Date: Thu May 6 11:56:31 2021 +0000 powerpc/syscall: Calling kuap_save_and_lock() is wrong kuap_save_and_lock() is only for interrupts inside kernel. system call are only from user, calling kuap_save_and_lock() is wrong. Fixes: c16728835eec ("powerpc/32: Manage KUAP in C") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/332773775cf24a422105dee2d383fb8f04589045.1620302182.git.christophe.leroy@csgroup.eu commit a78339698ab1f43435fbe67fcd6de8f4f6eb9eec Author: Christophe Leroy Date: Thu May 6 14:49:45 2021 +0000 powerpc/interrupts: Fix kuep_unlock() call Same as kuap_user_restore(), kuep_unlock() has to be called when really returning to user, that is in interrupt_exit_user_prepare(), not in interrupt_exit_prepare(). Fixes: b5efec00b671 ("powerpc/32s: Move KUEP locking/unlocking in C") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b831e54a2579db24fbef836ed415588ce2b3e825.1620312573.git.christophe.leroy@csgroup.eu commit 440c3247cba3d9433ac435d371dd7927d68772a7 Author: Alex Elder Date: Tue May 11 14:42:04 2021 -0500 net: ipa: memory region array is variable size IPA configuration data includes an array of memory region descriptors. That was a fixed-size array at one time, but at some point we started defining it such that it was only as big as required for a given platform. The actual number of entries in the array is recorded in the configuration data along with the array. A loop in ipa_mem_config() still assumes the array has entries for all defined memory region IDs. As a result, this loop can go past the end of the actual array and attempt to write "canary" values based on nonsensical data. Fix this, by stashing the number of entries in the array, and using that rather than IPA_MEM_COUNT in the initialization loop found in ipa_mem_config(). The only remaining use of IPA_MEM_COUNT is in a validation check to ensure configuration data doesn't have too many entries. That's fine for now. Fixes: 3128aae8c439a ("net: ipa: redefine struct ipa_mem_data") Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit bcbda3fc616272686208f9c4d5f6dccb65360bd8 Author: Shannon Nelson Date: Tue May 11 11:11:32 2021 -0700 ionic: fix ptp support config breakage When IONIC=y and PTP_1588_CLOCK=m were set in the .config file the driver link failed with undefined references. We add the dependancy depends on PTP_1588_CLOCK || !PTP_1588_CLOCK to clear this up. If PTP_1588_CLOCK=m, the depends limits IONIC to =m (or disabled). If PTP_1588_CLOCK is disabled, IONIC can be any of y/m/n. Fixes: 61db421da31b ("ionic: link in the new hw timestamp code") Reported-by: kernel test robot Cc: Jakub Kicinski Cc: Randy Dunlap Cc: Allen Hubbe Signed-off-by: Shannon Nelson Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 29249eac5225429b898f278230a6ca2baa1ae154 Author: Paolo Abeni Date: Tue May 11 19:13:51 2021 +0200 mptcp: fix data stream corruption Maxim reported several issues when forcing a TCP transparent proxy to use the MPTCP protocol for the inbound connections. He also provided a clean reproducer. The problem boils down to 'mptcp_frag_can_collapse_to()' assuming that only MPTCP will use the given page_frag. If others - e.g. the plain TCP protocol - allocate page fragments, we can end-up re-using already allocated memory for mptcp_data_frag. Fix the issue ensuring that the to-be-expanded data fragment is located at the current page frag end. v1 -> v2: - added missing fixes tag (Mat) Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/178 Reported-and-tested-by: Maxim Galaganov Fixes: 18b683bff89d ("mptcp: queue data for mptcp level retransmission") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit df6f8237036938d48b7705681c170566c00593fa Merge: 9fe37a80c9298 569c484f9995f Author: David S. Miller Date: Tue May 11 16:05:56 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-05-11 The following pull-request contains BPF updates for your *net* tree. We've added 13 non-merge commits during the last 8 day(s) which contain a total of 21 files changed, 817 insertions(+), 382 deletions(-). The main changes are: 1) Fix multiple ringbuf bugs in particular to prevent writable mmap of read-only pages, from Andrii Nakryiko & Thadeu Lima de Souza Cascardo. 2) Fix verifier alu32 known-const subregister bound tracking for bitwise operations and/or/xor, from Daniel Borkmann. 3) Reject trampoline attachment for functions with variable arguments, and also add a deny list of other forbidden functions, from Jiri Olsa. 4) Fix nested bpf_bprintf_prepare() calls used by various helpers by switching to per-CPU buffers, from Florent Revest. 5) Fix kernel compilation with BTF debug info on ppc64 due to pahole missing TCP-CC functions like cubictcp_init, from Martin KaFai Lau. 6) Add a kconfig entry to provide an option to disallow unprivileged BPF by default, from Daniel Borkmann. 7) Fix libbpf compilation for older libelf when GELF_ST_VISIBILITY() macro is not available, from Arnaldo Carvalho de Melo. 8) Migrate test_tc_redirect to test_progs framework as prep work for upcoming skb_change_head() fix & selftest, from Jussi Maki. 9) Fix a libbpf segfault in add_dummy_ksym_var() if BTF is not present, from Ian Rogers. 10) Fix tx_only micro-benchmark in xdpsock BPF sample with proper frame size, from Magnus Karlsson. ==================== Signed-off-by: David S. Miller commit 9fe37a80c9298936a535a242355d4ef536f82dd9 Merge: 576f9eacc680d 210f563b09799 Author: David S. Miller Date: Tue May 11 16:03:45 2021 -0700 Merge tag 'mac80211-for-net-2021-05-11' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== pull-request: mac80211 2021-05-11 So exciting times, for the first pull request for fixes I have a bunch of security things that have been under embargo for a while - see more details in the tag below, and at the patch posting message I linked to. I organized with Kalle to just have a single set of fixes for mac80211 and ath10k/ath11k, we don't know about any of the other vendors (the mac80211 + already released firmware is sufficient to fix iwlwifi.) Please pull and let me know if there's any problem. Several security issues in the 802.11 implementations were found by Mathy Vanhoef (New York University Abu Dhabi), and this contains the fixes developed for mac80211 and specifically Qualcomm drivers, I'm sending this together (as agreed with Kalle) to have just a single set of patches for now. We don't know about other vendors though. More details in the patch posting: https://lore.kernel.org/r/20210511180259.159598-1-johannes@sipsolutions.net ==================== Signed-off-by: David S. Miller commit 576f9eacc680d2b1f37e8010cff62f7b227ea769 Author: Joakim Zhang Date: Mon May 10 14:55:09 2021 +0800 net: stmmac: Fix MAC WoL not working if PHY does not support WoL Both get and set WoL will check device_can_wakeup(), if MAC supports PMT, it will set device wakeup capability. After commit 1d8e5b0f3f2c ("net: stmmac: Support WOL with phy"), device wakeup capability will be overwrite in stmmac_init_phy() according to phy's Wol feature. If phy doesn't support WoL, then MAC will lose wakeup capability. To fix this issue, only overwrite device wakeup capability when MAC doesn't support PMT. For STMMAC now driver checks MAC's WoL capability if MAC supports PMT, if not support, driver will check PHY's WoL capability. Fixes: 1d8e5b0f3f2c ("net: stmmac: Support WOL with phy") Reviewed-by: Jisheng Zhang Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 8bfbfb0ddd706b1ce2e89259ecc45f192c0ec2bf Author: Chao Yu Date: Mon May 10 17:30:32 2021 +0800 f2fs: compress: fix to assign cc.cluster_idx correctly In f2fs_destroy_compress_ctx(), after f2fs_destroy_compress_ctx(), cc.cluster_idx will be cleared w/ NULL_CLUSTER, f2fs_cluster_blocks() may check wrong cluster metadata, fix it. Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a949dc5f2c5cfe0c910b664650f45371254c0744 Author: Chao Yu Date: Mon May 10 17:30:31 2021 +0800 f2fs: compress: fix race condition of overwrite vs truncate pos_fsstress testcase complains a panic as belew: ------------[ cut here ]------------ kernel BUG at fs/f2fs/compress.c:1082! invalid opcode: 0000 [#1] SMP PTI CPU: 4 PID: 2753477 Comm: kworker/u16:2 Tainted: G OE 5.12.0-rc1-custom #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014 Workqueue: writeback wb_workfn (flush-252:16) RIP: 0010:prepare_compress_overwrite+0x4c0/0x760 [f2fs] Call Trace: f2fs_prepare_compress_overwrite+0x5f/0x80 [f2fs] f2fs_write_cache_pages+0x468/0x8a0 [f2fs] f2fs_write_data_pages+0x2a4/0x2f0 [f2fs] do_writepages+0x38/0xc0 __writeback_single_inode+0x44/0x2a0 writeback_sb_inodes+0x223/0x4d0 __writeback_inodes_wb+0x56/0xf0 wb_writeback+0x1dd/0x290 wb_workfn+0x309/0x500 process_one_work+0x220/0x3c0 worker_thread+0x53/0x420 kthread+0x12f/0x150 ret_from_fork+0x22/0x30 The root cause is truncate() may race with overwrite as below, so that one reference count left in page can not guarantee the page attaching in mapping tree all the time, after truncation, later find_lock_page() may return NULL pointer. - prepare_compress_overwrite - f2fs_pagecache_get_page - unlock_page - f2fs_setattr - truncate_setsize - truncate_inode_page - delete_from_page_cache - find_lock_page Fix this by avoiding referencing updated page. Fixes: 4c8ff7095bef ("f2fs: support data compression") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a12cc5b423d4f36dc1a1ea3911e49cf9dff43898 Author: Chao Yu Date: Thu May 6 17:00:43 2021 +0800 f2fs: compress: fix to free compress page correctly In error path of f2fs_write_compressed_pages(), it needs to call f2fs_compress_free_page() to release temporary page. Fixes: 5e6bbde95982 ("f2fs: introduce mempool for {,de}compress intermediate page allocation") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a753103909a7e3d22147505d944da3d20759e1a5 Author: Jaegeuk Kim Date: Thu May 6 12:11:14 2021 -0700 f2fs: support iflag change given the mask In f2fs_fileattr_set(), if (!fa->flags_valid) mask &= FS_COMMON_FL; In this case, we can set supported flags by mask only instead of BUG_ON. /* Flags shared betwen flags/xflags */ (FS_SYNC_FL | FS_IMMUTABLE_FL | FS_APPEND_FL | \ FS_NODUMP_FL | FS_NOATIME_FL | FS_DAX_FL | \ FS_PROJINHERIT_FL) Fixes: 9b1bb01c8ae7 ("f2fs: convert to fileattr") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 349c4d6c75d74b62d8e39913b40bd06117b85e4a Author: Jaegeuk Kim Date: Sun May 9 21:53:03 2021 -0700 f2fs: avoid null pointer access when handling IPU error Unable to handle kernel NULL pointer dereference at virtual address 000000000000001a pc : f2fs_inplace_write_data+0x144/0x208 lr : f2fs_inplace_write_data+0x134/0x208 Call trace: f2fs_inplace_write_data+0x144/0x208 f2fs_do_write_data_page+0x270/0x770 f2fs_write_single_data_page+0x47c/0x830 __f2fs_write_data_pages+0x444/0x98c f2fs_write_data_pages.llvm.16514453770497736882+0x2c/0x38 do_writepages+0x58/0x118 __writeback_single_inode+0x44/0x300 writeback_sb_inodes+0x4b8/0x9c8 wb_writeback+0x148/0x42c wb_do_writeback+0xc8/0x390 wb_workfn+0xb0/0x2f4 process_one_work+0x1fc/0x444 worker_thread+0x268/0x4b4 kthread+0x13c/0x158 ret_from_fork+0x10/0x18 Fixes: 955772787667 ("f2fs: drop inplace IO if fs status is abnormal") Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 569c484f9995f489f2b80dd134269fe07d2b900d Author: Martin KaFai Lau Date: Fri May 7 17:50:11 2021 -0700 bpf: Limit static tcp-cc functions in the .BTF_ids list to x86 During the discussion in [0]. It was pointed out that static functions in ppc64 is prefixed with ".". For example, the 'readelf -s vmlinux.ppc': 89326: c000000001383280 24 NOTYPE LOCAL DEFAULT 31 cubictcp_init 89327: c000000000c97c50 168 FUNC LOCAL DEFAULT 2 .cubictcp_init The one with FUNC type is ".cubictcp_init" instead of "cubictcp_init". The "." seems to be done by arch/powerpc/include/asm/ppc_asm.h. This caused that pahole cannot generate the BTF for these tcp-cc kernel functions because pahole only captures the FUNC type and "cubictcp_init" is not. It then failed the kernel compilation in ppc64. This behavior is only reported in ppc64 so far. I tried arm64, s390, and sparc64 and did not observe this "." prefix and NOTYPE behavior. Since the kfunc call is only supported in the x86_64 and x86_32 JIT, this patch limits those tcp-cc functions to x86 only to avoid unnecessary compilation issue in other ARCHs. In the future, we can examine if it is better to change all those functions from static to extern. [0] https://lore.kernel.org/bpf/4e051459-8532-7b61-c815-f3435767f8a0@kernel.org/ Fixes: e78aea8b2170 ("bpf: tcp: Put some tcp cong functions in allowlist for bpf-tcp-cc") Signed-off-by: Martin KaFai Lau Signed-off-by: Daniel Borkmann Cc: Michal Suchánek Cc: Jiri Slaby Cc: Jiri Olsa Link: https://lore.kernel.org/bpf/20210508005011.3863757-1-kafai@fb.com commit 096eccdef0b32f47e9354231ddc3aaaf9527d51c Author: Jussi Maki Date: Wed May 5 08:59:25 2021 +0000 selftests/bpf: Rewrite test_tc_redirect.sh as prog_tests/tc_redirect.c As discussed in [0], this ports test_tc_redirect.sh to the test_progs framework and removes the old test. This makes it more in line with rest of the tests and makes it possible to run this test case with vmtest.sh and under the bpf CI. The upcoming skb_change_head() helper fix in [0] is depending on it and extending the test case to redirect a packet from L3 device to veth. [0] https://lore.kernel.org/bpf/20210427135550.807355-1-joamaki@gmail.com Signed-off-by: Jussi Maki Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210505085925.783985-1-joamaki@gmail.com commit 67e7ec0bd4535fc6e6d3f5d174f80e10a8a80c6e Author: Arnaldo Carvalho de Melo Date: Sat May 8 12:22:12 2021 -0300 libbpf: Provide GELF_ST_VISIBILITY() define for older libelf Where that macro isn't available. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/YJaspEh0qZr4LYOc@kernel.org commit e2d5b2bb769fa5f500760caba76436ba3a10a895 Author: Florent Revest Date: Tue May 11 10:10:54 2021 +0200 bpf: Fix nested bpf_bprintf_prepare with more per-cpu buffers The bpf_seq_printf, bpf_trace_printk and bpf_snprintf helpers share one per-cpu buffer that they use to store temporary data (arguments to bprintf). They "get" that buffer with try_get_fmt_tmp_buf and "put" it by the end of their scope with bpf_bprintf_cleanup. If one of these helpers gets called within the scope of one of these helpers, for example: a first bpf program gets called, uses bpf_trace_printk which calls raw_spin_lock_irqsave which is traced by another bpf program that calls bpf_snprintf, then the second "get" fails. Essentially, these helpers are not re-entrant. They would return -EBUSY and print a warning message once. This patch triples the number of bprintf buffers to allow three levels of nesting. This is very similar to what was done for tracepoints in "9594dc3c7e7 bpf: fix nested bpf tracepoints with per-cpu data" Fixes: d9c9e4db186a ("bpf: Factorize bpf_trace_printk and bpf_seq_printf") Reported-by: syzbot+63122d0bc347f18c1884@syzkaller.appspotmail.com Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210511081054.2125874-1-revest@chromium.org commit 35e3815fa8102fab4dee75f3547472c66581125d Author: Jiri Olsa Date: Thu Apr 29 13:47:12 2021 +0200 bpf: Add deny list of btf ids check for tracing programs The recursion check in __bpf_prog_enter and __bpf_prog_exit leaves some (not inlined) functions unprotected: In __bpf_prog_enter: - migrate_disable is called before prog->active is checked In __bpf_prog_exit: - migrate_enable,rcu_read_unlock_strict are called after prog->active is decreased When attaching trampoline to them we get panic like: traps: PANIC: double fault, error_code: 0x0 double fault: 0000 [#1] SMP PTI RIP: 0010:__bpf_prog_enter+0x4/0x50 ... Call Trace: bpf_trampoline_6442466513_0+0x18/0x1000 migrate_disable+0x5/0x50 __bpf_prog_enter+0x9/0x50 bpf_trampoline_6442466513_0+0x18/0x1000 migrate_disable+0x5/0x50 __bpf_prog_enter+0x9/0x50 bpf_trampoline_6442466513_0+0x18/0x1000 migrate_disable+0x5/0x50 __bpf_prog_enter+0x9/0x50 bpf_trampoline_6442466513_0+0x18/0x1000 migrate_disable+0x5/0x50 ... Fixing this by adding deny list of btf ids for tracing programs and checking btf id during program verification. Adding above functions to this list. Suggested-by: Alexei Starovoitov Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210429114712.43783-1-jolsa@kernel.org commit 08389d888287c3823f80b0216766b71e17f0aba5 Author: Daniel Borkmann Date: Tue May 11 22:35:17 2021 +0200 bpf: Add kconfig knob for disabling unpriv bpf by default Add a kconfig knob which allows for unprivileged bpf to be disabled by default. If set, the knob sets /proc/sys/kernel/unprivileged_bpf_disabled to value of 2. This still allows a transition of 2 -> {0,1} through an admin. Similarly, this also still keeps 1 -> {1} behavior intact, so that once set to permanently disabled, it cannot be undone aside from a reboot. We've also added extra2 with max of 2 for the procfs handler, so that an admin still has a chance to toggle between 0 <-> 2. Either way, as an additional alternative, applications can make use of CAP_BPF that we added a while ago. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/74ec548079189e4e4dffaeb42b8987bb3c852eee.1620765074.git.daniel@iogearbox.net commit b24abcff918a5cbf44b0c982bd3477a93e8e4911 Author: Daniel Borkmann Date: Tue May 11 22:35:16 2021 +0200 bpf, kconfig: Add consolidated menu entry for bpf with core options Right now, all core BPF related options are scattered in different Kconfig locations mainly due to historic reasons. Moving forward, lets add a proper subsystem entry under ... General setup ---> BPF subsystem ---> ... in order to have all knobs in a single location and thus ease BPF related configuration. Networking related bits such as sockmap are out of scope for the general setup and therefore better suited to remain in net/Kconfig. Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/f23f58765a4d59244ebd8037da7b6a6b2fb58446.1620765074.git.daniel@iogearbox.net commit 67f29896fdc83298eed5a6576ff8f9873f709228 Author: Leon Romanovsky Date: Tue May 11 10:26:03 2021 +0300 RDMA/rxe: Clear all QP fields if creation failed rxe_qp_do_cleanup() relies on valid pointer values in QP for the properly created ones, but in case rxe_qp_from_init() failed it was filled with garbage and caused tot the following error. refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 12560 at lib/refcount.c:28 refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28 Modules linked in: CPU: 1 PID: 12560 Comm: syz-executor.4 Not tainted 5.12.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:refcount_warn_saturate+0x1d1/0x1e0 lib/refcount.c:28 Code: e9 db fe ff ff 48 89 df e8 2c c2 ea fd e9 8a fe ff ff e8 72 6a a7 fd 48 c7 c7 e0 b2 c1 89 c6 05 dc 3a e6 09 01 e8 ee 74 fb 04 <0f> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55 RSP: 0018:ffffc900097ceba8 EFLAGS: 00010286 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000040000 RSI: ffffffff815bb075 RDI: fffff520012f9d67 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815b4eae R11: 0000000000000000 R12: ffff8880322a4800 R13: ffff8880322a4940 R14: ffff888033044e00 R15: 0000000000000000 FS: 00007f6eb2be3700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fdbe5d41000 CR3: 000000001d181000 CR4: 00000000001506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] kref_put include/linux/kref.h:64 [inline] rxe_qp_do_cleanup+0x96f/0xaf0 drivers/infiniband/sw/rxe/rxe_qp.c:805 execute_in_process_context+0x37/0x150 kernel/workqueue.c:3327 rxe_elem_release+0x9f/0x180 drivers/infiniband/sw/rxe/rxe_pool.c:391 kref_put include/linux/kref.h:65 [inline] rxe_create_qp+0x2cd/0x310 drivers/infiniband/sw/rxe/rxe_verbs.c:425 _ib_create_qp drivers/infiniband/core/core_priv.h:331 [inline] ib_create_named_qp+0x2ad/0x1370 drivers/infiniband/core/verbs.c:1231 ib_create_qp include/rdma/ib_verbs.h:3644 [inline] create_mad_qp+0x177/0x2d0 drivers/infiniband/core/mad.c:2920 ib_mad_port_open drivers/infiniband/core/mad.c:3001 [inline] ib_mad_init_device+0xd6f/0x1400 drivers/infiniband/core/mad.c:3092 add_client_context+0x405/0x5e0 drivers/infiniband/core/device.c:717 enable_device_and_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331 ib_register_device drivers/infiniband/core/device.c:1413 [inline] ib_register_device+0x7c7/0xa50 drivers/infiniband/core/device.c:1365 rxe_register_device+0x3d5/0x4a0 drivers/infiniband/sw/rxe/rxe_verbs.c:1147 rxe_add+0x12fe/0x16d0 drivers/infiniband/sw/rxe/rxe.c:247 rxe_net_add+0x8c/0xe0 drivers/infiniband/sw/rxe/rxe_net.c:503 rxe_newlink drivers/infiniband/sw/rxe/rxe.c:269 [inline] rxe_newlink+0xb7/0xe0 drivers/infiniband/sw/rxe/rxe.c:250 nldev_newlink+0x30e/0x550 drivers/infiniband/core/nldev.c:1555 rdma_nl_rcv_msg+0x36d/0x690 drivers/infiniband/core/netlink.c:195 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x2ee/0x430 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 8700e3e7c485 ("Soft RoCE driver") Link: https://lore.kernel.org/r/7bf8d548764d406dbbbaf4b574960ebfd5af8387.1620717918.git.leonro@nvidia.com Reported-by: syzbot+36a7f280de4e11c6f04e@syzkaller.appspotmail.com Signed-off-by: Leon Romanovsky Reviewed-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 0bd50826a40e012a35c58ed3576b3873643e7a7d Author: Wan Jiabing Date: Thu May 6 15:08:24 2021 +0800 leds: Fix reference file name of documentation In commit 56b01acc1c79a ("dt-bindings: gpio: fairchild,74hc595: Convert to json-schema"), gpio-74x164.txt was deleted and replaced by fairchild,74hc595.yaml. Fix the reference file name. Signed-off-by: Wan Jiabing Acked-by: Pavel Machek Link: https://lore.kernel.org/r/20210506070824.10965-1-wanjiabing@vivo.com Signed-off-by: Rob Herring commit e09784a8a751e539dffc94d43bc917b0ac1e934a Author: Alexandre Belloni Date: Tue May 11 03:45:16 2021 +0200 alarmtimer: Check RTC features instead of ops RTC drivers used to leave .set_alarm() NULL in order to signal the RTC device doesn't support alarms. The drivers are now clearing the RTC_FEATURE_ALARM bit for that purpose in order to keep the rtc_class_ops structure const. So now, .set_alarm() is set unconditionally and this possibly causes the alarmtimer code to select an RTC device that doesn't support alarms. Test RTC_FEATURE_ALARM instead of relying on ops->set_alarm to determine whether alarms are available. Fixes: 7ae41220ef58 ("rtc: introduce features bitfield") Signed-off-by: Alexandre Belloni Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210511014516.563031-1-alexandre.belloni@bootlin.com commit 875d598db60ac81e768fdfd2c589f6209038488b Author: Daniel Vetter Date: Tue May 11 18:34:13 2021 +0200 MAINTAINERS: Update address for Emma Anholt Reviewed-by: Emma Anholt Signed-off-by: Daniel Vetter commit 210f563b097997ce917e82feab356b298bfd12b0 Author: Sriram R Date: Tue May 11 20:02:59 2021 +0200 ath11k: Drop multicast fragments Fragmentation is used only with unicast frames. Drop multicast fragments to avoid any undesired behavior. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01734-QCAHKSWPL_SILICONZ-1 v2 Cc: stable@vger.kernel.org Signed-off-by: Sriram R Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.1d53bfd20a8b.Ibb63283051bb5e2c45951932c6e1f351d5a73dc3@changeid Signed-off-by: Johannes Berg commit c3944a5621026c176001493d48ee66ff94e1a39a Author: Sriram R Date: Tue May 11 20:02:58 2021 +0200 ath11k: Clear the fragment cache during key install Currently the fragment cache setup during peer assoc is cleared only during peer delete. In case a key reinstallation happens with the same peer, the same fragment cache with old fragments added before key installation could be clubbed with fragments received after. This might be exploited to mix fragments of different data resulting in a proper unintended reassembled packet to be passed up the stack. Hence flush the fragment cache on every key installation to prevent potential attacks (CVE-2020-24587). Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01734-QCAHKSWPL_SILICONZ-1 v2 Cc: stable@vger.kernel.org Signed-off-by: Sriram R Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.218dc777836f.I9af6fc76215a35936c4152552018afb5079c5d8c@changeid Signed-off-by: Johannes Berg commit eaf8df8f390897ca79f23c977d844ad93ffd66b7 Merge: 0fad605fb0bdc 582f3503f9654 Author: Mark Brown Date: Tue May 11 19:16:13 2021 +0100 Merge series "ASoC: simple-card / audio-graph re-cleanup" from Kuninori Morimoto : Hi Mark, Guillaume I'm so sorry to bother you again and again. These are v2 of simple-card / audio-graph re-cleanup. KernelCI had reported that below patches broke kontron-sl28-var3-ads2 sound card probing. 434392271afcff350fe "ASoC: simple-card: add simple_link_init()" 59c35c44a9cf89a83a9 "ASoC: simple-card: add simple_parse_node()" Main issue I'm understanding is name create timing. We want to create dailink->name via dlc->dai_name. But in CPU case, this dai_name might be removed by asoc_simple_canonicalize_cpu() if it CPU was single DAI. Thus, we need to A) get dlc->dai_name B) create dailink->name via dlc->dai_name C) call asoc_simple_canonicalize_cpu() Above reverted patch did A->C->B. My previous v1 patch did B->A->C. I'm so sorry that I didn't deep test on v1. I hope v2 patches has no issues on kontron-sl28-var3-ads2. Link: https://lore.kernel.org/r/87cztzcq56.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87h7k0i437.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/20210423175318.13990-1-broonie@kernel.org Link: https://lore.kernel.org/r/3ca62063-41b4-c25b-a7bc-8a8160e7b684@collabora.com Kuninori Morimoto (4): ASoC: simple-card: add simple_parse_node() ASoC: simple-card: add simple_link_init() ASoC: audio-graph: tidyup graph_dai_link_of_dpcm() ASoC: audio-graph: tidyup graph_parse_node() sound/soc/generic/audio-graph-card.c | 57 ++++----- sound/soc/generic/simple-card.c | 168 +++++++++++++-------------- 2 files changed, 112 insertions(+), 113 deletions(-) -- 2.25.1 commit 62a8ff67eba52dae9b107e1fb8827054ed00a265 Author: Sriram R Date: Tue May 11 20:02:57 2021 +0200 ath10k: Validate first subframe of A-MSDU before processing the list In certain scenarios a normal MSDU can be received as an A-MSDU when the A-MSDU present bit of a QoS header gets flipped during reception. Since this bit is unauthenticated, the hardware crypto engine can pass the frame to the driver without any error indication. This could result in processing unintended subframes collected in the A-MSDU list. Hence, validate A-MSDU list by checking if the first frame has a valid subframe header. Comparing the non-aggregated MSDU and an A-MSDU, the fields of the first subframe DA matches the LLC/SNAP header fields of a normal MSDU. In order to avoid processing such frames, add a validation to filter such A-MSDU frames where the first subframe header DA matches with the LLC/SNAP header pattern. Tested-on: QCA9984 hw1.0 PCI 10.4-3.10-00047 Cc: stable@vger.kernel.org Signed-off-by: Sriram R Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.e6f5eb7b9847.I38a77ae26096862527a5eab73caebd7346af8b66@changeid Signed-off-by: Johannes Berg commit 0dc267b13f3a7e8424a898815dd357211b737330 Author: Wen Gong Date: Tue May 11 20:02:56 2021 +0200 ath10k: Fix TKIP Michael MIC verification for PCIe TKIP Michael MIC was not verified properly for PCIe cases since the validation steps in ieee80211_rx_h_michael_mic_verify() in mac80211 did not get fully executed due to unexpected flag values in ieee80211_rx_status. Fix this by setting the flags property to meet mac80211 expectations for performing Michael MIC validation there. This fixes CVE-2020-26141. It does the same as ath10k_htt_rx_proc_rx_ind_hl() for SDIO which passed MIC verification case. This applies only to QCA6174/QCA9377 PCIe. Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Cc: stable@vger.kernel.org Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.c3f1d42c6746.I795593fcaae941c471425b8c7d5f7bb185d29142@changeid Signed-off-by: Johannes Berg commit 079a108feba474b4b32bd3471db03e11f2f83b81 Author: Wen Gong Date: Tue May 11 20:02:55 2021 +0200 ath10k: drop MPDU which has discard flag set by firmware for SDIO When the discard flag is set by the firmware for an MPDU, it should be dropped. This allows a mitigation for CVE-2020-24588 to be implemented in the firmware. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Cc: stable@vger.kernel.org Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.11968c725b5c.Idd166365ebea2771c0c0a38c78b5060750f90e17@changeid Signed-off-by: Johannes Berg commit 40e7462dad6f3d06efdb17d26539e61ab6e34db1 Author: Wen Gong Date: Tue May 11 20:02:54 2021 +0200 ath10k: drop fragments with multicast DA for SDIO Fragmentation is not used with multicast frames. Discard unexpected fragments with multicast DA. This fixes CVE-2020-26145. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Cc: stable@vger.kernel.org Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.9ca6ca7945a9.I1e18b514590af17c155bda86699bc3a971a8dcf4@changeid Signed-off-by: Johannes Berg commit 65c415a144ad8132b6a6d97d4a1919ffc728e2d1 Author: Wen Gong Date: Tue May 11 20:02:53 2021 +0200 ath10k: drop fragments with multicast DA for PCIe Fragmentation is not used with multicast frames. Discard unexpected fragments with multicast DA. This fixes CVE-2020-26145. Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Cc: stable@vger.kernel.org Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.5a0bd289bda8.Idd6ebea20038fb1cfee6de924aa595e5647c9eae@changeid Signed-off-by: Johannes Berg commit a1166b2653db2f3de7338b9fb8a0f6e924b904ee Author: Wen Gong Date: Tue May 11 20:02:52 2021 +0200 ath10k: add CCMP PN replay protection for fragmented frames for PCIe PN replay check for not fragmented frames is finished in the firmware, but this was not done for fragmented frames when ath10k is used with QCA6174/QCA6377 PCIe. mac80211 has the function ieee80211_rx_h_defragment() for PN replay check for fragmented frames, but this does not get checked with QCA6174 due to the ieee80211_has_protected() condition not matching the cleared Protected bit case. Validate the PN of received fragmented frames within ath10k when CCMP is used and drop the fragment if the PN is not correct (incremented by exactly one from the previous fragment). This applies only for QCA6174/QCA6377 PCIe. Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Cc: stable@vger.kernel.org Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.9ba2664866a4.I756e47b67e210dba69966d989c4711ffc02dc6bc@changeid Signed-off-by: Johannes Berg commit 3edc6b0d6c061a70d8ca3c3c72eb1f58ce29bfb1 Author: Wen Gong Date: Tue May 11 20:02:51 2021 +0200 mac80211: extend protection against mixed key and fragment cache attacks For some chips/drivers, e.g., QCA6174 with ath10k, the decryption is done by the hardware, and the Protected bit in the Frame Control field is cleared in the lower level driver before the frame is passed to mac80211. In such cases, the condition for ieee80211_has_protected() is not met in ieee80211_rx_h_defragment() of mac80211 and the new security validation steps are not executed. Extend mac80211 to cover the case where the Protected bit has been cleared, but the frame is indicated as having been decrypted by the hardware. This extends protection against mixed key and fragment cache attack for additional drivers/chips. This fixes CVE-2020-24586 and CVE-2020-24587 for such cases. Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00110-QCARMSWP-1 Cc: stable@vger.kernel.org Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.037aa5ca0390.I7bb888e2965a0db02a67075fcb5deb50eb7408aa@changeid Signed-off-by: Johannes Berg commit a8c4d76a8dd4fb9666fc8919a703d85fb8f44ed8 Author: Johannes Berg Date: Tue May 11 20:02:50 2021 +0200 mac80211: do not accept/forward invalid EAPOL frames EAPOL frames are used for authentication and key management between the AP and each individual STA associated in the BSS. Those frames are not supposed to be sent by one associated STA to another associated STA (either unicast for broadcast/multicast). Similarly, in 802.11 they're supposed to be sent to the authenticator (AP) address. Since it is possible for unexpected EAPOL frames to result in misbehavior in supplicant implementations, it is better for the AP to not allow such cases to be forwarded to other clients either directly, or indirectly if the AP interface is part of a bridge. Accept EAPOL (control port) frames only if they're transmitted to the own address, or, due to interoperability concerns, to the PAE group address. Disable forwarding of EAPOL (or well, the configured control port protocol) frames back to wireless medium in all cases. Previously, these frames were accepted from fully authenticated and authorized stations and also from unauthenticated stations for one of the cases. Additionally, to avoid forwarding by the bridge, rewrite the PAE group address case to the local MAC address. Cc: stable@vger.kernel.org Co-developed-by: Jouni Malinen Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.cb327ed0cabe.Ib7dcffa2a31f0913d660de65ba3c8aca75b1d10f@changeid Signed-off-by: Johannes Berg commit 7e44a0b597f04e67eee8cdcbe7ee706c6f5de38b Author: Johannes Berg Date: Tue May 11 20:02:49 2021 +0200 mac80211: prevent attacks on TKIP/WEP as well Similar to the issues fixed in previous patches, TKIP and WEP should be protected even if for TKIP we have the Michael MIC protecting it, and WEP is broken anyway. However, this also somewhat protects potential other algorithms that drivers might implement. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210511200110.430e8c202313.Ia37e4e5b6b3eaab1a5ae050e015f6c92859dbe27@changeid Signed-off-by: Johannes Berg commit bf30ca922a0c0176007e074b0acc77ed345e9990 Author: Johannes Berg Date: Tue May 11 20:02:48 2021 +0200 mac80211: check defrag PN against current frame As pointed out by Mathy Vanhoef, we implement the RX PN check on fragmented frames incorrectly - we check against the last received PN prior to the new frame, rather than to the one in this frame itself. Prior patches addressed the security issue here, but in order to be able to reason better about the code, fix it to really compare against the current frame's PN, not the last stored one. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210511200110.bfbc340ff071.Id0b690e581da7d03d76df90bb0e3fd55930bc8a0@changeid Signed-off-by: Johannes Berg commit 3a11ce08c45b50d69c891d71760b7c5b92074709 Author: Johannes Berg Date: Tue May 11 20:02:47 2021 +0200 mac80211: add fragment cache to sta_info Prior patches protected against fragmentation cache attacks by coloring keys, but this shows that it can lead to issues when multiple stations use the same sequence number. Add a fragment cache to struct sta_info (in addition to the one in the interface) to separate fragments for different stations properly. This then automatically clear most of the fragment cache when a station disconnects (or reassociates) from an AP, or when client interfaces disconnect from the network, etc. On the way, also fix the comment there since this brings us in line with the recommendation in 802.11-2016 ("An AP should support ..."). Additionally, remove a useless condition (since there's no problem purging an already empty list). Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210511200110.fc35046b0d52.I1ef101e3784d13e8f6600d83de7ec9a3a45bcd52@changeid Signed-off-by: Johannes Berg commit 270032a2a9c4535799736142e1e7c413ca7b836e Author: Johannes Berg Date: Tue May 11 20:02:46 2021 +0200 mac80211: drop A-MSDUs on old ciphers With old ciphers (WEP and TKIP) we shouldn't be using A-MSDUs since A-MSDUs are only supported if we know that they are, and the only practical way for that is HT support which doesn't support old ciphers. However, we would normally accept them anyway. Since we check the MMIC before deaggregating A-MSDUs, and the A-MSDU bit in the QoS header is not protected in TKIP (or WEP), this enables attacks similar to CVE-2020-24588. To prevent that, drop A-MSDUs completely with old ciphers. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210511200110.076543300172.I548e6e71f1ee9cad4b9a37bf212ae7db723587aa@changeid Signed-off-by: Johannes Berg commit 2b8a1fee3488c602aca8bea004a087e60806a5cf Author: Mathy Vanhoef Date: Tue May 11 20:02:45 2021 +0200 cfg80211: mitigate A-MSDU aggregation attacks Mitigate A-MSDU injection attacks (CVE-2020-24588) by detecting if the destination address of a subframe equals an RFC1042 (i.e., LLC/SNAP) header, and if so dropping the complete A-MSDU frame. This mitigates known attacks, although new (unknown) aggregation-based attacks may remain possible. This defense works because in A-MSDU aggregation injection attacks, a normal encrypted Wi-Fi frame is turned into an A-MSDU frame. This means the first 6 bytes of the first A-MSDU subframe correspond to an RFC1042 header. In other words, the destination MAC address of the first A-MSDU subframe contains the start of an RFC1042 header during an aggregation attack. We can detect this and thereby prevent this specific attack. For details, see Section 7.2 of "Fragment and Forge: Breaking Wi-Fi Through Frame Aggregation and Fragmentation". Note that for kernel 4.9 and above this patch depends on "mac80211: properly handle A-MSDUs that start with a rfc1042 header". Otherwise this patch has no impact and attacks will remain possible. Cc: stable@vger.kernel.org Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20210511200110.25d93176ddaf.I9e265b597f2cd23eb44573f35b625947b386a9de@changeid Signed-off-by: Johannes Berg commit a1d5ff5651ea592c67054233b14b30bf4452999c Author: Mathy Vanhoef Date: Tue May 11 20:02:44 2021 +0200 mac80211: properly handle A-MSDUs that start with an RFC 1042 header Properly parse A-MSDUs whose first 6 bytes happen to equal a rfc1042 header. This can occur in practice when the destination MAC address equals AA:AA:03:00:00:00. More importantly, this simplifies the next patch to mitigate A-MSDU injection attacks. Cc: stable@vger.kernel.org Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20210511200110.0b2b886492f0.I23dd5d685fe16d3b0ec8106e8f01b59f499dffed@changeid Signed-off-by: Johannes Berg commit 94034c40ab4a3fcf581fbc7f8fdf4e29943c4a24 Author: Mathy Vanhoef Date: Tue May 11 20:02:43 2021 +0200 mac80211: prevent mixed key and fragment cache attacks Simultaneously prevent mixed key attacks (CVE-2020-24587) and fragment cache attacks (CVE-2020-24586). This is accomplished by assigning a unique color to every key (per interface) and using this to track which key was used to decrypt a fragment. When reassembling frames, it is now checked whether all fragments were decrypted using the same key. To assure that fragment cache attacks are also prevented, the ID that is assigned to keys is unique even over (re)associations and (re)connects. This means fragments separated by a (re)association or (re)connect will not be reassembled. Because mac80211 now also prevents the reassembly of mixed encrypted and plaintext fragments, all cache attacks are prevented. Cc: stable@vger.kernel.org Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20210511200110.3f8290e59823.I622a67769ed39257327a362cfc09c812320eb979@changeid Signed-off-by: Johannes Berg commit 965a7d72e798eb7af0aa67210e37cf7ecd1c9cad Author: Mathy Vanhoef Date: Tue May 11 20:02:42 2021 +0200 mac80211: assure all fragments are encrypted Do not mix plaintext and encrypted fragments in protected Wi-Fi networks. This fixes CVE-2020-26147. Previously, an attacker was able to first forward a legitimate encrypted fragment towards a victim, followed by a plaintext fragment. The encrypted and plaintext fragment would then be reassembled. For further details see Section 6.3 and Appendix D in the paper "Fragment and Forge: Breaking Wi-Fi Through Frame Aggregation and Fragmentation". Because of this change there are now two equivalent conditions in the code to determine if a received fragment requires sequential PNs, so we also move this test to a separate function to make the code easier to maintain. Cc: stable@vger.kernel.org Signed-off-by: Mathy Vanhoef Link: https://lore.kernel.org/r/20210511200110.30c4394bb835.I5acfdb552cc1d20c339c262315950b3eac491397@changeid Signed-off-by: Johannes Berg commit 7240cd200541543008a7ce4fcaf2ba5a5556128f Author: Desmond Cheong Zhi Xi Date: Tue May 11 09:49:37 2021 -0400 Remove link to nonexistent rocket driver docs The rocket driver and documentation were removed in this commit, but the corresponding entry in index.rst was not removed. Signed-off-by: Desmond Cheong Zhi Xi Fixes: 3b00b6af7a5b ("tty: rocket, remove the driver") Link: https://lore.kernel.org/r/20210511134937.2442291-1-desmondcheongzx@gmail.com Signed-off-by: Jonathan Corbet commit 5e716ec68b4a75a84e28c0efa68db613deb64981 Author: Mauro Carvalho Chehab Date: Tue May 11 17:01:32 2021 +0200 docs: networking: device_drivers: fix bad usage of UTF-8 chars Probably because the original file was pre-processed by some tool, both i40e.rst and iavf.rst files are using this character: - U+2013 ('–'): EN DASH meaning an hyphen when calling a command line application, which is obviously wrong. So, replace them by an hyphen, ensuring that it will be properly displayed as literals when building the documentation. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/95eb2a48d0ca3528780ce0dfce64359977fa8cb3.1620744606.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit d1f2722d5357d7a5138b1be8bd64946f0a14c81e Author: Mauro Carvalho Chehab Date: Tue May 11 17:01:31 2021 +0200 docs: hwmon: tmp103.rst: fix bad usage of UTF-8 chars While UTF-8 characters can be used at the Linux documentation, the best is to use them only when ASCII doesn't offer a good replacement. So, replace the occurences of the following UTF-8 characters: - U+2013 ('–'): EN DASH In this specific case, EN DASH was used instead of a minus sign. So, replace it by a single hyphen. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/73b3c7c1eef5c12ddc941624d23689313bd56529.1620744606.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 6f3bceba03b4f18e0b83261e2fb761e0ad5da625 Author: Mauro Carvalho Chehab Date: Tue May 11 17:01:30 2021 +0200 docs: ABI: remove some spurious characters The KernelVersion tag contains some spurious UTF-8 characters for no reason. Drop them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6d774ad6cb3795a177309503a39f8f1b5e309d64.1620744606.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 8d3926c09e043448d4d26896b8225943f12d0933 Author: Mauro Carvalho Chehab Date: Tue May 11 17:01:29 2021 +0200 docs: ABI: remove a meaningless UTF-8 character Those two files have this character: - U+00ac ('¬'): NOT SIGN at the end of the first line, apparently for no reason. Drop them. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6cd3f0b47568fecb7889fd18d1d744c3aaf73866.1620744606.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 918d9c77791cc8267b5b5ab556c868dfa57e0d93 Author: Mauro Carvalho Chehab Date: Tue May 11 17:01:28 2021 +0200 docs: cdrom-standard.rst: get rid of uneeded UTF-8 chars This file was converted from a LaTeX one. The conversion used some UTF-8 characters at the literal blocks. Replace them by normal ASCII characters. Signed-off-by: Mauro Carvalho Chehab Acked-by: Jens Axboe Link: https://lore.kernel.org/r/79c3f482da17ea48d69b6e6ad1b7fb102b9dd7bf.1620744606.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 88b06399c9c766c283e070b022b5ceafa4f63f19 Merge: 1140ab592e2eb 9b8a233bc294d Author: Linus Torvalds Date: Tue May 11 09:43:16 2021 -0700 Merge tag 'for-5.13-rc1-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fix from David Sterba: "Handle transaction start error in btrfs_fileattr_set() This is fix for code introduced by the new fileattr merge" * tag 'for-5.13-rc1-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: handle transaction start error in btrfs_fileattr_set commit 7a4ffd20ec6d31dfde2cc5608851e5109ffed7c9 Author: Chaitanya Kulkarni Date: Mon May 10 12:15:38 2021 -0700 nvmet: demote fabrics cmd parse err msg to debug Host can send invalid commands and flood the target with error messages. Demote the error message from pr_err() to pr_debug() in nvmet_parse_fabrics_cmd() and nvmet_parse_connect_cmd(). Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 4c2dab2bf5ace0ddc07ca7f04a7ba32fc3b23492 Author: Chaitanya Kulkarni Date: Mon May 10 12:15:37 2021 -0700 nvmet: use helper to remove the duplicate code Use the helper nvmet_report_invalid_opcode() to report invalid opcode so we can remove the duplicate code. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 3651aaacd10b2f8cee3780c490fc2df55bd4f543 Author: Chaitanya Kulkarni Date: Mon May 10 12:15:36 2021 -0700 nvmet: demote discovery cmd parse err msg to debug Host can send invalid commands and flood the target with error messages for the discovery controller. Demote the error message from pr_err() to pr_debug( in nvmet_parse_discovery_cmd().  Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 8cc365f9559b86802afc0208389f5c8d46b4ad61 Author: Michal Kalderon Date: Thu May 6 10:08:19 2021 +0300 nvmet-rdma: Fix NULL deref when SEND is completed with error When running some traffic and taking down the link on peer, a retry counter exceeded error is received. This leads to nvmet_rdma_error_comp which tried accessing the cq_context to obtain the queue. The cq_context is no longer valid after the fix to use shared CQ mechanism and should be obtained similar to how it is obtained in other functions from the wc->qp. [ 905.786331] nvmet_rdma: SEND for CQE 0x00000000e3337f90 failed with status transport retry counter exceeded (12). [ 905.832048] BUG: unable to handle kernel NULL pointer dereference at 0000000000000048 [ 905.839919] PGD 0 P4D 0 [ 905.842464] Oops: 0000 1 SMP NOPTI [ 905.846144] CPU: 13 PID: 1557 Comm: kworker/13:1H Kdump: loaded Tainted: G OE --------- - - 4.18.0-304.el8.x86_64 #1 [ 905.872135] RIP: 0010:nvmet_rdma_error_comp+0x5/0x1b [nvmet_rdma] [ 905.878259] Code: 19 4f c0 e8 89 b3 a5 f6 e9 5b e0 ff ff 0f b7 75 14 4c 89 ea 48 c7 c7 08 1a 4f c0 e8 71 b3 a5 f6 e9 4b e0 ff ff 0f 1f 44 00 00 <48> 8b 47 48 48 85 c0 74 08 48 89 c7 e9 98 bf 49 00 e9 c3 e3 ff ff [ 905.897135] RSP: 0018:ffffab601c45fe28 EFLAGS: 00010246 [ 905.902387] RAX: 0000000000000065 RBX: ffff9e729ea2f800 RCX: 0000000000000000 [ 905.909558] RDX: 0000000000000000 RSI: ffff9e72df9567c8 RDI: 0000000000000000 [ 905.916731] RBP: ffff9e729ea2b400 R08: 000000000000074d R09: 0000000000000074 [ 905.923903] R10: 0000000000000000 R11: ffffab601c45fcc0 R12: 0000000000000010 [ 905.931074] R13: 0000000000000000 R14: 0000000000000010 R15: ffff9e729ea2f400 [ 905.938247] FS: 0000000000000000(0000) GS:ffff9e72df940000(0000) knlGS:0000000000000000 [ 905.938249] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 905.950067] nvmet_rdma: SEND for CQE 0x00000000c7356cca failed with status transport retry counter exceeded (12). [ 905.961855] CR2: 0000000000000048 CR3: 000000678d010004 CR4: 00000000007706e0 [ 905.961855] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 905.961856] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 905.961857] PKRU: 55555554 [ 906.010315] Call Trace: [ 906.012778] __ib_process_cq+0x89/0x170 [ib_core] [ 906.017509] ib_cq_poll_work+0x26/0x80 [ib_core] [ 906.022152] process_one_work+0x1a7/0x360 [ 906.026182] ? create_worker+0x1a0/0x1a0 [ 906.030123] worker_thread+0x30/0x390 [ 906.033802] ? create_worker+0x1a0/0x1a0 [ 906.037744] kthread+0x116/0x130 [ 906.040988] ? kthread_flush_work_fn+0x10/0x10 [ 906.045456] ret_from_fork+0x1f/0x40 Fixes: ca0f1a8055be2 ("nvmet-rdma: use new shared CQ mechanism") Signed-off-by: Shai Malin Signed-off-by: Michal Kalderon Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit ab96de5def854d8fc51280b6a20597e64b14ac31 Author: Chaitanya Kulkarni Date: Thu May 6 18:51:36 2021 -0700 nvmet: fix inline bio check for passthru When handling passthru commands, for inline bio allocation we only consider the transfer size. This works well when req->sg_cnt fits into the req->inline_bvec, but it will result in the early return from bio_add_hw_page() when req->sg_cnt > NVMET_MAX_INLINE_BVEC. Consider an I/O of size 32768 and first buffer is not aligned to the page boundary, then I/O is split in following manner :- [ 2206.256140] nvmet: sg->length 3440 sg->offset 656 [ 2206.256144] nvmet: sg->length 4096 sg->offset 0 [ 2206.256148] nvmet: sg->length 4096 sg->offset 0 [ 2206.256152] nvmet: sg->length 4096 sg->offset 0 [ 2206.256155] nvmet: sg->length 4096 sg->offset 0 [ 2206.256159] nvmet: sg->length 4096 sg->offset 0 [ 2206.256163] nvmet: sg->length 4096 sg->offset 0 [ 2206.256166] nvmet: sg->length 4096 sg->offset 0 [ 2206.256170] nvmet: sg->length 656 sg->offset 0 Now the req->transfer_size == NVMET_MAX_INLINE_DATA_LEN i.e. 32768, but the req->sg_cnt is (9) > NVMET_MAX_INLINE_BIOVEC which is (8). This will result in early return in the following code path :- nvmet_bdev_execute_rw() bio_add_pc_page() bio_add_hw_page() if (bio_full(bio, len)) return 0; Use previously introduced helper nvmet_use_inline_bvec() to consider req->sg_cnt when using inline bio. This only affects nvme-loop transport. Fixes: dab3902b19a0 ("nvmet: use inline bio for passthru fast path") Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 608a969046e6e0567d05a166be66c77d2dd8220b Author: Chaitanya Kulkarni Date: Thu May 6 18:51:35 2021 -0700 nvmet: fix inline bio check for bdev-ns When handling rw commands, for inline bio case we only consider transfer size. This works well when req->sg_cnt fits into the req->inline_bvec, but it will result in the warning in __bio_add_page() when req->sg_cnt > NVMET_MAX_INLINE_BVEC. Consider an I/O size 32768 and first page is not aligned to the page boundary, then I/O is split in following manner :- [ 2206.256140] nvmet: sg->length 3440 sg->offset 656 [ 2206.256144] nvmet: sg->length 4096 sg->offset 0 [ 2206.256148] nvmet: sg->length 4096 sg->offset 0 [ 2206.256152] nvmet: sg->length 4096 sg->offset 0 [ 2206.256155] nvmet: sg->length 4096 sg->offset 0 [ 2206.256159] nvmet: sg->length 4096 sg->offset 0 [ 2206.256163] nvmet: sg->length 4096 sg->offset 0 [ 2206.256166] nvmet: sg->length 4096 sg->offset 0 [ 2206.256170] nvmet: sg->length 656 sg->offset 0 Now the req->transfer_size == NVMET_MAX_INLINE_DATA_LEN i.e. 32768, but the req->sg_cnt is (9) > NVMET_MAX_INLINE_BIOVEC which is (8). This will result in the following warning message :- nvmet_bdev_execute_rw() bio_add_page() __bio_add_page() WARN_ON_ONCE(bio_full(bio, len)); This scenario is very hard to reproduce on the nvme-loop transport only with rw commands issued with the passthru IOCTL interface from the host application and the data buffer is allocated with the malloc() and not the posix_memalign(). Fixes: 73383adfad24 ("nvmet: don't split large I/Os unconditionally") Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 5e1f689913a4498e3081093670ef9d85b2c60920 Author: Christoph Hellwig Date: Thu Apr 29 14:18:53 2021 +0200 nvme-multipath: fix double initialization of ANA state nvme_init_identify and thus nvme_mpath_init can be called multiple times and thus must not overwrite potentially initialized or in-use fields. Split out a helper for the basic initialization when the controller is initialized and make sure the init_identify path does not blindly change in-use data structures. Fixes: 0d0b660f214d ("nvme: add ANA support") Reported-by: Martin Wilck Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Reviewed-by: Hannes Reinecke commit 2ee4c8a268764e751ee44dfffa76c813cfc27aee Author: Lorenzo Pieralisi Date: Tue May 11 16:00:03 2021 +0100 MAINTAINERS: Add Krzysztof as PCI host/endpoint controllers reviewer Krzysztof has been carrying out PCI patches review for a long time and he has been instrumental in driving PCI host/endpoint controller drivers improvements. Make his role official. Link: https://lore.kernel.org/r/20210511150003.1592-1-lorenzo.pieralisi@arm.com Signed-off-by: Lorenzo Pieralisi Signed-off-by: Bjorn Helgaas Cc: Kishon Vijay Abraham I Cc: Krzysztof Wilczyński commit 0fad605fb0bdc00d8ad78696300ff2fbdee6e048 Author: Richard Fitzgerald Date: Tue May 11 14:28:55 2021 +0100 ASoC: cs42l42: Regmap must use_single_read/write cs42l42 does not support standard burst transfers so the use_single_read and use_single_write flags must be set in the regmap config. Because of this bug, the patch: commit 0a0eb567e1d4 ("ASoC: cs42l42: Minor error paths fixups") broke cs42l42 probe() because without the use_single_* flags it causes regmap to issue a burst read. However, the missing use_single_* could cause problems anyway because the regmap cache can attempt burst transfers if these flags are not set. Fixes: 2c394ca79604 ("ASoC: Add support for CS42L42 codec") Signed-off-by: Richard Fitzgerald Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210511132855.27159-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown commit 582f3503f96543f3afbaaaa085755fd167a0f71e Author: Kuninori Morimoto Date: Tue May 11 10:18:48 2021 +0900 ASoC: audio-graph: tidyup graph_parse_node() audio-graph is using cpus->dai_name / codecs->dai_name for dailink->name. In graph_parse_node(), xxx->dai_name is got by snd_soc_get_dai_name(), but it might be removed soon by asoc_simple_canonicalize_cpu(). The order should be *1) call snd_soc_get_dai_name() 2) create dailink name *3) call asoc_simple_canonicalize_cpu() * are implemented in graph_parse_node(). This patch remove 3) from graph_parse_node() Reported-by: "kernelci.org bot" Fixes: 8859f809c7d5813 ("ASoC: audio-graph: add graph_parse_node()") Fixes: e51237b8d305225 ("ASoC: audio-graph: add graph_link_init()") Signed-off-by: Kuninori Morimoto Tested-by: Michael Walle Link: https://lore.kernel.org/r/87cztyawzr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f8090ffc91ffd788a73d4e6b5ca3107c94d9ec27 Author: Kuninori Morimoto Date: Tue May 11 10:17:57 2021 +0900 ASoC: audio-graph: tidyup graph_dai_link_of_dpcm() Use local variable at local area only. Signed-off-by: Kuninori Morimoto Tested-by: Michael Walle Link: https://lore.kernel.org/r/87eeeeax16.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f0353e1f53f92f7b3da91e6669f5d58ee222ebe8 Author: Hans de Goede Date: Sat May 8 17:01:46 2021 +0200 ASoC: Intel: bytcr_rt5640: Add quirk for the Lenovo Miix 3-830 tablet The Lenovo Miix 3-830 tablet has only 1 speaker, has an internal analog mic on IN1 and uses JD2 for jack-detect, add a quirk to automatically apply these settings on Lenovo Miix 3-830 tablets. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210508150146.28403-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit 28c268d3acdd4cbcd2ac320b85609e77f84e74a7 Author: Hans de Goede Date: Sat May 8 17:01:45 2021 +0200 ASoC: Intel: bytcr_rt5640: Add quirk for the Glavey TM800A550L tablet Add a quirk for the Glavey TM800A550L tablet, this BYTCR tablet has no CHAN package in its ACPI tables and uses SSP0-AIF1 rather then SSP0-AIF2 which is the default for BYTCR devices. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210508150146.28403-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 6ad76b573bb63ef229cf60386cc38c6e7c7625d7 Author: Kuninori Morimoto Date: Tue May 11 10:17:47 2021 +0900 ASoC: simple-card: add simple_link_init() Original commit 434392271afcff350fe ("ASoC: simple-card: add simple_link_init()") are rejected, and this is remake version of it. This patch adds simple_link_init() and share dai_link setting code. Reported-by: "kernelci.org bot" Fixes: 25c4a9b614f101bb9f3 ("ASoC: simple-card: Fix breakage on kontron-sl28-var3-ads2") Fixes: 434392271afcff350fe ("ASoC: simple-card: add simple_link_init()") Signed-off-by: Kuninori Morimoto Tested-by: Michael Walle Link: https://lore.kernel.org/r/87fsyuax1g.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0919a3acc0c87049a7d787c4b8b9e64bd7c59eb3 Author: Kuninori Morimoto Date: Tue May 11 10:17:07 2021 +0900 ASoC: simple-card: add simple_parse_node() Original commit 59c35c44a9cf89a83a9 ("ASoC: simple-card: add simple_parse_node()") was reverted, and this is remake version. Parse dai/tdm/clk are common for both CPU/Codec node. This patch creates simple_parse_node() for it and share the code. Reported-by: "kernelci.org bot" Fixes: 25c4a9b614f101bb9f3 ("ASoC: simple-card: Fix breakage on kontron-sl28-var3-ads2") Fixes: 59c35c44a9cf89a83a9 ("ASoC: simple-card: add simple_parse_node()") Signed-off-by: Kuninori Morimoto Tested-by: Michael Walle Link: https://lore.kernel.org/r/87h7jaax2k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit efed9a3337e341bd0989161b97453b52567bc59d Author: Omar Sandoval Date: Mon May 10 17:05:35 2021 -0700 kyber: fix out of bounds access when preempted __blk_mq_sched_bio_merge() gets the ctx and hctx for the current CPU and passes the hctx to ->bio_merge(). kyber_bio_merge() then gets the ctx for the current CPU again and uses that to get the corresponding Kyber context in the passed hctx. However, the thread may be preempted between the two calls to blk_mq_get_ctx(), and the ctx returned the second time may no longer correspond to the passed hctx. This "works" accidentally most of the time, but it can cause us to read garbage if the second ctx came from an hctx with more ctx's than the first one (i.e., if ctx->index_hw[hctx->type] > hctx->nr_ctx). This manifested as this UBSAN array index out of bounds error reported by Jakub: UBSAN: array-index-out-of-bounds in ../kernel/locking/qspinlock.c:130:9 index 13106 is out of range for type 'long unsigned int [128]' Call Trace: dump_stack+0xa4/0xe5 ubsan_epilogue+0x5/0x40 __ubsan_handle_out_of_bounds.cold.13+0x2a/0x34 queued_spin_lock_slowpath+0x476/0x480 do_raw_spin_lock+0x1c2/0x1d0 kyber_bio_merge+0x112/0x180 blk_mq_submit_bio+0x1f5/0x1100 submit_bio_noacct+0x7b0/0x870 submit_bio+0xc2/0x3a0 btrfs_map_bio+0x4f0/0x9d0 btrfs_submit_data_bio+0x24e/0x310 submit_one_bio+0x7f/0xb0 submit_extent_page+0xc4/0x440 __extent_writepage_io+0x2b8/0x5e0 __extent_writepage+0x28d/0x6e0 extent_write_cache_pages+0x4d7/0x7a0 extent_writepages+0xa2/0x110 do_writepages+0x8f/0x180 __writeback_single_inode+0x99/0x7f0 writeback_sb_inodes+0x34e/0x790 __writeback_inodes_wb+0x9e/0x120 wb_writeback+0x4d2/0x660 wb_workfn+0x64d/0xa10 process_one_work+0x53a/0xa80 worker_thread+0x69/0x5b0 kthread+0x20b/0x240 ret_from_fork+0x1f/0x30 Only Kyber uses the hctx, so fix it by passing the request_queue to ->bio_merge() instead. BFQ and mq-deadline just use that, and Kyber can map the queues itself to avoid the mismatch. Fixes: a6088845c2bf ("block: kyber: make kyber more friendly with merging") Reported-by: Jakub Kicinski Signed-off-by: Omar Sandoval Link: https://lore.kernel.org/r/c7598605401a48d5cfeadebb678abd10af22b83f.1620691329.git.osandov@fb.com Signed-off-by: Jens Axboe commit f2be77fee648ddd6d0d259d3527344ba0120e314 Author: Elia Devito Date: Tue May 11 14:46:49 2021 +0200 ALSA: hda/realtek: Add fixup for HP Spectre x360 15-df0xxx Fixup to enable all 4 speaker on HP Spectre x360 15-df0xxx and probably on similar models. 0x14 pin config override is required to enable all speakers and alc285-speaker2-to-dac1 fixup to enable volume adjustment. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=189331 Signed-off-by: Elia Devito Cc: Link: https://lore.kernel.org/r/20210511124651.4802-1-eliadevito@gmail.com Signed-off-by: Takashi Iwai commit 9b8a233bc294dd71d3c7d30692a78ab32f246a0f Author: Ritesh Harjani Date: Fri Apr 30 21:30:55 2021 +0530 btrfs: handle transaction start error in btrfs_fileattr_set Add error handling in btrfs_fileattr_set in case of an error while starting a transaction. This fixes btrfs/232 which otherwise used to fail with below signature on Power. btrfs/232 [ 1119.474650] run fstests btrfs/232 at 2021-04-21 02:21:22 <...> [ 1366.638585] BUG: Unable to handle kernel data access on read at 0xffffffffffffff86 [ 1366.638768] Faulting instruction address: 0xc0000000009a5c88 cpu 0x0: Vector: 380 (Data SLB Access) at [c000000014f177b0] pc: c0000000009a5c88: btrfs_update_root_times+0x58/0xc0 lr: c0000000009a5c84: btrfs_update_root_times+0x54/0xc0 <...> pid = 24881, comm = fsstress btrfs_update_inode+0xa0/0x140 btrfs_fileattr_set+0x5d0/0x6f0 vfs_fileattr_set+0x2a8/0x390 do_vfs_ioctl+0x1290/0x1ac0 sys_ioctl+0x6c/0x120 system_call_exception+0x3d4/0x410 system_call_common+0xec/0x278 Fixes: 97fc29775487 ("btrfs: convert to fileattr") Signed-off-by: Ritesh Harjani Reviewed-by: David Sterba Signed-off-by: David Sterba commit ba9c25d94dea1a57492a606a1f5dde70d2432583 Merge: 14b6cff54edac af0e1871d79cf Author: Greg Kroah-Hartman Date: Tue May 11 15:17:55 2021 +0200 Merge tag 'iio-fixes-5.13a' 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.13 cycle A couple of high priority core fixes and the usual bits scattered across individual drivers. core: * Fix ioctl handler double free. * Fix an accidental ABI change wrt to error codes when an IOCTL is not supported. gp2ap002: * Runtime pm imbalance on error. hid-sensors: * Fix a Kconfig dependency issue in a particularly crazy config. mpu3050: * Fix wrong temperature calculation due to a type needing to be signed. pulsedlight: * Runtime pm imbalance on error. tsl2583 * Fix a potential division by zero. * tag 'iio-fixes-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio: tsl2583: Fix division by a zero lux_val iio: core: return ENODEV if ioctl is unknown iio: core: fix ioctl handlers removal iio: gyro: mpu3050: Fix reported temperature value iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER iio: proximity: pulsedlight: Fix rumtime PM imbalance on error iio: light: gp2ap002: Fix rumtime PM imbalance on error commit a5c936add6a23c15c6ae538ab7a12f80751fdf0f Author: Kai-Heng Feng Date: Wed Apr 21 13:20:31 2021 +0800 drm/i915/dp: Use slow and wide link training for everything Screen flickers on Innolux eDP 1.3 panel when clock rate 540000 is in use. According to the panel vendor, though clock rate 540000 is advertised, but the max clock rate it really supports is 270000. Ville Syrjälä mentioned that fast and narrow also breaks some eDP 1.4 panel, so use slow and wide training for all panels to resolve the issue. User also confirmed that the new strategy doesn't introduce any regression on XPS 9380. v2: - Use slow and wide for everything. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3384 References: https://gitlab.freedesktop.org/drm/intel/-/issues/272 Signed-off-by: Kai-Heng Feng Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210421052054.1434718-1-kai.heng.feng@canonical.com (cherry picked from commit acca7762eb71bc05a8f28d29320d193150051f79) Fixes: 2bbd6dba84d4 ("drm/i915: Try to use fast+narrow link on eDP again and fall back to the old max strategy on failure") Cc: # v5.12+ Signed-off-by: Jani Nikula commit 79d341e26ebcdbc622348aaaab6f8f89b6fdb25f Author: Kai-Heng Feng Date: Fri Apr 30 14:07:35 2021 +0800 platform/x86: hp_accel: Avoid invoking _INI to speed up resume hp_accel can take almost two seconds to resume on some HP laptops. The bottleneck is on evaluating _INI, which is only needed to run once. Resolve the issue by only invoking _INI when it's necessary. Namely, on probe and on hibernation restore. Signed-off-by: Kai-Heng Feng Acked-by: Éric Piel Link: https://lore.kernel.org/r/20210430060736.590321-1-kai.heng.feng@canonical.com Signed-off-by: Hans de Goede commit b09aaa3f2c0edeeed670cd29961a0e35bddc78cf Author: Barnabás Pőcze Date: Fri May 7 23:53:44 2021 +0000 platform/x86: ideapad-laptop: fix method name typo "smbc" should be "sbmc". `eval_smbc()` incorrectly called the SMBC ACPI method instead of SBMC. This resulted in partial loss of functionality. Rectify that by calling the correct ACPI method (SBMC), and also rename methods and constants. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212985 Fixes: 0b765671cb80 ("platform/x86: ideapad-laptop: group and separate (un)related constants into enums") Fixes: ff36b0d953dc ("platform/x86: ideapad-laptop: rework and create new ACPI helpers") Cc: stable@vger.kernel.org # 5.12 Signed-off-by: Barnabás Pőcze Link: https://lore.kernel.org/r/20210507235333.286505-1-pobrn@protonmail.com Signed-off-by: Hans de Goede commit ff67dbd554b2aaa22be933eced32610ff90209dd Author: Qiu Wenbo Date: Wed Apr 28 13:06:36 2021 +0800 platform/x86: ideapad-laptop: fix a NULL pointer dereference The third parameter of dytc_cql_command should not be NULL since it will be dereferenced immediately. Fixes: ff36b0d953dc4 ("platform/x86: ideapad-laptop: rework and create new ACPI helpers") Signed-off-by: Qiu Wenbo Acked-by: Ike Panhc Link: https://lore.kernel.org/r/20210428050636.8003-1-qiuwenbo@kylinos.com.cn Signed-off-by: Hans de Goede commit c55b44c9386f3ee1b08752638559f19deaf6040d Merge: cc2520909c2df 6efb943b8616e Author: Maxime Ripard Date: Tue May 11 13:35:52 2021 +0200 Merge drm/drm-fixes into drm-misc-fixes Start this new release drm-misc-fixes branch Signed-off-by: Maxime Ripard commit 04ea3086c4d73da7009de1e84962a904139af219 Author: Andrii Nakryiko Date: Tue May 4 16:38:00 2021 -0700 bpf: Prevent writable memory-mapping of read-only ringbuf pages Only the very first page of BPF ringbuf that contains consumer position counter is supposed to be mapped as writeable by user-space. Producer position is read-only and can be modified only by the kernel code. BPF ringbuf data pages are read-only as well and are not meant to be modified by user-code to maintain integrity of per-record headers. This patch allows to map only consumer position page as writeable and everything else is restricted to be read-only. remap_vmalloc_range() internally adds VM_DONTEXPAND, so all the established memory mappings can't be extended, which prevents any future violations through mremap()'ing. Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") Reported-by: Ryota Shiga (Flatt Security) Reported-by: Thadeu Lima de Souza Cascardo Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov commit 4b81ccebaeee885ab1aa1438133f2991e3a2b6ea Author: Thadeu Lima de Souza Cascardo Date: Tue Apr 27 10:12:12 2021 -0300 bpf, ringbuf: Deny reserve of buffers larger than ringbuf A BPF program might try to reserve a buffer larger than the ringbuf size. If the consumer pointer is way ahead of the producer, that would be successfully reserved, allowing the BPF program to read or write out of the ringbuf allocated area. Reported-by: Ryota Shiga (Flatt Security) Fixes: 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Acked-by: Alexei Starovoitov commit 91e02557f377b6837d4f82b14229d92cae231001 Author: Takashi Iwai Date: Tue May 11 11:05:00 2021 +0200 ALSA: usb-audio: Fix potential out-of-bounce access in MIDI EP parser The recently introduced MIDI endpoint parser code has an access to the field without the size validation, hence it might lead to out-of-bounce access. Add the sanity checks for the descriptor sizes. Fixes: eb596e0fd13c ("ALSA: usb-audio: generate midi streaming substream names from jack names") Link: https://lore.kernel.org/r/20210511090500.2637-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 35f3f8504c3b60a1ae5576e178b27fc0ddd6157d Author: Andy Shevchenko Date: Mon May 10 16:12:42 2021 +0300 spi: Switch to signed types for *_native_cs SPI controller fields While fixing undefined behaviour the commit f60d7270c8a3 ("spi: Avoid undefined behaviour when counting unused native CSs") missed the case when all CSs are GPIOs and thus unused_native_cs will be evaluated to -1 in unsigned representation. This will falsely trigger a condition in the spi_get_gpio_descs(). Switch to signed types for *_native_cs SPI controller fields to fix above. Fixes: f60d7270c8a3 ("spi: Avoid undefined behaviour when counting unused native CSs") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510131242.49455-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 46f2e04484aee056c97f79162da83ac7d2d621bb Author: Gao Xiang Date: Tue May 11 16:44:14 2021 +0800 erofs: update documentation about data compression Add more description about (NON)HEAD lclusters, and the new big pcluster feature. Link: https://lore.kernel.org/r/20210511084414.21305-1-xiang@kernel.org Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 1b55767dfdd93c42712e67e986ac14f0c4debd0c Author: Gao Xiang Date: Tue May 11 00:25:05 2021 +0800 erofs: fix broken illustration in documentation Illustration was broken after ReST conversion by accident. (checked by 'make SPHINXDIRS="filesystems" htmldocs') Link: https://lore.kernel.org/r/20210510162506.28637-1-xiang@kernel.org Fixes: e66d8631ddb3 ("docs: filesystems: convert erofs.txt to ReST") Reviewed-by: Chao Yu Cc: Mauro Carvalho Chehab Signed-off-by: Gao Xiang commit cc2520909c2df9ad51d642bf09b3da26a9f56393 Author: Jernej Skrabec Date: Wed May 5 19:33:35 2021 +0200 MAINTAINERS: Update my e-mail Old e-mail address doesn't work anymore, update it to new one. Link: https://lore.kernel.org/r/20210505173335.1483575-1-jernej.skrabec@gmail.com Signed-off-by: Jernej Skrabec Signed-off-by: Maxime Ripard commit 2515dd6ce8e545b0b2eece84920048ef9ed846c4 Author: Nick Desaulniers Date: Mon Apr 19 16:17:41 2021 -0700 stack: Replace "o" output with "r" input constraint "o" isn't a common asm() constraint to use; it triggers an assertion in assert-enabled builds of LLVM that it's not recognized when targeting aarch64 (though it appears to fall back to "m"). It's fixed in LLVM 13 now, but there isn't really a good reason to use "o" in particular here. To avoid causing build issues for those using assert-enabled builds of earlier LLVM versions, the constraint needs changing. Instead, if the point is to retain the __builtin_alloca(), make ptr appear to "escape" via being an input to an empty inline asm block. This is preferable anyways, since otherwise this looks like a dead store. While the use of "r" was considered in https://lore.kernel.org/lkml/202104011447.2E7F543@keescook/ it was only tested as an output (which looks like a dead store, and wasn't sufficient). Use "r" as an input constraint instead, which behaves correctly across compilers and architectures. Fixes: 39218ff4c625 ("stack: Optionally randomize kernel stack offset each syscall") Signed-off-by: Nick Desaulniers Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Tested-by: Kees Cook Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Link: https://reviews.llvm.org/D100412 Link: https://bugs.llvm.org/show_bug.cgi?id=49956 Link: https://lore.kernel.org/r/20210419231741.4084415-1-keescook@chromium.org commit 049c4e13714ecbca567b4d5f6d563f05d431c80e Author: Daniel Borkmann Date: Mon May 10 13:10:44 2021 +0000 bpf: Fix alu32 const subreg bound tracking on bitwise operations Fix a bug in the verifier's scalar32_min_max_*() functions which leads to incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops. When both the src & dst subreg is a known constant, then the assumption is that scalar_min_max_*() will take care to update bounds correctly. However, this is not the case, for example, consider a register R2 which has a tnum of 0xffffffff00000000, meaning, lower 32 bits are known constant and in this case of value 0x00000001. R2 is then and'ed with a register R3 which is a 64 bit known constant, here, 0x100000002. What can be seen in line '10:' is that 32 bit bounds reach an invalid state where {u,s}32_min_value > {u,s}32_max_value. The reason is scalar32_min_max_*() delegates 32 bit bounds updates to scalar_min_max_*(), however, that really only takes place when both the 64 bit src & dst register is a known constant. Given scalar32_min_max_*() is intended to be designed as closely as possible to scalar_min_max_*(), update the 32 bit bounds in this situation through __mark_reg32_known() which will set all {u,s}32_{min,max}_value to the correct constant, which is 0x00000000 after the fix (given 0x00000001 & 0x00000002 in 32 bit space). This is possible given var32_off already holds the final value as dst_reg->var_off is updated before calling scalar32_min_max_*(). Before fix, invalid tracking of R2: [...] 9: R0_w=inv1337 R1=ctx(id=0,off=0,imm=0) R2_w=inv(id=0,smin_value=-9223372036854775807 (0x8000000000000001),smax_value=9223372032559808513 (0x7fffffff00000001),umin_value=1,umax_value=0xffffffff00000001,var_off=(0x1; 0xffffffff00000000),s32_min_value=1,s32_max_value=1,u32_min_value=1,u32_max_value=1) R3_w=inv4294967298 R10=fp0 9: (5f) r2 &= r3 10: R0_w=inv1337 R1=ctx(id=0,off=0,imm=0) R2_w=inv(id=0,smin_value=0,smax_value=4294967296 (0x100000000),umin_value=0,umax_value=0x100000000,var_off=(0x0; 0x100000000),s32_min_value=1,s32_max_value=0,u32_min_value=1,u32_max_value=0) R3_w=inv4294967298 R10=fp0 [...] After fix, correct tracking of R2: [...] 9: R0_w=inv1337 R1=ctx(id=0,off=0,imm=0) R2_w=inv(id=0,smin_value=-9223372036854775807 (0x8000000000000001),smax_value=9223372032559808513 (0x7fffffff00000001),umin_value=1,umax_value=0xffffffff00000001,var_off=(0x1; 0xffffffff00000000),s32_min_value=1,s32_max_value=1,u32_min_value=1,u32_max_value=1) R3_w=inv4294967298 R10=fp0 9: (5f) r2 &= r3 10: R0_w=inv1337 R1=ctx(id=0,off=0,imm=0) R2_w=inv(id=0,smin_value=0,smax_value=4294967296 (0x100000000),umin_value=0,umax_value=0x100000000,var_off=(0x0; 0x100000000),s32_min_value=0,s32_max_value=0,u32_min_value=0,u32_max_value=0) R3_w=inv4294967298 R10=fp0 [...] Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") Fixes: 2921c90d4718 ("bpf: Fix a verifier failure with xor") Reported-by: Manfred Paul (@_manfp) Reported-by: Thadeu Lima de Souza Cascardo Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit bb4031b8af804244a7e4349d38f6624f68664bd6 Author: Tudor Ambarus Date: Mon Apr 26 09:56:18 2021 +0300 clk: Skip clk provider registration when np is NULL commit 6579c8d97ad7 ("clk: Mark fwnodes when their clock provider is added") revealed that clk/bcm/clk-raspberrypi.c driver calls devm_of_clk_add_hw_provider(), with a NULL dev->of_node, which resulted in a NULL pointer dereference in of_clk_add_hw_provider() when calling fwnode_dev_initialized(). Returning 0 is reducing the if conditions in driver code and is being consistent with the CONFIG_OF=n inline stub that returns 0 when CONFIG_OF is disabled. The downside is that drivers will maybe register clkdev lookups when they don't need to and waste some memory. Fixes: 6579c8d97ad7 ("clk: Mark fwnodes when their clock provider is added") Fixes: 3c9ea42802a1 ("clk: Mark fwnodes when their clock provider is added/removed") Reported-by: Marek Szyprowski Tested-by: Guenter Roeck Tested-by: Nathan Chancellor Reviewed-by: Stephen Boyd Reviewed-by: Saravana Kannan Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210426065618.588144-1-tudor.ambarus@microchip.com Signed-off-by: Greg Kroah-Hartman commit 3b414d1b0107fa51ad6063de9752d4b2a8063980 Author: Pawel Laszczak Date: Tue Apr 20 06:28:13 2021 +0200 usb: cdnsp: Fix lack of removing request from pending list. Patch fixes lack of removing request from ep->pending_list on failure of the stop endpoint command. Driver even after failing this command must remove request from ep->pending_list. Without this fix driver can stuck in cdnsp_gadget_ep_disable function in loop: while (!list_empty(&pep->pending_list)) { preq = next_request(&pep->pending_list); cdnsp_ep_dequeue(pep, preq); } Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210420042813.34917-1-pawell@gli-login.cadence.com Signed-off-by: Peter Chen commit 07adc0225484fc199e3dc15ec889f75f498c4fca Author: Dinghao Liu Date: Mon Apr 12 13:49:07 2021 +0800 usb: cdns3: Fix runtime PM imbalance on error When cdns3_gadget_start() fails, a pairing PM usage counter decrement is needed to keep the counter balanced. Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20210412054908.7975-1-dinghao.liu@zju.edu.cn Signed-off-by: Peter Chen commit 1fd86e280d8b21762901e43d42d66dbfe8b8e0d3 Author: Zou Wei Date: Tue May 11 11:44:33 2021 +0800 interconnect: qcom: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/1620704673-104205-1-git-send-email-zou_wei@huawei.com Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support") Signed-off-by: Georgi Djakov commit a00593737f8bac2c9e97b696e7ff84a4446653e8 Author: Subbaraman Narayanamurthy Date: Thu Apr 22 11:36:10 2021 -0700 interconnect: qcom: bcm-voter: add a missing of_node_put() Add a missing of_node_put() in of_bcm_voter_get() to avoid the reference leak. Signed-off-by: Subbaraman Narayanamurthy Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1619116570-13308-1-git-send-email-subbaram@codeaurora.org Fixes: 976daac4a1c5 ("interconnect: qcom: Consolidate interconnect RPMh support") Signed-off-by: Georgi Djakov commit 1140ab592e2ebf8153d2b322604031a8868ce7a5 Merge: 142b507f911c5 71d7924b3e8ac Author: Linus Torvalds Date: Mon May 10 15:23:58 2021 -0700 Merge tag 'perf-tools-fixes-for-v5.13-2021-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tools fixes from Arnaldo Carvalho de Melo: - Fix swapping of cpu_map and stat_config records. - Fix dynamic libbpf linking. - Disallow -c and -F option at the same time in 'perf record'. - Update headers with the kernel originals. - Silence warning for JSON ArchStd files. - Fix a build error on arm64 with clang. * tag 'perf-tools-fixes-for-v5.13-2021-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: tools headers UAPI: Sync perf_event.h with the kernel sources tools headers cpufeatures: Sync with the kernel sources tools include UAPI powerpc: Sync errno.h with the kernel headers tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' tools headers UAPI: Sync linux/prctl.h with the kernel sources tools headers UAPI: Sync files changed by landlock, quotactl_path and mount_settattr new syscalls perf tools: Fix a build error on arm64 with clang tools headers kvm: Sync kvm headers with the kernel sources tools headers UAPI: Sync linux/kvm.h with the kernel sources perf tools: Fix dynamic libbpf link perf session: Fix swapping of cpu_map and stat_config records perf jevents: Silence warning for ArchStd files perf record: Disallow -c and -F option at the same time tools arch x86: Sync the msr-index.h copy with the kernel sources tools headers UAPI: Sync drm/i915_drm.h with the kernel sources tools headers UAPI: Update tools's copy of drm.h headers commit 297c4de6f780b63b6d2af75a730720483bf1904a Author: Michael Walle Date: Mon May 10 13:07:08 2021 +0200 net: dsa: felix: re-enable TAS guard band mode Commit 316bcffe4479 ("net: dsa: felix: disable always guard band bit for TAS config") disabled the guard band and broke 802.3Qbv compliance. There are two issues here: (1) Without the guard band the end of the scheduling window could be overrun by a frame in transit. (2) Frames that don't fit into a configured window will still be sent. The reason for both issues is that the switch will schedule the _start_ of a frame transmission inside the predefined window without taking the length of the frame into account. Thus, we'll need the guard band which will close the gate early, so that a complete frame can still be sent. Revert the commit and add a note. For a lengthy discussion see [1]. [1] https://lore.kernel.org/netdev/c7618025da6723418c56a54fe4683bd7@walle.cc/ Fixes: 316bcffe4479 ("net: dsa: felix: disable always guard band bit for TAS config") Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 3058e01d31bbdbe50e02cafece2b22817a6a0eae Author: Hoang Le Date: Mon May 10 09:57:38 2021 +0700 tipc: make node link identity publish thread safe The using of the node address and node link identity are not thread safe, meaning that two publications may be published the same values, as result one of them will get failure because of already existing in the name table. To avoid this we have to use the node address and node link identity values from inside the node item's write lock protection. Fixes: 50a3499ab853 ("tipc: simplify signature of tipc_namtbl_publish()") Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit b94cbc909f1d80378a1f541968309e5c1178c98b Author: Vladimir Oltean Date: Sun May 9 22:33:38 2021 +0300 net: dsa: fix error code getting shifted with 4 in dsa_slave_get_sset_count DSA implements a bunch of 'standardized' ethtool statistics counters, namely tx_packets, tx_bytes, rx_packets, rx_bytes. So whatever the hardware driver returns in .get_sset_count(), we need to add 4 to that. That is ok, except that .get_sset_count() can return a negative error code, for example: b53_get_sset_count -> phy_ethtool_get_sset_count -> return -EIO -EIO is -5, and with 4 added to it, it becomes -1, aka -EPERM. One can imagine that certain error codes may even become positive, although based on code inspection I did not see instances of that. Check the error code first, if it is negative return it as-is. Based on a similar patch for dsa_master_get_strings from Dan Carpenter: https://patchwork.kernel.org/project/netdevbpf/patch/YJaSe3RPgn7gKxZv@mwanda/ Fixes: 91da11f870f0 ("net: Distributed Switch Architecture protocol support") Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit db825feefc6868896fed5e361787ba3bee2fd906 Author: Vladyslav Tarasiuk Date: Sun May 9 09:43:18 2021 +0300 net/mlx4: Fix EEPROM dump support Fix SFP and QSFP* EEPROM queries by setting i2c_address, offset and page number correctly. For SFP set the following params: - I2C address for offsets 0-255 is 0x50. For 256-511 - 0x51. - Page number is zero. - Offset is 0-255. At the same time, QSFP* parameters are different: - I2C address is always 0x50. - Page number is not limited to zero. - Offset is 0-255 for page zero and 128-255 for others. To set parameters accordingly to cable used, implement function to query module ID and implement respective helper functions to set parameters correctly. Fixes: 135dd9594f12 ("net/mlx4_en: ethtool, Remove unsupported SFP EEPROM high pages query") Signed-off-by: Vladyslav Tarasiuk Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller commit a269333fa5c0c8e53c92b5a28a6076a28cde3e83 Author: Dan Carpenter Date: Sat May 8 16:30:35 2021 +0300 net: dsa: fix a crash if ->get_sset_count() fails If ds->ops->get_sset_count() fails then it "count" is a negative error code such as -EOPNOTSUPP. Because "i" is an unsigned int, the negative error code is type promoted to a very high value and the loop will corrupt memory until the system crashes. Fix this by checking for error codes and changing the type of "i" to just int. Fixes: badf3ada60ab ("net: dsa: Provide CPU port statistics to master netdev") Signed-off-by: Dan Carpenter Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 0d3ae948741ac6d80e39ab27b45297367ee477de Author: Eric Dumazet Date: Wed Apr 14 10:05:17 2021 -0700 sh: Remove unused variable Removes this annoying warning: arch/sh/kernel/traps.c: In function ‘nmi_trap_handler’: arch/sh/kernel/traps.c:183:15: warning: unused variable ‘cpu’ [-Wunused-variable] 183 | unsigned int cpu = smp_processor_id(); Fixes: fe3f1d5d7cd3 ("sh: Get rid of nmi_count()") Signed-off-by: Eric Dumazet Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210414170517.1205430-1-eric.dumazet@gmail.com commit ddb6e00f8413e885ff826e32521cff7924661de0 Author: Christophe JAILLET Date: Sat May 8 07:38:22 2021 +0200 net: netcp: Fix an error message 'ret' is known to be 0 here. The expected error code is stored in 'tx_pipe->dma_queue', so use it instead. While at it, switch from %d to %pe which is more user friendly. Fixes: 84640e27f230 ("net: netcp: Add Keystone NetCP core ethernet driver") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 8ab78863e9eff11910e1ac8bcf478060c29b379e Author: Jeimon Date: Sat May 8 11:52:30 2021 +0800 net/nfc/rawsock.c: fix a permission check bug The function rawsock_create() calls a privileged function sk_alloc(), which requires a ns-aware check to check net->user_ns, i.e., ns_capable(). However, the original code checks the init_user_ns using capable(). So we replace the capable() with ns_capable(). Signed-off-by: Jeimon Signed-off-by: David S. Miller commit 9e255e2b9afe948fb795cbaa854acc3904d4212c Author: Randy Dunlap Date: Thu May 6 16:19:07 2021 -0700 Documentation: drop optional BOMs A few of the Documentation .rst files begin with a Unicode byte order mark (BOM). The BOM may signify endianess for 16-bit or 32-bit encodings or indicate that the text stream is indeed Unicode. We don't need it for either of those uses. It may also interfere with (confuse) some software. Since we don't need it and its use is optional, just delete the uses of it in Documentation/. https://en.wikipedia.org/wiki/Byte_order_mark Signed-off-by: Randy Dunlap Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Greg Kroah-Hartman Cc: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210506231907.14359-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit bf9e262fcfa6350269f00a95658f701f2595db13 Author: Wan Jiabing Date: Sat May 8 11:07:33 2021 +0800 docs/zh_CN: Remove obsolete translation file This translation file was replaced by Documentation/translations/zh_CN/admin-guide/security-bugs.rst which was created in commit 2d153571003b ("docs/zh_CN: Add zh_CN/admin-guide/security-bugs.rst"). This is a translation left over from history. Remove it. Signed-off-by: Wan Jiabing Acked-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210508030741.82655-1-wanjiabing@vivo.com Signed-off-by: Jonathan Corbet commit 142b507f911c5a502dbb8f603216cb0ea8a79a48 Merge: 0aa099a312b63 77364faf21b41 Author: Linus Torvalds Date: Mon May 10 14:10:42 2021 -0700 Merge tag 'for-5.13-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs fixes from David Sterba: "First batch of various fixes, here's a list of notable ones: - fix unmountable seed device after fstrim - fix silent data loss in zoned mode due to ordered extent splitting - fix race leading to unpersisted data and metadata on fsync - fix deadlock when cloning inline extents and using qgroups" * tag 'for-5.13-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: btrfs: initialize return variable in cleanup_free_space_cache_v1 btrfs: zoned: sanity check zone type btrfs: fix unmountable seed device after fstrim btrfs: fix deadlock when cloning inline extents and using qgroups btrfs: fix race leading to unpersisted data and metadata on fsync btrfs: do not consider send context as valid when trying to flush qgroups btrfs: zoned: fix silent data loss after failure splitting ordered extent commit 1d5e4640e5df15252398c1b621f6bd432f2d7f17 Author: Vladimir Isaev Date: Tue Apr 27 15:13:54 2021 +0300 ARC: mm: Use max_high_pfn as a HIGHMEM zone border Commit 4af22ded0ecf ("arc: fix memory initialization for systems with two memory banks") fixed highmem, but for the PAE case it causes bug messages: | BUG: Bad page state in process swapper pfn:80000 | page:(ptrval) refcount:0 mapcount:1 mapping:00000000 index:0x0 pfn:0x80000 flags: 0x0() | raw: 00000000 00000100 00000122 00000000 00000000 00000000 00000000 00000000 | raw: 00000000 | page dumped because: nonzero mapcount | Modules linked in: | CPU: 0 PID: 0 Comm: swapper Not tainted 5.12.0-rc5-00003-g1e43c377a79f #1 This is because the fix expects highmem to be always less than lowmem and uses min_low_pfn as an upper zone border for highmem. max_high_pfn should be ok for both highmem and highmem+PAE cases. Fixes: 4af22ded0ecf ("arc: fix memory initialization for systems with two memory banks") Signed-off-by: Vladimir Isaev Cc: Mike Rapoport Cc: stable@vger.kernel.org #5.8 onwards Signed-off-by: Vineet Gupta commit c5f756d8c6265ebb1736a7787231f010a3b782e5 Author: Vladimir Isaev Date: Tue Apr 27 15:12:37 2021 +0300 ARC: mm: PAE: use 40-bit physical page mask 32-bit PAGE_MASK can not be used as a mask for physical addresses when PAE is enabled. PAGE_MASK_PHYS must be used for physical addresses instead of PAGE_MASK. Without this, init gets SIGSEGV if pte_modify was called: | potentially unexpected fatal signal 11. | Path: /bin/busybox | CPU: 0 PID: 1 Comm: init Not tainted 5.12.0-rc5-00003-g1e43c377a79f-dirty | Insn could not be fetched | @No matching VMA found | ECR: 0x00040000 EFA: 0x00000000 ERET: 0x00000000 | STAT: 0x80080082 [IE U ] BTA: 0x00000000 | SP: 0x5f9ffe44 FP: 0x00000000 BLK: 0xaf3d4 | LPS: 0x000d093e LPE: 0x000d0950 LPC: 0x00000000 | r00: 0x00000002 r01: 0x5f9fff14 r02: 0x5f9fff20 | ... | Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Signed-off-by: Vladimir Isaev Reported-by: kernel test robot Cc: Vineet Gupta Cc: stable@vger.kernel.org Signed-off-by: Vineet Gupta commit 3433adc8bd09fc9f29b8baddf33b4ecd1ecd2cdc Author: Vineet Gupta Date: Fri Apr 23 12:16:25 2021 -0700 ARC: entry: fix off-by-one error in syscall number validation We have NR_syscall syscalls from [0 .. NR_syscall-1]. However the check for invalid syscall number is "> NR_syscall" as opposed to >=. This off-by-one error erronesously allows "NR_syscall" to be treated as valid syscall causeing out-of-bounds access into syscall-call table ensuing a crash (holes within syscall table have a invalid-entry handler but this is beyond the array implementing the table). This problem showed up on v5.6 kernel when testing glibc 2.33 (v5.10 kernel capable, includng faccessat2 syscall 439). The v5.6 kernel has NR_syscalls=439 (0 to 438). Due to the bug, 439 passed by glibc was not handled as -ENOSYS but processed leading to a crash. Link: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/48 Reported-by: Shahab Vahedi Cc: Signed-off-by: Vineet Gupta commit 8e97bf39fa0361af3e64739b3766992b9dafa11d Author: Randy Dunlap Date: Wed Apr 21 22:16:53 2021 -0700 ARC: kgdb: add 'fallthrough' to prevent a warning Use the 'fallthrough' macro to document that this switch case does indeed fall through to the next case. ../arch/arc/kernel/kgdb.c: In function 'kgdb_arch_handle_exception': ../arch/arc/kernel/kgdb.c:141:6: warning: this statement may fall through [-Wimplicit-fallthrough=] 141 | if (kgdb_hex2long(&ptr, &addr)) | ^ ../arch/arc/kernel/kgdb.c:144:2: note: here 144 | case 'D': | ^~~~ Cc: linux-snps-arc@lists.infradead.org Signed-off-by: Randy Dunlap Signed-off-by: Vineet Gupta commit f79f7a2d96769d2a3e663a3e673066be77c30cc3 Author: Bhaskar Chowdhury Date: Mon Mar 22 17:58:19 2021 +0530 arc: Fix typos/spellos s/commiting/committing/ s/defintion/definition/ s/gaurantees/guarantees/ s/interrpted/interrupted/ s/interrutps/interrupts/ s/succeded/succeeded/ s/unconditonally/unconditionally/ Reviewed-by: Christian Brauner Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Vineet Gupta commit 0aa099a312b6323495a23d758009eb7fc04a7617 Merge: 6efb943b8616e ce7ea0cfdc2e9 Author: Linus Torvalds Date: Mon May 10 12:30:45 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm fixes from Paolo Bonzini: - Lots of bug fixes. - Fix virtualization of RDPID - Virtualization of DR6_BUS_LOCK, which on bare metal is new to this release - More nested virtualization migration fixes (nSVM and eVMCS) - Fix for KVM guest hibernation - Fix for warning in SEV-ES SRCU usage - Block KVM from loading on AMD machines with 5-level page tables, due to the APM not mentioning how host CR4.LA57 exactly impacts the guest. * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (48 commits) KVM: SVM: Move GHCB unmapping to fix RCU warning KVM: SVM: Invert user pointer casting in SEV {en,de}crypt helpers kvm: Cap halt polling at kvm->max_halt_poll_ns tools/kvm_stat: Fix documentation typo KVM: x86: Prevent deadlock against tk_core.seq KVM: x86: Cancel pvclock_gtod_work on module removal KVM: x86: Prevent KVM SVM from loading on kernels with 5-level paging KVM: X86: Expose bus lock debug exception to guest KVM: X86: Add support for the emulation of DR6_BUS_LOCK bit KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks KVM: x86: Hide RDTSCP and RDPID if MSR_TSC_AUX probing failed KVM: x86: Tie Intel and AMD behavior for MSR_TSC_AUX to guest CPU model KVM: x86: Move uret MSR slot management to common x86 KVM: x86: Export the number of uret MSRs to vendor modules KVM: VMX: Disable loading of TSX_CTRL MSR the more conventional way KVM: VMX: Use common x86's uret MSR list as the one true list KVM: VMX: Use flag to indicate "active" uret MSRs instead of sorting list KVM: VMX: Configure list of user return MSRs at module init KVM: x86: Add support for RDPID without RDTSCP KVM: SVM: Probe and load MSR_TSC_AUX regardless of RDTSCP support in host ... commit 37a8024d265564eba680575df6421f19db21dfce Author: Peter Collingbourne Date: Fri May 7 11:59:05 2021 -0700 arm64: mte: initialize RGSR_EL1.SEED in __cpu_setup A valid implementation choice for the ChooseRandomNonExcludedTag() pseudocode function used by IRG is to behave in the same way as with GCR_EL1.RRND=0. This would mean that RGSR_EL1.SEED is used as an LFSR which must have a non-zero value in order for IRG to properly produce pseudorandom numbers. However, RGSR_EL1 is reset to an UNKNOWN value on soft reset and thus may reset to 0. Therefore we must initialize RGSR_EL1.SEED to a non-zero value in order to ensure that IRG behaves as expected. Signed-off-by: Peter Collingbourne Fixes: 3b714d24ef17 ("arm64: mte: CPU feature detection and initial sysreg configuration") Cc: # 5.10 Link: https://linux-review.googlesource.com/id/I2b089b6c7d6f17ee37e2f0db7df5ad5bcc04526c Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210507185905.1745402-1-pcc@google.com Signed-off-by: Catalin Marinas commit c745253e2a691a40c66790defe85c104a887e14a Author: Tony Lindgren Date: Wed May 5 14:09:15 2021 +0300 PM: runtime: Fix unpaired parent child_count for force_resume As pm_runtime_need_not_resume() relies also on usage_count, it can return a different value in pm_runtime_force_suspend() compared to when called in pm_runtime_force_resume(). Different return values can happen if anything calls PM runtime functions in between, and causes the parent child_count to increase on every resume. So far I've seen the issue only for omapdrm that does complicated things with PM runtime calls during system suspend for legacy reasons: omap_atomic_commit_tail() for omapdrm.0 dispc_runtime_get() wakes up 58000000.dss as it's the dispc parent dispc_runtime_resume() rpm_resume() increases parent child_count dispc_runtime_put() won't idle, PM runtime suspend blocked pm_runtime_force_suspend() for 58000000.dss, !pm_runtime_need_not_resume() __update_runtime_status() system suspended pm_runtime_force_resume() for 58000000.dss, pm_runtime_need_not_resume() pm_runtime_enable() only called because of pm_runtime_need_not_resume() omap_atomic_commit_tail() for omapdrm.0 dispc_runtime_get() wakes up 58000000.dss as it's the dispc parent dispc_runtime_resume() rpm_resume() increases parent child_count dispc_runtime_put() won't idle, PM runtime suspend blocked ... rpm_suspend for 58000000.dss but parent child_count is now unbalanced Let's fix the issue by adding a flag for needs_force_resume and use it in pm_runtime_force_resume() instead of pm_runtime_need_not_resume(). Additionally omapdrm system suspend could be simplified later on to avoid lots of unnecessary PM runtime calls and the complexity it adds. The driver can just use internal functions that are shared between the PM runtime and system suspend related functions. Fixes: 4918e1f87c5f ("PM / runtime: Rework pm_runtime_force_suspend/resume()") Signed-off-by: Tony Lindgren Reviewed-by: Ulf Hansson Tested-by: Tomi Valkeinen Cc: 4.16+ # 4.16+ Signed-off-by: Rafael J. Wysocki commit 54d87913f147a983589923c7f651f97de9af5be1 Author: Leon Romanovsky Date: Mon May 10 17:46:00 2021 +0300 RDMA/core: Prevent divide-by-zero error triggered by the user The user_entry_size is supplied by the user and later used as a denominator to calculate number of entries. The zero supplied by the user will trigger the following divide-by-zero error: divide error: 0000 [#1] SMP KASAN PTI CPU: 4 PID: 497 Comm: c_repro Not tainted 5.13.0-rc1+ #281 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:ib_uverbs_handler_UVERBS_METHOD_QUERY_GID_TABLE+0x1b1/0x510 Code: 87 59 03 00 00 e8 9f ab 1e ff 48 8d bd a8 00 00 00 e8 d3 70 41 ff 44 0f b7 b5 a8 00 00 00 e8 86 ab 1e ff 31 d2 4c 89 f0 31 ff <49> f7 f5 48 89 d6 48 89 54 24 10 48 89 04 24 e8 1b ad 1e ff 48 8b RSP: 0018:ffff88810416f828 EFLAGS: 00010246 RAX: 0000000000000008 RBX: 1ffff1102082df09 RCX: ffffffff82183f3d RDX: 0000000000000000 RSI: ffff888105f2da00 RDI: 0000000000000000 RBP: ffff88810416fa98 R08: 0000000000000001 R09: ffffed102082df5f R10: ffff88810416faf7 R11: ffffed102082df5e R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000008 R15: ffff88810416faf0 FS: 00007f5715efa740(0000) GS:ffff88811a700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020000840 CR3: 000000010c2e0001 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? ib_uverbs_handler_UVERBS_METHOD_INFO_HANDLES+0x4b0/0x4b0 ib_uverbs_cmd_verbs+0x1546/0x1940 ib_uverbs_ioctl+0x186/0x240 __x64_sys_ioctl+0x38a/0x1220 do_syscall_64+0x3f/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 9f85cbe50aa0 ("RDMA/uverbs: Expose the new GID query API to user space") Link: https://lore.kernel.org/r/b971cc70a8b240a8b5eda33c99fa0558a0071be2.1620657876.git.leonro@nvidia.com Reviewed-by: Jason Gunthorpe Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a3d83276d98886879b5bf7b30b7c29882754e4df Author: Leon Romanovsky Date: Sun May 9 14:41:38 2021 +0300 RDMA/siw: Release xarray entry The xarray entry is allocated in siw_qp_add(), but release was missed in case zero-sized SQ was discovered. Fixes: 661f385961f0 ("RDMA/siw: Fix handling of zero-sized Read and Receive Queues.") Link: https://lore.kernel.org/r/f070b59d5a1114d5a4e830346755c2b3f141cde5.1620560472.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit a568814a55a0e82bbc7c7b51333d0c38e8fb5520 Author: Leon Romanovsky Date: Sun May 9 14:39:21 2021 +0300 RDMA/siw: Properly check send and receive CQ pointers The check for the NULL of pointer received from container_of() is incorrect by definition as it points to some offset from NULL. Change such check with proper NULL check of SIW QP attributes. Fixes: 303ae1cdfdf7 ("rdma/siw: application interface") Link: https://lore.kernel.org/r/a7535a82925f6f4c1f062abaa294f3ae6e54bdd2.1620560310.git.leonro@nvidia.com Signed-off-by: Leon Romanovsky Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 0c8bd174f0fc131bc9dfab35cd8784f59045da87 Author: Christophe JAILLET Date: Sat May 8 09:23:09 2021 +0200 ACPI: scan: Fix a memory leak in an error handling path If 'acpi_device_set_name()' fails, we must free 'acpi_device_bus_id->bus_id' or there is a (potential) memory leak. Fixes: eb50aaf960e3 ("ACPI: scan: Use unique number for instance_no") Signed-off-by: Christophe JAILLET Reviewed-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 5311221304fa60e357aada75efdf2f2da8c30a57 Author: Wan Jiabing Date: Thu May 6 19:49:39 2021 +0800 dt-bindings: phy: cadence-torrent: update reference file of docs In commit fd7abc3c5b87 ("phy: cadence-torrent: Use a common header file for Cadence SERDES"), phy-cadence-torrent.h was renamed to phy-cadence.h. Fix it of the Documentation. Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210506114940.22215-1-wanjiabing@vivo.com Signed-off-by: Rob Herring commit 562b4e91d3b221f737f84ff78ee7d348c8a6891f Author: Rafał Miłecki Date: Sat May 8 19:32:14 2021 +0200 mtd: parsers: ofpart: fix parsing subpartitions ofpart was recently patched to not scan random partition nodes as subpartitions. That change unfortunately broke scanning valid subpartitions like: partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { compatible = "fixed-partitions"; label = "bootloader"; reg = <0x0 0x100000>; partition@0 { label = "config"; reg = <0x80000 0x80000>; }; }; }; Fix that regression by adding 1 more code path. We actually need 3 conditional blocks to support 3 possible cases. This change also makes code easier to understand & follow. Reported-by: David Bauer Fixes: 2d751203aacf ("mtd: parsers: ofpart: limit parsing of deprecated DT syntax Signed-off-by: Rafał Miłecki Tested-by: Andrew Cameron Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210508173214.28365-1-zajec5@gmail.com commit 3d227a0b0ce319edbff6fd0d8af4d66689e477cc Author: Miquel Raynal Date: Tue Apr 13 18:18:40 2021 +0200 mtd: rawnand: txx9ndfmc: Fix external use of SW Hamming ECC helper Since the Hamming software ECC engine has been updated to become a proper and independent ECC engine, it is now mandatory to either initialize the engine before using any one of his functions or use one of the bare helpers which only perform the calculations. As there is no actual need for a proper ECC initialization, let's just use the bare helper instead of the rawnand one. Fixes: 90ccf0a0192f ("mtd: nand: ecc-hamming: Rename the exported functions") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210413161840.345208-8-miquel.raynal@bootlin.com commit 6a4c5ada577467a5f79e06f2c5e69c09983c22fb Author: Miquel Raynal Date: Tue Apr 13 18:18:39 2021 +0200 mtd: rawnand: tmio: Fix external use of SW Hamming ECC helper Since the Hamming software ECC engine has been updated to become a proper and independent ECC engine, it is now mandatory to either initialize the engine before using any one of his functions or use one of the bare helpers which only perform the calculations. As there is no actual need for a proper ECC initialization, let's just use the bare helper instead of the rawnand one. Fixes: 90ccf0a0192f ("mtd: nand: ecc-hamming: Rename the exported functions") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210413161840.345208-7-miquel.raynal@bootlin.com commit 46fcb57e6b7283533ebf8ba17a6bd30fa88bdc9f Author: Miquel Raynal Date: Tue Apr 13 18:18:38 2021 +0200 mtd: rawnand: sharpsl: Fix external use of SW Hamming ECC helper Since the Hamming software ECC engine has been updated to become a proper and independent ECC engine, it is now mandatory to either initialize the engine before using any one of his functions or use one of the bare helpers which only perform the calculations. As there is no actual need for a proper ECC initialization, let's just use the bare helper instead of the rawnand one. Fixes: 90ccf0a0192f ("mtd: nand: ecc-hamming: Rename the exported functions") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210413161840.345208-6-miquel.raynal@bootlin.com commit 3e09c0252501829b14b10f14e1982aaab77d0b80 Author: Miquel Raynal Date: Tue Apr 13 18:18:37 2021 +0200 mtd: rawnand: ndfc: Fix external use of SW Hamming ECC helper Since the Hamming software ECC engine has been updated to become a proper and independent ECC engine, it is now mandatory to either initialize the engine before using any one of his functions or use one of the bare helpers which only perform the calculations. As there is no actual need for a proper ECC initialization, let's just use the bare helper instead of the rawnand one. Fixes: 90ccf0a0192f ("mtd: nand: ecc-hamming: Rename the exported functions") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210413161840.345208-5-miquel.raynal@bootlin.com commit c4b7d7c480d607e4f52d310d9d16b194868d0917 Author: Miquel Raynal Date: Tue Apr 13 18:18:36 2021 +0200 mtd: rawnand: lpc32xx_slc: Fix external use of SW Hamming ECC helper Since the Hamming software ECC engine has been updated to become a proper and independent ECC engine, it is now mandatory to either initialize the engine before using any one of his functions or use one of the bare helpers which only perform the calculations. As there is no actual need for a proper ECC initialization, let's just use the bare helper instead of the rawnand one. Fixes: 90ccf0a0192f ("mtd: nand: ecc-hamming: Rename the exported functions") Cc: stable@vger.kernel.org Cc: Vladimir Zapolskiy Reported-by: Trevor Woerner Signed-off-by: Miquel Raynal Tested-by: Trevor Woerner Acked-by: Vladimir Zapolskiy Link: https://lore.kernel.org/linux-mtd/20210413161840.345208-4-miquel.raynal@bootlin.com commit ad9ffdce453934cdc22fac0a0268119bd630260f Author: Miquel Raynal Date: Tue Apr 13 18:18:35 2021 +0200 mtd: rawnand: fsmc: Fix external use of SW Hamming ECC helper Since the Hamming software ECC engine has been updated to become a proper and independent ECC engine, it is now mandatory to either initialize the engine before using any one of his functions or use one of the bare helpers which only perform the calculations. As there is no actual need for a proper ECC initialization, let's just use the bare helper instead of the rawnand one. Fixes: 90ccf0a0192f ("mtd: nand: ecc-hamming: Rename the exported functions") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210413161840.345208-3-miquel.raynal@bootlin.com commit 56a8d3fd1f342d10ee7b27e9ac0f4d00b5fbb91c Author: Miquel Raynal Date: Tue Apr 13 18:18:34 2021 +0200 mtd: rawnand: cs553x: Fix external use of SW Hamming ECC helper Since the Hamming software ECC engine has been updated to become a proper and independent ECC engine, it is now mandatory to either initialize the engine before using any one of his functions or use one of the bare helpers which only perform the calculations. As there is no actual need for a proper ECC initialization, let's just use the bare helper instead of the rawnand one. Fixes: 90ccf0a0192f ("mtd: nand: ecc-hamming: Rename the exported functions") Cc: stable@vger.kernel.org Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210413161840.345208-2-miquel.raynal@bootlin.com commit 538ea65a9fd1194352a41313bff876b74b5d90c5 Author: Quanyang Wang Date: Fri Apr 30 14:40:41 2021 +0800 dmaengine: xilinx: dpdma: initialize registers before request_irq In some scenarios (kdump), dpdma hardware irqs has been enabled when calling request_irq in probe function, and then the dpdma irq handler xilinx_dpdma_irq_handler is invoked to access xdev->chan[i]. But at this moment xdev->chan[i] hasn't been initialized. We should ensure the dpdma controller to be in a consistent and clean state before further initialization. So add dpdma_hw_init() to do this. Furthermore, in xilinx_dpdma_disable_irq, disable all interrupts instead of error interrupts. This patch is to fix the kdump kernel crash as below: [ 3.696128] Unable to handle kernel NULL pointer dereference at virtual address 000000000000012c [ 3.696710] xilinx-zynqmp-dpdma fd4c0000.dma-controller: Xilinx DPDMA engine is probed [ 3.704900] Mem abort info: [ 3.704902] ESR = 0x96000005 [ 3.704905] EC = 0x25: DABT (current EL), IL = 32 bits [ 3.704907] SET = 0, FnV = 0 [ 3.704912] EA = 0, S1PTW = 0 [ 3.713800] ahci-ceva fd0c0000.ahci: supply ahci not found, using dummy regulator [ 3.715585] Data abort info: [ 3.715587] ISV = 0, ISS = 0x00000005 [ 3.715589] CM = 0, WnR = 0 [ 3.715592] [000000000000012c] user address but active_mm is swapper [ 3.715596] Internal error: Oops: 96000005 [#1] SMP [ 3.715599] Modules linked in: [ 3.715608] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.0-12170-g60894882155f-dirty #77 [ 3.723937] Hardware name: ZynqMP ZCU102 Rev1.0 (DT) [ 3.723942] pstate: 80000085 (Nzcv daIf -PAN -UAO -TCO BTYPE=--) [ 3.723956] pc : xilinx_dpdma_irq_handler+0x418/0x560 [ 3.793049] lr : xilinx_dpdma_irq_handler+0x3d8/0x560 [ 3.798089] sp : ffffffc01186bdf0 [ 3.801388] x29: ffffffc01186bdf0 x28: ffffffc011836f28 [ 3.806692] x27: ffffff8023e0ac80 x26: 0000000000000080 [ 3.811996] x25: 0000000008000408 x24: 0000000000000003 [ 3.817300] x23: ffffffc01186be70 x22: ffffffc011291740 [ 3.822604] x21: 0000000000000000 x20: 0000000008000408 [ 3.827908] x19: 0000000000000000 x18: 0000000000000010 [ 3.833212] x17: 0000000000000000 x16: 0000000000000000 [ 3.838516] x15: 0000000000000000 x14: ffffffc011291740 [ 3.843820] x13: ffffffc02eb4d000 x12: 0000000034d4d91d [ 3.849124] x11: 0000000000000040 x10: ffffffc0112d2d48 [ 3.854428] x9 : ffffffc0112d2d40 x8 : ffffff8021c00268 [ 3.859732] x7 : 0000000000000000 x6 : ffffffc011836000 [ 3.865036] x5 : 0000000000000003 x4 : 0000000000000000 [ 3.870340] x3 : 0000000000000001 x2 : 0000000000000000 [ 3.875644] x1 : 0000000000000000 x0 : 000000000000012c [ 3.880948] Call trace: [ 3.883382] xilinx_dpdma_irq_handler+0x418/0x560 [ 3.888079] __handle_irq_event_percpu+0x5c/0x178 [ 3.892774] handle_irq_event_percpu+0x34/0x98 [ 3.897210] handle_irq_event+0x44/0xb8 [ 3.901030] handle_fasteoi_irq+0xd0/0x190 [ 3.905117] generic_handle_irq+0x30/0x48 [ 3.909111] __handle_domain_irq+0x64/0xc0 [ 3.913192] gic_handle_irq+0x78/0xa0 [ 3.916846] el1_irq+0xc4/0x180 [ 3.919982] cpuidle_enter_state+0x134/0x2f8 [ 3.924243] cpuidle_enter+0x38/0x50 [ 3.927810] call_cpuidle+0x1c/0x40 [ 3.931290] do_idle+0x20c/0x270 [ 3.934502] cpu_startup_entry+0x28/0x58 [ 3.938410] rest_init+0xbc/0xcc [ 3.941631] arch_call_rest_init+0x10/0x1c [ 3.945718] start_kernel+0x51c/0x558 Fixes: 7cbb0c63de3f ("dmaengine: xilinx: dpdma: Add the Xilinx DisplayPort DMA engine driver") Signed-off-by: Quanyang Wang Link: https://lore.kernel.org/r/20210430064041.4058180-1-quanyang.wang@windriver.com Signed-off-by: Vinod Koul commit 4ad5dd2d7876d79507a20f026507d1a93b8fff10 Author: Bumyong Lee Date: Fri May 7 15:36:47 2021 +0900 dmaengine: pl330: fix wrong usage of spinlock flags in dma_cyclc flags varible which is the input parameter of pl330_prep_dma_cyclic() should not be used by spinlock_irq[save/restore] function. Signed-off-by: Jongho Park Signed-off-by: Bumyong Lee Signed-off-by: Chanho Park Link: https://lore.kernel.org/r/20210507063647.111209-1-chanho61.park@samsung.com Fixes: f6f2421c0a1c ("dmaengine: pl330: Merge dma_pl330_dmac and pl330_dmac structs") Cc: stable@vger.kernel.org Signed-off-by: Vinod Koul commit 17866bc6b2ae1c3075c9fe7bcbeb8ea50eb4c3fc Author: Zhen Lei Date: Sat May 8 11:00:56 2021 +0800 dmaengine: fsl-dpaa2-qdma: Fix error return code in two functions Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in the function where it is. Fixes: 7fdf9b05c73b ("dmaengine: fsl-dpaa2-qdma: Add NXP dpaa2 qDMA controller driver for Layerscape SoCs") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210508030056.2027-1-thunder.leizhen@huawei.com Signed-off-by: Vinod Koul commit 63c8af5687f6b1b70e9458cac1ffb25e86db1695 Author: Damien Le Moal Date: Mon May 10 08:48:06 2021 +0900 block: uapi: fix comment about block device ioctl Fix the comment mentioning ioctl command range used for zoned block devices to reflect the range of commands actually implemented. Signed-off-by: Damien Le Moal Link: https://lore.kernel.org/r/20210509234806.3000-1-damien.lemoal@wdc.com Signed-off-by: Jens Axboe commit 7ee06ddc4038f936b0d4459d37a7d4d844fb03db Author: Mikulas Patocka Date: Fri May 7 11:38:10 2021 -0400 dm snapshot: fix a crash when an origin has no snapshots If an origin target has no snapshots, o->split_boundary is set to 0. This causes BUG_ON(sectors <= 0) in block/bio.c:bio_split(). Fix this by initializing chunk_size, and in turn split_boundary, to rounddown_pow_of_two(UINT_MAX) -- the largest power of two that fits into "unsigned" type. Reported-by: Michael Tokarev Tested-by: Michael Tokarev Cc: stable@vger.kernel.org Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit e84749a78dc82bc545f12ce009e3dbcc2c5a8a91 Author: Takashi Iwai Date: Mon May 10 17:06:59 2021 +0200 ALSA: usb-audio: Validate MS endpoint descriptors snd_usbmidi_get_ms_info() may access beyond the border when a malformed descriptor is passed. This patch adds the sanity checks of the given MS endpoint descriptors, and skips invalid ones. Reported-by: syzbot+6bb23a5d5548b93c94aa@syzkaller.appspotmail.com Cc: Link: https://lore.kernel.org/r/20210510150659.17710-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8370e5b093080c03cf89f7ebf0bef6984545429e Author: Andy Shevchenko Date: Mon May 10 13:01:36 2021 +0300 hwmon: (ltc2992) Put fwnode in error case during ->probe() In each iteration fwnode_for_each_available_child_node() bumps a reference counting of a loop variable followed by dropping in on a next iteration, Since in error case the loop is broken, we have to drop a reference count by ourselves. Do it for port_fwnode in error case during ->probe(). Fixes: b0bd407e94b0 ("hwmon: (ltc2992) Add support") Cc: Alexandru Tachici Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210510100136.3303142-1-andy.shevchenko@gmail.com Signed-off-by: Guenter Roeck commit ba2b062ffa3db42f39316e11ceaff519091635e7 Merge: 6efb943b8616e 115726c5d312b Author: Greg Kroah-Hartman Date: Mon May 10 16:30:03 2021 +0200 Merge tag 'misc-habanalabs-fixes-2021-05-08' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-linus Oded writes: This tag contains the following fixes for 5.13-rc2: - Expose PLL information per ASIC. This also fixes some casting warnings. - Skip reading further firmware errors in case PCI link is down. - Security firmware error should be handled as error and not warning. - Allow user to ignore firmware errors. - Fix bug in timeout calculation when waiting for interrupt of CS. - Fix bug of potential use-after-free. * tag 'misc-habanalabs-fixes-2021-05-08' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory habanalabs: wait for interrupt wrong timeout calculation habanalabs: ignore f/w status error habanalabs: change error level of security not ready habanalabs: skip reading f/w errors on bad status habanalabs: expose ASIC specific PLL index commit 8c721cb0f742f9a01f2f1985b274b544f89904f4 Author: Christophe JAILLET Date: Wed Apr 28 10:44:19 2021 +0200 quota: Use 'hlist_for_each_entry' to simplify code Use 'hlist_for_each_entry' instead of hand writing it. This saves a few lines of code. Link: https://lore.kernel.org/r/f82d3e33964dcbd2aac19866735e0a8381c8a735.1619599407.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Jan Kara commit b577750e4157050ed6de5ca9083893027b8ece33 Author: Jan Kara Date: Mon May 3 12:06:03 2021 +0200 MAINTAINERS: Add Matthew Bobrowski as a reviewer Matthew helps with fanotify already for some time and he'd like to do more so let's add him as a reviewer. CC: Matthew Bobrowski Signed-off-by: Jan Kara commit 28ec344bb8911bb0d4910456b22ba0dd4f662521 Author: Saravana Kannan Date: Wed May 5 17:44:22 2021 -0700 usb: typec: tcpm: Don't block probing of consumers of "connector" nodes fw_devlink expects DT device nodes with "compatible" property to have struct devices created for them. Since the connector node might not be populated as a device, mark it as such so that fw_devlink knows not to wait on this fwnode being populated as a struct device. Without this patch, USB functionality can be broken on some boards. Fixes: f7514a663016 ("of: property: fw_devlink: Add support for remote-endpoint") Reported-by: John Stultz Tested-by: John Stultz Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20210506004423.345199-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 077cdb355b3d8ee0f258856962e6dac06e744401 Author: Dave Jiang Date: Mon Apr 26 16:32:24 2021 -0700 dmaengine: idxd: add missing dsa driver unregister The idxd_unregister_driver() has never been called for the idxd driver upon removal. Add fix to call unregister driver on module removal. Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161947994449.1053102.13189942817915448216.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 1c4841ccbd2b185587010d6178aac11953f61d4c Author: Dave Jiang Date: Mon Apr 26 16:09:19 2021 -0700 dmaengine: idxd: add engine 'struct device' missing bus type assignment engine 'struct device' setup is missing assigning the bus type. Add it to dsa_bus_type. Fixes: 75b911309060 ("dmaengine: idxd: fix engine conf_dev lifetime") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161947841562.984844.17505646725993659651.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit d9ff1096a840dddea3d5cfa2149ff7da9f499fb2 Author: Christophe JAILLET Date: Tue May 4 22:26:29 2021 +0200 usb: musb: Fix an error message 'ret' is known to be 0 here. Initialize 'ret' with the expected error code before using it. Fixes: 0990366bab3c ("usb: musb: Add support for MediaTek musb controller") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/69f514dc7134e3c917cad208e73cc650cb9e2bd6.1620159879.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit f1fbd950b59b67bc5c202216c8e1c6ca8c99a3b4 Author: Kyle Tso Date: Fri May 7 14:23:00 2021 +0800 usb: typec: tcpm: Fix wrong handling for Not_Supported in VDM AMS Not_Supported Message is acceptable in VDM AMS. Redirect the VDM state machine to VDM_STATE_DONE when receiving Not_Supported and finish the VDM AMS. Also, after the loop in vdm_state_machine_work, add more conditions of VDM states to clear the vdm_sm_running flag because those are all stopping states when leaving the loop. In addition, finish the VDM AMS if the port partner responds BUSY. Fixes: 8dea75e11380 ("usb: typec: tcpm: Protocol Error handling") Fixes: 8d3a0578ad1a ("usb: typec: tcpm: Respond Wait if VDM state machine is running") Reviewed-by: Guenter Roeck Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210507062300.1945009-3-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit c34e85fa69b9f4568f19da3af06c3870dd8fcc50 Author: Kyle Tso Date: Fri May 7 14:22:59 2021 +0800 usb: typec: tcpm: Send DISCOVER_IDENTITY from dedicated work In current design, DISCOVER_IDENTITY is queued to VDM state machine immediately in Ready states and never retries if it fails in the AMS. Move the process to a delayed work so that when it fails for some reasons (e.g. Sink Tx No Go), it can be retried by queueing the work again. Also fix a problem that the vdm_state is not set to a proper state if it is blocked by Collision Avoidance mechanism. Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Link: https://lore.kernel.org/r/20210507062300.1945009-2-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit 1f4642b72be79757f050924a9b9673b6a02034bc Author: Jack Pham Date: Mon May 3 00:46:11 2021 -0700 usb: typec: ucsi: Retrieve all the PDOs instead of just the first 4 commit 4dbc6a4ef06d ("usb: typec: ucsi: save power data objects in PD mode") introduced retrieval of the PDOs when connected to a PD-capable source. But only the first 4 PDOs are received since that is the maximum number that can be fetched at a time given the MESSAGE_IN length limitation (16 bytes). However, as per the PD spec a connected source may advertise up to a maximum of 7 PDOs. If such a source is connected it's possible the PPM could have negotiated a power contract with one of the PDOs at index greater than 4, and would be reflected in the request data object's (RDO) object position field. This would result in an out-of-bounds access when the rdo_index() is used to index into the src_pdos array in ucsi_psy_get_voltage_now(). With the help of the UBSAN -fsanitize=array-bounds checker enabled this exact issue is revealed when connecting to a PD source adapter that advertise 5 PDOs and the PPM enters a contract having selected the 5th one. [ 151.545106][ T70] Unexpected kernel BRK exception at EL1 [ 151.545112][ T70] Internal error: BRK handler: f2005512 [#1] PREEMPT SMP ... [ 151.545499][ T70] pc : ucsi_psy_get_prop+0x208/0x20c [ 151.545507][ T70] lr : power_supply_show_property+0xc0/0x328 ... [ 151.545542][ T70] Call trace: [ 151.545544][ T70] ucsi_psy_get_prop+0x208/0x20c [ 151.545546][ T70] power_supply_uevent+0x1a4/0x2f0 [ 151.545550][ T70] dev_uevent+0x200/0x384 [ 151.545555][ T70] kobject_uevent_env+0x1d4/0x7e8 [ 151.545557][ T70] power_supply_changed_work+0x174/0x31c [ 151.545562][ T70] process_one_work+0x244/0x6f0 [ 151.545564][ T70] worker_thread+0x3e0/0xa64 We can resolve this by instead retrieving and storing up to the maximum of 7 PDOs in the con->src_pdos array. This would involve two calls to the GET_PDOS command. Fixes: 992a60ed0d5e ("usb: typec: ucsi: register with power_supply class") Fixes: 4dbc6a4ef06d ("usb: typec: ucsi: save power data objects in PD mode") Cc: stable@vger.kernel.org Reported-and-tested-by: Subbaraman Narayanamurthy Reviewed-by: Heikki Krogerus Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210503074611.30973-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 2d101db3e5be3bbee6001d4227705cec70ecb82e Author: Václav Kubernát Date: Thu Apr 29 09:53:38 2021 +0200 hwmon: (pmbus/fsp-3y) Fix FSP-3Y YH-5151E non-compliant vout encoding I didn't properly test the driver for YH-5151E, so it was completely broken. Firstly, the log/real mapping was incorrect in one case. Secondly, PMBus specifies that output voltages should be in the linear16 encoding. However, the YH-5151E is non-compliant and uses linear11. YM-2151E isn't affected by this. Fix this by converting the values inside the read functions. linear16 gets the exponent from the VOUT_MODE command. The device doesn't support it, so I have to manually supply the value for it. Both supported devices have now been tested to report correct vout values. Fixes: 1734b4135a62 ("hwmon: Add driver for fsp-3y PSUs and PDUs") Signed-off-by: Václav Kubernát Link: https://lore.kernel.org/r/20210429075337.110502-1-kubernat@cesnet.cz Signed-off-by: Guenter Roeck commit 5216dff22dc2bbbbe6f00335f9fd2879670e753b Author: Eddie James Date: Thu Apr 29 10:13:36 2021 -0500 hwmon: (occ) Fix poll rate limiting The poll rate limiter time was initialized at zero. This breaks the comparison in time_after if jiffies is large. Switch to storing the next update time rather than the previous time, and initialize the time when the device is probed. Fixes: c10e753d43eb ("hwmon (occ): Add sensor types and versions") Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210429151336.18980-1-eajames@linux.ibm.com Signed-off-by: Guenter Roeck commit 726c945ab2ebd104631b6105ab455a5bc604a3f1 Author: Wan Jiabing Date: Tue Apr 27 12:42:19 2021 +0800 hwmon: (corsair-psu) Remove unneeded semicolons Fix the following coccicheck warning: ./drivers/hwmon/corsair-psu.c:379:2-3: Unneeded semicolon Remove unneeded semicolons. Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210427044219.7799-1-wanjiabing@vivo.com Signed-off-by: Guenter Roeck commit 5b44955dc19808fa209444ccb192343050e95ab0 Author: Geert Uytterhoeven Date: Tue Apr 13 14:21:58 2021 +0200 irqchip/apple-aic: APPLE_AIC should depend on ARCH_APPLE The Apple Interrupt Controller is only present on Apple Silicon SoCs. Hence add a dependency on ARCH_APPLE, to prevent asking the user about this driver when configuring a kernel without Apple Silicon SoC support. Drop the default, as ARCH_APPLE already selects APPLE_AIC. Fixes: 76cde26394114f6a ("irqchip/apple-aic: Add support for the Apple Interrupt Controller") Signed-off-by: Geert Uytterhoeven Acked-by: Hector Martin Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/f37e8daea37d50651d2164b0b3dad90780188548.1618316398.git.geert+renesas@glider.be commit be1c2bb3ba5a39c20b1d54e01ffbcb2b1ca7e46c Author: Marc Zyngier Date: Tue Apr 27 09:00:28 2021 +0100 ARM: PXA: Fix cplds irqdesc allocation when using legacy mode The Mainstone PXA platform uses CONFIG_SPARSE_IRQ, and thus we cannot rely on the irq descriptors to be readilly allocated before creating the irqdomain in legacy mode. The kernel then complains loudly about not being able to associate the interrupt in the domain -- can't blame it. Fix it by allocating the irqdescs upfront in the legacy case. Fixes: b68761da0111 ("ARM: PXA: Kill use of irq_create_strict_mappings()") Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210426223942.GA213931@roeck-us.net commit a60a34366e0d09ca002c966dd7c43a68c28b1f82 Author: Christophe JAILLET Date: Thu May 6 22:39:10 2021 +0200 usb: fotg210-hcd: Fix an error message 'retval' is known to be -ENODEV here. This is a hard-coded default error code which is not useful in the error message. Moreover, another error message is printed at the end of the error handling path. The corresponding error code (-ENOMEM) is more informative. So remove simplify the first error message. While at it, also remove the useless initialization of 'retval'. Fixes: 7d50195f6c50 ("usb: host: Faraday fotg210-hcd driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/94531bcff98e46d4f9c20183a90b7f47f699126c.1620333419.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit f75297853470627c4ee4e2b80eed40af7441c96b Author: Wei Ming Chen Date: Thu May 6 20:20:20 2021 +0800 docs: usb: function: Modify path name Original path does not exists, so changed to "Documentation/ABI/testing/configfs-usb-gadget" Signed-off-by: Wei Ming Chen Link: https://lore.kernel.org/r/20210506122020.7117-1-jj251510319013@gmail.com Signed-off-by: Greg Kroah-Hartman commit e17b02d4970913233d543c79c9c66e72cac05bdd Author: Marcel Hamer Date: Tue Apr 27 14:21:18 2021 +0200 usb: dwc3: omap: improve extcon initialization When extcon is used in combination with dwc3, it is assumed that the dwc3 registers are untouched and as such are only configured if VBUS is valid or ID is tied to ground. In case VBUS is not valid or ID is floating, the registers are not configured as such during driver initialization, causing a wrong default state during boot. If the registers are not in a default state, because they are for instance touched by a boot loader, this can cause for a kernel error. Signed-off-by: Marcel Hamer Link: https://lore.kernel.org/r/20210427122118.1948340-1-marcel@solidxs.se Cc: stable Signed-off-by: Greg Kroah-Hartman commit b9a0866a5bdf6a4643a52872ada6be6184c6f4f2 Author: Andy Shevchenko Date: Wed May 5 01:23:37 2021 +0300 usb: typec: ucsi: Put fwnode in any case during ->probe() device_for_each_child_node() bumps a reference counting of a returned variable. We have to balance it whenever we return to the caller. Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") Cc: Heikki Krogerus Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210504222337.3151726-1-andy.shevchenko@gmail.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit af0e1871d79cfbb91f732d2c6fa7558e45c31038 Author: Colin Ian King Date: Fri May 7 19:30:41 2021 +0100 iio: tsl2583: Fix division by a zero lux_val The lux_val returned from tsl2583_get_lux can potentially be zero, so check for this to avoid a division by zero and an overflowed gain_trim_val. Fixes clang scan-build warning: drivers/iio/light/tsl2583.c:345:40: warning: Either the condition 'lux_val<0' is redundant or there is division by zero at line 345. [zerodivcond] Fixes: ac4f6eee8fe8 ("staging: iio: TAOS tsl258x: Device driver") Signed-off-by: Colin Ian King Cc: Signed-off-by: Jonathan Cameron commit af0670b0bf1b116fd729b1b1011cf814bc34e12e Author: Alexandru Ardelean Date: Mon May 3 17:43:50 2021 +0300 iio: core: return ENODEV if ioctl is unknown When the ioctl() mechanism was introduced in IIO core to centralize the registration of all ioctls in one place via commit 8dedcc3eee3ac ("iio: core: centralize ioctl() calls to the main chardev"), the return code was changed from ENODEV to EINVAL, when the ioctl code isn't known. This was done by accident. This change reverts back to the old behavior, where if the ioctl() code isn't known, ENODEV is returned (vs EINVAL). This was brought into perspective by this patch: https://lore.kernel.org/linux-iio/20210428150815.136150-1-paul@crapouillou.net/ Fixes: 8dedcc3eee3ac ("iio: core: centralize ioctl() calls to the main chardev") Signed-off-by: Alexandru Ardelean Reviewed-by: Nuno Sá Tested-by: Paul Cercueil Reviewed-by: Linus Walleij Signed-off-by: Jonathan Cameron commit 901f84de0e16bde10a72d7eb2f2eb73fcde8fa1a Author: Tomasz Duszynski Date: Fri Apr 23 10:02:44 2021 +0200 iio: core: fix ioctl handlers removal Currently ioctl handlers are removed twice. For the first time during iio_device_unregister() then later on inside iio_device_unregister_eventset() and iio_buffers_free_sysfs_and_mask(). Double free leads to kernel panic. Fix this by not touching ioctl handlers list directly but rather letting code responsible for registration call the matching cleanup routine itself. Fixes: 8dedcc3eee3ac ("iio: core: centralize ioctl() calls to the main chardev") Signed-off-by: Tomasz Duszynski Acked-by: Alexandru Ardelean Cc: Link: https://lore.kernel.org/r/20210423080244.2790-1-tomasz.duszynski@octakon.com Signed-off-by: Jonathan Cameron commit f73c730774d88a14d7b60feee6d0e13570f99499 Author: Dmitry Osipenko Date: Fri Apr 23 05:09:59 2021 +0300 iio: gyro: mpu3050: Fix reported temperature value The raw temperature value is a 16-bit signed integer. The sign casting is missing in the code, which results in a wrong temperature reported by userspace tools, fix it. Cc: stable@vger.kernel.org Fixes: 3904b28efb2c ("iio: gyro: Add driver for the MPU-3050 gyroscope") Datasheet: https://www.cdiweb.com/datasheets/invensense/mpu-3000a.pdf Tested-by: Maxim Schwalm # Asus TF700T Tested-by: Svyatoslav Ryhel # Asus TF201 Reported-by: Svyatoslav Ryhel Reviewed-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Dmitry Osipenko Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20210423020959.5023-1-digetx@gmail.com Signed-off-by: Jonathan Cameron commit 7061803522ee7876df1ca18cdd1e1551f761352d Author: Alexandru Ardelean Date: Wed Apr 14 11:49:55 2021 +0300 iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER During commit 067fda1c065ff ("iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger"), the iio_triggered_buffer_{setup,cleanup}() functions got moved under the hid-sensor-trigger module. The above change works fine, if any of the sensors get built. However, when only the common hid-sensor-trigger module gets built (and none of the drivers), then the IIO_TRIGGERED_BUFFER symbol isn't selected/enforced. Previously, each driver would enforce/select the IIO_TRIGGERED_BUFFER symbol. With this change the HID_SENSOR_IIO_TRIGGER (for the hid-sensor-trigger module) will enforce that IIO_TRIGGERED_BUFFER gets selected. All HID sensor drivers select the HID_SENSOR_IIO_TRIGGER symbol. So, this change removes the IIO_TRIGGERED_BUFFER enforcement from each driver. Fixes: 067fda1c065ff ("iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger") Reported-by: Thomas Deutschmann Cc: Srinivas Pandruvada Signed-off-by: Alexandru Ardelean Acked-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20210414084955.260117-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit a2fa9242e89f27696515699fe0f0296bf1ac1815 Author: Dinghao Liu Date: Mon Apr 12 13:32:02 2021 +0800 iio: proximity: pulsedlight: Fix rumtime PM imbalance on error When lidar_write_control() fails, a pairing PM usage counter decrement is needed to keep the counter balanced. Fixes: 4ac4e086fd8c5 ("iio: pulsedlight-lidar-lite: add runtime PM") Signed-off-by: Dinghao Liu Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210412053204.4889-1-dinghao.liu@zju.edu.cn Signed-off-by: Jonathan Cameron commit 8edb79af88efc6e49e735f9baf61d9f0748b881f Author: Dinghao Liu Date: Wed Apr 7 11:49:27 2021 +0800 iio: light: gp2ap002: Fix rumtime PM imbalance on error When devm_request_threaded_irq() fails, we should decrease the runtime PM counter to keep the counter balanced. But when iio_device_register() fails, we need not to decrease it because we have already decreased it before. Signed-off-by: Dinghao Liu Reviewed-by: Linus Walleij Fixes: 97d642e23037 ("iio: light: Add a driver for Sharp GP2AP002x00F") Link: https://lore.kernel.org/r/20210407034927.16882-1-dinghao.liu@zju.edu.cn Signed-off-by: Jonathan Cameron commit 2e2b8d15adc2f6ab2d4aa0550e241b9742a436a0 Author: Kyle Tso Date: Tue May 4 01:18:49 2021 +0800 usb: typec: tcpm: Fix wrong handling in GET_SINK_CAP After receiving Sink Capabilities Message in GET_SINK_CAP AMS, it is incorrect to call tcpm_pd_handle_state because the Message is expected and the current state is not Ready states. The result of this incorrect operation ends in Soft Reset which is definitely wrong. Simply forwarding to Ready States is enough to finish the AMS. Fixes: 8dea75e11380 ("usb: typec: tcpm: Protocol Error handling") Reviewed-by: Guenter Roeck Acked-by: Heikki Krogerus Signed-off-by: Kyle Tso Cc: stable Link: https://lore.kernel.org/r/20210503171849.2605302-1-kyletso@google.com Signed-off-by: Greg Kroah-Hartman commit e89baeba4f64bab679618b3330cdcda5929fb8d5 Author: Matthijs Kooijman Date: Mon May 3 20:05:38 2021 +0200 usb: dwc2: Remove obsolete MODULE_ constants from platform.c Originally, the core and platform drivers were separate modules, so each had its own module info. Since commit 2d1165a4b95e (usb: dwc2: remove dwc2_platform.ko) platform.c is included in the core module, which now contains duplicate module info (from core.c and platform.c). Due to the linking order and modinfo implementation, running `modinfo` on the resulting dwc2.ko shows just the info from platform.c, rather than that from core.c, suggesting that I am the author of the entire dwc2 module. Since platform.c is just a minor part of the entire module, this removes its module info in favor of the info from core.c. Acked-by: Minas Harutyunyan Signed-off-by: Matthijs Kooijman Link: https://lore.kernel.org/r/20210503180538.64423-1-matthijs@stdin.nl Signed-off-by: Greg Kroah-Hartman commit 0b2b149e918f6dddb4ea53615551bf7bc131f875 Author: Zhen Lei Date: Sat May 8 09:53:10 2021 +0800 usb: dwc3: imx8mp: fix error return code in dwc3_imx8mp_probe() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 6dd2565989b4 ("usb: dwc3: add imx8mp dwc3 glue layer driver") Reported-by: Hulk Robot Acked-by: Felipe Balbi Signed-off-by: Zhen Lei Cc: stable Link: https://lore.kernel.org/r/20210508015310.1627-1-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit b96992081fde19806b5beb5b25f9327820ead77b Author: Li Jun Date: Fri Apr 30 14:57:16 2021 +0800 usb: dwc3: imx8mp: detect dwc3 core node via compatible string New schema of usb controller DT-node should be named with prefix "^usb(@.*)?", dt changed the node name, but missed counter part change in driver, fix it by switching to use compatible string as the dwc3 core compatible string keeps "snps,dwc3" in all dt. Fixes: d1689cd3c0f4 ("arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3"") Acked-by: Felipe Balbi Signed-off-by: Li Jun Link: https://lore.kernel.org/r/1619765836-20387-1-git-send-email-jun.li@nxp.com Signed-off-by: Greg Kroah-Hartman commit 18ffa988dbae69cc6e9949cddd9606f6fe533894 Author: Wesley Cheng Date: Fri May 7 10:55:19 2021 -0700 usb: dwc3: gadget: Return success always for kick transfer in ep queue If an error is received when issuing a start or update transfer command, the error handler will stop all active requests (including the current USB request), and call dwc3_gadget_giveback() to notify function drivers of the requests which have been stopped. Avoid returning an error for kick transfer during EP queue, to remove duplicate cleanup operations on the request being queued. Fixes: 8d99087c2db8 ("usb: dwc3: gadget: Properly handle failed kick_transfer") cc: stable@vger.kernel.org Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1620410119-24971-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit bb9c74a5bd1462499fe5ccb1e3c5ac40dcfa9139 Author: Jack Pham Date: Sat May 1 02:35:58 2021 -0700 usb: dwc3: gadget: Free gadget structure only after freeing endpoints As part of commit e81a7018d93a ("usb: dwc3: allocate gadget structure dynamically") the dwc3_gadget_release() was added which will free the dwc->gadget structure upon the device's removal when usb_del_gadget_udc() is called in dwc3_gadget_exit(). However, simply freeing the gadget results a dangling pointer situation: the endpoints created in dwc3_gadget_init_endpoints() have their dep->endpoint.ep_list members chained off the list_head anchored at dwc->gadget->ep_list. Thus when dwc->gadget is freed, the first dwc3_ep in the list now has a dangling prev pointer and likewise for the next pointer of the dwc3_ep at the tail of the list. The dwc3_gadget_free_endpoints() that follows will result in a use-after-free when it calls list_del(). This was caught by enabling KASAN and performing a driver unbind. The recent commit 568262bf5492 ("usb: dwc3: core: Add shutdown callback for dwc3") also exposes this as a panic during shutdown. There are a few possibilities to fix this. One could be to perform a list_del() of the gadget->ep_list itself which removes it from the rest of the dwc3_ep chain. Another approach is what this patch does, by splitting up the usb_del_gadget_udc() call into its separate "del" and "put" components. This allows dwc3_gadget_free_endpoints() to be called before the gadget is finally freed with usb_put_gadget(). Fixes: e81a7018d93a ("usb: dwc3: allocate gadget structure dynamically") Reviewed-by: Peter Chen Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210501093558.7375-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 75a41ce46bae6cbe7d3bb2584eb844291d642874 Author: Phil Elwell Date: Thu May 6 12:22:00 2021 +0100 usb: dwc2: Fix gadget DMA unmap direction The dwc2 gadget support maps and unmaps DMA buffers as necessary. When mapping and unmapping it uses the direction of the endpoint to select the direction of the DMA transfer, but this fails for Control OUT transfers because the unmap occurs after the endpoint direction has been reversed for the status phase. A possible solution would be to unmap the buffer before the direction is changed, but a safer, less invasive fix is to remember the buffer direction independently of the endpoint direction. Fixes: fe0b94abcdf6 ("usb: dwc2: gadget: manage ep0 state in software") Acked-by: Minas Harutyunyan Cc: stable Signed-off-by: Phil Elwell Link: https://lore.kernel.org/r/20210506112200.2893922-1-phil@raspberrypi.com Signed-off-by: Greg Kroah-Hartman commit 6f26ebb79a84bcad211cb2d8a2ef74dfc427322d Author: Jack Pham Date: Wed Apr 28 02:01:11 2021 -0700 usb: dwc3: gadget: Rename EOPF event macros to Suspend The device event corresponding to End of Periodic Frame is only found on older IP revisions (2.10a and prior, according to a cursory SNPS databook search). On revisions 2.30a and newer, including DWC3.1, the same event value and corresponding DEVTEN bit were repurposed to indicate that the link has gone into suspend state (U3 or L2/L1). EOPF events had never been enabled before in this driver, and going forward we expect current and future DWC3-based devices won't likely to be using such old DWC3 IP revisions either. Hence rather than keeping the deprecated EOPF macro names let's rename them to indicate their usage for suspend events. Acked-by: Felipe Balbi Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210428090111.3370-2-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit d1d90dd27254c44d087ad3f8b5b3e4fff0571f45 Author: Jack Pham Date: Wed Apr 28 02:01:10 2021 -0700 usb: dwc3: gadget: Enable suspend events commit 72704f876f50 ("dwc3: gadget: Implement the suspend entry event handler") introduced (nearly 5 years ago!) an interrupt handler for U3/L1-L2 suspend events. The problem is that these events aren't currently enabled in the DEVTEN register so the handler is never even invoked. Fix this simply by enabling the corresponding bit in dwc3_gadget_enable_irq() using the same revision check as found in the handler. Fixes: 72704f876f50 ("dwc3: gadget: Implement the suspend entry event handler") Acked-by: Felipe Balbi Signed-off-by: Jack Pham Cc: stable Link: https://lore.kernel.org/r/20210428090111.3370-1-jackp@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 6c05cdbb9ef1de0264cac9135f6e90dad1e8763f Author: Fabio Estevam Date: Sun Apr 25 12:32:53 2021 -0300 usb: Restore the reference to ch9.h Keep the textual reference to ch9.h as it was prior to commit caa93d9bd2d7 ("usb: Fix up movement of USB core kerneldoc location"). As linux/usb/ch9.h does not contain comments anymore, explain that drivers/usb/common/common.c includes such header and provides declarations of a few utilities routines for manipulating the data types from ch9.h. Also mention that drivers/usb/common/debug.c contains some functions for creating debug output. Fixes: caa93d9bd2d7 ("usb: Fix up movement of USB core kerneldoc location") Reported-by: Alan Stern Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210425153253.2542816-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9cbc7eb17cdf6d1adaa2aebfe0079077d31d39a9 Author: Thinh Nguyen Date: Mon Apr 26 14:08:40 2021 -0700 usb: dwc3: core: Add missing GHWPARAMS9 doc Add missing documentation for struct dwc3_hwparams new field hwparams9 to avoid kernel doc build warning. Fixes: 16710380d3aa ("usb: dwc3: Capture new capability register GHWPARAMS9") Reported-by: Stephen Rothwell Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/f4c491f7614e623755fafe640b7e690e7c5634e2.1619471127.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 04357fafea9c7ed34525eb9680c760245c3bb958 Author: Ferry Toth Date: Sun Apr 25 17:09:47 2021 +0200 usb: dwc3: pci: Enable usb2-gadget-lpm-disable for Intel Merrifield On Intel Merrifield LPM is causing host to reset port after a timeout. By disabling LPM entirely this is prevented. Fixes: 066c09593454 ("usb: dwc3: pci: Enable extcon driver for Intel Merrifield") Reviewed-by: Andy Shevchenko Signed-off-by: Ferry Toth Cc: stable Link: https://lore.kernel.org/r/20210425150947.5862-1-ftoth@exalondelft.nl Signed-off-by: Greg Kroah-Hartman commit 18abf874367456540846319574864e6ff32752e2 Author: Oliver Neukum Date: Mon Apr 26 11:26:22 2021 +0200 cdc-wdm: untangle a circular dependency between callback and softint We have a cycle of callbacks scheduling works which submit URBs with those callbacks. This needs to be blocked, stopped and unblocked to untangle the circle. Signed-off-by: Oliver Neukum Link: https://lore.kernel.org/r/20210426092622.20433-1-oneukum@suse.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit a1149a6c06ee094a6e62886b0c0e8e66967a728a Author: Daniel Beer Date: Sat Apr 24 20:16:52 2021 +1200 mmc: sdhci-pci-gli: increase 1.8V regulator wait Inserting an SD-card on an Intel NUC10i3FNK4 (which contains a GL9755) results in the message: mmc0: 1.8V regulator output did not become stable Following this message, some cards work (sometimes), but most cards fail with EILSEQ. This behaviour is observed on Debian 10 running kernel 4.19.188, but also with 5.8.18 and 5.11.15. The driver currently waits 5ms after switching on the 1.8V regulator for it to become stable. Increasing this to 10ms gets rid of the warning about stability, but most cards still fail. Increasing it to 20ms gets some cards working (a 32GB Samsung micro SD works, a 128GB ADATA doesn't). At 50ms, the ADATA works most of the time, and at 100ms both cards work reliably. Signed-off-by: Daniel Beer Acked-by: Ben Chuang Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210424081652.GA16047@nyquist.nev Signed-off-by: Ulf Hansson commit 9b81354d7ebc1fd17f666a168dcabf27dae290bd Author: Neil Armstrong Date: Mon Apr 26 19:55:59 2021 +0200 mmc: meson-gx: also check SD_IO_RW_EXTENDED for scatterlist size alignment The brcmfmac driver can generate a scatterlist from a skb with each packets not aligned to the block size. This is not supported by the Amlogic Descriptor dma engine where each descriptor must match a multiple of the block size. The sg list is valid, since the sum of the sg buffers is a multiple of the block size, but we must discard those when in SD_IO_RW_EXTENDED mode since SDIO block mode can be used under the hood even with data->blocks == 1. Those transfers are very rare, thus can be replaced by a bounce buffer without real performance loss. Fixes: 7412dee9f1fd ("mmc: meson-gx: replace WARN_ONCE with dev_warn_once about scatterlist size alignment in block mode") Cc: stable@vger.kernel.org Reported-by: Christian Hewitt Signed-off-by: Neil Armstrong Link: https://lore.kernel.org/r/20210426175559.3110575-2-narmstrong@baylibre.com Signed-off-by: Ulf Hansson commit cabb1bb60e88ccaaa122ba01862403cd44e8e8f8 Author: Neil Armstrong Date: Mon Apr 26 19:55:58 2021 +0200 mmc: meson-gx: make replace WARN_ONCE with dev_warn_once about scatterlist offset alignment Some drivers like ath10k can sometimg give an sg buffer with an offset whose alignment is not compatible with the Amlogic DMA descriptor engine requirements. Simply replace with dev_warn_once() to inform user this should be fixed to avoid degraded performance. This should be ultimately fixed in ath10k, but since it's only a performance issue the warning should be removed. Fixes: 79ed05e329c3 ("mmc: meson-gx: add support for descriptor chain mode") Cc: stable@vger.kernel.org Reported-by: Christian Hewitt Signed-off-by: Neil Armstrong Acked-by: Martin Blumenstingl Link: https://lore.kernel.org/r/20210426175559.3110575-1-narmstrong@baylibre.com Signed-off-by: Ulf Hansson commit 14b6cff54edaca5740068e9ed070152727ed7718 Author: Arnd Bergmann Date: Thu Apr 22 17:26:19 2021 +0200 staging: rtl8723bs: avoid bogus gcc warning gcc gets confused by some of the type casts and produces an apparently senseless warning about an out-of-bound memcpy to an unrelated array in the same structure: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function 'rtw_cfg80211_ap_set_encryption': cc1: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=] In file included from drivers/staging/rtl8723bs/include/drv_types.h:32, from drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:10: drivers/staging/rtl8723bs/include/rtw_security.h:98:15: note: at offset [184, 4264] into destination object 'dot11AuthAlgrthm' of size 4 98 | u32 dot11AuthAlgrthm; /* 802.11 auth, could be open, shared, 8021x and authswitch */ | ^~~~~~~~~~~~~~~~ cc1: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=] drivers/staging/rtl8723bs/include/rtw_security.h:98:15: note: at offset [264, 4344] into destination object 'dot11AuthAlgrthm' of size 4 This is a known gcc bug, and the patch here is only a workaround, but the approach of using a temporary variable to hold a pointer to the key also improves readability in addition to avoiding the warning, so overall this should still help. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99673 Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210422152648.2891996-1-arnd@kernel.org Cc: stable Signed-off-by: Greg Kroah-Hartman commit 29038ae2ae566d9441e81cda3539db17c20bf06a Author: Rafael J. Wysocki Date: Mon May 10 14:02:17 2021 +0200 Revert "Revert "ACPI: scan: Turn off unused power resources during initialization"" Revert commit 5db91e9cb5b3 ("Revert "ACPI: scan: Turn off unused power resources during initialization") which was not necessary. Signed-off-by: Rafael J. Wysocki commit 71d7924b3e8acaca6a3b0fc3261170031ada3b70 Author: Arnaldo Carvalho de Melo Date: Sun May 9 10:29:10 2021 -0300 tools headers UAPI: Sync perf_event.h with the kernel sources To pick up the changes in: 2b26f0aa004995f4 ("perf: Support only inheriting events if cloned with CLONE_THREAD") 2e498d0a74e5b88a ("perf: Add support for event removal on exec") 547b60988e631f74 ("perf: aux: Add flags for the buffer format") 55bcf6ef314ae8ba ("perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE") 7dde51767ca5339e ("perf: aux: Add CoreSight PMU buffer formats") 97ba62b278674293 ("perf: Add support for SIGTRAP on perf events") d0d1dd628527c77d ("perf core: Add PERF_COUNT_SW_CGROUP_SWITCHES event") Also change the expected sizeof(struct perf_event_attr) from 120 to 128 due to fields being added for the SIGTRAP changes. Addressing this perf build warning: 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 Cc: Kan Liang Cc: Marco Elver Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Suzuki K Poulose Signed-off-by: Arnaldo Carvalho de Melo commit 6faf64f5248166ecaf50107e883c383e0b66bb70 Author: Arnaldo Carvalho de Melo Date: Sun May 9 10:24:29 2021 -0300 tools headers cpufeatures: Sync with the kernel sources To pick the changes from: 4e6292114c741221 ("x86/paravirt: Add new features for paravirt patching") a161545ab53b174c ("x86/cpufeatures: Enumerate Intel Hybrid Technology feature bit") a89dfde3dc3c2dbf ("x86: Remove dynamic NOP selection") b8921dccf3b25798 ("x86/cpufeatures: Add SGX1 and SGX2 sub-features") f21d4d3b97a86035 ("x86/cpufeatures: Enumerate #DB for bus lock detection") f333374e108e7e4c ("x86/cpufeatures: Add the Virtual SPEC_CTRL feature") This only causes these perf files to be rebuilt: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses 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: Babu Moger Cc: Borislav Petkov Cc: Fenghua Yu Cc: Juergen Gross Cc: Paolo Bonzini Cc: Peter Zijlstra Cc: Ricardo Neri Cc: Sean Christopherson Cc: Thomas Gleixner Signed-off-by: Arnaldo Carvalho de Melo commit 3916329309eace19e8c32bc821064a119474c309 Author: Arnaldo Carvalho de Melo Date: Sun May 9 10:21:33 2021 -0300 tools include UAPI powerpc: Sync errno.h with the kernel headers To pick the change in: 7de21e679e6a789f ("powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h") That will make the errno number -> string tables to pick this change on powerpc. Silencing this perf build warning: Warning: Kernel ABI header at 'tools/arch/powerpc/include/uapi/asm/errno.h' differs from latest version at 'arch/powerpc/include/uapi/asm/errno.h' diff -u tools/arch/powerpc/include/uapi/asm/errno.h arch/powerpc/include/uapi/asm/errno.h Cc: Michael Ellerman Cc: Tony Ambardar Signed-off-by: Arnaldo Carvalho de Melo commit fb24e308b6310541e70d11a3f19dc40742974b95 Author: Arnaldo Carvalho de Melo Date: Sun May 9 10:19:37 2021 -0300 tools arch: Update arch/x86/lib/mem{cpy,set}_64.S copies used in 'perf bench mem memcpy' To bring in the change made in this cset: 5e21a3ecad1500e3 ("x86/alternative: Merge include files") This just silences these perf tools build warnings, no change in the tools: Warning: Kernel ABI header at 'tools/arch/x86/lib/memcpy_64.S' differs from latest version at 'arch/x86/lib/memcpy_64.S' diff -u tools/arch/x86/lib/memcpy_64.S arch/x86/lib/memcpy_64.S Warning: Kernel ABI header at 'tools/arch/x86/lib/memset_64.S' differs from latest version at 'arch/x86/lib/memset_64.S' diff -u tools/arch/x86/lib/memset_64.S arch/x86/lib/memset_64.S Cc: Borislav Petkov Cc: Juergen Gross Signed-off-by: Arnaldo Carvalho de Melo commit 5a80ee4219a52194f0e815bbceec40eb32c523ec Author: Arnaldo Carvalho de Melo Date: Sun May 9 10:06:40 2021 -0300 tools headers UAPI: Sync linux/prctl.h with the kernel sources To pick a new prctl introduced in: 201698626fbca1cf ("arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS)") That results in $ grep prctl tools/perf/trace/beauty/*.sh tools/perf/trace/beauty/prctl_option.sh:printf "static const char *prctl_options[] = {\n" tools/perf/trace/beauty/prctl_option.sh:egrep $regex ${header_dir}/prctl.h | grep -v PR_SET_PTRACER | \ tools/perf/trace/beauty/prctl_option.sh:printf "static const char *prctl_set_mm_options[] = {\n" tools/perf/trace/beauty/prctl_option.sh:egrep $regex ${header_dir}/prctl.h | \ tools/perf/trace/beauty/x86_arch_prctl.sh:prctl_arch_header=${x86_header_dir}/prctl.h tools/perf/trace/beauty/x86_arch_prctl.sh: printf "#define x86_arch_prctl_codes_%d_offset %s\n" $idx $first_entry tools/perf/trace/beauty/x86_arch_prctl.sh: printf "static const char *x86_arch_prctl_codes_%d[] = {\n" $idx tools/perf/trace/beauty/x86_arch_prctl.sh: egrep -q $regex ${prctl_arch_header} && \ tools/perf/trace/beauty/x86_arch_prctl.sh: (egrep $regex ${prctl_arch_header} | \ $ tools/perf/trace/beauty/prctl_option.sh > before $ cp include/uapi/linux/prctl.h tools/include/uapi/linux/prctl.h $ tools/perf/trace/beauty/prctl_option.sh > after $ diff -u before after --- before 2021-05-09 10:06:10.064559675 -0300 +++ after 2021-05-09 10:06:21.319791396 -0300 @@ -54,6 +54,8 @@ [57] = "SET_IO_FLUSHER", [58] = "GET_IO_FLUSHER", [59] = "SET_SYSCALL_USER_DISPATCH", + [60] = "PAC_SET_ENABLED_KEYS", + [61] = "PAC_GET_ENABLED_KEYS", }; static const char *prctl_set_mm_options[] = { [1] = "START_CODE", $ Now users can do: # perf trace -e syscalls:sys_enter_prctl --filter "option==PAC_GET_ENABLED_KEYS" ^C# # trace -v -e syscalls:sys_enter_prctl --filter "option==PAC_GET_ENABLED_KEYS" New filter for syscalls:sys_enter_prctl: (option==0x3d) && (common_pid != 5519 && common_pid != 3404) ^C# And also when prctl appears in a session, its options will be translated to the string. Cc: Catalin Marinas Cc: Peter Collingbourne Signed-off-by: Arnaldo Carvalho de Melo commit f8bcb061ea013a9b39a071b9dd9f6ea0aa2caf72 Author: Arnaldo Carvalho de Melo Date: Sun May 9 09:55:30 2021 -0300 tools headers UAPI: Sync files changed by landlock, quotactl_path and mount_settattr new syscalls To pick the changes in these csets: a49f4f81cb48925e ("arch: Wire up Landlock syscalls") 2a1867219c7b27f9 ("fs: add mount_setattr()") fa8b90070a80bb1a ("quota: wire up quotactl_path") That silences these perf build warnings and add support for those new syscalls in tools such as 'perf trace'. For instance, this is now possible: # ~acme/bin/perf trace -v -e landlock* event qualifier tracepoint filter: (common_pid != 129365 && common_pid != 3502) && (id == 444 || id == 445 || id == 446) ^C# That is tha filter expression attached to the raw_syscalls:sys_{enter,exit} tracepoints. $ grep landlock tools/perf/arch/x86/entry/syscalls/syscall_64.tbl 444 common landlock_create_ruleset sys_landlock_create_ruleset 445 common landlock_add_rule sys_landlock_add_rule 446 common landlock_restrict_self sys_landlock_restrict_self $ This addresses these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/asm-generic/unistd.h' differs from latest version at 'include/uapi/asm-generic/unistd.h' diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h Warning: Kernel ABI header at 'tools/perf/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl' diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl Warning: Kernel ABI header at 'tools/perf/arch/s390/entry/syscalls/syscall.tbl' differs from latest version at 'arch/s390/kernel/syscalls/syscall.tbl' diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl Warning: Kernel ABI header at 'tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl' differs from latest version at 'arch/mips/kernel/syscalls/syscall_n64.tbl' diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl Cc: Christian Brauner Cc: James Morris Cc: Jan Kara Cc: Mickaël Salaün Cc: Sascha Hauer Signed-off-by: Arnaldo Carvalho de Melo commit a00b7e39d6b56e6f49cdd51a9ebf92627a19d877 Author: Masami Hiramatsu Date: Fri May 7 17:54:35 2021 +0900 perf tools: Fix a build error on arm64 with clang Since clang's -Wmissing-field-initializers warns if a data structure is initialized with a signle NULL as below, ---- tools/perf $ make CC=clang LLVM=1 ... arch/arm64/util/kvm-stat.c:74:9: error: missing field 'ops' initializer [-Werror,-Wmissing-field-initializers] { NULL }, ^ 1 error generated. ---- add another field initializer expressly as same as other arch's kvm-stat.c code. Signed-off-by: Masami Hiramatsu Cc: Anders Roxell Cc: Leo Yan Cc: Sergey Senozhatsky Link: http://lore.kernel.org/lkml/162037767540.94840.15758657049033010518.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo commit b35629bc2fd59691504debda99c320cf966c8e3a Author: Arnaldo Carvalho de Melo Date: Sun May 9 09:45:25 2021 -0300 tools headers kvm: Sync kvm headers with the kernel sources To pick the changes in: 3c0c2ad1ae75963c ("KVM: VMX: Add basic handling of VM-Exit from SGX enclave") 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/x86/include/uapi/asm/vmx.h' differs from latest version at 'arch/x86/include/uapi/asm/vmx.h' diff -u tools/arch/x86/include/uapi/asm/vmx.h arch/x86/include/uapi/asm/vmx.h Cc: Paolo Bonzini Cc: Sean Christopherson Signed-off-by: Arnaldo Carvalho de Melo commit 0d943d5fde6070c2661a99618ea95b99655589ad Author: Arnaldo Carvalho de Melo Date: Sun May 9 09:39:02 2021 -0300 tools headers UAPI: Sync linux/kvm.h with the kernel sources To pick the changes in: 15fb7de1a7f5af0d ("KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_DATA command") 3bf725699bf62494 ("KVM: arm64: Add support for the KVM PTP service") 4cfdd47d6d95aca4 ("KVM: SVM: Add KVM_SEV SEND_START command") 54526d1fd59338fd ("KVM: x86: Support KVM VMs sharing SEV context") 5569e2e7a650dfff ("KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command") 8b13c36493d8cb56 ("KVM: introduce KVM_CAP_SET_GUEST_DEBUG2") af43cbbf954b50ca ("KVM: SVM: Add support for KVM_SEV_RECEIVE_START command") d3d1af85e2c75bb5 ("KVM: SVM: Add KVM_SEND_UPDATE_DATA command") fe7e948837f312d8 ("KVM: x86: Add capability to grant VM access to privileged SGX attribute") That don't cause any change in tooling as it doesn't introduce any new ioctl. $ grep kvm tools/perf/trace/beauty/*.sh tools/perf/trace/beauty/kvm_ioctl.sh:printf "static const char *kvm_ioctl_cmds[] = {\n" tools/perf/trace/beauty/kvm_ioctl.sh:egrep $regex ${header_dir}/kvm.h | \ $ $ tools/perf/trace/beauty/kvm_ioctl.sh > before $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h $ tools/perf/trace/beauty/kvm_ioctl.sh > after $ diff -u before after $ This silences this 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: Brijesh Singh Cc: Jianyong Wu Cc: Marc Zyngier Cc: Nathan Tempelman Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Steve Rutherford Signed-off-by: Arnaldo Carvalho de Melo commit ad1237c30d975535a669746496cbed136aa5a045 Author: Jiri Olsa Date: Sat May 8 22:50:20 2021 +0200 perf tools: Fix dynamic libbpf link Justin reported broken build with LIBBPF_DYNAMIC=1. When linking libbpf dynamically we need to use perf's hashmap object, because it's not exported in libbpf.so (only in libbpf.a). Following build is now passing: $ make LIBBPF_DYNAMIC=1 BUILD: Doing 'make -j8' parallel build ... $ ldd perf | grep libbpf libbpf.so.0 => /lib64/libbpf.so.0 (0x00007fa7630db000) Fixes: eee19501926d ("perf tools: Grab a copy of libbpf's hashmap") Reported-by: Justin M. Forbes Signed-off-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Mark Rutland Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210508205020.617984-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit a11c9a6e472457cf9eeafb585fc5c912f51d1b23 Author: Dmitry Koshelev Date: Thu May 6 13:11:49 2021 +0000 perf session: Fix swapping of cpu_map and stat_config records 'data' field in perf_record_cpu_map_data struct is 16-bit wide and so should be swapped using bswap_16(). 'nr' field in perf_record_stat_config struct should be swapped before being used for size calculation. Signed-off-by: Dmitry Koshelev Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210506131244.13328-1-karaghiozis@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 7aa3c9eabdf76017679e975e2ffd50cde3c010b8 Author: Ian Rogers Date: Thu May 6 15:56:40 2021 -0700 perf jevents: Silence warning for ArchStd files JSON files in the level 1 directory are used for ArchStd events (see preprocess_arch_std_files), as such they shouldn't be warned about. Signed-off-by: Ian Rogers Reviewed-by: John Garry Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Joakim Zhang Cc: Kajol Jain Cc: Kim Phillips Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210506225640.1461000-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit e8c1167606c63fd8f9934d0b6ce80281463a4945 Author: Namhyung Kim Date: Fri Apr 2 18:40:20 2021 +0900 perf record: Disallow -c and -F option at the same time It's confusing which one is effective when the both options are given. The current code happens to use -c in this case but users might not be aware of it. We can change it to complain about that instead of relying on the implicit priority. Before: $ perf record -c 111111 -F 99 true [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.031 MB perf.data (8 samples) ] $ perf evlist -F cycles: sample_period=111111 $ After: $ perf record -c 111111 -F 99 true cannot set frequency and period at the same time $ So this change can break existing usages, but I think it's rare to have both options and it'd be better changing them. Suggested-by: Alexey Alexandrov Signed-off-by: Namhyung Kim Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210402094020.28164-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit b3172585b13d7171c32cfabdf938eca7fdfe9b31 Author: Arnaldo Carvalho de Melo Date: Mon May 3 11:53:37 2021 -0300 tools arch x86: Sync the msr-index.h copy with the kernel sources To pick up the changes from these csets: d0946a882e622022 ("perf/x86/intel: Hybrid PMU support for perf capabilities") That cause no changes to tooling as it isn't adding any new MSR, just some capabilities for a pre-existing one: $ 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 $ Just silences this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h' diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h Cc: Kan Liang Cc: Peter Zijlstra Signed-off-by: Arnaldo Carvalho de Melo commit 0fdee797d60d71e5a6fd59aa573d84a858e715dd Author: Arnaldo Carvalho de Melo Date: Mon May 3 11:51:17 2021 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick the changes in: b5b6f6a610127b17 ("drm/i915/gem: Drop legacy execbuffer support (v2)") That don't result in any change in tooling as this is just adding a comment. Only 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: Daniel Vetter Cc: Jason Ekstrand Signed-off-by: Arnaldo Carvalho de Melo commit a3bc4ffeedf4693262fe7c6d133dcfcacd3d18c2 Author: Arnaldo Carvalho de Melo Date: Mon May 3 11:48:26 2021 -0300 tools headers UAPI: Update tools's copy of drm.h headers Picking the changes from: b603e810f740e76b ("drm/uapi: document kernel capabilities") Doesn't result in any tooling changes: $ tools/perf/trace/beauty/drm_ioctl.sh > before $ cp include/uapi/drm/drm.h tools/include/uapi/drm/drm.h $ tools/perf/trace/beauty/drm_ioctl.sh > after $ diff -u before after Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h' diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h Cc: Simon Ser Signed-off-by: Arnaldo Carvalho de Melo commit dc5fa590273890a8541ce6e999d606bfb2d73797 Author: Leilk Liu Date: Sat May 8 14:02:14 2021 +0800 spi: take the SPI IO-mutex in the spi_set_cs_timing method this patch takes the io_mutex to prevent an unprotected HW register modification in the set_cs_timing callback. Fixes: 4cea6b8cc34e ("spi: add power control when set_cs_timing") Signed-off-by: Leilk Liu Link: https://lore.kernel.org/r/20210508060214.1485-1-leilk.liu@mediatek.com Signed-off-by: Mark Brown commit 680ec0549a055eb464dce6ffb4bfb736ef87236e Author: Christophe JAILLET Date: Sun May 9 21:12:27 2021 +0200 spi: spi-fsl-dspi: Fix a resource leak in an error handling path 'dspi_request_dma()' should be undone by a 'dspi_release_dma()' call in the error handling path of the probe function, as already done in the remove function Fixes: 90ba37033cb9 ("spi: spi-fsl-dspi: Add DMA support for Vybrid") Signed-off-by: Christophe JAILLET Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/d51caaac747277a1099ba8dea07acd85435b857e.1620587472.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit b23584d6ce0212b9ad6cb7be19a7123461ed9e09 Author: Shengjiu Wang Date: Sat May 8 18:46:47 2021 +0800 ASoC: ak5558: Correct the dai name for ak5552 Correct the dai name for ak5552. The name should be "ak5552-aif". Fixes: d8c5c82e4e5b ("ASoC: ak5558: Add support for ak5552") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1620470807-12056-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 14c0c423746fe7232a093a68809a4bc6233eed60 Author: Bixuan Cui Date: Sat May 8 11:15:12 2021 +0800 ASoC: codecs: lpass-tx-macro: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210508031512.53783-1-cuibixuan@huawei.com Signed-off-by: Mark Brown commit d4335d058f8430a0ce2b43dab9531f3a3cf9fe2c Author: Srinivas Kandagatla Date: Mon May 10 11:38:44 2021 +0100 ASoC: codecs: lpass-rx-macro: add missing MODULE_DEVICE_TABLE Fix module loading by adding missing MODULE_DEVICE_TABLE. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210510103844.1532-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown commit e5af36b2adb858e982d78d41d7363d05d951a19a Author: Rafael J. Wysocki Date: Wed Apr 21 19:40:56 2021 +0200 cpufreq: intel_pstate: Use HWP if enabled by platform firmware It turns out that there are systems where HWP is enabled during initialization by the platform firmware (BIOS), but HWP EPP support is not advertised. After commit 7aa1031223bc ("cpufreq: intel_pstate: Avoid enabling HWP if EPP is not supported") intel_pstate refuses to use HWP on those systems, but the fallback PERF_CTL interface does not work on them either because of enabled HWP, and once enabled, HWP cannot be disabled. Consequently, the users of those systems cannot control CPU performance scaling. Address this issue by making intel_pstate use HWP unconditionally if it is enabled already when the driver starts. Fixes: 7aa1031223bc ("cpufreq: intel_pstate: Avoid enabling HWP if EPP is not supported") Reported-by: Srinivas Pandruvada Tested-by: Srinivas Pandruvada Signed-off-by: Rafael J. Wysocki Cc: 5.9+ # 5.9+ commit a1bed090fc56e6e24517d96bc076595544fb5317 Author: Mark Brown Date: Fri May 7 17:25:42 2021 +0100 kselftest/arm64: Add missing stddef.h include to BTI tests Explicitly include stddef.h when building the BTI tests so that we have a definition of NULL, with at least some toolchains this is not done implicitly by anything else: test.c: In function ‘start’: test.c:214:25: error: ‘NULL’ undeclared (first use in this function) 214 | sigaction(SIGILL, &sa, NULL); | ^~~~ test.c:20:1: note: ‘NULL’ is defined in header ‘’; did you forget to ‘#include ’? Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210507162542.23149-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit 0c6c2d3615efb7c292573f2e6c886929a2b2da6c Author: Mark Brown Date: Wed Apr 28 13:12:31 2021 +0100 arm64: Generate cpucaps.h The arm64 code allocates an internal constant to every CPU feature it can detect, distinct from the public hwcap numbers we use to expose some features to userspace. Currently this is maintained manually which is an irritating source of conflicts when working on new features, to avoid this replace the header with a simple text file listing the names we've assigned and sort it to minimise conflicts. As part of doing this we also do the Kbuild hookup required to hook up an arch tools directory and to generate header files in there. This will result in a renumbering and reordering of the existing constants, since they are all internal only the values should not be important. The reordering will impact the order in which some steps in enumeration handle features but the algorithm is not intended to depend on this and I haven't seen any issues when testing. Due to the UAO cpucap having been removed in the past we end up with ARM64_NCAPS being 1 smaller than it was before. Signed-off-by: Mark Brown Reviewed-by: Mark Rutland Tested-by: Mark Rutland Link: https://lore.kernel.org/r/20210428121231.11219-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit f8e8c1b2f782e7391e8a1c25648ce756e2a7d481 Author: Zolton Jheng Date: Mon May 10 10:32:00 2021 +0800 USB: serial: pl2303: add device id for ADLINK ND-6530 GC This adds the device id for the ADLINK ND-6530 which is a PL2303GC based device. Signed-off-by: Zolton Jheng Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit 89b1a3d811e6f8065d6ae8a25e7682329b4a31e2 Author: Sean MacLennan Date: Sat May 1 20:40:45 2021 -0400 USB: serial: ti_usb_3410_5052: add startech.com device id This adds support for the Startech.com generic serial to USB converter. It seems to be a bone stock TI_3410. I have been using this patch for years. Signed-off-by: Sean MacLennan Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit e467714f822b5d167a7fb03d34af91b5b6af1827 Author: Daniele Palmas Date: Wed Apr 28 09:26:34 2021 +0200 USB: serial: option: add Telit LE910-S1 compositions 0x7010, 0x7011 Add support for the following Telit LE910-S1 compositions: 0x7010: rndis, tty, tty, tty 0x7011: ecm, tty, tty, tty Signed-off-by: Daniele Palmas Link: https://lore.kernel.org/r/20210428072634.5091-1-dnlplm@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit c5a80540e425a5f9a82b0f3163e3b6a4331f33bc Author: Dominik Andreas Schorpp Date: Thu Apr 22 09:58:52 2021 +0200 USB: serial: ftdi_sio: add IDs for IDS GmbH Products Add the IDS GmbH Vendor ID and the Product IDs for SI31A (2xRS232) and CM31A (LoRaWAN Modem). Signed-off-by: Dominik Andreas Schorpp Signed-off-by: Juergen Borleis Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold commit dbc03e81586fc33e4945263fd6e09e22eb4b980f Author: Zhen Lei Date: Sat May 8 10:19:13 2021 +0800 xen/unpopulated-alloc: fix error return code in fill_list() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: a4574f63edc6 ("mm/memremap_pages: convert to 'struct range'") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20210508021913.1727-1-thunder.leizhen@huawei.com Signed-off-by: Juergen Gross commit 970655aa9b42461f8394e4457307005bdeee14d9 Author: Juergen Gross Date: Fri Apr 23 07:40:38 2021 +0200 xen/gntdev: fix gntdev_mmap() error exit path Commit d3eeb1d77c5d0af ("xen/gntdev: use mmu_interval_notifier_insert") introduced an error in gntdev_mmap(): in case the call of mmu_interval_notifier_insert_locked() fails the exit path should not call mmu_interval_notifier_remove(), as this might result in NULL dereferences. One reason for failure is e.g. a signal pending for the running process. Fixes: d3eeb1d77c5d0af ("xen/gntdev: use mmu_interval_notifier_insert") Cc: stable@vger.kernel.org Reported-by: Marek Marczykowski-Górecki Tested-by: Marek Marczykowski-Górecki Signed-off-by: Juergen Gross Reviewed-by: Luca Fancellu Link: https://lore.kernel.org/r/20210423054038.26696-1-jgross@suse.com Signed-off-by: Juergen Gross commit 059e5c321a65657877924256ea8ad9c0df257b45 Author: Brijesh Singh Date: Tue Apr 27 06:16:36 2021 -0500 x86/msr: Rename MSR_K8_SYSCFG to MSR_AMD64_SYSCFG The SYSCFG MSR continued being updated beyond the K8 family; drop the K8 name from it. Suggested-by: Borislav Petkov Signed-off-by: Brijesh Singh Signed-off-by: Borislav Petkov Acked-by: Joerg Roedel Link: https://lkml.kernel.org/r/20210427111636.1207-4-brijesh.singh@amd.com commit b81fc74d53d1248de6db3136dd6b29e5d5528021 Author: Brijesh Singh Date: Tue Apr 27 06:16:35 2021 -0500 x86/sev: Move GHCB MSR protocol and NAE definitions in a common header The guest and the hypervisor contain separate macros to get and set the GHCB MSR protocol and NAE event fields. Consolidate the GHCB protocol definitions and helper macros in one place. Leave the supported protocol version define in separate files to keep the guest and hypervisor flexibility to support different GHCB version in the same release. There is no functional change intended. Signed-off-by: Brijesh Singh Signed-off-by: Borislav Petkov Acked-by: Joerg Roedel Link: https://lkml.kernel.org/r/20210427111636.1207-3-brijesh.singh@amd.com commit e759959fe3b8313c81d6200be44cb8a644d845ea Author: Brijesh Singh Date: Tue Apr 27 06:16:34 2021 -0500 x86/sev-es: Rename sev-es.{ch} to sev.{ch} SEV-SNP builds upon the SEV-ES functionality while adding new hardware protection. Version 2 of the GHCB specification adds new NAE events that are SEV-SNP specific. Rename the sev-es.{ch} to sev.{ch} so that all SEV* functionality can be consolidated in one place. Signed-off-by: Brijesh Singh Signed-off-by: Borislav Petkov Acked-by: Joerg Roedel Link: https://lkml.kernel.org/r/20210427111636.1207-2-brijesh.singh@amd.com commit 371dcaee1ade4b1eefd541ae6ee048b5ce15b37c Author: Mike Rapoport Date: Sun May 9 12:11:03 2021 +0300 openrisc: mm/init.c: remove unused variable 'end' in paging_init() A build with W=1 enabled produces the following warning: CC arch/openrisc/mm/init.o arch/openrisc/mm/init.c: In function 'paging_init': arch/openrisc/mm/init.c:131:16: warning: variable 'end' set but not used [-Wunused-but-set-variable] 131 | unsigned long end; | ^~~ Remove the unused variable 'end'. Signed-off-by: Mike Rapoport Signed-off-by: Stafford Horne commit 4eff124347191d1548eb4e14e20e77513dcbd0fe Author: Mike Rapoport Date: Sun May 9 12:11:02 2021 +0300 openrisc: mm/init.c: remove unused memblock_region variable in map_ram() Kernel test robot reports: cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> arch/openrisc/mm/init.c:125:10: warning: Uninitialized variable: region [uninitvar] region->base, region->base + region->size); ^ Replace usage of memblock_region fields with 'start' and 'end' variables that are initialized in for_each_mem_range() and remove the declaration of region. Fixes: b10d6bca8720 ("arch, drivers: replace for_each_membock() with for_each_mem_range()") Reported-by: kernel test robot Signed-off-by: Mike Rapoport Signed-off-by: Stafford Horne commit 6efb943b8616ec53a5e444193dccf1af9ad627b5 Author: Linus Torvalds Date: Sun May 9 14:17:44 2021 -0700 Linux 5.13-rc1 commit 6dae40aed484ef2f1a3934dcdcd17b7055173e56 Author: Linus Torvalds Date: Sun May 9 14:03:33 2021 -0700 fbmem: fix horribly incorrect placement of __maybe_unused Commit b9d79e4ca4ff ("fbmem: Mark proc_fb_seq_ops as __maybe_unused") places the '__maybe_unused' in an entirely incorrect location between the "struct" keyword and the structure name. It's a wonder that gcc accepts that silently, but clang quite reasonably warns about it: drivers/video/fbdev/core/fbmem.c:736:21: warning: attribute declaration must precede definition [-Wignored-attributes] static const struct __maybe_unused seq_operations proc_fb_seq_ops = { ^ Fix it. Cc: Guenter Roeck Cc: Daniel Vetter Signed-off-by: Linus Torvalds commit efc58a96adcd29cc37487a60582d9d08b34f6640 Merge: 506c30790f540 0844708ac3d2d Author: Linus Torvalds Date: Sun May 9 13:42:39 2021 -0700 Merge tag 'drm-next-2021-05-10' of git://anongit.freedesktop.org/drm/drm Pull drm fixes from Dave Airlie: "Bit later than usual, I queued them all up on Friday then promptly forgot to write the pull request email. This is mainly amdgpu fixes, with some radeon/msm/fbdev and one i915 gvt fix thrown in. amdgpu: - MPO hang workaround - Fix for concurrent VM flushes on vega/navi - dcefclk is not adjustable on navi1x and newer - MST HPD debugfs fix - Suspend/resumes fixes - Register VGA clients late in case driver fails to load - Fix GEM leak in user framebuffer create - Add support for polaris12 with 32 bit memory interface - Fix duplicate cursor issue when using overlay - Fix corruption with tiled surfaces on VCN3 - Add BO size and stride check to fix BO size verification radeon: - Fix off-by-one in power state parsing - Fix possible memory leak in power state parsing msm: - NULL ptr dereference fix fbdev: - procfs disabled warning fix i915: - gvt: Fix a possible division by zero in vgpu display rate calculation" * tag 'drm-next-2021-05-10' of git://anongit.freedesktop.org/drm/drm: drm/amdgpu: Use device specific BO size & stride check. drm/amdgpu: Init GFX10_ADDR_CONFIG for VCN v3 in DPG mode. drm/amd/pm: initialize variable drm/radeon: Avoid power table parsing memory leaks drm/radeon: Fix off-by-one power_state index heap overwrite drm/amd/display: Fix two cursor duplication when using overlay drm/amdgpu: add new MC firmware for Polaris12 32bit ASIC fbmem: Mark proc_fb_seq_ops as __maybe_unused drm/msm/dpu: Delete bonkers code drm/i915/gvt: Prevent divided by zero when calculating refresh rate amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create drm/amdgpu: Register VGA clients after init can no longer fail drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown drm/amdgpu: fix r initial values drm/amd/display: fix wrong statement in mst hpd debugfs amdgpu/pm: set pp_dpm_dcefclk to readonly on NAVI10 and newer gpus amdgpu/pm: Prevent force of DCEFCLK on NAVI10 and SIENNA_CICHLID drm/amdgpu: fix concurrent VM flushes on Vega/Navi v2 drm/amd/display: Reject non-zero src_y and src_x for video planes commit 506c30790f5409ce58aa21c14d7c2aa86df328f5 Merge: 0a55a1fbed0b6 35c820e71565d Author: Linus Torvalds Date: Sun May 9 13:25:14 2021 -0700 Merge tag 'block-5.13-2021-05-09' of git://git.kernel.dk/linux-block Pull block fix from Jens Axboe: "Turns out the bio max size change still has issues, so let's get it reverted for 5.13-rc1. We'll shake out the issues there and defer it to 5.14 instead" * tag 'block-5.13-2021-05-09' of git://git.kernel.dk/linux-block: Revert "bio: limit bio max size" commit 0a55a1fbed0b65ed52491caada7d2e936573d464 Merge: 9819f682e48c6 c1f8a398b6d66 Author: Linus Torvalds Date: Sun May 9 13:19:29 2021 -0700 Merge tag '5.13-rc-smb3-part3' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Three small SMB3 chmultichannel related changesets (also for stable) from the SMB3 test event this week. The other fixes are still in review/testing" * tag '5.13-rc-smb3-part3' of git://git.samba.org/sfrench/cifs-2.6: smb3: if max_channels set to more than one channel request multichannel smb3: do not attempt multichannel to server which does not support it smb3: when mounting with multichannel include it in requested capabilities commit 9819f682e48c6a7055c5d7a6746411dd3969b0e5 Merge: 732a27a0891cb 0258bdfaff5bd Author: Linus Torvalds Date: Sun May 9 13:14:34 2021 -0700 Merge tag 'sched-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Thomas Gleixner: "A set of scheduler updates: - Prevent PSI state corruption when schedule() races with cgroup move. A recent commit combined two PSI callbacks to reduce the number of cgroup tree updates, but missed that schedule() can drop rq::lock for load balancing, which opens the race window for cgroup_move_task() which then observes half updated state. The fix is to solely use task::ps_flags instead of looking at the potentially mismatching scheduler state - Prevent an out-of-bounds access in uclamp caused bu a rounding division which can lead to an off-by-one error exceeding the buckets array size. - Prevent unfairness caused by missing load decay when a task is attached to a cfs runqueue. The old load of the task was attached to the runqueue and never removed. Fix it by enforcing the load update through the hierarchy for unthrottled run queue instances. - A documentation fix fot the 'sched_verbose' command line option" * tag 'sched-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix unfairness caused by missing load decay sched: Fix out-of-bound access in uclamp psi: Fix psi state corruption when schedule() races with cgroup move sched,doc: sched_debug_verbose cmdline should be sched_verbose commit 732a27a0891cb5db1a0f9c33a018ea6eca9a4023 Merge: 85bbba1c07784 51cf94d16860a Author: Linus Torvalds Date: Sun May 9 13:07:03 2021 -0700 Merge tag 'locking-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Thomas Gleixner: "A set of locking related fixes and updates: - Two fixes for the futex syscall related to the timeout handling. FUTEX_LOCK_PI does not support the FUTEX_CLOCK_REALTIME bit and because it's not set the time namespace adjustment for clock MONOTONIC is applied wrongly. FUTEX_WAIT cannot support the FUTEX_CLOCK_REALTIME bit because its always a relative timeout. - Cleanups in the futex syscall entry points which became obvious when the two timeout handling bugs were fixed. - Cleanup of queued_write_lock_slowpath() as suggested by Linus - Fixup of the smp_call_function_single_async() prototype" * tag 'locking-urgent-2021-05-09' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Make syscall entry points less convoluted futex: Get rid of the val2 conditional dance futex: Do not apply time namespace adjustment on FUTEX_LOCK_PI Revert 337f13046ff0 ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op") locking/qrwlock: Cleanup queued_write_lock_slowpath() smp: Fix smp_call_function_single_async prototype commit 85bbba1c077848e76ab77682e9e56c41113f5770 Merge: dd3e4012dd360 e10de314287c2 Author: Linus Torvalds Date: Sun May 9 13:00:26 2021 -0700 Merge tag 'perf_urgent_for_v5.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 perf fix from Borislav Petkov: "Handle power-gating of AMD IOMMU perf counters properly when they are used" * tag 'perf_urgent_for_v5.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/events/amd/iommu: Fix invalid Perf result due to IOMMU PMC power-gating commit dd3e4012dd360873f95bbe7fe2eb65d951781803 Merge: b741596468b01 bc908e091b326 Author: Linus Torvalds Date: Sun May 9 12:52:25 2021 -0700 Merge tag 'x86_urgent_for_v5.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Borislav Petkov: "A bunch of things accumulated for x86 in the last two weeks: - Fix guest vtime accounting so that ticks happening while the guest is running can also be accounted to it. Along with a consolidation to the guest-specific context tracking helpers. - Provide for the host NMI handler running after a VMX VMEXIT to be able to run on the kernel stack correctly. - Initialize MSR_TSC_AUX when RDPID is supported and not RDTSCP (virt relevant - real hw supports both) - A code generation improvement to TASK_SIZE_MAX through the use of alternatives - The usual misc and related cleanups and improvements" * tag 'x86_urgent_for_v5.13_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: KVM: x86: Consolidate guest enter/exit logic to common helpers context_tracking: KVM: Move guest enter/exit wrappers to KVM's domain context_tracking: Consolidate guest enter/exit wrappers sched/vtime: Move guest enter/exit vtime accounting to vtime.h sched/vtime: Move vtime accounting external declarations above inlines KVM: x86: Defer vtime accounting 'til after IRQ handling context_tracking: Move guest exit vtime accounting to separate helpers context_tracking: Move guest exit context tracking to separate helpers KVM/VMX: Invoke NMI non-IST entry instead of IST entry x86/cpu: Remove write_tsc() and write_rdtscp_aux() wrappers x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported x86/resctrl: Fix init const confusion x86: Delete UD0, UD1 traces x86/smpboot: Remove duplicate includes x86/cpu: Use alternative to generate the TASK_SIZE_MAX constant commit c1b55029493879f5bd585ff79f326e71f0bc05e3 Author: Daniel Cordova A Date: Fri May 7 12:31:16 2021 -0500 ALSA: hda: fixup headset for ASUS GU502 laptop The GU502 requires a few steps to make headset i/o works properly: pincfg, verbs to unmute headphone out and callback to toggle output between speakers and headphone using jack. Signed-off-by: Daniel Cordova A Cc: Link: https://lore.kernel.org/r/20210507173116.12043-1-danesc87@gmail.com Signed-off-by: Takashi Iwai commit a298232ee6b9a1d5d732aa497ff8be0d45b5bd82 Author: Pavel Begunkov Date: Fri May 7 21:06:38 2021 +0100 io_uring: fix link timeout refs WARNING: CPU: 0 PID: 10242 at lib/refcount.c:28 refcount_warn_saturate+0x15b/0x1a0 lib/refcount.c:28 RIP: 0010:refcount_warn_saturate+0x15b/0x1a0 lib/refcount.c:28 Call Trace: __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] io_put_req fs/io_uring.c:2140 [inline] io_queue_linked_timeout fs/io_uring.c:6300 [inline] __io_queue_sqe+0xbef/0xec0 fs/io_uring.c:6354 io_submit_sqe fs/io_uring.c:6534 [inline] io_submit_sqes+0x2bbd/0x7c50 fs/io_uring.c:6660 __do_sys_io_uring_enter fs/io_uring.c:9240 [inline] __se_sys_io_uring_enter+0x256/0x1d60 fs/io_uring.c:9182 io_link_timeout_fn() should put only one reference of the linked timeout request, however in case of racing with the master request's completion first io_req_complete() puts one and then io_put_req_deferred() is called. Cc: stable@vger.kernel.org # 5.12+ Fixes: 9ae1f8dd372e0 ("io_uring: fix inconsistent lock state") Reported-by: syzbot+a2910119328ce8e7996f@syzkaller.appspotmail.com Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ff51018ff29de5ffa76f09273ef48cb24c720368.1620417627.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 35c820e71565d1fa835b82499359218b219828ac Author: Jens Axboe Date: Sat May 8 21:49:48 2021 -0600 Revert "bio: limit bio max size" This reverts commit cd2c7545ae1beac3b6aae033c7f31193b3255946. Alex reports that the commit causes corruption with LUKS on ext4. Revert it for now so that this can be investigated properly. Link: https://lore.kernel.org/linux-block/1620493841.bxdq8r5haw.none@localhost/ Reported-by: Alex Xu (Hello71) Signed-off-by: Jens Axboe commit b741596468b010af2846b75f5e75a842ce344a6e Merge: fec4d42724a1b beaf5ae15a13d Author: Linus Torvalds Date: Sat May 8 11:52:37 2021 -0700 Merge tag 'riscv-for-linus-5.13-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V fixes from Palmer Dabbelt: - A fix to avoid over-allocating the kernel's mapping on !MMU systems, which could lead to up to 2MiB of lost memory - The SiFive address extension errata only manifest on rv64, they are now disabled on rv32 where they are unnecessary - A pair of late-landing cleanups * tag 'riscv-for-linus-5.13-mw1' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: riscv: remove unused handle_exception symbol riscv: Consistify protect_kernel_linear_mapping_text_rodata() use riscv: enable SiFive errata CIP-453 and CIP-1200 Kconfig only if CONFIG_64BIT=y riscv: Only extend kernel reservation if mapped read-only commit fec4d42724a1bf3dcba52307e55375fdb967b852 Author: Linus Torvalds Date: Sat May 8 11:30:22 2021 -0700 drm/i915/display: fix compiler warning about array overrun intel_dp_check_mst_status() uses a 14-byte array to read the DPRX Event Status Indicator data, but then passes that buffer at offset 10 off as an argument to drm_dp_channel_eq_ok(). End result: there are only 4 bytes remaining of the buffer, yet drm_dp_channel_eq_ok() wants a 6-byte buffer. gcc-11 correctly warns about this case: drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_dp_check_mst_status’: drivers/gpu/drm/i915/display/intel_dp.c:3491:22: warning: ‘drm_dp_channel_eq_ok’ reading 6 bytes from a region of size 4 [-Wstringop-overread] 3491 | !drm_dp_channel_eq_ok(&esi[10], intel_dp->lane_count)) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/display/intel_dp.c:3491:22: note: referencing argument 1 of type ‘const u8 *’ {aka ‘const unsigned char *’} In file included from drivers/gpu/drm/i915/display/intel_dp.c:38: include/drm/drm_dp_helper.h:1466:6: note: in a call to function ‘drm_dp_channel_eq_ok’ 1466 | bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE], | ^~~~~~~~~~~~~~~~~~~~ 6:14 elapsed This commit just extends the original array by 2 zero-initialized bytes, avoiding the warning. There may be some underlying bug in here that caused this confusion, but this is at least no worse than the existing situation that could use random data off the stack. Cc: Jani Nikula Cc: Ville Syrjälä Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Daniel Vetter Cc: Dave Airlie Signed-off-by: Linus Torvalds commit 07db05638aa25ed66e6fc89b45f6773ef3e69396 Merge: 0f979d815cd52 35ffbb60bdad6 Author: Linus Torvalds Date: Sat May 8 10:44:36 2021 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull more SCSI updates from James Bottomley: "This is a set of minor fixes in various drivers (qla2xxx, ufs, scsi_debug, lpfc) one doc fix and a fairly large update to the fnic driver to remove the open coded iteration functions in favour of the scsi provided ones" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: fnic: Use scsi_host_busy_iter() to traverse commands scsi: fnic: Kill 'exclude_id' argument to fnic_cleanup_io() scsi: scsi_debug: Fix cmd_per_lun, set to max_queue scsi: ufs: core: Narrow down fast path in system suspend path scsi: ufs: core: Cancel rpm_dev_flush_recheck_work during system suspend scsi: ufs: core: Do not put UFS power into LPM if link is broken scsi: qla2xxx: Prevent PRLI in target mode scsi: qla2xxx: Add marginal path handling support scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found scsi: ufs: core: Fix a typo in ufs-sysfs.c scsi: lpfc: Fix bad memory access during VPD DUMP mailbox command scsi: lpfc: Fix DMA virtual address ptr assignment in bsg scsi: lpfc: Fix illegal memory access on Abort IOCBs scsi: blk-mq: Fix build warning when making htmldocs commit 0f979d815cd52084b99e9f6b367e79488850df2e Merge: ab159ac569fdd 0ab1438bad43d Author: Linus Torvalds Date: Sat May 8 10:00:11 2021 -0700 Merge tag 'kbuild-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild updates from Masahiro Yamada: - Convert sh and sparc to use generic shell scripts to generate the syscall headers - refactor .gitignore files - Update kernel/config_data.gz only when the content of the .config is really changed, which avoids the unneeded re-link of vmlinux - move "remove stale files" workarounds to scripts/remove-stale-files - suppress unused-but-set-variable warnings by default for Clang as well - fix locale setting LANG=C to LC_ALL=C - improve 'make distclean' - always keep intermediate objects from scripts/link-vmlinux.sh - move IF_ENABLED out of to make it self-contained - misc cleanups * tag 'kbuild-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (25 commits) linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in kbuild: Don't remove link-vmlinux temporary files on exit/signal kbuild: remove the unneeded comments for external module builds kbuild: make distclean remove tag files in sub-directories kbuild: make distclean work against $(objtree) instead of $(srctree) kbuild: refactor modname-multi by using suffix-search kbuild: refactor fdtoverlay rule kbuild: parameterize the .o part of suffix-search arch: use cross_compiling to check whether it is a cross build or not kbuild: remove ARCH=sh64 support from top Makefile .gitignore: prefix local generated files with a slash kbuild: replace LANG=C with LC_ALL=C Makefile: Move -Wno-unused-but-set-variable out of GCC only block kbuild: add a script to remove stale generated files kbuild: update config_data.gz only when the content of .config is changed .gitignore: ignore only top-level modules.builtin .gitignore: move tags and TAGS close to other tag files kernel/.gitgnore: remove stale timeconst.h and hz.bc usr/include: refactor .gitignore genksyms: fix stale comment ... commit c1f8a398b6d661b594556a91224b096d92293061 Author: Steve French Date: Fri May 7 19:33:51 2021 -0500 smb3: if max_channels set to more than one channel request multichannel Mounting with "multichannel" is obviously implied if user requested more than one channel on mount (ie mount parm max_channels>1). Currently both have to be specified. Fix that so that if max_channels is greater than 1 on mount, enable multichannel rather than silently falling back to non-multichannel. Signed-off-by: Steve French Reviewed-By: Tom Talpey Cc: # v5.11+ Reviewed-by: Shyam Prasad N commit 9c2dc11df50d1c8537075ff6b98472198e24438e Author: Steve French Date: Fri May 7 20:00:41 2021 -0500 smb3: do not attempt multichannel to server which does not support it We were ignoring CAP_MULTI_CHANNEL in the server response - if the server doesn't support multichannel we should not be attempting it. See MS-SMB2 section 3.2.5.2 Reviewed-by: Shyam Prasad N Reviewed-By: Tom Talpey Cc: # v5.8+ Signed-off-by: Steve French commit ab159ac569fddf812c0a217d6dbffaa5d93ef88f Merge: fc858a5231089 f96271cefe6df Author: Linus Torvalds Date: Sat May 8 08:49:54 2021 -0700 Merge tag 'powerpc-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates and fixes from Michael Ellerman: "A bit of a mixture of things, tying up some loose ends. There's the removal of the nvlink code, which dependend on a commit in the vfio tree. Then the enablement of huge vmalloc which was in next for a few weeks but got dropped due to conflicts. And there's also a few fixes. Summary: - Remove the nvlink support now that it's only user has been removed. - Enable huge vmalloc mappings for Radix MMU (P9). - Fix KVM conversion to gfn-based MMU notifier callbacks. - Fix a kexec/kdump crash with hot plugged CPUs. - Fix boot failure on 32-bit with CONFIG_STACKPROTECTOR. - Restore alphabetic order of the selects under CONFIG_PPC. Thanks to: Christophe Leroy, Christoph Hellwig, Nicholas Piggin, Sandipan Das, and Sourabh Jain" * tag 'powerpc-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks powerpc/kconfig: Restore alphabetic order of the selects under CONFIG_PPC powerpc/32: Fix boot failure with CONFIG_STACKPROTECTOR powerpc/powernv/memtrace: Fix dcache flushing powerpc/kexec_file: Use current CPU info while setting up FDT powerpc/64s/radix: Enable huge vmalloc mappings powerpc/powernv: remove the nvlink support commit 679971e7213174efb56abc8fab1299d0a88db0e8 Author: Steve French Date: Fri May 7 18:24:11 2021 -0500 smb3: when mounting with multichannel include it in requested capabilities In the SMB3/SMB3.1.1 negotiate protocol request, we are supposed to advertise CAP_MULTICHANNEL capability when establishing multiple channels has been requested by the user doing the mount. See MS-SMB2 sections 2.2.3 and 3.2.5.2 Without setting it there is some risk that multichannel could fail if the server interpreted the field strictly. Reviewed-By: Tom Talpey Reviewed-by: Shyam Prasad N Cc: # v5.8+ Signed-off-by: Steve French commit fc858a5231089b972076642a86cf62481d95d82e Merge: dd860052c99b1 55bc1af3d9115 Author: Linus Torvalds Date: Sat May 8 08:31:46 2021 -0700 Merge tag 'net-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Pull networking fixes from Jakub Kicinski: "Networking fixes for 5.13-rc1, including fixes from bpf, can and netfilter trees. Self-contained fixes, nothing risky. Current release - new code bugs: - dsa: ksz: fix a few bugs found by static-checker in the new driver - stmmac: fix frame preemption handshake not triggering after interface restart Previous releases - regressions: - make nla_strcmp handle more then one trailing null character - fix stack OOB reads while fragmenting IPv4 packets in openvswitch and net/sched - sctp: do asoc update earlier in sctp_sf_do_dupcook_a - sctp: delay auto_asconf init until binding the first addr - stmmac: clear receive all(RA) bit when promiscuous mode is off - can: mcp251x: fix resume from sleep before interface was brought up Previous releases - always broken: - bpf: fix leakage of uninitialized bpf stack under speculation - bpf: fix masking negation logic upon negative dst register - netfilter: don't assume that skb_header_pointer() will never fail - only allow init netns to set default tcp cong to a restricted algo - xsk: fix xp_aligned_validate_desc() when len == chunk_size to avoid false positive errors - ethtool: fix missing NLM_F_MULTI flag when dumping - can: m_can: m_can_tx_work_queue(): fix tx_skb race condition - sctp: fix a SCTP_MIB_CURRESTAB leak in sctp_sf_do_dupcook_b - bridge: fix NULL-deref caused by a races between assigning rx_handler_data and setting the IFF_BRIDGE_PORT bit Latecomer: - seg6: add counters support for SRv6 Behaviors" * tag 'net-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (73 commits) atm: firestream: Use fallthrough pseudo-keyword net: stmmac: Do not enable RX FIFO overflow interrupts mptcp: fix splat when closing unaccepted socket i40e: Remove LLDP frame filters i40e: Fix PHY type identifiers for 2.5G and 5G adapters i40e: fix the restart auto-negotiation after FEC modified i40e: Fix use-after-free in i40e_client_subtask() i40e: fix broken XDP support netfilter: nftables: avoid potential overflows on 32bit arches netfilter: nftables: avoid overflows in nft_hash_buckets() tcp: Specify cmsgbuf is user pointer for receive zerocopy. mlxsw: spectrum_mr: Update egress RIF list before route's action net: ipa: fix inter-EE IRQ register definitions can: m_can: m_can_tx_work_queue(): fix tx_skb race condition can: mcp251x: fix resume from sleep before interface was brought up can: mcp251xfd: mcp251xfd_probe(): add missing can_rx_offload_del() in error path can: mcp251xfd: mcp251xfd_probe(): fix an error pointer dereference in probe netfilter: nftables: Fix a memleak from userdata error path in new objects netfilter: remove BUG_ON() after skb_header_pointer() netfilter: nfnetlink_osf: Fix a missing skb_header_pointer() NULL check ... commit 0ab1438bad43d95877f848b7df551bd431680270 Author: Masahiro Yamada Date: Thu May 6 02:45:15 2021 +0900 linux/kconfig.h: replace IF_ENABLED() with PTR_IF() in is included from all the kernel-space source files, including C, assembly, linker scripts. It is intended to contain a minimal set of macros to evaluate CONFIG options. IF_ENABLED() is an intruder here because (x ? y : z) is C code, which should not be included from assembly files or linker scripts. Also, is no longer self-contained because NULL is defined in . Move IF_ENABLED() out to as PTR_IF(). PTF_IF() takes the general boolean expression instead of a CONFIG option so that it fits better in . Signed-off-by: Masahiro Yamada Reviewed-by: Kees Cook commit f96271cefe6dfd1cb04195b76f4a33e185cd7f92 Merge: 32b48bf8514c2 dd860052c99b1 Author: Michael Ellerman Date: Sat May 8 21:12:55 2021 +1000 Merge branch 'master' into next Merge master back into next, this allows us to resolve some conflicts in arch/powerpc/Kconfig, and also re-sort the symbols under config PPC so that they are in alphabetical order again. commit 115726c5d312b462c9d9931ea42becdfa838a076 Author: Lv Yunlong Date: Mon Apr 26 06:43:46 2021 -0700 habanalabs/gaudi: Fix a potential use after free in gaudi_memset_device_memory Our code analyzer reported a uaf. In gaudi_memset_device_memory, cb is get via hl_cb_kernel_create() with 2 refcount. If hl_cs_allocate_job() failed, the execution runs into release_cb branch. One ref of cb is dropped by hl_cb_put(cb) and could be freed if other thread also drops one ref. Then cb is used by cb->id later, which is a potential uaf. My patch add a variable 'id' to accept the value of cb->id before the hl_cb_put(cb) is called, to avoid the potential uaf. Fixes: 423815bf02e25 ("habanalabs/gaudi: remove PCI access to SM block") Signed-off-by: Lv Yunlong Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 24a107097fbd8fb6a48a0dcb31e64c1de6831a1d Author: Ofir Bitton Date: Tue Apr 27 17:49:25 2021 +0300 habanalabs: wait for interrupt wrong timeout calculation Wait for interrupt timeout calculation is wrong, hence timeout occurs when user waits on an interrupt with certain timeout values. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 27a9e35daad080f3770401a1a11eda2f9f7732dd Author: Oded Gabbay Date: Mon Apr 12 09:52:05 2021 +0300 habanalabs: ignore f/w status error In case firmware has a bug and erroneously reports a status error (e.g. device unusable) during boot, allow the user to tell the driver to continue the boot regardless of the error status. This will be done via kernel parameter which exposes a mask. The user that loads the driver can decide exactly which status error to ignore and which to take into account. The bitmask is according to defines in hl_boot_if.h Signed-off-by: Oded Gabbay commit b5fd82a7af198db04408e218f64dc3d4178d585a Author: Oded Gabbay Date: Mon Apr 12 09:38:22 2021 +0300 habanalabs: change error level of security not ready This error indicates a problem in the security initialization inside the f/w so we need to stop the device loading because it won't be usable. Signed-off-by: Oded Gabbay commit 001d5f66c156f2c30b6bf85346de09de8db49b59 Author: Oded Gabbay Date: Sun Apr 11 21:06:05 2021 +0300 habanalabs: skip reading f/w errors on bad status If we read all FF from the boot status register, then something is totally wrong and there is no point of reading specific errors. Signed-off-by: Oded Gabbay commit 285c0faddcebdf360412fc9ef9cde63cf98da7f6 Author: Bharat Jauhari Date: Thu Mar 25 18:15:40 2021 +0200 habanalabs: expose ASIC specific PLL index Currently the user cannot interpret the PLL information based on index as its exposed as an integer. This commit exposes ASIC specific PLL indexes and maps it to a generic FW compatible index. Signed-off-by: Bharat Jauhari Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 55bc1af3d9115d669570aa633e5428d6e2302e8f Merge: e4d4a27220a3a 6c8774a94e6ad Author: Jakub Kicinski Date: Fri May 7 16:10:12 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net 1) Add SECMARK revision 1 to fix incorrect layout that prevents from remove rule with this target, from Phil Sutter. 2) Fix pernet exit path spat in arptables, from Florian Westphal. 3) Missing rcu_read_unlock() for unknown nfnetlink callbacks, reported by syzbot, from Eric Dumazet. 4) Missing check for skb_header_pointer() NULL pointer in nfnetlink_osf. 5) Remove BUG_ON() after skb_header_pointer() from packet path in several conntrack helper and the TCP tracker. 6) Fix memleak in the new object error path of userdata. 7) Avoid overflows in nft_hash_buckets(), reported by syzbot, also from Eric. 8) Avoid overflows in 32bit arches, from Eric. * git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf: netfilter: nftables: avoid potential overflows on 32bit arches netfilter: nftables: avoid overflows in nft_hash_buckets() netfilter: nftables: Fix a memleak from userdata error path in new objects netfilter: remove BUG_ON() after skb_header_pointer() netfilter: nfnetlink_osf: Fix a missing skb_header_pointer() NULL check netfilter: nfnetlink: add a missing rcu_read_unlock() netfilter: arptables: use pernet ops struct during unregister netfilter: xt_SECMARK: add new revision to fix structure layout ==================== Link: https://lore.kernel.org/r/20210507174739.1850-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski commit e4d4a27220a3afdfacf7fbcdc895b08d754f0de1 Merge: 7d18dbddb727f 8085a36db71f5 Author: Jakub Kicinski Date: Fri May 7 16:04:22 2021 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue Nguyen, Anthony L says: ==================== Intel Wired LAN Driver Updates 2021-05-07 This series contains updates to i40e driver only. Magnus fixes XDP by adding and correcting checks that were caused by a previous commit which introduced a new variable but did not account for it in all paths. Yunjian Wang adds a return in an error path to prevent reading a freed pointer. Jaroslaw forces link reset when changing FEC so that changes take affect. Mateusz fixes PHY types for 2.5G and 5G as there is a differentiation on PHY identifiers based on operation. Arkadiusz removes filtering of LLDP frames for software DCB as this is preventing them from being properly transmitted. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: Remove LLDP frame filters i40e: Fix PHY type identifiers for 2.5G and 5G adapters i40e: fix the restart auto-negotiation after FEC modified i40e: Fix use-after-free in i40e_client_subtask() i40e: fix broken XDP support ==================== Link: https://lore.kernel.org/r/20210507164151.2878147-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski commit 7d18dbddb727f8268140ab76d3954b974a21657c Author: Wei Ming Chen Date: Fri May 7 20:38:43 2021 +0800 atm: firestream: Use fallthrough pseudo-keyword Add 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: Wei Ming Chen Link: https://lore.kernel.org/r/20210507123843.10602-1-jj251510319013@gmail.com Signed-off-by: Jakub Kicinski commit 237388320deffde7c2d65ed8fc9eef670dc979b3 Author: Vivek Goyal Date: Wed Apr 28 15:03:14 2021 -0400 dax: Wake up all waiters after invalidating dax entry I am seeing missed wakeups which ultimately lead to a deadlock when I am using virtiofs with DAX enabled and running "make -j". I had to mount virtiofs as rootfs and also reduce to dax window size to 256M to reproduce the problem consistently. So here is the problem. put_unlocked_entry() wakes up waiters only if entry is not null as well as !dax_is_conflict(entry). But if I call multiple instances of invalidate_inode_pages2() in parallel, then I can run into a situation where there are waiters on this index but nobody will wake these waiters. invalidate_inode_pages2() invalidate_inode_pages2_range() invalidate_exceptional_entry2() dax_invalidate_mapping_entry_sync() __dax_invalidate_entry() { xas_lock_irq(&xas); entry = get_unlocked_entry(&xas, 0); ... ... dax_disassociate_entry(entry, mapping, trunc); xas_store(&xas, NULL); ... ... put_unlocked_entry(&xas, entry); xas_unlock_irq(&xas); } Say a fault in in progress and it has locked entry at offset say "0x1c". Now say three instances of invalidate_inode_pages2() are in progress (A, B, C) and they all try to invalidate entry at offset "0x1c". Given dax entry is locked, all tree instances A, B, C will wait in wait queue. When dax fault finishes, say A is woken up. It will store NULL entry at index "0x1c" and wake up B. When B comes along it will find "entry=0" at page offset 0x1c and it will call put_unlocked_entry(&xas, 0). And this means put_unlocked_entry() will not wake up next waiter, given the current code. And that means C continues to wait and is not woken up. This patch fixes the issue by waking up all waiters when a dax entry has been invalidated. This seems to fix the deadlock I am facing and I can make forward progress. Reported-by: Sergio Lopez Fixes: ac401cc78242 ("dax: New fault locking") Reviewed-by: Jan Kara Suggested-by: Dan Williams Signed-off-by: Vivek Goyal Link: https://lore.kernel.org/r/20210428190314.1865312-4-vgoyal@redhat.com Signed-off-by: Dan Williams commit 4c3d043d271d4d629aa2328796cdfc96b37d3b3c Author: Vivek Goyal Date: Wed Apr 28 15:03:13 2021 -0400 dax: Add a wakeup mode parameter to put_unlocked_entry() As of now put_unlocked_entry() always wakes up next waiter. In next patches we want to wake up all waiters at one callsite. Hence, add a parameter to the function. This patch does not introduce any change of behavior. Reviewed-by: Greg Kurz Reviewed-by: Jan Kara Suggested-by: Dan Williams Signed-off-by: Vivek Goyal Link: https://lore.kernel.org/r/20210428190314.1865312-3-vgoyal@redhat.com Signed-off-by: Dan Williams commit 698ab77aebffe08b312fbcdddeb0e8bd08b78717 Author: Vivek Goyal Date: Wed Apr 28 15:03:12 2021 -0400 dax: Add an enum for specifying dax wakup mode Dan mentioned that he is not very fond of passing around a boolean true/false to specify if only next waiter should be woken up or all waiters should be woken up. He instead prefers that we introduce an enum and make it very explicity at the callsite itself. Easier to read code. This patch should not introduce any change of behavior. Reviewed-by: Greg Kurz Reviewed-by: Jan Kara Suggested-by: Dan Williams Signed-off-by: Vivek Goyal Link: https://lore.kernel.org/r/20210428190314.1865312-2-vgoyal@redhat.com Signed-off-by: Dan Williams commit 8a7cb245cf28cb3e541e0d6c8624b95d079e155b Author: Yannick Vignon Date: Thu May 6 16:33:12 2021 +0200 net: stmmac: Do not enable RX FIFO overflow interrupts The RX FIFO overflows when the system is not able to process all received packets and they start accumulating (first in the DMA queue in memory, then in the FIFO). An interrupt is then raised for each overflowing packet and handled in stmmac_interrupt(). This is counter-productive, since it brings the system (or more likely, one CPU core) to its knees to process the FIFO overflow interrupts. stmmac_interrupt() handles overflow interrupts by writing the rx tail ptr into the corresponding hardware register (according to the MAC spec, this has the effect of restarting the MAC DMA). However, without freeing any rx descriptors, the DMA stops right away, and another overflow interrupt is raised as the FIFO overflows again. Since the DMA is already restarted at the end of stmmac_rx_refill() after freeing descriptors, disabling FIFO overflow interrupts and the corresponding handling code has no side effect, and eliminates the interrupt storm when the RX FIFO overflows. Signed-off-by: Yannick Vignon Link: https://lore.kernel.org/r/20210506143312.20784-1-yannick.vignon@oss.nxp.com Signed-off-by: Jakub Kicinski commit 578c18eff1627d6a911f08f4cf351eca41fdcc7d Author: Paolo Abeni Date: Thu May 6 17:16:38 2021 -0700 mptcp: fix splat when closing unaccepted socket If userspace exits before calling accept() on a listener that had at least one new connection ready, we get: Attempt to release TCP socket in state 8 This happens because the mptcp socket gets cloned when the TCP connection is ready, but the socket is never exposed to userspace. The client additionally sends a DATA_FIN, which brings connection into CLOSE_WAIT state. This in turn prevents the orphan+state reset fixup in mptcp_sock_destruct() from doing its job. Fixes: 3721b9b64676b ("mptcp: Track received DATA_FIN sequence number and add related helpers") Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/185 Tested-by: Florian Westphal Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Link: https://lore.kernel.org/r/20210507001638.225468-1-mathew.j.martineau@linux.intel.com Signed-off-by: Jakub Kicinski commit dd860052c99b1e088352bdd4fb7aef46f8d2ef47 Merge: 1ad77a05cfaed d61b3f9b91be3 Author: Linus Torvalds Date: Fri May 7 14:49:18 2021 -0700 Merge tag 'tag-chrome-platform-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux Pull chrome platform updates from Benson Leung: "cros_ec_typec: - Changes around DP mode check, hard reset, tracking port change. cros_ec misc: - wilco_ec: Convert stream-like files from nonseekable to stream open - cros_usbpd_notify: Listen to EC_HSOT_EVENT_USB_MUX host event - fix format warning in cros_ec_typec" * tag 'tag-chrome-platform-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock platform/chrome: cros_usbpd_notify: Listen to EC_HOST_EVENT_USB_MUX host event platform/chrome: cros_ec_typec: Add DP mode check platform/chrome: cros_ec_typec: Handle hard reset platform/chrome: cros_ec: Add Type C hard reset platform/chrome: cros_ec_typec: Track port role platform/chrome: cros_ec_typec: fix clang -Wformat warning platform/chrome: cros_ec_typec: Check for device within remove function platform/chrome: wilco_ec: convert stream-like files from nonseekable_open -> stream_open commit 1ad77a05cfaed42cba301368350817333ac69b6a Merge: 51595e3b4943b 0d95f41ebde40 Author: Linus Torvalds Date: Fri May 7 13:06:34 2021 -0700 Merge tag 'i3c/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux Pull i3cupdates from Alexandre Belloni: "Fix i3c_master_register error path" * tag 'i3c/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux: Revert "i3c master: fix missing destroy_workqueue() on error in i3c_master_register" dt-bindings: i3c: Fix silvaco,i3c-master-v1 compatible string i3c: master: svc: remove redundant assignment to cmd->read_len commit 51595e3b4943b0079638b2657f603cf5c8ea3a66 Merge: 2059c40aded72 c76fba33467b9 Author: Linus Torvalds Date: Fri May 7 12:11:05 2021 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull more arm64 updates from Catalin Marinas: "A mix of fixes and clean-ups that turned up too late for the first pull request: - Restore terminal stack frame records. Their previous removal caused traces which cross secondary_start_kernel to terminate one entry too late, with a spurious "0" entry. - Fix boot warning with pseudo-NMI due to the way we manipulate the PMR register. - ACPI fixes: avoid corruption of interrupt mappings on watchdog probe failure (GTDT), prevent unregistering of GIC SGIs. - Force SPARSEMEM_VMEMMAP as the only memory model, it saves with having to test all the other combinations. - Documentation fixes and updates: tagged address ABI exceptions on brk/mmap/mremap(), event stream frequency, update booting requirements on the configuration of traps" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kernel: Update the stale comment arm64: Fix the documented event stream frequency arm64: entry: always set GIC_PRIO_PSR_I_SET during entry arm64: Explicitly document boot requirements for SVE arm64: Explicitly require that FPSIMD instructions do not trap arm64: Relax booting requirements for configuration of traps arm64: cpufeatures: use min and max arm64: stacktrace: restore terminal records arm64/vdso: Discard .note.gnu.property sections in vDSO arm64: doc: Add brk/mmap/mremap() to the Tagged Address ABI Exceptions psci: Remove unneeded semicolon ACPI: irq: Prevent unregistering of GIC SGIs ACPI: GTDT: Don't corrupt interrupt mappings on watchdow probe failure arm64: Show three registers per line arm64: remove HAVE_DEBUG_BUGVERBOSE arm64: alternative: simplify passing alt_region arm64: Force SPARSEMEM_VMEMMAP as the only memory management model arm64: vdso32: drop -no-integrated-as flag commit 2059c40aded724b3af139abb55cabeab5e0f5878 Merge: bd313968fd22f f48652bbe3ae6 Author: Linus Torvalds Date: Fri May 7 11:40:18 2021 -0700 Merge tag 'sound-fix-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Just a few device-specific HD-audio and USB-audio fixes" * tag 'sound-fix-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP ALSA: hda/realtek: Add fixup for HP OMEN laptop ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32 ALSA: hda/realtek: Fix silent headphone output on ASUS UX430UA ALSA: usb-audio: Add dB range mapping for Sennheiser Communications Headset PC 8 ALSA: hda/realtek: ALC285 Thinkpad jack pin quirk is unreachable commit bd313968fd22f9e20b858e80424fa04bbcca7467 Merge: 28b4afeb59db1 cf7b39a0cbf6b Author: Linus Torvalds Date: Fri May 7 11:35:12 2021 -0700 Merge tag 'block-5.13-2021-05-07' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: - dasd spelling fixes (Bhaskar) - Limit bio max size on multi-page bvecs to the hardware limit, to avoid overly large bio's (and hence latencies). Originally queued for the merge window, but needed a fix and was dropped from the initial pull (Changheun) - NVMe pull request (Christoph): - reset the bdev to ns head when failover (Daniel Wagner) - remove unsupported command noise (Keith Busch) - misc passthrough improvements (Kanchan Joshi) - fix controller ioctl through ns_head (Minwoo Im) - fix controller timeouts during reset (Tao Chiu) - rnbd fixes/cleanups (Gioh, Md, Dima) - Fix iov_iter re-expansion (yangerkun) * tag 'block-5.13-2021-05-07' of git://git.kernel.dk/linux-block: block: reexpand iov_iter after read/write nvmet: remove unsupported command noise nvme-multipath: reset bdev to ns head when failover nvme-pci: fix controller reset hang when racing with nvme_timeout nvme: move the fabrics queue ready check routines to core nvme: avoid memset for passthrough requests nvme: add nvme_get_ns helper nvme: fix controller ioctl through ns_head bio: limit bio max size RDMA/rtrs: fix uninitialized symbol 'cnt' s390: dasd: Mundane spelling fixes block/rnbd: Remove all likely and unlikely block/rnbd-clt: Check the return value of the function rtrs_clt_query block/rnbd: Fix style issues block/rnbd-clt: Change queue_depth type in rnbd_clt_session to size_t commit 28b4afeb59db1e78507a747fb872e3ce42cf6d38 Merge: a647034fe26b9 50b7b6f29de3e Author: Linus Torvalds Date: Fri May 7 11:29:23 2021 -0700 Merge tag 'io_uring-5.13-2021-05-07' of git://git.kernel.dk/linux-block Pull io_uring fixes from Jens Axboe: "Mostly fixes for merge window merged code. In detail: - Error case memory leak fixes (Colin, Zqiang) - Add the tools/io_uring/ to the list of maintained files (Lukas) - Set of fixes for the modified buffer registration API (Pavel) - Sanitize io thread setup on x86 (Stefan) - Ensure we truncate transfer count for registered buffers (Thadeu)" * tag 'io_uring-5.13-2021-05-07' of git://git.kernel.dk/linux-block: x86/process: setup io_threads more like normal user space threads MAINTAINERS: add io_uring tool to IO_URING io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers io_uring: Fix memory leak in io_sqe_buffers_register() io_uring: Fix premature return from loop and memory leak io_uring: fix unchecked error in switch_start() io_uring: allow empty slots for reg buffers io_uring: add more build check for uapi io_uring: dont overlap internal and user req flags io_uring: fix drain with rsrc CQEs commit a647034fe26b92702d5084b518c061e3cebefbaf Merge: e22e9832798df 9e895cd9649ab Author: Linus Torvalds Date: Fri May 7 11:23:41 2021 -0700 Merge tag 'nfs-for-5.13-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs Pull NFS client updates from Trond Myklebust: "Highlights include: Stable fixes: - Add validation of the UDP retrans parameter to prevent shift out-of-bounds - Don't discard pNFS layout segments that are marked for return Bugfixes: - Fix a NULL dereference crash in xprt_complete_bc_request() when the NFSv4.1 server misbehaves. - Fix the handling of NFS READDIR cookie verifiers - Sundry fixes to ensure attribute revalidation works correctly when the server does not return post-op attributes. - nfs4_bitmask_adjust() must not change the server global bitmasks - Fix major timeout handling in the RPC code. - NFSv4.2 fallocate() fixes. - Fix the NFSv4.2 SEEK_HOLE/SEEK_DATA end-of-file handling - Copy offload attribute revalidation fixes - Fix an incorrect filehandle size check in the pNFS flexfiles driver - Fix several RDMA transport setup/teardown races - Fix several RDMA queue wrapping issues - Fix a misplaced memory read barrier in sunrpc's call_decode() Features: - Micro optimisation of the TCP transmission queue using TCP_CORK - statx() performance improvements by further splitting up the tracking of invalid cached file metadata. - Support the NFSv4.2 'change_attr_type' attribute and use it to optimise handling of change attribute updates" * tag 'nfs-for-5.13-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (85 commits) xprtrdma: Fix a NULL dereference in frwr_unmap_sync() sunrpc: Fix misplaced barrier in call_decode NFSv4.2: Remove ifdef CONFIG_NFSD from NFSv4.2 client SSC code. xprtrdma: Move fr_mr field to struct rpcrdma_mr xprtrdma: Move the Work Request union to struct rpcrdma_mr xprtrdma: Move fr_linv_done field to struct rpcrdma_mr xprtrdma: Move cqe to struct rpcrdma_mr xprtrdma: Move fr_cid to struct rpcrdma_mr xprtrdma: Remove the RPC/RDMA QP event handler xprtrdma: Don't display r_xprt memory addresses in tracepoints xprtrdma: Add an rpcrdma_mr_completion_class xprtrdma: Add tracepoints showing FastReg WRs and remote invalidation xprtrdma: Avoid Send Queue wrapping xprtrdma: Do not wake RPC consumer on a failed LocalInv xprtrdma: Do not recycle MR after FastReg/LocalInv flushes xprtrdma: Clarify use of barrier in frwr_wc_localinv_done() xprtrdma: Rename frwr_release_mr() xprtrdma: rpcrdma_mr_pop() already does list_del_init() xprtrdma: Delete rpcrdma_recv_buffer_put() xprtrdma: Fix cwnd update ordering ... commit e22e9832798df81393d09d40fa34b01aea53cf39 Merge: a48b0872e6942 f8b139e2f2411 Author: Linus Torvalds Date: Fri May 7 11:18:52 2021 -0700 Merge tag '9p-for-5.13-rc1' of git://github.com/martinetd/linux Pull 9p updates from Dominique Martinet: "An error handling fix and constification" * tag '9p-for-5.13-rc1' of git://github.com/martinetd/linux: fs: 9p: fix v9fs_file_open writeback fid error check 9p: Constify static struct v9fs_attr_group commit 8085a36db71f54d2592426eb76bdf71b82479140 Author: Arkadiusz Kubalewski Date: Fri Apr 16 23:43:57 2021 +0200 i40e: Remove LLDP frame filters Remove filters from being setup in case of software DCB and allow the LLDP frames to be properly transmitted to the wire. It is not possible to transmit the LLDP frame out of the port, if they are filtered by control VSI. This prohibits software LLDP agent properly communicate its DCB capabilities to the neighbors. Fixes: 4b208eaa8078 ("i40e: Add init and default config of software based DCB") Signed-off-by: Arkadiusz Kubalewski Tested-by: Imam Hassan Reza Biswas Signed-off-by: Tony Nguyen commit 15395ec4685bd45a43d1b54b8fd9846b87e2c621 Author: Mateusz Palczewski Date: Tue Apr 13 14:43:07 2021 +0000 i40e: Fix PHY type identifiers for 2.5G and 5G adapters Unlike other supported adapters, 2.5G and 5G use different PHY type identifiers for reading/writing PHY settings and for reading link status. This commit introduces separate PHY identifiers for these two operation types. Fixes: 2e45d3f4677a ("i40e: Add support for X710 B/P & SFP+ cards") Signed-off-by: Dawid Lukwinski Signed-off-by: Mateusz Palczewski Reviewed-by: Aleksandr Loktionov Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit 61343e6da7810de81d6b826698946ae4f9070819 Author: Jaroslaw Gawin Date: Tue Apr 13 14:19:40 2021 +0000 i40e: fix the restart auto-negotiation after FEC modified When FEC mode was changed the link didn't know it because the link was not reset and new parameters were not negotiated. Set a flag 'I40E_AQ_PHY_ENABLE_ATOMIC_LINK' in 'abilities' to restart the link and make it run with the new settings. Fixes: 1d96340196f1 ("i40e: Add support FEC configuration for Fortville 25G") Signed-off-by: Jaroslaw Gawin Signed-off-by: Mateusz Palczewski Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit 38318f23a7ef86a8b1862e5e8078c4de121960c3 Author: Yunjian Wang Date: Mon Apr 12 22:41:18 2021 +0800 i40e: Fix use-after-free in i40e_client_subtask() Currently the call to i40e_client_del_instance frees the object pf->cinst, however pf->cinst->lan_info is being accessed after the free. Fix this by adding the missing return. Addresses-Coverity: ("Read from pointer after free") Fixes: 7b0b1a6d0ac9 ("i40e: Disable iWARP VSI PETCP_ENA flag on netdev down events") Signed-off-by: Yunjian Wang Signed-off-by: Tony Nguyen commit ae4393dfd472b194c90d75d2123105fb5ed59b04 Author: Magnus Karlsson Date: Mon Apr 26 13:14:01 2021 +0200 i40e: fix broken XDP support Commit 12738ac4754e ("i40e: Fix sparse errors in i40e_txrx.c") broke XDP support in the i40e driver. That commit was fixing a sparse error in the code by introducing a new variable xdp_res instead of overloading this into the skb pointer. The problem is that the code later uses the skb pointer in if statements and these where not extended to also test for the new xdp_res variable. Fix this by adding the correct tests for xdp_res in these places. The skb pointer was used to store the result of the XDP program by overloading the results in the error pointer ERR_PTR(-result). Therefore, the allocation failure test that used to only test for !skb now need to be extended to also consider !xdp_res. i40e_cleanup_headers() had a check that based on the skb value being an error pointer, i.e. a result from the XDP program != XDP_PASS, and if so start to process a new packet immediately, instead of populating skb fields and sending the skb to the stack. This check is not needed anymore, since we have added an explicit test for xdp_res being set and if so just do continue to pick the next packet from the NIC. Fixes: 12738ac4754e ("i40e: Fix sparse errors in i40e_txrx.c") Acked-by: Jesper Dangaard Brouer Tested-by: Jesper Dangaard Brouer Reported-by: Jesper Dangaard Brouer Reviewed-by: Maciej Fijalkowski Signed-off-by: Magnus Karlsson Signed-off-by: Tony Nguyen commit ca66a6770bd9d6d99e469debd1c7363ac455daf9 Author: Johnny Chuang Date: Tue Apr 13 09:20:50 2021 +0800 HID: i2c-hid: Skip ELAN power-on command after reset For ELAN touchscreen, we found our boot code of IC was not flexible enough to receive and handle this command. Once the FW main code of our controller is crashed for some reason, the controller could not be enumerated successfully to be recognized by the system host. therefore, it lost touch functionality. Add quirk for skip send power-on command after reset. It will impact to ELAN touchscreen and touchpad on HID over I2C projects. Fixes: 43b7029f475e ("HID: i2c-hid: Send power-on command after reset"). Cc: stable@vger.kernel.org Signed-off-by: Johnny Chuang Reviewed-by: Harry Cutts Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Benjamin Tissoires commit e9aa9c75c58e2e16be16ec2b5db5e14804d07213 Merge: fc85dc42a3840 db8e712e06874 Author: Tony Lindgren Date: Fri May 7 14:24:29 2021 +0300 Merge branch 'omap-for-v5.13/ti-sysc' into fixes commit db8e712e06874e37a1fdb9bb011618811fc96dbd Author: Tony Lindgren Date: Fri May 7 12:09:03 2021 +0300 bus: ti-sysc: Fix missing quirk flags for sata Naresh Kamboju reported that Beaglebone-X15 does not detect sata drives any longer after dra7 was flipped to boot with device tree data only. Turns out we are now missing the sata related quirk flags in ti-sysc that we used to have earlier. Fixes: 98feab31ac49 ("ARM: OMAP2+: Drop legacy platform data for dra7 sata") Fixes: 21206c8f2cb5 ("ARM: OMAP2+: Drop legacy platform data for omap5 sata") Link: https://lore.kernel.org/regressions/CA+G9fYtTN6ug3eBAW3wMcDeESUo+ebj7L5HBe5_fj4uqDExFQg@mail.gmail.com/ Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju Signed-off-by: Tony Lindgren commit ce7ea0cfdc2e9ff31d12da31c3226deddb9644f5 Author: Tom Lendacky Date: Thu May 6 15:14:41 2021 -0500 KVM: SVM: Move GHCB unmapping to fix RCU warning When an SEV-ES guest is running, the GHCB is unmapped as part of the vCPU run support. However, kvm_vcpu_unmap() triggers an RCU dereference warning with CONFIG_PROVE_LOCKING=y because the SRCU lock is released before invoking the vCPU run support. Move the GHCB unmapping into the prepare_guest_switch callback, which is invoked while still holding the SRCU lock, eliminating the RCU dereference warning. Fixes: 291bd20d5d88 ("KVM: SVM: Add initial support for a VMGEXIT VMEXIT") Reported-by: Borislav Petkov Signed-off-by: Tom Lendacky Message-Id: Signed-off-by: Paolo Bonzini commit 368340a3c7d9a207bfe544721d464b7109be8eae Author: Sean Christopherson Date: Thu May 6 16:15:42 2021 -0700 KVM: SVM: Invert user pointer casting in SEV {en,de}crypt helpers Invert the user pointer params for SEV's helpers for encrypting and decrypting guest memory so that they take a pointer and cast to an unsigned long as necessary, as opposed to doing the opposite. Tagging a non-pointer as __user is confusing and weird since a cast of some form needs to occur to actually access the user data. This also fixes Sparse warnings triggered by directly consuming the unsigned longs, which are "noderef" due to the __user tag. Cc: Brijesh Singh Cc: Tom Lendacky Cc: Ashish Kalra Signed-off-by: Sean Christopherson Message-Id: <20210506231542.2331138-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 258785ef08b323bddd844b4926a32c2b2045a1b0 Author: David Matlack Date: Thu May 6 15:24:43 2021 +0000 kvm: Cap halt polling at kvm->max_halt_poll_ns When growing halt-polling, there is no check that the poll time exceeds the per-VM limit. It's possible for vcpu->halt_poll_ns to grow past kvm->max_halt_poll_ns and stay there until a halt which takes longer than kvm->halt_poll_ns. Signed-off-by: David Matlack Signed-off-by: Venkatesh Srinivas Message-Id: <20210506152442.4010298-1-venkateshs@chromium.org> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit b26990987ffce0525abbd84b36595869cfdbbfe6 Author: Stefan Raspl Date: Thu May 6 16:03:52 2021 +0200 tools/kvm_stat: Fix documentation typo Makes the dash in front of option '-z' disappear in the generated man-page. Signed-off-by: Stefan Raspl Message-Id: <20210506140352.4178789-1-raspl@linux.ibm.com> Signed-off-by: Paolo Bonzini commit 3f804f6d201ca93adf4c3df04d1bfd152c1129d6 Author: Thomas Gleixner Date: Thu May 6 15:21:37 2021 +0200 KVM: x86: Prevent deadlock against tk_core.seq syzbot reported a possible deadlock in pvclock_gtod_notify(): CPU 0 CPU 1 write_seqcount_begin(&tk_core.seq); pvclock_gtod_notify() spin_lock(&pool->lock); queue_work(..., &pvclock_gtod_work) ktime_get() spin_lock(&pool->lock); do { seq = read_seqcount_begin(tk_core.seq) ... } while (read_seqcount_retry(&tk_core.seq, seq); While this is unlikely to happen, it's possible. Delegate queue_work() to irq_work() which postpones it until the tk_core.seq write held region is left and interrupts are reenabled. Fixes: 16e8d74d2da9 ("KVM: x86: notifier for clocksource changes") Reported-by: syzbot+6beae4000559d41d80f8@syzkaller.appspotmail.com Signed-off-by: Thomas Gleixner Message-Id: <87h7jgm1zy.ffs@nanos.tec.linutronix.de> Signed-off-by: Paolo Bonzini commit 594b27e677b35f9734b1969d175ebc6146741109 Author: Thomas Gleixner Date: Wed May 5 23:48:17 2021 +0200 KVM: x86: Cancel pvclock_gtod_work on module removal Nothing prevents the following: pvclock_gtod_notify() queue_work(system_long_wq, &pvclock_gtod_work); ... remove_module(kvm); ... work_queue_run() pvclock_gtod_work() <- UAF Ditto for any other operation on that workqueue list head which touches pvclock_gtod_work after module removal. Cancel the work in kvm_arch_exit() to prevent that. Fixes: 16e8d74d2da9 ("KVM: x86: notifier for clocksource changes") Signed-off-by: Thomas Gleixner Message-Id: <87czu4onry.ffs@nanos.tec.linutronix.de> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 03ca4589fabcc66b27e4cb8f8e95d64cf43badd0 Author: Sean Christopherson Date: Wed May 5 13:42:21 2021 -0700 KVM: x86: Prevent KVM SVM from loading on kernels with 5-level paging Disallow loading KVM SVM if 5-level paging is supported. In theory, NPT for L1 should simply work, but there unknowns with respect to how the guest's MAXPHYADDR will be handled by hardware. Nested NPT is more problematic, as running an L1 VMM that is using 2-level page tables requires stacking single-entry PDP and PML4 tables in KVM's NPT for L2, as there are no equivalent entries in L1's NPT to shadow. Barring hardware magic, for 5-level paging, KVM would need stack another layer to handle PML5. Opportunistically rename the lm_root pointer, which is used for the aforementioned stacking when shadowing 2-level L1 NPT, to pml4_root to call out that it's specifically for PML4. Suggested-by: Paolo Bonzini Signed-off-by: Sean Christopherson Message-Id: <20210505204221.1934471-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 76ea438b4afcd9ee8da3387e9af4625eaccff58f Author: Paolo Bonzini Date: Thu May 6 06:30:04 2021 -0400 KVM: X86: Expose bus lock debug exception to guest Bus lock debug exception is an ability to notify the kernel by an #DB trap after the instruction acquires a bus lock and is executed when CPL>0. This allows the kernel to enforce user application throttling or mitigations. Existence of bus lock debug exception is enumerated via CPUID.(EAX=7,ECX=0).ECX[24]. Software can enable these exceptions by setting bit 2 of the MSR_IA32_DEBUGCTL. Expose the CPUID to guest and emulate the MSR handling when guest enables it. Support for this feature was originally developed by Xiaoyao Li and Chenyi Qiang, but code has since changed enough that this patch has nothing in common with theirs, except for this commit message. Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Signed-off-by: Chenyi Qiang Message-Id: <20210202090433.13441-4-chenyi.qiang@intel.com> Signed-off-by: Paolo Bonzini commit e8ea85fb280ec55674bca88ea7cd85f60d19567f Author: Chenyi Qiang Date: Tue Feb 2 17:04:32 2021 +0800 KVM: X86: Add support for the emulation of DR6_BUS_LOCK bit Bus lock debug exception introduces a new bit DR6_BUS_LOCK (bit 11 of DR6) to indicate that bus lock #DB exception is generated. The set/clear of DR6_BUS_LOCK is similar to the DR6_RTM. The processor clears DR6_BUS_LOCK when the exception is generated. For all other #DB, the processor sets this bit to 1. Software #DB handler should set this bit before returning to the interrupted task. In VMM, to avoid breaking the CPUs without bus lock #DB exception support, activate the DR6_BUS_LOCK conditionally in DR6_FIXED_1 bits. When intercepting the #DB exception caused by bus locks, bit 11 of the exit qualification is set to identify it. The VMM should emulate the exception by clearing the bit 11 of the guest DR6. Co-developed-by: Xiaoyao Li Signed-off-by: Xiaoyao Li Signed-off-by: Chenyi Qiang Message-Id: <20210202090433.13441-3-chenyi.qiang@intel.com> Signed-off-by: Paolo Bonzini commit 34114136f725cbd0c83e7b5a0c8a977976cd82f7 Author: Nicholas Piggin Date: Wed May 5 22:15:09 2021 +1000 KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks Commit b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks") causes unmap_gfn_range and age_gfn callbacks to only work on the first gfn in the range. It also makes the aging callbacks call into both radix and hash aging functions for radix guests. Fix this. Add warnings for the single-gfn calls that have been converted to range callbacks, in case they ever receieve ranges greater than 1. Fixes: b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks") Reported-by: Bharata B Rao Tested-by: Bharata B Rao Signed-off-by: Nicholas Piggin Message-Id: <20210505121509.1470207-1-npiggin@gmail.com> Signed-off-by: Paolo Bonzini commit 78bba966ee3cdbbfc585d8e39237378fba50a142 Author: Sean Christopherson Date: Tue May 4 10:17:34 2021 -0700 KVM: x86: Hide RDTSCP and RDPID if MSR_TSC_AUX probing failed If probing MSR_TSC_AUX failed, hide RDTSCP and RDPID, and WARN if either feature was reported as supported. In theory, such a scenario should never happen as both Intel and AMD state that MSR_TSC_AUX is available if RDTSCP or RDPID is supported. But, KVM injects #GP on MSR_TSC_AUX accesses if probing failed, faults on WRMSR(MSR_TSC_AUX) may be fatal to the guest (because they happen during early CPU bringup), and KVM itself has effectively misreported RDPID support in the past. Note, this also has the happy side effect of omitting MSR_TSC_AUX from the list of MSRs that are exposed to userspace if probing the MSR fails. Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 61a05d444d2ca8d40add453a5f7058fbb1b57eca Author: Sean Christopherson Date: Tue May 4 10:17:33 2021 -0700 KVM: x86: Tie Intel and AMD behavior for MSR_TSC_AUX to guest CPU model Squish the Intel and AMD emulation of MSR_TSC_AUX together and tie it to the guest CPU model instead of the host CPU behavior. While not strictly necessary to avoid guest breakage, emulating cross-vendor "architecture" will provide consistent behavior for the guest, e.g. WRMSR fault behavior won't change if the vCPU is migrated to a host with divergent behavior. Note, the "new" kvm_is_supported_user_return_msr() checks do not add new functionality on either SVM or VMX. On SVM, the equivalent was "tsc_aux_uret_slot < 0", and on VMX the check was buried in the vmx_find_uret_msr() call at the find_uret_msr label. Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e5fda4bbadb053e3b5164476146cf43092785c0b Author: Sean Christopherson Date: Tue May 4 10:17:32 2021 -0700 KVM: x86: Move uret MSR slot management to common x86 Now that SVM and VMX both probe MSRs before "defining" user return slots for them, consolidate the code for probe+define into common x86 and eliminate the odd behavior of having the vendor code define the slot for a given MSR. Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9cc39a5a43c05f8eda206bf9e144119820ecf5c8 Author: Sean Christopherson Date: Tue May 4 10:17:31 2021 -0700 KVM: x86: Export the number of uret MSRs to vendor modules Split out and export the number of configured user return MSRs so that VMX can iterate over the set of MSRs without having to do its own tracking. Keep the list itself internal to x86 so that vendor code still has to go through the "official" APIs to add/modify entries. Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5e17c624010a82bbcca9b955155781927eb6532a Author: Sean Christopherson Date: Tue May 4 10:17:30 2021 -0700 KVM: VMX: Disable loading of TSX_CTRL MSR the more conventional way Tag TSX_CTRL as not needing to be loaded when RTM isn't supported in the host. Crushing the write mask to '0' has the same effect, but requires more mental gymnastics to understand. Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8ea8b8d6f869425e21f34e60bdbe7e47e6c9d6b9 Author: Sean Christopherson Date: Tue May 4 10:17:29 2021 -0700 KVM: VMX: Use common x86's uret MSR list as the one true list Drop VMX's global list of user return MSRs now that VMX doesn't resort said list to isolate "active" MSRs, i.e. now that VMX's list and x86's list have the same MSRs in the same order. In addition to eliminating the redundant list, this will also allow moving more of the list management into common x86. Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ee9d22e08d1341692a43926e5e1d84c90a5dac1d Author: Sean Christopherson Date: Tue May 4 10:17:28 2021 -0700 KVM: VMX: Use flag to indicate "active" uret MSRs instead of sorting list Explicitly flag a uret MSR as needing to be loaded into hardware instead of resorting the list of "active" MSRs and tracking how many MSRs in total need to be loaded. The only benefit to sorting the list is that the loop to load MSRs during vmx_prepare_switch_to_guest() doesn't need to iterate over all supported uret MRS, only those that are active. But that is a pointless optimization, as the most common case, running a 64-bit guest, will load the vast majority of MSRs. Not to mention that a single WRMSR is far more expensive than iterating over the list. Providing a stable list order obviates the need to track a given MSR's "slot" in the per-CPU list of user return MSRs; all lists simply use the same ordering. Future patches will take advantage of the stable order to further simplify the related code. Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b6194b94a2ca4affce5aab1bbf773a977ad73671 Author: Sean Christopherson Date: Tue May 4 10:17:27 2021 -0700 KVM: VMX: Configure list of user return MSRs at module init Configure the list of user return MSRs that are actually supported at module init instead of reprobing the list of possible MSRs every time a vCPU is created. Curating the list on a per-vCPU basis is pointless; KVM is completely hosed if the set of supported MSRs changes after module init, or if the set of MSRs differs per physical PCU. The per-vCPU lists also increase complexity (see __vmx_find_uret_msr()) and creates corner cases that _should_ be impossible, but theoretically exist in KVM, e.g. advertising RDTSCP to userspace without actually being able to virtualize RDTSCP if probing MSR_TSC_AUX fails. Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 36fa06f9ff39f23e03cd8206dc6bbb7711c23be6 Author: Sean Christopherson Date: Tue May 4 10:17:26 2021 -0700 KVM: x86: Add support for RDPID without RDTSCP Allow userspace to enable RDPID for a guest without also enabling RDTSCP. Aside from checking for RDPID support in the obvious flows, VMX also needs to set ENABLE_RDTSCP=1 when RDPID is exposed. For the record, there is no known scenario where enabling RDPID without RDTSCP is desirable. But, both AMD and Intel architectures allow for the condition, i.e. this is purely to make KVM more architecturally accurate. Fixes: 41cd02c6f7f6 ("kvm: x86: Expose RDPID in KVM_GET_SUPPORTED_CPUID") Cc: stable@vger.kernel.org Reported-by: Reiji Watanabe Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0caa0a77c2f6fcd0830cdcd018db1af98fe35e28 Author: Sean Christopherson Date: Tue May 4 10:17:25 2021 -0700 KVM: SVM: Probe and load MSR_TSC_AUX regardless of RDTSCP support in host Probe MSR_TSC_AUX whether or not RDTSCP is supported in the host, and if probing succeeds, load the guest's MSR_TSC_AUX into hardware prior to VMRUN. Because SVM doesn't support interception of RDPID, RDPID cannot be disallowed in the guest (without resorting to binary translation). Leaving the host's MSR_TSC_AUX in hardware would leak the host's value to the guest if RDTSCP is not supported. Note, there is also a kernel bug that prevents leaking the host's value. The host kernel initializes MSR_TSC_AUX if and only if RDTSCP is supported, even though the vDSO usage consumes MSR_TSC_AUX via RDPID. I.e. if RDTSCP is not supported, there is no host value to leak. But, if/when the host kernel bug is fixed, KVM would start leaking MSR_TSC_AUX in the case where hardware supports RDPID but RDTSCP is unavailable for whatever reason. Probing MSR_TSC_AUX will also allow consolidating the probe and define logic in common x86, and will make it simpler to condition the existence of MSR_TSX_AUX (from the guest's perspective) on RDTSCP *or* RDPID. Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5104d7ffcf24749939bea7fdb5378d186473f890 Author: Sean Christopherson Date: Tue May 4 10:17:24 2021 -0700 KVM: VMX: Disable preemption when probing user return MSRs Disable preemption when probing a user return MSR via RDSMR/WRMSR. If the MSR holds a different value per logical CPU, the WRMSR could corrupt the host's value if KVM is preempted between the RDMSR and WRMSR, and then rescheduled on a different CPU. Opportunistically land the helper in common x86, SVM will use the helper in a future commit. Fixes: 4be534102624 ("KVM: VMX: Initialize vmx->guest_msrs[] right after allocation") Cc: stable@vger.kernel.org Cc: Xiaoyao Li Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-6-seanjc@google.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 2183de4161b90bd3851ccd3910c87b2c9adfc6ed Author: Sean Christopherson Date: Tue May 4 10:17:23 2021 -0700 KVM: x86: Move RDPID emulation intercept to its own enum Add a dedicated intercept enum for RDPID instead of piggybacking RDTSCP. Unlike VMX's ENABLE_RDTSCP, RDPID is not bound to SVM's RDTSCP intercept. Fixes: fb6d4d340e05 ("KVM: x86: emulate RDPID") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-5-seanjc@google.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 3b195ac9260235624b1c18f7bdaef184479c1d41 Author: Sean Christopherson Date: Tue May 4 10:17:22 2021 -0700 KVM: SVM: Inject #UD on RDTSCP when it should be disabled in the guest Intercept RDTSCP to inject #UD if RDTSC is disabled in the guest. Note, SVM does not support intercepting RDPID. Unlike VMX's ENABLE_RDTSCP control, RDTSCP interception does not apply to RDPID. This is a benign virtualization hole as the host kernel (incorrectly) sets MSR_TSC_AUX if RDTSCP is supported, and KVM loads the guest's MSR_TSC_AUX into hardware if RDTSCP is supported in the host, i.e. KVM will not leak the host's MSR_TSC_AUX to the guest. But, when the kernel bug is fixed, KVM will start leaking the host's MSR_TSC_AUX if RDPID is supported in hardware, but RDTSCP isn't available for whatever reason. This leak will be remedied in a future commit. Fixes: 46896c73c1a4 ("KVM: svm: add support for RDTSCP") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-4-seanjc@google.com> Reviewed-by: Jim Mattson Reviewed-by: Reiji Watanabe Signed-off-by: Paolo Bonzini commit 85d0011264da24be08ae907d7f29983a597ca9b1 Author: Sean Christopherson Date: Tue May 4 10:17:21 2021 -0700 KVM: x86: Emulate RDPID only if RDTSCP is supported Do not advertise emulation support for RDPID if RDTSCP is unsupported. RDPID emulation subtly relies on MSR_TSC_AUX to exist in hardware, as both vmx_get_msr() and svm_get_msr() will return an error if the MSR is unsupported, i.e. ctxt->ops->get_msr() will fail and the emulator will inject a #UD. Note, RDPID emulation also relies on RDTSCP being enabled in the guest, but this is a KVM bug and will eventually be fixed. Fixes: fb6d4d340e05 ("KVM: x86: emulate RDPID") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-3-seanjc@google.com> Reviewed-by: Jim Mattson Reviewed-by: Reiji Watanabe Signed-off-by: Paolo Bonzini commit 8aec21c04caa2000f91cf8822ae0811e4b0c3971 Author: Sean Christopherson Date: Tue May 4 10:17:20 2021 -0700 KVM: VMX: Do not advertise RDPID if ENABLE_RDTSCP control is unsupported Clear KVM's RDPID capability if the ENABLE_RDTSCP secondary exec control is unsupported. Despite being enumerated in a separate CPUID flag, RDPID is bundled under the same VMCS control as RDTSCP and will #UD in VMX non-root if ENABLE_RDTSCP is not enabled. Fixes: 41cd02c6f7f6 ("kvm: x86: Expose RDPID in KVM_GET_SUPPORTED_CPUID") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210504171734.1434054-2-seanjc@google.com> Reviewed-by: Jim Mattson Reviewed-by: Reiji Watanabe Signed-off-by: Paolo Bonzini commit 809c79137a192d7e881a517f803ebbf96305f066 Author: Maxim Levitsky Date: Tue May 4 17:39:36 2021 +0300 KVM: nSVM: remove a warning about vmcb01 VM exit reason While in most cases, when returning to use the VMCB01, the exit reason stored in it will be SVM_EXIT_VMRUN, on first VM exit after a nested migration this field can contain anything since the VM entry did happen before the migration. Remove this warning to avoid the false positive. Signed-off-by: Maxim Levitsky Message-Id: <20210504143936.1644378-3-mlevitsk@redhat.com> Fixes: 9a7de6ecc3ed ("KVM: nSVM: If VMRUN is single-stepped, queue the #DB intercept in nested_svm_vmexit()") Signed-off-by: Paolo Bonzini commit 063ab16c14db5a2ef52d54d0475b7fed19c982d7 Author: Maxim Levitsky Date: Tue May 4 17:39:35 2021 +0300 KVM: nSVM: always restore the L1's GIF on migration While usually the L1's GIF is set while L2 runs, and usually migration nested state is loaded after a vCPU reset which also sets L1's GIF to true, this is not guaranteed. Signed-off-by: Maxim Levitsky Message-Id: <20210504143936.1644378-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit aca352886ebdd675b5131ed4c83bf5477eee5d72 Author: Siddharth Chandrasekaran Date: Mon May 3 14:21:11 2021 +0200 KVM: x86: Hoist input checks in kvm_add_msr_filter() In ioctl KVM_X86_SET_MSR_FILTER, input from user space is validated after a memdup_user(). For invalid inputs we'd memdup and then call kfree unnecessarily. Hoist input validation to avoid kfree altogether. Signed-off-by: Siddharth Chandrasekaran Message-Id: <20210503122111.13775-1-sidcha@amazon.de> Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 5f443e424efab56baa8021da04878f88eb0815d4 Author: Bill Wendling Date: Thu Dec 10 17:23:17 2020 -0800 selftests: kvm: remove reassignment of non-absolute variables Clang's integrated assembler does not allow symbols with non-absolute values to be reassigned. Modify the interrupt entry loop macro to be compatible with IAS by using a label and an offset. Cc: Jian Cai Signed-off-by: Bill Wendling References: https://lore.kernel.org/lkml/20200714233024.1789985-1-caij2003@gmail.com/ Message-Id: <20201211012317.3722214-1-morbo@google.com> Reviewed-by: Jim Mattson Signed-off-by: Paolo Bonzini commit 70f094f4f01dc4d6f78ac6407f85627293a6553c Author: Vitaly Kuznetsov Date: Mon May 3 17:08:52 2021 +0200 KVM: nVMX: Properly pad 'struct kvm_vmx_nested_state_hdr' Eliminate the probably unwanted hole in 'struct kvm_vmx_nested_state_hdr': Pre-patch: struct kvm_vmx_nested_state_hdr { __u64 vmxon_pa; /* 0 8 */ __u64 vmcs12_pa; /* 8 8 */ struct { __u16 flags; /* 16 2 */ } smm; /* 16 2 */ /* XXX 2 bytes hole, try to pack */ __u32 flags; /* 20 4 */ __u64 preemption_timer_deadline; /* 24 8 */ }; Post-patch: struct kvm_vmx_nested_state_hdr { __u64 vmxon_pa; /* 0 8 */ __u64 vmcs12_pa; /* 8 8 */ struct { __u16 flags; /* 16 2 */ } smm; /* 16 2 */ __u16 pad; /* 18 2 */ __u32 flags; /* 20 4 */ __u64 preemption_timer_deadline; /* 24 8 */ }; Signed-off-by: Vitaly Kuznetsov Message-Id: <20210503150854.1144255-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit c9ecafaf0113a305f5085ceb9c7a4b64ca70eae9 Author: Vitaly Kuznetsov Date: Wed May 5 17:18:22 2021 +0200 KVM: selftests: evmcs_test: Check that VMCS12 is alway properly synced to eVMCS after restore Add a test for the regression, introduced by commit f2c7ef3ba955 ("KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit"). When L2->L1 exit is forced immediately after restoring nested state, KVM_REQ_GET_NESTED_STATE_PAGES request is cleared and VMCS12 changes (e.g. fresh RIP) are not reflected to eVMCS. The consequent nested vCPU run gets broken. Utilize NMI injection to do the job. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210505151823.1341678-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 32d1b3ab588c1231dbfa9eb08819c50529ce77d7 Author: Vitaly Kuznetsov Date: Wed May 5 17:18:21 2021 +0200 KVM: selftests: evmcs_test: Check that VMLAUNCH with bogus EVMPTR is causing #UD 'run->exit_reason == KVM_EXIT_SHUTDOWN' check is not ideal as we may be getting some unexpected exception. Directly check for #UD instead. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210505151823.1341678-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit f5c7e8425f18fdb9bdb7d13340651d7876890329 Author: Vitaly Kuznetsov Date: Mon May 3 17:08:51 2021 +0200 KVM: nVMX: Always make an attempt to map eVMCS after migration When enlightened VMCS is in use and nested state is migrated with vmx_get_nested_state()/vmx_set_nested_state() KVM can't map evmcs page right away: evmcs gpa is not 'struct kvm_vmx_nested_state_hdr' and we can't read it from VP assist page because userspace may decide to restore HV_X64_MSR_VP_ASSIST_PAGE after restoring nested state (and QEMU, for example, does exactly that). To make sure eVMCS is mapped /vmx_set_nested_state() raises KVM_REQ_GET_NESTED_STATE_PAGES request. Commit f2c7ef3ba955 ("KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit") added KVM_REQ_GET_NESTED_STATE_PAGES clearing to nested_vmx_vmexit() to make sure MSR permission bitmap is not switched when an immediate exit from L2 to L1 happens right after migration (caused by a pending event, for example). Unfortunately, in the exact same situation we still need to have eVMCS mapped so nested_sync_vmcs12_to_shadow() reflects changes in VMCS12 to eVMCS. As a band-aid, restore nested_get_evmcs_page() when clearing KVM_REQ_GET_NESTED_STATE_PAGES in nested_vmx_vmexit(). The 'fix' is far from being ideal as we can't easily propagate possible failures and even if we could, this is most likely already too late to do so. The whole 'KVM_REQ_GET_NESTED_STATE_PAGES' idea for mapping eVMCS after migration seems to be fragile as we diverge too much from the 'native' path when vmptr loading happens on vmx_set_nested_state(). Fixes: f2c7ef3ba955 ("KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit") Signed-off-by: Vitaly Kuznetsov Message-Id: <20210503150854.1144255-2-vkuznets@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 46a63924b05f335b0765ad13dae4d2d7569f25c9 Author: Siddharth Chandrasekaran Date: Mon May 3 14:00:58 2021 +0200 doc/kvm: Fix wrong entry for KVM_CAP_X86_MSR_FILTER The capability that exposes new ioctl KVM_X86_SET_MSR_FILTER to userspace is specified incorrectly as the ioctl itself (instead of KVM_CAP_X86_MSR_FILTER). This patch fixes it. Fixes: 1a155254ff93 ("KVM: x86: Introduce MSR filtering") Reviewed-by: Alexander Graf Signed-off-by: Siddharth Chandrasekaran Message-Id: <20210503120059.9283-1-sidcha@amazon.de> Signed-off-by: Paolo Bonzini commit 384fc672f528d3b84eacd9a86ecf35df3363b8ba Author: Vitaly Kuznetsov Date: Wed Apr 14 14:35:44 2021 +0200 x86/kvm: Unify kvm_pv_guest_cpu_reboot() with kvm_guest_cpu_offline() Simplify the code by making PV features shutdown happen in one place. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210414123544.1060604-6-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 3d6b84132d2a57b5a74100f6923a8feb679ac2ce Author: Vitaly Kuznetsov Date: Wed Apr 14 14:35:43 2021 +0200 x86/kvm: Disable all PV features on crash Crash shutdown handler only disables kvmclock and steal time, other PV features remain active so we risk corrupting memory or getting some side-effects in kdump kernel. Move crash handler to kvm.c and unify with CPU offline. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210414123544.1060604-5-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit c02027b5742b5aa804ef08a4a9db433295533046 Author: Vitaly Kuznetsov Date: Wed Apr 14 14:35:42 2021 +0200 x86/kvm: Disable kvmclock on all CPUs on shutdown Currenly, we disable kvmclock from machine_shutdown() hook and this only happens for boot CPU. We need to disable it for all CPUs to guard against memory corruption e.g. on restore from hibernate. Note, writing '0' to kvmclock MSR doesn't clear memory location, it just prevents hypervisor from updating the location so for the short while after write and while CPU is still alive, the clock remains usable and correct so we don't need to switch to some other clocksource. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210414123544.1060604-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 8b79feffeca28c5459458fe78676b081e87c93a4 Author: Vitaly Kuznetsov Date: Wed Apr 14 14:35:41 2021 +0200 x86/kvm: Teardown PV features on boot CPU as well Various PV features (Async PF, PV EOI, steal time) work through memory shared with hypervisor and when we restore from hibernation we must properly teardown all these features to make sure hypervisor doesn't write to stale locations after we jump to the previously hibernated kernel (which can try to place anything there). For secondary CPUs the job is already done by kvm_cpu_down_prepare(), register syscore ops to do the same for boot CPU. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210414123544.1060604-3-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 8822702f6e4c8917c83ba79e0ebf2c8c218910d4 Author: Hui Wang Date: Fri May 7 10:44:52 2021 +0800 ALSA: hda/realtek: reset eapd coeff to default value for alc287 Ubuntu users reported an audio bug on the Lenovo Yoga Slim 7 14IIL05, he installed dual OS (Windows + Linux), if he booted to the Linux from Windows, the Speaker can't work well, it has crackling noise, if he poweroff the machine first after Windows, the Speaker worked well. Before rebooting or shutdown from Windows, the Windows changes the codec eapd coeff value, but the BIOS doesn't re-initialize its value, when booting into the Linux from Windows, the eapd coeff value is not correct. To fix it, set the codec default value to that coeff register in the alsa driver. BugLink: http://bugs.launchpad.net/bugs/1925057 Suggested-by: Kailang Yang Cc: Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20210507024452.8300-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit 6c8774a94e6ad26f29ef103c8671f55c255c6201 Author: Eric Dumazet Date: Thu May 6 05:53:50 2021 -0700 netfilter: nftables: avoid potential overflows on 32bit arches User space could ask for very large hash tables, we need to make sure our size computations wont overflow. nf_tables_newset() needs to double check the u64 size will fit into size_t field. Fixes: 0ed6389c483d ("netfilter: nf_tables: rename set implementations") Signed-off-by: Eric Dumazet Signed-off-by: Pablo Neira Ayuso commit a54754ec9891830ba548e2010c889e3c8146e449 Author: Eric Dumazet Date: Thu May 6 05:53:23 2021 -0700 netfilter: nftables: avoid overflows in nft_hash_buckets() Number of buckets being stored in 32bit variables, we have to ensure that no overflows occur in nft_hash_buckets() syzbot injected a size == 0x40000000 and reported: UBSAN: shift-out-of-bounds in ./include/linux/log2.h:57:13 shift exponent 64 is too large for 64-bit type 'long unsigned int' CPU: 1 PID: 29539 Comm: syz-executor.4 Not tainted 5.12.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:327 __roundup_pow_of_two include/linux/log2.h:57 [inline] nft_hash_buckets net/netfilter/nft_set_hash.c:411 [inline] nft_hash_estimate.cold+0x19/0x1e net/netfilter/nft_set_hash.c:652 nft_select_set_ops net/netfilter/nf_tables_api.c:3586 [inline] nf_tables_newset+0xe62/0x3110 net/netfilter/nf_tables_api.c:4322 nfnetlink_rcv_batch+0xa09/0x24b0 net/netfilter/nfnetlink.c:488 nfnetlink_rcv_skb_batch net/netfilter/nfnetlink.c:612 [inline] nfnetlink_rcv+0x3af/0x420 net/netfilter/nfnetlink.c:630 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 Fixes: 0ed6389c483d ("netfilter: nf_tables: rename set implementations") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: Pablo Neira Ayuso commit a48b0872e69428d3d02994dcfad3519f01def7fa Merge: 05da1f643f00a baf2f90ba416c Author: Linus Torvalds Date: Fri May 7 00:34:51 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge yet more updates from Andrew Morton: "This is everything else from -mm for this merge window. 90 patches. Subsystems affected by this patch series: mm (cleanups and slub), alpha, procfs, sysctl, misc, core-kernel, bitmap, lib, compat, checkpatch, epoll, isofs, nilfs2, hpfs, exit, fork, kexec, gcov, panic, delayacct, gdb, resource, selftests, async, initramfs, ipc, drivers/char, and spelling" * emailed patches from Andrew Morton : (90 commits) mm: fix typos in comments mm: fix typos in comments treewide: remove editor modelines and cruft ipc/sem.c: spelling fix fs: fat: fix spelling typo of values kernel/sys.c: fix typo kernel/up.c: fix typo kernel/user_namespace.c: fix typos kernel/umh.c: fix some spelling mistakes include/linux/pgtable.h: few spelling fixes mm/slab.c: fix spelling mistake "disired" -> "desired" scripts/spelling.txt: add "overflw" scripts/spelling.txt: Add "diabled" typo scripts/spelling.txt: add "overlfow" arm: print alloc free paths for address in registers mm/vmalloc: remove vwrite() mm: remove xlate_dev_kmem_ptr() drivers/char: remove /dev/kmem for good mm: fix some typos and code style problems ipc/sem.c: mundane typo fixes ... commit baf2f90ba416cd887d7f54cc877d8764f6775de2 Author: Lu Jialin Date: Thu May 6 18:06:50 2021 -0700 mm: fix typos in comments succed -> succeed in mm/hugetlb.c wil -> will in mm/mempolicy.c wit -> with in mm/page_alloc.c Retruns -> Returns in mm/page_vma_mapped.c confict -> conflict in mm/secretmem.c No functionality changed. Link: https://lkml.kernel.org/r/20210408140027.60623-1-lujialin4@huawei.com Signed-off-by: Lu Jialin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0953a1bbaca71e1ebbcb9864eb1b273156157ed Author: Ingo Molnar Date: Thu May 6 18:06:47 2021 -0700 mm: fix typos in comments Fix ~94 single-word typos in locking code comments, plus a few very obvious grammar mistakes. Link: https://lkml.kernel.org/r/20210322212624.GA1963421@gmail.com Link: https://lore.kernel.org/r/20210322205203.GB1959563@gmail.com Signed-off-by: Ingo Molnar Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Randy Dunlap Cc: Bhaskar Chowdhury Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa60ce2cb4506701c43bd4cf3ca23d970daf1b9c Author: Masahiro Yamada Date: Thu May 6 18:06:44 2021 -0700 treewide: remove editor modelines and cruft The section "19) Editor modelines and other cruft" in Documentation/process/coding-style.rst clearly says, "Do not include any of these in source files." I recently receive a patch to explicitly add a new one. Let's do treewide cleanups, otherwise some people follow the existing code and attempt to upstream their favoriate editor setups. It is even nicer if scripts/checkpatch.pl can check it. If we like to impose coding style in an editor-independent manner, I think editorconfig (patch [1]) is a saner solution. [1] https://lore.kernel.org/lkml/20200703073143.423557-1-danny@kdrag0n.dev/ Link: https://lkml.kernel.org/r/20210324054457.1477489-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Acked-by: Geert Uytterhoeven Reviewed-by: Miguel Ojeda [auxdisplay] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7497835f7e8dae01c4850ce7204f6a8a7f58f2e5 Author: Bhaskar Chowdhury Date: Thu May 6 18:06:41 2021 -0700 ipc/sem.c: spelling fix s/purpuse/purpose/ Link: https://lkml.kernel.org/r/20210319221432.26631-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a109ae2a0252308aa46ce77067e751295b9beb87 Author: dingsenjie Date: Thu May 6 18:06:39 2021 -0700 fs: fat: fix spelling typo of values vaules -> values Link: https://lkml.kernel.org/r/20210302034817.30384-1-dingsenjie@163.com Signed-off-by: dingsenjie Acked-by: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5afe69c2ccd069112fd299b573d30d6b14528b6c Author: Xiaofeng Cao Date: Thu May 6 18:06:36 2021 -0700 kernel/sys.c: fix typo change 'infite' to 'infinite' change 'concurent' to 'concurrent' change 'memvers' to 'members' change 'decendants' to 'descendants' change 'argumets' to 'arguments' Link: https://lkml.kernel.org/r/20210316112904.10661-1-cxfcosmos@gmail.com Signed-off-by: Xiaofeng Cao Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0fffaff0b8960c9a110211510269744af1f1d1e Author: Bhaskar Chowdhury Date: Thu May 6 18:06:33 2021 -0700 kernel/up.c: fix typo s/condtions/conditions/ Link: https://lkml.kernel.org/r/20210317032732.3260835-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a12f4f85bc5a70ff5b74a274d3074f12e1122913 Author: Xiaofeng Cao Date: Thu May 6 18:06:30 2021 -0700 kernel/user_namespace.c: fix typos change 'verifing' to 'verifying' change 'certaint' to 'certain' change 'approprpiate' to 'appropriate' Link: https://lkml.kernel.org/r/20210317100129.12440-1-caoxiaofeng@yulong.com Signed-off-by: Xiaofeng Cao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48207f7d41c8bdae94d2aae11620ed76fee95d45 Author: zhouchuangao Date: Thu May 6 18:06:27 2021 -0700 kernel/umh.c: fix some spelling mistakes Fix some spelling mistakes, and modify the order of the parameter comments to be consistent with the order of the parameters passed to the function. Link: https://lkml.kernel.org/r/1615636139-4076-1-git-send-email-zhouchuangao@vivo.com Signed-off-by: zhouchuangao Acked-by: Luis Chamberlain Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2eb70aab25dd9b0013a0035b416dbe0e81e6ad48 Author: Bhaskar Chowdhury Date: Thu May 6 18:06:24 2021 -0700 include/linux/pgtable.h: few spelling fixes Few spelling fixes throughout the file. Link: https://lkml.kernel.org/r/20210318201404.6380-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 80d015587a62f7de0495f2e84c9a584322453ac6 Author: Colin Ian King Date: Thu May 6 18:06:21 2021 -0700 mm/slab.c: fix spelling mistake "disired" -> "desired" There is a spelling mistake in a comment. Fix it. Link: https://lkml.kernel.org/r/20210317094158.5762-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d4e3e52b4dd57b1cfd4b43a20976385463e16126 Author: Drew Fustini Date: Thu May 6 18:06:18 2021 -0700 scripts/spelling.txt: add "overflw" Add typo "overflw" for "overflow". This typo was found and fixed in drivers/clocksource/timer-pistachio.c. Link: https://lore.kernel.org/lkml/20210305090315.384547-1-drew@beagleboard.org/ Link: https://lkml.kernel.org/r/20210305095151.388182-1-drew@beagleboard.org Signed-off-by: Drew Fustini Suggested-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4799be53775bf2fdc810b897fb89dd0c81e6913 Author: zuoqilin Date: Thu May 6 18:06:15 2021 -0700 scripts/spelling.txt: Add "diabled" typo Increase "diabled" spelling error check. Link: https://lkml.kernel.org/r/20210304070106.2313-1-zuoqilin1@163.com Signed-off-by: zuoqilin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 702850a45a7798031aa06baa46f9fc2cdd1e747e Author: Drew Fustini Date: Thu May 6 18:06:12 2021 -0700 scripts/spelling.txt: add "overlfow" Add typo "overlfow" for "overflow". This typo was found and fixed in net/sctp/tsnmap.c. Link: https://lore.kernel.org/netdev/20210304055548.56829-1-drew@beagleboard.org/ Link: https://lkml.kernel.org/r/20210304072657.64577-1-drew@beagleboard.org Signed-off-by: Drew Fustini Suggested-by: Kees Cook Reviewed-by: Kees Cook Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5aa6b70ed182549cae9c7ebb48820c42ffaf2eb1 Author: Maninder Singh Date: Thu May 6 18:06:09 2021 -0700 arm: print alloc free paths for address in registers In case of a use after free kernel oops, the freeing path of the object is required to debug futher. In most of cases the object address is present in one of the registers. Thus check the register's address and if it belongs to slab, print its alloc and free path. e.g. in the below issue register r6 belongs to slab, and a use after free issue occurred on one of its dereferenced values: Unable to handle kernel paging request at virtual address 6b6b6b6f .... pc : [] lr : [] psr: 60000013 sp : c8927d40 ip : ffffefff fp : c8aa8020 r10: c8927e10 r9 : 00000001 r8 : 00400cc0 r7 : 00000000 r6 : c8ab0180 r5 : c1804a80 r4 : c8aa8008 r3 : c1a5661c r2 : 00000000 r1 : 6b6b6b6b r0 : c139bf48 ..... Register r6 information: slab kmalloc-64 start c8ab0140 data offset 64 pointer offset 0 size 64 allocated at meminfo_proc_show+0x40/0x4fc meminfo_proc_show+0x40/0x4fc seq_read_iter+0x18c/0x4c4 proc_reg_read_iter+0x84/0xac generic_file_splice_read+0xe8/0x17c splice_direct_to_actor+0xb8/0x290 do_splice_direct+0xa0/0xe0 do_sendfile+0x2d0/0x438 sys_sendfile64+0x12c/0x140 ret_fast_syscall+0x0/0x58 0xbeeacde4 Free path: meminfo_proc_show+0x5c/0x4fc seq_read_iter+0x18c/0x4c4 proc_reg_read_iter+0x84/0xac generic_file_splice_read+0xe8/0x17c splice_direct_to_actor+0xb8/0x290 do_splice_direct+0xa0/0xe0 do_sendfile+0x2d0/0x438 sys_sendfile64+0x12c/0x140 ret_fast_syscall+0x0/0x58 0xbeeacde4 Link: https://lkml.kernel.org/r/1615891032-29160-3-git-send-email-maninder1.s@samsung.com Co-developed-by: Vaneet Narang Signed-off-by: Vaneet Narang Signed-off-by: Maninder Singh Cc: Al Viro Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Joonsoo Kim Cc: Paul E. McKenney Cc: Pekka Enberg Cc: Russell King Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f7c8ce44ebb113b83135ada6e496db33d8a535e3 Author: David Hildenbrand Date: Thu May 6 18:06:06 2021 -0700 mm/vmalloc: remove vwrite() The last user (/dev/kmem) is gone. Let's drop it. Link: https://lkml.kernel.org/r/20210324102351.6932-4-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: Hillf Danton Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Steven Rostedt Cc: Minchan Kim Cc: huang ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f2e762bab9f5ec74cc9860fc24f01b7f58c98659 Author: David Hildenbrand Date: Thu May 6 18:06:01 2021 -0700 mm: remove xlate_dev_kmem_ptr() Since /dev/kmem has been removed, let's remove the xlate_dev_kmem_ptr() leftovers. Link: https://lkml.kernel.org/r/20210324102351.6932-3-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Geert Uytterhoeven Acked-by: Michal Hocko Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Cc: Russell King Cc: Brian Cain Cc: Geert Uytterhoeven Cc: Thomas Bogendoerfer Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Yoshinori Sato Cc: Rich Felker Cc: "David S. Miller" Cc: Arnd Bergmann Cc: David Hildenbrand Cc: Krzysztof Kozlowski Cc: Mikulas Patocka Cc: Luc Van Oostenryck Cc: Mike Rapoport Cc: Palmer Dabbelt Cc: Luis Chamberlain Cc: Greentime Hu Cc: Sebastian Andrzej Siewior Cc: Randy Dunlap Cc: Jiaxun Yang Cc: "Peter Zijlstra (Intel)" Cc: Christophe Leroy Cc: Gerald Schaefer Cc: Niklas Schnelle Cc: Pierre Morel Cc: Ingo Molnar Cc: Kuninori Morimoto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbcd53c960713507ae764bf81970651b5577b95a Author: David Hildenbrand Date: Thu May 6 18:05:55 2021 -0700 drivers/char: remove /dev/kmem for good Patch series "drivers/char: remove /dev/kmem for good". Exploring /dev/kmem and /dev/mem in the context of memory hot(un)plug and memory ballooning, I started questioning the existence of /dev/kmem. Comparing it with the /proc/kcore implementation, it does not seem to be able to deal with things like a) Pages unmapped from the direct mapping (e.g., to be used by secretmem) -> kern_addr_valid(). virt_addr_valid() is not sufficient. b) Special cases like gart aperture memory that is not to be touched -> mem_pfn_is_ram() Unless I am missing something, it's at least broken in some cases and might fault/crash the machine. Looks like its existence has been questioned before in 2005 and 2010 [1], after ~11 additional years, it might make sense to revive the discussion. CONFIG_DEVKMEM is only enabled in a single defconfig (on purpose or by mistake?). All distributions disable it: in Ubuntu it has been disabled for more than 10 years, in Debian since 2.6.31, in Fedora at least starting with FC3, in RHEL starting with RHEL4, in SUSE starting from 15sp2, and OpenSUSE has it disabled as well. 1) /dev/kmem was popular for rootkits [2] before it got disabled basically everywhere. Ubuntu documents [3] "There is no modern user of /dev/kmem any more beyond attackers using it to load kernel rootkits.". RHEL documents in a BZ [5] "it served no practical purpose other than to serve as a potential security problem or to enable binary module drivers to access structures/functions they shouldn't be touching" 2) /proc/kcore is a decent interface to have a controlled way to read kernel memory for debugging puposes. (will need some extensions to deal with memory offlining/unplug, memory ballooning, and poisoned pages, though) 3) It might be useful for corner case debugging [1]. KDB/KGDB might be a better fit, especially, to write random memory; harder to shoot yourself into the foot. 4) "Kernel Memory Editor" [4] hasn't seen any updates since 2000 and seems to be incompatible with 64bit [1]. For educational purposes, /proc/kcore might be used to monitor value updates -- or older kernels can be used. 5) It's broken on arm64, and therefore, completely disabled there. Looks like it's essentially unused and has been replaced by better suited interfaces for individual tasks (/proc/kcore, KDB/KGDB). Let's just remove it. [1] https://lwn.net/Articles/147901/ [2] https://www.linuxjournal.com/article/10505 [3] https://wiki.ubuntu.com/Security/Features#A.2Fdev.2Fkmem_disabled [4] https://sourceforge.net/projects/kme/ [5] https://bugzilla.redhat.com/show_bug.cgi?id=154796 Link: https://lkml.kernel.org/r/20210324102351.6932-1-david@redhat.com Link: https://lkml.kernel.org/r/20210324102351.6932-2-david@redhat.com Signed-off-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Kees Cook Cc: Linus Torvalds Cc: Greg Kroah-Hartman Cc: "Alexander A. Klimov" Cc: Alexander Viro Cc: Alexandre Belloni Cc: Andrew Lunn Cc: Andrey Zhizhikin Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Brian Cain Cc: Christian Borntraeger Cc: Christophe Leroy Cc: Chris Zankel Cc: Corentin Labbe Cc: "David S. Miller" Cc: "Eric W. Biederman" Cc: Geert Uytterhoeven Cc: Gerald Schaefer Cc: Greentime Hu Cc: Gregory Clement Cc: Heiko Carstens Cc: Helge Deller Cc: Hillf Danton Cc: huang ying Cc: Ingo Molnar Cc: Ivan Kokshaysky Cc: "James E.J. Bottomley" Cc: James Troup Cc: Jiaxun Yang Cc: Jonas Bonn Cc: Jonathan Corbet Cc: Kairui Song Cc: Krzysztof Kozlowski Cc: Kuninori Morimoto Cc: Liviu Dudau Cc: Lorenzo Pieralisi Cc: Luc Van Oostenryck Cc: Luis Chamberlain Cc: Matthew Wilcox Cc: Matt Turner Cc: Max Filippov Cc: Michael Ellerman Cc: Mike Rapoport Cc: Mikulas Patocka Cc: Minchan Kim Cc: Niklas Schnelle Cc: Oleksiy Avramchenko Cc: openrisc@lists.librecores.org Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: "Pavel Machek (CIP)" Cc: Pavel Machek Cc: "Peter Zijlstra (Intel)" Cc: Pierre Morel Cc: Randy Dunlap Cc: Richard Henderson Cc: Rich Felker Cc: Robert Richter Cc: Rob Herring Cc: Russell King Cc: Sam Ravnborg Cc: Sebastian Andrzej Siewior Cc: Sebastian Hesselbarth Cc: sparclinux@vger.kernel.org Cc: Stafford Horne Cc: Stefan Kristiansson Cc: Steven Rostedt Cc: Sudeep Holla Cc: Theodore Dubois Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Viresh Kumar Cc: William Cohen Cc: Xiaoming Ni Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb152a1a95606aadd81df7a537dde9ef16da4b80 Author: Shijie Luo Date: Thu May 6 18:05:51 2021 -0700 mm: fix some typos and code style problems fix some typos and code style problems in mm. gfp.h: s/MAXNODES/MAX_NUMNODES mmzone.h: s/then/than rmap.c: s/__vma_split()/__vma_adjust() swap.c: s/__mod_zone_page_stat/__mod_zone_page_state, s/is is/is swap_state.c: s/whoes/whose z3fold.c: code style problem fix in z3fold_unregister_migration zsmalloc.c: s/of/or, s/give/given Link: https://lkml.kernel.org/r/20210419083057.64820-1-luoshijie1@huawei.com Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b1989a3db45a6e8a5f1178bab621e8b9b8838602 Author: Bhaskar Chowdhury Date: Thu May 6 18:05:48 2021 -0700 ipc/sem.c: mundane typo fixes s/runtine/runtime/ s/AQUIRE/ACQUIRE/ s/seperately/separately/ s/wont/won\'t/ s/succesfull/successful/ Link: https://lkml.kernel.org/r/20210326022240.26375-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 17652f4240f7a501ecc13e9fdb06982569cde51f Author: Rasmus Villemoes Date: Thu May 6 18:05:45 2021 -0700 modules: add CONFIG_MODPROBE_PATH Allow the developer to specifiy the initial value of the modprobe_path[] string. This can be used to set it to the empty string initially, thus effectively disabling request_module() during early boot until userspace writes a new value via the /proc/sys/kernel/modprobe interface. [1] When building a custom kernel (often for an embedded target), it's normal to build everything into the kernel that is needed for booting, and indeed the initramfs often contains no modules at all, so every such request_module() done before userspace init has mounted the real rootfs is a waste of time. This is particularly useful when combined with the previous patch, which made the initramfs unpacking asynchronous - for that to work, it had to make any usermodehelper call wait for the unpacking to finish before attempting to invoke the userspace helper. By eliminating all such (known-to-be-futile) calls of usermodehelper, the initramfs unpacking and the {device,late}_initcalls can proceed in parallel for much longer. For a relatively slow ppc board I'm working on, the two patches combined lead to 0.2s faster boot - but more importantly, the fact that the initramfs unpacking proceeds completely in the background while devices get probed means I get to handle the gpio watchdog in time without getting reset. [1] __request_module() already has an early -ENOENT return when modprobe_path is the empty string. Link: https://lkml.kernel.org/r/20210313212528.2956377-3-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Greg Kroah-Hartman Acked-by: Jessica Yu Acked-by: Luis Chamberlain Cc: Borislav Petkov Cc: Jonathan Corbet Cc: Nick Desaulniers Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e7cb072eb988e46295512617c39d004f9e1c26f8 Author: Rasmus Villemoes Date: Thu May 6 18:05:42 2021 -0700 init/initramfs.c: do unpacking asynchronously Patch series "background initramfs unpacking, and CONFIG_MODPROBE_PATH", v3. These two patches are independent, but better-together. The second is a rather trivial patch that simply allows the developer to change "/sbin/modprobe" to something else - e.g. the empty string, so that all request_module() during early boot return -ENOENT early, without even spawning a usermode helper, needlessly synchronizing with the initramfs unpacking. The first patch delegates decompressing the initramfs to a worker thread, allowing do_initcalls() in main.c to proceed to the device_ and late_ initcalls without waiting for that decompression (and populating of rootfs) to finish. Obviously, some of those later calls may rely on the initramfs being available, so I've added synchronization points in the firmware loader and usermodehelper paths - there might be other places that would need this, but so far no one has been able to think of any places I have missed. There's not much to win if most of the functionality needed during boot is only available as modules. But systems with a custom-made .config and initramfs can boot faster, partly due to utilizing more than one cpu earlier, partly by avoiding known-futile modprobe calls (which would still trigger synchronization with the initramfs unpacking, thus eliminating most of the first benefit). This patch (of 2): Most of the boot process doesn't actually need anything from the initramfs, until of course PID1 is to be executed. So instead of doing the decompressing and populating of the initramfs synchronously in populate_rootfs() itself, push that off to a worker thread. This is primarily motivated by an embedded ppc target, where unpacking even the rather modest sized initramfs takes 0.6 seconds, which is long enough that the external watchdog becomes unhappy that it doesn't get attention soon enough. By doing the initramfs decompression in a worker thread, we get to do the device_initcalls and hence start petting the watchdog much sooner. Normal desktops might benefit as well. On my mostly stock Ubuntu kernel, my initramfs is a 26M xz-compressed blob, decompressing to around 126M. That takes almost two seconds: [ 0.201454] Trying to unpack rootfs image as initramfs... [ 1.976633] Freeing initrd memory: 29416K Before this patch, these lines occur consecutively in dmesg. With this patch, the timestamps on these two lines is roughly the same as above, but with 172 lines inbetween - so more than one cpu has been kept busy doing work that would otherwise only happen after the populate_rootfs() finished. Should one of the initcalls done after rootfs_initcall time (i.e., device_ and late_ initcalls) need something from the initramfs (say, a kernel module or a firmware blob), it will simply wait for the initramfs unpacking to be done before proceeding, which should in theory make this completely safe. But if some driver pokes around in the filesystem directly and not via one of the official kernel interfaces (i.e. request_firmware*(), call_usermodehelper*) that theory may not hold - also, I certainly might have missed a spot when sprinkling wait_for_initramfs(). So there is an escape hatch in the form of an initramfs_async= command line parameter. Link: https://lkml.kernel.org/r/20210313212528.2956377-1-linux@rasmusvillemoes.dk Link: https://lkml.kernel.org/r/20210313212528.2956377-2-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Reviewed-by: Luis Chamberlain Cc: Jessica Yu Cc: Borislav Petkov Cc: Jonathan Corbet Cc: Greg Kroah-Hartman Cc: Nick Desaulniers Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a065c0faacb1e472cd4e048986407d1b177373a2 Author: Rasmus Villemoes Date: Thu May 6 18:05:39 2021 -0700 kernel/async.c: remove async_unregister_domain() No callers in the tree. Link: https://lkml.kernel.org/r/20210309151723.1907838-2-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 07416af11dd85ca61abe60155ace37ced1233617 Author: Rasmus Villemoes Date: Thu May 6 18:05:36 2021 -0700 kernel/async.c: stop guarding pr_debug() statements It's currently nigh impossible to get these pr_debug()s to print something. Being guarded by initcall_debug means one has to enable tons of other debug output during boot, and the system_state condition further means it's impossible to get them when loading modules later. Also, the compiler can't know that these global conditions do not change, so there are W=2 warnings kernel/async.c:125:9: warning: `calltime' may be used uninitialized in this function [-Wmaybe-uninitialized] kernel/async.c:300:9: warning: `starttime' may be used uninitialized in this function [-Wmaybe-uninitialized] Make it possible, for a DYNAMIC_DEBUG kernel, to get these to print their messages by booting with appropriate 'dyndbg="file async.c +p"' command line argument. For a non-DYNAMIC_DEBUG kernel, pr_debug() compiles to nothing. This does cost doing an unconditional ktime_get() for the starttime value, but the corresponding ktime_get for the end time can be elided by factoring it into a function which only gets called if the printk() arguments end up being evaluated. Link: https://lkml.kernel.org/r/20210309151723.1907838-1-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9c39c6ffe0c2945c7cf814814c096bc23b63f53d Author: Zhang Yunkai Date: Thu May 6 18:05:33 2021 -0700 selftests: remove duplicate include 'assert.h' included in 'sparsebit.c' is duplicated. It is also included in the 161th line. 'string.h' included in 'mincore_selftest.c' is duplicated. It is also included in the 15th line. 'sched.h' included in 'tlbie_test.c' is duplicated. It is also included in the 33th line. Link: https://lkml.kernel.org/r/20210316073336.426255-1-zhang.yunkai@zte.com.cn Signed-off-by: Zhang Yunkai Cc: Paolo Bonzini Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 56fd94919b8bfdbe162f78920b4ebc72b4ce2f39 Author: Alistair Popple Date: Thu May 6 18:05:30 2021 -0700 kernel/resource: fix locking in request_free_mem_region request_free_mem_region() is used to find an empty range of physical addresses for hotplugging ZONE_DEVICE memory. It does this by iterating over the range of possible addresses using region_intersects() to see if the range is free before calling request_mem_region() to allocate the region. However the resource_lock is dropped between these two calls meaning by the time request_mem_region() is called in request_free_mem_region() another thread may have already reserved the requested region. This results in unexpected failures and a message in the kernel log from hitting this condition: /* * mm/hmm.c reserves physical addresses which then * become unavailable to other users. Conflicts are * not expected. Warn to aid debugging if encountered. */ if (conflict->desc == IORES_DESC_DEVICE_PRIVATE_MEMORY) { pr_warn("Unaddressable device %s %pR conflicts with %pR", conflict->name, conflict, res); These unexpected failures can be corrected by holding resource_lock across the two calls. This also requires memory allocation to be performed prior to taking the lock. Link: https://lkml.kernel.org/r/20210419070109.4780-3-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: David Hildenbrand Cc: Balbir Singh Cc: Daniel Vetter Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Jerome Glisse Cc: John Hubbard Cc: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63cdafe0af982e7da9ded37ccf21109a02bc6832 Author: Alistair Popple Date: Thu May 6 18:05:27 2021 -0700 kernel/resource: refactor __request_region to allow external locking Refactor the portion of __request_region() done whilst holding the resource_lock into a separate function to allow callers to hold the lock. Link: https://lkml.kernel.org/r/20210419070109.4780-2-apopple@nvidia.com Signed-off-by: Alistair Popple Reviewed-by: David Hildenbrand Cc: Balbir Singh Cc: Daniel Vetter Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: Jerome Glisse Cc: John Hubbard Cc: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d486ccb2522fc22f04f191cac99a844f92d56a7e Author: Alistair Popple Date: Thu May 6 18:05:24 2021 -0700 kernel/resource: allow region_intersects users to hold resource_lock Introduce a version of region_intersects() that can be called with the resource_lock already held. This will be used in a future fix to __request_free_mem_region(). [akpm@linux-foundation.org: make __region_intersects static] Link: https://lkml.kernel.org/r/20210419070109.4780-1-apopple@nvidia.com Signed-off-by: Alistair Popple Cc: David Hildenbrand Cc: Daniel Vetter Cc: Dan Williams Cc: Greg Kroah-Hartman Cc: John Hubbard Cc: Jerome Glisse Cc: Balbir Singh Cc: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97523a4edb7b9dc2be48a24a2387fb1328b29521 Author: David Hildenbrand Date: Thu May 6 18:05:20 2021 -0700 kernel/resource: remove first_lvl / siblings_only logic All functions that search for IORESOURCE_SYSTEM_RAM or IORESOURCE_MEM resources now properly consider the whole resource tree, not just the first level. Let's drop the unused first_lvl / siblings_only logic. Remove documentation that indicates that some functions behave differently, all consider the full resource tree now. Link: https://lkml.kernel.org/r/20210325115326.7826-4-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Dan Williams Reviewed-by: Andy Shevchenko Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Daniel Vetter Cc: Andy Shevchenko Cc: Mauro Carvalho Chehab Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Dave Hansen Cc: Keith Busch Cc: Michal Hocko Cc: Qian Cai Cc: Oscar Salvador Cc: Eric Biederman Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Tom Lendacky Cc: Brijesh Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c9c797534364593b73ba6ab060a014af8934721 Author: David Hildenbrand Date: Thu May 6 18:05:16 2021 -0700 kernel/resource: make walk_mem_res() find all busy IORESOURCE_MEM resources It used to be true that we can have system RAM (IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY) only on the first level in the resource tree. However, this is no longer holds for driver-managed system RAM (i.e., added via dax/kmem and virtio-mem), which gets added on lower levels, for example, inside device containers. IORESOURCE_SYSTEM_RAM is defined as IORESOURCE_MEM | IORESOURCE_SYSRAM and just a special type of IORESOURCE_MEM. The function walk_mem_res() only considers the first level and is used in arch/x86/mm/ioremap.c:__ioremap_check_mem() only. We currently fail to identify System RAM added by dax/kmem and virtio-mem as "IORES_MAP_SYSTEM_RAM", for example, allowing for remapping of such "normal RAM" in __ioremap_caller(). Let's find all IORESOURCE_MEM | IORESOURCE_BUSY resources, making the function behave similar to walk_system_ram_res(). Link: https://lkml.kernel.org/r/20210325115326.7826-3-david@redhat.com Fixes: ebf71552bb0e ("virtio-mem: Add parent resource for all added "System RAM"") Fixes: c221c0b0308f ("device-dax: "Hotplug" persistent memory for use like normal RAM") Signed-off-by: David Hildenbrand Reviewed-by: Dan Williams Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Daniel Vetter Cc: Andy Shevchenko Cc: Mauro Carvalho Chehab Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Dave Hansen Cc: Keith Busch Cc: Michal Hocko Cc: Qian Cai Cc: Oscar Salvador Cc: Eric Biederman Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Tom Lendacky Cc: Brijesh Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97f61c8f44ec9020708b97a51188170add4f3084 Author: David Hildenbrand Date: Thu May 6 18:05:12 2021 -0700 kernel/resource: make walk_system_ram_res() find all busy IORESOURCE_SYSTEM_RAM resources Patch series "kernel/resource: make walk_system_ram_res() and walk_mem_res() search the whole tree", v2. Playing with kdump+virtio-mem I noticed that kexec_file_load() does not consider System RAM added via dax/kmem and virtio-mem when preparing the elf header for kdump. Looking into the details, the logic used in walk_system_ram_res() and walk_mem_res() seems to be outdated. walk_system_ram_range() already does the right thing, let's change walk_system_ram_res() and walk_mem_res(), and clean up. Loading a kdump kernel via "kexec -p -s" ... will result in the kdump kernel to also dump dax/kmem and virtio-mem added System RAM now. Note: kexec-tools on x86-64 also have to be updated to consider this memory in the kexec_load() case when processing /proc/iomem. This patch (of 3): It used to be true that we can have system RAM (IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY) only on the first level in the resource tree. However, this is no longer holds for driver-managed system RAM (i.e., added via dax/kmem and virtio-mem), which gets added on lower levels, for example, inside device containers. We have two users of walk_system_ram_res(), which currently only consideres the first level: a) kernel/kexec_file.c:kexec_walk_resources() -- We properly skip IORESOURCE_SYSRAM_DRIVER_MANAGED resources via locate_mem_hole_callback(), so even after this change, we won't be placing kexec images onto dax/kmem and virtio-mem added memory. No change. b) arch/x86/kernel/crash.c:fill_up_crash_elf_data() -- we're currently not adding relevant ranges to the crash elf header, resulting in them not getting dumped via kdump. This change fixes loading a crashkernel via kexec_file_load() and including dax/kmem and virtio-mem added System RAM in the crashdump on x86-64. Note that e.g,, arm64 relies on memblock data and, therefore, always considers all added System RAM already. Let's find all IORESOURCE_SYSTEM_RAM | IORESOURCE_BUSY resources, making the function behave like walk_system_ram_range(). Link: https://lkml.kernel.org/r/20210325115326.7826-1-david@redhat.com Link: https://lkml.kernel.org/r/20210325115326.7826-2-david@redhat.com Fixes: ebf71552bb0e ("virtio-mem: Add parent resource for all added "System RAM"") Fixes: c221c0b0308f ("device-dax: "Hotplug" persistent memory for use like normal RAM") Signed-off-by: David Hildenbrand Reviewed-by: Dan Williams Acked-by: Baoquan He Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: Daniel Vetter Cc: Andy Shevchenko Cc: Mauro Carvalho Chehab Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal Cc: Dave Hansen Cc: Keith Busch Cc: Michal Hocko Cc: Qian Cai Cc: Oscar Salvador Cc: Eric Biederman Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Tom Lendacky Cc: Brijesh Singh Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 526940e3962620f1a24d5e30c3dac7358194d963 Author: Barry Song Date: Thu May 6 18:05:09 2021 -0700 scripts/gdb: add lx_current support for arm64 arm64 uses SP_EL0 to save the current task_struct address. While running in EL0, SP_EL0 is clobbered by userspace. So if the upper bit is not 1 (not TTBR1), the current address is invalid. This patch checks the upper bit of SP_EL0, if the upper bit is 1, lx_current() of arm64 will return the derefrence of current task. Otherwise, lx_current() will tell users they are running in userspace(EL0). While arm64 is running in EL0, it is actually pointless to print current task as the memory of kernel space is not accessible in EL0. Link: https://lkml.kernel.org/r/20210314203444.15188-3-song.bao.hua@hisilicon.com Signed-off-by: Barry Song Cc: Jan Kiszka Cc: Jonathan Corbet Cc: Kieran Bingham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc9586823f3e06867344e6cf88741688c2c7737f Author: Barry Song Date: Thu May 6 18:05:06 2021 -0700 scripts/gdb: document lx_current is only supported by x86 Patch series "scripts/gdb: clarify the platforms supporting lx_current and add arm64 support", v2. lx_current depends on per_cpu current_task variable which exists on x86 only. so it actually works on x86 only. the 1st patch documents this clearly; the 2nd patch adds support for arm64. This patch (of 2): x86 is the only architecture which has per_cpu current_task: arch$ git grep current_task | grep -i per_cpu x86/include/asm/current.h:DECLARE_PER_CPU(struct task_struct *, current_task); x86/kernel/cpu/common.c:DEFINE_PER_CPU(struct task_struct *, current_task) ____cacheline_aligned = x86/kernel/cpu/common.c:EXPORT_PER_CPU_SYMBOL(current_task); x86/kernel/cpu/common.c:DEFINE_PER_CPU(struct task_struct *, current_task) = &init_task; x86/kernel/cpu/common.c:EXPORT_PER_CPU_SYMBOL(current_task); x86/kernel/smpboot.c: per_cpu(current_task, cpu) = idle; On other architectures, lx_current() will lead to a python exception: (gdb) p $lx_current().pid Python Exception No symbol "current_task" in current context.: Error occurred in Python: No symbol "current_task" in current context. To avoid more people struggling and wasting time in other architectures, document it. Link: https://lkml.kernel.org/r/20210314203444.15188-1-song.bao.hua@hisilicon.com Link: https://lkml.kernel.org/r/20210314203444.15188-2-song.bao.hua@hisilicon.com Signed-off-by: Barry Song Cc: Jan Kiszka Cc: Kieran Bingham Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23921540d2c0a4d8530078f6f64fc3e28444ca9d Author: Johannes Berg Date: Thu May 6 18:05:03 2021 -0700 gdb: lx-symbols: store the abspath() If we store the relative path, the user might later cd to a different directory, and that would break the automatic symbol resolving that happens when a module is loaded into the target kernel. Fix this by storing the abspath() of each path given, just like we already do for the cwd (os.getcwd() is absolute.) Link: https://lkml.kernel.org/r/20201217091747.bf4332cf2b35.I10ebbdb7e9b80ab1a5cddebf53d073be8232d656@changeid Signed-off-by: Johannes Berg Reviewed-by: Jan Kiszka Cc: Kieran Bingham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d1c7fd97e4c5e54034231cd11319079dfaed60e Author: Yafang Shao Date: Thu May 6 18:05:00 2021 -0700 delayacct: clear right task's flag after blkio completes When I was implementing a latency analyzer tool by using task->delays and other things, I found an issue in delayacct. The issue is it should clear the target's flag instead of current's in delayacct_blkio_end(). When I git blame delayacct, I found there're some similar issues we have fixed in delayacct_blkio_end(). - Commit c96f5471ce7d ("delayacct: Account blkio completion on the correct task") fixed the issue that it should account blkio completion on the target task instead of current. - Commit b512719f771a ("delayacct: fix crash in delayacct_blkio_end() after delayacct init failure") fixed the issue that it should check target task's delays instead of current task'. It seems that delayacct_blkio_{begin, end} are error prone. So I introduce a new paratmeter - the target task 'p' - to these helpers. After that change, the callsite will specifilly set the right task, which should make it less error prone. Link: https://lkml.kernel.org/r/20210414083720.24083-1-laoar.shao@gmail.com Signed-off-by: Yafang Shao Cc: Tejun Heo Cc: Josh Snyder Cc: Jens Axboe Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6f1f942cd5fbbe308f912fc84e3f10fbc8113a68 Author: He Ying Date: Thu May 6 18:04:57 2021 -0700 smp: kernel/panic.c - silence warnings We found these warnings in kernel/panic.c by using sparse tool: warning: symbol 'panic_smp_self_stop' was not declared. warning: symbol 'nmi_panic_self_stop' was not declared. warning: symbol 'crash_smp_send_stop' was not declared. To avoid them, add declarations for these three functions in include/linux/smp.h. Link: https://lkml.kernel.org/r/20210316084150.75201-1-heying24@huawei.com Signed-off-by: He Ying Reported-by: Hulk Robot Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9b472e85d098a40b84dd8b33fbf8a15ab1452025 Author: Nick Desaulniers Date: Thu May 6 18:04:54 2021 -0700 gcov: clang: drop support for clang-10 and older LLVM changed the expected function signatures for llvm_gcda_start_file() and llvm_gcda_emit_function() in the clang-11 release. Drop the older implementations and require folks to upgrade their compiler if they're interested in GCOV support. Link: https://reviews.llvm.org/rGcdd683b516d147925212724b09ec6fb792a40041 Link: https://reviews.llvm.org/rG13a633b438b6500ecad9e4f936ebadf3411d0f44 Link: https://lkml.kernel.org/r/20210312224132.3413602-3-ndesaulniers@google.com Link: https://lkml.kernel.org/r/20210413183113.2977432-1-ndesaulniers@google.com Signed-off-by: Nick Desaulniers Suggested-by: Nathan Chancellor Acked-by: Peter Oberparleiter Reviewed-by: Nathan Chancellor Reviewed-by: Fangrui Song Cc: Prasad Sodagudi Cc: Johannes Berg Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1391efa952e8b22088f8626fc63ade26767b92d6 Author: Johannes Berg Date: Thu May 6 18:04:51 2021 -0700 gcov: use kvmalloc() Using vmalloc() in gcov is really quite wasteful, many of the objects allocated are really small (e.g. I've seen 24 bytes.) Use kvmalloc() to automatically pick the better of kmalloc() or vmalloc() depending on the size. [johannes.berg@intel.com: fix clang-11+ build] Link: https://lkml.kernel.org/r/20210412214210.6e1ecca9cdc5.I24459763acf0591d5e6b31c7e3a59890d802f79c@changeid Link: https://lkml.kernel.org/r/20210315235453.799e7a9d627d.I741d0db096c6f312910f7f1bcdfde0fda20801a4@changeid Signed-off-by: Johannes Berg Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Cc: Peter Oberparleiter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3180c44fe1baf14fc876a4cdad77ea7b51ddc387 Author: Johannes Berg Date: Thu May 6 18:04:48 2021 -0700 gcov: simplify buffer allocation Use just a single vmalloc() with struct_size() instead of a separate kmalloc() for the iter struct. Link: https://lkml.kernel.org/r/20210315235453.b6de4a92096e.Iac40a5166589cefbff8449e466bd1b38ea7a17af@changeid Signed-off-by: Johannes Berg Cc: Peter Oberparleiter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7a1d55b987dfcbddecdb67eecc76fe555d4348ba Author: Johannes Berg Date: Thu May 6 18:04:45 2021 -0700 gcov: combine common code There's a lot of duplicated code between gcc and clang implementations, move it over to fs.c to simplify the code, there's no reason to believe that for small data like this one would not just implement the simple convert_to_gcda() function. Link: https://lkml.kernel.org/r/20210315235453.e3fbb86e99a0.I08a3ee6dbe47ea3e8024956083f162884a958e40@changeid Signed-off-by: Johannes Berg Acked-by: Peter Oberparleiter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b2075dbb15d7ae952aeb01331198f4dc45a7e46a Author: Pavel Tatashin Date: Thu May 6 18:04:41 2021 -0700 kexec: dump kmessage before machine_kexec kmsg_dump(KMSG_DUMP_SHUTDOWN) is called before machine_restart(), machine_halt(), and machine_power_off(). The only one that is missing is machine_kexec(). The dmesg output that it contains can be used to study the shutdown performance of both kernel and systemd during kexec reboot. Here is example of dmesg data collected after kexec: root@dplat-cp22:~# cat /sys/fs/pstore/dmesg-ramoops-0 | tail ... [ 70.914592] psci: CPU3 killed (polled 0 ms) [ 70.915705] CPU4: shutdown [ 70.916643] psci: CPU4 killed (polled 4 ms) [ 70.917715] CPU5: shutdown [ 70.918725] psci: CPU5 killed (polled 0 ms) [ 70.919704] CPU6: shutdown [ 70.920726] psci: CPU6 killed (polled 4 ms) [ 70.921642] CPU7: shutdown [ 70.922650] psci: CPU7 killed (polled 0 ms) Link: https://lkml.kernel.org/r/20210319192326.146000-2-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: Kees Cook Reviewed-by: Petr Mladek Reviewed-by: Bhupesh Sharma Acked-by: Baoquan He Reviewed-by: Tyler Hicks Cc: James Morris Cc: Sasha Levin Cc: Eric W. Biederman Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 31d82c2c787d5cf65fedd35ebbc0c1bd95c1a679 Author: Jia-Ju Bai Date: Thu May 6 18:04:38 2021 -0700 kernel: kexec_file: fix error return code of kexec_calculate_store_digests() When vzalloc() returns NULL to sha_regions, no error return code of kexec_calculate_store_digests() is assigned. To fix this bug, ret is assigned with -ENOMEM in this case. Link: https://lkml.kernel.org/r/20210309083904.24321-1-baijiaju1990@gmail.com Fixes: a43cac0d9dc2 ("kexec: split kexec_file syscall code to kexec_file.c") Signed-off-by: Jia-Ju Bai Reported-by: TOTE Robot Acked-by: Baoquan He Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a119b4e5186c283ee13850b65004de6d746a81be Author: Joe LeVeque Date: Thu May 6 18:04:35 2021 -0700 kexec: Add kexec reboot string The purpose is to notify the kernel module for fast reboot. Upstream a patch from the SONiC network operating system [1]. [1]: https://github.com/Azure/sonic-linux-kernel/pull/46 Link: https://lkml.kernel.org/r/20210304124626.13927-1-pmenzel@molgen.mpg.de Signed-off-by: Joe LeVeque Signed-off-by: Paul Menzel Acked-by: Baoquan He Cc: Guohan Lu Cc: Joe LeVeque Cc: Paul Menzel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 05da1f643f00ae9aabb8318709e40579789b7c64 Merge: af120709b1fb7 6e552494fb90a Author: Linus Torvalds Date: Thu May 6 23:54:12 2021 -0700 Merge tag 'iomap-5.13-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull more iomap updates from Darrick Wong: "Remove the now unused 'io_private' field from struct iomap_ioend, for a modest savings in memory allocation" * tag 'iomap-5.13-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: remove unused private field from ioend commit af120709b1fb7227f18653a95c457b36d8a5e4d8 Merge: aef511fb91b6e 8e9800f9f2b89 Author: Linus Torvalds Date: Thu May 6 23:46:46 2021 -0700 Merge tag 'xfs-5.13-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull more xfs updates from Darrick Wong: "Except for the timestamp struct renaming patches, everything else in here are bug fixes: - Rename the log timestamp struct. - Remove broken transaction counter debugging that wasn't working correctly on very old filesystems. - Various fixes to make pre-lazysbcount filesystems work properly again. - Fix a free space accounting problem where we neglected to consider free space btree blocks that track metadata reservation space when deciding whether or not to allow caller to reserve space for a metadata update. - Fix incorrect pagecache clearing behavior during FUNSHARE ops. - Don't allow log writes if the data device is readonly" * tag 'xfs-5.13-merge-5' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: xfs: don't allow log writes if the data device is readonly xfs: fix xfs_reflink_unshare usage of filemap_write_and_wait_range xfs: set aside allocation btree blocks from block reservation xfs: introduce in-core global counter of allocbt blocks xfs: unconditionally read all AGFs on mounts with perag reservation xfs: count free space btree blocks when scrubbing pre-lazysbcount fses xfs: update superblock counters correctly for !lazysbcount xfs: don't check agf_btreeblks on pre-lazysbcount filesystems xfs: remove obsolete AGF counter debugging xfs: rename struct xfs_legacy_ictimestamp xfs: rename xfs_ictimestamp_t commit aef511fb91b6efb2d355c2704cf979f3202d310a Merge: e48661230cc35 05665cef4b745 Author: Linus Torvalds Date: Thu May 6 23:37:55 2021 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: - three new touchscreen drivers: Hycon HY46XX, ILITEK Lego Series, and MStar MSG2638 - a new driver for Azoteq IQS626A proximity and touch controller - addition of Amazon Game Controller to the list of devices handled by the xpad driver - Elan touchscreen driver will avoid binding to devices described as I2CHID compatible in ACPI tables - various driver fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (56 commits) Input: xpad - add support for Amazon Game Controller Input: ili210x - add missing negation for touch indication on ili210x MAINTAINERS: repair reference in HYCON HY46XX TOUCHSCREEN SUPPORT Input: add driver for the Hycon HY46XX touchpanel series dt-bindings: touchscreen: Add HY46XX bindings dt-bindings: Add Hycon Technology vendor prefix Input: cyttsp - flag the device properly Input: cyttsp - set abs params for ABS_MT_TOUCH_MAJOR Input: cyttsp - drop the phys path Input: cyttsp - reduce reset pulse timings Input: cyttsp - error message on boot mode exit error Input: apbps2 - remove useless variable Input: mms114 - support MMS136 Input: mms114 - convert bindings to YAML and extend Input: Add support for ILITEK Lego Series dt-bindings: input: touchscreen: ilitek_ts_i2c: Add bindings Input: add MStar MSG2638 touchscreen driver dt-bindings: input/touchscreen: add bindings for msg2638 Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state Input: elants_i2c - do not bind to i2c-hid compatible ACPI instantiated devices ... commit 0844708ac3d2dbdace70f4a6020669d56958697f Merge: 59e528c5bc58d 234055fd9728e Author: Dave Airlie Date: Fri May 7 12:44:50 2021 +1000 Merge tag 'amd-drm-fixes-5.13-2021-05-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-fixes-5.13-2021-05-05: amdgpu: - MPO hang workaround - Fix for concurrent VM flushes on vega/navi - dcefclk is not adjustable on navi1x and newer - MST HPD debugfs fix - Suspend/resumes fixes - Register VGA clients late in case driver fails to load - Fix GEM leak in user framebuffer create - Add support for polaris12 with 32 bit memory interface - Fix duplicate cursor issue when using overlay - Fix corruption with tiled surfaces on VCN3 - Add BO size and stride check to fix BO size verification radeon: - Fix off-by-one in power state parsing - Fix possible memory leak in power state parsing Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210506033929.3875-1-alexander.deucher@amd.com commit 59e528c5bc58db8426c3f15439d798dc3aca725e Merge: 365002da3c463 b9d79e4ca4ff2 Author: Dave Airlie Date: Fri May 7 12:37:37 2021 +1000 Merge tag 'drm-misc-next-fixes-2021-05-06' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Two patches, one to fix a null pointer dereference in msm, and one to fix an unused warning for in fbdev when PROCFS is disabled. Signed-off-by: Dave Airlie # gpg: Signature made Thu 06 May 2021 22:26:35 AEST # gpg: using ? key E3EF0D6F671851C5 # gpg: Can't check signature: unknown pubkey algorithm From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210506122723.oqadel7oacazywij@gilmour commit a8ca6b1388a91c79dad257a7cc0bc14c009312fe Author: Xiaofeng Cao Date: Thu May 6 18:04:28 2021 -0700 kernel/fork.c: fix typos change 'ancestoral' to 'ancestral' change 'reuseable' to 'reusable' delete 'do' grammatically Link: https://lkml.kernel.org/r/20210317082031.11692-1-caoxiaofeng@yulong.com Signed-off-by: Xiaofeng Cao Reviewed-by: Christian Brauner Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a6895399380ab58d9efd0a0bec2fcb98d77e20bd Author: Rolf Eike Beer Date: Thu May 6 18:04:25 2021 -0700 kernel/fork.c: simplify copy_mm() All this can happen without a single goto. Link: https://lkml.kernel.org/r/2072685.XptgVkyDqn@devpool47 Signed-off-by: Rolf Eike Beer Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5449162ac001a926ad8884882b071601df5edb44 Author: Jim Newsome Date: Thu May 6 18:04:22 2021 -0700 do_wait: make PIDTYPE_PID case O(1) instead of O(n) Add a special-case when waiting on a pid (via waitpid, waitid, wait4, etc) to avoid doing an O(n) scan of children and tracees, and instead do an O(1) lookup. This improves performance when waiting on a pid from a thread group with many children and/or tracees. Time to fork and then call waitpid on the child, from a task that already has N children [1]: N | Before | After -----|---------|------ 1 | 74 us | 74 us 20 | 72 us | 75 us 100 | 83 us | 77 us 500 | 99 us | 74 us 1000 | 179 us | 75 us 5000 | 804 us | 79 us 8000 | 1268 us | 78 us [1]: https://lkml.org/lkml/2021/3/12/1567 This can make a substantial performance improvement for applications with a thread that has many children or tracees and frequently needs to wait on them. Tools that use ptrace to intercept syscalls for a large number of processes are likely to fall into this category. In particular this patch was developed while building a ptrace-based second generation of the Shadow emulator [2], for which it allows us to avoid quadratic scaling (without having to use a workaround that introduces a ~40% performance penalty) [3]. Other examples of tools that fall into this category which this patch may help include User Mode Linux [4] and DetTrace [5]. [2]: https://shadow.github.io/ [3]: https://github.com/shadow/shadow/issues/1134#issuecomment-798992292 [4]: https://en.wikipedia.org/wiki/User-mode_Linux [5]: https://github.com/dettrace/dettrace Link: https://lkml.kernel.org/r/20210314231544.9379-1-jnewsome@torproject.org Signed-off-by: James Newsome Reviewed-by: Oleg Nesterov Cc: "Eric W . Biederman" Cc: Christian Brauner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1e4726f4654407bfd509bb8fc7324b96f2f9285 Author: Gustavo A. R. Silva Date: Thu May 6 18:04:19 2021 -0700 hpfs: 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, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warning: CC [M] fs/hpfs/dir.o fs/hpfs/dir.c: In function `hpfs_readdir': fs/hpfs/dir.c:163:41: warning: array subscript 1 is above array bounds of `u8[1]' {aka `unsigned char[1]'} [-Warray-bounds] 163 | || de ->name[0] != 1 || de->name[1] != 1)) | ~~~~~~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Link: https://lkml.kernel.org/r/20210326173510.GA81212@embeddedor Signed-off-by: Gustavo A. R. Silva Cc: Mikulas Patocka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 312f79c486e9860ec4c2ec4ef5b89fd518d9c833 Author: Lu Jialin Date: Thu May 6 18:04:16 2021 -0700 nilfs2: fix typos in comments numer -> number in fs/nilfs2/cpfile.c Decription -> Description in fs/nilfs2/ioctl.c isntance -> instance in fs/nilfs2/the_nilfs.c Link: https://lkml.kernel.org/r/1617942951-14631-1-git-send-email-konishi.ryusuke@gmail.com Link: https://lore.kernel.org/r/20210409022519.176988-1-lujialin4@huawei.com Signed-off-by: Lu Jialin Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 300563e6e01465df831b06f6b6587bfaffaf0642 Author: Liu xuzhi Date: Thu May 6 18:04:13 2021 -0700 fs/nilfs2: fix misspellings using codespell tool Two typos are found out by codespell tool \ in 2217th and 2254th lines of segment.c: $ codespell ./fs/nilfs2/ ./segment.c:2217 :retured ==> returned ./segment.c:2254: retured ==> returned Fix two typos found by codespell. Link: https://lkml.kernel.org/r/1617864087-8198-1-git-send-email-konishi.ryusuke@gmail.com Signed-off-by: Liu xuzhi Signed-off-by: Ryusuke Konishi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b4ca4c01780b186a1abeff9ace665ea10c8545d3 Author: Gustavo A. R. Silva Date: Thu May 6 18:04:10 2021 -0700 isofs: fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Link: https://lkml.kernel.org/r/5b7caa73958588065fabc59032c340179b409ef5.1605896059.git.gustavoars@kernel.org Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7fab29e356309ff93a4b30ecc466129682ec190b Author: Davidlohr Bueso Date: Thu May 6 18:04:07 2021 -0700 fs/epoll: restore waking from ep_done_scan() Commit 339ddb53d373 ("fs/epoll: remove unnecessary wakeups of nested epoll") changed the userspace visible behavior of exclusive waiters blocked on a common epoll descriptor upon a single event becoming ready. Previously, all tasks doing epoll_wait would awake, and now only one is awoken, potentially causing missed wakeups on applications that rely on this behavior, such as Apache Qpid. While the aforementioned commit aims at having only a wakeup single path in ep_poll_callback (with the exceptions of epoll_ctl cases), we need to restore the wakeup in what was the old ep_scan_ready_list() such that the next thread can be awoken, in a cascading style, after the waker's corresponding ep_send_events(). Link: https://lkml.kernel.org/r/20210405231025.33829-3-dave@stgolabs.net Fixes: 339ddb53d373 ("fs/epoll: remove unnecessary wakeups of nested epoll") Signed-off-by: Davidlohr Bueso Cc: Al Viro Cc: Jason Baron Cc: Roman Penyaev Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1e3b918d1dd18bcea3df9339c2d8910ffa95686a Author: Davidlohr Bueso Date: Thu May 6 18:04:04 2021 -0700 kselftest: introduce new epoll test case Patch series "fs/epoll: restore user-visible behavior upon event ready". This series tries to address a change in user visible behavior, reported in https://bugzilla.kernel.org/show_bug.cgi?id=208943. Epoll does not report an event to all the threads running epoll_wait() on the same epoll descriptor. Unsurprisingly, this was bisected back to 339ddb53d373 (fs/epoll: remove unnecessary wakeups of nested epoll), which has had various problems in the past, beyond only nested epoll usage. This patch (of 2): This incorporates the testcase originally reported in: https://bugzilla.kernel.org/show_bug.cgi?id=208943 Which ensures an event is reported to all threads blocked on the same epoll descriptor, otherwise only a single thread will receive the wakeup once the event become ready. Link: https://lkml.kernel.org/r/20210405231025.33829-1-dave@stgolabs.net Link: https://lkml.kernel.org/r/20210405231025.33829-2-dave@stgolabs.net Signed-off-by: Davidlohr Bueso Cc: Jason Baron Cc: Roman Penyaev Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7e6cdd7fd94380a3b87b2ce087903b3722b3d0d6 Author: Christophe JAILLET Date: Thu May 6 18:04:01 2021 -0700 checkpatch: improve ALLOC_ARRAY_ARGS test The devm_ variant of 'kcalloc()' and 'kmalloc_array()' are not tested Add the corresponding check. Link: https://lkml.kernel.org/r/205fc4847972fb6779abcc8818f39c14d1b45af1.1618595794.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7b844345fc2a9c46f8bb8cdb7408c766dfcdd83d Author: Vincent Mailhol Date: Thu May 6 18:03:58 2021 -0700 checkpatch: exclude four preprocessor sub-expressions from MACRO_ARG_REUSE __must_be_array, offsetof, sizeof_field and __stringify are all preprocessor macros and do not evaluate their arguments. As such, it is safe not to warn when arguments are being reused in those four sub-expressions. Exclude those so that they can pass checkpatch. Link: https://lkml.kernel.org/r/20210407105042.25380-1-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fbe745416d11b1a17c35a7c7f0ef6f4dbe5a7573 Author: Joe Perches Date: Thu May 6 18:03:55 2021 -0700 checkpatch: warn when missing newline in return sysfs_emit() formats return sysfs_emit() uses should include a newline. Suggest adding a newline when one is missing. Add one using --fix too. Link: https://lkml.kernel.org/r/aa1819fa5faf786573df298e5e2e7d357ba7d4ad.camel@perches.com Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e13d04ec45b07388d3c38c0e18a4d0aa4841b0c3 Author: Masahiro Yamada Date: Thu May 6 18:03:52 2021 -0700 include/linux/compat.h: remove unneeded declaration from COMPAT_SYSCALL_DEFINEx() compat_sys##name is declared twice, just one line below. With this removal SYSCALL_DEFINEx() (defined in ) and COMPAT_SYSCALL_DEFINEx() look symmetrical. Link: https://lkml.kernel.org/r/20210223114924.854794-1-masahiroy@kernel.org Signed-off-by: Masahiro Yamada Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit edd9334c8dfed7341066a25f79dcaab6893465d9 Author: Randy Dunlap Date: Thu May 6 18:03:49 2021 -0700 lib: parser: clean up kernel-doc Mark match_uint() as kernel-doc notation since it is already fully annotated as such. Use % prefix on constants in kernel-doc comments. Convert function return descriptions to use the "Return:" kernel-doc notation. Link: https://lkml.kernel.org/r/20210407034514.5651-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Alexander Viro Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9d6ecac093a2412822bdb5376b9bd434d45939af Author: Alex Shi Date: Thu May 6 18:03:46 2021 -0700 lib/genalloc: add parameter description to fix doc compile warning Commit 52fbf1134d47 ("lib/genalloc.c: fix allocation of aligned buffer from non-aligned chunk") added a new parameter 'start_addr' w/o description for it. That causes some doc compile warning: lib/genalloc.c:649: warning: Function parameter or member 'start_addr' not described in 'gen_pool_first_fit' lib/genalloc.c:667: warning: Function parameter or member 'start_addr' not described in 'gen_pool_first_fit_align' lib/genalloc.c:694: warning: Function parameter or member 'start_addr' not described in 'gen_pool_fixed_alloc' lib/genalloc.c:729: warning: Function parameter or member 'start_addr' not described in 'gen_pool_first_fit_order_align' lib/genalloc.c:752: warning: Function parameter or member 'start_addr' not described in 'gen_pool_best_fit' This fixes it by adding a parameter descriptions. Link: https://lkml.kernel.org/r/20210405132021.131231-1-alexs@kernel.org Signed-off-by: Alex Shi Cc: Alexey Skidanov Cc: Huang Shijie Cc: Alex Shi Cc: Bhaskar Chowdhury Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db65a867fd40fb33d4a7d619e95f2b796e798999 Author: Alex Shi Date: Thu May 6 18:03:43 2021 -0700 lib/percpu_counter: tame kernel-doc compile warning commit 3e8f399da490 ("writeback: rework wb_[dec|inc]_stat family of functions") add some function description of percpu_counter_add_batch. but the double '*' in comments means a kernel-doc format comment which isn't right. Since the whole file of lib/percpu_counter.c has no any other kernel-doc format comments, we'd better to remove this incomplete one to tame the kernel-doc warning: lib/percpu_counter.c:83: warning: Function parameter or member 'fbc' not described in 'percpu_counter_add_batch' lib/percpu_counter.c:83: warning: Function parameter or member 'amount' not described in 'percpu_counter_add_batch' lib/percpu_counter.c:83: warning: Function parameter or member 'batch' not described in 'percpu_counter_add_batch' Link: https://lkml.kernel.org/r/20210405135505.132446-1-alexs@kernel.org Signed-off-by: Alex Shi Cc: Nikolay Borisov Cc: Stephen Boyd Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78564b9434878d686c5f88c4488b20cccbcc42bc Author: Zqiang Date: Thu May 6 18:03:40 2021 -0700 lib: stackdepot: turn depot_lock spinlock to raw_spinlock In RT system, the spin_lock will be replaced by sleepable rt_mutex lock, in __call_rcu(), disable interrupts before calling kasan_record_aux_stack(), will trigger this calltrace: BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:951 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 19, name: pgdatinit0 Call Trace: ___might_sleep.cold+0x1b2/0x1f1 rt_spin_lock+0x3b/0xb0 stack_depot_save+0x1b9/0x440 kasan_save_stack+0x32/0x40 kasan_record_aux_stack+0xa5/0xb0 __call_rcu+0x117/0x880 __exit_signal+0xafb/0x1180 release_task+0x1d6/0x480 exit_notify+0x303/0x750 do_exit+0x678/0xcf0 kthread+0x364/0x4f0 ret_from_fork+0x22/0x30 Replace spinlock with raw_spinlock. Link: https://lkml.kernel.org/r/20210329084009.27013-1-qiang.zhang@windriver.com Signed-off-by: Zqiang Reported-by: Andrew Halaney Cc: Alexander Potapenko Cc: Gustavo A. R. Silva Cc: Vijayanand Jitta Cc: Vinayak Menon Cc: Yogesh Lal Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e18baa7cc3598999317d6c2fe255756f6b3b7562 Author: Richard Fitzgerald Date: Thu May 6 18:03:37 2021 -0700 lib: crc8: pointer to data block should be const crc8() does not change the data passed to it, so the pointer argument should be declared const. This avoids callers that receive const data having to cast it to a non-const pointer to call crc8(). Link: https://lkml.kernel.org/r/20210329122409.3291-1-rf@opensource.cirrus.com Signed-off-by: Richard Fitzgerald Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ade29d4fdbe675d72ee6115baaf3b3382942fd12 Author: Bhaskar Chowdhury Date: Thu May 6 18:03:34 2021 -0700 lib/genalloc.c: Fix a typo s/macthing/matching/ Link: https://lkml.kernel.org/r/20210326131530.30481-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e89b6358052de202e53e47623f50b6d28182ccdf Author: ToastC Date: Thu May 6 18:03:31 2021 -0700 lib/list_sort.c: fix typo in function description Replace beautiully with beautifully Link: https://lkml.kernel.org/r/20210315090633.9759-1-mrtoastcheng@gmail.com Signed-off-by: ShihCheng Tu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b8cf20277941f6954f12a8d5a54eb334c806a6a3 Author: Wang Qing Date: Thu May 6 18:03:28 2021 -0700 lib: fix inconsistent indenting in process_bit1() Smatch gives the warning: lib/decompress_unlzma.c:395 process_bit1() warn: inconsistent indenting Link: https://lkml.kernel.org/r/1614567775-4478-1-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0523c6922e8bd8d31d3377a56d57730d448b85a8 Author: Bhaskar Chowdhury Date: Thu May 6 18:03:25 2021 -0700 lib/bch.c: fix a typo in the file bch.c s/buid/build/ Link: https://lkml.kernel.org/r/20210301123129.18754-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 550eb38bde07fb71a1d877c2ab284f0cf926d327 Author: Yury Norov Date: Thu May 6 18:03:22 2021 -0700 MAINTAINERS: add entry for the bitmap API Add myself as maintainer for bitmap API and Andy and Rasmus as reviewers. Link: https://lkml.kernel.org/r/20210401003153.97325-13-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Andy Shevchenko Acked-by: Rasmus Villemoes Cc: Alexey Klimov Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eaae7841ba83bb42dcac3177dc65f8dd974e6c0b Author: Yury Norov Date: Thu May 6 18:03:18 2021 -0700 tools: sync lib/find_bit implementation Add fast paths to find_*_bit() functions as per kernel implementation. Link: https://lkml.kernel.org/r/20210401003153.97325-12-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2cc7b6a44ac21d31b398b03f4845c53152070416 Author: Yury Norov Date: Thu May 6 18:03:14 2021 -0700 lib: add fast path for find_first_*_bit() and find_last_bit() Similarly to bitmap functions, users would benefit if we'll handle a case of small-size bitmaps that fit into a single word. While here, move the find_last_bit() declaration to bitops/find.h where other find_*_bit() functions sit. Link: https://lkml.kernel.org/r/20210401003153.97325-11-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Acked-by: Andy Shevchenko Cc: Alexey Klimov Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 277a20a498d30753f5d8a607dbf967bc163552c1 Author: Yury Norov Date: Thu May 6 18:03:11 2021 -0700 lib: add fast path for find_next_*_bit() Similarly to bitmap functions, find_next_*_bit() users will benefit if we'll handle a case of bitmaps that fit into a single word inline. In the very best case, the compiler may replace a function call with a few instructions. This is the quite typical find_next_bit() user: unsigned int cpumask_next(int n, const struct cpumask *srcp) { /* -1 is a legal arg here. */ if (n != -1) cpumask_check(n); return find_next_bit(cpumask_bits(srcp), nr_cpumask_bits, n + 1); } EXPORT_SYMBOL(cpumask_next); Currently, on ARM64 the generated code looks like this: 0000000000000000 : 0: a9bf7bfd stp x29, x30, [sp, #-16]! 4: 11000402 add w2, w0, #0x1 8: aa0103e0 mov x0, x1 c: d2800401 mov x1, #0x40 // #64 10: 910003fd mov x29, sp 14: 93407c42 sxtw x2, w2 18: 94000000 bl 0 1c: a8c17bfd ldp x29, x30, [sp], #16 20: d65f03c0 ret 24: d503201f nop After applying this patch: 0000000000000140 : 140: 11000400 add w0, w0, #0x1 144: 93407c00 sxtw x0, w0 148: f100fc1f cmp x0, #0x3f 14c: 54000168 b.hi 178 // b.pmore 150: f9400023 ldr x3, [x1] 154: 92800001 mov x1, #0xffffffffffffffff // #-1 158: 9ac02020 lsl x0, x1, x0 15c: 52800802 mov w2, #0x40 // #64 160: 8a030001 and x1, x0, x3 164: dac00020 rbit x0, x1 168: f100003f cmp x1, #0x0 16c: dac01000 clz x0, x0 170: 1a800040 csel w0, w2, w0, eq // eq = none 174: d65f03c0 ret 178: 52800800 mov w0, #0x40 // #64 17c: d65f03c0 ret find_next_bit() call is replaced with 6 instructions. find_next_bit() itself is 41 instructions plus function call overhead. Despite inlining, the scripts/bloat-o-meter report smaller .text size after applying the series: add/remove: 11/9 grow/shrink: 233/176 up/down: 5780/-6768 (-988) Link: https://lkml.kernel.org/r/20210401003153.97325-10-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Acked-by: Andy Shevchenko Cc: Alexey Klimov Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ea81c1ef441733ee779d776292d6269a97c5d2e1 Author: Yury Norov Date: Thu May 6 18:03:07 2021 -0700 tools: sync find_next_bit implementation Sync the implementation with recent kernel changes. Link: https://lkml.kernel.org/r/20210401003153.97325-9-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c88af59f9abc202648a431428ad9d32e5d2a201 Author: Yury Norov Date: Thu May 6 18:03:03 2021 -0700 lib: inline _find_next_bit() wrappers lib/find_bit.c declares five single-line wrappers for _find_next_bit(). We may turn those wrappers to inline functions. It eliminates unneeded function calls and opens room for compile-time optimizations. Link: https://lkml.kernel.org/r/20210401003153.97325-8-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Acked-by: Andy Shevchenko Cc: Alexey Klimov Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78e48f0667ff11ee444e057c757896062b6ad06b Author: Yury Norov Date: Thu May 6 18:03:00 2021 -0700 tools: sync small_const_nbits() macro with the kernel Sync implementation with the kernel and move the macro from tools/include/linux/bitmap.h to tools/include/asm-generic/bitsperlong.h Link: https://lkml.kernel.org/r/20210401003153.97325-7-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 586eaebea5988302c5a8b018096dd6c6f4564940 Author: Yury Norov Date: Thu May 6 18:02:56 2021 -0700 lib: extend the scope of small_const_nbits() macro find_bit would also benefit from small_const_nbits() optimizations. The detailed comment is provided by Rasmus Villemoes. Link: https://lkml.kernel.org/r/20210401003153.97325-6-yury.norov@gmail.com Suggested-by: Rasmus Villemoes Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Acked-by: Andy Shevchenko Cc: Alexey Klimov Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb8bc36ef8a9873e79c5bbde74fd493c47492c42 Author: Yury Norov Date: Thu May 6 18:02:53 2021 -0700 arch: rearrange headers inclusion order in asm/bitops for m68k, sh and h8300 m68k and sh include bitmap/{find,le}.h prior to ffs/fls headers. New fast-path implementation in find.h requires ffs/fls. Reordering the headers inclusion sequence helps to prevent compile-time implicit function declaration error. [yury.norov@gmail.com: h8300: rearrange headers inclusion order in asm/bitops] Link: https://lkml.kernel.org/r/20210406183625.794227-1-yury.norov@gmail.com Link: https://lkml.kernel.org/r/20210401003153.97325-5-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Geert Uytterhoeven Acked-by: Rasmus Villemoes Reviewed-by: Andy Shevchenko Tested-by: Guenter Roeck Cc: Alexey Klimov Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a719101f19d2b4f107c8a79ed8b2866832a1816f Author: Yury Norov Date: Thu May 6 18:02:49 2021 -0700 tools: sync BITMAP_LAST_WORD_MASK() macro with the kernel Kernel version generates better code. Link: https://lkml.kernel.org/r/20210401003153.97325-4-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e5b9252d9000fc82324af5864701c1daffeebd7e Author: Yury Norov Date: Thu May 6 18:02:46 2021 -0700 tools: bitmap: sync function declarations with the kernel Some functions in tools/include/linux/bitmap.h declare nbits as int. In the kernel nbits is declared as unsigned int. Link: https://lkml.kernel.org/r/20210401003153.97325-3-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d1d1a2cd4627724c37539892db8efa611d2cbd70 Author: Yury Norov Date: Thu May 6 18:02:42 2021 -0700 tools: disable -Wno-type-limits Patch series "lib/find_bit: fast path for small bitmaps", v6. Bitmap operations are much simpler and faster in case of small bitmaps which fit into a single word. In linux/bitmap.c we have a machinery that allows compiler to replace actual function call with a few instructions if bitmaps passed into the function are small and their size is known at compile time. find_*_bit() API lacks this functionality; but users will benefit from it a lot. One important example is cpumask subsystem when NR_CPUS <= BITS_PER_LONG. This patch (of 12): GENMASK(h, l) may be passed with unsigned types. In such case, type-limits warning is generated for example in case of GENMASK(h, 0). Link: https://lkml.kernel.org/r/20210401003153.97325-1-yury.norov@gmail.com Link: https://lkml.kernel.org/r/20210401003153.97325-2-yury.norov@gmail.com Signed-off-by: Yury Norov Acked-by: Rasmus Villemoes Cc: Alexey Klimov Cc: Andy Shevchenko Cc: Arnd Bergmann Cc: David Sterba Cc: Dennis Zhou Cc: Geert Uytterhoeven Cc: Jianpeng Ma Cc: Joe Perches Cc: John Paul Adrian Glaubitz Cc: Josh Poimboeuf Cc: Rich Felker Cc: Stefano Brivio Cc: Wei Yang Cc: Wolfram Sang Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 32c93976ac2ee7ecb4b09cc032efe1445d37bd7e Author: Rasmus Villemoes Date: Thu May 6 18:02:39 2021 -0700 kernel/cred.c: make init_groups static init_groups is declared in both cred.h and init_task.h, but it is not actually referenced anywhere outside of cred.c where it is defined. So make it static and remove the declarations. Link: https://lkml.kernel.org/r/20210310220102.2484201-1-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ba9d40b6b2bf62377fd6fce25e9997e42b0317a Author: Rasmus Villemoes Date: Thu May 6 18:02:36 2021 -0700 kernel/async.c: fix pr_debug statement An async_func_t returns void - any errors encountered it has to stash somewhere for consumers to discover later. Link: https://lkml.kernel.org/r/20210226124355.2503524-1-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 112dfce8f29798192eb0be8066b54f4a68f4eb36 Author: Wan Jiabing Date: Thu May 6 18:02:33 2021 -0700 linux/profile.h: remove unnecessary declaration Declaring struct pt_regs is unnecessary. On the one hand, there is no function using it; on the other hand, struct pt_regs has been declared in linux/kernel.h. Remove them. Link: https://lkml.kernel.org/r/20210401104834.1009157-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 08c5188ef40ff82aed559123dc0ab2d2254b1b1c Author: Andy Shevchenko Date: Thu May 6 18:02:30 2021 -0700 kernel.h: drop inclusion in bitmap.h The bitmap.h header is used in a lot of code around the kernel. Besides that it includes kernel.h which sometimes makes a loop. The problem here is many unneeded loops that make header hell dependencies. For example, how may you move bitmap_zalloc() from C-file to the header? Currently it's impossible. And bitmap.h here is only the tip of an iceberg. kerne.h is a dump of everything that even has nothing in common at all. We may still have it, but in my new code I prefer to include only the headers that I want to use, without the bulk of unneeded kernel code. Break the loop by introducing align.h, including it in kernel.h and bitmap.h followed by replacing kernel.h with limits.h. Link: https://lkml.kernel.org/r/20210326170347.37441-1-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko Acked-by: Yury Norov Cc: Rasmus Villemoes Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ee60ec156d91c315d1f62dfc1bc5799dcc6b473 Author: Matthew Wilcox (Oracle) Date: Thu May 6 18:02:27 2021 -0700 include: remove pagemap.h from blkdev.h My UEK-derived config has 1030 files depending on pagemap.h before this change. Afterwards, just 326 files need to be rebuilt when I touch pagemap.h. I think blkdev.h is probably included too widely, but untangling that dependency is harder and this solves my problem. x86 allmodconfig builds, but there may be implicit include problems on other architectures. Link: https://lkml.kernel.org/r/20210309195747.283796-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Dan Williams [nvdimm] Acked-by: Jens Axboe [block] Reviewed-by: Christoph Hellwig Acked-by: Coly Li [bcache] Acked-by: Martin K. Petersen [scsi] Reviewed-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5b31a7dfa35098a8c331b47fe4869282597df89f Author: zhouchuangao Date: Thu May 6 18:02:24 2021 -0700 proc/sysctl: fix function name error in comments The function name should be modified to register_sysctl_paths instead of register_sysctl_table_path. Link: https://lkml.kernel.org/r/1615807194-79646-1-git-send-email-zhouchuangao@vivo.com Signed-off-by: zhouchuangao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 268af17ada5855a9b703995125a9920ac117b56b Author: Alexey Dobriyan Date: Thu May 6 18:02:21 2021 -0700 selftests: proc: test subset=pid Test that /proc instance mounted with mount -t proc -o subset=pid contains only ".", "..", "self", "thread-self" and pid directories. Note: Currently "subset=pid" doesn't return "." and ".." via readdir. This must be a bug. Link: https://lkml.kernel.org/r/YFYZZ7WGaZlsnChS@localhost.localdomain Signed-off-by: Alexey Dobriyan Acked-by: Alexey Gladkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1dcdd7ef96ba11cf7c6a965114577b3509adb7cd Author: Alexey Dobriyan Date: Thu May 6 18:02:18 2021 -0700 proc: delete redundant subset=pid check Two checks in lookup and readdir code should be enough to not have third check in open code. Can't open what can't be looked up? Link: https://lkml.kernel.org/r/YFYYwIBIkytqnkxP@localhost.localdomain Signed-off-by: Alexey Dobriyan Acked-by: Alexey Gladkov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d4455faccd6cbe11ddfdbe28723a2122453b4f4e Author: Alexey Dobriyan Date: Thu May 6 18:02:16 2021 -0700 proc: mandate ->proc_lseek in "struct proc_ops" Now that proc_ops are separate from file_operations and other operations it easy to check all instances to have ->proc_lseek hook and remove check in main code. Note: nonseekable_open() files naturally don't require ->proc_lseek. Garbage collect pde_lseek() function. [adobriyan@gmail.com: smoke test lseek()] Link: https://lkml.kernel.org/r/YG4OIhChOrVTPgdN@localhost.localdomain Link: https://lkml.kernel.org/r/YFYX0Bzwxlc7aBa/@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b793cd9ab34da3c571a038219d1d6315f91e5afd Author: Alexey Dobriyan Date: Thu May 6 18:02:13 2021 -0700 proc: save LOC in __xlate_proc_name() Can't look at this verbosity anymore. Link: https://lkml.kernel.org/r/YFYXAp/fgq405qcy@localhost.localdomain Signed-off-by: Alexey Dobriyan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f4bf74d82915708208bc9d0c9bd3f769f56bfbec Author: Colin Ian King Date: Thu May 6 18:02:10 2021 -0700 fs/proc/generic.c: fix incorrect pde_is_permanent check Currently the pde_is_permanent() check is being run on root multiple times rather than on the next proc directory entry. This looks like a copy-paste error. Fix this by replacing root with next. Addresses-Coverity: ("Copy-paste error") Link: https://lkml.kernel.org/r/20210318122633.14222-1-colin.king@canonical.com Fixes: d919b33dafb3 ("proc: faster open/read/close with "permanent" files") Signed-off-by: Colin Ian King Acked-by: Christian Brauner Reviewed-by: Alexey Dobriyan Cc: Greg Kroah-Hartman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0214967a376d0726baf35cc2845a59ac17ef4db1 Author: Randy Dunlap Date: Thu May 6 18:02:07 2021 -0700 alpha: csum_partial_copy.c: add function prototypes from Fix "no previous prototype" W=1 warnings from the kernel test robot: arch/alpha/lib/csum_partial_copy.c:349:1: error: no previous prototype for 'csum_and_copy_from_user' [-Werror=missing-prototypes] 349 | csum_and_copy_from_user(const void __user *src, void *dst, int len) | ^~~~~~~~~~~~~~~~~~~~~~~ arch/alpha/lib/csum_partial_copy.c:358:1: error: no previous prototype for 'csum_partial_copy_nocheck' [-Werror=missing-prototypes] 358 | csum_partial_copy_nocheck(const void *src, void *dst, int len) | ^~~~~~~~~~~~~~~~~~~~~~~~~ Link: https://lkml.kernel.org/r/20210425235749.19113-1-rdunlap@infradead.org Fixes: 808b49da54e6 ("alpha: turn csum_partial_copy_from_user() into csum_and_copy_from_user()") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Al Viro Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 543203d2e4cb04bbdeccec0da9b2629c8a8f0569 Author: Randy Dunlap Date: Thu May 6 18:02:04 2021 -0700 alpha: eliminate old-style function definitions 'make ARCH=alpha W=1' reports a couple of old-style function definitions with missing parameter list, so fix those. arch/alpha/kernel/pc873xx.c: In function 'pc873xx_get_base': arch/alpha/kernel/pc873xx.c:16:21: warning: old-style function definition [-Wold-style-definition] 16 | unsigned int __init pc873xx_get_base() arch/alpha/kernel/pc873xx.c: In function 'pc873xx_get_model': arch/alpha/kernel/pc873xx.c:21:14: warning: old-style function definition [-Wold-style-definition] 21 | char *__init pc873xx_get_model() Link: https://lkml.kernel.org/r/20210421061312.30097-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Richard Henderson Cc: Ivan Kokshaysky Cc: Matt Turner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 365002da3c46333dcd4c0ef72d3b570d1af8b25c Merge: 1cd6b4a04f038 c7b397e9ca4d6 Author: Dave Airlie Date: Fri May 7 11:55:43 2021 +1000 Merge tag 'drm-intel-next-fixes-2021-04-30' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 GVT fixes for v5.13-rc1: - Fix a possible division by zero in vgpu display rate calculation Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87wnsk16sa.fsf@intel.com commit a6f8ee58a8e35f7e4380a5efce312e2a5bc27497 Author: Arjun Roy Date: Thu May 6 15:35:30 2021 -0700 tcp: Specify cmsgbuf is user pointer for receive zerocopy. A prior change (1f466e1f15cf) introduces separate handling for ->msg_control depending on whether the pointer is a kernel or user pointer. However, while tcp receive zerocopy is using this field, it is not properly annotating that the buffer in this case is a user pointer. This can cause faults when the improper mechanism is used within put_cmsg(). This patch simply annotates tcp receive zerocopy's use as explicitly being a user pointer. Fixes: 7eeba1706eba ("tcp: Add receive timestamp support for receive zerocopy.") Signed-off-by: Arjun Roy Acked-by: Soheil Hassas Yeganeh Reviewed-by: Eric Dumazet Link: https://lore.kernel.org/r/20210506223530.2266456-1-arjunroy.kdev@gmail.com Signed-off-by: Jakub Kicinski commit cbaf3f6af9c268caf558c8e7ec52bcb35c5455dd Author: Ido Schimmel Date: Thu May 6 10:23:08 2021 +0300 mlxsw: spectrum_mr: Update egress RIF list before route's action Each multicast route that is forwarding packets (as opposed to trapping them) points to a list of egress router interfaces (RIFs) through which packets are replicated. A route's action can transition from trap to forward when a RIF is created for one of the route's egress virtual interfaces (eVIF). When this happens, the route's action is first updated and only later the list of egress RIFs is committed to the device. This results in the route pointing to an invalid list. In case the list pointer is out of range (due to uninitialized memory), the device will complain: mlxsw_spectrum2 0000:06:00.0: EMAD reg access failed (tid=5733bf490000905c,reg_id=300f(pefa),type=write,status=7(bad parameter)) Fix this by first committing the list of egress RIFs to the device and only later update the route's action. Note that a fix is not needed in the reverse function (i.e., mlxsw_sp_mr_route_evif_unresolve()), as there the route's action is first updated and only later the RIF is removed from the list. Cc: stable@vger.kernel.org Fixes: c011ec1bbfd6 ("mlxsw: spectrum: Add the multicast routing offloading logic") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Link: https://lore.kernel.org/r/20210506072308.3834303-1-idosch@idosch.org Signed-off-by: Jakub Kicinski commit 6a780f51f87b430cc69ebf4e859e7e9be720b283 Author: Alex Elder Date: Wed May 5 17:36:36 2021 -0500 net: ipa: fix inter-EE IRQ register definitions In gsi_irq_setup(), two registers are written with the intention of disabling inter-EE channel and event IRQs. But the wrong registers are used (and defined); the ones used are read-only registers that indicate whether the interrupt condition is present. Define the mask registers instead of the status registers, and use them to disable the inter-EE interrupt types. Fixes: 46f748ccaf01 ("net: ipa: explicitly disallow inter-EE interrupts") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20210505223636.232527-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 31379397dcc364a59ce764fabb131b645c43e340 Author: Jiri Olsa Date: Wed May 5 15:25:29 2021 +0200 bpf: Forbid trampoline attach for functions with variable arguments We can't currently allow to attach functions with variable arguments. The problem is that we should save all the registers for arguments, which is probably doable, but if caller uses more than 6 arguments, we need stack data, which will be wrong, because of the extra stack frame we do in bpf trampoline, so we could crash. Also currently there's malformed trampoline code generated for such functions at the moment as described in: https://lore.kernel.org/bpf/20210429212834.82621-1-jolsa@kernel.org/ Signed-off-by: Jiri Olsa Signed-off-by: Daniel Borkmann Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210505132529.401047-1-jolsa@kernel.org commit f2f46b878777e0d3f885c7ddad48f477b4dea247 Author: Kuogee Hsieh Date: Wed Apr 21 16:37:36 2021 -0700 drm/msm/dp: initialize audio_comp when audio starts Initialize audio_comp when audio starts and wait for audio_comp at dp_display_disable(). This will take care of both dongle unplugged and display off (suspend) cases. Changes in v2: -- add dp_display_signal_audio_start() Changes in v3: -- restore dp_display_handle_plugged_change() at dp_hpd_unplug_handle(). Changes in v4: -- none Signed-off-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Tested-by: Stephen Boyd Fixes: c703d5789590 ("drm/msm/dp: trigger unplug event in msm_dp_display_disable") Link: https://lore.kernel.org/r/1619048258-8717-3-git-send-email-khsieh@codeaurora.org Signed-off-by: Rob Clark commit d9aa6571b28ba0022de1e48801ff03a1854c7ef2 Author: Kuogee Hsieh Date: Wed Apr 21 16:37:35 2021 -0700 drm/msm/dp: check sink_count before update is_connected status Link status is different from display connected status in the case of something like an Apple dongle where the type-c plug can be connected, and therefore the link is connected, but no sink is connected until an HDMI cable is plugged into the dongle. The sink_count of DPCD of dongle will increase to 1 once an HDMI cable is plugged into the dongle so that display connected status will become true. This checking also apply at pm_resume. Changes in v4: -- none Fixes: 94e58e2d06e3 ("drm/msm/dp: reset dp controller only at boot up and pm_resume") Reported-by: Stephen Boyd Reviewed-by: Stephen Boyd Tested-by: Stephen Boyd Signed-off-by: Kuogee Hsieh Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets") Link: https://lore.kernel.org/r/1619048258-8717-2-git-send-email-khsieh@codeaurora.org Signed-off-by: Rob Clark commit 9f3c3b423567f09ab73d6e89eaccd7fe8a8741f5 Merge: 8621436671f3a e04b2cfe61072 Author: Jakub Kicinski Date: Thu May 6 16:24:31 2021 -0700 Merge tag 'linux-can-fixes-for-5.13-20210506' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2021-05-06 The first two patches target the mcp251xfd driver. Dan Carpenter's patch fixes a NULL pointer dereference in the probe function's error path. A patch by me adds the missing can_rx_offload_del() in error path of the probe function. Frieder Schrempf contributes a patch for the mcp251x driver, the patch fixes the resume from sleep before interface was brought up. The last patch is by me and fixes a race condition in the TX path of the m_can driver for peripheral (SPI) based m_can cores. * tag 'linux-can-fixes-for-5.13-20210506' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can: can: m_can: m_can_tx_work_queue(): fix tx_skb race condition can: mcp251x: fix resume from sleep before interface was brought up can: mcp251xfd: mcp251xfd_probe(): add missing can_rx_offload_del() in error path can: mcp251xfd: mcp251xfd_probe(): fix an error pointer dereference in probe ==================== Link: https://lore.kernel.org/r/20210506074015.1300591-1-mkl@pengutronix.de Signed-off-by: Jakub Kicinski commit 3b80d106e110d39d3f678954d3b55078669cf07e Author: Magnus Karlsson Date: Thu May 6 14:43:49 2021 +0200 samples/bpf: Consider frame size in tx_only of xdpsock sample Fix the tx_only micro-benchmark in xdpsock to take frame size into consideration. It was hardcoded to the default value of frame_size which is 4K. Changing this on the command line to 2K made half of the packets illegal as they were outside the umem and were therefore discarded by the kernel. Fixes: 46738f73ea4f ("samples/bpf: add use of need_wakeup flag in xdpsock") Signed-off-by: Magnus Karlsson Signed-off-by: Daniel Borkmann Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20210506124349.6666-1-magnus.karlsson@gmail.com commit 05665cef4b745cb46b1d1b8e96deaa25464092d3 Author: Matt Reynolds Date: Thu Apr 29 15:29:37 2021 -0700 Input: xpad - add support for Amazon Game Controller The Amazon Luna controller (product name "Amazon Game Controller") behaves like an Xbox 360 controller when connected over USB. Signed-off-by: Matt Reynolds Reviewed-by: Harry Cutts Link: https://lore.kernel.org/r/20210429103548.1.If5f9a44cb81e25b9350f7c6c0b3c88b4ecd81166@changeid Signed-off-by: Dmitry Torokhov commit ac05a8a927e5a1027592d8f98510a511dadeed14 Author: Hansem Ro Date: Thu May 6 13:27:10 2021 -0700 Input: ili210x - add missing negation for touch indication on ili210x This adds the negation needed for proper finger detection on Ilitek ili2107/ili210x. This fixes polling issues (on Amazon Kindle Fire) caused by returning false for the cooresponding finger on the touchscreen. Signed-off-by: Hansem Ro Fixes: e3559442afd2a ("ili210x - rework the touchscreen sample processing") Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov commit e48661230cc35b3d0f4367eddfc19f86463ab917 Merge: a2de4bbddce3e b208108638c4b Author: Linus Torvalds Date: Thu May 6 14:39:50 2021 -0700 Merge tag 's390-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull more s390 updates from Heiko Carstens: - add support for system call stack randomization - handle stale PCI deconfiguration events - couple of defconfig updates - some fixes and cleanups * tag 's390-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility s390/entry: add support for syscall stack randomization s390/configs: change CONFIG_VIRTIO_CONSOLE to "m" s390/cio: remove invalid condition on IO_SCH_UNREG s390/cpumf: remove call to perf_event_update_userpage s390/cpumf: move counter set size calculation to common place s390/cpumf: beautify if-then-else indentation s390/configs: enable CONFIG_PCI_IOV s390/pci: handle stale deconfiguration events s390/pci: rename zpci_configure_device() commit a2de4bbddce3e98bd2444bb027dc84418a0066b1 Merge: 38182162b50aa cc35518d29bc8 Author: Linus Torvalds Date: Thu May 6 14:22:58 2021 -0700 Merge tag 'vfio-v5.13-rc1pt2' of git://github.com/awilliam/linux-vfio Pull more VFIO updates from Alex Williamson: "A second small set of commits for this merge window, primarily to unbreak some deletions from our uAPI header. - Additional mdev sample driver cleanup (Dan Carpenter) - Doc fix (Alyssa Ross) - Unbreak uAPI from NVLink2 support removal (Alex Williamson)" * tag 'vfio-v5.13-rc1pt2' of git://github.com/awilliam/linux-vfio: docs: vfio: fix typo vfio/pci: Revert nvlink removal uAPI breakage vfio/mdev: remove unnecessary NULL check in mbochs_create() commit 51cf94d16860a324e97d1b670d88f1f2b643bc32 Author: Thomas Gleixner Date: Thu Apr 22 21:44:21 2021 +0200 futex: Make syscall entry points less convoluted The futex and the compat syscall entry points do pretty much the same except for the timespec data types and the corresponding copy from user function. Split out the rest into inline functions and share the functionality. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210422194705.244476369@linutronix.de commit b097d5ed33561507eeffc77120a8c16c2f0f2c4c Author: Thomas Gleixner Date: Thu Apr 22 21:44:20 2021 +0200 futex: Get rid of the val2 conditional dance There is no point in checking which FUTEX operand treats the utime pointer as 'val2' argument because that argument to do_futex() is only used by exactly these operands. So just handing it in unconditionally is not making any difference, but removes a lot of pointless gunk. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210422194705.125957049@linutronix.de commit cdf78db4070967869e4d027c11f4dd825d8f815a Author: Thomas Gleixner Date: Thu Apr 22 21:44:19 2021 +0200 futex: Do not apply time namespace adjustment on FUTEX_LOCK_PI FUTEX_LOCK_PI does not require to have the FUTEX_CLOCK_REALTIME bit set because it has been using CLOCK_REALTIME based absolute timeouts forever. Due to that, the time namespace adjustment which is applied when FUTEX_CLOCK_REALTIME is not set, will wrongly take place for FUTEX_LOCK_PI and wreckage the timeout. Exclude it from that procedure. Fixes: c2f7d08cccf4 ("futex: Adjust absolute futex timeouts with per time namespace offset") Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210422194704.984540159@linutronix.de commit 4fbf5d6837bf81fd7a27d771358f4ee6c4f243f8 Author: Thomas Gleixner Date: Thu Apr 22 21:44:18 2021 +0200 Revert 337f13046ff0 ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op") The FUTEX_WAIT operand has historically a relative timeout which means that the clock id is irrelevant as relative timeouts on CLOCK_REALTIME are not subject to wall clock changes and therefore are mapped by the kernel to CLOCK_MONOTONIC for simplicity. If a caller would set FUTEX_CLOCK_REALTIME for FUTEX_WAIT the timeout is still treated relative vs. CLOCK_MONOTONIC and then the wait arms that timeout based on CLOCK_REALTIME which is broken and obviously has never been used or even tested. Reject any attempt to use FUTEX_CLOCK_REALTIME with FUTEX_WAIT again. The desired functionality can be achieved with FUTEX_WAIT_BITSET and a FUTEX_BITSET_MATCH_ANY argument. Fixes: 337f13046ff0 ("futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op") Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210422194704.834797921@linutronix.de commit 38182162b50aa4e970e5997df0a0c4288147a153 Merge: 7ac86b3dca1b0 e9d503fef7da2 Author: Linus Torvalds Date: Thu May 6 11:08:50 2021 -0700 Merge branch 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux Pull pcmcia updates from Dominik Brodowski: "A number of patches fixing W=1 kernel build warnings, and one patch removing an always-false NULL check" * 'pcmcia-next' of git://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux: pcmcia: rsrc_nonstatic: Fix call-back function as reference formatting pcmcia: pcmcia_resource: Fix some kernel-doc formatting/disparities and demote others pcmcia: ds: Fix function name disparity in header pcmcia: pcmcia_cis: Demote non-conforming kernel-doc headers to standard kernel-doc pcmcia: cistpl: Demote non-conformant kernel-doc headers to standard comments pcmcia: rsrc_nonstatic: Demote kernel-doc abuses pcmcia: ds: Remove if with always false condition commit 7ac86b3dca1b00f5391d346fdea3ac010d230667 Merge: 682a8e2b41eff 3f1c6f2122fc7 Author: Linus Torvalds Date: Thu May 6 10:27:02 2021 -0700 Merge tag 'ceph-for-5.13-rc1' of git://github.com/ceph/ceph-client Pull ceph updates from Ilya Dryomov: "Notable items here are - a series to take advantage of David Howells' netfs helper library from Jeff - three new filesystem client metrics from Xiubo - ceph.dir.rsnaps vxattr from Yanhu - two auth-related fixes from myself, marked for stable. Interspersed is a smattering of assorted fixes and cleanups across the filesystem" * tag 'ceph-for-5.13-rc1' of git://github.com/ceph/ceph-client: (24 commits) libceph: allow addrvecs with a single NONE/blank address libceph: don't set global_id until we get an auth ticket libceph: bump CephXAuthenticate encoding version ceph: don't allow access to MDS-private inodes ceph: fix up some bare fetches of i_size ceph: convert some PAGE_SIZE invocations to thp_size() ceph: support getting ceph.dir.rsnaps vxattr ceph: drop pinned_page parameter from ceph_get_caps ceph: fix inode leak on getattr error in __fh_to_dentry ceph: only check pool permissions for regular files ceph: send opened files/pinned caps/opened inodes metrics to MDS daemon ceph: avoid counting the same request twice or more ceph: rename the metric helpers ceph: fix kerneldoc copypasta over ceph_start_io_direct ceph: use attach/detach_page_private for tracking snap context ceph: don't use d_add in ceph_handle_snapdir ceph: don't clobber i_snap_caps on non-I_NEW inode ceph: fix fall-through warnings for Clang ceph: convert ceph_readpages to ceph_readahead ceph: convert ceph_write_begin to netfs_write_begin ... commit 682a8e2b41effcaf2e80697e395d47f77c91273f Merge: 7ec901b6fa9ce 9046625511ad8 Author: Linus Torvalds Date: Thu May 6 10:06:39 2021 -0700 Merge tag 'ecryptfs-5.13-rc1-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs Pull ecryptfs updates from Tyler Hicks: "Code cleanups and a bug fix - W=1 compiler warning cleanups - Mutex initialization simplification - Protect against NULL pointer exception during mount" * tag 'ecryptfs-5.13-rc1-updates' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: ecryptfs: fix kernel panic with null dev_name ecryptfs: remove unused helpers ecryptfs: Fix typo in message eCryptfs: Use DEFINE_MUTEX() for mutex lock ecryptfs: keystore: Fix some kernel-doc issues and demote non-conformant headers ecryptfs: inode: Help out nearly-there header and demote non-conformant ones ecryptfs: mmap: Help out one function header and demote other abuses ecryptfs: crypto: Supply some missing param descriptions and demote abuses ecryptfs: miscdev: File headers are not good kernel-doc candidates ecryptfs: main: Demote a bunch of non-conformant kernel-doc headers ecryptfs: messaging: Add missing param descriptions and demote abuses ecryptfs: super: Fix formatting, naming and kernel-doc abuses ecryptfs: file: Demote kernel-doc abuses ecryptfs: kthread: Demote file header and provide description for 'cred' ecryptfs: dentry: File headers are not good candidates for kernel-doc ecryptfs: debug: Demote a couple of kernel-doc abuses ecryptfs: read_write: File headers do not make good candidates for kernel-doc ecryptfs: use DEFINE_MUTEX() for mutex lock eCryptfs: add a semicolon commit 7ec901b6fa9ce5be3fc53d6216cb9e83ea0cf1da Merge: 164e64adc246d 8c9af478c06bb Author: Linus Torvalds Date: Thu May 6 10:03:38 2021 -0700 Merge tag 'trace-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Fix probes written to the set_ftrace_filter file Now that there's a library that accesses the tracefs file system (libtracefs), the way the files are interacted with is slightly different than the command line. For instance, the write() system call is used directly instead of an echo. This exposes some old bugs. If a probe is written to "set_ftrace_filter" without any white space after it, it will be ignored. This is because the write expects that a string written to it that does not end with white spaces thinks there is more to come. But if the file is closed, the release function needs to finish it. The "set_ftrace_filter" release function handles the filter part of the "set_ftrace_filter" file, but did not handle the probe part" * tag 'trace-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Handle commands when closing set_ftrace_filter file commit 164e64adc246dd4239ab644dff86241d17cef218 Merge: 2423e142b37e2 3da53c754502a Author: Linus Torvalds Date: Thu May 6 09:56:26 2021 -0700 Merge tag 'acpi-5.13-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "These revert one recent commit that turned out to be problematic, address two issues in the ACPI "custom method" interface and update GPIO properties documentation. Specifics: - Revent recent commit related to the handling of ACPI power resources during initialization, because it turned out to cause problems to occur on some systems (Rafael Wysocki). - Fix potential use-after-free and potential memory leak in the ACPI "custom method" debugfs interface (Mark Langsdorf). - Update ACPI GPIO properties documentation to cover assumptions regarding GPIO polarity (Andy Shevchenko)" * tag 'acpi-5.13-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPI: scan: Turn off unused power resources during initialization" ACPI: custom_method: fix a possible memory leak ACPI: custom_method: fix potential use-after-free issue Documentation: firmware-guide: gpio-properties: Add note to SPI CS case commit 2423e142b37e2fcce61ea6d3c2f103384ae05f92 Merge: 322a3b843d7f4 6799e3f281e96 Author: Linus Torvalds Date: Thu May 6 09:53:40 2021 -0700 Merge tag 'devicetree-fixes-for-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree fixes from Rob Herring: - Several Renesas binding fixes to fix warnings - Remove duplicate compatibles in 8250 binding - Remove orphaned Sigma Designs Tango bindings - Fix bcm2711-hdmi binding to use 'additionalProperties' - Fix idt,32434-pic warning for missing 'interrupts' property - Fix 'stored but not read' warnings in DT overlay code * tag 'devicetree-fixes-for-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: net: renesas,etheravb: Fix optional second clock name dt-bindings: display: renesas,du: Add missing power-domains property dt-bindings: media: renesas,vin: Make resets optional on R-Car Gen1 dt-bindings: PCI: rcar-pci-host: Document missing R-Car H1 support of: overlay: Remove redundant assignment to ret dt-bindings: serial: 8250: Remove duplicated compatible strings dt-bindings: Remove unused Sigma Designs Tango bindings dt-bindings: bcm2711-hdmi: Fix broken schema dt-bindings: interrupt-controller: idt,32434-pic: Add missing interrupts property commit beaf5ae15a13d835a01e30c282c8325ce0f1eb7e Author: Rouven Czerwinski Date: Sat May 1 20:53:58 2021 +0200 riscv: remove unused handle_exception symbol Since commit 79b1feba5455 ("RISC-V: Setup exception vector early") exception vectors are setup early and the handle_exception symbol from the asm files is no longer referenced in traps.c. Remove it. Signed-off-by: Rouven Czerwinski Signed-off-by: Palmer Dabbelt commit 8d91b097335892bfbc9fd5783e80e25f0fb5bb2b Author: Geert Uytterhoeven Date: Thu Apr 29 17:10:04 2021 +0200 riscv: Consistify protect_kernel_linear_mapping_text_rodata() use The various uses of protect_kernel_linear_mapping_text_rodata() are not consistent: - Its definition depends on "64BIT && !XIP_KERNEL", - Its forward declaration depends on MMU, - Its single caller depends on "STRICT_KERNEL_RWX && 64BIT && MMU && !XIP_KERNEL". Fix this by settling on the dependencies of the caller, which can be simplified as STRICT_KERNEL_RWX depends on "MMU && !XIP_KERNEL". Provide a dummy definition, as the caller is protected by "IS_ENABLED(CONFIG_STRICT_KERNEL_RWX)" instead of "#ifdef CONFIG_STRICT_KERNEL_RWX". Signed-off-by: Geert Uytterhoeven Tested-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 0e0d4992517fba81ecbceb5b71d2851f1208a02b Author: Vincent Chen Date: Thu Apr 29 00:58:36 2021 -0700 riscv: enable SiFive errata CIP-453 and CIP-1200 Kconfig only if CONFIG_64BIT=y The corresponding hardware issues of CONFIG_ERRATA_SIFIVE_CIP_453 and CONFIG_ERRATA_SIFIVE_CIP_1200 only exist in the SiFive 64bit CPU cores. Therefore, these two errata are required only if CONFIG_64BIT=y Reported-by: kernel test robot Signed-off-by: Vincent Chen Fixes: bff3ff525460 ("riscv: sifive: Apply errata "cip-1200" patch") Fixes: 800149a77c2c ("riscv: sifive: Apply errata "cip-453" patch") Signed-off-by: Palmer Dabbelt commit 8db6f937f4e76d9dd23795311fc14f0a5c0ac119 Author: Geert Uytterhoeven Date: Thu Apr 29 17:05:00 2021 +0200 riscv: Only extend kernel reservation if mapped read-only When the kernel mapping was moved outside of the linear mapping, the kernel memory reservation was increased, to take into account mapping granularity. However, this is done unconditionally, regardless of whether the kernel memory is mapped read-only or not. If this extension is not needed, up to 2 MiB may be lost, which has a big impact on e.g. Canaan K210 (64-bit nommu) platforms with only 8 MiB of RAM. Reclaim the lost memory by only extending the reserved region when needed, i.e. depending on a simplified version of the conditional logic around the call to protect_kernel_linear_mapping_text_rodata(). Fixes: 2bfc6cd81bd17e43 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Geert Uytterhoeven Tested-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 322a3b843d7f475b857646ed8f95b40431d3ecd0 Merge: 939b7cbc00906 298a58e165e44 Author: Linus Torvalds Date: Thu May 6 09:28:07 2021 -0700 Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: - Fix BSS size calculation for LLVM - Improve robustness of kernel entry around v7_invalidate_l1 - Fix and update kprobes assembly - Correct breakpoint overflow handler check - Pause function graph tracer when suspending a CPU - Switch to generic syscallhdr.sh and syscalltbl.sh - Remove now unused set_kernel_text_r[wo] functions - Updates for ptdump (__init marking and using DEFINE_SHOW_ATTRIBUTE) - Fix for interrupted SMC (secure) calls - Remove Compaq Personal Server platform * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: footbridge: remove personal server platform ARM: 9075/1: kernel: Fix interrupted SMC calls ARM: 9074/1: ptdump: convert to DEFINE_SHOW_ATTRIBUTE ARM: 9073/1: ptdump: add __init section marker to three functions ARM: 9072/1: mm: remove set_kernel_text_r[ow]() ARM: 9067/1: syscalls: switch to generic syscallhdr.sh ARM: 9068/1: syscalls: switch to generic syscalltbl.sh ARM: 9066/1: ftrace: pause/unpause function graph tracer in cpu_suspend() ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook ARM: 9062/1: kprobes: rewrite test-arm.c in UAL ARM: 9061/1: kprobes: fix UNPREDICTABLE warnings ARM: 9060/1: kexec: Remove unused kexec_reinit callback ARM: 9059/1: cache-v7: get rid of mini-stack ARM: 9058/1: cache-v7: refactor v7_invalidate_l1 to avoid clobbering r5/r6 ARM: 9057/1: cache-v7: add missing ISB after cache level selection ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld commit 939b7cbc00906b02c6eae6a380ad6c24c7a1e043 Merge: 5e5948e57e438 f54c7b5898d31 Author: Linus Torvalds Date: Thu May 6 09:24:18 2021 -0700 Merge tag 'riscv-for-linus-5.13-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux Pull RISC-V updates from Palmer Dabbelt: - Support for the memtest= kernel command-line argument. - Support for building the kernel with FORTIFY_SOURCE. - Support for generic clockevent broadcasts. - Support for the buildtar build target. - Some build system cleanups to pass more LLVM-friendly arguments. - Support for kprobes. - A rearranged kernel memory map, the first part of supporting sv48 systems. - Improvements to kexec, along with support for kdump and crash kernels. - An alternatives-based errata framework, along with support for handling a pair of errata that manifest on some SiFive designs (including the HiFive Unmatched). - Support for XIP. - A device tree for the Microchip PolarFire ICICLE SoC and associated dev board. ... along with a bunch of cleanups. There are already a handful of fixes on the list so there will likely be a part 2. * tag 'riscv-for-linus-5.13-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux: (45 commits) RISC-V: Always define XIP_FIXUP riscv: Remove 32b kernel mapping from page table dump riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y RISC-V: Fix error code returned by riscv_hartid_to_cpuid() RISC-V: Enable Microchip PolarFire ICICLE SoC RISC-V: Initial DTS for Microchip ICICLE board dt-bindings: riscv: microchip: Add YAML documentation for the PolarFire SoC RISC-V: Add Microchip PolarFire SoC kconfig option RISC-V: enable XIP RISC-V: Add crash kernel support RISC-V: Add kdump support RISC-V: Improve init_resources() RISC-V: Add kexec support RISC-V: Add EM_RISCV to kexec UAPI header riscv: vdso: fix and clean-up Makefile riscv/mm: Use BUG_ON instead of if condition followed by BUG. riscv/kprobe: fix kernel panic when invoking sys_read traced by kprobe riscv: Set ARCH_HAS_STRICT_MODULE_RWX if MMU riscv: module: Create module allocations without exec permissions riscv: bpf: Avoid breaking W^X ... commit 5e5948e57e4381c770931be2c070f3bb894a1a52 Merge: a3f53e8adfda8 f1f99adf05f21 Author: Linus Torvalds Date: Thu May 6 08:40:38 2021 -0700 Merge tag 'hexagon-5.13-0' of git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux Pull Hexagon updates from Brian Cain: "Hexagon architecture build fixes + builtins Small build fixes applied: - use -mlong-calls to build - extend jumps in futex_atomic_* - etc Also, for convenience and portability, the hexagon compiler builtin functions like memcpy etc have been added to the kernel -- following the idiom used by other architectures" * tag 'hexagon-5.13-0' of git://git.kernel.org/pub/scm/linux/kernel/git/bcain/linux: Hexagon: add target builtins to kernel Hexagon: remove DEBUG from comet config Hexagon: change jumps to must-extend in futex_atomic_* Hexagon: fix build errors commit a3f53e8adfda814730c341ee39ce015a0abf69aa Merge: 8404c9fbc84b7 7fc4607899e87 Author: Linus Torvalds Date: Thu May 6 08:33:54 2021 -0700 Merge tag 'docs-5.13-2' of git://git.lwn.net/linux Pull documentation fixes from Jonathan Corbet: "A few late-arriving documentation fixes, including some oprofile cleanup, a kernel-doc fix, some regression-reporting updates, and the usual minor fixes" * tag 'docs-5.13-2' of git://git.lwn.net/linux: Enlisted oprofile version line removed oprofiled version output line removed from the list Removed the oprofiled version option docs: reporting-issues.rst: CC subsystem and maintainers on regressions docs: correct URL to bios and kernel developer's guide docs/core-api: Consistent code style docs/zh_CN: Adjust order and content of zh_CN/index.rst Documentation: input: joydev file corrections docs: Fix typo in Documentation/x86/x86_64/5level-paging.rst kernel-doc: Add support for __deprecated commit cf7b39a0cbf6bf57aa07a008d46cf695add05b4c Author: yangerkun Date: Thu Apr 1 15:18:07 2021 +0800 block: reexpand iov_iter after read/write We get a bug: BUG: KASAN: slab-out-of-bounds in iov_iter_revert+0x11c/0x404 lib/iov_iter.c:1139 Read of size 8 at addr ffff0000d3fb11f8 by task CPU: 0 PID: 12582 Comm: syz-executor.2 Not tainted 5.10.0-00843-g352c8610ccd2 #2 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x0/0x2d0 arch/arm64/kernel/stacktrace.c:132 show_stack+0x28/0x34 arch/arm64/kernel/stacktrace.c:196 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x110/0x164 lib/dump_stack.c:118 print_address_description+0x78/0x5c8 mm/kasan/report.c:385 __kasan_report mm/kasan/report.c:545 [inline] kasan_report+0x148/0x1e4 mm/kasan/report.c:562 check_memory_region_inline mm/kasan/generic.c:183 [inline] __asan_load8+0xb4/0xbc mm/kasan/generic.c:252 iov_iter_revert+0x11c/0x404 lib/iov_iter.c:1139 io_read fs/io_uring.c:3421 [inline] io_issue_sqe+0x2344/0x2d64 fs/io_uring.c:5943 __io_queue_sqe+0x19c/0x520 fs/io_uring.c:6260 io_queue_sqe+0x2a4/0x590 fs/io_uring.c:6326 io_submit_sqe fs/io_uring.c:6395 [inline] io_submit_sqes+0x4c0/0xa04 fs/io_uring.c:6624 __do_sys_io_uring_enter fs/io_uring.c:9013 [inline] __se_sys_io_uring_enter fs/io_uring.c:8960 [inline] __arm64_sys_io_uring_enter+0x190/0x708 fs/io_uring.c:8960 __invoke_syscall arch/arm64/kernel/syscall.c:36 [inline] invoke_syscall arch/arm64/kernel/syscall.c:48 [inline] el0_svc_common arch/arm64/kernel/syscall.c:158 [inline] do_el0_svc+0x120/0x290 arch/arm64/kernel/syscall.c:227 el0_svc+0x1c/0x28 arch/arm64/kernel/entry-common.c:367 el0_sync_handler+0x98/0x170 arch/arm64/kernel/entry-common.c:383 el0_sync+0x140/0x180 arch/arm64/kernel/entry.S:670 Allocated by task 12570: stack_trace_save+0x80/0xb8 kernel/stacktrace.c:121 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc+0xdc/0x120 mm/kasan/common.c:461 kasan_kmalloc+0xc/0x14 mm/kasan/common.c:475 __kmalloc+0x23c/0x334 mm/slub.c:3970 kmalloc include/linux/slab.h:557 [inline] __io_alloc_async_data+0x68/0x9c fs/io_uring.c:3210 io_setup_async_rw fs/io_uring.c:3229 [inline] io_read fs/io_uring.c:3436 [inline] io_issue_sqe+0x2954/0x2d64 fs/io_uring.c:5943 __io_queue_sqe+0x19c/0x520 fs/io_uring.c:6260 io_queue_sqe+0x2a4/0x590 fs/io_uring.c:6326 io_submit_sqe fs/io_uring.c:6395 [inline] io_submit_sqes+0x4c0/0xa04 fs/io_uring.c:6624 __do_sys_io_uring_enter fs/io_uring.c:9013 [inline] __se_sys_io_uring_enter fs/io_uring.c:8960 [inline] __arm64_sys_io_uring_enter+0x190/0x708 fs/io_uring.c:8960 __invoke_syscall arch/arm64/kernel/syscall.c:36 [inline] invoke_syscall arch/arm64/kernel/syscall.c:48 [inline] el0_svc_common arch/arm64/kernel/syscall.c:158 [inline] do_el0_svc+0x120/0x290 arch/arm64/kernel/syscall.c:227 el0_svc+0x1c/0x28 arch/arm64/kernel/entry-common.c:367 el0_sync_handler+0x98/0x170 arch/arm64/kernel/entry-common.c:383 el0_sync+0x140/0x180 arch/arm64/kernel/entry.S:670 Freed by task 12570: stack_trace_save+0x80/0xb8 kernel/stacktrace.c:121 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track+0x38/0x6c mm/kasan/common.c:56 kasan_set_free_info+0x20/0x40 mm/kasan/generic.c:355 __kasan_slab_free+0x124/0x150 mm/kasan/common.c:422 kasan_slab_free+0x10/0x1c mm/kasan/common.c:431 slab_free_hook mm/slub.c:1544 [inline] slab_free_freelist_hook mm/slub.c:1577 [inline] slab_free mm/slub.c:3142 [inline] kfree+0x104/0x38c mm/slub.c:4124 io_dismantle_req fs/io_uring.c:1855 [inline] __io_free_req+0x70/0x254 fs/io_uring.c:1867 io_put_req_find_next fs/io_uring.c:2173 [inline] __io_queue_sqe+0x1fc/0x520 fs/io_uring.c:6279 __io_req_task_submit+0x154/0x21c fs/io_uring.c:2051 io_req_task_submit+0x2c/0x44 fs/io_uring.c:2063 task_work_run+0xdc/0x128 kernel/task_work.c:151 get_signal+0x6f8/0x980 kernel/signal.c:2562 do_signal+0x108/0x3a4 arch/arm64/kernel/signal.c:658 do_notify_resume+0xbc/0x25c arch/arm64/kernel/signal.c:722 work_pending+0xc/0x180 blkdev_read_iter can truncate iov_iter's count since the count + pos may exceed the size of the blkdev. This will confuse io_read that we have consume the iovec. And once we do the iov_iter_revert in io_read, we will trigger the slab-out-of-bounds. Fix it by reexpand the count with size has been truncated. blkdev_write_iter can trigger the problem too. Signed-off-by: yangerkun Acked-by: Pavel Begunkov Link: https://lore.kernel.org/r/20210401071807.3328235-1-yangerkun@huawei.com Signed-off-by: Jens Axboe commit 3da53c754502acf74d4d9ba8ac23fc356e6c3d0f Merge: 1cfd8956437f8 5db91e9cb5b3f ec3576eac11d6 Author: Rafael J. Wysocki Date: Thu May 6 17:21:42 2021 +0200 Merge branches 'acpi-pm' and 'acpi-docs' * acpi-pm: Revert "ACPI: scan: Turn off unused power resources during initialization" * acpi-docs: Documentation: firmware-guide: gpio-properties: Add note to SPI CS case commit 28ce0e70ecc30cc7d558a0304e6b816d70848f9a Author: Waiman Long Date: Mon Apr 26 14:50:17 2021 -0400 locking/qrwlock: Cleanup queued_write_lock_slowpath() Make the code more readable by replacing the atomic_cmpxchg_acquire() by an equivalent atomic_try_cmpxchg_acquire() and change atomic_add() to atomic_or(). For architectures that use qrwlock, I do not find one that has an atomic_add() defined but not an atomic_or(). I guess it should be fine by changing atomic_add() to atomic_or(). Note that the previous use of atomic_add() isn't wrong as only one writer that is the wait_lock owner can set the waiting flag and the flag will be cleared later on when acquiring the write lock. Suggested-by: Linus Torvalds Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Acked-by: Will Deacon Link: https://lkml.kernel.org/r/20210426185017.19815-1-longman@redhat.com commit 1139aeb1c521eb4a050920ce6c64c36c4f2a3ab7 Author: Arnd Bergmann Date: Wed May 5 23:12:42 2021 +0200 smp: Fix smp_call_function_single_async prototype As of commit 966a967116e6 ("smp: Avoid using two cache lines for struct call_single_data"), the smp code prefers 32-byte aligned call_single_data objects for performance reasons, but the block layer includes an instance of this structure in the main 'struct request' that is more senstive to size than to performance here, see 4ccafe032005 ("block: unalign call_single_data in struct request"). The result is a violation of the calling conventions that clang correctly points out: block/blk-mq.c:630:39: warning: passing 8-byte aligned argument to 32-byte aligned parameter 2 of 'smp_call_function_single_async' may result in an unaligned pointer access [-Walign-mismatch] smp_call_function_single_async(cpu, &rq->csd); It does seem that the usage of the call_single_data without cache line alignment should still be allowed by the smp code, so just change the function prototype so it accepts both, but leave the default alignment unchanged for the other users. This seems better to me than adding a local hack to shut up an otherwise correct warning in the caller. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Acked-by: Jens Axboe Link: https://lkml.kernel.org/r/20210505211300.3174456-1-arnd@kernel.org commit e10de314287c2c14b0e6f0e3e961975ce2f4a83d Author: Suravee Suthikulpanit Date: Tue May 4 01:52:36 2021 -0500 x86/events/amd/iommu: Fix invalid Perf result due to IOMMU PMC power-gating On certain AMD platforms, when the IOMMU performance counter source (csource) field is zero, power-gating for the counter is enabled, which prevents write access and returns zero for read access. This can cause invalid perf result especially when event multiplexing is needed (i.e. more number of events than available counters) since the current logic keeps track of the previously read counter value, and subsequently re-program the counter to continue counting the event. With power-gating enabled, we cannot gurantee successful re-programming of the counter. Workaround this issue by : 1. Modifying the ordering of setting/reading counters and enabing/ disabling csources to only access the counter when the csource is set to non-zero. 2. Since AMD IOMMU PMU does not support interrupt mode, the logic can be simplified to always start counting with value zero, and accumulate the counter value when stopping without the need to keep track and reprogram the counter with the previously read counter value. This has been tested on systems with and without power-gating. Fixes: 994d6608efe4 ("iommu/amd: Remove performance counter pre-initialization test") Suggested-by: Alexander Monakov Signed-off-by: Suravee Suthikulpanit Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210504065236.4415-1-suravee.suthikulpanit@amd.com commit 0258bdfaff5bd13c4d2383150b7097aecd6b6d82 Author: Odin Ugedal Date: Sat May 1 16:19:50 2021 +0200 sched/fair: Fix unfairness caused by missing load decay This fixes an issue where old load on a cfs_rq is not properly decayed, resulting in strange behavior where fairness can decrease drastically. Real workloads with equally weighted control groups have ended up getting a respective 99% and 1%(!!) of cpu time. When an idle task is attached to a cfs_rq by attaching a pid to a cgroup, the old load of the task is attached to the new cfs_rq and sched_entity by attach_entity_cfs_rq. If the task is then moved to another cpu (and therefore cfs_rq) before being enqueued/woken up, the load will be moved to cfs_rq->removed from the sched_entity. Such a move will happen when enforcing a cpuset on the task (eg. via a cgroup) that force it to move. The load will however not be removed from the task_group itself, making it look like there is a constant load on that cfs_rq. This causes the vruntime of tasks on other sibling cfs_rq's to increase faster than they are supposed to; causing severe fairness issues. If no other task is started on the given cfs_rq, and due to the cpuset it would not happen, this load would never be properly unloaded. With this patch the load will be properly removed inside update_blocked_averages. This also applies to tasks moved to the fair scheduling class and moved to another cpu, and this path will also fix that. For fork, the entity is queued right away, so this problem does not affect that. This applies to cases where the new process is the first in the cfs_rq, issue introduced 3d30544f0212 ("sched/fair: Apply more PELT fixes"), and when there has previously been load on the cgroup but the cgroup was removed from the leaflist due to having null PELT load, indroduced in 039ae8bcf7a5 ("sched/fair: Fix O(nr_cgroups) in the load balancing path"). For a simple cgroup hierarchy (as seen below) with two equally weighted groups, that in theory should get 50/50 of cpu time each, it often leads to a load of 60/40 or 70/30. parent/ cg-1/ cpu.weight: 100 cpuset.cpus: 1 cg-2/ cpu.weight: 100 cpuset.cpus: 1 If the hierarchy is deeper (as seen below), while keeping cg-1 and cg-2 equally weighted, they should still get a 50/50 balance of cpu time. This however sometimes results in a balance of 10/90 or 1/99(!!) between the task groups. $ ps u -C stress USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 18568 1.1 0.0 3684 100 pts/12 R+ 13:36 0:00 stress --cpu 1 root 18580 99.3 0.0 3684 100 pts/12 R+ 13:36 0:09 stress --cpu 1 parent/ cg-1/ cpu.weight: 100 sub-group/ cpu.weight: 1 cpuset.cpus: 1 cg-2/ cpu.weight: 100 sub-group/ cpu.weight: 10000 cpuset.cpus: 1 This can be reproduced by attaching an idle process to a cgroup and moving it to a given cpuset before it wakes up. The issue is evident in many (if not most) container runtimes, and has been reproduced with both crun and runc (and therefore docker and all its "derivatives"), and with both cgroup v1 and v2. Fixes: 3d30544f0212 ("sched/fair: Apply more PELT fixes") Fixes: 039ae8bcf7a5 ("sched/fair: Fix O(nr_cgroups) in the load balancing path") Signed-off-by: Odin Ugedal Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210501141950.23622-2-odin@uged.al commit 6d2f8909a5fabb73fe2a63918117943986c39b6c Author: Quentin Perret Date: Fri Apr 30 15:14:12 2021 +0000 sched: Fix out-of-bound access in uclamp Util-clamp places tasks in different buckets based on their clamp values for performance reasons. However, the size of buckets is currently computed using a rounding division, which can lead to an off-by-one error in some configurations. For instance, with 20 buckets, the bucket size will be 1024/20=51. A task with a clamp of 1024 will be mapped to bucket id 1024/51=20. Sadly, correct indexes are in range [0,19], hence leading to an out of bound memory access. Clamp the bucket id to fix the issue. Fixes: 69842cba9ace ("sched/uclamp: Add CPU's clamp buckets refcounting") Suggested-by: Qais Yousef Signed-off-by: Quentin Perret Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Reviewed-by: Dietmar Eggemann Link: https://lkml.kernel.org/r/20210430151412.160913-1-qperret@google.com commit d583d360a620e6229422b3455d0be082b8255f5e Author: Johannes Weiner Date: Mon May 3 13:49:17 2021 -0400 psi: Fix psi state corruption when schedule() races with cgroup move 4117cebf1a9f ("psi: Optimize task switch inside shared cgroups") introduced a race condition that corrupts internal psi state. This manifests as kernel warnings, sometimes followed by bogusly high IO pressure: psi: task underflow! cpu=1 t=2 tasks=[0 0 0 0] clear=c set=0 (schedule() decreasing RUNNING and ONCPU, both of which are 0) psi: incosistent task state! task=2412744:systemd cpu=17 psi_flags=e clear=3 set=0 (cgroup_move_task() clearing MEMSTALL and IOWAIT, but task is MEMSTALL | RUNNING | ONCPU) What the offending commit does is batch the two psi callbacks in schedule() to reduce the number of cgroup tree updates. When prev is deactivated and removed from the runqueue, nothing is done in psi at first; when the task switch completes, TSK_RUNNING and TSK_IOWAIT are updated along with TSK_ONCPU. However, the deactivation and the task switch inside schedule() aren't atomic: pick_next_task() may drop the rq lock for load balancing. When this happens, cgroup_move_task() can run after the task has been physically dequeued, but the psi updates are still pending. Since it looks at the task's scheduler state, it doesn't move everything to the new cgroup that the task switch that follows is about to clear from it. cgroup_move_task() will leak the TSK_RUNNING count in the old cgroup, and psi_sched_switch() will underflow it in the new cgroup. A similar thing can happen for iowait. TSK_IOWAIT is usually set when a p->in_iowait task is dequeued, but again this update is deferred to the switch. cgroup_move_task() can see an unqueued p->in_iowait task and move a non-existent TSK_IOWAIT. This results in the inconsistent task state warning, as well as a counter underflow that will result in permanent IO ghost pressure being reported. Fix this bug by making cgroup_move_task() use task->psi_flags instead of looking at the potentially mismatching scheduler state. [ We used the scheduler state historically in order to not rely on task->psi_flags for anything but debugging. But that ship has sailed anyway, and this is simpler and more robust. We previously already batched TSK_ONCPU clearing with the TSK_RUNNING update inside the deactivation call from schedule(). But that ordering was safe and didn't result in TSK_ONCPU corruption: unlike most places in the scheduler, cgroup_move_task() only checked task_current() and handled TSK_ONCPU if the task was still queued. ] Fixes: 4117cebf1a9f ("psi: Optimize task switch inside shared cgroups") Signed-off-by: Johannes Weiner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210503174917.38579-1-hannes@cmpxchg.org commit 19987fdad506515a92b3c430076cbdb329a11aee Author: Barry Song Date: Tue May 4 22:53:43 2021 +1200 sched,doc: sched_debug_verbose cmdline should be sched_verbose The cmdline should include sched_verbose but not sched_debug_verbose as sched_debug_verbose is only the variant name in code. Fixes: 9406415f46 ("sched/debug: Rename the sched_debug parameter to sched_verbose") Signed-off-by: Barry Song Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210504105344.31344-1-song.bao.hua@hisilicon.com commit c76fba33467b96b8234a1bbef852cd257c0dca69 Author: Shaokun Zhang Date: Thu May 6 13:54:22 2021 +0800 arm64: kernel: Update the stale comment Commit af391b15f7b5 ("arm64: kernel: rename __cpu_suspend to keep it aligned with arm") has used @index instead of @arg, but the comment is stale, update it. Cc: Sudeep Holla Cc: Will Deacon Signed-off-by: Shaokun Zhang Reviewed-by: Sudeep Holla Link: https://lore.kernel.org/r/1620280462-21937-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Catalin Marinas commit f48652bbe3ae62ba2835a396b7e01f063e51c4cd Author: Hui Wang Date: Tue May 4 15:39:17 2021 +0800 ALSA: hda: generic: change the DAC ctl name for LO+SPK or LO+HP Without this change, the DAC ctl's name could be changed only when the machine has both Speaker and Headphone, but we met some machines which only has Lineout and Headhpone, and the Lineout and Headphone share the Audio Mixer0 and DAC0, the ctl's name is set to "Front". On most of machines, the "Front" is used for Speaker only or Lineout only, but on this machine it is shared by Lineout and Headphone, This introduces an issue in the pipewire and pulseaudio, suppose users want the Headphone to be on and the Speaker/Lineout to be off, they could turn off the "Front", this works on most of the machines, but on this machine, the "Front" couldn't be turned off otherwise the headphone will be off too. Here we do some change to let the ctl's name change to "Headphone+LO" on this machine, and pipewire and pulseaudio already could handle "Headphone+LO" and "Speaker+LO". (https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/747) BugLink: http://bugs.launchpad.net/bugs/804178 Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20210504073917.22406-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit e04b2cfe61072c7966e1a5fb73dd1feb30c206ed Author: Marc Kleine-Budde Date: Wed May 5 13:32:27 2021 +0200 can: m_can: m_can_tx_work_queue(): fix tx_skb race condition The m_can_start_xmit() function checks if the cdev->tx_skb is NULL and returns with NETDEV_TX_BUSY in case tx_sbk is not NULL. There is a race condition in the m_can_tx_work_queue(), where first the skb is send to the driver and then the case tx_sbk is set to NULL. A TX complete IRQ might come in between and wake the queue, which results in tx_skb not being cleared yet. Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework") Tested-by: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde commit 03c427147b2d3e503af258711af4fc792b89b0af Author: Frieder Schrempf Date: Wed May 5 09:14:15 2021 +0200 can: mcp251x: fix resume from sleep before interface was brought up Since 8ce8c0abcba3 the driver queues work via priv->restart_work when resuming after suspend, even when the interface was not previously enabled. This causes a null dereference error as the workqueue is only allocated and initialized in mcp251x_open(). To fix this we move the workqueue init to mcp251x_can_probe() as there is no reason to do it later and repeat it whenever mcp251x_open() is called. Fixes: 8ce8c0abcba3 ("can: mcp251x: only reset hardware as required") Link: https://lore.kernel.org/r/17d5d714-b468-482f-f37a-482e3d6df84e@kontron.de Signed-off-by: Frieder Schrempf Reviewed-by: Andy Shevchenko [mkl: fix error handling in mcp251x_stop()] Signed-off-by: Marc Kleine-Budde commit 4376ea42db8bfcac2bc3a30bba93917244a8c2d4 Author: Marc Kleine-Budde Date: Sun May 2 11:34:34 2021 +0200 can: mcp251xfd: mcp251xfd_probe(): add missing can_rx_offload_del() in error path This patch adds the missing can_rx_offload_del(), that must be called if mcp251xfd_register() fails. Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN") Link: https://lore.kernel.org/r/20210504091838.1109047-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 4cc7faa406975b460aa674606291dea197c1210c Author: Dan Carpenter Date: Mon May 3 17:49:09 2021 +0300 can: mcp251xfd: mcp251xfd_probe(): fix an error pointer dereference in probe When we converted this code to use dev_err_probe() we accidentally removed a return. It means that if devm_clk_get() it will lead to an Oops when we call clk_get_rate() on the next line. Fixes: cf8ee6de2543 ("can: mcp251xfd: mcp251xfd_probe(): use dev_err_probe() to simplify error handling") Link: https://lore.kernel.org/r/YJANZf13Qxd5Mhr1@mwanda Signed-off-by: Dan Carpenter Reviewed-by: Manivannan Sadhasivam Signed-off-by: Marc Kleine-Budde commit 234055fd9728e6726787bc63b24b6450034876cf Author: Bas Nieuwenhuizen Date: Tue May 4 11:43:34 2021 +0200 drm/amdgpu: Use device specific BO size & stride check. The builtin size check isn't really the right thing for AMD modifiers due to a couple of reasons: 1) In the format structs we don't do set any of the tilesize / blocks etc. to avoid having format arrays per modifier/GPU 2) The pitch on the main plane is pixel_pitch * bytes_per_pixel even for tiled ... 3) The pitch for the DCC planes is really the pixel pitch of the main surface that would be covered by it ... Note that we only handle GFX9+ case but we do this after converting the implicit modifier to an explicit modifier, so on GFX9+ all framebuffers should be checked here. There is a TODO about DCC alignment, but it isn't worse than before and I'd need to dig a bunch into the specifics. Getting this out in a reasonable timeframe to make sure it gets the appropriate testing seemed more important. Finally as I've found that debugging addfb2 failures is a pita I was generous adding explicit error messages to every failure case. Fixes: f258907fdd83 ("drm/amdgpu: Verify bo size can fit framebuffer size on init.") Tested-by: Simon Ser Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit 8bf073ca9235fe38d7b74a0b4e779cfa7cc70fc9 Author: Bas Nieuwenhuizen Date: Wed May 5 03:27:49 2021 +0200 drm/amdgpu: Init GFX10_ADDR_CONFIG for VCN v3 in DPG mode. Otherwise tiling modes that require the values form this field (In particular _*_X) would be corrupted upon video decode. Copied from the VCN v2 code. Fixes: 99541f392b4d ("drm/amdgpu: add mc resume DPG mode for VCN3.0") Reviewed-and-Tested by: Leo Liu Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 50b7b6f29de3e18e9d6c09641256a0296361cfee Author: Stefan Metzmacher Date: Wed May 5 13:03:10 2021 +0200 x86/process: setup io_threads more like normal user space threads As io_threads are fully set up USER threads it's clearer to separate the code path from the KTHREAD logic. The only remaining difference to user space threads is that io_threads never return to user space again. Instead they loop within the given worker function. The fact that they never return to user space means they don't have an user space thread stack. In order to indicate that to tools like gdb we reset the stack and instruction pointers to 0. This allows gdb attach to user space processes using io-uring, which like means that they have io_threads, without printing worrying message like this: warning: Selected architecture i386:x86-64 is not compatible with reported target architecture i386 warning: Architecture rejected target-supplied description The output will be something like this: (gdb) info threads Id Target Id Frame * 1 LWP 4863 "io_uring-cp-for" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38 2 LWP 4864 "iou-mgr-4863" 0x0000000000000000 in ?? () 3 LWP 4865 "iou-wrk-4863" 0x0000000000000000 in ?? () (gdb) thread 3 [Switching to thread 3 (LWP 4865)] #0 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () Backtrace stopped: Cannot access memory at address 0x0 Fixes: 4727dc20e042 ("arch: setup PF_IO_WORKER threads like PF_KTHREAD") Link: https://lore.kernel.org/io-uring/044d0bad-6888-a211-e1d3-159a4aeed52d@polymtl.ca/T/#m1bbf5727e3d4e839603f6ec7ed79c7eebfba6267 Signed-off-by: Stefan Metzmacher cc: Linus Torvalds cc: Jens Axboe cc: Andy Lutomirski cc: linux-kernel@vger.kernel.org cc: io-uring@vger.kernel.org cc: x86@kernel.org Link: https://lore.kernel.org/r/20210505110310.237537-1-metze@samba.org Reviewed-by: Thomas Gleixner Signed-off-by: Jens Axboe commit 85dfd816fabfc16e71786eda0a33a7046688b5b0 Author: Pablo Neira Ayuso Date: Wed May 5 23:06:43 2021 +0200 netfilter: nftables: Fix a memleak from userdata error path in new objects Release object name if userdata allocation fails. Fixes: b131c96496b3 ("netfilter: nf_tables: add userdata support for nft_object") Signed-off-by: Pablo Neira Ayuso commit 198ad973839ca4686f3575155ba9ff178289905f Author: Pablo Neira Ayuso Date: Wed May 5 22:30:49 2021 +0200 netfilter: remove BUG_ON() after skb_header_pointer() Several conntrack helpers and the TCP tracker assume that skb_header_pointer() never fails based on upfront header validation. Even if this should not ever happen, BUG_ON() is a too drastic measure, remove them. Signed-off-by: Pablo Neira Ayuso commit a5e7da1494e191c561ecce8829a6c19449585e3d Author: Lukas Bulwahn Date: Wed May 5 07:37:28 2021 +0200 MAINTAINERS: add io_uring tool to IO_URING The files in ./tools/io_uring/ are maintained by the IO_URING maintainers. Reflect that fact in MAINTAINERS. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20210505053728.3868-1-lukas.bulwahn@gmail.com Signed-off-by: Jens Axboe commit d1f82808877bb10d3deee7cf3374a4eb3fb582db Author: Thadeu Lima de Souza Cascardo Date: Wed May 5 09:47:06 2021 -0300 io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped length. Also, take the chance and change struct io_buffer len member to __u32, so it matches struct io_provide_buffer len member. This fixes CVE-2021-3491, also reported as ZDI-CAN-13546. Fixes: ddf0322db79c ("io_uring: add IORING_OP_PROVIDE_BUFFERS") Reported-by: Billy Jheng Bing-Jhong (@st424204) Signed-off-by: Thadeu Lima de Souza Cascardo Signed-off-by: Jens Axboe commit bc908e091b3264672889162733020048901021fb Author: Sean Christopherson Date: Tue May 4 17:27:35 2021 -0700 KVM: x86: Consolidate guest enter/exit logic to common helpers Move the enter/exit logic in {svm,vmx}_vcpu_enter_exit() to common helpers. Opportunistically update the somewhat stale comment about the updates needing to occur immediately after VM-Exit. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210505002735.1684165-9-seanjc@google.com commit 1ca0016c149be35fe19a6b75fce95c25807b7159 Author: Sean Christopherson Date: Tue May 4 17:27:34 2021 -0700 context_tracking: KVM: Move guest enter/exit wrappers to KVM's domain Move the guest enter/exit wrappers to kvm_host.h so that KVM can manage its context tracking vs. vtime accounting without bleeding too many KVM details into the context tracking code. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210505002735.1684165-8-seanjc@google.com commit 14296e0c447885d6c7b326e059fb528eb00526ed Author: Sean Christopherson Date: Tue May 4 17:27:33 2021 -0700 context_tracking: Consolidate guest enter/exit wrappers Consolidate the guest enter/exit wrappers, providing and tweaking stubs as needed. This will allow moving the wrappers under KVM without having to bleed #ifdefs into the soon-to-be KVM code. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210505002735.1684165-7-seanjc@google.com commit 6f922b89e5518143920b10e3643e556d9df58d94 Author: Sean Christopherson Date: Tue May 4 17:27:32 2021 -0700 sched/vtime: Move guest enter/exit vtime accounting to vtime.h Provide separate helpers for guest enter vtime accounting (in addition to the existing guest exit helpers), and move all vtime accounting helpers to vtime.h where the existing #ifdef infrastructure can be leveraged to better delineate the different types of accounting. This will also allow future cleanups via deduplication of context tracking code. Opportunstically delete the vtime_account_kernel() stub now that all callers are wrapped with CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210505002735.1684165-6-seanjc@google.com commit b41c723b203e19480c26f2ec8f04eedc03d34b34 Author: Sean Christopherson Date: Tue May 4 17:27:31 2021 -0700 sched/vtime: Move vtime accounting external declarations above inlines Move the blob of external declarations (and their stubs) above the set of inline definitions (and their stubs) for vtime accounting. This will allow a future patch to bring in more inline definitions without also having to shuffle large chunks of code. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Reviewed-by: Christian Borntraeger Link: https://lore.kernel.org/r/20210505002735.1684165-5-seanjc@google.com commit 160457140187c5fb127b844e5a85f87f00a01b14 Author: Wanpeng Li Date: Tue May 4 17:27:30 2021 -0700 KVM: x86: Defer vtime accounting 'til after IRQ handling Defer the call to account guest time until after servicing any IRQ(s) that happened in the guest or immediately after VM-Exit. Tick-based accounting of vCPU time relies on PF_VCPU being set when the tick IRQ handler runs, and IRQs are blocked throughout the main sequence of vcpu_enter_guest(), including the call into vendor code to actually enter and exit the guest. This fixes a bug where reported guest time remains '0', even when running an infinite loop in the guest: https://bugzilla.kernel.org/show_bug.cgi?id=209831 Fixes: 87fa7f3e98a131 ("x86/kvm: Move context tracking where it belongs") Suggested-by: Thomas Gleixner Co-developed-by: Sean Christopherson Signed-off-by: Wanpeng Li Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210505002735.1684165-4-seanjc@google.com commit 88d8220bbf06dd8045b2ac4be1046290eaa7773a Author: Wanpeng Li Date: Tue May 4 17:27:29 2021 -0700 context_tracking: Move guest exit vtime accounting to separate helpers Provide separate vtime accounting functions for guest exit instead of open coding the logic within the context tracking code. This will allow KVM x86 to handle vtime accounting slightly differently when using tick-based accounting. Suggested-by: Thomas Gleixner Signed-off-by: Wanpeng Li Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Reviewed-by: Christian Borntraeger Link: https://lore.kernel.org/r/20210505002735.1684165-3-seanjc@google.com commit 866a6dadbb027b2955a7ae00bab9705d382def12 Author: Wanpeng Li Date: Tue May 4 17:27:28 2021 -0700 context_tracking: Move guest exit context tracking to separate helpers Provide separate context tracking helpers for guest exit, the standalone helpers will be called separately by KVM x86 in later patches to fix tick-based accounting. Suggested-by: Thomas Gleixner Signed-off-by: Wanpeng Li Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210505002735.1684165-2-seanjc@google.com commit a217a6593cec8b315d4c2f344bae33660b39b703 Author: Lai Jiangshan Date: Tue May 4 21:50:14 2021 +0200 KVM/VMX: Invoke NMI non-IST entry instead of IST entry In VMX, the host NMI handler needs to be invoked after NMI VM-Exit. Before commit 1a5488ef0dcf6 ("KVM: VMX: Invoke NMI handler via indirect call instead of INTn"), this was done by INTn ("int $2"). But INTn microcode is relatively expensive, so the commit reworked NMI VM-Exit handling to invoke the kernel handler by function call. But this missed a detail. The NMI entry point for direct invocation is fetched from the IDT table and called on the kernel stack. But on 64-bit the NMI entry installed in the IDT expects to be invoked on the IST stack. It relies on the "NMI executing" variable on the IST stack to work correctly, which is at a fixed position in the IST stack. When the entry point is unexpectedly called on the kernel stack, the RSP-addressed "NMI executing" variable is obviously also on the kernel stack and is "uninitialized" and can cause the NMI entry code to run in the wrong way. Provide a non-ist entry point for VMX which shares the C-function with the regular NMI entry and invoke the new asm entry point instead. On 32-bit this just maps to the regular NMI entry point as 32-bit has no ISTs and is not affected. [ tglx: Made it independent for backporting, massaged changelog ] Fixes: 1a5488ef0dcf6 ("KVM: VMX: Invoke NMI handler via indirect call instead of INTn") Signed-off-by: Lai Jiangshan Signed-off-by: Thomas Gleixner Tested-by: Lai Jiangshan Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/87r1imi8i1.ffs@nanos.tec.linutronix.de commit 8404c9fbc84b741f66cff7d4934a25dd2c344452 Merge: a79cdfba68a13 36f0b35d08945 Author: Linus Torvalds Date: Wed May 5 13:50:15 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: "The remainder of the main mm/ queue. 143 patches. Subsystems affected by this patch series (all mm): pagecache, hugetlb, userfaultfd, vmscan, compaction, migration, cma, ksm, vmstat, mmap, kconfig, util, memory-hotplug, zswap, zsmalloc, highmem, cleanups, and kfence" * emailed patches from Andrew Morton : (143 commits) kfence: use power-efficient work queue to run delayed work kfence: maximize allocation wait timeout duration kfence: await for allocation using wait_event kfence: zero guard page after out-of-bounds access mm/process_vm_access.c: remove duplicate include mm/mempool: minor coding style tweaks mm/highmem.c: fix coding style issue btrfs: use memzero_page() instead of open coded kmap pattern iov_iter: lift memzero_page() to highmem.h mm/zsmalloc: use BUG_ON instead of if condition followed by BUG. mm/zswap.c: switch from strlcpy to strscpy arm64/Kconfig: introduce ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE x86/Kconfig: introduce ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE mm,memory_hotplug: add kernel boot option to enable memmap_on_memory acpi,memhotplug: enable MHP_MEMMAP_ON_MEMORY when supported mm,memory_hotplug: allocate memmap from the added memory range mm,memory_hotplug: factor out adjusting present pages into adjust_present_page_count() mm,memory_hotplug: relax fully spanned sections check drivers/base/memory: introduce memory_block_{online,offline} mm/memory_hotplug: remove broken locking of zone PCP structures during hot remove ... commit a79cdfba68a13b731004f0aafe1155a83830d472 Merge: 7c9e41e0ef7d4 b9f83ffaa0c09 Author: Linus Torvalds Date: Wed May 5 13:44:19 2021 -0700 Merge tag 'nfsd-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull more nfsd updates from Chuck Lever: "Additional fixes and clean-ups for NFSD since tags/nfsd-5.13, including a fix to grant read delegations for files open for writing" * tag 'nfsd-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: SUNRPC: Fix null pointer dereference in svc_rqst_free() SUNRPC: fix ternary sign expansion bug in tracing nfsd: Fix fall-through warnings for Clang nfsd: grant read delegations to clients holding writes nfsd: reshuffle some code nfsd: track filehandle aliasing in nfs4_files nfsd: hash nfs4_files by inode number nfsd: ensure new clients break delegations nfsd: removed unused argument in nfsd_startup_generic() nfsd: remove unused function svcrdma: Pass a useful error code to the send_err tracepoint svcrdma: Rename goto labels in svc_rdma_sendto() svcrdma: Don't leak send_ctxt on Send errors commit 7c9e41e0ef7d44a0818a3beec30634f3f588a23d Merge: 16bb86b5569cb bae4c0c1c2d57 Author: Linus Torvalds Date: Wed May 5 13:37:07 2021 -0700 Merge tag '5.13-rc-smb3-part2' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "Ten CIFS/SMB3 changes - including two marked for stable - including some important multichannel fixes, as well as support for handle leases (deferred close) and shutdown support: - some important multichannel fixes - support for handle leases (deferred close) - shutdown support (which is also helpful since it enables multiple xfstests) - enable negotiating stronger encryption by default (GCM256) - improve wireshark debugging by allowing more options for root to dump decryption keys SambaXP and the SMB3 Plugfest test event are going on now so I am expecting more patches over the next few days due to extra testing (including more multichannel fixes)" * tag '5.13-rc-smb3-part2' of git://git.samba.org/sfrench/cifs-2.6: fs/cifs: Fix resource leak Cifs: Fix kernel oops caused by deferred close for files. cifs: fix regression when mounting shares with prefix paths cifs: use echo_interval even when connection not ready. cifs: detect dead connections only when echoes are enabled. smb3.1.1: allow dumping keys for multiuser mounts smb3.1.1: allow dumping GCM256 keys to improve debugging of encrypted shares cifs: add shutdown support cifs: Deferred close for files smb3.1.1: enable negotiating stronger encryption by default commit 16bb86b5569cb7489367101f6ed69b25682b47db Merge: 57151b502cbc0 d7bce85aa7b92 Author: Linus Torvalds Date: Wed May 5 13:31:39 2021 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "A bunch of new drivers including vdpa support for block and virtio-vdpa. Beginning of vq kick (aka doorbell) mapping support. Misc fixes" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (40 commits) virtio_pci_modern: correct sparse tags for notify virtio_pci_modern: __force cast the notify mapping vDPA/ifcvf: get_config_size should return dev specific config size vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA vDPA/ifcvf: deduce VIRTIO device ID when probe vdpa_sim_blk: add support for vdpa management tool vdpa_sim_blk: handle VIRTIO_BLK_T_GET_ID vdpa_sim_blk: implement ramdisk behaviour vdpa: add vdpa simulator for block device vhost/vdpa: Remove the restriction that only supports virtio-net devices vhost/vdpa: use get_config_size callback in vhost_vdpa_config_validate() vdpa: add get_config_size callback in vdpa_config_ops vdpa_sim: cleanup kiovs in vdpasim_free() vringh: add vringh_kiov_length() helper vringh: implement vringh_kiov_advance() vringh: explain more about cleaning riov and wiov vringh: reset kiov 'consumed' field in __vringh_iov() vringh: add 'iotlb_lock' to synchronize iotlb accesses vdpa_sim: use iova module to allocate IOVA addresses vDPA/ifcvf: deduce VIRTIO device ID from pdev ids ... commit 5e024c325406470d1165a09c6feaf8ec897936be Author: Pablo Neira Ayuso Date: Wed May 5 22:25:24 2021 +0200 netfilter: nfnetlink_osf: Fix a missing skb_header_pointer() NULL check Do not assume that the tcph->doff field is correct when parsing for TCP options, skb_header_pointer() might fail to fetch these bits. Fixes: 11eeef41d5f6 ("netfilter: passive OS fingerprint xtables match") Signed-off-by: Pablo Neira Ayuso commit 57151b502cbc0fa6ff9074a76883fa9d9eda322e Merge: 7b9df264f0ab6 882862aaacefc Author: Linus Torvalds Date: Wed May 5 13:24:11 2021 -0700 Merge tag 'pci-v5.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull pci updates from Bjorn Helgaas: "Enumeration: - Release OF node when pci_scan_device() fails (Dmitry Baryshkov) - Add pci_disable_parity() (Bjorn Helgaas) - Disable Mellanox Tavor parity reporting (Heiner Kallweit) - Disable N2100 r8169 parity reporting (Heiner Kallweit) - Fix RCiEP device to RCEC association (Qiuxu Zhuo) - Convert sysfs "config", "rom", "reset", "label", "index", "acpi_index" to static attributes to help fix races in device enumeration (Krzysztof Wilczyński) - Convert sysfs "vpd" to static attribute (Heiner Kallweit, Krzysztof Wilczyński) - Use sysfs_emit() in "show" functions (Krzysztof Wilczyński) - Remove unused alloc_pci_root_info() return value (Krzysztof Wilczyński) PCI device hotplug: - Fix acpiphp reference count leak (Feilong Lin) Power management: - Fix acpi_pci_set_power_state() debug message (Rafael J. Wysocki) - Fix runtime PM imbalance (Dinghao Liu) Virtualization: - Increase delay after FLR to work around Intel DC P4510 NVMe erratum (Raphael Norwitz) MSI: - Convert rcar, tegra, xilinx to MSI domains (Marc Zyngier) - For rcar, xilinx, use controller address as MSI doorbell (Marc Zyngier) - Remove unused hv msi_controller struct (Marc Zyngier) - Remove unused PCI core msi_controller support (Marc Zyngier) - Remove struct msi_controller altogether (Marc Zyngier) - Remove unused default_teardown_msi_irqs() (Marc Zyngier) - Let host bridges declare their reliance on MSI domains (Marc Zyngier) - Make pci_host_common_probe() declare its reliance on MSI domains (Marc Zyngier) - Advertise mediatek lack of built-in MSI handling (Thomas Gleixner) - Document ways of ending up with NO_MSI (Marc Zyngier) - Refactor HT advertising of NO_MSI flag (Marc Zyngier) VPD: - Remove obsolete Broadcom NIC VPD length-limiting quirk (Heiner Kallweit) - Remove sysfs VPD size checking dead code (Heiner Kallweit) - Convert VPF sysfs file to static attribute (Heiner Kallweit) - Remove unnecessary pci_set_vpd_size() (Heiner Kallweit) - Tone down "missing VPD" message (Heiner Kallweit) Endpoint framework: - Fix NULL pointer dereference when epc_features not implemented (Shradha Todi) - Add missing destroy_workqueue() in endpoint test (Yang Yingliang) Amazon Annapurna Labs PCIe controller driver: - Fix compile testing without CONFIG_PCI_ECAM (Arnd Bergmann) - Fix "no symbols" warnings when compile testing with CONFIG_TRIM_UNUSED_KSYMS (Arnd Bergmann) APM X-Gene PCIe controller driver: - Fix cfg resource mapping regression (Dejin Zheng) Broadcom iProc PCIe controller driver: - Return zero for success of iproc_msi_irq_domain_alloc() (Pali Rohár) Broadcom STB PCIe controller driver: - Add reset_control_rearm() stub for !CONFIG_RESET_CONTROLLER (Jim Quinlan) - Fix use of BCM7216 reset controller (Jim Quinlan) - Use reset/rearm for Broadcom STB pulse reset instead of deassert/assert (Jim Quinlan) - Fix brcm_pcie_probe() error return for unsupported revision (Wei Yongjun) Cavium ThunderX PCIe controller driver: - Fix compile testing (Arnd Bergmann) - Fix "no symbols" warnings when compile testing with CONFIG_TRIM_UNUSED_KSYMS (Arnd Bergmann) Freescale Layerscape PCIe controller driver: - Fix ls_pcie_ep_probe() syntax error (comma for semicolon) (Krzysztof Wilczyński) - Remove layerscape-gen4 dependencies on OF and ARM64, add dependency on ARCH_LAYERSCAPE (Geert Uytterhoeven) HiSilicon HIP PCIe controller driver: - Remove obsolete HiSilicon PCIe DT description (Dongdong Liu) Intel Gateway PCIe controller driver: - Remove unused pcie_app_rd() (Jiapeng Chong) Intel VMD host bridge driver: - Program IRTE with Requester ID of VMD endpoint, not child device (Jon Derrick) - Disable VMD MSI-X remapping when possible so children can use more MSI-X vectors (Jon Derrick) MediaTek PCIe controller driver: - Configure FC and FTS for functions other than 0 (Ryder Lee) - Add YAML schema for MediaTek (Jianjun Wang) - Export pci_pio_to_address() for module use (Jianjun Wang) - Add MediaTek MT8192 PCIe controller driver (Jianjun Wang) - Add MediaTek MT8192 INTx support (Jianjun Wang) - Add MediaTek MT8192 MSI support (Jianjun Wang) - Add MediaTek MT8192 system power management support (Jianjun Wang) - Add missing MODULE_DEVICE_TABLE (Qiheng Lin) Microchip PolarFlare PCIe controller driver: - Make several symbols static (Wei Yongjun) NVIDIA Tegra PCIe controller driver: - Add MCFG quirks for Tegra194 ECAM errata (Vidya Sagar) - Make several symbols const (Rikard Falkeborn) - Fix Kconfig host/endpoint typo (Wesley Sheng) SiFive FU740 PCIe controller driver: - Add pcie_aux clock to prci driver (Greentime Hu) - Use reset-simple in prci driver for PCIe (Greentime Hu) - Add SiFive FU740 PCIe host controller driver and DT binding (Paul Walmsley, Greentime Hu) Synopsys DesignWare PCIe controller driver: - Move MSI Receiver init to dw_pcie_host_init() so it is re-initialized along with the RC in resume (Jisheng Zhang) - Move iATU detection earlier to fix regression (Hou Zhiqiang) TI J721E PCIe driver: - Add DT binding and TI j721e support for refclk to PCIe connector (Kishon Vijay Abraham I) - Add host mode and endpoint mode DT bindings for TI AM64 SoC (Kishon Vijay Abraham I) TI Keystone PCIe controller driver: - Use generic config accessors for TI AM65x (K3) to fix regression (Kishon Vijay Abraham I) Xilinx NWL PCIe controller driver: - Add support for coherent PCIe DMA traffic using CCI (Bharat Kumar Gogada) - Add optional "dma-coherent" DT property (Bharat Kumar Gogada) Miscellaneous: - Fix kernel-doc warnings (Krzysztof Wilczyński) - Remove unused MicroGate SyncLink device IDs (Jiri Slaby) - Remove redundant dev_err() for devm_ioremap_resource() failure (Chen Hui) - Remove redundant initialization (Colin Ian King) - Drop redundant dev_err() for platform_get_irq() errors (Krzysztof Wilczyński)" * tag 'pci-v5.13-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (98 commits) riscv: dts: Add PCIe support for the SiFive FU740-C000 SoC PCI: fu740: Add SiFive FU740 PCIe host controller driver dt-bindings: PCI: Add SiFive FU740 PCIe host controller MAINTAINERS: Add maintainers for SiFive FU740 PCIe driver clk: sifive: Use reset-simple in prci driver for PCIe driver clk: sifive: Add pcie_aux clock in prci driver for PCIe driver PCI: brcmstb: Use reset/rearm instead of deassert/assert ata: ahci_brcm: Fix use of BCM7216 reset controller reset: add missing empty function reset_control_rearm() PCI: Allow VPD access for QLogic ISP2722 PCI/VPD: Add helper pci_get_func0_dev() PCI/VPD: Remove pci_vpd_find_tag() SRDT handling PCI/VPD: Remove pci_vpd_find_tag() 'offset' argument PCI/VPD: Change pci_vpd_init() return type to void PCI/VPD: Make missing VPD message less alarming PCI/VPD: Remove pci_set_vpd_size() x86/PCI: Remove unused alloc_pci_root_info() return value MAINTAINERS: Add Jianjun Wang as MediaTek PCI co-maintainer PCI: mediatek-gen3: Add system PM support PCI: mediatek-gen3: Add MSI support ... commit 7b9df264f0ab6595eabe367b04c81824a06d9227 Merge: 583f2bcf86a32 a6efb35019d00 Author: Linus Torvalds Date: Wed May 5 12:53:16 2021 -0700 Merge tag 'pwm/for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This adds support for the PWM controller found on Toshiba Visconti SoCs and converts a couple of drivers to the atomic API. There's also a bunch of cleanups and minor fixes across the board" * tag 'pwm/for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (35 commits) pwm: Reword docs about pwm_apply_state() pwm: atmel: Improve duty cycle calculation in .apply() pwm: atmel: Fix duty cycle calculation in .get_state() pwm: visconti: Add Toshiba Visconti SoC PWM support dt-bindings: pwm: Add bindings for Toshiba Visconti PWM Controller arm64: dts: rockchip: Remove clock-names from PWM nodes ARM: dts: rockchip: Remove clock-names from PWM nodes dt-bindings: pwm: rockchip: Add more compatible strings dt-bindings: pwm: Convert pwm-rockchip.txt to YAML pwm: mediatek: Remove unused function pwm: pca9685: Improve runtime PM behavior pwm: pca9685: Support hardware readout pwm: pca9685: Switch to atomic API pwm: lpss: Don't modify HW state in .remove callback pwm: sti: Free resources only after pwmchip_remove() pwm: sti: Don't modify HW state in .remove callback pwm: lpc3200: Don't modify HW state in .remove callback pwm: lpc18xx-sct: Free resources only after pwmchip_remove() pwm: bcm-kona: Don't modify HW state in .remove callback pwm: bcm2835: Free resources only after pwmchip_remove() ... commit 8621436671f3a4bba5db57482e1ee604708bf1eb Author: Cong Wang Date: Wed May 5 12:40:48 2021 -0700 smc: disallow TCP_ULP in smc_setsockopt() syzbot is able to setup kTLS on an SMC socket which coincidentally uses sk_user_data too. Later, kTLS treats it as psock so triggers a refcnt warning. The root cause is that smc_setsockopt() simply calls TCP setsockopt() which includes TCP_ULP. I do not think it makes sense to setup kTLS on top of SMC sockets, so we should just disallow this setup. It is hard to find a commit to blame, but we can apply this patch since the beginning of TCP_ULP. Reported-and-tested-by: syzbot+b54a1ce86ba4a623b7f0@syzkaller.appspotmail.com Fixes: 734942cc4ea6 ("tcp: ULP infrastructure") Cc: John Fastabend Signed-off-by: Karsten Graul Signed-off-by: Cong Wang Signed-off-by: David S. Miller commit fc48a6d1faadbf08b7a840d58a5a6eb85bd1a79a Author: Sean Christopherson Date: Tue May 4 15:56:32 2021 -0700 x86/cpu: Remove write_tsc() and write_rdtscp_aux() wrappers Drop write_tsc() and write_rdtscp_aux(); the former has no users, and the latter has only a single user and is slightly misleading since the only in-kernel consumer of MSR_TSC_AUX is RDPID, not RDTSCP. No functional change intended. Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210504225632.1532621-3-seanjc@google.com commit b6b4fbd90b155a0025223df2c137af8a701d53b3 Author: Sean Christopherson Date: Tue May 4 15:56:31 2021 -0700 x86/cpu: Initialize MSR_TSC_AUX if RDTSCP *or* RDPID is supported Initialize MSR_TSC_AUX with CPU node information if RDTSCP or RDPID is supported. This fixes a bug where vdso_read_cpunode() will read garbage via RDPID if RDPID is supported but RDTSCP is not. While no known CPU supports RDPID but not RDTSCP, both Intel's SDM and AMD's APM allow for RDPID to exist without RDTSCP, e.g. it's technically a legal CPU model for a virtual machine. Note, technically MSR_TSC_AUX could be initialized if and only if RDPID is supported since RDTSCP is currently not used to retrieve the CPU node. But, the cost of the superfluous WRMSR is negigible, whereas leaving MSR_TSC_AUX uninitialized is just asking for future breakage if someone decides to utilize RDTSCP. Fixes: a582c540ac1b ("x86/vdso: Use RDPID in preference to LSL when available") Signed-off-by: Sean Christopherson Signed-off-by: Thomas Gleixner Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210504225632.1532621-2-seanjc@google.com commit 4029b9706d53e5e8db2e1cee6ecd75e60b62cd09 Author: Andi Kleen Date: Sun Apr 25 14:12:29 2021 -0700 x86/resctrl: Fix init const confusion const variable must be initconst, not initdata. Signed-off-by: Andi Kleen Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210425211229.3157674-1-ak@linux.intel.com commit 790d1ce71de9199bf9fd37c4743aec4a09489a51 Author: Alexey Dobriyan Date: Thu Apr 22 21:58:40 2021 +0300 x86: Delete UD0, UD1 traces Both instructions aren't used by kernel. Signed-off-by: Alexey Dobriyan Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/YIHHYNKbiSf5N7+o@localhost.localdomain commit 3cf4524ce40b204418537e6a3a55ed44911b3f53 Author: Wan Jiabing Date: Tue Apr 27 14:38:26 2021 +0800 x86/smpboot: Remove duplicate includes Signed-off-by: Wan Jiabing Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210427063835.9039-1-wanjiabing@vivo.com commit 2c16db6c92b0ee4aa61e88366df82169e83c3f7e Author: Maciej Żenczykowski Date: Wed May 5 09:58:31 2021 -0700 net: fix nla_strcmp to handle more then one trailing null character Android userspace has been using TCA_KIND with a char[IFNAMESIZ] many-null-terminated buffer containing the string 'bpf'. This works on 4.19 and ceases to work on 5.10. I'm not entirely sure what fixes tag to use, but I think the issue was likely introduced in the below mentioned 5.4 commit. Reported-by: Nucca Chen Cc: Cong Wang Cc: David Ahern Cc: David S. Miller Cc: Jakub Kicinski Cc: Jamal Hadi Salim Cc: Jiri Pirko Cc: Jiri Pirko Fixes: 62794fc4fbf5 ("net_sched: add max len check for TCA_KIND") Change-Id: I66dc281f165a2858fc29a44869a270a2d698a82b Signed-off-by: David S. Miller commit 583f2bcf86a322dc0387f5a868026d2e2fe18261 Merge: 5d6a1b84e0760 c310e546164d5 Author: Linus Torvalds Date: Wed May 5 12:46:48 2021 -0700 Merge tag 'thermal-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux Pull thermal updates from Daniel Lezcano: - Remove duplicate error message for the amlogic driver (Tang Bin) - Fix spellos in comments for the tegra and sun8i (Bhaskar Chowdhury) - Add the missing fifth node on the rcar_gen3 sensor (Niklas Söderlund) - Remove duplicate include in ti-bandgap (Zhang Yunkai) - Assign error code in the error path in the function thermal_of_populate_bind_params() (Jia-Ju Bai) - Fix spelling mistake in a comment 'disabed' -> 'disabled' (Colin Ian King) - Use the device name instead of auto-numbering for a better identification of the cooling device (Daniel Lezcano) - Improve a bit the division accuracy in the power allocator governor (Jeson Gao) - Enable the missing third sensor on msm8976 (Konrad Dybcio) - Add QCom tsens driver co-maintainer (Thara Gopinath) - Fix memory leak and use after free errors in the core code (Daniel Lezcano) - Add the MDM9607 compatible bindings (Konrad Dybcio) - Fix trivial spello in the copyright name for Hisilicon (Hao Fang) - Fix negative index array access when converting the frequency to power in the energy model (Brian-sy Yang) - Add support for Gen2 new PMIC support for Qcom SPMI (David Collins) - Update maintainer file for CPU cooling device section (Lukasz Luba) - Fix missing put_device on error in the Qcom tsens driver (Guangqing Zhu) - Add compatible DT binding for sm8350 (Robert Foss) - Add support for the MDM9607's tsens driver (Konrad Dybcio) - Remove duplicate error messages in thermal_mmio and the bcm2835 driver (Ruiqi Gong) - Add the Thermal Temperature Cooling driver (Zhang Rui) - Remove duplicate error messages in the Hisilicon sensor driver (Ye Bin) - Use the devm_platform_ioremap_resource_byname() function instead of a couple of corresponding calls (dingsenjie) - Sort the headers alphabetically in the ti-bandgap driver (Zhen Lei) - Add missing property in the DT thermal sensor binding (Rafał Miłecki) - Remove dead code in the ti-bandgap sensor driver (Lin Ruizhe) - Convert the BRCM DT bindings to the yaml schema (Rafał Miłecki) - Replace the thermal_notify_framework() call by a call to the thermal_zone_device_update() function. Remove the function as well as the corresponding documentation (Thara Gopinath) - Add support for the ipq8064-tsens sensor along with a set of cleanups and code preparation (Ansuel Smith) - Add a lockless __thermal_cdev_update() function to improve the locking scheme in the core code and governors (Lukasz Luba) - Fix multiple cooling device notification changes (Lukasz Luba) - Remove unneeded variable initialization (Colin Ian King) * tag 'thermal-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (55 commits) thermal/drivers/mtk_thermal: Remove redundant initializations of several variables thermal/core/power allocator: Use the lockless __thermal_cdev_update() function thermal/core/fair share: Use the lockless __thermal_cdev_update() function thermal/core/fair share: Lock the thermal zone while looping over instances thermal/core/power_allocator: Update once cooling devices when temp is low thermal/core/power_allocator: Maintain the device statistics from going stale thermal/core: Create a helper __thermal_cdev_update() without a lock dt-bindings: thermal: tsens: Document ipq8064 bindings thermal/drivers/tsens: Add support for ipq8064-tsens thermal/drivers/tsens: Drop unused define for msm8960 thermal/drivers/tsens: Replace custom 8960 apis with generic apis thermal/drivers/tsens: Fix bug in sensor enable for msm8960 thermal/drivers/tsens: Use init_common for msm8960 thermal/drivers/tsens: Add VER_0 tsens version thermal/drivers/tsens: Convert msm8960 to reg_field thermal/drivers/tsens: Don't hardcode sensor slope Documentation: driver-api: thermal: Remove thermal_notify_framework from documentation thermal/core: Remove thermal_notify_framework iwlwifi: mvm: tt: Replace thermal_notify_framework dt-bindings: thermal: brcm,ns-thermal: Convert to the json-schema ... commit 52bfcdd87e83d9e69d22da5f26b1512ffc81deed Author: Íñigo Huguet Date: Wed May 5 14:54:50 2021 +0200 net:CXGB4: fix leak if sk_buff is not used An sk_buff is allocated to send a flow control message, but it's not sent in all cases: in case the state is not appropiate to send it or if it can't be enqueued. In the first of these 2 cases, the sk_buff was discarded but not freed, producing a memory leak. Signed-off-by: Íñigo Huguet Signed-off-by: David S. Miller commit f941d686e602163faca0c90568cca6ead3ca41b3 Author: Sean Gloumeau Date: Wed May 5 00:15:39 2021 -0400 Fix spelling error from "eleminate" to "eliminate" Spelling error "eleminate" amended to "eliminate". Signed-off-by: Sean Gloumeau Reviewed-by: Kieran Bingham Signed-off-by: David S. Miller commit cf754ae331be7cc192b951756a1dd031e9ed978a Author: Fernando Fernandez Mancera Date: Wed May 5 00:47:14 2021 +0200 ethtool: fix missing NLM_F_MULTI flag when dumping When dumping the ethtool information from all the interfaces, the netlink reply should contain the NLM_F_MULTI flag. This flag allows userspace tools to identify that multiple messages are expected. Link: https://bugzilla.redhat.com/1953847 Fixes: 365f9ae4ee36 ("ethtool: fix genlmsg_put() failure handling in ethnl_default_dumpit()") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: David S. Miller commit 5d6a1b84e07607bc282ed2ed8e2f128c73697d5c Merge: 5a5bcd43d5bf9 444952956f34a Author: Linus Torvalds Date: Wed May 5 12:39:29 2021 -0700 Merge tag 'gpio-updates-for-v5.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio updates from Bartosz Golaszewski: - new driver for the Realtek Otto GPIO controller - ACPI support for gpio-mpc8xxx - edge event support for gpio-sch (+ Kconfig fixes) - Kconfig improvements in gpio-ich - fixes to older issues in gpio-mockup - ACPI quirk for ignoring EC wakeups on Dell Venue 10 Pro 5055 - improve the GPIO aggregator code by using more generic interfaces instead of reimplementing them in the driver - convert the DT bindings for gpio-74x164 to yaml - documentation improvements - a slew of other minor fixes and improvements to GPIO drivers * tag 'gpio-updates-for-v5.13-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (34 commits) dt-bindings: gpio: add YAML description for rockchip,gpio-bank gpio: mxs: remove useless function dt-bindings: gpio: fairchild,74hc595: Convert to json-schema gpio: it87: remove unused code gpio: 104-dio-48e: Fix coding style issues gpio: mpc8xxx: Add ACPI support gpio: ich: Switch to be dependent on LPC_ICH gpio: sch: Drop MFD_CORE selection gpio: sch: depends on LPC_SCH gpiolib: acpi: Add quirk to ignore EC wakeups on Dell Venue 10 Pro 5055 gpio: sch: Hook into ACPI GPE handler to catch GPIO edge events gpio: sch: Add edge event support gpio: aggregator: Replace custom get_arg() with a generic next_arg() lib/cmdline: Export next_arg() for being used in modules gpio: omap: Use device_get_match_data() helper gpio: Add Realtek Otto GPIO support dt-bindings: gpio: Binding for Realtek Otto GPIO docs: kernel-parameters: Add gpio_mockup_named_lines docs: kernel-parameters: Move gpio-mockup for alphabetic order lib: bitmap: provide devm_bitmap_alloc() and devm_bitmap_zalloc() ... commit 5a5bcd43d5bf9d553ebbf9bc3425a4e77439fdbe Merge: d8cb379cda885 7b1ae248279be Author: Linus Torvalds Date: Wed May 5 12:29:37 2021 -0700 Merge tag 'char-misc-5.13-rc1-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are two char/misc fixes for 5.13-rc1 to resolve reported issues. The first is a bugfix for the nitro_enclaves driver that fixed some important problems. The second was a dyndbg bugfix that resolved some reported problems in dynamic debugging control. Both have been in linux-next for a while with no reported issues" * tag 'char-misc-5.13-rc1-round2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: dyndbg: fix parsing file query without a line-range suffix nitro_enclaves: Fix stale file descriptors on failed usercopy commit d8cb379cda885ac172454d7e680da65ebd6676b1 Merge: dd8c86c6dd366 3c070b2abf85b Author: Linus Torvalds Date: Wed May 5 12:24:29 2021 -0700 Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux Pull turbostat updates from Len Brown: "Bug fixes and a smattering of features" * 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux: (21 commits) tools/power turbostat: version 2021.05.04 tools/power turbostat: Support "turbostat --hide idle" tools/power turbostat: elevate priority of interval mode tools/power turbostat: formatting tools/power turbostat: rename tcc variables tools/power turbostat: add TCC Offset support tools/power turbostat: save original CPU model tools/power turbostat: Fix Core C6 residency on Atom CPUs tools/power turbostat: Print the C-state Pre-wake settings tools/power turbostat: Enable tsc_tweak for Elkhart Lake and Jasper Lake tools/power turbostat: unmark non-kernel-doc comment tools/power/turbostat: Remove Package C6 Retention on Ice Lake Server tools/power turbostat: Fix offset overflow issue in index converting tools/power/turbostat: Fix turbostat for AMD Zen CPUs tools/power turbostat: update version number tools/power turbostat: Fix DRAM Energy Unit on SKX Revert "tools/power turbostat: adjust for temperature offset" tools/power turbostat: Support Ice Lake D tools/power turbostat: Support Alder Lake Mobile tools/power turbostat: print microcode patch level ... commit dd8c86c6dd366294acad24d7b48601fa101dc86b Merge: d29c9bb0108ee c7ceee6958770 Author: Linus Torvalds Date: Wed May 5 12:15:20 2021 -0700 Merge tag 'ktest-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest Pull ktest updates from Steven Rostedt: - Added a KTEST section in the MAINTAINERS file - Included John Hawley as a co-maintainer - Add an example config that would work with VMware workstation guests - Cleanups to the code * tag 'ktest-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest: ktest: Add KTEST section to MAINTAINERS file ktest: Re-arrange the code blocks for better discoverability ktest: Further consistency cleanups ktest: Fixing indentation to match expected pattern ktest: Adding editor hints to improve consistency ktest: Add example config for using VMware VMs ktest: Minor cleanup with uninitialized variable $build_options commit d29c9bb0108eedfc8f8b46f225f9539190c50d45 Merge: d665ea6ea86c7 1ca86ac1ec8d2 Author: Linus Torvalds Date: Wed May 5 12:08:06 2021 -0700 Merge tag 'safesetid-5.13' of git://github.com/micah-morton/linux Pull SafeSetID update from Micah Morton: "Simple code cleanup This just has a single three-line code cleanup to eliminate some unnecessary 'break' statements" * tag 'safesetid-5.13' of git://github.com/micah-morton/linux: LSM: SafeSetID: Fix code specification by scripts/checkpatch.pl commit 9683e5775c75097c46bd24e65411b16ac6c6cbb3 Author: Ian Rogers Date: Tue May 4 16:49:10 2021 -0700 libbpf: Add NULL check to add_dummy_ksym_var Avoids a segv if btf isn't present. Seen on the call path __bpf_object__open calling bpf_object__collect_externs. Fixes: 5bd022ec01f0 (libbpf: Support extern kernel function) Suggested-by: Stanislav Fomichev Suggested-by: Petar Penkov Signed-off-by: Ian Rogers Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210504234910.976501-1-irogers@google.com commit 36f0b35d0894576fe63268ede80d9f5aa140be09 Author: Marco Elver Date: Tue May 4 18:40:27 2021 -0700 kfence: use power-efficient work queue to run delayed work Use the power-efficient work queue, to avoid the pathological case where we keep pinning ourselves on the same possibly idle CPU on systems that want to be power-efficient (https://lwn.net/Articles/731052/). Link: https://lkml.kernel.org/r/20210421105132.3965998-4-elver@google.com Signed-off-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Hillf Danton Cc: Jann Horn Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 37c9284f6932b915043717703d6496dfd59c85f5 Author: Marco Elver Date: Tue May 4 18:40:24 2021 -0700 kfence: maximize allocation wait timeout duration The allocation wait timeout was initially added because of warnings due to CONFIG_DETECT_HUNG_TASK=y [1]. While the 1 sec timeout is sufficient to resolve the warnings (given the hung task timeout must be 1 sec or larger) it may cause unnecessary wake-ups if the system is idle: https://lkml.kernel.org/r/CADYN=9J0DQhizAGB0-jz4HOBBh+05kMBXb4c0cXMS7Qi5NAJiw@mail.gmail.com Fix it by computing the timeout duration in terms of the current sysctl_hung_task_timeout_secs value. Link: https://lkml.kernel.org/r/20210421105132.3965998-3-elver@google.com Signed-off-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Hillf Danton Cc: Jann Horn Cc: Mark Rutland Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 407f1d8c1b5f3ec66a6a3eb835d3b81c76440f4e Author: Marco Elver Date: Tue May 4 18:40:21 2021 -0700 kfence: await for allocation using wait_event Patch series "kfence: optimize timer scheduling", v2. We have observed that mostly-idle systems with KFENCE enabled wake up otherwise idle CPUs, preventing such to enter a lower power state. Debugging revealed that KFENCE spends too much active time in toggle_allocation_gate(). While the first version of KFENCE was using all the right bits to be scheduling optimal, and thus power efficient, by simply using wait_event() + wake_up(), that code was unfortunately removed. As KFENCE was exposed to various different configs and tests, the scheduling optimal code slowly disappeared. First because of hung task warnings, and finally because of deadlocks when an allocation is made by timer code with debug objects enabled. Clearly, the "fixes" were not too friendly for devices that want to be power efficient. Therefore, let's try a little harder to fix the hung task and deadlock problems that we have with wait_event() + wake_up(), while remaining as scheduling friendly and power efficient as possible. Crucially, we need to defer the wake_up() to an irq_work, avoiding any potential for deadlock. The result with this series is that on the devices where we observed a power regression, power usage returns back to baseline levels. This patch (of 3): On mostly-idle systems, we have observed that toggle_allocation_gate() is a cause of frequent wake-ups, preventing an otherwise idle CPU to go into a lower power state. A late change in KFENCE's development, due to a potential deadlock [1], required changing the scheduling-friendly wait_event_timeout() and wake_up() to an open-coded wait-loop using schedule_timeout(). [1] https://lkml.kernel.org/r/000000000000c0645805b7f982e4@google.com To avoid unnecessary wake-ups, switch to using wait_event_timeout(). Unfortunately, we still cannot use a version with direct wake_up() in __kfence_alloc() due to the same potential for deadlock as in [1]. Instead, add a level of indirection via an irq_work that is scheduled if we determine that the kfence_timer requires a wake_up(). Link: https://lkml.kernel.org/r/20210421105132.3965998-1-elver@google.com Link: https://lkml.kernel.org/r/20210421105132.3965998-2-elver@google.com Fixes: 0ce20dd84089 ("mm: add Kernel Electric-Fence infrastructure") Signed-off-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Jann Horn Cc: Mark Rutland Cc: Hillf Danton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 94868a1e127bbe0e03a4467f27196cd668cbc344 Author: Marco Elver Date: Tue May 4 18:40:18 2021 -0700 kfence: zero guard page after out-of-bounds access After an out-of-bounds accesses, zero the guard page before re-protecting in kfence_guarded_free(). On one hand this helps make the failure mode of subsequent out-of-bounds accesses more deterministic, but could also prevent certain information leaks. Link: https://lkml.kernel.org/r/20210312121653.348518-1-elver@google.com Signed-off-by: Marco Elver Acked-by: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Konovalov Cc: Jann Horn Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c4ff27a0e541bcee167612fc9065623d75314a3 Author: Zhang Yunkai Date: Tue May 4 18:40:15 2021 -0700 mm/process_vm_access.c: remove duplicate include 'linux/compat.h' included in 'process_vm_access.c' is duplicated. Link: https://lkml.kernel.org/r/20210306132122.220431-1-zhang.yunkai@zte.com.cn Signed-off-by: Zhang Yunkai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 68d68ff6ebbf69d02511dd48f16b3795671c9b0b Author: Zhiyuan Dai Date: Tue May 4 18:40:12 2021 -0700 mm/mempool: minor coding style tweaks Various coding style tweaks to various files under mm/ [daizhiyuan@phytium.com.cn: mm/swapfile: minor coding style tweaks] Link: https://lkml.kernel.org/r/1614223624-16055-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/sparse: minor coding style tweaks] Link: https://lkml.kernel.org/r/1614227288-19363-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/vmscan: minor coding style tweaks] Link: https://lkml.kernel.org/r/1614227649-19853-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/compaction: minor coding style tweaks] Link: https://lkml.kernel.org/r/1614228218-20770-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/oom_kill: minor coding style tweaks] Link: https://lkml.kernel.org/r/1614228360-21168-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/shmem: minor coding style tweaks] Link: https://lkml.kernel.org/r/1614228504-21491-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/page_alloc: minor coding style tweaks] Link: https://lkml.kernel.org/r/1614228613-21754-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/filemap: minor coding style tweaks] Link: https://lkml.kernel.org/r/1614228936-22337-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/mlock: minor coding style tweaks] Link: https://lkml.kernel.org/r/1613956588-2453-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/frontswap: minor coding style tweaks] Link: https://lkml.kernel.org/r/1613962668-15045-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/vmalloc: minor coding style tweaks] Link: https://lkml.kernel.org/r/1613963379-15988-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/memory_hotplug: minor coding style tweaks] Link: https://lkml.kernel.org/r/1613971784-24878-1-git-send-email-daizhiyuan@phytium.com.cn [daizhiyuan@phytium.com.cn: mm/mempolicy: minor coding style tweaks] Link: https://lkml.kernel.org/r/1613972228-25501-1-git-send-email-daizhiyuan@phytium.com.cn Link: https://lkml.kernel.org/r/1614222374-13805-1-git-send-email-daizhiyuan@phytium.com.cn Signed-off-by: Zhiyuan Dai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9727688dbf7ea9c3e1dc06885c6f3ba281feb1a8 Author: songqiang Date: Tue May 4 18:40:09 2021 -0700 mm/highmem.c: fix coding style issue Delete/add some blank lines and some blank spaces Link: https://lkml.kernel.org/r/20210311095015.14277-1-songqiang@uniontech.com Signed-off-by: songqiang Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d048b9c2a737eb791a5e9506930f72b02efb8b24 Author: Ira Weiny Date: Tue May 4 18:40:07 2021 -0700 btrfs: use memzero_page() instead of open coded kmap pattern There are many places where kmap/memset/kunmap patterns occur. Use the newly lifted memzero_page() to eliminate direct uses of kmap and leverage the new core functions use of kmap_local_page(). The development of this patch was aided by the following coccinelle script: // // SPDX-License-Identifier: GPL-2.0-only // Find kmap/memset/kunmap pattern and replace with memset*page calls // // NOTE: Offsets and other expressions may be more complex than what the script // will automatically generate. Therefore a catchall rule is provided to find // the pattern which then must be evaluated by hand. // // Confidence: Low // Copyright: (C) 2021 Intel Corporation // URL: http://coccinelle.lip6.fr/ // Comments: // Options: // // Then the memset pattern // @ memset_rule1 @ expression page, V, L, Off; identifier ptr; type VP; @@ ( -VP ptr = kmap(page); | -ptr = kmap(page); | -VP ptr = kmap_atomic(page); | -ptr = kmap_atomic(page); ) <+... ( -memset(ptr, 0, L); +memzero_page(page, 0, L); | -memset(ptr + Off, 0, L); +memzero_page(page, Off, L); | -memset(ptr, V, L); +memset_page(page, V, 0, L); | -memset(ptr + Off, V, L); +memset_page(page, V, Off, L); ) ...+> ( -kunmap(page); | -kunmap_atomic(ptr); ) // Remove any pointers left unused @ depends on memset_rule1 @ identifier memset_rule1.ptr; type VP, VP1; @@ -VP ptr; ... when != ptr; ? VP1 ptr; // // Catch all // @ memset_rule2 @ expression page; identifier ptr; expression GenTo, GenSize, GenValue; type VP; @@ ( -VP ptr = kmap(page); | -ptr = kmap(page); | -VP ptr = kmap_atomic(page); | -ptr = kmap_atomic(page); ) <+... ( // // Some call sites have complex expressions within the memset/memcpy // The follow are catch alls which need to be evaluated by hand. // -memset(GenTo, 0, GenSize); +memzero_pageExtra(page, GenTo, GenSize); | -memset(GenTo, GenValue, GenSize); +memset_pageExtra(page, GenValue, GenTo, GenSize); ) ...+> ( -kunmap(page); | -kunmap_atomic(ptr); ) // Remove any pointers left unused @ depends on memset_rule2 @ identifier memset_rule2.ptr; type VP, VP1; @@ -VP ptr; ... when != ptr; ? VP1 ptr; // Link: https://lkml.kernel.org/r/20210309212137.2610186-4-ira.weiny@intel.com Signed-off-by: Ira Weiny Reviewed-by: David Sterba Cc: Alexander Viro Cc: Chaitanya Kulkarni Cc: Chris Mason Cc: Josef Bacik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28961998f858114e51d2ae862065b858afcfa2b2 Author: Ira Weiny Date: Tue May 4 18:40:03 2021 -0700 iov_iter: lift memzero_page() to highmem.h Patch series "btrfs: Convert kmap/memset/kunmap to memzero_user()". Lifting memzero_user(), convert it to kmap_local_page() and then use it in btrfs. This patch (of 3): memzero_page() can replace the kmap/memset/kunmap pattern in other places in the code. While zero_user() has the same interface it is not the same call and its use should be limited and some of those calls may be better converted from zero_user() to memzero_page().[1] But that is not addressed in this series. Lift memzero_page() to highmem. [1] https://lore.kernel.org/lkml/CAHk-=wijdojzo56FzYqE5TOYw2Vws7ik3LEMGj9SPQaJJ+Z73Q@mail.gmail.com/ Link: https://lkml.kernel.org/r/20210309212137.2610186-1-ira.weiny@intel.com Link: https://lkml.kernel.org/r/20210309212137.2610186-2-ira.weiny@intel.com Signed-off-by: Ira Weiny Cc: Alexander Viro Cc: David Sterba Cc: Chris Mason Cc: Josef Bacik Cc: Chaitanya Kulkarni Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ecfc2bda7aafc5c87b69a3d7a1fc1016dd21d5a7 Author: zhouchuangao Date: Tue May 4 18:40:00 2021 -0700 mm/zsmalloc: use BUG_ON instead of if condition followed by BUG. It can be optimized at compile time. Link: https://lkml.kernel.org/r/1616727798-9110-1-git-send-email-zhouchuangao@vivo.com Signed-off-by: zhouchuangao Cc: Minchan Kim Cc: Sergey Senozhatsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79cd420248c776005d534416bfc9b04696e6c729 Author: Zhiyuan Dai Date: Tue May 4 18:39:57 2021 -0700 mm/zswap.c: switch from strlcpy to strscpy strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. Link: https://lkml.kernel.org/r/1614227981-20367-1-git-send-email-daizhiyuan@phytium.com.cn Signed-off-by: Zhiyuan Dai Cc: Seth Jennings Cc: Dan Streetman Cc: Vitaly Wool Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ca6e51d592d20180374366e71bb0972de002d509 Author: Oscar Salvador Date: Tue May 4 18:39:54 2021 -0700 arm64/Kconfig: introduce ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE Enable arm64 platform to use the MHP_MEMMAP_ON_MEMORY feature. Link: https://lkml.kernel.org/r/20210421102701.25051-9-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Cc: Anshuman Khandual Cc: Michal Hocko Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f91ef2223dc425e2e8759a625cffd48dce3503de Author: Oscar Salvador Date: Tue May 4 18:39:51 2021 -0700 x86/Kconfig: introduce ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE Enable x86_64 platform to use the MHP_MEMMAP_ON_MEMORY feature. Link: https://lkml.kernel.org/r/20210421102701.25051-8-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e3a9d9fcc3315993de2e9fcd7ea82fab84433815 Author: Oscar Salvador Date: Tue May 4 18:39:48 2021 -0700 mm,memory_hotplug: add kernel boot option to enable memmap_on_memory Self stored memmap leads to a sparse memory situation which is unsuitable for workloads that requires large contiguous memory chunks, so make this an opt-in which needs to be explicitly enabled. To control this, let memory_hotplug have its own memory space, as suggested by David, so we can add memory_hotplug.memmap_on_memory parameter. Link: https://lkml.kernel.org/r/20210421102701.25051-7-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4a3e5de9c4ec41bb0684b0d4e0c16abc39617d88 Author: Oscar Salvador Date: Tue May 4 18:39:45 2021 -0700 acpi,memhotplug: enable MHP_MEMMAP_ON_MEMORY when supported Let the caller check whether it can pass MHP_MEMMAP_ON_MEMORY by checking mhp_supports_memmap_on_memory(). MHP_MEMMAP_ON_MEMORY can only be set in case ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE is enabled, the architecture supports altmap, and the range to be added spans a single memory block. Link: https://lkml.kernel.org/r/20210421102701.25051-6-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a08a2ae3461383c2d50d0997dcc6cd1dd1fefb08 Author: Oscar Salvador Date: Tue May 4 18:39:42 2021 -0700 mm,memory_hotplug: allocate memmap from the added memory range Physical memory hotadd has to allocate a memmap (struct page array) for the newly added memory section. Currently, alloc_pages_node() is used for those allocations. This has some disadvantages: a) an existing memory is consumed for that purpose (eg: ~2MB per 128MB memory section on x86_64) This can even lead to extreme cases where system goes OOM because the physically hotplugged memory depletes the available memory before it is onlined. b) if the whole node is movable then we have off-node struct pages which has performance drawbacks. c) It might be there are no PMD_ALIGNED chunks so memmap array gets populated with base pages. This can be improved when CONFIG_SPARSEMEM_VMEMMAP is enabled. Vmemap page tables can map arbitrary memory. That means that we can reserve a part of the physically hotadded memory to back vmemmap page tables. This implementation uses the beginning of the hotplugged memory for that purpose. There are some non-obviously things to consider though. Vmemmap pages are allocated/freed during the memory hotplug events (add_memory_resource(), try_remove_memory()) when the memory is added/removed. This means that the reserved physical range is not online although it is used. The most obvious side effect is that pfn_to_online_page() returns NULL for those pfns. The current design expects that this should be OK as the hotplugged memory is considered a garbage until it is onlined. For example hibernation wouldn't save the content of those vmmemmaps into the image so it wouldn't be restored on resume but this should be OK as there no real content to recover anyway while metadata is reachable from other data structures (e.g. vmemmap page tables). The reserved space is therefore (de)initialized during the {on,off}line events (mhp_{de}init_memmap_on_memory). That is done by extracting page allocator independent initialization from the regular onlining path. The primary reason to handle the reserved space outside of {on,off}line_pages is to make each initialization specific to the purpose rather than special case them in a single function. As per above, the functions that are introduced are: - mhp_init_memmap_on_memory: Initializes vmemmap pages by calling move_pfn_range_to_zone(), calls kasan_add_zero_shadow(), and onlines as many sections as vmemmap pages fully span. - mhp_deinit_memmap_on_memory: Offlines as many sections as vmemmap pages fully span, removes the range from zhe zone by remove_pfn_range_from_zone(), and calls kasan_remove_zero_shadow() for the range. The new function memory_block_online() calls mhp_init_memmap_on_memory() before doing the actual online_pages(). Should online_pages() fail, we clean up by calling mhp_deinit_memmap_on_memory(). Adjusting of present_pages is done at the end once we know that online_pages() succedeed. On offline, memory_block_offline() needs to unaccount vmemmap pages from present_pages() before calling offline_pages(). This is necessary because offline_pages() tears down some structures based on the fact whether the node or the zone become empty. If offline_pages() fails, we account back vmemmap pages. If it succeeds, we call mhp_deinit_memmap_on_memory(). Hot-remove: We need to be careful when removing memory, as adding and removing memory needs to be done with the same granularity. To check that this assumption is not violated, we check the memory range we want to remove and if a) any memory block has vmemmap pages and b) the range spans more than a single memory block, we scream out loud and refuse to proceed. If all is good and the range was using memmap on memory (aka vmemmap pages), we construct an altmap structure so free_hugepage_table does the right thing and calls vmem_altmap_free instead of free_pagetable. Link: https://lkml.kernel.org/r/20210421102701.25051-5-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9901144e48f6a7ba186249add705d10e74738ec Author: David Hildenbrand Date: Tue May 4 18:39:39 2021 -0700 mm,memory_hotplug: factor out adjusting present pages into adjust_present_page_count() Let's have a single place (inspired by adjust_managed_page_count()) where we adjust present pages. In contrast to adjust_managed_page_count(), only memory onlining or offlining is allowed to modify the number of present pages. Link: https://lkml.kernel.org/r/20210421102701.25051-4-osalvador@suse.de Signed-off-by: David Hildenbrand Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dd8e2f230d82ecd60504fba48bb10bf3760b674e Author: Oscar Salvador Date: Tue May 4 18:39:36 2021 -0700 mm,memory_hotplug: relax fully spanned sections check We want {online,offline}_pages to operate on whole memblocks, but memmap_on_memory will poke pageblock_nr_pages aligned holes in the beginning, which is a special case we want to allow. Relax the check to account for that case. Link: https://lkml.kernel.org/r/20210421102701.25051-3-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Pavel Tatashin Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8736cc2d002f14e90d2b33bc5bef1740f6275ba4 Author: Oscar Salvador Date: Tue May 4 18:39:33 2021 -0700 drivers/base/memory: introduce memory_block_{online,offline} Patch series "Allocate memmap from hotadded memory (per device)", v10. The primary goal of this patchset is to reduce memory overhead of the hot-added memory (at least for SPARSEMEM_VMEMMAP memory model). The current way we use to populate memmap (struct page array) has two main drawbacks: a) it consumes an additional memory until the hotadded memory itself is onlined and b) memmap might end up on a different numa node which is especially true for movable_node configuration. c) due to fragmentation we might end up populating memmap with base pages One way to mitigate all these issues is to simply allocate memmap array (which is the largest memory footprint of the physical memory hotplug) from the hot-added memory itself. SPARSEMEM_VMEMMAP memory model allows us to map any pfn range so the memory doesn't need to be online to be usable for the array. See patch 4 for more details. This feature is only usable when CONFIG_SPARSEMEM_VMEMMAP is set. [Overall design]: Implementation wise we reuse vmem_altmap infrastructure to override the default allocator used by vmemap_populate. memory_block structure gains a new field called nr_vmemmap_pages, which accounts for the number of vmemmap pages used by that memory_block. E.g: On x86_64, that is 512 vmemmap pages on small memory bloks and 4096 on large memory blocks (1GB) We also introduce new two functions: memory_block_{online,offline}. These functions take care of initializing/unitializing vmemmap pages prior to calling {online,offline}_pages, so the latter functions can remain totally untouched. More details can be found in the respective changelogs. This patch (of 8): This is a preparatory patch that introduces two new functions: memory_block_online() and memory_block_offline(). For now, these functions will only call online_pages() and offline_pages() respectively, but they will be later in charge of preparing the vmemmap pages, carrying out the initialization and proper accounting of such pages. Since memory_block struct contains all the information, pass this struct down the chain till the end functions. Link: https://lkml.kernel.org/r/20210421102701.25051-1-osalvador@suse.de Link: https://lkml.kernel.org/r/20210421102701.25051-2-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Cc: Anshuman Khandual Cc: Vlastimil Babka Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8ca559132a2d9b56732d35e2b947af96acb9b80b Author: Mel Gorman Date: Tue May 4 18:39:30 2021 -0700 mm/memory_hotplug: remove broken locking of zone PCP structures during hot remove zone_pcp_reset allegedly protects against a race with drain_pages using local_irq_save but this is bogus. local_irq_save only operates on the local CPU. If memory hotplug is running on CPU A and drain_pages is running on CPU B, disabling IRQs on CPU A does not affect CPU B and offers no protection. This patch deletes IRQ disable/enable on the grounds that IRQs protect nothing and assumes the existing hotplug paths guarantees the PCP cannot be used after zone_pcp_enable(). That should be the case already because all the pages have been freed and there is no page to put on the PCP lists. Link: https://lkml.kernel.org/r/20210412090346.GQ3697@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: "Michael S. Tsirkin" Cc: Vlastimil Babka Cc: Alexander Duyck Cc: Minchan Kim Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e44605a8b1aa13d892addc59ec3d416cb186c77b Author: Pavel Tatashin Date: Tue May 4 18:39:27 2021 -0700 selftests/vm: gup_test: test faulting in kernel, and verify pinnable pages When pages are pinned they can be faulted in userland and migrated, and they can be faulted right in kernel without migration. In either case, the pinned pages must end-up being pinnable (not movable). Add a new test to gup_test, to help verify that the gup/pup (get_user_pages() / pin_user_pages()) behavior with respect to pinnable and movable pages is reasonable and correct. Specifically, provide a way to: 1) Verify that only "pinnable" pages are pinned. This is checked automatically for you. 2) Verify that gup/pup performance is reasonable. This requires comparing benchmarks between doing gup/pup on pages that have been pre-faulted in from user space, vs. doing gup/pup on pages that are not faulted in until gup/pup time (via FOLL_TOUCH). This decision is controlled with the new -z command line option. Link: https://lkml.kernel.org/r/20210215161349.246722-15-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: John Hubbard Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79dbf135e2481eaa77b172d88c343bf85e021545 Author: Pavel Tatashin Date: Tue May 4 18:39:23 2021 -0700 selftests/vm: gup_test: fix test flag In gup_test both gup_flags and test_flags use the same flags field. This is broken. Farther, in the actual gup_test.c all the passed gup_flags are erased and unconditionally replaced with FOLL_WRITE. Which means that test_flags are ignored, and code like this always performs pin dump test: 155 if (gup->flags & GUP_TEST_FLAG_DUMP_PAGES_USE_PIN) 156 nr = pin_user_pages(addr, nr, gup->flags, 157 pages + i, NULL); 158 else 159 nr = get_user_pages(addr, nr, gup->flags, 160 pages + i, NULL); 161 break; Add a new test_flags field, to allow raw gup_flags to work. Add a new subcommand for DUMP_USER_PAGES_TEST to specify that pin test should be performed. Remove unconditional overwriting of gup_flags via FOLL_WRITE. But, preserve the previous behaviour where FOLL_WRITE was the default flag, and add a new option "-W" to unset FOLL_WRITE. Rename flags with gup_flags. With the fix, dump works like this: root@virtme:/# gup_test -c ---- page #0, starting from user virt addr: 0x7f8acb9e4000 page:00000000d3d2ee27 refcount:2 mapcount:1 mapping:0000000000000000 index:0x0 pfn:0x100bcf anon flags: 0x300000000080016(referenced|uptodate|lru|swapbacked) raw: 0300000000080016 ffffd0e204021608 ffffd0e208df2e88 ffff8ea04243ec61 raw: 0000000000000000 0000000000000000 0000000200000000 0000000000000000 page dumped because: gup_test: dump_pages() test DUMP_USER_PAGES_TEST: done root@virtme:/# gup_test -c -p ---- page #0, starting from user virt addr: 0x7fd19701b000 page:00000000baed3c7d refcount:1025 mapcount:1 mapping:0000000000000000 index:0x0 pfn:0x108008 anon flags: 0x300000000080014(uptodate|lru|swapbacked) raw: 0300000000080014 ffffd0e204200188 ffffd0e205e09088 ffff8ea04243ee71 raw: 0000000000000000 0000000000000000 0000040100000000 0000000000000000 page dumped because: gup_test: dump_pages() test DUMP_USER_PAGES_TEST: done Refcount shows the difference between pin vs no-pin case. Also change type of nr from int to long, as it counts number of pages. Link: https://lkml.kernel.org/r/20210215161349.246722-14-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: John Hubbard Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f68749ec342b5f2c18b3af3435714d9f653736c3 Author: Pavel Tatashin Date: Tue May 4 18:39:19 2021 -0700 mm/gup: longterm pin migration cleanup When pages are longterm pinned, we must migrated them out of movable zone. The function that migrates them has a hidden loop with goto. The loop is to retry on isolation failures, and after successful migration. Make this code better by moving this loop to the caller. Link: https://lkml.kernel.org/r/20210215161349.246722-13-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: Jason Gunthorpe Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 24dc20c75f937b8f5c432e38275e70a1611766e9 Author: Pavel Tatashin Date: Tue May 4 18:39:15 2021 -0700 mm/gup: change index type to long as it counts pages In __get_user_pages_locked() i counts number of pages which should be long, as long is used in all other places to contain number of pages, and 32-bit becomes increasingly small for handling page count proportional values. Link: https://lkml.kernel.org/r/20210215161349.246722-12-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa965fd54827a6b6967602051736da9c163b79b7 Author: Pavel Tatashin Date: Tue May 4 18:39:12 2021 -0700 memory-hotplug.rst: add a note about ZONE_MOVABLE and page pinning Document the special handling of page pinning when ZONE_MOVABLE present. Link: https://lkml.kernel.org/r/20210215161349.246722-11-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Suggested-by: David Hildenbrand Acked-by: Michal Hocko Cc: Dan Williams Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d1e153fea2a8940273174fc17733c44323d35cd5 Author: Pavel Tatashin Date: Tue May 4 18:39:08 2021 -0700 mm/gup: migrate pinned pages out of movable zone We should not pin pages in ZONE_MOVABLE. Currently, we do not pin only movable CMA pages. Generalize the function that migrates CMA pages to migrate all movable pages. Use is_pinnable_page() to check which pages need to be migrated Link: https://lkml.kernel.org/r/20210215161349.246722-10-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: John Hubbard Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9afaf30f7a1aab2022961715a66f644275b8daec Author: Pavel Tatashin Date: Tue May 4 18:39:04 2021 -0700 mm/gup: do not migrate zero page On some platforms ZERO_PAGE(0) might end-up in a movable zone. Do not migrate zero page in gup during longterm pinning as migration of zero page is not allowed. For example, in x86 QEMU with 16G of memory and kernelcore=5G parameter, I see the following: Boot#1: zero_pfn 0x48a8d zero_pfn zone: ZONE_DMA32 Boot#2: zero_pfn 0x20168d zero_pfn zone: ZONE_MOVABLE On x86, empty_zero_page is declared in .bss and depending on the loader may end up in different physical locations during boots. Also, move is_zero_pfn() my_zero_pfn() functions under CONFIG_MMU, because zero_pfn that they are using is declared in memory.c which is compiled with CONFIG_MMU. Link: https://lkml.kernel.org/r/20210215161349.246722-9-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e3560d963d22ba41857f48e4114ce80373144ea Author: Pavel Tatashin Date: Tue May 4 18:39:00 2021 -0700 mm: honor PF_MEMALLOC_PIN for all movable pages PF_MEMALLOC_PIN is only honored for CMA pages, extend this flag to work for any allocations from ZONE_MOVABLE by removing __GFP_MOVABLE from gfp_mask when this flag is passed in the current context. Add is_pinnable_page() to return true if page is in a pinnable page. A pinnable page is not in ZONE_MOVABLE and not of MIGRATE_CMA type. Link: https://lkml.kernel.org/r/20210215161349.246722-8-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Acked-by: Michal Hocko Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da6df1b0fcfa97b2e3394df8622128bb810e1093 Author: Pavel Tatashin Date: Tue May 4 18:38:57 2021 -0700 mm: apply per-task gfp constraints in fast path Function current_gfp_context() is called after fast path. However, soon we will add more constraints which will also limit zones based on context. Move this call into fast path, and apply the correct constraints for all allocations. Also update .reclaim_idx based on value returned by current_gfp_context() because it soon will modify the allowed zones. Note: With this patch we will do one extra current->flags load during fast path, but we already load current->flags in fast-path: __alloc_pages() prepare_alloc_pages() current_alloc_flags(gfp_mask, *alloc_flags); Later, when we add the zone constrain logic to current_gfp_context() we will be able to remove current->flags load from current_alloc_flags, and therefore return fast-path to the current performance level. Link: https://lkml.kernel.org/r/20210215161349.246722-7-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Suggested-by: Michal Hocko Acked-by: Michal Hocko Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1a08ae36cf8b5f26d0c64ebfe46f8eb07ea0b678 Author: Pavel Tatashin Date: Tue May 4 18:38:53 2021 -0700 mm cma: rename PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN PF_MEMALLOC_NOCMA is used ot guarantee that the allocator will not return pages that might belong to CMA region. This is currently used for long term gup to make sure that such pins are not going to be done on any CMA pages. When PF_MEMALLOC_NOCMA has been introduced we haven't realized that it is focusing on CMA pages too much and that there is larger class of pages that need the same treatment. MOVABLE zone cannot contain any long term pins as well so it makes sense to reuse and redefine this flag for that usecase as well. Rename the flag to PF_MEMALLOC_PIN which defines an allocation context which can only get pages suitable for long-term pins. Also rename: memalloc_nocma_save()/memalloc_nocma_restore to memalloc_pin_save()/memalloc_pin_restore() and make the new functions common. [rppt@linux.ibm.com: fix renaming of PF_MEMALLOC_NOCMA to PF_MEMALLOC_PIN] Link: https://lkml.kernel.org/r/20210331163816.11517-1-rppt@kernel.org Link: https://lkml.kernel.org/r/20210215161349.246722-6-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: John Hubbard Acked-by: Michal Hocko Signed-off-by: Mike Rapoport Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Jason Gunthorpe Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e7f34ebb8d25d71ce7f4580ba3cbfc10b895580 Author: Pavel Tatashin Date: Tue May 4 18:38:49 2021 -0700 mm/gup: check for isolation errors It is still possible that we pin movable CMA pages if there are isolation errors and cma_page_list stays empty when we check again. Check for isolation errors, and return success only when there are no isolation errors, and cma_page_list is empty after checking. Because isolation errors are transient, we retry indefinitely. Link: https://lkml.kernel.org/r/20210215161349.246722-5-pasha.tatashin@soleen.com Fixes: 9a4e9f3b2d73 ("mm: update get_user_pages_longterm to migrate pages allocated from CMA region") Signed-off-by: Pavel Tatashin Reviewed-by: Jason Gunthorpe Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0f4463837da17a89d965dcbe4e411629dbcf308 Author: Pavel Tatashin Date: Tue May 4 18:38:46 2021 -0700 mm/gup: return an error on migration failure When migration failure occurs, we still pin pages, which means that we may pin CMA movable pages which should never be the case. Instead return an error without pinning pages when migration failure happens. No need to retry migrating, because migrate_pages() already retries 10 times. Link: https://lkml.kernel.org/r/20210215161349.246722-4-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: Jason Gunthorpe Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 83c02c23d0747a7bdcd71f99a538aacec94b146c Author: Pavel Tatashin Date: Tue May 4 18:38:42 2021 -0700 mm/gup: check every subpage of a compound page during isolation When pages are isolated in check_and_migrate_movable_pages() we skip compound number of pages at a time. However, as Jason noted, it is not necessary correct that pages[i] corresponds to the pages that we skipped. This is because it is possible that the addresses in this range had split_huge_pmd()/split_huge_pud(), and these functions do not update the compound page metadata. The problem can be reproduced if something like this occurs: 1. User faulted huge pages. 2. split_huge_pmd() was called for some reason 3. User has unmapped some sub-pages in the range 4. User tries to longterm pin the addresses. The resulting pages[i] might end-up having pages which are not compound size page aligned. Link: https://lkml.kernel.org/r/20210215161349.246722-3-pasha.tatashin@soleen.com Fixes: aa712399c1e8 ("mm/gup: speed up check_and_migrate_cma_pages() on huge page") Signed-off-by: Pavel Tatashin Reported-by: Jason Gunthorpe Reviewed-by: Jason Gunthorpe Cc: Dan Williams Cc: David Hildenbrand Cc: David Rientjes Cc: Ingo Molnar Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: John Hubbard Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mel Gorman Cc: Michal Hocko Cc: Michal Hocko Cc: Mike Kravetz Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Sasha Levin Cc: Steven Rostedt (VMware) Cc: Tyler Hicks Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c991ffef7bce85a5d4ebc503c06dfd6dd8e5dc52 Author: Pavel Tatashin Date: Tue May 4 18:38:38 2021 -0700 mm/gup: don't pin migrated cma pages in movable zone Patch series "prohibit pinning pages in ZONE_MOVABLE", v11. When page is pinned it cannot be moved and its physical address stays the same until pages is unpinned. This is useful functionality to allows userland to implementation DMA access. For example, it is used by vfio in vfio_pin_pages(). However, this functionality breaks memory hotplug/hotremove assumptions that pages in ZONE_MOVABLE can always be migrated. This patch series fixes this issue by forcing new allocations during page pinning to omit ZONE_MOVABLE, and also to migrate any existing pages from ZONE_MOVABLE during pinning. It uses the same scheme logic that is currently used by CMA, and extends the functionality for all allocations. For more information read the discussion [1] about this problem. [1] https://lore.kernel.org/lkml/CA+CK2bBffHBxjmb9jmSKacm0fJMinyt3Nhk8Nx6iudcQSj80_w@mail.gmail.com This patch (of 14): In order not to fragment CMA the pinned pages are migrated. However, they are migrated to ZONE_MOVABLE, which also should not have pinned pages. Remove __GFP_MOVABLE, so pages can be migrated to zones where pinning is allowed. Link: https://lkml.kernel.org/r/20210215161349.246722-1-pasha.tatashin@soleen.com Link: https://lkml.kernel.org/r/20210215161349.246722-2-pasha.tatashin@soleen.com Signed-off-by: Pavel Tatashin Reviewed-by: David Hildenbrand Reviewed-by: John Hubbard Acked-by: Michal Hocko Cc: Vlastimil Babka Cc: Michal Hocko Cc: David Hildenbrand Cc: Oscar Salvador Cc: Dan Williams Cc: Sasha Levin Cc: Tyler Hicks Cc: Joonsoo Kim Cc: Mike Kravetz Cc: Steven Rostedt (VMware) Cc: Ingo Molnar Cc: Jason Gunthorpe Cc: Peter Zijlstra Cc: Mel Gorman Cc: Matthew Wilcox Cc: David Rientjes Cc: John Hubbard Cc: Ira Weiny Cc: James Morris Cc: Jason Gunthorpe Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 31454980b8b55b066ba0d6b8267313fcb94ea816 Author: Bhaskar Chowdhury Date: Tue May 4 18:38:35 2021 -0700 mm/util.c: fix typo s/condtion/condition/ Link: https://lkml.kernel.org/r/20210317033439.3429411-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2521781c1ebc6d26b7fbe9b7e9614fd2f38affb5 Author: Joe Perches Date: Tue May 4 18:38:32 2021 -0700 mm/util.c: reduce mem_dump_obj() object size Simplify the code by using a temporary and reduce the object size by using a single call to pr_cont(). Reverse a test and unindent a block too. $ size mm/util.o* (defconfig x86-64) text data bss dec hex filename 7419 372 40 7831 1e97 mm/util.o.new 7477 372 40 7889 1ed1 mm/util.o.old Link: https://lkml.kernel.org/r/a6e105886338f68afd35f7a13d73bcf06b0cc732.camel@perches.com Signed-off-by: Joe Perches Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e8003bf66a7a66d8ae3db2c40b2dca180bf942bb Author: Anshuman Khandual Date: Tue May 4 18:38:29 2021 -0700 mm: drop redundant HAVE_ARCH_TRANSPARENT_HUGEPAGE HAVE_ARCH_TRANSPARENT_HUGEPAGE has duplicate definitions on platforms that subscribe it. Drop these reduntant definitions and instead just select it on applicable platforms. Link: https://lkml.kernel.org/r/1617259448-22529-7-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Arnd Bergmann Acked-by: Vineet Gupta [arc] Cc: Russell King Cc: Albert Ou Cc: Alexander Viro Cc: Benjamin Herrenschmidt Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Helge Deller Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: "James E.J. Bottomley" Cc: Michael Ellerman Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Rich Felker Cc: Thomas Bogendoerfer Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 66f24fa766e3a5a194a85af98ff454d8d94b59cf Author: Anshuman Khandual Date: Tue May 4 18:38:25 2021 -0700 mm: drop redundant ARCH_ENABLE_SPLIT_PMD_PTLOCK ARCH_ENABLE_SPLIT_PMD_PTLOCKS has duplicate definitions on platforms that subscribe it. Drop these redundant definitions and instead just select it on applicable platforms. Link: https://lkml.kernel.org/r/1617259448-22529-6-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas [arm64] Acked-by: Heiko Carstens [s390] Cc: Will Deacon Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Yoshinori Sato Cc: Rich Felker Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Albert Ou Cc: Alexander Viro Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Russell King Cc: Thomas Bogendoerfer Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1e866974a15be8921fb01f8c4efa93a5157ef690 Author: Anshuman Khandual Date: Tue May 4 18:38:21 2021 -0700 mm: drop redundant ARCH_ENABLE_[HUGEPAGE|THP]_MIGRATION ARCH_ENABLE_[HUGEPAGE|THP]_MIGRATION configs have duplicate definitions on platforms that subscribe them. Drop these reduntant definitions and instead just select them appropriately. [akpm@linux-foundation.org: s/x86_64/X86_64/, per Oscar] Link: https://lkml.kernel.org/r/1617259448-22529-5-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas [arm64] Cc: Will Deacon Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Albert Ou Cc: Alexander Viro Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Rich Felker Cc: Russell King Cc: Thomas Bogendoerfer Cc: Vasily Gorbik Cc: Vineet Gupta Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91024b3ce247213ee43103dffd629623537a569e Author: Anshuman Khandual Date: Tue May 4 18:38:17 2021 -0700 mm: generalize ARCH_ENABLE_MEMORY_[HOTPLUG|HOTREMOVE] ARCH_ENABLE_MEMORY_[HOTPLUG|HOTREMOVE] configs have duplicate definitions on platforms that subscribe them. Instead, just make them generic options which can be selected on applicable platforms. Link: https://lkml.kernel.org/r/1617259448-22529-4-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas [arm64] Acked-by: Heiko Carstens [s390] Cc: Will Deacon Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Yoshinori Sato Cc: Rich Felker Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Albert Ou Cc: Alexander Viro Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Palmer Dabbelt Cc: Paul Walmsley Cc: Russell King Cc: Thomas Bogendoerfer Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 855f9a8e87fe3912a1c00eb63f36880d1ad32e40 Author: Anshuman Khandual Date: Tue May 4 18:38:13 2021 -0700 mm: generalize SYS_SUPPORTS_HUGETLBFS (rename as ARCH_SUPPORTS_HUGETLBFS) SYS_SUPPORTS_HUGETLBFS config has duplicate definitions on platforms that subscribe it. Instead, just make it a generic option which can be selected on applicable platforms. Also rename it as ARCH_SUPPORTS_HUGETLBFS instead. This reduces code duplication and makes it cleaner. Link: https://lkml.kernel.org/r/1617259448-22529-3-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas [arm64] Acked-by: Palmer Dabbelt [riscv] Acked-by: Michael Ellerman [powerpc] Cc: Russell King Cc: Will Deacon Cc: Thomas Bogendoerfer Cc: "James E.J. Bottomley" Cc: Helge Deller Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Albert Ou Cc: Yoshinori Sato Cc: Rich Felker Cc: Alexander Viro Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Christian Borntraeger Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Vasily Gorbik Cc: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c2280be81de404e99f66c7249496b0355406ed94 Author: Anshuman Khandual Date: Tue May 4 18:38:09 2021 -0700 mm: generalize ARCH_HAS_CACHE_LINE_SIZE Patch series "mm: some config cleanups", v2. This series contains config cleanup patches which reduces code duplication across platforms and also improves maintainability. There is no functional change intended with this series. This patch (of 6): ARCH_HAS_CACHE_LINE_SIZE config has duplicate definitions on platforms that subscribe it. Instead, just make it a generic option which can be selected on applicable platforms. This change reduces code duplication and makes it cleaner. Link: https://lkml.kernel.org/r/1617259448-22529-1-git-send-email-anshuman.khandual@arm.com Link: https://lkml.kernel.org/r/1617259448-22529-2-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas [arm64] Acked-by: Vineet Gupta [arc] Cc: Will Deacon Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Albert Ou Cc: Alexander Viro Cc: Arnd Bergmann Cc: Benjamin Herrenschmidt Cc: Christian Borntraeger Cc: Heiko Carstens Cc: Helge Deller Cc: "James E.J. Bottomley" Cc: Michael Ellerman Cc: Palmer Dabbelt Cc: Paul Mackerras Cc: Paul Walmsley Cc: Rich Felker Cc: Russell King Cc: Thomas Bogendoerfer Cc: Vasily Gorbik Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fce000b1bc08c64c0cff4bb705b3970bd6fc1e34 Author: Liam Howlett Date: Tue May 4 18:38:06 2021 -0700 mm/mmap.c: don't unlock VMAs in remap_file_pages() Since this call uses MAP_FIXED, do_mmap() will munlock the necessary range. There is also an error in the loop test expression which will evaluate as false and the loop body has never execute. Link: https://lkml.kernel.org/r/20210223235010.2296915-1-Liam.Howlett@Oracle.com Signed-off-by: Liam R. Howlett Acked-by: Hugh Dickins Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 575299ea18a8c0575d4c2ef6ad3fa4d41d529d1c Author: Saravanan D Date: Tue May 4 18:38:03 2021 -0700 x86/mm: track linear mapping split events To help with debugging the sluggishness caused by TLB miss/reload, we introduce monotonic hugepage [direct mapped] split event counts since system state: SYSTEM_RUNNING to be displayed as part of /proc/vmstat in x86 servers The lifetime split event information will be displayed at the bottom of /proc/vmstat .... swap_ra 0 swap_ra_hit 0 direct_map_level2_splits 94 direct_map_level3_splits 4 nr_unstable 0 .... One of the many lasting sources of direct hugepage splits is kernel tracing (kprobes, tracepoints). Note that the kernel's code segment [512 MB] points to the same physical addresses that have been already mapped in the kernel's direct mapping range. Source : Documentation/x86/x86_64/mm.rst When we enable kernel tracing, the kernel has to modify attributes/permissions of the text segment hugepages that are direct mapped causing them to split. Kernel's direct mapped hugepages do not coalesce back after split and remain in place for the remainder of the lifetime. An instance of direct page splits when we turn on dynamic kernel tracing .... cat /proc/vmstat | grep -i direct_map_level direct_map_level2_splits 784 direct_map_level3_splits 12 bpftrace -e 'tracepoint:raw_syscalls:sys_enter { @ [pid, comm] = count(); }' cat /proc/vmstat | grep -i direct_map_level direct_map_level2_splits 789 direct_map_level3_splits 12 .... Link: https://lkml.kernel.org/r/20210218235744.1040634-1-saravanand@fb.com Signed-off-by: Saravanan D Acked-by: Tejun Heo Acked-by: Johannes Weiner Acked-by: Dave Hansen Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c675790972916d3722809fcc52c5c4f8421b2e5d Author: Hugh Dickins Date: Tue May 4 18:38:00 2021 -0700 mm: /proc/sys/vm/stat_refresh stop checking monotonic numa stats All of the VM NUMA stats are event counts, incremented never decremented: it is not very useful for vmstat_refresh() to check them throughout their first aeon, then warn on them throughout their next. Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2102251514110.13363@eggly.anvils Signed-off-by: Hugh Dickins Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75083aae114c2738af28eef2fb0c2515e818885a Author: Hugh Dickins Date: Tue May 4 18:37:57 2021 -0700 mm: /proc/sys/vm/stat_refresh skip checking known negative stats vmstat_refresh() can occasionally catch nr_zone_write_pending and nr_writeback when they are transiently negative. The reason is partly that the interrupt which decrements them in test_clear_page_writeback() can come in before __test_set_page_writeback() got to increment them; but transient negatives are still seen even when that is prevented, and I am not yet certain why (but see Roman's note below). Those stats are not buggy, they have never been seen to drift away from 0 permanently: so just avoid the annoyance of showing a warning on them. Similarly avoid showing a warning on nr_free_cma: CMA users have seen that one reported negative from /proc/sys/vm/stat_refresh too, but it does drift away permanently: I believe that's because its incrementation and decrementation are decided by page migratetype, but the migratetype of a pageblock is not guaranteed to be constant. Roman Gushchin points out: "For performance reasons, vmstat counters are incremented and decremented using per-cpu batches. vmstat_refresh() flushes the per-cpu batches on all CPUs, to get values as accurate as possible; but this method is not atomic, so the resulting value is not always precise. As a consequence, for those counters whose actual value is close to 0, a small negative value may occasionally be reported. If the value is small and the state is transient, it is not an indication of an error" Link: https://lore.kernel.org/linux-mm/20200714173747.3315771-1-guro@fb.com/ Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2103012158540.7549@eggly.anvils Signed-off-by: Hugh Dickins Reported-by: Roman Gushchin Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d99a4c029c01cd7d075f7f9fa3b8b620e49a9f7 Author: Hugh Dickins Date: Tue May 4 18:37:54 2021 -0700 mm: no more EINVAL from /proc/sys/vm/stat_refresh EINVAL was good for drawing the refresher's attention to a warning in dmesg, but became very tiresome when running test suites scripted with "set -e": an underflow from a bug in one feature would cause unrelated tests much later to fail, just because their /proc/sys/vm/stat_refresh touch failed with that error. Stop doing that. Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2102251510410.13363@eggly.anvils Signed-off-by: Hugh Dickins Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 76d8cc3c8f45cc597726616f11db4180f7e21ce0 Author: Hugh Dickins Date: Tue May 4 18:37:51 2021 -0700 mm: restore node stat checking in /proc/sys/vm/stat_refresh In v4.7 commit 52b6f46bc163 ("mm: /proc/sys/vm/stat_refresh to force vmstat update") introduced vmstat_refresh(), with its vmstat underflow checking; then in v4.8 commit 75ef71840539 ("mm, vmstat: add infrastructure for per-node vmstats") split NR_VM_NODE_STAT_ITEMS out of NR_VM_ZONE_STAT_ITEMS without updating vmstat_refresh(): so it has been missing out much of the vmstat underflow checking ever since. Reinstate it. Thanks to Roman Gushchin for tangentially pointing this out. Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2102251502240.13363@eggly.anvils Signed-off-by: Hugh Dickins Cc: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 420be4edefe503f8dbd6ab914b11a57a0d339660 Author: Chengyang Fan Date: Tue May 4 18:37:48 2021 -0700 mm/ksm: remove unused parameter from remove_trailing_rmap_items() Since commit 6514d511dbe5 ("ksm: singly-linked rmap_list") was merged, remove_trailing_rmap_items() doesn't use the 'mm_slot' parameter. So remove it, and update caller accordingly. Link: https://lkml.kernel.org/r/20210330121320.1693474-1-cy.fan@huawei.com Signed-off-by: Chengyang Fan Reviewed-by: David Hildenbrand Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c89a384e2551c692a9fe60d093fd7080f50afc51 Author: Miaohe Lin Date: Tue May 4 18:37:45 2021 -0700 ksm: fix potential missing rmap_item for stable_node When removing rmap_item from stable tree, STABLE_FLAG of rmap_item is cleared with head reserved. So the following scenario might happen: For ksm page with rmap_item1: cmp_and_merge_page stable_node->head = &migrate_nodes; remove_rmap_item_from_tree, but head still equal to stable_node; try_to_merge_with_ksm_page failed; return; For the same ksm page with rmap_item2, stable node migration succeed this time. The stable_node->head does not equal to migrate_nodes now. For ksm page with rmap_item1 again: cmp_and_merge_page stable_node->head != &migrate_nodes && rmap_item->head == stable_node return; We would miss the rmap_item for stable_node and might result in failed rmap_walk_ksm(). Fix this by set rmap_item->head to NULL when rmap_item is removed from stable tree. Link: https://lkml.kernel.org/r/20210330140228.45635-5-linmiaohe@huawei.com Fixes: 4146d2d673e8 ("ksm: make !merge_across_nodes migration safe") Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cd7fae26024690c772ec66719735c58a12034088 Author: Miaohe Lin Date: Tue May 4 18:37:42 2021 -0700 ksm: remove dedicated macro KSM_FLAG_MASK The macro KSM_FLAG_MASK is used in rmap_walk_ksm() only. So we can replace ~KSM_FLAG_MASK with PAGE_MASK to remove this dedicated macro and make code more consistent because PAGE_MASK is used elsewhere in this file. Link: https://lkml.kernel.org/r/20210330140228.45635-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3e96b6a2e9ad929a3230a22f4d64a74671a0720b Author: Miaohe Lin Date: Tue May 4 18:37:39 2021 -0700 ksm: use GET_KSM_PAGE_NOLOCK to get ksm page in remove_rmap_item_from_tree() It's unnecessary to lock the page when get ksm page if we're going to remove the rmap item as page migration is irrelevant in this case. Use GET_KSM_PAGE_NOLOCK instead to save some page lock cycles. Link: https://lkml.kernel.org/r/20210330140228.45635-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a08e1e11c90f3e6020963b3ad097680768bc8567 Author: Miaohe Lin Date: Tue May 4 18:37:37 2021 -0700 ksm: remove redundant VM_BUG_ON_PAGE() on stable_tree_search() Patch series "Cleanup and fixup for ksm". This series contains cleanups to remove unnecessary VM_BUG_ON_PAGE and dedicated macro KSM_FLAG_MASK. Also this fixes potential missing rmap_item for stable_node which would result in failed rmap_walk_ksm(). More details can be found in the respective changelogs. This patch (of 4): The same VM_BUG_ON_PAGE() check is already done in the callee. Remove these extra caller one to simplify code slightly. Link: https://lkml.kernel.org/r/20210330140228.45635-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210330140228.45635-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78fa51503fdbe463c96eef4c3cf69ca54032647a Author: Minchan Kim Date: Tue May 4 18:37:34 2021 -0700 mm: use proper type for cma_[alloc|release] size_t in cma_alloc is confusing since it makes people think it's byte count, not pages. Change it to unsigned long[1]. The unsigned int in cma_release is also not right so change it. Since we have unsigned long in cma_release, free_contig_range should also respect it. [1] 67a2e213e7e9, mm: cma: fix incorrect type conversion for size during dma allocation Link: https://lore.kernel.org/linux-mm/20210324043434.GP1719932@casper.infradead.org/ Link: https://lkml.kernel.org/r/20210331164018.710560-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: David Hildenbrand Cc: Matthew Wilcox Cc: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3aab8ae7aace3388da319a233edf48f0f5d26a44 Author: Minchan Kim Date: Tue May 4 18:37:31 2021 -0700 mm: cma: add the CMA instance name to cma trace events There were missing places to add cma instance name. To identify each CMA instance, let's add the name for every cma trace. This patch also changes the existing cma_trace_alloc to cma_trace_finish since we have cma_alloc_start[1]. [1] https://lore.kernel.org/linux-mm/20210324160740.15901-1-georgi.djakov@linaro.org Link: https://lkml.kernel.org/r/20210330220237.748899-1-minchan@kernel.org Signed-off-by: Minchan Kim Cc: Liam Mark Cc: Georgi Djakov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 43ca106fa8ec7d684776fbe561214d3b2b7cb9cb Author: Minchan Kim Date: Tue May 4 18:37:28 2021 -0700 mm: cma: support sysfs Since CMA is getting used more widely, it's more important to keep monitoring CMA statistics for system health since it's directly related to user experience. This patch introduces sysfs statistics for CMA, in order to provide some basic monitoring of the CMA allocator. * the number of CMA page successful allocations * the number of CMA page allocation failures These two values allow the user to calcuate the allocation failure rate for each CMA area. e.g.) /sys/kernel/mm/cma/WIFI/alloc_pages_[success|fail] /sys/kernel/mm/cma/SENSOR/alloc_pages_[success|fail] /sys/kernel/mm/cma/BLUETOOTH/alloc_pages_[success|fail] The cma_stat was intentionally allocated by dynamic allocation to harmonize with kobject lifetime management. https://lore.kernel.org/linux-mm/YCOAmXqt6dZkCQYs@kroah.com/ Link: https://lkml.kernel.org/r/20210324230759.2213957-1-minchan@kernel.org Link: https://lore.kernel.org/linux-mm/20210316100433.17665-1-colin.king@canonical.com/ Signed-off-by: Minchan Kim Signed-off-by: Colin Ian King Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Reviewed-by: Greg Kroah-Hartman Reviewed-by: John Hubbard Tested-by: Anders Roxell Cc: Suren Baghdasaryan Cc: John Dias Cc: Matthew Wilcox (Oracle) Cc: Colin Ian King Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bc1aec5e28765ad18742824b3b972471807a632 Author: Liam Mark Date: Tue May 4 18:37:25 2021 -0700 mm: cma: add trace events for CMA alloc perf testing Add cma and migrate trace events to enable CMA allocation performance to be measured via ftrace. [georgi.djakov@linaro.org: add the CMA instance name to the cma_alloc_start trace event] Link: https://lkml.kernel.org/r/20210326155414.25006-1-georgi.djakov@linaro.org Link: https://lkml.kernel.org/r/20210324160740.15901-1-georgi.djakov@linaro.org Signed-off-by: Liam Mark Signed-off-by: Georgi Djakov Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63f83b31f4f36d933e13bd8b9a25d6d9a0cf89dd Author: Baolin Wang Date: Tue May 4 18:37:22 2021 -0700 mm: cma: use pr_err_ratelimited for CMA warning If we did not reserve extra CMA memory, the log buffer can be easily filled up by CMA failure warning when the devices calling dmam_alloc_coherent() to alloc DMA memory. Thus we can use pr_err_ratelimited() instead to reduce the duplicate CMA warning. Link: https://lkml.kernel.org/r/ce2251ef49e1727a9a40531d1996660b05462bd2.1615279825.git.baolin.wang@linux.alibaba.com Signed-off-by: Baolin Wang Reviewed-by: David Hildenbrand Acked-by: Minchan Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbb269206f3c914d4f23e023de4ec020abea6d1b Author: Minchan Kim Date: Tue May 4 18:37:19 2021 -0700 mm: vmstat: add cma statistics Since CMA is used more widely, it's worth to have CMA allocation statistics into vmstat. With it, we could know how agressively system uses cma allocation and how often it fails. Link: https://lkml.kernel.org/r/20210302183346.3707237-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: John Hubbard Cc: John Dias Cc: Suren Baghdasaryan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ee820ee72388279a37077f418e32643a298243a Author: Miaohe Lin Date: Tue May 4 18:37:16 2021 -0700 Revert "mm: migrate: skip shared exec THP for NUMA balancing" This reverts commit c77c5cbafe549eb330e8909861a3e16cbda2c848. Since commit c77c5cbafe54 ("mm: migrate: skip shared exec THP for NUMA balancing"), the NUMA balancing would skip shared exec transhuge page. But this enhancement is not suitable for transhuge page. Because it's required that page_mapcount() must be 1 due to no migration pte dance is done here. On the other hand, the shared exec transhuge page will leave the migrate_misplaced_page() with pte entry untouched and page locked. Thus pagefault for NUMA will be triggered again and deadlock occurs when we start waiting for the page lock held by ourselves. Yang Shi said: "Thanks for catching this. By relooking the code I think the other important reason for removing this is migrate_misplaced_transhuge_page() actually can't see shared exec file THP at all since page_lock_anon_vma_read() is called before and if page is not anonymous page it will just restore the PMD without migrating anything. The pages for private mapped file vma may be anonymous pages due to COW but they can't be THP so it won't trigger THP numa fault at all. I think this is why no bug was reported. I overlooked this in the first place." Link: https://lkml.kernel.org/r/20210325131524.48181-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Yang Shi Cc: Alistair Popple Cc: David Hildenbrand Cc: Jerome Glisse Cc: Rafael Aquini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 843e1be108b9130e5ec5a78a14f77dc237c83e1e Author: Miaohe Lin Date: Tue May 4 18:37:13 2021 -0700 mm/migrate.c: use helper migrate_vma_collect_skip() in migrate_vma_collect_hole() It's more recommended to use helper function migrate_vma_collect_skip() to skip the unexpected case and it also helps remove some duplicated codes. Move migrate_vma_collect_skip() above migrate_vma_collect_hole() to avoid compiler warning. Link: https://lkml.kernel.org/r/20210325131524.48181-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Cc: Alistair Popple Cc: Jerome Glisse Cc: Rafael Aquini Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 34f5e9b9d1990d286199084efa752530ee3d8297 Author: Miaohe Lin Date: Tue May 4 18:37:10 2021 -0700 mm/migrate.c: fix potential indeterminate pte entry in migrate_vma_insert_page() If the zone device page does not belong to un-addressable device memory, the variable entry will be uninitialized and lead to indeterminate pte entry ultimately. Fix this unexpected case and warn about it. Link: https://lkml.kernel.org/r/20210325131524.48181-4-linmiaohe@huawei.com Fixes: df6ad69838fc ("mm/device-public-memory: device memory cache coherent with CPU") Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Cc: Alistair Popple Cc: Jerome Glisse Cc: Rafael Aquini Cc: Yang Shi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a04840c6841bb266c38f51adc87325308ab8d575 Author: Miaohe Lin Date: Tue May 4 18:37:07 2021 -0700 mm/migrate.c: remove unnecessary rc != MIGRATEPAGE_SUCCESS check in 'else' case It's guaranteed that in the 'else' case of the rc == MIGRATEPAGE_SUCCESS check, rc does not equal to MIGRATEPAGE_SUCCESS. Remove this unnecessary check. Link: https://lkml.kernel.org/r/20210325131524.48181-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: Yang Shi Cc: Alistair Popple Cc: Jerome Glisse Cc: Rafael Aquini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 606a6f71a25accfc960a5063c23717ff07aa43a3 Author: Miaohe Lin Date: Tue May 4 18:37:04 2021 -0700 mm/migrate.c: make putback_movable_page() static Patch series "Cleanup and fixup for mm/migrate.c", v3. This series contains cleanups to remove unnecessary VM_BUG_ON_PAGE and rc != MIGRATEPAGE_SUCCESS check. Also use helper function to remove some duplicated codes. What's more, this fixes potential deadlock in NUMA balancing shared exec THP case and so on. More details can be found in the respective changelogs. This patch (of 5): The putback_movable_page() is just called by putback_movable_pages() and we know the page is locked and both PageMovable() and PageIsolated() is checked right before calling putback_movable_page(). So we make it static and remove all the 3 VM_BUG_ON_PAGE(). Link: https://lkml.kernel.org/r/20210325131524.48181-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210325131524.48181-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: David Hildenbrand Reviewed-by: Yang Shi Cc: Jerome Glisse Cc: Rafael Aquini Cc: Alistair Popple Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8cc621d2f45ddd3dc664024a647ee7adf48d79a5 Author: Minchan Kim Date: Tue May 4 18:37:00 2021 -0700 mm: fs: invalidate BH LRU during page migration Pages containing buffer_heads that are in one of the per-CPU buffer_head LRU caches will be pinned and thus cannot be migrated. This can prevent CMA allocations from succeeding, which are often used on platforms with co-processors (such as a DSP) that can only use physically contiguous memory. It can also prevent memory hot-unplugging from succeeding, which involves migrating at least MIN_MEMORY_BLOCK_SIZE bytes of memory, which ranges from 8 MiB to 1 GiB based on the architecture in use. Correspondingly, invalidate the BH LRU caches before a migration starts and stop any buffer_head from being cached in the LRU caches, until migration has finished. Link: https://lkml.kernel.org/r/20210319175127.886124-3-minchan@kernel.org Signed-off-by: Minchan Kim Reported-by: Chris Goldsworthy Reported-by: Laura Abbott Tested-by: Oliver Sang Cc: David Hildenbrand Cc: John Dias Cc: Matthew Wilcox Cc: Michal Hocko Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 361a2a229fa31ab7f2b236b5946e434964d00762 Author: Minchan Kim Date: Tue May 4 18:36:57 2021 -0700 mm: replace migrate_[prep|finish] with lru_cache_[disable|enable] Currently, migrate_[prep|finish] is merely a wrapper of lru_cache_[disable|enable]. There is not much to gain from having additional abstraction. Use lru_cache_[disable|enable] instead of migrate_[prep|finish], which would be more descriptive. note: migrate_prep_local in compaction.c changed into lru_add_drain to avoid CPU schedule cost with involving many other CPUs to keep old behavior. Link: https://lkml.kernel.org/r/20210319175127.886124-2-minchan@kernel.org Signed-off-by: Minchan Kim Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Cc: Chris Goldsworthy Cc: John Dias Cc: Matthew Wilcox Cc: Oliver Sang Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d479960e44f27e0e52ba31b21740b703c538027c Author: Minchan Kim Date: Tue May 4 18:36:54 2021 -0700 mm: disable LRU pagevec during the migration temporarily LRU pagevec holds refcount of pages until the pagevec are drained. It could prevent migration since the refcount of the page is greater than the expection in migration logic. To mitigate the issue, callers of migrate_pages drains LRU pagevec via migrate_prep or lru_add_drain_all before migrate_pages call. However, it's not enough because pages coming into pagevec after the draining call still could stay at the pagevec so it could keep preventing page migration. Since some callers of migrate_pages have retrial logic with LRU draining, the page would migrate at next trail but it is still fragile in that it doesn't close the fundamental race between upcoming LRU pages into pagvec and migration so the migration failure could cause contiguous memory allocation failure in the end. To close the race, this patch disables lru caches(i.e, pagevec) during ongoing migration until migrate is done. Since it's really hard to reproduce, I measured how many times migrate_pages retried with force mode(it is about a fallback to a sync migration) with below debug code. int migrate_pages(struct list_head *from, new_page_t get_new_page, .. .. if (rc && reason == MR_CONTIG_RANGE && pass > 2) { printk(KERN_ERR, "pfn 0x%lx reason %d", page_to_pfn(page), rc); dump_page(page, "fail to migrate"); } The test was repeating android apps launching with cma allocation in background every five seconds. Total cma allocation count was about 500 during the testing. With this patch, the dump_page count was reduced from 400 to 30. The new interface is also useful for memory hotplug which currently drains lru pcp caches after each migration failure. This is rather suboptimal as it has to disrupt others running during the operation. With the new interface the operation happens only once. This is also in line with pcp allocator cache which are disabled for the offlining as well. Link: https://lkml.kernel.org/r/20210319175127.886124-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Chris Goldsworthy Acked-by: Michal Hocko Cc: John Dias Cc: Suren Baghdasaryan Cc: Matthew Wilcox Cc: David Hildenbrand Cc: Vlastimil Babka Cc: Oliver Sang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 06dac2f467fe9269a433aa5056dd2ee1d20475e9 Author: Charan Teja Reddy Date: Tue May 4 18:36:51 2021 -0700 mm: compaction: update the COMPACT[STALL|FAIL] events properly By definition, COMPACT[STALL|FAIL] events needs to be counted when there is 'At least in one zone compaction wasn't deferred or skipped from the direct compaction'. And when compaction is skipped or deferred, COMPACT_SKIPPED will be returned but it will still go and update these compaction events which is wrong in the sense that COMPACT[STALL|FAIL] is counted without even trying the compaction. Correct this by skipping the counting of these events when COMPACT_SKIPPED is returned for compaction. This indirectly also avoid the unnecessary try into the get_page_from_freelist() when compaction is not even tried. There is a corner case where compaction is skipped but still count COMPACTSTALL event, which is that IRQ came and freed the page and the same is captured in capture_control. Link: https://lkml.kernel.org/r/1613151184-21213-1-git-send-email-charante@codeaurora.org Signed-off-by: Charan Teja Reddy Acked-by: Vlastimil Babka Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ef4984384172e93cc95e0e8cd102536d67e8a787 Author: Pintu Kumar Date: Tue May 4 18:36:48 2021 -0700 mm/compaction: remove unused variable sysctl_compact_memory The sysctl_compact_memory is mostly unused in mm/compaction.c It just acts as a place holder for sysctl to store .data. But the .data itself is not needed here. So we can get ride of this variable completely and make .data as NULL. This will also eliminate the extern declaration from header file. No functionality is broken or changed this way. Link: https://lkml.kernel.org/r/1614852224-14671-1-git-send-email-pintu@codeaurora.org Signed-off-by: Pintu Kumar Signed-off-by: Pintu Agarwal Reviewed-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 18bb473e5031213ebfa9a622c0b0f8cdcb8a5371 Author: Yang Shi Date: Tue May 4 18:36:45 2021 -0700 mm: vmscan: shrink deferred objects proportional to priority The number of deferred objects might get windup to an absurd number, and it results in clamp of slab objects. It is undesirable for sustaining workingset. So shrink deferred objects proportional to priority and cap nr_deferred to twice of cache items. The idea is borrowed from Dave Chinner's patch: https://lore.kernel.org/linux-xfs/20191031234618.15403-13-david@fromorbit.com/ Tested with kernel build and vfs metadata heavy workload in our production environment, no regression is spotted so far. Link: https://lkml.kernel.org/r/20210311190845.9708-14-shy828301@gmail.com Signed-off-by: Yang Shi Cc: Johannes Weiner Cc: Kirill Tkhai Cc: Michal Hocko Cc: Roman Gushchin Cc: Shakeel Butt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a178015cde69981cdcd8f109c5abc98703fead62 Author: Yang Shi Date: Tue May 4 18:36:42 2021 -0700 mm: memcontrol: reparent nr_deferred when memcg offline Now shrinker's nr_deferred is per memcg for memcg aware shrinkers, add to parent's corresponding nr_deferred when memcg offline. Link: https://lkml.kernel.org/r/20210311190845.9708-13-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 476b30a0949aec865dcc64d4c14f621b1a8afd12 Author: Yang Shi Date: Tue May 4 18:36:39 2021 -0700 mm: vmscan: don't need allocate shrinker->nr_deferred for memcg aware shrinkers Now nr_deferred is available on per memcg level for memcg aware shrinkers, so don't need allocate shrinker->nr_deferred for such shrinkers anymore. The prealloc_memcg_shrinker() would return -ENOSYS if !CONFIG_MEMCG or memcg is disabled by kernel command line, then shrinker's SHRINKER_MEMCG_AWARE flag would be cleared. This makes the implementation of this patch simpler. Link: https://lkml.kernel.org/r/20210311190845.9708-12-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Vlastimil Babka Reviewed-by: Kirill Tkhai Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 86750830468506dc27fa99c644534a7189be7975 Author: Yang Shi Date: Tue May 4 18:36:36 2021 -0700 mm: vmscan: use per memcg nr_deferred of shrinker Use per memcg's nr_deferred for memcg aware shrinkers. The shrinker's nr_deferred will be used in the following cases: 1. Non memcg aware shrinkers 2. !CONFIG_MEMCG 3. memcg is disabled by boot parameter Link: https://lkml.kernel.org/r/20210311190845.9708-11-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Roman Gushchin Acked-by: Kirill Tkhai Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3c6f17e6c5d048c8029578c475dd037dd5db58af Author: Yang Shi Date: Tue May 4 18:36:33 2021 -0700 mm: vmscan: add per memcg shrinker nr_deferred Currently the number of deferred objects are per shrinker, but some slabs, for example, vfs inode/dentry cache are per memcg, this would result in poor isolation among memcgs. The deferred objects typically are generated by __GFP_NOFS allocations, one memcg with excessive __GFP_NOFS allocations may blow up deferred objects, then other innocent memcgs may suffer from over shrink, excessive reclaim latency, etc. For example, two workloads run in memcgA and memcgB respectively, workload in B is vfs heavy workload. Workload in A generates excessive deferred objects, then B's vfs cache might be hit heavily (drop half of caches) by B's limit reclaim or global reclaim. We observed this hit in our production environment which was running vfs heavy workload shown as the below tracing log: <...>-409454 [016] .... 28286961.747146: mm_shrink_slab_start: super_cache_scan+0x0/0x1a0 ffff9a83046f3458: nid: 1 objects to shrink 3641681686040 gfp_flags GFP_HIGHUSER_MOVABLE|__GFP_ZERO pgs_scanned 1 lru_pgs 15721 cache items 246404277 delta 31345 total_scan 123202138 <...>-409454 [022] .... 28287105.928018: mm_shrink_slab_end: super_cache_scan+0x0/0x1a0 ffff9a83046f3458: nid: 1 unused scan count 3641681686040 new scan count 3641798379189 total_scan 602 last shrinker return val 123186855 The vfs cache and page cache ratio was 10:1 on this machine, and half of caches were dropped. This also resulted in significant amount of page caches were dropped due to inodes eviction. Make nr_deferred per memcg for memcg aware shrinkers would solve the unfairness and bring better isolation. The following patch will add nr_deferred to parent memcg when memcg offline. To preserve nr_deferred when reparenting memcgs to root, root memcg needs shrinker_info allocated too. When memcg is not enabled (!CONFIG_MEMCG or memcg disabled), the shrinker's nr_deferred would be used. And non memcg aware shrinkers use shrinker's nr_deferred all the time. Link: https://lkml.kernel.org/r/20210311190845.9708-10-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Roman Gushchin Acked-by: Kirill Tkhai Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 41ca668a71e7b03743369a2c6d8b8edc1e943dc8 Author: Yang Shi Date: Tue May 4 18:36:29 2021 -0700 mm: vmscan: use a new flag to indicate shrinker is registered Currently registered shrinker is indicated by non-NULL shrinker->nr_deferred. This approach is fine with nr_deferred at the shrinker level, but the following patches will move MEMCG_AWARE shrinkers' nr_deferred to memcg level, so their shrinker->nr_deferred would always be NULL. This would prevent the shrinkers from unregistering correctly. Remove SHRINKER_REGISTERING since we could check if shrinker is registered successfully by the new flag. Link: https://lkml.kernel.org/r/20210311190845.9708-9-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Kirill Tkhai Acked-by: Vlastimil Babka Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 468ab8437a97a953895856c3709e48b3067da13c Author: Yang Shi Date: Tue May 4 18:36:26 2021 -0700 mm: vmscan: add shrinker_info_protected() helper The shrinker_info is dereferenced in a couple of places via rcu_dereference_protected with different calling conventions, for example, using mem_cgroup_nodeinfo helper or dereferencing memcg->nodeinfo[nid]->shrinker_info. And the later patch will add more dereference places. So extract the dereference into a helper to make the code more readable. No functional change. [akpm@linux-foundation.org: retain rcu_dereference_protected() in free_shrinker_info(), per Hugh] Link: https://lkml.kernel.org/r/20210311190845.9708-8-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Roman Gushchin Acked-by: Kirill Tkhai Acked-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e4262c4f51d6373447c9d89093f49ff6b1e607be Author: Yang Shi Date: Tue May 4 18:36:23 2021 -0700 mm: memcontrol: rename shrinker_map to shrinker_info The following patch is going to add nr_deferred into shrinker_map, the change will make shrinker_map not only include map anymore, so rename it to "memcg_shrinker_info". And this should make the patch adding nr_deferred cleaner and readable and make review easier. Also remove the "memcg_" prefix. Link: https://lkml.kernel.org/r/20210311190845.9708-7-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 72673e861dd032ccaff533c0d9bb705d508017f7 Author: Yang Shi Date: Tue May 4 18:36:20 2021 -0700 mm: vmscan: use kvfree_rcu instead of call_rcu Using kvfree_rcu() to free the old shrinker_maps instead of call_rcu(). We don't have to define a dedicated callback for call_rcu() anymore. Link: https://lkml.kernel.org/r/20210311190845.9708-6-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Roman Gushchin Acked-by: Kirill Tkhai Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a2fb12619f202dcec83f22accc09d48347fd9138 Author: Yang Shi Date: Tue May 4 18:36:17 2021 -0700 mm: vmscan: remove memcg_shrinker_map_size Both memcg_shrinker_map_size and shrinker_nr_max is maintained, but actually the map size can be calculated via shrinker_nr_max, so it seems unnecessary to keep both. Remove memcg_shrinker_map_size since shrinker_nr_max is also used by iterating the bit map. Link: https://lkml.kernel.org/r/20210311190845.9708-5-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Acked-by: Vlastimil Babka Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d27cf2aa0d26a221982d04757cc32db97833ec29 Author: Yang Shi Date: Tue May 4 18:36:14 2021 -0700 mm: vmscan: use shrinker_rwsem to protect shrinker_maps allocation Since memcg_shrinker_map_size just can be changed under holding shrinker_rwsem exclusively, the read side can be protected by holding read lock, so it sounds superfluous to have a dedicated mutex. Kirill Tkhai suggested use write lock since: * We want the assignment to shrinker_maps is visible for shrink_slab_memcg(). * The rcu_dereference_protected() dereferrencing in shrink_slab_memcg(), but in case of we use READ lock in alloc_shrinker_maps(), the dereferrencing is not actually protected. * READ lock makes alloc_shrinker_info() racy against memory allocation fail. alloc_shrinker_info()->free_shrinker_info() may free memory right after shrink_slab_memcg() dereferenced it. You may say shrink_slab_memcg()->mem_cgroup_online() protects us from it? Yes, sure, but this is not the thing we want to remember in the future, since this spreads modularity. And a test with heavy paging workload didn't show write lock makes things worse. Link: https://lkml.kernel.org/r/20210311190845.9708-4-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2bfd36374edd9ed7f2ebf66cacebedf7273901cb Author: Yang Shi Date: Tue May 4 18:36:11 2021 -0700 mm: vmscan: consolidate shrinker_maps handling code The shrinker map management is not purely memcg specific, it is at the intersection between memory cgroup and shrinkers. It's allocation and assignment of a structure, and the only memcg bit is the map is being stored in a memcg structure. So move the shrinker_maps handling code into vmscan.c for tighter integration with shrinker code, and remove the "memcg_" prefix. There is no functional change. Link: https://lkml.kernel.org/r/20210311190845.9708-3-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8efb4b596df05f004e847d6bfadad3492b766ab3 Author: Yang Shi Date: Tue May 4 18:36:08 2021 -0700 mm: vmscan: use nid from shrink_control for tracepoint Patch series "Make shrinker's nr_deferred memcg aware", v10. Recently huge amount one-off slab drop was seen on some vfs metadata heavy workloads, it turned out there were huge amount accumulated nr_deferred objects seen by the shrinker. On our production machine, I saw absurd number of nr_deferred shown as the below tracing result: <...>-48776 [032] .... 27970562.458916: mm_shrink_slab_start: super_cache_scan+0x0/0x1a0 ffff9a83046f3458: nid: 0 objects to shrink 2531805877005 gfp_flags GFP_HIGHUSER_MOVABLE pgs_scanned 32 lru_pgs 9300 cache items 1667 delta 11 total_scan 833 There are 2.5 trillion deferred objects on one node, assuming all of them are dentry (192 bytes per object), so the total size of deferred on one node is ~480TB. It is definitely ridiculous. I managed to reproduce this problem with kernel build workload plus negative dentry generator. First step, run the below kernel build test script: NR_CPUS=`cat /proc/cpuinfo | grep -e processor | wc -l` cd /root/Buildarea/linux-stable for i in `seq 1500`; do cgcreate -g memory:kern_build echo 4G > /sys/fs/cgroup/memory/kern_build/memory.limit_in_bytes echo 3 > /proc/sys/vm/drop_caches cgexec -g memory:kern_build make clean > /dev/null 2>&1 cgexec -g memory:kern_build make -j$NR_CPUS > /dev/null 2>&1 cgdelete -g memory:kern_build done Then run the below negative dentry generator script: NR_CPUS=`cat /proc/cpuinfo | grep -e processor | wc -l` mkdir /sys/fs/cgroup/memory/test echo $$ > /sys/fs/cgroup/memory/test/tasks for i in `seq $NR_CPUS`; do while true; do FILE=`head /dev/urandom | tr -dc A-Za-z0-9 | head -c 64` cat $FILE 2>/dev/null done & done Then kswapd will shrink half of dentry cache in just one loop as the below tracing result showed: kswapd0-475 [028] .... 305968.252561: mm_shrink_slab_start: super_cache_scan+0x0/0x190 0000000024acf00c: nid: 0 objects to shrink 4994376020 gfp_flags GFP_KERNEL cache items 93689873 delta 45746 total_scan 46844936 priority 12 kswapd0-475 [021] .... 306013.099399: mm_shrink_slab_end: super_cache_scan+0x0/0x190 0000000024acf00c: nid: 0 unused scan count 4994376020 new scan count 4947576838 total_scan 8 last shrinker return val 46844928 There were huge number of deferred objects before the shrinker was called, the behavior does match the code but it might be not desirable from the user's stand of point. The excessive amount of nr_deferred might be accumulated due to various reasons, for example: * GFP_NOFS allocation * Significant times of small amount scan (< scan_batch, 1024 for vfs metadata) However the LRUs of slabs are per memcg (memcg-aware shrinkers) but the deferred objects is per shrinker, this may have some bad effects: * Poor isolation among memcgs. Some memcgs which happen to have frequent limit reclaim may get nr_deferred accumulated to a huge number, then other innocent memcgs may take the fall. In our case the main workload was hit. * Unbounded deferred objects. There is no cap for deferred objects, it can outgrow ridiculously as the tracing result showed. * Easy to get out of control. Although shrinkers take into account deferred objects, but it can go out of control easily. One misconfigured memcg could incur absurd amount of deferred objects in a period of time. * Sort of reclaim problems, i.e. over reclaim, long reclaim latency, etc. There may be hundred GB slab caches for vfe metadata heavy workload, shrink half of them may take minutes. We observed latency spike due to the prolonged reclaim. These issues also have been discussed in https://lore.kernel.org/linux-mm/20200916185823.5347-1-shy828301@gmail.com/. The patchset is the outcome of that discussion. So this patchset makes nr_deferred per-memcg to tackle the problem. It does: * Have memcg_shrinker_deferred per memcg per node, just like what shrinker_map does. Instead it is an atomic_long_t array, each element represent one shrinker even though the shrinker is not memcg aware, this simplifies the implementation. For memcg aware shrinkers, the deferred objects are just accumulated to its own memcg. The shrinkers just see nr_deferred from its own memcg. Non memcg aware shrinkers still use global nr_deferred from struct shrinker. * Once the memcg is offlined, its nr_deferred will be reparented to its parent along with LRUs. * The root memcg has memcg_shrinker_deferred array too. It simplifies the handling of reparenting to root memcg. * Cap nr_deferred to 2x of the length of lru. The idea is borrowed from Dave Chinner's series (https://lore.kernel.org/linux-xfs/20191031234618.15403-1-david@fromorbit.com/) The downside is each memcg has to allocate extra memory to store the nr_deferred array. On our production environment, there are typically around 40 shrinkers, so each memcg needs ~320 bytes. 10K memcgs would need ~3.2MB memory. It seems fine. We have been running the patched kernel on some hosts of our fleet (test and production) for months, it works very well. The monitor data shows the working set is sustained as expected. This patch (of 13): The tracepoint's nid should show what node the shrink happens on, the start tracepoint uses nid from shrinkctl, but the nid might be set to 0 before end tracepoint if the shrinker is not NUMA aware, so the tracing log may show the shrink happens on one node but end up on the other node. It seems confusing. And the following patch will remove using nid directly in do_shrink_slab(), this patch also helps cleanup the code. Link: https://lkml.kernel.org/r/20210311190845.9708-1-shy828301@gmail.com Link: https://lkml.kernel.org/r/20210311190845.9708-2-shy828301@gmail.com Signed-off-by: Yang Shi Acked-by: Vlastimil Babka Acked-by: Kirill Tkhai Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Dave Chinner Cc: Johannes Weiner Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 202e35db5e719ee8af6028183403f475e243f82d Author: Dave Hansen Date: Tue May 4 18:36:04 2021 -0700 mm/vmscan: replace implicit RECLAIM_ZONE checks with explicit checks RECLAIM_ZONE was assumed to be unused because it was never explicitly used in the kernel. However, there were a number of places where it was checked implicitly by checking 'node_reclaim_mode' for a zero value. These zero checks are not great because it is not obvious what a zero mode *means* in the code. Replace them with a helper which makes it more obvious: node_reclaim_enabled(). This helper also provides a handy place to explicitly check the RECLAIM_ZONE bit itself. Check it explicitly there to make it more obvious where the bit can affect behavior. This should have no functional impact. Link: https://lkml.kernel.org/r/20210219172559.BF589C44@viggo.jf.intel.com Signed-off-by: Dave Hansen Reviewed-by: Ben Widawsky Reviewed-by: Oscar Salvador Acked-by: Christoph Lameter Acked-by: David Rientjes Cc: Alex Shi Cc: "Tobin C. Harding" Cc: Huang Ying Cc: Dan Williams Cc: Qian Cai Cc: Daniel Wagner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b6676de8d7b48724d4cd3a3742c62fa525baa904 Author: Dave Hansen Date: Tue May 4 18:36:01 2021 -0700 mm/vmscan: move RECLAIM* bits to uapi header It is currently not obvious that the RECLAIM_* bits are part of the uapi since they are defined in vmscan.c. Move them to a uapi header to make it obvious. This should have no functional impact. Link: https://lkml.kernel.org/r/20210219172557.08074910@viggo.jf.intel.com Signed-off-by: Dave Hansen Reviewed-by: Ben Widawsky Reviewed-by: Oscar Salvador Acked-by: David Rientjes Acked-by: Christoph Lameter Cc: Alex Shi Cc: Daniel Wagner Cc: "Tobin C. Harding" Cc: Christoph Lameter Cc: Huang Ying Cc: Dan Williams Cc: Qian Cai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f0fa94330919be8ec5620382b50f1c72844c9224 Author: Axel Rasmussen Date: Tue May 4 18:35:57 2021 -0700 userfaultfd/selftests: add test exercising minor fault handling Fix a dormant bug in userfaultfd_events_test(), where we did `return faulting_process(0)` instead of `exit(faulting_process(0))`. This caused the forked process to keep running, trying to execute any further test cases after the events test in parallel with the "real" process. Add a simple test case which exercises minor faults. In short, it does the following: 1. "Sets up" an area (area_dst) and a second shared mapping to the same underlying pages (area_dst_alias). 2. Register one of these areas with userfaultfd, in minor fault mode. 3. Start a second thread to handle any minor faults. 4. Populate the underlying pages with the non-UFFD-registered side of the mapping. Basically, memset() each page with some arbitrary contents. 5. Then, using the UFFD-registered mapping, read all of the page contents, asserting that the contents match expectations (we expect the minor fault handling thread can modify the page contents before resolving the fault). The minor fault handling thread, upon receiving an event, flips all the bits (~) in that page, just to prove that it can modify it in some arbitrary way. Then it issues a UFFDIO_CONTINUE ioctl, to setup the mapping and resolve the fault. The reading thread should wake up and see this modification. Currently the minor fault test is only enabled in hugetlb_shared mode, as this is the only configuration the kernel feature supports. Link: https://lkml.kernel.org/r/20210301222728.176417-7-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b8da5cd4e5f1ce1274140e200a9116b7fe61dd87 Author: Axel Rasmussen Date: Tue May 4 18:35:53 2021 -0700 userfaultfd: update documentation to describe minor fault handling Reword / reorganize things a little bit into "lists", so new features / modes / ioctls can sort of just be appended. Describe how UFFDIO_REGISTER_MODE_MINOR and UFFDIO_CONTINUE can be used to intercept and resolve minor faults. Make it clear that COPY and ZEROPAGE are used for MISSING faults, whereas CONTINUE is used for MINOR faults. Link: https://lkml.kernel.org/r/20210301222728.176417-6-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f619147104c8ea71e120e4936d2b68ec11a1e527 Author: Axel Rasmussen Date: Tue May 4 18:35:49 2021 -0700 userfaultfd: add UFFDIO_CONTINUE ioctl This ioctl is how userspace ought to resolve "minor" userfaults. The idea is, userspace is notified that a minor fault has occurred. It might change the contents of the page using its second non-UFFD mapping, or not. Then, it calls UFFDIO_CONTINUE to tell the kernel "I have ensured the page contents are correct, carry on setting up the mapping". Note that it doesn't make much sense to use UFFDIO_{COPY,ZEROPAGE} for MINOR registered VMAs. ZEROPAGE maps the VMA to the zero page; but in the minor fault case, we already have some pre-existing underlying page. Likewise, UFFDIO_COPY isn't useful if we have a second non-UFFD mapping. We'd just use memcpy() or similar instead. It turns out hugetlb_mcopy_atomic_pte() already does very close to what we want, if an existing page is provided via `struct page **pagep`. We already special-case the behavior a bit for the UFFDIO_ZEROPAGE case, so just extend that design: add an enum for the three modes of operation, and make the small adjustments needed for the MCOPY_ATOMIC_CONTINUE case. (Basically, look up the existing page, and avoid adding the existing page to the page cache or calling set_page_huge_active() on it.) Link: https://lkml.kernel.org/r/20210301222728.176417-5-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Kravetz Cc: Mike Rapoport Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 714c189108244f1df579689061db1d785d92e7e2 Author: Axel Rasmussen Date: Tue May 4 18:35:45 2021 -0700 userfaultfd: hugetlbfs: only compile UFFD helpers if config enabled For background, mm/userfaultfd.c provides a general mcopy_atomic implementation. But some types of memory (i.e., hugetlb and shmem) need a slightly different implementation, so they provide their own helpers for this. In other words, userfaultfd is the only caller of these functions. This patch achieves two things: 1. Don't spend time compiling code which will end up never being referenced anyway (a small build time optimization). 2. In patches later in this series, we extend the signature of these helpers with UFFD-specific state (a mode enumeration). Once this happens, we *have to* either not compile the helpers, or unconditionally define the UFFD-only state (which seems messier to me). This includes the declarations in the headers, as otherwise they'd yield warnings about implicitly defining the type of those arguments. Link: https://lkml.kernel.org/r/20210301222728.176417-4-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Mike Kravetz Reviewed-by: Peter Xu Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0d9cadabd193c6008d256533f544de8206fd3a80 Author: Axel Rasmussen Date: Tue May 4 18:35:40 2021 -0700 userfaultfd: disable huge PMD sharing for MINOR registered VMAs As the comment says: for the MINOR fault use case, although the page might be present and populated in the other (non-UFFD-registered) half of the mapping, it may be out of date, and we explicitly want userspace to get a minor fault so it can check and potentially update the page's contents. Huge PMD sharing would prevent these faults from occurring for suitably aligned areas, so disable it upon UFFD registration. Link: https://lkml.kernel.org/r/20210301222728.176417-3-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Reviewed-by: Mike Kravetz Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7677f7fd8be76659cd2d0db8ff4093bbb51c20e5 Author: Axel Rasmussen Date: Tue May 4 18:35:36 2021 -0700 userfaultfd: add minor fault registration mode Patch series "userfaultfd: add minor fault handling", v9. Overview ======== This series adds a new userfaultfd feature, UFFD_FEATURE_MINOR_HUGETLBFS. When enabled (via the UFFDIO_API ioctl), this feature means that any hugetlbfs VMAs registered with UFFDIO_REGISTER_MODE_MISSING will *also* get events for "minor" faults. By "minor" fault, I mean the following situation: Let there exist two mappings (i.e., VMAs) to the same page(s) (shared memory). One of the mappings is registered with userfaultfd (in minor mode), and the other is not. Via the non-UFFD mapping, the underlying pages have already been allocated & filled with some contents. The UFFD mapping has not yet been faulted in; when it is touched for the first time, this results in what I'm calling a "minor" fault. As a concrete example, when working with hugetlbfs, we have huge_pte_none(), but find_lock_page() finds an existing page. We also add a new ioctl to resolve such faults: UFFDIO_CONTINUE. The idea is, userspace resolves the fault by either a) doing nothing if the contents are already correct, or b) updating the underlying contents using the second, non-UFFD mapping (via memcpy/memset or similar, or something fancier like RDMA, or etc...). In either case, userspace issues UFFDIO_CONTINUE to tell the kernel "I have ensured the page contents are correct, carry on setting up the mapping". Use Case ======== Consider the use case of VM live migration (e.g. under QEMU/KVM): 1. While a VM is still running, we copy the contents of its memory to a target machine. The pages are populated on the target by writing to the non-UFFD mapping, using the setup described above. The VM is still running (and therefore its memory is likely changing), so this may be repeated several times, until we decide the target is "up to date enough". 2. We pause the VM on the source, and start executing on the target machine. During this gap, the VM's user(s) will *see* a pause, so it is desirable to minimize this window. 3. Between the last time any page was copied from the source to the target, and when the VM was paused, the contents of that page may have changed - and therefore the copy we have on the target machine is out of date. Although we can keep track of which pages are out of date, for VMs with large amounts of memory, it is "slow" to transfer this information to the target machine. We want to resume execution before such a transfer would complete. 4. So, the guest begins executing on the target machine. The first time it touches its memory (via the UFFD-registered mapping), userspace wants to intercept this fault. Userspace checks whether or not the page is up to date, and if not, copies the updated page from the source machine, via the non-UFFD mapping. Finally, whether a copy was performed or not, userspace issues a UFFDIO_CONTINUE ioctl to tell the kernel "I have ensured the page contents are correct, carry on setting up the mapping". We don't have to do all of the final updates on-demand. The userfaultfd manager can, in the background, also copy over updated pages once it receives the map of which pages are up-to-date or not. Interaction with Existing APIs ============================== Because this is a feature, a registered VMA could potentially receive both missing and minor faults. I spent some time thinking through how the existing API interacts with the new feature: UFFDIO_CONTINUE cannot be used to resolve non-minor faults, as it does not allocate a new page. If UFFDIO_CONTINUE is used on a non-minor fault: - For non-shared memory or shmem, -EINVAL is returned. - For hugetlb, -EFAULT is returned. UFFDIO_COPY and UFFDIO_ZEROPAGE cannot be used to resolve minor faults. Without modifications, the existing codepath assumes a new page needs to be allocated. This is okay, since userspace must have a second non-UFFD-registered mapping anyway, thus there isn't much reason to want to use these in any case (just memcpy or memset or similar). - If UFFDIO_COPY is used on a minor fault, -EEXIST is returned. - If UFFDIO_ZEROPAGE is used on a minor fault, -EEXIST is returned (or -EINVAL in the case of hugetlb, as UFFDIO_ZEROPAGE is unsupported in any case). - UFFDIO_WRITEPROTECT simply doesn't work with shared memory, and returns -ENOENT in that case (regardless of the kind of fault). Future Work =========== This series only supports hugetlbfs. I have a second series in flight to support shmem as well, extending the functionality. This series is more mature than the shmem support at this point, and the functionality works fully on hugetlbfs, so this series can be merged first and then shmem support will follow. This patch (of 6): This feature allows userspace to intercept "minor" faults. By "minor" faults, I mean the following situation: Let there exist two mappings (i.e., VMAs) to the same page(s). One of the mappings is registered with userfaultfd (in minor mode), and the other is not. Via the non-UFFD mapping, the underlying pages have already been allocated & filled with some contents. The UFFD mapping has not yet been faulted in; when it is touched for the first time, this results in what I'm calling a "minor" fault. As a concrete example, when working with hugetlbfs, we have huge_pte_none(), but find_lock_page() finds an existing page. This commit adds the new registration mode, and sets the relevant flag on the VMAs being registered. In the hugetlb fault path, if we find that we have huge_pte_none(), but find_lock_page() does indeed find an existing page, then we have a "minor" fault, and if the VMA has the userfaultfd registration flag, we call into userfaultfd to handle it. This is implemented as a new registration mode, instead of an API feature. This is because the alternative implementation has significant drawbacks [1]. However, doing it this was requires we allocate a VM_* flag for the new registration mode. On 32-bit systems, there are no unused bits, so this feature is only supported on architectures with CONFIG_ARCH_USES_HIGH_VMA_FLAGS. When attempting to register a VMA in MINOR mode on 32-bit architectures, we return -EINVAL. [1] https://lore.kernel.org/patchwork/patch/1380226/ [peterx@redhat.com: fix minor fault page leak] Link: https://lkml.kernel.org/r/20210322175132.36659-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20210301222728.176417-1-axelrasmussen@google.com Link: https://lkml.kernel.org/r/20210301222728.176417-2-axelrasmussen@google.com Signed-off-by: Axel Rasmussen Reviewed-by: Peter Xu Reviewed-by: Mike Kravetz Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Catalin Marinas Cc: Chinwen Chang Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Nicholas Piggin Cc: Peter Xu Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Rostedt Cc: Steven Price Cc: Vlastimil Babka Cc: Adam Ruprecht Cc: Axel Rasmussen Cc: Cannon Matthews Cc: "Dr . David Alan Gilbert" Cc: David Rientjes Cc: Mina Almasry Cc: Oliver Upton Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb14d4eefdc4f0051a63973124f431798e16a8b2 Author: Oscar Salvador Date: Tue May 4 18:35:33 2021 -0700 mm,page_alloc: drop unnecessary checks from pfn_range_valid_contig pfn_range_valid_contig() bails out when it finds an in-use page or a hugetlb page, among other things. We can drop the in-use page check since __alloc_contig_pages can migrate away those pages, and the hugetlb page check can go too since isolate_migratepages_range is now capable of dealing with hugetlb pages. Either way, those checks are racy so let the end function handle it when the time comes. Link: https://lkml.kernel.org/r/20210419075413.1064-8-osalvador@suse.de Signed-off-by: Oscar Salvador Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Acked-by: Mike Kravetz Acked-by: Michal Hocko Cc: Muchun Song Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ae37c7ff79f1f030e28ec76c46ee032f8fd07607 Author: Oscar Salvador Date: Tue May 4 18:35:29 2021 -0700 mm: make alloc_contig_range handle in-use hugetlb pages alloc_contig_range() will fail if it finds a HugeTLB page within the range, without a chance to handle them. Since HugeTLB pages can be migrated as any LRU or Movable page, it does not make sense to bail out without trying. Enable the interface to recognize in-use HugeTLB pages so we can migrate them, and have much better chances to succeed the call. Link: https://lkml.kernel.org/r/20210419075413.1064-7-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: Mike Kravetz Acked-by: Michal Hocko Acked-by: David Hildenbrand Cc: Muchun Song Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 369fa227c21949b22fd7374506c4992a0d7bb580 Author: Oscar Salvador Date: Tue May 4 18:35:26 2021 -0700 mm: make alloc_contig_range handle free hugetlb pages alloc_contig_range will fail if it ever sees a HugeTLB page within the range we are trying to allocate, even when that page is free and can be easily reallocated. This has proved to be problematic for some users of alloc_contic_range, e.g: CMA and virtio-mem, where those would fail the call even when those pages lay in ZONE_MOVABLE and are free. We can do better by trying to replace such page. Free hugepages are tricky to handle so as to no userspace application notices disruption, we need to replace the current free hugepage with a new one. In order to do that, a new function called alloc_and_dissolve_huge_page is introduced. This function will first try to get a new fresh hugepage, and if it succeeds, it will replace the old one in the free hugepage pool. The free page replacement is done under hugetlb_lock, so no external users of hugetlb will notice the change. To allocate the new huge page, we use alloc_buddy_huge_page(), so we do not have to deal with any counters, and prep_new_huge_page() is not called. This is valulable because in case we need to free the new page, we only need to call __free_pages(). Once we know that the page to be replaced is a genuine 0-refcounted huge page, we remove the old page from the freelist by remove_hugetlb_page(). Then, we can call __prep_new_huge_page() and __prep_account_new_huge_page() for the new huge page to properly initialize it and increment the hstate->nr_huge_pages counter (previously decremented by remove_hugetlb_page()). Once done, the page is enqueued by enqueue_huge_page() and it is ready to be used. There is one tricky case when page's refcount is 0 because it is in the process of being released. A missing PageHugeFreed bit will tell us that freeing is in flight so we retry after dropping the hugetlb_lock. The race window should be small and the next retry should make a forward progress. E.g: CPU0 CPU1 free_huge_page() isolate_or_dissolve_huge_page PageHuge() == T alloc_and_dissolve_huge_page alloc_buddy_huge_page() spin_lock_irq(hugetlb_lock) // PageHuge() && !PageHugeFreed && // !PageCount() spin_unlock_irq(hugetlb_lock) spin_lock_irq(hugetlb_lock) 1) update_and_free_page PageHuge() == F __free_pages() 2) enqueue_huge_page SetPageHugeFreed() spin_unlock_irq(&hugetlb_lock) spin_lock_irq(hugetlb_lock) 1) PageHuge() == F (freed by case#1 from CPU0) 2) PageHuge() == T PageHugeFreed() == T - proceed with replacing the page In the case above we retry as the window race is quite small and we have high chances to succeed next time. With regard to the allocation, we restrict it to the node the page belongs to with __GFP_THISNODE, meaning we do not fallback on other node's zones. Note that gigantic hugetlb pages are fenced off since there is a cyclic dependency between them and alloc_contig_range. Link: https://lkml.kernel.org/r/20210419075413.1064-6-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Acked-by: David Hildenbrand Reviewed-by: Mike Kravetz Cc: Muchun Song Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d3d99fcc4e28f1a613744608c289d4f18b60b12f Author: Oscar Salvador Date: Tue May 4 18:35:23 2021 -0700 mm,hugetlb: split prep_new_huge_page functionality Currently, prep_new_huge_page() performs two functions. It sets the right state for a new hugetlb, and increases the hstate's counters to account for the new page. Let us split its functionality into two separate functions, decoupling the handling of the counters from initializing a hugepage. The outcome is having __prep_new_huge_page(), which only initializes the page , and __prep_account_new_huge_page(), which adds the new page to the hstate's counters. This allows us to be able to set a hugetlb without having to worry about the counter/locking. It will prove useful in the next patch. prep_new_huge_page() still calls both functions. Link: https://lkml.kernel.org/r/20210419075413.1064-5-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Reviewed-by: Mike Kravetz Reviewed-by: David Hildenbrand Cc: Muchun Song Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f27b34f234da7a185b4f1a2aa2cea2c47c458bf Author: Oscar Salvador Date: Tue May 4 18:35:20 2021 -0700 mm,hugetlb: drop clearing of flag from prep_new_huge_page Pages allocated via the page allocator or CMA get its private field cleared by means of post_alloc_hook(). Pages allocated during boot, that is directly from the memblock allocator, get cleared by paging_init()-> .. ->memmap_init_zone-> .. ->__init_single_page() before any memblock allocation. Based on this ground, let us remove the clearing of the flag from prep_new_huge_page() as it is not needed. This was a leftover from commit 6c0371490140 ("hugetlb: convert PageHugeFreed to HPageFreed flag"). Previously the explicit clearing was necessary because compound allocations do not get this initialization (see prep_compound_page). Link: https://lkml.kernel.org/r/20210419075413.1064-4-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Reviewed-by: Mike Kravetz Cc: Muchun Song Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c2ad7a1ffeafa32eb3b3b99835f210ad402a86ff Author: Oscar Salvador Date: Tue May 4 18:35:17 2021 -0700 mm,compaction: let isolate_migratepages_{range,block} return error codes Currently, isolate_migratepages_{range,block} and their callers use a pfn == 0 vs pfn != 0 scheme to let the caller know whether there was any error during isolation. This does not work as soon as we need to start reporting different error codes and make sure we pass them down the chain, so they are properly interpreted by functions like e.g: alloc_contig_range. Let us rework isolate_migratepages_{range,block} so we can report error codes. Since isolate_migratepages_block will stop returning the next pfn to be scanned, we reuse the cc->migrate_pfn field to keep track of that. Link: https://lkml.kernel.org/r/20210419075413.1064-3-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Vlastimil Babka Acked-by: Mike Kravetz Reviewed-by: David Hildenbrand Cc: Michal Hocko Cc: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c8e28b47af45c6acfc7a9256848562d4d5ef63a2 Author: Oscar Salvador Date: Tue May 4 18:35:14 2021 -0700 mm,page_alloc: bail out earlier on -ENOMEM in alloc_contig_migrate_range Patch series "Make alloc_contig_range handle Hugetlb pages", v10. alloc_contig_range lacks the ability to handle HugeTLB pages. This can be problematic for some users, e.g: CMA and virtio-mem, where those users will fail the call if alloc_contig_range ever sees a HugeTLB page, even when those pages lay in ZONE_MOVABLE and are free. That problem can be easily solved by replacing the page in the free hugepage pool. In-use HugeTLB are no exception though, as those can be isolated and migrated as any other LRU or Movable page. This aims to improve alloc_contig_range->isolate_migratepages_block, so that HugeTLB pages can be recognized and handled. Since we also need to start reporting errors down the chain (e.g: -ENOMEM due to not be able to allocate a new hugetlb page), isolate_migratepages_{range,block} interfaces need to change to start reporting error codes instead of the pfn == 0 vs pfn != 0 scheme it is using right now. From now on, isolate_migratepages_block will not return the next pfn to be scanned anymore, but -EINTR, -ENOMEM or 0, so we the next pfn to be scanned will be recorded in cc->migrate_pfn field (as it is already done in isolate_migratepages_range()). Below is an insight from David (thanks), where the problem can clearly be seen: "Start a VM with 4G. Hotplug 1G via virtio-mem and online it to ZONE_MOVABLE. Allocate 512 huge pages. [root@localhost ~]# cat /proc/meminfo MemTotal: 5061512 kB MemFree: 3319396 kB MemAvailable: 3457144 kB ... HugePages_Total: 512 HugePages_Free: 512 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB The huge pages get partially allocate from ZONE_MOVABLE. Try unplugging 1G via virtio-mem (remember, all ZONE_MOVABLE). Inside the guest: [ 180.058992] alloc_contig_range: [1b8000, 1c0000) PFNs busy [ 180.060531] alloc_contig_range: [1b8000, 1c0000) PFNs busy [ 180.061972] alloc_contig_range: [1b8000, 1c0000) PFNs busy [ 180.063413] alloc_contig_range: [1b8000, 1c0000) PFNs busy [ 180.064838] alloc_contig_range: [1b8000, 1c0000) PFNs busy [ 180.065848] alloc_contig_range: [1bfc00, 1c0000) PFNs busy [ 180.066794] alloc_contig_range: [1bfc00, 1c0000) PFNs busy [ 180.067738] alloc_contig_range: [1bfc00, 1c0000) PFNs busy [ 180.068669] alloc_contig_range: [1bfc00, 1c0000) PFNs busy [ 180.069598] alloc_contig_range: [1bfc00, 1c0000) PFNs busy" And then with this patchset running: "Same experiment with ZONE_MOVABLE: a) Free huge pages: all memory can get unplugged again. b) Allocated/populated but idle huge pages: all memory can get unplugged again. c) Allocated/populated but all 512 huge pages are read/written in a loop: all memory can get unplugged again, but I get a single [ 121.192345] alloc_contig_range: [180000, 188000) PFNs busy Most probably because it happened to try migrating a huge page while it was busy. As virtio-mem retries on ZONE_MOVABLE a couple of times, it can deal with this temporary failure. Last but not least, I did something extreme: # cat /proc/meminfo MemTotal: 5061568 kB MemFree: 186560 kB MemAvailable: 354524 kB ... HugePages_Total: 2048 HugePages_Free: 2048 HugePages_Rsvd: 0 HugePages_Surp: 0 Triggering unplug would require to dissolve+alloc - which now fails when trying to allocate an additional ~512 huge pages (1G). As expected, I can properly see memory unplug not fully succeeding. + I get a fairly continuous stream of [ 226.611584] alloc_contig_range: [19f400, 19f800) PFNs busy ... But more importantly, the hugepage count remains stable, as configured by the admin (me): HugePages_Total: 2048 HugePages_Free: 2048 HugePages_Rsvd: 0 HugePages_Surp: 0" This patch (of 7): Currently, __alloc_contig_migrate_range can generate -EINTR, -ENOMEM or -EBUSY, and report them down the chain. The problem is that when migrate_pages() reports -ENOMEM, we keep going till we exhaust all the try-attempts (5 at the moment) instead of bailing out. migrate_pages() bails out right away on -ENOMEM because it is considered a fatal error. Do the same here instead of keep going and retrying. Note that this is not fixing a real issue, just a cosmetic change. Although we can save some cycles by backing off ealier Link: https://lkml.kernel.org/r/20210419075413.1064-1-osalvador@suse.de Link: https://lkml.kernel.org/r/20210419075413.1064-2-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Vlastimil Babka Reviewed-by: David Hildenbrand Acked-by: Michal Hocko Acked-by: Mike Kravetz Cc: Muchun Song Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9487ca60fd7fa2c259f0daba8e2e01e51a64da05 Author: Mike Kravetz Date: Tue May 4 18:35:10 2021 -0700 hugetlb: add lockdep_assert_held() calls for hugetlb_lock After making hugetlb lock irq safe and separating some functionality done under the lock, add some lockdep_assert_held to help verify locking. Link: https://lkml.kernel.org/r/20210409205254.242291-9-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: Miaohe Lin Reviewed-by: Muchun Song Reviewed-by: Oscar Salvador Cc: "Aneesh Kumar K . V" Cc: Barry Song Cc: David Hildenbrand Cc: David Rientjes Cc: Hillf Danton Cc: HORIGUCHI NAOYA Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mina Almasry Cc: Peter Xu Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Shakeel Butt Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit db71ef79b59bb2e78dc4df83d0e4bf6beaa5c82d Author: Mike Kravetz Date: Tue May 4 18:35:07 2021 -0700 hugetlb: make free_huge_page irq safe Commit c77c0a8ac4c5 ("mm/hugetlb: defer freeing of huge pages if in non-task context") was added to address the issue of free_huge_page being called from irq context. That commit hands off free_huge_page processing to a workqueue if !in_task. However, this doesn't cover all the cases as pointed out by 0day bot lockdep report [1]. : Possible interrupt unsafe locking scenario: : : CPU0 CPU1 : ---- ---- : lock(hugetlb_lock); : local_irq_disable(); : lock(slock-AF_INET); : lock(hugetlb_lock); : : lock(slock-AF_INET); Shakeel has later explained that this is very likely TCP TX zerocopy from hugetlb pages scenario when the networking code drops a last reference to hugetlb page while having IRQ disabled. Hugetlb freeing path doesn't disable IRQ while holding hugetlb_lock so a lock dependency chain can lead to a deadlock. This commit addresses the issue by doing the following: - Make hugetlb_lock irq safe. This is mostly a simple process of changing spin_*lock calls to spin_*lock_irq* calls. - Make subpool lock irq safe in a similar manner. - Revert the !in_task check and workqueue handoff. [1] https://lore.kernel.org/linux-mm/000000000000f1c03b05bc43aadc@google.com/ Link: https://lkml.kernel.org/r/20210409205254.242291-8-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: Muchun Song Reviewed-by: Oscar Salvador Cc: "Aneesh Kumar K . V" Cc: Barry Song Cc: David Hildenbrand Cc: David Rientjes Cc: Hillf Danton Cc: HORIGUCHI NAOYA Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Peter Xu Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Shakeel Butt Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 10c6ec49802b1779c01fc029cfd92ea20ae33c06 Author: Mike Kravetz Date: Tue May 4 18:35:03 2021 -0700 hugetlb: change free_pool_huge_page to remove_pool_huge_page free_pool_huge_page was called with hugetlb_lock held. It would remove a hugetlb page, and then free the corresponding pages to the lower level allocators such as buddy. free_pool_huge_page was called in a loop to remove hugetlb pages and these loops could hold the hugetlb_lock for a considerable time. Create new routine remove_pool_huge_page to replace free_pool_huge_page. remove_pool_huge_page will remove the hugetlb page, and it must be called with the hugetlb_lock held. It will return the removed page and it is the responsibility of the caller to free the page to the lower level allocators. The hugetlb_lock is dropped before freeing to these allocators which results in shorter lock hold times. Add new helper routine to call update_and_free_page for a list of pages. Note: Some changes to the routine return_unused_surplus_pages are in need of explanation. Commit e5bbc8a6c992 ("mm/hugetlb.c: fix reservation race when freeing surplus pages") modified this routine to address a race which could occur when dropping the hugetlb_lock in the loop that removes pool pages. Accounting changes introduced in that commit were subtle and took some thought to understand. This commit removes the cond_resched_lock() and the potential race. Therefore, remove the subtle code and restore the more straight forward accounting effectively reverting the commit. Link: https://lkml.kernel.org/r/20210409205254.242291-7-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Reviewed-by: Muchun Song Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Cc: "Aneesh Kumar K . V" Cc: Barry Song Cc: David Hildenbrand Cc: David Rientjes Cc: Hillf Danton Cc: HORIGUCHI NAOYA Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Peter Xu Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Shakeel Butt Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1121828a0c213caa55ddd5ee23ee78e99cbdd33e Author: Mike Kravetz Date: Tue May 4 18:34:59 2021 -0700 hugetlb: call update_and_free_page without hugetlb_lock With the introduction of remove_hugetlb_page(), there is no need for update_and_free_page to hold the hugetlb lock. Change all callers to drop the lock before calling. With additional code modifications, this will allow loops which decrease the huge page pool to drop the hugetlb_lock with each page to reduce long hold times. The ugly unlock/lock cycle in free_pool_huge_page will be removed in a subsequent patch which restructures free_pool_huge_page. Link: https://lkml.kernel.org/r/20210409205254.242291-6-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: Muchun Song Reviewed-by: Miaohe Lin Reviewed-by: Oscar Salvador Cc: "Aneesh Kumar K . V" Cc: Barry Song Cc: David Hildenbrand Cc: David Rientjes Cc: Hillf Danton Cc: HORIGUCHI NAOYA Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mina Almasry Cc: Peter Xu Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Shakeel Butt Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6eb4e88a6d27022ea8aff424d47a0a5dfc9fcb34 Author: Mike Kravetz Date: Tue May 4 18:34:55 2021 -0700 hugetlb: create remove_hugetlb_page() to separate functionality The new remove_hugetlb_page() routine is designed to remove a hugetlb page from hugetlbfs processing. It will remove the page from the active or free list, update global counters and set the compound page destructor to NULL so that PageHuge() will return false for the 'page'. After this call, the 'page' can be treated as a normal compound page or a collection of base size pages. update_and_free_page no longer decrements h->nr_huge_pages{_node} as this is performed in remove_hugetlb_page. The only functionality performed by update_and_free_page is to free the base pages to the lower level allocators. update_and_free_page is typically called after remove_hugetlb_page. remove_hugetlb_page is to be called with the hugetlb_lock held. Creating this routine and separating functionality is in preparation for restructuring code to reduce lock hold times. This commit should not introduce any changes to functionality. Link: https://lkml.kernel.org/r/20210409205254.242291-5-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: Miaohe Lin Reviewed-by: Muchun Song Reviewed-by: Oscar Salvador Cc: "Aneesh Kumar K . V" Cc: Barry Song Cc: David Hildenbrand Cc: David Rientjes Cc: Hillf Danton Cc: HORIGUCHI NAOYA Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mina Almasry Cc: Peter Xu Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Shakeel Butt Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2938396771c8fd0870b5284319f9e78b4b552a79 Author: Mike Kravetz Date: Tue May 4 18:34:52 2021 -0700 hugetlb: add per-hstate mutex to synchronize user adjustments The helper routine hstate_next_node_to_alloc accesses and modifies the hstate variable next_nid_to_alloc. The helper is used by the routines alloc_pool_huge_page and adjust_pool_surplus. adjust_pool_surplus is called with hugetlb_lock held. However, alloc_pool_huge_page can not be called with the hugetlb lock held as it will call the page allocator. Two instances of alloc_pool_huge_page could be run in parallel or alloc_pool_huge_page could run in parallel with adjust_pool_surplus which may result in the variable next_nid_to_alloc becoming invalid for the caller and pages being allocated on the wrong node. Both alloc_pool_huge_page and adjust_pool_surplus are only called from the routine set_max_huge_pages after boot. set_max_huge_pages is only called as the reusult of a user writing to the proc/sysfs nr_hugepages, or nr_hugepages_mempolicy file to adjust the number of hugetlb pages. It makes little sense to allow multiple adjustment to the number of hugetlb pages in parallel. Add a mutex to the hstate and use it to only allow one hugetlb page adjustment at a time. This will synchronize modifications to the next_nid_to_alloc variable. Link: https://lkml.kernel.org/r/20210409205254.242291-4-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: Miaohe Lin Reviewed-by: Muchun Song Reviewed-by: David Hildenbrand Cc: "Aneesh Kumar K . V" Cc: Barry Song Cc: David Rientjes Cc: Hillf Danton Cc: HORIGUCHI NAOYA Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Mina Almasry Cc: Peter Xu Cc: Peter Zijlstra Cc: Roman Gushchin Cc: Shakeel Butt Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 262443c0421e832e5312d2b14e0a2640a9f064d7 Author: Mike Kravetz Date: Tue May 4 18:34:48 2021 -0700 hugetlb: no need to drop hugetlb_lock to call cma_release Now that cma_release is non-blocking and irq safe, there is no need to drop hugetlb_lock before calling. Link: https://lkml.kernel.org/r/20210409205254.242291-3-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Roman Gushchin Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Reviewed-by: David Hildenbrand Cc: "Aneesh Kumar K . V" Cc: Barry Song Cc: David Rientjes Cc: Hillf Danton Cc: HORIGUCHI NAOYA Cc: Joonsoo Kim Cc: Matthew Wilcox Cc: Miaohe Lin Cc: Mina Almasry Cc: Muchun Song Cc: Peter Xu Cc: Peter Zijlstra Cc: Shakeel Butt Cc: Waiman Long Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0ef7dcac998fefc4767b7f10eb3b6df150c38a4e Author: Mike Kravetz Date: Tue May 4 18:34:44 2021 -0700 mm/cma: change cma mutex to irq safe spinlock Patch series "make hugetlb put_page safe for all calling contexts", v5. This effort is the result a recent bug report [1]. Syzbot found a potential deadlock in the hugetlb put_page/free_huge_page_path. WARNING: SOFTIRQ-safe -> SOFTIRQ-unsafe lock order detected Since the free_huge_page_path already has code to 'hand off' page free requests to a workqueue, a suggestion was proposed to make the in_irq() detection accurate by always enabling PREEMPT_COUNT [2]. The outcome of that discussion was that the hugetlb put_page path (free_huge_page) path should be properly fixed and safe for all calling contexts. [1] https://lore.kernel.org/linux-mm/000000000000f1c03b05bc43aadc@google.com/ [2] http://lkml.kernel.org/r/20210311021321.127500-1-mike.kravetz@oracle.com This patch (of 8): cma_release is currently a sleepable operatation because the bitmap manipulation is protected by cma->lock mutex. Hugetlb code which relies on cma_release for CMA backed (giga) hugetlb pages, however, needs to be irq safe. The lock doesn't protect any sleepable operation so it can be changed to a (irq aware) spin lock. The bitmap processing should be quite fast in typical case but if cma sizes grow to TB then we will likely need to replace the lock by a more optimized bitmap implementation. Link: https://lkml.kernel.org/r/20210409205254.242291-1-mike.kravetz@oracle.com Link: https://lkml.kernel.org/r/20210409205254.242291-2-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michal Hocko Reviewed-by: David Hildenbrand Acked-by: Roman Gushchin Cc: Shakeel Butt Cc: Oscar Salvador Cc: Muchun Song Cc: David Rientjes Cc: Miaohe Lin Cc: Peter Zijlstra Cc: Matthew Wilcox Cc: HORIGUCHI NAOYA Cc: "Aneesh Kumar K . V" Cc: Waiman Long Cc: Peter Xu Cc: Mina Almasry Cc: Hillf Danton Cc: Joonsoo Kim Cc: Barry Song Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 15b8365363215da82cb019d3de0eb781c9e82564 Author: Miaohe Lin Date: Tue May 4 18:34:41 2021 -0700 mm/hugetlb: remove unused variable pseudo_vma in remove_inode_hugepages() The local variable pseudo_vma is not used anymore. Link: https://lkml.kernel.org/r/20210410072348.20437-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Feilong Lin Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da56388c4397878a65b74f7fe97760f5aa7d316b Author: Miaohe Lin Date: Tue May 4 18:34:38 2021 -0700 mm/hugeltb: handle the error case in hugetlb_fix_reserve_counts() A rare out of memory error would prevent removal of the reserve map region for a page. hugetlb_fix_reserve_counts() handles this rare case to avoid dangling with incorrect counts. Unfortunately, hugepage_subpool_get_pages and hugetlb_acct_memory could possibly fail too. We should correctly handle these cases. Link: https://lkml.kernel.org/r/20210410072348.20437-5-linmiaohe@huawei.com Fixes: b5cec28d36f5 ("hugetlbfs: truncate_hugepages() takes a range of pages") Signed-off-by: Miaohe Lin Cc: Feilong Lin Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dddf31a49a0eb858bba58876c3c67dd8ea81b800 Author: Miaohe Lin Date: Tue May 4 18:34:35 2021 -0700 mm/hugeltb: clarify (chg - freed) won't go negative in hugetlb_unreserve_pages() The resv_map could be NULL since this routine can be called in the evict inode path for all hugetlbfs inodes and we will have chg = 0 in this case. But (chg - freed) won't go negative as Mike pointed out: "If resv_map is NULL, then no hugetlb pages can be allocated/associated with the file. As a result, remove_inode_hugepages will never find any huge pages associated with the inode and the passed value 'freed' will always be zero." Add a comment clarifying this to make it clear and also avoid confusion. Link: https://lkml.kernel.org/r/20210410072348.20437-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Feilong Lin Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bf3d12b9f7f9e7c4ae4aa94c6c81400d3bf688e6 Author: Miaohe Lin Date: Tue May 4 18:34:32 2021 -0700 mm/hugeltb: simplify the return code of __vma_reservation_common() It's guaranteed that the vma is associated with a resv_map, i.e. either VM_MAYSHARE or HPAGE_RESV_OWNER, when the code reaches here or we would have returned via !resv check above. So it's unneeded to check whether HPAGE_RESV_OWNER is set here. Simplify the return code to make it more clear. Link: https://lkml.kernel.org/r/20210410072348.20437-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Feilong Lin Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f84df0b7f1b603f6c99670bdf2f908f0b6a5ed59 Author: Miaohe Lin Date: Tue May 4 18:34:30 2021 -0700 mm/hugeltb: remove redundant VM_BUG_ON() in region_add() Patch series "Cleanup and fixup for hugetlb", v2. This series contains cleanups to remove redundant VM_BUG_ON() and simplify the return code. Also this handles the error case in hugetlb_fix_reserve_counts() correctly. More details can be found in the respective changelogs. This patch (of 5): The same VM_BUG_ON() check is already done in the callee. Remove this extra one to simplify the code slightly. Link: https://lkml.kernel.org/r/20210410072348.20437-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210410072348.20437-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Cc: Feilong Lin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fbe37501b2526a71d82b898671260524279c6765 Author: Zi Yan Date: Tue May 4 18:34:26 2021 -0700 mm: huge_memory: debugfs for file-backed THP split Further extend /split_huge_pages to accept ",," for file-backed THP split tests since tmpfs may have file backed by THP that mapped nowhere. Update selftest program to test file-backed THP split too. Link: https://lkml.kernel.org/r/20210331235309.332292-2-zi.yan@sent.com Signed-off-by: Zi Yan Suggested-by: Kirill A. Shutemov Reviewed-by: Yang Shi Cc: "Kirill A . Shutemov" Cc: Shuah Khan Cc: John Hubbard Cc: Sandipan Das Cc: David Hildenbrand Cc: Mika Penttila Cc: David Rientjes Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fa6c02315f745f00b62c634b220c3fb5c3310258 Author: Zi Yan Date: Tue May 4 18:34:23 2021 -0700 mm: huge_memory: a new debugfs interface for splitting THP tests We did not have a direct user interface of splitting the compound page backing a THP and there is no need unless we want to expose the THP implementation details to users. Make /split_huge_pages accept a new command to do that. By writing ",," to /split_huge_pages, THPs within the given virtual address range from the process with the given pid are split. It is used to test split_huge_page function. In addition, a selftest program is added to tools/testing/selftests/vm to utilize the interface by splitting PMD THPs and PTE-mapped THPs. This does not change the old behavior, i.e., writing 1 to the interface to split all THPs in the system. Link: https://lkml.kernel.org/r/20210331235309.332292-1-zi.yan@sent.com Signed-off-by: Zi Yan Reviewed-by: Yang Shi Cc: David Hildenbrand Cc: David Rientjes Cc: John Hubbard Cc: "Kirill A . Shutemov" Cc: Matthew Wilcox Cc: Mika Penttila Cc: Sandipan Das Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 75f83783bfdf2ddb3ffbf79ba44d506fb5b5548f Author: Miaohe Lin Date: Tue May 4 18:34:20 2021 -0700 khugepaged: remove meaningless !pte_present() check in khugepaged_scan_pmd() We know it must meet the !is_swap_pte() and !pte_none() condition if we reach here. Since !is_swap_pte() indicates pte_none() or pte_present() is met, it's guaranteed that pte must be present here. Link: https://lkml.kernel.org/r/20210325135647.64106-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zi Yan Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 18d24a7cd9d3f35cfa8bed32a921a94159c78df0 Author: Miaohe Lin Date: Tue May 4 18:34:17 2021 -0700 khugepaged: remove unnecessary out label in collapse_huge_page() The out label here is unneeded because it just goes to out_up_write label. Remove it to make code more concise. Link: https://lkml.kernel.org/r/20210325135647.64106-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zi Yan Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fef792a4fdb9b2d9d3d5c36aaa85f768f456a4d7 Author: Miaohe Lin Date: Tue May 4 18:34:15 2021 -0700 khugepaged: use helper function range_in_vma() in collapse_pte_mapped_thp() Patch series "Cleanup for khugepaged". This series contains cleanups to remove unnecessary out label and meaningless !pte_present() check. Also use helper function to simplify the code. More details can be found in the respective changelogs. This patch (of 3): We could use helper function range_in_vma() to check whether the desired range is inside the vma to simplify the code. Link: https://lkml.kernel.org/r/20210325135647.64106-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210325135647.64106-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zi Yan Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 89dc6a9682919dbd64213c630a71eedaa021d7e5 Author: Yanfei Xu Date: Tue May 4 18:34:12 2021 -0700 mm/khugepaged.c: replace barrier() with READ_ONCE() for a selective variable READ_ONCE() is more selective and lightweight. It is more appropriate that using a READ_ONCE() for the certain variable to prevent the compiler from reordering. Link: https://lkml.kernel.org/r/20210323092730.247583-1-yanfei.xu@windriver.com Signed-off-by: Yanfei Xu Acked-by: Kirill A. Shutemov Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a44f89dc6c5f8ba70240b81a570260d29d04bcb0 Author: Miaohe Lin Date: Tue May 4 18:34:08 2021 -0700 mm/huge_memory.c: use helper function migration_entry_to_page() It's more recommended to use helper function migration_entry_to_page() to get the page via migration entry. We can also enjoy the PageLocked() check there. Link: https://lkml.kernel.org/r/20210318122722.13135-7-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Peter Xu Cc: Aneesh Kumar K.V Cc: Matthew Wilcox Cc: Michel Lespinasse Cc: Ralph Campbell Cc: Thomas Hellstrm (Intel) Cc: Vlastimil Babka Cc: Wei Yang Cc: William Kucharski Cc: Yang Shi Cc: yuleixzhang Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d4afd60c24f87b6275b12ec3d67d8c2ad78cb075 Author: Miaohe Lin Date: Tue May 4 18:34:05 2021 -0700 mm/huge_memory.c: remove unused macro TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG Commit 4958e4d86ecb ("mm: thp: remove debug_cow switch") forgot to remove TRANSPARENT_HUGEPAGE_DEBUG_COW_FLAG macro. Remove it here. Link: https://lkml.kernel.org/r/20210318122722.13135-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zi Yan Reviewed-by: Peter Xu Cc: Aneesh Kumar K.V Cc: Matthew Wilcox Cc: Michel Lespinasse Cc: Ralph Campbell Cc: Thomas Hellstrm (Intel) Cc: Vlastimil Babka Cc: Wei Yang Cc: William Kucharski Cc: Yang Shi Cc: yuleixzhang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6004e73ae955d0a44d66a5709ec5f98c07c733f Author: Miaohe Lin Date: Tue May 4 18:34:02 2021 -0700 mm/huge_memory.c: remove redundant PageCompound() check The !PageCompound() check limits the page must be head or tail while !PageHead() further limits it to page head only. So !PageHead() check is equivalent here. Link: https://lkml.kernel.org/r/20210318122722.13135-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Peter Xu Cc: Aneesh Kumar K.V Cc: Matthew Wilcox Cc: Michel Lespinasse Cc: Ralph Campbell Cc: Thomas Hellstrm (Intel) Cc: Vlastimil Babka Cc: Wei Yang Cc: William Kucharski Cc: Yang Shi Cc: yuleixzhang Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6beb5e8bba972e15276a27555f2f4b834b248742 Author: Miaohe Lin Date: Tue May 4 18:33:59 2021 -0700 mm/huge_memory.c: rework the function do_huge_pmd_numa_page() slightly The current code that checks if migrating misplaced transhuge page is needed is pretty hard to follow. Rework it and add a comment to make its logic more clear and improve readability. Link: https://lkml.kernel.org/r/20210318122722.13135-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zi Yan Reviewed-by: Peter Xu Cc: Aneesh Kumar K.V Cc: Matthew Wilcox Cc: Michel Lespinasse Cc: Ralph Campbell Cc: Thomas Hellstrm (Intel) Cc: Vlastimil Babka Cc: Wei Yang Cc: William Kucharski Cc: Yang Shi Cc: yuleixzhang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aaa9705b4af3608fd759c9ba8d0003f7a83fb335 Author: Miaohe Lin Date: Tue May 4 18:33:55 2021 -0700 mm/huge_memory.c: make get_huge_zero_page() return bool It's guaranteed that huge_zero_page will not be NULL if huge_zero_refcount is increased successfully. When READ_ONCE(huge_zero_page) is returned, there must be a huge_zero_page and it can be replaced with returning 'true' when we do not care about the value of huge_zero_page. We can thus make it return bool to save READ_ONCE cpu cycles as the return value is just used to check if huge_zero_page exists. Link: https://lkml.kernel.org/r/20210318122722.13135-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Zi Yan Reviewed-by: Peter Xu Cc: Aneesh Kumar K.V Cc: Matthew Wilcox Cc: Michel Lespinasse Cc: Ralph Campbell Cc: Thomas Hellstrm (Intel) Cc: Vlastimil Babka Cc: Wei Yang Cc: William Kucharski Cc: Yang Shi Cc: yuleixzhang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 71f9e58eb408db423e0e27b55e0de66fb3590296 Author: Miaohe Lin Date: Tue May 4 18:33:52 2021 -0700 mm/huge_memory.c: rework the function vma_adjust_trans_huge() Patch series "Some cleanups for huge_memory", v3. This series contains cleanups to rework some function logics to make it more readable, use helper function and so on. More details can be found in the respective changelogs. This patch (of 6): The current implementation of vma_adjust_trans_huge() contains some duplicated codes. Add helper function to get rid of these codes to make it more succinct. Link: https://lkml.kernel.org/r/20210318122722.13135-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210318122722.13135-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Peter Xu Cc: Zi Yan Cc: Matthew Wilcox Cc: William Kucharski Cc: Vlastimil Babka Cc: Peter Xu Cc: yuleixzhang Cc: Michel Lespinasse Cc: Aneesh Kumar K.V Cc: Ralph Campbell Cc: Thomas Hellstrm (Intel) Cc: Yang Shi Cc: Wei Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8fd5eda4c7268b62f46b2ed76b96f9e41e128a47 Author: Miaohe Lin Date: Tue May 4 18:33:49 2021 -0700 mm/huge_memory.c: remove unnecessary local variable ret2 There is no need to use a new local variable ret2 to get the return value of handle_userfault(). Use ret directly to make code more succinct. Link: https://lkml.kernel.org/r/20210210072409.60587-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Andrew Morton Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74e579bf231a337ab3786d59e64bc94f45ca7b3f Author: Miaohe Lin Date: Tue May 4 18:33:46 2021 -0700 khugepaged: fix wrong result value for trace_mm_collapse_huge_page_isolate() In writable and !referenced case, the result value should be SCAN_LACK_REFERENCED_PAGE for trace_mm_collapse_huge_page_isolate() instead of default 0 (SCAN_FAIL) here. Link: https://lkml.kernel.org/r/20210306032947.35921-5-linmiaohe@huawei.com Fixes: 7d2eba0557c1 ("mm: add tracepoint for scanning pages") Signed-off-by: Miaohe Lin Acked-by: Kirill A. Shutemov Cc: Dan Carpenter Cc: Ebru Akagunduz Cc: Mike Kravetz Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 28ff0a3c421ca19f4c8b41f736ff388fd588e1a1 Author: Miaohe Lin Date: Tue May 4 18:33:43 2021 -0700 khugepaged: use helper khugepaged_test_exit() in __khugepaged_enter() Commit 4d45e75a9955 ("mm: remove the now-unnecessary mmget_still_valid() hack") have made khugepaged_test_exit() suitable for check mm->mm_users against 0. Use this helper here. Link: https://lkml.kernel.org/r/20210306032947.35921-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Kirill A. Shutemov Cc: Dan Carpenter Cc: Ebru Akagunduz Cc: Mike Kravetz Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 588d01f918d42d2d453d8cd5af6bf2c2e1072a47 Author: Miaohe Lin Date: Tue May 4 18:33:40 2021 -0700 khugepaged: reuse the smp_wmb() inside __SetPageUptodate() smp_wmb() is needed to avoid the copy_huge_page writes to become visible after the set_pmd_at() write here. But we can reuse the smp_wmb() inside __SetPageUptodate() to remove this redundant one. Link: https://lkml.kernel.org/r/20210306032947.35921-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Kirill A. Shutemov Cc: Dan Carpenter Cc: Ebru Akagunduz Cc: Mike Kravetz Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0edf61e5ee5c334f33bb7bf95d1b470f01ae9fec Author: Miaohe Lin Date: Tue May 4 18:33:37 2021 -0700 khugepaged: remove unneeded return value of khugepaged_collapse_pte_mapped_thps() Patch series "Cleanup and fixup for khugepaged", v2. This series contains cleanups to remove unneeded return value, use helper function and so on. And there is one fix to correct the wrong result value for trace_mm_collapse_huge_page_isolate(). This patch (of 4): The return value of khugepaged_collapse_pte_mapped_thps() is never checked since it's introduced. We should remove such unneeded return value. Link: https://lkml.kernel.org/r/20210306032947.35921-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210306032947.35921-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Acked-by: Kirill A. Shutemov Cc: Rik van Riel Cc: Ebru Akagunduz Cc: Dan Carpenter Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d4241a049ac0049fe96b3dae0598092517dbf6bd Author: Miaohe Lin Date: Tue May 4 18:33:34 2021 -0700 mm/hugetlb: avoid calculating fault_mutex_hash in truncate_op case The fault_mutex hashing overhead can be avoided in truncate_op case because page faults can not race with truncation in this routine. So calculate hash for fault_mutex only in !truncate_op case to save some cpu cycles. Link: https://lkml.kernel.org/r/20210308112809.26107-6-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d83e6c8a9b65876b0dcd11ca25e8c39bd7bb1a1c Author: Miaohe Lin Date: Tue May 4 18:33:31 2021 -0700 mm/hugetlb: simplify the code when alloc_huge_page() failed in hugetlb_no_page() Rework the error handling code when alloc_huge_page() failed to remove some duplicated code and simplify the code slightly. Link: https://lkml.kernel.org/r/20210308112809.26107-5-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5c8ecb131a655e775287380428ac1c764c117ee6 Author: Miaohe Lin Date: Tue May 4 18:33:28 2021 -0700 mm/hugetlb_cgroup: remove unnecessary VM_BUG_ON_PAGE in hugetlb_cgroup_migrate() !PageHuge(oldhpage) is implicitly checked in page_hstate() above, so we remove this explicit one. Link: https://lkml.kernel.org/r/20210308112809.26107-4-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5af1ab1d24e0842e2ca72c1fd0833864f6fa458a Author: Miaohe Lin Date: Tue May 4 18:33:25 2021 -0700 mm/hugetlb: optimize the surplus state transfer code in move_hugetlb_state() We should not transfer the per-node surplus state when we do not cross the node in order to save some cpu cycles Link: https://lkml.kernel.org/r/20210308112809.26107-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 04adbc3f7bff403a97355531da0190a263d66ea5 Author: Miaohe Lin Date: Tue May 4 18:33:22 2021 -0700 mm/hugetlb: use some helper functions to cleanup code Patch series "Some cleanups for hugetlb". This series contains cleanups to remove unnecessary VM_BUG_ON_PAGE, use helper function and so on. I also collect some previous patches into this series in case they are forgotten. This patch (of 5): We could use pages_per_huge_page to get the number of pages per hugepage, use get_hstate_idx to calculate hstate index, and use hstate_is_gigantic to check if a hstate is gigantic to make code more succinct. Link: https://lkml.kernel.org/r/20210308112809.26107-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210308112809.26107-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4bfb68a0858deae4c40ea585037a3261f0717b0a Author: Anshuman Khandual Date: Tue May 4 18:33:19 2021 -0700 mm: generalize HUGETLB_PAGE_SIZE_VARIABLE HUGETLB_PAGE_SIZE_VARIABLE need not be defined for each individual platform subscribing it. Instead just make it generic. Link: https://lkml.kernel.org/r/1614914928-22039-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Acked-by: Michael Ellerman [powerpc] Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Christophe Leroy Cc: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6501fe5f162395ba6dfa6ac86be05f1c24c1a7e0 Author: Miaohe Lin Date: Tue May 4 18:33:16 2021 -0700 mm/hugetlb: remove redundant reservation check condition in alloc_huge_page() vma_resv_map(vma) checks if a reserve map is associated with the vma. The routine vma_needs_reservation() will check vma_resv_map(vma) and return 1 if no reserv map is present. map_chg is set to the return value of vma_needs_reservation(). Therefore, !vma_resv_map(vma) is redundant in the expression: map_chg || avoid_reserve || !vma_resv_map(vma); Remove the redundant check. [Thanks Mike Kravetz for reshaping this commit message!] Link: https://lkml.kernel.org/r/20210301104726.45159-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6dfeaff93be1a4cab4fb48dad7df326d05059a99 Author: Peter Xu Date: Tue May 4 18:33:13 2021 -0700 hugetlb/userfaultfd: unshare all pmds for hugetlbfs when register wp Huge pmd sharing for hugetlbfs is racy with userfaultfd-wp because userfaultfd-wp is always based on pgtable entries, so they cannot be shared. Walk the hugetlb range and unshare all such mappings if there is, right before UFFDIO_REGISTER will succeed and return to userspace. This will pair with want_pmd_share() in hugetlb code so that huge pmd sharing is completely disabled for userfaultfd-wp registered range. Link: https://lkml.kernel.org/r/20210218231206.15524-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Cc: Peter Xu Cc: Andrea Arcangeli Cc: Axel Rasmussen Cc: Mike Rapoport Cc: Kirill A. Shutemov Cc: Matthew Wilcox (Oracle) Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Anshuman Khandual Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Lokesh Gidra Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 537cf30bba241ae88d5f4b0b6a5e66271b394852 Author: Peter Xu Date: Tue May 4 18:33:08 2021 -0700 mm/hugetlb: move flush_hugetlb_tlb_range() into hugetlb.h Prepare for it to be called outside of mm/hugetlb.c. Link: https://lkml.kernel.org/r/20210218231204.15474-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Reviewed-by: Axel Rasmussen Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c1991e0705d143be773c984b006f2078aa9f2853 Author: Peter Xu Date: Tue May 4 18:33:04 2021 -0700 hugetlb/userfaultfd: forbid huge pmd sharing when uffd enabled Huge pmd sharing could bring problem to userfaultfd. The thing is that userfaultfd is running its logic based on the special bits on page table entries, however the huge pmd sharing could potentially share page table entries for different address ranges. That could cause issues on either: - When sharing huge pmd page tables for an uffd write protected range, the newly mapped huge pmd range will also be write protected unexpectedly, or, - When we try to write protect a range of huge pmd shared range, we'll first do huge_pmd_unshare() in hugetlb_change_protection(), however that also means the UFFDIO_WRITEPROTECT could be silently skipped for the shared region, which could lead to data loss. While at it, a few other things are done altogether: - Move want_pmd_share() from mm/hugetlb.c into linux/hugetlb.h, because that's definitely something that arch code would like to use too - ARM64 currently directly check against CONFIG_ARCH_WANT_HUGE_PMD_SHARE when trying to share huge pmd. Switch to the want_pmd_share() helper. - Move vma_shareable() from huge_pmd_share() into want_pmd_share(). [peterx@redhat.com: fix build with !ARCH_WANT_HUGE_PMD_SHARE] Link: https://lkml.kernel.org/r/20210310185359.88297-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20210218231202.15426-1-peterx@redhat.com Signed-off-by: Peter Xu Reviewed-by: Mike Kravetz Reviewed-by: Axel Rasmussen Tested-by: Naresh Kamboju Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aec44e0f0213e36d4f0868a80cdc5097a510f79d Author: Peter Xu Date: Tue May 4 18:33:00 2021 -0700 hugetlb: pass vma into huge_pte_alloc() and huge_pmd_share() Patch series "hugetlb: Disable huge pmd unshare for uffd-wp", v4. This series tries to disable huge pmd unshare of hugetlbfs backed memory for uffd-wp. Although uffd-wp of hugetlbfs is still during rfc stage, the idea of this series may be needed for multiple tasks (Axel's uffd minor fault series, and Mike's soft dirty series), so I picked it out from the larger series. This patch (of 4): It is a preparation work to be able to behave differently in the per architecture huge_pte_alloc() according to different VMA attributes. Pass it deeper into huge_pmd_share() so that we can avoid the find_vma() call. [peterx@redhat.com: build fix] Link: https://lkml.kernel.org/r/20210304164653.GB397383@xz-x1Link: https://lkml.kernel.org/r/20210218230633.15028-1-peterx@redhat.com Link: https://lkml.kernel.org/r/20210218230633.15028-2-peterx@redhat.com Signed-off-by: Peter Xu Suggested-by: Mike Kravetz Cc: Adam Ruprecht Cc: Alexander Viro Cc: Alexey Dobriyan Cc: Andrea Arcangeli Cc: Anshuman Khandual Cc: Axel Rasmussen Cc: Cannon Matthews Cc: Catalin Marinas Cc: Chinwen Chang Cc: David Rientjes Cc: "Dr . David Alan Gilbert" Cc: Huang Ying Cc: Ingo Molnar Cc: Jann Horn Cc: Jerome Glisse Cc: Kirill A. Shutemov Cc: Lokesh Gidra Cc: "Matthew Wilcox (Oracle)" Cc: Michael Ellerman Cc: "Michal Koutn" Cc: Michel Lespinasse Cc: Mike Rapoport Cc: Mina Almasry Cc: Nicholas Piggin Cc: Oliver Upton Cc: Shaohua Li Cc: Shawn Anastasio Cc: Steven Price Cc: Steven Rostedt Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 786b31121a2ce4309a81a7f36d63f02ca588839e Author: Hugh Dickins Date: Tue May 4 18:32:57 2021 -0700 mm: remove nrexceptional from inode: remove BUG_ON clear_inode()'s BUG_ON(!mapping_empty(&inode->i_data)) is unsafe: we know of two ways in which nodes can and do (on rare occasions) get left behind. Until those are fixed, do not BUG_ON() nor even WARN_ON(). Yes, this will then leak those nodes (or the next user of the struct inode may use them); but this has been happening for years, and the new BUG_ON(!mapping_empty) was only guilty of revealing that. A proper fix will follow, but no hurry. Link: https://lkml.kernel.org/r/alpine.LSU.2.11.2104292229380.16080@eggly.anvils Signed-off-by: Hugh Dickins Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8bc3c481b3d0dcef2cf8e1b7c6b780af6725f7e3 Author: Matthew Wilcox (Oracle) Date: Tue May 4 18:32:54 2021 -0700 mm: remove nrexceptional from inode We no longer track anything in nrexceptional, so remove it, saving 8 bytes per inode. Link: https://lkml.kernel.org/r/20201026151849.24232-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Tested-by: Vishal Verma Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7f0e07fb0289519af7e726e4f7b7118f7ecc979b Author: Matthew Wilcox (Oracle) Date: Tue May 4 18:32:51 2021 -0700 dax: account DAX entries as nrpages Simplify mapping_needs_writeback() by accounting DAX entries as pages instead of exceptional entries. Link: https://lkml.kernel.org/r/20201026151849.24232-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Tested-by: Vishal Verma Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 46be67b424efab933562a29ea8f1df0c20aa9959 Author: Matthew Wilcox (Oracle) Date: Tue May 4 18:32:48 2021 -0700 mm: stop accounting shadow entries We no longer need to keep track of how many shadow entries are present in a mapping. This saves a few writes to the inode and memory barriers. Link: https://lkml.kernel.org/r/20201026151849.24232-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Tested-by: Vishal Verma Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7716506adac4664793a9d6d3dfa31ffddfa98714 Author: Matthew Wilcox (Oracle) Date: Tue May 4 18:32:45 2021 -0700 mm: introduce and use mapping_empty() Patch series "Remove nrexceptional tracking", v2. We actually use nrexceptional for very little these days. It's a minor pain to keep in sync with nrpages, but the pain becomes much bigger with the THP patches because we don't know how many indices a shadow entry occupies. It's easier to just remove it than keep it accurate. Also, we save 8 bytes per inode which is nothing to sneeze at; on my laptop, it would improve shmem_inode_cache from 22 to 23 objects per 16kB, and inode_cache from 26 to 27 objects. Combined, that saves a megabyte of memory from a combined usage of 25MB for both caches. Unfortunately, ext4 doesn't cross a magic boundary, so it doesn't save any memory for ext4. This patch (of 4): Instead of checking the two counters (nrpages and nrexceptional), we can just check whether i_pages is empty. Link: https://lkml.kernel.org/r/20201026151849.24232-1-willy@infradead.org Link: https://lkml.kernel.org/r/20201026151849.24232-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Tested-by: Vishal Verma Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d8505fd039c1e757ad3490e46fe0fe73d78e2e0 Author: Catalin Marinas Date: Wed May 5 14:28:45 2021 +0100 arm64: Fix the documented event stream frequency It should be 10KHz, matching the ARCH_TIMER_EVT_STREAM_PERIOD_US of 100us. Note that this is only a documentation bug. Fixes: 611a7bc74ed2 ("arm64: docs: describe ELF hwcaps") Signed-off-by: Catalin Marinas Cc: Mark Rutland Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210505132845.23698-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas commit 51eb95e2da41802454f48b9afeb4d96a77295035 Author: Andi Kleen Date: Tue May 4 20:35:27 2021 -0700 kbuild: Don't remove link-vmlinux temporary files on exit/signal Keep them around until they are cleaned up by make clean. This uses a bit more disk space, but makes it easier to debug any problems with the kernel link process. Suggested-by: Masahiro Yamada Signed-off-by: Andi Kleen Signed-off-by: Masahiro Yamada commit 11122b860bc52a09c779c3de9415436794fb5605 Author: Masahiro Yamada Date: Tue May 4 19:10:58 2021 +0900 kbuild: remove the unneeded comments for external module builds The supported targets for external modules are listed in the help target a few lines below. Let's not have duplicated information in two places. Signed-off-by: Masahiro Yamada commit 7a02cec523a90fec78634c655e2470f72d2fdcbf Author: Masahiro Yamada Date: Tue May 4 19:10:57 2021 +0900 kbuild: make distclean remove tag files in sub-directories 'make tags' and friends create tag files in the top directory, but people may manually create tag files in sub-directories. Signed-off-by: Masahiro Yamada commit 19c8d912837e45e99b2991228adfc4419ffff248 Author: Masahiro Yamada Date: Tue May 4 19:10:56 2021 +0900 kbuild: make distclean work against $(objtree) instead of $(srctree) This reverts the old commit [1], which seems questionable to me. It claimed 'make distclean' could not remove editor backup files, but I believe KBUILD_OUTPUT or O= was set. When O= is given, Kbuild should always work against $(objtree). If O= is not given, $(objtree) and $(srctree) are the same, therefore $(srctree) is cleaned up. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=dd47df980c02eb33833b2690b033c34fba2fa80d Signed-off-by: Masahiro Yamada commit d4452837ffbeb59e18f2499ef907579a618d623d Author: Masahiro Yamada Date: Mon May 3 03:09:57 2021 +0900 kbuild: refactor modname-multi by using suffix-search Improve the readability slightly. Signed-off-by: Masahiro Yamada commit bcf0c6642833673830ee9d9b40862a4c476d1565 Author: Masahiro Yamada Date: Mon May 3 03:09:56 2021 +0900 kbuild: refactor fdtoverlay rule Rename overlay-y to multi-dtb-y, which is a consistent name with multi-obj-y. Also, use multi-search to avoid code duplication. Introduce real-dtb-y, which is a consistent name with real-obj-y, to contain primitive blobs compiled from *.dts. This is used to calculate the list of *.dt.yaml files. Set -@ to base DTB without using $(eval ). Signed-off-by: Masahiro Yamada commit 44f87191d105519cdf37fb0d4988006ea04eb34e Author: Masahiro Yamada Date: Mon May 3 03:09:55 2021 +0900 kbuild: parameterize the .o part of suffix-search The suffix-search macro hard-codes the suffix, '.o'. Make it a parameter so that the multi-search and real-search macros can be reused for foo-dtbs syntax introduced by commit 15d16d6dadf6 ("kbuild: Add generic rule to apply fdtoverlay"). Signed-off-by: Masahiro Yamada commit 4d6a38da8e79e94cbd1344aa90876f0f805db705 Author: Mark Rutland Date: Wed Apr 28 12:15:55 2021 +0100 arm64: entry: always set GIC_PRIO_PSR_I_SET during entry Zenghui reports that booting a kernel with "irqchip.gicv3_pseudo_nmi=1" on the command line hits a warning during kernel entry, due to the way we manipulate the PMR. Early in the entry sequence, we call lockdep_hardirqs_off() to inform lockdep that interrupts have been masked (as the HW sets DAIF wqhen entering an exception). Architecturally PMR_EL1 is not affected by exception entry, and we don't set GIC_PRIO_PSR_I_SET in the PMR early in the exception entry sequence, so early in exception entry the PMR can indicate that interrupts are unmasked even though they are masked by DAIF. If DEBUG_LOCKDEP is selected, lockdep_hardirqs_off() will check that interrupts are masked, before we set GIC_PRIO_PSR_I_SET in any of the exception entry paths, and hence lockdep_hardirqs_off() will WARN() that something is amiss. We can avoid this by consistently setting GIC_PRIO_PSR_I_SET during exception entry so that kernel code sees a consistent environment. We must also update local_daif_inherit() to undo this, as currently only touches DAIF. For other paths, local_daif_restore() will update both DAIF and the PMR. With this done, we can remove the existing special cases which set this later in the entry code. We always use (GIC_PRIO_IRQON | GIC_PRIO_PSR_I_SET) for consistency with local_daif_save(), as this will warn if it ever encounters (GIC_PRIO_IRQOFF | GIC_PRIO_PSR_I_SET), and never sets this itself. This matches the gic_prio_kentry_setup that we have to retain for ret_to_user. The original splat from Zenghui's report was: | DEBUG_LOCKS_WARN_ON(!irqs_disabled()) | WARNING: CPU: 3 PID: 125 at kernel/locking/lockdep.c:4258 lockdep_hardirqs_off+0xd4/0xe8 | Modules linked in: | CPU: 3 PID: 125 Comm: modprobe Tainted: G W 5.12.0-rc8+ #463 | Hardware name: QEMU KVM Virtual Machine, BIOS 0.0.0 02/06/2015 | pstate: 604003c5 (nZCv DAIF +PAN -UAO -TCO BTYPE=--) | pc : lockdep_hardirqs_off+0xd4/0xe8 | lr : lockdep_hardirqs_off+0xd4/0xe8 | sp : ffff80002a39bad0 | pmr_save: 000000e0 | x29: ffff80002a39bad0 x28: ffff0000de214bc0 | x27: ffff0000de1c0400 x26: 000000000049b328 | x25: 0000000000406f30 x24: ffff0000de1c00a0 | x23: 0000000020400005 x22: ffff8000105f747c | x21: 0000000096000044 x20: 0000000000498ef9 | x19: ffff80002a39bc88 x18: ffffffffffffffff | x17: 0000000000000000 x16: ffff800011c61eb0 | x15: ffff800011700a88 x14: 0720072007200720 | x13: 0720072007200720 x12: 0720072007200720 | x11: 0720072007200720 x10: 0720072007200720 | x9 : ffff80002a39bad0 x8 : ffff80002a39bad0 | x7 : ffff8000119f0800 x6 : c0000000ffff7fff | x5 : ffff8000119f07a8 x4 : 0000000000000001 | x3 : 9bcdab23f2432800 x2 : ffff800011730538 | x1 : 9bcdab23f2432800 x0 : 0000000000000000 | Call trace: | lockdep_hardirqs_off+0xd4/0xe8 | enter_from_kernel_mode.isra.5+0x7c/0xa8 | el1_abort+0x24/0x100 | el1_sync_handler+0x80/0xd0 | el1_sync+0x6c/0x100 | __arch_clear_user+0xc/0x90 | load_elf_binary+0x9fc/0x1450 | bprm_execve+0x404/0x880 | kernel_execve+0x180/0x188 | call_usermodehelper_exec_async+0xdc/0x158 | ret_from_fork+0x10/0x18 Fixes: 23529049c684 ("arm64: entry: fix non-NMI user<->kernel transitions") Fixes: 7cd1ea1010ac ("arm64: entry: fix non-NMI kernel<->kernel transitions") Fixes: f0cd5ac1e4c5 ("arm64: entry: fix NMI {user, kernel}->kernel transitions") Fixes: 2a9b3e6ac69a ("arm64: entry: fix EL1 debug transitions") Link: https://lore.kernel.org/r/f4012761-026f-4e51-3a0c-7524e434e8b3@huawei.com Signed-off-by: Mark Rutland Reported-by: Zenghui Yu Cc: Marc Zyngier Cc: Will Deacon Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20210428111555.50880-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 23243c1ace9fb4eae2f75e0fe0ece8e3219fb4f3 Author: Masahiro Yamada Date: Sun May 2 02:24:36 2021 +0900 arch: use cross_compiling to check whether it is a cross build or not 'cross_compiling' is defined by the top Makefile and available for arch Makefiles to check whether it is a cross build or not. A good thing is the variable name 'cross_compiling' is self-documenting. This is a simple replacement for m68k, mips, sh, for which $(ARCH) and $(SRCARCH) always match. No functional change is intended for xtensa, either. This is rather a fix for parisc because arch/parisc/Makefile defines UTS_MATCHINE depending on CONFIG_64BIT, therefore cc-cross-prefix is not working in Kconfig time. Signed-off-by: Masahiro Yamada Acked-by: Geert Uytterhoeven Acked-by: Helge Deller # parisc Acked-by: Max Filippov # xtensa commit 298a58e165e447ccfaae35fe9f651f9d7e15166f Author: Russell King Date: Wed May 5 11:23:50 2021 +0100 ARM: footbridge: remove personal server platform Remove the personal server platform, as that has had an array overrun issue identified. It is believed that no one is using this code. Signed-off-by: Russell King commit cc35518d29bc8e38902866b74874b4a3f1ad3617 Author: Alyssa Ross Date: Tue May 4 21:06:51 2021 +0000 docs: vfio: fix typo Signed-off-by: Alyssa Ross Message-Id: <20210504210651.1316078-1-hi@alyssa.is> Signed-off-by: Alex Williamson commit 77b8aeb9da0490357f1f5a2b0d12125e6332c37a Author: Alex Williamson Date: Tue May 4 09:52:02 2021 -0600 vfio/pci: Revert nvlink removal uAPI breakage Revert the uAPI changes from the below commit with notice that these regions and capabilities are no longer provided. Fixes: b392a1989170 ("vfio/pci: remove vfio_pci_nvlink2") Reported-by: Greg Kurz Signed-off-by: Alex Williamson Reviewed-by: Cornelia Huck Reviewed-by: Greg Kurz Tested-by: Greg Kurz Reviewed-by: Christoph Hellwig Message-Id: <162014341432.3807030.11054087109120670135.stgit@omen> commit 7072a355ba191c08b0579f0f66e3eba0e28bf818 Author: Eric Dumazet Date: Wed May 5 00:33:24 2021 -0700 netfilter: nfnetlink: add a missing rcu_read_unlock() Reported by syzbot : BUG: sleeping function called from invalid context at include/linux/sched/mm.h:201 in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 26899, name: syz-executor.5 1 lock held by syz-executor.5/26899: #0: ffffffff8bf797a0 (rcu_read_lock){....}-{1:2}, at: nfnetlink_get_subsys net/netfilter/nfnetlink.c:148 [inline] #0: ffffffff8bf797a0 (rcu_read_lock){....}-{1:2}, at: nfnetlink_rcv_msg+0x1da/0x1300 net/netfilter/nfnetlink.c:226 Preemption disabled at: [] preempt_schedule_irq+0x3e/0x90 kernel/sched/core.c:5533 CPU: 1 PID: 26899 Comm: syz-executor.5 Not tainted 5.12.0-next-20210504-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 ___might_sleep.cold+0x1f1/0x237 kernel/sched/core.c:8338 might_alloc include/linux/sched/mm.h:201 [inline] slab_pre_alloc_hook mm/slab.h:500 [inline] slab_alloc_node mm/slub.c:2845 [inline] kmem_cache_alloc_node+0x33d/0x3e0 mm/slub.c:2960 __alloc_skb+0x20b/0x340 net/core/skbuff.c:413 alloc_skb include/linux/skbuff.h:1107 [inline] nlmsg_new include/net/netlink.h:953 [inline] netlink_ack+0x1ed/0xaa0 net/netlink/af_netlink.c:2437 netlink_rcv_skb+0x33d/0x420 net/netlink/af_netlink.c:2508 nfnetlink_rcv+0x1ac/0x420 net/netfilter/nfnetlink.c:650 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665f9 Code: ff ff 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 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa8a03ee188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 00000000004665f9 RDX: 0000000000000000 RSI: 0000000020000480 RDI: 0000000000000004 RBP: 00000000004bfce1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007fffe864480f R14: 00007fa8a03ee300 R15: 0000000000022000 ================================================ WARNING: lock held when returning to user space! 5.12.0-next-20210504-syzkaller #0 Tainted: G W ------------------------------------------------ syz-executor.5/26899 is leaving the kernel with locks still held! 1 lock held by syz-executor.5/26899: #0: ffffffff8bf797a0 (rcu_read_lock){....}-{1:2}, at: nfnetlink_get_subsys net/netfilter/nfnetlink.c:148 [inline] #0: ffffffff8bf797a0 (rcu_read_lock){....}-{1:2}, at: nfnetlink_rcv_msg+0x1da/0x1300 net/netfilter/nfnetlink.c:226 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 26899 at kernel/rcu/tree_plugin.h:359 rcu_note_context_switch+0xfd/0x16e0 kernel/rcu/tree_plugin.h:359 Modules linked in: CPU: 0 PID: 26899 Comm: syz-executor.5 Tainted: G W 5.12.0-next-20210504-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:rcu_note_context_switch+0xfd/0x16e0 kernel/rcu/tree_plugin.h:359 Code: 48 89 fa 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 38 d0 7c 08 84 d2 0f 85 2e 0d 00 00 8b bd cc 03 00 00 85 ff 7e 02 <0f> 0b 65 48 8b 2c 25 00 f0 01 00 48 8d bd cc 03 00 00 48 b8 00 00 RSP: 0000:ffffc90002fffdb0 EFLAGS: 00010002 RAX: 0000000000000007 RBX: ffff8880b9c36080 RCX: ffffffff8dc99bac RDX: 0000000000000000 RSI: 0000000000000008 RDI: 0000000000000001 RBP: ffff88808b9d1c80 R08: 0000000000000000 R09: ffffffff8dc96917 R10: fffffbfff1b92d22 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88808b9d1c80 R14: ffff88808b9d1c80 R15: ffffc90002ff8000 FS: 00007fa8a03ee700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f09896ed000 CR3: 0000000032070000 CR4: 00000000001526f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __schedule+0x214/0x23e0 kernel/sched/core.c:5044 schedule+0xcf/0x270 kernel/sched/core.c:5226 exit_to_user_mode_loop kernel/entry/common.c:162 [inline] exit_to_user_mode_prepare+0x13e/0x280 kernel/entry/common.c:208 irqentry_exit_to_user_mode+0x5/0x40 kernel/entry/common.c:314 asm_sysvec_reschedule_ipi+0x12/0x20 arch/x86/include/asm/idtentry.h:637 RIP: 0033:0x4665f9 Fixes: 50f2db9e368f ("netfilter: nfnetlink: consolidate callback types") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: Pablo Neira Ayuso commit 8c9af478c06bb1ab1422f90d8ecbc53defd44bc3 Author: Steven Rostedt (VMware) Date: Wed May 5 10:38:24 2021 -0400 ftrace: Handle commands when closing set_ftrace_filter file # echo switch_mm:traceoff > /sys/kernel/tracing/set_ftrace_filter will cause switch_mm to stop tracing by the traceoff command. # echo -n switch_mm:traceoff > /sys/kernel/tracing/set_ftrace_filter does nothing. The reason is that the parsing in the write function only processes commands if it finished parsing (there is white space written after the command). That's to handle: write(fd, "switch_mm:", 10); write(fd, "traceoff", 8); cases, where the command is broken over multiple writes. The problem is if the file descriptor is closed, then the write call is not processed, and the command needs to be processed in the release code. The release code can handle matching of functions, but does not handle commands. Cc: stable@vger.kernel.org Fixes: eda1e32855656 ("tracing: handle broken names in ftrace filter") Signed-off-by: Steven Rostedt (VMware) commit 9c38475c6643b847b3f5316c7724388b66b17931 Merge: cd2c7545ae1be 4a20342572f66 Author: Jens Axboe Date: Wed May 5 08:36:55 2021 -0600 Merge tag 'nvme-5.13-2021-05-05' of git://git.infradead.org/nvme into block-5.13 Pull NVMe fixes from Christoph: "nvme updates for Linux 5.13 - reset the bdev to ns head when failover (Daniel Wagner) - remove unsupported command noise (Keith Busch) - misc passthrough improvements (Kanchan Joshi) - fix controller ioctl through ns_head (Minwoo Im) - fix controller timeouts during reset (Tao Chiu)" * tag 'nvme-5.13-2021-05-05' of git://git.infradead.org/nvme: nvmet: remove unsupported command noise nvme-multipath: reset bdev to ns head when failover nvme-pci: fix controller reset hang when racing with nvme_timeout nvme: move the fabrics queue ready check routines to core nvme: avoid memset for passthrough requests nvme: add nvme_get_ns helper nvme: fix controller ioctl through ns_head commit 32b48bf8514c28cdc89cd8069eceeb6e6cff0612 Author: Nicholas Piggin Date: Wed May 5 22:15:09 2021 +1000 KVM: PPC: Book3S HV: Fix conversion to gfn-based MMU notifier callbacks Commit b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks") causes unmap_gfn_range and age_gfn callbacks to only work on the first gfn in the range. It also makes the aging callbacks call into both radix and hash aging functions for radix guests. Fix this. Add warnings for the single-gfn calls that have been converted to range callbacks, in case they ever receieve ranges greater than 1. Fixes: b1c5356e873c ("KVM: PPC: Convert to the gfn-based MMU notifier callbacks") Reported-by: Bharata B Rao Signed-off-by: Nicholas Piggin Tested-by: Bharata B Rao Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210505121509.1470207-1-npiggin@gmail.com commit 444952956f34a5de935159561d56a34276ffffd6 Author: Johan Jonker Date: Tue Apr 13 00:36:15 2021 +0200 dt-bindings: gpio: add YAML description for rockchip,gpio-bank Current dts files with "rockchip,gpio-bank" subnodes are manually verified. In order to automate this process the text that describes the compatible in rockchip,pinctrl.txt is removed and converted to YAML in rockchip,gpio-bank.yaml. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit e29eaf1c1a68499188c71b1d75f9637ddd29e039 Author: Jiapeng Chong Date: Mon Apr 12 10:16:21 2021 +0800 gpio: mxs: remove useless function Fix the following gcc warning: drivers/gpio/gpio-mxs.c:63:19: warning: kernel/sys_ni.cunused function 'is_imx28_gpio'. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Bartosz Golaszewski commit 56b01acc1c79a4fc70d575ed7861f26a0d5d43ea Author: Geert Uytterhoeven Date: Fri Apr 2 14:19:58 2021 +0200 dt-bindings: gpio: fairchild,74hc595: Convert to json-schema Convert the Generic 8-bit shift register Device Tree binding documentation to json-schema. Rename from gpio-74x164 to fairchild,74hc595, as the former refers to the Linux driver, and not to a hardware name. Add the missing hog description. Signed-off-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 5fe706730800555ece3308965e231308ca0cf877 Author: Jiapeng Chong Date: Tue Apr 6 15:20:39 2021 +0800 gpio: it87: remove unused code Fix the following clang warning: drivers/gpio/gpio-it87.c:128:20: warning: unused function 'superio_outw' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Simon Guinot Signed-off-by: Bartosz Golaszewski commit abd7a8eab8139e1e184712965e69165464a660e2 Author: Barney Goette Date: Thu Apr 8 10:53:34 2021 -0500 gpio: 104-dio-48e: Fix coding style issues Fixed multiple bare uses of 'unsigned' without 'int'. Fixed space around "*" operator. Fixed function parameter alignment to opening parenthesis. Reported by checkpatch. Signed-off-by: Barney Goette Acked-by: William Breathitt Gray Signed-off-by: Bartosz Golaszewski commit 76c47d1449fc2ad58fec3a4ace45e33c3952720e Author: Ran Wang Date: Mon Mar 22 11:38:46 2021 +0800 gpio: mpc8xxx: Add ACPI support Current implementation only supports DT, now add ACPI support. Signed-off-by: Ran Wang Reviewed-by: Andy Shevchenko Acked-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit ba134d29e9526aa8396da355e69f55e8f9badd6d Author: Andy Shevchenko Date: Fri Apr 2 21:42:25 2021 +0300 gpio: ich: Switch to be dependent on LPC_ICH Driver is neither dependent to PCI nor using MFD_CORE. Replace those dependency and selection by dependency on LPC_ICH. Signed-off-by: Andy Shevchenko commit c6b4853fa25a7f0549731c141e6b2b3f29a6b473 Author: Andy Shevchenko Date: Fri Apr 2 21:21:03 2021 +0300 gpio: sch: Drop MFD_CORE selection Since we are depended on LPC_SCH, which selects MFD_CORE, we don't need to do it ourselves. Signed-off-by: Andy Shevchenko commit 71cf76d451ef40ff700320069fe58ae239f6f5aa Author: Randy Dunlap Date: Fri Apr 2 09:17:51 2021 -0700 gpio: sch: depends on LPC_SCH Since LPC_SCH provides GPIO functionality, GPIO_SCH should depend on LPC_SCH to prevent kconfig warning and build errors: WARNING: unmet direct dependencies detected for LPC_SCH Depends on [n]: HAS_IOMEM [=y] && PCI [=n] Selected by [y]: - GPIO_SCH [=y] && GPIOLIB [=y] && X86 [=y] && (X86 [=y] || COMPILE_TEST [=n]) && ACPI [=y] and ../drivers/mfd/lpc_sch.c:204:1: warning: data definition has no type or storage class module_pci_driver(lpc_sch_driver); ^~~~~~~~~~~~~~~~~ ../drivers/mfd/lpc_sch.c:204:1: error: type defaults to ‘int’ in declaration of ‘module_pci_driver’ [-Werror=implicit-int] ../drivers/mfd/lpc_sch.c:204:1: warning: parameter names (without types) in function declaration ../drivers/mfd/lpc_sch.c:197:26: warning: ‘lpc_sch_driver’ defined but not used [-Wunused-variable] static struct pci_driver lpc_sch_driver = { ^~~~~~~~~~~~~~ Fixes: 6c46215d6b62 ("gpio: sch: Hook into ACPI GPE handler to catch GPIO edge events") Signed-off-by: Randy Dunlap Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski Cc: Denis Turischev Signed-off-by: Andy Shevchenko commit da91ece226729c76f60708efc275ebd4716ad089 Author: Hans de Goede Date: Thu Apr 1 18:27:40 2021 +0200 gpiolib: acpi: Add quirk to ignore EC wakeups on Dell Venue 10 Pro 5055 Like some other Bay and Cherry Trail SoC based devices the Dell Venue 10 Pro 5055 has an embedded-controller which uses ACPI GPIO events to report events instead of using the standard ACPI EC interface for this. The EC interrupt is only used to report battery-level changes and it keeps doing this while the system is suspended, causing the system to not stay suspended. Add an ignore-wake quirk for the GPIO pin used by the EC to fix the spurious wakeups from suspend. Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Signed-off-by: Andy Shevchenko commit fdc1f5dfb9aa890473d6f94bd224d45cf2f0443d Author: Andy Shevchenko Date: Wed Mar 17 17:19:28 2021 +0200 gpio: sch: Hook into ACPI GPE handler to catch GPIO edge events Neither the ACPI description on Intel Minnowboard (v1) platform provides the required information to establish a generic handling nor the hardware capable of doing it. According to the data sheet the hardware can generate SCI events. Therefore, we need to hook from the driver into GPE handler of the ACPI subsystem in order to catch and report GPIO-related events. Validated on the Inlel Minnowboard (v1) platform and Intel Galileo Gen 2. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij commit 7a81638485c1a62a87b4c391ecc9c651a4a9dc19 Author: Jan Kiszka Date: Wed Mar 17 17:19:27 2021 +0200 gpio: sch: Add edge event support Add the required infrastructure to enable and report edge events of the pins to the GPIO core. The actual hook-up of the event interrupt will happen separately. Signed-off-by: Jan Kiszka Co-developed-by: Andy Shevchenko Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij commit ac505b6f5fa8289c3d3a311344de0da23f6ff767 Author: Andy Shevchenko Date: Mon Mar 1 18:59:32 2021 +0200 gpio: aggregator: Replace custom get_arg() with a generic next_arg() cmdline library provides next_arg() helper to traverse over parameters and their values given in command line. Replace custom approach in the driver by it. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Geert Uytterhoeven commit 65dd36a39d3b350dc96d8324b348f0863d76404d Author: Andy Shevchenko Date: Mon Mar 1 18:59:31 2021 +0200 lib/cmdline: Export next_arg() for being used in modules At least one module will benefit from using next_arg() helper. Let's export it for that module and others if they consider it helpful. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Reviewed-by: Geert Uytterhoeven commit ca40daf39daf62355d87287a8732cadb62d13e2e Author: Tian Tao Date: Wed Mar 31 16:19:11 2021 +0800 gpio: omap: Use device_get_match_data() helper Use the device_get_match_data() helper instead of open coding. Signed-off-by: Tian Tao Signed-off-by: Bartosz Golaszewski commit 0d82fb1127fb7cc8287614eb0992acb0583bc323 Author: Sander Vanheule Date: Tue Mar 30 19:48:43 2021 +0200 gpio: Add Realtek Otto GPIO support Realtek MIPS SoCs (platform name Otto) have GPIO controllers with up to 64 GPIOs, divided over two banks. Each bank has a set of registers for 32 GPIOs, with support for edge-triggered interrupts. Each GPIO bank consists of four 8-bit GPIO ports (ABCD and EFGH). Most registers pack one bit per GPIO, except for the IMR register, which packs two bits per GPIO (AB-CD). Although the byte order is currently assumed to have port A..D at offset 0x0..0x3, this has been observed to be reversed on other, Lexra-based, SoCs (e.g. RTL8196E/97D/97F). Interrupt support is disabled for the fallback devicetree-compatible 'realtek,otto-gpio'. This allows for quick support of GPIO banks in which the byte order would be unknown. In this case, the port ordering in the IMR registers may not match the reversed order in the other registers (DCBA, and BA-DC or DC-BA). Signed-off-by: Sander Vanheule Reviewed-by: Linus Walleij Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 951f7da9f60bf62d26dd0f8b71d5671ab3929ba2 Author: Sander Vanheule Date: Tue Mar 30 19:48:42 2021 +0200 dt-bindings: gpio: Binding for Realtek Otto GPIO Add a binding description for Realtek's GPIO controller found on several of their MIPS-based SoCs (codenamed Otto), such as the RTL838x and RTL839x series of switch SoCs. A fallback binding 'realtek,otto-gpio' is provided for cases where the actual port ordering is not known yet, and enabling the interrupt controller may result in uncaught interrupts. Signed-off-by: Sander Vanheule Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Bartosz Golaszewski commit 6984a320349d61e6bcf3aa03d750a78d70ca98ad Author: Alexander Dahl Date: Mon Mar 29 13:16:48 2021 +0200 docs: kernel-parameters: Add gpio_mockup_named_lines Missing since introduced in the driver. Fixes: 8a68ea00a62e ("gpio: mockup: implement naming the lines") Signed-off-by: Alexander Dahl Signed-off-by: Bartosz Golaszewski commit 3eb52226de6f14d9409fd5485e7bdb8430bf8449 Author: Alexander Dahl Date: Mon Mar 29 13:16:47 2021 +0200 docs: kernel-parameters: Move gpio-mockup for alphabetic order All other sections are ordered alphabetically so do the same for gpio-mockup. Fixes: 0f98dd1b27d2 ("gpio/mockup: add virtual gpio device") Signed-off-by: Alexander Dahl Signed-off-by: Bartosz Golaszewski commit e829c2e4744850bab4d8f8ffebd00df10b4c6c2b Author: Bartosz Golaszewski Date: Mon Mar 15 10:13:56 2021 +0100 lib: bitmap: provide devm_bitmap_alloc() and devm_bitmap_zalloc() Provide managed variants of bitmap_alloc() and bitmap_zalloc(). Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit c13656b904b6173aad723d9680a81c60de2f5edc Author: Bartosz Golaszewski Date: Mon Mar 15 10:13:55 2021 +0100 lib: bitmap: order includes alphabetically For better readability and maintenance: order the includes in bitmap source files alphabetically. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 98635b29a73f1a49ab6882ae58d56c9cd5ecb902 Author: Bartosz Golaszewski Date: Mon Mar 15 10:13:54 2021 +0100 lib: bitmap: remove the 'extern' keyword from function declarations The 'extern' keyword doesn't have any benefits for functions in header files. Remove it. Signed-off-by: Bartosz Golaszewski Reviewed-by: Andy Shevchenko commit 6be388f4a35d2ce5ef7dbf635a8964a5da7f799f Author: Anirudh Rayabharam Date: Sun Apr 25 23:03:53 2021 +0530 HID: usbhid: fix info leak in hid_submit_ctrl In hid_submit_ctrl(), the way of calculating the report length doesn't take into account that report->size can be zero. When running the syzkaller reproducer, a report of size 0 causes hid_submit_ctrl) to calculate transfer_buffer_length as 16384. When this urb is passed to the usb core layer, KMSAN reports an info leak of 16384 bytes. To fix this, first modify hid_report_len() to account for the zero report size case by using DIV_ROUND_UP for the division. Then, call it from hid_submit_ctrl(). Reported-by: syzbot+7c2bb71996f95a82524c@syzkaller.appspotmail.com Signed-off-by: Anirudh Rayabharam Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 682ae59ca2876f83396ccc5674235da99beed06c Author: Shuming Fan Date: Tue May 4 18:04:24 2021 +0800 ASoC: rt711-sdca: fix the function number of SDCA control for feature unit 0x1E The function number should be FUNC_NUM_MIC_ARRAY(0x2) for the feature unit 0x1E. Fixes: ca5118c0c00f6 ('ASoC: rt711-sdca: change capture switch controls') Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20210504100424.8760-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 48e33befe61a7d407753c53d1a06fc8d6b5dab80 Author: Mark Bolhuis Date: Mon May 3 17:39:38 2021 +0100 HID: Add BUS_VIRTUAL to hid_connect logging Add BUS_VIRTUAL to hid_connect logging since it's a valid hid bus type and it should not print Signed-off-by: Mark Bolhuis Signed-off-by: Jiri Kosina commit bc8b796f618c3ccb0a2a8ed1e96c00a1a7849415 Author: Ahelenia Ziemiańska Date: Mon Mar 8 18:42:08 2021 +0100 HID: multitouch: set Stylus suffix for Stylus-application devices, too This re-adds the suffix to Win8 stylus-on-touchscreen devices, now that they aren't erroneously marked as MT Signed-off-by: Ahelenia Ziemiańska Signed-off-by: Jiri Kosina commit a2353e3b26012ff43bcdf81d37a3eaddd7ecdbf3 Author: Ahelenia Ziemiańska Date: Mon Mar 8 18:42:03 2021 +0100 HID: multitouch: require Finger field to mark Win8 reports as MT This effectively changes collection_is_mt from contact ID in report->field to (device is Win8 => collection is finger) && contact ID in report->field Some devices erroneously report Pen for fingers, and Win8 stylus-on-touchscreen devices report contact ID, but mark the accompanying touchscreen device's collection correctly Cc: stable@vger.kernel.org Signed-off-by: Ahelenia Ziemiańska Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 670a23111e720dd50b07c25437b480f1bdfecc78 Author: Hamza Mahfooz Date: Wed Apr 28 20:05:14 2021 -0400 HID: remove the unnecessary redefinition of a macro USB_VENDOR_ID_CORSAIR is defined twice in the same file with the same value. Signed-off-by: Hamza Mahfooz Signed-off-by: Jiri Kosina commit 3b2520076822f15621509a6da3bc4a8636cd33b4 Author: Saeed Mirzamohammadi Date: Thu Apr 29 11:50:39 2021 -0700 HID: quirks: Add quirk for Lenovo optical mouse The Lenovo optical mouse with vendor id of 0x17ef and product id of 0x600e experiences disconnecting issues every 55 seconds: [38565.706242] usb 1-1.4: Product: Lenovo Optical Mouse [38565.728603] input: Lenovo Optical Mouse as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:17EF:600E.029A/input/input665 [38565.755949] hid-generic 0003:17EF:600E.029A: input,hidraw1: USB HID v1.11 Mouse [Lenovo Optical Mouse] on usb-0000:01:00.0-1.4/input0 [38619.360692] usb 1-1.4: USB disconnect, device number 48 [38620.864990] usb 1-1.4: new low-speed USB device number 49 using xhci_hcd [38620.984011] usb 1-1.4: New USB device found, idVendor=17ef,idProduct=600e, bcdDevice= 1.00 [38620.998117] usb 1-1.4: New USB device strings: Mfr=0, Product=2,SerialNumber=0 This adds HID_QUIRK_ALWAYS_POLL for this device in order to work properly. Signed-off-by: Saeed Mirzamohammadi Signed-off-by: Jiri Kosina commit c980512b4512adf2c6f9edb948ce19423b23124d Author: Luke D Jones Date: Sun Apr 18 21:12:29 2021 +1200 HID: asus: filter G713/G733 key event to prevent shutdown The G713 and G733 both emit an unexpected keycode on some key presses such as Fn+Pause. The device in this case is emitting two events on key down, and 3 on key up, the third key up event is report ID 0x02 and is unfiltered, causing incorrect event. This patch filters out the single problematic event. Signed-off-by: Luke D Jones Signed-off-by: Jiri Kosina commit edb032033da0dc850f6e7740fa1023c73195bc89 Author: Srinivas Pandruvada Date: Thu Apr 15 11:52:31 2021 -0700 HID: hid-sensor-hub: Return error for hid_set_field() failure In the function sensor_hub_set_feature(), return error when hid_set_field() fails. Signed-off-by: Srinivas Pandruvada Acked-by: Jonathan Cameron Signed-off-by: Jiri Kosina commit b45ef5db7bf268f6851bb5395d60301338374abc Author: Michael Zaidman Date: Tue Apr 13 18:12:00 2021 +0300 HID: ft260: check data size in ft260_smbus_write() The SMbus block transaction limits the number of bytes transferred to 32, but nothing prevents a user from specifying via ioctl a larger data size than the ft260 can handle in a single transfer. i2cdev_ioctl_smbus() --> i2c_smbus_xfer --> __i2c_smbus_xfer --> ft260_smbus_xfer --> ft260_smbus_write This patch adds data size checking in the ft260_smbus_write(). Fixes: 98189a0adfa0 ("HID: ft260: add usb hid to i2c host bridge driver") Signed-off-by: Michael Zaidman Reported-by: Dan Carpenter Signed-off-by: Jiri Kosina commit b0d713c60c75cdd04bf8ad8cfb046c8530709de3 Author: Maximilian Luz Date: Sun Apr 11 13:34:02 2021 +0200 HID: surface-hid: Fix integer endian conversion We want to convert from 16 bit (unsigned) little endian values contained in a packed struct to CPU native endian values here, not the other way around. So replace cpu_to_le16() with get_unaligned_le16(), using the latter instead of le16_to_cpu() to acknowledge that we are reading from a packed struct. Reported-by: kernel test robot Fixes: b05ff1002a5c ("HID: Add support for Surface Aggregator Module HID transport") Signed-off-by: Maximilian Luz Signed-off-by: Jiri Kosina commit 0f0fb3d27e5ba51e40f2af4288efeaf3d293ef1a Author: Dmitry Torokhov Date: Sat Apr 10 19:56:06 2021 -0700 HID: hid-debug: recognize KEY_ASSISTANT and KEY_KBD_LAYOUT_NEXT Add missing descriptions for KEY_ASSISTANT and KEY_KBD_LAYOUT_NEXT. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 7b229b13d78d112e2c5d4a60a3c6f602289959fa Author: Dmitry Torokhov Date: Sat Apr 10 19:56:05 2021 -0700 HID: hid-input: add mapping for emoji picker key HUTRR101 added a new usage code for a key that is supposed to invoke and dismiss an emoji picker widget to assist users to locate and enter emojis. This patch adds a new key definition KEY_EMOJI_PICKER and maps 0x0c/0x0d9 usage code to this new keycode. Additionally hid-debug is adjusted to recognize this new usage code as well. Signed-off-by: Dmitry Torokhov Signed-off-by: Jiri Kosina commit 9858c74c29e12be5886280725e781cb735b2aca6 Author: Mateusz Jończyk Date: Tue Apr 6 20:25:38 2021 +0200 HID: a4tech: use A4_2WHEEL_MOUSE_HACK_B8 for A4TECH NB-95 This mouse has a horizontal wheel that requires special handling. Without this patch, the horizontal wheel acts like a vertical wheel. In the output of `hidrd-convert` for this mouse, there is a `Usage (B8h)` field. It corresponds to a byte in packets sent by the device that specifies which wheel generated an input event. The name "A4TECH" is spelled in all capitals on the company website. Signed-off-by: Mateusz Jończyk Signed-off-by: Jiri Kosina commit ed80bdc4571fae177c44eba0997a0d551fc21e15 Author: Hans de Goede Date: Sun Apr 4 17:40:54 2021 +0200 HID: quirks: Add HID_QUIRK_NO_INIT_REPORTS quirk for Dell K15A keyboard-dock Just like the K12A the Dell K15A keyboard-dock has problems with get_feature requests. This sometimes leads to several "failed to fetch feature 8" messages getting logged, after which the touchpad may or may not work. Just like the K15A these errors are triggered by undocking and docking the tablet. There also seem to be other problems when undocking and then docking again in quick succession. It seems that in this case the keyboard-controller still retains some power from capacitors and does not go through a power-on-reset leaving it in a confuses state, symptoms of this are: 1. The USB-ids changing to 048d:8910 2. Failure to read the HID descriptors on the second (mouse) USB intf. 3. The touchpad freezing after a while These problems can all be cleared by undocking the keyboard and waiting a full minute before redocking it. Unfortunately there is nothing we can do about this in the kernel. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit ed1ab6ff213a701d4a635883c63e0d6fcbbab27d Author: Wei Yongjun Date: Fri Apr 2 09:40:41 2021 +0000 HID: thrustmaster: fix return value check in thrustmaster_probe() Fix the return value check which testing the wrong variable in thrustmaster_probe(). Fixes: c49c33637802 ("HID: support for initialization of some Thrustmaster wheels") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Jiri Kosina commit 25bdbfbb2d8331a67824dd03d0087e9c98835f3a Author: Nirenjan Krishnan Date: Mon Mar 29 09:10:02 2021 -0700 HID: quirks: Set INCREMENT_USAGE_ON_DUPLICATE for Saitek X65 The Saitek X65 joystick has a pair of axes that were used as mouse pointer controls by the Windows driver. 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. Signed-off-by: Nirenjan Krishnan Signed-off-by: Jiri Kosina commit 4bfb2c72b2bfca8684c2f5c25a3119bad016a9d3 Author: Luke D Jones Date: Fri Feb 19 10:38:46 2021 +1300 HID: asus: Filter keyboard EC for old ROG keyboard Older ROG keyboards emit a similar stream of bytes to the new N-Key keyboards and require filtering to prevent a lot of unmapped key warnings showing. As all the ROG keyboards use QUIRK_USE_KBD_BACKLIGHT this is now used to branch to filtering in asus_raw_event. Signed-off-by: Luke D Jones Signed-off-by: Jiri Kosina commit 6a01268687c8d00e59dff341c519a337de980d2e Author: Benjamin Moody Date: Sun Feb 7 13:47:04 2021 -0500 HID: semitek: new driver for GK6X series keyboards A number of USB keyboards, using the Semitek firmware, are capable of handling arbitrary N-key rollover, but due to a buggy report descriptor, keys beyond the sixth cannot be detected by the generic HID driver. There are numerous hardware variants sold by several vendors, mostly using generic names like "GK61" for the 61-key version. These keyboards are sometimes known collectively as the "GK6X" series. The keyboard has three USB interfaces. Interface 0 uses the standard HID boot protocol, limited to eight modifier keys and six normal keys; interface 2 uses a custom report format that permits any number of keys. If more than six keys are pressed simultaneously, the first six are reported via interface 0 while subsequent keys are reported via interface 2. (Interface 1 uses a custom protocol for reprogramming the keyboard; this can be controlled through userspace tools and is not of concern for the present driver.) The report descriptor for interface 2, however, is incorrect (for report ID 0x04, the input field is marked as "array" rather than "variable".) The descriptor appears to be correct in other respects, so we simply replace the incorrect byte before parsing the descriptor. Signed-off-by: Benjamin Moody Signed-off-by: Jiri Kosina commit 9f015b3765bf593b3ed5d3b588e409dc0ffa9f85 Author: Rijo Thomas Date: Wed Apr 14 23:08:27 2021 +0530 tee: amdtee: unload TA only when its refcount becomes 0 Same Trusted Application (TA) can be loaded in multiple TEE contexts. If it is a single instance TA, the TA should not get unloaded from AMD Secure Processor, while it is still in use in another TEE context. Therefore reference count TA and unload it when the count becomes zero. Fixes: 757cc3e9ff1d ("tee: add AMD-TEE driver") Reviewed-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Acked-by: Dan Carpenter Signed-off-by: Jens Wiklander commit 0a269a008f837e76ce285679ab3005059fadc2a6 Author: Vitaly Kuznetsov Date: Wed Apr 14 14:35:40 2021 +0200 x86/kvm: Fix pr_info() for async PF setup/teardown 'pr_fmt' already has 'kvm-guest: ' so 'KVM' prefix is redundant. "Unregister pv shared memory" is very ambiguous, it's hard to say which particular PV feature it relates to. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210414123544.1060604-2-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 025768a966a3dde8455de46d1f121a51bacb6a77 Author: Linus Torvalds Date: Tue May 4 14:07:53 2021 -0700 x86/cpu: Use alternative to generate the TASK_SIZE_MAX constant We used to generate this constant with static jumps, which certainly works, but generates some quite unreadable and horrid code, and extra jumps. It's actually much simpler to just use our alternative_asm() infrastructure to generate a simple alternative constant, making the generated code much more obvious (and straight-line rather than "jump around to load the right constant"). Acked-by: Borislav Petkov Signed-off-by: Linus Torvalds Signed-off-by: Ingo Molnar Cc: Thomas Gleixner Cc: Ingo Molnar commit d665ea6ea86c785760ee4bad4543dab3267ad074 Merge: 51f629446cd17 ed102bf2afed2 Author: Linus Torvalds Date: Tue May 4 18:15:10 2021 -0700 Merge tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: - Disable CONFIG_GCOV when built with modules - Many fixes for W=1 related warnings - Code cleanup * tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: Fix W=1 missing-include-dirs warnings um: elf.h: Fix W=1 warning for empty body in 'do' statement um: pgtable.h: Fix W=1 warning for empty body in 'do' statement um: Remove unused including um: Add 2 missing libs to fix various build errors um: Replace if (cond) BUG() with BUG_ON() um: Disable CONFIG_GCOV with MODULES um: Remove unneeded variable 'ret' um: Mark all kernel symbols as local um: Fix tag order in stub_32.h commit 51f629446cd172e324deb0146741888cac5dedca Merge: d0195c7d7af6a 9a29f7f020e06 Author: Linus Torvalds Date: Tue May 4 18:08:40 2021 -0700 Merge tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs Pull JFFS2, UBI and UBIFS updates from Richard Weinberger: "JFFS2: - Use splice_write() - Fix for a slab-out-of-bounds bug UBI: - Fix for clang related warnings - Code cleanup UBIFS: - Fix for inode rebirth at replay - Set s_uuid - Use zstd for default filesystem" * tag 'for-linus-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs: ubi: Remove unnecessary struct declaration jffs2: Hook up splice_write callback jffs2: avoid Wempty-body warnings jffs2: Fix kasan slab-out-of-bounds problem ubi: Fix fall-through warnings for Clang ubifs: Report max LEB count at mount time ubifs: Set s_uuid in super block to support ima/evm uuid options ubifs: Default to zstd compression ubifs: Only check replay with inode type to judge if inode linked commit d0195c7d7af6a456c37f4b4b2df5528f10714482 Merge: e4adffb8daf47 9557727876674 Author: Linus Torvalds Date: Tue May 4 18:03:38 2021 -0700 Merge tag 'f2fs-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, we added a new mount option, "checkpoint_merge", which introduces a kernel thread dealing with the f2fs checkpoints. Once we start to manage the IO priority along with blk-cgroup, the checkpoint operation can be processed in a lower priority under the process context. Since the checkpoint holds all the filesystem operations, we give a higher priority to the checkpoint thread all the time. Enhancements: - introduce gc_merge mount option to introduce a checkpoint thread - improve to run discard thread efficiently - allow modular compression algorithms - expose # of overprivision segments to sysfs - expose runtime compression stat to sysfs Bug fixes: - fix OOB memory access by the node id lookup - avoid touching checkpointed data in the checkpoint-disabled mode - fix the resizing flow to avoid kernel panic and race conditions - fix block allocation issues on pinned files - address some swapfile issues - fix hugtask problem and kernel panic during atomic write operations - don't start checkpoint thread in RO And, we've cleaned up some kernel coding style and build warnings. In addition, we fixed some minor race conditions and error handling routines" * tag 'f2fs-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (48 commits) f2fs: drop inplace IO if fs status is abnormal f2fs: compress: remove unneed check condition f2fs: clean up left deprecated IO trace codes f2fs: avoid using native allocate_segment_by_default() f2fs: remove unnecessary struct declaration f2fs: fix to avoid NULL pointer dereference f2fs: avoid duplicated codes for cleanup f2fs: document: add description about compressed space handling f2fs: clean up build warnings f2fs: fix the periodic wakeups of discard thread f2fs: fix to avoid accessing invalid fio in f2fs_allocate_data_block() f2fs: fix to avoid GC/mmap race with f2fs_truncate() f2fs: set checkpoint_merge by default f2fs: Fix a hungtask problem in atomic write f2fs: fix to restrict mount condition on readonly block device f2fs: introduce gc_merge mount option f2fs: fix to cover __allocate_new_section() with curseg_lock f2fs: fix wrong alloc_type in f2fs_do_replace_block f2fs: delete empty compress.h f2fs: fix a typo in inode.c ... commit 3c070b2abf85b92455c2721d0a9edc68893ab6c1 Author: Len Brown Date: Tue May 4 19:58:08 2021 -0400 tools/power turbostat: version 2021.05.04 Signed-off-by: Len Brown commit b60c573dc241ab3a8719e990d86a0011b79eebcb Author: Len Brown Date: Tue May 4 19:56:17 2021 -0400 tools/power turbostat: Support "turbostat --hide idle" As idle, in particular, can have many columns on some machines... Make it easy to ignore them all at once. Signed-off-by: Len Brown commit 38c6663a68903cf1187003129cd1873551979865 Author: Len Brown Date: Tue May 4 19:27:34 2021 -0400 tools/power turbostat: elevate priority of interval mode This makes interval mode less likely to see delayed results on a heavily loaded system. Signed-off-by: Len Brown commit 1b439f01b67c77a374adbbd97ad0c745b7abb09b Author: Len Brown Date: Tue May 4 19:21:34 2021 -0400 tools/power turbostat: formatting Spring is here... run a long overdue Lendent on turbostat.c no functional change Signed-off-by: Len Brown commit 55279aef754c5eab170077ae4ba4ebd304dea64f Author: Zhang Rui Date: Mon Apr 26 18:49:26 2021 +0800 tools/power turbostat: rename tcc variables There are two TCC activation temeprature. One is the default TCC activation temperature, also known as TJ_MAX. Another one is the effective TCC activation temperature, which is the subtraction of default TCC activation temperature and TCC offset. The name of variable tcc_activation_temp might be misleading here. Thus rename tcc_activation_temp to tj_max, and use tcc_default and tcc_offset to calculate the effective TCC activation temperature. No functional change in this patch. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 0b9a0b9be991656f125b58a240065cdf72077244 Author: Zhang Rui Date: Wed Apr 21 23:22:14 2021 +0800 tools/power turbostat: add TCC Offset support The length of TCC Offset bits varies on different platforms. Decode TCC Offset bits only for the platforms that we have verified. For the others, only show default TCC activation temperature. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit e9d3092f6d7c21031c8ac10ba2016ae0482a39fe Author: Zhang Rui Date: Mon Apr 26 10:05:27 2021 +0800 tools/power turbostat: save original CPU model CPU model may get changed in intel_model_duplicates() for code reuse. But there are still some cases we need the original CPU model to handle minor differences between generations. Thus save the original CPU model. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit 7ab5ff4937a338783d147ec2d8c8714f48a5de79 Author: Zhang Rui Date: Wed Apr 21 22:22:47 2021 +0800 tools/power turbostat: Fix Core C6 residency on Atom CPUs For Atom CPUs that have core cstate deeper than C6, MSR_CORE_C6_RESIDENCY actually returns the residency for both CC6 and deeper Core cstates. Thus, the real Core C6 residency should be the subtraction of MSR_CORE_C6_RESIDENCY return value and MSR_CORE_C6_RESIDENCY return value. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit aeb01e6d71ffaf3011ac755c3083cc200ed57cb4 Author: Chen Yu Date: Wed Apr 28 12:18:12 2021 +0800 tools/power turbostat: Print the C-state Pre-wake settings C-state pre-wake setting[1] is an optimization for some Intel CPUs to be woken up from deep C-states in order to reduce latency. According to the spec, the BIT30 is the C-state Pre-wake Disable. Expose this setting accordingly. Sample output from turbostat: ... cpu51: MSR_IA32_POWER_CTL: 0x1a00a40059 (C1E auto-promotion: DISabled) C-state Pre-wake: ENabled cpu51: MSR_TURBO_RATIO_LIMIT: 0x2021212121212224 ... [1] https://intel.github.io/wult/#c-state-pre-wake Signed-off-by: Chen Yu Signed-off-by: Len Brown commit 8c69da293041352d15a2b6e8010c141822a416c5 Author: Chen Yu Date: Wed Apr 28 10:51:57 2021 +0800 tools/power turbostat: Enable tsc_tweak for Elkhart Lake and Jasper Lake It was found that on Elkhart Lake the TSC frequency is driven by a separate crystal-clock domain, which is different from the BCLK domain which includes mperf. This has result in small different speed thus inconsistence between TSC and the mperf, which caused the Busy% to be higher than 100%. On this platform it seems that the mperf runs faster than tsc when the CPU is 100% utilized: delta tsc(18815473183) < delta mperf(18958403680) for 10 seconds. To align TSC with mperf, leverage the tsc_tweak mechanism introduced for cores newer than Skylake, so that TSC and mperf would be calculated in the same domain. Reported-by: Zhang Rui Signed-off-by: Chen Yu Signed-off-by: Len Brown commit 1e3ec5cdfb63bc2a1ff06145faa2be08d6ec9594 Author: Randy Dunlap Date: Thu Mar 25 13:13:33 2021 -0700 tools/power turbostat: unmark non-kernel-doc comment Do not mark a comment as kernel-doc notation when it is not meant to be in kernel-doc notation. Signed-off-by: Randy Dunlap Signed-off-by: Len Brown commit 25368d7cefcd87a94ccabcc6f9f31796607bbe4e Author: Chen Yu Date: Tue May 4 17:52:34 2021 +0300 tools/power/turbostat: Remove Package C6 Retention on Ice Lake Server Currently the turbostat treats ICX the same way as SKX and shares the code among them. But one difference is that ICX does not support Package C6 Retention, unlike SKX and CLX. So this patch: 1. Splitting SKX and ICX in turbostat. 2. Removing Package C6 Rentention for ICX. And after this split, it would be easier to cutomize Ice Lake Server in turbostat in the future. Suggested-by: Artem Bityutskiy Signed-off-by: Chen Yu Reviewed-by: Artem Bityutskiy Tested-by: Artem Bityutskiy Signed-off-by: Len Brown commit 13a779de4175df602366d129e41782ad7168cef0 Author: Calvin Walton Date: Wed Apr 28 17:09:16 2021 +0800 tools/power turbostat: Fix offset overflow issue in index converting The idx_to_offset() function returns type int (32-bit signed), but MSR_PKG_ENERGY_STAT is u32 and would be interpreted as a negative number. The end result is that it hits the if (offset < 0) check in update_msr_sum() which prevents the timer callback from updating the stat in the background when long durations are used. The similar issue exists in offset_to_idx() and update_msr_sum(). Fix this issue by converting the 'int' to 'off_t' accordingly. Fixes: 9972d5d84d76 ("tools/power turbostat: Enable accumulate RAPL display") Signed-off-by: Calvin Walton Signed-off-by: Len Brown commit 301b1d3a9104f4f3a8ab4171cf88d0f55d632b41 Author: Bas Nieuwenhuizen Date: Wed Apr 28 17:09:03 2021 +0800 tools/power/turbostat: Fix turbostat for AMD Zen CPUs It was reported that on Zen+ system turbostat started exiting, which was tracked down to the MSR_PKG_ENERGY_STAT read failing because offset_to_idx wasn't returning a non-negative index. This patch combined the modification from Bingsong Si and Bas Nieuwenhuizen and addd the MSR to the index system as alternative for MSR_PKG_ENERGY_STATUS. Fixes: 9972d5d84d76 ("tools/power turbostat: Enable accumulate RAPL display") Reported-by: youling257 Tested-by: youling257 Tested-by: Kurt Garloff Tested-by: Bingsong Si Tested-by: Artem S. Tashkinov Co-developed-by: Bingsong Si Co-developed-by: Terry Bowman Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Chen Yu Signed-off-by: Len Brown commit ba58ecde5eec898f647bba7cb07e6ec6ea1b875c Author: Len Brown Date: Fri Mar 12 17:30:30 2021 -0500 tools/power turbostat: update version number commit abdc75ab53b7fd2ef42c79e88cf0caf2d007c4f2 Author: Zhang Rui Date: Thu Mar 11 10:05:13 2021 +0800 tools/power turbostat: Fix DRAM Energy Unit on SKX SKX uses fixed DRAM Energy Unit, just like HSX and BDX. Signed-off-by: Zhang Rui Signed-off-by: Len Brown commit b2b94be787bf47eedd5890a249f3318bf9f1f1d5 Author: Len Brown Date: Thu Mar 11 18:36:35 2021 -0500 Revert "tools/power turbostat: adjust for temperature offset" This reverts commit 6ff7cb371c4bea3dba03a56d774da925e78a5087. Apparently the TCC offset should not be used to adjust what temperature we show the user after all. (on most systems, TCC offset is 0, FWIW) Fixes: 6ff7cb371c4b Signed-off-by: Len Brown commit 6c5c656006cf314196faea7bd76eebbfa0941cd1 Author: Chen Yu Date: Wed Feb 3 16:26:32 2021 +0800 tools/power turbostat: Support Ice Lake D Ice Lake D is low-end server version of Ice Lake X, reuse the code accordingly. Tested-by: Wendy Wang Signed-off-by: Chen Yu Signed-off-by: Len Brown commit 5683460b85a8a14c5eec10e363635ad4660eb961 Author: Chen Yu Date: Wed Feb 3 16:19:59 2021 +0800 tools/power turbostat: Support Alder Lake Mobile Share the code between Alder Lake Mobile and Alder Lake Desktop. Signed-off-by: Chen Yu Signed-off-by: Len Brown commit ed0757b83a00d1799c249073d688b018b82d0093 Author: Len Brown Date: Thu Feb 4 14:44:12 2021 -0500 tools/power turbostat: print microcode patch level (also available via "grep microcode /proc/cpuinfo") Signed-off-by: Len Brown commit 2af4f9b8596afbbd7667a18fa71d117bac227dea Author: Len Brown Date: Sat Jan 30 23:43:10 2021 -0500 tools/power turbostat: add built-in-counter for IPC -- Instructions per Cycle Use linux-perf to access the hardware instructions-retired counter. This is necessary because the counter is not enabled by default, and also the counter is prone to roll-over -- both of which perf manages. It is not necessary to use perf for the cycle counter, because turbostat already needs to collect delta-aperf to calcuate frequency. Signed-off-by: Len Brown commit 8651fcb9873be097bb6fe8542bfb6089020726ae Author: Tom Rix Date: Fri Apr 30 10:16:54 2021 -0700 drm/amd/pm: initialize variable Static analysis reports this problem amdgpu_pm.c:478:16: warning: The right operand of '<' is a garbage value for (i = 0; i < data.nums; i++) { ^ ~~~~~~~~~ In some cases data is not set. Initialize to 0 and flag not setting data as an error with the existing check. Signed-off-by: Tom Rix Signed-off-by: Alex Deucher commit c69f27137a38d24301a6b659454a91ad85dff4aa Author: Kees Cook Date: Sun May 2 22:06:08 2021 -0700 drm/radeon: Avoid power table parsing memory leaks Avoid leaving a hanging pre-allocated clock_info if last mode is invalid, and avoid heap corruption if no valid modes are found. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211537 Fixes: 6991b8f2a319 ("drm/radeon/kms: fix segfault in pm rework") Signed-off-by: Kees Cook Signed-off-by: Alex Deucher commit 5bbf219328849e83878bddb7c226d8d42e84affc Author: Kees Cook Date: Sun May 2 22:06:07 2021 -0700 drm/radeon: Fix off-by-one power_state index heap overwrite An out of bounds write happens when setting the default power state. KASAN sees this as: [drm] radeon: 512M of GTT memory ready. [drm] GART: num cpu pages 131072, num gpu pages 131072 ================================================================== BUG: KASAN: slab-out-of-bounds in radeon_atombios_parse_power_table_1_3+0x1837/0x1998 [radeon] Write of size 4 at addr ffff88810178d858 by task systemd-udevd/157 CPU: 0 PID: 157 Comm: systemd-udevd Not tainted 5.12.0-E620 #50 Hardware name: eMachines eMachines E620 /Nile , BIOS V1.03 09/30/2008 Call Trace: dump_stack+0xa5/0xe6 print_address_description.constprop.0+0x18/0x239 kasan_report+0x170/0x1a8 radeon_atombios_parse_power_table_1_3+0x1837/0x1998 [radeon] radeon_atombios_get_power_modes+0x144/0x1888 [radeon] radeon_pm_init+0x1019/0x1904 [radeon] rs690_init+0x76e/0x84a [radeon] radeon_device_init+0x1c1a/0x21e5 [radeon] radeon_driver_load_kms+0xf5/0x30b [radeon] drm_dev_register+0x255/0x4a0 [drm] radeon_pci_probe+0x246/0x2f6 [radeon] pci_device_probe+0x1aa/0x294 really_probe+0x30e/0x850 driver_probe_device+0xe6/0x135 device_driver_attach+0xc1/0xf8 __driver_attach+0x13f/0x146 bus_for_each_dev+0xfa/0x146 bus_add_driver+0x2b3/0x447 driver_register+0x242/0x2c1 do_one_initcall+0x149/0x2fd do_init_module+0x1ae/0x573 load_module+0x4dee/0x5cca __do_sys_finit_module+0xf1/0x140 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae Without KASAN, this will manifest later when the kernel attempts to allocate memory that was stomped, since it collides with the inline slab freelist pointer: invalid opcode: 0000 [#1] SMP NOPTI CPU: 0 PID: 781 Comm: openrc-run.sh Tainted: G W 5.10.12-gentoo-E620 #2 Hardware name: eMachines eMachines E620 /Nile , BIOS V1.03 09/30/2008 RIP: 0010:kfree+0x115/0x230 Code: 89 c5 e8 75 ea ff ff 48 8b 00 0f ba e0 09 72 63 e8 1f f4 ff ff 41 89 c4 48 8b 45 00 0f ba e0 10 72 0a 48 8b 45 08 a8 01 75 02 <0f> 0b 44 89 e1 48 c7 c2 00 f0 ff ff be 06 00 00 00 48 d3 e2 48 c7 RSP: 0018:ffffb42f40267e10 EFLAGS: 00010246 RAX: ffffd61280ee8d88 RBX: 0000000000000004 RCX: 000000008010000d RDX: 4000000000000000 RSI: ffffffffba1360b0 RDI: ffffd61280ee8d80 RBP: ffffd61280ee8d80 R08: ffffffffb91bebdf R09: 0000000000000000 R10: ffff8fe2c1047ac8 R11: 0000000000000000 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000100 FS: 00007fe80eff6b68(0000) GS:ffff8fe339c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe80eec7bc0 CR3: 0000000038012000 CR4: 00000000000006f0 Call Trace: __free_fdtable+0x16/0x1f put_files_struct+0x81/0x9b do_exit+0x433/0x94d do_group_exit+0xa6/0xa6 __x64_sys_exit_group+0xf/0xf do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7fe80ef64bea Code: Unable to access opcode bytes at RIP 0x7fe80ef64bc0. RSP: 002b:00007ffdb1c47528 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe80ef64bea RDX: 00007fe80ef64f60 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000000 R10: 00007fe80ee2c620 R11: 0000000000000246 R12: 00007fe80eff41e0 R13: 00000000ffffffff R14: 0000000000000024 R15: 00007fe80edf9cd0 Modules linked in: radeon(+) ath5k(+) snd_hda_codec_realtek ... Use a valid power_state index when initializing the "flags" and "misc" and "misc2" fields. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211537 Reported-by: Erhard F. Fixes: a48b9b4edb8b ("drm/radeon/kms/pm: add asic specific callbacks for getting power state (v2)") Fixes: 79daedc94281 ("drm/radeon/kms: minor pm cleanups") Signed-off-by: Kees Cook Signed-off-by: Alex Deucher commit 16e9b3e58bc3fce7391539e0eb3fd167cbf9951f Author: Rodrigo Siqueira Date: Tue Apr 13 20:06:04 2021 -0400 drm/amd/display: Fix two cursor duplication when using overlay Our driver supports overlay planes, and as expected, some userspace compositor takes advantage of these features. If the userspace is not enabling the cursor, they can use multiple planes as they please. Nevertheless, we start to have constraints when userspace tries to enable hardware cursor with various planes. Basically, we cannot draw the cursor at the same size and position on two separated pipes since it uses extra bandwidth and DML only run with one cursor. For those reasons, when we enable hardware cursor and multiple planes, our driver should accept variations like the ones described below: +-------------+ +--------------+ | +---------+ | | | | |Primary | | | Primary | | | | | | Overlay | | +---------+ | | | |Overlay | | | +-------------+ +--------------+ In this scenario, we can have the desktop UI in the overlay and some other framebuffer attached to the primary plane (e.g., video). However, userspace needs to obey some rules and avoid scenarios like the ones described below (when enabling hw cursor): +--------+ |Overlay | +-------------+ +-----+-------+ +-| |--+ | +--------+ | +--------+ | | +--------+ | | |Overlay | | |Overlay | | | | | | | | | | | | | | +--------+ | +--------+ | | | | Primary | | Primary | | Primary | +-------------+ +-------------+ +-------------+ +-------------+ +-------------+ | +--------+ | Primary | | |Overlay | | | | | | | | | +--------+ | +--------+ | | Primary | | |Overlay | | +-------------+ +-| |--+ +--------+ If the userspace violates some of the above scenarios, our driver needs to reject the commit; otherwise, we can have unexpected behavior. Since we don't have a proper driver validation for the above case, we can see some problems like a duplicate cursor in applications that use multiple planes. This commit fixes the cursor issue and others by adding adequate verification for multiple planes. Change since V1 (Harry and Sean): - Remove cursor verification from the equation. Cc: Louis Li Cc: Nicholas Kazlauskas Cc: Harry Wentland Cc: Hersen Wu Cc: Sean Paul Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit c83c4e1912446db697a120eb30126cd80cbf6349 Author: Evan Quan Date: Wed Apr 28 12:00:20 2021 +0800 drm/amdgpu: add new MC firmware for Polaris12 32bit ASIC Polaris12 32bit ASIC needs a special MC firmware. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 4c7a94286ef7ac7301d633f17519fb1bb89d7550 Author: Ramesh Babu B Date: Tue May 4 21:12:41 2021 +0530 net: stmmac: Clear receive all(RA) bit when promiscuous mode is off In promiscuous mode Receive All bit is set in GMAC packet filter register, but outside promiscuous mode Receive All bit is not cleared, which resulted in all network packets are received when toggle (ON/OFF) the promiscuous mode. Fixes: e0f9956a3862 ("net: stmmac: Add option for VLAN filter fail queue enable") Signed-off-by: Ramesh Babu B Signed-off-by: David S. Miller commit c61760e6940dd4039a7f5e84a6afc9cdbf4d82b6 Author: Or Cohen Date: Tue May 4 10:16:46 2021 +0300 net/nfc: fix use-after-free llcp_sock_bind/connect Commits 8a4cd82d ("nfc: fix refcount leak in llcp_sock_connect()") and c33b1cc62 ("nfc: fix refcount leak in llcp_sock_bind()") fixed a refcount leak bug in bind/connect but introduced a use-after-free if the same local is assigned to 2 different sockets. This can be triggered by the following simple program: int sock1 = socket( AF_NFC, SOCK_STREAM, NFC_SOCKPROTO_LLCP ); int sock2 = socket( AF_NFC, SOCK_STREAM, NFC_SOCKPROTO_LLCP ); memset( &addr, 0, sizeof(struct sockaddr_nfc_llcp) ); addr.sa_family = AF_NFC; addr.nfc_protocol = NFC_PROTO_NFC_DEP; bind( sock1, (struct sockaddr*) &addr, sizeof(struct sockaddr_nfc_llcp) ) bind( sock2, (struct sockaddr*) &addr, sizeof(struct sockaddr_nfc_llcp) ) close(sock1); close(sock2); Fix this by assigning NULL to llcp_sock->local after calling nfc_llcp_local_put. This addresses CVE-2021-23134. Reported-by: Or Cohen Reported-by: Nadav Markus Fixes: c33b1cc62 ("nfc: fix refcount leak in llcp_sock_bind()") Signed-off-by: Or Cohen Signed-off-by: David S. Miller commit 8d432592f30fcc34ef5a10aac4887b4897884493 Author: Jonathon Reinhart Date: Sat May 1 04:28:22 2021 -0400 net: Only allow init netns to set default tcp cong to a restricted algo tcp_set_default_congestion_control() is netns-safe in that it writes to &net->ipv4.tcp_congestion_control, but it also sets ca->flags |= TCP_CONG_NON_RESTRICTED which is not namespaced. This has the unintended side-effect of changing the global net.ipv4.tcp_allowed_congestion_control sysctl, despite the fact that it is read-only: 97684f0970f6 ("net: Make tcp_allowed_congestion_control readonly in non-init netns") Resolve this netns "leak" by only allowing the init netns to set the default algorithm to one that is restricted. This restriction could be removed if tcp_allowed_congestion_control were namespace-ified in the future. This bug was uncovered with https://github.com/JonathonReinhart/linux-netns-sysctl-verify Fixes: 6670e1524477 ("tcp: Namespace-ify sysctl_tcp_default_congestion_control") Signed-off-by: Jonathon Reinhart Signed-off-by: David S. Miller commit d0034a7a4ac7fae708146ac0059b9c47a1543f0d Merge: 56cfe6f820a63 d12b64b9764ea Author: Dmitry Torokhov Date: Tue May 4 11:46:00 2021 -0700 Merge branch 'next' into for-linus Prepare input updates for 5.13 merge window. commit e4adffb8daf476a01e7b4a55f586dc8c26e81392 Merge: 8796ac1d031ad 0bde4444ec44b Author: Linus Torvalds Date: Tue May 4 11:24:46 2021 -0700 Merge tag 'dmaengine-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine Pull dmaengine updates from Vinod Koul: "New drivers/devices: - Support for QCOM SM8150 GPI DMA Updates: - Big pile of idxd updates including support for performance monitoring - Support in dw-edma for interleaved dma - Support for synchronize() in Xilinx driver" * tag 'dmaengine-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (42 commits) dmaengine: idxd: Enable IDXD performance monitor support dmaengine: idxd: Add IDXD performance monitor support dmaengine: idxd: remove MSIX masking for interrupt handlers dmaengine: idxd: device cmd should use dedicated lock dmaengine: idxd: support reporting of halt interrupt dmaengine: idxd: enable SVA feature for IOMMU dmaengine: idxd: convert sprintf() to sysfs_emit() for all usages dmaengine: idxd: add interrupt handle request and release support dmaengine: idxd: add support for readonly config mode dmaengine: idxd: add percpu_ref to descriptor submission path dmaengine: idxd: remove detection of device type dmaengine: idxd: iax bus removal dmaengine: idxd: fix cdev setup and free device lifetime issues dmaengine: idxd: fix group conf_dev lifetime dmaengine: idxd: fix engine conf_dev lifetime dmaengine: idxd: fix wq conf_dev 'struct device' lifetime dmaengine: idxd: fix idxd conf_dev 'struct device' lifetime dmaengine: idxd: use ida for device instance enumeration dmaengine: idxd: removal of pcim managed mmio mapping dmaengine: idxd: cleanup pci interrupt vector allocation management ... commit 8796ac1d031ad0d9346fd62841c8eb359570ba48 Merge: a01d9524cad7c edf696f268557 Author: Linus Torvalds Date: Tue May 4 11:13:33 2021 -0700 Merge tag 'rproc-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "This adds support to the remoteproc core for detaching Linux from a running remoteproc, e.g. to reboot Linux while leaving the remoteproc running, and it enable this support in the stm32 remoteproc driver. It also introduces a property for memory carveouts to track if they are iomem or system ram, to enable proper handling of the differences. The imx_rproc received a number of fixes and improvements, in particular support for attaching to already running remote processors and i.MX8MQ and i.MX8MM support. The Qualcomm wcss driver gained support for starting and stopping the wireless subsystem on QCS404, when not using the TrustZone-based validator/loader. Finally it brings a few fixes to the TI PRU and to the firmware loader for the Qualcomm modem subsystem drivers" * tag 'rproc-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: (53 commits) remoteproc: stm32: add capability to detach dt-bindings: remoteproc: stm32-rproc: add new mailbox channel for detach remoteproc: imx_rproc: support remote cores booted before Linux Kernel remoteproc: imx_rproc: move memory parsing to rproc_ops remoteproc: imx_rproc: enlarge IMX7D_RPROC_MEM_MAX remoteproc: imx_rproc: add missing of_node_put remoteproc: imx_rproc: fix build error without CONFIG_MAILBOX remoteproc: qcom: wcss: Remove unnecessary PTR_ERR() remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR() remoteproc: qcom: pas: Add modem support for SDX55 dt-bindings: remoteproc: qcom: pas: Add binding for SDX55 remoteproc: qcom: wcss: Fix return value check in q6v5_wcss_init_mmio() remoteproc: pru: Fix and cleanup firmware interrupt mapping logic remoteproc: pru: Fix wrong success return value for fw events remoteproc: pru: Fixup interrupt-parent logic for fw events remoteproc: qcom: wcnss: Allow specifying firmware-name remoteproc: qcom: wcss: explicitly request exclusive reset control remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404 dt-bindings: remoteproc: qcom: Add Q6V5 Modem PIL binding for QCS404 remoteproc: qcom: wcss: populate hardcoded param using driver data ... commit a01d9524cad7c0327bb6d6777639b4c0b3df8840 Merge: 0c01a4c4ca5b2 26594c6bbb60c Author: Linus Torvalds Date: Tue May 4 11:08:51 2021 -0700 Merge tag 'rpmsg-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "In addition to some bug fixes and cleanups this adds support for exposing the virtio based transport to user space using the rpmsg_char driver" * tag 'rpmsg-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data() rpmsg: char: Return an error if device already open rpmsg: virtio: Register the rpmsg_char device rpmsg: char: Use rpmsg_sendto to specify the message destination address rpmsg: Add short description of the IOCTL defined in UAPI. rpmsg: Move RPMSG_ADDR_ANY in user API rpmsg: char: Rename rpmsg_char_init to rpmsg_chrdev_init commit 0c01a4c4ca5b2b06bdc5f633b943eea5fe4f390e Merge: 74d6790cdaaf3 1cb8f3e2d8fe7 Author: Linus Torvalds Date: Tue May 4 11:04:35 2021 -0700 Merge tag 'hwlock-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc Pull hwspinlock udpates from Bjorn Andersson: "This removes the SIRF hardware spinlock driver, as the platform is being removed" * tag 'hwlock-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/andersson/remoteproc: hwspinlock: remove sirf driver commit 74d6790cdaaf3825afe53e668b32e662ad5e2e12 Merge: 954b7207059cc dfc06b389a4f5 Author: Linus Torvalds Date: Tue May 4 10:58:49 2021 -0700 Merge branch 'stable/for-linus-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb Pull swiotlb updates from Konrad Rzeszutek Wilk: "Christoph Hellwig has taken a cleaver and trimmed off the not-needed code and nicely folded duplicate code in the generic framework. This lays the groundwork for more work to add extra DMA-backend-ish in the future. Along with that some bug-fixes to make this a nice working package" * 'stable/for-linus-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb: swiotlb: don't override user specified size in swiotlb_adjust_size swiotlb: Fix the type of index swiotlb: Make SWIOTLB_NO_FORCE perform no allocation ARM: Qualify enabling of swiotlb_init() swiotlb: remove swiotlb_nr_tbl swiotlb: dynamically allocate io_tlb_default_mem swiotlb: move global variables into a new io_tlb_mem structure xen-swiotlb: remove the unused size argument from xen_swiotlb_fixup xen-swiotlb: split xen_swiotlb_init swiotlb: lift the double initialization protection from xen-swiotlb xen-swiotlb: remove xen_io_tlb_start and xen_io_tlb_nslabs xen-swiotlb: remove xen_set_nslabs xen-swiotlb: use io_tlb_end in xen_swiotlb_dma_supported xen-swiotlb: use is_swiotlb_buffer in is_xen_swiotlb_buffer swiotlb: split swiotlb_tbl_sync_single swiotlb: move orig addr and size validation into swiotlb_bounce swiotlb: remove the alloc_size parameter to swiotlb_tbl_unmap_single powerpc/svm: stop using io_tlb_start commit 954b7207059cc4004f2e18f49c335304b1c6d64a Merge: 51e6f07cb12e5 a7f3d3d3600c8 Author: Linus Torvalds Date: Tue May 4 10:52:09 2021 -0700 Merge tag 'dma-mapping-5.13' of git://git.infradead.org/users/hch/dma-mapping Pull dma-mapping updates from Christoph Hellwig: - add a new dma_alloc_noncontiguous API (me, Ricardo Ribalda) - fix a copyright notice (Hao Fang) - add an unlikely annotation to dma_mapping_error (Heiner Kallweit) - remove a pointless empty line (Wang Qing) - add support for multi-pages map/unmap bencharking (Xiang Chen) * tag 'dma-mapping-5.13' of git://git.infradead.org/users/hch/dma-mapping: dma-mapping: add unlikely hint to error path in dma_mapping_error dma-mapping: benchmark: Add support for multi-pages map/unmap dma-mapping: benchmark: use the correct HiSilicon copyright dma-mapping: remove a pointless empty line in dma_alloc_coherent media: uvcvideo: Use dma_alloc_noncontiguous API dma-iommu: implement ->alloc_noncontiguous dma-iommu: refactor iommu_dma_alloc_remap dma-mapping: add a dma_alloc_noncontiguous API dma-mapping: refactor dma_{alloc,free}_pages dma-mapping: add a dma_mmap_pages helper commit 51e6f07cb12e50bfc71181bd08bad5f0a9b5e9e2 Merge: 5e321ded302da 6b3788e5fb804 Author: Linus Torvalds Date: Tue May 4 10:48:05 2021 -0700 Merge tag 'm68knommu-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu updates from Greg Ungerer: - a fix for interrupt number range checking for the ColdFire SIMR interrupt controller. - changes for the binfmt_flat binary loader to allow RISC-V nommu support it needs to be able to accept flat binaries that have no gap between the text and data sections. * tag 'm68knommu-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: coldfire: fix irq ranges riscv: Disable data start offset in flat binaries binfmt_flat: allow not offsetting data start commit b208108638c4bd3215792415944467c36f5dfd97 Author: David Hildenbrand Date: Mon May 3 14:12:44 2021 +0200 s390: fix detection of vector enhancements facility 1 vs. vector packed decimal facility The PoP documents: 134: The vector packed decimal facility is installed in the z/Architecture architectural mode. When bit 134 is one, bit 129 is also one. 135: The vector enhancements facility 1 is installed in the z/Architecture architectural mode. When bit 135 is one, bit 129 is also one. Looks like we confuse the vector enhancements facility 1 ("EXT") with the Vector packed decimal facility ("BCD"). Let's fix the facility checks. Detected while working on QEMU/tcg z14 support and only unlocking the vector enhancements facility 1, but not the vector packed decimal facility. Fixes: 2583b848cad0 ("s390: report new vector facilities") Cc: Vasily Gorbik Signed-off-by: David Hildenbrand Reviewed-by: Christian Borntraeger Reviewed-by: Cornelia Huck Reviewed-by: Janosch Frank Link: https://lore.kernel.org/r/20210503121244.25232-1-david@redhat.com Signed-off-by: Heiko Carstens commit bae4c0c1c2d576d32e37925ef972a5d45f34e36d Author: Khaled ROMDHANI Date: Tue May 4 16:38:55 2021 +0100 fs/cifs: Fix resource leak The -EIO error return path is leaking memory allocated to page. Fix this by moving the allocation block after the check of cifs_forced_shutdown. Addresses-Coverity: ("Resource leak") Fixes: 087f757b0129 ("cifs: add shutdown support") Signed-off-by: Khaled ROMDHANI Reviewed-by: Dan Carpenter Signed-off-by: Steve French commit 78c09634f7dc061a3bd09704cdbebb3762a45cdf Author: Rohith Surabattula Date: Mon Apr 19 19:02:03 2021 +0000 Cifs: Fix kernel oops caused by deferred close for files. Fix regression issue caused by deferred close for files. Signed-off-by: Rohith Surabattula Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 5c1acf3fe05ce443edba5e2110c9e581765f66a8 Author: Paulo Alcantara Date: Mon May 3 11:55:26 2021 -0300 cifs: fix regression when mounting shares with prefix paths The commit 315db9a05b7a ("cifs: fix leak in cifs_smb3_do_mount() ctx") revealed an existing bug when mounting shares that contain a prefix path or DFS links. cifs_setup_volume_info() requires the @devname to contain the full path (UNC + prefix) to update the fs context with the new UNC and prepath values, however we were passing only the UNC path (old_ctx->UNC) in @device thus discarding any prefix paths. Instead of concatenating both old_ctx->{UNC,prepath} and pass it in @devname, just keep the dup'ed values of UNC and prepath in cifs_sb->ctx after calling smb3_fs_context_dup(), and fix smb3_parse_devname() to correctly parse and not leak the new UNC and prefix paths. Cc: # v5.11+ Fixes: 315db9a05b7a ("cifs: fix leak in cifs_smb3_do_mount() ctx") Signed-off-by: Paulo Alcantara (SUSE) Acked-by: David Disseldorp Signed-off-by: Steve French commit 77364faf21b4105ee5adbb4844fdfb461334d249 Author: Tom Rix Date: Fri Apr 30 11:06:55 2021 -0700 btrfs: initialize return variable in cleanup_free_space_cache_v1 Static analysis reports this problem free-space-cache.c:3965:2: warning: Undefined or garbage value returned return ret; ^~~~~~~~~~ ret is set in the node handling loop. Treat doing nothing as a success and initialize ret to 0, although it's unlikely the loop would be skipped. We always have block groups, but as it could lead to transaction abort in the caller it's better to be safe. CC: stable@vger.kernel.org # 5.12+ Signed-off-by: Tom Rix Reviewed-by: David Sterba Signed-off-by: David Sterba commit 698f99ed5e06946764c3be035ce9d62a2691e08c Author: Dan Carpenter Date: Thu Apr 29 12:53:27 2021 +0300 vfio/mdev: remove unnecessary NULL check in mbochs_create() Originally "type" could be NULL and these checks were required, but we recently changed how "type" is assigned and that's no longer the case. Now "type" points to an element in the middle of a non-NULL array. Removing the checks does not affect runtime at all, but it makes the code a little bit simpler to read. Fixes: 3d3a360e570616 ("vfio/mbochs: Use mdev_get_type_group_id()") Signed-off-by: Dan Carpenter Reviewed-by: Jason Gunthorpe Message-Id: <20210429095327.GY1981@kadam> Signed-off-by: Alex Williamson commit 6e552494fb90acae005d74ce6a2ee102d965184b Author: Brian Foster Date: Tue May 4 08:54:29 2021 -0700 iomap: remove unused private field from ioend The only remaining user of ->io_private is the generic ioend merging infrastructure. The only user of that is XFS, which no longer sets ->io_private or passes an associated merge callback. Remove the unused parameter and the ->io_private field. CC: linux-fsdevel@vger.kernel.org Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 882862aaacefcb9f723b0f7817ddafc154465d8f Merge: a147995c9f565 7f100744749e4 Author: Bjorn Helgaas Date: Tue May 4 10:43:32 2021 -0500 Merge branch 'pci/tegra' - Add MCFG quirks for Tegra194 ECAM errata (Vidya Sagar) * pci/tegra: PCI: tegra: Add Tegra194 MCFG quirks for ECAM errata commit a147995c9f565258d849bf5e425f7dc00bdc5c29 Merge: a4ffbb7a96eab bb610757fcd74 Author: Bjorn Helgaas Date: Tue May 4 10:43:31 2021 -0500 Merge branch 'pci/brcmstb' - Add reset_control_rearm() stub for !CONFIG_RESET_CONTROLLER (Jim Quinlan) - Fix use of BCM7216 reset controller (Jim Quinlan) - Use reset/rearm for Broadcom STB pulse reset instead of deassert/assert (Jim Quinlan) * pci/brcmstb: PCI: brcmstb: Use reset/rearm instead of deassert/assert ata: ahci_brcm: Fix use of BCM7216 reset controller reset: add missing empty function reset_control_rearm() commit a4ffbb7a96eab872ead38f8013883e958180c730 Merge: 51bc2b7ffd5d9 52ab55dfe3235 Author: Bjorn Helgaas Date: Tue May 4 10:43:31 2021 -0500 Merge branch 'remotes/lorenzo/pci/misc' - Remove layerscape-gen4 dependencies on OF and ARM64, add dependency on ARCH_LAYERSCAPE (Geert Uytterhoeven) - Remove obsolete HiSilicon PCIe DT description (Dongdong Liu) * remotes/lorenzo/pci/misc: dt-bindings: PCI: hisi: Delete the obsolete HiSilicon PCIe file PCI: mobiveil: Improve PCIE_LAYERSCAPE_GEN4 dependencies commit 51bc2b7ffd5d9c39c04a76fbb30c1f53c0cc635e Merge: 4772ade273065 557853f4e23e6 Author: Bjorn Helgaas Date: Tue May 4 10:43:30 2021 -0500 Merge branch 'remotes/lorenzo/pci/msi' - Convert tegra to MSI domains (Marc Zyngier) - Use rcar controller address as MSI doorbell instead of allocating a page (Marc Zyngier) - Convert rcar to MSI domains (Marc Zyngier) - Use xilinx port structure as MSI doorbell instead of allocating a page (Marc Zyngier) - Convert xilinx to MSI domains (Marc Zyngier) - Remove unused Hyper-V msi_controller structure (Marc Zyngier) - Remove unused PCI core msi_controller support (Marc Zyngier) - Remove struct msi_controller (Marc Zyngier) - Remove unused default_teardown_msi_irqs() (Marc Zyngier) - Let host bridges declare their reliance on MSI domains (Marc Zyngier) - Make pci_host_common_probe() declare its reliance on MSI domains (Marc Zyngier) - Advertise mediatek lack of built-in MSI handling (Thomas Gleixner) - Document ways of ending up with NO_MSI (Marc Zyngier) - Refactor HT advertising of NO_MSI flag (Marc Zyngier) * remotes/lorenzo/pci/msi: PCI: Refactor HT advertising of NO_MSI flag PCI/MSI: Document the various ways of ending up with NO_MSI PCI: mediatek: Advertise lack of built-in MSI handling PCI/MSI: Make pci_host_common_probe() declare its reliance on MSI domains PCI/MSI: Let PCI host bridges declare their reliance on MSI domains PCI/MSI: Kill default_teardown_msi_irqs() PCI/MSI: Kill msi_controller structure PCI/MSI: Drop use of msi_controller from core code PCI: hv: Drop msi_controller structure PCI: xilinx: Convert to MSI domains PCI: xilinx: Don't allocate extra memory for the MSI capture address PCI: rcar: Convert to MSI domains PCI: rcar: Don't allocate extra memory for the MSI capture address PCI: tegra: Convert to MSI domains commit 4772ade27306551193c992fb9d1409ce6ed03a21 Merge: 2a2dd35fee87b 1c4422f22605e Author: Bjorn Helgaas Date: Tue May 4 10:43:30 2021 -0500 Merge branch 'remotes/lorenzo/pci/xilinx' - Add support for coherent PCIe DMA traffic using CCI (Bharat Kumar Gogada) - Add optional "dma-coherent" DT property (Bharat Kumar Gogada) * remotes/lorenzo/pci/xilinx: PCI: xilinx-nwl: Add optional "dma-coherent" property PCI: xilinx-nwl: Enable coherent PCIe DMA traffic using CCI commit 2a2dd35fee87b7a0d373cd41d90cecf6348cdcbc Merge: 04dcc048f343a d4707d79fae08 Author: Bjorn Helgaas Date: Tue May 4 10:43:30 2021 -0500 Merge branch 'remotes/lorenzo/pci/xgene' - Fix cfg resource mapping regression (Dejin Zheng) * remotes/lorenzo/pci/xgene: PCI: xgene: Fix cfg resource mapping commit 04dcc048f343aea97c86bce81ad53b9a36037130 Merge: 5b8dafa1e3b88 ee81ee84f8739 Author: Bjorn Helgaas Date: Tue May 4 10:43:29 2021 -0500 Merge branch 'remotes/lorenzo/pci/vmd' - Program IRTE with Requester ID of VMD endpoint, not child device (Jon Derrick) - Disable VMD MSI-X remapping when possible so children can use more MSI-X vectors (Jon Derrick) * remotes/lorenzo/pci/vmd: PCI: vmd: Disable MSI-X remapping when possible iommu/vt-d: Use Real PCI DMA device for IRTE commit 5b8dafa1e3b880decc2247397b8ae0882af0ba6e Merge: 98d771eb3df23 5859c926d1f05 Author: Bjorn Helgaas Date: Tue May 4 10:43:29 2021 -0500 Merge branch 'remotes/lorenzo/pci/tegra' - Make several tegra symbols const (Rikard Falkeborn) - Fix tegra Kconfig host/endpoint typo (Wesley Sheng) - Fix runtime PM imbalance (Dinghao Liu) * remotes/lorenzo/pci/tegra: PCI: tegra: Fix runtime PM imbalance in pex_ep_event_pex_rst_deassert() PCI: tegra: Fix typo for PCIe endpoint mode in Tegra194 PCI: tegra: Constify static structs commit 98d771eb3df23207d671a9efb1160c018ab8e492 Merge: 180594f55f69d ae80d51480855 Author: Bjorn Helgaas Date: Tue May 4 10:43:28 2021 -0500 Merge branch 'remotes/lorenzo/pci/risc-v' - sifive: Add pcie_aux clock to prci driver (Greentime Hu) - sifive: Use reset-simple in prci driver for PCIe (Greentime Hu) - Add SiFive FU740 PCIe host controller driver and DT binding (Paul Walmsley, Greentime Hu) * remotes/lorenzo/pci/risc-v: riscv: dts: Add PCIe support for the SiFive FU740-C000 SoC PCI: fu740: Add SiFive FU740 PCIe host controller driver dt-bindings: PCI: Add SiFive FU740 PCIe host controller MAINTAINERS: Add maintainers for SiFive FU740 PCIe driver clk: sifive: Use reset-simple in prci driver for PCIe driver clk: sifive: Add pcie_aux clock in prci driver for PCIe driver commit 180594f55f69d3f64a8f67832867845de2018684 Merge: 0b51c08bde08a 6e7628c8c3c1a Author: Bjorn Helgaas Date: Tue May 4 10:43:28 2021 -0500 Merge branch 'remotes/lorenzo/pci/microchip' - Make several microchip symbols static (Wei Yongjun) - Drop redundant dev_err() for platform_get_irq() errors (Krzysztof Wilczyński) * remotes/lorenzo/pci/microchip: PCI: microchip: Remove dev_err() when handing an error from platform_get_irq() PCI: microchip: Make some symbols static commit 0b51c08bde08a8ce0f0f0b63a08d7be5cc203039 Merge: 586fbe90f8302 0739191b84813 Author: Bjorn Helgaas Date: Tue May 4 10:43:28 2021 -0500 Merge branch 'remotes/lorenzo/pci/mediatek' - Configure FC and FTS for functions other than 0 (Ryder Lee) - Add missing MODULE_DEVICE_TABLE (Qiheng Lin) - Add YAML schema for MediaTek (Jianjun Wang) - Export pci_pio_to_address() for module use (Jianjun Wang) - Add MediaTek MT8192 PCIe controller driver (Jianjun Wang) - Add MediaTek MT8192 INTx support (Jianjun Wang) - Add MediaTek MT8192 MSI support (Jianjun Wang) - Add MediaTek MT8192 system power management support (Jianjun Wang) * remotes/lorenzo/pci/mediatek: MAINTAINERS: Add Jianjun Wang as MediaTek PCI co-maintainer PCI: mediatek-gen3: Add system PM support PCI: mediatek-gen3: Add MSI support PCI: mediatek-gen3: Add INTx support PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192 PCI: Export pci_pio_to_address() for module use dt-bindings: PCI: mediatek-gen3: Add YAML schema PCI: mediatek: Add missing MODULE_DEVICE_TABLE PCI: mediatek: Configure FC and FTS for functions other than 0 commit 8e9800f9f2b89e1efe2a5993361fae4d618a6c26 Author: Darrick J. Wong Date: Thu Apr 29 14:39:33 2021 -0700 xfs: don't allow log writes if the data device is readonly While running generic/050 with an external log, I observed this warning in dmesg: Trying to write to read-only block-device sda4 (partno 4) WARNING: CPU: 2 PID: 215677 at block/blk-core.c:704 submit_bio_checks+0x256/0x510 Call Trace: submit_bio_noacct+0x2c/0x430 _xfs_buf_ioapply+0x283/0x3c0 [xfs] __xfs_buf_submit+0x6a/0x210 [xfs] xfs_buf_delwri_submit_buffers+0xf8/0x270 [xfs] xfsaild+0x2db/0xc50 [xfs] kthread+0x14b/0x170 I think this happened because we tried to cover the log after a readonly mount, and the AIL tried to write the primary superblock to the data device. The test marks the data device readonly, but it doesn't do the same to the external log device. Therefore, XFS thinks that the log is writable, even though AIL writes whine to dmesg because the data device is read only. Fix this by amending xfs_log_writable to prevent writes when the AIL can't possible write anything into the filesystem. Note: As for the external log or the rt devices being readonly-- xfs_blkdev_get will complain about that if we aren't doing a norecovery mount. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit 586fbe90f830285022f886754f25783520156339 Merge: 1c401162ed110 1b7996a528b3f Author: Bjorn Helgaas Date: Tue May 4 10:43:27 2021 -0500 Merge branch 'remotes/lorenzo/pci/layerscape' - Fix ls_pcie_ep_probe() syntax error (comma for semicolon) (Krzysztof Wilczyński) * remotes/lorenzo/pci/layerscape: PCI: layerscape: Correct syntax by changing comma to semicolon commit 1c401162ed110c1ebc04a9954d931d333717f95a Merge: 362e377037b15 1e83130f01b04 Author: Bjorn Helgaas Date: Tue May 4 10:43:27 2021 -0500 Merge branch 'remotes/lorenzo/pci/iproc' - Return zero for success of iproc_msi_irq_domain_alloc() (Pali Rohár) * remotes/lorenzo/pci/iproc: PCI: iproc: Fix return value of iproc_msi_irq_domain_alloc() commit 362e377037b1591528f02c192f6ffd3b0f212e39 Merge: a5166a194ee46 acaef7981a218 Author: Bjorn Helgaas Date: Tue May 4 10:43:27 2021 -0500 Merge branch 'remotes/lorenzo/pci/endpoint' - Fix NULL pointer dereference when epc_features not implemented (Shradha Todi) - Remove redundant initialization (Colin Ian King) - Add missing destroy_workqueue() in endpoint test (Yang Yingliang) * remotes/lorenzo/pci/endpoint: PCI: endpoint: Fix missing destroy_workqueue() PCI: endpoint: Remove redundant initialization of pointer dev PCI: endpoint: Fix NULL pointer dereference for ->get_features() commit a5166a194ee46b8daa440b43f24595c9a1312743 Merge: 3ec17ca688cf7 8bcca26585585 Author: Bjorn Helgaas Date: Tue May 4 10:43:26 2021 -0500 Merge branch 'remotes/lorenzo/pci/dwc' - Use generic config accessors for TI AM65x (K3) to fix regression (Kishon Vijay Abraham I) - Move MSI Receiver init to dw_pcie_host_init() so it is re-initialized along with the RC in resume (Jisheng Zhang) - Remove unused pcie_app_rd() (Jiapeng Chong) - Move iATU detection earlier to fix regression (Hou Zhiqiang) * remotes/lorenzo/pci/dwc: PCI: dwc: Move iATU detection earlier PCI: dwc/intel-gw: Remove unused function PCI: dwc: Move dw_pcie_msi_init() to dw_pcie_setup_rc() PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c commit 3ec17ca688cf7295ca237dded5399aa450f36293 Merge: 531a953da3fa8 49e0efdce7912 Author: Bjorn Helgaas Date: Tue May 4 10:43:26 2021 -0500 Merge branch 'remotes/lorenzo/pci/cadence' - Add DT binding and TI j721e support for refclk to PCIe connector (Kishon Vijay Abraham I) - Add host mode and endpoint mode DT bindings for TI AM64 SoC (Kishon Vijay Abraham I) * remotes/lorenzo/pci/cadence: PCI: j721e: Add support to provide refclk to PCIe connector dt-bindings: PCI: ti,j721e: Add endpoint mode dt-bindings for TI's AM64 SoC dt-bindings: PCI: ti,j721e: Add host mode dt-bindings for TI's AM64 SoC dt-bindings: PCI: ti,j721e: Add binding to represent refclk to the connector commit 531a953da3fa80d30880c602a3525061204a6e29 Merge: c57400bbe1565 b5d9209d50838 Author: Bjorn Helgaas Date: Tue May 4 10:43:25 2021 -0500 Merge branch 'remotes/lorenzo/pci/brcmstb' - Fix brcm_pcie_probe() error return for unsupported revision (Wei Yongjun) * remotes/lorenzo/pci/brcmstb: PCI: brcmstb: Fix error return code in brcm_pcie_probe() commit c57400bbe15657d133da86c1b6978adc1e2c8990 Merge: ccfc1d557023a b1160a06e0ea8 Author: Bjorn Helgaas Date: Tue May 4 10:43:25 2021 -0500 Merge branch 'remotes/lorenzo/pci/altera-msi' - Remove redundant dev_err() for devm_ioremap_resource() failure (Chen Hui) * remotes/lorenzo/pci/altera-msi: PCI: altera-msi: Remove redundant dev_err call in altera_msi_probe() commit ccfc1d557023af3f53da954402f9784cea2597d7 Merge: 22d106733a257 ccd61f07d2891 Author: Bjorn Helgaas Date: Tue May 4 10:43:25 2021 -0500 Merge branch 'pci/misc' - Fix compile testing of al driver without CONFIG_PCI_ECAM (Arnd Bergmann) - Fix compile testing of thunder drivers (Arnd Bergmann) - Fix "no symbols" warnings when compile testing al, thunder driver with CONFIG_TRIM_UNUSED_KSYMS (Arnd Bergmann) - Remove unused MicroGate SyncLink device IDs (Jiri Slaby) - Remove unused alloc_pci_root_info() return value (Krzysztof Wilczyński) * pci/misc: x86/PCI: Remove unused alloc_pci_root_info() return value PCI: Remove MicroGate SyncLink device IDs PCI: Avoid building empty drivers PCI: thunder: Fix compile testing PCI: al: Select CONFIG_PCI_ECAM commit 22d106733a2579f68b19170f575f786bbfbf88f3 Merge: 7faf1dacfbc0e 0349a070881f7 Author: Bjorn Helgaas Date: Tue May 4 10:43:24 2021 -0500 Merge branch 'pci/virtualization' - Increase delay after FLR to work around Intel DC P4510 NVMe erratum (Raphael Norwitz) * pci/virtualization: PCI: Delay after FLR of Intel DC P4510 NVMe commit 7faf1dacfbc0edd6b0f25404e6c49af675c434af Merge: bac66f8f9751b 43395d9e09122 Author: Bjorn Helgaas Date: Tue May 4 10:43:24 2021 -0500 Merge branch 'pci/kernel-doc' - Fix kernel-doc warnings (Krzysztof Wilczyński) * pci/kernel-doc: PCI: Fix kernel-doc errors commit bac66f8f9751b432773b48b7c6baf92b036adaae Merge: 3c5b307a1ee24 ad025f8e46f3d Author: Bjorn Helgaas Date: Tue May 4 10:43:23 2021 -0500 Merge branch 'pci/sysfs' - Convert sysfs "config", "rom", "reset", "label", "index", "acpi_index" to static attributes to fix races in device enumeration (Krzysztof Wilczyński) - Convert sysfs "vpd" to static attribute (Heiner Kallweit, Krzysztof Wilczyński) - Use sysfs_emit() in "show" functions (Krzysztof Wilczyński) * pci/sysfs: PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions PCI/sysfs: Rearrange smbios_attr_group and acpi_attr_group PCI/sysfs: Tidy SMBIOS & ACPI label attributes PCI/sysfs: Convert "index", "acpi_index", "label" to static attributes PCI/sysfs: Define SMBIOS label attributes with DEVICE_ATTR*() PCI/sysfs: Define ACPI label attributes with DEVICE_ATTR*() PCI/sysfs: Rename device_has_dsm() to device_has_acpi_name() PCI/sysfs: Convert "vpd" to static attribute PCI/sysfs: Rename "vpd" attribute accessors PCI/sysfs: Convert "reset" to static attribute PCI/sysfs: Convert "rom" to static attribute PCI/sysfs: Convert "config" to static attribute commit 3c5b307a1ee241cd69ad4e1f045863da593d8f6f Merge: acd18f12d964e e00dc69b5f17c Author: Bjorn Helgaas Date: Tue May 4 10:43:23 2021 -0500 Merge branch 'pci/vpd' - Remove obsolete Broadcom NIC VPD length-limiting quirk (Heiner Kallweit) - Remove sysfs VPD size checking dead code (Heiner Kallweit) - Convert VPF sysfs file to static attribute (Heiner Kallweit) - Remove unnecessary pci_set_vpd_size() (Heiner Kallweit) - Tone down "missing VPD" message (Heiner Kallweit) * pci/vpd: PCI: Allow VPD access for QLogic ISP2722 PCI/VPD: Add helper pci_get_func0_dev() PCI/VPD: Remove pci_vpd_find_tag() SRDT handling PCI/VPD: Remove pci_vpd_find_tag() 'offset' argument PCI/VPD: Change pci_vpd_init() return type to void PCI/VPD: Make missing VPD message less alarming PCI/VPD: Remove pci_set_vpd_size() PCI/VPD: Remove sysfs accessor size checking dead code PCI/VPD: Remove obsolete Broadcom NIC quirk commit acd18f12d964e0db51a62ee754d3ab0b184a9308 Merge: 31311031d73f4 693978527c17e Author: Bjorn Helgaas Date: Tue May 4 10:43:23 2021 -0500 Merge branch 'pci/pm' - Fix acpi_pci_set_power_state() debug message (Rafael J. Wysocki) * pci/pm: PCI/ACPI: Fix acpi_pci_set_power_state() debug message commit 31311031d73f4477b3a6911d814d16962bd00348 Merge: 6d34adbe0eb0e ea3b50c51d19e Author: Bjorn Helgaas Date: Tue May 4 10:43:22 2021 -0500 Merge branch 'pci/hotplug' - Fix acpiphp reference count leak (Feilong Lin) * pci/hotplug: PCI: acpiphp: Fix whitespace issue PCI: shpchp: Remove unused shpc_writeb() PCI: cpqphp: Use DEFINE_SPINLOCK() for int15_lock ACPI / hotplug / PCI: Fix reference count leak in enable_slot() commit 6d34adbe0eb0e860ce70a0e63ae1d68cbcc0a996 Merge: 975af39978f9e d9b7eae8e3424 Author: Bjorn Helgaas Date: Tue May 4 10:43:22 2021 -0500 Merge branch 'pci/error' - Fix RCiEP device to RCEC association (Qiuxu Zhuo) * pci/error: PCI/RCEC: Fix RCiEP device to RCEC association commit 975af39978f9e4eaeca0a3b0940632cceebe21a4 Merge: a38fd87484648 0a0b5f4b43671 Author: Bjorn Helgaas Date: Tue May 4 10:43:22 2021 -0500 Merge branch 'pci/enumeration' - Release OF node when pci_scan_device() fails (Dmitry Baryshkov) - Add pci_disable_parity() (Bjorn Helgaas) - Disable Mellanox Tavor parity reporting (Heiner Kallweit) - Disable N2100 r8169 parity reporting (Heiner Kallweit) * pci/enumeration: ARM: iop32x: disable N2100 PCI parity reporting IB/mthca: Disable parity reporting PCI: Add pci_disable_parity() PCI: Release OF node in pci_scan_device()'s error path commit b9d79e4ca4ff23543d6b33c736ba07c1f0a9dcb1 Author: Guenter Roeck Date: Tue May 4 07:29:10 2021 -0700 fbmem: Mark proc_fb_seq_ops as __maybe_unused With CONFIG_PROC_FS=n and -Werror, 0-day reports: drivers/video/fbdev/core/fbmem.c:736:36: error: 'proc_fb_seq_ops' defined but not used Mark it as __maybe_unused. Reported-by: kernel test robot Signed-off-by: Guenter Roeck Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210504142910.2084722-1-linux@roeck-us.net commit 3f1c6f2122fc780560f09735b6d1dbf39b44eb0f Author: Ilya Dryomov Date: Mon May 3 17:09:01 2021 +0200 libceph: allow addrvecs with a single NONE/blank address Normally, an unused OSD id/slot is represented by an empty addrvec. However, it also appears to be possible to generate an osdmap where an unused OSD id/slot has an addrvec with a single blank address of type NONE. Allow such addrvecs and make the end result be exactly the same as for the empty addrvec case -- leave addr intact. Cc: stable@vger.kernel.org # 5.11+ Signed-off-by: Ilya Dryomov Reviewed-by: Jeff Layton commit 6799e3f281e962628be531e8331bacd05b866134 Author: Geert Uytterhoeven Date: Tue May 4 11:03:00 2021 +0200 dt-bindings: net: renesas,etheravb: Fix optional second clock name If the optional "clock-names" property is present, but the optional TXC reference clock is not, "make dtbs_check" complains: ethernet@e6800000: clock-names: ['fck'] is too short Fix this by declaring that a single clock name is valid. While at it, drop the superfluous upper limit on the number of clocks, as it is implied by the list of descriptions. Fixes: 6f43735b6da64bd4 ("dt-bindings: net: renesas,etheravb: Add additional clocks") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/b3d91c9f70a15792ad19c87e4ea35fc876600fae.1620118901.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit ae80d514808557018e44190fdbab23564a51e9ef Author: Greentime Hu Date: Tue May 4 18:59:40 2021 +0800 riscv: dts: Add PCIe support for the SiFive FU740-C000 SoC Link: https://lore.kernel.org/r/20210504105940.100004-7-greentime.hu@sifive.com Signed-off-by: Greentime Hu Signed-off-by: Lorenzo Pieralisi Acked-by: Palmer Dabbelt commit e7e21b3a339bd1b3c1d951b37be5e322c5c0dbf2 Author: Paul Walmsley Date: Tue May 4 18:59:39 2021 +0800 PCI: fu740: Add SiFive FU740 PCIe host controller driver Add driver for the SiFive FU740 PCIe host controller. This controller is based on the DesignWare PCIe core. Co-developed-by: Henry Styles Co-developed-by: Erik Danie Co-developed-by: Greentime Hu Link: https://lore.kernel.org/r/20210504105940.100004-6-greentime.hu@sifive.com Signed-off-by: Paul Walmsley Signed-off-by: Henry Styles Signed-off-by: Erik Danie Signed-off-by: Greentime Hu Signed-off-by: Lorenzo Pieralisi commit c6b05f4e233cc666f003e9fe68b2f765952875a9 Author: Christophe Leroy Date: Wed Apr 21 17:06:42 2021 +0000 powerpc/kconfig: Restore alphabetic order of the selects under CONFIG_PPC Commit a7d2475af7ae ("powerpc: Sort the selects under CONFIG_PPC") sorted all selects under CONFIG_PPC. 4 years later, several items have been introduced at wrong place, a few other have been renamed without moving them to their correct place. Reorder them now. While we are at it, simplify the test for a couple of them: - PPC_64 && PPC_PSERIES is simplified in PPC_PSERIES - PPC_64 && PPC_BOOK3S is simplified in PPC_BOOK3S_64 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/361ee3fc5009c709ae0ca592249bb0702c6ef073.1619024780.git.christophe.leroy@csgroup.eu commit 784daf2b9628f2d0117f1f0b578cfe5ab6634919 Author: Naohiro Aota Date: Fri Apr 30 15:34:17 2021 +0200 btrfs: zoned: sanity check zone type The fstests test case generic/475 creates a dm-linear device that gets changed to a dm-error device. This leads to errors in loading the block group's zone information when running on a zoned file system, ultimately resulting in a list corruption. When running on a kernel with list debugging enabled this leads to the following crash. BTRFS: error (device dm-2) in cleanup_transaction:1953: errno=-5 IO failure kernel BUG at lib/list_debug.c:54! invalid opcode: 0000 [#1] SMP PTI CPU: 1 PID: 2433 Comm: umount Tainted: G W 5.12.0+ #1018 RIP: 0010:__list_del_entry_valid.cold+0x1d/0x47 RSP: 0018:ffffc90001473df0 EFLAGS: 00010296 RAX: 0000000000000054 RBX: ffff8881038fd000 RCX: ffffc90001473c90 RDX: 0000000100001a31 RSI: 0000000000000003 RDI: 0000000000000003 RBP: ffff888308871108 R08: 0000000000000003 R09: 0000000000000001 R10: 3961373532383838 R11: 6666666620736177 R12: ffff888308871000 R13: ffff8881038fd088 R14: ffff8881038fdc78 R15: dead000000000100 FS: 00007f353c9b1540(0000) GS:ffff888627d00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f353cc2c710 CR3: 000000018e13c000 CR4: 00000000000006a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: btrfs_free_block_groups+0xc9/0x310 [btrfs] close_ctree+0x2ee/0x31a [btrfs] ? call_rcu+0x8f/0x270 ? mutex_lock+0x1c/0x40 generic_shutdown_super+0x67/0x100 kill_anon_super+0x14/0x30 btrfs_kill_super+0x12/0x20 [btrfs] deactivate_locked_super+0x31/0x90 cleanup_mnt+0x13e/0x1b0 task_work_run+0x63/0xb0 exit_to_user_mode_loop+0xd9/0xe0 exit_to_user_mode_prepare+0x3e/0x60 syscall_exit_to_user_mode+0x1d/0x50 entry_SYSCALL_64_after_hwframe+0x44/0xae As dm-error has no support for zones, btrfs will run it's zone emulation mode on this device. The zone emulation mode emulates conventional zones, so bail out if the zone bitmap that gets populated on mount sees the zone as sequential while we're thinking it's a conventional zone when creating a block group. Note: this scenario is unlikely in a real wold application and can only happen by this (ab)use of device-mapper targets. CC: stable@vger.kernel.org # 5.12+ Signed-off-by: Naohiro Aota Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit 5e753a817b2d5991dfe8a801b7b1e8e79a1c5a20 Author: Anand Jain Date: Fri Apr 30 19:59:51 2021 +0800 btrfs: fix unmountable seed device after fstrim The following test case reproduces an issue of wrongly freeing in-use blocks on the readonly seed device when fstrim is called on the rw sprout device. As shown below. Create a seed device and add a sprout device to it: $ mkfs.btrfs -fq -dsingle -msingle /dev/loop0 $ btrfstune -S 1 /dev/loop0 $ mount /dev/loop0 /btrfs $ btrfs dev add -f /dev/loop1 /btrfs BTRFS info (device loop0): relocating block group 290455552 flags system BTRFS info (device loop0): relocating block group 1048576 flags system BTRFS info (device loop0): disk added /dev/loop1 $ umount /btrfs Mount the sprout device and run fstrim: $ mount /dev/loop1 /btrfs $ fstrim /btrfs $ umount /btrfs Now try to mount the seed device, and it fails: $ mount /dev/loop0 /btrfs mount: /btrfs: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error. Block 5292032 is missing on the readonly seed device: $ dmesg -kt | tail BTRFS error (device loop0): bad tree block start, want 5292032 have 0 BTRFS warning (device loop0): couldn't read-tree root BTRFS error (device loop0): open_ctree failed From the dump-tree of the seed device (taken before the fstrim). Block 5292032 belonged to the block group starting at 5242880: $ btrfs inspect dump-tree -e /dev/loop0 | grep -A1 BLOCK_GROUP item 3 key (5242880 BLOCK_GROUP_ITEM 8388608) itemoff 16169 itemsize 24 block group used 114688 chunk_objectid 256 flags METADATA From the dump-tree of the sprout device (taken before the fstrim). fstrim used block-group 5242880 to find the related free space to free: $ btrfs inspect dump-tree -e /dev/loop1 | grep -A1 BLOCK_GROUP item 1 key (5242880 BLOCK_GROUP_ITEM 8388608) itemoff 16226 itemsize 24 block group used 32768 chunk_objectid 256 flags METADATA BPF kernel tracing the fstrim command finds the missing block 5292032 within the range of the discarded blocks as below: kprobe:btrfs_discard_extent { printf("freeing start %llu end %llu num_bytes %llu:\n", arg1, arg1+arg2, arg2); } freeing start 5259264 end 5406720 num_bytes 147456 Fix this by avoiding the discard command to the readonly seed device. Reported-by: Chris Murphy CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Filipe Manana Signed-off-by: Anand Jain Signed-off-by: David Sterba commit f5668260b872e89b8d3942a8b7d4278aa9c2c981 Author: Christophe Leroy Date: Thu Apr 29 16:52:09 2021 +0000 powerpc/32: Fix boot failure with CONFIG_STACKPROTECTOR Commit 7c95d8893fb5 ("powerpc: Change calling convention for create_branch() et. al.") complexified the frame of function do_feature_fixups(), leading to GCC setting up a stack guard when CONFIG_STACKPROTECTOR is selected. The problem is that do_feature_fixups() is called very early while 'current' in r2 is not set up yet and the code is still not at the final address used at link time. So, like other instrumentation, stack protection needs to be deactivated for feature-fixups.c and code-patching.c Fixes: 7c95d8893fb5 ("powerpc: Change calling convention for create_branch() et. al.") Cc: stable@vger.kernel.org # v5.8+ Reported-by: Jonathan Neuschaefer Signed-off-by: Christophe Leroy Tested-by: Jonathan Neuschaefer Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b688fe82927b330349d9e44553363fa451ea4d95.1619715114.git.christophe.leroy@csgroup.eu commit b910fcbada9721c21f1d59ab59e07e8e354c23cc Author: Sandipan Das Date: Sat May 1 21:32:54 2021 +0530 powerpc/powernv/memtrace: Fix dcache flushing Trace memory is cleared and the corresponding dcache lines are flushed after allocation. However, this should not be done using the PFN. This adds the missing conversion to virtual address. Fixes: 2ac02e5ecec0 ("powerpc/mm: Remove dcache flush from memory remove.") Signed-off-by: Sandipan Das Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210501160254.1179831-1-sandipan@linux.ibm.com commit 40c753993e3aad51a12c21233486e2037417a4d6 Author: Sourabh Jain Date: Thu Apr 29 11:32:56 2021 +0530 powerpc/kexec_file: Use current CPU info while setting up FDT kexec_file_load() uses initial_boot_params in setting up the device tree for the kernel to be loaded. Though initial_boot_params holds info about CPUs at the time of boot, it doesn't account for hot added CPUs. So, kexec'ing with kexec_file_load() syscall leaves the kexec'ed kernel with inaccurate CPU info. If kdump kernel is loaded with kexec_file_load() syscall and the system crashes on a hot added CPU, the capture kernel hangs failing to identify the boot CPU, with no output. To avoid this from happening, extract current CPU info from of_root device node and use it for setting up the fdt in kexec_file_load case. Fixes: 6ecd0163d360 ("powerpc/kexec_file: Add appropriate regions for memory reserve map") Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: Sourabh Jain Reviewed-by: Hari Bathini Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210429060256.199714-1-sourabhjain@linux.ibm.com commit 5d84b5318d860c9d80ca5dfae0e971ede53b4921 Author: Takashi Iwai Date: Tue May 4 14:18:32 2021 +0200 ALSA: hda/realtek: Add fixup for HP OMEN laptop HP OMEN dc0019-ur with codec SSID 103c:84da requires the pin config overrides and the existing mic/mute LED setup. This patch implements those in the fixup table. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212733 Cc: Link: https://lore.kernel.org/r/20210504121832.4558-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 43cea116be0b2e9636ce72bc8269b99344374a81 Author: Greentime Hu Date: Tue May 4 18:59:38 2021 +0800 dt-bindings: PCI: Add SiFive FU740 PCIe host controller Add PCIe host controller DT bindings of SiFive FU740. Link: https://lore.kernel.org/r/20210504105940.100004-5-greentime.hu@sifive.com Signed-off-by: Greentime Hu Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 2da0dd5e30af22a125c38137ee980c5bce3da391 Author: Greentime Hu Date: Tue May 4 18:59:37 2021 +0800 MAINTAINERS: Add maintainers for SiFive FU740 PCIe driver Here add maintainer information for SiFive FU740 PCIe driver. Link: https://lore.kernel.org/r/20210504105940.100004-4-greentime.hu@sifive.com Signed-off-by: Greentime Hu Signed-off-by: Lorenzo Pieralisi commit e4d368e0b632717e57d064ade6afdcf535e58068 Author: Greentime Hu Date: Tue May 4 18:59:36 2021 +0800 clk: sifive: Use reset-simple in prci driver for PCIe driver We use reset-simple in this patch so that pcie driver can use devm_reset_control_get() to get this reset data structure and use reset_control_deassert() to deassert pcie_power_up_rst_n. Link: https://lore.kernel.org/r/20210504105940.100004-3-greentime.hu@sifive.com Signed-off-by: Greentime Hu Signed-off-by: Lorenzo Pieralisi Reviewed-by: Philipp Zabel Acked-by: Stephen Boyd commit c61287bf17836b67e0b649343778bb4a659bd70d Author: Greentime Hu Date: Tue May 4 18:59:35 2021 +0800 clk: sifive: Add pcie_aux clock in prci driver for PCIe driver We add pcie_aux clock in this patch so that pcie driver can use clk_prepare_enable() and clk_disable_unprepare() to enable and disable pcie_aux clock. Link: https://lore.kernel.org/r/20210504105940.100004-2-greentime.hu@sifive.com Signed-off-by: Greentime Hu Signed-off-by: Lorenzo Pieralisi Acked-by: Stephen Boyd commit 622464c893142f7beac89f5ba8c9773bca5e5004 Author: Takashi Iwai Date: Tue May 4 11:18:02 2021 +0200 ALSA: hda/realtek: Fix speaker amp on HP Envy AiO 32 HP Envy AiO 32-a12xxx has an external amp that is controlled via GPIO bit 0x04. However, unlike other devices, this amp seems to shut down itself after the certain period, hence the OS needs to up/down the bit dynamically only during the actual playback. This patch adds the control of the GPIO bit via the existing pcm_hook mechanism. Ideally it should be triggered at the actual stream start, but we have only the state change at prepare/cleanup, so use those for switching the GPIO bit on/off. This should be good enough for the purpose, and was actually confirmed to work fine. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212873 Cc: Link: https://lore.kernel.org/r/20210504091802.13200-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8eedd3a70a70f51fa963f3ad7fa97afd0c75bd44 Author: Takashi Iwai Date: Tue May 4 10:20:57 2021 +0200 ALSA: hda/realtek: Fix silent headphone output on ASUS UX430UA It was reported that the headphone output on ASUS UX430UA (SSID 1043:1740) with ALC295 codec is silent while the speaker works. After the investigation, it turned out that the DAC assignment has to be fixed on this machine; unlike others, it expects DAC 0x02 to be assigned to the speaker pin 0x07 while DAC 0x03 to headphone pin 0x21. This patch provides a fixup for the fixed DAC/pin mapping for this device. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212933 Cc: Link: https://lore.kernel.org/r/20210504082057.6913-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d7bce85aa7b92b5de8f69b3bcedfe51d7b1aabe1 Author: Michael S. Tsirkin Date: Tue May 4 04:17:20 2021 -0400 virtio_pci_modern: correct sparse tags for notify When switching virtio_pci_modern to use a helper for mappings we lost an __iomem tag. Restore it. Reported-by: kernel test robot Fixes: 9e3bb9b79a71 ("virtio_pci_modern: introduce helper to map vq notify area") Signed-off-by: Michael S. Tsirkin commit 0f8a0b0b095fd9b301523c0f78686f5ac6fda564 Author: Michael S. Tsirkin Date: Tue May 4 04:12:10 2021 -0400 virtio_pci_modern: __force cast the notify mapping When switching virtio_pci_modern to use a helper for mappings we lost an __iomem tag. We should restore it. However, virtio_pci_modern is playing tricks by hiding an iomem pointer in a regular vq->priv pointer. Which is okay as long as it's all contained within a single file, but we need to __force cast the value otherwise we'll get sparse warnings. Reported-by: kernel test robot Fixes: 7dca6c0ea96b ("virtio-pci library: switch to use vp_modern_map_vq_notify()") Signed-off-by: Michael S. Tsirkin commit 4a20342572f66c5b20a1ee680f5ac0a13703748f Author: Keith Busch Date: Wed Apr 28 21:25:58 2021 -0700 nvmet: remove unsupported command noise Nothing can stop a host from submitting invalid commands. The target just needs to respond with an appropriate status, but that's not a target error. Demote invalid command messages to the debug level so these events don't spam the kernel logs. Reported-by: Yi Zhang Signed-off-by: Keith Busch Reviewed-by: Klaus Jensen Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit ce86dad222e9074d3ec174ec81cb463a770331b5 Author: Daniel Wagner Date: Mon May 3 19:03:03 2021 +0200 nvme-multipath: reset bdev to ns head when failover When a request finally completes in end_io() after it has failed over, the bdev pointer can be stale and thus the system can crash. Set the bdev back to ns head, so the request is map to an active path when resubmitted. Signed-off-by: Daniel Wagner Reviewed-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit d4060d2be1132596154f31f4d57976bd103e969d Author: Tao Chiu Date: Mon Apr 26 10:53:55 2021 +0800 nvme-pci: fix controller reset hang when racing with nvme_timeout reset_work() in nvme-pci may hang forever in the following scenario: 1) A reset caused by a command timeout occurs due to a controller being temporarily irresponsive. 2) nvme_reset_work() restarts admin queue at nvme_alloc_admin_tags(). At the same time, a user-submitted admin command is queued and waiting for completion. Then, reset_work() changes its state to CONNECTING, and submits an identify command. 3) However, the controller does still not respond to any command, causing a timeout being fired at the user-submitted command. Unfortunately, nvme_timeout() does not see the completion on cq, and any timeout that takes place under CONNECTING state causes a controller shutdown. 4) Normally, the identify command in reset_work() would be canceled with SC_HOST_ABORTED by nvme_dev_disable(), then reset_work can tear down the controller accordingly. But the controller happens to return online and respond the identify command before nvme_dev_disable() should have been reaped it off. 5) reset_work() continues to setup_io_queues() as it observes no error in init_identify(). However, the admin queue has already been quiesced in dev_disable(). Thus, any following commands would be blocked forever in blk_execute_rq(). This can be fixed by restricting usercmd commands when controller is not in a LIVE state in nvme_queue_rq(), as what has been done previously in fabrics. ``` nvme_reset_work(): | nvme_alloc_admin_tags() | | nvme_submit_user_cmd(): nvme_init_identify(): | ... __nvme_submit_sync_cmd(): | ... | ... ---------------------------------------> nvme_timeout(): (Controller starts reponding commands) | nvme_dev_disable(, true): nvme_setup_io_queues(): | __nvme_submit_sync_cmd(): | (hung in blk_execute_rq | since run_hw_queue sees | queue quiesced) | ``` Signed-off-by: Tao Chiu Signed-off-by: Cody Wong Reviewed-by: Leon Chien Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit a97157440e1e69c35d7804d3b72da0c626ef28e6 Author: Tao Chiu Date: Mon Apr 26 10:53:10 2021 +0800 nvme: move the fabrics queue ready check routines to core queue_rq() in pci only checks if the dispatched queue (nvmeq) is ready, e.g. not being suspended. Since nvme_alloc_admin_tags() in reset flow restarts the admin queue, users are able to submit admin commands to a controller before reset_work() completes. Commands submitted under this condition may interfere with commands that performs identify, IO queue setup in reset_work(), and may result in a hang described in the following patch. As seen in the fabrics, user commands are prevented from being executed under inproper controller states. We may reuse this logic to maintain a clear admin queue during reset_work(). Signed-off-by: Tao Chiu Signed-off-by: Cody Wong Reviewed-by: Leon Chien Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit 51ad06cd698cb9ff280a769ed8d57210a1d2266d Author: Kanchan Joshi Date: Tue Apr 27 12:17:47 2021 +0530 nvme: avoid memset for passthrough requests nvme_clear_nvme_request() clears the nvme_command, which is unncessary for passthrough requests as nvme_command is overwritten immediately. Move clearing part from this helper to the caller, so that double memset for passthrough requests is avoided. Signed-off-by: Kanchan Joshi Signed-off-by: Christoph Hellwig commit 4c74d1f80381996027bacc4f6c554948ef9bf374 Author: Kanchan Joshi Date: Tue Apr 27 12:17:46 2021 +0530 nvme: add nvme_get_ns helper Add a helper to avoid opencoding ns->kref increment. Decrement is already done via nvme_put_ns helper. Signed-off-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 48145b62563a9ae1ad631d6b576c6b9a798fcbec Author: Minwoo Im Date: Thu Apr 22 17:04:07 2021 +0900 nvme: fix controller ioctl through ns_head In multipath case, we should consider namespace attachment with controllers in a subsystem when we find out the live controller for the namespace. This patch manually reverted the commit 3557a4409701 ("nvme: don't bother to look up a namespace for controller ioctls") with few more updates to nvme_ns_head_chr_ioctl which has been newly updated. Fixes: 3557a4409701 ("nvme: don't bother to look up a namespace for controller ioctls") Cc: Christoph Hellwig Signed-off-by: Minwoo Im Signed-off-by: Christoph Hellwig commit 1682d8df20aa505f6ab12c76e934b26ede39c529 Merge: bd1af6b5fffd3 ac31565c21937 Author: David S. Miller Date: Mon May 3 18:40:17 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf Daniel Borkmann says: ==================== pull-request: bpf 2021-05-04 The following pull-request contains BPF updates for your *net* tree. We've added 5 non-merge commits during the last 4 day(s) which contain a total of 6 files changed, 52 insertions(+), 30 deletions(-). The main changes are: 1) Fix libbpf overflow when processing BPF ring buffer in case of extreme application behavior, from Brendan Jackman. 2) Fix potential data leakage of uninitialized BPF stack under speculative execution, from Daniel Borkmann. 3) Fix off-by-one when validating xsk pool chunks, from Xuan Zhuo. 4) Fix snprintf BPF selftest with a pid filter to avoid racing its output test buffer, from Florent Revest. ==================== Signed-off-by: David S. Miller commit 8abddd968a303db75e4debe77a3df484164f1f33 Author: Nicholas Piggin Date: Mon May 3 19:17:55 2021 +1000 powerpc/64s/radix: Enable huge vmalloc mappings This reduces TLB misses by nearly 30x on a `git diff` workload on a 2-node POWER9 (59,800 -> 2,100) and reduces CPU cycles by 0.54%, due to vfs hashes being allocated with 2MB pages. Signed-off-by: Nicholas Piggin Reviewed-by: Christophe Leroy Acked-by: Michael Ellerman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210503091755.613393-1-npiggin@gmail.com commit 970aa72c4dd37645ceb7dd15515d9502c4c56aa1 Author: Geert Uytterhoeven Date: Thu Apr 29 14:47:56 2021 +0200 dt-bindings: display: renesas,du: Add missing power-domains property "make dtbs_check" complains: arch/arm/boot/dts/r8a7779-marzen.dt.yaml: display@fff80000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' arch/arm64/boot/dts/renesas/r8a77970-v3msk.dt.yaml: display@feb00000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' arch/arm64/boot/dts/renesas/r8a77970-eagle.dt.yaml: display@feb00000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' arch/arm64/boot/dts/renesas/r8a77980-condor.dt.yaml: display@feb00000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' arch/arm64/boot/dts/renesas/r8a77980-v3hsk.dt.yaml: display@feb00000: 'power-domains' does not match any of the regexes: 'pinctrl-[0-9]+' Fix this by documenting the power-domains property. Fixes: 99d66127fad25ebb ("dt-bindings: display: renesas,du: Convert binding to YAML") Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/600d42256515f180bc84b72e8bdb5c5d9126ab62.1619700459.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 7fc4607899e87259bb751ccdbe53628aa467ec22 Author: Bhaskar Chowdhury Date: Fri Apr 23 18:33:01 2021 +0530 Enlisted oprofile version line removed Enlisted oprofile version line removed. Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/35c4436f0f1b3072d3016148ce1461905b6f782b.1619181632.git.unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 8e9fa2f21151f48c0fc3c53876d4564752fd9fbd Author: Bhaskar Chowdhury Date: Fri Apr 23 18:33:00 2021 +0530 oprofiled version output line removed from the list Oprofiled version output line removed from the list. Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/8d1928ff2fea29d67143d235839a5e845e4402c9.1619181632.git.unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit f5169f713e0c02333e770c9045a00fa54ac98220 Author: Bhaskar Chowdhury Date: Fri Apr 23 18:32:59 2021 +0530 Removed the oprofiled version option Removed the oprofiled version option Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/c98fa38b74bdd8ab16d35862895dac5f5a535f94.1619181632.git.unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 0043f0b27a0406730caef61068703fcacd9c2166 Author: Thorsten Leemhuis Date: Thu Apr 15 12:29:14 2021 +0200 docs: reporting-issues.rst: CC subsystem and maintainers on regressions When reporting a regression, users ideally should CC the subsystem and its maintainers, as that will ensure they get aware of the regression quickly. And if the culprit is known, they should also CC everyone who signed if off; the text mentioned the latter in once place already, but forgot to do so in two other areas where it's relevant. While fixing this also remind readers to check the mailing list archives for issues that need to be reported to a bug tracker, as someone might have reported it by mail only. All of this got triggered by a recent report where these changes would have made a difference. Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/lkml/dff6badf-58f5-98c8-871c-94d901ac6919@leemhuis.info/ Link: https://lore.kernel.org/lkml/CAJZ5v0hX2StQVttAciHYH-urUH+Hi92z9z2ZbcNgQPt0E2Jpwg@mail.gmail.com/ Link: https://lore.kernel.org/r/dd13f10c30e79e550215e53a8103406daec4e593.1618482489.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 2fa4928aed4c10bb9d1906b8bb606e6212d91dd2 Author: Anatoly Pugachev Date: Wed Apr 28 13:48:51 2021 +0300 docs: correct URL to bios and kernel developer's guide correct URL to bios and kernel developer's guide on amd.com site Signed-off-by: Anatoly Pugachev Link: https://lore.kernel.org/r/20210428104851.GA10572@u164.east.ru [jc: fixed resulting sphinx warning] Signed-off-by: Jonathan Corbet commit c7ceee6958770c447b86a8917a603a20d646b608 Author: Steven Rostedt (VMware) Date: Mon May 3 18:51:54 2021 -0400 ktest: Add KTEST section to MAINTAINERS file As I wanted to add John Hawley as a co-maintainer for ktest, I found that there never was a KTEST section in the MAINTAINERS file. Add one! Signed-off-by: Steven Rostedt (VMware) commit 6a0f3652952c7bba83af66c115a311d4a2164ebb Author: John 'Warthog9' Hawley (VMware) Date: Mon Apr 19 17:29:31 2021 -0700 ktest: Re-arrange the code blocks for better discoverability Perl, as with most scripting languages, is fairly flexible in how / where you can define things, and it will (for the most part) do what you would expect it to do. This however can lead to situations, like with ktest, where things get muddled over time. This pushes the variable definitions back up to the top, followed by functions, with the main script executables down at the bottom, INSTEAD of being somewhat mish-mashed together in certain places. This mostly has the advantage of making it more obvious where things are initially defined, what functions are there, and ACTUALLY where the main script starts executing, and should make this a little more approachable. Signed-off-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Steven Rostedt (VMware) commit c043ccbfc6d83fa21512f842c5d2ba4060cee5fe Author: John 'Warthog9' Hawley (VMware) Date: Mon Apr 19 17:29:30 2021 -0700 ktest: Further consistency cleanups This cleans up some additional whitespace pieces that to be more consistent, as well as moving a curly brace around, and some 'or' statements to match the rest of the file (usually or goes at the end of the line vs. at the beginning) Signed-off-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Steven Rostedt (VMware) commit 12d4cddda2043466a5af8fc0c49e49f24f1d4c59 Author: John 'Warthog9' Hawley (VMware) Date: Mon Apr 19 17:29:29 2021 -0700 ktest: Fixing indentation to match expected pattern This is a followup to "ktest: Adding editor hints to improve consistency" to actually adjust the existing indentation to match the, now, expected pattern (first column 4 spaces, 2nd tab, 3rd tab + 4 spaces, etc). This should, at least help, keep things consistent going forward now. Signed-off-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Steven Rostedt (VMware) commit becdd17b5acc79267cf4dba65e07e96e11cc9b57 Author: John 'Warthog9' Hawley (VMware) Date: Mon Apr 19 17:29:28 2021 -0700 ktest: Adding editor hints to improve consistency Emacs and Vi(m) have different styles of dealing with perl syntax which can lead to slightly inconsistent indentation, and makes the code slightly harder to read. Emacs assumes a more perl recommended standard of 4 spaces (1 column) or tab (two column) indentation. Vi(m) tends to favor just normal spaces or tabs depending on what was being used. This gives the basic hinting to Emacs and Vim to do what is expected to be basically consistent. Emacs: - Explicitly flip into perl mode, cperl would require more adjustments Vi(m): - Set softtabs=4 which will flip it over to doing indentation the way you would expect from Emacs Signed-off-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Steven Rostedt (VMware) commit 2676eb4bfc546dc490d2abd155877a580c74c294 Author: John 'Warthog9' Hawley (VMware) Date: Mon Apr 19 17:29:27 2021 -0700 ktest: Add example config for using VMware VMs This duplicates the KVM/Qemu config with specific notes for how to use it with VMware VMs on Workstation, Player, or Fusion. The main thing to be aware of is how the serial port is exposed which is a unix pipe, and will need something like ncat to get into ktest's monitoring Signed-off-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Steven Rostedt (VMware) commit da2e56634b262fddfa40b2cfedd24de841418cd3 Author: John 'Warthog9' Hawley (VMware) Date: Mon Apr 19 17:29:26 2021 -0700 ktest: Minor cleanup with uninitialized variable $build_options Signed-off-by: John 'Warthog9' Hawley (VMware) Signed-off-by: Steven Rostedt (VMware) commit 0ca0d55526d338d926e85352d3e44dd85728676f Author: Yanteng Si Date: Wed Apr 28 18:07:20 2021 +0800 docs/core-api: Consistent code style all `example` in this file should be replaced with ``example``. Signed-off-by: Yanteng Si Acked-by: Matthias Maennich Link: https://lore.kernel.org/r/20210428100720.1076276-1-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit bd8ede484750b36fb81bf666b6ee87678843d01d Author: Wu XiangCheng Date: Fri Apr 30 20:22:35 2021 +0800 docs/zh_CN: Adjust order and content of zh_CN/index.rst Adjust order and content of zh_CN/index.rst to make it clear, complete introductions and TODOLists. Signed-off-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210430122234.GA655@bobwxc.top Signed-off-by: Jonathan Corbet commit eef8abdaedf8084bfda66cd2eecf7eebbdff2c16 Author: Randy Dunlap Date: Wed Apr 28 23:31:37 2021 -0700 Documentation: input: joydev file corrections Fix typos, grammar, punctuation in Documentation/input/joydev/*.rst files. Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Link: https://lore.kernel.org/r/20210429063137.20232-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit ac31565c21937eee9117e43c9cd34f557f6f1cb8 Author: Xuan Zhuo Date: Wed Apr 28 17:44:24 2021 +0800 xsk: Fix for xp_aligned_validate_desc() when len == chunk_size When desc->len is equal to chunk_size, it is legal. But when the xp_aligned_validate_desc() got chunk_end from desc->addr + desc->len pointing to the next chunk during the check, it caused the check to fail. This problem was first introduced in bbff2f321a86 ("xsk: new descriptor addressing scheme"). Later in 2b43470add8c ("xsk: Introduce AF_XDP buffer allocation API") this piece of code was moved into the new function called xp_aligned_validate_desc(). This function was then moved into xsk_queue.h via 26062b185eee ("xsk: Explicitly inline functions and move definitions"). Fixes: bbff2f321a86 ("xsk: new descriptor addressing scheme") Signed-off-by: Xuan Zhuo Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/20210428094424.54435-1-xuanzhuo@linux.alibaba.com commit 43016d02cf6e46edfc4696452251d34bba0c0435 Author: Florian Westphal Date: Mon May 3 13:51:15 2021 +0200 netfilter: arptables: use pernet ops struct during unregister Like with iptables and ebtables, hook unregistration has to use the pernet ops struct, not the template. This triggered following splat: hook not found, pf 3 num 0 WARNING: CPU: 0 PID: 224 at net/netfilter/core.c:480 __nf_unregister_net_hook+0x1eb/0x610 net/netfilter/core.c:480 [..] nf_unregister_net_hook net/netfilter/core.c:502 [inline] nf_unregister_net_hooks+0x117/0x160 net/netfilter/core.c:576 arpt_unregister_table_pre_exit+0x67/0x80 net/ipv4/netfilter/arp_tables.c:1565 Fixes: f9006acc8dfe5 ("netfilter: arp_tables: pass table pointer via nf_hook_ops") Reported-by: syzbot+dcccba8a1e41a38cb9df@syzkaller.appspotmail.com Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c7d13358b6a2f49f81a34aa323a2d0878a0532a2 Author: Pablo Neira Ayuso Date: Fri Apr 30 14:00:13 2021 +0200 netfilter: xt_SECMARK: add new revision to fix structure layout This extension breaks when trying to delete rules, add a new revision to fix this. Fixes: 5e6874cdb8de ("[SECMARK]: Add xtables SECMARK target") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso commit 5e321ded302da4d8c5d5dd953423d9b748ab3775 Merge: cda689f8708b6 127f1c09c5c84 Author: Linus Torvalds Date: Mon May 3 13:47:17 2021 -0700 Merge tag 'for-5.13/parisc' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture updates from Helge Deller: - switch to generic syscall header scripts - minor typo fix in setup.c * tag 'for-5.13/parisc' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Fix typo in setup.c parisc: syscalls: switch to generic syscallhdr.sh parisc: syscalls: switch to generic syscalltbl.sh commit bd1af6b5fffd36c12997bd48d61d39dc5796fa7b Author: Daniele Palmas Date: Mon May 3 17:10:50 2021 +0200 Documentation: ABI: sysfs-class-net-qmi: document pass-through file Add documentation for /sys/class/net//qmi/pass_through Signed-off-by: Daniele Palmas Signed-off-by: David S. Miller commit d362fd0be456dba2d3d58a90b7a193962776562b Author: Xie He Date: Sun May 2 20:51:36 2021 -0700 Revert "drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit" This reverts commit 1b479fb80160 ("drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit"). 1. This commit is incorrect. "__skb_pad" will NOT free the skb on failure when its "free_on_error" parameter is "false". 2. This commit claims to fix my commit. But it didn't CC me?? Fixes: 1b479fb80160 ("drivers/net/wan/hdlc_fr: Fix a double free in pvc_xmit") Cc: Lv Yunlong Signed-off-by: Xie He Signed-off-by: David S. Miller commit d89ecd154c23dbee3461efaceaa60263cc9e8fee Merge: 2e9f60932a2c1 34e5b01186858 Author: David S. Miller Date: Mon May 3 13:36:21 2021 -0700 Merge branch 'sctp-race-fix' Xin Long says: ==================== sctp: fix the race condition in sctp_destroy_sock in a proper way The original fix introduced a dead lock, and has to be removed in Patch 1/2, and we will get a proper way to fix it in Patch 2/2. ==================== Signed-off-by: David S. Miller commit 34e5b01186858b36c4d7c87e1a025071e8e2401f Author: Xin Long Date: Mon May 3 05:11:42 2021 +0800 sctp: delay auto_asconf init until binding the first addr As Or Cohen described: If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_migrate fails. 2. In inet_create or inet6_create, if there is a bpf program attached to BPF_CGROUP_INET_SOCK_CREATE which denies creation of the sctp socket. This patch is to fix it by moving the auto_asconf init out of sctp_init_sock(), by which inet_create()/inet6_create() won't need to operate it in sctp_destroy_sock() when calling sk_common_release(). It also makes more sense to do auto_asconf init while binding the first addr, as auto_asconf actually requires an ANY addr bind, see it in sctp_addr_wq_timeout_handler(). This addresses CVE-2021-23133. Fixes: 610236587600 ("bpf: Add new cgroup attach type to enable sock modifications") Reported-by: Or Cohen Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 01bfe5e8e428b475982a98a46cca5755726f3f7f Author: Xin Long Date: Mon May 3 05:11:41 2021 +0800 Revert "net/sctp: fix race condition in sctp_destroy_sock" This reverts commit b166a20b07382b8bc1dcee2a448715c9c2c81b5b. This one has to be reverted as it introduced a dead lock, as syzbot reported: CPU0 CPU1 ---- ---- lock(&net->sctp.addr_wq_lock); lock(slock-AF_INET6); lock(&net->sctp.addr_wq_lock); lock(slock-AF_INET6); CPU0 is the thread of sctp_addr_wq_timeout_handler(), and CPU1 is that of sctp_close(). The original issue this commit fixed will be fixed in the next patch. Reported-by: syzbot+959223586843e69a2674@syzkaller.appspotmail.com Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 2e9f60932a2c19e8a11b4a69d419f107024b05a0 Author: Phillip Potter Date: Sun May 2 22:34:42 2021 +0100 net: hsr: check skb can contain struct hsr_ethhdr in fill_frame_info Check at start of fill_frame_info that the MAC header in the supplied skb is large enough to fit a struct hsr_ethhdr, as otherwise this is not a valid HSR frame. If it is too small, return an error which will then cause the callers to clean up the skb. Fixes a KMSAN-found uninit-value bug reported by syzbot at: https://syzkaller.appspot.com/bug?id=f7e9b601f1414f814f7602a82b6619a8d80bce3f Reported-by: syzbot+e267bed19bfc5478fb33@syzkaller.appspotmail.com Signed-off-by: Phillip Potter Signed-off-by: David S. Miller commit f282df0391267fb2b263da1cc3233aa6fb81defc Author: Xin Long Date: Mon May 3 04:41:20 2021 +0800 sctp: fix a SCTP_MIB_CURRESTAB leak in sctp_sf_do_dupcook_b Normally SCTP_MIB_CURRESTAB is always incremented once asoc enter into ESTABLISHED from the state < ESTABLISHED and decremented when the asoc is being deleted. However, in sctp_sf_do_dupcook_b(), the asoc's state can be changed to ESTABLISHED from the state >= ESTABLISHED where it shouldn't increment SCTP_MIB_CURRESTAB. Otherwise, one asoc may increment MIB_CURRESTAB multiple times but only decrement once at the end. I was able to reproduce it by using scapy to do the 4-way shakehands, after that I replayed the COOKIE-ECHO chunk with 'peer_vtag' field changed to different values, and SCTP_MIB_CURRESTAB was incremented multiple times and never went back to 0 even when the asoc was freed. This patch is to fix it by only incrementing SCTP_MIB_CURRESTAB when the state < ESTABLISHED in sctp_sf_do_dupcook_b(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Marcelo Ricardo Leitner Signed-off-by: Xin Long Signed-off-by: David S. Miller commit a52445ae5a3a4cbfa6380583eea2abf997ae45d1 Merge: 643001b47adc8 7aa4e54739be1 Author: David S. Miller Date: Mon May 3 13:30:04 2021 -0700 Merge branch 'sctp-bad-revert' Xin Long says: ==================== sctp: fix the incorrect revert commit 35b4f24415c8 ("sctp: do asoc update earlier in sctp_sf_do_dupcook_a") only keeps the SHUTDOWN and COOKIE-ACK with the same asoc, not transport. So instead of revert commit 145cb2f7177d ("sctp: Fix bundling of SHUTDOWN with COOKIE-ACK"), we should revert 12dfd78e3a74 ("sctp: Fix SHUTDOWN CTSN Ack in the peer restart case"). ==================== Signed-off-by: David S. Miller commit 7aa4e54739be1471d8dd78f3c0148164085bdc20 Author: Xin Long Date: Mon May 3 04:36:59 2021 +0800 Revert "sctp: Fix SHUTDOWN CTSN Ack in the peer restart case" This reverts commit 12dfd78e3a74825e6f0bc8df7ef9f938fbc6bfe3. This can be reverted as shutdown and cookie_ack chunk are using the same asoc since commit 35b4f24415c8 ("sctp: do asoc update earlier in sctp_sf_do_dupcook_a"). Reported-by: Jere Leppänen Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 22008f560bd36028dd459692794edf2e11e017a5 Author: Xin Long Date: Mon May 3 04:36:58 2021 +0800 Revert "Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK"" This reverts commit 7e9269a5acec6d841d22e12770a0b02db4f5d8f2. As Jere notice, commit 35b4f24415c8 ("sctp: do asoc update earlier in sctp_sf_do_dupcook_a") only keeps the SHUTDOWN and COOKIE-ACK with the same asoc, not transport. So we have to bring this patch back. Reported-by: Jere Leppänen Signed-off-by: Xin Long Signed-off-by: David S. Miller commit 643001b47adc844ae33510c4bb93c236667008a3 Author: Lv Yunlong Date: Sun May 2 04:58:18 2021 -0700 ethernet:enic: Fix a use after free bug in enic_hard_start_xmit In enic_hard_start_xmit, it calls enic_queue_wq_skb(). Inside enic_queue_wq_skb, if some error happens, the skb will be freed by dev_kfree_skb(skb). But the freed skb is still used in skb_tx_timestamp(skb). My patch makes enic_queue_wq_skb() return error and goto spin_unlock() incase of error. The solution is provided by Govind. See https://lkml.org/lkml/2021/4/30/961. Fixes: fb7516d42478e ("enic: add sw timestamp support") Signed-off-by: Lv Yunlong Acked-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller commit 7935bb56e21b2add81149f4def8e59b4133fe57c Author: Geert Uytterhoeven Date: Thu Apr 29 14:45:52 2021 +0200 dt-bindings: media: renesas,vin: Make resets optional on R-Car Gen1 The "resets" property is not present on R-Car Gen1 SoCs. Supporting it would require migrating from renesas,cpg-clocks to renesas,cpg-mssr. Fixes: 905fc6b1bfb4a631 ("dt-bindings: rcar-vin: Convert bindings to json-schema") Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/217c8197efaee7d803b22d433abb0ea8e33b84c6.1619700314.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit 62b3b3660aff66433d71f142ab6ed2baaea25025 Author: Geert Uytterhoeven Date: Thu Apr 29 14:44:09 2021 +0200 dt-bindings: PCI: rcar-pci-host: Document missing R-Car H1 support scripts/checkpatch.pl -f drivers/pci/controller/pcie-rcar-host.c: WARNING: DT compatible string "renesas,pcie-r8a7779" appears un-documented -- check ./Documentation/devicetree/bindings/ #853: FILE: drivers/pci/controller/pcie-rcar-host.c:853: + { .compatible = "renesas,pcie-r8a7779", Re-add the compatible value for R-Car H1, which was lost during the json-schema conversion. Make the "resets" property optional on R-Car H1, as it is not present yet on R-Car Gen1 SoCs. Fixes: 0d69ce3c2c63d4db ("dt-bindings: PCI: rcar-pci-host: Convert bindings to json-schema") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/fb0bb969cd0e5872ab5eac70e070242c0d8a5b81.1619700202.git.geert+renesas@glider.be Signed-off-by: Rob Herring commit cda689f8708b6bef0b921c3a17fcdecbe959a079 Merge: d835ff6c96ae6 e58a41c222684 Author: Linus Torvalds Date: Mon May 3 12:58:31 2021 -0700 Merge tag 'csky-for-linus-5.13-rc1' of git://github.com/c-sky/csky-linux Pull arch/csky updates from Guo Ren: "Just cleanups" * tag 'csky-for-linus-5.13-rc1' of git://github.com/c-sky/csky-linux: csky: uaccess.h: Coding convention with asm generic csky: fix syscache.c fallthrough warning csky: Fixup typos csky: Remove duplicate include in arch/csky/kernel/entry.S commit d835ff6c96ae6fa1ea474b0290a46e514ab6742b Merge: a7efd197bc7ff 23a700455a1bc Author: Linus Torvalds Date: Mon May 3 12:23:03 2021 -0700 Merge tag 'leds-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds Pull LED updates from Pavel Machek: "Nothing too exciting here, just some fixes" * tag 'leds-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds: leds: pca9532: Assign gpio base dynamically leds: trigger: pattern: Switch to using the new API kobj_to_dev() leds: LEDS_BLINK_LGM should depend on X86 leds: lgm: Fix spelling mistake "prepate" -> "prepare" MAINTAINERS: Remove Dan Murphy's bouncing email leds-lm3642: convert comma to semicolon leds: rt4505: Add support for Richtek RT4505 flash LED controller leds: rt4505: Add DT binding document for Richtek RT4505 leds: Kconfig: LEDS_CLASS is usually selected. leds: lgm: Improve Kconfig help leds: lgm: fix gpiolib dependency commit a7efd197bc7ff03076faf09d6325d7c3427893e3 Merge: 9b1f61d5d73d5 4d0185e67806a Author: Linus Torvalds Date: Mon May 3 12:15:21 2021 -0700 Merge tag 'rtc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Mostly small fixes and two drivers gaining alarm support. Summary: Subsystem: - UIE emulation has been reworked to avoid calling driver callbacks when it is known it will not work Drivers: - ab-eoz9: add alarm support - pcf8523: add alarm support" * tag 'rtc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (27 commits) rtc: sysfs: check features instead of ops rtc: omap: use rtc_write to access OMAP_RTC_OSC_REG rtc: s5m: Remove reference to parent's device pdata rtc: ds1307: Fix wday settings for rx8130 rtc: pcf8523: report oscillator failures rtc: pcf8523: add alarm support rtc: pcf8523: remove useless define rtc: rtc_update_irq_enable: rework UIE emulation rtc: ds1307: remove flags rtc: ds1307: replace HAS_ALARM by RTC_FEATURE_ALARM rtc: imx-sc: remove .read_alarm rtc: ds1511: remove unused function rtc: fsl-ftm-alarm: add MODULE_TABLE() rtc: rtc-spear: replace spin_lock_irqsave by spin_lock in hard IRQ dt-bindings: rtc: qcom-pm8xxx-rtc: Add qcom pm8xxx rtc bindings rtc: pm8xxx: Add RTC support for PMIC PMK8350 rtc: ab-eoz9: make use of RTC_FEATURE_ALARM rtc: ab-eoz9: add alarm support rtc: ab-eoz9: set regmap max_register rtc: pcf85063: fallback to parent of_node ... commit 5cd1a85a6c3f49ad008c008299e0dbe9ac33fba6 Author: Jiapeng Chong Date: Sun Apr 25 18:40:58 2021 +0800 of: overlay: Remove redundant assignment to ret Variable ret is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: drivers/of/overlay.c:1197:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. drivers/of/overlay.c:1026:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1619347258-55002-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Rob Herring commit 9b1f61d5d73d550a20dd79b9a17b6bb05a8f9307 Merge: 6f8ee8d36d076 aafe104aa9096 Author: Linus Torvalds Date: Mon May 3 11:19:54 2021 -0700 Merge tag 'trace-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "New feature: - A new "func-no-repeats" option in tracefs/options directory. When set the function tracer will detect if the current function being traced is the same as the previous one, and instead of recording it, it will keep track of the number of times that the function is repeated in a row. And when another function is recorded, it will write a new event that shows the function that repeated, the number of times it repeated and the time stamp of when the last repeated function occurred. Enhancements: - In order to implement the above "func-no-repeats" option, the ring buffer timestamp can now give the accurate timestamp of the event as it is being recorded, instead of having to record an absolute timestamp for all events. This helps the histogram code which no longer needs to waste ring buffer space. - New validation logic to make sure all trace events that access dereferenced pointers do so in a safe way, and will warn otherwise. Fixes: - No longer limit the PIDs of tasks that are recorded for "saved_cmdlines" to PID_MAX_DEFAULT (32768), as systemd now allows for a much larger range. This caused the mapping of PIDs to the task names to be dropped for all tasks with a PID greater than 32768. - Change trace_clock_global() to never block. This caused a deadlock. Clean ups: - Typos, prototype fixes, and removing of duplicate or unused code. - Better management of ftrace_page allocations" * tag 'trace-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (32 commits) tracing: Restructure trace_clock_global() to never block tracing: Map all PIDs to command lines ftrace: Reuse the output of the function tracer for func_repeats tracing: Add "func_no_repeats" option for function tracing tracing: Unify the logic for function tracing options tracing: Add method for recording "func_repeats" events tracing: Add "last_func_repeats" to struct trace_array tracing: Define new ftrace event "func_repeats" tracing: Define static void trace_print_time() ftrace: Simplify the calculation of page number for ftrace_page->records some more ftrace: Store the order of pages allocated in ftrace_page tracing: Remove unused argument from "ring_buffer_time_stamp() tracing: Remove duplicate struct declaration in trace_events.h tracing: Update create_system_filter() kernel-doc comment tracing: A minor cleanup for create_system_filter() kernel: trace: Mundane typo fixes in the file trace_events_filter.c tracing: Fix various typos in comments scripts/recordmcount.pl: Make vim and emacs indent the same scripts/recordmcount.pl: Make indent spacing consistent tracing: Add a verifier to check string pointers for trace events ... commit bb610757fcd74558ad94fe19993fd4470208dd02 Author: Jim Quinlan Date: Fri Apr 30 11:21:56 2021 -0400 PCI: brcmstb: Use reset/rearm instead of deassert/assert The Broadcom STB PCIe RC uses a reset control "rescal" for certain chips. The "rescal" implements a "pulse reset" so using assert/deassert is wrong for this device. Instead, we use reset/rearm. We need to use rearm so that we can reset it after a suspend/resume cycle; w/o using "rearm", the "rescal" device will only ever fire once. Of course for suspend/resume to work we also need to put the reset/rearm calls in the suspend and resume routines. Fixes: 740d6c3708a9 ("PCI: brcmstb: Add control of rescal reset") Link: https://lore.kernel.org/r/20210430152156.21162-4-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Acked-by: Florian Fainelli commit e8d6f9e56187c101b325e8d18f1d4032420d08ff Author: Jim Quinlan Date: Fri Apr 30 11:21:55 2021 -0400 ata: ahci_brcm: Fix use of BCM7216 reset controller This driver may use one of two resets controllers. Keep them in separate variables to keep things simple. The reset controller "rescal" is shared between the AHCI driver and the PCIe driver for the BrcmSTB 7216 chip. Use devm_reset_control_get_optional_shared() to handle this sharing. [bhelgaas: add Jens' ack from v5 posting] Fixes: 272ecd60a636 ("ata: ahci_brcm: BCM7216 reset is self de-asserting") Fixes: c345ec6a50e9 ("ata: ahci_brcm: Support BCM7216 reset controller name") Link: https://lore.kernel.org/r/20210430152156.21162-3-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Acked-by: Jens Axboe Acked-by: Florian Fainelli commit 6f8ee8d36d076b517028b60911877e27bc1d8363 Merge: 23806a3e96004 e41d237818598 Author: Linus Torvalds Date: Mon May 3 11:09:36 2021 -0700 Merge branch 'work.recursive_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull another simple_recursive_removal() update from Al Viro: "I missed one case when simple_recursive_removal() was introduced" * 'work.recursive_removal' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: qib_fs: switch to simple_recursive_removal() commit 48582b2e3b87b794a9845d488af2c76ce055502b Author: Jim Quinlan Date: Fri Apr 30 11:21:54 2021 -0400 reset: add missing empty function reset_control_rearm() All other functions are defined for when CONFIG_RESET_CONTROLLER is not set. Fixes: 557acb3d2cd9 ("reset: make shared pulsed reset controls re-triggerable") Link: https://lore.kernel.org/r/20210430152156.21162-2-jim2101024@gmail.com Signed-off-by: Jim Quinlan Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v5.11+ commit 23806a3e960048f8191ce0d02ff8d5f70e87ad4b Merge: 9ccce092fc64d 42eb0d54c08a0 Author: Linus Torvalds Date: Mon May 3 11:05:28 2021 -0700 Merge branch 'work.file' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull receive_fd update from Al Viro: "Cleanup of receive_fd mess" * 'work.file' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: split receive_fd_replace from __receive_fd commit cd2c7545ae1beac3b6aae033c7f31193b3255946 Author: Changheun Lee Date: Mon May 3 18:52:03 2021 +0900 bio: limit bio max size bio size can grow up to 4GB when muli-page bvec is enabled. but sometimes it would lead to inefficient behaviors. in case of large chunk direct I/O, - 32MB chunk read in user space - all pages for 32MB would be merged to a bio structure if the pages physical addresses are contiguous. it makes some delay to submit until merge complete. bio max size should be limited to a proper size. When 32MB chunk read with direct I/O option is coming from userspace, kernel behavior is below now in do_direct_IO() loop. it's timeline. | bio merge for 32MB. total 8,192 pages are merged. | total elapsed time is over 2ms. |------------------ ... ----------------------->| | 8,192 pages merged a bio. | at this time, first bio submit is done. | 1 bio is split to 32 read request and issue. |---------------> |---------------> |---------------> ...... |---------------> |--------------->| total 19ms elapsed to complete 32MB read done from device. | If bio max size is limited with 1MB, behavior is changed below. | bio merge for 1MB. 256 pages are merged for each bio. | total 32 bio will be made. | total elapsed time is over 2ms. it's same. | but, first bio submit timing is fast. about 100us. |--->|--->|--->|---> ... -->|--->|--->|--->|--->| | 256 pages merged a bio. | at this time, first bio submit is done. | and 1 read request is issued for 1 bio. |---------------> |---------------> |---------------> ...... |---------------> |--------------->| total 17ms elapsed to complete 32MB read done from device. | As a result, read request issue timing is faster if bio max size is limited. Current kernel behavior with multipage bvec, super large bio can be created. And it lead to delay first I/O request issue. Signed-off-by: Changheun Lee Reviewed-by: Bart Van Assche Link: https://lore.kernel.org/r/20210503095203.29076-1-nanich.lee@samsung.com Signed-off-by: Jens Axboe commit c646790a1fcae7738972accc41ccaa4983e5c234 Author: Gioh Kim Date: Thu Apr 29 11:27:41 2021 +0200 RDMA/rtrs: fix uninitialized symbol 'cnt' rtrs_clt_rdma_cq_direct returns an ninitialized value in cnt if there is no session. This patch makes rtrs_clt_rdma_cq_direct returns a negative value for block layer not to try again. Fixes: 2958a995edc94 ("block/rnbd-clt: Support polling mode for IO latency optimization") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20210429092741.266533-1-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit be4f361d69f4487ab56eb67b0cd0559fb1895af2 Author: Bhaskar Chowdhury Date: Wed Apr 28 17:35:21 2021 +0200 s390: dasd: Mundane spelling fixes s/Subssystem/Subsystem/ ......two different places s/reportet/reported/ s/managemnet/management/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20210428153521.2050899-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 1e31016b6926c996e9113619c2ce1f42ad74ddd1 Author: Gioh Kim Date: Wed Apr 28 08:13:59 2021 +0200 block/rnbd: Remove all likely and unlikely The IO performance test with fio after removing the likely and unlikely macros in all if-statement shows no performance drop. They do not help for the performance of rnbd. The fio test did random read on 32 rnbd devices and 64 processes. Test environment: - AMD Opteron(tm) Processor 6386 SE - 125G memory - kernel version: 5.4.86 - gcc version: gcc (Debian 8.3.0-6) 8.3.0 - Infiniband controller: InfiniBand: Mellanox Technologies MT26428 [ConnectX VPI PCIe 2.0 5GT/s - IB QDR / 10GigE] (rev b0) before read: IOPS=549k, BW=2146MiB/s read: IOPS=544k, BW=2125MiB/s read: IOPS=553k, BW=2158MiB/s read: IOPS=535k, BW=2089MiB/s read: IOPS=543k, BW=2122MiB/s read: IOPS=552k, BW=2154MiB/s average: IOPS=546k, BW=2132MiB/s after read: IOPS=556k, BW=2172MiB/s read: IOPS=561k, BW=2191MiB/s read: IOPS=552k, BW=2156MiB/s read: IOPS=551k, BW=2154MiB/s read: IOPS=562k, BW=2194MiB/s ----------- average: IOPS=556k, BW=2173MiB/s The IOPS and bandwidth got better slightly after removing likely/unlikely. (IOPS= +1.8% BW= +1.9%) But we cannot make sure that removing the likely/unlikely help the performance because it depends on various situations. We only make sure that removing the likely/unlikely does not drop the performance. Signed-off-by: Gioh Kim Reviewed-by: Md Haris Iqbal Link: https://lore.kernel.org/r/20210428061359.206794-5-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 1056ad829ec43f9b705b507c2093b05e2088b0b7 Author: Md Haris Iqbal Date: Wed Apr 28 08:13:58 2021 +0200 block/rnbd-clt: Check the return value of the function rtrs_clt_query In case none of the paths are in connected state, the function rtrs_clt_query returns an error. In such a case, error out since the values in the rtrs_attrs structure would be garbage. Fixes: f7a7a5c228d45 ("block/rnbd: client: main functionality") Signed-off-by: Md Haris Iqbal Reviewed-by: Guoqing Jiang Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Link: https://lore.kernel.org/r/20210428061359.206794-4-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 292660fa35e8917a78235d39722edf9bbc04cab7 Author: Dima Stepanov Date: Wed Apr 28 08:13:57 2021 +0200 block/rnbd: Fix style issues This patch fixes some style issues detected by scripts/checkpatch.pl * Resolve spacing and tab issues * Remove extra braces in rnbd_get_iu * Use num_possible_cpus() instead of NR_CPUS in alloc_sess * Fix the comments styling in rnbd_queue_rq Signed-off-by: Dima Stepanov Signed-off-by: Gioh Kim Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20210428061359.206794-3-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 80d43cbd46155744ee450d2476ee4fcf2917ae9b Author: Md Haris Iqbal Date: Wed Apr 28 08:13:56 2021 +0200 block/rnbd-clt: Change queue_depth type in rnbd_clt_session to size_t The member queue_depth in the structure rnbd_clt_session is read from the rtrs client side using the function rtrs_clt_query, which in turn is read from the rtrs_clt structure. It should really be of type size_t. Fixes: 90426e89f54db ("block/rnbd: client: private header with client structs and functions") Signed-off-by: Md Haris Iqbal Reviewed-by: Guoqing Jiang Signed-off-by: Gioh Kim Link: https://lore.kernel.org/r/20210428061359.206794-2-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 5b2abdafbedb902d7d8d3d5e571a38b8900dd15f Author: Shyam Prasad N Date: Sat May 1 16:17:07 2021 +0000 cifs: use echo_interval even when connection not ready. When the tcp connection is not ready to send requests, we keep retrying echo with an interval of zero. This seems unnecessary, and this fix changes the interval between echoes to what is specified as echo_interval. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French commit 2a30f9440640c418bcfbea9b2b344d268b58e0a2 Author: Brendan Jackman Date: Thu Apr 29 13:05:10 2021 +0000 libbpf: Fix signed overflow in ringbuf_process_ring One of our benchmarks running in (Google-internal) CI pushes data through the ringbuf faster htan than userspace is able to consume it. In this case it seems we're actually able to get >INT_MAX entries in a single ring_buffer__consume() call. ASAN detected that cnt overflows in this case. Fix by using 64-bit counter internally and then capping the result to INT_MAX before converting to the int return type. Do the same for the ring_buffer__poll(). Fixes: bf99c936f947 (libbpf: Add BPF ring buffer support) Signed-off-by: Brendan Jackman Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210429130510.1621665-1-jackmanb@google.com commit f4916649f98e2c7bdba38c6597a98c456c17317d Author: Shyam Prasad N Date: Thu Apr 29 07:53:18 2021 +0000 cifs: detect dead connections only when echoes are enabled. We can detect server unresponsiveness only if echoes are enabled. Echoes can be disabled under two scenarios: 1. The connection is low on credits, so we've disabled echoes/oplocks. 2. The connection has not seen any request till now (other than negotiate/sess-setup), which is when we enable these two, based on the credits available. So this fix will check for dead connection, only when echo is enabled. Signed-off-by: Shyam Prasad N CC: # v5.8+ Signed-off-by: Steve French commit a7277a73984114b38dcb62c8548850800ffe864e Author: Zhen Lei Date: Thu Apr 22 17:08:57 2021 +0800 dt-bindings: serial: 8250: Remove duplicated compatible strings The compatible strings "mediatek,*" appears two times, remove one of them. Fixes: e69f5dc623f9 ("dt-bindings: serial: Convert 8250 to json-schema") Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210422090857.583-1-thunder.leizhen@huawei.com Signed-off-by: Rob Herring commit 7ba3d1cdb7988ccfbc6e4995dee04510c85fefbc Author: Steve French Date: Sun May 2 17:39:30 2021 -0500 smb3.1.1: allow dumping keys for multiuser mounts When mounted multiuser it is hard to dump keys for the other sessions which makes it hard to debug using network traces (e.g. using wireshark). Suggested-by: Shyam Prasad N Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit aa22ebc3826be23a4b2f776c7ad5079c75611dec Author: Steve French Date: Fri Apr 30 17:14:45 2021 -0500 smb3.1.1: allow dumping GCM256 keys to improve debugging of encrypted shares Previously we were only able to dump CCM or GCM-128 keys (see "smbinfo keys" e.g.) to allow network debugging (e.g. wireshark) of mounts to SMB3.1.1 encrypted shares. But with the addition of GCM-256 support, we have to be able to dump 32 byte instead of 16 byte keys which requires adding an additional ioctl for that. Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 087f757b0129850c99cc9116df4909dac1bce871 Author: Steve French Date: Thu Apr 29 00:18:43 2021 -0500 cifs: add shutdown support Various filesystem support the shutdown ioctl which is used by various xfstests. The shutdown ioctl sets a flag on the superblock which prevents open, unlink, symlink, hardlink, rmdir, create etc. on the file system until unmount and remounted. The two flags supported in this patch are: FSOP_GOING_FLAGS_LOGFLUSH and FSOP_GOING_FLAGS_NOLOGFLUSH which require very little other than blocking new operations (since we do not cache writes to metadata on the client with cifs.ko). FSOP_GOING_FLAGS_DEFAULT is not supported yet, but could be added in the future but would need to call syncfs or equivalent to write out pending data on the mount. With this patch various xfstests now work including tests 043 through 046 for example. Signed-off-by: Steve French Reviewed-by: Aurelien Aptel commit c3f207ab29f793b8c942ce8067ed123f18d5b81b Author: Rohith Surabattula Date: Tue Apr 13 00:26:42 2021 -0500 cifs: Deferred close for files When file is closed, SMB2 close request is not sent to server immediately and is deferred for acregmax defined interval. When file is reopened by same process for read or write, the file handle is reused if an oplock is held. When client receives a oplock/lease break, file is closed immediately if reference count is zero, else oplock is downgraded. Signed-off-by: Rohith Surabattula Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit f1f99adf05f2138ff2646d756d4674e302e8d02d Author: Sid Manning Date: Tue Oct 13 16:17:50 2020 -0500 Hexagon: add target builtins to kernel Add the compiler-rt builtins like memcpy to the hexagon kernel. Signed-off-by: Sid Manning Add SYM_FUNC_START/END, ksyms exports Signed-off-by: Brian Cain Tested-by: Nick Desaulniers commit aaa44952bbd1d4db14a4d676bf9595bb5db7e7b0 Author: Sid Manning Date: Mon Apr 26 22:38:31 2021 -0500 Hexagon: remove DEBUG from comet config Remove CONFIG_DEBUG_INFO from comet configuration. Signed-off-by: Sid Manning Signed-off-by: Brian Cain Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers commit 6fff7410f6befe5744d54f0418d65a6322998c09 Author: Sid Manning Date: Mon Apr 26 13:51:53 2021 -0500 Hexagon: change jumps to must-extend in futex_atomic_* Cross-section jumps from .fixup section must be extended. Signed-off-by: Sid Manning Signed-off-by: Brian Cain Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers commit 788dcee0306e1bdbae1a76d1b3478bb899c5838e Author: Sid Manning Date: Fri Apr 23 15:06:58 2021 -0500 Hexagon: fix build errors Fix type-o in ptrace.c. Add missing include: asm/hexagon_vm.h Remove superfluous cast. Replace 'p3_0' with 'preds'. Signed-off-by: Sid Manning Add -mlong-calls to build flags. Signed-off-by: Brian Cain Tested-by: Nick Desaulniers Reviewed-by: Nick Desaulniers commit 8899a5fc7da516460f841189a28aac0b52b554fd Author: Colin Ian King Date: Fri Apr 30 18:03:03 2021 +0100 KVM: x86: Fix potential fput on a null source_kvm_file The fget can potentially return null, so the fput on the error return path can cause a null pointer dereference. Fix this by checking for a null source_kvm_file before doing a fput. Addresses-Coverity: ("Dereference null return") Fixes: 54526d1fd593 ("KVM: x86: Support KVM VMs sharing SEV context") Signed-off-by: Colin Ian King Message-Id: <20210430170303.131924-1-colin.king@canonical.com> Signed-off-by: Paolo Bonzini commit 7f6231a39117c2781beead59d6ae4923c2703147 Author: Kai Huang Date: Mon May 3 16:24:46 2021 +1200 KVM: x86/mmu: Fix kdoc of __handle_changed_spte The function name of kdoc of __handle_changed_spte() should be itself, rather than handle_changed_spte(). Fix the typo. Signed-off-by: Kai Huang Message-Id: <20210503042446.154695-1-kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit 9d290e16432cacd448475d38dec2753b75b9665f Author: Maxim Levitsky Date: Mon May 3 15:54:44 2021 +0300 KVM: nSVM: leave the guest mode prior to loading a nested state This allows the KVM to load the nested state more than once without warnings. Signed-off-by: Maxim Levitsky Message-Id: <20210503125446.1353307-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit c74ad08f3333db2e44d3346b863f6d10d35e37dd Author: Maxim Levitsky Date: Mon May 3 15:54:43 2021 +0300 KVM: nSVM: fix few bugs in the vmcb02 caching logic * Define and use an invalid GPA (all ones) for init value of last and current nested vmcb physical addresses. * Reset the current vmcb12 gpa to the invalid value when leaving the nested mode, similar to what is done on nested vmexit. * Reset the last seen vmcb12 address when disabling the nested SVM, as it relies on vmcb02 fields which are freed at that point. Fixes: 4995a3685f1b ("KVM: SVM: Use a separate vmcb for the nested L2 guest") Signed-off-by: Maxim Levitsky Message-Id: <20210503125446.1353307-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit deee59bacb2402c20e6b1b6800f9a5127367eb2a Author: Maxim Levitsky Date: Mon May 3 15:54:42 2021 +0300 KVM: nSVM: fix a typo in svm_leave_nested When forcibly leaving the nested mode, we should switch to vmcb01 Fixes: 4995a3685f1b ("KVM: SVM: Use a separate vmcb for the nested L2 guest") Signed-off-by: Maxim Levitsky Message-Id: <20210503125446.1353307-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 262de4102c7bb8e59f26a967a8ffe8cce85cc537 Author: Benjamin Segall Date: Thu Apr 29 16:22:34 2021 +0000 kvm: exit halt polling on need_resched() as well single_task_running() is usually more general than need_resched() but CFS_BANDWIDTH throttling will use resched_task() when there is just one task to get the task to block. This was causing long-need_resched warnings and was likely allowing VMs to overrun their quota when halt polling. Signed-off-by: Ben Segall Signed-off-by: Venkatesh Srinivas Message-Id: <20210429162233.116849-1-venkateshs@chromium.org> Signed-off-by: Paolo Bonzini Cc: stable@vger.kernel.org Reviewed-by: Jim Mattson commit d981dd15498b188636ec5a7d8ad485e650f63d8d Author: Wanpeng Li Date: Wed Apr 28 19:08:02 2021 +0800 KVM: LAPIC: Accurately guarantee busy wait for timer to expire when using hv_timer Commit ee66e453db13d (KVM: lapic: Busy wait for timer to expire when using hv_timer) tries to set ktime->expired_tscdeadline by checking ktime->hv_timer_in_use since lapic timer oneshot/periodic modes which are emulated by vmx preemption timer also get advanced, they leverage the same vmx preemption timer logic with tsc-deadline mode. However, ktime->hv_timer_in_use is cleared before apic_timer_expired() handling, let's delay this clearing in preemption-disabled region. Fixes: ee66e453db13d ("KVM: lapic: Busy wait for timer to expire when using hv_timer") Reviewed-by: Sean Christopherson Signed-off-by: Wanpeng Li Message-Id: <1619608082-4187-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 1699f65c8b658d434fe92563c906cd1a136c9cb6 Author: Shahin, Md Shahadat Hossain Date: Fri Apr 30 11:52:31 2021 +0000 kvm/x86: Fix 'lpages' kvm stat for TDM MMU Large pages not being created properly may result in increased memory access time. The 'lpages' kvm stat used to keep track of the current number of large pages in the system, but with TDP MMU enabled the stat is not showing the correct number. This patch extends the lpages counter to cover the TDP case. Signed-off-by: Md Shahadat Hossain Shahin Cc: Bartosz Szczepanek Message-Id: <1619783551459.35424@amazon.de> Signed-off-by: Paolo Bonzini commit ff76d506030daeeeb967be8b8a189bf7aee8e7a8 Author: Kai Huang Date: Thu Apr 29 16:12:26 2021 +1200 KVM: x86/mmu: Avoid unnecessary page table allocation in kvm_tdp_mmu_map() In kvm_tdp_mmu_map(), while iterating TDP MMU page table entries, it is possible SPTE has already been frozen by another thread but the frozen is not done yet, for instance, when another thread is still in middle of zapping large page. In this case, the !is_shadow_present_pte() check for old SPTE in tdp_mmu_for_each_pte() may hit true, and in this case allocating new page table is unnecessary since tdp_mmu_set_spte_atomic() later will return false and page table will need to be freed. Add is_removed_spte() check before allocating new page table to avoid this. Signed-off-by: Kai Huang Message-Id: <20210429041226.50279-1-kai.huang@intel.com> Reviewed-by: Ben Gardon Signed-off-by: Paolo Bonzini commit c2036abb625fc7d63ab64fa23999a7e3a90e7412 Author: Rob Herring Date: Fri Apr 30 10:26:56 2021 -0500 dt-bindings: Remove unused Sigma Designs Tango bindings The Sigma Designs Tango support has been removed, but 2 binding docs for NAND and PCIe were missed. Remove them. Cc: Marc Gonzalez Cc: Richard Weinberger Cc: Vignesh Raghavendra Cc: Bjorn Helgaas Cc: linux-mtd@lists.infradead.org Cc: linux-pci@vger.kernel.org Acked-by: Miquel Raynal Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210430153225.3366000-1-robh@kernel.org/ Signed-off-by: Rob Herring commit 127f1c09c5c84800761cf650b4c4f0a312f569ef Author: Helge Deller Date: Mon May 3 15:08:59 2021 +0200 parisc: Fix typo in setup.c Signed-off-by: Helge Deller commit ab2165e2e6ed17345ffa8ee88ca764e8788ebcd7 Author: Timo Gurr Date: Mon May 3 13:08:22 2021 +0200 ALSA: usb-audio: Add dB range mapping for Sennheiser Communications Headset PC 8 The decibel volume range contains a negative maximum value resulting in pipewire complaining about the device and effectivly having no sound output. The wrong values also resulted in the headset sounding muted already at a mixer level of about ~25%. PipeWire BugLink: https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1049 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212897 Signed-off-by: Timo Gurr Cc: Link: https://lore.kernel.org/r/20210503110822.10222-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 801c6058d14a82179a7ee17a4b532cac6fad067f Author: Daniel Borkmann Date: Thu Apr 29 15:19:37 2021 +0000 bpf: Fix leakage of uninitialized bpf stack under speculation The current implemented mechanisms to mitigate data disclosure under speculation mainly address stack and map value oob access from the speculative domain. However, Piotr discovered that uninitialized BPF stack is not protected yet, and thus old data from the kernel stack, potentially including addresses of kernel structures, could still be extracted from that 512 bytes large window. The BPF stack is special compared to map values since it's not zero initialized for every program invocation, whereas map values /are/ zero initialized upon their initial allocation and thus cannot leak any prior data in either domain. In the non-speculative domain, the verifier ensures that every stack slot read must have a prior stack slot write by the BPF program to avoid such data leaking issue. However, this is not enough: for example, when the pointer arithmetic operation moves the stack pointer from the last valid stack offset to the first valid offset, the sanitation logic allows for any intermediate offsets during speculative execution, which could then be used to extract any restricted stack content via side-channel. Given for unprivileged stack pointer arithmetic the use of unknown but bounded scalars is generally forbidden, we can simply turn the register-based arithmetic operation into an immediate-based arithmetic operation without the need for masking. This also gives the benefit of reducing the needed instructions for the operation. Given after the work in 7fedb63a8307 ("bpf: Tighten speculative pointer arithmetic mask"), the aux->alu_limit already holds the final immediate value for the offset register with the known scalar. Thus, a simple mov of the immediate to AX register with using AX as the source for the original instruction is sufficient and possible now in this case. Reported-by: Piotr Krysiuk Signed-off-by: Daniel Borkmann Tested-by: Piotr Krysiuk Reviewed-by: Piotr Krysiuk Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit b9b34ddbe2076ade359cd5ce7537d5ed019e9807 Author: Daniel Borkmann Date: Fri Apr 30 16:21:46 2021 +0200 bpf: Fix masking negation logic upon negative dst register The negation logic for the case where the off_reg is sitting in the dst register is not correct given then we cannot just invert the add to a sub or vice versa. As a fix, perform the final bitwise and-op unconditionally into AX from the off_reg, then move the pointer from the src to dst and finally use AX as the source for the original pointer arithmetic operation such that the inversion yields a correct result. The single non-AX mov in between is possible given constant blinding is retaining it as it's not an immediate based operation. Fixes: 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer arithmetic") Signed-off-by: Daniel Borkmann Tested-by: Piotr Krysiuk Reviewed-by: Piotr Krysiuk Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit 45799491a92174ff78d9c46de55d614814bdd3e1 Author: Masahiro Yamada Date: Sun May 2 02:24:35 2021 +0900 kbuild: remove ARCH=sh64 support from top Makefile Commit 37744feebc08 ("sh: remove sh5 support") removed the SUPERH64 support entirely. Remove the left-over code from the top Makefile. Signed-off-by: Masahiro Yamada Acked-by: Arnd Bergmann commit 5619003173bad626e7d6bd6241c1855b549f9311 Author: Zhu Lingshan Date: Mon Apr 19 14:33:26 2021 +0800 vDPA/ifcvf: get_config_size should return dev specific config size get_config_size() should return the size based on the decected device type. Signed-off-by: Zhu Lingshan Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210419063326.3748-4-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 6ad31d162a4e0227bd8e854255b37a23a4263900 Author: Zhu Lingshan Date: Mon Apr 19 14:33:25 2021 +0800 vDPA/ifcvf: enable Intel C5000X-PL virtio-block for vDPA This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-block for vDPA. Signed-off-by: Zhu Lingshan Reviewed-by: Stefano Garzarella Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210419063326.3748-3-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 26bfea1309f5d4faad33383d2d82a3463f518982 Author: Zhu Lingshan Date: Mon Apr 19 14:33:24 2021 +0800 vDPA/ifcvf: deduce VIRTIO device ID when probe This commit deduces VIRTIO device ID as device type when probe, then ifcvf_vdpa_get_device_id() can simply return the ID. ifcvf_vdpa_get_features() and ifcvf_vdpa_get_config_size() can work properly based on the device ID. Signed-off-by: Zhu Lingshan Link: https://lore.kernel.org/r/20210419063326.3748-2-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 899c4d187f6a5c11d8eae33506fa0736dbabc39f Author: Stefano Garzarella Date: Mon Mar 15 17:34:50 2021 +0100 vdpa_sim_blk: add support for vdpa management tool Enable the user to create vDPA block simulator devices using the vdpa management tool: # Show vDPA supported devices $ vdpa mgmtdev show vdpasim_blk: supported_classes block # Create a vDPA block device named as 'blk0' from the management # device vdpasim: $ vdpa dev add mgmtdev vdpasim_blk name blk0 # Show the info of the 'blk0' device just created $ vdpa dev show blk0 -jp { "dev": { "blk0": { "type": "block", "mgmtdev": "vdpasim_blk", "vendor_id": 0, "max_vqs": 1, "max_vq_size": 256 } } } # Delete the vDPA device after its use $ vdpa dev del blk0 Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-15-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit e6fa605227071620c11014efbc2930029e1673b9 Author: Stefano Garzarella Date: Mon Mar 15 17:34:49 2021 +0100 vdpa_sim_blk: handle VIRTIO_BLK_T_GET_ID Handle VIRTIO_BLK_T_GET_ID request, always answering the "vdpa_blk_sim" string. Acked-by: Jason Wang Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-14-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 7d189f617f83f780915b737896a696ff605bd19f Author: Stefano Garzarella Date: Mon Mar 15 17:34:48 2021 +0100 vdpa_sim_blk: implement ramdisk behaviour The previous implementation wrote only the status of each request. This patch implements a more accurate block device simulator, providing a ramdisk-like behavior and adding input validation. Acked-by: Jason Wang Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-13-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 0c853c2c2924464bd86537164ed18d5d953b4909 Author: Max Gurtovoy Date: Mon Mar 15 17:34:47 2021 +0100 vdpa: add vdpa simulator for block device This will allow running vDPA for virtio block protocol. It's a preliminary implementation with a simple request handling: for each request, only the status (last byte) is set. It's always set to VIRTIO_BLK_S_OK. Also input validation is missing and will be added in the next commits. Signed-off-by: Max Gurtovoy [sgarzare: various cleanups/fixes] Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-12-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 9d6d97bff7909910af537fd3903d05338adaaefa Author: Xie Yongji Date: Mon Mar 15 17:34:46 2021 +0100 vhost/vdpa: Remove the restriction that only supports virtio-net devices Since the config checks are done by the vDPA drivers, we can remove the virtio-net restriction and we should be able to support all kinds of virtio devices. is not needed anymore, but we need to include to avoid compilation failures. Signed-off-by: Xie Yongji Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-11-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit d6d8bb92fdde6390037bf9da174ed3ab551c04d7 Author: Stefano Garzarella Date: Mon Mar 15 17:34:45 2021 +0100 vhost/vdpa: use get_config_size callback in vhost_vdpa_config_validate() Let's use the new 'get_config_size()' callback available instead of using the 'virtio_id' to get the size of the device config space. Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-10-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 442706f9f94d28fe3c9f188ae4ebbd6b40addffe Author: Stefano Garzarella Date: Mon Mar 15 17:34:44 2021 +0100 vdpa: add get_config_size callback in vdpa_config_ops This new callback is used to get the size of the configuration space of vDPA devices. Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-9-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit bc433e5e0d42d7892dcefb65686c9f1df126923a Author: Stefano Garzarella Date: Mon Mar 15 17:34:43 2021 +0100 vdpa_sim: cleanup kiovs in vdpasim_free() vringh_getdesc_iotlb() allocates memory to store the kvec, that is freed with vringh_kiov_cleanup(). vringh_getdesc_iotlb() is able to reuse a kvec previously allocated, so in order to avoid to allocate the kvec for each request, we are not calling vringh_kiov_cleanup() when we finished to handle a request, but we should call it when we free the entire device. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-8-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 14c9ac05ce09c8c6a89ffcca6ffb68707cba36c2 Author: Stefano Garzarella Date: Mon Mar 15 17:34:42 2021 +0100 vringh: add vringh_kiov_length() helper This new helper returns the total number of bytes covered by a vringh_kiov. Suggested-by: Jason Wang Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-7-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit b8c06ad4d67db56ed6bdfb685c134da74e92a2c7 Author: Stefano Garzarella Date: Mon Mar 15 17:34:41 2021 +0100 vringh: implement vringh_kiov_advance() In some cases, it may be useful to provide a way to skip a number of bytes in a vringh_kiov. Let's implement vringh_kiov_advance() for this purpose, reusing the code from vringh_iov_xfer(). We replace that code calling the new vringh_kiov_advance(). Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-6-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 69c13c58bd10f036d6e697e664948952e61acfb1 Author: Stefano Garzarella Date: Mon Mar 15 17:34:40 2021 +0100 vringh: explain more about cleaning riov and wiov riov and wiov can be reused with subsequent calls of vringh_getdesc_*(). Let's add a paragraph in the documentation of these functions to better explain when riov and wiov need to be cleaned up. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-5-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit bbc2c372a83d74d5499ad21d0ade2b71f5bde620 Author: Stefano Garzarella Date: Mon Mar 15 17:34:39 2021 +0100 vringh: reset kiov 'consumed' field in __vringh_iov() __vringh_iov() overwrites the contents of riov and wiov, in fact it resets the 'i' and 'used' fields, but also the 'consumed' field should be reset to avoid an inconsistent state. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-4-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit f53d9910d009bc015b42d88114e2d86a93b0e6b7 Author: Stefano Garzarella Date: Mon Mar 15 17:34:38 2021 +0100 vringh: add 'iotlb_lock' to synchronize iotlb accesses Usually iotlb accesses are synchronized with a spinlock. Let's request it as a new parameter in vringh_set_iotlb() and hold it when we navigate the iotlb in iotlb_translate() to avoid race conditions with any new additions/deletions of ranges from the ioltb. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-3-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit 4080fc1067501707b9693b8003feae7d50d14e35 Author: Stefano Garzarella Date: Mon Mar 15 17:34:37 2021 +0100 vdpa_sim: use iova module to allocate IOVA addresses The identical mapping used until now created issues when mapping different virtual pages with the same physical address. To solve this issue, we can use the iova module, to handle the IOVA allocation. For simplicity we use an IOVA allocator with byte granularity. We add two new functions, vdpasim_map_range() and vdpasim_unmap_range(), to handle the IOVA allocation and the registration into the IOMMU/IOTLB. These functions are used by dma_map_ops callbacks. Acked-by: Jason Wang Signed-off-by: Stefano Garzarella Link: https://lore.kernel.org/r/20210315163450.254396-2-sgarzare@redhat.com Signed-off-by: Michael S. Tsirkin commit e8ef6124959a7c4004ef95b1b17cfa9b2ca582bd Author: Zhu Lingshan Date: Wed Mar 17 17:49:33 2021 +0800 vDPA/ifcvf: deduce VIRTIO device ID from pdev ids This commit deduces the VIRTIO device ID of a probed device from its pdev device ids. Signed-off-by: Zhu Lingshan Link: https://lore.kernel.org/r/20210317094933.16417-8-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang commit 1d895a68085b28d098893570b024229aacc9a057 Author: Zhu Lingshan Date: Wed Mar 17 17:49:32 2021 +0800 vDPA/ifcvf: verify mandatory feature bits for vDPA vDPA requres VIRTIO_F_ACCESS_PLATFORM as a must, this commit examines this when set features. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210317094933.16417-7-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 69d00d9858c7451a1e3fc556ece211533fb85b64 Author: Zhu Lingshan Date: Wed Mar 17 17:49:31 2021 +0800 vDPA/ifcvf: fetch device feature bits when probe This commit would read and store device feature bits when probe. rename ifcvf_get_features() to ifcvf_get_hw_features(), it reads and stores features of the probed device. new ifcvf_get_features() simply returns stored feature bits. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210317094933.16417-6-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 2f1b305070393151d3997217a4452ef99bdb48cc Author: Zhu Lingshan Date: Wed Mar 17 17:49:30 2021 +0800 vDPA/ifcvf: remove the version number string This commit removes the version number string, using kernel version is enough. Signed-off-by: Zhu Lingshan Reviewed-by: Leon Romanovsky Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210317094933.16417-5-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 51fc387b67cb25416757f7a889bab328cc0faf37 Author: Zhu Lingshan Date: Wed Mar 17 17:49:29 2021 +0800 vDPA/ifcvf: rename original IFCVF dev ids to N3000 ids IFCVF driver probes multiple types of devices now, to distinguish the original device driven by IFCVF from others, it is renamed as "N3000". Signed-off-by: Zhu Lingshan Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210317094933.16417-4-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 139c3fd9c9fc52ea5b8a347046993000afe36c06 Author: Zhu Lingshan Date: Wed Mar 17 17:49:28 2021 +0800 vDPA/ifcvf: enable Intel C5000X-PL virtio-net for vDPA This commit enabled Intel FPGA SmartNIC C5000X-PL virtio-net for vDPA Signed-off-by: Zhu Lingshan Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210317094933.16417-3-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 0ecb1960788d0ce627e246303a31843c1f496bed Author: Zhu Lingshan Date: Wed Mar 17 17:49:27 2021 +0800 vDPA/ifcvf: get_vendor_id returns a device specific vendor id In this commit, ifcvf_get_vendor_id() will return a device specific vendor id of the probed pci device than a hard code. Signed-off-by: Zhu Lingshan Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210317094933.16417-2-lingshan.zhu@intel.com Signed-off-by: Michael S. Tsirkin commit 3a3e0fad16d40a2aa68ddf7eea4acdf48b22dd44 Author: Jason Wang Date: Tue Apr 13 17:15:57 2021 +0800 vhost-vdpa: fix vm_flags for virtqueue doorbell mapping The virtqueue doorbell is usually implemented via registeres but we don't provide the necessary vma->flags like VM_PFNMAP. This may cause several issues e.g when userspace tries to map the doorbell via vhost IOTLB, kernel may panic due to the page is not backed by page structure. This patch fixes this by setting the necessary vm_flags. With this patch, try to map doorbell via IOTLB will fail with bad address. Cc: stable@vger.kernel.org Fixes: ddd89d0a059d ("vhost_vdpa: support doorbell mapping via mmap") Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210413091557.29008-1-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 526cb8580bc6b9e5bc14cc5d24ecf4633a84cfa1 Author: Jason Wang Date: Thu Apr 15 03:31:47 2021 -0400 vp_vdpa: report doorbell address This patch reports the per vq doorbell location and size to vDPA bus. Userspace can then map the doorbell via mmap() via vhost-vDPA bus driver. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210415073147.19331-8-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 9e311bcad73dc14bd0a736db6ad3d382227e11fe Author: Jason Wang Date: Thu Apr 15 03:31:46 2021 -0400 virtio-pci library: report resource address Sometimes it might be useful to report the capability physical address. One example is to report the physical address of the doorbell in order to be mapped by userspace. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210415073147.19331-7-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit fd466b36940b22a506265edf12714bd0cf9ed836 Author: Jason Wang Date: Thu Apr 15 03:31:45 2021 -0400 virito_pci libray: hide vp_modern_map_capability() No user now and the capability should not be setup externally. Instead, every access to the capability should be done via virtio_pci_modern_device. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210415073147.19331-6-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit a5f7a24f49d81fab9f59611814a8817cc8a876a2 Author: Jason Wang Date: Thu Apr 15 03:31:44 2021 -0400 virtio_pci_modern: hide vp_modern_get_queue_notify_off() All users (both virtio-pci library and vp_vdpa driver) has been switched to use vp_modern_map_vq_notify(). So there's no need to export the low level helper of vp_modern_get_queue_notify_off(). Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210415073147.19331-5-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 11d8ffed00b231356008b35a3b0bc192e42333fa Author: Jason Wang Date: Thu Apr 15 03:31:43 2021 -0400 vp_vdpa: switch to use vp_modern_map_vq_notify() This patch switches to use vp_vdpa to use vp_modern_map_notify(). Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210415073147.19331-4-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 7dca6c0ea96b9e583ebcf95fe3c14ba3385f467b Author: Jason Wang Date: Thu Apr 15 03:31:42 2021 -0400 virtio-pci library: switch to use vp_modern_map_vq_notify() This patch switch to use vp_modern_map_notify() for virtio-pci library. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210415073147.19331-3-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 9e3bb9b79a7131a088cfffbdcc30e747dad9d090 Author: Jason Wang Date: Thu Apr 15 03:31:41 2021 -0400 virtio_pci_modern: introduce helper to map vq notify area This patch factors out the logic of vq notify area mapping. Following patches will switch to use this common helpers for both virtio_pci library and virtio-pci vDPA driver. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210415073147.19331-2-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin Reviewed-by: Eli Cohen commit 122b84a1267aec28ab929edae1ac700a03fb65e0 Author: Max Gurtovoy Date: Sun May 2 12:33:19 2021 +0300 virtio-net: don't allocate control_buf if not supported Not all virtio_net devices support the ctrl queue feature. Thus, there is no need to allocate unused resources. Signed-off-by: Max Gurtovoy Link: https://lore.kernel.org/r/20210502093319.61313-1-mgurtovoy@nvidia.com Signed-off-by: Michael S. Tsirkin commit 3fd02fbbfac0dabb624606d1303d309f34ec15d4 Author: Liu Xiang Date: Sat Mar 27 11:17:10 2021 +0800 virtio-balloon: fix a typo in comment of virtballoon_migratepage() Typo: compation --> compaction Signed-off-by: Liu Xiang Link: https://lore.kernel.org/r/20210327031710.16151-1-liu.xiang@zlingsmart.com Signed-off-by: Michael S. Tsirkin Reviewed-by: David Hildenbrand commit c0a54b4bcb457232d5dce36ffbcd31d201ba3332 Author: Parav Pandit Date: Tue Apr 6 20:04:45 2021 +0300 vdpa: Follow kdoc comment style Follow comment style mentioned in the Writing kernel-doc document [1]. Following warnings are fixed. $ scripts/kernel-doc -v -none drivers/vdpa/vdpa.c drivers/vdpa/vdpa.c:67: info: Scanning doc for __vdpa_alloc_device drivers/vdpa/vdpa.c:84: warning: No description found for return value of '__vdpa_alloc_device' drivers/vdpa/vdpa.c:153: info: Scanning doc for _vdpa_register_device drivers/vdpa/vdpa.c:163: warning: No description found for return value of '_vdpa_register_device' drivers/vdpa/vdpa.c:172: info: Scanning doc for vdpa_register_device drivers/vdpa/vdpa.c:180: warning: No description found for return value of 'vdpa_register_device' drivers/vdpa/vdpa.c:191: info: Scanning doc for _vdpa_unregister_device drivers/vdpa/vdpa.c:205: info: Scanning doc for vdpa_unregister_device drivers/vdpa/vdpa.c:217: info: Scanning doc for __vdpa_register_driver drivers/vdpa/vdpa.c:224: warning: No description found for return value of '__vdpa_register_driver' drivers/vdpa/vdpa.c:233: info: Scanning doc for vdpa_unregister_driver drivers/vdpa/vdpa.c:243: info: Scanning doc for vdpa_mgmtdev_register drivers/vdpa/vdpa.c:250: warning: No description found for return value of 'vdpa_mgmtdev_register' After the fix: scripts/kernel-doc -v -none drivers/vdpa/vdpa.c drivers/vdpa/vdpa.c:67: info: Scanning doc for __vdpa_alloc_device drivers/vdpa/vdpa.c:153: info: Scanning doc for _vdpa_register_device drivers/vdpa/vdpa.c:172: info: Scanning doc for vdpa_register_device drivers/vdpa/vdpa.c:191: info: Scanning doc for _vdpa_unregister_device drivers/vdpa/vdpa.c:205: info: Scanning doc for vdpa_unregister_device drivers/vdpa/vdpa.c:217: info: Scanning doc for __vdpa_register_driver drivers/vdpa/vdpa.c:233: info: Scanning doc for vdpa_unregister_driver drivers/vdpa/vdpa.c:243: info: Scanning doc for vdpa_mgmtdev_register [1] https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen Link: https://lore.kernel.org/r/20210406170457.98481-3-parav@nvidia.com Signed-off-by: Michael S. Tsirkin commit d0f9164eb294aeb884cbe36ddbbae34fa0124aa1 Author: Parav Pandit Date: Tue Apr 6 20:04:44 2021 +0300 vdpa: Follow kdoc comment style Follow comment style mentioned in the Writing kernel-doc document [1]. Following warnings are fixed. $ scripts/kernel-doc -v -none include/linux/vdpa.h include/linux/vdpa.h:11: warning: missing initial short description on line: * vDPA callback definition. include/linux/vdpa.h:11: info: Scanning doc for vDPA include/linux/vdpa.h:15: warning: cannot understand function prototype: 'struct vdpa_callback ' include/linux/vdpa.h:21: warning: missing initial short description on line: * vDPA notification area include/linux/vdpa.h:21: info: Scanning doc for vDPA include/linux/vdpa.h:25: warning: cannot understand function prototype: 'struct vdpa_notification_area ' include/linux/vdpa.h:31: warning: missing initial short description on line: * vDPA vq_state definition include/linux/vdpa.h:31: info: Scanning doc for vDPA include/linux/vdpa.h:34: warning: cannot understand function prototype: 'struct vdpa_vq_state ' include/linux/vdpa.h:41: info: Scanning doc for vDPA device include/linux/vdpa.h:51: warning: cannot understand function prototype: 'struct vdpa_device ' include/linux/vdpa.h:62: info: Scanning doc for vDPA IOVA range include/linux/vdpa.h:66: warning: cannot understand function prototype: 'struct vdpa_iova_range ' include/linux/vdpa.h:72: info: Scanning doc for vDPA_config_ops include/linux/vdpa.h:203: warning: cannot understand function prototype: 'struct vdpa_config_ops ' include/linux/vdpa.h:270: info: Scanning doc for vdpa_driver include/linux/vdpa.h:275: warning: cannot understand function prototype: 'struct vdpa_driver ' include/linux/vdpa.h:347: info: Scanning doc for vdpa_mgmtdev_ops include/linux/vdpa.h:360: warning: cannot understand function prototype: 'struct vdpa_mgmtdev_ops ' After this fix: scripts/kernel-doc -v -none include/linux/vdpa.h include/linux/vdpa.h:11: info: Scanning doc for struct vdpa_calllback include/linux/vdpa.h:21: info: Scanning doc for struct vdpa_notification_area include/linux/vdpa.h:31: info: Scanning doc for struct vdpa_vq_state include/linux/vdpa.h:41: info: Scanning doc for struct vdpa_device include/linux/vdpa.h:62: info: Scanning doc for struct vdpa_iova_range include/linux/vdpa.h:72: info: Scanning doc for struct vdpa_config_ops include/linux/vdpa.h:270: info: Scanning doc for struct vdpa_driver include/linux/vdpa.h:347: info: Scanning doc for struct vdpa_mgmtdev_ops [1] https://www.kernel.org/doc/html/latest/doc-guide/kernel-doc.html Signed-off-by: Parav Pandit Reviewed-by: Eli Cohen Link: https://lore.kernel.org/r/20210406170457.98481-2-parav@nvidia.com Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang Acked-by: Jason Wang commit 58926c8aab104daa49f35b9fcf664d95c22c8ac7 Author: Eli Cohen Date: Thu Apr 8 12:13:21 2021 +0300 vdpa/mlx5: Enable user to add/delete vdpa device Allow to control vdpa device creation and destruction using the vdpa management tool. Examples: 1. List the management devices $ vdpa mgmtdev show pci/0000:3b:00.1: supported_classes net 2. Create vdpa instance $ vdpa dev add mgmtdev pci/0000:3b:00.1 name vdpa0 3. Show vdpa devices $ vdpa dev show vdpa0: type network mgmtdev pci/0000:3b:00.1 vendor_id 5555 max_vqs 16 \ max_vq_size 256 Signed-off-by: Eli Cohen Reviewed-by: Parav Pandit Acked-by: Jason Wang Link: https://lore.kernel.org/r/20210408091320.4600-1-elic@nvidia.com Signed-off-by: Michael S. Tsirkin commit 64b9f64f80a6f4b7ea51bf0510119cb15e801dc6 Author: Jason Wang Date: Tue Feb 23 14:19:05 2021 +0800 vdpa: introduce virtio pci driver This patch introduce a vDPA driver for virtio-pci device. It bridges the virtio-pci control command to the vDPA bus. This will be used for features prototyping and testing. Note that get/restore virtqueue state is not supported which needs extension on the virtio specification. Signed-off-by: Jason Wang Link: https://lore.kernel.org/r/20210223061905.422659-4-jasowang@redhat.com Signed-off-by: Michael S. Tsirkin commit 266fd994b2b0ab7ba3e5541868838ce30775964b Author: Sami Loone Date: Sat May 1 12:07:53 2021 +0200 ALSA: hda/realtek: ALC285 Thinkpad jack pin quirk is unreachable In 9bbb94e57df1 ("ALSA: hda/realtek: fix static noise on ALC285 Lenovo laptops") an existing Lenovo quirk was made more generic by removing a 0x12 pin requirement from the entry. This made the second chance table Thinkpad jack entry unreachable as the pin configurations became identical. Revert the 0x12 pin requirement removal and move Thinkpad jack pin quirk back to the primary pin table as they can co-exist when more specific configurations come first. Add a more targeted pin quirk for Lenovo devices that have 0x12 as 0x40000000. Tested on Yoga 6 (AMD) laptop. [ Corrected the commit ID -- tiwai ] Fixes: 9bbb94e57df1 ("ALSA: hda/realtek: fix static noise on ALC285 Lenovo laptops") Signed-off-by: Sami Loone Cc: Link: https://lore.kernel.org/r/YI0oefvTYn8URYDb@yoga Signed-off-by: Takashi Iwai commit a712b307cfde6dbe0d4829293afb1566beb30a9a Author: Rob Clark Date: Fri Apr 30 10:17:39 2021 -0700 drm/msm/dpu: Delete bonkers code dpu_crtc_atomic_flush() was directly poking it's attached planes in a code path that ended up in dpu_plane_atomic_update(), even if the plane was not involved in the current atomic update. While a bit dubious, this worked before because plane->state would always point to something valid. But now using drm_atomic_get_new_plane_state() we could get a NULL state pointer instead, leading to: [ 20.873273] Call trace: [ 20.875740] dpu_plane_atomic_update+0x5c/0xed0 [ 20.880311] dpu_plane_restore+0x40/0x88 [ 20.884266] dpu_crtc_atomic_flush+0xf4/0x208 [ 20.888660] drm_atomic_helper_commit_planes+0x150/0x238 [ 20.894014] msm_atomic_commit_tail+0x1d4/0x7a0 [ 20.898579] commit_tail+0xa4/0x168 [ 20.902102] drm_atomic_helper_commit+0x164/0x178 [ 20.906841] drm_atomic_commit+0x54/0x60 [ 20.910798] drm_atomic_connector_commit_dpms+0x10c/0x118 [ 20.916236] drm_mode_obj_set_property_ioctl+0x1e4/0x440 [ 20.921588] drm_connector_property_set_ioctl+0x60/0x88 [ 20.926852] drm_ioctl_kernel+0xd0/0x120 [ 20.930807] drm_ioctl+0x21c/0x478 [ 20.934235] __arm64_sys_ioctl+0xa8/0xe0 [ 20.938193] invoke_syscall+0x64/0x130 [ 20.941977] el0_svc_common.constprop.3+0x5c/0xe0 [ 20.946716] do_el0_svc+0x80/0xa0 [ 20.950058] el0_svc+0x20/0x30 [ 20.953145] el0_sync_handler+0x88/0xb0 [ 20.957014] el0_sync+0x13c/0x140 The reason for the codepath seems dubious, the atomic suspend/resume heplers should handle the power-collapse case. If not, the CRTC's atomic_check() should be adding the planes to the atomic update. Reported-by: Stephen Boyd Reported-by: John Stultz Fixes: 37418bf14c13 ("drm: Use state helper instead of the plane state pointer") Tested-by: John Stultz Signed-off-by: Rob Clark Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210430171744.1721408-1-robdclark@gmail.com commit 35ffbb60bdad652d461aa8e97fa094faa9eb46ec Author: Hannes Reinecke Date: Thu Apr 29 14:25:16 2021 +0200 scsi: fnic: Use scsi_host_busy_iter() to traverse commands Use scsi_host_busy_iter() to traverse commands instead of hand-crafted routines walking the command list. Link: https://lore.kernel.org/r/20210429122517.39659-3-hare@suse.de Reviewed-by: Ming Lei Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit 3ba1eeff00c42ccb31c0089c8c95c3ade546e9b0 Author: Hannes Reinecke Date: Thu Apr 29 14:25:15 2021 +0200 scsi: fnic: Kill 'exclude_id' argument to fnic_cleanup_io() 'exclude_id' is always SCSI_NO_TAG which will never be reached when traversing the list of tags. Link: https://lore.kernel.org/r/20210429122517.39659-2-hare@suse.de Reviewed-by: Ming Lei Signed-off-by: Hannes Reinecke Signed-off-by: Martin K. Petersen commit fc09acb7de31badb2ea9e85d21e071be1a5736e4 Author: Douglas Gilbert Date: Wed Apr 14 21:50:31 2021 -0400 scsi: scsi_debug: Fix cmd_per_lun, set to max_queue Make sure that the cmd_per_lun value placed in the host template never exceeds the can_queue value. If the max_queue driver parameter is not specified then both cmd_per_lun and can_queue are set to CAN_QUEUE. CAN_QUEUE is a compile time constant and is used to dimension an array to hold queued requests. If the max_queue driver parameter is given it is must be less than or equal to CAN_QUEUE and if so, the host template values are adjusted. Remove undocumented code that allowed queue_depth to exceed CAN_QUEUE and cause stack full type errors. There is a documented way to do that with every_nth and echo 0x8000 > /sys/bus/pseudo/drivers/scsi_debug/opts See: https://sg.danny.cz/sg/scsi_debug.html Tweak some formatting, and add a suggestion to the "trim poll_queues" warning. Link: https://lore.kernel.org/r/20210415015031.607153-1-dgilbert@interlog.com Reported-by: Kashyap Desai Reviewed-by: John Garry Signed-off-by: Douglas Gilbert Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 9ccce092fc64d19504fa54de4fd659e279cc92e7 Merge: 27787ba3fa490 211f9f2e0503e Author: Linus Torvalds Date: Sun May 2 14:13:46 2021 -0700 Merge tag 'for-linus-5.13-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux Pull orangefs updates from Mike Marshall: "orangefs: implement orangefs_readahead mm/readahead.c/read_pages was quite a bit different back when I put my open-coded readahead logic into orangefs_readpage. That logic seemed to work as designed back then, it is a trainwreck now. This implements orangefs_readahead using the new xarray and readahead_expand features and removes all my open-coded readahead logic. This results in an extreme read performance improvement, these sample numbers are from my test VM: Here's an example of what's upstream in 5.11.8-200.fc33.x86_64: 30+0 records in 30+0 records out 125829120 bytes (126 MB, 120 MiB) copied, 5.77943 s, 21.8 MB/s And here's this version of orangefs_readahead on top of 5.12.0-rc4: 30+0 records in 30+0 records out 125829120 bytes (126 MB, 120 MiB) copied, 0.325919 s, 386 MB/s There are four xfstest regressions with this patch. David Howells and Matthew Wilcox have been helping me work with this code" * tag 'for-linus-5.13-ofs-1' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux: orangefs: leave files in the page cache for a few micro seconds at least Orangef: implement orangefs_readahead. commit 27787ba3fa4904422b3928b898d1bd3d74d98bea Merge: b28866f4bb770 80e5d1ff5d5f1 Author: Linus Torvalds Date: Sun May 2 09:14:01 2021 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: "Assorted stuff all over the place" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: useful constants: struct qstr for ".." hostfs_open(): don't open-code file_dentry() whack-a-mole: kill strlen_user() (again) autofs: should_expire() argument is guaranteed to be positive apparmor:match_mn() - constify devpath argument buffer: a small optimization in grow_buffers get rid of autofs_getpath() constify dentry argument of dentry_path()/dentry_path_raw() commit b28866f4bb77095c262dfd5783197b691c624fa6 Merge: 17ae69aba89db 9d786beb6fe5c Author: Linus Torvalds Date: Sun May 2 09:05:54 2021 -0700 Merge branch 'work.ecryptfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull exryptfs updates from Al Viro: "The interesting part here is (ecryptfs) lock_parent() fixes - its treatment of ->d_parent had been very wrong. The rest is trivial cleanups" * 'work.ecryptfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: ecryptfs: ecryptfs_dentry_info->crypt_stat is never used ecryptfs: get rid of unused accessors ecryptfs: saner API for lock_parent() ecryptfs: get rid of pointless dget/dput in ->symlink() and ->link() commit 562d1e207d322e6346e8db91bbd11d94f16427d2 Author: Christoph Hellwig Date: Fri Mar 26 07:13:11 2021 +0100 powerpc/powernv: remove the nvlink support This code was only used by the vfio-nvlink2 code, which itself had no proper use. Drop this huge chunk of code build into every powernv or generic build. Signed-off-by: Christoph Hellwig Acked-by: Greg Kroah-Hartman Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210326061311.1497642-3-hch@lst.de commit 17ae69aba89dbfa2139b7f8024b757ab3cc42f59 Merge: e6f0bf09f0669 3532b0b4352ce Author: Linus Torvalds Date: Sat May 1 18:50:44 2021 -0700 Merge tag 'landlock_v34' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull Landlock LSM from James Morris: "Add Landlock, a new LSM from Mickaël Salaün. Briefly, Landlock provides for unprivileged application sandboxing. From Mickaël's cover letter: "The goal of Landlock is to enable to restrict ambient rights (e.g. global filesystem access) for a set of processes. Because Landlock is a stackable LSM [1], it makes possible to create safe security sandboxes as new security layers in addition to the existing system-wide access-controls. This kind of sandbox is expected to help mitigate the security impact of bugs or unexpected/malicious behaviors in user-space applications. Landlock empowers any process, including unprivileged ones, to securely restrict themselves. Landlock is inspired by seccomp-bpf but instead of filtering syscalls and their raw arguments, a Landlock rule can restrict the use of kernel objects like file hierarchies, according to the kernel semantic. Landlock also takes inspiration from other OS sandbox mechanisms: XNU Sandbox, FreeBSD Capsicum or OpenBSD Pledge/Unveil. In this current form, Landlock misses some access-control features. This enables to minimize this patch series and ease review. This series still addresses multiple use cases, especially with the combined use of seccomp-bpf: applications with built-in sandboxing, init systems, security sandbox tools and security-oriented APIs [2]" The cover letter and v34 posting is here: https://lore.kernel.org/linux-security-module/20210422154123.13086-1-mic@digikod.net/ See also: https://landlock.io/ This code has had extensive design discussion and review over several years" Link: https://lore.kernel.org/lkml/50db058a-7dde-441b-a7f9-f6837fe8b69f@schaufler-ca.com/ [1] Link: https://lore.kernel.org/lkml/f646e1c7-33cf-333f-070c-0a40ad0468cd@digikod.net/ [2] * tag 'landlock_v34' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: landlock: Enable user space to infer supported features landlock: Add user and kernel documentation samples/landlock: Add a sandbox manager example selftests/landlock: Add user space tests landlock: Add syscall implementations arch: Wire up Landlock syscalls fs,security: Add sb_delete hook landlock: Support filesystem access-control LSM: Infrastructure management of the superblock landlock: Add ptrace restrictions landlock: Set up the security framework and manage credentials landlock: Add ruleset and domain management landlock: Add object management commit 9e895cd9649abe4392c59d14e31b0f5667d082d2 Author: Chuck Lever Date: Sat May 1 15:38:02 2021 -0400 xprtrdma: Fix a NULL dereference in frwr_unmap_sync() The normal mechanism that invalidates and unmaps MRs is frwr_unmap_async(). frwr_unmap_sync() is used only when an RPC Reply bearing Write or Reply chunks has been lost (ie, almost never). Coverity found that after commit 9a301cafc861 ("xprtrdma: Move fr_linv_done field to struct rpcrdma_mr"), the while() loop in frwr_unmap_sync() exits only once @mr is NULL, unconditionally causing subsequent dereferences of @mr to Oops. I've tested this fix by creating a client that skips invoking frwr_unmap_async() when RPC Replies complete. That forces all invalidation tasks to fall upon frwr_unmap_sync(). Simple workloads with this fix applied to the adulterated client work as designed. Reported-by: coverity-bot Addresses-Coverity-ID: 1504556 ("Null pointer dereferences") Fixes: 9a301cafc861 ("xprtrdma: Move fr_linv_done field to struct rpcrdma_mr") Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit f8f7e0fb22b2e75be55f2f0c13e229e75b0eac07 Author: Baptiste Lepers Date: Sat May 1 14:10:51 2021 +1000 sunrpc: Fix misplaced barrier in call_decode Fix a misplaced barrier in call_decode. The struct rpc_rqst is modified as follows by xprt_complete_rqst: req->rq_private_buf.len = copied; /* Ensure all writes are done before we update */ /* req->rq_reply_bytes_recvd */ smp_wmb(); req->rq_reply_bytes_recvd = copied; And currently read as follows by call_decode: smp_rmb(); // misplaced if (!req->rq_reply_bytes_recvd) goto out; req->rq_rcv_buf.len = req->rq_private_buf.len; This patch places the smp_rmb after the if to ensure that rq_reply_bytes_recvd and rq_private_buf.len are read in order. Fixes: 9ba828861c56a ("SUNRPC: Don't try to parse incomplete RPC messages") Signed-off-by: Baptiste Lepers Signed-off-by: Trond Myklebust commit e6f0bf09f0669b3c2cd77fa906830123279a0a21 Merge: 10a3efd0fee5e 781a573948994 Author: Linus Torvalds Date: Sat May 1 15:32:18 2021 -0700 Merge tag 'integrity-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity Pull IMA updates from Mimi Zohar: "In addition to loading the kernel module signing key onto the builtin keyring, load it onto the IMA keyring as well. Also six trivial changes and bug fixes" * tag 'integrity-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity: ima: ensure IMA_APPRAISE_MODSIG has necessary dependencies ima: Fix fall-through warnings for Clang integrity: Add declarations to init_once void arguments. ima: Fix function name error in comment. ima: enable loading of build time generated key on .ima keyring ima: enable signing of modules with build time generated key keys: cleanup build time module signing keys ima: Fix the error code for restoring the PCR value ima: without an IMA policy loaded, return quickly commit 10a3efd0fee5e881b1866cf45950808575cb0f24 Merge: 22650f1481265 c6e3bf437184d Author: Linus Torvalds Date: Sat May 1 12:22:38 2021 -0700 Merge tag 'perf-tools-for-v5.13-2021-04-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Pull perf tool updates from Arnaldo Carvalho de Melo: "perf stat: - Add support for hybrid PMUs to support systems such as Intel Alderlake and its BIG/little core/atom cpus. - Introduce 'bperf' to share hardware PMCs with BPF. - New --iostat option to collect and present IO stats on Intel hardware. This functionality is based on recently introduced sysfs attributes for Intel® Xeon® Scalable processor family (code name Skylake-SP) in commit bb42b3d39781 ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping") It is intended to provide four I/O performance metrics in MB per each PCIe root port: - Inbound Read: I/O devices below root port read from the host memory - Inbound Write: I/O devices below root port write to the host memory - Outbound Read: CPU reads from I/O devices below root port - Outbound Write: CPU writes to I/O devices below root port - Align CSV output for summary. - Clarify --null use cases: Assess raw overhead of 'perf stat' or measure just wall clock time. - Improve readability of shadow stats. perf record: - Change the COMM when starting tha workload so that --exclude-perf doesn't seem to be not honoured. - Improve 'Workload failed' message printing events + what was exec'ed. - Fix cross-arch support for TIME_CONV. perf report: - Add option to disable raw event ordering. - Dump the contents of PERF_RECORD_TIME_CONV in 'perf report -D'. - Improvements to --stat output, that shows information about PERF_RECORD_ events. - Preserve identifier id in OCaml demangler. perf annotate: - Show full source location with 'l' hotkey in the 'perf annotate' TUI. - Add line number like in TUI and source location at EOL to the 'perf annotate' --stdio mode. - Add --demangle and --demangle-kernel to 'perf annotate'. - Allow configuring annotate.demangle{,_kernel} in 'perf config'. - Fix sample events lost in stdio mode. perf data: - Allow converting a perf.data file to JSON. libperf: - Add support for user space counter access. - Update topdown documentation to permit rdpmc calls. perf test: - Add 'perf test' for 'perf stat' CSV output. - Add 'perf test' entries to test the hybrid PMU support. - Cleanup 'perf test daemon' if its 'perf test' is interrupted. - Handle metric reuse in pmu-events parsing 'perf test' entry. - Add test for PE executable support. - Add timeout for wait for daemon start in its 'perf test' entries. Build: - Enable libtraceevent dynamic linking. - Improve feature detection output. - Fix caching of feature checks caching. - First round of updates for tools copies of kernel headers. - Enable warnings when compiling BPF programs. Vendor specific events: - Intel: - Add missing skylake & icelake model numbers. - arm64: - Add Hisi hip08 L1, L2 and L3 metrics. - Add Fujitsu A64FX PMU events. - PowerPC: - Initial JSON/events list for power10 platform. - Remove unsupported power9 metrics. - AMD: - Add Zen3 events. - Fix broken L2 Cache Hits from L2 HWPF metric. - Use lowercases for all the eventcodes and umasks. Hardware tracing: - arm64: - Update CoreSight ETM metadata format. - Fix bitmap for CS-ETM option. - Support PID tracing in config. - Detect pid in VMID for kernel running at EL2. Arch specific updates: - MIPS: - Support MIPS unwinding and dwarf-regs. - Generate mips syscalls_n64.c syscall table. - PowerPC: - Add support for PERF_SAMPLE_WEIGH_STRUCT on PowerPC. - Support pipeline stage cycles for powerpc. libbeauty: - Fix fsconfig generator" * tag 'perf-tools-for-v5.13-2021-04-29' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (132 commits) perf build: Defer printing detected features to the end of all feature checks tools build: Allow deferring printing the results of feature detection perf build: Regenerate the FEATURE_DUMP file after extra feature checks perf session: Dump PERF_RECORD_TIME_CONV event perf session: Add swap operation for event TIME_CONV perf jit: Let convert_timestamp() to be backwards-compatible perf tools: Change fields type in perf_record_time_conv perf tools: Enable libtraceevent dynamic linking perf Documentation: Document intel-hybrid support perf tests: Skip 'perf stat metrics (shadow stat) test' for hybrid perf tests: Support 'Convert perf time to TSC' test for hybrid perf tests: Support 'Session topology' test for hybrid perf tests: Support 'Parse and process metrics' test for hybrid perf tests: Support 'Track with sched_switch' test for hybrid perf tests: Skip 'Setup struct perf_event_attr' test for hybrid perf tests: Add hybrid cases for 'Roundtrip evsel->name' test perf tests: Add hybrid cases for 'Parse event definition strings' test perf record: Uniquify hybrid event name perf stat: Warn group events from different hybrid PMU perf stat: Filter out unmatched aggregation for hybrid event ... commit 22650f148126571be1098d34160eb4931fc77241 Author: David Howells Date: Fri Apr 30 13:47:08 2021 +0100 afs: Fix speculative status fetches The generic/464 xfstest causes kAFS to emit occasional warnings of the form: kAFS: vnode modified {100055:8a} 30->31 YFS.StoreData64 (c=6015) This indicates that the data version received back from the server did not match the expected value (the DV should be incremented monotonically for each individual modification op committed to a vnode). What is happening is that a lookup call is doing a bulk status fetch speculatively on a bunch of vnodes in a directory besides getting the status of the vnode it's actually interested in. This is racing with a StoreData operation (though it could also occur with, say, a MakeDir op). On the client, a modification operation locks the vnode, but the bulk status fetch only locks the parent directory, so no ordering is imposed there (thereby avoiding an avenue to deadlock). On the server, the StoreData op handler doesn't lock the vnode until it's received all the request data, and downgrades the lock after committing the data until it has finished sending change notifications to other clients - which allows the status fetch to occur before it has finished. This means that: - a status fetch can access the target vnode either side of the exclusive section of the modification - the status fetch could start before the modification, yet finish after, and vice-versa. - the status fetch and the modification RPCs can complete in either order. - the status fetch can return either the before or the after DV from the modification. - the status fetch might regress the locally cached DV. Some of these are handled by the previous fix[1], but that's not sufficient because it checks the DV it received against the DV it cached at the start of the op, but the DV might've been updated in the meantime by a locally generated modification op. Fix this by the following means: (1) Keep track of when we're performing a modification operation on a vnode. This is done by marking vnode parameters with a 'modification' note that causes the AFS_VNODE_MODIFYING flag to be set on the vnode for the duration. (2) Alter the speculation race detection to ignore speculative status fetches if either the vnode is marked as being modified or the data version number is not what we expected. Note that whilst the "vnode modified" warning does get recovered from as it causes the client to refetch the status at the next opportunity, it will also invalidate the pagecache, so changes might get lost. Fixes: a9e5c87ca744 ("afs: Fix speculative status fetch going out of order wrt to modifications") Reported-by: Marc Dionne Signed-off-by: David Howells Tested-and-reviewed-by: Marc Dionne cc: linux-afs@lists.infradead.org Link: https://lore.kernel.org/r/160605082531.252452.14708077925602709042.stgit@warthog.procyon.org.uk/ [1] Link: https://lore.kernel.org/linux-fsdevel/161961335926.39335.2552653972195467566.stgit@warthog.procyon.org.uk/ # v1 Signed-off-by: Linus Torvalds commit 7af81cd0c4306482b49a3adce0fb2f8655f57d0f Merge: 152d32aa84683 ca4a4e9a55bee Author: Linus Torvalds Date: Sat May 1 11:34:03 2021 -0700 Merge tag 'for-5.13/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - Improve scalability of DM's device hash by switching to rbtree - Extend DM ioctl's DM_LIST_DEVICES_CMD handling to include UUID and allow filtering based on name or UUID prefix. - Various small fixes for typos, warnings, unused function, or needlessly exported interfaces. - Remove needless request_queue NULL pointer checks in DM thin and cache targets. - Remove unnecessary loop in DM core's __split_and_process_bio(). - Remove DM core's dm_vcalloc() and just use kvcalloc or kvmalloc_array instead (depending whether zeroing is useful). - Fix request-based DM's double free of blk_mq_tag_set in device remove after table load fails. - Improve DM persistent data performance on non-x86 by fixing packed structs to have a stated alignment. Also remove needless extra work from redundant calls to sm_disk_get_nr_free() and a paranoid BUG_ON() that caused duplicate checksum calculation. - Fix missing goto in DM integrity's bitmap_flush_interval error handling. - Add "reset_recalculate" feature flag to DM integrity. - Improve DM integrity by leveraging discard support to avoid needless re-writing of metadata and also use discard support to improve hash recalculation. - Fix race with DM raid target's reshape and MD raid4/5/6 resync that resulted in inconsistant reshape state during table reloads. - Update DM raid target to temove unnecessary discard limits for raid0 and raid10 now that MD has optimized discard handling for both raid levels. * tag 'for-5.13/dm-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: (26 commits) dm raid: remove unnecessary discard limits for raid0 and raid10 dm rq: fix double free of blk_mq_tag_set in dev remove after table load fails dm integrity: use discard support when recalculating dm integrity: increase RECALC_SECTORS to improve recalculate speed dm integrity: don't re-write metadata if discarding same blocks dm raid: fix inconclusive reshape layout on fast raid4/5/6 table reload sequences dm raid: fix fall-through warning in rs_check_takeover() for Clang dm clone metadata: remove unused function dm integrity: fix missing goto in bitmap_flush_interval error handling dm: replace dm_vcalloc() dm space map common: fix division bug in sm_ll_find_free_block() dm persistent data: packed struct should have an aligned() attribute too dm btree spine: remove paranoid node_check call in node_prep_for_write() dm space map disk: remove redundant calls to sm_disk_get_nr_free() dm integrity: add the "reset_recalculate" feature flag dm persistent data: remove unused return from exit_shadow_spine() dm cache: remove needless request_queue NULL pointer checks dm thin: remove needless request_queue NULL pointer check dm: unexport dm_{get,put}_table_device dm ebs: fix a few typos ... commit 152d32aa846835987966fd20ee1143b0e05036a0 Merge: 4f9701057a9cc 3bf0fcd754345 Author: Linus Torvalds Date: Sat May 1 10:14:08 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull kvm updates from Paolo Bonzini: "This is a large update by KVM standards, including AMD PSP (Platform Security Processor, aka "AMD Secure Technology") and ARM CoreSight (debug and trace) changes. ARM: - CoreSight: Add support for ETE and TRBE - Stage-2 isolation for the host kernel when running in protected mode - Guest SVE support when running in nVHE mode - Force W^X hypervisor mappings in nVHE mode - ITS save/restore for guests using direct injection with GICv4.1 - nVHE panics now produce readable backtraces - Guest support for PTP using the ptp_kvm driver - Performance improvements in the S2 fault handler x86: - AMD PSP driver changes - Optimizations and cleanup of nested SVM code - AMD: Support for virtual SPEC_CTRL - Optimizations of the new MMU code: fast invalidation, zap under read lock, enable/disably dirty page logging under read lock - /dev/kvm API for AMD SEV live migration (guest API coming soon) - support SEV virtual machines sharing the same encryption context - support SGX in virtual machines - add a few more statistics - improved directed yield heuristics - Lots and lots of cleanups Generic: - Rework of MMU notifier interface, simplifying and optimizing the architecture-specific code - a handful of "Get rid of oprofile leftovers" patches - Some selftests improvements" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (379 commits) KVM: selftests: Speed up set_memory_region_test selftests: kvm: Fix the check of return value KVM: x86: Take advantage of kvm_arch_dy_has_pending_interrupt() KVM: SVM: Skip SEV cache flush if no ASIDs have been used KVM: SVM: Remove an unnecessary prototype declaration of sev_flush_asids() KVM: SVM: Drop redundant svm_sev_enabled() helper KVM: SVM: Move SEV VMCB tracking allocation to sev.c KVM: SVM: Explicitly check max SEV ASID during sev_hardware_setup() KVM: SVM: Unconditionally invoke sev_hardware_teardown() KVM: SVM: Enable SEV/SEV-ES functionality by default (when supported) KVM: SVM: Condition sev_enabled and sev_es_enabled on CONFIG_KVM_AMD_SEV=y KVM: SVM: Append "_enabled" to module-scoped SEV/SEV-ES control variables KVM: SEV: Mask CPUID[0x8000001F].eax according to supported features KVM: SVM: Move SEV module params/variables to sev.c KVM: SVM: Disable SEV/SEV-ES if NPT is disabled KVM: SVM: Free sev_asid_bitmap during init if SEV setup fails KVM: SVM: Zero out the VMCB array used to track SEV ASID association x86/sev: Drop redundant and potentially misleading 'sev_enabled' KVM: x86: Move reverse CPUID helpers to separate header file KVM: x86: Rename GPR accessors to make mode-aware variants the defaults ... commit 4f9701057a9cc1ae6bfc533204c9d3ba386687de Merge: f34b2cf17825d 2d471b20c55e1 Author: Linus Torvalds Date: Sat May 1 09:33:00 2021 -0700 Merge tag 'iommu-updates-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull iommu updates from Joerg Roedel: - Big cleanup of almost unsused parts of the IOMMU API by Christoph Hellwig. This mostly affects the Freescale PAMU driver. - New IOMMU driver for Unisoc SOCs - ARM SMMU Updates from Will: - Drop vestigial PREFETCH_ADDR support (SMMUv3) - Elide TLB sync logic for empty gather (SMMUv3) - Fix "Service Failure Mode" handling (SMMUv3) - New Qualcomm compatible string (SMMUv2) - Removal of the AMD IOMMU performance counter writeable check on AMD. It caused long boot delays on some machines and is only needed to work around an errata on some older (possibly pre-production) chips. If someone is still hit by this hardware issue anyway the performance counters will just return 0. - Support for targeted invalidations in the AMD IOMMU driver. Before that the driver only invalidated a single 4k page or the whole IO/TLB for an address space. This has been extended now and is mostly useful for emulated AMD IOMMUs. - Several fixes for the Shared Virtual Memory support in the Intel VT-d driver - Mediatek drivers can now be built as modules - Re-introduction of the forcedac boot option which got lost when converting the Intel VT-d driver to the common dma-iommu implementation. - Extension of the IOMMU device registration interface and support iommu_ops to be const again when drivers are built as modules. * tag 'iommu-updates-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (84 commits) iommu: Streamline registration interface iommu: Statically set module owner iommu/mediatek-v1: Add error handle for mtk_iommu_probe iommu/mediatek-v1: Avoid build fail when build as module iommu/mediatek: Always enable the clk on resume iommu/fsl-pamu: Fix uninitialized variable warning iommu/vt-d: Force to flush iotlb before creating superpage iommu/amd: Put newline after closing bracket in warning iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()' iommu/vt-d: Fix build error of pasid_enable_wpe() with !X86 iommu/amd: Remove performance counter pre-initialization test Revert "iommu/amd: Fix performance counter initialization" iommu/amd: Remove duplicate check of devid iommu/exynos: Remove unneeded local variable initialization iommu/amd: Page-specific invalidations for more than one page iommu/arm-smmu-v3: Remove the unused fields for PREFETCH_CONFIG command iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown iommu/vt-d: Invalidate PASID cache when root/context entry changed iommu/vt-d: Remove WO permissions on second-level paging entries iommu/vt-d: Report the right page fault address ... commit f34b2cf17825d69ae1e227871059ab18c2f57817 Merge: 9f67672a817ec 6da7bda36388a Author: Linus Torvalds Date: Sat May 1 09:15:05 2021 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma updates from Jason Gunthorpe: "This is significantly bug fixes and general cleanups. The noteworthy new features are fairly small: - XRC support for HNS and improves RQ operations - Bug fixes and updates for hns, mlx5, bnxt_re, hfi1, i40iw, rxe, siw and qib - Quite a few general cleanups on spelling, error handling, static checker detections, etc - Increase the number of device ports supported beyond 255. High port count software switches now exist - Several bug fixes for rtrs - mlx5 Device Memory support for host controlled atomics - Report SRQ tables through to rdma-tool" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (145 commits) IB/qib: Remove redundant assignment to ret RDMA/nldev: Add copy-on-fork attribute to get sys command RDMA/bnxt_re: Fix a double free in bnxt_qplib_alloc_res RDMA/siw: Fix a use after free in siw_alloc_mr IB/hfi1: Remove redundant variable rcd RDMA/nldev: Add QP numbers to SRQ information RDMA/nldev: Return SRQ information RDMA/restrack: Add support to get resource tracking for SRQ RDMA/nldev: Return context information RDMA/core: Add CM to restrack after successful attachment to a device RDMA/cma: Skip device which doesn't support CM RDMA/rxe: Fix a bug in rxe_fill_ip_info() RDMA/mlx5: Expose private query port RDMA/mlx4: Remove an unused variable RDMA/mlx5: Fix type assignment for ICM DM IB/mlx5: Set right RoCE l3 type and roce version while deleting GID RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails RDMA/cxgb4: add missing qpid increment IB/ipoib: Remove unnecessary struct declaration RDMA/bnxt_re: Get rid of custom module reference counting ... commit f54c7b5898d31eda3d6608da13b55c0466ba49fe Author: Palmer Dabbelt Date: Wed Apr 28 14:45:12 2021 -0700 RISC-V: Always define XIP_FIXUP XIP depends on MMU, but XIP_FIXUP is used throughout the kernel in order to avoid excessive ifdefs. This just makes sure to always define XIP_FIXUP, which will fix MMU=n builds. XIP_OFFSET is used by assembly but XIP_FIXUP is C-only, so they're split. Fixes: 44c922572952 ("RISC-V: enable XIP") Reported-by: Guenter Roeck Signed-off-by: Palmer Dabbelt Tested-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 28252e08649f3aa06cb6b5420e29df7a9d5fe67d Author: Alexandre Ghiti Date: Sun Apr 18 07:28:56 2021 -0400 riscv: Remove 32b kernel mapping from page table dump The 32b kernel mapping lies in the linear mapping, there is no point in printing its address in page table dump, so remove this leftover that comes from moving the kernel mapping outside the linear mapping for 64b kernel. Fixes: e9efb21fe352 ("riscv: Prepare ptdump for vm layout dynamic addresses") Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 883fcb8ecaaffbc46d5ed20f336da61e422021aa Author: Alexandre Ghiti Date: Wed Apr 28 06:02:17 2021 -0400 riscv: Fix 32b kernel build with CONFIG_DEBUG_VIRTUAL=y Declare kernel_virt_addr for 32b kernel since it is used in __phys_addr_symbol defined when CONFIG_DEBUG_VIRTUAL is set. Fixes: 2bfc6cd81bd17 ("riscv: Move kernel mapping outside of linear mapping") Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 533b4f3a789d49574e7ae0f6ececed153f651f97 Author: Anup Patel Date: Thu Apr 15 14:25:22 2021 +0530 RISC-V: Fix error code returned by riscv_hartid_to_cpuid() We should return a negative error code upon failure in riscv_hartid_to_cpuid() instead of NR_CPUS. This is also aligned with all uses of riscv_hartid_to_cpuid() which expect negative error code upon failure. Fixes: 6825c7a80f18 ("RISC-V: Add logical CPU indexing for RISC-V") Fixes: f99fb607fb2b ("RISC-V: Use Linux logical CPU number instead of hartid") Signed-off-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 9009b455811b0fa1f6b0adfa94db136984db5a38 Author: Masahiro Yamada Date: Fri Apr 30 11:03:08 2021 +0900 .gitignore: prefix local generated files with a slash The pattern prefixed with '/' matches files in the same directory, but not ones in sub-directories. Signed-off-by: Masahiro Yamada Acked-by: Miguel Ojeda Acked-by: Rob Herring Acked-by: Andra Paraschiv Acked-by: Greg Kroah-Hartman Acked-by: Gabriel Krisman Bertazi commit 77a88274dc1a2cf3a775161d9a3242bc798ee680 Author: Masahiro Yamada Date: Fri Apr 30 10:56:27 2021 +0900 kbuild: replace LANG=C with LC_ALL=C LANG gives a weak default to each LC_* in case it is not explicitly defined. LC_ALL, if set, overrides all other LC_* variables. LANG < LC_CTYPE, LC_COLLATE, LC_MONETARY, LC_NUMERIC, ... < LC_ALL This is why documentation such as [1] suggests to set LC_ALL in build scripts to get the deterministic result. LANG=C is not strong enough to override LC_* that may be set by end users. [1]: https://reproducible-builds.org/docs/locales/ Signed-off-by: Masahiro Yamada Acked-by: Michael Ellerman (powerpc) Reviewed-by: Matthias Maennich Acked-by: Matthieu Baerts (mptcp) Reviewed-by: Greg Kroah-Hartman commit 885480b084696331bea61a4f7eba10652999a9c1 Author: Nathan Chancellor Date: Wed Apr 28 18:23:50 2021 -0700 Makefile: Move -Wno-unused-but-set-variable out of GCC only block Currently, -Wunused-but-set-variable is only supported by GCC so it is disabled unconditionally in a GCC only block (it is enabled with W=1). clang currently has its implementation for this warning in review so preemptively move this statement out of the GCC only block and wrap it with cc-disable-warning so that both compilers function the same. Cc: stable@vger.kernel.org Link: https://reviews.llvm.org/D100581 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Masahiro Yamada commit 1476fee5c53e24e06cfc436110cdefbc1868e8c1 Author: Masahiro Yamada Date: Sun Apr 25 16:07:12 2021 +0900 kbuild: add a script to remove stale generated files We maintain .gitignore and Makefiles so build artifacts are properly ignored by Git, and cleaned up by 'make clean'. However, the code is always changing; generated files are often moved to another directory, or removed when they become unnecessary. Such garbage files tend to be left over in the source tree because people usually git-pull without cleaning the tree. This is not only the noise for 'git status', but also a build issue in some cases. One solution is to remove a stale file like commit 223c24a7dba9 ("kbuild: Automatically remove stale file") did. Such workaround should be removed after a while, but we forget about that if we scatter the workaround code in random places. So, this commit adds a new script to collect cleanings of stale files. As a start point, move the code in arch/arm/boot/compressed/Makefile into this script. Signed-off-by: Masahiro Yamada commit 46b41d5dd8019b264717978c39c43313a524d033 Author: Masahiro Yamada Date: Sun Apr 25 15:24:07 2021 +0900 kbuild: update config_data.gz only when the content of .config is changed If the timestamp of the .config file is updated, config_data.gz is regenerated, then vmlinux is re-linked. This occurs even if the content of the .config has not changed at all. This issue was mitigated by commit 67424f61f813 ("kconfig: do not write .config if the content is the same"); Kconfig does not update the .config when it ends up with the identical configuration. The issue is remaining when the .config is created by *_defconfig with some config fragment(s) applied on top. This is typical for powerpc and mips, where several *_defconfig targets are constructed by using merge_config.sh. One workaround is to have the copy of the .config. The filechk rule updates the copy, kernel/config_data, by checking the content instead of the timestamp. With this commit, the second run with the same configuration avoids the needless rebuilds. $ make ARCH=mips defconfig all [ snip ] $ make ARCH=mips defconfig all *** Default configuration is based on target '32r2el_defconfig' Using ./arch/mips/configs/generic_defconfig as base Merging arch/mips/configs/generic/32r2.config Merging arch/mips/configs/generic/el.config Merging ./arch/mips/configs/generic/board-boston.config Merging ./arch/mips/configs/generic/board-ni169445.config Merging ./arch/mips/configs/generic/board-ocelot.config Merging ./arch/mips/configs/generic/board-ranchu.config Merging ./arch/mips/configs/generic/board-sead-3.config Merging ./arch/mips/configs/generic/board-xilfpga.config # # configuration written to .config # SYNC include/config/auto.conf CALL scripts/checksyscalls.sh CALL scripts/atomic/check-atomics.sh CHK include/generated/compile.h CHK include/generated/autoksyms.h Reported-by: Elliot Berman Signed-off-by: Masahiro Yamada commit 40cb020305f40bafc2a13c7e879a33dbbd607507 Author: Masahiro Yamada Date: Sun Apr 25 15:24:05 2021 +0900 .gitignore: ignore only top-level modules.builtin modules.builtin used to be created in every directory. Since commit 8b41fc4454e3 ("kbuild: create modules.builtin without Makefile.modbuiltin or tristate.conf"), modules.builtin is created only in the top directory. Add the '/' prefix so that it matches to only the modules.builtin located in the top directory. It has been more than one year since that change. I hope this will not flood 'Untracked files' of 'git status'. Signed-off-by: Masahiro Yamada commit 819cb9fc80733e346f3f913293c0a70e00a61d33 Author: Masahiro Yamada Date: Sun Apr 25 15:24:04 2021 +0900 .gitignore: move tags and TAGS close to other tag files For consistency, move tags and TAGS close to the cscope and GNU Global patterns. I removed the '/' prefix in case somebody wants to manually create tag files in sub-directories. Signed-off-by: Masahiro Yamada commit 1fca37660326b3c7a310e35768cf554425dd7f64 Author: Masahiro Yamada Date: Sun Apr 25 15:24:03 2021 +0900 kernel/.gitgnore: remove stale timeconst.h and hz.bc timeconst.h and hz.bc used to exist in kernel/. Commit 5cee96459726 ("time/timers: Move all time(r) related files into kernel/time") moved them to kernel/time/. Commit 0a227985d4a9 ("time: Move timeconst.h into include/generated") moved timeconst.h to include/generated/ and removed hz.bc . Signed-off-by: Masahiro Yamada commit 5134e94ac4f5e58d73f39fde8ee6735b47f5c63d Author: Masahiro Yamada Date: Sun Apr 25 04:47:19 2021 +0900 usr/include: refactor .gitignore The current .gitignore intends to ignore everything under usr/include/ except .gitignore and Makefile. A cleaner solution is to use a pattern suffixed with '/', which matches only directories. It works well here because all the exported headers are located in sub-directories, like , . Signed-off-by: Masahiro Yamada commit 382243f346416f5ed14cc2517d8a3947bf25d628 Author: Masahiro Yamada Date: Sat Apr 24 21:08:29 2021 +0900 genksyms: fix stale comment (shipped source) is a stale comment. Since commit 833e62245943 ("genksyms: generate lexer and parser during build instead of shipping"), there is no source file to be shipped in this directory. Signed-off-by: Masahiro Yamada commit 3787b7da5d3e2c849fe8ffed987922a4e6dd6cfd Author: Masahiro Yamada Date: Sat Apr 24 20:55:53 2021 +0900 kbuild: add comment about why cmd_shipped uses 'cat' cmd_shipped uses 'cat' instead of 'cp' for copying a file. The reason is explained in the commit [1], but it was in the pre-git era. $ touch a $ chmod -w a $ cp a b $ cp a b cp: cannot create regular file 'b': Permission denied Add comments so that you can see the reason without looking into the history. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=a70dba8086160449cc94c5bdaff78419b6b8e3c8 Signed-off-by: Masahiro Yamada commit c5849b7c206bf36b8ce7079d4777e0a59305ccce Author: Masahiro Yamada Date: Mon Mar 1 23:51:02 2021 +0900 sparc: syscalls: switch to generic syscallshdr.sh Many architectures duplicate similar shell scripts. This commit converts sparc to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada commit 5ad4e94b46a618f333a6b1a34ee391c8a6bb40b2 Author: Masahiro Yamada Date: Mon Mar 1 23:51:01 2021 +0900 sparc: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts sparc to use scripts/syscalltbl.sh. This also unifies syscall_table_64.h and syscall_table_c32.h. Signed-off-by: Masahiro Yamada commit eb6111495ca94a8c9fa7ca043bd5d5cff9a661f4 Author: Masahiro Yamada Date: Mon Mar 1 23:49:45 2021 +0900 sh: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts sh to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada commit 9c19722c5e1c623f2d7939bdeb74427e9a73c5d5 Author: Masahiro Yamada Date: Mon Mar 1 23:49:44 2021 +0900 sh: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts sh to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada commit 9f67672a817ec046f7554a885f0fe0d60e1bf99f Merge: 6bab076a3d2ff 6c0912739699d Author: Linus Torvalds Date: Fri Apr 30 15:35:30 2021 -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: "New features for ext4 this cycle include support for encrypted casefold, ensure that deleted file names are cleared in directory blocks by zeroing directory entries when they are unlinked or moved as part of a hash tree node split. We also improve the block allocator's performance on a freshly mounted file system by prefetching block bitmaps. There are also the usual cleanups and bug fixes, including fixing a page cache invalidation race when there is mixed buffered and direct I/O and the block size is less than page size, and allow the dax flag to be set and cleared on inline directories" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (32 commits) ext4: wipe ext4_dir_entry2 upon file deletion ext4: Fix occasional generic/418 failure fs: fix reporting supported extra file attributes for statx() ext4: allow the dax flag to be set and cleared on inline directories ext4: fix debug format string warning ext4: fix trailing whitespace ext4: fix various seppling typos ext4: fix error return code in ext4_fc_perform_commit() ext4: annotate data race in jbd2_journal_dirty_metadata() ext4: annotate data race in start_this_handle() ext4: fix ext4_error_err save negative errno into superblock ext4: fix error code in ext4_commit_super ext4: always panic when errors=panic is specified ext4: delete redundant uptodate check for buffer ext4: do not set SB_ACTIVE in ext4_orphan_cleanup() ext4: make prefetch_block_bitmaps default ext4: add proc files to monitor new structures ext4: improve cr 0 / cr 1 group scanning ext4: add MB_NUM_ORDERS macro ext4: add mballoc stats proc file ... commit 6bab076a3d2ff4298483c1a3b77162811b451863 Merge: 9ec1efbf9ded6 2fd8db2dd05d8 Author: Linus Torvalds Date: Fri Apr 30 15:28:25 2021 -0700 Merge tag 'dlm-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm Pull dlm updates from David Teigland: "This includes more dlm networking cleanups and improvements for making dlm shutdowns more robust" * tag 'dlm-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: fs: dlm: fix missing unlock on error in accept_from_sock() fs: dlm: add shutdown hook fs: dlm: flush swork on shutdown fs: dlm: remove unaligned memory access handling fs: dlm: check on minimum msglen size fs: dlm: simplify writequeue handling fs: dlm: use GFP_ZERO for page buffer fs: dlm: change allocation limits fs: dlm: add check if dlm is currently running fs: dlm: add errno handling to check callback fs: dlm: set subclass for othercon sock_mutex fs: dlm: set connected bit after accept fs: dlm: fix mark setting deadlock fs: dlm: fix debugfs dump commit 9ec1efbf9ded6cf38fd910c6fe943972d970f384 Merge: d652502ef4689 3c9c14338c12f Author: Linus Torvalds Date: Fri Apr 30 15:23:16 2021 -0700 Merge tag 'fuse-update-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse updates from Miklos Szeredi: - Fix a page locking bug in write (introduced in 2.6.26) - Allow sgid bit to be killed in setacl() - Miscellaneous fixes and cleanups * tag 'fuse-update-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: cuse: simplify refcount cuse: prevent clone virtiofs: fix userns virtiofs: remove useless function virtiofs: split requests that exceed virtqueue size virtiofs: fix memory leak in virtio_fs_probe() fuse: invalidate attrs when page writeback completes fuse: add a flag FUSE_SETXATTR_ACL_KILL_SGID to kill SGID fuse: extend FUSE_SETXATTR request fuse: fix matching of FUSE_DEV_IOC_CLONE command fuse: fix a typo fuse: don't zero pages twice fuse: fix typo for fuse_conn.max_pages comment fuse: fix write deadlock commit f18c51b6513c6bd39c834855e3ccaec52c150c84 Author: Wan Jiabing Date: Fri Apr 30 11:10:47 2021 +0800 net: stmmac: Remove duplicate declaration of stmmac_priv In commit f4da56529da60 ("net: stmmac: Add support for external trigger timestamping"), struct stmmac_priv was declared at line 507 which caused duplicate struct declarations. Remove later duplicate declaration here. Signed-off-by: Wan Jiabing Reviewed-by: Wong Vee Khee Signed-off-by: David S. Miller commit 8385b1f0ad0d86b99476de654623effdcb6ac2a2 Author: Maxim Kochetkov Date: Fri Apr 30 07:57:33 2021 +0300 net: phy: marvell: enable downshift by default A number of PHYs support the PHY tunable to set and get downshift. However, only 88E1116R enables downshift by default. Extend this default enabled to all the PHYs that support the downshift tunable. Signed-off-by: Maxim Kochetkov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d652502ef46895820533aada50ddfd94abe078fe Merge: d42f323a7df0b 5e717c6fa41ff Author: Linus Torvalds Date: Fri Apr 30 15:17:08 2021 -0700 Merge tag 'ovl-update-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs update from Miklos Szeredi: - Fix a regression introduced in 5.2 that resulted in valid overlayfs mounts being rejected with ELOOP (Too many levels of symbolic links) - Fix bugs found by various tools - Miscellaneous improvements and cleanups * tag 'ovl-update-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: add debug print to ovl_do_getxattr() ovl: invalidate readdir cache on changes to dir with origin ovl: allow upperdir inside lowerdir ovl: show "userxattr" in the mount data ovl: trivial typo fixes in the file inode.c ovl: fix misspellings using codespell tool ovl: do not copy attr several times ovl: remove ovl_map_dev_ino() return value ovl: fix error for ovl_fill_super() ovl: fix missing revert_creds() on error path ovl: fix leaked dentry ovl: restrict lower null uuid for "xino=auto" ovl: check that upperdir path is not on a read-only mount ovl: plumb through flush method commit c5fab809bf299d352e35808023e5c02f99d18b06 Merge: c5197b4ec932f 51eac7f2f06b5 Author: David S. Miller Date: Fri Apr 30 15:06:34 2021 -0700 Merge branch 'sctp-chunk-fix' Xin Long says: ==================== sctp: always send a chunk with the asoc that it belongs to Currently when processing a duplicate COOKIE-ECHO chunk, a new temp asoc would be created, then it creates the chunks with the new asoc. However, later on it uses the old asoc to send these chunks, which has caused quite a few issues. This patchset is to fix this and make sure that the COOKIE-ACK and SHUTDOWN chunks are created with the same asoc that will be used to send them out. v1->v2: - see Patch 3/3. ==================== Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 51eac7f2f06b5f60d22dfb06c48d98a227507b8e Author: Xin Long Date: Sat May 1 04:03:00 2021 +0800 sctp: do asoc update earlier in sctp_sf_do_dupcook_b The same thing should be done for sctp_sf_do_dupcook_b(). Meanwhile, SCTP_CMD_UPDATE_ASSOC cmd can be removed. v1->v2: - Fix the return value in sctp_sf_do_assoc_update(). Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 7e9269a5acec6d841d22e12770a0b02db4f5d8f2 Author: Xin Long Date: Sat May 1 04:02:59 2021 +0800 Revert "sctp: Fix bundling of SHUTDOWN with COOKIE-ACK" This can be reverted as shutdown and cookie_ack chunk are using the same asoc since the last patch. This reverts commit 145cb2f7177d94bc54563ed26027e952ee0ae03c. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 35b4f24415c854cd718ccdf38dbea6297f010aae Author: Xin Long Date: Sat May 1 04:02:58 2021 +0800 sctp: do asoc update earlier in sctp_sf_do_dupcook_a There's a panic that occurs in a few of envs, the call trace is as below: [] general protection fault, ... 0x29acd70f1000a: 0000 [#1] SMP PTI [] RIP: 0010:sctp_ulpevent_notify_peer_addr_change+0x4b/0x1fa [sctp] [] sctp_assoc_control_transport+0x1b9/0x210 [sctp] [] sctp_do_8_2_transport_strike.isra.16+0x15c/0x220 [sctp] [] sctp_cmd_interpreter.isra.21+0x1231/0x1a10 [sctp] [] sctp_do_sm+0xc3/0x2a0 [sctp] [] sctp_generate_timeout_event+0x81/0xf0 [sctp] This is caused by a transport use-after-free issue. When processing a duplicate COOKIE-ECHO chunk in sctp_sf_do_dupcook_a(), both COOKIE-ACK and SHUTDOWN chunks are allocated with the transort from the new asoc. However, later in the sideeffect machine, the old asoc is used to send them out and old asoc's shutdown_last_sent_to is set to the transport that SHUTDOWN chunk attached to in sctp_cmd_setup_t2(), which actually belongs to the new asoc. After the new_asoc is freed and the old asoc T2 timeout, the old asoc's shutdown_last_sent_to that is already freed would be accessed in sctp_sf_t2_timer_expire(). Thanks Alexander and Jere for helping dig into this issue. To fix it, this patch is to do the asoc update first, then allocate the COOKIE-ACK and SHUTDOWN chunks with the 'updated' old asoc. This would make more sense, as a chunk from an asoc shouldn't be sent out with another asoc. We had fixed quite a few issues caused by this. Fixes: 145cb2f7177d ("sctp: Fix bundling of SHUTDOWN with COOKIE-ACK") Reported-by: Alexander Sverdlin Reported-by: syzbot+bbe538efd1046586f587@syzkaller.appspotmail.com Reported-by: Michal Tesar Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit c5197b4ec932f34934944859ca78086bd910edc9 Author: Marc Dionne Date: Fri Apr 30 14:50:09 2021 -0300 afs, rxrpc: Add Marc Dionne as co-maintainer Add Marc Dionne as a co-maintainer for kafs and rxrpc. Signed-off-by: Marc Dionne Signed-off-by: David S. Miller commit a57d3d48366b9068195d01f9ef97844d5ee14f73 Author: Johannes Berg Date: Fri Apr 30 14:11:42 2021 +0200 net: atheros: nic-devel@qualcomm.com is dead Remove it from the MODULE_AUTHOR statements referencing it. Signed-off-by: Johannes Berg Signed-off-by: David S. Miller commit f0a5818b472c574a985cfeb6518a5ba395f26b3c Author: Yang Li Date: Fri Apr 30 17:27:34 2021 +0800 vsock/vmci: Remove redundant assignment to err Variable 'err' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: net/vmw_vsock/vmci_transport.c:948:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: David S. Miller commit 00207c7d12eeb8758f8df161e3d22603fd0099cf Merge: db7c691d7f4da 472497d0bdae8 Author: David S. Miller Date: Fri Apr 30 14:49:34 2021 -0700 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== net: hns3: fixes for -net This series adds some bugfixes for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit 472497d0bdae890a896013332a0b673f9acdf2bf Author: Yufeng Mo Date: Fri Apr 30 17:06:22 2021 +0800 net: hns3: disable phy loopback setting in hclge_mac_start_phy If selftest and reset are performed at the same time, the phy loopback setting may be still in enable state after the reset, and device cannot link up. So fix this issue by disabling phy loopback before phy_start(). Fixes: 256727da7395 ("net: hns3: Add MDIO support to HNS3 Ethernet driver for hip08 SoC") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 8c9200e387721c597baabb319b4bd1cdf1155e35 Author: Yufeng Mo Date: Fri Apr 30 17:06:21 2021 +0800 net: hns3: clear unnecessary reset request in hclge_reset_rebuild HW error and global reset are reported through MSIX interrupts. The same error may be reported to different functions at the same time. When global reset begins, the pending reset request set by this error is unnecessary. So clear the pending reset request after the reset is complete to avoid the repeated reset. Fixes: f6162d44126c ("net: hns3: add handling of hw errors reported through MSIX") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit b416e872be06fdace3c36cf5210130509d0f0e72 Author: Peng Li Date: Fri Apr 30 17:06:20 2021 +0800 net: hns3: use netif_tx_disable to stop the transmit queue Currently, netif_tx_stop_all_queues() is used to ensure that the xmit is not running, but for the concurrent case it will not take effect, since netif_tx_stop_all_queues() just sets a flag without locking to indicate that the xmit queue(s) should not be run. So use netif_tx_disable() to replace netif_tx_stop_all_queues(), it takes the xmit queue lock while marking the queue stopped. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 905416f18fe74bdd4de91bf94ef5a790a36e4b99 Author: Hao Chen Date: Fri Apr 30 17:06:19 2021 +0800 net: hns3: fix for vxlan gpe tx checksum bug When skb->ip_summed is CHECKSUM_PARTIAL, for non-tunnel udp packet, which has a dest port as the IANA assigned, the hardware is expected to do the checksum offload, but the hardware whose version is below V3 will not do the checksum offload when udp dest port is 4790. So fixes it by doing the checksum in software for this case. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Hao Chen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit db7c691d7f4da6af40a6ce63331a5a9fb9511c2a Author: Mohammad Athari Bin Ismail Date: Fri Apr 30 07:01:04 2021 +0800 net: stmmac: cleared __FPE_REMOVING bit in stmmac_fpe_start_wq() An issue found when network interface is down and up again, FPE handshake fails to trigger. This is due to __FPE_REMOVING bit remains being set in stmmac_fpe_stop_wq() but not cleared in stmmac_fpe_start_wq(). This cause FPE workqueue task, stmmac_fpe_lp_task() not able to be executed. To fix this, add clearing __FPE_REMOVING bit in stmmac_fpe_start_wq(). Fixes: 5a5586112b92 ("net: stmmac: support FPE link partner hand-shaking procedure") Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: David S. Miller commit d42f323a7df0b298c07313db00b44b78555ca8e6 Merge: 65ec0a7d24913 4d75136be8bf3 Author: Linus Torvalds Date: Fri Apr 30 14:38:01 2021 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc updates from Andrew Morton: "A few misc subsystems and some of MM. 175 patches. Subsystems affected by this patch series: ia64, kbuild, scripts, sh, ocfs2, kfifo, vfs, kernel/watchdog, and mm (slab-generic, slub, kmemleak, debug, pagecache, msync, gup, memremap, memcg, pagemap, mremap, dma, sparsemem, vmalloc, documentation, kasan, initialization, pagealloc, and memory-failure)" * emailed patches from Andrew Morton : (175 commits) mm/memory-failure: unnecessary amount of unmapping mm/mmzone.h: fix existing kernel-doc comments and link them to core-api mm: page_alloc: ignore init_on_free=1 for debug_pagealloc=1 net: page_pool: use alloc_pages_bulk in refill code path net: page_pool: refactor dma_map into own function page_pool_dma_map SUNRPC: refresh rq_pages using a bulk page allocator SUNRPC: set rq_page_end differently mm/page_alloc: inline __rmqueue_pcplist mm/page_alloc: optimize code layout for __alloc_pages_bulk mm/page_alloc: add an array-based interface to the bulk page allocator mm/page_alloc: add a bulk page allocator mm/page_alloc: rename alloced to allocated mm/page_alloc: duplicate include linux/vmalloc.h mm, page_alloc: avoid page_to_pfn() in move_freepages() mm/Kconfig: remove default DISCONTIGMEM_MANUAL mm: page_alloc: dump migrate-failed pages mm/mempolicy: fix mpol_misplaced kernel-doc mm/mempolicy: rewrite alloc_pages_vma documentation mm/mempolicy: rewrite alloc_pages documentation mm/mempolicy: rename alloc_pages_current to alloc_pages ... commit 65ec0a7d24913b146cd1500d759b8c340319d55e Merge: 592fa9532d4e4 8b242ca700f80 Author: Linus Torvalds Date: Fri Apr 30 13:04:30 2021 -0700 Merge tag 'pinctrl-v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "There is a lot going on! Core changes: - A semantic change to handle pinmux and pinconf in explicit order while up until now we depended on the semantic order in the device tree. The device tree is a functional programming language and does not imply any order, so the right thing is for the pin control core to provide these semantics. - Add a new pinmux-select debugfs file which makes it possible to go in and select functions for a pin manually (iteratively, at the prompt) for debugging purposes. - Fixes to gpio regmap handling for a new pin control driver making use of regmap-gpio. - Use octal permissions on debugfs files. New drivers: - A massive rewrite of the former custom pin control driver for MIPS Broadcom devices to instead use the pin control subsystem. New pin control drivers for BCM6345, BCM6328, BCM6358, BCM6362, BCM6368, BCM63268 and BCM6318 SoC variants are implemented. - Support for PM8350, PM8350B, PM8350C, PMK8350, PMR735A and PMR735B in the Qualcomm PMIC GPIO driver. Also the two GPIOs on PM8008 are supported. - Support for the Rockchip RK3568/RK3566 pin controller. - Support for Ingenic JZ4730, JZ4750, JZ4755, JZ4775 and X2000. - Support for Mediatek MTK8195. - Add a new Xilinx ZynqMP pin control driver. Driver improvements and non-urgent fixes: - Modularization and improvements of the Rockchip drivers. - Some new pins added to the description of new Renesas SoCs. - Clarifications of the GPIO base calculation in the Intel driver. - Fix the function names for the MPP54 and MPP55 pins in the Armada CP110 pin controller. - GPIO wakeup interrupt map for Qualcomm SC7280 and SM8350. - Support for ACPI probing of the Qualcomm SC8180x. - Fix interrupt clear status on rockchip - Fix some missing pins on the Ingenic JZ4770, some semantic fixes for the behaviour of the Ingenic pin controller. Add DMIC pins for JZ4780, X1000, X1500 and X1830. - A slew of janitorial like of_node_put() calls" * tag 'pinctrl-v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (99 commits) pinctrl: Add Xilinx ZynqMP pinctrl driver support firmware: xilinx: Add pinctrl support pinctrl: rockchip: do coding style for mux route struct pinctrl: Add PIN_CONFIG_MODE_PWM to enum pin_config_param pinctrl: Introduce MODE group in enum pin_config_param pinctrl: Keep enum pin_config_param ordered by name dt-bindings: pinctrl: Add binding for ZynqMP pinctrl driver pinctrl: core: Fix kernel doc string for pin_get_name() pinctrl: mediatek: use spin lock in mtk_rmw pinctrl: add drive for I2C related pins on MT8195 pinctrl: add pinctrl driver on mt8195 dt-bindings: pinctrl: mt8195: add pinctrl file and binding document pinctrl: Ingenic: Add pinctrl driver for X2000. pinctrl: Ingenic: Add pinctrl driver for JZ4775. pinctrl: Ingenic: Add pinctrl driver for JZ4755. pinctrl: Ingenic: Add pinctrl driver for JZ4750. pinctrl: Ingenic: Add pinctrl driver for JZ4730. dt-bindings: pinctrl: Add bindings for new Ingenic SoCs. pinctrl: Ingenic: Reformat the code. pinctrl: Ingenic: Add DMIC pins support for Ingenic SoCs. ... commit 592fa9532d4e4a7590ca383fd537eb4d53fa585a Merge: efd8929b9eec1 a80f24945fcfd Author: Linus Torvalds Date: Fri Apr 30 13:01:02 2021 -0700 Merge branch 'i2c/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - new drivers for Silicon Labs CP2615 and the HiSilicon I2C unit - bigger refactoring for the MPC driver - support for full software nodes - no need to work around with only properties anymore - we now have 'devm_i2c_add_adapter', too - sub-system wide fixes for the RPM refcounting problem which often caused a leak when an error was encountered during probe - the rest is usual driver updates and improvements * 'i2c/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (77 commits) i2c: mediatek: Use scl_int_delay_ns to compensate clock-stretching i2c: mediatek: Fix wrong dma sync flag i2c: mediatek: Fix send master code at more than 1MHz i2c: sh7760: fix IRQ error path i2c: i801: Add support for Intel Alder Lake PCH-M i2c: core: Fix spacing error by checkpatch i2c: s3c2410: simplify getting of_device_id match data i2c: nomadik: Fix space errors i2c: iop3xx: Fix coding style issues i2c: amd8111: Fix coding style issues i2c: mpc: Drop duplicate message from devm_platform_ioremap_resource() i2c: mpc: Use device_get_match_data() helper i2c: mpc: Remove CONFIG_PM_SLEEP ifdeffery i2c: mpc: Use devm_clk_get_optional() i2c: mpc: Update license and copyright i2c: mpc: Interrupt driven transfer i2c: sh7760: add IRQ check i2c: rcar: add IRQ check i2c: mlxbf: add IRQ check i2c: jz4780: add IRQ check ... commit efd8929b9eec1cde120abb36d76dd00ff6711023 Merge: b71428d7ab333 e16e9f1184181 Author: Linus Torvalds Date: Fri Apr 30 12:53:02 2021 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID updates from Jiri Kosina: - Surface Aggregator Module support from Maximilian Luz - Apple Magic Mouse 2 support from John Chen - Support for newer Quad/BT 2.0 Logitech receivers in HID proxy mode from Hans de Goede - Thinkpad X1 Tablet keyboard support from Hans de Goede - Support for FTDI FT260 I2C host adapter from Michael Zaidman - other various small device-specific quirks, fixes and cleanups * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (46 commits) HID: wacom: Setup pen input capabilities to the targeted tools HID: hid-sensor-hub: Move 'hsdev' description to correct struct definition HID: hid-sensor-hub: Remove unused struct member 'quirks' HID: wacom_sys: Demote kernel-doc abuse HID: hid-sensor-custom: Remove unused variable 'ret' HID: hid-uclogic-params: Ensure function names are present and correct in kernel-doc headers HID: hid-uclogic-rdesc: Kernel-doc is for functions and structs HID: hid-logitech-hidpp: Fix conformant kernel-doc header and demote abuses HID: hid-picolcd_core: Remove unused variable 'ret' HID: hid-kye: Fix incorrect function name for kye_tablet_enable() HID: hid-core: Fix incorrect function name in header HID: hid-alps: Correct struct misnaming HID: usbhid: hid-pidff: Demote a couple kernel-doc abuses HID: usbhid: Repair a formatting issue in a struct description HID: hid-thrustmaster: Demote a bunch of kernel-doc abuses HID: input: map battery capacity (00850065) HID: magicmouse: fix reconnection of Magic Mouse 2 HID: magicmouse: fix 3 button emulation of Mouse 2 HID: magicmouse: add Apple Magic Mouse 2 support HID: lenovo: Add support for Thinkpad X1 Tablet Thin keyboard ... commit b71428d7ab333a157216a1d73c8c82a178efada9 Merge: 95275402f66e8 2e6a731296be9 Author: Linus Torvalds Date: Fri Apr 30 12:48:14 2021 -0700 Merge tag 'sound-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "No surprises in this development cycle, and most of work is about the fixes and the improvements of the existing code, while a new LED control layer and a few new drivers have been introduced. Here are some highlights: Core: - A common mute-LED framework was introduced. It is used by HD-audio for now, more adaption will follow later. The former "Mic Mute-LED Mode" mixer control has been replaced with the corresponding sysfs now. - User-control management was changed to count consumed bytes instead of capping by number of elements; this will allow more controls in the normal usage pattern while avoiding the possible memory exhaustion DoS ASoC: - Continued refactoring and cleanups in ASoC core and generic card drivers - Wide range of small cppcheck and warning fixes - New drivers for Freescale i.MX DMA over rpmsg, Mediatek MT6358 accessory detection, and Realtek RT1019, RT1316, RT711 and RT715 USB-audio: - Continued improvements and fixes of the implicit feedback mode, including better support for Pioneer and Roland/BOSS devices HD-audio: - Default back to non-buffer preallocation on x86 - Cirrus codec improvements, more quirks for Realtek codecs Others: - New virtio sound driver - FireWire Bebob updates" * tag 'sound-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (587 commits) ALSA: hda/conexant: Re-order CX5066 quirk table entries ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices ALSA: hda/realtek: Re-order ALC662 quirk table entries ALSA: hda/realtek: Re-order remaining ALC269 quirk table entries ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries ALSA: hda/realtek: Re-order ALC269 ASUS quirk table entries ALSA: hda/realtek: Re-order ALC269 Dell quirk table entries ALSA: hda/realtek: Re-order ALC269 Acer quirk table entries ALSA: hda/realtek: Re-order ALC269 HP quirk table entries ALSA: hda/realtek: Re-order ALC882 Clevo quirk table entries ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries ALSA: usb-audio: Remove redundant assignment to len ALSA: hda/realtek: Add quirk for Intel Clevo PCx0Dx ALSA: virtio: fix kernel-doc ALSA: hda/cirrus: Use CS8409 filter to fix abnormal sounds on Bullseye ALSA: hda/cirrus: Set Initial DMIC volume for Bullseye to -26 dB ALSA: sb: Fix two use after free in snd_sb_qsound_build ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer ... commit 95275402f66e88c56144a2d859c13594b651b29b Merge: 65c61de9d090e 1cd6b4a04f038 Author: Linus Torvalds Date: Fri Apr 30 12:44:02 2021 -0700 Merge tag 'drm-next-2021-04-30' of git://anongit.freedesktop.org/drm/drm Pull more drm updates from Dave Airlie: "Looks like I missed a tegra feature request for next, but should still be fine since it's pretty self contained. Apart from that got a set of i915 and amdgpu fixes as per usual along with a few misc fixes. tegra: - Tegra186 hardware cursor support - better capability reporting for different SoC - better framebuffer modifier support - host1x fixes ttm: - fix unswappable BO handling efifb: - check for PCI before using it amdgpu: - Fixes for Aldebaran - Display LTTPR fixes - eDP fixes - Fixes for Vangogh - RAS fixes - ASPM support - Renoir SMU fixes - Modifier fixes - Misc code cleanups - Freesync fixes i915: - Several fixes to GLK handling in recent display refactoring - Rare watchdog timer race fix - Cppcheck redundant condition fix - Overlay error code propagation fix - Documentation fix - gvt: Remove one unused function warning - gvt: Fix intel_gvt_init_device() return type - gvt: Remove one duplicated register accessible check" * tag 'drm-next-2021-04-30' of git://anongit.freedesktop.org/drm/drm: (111 commits) efifb: Check efifb_pci_dev before using it drm/i915: Fix docbook descriptions for i915_gem_shrinker drm/i915: fix an error code in intel_overlay_do_put_image() drm/i915/display/psr: Fix cppcheck warnings drm/i915: Disable LTTPR detection on GLK once again drm/i915: Restore lost glk ccs w/a drm/i915: Restore lost glk FBC 16bpp w/a drm/i915: Take request reference before arming the watchdog timer drm/ttm: fix error handling if no BO can be swapped out v4 drm/i915/gvt: Remove duplicated register accessible check drm/amdgpu/gmc9: remove dummy read workaround for newer chips drm/amdgpu: Add mem sync flag for IB allocated by SA drm/amdgpu: Fix SDMA RAS error reporting on Aldebaran drm/amdgpu: Reset RAS error count and status regs Revert "drm/amdgpu: workaround the TMR MC address issue (v2)" drm/amd/display: 3.2.132 drm/amd/display: [FW Promotion] Release 0.0.62 drm/amd/display: add helper for enabling mst stream features drm/amd/display: Report Proper Quantization Range in AVI Infoframe drm/amd/display: Fix call to pass bpp in 16ths of a bit ... commit e00dc69b5f17c444a38cd9745a0f76bc989b3af4 Author: Arun Easi Date: Fri Apr 9 14:51:53 2021 -0700 PCI: Allow VPD access for QLogic ISP2722 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") disabled access to VPD of the ISP2722-based 16/32Gb Fibre Channel to PCIe Adapter because reading past the end of the VPD caused NMIs. 104daa71b396 ("PCI: Determine actual VPD size on first access") limits reads to the actual size of VPD, which should prevent these NMIs. 104daa71b396 was merged *before* 0d5370d1d852, but we think the testing that prompted 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") was done with a kernel that lacked 104daa71b396. See [1, 2]. Remove the quirk added by 0d5370d1d852 ("PCI: Prevent VPD access for QLogic ISP2722") so customers can read the HBA VPD. [1] https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2012161641230.28924@irv1user01.caveonetworks.com/ [2] https://lore.kernel.org/linux-pci/alpine.LRH.2.21.9999.2104071535110.13940@irv1user01.caveonetworks.com/ [bhelgaas: commit log] Link: https://lore.kernel.org/r/20210409215153.16569-2-aeasi@marvell.com Signed-off-by: Arun Easi Signed-off-by: Bjorn Helgaas Cc: stable@vger.kernel.org # v4.6+ commit 5881b38912f3f48a4bd74a4eed58be12df012063 Author: Heiner Kallweit Date: Fri Apr 16 21:52:07 2021 +0200 PCI/VPD: Add helper pci_get_func0_dev() Factor out the "get function 0" logic into pci_get_func0_dev(). [bhelgaas: keep PCI_DEVFN(PCI_SLOT()) instead of exposing implementation details, commit log] Link: https://lore.kernel.org/r/75d1f619-8a35-690d-8fc8-e851264a4bbb@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 0a08bc07610e172972985d6322fd671cff76c928 Author: Heiner Kallweit Date: Thu Apr 1 18:44:15 2021 +0200 PCI/VPD: Remove pci_vpd_find_tag() SRDT handling Only SRDT tag is the end tag, and no caller is interested in it. This allows to remove all SRDT tag handling. Link: https://lore.kernel.org/r/3f63f06f-734f-8fff-9518-27fe1faf903d@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 4cf0abbce69bde3d07757dfa9be6420407fdbc45 Author: Heiner Kallweit Date: Thu Apr 1 18:43:15 2021 +0200 PCI/VPD: Remove pci_vpd_find_tag() 'offset' argument All callers pass 0 as offset. Therefore remove the parameter and use a fixed offset 0 in pci_vpd_find_tag(). Link: https://lore.kernel.org/r/f62e6e19-5423-2ead-b2bd-62844b23ef8f@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit e947e7b1163d5a4375dc1ca6134ebda67ee7d33a Author: Heiner Kallweit Date: Thu Apr 1 18:37:47 2021 +0200 PCI/VPD: Change pci_vpd_init() return type to void pci_init_capabilities() is the only caller and doesn't use the return value. So let's change the return type to void. Link: https://lore.kernel.org/r/663ec440-8375-1459-ddb4-98ea76e75917@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit d1df5f3f4cfff88c989cbeec6ca0e02340494818 Author: Heiner Kallweit Date: Thu Apr 1 14:03:49 2021 +0200 PCI/VPD: Make missing VPD message less alarming Realtek RTL8169/8168/8125 NIC families indicate VPD capability and an optional VPD EEPROM can be connected via I2C/SPI. However I haven't seen any card or system with such a VPD EEPROM yet. The missing EEPROM causes the following warning whenever e.g. lscpi -vv is executed. invalid short VPD tag 00 at offset 01 The warning confuses users, and I think we should handle the situation more gently. Therefore, if first VPD byte is read as 0x00, assume a missing optional VPD PROM and replace the warning with a more descriptive message at info level. [bhelgaas: fix pre-existing whitespace] Link: https://lore.kernel.org/r/ccbc11f1-4dbb-e2c8-d0ea-559e06d4c340@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit 384d0c68204a4a657f4bbc096c50d729ae7d9ef0 Author: Heiner Kallweit Date: Fri Feb 12 11:02:47 2021 +0100 PCI/VPD: Remove pci_set_vpd_size() 24a1720a0841 ("cxgb4: collect serial config version from register") removed the only usage of pci_set_vpd_size(). If a device needs to override the auto-detected VPD size, then this can be done with a PCI quirk, as is done for Chelsio devices. There's no need to allow drivers to change the VPD size. Remove pci_set_vpd_size(). [bhelgaas: squash in Arnd's fix for "'pci_vpd_set_size' defined but not used" from https://lore.kernel.org/r/20210421140334.3847155-1-arnd@kernel.org] Link: https://lore.kernel.org/r/47d86e52-9bcf-7da7-1edb-0d988a7a82ab@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 65c61de9d090edb8a3cfb3f45541e268eb2cdb13 Merge: c70a4be130de3 33121347fb1c3 Author: Linus Torvalds Date: Fri Apr 30 12:29:36 2021 -0700 Merge tag 'modules-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux Pull module updates from Jessica Yu: "Fix an age old bug involving jump_calls and static_labels when CONFIG_MODULE_UNLOAD=n. When CONFIG_MODULE_UNLOAD=n, it means you can't unload modules, so normally the __exit sections of a module are not loaded at all. However, dynamic code patching (jump_label, static_call, alternatives) can have sites in __exit sections even if __exit is never executed. Reported by Peter Zijlstra: 'Alternatives, jump_labels and static_call all can have relocations into __exit code. Not loading it at all would be BAD.' Therefore, load the __exit sections even when CONFIG_MODULE_UNLOAD=n, and discard them after init" * tag 'modules-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD commit c70a4be130de333ea079c59da41cc959712bb01c Merge: 437d1a5b66ca6 5256426247837 Author: Linus Torvalds Date: Fri Apr 30 12:22:28 2021 -0700 Merge tag 'powerpc-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: - Enable KFENCE for 32-bit. - Implement EBPF for 32-bit. - Convert 32-bit to do interrupt entry/exit in C. - Convert 64-bit BookE to do interrupt entry/exit in C. - Changes to our signal handling code to use user_access_begin/end() more extensively. - Add support for time namespaces (CONFIG_TIME_NS) - A series of fixes that allow us to reenable STRICT_KERNEL_RWX. - Other smaller features, fixes & cleanups. Thanks to Alexey Kardashevskiy, Andreas Schwab, Andrew Donnellan, Aneesh Kumar K.V, Athira Rajeev, Bhaskar Chowdhury, Bixuan Cui, Cédric Le Goater, Chen Huang, Chris Packham, Christophe Leroy, Christopher M. Riedl, Colin Ian King, Dan Carpenter, Daniel Axtens, Daniel Henrique Barboza, David Gibson, Davidlohr Bueso, Denis Efremov, dingsenjie, Dmitry Safonov, Dominic DeMarco, Fabiano Rosas, Ganesh Goudar, Geert Uytterhoeven, Geetika Moolchandani, Greg Kurz, Guenter Roeck, Haren Myneni, He Ying, Jiapeng Chong, Jordan Niethe, Laurent Dufour, Lee Jones, Leonardo Bras, Li Huafei, Madhavan Srinivasan, Mahesh Salgaonkar, Masahiro Yamada, Nathan Chancellor, Nathan Lynch, Nicholas Piggin, Oliver O'Halloran, Paul Menzel, Pu Lehui, Randy Dunlap, Ravi Bangoria, Rosen Penev, Russell Currey, Santosh Sivaraj, Sebastian Andrzej Siewior, Segher Boessenkool, Shivaprasad G Bhat, Srikar Dronamraju, Stephen Rothwell, Thadeu Lima de Souza Cascardo, Thomas Gleixner, Tony Ambardar, Tyrel Datwyler, Vaibhav Jain, Vincenzo Frascino, Xiongwei Song, Yang Li, Yu Kuai, and Zhang Yunkai. * tag 'powerpc-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (302 commits) powerpc/signal32: Fix erroneous SIGSEGV on RT signal return powerpc: Avoid clang uninitialized warning in __get_user_size_allowed powerpc/papr_scm: Mark nvdimm as unarmed if needed during probe powerpc/kvm: Fix build error when PPC_MEM_KEYS/PPC_PSERIES=n powerpc/kasan: Fix shadow start address with modules powerpc/kernel/iommu: Use largepool as a last resort when !largealloc powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs powerpc/44x: fix spelling mistake in Kconfig "varients" -> "variants" powerpc/iommu: Annotate nested lock for lockdep powerpc/iommu: Do not immediately panic when failed IOMMU table allocation powerpc/iommu: Allocate it_map by vmalloc selftests/powerpc: remove unneeded semicolon powerpc/64s: remove unneeded semicolon powerpc/eeh: remove unneeded semicolon powerpc/selftests: Add selftest to test concurrent perf/ptrace events powerpc/selftests/perf-hwbreak: Add testcases for 2nd DAWR powerpc/selftests/perf-hwbreak: Coalesce event creation code powerpc/selftests/ptrace-hwbreak: Add testcases for 2nd DAWR powerpc/configs: Add IBMVNIC to some 64-bit configs selftests/powerpc: Add uaccess flush test ... commit 437d1a5b66ca60f209e25f469b395741cc10b731 Merge: 8ca5297e7e38f 6a8eb99e130f3 Author: Linus Torvalds Date: Fri Apr 30 12:09:28 2021 -0700 Merge tag 'xtensa-20210429' of git://github.com/jcmvbkbc/linux-xtensa Pull Xtensa updates from Max Filippov: - switch to generic syscall generation scripts - new GDBIO implementation for xtensa semihosting interface - various small code fixes and cleanups - a few typo fixes in comments and Kconfig help text * tag 'xtensa-20210429' of git://github.com/jcmvbkbc/linux-xtensa: xtensa: ISS: add GDBIO implementation to semihosting interface xtensa: ISS: split simcall implementation from semihosting interface xtensa: simcall.h: Change compitible to compatible xtensa: Couple of typo fixes xtensa: drop extraneous register load from initialize_mmu xtensa: fix pgprot_noncached assumptions xtensa: simplify coherent_kvaddr logic xtensa: syscalls: switch to generic syscallhdr.sh xtensa: syscalls: switch to generic syscalltbl.sh xtensa: stop filling syscall array with sys_ni_syscall xtensa: remove unneeded export in boot-elf/Makefile xtensa: move CONFIG_CPU_*_ENDIAN defines to Kconfig xtensa: fix warning comparing pointer to 0 xtensa: fix spelling mistake in Kconfig "wont" -> "won't" commit ccd61f07d28912dcd6a61ea73f5d69af7ad88efa Author: Krzysztof Wilczyński Date: Tue Apr 20 21:09:13 2021 +0000 x86/PCI: Remove unused alloc_pci_root_info() return value The "info" value returned from alloc_pci_root_info() is never used, so drop it. [bhelgaas: commit log] Addresses-Coverity-ID: 1222153 ("Unused value") Link: https://lore.kernel.org/r/20210420210913.1137116-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit ae7ce982fc7da240d86bfe01ca165250ad053802 Author: Maxime Ripard Date: Thu Feb 18 16:28:37 2021 +0100 dt-bindings: bcm2711-hdmi: Fix broken schema For some reason, unevaluatedProperties doesn't work and additionalProperties is required. Fix it by switching to additionalProperties. Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210218152837.1080819-1-maxime@cerno.tech [robh: Also committed as a3cb15cda1b8, but lost due to how drm-misc-fixes and drm-misc-next got merged.] Signed-off-by: Rob Herring commit 840d7f01d4b335ece36f656fbc1cfcf127dee310 Author: Thomas Bogendoerfer Date: Wed Apr 28 00:42:00 2021 +0200 dt-bindings: interrupt-controller: idt,32434-pic: Add missing interrupts property Interrupts property is required, so add it. Signed-off-by: Thomas Bogendoerfer Link: https://lore.kernel.org/r/20210427224201.32285-1-tsbogend@alpha.franken.de Signed-off-by: Rob Herring commit ca4a4e9a55beeb138bb06e3867f5e486da896d44 Author: Mike Snitzer Date: Fri Apr 30 14:38:37 2021 -0400 dm raid: remove unnecessary discard limits for raid0 and raid10 Commit 29efc390b946 ("md/md0: optimize raid0 discard handling") and commit d30588b2731f ("md/raid10: improve raid10 discard request") remove MD raid0's and raid10's inability to properly handle large discards. So eliminate associated constraints from dm-raid's support. Depends-on: 29efc390b946 ("md/md0: optimize raid0 discard handling") Depends-on: d30588b2731f ("md/raid10: improve raid10 discard request") Reported-by: Matthew Ruffell Signed-off-by: Mike Snitzer commit 4d75136be8bf3ae01b0bc3e725b2cdc921e103bd Author: Jane Chu Date: Thu Apr 29 23:02:19 2021 -0700 mm/memory-failure: unnecessary amount of unmapping It appears that unmap_mapping_range() actually takes a 'size' as its third argument rather than a location, the current calling fashion causes unnecessary amount of unmapping to occur. Link: https://lkml.kernel.org/r/20210420002821.2749748-1-jane.chu@oracle.com Fixes: 6100e34b2526e ("mm, memory_failure: Teach memory_failure() about dev_pagemap pages") Signed-off-by: Jane Chu Reviewed-by: Dan Williams Reviewed-by: Naoya Horiguchi Cc: Dave Jiang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 198fba4137a1803a9cb93992b56c2ecba1aa83a3 Author: Mike Rapoport Date: Thu Apr 29 23:02:16 2021 -0700 mm/mmzone.h: fix existing kernel-doc comments and link them to core-api There are a couple of kernel-doc comments in include/linux/mmzone.h but they have minor formatting issues that would cause kernel-doc warnings. Fix the formatting of those comments, add missing Return: descriptions and link include/linux/mmzone.h to Documentation/core-api/mm-api.rst Link: https://lkml.kernel.org/r/20210426141927.1314326-2-rppt@kernel.org Signed-off-by: Mike Rapoport Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Anshuman Khandual Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9df65f522536719682bccd24245ff94db956256c Author: Sergei Trofimovich Date: Thu Apr 29 23:02:11 2021 -0700 mm: page_alloc: ignore init_on_free=1 for debug_pagealloc=1 On !ARCH_SUPPORTS_DEBUG_PAGEALLOC (like ia64) debug_pagealloc=1 implies page_poison=on: if (page_poisoning_enabled() || (!IS_ENABLED(CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC) && debug_pagealloc_enabled())) static_branch_enable(&_page_poisoning_enabled); page_poison=on needs to override init_on_free=1. Before the change it did not work as expected for the following case: - have PAGE_POISONING=y - have page_poison unset - have !ARCH_SUPPORTS_DEBUG_PAGEALLOC arch (like ia64) - have init_on_free=1 - have debug_pagealloc=1 That way we get both keys enabled: - static_branch_enable(&init_on_free); - static_branch_enable(&_page_poisoning_enabled); which leads to poisoned pages returned for __GFP_ZERO pages. After the change we execute only: - static_branch_enable(&_page_poisoning_enabled); and ignore init_on_free=1. Link: https://lkml.kernel.org/r/20210329222555.3077928-1-slyfox@gentoo.org Link: https://lkml.org/lkml/2021/3/26/443 Fixes: 8db26a3d4735 ("mm, page_poison: use static key more efficiently") Signed-off-by: Sergei Trofimovich Acked-by: Vlastimil Babka Reviewed-by: David Hildenbrand Cc: Andrey Konovalov Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit be5dba25b4b27f262626ddc9079d4858a75462fd Author: Jesper Dangaard Brouer Date: Thu Apr 29 23:02:07 2021 -0700 net: page_pool: use alloc_pages_bulk in refill code path There are cases where the page_pool need to refill with pages from the page allocator. Some workloads cause the page_pool to release pages instead of recycling these pages. For these workload it can improve performance to bulk alloc pages from the page-allocator to refill the alloc cache. For XDP-redirect workload with 100G mlx5 driver (that use page_pool) redirecting xdp_frame packets into a veth, that does XDP_PASS to create an SKB from the xdp_frame, which then cannot return the page to the page_pool. Performance results under GitHub xdp-project[1]: [1] https://github.com/xdp-project/xdp-project/blob/master/areas/mem/page_pool06_alloc_pages_bulk.org Mel: The patch "net: page_pool: convert to use alloc_pages_bulk_array variant" was squashed with this patch. From the test page, the array variant was superior with one of the test results as follows. Kernel XDP stats CPU pps Delta Baseline XDP-RX CPU total 3,771,046 n/a List XDP-RX CPU total 3,940,242 +4.49% Array XDP-RX CPU total 4,249,224 +12.68% Link: https://lkml.kernel.org/r/20210325114228.27719-10-mgorman@techsingularity.net Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Mel Gorman Reviewed-by: Alexander Lobakin Cc: Alexander Duyck Cc: Christoph Hellwig Cc: Chuck Lever Cc: David Miller Cc: Ilias Apalodimas Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dfa59717b97d4203e6b44ee82874d4f758d93542 Author: Jesper Dangaard Brouer Date: Thu Apr 29 23:02:04 2021 -0700 net: page_pool: refactor dma_map into own function page_pool_dma_map In preparation for next patch, move the dma mapping into its own function, as this will make it easier to follow the changes. [ilias.apalodimas: make page_pool_dma_map return boolean] Link: https://lkml.kernel.org/r/20210325114228.27719-9-mgorman@techsingularity.net Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Mel Gorman Reviewed-by: Ilias Apalodimas Reviewed-by: Alexander Lobakin Cc: Alexander Duyck Cc: Christoph Hellwig Cc: Chuck Lever Cc: David Miller Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6e70aab9dfe0c2f79cf7dbcb1e80fa71dc60b09 Author: Chuck Lever Date: Thu Apr 29 23:02:01 2021 -0700 SUNRPC: refresh rq_pages using a bulk page allocator Reduce the rate at which nfsd threads hammer on the page allocator. This improves throughput scalability by enabling the threads to run more independently of each other. [mgorman: Update interpretation of alloc_pages_bulk return value] Link: https://lkml.kernel.org/r/20210325114228.27719-8-mgorman@techsingularity.net Signed-off-by: Chuck Lever Signed-off-by: Mel Gorman Reviewed-by: Alexander Lobakin Cc: Alexander Duyck Cc: Christoph Hellwig Cc: David Miller Cc: Ilias Apalodimas Cc: Jesper Dangaard Brouer Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ab8362645fba90fa44ec1991ad05544e307dd02f Author: Chuck Lever Date: Thu Apr 29 23:01:58 2021 -0700 SUNRPC: set rq_page_end differently Patch series "SUNRPC consumer for the bulk page allocator" This patch set and the measurements below are based on yesterday's bulk allocator series: git://git.kernel.org/pub/scm/linux/kernel/git/mel/linux.git mm-bulk-rebase-v5r9 The patches change SUNRPC to invoke the array-based bulk allocator instead of alloc_page(). The micro-benchmark results are promising. I ran a mixture of 256KB reads and writes over NFSv3. The server's kernel is built with KASAN enabled, so the comparison is exaggerated but I believe it is still valid. I instrumented svc_recv() to measure the latency of each call to svc_alloc_arg() and report it via a trace point. The following results are averages across the trace events. Single page: 25.007 us per call over 532,571 calls Bulk list: 6.258 us per call over 517,034 calls Bulk array: 4.590 us per call over 517,442 calls This patch (of 2) Refactor: I'm about to use the loop variable @i for something else. As far as the "i++" is concerned, that is a post-increment. The value of @i is not used subsequently, so the increment operator is unnecessary and can be removed. Also note that nfsd_read_actor() was renamed nfsd_splice_actor() by commit cf8208d0eabd ("sendfile: convert nfsd to splice_direct_to_actor()"). Link: https://lkml.kernel.org/r/20210325114228.27719-7-mgorman@techsingularity.net Signed-off-by: Chuck Lever Signed-off-by: Mel Gorman Reviewed-by: Alexander Lobakin Cc: Alexander Duyck Cc: Christoph Hellwig Cc: David Miller Cc: Ilias Apalodimas Cc: Jesper Dangaard Brouer Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3b822017b636bf4261a644c16b01eb3900f2a9a0 Author: Jesper Dangaard Brouer Date: Thu Apr 29 23:01:55 2021 -0700 mm/page_alloc: inline __rmqueue_pcplist When __alloc_pages_bulk() got introduced two callers of __rmqueue_pcplist exist and the compiler chooses to not inline this function. ./scripts/bloat-o-meter vmlinux-before vmlinux-inline__rmqueue_pcplist add/remove: 0/1 grow/shrink: 2/0 up/down: 164/-125 (39) Function old new delta rmqueue 2197 2296 +99 __alloc_pages_bulk 1921 1986 +65 __rmqueue_pcplist 125 - -125 Total: Before=19374127, After=19374166, chg +0.00% modprobe page_bench04_bulk loops=$((10**7)) Type:time_bulk_page_alloc_free_array - Per elem: 106 cycles(tsc) 29.595 ns (step:64) - (measurement period time:0.295955434 sec time_interval:295955434) - (invoke count:10000000 tsc_interval:1065447105) Before: - Per elem: 110 cycles(tsc) 30.633 ns (step:64) Link: https://lkml.kernel.org/r/20210325114228.27719-6-mgorman@techsingularity.net Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Mel Gorman Reviewed-by: Alexander Lobakin Acked-by: Vlastimil Babka Cc: Alexander Duyck Cc: Christoph Hellwig Cc: Chuck Lever Cc: David Miller Cc: Ilias Apalodimas Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ce76f9a1d9a21c2633dcd2a5605f923286e16e1d Author: Jesper Dangaard Brouer Date: Thu Apr 29 23:01:51 2021 -0700 mm/page_alloc: optimize code layout for __alloc_pages_bulk Looking at perf-report and ASM-code for __alloc_pages_bulk() it is clear that the code activated is suboptimal. The compiler guesses wrong and places unlikely code at the beginning. Due to the use of WARN_ON_ONCE() macro the UD2 asm instruction is added to the code, which confuse the I-cache prefetcher in the CPU. [mgorman@techsingularity.net: minor changes and rebasing] Link: https://lkml.kernel.org/r/20210325114228.27719-5-mgorman@techsingularity.net Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Mel Gorman Reviewed-by: Alexander Lobakin Acked-By: Vlastimil Babka Cc: Alexander Duyck Cc: Christoph Hellwig Cc: Chuck Lever Cc: David Miller Cc: Ilias Apalodimas Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0f87d9d30f21390dd71114f30e63038980e6eb3f Author: Mel Gorman Date: Thu Apr 29 23:01:48 2021 -0700 mm/page_alloc: add an array-based interface to the bulk page allocator The proposed callers for the bulk allocator store pages from the bulk allocator in an array. This patch adds an array-based interface to the API to avoid multiple list iterations. The page list interface is preserved to avoid requiring all users of the bulk API to allocate and manage enough storage to store the pages. [akpm@linux-foundation.org: remove now unused local `allocated'] Link: https://lkml.kernel.org/r/20210325114228.27719-4-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Alexander Lobakin Acked-by: Vlastimil Babka Cc: Alexander Duyck Cc: Christoph Hellwig Cc: Chuck Lever Cc: David Miller Cc: Ilias Apalodimas Cc: Jesper Dangaard Brouer Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 387ba26fb1cb9be9e35dc14a6d97188e916eda05 Author: Mel Gorman Date: Thu Apr 29 23:01:45 2021 -0700 mm/page_alloc: add a bulk page allocator This patch adds a new page allocator interface via alloc_pages_bulk, and __alloc_pages_bulk_nodemask. A caller requests a number of pages to be allocated and added to a list. The API is not guaranteed to return the requested number of pages and may fail if the preferred allocation zone has limited free memory, the cpuset changes during the allocation or page debugging decides to fail an allocation. It's up to the caller to request more pages in batch if necessary. Note that this implementation is not very efficient and could be improved but it would require refactoring. The intent is to make it available early to determine what semantics are required by different callers. Once the full semantics are nailed down, it can be refactored. [mgorman@techsingularity.net: fix alloc_pages_bulk() return type, per Matthew] Link: https://lkml.kernel.org/r/20210325123713.GQ3697@techsingularity.net [mgorman@techsingularity.net: fix uninit var warning] Link: https://lkml.kernel.org/r/20210330114847.GX3697@techsingularity.net [mgorman@techsingularity.net: fix comment, per Vlastimil] Link: https://lkml.kernel.org/r/20210412110255.GV3697@techsingularity.net Link: https://lkml.kernel.org/r/20210325114228.27719-3-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: Vlastimil Babka Reviewed-by: Alexander Lobakin Tested-by: Colin Ian King Cc: Alexander Duyck Cc: Christoph Hellwig Cc: Chuck Lever Cc: David Miller Cc: Ilias Apalodimas Cc: Jesper Dangaard Brouer Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cb66bede617581309883432e9a633e8cade2a36e Author: Mel Gorman Date: Thu Apr 29 23:01:42 2021 -0700 mm/page_alloc: rename alloced to allocated Patch series "Introduce a bulk order-0 page allocator with two in-tree users", v6. This series introduces a bulk order-0 page allocator with sunrpc and the network page pool being the first users. The implementation is not efficient as semantics needed to be ironed out first. If no other semantic changes are needed, it can be made more efficient. Despite that, this is a performance-related for users that require multiple pages for an operation without multiple round-trips to the page allocator. Quoting the last patch for the high-speed networking use-case Kernel XDP stats CPU pps Delta Baseline XDP-RX CPU total 3,771,046 n/a List XDP-RX CPU total 3,940,242 +4.49% Array XDP-RX CPU total 4,249,224 +12.68% Via the SUNRPC traces of svc_alloc_arg() Single page: 25.007 us per call over 532,571 calls Bulk list: 6.258 us per call over 517,034 calls Bulk array: 4.590 us per call over 517,442 calls Both potential users in this series are corner cases (NFS and high-speed networks) so it is unlikely that most users will see any benefit in the short term. Other potential other users are batch allocations for page cache readahead, fault around and SLUB allocations when high-order pages are unavailable. It's unknown how much benefit would be seen by converting multiple page allocation calls to a single batch or what difference it may make to headline performance. Light testing of my own running dbench over NFS passed. Chuck and Jesper conducted their own tests and details are included in the changelogs. Patch 1 renames a variable name that is particularly unpopular Patch 2 adds a bulk page allocator Patch 3 adds an array-based version of the bulk allocator Patches 4-5 adds micro-optimisations to the implementation Patches 6-7 SUNRPC user Patches 8-9 Network page_pool user This patch (of 9): Review feedback of the bulk allocator twice found problems with "alloced" being a counter for pages allocated. The naming was based on the API name "alloc" and was based on the idea that verbal communication about malloc tends to use the fake word "malloced" instead of the fake word mallocated. To be consistent, this preparation patch renames alloced to allocated in rmqueue_bulk so the bulk allocator and per-cpu allocator use similar names when the bulk allocator is introduced. Link: https://lkml.kernel.org/r/20210325114228.27719-1-mgorman@techsingularity.net Link: https://lkml.kernel.org/r/20210325114228.27719-2-mgorman@techsingularity.net Signed-off-by: Mel Gorman Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Alexander Lobakin Acked-by: Vlastimil Babka Cc: Chuck Lever Cc: Jesper Dangaard Brouer Cc: Christoph Hellwig Cc: Alexander Duyck Cc: Ilias Apalodimas Cc: David Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8f709dbdf9ff13da19d3154b3248e063364a53d5 Author: zhouchuangao Date: Thu Apr 29 23:01:39 2021 -0700 mm/page_alloc: duplicate include linux/vmalloc.h linux/vmalloc.h is repeatedly in the file page_alloc.c Link: https://lkml.kernel.org/r/1616468751-80656-1-git-send-email-zhouchuangao@vivo.com Signed-off-by: zhouchuangao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 39ddb991fc45abcdcddbec7fcdfe28795d0133d7 Author: Kefeng Wang Date: Thu Apr 29 23:01:36 2021 -0700 mm, page_alloc: avoid page_to_pfn() in move_freepages() The start_pfn and end_pfn are already available in move_freepages_block(), there is no need to go back and forth between page and pfn in move_freepages and move_freepages_block, and pfn_valid_within() should validate pfn first before touching the page. Link: https://lkml.kernel.org/r/20210323131215.934472-1-liushixin2@huawei.com Signed-off-by: Kefeng Wang Signed-off-by: Liu Shixin Reviewed-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka Cc: Stephen Rothwell Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d68d015a7e5e3d45624960420e32bd52a937447a Author: Geert Uytterhoeven Date: Thu Apr 29 23:01:33 2021 -0700 mm/Kconfig: remove default DISCONTIGMEM_MANUAL Commit 214496cb18700fd7 ("ia64: make SPARSEMEM default and disable DISCONTIGMEM") removed the last enabler of ARCH_DISCONTIGMEM_DEFAULT, hence the memory model can no longer default to DISCONTIGMEM_MANUAL. Link: https://lkml.kernel.org/r/20210312141208.3465520-1-geert@linux-m68k.org Signed-off-by: Geert Uytterhoeven Reviewed-by: Mike Rapoport Reviewed-by: David Hildenbrand Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a1394bddf9b60e96d075d94b71a8857696598186 Author: Minchan Kim Date: Thu Apr 29 23:01:30 2021 -0700 mm: page_alloc: dump migrate-failed pages Currently, debugging CMA allocation failures is quite limited. The most common source of these failures seems to be page migration which doesn't provide any useful information on the reason of the failure by itself. alloc_contig_range can report those failures as it holds a list of migrate-failed pages. The information logged by dump_page() has already proven helpful for debugging allocation issues, like identifying long-term pinnings on ZONE_MOVABLE or MIGRATE_CMA. Let's use the dynamic debugging infrastructure, such that we avoid flooding the logs and creating a lot of noise on frequent alloc_contig_range() calls. This information is helpful for debugging only. There are two ifdefery conditions to support common dyndbg options: - CONFIG_DYNAMIC_DEBUG_CORE && DYNAMIC_DEBUG_MODULE It aims for supporting the feature with only specific file with adding ccflags. - CONFIG_DYNAMIC_DEBUG It aims for supporting the feature with system wide globally. A simple example to enable the feature: Admin could enable the dump like this(by default, disabled) echo "func alloc_contig_dump_pages +p" > control Admin could disable it. echo "func alloc_contig_dump_pages =_" > control Detail goes Documentation/admin-guide/dynamic-debug-howto.rst A concern is utility functions in dump_page use inconsistent loglevels. In the future, we might want to make the loglevels used inside dump_page() consistent and eventually rework the way we log the information here. See [1]. [1] https://lore.kernel.org/linux-mm/YEh4doXvyuRl5BDB@google.com/ Link: https://lkml.kernel.org/r/20210311194042.825152-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: David Hildenbrand Cc: John Dias Cc: Michal Hocko Cc: David Hildenbrand Cc: Jason Baron Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f076944f06988391a6dbd458fc6485a71088e57 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 23:01:27 2021 -0700 mm/mempolicy: fix mpol_misplaced kernel-doc Sphinx interprets the Return section as a list and complains about it. Turn it into a sentence and move it to the end of the kernel-doc to fit the kernel-doc style. Link: https://lkml.kernel.org/r/20210225150642.2582252-8-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport Acked-by: Vlastimil Babka Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit eb35073960510762dee417574589b7a8971c68ab Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 23:01:24 2021 -0700 mm/mempolicy: rewrite alloc_pages_vma documentation The current formatting doesn't quite work with kernel-doc. Link: https://lkml.kernel.org/r/20210225150642.2582252-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport Acked-by: Vlastimil Babka Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6421ec764a62c51f810c5dc40cd45eeb15801ad9 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 23:01:21 2021 -0700 mm/mempolicy: rewrite alloc_pages documentation Document alloc_pages() for both NUMA and non-NUMA cases as kernel-doc doesn't care. Link: https://lkml.kernel.org/r/20210225150642.2582252-6-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport Acked-by: Michal Hocko Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d7f946d0faf90014547ee5d090e9d05018278c7a Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 23:01:18 2021 -0700 mm/mempolicy: rename alloc_pages_current to alloc_pages When CONFIG_NUMA is enabled, alloc_pages() is a wrapper around alloc_pages_current(). This is pointless, just implement alloc_pages() directly. Link: https://lkml.kernel.org/r/20210225150642.2582252-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 84172f4bb752424415756351a40f8da5714e1554 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 23:01:15 2021 -0700 mm/page_alloc: combine __alloc_pages and __alloc_pages_nodemask There are only two callers of __alloc_pages() so prune the thicket of alloc_page variants by combining the two functions together. Current callers of __alloc_pages() simply add an extra 'NULL' parameter and current callers of __alloc_pages_nodemask() call __alloc_pages() instead. Link: https://lkml.kernel.org/r/20210225150642.2582252-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6e5e0f286eb0ecf12afaa3e73c321bc5bf599abb Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 23:01:13 2021 -0700 mm/page_alloc: rename gfp_mask to gfp Shorten some overly-long lines by renaming this identifier. Link: https://lkml.kernel.org/r/20210225150642.2582252-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e6a930bb3ea6aa4b623eececc25465d09ee7b13 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 23:01:10 2021 -0700 mm/page_alloc: rename alloc_mask to alloc_gfp Patch series "Rationalise __alloc_pages wrappers", v3. I was poking around the __alloc_pages variants trying to understand why they each exist, and couldn't really find a good justification for keeping __alloc_pages and __alloc_pages_nodemask as separate functions. That led to getting rid of alloc_pages_current() and then I noticed the documentation was bad, and then I noticed the mempolicy documentation wasn't included. Anyway, this is all cleanups & doc fixes. This patch (of 7): We have two masks involved -- the nodemask and the gfp mask, so alloc_mask is an unclear name. Link: https://lkml.kernel.org/r/20210225150642.2582252-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Vlastimil Babka Cc: Michal Hocko Cc: Mike Rapoport Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1587db62d8c0dbd943752f657b452213e1c4d8d4 Author: Yu Zhao Date: Thu Apr 29 23:01:07 2021 -0700 include/linux/page-flags-layout.h: cleanups Tidy things up and delete comments stating the obvious with typos or making no sense. Link: https://lkml.kernel.org/r/20210303071609.797782-2-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f73c6c8805ed0762d99122d5332fcf42b0c8fbb8 Author: Yu Zhao Date: Thu Apr 29 23:01:04 2021 -0700 include/linux/page-flags-layout.h: correctly determine LAST_CPUPID_WIDTH The naming convention used in include/linux/page-flags-layout.h: *_SHIFT: the number of bits trying to allocate *_WIDTH: the number of bits successfully allocated So when it comes to LAST_CPUPID_WIDTH, we need to check whether all previous *_WIDTH and LAST_CPUPID_SHIFT can fit into page flags. This means we need to use NODES_WIDTH, not NODES_SHIFT. Link: https://lkml.kernel.org/r/20210303071609.797782-1-yuzhao@google.com Signed-off-by: Yu Zhao Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit cef4c7d29d776643e86b600e5ea823f047445d0b Author: Minchan Kim Date: Thu Apr 29 23:01:01 2021 -0700 mm: remove lru_add_drain_all in alloc_contig_range __alloc_contig_migrate_range already has lru_add_drain_all call via migrate_prep. It's necessary to move LRU taget pages into LRU list to be able to isolated. However, lru_add_drain_all call after __alloc_contig_migrate_range is pointless since it has changed source page freeing from putback_lru_pages to put_page[1]. This patch removes it. [1] c6c919eb90e0, ("mm: use put_page() to free page instead of putback_lru_page()" Link: https://lkml.kernel.org/r/20210303204512.2863087-1-minchan@kernel.org Signed-off-by: Minchan Kim Reviewed-by: Oscar Salvador Acked-by: Vlastimil Babka Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 77febec206262bd80c4176f2281a7970cfe69536 Author: David Hildenbrand Date: Thu Apr 29 23:00:58 2021 -0700 mm/page_alloc: drop pr_info_ratelimited() in alloc_contig_range() The information that some PFNs are busy is: a) not helpful for ordinary users: we don't even know *who* called alloc_contig_range(). This is certainly not worth a pr_info.*(). b) not really helpful for debugging: we don't have any details *why* these PFNs are busy, and that is what we usually care about. c) not complete: there are other cases where we fail alloc_contig_range() using different paths that are not getting recorded. For example, we reach this path once we succeeded in isolating pageblocks, but failed to migrate some pages - which can happen easily on ZONE_NORMAL (i.e., has_unmovable_pages() is racy) but also on ZONE_MOVABLE i.e., we would have to retry longer to migrate). For example via virtio-mem when unplugging memory, we can create quite some noise (especially with ZONE_NORMAL) that is not of interest to users - it's expected that some allocations may fail as memory is busy. Let's just drop that pr_info_ratelimit() and rather implement a dynamic debugging mechanism in the future that can give us a better reason why alloc_contig_range() failed on specific pages. Link: https://lkml.kernel.org/r/20210301150945.77012-1-david@redhat.com Signed-off-by: David Hildenbrand Reviewed-by: Zi Yan Acked-by: Michal Hocko Reviewed-by: Oscar Salvador Acked-by: Minchan Kim Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f9d03c5e999ed5a57fa4d8aec9fdf67a6234b80 Author: Kefeng Wang Date: Thu Apr 29 23:00:55 2021 -0700 mm: move mem_init_print_info() into mm_init() mem_init_print_info() is called in mem_init() on each architecture, and pass NULL argument, so using void argument and move it into mm_init(). Link: https://lkml.kernel.org/r/20210317015210.33641-1-wangkefeng.wang@huawei.com Signed-off-by: Kefeng Wang Acked-by: Dave Hansen [x86] Reviewed-by: Christophe Leroy [powerpc] Acked-by: David Hildenbrand Tested-by: Anatoly Pugachev [sparc64] Acked-by: Russell King [arm] Acked-by: Mike Rapoport Cc: Catalin Marinas Cc: Richard Henderson Cc: Guo Ren Cc: Yoshinori Sato Cc: Huacai Chen Cc: Jonas Bonn Cc: Palmer Dabbelt Cc: Heiko Carstens Cc: "David S. Miller" Cc: "Peter Zijlstra" Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e2b5bcf9f5baec35c67ebe05c7713ae6fa9ef61f Author: Zqiang Date: Thu Apr 29 23:00:52 2021 -0700 irq_work: record irq_work_queue() call stack Add the irq_work_queue() call stack into the KASAN auxiliary stack in order to improve KASAN reports. this will let us know where the irq work be queued. Link: https://lkml.kernel.org/r/20210331063202.28770-1-qiang.zhang@windriver.com Signed-off-by: Zqiang Reviewed-by: Dmitry Vyukov Acked-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Matthias Brugger Cc: Oleg Nesterov Cc: Walter Wu Cc: Frederic Weisbecker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99734b535d9bf8d5826be8f8f3719dfc586c3452 Author: Andrey Konovalov Date: Thu Apr 29 23:00:49 2021 -0700 kasan: detect false-positives in tests Currently, KASAN-KUnit tests can check that a particular annotated part of code causes a KASAN report. However, they do not check that no unwanted reports happen between the annotated parts. This patch implements these checks. It is done by setting report_data.report_found to false in kasan_test_init() and at the end of KUNIT_EXPECT_KASAN_FAIL() and then checking that it remains false at the beginning of KUNIT_EXPECT_KASAN_FAIL() and in kasan_test_exit(). kunit_add_named_resource() call is moved to kasan_test_init(), and the value of fail_data.report_expected is kept as false in between KUNIT_EXPECT_KASAN_FAIL() annotations for consistency. Link: https://lkml.kernel.org/r/48079c52cc329fbc52f4386996598d58022fb872.1617207873.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Andrey Ryabinin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 23f61f0fe106da8c9f6a883965439ecc2838f116 Author: Walter Wu Date: Thu Apr 29 23:00:45 2021 -0700 kasan: record task_work_add() call stack Why record task_work_add() call stack? Syzbot reports many use-after-free issues for task_work, see [1]. After seeing the free stack and the current auxiliary stack, we think they are useless, we don't know where the work was registered. This work may be the free call stack, so we miss the root cause and don't solve the use-after-free. Add the task_work_add() call stack into the KASAN auxiliary stack in order to improve KASAN reports. It helps programmers solve use-after-free issues. [1]: https://groups.google.com/g/syzkaller-bugs/search?q=kasan%20use-after-free%20task_work_run Link: https://lkml.kernel.org/r/20210316024410.19967-1-walter-zh.wu@mediatek.com Signed-off-by: Walter Wu Suggested-by: Dmitry Vyukov Reviewed-by: Dmitry Vyukov Reviewed-by: Jens Axboe Acked-by: Oleg Nesterov Acked-by: Andrey Konovalov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrew Morton Cc: Matthias Brugger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fc23c074ef5ab47c2fb0975f70329da93850c6d0 Author: Andrey Konovalov Date: Thu Apr 29 23:00:42 2021 -0700 kasan: docs: update tests section Update the "Tests" section in KASAN documentation: - Add an introductory sentence. - Add proper indentation for the list of ways to run KUnit tests. - Punctuation, readability, and other minor clean-ups. Link: https://lkml.kernel.org/r/fb08845e25c8847ffda271fa19cda2621c04a65b.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fe547fca0c10b0319881287ca17ca9d7dc1b4757 Author: Andrey Konovalov Date: Thu Apr 29 23:00:39 2021 -0700 kasan: docs: update ignoring accesses section Update the "Ignoring accesses" section in KASAN documentation: - Mention __no_sanitize_address/noinstr. - Mention kasan_disable/enable_current(). - Mention kasan_reset_tag()/page_kasan_tag_reset(). - Readability and punctuation clean-ups. Link: https://lkml.kernel.org/r/4531ba5f3eca61f6aade863c136778cc8c807a64.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 67ca1c0b74463a7b961bb34c213b37be0deb0ab6 Author: Andrey Konovalov Date: Thu Apr 29 23:00:36 2021 -0700 kasan: docs: update shadow memory section Update the "Shadow memory" section in KASAN documentation: - Rearrange the introduction paragraph do it doesn't give a "KASAN has an issue" impression. - Update the list of architectures with vmalloc support. - Punctuation, readability, and other minor clean-ups. Link: https://lkml.kernel.org/r/00f8c38b0fd5290a3f4dced04eaba41383e67e14.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bb48675e5aa4f48f5767fb915c73f44f86a81e98 Author: Andrey Konovalov Date: Thu Apr 29 23:00:33 2021 -0700 kasan: docs: update HW_TAGS implementation details section Update the "Implementation details" section for HW_TAGS KASAN: - Punctuation, readability, and other minor clean-ups. Link: https://lkml.kernel.org/r/ee2caf4c138cc1fd239822c2abefd5af6c057744.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a6c18d4e763873e900b8932211a3f66589f943a2 Author: Andrey Konovalov Date: Thu Apr 29 23:00:30 2021 -0700 kasan: docs: update SW_TAGS implementation details section Update the "Implementation details" section for SW_TAGS KASAN: - Clarify the introduction sentence. - Punctuation, readability, and other minor clean-ups. Link: https://lkml.kernel.org/r/69b9b2e49d8cf789358fa24558be3fc0ce4ee32c.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b8191d7d57e86eda934ef82081c294e6a184b000 Author: Andrey Konovalov Date: Thu Apr 29 23:00:27 2021 -0700 kasan: docs: update GENERIC implementation details section Update the "Implementation details" section for generic KASAN: - Don't mention kmemcheck, it's not present in the kernel anymore. - Don't mention GCC as the only supported compiler. - Update kasan_mem_to_shadow() definition to match actual code. - Punctuation, readability, and other minor clean-ups. Link: https://lkml.kernel.org/r/f2f35fdab701f8c709f63d328f98aec2982c8acc.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f359074768bf406b64d62560e88ff9820b600220 Author: Andrey Konovalov Date: Thu Apr 29 23:00:24 2021 -0700 kasan: docs: update boot parameters section Update the "Boot parameters" section in KASAN documentation: - Mention panic_on_warn. - Mention kasan_multi_shot and its interaction with panic_on_warn. - Clarify kasan.fault=panic interaction with panic_on_warn. - A readability clean-up. Link: https://lkml.kernel.org/r/01364952f15789948f0627d6733b5cdf5209f83a.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 836f79a2660533c8302f1154168018d9d76458af Author: Andrey Konovalov Date: Thu Apr 29 23:00:21 2021 -0700 kasan: docs: update error reports section Update the "Error reports" section in KASAN documentation: - Mention that bug titles are best-effort. - Move and reword the part about auxiliary stacks from "Implementation details". - Punctuation, readability, and other minor clean-ups. Link: https://lkml.kernel.org/r/3531e8fe6972cf39d1954e3643237b19eb21227e.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 86e6f08dd28d6723a19b8a072b6db45cf6a9e4d3 Author: Andrey Konovalov Date: Thu Apr 29 23:00:18 2021 -0700 kasan: docs: update usage section Update the "Usage" section in KASAN documentation: - Add inline code snippet markers. - Reword the part about stack traces for clarity. - Other minor clean-ups. Link: https://lkml.kernel.org/r/48427809cd4b8b5d6bc00926cbe87e2b5081df17.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3cbc37dcdca273485f8ef909fab2c41e8fb5d3b9 Author: Andrey Konovalov Date: Thu Apr 29 23:00:15 2021 -0700 kasan: docs: update overview section Update the "Overview" section in KASAN documentation: - Outline main use cases for each mode. - Mention that HW_TAGS mode need compiler support too. - Move the part about SLUB/SLAB support from "Usage" to "Overview". - Punctuation, readability, and other minor clean-ups. Link: https://lkml.kernel.org/r/1486fba8514de3d7db2f47df2192db59228b0a7b.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 96d7d1415ae8beb3f6ec62107a97ae73db611213 Author: Andrey Konovalov Date: Thu Apr 29 23:00:12 2021 -0700 kasan: docs: clean up sections Update KASAN documentation: - Give some sections clearer names. - Remove unneeded subsections in the "Tests" section. - Move the "For developers" section and split into subsections. Link: https://lkml.kernel.org/r/c2bbb56eaea80ad484f0ee85bb71959a3a63f1d7.1615559068.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d57a964e09c22441e9fb497d1d7a5c1983a5d1fb Author: Andrey Konovalov Date: Thu Apr 29 23:00:09 2021 -0700 kasan, mm: integrate slab init_on_free with HW_TAGS This change uses the previously added memory initialization feature of HW_TAGS KASAN routines for slab memory when init_on_free is enabled. With this change, memory initialization memset() is no longer called when both HW_TAGS KASAN and init_on_free are enabled. Instead, memory is initialized in KASAN runtime. For SLUB, the memory initialization memset() is moved into slab_free_hook() that currently directly follows the initialization loop. A new argument is added to slab_free_hook() that indicates whether to initialize the memory or not. To avoid discrepancies with which memory gets initialized that can be caused by future changes, both KASAN hook and initialization memset() are put together and a warning comment is added. Combining setting allocation tags with memory initialization improves HW_TAGS KASAN performance when init_on_free is enabled. Link: https://lkml.kernel.org/r/190fd15c1886654afdec0d19ebebd5ade665b601.1615296150.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Joonsoo Kim Cc: Kevin Brodsky Cc: Pekka Enberg Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da844b787245194cfd69f0f1d2fb1dd3640a8a6d Author: Andrey Konovalov Date: Thu Apr 29 23:00:06 2021 -0700 kasan, mm: integrate slab init_on_alloc with HW_TAGS This change uses the previously added memory initialization feature of HW_TAGS KASAN routines for slab memory when init_on_alloc is enabled. With this change, memory initialization memset() is no longer called when both HW_TAGS KASAN and init_on_alloc are enabled. Instead, memory is initialized in KASAN runtime. The memory initialization memset() is moved into slab_post_alloc_hook() that currently directly follows the initialization loop. A new argument is added to slab_post_alloc_hook() that indicates whether to initialize the memory or not. To avoid discrepancies with which memory gets initialized that can be caused by future changes, both KASAN hook and initialization memset() are put together and a warning comment is added. Combining setting allocation tags with memory initialization improves HW_TAGS KASAN performance when init_on_alloc is enabled. Link: https://lkml.kernel.org/r/c1292aeb5d519da221ec74a0684a949b027d7720.1615296150.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Joonsoo Kim Cc: Kevin Brodsky Cc: Pekka Enberg Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1bb5eab30d68c1a3d9dbc822e1895e6c06dbe748 Author: Andrey Konovalov Date: Thu Apr 29 23:00:02 2021 -0700 kasan, mm: integrate page_alloc init with HW_TAGS This change uses the previously added memory initialization feature of HW_TAGS KASAN routines for page_alloc memory when init_on_alloc/free is enabled. With this change, kernel_init_free_pages() is no longer called when both HW_TAGS KASAN and init_on_alloc/free are enabled. Instead, memory is initialized in KASAN runtime. To avoid discrepancies with which memory gets initialized that can be caused by future changes, both KASAN and kernel_init_free_pages() hooks are put together and a warning comment is added. This patch changes the order in which memory initialization and page poisoning hooks are called. This doesn't lead to any side-effects, as whenever page poisoning is enabled, memory initialization gets disabled. Combining setting allocation tags with memory initialization improves HW_TAGS KASAN performance when init_on_alloc/free is enabled. [andreyknvl@google.com: fix for "integrate page_alloc init with HW_TAGS"] Link: https://lkml.kernel.org/r/65b6028dea2e9a6e8e2cb779b5115c09457363fc.1617122211.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/e77f0d5b1b20658ef0b8288625c74c2b3690e725.1615296150.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Tested-by: Vlastimil Babka Reviewed-by: Sergei Trofimovich Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Joonsoo Kim Cc: Kevin Brodsky Cc: Pekka Enberg Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit aa5c219c60ccb75b50c16329885b65c275172e4a Author: Andrey Konovalov Date: Thu Apr 29 22:59:59 2021 -0700 kasan: init memory in kasan_(un)poison for HW_TAGS This change adds an argument to kasan_poison() and kasan_unpoison() that allows initializing memory along with setting the tags for HW_TAGS. Combining setting allocation tags with memory initialization will improve HW_TAGS KASAN performance when init_on_alloc/free is enabled. This change doesn't integrate memory initialization with KASAN, this is done is subsequent patches in this series. Link: https://lkml.kernel.org/r/3054314039fa64510947e674180d675cab1b4c41.1615296150.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Christoph Lameter Cc: David Rientjes Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Joonsoo Kim Cc: Kevin Brodsky Cc: Pekka Enberg Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Vlastimil Babka Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d9b6f90794ba2a2f47d1646cda343924b092b3c2 Author: Andrey Konovalov Date: Thu Apr 29 22:59:55 2021 -0700 arm64: kasan: allow to init memory when setting tags Patch series "kasan: integrate with init_on_alloc/free", v3. This patch series integrates HW_TAGS KASAN with init_on_alloc/free by initializing memory via the same arm64 instruction that sets memory tags. This is expected to improve HW_TAGS KASAN performance when init_on_alloc/free is enabled. The exact perfomance numbers are unknown as MTE-enabled hardware doesn't exist yet. This patch (of 5): This change adds an argument to mte_set_mem_tag_range() that allows to enable memory initialization when settinh the allocation tags. The implementation uses stzg instruction instead of stg when this argument indicates to initialize memory. Combining setting allocation tags with memory initialization will improve HW_TAGS KASAN performance when init_on_alloc/free is enabled. This change doesn't integrate memory initialization with KASAN, this is done is subsequent patches in this series. Link: https://lkml.kernel.org/r/cover.1615296150.git.andreyknvl@google.com Link: https://lkml.kernel.org/r/d04ae90cc36be3fe246ea8025e5085495681c3d7.1615296150.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Acked-by: Marco Elver Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Cc: Catalin Marinas Cc: Will Deacon Cc: Vincenzo Frascino Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Peter Collingbourne Cc: Evgenii Stepanov Cc: Branislav Rankov Cc: Kevin Brodsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2c3356809802037de8ecd24538361dba151812fc Author: Andrey Konovalov Date: Thu Apr 29 22:59:52 2021 -0700 mm, kasan: don't poison boot memory with tag-based modes During boot, all non-reserved memblock memory is exposed to page_alloc via memblock_free_pages->__free_pages_core(). This results in kasan_free_pages() being called, which poisons that memory. Poisoning all that memory lengthens boot time. The most noticeable effect is observed with the HW_TAGS mode. A boot-time impact may potentially also affect systems with large amount of RAM. This patch changes the tag-based modes to not poison the memory during the memblock->page_alloc transition. An exception is made for KASAN_GENERIC. Since it marks all new memory as accessible, not poisoning the memory released from memblock will lead to KASAN missing invalid boot-time accesses to that memory. With KASAN_SW_TAGS, as it uses the invalid 0xFE tag as the default tag for all memory, it won't miss bad boot-time accesses even if the poisoning of memblock memory is removed. With KASAN_HW_TAGS, the default memory tags values are unspecified. Therefore, if memblock poisoning is removed, this KASAN mode will miss the mentioned type of boot-time bugs with a 1/16 probability. This is taken as an acceptable trafe-off. Internally, the poisoning is removed as follows. __free_pages_core() is used when exposing fresh memory during system boot and when onlining memory during hotplug. This patch adds a new FPI_SKIP_KASAN_POISON flag and passes it to __free_pages_ok() through free_pages_prepare() from __free_pages_core(). If FPI_SKIP_KASAN_POISON is set, kasan_free_pages() is not called. All memory allocated normally when the boot is over keeps getting poisoned as usual. Link: https://lkml.kernel.org/r/a0570dc1e3a8f39a55aa343a1fc08cd5c2d4cad6.1613692950.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Catalin Marinas Cc: Catalin Marinas Cc: Will Deacon Cc: Vincenzo Frascino Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Marco Elver Cc: Peter Collingbourne Cc: Evgenii Stepanov Cc: Branislav Rankov Cc: Kevin Brodsky Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a064cb00d359bc464df6fd2ab6dfb8dc4b31e361 Author: Andrey Konovalov Date: Thu Apr 29 22:59:49 2021 -0700 kasan: initialize shadow to TAG_INVALID for SW_TAGS Currently, KASAN_SW_TAGS uses 0xFF as the default tag value for unallocated memory. The underlying idea is that since that memory hasn't been allocated yet, it's only supposed to be dereferenced through a pointer with the native 0xFF tag. While this is a good idea in terms on consistency, practically it doesn't bring any benefit. Since the 0xFF pointer tag is a match-all tag, it doesn't matter what tag the accessed memory has. No accesses through 0xFF-tagged pointers are considered buggy by KASAN. This patch changes the default tag value for unallocated memory to 0xFE, which is the tag KASAN uses for inaccessible memory. This doesn't affect accesses through 0xFF-tagged pointer to this memory, but this allows KASAN to detect wild and large out-of-bounds invalid memory accesses through otherwise-tagged pointers. This is a prepatory patch for the next one, which changes the tag-based KASAN modes to not poison the boot memory. Link: https://lkml.kernel.org/r/c8e93571c18b3528aac5eb33ade213bf133d10ad.1613692950.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Cc: Alexander Potapenko Cc: Andrey Ryabinin Cc: Branislav Rankov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Kevin Brodsky Cc: Marco Elver Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bfcfe37136d718f5f5846f51df9ff22d13752a5b Author: Peter Collingbourne Date: Thu Apr 29 22:59:46 2021 -0700 kasan: fix kasan_byte_accessible() to be consistent with actual checks We can sometimes end up with kasan_byte_accessible() being called on non-slab memory. For example ksize() and krealloc() may end up calling it on KFENCE allocated memory. In this case the memory will be tagged with KASAN_SHADOW_INIT, which a subsequent patch ("kasan: initialize shadow to TAG_INVALID for SW_TAGS") will set to the same value as KASAN_TAG_INVALID, causing kasan_byte_accessible() to fail when called on non-slab memory. This highlighted the fact that the check in kasan_byte_accessible() was inconsistent with checks as implemented for loads and stores (kasan_check_range() in SW tags mode and hardware-implemented checks in HW tags mode). kasan_check_range() does not have a check for KASAN_TAG_INVALID, and instead has a comparison against KASAN_SHADOW_START. In HW tags mode, we do not have either, but we do set TCR_EL1.TCMA which corresponds with the comparison against KASAN_TAG_KERNEL. Therefore, update kasan_byte_accessible() for both SW and HW tags modes to correspond with the respective checks on loads and stores. Link: https://linux-review.googlesource.com/id/Ic6d40803c57dcc6331bd97fbb9a60b0d38a65a36 Link: https://lkml.kernel.org/r/20210405220647.1965262-1-pcc@google.com Signed-off-by: Peter Collingbourne Reviewed-by: Andrey Konovalov Reviewed-by: Marco Elver Cc: Dmitry Vyukov Cc: Alexander Potapenko Cc: Peter Collingbourne Cc: Evgenii Stepanov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f76e0c41c0ac7f6ae614dd50ce3e983b974b87c1 Author: Zhiyuan Dai Date: Thu Apr 29 22:59:43 2021 -0700 mm/kasan: switch from strlcpy to strscpy strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. Link: https://lkml.kernel.org/r/1613970647-23272-1-git-send-email-daizhiyuan@phytium.com.cn Signed-off-by: Zhiyuan Dai Acked-by: Alexander Potapenko Reviewed-by: Andrey Konovalov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91ab1a41191ef2d4c6e123951a0f0c3876bd9376 Author: Lukas Bulwahn Date: Thu Apr 29 22:59:40 2021 -0700 pagewalk: prefix struct kernel-doc descriptions The script './scripts/kernel-doc -none ./include/linux/pagewalk.h' reports: include/linux/pagewalk.h:37: warning: cannot understand function prototype: 'struct mm_walk_ops ' include/linux/pagewalk.h:85: warning: cannot understand function prototype: 'struct mm_walk ' A kernel-doc description for a structure requires to prefix the struct name with the keyword 'struct'. So, do that such that no further kernel-doc warnings are reported for this file. Link: https://lkml.kernel.org/r/20210322122542.15072-3-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Cc: Joe Perches Cc: Jonathan Corbet Cc: Ralf Ramsauer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3ddd79a17ee1ad43cf0200f158c30515da7b09c Author: Lukas Bulwahn Date: Thu Apr 29 22:59:37 2021 -0700 MAINTAINERS: assign pagewalk.h to MEMORY MANAGEMENT Patch series "kernel-doc and MAINTAINERS clean-up". Roughly 900 warnings of about 21.000 kernel-doc warnings in the kernel tree warn with 'cannot understand function prototype:', i.e., the kernel-doc parser cannot parse the function's signature. The majority, about 600 cases of those, are just struct definitions following the kernel-doc description. Further, spot-check investigations suggest that the authors of the specific kernel-doc descriptions simply were not aware that the general format for a kernel-doc description for a structure requires to prefix the struct name with the keyword 'struct', as in 'struct struct_name - Brief description.'. Details on kernel-doc are at the Link below. Without the struct keyword, kernel-doc does not check if the kernel-doc description fits to the actual struct definition in the source code. Fortunately, in roughly a quarter of these cases, the kernel-doc description is actually complete wrt. its corresponding struct definition. So, the trivial change adding the struct keyword will allow us to keep the kernel-doc descriptions more consistent for future changes, by checking for new kernel-doc warnings. Also, some of the files in ./include/ are not assigned to a specific MAINTAINERS section and hence have no dedicated maintainer. So, if needed, the files in ./include/ are also assigned to the fitting MAINTAINERS section, as I need to identify whom to send the clean-up patch anyway. Here is the change from this kernel-doc janitorial work in the ./include/ directory for MEMORY MANAGEMENT. This patch (of 2): Commit a520110e4a15 ("mm: split out a new pagewalk.h header from mm.h") adds a new file in ./include/linux, but misses to update MAINTAINERS accordingly. Hence, ./scripts/get_maintainers.pl include/linux/pagewalk.h points only to lkml as general fallback for all files, whereas the original include/linux/mm.h clearly marks this file part of MEMORY MANAGEMENT. Assign include/linux/pagewalk.h to MEMORY MANAGEMENT. Link: https://lkml.kernel.org/r/20210322122542.15072-1-lukas.bulwahn@gmail.com Link: https://lkml.kernel.org/r/20210322122542.15072-2-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Cc: Joe Perches Cc: Ralf Ramsauer Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a87132a229918fbc9d3cdacc61d3c8ae04e497ce Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 22:59:34 2021 -0700 mm/doc: add mm.h and mm_types.h to the mm-api document kerneldoc in include/linux/mm.h and include/linux/mm_types.h wasn't being included in the html build. Link: https://lkml.kernel.org/r/20210322195022.2143603-4-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport Cc: John Hubbard Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit da2f5eb3d344503c4d851bdf1ae2379167074413 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 22:59:31 2021 -0700 mm/doc: turn fault flags into an enum The kernel-doc script complains about include/linux/mm.h:425: warning: wrong kernel-doc identifier on line: * Fault flag definitions. I don't know how to document a series of #defines, so turn these definitions into an enum and document that instead. Link: https://lkml.kernel.org/r/20210322195022.2143603-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport Cc: John Hubbard Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 136dfc9949f84089217f84e6478471dabbf14ba7 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 22:59:28 2021 -0700 mm/doc: fix page_maybe_dma_pinned kerneldoc make htmldocs reports: include/linux/mm.h:1341: warning: Excess function parameter 'Return' description in 'page_maybe_dma_pinned' Fix a few other formatting nits while I'm editing this description. Link: https://lkml.kernel.org/r/20210322195022.2143603-2-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: Mike Rapoport Reviewed-by: John Hubbard Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 78f4841e34763079be0661744c1ca997be64eb56 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 22:59:25 2021 -0700 mm/doc: fix fault_flag_allow_retry_first kerneldoc make htmldocs reports: include/linux/mm.h:496: warning: Function parameter or member 'flags' not described in 'fault_flag_allow_retry_first' Add a description. Link: https://lkml.kernel.org/r/20210322195022.2143603-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Cc: John Hubbard Cc: Mike Rapoport Cc: Jonathan Corbet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 299420ba358c023ea70d7bab5f61c7744596f30f Author: Uladzislau Rezki (Sony) Date: Thu Apr 29 22:59:22 2021 -0700 mm/vmalloc: remove an empty line Link: https://lkml.kernel.org/r/20210402202237.20334-5-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Hillf Danton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Shuah Khan Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 187f8cc456f83e4745e326f3026a83a97e7814a1 Author: Uladzislau Rezki (Sony) Date: Thu Apr 29 22:59:19 2021 -0700 mm/vmalloc: refactor the preloading loagic Instead of keeping open-coded style, move the code related to preloading into a separate function. Therefore introduce the preload_this_cpu_lock() routine that prelaods a current CPU with one extra vmap_area object. There is no functional change as a result of this patch. Link: https://lkml.kernel.org/r/20210402202237.20334-4-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Hillf Danton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Shuah Khan Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7bc4ca3ea956669b4e14ee03108c6623a136edfa Author: Uladzislau Rezki (Sony) Date: Thu Apr 29 22:59:16 2021 -0700 vm/test_vmalloc.sh: adapt for updated driver interface A 'single_cpu_test' parameter is odd and it does not exist anymore. Instead there was introduced a 'nr_threads' one. If it is not set it behaves as the former parameter. That is why update a "stress mode" according to this change specifying number of workers which are equal to number of CPUs. Also update an output of help message based on a new interface. Link: https://lkml.kernel.org/r/20210402202237.20334-3-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Shuah Khan Cc: Hillf Danton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 80f4759964cc70ca8e3c793afbecbdc235ce7272 Author: Uladzislau Rezki (Sony) Date: Thu Apr 29 22:59:13 2021 -0700 lib/test_vmalloc.c: add a new 'nr_threads' parameter By using this parameter we can specify how many workers are created to perform vmalloc tests. By default it is one CPU. The maximum value is set to 1024. As a result of this change a 'single_cpu_test' one becomes obsolete, therefore it is no longer needed. [urezki@gmail.com: extend max value of nr_threads parameter] Link: https://lkml.kernel.org/r/20210406124536.19658-1-urezki@gmail.com Link: https://lkml.kernel.org/r/20210402202237.20334-2-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Hillf Danton Cc: Matthew Wilcox Cc: Michal Hocko Cc: Oleksiy Avramchenko Cc: Shuah Khan Cc: Steven Rostedt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a803315858bf8c6863f719f9fb251576fdf68a8c Author: Uladzislau Rezki (Sony) Date: Thu Apr 29 22:59:10 2021 -0700 lib/test_vmalloc.c: remove two kvfree_rcu() tests Remove two test cases related to kvfree_rcu() and SLAB. Those are considered as redundant now, because similar test functionality has recently been introduced in the "rcuscale" RCU test-suite. Link: https://lkml.kernel.org/r/20210402202237.20334-1-urezki@gmail.com Signed-off-by: Uladzislau Rezki (Sony) Cc: Hillf Danton Cc: Michal Hocko Cc: Matthew Wilcox Cc: Oleksiy Avramchenko Cc: Steven Rostedt Cc: Shuah Khan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ad216c0316ad6391d90f4de0a7f59396b2925a06 Author: Vijayanand Jitta Date: Thu Apr 29 22:59:07 2021 -0700 mm: vmalloc: prevent use after free in _vm_unmap_aliases A potential use after free can occur in _vm_unmap_aliases where an already freed vmap_area could be accessed, Consider the following scenario: Process 1 Process 2 __vm_unmap_aliases __vm_unmap_aliases purge_fragmented_blocks_allcpus rcu_read_lock() rcu_read_lock() list_del_rcu(&vb->free_list) list_for_each_entry_rcu(vb .. ) __purge_vmap_area_lazy kmem_cache_free(va) va_start = vb->va->va_start Here Process 1 is in purge path and it does list_del_rcu on vmap_block and later frees the vmap_area, since Process 2 was holding the rcu lock at this time vmap_block will still be present in and Process 2 accesse it and thereby it tries to access vmap_area of that vmap_block which was already freed by Process 1 and this results in use after free. Fix this by adding a check for vb->dirty before accessing vmap_area structure since vb->dirty will be set to VMAP_BBMAP_BITS in purge path checking for this will prevent the use after free. Link: https://lkml.kernel.org/r/1616062105-23263-1-git-send-email-vjitta@codeaurora.org Signed-off-by: Vijayanand Jitta Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d70bec8cc95ad32f6b7e3e6fad72acdd3a5418e9 Author: Nicholas Piggin Date: Thu Apr 29 22:59:04 2021 -0700 mm/vmalloc: improve allocation failure error messages There are several reasons why a vmalloc can fail, virtual space exhausted, page array allocation failure, page allocation failure, and kernel page table allocation failure. Add distinct warning messages for the main causes of failure, with some added information like page order or allocation size where applicable. [urezki@gmail.com: print correct vmalloc allocation size] Link: https://lkml.kernel.org/r/20210329193214.GA28602@pc638.lan Link: https://lkml.kernel.org/r/20210322021806.892164-6-npiggin@gmail.com Signed-off-by: Nicholas Piggin Signed-off-by: Uladzislau Rezki (Sony) Reviewed-by: Christoph Hellwig Cc: Cédric Le Goater Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4ad0ae8c64ac8f81a3651bca11be7c3cb086df80 Author: Nicholas Piggin Date: Thu Apr 29 22:59:01 2021 -0700 mm/vmalloc: remove unmap_kernel_range This is a shim around vunmap_range, get rid of it. Move the main API comment from the _noflush variant to the normal variant, and make _noflush internal to mm/. [npiggin@gmail.com: fix nommu builds and a comment bug per sfr] Link: https://lkml.kernel.org/r/1617292598.m6g0knx24s.astroid@bobo.none [akpm@linux-foundation.org: move vunmap_range_noflush() stub inside !CONFIG_MMU, not !CONFIG_NUMA] [npiggin@gmail.com: fix nommu builds] Link: https://lkml.kernel.org/r/1617292497.o1uhq5ipxp.astroid@bobo.none Link: https://lkml.kernel.org/r/20210322021806.892164-5-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Christoph Hellwig Cc: Cédric Le Goater Cc: Uladzislau Rezki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 94f88d7b901c28210d196f38168a548950dfc607 Author: Nicholas Piggin Date: Thu Apr 29 22:58:58 2021 -0700 powerpc/xive: remove unnecessary unmap_kernel_range iounmap will remove ptes. Link: https://lkml.kernel.org/r/20210322021806.892164-4-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Christoph Hellwig Acked-by: Cédric Le Goater Cc: Uladzislau Rezki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e82b9b3086b93857b1b46341714751b123a4d08b Author: Nicholas Piggin Date: Thu Apr 29 22:58:55 2021 -0700 kernel/dma: remove unnecessary unmap_kernel_range vunmap will remove ptes. Link: https://lkml.kernel.org/r/20210322021806.892164-3-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Christoph Hellwig Cc: Cédric Le Goater Cc: Uladzislau Rezki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b67177ecd956333029dbc1a4971a857fee0ccbb1 Author: Nicholas Piggin Date: Thu Apr 29 22:58:53 2021 -0700 mm/vmalloc: remove map_kernel_range Patch series "mm/vmalloc: cleanup after hugepage series", v2. Christoph pointed out some overdue cleanups required after the huge vmalloc series, and I had another failure error message improvement as well. This patch (of 5): This is a shim around vmap_pages_range, get rid of it. Move the main API comment from the _noflush variant to the normal variant, and make _noflush internal to mm/. Link: https://lkml.kernel.org/r/20210322021806.892164-1-npiggin@gmail.com Link: https://lkml.kernel.org/r/20210322021806.892164-2-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Christoph Hellwig Cc: Uladzislau Rezki Cc: Cédric Le Goater Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 121e6f3258fe393e22c36f61a319be8a4f2c05ae Author: Nicholas Piggin Date: Thu Apr 29 22:58:49 2021 -0700 mm/vmalloc: hugepage vmalloc mappings Support huge page vmalloc mappings. Config option HAVE_ARCH_HUGE_VMALLOC enables support on architectures that define HAVE_ARCH_HUGE_VMAP and supports PMD sized vmap mappings. vmalloc will attempt to allocate PMD-sized pages if allocating PMD size or larger, and fall back to small pages if that was unsuccessful. Architectures must ensure that any arch specific vmalloc allocations that require PAGE_SIZE mappings (e.g., module allocations vs strict module rwx) use the VM_NOHUGE flag to inhibit larger mappings. This can result in more internal fragmentation and memory overhead for a given allocation, an option nohugevmalloc is added to disable at boot. [colin.king@canonical.com: fix read of uninitialized pointer area] Link: https://lkml.kernel.org/r/20210318155955.18220-1-colin.king@canonical.com Link: https://lkml.kernel.org/r/20210317062402.533919-14-npiggin@gmail.com Signed-off-by: Nicholas Piggin Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Miaohe Lin Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5d87510de15f31d1b26cffced7bc4d504539a2c7 Author: Nicholas Piggin Date: Thu Apr 29 22:58:46 2021 -0700 mm/vmalloc: add vmap_range_noflush variant As a side-effect, the order of flush_cache_vmap() and arch_sync_kernel_mappings() calls are switched, but that now matches the other callers in this file. Link: https://lkml.kernel.org/r/20210317062402.533919-13-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Christoph Hellwig Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Miaohe Lin Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5e9e3d777b99aabe2f91f793a52e870a02642160 Author: Nicholas Piggin Date: Thu Apr 29 22:58:43 2021 -0700 mm: move vmap_range from mm/ioremap.c to mm/vmalloc.c This is a generic kernel virtual memory mapper, not specific to ioremap. Code is unchanged other than making vmap_range non-static. Link: https://lkml.kernel.org/r/20210317062402.533919-12-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Christoph Hellwig Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Miaohe Lin Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6f680e70b6ff58c9670769534196800233685d55 Author: Nicholas Piggin Date: Thu Apr 29 22:58:39 2021 -0700 mm/vmalloc: provide fallback arch huge vmap support functions If an architecture doesn't support a particular page table level as a huge vmap page size then allow it to skip defining the support query function. Link: https://lkml.kernel.org/r/20210317062402.533919-11-npiggin@gmail.com Signed-off-by: Nicholas Piggin Suggested-by: Christoph Hellwig Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Miaohe Lin Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 97dc2a1548ab0dc320ce3618b73b3f9dc732b6ee Author: Nicholas Piggin Date: Thu Apr 29 22:58:36 2021 -0700 x86: inline huge vmap supported functions This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Link: https://lkml.kernel.org/r/20210317062402.533919-10-npiggin@gmail.com Signed-off-by: Nicholas Piggin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Ding Tianhong Cc: Miaohe Lin Cc: Michael Ellerman Cc: Russell King Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 168a6333142bfa6dfb1f114110465760828bc6a3 Author: Nicholas Piggin Date: Thu Apr 29 22:58:33 2021 -0700 arm64: inline huge vmap supported functions This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Link: https://lkml.kernel.org/r/20210317062402.533919-9-npiggin@gmail.com Signed-off-by: Nicholas Piggin Acked-by: Catalin Marinas Cc: Will Deacon Cc: Borislav Petkov Cc: Christoph Hellwig Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Miaohe Lin Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8309c9d717024660185fab3c96705a9d7ed0d842 Author: Nicholas Piggin Date: Thu Apr 29 22:58:30 2021 -0700 powerpc: inline huge vmap supported functions This allows unsupported levels to be constant folded away, and so p4d_free_pud_page can be removed because it's no longer linked to. Link: https://lkml.kernel.org/r/20210317062402.533919-8-npiggin@gmail.com Signed-off-by: Nicholas Piggin Acked-by: Michael Ellerman Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Miaohe Lin Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bbc180a5adb05ee8053fab7a0c0bd56c5964240e Author: Nicholas Piggin Date: Thu Apr 29 22:58:26 2021 -0700 mm: HUGE_VMAP arch support cleanup This changes the awkward approach where architectures provide init functions to determine which levels they can provide large mappings for, to one where the arch is queried for each call. This removes code and indirection, and allows constant-folding of dead code for unsupported levels. This also adds a prot argument to the arch query. This is unused currently but could help with some architectures (e.g., some powerpc processors can't map uncacheable memory with large pages). Link: https://lkml.kernel.org/r/20210317062402.533919-7-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Ding Tianhong Acked-by: Catalin Marinas [arm64] Cc: Will Deacon Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Christoph Hellwig Cc: Miaohe Lin Cc: Michael Ellerman Cc: Russell King Cc: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 95f0ddf081af3a77433090d9deaf3f76f5648336 Author: Nicholas Piggin Date: Thu Apr 29 22:58:23 2021 -0700 mm/ioremap: rename ioremap_*_range to vmap_*_range This will be used as a generic kernel virtual mapping function, so re-name it in preparation. Link: https://lkml.kernel.org/r/20210317062402.533919-6-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Miaohe Lin Reviewed-by: Christoph Hellwig Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0a264884046f1ab0c906a61fd838002ecf9ef408 Author: Nicholas Piggin Date: Thu Apr 29 22:58:19 2021 -0700 mm/vmalloc: rename vmap_*_range vmap_pages_*_range The vmalloc mapper operates on a struct page * array rather than a linear physical address, re-name it to make this distinction clear. Link: https://lkml.kernel.org/r/20210317062402.533919-5-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Miaohe Lin Reviewed-by: Christoph Hellwig Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c95cba4925509c13fce6278456a0badb9e49775 Author: Nicholas Piggin Date: Thu Apr 29 22:58:16 2021 -0700 mm: apply_to_pte_range warn and fail if a large pte is encountered apply_to_pte_range might mistake a large pte for bad, or treat it as a page table, resulting in a crash or corruption. Add a test to warn and return error if large entries are found. Link: https://lkml.kernel.org/r/20210317062402.533919-4-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Miaohe Lin Reviewed-by: Christoph Hellwig Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c0eb315ad9719e41ce44708455cc69df7ac9f3f8 Author: Nicholas Piggin Date: Thu Apr 29 22:58:13 2021 -0700 mm/vmalloc: fix HUGE_VMAP regression by enabling huge pages in vmalloc_to_page vmalloc_to_page returns NULL for addresses mapped by larger pages[*]. Whether or not a vmap is huge depends on the architecture details, alignments, boot options, etc., which the caller can not be expected to know. Therefore HUGE_VMAP is a regression for vmalloc_to_page. This change teaches vmalloc_to_page about larger pages, and returns the struct page that corresponds to the offset within the large page. This makes the API agnostic to mapping implementation details. [*] As explained by commit 029c54b095995 ("mm/vmalloc.c: huge-vmap: fail gracefully on unexpected huge vmap mappings") [npiggin@gmail.com: sparc32: add stub pud_page define for walking huge vmalloc page tables] Link: https://lkml.kernel.org/r/20210324232825.1157363-1-npiggin@gmail.com Link: https://lkml.kernel.org/r/20210317062402.533919-3-npiggin@gmail.com Signed-off-by: Nicholas Piggin Reviewed-by: Miaohe Lin Reviewed-by: Christoph Hellwig Cc: Borislav Petkov Cc: Catalin Marinas Cc: Ding Tianhong Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Michael Ellerman Cc: Russell King Cc: Thomas Gleixner Cc: Uladzislau Rezki (Sony) Cc: Will Deacon Cc: Stephen Rothwell Cc: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 972472c7466b50efed4539694007951a3fc7b95c Author: Nicholas Piggin Date: Thu Apr 29 22:58:10 2021 -0700 ARM: mm: add missing pud_page define to 2-level page tables Patch series "huge vmalloc mappings", v13. The kernel virtual mapping layer grew support for mapping memory with > PAGE_SIZE ptes with commit 0ddab1d2ed66 ("lib/ioremap.c: add huge I/O map capability interfaces"), and implemented support for using those huge page mappings with ioremap. According to the submission, the use-case is mapping very large non-volatile memory devices, which could be GB or TB: https://lore.kernel.org/lkml/1425404664-19675-1-git-send-email-toshi.kani@hp.com/ The benefit is said to be in the overhead of maintaining the mapping, perhaps both in memory overhead and setup / teardown time. Memory overhead for the mapping with a 4kB page and 8 byte page table is 2GB per TB of mapping, down to 4MB / TB with 2MB pages. The same huge page vmap infrastructure can be quite easily adapted and used for mapping vmalloc memory pages without more complexity for arch or core vmap code. However unlike ioremap, vmalloc page table overhead is not a real problem, so the advantage to justify this is performance. Several of the most structures in the kernel (e.g., vfs and network hash tables) are allocated with vmalloc on NUMA machines, in order to distribute access bandwidth over the machine. Mapping these with larger pages can improve TLB usage significantly, for example this reduces TLB misses by nearly 30x on a `git diff` workload on a 2-node POWER9 (59,800 -> 2,100) and reduces CPU cycles by 0.54%, due to vfs hashes being allocated with 2MB pages. [ Other numbers? - The difference is even larger in a guest due to more costly TLB misses. - Eric Dumazet was keen on the network hash performance possibilities. - Other archs? Ding was doing x86 testing. ] The kernel module allocator also uses vmalloc to map module images even on non-NUMA, which can result in high iTLB pressure on highly modular distro type of kernels. This series does not implement huge mappings for modules yet, but it's a step along the way. Rick Edgecombe was looking at that IIRC. The per-cpu allocator similarly might be able to take advantage of this. Also on the todo list. The disadvantages of this I can see are: * Memory fragmentation can waste some physical memory because it will attempt to allocate larger pages to fit the required size, rounding up (once the requested size is >= 2MB). - I don't see it being a big problem in practice unless some user crops up that allocates thousands of 2.5MB ranges. We can tewak heuristics a bit there if needed to reduce peak waste. * Less granular mappings can make the NUMA distribution less balanced. - Similar to the above. - Could also allocate all major system hashes with one allocation up-front and spread them all across the one block, which should help overall NUMA distribution and reduce fragmentation waste. * Callers might expect something about the underlying allocated pages. - Tried to keep the apperance of base PAGE_SIZE pages throughout the APIs and exposed data structures. - Added a VM_NO_HUGE_VMAP flag to hammer troublesome cases with. - Finally, added a nohugevmalloc boot option to turn it off (independent of nohugeiomap). This patch (of 14): ARM uses its own PMD folding scheme which is missing pud_page which should just pass through to pmd_page. Move this from the 3-level page table to common header. Link: https://lkml.kernel.org/r/20210317062402.533919-2-npiggin@gmail.com Signed-off-by: Nicholas Piggin Cc: Russell King Cc: Ding Tianhong Cc: Uladzislau Rezki (Sony) Cc: Borislav Petkov Cc: Catalin Marinas Cc: Christoph Hellwig Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Miaohe Lin Cc: Michael Ellerman Cc: Thomas Gleixner Cc: Will Deacon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f608788cd2d6cae27d1a3d2253544ca76b353764 Author: Serapheim Dimitropoulos Date: Thu Apr 29 22:58:07 2021 -0700 mm/vmalloc: use rb_tree instead of list for vread() lookups vread() has been linearly searching vmap_area_list for looking up vmalloc areas to read from. These same areas are also tracked by a rb_tree (vmap_area_root) which offers logarithmic lookup. This patch modifies vread() to use the rb_tree structure instead of the list and the speedup for heavy /proc/kcore readers can be pretty significant. Below are the wall clock measurements of a Python application that leverages the drgn debugging library to read and interpret data read from /proc/kcore. Before the patch: ----- $ time sudo sdb -e 'dbuf | head 3000 | wc' (unsigned long)3000 real 0m22.446s user 0m2.321s sys 0m20.690s ----- With the patch: ----- $ time sudo sdb -e 'dbuf | head 3000 | wc' (unsigned long)3000 real 0m2.104s user 0m2.043s sys 0m0.921s ----- Link: https://lkml.kernel.org/r/20210209190253.108763-1-serapheim@delphix.com Signed-off-by: Serapheim Dimitropoulos Reviewed-by: Uladzislau Rezki (Sony) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0f71d7e14c2129c5b99aec6961a55b331f9dbaf1 Author: Christoph Hellwig Date: Thu Apr 29 22:58:04 2021 -0700 mm: unexport remap_vmalloc_range_partial remap_vmalloc_range_partial is only used to implement remap_vmalloc_range and by procfs. Unexport it. Link: https://lkml.kernel.org/r/20210301082235.932968-3-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Kirti Wankhede Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8c2acfe8c1df1c8baacbeee4c519683ae3f3d722 Author: Christoph Hellwig Date: Thu Apr 29 22:58:01 2021 -0700 samples/vfio-mdev/mdpy: use remap_vmalloc_range Patch series "remap_vmalloc_range cleanups". This series removes an open coded instance of remap_vmalloc_range and removes the unused remap_vmalloc_range_partial export. This patch (of 2): Use remap_vmalloc_range instead of open coding it using remap_vmalloc_range_partial. Link: https://lkml.kernel.org/r/20210301082235.932968-1-hch@lst.de Link: https://lkml.kernel.org/r/20210301082235.932968-2-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Kirti Wankhede Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2284f47fe9fe2ed2ef619e5474e155cfeeebd569 Author: Wang Wensheng Date: Thu Apr 29 22:57:58 2021 -0700 mm/sparse: add the missing sparse_buffer_fini() in error branch sparse_buffer_init() and sparse_buffer_fini() should appear in pair, or a WARN issue would be through the next time sparse_buffer_init() runs. Add the missing sparse_buffer_fini() in error branch. Link: https://lkml.kernel.org/r/20210325113155.118574-1-wangwensheng4@huawei.com Fixes: 85c77f791390 ("mm/sparse: add new sparse_init_nid() and sparse_init()") Signed-off-by: Wang Wensheng Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 943f229e9608104c11bf9a230883dbd121323532 Author: Zhiyuan Dai Date: Thu Apr 29 22:57:55 2021 -0700 mm/dmapool: switch from strlcpy to strscpy strlcpy is marked as deprecated in Documentation/process/deprecated.rst, and there is no functional difference when the caller expects truncation (when not checking the return value). strscpy is relatively better as it also avoids scanning the whole source string. Link: https://lkml.kernel.org/r/1613962050-14188-1-git-send-email-daizhiyuan@phytium.com.cn Signed-off-by: Zhiyuan Dai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8593100444e93861fb5c867bf8cc104543259714 Author: Brian Geffon Date: Thu Apr 29 22:57:52 2021 -0700 selftests: add a MREMAP_DONTUNMAP selftest for shmem This test extends the current mremap tests to validate that the MREMAP_DONTUNMAP operation can be performed on shmem mappings. Link: https://lkml.kernel.org/r/20210323182520.2712101-3-bgeffon@google.com Signed-off-by: Brian Geffon Cc: Axel Rasmussen Cc: Lokesh Gidra Cc: Mike Rapoport Cc: Peter Xu Cc: Hugh Dickins Cc: "Michael S . Tsirkin" Cc: Brian Geffon Cc: Andy Lutomirski Cc: Vlastimil Babka Cc: Andrea Arcangeli Cc: Sonny Rao Cc: Minchan Kim Cc: "Kirill A . Shutemov" Cc: Dmitry Safonov Cc: Michael Kerrisk Cc: Alejandro Colomar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 14d071134c740cfe61c09fc506fd3ab052beea10 Author: Brian Geffon Date: Thu Apr 29 22:57:48 2021 -0700 Revert "mremap: don't allow MREMAP_DONTUNMAP on special_mappings and aio" This reverts commit cd544fd1dc9293c6702fab6effa63dac1cc67e99. As discussed in [1] this commit was a no-op because the mapping type was checked in vma_to_resize before move_vma is ever called. This meant that vm_ops->mremap() would never be called on such mappings. Furthermore, we've since expanded support of MREMAP_DONTUNMAP to non-anonymous mappings, and these special mappings are still protected by the existing check of !VM_DONTEXPAND and !VM_PFNMAP which will result in a -EINVAL. 1. https://lkml.org/lkml/2020/12/28/2340 Link: https://lkml.kernel.org/r/20210323182520.2712101-2-bgeffon@google.com Signed-off-by: Brian Geffon Acked-by: Hugh Dickins Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Alejandro Colomar Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Axel Rasmussen Cc: "Kirill A . Shutemov" Cc: Lokesh Gidra Cc: Michael Kerrisk Cc: "Michael S . Tsirkin" Cc: Mike Rapoport Cc: Minchan Kim Cc: Peter Xu Cc: Sonny Rao Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a4609387859f0281951f5e476d9f76d7fb9ab321 Author: Brian Geffon Date: Thu Apr 29 22:57:45 2021 -0700 mm: extend MREMAP_DONTUNMAP to non-anonymous mappings Patch series "mm: Extend MREMAP_DONTUNMAP to non-anonymous mappings", v5. This patch (of 3): Currently MREMAP_DONTUNMAP only accepts private anonymous mappings. This restriction was placed initially for simplicity and not because there exists a technical reason to do so. This change will widen the support to include any mappings which are not VM_DONTEXPAND or VM_PFNMAP. The primary use case is to support MREMAP_DONTUNMAP on mappings which may have been created from a memfd. This change will result in mremap(MREMAP_DONTUNMAP) returning -EINVAL if VM_DONTEXPAND or VM_PFNMAP mappings are specified. Lokesh Gidra who works on the Android JVM, provided an explanation of how such a feature will improve Android JVM garbage collection: "Android is developing a new garbage collector (GC), based on userfaultfd. The garbage collector will use userfaultfd (uffd) on the java heap during compaction. On accessing any uncompacted page, the application threads will find it missing, at which point the thread will create the compacted page and then use UFFDIO_COPY ioctl to get it mapped and then resume execution. Before starting this compaction, in a stop-the-world pause the heap will be mremap(MREMAP_DONTUNMAP) so that the java heap is ready to receive UFFD_EVENT_PAGEFAULT events after resuming execution. To speedup mremap operations, pagetable movement was optimized by moving PUD entries instead of PTE entries [1]. It was necessary as mremap of even modest sized memory ranges also took several milliseconds, and stopping the application for that long isn't acceptable in response-time sensitive cases. With UFFDIO_CONTINUE feature [2], it will be even more efficient to implement this GC, particularly the 'non-moveable' portions of the heap. It will also help in reducing the need to copy (UFFDIO_COPY) the pages. However, for this to work, the java heap has to be on a 'shared' vma. Currently MREMAP_DONTUNMAP only supports private anonymous mappings, this patch will enable using UFFDIO_CONTINUE for the new userfaultfd-based heap compaction." [1] https://lore.kernel.org/linux-mm/20201215030730.NC3CU98e4%25akpm@linux-foundation.org/ [2] https://lore.kernel.org/linux-mm/20210302000133.272579-1-axelrasmussen@google.com/ Link: https://lkml.kernel.org/r/20210323182520.2712101-1-bgeffon@google.com Signed-off-by: Brian Geffon Acked-by: Hugh Dickins Tested-by: Lokesh Gidra Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Cc: Alejandro Colomar Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: "Kirill A . Shutemov" Cc: Michael Kerrisk Cc: "Michael S . Tsirkin" Cc: Mike Rapoport Cc: Minchan Kim Cc: Peter Xu Cc: Sonny Rao Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b99a342d4f11a5455d999b12f5fee42ab6acaf8c Author: Huang Ying Date: Thu Apr 29 22:57:41 2021 -0700 NUMA balancing: reduce TLB flush via delaying mapping on hint page fault With NUMA balancing, in hint page fault handler, the faulting page will be migrated to the accessing node if necessary. During the migration, TLB will be shot down on all CPUs that the process has run on recently. Because in the hint page fault handler, the PTE will be made accessible before the migration is tried. The overhead of TLB shooting down can be high, so it's better to be avoided if possible. In fact, if we delay mapping the page until migration, that can be avoided. This is what this patch doing. For the multiple threads applications, it's possible that a page is accessed by multiple threads almost at the same time. In the original implementation, because the first thread will install the accessible PTE before migrating the page, the other threads may access the page directly before the page is made inaccessible again during migration. While with the patch, the second thread will go through the page fault handler too. And because of the PageLRU() checking in the following code path, migrate_misplaced_page() numamigrate_isolate_page() isolate_lru_page() the migrate_misplaced_page() will return 0, and the PTE will be made accessible in the second thread. This will introduce a little more overhead. But we think the possibility for a page to be accessed by the multiple threads at the same time is low, and the overhead difference isn't too large. If this becomes a problem in some workloads, we need to consider how to reduce the overhead. To test the patch, we run a test case as follows on a 2-socket Intel server (1 NUMA node per socket) with 128GB DRAM (64GB per socket). 1. Run a memory eater on NUMA node 1 to use 40GB memory before running pmbench. 2. Run pmbench (normal accessing pattern) with 8 processes, and 8 threads per process, so there are 64 threads in total. The working-set size of each process is 8960MB, so the total working-set size is 8 * 8960MB = 70GB. The CPU of all pmbench processes is bound to node 1. The pmbench processes will access some DRAM on node 0. 3. After the pmbench processes run for 10 seconds, kill the memory eater. Now, some pages will be migrated from node 0 to node 1 via NUMA balancing. Test results show that, with the patch, the pmbench throughput (page accesses/s) increases 5.5%. The number of the TLB shootdowns interrupts reduces 98% (from ~4.7e7 to ~9.7e5) with about 9.2e6 pages (35.8GB) migrated. From the perf profile, it can be found that the CPU cycles spent by try_to_unmap() and its callees reduces from 6.02% to 0.47%. That is, the CPU cycles spent by TLB shooting down decreases greatly. Link: https://lkml.kernel.org/r/20210408132236.1175607-1-ying.huang@intel.com Signed-off-by: "Huang, Ying" Reviewed-by: Mel Gorman Cc: Peter Zijlstra Cc: Peter Xu Cc: Johannes Weiner Cc: Vlastimil Babka Cc: "Matthew Wilcox" Cc: Will Deacon Cc: Michel Lespinasse Cc: Arjun Roy Cc: "Kirill A. Shutemov" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b12d691ea5e01db42ccf3b4207e57cb3ce7cfe91 Author: Christoph Hellwig Date: Thu Apr 29 22:57:38 2021 -0700 i915: fix remap_io_sg to verify the pgprot remap_io_sg claims that the pgprot is pre-verified using an io_mapping, but actually does not get passed an io_mapping and just uses the pgprot in the VMA. Remove the apply_to_page_range abuse and just loop over remap_pfn_range for each segment. Note: this could use io_mapping_map_user by passing an iomap to remap_io_sg if the maintainers can verify that the pgprot in the iomap in the only caller is indeed the desired one here. Link: https://lkml.kernel.org/r/20210326055505.1424432-5-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Chris Wilson Cc: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Rodrigo Vivi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b739f125e4ebd73d10ed30a856574e13649119ed Author: Christoph Hellwig Date: Thu Apr 29 22:57:35 2021 -0700 i915: use io_mapping_map_user Replace the home-grown remap_io_mapping that abuses apply_to_page_range with the proper io_mapping_map_user interface. Link: https://lkml.kernel.org/r/20210326055505.1424432-4-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Chris Wilson Cc: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Rodrigo Vivi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1fbaf8fc12a0136c7e62e7ad6fe886fe1749912c Author: Christoph Hellwig Date: Thu Apr 29 22:57:32 2021 -0700 mm: add a io_mapping_map_user helper Add a helper that calls remap_pfn_range for an struct io_mapping, relying on the pgprot pre-validation done when creating the mapping instead of doing it at runtime. Link: https://lkml.kernel.org/r/20210326055505.1424432-3-hch@lst.de Signed-off-by: Christoph Hellwig Cc: Chris Wilson Cc: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Peter Zijlstra Cc: Rodrigo Vivi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 74ffa5a3e68504dd289135b1cf0422c19ffb3f2e Author: Christoph Hellwig Date: Thu Apr 29 22:57:29 2021 -0700 mm: add remap_pfn_range_notrack Patch series "add remap_pfn_range_notrack instead of reinventing it in i915", v2. i915 has some reason to want to avoid the track_pfn_remap overhead in remap_pfn_range. Add a function to the core VM to do just that rather than reinventing the functionality poorly in the driver. Note that the remap_io_sg path does get exercises when using Xorg on my Thinkpad X1, so this should be considered lightly tested, I've not managed to hit the remap_io_mapping path at all. This patch (of 4): Add a version of remap_pfn_range that does not call track_pfn_range. This will be used to fix horrible abuses of VM internals in the i915 driver. Link: https://lkml.kernel.org/r/20210326055505.1424432-1-hch@lst.de Link: https://lkml.kernel.org/r/20210326055505.1424432-2-hch@lst.de Signed-off-by: Christoph Hellwig Acked-by: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9001107820c647f65b57fb9c1ca2c0908b5fede Author: Ovidiu Panait Date: Thu Apr 29 22:57:26 2021 -0700 mm, tracing: improve rss_stat tracepoint message Adjust the rss_stat tracepoint to print the name of the resident page type that got updated (e.g. MM_ANONPAGES/MM_FILEPAGES), rather than the numeric index corresponding to it (the __entry->member value): Before this patch: ------------------ rss_stat: mm_id=1216113068 curr=0 member=1 size=28672B rss_stat: mm_id=1216113068 curr=0 member=1 size=0B rss_stat: mm_id=534402304 curr=1 member=0 size=188416B rss_stat: mm_id=534402304 curr=1 member=1 size=40960B After this patch: ----------------- rss_stat: mm_id=1726253524 curr=1 type=MM_ANONPAGES size=40960B rss_stat: mm_id=1726253524 curr=1 type=MM_FILEPAGES size=663552B rss_stat: mm_id=1726253524 curr=1 type=MM_ANONPAGES size=65536B rss_stat: mm_id=1726253524 curr=1 type=MM_FILEPAGES size=647168B Use TRACE_DEFINE_ENUM()/__print_symbolic() logic to map the enum values to the strings they represent, so that userspace tools can also parse the raw data correctly. Link: https://lkml.kernel.org/r/20210310162305.4862-1-ovidiu.panait@windriver.com Signed-off-by: Ovidiu Panait Suggested-by: Steven Rostedt (VMware) Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit faf1c0008a33d4ac6336f63a358641cf86926fc0 Author: Oscar Salvador Date: Thu Apr 29 22:57:22 2021 -0700 x86/vmemmap: optimize for consecutive sections in partial populated PMDs We can optimize in the case we are adding consecutive sections, so no memset(PAGE_UNUSED) is needed. In that case, let us keep track where the unused range of the previous memory range begins, so we can compare it with start of the range to be added. If they are equal, we know sections are added consecutively. For that purpose, let us introduce 'unused_pmd_start', which always holds the beginning of the unused memory range. In the case a section does not contiguously follow the previous one, we know we can memset [unused_pmd_start, PMD_BOUNDARY) with PAGE_UNUSE. This patch is based on a similar patch by David Hildenbrand: https://lore.kernel.org/linux-mm/20200722094558.9828-10-david@redhat.com/ Link: https://lkml.kernel.org/r/20210309214050.4674-5-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: "H . Peter Anvin" Cc: Ingo Molnar Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8d400913c231bd1da74067255816453f96cd35b0 Author: Oscar Salvador Date: Thu Apr 29 22:57:19 2021 -0700 x86/vmemmap: handle unpopulated sub-pmd ranges When sizeof(struct page) is not a power of 2, sections do not span a PMD anymore and so when populating them some parts of the PMD will remain unused. Because of this, PMDs will be left behind when depopulating sections since remove_pmd_table() thinks that those unused parts are still in use. Fix this by marking the unused parts with PAGE_UNUSED, so memchr_inv() will do the right thing and will let us free the PMD when the last user of it is gone. This patch is based on a similar patch by David Hildenbrand: https://lore.kernel.org/linux-mm/20200722094558.9828-9-david@redhat.com/ [osalvador@suse.de: go back to the ifdef version] Link: https://lkml.kernel.org/r/YGy++mSft7K4u+88@localhost.localdomain Link: https://lkml.kernel.org/r/20210309214050.4674-4-osalvador@suse.de Signed-off-by: Oscar Salvador Reviewed-by: David Hildenbrand Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: "H . Peter Anvin" Cc: Ingo Molnar Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 69ccfe74e16bcb61e4817f78ead31b973c36339c Author: Oscar Salvador Date: Thu Apr 29 22:57:16 2021 -0700 x86/vmemmap: drop handling of 1GB vmemmap ranges There is no code to allocate 1GB pages when mapping the vmemmap range as this might waste some memory and requires more complexity which is not really worth. Drop the dead code both for the aligned and unaligned cases and leave only the direct map handling. Link: https://lkml.kernel.org/r/20210309214050.4674-3-osalvador@suse.de Signed-off-by: Oscar Salvador Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: Borislav Petkov Cc: "H . Peter Anvin" Cc: Ingo Molnar Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e2df191ae7029010db386efd31be87d4d01cea6 Author: Oscar Salvador Date: Thu Apr 29 22:57:12 2021 -0700 x86/vmemmap: drop handling of 4K unaligned vmemmap range Patch series "Cleanup and fixups for vmemmap handling", v6. This series contains cleanups to remove dead code that handles unaligned cases for 4K and 1GB pages (patch#1 and patch#2) when removing the vemmmap range, and a fix (patch#3) to handle the case when two vmemmap ranges intersect the same PMD. This patch (of 4): remove_pte_table() is prepared to handle the case where either the start or the end of the range is not PAGE aligned. This cannot actually happen: __populate_section_memmap enforces the range to be PMD aligned, so as long as the size of the struct page remains multiple of 8, the vmemmap range will be aligned to PAGE_SIZE. Drop the dead code and place a VM_BUG_ON in vmemmap_{populate,free} to catch nasty cases. Note that the VM_BUG_ON is placed in there because vmemmap_{populate,free= } is the gate of all removing and freeing page tables logic. Link: https://lkml.kernel.org/r/20210309214050.4674-1-osalvador@suse.de Link: https://lkml.kernel.org/r/20210309214050.4674-2-osalvador@suse.de Signed-off-by: Oscar Salvador Suggested-by: David Hildenbrand Reviewed-by: David Hildenbrand Acked-by: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H . Peter Anvin" Cc: Michal Hocko Cc: Zi Yan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0c1dcb052452ed667719b20ca35837bcf9ca4375 Author: Zhiyuan Dai Date: Thu Apr 29 22:57:09 2021 -0700 mm/interval_tree: add comments to improve code readability Add a comment explaining the value of the ISSTATIC parameter, Inform the reader that this is not a coding style issue. Link: https://lkml.kernel.org/r/1613964695-17614-1-git-send-email-daizhiyuan@phytium.com.cn Signed-off-by: Zhiyuan Dai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bf90ac198e30d242a12fc550d35b335e462a7632 Author: Wang Qing Date: Thu Apr 29 22:57:07 2021 -0700 mm/memory.c: do_numa_page(): delete bool "migrated" Smatch gives the warning: do_numa_page() warn: assigning (-11) to unsigned variable 'migrated' Link: https://lkml.kernel.org/r/1614603421-2681-1-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing Reviewed-by: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9317d0fffeb4c3929069cfc7377cfa2a7cd36d1d Author: Johannes Weiner Date: Thu Apr 29 22:57:04 2021 -0700 mm: page_counter: mitigate consequences of a page_counter underflow When the unsigned page_counter underflows, even just by a few pages, a cgroup will not be able to run anything afterwards and trigger the OOM killer in a loop. Underflows shouldn't happen, but when they do in practice, we may just be off by a small amount that doesn't interfere with the normal operation - consequences don't need to be that dire. Reset the page_counter to 0 upon underflow. We'll issue a warning that the accounting will be off and then try to keep limping along. [ We used to do this with the original res_counter, where it was a more straight-forward correction inside the spinlock section. I didn't carry it forward into the lockless page counters for simplicity, but it turns out this is quite useful in practice. ] Link: https://lkml.kernel.org/r/20210408143155.2679744-1-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Michal Hocko Acked-by: Chris Down Reviewed-by: Shakeel Butt Cc: Hugh Dickins Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a10e995749a6c65833edd201c55665e5d44d14fc Author: Wan Jiabing Date: Thu Apr 29 22:57:01 2021 -0700 linux/memcontrol.h: remove duplicate struct declaration struct mem_cgroup is declared twice. One has been declared at forward struct declaration. Remove the duplicate. Link: https://lkml.kernel.org/r/20210330020246.2265371-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Reviewed-by: Muchun Song Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit bd290e1e75d8a8b2d87031b63db56ae165677870 Author: Muchun Song Date: Thu Apr 29 22:56:58 2021 -0700 mm: memcontrol: move PageMemcgKmem to the scope of CONFIG_MEMCG_KMEM The page only can be marked as kmem when CONFIG_MEMCG_KMEM is enabled. So move PageMemcgKmem() to the scope of the CONFIG_MEMCG_KMEM. As a bonus, on !CONFIG_MEMCG_KMEM build some code can be compiled out. Link: https://lkml.kernel.org/r/20210319163821.20704-8-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f1286fae540697e0b4713a8262f4aab5cf65f1c5 Author: Muchun Song Date: Thu Apr 29 22:56:55 2021 -0700 mm: memcontrol: inline __memcg_kmem_{un}charge() into obj_cgroup_{un}charge_pages() There is only one user of __memcg_kmem_charge(), so manually inline __memcg_kmem_charge() to obj_cgroup_charge_pages(). Similarly manually inline __memcg_kmem_uncharge() into obj_cgroup_uncharge_pages() and call obj_cgroup_uncharge_pages() in obj_cgroup_release(). This is just code cleanup without any functionality changes. Link: https://lkml.kernel.org/r/20210319163821.20704-7-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Cc: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b4e0b68fbd9d1fd7e31cbe8adca3ad6cf556e2ee Author: Muchun Song Date: Thu Apr 29 22:56:52 2021 -0700 mm: memcontrol: use obj_cgroup APIs to charge kmem pages Since Roman's series "The new cgroup slab memory controller" applied. All slab objects are charged via the new APIs of obj_cgroup. The new APIs introduce a struct obj_cgroup to charge slab objects. It prevents long-living objects from pinning the original memory cgroup in the memory. But there are still some corner objects (e.g. allocations larger than order-1 page on SLUB) which are not charged via the new APIs. Those objects (include the pages which are allocated from buddy allocator directly) are charged as kmem pages which still hold a reference to the memory cgroup. We want to reuse the obj_cgroup APIs to charge the kmem pages. If we do that, we should store an object cgroup pointer to page->memcg_data for the kmem pages. Finally, page->memcg_data will have 3 different meanings. 1) For the slab pages, page->memcg_data points to an object cgroups vector. 2) For the kmem pages (exclude the slab pages), page->memcg_data points to an object cgroup. 3) For the user pages (e.g. the LRU pages), page->memcg_data points to a memory cgroup. We do not change the behavior of page_memcg() and page_memcg_rcu(). They are also suitable for LRU pages and kmem pages. Why? Because memory allocations pinning memcgs for a long time - it exists at a larger scale and is causing recurring problems in the real world: page cache doesn't get reclaimed for a long time, or is used by the second, third, fourth, ... instance of the same job that was restarted into a new cgroup every time. Unreclaimable dying cgroups pile up, waste memory, and make page reclaim very inefficient. We can convert LRU pages and most other raw memcg pins to the objcg direction to fix this problem, and then the page->memcg will always point to an object cgroup pointer. At that time, LRU pages and kmem pages will be treated the same. The implementation of page_memcg() will remove the kmem page check. This patch aims to charge the kmem pages by using the new APIs of obj_cgroup. Finally, the page->memcg_data of the kmem page points to an object cgroup. We can use the __page_objcg() to get the object cgroup associated with a kmem page. Or we can use page_memcg() to get the memory cgroup associated with a kmem page, but caller must ensure that the returned memcg won't be released (e.g. acquire the rcu_read_lock or css_set_lock). Link: https://lkml.kernel.org/r/20210401030141.37061-1-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20210319163821.20704-6-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Reviewed-by: Miaohe Lin Cc: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Cc: Christian Borntraeger [songmuchun@bytedance.com: fix forget to obtain the ref to objcg in split_page_memcg] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7ab345a8973017c89a1be87b6c8722d1fee1fd95 Author: Muchun Song Date: Thu Apr 29 22:56:48 2021 -0700 mm: memcontrol: change ug->dummy_page only if memcg changed Just like assignment to ug->memcg, we only need to update ug->dummy_page if memcg changed. So move it to there. This is a very small optimization. Link: https://lkml.kernel.org/r/20210319163821.20704-5-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Cc: Michal Hocko Cc: Roman Gushchin Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 48060834f2277374bb68c04c62de8b57e769f701 Author: Muchun Song Date: Thu Apr 29 22:56:45 2021 -0700 mm: memcontrol: directly access page->memcg_data in mm/page_alloc.c page_memcg() is not suitable for use by page_expected_state() and page_bad_reason(). Because it can BUG_ON() for the slab pages when CONFIG_DEBUG_VM is enabled. As neither lru, nor kmem, nor slab page should have anything left in there by the time the page is freed, what we care about is whether the value of page->memcg_data is 0. So just directly access page->memcg_data here. Link: https://lkml.kernel.org/r/20210319163821.20704-4-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Cc: Michal Hocko Cc: Roman Gushchin Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e74d225910ec3a9999f06934afa068b6a30babf8 Author: Muchun Song Date: Thu Apr 29 22:56:42 2021 -0700 mm: memcontrol: introduce obj_cgroup_{un}charge_pages We know that the unit of slab object charging is bytes, the unit of kmem page charging is PAGE_SIZE. If we want to reuse obj_cgroup APIs to charge the kmem pages, we should pass PAGE_SIZE (as third parameter) to obj_cgroup_charge(). Because the size is already PAGE_SIZE, we can skip touch the objcg stock. And obj_cgroup_{un}charge_pages() are introduced to charge in units of page level. In the latter patch, we also can reuse those two helpers to charge or uncharge a number of kernel pages to a object cgroup. This is just a code movement without any functional changes. Link: https://lkml.kernel.org/r/20210319163821.20704-3-songmuchun@bytedance.com Signed-off-by: Muchun Song Acked-by: Roman Gushchin Acked-by: Johannes Weiner Reviewed-by: Shakeel Butt Cc: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f38f03ae8d5f57371b71aa6b4275765b65454fd Author: Muchun Song Date: Thu Apr 29 22:56:39 2021 -0700 mm: memcontrol: slab: fix obtain a reference to a freeing memcg Patch series "Use obj_cgroup APIs to charge kmem pages", v5. Since Roman's series "The new cgroup slab memory controller" applied. All slab objects are charged with the new APIs of obj_cgroup. The new APIs introduce a struct obj_cgroup to charge slab objects. It prevents long-living objects from pinning the original memory cgroup in the memory. But there are still some corner objects (e.g. allocations larger than order-1 page on SLUB) which are not charged with the new APIs. Those objects (include the pages which are allocated from buddy allocator directly) are charged as kmem pages which still hold a reference to the memory cgroup. E.g. We know that the kernel stack is charged as kmem pages because the size of the kernel stack can be greater than 2 pages (e.g. 16KB on x86_64 or arm64). If we create a thread (suppose the thread stack is charged to memory cgroup A) and then move it from memory cgroup A to memory cgroup B. Because the kernel stack of the thread hold a reference to the memory cgroup A. The thread can pin the memory cgroup A in the memory even if we remove the cgroup A. If we want to see this scenario by using the following script. We can see that the system has added 500 dying cgroups (This is not a real world issue, just a script to show that the large kmallocs are charged as kmem pages which can pin the memory cgroup in the memory). #!/bin/bash cat /proc/cgroups | grep memory cd /sys/fs/cgroup/memory echo 1 > memory.move_charge_at_immigrate for i in range{1..500} do mkdir kmem_test echo $$ > kmem_test/cgroup.procs sleep 3600 & echo $$ > cgroup.procs echo `cat kmem_test/cgroup.procs` > cgroup.procs rmdir kmem_test done cat /proc/cgroups | grep memory This patchset aims to make those kmem pages to drop the reference to memory cgroup by using the APIs of obj_cgroup. Finally, we can see that the number of the dying cgroups will not increase if we run the above test script. This patch (of 7): The rcu_read_lock/unlock only can guarantee that the memcg will not be freed, but it cannot guarantee the success of css_get (which is in the refill_stock when cached memcg changed) to memcg. rcu_read_lock() memcg = obj_cgroup_memcg(old) __memcg_kmem_uncharge(memcg) refill_stock(memcg) if (stock->cached != memcg) // css_get can change the ref counter from 0 back to 1. css_get(&memcg->css) rcu_read_unlock() This fix is very like the commit: eefbfa7fd678 ("mm: memcg/slab: fix use after free in obj_cgroup_charge") Fix this by holding a reference to the memcg which is passed to the __memcg_kmem_uncharge() before calling __memcg_kmem_uncharge(). Link: https://lkml.kernel.org/r/20210319163821.20704-1-songmuchun@bytedance.com Link: https://lkml.kernel.org/r/20210319163821.20704-2-songmuchun@bytedance.com Fixes: 3de7d4f25a74 ("mm: memcg/slab: optimize objcg stock draining") Signed-off-by: Muchun Song Reviewed-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Johannes Weiner Cc: Michal Hocko Cc: Vladimir Davydov Cc: Xiongchun Duan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0add0c77a9bd0ce7cd3b53894fb08154881402a4 Author: Shakeel Butt Date: Thu Apr 29 22:56:36 2021 -0700 memcg: charge before adding to swapcache on swapin Currently the kernel adds the page, allocated for swapin, to the swapcache before charging the page. This is fine but now we want a per-memcg swapcache stat which is essential for folks who wants to transparently migrate from cgroup v1's memsw to cgroup v2's memory and swap counters. In addition charging a page before exposing it to other parts of the kernel is a step in the right direction. To correctly maintain the per-memcg swapcache stat, this patch has adopted to charge the page before adding it to swapcache. One challenge in this option is the failure case of add_to_swap_cache() on which we need to undo the mem_cgroup_charge(). Specifically undoing mem_cgroup_uncharge_swap() is not simple. To resolve the issue, this patch decouples the charging for swapin pages from mem_cgroup_charge(). Two new functions are introduced, mem_cgroup_swapin_charge_page() for just charging the swapin page and mem_cgroup_swapin_uncharge_swap() for uncharging the swap slot once the page has been successfully added to the swapcache. [shakeelb@google.com: set page->private before calling swap_readpage] Link: https://lkml.kernel.org/r/20210318015959.2986837-1-shakeelb@google.com Link: https://lkml.kernel.org/r/20210305212639.775498-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Roman Gushchin Acked-by: Johannes Weiner Acked-by: Hugh Dickins Tested-by: Heiko Carstens Cc: Michal Hocko Cc: Stephen Rothwell Cc: Christian Borntraeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4bbcc5a41c5449f6a67edb3fbc2dccae9c6724db Author: Johannes Weiner Date: Thu Apr 29 22:56:33 2021 -0700 kselftests: cgroup: update kmem test for new vmstat implementation With memcg having switched to rstat, memory.stat output is precise. Update the cgroup selftest to reflect the expectations and error tolerances of the new implementation. Also add newly tracked types of memory to the memory.stat side of the equation, since they're included in memory.current and could throw false positives. Link: https://lkml.kernel.org/r/20210209163304.77088-9-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Shakeel Butt Reviewed-by: Michal Koutný Acked-by: Roman Gushchin Cc: Michal Hocko Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2cd21c89800c2203331e5564df2155757ded2e86 Author: Johannes Weiner Date: Thu Apr 29 22:56:29 2021 -0700 mm: memcontrol: consolidate lruvec stat flushing There are two functions to flush the per-cpu data of an lruvec into the rest of the cgroup tree: when the cgroup is being freed, and when a CPU disappears during hotplug. The difference is whether all CPUs or just one is being collected, but the rest of the flushing code is the same. Merge them into one function and share the common code. Link: https://lkml.kernel.org/r/20210209163304.77088-8-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Roman Gushchin Cc: Michal Koutný Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2d146aa3aa842d7f5065802556b4f9a2c6e8ef12 Author: Johannes Weiner Date: Thu Apr 29 22:56:26 2021 -0700 mm: memcontrol: switch to rstat Replace the memory controller's custom hierarchical stats code with the generic rstat infrastructure provided by the cgroup core. The current implementation does batched upward propagation from the write side (i.e. as stats change). The per-cpu batches introduce an error, which is multiplied by the number of subgroups in a tree. In systems with many CPUs and sizable cgroup trees, the error can be large enough to confuse users (e.g. 32 batch pages * 32 CPUs * 32 subgroups results in an error of up to 128M per stat item). This can entirely swallow allocation bursts inside a workload that the user is expecting to see reflected in the statistics. In the past, we've done read-side aggregation, where a memory.stat read would have to walk the entire subtree and add up per-cpu counts. This became problematic with lazily-freed cgroups: we could have large subtrees where most cgroups were entirely idle. Hence the switch to change-driven upward propagation. Unfortunately, it needed to trade accuracy for speed due to the write side being so hot. Rstat combines the best of both worlds: from the write side, it cheaply maintains a queue of cgroups that have pending changes, so that the read side can do selective tree aggregation. This way the reported stats will always be precise and recent as can be, while the aggregation can skip over potentially large numbers of idle cgroups. The way rstat works is that it implements a tree for tracking cgroups with pending local changes, as well as a flush function that walks the tree upwards. The controller then drives this by 1) telling rstat when a local cgroup stat changes (e.g. mod_memcg_state) and 2) when a flush is required to get uptodate hierarchy stats for a given subtree (e.g. when memory.stat is read). The controller also provides a flush callback that is called during the rstat flush walk for each cgroup and aggregates its local per-cpu counters and propagates them upwards. This adds a second vmstats to struct mem_cgroup (MEMCG_NR_STAT + NR_VM_EVENT_ITEMS) to track pending subtree deltas during upward aggregation. It removes 3 words from the per-cpu data. It eliminates memcg_exact_page_state(), since memcg_page_state() is now exact. [akpm@linux-foundation.org: merge fix] [hannes@cmpxchg.org: fix a sleep in atomic section problem] Link: https://lkml.kernel.org/r/20210315234100.64307-1-hannes@cmpxchg.org Link: https://lkml.kernel.org/r/20210209163304.77088-7-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Acked-by: Michal Hocko Reviewed-by: Shakeel Butt Reviewed-by: Michal Koutný Acked-by: Balbir Singh Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc26532aed0ab25c0801a34640d1f3b9b9098a48 Author: Johannes Weiner Date: Thu Apr 29 22:56:23 2021 -0700 cgroup: rstat: punt root-level optimization to individual controllers Current users of the rstat code can source root-level statistics from the native counters of their respective subsystem, allowing them to forego aggregation at the root level. This optimization is currently implemented inside the generic rstat code, which doesn't track the root cgroup and doesn't invoke the subsystem flush callbacks on it. However, the memory controller cannot do this optimization, because cgroup1 breaks out memory specifically for the local level, including at the root level. In preparation for the memory controller switching to rstat, move the optimization from rstat core to the controllers. Afterwards, rstat will always track the root cgroup for changes and invoke the subsystem callbacks on it; and it's up to the subsystem to special-case and skip aggregation of the root cgroup if it can source this information through other, cheaper means. This is the case for the io controller and the cgroup base stats. In their respective flush callbacks, check whether the parent is the root cgroup, and if so, skip the unnecessary upward propagation. The extra cost of tracking the root cgroup is negligible: on stat changes, we actually remove a branch that checks for the root. The queueing for a flush touches only per-cpu data, and only the first stat change since a flush requires a (per-cpu) lock. Link: https://lkml.kernel.org/r/20210209163304.77088-6-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Tejun Heo Cc: Michal Hocko Cc: Michal Koutný Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a7df69b81aac5bdeb5c5aef9addd680ce22feebf Author: Johannes Weiner Date: Thu Apr 29 22:56:20 2021 -0700 cgroup: rstat: support cgroup1 Rstat currently only supports the default hierarchy in cgroup2. In order to replace memcg's private stats infrastructure - used in both cgroup1 and cgroup2 - with rstat, the latter needs to support cgroup1. The initialization and destruction callbacks for regular cgroups are already in place. Remove the cgroup_on_dfl() guards to handle cgroup1. The initialization of the root cgroup is currently hardcoded to only handle cgrp_dfl_root.cgrp. Move those callbacks to cgroup_setup_root() and cgroup_destroy_root() to handle the default root as well as the various cgroup1 roots we may set up during mounting. The linking of css to cgroups happens in code shared between cgroup1 and cgroup2 as well. Simply remove the cgroup_on_dfl() guard. Linkage of the root css to the root cgroup is a bit trickier: per default, the root css of a subsystem controller belongs to the default hierarchy (i.e. the cgroup2 root). When a controller is mounted in its cgroup1 version, the root css is stolen and moved to the cgroup1 root; on unmount, the css moves back to the default hierarchy. Annotate rebind_subsystems() to move the root css linkage along between roots. Link: https://lkml.kernel.org/r/20210209163304.77088-5-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Roman Gushchin Reviewed-by: Shakeel Butt Acked-by: Tejun Heo Reviewed-by: Michal Koutný Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a18e6e6e150a98b9ce3e9acabeff407e7b6ba0c0 Author: Johannes Weiner Date: Thu Apr 29 22:56:17 2021 -0700 mm: memcontrol: privatize memcg_page_state query functions There are no users outside of the memory controller itself. The rest of the kernel cares either about node or lruvec stats. Link: https://lkml.kernel.org/r/20210209163304.77088-4-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Shakeel Butt Reviewed-by: Roman Gushchin Acked-by: Michal Hocko Reviewed-by: Michal Koutný Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3747b53b1771a787fea71d86a2fc39aea337685 Author: Johannes Weiner Date: Thu Apr 29 22:56:14 2021 -0700 mm: memcontrol: kill mem_cgroup_nodeinfo() No need to encapsulate a simple struct member access. Link: https://lkml.kernel.org/r/20210209163304.77088-3-hannes@cmpxchg.org Signed-off-by: Johannes Weiner Reviewed-by: Shakeel Butt Reviewed-by: Roman Gushchin Acked-by: Michal Hocko Reviewed-by: Michal Koutný Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a3d4c05a447486b90298a8c964916c8f4fcb903f Author: Johannes Weiner Date: Thu Apr 29 22:56:11 2021 -0700 mm: memcontrol: fix cpuhotplug statistics flushing Patch series "mm: memcontrol: switch to rstat", v3. This series converts memcg stats tracking to the streamlined rstat infrastructure provided by the cgroup core code. rstat is already used by the CPU controller and the IO controller. This change is motivated by recent accuracy problems in memcg's custom stats code, as well as the benefits of sharing common infra with other controllers. The current memcg implementation does batched tree aggregation on the write side: local stat changes are cached in per-cpu counters, which are then propagated upward in batches when a threshold (32 pages) is exceeded. This is cheap, but the error introduced by the lazy upward propagation adds up: 32 pages times CPUs times cgroups in the subtree. We've had complaints from service owners that the stats do not reliably track and react to allocation behavior as expected, sometimes swallowing the results of entire test applications. The original memcg stat implementation used to do tree aggregation exclusively on the read side: local stats would only ever be tracked in per-cpu counters, and a memory.stat read would iterate the entire subtree and sum those counters up. This didn't keep up with the times: - Cgroup trees are much bigger now. We switched to lazily-freed cgroups, where deleted groups would hang around until their remaining page cache has been reclaimed. This can result in large subtrees that are expensive to walk, while most of the groups are idle and their statistics don't change much anymore. - Automated monitoring increased. With the proliferation of userspace oom killing, proactive reclaim, and higher-resolution logging of workload trends in general, top-level stat files are polled at least once a second in many deployments. - The lifetime of cgroups got shorter. Where most cgroup setups in the past would have a few large policy-oriented cgroups for everything running on the system, newer cgroup deployments tend to create one group per application - which gets deleted again as the processes exit. An aggregation scheme that doesn't retain child data inside the parents loses event history of the subtree. Rstat addresses all three of those concerns through intelligent, persistent read-side aggregation. As statistics change at the local level, rstat tracks - on a per-cpu basis - only those parts of a subtree that have changes pending and require aggregation. The actual aggregation occurs on the colder read side - which can now skip over (potentially large) numbers of recently idle cgroups. === The test_kmem cgroup selftest is currently failing due to excessive cumulative vmstat drift from 100 subgroups: ok 1 test_kmem_basic memory.current = 8810496 slab + anon + file + kernel_stack = 17074568 slab = 6101384 anon = 946176 file = 0 kernel_stack = 10027008 not ok 2 test_kmem_memcg_deletion ok 3 test_kmem_proc_kpagecgroup ok 4 test_kmem_kernel_stacks ok 5 test_kmem_dead_cgroups ok 6 test_percpu_basic As you can see, memory.stat items far exceed memory.current. The kernel stack alone is bigger than all of charged memory. That's because the memory of the test has been uncharged from memory.current, but the negative vmstat deltas are still sitting in the percpu caches. The test at this time isn't even counting percpu, pagetables etc. yet, which would further contribute to the error. The last patch in the series updates the test to include them - as well as reduces the vmstat tolerances in general to only expect page_counter batching. With all patches applied, the (now more stringent) test succeeds: ok 1 test_kmem_basic ok 2 test_kmem_memcg_deletion ok 3 test_kmem_proc_kpagecgroup ok 4 test_kmem_kernel_stacks ok 5 test_kmem_dead_cgroups ok 6 test_percpu_basic === A kernel build test confirms that overhead is comparable. Two kernels are built simultaneously in a nested tree with several idle siblings: root - kernelbuild - one - two - three - four - build-a (defconfig, make -j16) `- build-b (defconfig, make -j16) `- idle-1 `- ... `- idle-9 During the builds, kernelbuild/memory.stat is read once a second. A perf diff shows that the changes in cycle distribution is minimal. Top 10 kernel symbols: 0.09% +0.08% [kernel.kallsyms] [k] __mod_memcg_lruvec_state 0.00% +0.06% [kernel.kallsyms] [k] cgroup_rstat_updated 0.08% -0.05% [kernel.kallsyms] [k] __mod_memcg_state.part.0 0.16% -0.04% [kernel.kallsyms] [k] release_pages 0.00% +0.03% [kernel.kallsyms] [k] __count_memcg_events 0.01% +0.03% [kernel.kallsyms] [k] mem_cgroup_charge_statistics.constprop.0 0.10% -0.02% [kernel.kallsyms] [k] get_mem_cgroup_from_mm 0.05% -0.02% [kernel.kallsyms] [k] mem_cgroup_update_lru_size 0.57% +0.01% [kernel.kallsyms] [k] asm_exc_page_fault === The on-demand aggregated stats are now fully accurate: $ grep -e nr_inactive_file /proc/vmstat | awk '{print($1,$2*4096)}'; \ grep -e inactive_file /sys/fs/cgroup/memory.stat vanilla: patched: nr_inactive_file 1574105088 nr_inactive_file 1027801088 inactive_file 1577410560 inactive_file 1027801088 === This patch (of 8): The memcg hotunplug callback erroneously flushes counts on the local CPU, not the counts of the CPU going away; those counts will be lost. Flush the CPU that is actually going away. Also simplify the code a bit by using mod_memcg_state() and count_memcg_events() instead of open-coding the upward flush - this is comparable to how vmstat.c handles hotunplug flushing. Link: https://lkml.kernel.org/r/20210209163304.77088-1-hannes@cmpxchg.org Link: https://lkml.kernel.org/r/20210209163304.77088-2-hannes@cmpxchg.org Fixes: a983b5ebee572 ("mm: memcontrol: fix excessive complexity in memory.stat reporting") Signed-off-by: Johannes Weiner Reviewed-by: Shakeel Butt Reviewed-by: Roman Gushchin Reviewed-by: Michal Koutný Acked-by: Michal Hocko Cc: Tejun Heo Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3d0cbb9816935ea3846eb2c0d3c07cd31697267e Author: Shakeel Butt Date: Thu Apr 29 22:56:08 2021 -0700 memcg: enable memcg oom-kill for __GFP_NOFAIL In the era of async memcg oom-killer, the commit a0d8b00a3381 ("mm: memcg: do not declare OOM from __GFP_NOFAIL allocations") added the code to skip memcg oom-killer for __GFP_NOFAIL allocations. The reason was that the __GFP_NOFAIL callers will not enter aync oom synchronization path and will keep the task marked as in memcg oom. At that time the tasks marked in memcg oom can bypass the memcg limits and the oom synchronization would have happened later in the later userspace triggered page fault. Thus letting the task marked as under memcg oom bypass the memcg limit for arbitrary time. With the synchronous memcg oom-killer (commit 29ef680ae7c21 ("memcg, oom: move out_of_memory back to the charge path")) and not letting the task marked under memcg oom to bypass the memcg limits (commit 1f14c1ac19aa4 ("mm: memcg: do not allow task about to OOM kill to bypass the limit")), we can again allow __GFP_NOFAIL allocations to trigger memcg oom-kill. This will make memcg oom behavior closer to page allocator oom behavior. Link: https://lkml.kernel.org/r/20210223204337.2785120-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Johannes Weiner Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit a47920306c72acaa6ab935c174476ec1d2c7284d Author: Shakeel Butt Date: Thu Apr 29 22:56:05 2021 -0700 memcg: cleanup root memcg checks Replace the implicit checking of root memcg with explicit root memcg checking i.e. !css->parent with mem_cgroup_is_root(). Link: https://lkml.kernel.org/r/20210223205625.2792891-1-shakeelb@google.com Signed-off-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Johannes Weiner Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 27faca83a7e955e4e0b831d75a8a9a840fe9bae4 Author: Muchun Song Date: Thu Apr 29 22:56:02 2021 -0700 mm: memcontrol: fix kernel stack account For simplification commit 991e7673859e ("mm: memcontrol: account kernel stack per node") changed the per zone vmalloc backed stack pages accounting to per node. By doing that we have lost a certain precision because those pages might live in different NUMA nodes. In the end NR_KERNEL_STACK_KB exported to the userspace might be over estimated on some nodes while underestimated on others. But this is not a real world problem, just a problem found by reading the code. So there is no actual data to showing how much impact it has on users. This doesn't impose any real problem to correctnes of the kernel behavior as the counter is not used for any internal processing but it can cause some confusion to the userspace. Address the problem by accounting each vmalloc backing page to its own node. Link: https://lkml.kernel.org/r/20210303151843.81156-1-songmuchun@bytedance.com Signed-off-by: Muchun Song Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Johannes Weiner Acked-by: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 2840d498e30ce53a3a7cb482a5445efd892c7697 Author: Zhiyuan Dai Date: Thu Apr 29 22:55:59 2021 -0700 mm/memremap.c: fix improper SPDX comment style Replace /* */ comment with //, fix SPDX comment style. see: Documentation/process/license-rules.rst Link: https://lkml.kernel.org/r/1614223348-15516-1-git-send-email-daizhiyuan@phytium.com.cn Signed-off-by: Zhiyuan Dai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4066c119483af8e86a75447fd35be1d2553d370f Author: Yang Shi Date: Thu Apr 29 22:55:56 2021 -0700 mm: gup: remove FOLL_SPLIT Since commit 5a52c9df62b4 ("uprobe: use FOLL_SPLIT_PMD instead of FOLL_SPLIT") and commit ba925fa35057 ("s390/gmap: improve THP splitting") FOLL_SPLIT has not been used anymore. Remove the dead code. Link: https://lkml.kernel.org/r/20210330203900.9222-1-shy828301@gmail.com Signed-off-by: Yang Shi Reviewed-by: John Hubbard Reviewed-by: Jason Gunthorpe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1d4b0166e36334c3f32686a336bb25dd904fce2b Author: Joao Martins Date: Thu Apr 29 22:55:53 2021 -0700 RDMA/umem: batch page unpin in __ib_umem_release() Use the newly added unpin_user_page_range_dirty_lock() for more quickly unpinning a consecutive range of pages represented as compound pages. This will also calculate number of pages to unpin (for the tail pages which matching head page) and thus batch the refcount update. Running a test program which calls memory range reg/unreg on a region 1G in size and measures cost of both operations together (in a guest using rxe) with THP and hugetlbfs: Before: 590 rounds in 5.003 sec: 8480.335 usec / round 6898 rounds in 60.001 sec: 8698.367 usec / round After: 2688 rounds in 5.002 sec: 1860.786 usec / round 32517 rounds in 60.001 sec: 1845.225 usec / round Link: https://lkml.kernel.org/r/20210212130843.13865-5-joao.m.martins@oracle.com Signed-off-by: Joao Martins Acked-by: Jason Gunthorpe Cc: Christoph Hellwig Cc: Doug Ledford Cc: John Hubbard Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 458a4f788f8602e5701b3d8c2fb6b021310a7301 Author: Joao Martins Date: Thu Apr 29 22:55:50 2021 -0700 mm/gup: add a range variant of unpin_user_pages_dirty_lock() Add an unpin_user_page_range_dirty_lock() API which takes a starting page and how many consecutive pages we want to unpin and optionally dirty. To that end, define another iterator for_each_compound_range() that operates in page ranges as opposed to page array. For users (like RDMA mr_dereg) where each sg represents a contiguous set of pages, we're able to more efficiently unpin pages without having to supply an array of pages much of what happens today with unpin_user_pages(). Link: https://lkml.kernel.org/r/20210212130843.13865-4-joao.m.martins@oracle.com Suggested-by: Jason Gunthorpe Signed-off-by: Joao Martins Reviewed-by: Jason Gunthorpe Reviewed-by: John Hubbard Cc: Christoph Hellwig Cc: Doug Ledford Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 31b912de1316644040ca9a0fb9b514ffa462c20c Author: Joao Martins Date: Thu Apr 29 22:55:47 2021 -0700 mm/gup: decrement head page once for group of subpages Rather than decrementing the head page refcount one by one, we walk the page array and checking which belong to the same compound_head. Later on we decrement the calculated amount of references in a single write to the head page. To that end switch to for_each_compound_head() does most of the work. set_page_dirty() needs no adjustment as it's a nop for non-dirty head pages and it doesn't operate on tail pages. This considerably improves unpinning of pages with THP and hugetlbfs: - THP gup_test -t -m 16384 -r 10 [-L|-a] -S -n 512 -w PIN_LONGTERM_BENCHMARK (put values): ~87.6k us -> ~23.2k us - 16G with 1G huge page size gup_test -f /mnt/huge/file -m 16384 -r 10 [-L|-a] -S -n 512 -w PIN_LONGTERM_BENCHMARK: (put values): ~87.6k us -> ~27.5k us Link: https://lkml.kernel.org/r/20210212130843.13865-3-joao.m.martins@oracle.com Signed-off-by: Joao Martins Reviewed-by: John Hubbard Reviewed-by: Jason Gunthorpe Cc: Christoph Hellwig Cc: Doug Ledford Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8745d7f6346ca107256b3990bd5cd71039818739 Author: Joao Martins Date: Thu Apr 29 22:55:44 2021 -0700 mm/gup: add compound page list iterator Patch series "mm/gup: page unpining improvements", v4. This series improves page unpinning, with an eye on improving MR deregistration for big swaths of memory (which is bound by the page unpining), particularly: 1) Decrement the head page by @ntails and thus reducing a lot the number of atomic operations per compound page. This is done by comparing individual tail pages heads, and counting number of consecutive tails on which they match heads and based on that update head page refcount. Should have a visible improvement in all page (un)pinners which use compound pages 2) Introducing a new API for unpinning page ranges (to avoid the trick in the previous item and be based on math), and use that in RDMA ib_mem_release (used for mr deregistration). Performance improvements: unpin_user_pages() for hugetlbfs and THP improves ~3x (through gup_test) and RDMA MR dereg improves ~4.5x with the new API. See patches 2 and 4 for those. This patch (of 4): Add a helper that iterates over head pages in a list of pages. It essentially counts the tails until the next page to process has a different head that the current. This is going to be used by unpin_user_pages() family of functions, to batch the head page refcount updates once for all passed consecutive tail pages. Link: https://lkml.kernel.org/r/20210212130843.13865-1-joao.m.martins@oracle.com Link: https://lkml.kernel.org/r/20210212130843.13865-2-joao.m.martins@oracle.com Signed-off-by: Joao Martins Suggested-by: Jason Gunthorpe Reviewed-by: John Hubbard Reviewed-by: Jason Gunthorpe Cc: Doug Ledford Cc: Matthew Wilcox Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f6899bc03cbadc6e308d98252c4a832b5fd45b87 Author: Nikita Ermakov Date: Thu Apr 29 22:55:41 2021 -0700 mm/msync: exit early when the flags is an MS_ASYNC and start < vm_start If an unmapped region was found and the flag is MS_ASYNC (without MS_INVALIDATE) there is nothing to do and the result would be always -ENOMEM, so return immediately. Link: https://lkml.kernel.org/r/20201025092901.56399-1-sh1r4s3@mail.si-head.nl Signed-off-by: Nikita Ermakov Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 4b17f030fdc821ca58218489e3b7fd8381707849 Author: Rui Sun Date: Thu Apr 29 22:55:38 2021 -0700 mm/filemap: update stale comment Commit a6de4b4873e1 ("mm: convert find_get_entry to return the head page") uses @index instead of @offset, but the comment is stale, update it. Link: https://lkml.kernel.org/r/1617948260-50724-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Rui Sun Signed-off-by: Shaokun Zhang Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 842ca547f706b1e05ccf3026a0ab15d24772a188 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 22:55:35 2021 -0700 mm: move page_mapping_file to pagemap.h page_mapping_file() is only used by some architectures, and then it is usually only used in one place. Make it a static inline function so other architectures don't have to carry this dead code. Link: https://lkml.kernel.org/r/20210317123011.350118-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand Acked-by: Mike Rapoport Cc: Huang Ying Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1c824a680b1b67ad43c0908f11a70bcf37af56d5 Author: Johannes Weiner Date: Thu Apr 29 22:55:32 2021 -0700 mm: page-writeback: simplify memcg handling in test_clear_page_writeback() Page writeback doesn't hold a page reference, which allows truncate to free a page the second PageWriteback is cleared. This used to require special attention in test_clear_page_writeback(), where we had to be careful not to rely on the unstable page->memcg binding and look up all the necessary information before clearing the writeback flag. Since commit 073861ed77b6 ("mm: fix VM_BUG_ON(PageTail) and BUG_ON(PageWriteback)") test_clear_page_writeback() is called with an explicit reference on the page, and this dance is no longer needed. Use unlock_page_memcg() and dec_lruvec_page_state() directly. This removes the last user of the lock_page_memcg() return value, change it to void. Touch up the comments in there as well. This also removes the last extern user of __unlock_page_memcg(), make it static. Further, it removes the last user of dec_lruvec_state(), delete it, along with a few other unused helpers. Link: https://lkml.kernel.org/r/YCQbYAWg4nvBFL6h@cmpxchg.org Signed-off-by: Johannes Weiner Acked-by: Hugh Dickins Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Cc: Roman Gushchin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 79e3094c53c56d0d4da23f578de271e7602ba5ed Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 22:55:29 2021 -0700 mm/filemap: drop check for truncated page after I/O If the I/O completed successfully, the page will remain Uptodate, even if it is subsequently truncated. If the I/O completed with an error, this check would cause us to retry the I/O if the page were truncated before we woke up. There is no need to retry the I/O; the I/O to fill the page failed, so we can legitimately just return -EIO. This code was originally added by commit 56f0d5fe6851 ("[PATCH] readpage-vs-invalidate fix") in 2005 (this commit ID is from the linux-fullhistory tree; it is also commit ba1f08f14b52 in tglx-history). At the time, truncate_complete_page() called ClearPageUptodate(), and so this was fixing a real bug. In 2008, commit 84209e02de48 ("mm: dont clear PG_uptodate on truncate/invalidate") removed the call to ClearPageUptodate, and this check has been unnecessary ever since. It doesn't do any real harm, but there's no need to keep it. Link: https://lkml.kernel.org/r/20210303222547.1056428-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Acked-by: William Kucharski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d31fa86a27b3ecdc32bf19326c4d3bba854542e2 Author: Matthew Wilcox (Oracle) Date: Thu Apr 29 22:55:26 2021 -0700 mm/filemap: use filemap_read_page in filemap_fault After splitting generic_file_buffered_read() into smaller parts, it turns out we can reuse one of the parts in filemap_fault(). This fixes an oversight -- waiting for the I/O to complete is now interruptible by a fatal signal. And it saves us a few bytes of text in an unlikely path. $ ./scripts/bloat-o-meter before.o after.o add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-207 (-207) Function old new delta filemap_fault 2187 1980 -207 Total: Before=37491, After=37284, chg -0.55% Link: https://lkml.kernel.org/r/20210226140011.2883498-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Andrew Morton Cc: Kent Overstreet Cc: Christoph Hellwig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 985b71db17506c668e5a9bd9fc700c95640dc191 Author: Jens Axboe Date: Thu Apr 29 22:55:24 2021 -0700 iomap: use filemap_range_needs_writeback() for O_DIRECT reads For reads, use the better variant of checking for the need to call filemap_write_and_wait_range() when doing O_DIRECT. This avoids falling back to the slow path for IOCB_NOWAIT, if there are no pages to wait for (or write out). Link: https://lkml.kernel.org/r/20210224164455.1096727-4-axboe@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Jan Kara Cc: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7a60d6d7b34ebf9290d495e8bb4cd57c784ffb22 Author: Jens Axboe Date: Thu Apr 29 22:55:21 2021 -0700 mm: use filemap_range_needs_writeback() for O_DIRECT reads For the generic page cache read helper, use the better variant of checking for the need to call filemap_write_and_wait_range() when doing O_DIRECT reads. This avoids falling back to the slow path for IOCB_NOWAIT, if there are no pages to wait for (or write out). Link: https://lkml.kernel.org/r/20210224164455.1096727-3-axboe@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 63135aa3866db99fd923b716c5ff2e468879624a Author: Jens Axboe Date: Thu Apr 29 22:55:18 2021 -0700 mm: provide filemap_range_needs_writeback() helper Patch series "Improve IOCB_NOWAIT O_DIRECT reads", v3. An internal workload complained because it was using too much CPU, and when I took a look, we had a lot of io_uring workers going to town. For an async buffered read like workload, I am normally expecting _zero_ offloads to a worker thread, but this one had tons of them. I'd drop caches and things would look good again, but then a minute later we'd regress back to using workers. Turns out that every minute something was reading parts of the device, which would add page cache for that inode. I put patches like these in for our kernel, and the problem was solved. Don't -EAGAIN IOCB_NOWAIT dio reads just because we have page cache entries for the given range. This causes unnecessary work from the callers side, when the IO could have been issued totally fine without blocking on writeback when there is none. This patch (of 3): For O_DIRECT reads/writes, we check if we need to issue a call to filemap_write_and_wait_range() to issue and/or wait for writeback for any page in the given range. The existing mechanism just checks for a page in the range, which is suboptimal for IOCB_NOWAIT as we'll fallback to the slow path (and needing retry) if there's just a clean page cache page in the range. Provide filemap_range_needs_writeback() which tries a little harder to check if we actually need to issue and/or wait for writeback in the range. Link: https://lkml.kernel.org/r/20210224164455.1096727-1-axboe@kernel.dk Link: https://lkml.kernel.org/r/20210224164455.1096727-2-axboe@kernel.dk Signed-off-by: Jens Axboe Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Jan Kara Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dce44566192ec0b38597fdfd435013c2d54653ff Author: Anshuman Khandual Date: Thu Apr 29 22:55:15 2021 -0700 mm/memtest: add ARCH_USE_MEMTEST early_memtest() does not get called from all architectures. Hence enabling CONFIG_MEMTEST and providing a valid memtest=[1..N] kernel command line option might not trigger the memory pattern tests as would be expected in normal circumstances. This situation is misleading. The change here prevents the above mentioned problem after introducing a new config option ARCH_USE_MEMTEST that should be subscribed on platforms that call early_memtest(), in order to enable the config CONFIG_MEMTEST. Conversely CONFIG_MEMTEST cannot be enabled on platforms where it would not be tested anyway. Link: https://lkml.kernel.org/r/1617269193-22294-1-git-send-email-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual Acked-by: Catalin Marinas (arm64) Reviewed-by: Max Filippov Cc: Russell King Cc: Will Deacon Cc: Thomas Bogendoerfer Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Chris Zankel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f58bd538e6a2deb2bcdfe527d9ed45643348a4e6 Author: Sergei Trofimovich Date: Thu Apr 29 22:55:12 2021 -0700 mm: page_poison: print page info when corruption is caught When page_poison detects page corruption it's useful to see who freed a page recently to have a guess where write-after-free corruption happens. After this change corruption report has extra page data. Example report from real corruption (includes only page_pwner part): pagealloc: memory corruption e00000014cd61d10: 11 00 00 00 00 00 00 00 30 1d d2 ff ff 0f 00 60 ........0......` e00000014cd61d20: b0 1d d2 ff ff 0f 00 60 90 fe 1c 00 08 00 00 20 .......`....... ... CPU: 1 PID: 220402 Comm: cc1plus Not tainted 5.12.0-rc5-00107-g9720c6f59ecf #245 Hardware name: hp server rx3600, BIOS 04.03 04/08/2008 ... Call Trace: [] show_stack+0x90/0xc0 [] dump_stack+0x150/0x1c0 [] __kernel_unpoison_pages+0x410/0x440 [] get_page_from_freelist+0x1460/0x2ca0 [] __alloc_pages_nodemask+0x3c0/0x660 [] alloc_pages_vma+0xb0/0x500 [] __handle_mm_fault+0x1230/0x1fe0 [] handle_mm_fault+0x310/0x4e0 [] ia64_do_page_fault+0x1f0/0xb80 [] ia64_leave_kernel+0x0/0x270 page_owner tracks the page as freed page allocated via order 0, migratetype Movable, gfp_mask 0x100dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO), pid 37, ts 8173444098740 __reset_page_owner+0x40/0x200 free_pcp_prepare+0x4d0/0x600 free_unref_page+0x20/0x1c0 __put_page+0x110/0x1a0 migrate_pages+0x16d0/0x1dc0 compact_zone+0xfc0/0x1aa0 proactive_compact_node+0xd0/0x1e0 kcompactd+0x550/0x600 kthread+0x2c0/0x2e0 call_payload+0x50/0x80 Here we can see that page was freed by page migration but something managed to write to it afterwards. [slyfox@gentoo.org: s/dump_page_owner/dump_page/, per Vlastimil] Link: https://lkml.kernel.org/r/20210407230800.1086854-1-slyfox@gentoo.org Link: https://lkml.kernel.org/r/20210404141735.2152984-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e9b16c47680f6e7d6e5864a37f313f905a91cf5 Author: Sergei Trofimovich Date: Thu Apr 29 22:55:08 2021 -0700 mm: page_owner: detect page_owner recursion via task_struct Before the change page_owner recursion was detected via fetching backtrace and inspecting it for current instruction pointer. It has a few problems: - it is slightly slow as it requires extra backtrace and a linear stack scan of the result - it is too late to check if backtrace fetching required memory allocation itself (ia64's unwinder requires it). To simplify recursion tracking let's use page_owner recursion flag in 'struct task_struct'. The change make page_owner=on work on ia64 by avoiding infinite recursion in: kmalloc() -> __set_page_owner() -> save_stack() -> unwind() [ia64-specific] -> build_script() -> kmalloc() -> __set_page_owner() [we short-circuit here] -> save_stack() -> unwind() [recursion] Link: https://lkml.kernel.org/r/20210402115342.1463781-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Reviewed-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: Daniel Bristot de Oliveira Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 608b5d668c8ea6734594a401c9adab4093ad9847 Author: Sergei Trofimovich Date: Thu Apr 29 22:55:05 2021 -0700 mm: page_owner: use kstrtobool() to parse bool option I tried to use page_owner=1 for a while noticed too late it had no effect as opposed to similar init_on_alloc=1 (these work). Let's make them consistent. The change decreses binary size slightly: text data bss dec hex filename 12408 321 17 12746 31ca mm/page_owner.o.before 12320 321 17 12658 3172 mm/page_owner.o.after Link: https://lkml.kernel.org/r/20210401210909.3532086-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fab765c210130113ede5f8754c6a158fa0e4f960 Author: Sergei Trofimovich Date: Thu Apr 29 22:55:02 2021 -0700 mm: page_owner: fetch backtrace only for tracked pages Very minor optimization. Link: https://lkml.kernel.org/r/20210401212445.3534721-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Acked-by: Vlastimil Babka Cc: Joonsoo Kim Cc: Thomas Gleixner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 64ea78d2fdee1f68983ae3bec23f5d2bce71dc5a Author: zhongjiang-ali Date: Thu Apr 29 22:55:00 2021 -0700 mm, page_owner: remove unused parameter in __set_page_owner_handle Since commit 5556cfe8d994 ("mm, page_owner: fix off-by-one error in __set_page_owner_handle()") introduced, the parameter 'page' will not used, hence it need to be removed. Link: https://lkml.kernel.org/r/1616602022-43545-1-git-send-email-zhongjiang-ali@linux.alibaba.com Signed-off-by: zhongjiang-ali Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 866b485262173a2b873386162b2ddcfbcb542b4a Author: Georgi Djakov Date: Thu Apr 29 22:54:57 2021 -0700 mm/page_owner: record the timestamp of all pages during free Collect the time when each allocation is freed, to help with memory analysis with kdump/ramdump. Add the timestamp also in the page_owner debugfs file and print it in dump_page(). Having another timestamp when we free the page helps for debugging page migration issues. For example both alloc and free timestamps being the same can gave hints that there is an issue with migrating memory, as opposed to a page just being dropped during migration. Link: https://lkml.kernel.org/r/20210203175905.12267-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 0b5121ef85102edc936b199fb239a1f8cce48018 Author: Bhaskar Chowdhury Date: Thu Apr 29 22:54:54 2021 -0700 mm/kmemleak.c: fix a typo s/interruptable/interruptible/ Link: https://lkml.kernel.org/r/20210319214140.23304-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit dc84207d00bef4a5d826e68bc0a310327b464fcf Author: Bhaskar Chowdhury Date: Thu Apr 29 22:54:51 2021 -0700 mm/slub.c: trivial typo fixes s/operatios/operations/ s/Mininum/Minimum/ s/mininum/minimum/ ......two different places. Link: https://lkml.kernel.org/r/20210325044940.14516-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1f0723a4c0df36cbdffc6fac82cd3c5d57e06d66 Author: Vlastimil Babka Date: Thu Apr 29 22:54:42 2021 -0700 mm, slub: enable slub_debug static key when creating cache with explicit debug flags Commit ca0cab65ea2b ("mm, slub: introduce static key for slub_debug()") introduced a static key to optimize the case where no debugging is enabled for any cache. The static key is enabled when slub_debug boot parameter is passed, or CONFIG_SLUB_DEBUG_ON enabled. However, some caches might be created with one or more debugging flags explicitly passed to kmem_cache_create(), and the commit missed this. Thus the debugging functionality would not be actually performed for these caches unless the static key gets enabled by boot param or config. This patch fixes it by checking for debugging flags passed to kmem_cache_create() and enabling the static key accordingly. Note such explicit debugging flags should not be used outside of debugging and testing as they will now enable the static key globally. btrfs_init_cachep() creates a cache with SLAB_RED_ZONE but that's a mistake that's being corrected [1]. rcu_torture_stats() creates a cache with SLAB_STORE_USER, but that is a testing module so it's OK and will start working as intended after this patch. Also note that in case of backports to kernels before v5.12 that don't have 59450bbc12be ("mm, slab, slub: stop taking cpu hotplug lock"), static_branch_enable_cpuslocked() should be used. [1] https://lore.kernel.org/linux-btrfs/20210315141824.26099-1-dsterba@suse.com/ Link: https://lkml.kernel.org/r/20210315153415.24404-1-vbabka@suse.cz Fixes: ca0cab65ea2b ("mm, slub: introduce static key for slub_debug()") Signed-off-by: Vlastimil Babka Reported-by: Oliver Glitta Acked-by: David Rientjes Cc: Christoph Lameter Cc: Pekka Enberg Cc: Joonsoo Kim Cc: "Paul E. McKenney" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 82edd9d52e6dda7cd12047969ae8d357652e2e57 Author: Rafael Aquini Date: Thu Apr 29 22:54:39 2021 -0700 mm/slab_common: provide "slab_merge" option for !IS_ENABLED(CONFIG_SLAB_MERGE_DEFAULT) builds This is a minor addition to the allocator setup options to provide a simple way to on demand enable back cache merging for builds that by default run with CONFIG_SLAB_MERGE_DEFAULT not set. Link: https://lkml.kernel.org/r/20210319194506.200159-1-aquini@redhat.com Signed-off-by: Rafael Aquini Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9bf3bc949f8aeefeacea4b1198db833b722a8e27 Author: Petr Mladek Date: Thu Apr 29 22:54:36 2021 -0700 watchdog: cleanup handling of false positives Commit d6ad3e286d2c ("softlockup: Add sched_clock_tick() to avoid kernel warning on kgdb resume") introduced touch_softlockup_watchdog_sync(). It solved a problem when the watchdog was touched in an atomic context, the timer callback was proceed right after releasing interrupts, and the local clock has not been updated yet. In this case, sched_clock_tick() was called in watchdog_timer_fn() before updating the timer. So far so good. Later commit 5d1c0f4a80a6 ("watchdog: add check for suspended vm in softlockup detector") added two kvm_check_and_clear_guest_paused() calls. They touch the watchdog when the guest has been sleeping. The code makes my head spin around. Scenario 1: + guest did sleep: + PVCLOCK_GUEST_STOPPED is set + 1st watchdog_timer_fn() invocation: + the watchdog is not touched yet + is_softlockup() returns too big delay + kvm_check_and_clear_guest_paused(): + clear PVCLOCK_GUEST_STOPPED + call touch_softlockup_watchdog_sync() + set SOFTLOCKUP_DELAY_REPORT + set softlockup_touch_sync + return from the timer callback + 2nd watchdog_timer_fn() invocation: + call sched_clock_tick() even though it is not needed. The timer callback was invoked again only because the clock has already been updated in the meantime. + call kvm_check_and_clear_guest_paused() that does nothing because PVCLOCK_GUEST_STOPPED has been cleared already. + call update_report_ts() and return. This is fine. Except that sched_clock_tick() might allow to set it already during the 1st invocation. Scenario 2: + guest did sleep + 1st watchdog_timer_fn() invocation + same as in 1st scenario + guest did sleep again: + set PVCLOCK_GUEST_STOPPED again + 2nd watchdog_timer_fn() invocation + SOFTLOCKUP_DELAY_REPORT is set from 1st invocation + call sched_clock_tick() + call kvm_check_and_clear_guest_paused() + clear PVCLOCK_GUEST_STOPPED + call touch_softlockup_watchdog_sync() + set SOFTLOCKUP_DELAY_REPORT + set softlockup_touch_sync + call update_report_ts() (set real timestamp immediately) + return from the timer callback + 3rd watchdog_timer_fn() invocation + timestamp is set from 2nd invocation + softlockup_touch_sync is set but not checked because the real timestamp is already set Make the code more straightforward: 1. Always call kvm_check_and_clear_guest_paused() at the very beginning to handle PVCLOCK_GUEST_STOPPED. It touches the watchdog when the quest did sleep. 2. Handle the situation when the watchdog has been touched (SOFTLOCKUP_DELAY_REPORT is set). Call sched_clock_tick() when touch_*sync() variant was used. It makes sure that the timestamp will be up to date even when it has been touched in atomic context or quest did sleep. As a result, kvm_check_and_clear_guest_paused() is called on a single location. And the right timestamp is always set when returning from the timer callback. Link: https://lkml.kernel.org/r/20210311122130.6788-7-pmladek@suse.com Signed-off-by: Petr Mladek Cc: Ingo Molnar Cc: Laurence Oberman Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Whitchurch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9f113bf760ca90d709f8f89a733d10abb1f04a83 Author: Petr Mladek Date: Thu Apr 29 22:54:33 2021 -0700 watchdog: fix barriers when printing backtraces from all CPUs Any parallel softlockup reports are skipped when one CPU is already printing backtraces from all CPUs. The exclusive rights are synchronized using one bit in soft_lockup_nmi_warn. There is also one memory barrier that does not make much sense. Use two barriers on the right location to prevent mixing two reports. [pmladek@suse.com: use bit lock operations to prevent multiple soft-lockup reports] Link: https://lkml.kernel.org/r/YFSVsLGVWMXTvlbk@alley Link: https://lkml.kernel.org/r/20210311122130.6788-6-pmladek@suse.com Signed-off-by: Petr Mladek Acked-by: Peter Zijlstra (Intel) Cc: Ingo Molnar Cc: Laurence Oberman Cc: Michal Hocko Cc: Thomas Gleixner Cc: Vincent Whitchurch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1bc503cb4a2638fb1c57801a7796aca57845ce63 Author: Petr Mladek Date: Thu Apr 29 22:54:30 2021 -0700 watchdog/softlockup: remove logic that tried to prevent repeated reports The softlockup detector does some gymnastic with the variable soft_watchdog_warn. It was added by the commit 58687acba59266735ad ("lockup_detector: Combine nmi_watchdog and softlockup detector"). The purpose is not completely clear. There are the following clues. They describe the situation how it looked after the above mentioned commit: 1. The variable was checked with a comment "only warn once". 2. The variable was set when softlockup was reported. It was cleared only when the CPU was not longer in the softlockup state. 3. watchdog_touch_ts was not explicitly updated when the softlockup was reported. Without this variable, the report would normally be printed again during every following watchdog_timer_fn() invocation. The logic has got even more tangled up by the commit ed235875e2ca98 ("kernel/watchdog.c: print traces for all cpus on lockup detection"). After this commit, soft_watchdog_warn is set only when softlockup_all_cpu_backtrace is enabled. But multiple reports from all CPUs are prevented by a new variable soft_lockup_nmi_warn. Conclusion: The variable probably never worked as intended. In each case, it has not worked last many years because the softlockup was reported repeatedly after the full period defined by watchdog_thresh. The reason is that watchdog gets touched in many known slow paths, for example, in printk_stack_address(). This code is called also when printing the softlockup report. It means that the watchdog timestamp gets updated after each report. Solution: Simply remove the logic. People want the periodic report anyway. Link: https://lkml.kernel.org/r/20210311122130.6788-5-pmladek@suse.com Signed-off-by: Petr Mladek Cc: Ingo Molnar Cc: Laurence Oberman Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Whitchurch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit fef06efc2ebaa94c8aee299b863e870467dbab8d Author: Petr Mladek Date: Thu Apr 29 22:54:26 2021 -0700 watchdog/softlockup: report the overall time of softlockups The softlockup detector currently shows the time spent since the last report. As a result it is not clear whether a CPU is infinitely hogged by a single task or if it is a repeated event. The situation can be simulated with a simply busy loop: while (true) cpu_relax(); The softlockup detector produces: [ 168.277520] watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [cat:4865] [ 196.277604] watchdog: BUG: soft lockup - CPU#1 stuck for 22s! [cat:4865] [ 236.277522] watchdog: BUG: soft lockup - CPU#1 stuck for 23s! [cat:4865] But it should be, something like: [ 480.372418] watchdog: BUG: soft lockup - CPU#2 stuck for 26s! [cat:4943] [ 508.372359] watchdog: BUG: soft lockup - CPU#2 stuck for 52s! [cat:4943] [ 548.372359] watchdog: BUG: soft lockup - CPU#2 stuck for 89s! [cat:4943] [ 576.372351] watchdog: BUG: soft lockup - CPU#2 stuck for 115s! [cat:4943] For the better output, add an additional timestamp of the last report. Only this timestamp is reset when the watchdog is intentionally touched from slow code paths or when printing the report. Link: https://lkml.kernel.org/r/20210311122130.6788-4-pmladek@suse.com Signed-off-by: Petr Mladek Cc: Ingo Molnar Cc: Laurence Oberman Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Whitchurch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit c9ad17c991492f4390f42598f6ab0531f87eed07 Author: Petr Mladek Date: Thu Apr 29 22:54:23 2021 -0700 watchdog: explicitly update timestamp when reporting softlockup The softlockup situation might stay for a long time or even forever. When it happens, the softlockup debug messages are printed in regular intervals defined by get_softlockup_thresh(). There is a mystery. The repeated message is printed after the full interval that is defined by get_softlockup_thresh(). But the timer callback is called more often as defined by sample_period. The code looks like the soflockup should get reported in every sample_period when it was once behind the thresh. It works only by chance. The watchdog is touched when printing the stall report, for example, in printk_stack_address(). Make the behavior clear and predictable by explicitly updating the timestamp in watchdog_timer_fn() when the report gets printed. Link: https://lkml.kernel.org/r/20210311122130.6788-3-pmladek@suse.com Signed-off-by: Petr Mladek Cc: Ingo Molnar Cc: Laurence Oberman Cc: Michal Hocko Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vincent Whitchurch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 7c0012f522c802d25be102bafe54f333168e6119 Author: Petr Mladek Date: Thu Apr 29 22:54:20 2021 -0700 watchdog: rename __touch_watchdog() to a better descriptive name Patch series "watchdog/softlockup: Report overall time and some cleanup", v2. I dug deep into the softlockup watchdog history when time permitted this year. And reworked the patchset that fixed timestamps and cleaned up the code[2]. I split it into very small steps and did even more code clean up. The result looks quite strightforward and I am pretty confident with the changes. [1] v2: https://lore.kernel.org/r/20201210160038.31441-1-pmladek@suse.com [2] v1: https://lore.kernel.org/r/20191024114928.15377-1-pmladek@suse.com This patch (of 6): There are many touch_*watchdog() functions. They are called in situations where the watchdog could report false positives or create unnecessary noise. For example, when CPU is entering idle mode, a virtual machine is stopped, or a lot of messages are printed in the atomic context. These functions set SOFTLOCKUP_RESET instead of a real timestamp. It allows to call them even in a context where jiffies might be outdated. For example, in an atomic context. The real timestamp is set by __touch_watchdog() that is called from the watchdog timer callback. Rename this callback to update_touch_ts(). It better describes the effect and clearly distinguish is from the other touch_*watchdog() functions. Another motivation is that two timestamps are going to be used. One will be used for the total softlockup time. The other will be used to measure time since the last report. The new function name will help to distinguish which timestamp is being updated. Link: https://lkml.kernel.org/r/20210311122130.6788-1-pmladek@suse.com Link: https://lkml.kernel.org/r/20210311122130.6788-2-pmladek@suse.com Signed-off-by: Petr Mladek Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Laurence Oberman Cc: Vincent Whitchurch Cc: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21ae3ad1632cbe6f5e998222ffc5668aff36b79c Author: Randy Dunlap Date: Thu Apr 29 22:54:17 2021 -0700 vfs: fs_parser: clean up kernel-doc warnings Fix kernel-doc notation function arguments to eliminate two kernel-doc warnings: fs_parser.c:322: warning: Excess function parameter 'name' description in 'validate_constant_table' fs_parser.c:367: warning: Function parameter or member 'name' not described in 'fs_validate_description' Link: https://lkml.kernel.org/r/20210407033743.9701-1-rdunlap@infradead.org Signed-off-by: Randy Dunlap Cc: Alexander Viro Cc: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 926ee00ea24320052b46745ef4b00d91c05bd03d Author: Dan Carpenter Date: Thu Apr 29 22:54:15 2021 -0700 kfifo: fix ternary sign extension bugs The intent with this code was to return negative error codes but instead it returns positives. The problem is how type promotion works with ternary operations. These functions return long, "ret" is an int and "copied" is a u32. The negative error code is first cast to u32 so it becomes a high positive and then cast to long where it's still a positive. We could fix this by declaring "ret" as a ssize_t but let's just get rid of the ternaries instead. Link: https://lkml.kernel.org/r/YIE+/cK1tBzSuQPU@mwanda Fixes: 5bf2b19320ec ("kfifo: add example files to the kernel sample directory") Signed-off-by: Dan Carpenter Cc: Stefani Seibold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit ccf33ec4a7326066b544cdc6c6628a89a658dec8 Author: Jiapeng Chong Date: Thu Apr 29 22:54:11 2021 -0700 ocfs2/dlm: remove unused function Fix the following clang warning: fs/ocfs2/dlm/dlmrecovery.c:129:20: warning: unused function 'dlm_reset_recovery' [-Wunused-function]. Link: https://lkml.kernel.org/r/1618382761-5784-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Jiapeng Chong Reported-by: Abaci Robot Reviewed-by: Wengang Wang Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f13604a2b9ffb5bcd8ecfb505804adb890080078 Author: Bhaskar Chowdhury Date: Thu Apr 29 22:54:08 2021 -0700 ocfs2: fix a typo s/cluter/cluster/ Link: https://lkml.kernel.org/r/20210324072931.5056-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit f9630ec9d9e6c31e5c17dda4cbca53c504604cce Author: Joseph Qi Date: Thu Apr 29 22:54:05 2021 -0700 ocfs2: map flags directly in flags_to_o2dlm() Use macro map_flag() is tricky and coccicheck outputs the following warning: fs/ocfs2/stack_o2cb.c:69:5-16: Unneeded variable: "o2dlm_flags" So map flags directly in flags_to_o2dlm() to make coccicheck happy. And remove BUG_ON() here as well to simplify code since it runs well a long time. Link: https://lkml.kernel.org/r/1616138664-35935-1-git-send-email-joseph.qi@linux.alibaba.com Signed-off-by: Joseph Qi Reviewed-by: Wengang Wang Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 1634852df7f0cc1223e454de2d1ad2786e0aa9f3 Author: Yang Li Date: Thu Apr 29 22:54:02 2021 -0700 ocfs2: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Fix the following coccicheck warning: fs/ocfs2/blockcheck.c:232:0-23: WARNING: blockcheck_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Link: https://lkml.kernel.org/r/1614155230-57292-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Yang Li Reported-by: Abaci Robot Acked-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Gang He Cc: Jun Piao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 91a8528e8a28c258a96ec8af4a30238f7c11ff81 Author: Zhang Yunkai Date: Thu Apr 29 22:53:59 2021 -0700 arch/sh/include/asm/tlb.h: remove duplicate include 'asm-generic/tlb.h' included in 'asm/tlb.h' is duplicated. Link: https://lkml.kernel.org/r/20210304132020.196811-1-zhang.yunkai@zte.com.cn Signed-off-by: Zhang Yunkai Cc: Yoshinori Sato Cc: Rich Felker Cc: Zhang Yunkai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 21917bded72cf33bdf02a153f7b477ab186a52ee Author: Wan Jiabing Date: Thu Apr 29 22:53:56 2021 -0700 scripts: a new script for checking duplicate struct declaration checkdeclares: find struct declared more than once. Inspired by checkincludes.pl. This script checks for duplicate struct declares. Note that this will not take into consideration macros, so you should run this only if you know you do have real dups and do not have them under #ifdef's. You could also just review the results. [akpm@linux-foundation.org: fix usage message, grammar] Link: https://lkml.kernel.org/r/20210401110943.1010796-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Cc: Masahiro Yamada Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 439baedad52d3242ec1d2ed728bc195fd5577c05 Author: Tom Saeger Date: Thu Apr 29 22:53:53 2021 -0700 scripts/spelling.txt: add entries for recent discoveries Add a few entries for recent spelling fixes found. Opportunistically de-dupe: exeeds||exceeds Link: https://lore.kernel.org/lkml/31acb3239b7ab8989db0c9951e8740050aef0205.1616727528.git.tom.saeger@oracle.com/ Link: https://lore.kernel.org/lkml/fa193b3c9e346ff3fc157b54802c29b25f79c402.1615597995.git.tom.saeger@oracle.com/ Link: https://lkml.kernel.org/r/4a594a9e1536b1d9e5ba57f684c1e41457dd383b.1616861645.git.tom.saeger@oracle.com Signed-off-by: Tom Saeger Cc: Jens Axboe Cc: Colin Ian King Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d991bb1c8da842a2a0b9dc83b1005e655783f861 Author: Luc Van Oostenryck Date: Thu Apr 29 22:53:50 2021 -0700 include/linux/compiler-gcc.h: sparse can do constant folding of __builtin_bswap*() Sparse can do constant folding of __builtin_bswap*() since 2017. Also, a much recent version of Sparse is needed anyway, see commit 6ec4476ac825 ("Raise gcc version requirement to 4.9"). So, remove the comment about sparse not being yet able to constant fold __builtin_bswap*() and remove the corresponding test of __CHECKER__. Link: https://lkml.kernel.org/r/20210226092236.99369-1-luc.vanoostenryck@gmail.com Signed-off-by: Luc Van Oostenryck Acked-by: Arnd Bergmann Acked-by: Miguel Ojeda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 99e729bd40fb3272fa4b0140839d5e957b58588a Author: Sergei Trofimovich Date: Thu Apr 29 22:53:48 2021 -0700 ia64: module: fix symbolizer crash on fdescr Noticed failure as a crash on ia64 when tried to symbolize all backtraces collected by page_owner=on: $ cat /sys/kernel/debug/page_owner CPU: 1 PID: 2074 Comm: cat Not tainted 5.12.0-rc4 #226 Hardware name: hp server rx3600, BIOS 04.03 04/08/2008 ip is at dereference_module_function_descriptor+0x41/0x100 Crash happens at dereference_module_function_descriptor() due to use-after-free when dereferencing ".opd" section header. All section headers are already freed after module is laoded successfully. To keep symbolizer working the change stores ".opd" address and size after module is relocated to a new place and before section headers are discarded. To make similar errors less obscure module_finalize() now zeroes out all variables relevant to module loading only. Link: https://lkml.kernel.org/r/20210403074803.3309096-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 9187592b96385e5060dfb2b182aa9ec93d5c0332 Author: Sergei Trofimovich Date: Thu Apr 29 22:53:45 2021 -0700 ia64: drop marked broken DISCONTIGMEM and VIRTUAL_MEM_MAP DISCONTIGMEM was marked BROKEN in 5.11. Let's remove it. Booted SPARSEMEM successfully on rx3600. Link: https://lkml.kernel.org/r/20210404193440.2615358-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 5f28bdee7084dc560a3b3154a3345bfd73135ea4 Author: Sergei Trofimovich Date: Thu Apr 29 22:53:42 2021 -0700 ia64: mca: always make IA64_MCA_DEBUG an expression At least ia64_mca_log_sal_error_record() expects some statement: static void ia64_mca_log_sal_error_record(int sal_info_type) { ... if (irq_safe) IA64_MCA_DEBUG("CPU %d: SAL log contains %s error record ", smp_processor_id(), sal_info_type < ARRAY_SIZE(rec_name) ? rec_name[sal_info_type] : "UNKNOWN"); ... } Instead of fixing all callers the change expicitly makes IA64_MCA_DEBUG a non-empty expression. Link: https://lkml.kernel.org/r/20210328215549.830420-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit e3db00b79d74caaf84cd9e1d4927979abfd0d7c9 Author: Sergei Trofimovich Date: Thu Apr 29 22:53:39 2021 -0700 ia64: fix EFI_DEBUG build When enabled local debugging via `#define EFI_DEBUG 1` noticed build failure: arch/ia64/kernel/efi.c:564:8: error: 'i' undeclared (first use in this function) While at it fixed benign string format mismatches visible only when EFI_DEBUG is enabled: arch/ia64/kernel/efi.c:589:11: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'u64' {aka 'long long unsigned int'} [-Wformat=] Link: https://lkml.kernel.org/r/20210328212246.685601-1-slyfox@gentoo.org Fixes: 14fb42090943559 ("efi: Merge EFI system table revision and vendor checks") Signed-off-by: Sergei Trofimovich Cc: Ard Biesheuvel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 454534366c6faf286f5dac8db011d461e9c82320 Author: Bhaskar Chowdhury Date: Thu Apr 29 22:53:36 2021 -0700 ia64: trivial spelling fixes s/seralize/serialize/ .....three different places Link: https://lkml.kernel.org/r/YFY+9uwvNLeb/3Ab@Gentoo Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 6d073dad9754c28ab23409f794b3e1ece37d0609 Author: Sergei Trofimovich Date: Thu Apr 29 22:53:33 2021 -0700 ia64: simplify code flow around swiotlb init Before the change CONFIG_INTEL_IOMMU && !CONFIG_SWIOTLB && !CONFIG_FLATMEM could skip `set_max_mapnr(max_low_pfn);` if iommu is not present on system. Link: https://lkml.kernel.org/r/20210328202439.403601-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Cc: John Paul Adrian Glaubitz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit d732f47db10f292657356b3be1fb479777e2117c Author: Sergei Trofimovich Date: Thu Apr 29 22:53:30 2021 -0700 ia64: drop unused IA64_FW_EMU ifdef It's a remnant of deleted hpsim emulation target removed in fc5bad037 ("ia64: remove the hpsim platform"). Link: https://lkml.kernel.org/r/20210323224009.240625-1-slyfox@gentoo.org Signed-off-by: Sergei Trofimovich Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit b22a8f7b4bde4e4ab73b64908ffd5d90ecdcdbfd Author: Valentin Schneider Date: Thu Apr 29 22:53:27 2021 -0700 ia64: ensure proper NUMA distance and possible map initialization John Paul reported a warning about bogus NUMA distance values spurred by commit: 620a6dc40754 ("sched/topology: Make sched_init_numa() use a set for the deduplicating sort") In this case, the afflicted machine comes up with a reported 256 possible nodes, all of which are 0 distance away from one another. This was previously silently ignored, but is now caught by the aforementioned commit. The culprit is ia64's node_possible_map which remains unchanged from its initialization value of NODE_MASK_ALL. In John's case, the machine doesn't have any SRAT nor SLIT table, but AIUI the possible map remains untouched regardless of what ACPI tables end up being parsed. Thus, !online && possible nodes remain with a bogus distance of 0 (distances \in [0, 9] are "reserved and have no meaning" as per the ACPI spec). Follow x86 / drivers/base/arch_numa's example and set the possible map to the parsed map, which in this case seems to be the online map. Link: http://lore.kernel.org/r/255d6b5d-194e-eb0e-ecdd-97477a534441@physik.fu-berlin.de Link: https://lkml.kernel.org/r/20210318130617.896309-1-valentin.schneider@arm.com Fixes: 620a6dc40754 ("sched/topology: Make sched_init_numa() use a set for the deduplicating sort") Signed-off-by: Valentin Schneider Reported-by: John Paul Adrian Glaubitz Tested-by: John Paul Adrian Glaubitz Tested-by: Sergei Trofimovich Cc: "Peter Zijlstra (Intel)" Cc: Ingo Molnar Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Anatoly Pugachev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8b30c6256d2bddc080ac13f39363d4efbb0b292e Author: Bhaskar Chowdhury Date: Thu Apr 29 22:53:24 2021 -0700 arch/ia64/include/asm/pgtable.h: minor typo fixes s/migraton/migration/ Link: https://lkml.kernel.org/r/20210313045519.9310-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 3eac094b93e757a297c2807bec41503fe8241d17 Author: Bhaskar Chowdhury Date: Thu Apr 29 22:53:21 2021 -0700 arch/ia64/kernel/fsys.S: fix typos Mundane spelling fixes. Link: https://lkml.kernel.org/r/20210311061058.29492-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Cc: John Paul Adrian Glaubitz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 46df55b51734fc98be75b2148a463069a65685be Author: Zhang Yunkai Date: Thu Apr 29 22:53:18 2021 -0700 arch/ia64/kernel/head.S: remove duplicate include 'linux/pgtable.h' included in 'arch/ia64/kernel/head.S' is duplicated. Link: https://lkml.kernel.org/r/20210303084549.179346-1-zhang.yunkai@zte.com.cn Signed-off-by: Zhang Yunkai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds commit 8e947c8f4a5620df77e43c9c75310dc510250166 Author: Benjamin Block Date: Thu Apr 29 23:37:00 2021 +0200 dm rq: fix double free of blk_mq_tag_set in dev remove after table load fails When loading a device-mapper table for a request-based mapped device, and the allocation/initialization of the blk_mq_tag_set for the device fails, a following device remove will cause a double free. E.g. (dmesg): device-mapper: core: Cannot initialize queue for request-based dm-mq mapped device device-mapper: ioctl: unable to set up device queue for new table. Unable to handle kernel pointer dereference in virtual kernel address space Failing address: 0305e098835de000 TEID: 0305e098835de803 Fault in home space mode while using kernel ASCE. AS:000000025efe0007 R3:0000000000000024 Oops: 0038 ilc:3 [#1] SMP Modules linked in: ... lots of modules ... Supported: Yes, External CPU: 0 PID: 7348 Comm: multipathd Kdump: loaded Tainted: G W X 5.3.18-53-default #1 SLE15-SP3 Hardware name: IBM 8561 T01 7I2 (LPAR) Krnl PSW : 0704e00180000000 000000025e368eca (kfree+0x42/0x330) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3 Krnl GPRS: 000000000000004a 000000025efe5230 c1773200d779968d 0000000000000000 000000025e520270 000000025e8d1b40 0000000000000003 00000007aae10000 000000025e5202a2 0000000000000001 c1773200d779968d 0305e098835de640 00000007a8170000 000003ff80138650 000000025e5202a2 000003e00396faa8 Krnl Code: 000000025e368eb8: c4180041e100 lgrl %r1,25eba50b8 000000025e368ebe: ecba06b93a55 risbg %r11,%r10,6,185,58 #000000025e368ec4: e3b010000008 ag %r11,0(%r1) >000000025e368eca: e310b0080004 lg %r1,8(%r11) 000000025e368ed0: a7110001 tmll %r1,1 000000025e368ed4: a7740129 brc 7,25e369126 000000025e368ed8: e320b0080004 lg %r2,8(%r11) 000000025e368ede: b904001b lgr %r1,%r11 Call Trace: [<000000025e368eca>] kfree+0x42/0x330 [<000000025e5202a2>] blk_mq_free_tag_set+0x72/0xb8 [<000003ff801316a8>] dm_mq_cleanup_mapped_device+0x38/0x50 [dm_mod] [<000003ff80120082>] free_dev+0x52/0xd0 [dm_mod] [<000003ff801233f0>] __dm_destroy+0x150/0x1d0 [dm_mod] [<000003ff8012bb9a>] dev_remove+0x162/0x1c0 [dm_mod] [<000003ff8012a988>] ctl_ioctl+0x198/0x478 [dm_mod] [<000003ff8012ac8a>] dm_ctl_ioctl+0x22/0x38 [dm_mod] [<000000025e3b11ee>] ksys_ioctl+0xbe/0xe0 [<000000025e3b127a>] __s390x_sys_ioctl+0x2a/0x40 [<000000025e8c15ac>] system_call+0xd8/0x2c8 Last Breaking-Event-Address: [<000000025e52029c>] blk_mq_free_tag_set+0x6c/0xb8 Kernel panic - not syncing: Fatal exception: panic_on_oops When allocation/initialization of the blk_mq_tag_set fails in dm_mq_init_request_queue(), it is uninitialized/freed, but the pointer is not reset to NULL; so when dev_remove() later gets into dm_mq_cleanup_mapped_device() it sees the pointer and tries to uninitialize and free it again. Fix this by setting the pointer to NULL in dm_mq_init_request_queue() error-handling. Also set it to NULL in dm_mq_cleanup_mapped_device(). Cc: # 4.6+ Fixes: 1c357a1e86a4 ("dm: allocate blk_mq_tag_set rather than embed in mapped_device") Signed-off-by: Benjamin Block Signed-off-by: Mike Snitzer commit 7a5b96b4784454ba258e83dc7469ddbacd3aaac3 Author: Mikulas Patocka Date: Wed Apr 28 17:00:23 2021 -0400 dm integrity: use discard support when recalculating If we have discard support we don't have to recalculate hash - we can just fill the metadata with the discard pattern. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit b1a2b9332050c7ae32a22c2c74bc443e39f37b23 Author: Mikulas Patocka Date: Tue Apr 27 11:57:43 2021 -0400 dm integrity: increase RECALC_SECTORS to improve recalculate speed Increase RECALC_SECTORS because it improves recalculate speed slightly (from 390kiB/s to 410kiB/s). Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit a9c0fda4c08292399e08db0a4b70bc161cd247b9 Author: Mikulas Patocka Date: Tue Apr 27 11:57:06 2021 -0400 dm integrity: don't re-write metadata if discarding same blocks If we discard already discarded blocks we do not need to write discard pattern to the metadata, because it is already there. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit ff1c42cdfbcfba4cc75f3e21ed819ded2dad5f3e Author: Mark Brown Date: Mon Apr 12 16:19:55 2021 +0100 arm64: Explicitly document boot requirements for SVE We do not currently document the requirements for configuration of the SVE system registers when booting the kernel, let's do so for completeness. We don't have a hard requirement that the vector lengths configured on different CPUs on initial boot be consistent since we have logic to constrain to the minimum supported value but we will reject any late CPUs which can't support the current maximum and introducing the concept of late CPUs seemed more complex than was useful so we require that all CPUs use the same value. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210412151955.16078-4-broonie@kernel.org Signed-off-by: Catalin Marinas commit b30dbf4d936224f83a98bea2328ff09e644a25b2 Author: Mark Brown Date: Mon Apr 12 16:19:54 2021 +0100 arm64: Explicitly require that FPSIMD instructions do not trap We do not explicitly require that systems with FPSIMD support and EL3 have disabled EL3 traps when the kernel is started, while it is unlikely that systems will get this wrong for the sake of completeness let's spell it out. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210412151955.16078-3-broonie@kernel.org Signed-off-by: Catalin Marinas commit ee61f36d3e46bdb1c8910d1bd5c0863130c7b951 Author: Mark Brown Date: Mon Apr 12 16:19:53 2021 +0100 arm64: Relax booting requirements for configuration of traps Currently we require that a number of system registers be configured to disable traps when starting the kernel. Add an explicit note that the requirement is that the system behave as if the traps are disabled so transparent handling of the traps is fine, this should be implicit for people familiar with working with standards documents but it doesn't hurt to be explicit. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210412151955.16078-2-broonie@kernel.org Signed-off-by: Catalin Marinas commit aafe104aa9096827a429bc1358f8260ee565b7cc Author: Steven Rostedt (VMware) Date: Fri Apr 30 12:17:58 2021 -0400 tracing: Restructure trace_clock_global() to never block It was reported that a fix to the ring buffer recursion detection would cause a hung machine when performing suspend / resume testing. The following backtrace was extracted from debugging that case: Call Trace: trace_clock_global+0x91/0xa0 __rb_reserve_next+0x237/0x460 ring_buffer_lock_reserve+0x12a/0x3f0 trace_buffer_lock_reserve+0x10/0x50 __trace_graph_return+0x1f/0x80 trace_graph_return+0xb7/0xf0 ? trace_clock_global+0x91/0xa0 ftrace_return_to_handler+0x8b/0xf0 ? pv_hash+0xa0/0xa0 return_to_handler+0x15/0x30 ? ftrace_graph_caller+0xa0/0xa0 ? trace_clock_global+0x91/0xa0 ? __rb_reserve_next+0x237/0x460 ? ring_buffer_lock_reserve+0x12a/0x3f0 ? trace_event_buffer_lock_reserve+0x3c/0x120 ? trace_event_buffer_reserve+0x6b/0xc0 ? trace_event_raw_event_device_pm_callback_start+0x125/0x2d0 ? dpm_run_callback+0x3b/0xc0 ? pm_ops_is_empty+0x50/0x50 ? platform_get_irq_byname_optional+0x90/0x90 ? trace_device_pm_callback_start+0x82/0xd0 ? dpm_run_callback+0x49/0xc0 With the following RIP: RIP: 0010:native_queued_spin_lock_slowpath+0x69/0x200 Since the fix to the recursion detection would allow a single recursion to happen while tracing, this lead to the trace_clock_global() taking a spin lock and then trying to take it again: ring_buffer_lock_reserve() { trace_clock_global() { arch_spin_lock() { queued_spin_lock_slowpath() { /* lock taken */ (something else gets traced by function graph tracer) ring_buffer_lock_reserve() { trace_clock_global() { arch_spin_lock() { queued_spin_lock_slowpath() { /* DEAD LOCK! */ Tracing should *never* block, as it can lead to strange lockups like the above. Restructure the trace_clock_global() code to instead of simply taking a lock to update the recorded "prev_time" simply use it, as two events happening on two different CPUs that calls this at the same time, really doesn't matter which one goes first. Use a trylock to grab the lock for updating the prev_time, and if it fails, simply try again the next time. If it failed to be taken, that means something else is already updating it. Link: https://lkml.kernel.org/r/20210430121758.650b6e8a@gandalf.local.home Cc: stable@vger.kernel.org Tested-by: Konstantin Kharlamov Tested-by: Todd Brandt Fixes: b02414c8f045 ("ring-buffer: Fix recursion protection transitions between interrupt context") # started showing the problem Fixes: 14131f2f98ac3 ("tracing: implement trace_clock_*() APIs") # where the bug happened Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212761 Signed-off-by: Steven Rostedt (VMware) commit f6334b1798c1f96ee02356c4b12bb9587bdf44f5 Author: kernel test robot Date: Thu Apr 29 22:50:46 2021 +0200 arm64: cpufeatures: use min and max Use min and max to make the effect more clear. Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Acked-by: Mark Rutland Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2104292246300.16899@hadrien [catalin.marinas@arm.com: include explicitly] Signed-off-by: Catalin Marinas commit f80f88f0e2f2ef9cd805fad1bbf676b0ecd4b55c Author: Florent Revest Date: Wed Apr 28 17:25:01 2021 +0200 selftests/bpf: Fix the snprintf test The BPF program for the snprintf selftest runs on all syscall entries. On busy multicore systems this can cause concurrency issues. For example it was observed that sometimes the userspace part of the test reads " 4 0000" instead of " 4 000" (extra '0' at the end) which seems to happen just before snprintf on another core sets end[-1] = '\0'. This patch adds a pid filter to the test to ensure that no bpf_snprintf() will write over the test's output buffers while the userspace reads the values. Fixes: c2e39c6bdc7e ("selftests/bpf: Add a series of tests for bpf_snprintf") Reported-by: Andrii Nakryiko Signed-off-by: Florent Revest Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210428152501.1024509-1-revest@chromium.org commit 8533d5bfad41e74b7dd80d292fd484913cdfb374 Author: Mark Rutland Date: Thu Apr 29 11:20:04 2021 +0100 arm64: stacktrace: restore terminal records We removed the terminal frame records in commit: 6106e1112cc69a36 ("arm64: remove EL0 exception frame record") ... on the assumption that as we no longer used them to find the pt_regs at exception boundaries, they were no longer necessary. However, Leo reports that as an unintended side-effect, this causes traces which cross secondary_start_kernel to terminate one entry too late, with a spurious "0" entry. There are a few ways we could sovle this, but as we're planning to use terminal records for RELIABLE_STACKTRACE, let's revert the logic change for now, keeping the update comments and accounting for the changes in commit: 3c02600144bdb0a1 ("arm64: stacktrace: Report when we reach the end of the stack") This is effectively a partial revert of commit: 6106e1112cc69a36 ("arm64: remove EL0 exception frame record") Signed-off-by: Mark Rutland Fixes: 6106e1112cc6 ("arm64: remove EL0 exception frame record") Reported-by: Leo Yan Tested-by: Leo Yan Cc: Will Deacon Cc: Mark Brown Cc: "Madhavan T. Venkataraman" Link: https://lore.kernel.org/r/20210429104813.GA33550@C02TD0UTHF1T.local Signed-off-by: Catalin Marinas commit 388708028e6937f3fc5fc19aeeb847f8970f489c Author: Bill Wendling Date: Fri Apr 23 13:51:59 2021 -0700 arm64/vdso: Discard .note.gnu.property sections in vDSO The arm64 assembler in binutils 2.32 and above generates a program property note in a note section, .note.gnu.property, to encode used x86 ISAs and features. But the kernel linker script only contains a single NOTE segment: PHDRS { text PT_LOAD FLAGS(5) FILEHDR PHDRS; /* PF_R|PF_X */ dynamic PT_DYNAMIC FLAGS(4); /* PF_R */ note PT_NOTE FLAGS(4); /* PF_R */ } The NOTE segment generated by the vDSO linker script is aligned to 4 bytes. But the .note.gnu.property section must be aligned to 8 bytes on arm64. $ readelf -n vdso64.so Displaying notes found in: .note Owner Data size Description Linux 0x00000004 Unknown note type: (0x00000000) description data: 06 00 00 00 readelf: Warning: note with invalid namesz and/or descsz found at offset 0x20 readelf: Warning: type: 0x78, namesize: 0x00000100, descsize: 0x756e694c, alignment: 8 Since the note.gnu.property section in the vDSO is not checked by the dynamic linker, discard the .note.gnu.property sections in the vDSO. Similar to commit 4caffe6a28d31 ("x86/vdso: Discard .note.gnu.property sections in vDSO"), but for arm64. Signed-off-by: Bill Wendling Reviewed-by: Kees Cook Acked-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210423205159.830854-1-morbo@google.com Signed-off-by: Catalin Marinas commit bae1cd368c45d1127e054e90305d585dbc8b3b46 Author: Sven Schnelle Date: Thu Apr 29 11:14:51 2021 +0200 s390/entry: add support for syscall stack randomization This adds support for adding a random offset to the stack while handling syscalls. The patch uses get_tod_clock_fast() as this is considered good enough and has much less performance penalty compared to using get_random_int(). The patch also adds randomization in pgm_check_handler() as the sigreturn/rt_sigreturn system calls might be called from there. Signed-off-by: Sven Schnelle Link: https://lore.kernel.org/r/20210429091451.1062594-1-svens@linux.ibm.com Signed-off-by: Heiko Carstens commit f5b474decad90719e2a4234f83d97aad19307584 Author: Thomas Huth Date: Wed Apr 28 10:24:42 2021 +0200 s390/configs: change CONFIG_VIRTIO_CONSOLE to "m" In former times, the virtio-console code had to be compiled into the kernel since the old guest virtio transport had some hard de- pendencies. But since the old virtio transport has been removed in commit 7fb2b2d51244 ("s390/virtio: remove the old KVM virtio transport"), we do not have this limitation anymore. Commit bb533ec8bacd ("s390/config: do not select VIRTIO_CONSOLE via Kconfig") then also lifted the hard setting in the Kconfig system, so we can finally switch the CONFIG_VIRTIO_CONSOLE knob to compile this driver as a module now, making it more flexible for the user to only load it if it is really required. Signed-off-by: Thomas Huth Link: https://lore.kernel.org/r/20210428082442.321327-1-thuth@redhat.com Signed-off-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit 2f7484fd73729f89085fe08d683f5a8d9e17fe99 Author: Vineeth Vijayan Date: Fri Apr 23 12:08:43 2021 +0200 s390/cio: remove invalid condition on IO_SCH_UNREG The condition to check the cdev pointer validity on css_sch_device_unregister() is a leftover from the 'commit 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver")'. This could lead to a situation, where detaching the device is not happening completely. Remove this invalid condition in the IO_SCH_UNREG case. Link: https://lore.kernel.org/r/20210423100843.2230969-1-vneethv@linux.ibm.com Fixes: 8cc0dcfdc1c0 ("s390/cio: remove pm support from ccw bus driver") Reported-by: Christian Ehrhardt Suggested-by: Christian Ehrhardt Cc: Signed-off-by: Vineeth Vijayan Tested-by: Julian Wiedmann Reviewed-by: Peter Oberparleiter Tested-by: Christian Ehrhardt Signed-off-by: Heiko Carstens commit b0583ab47788617c6af484a844f13c57d7567c2a Author: Thomas Richter Date: Mon Apr 26 14:57:16 2021 +0200 s390/cpumf: remove call to perf_event_update_userpage The function cpumf_pmu_add and cpumf_pmu_del call function perf_event_update_userpage(). This calls is obsolete, the calls add and delete a counter event. Counter events do not sample data and the event->rb member to access the sampling ring buffer is always NULL. The function perf_event_update_userpage() simply returns in this case. Signed-off-by: Thomas Richter Acked-by : Sumanth Korikkar Signed-off-by: Heiko Carstens commit 1eefa4f4399b74dc7671c4e34c1b1c6244acff22 Author: Thomas Richter Date: Mon Apr 26 14:38:25 2021 +0200 s390/cpumf: move counter set size calculation to common place The function to calculate the size of counter sets is renamed from cf_diag_ctrset_size() to cpum_cf_ctrset_size() and moved to the file containing common functions for the CPU Measurement Counter Facility. No functional change. Signed-off-by: Thomas Richter Acked-by : Sumanth Korikkar Signed-off-by: Heiko Carstens commit 0cceeab5a38d70fae3c2944e77e1d262c74d159b Author: Thomas Richter Date: Mon Apr 26 14:33:53 2021 +0200 s390/cpumf: beautify if-then-else indentation Beautify if-then-else indentation to match coding guideline. Also use shorter pointer notation hwc instead of event->hw. Signed-off-by: Thomas Richter Acked-by : Sumanth Korikkar Signed-off-by: Heiko Carstens commit f53a63667b0b30944462ca0ecb9f9dd5b02a56f1 Author: Niklas Schnelle Date: Mon Apr 26 15:56:47 2021 +0200 s390/configs: enable CONFIG_PCI_IOV All major distributions ship with CONFIG_PCI_IOV=y so let us enable it for our defconfigs as well. Note also that since commit e5794cf1a270 ("s390/pci: create links between PFs and VFs") we enabled proper linking between PFs and their associated VFs so with this commit and its fixes applied we can fully support handling SR-IOV enabled PFs. Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 0d9cf5d8c5d0bfa144236b5f2aeff02124940c56 Author: Niklas Schnelle Date: Fri Apr 9 13:51:46 2021 +0200 s390/pci: handle stale deconfiguration events The PCIs event with PEC 0x0303 or 0x0304 are a request to deconfigure a PCI function, respectively an indication that it was already deconfigured by the platform. If such an event is queued during boot it may happen that the platform has already adjusted the configuration flag of the relevant function in the CLP List PCI Functions result. In this case we might not have configured the PCI function at all and should thus ignore the event. Note that no locking is necessary as event handling only starts after we have fully initialized the zPCI subsystem and scanned all PCI devices listed in the CLP result. Reviewed-by: Matthew Rosato Acked-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit a7f82c3641245055412b2b4f859ae55fd29fdffe Author: Niklas Schnelle Date: Fri Apr 9 14:08:50 2021 +0200 s390/pci: rename zpci_configure_device() With zpci_configure_device() now always called on a device that has already been configured on the platform level its name has become misleading. Rename it to zpci_scan_configured_device() to signify that the function now only handles the correct scanning of a newly configured PCI function taking care of the special handling necessary for function 0 and functions parked waiting for a PCI bus that can't be created without first seeing function 0. Reviewed-by: Matthew Rosato Reviewed-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 6da7bda36388ae00822f732c11febfe2ebbb5544 Author: Yang Li Date: Thu Apr 29 18:42:20 2021 +0800 IB/qib: Remove redundant assignment to ret Variable 'ret' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/infiniband/hw/qib/qib_sd7220.c:690:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Link: https://lore.kernel.org/r/1619692940-104771-1-git-send-email-yang.lee@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Jason Gunthorpe commit 5db91e9cb5b3f645a9540d2ab67a19e464d89754 Author: Rafael J. Wysocki Date: Fri Apr 30 15:32:22 2021 +0200 Revert "ACPI: scan: Turn off unused power resources during initialization" Revert commit 4b9ee772eaa8 ("ACPI: scan: Turn off unused power resources during initialization") that is reported to cause initialization issues to occur. Reported-by: Shujun Wang Signed-off-by: Rafael J. Wysocki commit bb6659cc0ad3c2afc3801b708b19c4c67e55ddf2 Author: Zqiang Date: Fri Apr 30 16:25:15 2021 +0800 io_uring: Fix memory leak in io_sqe_buffers_register() unreferenced object 0xffff8881123bf0a0 (size 32): comm "syz-executor557", pid 8384, jiffies 4294946143 (age 12.360s) backtrace: [] kmalloc_node include/linux/slab.h:579 [inline] [] kvmalloc_node+0x61/0xf0 mm/util.c:587 [] kvmalloc include/linux/mm.h:795 [inline] [] kvmalloc_array include/linux/mm.h:813 [inline] [] kvcalloc include/linux/mm.h:818 [inline] [] io_rsrc_data_alloc+0x4f/0xc0 fs/io_uring.c:7164 [] io_sqe_buffers_register+0x98/0x3d0 fs/io_uring.c:8383 [] __io_uring_register+0xf67/0x18c0 fs/io_uring.c:9986 [] __do_sys_io_uring_register fs/io_uring.c:10091 [inline] [] __se_sys_io_uring_register fs/io_uring.c:10071 [inline] [] __x64_sys_io_uring_register+0x112/0x230 fs/io_uring.c:10071 [] do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 [] entry_SYSCALL_64_after_hwframe+0x44/0xae Fix data->tags memory leak, through io_rsrc_data_free() to release data memory space. Reported-by: syzbot+0f32d05d8b6cd8d7ea3e@syzkaller.appspotmail.com Signed-off-by: Zqiang Link: https://lore.kernel.org/r/20210430082515.13886-1-qiang.zhang@windriver.com Signed-off-by: Jens Axboe commit 7b1ae248279bea33af9e797a93c35f49601cb8a0 Author: Shuo Chen Date: Wed Apr 14 14:24:00 2021 -0700 dyndbg: fix parsing file query without a line-range suffix Query like 'file tcp_input.c line 1234 +p' was broken by commit aaebe329bff0 ("dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100'") because a file name without a ':' now makes the loop in ddebug_parse_query() exits early before parsing the 'line 1234' part. As a result, all pr_debug() in tcp_input.c will be enabled, instead of only the one on line 1234. Changing 'break' to 'continue' fixes this. Fixes: aaebe329bff0 ("dyndbg: accept 'file foo.c:func1' and 'file foo.c:10-100'") Cc: stable Reviewed-by: Eric Dumazet Signed-off-by: Shuo Chen Acked-by: Jason Baron Link: https://lore.kernel.org/r/20210414212400.2927281-1-giantchen@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1cd6b4a04f038eb24fd18c8010e763d1140a9c7a Merge: add74e32db044 270e3cc5aa382 Author: Dave Airlie Date: Fri Apr 30 10:42:02 2021 +1000 Merge tag 'drm-intel-next-fixes-2021-04-27' of git://anongit.freedesktop.org/drm/drm-intel into drm-next drm/i915 fixes for v5.13-rc1: - Several fixes to GLK handling in recent display refactoring (Ville) - Rare watchdog timer race fix (Tvrtko) - Cppcheck redundant condition fix (José) - Overlay error code propagation fix (Dan Carpenter) - Documentation fix (Maarten) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/871raw5d3g.fsf@intel.com commit add74e32db0443dfd940d7c3256b9609c65e6149 Merge: 9b2788dbcef75 7845d80dda1fd Author: Dave Airlie Date: Fri Apr 30 10:28:34 2021 +1000 Merge tag 'amd-drm-next-5.13-2021-04-23' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.13-2021-04-23: amdgpu: - Fixes for Aldebaran - Display LTTPR fixes - eDP fixes - Fixes for Vangogh - RAS fixes - ASPM support - Renoir SMU fixes - Modifier fixes - Misc code cleanups - Freesync fixes Signed-off-by: Dave Airlie From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210423223920.3786-1-alexander.deucher@amd.com commit 9b2788dbcef756a77659fa22e6a73bec4a57d126 Merge: 12fc11bce6f29 74deef03a44ae Author: Dave Airlie Date: Fri Apr 30 10:13:08 2021 +1000 Merge tag 'drm-misc-next-fixes-2021-04-29' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Two patches in drm-misc-next-fixes this week, one to fix the error handling in TTM when a BO can't be swapped out and one to prevent a wrong dereference in efifb. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210429090308.k3fuqvenf6vupfmg@gilmour commit 12fc11bce6f29a73eb3d61ab4e76a9ece3da1f1d Merge: a1a1ca70deb3e 7b6f846785f41 Author: Dave Airlie Date: Fri Apr 30 09:56:31 2021 +1000 Merge tag 'drm/tegra/for-5.13-rc1' of ssh://git.freedesktop.org/git/tegra/linux into drm-next drm/tegra: Changes for v5.13-rc1 The changes this time around contain a couple of fixes for host1x along with some improvements for Tegra DRM. Most notably the Tegra DRM driver now supports the hardware cursor on Tegra186 and later, more correctly reflects the capabilities of the display pipelines on various Tegra SoC generations and knows how to deal with the dGPU sector layout by using framebuffer modifiers. Signed-off-by: Dave Airlie From: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20210401164430.3349105-1-thierry.reding@gmail.com commit d4eecfb28b963493a8701f271789ff04e92ae205 Author: Oleksij Rempel Date: Thu Apr 29 13:08:33 2021 +0200 net: dsa: ksz: ksz8863_smi_probe: set proper return value for ksz_switch_alloc() ksz_switch_alloc() will return NULL only if allocation is failed. So, the proper return value is -ENOMEM. Fixes: 60a364760002 ("net: dsa: microchip: Add Microchip KSZ8863 SMI based driver support") Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ba46b576a7954fa54ff4c1ef976624794b6668f6 Author: Oleksij Rempel Date: Thu Apr 29 13:08:32 2021 +0200 net: dsa: ksz: ksz8795_spi_probe: fix possible NULL pointer dereference Fix possible NULL pointer dereference in case devm_kzalloc() failed to allocate memory Fixes: cc13e52c3a89 ("net: dsa: microchip: Add Microchip KSZ8863 SPI based driver support") Reported-by: Colin Ian King Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d27f0201b93cb1016c232c46e0b8e1bf4c02a7ea Author: Oleksij Rempel Date: Thu Apr 29 13:08:31 2021 +0200 net: dsa: ksz: ksz8863_smi_probe: fix possible NULL pointer dereference Fix possible NULL pointer dereference in case devm_kzalloc() failed to allocate memory. Fixes: 60a364760002 ("net: dsa: microchip: Add Microchip KSZ8863 SMI based driver support") Reported-by: Colin Ian King Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 8343b1f8b97ac016150c8303f95b63b20b98edf8 Author: Yang Li Date: Thu Apr 29 18:38:25 2021 +0800 bnx2x: Remove redundant assignment to err Variable 'err' is set to -EIO but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Clean up the following clang-analyzer warning: drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c:1195:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: David S. Miller commit bbf6acea6ecf7d6a2c5ce9a399b9b16404392b89 Author: Jiapeng Chong Date: Thu Apr 29 18:25:46 2021 +0800 net: macb: Remove redundant assignment to queue Variable queue is set to bp->queues but these values is not used as it is overwritten later on, hence redundant assignment can be removed. Cleans up the following clang-analyzer warning: drivers/net/ethernet/cadence/macb_main.c:4919:21: warning: Value stored to 'queue' during its initialization is never read [clang-analyzer-deadcode.DeadStores]. drivers/net/ethernet/cadence/macb_main.c:4832:21: warning: Value stored to 'queue' during its initialization is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit 57e1d8206e48ef78e1b25823fc131ebe60c76b61 Author: Michael Walle Date: Thu Apr 29 11:05:21 2021 +0200 MAINTAINERS: move Murali Karicheri to credits His email bounces with permanent error "550 Invalid recipient". His last email was from 2020-09-09 on the LKML and he seems to have left TI. Signed-off-by: Michael Walle Signed-off-by: David S. Miller commit 1c7600b7cfc6154f2fd361a74b1d4f25b8f02e48 Author: Michael Walle Date: Thu Apr 29 11:05:20 2021 +0200 MAINTAINERS: remove Wingman Kwok His email bounces with permanent error "550 Invalid recipient". His last email on the LKML was from 2015-10-22 on the LKML. Signed-off-by: Michael Walle Signed-off-by: David S. Miller commit 2ce960f89b4dbd0c5fc2e8180c8d10fcbf1dcb6b Merge: 1a70f6597d5f8 b4047aac4ec10 Author: David S. Miller Date: Thu Apr 29 15:41:43 2021 -0700 Merge branch 'hns3-fixes' Huazhong Tan says: ==================== net: hns3: add some fixes for -net This series adds some fixes for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit b4047aac4ec1066bab6c71950623746d7bcf7154 Author: Jian Shen Date: Thu Apr 29 16:34:52 2021 +0800 net: hns3: add check for HNS3_NIC_STATE_INITED in hns3_reset_notify_up_enet() In some cases, the device is not initialized because reset failed. If another task calls hns3_reset_notify_up_enet() before reset retry, it will cause an error since uninitialized pointer access. So add check for HNS3_NIC_STATE_INITED before calling hns3_nic_net_open() in hns3_reset_notify_up_enet(). Fixes: bb6b94a896d4 ("net: hns3: Add reset interface implementation in client") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 568a54bdf70b143f3e0befa298e22ad469ffc732 Author: Yufeng Mo Date: Thu Apr 29 16:34:51 2021 +0800 net: hns3: initialize the message content in hclge_get_link_mode() The message sent to VF should be initialized, otherwise random value of some contents may cause improper processing by the target. So add a initialization to message in hclge_get_link_mode(). Fixes: 9194d18b0577 ("net: hns3: fix the problem that the supported port is empty") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 2867298dd49ee84214b8721521dc7a5a6382520c Author: Yufeng Mo Date: Thu Apr 29 16:34:50 2021 +0800 net: hns3: fix incorrect configuration for igu_egu_hw_err According to the UM, the type and enable status of igu_egu_hw_err should be configured separately. Currently, the type field is incorrect when disable this error. So fix it by configuring these two fields separately. Fixes: bf1faf9415dd ("net: hns3: Add enable and process hw errors from IGU, EGU and NCSI") Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1a70f6597d5f8abf6cea8e2df213740a18746194 Author: Yang Li Date: Thu Apr 29 09:32:36 2021 +0800 net: Remove redundant assignment to err Variable 'err' is set to -ENOMEM but this value is never read as it is overwritten with a new value later on, hence the 'If statements' and assignments are redundantand and can be removed. Cleans up the following clang-analyzer warning: net/ipv6/seg6.c:126:4: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: David S. Miller commit 59259ff7a81b9eb6213891c6451221e567f8f22f Author: Zhang Zhengming Date: Wed Apr 28 22:38:14 2021 +0800 bridge: Fix possible races between assigning rx_handler_data and setting IFF_BRIDGE_PORT bit There is a crash in the function br_get_link_af_size_filtered, as the port_exists(dev) is true and the rx_handler_data of dev is NULL. But the rx_handler_data of dev is correct saved in vmcore. The oops looks something like: ... pc : br_get_link_af_size_filtered+0x28/0x1c8 [bridge] ... Call trace: br_get_link_af_size_filtered+0x28/0x1c8 [bridge] if_nlmsg_size+0x180/0x1b0 rtnl_calcit.isra.12+0xf8/0x148 rtnetlink_rcv_msg+0x334/0x370 netlink_rcv_skb+0x64/0x130 rtnetlink_rcv+0x28/0x38 netlink_unicast+0x1f0/0x250 netlink_sendmsg+0x310/0x378 sock_sendmsg+0x4c/0x70 __sys_sendto+0x120/0x150 __arm64_sys_sendto+0x30/0x40 el0_svc_common+0x78/0x130 el0_svc_handler+0x38/0x78 el0_svc+0x8/0xc In br_add_if(), we found there is no guarantee that assigning rx_handler_data to dev->rx_handler_data will before setting the IFF_BRIDGE_PORT bit of priv_flags. So there is a possible data competition: CPU 0: CPU 1: (RCU read lock) (RTNL lock) rtnl_calcit() br_add_slave() if_nlmsg_size() br_add_if() br_get_link_af_size_filtered() -> netdev_rx_handler_register ... // The order is not guaranteed ... -> dev->priv_flags |= IFF_BRIDGE_PORT; // The IFF_BRIDGE_PORT bit of priv_flags has been set -> if (br_port_exists(dev)) { // The dev->rx_handler_data has NOT been assigned -> p = br_port_get_rcu(dev); .... -> rcu_assign_pointer(dev->rx_handler_data, rx_handler_data); ... Fix it in br_get_link_af_size_filtered, using br_port_get_check_rcu() and checking the return value. Signed-off-by: Zhang Zhengming Reviewed-by: Zhao Lei Reviewed-by: Wang Xiaogang Suggested-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 0ab1fa1c45ed6d661af241ac10733200fbce46fe Merge: 94604548aa716 31fe34a0118e0 Author: David S. Miller Date: Thu Apr 29 15:31:53 2021 -0700 Merge branch 'fragment-stack-oob-read' Davide Caratti says: ==================== fix stack OOB read while fragmenting IPv4 packets - patch 1/2 fixes openvswitch IPv4 fragmentation, that does a stack OOB read after commit d52e5a7e7ca4 ("ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmt") - patch 2/2 fixes the same issue in TC 'sch_frag' code ==================== Signed-off-by: David S. Miller commit 31fe34a0118e0acc958c802e830ad5d37ef6b1d3 Author: Davide Caratti Date: Wed Apr 28 15:23:14 2021 +0200 net/sched: sch_frag: fix stack OOB read while fragmenting IPv4 packets when 'act_mirred' tries to fragment IPv4 packets that had been previously re-assembled using 'act_ct', splats like the following can be observed on kernels built with KASAN: BUG: KASAN: stack-out-of-bounds in ip_do_fragment+0x1b03/0x1f60 Read of size 1 at addr ffff888147009574 by task ping/947 CPU: 0 PID: 947 Comm: ping Not tainted 5.12.0-rc6+ #418 Hardware name: Red Hat KVM, BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/01/2014 Call Trace: dump_stack+0x92/0xc1 print_address_description.constprop.7+0x1a/0x150 kasan_report.cold.13+0x7f/0x111 ip_do_fragment+0x1b03/0x1f60 sch_fragment+0x4bf/0xe40 tcf_mirred_act+0xc3d/0x11a0 [act_mirred] tcf_action_exec+0x104/0x3e0 fl_classify+0x49a/0x5e0 [cls_flower] tcf_classify_ingress+0x18a/0x820 __netif_receive_skb_core+0xae7/0x3340 __netif_receive_skb_one_core+0xb6/0x1b0 process_backlog+0x1ef/0x6c0 __napi_poll+0xaa/0x500 net_rx_action+0x702/0xac0 __do_softirq+0x1e4/0x97f do_softirq+0x71/0x90 __local_bh_enable_ip+0xdb/0xf0 ip_finish_output2+0x760/0x2120 ip_do_fragment+0x15a5/0x1f60 __ip_finish_output+0x4c2/0xea0 ip_output+0x1ca/0x4d0 ip_send_skb+0x37/0xa0 raw_sendmsg+0x1c4b/0x2d00 sock_sendmsg+0xdb/0x110 __sys_sendto+0x1d7/0x2b0 __x64_sys_sendto+0xdd/0x1b0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f82e13853eb Code: 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 f3 0f 1e fa 48 8d 05 75 42 2c 00 41 89 ca 8b 00 85 c0 75 14 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 75 c3 0f 1f 40 00 41 57 4d 89 c7 41 56 41 89 RSP: 002b:00007ffe01fad888 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00005571aac13700 RCX: 00007f82e13853eb RDX: 0000000000002330 RSI: 00005571aac13700 RDI: 0000000000000003 RBP: 0000000000002330 R08: 00005571aac10500 R09: 0000000000000010 R10: 0000000000000000 R11: 0000000000000246 R12: 00007ffe01faefb0 R13: 00007ffe01fad890 R14: 00007ffe01fad980 R15: 00005571aac0f0a0 The buggy address belongs to the page: page:000000001dff2e03 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x147009 flags: 0x17ffffc0001000(reserved) raw: 0017ffffc0001000 ffffea00051c0248 ffffea00051c0248 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888147009400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888147009480: f1 f1 f1 f1 04 f2 f2 f2 f2 f2 f2 f2 00 00 00 00 >ffff888147009500: 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 f2 f2 ^ ffff888147009580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888147009600: 00 00 00 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 for IPv4 packets, sch_fragment() uses a temporary struct dst_entry. Then, in the following call graph: ip_do_fragment() ip_skb_dst_mtu() ip_dst_mtu_maybe_forward() ip_mtu_locked() the pointer to struct dst_entry is used as pointer to struct rtable: this turns the access to struct members like rt_mtu_locked into an OOB read in the stack. Fix this changing the temporary variable used for IPv4 packets in sch_fragment(), similarly to what is done for IPv6 few lines below. Fixes: c129412f74e9 ("net/sched: sch_frag: add generic packet fragment support.") Cc: # 5.11 Reported-by: Shuang Li Acked-by: Marcelo Ricardo Leitner Acked-by: Cong Wang Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 7c0ea5930c1c211931819d83cfb157bff1539a4c Author: Davide Caratti Date: Wed Apr 28 15:23:07 2021 +0200 openvswitch: fix stack OOB read while fragmenting IPv4 packets running openvswitch on kernels built with KASAN, it's possible to see the following splat while testing fragmentation of IPv4 packets: BUG: KASAN: stack-out-of-bounds in ip_do_fragment+0x1b03/0x1f60 Read of size 1 at addr ffff888112fc713c by task handler2/1367 CPU: 0 PID: 1367 Comm: handler2 Not tainted 5.12.0-rc6+ #418 Hardware name: Red Hat KVM, BIOS 1.11.1-4.module+el8.1.0+4066+0f1aadab 04/01/2014 Call Trace: dump_stack+0x92/0xc1 print_address_description.constprop.7+0x1a/0x150 kasan_report.cold.13+0x7f/0x111 ip_do_fragment+0x1b03/0x1f60 ovs_fragment+0x5bf/0x840 [openvswitch] do_execute_actions+0x1bd5/0x2400 [openvswitch] ovs_execute_actions+0xc8/0x3d0 [openvswitch] ovs_packet_cmd_execute+0xa39/0x1150 [openvswitch] genl_family_rcv_msg_doit.isra.15+0x227/0x2d0 genl_rcv_msg+0x287/0x490 netlink_rcv_skb+0x120/0x380 genl_rcv+0x24/0x40 netlink_unicast+0x439/0x630 netlink_sendmsg+0x719/0xbf0 sock_sendmsg+0xe2/0x110 ____sys_sendmsg+0x5ba/0x890 ___sys_sendmsg+0xe9/0x160 __sys_sendmsg+0xd3/0x170 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f957079db07 Code: c3 66 90 41 54 41 89 d4 55 48 89 f5 53 89 fb 48 83 ec 10 e8 eb ec ff ff 44 89 e2 48 89 ee 89 df 41 89 c0 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 48 89 44 24 08 e8 24 ed ff ff 48 RSP: 002b:00007f956ce35a50 EFLAGS: 00000293 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000019 RCX: 00007f957079db07 RDX: 0000000000000000 RSI: 00007f956ce35ae0 RDI: 0000000000000019 RBP: 00007f956ce35ae0 R08: 0000000000000000 R09: 00007f9558006730 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 00007f956ce37308 R14: 00007f956ce35f80 R15: 00007f956ce35ae0 The buggy address belongs to the page: page:00000000af2a1d93 refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112fc7 flags: 0x17ffffc0000000() raw: 0017ffffc0000000 0000000000000000 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected addr ffff888112fc713c is located in stack of task handler2/1367 at offset 180 in frame: ovs_fragment+0x0/0x840 [openvswitch] this frame has 2 objects: [32, 144) 'ovs_dst' [192, 424) 'ovs_rt' Memory state around the buggy address: ffff888112fc7000: f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888112fc7080: 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 00 00 00 >ffff888112fc7100: 00 00 00 f2 f2 f2 f2 f2 f2 00 00 00 00 00 00 00 ^ ffff888112fc7180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888112fc7200: 00 00 00 00 00 00 f2 f2 f2 00 00 00 00 00 00 00 for IPv4 packets, ovs_fragment() uses a temporary struct dst_entry. Then, in the following call graph: ip_do_fragment() ip_skb_dst_mtu() ip_dst_mtu_maybe_forward() ip_mtu_locked() the pointer to struct dst_entry is used as pointer to struct rtable: this turns the access to struct members like rt_mtu_locked into an OOB read in the stack. Fix this changing the temporary variable used for IPv4 packets in ovs_fragment(), similarly to what is done for IPv6 few lines below. Fixes: d52e5a7e7ca4 ("ipv4: lock mtu in fnhe when received PMTU < net.ipv4.route.min_pmt") Cc: Acked-by: Eelco Chaudron Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 94604548aa7163fa14b837149bb0cb708bc613bc Author: Andrea Mayer Date: Tue Apr 27 17:44:04 2021 +0200 seg6: add counters support for SRv6 Behaviors This patch provides counters for SRv6 Behaviors as defined in [1], section 6. For each SRv6 Behavior instance, counters defined in [1] are: - the total number of packets that have been correctly processed; - the total amount of traffic in bytes of all packets that have been correctly processed; In addition, this patch introduces a new counter that counts the number of packets that have NOT been properly processed (i.e. errors) by an SRv6 Behavior instance. Counters are not only interesting for network monitoring purposes (i.e. counting the number of packets processed by a given behavior) but they also provide a simple tool for checking whether a behavior instance is working as we expect or not. Counters can be useful for troubleshooting misconfigured SRv6 networks. Indeed, an SRv6 Behavior can silently drop packets for very different reasons (i.e. wrong SID configuration, interfaces set with SID addresses, etc) without any notification/message to the user. Due to the nature of SRv6 networks, diagnostic tools such as ping and traceroute may be ineffective: paths used for reaching a given router can be totally different from the ones followed by probe packets. In addition, paths are often asymmetrical and this makes it even more difficult to keep up with the journey of the packets and to understand which behaviors are actually processing our traffic. When counters are enabled on an SRv6 Behavior instance, it is possible to verify if packets are actually processed by such behavior and what is the outcome of the processing. Therefore, the counters for SRv6 Behaviors offer an non-invasive observability point which can be leveraged for both traffic monitoring and troubleshooting purposes. [1] https://www.rfc-editor.org/rfc/rfc8986.html#name-counters Troubleshooting using SRv6 Behavior counters -------------------------------------------- Let's make a brief example to see how helpful counters can be for SRv6 networks. Let's consider a node where an SRv6 End Behavior receives an SRv6 packet whose Segment Left (SL) is equal to 0. In this case, the End Behavior (which accepts only packets with SL >= 1) discards the packet and increases the error counter. This information can be leveraged by the network operator for troubleshooting. Indeed, the error counter is telling the user that the packet: (i) arrived at the node; (ii) the packet has been taken into account by the SRv6 End behavior; (iii) but an error has occurred during the processing. The error (iii) could be caused by different reasons, such as wrong route settings on the node or due to an invalid SID List carried by the SRv6 packet. Anyway, the error counter is used to exclude that the packet did not arrive at the node or it has not been processed by the behavior at all. Turning on/off counters for SRv6 Behaviors ------------------------------------------ Each SRv6 Behavior instance can be configured, at the time of its creation, to make use of counters. This is done through iproute2 which allows the user to create an SRv6 Behavior instance specifying the optional "count" attribute as shown in the following example: $ ip -6 route add 2001:db8::1 encap seg6local action End count dev eth0 per-behavior counters can be shown by adding "-s" to the iproute2 command line, i.e.: $ ip -s -6 route show 2001:db8::1 2001:db8::1 encap seg6local action End packets 0 bytes 0 errors 0 dev eth0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Impact of counters for SRv6 Behaviors on performance ==================================================== To determine the performance impact due to the introduction of counters in the SRv6 Behavior subsystem, we have carried out extensive tests. We chose to test the throughput achieved by the SRv6 End.DX2 Behavior because, among all the other behaviors implemented so far, it reaches the highest throughput which is around 1.5 Mpps (per core at 2.4 GHz on a Xeon(R) CPU E5-2630 v3) on kernel 5.12-rc2 using packets of size ~ 100 bytes. Three different tests were conducted in order to evaluate the overall throughput of the SRv6 End.DX2 Behavior in the following scenarios: 1) vanilla kernel (without the SRv6 Behavior counters patch) and a single instance of an SRv6 End.DX2 Behavior; 2) patched kernel with SRv6 Behavior counters and a single instance of an SRv6 End.DX2 Behavior with counters turned off; 3) patched kernel with SRv6 Behavior counters and a single instance of SRv6 End.DX2 Behavior with counters turned on. All tests were performed on a testbed deployed on the CloudLab facilities [2], a flexible infrastructure dedicated to scientific research on the future of Cloud Computing. Results of tests are shown in the following table: Scenario (1): average 1504764,81 pps (~1504,76 kpps); std. dev 3956,82 pps Scenario (2): average 1501469,78 pps (~1501,47 kpps); std. dev 2979,85 pps Scenario (3): average 1501315,13 pps (~1501,32 kpps); std. dev 2956,00 pps As can be observed, throughputs achieved in scenarios (2),(3) did not suffer any observable degradation compared to scenario (1). Thanks to Jakub Kicinski and David Ahern for their valuable suggestions and comments provided during the discussion of the proposed RFCs. [2] https://www.cloudlab.us Signed-off-by: Andrea Mayer Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 4d0185e67806a233c423c1668e87e137fbda192c Author: Alexandre Belloni Date: Thu Apr 29 23:44:03 2021 +0200 rtc: sysfs: check features instead of ops Test RTC_FEATURE_ALARM instead of relying on .set_alarm to know whether alarms are available. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210429214403.2610952-1-alexandre.belloni@bootlin.com commit e463786f380ab28f1ca6e34ea65bbc2e03b2d325 Author: Dario Binacchi Date: Sun Apr 25 16:59:23 2021 +0200 rtc: omap: use rtc_write to access OMAP_RTC_OSC_REG The RTC_OSC_REG register is 32-bit, but the useful information is found in the 7 least significant bits (bits 7-31 are reserved). And in fact, as you can see from the code, all read accesses are 8-bit, as well as some writes. Let's make sure all writes are 8-bit. Moreover, in contexts where consecutive reads / writes after the busy check must take place within 15 us, it is better not to waste time on useless accesses. Signed-off-by: Dario Binacchi Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210425145924.23353-1-dariobin@libero.it commit fefbec3a741831bc7791a94a483ad55665160b50 Author: Krzysztof Kozlowski Date: Tue Apr 20 19:02:42 2021 +0200 rtc: s5m: Remove reference to parent's device pdata The S5M RTC driver does not use parent's device (sec-core PMIC driver) platform data so there is no need to check for it. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210420170244.13467-3-krzysztof.kozlowski@canonical.com commit 204756f016726a380bafe619438ed979088bd04a Author: Nobuhiro Iwamatsu Date: Tue Apr 20 11:39:17 2021 +0900 rtc: ds1307: Fix wday settings for rx8130 rx8130 wday specifies the bit position, not BCD. Fixes: ee0981be7704 ("rtc: ds1307: Add support for Epson RX8130CE") Signed-off-by: Nobuhiro Iwamatsu Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210420023917.1949066-1-nobuhiro1.iwamatsu@toshiba.co.jp commit a1cfe7cc3873baf83a26356cb5e10409c6fb942c Author: Alexandre Belloni Date: Sun Apr 18 02:20:23 2021 +0200 rtc: pcf8523: report oscillator failures Report oscillator failures and invalid date/time on RTC_VL_READ. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210418002023.1000265-3-alexandre.belloni@bootlin.com commit 13e37b7fb75dfaeb4f5a72468f0bd32853628d28 Author: Alexandre Belloni Date: Sun Apr 18 02:20:22 2021 +0200 rtc: pcf8523: add alarm support Alarm support requires unconditionally disabling clock out because it is using the int1 pin. Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210418002023.1000265-2-alexandre.belloni@bootlin.com commit 8ca5297e7e38f2dc8c753d33a5092e7be181fff0 Merge: b0030af53a74a 8ac27f2c6eac1 Author: Linus Torvalds Date: Thu Apr 29 14:32:00 2021 -0700 Merge tag 'kconfig-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kconfig updates from Masahiro Yamada: - Change 'option defconfig' to the environment variable KCONFIG_DEFCONFIG_LIST - Refactor tinyconfig without using allnoconfig_y - Remove 'option allnoconfig_y' syntax - Change 'option modules' to 'modules' - Do not use /boot/config-* etc. as base config for cross-compilation - Fix a search bug in nconf - Various code cleanups * tag 'kconfig-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (34 commits) kconfig: refactor .gitignore kconfig: highlight xconfig 'comment' lines with '***' kconfig: highlight gconfig 'comment' lines with '***' kconfig: gconf: remove unused code kconfig: remove unused PACKAGE definition kconfig: nconf: stop endless search loops kconfig: split menu.c out of parser.y kconfig: nconf: refactor in print_in_middle() kconfig: nconf: remove meaningless wattrset() call from show_menu() kconfig: nconf: change set_config_filename() to void function kconfig: nconf: refactor attributes setup code kconfig: nconf: remove unneeded default for menu prompt kconfig: nconf: get rid of (void) casts from wattrset() calls kconfig: nconf: fix NORMAL attributes kconfig: mconf,nconf: remove unneeded '\0' termination after snprintf() kconfig: use /boot/config-* etc. as DEFCONFIG_LIST only for native build kconfig: change sym_change_count to a boolean flag kconfig: nconf: fix core dump when searching in empty menu kconfig: lxdialog: A spello fix and a punctuation added kconfig: streamline_config.pl: Couple of typo fixes ... commit b0030af53a74a08c77ea11d3888da21542af2d0e Merge: 9d31d23389502 f634ca650f724 Author: Linus Torvalds Date: Thu Apr 29 14:24:39 2021 -0700 Merge tag 'kbuild-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull Kbuild updates from Masahiro Yamada: - Evaluate $(call cc-option,...) etc. only for build targets - Add CONFIG_VMLINUX_MAP to generate .map file when linking vmlinux - Remove unnecessary --gcc-toolchains Clang flag because the --prefix flag finds the toolchains - Do not pass Clang's --prefix flag when using the integrated as - Check the assembler version in Kconfig time - Add new CONFIG options, AS_VERSION, AS_IS_GNU, AS_IS_LLVM to clean up some dependencies in Kconfig - Fix invalid Module.symvers creation when building only modules without vmlinux - Fix false-positive modpost warnings when CONFIG_TRIM_UNUSED_KSYMS is set, but there is no module to build - Refactor module installation Makefile - Support zstd for module compression - Convert alpha and ia64 to use generic shell scripts to generate the syscall headers - Add a new elfnote to indicate if the kernel was built with LTO, which will be used by pahole - Flatten the directory structure under include/config/ so CONFIG options and filenames match - Change the deb source package name from linux-$(KERNELRELEASE) to linux-upstream * tag 'kbuild-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (42 commits) kbuild: Add $(KBUILD_HOSTLDFLAGS) to 'has_libelf' test kbuild: deb-pkg: change the source package name to linux-upstream tools: do not include scripts/Kbuild.include kbuild: redo fake deps at include/config/*.h kbuild: remove TMPO from try-run MAINTAINERS: add pattern for dummy-tools kbuild: add an elfnote for whether vmlinux is built with lto ia64: syscalls: switch to generic syscallhdr.sh ia64: syscalls: switch to generic syscalltbl.sh alpha: syscalls: switch to generic syscallhdr.sh alpha: syscalls: switch to generic syscalltbl.sh sysctl: use min() helper for namecmp() kbuild: add support for zstd compressed modules kbuild: remove CONFIG_MODULE_COMPRESS kbuild: merge scripts/Makefile.modsign to scripts/Makefile.modinst kbuild: move module strip/compression code into scripts/Makefile.modinst kbuild: refactor scripts/Makefile.modinst kbuild: rename extmod-prefix to extmod_prefix kbuild: check module name conflict for external modules as well kbuild: show the target directory for depmod log ... commit 94959a3a04a574b6234df8ff165bf70135b0bb2b Author: Alexandre Belloni Date: Sun Apr 18 02:20:21 2021 +0200 rtc: pcf8523: remove useless define Drop DRIVER_NAME as it is only used once Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210418002023.1000265-1-alexandre.belloni@bootlin.com commit c55c3a516ceff3a041d5e3253d4d9a1b75fbb1d8 Author: Alexandre Belloni Date: Sun Apr 18 02:00:23 2021 +0200 rtc: rtc_update_irq_enable: rework UIE emulation Now that the core is aware of whether alarms are available, it is possible to decide whether UIE emulation is required before actually trying to set the alarm. This greatly simplifies rtc_update_irq_enable because there is now only one error value to track and is not relying on the return value of __rtc_set_alarm anymore. Tested-by: Łukasz Stelmach Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210418000023.995758-3-alexandre.belloni@bootlin.com commit 4bf84b449a0ea3885397bb5540a8fc68a78edb9d Author: Alexandre Belloni Date: Sun Apr 18 02:00:22 2021 +0200 rtc: ds1307: remove flags flags is now unused, drop it. Tested-by: Łukasz Stelmach Reviewed-by: Łukasz Stelmach Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210418000023.995758-2-alexandre.belloni@bootlin.com commit 64e9d8e4dbc4e9173589ed8d61ea423466172396 Author: Alexandre Belloni Date: Sun Apr 18 02:00:21 2021 +0200 rtc: ds1307: replace HAS_ALARM by RTC_FEATURE_ALARM The core now has RTC_FEATURE_ALARM for the driver to indicate whether alarms are available. Use that instead of HAS_ALARM to ensure the alarm callbacks are not even called. Tested-by: Łukasz Stelmach Reviewed-by: Łukasz Stelmach Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210418000023.995758-1-alexandre.belloni@bootlin.com commit 7942121b8ca073932529e7122a573ec2d1ed0d93 Author: Alexandre Belloni Date: Sun Apr 18 01:52:05 2021 +0200 rtc: imx-sc: remove .read_alarm The RTC core properly handles RTC without .read_alarm and doesn't use it to set alarms. .read_alarm can be safely dropped. Signed-off-by: Alexandre Belloni Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20210417235205.994119-1-alexandre.belloni@bootlin.com commit e16e9f1184181a874cf432302ffe4689cc56b9e2 Merge: 6c905ab1ace22 ff0e9ee3a6d40 Author: Jiri Kosina Date: Thu Apr 29 21:47:22 2021 +0200 Merge branch 'for-5.13/warnings' into for-linus - plethora of fixes for valid gcc warnings from Lee Jones commit 6c905ab1ace224e847536f658b7831e458e479dd Merge: 5a4a13cb47121 46fc466e01a18 Author: Jiri Kosina Date: Thu Apr 29 21:47:03 2021 +0200 Merge branch 'for-5.13/wacom' into for-linus - Wacom pen handling fix from Ping Cheng commit 5a4a13cb47121dd20812e3397d30fd410ebd9f7d Merge: e50fedec822ef e9bb37ff35bb6 Author: Jiri Kosina Date: Thu Apr 29 21:46:05 2021 +0200 Merge branch 'for-5.13/thrustmaster' into for-linus - support for initialization of some newer Thrustmaster wheels from Dario Pagani commit e50fedec822efc7b7090f95862b782d91ca8aec0 Merge: cfc9bdfb6ba76 35a927f2848bd Author: Jiri Kosina Date: Thu Apr 29 21:45:19 2021 +0200 Merge branch 'for-5.13/surface-system-aggregator-intergration' into for-linus - Surface Aggregator Module support from Maximilian Luz commit cfc9bdfb6ba76de84a9ed8ee75dc56903b505a78 Merge: 275ac61bafb88 f567d6ef8606f Author: Jiri Kosina Date: Thu Apr 29 21:44:07 2021 +0200 Merge branch 'for-5.13/plantronics' into for-linus - Workaround for broken behavior of Plantronics Blackwire from Maxim Mikityanskiy commit 275ac61bafb8826686d5589f084e5644c5b650d1 Merge: 686e161eea8f4 9de07a4e8d4cb Author: Jiri Kosina Date: Thu Apr 29 21:43:43 2021 +0200 Merge branch 'for-5.13/magicmouse' into for-linus - Apple Magic Mouse 2 support from John Chen commit 686e161eea8f4d2c4f3ccdc17323754a36e56af1 Merge: 0b21c35f5cf31 434f77092eeb4 Author: Jiri Kosina Date: Thu Apr 29 21:42:51 2021 +0200 Merge branch 'for-5.13/logitech' into for-linus - Support for newer Quad/BT 2.0 Logitech receivers in HID proxy mode from Hans de Goede commit 0b21c35f5cf31399eef17e592156e2e890f6c689 Merge: cddbefcc17460 c158c2afc99f9 Author: Jiri Kosina Date: Thu Apr 29 21:42:21 2021 +0200 Merge branch 'for-5.13/lenovo' into for-linus - LED fixes and Thinkpad X1 Tablet keyboard support, from Hans de Goede commit cddbefcc174606e3a1c8bc3d5c1aeb640c51321e Merge: 8ba3c81c0872e 0960941043a19 Author: Jiri Kosina Date: Thu Apr 29 21:41:11 2021 +0200 Merge branch 'for-5.13/i2c-hid' into for-linus - Cleanups to ACPI handling in i2c-hid driver from Andy Shevchenko commit 8ba3c81c0872e0865a4c68a8eb1683ffd29a4580 Merge: 743b357607ee9 2076b7bdc5290 Author: Jiri Kosina Date: Thu Apr 29 21:40:07 2021 +0200 Merge branch 'for-5.13/ft260' into for-linus - Support for FTDI FT260 I2C host adapter from Michael Zaidman commit 743b357607ee9dabe049a89ac68f878c6e661687 Merge: 590ade88bafd8 ba3f92938f2c0 Author: Jiri Kosina Date: Thu Apr 29 21:39:33 2021 +0200 Merge branch 'for-5.13/elan' into for-linus - Mute LED support fixes for Elantech driver from Hans de Goede commit 590ade88bafd8a88a2d3f69fa197cda491221b38 Merge: 276559d8d02c2 9951bb259dd07 Author: Jiri Kosina Date: Thu Apr 29 21:38:18 2021 +0200 Merge branch 'for-5.13/core' into for-linus - hiddev_connect() return value fix from Jason Gerecke commit cf3770e78421f268dee3c1eef5e8a5d284ec3416 Author: Colin Ian King Date: Thu Apr 29 11:46:02 2021 +0100 io_uring: Fix premature return from loop and memory leak Currently the -EINVAL error return path is leaking memory allocated to data. Fix this by not returning immediately but instead setting the error return variable to -EINVAL and breaking out of the loop. Kudos to Pavel Begunkov for suggesting a correct fix. Signed-off-by: Colin Ian King Reviewed-by: Pavel Begunkov Link: https://lore.kernel.org/r/20210429104602.62676-1-colin.king@canonical.com Signed-off-by: Jens Axboe commit 47b228ce6f66830768eac145efa7746637969101 Author: Pavel Begunkov Date: Thu Apr 29 11:46:48 2021 +0100 io_uring: fix unchecked error in switch_start() io_rsrc_node_switch_start() can fail, don't forget to check returned error code. Reported-by: syzbot+a4715dd4b7c866136f79@syzkaller.appspotmail.com Fixes: eae071c9b4cef ("io_uring: prepare fixed rw for dynanic buffers") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c4c06e2f3f0c8e43bd8d0a266c79055bcc6b6e60.1619693112.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 6224843d56e0c29c0357e86b02b95801897c2caf Author: Pavel Begunkov Date: Wed Apr 28 13:11:29 2021 +0100 io_uring: allow empty slots for reg buffers Allow empty reg buffer slots any request using which should fail. This allows users to not register all buffers in advance, but do it lazily and/or on demand via updates. That is achieved by setting iov_base and iov_len to zero for registration and/or buffer updates. Empty buffer can't have a non-zero tag. Implementation details: to not add extra overhead to io_import_fixed(), create a dummy buffer crafted to fail any request using it, and set it to all empty buffer slots. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7e95e4d700082baaf010c648c72ac764c9cc8826.1619611868.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b0d658ec88a695861c3fd78ef783c1181f81a6e2 Author: Pavel Begunkov Date: Tue Apr 27 16:13:53 2021 +0100 io_uring: add more build check for uapi Add a couple of BUILD_BUG_ON() checking some rsrc uapi structs and SQE flags. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ff960df4d5026b9fb5bfd80994b9d3667d3926da.1619536280.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit dddca22636c9062f284e755e2a49fb8863db8a82 Author: Pavel Begunkov Date: Tue Apr 27 16:13:52 2021 +0100 io_uring: dont overlap internal and user req flags CQE flags take one byte that we store in req->flags together with other REQ_F_* internal flags. CQE flags are copied directly into req and then verified that requires some handling on failures, e.g. to make sure that that copy doesn't set some of the internal flags. Move all internal flags to take bits after the first byte, so we don't need extra handling and make it safer overall. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b8b5b02d1ab9d786fcc7db4a3fe86db6b70b8987.1619536280.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 2840f710f23a3a867426637393acbdfa1f4f1d59 Author: Pavel Begunkov Date: Tue Apr 27 16:13:51 2021 +0100 io_uring: fix drain with rsrc CQEs Resource emitted CQEs are not bound to requests, so fix up counters used for DRAIN/defer logic. Fixes: b60c8dce33895 ("io_uring: preparation for rsrc tagging") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2b32f5f0a40d5928c3466d028f936e167f0654be.1619536280.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9d31d2338950293ec19d9b095fbaa9030899dcb4 Merge: 635de956a7f5a 4a52dd8fefb45 Author: Linus Torvalds Date: Thu Apr 29 11:57:23 2021 -0700 Merge tag 'net-next-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next Pull networking updates from Jakub Kicinski: "Core: - bpf: - allow bpf programs calling kernel functions (initially to reuse TCP congestion control implementations) - enable task local storage for tracing programs - remove the need to store per-task state in hash maps, and allow tracing programs access to task local storage previously added for BPF_LSM - add bpf_for_each_map_elem() helper, allowing programs to walk all map elements in a more robust and easier to verify fashion - sockmap: support UDP and cross-protocol BPF_SK_SKB_VERDICT redirection - lpm: add support for batched ops in LPM trie - add BTF_KIND_FLOAT support - mostly to allow use of BTF on s390 which has floats in its headers files - improve BPF syscall documentation and extend the use of kdoc parsing scripts we already employ for bpf-helpers - libbpf, bpftool: support static linking of BPF ELF files - improve support for encapsulation of L2 packets - xdp: restructure redirect actions to avoid a runtime lookup, improving performance by 4-8% in microbenchmarks - xsk: build skb by page (aka generic zerocopy xmit) - improve performance of software AF_XDP path by 33% for devices which don't need headers in the linear skb part (e.g. virtio) - nexthop: resilient next-hop groups - improve path stability on next-hops group changes (incl. offload for mlxsw) - ipv6: segment routing: add support for IPv4 decapsulation - icmp: add support for RFC 8335 extended PROBE messages - inet: use bigger hash table for IP ID generation - tcp: deal better with delayed TX completions - make sure we don't give up on fast TCP retransmissions only because driver is slow in reporting that it completed transmitting the original - tcp: reorder tcp_congestion_ops for better cache locality - mptcp: - add sockopt support for common TCP options - add support for common TCP msg flags - include multiple address ids in RM_ADDR - add reset option support for resetting one subflow - udp: GRO L4 improvements - improve 'forward' / 'frag_list' co-existence with UDP tunnel GRO, allowing the first to take place correctly even for encapsulated UDP traffic - micro-optimize dev_gro_receive() and flow dissection, avoid retpoline overhead on VLAN and TEB GRO - use less memory for sysctls, add a new sysctl type, to allow using u8 instead of "int" and "long" and shrink networking sysctls - veth: allow GRO without XDP - this allows aggregating UDP packets before handing them off to routing, bridge, OvS, etc. - allow specifing ifindex when device is moved to another namespace - netfilter: - nft_socket: add support for cgroupsv2 - nftables: add catch-all set element - special element used to define a default action in case normal lookup missed - use net_generic infra in many modules to avoid allocating per-ns memory unnecessarily - xps: improve the xps handling to avoid potential out-of-bound accesses and use-after-free when XPS change race with other re-configuration under traffic - add a config knob to turn off per-cpu netdev refcnt to catch underflows in testing Device APIs: - add WWAN subsystem to organize the WWAN interfaces better and hopefully start driving towards more unified and vendor- independent APIs - ethtool: - add interface for reading IEEE MIB stats (incl. mlx5 and bnxt support) - allow network drivers to dump arbitrary SFP EEPROM data, current offset+length API was a poor fit for modern SFP which define EEPROM in terms of pages (incl. mlx5 support) - act_police, flow_offload: add support for packet-per-second policing (incl. offload for nfp) - psample: add additional metadata attributes like transit delay for packets sampled from switch HW (and corresponding egress and policy-based sampling in the mlxsw driver) - dsa: improve support for sandwiched LAGs with bridge and DSA - netfilter: - flowtable: use direct xmit in topologies with IP forwarding, bridging, vlans etc. - nftables: counter hardware offload support - Bluetooth: - improvements for firmware download w/ Intel devices - add support for reading AOSP vendor capabilities - add support for virtio transport driver - mac80211: - allow concurrent monitor iface and ethernet rx decap - set priority and queue mapping for injected frames - phy: add support for Clause-45 PHY Loopback - pci/iov: add sysfs MSI-X vector assignment interface to distribute MSI-X resources to VFs (incl. mlx5 support) New hardware/drivers: - dsa: mv88e6xxx: add support for Marvell mv88e6393x - 11-port Ethernet switch with 8x 1-Gigabit Ethernet and 3x 10-Gigabit interfaces. - dsa: support for legacy Broadcom tags used on BCM5325, BCM5365 and BCM63xx switches - Microchip KSZ8863 and KSZ8873; 3x 10/100Mbps Ethernet switches - ath11k: support for QCN9074 a 802.11ax device - Bluetooth: Broadcom BCM4330 and BMC4334 - phy: Marvell 88X2222 transceiver support - mdio: add BCM6368 MDIO mux bus controller - r8152: support RTL8153 and RTL8156 (USB Ethernet) chips - mana: driver for Microsoft Azure Network Adapter (MANA) - Actions Semi Owl Ethernet MAC - can: driver for ETAS ES58X CAN/USB interfaces Pure driver changes: - add XDP support to: enetc, igc, stmmac - add AF_XDP support to: stmmac - virtio: - page_to_skb() use build_skb when there's sufficient tailroom (21% improvement for 1000B UDP frames) - support XDP even without dedicated Tx queues - share the Tx queues with the stack when necessary - mlx5: - flow rules: add support for mirroring with conntrack, matching on ICMP, GTP, flex filters and more - support packet sampling with flow offloads - persist uplink representor netdev across eswitch mode changes - allow coexistence of CQE compression and HW time-stamping - add ethtool extended link error state reporting - ice, iavf: support flow filters, UDP Segmentation Offload - dpaa2-switch: - move the driver out of staging - add spanning tree (STP) support - add rx copybreak support - add tc flower hardware offload on ingress traffic - ionic: - implement Rx page reuse - support HW PTP time-stamping - octeon: support TC hardware offloads - flower matching on ingress and egress ratelimitting. - stmmac: - add RX frame steering based on VLAN priority in tc flower - support frame preemption (FPE) - intel: add cross time-stamping freq difference adjustment - ocelot: - support forwarding of MRP frames in HW - support multiple bridges - support PTP Sync one-step timestamping - dsa: mv88e6xxx, dpaa2-switch: offload bridge port flags like learning, flooding etc. - ipa: add IPA v4.5, v4.9 and v4.11 support (Qualcomm SDX55, SM8350, SC7280 SoCs) - mt7601u: enable TDLS support - mt76: - add support for 802.3 rx frames (mt7915/mt7615) - mt7915 flash pre-calibration support - mt7921/mt7663 runtime power management fixes" * tag 'net-next-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2451 commits) net: selftest: fix build issue if INET is disabled net: netrom: nr_in: Remove redundant assignment to ns net: tun: Remove redundant assignment to ret net: phy: marvell: add downshift support for M88E1240 net: dsa: ksz: Make reg_mib_cnt a u8 as it never exceeds 255 net/sched: act_ct: Remove redundant ct get and check icmp: standardize naming of RFC 8335 PROBE constants bpf, selftests: Update array map tests for per-cpu batched ops bpf: Add batched ops support for percpu array bpf: Implement formatted output helpers with bstr_printf seq_file: Add a seq_bprintf function sfc: adjust efx->xdp_tx_queue_count with the real number of initialized queues net:nfc:digital: Fix a double free in digital_tg_recv_dep_req net: fix a concurrency bug in l2tp_tunnel_register() net/smc: Remove redundant assignment to rc mpls: Remove redundant assignment to err llc2: Remove redundant assignment to rc net/tls: Remove redundant initialization of record rds: Remove redundant assignment to nr_sig dt-bindings: net: mdio-gpio: add compatible for microchip,mdio-smi0 ... commit dfc06b389a4f54e78c03abecd5b42ab6ea8d492a Author: Christoph Hellwig Date: Thu Apr 29 08:28:59 2021 +0200 swiotlb: don't override user specified size in swiotlb_adjust_size If the user already specified a swiotlb size on the command line, swiotlb_adjust_size should not overwrite it. Fixes: 2cbc2776efe4 ("swiotlb: remove swiotlb_nr_tbl") Reported-by: Tom Lendacky Tested-by: Tom Lendacky Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 635de956a7f5a6ffcb04f29d70630c64c717b56b Merge: d0cc7ecacba8a a500fc918f7b8 Author: Linus Torvalds Date: Thu Apr 29 11:41:43 2021 -0700 Merge tag 'x86-mm-2021-04-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 tlb updates from Ingo Molnar: "The x86 MM changes in this cycle were: - Implement concurrent TLB flushes, which overlaps the local TLB flush with the remote TLB flush. In testing this improved sysbench performance measurably by a couple of percentage points, especially if TLB-heavy security mitigations are active. - Further micro-optimizations to improve the performance of TLB flushes" * tag 'x86-mm-2021-04-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: smp: Micro-optimize smp_call_function_many_cond() smp: Inline on_each_cpu_cond() and on_each_cpu() x86/mm/tlb: Remove unnecessary uses of the inline keyword cpumask: Mark functions as pure x86/mm/tlb: Do not make is_lazy dirty for no reason x86/mm/tlb: Privatize cpu_tlbstate x86/mm/tlb: Flush remote and local TLBs concurrently x86/mm/tlb: Open-code on_each_cpu_cond_mask() for tlb_is_not_lazy() x86/mm/tlb: Unify flush_tlb_func_local() and flush_tlb_func_remote() smp: Run functions concurrently in smp_call_function_many_cond() commit d0cc7ecacba8a5b6bbdd5aa6ba3d1bc2fe59b580 Merge: 77d51337d6500 47de4477a8e6b Author: Linus Torvalds Date: Thu Apr 29 11:36:47 2021 -0700 Merge tag 'microblaze-v5.13' of git://git.monstr.eu/linux-2.6-microblaze Pull Microblaze updates from Michal Simek: "No new features, just about cleaning up some code and moving to generic syscall solution used by other architectures: - Switch to generic syscall scripts - Some small fixes" * tag 'microblaze-v5.13' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: add 'fallthrough' to memcpy/memset/memmove microblaze: Fix a typo microblaze: tag highmem_setup() with __meminit microblaze: syscalls: switch to generic syscallhdr.sh microblaze: syscalls: switch to generic syscalltbl.sh commit 77d51337d650086643e1e96b8a7e1e6cbf0b09ff Merge: 3644286f6cbce 7e9be673cb1b0 Author: Linus Torvalds Date: Thu Apr 29 11:28:08 2021 -0700 Merge tag 'mips_5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux Pull MIPS updates from Thomas Bogendoerfer: - removed get_fs/set_fs - removed broken/unmaintained MIPS KVM trap and emulate support - added support for Loongson-2K1000 - fixes and cleanups * tag 'mips_5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux: (107 commits) MIPS: BCM63XX: Use BUG_ON instead of condition followed by BUG. MIPS: select ARCH_KEEP_MEMBLOCK unconditionally mips: Do not include hi and lo in clobber list for R6 MIPS:DTS:Correct the license for Loongson-2K MIPS:DTS:Fix label name and interrupt number of ohci for Loongson-2K MIPS: Avoid handcoded DIVU in `__div64_32' altogether lib/math/test_div64: Correct the spelling of "dividend" lib/math/test_div64: Fix error message formatting mips/bootinfo:correct some comments of fw_arg MIPS: Avoid DIVU in `__div64_32' is result would be zero MIPS: Reinstate platform `__div64_32' handler div64: Correct inline documentation for `do_div' lib/math: Add a `do_div' test module MIPS: Makefile: Replace -pg with CC_FLAGS_FTRACE MIPS: pci-legacy: revert "use generic pci_enable_resources" MIPS: Loongson64: Add kexec/kdump support MIPS: pci-legacy: use generic pci_enable_resources MIPS: pci-legacy: remove busn_resource field MIPS: pci-legacy: remove redundant info messages MIPS: pci-legacy: stop using of_pci_range_to_resource ... commit 3644286f6cbcea86f6fa4d308e7ac06bf2a3715a Merge: 767fcbc80f63d 59cda49ecf6c9 Author: Linus Torvalds Date: Thu Apr 29 11:06:13 2021 -0700 Merge tag 'fsnotify_for_v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify updates from Jan Kara: - support for limited fanotify functionality for unpriviledged users - faster merging of fanotify events - a few smaller fsnotify improvements * tag 'fsnotify_for_v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: shmem: allow reporting fanotify events with file handles on tmpfs fs: introduce a wrapper uuid_to_fsid() fanotify_user: use upper_32_bits() to verify mask fanotify: support limited functionality for unprivileged users fanotify: configurable limits via sysfs fanotify: limit number of event merge attempts fsnotify: use hash table for faster events merge fanotify: mix event info and pid into merge key hash fanotify: reduce event objectid to 29-bit hash fsnotify: allow fsnotify_{peek,remove}_first_event with empty queue commit 767fcbc80f63d7f08ff6c0858fe33583e6fdd327 Merge: d2b6f8a179194 a3cc754ad9b80 Author: Linus Torvalds Date: Thu Apr 29 10:51:29 2021 -0700 Merge tag 'for_v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull quota, ext2, reiserfs updates from Jan Kara: - support for path (instead of device) based quotactl syscall (quotactl_path(2)) - ext2 conversion to kmap_local() - other minor cleanups & fixes * tag 'for_v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fs/reiserfs/journal.c: delete useless variables fs/ext2: Replace kmap() with kmap_local_page() ext2: Match up ext2_put_page() with ext2_dotdot() and ext2_find_entry() fs/ext2/: fix misspellings using codespell tool quota: report warning limits for realtime space quotas quota: wire up quotactl_path quota: Add mountpath based quota support commit d2b6f8a179194de0ffc4886ffc2c4358d86047b8 Merge: f2c80837e27e6 76adf92a30f3b Author: Linus Torvalds Date: Thu Apr 29 10:43:51 2021 -0700 Merge tag 'xfs-5.13-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull xfs updates from Darrick Wong: "The notable user-visible addition this cycle is ability to remove space from the last AG in a filesystem. This is the first of many changes needed for full-fledged support for shrinking a filesystem. Still needed are (a) the ability to reorganize files and metadata away from the end of the fs; (b) the ability to remove entire allocation groups; (c) shrink support for realtime volumes; and (d) thorough testing of (a-c). There are a number of performance improvements in this code drop: Dave streamlined various parts of the buffer logging code and reduced the cost of various debugging checks, and added the ability to pre-create the xattr structures while creating files. Brian eliminated transaction reservations that were being held across writeback (thus reducing livelock potential. Other random pieces: Pavel fixed the repetitve warnings about deprecated mount options, I fixed online fsck to behave itself when a readonly remount comes in during scrub, and refactored various other parts of that code, Christoph contributed a lot of refactoring this cycle. The xfs_icdinode structure has been absorbed into the (incore) xfs_inode structure, and the format and flags handling around xfs_inode_fork structures has been simplified. Chandan provided a number of fixes for extent count overflow related problems that have been shaken out by debugging knobs added during 5.12. Summary: - Various minor fixes in online scrub. - Prevent metadata files from being automatically inactivated. - Validate btree heights by the computed per-btree limits. - Don't warn about remounting with deprecated mount options. - Initialize attr forks at create time if we suspect we're going to need to store them. - Reduce memory reallocation workouts in the logging code. - Fix some theoretical math calculation errors in logged buffers that span multiple discontig memory ranges but contiguous ondisk regions. - Speedups in dirty buffer bitmap handling. - Make type verifier functions more inline-happy to reduce overhead. - Reduce debug overhead in directory checking code. - Many many typo fixes. - Begin to handle the permanent loss of the very end of a filesystem. - Fold struct xfs_icdinode into xfs_inode. - Deprecate the long defunct BMV_IF_NO_DMAPI_READ from the bmapx ioctl. - Remove a broken directory block format check from online scrub. - Fix a bug where we could produce an unnecessarily tall data fork btree when creating an attr fork. - Fix scrub and readonly remounts racing. - Fix a writeback ioend log deadlock problem by dropping the behavior where we could preallocate a setfilesize transaction. - Fix some bugs in the new extent count checking code. - Fix some bugs in the attr fork preallocation code. - Refactor if_flags out of the incore inode fork data structure" * tag 'xfs-5.13-merge-3' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (77 commits) xfs: remove xfs_quiesce_attr declaration xfs: remove XFS_IFEXTENTS xfs: remove XFS_IFINLINE xfs: remove XFS_IFBROOT xfs: only look at the fork format in xfs_idestroy_fork xfs: simplify xfs_attr_remove_args xfs: rename and simplify xfs_bmap_one_block xfs: move the XFS_IFEXTENTS check into xfs_iread_extents xfs: drop unnecessary setfilesize helper xfs: drop unused ioend private merge and setfilesize code xfs: open code ioend needs workqueue helper xfs: drop submit side trans alloc for append ioends xfs: fix return of uninitialized value in variable error xfs: get rid of the ip parameter to xchk_setup_* xfs: fix scrub and remount-ro protection when running scrub xfs: move the check for post-EOF mappings into xfs_can_free_eofblocks xfs: move the xfs_can_free_eofblocks call under the IOLOCK xfs: precalculate default inode attribute offset xfs: default attr fork size does not handle device inodes xfs: inode fork allocation depends on XFS_IFEXTENT flag ... commit f2c80837e27e67e91ad93f41f0849be28b808b14 Merge: 8ae8932c6a330 e5966cf20f0c7 Author: Linus Torvalds Date: Thu Apr 29 10:33:35 2021 -0700 Merge tag 'gfs2-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull gfs2 updates from Andreas Gruenbacher: - Fix some compiler and kernel-doc warnings - Various minor cleanups and optimizations - Add a new sysfs gfs2 status file with some filesystem wide information * tag 'gfs2-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: gfs2: Fix fall-through warnings for Clang gfs2: Fix a number of kernel-doc warnings gfs2: Make gfs2_setattr_simple static gfs2: Add new sysfs file for gfs2 status gfs2: Silence possible null pointer dereference warning gfs2: Turn gfs2_meta_indirect_buffer into gfs2_meta_buffer gfs2: Replace gfs2_lblk_to_dblk with gfs2_get_extent gfs2: Turn gfs2_extent_map into gfs2_{get,alloc}_extent gfs2: Add new gfs2_iomap_get helper gfs2: Remove unused variable sb_format gfs2: Fix dir.c function parameter descriptions gfs2: Eliminate gh parameter from go_xmote_bh func gfs2: don't create empty buffers for NO_CREATE commit 8ae8932c6a330790c6bf22a43a6960118c34dcb5 Merge: d72cd4ad4174c c6e2f52e3051e Author: Linus Torvalds Date: Thu Apr 29 10:32:18 2021 -0700 Merge tag 'exfat-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat Pull exfat updates from Namjae Jeon: - Improve write performance with dirsync mount option - Improve lookup performance - Add support for FITRIM ioctl - Fix a bug with discard option * tag 'exfat-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: speed up iterate/lookup by fixing start point of traversing cluster chain exfat: improve write performance when dirsync enabled exfat: add support ioctl and FITRIM function exfat: introduce bitmap_lock for cluster bitmap access exfat: fix erroneous discard when clear cluster bit commit f1ce3986baa62cffc3c5be156994de87524bab99 Author: Mathias Krause Date: Thu Apr 29 19:59:41 2021 +0300 nitro_enclaves: Fix stale file descriptors on failed usercopy A failing usercopy of the slot uid will lead to a stale entry in the file descriptor table as put_unused_fd() won't release it. This enables userland to refer to a dangling 'file' object through that still valid file descriptor, leading to all kinds of use-after-free exploitation scenarios. Exchanging put_unused_fd() for close_fd(), ksys_close() or alike won't solve the underlying issue, as the file descriptor might have been replaced in the meantime, e.g. via userland calling close() on it (leading to a NULL pointer dereference in the error handling code as 'fget(enclave_fd)' will return a NULL pointer) or by dup2()'ing a completely different file object to that very file descriptor, leading to the same situation: a dangling file descriptor pointing to a freed object -- just in this case to a file object of user's choosing. Generally speaking, after the call to fd_install() the file descriptor is live and userland is free to do whatever with it. We cannot rely on it to still refer to our enclave object afterwards. In fact, by abusing userfaultfd() userland can hit the condition without any racing and abuse the error handling in the nitro code as it pleases. To fix the above issues, defer the call to fd_install() until all possible errors are handled. In this case it's just the usercopy, so do it directly in ne_create_vm_ioctl() itself. Signed-off-by: Mathias Krause Signed-off-by: Andra Paraschiv Cc: stable Link: https://lore.kernel.org/r/20210429165941.27020-2-andraprs@amazon.com Signed-off-by: Greg Kroah-Hartman commit 0739191b848136f733978eae9c37e34435c906af Author: Jianjun Wang Date: Tue Apr 20 14:17:23 2021 +0800 MAINTAINERS: Add Jianjun Wang as MediaTek PCI co-maintainer Update entry for MediaTek PCIe controller, add Jianjun Wang as MediaTek PCI co-maintainer. Link: https://lore.kernel.org/r/20210420061723.989-8-jianjun.wang@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit d537dc125f0756f7eb9f3a2f878fbe2e3179c452 Author: Jianjun Wang Date: Tue Apr 20 14:17:22 2021 +0800 PCI: mediatek-gen3: Add system PM support Add suspend_noirq and resume_noirq callback functions to implement PM system suspend and resume hooks for the MediaTek Gen3 PCIe controller. When the system suspends, trigger the PCIe link to enter the L2 state and pull down the PERST# pin, gating the clocks of the MAC layer, and then power-off the physical layer to provide power-saving. When the system resumes, the PCIe link should be re-established and the related control register values should be restored. Link: https://lore.kernel.org/r/20210420061723.989-7-jianjun.wang@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 1bdafba538be706b185c7aded0d42327702d92b7 Author: Jianjun Wang Date: Tue Apr 20 14:17:21 2021 +0800 PCI: mediatek-gen3: Add MSI support Add MSI support for MediaTek Gen3 PCIe controller. This PCIe controller supports up to 256 MSI vectors, the MSI hardware block diagram is as follows: +-----+ | GIC | +-----+ ^ | port->irq | +-+-+-+-+-+-+-+-+ |0|1|2|3|4|5|6|7| (PCIe intc) +-+-+-+-+-+-+-+-+ ^ ^ ^ | | ... | +-------+ +------+ +-----------+ | | | +-+-+---+--+--+ +-+-+---+--+--+ +-+-+---+--+--+ |0|1|...|30|31| |0|1|...|30|31| |0|1|...|30|31| (MSI sets) +-+-+---+--+--+ +-+-+---+--+--+ +-+-+---+--+--+ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ | | | | | | | | | | | | (MSI vectors) | | | | | | | | | | | | (MSI SET0) (MSI SET1) ... (MSI SET7) With 256 MSI vectors supported, the MSI vectors are composed of 8 sets, each set has its own address for MSI message, and supports 32 MSI vectors to generate interrupt. Link: https://lore.kernel.org/r/20210420061723.989-6-jianjun.wang@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marc Zyngier Acked-by: Ryder Lee commit 814cceebba9b7d1306b8d49587ffb0e81f7b73af Author: Jianjun Wang Date: Tue Apr 20 14:17:20 2021 +0800 PCI: mediatek-gen3: Add INTx support Add INTx support for MediaTek Gen3 PCIe controller. Link: https://lore.kernel.org/r/20210420061723.989-5-jianjun.wang@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Marc Zyngier Acked-by: Ryder Lee commit d3bf75b579b980b9d83a76d3b4d8bfb9f55b24ca Author: Jianjun Wang Date: Tue Apr 20 14:17:19 2021 +0800 PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192 MediaTek's PCIe host controller has three generation HWs, the new generation HW is an individual bridge, it supports Gen3 speed and compatible with Gen2, Gen1 speed. Add support for new Gen3 controller which can be found on MT8192. Link: https://lore.kernel.org/r/20210420061723.989-4-jianjun.wang@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: Lorenzo Pieralisi Acked-by: Ryder Lee commit 8bcca26585585ae4b44d25d30f351ad0afa4976b Author: Hou Zhiqiang Date: Tue Apr 13 17:22:19 2021 +0300 PCI: dwc: Move iATU detection earlier dw_pcie_ep_init() depends on the detected iATU region numbers to allocate the in/outbound window management bitmap. It fails after 281f1f99cf3a ("PCI: dwc: Detect number of iATU windows"). Move the iATU region detection into a new function, move the detection to the very beginning of dw_pcie_host_init() and dw_pcie_ep_init(). Also remove it from the dw_pcie_setup(), since it's more like a software initialization step than hardware setup. Link: https://lore.kernel.org/r/20210125044803.4310-1-Zhiqiang.Hou@nxp.com Link: https://lore.kernel.org/linux-pci/20210407131255.702054-1-dmitry.baryshkov@linaro.org Link: https://lore.kernel.org/r/20210413142219.2301430-1-dmitry.baryshkov@linaro.org Fixes: 281f1f99cf3a ("PCI: dwc: Detect number of iATU windows") Tested-by: Kunihiko Hayashi Tested-by: Marek Szyprowski Tested-by: Manivannan Sadhasivam Signed-off-by: Hou Zhiqiang [DB: moved dw_pcie_iatu_detect to happen after host_init callback] Signed-off-by: Dmitry Baryshkov Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Cc: stable@vger.kernel.org # v5.11+ Cc: Marek Szyprowski commit 7d499169f793083c83bcc6e31170be8f36087075 Author: Jiapeng Chong Date: Thu Apr 15 16:32:57 2021 +0800 PCI: dwc/intel-gw: Remove unused function Fix the following clang warning: drivers/pci/controller/dwc/pcie-intel-gw.c:84:19: warning: unused function 'pcie_app_rd' [-Wunused-function]. Link: https://lore.kernel.org/r/1618475577-99198-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński commit 294353d950ab3e47d7694d382e50c887206f541a Author: Jisheng Zhang Date: Thu Mar 25 15:26:04 2021 +0800 PCI: dwc: Move dw_pcie_msi_init() to dw_pcie_setup_rc() If the host which makes use of IP's integrated MSI Receiver losts power during suspend, we need to reinit the RC and MSI Receiver in resume. But after we move dw_pcie_msi_init() into the core, we have no API to do so. Usually the dwc users need to call dw_pcie_setup_rc() to reinit the RC, we can solve this problem by moving dw_pcie_msi_init() to dw_pcie_setup_rc(). Link: https://lore.kernel.org/r/20210325152604.6e79deba@xhacker.debian Signed-off-by: Jisheng Zhang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit ad025f8e46f3dbf09b1bf8d7a5b4ce858df74544 Author: Krzysztof Wilczyński Date: Fri Apr 16 20:58:45 2021 +0000 PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions The sysfs_emit() and sysfs_emit_at() functions were introduced to make it less ambiguous which function is preferred when writing to the output buffer in a device attribute's "show" callback [1]. Convert the PCI sysfs object "show" functions from sprintf(), snprintf() and scnprintf() to sysfs_emit() and sysfs_emit_at() accordingly, as the latter is aware of the PAGE_SIZE buffer and correctly returns the number of bytes written into the buffer. No functional change intended. [1] Documentation/filesystems/sysfs.rst [bhelgaas: drop dsm_label_utf16s_to_utf8s(), link speed/width changes] Link: https://lore.kernel.org/r/20210416205856.3234481-10-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit df1af7cbe7bc11720b3e915771d47acc3604eb44 Author: Krzysztof Wilczyński Date: Tue Apr 27 15:18:47 2021 -0500 PCI/sysfs: Rearrange smbios_attr_group and acpi_attr_group Collect the smbios_attr_group and acpi_attr_group together in the logical order. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20210416205856.3234481-6-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 362fb766264a1d62254ad950304fa1d97172bb44 Author: Krzysztof Wilczyński Date: Tue Apr 27 15:04:44 2021 -0500 PCI/sysfs: Tidy SMBIOS & ACPI label attributes Update coding style to reduce distraction. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20210416205856.3234481-6-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 506140f9c06b0d136669ae7795e0264c9f21c1a7 Author: Krzysztof Wilczyński Date: Tue Apr 27 10:49:16 2021 -0500 PCI/sysfs: Convert "index", "acpi_index", "label" to static attributes The "label", "index", and "acpi_index" sysfs attributes show firmware label information about the device. If the ACPI Device Name _DSM is implemented for the device, we have: label Device name (optional, may be null) acpi_index Instance number (unique under \_SB scope) When there is no ACPI _DSM and SMBIOS provides an Onboard Devices structure for the device, we have: label Reference Designation, e.g., a silkscreen label index Device Type Instance Previously these attributes were dynamically created either by pci_bus_add_device() or the pci_sysfs_init() initcall, but since they don't need to be created or removed dynamically, we can use a static attribute so the device model takes care of addition and removal automatically. Convert "label", "index", and "acpi_index" to static attributes. Presence of the ACPI _DSM (device_has_acpi_name()) determines whether the ACPI information (label, acpi_index) or the SMBIOS information (label, index) is visible. [bhelgaas: commit log, split to separate patch, add "pci_dev_" prefix] Suggested-by: Oliver O'Halloran Link: https://lore.kernel.org/r/20210416205856.3234481-6-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 4dd7dfa166d220a245ee21f499bb1084bc249393 Author: Krzysztof Wilczyński Date: Tue Apr 27 14:18:26 2021 -0500 PCI/sysfs: Define SMBIOS label attributes with DEVICE_ATTR*() Use DEVICE_ATTR*() to simplify definition of the SMBIOS label attributes. No functional change intended. Note that dev_attr_smbios_label requires __ATTR() because the "label" attribute can be exposed via either ACPI or SMBIOS, and we already have the ACPI label_show() function in this file. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20210416205856.3234481-6-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 2ed6494155444dd4d2005869edce1ae73b4f23ca Author: Krzysztof Wilczyński Date: Tue Apr 27 13:48:51 2021 -0500 PCI/sysfs: Define ACPI label attributes with DEVICE_ATTR*() Use DEVICE_ATTR*() to simplify definitions of the ACPI label attributes. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20210416205856.3234481-6-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 1017275d2e43dba68527e0e69f4cc12d2b0f8966 Author: Krzysztof Wilczyński Date: Tue Apr 27 10:39:16 2021 -0500 PCI/sysfs: Rename device_has_dsm() to device_has_acpi_name() Rename device_has_dsm() to device_has_acpi_name() to better reflect its purpose and move it earlier so it's available for a future SMBIOS .is_visible() function. No functional change intended. [bhelgaas: split to separate patch] Link: https://lore.kernel.org/r/20210416205856.3234481-6-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit d93f8399053dcf117ff56a3029ff08c0e36f4b75 Author: Krzysztof Wilczyński Date: Fri Apr 16 20:58:40 2021 +0000 PCI/sysfs: Convert "vpd" to static attribute The "vpd" sysfs attribute allows access to Vital Product Data (VPD). Previously it was dynamically created either by pci_bus_add_device() or the pci_sysfs_init() initcall, but since it doesn't need to be created or removed dynamically, we can use a static attribute so the device model takes care of addition and removal automatically. Convert "vpd" to a static attribute and use the .is_bin_visible() callback to check whether the device supports VPD. Remove pcie_vpd_create_sysfs_dev_files(), pcie_vpd_remove_sysfs_dev_files(), pci_create_capabilities_sysfs(), and pci_create_capabilities_sysfs(), which are no longer needed. [bhelgaas: This is substantially the same as the earlier patch from Heiner Kallweit . I included Krzysztof's change here so all the "convert to static attribute" changes are together.] [bhelgaas: rename to vpd_read()/vpd_write() and pci_dev_vpd_attr_group] Suggested-by: Oliver O'Halloran Based-on: https://lore.kernel.org/r/7703024f-8882-9eec-a122-599871728a89@gmail.com Based-on-patch-by: Heiner Kallweit Link: https://lore.kernel.org/r/20210416205856.3234481-5-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 07b4523e9e2fe9763e5c62da032d3c444e83d0fd Author: Bjorn Helgaas Date: Wed Apr 28 13:32:53 2021 -0500 PCI/sysfs: Rename "vpd" attribute accessors Rename "vpd" attribute accessors so they fit with the BIN_ATTR_RW() macro usage. Currently there is no BIN_ATTR_ADMIN_RW() that uses 0600 permissions, but if there were, it would likely use "vpd_read()" and "vpd_write()". No functional change intended. Extracted from the patch mentioned below by Heiner Kallweit . Link: https://lore.kernel.org/linux-pci/7703024f-8882-9eec-a122-599871728a89@gmail.com/ Signed-off-by: Bjorn Helgaas commit d4f74e162d238ce00a640af5f0611c3f51dad70e Author: Darrick J. Wong Date: Wed Apr 28 22:41:39 2021 -0700 xfs: fix xfs_reflink_unshare usage of filemap_write_and_wait_range The final parameter of filemap_write_and_wait_range is the end of the range to flush, not the length of the range to flush. Fixes: 46afb0628b86 ("xfs: only flush the unshared range in xfs_reflink_unshare") Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Brian Foster commit fd43cf600cf61c66ae0a1021aca2f636115c7fcb Author: Brian Foster Date: Wed Apr 28 15:06:05 2021 -0700 xfs: set aside allocation btree blocks from block reservation The blocks used for allocation btrees (bnobt and countbt) are technically considered free space. This is because as free space is used, allocbt blocks are removed and naturally become available for traditional allocation. However, this means that a significant portion of free space may consist of in-use btree blocks if free space is severely fragmented. On large filesystems with large perag reservations, this can lead to a rare but nasty condition where a significant amount of physical free space is available, but the majority of actual usable blocks consist of in-use allocbt blocks. We have a record of a (~12TB, 32 AG) filesystem with multiple AGs in a state with ~2.5GB or so free blocks tracked across ~300 total allocbt blocks, but effectively at 100% full because the the free space is entirely consumed by refcountbt perag reservation. Such a large perag reservation is by design on large filesystems. The problem is that because the free space is so fragmented, this AG contributes the 300 or so allocbt blocks to the global counters as free space. If this pattern repeats across enough AGs, the filesystem lands in a state where global block reservation can outrun physical block availability. For example, a streaming buffered write on the affected filesystem continues to allow delayed allocation beyond the point where writeback starts to fail due to physical block allocation failures. The expected behavior is for the delalloc block reservation to fail gracefully with -ENOSPC before physical block allocation failure is a possibility. To address this problem, set aside in-use allocbt blocks at reservation time and thus ensure they cannot be reserved until truly available for physical allocation. This allows alloc btree metadata to continue to reside in free space, but dynamically adjusts reservation availability based on internal state. Note that the logic requires that the allocbt counter is fully populated at reservation time before it is fully effective. We currently rely on the mount time AGF scan in the perag reservation initialization code for this dependency on filesystems where it's most important (i.e. with active perag reservations). Signed-off-by: Brian Foster Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 16eaab839a9273ed156ebfccbd40c15d1e72f3d8 Author: Brian Foster Date: Wed Apr 28 15:05:50 2021 -0700 xfs: introduce in-core global counter of allocbt blocks Introduce an in-core counter to track the sum of all allocbt blocks used by the filesystem. This value is currently tracked per-ag via the ->agf_btreeblks field in the AGF, which also happens to include rmapbt blocks. A global, in-core count of allocbt blocks is required to identify the subset of global ->m_fdblocks that consists of unavailable blocks currently used for allocation btrees. To support this calculation at block reservation time, construct a similar global counter for allocbt blocks, populate it on first read of each AGF and update it as allocbt blocks are used and released. Signed-off-by: Brian Foster Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2675ad3890db93e58f2264d07c2d1f615ec5adf7 Author: Brian Foster Date: Wed Apr 28 15:05:41 2021 -0700 xfs: unconditionally read all AGFs on mounts with perag reservation perag reservation is enabled at mount time on a per AG basis. The upcoming change to set aside allocbt blocks from block reservation requires a populated allocbt counter as soon as possible after mount to be fully effective against large perag reservations. Therefore as a preparation step, initialize the pagf on all mounts where at least one reservation is active. Note that this already occurs to some degree on most default format filesystems as reservation requirement calculations already depend on the AGF or AGI, depending on the reservation type. Signed-off-by: Brian Foster Reviewed-by: Chandan Babu R Reviewed-by: Allison Henderson Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e147a756ab263f9d10eafd08b79b9fac1b08e56c Author: Darrick J. Wong Date: Mon Apr 26 19:06:58 2021 -0700 xfs: count free space btree blocks when scrubbing pre-lazysbcount fses Since agf_btreeblks didn't exist before the lazysbcount feature, the fs summary count scrubber needs to walk the free space btrees to determine the amount of space being used by those btrees. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Gao Xiang commit 6543990a168acf366f4b6174d7bd46ba15a8a2a6 Author: Dave Chinner Date: Mon Apr 26 18:28:31 2021 -0700 xfs: update superblock counters correctly for !lazysbcount Keep the mount superblock counters up to date for !lazysbcount filesystems so that when we log the superblock they do not need updating in any way because they are already correct. It's found by what Zorro reported: 1. mkfs.xfs -f -l lazy-count=0 -m crc=0 $dev 2. mount $dev $mnt 3. fsstress -d $mnt -p 100 -n 1000 (maybe need more or less io load) 4. umount $mnt 5. xfs_repair -n $dev and I've seen no problem with this patch. Signed-off-by: Dave Chinner Reported-by: Zorro Lang Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit e6c01077ec2d28fe8b6e0bc79eddea8d788f6ea3 Author: Darrick J. Wong Date: Fri Apr 23 16:02:01 2021 -0700 xfs: don't check agf_btreeblks on pre-lazysbcount filesystems The AGF free space btree block counter wasn't added until the lazysbcount feature was added to XFS midway through the life of the V4 format, so ignore the field when checking. Online AGF repair requires rmapbt, so it doesn't need the feature check. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 1aec7c3d05670b92b7339b19999009a93808efb9 Author: Darrick J. Wong Date: Fri Apr 23 16:02:00 2021 -0700 xfs: remove obsolete AGF counter debugging In commit f8f2835a9cf3 we changed the behavior of XFS to use EFIs to remove blocks from an overfilled AGFL because there were complaints about transaction overruns that stemmed from trying to free multiple blocks in a single transaction. Unfortunately, that commit missed a subtlety in the debug-mode transaction accounting when a realtime volume is attached. If a realtime file undergoes a data fork mapping change such that realtime extents are allocated (or freed) in the same transaction that a data device block is also allocated (or freed), we can trip a debugging assertion. This can happen (for example) if a realtime extent is allocated and it is necessary to reshape the bmbt to hold the new mapping. When we go to allocate a bmbt block from an AG, the first thing the data device block allocator does is ensure that the freelist is the proper length. If the freelist is too long, it will trim the freelist to the proper length. In debug mode, trimming the freelist calls xfs_trans_agflist_delta() to record the decrement in the AG free list count. Prior to f8f28 we would put the free block back in the free space btrees in the same transaction, which calls xfs_trans_agblocks_delta() to record the increment in the AG free block count. Since AGFL blocks are included in the global free block count (fdblocks), there is no corresponding fdblocks update, so the AGFL free satisfies the following condition in xfs_trans_apply_sb_deltas: /* * Check that superblock mods match the mods made to AGF counters. */ ASSERT((tp->t_fdblocks_delta + tp->t_res_fdblocks_delta) == (tp->t_ag_freeblks_delta + tp->t_ag_flist_delta + tp->t_ag_btree_delta)); The comparison here used to be: (X + 0) == ((X+1) + -1 + 0), where X is the number blocks that were allocated. After commit f8f28 we defer the block freeing to the next chained transaction, which means that the calls to xfs_trans_agflist_delta and xfs_trans_agblocks_delta occur in separate transactions. The (first) transaction that shortens the free list trips on the comparison, which has now become: (X + 0) == ((X) + -1 + 0) because we haven't freed the AGFL block yet; we've only logged an intention to free it. When the second transaction (the deferred free) commits, it will evaluate the expression as: (0 + 0) == (1 + 0 + 0) and trip over that in turn. At this point, the astute reader may note that the two commits tagged by this patch have been in the kernel for a long time but haven't generated any bug reports. How is it that the author became aware of this bug? This originally surfaced as an intermittent failure when I was testing realtime rmap, but a different bug report by Zorro Lang reveals the same assertion occuring on !lazysbcount filesystems. The common factor to both reports (and why this problem wasn't previously reported) becomes apparent if we consider when xfs_trans_apply_sb_deltas is called by __xfs_trans_commit(): if (tp->t_flags & XFS_TRANS_SB_DIRTY) xfs_trans_apply_sb_deltas(tp); With a modern lazysbcount filesystem, transactions update only the percpu counters, so they don't need to set XFS_TRANS_SB_DIRTY, hence xfs_trans_apply_sb_deltas is rarely called. However, updates to the count of free realtime extents are not part of lazysbcount, so XFS_TRANS_SB_DIRTY will be set on transactions adding or removing data fork mappings to realtime files; similarly, XFS_TRANS_SB_DIRTY is always set on !lazysbcount filesystems. Dave mentioned in response to an earlier version of this patch: "IIUC, what you are saying is that this debug code is simply not exercised in normal testing and hasn't been for the past decade? And it still won't be exercised on anything other than realtime device testing? "...it was debugging code from 1994 that was largely turned into dead code when lazysbcounters were introduced in 2007. Hence I'm not sure it holds any value anymore." This debugging code isn't especially helpful - you can modify the flcount on one AG and the freeblks of another AG, and it won't trigger. Add the fact that nobody noticed for a decade, and let's just get rid of it (and start testing realtime :P). This bug was found by running generic/051 on either a V4 filesystem lacking lazysbcount; or a V5 filesystem with a realtime volume. Cc: bfoster@redhat.com, zlang@redhat.com Fixes: f8f2835a9cf3 ("xfs: defer agfl block frees when dfops is available") Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster commit c6e3bf437184d41d885ba679eab0ddd43f95db56 Author: Arnaldo Carvalho de Melo Date: Mon Apr 26 15:47:39 2021 -0300 perf build: Defer printing detected features to the end of all feature checks We were doing it in tools/build/Makefile.feature, after running the feature checks, but then in tools/perf/Makefile.config we can call more feature checks when we notice that some feature check failed, like when libbfd wasn't detected and we add libraries to the LDFLAGS of its feature check to try again, etc. Acked-by: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo commit 19177bc3da7e52bc7fb7e603556f98f06e074092 Author: Arnaldo Carvalho de Melo Date: Mon Apr 26 17:01:24 2021 -0300 tools build: Allow deferring printing the results of feature detection By setting FEATURE_DISPLAY_DEFERRED=1 a tool may ask for the printout of the detected features in tools/build/Makefile.feature to be done later adter extra feature checks are done that are tool specific. The perf tool will do it via its tools/perf/Makefile.config, as it performs such extra feature checks. Acked-by: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo commit fbed59f844912f377b83cc25594c692b5f6ebae2 Author: Jiri Olsa Date: Mon Apr 26 15:27:32 2021 -0300 perf build: Regenerate the FEATURE_DUMP file after extra feature checks Feature detection is done in tools/build/Makefile.feature, we may exit there with some features not detected and then, in tools/perf/Makefile.config try adding extra libraries to link and then do extra feature checks to see if we now find the feature. This is the case with the disassembler-four-args that checks if the diassembler() function in libopcodes (binutils) has a signature with one or with four arguments, as this is not ABI and they changed it at some point. This is not a problem when doing normal builds, for instance: $ make -C tools/perf O=/tmp/build/perf As we don't use what is in FEATURE-DUMP at that point, but is a problem if we pass FEATURE_DUMP=/previously-detected-features as we do in 'make -C tools/perf build-test' to reuse the feature detection in the many build combinations we test there. When that is done feature-disassembler-four-args will be set to 0, but opensuse 15.1 has the four arguments function signature in disassembler(). The build thus fails. Fix it by rewriting the FEATURE-DUMP file at the end of tools/perf/Makefile.config to register features we retested in that make file. Signed-off-by: Jiri Olsa Reported-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Arnaldo Carvalho de Melo commit 81e70d7ee4ae13d60800958bca9d3c7675de16c9 Author: Leo Yan Date: Wed Apr 28 20:09:15 2021 +0800 perf session: Dump PERF_RECORD_TIME_CONV event Now perf tool uses the common stub function process_event_op2_stub() for dumping TIME_CONV event, thus it doesn't output the clock parameters contained in the event. This patch adds the callback function for dumping the hardware clock parameters in TIME_CONV event. Before: # perf report -D 0x978 [0x38]: event: 79 . . ... raw event: size 56 bytes . 0000: 4f 00 00 00 00 00 38 00 15 00 00 00 00 00 00 00 O.....8......... . 0010: 00 00 40 01 00 00 00 00 86 89 0b bf df ff ff ff ..@........ . 0020: d1 c1 b2 39 03 00 00 00 ff ff ff ff ff ff ff 00 9..... . 0030: 01 01 00 00 00 00 00 00 ........ 0 0 0x978 [0x38]: PERF_RECORD_TIME_CONV : unhandled! [...] After: # perf report -D 0x978 [0x38]: event: 79 . . ... raw event: size 56 bytes . 0000: 4f 00 00 00 00 00 38 00 15 00 00 00 00 00 00 00 O.....8......... . 0010: 00 00 40 01 00 00 00 00 86 89 0b bf df ff ff ff ..@........ . 0020: d1 c1 b2 39 03 00 00 00 ff ff ff ff ff ff ff 00 9..... . 0030: 01 01 00 00 00 00 00 00 ........ 0 0 0x978 [0x38]: PERF_RECORD_TIME_CONV ... Time Shift 21 ... Time Muliplier 20971520 ... Time Zero 18446743935180835206 ... Time Cycles 13852918225 ... Time Mask 0xffffffffffffff ... Cap Time Zero 1 ... Cap Time Short 1 : unhandled! [...] Signed-off-by: Leo Yan Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steve MacLean Cc: Yonatan Goldschmidt Link: https://lore.kernel.org/r/20210428120915.7123-5-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 050ffc449008eeeafc187dec337d9cf1518f89bc Author: Leo Yan Date: Wed Apr 28 20:09:14 2021 +0800 perf session: Add swap operation for event TIME_CONV Since commit d110162cafc8 ("perf tsc: Support cap_user_time_short for event TIME_CONV"), the event PERF_RECORD_TIME_CONV has extended the data structure for clock parameters. To be backwards-compatible, this patch adds a dedicated swap operation for the event PERF_RECORD_TIME_CONV, based on checking if the event contains field "time_cycles", it can support both for the old and new event formats. Fixes: d110162cafc8 ("perf tsc: Support cap_user_time_short for event TIME_CONV") Signed-off-by: Leo Yan Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steve MacLean Cc: Yonatan Goldschmidt Link: https://lore.kernel.org/r/20210428120915.7123-4-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit aa616f5a8a2d22a179d5502ebd85045af66fa656 Author: Leo Yan Date: Wed Apr 28 20:09:13 2021 +0800 perf jit: Let convert_timestamp() to be backwards-compatible Commit d110162cafc80dad ("perf tsc: Support cap_user_time_short for event TIME_CONV") supports the extended parameters for event TIME_CONV, but it broke the backwards compatibility, so any perf data file with old event format fails to convert timestamp. This patch introduces a helper event_contains() to check if an event contains a specific member or not. For the backwards-compatibility, if the event size confirms the extended parameters are supported in the event TIME_CONV, then copies these parameters. Committer notes: To make this compiler backwards compatible add this patch: - struct perf_tsc_conversion tc = { 0 }; + struct perf_tsc_conversion tc = { .time_shift = 0, }; Fixes: d110162cafc8 ("perf tsc: Support cap_user_time_short for event TIME_CONV") Signed-off-by: Leo Yan Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steve MacLean Cc: Yonatan Goldschmidt Link: https://lore.kernel.org/r/20210428120915.7123-3-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit e1d380ea8b00db4bb14d1f513000d4b62aa9d3f0 Author: Leo Yan Date: Wed Apr 28 20:09:12 2021 +0800 perf tools: Change fields type in perf_record_time_conv C standard claims "An object declared as type _Bool is large enough to store the values 0 and 1", bool type size can be 1 byte or larger than 1 byte. Thus it's uncertian for bool type size with different compilers. This patch changes the bool type in structure perf_record_time_conv to __u8 type, and pads extra bytes for 8-byte alignment; this can give reliable structure size. Fixes: d110162cafc8 ("perf tsc: Support cap_user_time_short for event TIME_CONV") Suggested-by: Adrian Hunter Signed-off-by: Leo Yan Acked-by: Adrian Hunter Cc: Alexander Shishkin Cc: Gustavo A. R. Silva Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Steve MacLean Cc: Yonatan Goldschmidt Link: https://lore.kernel.org/r/20210428120915.7123-2-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 56d32d4cac645bac05fa70d935fa5040e3ab6bb3 Author: Michael Petlan Date: Wed Apr 28 11:20:23 2021 +0200 perf tools: Enable libtraceevent dynamic linking Currently we support only static linking with kernel's libtraceevent (tools/lib/traceevent). This patch adds libtraceevent package detection and support to link perf with it dynamically. The libtraceevent package status is displayed with: $ make VF=1 LIBTRACEEVENT_DYNAMIC=1 ... ... libtraceevent: [ on ] Default behavior remains the same (static linking). Committer testing: $ make LIBTRACEEVENT_DYNAMIC=1 VF=1 O=/tmp/build/perf -C tools/perf install-bin |& grep traceevent Makefile.config:1090: *** Error: No libtraceevent devel library found, please install libtraceevent-devel. Stop. $ Signed-off-by: Michael Petlan Tested-by: Arnaldo Carvalho de Melo Cc: Jiri Olsa LPU-Reference: 20210428092023.4009-1-mpetlan@redhat.com Signed-off-by: Arnaldo Carvalho de Melo commit 2750ce1d4df2e70630d76bc53da160ca43a80d22 Author: Jin Yao Date: Tue Apr 27 15:01:39 2021 +0800 perf Documentation: Document intel-hybrid support Add some words and examples to help understanding of Intel hybrid perf support. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-27-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit a37f3b885610f89c3f2285756eb3f386288c3d41 Author: Jin Yao Date: Tue Apr 27 15:01:38 2021 +0800 perf tests: Skip 'perf stat metrics (shadow stat) test' for hybrid Currently we don't support shadow stat for hybrid. root@ssp-pwrt-002:~# ./perf stat -e cycles,instructions -a -- sleep 1 Performance counter stats for 'system wide': 12,883,109,591 cpu_core/cycles/ 6,405,163,221 cpu_atom/cycles/ 555,553,778 cpu_core/instructions/ 841,158,734 cpu_atom/instructions/ 1.002644773 seconds time elapsed Now there is no shadow stat 'insn per cycle' reported. We will support it later and now just skip the 'perf stat metrics (shadow stat) test'. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-26-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d9da6f70eb23511007cc6ed0aba02d9f61b3d6cf Author: Jin Yao Date: Tue Apr 27 15:01:37 2021 +0800 perf tests: Support 'Convert perf time to TSC' test for hybrid Since for "cycles:u' on hybrid platform, it creates two "cycles". So the second evsel in evlist also needs initialization. With this patch, # ./perf test 71 71: Convert perf time to TSC : Ok Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-25-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c102038892f73cf70f8c50e4fafb45d6e5465129 Author: Jin Yao Date: Tue Apr 27 15:01:36 2021 +0800 perf tests: Support 'Session topology' test for hybrid Force to create one event "cpu_core/cycles/" by default, otherwise in evlist__valid_sample_type, the checking of 'if (evlist->core.nr_entries == 1)' would be failed. # ./perf test 41 41: Session topology : Ok Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-24-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6081e876edd3f5d23273385730e482eca0afb2c8 Author: Jin Yao Date: Tue Apr 27 15:01:35 2021 +0800 perf tests: Support 'Parse and process metrics' test for hybrid Some events are not supported. Only pick up some cases for hybrid. # ./perf test 68 68: Parse and process metrics : Ok Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-23-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 43eb05d066795bdfea58a6a0cea77bbaa1a09b30 Author: Jin Yao Date: Tue Apr 27 15:01:34 2021 +0800 perf tests: Support 'Track with sched_switch' test for hybrid Since for "cycles:u' on hybrid platform, it creates two "cycles". So the number of events in evlist is not expected in next test steps. Now we just use one event "cpu_core/cycles:u/" for hybrid. # ./perf test 35 35: Track with sched_switch : Ok Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-22-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f15da0b1fb7bdff4891218f648d374cfffeb24fa Author: Jin Yao Date: Tue Apr 27 15:01:33 2021 +0800 perf tests: Skip 'Setup struct perf_event_attr' test for hybrid For hybrid, the attr.type consists of pmu type id + original type. There will be much changes for this test. Now we temporarily skip this test case and TODO in future. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-21-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit afff9f312e37c64a789aad0fab1ec597404a500f Author: Jin Yao Date: Tue Apr 27 15:01:32 2021 +0800 perf tests: Add hybrid cases for 'Roundtrip evsel->name' test Since for one hw event, two hybrid events are created. For example, evsel->idx evsel__name(evsel) 0 cycles 1 cycles 2 instructions 3 instructions ... So for comparing the evsel name on hybrid, the evsel->idx needs to be divided by 2. # ./perf test 14 14: Roundtrip evsel->name : Ok Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-20-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 2541cb63ac0c3dfbbe363dd09a16dfdd4096fc88 Author: Jin Yao Date: Tue Apr 27 15:01:31 2021 +0800 perf tests: Add hybrid cases for 'Parse event definition strings' test Add basic hybrid test cases for 'Parse event definition strings' test. # perf test 6 6: Parse event definition strings : Ok Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-19-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 91c0f5ec812f38f5e900b5557254baf563c4a2e3 Author: Jin Yao Date: Tue Apr 27 15:01:30 2021 +0800 perf record: Uniquify hybrid event name For perf-record, it would be useful to tell user the pmu which the event belongs to. For example, # perf record -a -- sleep 1 # perf report # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 106 of event 'cpu_core/cycles/' # Event count (approx.): 22043448 # # Overhead Command Shared Object Symbol # ........ ............ ....................... ............................ # ... Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-18-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 660e533e87ff4e66434f90fca987b929d4eb0059 Author: Jin Yao Date: Tue Apr 27 15:01:29 2021 +0800 perf stat: Warn group events from different hybrid PMU If a group has events which are from different hybrid PMUs, shows a warning: "WARNING: events in group from different hybrid PMUs!" This is to remind the user not to put the core event and atom event into one group. Next, just disable grouping. # perf stat -e "{cpu_core/cycles/,cpu_atom/cycles/}" -a -- sleep 1 WARNING: events in group from different hybrid PMUs! WARNING: grouped events cpus do not match, disabling group: anon group { cpu_core/cycles/, cpu_atom/cycles/ } Performance counter stats for 'system wide': 5,438,125 cpu_core/cycles/ 3,914,586 cpu_atom/cycles/ 1.004250966 seconds time elapsed Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-17-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 92637cc7295510f4b3cb945cafcaec97c82e42f2 Author: Jin Yao Date: Tue Apr 27 15:01:28 2021 +0800 perf stat: Filter out unmatched aggregation for hybrid event perf-stat has supported some aggregation modes, such as --per-core, --per-socket and etc. While for hybrid event, it may only available on part of cpus. So for --per-core, we need to filter out the unavailable cores, for --per-socket, filter out the unavailable sockets, and so on. Before: # perf stat --per-core -e cpu_core/cycles/ -a -- sleep 1 Performance counter stats for 'system wide': S0-D0-C0 2 479,530 cpu_core/cycles/ S0-D0-C4 2 175,007 cpu_core/cycles/ S0-D0-C8 2 166,240 cpu_core/cycles/ S0-D0-C12 2 704,673 cpu_core/cycles/ S0-D0-C16 2 865,835 cpu_core/cycles/ S0-D0-C20 2 2,958,461 cpu_core/cycles/ S0-D0-C24 2 163,988 cpu_core/cycles/ S0-D0-C28 2 164,729 cpu_core/cycles/ S0-D0-C32 0 cpu_core/cycles/ S0-D0-C33 0 cpu_core/cycles/ S0-D0-C34 0 cpu_core/cycles/ S0-D0-C35 0 cpu_core/cycles/ S0-D0-C36 0 cpu_core/cycles/ S0-D0-C37 0 cpu_core/cycles/ S0-D0-C38 0 cpu_core/cycles/ S0-D0-C39 0 cpu_core/cycles/ 1.003597211 seconds time elapsed After: # perf stat --per-core -e cpu_core/cycles/ -a -- sleep 1 Performance counter stats for 'system wide': S0-D0-C0 2 210,428 cpu_core/cycles/ S0-D0-C4 2 444,830 cpu_core/cycles/ S0-D0-C8 2 435,241 cpu_core/cycles/ S0-D0-C12 2 423,976 cpu_core/cycles/ S0-D0-C16 2 859,350 cpu_core/cycles/ S0-D0-C20 2 1,559,589 cpu_core/cycles/ S0-D0-C24 2 163,924 cpu_core/cycles/ S0-D0-C28 2 376,610 cpu_core/cycles/ 1.003621290 seconds time elapsed Signed-off-by: Jin Yao Co-developed-by: Jiri Olsa Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-16-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit ac2dc29edd21f9ec011863336ab1c7c9fe77a1d3 Author: Jin Yao Date: Tue Apr 27 15:01:27 2021 +0800 perf stat: Add default hybrid events Previously if '-e' is not specified in perf stat, some software events and hardware events are added to evlist by default. Before: # perf stat -a -- sleep 1 Performance counter stats for 'system wide': 24,044.40 msec cpu-clock # 23.946 CPUs utilized 99 context-switches # 4.117 /sec 24 cpu-migrations # 0.998 /sec 3 page-faults # 0.125 /sec 7,000,244 cycles # 0.000 GHz 2,955,024 instructions # 0.42 insn per cycle 608,941 branches # 25.326 K/sec 31,991 branch-misses # 5.25% of all branches 1.004106859 seconds time elapsed Among the events, cycles, instructions, branches and branch-misses are hardware events. One hybrid platform, two hardware events are created for one hardware event. cpu_core/cycles/, cpu_atom/cycles/, cpu_core/instructions/, cpu_atom/instructions/, cpu_core/branches/, cpu_atom/branches/, cpu_core/branch-misses/, cpu_atom/branch-misses/ These events would be added to evlist on hybrid platform. Since parse_events() has been supported to create two hardware events for one event on hybrid platform, so we just use parse_events(evlist, "cycles,instructions,branches,branch-misses") to create the default events and add them to evlist. After: # perf stat -a -- sleep 1 Performance counter stats for 'system wide': 24,043.99 msec cpu-clock # 23.991 CPUs utilized 139 context-switches # 5.781 /sec 25 cpu-migrations # 1.040 /sec 6 page-faults # 0.250 /sec 10,381,751 cpu_core/cycles/ # 431.782 K/sec 1,264,216 cpu_atom/cycles/ # 52.579 K/sec 3,406,958 cpu_core/instructions/ # 141.697 K/sec 414,588 cpu_atom/instructions/ # 17.243 K/sec 705,149 cpu_core/branches/ # 29.327 K/sec 82,358 cpu_atom/branches/ # 3.425 K/sec 40,821 cpu_core/branch-misses/ # 1.698 K/sec 9,086 cpu_atom/branch-misses/ # 377.891 /sec 1.002228863 seconds time elapsed We can see two events are created for one hardware event. One TODO is, the shadow stats looks a bit different, now it's just 'M/sec'. The perf_stat__update_shadow_stats and perf_stat__print_shadow_stats need to be improved in future if we want to get the original shadow stats. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-15-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit b53a0755d5c2d19b13db897d6faf4969e03e45ae Author: Jin Yao Date: Tue Apr 27 15:01:26 2021 +0800 perf record: Create two hybrid 'cycles' events by default When evlist is empty, for example no '-e' specified in perf record, one default 'cycles' event is added to evlist. While on hybrid platform, it needs to create two default 'cycles' events. One is for cpu_core, the other is for cpu_atom. This patch actually calls evsel__new_cycles() two times to create two 'cycles' events. # ./perf record -vv -a -- sleep 1 ... ------------------------------------------------------------ perf_event_attr: size 120 config 0x400000000 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|ID|CPU|PERIOD read_format ID disabled 1 inherit 1 freq 1 precise_ip 3 sample_id_all 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 5 sys_perf_event_open: pid -1 cpu 1 group_fd -1 flags 0x8 = 6 sys_perf_event_open: pid -1 cpu 2 group_fd -1 flags 0x8 = 7 sys_perf_event_open: pid -1 cpu 3 group_fd -1 flags 0x8 = 9 sys_perf_event_open: pid -1 cpu 4 group_fd -1 flags 0x8 = 10 sys_perf_event_open: pid -1 cpu 5 group_fd -1 flags 0x8 = 11 sys_perf_event_open: pid -1 cpu 6 group_fd -1 flags 0x8 = 12 sys_perf_event_open: pid -1 cpu 7 group_fd -1 flags 0x8 = 13 sys_perf_event_open: pid -1 cpu 8 group_fd -1 flags 0x8 = 14 sys_perf_event_open: pid -1 cpu 9 group_fd -1 flags 0x8 = 15 sys_perf_event_open: pid -1 cpu 10 group_fd -1 flags 0x8 = 16 sys_perf_event_open: pid -1 cpu 11 group_fd -1 flags 0x8 = 17 sys_perf_event_open: pid -1 cpu 12 group_fd -1 flags 0x8 = 18 sys_perf_event_open: pid -1 cpu 13 group_fd -1 flags 0x8 = 19 sys_perf_event_open: pid -1 cpu 14 group_fd -1 flags 0x8 = 20 sys_perf_event_open: pid -1 cpu 15 group_fd -1 flags 0x8 = 21 ------------------------------------------------------------ perf_event_attr: size 120 config 0x800000000 { sample_period, sample_freq } 4000 sample_type IP|TID|TIME|ID|CPU|PERIOD read_format ID disabled 1 inherit 1 freq 1 precise_ip 3 sample_id_all 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 16 group_fd -1 flags 0x8 = 22 sys_perf_event_open: pid -1 cpu 17 group_fd -1 flags 0x8 = 23 sys_perf_event_open: pid -1 cpu 18 group_fd -1 flags 0x8 = 24 sys_perf_event_open: pid -1 cpu 19 group_fd -1 flags 0x8 = 25 sys_perf_event_open: pid -1 cpu 20 group_fd -1 flags 0x8 = 26 sys_perf_event_open: pid -1 cpu 21 group_fd -1 flags 0x8 = 27 sys_perf_event_open: pid -1 cpu 22 group_fd -1 flags 0x8 = 28 sys_perf_event_open: pid -1 cpu 23 group_fd -1 flags 0x8 = 29 ------------------------------------------------------------ We have to create evlist-hybrid.c otherwise due to the symbol dependency the perf test python would be failed. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-14-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 5e4edd1f73b5d59905aeb0fe43ab74301c39a5c1 Author: Jin Yao Date: Tue Apr 27 15:01:25 2021 +0800 perf parse-events: Support event inside hybrid pmu On hybrid platform, user may want to enable events on one pmu. Following syntax are supported: cpu_core// cpu_atom// But the syntax doesn't work for cache event. Before: # perf stat -e cpu_core/LLC-loads/ -a -- sleep 1 event syntax error: 'cpu_core/LLC-loads/' \___ unknown term 'LLC-loads' for pmu 'cpu_core' Cache events are a bit complex. We can't create aliases for them. We use another solution. For example, if we use "cpu_core/LLC-loads/", in parse_events_add_pmu(), term->config is "LLC-loads". Then we create a new parser to scan "LLC-loads". The parse_events_add_cache() would be called during parsing. The parse_state->hybrid_pmu_name is used to identify the pmu where the event should be enabled on. After: # perf stat -e cpu_core/LLC-loads/ -a -- sleep 1 Performance counter stats for 'system wide': 24,593 cpu_core/LLC-loads/ 1.003911601 seconds time elapsed Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-13-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c93afadc924dbec51a38c4f6f0d07a8adfddd339 Author: Jin Yao Date: Tue Apr 27 15:01:24 2021 +0800 perf parse-events: Compare with hybrid pmu name On hybrid platform, user may want to enable event only on one pmu. Following syntax will be supported: cpu_core// cpu_atom// For hardware event, hardware cache event and raw event, two events are created by default. We pass the specified pmu name in parse_state and it would be checked before event creation. So next only the event with the specified pmu would be created. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-12-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 94da591b1c7913880957c3477f6abff563783b33 Author: Jin Yao Date: Tue Apr 27 15:01:23 2021 +0800 perf parse-events: Create two hybrid raw events On hybrid platform, same raw event is possible to be available on both cpu_core pmu and cpu_atom pmu. It's supported to create two raw events for one event encoding. For raw events, the attr.type is PMU type. # perf stat -e r3c -a -vv -- sleep 1 Control descriptor is not initialized ------------------------------------------------------------ perf_event_attr: type 4 size 120 config 0x3c sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 3 ------------------------------------------------------------ ... ------------------------------------------------------------ perf_event_attr: type 4 size 120 config 0x3c sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 15 group_fd -1 flags 0x8 = 19 ------------------------------------------------------------ perf_event_attr: type 8 size 120 config 0x3c sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 16 group_fd -1 flags 0x8 = 20 ------------------------------------------------------------ ... ------------------------------------------------------------ perf_event_attr: type 8 size 120 config 0x3c sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 23 group_fd -1 flags 0x8 = 27 r3c: 0: 434449 1001412521 1001412521 r3c: 1: 173162 1001482031 1001482031 r3c: 2: 231710 1001524974 1001524974 r3c: 3: 110012 1001563523 1001563523 r3c: 4: 191517 1001593221 1001593221 r3c: 5: 956458 1001628147 1001628147 r3c: 6: 416969 1001715626 1001715626 r3c: 7: 1047527 1001596650 1001596650 r3c: 8: 103877 1001633520 1001633520 r3c: 9: 70571 1001637898 1001637898 r3c: 10: 550284 1001714398 1001714398 r3c: 11: 1257274 1001738349 1001738349 r3c: 12: 107797 1001801432 1001801432 r3c: 13: 67471 1001836281 1001836281 r3c: 14: 286782 1001923161 1001923161 r3c: 15: 815509 1001952550 1001952550 r3c: 0: 95994 1002071117 1002071117 r3c: 1: 105570 1002142438 1002142438 r3c: 2: 115921 1002189147 1002189147 r3c: 3: 72747 1002238133 1002238133 r3c: 4: 103519 1002276753 1002276753 r3c: 5: 121382 1002315131 1002315131 r3c: 6: 80298 1002248050 1002248050 r3c: 7: 466790 1002278221 1002278221 r3c: 6821369 16026754282 16026754282 r3c: 1162221 8017758990 8017758990 Performance counter stats for 'system wide': 6,821,369 cpu_core/r3c/ 1,162,221 cpu_atom/r3c/ 1.002289965 seconds time elapsed Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-11-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 30def61f64bac5f5cfe2a3cf96bae5b889403b4c Author: Jin Yao Date: Tue Apr 27 15:01:22 2021 +0800 perf parse-events: Create two hybrid cache events For cache events, they have pre-defined configs. The kernel needs to know where the cache event comes from (e.g. from cpu_core pmu or from cpu_atom pmu). But the perf type PERF_TYPE_HW_CACHE can't carry pmu information. Now the type PERF_TYPE_HW_CACHE is extended to be PMU aware type. The PMU type ID is stored at attr.config[63:32]. When enabling a hybrid cache event without specified pmu, such as, 'perf stat -e LLC-loads -a', two events are created automatically. One is for atom, the other is for core. # perf stat -e LLC-loads -a -vv -- sleep 1 Control descriptor is not initialized ------------------------------------------------------------ perf_event_attr: type 3 size 120 config 0x400000002 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 3 ------------------------------------------------------------ ... ------------------------------------------------------------ perf_event_attr: type 3 size 120 config 0x400000002 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 15 group_fd -1 flags 0x8 = 19 ------------------------------------------------------------ perf_event_attr: type 3 size 120 config 0x800000002 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 16 group_fd -1 flags 0x8 = 20 ------------------------------------------------------------ ... ------------------------------------------------------------ perf_event_attr: type 3 size 120 config 0x800000002 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 23 group_fd -1 flags 0x8 = 27 LLC-loads: 0: 1507 1001800280 1001800280 LLC-loads: 1: 666 1001812250 1001812250 LLC-loads: 2: 3353 1001813453 1001813453 LLC-loads: 3: 514 1001848795 1001848795 LLC-loads: 4: 627 1001952832 1001952832 LLC-loads: 5: 4399 1001451154 1001451154 LLC-loads: 6: 1240 1001481052 1001481052 LLC-loads: 7: 478 1001520348 1001520348 LLC-loads: 8: 691 1001551236 1001551236 LLC-loads: 9: 310 1001578945 1001578945 LLC-loads: 10: 1018 1001594354 1001594354 LLC-loads: 11: 3656 1001622355 1001622355 LLC-loads: 12: 882 1001661416 1001661416 LLC-loads: 13: 506 1001693963 1001693963 LLC-loads: 14: 3547 1001721013 1001721013 LLC-loads: 15: 1399 1001734818 1001734818 LLC-loads: 0: 1314 1001793826 1001793826 LLC-loads: 1: 2857 1001752764 1001752764 LLC-loads: 2: 646 1001830694 1001830694 LLC-loads: 3: 1612 1001864861 1001864861 LLC-loads: 4: 2244 1001912381 1001912381 LLC-loads: 5: 1255 1001943889 1001943889 LLC-loads: 6: 4624 1002021109 1002021109 LLC-loads: 7: 2703 1001959302 1001959302 LLC-loads: 24793 16026838264 16026838264 LLC-loads: 17255 8015078826 8015078826 Performance counter stats for 'system wide': 24,793 cpu_core/LLC-loads/ 17,255 cpu_atom/LLC-loads/ 1.001970988 seconds time elapsed 0x4 in 0x400000002 indicates the cpu_core pmu. 0x8 in 0x800000002 indicates the cpu_atom pmu. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-10-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 9cbfa2f64c04d98ad2bbce93066e2e021d12a24b Author: Jin Yao Date: Tue Apr 27 15:01:21 2021 +0800 perf parse-events: Create two hybrid hardware events Current hardware events has special perf types PERF_TYPE_HARDWARE. But it doesn't pass the PMU type in the user interface. For a hybrid system, the perf kernel doesn't know which PMU the events belong to. So now this type is extended to be PMU aware type. The PMU type ID is stored at attr.config[63:32]. PMU type ID is retrieved from sysfs. root@lkp-adl-d01:/sys/devices/cpu_atom# cat type 8 root@lkp-adl-d01:/sys/devices/cpu_core# cat type 4 When enabling a hybrid hardware event without specified pmu, such as, 'perf stat -e cycles -a', two events are created automatically. One is for atom, the other is for core. # perf stat -e cycles -a -vv -- sleep 1 Control descriptor is not initialized ------------------------------------------------------------ perf_event_attr: size 120 config 0x400000000 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0x8 = 3 ------------------------------------------------------------ ... ------------------------------------------------------------ perf_event_attr: size 120 config 0x400000000 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 15 group_fd -1 flags 0x8 = 19 ------------------------------------------------------------ perf_event_attr: size 120 config 0x800000000 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 16 group_fd -1 flags 0x8 = 20 ------------------------------------------------------------ ... ------------------------------------------------------------ perf_event_attr: size 120 config 0x800000000 sample_type IDENTIFIER read_format TOTAL_TIME_ENABLED|TOTAL_TIME_RUNNING disabled 1 inherit 1 exclude_guest 1 ------------------------------------------------------------ sys_perf_event_open: pid -1 cpu 23 group_fd -1 flags 0x8 = 27 cycles: 0: 836272 1001525722 1001525722 cycles: 1: 628564 1001580453 1001580453 cycles: 2: 872693 1001605997 1001605997 cycles: 3: 70417 1001641369 1001641369 cycles: 4: 88593 1001726722 1001726722 cycles: 5: 470495 1001752993 1001752993 cycles: 6: 484733 1001840440 1001840440 cycles: 7: 1272477 1001593105 1001593105 cycles: 8: 209185 1001608616 1001608616 cycles: 9: 204391 1001633962 1001633962 cycles: 10: 264121 1001661745 1001661745 cycles: 11: 826104 1001689904 1001689904 cycles: 12: 89935 1001728861 1001728861 cycles: 13: 70639 1001756757 1001756757 cycles: 14: 185266 1001784810 1001784810 cycles: 15: 171094 1001825466 1001825466 cycles: 0: 129624 1001854843 1001854843 cycles: 1: 122533 1001840421 1001840421 cycles: 2: 90055 1001882506 1001882506 cycles: 3: 139607 1001896463 1001896463 cycles: 4: 141791 1001907838 1001907838 cycles: 5: 530927 1001883880 1001883880 cycles: 6: 143246 1001852529 1001852529 cycles: 7: 667769 1001872626 1001872626 cycles: 6744979 16026956922 16026956922 cycles: 1965552 8014991106 8014991106 Performance counter stats for 'system wide': 6,744,979 cpu_core/cycles/ 1,965,552 cpu_atom/cycles/ 1.001882711 seconds time elapsed 0x4 in 0x400000000 indicates the cpu_core pmu. 0x8 in 0x800000000 indicates the cpu_atom pmu. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-9-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 12279429d8620fe0cb2cdc0ba68cae3cc2c826f9 Author: Jin Yao Date: Tue Apr 27 15:01:20 2021 +0800 perf stat: Uniquify hybrid event name It would be useful to let user know the pmu which the event belongs to. perf-stat has supported '--no-merge' option and it can print the pmu name after the event name, such as: "cycles [cpu_core]" Now this option is enabled by default for hybrid platform but change the format to: "cpu_core/cycles/" If user configs the name, we still use the user specified name. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra ink: https://lore.kernel.org/r/20210427070139.25256-8-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit c5a26ea490a16798d973e6fa352c6b8375646bc4 Author: Jin Yao Date: Tue Apr 27 15:01:19 2021 +0800 perf pmu: Add hybrid helper functions The functions perf_pmu__is_hybrid and perf_pmu__find_hybrid_pmu can be used to identify the hybrid platform and return the found hybrid cpu pmu. All the detected hybrid pmus have been saved in 'perf_pmu__hybrid_pmus' list. So we just need to search this list. perf_pmu__hybrid_type_to_pmu converts the user specified string to hybrid pmu name. This is used to support the '--cputype' option in next patches. perf_pmu__has_hybrid checks the existing of hybrid pmu. Note that, we have to define it in pmu.c (make pmu-hybrid.c no more symbol dependency), otherwise perf test python would be failed. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-7-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 444624307c4e06d35de12df1cfe08a4964ac086f Author: Jin Yao Date: Tue Apr 27 15:01:18 2021 +0800 perf pmu: Save detected hybrid pmus to a global pmu list We identify the cpu_core pmu and cpu_atom pmu by explicitly checking following files: For cpu_core, checks: "/sys/bus/event_source/devices/cpu_core/cpus" For cpu_atom, checks: "/sys/bus/event_source/devices/cpu_atom/cpus" If the 'cpus' file exists and it has data, the pmu exists. But in order not to hardcode the "cpu_core" and "cpu_atom", and make the code in a generic way. So if the path "/sys/bus/event_source/devices/cpu_xxx/cpus" exists, the hybrid pmu exists. All the detected hybrid pmus are linked to a global list 'perf_pmu__hybrid_pmus' and then next we just need to iterate the list to get all hybrid pmu by using perf_pmu__for_each_hybrid_pmu. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-6-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 32705de7d45d0ed989517a63454c2b3e5e5ea267 Author: Jin Yao Date: Tue Apr 27 15:01:17 2021 +0800 perf pmu: Save pmu name On hybrid platform, one event is available on one pmu (such as, available on cpu_core or on cpu_atom). This patch saves the pmu name to the pmu field of struct perf_pmu_alias. Then next we can know the pmu which the event can be enabled on. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-5-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit eab35953e67b48c763fbb0e0ffc64dd3152361ea Author: Jin Yao Date: Tue Apr 27 15:01:16 2021 +0800 perf pmu: Simplify arguments of __perf_pmu__new_alias Simplify the arguments of __perf_pmu__new_alias() by passing the whole 'struct pme_event' pointer. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-4-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 6b64833b9e49fda28b0eb94d865c334b37b4662f Author: Jin Yao Date: Tue Apr 27 15:01:15 2021 +0800 perf jevents: Support unit value "cpu_core" and "cpu_atom" For some Intel platforms, such as Alderlake, which is a hybrid platform and it consists of atom cpu and core cpu. Each cpu has dedicated event list. Part of events are available on core cpu, part of events are available on atom cpu. The kernel exports new cpu pmus: cpu_core and cpu_atom. The event in json is added with a new field "Unit" to indicate which pmu the event is available on. For example, one event in cache.json, { "BriefDescription": "Counts the number of load ops retired that", "CollectPEBSRecord": "2", "Counter": "0,1,2,3", "EventCode": "0xd2", "EventName": "MEM_LOAD_UOPS_RETIRED_MISC.MMIO", "PEBScounters": "0,1,2,3", "SampleAfterValue": "1000003", "UMask": "0x80", "Unit": "cpu_atom" }, The unit "cpu_atom" indicates this event is only available on "cpu_atom". In generated pmu-events.c, we can see: { .name = "mem_load_uops_retired_misc.mmio", .event = "period=1000003,umask=0x80,event=0xd2", .desc = "Counts the number of load ops retired that. Unit: cpu_atom ", .topic = "cache", .pmu = "cpu_atom", }, But if without this patch, the "uncore_" prefix is added before "cpu_atom", such as: .pmu = "uncore_cpu_atom" That would be a wrong pmu. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-3-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 412736119116d0161688e9061485fbc3e25f78d5 Author: Jin Yao Date: Tue Apr 27 15:01:14 2021 +0800 tools headers uapi: Update tools's copy of linux/perf_event.h To get the changes in: Liang Kan's patch 55bcf6ef314ae8ba ("perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE") Kan's patch is in the tip/perf/core branch. So the next perf tool patches need this interface for hybrid support. Signed-off-by: Jin Yao Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427070139.25256-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 462f57dbf9fa1fdcdeae2e0b19a667f7f9989bdb Author: Namhyung Kim Date: Mon Apr 26 18:37:17 2021 -0700 perf report: Print percentage of each event statistics It's sometimes useful to see how many samples vs other events in the data file with percent values. $ perf report --stat Aggregated stats: TOTAL events: 20064 MMAP events: 239 ( 1.2%) COMM events: 1518 ( 7.6%) EXIT events: 1 ( 0.0%) FORK events: 1517 ( 7.6%) SAMPLE events: 4015 (20.0%) MMAP2 events: 12769 (63.6%) FINISHED_ROUND events: 2 ( 0.0%) THREAD_MAP events: 1 ( 0.0%) CPU_MAP events: 1 ( 0.0%) TIME_CONV events: 1 ( 0.0%) cycles stats: SAMPLE events: 2475 instructions stats: SAMPLE events: 1540 Suggested-by: Andi Kleen Reviewed-by: Andi Kleen Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427013717.1651674-7-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 8f08cf3330da0582e7a51bd1b999c820147e19d1 Author: Namhyung Kim Date: Mon Apr 26 18:37:16 2021 -0700 perf report: Make --skip-empty as default so that the compact output is shown by default. Also add 'report.skip-empty' config option to override the default. Users can also use --no-skip-empty command line option to change the behavior anytime. Committer testing: $ perf report --stat Aggregated stats: TOTAL events: 19 COMM events: 2 EXIT events: 1 SAMPLE events: 8 MMAP2 events: 4 FINISHED_ROUND events: 1 THREAD_MAP events: 1 CPU_MAP events: 1 TIME_CONV events: 1 cycles:u stats: SAMPLE events: 8 $ perf config report.skip-empty=false $ perf report --stat Aggregated stats: TOTAL events: 19 MMAP events: 0 LOST events: 0 COMM events: 2 EXIT events: 1 THROTTLE events: 0 UNTHROTTLE events: 0 FORK events: 0 READ events: 0 SAMPLE events: 8 MMAP2 events: 4 AUX events: 0 ITRACE_START events: 0 LOST_SAMPLES events: 0 SWITCH events: 0 SWITCH_CPU_WIDE events: 0 NAMESPACES events: 0 KSYMBOL events: 0 BPF_EVENT events: 0 CGROUP events: 0 TEXT_POKE events: 0 ATTR events: 0 EVENT_TYPE events: 0 TRACING_DATA events: 0 BUILD_ID events: 0 FINISHED_ROUND events: 1 ID_INDEX events: 0 AUXTRACE_INFO events: 0 AUXTRACE events: 0 AUXTRACE_ERROR events: 0 THREAD_MAP events: 1 CPU_MAP events: 1 STAT_CONFIG events: 0 STAT events: 0 STAT_ROUND events: 0 EVENT_UPDATE events: 0 TIME_CONV events: 1 FEATURE events: 0 COMPRESSED events: 0 cycles:u stats: SAMPLE events: 8 $ perf config report.skip-empty report.skip-empty=false $ Reviewed-by: Andi Kleen Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427013717.1651674-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2775de0b115a6ffab7882c45c755005ee0ac0122 Author: Namhyung Kim Date: Mon Apr 26 18:37:15 2021 -0700 perf report: Add --skip-empty option to suppress 0 event stat To make the output more readable, I think it's better to remove 0's in the output. Also the dummy event has no event stats so it just wasts the space. Let's use the --skip-empty option to suppress it. $ perf report --stat --skip-empty Aggregated stats: TOTAL events: 16530 MMAP events: 226 COMM events: 1596 EXIT events: 2 THROTTLE events: 121 UNTHROTTLE events: 117 FORK events: 1595 SAMPLE events: 719 MMAP2 events: 12147 CGROUP events: 2 FINISHED_ROUND events: 2 THREAD_MAP events: 1 CPU_MAP events: 1 TIME_CONV events: 1 cycles stats: SAMPLE events: 719 Reviewed-by: Andi Kleen Signed-off-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427013717.1651674-5-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 55f754443890043956ee81431faa3c529309ba24 Author: Namhyung Kim Date: Mon Apr 26 18:37:14 2021 -0700 perf report: Show event sample counts in --stat output To make the output identical with perf report -D, it needs to show per-event sample counts along with the aggregated stat at the end. Reviewed-by: Andi Kleen Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427013717.1651674-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 0f0abbace3cddc92aaed2db3783c9c501354b3be Author: Namhyung Kim Date: Mon Apr 26 18:37:13 2021 -0700 perf hists: Split hists_stats from events_stats Each struct hists have events_stats but most of the fields were not used. It's to count number of samples and periods whether filtered or not. And other fields are used only by evlist. So it'd be better to split hists_stats and events_stats to reduce wasted memory in the struct hists. This makes the output of event statistics in the perf report compact by skipping 0 events in each evsel/hists. Reviewed-by: Andi Kleen Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427013717.1651674-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit bf8f8587bfb6d1315771a252a1a3be20fda1d783 Author: Namhyung Kim Date: Mon Apr 26 18:37:12 2021 -0700 perf top: Use evlist->events_stat to count events It's mainly to count lost events for the warning so it should be ok to use the evlist->stats instead. This is needed for changes in the next commit. Reviewed-by: Andi Kleen Signed-off-by: Namhyung Kim Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210427013717.1651674-2-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit d0713d4ca3e94827de77f8758e3e8045a0d85215 Author: Nicholas Fraser Date: Mon Apr 26 10:47:16 2021 -0400 perf data: Add JSON export This adds a feature to export perf data to JSON. The resolved symbols are exported into the JSON so that external tools don't need to load the dsos themselves (or even have access to them at all.) This makes it easy to load and analyze perf data with standalone tools where direct perf or libbabeltrace integration is impractical. The exporter uses a minimal inline JSON encoding without any external dependencies. Currently it only outputs some headers and sample metadata but it's easily extensible. Use it like this: $ perf data convert --to-json out.json Committer notes: Fixup a __printf() bug that broke the build: util/data-convert-json.c:103:11: error: expected ‘)’ before numeric constant 103 | __(printf, 5, 6) | ^~ | ) util/data-convert-json.c: In function ‘output_sample_callchain_entry’: util/data-convert-json.c:124:2: error: implicit declaration of function ‘output_json_key_format’; did you mean ‘output_json_format’? [-Werror=implicit-function-declaration] 124 | output_json_key_format(out, false, 5, "ip", "\"0x%" PRIx64 "\"", ip); | ^~~~~~~~~~~~~~~~~~~~~~ | output_json_format Also had to add this patch to fix errors reported by various versions of clang: - if (al && al->sym && al->sym->name && strlen(al->sym->name) > 0) { + if (al && al->sym && al->sym->namelen) { al->sym->name is a zero sized array, to avoid one extra alloc in the symbol__new() constructor, sym->namelen carries its strlen. Committer testing: $ ls -la out.json ls: cannot access 'out.json': No such file or directory $ perf record sleep 0.1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.001 MB perf.data (8 samples) ] $ perf report --stats | grep -w SAMPLE SAMPLE events: 8 $ perf data convert --to-json out.json [ perf data convert: Converted 'perf.data' into JSON data 'out.json' ] [ perf data convert: Converted and wrote 0.002 MB (8 samples) ] $ ls -la out.json -rw-rw-r--. 1 acme acme 2017 Apr 26 17:29 out.json $ cat out.json { "linux-perf-json-version": 1, "headers": { "header-version": 1, "captured-on": "2021-04-26T20:28:57Z", "data-offset": 432, "data-size": 1016, "feat-offset": 1448, "hostname": "five", "os-release": "5.11.14-200.fc33.x86_64", "arch": "x86_64", "cpu-desc": "AMD Ryzen 9 3900X 12-Core Processor", "cpuid": "AuthenticAMD,23,113,0", "nrcpus-online": 24, "nrcpus-avail": 24, "perf-version": "5.12.gee134f3189bd", "cmdline": [ "/home/acme/bin/perf", "record", "sleep", "0.1" ] }, "samples": [ { "timestamp": 170517539043684, "pid": 375844, "tid": 375844, "comm": "sleep", "callchain": [ { "ip": "0xffffffffa6268827" } ] }, { "timestamp": 170517539048443, "pid": 375844, "tid": 375844, "comm": "sleep", "callchain": [ { "ip": "0xffffffffa661359d" } ] }, { "timestamp": 170517539051018, "pid": 375844, "tid": 375844, "comm": "sleep", "callchain": [ { "ip": "0xffffffffa6311e18" } ] }, { "timestamp": 170517539053652, "pid": 375844, "tid": 375844, "comm": "sleep", "callchain": [ { "ip": "0x7fdb77b4812b", "symbol": "_dl_start", "dso": "ld-2.32.so" } ] }, { "timestamp": 170517539055306, "pid": 375844, "tid": 375844, "comm": "sleep", "callchain": [ { "ip": "0xffffffffa6269286" } ] }, { "timestamp": 170517539057590, "pid": 375844, "tid": 375844, "comm": "sleep", "callchain": [ { "ip": "0xffffffffa62abd8b" } ] }, { "timestamp": 170517539067559, "pid": 375844, "tid": 375844, "comm": "sleep", "callchain": [ { "ip": "0x7fdb77b5e9e9", "symbol": "__GI___tunables_init", "dso": "ld-2.32.so" } ] }, { "timestamp": 170517539282452, "pid": 375844, "tid": 375844, "comm": "sleep", "callchain": [ { "ip": "0x7fdb779978d2", "symbol": "getenv", "dso": "libc-2.32.so" } ] } ] } $ Signed-off-by: Nicholas Fraser Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Changbin Du Cc: Ian Rogers Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Tan Xiaojun Cc: Ulrich Czekalla Link: http://lore.kernel.org/lkml/3884969f-804d-2f53-c648-e2b0bd85edff@codeweavers.com Signed-off-by: Arnaldo Carvalho de Melo commit 5508c9dae2a4a111acc7472900164f556ae75346 Author: Song Liu Date: Sun Apr 25 14:43:33 2021 -0700 perf stat: Introduce bpf_counter_ops->disable() Introduce bpf_counter_ops->disable(), which is used stop counting the event. Committer notes: Added a dummy bpf_counter__disable() to the python binding to avoid having 'perf test python' failing. bpf_counter isn't supported in the python binding. Signed-off-by: Song Liu Cc: Jiri Olsa Cc: Namhyung Kim Cc: Song Liu Cc: kernel-team@fb.com Link: https://lore.kernel.org/r/20210425214333.1090950-6-song@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 01bd8efcec444468db0275bbd71b49927f7e1544 Author: Song Liu Date: Sun Apr 25 14:43:32 2021 -0700 perf stat: Introduce ':b' modifier Introduce 'b' modifier to event parser, which means use BPF program to manage this event. This is the same as --bpf-counters option, but only applies to this event. For example, perf stat -e cycles:b,cs # use bpf for cycles, but not cs perf stat -e cycles,cs --bpf-counters # use bpf for both cycles and cs Suggested-by: Jiri Olsa Signed-off-by: Song Liu Cc: Namhyung Kim Cc: Song Liu Link: https://lore.kernel.org/r/20210425214333.1090950-5-song@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 112cb56164bc2108a55aee785d841a35aab0616a Author: Song Liu Date: Sun Apr 25 14:43:31 2021 -0700 perf stat: Introduce config stat.bpf-counter-events Currently, to use BPF to aggregate perf event counters, the user uses --bpf-counters option. Enable "use bpf by default" events with a config option, stat.bpf-counter-events. Events with name in the option will use BPF. This also enables mixed BPF event and regular event in the same sesssion. For example: perf config stat.bpf-counter-events=instructions perf stat -e instructions,cs The second command will use BPF for "instructions" but not "cs". Signed-off-by: Song Liu Cc: Jiri Olsa Cc: Namhyung Kim Cc: Song Liu Link: https://lore.kernel.org/r/20210425214333.1090950-4-song@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit fe3dd8263b9f3912a0f3a2f66c0fdb3987d69a1a Author: Song Liu Date: Sun Apr 25 14:43:30 2021 -0700 perf bpf: check perf_attr_map is compatible with the perf binary perf_attr_map could be shared among different version of perf binary. Add bperf_attr_map_compatible() to check whether the existing attr_map is compatible with current perf binary. Signed-off-by: Song Liu Cc: Jiri Olsa Cc: Namhyung Kim Cc: Song Liu Cc: kernel-team@fb.com Link: https://lore.kernel.org/r/20210425214333.1090950-3-song@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ec8149fba64b719a618b432ce9eea7ce937a523c Author: Song Liu Date: Sun Apr 25 14:43:29 2021 -0700 perf util: Move bpf_perf definitions to a libperf header By following the same protocol, other tools can share hardware PMCs with perf. Move perf_event_attr_map_entry and BPF_PERF_DEFAULT_ATTR_MAP_PATH to bpf_perf.h for other tools to use. Signed-off-by: Song Liu Cc: Jiri Olsa Cc: Namhyung Kim Cc: Song Liu Cc: kernel-team@fb.com Link: https://lore.kernel.org/r/20210425214333.1090950-2-song@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6d5ff8e632a4f2389c331e5554cd1c2a9a28c7aa Author: Karen Dombroski Date: Wed Apr 28 23:38:02 2021 -0600 spi: spi-zynq-qspi: Fix stack violation bug When the number of bytes for the op is greater than one, the read could run off the end of the function stack and cause a crash. This patch restores the behaviour of safely reading out of the original opcode location. Signed-off-by: Karen Dombroski Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20210429053802.17650-3-amit.kumar-mahapatra@xilinx.com Signed-off-by: Mark Brown commit 121271f08809e5dc01d15d3e529988ac5d740af6 Author: Amit Kumar Mahapatra Date: Wed Apr 28 23:38:01 2021 -0600 spi: spi-zynq-qspi: Fix kernel-doc warning Fix kernel-doc warning. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20210429053802.17650-2-amit.kumar-mahapatra@xilinx.com Signed-off-by: Mark Brown commit 211f9f2e0503efa4023a46920e7ad07377b4ec58 Author: Mike Marshall Date: Sun Mar 28 17:19:23 2021 -0400 orangefs: leave files in the page cache for a few micro seconds at least Signed-off-by: Mike Marshall commit c7b397e9ca4d6828e3e3f504c80bcb1fe535c348 Merge: 270e3cc5aa382 d385c16173f28 Author: Jani Nikula Date: Thu Apr 29 13:15:51 2021 +0300 Merge tag 'gvt-next-fixes-2021-04-29' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-next-fixes-2021-04-29 - Fix possible divide error in vgpu display rate calculation (Colin) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20210429085142.GT1551@zhen-hp.sh.intel.com commit 75516c75a72b5629736c611cf45058d95978a9f2 Author: Catalin Marinas Date: Fri Apr 23 18:51:34 2021 +0100 arm64: doc: Add brk/mmap/mremap() to the Tagged Address ABI Exceptions Prior to commit dcde237319e6 ("mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()"), the kernel allowed tagged addresses to be passed to the brk/mmap/mremap() syscalls. This relaxation was tightened in 5.6 (backported to stable 5.4) but the tagged-address-abi.rst document was only partially updated. Signed-off-by: Catalin Marinas Fixes: dcde237319e6 ("mm: Avoid creating virtual address aliases in brk()/mmap()/mremap()") Reported-by: Peter Maydell Cc: Will Deacon Cc: Vincenzo Frascino Link: https://lore.kernel.org/r/20210423175134.14838-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas commit 9b924f4f0d8f9557f4ef8a8d1468d507a662cef1 Author: Yang Li Date: Thu Apr 29 09:26:29 2021 +0800 psci: Remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/firmware/psci/psci.c:141:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/1619659589-4775-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Catalin Marinas commit d385c16173f28a18866abf54c764200c276dace0 Author: Colin Xu Date: Fri Apr 16 16:33:55 2021 +0800 drm/i915/gvt: Prevent divided by zero when calculating refresh rate To get refresh rate as vblank timer period and keep the precision, the calculation of rate is multiplied by 1000. However old logic was using: rate = pixel clock / (h * v / 1000). When the h/v total is invalid, like all 0, h * v / 1000 will be rounded to 0, which leads to a divided by 0 fault. 0 H/V are already checked above. Instead of divide after divide, refine the calculation to divide after multiply: "pixel clock * 1000 / (h * v)" Guest driver should guarantee the correctness of the timing regs' value. Fixes: 6a4500c7b83f ("drm/i915/gvt: Get accurate vGPU virtual display refresh rate from vreg") Reported-by: Zhenyu Wang Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20210416083355.159305-1-colin.xu@intel.com Reviewed-by: Zhenyu Wang commit e0c16eb4b3610298a74ae5504c7f6939b12be991 Author: Simon Ser Date: Wed Apr 21 11:16:35 2021 +0200 amdgpu: fix GEM obj leak in amdgpu_display_user_framebuffer_create This error code-path is missing a drm_gem_object_put call. Other error code-paths are fine. Signed-off-by: Simon Ser Fixes: 1769152ac64b ("drm/amdgpu: Fail fb creation from imported dma-bufs. (v2)") Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Bas Nieuwenhuizen Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 8c3dd61cfa05a65a7e1a8a028000fc95856156c4 Author: Kai-Heng Feng Date: Mon Apr 26 18:50:00 2021 +0800 drm/amdgpu: Register VGA clients after init can no longer fail When an amdgpu device fails to init, it makes another VGA device cause kernel splat: kernel: amdgpu 0000:08:00.0: amdgpu: amdgpu_device_ip_init failed kernel: amdgpu 0000:08:00.0: amdgpu: Fatal error during GPU init kernel: amdgpu: probe of 0000:08:00.0 failed with error -110 ... kernel: amdgpu 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=none kernel: BUG: kernel NULL pointer dereference, address: 0000000000000018 kernel: #PF: supervisor read access in kernel mode kernel: #PF: error_code(0x0000) - not-present page kernel: PGD 0 P4D 0 kernel: Oops: 0000 [#1] SMP NOPTI kernel: CPU: 6 PID: 1080 Comm: Xorg Tainted: G W 5.12.0-rc8+ #12 kernel: Hardware name: HP HP EliteDesk 805 G6/872B, BIOS S09 Ver. 02.02.00 12/30/2020 kernel: RIP: 0010:amdgpu_device_vga_set_decode+0x13/0x30 [amdgpu] kernel: Code: 06 31 c0 c3 b8 ea ff ff ff 5d c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00 00 55 48 8b 87 90 06 00 00 48 89 e5 53 89 f3 <48> 8b 40 18 40 0f b6 f6 e8 40 58 39 fd 80 fb 01 5b 5d 19 c0 83 e0 kernel: RSP: 0018:ffffae3c0246bd68 EFLAGS: 00010002 kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 kernel: RDX: ffff8dd1af5a8560 RSI: 0000000000000000 RDI: ffff8dce8c160000 kernel: RBP: ffffae3c0246bd70 R08: ffff8dd1af5985c0 R09: ffffae3c0246ba38 kernel: R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000246 kernel: R13: 0000000000000000 R14: 0000000000000003 R15: ffff8dce81490000 kernel: FS: 00007f9303d8fa40(0000) GS:ffff8dd1af580000(0000) knlGS:0000000000000000 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 kernel: CR2: 0000000000000018 CR3: 0000000103cfa000 CR4: 0000000000350ee0 kernel: Call Trace: kernel: vga_arbiter_notify_clients.part.0+0x4a/0x80 kernel: vga_get+0x17f/0x1c0 kernel: vga_arb_write+0x121/0x6a0 kernel: ? apparmor_file_permission+0x1c/0x20 kernel: ? security_file_permission+0x30/0x180 kernel: vfs_write+0xca/0x280 kernel: ksys_write+0x67/0xe0 kernel: __x64_sys_write+0x1a/0x20 kernel: do_syscall_64+0x38/0x90 kernel: entry_SYSCALL_64_after_hwframe+0x44/0xae kernel: RIP: 0033:0x7f93041e02f7 kernel: Code: 75 05 48 83 c4 58 c3 e8 f7 33 ff ff 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 kernel: RSP: 002b:00007fff60e49b28 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 kernel: RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f93041e02f7 kernel: RDX: 000000000000000b RSI: 00007fff60e49b40 RDI: 000000000000000f kernel: RBP: 00007fff60e49b40 R08: 00000000ffffffff R09: 00007fff60e499d0 kernel: R10: 00007f93049350b5 R11: 0000000000000246 R12: 000056111d45e808 kernel: R13: 0000000000000000 R14: 000056111d45e7f8 R15: 000056111d46c980 kernel: Modules linked in: nls_iso8859_1 snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_seq input_leds snd_seq_device snd_timer snd soundcore joydev kvm_amd serio_raw k10temp mac_hid hp_wmi ccp kvm sparse_keymap wmi_bmof ucsi_acpi efi_pstore typec_ucsi rapl typec video wmi sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs blake2b_generic zstd_compress raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx libcrc32c xor raid6_pq raid1 raid0 multipath linear dm_mirror dm_region_hash dm_log hid_generic usbhid hid amdgpu drm_ttm_helper ttm iommu_v2 gpu_sched i2c_algo_bit drm_kms_helper syscopyarea sysfillrect crct10dif_pclmul sysimgblt crc32_pclmul fb_sys_fops ghash_clmulni_intel cec rc_core aesni_intel crypto_simd psmouse cryptd r8169 i2c_piix4 drm ahci xhci_pci realtek libahci xhci_pci_renesas gpio_amdpt gpio_generic kernel: CR2: 0000000000000018 kernel: ---[ end trace 76d04313d4214c51 ]--- Commit 4192f7b57689 ("drm/amdgpu: unmap register bar on device init failure") makes amdgpu_driver_unload_kms() skips amdgpu_device_fini(), so the VGA clients remain registered. So when vga_arbiter_notify_clients() iterates over registered clients, it causes NULL pointer dereference. Since there's no reason to register VGA clients that early, so solve the issue by putting them after all the goto cleanups. v2: - Remove redundant vga_switcheroo cleanup in failed: label. Fixes: 4192f7b57689 ("drm/amdgpu: unmap register bar on device init failure") Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher commit b45aeb2dea9142d4d32fa3a117ba381d84f27065 Author: Pavan Kumar Ramayanam Date: Tue Apr 27 10:21:18 2021 +0530 drm/amdgpu: Handling of amdgpu_device_resume return value for graceful teardown The runtime resume PM op disregards the return value from amdgpu_device_resume(), masking errors for failed resumes at the PM layer. Reviewed-by: Alex Deucher Signed-off-by: Pavan Kumar Ramayanam Signed-off-by: Alex Deucher commit 4b12ee6f426e5e36396501a58f3a1af5b92a7e06 Author: Victor Zhao Date: Tue Apr 27 17:52:56 2021 +0800 drm/amdgpu: fix r initial values Sriov gets suspend of IP block failed as return value was not initialized. v2: return 0 directly to align original code semantic before this was broken out into a separate helper function instead of setting initial values Signed-off-by: Victor Zhao Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 3cbae5abfa8ebc8bc2b445dbe392b6987cd15483 Author: Mikita Lipski Date: Wed Apr 14 14:15:52 2021 -0400 drm/amd/display: fix wrong statement in mst hpd debugfs [why] Previous statement would always evaluate to true making it meaningless [how] Just check if a connector is MST by checking if its port exists. Fixes: 41efcd3879b1df ("drm/amd/display: Add MST capability to trigger_hotplug interface") Reported-by: kernel test robot Signed-off-by: Mikita Lipski Reviewed-by: Nicholas Kazlauskas Acked-by: Wayne Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit d7b4a6077ec38763a1f6fed2b2f6a0113028eea7 Author: Darren Powell Date: Wed Apr 7 18:40:34 2021 -0400 amdgpu/pm: set pp_dpm_dcefclk to readonly on NAVI10 and newer gpus v2 : change condition to apply to all chips after NAVI10 Writing to dcefclk causes the gpu to become unresponsive, and requires a reboot. Patch prevents user from successfully writing to file pp_dpm_dcefclk on parts NAVI10 and newer, and gives better user feedback that this operation is not allowed. Signed-off-by: Darren Powell Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit b117b3964f38a988cb79825950dbd607c02237f3 Author: Darren Powell Date: Wed Apr 7 00:34:35 2021 -0400 amdgpu/pm: Prevent force of DCEFCLK on NAVI10 and SIENNA_CICHLID Writing to dcefclk causes the gpu to become unresponsive, and requires a reboot. Patch ignores a .force_clk_levels(SMU_DCEFCLK) call and issues an info message. Signed-off-by: Darren Powell Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 20a5f5a98e1bb3d40acd97e89299e8c2d22784be Author: Christian König Date: Thu Apr 22 13:11:39 2021 +0200 drm/amdgpu: fix concurrent VM flushes on Vega/Navi v2 Starting with Vega the hardware supports concurrent flushes of VMID which can be used to implement per process VMID allocation. But concurrent flushes are mutual exclusive with back to back VMID allocations, fix this to avoid a VMID used in two ways at the same time. v2: don't set ring to NULL Signed-off-by: Christian König Reviewed-by: James Zhu Tested-by: James Zhu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit d89f6048bdcb6a56abb396c584747d5eeae650db Author: Harry Wentland Date: Thu Apr 22 19:10:52 2021 -0400 drm/amd/display: Reject non-zero src_y and src_x for video planes [Why] This hasn't been well tested and leads to complete system hangs on DCN1 based systems, possibly others. The system hang can be reproduced by gesturing the video on the YouTube Android app on ChromeOS into full screen. [How] Reject atomic commits with non-zero drm_plane_state.src_x or src_y values. v2: - Add code comment describing the reason we're rejecting non-zero src_x and src_y - Drop gerrit Change-Id - Add stable CC - Based on amd-staging-drm-next v3: removed trailing whitespace Signed-off-by: Harry Wentland Cc: stable@vger.kernel.org Cc: nicholas.kazlauskas@amd.com Cc: amd-gfx@lists.freedesktop.org Cc: alexander.deucher@amd.com Cc: Roman.Li@amd.com Cc: hersenxs.wu@amd.com Cc: danny.wang@amd.com Reviewed-by: Nicholas Kazlauskas Acked-by: Christian König Reviewed-by: Hersen Wu Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit ce4f62f9dd8cf43ac044045ed598a0b80ef33890 Author: Can Guo Date: Sun Apr 25 20:48:40 2021 -0700 scsi: ufs: core: Narrow down fast path in system suspend path If spm_lvl is set to 0 or 1, when system suspend kicks start and HBA is runtime active, system suspend may just bail without doing anything (the fast path), leaving other contexts still running, e.g., clock gating and clock scaling. When system resume kicks start, concurrency can happen between ufshcd_resume() and these contexts, leading to various stability issues. Add a check against HBA's runtime state and allowing fast path only if HBA is runtime suspended, otherwise let system suspend go ahead call ufshcd_suspend(). This will guarantee that these contexts are stopped by either runtime suspend or system suspend. Link: https://lore.kernel.org/r/1619408921-30426-4-git-send-email-cang@codeaurora.org Fixes: 0b257734344a ("scsi: ufs: optimize system suspend handling") Reviewed-by: Daejun Park Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 637822e63b79ee8a729f7ba2645a26cf5a524ee4 Author: Can Guo Date: Sun Apr 25 20:48:39 2021 -0700 scsi: ufs: core: Cancel rpm_dev_flush_recheck_work during system suspend During ufs system suspend, leaving rpm_dev_flush_recheck_work running or pending is risky because concurrency may happen between system suspend/resume and runtime resume routine. Fix this by cancelling rpm_dev_flush_recheck_work synchronously during system suspend. Link: https://lore.kernel.org/r/1619408921-30426-3-git-send-email-cang@codeaurora.org Fixes: 51dd905bd2f6 ("scsi: ufs: Fix WriteBooster flush during runtime suspend") Reviewed-by: Daejun Park Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit 23043dd87b153d02eaf676e752d32429be5e5126 Author: Can Guo Date: Sun Apr 25 20:48:38 2021 -0700 scsi: ufs: core: Do not put UFS power into LPM if link is broken During resume, if link is broken due to AH8 failure, make sure ufshcd_resume() does not put UFS power back into LPM. Link: https://lore.kernel.org/r/1619408921-30426-2-git-send-email-cang@codeaurora.org Fixes: 4db7a2360597 ("scsi: ufs: Fix concurrency of error handler and other error recovery paths") Reviewed-by: Daejun Park Signed-off-by: Can Guo Signed-off-by: Martin K. Petersen commit fcb16d9a8ecf1e9bfced0fc654ea4e2caa7517f4 Author: Anastasia Kovaleva Date: Thu Apr 22 18:34:14 2021 +0300 scsi: qla2xxx: Prevent PRLI in target mode In a case when the initiator in P2P mode by some circumstances does not send PRLI, the target, in a case when the target port's WWPN is less than initiator's, changes the discovery state in DSC_GNL. When gnl completes it sends PRLI to the initiator. Usually the initiator in P2P mode always sends PRLI. We caught this issue on Linux stable v5.4.6 https://www.spinics.net/lists/stable/msg458515.html. Fix this particular corner case in the behaviour of the P2P mod target login state machine. Link: https://lore.kernel.org/r/20210422153414.4022-1-a.kovaleva@yadro.com Fixes: a9ed06d4e640 ("scsi: qla2xxx: Allow PLOGI in target mode") Reviewed-by: Roman Bolshakov Reviewed-by: Himanshu Madhani Signed-off-by: Anastasia Kovaleva Signed-off-by: Martin K. Petersen commit 000e68faefe6240ea2e4c98b606c594b20974fb7 Author: Bikash Hazarika Date: Mon Apr 26 22:09:14 2021 -0700 scsi: qla2xxx: Add marginal path handling support Add support for eh_should_retry_cmd callback in qla2xxx host template. Link: https://lore.kernel.org/r/20210427050914.7270-1-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Bikash Hazarika Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 9814b55cde0588b6d9bc496cee43f87316cbc6f1 Author: Bodo Stroesser Date: Fri Apr 23 17:01:23 2021 +0200 scsi: target: tcmu: Return from tcmu_handle_completions() if cmd_id not found If tcmu_handle_completions() finds an invalid cmd_id while looping over cmd responses from userspace it sets TCMU_DEV_BIT_BROKEN and breaks the loop. This means that it does further handling for the tcmu device. Skip that handling by replacing 'break' with 'return'. Additionally change tcmu_handle_completions() from unsigned int to bool, since the value used in return already is bool. Link: https://lore.kernel.org/r/20210423150123.24468-1-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 2f1137140fbcffad582d9e5eacc7f189ae0cc110 Author: Keoseong Park Date: Tue Apr 27 16:38:42 2021 +0900 scsi: ufs: core: Fix a typo in ufs-sysfs.c Fix the following typo: ufschd_uic_link_state_to_string() -> ufshcd_uic_link_state_to_string() ufschd_ufs_dev_pwr_mode_to_string() -> ufshcd_ufs_dev_pwr_mode_to_string() Link: https://lore.kernel.org/r/1381713434.61619509208911.JavaMail.epsvc@epcpadp3 Signed-off-by: Keoseong Park Signed-off-by: Martin K. Petersen commit d72cd4ad4174cfd2257c426ad51e4f53bcfde9c9 Merge: 238da4d004856 7a3beeae28938 Author: Linus Torvalds Date: Wed Apr 28 17:22:10 2021 -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, target, tcmu, smartpqi, lpfc, zfcp, qla2xxx, mpt3sas, pm80xx). The major core change is using a sbitmap instead of an atomic for queue tracking" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (412 commits) scsi: target: tcm_fc: Fix a kernel-doc header scsi: target: Shorten ALUA error messages scsi: target: Fix two format specifiers scsi: target: Compare explicitly with SAM_STAT_GOOD scsi: sd: Introduce a new local variable in sd_check_events() scsi: dc395x: Open-code status_byte(u8) calls scsi: 53c700: Open-code status_byte(u8) calls scsi: smartpqi: Remove unused functions scsi: qla4xxx: Remove an unused function scsi: myrs: Remove unused functions scsi: myrb: Remove unused functions scsi: mpt3sas: Fix two kernel-doc headers scsi: fcoe: Suppress a compiler warning scsi: libfc: Fix a format specifier scsi: aacraid: Remove an unused function scsi: core: Introduce enum scsi_disposition scsi: core: Modify the scsi_send_eh_cmnd() return value for the SDEV_BLOCK case scsi: core: Rename scsi_softirq_done() into scsi_complete() scsi: core: Remove an incorrect comment scsi: core: Make the scsi_alloc_sgtables() documentation more accurate ... commit 238da4d004856ac5f832899f6f3fa27c0102381f Merge: 35655ceb31b56 adaeb718d46f6 Author: Linus Torvalds Date: Wed Apr 28 17:19:47 2021 -0700 Merge tag 'vfio-v5.13-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Embed struct vfio_device into vfio driver structures (Jason Gunthorpe) - Make vfio_mdev type safe (Jason Gunthorpe) - Remove vfio-pci NVLink2 extensions for POWER9 (Christoph Hellwig) - Update vfio-pci IGD extensions for OpRegion 2.1+ (Fred Gao) - Various spelling/blank line fixes (Zhen Lei, Zhou Wang, Bhaskar Chowdhury) - Simplify unpin_pages error handling (Shenming Lu) - Fix i915 mdev Kconfig dependency (Arnd Bergmann) - Remove unused structure member (Keqian Zhu) * tag 'vfio-v5.13-rc1' of git://github.com/awilliam/linux-vfio: (43 commits) vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV vfio/iommu_type1: Remove unused pinned_page_dirty_scope in vfio_iommu vfio/mdev: Correct the function signatures for the mdev_type_attributes vfio/mdev: Remove kobj from mdev_parent_ops->create() vfio/gvt: Use mdev_get_type_group_id() vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV vfio/mbochs: Use mdev_get_type_group_id() vfio/mdpy: Use mdev_get_type_group_id() vfio/mtty: Use mdev_get_type_group_id() vfio/mdev: Add mdev/mtype_get_type_group_id() vfio/mdev: Remove duplicate storage of parent in mdev_device vfio/mdev: Add missing error handling to dev_set_name() vfio/mdev: Reorganize mdev_device_create() vfio/mdev: Add missing reference counting to mdev_type vfio/mdev: Expose mdev_get/put_parent to mdev_private.h vfio/mdev: Use struct mdev_type in struct mdev_device vfio/mdev: Simplify driver registration vfio/mdev: Add missing typesafety around mdev_device vfio/mdev: Do not allow a mdev_type to have a NULL parent pointer vfio/mdev: Fix missing static's on MDEV_TYPE_ATTR's ... commit 35655ceb31b56cd1cb52635a725dfcdb9662d7b7 Merge: d8201efe75e13 3ba2d41dca14e Author: Linus Torvalds Date: Wed Apr 28 17:13:56 2021 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "Here's a collection of largely clk driver updates. The usual suspects are here: i.MX, Qualcomm, Renesas, Allwinner, Samsung, and Rockchip, but it feels pretty light on commits. There's only one real commit to the framework core and that's to consolidate code. Otherwise the diffstat is dominated by many Qualcomm clk driver patches that modernize the driver for the proper way of speciying clk parents. That's shifting data around, which could subtly break things so I'll be on the lookout for fixes. New Drivers: - Proper clk driver for Mediatek MT7621 SoCs - Support for the clock controller on the new Rockchip rk3568 Updates: - Simplify Zynq Kconfig dependencies - Use clk_hw pointers in socfpga driver - Cleanup parent data in qcom clk drivers - Some cleanups for rk3399 modularization - Fix reparenting of i.MX UART clocks by initializing only the ones associated to stdout - Correct the PCIE clocks for i.MX8MP and i.MX8MQ - Make i.MX LPCG and SCU clocks return on registering failure - Kernel doc fixes - Add DAB hardware accelerator clocks on Renesas R-Car E3 and M3-N - Add timer (TMU) clocks on Renesas R-Car H3 ES1.0 - Add Timer (TMU & CMT) and thermal sensor (TSC) clocks on Renesas R-Car V3U - Sigma-delta modulation on Allwinner V3s audio PLL" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (82 commits) MAINTAINERS: add MT7621 CLOCK maintainer staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk' staging: mt7621-dts: make use of new 'mt7621-clk' clk: ralink: add clock driver for mt7621 SoC clk: uniphier: Fix potential infinite loop clk: qcom: rpmh: add support for SDX55 rpmh IPA clock clk: qcom: gcc-sdm845: get rid of the test clock clk: qcom: convert SDM845 Global Clock Controller to parent_data dt-bindings: clock: separate SDM845 GCC clock bindings clk: qcom: apss-ipq-pll: Add missing MODULE_DEVICE_TABLE clk: qcom: a53-pll: Add missing MODULE_DEVICE_TABLE clk: qcom: a7-pll: Add missing MODULE_DEVICE_TABLE dt: bindings: add mt7621-sysc device tree binding documentation dt-bindings: clock: add dt binding header for mt7621 clocks clk: samsung: Remove redundant dev_err calls clk: zynqmp: pll: add set_pll_mode to check condition in zynqmp_pll_enable clk: zynqmp: move zynqmp_pll_set_mode out of round_rate callback clk: zynqmp: Drop dependency on ARCH_ZYNQMP clk: zynqmp: Enable the driver if ZYNQMP_FIRMWARE is selected clk: qcom: gcc-sm8350: use ARRAY_SIZE instead of specifying num_parents ... commit d8201efe75e13146ebde433745c7920e15593baf Merge: c969f2451b534 2335f556b3afa Author: Linus Torvalds Date: Wed Apr 28 16:10:33 2021 -0700 Merge tag 'mailbox-v5.13' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: "qcom: - enable support for SM8350 and SC7280 sprd: - refcount channel usage - specify interrupt names in dt - support sc9863a arm: - drop redundant print ti: - convert dt-bindings to json schema and misc spelling fixes" * tag 'mailbox-v5.13' of git://git.linaro.org/landing-teams/working/fujitsu/integration: dt-bindings: mailbox: qcom-ipcc: Add compatible for SC7280 dt-bindings: mailbox: ti,secure-proxy: Convert to json schema mailbox: arm_mhu_db: Remove redundant dev_err call in mhu_db_probe() mailbox: sprd: Add supplementary inbox support dt-bindings: mailbox: Add interrupt-names to SPRD mailbox mailbox: sprd: Introduce refcnt when clients requests/free channels MAINTAINERS: Add DT bindings directory to mailbox mailbox: fix various typos in comments mailbox: pcc: fix platform_no_drv_owner.cocci warnings dt-bindings: mailbox: Add compatible for SM8350 IPCC commit c969f2451b5343a01635d35542f48bc14b44f6b3 Merge: 71a5cc28e88b0 04758386757c1 Author: Linus Torvalds Date: Wed Apr 28 16:02:58 2021 -0700 Merge tag 'backlight-next-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight Pull backlight updates from Lee Jones: "New Device Support: - Add support for PMI8994 to Qualcom WLED - Add support for KTD259 to Kinetic KTD253 Fix-ups: - Device Tree related fix-ups; kinetic,ktd253 - Use proper sequence during sync_toggle; qcom-wled - Fix Wmisleading-indentation warnings; jornada720_bl Bug Fixes: - Fix sync toggle on WLED4; qcom-wled - Fix FSC update on WLED5; qcom-wled" * tag 'backlight-next-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight: backlight: journada720: Fix Wmisleading-indentation warning backlight: qcom-wled: Correct the sync_toggle sequence backlight: qcom-wled: Fix FSC update issue for WLED5 dt-bindings: backlight: Add Kinetic KTD259 bindings backlight: ktd253: Support KTD259 backlight: qcom-wled: Use sink_addr for sync toggle dt-bindings: backlight: qcom-wled: Add PMI8994 compatible commit 71a5cc28e88b0db69c3f83d4061ad4cc684af09f Merge: be18cd1fcae2e f9386c91574fe Author: Linus Torvalds Date: Wed Apr 28 15:59:13 2021 -0700 Merge tag 'mfd-next-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "Core Framework: - Add support for Software Nodes to MFD Core - Remove support for Device Properties from MFD Core - Use standard APIs in MFD Core New Drivers: - Add support for ROHM BD9576MUF and BD9573MUF PMICs - Add support for Netronix Embedded Controller, PWM and RTC - Add support for Actions Semi ATC260x PMICs and OnKey New Device Support: - Add support for DG1 PCIe Graphics Card to Intel PMT - Add support for ROHM BD71815 PMIC to ROHM BD71828 - Add support for Tolino Shine 2 HD to Netronix Embedded Controller - Add support for AX10 BMC Secure Updates to Intel M10 BMC Removed Device Support: - Remove Arizona Extcon support from MFD - Remove ST-E AB8500 Power Supply code from MFD - Remove AB3100 altogether New Functionality: - Add support for SMBus and I2C modes to Dialog DA9063 - Switch to using Software Nodes in Intel (various) New/converted Device Tree bindings: - rohm bd71815-pmic, rohm bd9576-pmic, netronix ntxec, actions atc260x, ricoh rn5t618, qcom pm8xxx - Fix-ups: - Fix error handling/path; intel_pmt - Simplify code; rohm-bd718x7, ab8500-core, intel-m10-bmc - Trivial clean-ups (reordering, spelling); rohm-generic, rn5t618, max8997 - Use correct data-type; db8500-prcmu - Remove superfluous code; lp87565, intel_quark_i2c_gpi, lpc_sch, twl - Use generic APIs/defines; lm3533-core, intel_quark_i2c_gpio - Regmap related fix-ups; intel-m10-bmc, sec-core - Reorder resource freeing during remove; intel_quark_i2c_gpio - Make table indexing more robust; intel_quark_i2c_gpio - Fix reference imbalances; arizona-irq - Staticify and (un)constify things; arizona-spi, stmpe, ene-kb3930, intel-lpss-acpi, intel-lpss-pci, atc260x-i2c, intel_quark_i2c_gpio Bug Fixes: - Fix incorrect (register) values; intel-m10-bmc - Kconfig related fixes; ABX500_CORE - Do not clear the Auto Reload Register; stm32-timers" * tag 'mfd-next-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (84 commits) mfd: intel-m10-bmc: Add support for MAX10 BMC Secure Updates Revert "mfd: max8997: Add of_compatible to Extcon and Charger mfd_cell" mfd: twl: Remove unused inline function twl4030charger_usb_en() dt-bindings: mfd: Convert pm8xxx bindings to yaml dt-bindings: mfd: Add compatible for pmk8350 rtc i2c: designware: Get rid of legacy platform data mfd: intel_quark_i2c_gpio: Convert I²C to use software nodes mfd: lpc_sch: Partially revert "Add support for Intel Quark X1000" mfd: arizona: Fix rumtime PM imbalance on error mfd: max8997: Replace 8998 with 8997 mfd: core: Use acpi_find_child_device() for child devices lookup mfd: intel_quark_i2c_gpio: Don't play dirty trick with const mfd: intel_quark_i2c_gpio: Enable MSI interrupt mfd: intel_quark_i2c_gpio: Reuse BAR definitions for MFD cell indexing mfd: ntxec: Support for EC in Tolino Shine 2 HD mfd: stm32-timers: Avoid clearing auto reload register mfd: intel_quark_i2c_gpio: Replace I²C speeds with descriptive definitions mfd: intel_quark_i2c_gpio: Remove unused struct device member mfd: intel_quark_i2c_gpio: Unregister resources in reversed order mfd: Kconfig: ABX500_CORE should depend on ARCH_U8500 ... commit be18cd1fcae2ed7db58d92d20733dfa8aa0a5173 Merge: 6fa09d313921c 97fce126e2796 Author: Linus Torvalds Date: Wed Apr 28 15:56:51 2021 -0700 Merge tag 'mmc-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc Pull MMC and MEMSTICK updates from Ulf Hansson: "MMC core: - Fix hanging on I/O during system suspend for removable cards - Set read only for SD cards with permanent write protect bit - Power cycle the SD/SDIO card if CMD11 fails for UHS voltage - Issue a cache flush for eMMC only when it's enabled - Adopt to updated cache ctrl settings for eMMC from MMC ioctls - Use use device property API when parsing voltages - Don't retry eMMC sanitize cmds - Use the timeout from the MMC ioctl for eMMC santize cmds MMC host: - mmc_spi: Make of_mmc_spi.c resource provider agnostic - mmc_spi: Use polling for card detect even without voltage-ranges - sdhci: Check for reset prior to DMA address unmap - sdhci-acpi: Add support for the AMDI0041 eMMC controller variant - sdhci-esdhc-imx: Depending on OF Kconfig and cleanup code - sdhci-pci: Add PCI IDs for Intel LKF - sdhci-pci: Fix initialization of some SD cards for Intel BYT - sdhci-pci-gli: Various improvements for GL97xx variants - sdhci-of-dwcmshc: Enable support for MMC_CAP_WAIT_WHILE_BUSY - sdhci-of-dwcmshc: Add ACPI support for BlueField-3 SoC - sdhci-of-dwcmshc: Add Rockchip platform support - tmio/renesas_sdhi: Extend support for reset and use a reset controller - tmio/renesas_sdhi: Enable support for MMC_CAP_WAIT_WHILE_BUSY - tmio/renesas_sdhi: Various improvements MEMSTICK: - Minor improvements/cleanups" * tag 'mmc-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (79 commits) mmc: block: Issue a cache flush only when it's enabled memstick: r592: ignore kfifo_out() return code again mmc: block: Update ext_csd.cache_ctrl if it was written mmc: mmc_spi: Make of_mmc_spi.c resource provider agnostic mmc: mmc_spi: Use already parsed IRQ mmc: mmc_spi: Drop unused NO_IRQ definition mmc: mmc_spi: Set up polling even if voltage-ranges is not present mmc: core: Convert mmc_of_parse_voltage() to use device property API mmc: core: Correct descriptions in mmc_of_parse() mmc: dw_mmc-rockchip: Just set default sample value for legacy mode mmc: sdhci-s3c: constify uses of driver/match data mmc: sdhci-s3c: correct kerneldoc of sdhci_s3c_drv_data mmc: sdhci-s3c: simplify getting of_device_id match data mmc: tmio: always restore irq register mmc: sdhci-pci-gli: Enlarge ASPM L1 entry delay of GL975x mmc: core: Let eMMC sanitize not retry in case of timeout/failure mmc: core: Add a retries parameter to __mmc_switch function memstick: r592: remove unused variable mmc: sdhci-st: Remove unnecessary error log mmc: sdhci-msm: Remove unnecessary error log ... commit 6fa09d313921cd960ebb7f87132e49deb034b5f1 Merge: 0080665fbd0e6 07cbd87b0416d Author: Linus Torvalds Date: Wed Apr 28 15:54:57 2021 -0700 Merge tag 'for-linus-5.13-1' of git://github.com/cminyard/linux-ipmi Pull IPMI updates from Corey Minyard: "A bunch of little cleanups Nothing major, no functional changes" * tag 'for-linus-5.13-1' of git://github.com/cminyard/linux-ipmi: ipmi_si: Join string literals back ipmi_si: Drop redundant check before calling put_device() ipmi_si: Use strstrip() to remove surrounding spaces ipmi_si: Get rid of ->addr_source_cleanup() ipmi_si: Reuse si_to_str[] array in ipmi_hardcode_init_one() ipmi_si: Introduce ipmi_panic_event_str[] array ipmi_si: Use proper ACPI macros to check error code for failures ipmi_si: Utilize temporary variable to hold device pointer ipmi_si: Remove bogus err_free label ipmi_si: Switch to use platform_get_mem_or_io() ipmi: Handle device properties with software node API ipmi:ssif: make ssif_i2c_send() void ipmi: Refine retry conditions for getting device id commit 0080665fbd0e6a771aee366bb2aa208626e43def Merge: 5a69e9bce9984 031cc263c037a Author: Linus Torvalds Date: Wed Apr 28 15:50:24 2021 -0700 Merge tag 'devicetree-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: - Refactor powerpc and arm64 kexec DT handling to common code. This enables IMA on arm64. - Add kbuild support for applying DT overlays at build time. The first user are the DT unittests. - Fix kerneldoc formatting and W=1 warnings in drivers/of/ - Fix handling 64-bit flag on PCI resources - Bump dtschema version required to v2021.2.1 - Enable undocumented compatible checks for dtbs_check. This allows tracking of missing binding schemas. - DT docs improvements. Regroup the DT docs and add the example schema and DT kernel ABI docs to the doc build. - Convert Broadcom Bluetooth and video-mux bindings to schema - Add QCom sm8250 Venus video codec binding schema - Add vendor prefixes for AESOP, YIC System Co., Ltd, and Siliconfile Technologies Inc. - Cleanup of DT schema type references on common properties and standard unit properties * tag 'devicetree-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (64 commits) powerpc: If kexec_build_elf_info() fails return immediately from elf64_load() powerpc: Free fdt on error in elf64_load() of: overlay: Fix kerneldoc warning in of_overlay_remove() of: linux/of.h: fix kernel-doc warnings of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses dt-bindings: bcm4329-fmac: add optional brcm,ccode-map docs: dt: update writing-schema.rst references dt-bindings: media: venus: Add sm8250 dt schema of: base: Fix spelling issue with function param 'prop' docs: dt: Add DT API documentation of: Add missing 'Return' section in kerneldoc comments of: Fix kerneldoc output formatting docs: dt: Group DT docs into relevant sub-sections docs: dt: Make 'Devicetree' wording more consistent docs: dt: writing-schema: Include the example schema in the doc build docs: dt: writing-schema: Remove spurious indentation dt-bindings: Fix reference in submitting-patches.rst to the DT ABI doc dt-bindings: ddr: Add optional manufacturer and revision ID to LPDDR3 dt-bindings: media: video-interfaces: Drop the example devicetree: bindings: clock: Minor typo fix in the file armada3700-tbg-clock.txt ... commit 5a69e9bce9984806029926f405b4517878e703e2 Merge: a8b5e037d8a00 d0a43c12ee9f5 Author: Linus Torvalds Date: Wed Apr 28 15:43:58 2021 -0700 Merge tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: "battery/charger driver changes: - core: - provide function stubs if CONFIG_POWER_SUPPLY=n - reduce loglevel for probe defer info - surface: - new battery and charger drivers for Surface - bq27xxx: - add bq78z100 support - fix current_now/power_avg for newer chips - cw2015: - add CHARGE_NOW support - ab8500: - drop pdata support - convert most DT bindings to YAML - lots of minor fixes and cleanups reset drivers: - ltc2952-poweroff: - make trigger delay configurable from DT - minor fixes and cleanups" * tag 'for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (97 commits) power: supply: cpcap-battery: fix invalid usage of list cursor power: supply: bq256xx: add kerneldoc for structure members power: supply: act8945a: correct kerneldoc power: supply: max17040: remove unneeded double cast power: supply: max17040: handle device_property_read_u8_array() failure power: supply: max14577: remove unneeded variable initialization power: supply: surface-charger: Make symbol 'surface_ac_pm_ops' static power: supply: surface-battery: Make some symbols static power: reset: restart-poweroff: Add missing MODULE_DEVICE_TABLE power: reset: hisi-reboot: add missing MODULE_DEVICE_TABLE power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove() power: supply: generic-adc-battery: fix possible use-after-free in gab_remove() power: supply: Add AC driver for Surface Aggregator Module power: supply: Add battery driver for Surface Aggregator Module power: supply: bq25980: Move props from battery node power: supply: core: Use true and false for bool variable power: supply: goldfish: Remove the GOLDFISH dependency power: reset: ltc2952: make trigger delay configurable power: supply: cpcap-charger: Simplify bool conversion power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug bounce ... commit a8b5e037d8a00d396377a97f08f5fd2a410b96a1 Merge: 625434dafdd97 5c08b0f755756 Author: Linus Torvalds Date: Wed Apr 28 15:39:38 2021 -0700 Merge tag 'hsi-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI update from Sebastian Reichel: - memory leak fix in hsi_add_client_from_dt() error path * tag 'hsi-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: core: fix resource leaks in hsi_add_client_from_dt() commit 625434dafdd97372d15de21972be4b682709e854 Merge: c05a182bf4568 7b289c38335ec Author: Linus Torvalds Date: Wed Apr 28 14:56:09 2021 -0700 Merge tag 'for-5.13/io_uring-2021-04-27' of git://git.kernel.dk/linux-block Pull io_uring updates from Jens Axboe: - Support for multi-shot mode for POLL requests - More efficient reference counting. This is shamelessly stolen from the mm side. Even though referencing is mostly single/dual user, the 128 count was retained to keep the code the same. Maybe this should/could be made generic at some point. - Removal of the need to have a manager thread for each ring. The manager threads only job was checking and creating new io-threads as needed, instead we handle this from the queue path. - Allow SQPOLL without CAP_SYS_ADMIN or CAP_SYS_NICE. Since 5.12, this thread is "just" a regular application thread, so no need to restrict use of it anymore. - Cleanup of how internal async poll data lifetime is managed. - Fix for syzbot reported crash on SQPOLL cancelation. - Make buffer registration more like file registrations, which includes flexibility in avoiding full set unregistration and re-registration. - Fix for io-wq affinity setting. - Be a bit more defensive in task->pf_io_worker setup. - Various SQPOLL fixes. - Cleanup of SQPOLL creds handling. - Improvements to in-flight request tracking. - File registration cleanups. - Tons of cleanups and little fixes * tag 'for-5.13/io_uring-2021-04-27' of git://git.kernel.dk/linux-block: (156 commits) io_uring: maintain drain logic for multishot poll requests io_uring: Check current->io_uring in io_uring_cancel_sqpoll io_uring: fix NULL reg-buffer io_uring: simplify SQPOLL cancellations io_uring: fix work_exit sqpoll cancellations io_uring: Fix uninitialized variable up.resv io_uring: fix invalid error check after malloc io_uring: io_sq_thread() no longer needs to reset current->pf_io_worker kernel: always initialize task->pf_io_worker to NULL io_uring: update sq_thread_idle after ctx deleted io_uring: add full-fledged dynamic buffers support io_uring: implement fixed buffers registration similar to fixed files io_uring: prepare fixed rw for dynanic buffers io_uring: keep table of pointers to ubufs io_uring: add generic rsrc update with tags io_uring: add IORING_REGISTER_RSRC io_uring: enumerate dynamic resources io_uring: add generic path for rsrc update io_uring: preparation for rsrc tagging io_uring: decouple CQE filling from requests ... commit c05a182bf45681c5529a58c71ce5647535b3ae7a Merge: fc05860628165 e06abcc68cb55 Author: Linus Torvalds Date: Wed Apr 28 14:50:20 2021 -0700 Merge tag 'for-5.13/libata-2021-04-27' of git://git.kernel.dk/linux-block Pull libata updates from Jens Axboe: "Mostly cleanups this time, but also a few additions: - kernel-doc cleanups and sanitization (Lee) - Spelling fix (Bhaskar) - Fix ata_qc_from_tag() return value check in dwc_460ex (Dinghao) - Fall-through warning fix (Gustavo) - IRQ registration fixes (Sergey) - Add AHCI support for Tegra186 (Sowjanya) - Add xiling phy support for AHCI (Piyush) - SXS disable fix for AHCI for Hisilicon Kunpeng920 (Xingui) - pata legacy probe mask support (Maciej)" * tag 'for-5.13/libata-2021-04-27' of git://git.kernel.dk/linux-block: (54 commits) libata: Fix fall-through warnings for Clang pata_ipx4xx_cf: Fix unsigned comparison with less than zero ata: ahci_tegra: call tegra_powergate_power_off only when PM domain is not present ata: ahci_tegra: Add AHCI support for Tegra186 dt-binding: ata: tegra: Add dt-binding documentation for Tegra186 dt-bindings: ata: tegra: Convert binding documentation to YAML pata_legacy: Add `probe_mask' parameter like with ide-generic pata_platform: Document `pio_mask' module parameter pata_legacy: Properly document module parameters ata: ahci: ceva: Updated code by using dev_err_probe() ata: ahci: Disable SXS for Hisilicon Kunpeng920 ata: libahci_platform: fix IRQ check sata_mv: add IRQ checks ata: pata_acpi: Fix some incorrect function param descriptions ata: libata-acpi: Fix function name and provide description for 'prev_gtf' ata: sata_mv: Fix misnaming of 'mv_bmdma_stop()' ata: pata_cs5530: Fix misspelling of 'cs5530_init_one()'s 'pdev' param ata: pata_legacy: Repair a couple kernel-doc problems ata: ata_generic: Fix misspelling of 'ata_generic_init_one()' ata: pata_opti: Fix spelling issue of 'val' in 'opti_write_reg()' ... commit fc0586062816559defb14c947319ef8c4c326fb3 Merge: 6c00292113820 8324fbae75ce6 Author: Linus Torvalds Date: Wed Apr 28 14:39:37 2021 -0700 Merge tag 'for-5.13/drivers-2021-04-27' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: - MD changes via Song: - raid5 POWER fix - raid1 failure fix - UAF fix for md cluster - mddev_find_or_alloc() clean up - Fix NULL pointer deref with external bitmap - Performance improvement for raid10 discard requests - Fix missing information of /proc/mdstat - rsxx const qualifier removal (Arnd) - Expose allocated brd pages (Calvin) - rnbd via Gioh Kim: - Change maintainer - Change domain address of maintainers' email - Add polling IO mode and document update - Fix memory leak and some bug detected by static code analysis tools - Code refactoring - Series of floppy cleanups/fixes (Denis) - s390 dasd fixes (Julian) - kerneldoc fixes (Lee) - null_blk double free (Lv) - null_blk virtual boundary addition (Max) - Remove xsysace driver (Michal) - umem driver removal (Davidlohr) - ataflop fixes (Dan) - Revalidate disk removal (Christoph) - Bounce buffer cleanups (Christoph) - Mark lightnvm as deprecated (Christoph) - mtip32xx init cleanups (Shixin) - Various fixes (Tian, Gustavo, Coly, Yang, Zhang, Zhiqiang) * tag 'for-5.13/drivers-2021-04-27' of git://git.kernel.dk/linux-block: (143 commits) async_xor: increase src_offs when dropping destination page drivers/block/null_blk/main: Fix a double free in null_init. md/raid1: properly indicate failure when ending a failed write request md-cluster: fix use-after-free issue when removing rdev nvme: introduce generic per-namespace chardev nvme: cleanup nvme_configure_apst nvme: do not try to reconfigure APST when the controller is not live nvme: add 'kato' sysfs attribute nvme: sanitize KATO setting nvmet: avoid queuing keep-alive timer if it is disabled brd: expose number of allocated pages in debugfs ataflop: fix off by one in ataflop_probe() ataflop: potential out of bounds in do_format() drbd: Fix fall-through warnings for Clang block/rnbd: Use strscpy instead of strlcpy block/rnbd-clt-sysfs: Remove copy buffer overlap in rnbd_clt_get_path_name block/rnbd-clt: Remove max_segment_size block/rnbd-clt: Generate kobject_uevent when the rnbd device state changes block/rnbd-srv: Remove unused arguments of rnbd_srv_rdma_ev Documentation/ABI/rnbd-clt: Add description for nr_poll_queues ... commit 6c0029211382011af508273c4fc98a732f841d95 Merge: 16b3d0cf5bad8 f46ec84b5acbf Author: Linus Torvalds Date: Wed Apr 28 14:27:12 2021 -0700 Merge tag 'for-5.13/block-2021-04-27' of git://git.kernel.dk/linux-block Pull block updates from Jens Axboe: "Pretty quiet round this time, which is nice. In detail: - Series revamping bounce buffer support (Christoph) - Dead code removal (Christoph, Bart) - Partition iteration revamp, now using xarray (Christoph) - Passthrough request scheduler improvements (Lin) - Series of BFQ improvements (Paolo) - Fix ioprio task iteration (Peter) - Various little tweaks and fixes (Tejun, Saravanan, Bhaskar, Max, Nikolay)" * tag 'for-5.13/block-2021-04-27' of git://git.kernel.dk/linux-block: (41 commits) blk-iocost: don't ignore vrate_min on QD contention blk-mq: Fix spurious debugfs directory creation during initialization bfq/mq-deadline: remove redundant check for passthrough request blk-mq: bypass IO scheduler's limit_depth for passthrough request block: Remove an obsolete comment from sg_io() block: move bio_list_copy_data to pktcdvd block: remove zero_fill_bio_iter block: add queue_to_disk() to get gendisk from request_queue block: remove an incorrect check from blk_rq_append_bio block: initialize ret in bdev_disk_changed block: Fix sys_ioprio_set(.which=IOPRIO_WHO_PGRP) task iteration block: remove disk_part_iter block: simplify diskstats_show block: simplify show_partition block: simplify printk_all_partitions block: simplify partition_overlaps block: simplify partition removal block: take bd_mutex around delete_partitions in del_gendisk block: refactor blk_drop_partitions block: move more syncing and invalidation to delete_partition ... commit 4a52dd8fefb45626dace70a63c0738dbd83b7edb Author: Oleksij Rempel Date: Wed Apr 28 15:09:46 2021 +0200 net: selftest: fix build issue if INET is disabled In case ethernet driver is enabled and INET is disabled, selftest will fail to build. Reported-by: Randy Dunlap Fixes: 3e1e58d64c3d ("net: add generic selftest support") Signed-off-by: Oleksij Rempel Acked-by: Randy Dunlap # build-tested Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20210428130947.29649-1-o.rempel@pengutronix.de Signed-off-by: Jakub Kicinski commit 15c0a64bfcbcc7a8dca805746f46ea6e746736ed Author: Jiapeng Chong Date: Wed Apr 28 17:58:05 2021 +0800 net: netrom: nr_in: Remove redundant assignment to ns Variable ns is set to 'skb->data[17]' but this value is never read as it is overwritten or not used later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: net/netrom/nr_in.c:156:2: warning: Value stored to 'ns' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1619603885-115604-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 808337bec7366f948663952d8e739eb6c235a90f Author: Yang Li Date: Wed Apr 28 17:57:32 2021 +0800 net: tun: Remove redundant assignment to ret Variable 'ret' is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: drivers/net/tun.c:3008:2: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1619603852-114996-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Jakub Kicinski commit 65ad85f63b15af6995473724ab8562772db22753 Author: Maxim Kochetkov Date: Wed Apr 28 12:53:56 2021 +0300 net: phy: marvell: add downshift support for M88E1240 Add downshift support for 88E1240, it uses the same downshift configuration registers as 88E1011. Signed-off-by: Maxim Kochetkov Link: https://lore.kernel.org/r/20210428095356.621536-1-fido_max@inbox.ru Signed-off-by: Jakub Kicinski commit 12c2bb96c3f1916624d671904430b7714b48dd71 Author: Colin Ian King Date: Wed Apr 28 13:00:10 2021 +0100 net: dsa: ksz: Make reg_mib_cnt a u8 as it never exceeds 255 Currently the for-loop in ksz8_port_init_cnt is causing a static analysis infinite loop warning with the comparison of mib->cnt_ptr < dev->reg_mib_cnt. This occurs because mib->cnt_ptr is a u8 and dev->reg_mib_cnt is an int and the analyzer determines that mib->cnt_ptr potentially can wrap around to zero if the value in dev->reg_mib_cnt is > 255. However, this value is never this large, it is always less than 256 so make reg_mib_cnt a u8. Addresses-Coverity: ("Infinite loop") Fixes: e66f840c08a2 ("net: dsa: ksz: Add Microchip KSZ8795 DSA driver") Signed-off-by: Colin Ian King Reviewed-by: Florian Fainelli Link: https://lore.kernel.org/r/20210428120010.337959-1-colin.king@canonical.com Signed-off-by: Jakub Kicinski commit 9be02dd3858137f7bf83320568279eeda59faf01 Author: Roi Dayan Date: Wed Apr 28 09:05:32 2021 +0300 net/sched: act_ct: Remove redundant ct get and check The assignment is not being used and redundant. The check for null is redundant as nf_conntrack_put() also checks this. Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Link: https://lore.kernel.org/r/20210428060532.3330974-1-roid@nvidia.com Signed-off-by: Jakub Kicinski commit e542d29ca81d005651680a0a697b72ca13ddc4cc Author: Andreas Roeseler Date: Tue Apr 27 10:36:35 2021 -0500 icmp: standardize naming of RFC 8335 PROBE constants The current definitions of constants for PROBE, currently defined only in the net-next kernel branch, are inconsistent, with some beginning with ICMP and others with simply EXT. This patch attempts to standardize the naming conventions of the constants for PROBE before their release into a stable Kernel, and to update the relevant definitions in net/ipv4/icmp.c. Similarly, the definitions for the code field (previously ICMP_EXT_MAL_QUERY, etc) use the same prefixes as the type field. This patch adds _CODE_ to the prefix to clarify the distinction of these constants. Signed-off-by: Andreas Roeseler Acked-by: David Ahern Link: https://lore.kernel.org/r/20210427153635.2591-1-andreas.a.roeseler@gmail.com Signed-off-by: Jakub Kicinski commit 16b3d0cf5bad844daaf436ad2e9061de0fe36e5c Merge: 42dec9a936e76 2ea46c6fc9452 Author: Linus Torvalds Date: Wed Apr 28 13:33:57 2021 -0700 Merge tag 'sched-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - Clean up SCHED_DEBUG: move the decades old mess of sysctl, procfs and debugfs interfaces to a unified debugfs interface. - Signals: Allow caching one sigqueue object per task, to improve performance & latencies. - Improve newidle_balance() irq-off latencies on systems with a large number of CPU cgroups. - Improve energy-aware scheduling - Improve the PELT metrics for certain workloads - Reintroduce select_idle_smt() to improve load-balancing locality - but without the previous regressions - Add 'scheduler latency debugging': warn after long periods of pending need_resched. This is an opt-in feature that requires the enabling of the LATENCY_WARN scheduler feature, or the use of the resched_latency_warn_ms=xx boot parameter. - CPU hotplug fixes for HP-rollback, and for the 'fail' interface. Fix remaining balance_push() vs. hotplug holes/races - PSI fixes, plus allow /proc/pressure/ files to be written by CAP_SYS_RESOURCE tasks as well - Fix/improve various load-balancing corner cases vs. capacity margins - Fix sched topology on systems with NUMA diameter of 3 or above - Fix PF_KTHREAD vs to_kthread() race - Minor rseq optimizations - Misc cleanups, optimizations, fixes and smaller updates * tag 'sched-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (61 commits) cpumask/hotplug: Fix cpu_dying() state tracking kthread: Fix PF_KTHREAD vs to_kthread() race sched/debug: Fix cgroup_path[] serialization sched,psi: Handle potential task count underflow bugs more gracefully sched: Warn on long periods of pending need_resched sched/fair: Move update_nohz_stats() to the CONFIG_NO_HZ_COMMON block to simplify the code & fix an unused function warning sched/debug: Rename the sched_debug parameter to sched_verbose sched,fair: Alternative sched_slice() sched: Move /proc/sched_debug to debugfs sched,debug: Convert sysctl sched_domains to debugfs debugfs: Implement debugfs_create_str() sched,preempt: Move preempt_dynamic to debug.c sched: Move SCHED_DEBUG sysctl to debugfs sched: Don't make LATENCYTOP select SCHED_DEBUG sched: Remove sched_schedstats sysctl out from under SCHED_DEBUG sched/numa: Allow runtime enabling/disabling of NUMA balance without SCHED_DEBUG sched: Use cpu_dying() to fix balance_push vs hotplug-rollback cpumask: Introduce DYING mask cpumask: Make cpu_{online,possible,present,active}() inline rseq: Optimise rseq_get_rseq_cs() and clear_rseq_cs() ... commit 02ded1314a465a89267be38231d9858206853d80 Author: Jonathan Marek Date: Fri Apr 23 15:04:20 2021 -0400 drm/msm: fix minor version to indicate MSM_PARAM_SUSPENDS support Increase the minor version to indicate that MSM_PARAM_SUSPENDS is supported. Fixes: 3ab1c5cc3939 ("drm/msm: Add param for userspace to query suspend count") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210423190420.25217-1-jonathan@marek.ca Signed-off-by: Rob Clark commit 42dec9a936e7696bea1f27d3c5a0068cd9aa95fd Merge: 03b2cd72aad11 ed8e50800bf4c Author: Linus Torvalds Date: Wed Apr 28 13:03:44 2021 -0700 Merge tag 'perf-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf event updates from Ingo Molnar: - Improve Intel uncore PMU support: - Parse uncore 'discovery tables' - a new hardware capability enumeration method introduced on the latest Intel platforms. This table is in a well-defined PCI namespace location and is read via MMIO. It is organized in an rbtree. These uncore tables will allow the discovery of standard counter blocks, but fancier counters still need to be enumerated explicitly. - Add Alder Lake support - Improve IIO stacks to PMON mapping support on Skylake servers - Add Intel Alder Lake PMU support - which requires the introduction of 'hybrid' CPUs and PMUs. Alder Lake is a mix of Golden Cove ('big') and Gracemont ('small' - Atom derived) cores. The CPU-side feature set is entirely symmetrical - but on the PMU side there's core type dependent PMU functionality. - Reduce data loss with CPU level hardware tracing on Intel PT / AUX profiling, by fixing the AUX allocation watermark logic. - Improve ring buffer allocation on NUMA systems - Put 'struct perf_event' into their separate kmem_cache pool - Add support for synchronous signals for select perf events. The immediate motivation is to support low-overhead sampling-based race detection for user-space code. The feature consists of the following main changes: - Add thread-only event inheritance via perf_event_attr::inherit_thread, which limits inheritance of events to CLONE_THREAD. - Add the ability for events to not leak through exec(), via perf_event_attr::remove_on_exec. - Allow the generation of SIGTRAP via perf_event_attr::sigtrap, extend siginfo with an u64 ::si_perf, and add the breakpoint information to ::si_addr and ::si_perf if the event is PERF_TYPE_BREAKPOINT. The siginfo support is adequate for breakpoints right now - but the new field can be used to introduce support for other types of metadata passed over siginfo as well. - Misc fixes, cleanups and smaller updates. * tag 'perf-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits) signal, perf: Add missing TRAP_PERF case in siginfo_layout() signal, perf: Fix siginfo_t by avoiding u64 on 32-bit architectures perf/x86: Allow for 8 Date: Wed Apr 28 12:53:24 2021 -0700 Merge tag 'objtool-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool updates from Ingo Molnar: - Standardize the crypto asm code so that it looks like compiler- generated code to objtool - so that it can understand it. This enables unwinding from crypto asm code - and also fixes the last known remaining objtool warnings for LTO and more. - x86 decoder fixes: clean up and fix the decoder, and also extend it a bit - Misc fixes and cleanups * tag 'objtool-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) x86/crypto: Enable objtool in crypto code x86/crypto/sha512-ssse3: Standardize stack alignment prologue x86/crypto/sha512-avx2: Standardize stack alignment prologue x86/crypto/sha512-avx: Standardize stack alignment prologue x86/crypto/sha256-avx2: Standardize stack alignment prologue x86/crypto/sha1_avx2: Standardize stack alignment prologue x86/crypto/sha_ni: Standardize stack alignment prologue x86/crypto/crc32c-pcl-intel: Standardize jump table x86/crypto/camellia-aesni-avx2: Unconditionally allocate stack buffer x86/crypto/aesni-intel_avx: Standardize stack alignment prologue x86/crypto/aesni-intel_avx: Fix register usage comments x86/crypto/aesni-intel_avx: Remove unused macros objtool: Support asm jump tables objtool: Parse options from OBJTOOL_ARGS objtool: Collate parse_options() users objtool: Add --backup objtool,x86: More ModRM sugar objtool,x86: Rewrite ADD/SUB/AND objtool,x86: Support %riz encodings objtool,x86: Simplify register decode ... commit 0ff0edb550e256597e505eff308f90d9a0b6677c Merge: 9a45da9270b64 f4abe9967c6fd Author: Linus Torvalds Date: Wed Apr 28 12:37:53 2021 -0700 Merge tag 'locking-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking updates from Ingo Molnar: - rtmutex cleanup & spring cleaning pass that removes ~400 lines of code - Futex simplifications & cleanups - Add debugging to the CSD code, to help track down a tenacious race (or hw problem) - Add lockdep_assert_not_held(), to allow code to require a lock to not be held, and propagate this into the ath10k driver - Misc LKMM documentation updates - Misc KCSAN updates: cleanups & documentation updates - Misc fixes and cleanups - Fix locktorture bugs with ww_mutexes * tag 'locking-core-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits) kcsan: Fix printk format string static_call: Relax static_call_update() function argument type static_call: Fix unused variable warn w/o MODULE locking/rtmutex: Clean up signal handling in __rt_mutex_slowlock() locking/rtmutex: Restrict the trylock WARN_ON() to debug locking/rtmutex: Fix misleading comment in rt_mutex_postunlock() locking/rtmutex: Consolidate the fast/slowpath invocation locking/rtmutex: Make text section and inlining consistent locking/rtmutex: Move debug functions as inlines into common header locking/rtmutex: Decrapify __rt_mutex_init() locking/rtmutex: Remove pointless CONFIG_RT_MUTEXES=n stubs locking/rtmutex: Inline chainwalk depth check locking/rtmutex: Move rt_mutex_debug_task_free() to rtmutex.c locking/rtmutex: Remove empty and unused debug stubs locking/rtmutex: Consolidate rt_mutex_init() locking/rtmutex: Remove output from deadlock detector locking/rtmutex: Remove rtmutex deadlock tester leftovers locking/rtmutex: Remove rt_mutex_timed_lock() MAINTAINERS: Add myself as futex reviewer locking/mutex: Remove repeated declaration ... commit 9a45da9270b64b14e154093c28f746d861ab8c61 Merge: 68a32ba14177d 120b566d1df22 Author: Linus Torvalds Date: Wed Apr 28 12:00:13 2021 -0700 Merge tag 'core-rcu-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: - Support for "N" as alias for last bit in bitmap parsing library (eg using syntax like "nohz_full=2-N") - kvfree_rcu updates - mm_dump_obj() updates. (One of these is to mm, but was suggested by Andrew Morton.) - RCU callback offloading update - Polling RCU grace-period interfaces - Realtime-related RCU updates - Tasks-RCU updates - Torture-test updates - Torture-test scripting updates - Miscellaneous fixes * tag 'core-rcu-2021-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (77 commits) rcutorture: Test start_poll_synchronize_rcu() and poll_state_synchronize_rcu() rcu: Provide polling interfaces for Tiny RCU grace periods torture: Fix kvm.sh --datestamp regex check torture: Consolidate qemu-cmd duration editing into kvm-transform.sh torture: Print proper vmlinux path for kvm-again.sh runs torture: Make TORTURE_TRUST_MAKE available in kvm-again.sh environment torture: Make kvm-transform.sh update jitter commands torture: Add --duration argument to kvm-again.sh torture: Add kvm-again.sh to rerun a previous torture-test torture: Create a "batches" file for build reuse torture: De-capitalize TORTURE_SUITE torture: Make upper-case-only no-dot no-slash scenario names official torture: Rename SRCU-t and SRCU-u to avoid lowercase characters torture: Remove no-mpstat error message torture: Record kvm-test-1-run.sh and kvm-test-1-run-qemu.sh PIDs torture: Record jitter start/stop commands torture: Extract kvm-test-1-run-qemu.sh from kvm-test-1-run.sh torture: Record TORTURE_KCONFIG_GDB_ARG in qemu-cmd torture: Abstract jitter.sh start/stop into scripts rcu: Provide polling interfaces for Tree RCU grace periods ... commit f89271f09f589b8e9f98a9d3373d4868d3e668a5 Merge: 99ba0ea616aab 3733bfbbdd28f Author: Jakub Kicinski Date: Wed Apr 28 11:59:31 2021 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Daniel Borkmann says: ==================== pull-request: bpf-next 2021-04-28 The main changes are: 1) Add link detach and following re-attach for trampolines, from Jiri Olsa. 2) Use kernel's "binary printf" lib for formatted output BPF helpers (which avoids the needs for variadic argument handling), from Florent Revest. 3) Fix verifier 64 to 32 bit min/max bound propagation, from Daniel Borkmann. 4) Convert cpumap to use netif_receive_skb_list(), from Lorenzo Bianconi. 5) Add generic batched-ops support to percpu array map, from Pedro Tammela. 6) Various CO-RE relocation BPF selftests fixes, from Andrii Nakryiko. 7) Misc doc rst fixes, from Hengqi Chen. * https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: bpf, selftests: Update array map tests for per-cpu batched ops bpf: Add batched ops support for percpu array bpf: Implement formatted output helpers with bstr_printf seq_file: Add a seq_bprintf function bpf, docs: Fix literal block for example code bpf, cpumap: Bulk skb using netif_receive_skb_list bpf: Fix propagation of 32 bit unsigned bounds from 64 bit bounds bpf: Lock bpf_trace_printk's tmp buf before it is written to selftests/bpf: Fix core_reloc test runner selftests/bpf: Fix field existence CO-RE reloc tests selftests/bpf: Fix BPF_CORE_READ_BITFIELD() macro libbpf: Support BTF_KIND_FLOAT during type compatibility checks in CO-RE selftests/bpf: Add remaining ASSERT_xxx() variants selftests/bpf: Use ASSERT macros in lsm test selftests/bpf: Test that module can't be unloaded with attached trampoline selftests/bpf: Add re-attach test to lsm test selftests/bpf: Add re-attach test to fexit_test selftests/bpf: Add re-attach test to fentry_test bpf: Allow trampoline re-attach for tracing and lsm programs ==================== Link: https://lore.kernel.org/r/20210427233740.22238-1-daniel@iogearbox.net Signed-off-by: Jakub Kicinski commit f9baa501b4fd6962257853d46ddffbc21f27e344 Author: Filipe Manana Date: Thu Apr 22 12:08:05 2021 +0100 btrfs: fix deadlock when cloning inline extents and using qgroups There are a few exceptional cases where cloning an inline extent needs to copy the inline extent data into a page of the destination inode. When this happens, we end up starting a transaction while having a dirty page for the destination inode and while having the range locked in the destination's inode iotree too. Because when reserving metadata space for a transaction we may need to flush existing delalloc in case there is not enough free space, we have a mechanism in place to prevent a deadlock, which was introduced in commit 3d45f221ce627d ("btrfs: fix deadlock when cloning inline extent and low on free metadata space"). However when using qgroups, a transaction also reserves metadata qgroup space, which can also result in flushing delalloc in case there is not enough available space at the moment. When this happens we deadlock, since flushing delalloc requires locking the file range in the inode's iotree and the range was already locked at the very beginning of the clone operation, before attempting to start the transaction. When this issue happens, stack traces like the following are reported: [72747.556262] task:kworker/u81:9 state:D stack: 0 pid: 225 ppid: 2 flags:0x00004000 [72747.556268] Workqueue: writeback wb_workfn (flush-btrfs-1142) [72747.556271] Call Trace: [72747.556273] __schedule+0x296/0x760 [72747.556277] schedule+0x3c/0xa0 [72747.556279] io_schedule+0x12/0x40 [72747.556284] __lock_page+0x13c/0x280 [72747.556287] ? generic_file_readonly_mmap+0x70/0x70 [72747.556325] extent_write_cache_pages+0x22a/0x440 [btrfs] [72747.556331] ? __set_page_dirty_nobuffers+0xe7/0x160 [72747.556358] ? set_extent_buffer_dirty+0x5e/0x80 [btrfs] [72747.556362] ? update_group_capacity+0x25/0x210 [72747.556366] ? cpumask_next_and+0x1a/0x20 [72747.556391] extent_writepages+0x44/0xa0 [btrfs] [72747.556394] do_writepages+0x41/0xd0 [72747.556398] __writeback_single_inode+0x39/0x2a0 [72747.556403] writeback_sb_inodes+0x1ea/0x440 [72747.556407] __writeback_inodes_wb+0x5f/0xc0 [72747.556410] wb_writeback+0x235/0x2b0 [72747.556414] ? get_nr_inodes+0x35/0x50 [72747.556417] wb_workfn+0x354/0x490 [72747.556420] ? newidle_balance+0x2c5/0x3e0 [72747.556424] process_one_work+0x1aa/0x340 [72747.556426] worker_thread+0x30/0x390 [72747.556429] ? create_worker+0x1a0/0x1a0 [72747.556432] kthread+0x116/0x130 [72747.556435] ? kthread_park+0x80/0x80 [72747.556438] ret_from_fork+0x1f/0x30 [72747.566958] Workqueue: btrfs-flush_delalloc btrfs_work_helper [btrfs] [72747.566961] Call Trace: [72747.566964] __schedule+0x296/0x760 [72747.566968] ? finish_wait+0x80/0x80 [72747.566970] schedule+0x3c/0xa0 [72747.566995] wait_extent_bit.constprop.68+0x13b/0x1c0 [btrfs] [72747.566999] ? finish_wait+0x80/0x80 [72747.567024] lock_extent_bits+0x37/0x90 [btrfs] [72747.567047] btrfs_invalidatepage+0x299/0x2c0 [btrfs] [72747.567051] ? find_get_pages_range_tag+0x2cd/0x380 [72747.567076] __extent_writepage+0x203/0x320 [btrfs] [72747.567102] extent_write_cache_pages+0x2bb/0x440 [btrfs] [72747.567106] ? update_load_avg+0x7e/0x5f0 [72747.567109] ? enqueue_entity+0xf4/0x6f0 [72747.567134] extent_writepages+0x44/0xa0 [btrfs] [72747.567137] ? enqueue_task_fair+0x93/0x6f0 [72747.567140] do_writepages+0x41/0xd0 [72747.567144] __filemap_fdatawrite_range+0xc7/0x100 [72747.567167] btrfs_run_delalloc_work+0x17/0x40 [btrfs] [72747.567195] btrfs_work_helper+0xc2/0x300 [btrfs] [72747.567200] process_one_work+0x1aa/0x340 [72747.567202] worker_thread+0x30/0x390 [72747.567205] ? create_worker+0x1a0/0x1a0 [72747.567208] kthread+0x116/0x130 [72747.567211] ? kthread_park+0x80/0x80 [72747.567214] ret_from_fork+0x1f/0x30 [72747.569686] task:fsstress state:D stack: 0 pid:841421 ppid:841417 flags:0x00000000 [72747.569689] Call Trace: [72747.569691] __schedule+0x296/0x760 [72747.569694] schedule+0x3c/0xa0 [72747.569721] try_flush_qgroup+0x95/0x140 [btrfs] [72747.569725] ? finish_wait+0x80/0x80 [72747.569753] btrfs_qgroup_reserve_data+0x34/0x50 [btrfs] [72747.569781] btrfs_check_data_free_space+0x5f/0xa0 [btrfs] [72747.569804] btrfs_buffered_write+0x1f7/0x7f0 [btrfs] [72747.569810] ? path_lookupat.isra.48+0x97/0x140 [72747.569833] btrfs_file_write_iter+0x81/0x410 [btrfs] [72747.569836] ? __kmalloc+0x16a/0x2c0 [72747.569839] do_iter_readv_writev+0x160/0x1c0 [72747.569843] do_iter_write+0x80/0x1b0 [72747.569847] vfs_writev+0x84/0x140 [72747.569869] ? btrfs_file_llseek+0x38/0x270 [btrfs] [72747.569873] do_writev+0x65/0x100 [72747.569876] do_syscall_64+0x33/0x40 [72747.569879] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [72747.569899] task:fsstress state:D stack: 0 pid:841424 ppid:841417 flags:0x00004000 [72747.569903] Call Trace: [72747.569906] __schedule+0x296/0x760 [72747.569909] schedule+0x3c/0xa0 [72747.569936] try_flush_qgroup+0x95/0x140 [btrfs] [72747.569940] ? finish_wait+0x80/0x80 [72747.569967] __btrfs_qgroup_reserve_meta+0x36/0x50 [btrfs] [72747.569989] start_transaction+0x279/0x580 [btrfs] [72747.570014] clone_copy_inline_extent+0x332/0x490 [btrfs] [72747.570041] btrfs_clone+0x5b7/0x7a0 [btrfs] [72747.570068] ? lock_extent_bits+0x64/0x90 [btrfs] [72747.570095] btrfs_clone_files+0xfc/0x150 [btrfs] [72747.570122] btrfs_remap_file_range+0x3d8/0x4a0 [btrfs] [72747.570126] do_clone_file_range+0xed/0x200 [72747.570131] vfs_clone_file_range+0x37/0x110 [72747.570134] ioctl_file_clone+0x7d/0xb0 [72747.570137] do_vfs_ioctl+0x138/0x630 [72747.570140] __x64_sys_ioctl+0x62/0xc0 [72747.570143] do_syscall_64+0x33/0x40 [72747.570146] entry_SYSCALL_64_after_hwframe+0x44/0xa9 So fix this by skipping the flush of delalloc for an inode that is flagged with BTRFS_INODE_NO_DELALLOC_FLUSH, meaning it is currently under such a special case of cloning an inline extent, when flushing delalloc during qgroup metadata reservation. The special cases for cloning inline extents were added in kernel 5.7 by by commit 05a5a7621ce66c ("Btrfs: implement full reflink support for inline extents"), while having qgroup metadata space reservation flushing delalloc when low on space was added in kernel 5.9 by commit c53e9653605dbf ("btrfs: qgroup: try to flush qgroup space when we get -EDQUOT"). So use a "Fixes:" tag for the later commit to ease stable kernel backports. Reported-by: Wang Yugui Link: https://lore.kernel.org/linux-btrfs/20210421083137.31E3.409509F4@e16-tech.com/ Fixes: c53e9653605dbf ("btrfs: qgroup: try to flush qgroup space when we get -EDQUOT") CC: stable@vger.kernel.org # 5.9+ Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 626e9f41f7c281ba3e02843702f68471706aa6d9 Author: Filipe Manana Date: Tue Apr 27 11:27:20 2021 +0100 btrfs: fix race leading to unpersisted data and metadata on fsync When doing a fast fsync on a file, there is a race which can result in the fsync returning success to user space without logging the inode and without durably persisting new data. The following example shows one possible scenario for this: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt $ touch /mnt/bar $ xfs_io -f -c "pwrite -S 0xab 0 1M" -c "fsync" /mnt/baz # Now we have: # file bar == inode 257 # file baz == inode 258 $ mv /mnt/baz /mnt/foo # Now we have: # file bar == inode 257 # file foo == inode 258 $ xfs_io -c "pwrite -S 0xcd 0 1M" /mnt/foo # fsync bar before foo, it is important to trigger the race. $ xfs_io -c "fsync" /mnt/bar $ xfs_io -c "fsync" /mnt/foo # After this: # inode 257, file bar, is empty # inode 258, file foo, has 1M filled with 0xcd # Replay the log: $ mount /dev/sdc /mnt # After this point file foo should have 1M filled with 0xcd and not 0xab The following steps explain how the race happens: 1) Before the first fsync of inode 258, when it has the "baz" name, its ->logged_trans is 0, ->last_sub_trans is 0 and ->last_log_commit is -1. The inode also has the full sync flag set; 2) After the first fsync, we set inode 258 ->logged_trans to 6, which is the generation of the current transaction, and set ->last_log_commit to 0, which is the current value of ->last_sub_trans (done at btrfs_log_inode()). The full sync flag is cleared from the inode during the fsync. The log sub transaction that was committed had an ID of 0 and when we synced the log, at btrfs_sync_log(), we incremented root->log_transid from 0 to 1; 3) During the rename: We update inode 258, through btrfs_update_inode(), and that causes its ->last_sub_trans to be set to 1 (the current log transaction ID), and ->last_log_commit remains with a value of 0. After updating inode 258, because we have previously logged the inode in the previous fsync, we log again the inode through the call to btrfs_log_new_name(). This results in updating the inode's ->last_log_commit from 0 to 1 (the current value of its ->last_sub_trans). The ->last_sub_trans of inode 257 is updated to 1, which is the ID of the next log transaction; 4) Then a buffered write against inode 258 is made. This leaves the value of ->last_sub_trans as 1 (the ID of the current log transaction, stored at root->log_transid); 5) Then an fsync against inode 257 (or any other inode other than 258), happens. This results in committing the log transaction with ID 1, which results in updating root->last_log_commit to 1 and bumping root->log_transid from 1 to 2; 6) Then an fsync against inode 258 starts. We flush delalloc and wait only for writeback to complete, since the full sync flag is not set in the inode's runtime flags - we do not wait for ordered extents to complete. Then, at btrfs_sync_file(), we call btrfs_inode_in_log() before the ordered extent completes. The call returns true: static inline bool btrfs_inode_in_log(...) { bool ret = false; spin_lock(&inode->lock); if (inode->logged_trans == generation && inode->last_sub_trans <= inode->last_log_commit && inode->last_sub_trans <= inode->root->last_log_commit) ret = true; spin_unlock(&inode->lock); return ret; } generation has a value of 6 (fs_info->generation), ->logged_trans also has a value of 6 (set when we logged the inode during the first fsync and when logging it during the rename), ->last_sub_trans has a value of 1, set during the rename (step 3), ->last_log_commit also has a value of 1 (set in step 3) and root->last_log_commit has a value of 1, which was set in step 5 when fsyncing inode 257. As a consequence we don't log the inode, any new extents and do not sync the log, resulting in a data loss if a power failure happens after the fsync and before the current transaction commits. Also, because we do not log the inode, after a power failure the mtime and ctime of the inode do not match those we had before. When the ordered extent completes before we call btrfs_inode_in_log(), then the call returns false and we log the inode and sync the log, since at the end of ordered extent completion we update the inode and set ->last_sub_trans to 2 (the value of root->log_transid) and ->last_log_commit to 1. This problem is found after removing the check for the emptiness of the inode's list of modified extents in the recent commit 209ecbb8585bf6 ("btrfs: remove stale comment and logic from btrfs_inode_in_log()"), added in the 5.13 merge window. However checking the emptiness of the list is not really the way to solve this problem, and was never intended to, because while that solves the problem for COW writes, the problem persists for NOCOW writes because in that case the list is always empty. In the case of NOCOW writes, even though we wait for the writeback to complete before returning from btrfs_sync_file(), we end up not logging the inode, which has a new mtime/ctime, and because we don't sync the log, we never issue disk barriers (send REQ_PREFLUSH to the device) since that only happens when we sync the log (when we write super blocks at btrfs_sync_log()). So effectively, for a NOCOW case, when we return from btrfs_sync_file() to user space, we are not guaranteeing that the data is durably persisted on disk. Also, while the example above uses a rename exchange to show how the problem happens, it is not the only way to trigger it. An alternative could be adding a new hard link to inode 258, since that also results in calling btrfs_log_new_name() and updating the inode in the log. An example reproducer using the addition of a hard link instead of a rename operation: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt $ touch /mnt/bar $ xfs_io -f -c "pwrite -S 0xab 0 1M" -c "fsync" /mnt/foo $ ln /mnt/foo /mnt/foo_link $ xfs_io -c "pwrite -S 0xcd 0 1M" /mnt/foo $ xfs_io -c "fsync" /mnt/bar $ xfs_io -c "fsync" /mnt/foo # Replay the log: $ mount /dev/sdc /mnt # After this point file foo often has 1M filled with 0xab and not 0xcd The reasons leading to the final fsync of file foo, inode 258, not persisting the new data are the same as for the previous example with a rename operation. So fix by never skipping logging and log syncing when there are still any ordered extents in flight. To avoid making the conditional if statement that checks if logging an inode is needed harder to read, place all the logic into an helper function with separate if statements to make it more manageable and easier to read. A test case for fstests will follow soon. For NOCOW writes, the problem existed before commit b5e6c3e170b770 ("btrfs: always wait on ordered extents at fsync time"), introduced in kernel 4.19, then it went away with that commit since we started to always wait for ordered extent completion before logging. The problem came back again once the fast fsync path was changed again to avoid waiting for ordered extent completion, in commit 487781796d3022 ("btrfs: make fast fsyncs wait only for writeback"), added in kernel 5.10. However, for COW writes, the race only happens after the recent commit 209ecbb8585bf6 ("btrfs: remove stale comment and logic from btrfs_inode_in_log()"), introduced in the 5.13 merge window. For NOCOW writes, the bug existed before that commit. So tag 5.10+ as the release for stable backports. CC: stable@vger.kernel.org # 5.10+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ffb7c2e923cb3232454a513dcb5636e73091aa88 Author: Filipe Manana Date: Thu Apr 22 12:09:21 2021 +0100 btrfs: do not consider send context as valid when trying to flush qgroups At qgroup.c:try_flush_qgroup() we are asserting that current->journal_info is either NULL or has the value BTRFS_SEND_TRANS_STUB. However allowing for BTRFS_SEND_TRANS_STUB makes no sense because: 1) It is misleading, because send operations are read-only and do not ever need to reserve qgroup space; 2) We already assert that current->journal_info != BTRFS_SEND_TRANS_STUB at transaction.c:start_transaction(); 3) On a kernel without CONFIG_BTRFS_ASSERT=y set, it would result in a crash if try_flush_qgroup() is ever called in a send context, because at transaction.c:start_transaction we cast current->journal_info into a struct btrfs_trans_handle pointer and then dereference it. So just do allow a send context at try_flush_qgroup() and update the comment about it. Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit adbd914dcde0b03bfc08ffe40b81f31b0457833f Author: Filipe Manana Date: Wed Apr 21 14:31:50 2021 +0100 btrfs: zoned: fix silent data loss after failure splitting ordered extent On a zoned filesystem, sometimes we need to split an ordered extent into 3 different ordered extents. The original ordered extent is shortened, at the front and at the rear, and we create two other new ordered extents to represent the trimmed parts of the original ordered extent. After adjusting the original ordered extent, we create an ordered extent to represent the pre-range, and that may fail with ENOMEM for example. After that we always try to create the ordered extent for the post-range, and if that happens to succeed we end up returning success to the caller as we overwrite the 'ret' variable which contained the previous error. This means we end up with a file range for which there is no ordered extent, which results in the range never getting a new file extent item pointing to the new data location. And since the split operation did not return an error, writeback does not fail and the inode's mapping is not flagged with an error, resulting in a subsequent fsync not reporting an error either. It's possibly very unlikely to have the creation of the post-range ordered extent succeed after the creation of the pre-range ordered extent failed, but it's not impossible. So fix this by making sure we only create the post-range ordered extent if there was no error creating the ordered extent for the pre-range. Fixes: d22002fd37bd97 ("btrfs: zoned: split ordered extent when bio is sent") CC: stable@vger.kernel.org # 5.12+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 785e3c0a3a870e72dc530856136ab4c8dd207128 Author: Steven Rostedt (VMware) Date: Tue Apr 27 11:32:07 2021 -0400 tracing: Map all PIDs to command lines The default max PID is set by PID_MAX_DEFAULT, and the tracing infrastructure uses this number to map PIDs to the comm names of the tasks, such output of the trace can show names from the recorded PIDs in the ring buffer. This mapping is also exported to user space via the "saved_cmdlines" file in the tracefs directory. But currently the mapping expects the PIDs to be less than PID_MAX_DEFAULT, which is the default maximum and not the real maximum. Recently, systemd will increases the maximum value of a PID on the system, and when tasks are traced that have a PID higher than PID_MAX_DEFAULT, its comm is not recorded. This leads to the entire trace to have "<...>" as the comm name, which is pretty useless. Instead, keep the array mapping the size of PID_MAX_DEFAULT, but instead of just mapping the index to the comm, map a mask of the PID (PID_MAX_DEFAULT - 1) to the comm, and find the full PID from the map_cmdline_to_pid array (that already exists). This bug goes back to the beginning of ftrace, but hasn't been an issue until user space started increasing the maximum value of PIDs. Link: https://lkml.kernel.org/r/20210427113207.3c601884@gandalf.local.home Cc: stable@vger.kernel.org Fixes: bc0c38d139ec7 ("ftrace: latency tracer infrastructure") Signed-off-by: Steven Rostedt (VMware) commit 1cfd8956437f842836e8a066b40d1ec2fc01f13e Author: Mark Langsdorf Date: Tue Apr 27 13:54:33 2021 -0500 ACPI: custom_method: fix a possible memory leak In cm_write(), if the 'buf' is allocated memory but not fully consumed, it is possible to reallocate the buffer without freeing it by passing '*ppos' as 0 on a subsequent call. Add an explicit kfree() before kzalloc() to prevent the possible memory leak. Fixes: 526b4af47f44 ("ACPI: Split out custom_method functionality into an own driver") Signed-off-by: Mark Langsdorf Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit e483bb9a991bdae29a0caa4b3a6d002c968f94aa Author: Mark Langsdorf Date: Fri Apr 23 10:28:17 2021 -0500 ACPI: custom_method: fix potential use-after-free issue In cm_write(), buf is always freed when reaching the end of the function. If the requested count is less than table.length, the allocated buffer will be freed but subsequent calls to cm_write() will still try to access it. Remove the unconditional kfree(buf) at the end of the function and set the buf to NULL in the -EINVAL error path to match the rest of function. Fixes: 03d1571d9513 ("ACPI: custom_method: fix memory leaks") Signed-off-by: Mark Langsdorf Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki commit ec3576eac11d66a388b6cba6a7cfb3b45039a712 Author: Andy Shevchenko Date: Sat Apr 24 17:39:35 2021 +0300 Documentation: firmware-guide: gpio-properties: Add note to SPI CS case Historically ACPI has no means of the GPIO polarity and thus the SPISerialBus() resource defines it on the per-chip basis. In order to avoid an ambiguity, the GPIO polarity is considered being always Active High. Add note about this to the respective documentation file. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 68a32ba14177d4a21c4a9a941cf1d7aea86d436f Merge: 3aa139aa9fdc1 a1a1ca70deb3e Author: Linus Torvalds Date: Wed Apr 28 10:01:40 2021 -0700 Merge tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm Pull drm updates from Dave Airlie: "The usual lots of work all over the place. i915 has gotten some Alderlake work and prelim DG1 code, along with a major locking rework over the GEM code, and brings back the property of timing out long running jobs using a watchdog. amdgpu has some Alderbran support (new GPU), freesync HDMI support along with a lot other fixes. Outside of the drm, there is a new printf specifier added which should have all the correct acks/sobs: - printk fourcc modifier support added %p4cc Summary: core: - drm_crtc_commit_wait - atomic plane state helpers reworked for full state - dma-buf heaps API rework - edid: rework and improvements for displayid dp-mst: - better topology logging bridge: - Chipone ICN6211 - Lontium LT8912B - anx7625 regulator support panel: - fix lt9611 4k panels handling simple-kms: - add plane state helpers ttm: - debugfs support - removal of unused sysfs - ignore signaled moved fences - ioremap buffer according to mem caching i915: - Alderlake S enablement - Conversion to dma_resv_locking - Bring back watchdog timeout support - legacy ioctl cleanups - add GEM TDDO and RFC process - DG1 LMEM preparation work - intel_display.c refactoring - Gen9/TGL PCH combination support - eDP MSO Support - multiple PSR instance support - Link training debug updates - Disable PSR2 support on JSL/EHL - DDR5/LPDDR5 support for bw calcs - LSPCON limited to gen9/10 platforms - HSW/BDW async flip/VTd corruption workaround - SAGV watermark fixes - SNB hard hang on ring resume fix - Limit imported dma-buf size - move to use new tasklet API - refactor KBL/TGL/ADL-S display/gt steppings - refactoring legacy DP/HDMI, FB plane code out amdgpu: - uapi: add ioctl to query video capabilities - Iniital AMD Freesync HDMI support - Initial Adebaran support - 10bpc dithering improvements - DCN secure display support - Drop legacy IO BAR requirements - PCIE/S0ix/RAS/Prime/Reset fixes - Display ASSR support - SMU gfx busy queues for RV/PCO - Initial LTTPR display work amdkfd: - MMU notifier fixes - APU fixes radeon: - debugfs cleanps - fw error handling ifix - Flexible array cleanups msm: - big DSI phy/pll cleanup - sc7280 initial support - commong bandwidth scaling path - shrinker locking contention fixes - unpin/swap support for GEM objcets ast: - cursor plane handling reworked tegra: - don't register DP AUX channels before connectors zynqmp: - fix OOB struct padding memset gma500: - drop ttm and medfield support exynos: - request_irq cleanup function mediatek: - fine tune line time for EOTp - MT8192 dpi support - atomic crtc config updates - don't support HDMI connector creation mxsdb: - imx8mm support panfrost: - MMU IRQ handling rework qxl: - locking fixes - resource deallocation changes sun4i: - add alpha properties to UI/VI layers vc4: - RPi4 CEC support vmwgfx: - doc cleanups arc: - moved to drm/tiny" * tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm: (1390 commits) drm/ttm: Don't count pages in SG BOs against pages_limit drm/ttm: fix return value check drm/bridge: lt8912b: fix incorrect handling of of_* return values drm: bridge: fix LONTIUM use of mipi_dsi_() functions drm: bridge: fix ANX7625 use of mipi_dsi_() functions drm/amdgpu: page retire over debugfs mechanism drm/radeon: Fix a missing check bug in radeon_dp_mst_detect() drm/amd/display: Fix the Wunused-function warning drm/radeon/r600: Fix variables that are not used after assignment drm/amdgpu/smu7: fix CAC setting on TOPAZ drm/amd/display: Update DCN302 SR Exit Latency drm/amdgpu: enable ras eeprom on aldebaran drm/amdgpu: RAS harvest on driver load drm/amdgpu: add ras aldebaran ras eeprom driver drm/amd/pm: increase time out value when sending msg to SMU drm/amdgpu: add DMUB outbox event IRQ source define/complete/debug flag drm/amd/pm: add the callback to get vbios bootup values for vangogh drm/radeon: Fix size overflow drm/amdgpu: Fix size overflow drm/amdgpu: move mmhub ras_func init to ip specific file ... commit 9a5e12be6a46493e9602b1714e57aaef85fbaa01 Merge: 6879e8e759bf9 97c733654ab4a Author: Mark Brown Date: Wed Apr 28 17:33:54 2021 +0100 Merge series "ASoC: Revert clk_hw_get_clk() cleanup" from Jerome Brunet : There is problem with clk_hw_get_hw(). Using it pins the clock provider to itself, making it impossible to remove the related module. Revert the two commits using this function until this gets sorted out. Jerome Brunet (2): ASoC: stm32: do not request a new clock consummer reference ASoC: da7219: do not request a new clock consummer reference sound/soc/codecs/da7219.c | 5 +---- sound/soc/stm/stm32_sai_sub.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) -- 2.31.1 commit 3aa139aa9fdc138a84243dc49dc18d9b40e1c6e4 Merge: acd3d28594536 0b276e470a4d4 Author: Linus Torvalds Date: Wed Apr 28 09:24:36 2021 -0700 Merge tag 'media/v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - addition of a maintainer's profile for the media subsystem - addition of i.MX8 IP support - qcom/camss gained support for hardware version Titan 170 - new RC keymaps - Lots of other improvements, cleanups and bug fixes * tag 'media/v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (488 commits) media: coda: fix macroblocks count control usage media: rkisp1: params: fix wrong bits settings media: cedrus: Fix H265 status definitions media: meson-ge2d: fix rotation parameters media: v4l2-ctrls: fix reference to freed memory media: venus : hfi: add venus image info into smem media: venus: Fix internal buffer size calculations for v6. media: venus: helpers: keep max bandwidth when mbps exceeds the supported range media: venus: fix hw overload error log condition media: venus: core: correct firmware name for sm8250 media: venus: core,pm: fix potential infinite loop media: venus: core: Fix kerneldoc warnings media: gscpa/stv06xx: fix memory leak media: cx25821: remove unused including media: staging: media/meson: remove redundant dev_err call media: adv7842: support 1 block EDIDs, fix clearing EDID media: adv7842: configure all pads media: allegro: change kernel-doc comment blocks to normal comments media: camss: ispif: Remove redundant dev_err call in msm_ispif_subdev_init() media: i2c: rdamc21: Fix warning on u8 cast ... commit 41f48a29ebd5ce944e412f491f1876b5abeff1d6 Author: Geert Uytterhoeven Date: Tue Apr 27 16:38:42 2021 +0200 spi: altera: Make SPI_ALTERA_CORE invisible The SPI_ALTERA_CORE config symbol controls compilation of the Altera SPI Controller core code. It is already selected by all of its users, so there is no reason to make it visible, unless compile-testing. Fixes: b0c3d9354de1f87e ("spi: altera: separate core code from platform code") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/f0cb8e66baba4506db6f42fca74dc51b76883507.1619534253.git.geert+renesas@glider.be Signed-off-by: Mark Brown commit c7299fea67696db5bd09d924d1f1080d894f92ef Author: Saravana Kannan Date: Mon Apr 26 16:56:38 2021 -0700 spi: Fix spi device unregister flow When an SPI device is unregistered, the spi->controller->cleanup() is called in the device's release callback. That's wrong for a couple of reasons: 1. spi_dev_put() can be called before spi_add_device() is called. And it's spi_add_device() that calls spi_setup(). This will cause clean() to get called without the spi device ever being setup. 2. There's no guarantee that the controller's driver would be present by the time the spi device's release function gets called. 3. It also causes "sleeping in atomic context" stack dump[1] when device link deletion code does a put_device() on the spi device. Fix these issues by simply moving the cleanup from the device release callback to the actual spi_unregister_device() function. [1] - https://lore.kernel.org/lkml/CAHp75Vc=FCGcUyS0v6fnxme2YJ+qD+Y-hQDQLa2JhWNON9VmsQ@mail.gmail.com/ Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20210426235638.1285530-1-saravanak@google.com Signed-off-by: Mark Brown commit 6879e8e759bf9e05eaee85e32ca1a936e6b46da1 Author: Vijendar Mukunda Date: Wed Apr 28 01:53:31 2021 +0530 ASoC: amd: fix for pcm_read() error Below phython script throwing pcm_read() error. import subprocess p = subprocess.Popen(["aplay -t raw -D plughw:1,0 /dev/zero"], shell=True) subprocess.call(["arecord -Dhw:1,0 --dump-hw-params"], shell=True) subprocess.call(["arecord -Dhw:1,0 -fdat -d1 /dev/null"], shell=True) p.kill() Handling ACP global external interrupt enable register causing this issue. This register got updated wrongly when there is active stream causing interrupts disabled for active stream. Refactored code to handle enabling and disabling external interrupts. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1619555017-29858-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 97c733654ab4a5ac910216b4b74e605acf3e1cce Author: Jerome Brunet Date: Wed Apr 28 14:26:32 2021 +0200 ASoC: da7219: do not request a new clock consummer reference This reverts commit 12f8127fe9e6154dd4197df97e44f3fd67583071. There is problem with clk_hw_get_hw(). Using it pins the clock provider to itself, making it impossible to remove the module. Revert commit 12f8127fe9e6 ("ASoC: da7219: properly get clk from the provider") until this gets sorted out. Reported-by: Pierre-Louis Bossart Signed-off-by: Jerome Brunet Tested-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210428122632.46244-3-jbrunet@baylibre.com Signed-off-by: Mark Brown commit a0695853e5906a9558eef9f79856e07659b7a1e6 Author: Jerome Brunet Date: Wed Apr 28 14:26:31 2021 +0200 ASoC: stm32: do not request a new clock consummer reference This reverts commit 65d1cce726d4912793d0a84c55ecdb0ef5832130. There is problem with clk_hw_get_hw(). Using it pins the clock provider to itself, making it impossible to remove the module. Revert commit 65d1cce726d4 ("ASoC: stm32: properly get clk from the provider") until this gets sorted out. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210428122632.46244-2-jbrunet@baylibre.com Signed-off-by: Mark Brown commit e58a41c2226847fb1446f3942dc1b55af8acfe02 Author: Guo Ren Date: Wed Apr 21 16:03:28 2021 +0800 csky: uaccess.h: Coding convention with asm generic Using asm-generic/uaccess.h to prevent duplicated code: - Add user_addr_max which mentioned in generic uaccess.h - Remove custom definitions of KERNEL/USER_DS, get/set_fs, uaccess_kerenl - Using generic extable.h instead of custom definitions in uaccess.h Change v2: - Fixup tinyconfig compile error, "__put_user_bad" - Add __get_user_asm_64 Signed-off-by: Guo Ren Link: https://lore.kernel.org/linux-csky/CAK8P3a1DvsXSEDoovLk11hzNHyJi7vqNoToU+n5aFi2viZO_Uw@mail.gmail.com/T/#mbcd58a0e3450e5598974116b607589afa16a3ab7 Cc: Arnd Bergmann commit 0679d29d3e2351a1c3049c26a63ce1959cad5447 Author: Randy Dunlap Date: Sun Apr 11 09:41:04 2021 -0700 csky: fix syscache.c fallthrough warning This case of the switch statement falls through to the following case. This appears to be on purpose, so declare it as OK. ../arch/csky/mm/syscache.c: In function '__do_sys_cacheflush': ../arch/csky/mm/syscache.c:17:3: warning: this statement may fall through [-Wimplicit-fallthrough=] 17 | flush_icache_mm_range(current->mm, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | (unsigned long)addr, | ~~~~~~~~~~~~~~~~~~~~ 19 | (unsigned long)addr + bytes); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../arch/csky/mm/syscache.c:20:2: note: here 20 | case DCACHE: | ^~~~ Fixes: 997153b9a75c ("csky: Add flush_icache_mm to defer flush icache all") Signed-off-by: Randy Dunlap Signed-off-by: Guo Ren Cc: linux-csky@vger.kernel.org Cc: Arnd Bergmann commit 5256426247837feb8703625bda7fcfc824af04cf Author: Christophe Leroy Date: Fri Apr 23 13:52:10 2021 +0000 powerpc/signal32: Fix erroneous SIGSEGV on RT signal return Return of user_read_access_begin() is tested the wrong way, leading to a SIGSEGV when the user address is valid and likely an Oops when the user address is bad. Fix the test. Fixes: 887f3ceb51cd ("powerpc/signal32: Convert do_setcontext[_tm]() to user access block") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a29aadc54c93bcbf069a83615fa102ca0f59c3ae.1619185912.git.christophe.leroy@csgroup.eu commit f9cd5f91a897ea0c45d0059ceeb091cee78c6ebe Author: Nathan Chancellor Date: Mon Apr 26 13:35:18 2021 -0700 powerpc: Avoid clang uninitialized warning in __get_user_size_allowed Commit 9975f852ce1b ("powerpc/uaccess: Remove calls to __get_user_bad() and __put_user_bad()") switch to BUILD_BUG() in the default case, which leaves x uninitialized. This will not be an issue because the build will be broken in that case but clang does static analysis before it realizes the default case will be done so it warns about x being uninitialized (trimmed for brevity): In file included from mm/mprotect.c:13: In file included from ./include/linux/hugetlb.h:28: In file included from ./include/linux/mempolicy.h:16: ./include/linux/pagemap.h:772:16: warning: variable '__gu_val' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] if (unlikely(__get_user(c, uaddr) != 0)) ^~~~~~~~~~~~~~~~~~~~ ./arch/powerpc/include/asm/uaccess.h:266:2: note: expanded from macro '__get_user' __get_user_size_allowed(__gu_val, __gu_addr, __gu_size, __gu_err); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./arch/powerpc/include/asm/uaccess.h:235:2: note: expanded from macro '__get_user_size_allowed' default: BUILD_BUG(); \ ^~~~~~~ Commit 5cd29b1fd3e8 ("powerpc/uaccess: Use asm goto for get_user when compiler supports it") added an initialization for x because of the same reason. Do the same thing here so there is no warning across all versions of clang. Signed-off-by: Nathan Chancellor Acked-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1359 Link: https://lore.kernel.org/r/20210426203518.981550-1-nathan@kernel.org commit 2e6a731296be9d356fdccee9fb6ae345dad96438 Author: Takashi Iwai Date: Wed Apr 28 13:27:04 2021 +0200 ALSA: hda/conexant: Re-order CX5066 quirk table entries Just re-order the cx5066_fixups[] entries for HP devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-14-tiwai@suse.de Signed-off-by: Takashi Iwai commit defce244b01ee12534910a4544e11be5eb927d25 Author: Takashi Iwai Date: Wed Apr 28 13:27:03 2021 +0200 ALSA: hda/realtek: Remove redundant entry for ALC861 Haier/Uniwill devices The quirk entry for Uniwill ECS M31EI is with the PCI SSID device 0, which means matching with all. That is, it's essentially equivalent with SND_PCI_QUIRK_VENDOR(0x1584), which also matches with the previous entry for Haier W18 applying the very same quirk. Let's unify them with the single vendor-quirk entry. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-13-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9edeb1109d05953b2f0e24e5b2341a98c3fa78d5 Author: Takashi Iwai Date: Wed Apr 28 13:27:02 2021 +0200 ALSA: hda/realtek: Re-order ALC662 quirk table entries Just re-order the alc662_fixup_tbl[] entries for Acer and ASUS devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-12-tiwai@suse.de Signed-off-by: Takashi Iwai commit c656f747df151a0a89756a5312f4ca2116758ba4 Author: Takashi Iwai Date: Wed Apr 28 13:27:01 2021 +0200 ALSA: hda/realtek: Re-order remaining ALC269 quirk table entries Just re-order the alc269_fixup_tbl[] entries for FSC, Medion, Samsung and Lemote devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-11-tiwai@suse.de Signed-off-by: Takashi Iwai commit f552ff54c2a700616a02b038e4bf3cbf859f65b7 Author: Takashi Iwai Date: Wed Apr 28 13:27:00 2021 +0200 ALSA: hda/realtek: Re-order ALC269 Lenovo quirk table entries Just re-order the alc269_fixup_tbl[] entries for Lenovo devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-10-tiwai@suse.de Signed-off-by: Takashi Iwai commit cab561f8d4bc9b196ae20c960aa5da89fd786ab5 Author: Takashi Iwai Date: Wed Apr 28 13:26:59 2021 +0200 ALSA: hda/realtek: Re-order ALC269 Sony quirk table entries Just re-order the alc269_fixup_tbl[] entries for Sony devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-9-tiwai@suse.de Signed-off-by: Takashi Iwai commit 3cd0ed636dd19e7fbe3ebe8de8476e1718d5a8f1 Author: Takashi Iwai Date: Wed Apr 28 13:26:58 2021 +0200 ALSA: hda/realtek: Re-order ALC269 ASUS quirk table entries Just re-order the alc269_fixup_tbl[] entries for ASUS devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-8-tiwai@suse.de Signed-off-by: Takashi Iwai commit aa143ad39a52d968ac69e426d329bb74f270e6ca Author: Takashi Iwai Date: Wed Apr 28 13:26:57 2021 +0200 ALSA: hda/realtek: Re-order ALC269 Dell quirk table entries Just re-order the alc269_fixup_tbl[] entries for Dell devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-7-tiwai@suse.de Signed-off-by: Takashi Iwai commit 433f894ec7fbd3b4bf1f3187b2ddd566078c4aef Author: Takashi Iwai Date: Wed Apr 28 13:26:56 2021 +0200 ALSA: hda/realtek: Re-order ALC269 Acer quirk table entries Just re-order the alc269_fixup_tbl[] entries for Acer devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-6-tiwai@suse.de Signed-off-by: Takashi Iwai commit 45461e3b554c75ddff9703539f3711cc3dfb0422 Author: Takashi Iwai Date: Wed Apr 28 13:26:55 2021 +0200 ALSA: hda/realtek: Re-order ALC269 HP quirk table entries Just re-order the alc269_fixup_tbl[] entries for HP devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Formerly, some entries were grouped for the actual codec, but this doesn't seem reasonable to keep in that way. So now we simply keep the PCI SSID order for the whole. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-5-tiwai@suse.de Signed-off-by: Takashi Iwai commit 13e1a4cd490b959a4c72c9f4fb502ef56b190062 Author: Takashi Iwai Date: Wed Apr 28 13:26:54 2021 +0200 ALSA: hda/realtek: Re-order ALC882 Clevo quirk table entries Just re-order the alc882_fixup_tbl[] entries for Clevo devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also, user lower hex letters in the entry. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-4-tiwai@suse.de Signed-off-by: Takashi Iwai commit b7529c18feecb1af92f9db08c8e7fe446a82d96d Author: Takashi Iwai Date: Wed Apr 28 13:26:53 2021 +0200 ALSA: hda/realtek: Re-order ALC882 Sony quirk table entries Just re-order the alc882_fixup_tbl[] entries for Sony devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-3-tiwai@suse.de Signed-off-by: Takashi Iwai commit b265047ac56bad8c4f3d0c8bf9cb4e828ee0d28e Author: Takashi Iwai Date: Wed Apr 28 13:26:52 2021 +0200 ALSA: hda/realtek: Re-order ALC882 Acer quirk table entries Just re-order the alc882_fixup_tbl[] entries for Acer devices for avoiding the oversight of the duplicated or unapplied item in future. No functional changes. Also Cc-to-stable for the further patch applications. Cc: Link: https://lore.kernel.org/r/20210428112704.23967-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit c019d92457826bb7b2091c86f36adb5de08405f9 Author: Christophe JAILLET Date: Fri Apr 23 17:09:28 2021 +0200 openrisc: Fix a memory leak 'setup_find_cpu_node()' take a reference on the node it returns. This reference must be decremented when not needed anymore, or there will be a leak. Add the missing 'of_node_put(cpu)'. Note that 'setup_cpuinfo()' that also calls this function already has a correct 'of_node_put(cpu)' at its end. Fixes: 9d02a4283e9c ("OpenRISC: Boot code") Signed-off-by: Christophe JAILLET Signed-off-by: Stafford Horne commit 0c4b7cadd1ade1916a3a6dab0d13ff5665b04cae Author: Mike Marshall Date: Sun Mar 28 17:18:11 2021 -0400 Orangef: implement orangefs_readahead. Also remove open-coded readahead logic from orangefs_readpage. Signed-off-by: Mike Marshall commit a3ffcebc87480664aef7c8283394d4cf2aec327c Author: Jiapeng Chong Date: Tue Apr 27 18:26:34 2021 +0800 ALSA: usb-audio: Remove redundant assignment to len Variable len is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: sound/usb/mixer.c:2713:3: warning: Value stored to 'len' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1619519194-57806-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Takashi Iwai commit 970e3012c04c96351c413f193a9c909e6d871ce2 Author: Eckhart Mohr Date: Tue Apr 27 17:30:25 2021 +0200 ALSA: hda/realtek: Add quirk for Intel Clevo PCx0Dx This applies a SND_PCI_QUIRK(...) to the Clevo PCx0Dx barebones. This fix enables audio output over the headset jack and ensures that a microphone connected via the headset combo jack is correctly recognized when pluged in. [ Rearranged the list entries in a sorted order -- tiwai ] Signed-off-by: Eckhart Mohr Co-developed-by: Werner Sembach Signed-off-by: Werner Sembach Cc: Link: https://lore.kernel.org/r/20210427153025.451118-1-wse@tuxedocomputers.com Signed-off-by: Takashi Iwai commit 826b5f76593946ab4a91a73f7b2e3c8eed6bd77f Merge: e393cc4e9ce01 0a96c05995ef1 Author: Arnd Bergmann Date: Wed Apr 28 11:52:59 2021 +0200 Merge tag 'renesas-arm-dt-for-v5.13-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/fixes Renesas ARM DT updates for v5.13 (take three) - Fix DT schema validation errors related to CSI-2. * tag 'renesas-arm-dt-for-v5.13-tag3' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: Add port@0 node for all CSI-2 nodes to dtsi arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Fix CSI40 ports Link: https://lore.kernel.org/r/cover.1619522726.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit e393cc4e9ce015abc8a68c762dc361cdb0b0db96 Merge: 774cda6f12d5a 03f840c49207e Author: Arnd Bergmann Date: Wed Apr 28 11:49:02 2021 +0200 Merge tag 'scmi-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes ARM SCMI fixes for v5.13 A fix for very old possible ternary operation sign extention bug in the old ARM SCPI firmware driver and a cleanup to remove duplicate structure declartion in SCMI driver. * tag 'scmi-fixes-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: firmware: arm_scmi: Remove duplicate declaration of struct scmi_protocol_handle firmware: arm_scpi: Prevent the ternary sign expansion bug Link: https://lore.kernel.org/r/20210428093148.flrcowzr2dsj7byz@bogus Signed-off-by: Arnd Bergmann commit 774cda6f12d5ad11410c4cda223554c3735ee862 Author: Arnd Bergmann Date: Tue Apr 27 22:59:55 2021 +0200 dt-bindings: nvmem: mediatek: remove duplicate mt8192 line The same patch was accidentally merged twice, resulting in a duplicate line for the mt8192 SoC. Fixes: f2674c0c7488 ("dt-bindings: nvmem: mediatek: add support for MediaTek mt8192 SoC") Fixes: 2a1405a14c3a ("dt-bindings: nvmem: mediatek: add support for MediaTek mt8192 SoC") Signed-off-by: Arnd Bergmann commit fee742b502894c8ed02506fff61d7605934f93cb Author: Steve French Date: Tue Apr 27 23:07:19 2021 -0500 smb3.1.1: enable negotiating stronger encryption by default Now that stronger encryption (gcm256) has been more broadly tested, and confirmed to work with multiple servers (Windows and Azure for example), enable it by default. Although gcm256 is the second choice we offer (after gcm128 which should be faster), this change allows mounts to server which are configured to require the strongest encryption to work (without changing a module load parameter). Signed-off-by: Steve French Suggested-by: Ronnie Sahlberg Reviewed-by: Ronnie Sahlberg commit acd3d28594536e9096c1ea76c5867d8a68babef6 Merge: 1e9599dfc47a1 049ae601f3fb3 Author: Linus Torvalds Date: Tue Apr 27 19:32:55 2021 -0700 Merge tag 'fixes-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security layer fixes from James Morris: "Miscellaneous minor fixes" * tag 'fixes-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: security: commoncap: clean up kernel-doc comments security: commoncap: fix -Wstringop-overread warning commit 1e9599dfc47a171f7ba76a9651fe86baab364af5 Merge: 2a68c268a1831 de2fcb3e62013 Author: Linus Torvalds Date: Tue Apr 27 18:56:29 2021 -0700 Merge tag 'linux-kselftest-kunit-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull KUnit updates from Shuah Khan: "Several fixes and a new feature to support failure from dynamic analysis tools such as UBSAN and fake ops for testing. - a fake ops struct for testing a "free" function to complain if it was called with an invalid argument, or caught a double-free. Most return void and have no normal means of signalling failure (e.g. super_operations, iommu_ops, etc.)" * tag 'linux-kselftest-kunit-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: Documentation: kunit: add tips for using current->kunit_test kunit: fix -Wunused-function warning for __kunit_fail_current_test kunit: support failure from dynamic analysis tools kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals kunit: Match parenthesis alignment to improve code readability commit 2a68c268a18317a013961e8faf6eaabc81a94e6b Merge: 55e6be657b8d7 e75074781f173 Author: Linus Torvalds Date: Tue Apr 27 18:54:01 2021 -0700 Merge tag 'linux-kselftest-next-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull Kselftest updates from Shuah Khan: - fixes and updates to resctrl test from Fenghua Yu and Reinette Chatre - fixes to Kselftest documentation, framework - minor spelling correction in timers test * tag 'linux-kselftest-next-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (25 commits) selftests/resctrl: Change a few printed messages Documentation: kselftest: fix path to test module files selftests/resctrl: Create .gitignore to include resctrl_tests selftests/resctrl: Fix checking for < 0 for unsigned values selftests/resctrl: Fix incorrect parsing of iMC counters selftests/resctrl: Fix unmount resctrl FS selftests/resctrl: Skip the test if requested resctrl feature is not supported selftests/resctrl: Modularize resctrl test suite main() function selftests/resctrl: Don't hard code value of "no_of_bits" variable selftests/resctrl: Fix MBA/MBM results reporting format selftests/resctrl: Use resctrl/info for feature detection selftests/resctrl: Check for resctrl mount point only if resctrl FS is supported selftests/resctrl: Add config dependencies selftests/resctrl: Fix a printed message selftests/resctrl: Share show_cache_info() by CAT and CMT tests selftests/resctrl: Call kselftest APIs to log test results selftests/resctrl: Rename CQM test as CMT test selftests/resctrl: Fix missing options "-n" and "-p" selftests/resctrl: Ensure sibling CPU is not same as original CPU selftests/resctrl: Clean up resctrl features check ... commit 55e6be657b8d774d9a2e67363e5bcbbaf80fdc28 Merge: eb6bbacc46720 ffeee417d97f9 Author: Linus Torvalds Date: Tue Apr 27 18:47:42 2021 -0700 Merge branch 'for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup changes from Tejun Heo: "The only notable change is Vipin's new misc cgroup controller. This implements generic support for resources which can be controlled by simply counting and limiting the number of resource instances - ie there's X number of these on the system and this cgroup subtree can have upto Y of those. The first user is the address space IDs used for virtual machine memory encryption and expected future usages are similar - niche hardware features with concrete resource limits and simple usage models" * 'for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: use tsk->in_iowait instead of delayacct_is_task_waiting_on_io() cgroup/cpuset: fix typos in comments cgroup: misc: mark dummy misc_cg_res_total_usage() static inline svm/sev: Register SEV and SEV-ES ASIDs to the misc controller cgroup: Miscellaneous cgroup documentation. cgroup: Add misc cgroup controller commit eb6bbacc46720b8b36eb85b2cdd91b9e691959e4 Merge: 7f3d08b255d18 8df1947c71ee5 Author: Linus Torvalds Date: Tue Apr 27 18:14:38 2021 -0700 Merge tag 'livepatching-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching Pull livepatching update from Petr Mladek: - Use TIF_NOTIFY_SIGNAL infrastructure instead of the fake signal * tag 'livepatching-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure commit 7f3d08b255d1806502e45fe70ca2ba9646eb3aa1 Merge: 916a75965e523 c8dbea6df351d Author: Linus Torvalds Date: Tue Apr 27 18:09:44 2021 -0700 Merge tag 'printk-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux Pull printk updates from Petr Mladek: - Stop synchronizing kernel log buffer readers by logbuf_lock. As a result, the access to the buffer is fully lockless now. Note that printk() itself still uses locks because it tries to flush the messages to the console immediately. Also the per-CPU temporary buffers are still there because they prevent infinite recursion and serialize backtraces from NMI. All this is going to change in the future. - kmsg_dump API rework and cleanup as a side effect of the logbuf_lock removal. - Make bstr_printf() aware that %pf and %pF formats could deference the given pointer. - Show also page flags by %pGp format. - Clarify the documentation for plain pointer printing. - Do not show no_hash_pointers warning multiple times. - Update Senozhatsky email address. - Some clean up. * tag 'printk-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux: (24 commits) lib/vsprintf.c: remove leftover 'f' and 'F' cases from bstr_printf() printk: clarify the documentation for plain pointer printing kernel/printk.c: Fixed mundane typos printk: rename vprintk_func to vprintk vsprintf: dump full information of page flags in pGp mm, slub: don't combine pr_err with INFO mm, slub: use pGp to print page flags MAINTAINERS: update Senozhatsky email address lib/vsprintf: do not show no_hash_pointers message multiple times printk: console: remove unnecessary safe buffer usage printk: kmsg_dump: remove _nolock() variants printk: remove logbuf_lock printk: introduce a kmsg_dump iterator printk: kmsg_dumper: remove @active field printk: add syslog_lock printk: use atomic64_t for devkmsg_user.seq printk: use seqcount_latch for clear_seq printk: introduce CONSOLE_LOG_MAX printk: consolidate kmsg_dump_get_buffer/syslog_print_all code printk: refactor kmsg_dump_get_buffer() ... commit 916a75965e5236f9e353416a703a0f4c8de2f56c Merge: 6daa755f813e6 83fa2d13d628b Author: Linus Torvalds Date: Tue Apr 27 18:07:19 2021 -0700 Merge tag 'kgdb-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux Pull kgdb updates from Daniel Thompson: "Exclusively tidy ups this cycle. Most of them are thanks to Sumit Garg and, as it happens, the clean ups do result in a slight increase in the line count. This is due to registering kdb commands using data structures rather than function calls which, in turn, simplifies the memory management during command registration. In addition to changes to command registration we also have some dead code removal, a clearer implementation of environment variable handling and a typo fix" * tag 'kgdb-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux: kdb: Refactor env variables get/set code kernel: debug: Ordinary typo fixes in the file gdbstub.c kdb: Simplify kdb commands registration kdb: Remove redundant function definitions/prototypes commit 6daa755f813e6aa0bcc97e352666e072b1baac25 Merge: c6536676c7fe3 6f3353c2d2b3e Author: Linus Torvalds Date: Tue Apr 27 17:54:15 2021 -0700 Merge tag 's390-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Heiko Carstens: - fix buffer size for in-kernel disassembler for ebpf programs. - fix two memory leaks in zcrypt driver. - expose PCI device UID as index, including an indicator if the uid is unique. - remove some oprofile leftovers. - improve stack unwinder tests. - don't use gcc atomic builtins anymore, just like all other architectures. Even though I'm sure the current code is ok, I totally dislike that s390 is the only architecture being special here; especially considering that there was a lengthly discussion about this topic and the outcome was not to use the builtins. Therefore open-code atomic ops again with inline assembly and switch to gcc builtins as soon as other architectures are doing. - couple of other changes to atomic and cmpxchg, and use atomic-instrumented.h for KASAN. - separate zbus creation, registration, and scanning in our PCI code which allows for cleaner and easier handling. - a rather large change to the vfio-ap code to fix circular locking dependencies when updating crypto masks. - move QAOB handling from qdio layer down to drivers. - add CRW inject facility to common I/O layer. This adds debugs files which allow to generate artificial events from user space for testing purposes. - increase SCLP console line length from 80 to 320 characters to avoid odd wrapped lines. - add protected virtualization guest and host indication files, which indicate either that a guest is running in pv mode or if the hypervisor is capable of starting pv guests. - various other small fixes and improvements all over the place. * tag 's390-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (53 commits) s390/disassembler: increase ebpf disasm buffer size s390/archrandom: add parameter check for s390_arch_random_generate s390/zcrypt: fix zcard and zqueue hot-unplug memleak s390/pci: expose a PCI device's UID as its index s390/atomic,cmpxchg: always inline __xchg/__cmpxchg s390/smp: fix do_restart() prototype s390: get rid of oprofile leftovers s390/atomic,cmpxchg: make constraints work with old compilers s390/test_unwind: print test suite start/end info s390/cmpxchg: use unsigned long values instead of void pointers s390/test_unwind: add WARN if tests failed s390/test_unwind: unify error handling paths s390: update defconfigs s390/spinlock: use R constraint in inline assembly s390/atomic,cmpxchg: switch to use atomic-instrumented.h s390/cmpxchg: get rid of gcc atomic builtins s390/atomic: get rid of gcc atomic builtins s390/atomic: use proper constraints s390/atomic: move remaining inline assemblies to atomic_ops.h s390/bitops: make bitops only work on longs ... commit c6536676c7fe3f572ba55842e59c3c71c01e7fb3 Merge: e7c6e405e171f 2c88d45edbb89 Author: Linus Torvalds Date: Tue Apr 27 17:45:09 2021 -0700 Merge tag 'x86_core_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 updates from Borislav Petkov: - Turn the stack canary into a normal __percpu variable on 32-bit which gets rid of the LAZY_GS stuff and a lot of code. - Add an insn_decode() API which all users of the instruction decoder should preferrably use. Its goal is to keep the details of the instruction decoder away from its users and simplify and streamline how one decodes insns in the kernel. Convert its users to it. - kprobes improvements and fixes - Set the maximum DIE per package variable on Hygon - Rip out the dynamic NOP selection and simplify all the machinery around selecting NOPs. Use the simplified NOPs in objtool now too. - Add Xeon Sapphire Rapids to list of CPUs that support PPIN - Simplify the retpolines by folding the entire thing into an alternative now that objtool can handle alternatives with stack ops. Then, have objtool rewrite the call to the retpoline with the alternative which then will get patched at boot time. - Document Intel uarch per models in intel-family.h - Make Sub-NUMA Clustering topology the default and Cluster-on-Die the exception on Intel. * tag 'x86_core_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits) x86, sched: Treat Intel SNC topology as default, COD as exception x86/cpu: Comment Skylake server stepping too x86/cpu: Resort and comment Intel models objtool/x86: Rewrite retpoline thunk calls objtool: Skip magical retpoline .altinstr_replacement objtool: Cache instruction relocs objtool: Keep track of retpoline call sites objtool: Add elf_create_undef_symbol() objtool: Extract elf_symbol_add() objtool: Extract elf_strtab_concat() objtool: Create reloc sections implicitly objtool: Add elf_create_reloc() helper objtool: Rework the elf_rebuild_reloc_section() logic objtool: Fix static_call list generation objtool: Handle per arch retpoline naming objtool: Correctly handle retpoline thunk calls x86/retpoline: Simplify retpolines x86/alternatives: Optimize optimize_nops() x86: Add insn_decode_kernel() x86/kprobes: Move 'inline' to the beginning of the kprobe_is_ss() declaration ... commit e7c6e405e171fb33990a12ecfd14e6500d9e5cf2 Author: Linus Torvalds Date: Tue Apr 27 17:05:53 2021 -0700 Fix misc new gcc warnings It seems like Fedora 34 ends up enabling a few new gcc warnings, notably "-Wstringop-overread" and "-Warray-parameter". Both of them cause what seem to be valid warnings in the kernel, where we have array size mismatches in function arguments (that are no longer just silently converted to a pointer to element, but actually checked). This fixes most of the trivial ones, by making the function declaration match the function definition, and in the case of intel_pm.c, removing the over-specified array size from the argument declaration. At least one 'stringop-overread' warning remains in the i915 driver, but that one doesn't have the same obvious trivial fix, and may or may not actually be indicative of a bug. [ It was a mistake to upgrade one of my machines to Fedora 34 while being busy with the merge window, but if this is the extent of the compiler upgrade problems, things are better than usual - Linus ] Signed-off-by: Linus Torvalds commit 3ba2d41dca14e1afbea0c41ba8164064df407c8b Merge: bbc3b403b0962 0ec3815a8c1d8 Author: Stephen Boyd Date: Tue Apr 27 16:34:56 2021 -0700 Merge branch 'clk-ralink' into clk-next - Proper clk driver for Mediatek MT7621 SoCs * clk-ralink: MAINTAINERS: add MT7621 CLOCK maintainer staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk' staging: mt7621-dts: make use of new 'mt7621-clk' clk: ralink: add clock driver for mt7621 SoC dt: bindings: add mt7621-sysc device tree binding documentation dt-bindings: clock: add dt binding header for mt7621 clocks commit bbc3b403b096220850b82e245a1e5f09b8b216a2 Merge: c3ad321932ed2 5c55197cbf9bf fdac035ed0ea4 394cdb69a3c30 89bf9bb75e5b5 f6b1340dc751a Author: Stephen Boyd Date: Tue Apr 27 16:34:44 2021 -0700 Merge branches 'clk-imx', 'clk-samsung', 'clk-zynq', 'clk-rockchip' and 'clk-uniphier' into clk-next - Simplify Zynq Kconfig dependencies * clk-imx: clk: imx: Reference preceded by free clk: imx8mq: Correct the pcie1 sels clk: imx8mp: Remove the none exist pcie clocks clk: imx: Fix reparenting of UARTs not associated with stdout * clk-samsung: clk: samsung: Remove redundant dev_err calls clk: exynos7: Mark aclk_fsys1_200 as critical * clk-zynq: clk: zynqmp: pll: add set_pll_mode to check condition in zynqmp_pll_enable clk: zynqmp: move zynqmp_pll_set_mode out of round_rate callback clk: zynqmp: Drop dependency on ARCH_ZYNQMP clk: zynqmp: Enable the driver if ZYNQMP_FIRMWARE is selected * clk-rockchip: clk: rockchip: drop MODULE_ALIAS from rk3399 clock controller clk: rockchip: drop parenthesis from ARM || COMPILE_TEST depends clk: rockchip: add clock controller for rk3568 clk: rockchip: support more core div setting dt-binding: clock: Document rockchip, rk3568-cru bindings clk: rockchip: add dt-binding header for rk3568 * clk-uniphier: clk: uniphier: Fix potential infinite loop commit c3ad321932ed29b85ceed38a716a6e063e996ff5 Merge: e27453adcadd7 3338fe50aa6df 52d1a8da40b3c 7c09e605553a4 b2150cab9a97c Author: Stephen Boyd Date: Tue Apr 27 16:34:28 2021 -0700 Merge branches 'clk-cleanup', 'clk-renesas', 'clk-socfpga', 'clk-allwinner' and 'clk-qcom' into clk-next - Use clk_hw pointers in socfpga driver - Cleanup parent data in qcom clk drivers * clk-cleanup: clk: Drop double "if" in clk_core_determine_round_nolock() comment clk: at91: Trivial typo fixes in the file sama7g5.c clk: use clk_core_enable_lock() a bit more * clk-renesas: clk: renesas: Zero init clk_init_data clk: renesas: Couple of spelling fixes clk: renesas: r8a779a0: Add CMT clocks clk: renesas: r8a7795: Add TMU clocks clk: renesas: r8a779a0: Add TSC clock clk: renesas: r8a779a0: Add TMU clocks clk: renesas: r8a77965: Add DAB clock clk: renesas: r8a77990: Add DAB clock * clk-socfpga: clk: socfpga: remove redundant initialization of variable div clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return clk: socfpga: Fix code formatting clk: socfpga: Convert to s10/agilex/n5x to use clk_hw clk: socfpga: arria10: convert to use clk_hw clk: socfpga: use clk_hw_register for a5/c5 * clk-allwinner: clk: sunxi: Demote non-conformant kernel-doc headers clk: sunxi-ng: v3s: use sigma-delta modulation for audio-pll * clk-qcom: (45 commits) clk: qcom: rpmh: add support for SDX55 rpmh IPA clock clk: qcom: gcc-sdm845: get rid of the test clock clk: qcom: convert SDM845 Global Clock Controller to parent_data dt-bindings: clock: separate SDM845 GCC clock bindings clk: qcom: apss-ipq-pll: Add missing MODULE_DEVICE_TABLE clk: qcom: a53-pll: Add missing MODULE_DEVICE_TABLE clk: qcom: a7-pll: Add missing MODULE_DEVICE_TABLE clk: qcom: gcc-sm8350: use ARRAY_SIZE instead of specifying num_parents clk: qcom: gcc-sm8250: use ARRAY_SIZE instead of specifying num_parents clk: qcom: gcc-sm8150: use ARRAY_SIZE instead of specifying num_parents clk: qcom: gcc-sc8180x: use ARRAY_SIZE instead of specifying num_parents clk: qcom: gcc-sc7180: use ARRAY_SIZE instead of specifying num_parents clk: qcom: videocc-sm8250: use parent_hws where possible clk: qcom: videocc-sm8150: use parent_hws where possible clk: qcom: gpucc-sm8250: use parent_hws where possible clk: qcom: gpucc-sm8150: use parent_hws where possible clk: qcom: gcc-sm8350: use parent_hws where possible clk: qcom: gcc-sm8250: use parent_hws where possible clk: qcom: gcc-sm8150: use parent_hws where possible clk: qcom: gcc-sdx55: use parent_hws where possible ... commit 3733bfbbdd28f7a65340d0058d15d15190a4944a Author: Pedro Tammela Date: Sat Apr 24 18:45:10 2021 -0300 bpf, selftests: Update array map tests for per-cpu batched ops Follows the same logic as the hashtable tests. Signed-off-by: Pedro Tammela Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210424214510.806627-3-pctammela@mojatatu.com commit f008d732ab181fd00d95c2e8a6e479d2f7c634b3 Author: Pedro Tammela Date: Sat Apr 24 18:45:09 2021 -0300 bpf: Add batched ops support for percpu array Uses the already in-place infrastructure provided by the 'generic_map_*_batch' functions. No tweak was needed as it transparently handles the percpu variant. As arrays don't have delete operations, let it return a error to user space (default behaviour). Suggested-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210424214510.806627-2-pctammela@mojatatu.com commit 05eb3791a0deb79027c7f392342531cb1c884ede Merge: 2551c2d19c04c 48cac3f4a96dd Author: Alexei Starovoitov Date: Tue Apr 27 15:50:15 2021 -0700 Merge branch 'Implement formatted output helpers with bstr_printf' Florent Revest says: ==================== BPF's formatted output helpers are currently implemented with snprintf-like functions which use variadic arguments. The types of all arguments need to be known at compilation time. BPF_CAST_FMT_ARG casts all arguments to the size they should be (known at runtime), but the C type promotion rules cast them back to u64s. On 32 bit architectures, this can cause misaligned va_lists and generate mangled output. This series refactors these helpers to avoid variadic arguments. It uses a "binary printf" instead, where arguments are passed in a buffer constructed at runtime. --- Changes in v2: - Reworded the second patch's description to better describe how arguments get mangled on 32 bit architectures ==================== Signed-off-by: Alexei Starovoitov commit 48cac3f4a96ddf08df8e53809ed066de0dc93915 Author: Florent Revest Date: Tue Apr 27 19:43:13 2021 +0200 bpf: Implement formatted output helpers with bstr_printf BPF has three formatted output helpers: bpf_trace_printk, bpf_seq_printf and bpf_snprintf. Their signatures specify that all arguments are provided from the BPF world as u64s (in an array or as registers). All of these helpers are currently implemented by calling functions such as snprintf() whose signatures take a variable number of arguments, then placed in a va_list by the compiler to call vsnprintf(). "d9c9e4db bpf: Factorize bpf_trace_printk and bpf_seq_printf" introduced a bpf_printf_prepare function that fills an array of u64 sanitized arguments with an array of "modifiers" which indicate what the "real" size of each argument should be (given by the format specifier). The BPF_CAST_FMT_ARG macro consumes these arrays and casts each argument to its real size. However, the C promotion rules implicitely cast them all back to u64s. Therefore, the arguments given to snprintf are u64s and the va_list constructed by the compiler will use 64 bits for each argument. On 64 bit machines, this happens to work well because 32 bit arguments in va_lists need to occupy 64 bits anyway, but on 32 bit architectures this breaks the layout of the va_list expected by the called function and mangles values. In "88a5c690b6 bpf: fix bpf_trace_printk on 32 bit archs", this problem had been solved for bpf_trace_printk only with a "horrid workaround" that emitted multiple calls to trace_printk where each call had different argument types and generated different va_list layouts. One of the call would be dynamically chosen at runtime. This was ok with the 3 arguments that bpf_trace_printk takes but bpf_seq_printf and bpf_snprintf accept up to 12 arguments. Because this approach scales code exponentially, it is not a viable option anymore. Because the promotion rules are part of the language and because the construction of a va_list is an arch-specific ABI, it's best to just avoid variadic arguments and va_lists altogether. Thankfully the kernel's snprintf() has an alternative in the form of bstr_printf() that accepts arguments in a "binary buffer representation". These binary buffers are currently created by vbin_printf and used in the tracing subsystem to split the cost of printing into two parts: a fast one that only dereferences and remembers values, and a slower one, called later, that does the pretty-printing. This patch refactors bpf_printf_prepare to construct binary buffers of arguments consumable by bstr_printf() instead of arrays of arguments and modifiers. This gets rid of BPF_CAST_FMT_ARG and greatly simplifies the bpf_printf_prepare usage but there are a few gotchas that change how bpf_printf_prepare needs to do things. Currently, bpf_printf_prepare uses a per cpu temporary buffer as a generic storage for strings and IP addresses. With this refactoring, the temporary buffers now holds all the arguments in a structured binary format. To comply with the format expected by bstr_printf, certain format specifiers also need to be pre-formatted: %pB and %pi6/%pi4/%pI4/%pI6. Because vsnprintf subroutines for these specifiers are hard to expose, we pre-format these arguments with calls to snprintf(). Reported-by: Rasmus Villemoes Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210427174313.860948-3-revest@chromium.org commit f42c35ea3b137c01b3e073232131674be8efb924 Author: Krzysztof Wilczyński Date: Fri Apr 16 20:58:39 2021 +0000 PCI/sysfs: Convert "reset" to static attribute The "reset" sysfs attribute allows for resetting a PCI function. Previously it was dynamically created either by pci_bus_add_device() or the pci_sysfs_init() initcall, but since it doesn't need to be created or removed dynamically, we can use a static attribute so the device model takes care of addition and removal automatically. Convert "reset" to a static attribute and use the .is_visible() callback to check whether the device supports reset. Clear reset_fn in pci_stop_dev() instead of pci_remove_capabilities_sysfs() since we no longer explicitly remove the "reset" sysfs file. [bhelgaas: commit log] Suggested-by: Oliver O'Halloran Link: https://lore.kernel.org/r/20210416205856.3234481-4-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 527139d738d7f2e9f929c752eebf3cbf0f74c754 Author: Krzysztof Wilczyński Date: Fri Apr 16 20:58:38 2021 +0000 PCI/sysfs: Convert "rom" to static attribute The "rom" sysfs attribute allows access to the PCI Option ROM. Previously it was dynamically created either by pci_bus_add_device() or the pci_sysfs_init() initcall, but since it doesn't need to be created or removed dynamically, we can use a static attribute so the device model takes care of addition and removal automatically. Convert "rom" to a static attribute and use the .is_bin_visible() callback to set the correct object size based on the ROM size. Remove "rom_attr" from the struct pci_dev since it is no longer needed. This attribute was added in the pre-git era by https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/drivers/pci/pci-sysfs.c?id=f6d553444da2 [bhelgaas: commit log] Suggested-by: Oliver O'Halloran Link: https://lore.kernel.org/r/20210416205856.3234481-3-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit e1d3f3268b0e512ceb811dd4765e476626bde71c Author: Krzysztof Wilczyński Date: Fri Apr 16 20:58:37 2021 +0000 PCI/sysfs: Convert "config" to static attribute The "config" sysfs attribute allows access to either the legacy (PCI and PCI-X Mode 1) or the extended (PCI-X Mode 2 and PCIe) device configuration space. Previously it was dynamically created either when a device was added (for hot-added devices) or via a late_initcall (for devices present at boot): pci_bus_add_devices pci_bus_add_device pci_create_sysfs_dev_files if (!sysfs_initialized) return sysfs_create_bin_file # for hot-added devices pci_sysfs_init # late_initcall sysfs_initialized = 1 for_each_pci_dev(pdev) pci_create_sysfs_dev_files(pdev) # for devices present at boot And dynamically removed when the PCI device is stopped and removed: pci_stop_bus_device pci_stop_dev pci_remove_sysfs_dev_files sysfs_remove_bin_file This attribute does not need to be created or removed dynamically, so we can use a static attribute so the device model takes care of addition and removal automatically. Convert "config" to a static attribute and use the .is_bin_visible() callback to set the correct object size (either 256 bytes or 4 KiB) at runtime. The pci_sysfs_init() scheme was added in the pre-git era by https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/drivers/pci/pci-sysfs.c?id=f6d553444da2 [bhelgaas: commit log] Suggested-by: Oliver O'Halloran Link: https://lore.kernel.org/r/CAOSf1CHss03DBSDO4PmTtMp0tCEu5kScn704ZEwLKGXQzBfqaA@mail.gmail.com Link: https://lore.kernel.org/r/20210416205856.3234481-2-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 76d6a13383b8e3ff20a9cf52aa9c3de39e485632 Author: Florent Revest Date: Tue Apr 27 19:43:12 2021 +0200 seq_file: Add a seq_bprintf function Similarly to seq_buf_bprintf in lib/seq_buf.c, this function writes a printf formatted string with arguments provided in a "binary representation" built by functions such as vbin_printf. Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210427174313.860948-2-revest@chromium.org commit 99ba0ea616aabdc8e26259fd722503e012199a76 Author: Ignat Korchagin Date: Tue Apr 27 22:09:38 2021 +0100 sfc: adjust efx->xdp_tx_queue_count with the real number of initialized queues efx->xdp_tx_queue_count is initially initialized to num_possible_cpus() and is later used to allocate and traverse efx->xdp_tx_queues lookup array. However, we may end up not initializing all the array slots with real queues during probing. This results, for example, in a NULL pointer dereference, when running "# ethtool -S ", similar to below [2570283.664955][T4126959] BUG: kernel NULL pointer dereference, address: 00000000000000f8 [2570283.681283][T4126959] #PF: supervisor read access in kernel mode [2570283.695678][T4126959] #PF: error_code(0x0000) - not-present page [2570283.710013][T4126959] PGD 0 P4D 0 [2570283.721649][T4126959] Oops: 0000 [#1] SMP PTI [2570283.734108][T4126959] CPU: 23 PID: 4126959 Comm: ethtool Tainted: G O 5.10.20-cloudflare-2021.3.1 #1 [2570283.752641][T4126959] Hardware name: [2570283.781408][T4126959] RIP: 0010:efx_ethtool_get_stats+0x2ca/0x330 [sfc] [2570283.796073][T4126959] Code: 00 85 c0 74 39 48 8b 95 a8 0f 00 00 48 85 d2 74 2d 31 c0 eb 07 48 8b 95 a8 0f 00 00 48 63 c8 49 83 c4 08 83 c0 01 48 8b 14 ca <48> 8b 92 f8 00 00 00 49 89 54 24 f8 39 85 a0 0f 00 00 77 d7 48 8b [2570283.831259][T4126959] RSP: 0018:ffffb79a77657ce8 EFLAGS: 00010202 [2570283.845121][T4126959] RAX: 0000000000000019 RBX: ffffb799cd0c9280 RCX: 0000000000000018 [2570283.860872][T4126959] RDX: 0000000000000000 RSI: ffff96dd970ce000 RDI: 0000000000000005 [2570283.876525][T4126959] RBP: ffff96dd86f0a000 R08: ffff96dd970ce480 R09: 000000000000005f [2570283.892014][T4126959] R10: ffffb799cd0c9fff R11: ffffb799cd0c9000 R12: ffffb799cd0c94f8 [2570283.907406][T4126959] R13: ffffffffc11b1090 R14: ffff96dd970ce000 R15: ffffffffc11cd66c [2570283.922705][T4126959] FS: 00007fa7723f8740(0000) GS:ffff96f51fac0000(0000) knlGS:0000000000000000 [2570283.938848][T4126959] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [2570283.952524][T4126959] CR2: 00000000000000f8 CR3: 0000001a73e6e006 CR4: 00000000007706e0 [2570283.967529][T4126959] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [2570283.982400][T4126959] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [2570283.997308][T4126959] PKRU: 55555554 [2570284.007649][T4126959] Call Trace: [2570284.017598][T4126959] dev_ethtool+0x1832/0x2830 Fix this by adjusting efx->xdp_tx_queue_count after probing to reflect the true value of initialized slots in efx->xdp_tx_queues. Signed-off-by: Ignat Korchagin Fixes: e26ca4b53582 ("sfc: reduce the number of requested xdp ev queues") Cc: # 5.12.x Signed-off-by: David S. Miller commit 75258586793efc521e5dd52a5bf6c7a4cf7002be Author: Lv Yunlong Date: Tue Apr 27 09:22:58 2021 -0700 net:nfc:digital: Fix a double free in digital_tg_recv_dep_req In digital_tg_recv_dep_req, it calls nfc_tm_data_received(..,resp). If nfc_tm_data_received() failed, the callee will free the resp via kfree_skb() and return error. But in the exit branch, the resp will be freed again. My patch sets resp to NULL if nfc_tm_data_received() failed, to avoid the double free. Fixes: 1c7a4c24fbfd9 ("NFC Digital: Add target NFC-DEP support") Signed-off-by: Lv Yunlong Signed-off-by: David S. Miller commit 0711459095bc9ddb5a0086146d2751e6d5412cbf Merge: 69e16d01d1de4 7acc0bb490c85 Author: David S. Miller Date: Tue Apr 27 15:32:54 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Add support for the catch-all set element. This special element can be used to define a default action to be applied in case that the set lookup returns no matching element. 2) Fix incorrect #ifdef dependencies in the nftables cgroupsv2 support, from Arnd Bergmann. ==================== Signed-off-by: David S. Miller commit 61ca49a9105faefa003b37542cebad8722f8ae22 Author: Ilya Dryomov Date: Mon Apr 26 19:11:37 2021 +0200 libceph: don't set global_id until we get an auth ticket With the introduction of enforcing mode, setting global_id as soon as we get it in the first MAuth reply will result in EACCES if the connection is reset before we get the second MAuth reply containing an auth ticket -- because on retry we would attempt to reclaim that global_id with no auth ticket at hand. Neither ceph_auth_client nor ceph_mon_client depend on global_id being set ealy, so just delay the setting until we get and process the second MAuth reply. While at it, complain if the monitor sends a zero global_id or changes our global_id as the session is likely to fail after that. Cc: stable@vger.kernel.org # needs backporting for < 5.11 Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil commit 7807dafda21a549403d922da98dde0ddfeb70d08 Author: Ilya Dryomov Date: Wed Apr 14 10:38:40 2021 +0200 libceph: bump CephXAuthenticate encoding version A dummy v3 encoding (exactly the same as v2) was introduced so that the monitors can distinguish broken clients that may not include their auth ticket in CEPHX_GET_AUTH_SESSION_KEY request on reconnects, thus failing to prove previous possession of their global_id (one part of CVE-2021-20288). The kernel client has always included its auth ticket, so it is compatible with enforcing mode as is. However we want to bump the encoding version to avoid having to authenticate twice on the initial connect -- all legacy (CephXAuthenticate < v3) are now forced do so in order to expose insecure global_id reclaim. Marking for stable since at least for 5.11 and 5.12 it is trivial (v2 -> v3). Cc: stable@vger.kernel.org # 5.11+ URL: https://tracker.ceph.com/issues/50452 Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil commit d4f6b31d721779d91b5e2f8072478af73b196c34 Author: Jeff Layton Date: Thu Apr 1 13:55:11 2021 -0400 ceph: don't allow access to MDS-private inodes The MDS reserves a set of inodes for its own usage, and these should never be accessible to clients. Add a new helper to vet a proposed inode number against that range, and complain loudly and refuse to create or look it up if it's in it. Also, ensure that the MDS doesn't try to delegate inodes that are in that range or lower. Print a warning if it does, and don't save the range in the xarray. URL: https://tracker.ceph.com/issues/49922 Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 2d6795fbb8c34ed5eb44db2a99960614424585f8 Author: Jeff Layton Date: Fri Apr 9 15:58:35 2021 -0400 ceph: fix up some bare fetches of i_size We need to use i_size_read(), which properly handles the torn read case on 32-bit arches. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 8ff2d290c8ce77c8e30d9b08c13d87cd5688d7e1 Author: Jeff Layton Date: Mon Apr 5 10:40:56 2021 -0400 ceph: convert some PAGE_SIZE invocations to thp_size() Start preparing to allow the use of THPs in the pagecache with ceph by making it use thp_size() in lieu of PAGE_SIZE in the appropriate places. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit e7f72952508ac4354f9bec0607ac8a200d050e65 Author: Yanhu Cao Date: Fri Aug 28 09:28:44 2020 +0800 ceph: support getting ceph.dir.rsnaps vxattr Add support for grabbing the rsnaps value out of the inode info in traces, and exposing that via ceph.dir.rsnaps xattr. Signed-off-by: Yanhu Cao Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit e72968e15b297a51dcefe93a95e875dcefe6c4aa Author: Jeff Layton Date: Mon Apr 5 12:19:35 2021 -0400 ceph: drop pinned_page parameter from ceph_get_caps All of the existing callers that don't set this to NULL just drop the page reference at some arbitrary point later in processing. There's no point in keeping a page reference that we don't use, so just drop the reference immediately after checking the Uptodate flag. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 1775c7ddacfcea29051c67409087578f8f4d751b Author: Jeff Layton Date: Fri Mar 26 09:21:53 2021 -0400 ceph: fix inode leak on getattr error in __fh_to_dentry Fixes: 878dabb64117 ("ceph: don't return -ESTALE if there's still an open file") Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit e9b2250156c381b0973ea6ec3890fe8706426ecc Author: Jeff Layton Date: Tue Jan 26 11:49:54 2021 -0500 ceph: only check pool permissions for regular files There is no need to do a ceph_pool_perm_check() on anything that isn't a regular file, as the MDS is what handles talking to the OSD in those cases. Just return 0 if it's not a regular file. Reported-by: Luis Henriques Signed-off-by: Jeff Layton Reviewed-by: Xiubo Li Signed-off-by: Ilya Dryomov commit 3d8b6987a276f4292b5b71f4df8fe34129ab9e5d Author: Xiubo Li Date: Wed Mar 24 13:08:25 2021 +0800 ceph: send opened files/pinned caps/opened inodes metrics to MDS daemon For the old ceph version, if it received this metric info, it will just ignore them. URL: https://tracker.ceph.com/issues/46866 Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit fbd47ddc5e887571ee39f0d6b47c6155f2257f55 Author: Xiubo Li Date: Mon Mar 22 20:28:51 2021 +0800 ceph: avoid counting the same request twice or more If the request will retry, skip updating the latency metric. Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 8ae99ae2b40766a73026d5793942b4fea6d9ed31 Author: Xiubo Li Date: Mon Mar 22 20:28:49 2021 +0800 ceph: rename the metric helpers Signed-off-by: Xiubo Li Reviewed-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 54b026b456d08dfb6f19d37ae07b809004dc4b57 Author: Jeff Layton Date: Tue Mar 23 12:18:19 2021 -0400 ceph: fix kerneldoc copypasta over ceph_start_io_direct Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 379fc7fad0ae6ed5ceefd39b8a7a37e83a63c25e Author: Jeff Layton Date: Tue Mar 23 15:16:52 2021 -0400 ceph: use attach/detach_page_private for tracking snap context There is some ambiguity around the use of PagePrivate. It's generally expected in core code that if PagePrivate is set then you have a reference to it. It's not clear that ceph always does (and I believe it may not). Change ceph to use attach/detach_page_private so that we keep a reference to the page until the snap context is detached. Link: https://lore.kernel.org/ceph-devel/2503810.1616508988@warthog.procyon.org.uk/T/#mf29e5abbb0ec8035cde0de30778690de7d956f84 Reported-by: David Howells Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit aa60cfc3f7ee32766766f71e6bfbea963b4f94bc Author: Jeff Layton Date: Mon Mar 1 08:01:54 2021 -0500 ceph: don't use d_add in ceph_handle_snapdir It's possible ceph_get_snapdir could end up finding a (disconnected) inode that already exists in the cache. Change the prototype for ceph_handle_snapdir to return a dentry pointer and have it use d_splice_alias so we don't end up with an aliased dentry in the cache. Reported-by: Al Viro Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit d3c51ae1b8cce5bdaf91a1ce32b33cf5626075dc Author: Jeff Layton Date: Mon Mar 1 07:38:01 2021 -0500 ceph: don't clobber i_snap_caps on non-I_NEW inode We want the snapdir to mirror the non-snapped directory's attributes for most things, but i_snap_caps represents the caps granted on the snapshot directory by the MDS itself. A misbehaving MDS could issue different caps for the snapdir and we lose them here. Only reset i_snap_caps when the inode is I_NEW. Also, move the setting of i_op and i_fop inside the if block since they should never change anyway. Reported-by: Al Viro Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit fcaddb1d851bf69c94b3046227341d9684e276b1 Author: Gustavo A. R. Silva Date: Fri Mar 5 03:59:23 2021 -0600 ceph: fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break and a goto statements instead of just letting the code fall through to the next case. URL: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Ilya Dryomov Signed-off-by: Ilya Dryomov commit 49870056005ca9387e5ee31451991491f99cc45f Author: Jeff Layton Date: Thu Jul 9 14:43:23 2020 -0400 ceph: convert ceph_readpages to ceph_readahead Convert ceph_readpages to ceph_readahead and make it use netfs_readahead. With this we can rip out a lot of the old readpage/readpages infrastructure. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit d801327d9500c74628b65121eedbdb31441c58c9 Author: Jeff Layton Date: Fri Jun 5 10:43:21 2020 -0400 ceph: convert ceph_write_begin to netfs_write_begin Convert ceph_write_begin to use the netfs_write_begin helper. Most of the ops we need for it are already in place from the readpage conversion but we do add a new check_write_begin op since ceph needs to be able to vet whether there is an incompatible writeback already in flight before reading in the page. With this, we can also remove the old ceph_do_readpage helper. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit f0702876e152f0443911514aec8b2bf563a2432b Author: Jeff Layton Date: Mon Jun 1 10:10:21 2020 -0400 ceph: convert ceph_readpage to netfs_readpage Have the ceph KConfig select NETFS_SUPPORT. Add a new netfs ops structure and the operations for it. Convert ceph_readpage to use the new netfs_readpage helper. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 10a7052c7868bc7bc72d947f5aac6f768928db87 Author: Jeff Layton Date: Thu Jan 21 18:05:37 2021 -0500 ceph: fix fscache invalidation Ensure that we invalidate the fscache whenever we invalidate the pagecache. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 7c46b31809337df12a538239e6caa41df7c7deec Author: Jeff Layton Date: Thu Jan 21 16:27:14 2021 -0500 ceph: rework PageFsCache handling With the new fscache API, the PageFsCache bit now indicates that the page is being written to the cache and shouldn't be modified or released until it's finished. Change releasepage and invalidatepage to wait on that bit before returning. Also define FSCACHE_USE_NEW_IO_API so that we opt into the new fscache API. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit e7df4524cd9a6a006f9e12f3d908e5af69dfa145 Author: Jeff Layton Date: Thu Jan 21 12:32:05 2021 -0500 ceph: rip out old fscache readpage handling With the new netfs read helper functions, we won't need a lot of this infrastructure as it handles the pagecache pages itself. Rip out the read handling for now, and much of the old infrastructure that deals in individual pages. The cookie handling is mostly unchanged, however. Signed-off-by: Jeff Layton Signed-off-by: Ilya Dryomov commit 69e16d01d1de4f1249869de342915f608feb55d5 Author: Gong, Sishuai Date: Tue Apr 27 15:04:24 2021 +0000 net: fix a concurrency bug in l2tp_tunnel_register() l2tp_tunnel_register() registers a tunnel without fully initializing its attribute. This can allow another kernel thread running l2tp_xmit_core() to access the uninitialized data and then cause a kernel NULL pointer dereference error, as shown below. Thread 1 Thread 2 //l2tp_tunnel_register() list_add_rcu(&tunnel->list, &pn->l2tp_tunnel_list); //pppol2tp_connect() tunnel = l2tp_tunnel_get(sock_net(sk), info.tunnel_id); // Fetch the new tunnel ... //l2tp_xmit_core() struct sock *sk = tunnel->sock; ... bh_lock_sock(sk); //Null pointer error happens tunnel->sock = sk; Fix this bug by initializing tunnel->sock before adding the tunnel into l2tp_tunnel_list. Reviewed-by: Cong Wang Signed-off-by: Sishuai Gong Reported-by: Sishuai Gong Signed-off-by: David S. Miller commit 6fd6c483e7abf0f67d02d9a49b217efcd01314f4 Author: Jiapeng Chong Date: Tue Apr 27 18:32:22 2021 +0800 net/smc: Remove redundant assignment to rc Variable rc is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: net/smc/af_smc.c:1079:3: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit ad542fb7f2e2bb30c06381e77d4b29e895576ddc Author: Jiapeng Chong Date: Tue Apr 27 18:30:56 2021 +0800 mpls: Remove redundant assignment to err Variable err is set to -ENOMEM but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: net/mpls/af_mpls.c:1022:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 2342eb1afe00586a018536c4bf9e04d7aa4bf63e Author: Jiapeng Chong Date: Tue Apr 27 18:29:48 2021 +0800 llc2: Remove redundant assignment to rc Variable rc is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: net/llc/llc_station.c:86:2: warning: Value stored to 'rc' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 3afef8c7aa2de3574021c848b5f7c62687e6b166 Author: Jiapeng Chong Date: Tue Apr 27 18:28:22 2021 +0800 net/tls: Remove redundant initialization of record record is being initialized to ctx->open_record but this is never read as record is overwritten later on. Remove the redundant initialization. Cleans up the following clang-analyzer warning: net/tls/tls_device.c:421:26: warning: Value stored to 'record' during its initialization is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 4db6187d721ed6a30df658da137a12246fe6a1b7 Author: Jiapeng Chong Date: Tue Apr 27 18:24:47 2021 +0800 rds: Remove redundant assignment to nr_sig Variable nr_sig is being assigned a value however the assignment is never read, so this redundant assignment can be removed. Cleans up the following clang-analyzer warning: net/rds/ib_send.c:297:2: warning: Value stored to 'nr_sig' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 733933a9ccb0572c789345845e8a01a61d8de204 Merge: aae0fdac008e4 61b405985a6b6 Author: David S. Miller Date: Tue Apr 27 14:13:24 2021 -0700 Merge branch 'microchip-ksz88x3' Oleksij Rempel says: ==================== microchip: add support for ksz88x3 driver family changes v8: - add Reviewed-by: Florian Fainelli - fix build issue on "net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct" changes v7: - Reverse christmas tree fixes - remove IS_88X3 and use chip_id instead - drop own tag and use DSA_TAG_PROTO_KSZ9893 instead changes v6: - take over this patch set - rebase against latest netdev-next and fix regressions - disable VLAN support for KSZ8863. KSZ8863's VLAN is not compatible to the KSZ8795's. So disable it for now and mainline it separately. This series adds support for the ksz88x3 driver family to the dsa based ksz drivers. The driver is making use of the already available ksz8795 driver and moves it to an generic driver for the ksz8 based chips which have similar functions but an totaly different register layout. The mainlining discussion history of this branch: v1: https://lore.kernel.org/netdev/20191107110030.25199-1-m.grzeschik@pengutronix.de/ v2: https://lore.kernel.org/netdev/20191218200831.13796-1-m.grzeschik@pengutronix.de/ v3: https://lore.kernel.org/netdev/20200508154343.6074-1-m.grzeschik@pengutronix.de/ v4: https://lore.kernel.org/netdev/20200803054442.20089-1-m.grzeschik@pengutronix.de/ v5: https://lore.kernel.org/netdev/20201207125627.30843-1-m.grzeschik@pengutronix.de/ ==================== Signed-off-by: David S. Miller commit 61b405985a6b6ffc24c98cd2b8b986262626eeba Author: Michael Grzeschik Date: Tue Apr 27 09:09:09 2021 +0200 dt-bindings: net: mdio-gpio: add compatible for microchip,mdio-smi0 Microchip SMI0 Mode is a special mode, where the MDIO Read/Write commands are part of the PHY Address and the OP Code is always 0. We add the compatible for this special mode of the bitbanged mdio driver. Cc: devicetree@vger.kernel.org Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Acked-by: Rob Herring Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 60a3647600027cbd54eb21997af3e175fbfa5592 Author: Michael Grzeschik Date: Tue Apr 27 09:09:08 2021 +0200 net: dsa: microchip: Add Microchip KSZ8863 SMI based driver support Add KSZ88X3 driver support. We add support for the KXZ88X3 three port switches using the Microchip SMI Interface. They are supported using the MDIO-Bitbang Interface. Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 800fcab8230f622544a12403977b5b7259a076f8 Author: Andrew Lunn Date: Tue Apr 27 09:09:07 2021 +0200 net: phy: Add support for microchip SMI0 MDIO bus SMI0 is a mangled version of MDIO. The main low level difference is the MDIO C22 OP code is always 0, not 0x2 or 0x1 for Read/Write. The read/write information is instead encoded in the PHY address. Extend the bit-bang code to allow the op code to be overridden, but default to normal C22 values. Add an extra compatible to the mdio-gpio driver, and when this compatible is present, set the op codes to 0. A higher level driver, sitting on top of the basic MDIO bus driver can then implement the rest of the microchip SMI0 odderties. Signed-off-by: Andrew Lunn Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 61df0e7bbb90fac8c77203e0fa570804617f137d Author: Michael Grzeschik Date: Tue Apr 27 09:09:06 2021 +0200 dt-bindings: net: dsa: document additional Microchip KSZ8863/8873 switch It is a 3-Port 10/100 Ethernet Switch. One CPU-Port and two Switch-Ports. Cc: devicetree@vger.kernel.org Reviewed-by: Andrew Lunn Acked-by: Rob Herring Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit cc13e52c3a894e407f5b95052b0012b07101ebec Author: Michael Grzeschik Date: Tue Apr 27 09:09:05 2021 +0200 net: dsa: microchip: Add Microchip KSZ8863 SPI based driver support Add KSZ88X3 driver support. We add support for the KXZ88X3 three port switches using the SPI Interface. Reviewed-by: Florian Fainelli Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4b20a07e103f0b38b376b4b45c7c082202a876ff Author: Oleksij Rempel Date: Tue Apr 27 09:09:04 2021 +0200 net: dsa: microchip: ksz8795: add support for ksz88xx chips We add support for the ksz8863 and ksz8873 chips which are using the same register patterns but other offsets as the ksz8795. Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9f73e11250fb3948a8599d72318951d5e93b1eaf Author: Michael Grzeschik Date: Tue Apr 27 09:09:03 2021 +0200 net: dsa: microchip: ksz8795: move register offsets and shifts to separate struct In order to get this driver used with other switches the functions need to use different offsets and register shifts. This patch changes the direct use of the register defines to register description structures, which can be set depending on the chips register layout. Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit c2ac4d2ac5347a0d2aaabf3eca5ba2478d0617a9 Author: Michael Grzeschik Date: Tue Apr 27 09:09:02 2021 +0200 net: dsa: microchip: ksz8795: move cpu_select_interface to extra function This patch moves the cpu interface selection code to a individual function specific for ksz8795. It will make it simpler to customize the code path for different switches supported by this driver. Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4b5baca0403e2b6308e68938dc4d94912f5b8e28 Author: Michael Grzeschik Date: Tue Apr 27 09:09:01 2021 +0200 net: dsa: microchip: ksz8795: change drivers prefix to be generic The driver can be used on other chips of this type. To reflect this we rename the drivers prefix from ksz8795 to ksz8. Signed-off-by: Michael Grzeschik Signed-off-by: Oleksij Rempel Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 8b018889922581c247373fc1bd28e11a472d3d0f Merge: 9f4ad9e425a1d 53b776c77aca9 Author: Ilya Dryomov Date: Tue Apr 27 23:10:58 2021 +0200 Merge remote-tracking branch 'dhowells/netfs-lib' Pick up David Howells' netfs helper library and the new fscache API. Signed-off-by: Ilya Dryomov commit aae0fdac008e40f3f4de32a6e1ac686b769a9f03 Merge: 23c9c2b314bab 39e5308b32506 Author: David S. Miller Date: Tue Apr 27 14:10:16 2021 -0700 Merge branch 'ocelot-ptp' Yangbo Lu says: ==================== Support Ocelot PTP Sync one-step timestamping This patch-set is to support Ocelot PTP Sync one-step timestamping. Actually before that, this patch-set cleans up and optimizes the DSA slave tx timestamp request handling process. Changes for v2: - Split tx timestamp optimization patch. - Updated doc patch. - Freed skb->cb usage in dsa core driver, and moved to device drivers. - Other minor fixes. Changes for v3: - Switched sequence of patch #3 and #4 with rebasing to fix build. - Replaced hard coded 48 of memset(skb->cb, 0, 48) with sizeof(). ==================== Signed-off-by: David S. Miller commit 39e5308b3250666cc92c5ca33a667698ac645bd2 Author: Yangbo Lu Date: Tue Apr 27 12:22:03 2021 +0800 net: mscc: ocelot: support PTP Sync one-step timestamping Although HWTSTAMP_TX_ONESTEP_SYNC existed in ioctl for hardware timestamp configuration, the PTP Sync one-step timestamping had never been supported. This patch is to truely support it. - ocelot_port_txtstamp_request() This function handles tx timestamp request by storing ptp_cmd(tx timestamp type) in OCELOT_SKB_CB(skb)->ptp_cmd, and additionally for two-step timestamp storing ts_id in OCELOT_SKB_CB(clone)->ptp_cmd. - ocelot_ptp_rew_op() During xmit, this function is called to get rew_op (rewriter option) by checking skb->cb for tx timestamp request, and configure to transmitting. Non-onestep-Sync packet with one-step timestamp request falls back to use two-step timestamp. Signed-off-by: Yangbo Lu Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 682eaad93e8cfaaa439af39861ab8610eae5ff33 Author: Yangbo Lu Date: Tue Apr 27 12:22:02 2021 +0800 net: mscc: ocelot: convert to ocelot_port_txtstamp_request() Convert to a common ocelot_port_txtstamp_request() for TX timestamp request handling. Signed-off-by: Yangbo Lu Reviewed-by: Vladimir Oltean Acked-by: Richard Cochran Signed-off-by: David S. Miller commit d150946ed878d566ac55003b4722621bb55d9ac2 Author: Yangbo Lu Date: Tue Apr 27 12:22:01 2021 +0800 docs: networking: timestamping: update for DSA switches Update timestamping doc for DSA switches to describe current implementation accurately. On TX, the skb cloning is no longer in DSA generic code. Signed-off-by: Yangbo Lu Acked-by: Richard Cochran Signed-off-by: David S. Miller commit c4b364ce1270d689ee5010001344b8eae3685f32 Author: Yangbo Lu Date: Tue Apr 27 12:22:00 2021 +0800 net: dsa: free skb->cb usage in core driver Free skb->cb usage in core driver and let device drivers decide to use or not. The reason having a DSA_SKB_CB(skb)->clone was because dsa_skb_tx_timestamp() which may set the clone pointer was called before p->xmit() which would use the clone if any, and the device driver has no way to initialize the clone pointer. This patch just put memset(skb->cb, 0, sizeof(skb->cb)) at beginning of dsa_slave_xmit(). Some new features in the future, like one-step timestamp may need more bytes of skb->cb to use in dsa_skb_tx_timestamp(), and p->xmit(). Signed-off-by: Yangbo Lu Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 5c5416f5d4c75fe6aba56f6c2c45a070b5e7cc78 Author: Yangbo Lu Date: Tue Apr 27 12:21:59 2021 +0800 net: dsa: no longer clone skb in core driver It was a waste to clone skb directly in dsa_skb_tx_timestamp(). For one-step timestamping, a clone was not needed. For any failure of port_txtstamp (this may usually happen), the skb clone had to be freed. So this patch moves skb cloning for tx timestamp out of dsa core, and let drivers clone skb in port_txtstamp if they really need. Signed-off-by: Yangbo Lu Tested-by: Kurt Kanzenbach Acked-by: Richard Cochran Signed-off-by: David S. Miller commit cf536ea3c7eefb26082836eb7f930b293dd38345 Author: Yangbo Lu Date: Tue Apr 27 12:21:58 2021 +0800 net: dsa: no longer identify PTP packet in core driver Move ptp_classify_raw out of dsa core driver for handling tx timestamp request. Let device drivers do this if they want. Not all drivers want to limit tx timestamping for only PTP packet. Signed-off-by: Yangbo Lu Tested-by: Kurt Kanzenbach Acked-by: Richard Cochran Signed-off-by: David S. Miller commit cfd12c06cdceac094aab3f097cce24c279bfd43b Author: Yangbo Lu Date: Tue Apr 27 12:21:57 2021 +0800 net: dsa: check tx timestamp request in core driver Check tx timestamp request in core driver at very beginning of dsa_skb_tx_timestamp(), so that most skbs not requiring tx timestamp just return. And drop such checking in device drivers. Signed-off-by: Yangbo Lu Tested-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 23c9c2b314bab7f7f807a2f0cfe06cc4451b6eb7 Author: qhjindev Date: Tue Apr 27 07:57:52 2021 +0800 fddi/skfp: fix typo change 'privae' to 'private' Signed-off-by: qhjindev Signed-off-by: David S. Miller commit 6066234aa33850e9e35e7be82d92b9e9091e774b Author: Tobias Waldekranz Date: Mon Apr 26 18:17:34 2021 +0200 net: dsa: mv88e6xxx: Fix 6095/6097/6185 ports in non-SERDES CMODE The .serdes_get_lane op used the magic value 0xff to indicate a valid SERDES lane and 0 signaled that a non-SERDES mode was set on the port. Unfortunately, "0" is also a valid lane ID, so even when these ports where configured to e.g. RGMII the driver would set them up as SERDES ports. - Replace 0xff with 0 to indicate a valid lane ID. The number is on the one hand just as arbitrary, but it is at least the first valid one and therefore less of a surprise. - Follow the other .serdes_get_lane implementations and return -ENODEV in the case where no SERDES is assigned to the port. Fixes: f5be107c3338 ("net: dsa: mv88e6xxx: Support serdes ports on MV88E6097/6095/6185") Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 152fa81109a8766c45bfd4aad9e8f4005566648d Author: Ivan Bornyakov Date: Mon Apr 26 19:08:23 2021 +0300 net: phy: marvell-88x2222: enable autoneg by default There is no real need for disabling autonigotiation in config_init(). Leave it enabled by default. Signed-off-by: Ivan Bornyakov Signed-off-by: David S. Miller commit 6c375d793be601976966bc3c1a14af8ce645a5ff Author: Jiapeng Chong Date: Mon Apr 26 18:13:03 2021 +0800 rxrpc: rxkad: Remove redundant variable offset Variable offset is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed. Cleans up the following clang-analyzer warning: net/rxrpc/rxkad.c:579:2: warning: Value stored to 'offset' is never read [clang-analyzer-deadcode.DeadStores]. net/rxrpc/rxkad.c:485:2: warning: Value stored to 'offset' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit bb23ffa1015cb57e0c9ec3c6135275b38d66a780 Author: Christophe JAILLET Date: Sun Apr 25 18:14:10 2021 +0200 macvlan: Use 'hash' iterators to simplify code Use 'hash_for_each_rcu' and 'hash_for_each_safe' instead of hand writing them. This saves some lines of code, reduce indentation and improve readability. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 99014088156cd78867d19514a0bc771c4b86b93b Author: Linus Lüssing Date: Sun Apr 25 17:27:35 2021 +0200 net: bridge: mcast: fix broken length + header check for MRDv6 Adv. The IPv6 Multicast Router Advertisements parsing has the following two issues: For one thing, ICMPv6 MRD Advertisements are smaller than ICMPv6 MLD messages (ICMPv6 MRD Adv.: 8 bytes vs. ICMPv6 MLDv1/2: >= 24 bytes, assuming MLDv2 Reports with at least one multicast address entry). When ipv6_mc_check_mld_msg() tries to parse an Multicast Router Advertisement its MLD length check will fail - and it will wrongly return -EINVAL, even if we have a valid MRD Advertisement. With the returned -EINVAL the bridge code will assume a broken packet and will wrongly discard it, potentially leading to multicast packet loss towards multicast routers. The second issue is the MRD header parsing in br_ip6_multicast_mrd_rcv(): It wrongly checks for an ICMPv6 header immediately after the IPv6 header (IPv6 next header type). However according to RFC4286, section 2 all MRD messages contain a Router Alert option (just like MLD). So instead there is an IPv6 Hop-by-Hop option for the Router Alert between the IPv6 and ICMPv6 header, again leading to the bridge wrongly discarding Multicast Router Advertisements. To fix these two issues, introduce a new return value -ENODATA to ipv6_mc_check_mld() to indicate a valid ICMPv6 packet with a hop-by-hop option which is not an MLD but potentially an MRD packet. This also simplifies further parsing in the bridge code, as ipv6_mc_check_mld() already fully checks the ICMPv6 header and hop-by-hop option. These issues were found and fixed with the help of the mrdisc tool (https://github.com/troglobit/mrdisc). Fixes: 4b3087c7e37f ("bridge: Snoop Multicast Router Advertisements") Signed-off-by: Linus Lüssing Signed-off-by: David S. Miller commit e359bce39d9085ab24eaa0bb0778bb5f6894144a Merge: f1c921fb70de0 b75d8f38bcc95 Author: Linus Torvalds Date: Tue Apr 27 13:50:58 2021 -0700 Merge tag 'audit-pr-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit Pull audit updates from Paul Moore: "Another small pull request for audit, most of the patches are documentation updates with only two real code changes: one to fix a compiler warning for a dummy function/macro, and one to cleanup some code since we removed the AUDIT_FILTER_ENTRY ages ago (v4.17)" * tag 'audit-pr-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/audit: audit: drop /proc/PID/loginuid documentation Format field audit: avoid -Wempty-body warning audit: document /proc/PID/sessionid audit: document /proc/PID/loginuid MAINTAINERS: update audit files audit: further cleanup of AUDIT_FILTER_ENTRY deprecation commit f1c921fb70de06c7eda59104470134aecc7a07c4 Merge: fafe1e39ed213 e4c82eafb609c Author: Linus Torvalds Date: Tue Apr 27 13:42:11 2021 -0700 Merge tag 'selinux-pr-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux Pull selinux updates from Paul Moore: - Add support for measuring the SELinux state and policy capabilities using IMA. - A handful of SELinux/NFS patches to compare the SELinux state of one mount with a set of mount options. Olga goes into more detail in the patch descriptions, but this is important as it allows more flexibility when using NFS and SELinux context mounts. - Properly differentiate between the subjective and objective LSM credentials; including support for the SELinux and Smack. My clumsy attempt at a proper fix for AppArmor didn't quite pass muster so John is working on a proper AppArmor patch, in the meantime this set of patches shouldn't change the behavior of AppArmor in any way. This change explains the bulk of the diffstat beyond security/. - Fix a problem where we were not properly terminating the permission list for two SELinux object classes. * tag 'selinux-pr-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux: selinux: add proper NULL termination to the secclass_map permissions smack: differentiate between subjective and objective task credentials selinux: clarify task subjective and objective credentials lsm: separate security_task_getsecid() into subjective and objective variants nfs: account for selinux security context when deciding to share superblock nfs: remove unneeded null check in nfs_fill_super() lsm,selinux: add new hook to compare new mount to an existing mount selinux: fix misspellings using codespell tool selinux: fix misspellings using codespell tool selinux: measure state and policy capabilities selinux: Allow context mounts for unpriviliged overlayfs commit 7acc0bb490c85012bcbda142b6755fd1fdf1fba1 Author: Arnd Bergmann Date: Tue Apr 27 21:45:19 2021 +0200 netfilter: nft_socket: fix build with CONFIG_SOCK_CGROUP_DATA=n In some configurations, the sock_cgroup_ptr() function is not available: net/netfilter/nft_socket.c: In function 'nft_sock_get_eval_cgroupv2': net/netfilter/nft_socket.c:47:16: error: implicit declaration of function 'sock_cgroup_ptr'; did you mean 'obj_cgroup_put'? [-Werror=implicit-function-declaration] 47 | cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); | ^~~~~~~~~~~~~~~ | obj_cgroup_put net/netfilter/nft_socket.c:47:14: error: assignment to 'struct cgroup *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] 47 | cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); | ^ Change the caller to match the same #ifdef check, only calling it when the function is defined. Fixes: e0bb96db96f8 ("netfilter: nft_socket: add support for cgroupsv2") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso commit 8a7363f8497900e33d4ac391315e8a8d53a03d89 Author: Arnd Bergmann Date: Tue Apr 27 21:45:18 2021 +0200 netfilter: nft_socket: fix an unused variable warning The variable is only used in an #ifdef, causing a harmless warning: net/netfilter/nft_socket.c: In function 'nft_socket_init': net/netfilter/nft_socket.c:137:27: error: unused variable 'level' [-Werror=unused-variable] 137 | unsigned int len, level; | ^~~~~ Move it into the same #ifdef block. Fixes: e0bb96db96f8 ("netfilter: nft_socket: add support for cgroupsv2") Signed-off-by: Arnd Bergmann Signed-off-by: Pablo Neira Ayuso commit fafe1e39ed213221c0bce6b0b31669334368dc97 Merge: 820c4bae40cb5 3003bbd0697b6 Author: Linus Torvalds Date: Tue Apr 27 13:27:39 2021 -0700 Merge tag 'afs-netfs-lib-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull AFS updates from David Howells: "Use the new netfs lib. Begin the process of overhauling the use of the fscache API by AFS and the introduction of support for features such as Transparent Huge Pages (THPs). - Add some support for THPs, including using core VM helper functions to find details of pages. - Use the ITER_XARRAY I/O iterator to mediate access to the pagecache as this handles THPs and doesn't require allocation of large bvec arrays. - Delegate address_space read/pre-write I/O methods for AFS to the netfs helper library. A method is provided to the library that allows it to issue a read against the server. This includes a change in use for PG_fscache (it now indicates a DIO write in progress from the marked page), so a number of waits need to be deployed for it. - Split the core AFS writeback function to make it easier to modify in future patches to handle writing to the cache. [This might feasibly make more sense moved out into my fscache-iter branch]. I've tested these with "xfstests -g quick" against an AFS volume (xfstests needs patching to make it work). With this, AFS without a cache passes all expected xfstests; with a cache, there's an extra failure, but that's also there before these patches. Fixing that probably requires a greater overhaul (as can be found on my fscache-iter branch, but that's for a later time). Thanks should go to Marc Dionne and Jeff Altman of AuriStor for exercising the patches in their test farm also" Link: https://lore.kernel.org/lkml/3785063.1619482429@warthog.procyon.org.uk/ * tag 'afs-netfs-lib-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: afs: Use the netfs_write_begin() helper afs: Use new netfs lib read helper API afs: Use the fs operation ops to handle FetchData completion afs: Prepare for use of THPs afs: Extract writeback extension into its own function afs: Wait on PG_fscache before modifying/releasing a page afs: Use ITER_XARRAY for writing afs: Set up the iov_iter before calling afs_extract_data() afs: Log remote unmarshalling errors afs: Don't truncate iter during data fetch afs: Move key to afs_read struct afs: Print the operation debug_id when logging an unexpected data version afs: Pass page into dirty region helpers to provide THP size afs: Disable use of the fscache I/O routines commit 820c4bae40cb56466cfed6409e00d0f5165a990c Merge: 34a456eb1fe26 53b776c77aca9 Author: Linus Torvalds Date: Tue Apr 27 13:08:12 2021 -0700 Merge tag 'netfs-lib-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull network filesystem helper library updates from David Howells: "Here's a set of patches for 5.13 to begin the process of overhauling the local caching API for network filesystems. This set consists of two parts: (1) Add a helper library to handle the new VM readahead interface. This is intended to be used unconditionally by the filesystem (whether or not caching is enabled) and provides a common framework for doing caching, transparent huge pages and, in the future, possibly fscrypt and read bandwidth maximisation. It also allows the netfs and the cache to align, expand and slice up a read request from the VM in various ways; the netfs need only provide a function to read a stretch of data to the pagecache and the helper takes care of the rest. (2) Add an alternative fscache/cachfiles I/O API that uses the kiocb facility to do async DIO to transfer data to/from the netfs's pages, rather than using readpage with wait queue snooping on one side and vfs_write() on the other. It also uses less memory, since it doesn't do buffered I/O on the backing file. Note that this uses SEEK_HOLE/SEEK_DATA to locate the data available to be read from the cache. Whilst this is an improvement from the bmap interface, it still has a problem with regard to a modern extent-based filesystem inserting or removing bridging blocks of zeros. Fixing that requires a much greater overhaul. This is a step towards overhauling the fscache API. The change is opt-in on the part of the network filesystem. A netfs should not try to mix the old and the new API because of conflicting ways of handling pages and the PG_fscache page flag and because it would be mixing DIO with buffered I/O. Further, the helper library can't be used with the old API. This does not change any of the fscache cookie handling APIs or the way invalidation is done at this time. In the near term, I intend to deprecate and remove the old I/O API (fscache_allocate_page{,s}(), fscache_read_or_alloc_page{,s}(), fscache_write_page() and fscache_uncache_page()) and eventually replace most of fscache/cachefiles with something simpler and easier to follow. This patchset contains the following parts: - Some helper patches, including provision of an ITER_XARRAY iov iterator and a function to do readahead expansion. - Patches to add the netfs helper library. - A patch to add the fscache/cachefiles kiocb API. - A pair of patches to fix some review issues in the ITER_XARRAY and read helpers as spotted by Al and Willy. Jeff Layton has patches to add support in Ceph for this that he intends for this merge window. I have a set of patches to support AFS that I will post a separate pull request for. With this, AFS without a cache passes all expected xfstests; with a cache, there's an extra failure, but that's also there before these patches. Fixing that probably requires a greater overhaul. Ceph also passes the expected tests. I also have patches in a separate branch to tidy up the handling of PG_fscache/PG_private_2 and their contribution to page refcounting in the core kernel here, but I haven't included them in this set and will route them separately" Link: https://lore.kernel.org/lkml/3779937.1619478404@warthog.procyon.org.uk/ * tag 'netfs-lib-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: netfs: Miscellaneous fixes iov_iter: Four fixes for ITER_XARRAY fscache, cachefiles: Add alternate API to use kiocb for read/write to cache netfs: Add a tracepoint to log failures that would be otherwise unseen netfs: Define an interface to talk to a cache netfs: Add write_begin helper netfs: Gather stats netfs: Add tracepoints netfs: Provide readahead and readpage netfs helpers netfs, mm: Add set/end/wait_on_page_fscache() aliases netfs, mm: Move PG_fscache helper funcs to linux/netfs.h netfs: Documentation for helper library netfs: Make a netfs helper module mm: Implement readahead_control pageset expansion mm/readahead: Handle ractl nr_pages being modified fs: Document file_ra_state mm/filemap: Pass the file_ra_state in the ractl mm: Add set/end/wait functions for PG_private_2 iov_iter: Add ITER_XARRAY commit 34a456eb1fe26303d0661693d01a50e83a551da3 Merge: cc15422c1f14a db998553cf11d Author: Linus Torvalds Date: Tue Apr 27 12:49:42 2021 -0700 Merge tag 'fs.idmapped.helpers.v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull fs mapping helper updates from Christian Brauner: "This adds kernel-doc to all new idmapping helpers and improves their naming which was triggered by a discussion with some fs developers. Some of the names are based on suggestions by Vivek and Al. Also remove the open-coded permission checking in a few places with simple helpers. Overall this should lead to more clarity and make it easier to maintain" * tag 'fs.idmapped.helpers.v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: fs: introduce two inode i_{u,g}id initialization helpers fs: introduce fsuidgid_has_mapping() helper fs: document and rename fsid helpers fs: document mapping helpers commit cc15422c1f14a84f539df7637b09d534e71b73a7 Merge: b34b95ebbba9a 92cb01c74ef13 Author: Linus Torvalds Date: Tue Apr 27 12:42:03 2021 -0700 Merge tag 'fs.idmapped.docs.v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux Pull fs helper kernel-doc updates from Christian Brauner: "In the last cycles we forgot to update the kernel-docs in some places that were changed during the idmapped mount work. Lukas and Randy took the chance to not just fixup those places but also fixup and expand kernel-docs for some additional helpers. No functional changes" * tag 'fs.idmapped.docs.v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux: fs: update kernel-doc for vfs_rename() fs: turn some comments into kernel-doc xattr: fix kernel-doc for mnt_userns and vfs xattr helpers namei: fix kernel-doc for struct renamedata and more libfs: fix kernel-doc for mnt_userns commit adaeb718d46f6b42a3fc1dffd4f946f26b33779a Author: Arnd Bergmann Date: Thu Apr 22 15:35:33 2021 +0200 vfio/gvt: fix DRM_I915_GVT dependency on VFIO_MDEV The Kconfig dependency is incomplete since DRM_I915_GVT is a 'bool' symbol that depends on the 'tristate' VFIO_MDEV. This allows a configuration with VFIO_MDEV=m, DRM_I915_GVT=y and DRM_I915=y that causes a link failure: x86_64-linux-ld: drivers/gpu/drm/i915/gvt/gvt.o: in function `available_instances_show': gvt.c:(.text+0x67a): undefined reference to `mtype_get_parent_dev' x86_64-linux-ld: gvt.c:(.text+0x6a5): undefined reference to `mtype_get_type_group_id' x86_64-linux-ld: drivers/gpu/drm/i915/gvt/gvt.o: in function `description_show': gvt.c:(.text+0x76e): undefined reference to `mtype_get_parent_dev' x86_64-linux-ld: gvt.c:(.text+0x799): undefined reference to `mtype_get_type_group_id' Clarify the dependency by specifically disallowing the broken configuration. If VFIO_MDEV is built-in, it will work, but if VFIO_MDEV=m, the i915 driver cannot be built-in here. Fixes: 07e543f4f9d1 ("vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV") Fixes: 9169cff168ff ("vfio/mdev: Correct the function signatures for the mdev_type_attributes") Signed-off-by: Arnd Bergmann Acked-by: Zhenyu Wang Message-Id: <20210422133547.1861063-1-arnd@kernel.org> Reviewed-by: Jason Gunthorpe Signed-off-by: Alex Williamson commit b34b95ebbba9a10257e3a2c9b2ba4119cb345dc3 Merge: a4f7fae10169c ad89b66cbad18 Author: Linus Torvalds Date: Tue Apr 27 12:27:23 2021 -0700 Merge tag 'iomap-5.13-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux Pull iomap update from Darrick Wong: "A single patch to the iomap code, which augments what gets logged when someone tries to swapon an unacceptable swap file. (Yes, this is a continuation of the swapfile drama from last season...)" * tag 'iomap-5.13-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: iomap: improve the warnings from iomap_swapfile_activate commit 6a79162fe5d5e0eb55bc48e99450982b0daf0a0f Author: bilbao@vt.edu Date: Tue Apr 27 13:28:29 2021 -0400 docs: Fix typo in Documentation/x86/x86_64/5level-paging.rst fix two typos in the documentation (Documentation/x86/x86_64/5level-paging.rst), changing 'paing' for 'paging' and using the right verbal form for plural on 'some vendors offer'. Signed-off-by: Carlos Bilbao Link: https://lore.kernel.org/r/2599991.mvXUDI8C0e@iron-maiden Signed-off-by: Jonathan Corbet commit 6cc9e215eb277513719c32b9ba40e5012b02db57 Author: Gal Pressman Date: Sun Apr 18 15:10:25 2021 +0300 RDMA/nldev: Add copy-on-fork attribute to get sys command The new attribute indicates that the kernel copies DMA pages on fork, hence libibverbs' fork support through madvise and MADV_DONTFORK is not needed. The introduced attribute is always reported as supported since the kernel has the patch that added the copy-on-fork behavior. This allows the userspace library to identify older vs newer kernel versions. Extra care should be taken when backporting this patch as it relies on the fact that the copy-on-fork patch is merged, hence no check for support is added. Don't backport this patch unless you also have the following series: commit 70e806e4e645 ("mm: Do early cow for pinned pages during fork() for ptes") and commit 4eae4efa2c29 ("hugetlb: do early cow when page pinned on src mm"). Fixes: 70e806e4e645 ("mm: Do early cow for pinned pages during fork() for ptes") Fixes: 4eae4efa2c29 ("hugetlb: do early cow when page pinned on src mm") Link: https://lore.kernel.org/r/20210418121025.66849-1-galpress@amazon.com Signed-off-by: Gal Pressman Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 34b39efa5ae82fc0ad0acc27653c12a56328dbbe Author: Lv Yunlong Date: Mon Apr 26 07:06:14 2021 -0700 RDMA/bnxt_re: Fix a double free in bnxt_qplib_alloc_res In bnxt_qplib_alloc_res, it calls bnxt_qplib_alloc_dpi_tbl(). Inside bnxt_qplib_alloc_dpi_tbl, dpit->dbr_bar_reg_iomem is freed via pci_iounmap() in unmap_io error branch. After the callee returns err code, bnxt_qplib_alloc_res calls bnxt_qplib_free_res()->bnxt_qplib_free_dpi_tbl() in the fail branch. Then dpit->dbr_bar_reg_iomem is freed in the second time by pci_iounmap(). My patch set dpit->dbr_bar_reg_iomem to NULL after it is freed by pci_iounmap() in the first time, to avoid the double free. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://lore.kernel.org/r/20210426140614.6722-1-lyl2019@mail.ustc.edu.cn Signed-off-by: Lv Yunlong Reviewed-by: Leon Romanovsky Acked-by: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 3093ee182f01689b89e9f8797b321603e5de4f63 Author: Lv Yunlong Date: Sun Apr 25 18:16:47 2021 -0700 RDMA/siw: Fix a use after free in siw_alloc_mr Our code analyzer reported a UAF. In siw_alloc_mr(), it calls siw_mr_add_mem(mr,..). In the implementation of siw_mr_add_mem(), mem is assigned to mr->mem and then mem is freed via kfree(mem) if xa_alloc_cyclic() failed. Here, mr->mem still point to a freed object. After, the execution continue up to the err_out branch of siw_alloc_mr, and the freed mr->mem is used in siw_mr_drop_mem(mr). My patch moves "mr->mem = mem" behind the if (xa_alloc_cyclic(..)<0) {} section, to avoid the uaf. Fixes: 2251334dcac9 ("rdma/siw: application buffer management") Link: https://lore.kernel.org/r/20210426011647.3561-1-lyl2019@mail.ustc.edu.cn Signed-off-by: Lv Yunlong Reviewed-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit 2d085ee1728e6ed52f63f221a8ac44cb744e7a84 Author: Jiapeng Chong Date: Sun Apr 25 18:31:36 2021 +0800 IB/hfi1: Remove redundant variable rcd The variable rcd is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed. Cleans up the following clang-analyzer warning: drivers/infiniband/hw/hfi1/affinity.c:986:3: warning: Value stored to 'rcd' is never read [clang-analyzer-deadcode.DeadStores]. Link: https://lore.kernel.org/r/1619346696-46300-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Jason Gunthorpe commit a4f7fae10169cf626bb83e97f229ee78c71ceea8 Merge: 5e6720888523e c4fe8aef2f07c Author: Linus Torvalds Date: Tue Apr 27 11:18:24 2021 -0700 Merge branch 'miklos.fileattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull fileattr conversion updates from Miklos Szeredi via Al Viro: "This splits the handling of FS_IOC_[GS]ETFLAGS from ->ioctl() into a separate method. The interface is reasonably uniform across the filesystems that support it and gives nice boilerplate removal" * 'miklos.fileattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (23 commits) ovl: remove unneeded ioctls fuse: convert to fileattr fuse: add internal open/release helpers fuse: unsigned open flags fuse: move ioctl to separate source file vfs: remove unused ioctl helpers ubifs: convert to fileattr reiserfs: convert to fileattr ocfs2: convert to fileattr nilfs2: convert to fileattr jfs: convert to fileattr hfsplus: convert to fileattr efivars: convert to fileattr xfs: convert to fileattr orangefs: convert to fileattr gfs2: convert to fileattr f2fs: convert to fileattr ext4: convert to fileattr ext2: convert to fileattr btrfs: convert to fileattr ... commit 5e6720888523eaac7c548df0d263739c56a3c22e Merge: d1466bc583a81 a64b89088bb14 Author: Linus Torvalds Date: Tue Apr 27 11:04:27 2021 -0700 Merge branch 'work.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull coredump updates from Al Viro: "Just a couple of patches this cycle: use of seek + write instead of expanding truncate and minor header cleanup" * 'work.coredump' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: coredump.h: move CONFIG_COREDUMP-only stuff inside the ifdef coredump: don't bother with do_truncate() commit d1466bc583a81830cef2399a4b8a514398351b40 Merge: 57fa2369ab17d c4ab036a2f411 Author: Linus Torvalds Date: Tue Apr 27 10:57:42 2021 -0700 Merge branch 'work.inode-type-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs inode type handling updates from Al Viro: "We should never change the type bits of ->i_mode or the method tables (->i_op and ->i_fop) of a live inode. Unfortunately, not all filesystems took care to prevent that" * 'work.inode-type-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: spufs: fix bogosity in S_ISGID handling 9p: missing chunk of "fs/9p: Don't update file type when updating file attributes" openpromfs: don't do unlock_new_inode() until the new inode is set up hostfs_mknod(): don't bother with init_special_inode() cifs: have cifs_fattr_to_inode() refuse to change type on live inode cifs: have ->mkdir() handle race with another client sanely do_cifs_create(): don't set ->i_mode of something we had not created gfs2: be careful with inode refresh ocfs2_inode_lock_update(): make sure we don't change the type bits of i_mode orangefs_inode_is_stale(): i_mode type bits do *not* form a bitmap... vboxsf: don't allow to change the inode type afs: Fix updating of i_mode due to 3rd party change ceph: don't allow type or device number to change on non-I_NEW inodes ceph: fix up error handling with snapdirs new helper: inode_wrong_type() commit 57fa2369ab17d67e6232f85b868652fbf4407206 Merge: 2fbc66c7838a7 9186ad8e66bab Author: Linus Torvalds Date: Tue Apr 27 10:16:46 2021 -0700 Merge tag 'cfi-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull CFI on arm64 support from Kees Cook: "This builds on last cycle's LTO work, and allows the arm64 kernels to be built with Clang's Control Flow Integrity feature. This feature has happily lived in Android kernels for almost 3 years[1], so I'm excited to have it ready for upstream. The wide diffstat is mainly due to the treewide fixing of mismatched list_sort prototypes. Other things in core kernel are to address various CFI corner cases. The largest code portion is the CFI runtime implementation itself (which will be shared by all architectures implementing support for CFI). The arm64 pieces are Acked by arm64 maintainers rather than coming through the arm64 tree since carrying this tree over there was going to be awkward. CFI support for x86 is still under development, but is pretty close. There are a handful of corner cases on x86 that need some improvements to Clang and objtool, but otherwise works well. Summary: - Clean up list_sort prototypes (Sami Tolvanen) - Introduce CONFIG_CFI_CLANG for arm64 (Sami Tolvanen)" * tag 'cfi-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: arm64: allow CONFIG_CFI_CLANG to be selected KVM: arm64: Disable CFI for nVHE arm64: ftrace: use function_nocfi for ftrace_call arm64: add __nocfi to __apply_alternatives arm64: add __nocfi to functions that jump to a physical address arm64: use function_nocfi with __pa_symbol arm64: implement function_nocfi psci: use function_nocfi for cpu_resume lkdtm: use function_nocfi treewide: Change list_sort to use const pointers bpf: disable CFI in dispatcher functions kallsyms: strip ThinLTO hashes from static functions kthread: use WARN_ON_FUNCTION_MISMATCH workqueue: use WARN_ON_FUNCTION_MISMATCH module: ensure __cfi_check alignment mm: add generic function_nocfi macro cfi: add __cficanonical add support for Clang CFI commit 2fbc66c7838a7fbfb91bf8e119e51e73b4a8a0bc Merge: 288321a9c6519 4578be130a647 Author: Linus Torvalds Date: Tue Apr 27 10:10:29 2021 -0700 Merge tag 'overflow-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull overflow update from Kees Cook: "I was expecting more in this tree for this cycle, but the other work has not yet landed for -next. As a result, only this single typo fix exists. Yay tiny pulls. :) - Fix typo in check_shl_overflow() kern-dec (Keith Busch)" * tag 'overflow-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: overflow: Correct check_shl_overflow() comment commit 094c7f39ba4b5ae7e4c448527834428b79e3baf9 Author: Dmitry Baryshkov Date: Mon Apr 12 03:01:58 2021 +0300 drm/msm/dsi: fix msm_dsi_phy_get_clk_provider return code msm_dsi_phy_get_clk_provider() always returns two provided clocks, so return 0 instead of returning incorrect -EINVAL error code. Fixes: 5d13459650b3 ("drm/msm/dsi: push provided clocks handling into a generic code") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Jonathan Marek Link: https://lore.kernel.org/r/20210412000158.2049066-1-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 08811c057b3e22f7a3df3955c138a59f3b651df0 Author: Dmitry Baryshkov Date: Sat Apr 10 04:19:01 2021 +0300 drm/msm/dsi: dsi_phy_28nm_8960: fix uninitialized variable access The parent_name initialization was lost in refactoring, restore it now. Fixes: 5d13459650b3 ("drm/msm/dsi: push provided clocks handling into a generic code") Reported-by: kernel test robot Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210410011901.1735866-1-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 4b95d371fb001185af84d177e69a23d55bd0167a Author: Jonathan Marek Date: Fri Apr 23 21:49:26 2021 -0400 drm/msm: fix LLC not being enabled for mmu500 targets mmu500 targets don't have a "cx_mem" region, set llc_mmio to NULL in that case to avoid the IS_ERR() condition in a6xx_llc_activate(). Fixes: 3d247123b5a1 ("drm/msm/a6xx: Add support for using system cache on MMU500 based targets") Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20210424014927.1661-1-jonathan@marek.ca Signed-off-by: Rob Clark commit 10f76165d30bf568214e75767f2d8d8682cd4040 Author: Rob Clark Date: Mon Apr 26 16:53:25 2021 -0700 drm/msm: Do not unpin/evict exported dma-buf's Our initial logic for excluding dma-bufs was not quite right. In particular we want msm_gem_get/put_pages() path used for exported dma-bufs to increment/decrement the pin-count. Also, in case the importer is vmap'ing the dma-buf, we need to be sure to update the object's status, because it is now no longer potentially evictable. Fixes: 63f17ef83428 drm/msm: Support evicting GEM objects to swap Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210426235326.1230125-1-robdclark@gmail.com Signed-off-by: Rob Clark commit 288321a9c65192878446a00acaa9f6c3ca9bb1f5 Merge: 7e4910b9acea9 9d843e8fafc7c Author: Linus Torvalds Date: Tue Apr 27 10:08:10 2021 -0700 Merge tag 'pstore-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull pstore update from Kees Cook: - Add mem_type property to expand support for >2 memory types (Mukesh Ojha) * tag 'pstore-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: pstore: Add mem_type property DT parsing support commit 95b079d8215b83b37fa59341fda92fcb9392f14a Author: Claire Chang Date: Thu Apr 22 16:14:53 2021 +0800 swiotlb: Fix the type of index Fix the type of index from unsigned int to int since find_slots() might return -1. Fixes: 26a7e094783d ("swiotlb: refactor swiotlb_tbl_map_single") Reviewed-by: Christoph Hellwig Signed-off-by: Claire Chang Signed-off-by: Konrad Rzeszutek Wilk commit 7e4910b9acea9fb9575f6506f76dd465259ad8d9 Merge: ea6b2098dd027 a3fc712c5b37a Author: Linus Torvalds Date: Tue Apr 27 10:03:12 2021 -0700 Merge tag 'seccomp-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux Pull seccomp updates from Kees Cook: - Fix "cacheable" typo in comments (Cui GaoSheng) - Fix CONFIG for /proc/$pid/status Seccomp_filters (Kenta.Tada@sony.com) * tag 'seccomp-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: seccomp: Fix "cacheable" typo in comments seccomp: Fix CONFIG tests for Seccomp_filters commit aaa31047a6d25da0fa101da1ed544e1247949b40 Author: Pablo Neira Ayuso Date: Tue Apr 27 18:05:55 2021 +0200 netfilter: nftables: add catch-all set element support This patch extends the set infrastructure to add a special catch-all set element. If the lookup fails to find an element (or range) in the set, then the catch-all element is selected. Users can specify a mapping, expression(s) and timeout to be attached to the catch-all element. This patch adds a catchall list to the set, this list might contain more than one single catch-all element (e.g. in case that the catch-all element is removed and a new one is added in the same transaction). However, most of the time, there will be either one element or no elements at all in this list. The catch-all element is identified via NFT_SET_ELEM_CATCHALL flag and such special element has no NFTA_SET_ELEM_KEY attribute. There is a new nft_set_elem_catchall object that stores a reference to the dummy catch-all element (catchall->elem) whose layout is the same of the set element type to reuse the existing set element codebase. The set size does not apply to the catch-all element, users can define a catch-all element even if the set is full. The check for valid set element flags hava been updates to report EOPNOTSUPP in case userspace requests flags that are not supported when using new userspace nftables and old kernel. Signed-off-by: Pablo Neira Ayuso commit 97c976d662fb9080a6a5d1e1a108c7a1f5c9484d Author: Pablo Neira Ayuso Date: Tue Apr 27 18:05:48 2021 +0200 netfilter: nftables: add helper function to validate set element data When binding sets to rule, validate set element data according to set definition. This patch adds a helper function to be reused by the catch-all set element support. Signed-off-by: Pablo Neira Ayuso commit e6ba7cb63b8ae0e13e6c2acc4067097c1181f6bf Author: Pablo Neira Ayuso Date: Tue Apr 27 18:05:45 2021 +0200 netfilter: nftables: add helper function to flush set elements This patch adds nft_set_flush() which prepares for the catch-all element support. Signed-off-by: Pablo Neira Ayuso commit 6387aa6e59be8d1158c5703f34553c93d7743d8c Author: Pablo Neira Ayuso Date: Tue Apr 27 18:05:41 2021 +0200 netfilter: nftables: add loop check helper function This patch adds nft_check_loops() to reuse it in the new catch-all element codebase. Signed-off-by: Pablo Neira Ayuso commit f8bb7889af58d8e74d2d61c76b1418230f1610fa Author: Pablo Neira Ayuso Date: Tue Apr 27 18:05:36 2021 +0200 netfilter: nftables: rename set element data activation/deactivation functions Rename: - nft_set_elem_activate() to nft_set_elem_data_activate(). - nft_set_elem_deactivate() to nft_set_elem_data_deactivate(). To prepare for updates in the set element infrastructure to add support for the special catch-all element. Signed-off-by: Pablo Neira Ayuso commit 80342d484afceec491bcc85ff1e32c5491c1182f Author: Matthew Wilcox Date: Tue Apr 27 12:48:28 2021 +0100 kernel-doc: Add support for __deprecated The current linux-next tree has a new error: ./Documentation/gpu/drm-mm:445: ./drivers/gpu/drm/drm_prime.c:994: WARNING: Error in declarator or parameters Invalid C declaration: Expecting "(" in parameters. [error at 17] int __deprecated drm_prime_sg_to_page_array (struct sg_table *sgt, struct page **pages, int max_entries) -----------------^ While we might consider that documenting a deprecated interface is not necessarily best practice, removing the error is easy. Signed-off-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20210427114828.GY235567@casper.infradead.org Signed-off-by: Jonathan Corbet commit 2551c2d19c04cd1c7b6c99ec04a8ff08193b0ccc Author: Hengqi Chen Date: Sat Apr 24 10:12:08 2021 +0800 bpf, docs: Fix literal block for example code Add a missing colon so that the code block followed can be rendered properly. Signed-off-by: Hengqi Chen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210424021208.832116-1-hengqi.chen@gmail.com commit ea6b2098dd02789f68770fd3d5a373732207be2f Author: Johannes Berg Date: Tue Apr 27 11:49:52 2021 +0200 cfg80211: fix locking in netlink owner interface destruction Harald Arnesen reported [1] a deadlock at reboot time, and after he captured a stack trace a picture developed of what's going on: The distribution he's using is using iwd (not wpa_supplicant) to manage wireless. iwd will usually use the "socket owner" option when it creates new interfaces, so that they're automatically destroyed when it quits (unexpectedly or otherwise). This is also done by wpa_supplicant, but it doesn't do it for the normal one, only for additional ones, which is different with iwd. Anyway, during shutdown, iwd quits while the netdev is still UP, i.e. IFF_UP is set. This causes the stack trace that Linus so nicely transcribed from the pictures: cfg80211_destroy_iface_wk() takes wiphy_lock -> cfg80211_destroy_ifaces() ->ieee80211_del_iface ->ieeee80211_if_remove ->cfg80211_unregister_wdev ->unregister_netdevice_queue ->dev_close_many ->__dev_close_many ->raw_notifier_call_chain ->cfg80211_netdev_notifier_call and that last call tries to take wiphy_lock again. In commit a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") I had taken into account the possibility of recursing from cfg80211 into cfg80211_netdev_notifier_call() via the network stack, but only for NETDEV_UNREGISTER, not for what happens here, NETDEV_GOING_DOWN and NETDEV_DOWN notifications. Additionally, while this worked still back in commit 78f22b6a3a92 ("cfg80211: allow userspace to take ownership of interfaces"), it missed another corner case: unregistering a netdev will cause dev_close() to be called, and thus stop wireless operations (e.g. disconnecting), but there are some types of virtual interfaces in wifi that don't have a netdev - for that we need an additional call to cfg80211_leave(). So, to fix this mess, change cfg80211_destroy_ifaces() to not require the wiphy_lock(), but instead make it acquire it, but only after it has actually closed all the netdevs on the list, and then call cfg80211_leave() as well before removing them from the driver, to fix the second issue. The locking change in this requires modifying the nl80211 call to not get the wiphy lock passed in, but acquire it by itself after flushing any potentially pending destruction requests. [1] https://lore.kernel.org/r/09464e67-f3de-ac09-28a3-e27b7914ee7d@skogtun.org Cc: stable@vger.kernel.org # 5.12 Reported-by: Harald Arnesen Fixes: 776a39b8196d ("cfg80211: call cfg80211_destroy_ifaces() with wiphy lock held") Fixes: 78f22b6a3a92 ("cfg80211: allow userspace to take ownership of interfaces") Signed-off-by: Johannes Berg Tested-by: Harald Arnesen Signed-off-by: Linus Torvalds commit bb0247807744dc93407771e13ba20af0b270ca6a Author: Lorenzo Bianconi Date: Fri Apr 23 11:27:27 2021 +0200 bpf, cpumap: Bulk skb using netif_receive_skb_list Rely on netif_receive_skb_list routine to send skbs converted from xdp_frames in cpu_map_kthread_run in order to improve i-cache usage. The proposed patch has been tested running xdp_redirect_cpu bpf sample available in the kernel tree that is used to redirect UDP frames from ixgbe driver to a cpumap entry and then to the networking stack. UDP frames are generated using pktgen. Packets are discarded by the UDP layer. $ xdp_redirect_cpu --cpu --progname xdp_cpu_map0 --dev bpf-next: ~2.35Mpps bpf-next + cpumap skb-list: ~2.72Mpps Rename drops counter in kmem_alloc_drops since now it reports just kmem_cache_alloc_bulk failures Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/c729f83e5d7482d9329e0f165bdbe5adcefd1510.1619169700.git.lorenzo@kernel.org commit 10bf4e83167cc68595b85fd73bb91e8f2c086e36 Author: Daniel Borkmann Date: Fri Apr 23 13:59:55 2021 +0000 bpf: Fix propagation of 32 bit unsigned bounds from 64 bit bounds Similarly as b02709587ea3 ("bpf: Fix propagation of 32-bit signed bounds from 64-bit bounds."), we also need to fix the propagation of 32 bit unsigned bounds from 64 bit counterparts. That is, really only set the u32_{min,max}_value when /both/ {umin,umax}_value safely fit in 32 bit space. For example, the register with a umin_value == 1 does /not/ imply that u32_min_value is also equal to 1, since umax_value could be much larger than 32 bit subregister can hold, and thus u32_min_value is in the interval [0,1] instead. Before fix, invalid tracking result of R2_w=inv1: [...] 5: R0_w=inv1337 R1=ctx(id=0,off=0,imm=0) R2_w=inv(id=0) R10=fp0 5: (35) if r2 >= 0x1 goto pc+1 [...] // goto path 7: R0=inv1337 R1=ctx(id=0,off=0,imm=0) R2=inv(id=0,umin_value=1) R10=fp0 7: (b6) if w2 <= 0x1 goto pc+1 [...] // goto path 9: R0=inv1337 R1=ctx(id=0,off=0,imm=0) R2=inv(id=0,smin_value=-9223372036854775807,smax_value=9223372032559808513,umin_value=1,umax_value=18446744069414584321,var_off=(0x1; 0xffffffff00000000),s32_min_value=1,s32_max_value=1,u32_max_value=1) R10=fp0 9: (bc) w2 = w2 10: R0=inv1337 R1=ctx(id=0,off=0,imm=0) R2_w=inv1 R10=fp0 [...] After fix, correct tracking result of R2_w=inv(id=0,umax_value=1,var_off=(0x0; 0x1)): [...] 5: R0_w=inv1337 R1=ctx(id=0,off=0,imm=0) R2_w=inv(id=0) R10=fp0 5: (35) if r2 >= 0x1 goto pc+1 [...] // goto path 7: R0=inv1337 R1=ctx(id=0,off=0,imm=0) R2=inv(id=0,umin_value=1) R10=fp0 7: (b6) if w2 <= 0x1 goto pc+1 [...] // goto path 9: R0=inv1337 R1=ctx(id=0,off=0,imm=0) R2=inv(id=0,smax_value=9223372032559808513,umax_value=18446744069414584321,var_off=(0x0; 0xffffffff00000001),s32_min_value=0,s32_max_value=1,u32_max_value=1) R10=fp0 9: (bc) w2 = w2 10: R0=inv1337 R1=ctx(id=0,off=0,imm=0) R2_w=inv(id=0,umax_value=1,var_off=(0x0; 0x1)) R10=fp0 [...] Thus, same issue as in b02709587ea3 holds for unsigned subregister tracking. Also, align __reg64_bound_u32() similarly to __reg64_bound_s32() as done in b02709587ea3 to make them uniform again. Fixes: 3f50f132d840 ("bpf: Verifier, do explicit ALU32 bounds tracking") Reported-by: Manfred Paul (@_manfp) Signed-off-by: Daniel Borkmann Reviewed-by: John Fastabend Acked-by: Alexei Starovoitov commit 38d26d89b31d0766d431471572cc9b007ca19c98 Author: Florent Revest Date: Tue Apr 27 13:29:58 2021 +0200 bpf: Lock bpf_trace_printk's tmp buf before it is written to bpf_trace_printk uses a shared static buffer to hold strings before they are printed. A recent refactoring moved the locking of that buffer after it gets filled by mistake. Fixes: d9c9e4db186a ("bpf: Factorize bpf_trace_printk and bpf_seq_printf") Reported-by: Rasmus Villemoes Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210427112958.773132-1-revest@chromium.org commit adb68c38d8d49a3d60805479c558649bb2182473 Author: Vaibhav Jain Date: Mon Mar 29 17:01:03 2021 +0530 powerpc/papr_scm: Mark nvdimm as unarmed if needed during probe In case an nvdimm is found to be unarmed during probe then set its NDD_UNARMED flag before nvdimm_create(). This would enforce a read-only access to the ndimm region. Presently even if an nvdimm is unarmed its not marked as read-only on ppc64 guests. The patch updates papr_scm_nvdimm_init() to force query of nvdimm health via __drc_pmem_query_health() and if nvdimm is found to be unarmed then set the nvdimm flag ND_UNARMED for nvdimm_create(). Signed-off-by: Vaibhav Jain Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210329113103.476760-1-vaibhav@linux.ibm.com commit 7b289c38335ec7bebe45ed31137d596c808e23ac Author: Hao Xu Date: Tue Apr 13 15:20:39 2021 +0800 io_uring: maintain drain logic for multishot poll requests Now that we have multishot poll requests, one SQE can emit multiple CQEs. given below example: sqe0(multishot poll)-->sqe1-->sqe2(drain req) sqe2 is designed to issue after sqe0 and sqe1 completed, but since sqe0 is a multishot poll request, sqe2 may be issued after sqe0's event triggered twice before sqe1 completed. This isn't what users leverage drain requests for. Here the solution is to wait for multishot poll requests fully completed. To achieve this, we should reconsider the req_need_defer equation, the original one is: all_sqes(excluding dropped ones) == all_cqes(including dropped ones) This means we issue a drain request when all the previous submitted SQEs have generated their CQEs. Now we should consider multishot requests, we deduct all the multishot CQEs except the cancellation one, In this way a multishot poll request behave like a normal request, so: all_sqes == all_cqes - multishot_cqes(except cancellations) Here we introduce cq_extra for it. Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/1618298439-136286-1-git-send-email-haoxu@linux.alibaba.com Signed-off-by: Jens Axboe commit 6d042ffb598ed83e7d5623cc961d249def5b9829 Author: Palash Oswal Date: Tue Apr 27 18:21:49 2021 +0530 io_uring: Check current->io_uring in io_uring_cancel_sqpoll syzkaller identified KASAN: null-ptr-deref Write in io_uring_cancel_sqpoll. io_uring_cancel_sqpoll is called by io_sq_thread before calling io_uring_alloc_task_context. This leads to current->io_uring being NULL. io_uring_cancel_sqpoll should not have to deal with threads where current->io_uring is NULL. In order to cast a wider safety net, perform input sanitisation directly in io_uring_cancel_sqpoll and return for NULL value of current->io_uring. This is safe since if current->io_uring isn't set, then there's no way for the task to have submitted any requests. Reported-by: syzbot+be51ca5a4d97f017cd50@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Palash Oswal Link: https://lore.kernel.org/r/20210427125148.21816-1-hello@oswalpalash.com Signed-off-by: Jens Axboe commit c8dbea6df351df211216b5f8877b020f21ecf75f Merge: da34b03fbd0a6 acebb5597ff18 Author: Petr Mladek Date: Tue Apr 27 14:32:09 2021 +0200 Merge branch 'printk-rework' into for-linus commit da34b03fbd0a6e58770d5fe00830674633a57d60 Merge: 84696cfaf4d90 c244297acbe51 Author: Petr Mladek Date: Tue Apr 27 14:31:38 2021 +0200 Merge branch 'for-5.13-vsprintf-pgp' into for-linus commit c6e2f52e3051e8d898d38840104638ca8bbcdec2 Author: Hyeongseok Kim Date: Mon Mar 22 12:53:36 2021 +0900 exfat: speed up iterate/lookup by fixing start point of traversing cluster chain When directory iterate and lookup is called, there's a buggy rewinding of start point for traversing cluster chain to the parent directory entry's first cluster. This caused repeated cluster chain traversing from the first entry of the parent directory that would show worse performance if huge amounts of files exist under the parent directory. Fix not to rewind, make continue from currently referenced cluster and dir entry. Tested with 50,000 files under single directory / 256GB sdcard, with command "time ls -l > /dev/null", Before : 0m08.69s real 0m00.27s user 0m05.91s system After : 0m07.01s real 0m00.25s user 0m04.34s system Signed-off-by: Hyeongseok Kim Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 23befe490ba885bdf757d40b2489134315fef690 Author: Hyeongseok Kim Date: Mon Mar 15 13:12:55 2021 +0900 exfat: improve write performance when dirsync enabled Degradation of write speed caused by frequent disk access for cluster bitmap update on every cluster allocation could be improved by selective syncing bitmap buffer. Change to flush bitmap buffer only for the directory related operations. Signed-off-by: Hyeongseok Kim Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 654762df2ec7d61b05acc788afbffaba52d658fe Author: Hyeongseok Kim Date: Thu Mar 4 09:20:35 2021 +0900 exfat: add support ioctl and FITRIM function Add FITRIM ioctl to enable discarding unused blocks while mounted. As current exFAT doesn't have generic ioctl handler, add empty ioctl function first, and add FITRIM handler. Signed-off-by: Hyeongseok Kim Reviewed-by: Chaitanya Kulkarni Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 5c2d728507299f84631ab8020d6f0f98f2cb8fc2 Author: Hyeongseok Kim Date: Tue Mar 2 14:05:20 2021 +0900 exfat: introduce bitmap_lock for cluster bitmap access s_lock which is for protecting concurrent access of file operations is too huge for cluster bitmap protection, so introduce a new bitmap_lock to narrow the lock range if only need to access cluster bitmap. Signed-off-by: Hyeongseok Kim Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 77edfc6e51055b61cae2f54c8e6c3bb7c762e4fe Author: Hyeongseok Kim Date: Thu Mar 4 09:15:34 2021 +0900 exfat: fix erroneous discard when clear cluster bit If mounted with discard option, exFAT issues discard command when clear cluster bit to remove file. But the input parameter of cluster-to-sector calculation is abnormally added by reserved cluster size which is 2, leading to discard unrelated sectors included in target+2 cluster. With fixing this, remove the wrong comments in set/clear/find bitmap functions. Fixes: 1e49a94cf707 ("exfat: add bitmap operations") Cc: stable@vger.kernel.org # v5.7+ Signed-off-by: Hyeongseok Kim Acked-by: Sungjong Seo Signed-off-by: Namjae Jeon commit 03f840c49207e8c125b3df8c29c13137c6675d42 Author: Wan Jiabing Date: Tue Apr 27 11:30:31 2021 +0800 firmware: arm_scmi: Remove duplicate declaration of struct scmi_protocol_handle struct scmi_protocol_handle is declared twice, let us remove the duplicate declaration. Link: https://lore.kernel.org/r/20210427033031.4580-1-wanjiabing@vivo.com Reviewed-by: Cristian Marussi Signed-off-by: Wan Jiabing [sudeep.holla: minor updates to the title and the changelog] Signed-off-by: Sudeep Holla commit d9cd78edb2e6b7e26747c0ec312be31e7ef196fe Author: Dan Carpenter Date: Thu Apr 22 12:02:29 2021 +0300 firmware: arm_scpi: Prevent the ternary sign expansion bug How the type promotion works in ternary expressions is a bit tricky. The problem is that scpi_clk_get_val() returns longs, "ret" is a int which holds a negative error code, and le32_to_cpu() is an unsigned int. We want the negative error code to be cast to a negative long. But because le32_to_cpu() is an u32 then "ret" is type promoted to u32 and becomes a high positive and then it is promoted to long and it is still a high positive value. Fix this by getting rid of the ternary. Link: https://lore.kernel.org/r/YIE7pdqV/h10tEAK@mwanda Fixes: 8cb7cf56c9fe ("firmware: add support for ARM System Control and Power Interface(SCPI) protocol") Reviewed-by: Cristian Marussi Signed-off-by: Dan Carpenter [sudeep.holla: changed to return 0 as clock rate on error] Signed-off-by: Sudeep Holla commit adf27404e8a02cbcca9610bc51e41986c880b5aa Author: Masahiro Yamada Date: Mon Mar 1 23:58:23 2021 +0900 parisc: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts parisc to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada Signed-off-by: Helge Deller commit df86ddbb9189d4fe6fe2c143d244e1121b57eb50 Author: Masahiro Yamada Date: Mon Mar 1 23:58:22 2021 +0900 parisc: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts parisc to use scripts/syscalltbl.sh. This also unifies syscall_table_64.h and syscall_table_c32.h. Signed-off-by: Masahiro Yamada Acked-by: Helge Deller Signed-off-by: Helge Deller commit 0a96c05995ef1085f9c5e6bf005a04915dd2ec6f Author: Niklas Söderlund Date: Wed Apr 21 17:02:21 2021 +0200 arm64: dts: renesas: Add port@0 node for all CSI-2 nodes to dtsi The port@0 is a mandatory port, add or move the declaration to the CSI-2 nodes top declared in dtsi files instead of depending on dts files adding them when describing the external connection. This fixes validation warnings for DTB outputs that do not connect all CSI-2 receivers to transmitters and thus declaring all port@0 nodes in dts files. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20210421150221.3202955-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 366db3ac3cdf97e90695282b959c75d5ea58cf00 Author: Niklas Söderlund Date: Wed Apr 21 17:02:20 2021 +0200 arm64: dts: renesas: aistarvision-mipi-adapter-2.1: Fix CSI40 ports Fix the DTS schema by explicitly stating that the input is port@0. This fixes a schema validation error but has no runtime effect as the default port number is 0 if not specified. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20210421150221.3202955-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit e861431303d23428bf26e8496252d7bee260a956 Author: Pierre-Louis Bossart Date: Mon Apr 26 16:39:02 2021 -0500 ALSA: virtio: fix kernel-doc make W=1 warning: sound/virtio/virtio_ctl_msg.c:70: warning: expecting prototype for virtsnd_ctl_msg_request(). Prototype was for virtsnd_ctl_msg_response() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210426213902.234711-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit e4ec10228fdf09b88ba018009f14a696fb50d3f2 Author: James Smart Date: Wed Apr 21 16:45:11 2021 -0700 scsi: lpfc: Fix bad memory access during VPD DUMP mailbox command The dump command for reading a region passes a requested read length specified in words (4-byte units). The response overwrites the same field with the actual number of bytes read. The mailbox handler for DUMP which reads VPD data (region 23) is treating the response field as if it were still a word_cnt, thus multiplying it by 4 to set the read's "length". Given the read value was calculated based on the size of the read buffer, the longer response length runs off the end of the buffer. Fix by reworking the code to use the response field as a byte count. Link: https://lore.kernel.org/r/20210421234511.102206-1-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 83adbba746d1c8b6e3b07d73ae7815044804c96e Author: James Smart Date: Wed Apr 21 16:44:48 2021 -0700 scsi: lpfc: Fix DMA virtual address ptr assignment in bsg lpfc_bsg_ct_unsol_event() routine acts assigns a ct_request to the wrong structure address, resulting in a bad address that results in bsg related timeouts. Correct the ct_request assignment to use the kernel virtual buffer address (not the control structure address). Link: https://lore.kernel.org/r/20210421234448.102132-1-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit e1364711359f3ced054bda9920477c8bf93b74c5 Author: James Smart Date: Wed Apr 21 16:44:33 2021 -0700 scsi: lpfc: Fix illegal memory access on Abort IOCBs In devloss timer handler and in backend calls to terminate remote port I/O, there is logic to walk through all active IOCBs and validate them to potentially trigger an abort request. This logic is causing illegal memory accesses which leads to a crash. Abort IOCBs, which may be on the list, do not have an associated lpfc_io_buf struct. The driver is trying to map an lpfc_io_buf struct on the IOCB and which results in a bogus address thus the issue. Fix by skipping over ABORT IOCBs (CLOSE IOCBs are ABORTS that don't send ABTS) in the IOCB scan logic. Link: https://lore.kernel.org/r/20210421234433.102079-1-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 781a5739489949fd0f32432a9da17f7ddbccf1cc Author: Nayna Jain Date: Thu Apr 22 21:16:02 2021 -0400 ima: ensure IMA_APPRAISE_MODSIG has necessary dependencies IMA_APPRAISE_MODSIG is used for verifying the integrity of both kernel and modules. Enabling IMA_APPRAISE_MODSIG without MODULES causes a build break. Ensure the build time kernel signing key is only generated if both IMA_APPRAISE_MODSIG and MODULES are enabled. Fixes: 0165f4ca223b ("ima: enable signing of modules with build time generated key") Reported-by: Randy Dunlap Reported-by: Stephen Rothwell Acked-by: Randy Dunlap # build-tested Signed-off-by: Nayna Jain Signed-off-by: Mimi Zohar commit 927315041828fcbead6d2ace38c6dee5af95e40f Merge: 87bd9e602e395 bede0ebf0be87 Author: Alexei Starovoitov Date: Mon Apr 26 18:37:14 2021 -0700 Merge branch 'CO-RE relocation selftests fixes' Andrii Nakryiko says: ==================== Lorenz Bauer noticed that core_reloc selftest has two inverted CHECK() conditions, allowing failing tests to pass unnoticed. Fixing that opened up few long-standing (field existence and direct memory bitfields) and one recent failures (BTF_KIND_FLOAT relos). This patch set fixes core_reloc selftest to capture such failures reliably in the future. It also fixes all the newly failing tests. See individual patches for details. This patch set also completes a set of ASSERT_xxx() macros, so now there should be a very little reason to use verbose and error-prone generic CHECK() macro. v1->v2: - updated bpf_core_fields_are_compat() comment to mention FLOAT (Lorenz). Cc: Lorenz Bauer ==================== Signed-off-by: Alexei Starovoitov commit bede0ebf0be87e9678103486a77f39e0334c6791 Author: Andrii Nakryiko Date: Mon Apr 26 12:29:49 2021 -0700 selftests/bpf: Fix core_reloc test runner Fix failed tests checks in core_reloc test runner, which allowed failing tests to pass quietly. Also add extra check to make sure that expected to fail test cases with invalid names are caught as test failure anyway, as this is not an expected failure mode. Also fix mislabeled probed vs direct bitfield test cases. Fixes: 124a892d1c41 ("selftests/bpf: Test TYPE_EXISTS and TYPE_SIZE CO-RE relocations") Reported-by: Lorenz Bauer Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20210426192949.416837-6-andrii@kernel.org commit 5a30eb23922b52f33222c6729b6b3ff1c37a6c66 Author: Andrii Nakryiko Date: Mon Apr 26 12:29:48 2021 -0700 selftests/bpf: Fix field existence CO-RE reloc tests Negative field existence cases for have a broken assumption that FIELD_EXISTS CO-RE relo will fail for fields that match the name but have incompatible type signature. That's not how CO-RE relocations generally behave. Types and fields that match by name but not by expected type are treated as non-matching candidates and are skipped. Error later is reported if no matching candidate was found. That's what happens for most relocations, but existence relocations (FIELD_EXISTS and TYPE_EXISTS) are more permissive and they are designed to return 0 or 1, depending if a match is found. This allows to handle name-conflicting but incompatible types in BPF code easily. Combined with ___flavor suffixes, it's possible to handle pretty much any structural type changes in kernel within the compiled once BPF source code. So, long story short, negative field existence test cases are invalid in their assumptions, so this patch reworks them into a single consolidated positive case that doesn't match any of the fields. Fixes: c7566a69695c ("selftests/bpf: Add field existence CO-RE relocs tests") Reported-by: Lorenz Bauer Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20210426192949.416837-5-andrii@kernel.org commit 0f20615d64ee2ad5e2a133a812382d0c4071589b Author: Andrii Nakryiko Date: Mon Apr 26 12:29:47 2021 -0700 selftests/bpf: Fix BPF_CORE_READ_BITFIELD() macro Fix BPF_CORE_READ_BITFIELD() macro used for reading CO-RE-relocatable bitfields. Missing breaks in a switch caused 8-byte reads always. This can confuse libbpf because it does strict checks that memory load size corresponds to the original size of the field, which in this case quite often would be wrong. After fixing that, we run into another problem, which quite subtle, so worth documenting here. The issue is in Clang optimization and CO-RE relocation interactions. Without that asm volatile construct (also known as barrier_var()), Clang will re-order BYTE_OFFSET and BYTE_SIZE relocations and will apply BYTE_OFFSET 4 times for each switch case arm. This will result in the same error from libbpf about mismatch of memory load size and original field size. I.e., if we were reading u32, we'd still have *(u8 *), *(u16 *), *(u32 *), and *(u64 *) memory loads, three of which will fail. Using barrier_var() forces Clang to apply BYTE_OFFSET relocation first (and once) to calculate p, after which value of p is used without relocation in each of switch case arms, doing appropiately-sized memory load. Here's the list of relevant relocations and pieces of generated BPF code before and after this patch for test_core_reloc_bitfields_direct selftests. BEFORE ===== #45: core_reloc: insn #160 --> [5] + 0:5: byte_sz --> struct core_reloc_bitfields.u32 #46: core_reloc: insn #167 --> [5] + 0:5: byte_off --> struct core_reloc_bitfields.u32 #47: core_reloc: insn #174 --> [5] + 0:5: byte_off --> struct core_reloc_bitfields.u32 #48: core_reloc: insn #178 --> [5] + 0:5: byte_off --> struct core_reloc_bitfields.u32 #49: core_reloc: insn #182 --> [5] + 0:5: byte_off --> struct core_reloc_bitfields.u32 157: 18 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r2 = 0 ll 159: 7b 12 20 01 00 00 00 00 *(u64 *)(r2 + 288) = r1 160: b7 02 00 00 04 00 00 00 r2 = 4 ; BYTE_SIZE relocation here ^^^ 161: 66 02 07 00 03 00 00 00 if w2 s> 3 goto +7 162: 16 02 0d 00 01 00 00 00 if w2 == 1 goto +13 163: 16 02 01 00 02 00 00 00 if w2 == 2 goto +1 164: 05 00 12 00 00 00 00 00 goto +18 0000000000000528 : 165: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll 167: 69 11 08 00 00 00 00 00 r1 = *(u16 *)(r1 + 8) ; BYTE_OFFSET relo here w/ WRONG size ^^^^^^^^^^^^^^^^ 168: 05 00 0e 00 00 00 00 00 goto +14 0000000000000548 : 169: 16 02 0a 00 04 00 00 00 if w2 == 4 goto +10 170: 16 02 01 00 08 00 00 00 if w2 == 8 goto +1 171: 05 00 0b 00 00 00 00 00 goto +11 0000000000000560 : 172: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll 174: 79 11 08 00 00 00 00 00 r1 = *(u64 *)(r1 + 8) ; BYTE_OFFSET relo here w/ WRONG size ^^^^^^^^^^^^^^^^ 175: 05 00 07 00 00 00 00 00 goto +7 0000000000000580 : 176: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll 178: 71 11 08 00 00 00 00 00 r1 = *(u8 *)(r1 + 8) ; BYTE_OFFSET relo here w/ WRONG size ^^^^^^^^^^^^^^^^ 179: 05 00 03 00 00 00 00 00 goto +3 00000000000005a0 : 180: 18 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r1 = 0 ll 182: 61 11 08 00 00 00 00 00 r1 = *(u32 *)(r1 + 8) ; BYTE_OFFSET relo here w/ RIGHT size ^^^^^^^^^^^^^^^^ 00000000000005b8 : 183: 67 01 00 00 20 00 00 00 r1 <<= 32 184: b7 02 00 00 00 00 00 00 r2 = 0 185: 16 02 02 00 00 00 00 00 if w2 == 0 goto +2 186: c7 01 00 00 20 00 00 00 r1 s>>= 32 187: 05 00 01 00 00 00 00 00 goto +1 00000000000005e0 : 188: 77 01 00 00 20 00 00 00 r1 >>= 32 AFTER ===== #30: core_reloc: insn #132 --> [5] + 0:5: byte_off --> struct core_reloc_bitfields.u32 #31: core_reloc: insn #134 --> [5] + 0:5: byte_sz --> struct core_reloc_bitfields.u32 129: 18 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 r2 = 0 ll 131: 7b 12 20 01 00 00 00 00 *(u64 *)(r2 + 288) = r1 132: b7 01 00 00 08 00 00 00 r1 = 8 ; BYTE_OFFSET relo here ^^^ ; no size check for non-memory dereferencing instructions 133: 0f 12 00 00 00 00 00 00 r2 += r1 134: b7 03 00 00 04 00 00 00 r3 = 4 ; BYTE_SIZE relocation here ^^^ 135: 66 03 05 00 03 00 00 00 if w3 s> 3 goto +5 136: 16 03 09 00 01 00 00 00 if w3 == 1 goto +9 137: 16 03 01 00 02 00 00 00 if w3 == 2 goto +1 138: 05 00 0a 00 00 00 00 00 goto +10 0000000000000458 : 139: 69 21 00 00 00 00 00 00 r1 = *(u16 *)(r2 + 0) ; NO CO-RE relocation here ^^^^^^^^^^^^^^^^ 140: 05 00 08 00 00 00 00 00 goto +8 0000000000000468 : 141: 16 03 06 00 04 00 00 00 if w3 == 4 goto +6 142: 16 03 01 00 08 00 00 00 if w3 == 8 goto +1 143: 05 00 05 00 00 00 00 00 goto +5 0000000000000480 : 144: 79 21 00 00 00 00 00 00 r1 = *(u64 *)(r2 + 0) ; NO CO-RE relocation here ^^^^^^^^^^^^^^^^ 145: 05 00 03 00 00 00 00 00 goto +3 0000000000000490 : 146: 71 21 00 00 00 00 00 00 r1 = *(u8 *)(r2 + 0) ; NO CO-RE relocation here ^^^^^^^^^^^^^^^^ 147: 05 00 01 00 00 00 00 00 goto +1 00000000000004a0 : 148: 61 21 00 00 00 00 00 00 r1 = *(u32 *)(r2 + 0) ; NO CO-RE relocation here ^^^^^^^^^^^^^^^^ 00000000000004a8 : 149: 67 01 00 00 20 00 00 00 r1 <<= 32 150: b7 02 00 00 00 00 00 00 r2 = 0 151: 16 02 02 00 00 00 00 00 if w2 == 0 goto +2 152: c7 01 00 00 20 00 00 00 r1 s>>= 32 153: 05 00 01 00 00 00 00 00 goto +1 00000000000004d0 : 154: 77 01 00 00 20 00 00 00 r1 >>= 323 Fixes: ee26dade0e3b ("libbpf: Add support for relocatable bitfields") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20210426192949.416837-4-andrii@kernel.org commit 6709a914c8498f42b1498b3d31f4b078d092fd35 Author: Andrii Nakryiko Date: Mon Apr 26 12:29:46 2021 -0700 libbpf: Support BTF_KIND_FLOAT during type compatibility checks in CO-RE Add BTF_KIND_FLOAT support when doing CO-RE field type compatibility check. Without this, relocations against float/double fields will fail. Also adjust one error message to emit instruction index instead of less convenient instruction byte offset. Fixes: 22541a9eeb0d ("libbpf: Add BTF_KIND_FLOAT support") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20210426192949.416837-3-andrii@kernel.org commit 7a2fa70aaffc2f8823feca22709a00f5c069a8a9 Author: Andrii Nakryiko Date: Mon Apr 26 12:29:45 2021 -0700 selftests/bpf: Add remaining ASSERT_xxx() variants Add ASSERT_TRUE/ASSERT_FALSE for conditions calculated with custom logic to true/false. Also add remaining arithmetical assertions: - ASSERT_LE -- less than or equal; - ASSERT_GT -- greater than; - ASSERT_GE -- greater than or equal. This should cover most scenarios where people fall back to error-prone CHECK()s. Also extend ASSERT_ERR() to print out errno, in addition to direct error. Also convert few CHECK() instances to ensure new ASSERT_xxx() variants work as expected. Subsequent patch will also use ASSERT_TRUE/ASSERT_FALSE more extensively. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20210426192949.416837-2-andrii@kernel.org commit ee1bc694fbaec1a662770703fc34a74abf418938 Author: Michael Ellerman Date: Sun Apr 25 21:58:31 2021 +1000 powerpc/kvm: Fix build error when PPC_MEM_KEYS/PPC_PSERIES=n lkp reported a randconfig failure: In file included from arch/powerpc/include/asm/book3s/64/pkeys.h:6, from arch/powerpc/kvm/book3s_64_mmu_host.c:15: arch/powerpc/include/asm/book3s/64/hash-pkey.h: In function 'hash__vmflag_to_pte_pkey_bits': >> arch/powerpc/include/asm/book3s/64/hash-pkey.h:10:23: error: 'VM_PKEY_BIT0' undeclared 10 | return (((vm_flags & VM_PKEY_BIT0) ? H_PTE_PKEY_BIT0 : 0x0UL) | | ^~~~~~~~~~~~ We added the include of book3s/64/pkeys.h for pte_to_hpte_pkey_bits(), but that header on its own should only be included when PPC_MEM_KEYS=y. Instead include linux/pkeys.h, which brings in the right definitions when PPC_MEM_KEYS=y and also provides empty stubs when PPC_MEM_KEYS=n. Fixes: e4e8bc1df691 ("powerpc/kvm: Fix PR KVM with KUAP/MEM_KEYS enabled") Cc: stable@vger.kernel.org # v5.11+ Reported-by: kernel test robot Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210425115831.2818434-1-mpe@ellerman.id.au commit 1ca86ac1ec8d201478e9616565d4df5d51595cfc Author: Yanwei Gao Date: Wed Mar 10 06:52:12 2021 +0000 LSM: SafeSetID: Fix code specification by scripts/checkpatch.pl First, the code is found to be irregular through checkpatch.pl. Then I found break is really useless here. Signed-off-by: Yanwei Gao Signed-off-by: Micah Morton commit 4a0225c3d208cfa6e4550f2210ffd9114a952a81 Merge: ca62e9090d229 86527bcbc8892 Author: Linus Torvalds Date: Mon Apr 26 16:32:11 2021 -0700 Merge tag 'spi-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "The only core work for SPI this time around is the completion of the conversion to the new style method for specifying transfer delays, meaning we can cope with what most controllers support more directly using conversions in the core rather than open coding in drivers. Otherwise it's a good stack of cleanups and fixes plus a few new drivers. Summary: - Completion of the conversion to new style transfer delay configuration - Introduction and use of module_parport_driver() helper, merged here as there's no parport tree - Support for Altera SoCs on DFL buses, NXP i.MX8DL, HiSilicon Kunpeng, MediaTek MT8195" * tag 'spi-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (113 commits) spi: Rename enable1 to activate in spi_set_cs() spi: Convert Freescale QSPI binding to json schema spi: stm32-qspi: fix debug format string spi: tools: make a symbolic link to the header file spi.h spi: fsi: add a missing of_node_put spi: Make error handling of gpiod_count() call cleaner spidev: Add Micron SPI NOR Authenta device compatible spi: brcm,spi-bcm-qspi: convert to the json-schema spi: altera: Add DFL bus driver for Altera API Controller spi: altera: separate core code from platform code spi: stm32-qspi: Fix compilation warning in ARM64 spi: Handle SPI device setup callback failure. spi: sync up initial chipselect state spi: stm32-qspi: Add dirmap support spi: stm32-qspi: Trigger DMA only if more than 4 bytes to transfer spi: stm32-qspi: fix pm_runtime usage_count counter spi: spi-zynqmp-gqspi: return -ENOMEM if dma_map_single fails spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op spi: spi-zynqmp-gqspi: Resolved slab-out-of-bounds bug spi: spi-zynqmp-gqspi: fix hang issue when suspend/resume ... commit ca62e9090d229926f43f20291bb44d67897baab7 Merge: fed584c408c12 4dd1c95306980 Author: Linus Torvalds Date: Mon Apr 26 16:24:42 2021 -0700 Merge tag 'regulator-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "Not much going on with regulator this cycle, even in terms of cleanups and fixes things were fairly quiet. - New helper for setting ramp delay - Conversion of the Qualcomm RPMH bindings to YAML - Support for Tang Cheng TCS4525" * tag 'regulator-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (26 commits) regulator: Add binding for TCS4525 regulator: fan53555: Add TCS4525 DCDC support dt-bindings: vendor-prefixes: Add Tang Cheng (TCS) regulator: core: Fix off_on_delay handling regulator: core: Respect off_on_delay at startup regulator: core.c: Improve a comment regulator: Avoid a double 'of_node_get' in 'regulator_of_get_init_node()' regulator: core.c: Fix indentation of comment regulator: s2mps11: Drop initialization via platform data regulator: s2mpa01: Drop initialization via platform data regulator: da9121: automotive variants identity fix regulator: Add regmap helper for ramp-delay setting regulator: helpers: Export helper voltage listing regulator: Add compatibles for PM7325/PMR735A regulator: Convert RPMh regulator bindings to YAML regulator: qcom-rpmh: Add PM7325/PMR735A regulator support regulator: qcom-rpmh: Add pmic5_ftsmps520 buck regulator: mt6360: remove redundant error print regulator: bd9576: Fix return from bd957x_probe() regulator: add missing call to of_node_put() ... commit fed584c408c123e2a0a7dd1f630d96b84e7f9e97 Merge: 070a7252d21b8 ccac12acc0c0d Author: Linus Torvalds Date: Mon Apr 26 16:21:16 2021 -0700 Merge tag 'regmap-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "A couple of fixes in this release, plus a couple of new features for regmap-irq - we now support sub-irq blocks at arbatrary addresses and can remap configuration bitfields for interrupts split over multiple registers to the Linux configurations" * tag 'regmap-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap-irq: Fix dereference of a potentially null d->virt_buf regmap-irq: Add driver callback to configure virtual regs regmap-irq: Introduce virtual regs to handle more config regs regmap-irq: Extend sub-irq to support non-fixed reg strides regmap: set debugfs_name to NULL after it is freed commit 070a7252d21b8e8900ee8540f82f0f1a348f8816 Merge: e19eede54240d a881537dfaf28 Author: Linus Torvalds Date: Mon Apr 26 16:16:09 2021 -0700 Merge tag 'mtd/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux Pull mtd updates from Miquel Raynal: "MTD core: - Handle possible -EPROBE_DEFER from parse_mtd_partitions() - Constify buf in mtd_write_user_prot_reg() - Constify name param in mtd_bdi_init - Fix fall-through warnings for Clang - Get rid of Big MTD Lock ouf of mtdchar - Drop mtd_mutex usage from mtdchar_open() - Don't lock when recursively deleting partitions - Use module_mtd_blktrans() to register driver when relevant - Parse MTD as NVMEM cells - New OTP (one-time-programmable) erase ioctl - Require write permissions for locking and badblock ioctls - physmap: - Fix error return code of physmap_flash_remove() - physmap-bt1-rom: Fix unintentional stack access - ofpart parser: - Support Linksys Northstar partitions - Make symbol 'bcm4908_partitions_quirks' static - Limit parsing of deprecated DT syntax - Support BCM4908 fixed partitions - Qcom parser: - Incompatible with spi-nor 4k sectors - Fix error condition - Extend Qcom SMEM parser to SPI flash CFI: - Disable broken buffered writes for CFI chips within ID 0x2201 - Address a Coverity report for unused value SPI NOR core: - Add OTP support - Fix module unload while an op in progress - Add various cleanup patches - Add Michael and Pratyush as designated reviewers in MAINTAINERS SPI NOR controller drivers: - intel-spi: - Move platform data header to x86 subfolder NAND core: - Fix error handling in nand_prog_page_op() (x2) - Add a helper to retrieve the number of ECC bytes per step - Add a helper to retrieve the number of ECC steps - Let ECC engines advertize the exact number of steps - ECC Hamming: - Populate the public nsteps field - Use the public nsteps field - ECC BCH: - Populate the public nsteps field - Use the public nsteps field Raw NAND core: - Add support for secure regions in NAND memory - Try not to use the ECC private structures - Remove duplicate include in rawnand.h - BBT: - Skip bad blocks when searching for the BBT in NAND (APPLIED THEN REVERTED) Raw NAND controller drivers: - Qcom: - Convert bindings to YAML - Use dma_mapping_error() for error check - Add missing nand_cleanup() in error path - Return actual error code instead of -ENODEV - Update last code word register - Add helper to configure location register - Rename parameter name in macro - Add helper to check last code word - Convert nandc to chip in Read/Write helper - Update register macro name for 0x2c offset - GPMI: - Fix a double free in gpmi_nand_init - Rockchip: - Use flexible-array member instead of zero-length array - Atmel: - Update ecc_stats.corrected counter - MXC: - Remove unneeded of_match_ptr() - R852: - replace spin_lock_irqsave by spin_lock in hard IRQ - Brcmnand: - Move to polling in pio mode on oops write - Read/write oob during EDU transfer - Fix OOB R/W with Hamming ECC - FSMC: - Fix error code in fsmc_nand_probe() - OMAP: - Use ECC information from the generic structures SPI-NAND core: - Add missing MODULE_DEVICE_TABLE() SPI-NAND drivers: - gigadevice: Support GD5F1GQ5UExxG" * tag 'mtd/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (89 commits) Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND" mtd: core: Constify buf in mtd_write_user_prot_reg() Revert "mtd: spi-nor: macronix: Add support for mx25l51245g" mtd: spi-nor: core: Fix an issue of releasing resources during read/write mtd: cfi_cmdset_0002: remove redundant assignment to variable timeo mtd: cfi_cmdset_0002: Disable buffered writes for AMD chip 0x2201 mtd: rawnand: qcom: Use dma_mapping_error() for error check mtd: rawnand: gpmi: Fix a double free in gpmi_nand_init mtd: rawnand: qcom: Add missing nand_cleanup() in error path mtd: rawnand: Add support for secure regions in NAND memory dt-bindings: mtd: Add a property to declare secure regions in NAND chips dt-bindings: mtd: Convert Qcom NANDc binding to YAML mtd: spi-nor: winbond: add OTP support to w25q32fw/jw mtd: spi-nor: implement OTP support for Winbond and similar flashes mtd: spi-nor: add OTP support mtd: spi-nor: swp: Improve code around spi_nor_check_lock_status_sr() mtd: spi-nor: Move Software Write Protection logic out of the core mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND include: linux: mtd: Remove duplicate include of nand.h mtd: parsers: ofpart: support Linksys Northstar partitions ... commit e19eede54240d64b4baf9b0df4dfb8191f7ae48b Merge: f0728bfeb21a2 3cb4d29a26331 Author: Linus Torvalds Date: Mon Apr 26 16:13:56 2021 -0700 Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi update from Jean Delvare. * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: MAINTAINERS: The DMI/SMBIOS tree has moved firmware/dmi: Include product_sku info to modalias commit 53b776c77aca99b663a5512a04abc27670d61058 Author: David Howells Date: Mon Apr 26 21:16:16 2021 +0100 netfs: Miscellaneous fixes Fix some miscellaneous things in the new netfs lib[1]: (1) The kerneldoc for netfs_readpage() shouldn't say netfs_page(). (2) netfs_readpage() can get an integer overflow on 32-bit when it multiplies page_index(page) by PAGE_SIZE. It should use page_file_offset() instead. (3) netfs_write_begin() should use page_offset() to avoid the same overflow. Note that netfs_readpage() needs to use page_file_offset() rather than page_offset() as it may see swap-over-NFS. Reported-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Jeff Layton Link: https://lore.kernel.org/r/161789062190.6155.12711584466338493050.stgit@warthog.procyon.org.uk/ [1] commit f0728bfeb21a24bbb7d5ad1828b67a359550fa17 Merge: 5469f160e6bf3 46b37c6e4b072 Author: Linus Torvalds Date: Mon Apr 26 15:19:04 2021 -0700 Merge tag 'devprop-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties framework update from Rafael Wysocki: "Add MAINTAINERS entry for software nodes core code (Heikki Krogerus)" * tag 'devprop-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: MAINTAINERS: Add entry for the software nodes commit 5469f160e6bf38b84eb237055868286e629b8d44 Merge: d8f9176b4ece1 59e2c959f20f9 Author: Linus Torvalds Date: Mon Apr 26 15:10:25 2021 -0700 Merge tag 'pm-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management updates from Rafael Wysocki: "These add some new hardware support (for example, IceLake-D idle states in intel_idle), fix some issues (for example, the handling of negative "sleep length" values in cpuidle governors), add new functionality to the existing drivers (for example, scale-invariance support in the ACPI CPPC cpufreq driver) and clean up code all over. Specifics: - Add idle states table for IceLake-D to the intel_idle driver and update IceLake-X C6 data in it (Artem Bityutskiy). - Fix the C7 idle state on Tegra114 in the tegra cpuidle driver and drop the unused do_idle() firmware call from it (Dmitry Osipenko). - Fix cpuidle-qcom-spm Kconfig entry (He Ying). - Fix handling of possible negative tick_nohz_get_next_hrtimer() return values of in cpuidle governors (Rafael Wysocki). - Add support for frequency-invariance to the ACPI CPPC cpufreq driver and update the frequency-invariance engine (FIE) to use it as needed (Viresh Kumar). - Simplify the default delay_us setting in the ACPI CPPC cpufreq driver (Tom Saeger). - Clean up frequency-related computations in the intel_pstate cpufreq driver (Rafael Wysocki). - Fix TBG parent setting for load levels in the armada-37xx cpufreq driver and drop the CPU PM clock .set_parent method for armada-37xx (Marek Behún). - Fix multiple issues in the armada-37xx cpufreq driver (Pali Rohár). - Fix handling of dev_pm_opp_of_cpumask_add_table() return values in cpufreq-dt to take the -EPROBE_DEFER one into acconut as appropriate (Quanyang Wang). - Fix format string in ia64-acpi-cpufreq (Sergei Trofimovich). - Drop the unused for_each_policy() macro from cpufreq (Shaokun Zhang). - Simplify computations in the schedutil cpufreq governor to avoid unnecessary overhead (Yue Hu). - Fix typos in the s5pv210 cpufreq driver (Bhaskar Chowdhury). - Fix cpufreq documentation links in Kconfig (Alexander Monakov). - Fix PCI device power state handling in pci_enable_device_flags() to avoid issuse in some cases when the device depends on an ACPI power resource (Rafael Wysocki). - Add missing documentation of pm_runtime_resume_and_get() (Alan Stern). - Add missing static inline stub for pm_runtime_has_no_callbacks() to pm_runtime.h and drop the unused try_to_freeze_nowarn() definition (YueHaibing). - Drop duplicate struct device declaration from pm.h and fix a structure type declaration in intel_rapl.h (Wan Jiabing). - Use dev_set_name() instead of an open-coded equivalent of it in the wakeup sources code and drop a redundant local variable initialization from it (Andy Shevchenko, Colin Ian King). - Use crc32 instead of md5 for e820 memory map integrity check during resume from hibernation on x86 (Chris von Recklinghausen). - Fix typos in comments in the system-wide and hibernation support code (Lu Jialin). - Modify the generic power domains (genpd) code to avoid resuming devices in the "prepare" phase of system-wide suspend and hibernation (Ulf Hansson). - Add Hygon Fam18h RAPL support to the intel_rapl power capping driver (Pu Wen). - Add MAINTAINERS entry for the dynamic thermal power management (DTPM) code (Daniel Lezcano). - Add devm variants of operating performance points (OPP) API functions and switch over some users of the OPP framework to the new resource-managed API (Yangtao Li and Dmitry Osipenko). - Update devfreq core: * Register devfreq devices as cooling devices on demand (Daniel Lezcano). * Add missing unlock opeation in devfreq_add_device() (Lukasz Luba). * Use the next frequency as resume_freq instead of the previous frequency when using the opp-suspend property (Dong Aisheng). * Check get_dev_status in devfreq_update_stats() (Dong Aisheng). * Fix set_freq path for the userspace governor in Kconfig (Dong Aisheng). * Remove invalid description of get_target_freq() (Dong Aisheng). - Update devfreq drivers: * imx8m-ddrc: Remove imx8m_ddrc_get_dev_status() and unneeded of_match_ptr() (Dong Aisheng, Fabio Estevam). * rk3399_dmc: dt-bindings: Add rockchip,pmu phandle and drop references to undefined symbols (Enric Balletbo i Serra, Gaël PORTAY). * rk3399_dmc: Use dev_err_probe() to simplify the code (Krzysztof Kozlowski). * imx-bus: Remove unneeded of_match_ptr() (Fabio Estevam). - Fix kernel-doc warnings in three places (Pierre-Louis Bossart). - Fix typo in the pm-graph utility code (Ricardo Ribalda)" * tag 'pm-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (74 commits) PM: wakeup: remove redundant assignment to variable retval PM: hibernate: x86: Use crc32 instead of md5 for hibernation e820 integrity check cpufreq: Kconfig: fix documentation links PM: wakeup: use dev_set_name() directly PM: runtime: Add documentation for pm_runtime_resume_and_get() cpufreq: intel_pstate: Simplify intel_pstate_update_perf_limits() cpufreq: armada-37xx: Fix module unloading cpufreq: armada-37xx: Remove cur_frequency variable cpufreq: armada-37xx: Fix determining base CPU frequency cpufreq: armada-37xx: Fix driver cleanup when registration failed clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0 clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz cpufreq: armada-37xx: Fix the AVS value for load L1 clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock cpufreq: armada-37xx: Fix setting TBG parent for load levels cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration cpuidle: tegra: Remove do_idle firmware call cpuidle: tegra: Fix C7 idling state on Tegra114 PM: sleep: fix typos in comments cpufreq: Remove unused for_each_policy macro ... commit d8f9176b4ece17e831306072678cd9ae49688cf5 Merge: 47080f2286110 b6237f61fc9ca Author: Linus Torvalds Date: Mon Apr 26 15:03:23 2021 -0700 Merge tag 'acpi-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "These update the ACPICA code in the kernel to the most recent upstream revision including (but not limited to) new material introduced in the 6.4 version of the spec, update message printing in the ACPI-related code, address a few issues and clean up code in a number of places. Specifics: - Update ACPICA code in the kernel to upstream revision 20210331 including the following changes: * Add parsing for IVRS IVHD 40h and device entry F0h (Alexander Monakov). * Add new CEDT table for CXL 2.0 and iASL support for it (Ben Widawsky, Bob Moore). * NFIT: add Location Cookie field (Bob Moore). * HMAT: add new fields/flags (Bob Moore). * Add new flags in SRAT (Bob Moore). * PMTT: add new fields/structures (Bob Moore). * Add CSI2Bus resource template (Bob Moore). * iASL: Decode subtable type field for VIOT (Bob Moore). * Fix various typos and spelling mistakes (Colin Ian King). * Add new predefined objects _BPC, _BPS, and _BPT (Erik Kaneda). * Add USB4 capabilities UUID (Erik Kaneda). * Add CXL ACPI device ID and _CBR object (Erik Kaneda). * MADT: add Multiprocessor Wakeup Structure (Erik Kaneda). * PCCT: add support for subtable type 5 (Erik Kaneda). * PPTT: add new version of subtable type 1 (Erik Kaneda). * Add SDEV secure access components (Erik Kaneda). * Add support for PHAT table (Erik Kaneda). * iASL: Add definitions for the VIOT table (Jean-Philippe Brucker). * acpisrc: Add missing conversion for VIOT support (Jean-Philippe Brucker). * IORT: Updates for revision E.b (Shameer Kolothum). - Rearrange message printing in ACPI-related code to avoid using the ACPICA's internal message printing macros outside ACPICA and do some related code cleanups (Rafael Wysocki). - Modify the device enumeration code to turn off all of the unused ACPI power resources at the end (Rafael Wysocki). - Change the ACPI power resources handling code to turn off unused ACPI power resources without checking their status which should not be necessary by the spec (Rafael Wysocki). - Add empty stubs for CPPC-related functions to be used when CONFIG_ACPI_CPPC_LIB is not set (Rafael Wysocki). - Simplify device enumeration code (Rafael Wysocki). - Change device enumeration code to use match_string() for string matching (Andy Shevchenko). - Modify irqresource_disabled() to retain the resouce flags that have been set already (Angela Czubak). - Add native backlight whitelist entry for GA401/GA502/GA503 (Luke Jones). - Modify the ACPI backlight driver to let the native backlight handling take over on hardware-reduced systems (Hans de Goede). - Introduce acpi_dev_get() and switch over the ACPI core code to using it (Andy Shevchenko). - Use kobj_attribute as callback argument instead of a local struct type in the CPPC linrary code (Nathan Chancellor). - Drop unneeded initializatio of a static variable from the ACPI processor driver (Tian Tao). - Drop unnecessary local variable assignment from the ACPI APEI code (Colin Ian King). - Document for_each_acpi_dev_match() macro (Andy Shevchenko). - Address assorted coding style issues in multiple places (Xiaofei Tan). - Capitalize TLAs in a few comments (Andy Shevchenko). - Correct assorted typos in comments (Tom Saeger)" * tag 'acpi-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (68 commits) ACPI: video: use native backlight for GA401/GA502/GA503 ACPI: APEI: remove redundant assignment to variable rc ACPI: utils: Capitalize abbreviations in the comments ACPI: utils: Document for_each_acpi_dev_match() macro ACPI: bus: Introduce acpi_dev_get() and reuse it in ACPI code ACPI: scan: Utilize match_string() API resource: Prevent irqresource_disabled() from erasing flags ACPI: CPPC: Replace cppc_attr with kobj_attribute ACPI: scan: Call acpi_get_object_info() from acpi_set_pnp_ids() ACPI: scan: Drop sta argument from acpi_init_device_object() ACPI: scan: Drop sta argument from acpi_add_single_object() ACPI: scan: Rearrange checks in acpi_bus_check_add() ACPI: scan: Fold acpi_bus_type_and_status() into its caller ACPI: video: Check LCD flag on ACPI-reduced-hardware devices ACPI: utils: Add acpi_reduced_hardware() helper ACPI: dock: fix some coding style issues ACPI: sysfs: fix some coding style issues ACPI: PM: add a missed blank line after declarations ACPI: custom_method: fix a coding style issue ACPI: CPPC: fix some coding style issues ... commit 47080f2286110c371b9cf75ac7b34a6f2f1cf4ba Merge: 55ba0fe059a57 9049572fb1457 Author: Linus Torvalds Date: Mon Apr 26 14:59:21 2021 -0700 Merge tag 'hwmon-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: "The most notable change is the removal of the amd_energy driver. It was rendered all but unusable by making its attributes privileged-only to work around a security issue. A suggested remedy was rejected by AMD, so the only real solution was to remove the driver. For the future, we'll have to make sure that no privileged-access-only drivers are accepted into the hwmon subsystem in the first place. The hwmon ABI document was updated accordingly. Other changes: PMBus drivers: - Added driver for MAX15301 - Added driver for BluTek BPA-RS600 - Added driver for fsp-3y PSUs and PDUs - Added driver for Infineon IR36021 - Added driver for ST STPDDC60 - Added support for TI TPS53676 to tps53679 driver - Introduced PMBUS symbol namespace. This was made necessary by a suggestion to use its exported functions from outside the hwmon subsystem. - Minor improvements and bug fixes New drivers: - Driver for NZXT Kraken X42/X52/X62/X72 Driver enhancements: - Added support for Intel D5005 to intel-m10-bmc-hwmon driver - Added support for NCT6686D to nct6683 driver Other: - Converted sch5627 and amd9240 drivers to hwmon_device_register_with_info() - Added support for fan drawers capability and present registers to mlxreg-fan driver - Added Dell Latitude E7440 to fan control whitelist in dell-smm driver - Replaced snprintf in show functions with sysfs_emit. Done with coccinelle script for all drivers to preempt endless per-driver submissions of the same change. - Use kobj_to_dev(). Another coccinelle based change to preempt endless per-driver submissions of the same change. - Various minor fixes and improvements" * tag 'hwmon-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (38 commits) hwmon: Remove amd_energy driver hwmon: Clarify scope of attribute access hwmon: (pmbus) Introduce PMBUS symbol namespace hwmon: (pmbus) Add pmbus driver for MAX15301 hwmon: (sch5627) Remove unnecessary error path hwmon: (sch5627) Use devres function hwmon: (pmbus/pxe1610) don't bail out when not all pages are active hwmon: Add driver for fsp-3y PSUs and PDUs hwmon: (intel-m10-bmc-hwmon) add sensor support of Intel D5005 card hwmon: (sch5627) Split sch5627_update_device() hwmon: (sch5627) Convert to hwmon_device_register_with_info() hwmon: (nct6683) remove useless function hwmon: (dell-smm) Add Dell Latitude E7440 to fan control whitelist MAINTAINERS: Add keyword pattern for hwmon registration functions hwmon: (mlxreg-fan) Add support for fan drawers capability and present registers hwmon: (pmbus/tps53679) Add support for TI TPS53676 dt-bindings: Add trivial device entry for TPS53676 hwmon: (ftsteutates) Rudimentary typo fixes hwmon: (pmbus) Add driver for BluTek BPA-RS600 dt-bindings: Add vendor prefix and trivial device for BluTek BPA-RS600 ... commit 3d14ec1fe61aebe3da85a9b8f2c3d61e43d522e6 Author: David Howells Date: Sun Apr 25 22:02:38 2021 +0100 iov_iter: Four fixes for ITER_XARRAY Fix four things[1] in the patch that adds ITER_XARRAY[2]: (1) Remove the address_space struct predeclaration. This is a holdover from when it was ITER_MAPPING. (2) Fix _copy_mc_to_iter() so that the xarray segment updates count and iov_offset in the iterator before returning. (3) Fix iov_iter_alignment() to not loop in the xarray case. Because the middle pages are all whole pages, only the end pages need be considered - and this can be reduced to just looking at the start position in the xarray and the iteration size. (4) Fix iov_iter_advance() to limit the size of the advance to no more than the remaining iteration size. Reported-by: Al Viro Signed-off-by: David Howells Reviewed-by: Al Viro Tested-by: Jeff Layton Tested-by: Dave Wysochanski Link: https://lore.kernel.org/r/YIVrJT8GwLI0Wlgx@zeniv-ca.linux.org.uk [1] Link: https://lore.kernel.org/r/161918448151.3145707.11541538916600921083.stgit@warthog.procyon.org.uk [2] commit 74deef03a44ae77db85dd80e7ef95777a902e0b3 Author: Kai-Heng Feng Date: Wed Apr 14 01:05:08 2021 +0800 efifb: Check efifb_pci_dev before using it On some platforms like Hyper-V and RPi4 with UEFI firmware, efifb is not a PCI device. So make sure efifb_pci_dev is found before using it. Fixes: a6c0fd3d5a8b ("efifb: Ensure graphics device for efifb stays at PCI D0") BugLink: https://bugs.launchpad.net/bugs/1922403 Signed-off-by: Kai-Heng Feng Signed-off-by: Alex Deucher Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210413170508.968148-1-kai.heng.feng@canonical.com commit 031cc263c037a95e5d1249cbd3d55b77021f1eb8 Author: Lakshmi Ramasubramanian Date: Wed Apr 21 09:36:10 2021 -0700 powerpc: If kexec_build_elf_info() fails return immediately from elf64_load() Uninitialized local variable "elf_info" would be passed to kexec_free_elf_info() if kexec_build_elf_info() returns an error in elf64_load(). If kexec_build_elf_info() returns an error, return the error immediately. Signed-off-by: Lakshmi Ramasubramanian Reported-by: Dan Carpenter Reviewed-by: Michael Ellerman Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210421163610.23775-2-nramas@linux.microsoft.com commit a45dd984dea9baa22b15fb692fe870ab5670a4a0 Author: Lakshmi Ramasubramanian Date: Wed Apr 21 09:36:09 2021 -0700 powerpc: Free fdt on error in elf64_load() There are a few "goto out;" statements before the local variable "fdt" is initialized through the call to of_kexec_alloc_and_setup_fdt() in elf64_load(). This will result in an uninitialized "fdt" being passed to kvfree() in this function if there is an error before the call to of_kexec_alloc_and_setup_fdt(). If there is any error after fdt is allocated, but before it is saved in the arch specific kimage struct, free the fdt. Fixes: 3c985d31ad66 ("powerpc: Use common of_kexec_alloc_and_setup_fdt()") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Michael Ellerman Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210421163610.23775-1-nramas@linux.microsoft.com commit 55ba0fe059a577fa08f23223991b24564962620f Merge: 2a19866b6e4cf 18bb8bbf13c18 Author: Linus Torvalds Date: Mon Apr 26 13:48:02 2021 -0700 Merge tag 'for-5.13-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux Pull btrfs updates from David Sterba: "The updates this time are mostly stabilization, preparation and minor improvements. User visible improvements: - readahead for send, improving run time of full send by 10% and for incremental by 25% - make reflinks respect O_SYNC, O_DSYNC and S_SYNC flags - export supported sectorsize values in sysfs (currently only page size, more once full subpage support lands) - more graceful errors and warnings on 32bit systems when logical addresses for metadata reach the limit posed by unsigned long in page::index - error: fail mount if there's a metadata block beyond the limit - error: new metadata block would be at unreachable address - warn when 5/8th of the limit is reached, for 4K page systems it's 10T, for 64K page it's 160T - zoned mode - relocated zones get reset at the end instead of discard - automatic background reclaim of zones that have 75%+ of unusable space, the threshold is tunable in sysfs Fixes: - fsync and tree mod log fixes - fix inefficient preemptive reclaim calculations - fix exhaustion of the system chunk array due to concurrent allocations - fix fallback to no compression when racing with remount - preemptive fix for dm-crypt on zoned device that does not properly advertise zoned support Core changes: - add inode lock to synchronize mmap and other block updates (eg. deduplication, fallocate, fsync) - kmap conversions to new kmap_local API - subpage support (continued) - new helpers for page state/extent buffer tracking - metadata changes now support read and write - error handling through out relocation call paths - many other cleanups and code simplifications" * tag 'for-5.13-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (112 commits) btrfs: zoned: automatically reclaim zones btrfs: rename delete_unused_bgs_mutex to reclaim_bgs_lock btrfs: zoned: reset zones of relocated block groups btrfs: more graceful errors/warnings on 32bit systems when reaching limits btrfs: zoned: fix unpaired block group unfreeze during device replace btrfs: fix race when picking most recent mod log operation for an old root btrfs: fix metadata extent leak after failure to create subvolume btrfs: handle remount to no compress during compression btrfs: zoned: fail mount if the device does not support zone append btrfs: fix race between transaction aborts and fsyncs leading to use-after-free btrfs: introduce submit_eb_subpage() to submit a subpage metadata page btrfs: make lock_extent_buffer_for_io() to be subpage compatible btrfs: introduce write_one_subpage_eb() function btrfs: introduce end_bio_subpage_eb_writepage() function btrfs: check return value of btrfs_commit_transaction in relocation btrfs: do proper error handling in merge_reloc_roots btrfs: handle extent corruption with select_one_root properly btrfs: cleanup error handling in prepare_to_merge btrfs: do not panic in __add_reloc_root btrfs: handle __add_reloc_root failures in btrfs_recover_relocation ... commit 2a19866b6e4cf554b57660549d12496ea84aa7d7 Merge: c065c42966dd3 a8a6082d4ae29 Author: Linus Torvalds Date: Mon Apr 26 13:41:30 2021 -0700 Merge tag '5.12-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: - improvements to root directory metadata caching - addition of new "rasize" mount parameter which can significantly increase read ahead performance (e.g. copy can be much faster, especially with multichannel) - addition of support for insert and collapse range - improvements to error handling in mount * tag '5.12-rc-smb3-fixes-part1' of git://git.samba.org/sfrench/cifs-2.6: (40 commits) cifs: update internal version number smb3: add rasize mount parameter to improve readahead performance smb3: limit noisy error cifs: fix leak in cifs_smb3_do_mount() ctx cifs: remove unnecessary copies of tcon->crfid.fid cifs: Return correct error code from smb2_get_enc_key cifs: fix out-of-bound memory access when calling smb3_notify() at mount point smb2: fix use-after-free in smb2_ioctl_query_info() cifs: export supported mount options via new mount_params /proc file cifs: log mount errors using cifs_errorf() cifs: add fs_context param to parsing helpers cifs: make fs_context error logging wrapper cifs: add FALLOC_FL_INSERT_RANGE support cifs: add support for FALLOC_FL_COLLAPSE_RANGE cifs: check the timestamp for the cached dirent when deciding on revalidate cifs: pass the dentry instead of the inode down to the revalidation check functions cifs: add a timestamp to track when the lease of the cached dir was taken cifs: add a function to get a cached dir based on its dentry cifs: Grab a reference for the dentry of the cached directory during the lifetime of the cache cifs: store a pointer to the root dentry in cifs_sb_info once we have completed mounting the share ... commit c065c42966dd3e9415164afcb9bfd4300227ffe9 Merge: b5b3097d9cbb1 b73ac6808b0f7 Author: Linus Torvalds Date: Mon Apr 26 13:34:32 2021 -0700 Merge tag 'nfsd-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux Pull nfsd updates from Chuck Lever: "Highlights: - Update NFSv2 and NFSv3 XDR encoding functions - Add batch Receive posting to the server's RPC/RDMA transport (take 2) - Reduce page allocator traffic in svcrdma" * tag 'nfsd-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (70 commits) NFSD: Use DEFINE_SPINLOCK() for spinlock sunrpc: Remove unused function ip_map_lookup NFSv4.2: fix copy stateid copying for the async copy UAPI: nfsfh.h: Replace one-element array with flexible-array member svcrdma: Clean up dto_q critical section in svc_rdma_recvfrom() svcrdma: Remove svc_rdma_recv_ctxt::rc_pages and ::rc_arg svcrdma: Remove sc_read_complete_q svcrdma: Single-stage RDMA Read SUNRPC: Move svc_xprt_received() call sites SUNRPC: Export svc_xprt_received() svcrdma: Retain the page backing rq_res.head[0].iov_base svcrdma: Remove unused sc_pages field svcrdma: Normalize Send page handling svcrdma: Add a "deferred close" helper svcrdma: Maintain a Receive water mark svcrdma: Use svc_rdma_refresh_recvs() in wc_receive svcrdma: Add a batch Receive posting mechanism svcrdma: Remove stale comment for svc_rdma_wc_receive() svcrdma: Provide an explanatory comment in CMA event handler svcrdma: RPCDBG_FACILITY is no longer used ... commit b5b3097d9cbb1eb3df0ade9507585e6e9e3b2385 Merge: befbfe07e646d 8e6c8fa9f2e95 Author: Linus Torvalds Date: Mon Apr 26 13:28:12 2021 -0700 Merge tag 'erofs-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs Pull erofs updates from Gao Xiang: "In this cycle, we would like to introduce a new feature called big pcluster so EROFS can compress file data into more than 1 fs block and different pcluster size can be selected for each (sub-)files by design. The current EROFS test results on my laptop are [1]: Testscript: erofs-openbenchmark Testdata: enwik9 (1000000000 bytes) ________________________________________________________________ | file system | size | seq read | rand read | rand9m read | |_______________|___________|_ MiB/s __|__ MiB/s __|___ MiB/s ___| |___erofs_4k____|_556879872_|_ 781.4 __|__ 55.3 ___|___ 25.3 ___| |___erofs_16k___|_452509696_|_ 864.8 __|_ 123.2 ___|___ 20.8 ___| |___erofs_32k___|_415223808_|_ 899.8 __|_ 105.8 _*_|___ 16.8 ____| |___erofs_64k___|_393814016_|_ 906.6 __|__ 66.6 _*_|___ 11.8 ____| |__squashfs_8k__|_556191744_|_ 64.9 __|__ 19.3 ___|____ 9.1 ____| |__squashfs_16k_|_502661120_|_ 98.9 __|__ 38.0 ___|____ 9.8 ____| |__squashfs_32k_|_458784768_|_ 115.4 __|__ 71.6 _*_|___ 10.0 ____| |_squashfs_128k_|_398204928_|_ 257.2 __|_ 253.8 _*_|___ 10.9 ____| |____ext4_4k____|____()_____|_ 786.6 __|__ 28.6 ___|___ 27.8 ____| which has been verified but I'd like warn it as experimental for a while. This matches erofs-utils dev branch and I'll also release a new userspace version for this later. Apart from that, several improvements are also included: eg complete a missing case for inplace I/O, optimize endio decompression logic for non-atomic contexts and support adjustable sliding window size, ... In addition to those, there are some cleanups as always. Summary: - avoid memory failure when applying rolling decompression - optimize endio decompression logic for non-atomic contexts - complete a missing case which can be safely selected for inplace I/O and thus decreasing more memory footprint - check unsupported on-disk inode i_format strictly - support adjustable lz4 sliding window size to decrease runtime memory footprint - support on-disk compression configurations - support big pcluster decompression - several code cleanups / spelling correction" * tag 'erofs-for-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs: (21 commits) erofs: enable big pcluster feature erofs: support decompress big pcluster for lz4 backend erofs: support parsing big pcluster compact indexes erofs: support parsing big pcluster compress indexes erofs: adjust per-CPU buffers according to max_pclusterblks erofs: add big physical cluster definition erofs: fix up inplace I/O pointer for big pcluster erofs: introduce physical cluster slab pools erofs: introduce multipage per-CPU buffers erofs: reserve physical_clusterbits[] erofs: Clean up spelling mistakes found in fs/erofs erofs: add on-disk compression configurations erofs: introduce on-disk lz4 fs configurations erofs: support adjust lz4 history window size erofs: introduce erofs_sb_has_xxx() helpers erofs: add unsupported inode i_format check erofs: don't use erofs_map_blocks() any more erofs: complete a missing case for inplace I/O erofs: use sync decompression for atomic contexts only erofs: use workqueue decompression for atomic contexts only ... commit befbfe07e646d9ffc5be1e2c943aefa5e23bf3b8 Merge: 2f9ef0559efbe cbe6fc4e01421 Author: Linus Torvalds Date: Mon Apr 26 13:24:39 2021 -0700 Merge tag 'locks-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux Pull file locking updates from Jeff Layton: "When we reworked the blocked locks into a tree structure instead of a flat list a few releases ago, we lost the ability to see all of the file locks in /proc/locks. Luo's patch fixes it to dump out all of the blocked locks instead, which restores the full output. This changes the format of /proc/locks as the blocked locks are shown at multiple levels of indentation now, but lslocks (the only common program I've ID'ed that scrapes this info) seems to be OK with that. Tian also contributed a small patch to remove a useless assignment" * tag 'locks-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux: fs/locks: remove useless assignment in fcntl_getlk fs/locks: print full locks information commit 2f9ef0559efbee18a10a3ca26eefe57f69918693 Merge: 0c85556318200 441ca977a84da Author: Linus Torvalds Date: Mon Apr 26 13:22:43 2021 -0700 Merge tag 'docs-5.13' of git://git.lwn.net/linux Pull documentation updates from Jonathan Corbet: "It's been a relatively busy cycle in docsland, though more than usually well contained to Documentation/ itself. Highlights include: - The Chinese translators have been busy and show no signs of stopping anytime soon. Italian has also caught up. - Aditya Srivastava has been working on improvements to the kernel-doc script. - Thorsten continues his work on reporting-issues.rst and related documentation around regression reporting. - Lots of documentation updates, typo fixes, etc. as usual" * tag 'docs-5.13' of git://git.lwn.net/linux: (139 commits) docs/zh_CN: add openrisc translation to zh_CN index docs/zh_CN: add openrisc index.rst translation docs/zh_CN: add openrisc todo.rst translation docs/zh_CN: add openrisc openrisc_port.rst translation docs/zh_CN: add core api translation to zh_CN index docs/zh_CN: add core-api index.rst translation docs/zh_CN: add core-api irq index.rst translation docs/zh_CN: add core-api irq irqflags-tracing.rst translation docs/zh_CN: add core-api irq irq-domain.rst translation docs/zh_CN: add core-api irq irq-affinity.rst translation docs/zh_CN: add core-api irq concepts.rst translation docs: sphinx-pre-install: don't barf on beta Sphinx releases scripts: kernel-doc: improve parsing for kernel-doc comments syntax docs/zh_CN: two minor fixes in zh_CN/doc-guide/ Documentation: dev-tools: Add Testing Overview docs/zh_CN: add translations in zh_CN/dev-tools/gcov docs: reporting-issues: make people CC the regressions list MAINTAINERS: add regressions mailing list doc:it_IT: align Italian documentation docs/zh_CN: sync reporting-issues.rst ... commit 6d72e7c767acbbdd44ebc7d89c6690b405b32b57 Author: Lv Yunlong Date: Mon Apr 26 09:06:25 2021 -0700 net:emac/emac-mac: Fix a use after free in emac_mac_tx_buf_send In emac_mac_tx_buf_send, it calls emac_tx_fill_tpd(..,skb,..). If some error happens in emac_tx_fill_tpd(), the skb will be freed via dev_kfree_skb(skb) in error branch of emac_tx_fill_tpd(). But the freed skb is still used via skb->len by netdev_sent_queue(,skb->len). As i observed that emac_tx_fill_tpd() haven't modified the value of skb->len, thus my patch assigns skb->len to 'len' before the possible free and use 'len' instead of skb->len later. Fixes: b9b17debc69d2 ("net: emac: emac gigabit ethernet controller driver") Signed-off-by: Lv Yunlong Signed-off-by: David S. Miller commit f77bd544a6bbe69aa50d9ed09f13494cf36ff806 Author: Davide Caratti Date: Mon Apr 26 17:45:51 2021 +0200 net/sched: act_ct: fix wild memory access when clearing fragments while testing re-assembly/re-fragmentation using act_ct, it's possible to observe a crash like the following one: KASAN: maybe wild-memory-access in range [0x0001000000000448-0x000100000000044f] CPU: 50 PID: 0 Comm: swapper/50 Tainted: G S 5.12.0-rc7+ #424 Hardware name: Dell Inc. PowerEdge R730/072T6D, BIOS 2.4.3 01/17/2017 RIP: 0010:inet_frag_rbtree_purge+0x50/0xc0 Code: 00 fc ff df 48 89 c3 31 ed 48 89 df e8 a9 7a 38 ff 4c 89 fe 48 89 df 49 89 c6 e8 5b 3a 38 ff 48 8d 7b 40 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 75 59 48 8d bb d0 00 00 00 4c 8b 6b 40 48 89 f8 48 RSP: 0018:ffff888c31449db8 EFLAGS: 00010203 RAX: 0000200000000089 RBX: 000100000000040e RCX: ffffffff989eb960 RDX: 0000000000000140 RSI: ffffffff97cfb977 RDI: 000100000000044e RBP: 0000000000000900 R08: 0000000000000000 R09: ffffed1186289350 R10: 0000000000000003 R11: ffffed1186289350 R12: dffffc0000000000 R13: 000100000000040e R14: 0000000000000000 R15: ffff888155e02160 FS: 0000000000000000(0000) GS:ffff888c31440000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005600cb70a5b8 CR3: 0000000a2c014005 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: inet_frag_destroy+0xa9/0x150 call_timer_fn+0x2d/0x180 run_timer_softirq+0x4fe/0xe70 __do_softirq+0x197/0x5a0 irq_exit_rcu+0x1de/0x200 sysvec_apic_timer_interrupt+0x6b/0x80 when act_ct temporarily stores an IP fragment, restoring the skb qdisc cb results in putting random data in FRAG_CB(), and this causes those "wild" memory accesses later, when the rbtree is purged. Never overwrite the skb cb in case tcf_ct_handle_fragments() returns -EINPROGRESS. Fixes: ae372cb1750f ("net/sched: act_ct: fix restore the qdisc_skb_cb after defrag") Fixes: 7baf2429a1a9 ("net/sched: cls_flower add CT_FLAGS_INVALID flag support") Reported-by: Shuang Li Signed-off-by: Davide Caratti Signed-off-by: David S. Miller commit 63fa73e2151848ed5930dfe0040c823ffe1f2cc4 Author: Arnaldo Carvalho de Melo Date: Mon Apr 26 09:44:47 2021 -0300 net: Fix typo in comment about ancillary data Ingo sent typo fixes for tools/ and this resulted in a warning when building the perf/core branch that will be sent upstream in the next merge window: Warning: Kernel ABI header at 'tools/perf/trace/beauty/include/linux/socket.h' differs from latest version at 'include/linux/socket.h' diff -u tools/perf/trace/beauty/include/linux/socket.h include/linux/socket.h Fix the typo on the kernel file to address this. Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller commit b331b8ef86f07276a9acb78f10bd5538a29d5546 Author: Ezequiel Garcia Date: Sun Apr 25 23:41:18 2021 -0300 dt-bindings: net: convert rockchip-dwmac to json-schema Convert Rockchip dwmac controller dt-bindings to YAML. Signed-off-by: Ezequiel Garcia Reviewed-by: David Wu Signed-off-by: David S. Miller commit 517a882aa2b586b5c1b3cf9b1dec1593d191776d Author: Ezequiel Garcia Date: Sun Apr 25 23:41:17 2021 -0300 dt-bindings: net: dwmac: Add Rockchip DWMAC support Add Rockchip DWMAC controllers, which are based on snps,dwmac. Some of the SoCs require up to eight clocks, so maxItems for clocks and clock-names need to be increased. Signed-off-by: Ezequiel Garcia Reviewed-by: David Wu Signed-off-by: David S. Miller commit b9460dd84aa6f160995459c7f766b05c74b219db Author: Ezequiel Garcia Date: Sun Apr 25 23:41:16 2021 -0300 arm64: dts: rockchip: Remove unnecessary reset in rk3328.dtsi Rockchip DWMAC glue driver uses the phy node (phy-handle) reset specifier, and not a "mac-phy" reset specifier. Remove it. Signed-off-by: Ezequiel Garcia Reviewed-by: David Wu Signed-off-by: David S. Miller commit 2ad5692db72874f02b9ad551d26345437ea4f7f3 Author: Johan Hovold Date: Mon Apr 26 10:11:49 2021 +0200 net: hso: fix NULL-deref on disconnect regression Commit 8a12f8836145 ("net: hso: fix null-ptr-deref during tty device unregistration") fixed the racy minor allocation reported by syzbot, but introduced an unconditional NULL-pointer dereference on every disconnect instead. Specifically, the serial device table must no longer be accessed after the minor has been released by hso_serial_tty_unregister(). Fixes: 8a12f8836145 ("net: hso: fix null-ptr-deref during tty device unregistration") Cc: stable@vger.kernel.org Cc: Anirudh Rayabharam Reported-by: Leonardo Antoniazzi Signed-off-by: Johan Hovold Reviewed-by: Anirudh Rayabharam Signed-off-by: David S. Miller commit d0c5d18da2da00f3bf550286426fabd01cb63bde Merge: 9176e38027195 e6b031d3c37f7 Author: David S. Miller Date: Mon Apr 26 12:52:15 2021 -0700 Merge tag 'linux-can-next-for-5.13-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2021-04-26 this is a pull request of 4 patches for net-next/master. the first two patches are from Colin Ian King and target the etas_es58x driver, they add a missing NULL pointer check and fix some typos. The next two patches are by Erik Flodin. The first one updates the CAN documentation regarding filtering, the other one fixes the header alignment in CAN related proc output on 64 bit systems. ==================== Signed-off-by: David S. Miller commit 9176e38027195346f50ab885498678ca7ae55a21 Author: Jiapeng Chong Date: Sun Apr 25 18:42:56 2021 +0800 net: davicom: Remove redundant assignment to ret Variable ret is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Cleans up the following clang-analyzer warning: drivers/net/ethernet/davicom/dm9000.c:1527:5: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 930d2d619d0a341693af4a7db9b37b96434ac65e Author: Jiapeng Chong Date: Sun Apr 25 18:35:18 2021 +0800 pcnet32: Remove redundant variable prev_link and curr_link Variable prev_link and curr_link is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed. Cleans up the following clang-analyzer warning: drivers/net/ethernet/amd/pcnet32.c:2857:4: warning: Value stored to 'prev_link' is never read [clang-analyzer-deadcode.DeadStores]. drivers/net/ethernet/amd/pcnet32.c:2856:4: warning: Value stored to 'curr_link' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit eb43c081a6df85e3119226b932ddb9a9572b26e4 Merge: 6876a18d3361e 47a6959fa331f Author: David S. Miller Date: Mon Apr 26 12:31:42 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) The various ip(6)table_foo incarnations are updated to expect that the table is passed as 'void *priv' argument that netfilter core passes to the hook functions. This reduces the struct net size by 2 cachelines on x86_64. From Florian Westphal. 2) Add cgroupsv2 support for nftables. 3) Fix bridge log family merge into nf_log_syslog: Missing unregistration from netns exit path, from Phil Sutter. 4) Add nft_pernet() helper to access nftables pernet area. 5) Add struct nfnl_info to reduce nfnetlink callback footprint and to facilite future updates. Consolidate nfnetlink callbacks. 6) Add CONFIG_NETFILTER_XTABLES_COMPAT Kconfig knob, also from Florian. ==================== Signed-off-by: David S. Miller commit 0c855563182001c829065faa17f8e29e9ceffe13 Merge: 6b0fbc540c2fc ea96292838397 Author: Linus Torvalds Date: Mon Apr 26 12:30:36 2021 -0700 Merge tag 'arm-apple-m1-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM Apple M1 platform support from Arnd Bergmann: "The Apple M1 is the processor used it all current generation Apple Macintosh computers. Support for this platform so far is rudimentary, but it boots and can use framebuffer and serial console over a special USB cable. Support for several essential on-chip devices (USB, PCIe, IOMMU, NVMe) is work in progress but was not ready in time. A very detailed description of what works is in the commit message of commit 1bb2fd3880d4 ("Merge tag 'm1-soc-bringup-v5' [..]") and on the AsahiLinux wiki" Link: https://lore.kernel.org/linux-arm-kernel/bdb18e9f-fcd7-1e31-2224-19c0e5090706@marcan.st/ * tag 'arm-apple-m1-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: asm-generic/io.h: Unbork ioremap_np() declaration arm64: apple: Add initial Apple Mac mini (M1, 2020) devicetree dt-bindings: display: Add apple,simple-framebuffer arm64: Kconfig: Introduce CONFIG_ARCH_APPLE irqchip/apple-aic: Add support for the Apple Interrupt Controller dt-bindings: interrupt-controller: Add DT bindings for apple-aic arm64: Move ICH_ sysreg bits from arm-gic-v3.h to sysreg.h of/address: Add infrastructure to declare MMIO as non-posted asm-generic/io.h: implement pci_remap_cfgspace using ioremap_np arm64: Implement ioremap_np() to map MMIO as nGnRnE docs: driver-api: device-io: Document ioremap() variants & access funcs docs: driver-api: device-io: Document I/O access functions asm-generic/io.h: Add a non-posted variant of ioremap() arm64: arch_timer: Implement support for interrupt-names dt-bindings: timer: arm,arch_timer: Add interrupt-names support arm64: cputype: Add CPU implementor & types for the Apple M1 cores dt-bindings: arm: cpus: Add apple,firestorm & icestorm compatibles dt-bindings: arm: apple: Add bindings for Apple ARM platforms dt-bindings: vendor-prefixes: Add apple prefix commit 6b0fbc540c2fc34e55828ef9918cc61528071a01 Merge: f7857bf3745e9 39b95079f68cf Author: Linus Torvalds Date: Mon Apr 26 12:25:29 2021 -0700 Merge tag 'arm-newsoc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM Nuvoton WPCM450 platform support from Arnd Bergmann: "The Nuvoton WPCM450 BMC is an older chip based on the ARM926 CPU core that remains in use on Supermicro X9 server boards among others. Support gets added for a particular server board using this SoC along with the basic platform bringup. As the platform is a predecessor to the npcm7xx platform we already support, it is added to the same directory, despite using a different name. It also seems to be related to the older w90x900/nuc9xx platform that was removed last year" * tag 'arm-newsoc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: ARM: config: Add WPCM to multi v5 MAINTAINERS: Add entry for Nuvoton WPCM450 ARM: dts: Add devicetree for Supermicro X9SCi-LN4F based on WPCM450 ARM: dts: Add devicetree for Nuvoton WPCM450 BMC chip watchdog: npcm: Add support for WPCM450 ARM: npcm: Introduce Nuvoton WPCM450 SoC dt-bindings: watchdog: npcm: Add nuvoton,wpcm450-wdt dt-bindings: arm: npcm: Add nuvoton,wpcm450 compatible string dt-bindings: vendor-prefixes: Add Supermicro ARM: dts: Add board-specific compatible string to npcm750-evb devicetree dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML commit f7857bf3745e9ede6367a8ff89c1c4f308bfd914 Merge: 37f00ab4a003f 3f9a3345a3a11 Author: Linus Torvalds Date: Mon Apr 26 12:20:49 2021 -0700 Merge tag 'arm-dt-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM devicetree updates from Arnd Bergmann: "There are six new SoCs added this time. Apple M1 and Nuvoton WPCM450 have separate branches because they are new SoC families that require changes outside of device tree files. The other four are variations of already supported chips and get merged through this branch: - STMicroelectronics STM32H750 is one of many variants of STM32 microcontrollers based on the Cortex-M7 core. This is particularly notable since we rarely add support for new MMU-less chips these days. In this case, the board that gets added along with the platform is not a SoC reference platform but the "Art Pi" (https://art-pi.gitee.io/website/) machine that was originally design for the RT-Thread RTOS. - NXP i.MX8QuadMax is a variant of the growing i.MX8 embedded/industrial SoC family, using two Cortex-A72 and four Cortex-A53 cores. It gets added along with its reference board, the "NXP i.MX8QuadMax Multisensory Enablement Kit". - Qualcomm SC7280 is a Laptop SoC following the SC7180 (Snapdragon 7c) that is used in some Chromebooks and Windows laptops. Only a reference board is added for the moment. - TI AM64x Sita4ra is a new version of the K3 SoC family for industrial control, motor control, remote IO, IoT gateway etc., similar to the older AM65x family. Two reference machines are added alongside. Among the newly added machines, there is a very clear skew towards 64-bit machines now, with 12 32-bit machines compared to 23 64-bit machines. The full list sorted by SoC is: - ASpeed AST2500 BMC: ASRock E3C246D4I Xeon server board - Allwinner A10: Topwise A721 Tablet - Amlogic GXL: MeCool KII TV box - Amlogic GXM: Mecool KIII, Minix Neo U9-H TV boxes - Broadcom BCM4908: TP-Link Archer C2300 V1 router - MStar SSD202D: M5Stack UnitV2 camera - Marvell Armada 38x: ATL-x530 ethernet switch - Mediatek MT8183 Chromebooks: Lenovo 10e, Acer Spin 311, Asus Flip CM3, Asus Detachable CM3 - Mediatek MT8516/MT8183: OLogic Pumpkin Board - NXP i.MX7: reMarkable Tablet - NXP i.MX8M: Kontron pitx-imx8m, Engicam i.Core MX8M Mini - Nuvoton NPCM730: Quanta GBS BMC - Qualcomm X55: Telit FN980 TLB SoM, Thundercomm TurboX T55 SoM - Qualcomm MSM8998: OnePlus 5/5T phones - Qualcomm SM8350: Snapdragon 888 Mobile Hardware Development Kit - Rockchip RK3399: NanoPi R4S board - STM32MP1: Engicam MicroGEA STM32MP1 MicroDev 2.0 and SOM, EDIMM2.2 Starter Kit, Carrier, SOM - TI AM65: Siemens SIMATIC IOT2050 gateway There is notable work going into extending already supported machines and SoCs: - ASpeed AST2500 - Allwinner A23, A83t, A31, A64, H6 - Amlogic G12B - Broadcom BCM4908 - Marvell Armada 7K/8K/CN91xx - Mediatek MT6589, MT7622, MT8173, MT8183, MT8195 - NXP i.MX8Q, i.MX8MM, i.MX8MP - Qualcomm MSM8916, SC7180, SDM845, SDX55, SM8350 - Renesas R-Car M3, V3U - Rockchip RK3328, RK3399 - STEricsson U8500 - STMicroelectronics STM32MP141 - Samsung Exynos 4412 - TI K3-AM65, K3-J7200 - TI OMAP3 Among the treewide cleanups and bug fixes, two parts stand out: - There are a number of cleanups for issues pointed out by 'make dtbs_check' this time, and I expect more to come in the future as we increasingly check for regressions. - After a change to the MMC subsystem that can lead to unpredictable device numbers, several platforms add 'aliases' properties for these to give each MMC controller a fixed number" * tag 'arm-dt-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (516 commits) dt-bindings: mali-bifrost: add dma-coherent arm64: dts: amlogic: misc DT schema fixups arm64: dts: qcom: sc7180: Update iommu property for simultaneous playback arm64: dts: qcom: sc7180: pompom: Add "dmic_clk_en" + sound model arm64: dts: qcom: sc7180: coachz: Add "dmic_clk_en" ARM: dts: mstar: Add a dts for M5Stack UnitV2 dt-bindings: arm: mstar: Add compatible for M5Stack UnitV2 dt-bindings: vendor-prefixes: Add vendor prefix for M5Stack arm64: dts: mt8183: fix dtbs_check warning arm64: dts: mt8183-pumpkin: fix dtbs_check warning ARM: dts: aspeed: tiogapass: add hotplug controller ARM: dts: aspeed: amd-ethanolx: Enable all used I2C busses ARM: dts: aspeed: Rainier: Update to pass 2 hardware ARM: dts: aspeed: Rainier 1S4U: Fix fan nodes ARM: dts: aspeed: Rainier: Fix humidity sensor bus address ARM: dts: aspeed: Rainier: Fix PCA9552 on bus 8 ARM: dts: qcom: sdx55: add IPA information ARM: dts: qcom: sdx55: Add basic devicetree support for Thundercomm T55 dt-bindings: arm: qcom: Add binding for Thundercomm T55 kit ARM: dts: qcom: sdx55: Add basic devicetree support for Telit FN980 TLB ... commit 37f00ab4a003f371f81e0eae76cf372f06dec780 Merge: 2b90506a8186d 5ffa828534036 Author: Linus Torvalds Date: Mon Apr 26 12:11:52 2021 -0700 Merge tag 'arm-drivers-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC driver updates from Arnd Bergmann: "Updates for SoC specific drivers include a few subsystems that have their own maintainers but send them through the soc tree: TEE/OP-TEE: - Add tracepoints around calls to secure world Memory controller drivers: - Minor fixes for Renesas, Exynos, Mediatek and Tegra platforms - Add debug statistics to Tegra20 memory controller - Update Tegra bindings and convert to dtschema ARM SCMI Firmware: - Support for modular SCMI protocols and vendor specific extensions - New SCMI IIO driver - Per-cpu DVFS The other driver changes are all from the platform maintainers directly and reflect the drivers that don't fit into any other subsystem as well as treewide changes for a particular platform. SoCFPGA: - Various cleanups contributed by Krzysztof Kozlowski Mediatek: - add MT8183 support to mutex driver - MMSYS: use per SoC array to describe the possible routing - add MMSYS support for MT8183 and MT8167 - add support for PMIC wrapper with integrated arbiter - add support for MT8192/MT6873 Tegra: - Bug fixes to PMC and clock drivers NXP/i.MX: - Update SCU power domain driver to keep console domain power on. - Add missing ADC1 power domain to SCU power domain driver. - Update comments for single global power domain in SCU power domain driver. - Add i.MX51/i.MX53 unique id support to i.MX SoC driver. NXP/FSL SoC driver updates for v5.13 - Add ACPI support for RCPM driver - Use generic io{read,write} for QE drivers after performance optimized for PowerPC - Fix QBMAN probe to cleanup HW states correctly for kexec - Various cleanup and style fix for QBMAN/QE/GUTS drivers OMAP: - Preparation to use devicetree for genpd - ti-sysc needs iorange check improved when the interconnect target module has no control registers listed - ti-sysc needs to probe l4_wkup and l4_cfg interconnects first to avoid issues with missing resources and unnecessary deferred probe - ti-sysc debug option can now detect more devices - ti-sysc now warns if an old incomplete devicetree data is found as we now rely on it being complete for am3 and 4 - soc init code needs to check for prcm and prm nodes for omap4/5 and dra7 - omap-prm driver needs to enable autoidle retention support for omap4 - omap5 clocks are missing gpmc and ocmc clock registers - pci-dra7xx now needs to use builtin_platform_driver instead of using builtin_platform_driver_probe for deferred probe to work Raspberry Pi: - Fix-up all RPi firmware drivers so as for unbind to happen in an orderly fashion - Support for RPi's PoE hat PWM bus Qualcomm - Improved detection for SCM calling conventions - Support for OEM specific wifi firmware path - Added drivers for SC7280/SM8350: RPMH, LLCC< AOSS QMP" * tag 'arm-drivers-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (165 commits) soc: aspeed: fix a ternary sign expansion bug memory: mtk-smi: Add device-link between smi-larb and smi-common memory: samsung: exynos5422-dmc: handle clk_set_parent() failure memory: renesas-rpc-if: fix possible NULL pointer dereference of resource clk: socfpga: fix iomem pointer cast on 64-bit soc: aspeed: Adapt to new LPC device tree layout pinctrl: aspeed-g5: Adapt to new LPC device tree layout ipmi: kcs: aspeed: Adapt to new LPC DTS layout ARM: dts: Remove LPC BMC and Host partitions dt-bindings: aspeed-lpc: Remove LPC partitioning soc: fsl: enable acpi support in RCPM driver soc: qcom: mdt_loader: Detect truncated read of segments soc: qcom: mdt_loader: Validate that p_filesz < p_memsz soc: qcom: pdr: Fix error return code in pdr_register_listener firmware: qcom_scm: Fix kernel-doc function names to match firmware: qcom_scm: Suppress sysfs bind attributes firmware: qcom_scm: Workaround lack of "is available" call on SC7180 firmware: qcom_scm: Reduce locking section for __get_convention() firmware: qcom_scm: Make __qcom_scm_is_call_available() return bool Revert "soc: fsl: qe: introduce qe_io{read,write}* wrappers" ... commit 6876a18d3361e1893187970e1881a1d88d894d3f Merge: 0ea1041bfa3aa bbd6f0a948139 Author: David S. Miller Date: Mon Apr 26 12:00:00 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net commit 2b90506a8186df5f7c81ad1ebd250103d8469e27 Merge: 01d7136894410 028a1e9684353 Author: Linus Torvalds Date: Mon Apr 26 11:59:58 2021 -0700 Merge tag 'arm-defconfig-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM defconfig updates from Arnd Bergmann: "The usual set of defconfig updates, enabling newly added drivers. There are platform updates for at91, omap, ux500 and qcom platforms, and a number of changes to the arm64 defconfig" * tag 'arm-defconfig-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (34 commits) ARM: configs: qcom_defconfig: Reduce CMA size to 64MB ARM: configs: qcom_defconfig: Enable GLINK SMEM driver ARM: configs: qcom_defconfig: Enable SDX55 interconnect driver ARM: configs: qcom_defconfig: Enable Q6V5_PAS remoteproc driver ARM: configs: qcom_defconfig: Enable CPUFreq support ARM: configs: qcom_defconfig: Enable SDX55 A7 PLL and APCS clock driver ARM: configs: qcom_defconfig: Enable APCS IPC mailbox driver ARM: configs: Remove REGULATOR_USERSPACE_CONSUMER ARM: configs: ux500: Update for new drivers arm64: defconfig: Enable options to support panel display for Mediatek Chromebooks arm64: defconfig: Allow mt8173-based boards to boot from usb ARM: configs: at91: Modernize UBI defconfig part ARM: configs: at91: Add USB Video webcam class ARM: configs: at91: Add mtd tests as modules ARM: configs: at91: sama5: Add audio MIKROE PROTO board ARM: configs: at91: sama5: Enable LAN78XX as module ARM: configs: at91: sama5: PIOBU as built-in ARM: configs: at91: sama5: MCP16502 regulator as built-in ARM: configs: at91: sama5: enable the Hantro G1 engine ARM: configs: at91: sama5: update with savedefconfig ... commit 01d7136894410a71932096e0fb9f1d301b6ccf07 Merge: ef1244124349f d92e5e32fb4fc Author: Linus Torvalds Date: Mon Apr 26 11:48:26 2021 -0700 Merge tag 'arm-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc Pull ARM SoC updates from Arnd Bergmann: "Almost all SoC code changes this time are for the TI OMAP platform, which continues its decade-long quest to move from describing a complex SoC in code to device tree. Aside from this, the Uniphier platform has a new maintainer and some platforms have minor bugfixes and cleanups that were not urgent enough for v5.12" * tag 'arm-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (96 commits) MAINTAINERS: Update ARM/UniPhier SoCs maintainers and status mailmap: Update email address for Nicolas Saenz MAINTAINERS: Update BCM2711/BCM2335 maintainer's mail ARM: exynos: correct kernel doc in platsmp ARM: hisi: use the correct HiSilicon copyright ARM: ux500: make ux500_cpu_die static ARM: s3c: Use pwm_get() in favour of pwm_request() in RX1950 ARM: OMAP1: fix incorrect kernel-doc comment syntax in file ARM: OMAP2+: fix incorrect kernel-doc comment syntax in file ARM: OMAP2+: Use DEFINE_SPINLOCK() for spinlock ARM: at91: pm: Move prototypes to mutually included header ARM: OMAP2+: use true and false for bool variable ARM: OMAP2+: add missing call to of_node_put() ARM: OMAP2+: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE ARM: imx: Kconfig: Fix typo in help ARM: mach-imx: Fix a spelling in the file pm-imx5.c bus: ti-sysc: Warn about old dtb for dra7 and omap4/5 ARM: OMAP2+: Stop building legacy code for dra7 and omap4/5 ARM: OMAP2+: Drop legacy platform data for omap5 hwmod ARM: OMAP2+: Drop legacy platform data for omap5 l3 ... commit ef1244124349fea36e4a7e260ecaf156b6b6b22a Merge: d08410d8c9908 caa93d9bd2d7c Author: Linus Torvalds Date: Mon Apr 26 11:32:23 2021 -0700 Merge tag 'usb-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB and Thunderbolt updates from Greg KH: "Here is the big set of USB and Thunderbolt driver updates for 5.13-rc1. Lots of little things in here, with loads of tiny fixes and cleanups over these drivers, as well as these "larger" changes: - thunderbolt updates and new features added - xhci driver updates and split out of a mediatek-specific xhci driver from the main xhci module to make it easier to work with (something that I have been wanting for a while). - loads of typec feature additions and updates - dwc2 driver updates - dwc3 driver updates - gadget driver fixes and minor updates - loads of usb-serial cleanups and fixes and updates - usbip documentation updates and fixes - lots of other tiny USB driver updates All of these have been in linux-next for a while with no reported issues" * tag 'usb-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (371 commits) usb: Fix up movement of USB core kerneldoc location usb: dwc3: gadget: Handle DEV_TXF_FLUSH_BYPASS capability usb: dwc3: Capture new capability register GHWPARAMS9 usb: gadget: prevent a ternary sign expansion bug usb: dwc3: core: Do core softreset when switch mode usb: dwc2: Get rid of useless error checks in suspend interrupt usb: dwc2: Update dwc2_handle_usb_suspend_intr function. usb: dwc2: Add exit hibernation mode before removing drive usb: dwc2: Add hibernation exiting flow by system resume usb: dwc2: Add hibernation entering flow by system suspend usb: dwc2: Allow exit hibernation in urb enqueue usb: dwc2: Move exit hibernation to dwc2_port_resume() function usb: dwc2: Move enter hibernation to dwc2_port_suspend() function usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated. usb: dwc2: Clear fifo_map when resetting core. usb: dwc2: Allow exiting hibernation from gpwrdn rst detect usb: dwc2: Fix hibernation between host and device modes. usb: dwc2: Fix host mode hibernation exit with remote wakeup flow. usb: dwc2: Reset DEVADDR after exiting gadget hibernation. usb: dwc2: Update exit hibernation when port reset is asserted ... commit d08410d8c9908058a2f69b55e24edfb0d19da7a1 Merge: 8900d92fd666d 8720037d55dbf Author: Linus Torvalds Date: Mon Apr 26 11:20:10 2021 -0700 Merge tag 'tty-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty and serial driver updates from Greg KH: "Here is the big set of tty and serial driver updates for 5.13-rc1. Actually busy this release, with a number of cleanups happening: - much needed core tty cleanups by Jiri Slaby - removal of unused and orphaned old-style serial drivers. If anyone shows up with this hardware, it is trivial to restore these but we really do not think they are in use anymore. - fixes and cleanups from Johan Hovold on a number of termios setting corner cases that loads of drivers got wrong as well as removing unneeded code due to tty core changes from long ago that were never propagated out to the drivers - loads of platform-specific serial port driver updates and fixes - coding style cleanups and other small fixes and updates all over the tty/serial tree. All of these have been in linux-next for a while now with no reported issues" * tag 'tty-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (186 commits) serial: extend compile-test coverage serial: stm32: add FIFO threshold configuration dt-bindings: serial: 8250: update TX FIFO trigger level dt-bindings: serial: stm32: override FIFO threshold properties dt-bindings: serial: add RX and TX FIFO properties serial: xilinx_uartps: drop low-latency workaround serial: vt8500: drop low-latency workaround serial: timbuart: drop low-latency workaround serial: sunsu: drop low-latency workaround serial: sifive: drop low-latency workaround serial: txx9: drop low-latency workaround serial: sa1100: drop low-latency workaround serial: rp2: drop low-latency workaround serial: rda: drop low-latency workaround serial: owl: drop low-latency workaround serial: msm_serial: drop low-latency workaround serial: mpc52xx_uart: drop low-latency workaround serial: meson: drop low-latency workaround serial: mcf: drop low-latency workaround serial: lpc32xx_hs: drop low-latency workaround ... commit 8900d92fd666d936a7bfb4c567ac26736a414fb4 Merge: c01c0716ccf5d c295d3007ff63 Author: Linus Torvalds Date: Mon Apr 26 11:14:21 2021 -0700 Merge tag 'staging-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/IIO driver updates from Greg KH: "Here is the big set of staging and IIO driver updates for 5.13-rc1. Lots of little churn in here, and some larger churn as well. Major things are: - removal of wimax drivers, no one has this hardware anymore for this failed "experiment". - removal of the Google gasket driver, turns out no one wanted to maintain it or cares about it anymore, so they asked for it to be removed. - comedi finally moves out of the staging directory into drivers/comedi This is one of the oldest kernel subsystems around, being created in the 2.0 kernel days, and was one of the first things added to drivers/staging/ when that was created over 15 years ago. It should have been moved out of staging a long time ago, it's well maintained and used by loads of different devices in the real world every day. Nice to see this finally happen. - so many tiny coding style cleanups it's not funny. Perfect storm of at least 2 different intern project application deadlines combined to provide a huge number of new contributions in this area from people learning how to do kernel development. Great job to everyone involved here. There's also the normal updates for IIO drivers with new IIO drivers and updates all over that subsystem. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (907 commits) staging: octeon: Use 'for_each_child_of_node' Staging: rtl8723bs: rtw_xmit: fixed tabbing issue staging: rtl8188eu: remove unused function parameters staging: rtl8188eu: cmdThread is a task_struct staging: rtl8188eu: remove constant variable and dead code staging: rtl8188eu: change bLeisurePs' type to bool staging: rtl8723bs: remove empty #ifdef block staging: rtl8723bs: remove unused DBG_871X_LEVEL macro declarations staging: rtl8723bs: split too long line staging: rtl8723bs: fix indentation in if block staging: rtl8723bs: fix code indent issue staging: rtl8723bs: replace DBG_871X_LEVEL logs with netdev_*() staging: rtl8192e: indent statement properly staging: rtl8723bs: Remove led_blink_hdl() and everything related staging: comedi: move out of staging directory staging: rtl8723bs: remove sdio_drv_priv structure staging: rtl8723bs: remove unused argument in function staging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg() staging: rtl8723bs: fix indentation issue introduced by long line split ... commit c01c0716ccf5db2086d9693033472f37de96a699 Merge: 8e3a3249502d8 a943d76352dbb Author: Linus Torvalds Date: Mon Apr 26 11:05:36 2021 -0700 Merge tag 'driver-core-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here is the "big" set of driver core changes for 5.13-rc1. Nothing major, just lots of little core changes and cleanups, notable things are: - finally set 'fw_devlink=on' by default. All reported issues with this have been shaken out over the past 9 months or so, but we will be paying attention to any fallout here in case we need to revert this as the default boot value (symptoms of problems are a simple lack of booting) - fixes found to be needed by fw_devlink=on value in some subsystems (like clock). - delayed work initialization cleanup - driver core cleanups and minor updates - software node cleanups and tweaks - devtmpfs cleanups - minor debugfs cleanups All of these have been in linux-next for a while with no reported issues" * tag 'driver-core-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (53 commits) devm-helpers: Fix devm_delayed_work_autocancel() kerneldoc PM / wakeup: use dev_set_name() directly software node: Allow node addition to already existing device kunit: software node: adhear to KUNIT formatting standard node: fix device cleanups in error handling code kobject_uevent: remove warning in init_uevent_argv() debugfs: Make debugfs_allow RO after init Revert "driver core: platform: Make platform_get_irq_optional() optional" media: ipu3-cio2: Switch to use SOFTWARE_NODE_REFERENCE() software node: Introduce SOFTWARE_NODE_REFERENCE() helper macro software node: Imply kobj_to_swnode() to be no-op software node: Deduplicate code in fwnode_create_software_node() software node: Introduce software_node_alloc()/software_node_free() software node: Free resources explicitly when swnode_register() fails debugfs: drop pointless nul-termination in debugfs_read_file_bool() driver core: add helper for deferred probe reason setting driver core: Improve fw_devlink & deferred_probe_timeout interaction of: property: fw_devlink: Add support for remote-endpoint driver core: platform: Make platform_get_irq_optional() optional driver core: Replace printf() specifier and drop unneeded casting ... commit 8e3a3249502d8ff92d73d827fb41dd44c5a16f76 Merge: 90035c28f17d5 e2cb6b891ad2b Author: Linus Torvalds Date: Mon Apr 26 11:03:17 2021 -0700 Merge tag 'char-misc-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver updates from Greg KH: "Here is the big set of various smaller driver subsystem updates for 5.13-rc1. Major bits in here are: - habanalabs driver updates - hwtracing driver updates - interconnect driver updates - mhi driver updates - extcon driver updates - fpga driver updates - new binder features added - nvmem driver updates - phy driver updates - soundwire driver updates - smaller misc and char driver fixes and updates. - bluetooth driver bugfix that maintainer wanted to go through this tree. All of these have been in linux-next with no reported issues" * tag 'char-misc-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (330 commits) bluetooth: eliminate the potential race condition when removing the HCI controller coresight: etm-perf: Fix define build issue when built as module phy: Revert "phy: ti: j721e-wiz: add missing of_node_put" phy: ti: j721e-wiz: Add missing include linux/slab.h phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove() stm class: Use correct UUID APIs intel_th: pci: Add Alder Lake-M support intel_th: pci: Add Rocket Lake CPU support intel_th: Consistency and off-by-one fix intel_th: Constify attribute_group structs intel_th: Constify all drvdata references stm class: Remove an unused function habanalabs/gaudi: Fix uninitialized return code rc when read size is zero greybus: es2: fix kernel-doc warnings mei: me: add Alder Lake P device id. dw-xdata-pcie: Update outdated info and improve text format dw-xdata-pcie: Fix documentation build warns fbdev: zero-fill colormap in fbcmap.c firmware: qcom-scm: Fix QCOM_SCM configuration speakup: i18n: Switch to kmemdup_nul() in spk_msg_set() ... commit 90035c28f17d59be660b9992757d09853ab203ec Merge: 81f202315856e e7882cd7aebe0 Author: Linus Torvalds Date: Mon Apr 26 10:58:33 2021 -0700 Merge tag 'platform-drivers-x86-v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver updates freom Hans de Goede: - lots of Microsoft Surface work - platform-profile support for HP and Microsoft Surface devices - new WMI Gigabyte motherboard temperature monitoring driver - Intel PMC improvements for Tiger Lake and Alder Lake - misc bugfixes, improvements and quirk additions all over * tag 'platform-drivers-x86-v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (87 commits) platform/x86: gigabyte-wmi: add support for B550M AORUS PRO-P platform/x86: intel_pmc_core: Uninitialized data in pmc_core_lpm_latch_mode_write() platform/x86: intel_pmc_core: add ACPI dependency platform/surface: aggregator: fix a bit test platform/x86: intel_pmc_core: Fix "unsigned 'ret' is never less than zero" smatch warning platform/x86: touchscreen_dmi: Add info for the Teclast Tbook 11 tablet platform/x86: intel_pmc_core: Add support for Alder Lake PCH-P platform/x86: intel_pmc_core: Add LTR registers for Tiger Lake platform/x86: intel_pmc_core: Add option to set/clear LPM mode platform/x86: intel_pmc_core: Add requirements file to debugfs platform/x86: intel_pmc_core: Get LPM requirements for Tiger Lake platform/x86: intel_pmc_core: Show LPM residency in microseconds platform/x86: intel_pmc_core: Handle sub-states generically platform/x86: intel_pmc_core: Remove global struct pmc_dev platform/x86: intel_pmc_core: Don't use global pmcdev in quirks platform/x86: intel_chtdc_ti_pwrbtn: Fix missing IRQF_ONESHOT as only threaded handler platform/x86: gigabyte-wmi: add X570 AORUS ELITE platform/x86: thinkpad_acpi: Add labels to the first 2 temperature sensors platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table platform/x86: add Gigabyte WMI temperature driver ... commit 81f202315856edb75a371f3376aa3a47543c16f0 Author: Linus Torvalds Date: Mon Apr 26 10:48:07 2021 -0700 certs: add 'x509_revocation_list' to gitignore Commit d1f044103dad ("certs: Add ability to preload revocation certs") created a new generated file for revocation certs, but didn't tell git to ignore it. Thus causing unnecessary "git status" noise after a kernel build with CONFIG_SYSTEM_REVOCATION_LIST enabled. Add the proper gitignore magic. Signed-off-by: Linus Torvalds commit 4d480dbf21f3385e9957b1ee8dadee35548f4516 Merge: 8e47c5f0e2323 753ed9c95c37d Author: Linus Torvalds Date: Mon Apr 26 10:44:16 2021 -0700 Merge tag 'hyperv-next-signed-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull Hyper-V updates from Wei Liu: - VMBus enhancement - Free page reporting support for Hyper-V balloon driver - Some patches for running Linux as Arm64 Hyper-V guest - A few misc clean-up patches * tag 'hyperv-next-signed-20210426' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: (30 commits) drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status x86/hyperv: Move hv_do_rep_hypercall to asm-generic video: hyperv_fb: Add ratelimit on error message Drivers: hv: vmbus: Increase wait time for VMbus unload Drivers: hv: vmbus: Initialize unload_event statically Drivers: hv: vmbus: Check for pending channel interrupts before taking a CPU offline Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE Drivers: hv: vmbus: Introduce and negotiate VMBus protocol version 5.3 Drivers: hv: vmbus: Use after free in __vmbus_open() Drivers: hv: vmbus: remove unused function Drivers: hv: vmbus: Remove unused linux/version.h header x86/hyperv: remove unused linux/version.h header x86/Hyper-V: Support for free page reporting x86/hyperv: Fix unused variable 'hi' warning in hv_apic_read x86/hyperv: Fix unused variable 'msr_val' warning in hv_qlock_wait hv: hyperv.h: a few mundane typo fixes drivers: hv: Fix EXPORT_SYMBOL and tab spaces issue Drivers: hv: vmbus: Drop error message when 'No request id available' asm-generic/hyperv: Add missing function prototypes per -W1 warnings clocksource/drivers/hyper-v: Move handling of STIMER0 interrupts ... commit 8e47c5f0e23234659daea78256bc1b04ea019a4b Merge: 31a24ae89c92d f5079a9a2a316 Author: Linus Torvalds Date: Mon Apr 26 10:37:45 2021 -0700 Merge tag 'for-linus-5.13-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - remove some PV ACPI cpu/memory hotplug code which has been broken for a long time - support direct mapped guests (other than dom0) on Arm - several small fixes and cleanups * tag 'for-linus-5.13-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/arm: introduce XENFEAT_direct_mapped and XENFEAT_not_direct_mapped xen-pciback: simplify vpci's find hook xen-blkfront: Fix 'physical' typos xen-blkback: fix compatibility bug with single page rings xen: Remove support for PV ACPI cpu/memory hotplug xen/pciback: Fix incorrect type warnings commit 31a24ae89c92d5533c049046a76c6a2d649efb72 Merge: 6a713827cece7 a27a881656896 Author: Linus Torvalds Date: Mon Apr 26 10:25:03 2021 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Catalin Marinas: - MTE asynchronous support for KASan. Previously only synchronous (slower) mode was supported. Asynchronous is faster but does not allow precise identification of the illegal access. - Run kernel mode SIMD with softirqs disabled. This allows using NEON in softirq context for crypto performance improvements. The conditional yield support is modified to take softirqs into account and reduce the latency. - Preparatory patches for Apple M1: handle CPUs that only have the VHE mode available (host kernel running at EL2), add FIQ support. - arm64 perf updates: support for HiSilicon PA and SLLC PMU drivers, new functions for the HiSilicon HHA and L3C PMU, cleanups. - Re-introduce support for execute-only user permissions but only when the EPAN (Enhanced Privileged Access Never) architecture feature is available. - Disable fine-grained traps at boot and improve the documented boot requirements. - Support CONFIG_KASAN_VMALLOC on arm64 (only with KASAN_GENERIC). - Add hierarchical eXecute Never permissions for all page tables. - Add arm64 prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) allowing user programs to control which PAC keys are enabled in a particular task. - arm64 kselftests for BTI and some improvements to the MTE tests. - Minor improvements to the compat vdso and sigpage. - Miscellaneous cleanups. * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (86 commits) arm64/sve: Add compile time checks for SVE hooks in generic functions arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG. arm64: pac: Optimize kernel entry/exit key installation code paths arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) arm64: mte: make the per-task SCTLR_EL1 field usable elsewhere arm64/sve: Remove redundant system_supports_sve() tests arm64: fpsimd: run kernel mode NEON with softirqs disabled arm64: assembler: introduce wxN aliases for wN registers arm64: assembler: remove conditional NEON yield macros kasan, arm64: tests supports for HW_TAGS async mode arm64: mte: Report async tag faults before suspend arm64: mte: Enable async tag check fault arm64: mte: Conditionally compile mte_enable_kernel_*() arm64: mte: Enable TCO in functions that can read beyond buffer limits kasan: Add report for async mode arm64: mte: Drop arch_enable_tagging() kasan: Add KASAN mode kernel parameter arm64: mte: Add asynchronous mode support arm64: Get rid of CONFIG_ARM64_VHE arm64: Cope with CPUs stuck in VHE mode ... commit 6a713827cece73136bca63a93e7f9a35dd009d3e Merge: 69f737ed3a1c0 34e5269bf987a Author: Linus Torvalds Date: Mon Apr 26 10:22:04 2021 -0700 Merge tag 'm68k-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: - defconfig updates - Use common scripts for syscall table and header generation - Fix timers on MVME platforms - Fix lock imbalance in cacheflush syscall - Minor fixes and improvements * tag 'm68k-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k: sun3x: Remove unneeded semicolon m68k: Add missing mmap_read_lock() to sys_cacheflush() m68k: fpsp040,ifpsp060: Remove meaningless EXTRA_LDFLAGS m68k: fpsp040: Remove meaningless $(OS_OBJS) m68k: mvme147,mvme16x: Don't wipe PCC timer config bits m68k: syscalls: switch to generic syscallhdr.sh m68k: syscalls: switch to generic syscalltbl.sh m68k: defconfig: Update defconfigs for v5.12-rc1 m68k: mm: Fix flatmem memory model setup commit 8324fbae75ce65fc2eb960a8434799dca48248ac Merge: 72ce11ddfa4e9 ceaf2966ab082 Author: Jens Axboe Date: Mon Apr 26 11:20:54 2021 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.13/drivers Pull MD related fix from Song: "This change fixes raid5 on POWER8." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: async_xor: increase src_offs when dropping destination page commit 69f737ed3a1c0e7619565bb4c01dff5ec8991d85 Merge: 64f8e73de08d1 70c9d959226b7 Author: Linus Torvalds Date: Mon Apr 26 10:17:34 2021 -0700 Merge tag 'x86-vdso-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vdso update from Thomas Gleixner: "A single fix for the x86 VDSO build infrastructure to address a compiler warning on 32bit hosts due to a fprintf() modifier/argument mismatch." * tag 'x86-vdso-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vdso: Use proper modifier for len's format specifier in extract() commit 64f8e73de08d11cbe01347340db95b4011872ec5 Merge: eea2647e74cd7 ebca17707e38f Author: Linus Torvalds Date: Mon Apr 26 10:09:38 2021 -0700 Merge tag 'x86-splitlock-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 bus lock detection updates from Thomas Gleixner: "Support for enhanced split lock detection: Newer CPUs provide a second mechanism to detect operations with lock prefix which go accross a cache line boundary. Such operations have to take bus lock which causes a system wide performance degradation when these operations happen frequently. The new mechanism is not using the #AC exception. It triggers #DB and is restricted to operations in user space. Kernel side split lock access can only be detected by the #AC based variant. Contrary to the #AC based mechanism the #DB based variant triggers _after_ the instruction was executed. The mechanism is CPUID enumerated and contrary to the #AC version which is based on the magic TEST_CTRL_MSR and model/family based enumeration on the way to become architectural" * tag 'x86-splitlock-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: Documentation/admin-guide: Change doc for split_lock_detect parameter x86/traps: Handle #DB for bus lock x86/cpufeatures: Enumerate #DB for bus lock detection commit ceaf2966ab082bbc4d26516f97b3ca8a676e2af8 Author: Xiao Ni Date: Sun Apr 25 17:22:57 2021 +0800 async_xor: increase src_offs when dropping destination page Now we support sharing one page if PAGE_SIZE is not equal stripe size. To support this, it needs to support calculating xor value with different offsets for each r5dev. One offset array is used to record those offsets. In RMW mode, parity page is used as a source page. It sets ASYNC_TX_XOR_DROP_DST before calculating xor value in ops_run_prexor5. So it needs to add src_list and src_offs at the same time. Now it only needs src_list. So the xor value which is calculated is wrong. It can cause data corruption problem. I can reproduce this problem 100% on a POWER8 machine. The steps are: mdadm -CR /dev/md0 -l5 -n3 /dev/sdb1 /dev/sdc1 /dev/sdd1 --size=3G mkfs.xfs /dev/md0 mount /dev/md0 /mnt/test mount: /mnt/test: mount(2) system call failed: Structure needs cleaning. Fixes: 29bcff787a25 ("md/raid5: add new xor function to support different page offset") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit eea2647e74cd7bd5d04861ce55fa502de165de14 Merge: 6f78c2a7b7219 70918779aec9b Author: Linus Torvalds Date: Mon Apr 26 10:02:09 2021 -0700 Merge tag 'x86-entry-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull entry code update from Thomas Gleixner: "Provide support for randomized stack offsets per syscall to make stack-based attacks harder which rely on the deterministic stack layout. The feature is based on the original idea of PaX's RANDSTACK feature, but uses a significantly different implementation. The offset does not affect the pt_regs location on the task stack as this was agreed on to be of dubious value. The offset is applied before the actual syscall is invoked. The offset is stored per cpu and the randomization happens at the end of the syscall which is less predictable than on syscall entry. The mechanism to apply the offset is via alloca(), i.e. abusing the dispised VLAs. This comes with the drawback that stack-clash-protection has to be disabled for the affected compilation units and there is also a negative interaction with stack-protector. Those downsides are traded with the advantage that this approach does not require any intrusive changes to the low level assembly entry code, does not affect the unwinder and the correct stack alignment is handled automatically by the compiler. The feature is guarded with a static branch which avoids the overhead when disabled. Currently this is supported for X86 and ARM64" * tag 'x86-entry-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: arm64: entry: Enable random_kstack_offset support lkdtm: Add REPORT_STACK for checking stack offsets x86/entry: Enable random_kstack_offset support stack: Optionally randomize kernel stack offset each syscall init_on_alloc: Optimize static branches jump_label: Provide CONFIG-driven build state defaults commit 6f78c2a7b7219bc2e455250365f438621e5819d0 Merge: 87dcebff92623 9a98bc2cf08a0 Author: Linus Torvalds Date: Mon Apr 26 10:00:38 2021 -0700 Merge tag 'x86-apic-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 apic update from Thomas Gleixner: "A single commit to make the vector allocation code more resilent against an accidental allocation attempt for IRQ2" * tag 'x86-apic-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vector: Add a sanity check to prevent IRQ2 allocations commit 87dcebff9262330ceffad8f1732f29fd35feab5a Merge: 91552ab8ffb81 2d036dfa5f10d Author: Linus Torvalds Date: Mon Apr 26 09:54:03 2021 -0700 Merge tag 'timers-core-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "The time and timers updates contain: Core changes: - Allow runtime power management when the clocksource is changed. - A correctness fix for clock_adjtime32() so that the return value on success is not overwritten by the result of the copy to user. - Allow late installment of broadcast clockevent devices which was broken because nothing switched them over to oneshot mode. This went unnoticed so far because clockevent devices used to be built in, but now people started to make them modular. - Debugfs related simplifications - Small cleanups and improvements here and there Driver changes: - The usual set of device tree binding updates for a wide range of drivers/devices. - The usual updates and improvements for drivers all over the place but nothing outstanding. - No new clocksource/event drivers. They'll come back next time" * tag 'timers-core-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (24 commits) posix-timers: Preserve return value in clock_adjtime32() tick/broadcast: Allow late registered device to enter oneshot mode tick: Use tick_check_replacement() instead of open coding it time/timecounter: Mark 1st argument of timecounter_cyc2time() as const dt-bindings: timer: nuvoton,npcm7xx: Add wpcm450-timer clocksource/drivers/arm_arch_timer: Add __ro_after_init and __init clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940 clocksource/drivers/timer-ti-dm: Prepare to handle dra7 timer wrap issue clocksource/drivers/dw_apb_timer_of: Add handling for potential memory leak clocksource/drivers/npcm: Add support for WPCM450 clocksource/drivers/sh_cmt: Don't use CMTOUT_IE with R-Car Gen2/3 clocksource/drivers/pistachio: Fix trivial typo clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe() clocksource/drivers/timer-ti-dm: Add missing set_state_oneshot_stopped clocksource/drivers/timer-ti-dm: Fix posted mode status check order dt-bindings: timer: renesas,cmt: Document R8A77961 dt-bindings: timer: renesas,cmt: Add r8a779a0 CMT support clocksource/drivers/ingenic-ost: Add support for the JZ4760B clocksource/drivers/ingenic: Add support for the JZ4760 dt-bindings: timer: ingenic: Add compatible strings for JZ4760(B) ... commit 9557727876674893d35940fddbd03d3b505e7ed8 Author: Chao Yu Date: Thu Apr 22 18:19:25 2021 +0800 f2fs: drop inplace IO if fs status is abnormal If filesystem has cp_error or need_fsck status, let's drop inplace IO to avoid further corruption of fs data. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 8af85f712fce319dd9fe3d41046b5163e7eb0f93 Author: Chao Yu Date: Wed Apr 21 16:39:41 2021 +0800 f2fs: compress: remove unneed check condition In only call path of __cluster_may_compress(), __f2fs_write_data_pages() has checked SBI_POR_DOING condition, and also cluster_may_compress() has checked CP_ERROR_FLAG condition, so remove redundant check condition in __cluster_may_compress() for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 45b14fe200ba0611b6c3874aa5bba584dc979fb9 Author: Stefan Binding Date: Mon Apr 26 17:37:49 2021 +0100 ALSA: hda/cirrus: Use CS8409 filter to fix abnormal sounds on Bullseye Cracking noises have been reported on the built-in speaker for certain Bullseye platforms, when volume is > 80%. This issue is caused by the specific combination of Codec and AMP in this platform, and cannot be fixed by the AMP, so indead must be fixed at codec level, by adding attenuation to the volume. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1924997 Reported-and-tested-by: You-Sheng Yang Cc: Link: https://lore.kernel.org/r/20210426163749.196153-3-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 0e853a9c3937caa9f13fdde547d6202f92457c2b Author: Stefan Binding Date: Mon Apr 26 17:37:48 2021 +0100 ALSA: hda/cirrus: Set Initial DMIC volume for Bullseye to -26 dB After booting for first time on Bullseye, the DMIC is currently muted. Instead, the DMIC volume should be set to a valid initial value. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1923557 Reported-and-tested-by: You-Sheng Yang Cc: Link: https://lore.kernel.org/r/20210426163749.196153-2-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 91552ab8ffb81317656214daafd9a7bcf09ab0a0 Merge: 3b671bf4a7061 765822e1569a3 Author: Linus Torvalds Date: Mon Apr 26 09:43:16 2021 -0700 Merge tag 'irq-core-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "The usual updates from the irq departement: Core changes: - Provide IRQF_NO_AUTOEN as a flag for request*_irq() so drivers can be cleaned up which either use a seperate mechanism to prevent auto-enable at request time or have a racy mechanism which disables the interrupt right after request. - Get rid of the last usage of irq_create_identity_mapping() and remove the interface. - An overhaul of tasklet_disable(). Most usage sites of tasklet_disable() are in task context and usually in cleanup, teardown code pathes. tasklet_disable() spinwaits for a tasklet which is currently executed. That's not only a problem for PREEMPT_RT where this can lead to a live lock when the disabling task preempts the softirq thread. It's also problematic in context of virtualization when the vCPU which runs the tasklet is scheduled out and the disabling code has to spin wait until it's scheduled back in. There are a few code pathes which invoke tasklet_disable() from non-sleepable context. For these a new disable variant which still spinwaits is provided which allows to switch tasklet_disable() to a sleep wait mechanism. For the atomic use cases this does not solve the live lock issue on PREEMPT_RT. That is mitigated by blocking on the RT specific softirq lock. - The PREEMPT_RT specific implementation of softirq processing and local_bh_disable/enable(). On RT enabled kernels soft interrupt processing happens always in task context and all interrupt handlers, which are not explicitly marked to be invoked in hard interrupt context are forced into task context as well. This allows to protect against softirq processing with a per CPU lock, which in turn allows to make BH disabled regions preemptible. Most of the softirq handling code is still shared. The RT/non-RT specific differences are addressed with a set of inline functions which provide the context specific functionality. The local_bh_disable() / local_bh_enable() mechanism are obviously seperate. - The usual set of small improvements and cleanups Driver changes: - New drivers for Nuvoton WPCM450 and DT 79rc3243x interrupt controllers - Extended functionality for MStar, STM32 and SC7280 irq chips - Enhanced robustness for ARM GICv3/4.1 drivers - The usual set of cleanups and improvements all over the place" * tag 'irq-core-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (53 commits) irqchip/xilinx: Expose Kconfig option for Zynq/ZynqMP irqchip/gic-v3: Do not enable irqs when handling spurious interrups dt-bindings: interrupt-controller: Add IDT 79RC3243x Interrupt Controller irqchip: Add support for IDT 79rc3243x interrupt controller irqdomain: Drop references to recusive irqdomain setup irqdomain: Get rid of irq_create_strict_mappings() irqchip/jcore-aic: Kill use of irq_create_strict_mappings() ARM: PXA: Kill use of irq_create_strict_mappings() irqchip/gic-v4.1: Disable vSGI upon (GIC CPUIF < v4.1) detection irqchip/tb10x: Use 'fallthrough' to eliminate a warning genirq: Reduce irqdebug cacheline bouncing kernel: Initialize cpumask before parsing irqchip/wpcm450: Drop COMPILE_TEST irqchip/irq-mst: Support polarity configuration irqchip: Add driver for WPCM450 interrupt controller dt-bindings: interrupt-controller: Add nuvoton, wpcm450-aic dt-bindings: qcom,pdc: Add compatible for sc7280 irqchip/stm32: Add usart instances exti direct event support irqchip/gic-v3: Fix OF_BAD_ADDR error handling irqchip/sifive-plic: Mark two global variables __ro_after_init ... commit 3b671bf4a70614fe93db0eb46afe29f577e9f076 Merge: 64a925c9271ec 97258ce902d1e Author: Linus Torvalds Date: Mon Apr 26 09:41:15 2021 -0700 Merge tag 'core-entry-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core entry updates from Thomas Gleixner: "A trivial cleanup of typo fixes" * tag 'core-entry-2021-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Fix typos in comments commit 64a925c9271ec50714b9cea6a9980421ca65f835 Merge: ca53fb2c7c7da 27743f01e391e Author: Linus Torvalds Date: Mon Apr 26 09:34:19 2021 -0700 Merge tag 'x86_platform_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Borislav Petkov: "A bunch of SGI UV improvements, fixes and cleanups" * tag 'x86_platform_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/platform/uv: Remove dead !CONFIG_KEXEC_CORE code x86/platform/uv: Fix !KEXEC build failure x86/platform/uv: Add more to secondary CPU kdump info x86/platform/uv: Use x2apic enabled bit as set by BIOS to indicate APIC mode x86/platform/uv: Set section block size for hubless architectures x86/platform/uv: Fix indentation warning in Documentation/ABI/testing/sysfs-firmware-sgi_uv commit ca53fb2c7c7da99dc51e6c959c84c9b0aca4e040 Merge: ea5bc7b977fc7 0ef3439cd80ba Author: Linus Torvalds Date: Mon Apr 26 09:32:35 2021 -0700 Merge tag 'x86_build_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 build updates from Borislav Petkov: "A bunch of clang build fixes and a Kconfig highmem selection fix for 486SX" * tag 'x86_build_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build: Disable HIGHMEM64G selection for M486SX efi/libstub: Add $(CLANG_FLAGS) to x86 flags x86/boot: Add $(CLANG_FLAGS) to compressed KBUILD_CFLAGS x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) commit ea5bc7b977fc7cd2be4065ef41824adc976c807f Merge: 90e66ce9e817d df448cdfc01ff Author: Linus Torvalds Date: Mon Apr 26 09:25:47 2021 -0700 Merge tag 'x86_cleanups_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull misc x86 cleanups from Borislav Petkov: "Trivial cleanups and fixes all over the place" * tag 'x86_cleanups_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: MAINTAINERS: Remove me from IDE/ATAPI section x86/pat: Do not compile stubbed functions when X86_PAT is off x86/asm: Ensure asm/proto.h can be included stand-alone x86/platform/intel/quark: Fix incorrect kernel-doc comment syntax in files x86/msr: Make locally used functions static x86/cacheinfo: Remove unneeded dead-store initialization x86/process/64: Move cpu_current_top_of_stack out of TSS tools/turbostat: Unmark non-kernel-doc comment x86/syscalls: Fix -Wmissing-prototypes warnings from COND_SYSCALL() x86/fpu/math-emu: Fix function cast warning x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes x86: Fix various typos in comments, take #2 x86: Remove unusual Unicode characters from comments x86/kaslr: Return boolean values from a function returning bool x86: Fix various typos in comments x86/setup: Remove unused RESERVE_BRK_ARRAY() stacktrace: Move documentation for arch_stack_walk_reliable() to header x86: Remove duplicate TSC DEADLINE MSR definitions commit 90e66ce9e817df307045abe40ff64ecf60e3c6ee Merge: 81a489790a4b9 c361e5d4d07d6 Author: Linus Torvalds Date: Mon Apr 26 09:24:06 2021 -0700 Merge tag 'x86_boot_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Borislav Petkov: "Consolidation and cleanup of the early memory reservations, along with a couple of gcc11 warning fixes" * tag 'x86_boot_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/setup: Move trim_snb_memory() later in setup_arch() to fix boot hangs x86/setup: Merge several reservations of start of memory x86/setup: Consolidate early memory reservations x86/boot/compressed: Avoid gcc-11 -Wstringop-overread warning x86/boot/tboot: Avoid Wstringop-overread-warning commit 3bf0fcd754345d7ea63e1446015ba65ece6788ca Author: Vitaly Kuznetsov Date: Mon Apr 26 15:01:21 2021 +0200 KVM: selftests: Speed up set_memory_region_test After commit 4fc096a99e01 ("KVM: Raise the maximum number of user memslots") set_memory_region_test may take too long, reports are that the default timeout value we have (120s) may not be enough even on a physical host. Speed things up a bit by throwing away vm_userspace_mem_region_add() usage from test_add_max_memory_regions(), we don't really need to do the majority of the stuff it does for the sake of this test. On my AMD EPYC 7401P, # time ./set_memory_region_test pre-patch: Testing KVM_RUN with zero added memory regions Allowed number of memory slots: 32764 Adding slots 0..32763, each memory region with 2048K size Testing MOVE of in-use region, 10 loops Testing DELETE of in-use region, 10 loops real 0m44.917s user 0m7.416s sys 0m34.601s post-patch: Testing KVM_RUN with zero added memory regions Allowed number of memory slots: 32764 Adding slots 0..32763, each memory region with 2048K size Testing MOVE of in-use region, 10 loops Testing DELETE of in-use region, 10 loops real 0m20.714s user 0m0.109s sys 0m18.359s Reported-by: kernel test robot Signed-off-by: Vitaly Kuznetsov Message-Id: <20210426130121.758229-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 47a6959fa331fe892a4fc3b48ca08e92045c6bda Author: Florian Westphal Date: Mon Apr 26 12:14:40 2021 +0200 netfilter: allow to turn off xtables compat layer The compat layer needs to parse untrusted input (the ruleset) to translate it to a 64bit compatible format. We had a number of bugs in this department in the past, so allow users to turn this feature off. Add CONFIG_NETFILTER_XTABLES_COMPAT kconfig knob and make it default to y to keep existing behaviour. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 50f2db9e368f73ecbbaa92da365183fa953aaba7 Author: Pablo Neira Ayuso Date: Fri Apr 23 00:17:12 2021 +0200 netfilter: nfnetlink: consolidate callback types Add enum nfnl_callback_type to identify the callback type to provide one single callback. Signed-off-by: Pablo Neira Ayuso commit 7dab8ee3b6e7ec856a616d07ebb9ebd736c92520 Author: Pablo Neira Ayuso Date: Fri Apr 23 00:17:11 2021 +0200 netfilter: nfnetlink: pass struct nfnl_info to batch callbacks Update batch callbacks to use the nfnl_info structure. Rename one clashing info variable to expr_info. Signed-off-by: Pablo Neira Ayuso commit 797d49805ddc6595b2fafe3e9ceff7f562be1f2c Author: Pablo Neira Ayuso Date: Fri Apr 23 00:17:10 2021 +0200 netfilter: nfnetlink: pass struct nfnl_info to rcu callbacks Update rcu callbacks to use the nfnl_info structure. Signed-off-by: Pablo Neira Ayuso commit 81a489790a4b9e269dbfc50aa054e71d554a910b Merge: 47e12f1410817 523caed9efbb0 Author: Linus Torvalds Date: Mon Apr 26 09:15:56 2021 -0700 Merge tag 'x86_sgx_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 SGX updates from Borislav Petkov: "Add the guest side of SGX support in KVM guests. Work by Sean Christopherson, Kai Huang and Jarkko Sakkinen. Along with the usual fixes, cleanups and improvements" * tag 'x86_sgx_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits) x86/sgx: Mark sgx_vepc_vm_ops static x86/sgx: Do not update sgx_nr_free_pages in sgx_setup_epc_section() x86/sgx: Move provisioning device creation out of SGX driver x86/sgx: Add helpers to expose ECREATE and EINIT to KVM x86/sgx: Add helper to update SGX_LEPUBKEYHASHn MSRs x86/sgx: Add encls_faulted() helper x86/sgx: Add SGX2 ENCLS leaf definitions (EAUG, EMODPR and EMODT) x86/sgx: Move ENCLS leaf definitions to sgx.h x86/sgx: Expose SGX architectural definitions to the kernel x86/sgx: Initialize virtual EPC driver even when SGX driver is disabled x86/cpu/intel: Allow SGX virtualization without Launch Control support x86/sgx: Introduce virtual EPC for use by KVM guests x86/sgx: Add SGX_CHILD_PRESENT hardware error code x86/sgx: Wipe out EREMOVE from sgx_free_epc_page() x86/cpufeatures: Add SGX1 and SGX2 sub-features x86/cpufeatures: Make SGX_LC feature bit depend on SGX bit x86/sgx: Remove unnecessary kmap() from sgx_ioc_enclave_init() selftests/sgx: Use getauxval() to simplify test code selftests/sgx: Improve error detection and messages x86/sgx: Add a basic NUMA allocation scheme to sgx_alloc_epc_page() ... commit 47e12f14108170c36af9a0ee2271abb3dfb73e0e Merge: 26a4ef7e481c9 0b4a285e2c65c Author: Linus Torvalds Date: Mon Apr 26 09:13:43 2021 -0700 Merge tag 'x86_vmware_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 vmware guest update from Borislav Petkov: "Have vmware guests skip the refined TSC calibration when the TSC frequency has been retrieved from the hypervisor" * tag 'x86_vmware_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/vmware: Avoid TSC recalibration when frequency is known commit 26a4ef7e481c9d70d2e0cf0be1ad37279fe0b6de Merge: 98ee795b21733 799de1baaf350 Author: Linus Torvalds Date: Mon Apr 26 09:11:10 2021 -0700 Merge tag 'x86_seves_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 AMD secure virtualization (SEV-ES) updates from Borislav Petkov: "Add support for SEV-ES guests booting through the 32-bit boot path, along with cleanups, fixes and improvements" * tag 'x86_seves_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/sev-es: Optimize __sev_es_ist_enter() for better readability x86/sev-es: Replace open-coded hlt-loops with sev_es_terminate() x86/boot/compressed/64: Check SEV encryption in the 32-bit boot-path x86/boot/compressed/64: Add CPUID sanity check to 32-bit boot-path x86/boot/compressed/64: Add 32-bit boot #VC handler x86/boot/compressed/64: Setup IDT in startup_32 boot path x86/boot/compressed/64: Reload CS in startup_32 x86/sev: Do not require Hypervisor CPUID bit for SEV guests x86/boot/compressed/64: Cleanup exception handling before booting kernel x86/virtio: Have SEV guests enforce restricted virtio memory access x86/sev-es: Remove subtraction of res variable commit 98ee795b21733a370bfdb3ba4359d2e31e6db514 Merge: 2c5ce2dba26af f281854fa743f Author: Linus Torvalds Date: Mon Apr 26 09:09:18 2021 -0700 Merge tag 'x86_misc_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 tool update from Borislav Petkov: "A new kcpuid tool to dump the raw CPUID leafs of a CPU. It has the CPUID bit definitions in a separate csv file which allows for adding support for new CPUID leafs and bits without having to update the tool. The main use case for the tool is hw enablement on preproduction x86 hardware" * tag 'x86_misc_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: tools/x86/kcpuid: Add AMD leaf 0x8000001E tools/x86/kcpuid: Check last token too selftests/x86: Add a missing .note.GNU-stack section to thunks_32.S tools/x86/kcpuid: Add AMD Secure Encryption leaf tools/x86: Add a kcpuid tool to show raw CPU features commit 2c5ce2dba26afb39d426d9c06fd1c8e5057936d7 Merge: 2c53279180222 054ac8ad5ebe4 Author: Linus Torvalds Date: Mon Apr 26 09:01:29 2021 -0700 Merge tag 'x86_alternatives_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 alternatives/paravirt updates from Borislav Petkov: "First big cleanup to the paravirt infra to use alternatives and thus eliminate custom code patching. For that, the alternatives infrastructure is extended to accomodate paravirt's needs and, as a result, a lot of paravirt patching code goes away, leading to a sizeable cleanup and simplification. Work by Juergen Gross" * tag 'x86_alternatives_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/paravirt: Have only one paravirt patch function x86/paravirt: Switch functions with custom code to ALTERNATIVE x86/paravirt: Add new PVOP_ALT* macros to support pvops in ALTERNATIVEs x86/paravirt: Switch iret pvops to ALTERNATIVE x86/paravirt: Simplify paravirt macros x86/paravirt: Remove no longer needed 32-bit pvops cruft x86/paravirt: Add new features for paravirt patching x86/alternative: Use ALTERNATIVE_TERNARY() in _static_cpu_has() x86/alternative: Support ALTERNATIVE_TERNARY x86/alternative: Support not-feature x86/paravirt: Switch time pvops functions to use static_call() static_call: Add function to query current function static_call: Move struct static_call_key definition to static_call_types.h x86/alternative: Merge include files x86/alternative: Drop unused feature parameter from ALTINSTR_REPLACEMENT() commit 4fb44dd2c1dda18606348acdfdb97e8759dde9df Author: Lv Yunlong Date: Mon Apr 26 07:55:41 2021 -0700 ALSA: sb: Fix two use after free in snd_sb_qsound_build In snd_sb_qsound_build, snd_ctl_add(..,p->qsound_switch...) and snd_ctl_add(..,p->qsound_space..) are called. But the second arguments of snd_ctl_add() could be freed via snd_ctl_add_replace() ->snd_ctl_free_one(). After the error code is returned, snd_sb_qsound_destroy(p) is called in __error branch. But in snd_sb_qsound_destroy(), the freed p->qsound_switch and p->qsound_space are still used by snd_ctl_remove(). My patch set p->qsound_switch and p->qsound_space to NULL if snd_ctl_add() failed to avoid the uaf bugs. But these codes need to further be improved with the code style. Signed-off-by: Lv Yunlong Cc: Link: https://lore.kernel.org/r/20210426145541.8070-1-lyl2019@mail.ustc.edu.cn Signed-off-by: Takashi Iwai commit 2c532791802223560f86e3864dbafa3a6d9d008d Merge: 41acc109a53dd 2ffdc2c344215 Author: Linus Torvalds Date: Mon Apr 26 09:00:11 2021 -0700 Merge tag 'ras_core_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 RAS update from Borislav Petkov: "Provide the ability to specify the IPID (IP block associated with the MCE, AMD-specific) when injecting an MCE" * tag 'ras_core_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mce/inject: Add IPID for injection too commit 41acc109a53dd32cd5739cee996068269dcd2962 Merge: a4a78bc8ead44 7189b3c119036 Author: Linus Torvalds Date: Mon Apr 26 08:58:49 2021 -0700 Merge tag 'x86_microcode_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 microcode update from Borislav Petkov: "A single fix to the late microcode loading machinery which corrects the ordering of when new microcode is loaded from the fs, vs checking whether all CPUs are online" * tag 'x86_microcode_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/microcode: Check for offline CPUs before requesting new microcode commit a4a78bc8ead44c3cdb470c6e1f37afcabdddfc14 Merge: ffc766b31e900 e3a606f2c544b Author: Linus Torvalds Date: Mon Apr 26 08:51:23 2021 -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: - crypto_destroy_tfm now ignores errors as well as NULL pointers Algorithms: - Add explicit curve IDs in ECDH algorithm names - Add NIST P384 curve parameters - Add ECDSA Drivers: - Add support for Green Sardine in ccp - Add ecdh/curve25519 to hisilicon/hpre - Add support for AM64 in sa2ul" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (184 commits) fsverity: relax build time dependency on CRYPTO_SHA256 fscrypt: relax Kconfig dependencies for crypto API algorithms crypto: camellia - drop duplicate "depends on CRYPTO" crypto: s5p-sss - consistently use local 'dev' variable in probe() crypto: s5p-sss - remove unneeded local variable initialization crypto: s5p-sss - simplify getting of_device_id match data ccp: ccp - add support for Green Sardine crypto: ccp - Make ccp_dev_suspend and ccp_dev_resume void functions crypto: octeontx2 - add support for OcteonTX2 98xx CPT block. crypto: chelsio/chcr - Remove useless MODULE_VERSION crypto: ux500/cryp - Remove duplicate argument crypto: chelsio - remove unused function crypto: sa2ul - Add support for AM64 crypto: sa2ul - Support for per channel coherency dt-bindings: crypto: ti,sa2ul: Add new compatible for AM64 crypto: hisilicon - enable new error types for QM crypto: hisilicon - add new error type for SEC crypto: hisilicon - support new error types for ZIP crypto: hisilicon - dynamic configuration 'err_info' crypto: doc - fix kernel-doc notation in chacha.c and af_alg.c ... commit ffc766b31e900e91454d53b8619f0ff5377df945 Merge: b0e22b47f650b 5dc33592e9553 Author: Linus Torvalds Date: Mon Apr 26 08:44:23 2021 -0700 Merge tag 'tomoyo-pr-20210426' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1 Pull lockdep capacity limit updates from Tetsuo Handa: "syzbot is occasionally reporting that fuzz testing is terminated due to hitting upper limits lockdep can track. Analysis via /proc/lockdep* did not show any obvious culprits, allow tuning tracing capacity constants" * tag 'tomoyo-pr-20210426' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1: lockdep: Allow tuning tracing capacity constants. commit b0e22b47f650b53dbb094cd0011a48f6f3ae3e29 Merge: 87f27e7b189f5 ebd9c2ae369a4 Author: Linus Torvalds Date: Mon Apr 26 08:38:10 2021 -0700 Merge tag 'keys-cve-2020-26541-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs Pull x509 dbx/mokx UEFI support from David Howells: "Here's a set of patches from Eric Snowberg[1] that add support for EFI_CERT_X509_GUID entries in the dbx and mokx UEFI tables (such entries cause matching certificates to be rejected). These are currently ignored and only the hash entries are made use of. Additionally Eric included his patches to allow such certificates to be preloaded. These patches deal with CVE-2020-26541. To quote Eric: 'This is the fifth patch series for adding support for EFI_CERT_X509_GUID entries [2]. It has been expanded to not only include dbx entries but also entries in the mokx. Additionally my series to preload these certificate [3] has also been included'" Link: https://lore.kernel.org/r/20210122181054.32635-1-eric.snowberg@oracle.com [1] Link: https://patchwork.kernel.org/project/linux-security-module/patch/20200916004927.64276-1-eric.snowberg@oracle.com/ [2] Link: https://lore.kernel.org/patchwork/cover/1315485/ [3] * tag 'keys-cve-2020-26541-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs: integrity: Load mokx variables into the blacklist keyring certs: Add ability to preload revocation certs certs: Move load_system_certificate_list to a common function certs: Add EFI_CERT_X509_GUID support for dbx entries commit 2951162094e61f574b0ddf886c783ace65049450 Author: Atish Patra Date: Wed Mar 3 12:02:52 2021 -0800 RISC-V: Enable Microchip PolarFire ICICLE SoC Enable Microchip PolarFire ICICLE soc config in defconfig. It allows the default upstream kernel to boot on PolarFire ICICLE board. Signed-off-by: Atish Patra Reviewed-by: Anup Patel Reviewed-by: Bin Meng Signed-off-by: Palmer Dabbelt commit 0fa6107eca4186adc6adda3b54c8b942477066c1 Author: Atish Patra Date: Wed Mar 3 12:02:51 2021 -0800 RISC-V: Initial DTS for Microchip ICICLE board Add initial DTS for Microchip ICICLE board having only essential devices (clocks, sdhci, ethernet, serial, etc). The device tree is based on the U-Boot patch. https://patchwork.ozlabs.org/project/uboot/patch/20201110103414.10142-6-padmarao.begari@microchip.com/ Signed-off-by: Atish Patra Signed-off-by: Palmer Dabbelt commit d53b0244c84c4e2721bede258e6a229ef56a138e Author: Atish Patra Date: Wed Mar 3 12:02:50 2021 -0800 dt-bindings: riscv: microchip: Add YAML documentation for the PolarFire SoC Add YAML DT binding documentation for the Microchip PolarFire SoC. It is documented at: https://www.microsemi.com/products/fpga-soc/polarfire-soc-icicle-quick-start-guide Signed-off-by: Atish Patra Reviewed-by: Rob Herring Signed-off-by: Palmer Dabbelt commit 99b3e3d41a034d9b3993800287d023ea063da293 Author: Atish Patra Date: Wed Mar 3 12:02:49 2021 -0800 RISC-V: Add Microchip PolarFire SoC kconfig option Add Microchip PolarFire kconfig option which selects SoC specific and common drivers that is required for this SoC. Signed-off-by: Atish Patra Reviewed-by: Bin Meng Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 44c922572952d89a1ed15764f2b373ba62692865 Author: Vitaly Wool Date: Tue Apr 13 02:35:14 2021 -0400 RISC-V: enable XIP Introduce XIP (eXecute In Place) support for RISC-V platforms. It allows code to be executed directly from non-volatile storage directly addressable by the CPU, such as QSPI NOR flash which can be found on many RISC-V platforms. This makes way for significant optimization of RAM footprint. The XIP kernel is not compressed since it has to run directly from flash, so it will occupy more space on the non-volatile storage. The physical flash address used to link the kernel object files and for storing it has to be known at compile time and is represented by a Kconfig option. XIP on RISC-V will for the time being only work on MMU-enabled kernels. Signed-off-by: Vitaly Wool [Alex: Rebase on top of "Move kernel mapping outside the linear mapping" ] Signed-off-by: Alexandre Ghiti [Palmer: disable XIP for allyesconfig] Signed-off-by: Palmer Dabbelt commit 87f27e7b189f54a9e928efb4ea98bf375708ff1f Merge: 7dd1ce1a526cb 60dc5f1bcfaa9 Author: Linus Torvalds Date: Mon Apr 26 08:31:03 2021 -0700 Merge tag 'queue' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/tpmdd Pull tpm fixes from James Bottomley: "Fix a regression in the TPM trusted keys caused by the generic rework to add ARM TEE based trusted keys. Without this fix, the TPM trusted key subsystem fails to add or load any keys" * tag 'queue' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/tpmdd: KEYS: trusted: fix TPM trusted keys for generic framework commit 7dd1ce1a526cb444bd2308c9fda52add4c532ac1 Merge: 9f4ad9e425a1d aec00aa04b113 Author: Linus Torvalds Date: Mon Apr 26 08:27:59 2021 -0700 Merge tag 'tpmdd-next-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull tpm updates from Jarkko Sakkinen: "New features: - ARM TEE backend for kernel trusted keys to complete the existing TPM backend - ASN.1 format for TPM2 trusted keys to make them interact with the user space stack, such as OpenConnect VPN Other than that, a bunch of bug fixes" * tag 'tpmdd-next-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: KEYS: trusted: Fix missing null return from kzalloc call char: tpm: fix error return code in tpm_cr50_i2c_tis_recv() MAINTAINERS: Add entry for TEE based Trusted Keys doc: trusted-encrypted: updates with TEE as a new trust source KEYS: trusted: Introduce TEE based Trusted Keys KEYS: trusted: Add generic trusted keys framework security: keys: trusted: Make sealed key properly interoperable security: keys: trusted: use ASN.1 TPM2 key format for the blobs security: keys: trusted: fix TPM2 authorizations oid_registry: Add TCG defined OIDS for TPM keys lib: Add ASN.1 encoder tpm: vtpm_proxy: Avoid reading host log when using a virtual device tpm: acpi: Check eventlog signature before using it tpm: efi: Use local variable for calculating final log size commit 5640975003d0234da08559677e22ec25b9cb3267 Author: Nick Kossifidis Date: Mon Apr 19 03:55:39 2021 +0300 RISC-V: Add crash kernel support This patch allows Linux to act as a crash kernel for use with kdump. Userspace will let the crash kernel know about the memory region it can use through linux,usable-memory property on the /memory node (overriding its reg property), and about the memory region where the elf core header of the previous kernel is saved, through a reserved-memory node with a compatible string of "linux,elfcorehdr". This approach is the least invasive and re-uses functionality already present. I tested this on riscv64 qemu and it works as expected, you may test it by retrieving the dmesg of the previous kernel through /proc/vmcore, using the vmcore-dmesg utility from kexec-tools. Signed-off-by: Nick Kossifidis Signed-off-by: Palmer Dabbelt commit e53d28180d4d0fd12b6d2bde49cb87aa775b6ba8 Author: Nick Kossifidis Date: Mon Apr 19 03:55:38 2021 +0300 RISC-V: Add kdump support This patch adds support for kdump, the kernel will reserve a region for the crash kernel and jump there on panic. In order for userspace tools (kexec-tools) to prepare the crash kernel kexec image, we also need to expose some information on /proc/iomem for the memory regions used by the kernel and for the region reserved for crash kernel. Note that on userspace the device tree is used to determine the system's memory layout so the "System RAM" on /proc/iomem is ignored. I tested this on riscv64 qemu and works as expected, you may test it by triggering a crash through /proc/sysrq_trigger: echo c > /proc/sysrq_trigger Signed-off-by: Nick Kossifidis Signed-off-by: Palmer Dabbelt commit ffe0e526126884cf036a6f724220f1f9b4094fd2 Author: Nick Kossifidis Date: Mon Apr 19 03:55:37 2021 +0300 RISC-V: Improve init_resources() The kernel region is always present and we know where it is, no need to look for it inside the loop, just ignore it like the rest of the reserved regions within system's memory. Additionally, we don't need to call memblock_free inside the loop, as if called it'll split the region of pre-allocated resources in two parts, messing things up, just re-use the previous pre-allocated resource and free any unused resources after both loops finish. Signed-off-by: Nick Kossifidis [Palmer: commit text] Signed-off-by: Palmer Dabbelt commit fba8a8674f68a0628abae470dfcfbcb4a0d7a79e Author: Nick Kossifidis Date: Mon Apr 19 03:55:36 2021 +0300 RISC-V: Add kexec support This patch adds support for kexec on RISC-V. On SMP systems it depends on HOTPLUG_CPU in order to be able to bring up all harts after kexec. It also needs a recent OpenSBI version that supports the HSM extension. I tested it on riscv64 QEMU on both an smp and a non-smp system. Signed-off-by: Nick Kossifidis Signed-off-by: Palmer Dabbelt commit d83e682e301071313e390e2f5ba2f6ca2ebc1848 Author: Nick Kossifidis Date: Mon Apr 19 03:55:35 2021 +0300 RISC-V: Add EM_RISCV to kexec UAPI header Add RISC-V to the list of supported kexec architectures, we need to add the definition early-on so that later patches can use it. EM_RISCV is 243 as per ELF psABI specification here: https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md Signed-off-by: Nick Kossifidis Signed-off-by: Palmer Dabbelt commit 772d7891e8b3b0baae7bb88a294d61fd07ba6d15 Author: Jisheng Zhang Date: Fri Apr 2 21:29:08 2021 +0800 riscv: vdso: fix and clean-up Makefile Running "make" on an already compiled kernel tree will rebuild the kernel even without any modifications: CALL linux/scripts/checksyscalls.sh CALL linux/scripts/atomic/check-atomics.sh CHK include/generated/compile.h SO2S arch/riscv/kernel/vdso/vdso-syms.S AS arch/riscv/kernel/vdso/vdso-syms.o AR arch/riscv/kernel/vdso/built-in.a AR arch/riscv/kernel/built-in.a AR arch/riscv/built-in.a GEN .version CHK include/generated/compile.h UPD include/generated/compile.h CC init/version.o AR init/built-in.a LD vmlinux.o The reason is "Any target that utilizes if_changed must be listed in $(targets), otherwise the command line check will fail, and the target will always be built" as explained by Documentation/kbuild/makefiles.rst Fix this build bug by adding vdso-syms.S to $(targets) At the same time, there are two trivial clean up modifications: - the vdso-dummy.o is not needed any more after so remove it. - vdso.lds is a generated file, so it should be prefixed with $(obj)/ instead of $(src)/ Fixes: c2c81bb2f691 ("RISC-V: Fix the VDSO symbol generaton for binutils-2.35+") Cc: stable@vger.kernel.org Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit e75e6bf47a4723ce16f65c7387c20a8c18a1c13b Author: zhouchuangao Date: Tue Mar 30 06:56:26 2021 -0700 riscv/mm: Use BUG_ON instead of if condition followed by BUG. BUG_ON() uses unlikely in if(), which can be optimized at compile time. Signed-off-by: zhouchuangao Signed-off-by: Palmer Dabbelt commit b1ebaa0e1318494a7637099a26add50509e37964 Author: Liao Chang Date: Tue Mar 30 16:18:48 2021 +0800 riscv/kprobe: fix kernel panic when invoking sys_read traced by kprobe The execution of sys_read end up hitting a BUG_ON() in __find_get_block after installing kprobe at sys_read, the BUG message like the following: [ 65.708663] ------------[ cut here ]------------ [ 65.709987] kernel BUG at fs/buffer.c:1251! [ 65.711283] Kernel BUG [#1] [ 65.712032] Modules linked in: [ 65.712925] CPU: 0 PID: 51 Comm: sh Not tainted 5.12.0-rc4 #1 [ 65.714407] Hardware name: riscv-virtio,qemu (DT) [ 65.715696] epc : __find_get_block+0x218/0x2c8 [ 65.716835] ra : __getblk_gfp+0x1c/0x4a [ 65.717831] epc : ffffffe00019f11e ra : ffffffe00019f56a sp : ffffffe002437930 [ 65.719553] gp : ffffffe000f06030 tp : ffffffe0015abc00 t0 : ffffffe00191e038 [ 65.721290] t1 : ffffffe00191e038 t2 : 000000000000000a s0 : ffffffe002437960 [ 65.723051] s1 : ffffffe00160ad00 a0 : ffffffe00160ad00 a1 : 000000000000012a [ 65.724772] a2 : 0000000000000400 a3 : 0000000000000008 a4 : 0000000000000040 [ 65.726545] a5 : 0000000000000000 a6 : ffffffe00191e000 a7 : 0000000000000000 [ 65.728308] s2 : 000000000000012a s3 : 0000000000000400 s4 : 0000000000000008 [ 65.730049] s5 : 000000000000006c s6 : ffffffe00240f800 s7 : ffffffe000f080a8 [ 65.731802] s8 : 0000000000000001 s9 : 000000000000012a s10: 0000000000000008 [ 65.733516] s11: 0000000000000008 t3 : 00000000000003ff t4 : 000000000000000f [ 65.734434] t5 : 00000000000003ff t6 : 0000000000040000 [ 65.734613] status: 0000000000000100 badaddr: 0000000000000000 cause: 0000000000000003 [ 65.734901] Call Trace: [ 65.735076] [] __find_get_block+0x218/0x2c8 [ 65.735417] [] __ext4_get_inode_loc+0xb2/0x2f6 [ 65.735618] [] ext4_get_inode_loc+0x3a/0x8a [ 65.735802] [] ext4_reserve_inode_write+0x2e/0x8c [ 65.735999] [] __ext4_mark_inode_dirty+0x4c/0x18e [ 65.736208] [] ext4_dirty_inode+0x46/0x66 [ 65.736387] [] __mark_inode_dirty+0x12c/0x3da [ 65.736576] [] touch_atime+0x146/0x150 [ 65.736748] [] filemap_read+0x234/0x246 [ 65.736920] [] generic_file_read_iter+0xc0/0x114 [ 65.737114] [] ext4_file_read_iter+0x42/0xea [ 65.737310] [] new_sync_read+0xe2/0x15a [ 65.737483] [] vfs_read+0xca/0xf2 [ 65.737641] [] ksys_read+0x5e/0xc8 [ 65.737816] [] sys_read+0xe/0x16 [ 65.737973] [] ret_from_syscall+0x0/0x2 [ 65.738858] ---[ end trace fe93f985456c935d ]--- A simple reproducer looks like: echo 'p:myprobe sys_read fd=%a0 buf=%a1 count=%a2' > /sys/kernel/debug/tracing/kprobe_events echo 1 > /sys/kernel/debug/tracing/events/kprobes/myprobe/enable cat /sys/kernel/debug/tracing/trace Here's what happens to hit that BUG_ON(): 1) After installing kprobe at entry of sys_read, the first instruction is replaced by 'ebreak' instruction on riscv64 platform. 2) Once kernel reach the 'ebreak' instruction at the entry of sys_read, it trap into the riscv breakpoint handler, where it do something to setup for coming single-step of origin instruction, including backup the 'sstatus' in pt_regs, followed by disable interrupt during single stepping via clear 'SIE' bit of 'sstatus' in pt_regs. 3) Then kernel restore to the instruction slot contains two instructions, one is original instruction at entry of sys_read, the other is 'ebreak'. Here it trigger a 'Instruction page fault' exception (value at 'scause' is '0xc'), if PF is not filled into PageTabe for that slot yet. 4) Again kernel trap into page fault exception handler, where it choose different policy according to the state of running kprobe. Because afte 2) the state is KPROBE_HIT_SS, so kernel reset the current kprobe and 'pc' points back to the probe address. 5) Because 'epc' point back to 'ebreak' instrution at sys_read probe, kernel trap into breakpoint handler again, and repeat the operations at 2), however 'sstatus' without 'SIE' is keep at 4), it cause the real 'sstatus' saved at 2) is overwritten by the one withou 'SIE'. 6) When kernel cross the probe the 'sstatus' CSR restore with value without 'SIE', and reach __find_get_block where it requires the interrupt must be enabled. Fix this is very trivial, just restore the value of 'sstatus' in pt_regs with backup one at 2) when the instruction being single stepped cause a page fault. Fixes: c22b0bcb1dd02 ("riscv: Add kprobes supported") Signed-off-by: Liao Chang Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt commit a9451b8e19716cf8bf420a1d0e58199558ecaeb5 Author: Jisheng Zhang Date: Tue Mar 30 02:26:17 2021 +0800 riscv: Set ARCH_HAS_STRICT_MODULE_RWX if MMU Now we can set ARCH_HAS_STRICT_MODULE_RWX for MMU riscv platforms, this is good from security perspective. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 5387054b986e2d0d994b519020d81b8aa64789c5 Author: Jisheng Zhang Date: Tue Mar 30 02:25:51 2021 +0800 riscv: module: Create module allocations without exec permissions The core code manages the executable permissions of code regions of modules explicitly, it is not necessary to create the module vmalloc regions with RWX permissions. Create them with RW- permissions instead. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit fc8504765ec5e812135b8ccafca7101069a0c6d8 Author: Jisheng Zhang Date: Tue Mar 30 02:25:21 2021 +0800 riscv: bpf: Avoid breaking W^X We allocate Non-executable pages, then call bpf_jit_binary_lock_ro() to enable executable permission after mapping them read-only. This is to prepare for STRICT_MODULE_RWX in following patch. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 1d27d854425faec98f352cf88ec3e2a8844429a4 Author: Jisheng Zhang Date: Tue Mar 30 02:24:54 2021 +0800 riscv: bpf: Move bpf_jit_alloc_exec() and bpf_jit_free_exec() to core We will drop the executable permissions of the code pages from the mapping at allocation time soon. Move bpf_jit_alloc_exec() and bpf_jit_free_exec() to bpf_jit_core.c so that they can be shared by both RV64I and RV32I. Signed-off-by: Jisheng Zhang Acked-by: Luke Nelson Signed-off-by: Palmer Dabbelt commit cdd1b2bd358ffda2638fe18ff47191e84e18525f Author: Jisheng Zhang Date: Tue Mar 30 02:24:21 2021 +0800 riscv: kprobes: Implement alloc_insn_page() Allocate PAGE_KERNEL_READ_EXEC(read only, executable) page for kprobes insn page. This is to prepare for STRICT_MODULE_RWX. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 300f62c37d4601e5b7967c6399917dc6880070bc Author: Jisheng Zhang Date: Tue Mar 30 02:23:54 2021 +0800 riscv: Constify sbi_ipi_ops Constify the sbi_ipi_ops so that it will be placed in the .rodata section. This will cause attempts to modify it to fail when strict page permissions are in place. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit e6a302248cec96c3af4cbfcedc44b0de8a26ebe0 Author: Jisheng Zhang Date: Tue Mar 30 02:23:24 2021 +0800 riscv: Constify sys_call_table Constify the sys_call_table so that it will be placed in the .rodata section. This will cause attempts to modify the table to fail when strict page permissions are in place. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit de31ea4a1181a8bb4d32ab74f3434f2bc2b79122 Author: Jisheng Zhang Date: Tue Mar 30 02:22:51 2021 +0800 riscv: Mark some global variables __ro_after_init All of these are never modified after init, so they can be __ro_after_init. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 1987501b1130c6b4b7e1cef4b9c1dc9a8adae025 Author: Jisheng Zhang Date: Tue Mar 30 02:22:21 2021 +0800 riscv: add __init section marker to some functions They are not needed after booting, so mark them as __init to move them to the __init section. Signed-off-by: Jisheng Zhang Signed-off-by: Palmer Dabbelt commit 0df68ce4c26a48115a9e8d45e24f18d964a10050 Author: Alexandre Ghiti Date: Sun Apr 11 12:41:46 2021 -0400 riscv: Prepare ptdump for vm layout dynamic addresses This is a preparatory patch for sv48 support that will introduce dynamic PAGE_OFFSET. Dynamic PAGE_OFFSET implies that all zones (vmalloc, vmemmap, fixaddr...) whose addresses depend on PAGE_OFFSET become dynamic and can't be used to statically initialize the array used by ptdump to identify the different zones of the vm layout. Signed-off-by: Alexandre Ghiti Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 2a433cf8f3cdb26d9e4f137db5d3b31aed6a2ca7 Author: Alexandre Ghiti Date: Sun Apr 11 12:41:45 2021 -0400 Documentation: riscv: Add documentation that describes the VM layout This new document presents the RISC-V virtual memory layout and is based one the x86 one: it describes the different limits of the different regions of the virtual address space. Signed-off-by: Alexandre Ghiti Signed-off-by: Palmer Dabbelt commit 2bfc6cd81bd17e4306e24ee47b9554c967bcb499 Author: Alexandre Ghiti Date: Sun Apr 11 12:41:44 2021 -0400 riscv: Move kernel mapping outside of linear mapping This is a preparatory patch for relocatable kernel and sv48 support. The kernel used to be linked at PAGE_OFFSET address therefore we could use the linear mapping for the kernel mapping. But the relocated kernel base address will be different from PAGE_OFFSET and since in the linear mapping, two different virtual addresses cannot point to the same physical address, the kernel mapping needs to lie outside the linear mapping so that we don't have to copy it at the same physical offset. The kernel mapping is moved to the last 2GB of the address space, BPF is now always after the kernel and modules use the 2GB memory range right before the kernel, so BPF and modules regions do not overlap. KASLR implementation will simply have to move the kernel in the last 2GB range and just take care of leaving enough space for BPF. In addition, by moving the kernel to the end of the address space, both sv39 and sv48 kernels will be exactly the same without needing to be relocated at runtime. Suggested-by: Arnd Bergmann Signed-off-by: Alexandre Ghiti [Palmer: Squash the STRICT_RWX fix, and a !MMU fix] Signed-off-by: Palmer Dabbelt commit 8a07ac39f87d6c762006398029762c40e4d9d075 Author: Jisheng Zhang Date: Tue Mar 30 02:04:16 2021 +0800 samples/kprobes: Add riscv support Add riscv specific info dump in both handler_pre() and handler_post(). Signed-off-by: Jisheng Zhang Acked-by: Masami Hiramatsu Signed-off-by: Palmer Dabbelt commit adebc8817b5c975d598ac379bbdf67a7a5186ade Author: Nathan Chancellor Date: Thu Mar 25 15:38:07 2021 -0700 riscv: Select HAVE_DYNAMIC_FTRACE when -fpatchable-function-entry is available clang prior to 13.0.0 does not support -fpatchable-function-entry for RISC-V. clang: error: unsupported option '-fpatchable-function-entry=8' for target 'riscv64-unknown-linux-gnu' To avoid this error, only select HAVE_DYNAMIC_FTRACE when this option is not available. Fixes: afc76b8b8011 ("riscv: Using PATCHABLE_FUNCTION_ENTRY instead of MCOUNT") Link: https://github.com/ClangBuiltLinux/linux/issues/1268 Reported-by: kernel test robot Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song Signed-off-by: Palmer Dabbelt commit 7ce04771503074a7de7f539cc43f5e1b385cb99b Author: Nathan Chancellor Date: Thu Mar 25 15:38:06 2021 -0700 riscv: Workaround mcount name prior to clang-13 Prior to clang 13.0.0, the RISC-V name for the mcount symbol was "mcount", which differs from the GCC version of "_mcount", which results in the following errors: riscv64-linux-gnu-ld: init/main.o: in function `__traceiter_initcall_level': main.c:(.text+0xe): undefined reference to `mcount' riscv64-linux-gnu-ld: init/main.o: in function `__traceiter_initcall_start': main.c:(.text+0x4e): undefined reference to `mcount' riscv64-linux-gnu-ld: init/main.o: in function `__traceiter_initcall_finish': main.c:(.text+0x92): undefined reference to `mcount' riscv64-linux-gnu-ld: init/main.o: in function `.LBB32_28': main.c:(.text+0x30c): undefined reference to `mcount' riscv64-linux-gnu-ld: init/main.o: in function `free_initmem': main.c:(.text+0x54c): undefined reference to `mcount' This has been corrected in https://reviews.llvm.org/D98881 but the minimum supported clang version is 10.0.1. To avoid build errors and to gain a working function tracer, adjust the name of the mcount symbol for older versions of clang in mount.S and recordmcount.pl. Link: https://github.com/ClangBuiltLinux/linux/issues/1331 Signed-off-by: Nathan Chancellor Reviewed-by: Nick Desaulniers Signed-off-by: Palmer Dabbelt commit 2f095504f4b9cf75856d6a9cf90299cf75aa46c5 Author: Nathan Chancellor Date: Thu Mar 25 15:38:05 2021 -0700 scripts/recordmcount.pl: Fix RISC-V regex for clang Clang can generate R_RISCV_CALL_PLT relocations to _mcount: $ llvm-objdump -dr build/riscv/init/main.o | rg mcount 000000000000000e: R_RISCV_CALL_PLT _mcount 000000000000004e: R_RISCV_CALL_PLT _mcount After this, the __start_mcount_loc section is properly generated and function tracing still works. Link: https://github.com/ClangBuiltLinux/linux/issues/1331 Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song Signed-off-by: Palmer Dabbelt commit 7f3d349065d0c643f7f7013fbf9bc9f2c90b675f Author: Nathan Chancellor Date: Thu Mar 25 14:51:56 2021 -0700 riscv: Use $(LD) instead of $(CC) to link vDSO Currently, the VDSO is being linked through $(CC). This does not match how the rest of the kernel links objects, which is through the $(LD) variable. When linking with clang, there are a couple of warnings about flags that will not be used during the link: clang-12: warning: argument unused during compilation: '-no-pie' [-Wunused-command-line-argument] clang-12: warning: argument unused during compilation: '-pg' [-Wunused-command-line-argument] '-no-pie' was added in commit 85602bea297f ("RISC-V: build vdso-dummy.o with -no-pie") to override '-pie' getting added to the ld command from distribution versions of GCC that enable PIE by default. It is technically no longer needed after commit c2c81bb2f691 ("RISC-V: Fix the VDSO symbol generaton for binutils-2.35+"), which removed vdso-dummy.o in favor of generating vdso-syms.S from vdso.so with $(NM) but this also resolves the issue in case it ever comes back due to having full control over the $(LD) command. '-pg' is for function tracing, it is not used during linking as clang states. These flags could be removed/filtered to fix the warnings but it is easier to just match the rest of the kernel and use $(LD) directly for linking. See commits fe00e50b2db8 ("ARM: 8858/1: vdso: use $(LD) instead of $(CC) to link VDSO") 691efbedc60d ("arm64: vdso: use $(LD) instead of $(CC) to link VDSO") 2ff906994b6c ("MIPS: VDSO: Use $(LD) instead of $(CC) to link VDSO") 2b2a25845d53 ("s390/vdso: Use $(LD) instead of $(CC) to link vDSO") for more information. The flags are converted to linker flags and '--eh-frame-hdr' is added to match what is added by GCC implicitly, which can be seen by adding '-v' to GCC's invocation. Additionally, since this area is being modified, use the $(OBJCOPY) variable instead of an open coded $(CROSS_COMPILE)objcopy so that the user's choice of objcopy binary is respected. Link: https://github.com/ClangBuiltLinux/linux/issues/803 Link: https://github.com/ClangBuiltLinux/linux/issues/970 Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song Signed-off-by: Palmer Dabbelt commit bff3ff525460b492dca1d1665e821d2b5816ebdb Author: Vincent Chen Date: Mon Mar 22 22:26:06 2021 +0800 riscv: sifive: Apply errata "cip-1200" patch For certain SiFive CPUs, "sfence.vma addr" cannot exactly flush addr from TLB in the particular cases. The details could be found here: https://sifive.cdn.prismic.io/sifive/167a1a56-03f4-4615-a79e-b2a86153148f_FU740_errata_20210205.pdf In order to ensure the functionality, this patch uses the Alternative scheme to replace all "sfence.vma addr" with "sfence.vma" at runtime. Signed-off-by: Vincent Chen Signed-off-by: Palmer Dabbelt commit 800149a77c2cb8746a94457939b1ba1e37d2c14e Author: Vincent Chen Date: Mon Mar 22 22:26:05 2021 +0800 riscv: sifive: Apply errata "cip-453" patch Add sign extension to the $badaddr before addressing the instruction page fault and instruction access fault to workaround the issue "cip-453". To avoid affecting the existing code sequence, this patch will creates two trampolines to add sign extension to the $badaddr. By the "alternative" mechanism, these two trampolines will replace the original exception handler of instruction page fault and instruction access fault in the excp_vect_table. In this case, only the specific SiFive CPU core jumps to the do_page_fault and do_trap_insn_fault through these two trampolines. Other CPUs are not affected. Signed-off-by: Vincent Chen Signed-off-by: Palmer Dabbelt commit 1a0e5dbd3723e1194cc549def69fe7b557d4c72b Author: Vincent Chen Date: Mon Mar 22 22:26:04 2021 +0800 riscv: sifive: Add SiFive alternative ports Add required ports of the Alternative scheme for SiFive. Signed-off-by: Vincent Chen Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 6f4eea90465ad0cd5f3d041b9b2c728426f2b8d4 Author: Vincent Chen Date: Mon Mar 22 22:26:03 2021 +0800 riscv: Introduce alternative mechanism to apply errata solution Introduce the "alternative" mechanism from ARM64 and x86 to apply the CPU vendors' errata solution at runtime. The main purpose of this patch is to provide a framework. Therefore, the implementation is quite basic for now so that some scenarios could not use this schemei, such as patching code to a module, relocating the patching code and heterogeneous CPU topology. Users could use the macro ALTERNATIVE to apply an errata to the existing code flow. In the macro ALTERNATIVE, users need to specify the manufacturer information(vendorid, archid, and impid) for this errata. Therefore, kernel will know this errata is suitable for which CPU core. During the booting procedure, kernel will select the errata required by the CPU core and then patch it. It means that the kernel only applies the errata to the specified CPU core. In this case, the vendor's errata does not affect each other at runtime. The above patching procedure only occurs during the booting phase, so we only take the overhead of the "alternative" mechanism once. This "alternative" mechanism is enabled by default to ensure that all required errata will be applied. However, users can disable this feature by the Kconfig "CONFIG_RISCV_ERRATA_ALTERNATIVE". Signed-off-by: Vincent Chen Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 183787c6fcc2c793ec96e946a4fdd8cd0e6d7aa0 Author: Vincent Chen Date: Mon Mar 22 22:26:02 2021 +0800 riscv: Add 3 SBI wrapper functions to get cpu manufacturer information Add 3 wrapper functions to get vendor id, architecture id and implement id from M-mode Signed-off-by: Vincent Chen Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit b6237f61fc9ca79b8771a4fa412d2c630c9f8d2b Merge: aad659e490eff 6ee4bdc27d1ae Author: Rafael J. Wysocki Date: Mon Apr 26 17:04:41 2021 +0200 Merge branch 'acpi-misc' * acpi-misc: ACPI: dock: fix some coding style issues ACPI: sysfs: fix some coding style issues ACPI: PM: add a missed blank line after declarations ACPI: custom_method: fix a coding style issue ACPI: CPPC: fix some coding style issues ACPI: button: fix some coding style issues ACPI: battery: fix some coding style issues ACPI: acpi_pad: add a missed blank line after declarations ACPI: LPSS: add a missed blank line after declarations ACPI: ipmi: remove useless return statement for void function ACPI: processor: fix some coding style issues ACPI: APD: fix a block comment align issue ACPI: AC: fix some coding style issues ACPI: fix various typos in comments commit 72ce11ddfa4e9e1879103581a60b7e34547eaa0a Author: Lv Yunlong Date: Mon Apr 26 07:32:29 2021 -0700 drivers/block/null_blk/main: Fix a double free in null_init. In null_init, null_add_dev(dev) is called. In null_add_dev, it calls null_free_zoned_dev(dev) to free dev->zones via kvfree(dev->zones) in out_cleanup_zone branch and returns err. Then null_init accept the err code and then calls null_free_dev(dev). But in null_free_dev(dev), dev->zones is freed again by null_free_zoned_dev(). My patch set dev->zones to NULL in null_free_zoned_dev() after kvfree(dev->zones) is called, to avoid the double free. Fixes: 2984c8684f962 ("nullb: factor disk parameters") Signed-off-by: Lv Yunlong Link: https://lore.kernel.org/r/20210426143229.7374-1-lyl2019@mail.ustc.edu.cn Signed-off-by: Jens Axboe commit aad659e490eff3b8e11fca292e6ae4c75e86e871 Merge: 0b2212596db27 2bc6262c6117d 2dfbacc65d1d2 e7b07d3e00dc8 Author: Rafael J. Wysocki Date: Mon Apr 26 17:04:27 2021 +0200 Merge branches 'acpi-cppc', 'acpi-video' and 'acpi-utils' * acpi-cppc: ACPI: CPPC: Replace cppc_attr with kobj_attribute ACPI: CPPC: Add emtpy stubs of functions for CONFIG_ACPI_CPPC_LIB unset * acpi-video: ACPI: video: use native backlight for GA401/GA502/GA503 ACPI: video: Check LCD flag on ACPI-reduced-hardware devices ACPI: utils: Add acpi_reduced_hardware() helper * acpi-utils: ACPI: utils: Capitalize abbreviations in the comments ACPI: utils: Document for_each_acpi_dev_match() macro commit 0b8c0e7c9692cfcfa02c9052d4d53ae67901c400 Author: Pavel Begunkov Date: Mon Apr 26 15:17:38 2021 +0100 io_uring: fix NULL reg-buffer io_import_fixed() doesn't expect a registered buffer slot to be NULL and would fail stumbling on it. We don't allow it, but if during __io_sqe_buffers_update() rsrc removal succeeds but following register fails, we'll get such a situation. Do it atomically and don't remove buffers until we sure that a new one can be set. Fixes: 634d00df5e1cf ("io_uring: add full-fledged dynamic buffers support") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/830020f9c387acddd51962a3123b5566571b8c6d.1619446608.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0b2212596db271d6cfdd2e2ea01ff82a7490a000 Merge: ab497507c0e4d 4cbaba4e3e4a8 a13f7794df46b 7e4fdeafa61f2 d08a745729646 Author: Rafael J. Wysocki Date: Mon Apr 26 17:03:46 2021 +0200 Merge branches 'acpi-scan', 'acpi-drivers', 'acpi-pm' and 'acpi-resources' * acpi-scan: ACPI: bus: Introduce acpi_dev_get() and reuse it in ACPI code ACPI: scan: Utilize match_string() API ACPI: scan: Call acpi_get_object_info() from acpi_set_pnp_ids() ACPI: scan: Drop sta argument from acpi_init_device_object() ACPI: scan: Drop sta argument from acpi_add_single_object() ACPI: scan: Rearrange checks in acpi_bus_check_add() ACPI: scan: Fold acpi_bus_type_and_status() into its caller * acpi-drivers: ACPI: HED: Drop unused ACPI_MODULE_NAME() definition * acpi-pm: ACPI: power: Turn off unused power resources unconditionally ACPI: scan: Turn off unused power resources during initialization * acpi-resources: resource: Prevent irqresource_disabled() from erasing flags commit ab497507c0e4df6282b9212c40cbc7acd5c55cdd Merge: 25d9576326913 ebf1bef3612f6 Author: Rafael J. Wysocki Date: Mon Apr 26 17:03:22 2021 +0200 Merge branch 'acpi-messages' * acpi-messages: hwmon: acpi_power_meter: Get rid of ACPICA message printing IIO: acpi-als: Get rid of ACPICA message printing ACPI: utils: Introduce acpi_evaluation_failure_warn() ACPI: Drop unused ACPI_*_COMPONENT definitions and update documentation ACPI: sysfs: Get rid of ACPICA message printing commit 25d95763269135b995a10f7ff9662aae66094258 Merge: e1f9277c4a185 de972fd8c456c 1c29f6a0f0c6e Author: Rafael J. Wysocki Date: Mon Apr 26 17:03:05 2021 +0200 Merge branches 'acpi-pci' and 'acpi-processor' * acpi-pci: ACPI: PCI: Replace direct printk() invocations in pci_link.c ACPI: PCI: Drop ACPI_PCI_COMPONENT that is not used any more ACPI: PCI: Replace ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() ACPI: PCI: IRQ: Consolidate printing diagnostic messages * acpi-processor: ACPI: processor: perflib: Eliminate redundant status check ACPI: processor: Get rid of ACPICA message printing ACPI: processor: idle: Drop extra prefix from pr_notice() ACPI: processor: Remove initialization of static variable commit e1f9277c4a1851692508d4f1c89b7e2edeea5669 Merge: c3f2311e4b9e2 c3fbd67b94b04 Author: Rafael J. Wysocki Date: Mon Apr 26 17:00:42 2021 +0200 Merge branch 'acpica' * acpica: (22 commits) ACPICA: Update version to 20210331 ACPICA: IORT: Updates for revision E.b ACPICA: acpisrc: Add missing conversion for VIOT support ACPICA: iASL: Decode subtable type field for VIOT ACPICA: iASL: Add support for CEDT table ACPICA: ACPI 6.4: add support for PHAT table ACPICA: ACPI 6.4: add CSI2Bus resource template ACPICA: ACPI 6.4: PMTT: add new fields/structures ACPICA: CXL 2.0: CEDT: Add new CEDT table ACPICA: iASL: Add definitions for the VIOT table ACPICA: ACPI 6.4: add SDEV secure access components ACPICA: ACPI 6.4: Add new flags in SRAT ACPICA: ACPI 6.4: HMAT: add new fields/flags ACPICA: ACPI 6.4: NFIT: add Location Cookie field ACPICA: Tree-wide: fix various typos and spelling mistakes ACPICA: ACPI 6.4: PPTT: add new version of subtable type 1 ACPICA: ACPI 6.4: PCCT: add support for subtable type 5 ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Structure ACPICA: ACPI 6.4: add CXL ACPI device ID and _CBR object ACPICA: ACPI 6.4: add USB4 capabilities UUID ... commit 59e2c959f20f9f255a42de52cde54a2962fb726f Merge: b20f7dbdcad9b 33b688e3854d6 b7e23e54a9c7e Author: Rafael J. Wysocki Date: Mon Apr 26 17:00:14 2021 +0200 Merge branches 'pm-docs' and 'pm-tools' * pm-docs: PM: clk: remove kernel-doc warning PM: wakeup: fix kernel-doc warnings and fix typos PM: runtime: remove kernel-doc warnings * pm-tools: pm-graph: Fix typo "accesible" commit b20f7dbdcad9b83206712565f682b8a6491a60b4 Merge: 6948de3ca0d8e e9ff02264d75f Author: Rafael J. Wysocki Date: Mon Apr 26 16:59:52 2021 +0200 Merge branch 'pm-devfreq' * pm-devfreq: PM / devfreq: imx8m-ddrc: Remove unneeded of_match_ptr() PM / devfreq: imx-bus: Remove unneeded of_match_ptr() PM / devfreq: imx8m-ddrc: Remove imx8m_ddrc_get_dev_status PM / devfreq: Remove the invalid description for get_target_freq PM / devfreq: Check get_dev_status in devfreq_update_stats PM / devfreq: Fix the wrong set_freq path for userspace governor in Kconfig dt-bindings: devfreq: rk3399_dmc: Remove references of unexistant defines dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle. PM / devfreq: rk3399_dmc: Simplify with dev_err_probe() PM / devfreq: Use more accurate returned new_freq as resume_freq PM / devfreq: Unlock mutex and free devfreq struct in error path PM / devfreq: Register devfreq as a cooling device on demand commit 6948de3ca0d8e00ee695fff3816876b4b7fb8b34 Merge: bf0cc8360e6bc eed7a175089bb Author: Rafael J. Wysocki Date: Mon Apr 26 16:59:43 2021 +0200 Merge branch 'pm-opp' * pm-opp: memory: samsung: exynos5422-dmc: Convert to use resource-managed OPP API drm/panfrost: Convert to use resource-managed OPP API drm/lima: Convert to use resource-managed OPP API mmc: sdhci-msm: Convert to use resource-managed OPP API spi: spi-qcom-qspi: Convert to use resource-managed OPP API spi: spi-geni-qcom: Convert to use resource-managed OPP API serial: qcom_geni_serial: Convert to use resource-managed OPP API opp: Change return type of devm_pm_opp_attach_genpd() opp: Change return type of devm_pm_opp_register_set_opp_helper() opp: Add devres wrapper for dev_pm_opp_of_add_table opp: Add devres wrapper for dev_pm_opp_set_supported_hw opp: Add devres wrapper for dev_pm_opp_set_regulators opp: Add devres wrapper for dev_pm_opp_set_clkname commit 0301201b7181a927b59421097a01ee98683aa67c Merge: 1c98f574403db ffc9841d5200a Author: Takashi Iwai Date: Mon Apr 26 16:59:21 2021 +0200 Merge tag 'asoc-v5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v5.13 A lot of changes here for quite a quiet release in subsystem terms - there's been a lot of fixes and cleanups all over the subsystem both from generic work and from people working on specific drivers. - More cleanup and consolidation work in the core and the generic card drivers from Morimoto-san. - Lots of cppcheck fixes for Pierre-Louis Brossart. - New drivers for Freescale i.MX DMA over rpmsg, Mediatek MT6358 accessory detection, and Realtek RT1019, RT1316, RT711 and RT715. commit bf0cc8360e6bc27989cf4d29ba390a8eb250205f Merge: dd9f2ae92481e 2c412337cfe65 4514d991d9921 e48802333acec c1df456d0f06e 35eb1f5033cf3 Author: Rafael J. Wysocki Date: Mon Apr 26 16:57:17 2021 +0200 Merge branches 'pm-core', 'pm-pci', 'pm-sleep', 'pm-domains' and 'powercap' * pm-core: PM: runtime: Add documentation for pm_runtime_resume_and_get() PM: runtime: Replace inline function pm_runtime_callbacks_present() PM: core: Remove duplicate declaration from header file * pm-pci: PCI: PM: Do not read power state in pci_enable_device_flags() * pm-sleep: PM: wakeup: remove redundant assignment to variable retval PM: hibernate: x86: Use crc32 instead of md5 for hibernation e820 integrity check PM: wakeup: use dev_set_name() directly PM: sleep: fix typos in comments freezer: Remove unused inline function try_to_freeze_nowarn() * pm-domains: PM: domains: Don't runtime resume devices at genpd_prepare() * powercap: powercap: RAPL: Fix struct declaration in header file MAINTAINERS: Add DTPM subsystem maintainer powercap: Add Hygon Fam18h RAPL support commit dd9f2ae92481ef9454e3fdce9d78f790c49cfadd Merge: 71f4dd34419f4 733dda9cc8498 Author: Rafael J. Wysocki Date: Mon Apr 26 16:56:50 2021 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: (22 commits) cpufreq: Kconfig: fix documentation links cpufreq: intel_pstate: Simplify intel_pstate_update_perf_limits() cpufreq: armada-37xx: Fix module unloading cpufreq: armada-37xx: Remove cur_frequency variable cpufreq: armada-37xx: Fix determining base CPU frequency cpufreq: armada-37xx: Fix driver cleanup when registration failed clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0 clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz cpufreq: armada-37xx: Fix the AVS value for load L1 clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock cpufreq: armada-37xx: Fix setting TBG parent for load levels cpufreq: Remove unused for_each_policy macro cpufreq: dt: dev_pm_opp_of_cpumask_add_table() may return -EPROBE_DEFER cpufreq: intel_pstate: Clean up frequency computations cpufreq: cppc: simplify default delay_us setting cpufreq: Rudimentary typos fix in the file s5pv210-cpufreq.c cpufreq: CPPC: Add support for frequency invariance ia64: fix format string for ia64-acpi-cpu-freq cpufreq: schedutil: Call sugov_update_next_freq() before check to fast_switch_enabled arch_topology: Export arch_freq_scale and helpers ... commit 2335f556b3afadbee6548456f543f53ac3d1af42 Author: Sai Prakash Ranjan Date: Tue Mar 16 00:14:10 2021 +0530 dt-bindings: mailbox: qcom-ipcc: Add compatible for SC7280 Add IPCC compatible for SC7280 SoC. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stephen Boyd Acked-by: Rob Herring Signed-off-by: Jassi Brar commit 1c98f574403dbcf2eb832d5535a10d967333ef2d Author: Lv Yunlong Date: Mon Apr 26 06:11:29 2021 -0700 ALSA: emu8000: Fix a use after free in snd_emu8000_create_mixer Our code analyzer reported a uaf. In snd_emu8000_create_mixer, the callee snd_ctl_add(..,emu->controls[i]) calls snd_ctl_add_replace(.., kcontrol,..). Inside snd_ctl_add_replace(), if error happens, kcontrol will be freed by snd_ctl_free_one(kcontrol). Then emu->controls[i] points to a freed memory, and the execution comes to __error branch of snd_emu8000_create_mixer. The freed emu->controls[i] is used in snd_ctl_remove(card, emu->controls[i]). My patch set emu->controls[i] to NULL if snd_ctl_add() failed to avoid the uaf. Signed-off-by: Lv Yunlong Cc: Link: https://lore.kernel.org/r/20210426131129.4796-1-lyl2019@mail.ustc.edu.cn Signed-off-by: Takashi Iwai commit d9092b4bb2109502eb8972021a3f74febc931a63 Author: Dai Ngo Date: Thu Apr 22 03:37:49 2021 -0400 NFSv4.2: Remove ifdef CONFIG_NFSD from NFSv4.2 client SSC code. The client SSC code should not depend on any of the CONFIG_NFSD config. This patch removes all CONFIG_NFSD from NFSv4.2 client SSC code and simplifies the config of CONFIG_NFS_V4_2_SSC_HELPER, NFSD_V4_2_INTER_SSC. Signed-off-by: Dai Ngo Signed-off-by: Trond Myklebust commit 13bcf7e32a0181095cd62010579869e87aacb332 Author: Chuck Lever Date: Mon Apr 19 14:04:21 2021 -0400 xprtrdma: Move fr_mr field to struct rpcrdma_mr Clean up: The last remaining field in struct rpcrdma_frwr has been removed, so the struct can be eliminated. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit dcff9ed209aa6ad8fc575c7fccf6496fef44e869 Author: Chuck Lever Date: Mon Apr 19 14:04:15 2021 -0400 xprtrdma: Move the Work Request union to struct rpcrdma_mr Clean up. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 9a301cafc8619c7f30032d314da6e65d9d913d57 Author: Chuck Lever Date: Mon Apr 19 14:04:09 2021 -0400 xprtrdma: Move fr_linv_done field to struct rpcrdma_mr Clean up: Move more of struct rpcrdma_frwr into its parent. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit e10fa96d347488d1fd278e84f52ba7b25067cc71 Author: Chuck Lever Date: Mon Apr 19 14:04:03 2021 -0400 xprtrdma: Move cqe to struct rpcrdma_mr Clean up. - Simplify variable initialization in the completion handlers. - Move another field out of struct rpcrdma_frwr. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 0a26d10e300204f2a064e44fb181323bc6d986eb Author: Chuck Lever Date: Mon Apr 19 14:03:56 2021 -0400 xprtrdma: Move fr_cid to struct rpcrdma_mr Clean up (for several purposes): - The MR's cid is initialized sooner so that tracepoints can show something reasonable even if the MR is never posted. - The MR's res.id doesn't change so the cid won't change either. Initializing the cid once is sufficient. - struct rpcrdma_frwr is going away soon. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit e1648eb23d839bd4b9f2999296d5e81dcd93311f Author: Chuck Lever Date: Mon Apr 19 14:03:50 2021 -0400 xprtrdma: Remove the RPC/RDMA QP event handler Clean up: The handler only recorded a trace event. If indeed no action is needed by the RPC/RDMA consumer, then the event can be ignored. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 83189d15115467061295c0b75334b39fc64c6142 Author: Chuck Lever Date: Mon Apr 19 14:03:44 2021 -0400 xprtrdma: Don't display r_xprt memory addresses in tracepoints The remote peer's IP address is sufficient, and does not expose details of the kernel's memory layout. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 6b147ea7f442e1fb31dfa25e25b7a8ca3fb817f0 Author: Chuck Lever Date: Mon Apr 19 14:03:38 2021 -0400 xprtrdma: Add an rpcrdma_mr_completion_class I found it confusing that the MR_EVENT class displays the mr.id but the associated COMPLETION_EVENT class displays a cid (that happens to contain the mr.id!). To make it a little easier on humans who have to read and interpret these events, create an MR_COMPLETION class that displays the mr.id in the same way as the MR_EVENT class. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 4ddd0fc32c94fbb77a8c0728dc507b2bdcc67edc Author: Chuck Lever Date: Mon Apr 19 14:03:31 2021 -0400 xprtrdma: Add tracepoints showing FastReg WRs and remote invalidation The Send signaling logic is a little subtle, so add some observability around it. For every xprtrdma_mr_fastreg event, there should be an xprtrdma_mr_localinv or xprtrdma_mr_reminv event. When these tracepoints are enabled, we can see exactly when an MR is DMA-mapped, registered, invalidated (either locally or remotely) and then DMA-unmapped. kworker/u25:2-190 [000] 787.979512: xprtrdma_mr_map: task:351@5 mr.id=4 nents=2 5608@0x8679e0c8f6f56000:0x00000503 (TO_DEVICE) kworker/u25:2-190 [000] 787.979515: xprtrdma_chunk_read: task:351@5 pos=148 5608@0x8679e0c8f6f56000:0x00000503 (last) kworker/u25:2-190 [000] 787.979519: xprtrdma_marshal: task:351@5 xid=0x8679e0c8: hdr=52 xdr=148/5608/0 read list/inline kworker/u25:2-190 [000] 787.979525: xprtrdma_mr_fastreg: task:351@5 mr.id=4 nents=2 5608@0x8679e0c8f6f56000:0x00000503 (TO_DEVICE) kworker/u25:2-190 [000] 787.979526: xprtrdma_post_send: task:351@5 cq.id=0 cid=73 (2 SGEs) ... kworker/5:1H-219 [005] 787.980567: xprtrdma_wc_receive: cq.id=1 cid=161 status=SUCCESS (0/0x0) received=164 kworker/5:1H-219 [005] 787.980571: xprtrdma_post_recvs: peer=[192.168.100.55]:20049 r_xprt=0xffff8884974d4000: 0 new recvs, 70 active (rc 0) kworker/5:1H-219 [005] 787.980573: xprtrdma_reply: task:351@5 xid=0x8679e0c8 credits=64 kworker/5:1H-219 [005] 787.980576: xprtrdma_mr_reminv: task:351@5 mr.id=4 nents=2 5608@0x8679e0c8f6f56000:0x00000503 (TO_DEVICE) kworker/5:1H-219 [005] 787.980577: xprtrdma_mr_unmap: mr.id=4 nents=2 5608@0x8679e0c8f6f56000:0x00000503 (TO_DEVICE) Note that I've moved the xprtrdma_post_send tracepoint so that event always appears after the xprtrdma_mr_fastreg tracepoint. Otherwise the event log looks counterintuitive (FastReg is always supposed to happen before Send). Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit b3ce7a25f44f03d481d12a17768cfce18b942ec2 Author: Chuck Lever Date: Mon Apr 19 14:03:25 2021 -0400 xprtrdma: Avoid Send Queue wrapping Send WRs can be signalled or unsignalled. A signalled Send WR always has a matching Send completion, while a unsignalled Send has a completion only if the Send WR fails. xprtrdma has a Send account mechanism that is designed to reduce the number of signalled Send WRs. This in turn mitigates the interrupt rate of the underlying device. RDMA consumers can't leave all Sends unsignaled, however, because providers rely on Send completions to maintain their Send Queue head and tail pointers. xprtrdma counts the number of unsignaled Send WRs that have been posted to ensure that Sends are signalled often enough to prevent the Send Queue from wrapping. This mechanism neglected to account for FastReg WRs, which are posted on the Send Queue but never signalled. As a result, the Send Queue wrapped on occasion, resulting in duplication completions of FastReg and LocalInv WRs. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 8a053433de00380a9c5758d94c7c2ec2e25321fe Author: Chuck Lever Date: Mon Apr 19 14:03:19 2021 -0400 xprtrdma: Do not wake RPC consumer on a failed LocalInv Throw away any reply where the LocalInv flushes or could not be posted. The registered memory region is in an unknown state until the disconnect completes. rpcrdma_xprt_disconnect() will find and release the MR. No need to put it back on the MR free list in this case. The client retransmits pending RPC requests once it reestablishes a fresh connection, so a replacement reply should be forthcoming on the next connection instance. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit e4b52ca01315ad53df41877708428c1c41c1444d Author: Chuck Lever Date: Mon Apr 19 14:03:12 2021 -0400 xprtrdma: Do not recycle MR after FastReg/LocalInv flushes Better not to touch MRs involved in a flush or post error until the Send and Receive Queues are drained and the transport is fully quiescent. Simply don't insert such MRs back onto the free list. They remain on mr_all and will be released when the connection is torn down. I had thought that recycling would prevent hardware resources from being tied up for a long time. However, since v5.7, a transport disconnect destroys the QP and other hardware-owned resources. The MRs get cleaned up nicely at that point. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 44438ad9ae22277a261f9fa4fdc6387a8ff50f2e Author: Chuck Lever Date: Mon Apr 19 14:03:06 2021 -0400 xprtrdma: Clarify use of barrier in frwr_wc_localinv_done() Clean up: The comment and the placement of the memory barrier is confusing. Humans want to read the function statements from head to tail. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit f912af77e2c1ba25bd40534668b10da5b20f686a Author: Chuck Lever Date: Mon Apr 19 14:03:00 2021 -0400 xprtrdma: Rename frwr_release_mr() Clean up: To be consistent with other functions in this source file, follow the naming convention of putting the object being acted upon before the action itself. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 1363e6388c363d0433f9aa4e2f33efe047572687 Author: Chuck Lever Date: Mon Apr 19 14:02:54 2021 -0400 xprtrdma: rpcrdma_mr_pop() already does list_del_init() The rpcrdma_mr_pop() earlier in the function has already cleared out mr_list, so it must not be done again in the error path. Fixes: 847568942f93 ("xprtrdma: Remove fr_state") Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit c35ca60d490e32b7e7d21f344693ea29d4f4a9d3 Author: Chuck Lever Date: Mon Apr 19 14:02:47 2021 -0400 xprtrdma: Delete rpcrdma_recv_buffer_put() Clean up: The name recv_buffer_put() is a vestige of older code, and the function is just a wrapper for the newer rpcrdma_rep_put(). In most of the existing call sites, a pointer to the owning rpcrdma_buffer is already available. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 35d8b10a25884050bb3b0149b62c3818ec59f77c Author: Chuck Lever Date: Mon Apr 19 14:02:41 2021 -0400 xprtrdma: Fix cwnd update ordering After a reconnect, the reply handler is opening the cwnd (and thus enabling more RPC Calls to be sent) /before/ rpcrdma_post_recvs() can post enough Receive WRs to receive their replies. This causes an RNR and the new connection is lost immediately. The race is most clearly exposed when KASAN and disconnect injection are enabled. This slows down rpcrdma_rep_create() enough to allow the send side to post a bunch of RPC Calls before the Receive completion handler can invoke ib_post_recv(). Fixes: 2ae50ad68cd7 ("xprtrdma: Close window between waking RPC senders and posting Receives") Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 9e3ca33b62d4878f6ae39776abb6deebb37db597 Author: Chuck Lever Date: Mon Apr 19 14:02:35 2021 -0400 xprtrdma: Improve locking around rpcrdma_rep creation Defensive clean up: Protect the rb_all_reps list during rep creation. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 8b5292be6880025cb3789cc811d19b4b8f0bf786 Author: Chuck Lever Date: Mon Apr 19 14:02:28 2021 -0400 xprtrdma: Improve commentary around rpcrdma_reps_unmap() Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit eaf86e8cc85c4abf3e4a2a0d3f59af613d2bacab Author: Chuck Lever Date: Sat Apr 24 15:02:28 2021 -0400 xprtrdma: Improve locking around rpcrdma_rep destruction Currently rpcrdma_reps_destroy() assumes that, at transport tear-down, the content of the rb_free_reps list is the same as the content of the rb_all_reps list. Although that is usually true, using the rb_all_reps list should be more reliable because of the way it's managed. And, rpcrdma_reps_unmap() uses rb_all_reps; these two functions should both traverse the "all" list. Ensure that all rpcrdma_reps are always destroyed whether they are on the rep free list or not. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 5030c9a938f875f31932928632e1597f03e79ace Author: Chuck Lever Date: Mon Apr 19 14:02:16 2021 -0400 xprtrdma: Put flushed Receives on free list instead of destroying them Defer destruction of an rpcrdma_rep until transport tear-down to preserve the rb_all_reps list while Receives flush. Signed-off-by: Chuck Lever Reviewed-by: Tom Talpey Signed-off-by: Trond Myklebust commit 15788d1d1077ebe029c48842c738876516d85076 Author: Chuck Lever Date: Mon Apr 19 14:02:09 2021 -0400 xprtrdma: Do not refresh Receive Queue while it is draining Currently the Receive completion handler refreshes the Receive Queue whenever a successful Receive completion occurs. On disconnect, xprtrdma drains the Receive Queue. The first few Receive completions after a disconnect are typically successful, until the first flushed Receive. This means the Receive completion handler continues to post more Receive WRs after the drain sentinel has been posted. The late- posted Receives flush after the drain sentinel has completed, leading to a crash later in rpcrdma_xprt_disconnect(). To prevent this crash, xprtrdma has to ensure that the Receive handler stops posting Receives before ib_drain_rq() posts its drain sentinel. Suggested-by: Tom Talpey Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 32e6b68167f1d446111c973d57e6f52aee11897a Author: Chuck Lever Date: Mon Apr 19 14:02:03 2021 -0400 xprtrdma: Avoid Receive Queue wrapping Commit e340c2d6ef2a ("xprtrdma: Reduce the doorbell rate (Receive)") increased the number of Receive WRs that are posted by the client, but did not increase the size of the Receive Queue allocated during transport set-up. This is usually not an issue because RPCRDMA_BACKWARD_WRS is defined as (32) when SUNRPC_BACKCHANNEL is defined. In cases where it isn't, there is a real risk of Receive Queue wrapping. Fixes: e340c2d6ef2a ("xprtrdma: Reduce the doorbell rate (Receive)") Signed-off-by: Chuck Lever Reviewed-by: Tom Talpey Signed-off-by: Trond Myklebust commit 9f59a9d88d3bb2708d08e0e1d03899c469c27190 Author: Pavel Begunkov Date: Sun Apr 25 23:34:46 2021 +0100 io_uring: simplify SQPOLL cancellations All sqpoll rings (even sharing sqpoll task) are currently dead bound to the task that created them, iow when owner task dies it kills all its SQPOLL rings and their inflight requests via task_work infra. It's neither the nicist way nor the most convenient as adds extra locking/waiting and dependencies. Leave it alone and rely on SIGKILL being delivered on its thread group exit, so there are only two cases left: 1) thread group is dying, so sqpoll task gets a signal and exit itself cancelling all requests. 2) an sqpoll ring is dying. Because refs_kill() is called the sqpoll not going to submit any new request, and that's what we need. And io_ring_exit_work() will do all the cancellation itself before actually killing ctx, so sqpoll doesn't need to worry about it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3cd7f166b9c326a2c932b70e71a655b03257b366.1619389911.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 28090c133869b461c5366195a856d73469ab87d9 Author: Pavel Begunkov Date: Sun Apr 25 23:34:45 2021 +0100 io_uring: fix work_exit sqpoll cancellations After closing an SQPOLL ring, io_ring_exit_work() kicks in and starts doing cancellations via io_uring_try_cancel_requests(). It will go through io_uring_try_cancel_iowq(), which uses ctx->tctx_list, but as SQPOLL task don't have a ctx note, its io-wq won't be reachable and so is left not cancelled. It will eventually cancelled when one of the tasks dies, but if a thread group survives for long and changes rings, it will spawn lots of unreclaimed resources and live locked works. Cancel SQPOLL task's io-wq separately in io_ring_exit_work(). Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a71a7fe345135d684025bb529d5cb1d8d6b46e10.1619389911.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 615cee49b3ca55f54d527f7a6a7d0fd4fd6fef6b Author: Colin Ian King Date: Mon Apr 26 10:47:35 2021 +0100 io_uring: Fix uninitialized variable up.resv The variable up.resv is not initialized and is being checking for a non-zero value in the call to _io_register_rsrc_update. Fix this by explicitly setting the variable to 0. Addresses-Coverity: ("Uninitialized scalar variable)" Fixes: c3bdad027183 ("io_uring: add generic rsrc update with tags") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210426094735.8320-1-colin.king@canonical.com Signed-off-by: Jens Axboe commit a2b4198cab7e3edcb78fce77e0e8aca130435403 Author: Pavel Begunkov Date: Mon Apr 26 00:16:31 2021 +0100 io_uring: fix invalid error check after malloc Now we allocate io_mapped_ubuf instead of bvec, so we clearly have to check its address after allocation. Fixes: 41edf1a5ec967 ("io_uring: keep table of pointers to ubufs") Reported-by: kernel test robot Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d28eb1bc4384284f69dbce35b9f70c115ff6176f.1619392565.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 6c9762a78c325107dc37d20ee21002b841679209 Author: Marco Felsch Date: Fri Apr 23 15:54:02 2021 +0200 ASoC: max98088: fix ni clock divider calculation The ni1/ni2 ratio formula [1] uses the pclk which is the prescaled mclk. The max98088 datasheet [2] has no such formula but table-12 equals so we can assume that it is the same for both devices. While on it make use of DIV_ROUND_CLOSEST_ULL(). [1] https://datasheets.maximintegrated.com/en/ds/MAX98089.pdf; page 86 [2] https://datasheets.maximintegrated.com/en/ds/MAX98088.pdf; page 82 Signed-off-by: Marco Felsch Link: https://lore.kernel.org/r/20210423135402.32105-1-m.felsch@pengutronix.de Signed-off-by: Mark Brown commit f46ec84b5acbf8d7067d71a6bbdde213d4b86036 Author: Tejun Heo Date: Thu Apr 22 21:54:28 2021 -0400 blk-iocost: don't ignore vrate_min on QD contention ioc_adjust_base_vrate() ignored vrate_min when rq_wait_pct indicates that there is QD contention. The reasoning was that QD depletion always reliably indicates device saturation and thus it's safe to override user specified vrate_min. However, this sometimes leads to unnecessary throttling, especially on really fast devices, because vrate adjustments have delays and inertia. It also confuses users because the behavior violates the explicitly specified configuration. This patch drops the special case handling so that vrate_min is always applied. Signed-off-by: Tejun Heo Link: https://lore.kernel.org/r/YIIo1HuyNmhDeiNx@slm.duckdns.org Signed-off-by: Jens Axboe commit 26bda3ca19c5a775e4a8c2d4136d83a1327e4a66 Merge: 464c62f6f6e1c 9f4ad9e425a1d Author: Arnaldo Carvalho de Melo Date: Mon Apr 26 09:35:41 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo commit 9bbb94e57df135ef61bef075d9c99b8d9e89e246 Author: Sami Loone Date: Sun Apr 25 22:37:12 2021 +0200 ALSA: hda/realtek: fix static noise on ALC285 Lenovo laptops Remove a duplicate vendor+subvendor pin fixup entry as one is masking the other and making it unreachable. Consider the more specific newcomer as a second chance instead. The generic entry is made less strict to also match for laptops with slightly different 0x12 pin configuration. Tested on Lenovo Yoga 6 (AMD) where 0x12 is 0x40000000. Fixes: 607184cb1635 ("ALSA: hda/realtek - Add supported for more Lenovo ALC285 Headset Button") Signed-off-by: Sami Loone Cc: Link: https://lore.kernel.org/r/YIXS+GT/dGI/LtK6@yoga Signed-off-by: Takashi Iwai commit 97fce126e279690105ee15be652b465fd96f9997 Author: Avri Altman Date: Sun Apr 25 09:02:06 2021 +0300 mmc: block: Issue a cache flush only when it's enabled In command queueing mode, the cache isn't flushed via the mmc_flush_cache() function, but instead by issuing a CMDQ_TASK_MGMT (CMD48) with a FLUSH_CACHE opcode. In this path, we need to check if cache has been enabled, before deciding to flush the cache, along the lines of what's being done in mmc_flush_cache(). To fix this problem, let's add a new bus ops callback ->cache_enabled() and implement it for the mmc bus type. In this way, the mmc block device driver can call it to know whether cache flushing should be done. Fixes: 1e8e55b67030 (mmc: block: Add CQE support) Cc: stable@vger.kernel.org Reported-by: Brendan Peter Signed-off-by: Avri Altman Tested-by: Brendan Peter Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20210425060207.2591-2-avri.altman@wdc.com Link: https://lore.kernel.org/r/20210425060207.2591-3-avri.altman@wdc.com [Ulf: Squashed the two patches and made some minor updates] Signed-off-by: Ulf Hansson commit d4787579d2133370ab47963c6527e79731df5b2a Author: Zhenzhong Duan Date: Tue Apr 27 03:31:38 2021 +0800 selftests: kvm: Fix the check of return value In vm_vcpu_rm() and kvm_vm_release(), a stale return value is checked in TEST_ASSERT macro. Fix it by assigning variable ret with correct return value. Signed-off-by: Zhenzhong Duan Message-Id: <20210426193138.118276-1-zhenzhong.duan@intel.com> Signed-off-by: Paolo Bonzini commit 10dbdf98acd620f376313b85b587c9b9563fc170 Author: Haiwei Li Date: Wed Apr 21 11:25:13 2021 +0800 KVM: x86: Take advantage of kvm_arch_dy_has_pending_interrupt() `kvm_arch_dy_runnable` checks the pending_interrupt as the code in `kvm_arch_dy_has_pending_interrupt`. So take advantage of it. Signed-off-by: Haiwei Li Message-Id: <20210421032513.1921-1-lihaiwei.kernel@gmail.com> Signed-off-by: Paolo Bonzini commit 469bb32b68d5a414fea293c17b532329c6dc9612 Author: Sean Christopherson Date: Wed Apr 21 19:11:25 2021 -0700 KVM: SVM: Skip SEV cache flush if no ASIDs have been used Skip SEV's expensive WBINVD and DF_FLUSH if there are no SEV ASIDs waiting to be reclaimed, e.g. if SEV was never used. This "fixes" an issue where the DF_FLUSH fails during hardware teardown if the original SEV_INIT failed. Ideally, SEV wouldn't be marked as enabled in KVM if SEV_INIT fails, but that's a problem for another day. Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 82b7ae0481aeed393094e4f73bf4566a504b86bc Author: Sean Christopherson Date: Wed Apr 21 19:11:24 2021 -0700 KVM: SVM: Remove an unnecessary prototype declaration of sev_flush_asids() Remove the forward declaration of sev_flush_asids(), which is only a few lines above the function itself. No functional change intended. Reviewed by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a5c1c5aad6cff0c64cc7911ad8b14cb59109c865 Author: Sean Christopherson Date: Wed Apr 21 19:11:23 2021 -0700 KVM: SVM: Drop redundant svm_sev_enabled() helper Replace calls to svm_sev_enabled() with direct checks on sev_enabled, or in the case of svm_mem_enc_op, simply drop the call to svm_sev_enabled(). This effectively replaces checks against a valid max_sev_asid with checks against sev_enabled. sev_enabled is forced off by sev_hardware_setup() if max_sev_asid is invalid, all call sites are guaranteed to run after sev_hardware_setup(), and all of the checks care about SEV being fully enabled (as opposed to intentionally handling the scenario where max_sev_asid is valid but SEV enabling fails due to OOM). Reviewed by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b95c221cac167540aa347b5326cca8eb73f08af3 Author: Sean Christopherson Date: Wed Apr 21 19:11:22 2021 -0700 KVM: SVM: Move SEV VMCB tracking allocation to sev.c Move the allocation of the SEV VMCB array to sev.c to help pave the way toward encapsulating SEV enabling wholly within sev.c. No functional change intended. Reviewed by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8cb756b7bdcc6e663a74dd0ca69ea143ff684494 Author: Sean Christopherson Date: Wed Apr 21 19:11:21 2021 -0700 KVM: SVM: Explicitly check max SEV ASID during sev_hardware_setup() Query max_sev_asid directly after setting it instead of bouncing through its wrapper, svm_sev_enabled(). Using the wrapper is unnecessary obfuscation. No functional change intended. Reviewed by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4cafd0c572a22a568904364071910d238426c50d Author: Sean Christopherson Date: Wed Apr 21 19:11:20 2021 -0700 KVM: SVM: Unconditionally invoke sev_hardware_teardown() Remove the redundant svm_sev_enabled() check when calling sev_hardware_teardown(), the teardown helper itself does the check. Removing the check from svm.c will eventually allow dropping svm_sev_enabled() entirely. No functional change intended. Reviewed by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6c2c7bf5803c150d0f86ddde3590a15e26614921 Author: Sean Christopherson Date: Wed Apr 21 19:11:19 2021 -0700 KVM: SVM: Enable SEV/SEV-ES functionality by default (when supported) Enable the 'sev' and 'sev_es' module params by default instead of having them conditioned on CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT. The extra Kconfig is pointless as KVM SEV/SEV-ES support is already controlled via CONFIG_KVM_AMD_SEV, and CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT has the unfortunate side effect of enabling all the SEV-ES _guest_ code due to it being dependent on CONFIG_AMD_MEM_ENCRYPT=y. Cc: Borislav Petkov Cc: Tom Lendacky Cc: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a479c334842279cc099c1f73b6bc04b1528c79b4 Author: Sean Christopherson Date: Wed Apr 21 19:11:18 2021 -0700 KVM: SVM: Condition sev_enabled and sev_es_enabled on CONFIG_KVM_AMD_SEV=y Define sev_enabled and sev_es_enabled as 'false' and explicitly #ifdef out all of sev_hardware_setup() if CONFIG_KVM_AMD_SEV=n. This kills three birds at once: - Makes sev_enabled and sev_es_enabled off by default if CONFIG_KVM_AMD_SEV=n. Previously, they could be on by default if CONFIG_AMD_MEM_ENCRYPT_ACTIVE_BY_DEFAULT=y, regardless of KVM SEV support. - Hides the sev and sev_es modules params when CONFIG_KVM_AMD_SEV=n. - Resolves a false positive -Wnonnull in __sev_recycle_asids() that is currently masked by the equivalent IS_ENABLED(CONFIG_KVM_AMD_SEV) check in svm_sev_enabled(), which will be dropped in a future patch. Reviewed by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8d364a0792dd95d10183f25d277f4a7dec159dad Author: Sean Christopherson Date: Wed Apr 21 19:11:17 2021 -0700 KVM: SVM: Append "_enabled" to module-scoped SEV/SEV-ES control variables Rename sev and sev_es to sev_enabled and sev_es_enabled respectively to better align with other KVM terminology, and to avoid pseudo-shadowing when the variables are moved to sev.c in a future patch ('sev' is often used for local struct kvm_sev_info pointers. No functional change intended. Acked-by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d9db0fd6c5c9fa7c9a462a2c54d5e91455a74fca Author: Paolo Bonzini Date: Wed Apr 21 19:11:15 2021 -0700 KVM: SEV: Mask CPUID[0x8000001F].eax according to supported features Add a reverse-CPUID entry for the memory encryption word, 0x8000001F.EAX, and use it to override the supported CPUID flags reported to userspace. Masking the reported CPUID flags avoids over-reporting KVM support, e.g. without the mask a SEV-SNP capable CPU may incorrectly advertise SNP support to userspace. Clear SEV/SEV-ES if their corresponding module parameters are disabled, and clear the memory encryption leaf completely if SEV is not fully supported in KVM. Advertise SME_COHERENT in addition to SEV and SEV-ES, as the guest can use SME_COHERENT to avoid CLFLUSH operations. Explicitly omit SME and VM_PAGE_FLUSH from the reporting. These features are used by KVM, but are not exposed to the guest, e.g. guest access to related MSRs will fault. Cc: Tom Lendacky Cc: Brijesh Singh Signed-off-by: Paolo Bonzini Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e8126bdaf19400050a57a2c1662a22786b9426f1 Author: Sean Christopherson Date: Wed Apr 21 19:11:14 2021 -0700 KVM: SVM: Move SEV module params/variables to sev.c Unconditionally invoke sev_hardware_setup() when configuring SVM and handle clearing the module params/variable 'sev' and 'sev_es' in sev_hardware_setup(). This allows making said variables static within sev.c and reduces the odds of a collision with guest code, e.g. the guest side of things has already laid claim to 'sev_enabled'. Reviewed-by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit fa13680f5668cff05302a2f4753c49334a83a064 Author: Sean Christopherson Date: Wed Apr 21 19:11:13 2021 -0700 KVM: SVM: Disable SEV/SEV-ES if NPT is disabled Disable SEV and SEV-ES if NPT is disabled. While the APM doesn't clearly state that NPT is mandatory, it's alluded to by: The guest page tables, managed by the guest, may mark data memory pages as either private or shared, thus allowing selected pages to be shared outside the guest. And practically speaking, shadow paging can't work since KVM can't read the guest's page tables. Fixes: e9df09428996 ("KVM: SVM: Add sev module_param") Cc: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f31b88b35f90f6b7ae4abc1015494a285f459221 Author: Sean Christopherson Date: Wed Apr 21 19:11:12 2021 -0700 KVM: SVM: Free sev_asid_bitmap during init if SEV setup fails Free sev_asid_bitmap if the reclaim bitmap allocation fails, othwerise KVM will unnecessarily keep the bitmap when SEV is not fully enabled. Freeing the page is also necessary to avoid introducing a bug when a future patch eliminates svm_sev_enabled() in favor of using the global 'sev' flag directly. While sev_hardware_enabled() checks max_sev_asid, which is true even if KVM setup fails, 'sev' will be true if and only if KVM setup fully succeeds. Fixes: 33af3a7ef9e6 ("KVM: SVM: Reduce WBINVD/DF_FLUSH invocations") Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3b1902b87bf11f1c6a84368470dc13da6f3da3bd Author: Sean Christopherson Date: Wed Apr 21 19:11:11 2021 -0700 KVM: SVM: Zero out the VMCB array used to track SEV ASID association Zero out the array of VMCB pointers so that pre_sev_run() won't see garbage when querying the array to detect when an SEV ASID is being associated with a new VMCB. In practice, reading random values is all but guaranteed to be benign as a false negative (which is extremely unlikely on its own) can only happen on CPU0 on the first VMRUN and would only cause KVM to skip the ASID flush. For anything bad to happen, a previous instance of KVM would have to exit without flushing the ASID, _and_ KVM would have to not flush the ASID at any time while building the new SEV guest. Cc: Borislav Petkov Reviewed-by: Tom Lendacky Reviewed-by: Brijesh Singh Fixes: 70cd94e60c73 ("KVM: SVM: VMRUN should use associated ASID when SEV is enabled") Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 4daf2a1c45ace29e3bacabdef0d4c7920e1f1ea4 Author: Sean Christopherson Date: Wed Apr 21 19:11:16 2021 -0700 x86/sev: Drop redundant and potentially misleading 'sev_enabled' Drop the sev_enabled flag and switch its one user over to sev_active(). sev_enabled was made redundant with the introduction of sev_status in commit b57de6cd1639 ("x86/sev-es: Add SEV-ES Feature Detection"). sev_enabled and sev_active() are guaranteed to be equivalent, as each is true iff 'sev_status & MSR_AMD64_SEV_ENABLED' is true, and are only ever written in tandem (ignoring compressed boot's version of sev_status). Removing sev_enabled avoids confusion over whether it refers to the guest or the host, and will also allow KVM to usurp "sev_enabled" for its own purposes. No functional change intended. Reviewed-by: Tom Lendacky Reviewed-by: Brijesh Singh Signed-off-by: Sean Christopherson Message-Id: <20210422021125.3417167-7-seanjc@google.com> Acked-by: Borislav Petkov Signed-off-by: Paolo Bonzini commit 013380782d4d675d4f8d9891ca7d010795152dc8 Author: Ricardo Koller Date: Wed Apr 21 17:56:22 2021 -0700 KVM: x86: Move reverse CPUID helpers to separate header file Split out the reverse CPUID machinery to a dedicated header file so that KVM selftests can reuse the reverse CPUID definitions without introducing any '#ifdef __KERNEL__' pollution. Co-developed-by: Sean Christopherson Signed-off-by: Sean Christopherson Signed-off-by: Ricardo Koller Message-Id: <20210422005626.564163-2-ricarkol@google.com> Signed-off-by: Paolo Bonzini commit 27b4a9c4549c085d355cec5dc566f7ae58639f71 Author: Sean Christopherson Date: Wed Apr 21 19:21:28 2021 -0700 KVM: x86: Rename GPR accessors to make mode-aware variants the defaults Append raw to the direct variants of kvm_register_read/write(), and drop the "l" from the mode-aware variants. I.e. make the mode-aware variants the default, and make the direct variants scary sounding so as to discourage use. Accessing the full 64-bit values irrespective of mode is rarely the desired behavior. Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit bc9eff67fc35d733e2de0e0017dc3f5a86e8daf8 Author: Sean Christopherson Date: Wed Apr 21 19:21:27 2021 -0700 KVM: SVM: Use default rAX size for INVLPGA emulation Drop bits 63:32 of RAX when grabbing the address for INVLPGA emulation outside of 64-bit mode to make KVM's emulation slightly less wrong. The address for INVLPGA is determined by the effective address size, i.e. it's not hardcoded to 64/32 bits for a given mode. Add a FIXME to call out that the emulation is wrong. Opportunistically tweak the ASID handling to make it clear that it's defined by ECX, not rCX. Per the APM: The portion of rAX used to form the address is determined by the effective address size (current execution mode and optional address size prefix). The ASID is taken from ECX. Fixes: ff092385e828 ("KVM: SVM: Implement INVLPGA") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6b48fd4cb206485c357420d91ea766ef81b20dc3 Author: Sean Christopherson Date: Wed Apr 21 19:21:26 2021 -0700 KVM: x86/xen: Drop RAX[63:32] when processing hypercall Truncate RAX to 32 bits, i.e. consume EAX, when retrieving the hypecall index for a Xen hypercall. Per Xen documentation[*], the index is EAX when the vCPU is not in 64-bit mode. [*] http://xenbits.xenproject.org/docs/sphinx-unstable/guest-guide/x86/hypercall-abi.html Fixes: 23200b7a30de ("KVM: x86/xen: intercept xen hypercalls if enabled") Cc: Joao Martins Cc: David Woodhouse Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 82277eeed65eed6c6ee5b8f97bd978763eab148f Author: Sean Christopherson Date: Wed Apr 21 19:21:25 2021 -0700 KVM: nVMX: Truncate base/index GPR value on address calc in !64-bit Drop bits 63:32 of the base and/or index GPRs when calculating the effective address of a VMX instruction memory operand. Outside of 64-bit mode, memory encodings are strictly limited to E*X and below. Fixes: 064aea774768 ("KVM: nVMX: Decoding memory operands of VMX instructions") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ee050a577523dfd5fac95e6cc182ebe0293ead59 Author: Sean Christopherson Date: Wed Apr 21 19:21:24 2021 -0700 KVM: nVMX: Truncate bits 63:32 of VMCS field on nested check in !64-bit Drop bits 63:32 of the VMCS field encoding when checking for a nested VM-Exit on VMREAD/VMWRITE in !64-bit mode. VMREAD and VMWRITE always use 32-bit operands outside of 64-bit mode. The actual emulation of VMREAD/VMWRITE does the right thing, this bug is purely limited to incorrectly causing a nested VM-Exit if a GPR happens to have bits 63:32 set outside of 64-bit mode. Fixes: a7cde481b6e8 ("KVM: nVMX: Do not forward VMREAD/VMWRITE VMExits to L1 if required so by vmcs12 vmread/vmwrite bitmaps") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d8971344f5739a9cc53f91f1f593ddd82265b93b Author: Sean Christopherson Date: Wed Apr 21 19:21:23 2021 -0700 KVM: VMX: Truncate GPR value for DR and CR reads in !64-bit mode Drop bits 63:32 when storing a DR/CR to a GPR when the vCPU is not in 64-bit mode. Per the SDM: The operand size for these instructions is always 32 bits in non-64-bit modes, regardless of the operand-size attribute. CR8 technically isn't affected as CR8 isn't accessible outside of 64-bit mode, but fix it up for consistency and to allow for future cleanup. Fixes: 6aa8b732ca01 ("[PATCH] kvm: userspace interface") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 0884335a2e653b8a045083aa1d57ce74269ac81d Author: Sean Christopherson Date: Wed Apr 21 19:21:22 2021 -0700 KVM: SVM: Truncate GPR value for DR and CR accesses in !64-bit mode Drop bits 63:32 on loads/stores to/from DRs and CRs when the vCPU is not in 64-bit mode. The APM states bits 63:32 are dropped for both DRs and CRs: In 64-bit mode, the operand size is fixed at 64 bits without the need for a REX prefix. In non-64-bit mode, the operand size is fixed at 32 bits and the upper 32 bits of the destination are forced to 0. Fixes: 7ff76d58a9dc ("KVM: SVM: enhance MOV CR intercept handler") Fixes: cae3797a4639 ("KVM: SVM: enhance mov DR intercept handler") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 886bbcc7a523b8d4fac60f1015d2e0fcad50db82 Author: Sean Christopherson Date: Wed Apr 21 19:21:21 2021 -0700 KVM: x86: Check CR3 GPA for validity regardless of vCPU mode Check CR3 for an invalid GPA even if the vCPU isn't in long mode. For bigger emulation flows, notably RSM, the vCPU mode may not be accurate if CR0/CR4 are loaded after CR3. For MOV CR3 and similar flows, the caller is responsible for truncating the value. Fixes: 660a5d517aaa ("KVM: x86: save/load state on SMM switch") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d0fe7b6404408835ed60232cb3bf28324b2f95db Author: Sean Christopherson Date: Wed Apr 21 19:21:20 2021 -0700 KVM: x86: Remove emulator's broken checks on CR0/CR3/CR4 loads Remove the emulator's checks for illegal CR0, CR3, and CR4 values, as the checks are redundant, outdated, and in the case of SEV's C-bit, broken. The emulator manually calculates MAXPHYADDR from CPUID and neglects to mask off the C-bit. For all other checks, kvm_set_cr*() are a superset of the emulator checks, e.g. see CR4.LA57. Fixes: a780a3ea6282 ("KVM: X86: Fix reserved bits check for MOV to CR3") Cc: Babu Moger Signed-off-by: Sean Christopherson Message-Id: <20210422022128.3464144-2-seanjc@google.com> Cc: stable@vger.kernel.org [Unify check_cr_read and check_cr_write. - Paolo] Signed-off-by: Paolo Bonzini commit dbdd096a5a74b94f6b786a47baef2085859b0dce Author: Sean Christopherson Date: Wed Apr 21 19:38:31 2021 -0700 KVM: VMX: Intercept FS/GS_BASE MSR accesses for 32-bit KVM Disable pass-through of the FS and GS base MSRs for 32-bit KVM. Intel's SDM unequivocally states that the MSRs exist if and only if the CPU supports x86-64. FS_BASE and GS_BASE are mostly a non-issue; a clever guest could opportunistically use the MSRs without issue. KERNEL_GS_BASE is a bigger problem, as a clever guest would subtly be broken if it were migrated, as KVM disallows software access to the MSRs, and unlike the direct variants, KERNEL_GS_BASE needs to be explicitly migrated as it's not captured in the VMCS. Fixes: 25c5f225beda ("KVM: VMX: Enable MSR Bitmap feature") Signed-off-by: Sean Christopherson Message-Id: <20210422023831.3473491-1-seanjc@google.com> [*NOT* for stable kernels. - Paolo] Signed-off-by: Paolo Bonzini commit 844d69c26d836fde97bf6f38a0a69da9fa42e985 Author: Sean Christopherson Date: Fri Apr 23 15:34:04 2021 -0700 KVM: SVM: Delay restoration of host MSR_TSC_AUX until return to userspace Use KVM's "user return MSRs" framework to defer restoring the host's MSR_TSC_AUX until the CPU returns to userspace. Add/improve comments to clarify why MSR_TSC_AUX is intercepted on both RDMSR and WRMSR, and why it's safe for KVM to keep the guest's value loaded even if KVM is scheduled out. Cc: Reiji Watanabe Signed-off-by: Sean Christopherson Message-Id: <20210423223404.3860547-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit dbd6127375aacaa1e034e77537aa7373223e276c Author: Sean Christopherson Date: Fri Apr 23 15:34:02 2021 -0700 KVM: SVM: Clear MSR_TSC_AUX[63:32] on write Force clear bits 63:32 of MSR_TSC_AUX on write to emulate current AMD CPUs, which completely ignore the upper 32 bits, including dropping them on write. Emulating AMD hardware will also allow migrating a vCPU from AMD hardware to Intel hardware without requiring userspace to manually clear the upper bits, which are reserved on Intel hardware. Presumably, MSR_TSC_AUX[63:32] are intended to be reserved on AMD, but sadly the APM doesn't say _anything_ about those bits in the context of MSR access. The RDTSCP entry simply states that RCX contains bits 31:0 of the MSR, zero extended. And even worse is that the RDPID description implies that it can consume all 64 bits of the MSR: RDPID reads the value of TSC_AUX MSR used by the RDTSCP instruction into the specified destination register. Normal operand size prefixes do not apply and the update is either 32 bit or 64 bit based on the current mode. Emulate current hardware behavior to give KVM the best odds of playing nice with whatever the behavior of future AMD CPUs happens to be. Signed-off-by: Sean Christopherson Message-Id: <20210423223404.3860547-3-seanjc@google.com> [Fix broken patch. - Paolo] Signed-off-by: Paolo Bonzini commit 6f2b296aa6432d8274e258cc3220047ca04f5de0 Author: Sean Christopherson Date: Fri Apr 23 15:34:01 2021 -0700 KVM: SVM: Inject #GP on guest MSR_TSC_AUX accesses if RDTSCP unsupported Inject #GP on guest accesses to MSR_TSC_AUX if RDTSCP is unsupported in the guest's CPUID model. Fixes: 46896c73c1a4 ("KVM: svm: add support for RDTSCP") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210423223404.3860547-2-seanjc@google.com> Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit e23f6d490eb0dc85617bc193c0bfce24abb5ba15 Author: Sean Christopherson Date: Fri Apr 23 15:19:12 2021 -0700 KVM: VMX: Invert the inlining of MSR interception helpers Invert the inline declarations of the MSR interception helpers between the wrapper, vmx_set_intercept_for_msr(), and the core implementations, vmx_{dis,en}able_intercept_for_msr(). Letting the compiler _not_ inline the implementation reduces KVM's code footprint by ~3k bytes. Back when the helpers were added in commit 904e14fb7cb9 ("KVM: VMX: make MSR bitmaps per-VCPU"), both the wrapper and the implementations were __always_inline because the end code distilled down to a few conditionals and a bit operation. Today, the implementations involve a variety of checks and bit ops in order to support userspace MSR filtering. Furthermore, the vast majority of calls to manipulate MSR interception are not performance sensitive, e.g. vCPU creation and x2APIC toggling. On the other hand, the one path that is performance sensitive, dynamic LBR passthrough, uses the wrappers, i.e. is largely untouched by inverting the inlining. In short, forcing the low level MSR interception code to be inlined no longer makes sense. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210423221912.3857243-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f82762fb6193513a852483cc6787ddc2d701d09c Author: Paolo Bonzini Date: Thu Apr 22 09:49:46 2021 -0400 KVM: documentation: fix sphinx warnings Signed-off-by: Paolo Bonzini commit b86bb11e3a79ac0db9a6786b1fe80f74321cb076 Author: Wanpeng Li Date: Thu Apr 22 16:34:19 2021 +0800 KVM: X86: Fix failure to boost kernel lock holder candidate in SEV-ES guests Commit f1c6366e3043 ("KVM: SVM: Add required changes to support intercepts under SEV-ES") prevents hypervisor accesses guest register state when the guest is running under SEV-ES. The initial value of vcpu->arch.guest_state_protected is false, it will not be updated in preemption notifiers after this commit which means that the kernel spinlock lock holder will always be skipped to boost. Let's fix it by always treating preempted is in the guest kernel mode, false positive is better than skip completely. Fixes: f1c6366e3043 (KVM: SVM: Add required changes to support intercepts under SEV-ES) Signed-off-by: Wanpeng Li Message-Id: <1619080459-30032-1-git-send-email-wanpengli@tencent.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 2f15d027c05fac406decdb5eceb9ec0902b68f53 Author: Vitaly Kuznetsov Date: Thu Apr 22 11:29:48 2021 +0200 KVM: x86: Properly handle APF vs disabled LAPIC situation Async PF 'page ready' event may happen when LAPIC is (temporary) disabled. In particular, Sebastien reports that when Linux kernel is directly booted by Cloud Hypervisor, LAPIC is 'software disabled' when APF mechanism is initialized. On initialization KVM tries to inject 'wakeup all' event and puts the corresponding token to the slot. It is, however, failing to inject an interrupt (kvm_apic_set_irq() -> __apic_accept_irq() -> !apic_enabled()) so the guest never gets notified and the whole APF mechanism gets stuck. The same issue is likely to happen if the guest temporary disables LAPIC and a previously unavailable page becomes available. Do two things to resolve the issue: - Avoid dequeuing 'page ready' events from APF queue when LAPIC is disabled. - Trigger an attempt to deliver pending 'page ready' events when LAPIC becomes enabled (SPIV or MSR_IA32_APICBASE). Reported-by: Sebastien Boeuf Signed-off-by: Vitaly Kuznetsov Message-Id: <20210422092948.568327-1-vkuznets@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 2f156712be4ab4c2707e096d619dc8bfbd01d388 Author: Arnd Bergmann Date: Wed Apr 21 15:51:58 2021 +0200 memstick: r592: ignore kfifo_out() return code again A minor cleanup to address a clang warning removed an assigned but unused local variable, but this now caused a gcc warning as kfifo_out() is annotated to require checking its return code: In file included from drivers/memstick/host/r592.h:13, from drivers/memstick/host/r592.c:21: drivers/memstick/host/r592.c: In function 'r592_flush_fifo_write': include/linux/kfifo.h:588:1: error: ignoring return value of '__kfifo_uint_must_check_helper' declared with attribute 'warn_unused_result' [-Werror=unused-result] 588 | __kfifo_uint_must_check_helper( \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 589 | ({ \ | ~~~~ 590 | typeof((fifo) + 1) __tmp = (fifo); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 591 | typeof(__tmp->ptr) __buf = (buf); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 592 | unsigned long __n = (n); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~ 593 | const size_t __recsize = sizeof(*__tmp->rectype); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 594 | struct __kfifo *__kfifo = &__tmp->kfifo; \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 595 | (__recsize) ?\ | ~~~~~~~~~~~~~~ 596 | __kfifo_out_r(__kfifo, __buf, __n, __recsize) : \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 597 | __kfifo_out(__kfifo, __buf, __n); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 598 | }) \ | ~~~~ 599 | ) | ~ drivers/memstick/host/r592.c:367:9: note: in expansion of macro 'kfifo_out' 367 | kfifo_out(&dev->pio_fifo, buffer, 4); | ^~~~~~~~~ The value was never checked here, and the purpose of the function is only to flush the contents, so restore the old behavior but add a cast to void and a comment, which hopefully warns with neither gcc nor clang now. If anyone has an idea for how to fix it without ignoring the return code, that is probably better. Fixes: 4b00ed3c5072 ("memstick: r592: remove unused variable") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210421135215.3414589-1-arnd@kernel.org Signed-off-by: Ulf Hansson commit 270e3cc5aa382f63ea20b93c3d20162a891dc638 Author: Maarten Lankhorst Date: Wed Apr 21 14:09:38 2021 +0200 drm/i915: Fix docbook descriptions for i915_gem_shrinker Fixes the following htmldocs warning: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:102: warning: Function parameter or member 'ww' not described in 'i915_gem_shrink' Fixes: cf41a8f1dc1e ("drm/i915: Finally remove obj->mm.lock.") Reported-by: Stephen Rothwell Signed-off-by: Maarten Lankhorst Link: https://patchwork.freedesktop.org/patch/msgid/20210421120938.546076-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter (cherry picked from commit 772f7bb75dffd4ec90eaf411f9e09dc2429f5c81) Signed-off-by: Jani Nikula commit 63b6c7be3e1f78a2d7e24ea3dde1333ffcc9b2a4 Author: Dan Carpenter Date: Wed Apr 14 09:02:24 2021 +0300 drm/i915: fix an error code in intel_overlay_do_put_image() This code should propagate the error from intel_overlay_pin_fb() but currently it returns success. Fixes: 1b321026e213 ("drm/i915: Pass ww ctx to intel_pin_to_display_plane") Signed-off-by: Dan Carpenter Reviewed-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/YHaFcEzcnh/hk1/Q@mwanda (cherry picked from commit 103b8cbac28ea2965f24ca52e6a92d76d3851b3c) Signed-off-by: Jani Nikula commit 3aea49fd4fbdd1d6e952cd730887dee81c8033c1 Author: José Roberto de Souza Date: Fri Apr 9 16:17:38 2021 -0700 drm/i915/display/psr: Fix cppcheck warnings Fix redundant condition, caught in cppcheck by kernel test robot. Reported-by: kernel test robot Cc: Gwan-gyeong Mun Fixes: b64d6c51380b ("drm/i915/display: Support PSR Multiple Instances") Signed-off-by: José Roberto de Souza Reviewed-by: Harish Chegondi Link: https://patchwork.freedesktop.org/patch/msgid/20210409231738.238682-1-jose.souza@intel.com (cherry picked from commit 1884b579c0cfbb52a92462184406558ac633cafb) Signed-off-by: Jani Nikula commit 36c119c10ebe911b6e2f22e2d496b25db77743f1 Author: Ville Syrjälä Date: Mon Apr 12 08:46:05 2021 +0300 drm/i915: Disable LTTPR detection on GLK once again The glk display version change is causing us to again attempt LTTPR detection on glk. We must not do tha since glk doesn't have a long enough AUX timeout. Restore the correct logic to skip the detection. Cc: Matt Roper Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests") Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412054607.18133-4-ville.syrjala@linux.intel.com (cherry picked from commit 543d592a73d3948737d0ae4880a407c6da28662f) Signed-off-by: Jani Nikula commit bc40cf6d1fd3bc91123226658d827a0816fc652c Author: Ville Syrjälä Date: Mon Apr 12 08:46:04 2021 +0300 drm/i915: Restore lost glk ccs w/a We lost a CCS related w/a on glk when the display version became 10 instead of 9. Restore the correct check. Cc: Matt Roper Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests") Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412054607.18133-3-ville.syrjala@linux.intel.com (cherry picked from commit 0fe6637d9852a33c2873e59ae7e5225f92ac4cc2) Signed-off-by: Jani Nikula commit 604b5bc804ed6a0dee4e6c199854dd1718a23d5a Author: Ville Syrjälä Date: Mon Apr 12 08:46:03 2021 +0300 drm/i915: Restore lost glk FBC 16bpp w/a We lost the FBC 16bpp 512byte stride requirement on glk when we switched from display version 9 to 10. Restore the w/a to avoid enabling FBC with a bad stride and thus display garbage. Cc: Matt Roper Fixes: 2b5a4562edd0 ("drm/i915/display: Simplify GLK display version tests") Reviewed-by: Jani Nikula Signed-off-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210412054607.18133-2-ville.syrjala@linux.intel.com (cherry picked from commit 87b8c3bc8d27270c9abd5e895ea9066e918ef89b) Signed-off-by: Jani Nikula commit eef24f11776cfb028058413062a3c0b84f1bbf11 Author: Tvrtko Ursulin Date: Fri Mar 26 10:57:59 2021 +0000 drm/i915: Take request reference before arming the watchdog timer Reference needs to be taken before arming the timer. Luckily, given the default timer period of 20s, the potential to hit the race is extremely unlikely. Signed-off-by: Tvrtko Ursulin Fixes: 9b4d0598ee94 ("drm/i915: Request watchdog infrastructure") Cc: Daniel Vetter Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20210326105759.2387104-1-tvrtko.ursulin@linux.intel.com (cherry picked from commit f7c379779161d364eb30338529490eac7dc377b7) Signed-off-by: Jani Nikula commit 7e9be673cb1b0be0f4279a960c2ecb28a147c327 Author: zhouchuangao Date: Sat Apr 24 08:59:50 2021 -0700 MIPS: BCM63XX: Use BUG_ON instead of condition followed by BUG. BUG_ON uses unlikely in if(), it can be optimized at compile time. Usually, the condition in if() is not satisfied. In my opinion, this can improve the efficiency of the multi-stage pipeline. Signed-off-by: zhouchuangao Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit a6efb35019d00f483a0e5f188747723371d659fe Author: Uwe Kleine-König Date: Fri Apr 23 18:32:26 2021 +0200 pwm: Reword docs about pwm_apply_state() The main issue is that the current documentation talks about the non-existent function pwm_get_last_applied_state. (This was right in the context of https://lore.kernel.org/linux-pwm/20210406073036.26857-1-u.kleine-koenig@pengutronix.de/ but was then missed to adapt when this patch was reduced to a documentation update.) While at is also clarify "last applied PWM state" to "PWM state that was passed to the last invocation of pwm_apply_state()" to better distinguish to the last actually implemented state and reword to drop a word repetition. Fixes: 1a7a6e8072ea ("pwm: Clarify which state pwm_get_state() returns") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 988cc17552606be67a956cf8cd6ff504cfc5d643 Author: Takashi Iwai Date: Mon Apr 26 08:33:49 2021 +0200 ALSA: usb-audio: Fix implicit sync clearance at stopping stream The recent endpoint management change for implicit feedback mode added a clearance of ep->sync_sink (formerly ep->sync_slave) pointer at snd_usb_endpoint_stop() to assure no leftover for the feedback from the already stopped capture stream. This turned out to cause a regression, however, when full-duplex streams were running and only a capture was stopped. Because of the above clearance of ep->sync_sink pointer, no more feedback is done, hence the playback will stall. This patch fixes the ep->sync_sink clearance to be done only after all endpoints are released, for addressing the regression. Reported-and-tested-by: Lucas Endres Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Cc: Link: https://lore.kernel.org/r/20210426063349.18601-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit a8a6082d4ae29d98129440c4a5de8e6ea3de0983 Author: Steve French Date: Fri Apr 9 20:32:14 2021 -0500 cifs: update internal version number To 2.32 Signed-off-by: Steve French commit b8d64f8ced62f9ace9d25c338be1043b8367dd34 Author: Steve French Date: Sat Apr 24 21:46:23 2021 -0500 smb3: add rasize mount parameter to improve readahead performance In some cases readahead of more than the read size can help (to allow parallel i/o of read ahead which can improve performance). Ceph introduced a mount parameter "rasize" to allow controlling this. Add mount parameter "rasize" to allow control of amount of readahead requested of the server. If rasize not set, rasize defaults to negotiated rsize as before. Reviewed-by: Shyam Prasad N Signed-off-by: Steve French commit 87bd9e602e39585c5280556a2b6a6363bb334257 Merge: 0ea1041bfa3aa 7bb2cc19aee8f Author: Alexei Starovoitov Date: Sun Apr 25 21:09:03 2021 -0700 Merge branch 'bpf: Tracing and lsm programs re-attach' Jiri Olsa says: ==================== hi, while adding test for pinning the module while there's trampoline attach to it, I noticed that we don't allow link detach and following re-attach for trampolines. Adding that for tracing and lsm programs. You need to have patch [1] from bpf tree for test module attach test to pass. v5 changes: - fixed missing hlist_del_init change - fixed several ASSERT calls - added extra patch for missing ';' - added ASSERT macros to lsm test - added acks thanks, jirka [1] https://lore.kernel.org/bpf/20210326105900.151466-1-jolsa@kernel.org/ ==================== Signed-off-by: Alexei Starovoitov commit 7bb2cc19aee8f7150851bb8668c9ff655a5e7678 Author: Jiri Olsa Date: Wed Apr 14 21:51:47 2021 +0200 selftests/bpf: Use ASSERT macros in lsm test Replacing CHECK with ASSERT macros. Suggested-by: Andrii Nakryiko Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210414195147.1624932-8-jolsa@kernel.org commit a1c05c3b09e0a92b26b94650837bf06c664beb1b Author: Jiri Olsa Date: Wed Apr 14 21:51:46 2021 +0200 selftests/bpf: Test that module can't be unloaded with attached trampoline Adding test to verify that once we attach module's trampoline, the module can't be unloaded. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210414195147.1624932-7-jolsa@kernel.org commit cede72ad367a105852e814ef91717aac4383b853 Author: Jiri Olsa Date: Wed Apr 14 21:51:45 2021 +0200 selftests/bpf: Add re-attach test to lsm test Adding the test to re-attach (detach/attach again) lsm programs, plus check that already linked program can't be attached again. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210414195147.1624932-6-jolsa@kernel.org commit 8caadc43f2019caebbf314f7a6ae2faed791e783 Author: Jiri Olsa Date: Wed Apr 14 21:51:44 2021 +0200 selftests/bpf: Add re-attach test to fexit_test Adding the test to re-attach (detach/attach again) tracing fexit programs, plus check that already linked program can't be attached again. Also switching to ASSERT* macros. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210414195147.1624932-5-jolsa@kernel.org commit 56dda5a48f4f610ac9a0487c6fb64d31950e4a3e Author: Jiri Olsa Date: Wed Apr 14 21:51:43 2021 +0200 selftests/bpf: Add re-attach test to fentry_test Adding the test to re-attach (detach/attach again) tracing fentry programs, plus check that already linked program can't be attached again. Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210414195147.1624932-4-jolsa@kernel.org commit f3a95075549e0e5c36db922caf86847db7a35403 Author: Jiri Olsa Date: Wed Apr 14 21:51:41 2021 +0200 bpf: Allow trampoline re-attach for tracing and lsm programs Currently we don't allow re-attaching of trampolines. Once it's detached, it can't be re-attach even when the program is still loaded. Adding the possibility to re-attach the loaded tracing and lsm programs. Fixing missing unlock with proper cleanup goto jump reported by Julia. Reported-by: kernel test robot Reported-by: Julia Lawall Signed-off-by: Jiri Olsa Signed-off-by: Alexei Starovoitov Acked-by: Toke Høiland-Jørgensen Acked-by: Andrii Nakryiko Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20210414195147.1624932-2-jolsa@kernel.org commit a655536571747575fcaac3c93252b0032d878545 Author: Pablo Neira Ayuso Date: Fri Apr 23 00:17:09 2021 +0200 netfilter: nfnetlink: add struct nfnl_info and pass it to callbacks Add a new structure to reduce callback footprint and to facilite extensions of the nfnetlink callback interface in the future. Signed-off-by: Pablo Neira Ayuso commit d59d2f82f984df44b31c5d7837fc2f62268b7571 Author: Pablo Neira Ayuso Date: Fri Apr 23 00:17:08 2021 +0200 netfilter: nftables: add nft_pernet() helper function Consolidate call to net_generic(net, nf_tables_net_id) in this wrapper function. Signed-off-by: Pablo Neira Ayuso commit 0ea1041bfa3aa2971f858edd9e05477c2d3d54a0 Merge: 427f0c8c194b2 1698d600b3619 Author: David S. Miller Date: Sun Apr 25 18:37:39 2021 -0700 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: Updates for net-next. This series includes these main enhancements: 1. Link related changes - add NRZ/PAM4 link signal mode to the link up message if known - rely on firmware to bring down the link during ifdown 2. SRIOV related changes - allow VF promiscuous mode if the VF is trusted - allow ndo operations to configure VF when the PF is ifdown - fix the scenario of the VF taking back control of it's MAC address - add Hyper-V VF device IDs 3. Support the option to transmit without FCS/CRC. 4. Implement .ndo_features_check() to disable offload when the UDP encap. packets are not supported. v2: Patch10: Reverse the check for supported UDP ports to be more straight forward. ==================== Signed-off-by: David S. Miller commit 1698d600b361915fbe5eda63a613da55c435bd34 Author: Michael Chan Date: Sun Apr 25 13:45:27 2021 -0400 bnxt_en: Implement .ndo_features_check(). For UDP encapsultions, we only support the offloaded Vxlan port and Geneve port. All other ports included FOU and GUE are not supported so we need to turn off TSO and checksum features. v2: Reverse the check for supported UDP ports to be more straight forward. Reviewed-by: Sriharsha Basavapatna Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit dade5e15fade59a789c30bc47abfe926ddd856d6 Author: Michael Chan Date: Sun Apr 25 13:45:26 2021 -0400 bnxt_en: Support IFF_SUPP_NOFCS feature to transmit without ethernet FCS. If firmware is capable, set the IFF_SUPP_NOFCS flag to support the sockets option to transmit packets without FCS. This is mainly used for testing. Reviewed-by: Edwin Peer Signed-off-by: David S. Miller commit 7fbf359bb2c19c824cbb1954020680824f6ee5a5 Author: Michael Chan Date: Sun Apr 25 13:45:25 2021 -0400 bnxt_en: Add PCI IDs for Hyper-V VF devices. Support VF device IDs used by the Hyper-V hypervisor. Reviewed-by: Vasundhara Volam Reviewed-by: Andy Gospodarek Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 92923cc71012535cc5d760b1319675ad4c404c08 Author: Michael Chan Date: Sun Apr 25 13:45:24 2021 -0400 bnxt_en: Call bnxt_approve_mac() after the PF gives up control of the VF MAC. When the PF is no longer enforcing an assigned MAC address on a VF, the VF needs to call bnxt_approve_mac() to tell the PF what MAC address it is now using. Otherwise it gets out of sync and the PF won't know what MAC address the VF wants to use. Ultimately the VF will fail when it tries to setup the L2 MAC filter for the vnic. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 7b3c8e27d67e2b04c1ce099261469c12d09c13d4 Author: Michael Chan Date: Sun Apr 25 13:45:23 2021 -0400 bnxt_en: Move bnxt_approve_mac(). Move it before bnxt_update_vf_mac(). In the next patch, we need to call bnxt_approve_mac() from bnxt_update_mac() under some conditions. This will avoid forward declaration. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 6b7027689890c590373fc58f362fae43d0517e21 Author: Edwin Peer Date: Sun Apr 25 13:45:22 2021 -0400 bnxt_en: allow VF config ops when PF is closed It is perfectly legal for the stack to query and configure VFs via PF NDOs while the NIC is administratively down. Remove the unnecessary check for the PF to be in open state. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit dd85fc0ab5b4daa496bd3e2832b51963022182d0 Author: Edwin Peer Date: Sun Apr 25 13:45:21 2021 -0400 bnxt_en: allow promiscuous mode for trusted VFs Firmware previously only allowed promiscuous mode for VFs associated with a default VLAN. It is now possible to enable promiscuous mode for a VF having no VLAN configured provided that it is trusted. In such cases the VF will see all packets received by the PF, irrespective of destination MAC or VLAN. Note, it is necessary to query firmware at the time of bnxt_promisc_ok() instead of in bnxt_hwrm_func_qcfg() because the trusted status might be altered by the PF after the VF has been configured. This check must now also be deferred because the firmware call sleeps. Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit d5ca99054f8e25384390d41c0123d930eed510b6 Author: Michael Chan Date: Sun Apr 25 13:45:20 2021 -0400 bnxt_en: Add support for fw managed link down feature. In the current code, the driver will not shutdown the link during IFDOWN if there are still VFs sharing the port. Newer firmware will manage the link down decision when the port is shared by VFs, so we can just call firmware to shutdown the port unconditionally and let firmware make the final decision. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit b0d28207ced88b3909547d8299f679353a87fd35 Author: Michael Chan Date: Sun Apr 25 13:45:19 2021 -0400 bnxt_en: Add a new phy_flags field to the main driver structure. Copy the phy related feature flags from the firmware call HWRM_PORT_PHY_QCAPS to this new field. We can also remove the flags field in the bnxt_test_info structure. It's cleaner to have all PHY related flags in one location, directly copied from the firmware. To keep the BNXT_PHY_CFG_ABLE() macro logic the same, we need to make a slight adjustment to check that it is a PF. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 1d2deb61f095a7df231cc394c06d07a2893ac9eb Author: Edwin Peer Date: Sun Apr 25 13:45:18 2021 -0400 bnxt_en: report signal mode in link up messages Firmware reports link signalling mode for certain speeds. In these cases, print the signalling modes in kernel log link up messages. Reviewed-by: Andy Gospodarek Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 427f0c8c194b22edcafef1b0a42995ddc5c2227d Author: Jethro Beekman Date: Sun Apr 25 11:22:03 2021 +0200 macvlan: Add nodst option to macvlan type source The default behavior for source MACVLAN is to duplicate packets to appropriate type source devices, and then do the normal destination MACVLAN flow. This patch adds an option to skip destination MACVLAN processing if any matching source MACVLAN device has the option set. This allows setting up a "catch all" device for source MACVLAN: create one or more devices with type source nodst, and one device with e.g. type vepa, and incoming traffic will be received on exactly one device. v2: netdev wants non-standard line length Signed-off-by: Jethro Beekman Signed-off-by: David S. Miller commit 1e5e4acb66ed8f337e60bb1b15b46cc91361d181 Merge: 95aafe911db60 f1b9acd3a5e80 Author: David S. Miller Date: Sun Apr 25 18:31:35 2021 -0700 Merge tag 'mlx5-updates-2021-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-04-21 devlink external port attribute for SF (Sub-Function) port flavour This adds the support to instantiate Sub-Functions on external hosts E.g when Eswitch manager is enabled on the ARM SmarNic SoC CPU, users are now able to spawn new Sub-Functions on the Host server CPU. Parav Pandit Says: ================== This series introduces and uses external attribute for the SF port to indicate that a SF port belongs to an external controller. This is needed to generate unique phys_port_name when PF and SF numbers are overlapping between local and external controllers. For example two controllers 0 and 1, both of these controller have a SF. having PF number 0, SF number 77. Here, phys_port_name has duplicate entry which doesn't have controller number in it. Hence, add controller number optionally when a SF port is for an external controller. This extension is similar to existing PF and VF eswitch ports of the external controller. When a SF is for external controller an example view of external SF port and config sequence: On eswitch system: $ devlink dev eswitch set pci/0033:01:00.0 mode switchdev $ devlink port show pci/0033:01:00.0/196607: type eth netdev enP51p1s0f0np0 flavour physical port 0 splittable false pci/0033:01:00.0/131072: type eth netdev eth0 flavour pcipf controller 1 pfnum 0 external true splittable false function: hw_addr 00:00:00:00:00:00 $ devlink port add pci/0033:01:00.0 flavour pcisf pfnum 0 sfnum 77 controller 1 pci/0033:01:00.0/163840: type eth netdev eth1 flavour pcisf controller 1 pfnum 0 sfnum 77 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached phys_port_name construction: $ cat /sys/class/net/eth1/phys_port_name c1pf0sf77 Patch summary: First 3 patches prepares the eswitch to handle vports in more generic way using xarray to lookup vport from its unique vport number. Patch-1 returns maximum eswitch ports only when eswitch is enabled Patch-2 prepares eswitch to return eswitch max ports from a struct Patch-3 uses xarray for vport and representor lookup Patch-4 considers SF for an additioanl range of SF vports Patch-5 relies on SF hw table to check SF support Patch-6 extends SF devlink port attribute for external flag Patch-7 stores the per controller SF allocation attributes Patch-8 uses SF function id for filtering events Patch-9 uses helper for allocation and free Patch-10 splits hw table into per controller table and generic one Patch-11 extends sf table for additional range ================== ==================== Signed-off-by: David S. Miller commit 95aafe911db602d19b00d2a88c3d54a84119f5dc Author: Linus Walleij Date: Sun Apr 25 02:30:38 2021 +0200 net: ethernet: ixp4xx: Support device tree probing This adds device tree probing to the IXP4xx ethernet driver. Add a platform data bool to tell us whether to register an MDIO bus for the device or not, as well as the corresponding NPE. We need to drop the memory region request as part of this since the OF core will request the memory for the device. Cc: Zoltan HERPAI Cc: Raylynn Knight Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit 3e8047a98553e234a751f4f7f42d687ba98c0822 Author: Linus Walleij Date: Sun Apr 25 02:30:37 2021 +0200 net: ethernet: ixp4xx: Retire ancient phy retrieveal This driver was using a really dated way of obtaining the phy by printing a string and using it with phy_connect(). Switch to using more reasonable modern interfaces. Suggested-by: Andrew Lunn Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit 48ac0b5805dd9b10546d5a89a2702fd78a8ca69f Author: Linus Walleij Date: Sun Apr 25 02:30:36 2021 +0200 net: ethernet: ixp4xx: Add DT bindings This adds device tree bindings for the IXP4xx ethernet controller with optional MDIO bridge. Cc: Zoltan HERPAI Cc: Raylynn Knight Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9c68011bd7e477ee8d03824c8cb40eab9c64027d Author: Hayes Wang Date: Sat Apr 24 14:09:03 2021 +0800 r8152: remove some bit operations Remove DELL_TB_RX_AGG_BUG and LENOVO_MACPASSTHRU flags of rtl8152_flags. They are only set when initializing and wouldn't be change. It is enough to record them with variables. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 593268ddf3887362ba8b8998cb85433596a3e8f5 Author: Phil Sutter Date: Wed Apr 21 12:34:21 2021 +0200 netfilter: nf_log_syslog: Unset bridge logger in pernet exit Without this, a stale pointer remains in pernet loggers after module unload causing a kernel oops during dereference. Easily reproduced by: | # modprobe nf_log_syslog | # rmmod nf_log_syslog | # cat /proc/net/netfilter/nf_log Fixes: 77ccee96a6742 ("netfilter: nf_log_bridge: merge with nf_log_syslog") Signed-off-by: Phil Sutter Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f7163c4882e883fabdafb894176994fd2ade33e2 Author: Florian Westphal Date: Wed Apr 21 09:51:10 2021 +0200 netfilter: remove all xt_table anchors from struct net No longer needed, table pointer arg is now passed via netfilter core. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ee177a54413a33fe474d55fabb5f8ff390bb27d7 Author: Florian Westphal Date: Wed Apr 21 09:51:09 2021 +0200 netfilter: ip6_tables: pass table pointer via nf_hook_ops Same patch as the ip_tables one: removal of all accesses to ip6_tables xt_table pointers. After this patch the struct net xt_table anchors can be removed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f9006acc8dfe59e25aa75729728ac57a8d84fc32 Author: Florian Westphal Date: Wed Apr 21 09:51:08 2021 +0200 netfilter: arp_tables: pass table pointer via nf_hook_ops Same change as previous patch. Only difference: no need to handle NULL template_ops parameter, the only caller (arptable_filter) always passes non-NULL argument. This removes all remaining accesses to net->ipv4.arptable_filter. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ae689334225ff0e4ef112459ecd24aea932c2b00 Author: Florian Westphal Date: Wed Apr 21 09:51:07 2021 +0200 netfilter: ip_tables: pass table pointer via nf_hook_ops iptable_x modules rely on 'struct net' to contain a pointer to the table that should be evaluated. In order to remove these pointers from struct net, pass them via the 'priv' pointer in a similar fashion as nf_tables passes the rule data. To do that, duplicate the nf_hook_info array passed in from the iptable_x modules, update the ops->priv pointers of the copy to refer to the table and then change the hookfn implementations to just pass the 'priv' argument to the traverser. After this patch, the xt_table pointers can already be removed from struct net. However, changes to struct net result in re-compile of the entire network stack, so do the removal after arptables and ip6tables have been converted as well. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a4aeafa28cf706f65f763026c26d83e7e8c96592 Author: Florian Westphal Date: Wed Apr 21 09:51:06 2021 +0200 netfilter: xt_nat: pass table to hookfn This changes how ip(6)table nat passes the ruleset/table to the evaluation loop. At the moment, it will fetch the table from struct net. This change stores the table in the hook_ops 'priv' argument instead. This requires to duplicate the hook_ops for each netns, so they can store the (per-net) xt_table structure. The dupliated nat hook_ops get stored in net_generic data area. They are free'd in the namespace exit path. This is a pre-requisite to remove the xt_table/ruleset pointers from struct net. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f68772ed678376f52dbb2e20c9f982e6d8b3407b Author: Florian Westphal Date: Wed Apr 21 09:51:05 2021 +0200 netfilter: x_tables: remove paranoia tests No need for these. There is only one caller, the xtables core, when the table is registered for the first time with a particular network namespace. After ->table_init() call, the table is linked into the tables[af] list, so next call to that function will skip the ->table_init(). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4d705399191c3cfe1264588b3a4a8115e6c3b161 Author: Florian Westphal Date: Wed Apr 21 09:51:04 2021 +0200 netfilter: arptables: unregister the tables by name and again, this time for arptables. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 6c0717545f2ca61c95f5f739da845e77cc8bd498 Author: Florian Westphal Date: Wed Apr 21 09:51:03 2021 +0200 netfilter: ip6tables: unregister the tables by name Same as the previous patch, but for ip6tables. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 20a9df33594fe643f9cf46375a9243e3ab8ed3a6 Author: Florian Westphal Date: Wed Apr 21 09:51:02 2021 +0200 netfilter: iptables: unregister the tables by name xtables stores the xt_table structs in the struct net. This isn't needed anymore, the structures could be passed via the netfilter hook 'private' pointer to the hook functions, which would allow us to remove those pointers from struct net. As a first step, reduce the number of accesses to the net->ipv4.ip6table_{raw,filter,...} pointers. This allows the tables to get unregistered by name instead of having to pass the raw address. The xt_table structure cane looked up by name+address family instead. This patch is useless as-is (the backends still have the raw pointer address), but it lowers the bar to remove those. It also allows to put the 'was table registered in the first place' check into ip_tables.c rather than have it in each table sub module. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 1ef4d6d1af2d0c0c7c9b391365a3894bea291e34 Author: Florian Westphal Date: Wed Apr 21 09:51:01 2021 +0200 netfilter: x_tables: add xt_find_table This will be used to obtain the xt_table struct given address family and table name. Followup patches will reduce the number of direct accesses to the xt_table structures via net->ipv{4,6}.ip(6)table_{nat,mangle,...} pointers, then remove them. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7716bf090e97aec45e97907ec6a382e4610bdd8f Author: Florian Westphal Date: Wed Apr 21 09:51:00 2021 +0200 netfilter: x_tables: remove ipt_unregister_table Its the same function as ipt_unregister_table_exit. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 4c95e0728eee33df6b029a5fca82a67daeca201e Author: Florian Westphal Date: Wed Apr 21 09:50:59 2021 +0200 netfilter: ebtables: remove the 3 ebtables pointers from struct net ebtables stores the table internal data (what gets passed to the ebt_do_table() interpreter) in struct net. nftables keeps the internal interpreter format in pernet lists and passes it via the netfilter core infrastructure (priv pointer). Do the same for ebtables: the nf_hook_ops are duplicated via kmemdup, then the ops->priv pointer is set to the table that is being registered. After that, the netfilter core passes this table info to the hookfn. This allows to remove the pointers from struct net. Same pattern can be applied to ip/ip6/arptables. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit de8c12110a130337c8e7e7b8250de0580e644dee Author: Florian Westphal Date: Wed Apr 21 09:45:40 2021 +0200 netfilter: disable defrag once its no longer needed When I changed defrag hooks to no longer get registered by default I intentionally made it so that registration can only be un-done by unloading the nf_defrag_ipv4/6 module. In hindsight this was too conservative; there is no reason to keep defrag on while there is no feature dependency anymore. Moreover, this won't work if user isn't allowed to remove nf_defrag module. This adds the disable() functions for both ipv4 and ipv6 and calls them from conntrack, TPROXY and the xtables socket module. ipvs isn't converted here, it will behave as before this patch and will need module removal. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e0bb96db96f8ca94349344a2ea7bebc6f8cefdae Author: Pablo Neira Ayuso Date: Wed Apr 21 01:12:44 2021 +0200 netfilter: nft_socket: add support for cgroupsv2 Allow to match on the cgroupsv2 id from ancestor level. Signed-off-by: Pablo Neira Ayuso commit 885e8c68247cc2a9f1761a3d66fd274247a0faaf Author: Florian Westphal Date: Mon Apr 19 18:16:49 2021 +0200 netfilter: nat: move nf_xfrm_me_harder to where it is used remove the export and make it static. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 64ff412ad41fe3a5bf759ff4844dc1382176485c Author: Dexuan Cui Date: Fri Apr 23 18:12:35 2021 -0700 hv_netvsc: Make netvsc/VF binding check both MAC and serial number Currently the netvsc/VF binding logic only checks the PCI serial number. The Microsoft Azure Network Adapter (MANA) supports multiple net_device interfaces (each such interface is called a "vPort", and has its unique MAC address) which are backed by the same VF PCI device, so the binding logic should check both the MAC address and the PCI serial number. The change should not break any other existing VF drivers, because Hyper-V NIC SR-IOV implementation requires the netvsc network interface and the VF network interface have the same MAC address. Co-developed-by: Haiyang Zhang Signed-off-by: Haiyang Zhang Co-developed-by: Shachar Raindel Signed-off-by: Shachar Raindel Acked-by: Stephen Hemminger Signed-off-by: Dexuan Cui Signed-off-by: David S. Miller commit bbd6f0a948139970f4a615dff189d9a503681a39 Author: Michael Chan Date: Fri Apr 23 18:13:19 2021 -0400 bnxt_en: Fix RX consumer index logic in the error path. In bnxt_rx_pkt(), the RX buffers are expected to complete in order. If the RX consumer index indicates an out of order buffer completion, it means we are hitting a hardware bug and the driver will abort all remaining RX packets and reset the RX ring. The RX consumer index that we pass to bnxt_discard_rx() is not correct. We should be passing the current index (tmp_raw_cons) instead of the old index (raw_cons). This bug can cause us to be at the wrong index when trying to abort the next RX packet. It can crash like this: #0 [ffff9bbcdf5c39a8] machine_kexec at ffffffff9b05e007 #1 [ffff9bbcdf5c3a00] __crash_kexec at ffffffff9b111232 #2 [ffff9bbcdf5c3ad0] panic at ffffffff9b07d61e #3 [ffff9bbcdf5c3b50] oops_end at ffffffff9b030978 #4 [ffff9bbcdf5c3b78] no_context at ffffffff9b06aaf0 #5 [ffff9bbcdf5c3bd8] __bad_area_nosemaphore at ffffffff9b06ae2e #6 [ffff9bbcdf5c3c28] bad_area_nosemaphore at ffffffff9b06af24 #7 [ffff9bbcdf5c3c38] __do_page_fault at ffffffff9b06b67e #8 [ffff9bbcdf5c3cb0] do_page_fault at ffffffff9b06bb12 #9 [ffff9bbcdf5c3ce0] page_fault at ffffffff9bc015c5 [exception RIP: bnxt_rx_pkt+237] RIP: ffffffffc0259cdd RSP: ffff9bbcdf5c3d98 RFLAGS: 00010213 RAX: 000000005dd8097f RBX: ffff9ba4cb11b7e0 RCX: ffffa923cf6e9000 RDX: 0000000000000fff RSI: 0000000000000627 RDI: 0000000000001000 RBP: ffff9bbcdf5c3e60 R8: 0000000000420003 R9: 000000000000020d R10: ffffa923cf6ec138 R11: ffff9bbcdf5c3e83 R12: ffff9ba4d6f928c0 R13: ffff9ba4cac28080 R14: ffff9ba4cb11b7f0 R15: ffff9ba4d5a30000 ORIG_RAX: ffffffffffffffff CS: 0010 SS: 0018 Fixes: a1b0e4e684e9 ("bnxt_en: Improve RX consumer index validity check.") Reviewed-by: Pavan Chebbi Reviewed-by: Andy Gospodarek Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit bf7d20cd51d7b6aa969e263b33805af6e147a70e Author: Jiapeng Chong Date: Fri Apr 23 17:52:23 2021 +0800 ch_ktls: Remove redundant variable result Variable result is being assigned a value from a calculation however the variable is never read, so this redundant variable can be removed. Cleans up the following clang-analyzer warning: drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:1488:2: warning: Value stored to 'pos' is never read [clang-analyzer-deadcode.DeadStores]. drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:876:3: warning: Value stored to 'pos' is never read [clang-analyzer-deadcode.DeadStores]. drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c:36:3: warning: Value stored to 'start' is never read [clang-analyzer-deadcode.DeadStores]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 5f6c2f536de648ac31564d8c413337ff4f7af93a Merge: b2f0ca00e6b34 350a62ca065be Author: David S. Miller Date: Sun Apr 25 18:02:32 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-04-23 The following pull-request contains BPF updates for your *net-next* tree. We've added 69 non-merge commits during the last 22 day(s) which contain a total of 69 files changed, 3141 insertions(+), 866 deletions(-). The main changes are: 1) Add BPF static linker support for extern resolution of global, from Andrii. 2) Refine retval for bpf_get_task_stack helper, from Dave. 3) Add a bpf_snprintf helper, from Florent. 4) A bunch of miscellaneous improvements from many developers. ==================== Signed-off-by: David S. Miller commit 23a700455a1bc55f3ea20675e574181b8c129306 Author: Stefan Riedmueller Date: Wed Apr 14 13:51:24 2021 +0200 leds: pca9532: Assign gpio base dynamically When using devicetree, gpio_base holds its initial zero value which can lead to a rejection if another gpio controller already occupies this base. To prevent that collision let the gpio base be assigned dynamically. Signed-off-by: Stefan Riedmueller Signed-off-by: Pavel Machek commit 5fe09e16c689eae88a151c2f8199c73cf6f18d7d Author: Tian Tao Date: Mon Mar 22 10:37:16 2021 +0800 leds: trigger: pattern: Switch to using the new API kobj_to_dev() Switch to using the new API kobj_to_dev() to fix the below warnning: ./drivers/leds/trigger/ledtrig-pattern.c:336:60-61: WARNING opportunity for kobj_to_dev() Signed-off-by: Tian Tao Signed-off-by: Pavel Machek commit 423333bcba248c6b65e7eac1a0b8eef57c9eac72 Author: Steve French Date: Mon Apr 19 23:22:37 2021 -0500 smb3: limit noisy error For servers which don't support copy_range (SMB3 CopyChunk), the logging of: CIFS: VFS: \\server\share refcpy ioctl error -95 getting resume key can fill the client logs and make debugging real problems more difficult. Change the -EOPNOTSUPP on copy_range to a "warn once" Signed-off-by: Steve French commit 315db9a05b7a56810728589baa930864107e4634 Author: David Disseldorp Date: Fri Apr 23 00:14:03 2021 +0200 cifs: fix leak in cifs_smb3_do_mount() ctx cifs_smb3_do_mount() calls smb3_fs_context_dup() and then cifs_setup_volume_info(). The latter's subsequent smb3_parse_devname() call overwrites the cifs_sb->ctx->UNC string already dup'ed by smb3_fs_context_dup(), resulting in a leak. E.g. unreferenced object 0xffff888002980420 (size 32): comm "mount", pid 160, jiffies 4294892541 (age 30.416s) hex dump (first 32 bytes): 5c 5c 31 39 32 2e 31 36 38 2e 31 37 34 2e 31 30 \\192.168.174.10 34 5c 72 61 70 69 64 6f 2d 73 68 61 72 65 00 00 4\rapido-share.. backtrace: [<00000000069e12f6>] kstrdup+0x28/0x50 [<00000000b61f4032>] smb3_fs_context_dup+0x127/0x1d0 [cifs] [<00000000c6e3e3bf>] cifs_smb3_do_mount+0x77/0x660 [cifs] [<0000000063467a6b>] smb3_get_tree+0xdf/0x220 [cifs] [<00000000716f731e>] vfs_get_tree+0x1b/0x90 [<00000000491d3892>] path_mount+0x62a/0x910 [<0000000046b2e774>] do_mount+0x50/0x70 [<00000000ca7b64dd>] __x64_sys_mount+0x81/0xd0 [<00000000b5122496>] do_syscall_64+0x33/0x40 [<000000002dd397af>] entry_SYSCALL_64_after_hwframe+0x44/0xae This change is a bandaid until the cifs_setup_volume_info() TODO and error handling issues are resolved. Signed-off-by: David Disseldorp Acked-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) CC: # v5.11+ Signed-off-by: Steve French commit ad7567bc65afe0ef0d1b853aa4d54c44d09223dc Author: Muhammad Usama Anjum Date: Thu Apr 15 20:24:09 2021 +0500 cifs: remove unnecessary copies of tcon->crfid.fid pfid is being set to tcon->crfid.fid and they are copied in each other multiple times. Remove the memcopy between same pointers - memory locations. Addresses-Coverity: ("Overlapped copy") Fixes: 9e81e8ff74b9 ("cifs: return cached_fid from open_shroot") Signed-off-by: Muhammad Usama Anjum Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 83728cbf366e334301091d5b808add468ab46b27 Author: Paul Aurich Date: Tue Apr 13 14:25:27 2021 -0700 cifs: Return correct error code from smb2_get_enc_key Avoid a warning if the error percolates back up: [440700.376476] CIFS VFS: \\otters.example.com crypt_message: Could not get encryption key [440700.386947] ------------[ cut here ]------------ [440700.386948] err = 1 [440700.386977] WARNING: CPU: 11 PID: 2733 at /build/linux-hwe-5.4-p6lk6L/linux-hwe-5.4-5.4.0/lib/errseq.c:74 errseq_set+0x5c/0x70 ... [440700.397304] CPU: 11 PID: 2733 Comm: tar Tainted: G OE 5.4.0-70-generic #78~18.04.1-Ubuntu ... [440700.397334] Call Trace: [440700.397346] __filemap_set_wb_err+0x1a/0x70 [440700.397419] cifs_writepages+0x9c7/0xb30 [cifs] [440700.397426] do_writepages+0x4b/0xe0 [440700.397444] __filemap_fdatawrite_range+0xcb/0x100 [440700.397455] filemap_write_and_wait+0x42/0xa0 [440700.397486] cifs_setattr+0x68b/0xf30 [cifs] [440700.397493] notify_change+0x358/0x4a0 [440700.397500] utimes_common+0xe9/0x1c0 [440700.397510] do_utimes+0xc5/0x150 [440700.397520] __x64_sys_utimensat+0x88/0xd0 Fixes: 61cfac6f267d ("CIFS: Fix possible use after free in demultiplex thread") Signed-off-by: Paul Aurich CC: stable@vger.kernel.org Signed-off-by: Steve French commit a637f4ae037e1e0604ac008564934d63261a8fd1 Author: Eugene Korenevsky Date: Fri Apr 16 10:35:30 2021 +0300 cifs: fix out-of-bound memory access when calling smb3_notify() at mount point If smb3_notify() is called at mount point of CIFS, build_path_from_dentry() returns the pointer to kmalloc-ed memory with terminating zero (this is empty FileName to be passed to SMB2 CREATE request). This pointer is assigned to the `path` variable. Then `path + 1` (to skip first backslash symbol) is passed to cifs_convert_path_to_utf16(). This is incorrect for empty path and causes out-of-bound memory access. Get rid of this "increase by one". cifs_convert_path_to_utf16() already contains the check for leading backslash in the path. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212693 CC: # v5.6+ Signed-off-by: Eugene Korenevsky Signed-off-by: Steve French commit ccd48ec3d4a6cc595b2d9c5146e63b6c23546701 Author: Aurelien Aptel Date: Fri Apr 9 15:47:01 2021 +0200 smb2: fix use-after-free in smb2_ioctl_query_info() * rqst[1,2,3] is allocated in vars * each rqst->rq_iov is also allocated in vars or using pooled memory SMB2_open_free, SMB2_ioctl_free, SMB2_query_info_free are iterating on each rqst after vars has been freed (use-after-free), and they are freeing the kvec a second time (double-free). How to trigger: * compile with KASAN * mount a share $ smbinfo quota /mnt/foo Segmentation fault $ dmesg ================================================================== BUG: KASAN: use-after-free in SMB2_open_free+0x1c/0xa0 Read of size 8 at addr ffff888007b10c00 by task python3/1200 CPU: 2 PID: 1200 Comm: python3 Not tainted 5.12.0-rc6+ #107 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.14.0-0-g155821a-rebuilt.opensuse.org 04/01/2014 Call Trace: dump_stack+0x93/0xc2 print_address_description.constprop.0+0x18/0x130 ? SMB2_open_free+0x1c/0xa0 ? SMB2_open_free+0x1c/0xa0 kasan_report.cold+0x7f/0x111 ? smb2_ioctl_query_info+0x240/0x990 ? SMB2_open_free+0x1c/0xa0 SMB2_open_free+0x1c/0xa0 smb2_ioctl_query_info+0x2bf/0x990 ? smb2_query_reparse_tag+0x600/0x600 ? cifs_mapchar+0x250/0x250 ? rcu_read_lock_sched_held+0x3f/0x70 ? cifs_strndup_to_utf16+0x12c/0x1c0 ? rwlock_bug.part.0+0x60/0x60 ? rcu_read_lock_sched_held+0x3f/0x70 ? cifs_convert_path_to_utf16+0xf8/0x140 ? smb2_check_message+0x6f0/0x6f0 cifs_ioctl+0xf18/0x16b0 ? smb2_query_reparse_tag+0x600/0x600 ? cifs_readdir+0x1800/0x1800 ? selinux_bprm_creds_for_exec+0x4d0/0x4d0 ? do_user_addr_fault+0x30b/0x950 ? __x64_sys_openat+0xce/0x140 __x64_sys_ioctl+0xb9/0xf0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fdcf1f4ba87 Code: b3 66 90 48 8b 05 11 14 2c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e1 13 2c 00 f7 d8 64 89 01 48 RSP: 002b:00007ffef1ce7748 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00000000c018cf07 RCX: 00007fdcf1f4ba87 RDX: 0000564c467c5590 RSI: 00000000c018cf07 RDI: 0000000000000003 RBP: 00007ffef1ce7770 R08: 00007ffef1ce7420 R09: 00007fdcf0e0562b R10: 0000000000000100 R11: 0000000000000246 R12: 0000000000004018 R13: 0000000000000001 R14: 0000000000000003 R15: 0000564c467c5590 Allocated by task 1200: kasan_save_stack+0x1b/0x40 __kasan_kmalloc+0x7a/0x90 smb2_ioctl_query_info+0x10e/0x990 cifs_ioctl+0xf18/0x16b0 __x64_sys_ioctl+0xb9/0xf0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 1200: kasan_save_stack+0x1b/0x40 kasan_set_track+0x1c/0x30 kasan_set_free_info+0x20/0x30 __kasan_slab_free+0xe5/0x110 slab_free_freelist_hook+0x53/0x130 kfree+0xcc/0x320 smb2_ioctl_query_info+0x2ad/0x990 cifs_ioctl+0xf18/0x16b0 __x64_sys_ioctl+0xb9/0xf0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff888007b10c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 0 bytes inside of 512-byte region [ffff888007b10c00, ffff888007b10e00) The buggy address belongs to the page: page:0000000044e14b75 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b10 head:0000000044e14b75 order:2 compound_mapcount:0 compound_pincount:0 flags: 0x100000000010200(slab|head) raw: 0100000000010200 ffffea000015f500 0000000400000004 ffff888001042c80 raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888007b10b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888007b10b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888007b10c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888007b10c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888007b10d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Signed-off-by: Aurelien Aptel CC: Signed-off-by: Steve French commit 94b0595a8e018ca3cd2edc308eb3ee05c6868eef Author: Aurelien Aptel Date: Thu Mar 18 13:52:59 2021 +0100 cifs: export supported mount options via new mount_params /proc file Can aid in making mount problems easier to diagnose Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 24fedddc954ed16583f84b0e39e5a710608a316d Author: Aurelien Aptel Date: Mon Mar 1 19:34:02 2021 +0100 cifs: log mount errors using cifs_errorf() This makes the errors accessible from userspace via dmesg and the fs_context fd. Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit d9a8692277496bf7ef7cd6ae76619b58bfb36c15 Author: Aurelien Aptel Date: Mon Mar 1 19:32:09 2021 +0100 cifs: add fs_context param to parsing helpers Add fs_context param to parsing helpers to be able to log into it in next patch. Make some helper static as they are not used outside of fs_context.c Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 9d4ac8b6302c60a1949560e501fc1d0b4654b9c6 Author: Aurelien Aptel Date: Mon Mar 1 19:25:00 2021 +0100 cifs: make fs_context error logging wrapper This new helper will be used in the fs_context mount option parsing code. It log errors both in: * the fs_context log queue for userspace to read * kernel printk buffer (dmesg, old behaviour) Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 7fe6fe95b936084dce6eedcc2cccadf96eafae73 Author: Ronnie Sahlberg Date: Sat Mar 27 06:31:30 2021 +1000 cifs: add FALLOC_FL_INSERT_RANGE support Emulated via server side copy and setsize for SMB3 and later. In the future we could compound this (and/or optionally use DUPLICATE_EXTENTS if supported by the server). Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 5476b5dd82c8bb9d0dd426f96575ae656cede140 Author: Ronnie Sahlberg Date: Sat Mar 27 05:52:29 2021 +1000 cifs: add support for FALLOC_FL_COLLAPSE_RANGE Emulated for SMB3 and later via server side copy and setsize. Eventually this could be compounded. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit f6d2353a50aecd00e73fa3c7b20c50fd9af67b21 Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:35 2021 +1000 cifs: check the timestamp for the cached dirent when deciding on revalidate Improves directory metadata caching Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit ed8561fa1d12b4f880e2d8287cb69b3a0c238069 Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:34 2021 +1000 cifs: pass the dentry instead of the inode down to the revalidation check functions Needed for the final patch in the directory caching series Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit ed20f54a3c63a9f75dbd9e341d7fa8e7bf08dcd8 Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:33 2021 +1000 cifs: add a timestamp to track when the lease of the cached dir was taken and clear the timestamp when we receive a lease break. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 6ef4e9cbe15df691323af007831dab4e70faa1cf Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:32 2021 +1000 cifs: add a function to get a cached dir based on its dentry Needed for subsequent patches in the directory caching series. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 5e9c89d43fa6f5d458d4d0f9e22a67cc001c8da9 Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:31 2021 +1000 cifs: Grab a reference for the dentry of the cached directory during the lifetime of the cache We need to hold both a reference for the root/superblock as well as the directory that we are caching. We need to drop these references before we call kill_anon_sb(). At this point, the root and the cached dentries are always the same but this will change once we start caching other directories as well. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 269f67e1ffead61777b1b0cf2ea0f61d06f8c56d Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:30 2021 +1000 cifs: store a pointer to the root dentry in cifs_sb_info once we have completed mounting the share And use this to only allow to take out a shared handle once the mount has completed and the sb becomes available. This will become important in follow up patches where we will start holding a reference to the directory dentry for the shared handle during the lifetime of the handle. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 45c0f1aabea9e6acc5332b93faca9803c6e9b19a Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:29 2021 +1000 cifs: rename the *_shroot* functions to *_cached_dir* These functions will eventually be used to cache any directory, not just the root so change the names. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit e6eb19504e23607816cd4df35e2633aef2540e96 Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:28 2021 +1000 cifs: pass a path to open_shroot and check if it is the root or not Move the check for the directory path into the open_shroot() function but still fail for any non-root directories. This is preparation for later when we will start using the cache also for other directories than the root. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 4df3d976dda2466799929b021d4e233639711d41 Author: Ronnie Sahlberg Date: Tue Mar 9 09:07:27 2021 +1000 cifs: move the check for nohandlecache into open_shroot instead of doing it in the callsites for open_shroot. Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French commit 991e72eb0e99764219865b9a3a07328695148e14 Author: Al Viro Date: Fri Mar 5 21:53:48 2021 -0500 cifs: switch build_path_from_dentry() to using dentry_path_raw() The cost is that we might need to flip '/' to '\\' in more than just the prefix. Needs profiling, but I suspect that we won't get slowdown on that. Signed-off-by: Al Viro Signed-off-by: Steve French commit f6a9bc336b600e1266e6eebb0972d75d5b93aea9 Author: Al Viro Date: Fri Mar 5 17:36:04 2021 -0500 cifs: allocate buffer in the caller of build_path_from_dentry() build_path_from_dentry() open-codes dentry_path_raw(). The reason we can't use dentry_path_raw() in there (and postprocess the result as needed) is that the callers of build_path_from_dentry() expect that the object to be freed on cleanup and the string to be used are at the same address. That's painful, since the path is naturally built end-to-beginning - we start at the leaf and go through the ancestors, accumulating the pathname. Life would be easier if we left the buffer allocation to callers. It wouldn't be exact-sized buffer, but none of the callers keep the result for long - it's always freed before the caller returns. So there's no need to do exact-sized allocation; better use __getname()/__putname(), same as we do for pathname arguments of syscalls. What's more, there's no need to do allocation under spinlocks, so GFP_ATOMIC is not needed. Next patch will replace the open-coded dentry_path_raw() (in build_path_from_dentry_optional_prefix()) with calling the real thing. This patch only introduces wrappers for allocating/freeing the buffers and switches to new calling conventions: build_path_from_dentry(dentry, buf) expects buf to be address of a page-sized object or NULL, return value is a pathname built inside that buffer on success, ERR_PTR(-ENOMEM) if buf is NULL and ERR_PTR(-ENAMETOOLONG) if the pathname won't fit into page. Note that we don't need to check for failure when allocating the buffer in the caller - build_path_from_dentry() will do the right thing. Signed-off-by: Al Viro Signed-off-by: Steve French commit 8e33cf20ceb7f6d7a7e039f9f82a0cd1f3a6f964 Author: Al Viro Date: Thu Mar 18 15:47:35 2021 -0400 cifs: make build_path_from_dentry() return const char * ... and adjust the callers. Signed-off-by: Al Viro Signed-off-by: Steve French commit f6f1f1790775fbe45e14a99aab2fab3d74919450 Author: Al Viro Date: Thu Mar 18 15:44:05 2021 -0400 cifs: constify pathname arguments in a bunch of helpers Signed-off-by: Al Viro Signed-off-by: Steve French commit 558691393a439628e97a182fdba4e7f6417acb91 Author: Al Viro Date: Thu Mar 18 01:38:53 2021 -0400 cifs: constify path argument of ->make_node() Signed-off-by: Al Viro Signed-off-by: Steve French commit 9cfdb1c12bae26f8aed9df947c456e67ae03096c Author: Al Viro Date: Thu Mar 18 01:03:34 2021 -0400 cifs: constify get_normalized_path() properly As it is, it takes const char * and, in some cases, stores it in caller's variable that is plain char *. Fortunately, none of the callers actually proceeded to modify the string via now-non-const alias, but that's trouble waiting to happen. It's easy to do properly, anyway... Signed-off-by: Al Viro Signed-off-by: Steve French commit 8d7672235533dbeab4a5373b49f1b4273cdc2c6a Author: Al Viro Date: Fri Mar 5 15:02:34 2021 -0500 cifs: don't cargo-cult strndup() strndup(s, strlen(s)) is a highly unidiomatic way to spell strdup(s); it's *NOT* safer in any way, since strlen() is just as sensitive to NUL-termination as strdup() is. strndup() is for situations when you need a copy of a known-sized substring, not a magic security juju to drive the bad spirits away. Signed-off-by: Al Viro Signed-off-by: Steve French commit b9335f621064b95bbf3e9473e228c4b328ff3e8a Author: Steve French Date: Fri Apr 9 20:16:41 2021 -0500 SMB3: update structures for new compression protocol definitions Protocol has been extended for additional compression headers. See MS-SMB2 section 2.2.42 Signed-off-by: Steve French commit ec4e4862a92b3302c3e876c88fcf5df961b5db40 Author: Aurelien Aptel Date: Mon Apr 12 18:01:43 2021 +0200 cifs: remove old dead code While reviewing a patch clarifying locks and locking hierarchy I realized some locks were unused. This commit removes old data and code that isn't actually used anywhere, or hidden in ifdefs which cannot be enabled from the kernel config. * The uid/gid trees and associated locks are left-overs from when uid/sid mapping had an extra caching layer on top of the keyring and are now unused. See commit faa65f07d21e ("cifs: simplify id_to_sid and sid_to_id mapping code") from 2012. * cifs_oplock_break_ops is a left-over from when slow_work was remplaced by regular workqueue and is now unused. See commit 9b646972467f ("cifs: use workqueue instead of slow-work") from 2010. * CIFSSMBSetAttrLegacy is SMB1 cruft dealing with some legacy NT4/Win9x behaviour. * Remove CONFIG_CIFS_DNOTIFY_EXPERIMENTAL left-overs. This was already partially removed in 392e1c5dc9cc ("cifs: rename and clarify CIFS_ASYNC_OP and CIFS_NO_RESP") from 2019. Kill it completely. * Another candidate that was considered but spared is CONFIG_CIFS_NFSD_EXPORT which has an empty implementation and cannot be enabled by a config option (although it is listed but disabled with "BROKEN" as a dep). It's unclear whether this could even function today in its current form but it has it's own .c file and Kconfig entry which is a bit more involved to remove and might make a come back? Signed-off-by: Aurelien Aptel Signed-off-by: Steve French commit 9f4c6eed26a2b7e3ce20c54e691357e0e69cc8c2 Author: Gustavo A. R. Silva Date: Thu Mar 25 20:11:17 2021 -0500 cifs: cifspdu.h: 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, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warning: CC [M] fs/cifs/cifssmb.o fs/cifs/cifssmb.c: In function ‘CIFSFindNext’: fs/cifs/cifssmb.c:4636:23: warning: array subscript 1 is above array bounds of ‘char[1]’ [-Warray-bounds] 4636 | pSMB->ResumeFileName[name_len+1] = 0; | ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Signed-off-by: Gustavo A. R. Silva Reviewed-by: Aurelien Aptel Signed-off-by: Steve French commit 5e14c7240ae9ada2b0747a57f0deb5643102f64c Author: Wan Jiabing Date: Fri Apr 9 10:46:39 2021 +0800 fs: cifs: Remove repeated struct declaration struct cifs_writedata is declared twice. One is declared at 209th line. And struct cifs_writedata is defined blew. The declaration hear is not needed. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Steve French commit 443dd65d48f80057e135198ed5642e9978df01e9 Author: Aurelien Aptel Date: Mon Mar 22 18:34:37 2021 +0100 Documentation/admin-guide/cifs: document open_files and dfscache Add missing documentation for open_files and dfscache /proc files. Signed-off-by: Aurelien Aptel Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French commit b7fd0fa0eac701b5eab07d3994a2973801035c0b Author: Aurelien Aptel Date: Fri Apr 9 16:31:37 2021 +0200 cifs: simplify SWN code with dummy funcs instead of ifdefs This commit doesn't change the logic of SWN. Add dummy implementation of SWN functions when SWN is disabled instead of using ifdef sections. The dummy functions get optimized out, this leads to clearer code and compile time type-checking regardless of config options with no runtime penalty. Leave the simple ifdefs section as-is. A single bitfield (bool foo:1) on its own will use up one int. Move tcon->use_witness out of ifdefs with the other tcon bitfields. Signed-off-by: Aurelien Aptel Reviewed-by: Samuel Cabrero Signed-off-by: Steve French commit bb9cad1b49e3123fd7691236be318d4a14e206fe Author: Steve French Date: Fri Apr 9 15:20:24 2021 -0500 smb3: update protocol header definitions based to include new flags [MS-SMB2] protocol specification was recently updated to include new flags, new negotiate context and some minor changes to fields. Update smb2pdu.h structure definitions to match the newest version of the protocol specification. Updates to the compression context values will be in a followon patch. Signed-off-by: Steve French commit edc9dd1e3c31cfec742593ef9b36af59208bf079 Author: Steve French Date: Fri Apr 9 14:49:15 2021 -0500 cifs: correct comments explaining internal semaphore usage in the module A few of the semaphores had been removed, and one additional one needed to be noted in the comments. Signed-off-by: Steve French commit 83cd9ed7ae720c216e7b57b607ae26af603594db Author: Jiapeng Chong Date: Thu Apr 8 16:31:02 2021 +0800 cifs: Remove useless variable Fix the following gcc warning: fs/cifs/cifsacl.c:1097:8: warning: variable ‘nmode’ set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Steve French commit c45adff786b780b22db03e102f47d5515cf78072 Author: jack1.li_cp Date: Fri Apr 9 22:00:37 2021 -0500 cifs: Fix spelling of 'security' secuirty -> security Signed-off-by: jack1.li_cp Signed-off-by: Steve French commit 1cfa807b06afd54488512bacef7cb5023437f178 Author: Geert Uytterhoeven Date: Tue Mar 16 14:39:46 2021 +0100 leds: LEDS_BLINK_LGM should depend on X86 The Intel Lightning Mountain (LGM) Serial Shift Output controller (SSO) is only present on Intel Lightning Mountain SoCs. Hence add a dependency on X86, to prevent asking the user about this driver when configuring a kernel without Intel Lightning Mountain platform support. While at it, merge the other dependencies into a single statement. Signed-off-by: Geert Uytterhoeven Signed-off-by: Pavel Machek commit ec50536b7840dde085185d9570fa19d0baf5042c Author: Colin Ian King Date: Mon Feb 22 13:49:39 2021 +0000 leds: lgm: Fix spelling mistake "prepate" -> "prepare" There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Pavel Machek commit 5222fa9121142ddd86dcb1a9205fd02e9d5d1e04 Author: Pavel Machek Date: Sun Apr 25 22:23:47 2021 +0200 MAINTAINERS: Remove Dan Murphy's bouncing email Signed-off-by: Pavel Machek commit fcc96cef8a185e55c25d25f4f698f51e1a030911 Author: Zheng Yongjun Date: Fri Jan 8 17:24:46 2021 +0800 leds-lm3642: convert comma to semicolon Replace a comma between expression statements by a semicolon. Signed-off-by: Zheng Yongjun Signed-off-by: Pavel Machek commit e6b031d3c37f79d135c642834bdda7233a29db8d Author: Erik Flodin Date: Sun Apr 25 16:14:35 2021 +0200 can: proc: fix rcvlist_* header alignment on 64-bit system Before this fix, the function and userdata columns weren't aligned: device can_id can_mask function userdata matches ident vcan0 92345678 9fffffff 0000000000000000 0000000000000000 0 raw vcan0 123 00000123 0000000000000000 0000000000000000 0 raw After the fix they are: device can_id can_mask function userdata matches ident vcan0 92345678 9fffffff 0000000000000000 0000000000000000 0 raw vcan0 123 00000123 0000000000000000 0000000000000000 0 raw Link: Link: https://lore.kernel.org/r/20210425141440.229653-1-erik@flodin.me Signed-off-by: Erik Flodin Signed-off-by: Marc Kleine-Budde commit 8ac27f2c6eac1f140531411e404fb3ba23339ba5 Author: Masahiro Yamada Date: Sat Apr 24 22:55:24 2021 +0900 kconfig: refactor .gitignore Add '/' prefix to clarify that the generated files exist right under scripts/kconfig/, but not in any sub-directory. Replace '*conf-cfg' with '[gmnq]conf-cfg' to make it explicit, and still short enough. Use '[gmnq]conf' to combine gconf, mconf, nconf, and qconf. Signed-off-by: Masahiro Yamada commit a2a7cc32a5e8cd983912f25a242820107e5613dc Author: Stefan Metzmacher Date: Sun Apr 25 01:26:04 2021 +0200 io_uring: io_sq_thread() no longer needs to reset current->pf_io_worker This is done by create_io_thread() now. Signed-off-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit ff244303301f6f2ac90107c61d18826efd0af822 Author: Stefan Metzmacher Date: Sun Apr 25 01:26:03 2021 +0200 kernel: always initialize task->pf_io_worker to NULL Otherwise io_wq_worker_{running,sleeping}() may dereference an invalid pointer (in future). Currently all users of create_io_thread() are fine and get task->pf_io_worker = NULL implicitly from the wq_manager, which got it either from the userspace thread of the sq_thread, which explicitly reset it to NULL. I think it's safer to always reset it in order to avoid future problems. Fixes: 3bfe6106693b ("io-wq: fork worker threads from original task") cc: Jens Axboe Signed-off-by: Stefan Metzmacher Signed-off-by: Jens Axboe commit 0bde4444ec44b8e64bbd4af72fcaef58bcdbd4ce Author: Tom Zanussi Date: Sat Apr 24 10:04:16 2021 -0500 dmaengine: idxd: Enable IDXD performance monitor support Add the code needed in the main IDXD driver to interface with the IDXD perfmon implementation. [ Based on work originally by Jing Lin. ] Reviewed-by: Dave Jiang Reviewed-by: Kan Liang Signed-off-by: Tom Zanussi Link: https://lore.kernel.org/r/a5564a5583911565d31c2af9234218c5166c4b2c.1619276133.git.zanussi@kernel.org Signed-off-by: Vinod Koul commit 81dd4d4d6178306ab31db91bdc7353d485bdafce Author: Tom Zanussi Date: Sat Apr 24 10:04:15 2021 -0500 dmaengine: idxd: Add IDXD performance monitor support Implement the IDXD performance monitor capability (named 'perfmon' in the DSA (Data Streaming Accelerator) spec [1]), which supports the collection of information about key events occurring during DSA and IAX (Intel Analytics Accelerator) device execution, to assist in performance tuning and debugging. The idxd perfmon support is implemented as part of the IDXD driver and interfaces with the Linux perf framework. It has several features in common with the existing uncore pmu support: - it does not support sampling - does not support per-thread counting However it also has some unique features not present in the core and uncore support: - all general-purpose counters are identical, thus no event constraints - operation is always system-wide While the core perf subsystem assumes that all counters are by default per-cpu, the uncore pmus are socket-scoped and use a cpu mask to restrict counting to one cpu from each socket. IDXD counters use a similar strategy but expand the scope even further; since IDXD counters are system-wide and can be read from any cpu, the IDXD perf driver picks a single cpu to do the work (with cpu hotplug notifiers to choose a different cpu if the chosen one is taken off-line). More specifically, the perf userspace tool by default opens a counter for each cpu for an event. However, if it finds a cpumask file associated with the pmu under sysfs, as is the case with the uncore pmus, it will open counters only on the cpus specified by the cpumask. Since perfmon only needs to open a single counter per event for a given IDXD device, the perfmon driver will create a sysfs cpumask file for the device and insert the first cpu of the system into it. When a user uses perf to open an event, perf will open a single counter on the cpu specified by the cpu mask. This amounts to the default system-wide rather than per-cpu counting mentioned previously for perfmon pmu events. In order to keep the cpu mask up-to-date, the driver implements cpu hotplug support for multiple devices, as IDXD usually enumerates and registers more than one idxd device. The perfmon driver implements basic perfmon hardware capability discovery and configuration, and is initialized by the IDXD driver's probe function. During initialization, the driver retrieves the total number of supported performance counters, the pmu ID, and the device type from idxd device, and registers itself under the Linux perf framework. The perf userspace tool can be used to monitor single or multiple events depending on the given configuration, as well as event groups, which are also supported by the perfmon driver. The user configures events using the perf tool command-line interface by specifying the event and corresponding event category, along with an optional set of filters that can be used to restrict counting to specific work queues, traffic classes, page and transfer sizes, and engines (See [1] for specifics). With the configuration specified by the user, the perf tool issues a system call passing that information to the kernel, which uses it to initialize the specified event(s). The event(s) are opened and started, and following termination of the perf command, they're stopped. At that point, the perfmon driver will read the latest count for the event(s), calculate the difference between the latest counter values and previously tracked counter values, and display the final incremental count as the event count for the cycle. An overflow handler registered on the IDXD irq path is used to account for counter overflows, which are signaled by an overflow interrupt. Below are a couple of examples of perf usage for monitoring DSA events. The following monitors all events in the 'engine' category. Becuuse no filters are specified, this captures all engine events for the workload, which in this case is 19 iterations of the work generated by the kernel dmatest module. Details describing the events can be found in Appendix D of [1], Performance Monitoring Events, but briefly they are: event 0x1: total input data processed, in 32-byte units event 0x2: total data written, in 32-byte units event 0x4: number of work descriptors that read the source event 0x8: number of work descriptors that write the destination event 0x10: number of work descriptors dispatched from batch descriptors event 0x20: number of work descriptors dispatched from work queues # perf stat -e dsa0/event=0x1,event_category=0x1/, dsa0/event=0x2,event_category=0x1/, dsa0/event=0x4,event_category=0x1/, dsa0/event=0x8,event_category=0x1/, dsa0/event=0x10,event_category=0x1/, dsa0/event=0x20,event_category=0x1/ modprobe dmatest channel=dma0chan0 timeout=2000 iterations=19 run=1 wait=1 Performance counter stats for 'system wide': 5,332 dsa0/event=0x1,event_category=0x1/ 5,327 dsa0/event=0x2,event_category=0x1/ 19 dsa0/event=0x4,event_category=0x1/ 19 dsa0/event=0x8,event_category=0x1/ 0 dsa0/event=0x10,event_category=0x1/ 19 dsa0/event=0x20,event_category=0x1/ 21.977436186 seconds time elapsed The command below illustrates filter usage with a simple example. It specifies that MEM_MOVE operations should be counted for the DSA device dsa0 (event 0x8 corresponds to the EV_MEM_MOVE event - Number of Memory Move Descriptors, which is part of event category 0x3 - Operations. The detailed category and event IDs are available in Appendix D, Performance Monitoring Events, of [1]). In addition to the event and event category, a number of filters are also specified (the detailed filter values are available in Chapter 6.4 (Filter Support) of [1]), which will restrict counting to only those events that meet all of the filter criteria. In this case, the filters specify that only MEM_MOVE operations that are serviced by work queue wq0 and specifically engine number engine0 and traffic class tc0 having sizes between 0 and 4k and page size of between 0 and 1G result in a counter hit; anything else will be filtered out and not appear in the final count. Note that filters are optional - any filter not specified is assumed to be all ones and will pass anything. # perf stat -e dsa0/filter_wq=0x1,filter_tc=0x1,filter_sz=0x7, filter_eng=0x1,event=0x8,event_category=0x3/ modprobe dmatest channel=dma0chan0 timeout=2000 iterations=19 run=1 wait=1 Performance counter stats for 'system wide': 19 dsa0/filter_wq=0x1,filter_tc=0x1,filter_sz=0x7, filter_eng=0x1,event=0x8,event_category=0x3/ 21.865914091 seconds time elapsed The output above reflects that the unspecified workload resulted in the counting of 19 MEM_MOVE operation events that met the filter criteria. [1]: https://software.intel.com/content/www/us/en/develop/download/intel-data-streaming-accelerator-preliminary-architecture-specification.html [ Based on work originally by Jing Lin. ] Reviewed-by: Dave Jiang Reviewed-by: Kan Liang Signed-off-by: Tom Zanussi Link: https://lore.kernel.org/r/0c5080a7d541904c4ad42b848c76a1ce056ddac7.1619276133.git.zanussi@kernel.org Signed-off-by: Vinod Koul commit 2b4ae19c6d4842dc24d9e0cbec5c98d2766643d5 Author: Hao Xu Date: Sat Apr 24 17:26:20 2021 +0800 io_uring: update sq_thread_idle after ctx deleted we shall update sq_thread_idle anytime we do ctx deletion from ctx_list Fixes:734551df6f9b ("io_uring: fix shared sqpoll cancellation hangs") Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/1619256380-236460-1-git-send-email-haoxu@linux.alibaba.com Signed-off-by: Jens Axboe commit 634d00df5e1cfc4a707b629a814bd607f726bd52 Author: Pavel Begunkov Date: Sun Apr 25 14:32:26 2021 +0100 io_uring: add full-fledged dynamic buffers support Hook buffers into all rsrc infrastructure, including tagging and updates. Suggested-by: Bijan Mottahedeh Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/119ed51d68a491dae87eb55fb467a47870c86aad.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit bd54b6fe3316ec1d469513b888ced31eec20032a Author: Bijan Mottahedeh Date: Sun Apr 25 14:32:25 2021 +0100 io_uring: implement fixed buffers registration similar to fixed files Apply fixed_rsrc functionality for fixed buffers support. Signed-off-by: Bijan Mottahedeh [rebase, remove multi-level tables, fix unregister on exit] Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/17035f4f75319dc92962fce4fc04bc0afb5a68dc.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit eae071c9b4cefbcc3f985c5abf9a6e32c1608ca9 Author: Pavel Begunkov Date: Sun Apr 25 14:32:24 2021 +0100 io_uring: prepare fixed rw for dynanic buffers With dynamic buffer updates, registered buffers in the table may change at any moment. First of all we want to prevent future races between updating and importing (i.e. io_import_fixed()), where the latter one may happen without uring_lock held, e.g. from io-wq. Save the first loaded io_mapped_ubuf buffer and reuse. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/21a2302d07766ae956640b6f753292c45200fe8f.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 41edf1a5ec967bf4bddedb83c48e02dfea8315b4 Author: Pavel Begunkov Date: Sun Apr 25 14:32:23 2021 +0100 io_uring: keep table of pointers to ubufs Instead of keeping a table of ubufs convert them into pointers to ubuf, so we can atomically read one pointer and be sure that the content of ubuf won't change. Because it was already dynamically allocating imu->bvec, throw both imu and bvec into a single structure so they can be allocated together. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b96efa4c5febadeccf41d0e849ac099f4c83b0d3.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c3bdad0271834214be01c1d687c262bf80da6eb0 Author: Pavel Begunkov Date: Sun Apr 25 14:32:22 2021 +0100 io_uring: add generic rsrc update with tags Add IORING_REGISTER_RSRC_UPDATE, which also supports passing in rsrc tags. Implement it for registered files. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d4dc66df204212f64835ffca2c4eb5e8363f2f05.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 792e35824be9af9fb4dac956229fb97bda04e25e Author: Pavel Begunkov Date: Sun Apr 25 14:32:21 2021 +0100 io_uring: add IORING_REGISTER_RSRC Add a new io_uring_register() opcode for rsrc registeration. Instead of accepting a pointer to resources, fds or iovecs, it @arg is now pointing to a struct io_uring_rsrc_register, and the second argument tells how large that struct is to make it easily extendible by adding new fields. All that is done mainly to be able to pass in a pointer with tags. Pass it in and enable CQE posting for file resources. Doesn't support setting tags on update yet. A design choice made here is to not post CQEs on rsrc de-registration, but only when we updated-removed it by rsrc dynamic update. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c498aaec32a4bb277b2406b9069662c02cdda98c.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit fdecb66281e165927059419c3b1de09ffe4f8369 Author: Pavel Begunkov Date: Sun Apr 25 14:32:20 2021 +0100 io_uring: enumerate dynamic resources As resources are getting more support and common parts, it'll be more convenient to index resources and use it for indexing. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f0be63e9310212d5601d36277c2946ff7a040485.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 98f0b3b4f1d51911492b9d6eda4add0ec562179b Author: Pavel Begunkov Date: Sun Apr 25 14:32:19 2021 +0100 io_uring: add generic path for rsrc update Extract some common parts for rsrc update, will be used reg buffers support dynamic (i.e. quiesce-lee) managing. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b49c3ff6b9ff0e530295767604fe4de64d349e04.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b60c8dce33895f79cbb54700fbeffc7db8aee3f7 Author: Pavel Begunkov Date: Sun Apr 25 14:32:18 2021 +0100 io_uring: preparation for rsrc tagging We need a way to notify userspace when a lazily removed resource actually died out. This will be done by associating a tag, which is u64 exactly like req->user_data, with each rsrc (e.g. buffer of file). A CQE will be posted once a resource is actually put down. Tag 0 is a special value set by default, for whcih it don't generate an CQE, so providing the old behaviour. Don't expose it to the userspace yet, but prepare internally, allocate buffers, add all posting hooks, etc. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2e6beec5eabe7216bb61fb93cdf5aaf65812a9b0.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit d4d19c19d6ae93f99a57c50ccf6d084213e964bd Author: Pavel Begunkov Date: Sun Apr 25 14:32:17 2021 +0100 io_uring: decouple CQE filling from requests Make __io_cqring_fill_event() agnostic of struct io_kiocb, pass all the data needed directly into it. Will be used to post rsrc removal completions, which don't have an associated request. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/c9b8da9e42772db2033547dfebe479dc972a0f2c.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 44b31f2fa2c4b6479a578e74e4ed6bf7ad243955 Author: Pavel Begunkov Date: Sun Apr 25 14:32:16 2021 +0100 io_uring: return back rsrc data free helper Add io_rsrc_data_free() helper for destroying rsrc_data, easier for search and the function will get more stuff to destroy shortly. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/562d1d53b5ff184f15b8949a63d76ef19c4ba9ec.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit fff4db76be297bd4124a503948435a3917d7a702 Author: Pavel Begunkov Date: Sun Apr 25 14:32:15 2021 +0100 io_uring: move __io_sqe_files_unregister A preparation patch moving __io_sqe_files_unregister() definition closer to other "files" functions without any modification. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/95caf17fe837e67bd1f878395f07049062a010d4.1619356238.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 464c62f6f6e1c836d7aae68dbf46101de84fdcb7 Author: Jin Yao Date: Mon Mar 29 15:09:03 2021 +0800 perf vendor events intel: Add missing skylake & icelake model numbers Kernel has supported COMETLAKE/COMETLAKE_L to use the SKYLAKE events and supported TIGERLAKE_L/TIGERLAKE/ROCKETLAKE to use the ICELAKE events. But pmu-events mapfile.csv is missing these model numbers. Now add the missing model numbers to mapfile.csv. Signed-off-by: Jin Yao Reviewed-by: Andi Kleen Cc: Alexander Shishkin Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210329070903.8894-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 30c400886bad4ac1801516683b71d7714bc2b1b1 Author: Christophe Leroy Date: Sat Apr 24 10:34:43 2021 +0000 powerpc/kasan: Fix shadow start address with modules Modules are now located before kernel, KASAN area has to be extended accordingly. Fixes: 80edc68e0479 ("powerpc/32s: Define a MODULE area below kernel text all the time") Fixes: 9132a2e82adc ("powerpc/8xx: Define a MODULE area below kernel text") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c68163065163f303f5af1e4bbdd9f1ce69f0543e.1619260465.git.christophe.leroy@csgroup.eu commit 2e22d48dca0bc5b7fccca8d7b6caed80a9d07465 Author: Chao Yu Date: Fri Apr 23 14:09:38 2021 +0800 f2fs: clean up left deprecated IO trace codes Commit d5f7bc0064e0 ("f2fs: deprecate f2fs_trace_io") left some dead codes, delete them. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f634ca650f724347892068489c7920631a3aac6a Author: Nathan Chancellor Date: Thu Apr 22 13:19:14 2021 -0700 kbuild: Add $(KBUILD_HOSTLDFLAGS) to 'has_libelf' test Normally, invocations of $(HOSTCC) include $(KBUILD_HOSTLDFLAGS), which in turn includes $(HOSTLDFLAGS), which allows users to pass in their own flags when linking. However, the 'has_libelf' test does not, meaning that if a user requests a specific linker via HOSTLDFLAGS=-fuse-ld=..., it is not respected and the build might error. For example, if a user building with clang wants to use all of the LLVM tools without any GNU tools, they might remove all of the GNU tools from their system or PATH then build with $ make HOSTLDFLAGS=-fuse-ld=lld LLVM=1 LLVM_IAS=1 which says use all of the LLVM tools, the integrated assembler, and ld.lld for linking host executables. Without this change, the build will error because $(HOSTCC) uses its default linker, rather than the one requested via -fuse-ld=..., which is GNU ld in clang's case in a default configuration. error: Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel make[1]: *** [Makefile:1260: prepare-objtool] Error 1 Add $(KBUILD_HOSTLDFLAGS) to the 'has_libelf' test so that the linker choice is respected. Link: https://github.com/ClangBuiltLinux/linux/issues/479 Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 82526ef43399a7556b860538041802042b3872c1 Author: Masahiro Yamada Date: Tue Apr 20 02:05:05 2021 +0900 kbuild: deb-pkg: change the source package name to linux-upstream Change the source package name from 'linux-$(KERNELRELEASE)' to 'linux-upstream'. Initially, I tried to use 'linux' to be aligned with the Debian kernel package, but Ben suggested 'linux-upstream' so that it is clearly distinguished from distribution packages. [1] The filenames will be changed as follows: [Before] linux-5.12.0-rc3+_5.12.0-rc3+-1.dsc linux-5.12.0-rc3+_5.12.0-rc3+.orig.tar.gz linux-5.12.0-rc3+_5.12.0-rc3+-1.diff.gz [After] linux-upstream_5.12.0-rc3+-1.dsc linux-upstream_5.12.0-rc3+.orig.tar.gz linux-upstream_5.12.0-rc3+-1.diff.gz Commit 3716001bcb7f ("deb-pkg: add source package") introduced KDEB_SOURCENAME. If you are unhappy with the default name, you can override it via KDEB_SOURCENAME. [1]: https://lore.kernel.org/linux-kbuild/06ffa2a690d57f867b4bc1b42f0026917b1dd3cd.camel@decadent.org.uk/T/#m2c4afa0eca5ced5e57795b002f2dbcb05d7a4a44 Suggested-by: Ben Hutchings Signed-off-by: Masahiro Yamada commit b61442df748f06e98085fb604093a6215ce730eb Author: Masahiro Yamada Date: Fri Apr 16 22:00:51 2021 +0900 tools: do not include scripts/Kbuild.include Since commit 57fd251c7896 ("kbuild: split cc-option and friends to scripts/Makefile.compiler"), some kselftests fail to build. The tools/ directory opted out Kbuild, and went in a different direction. People copied scripts and Makefiles to the tools/ directory to create their own build system. tools/build/Build.include mimics scripts/Kbuild.include, but some tool Makefiles include the Kbuild one to import a feature that is missing in tools/build/Build.include: - Commit ec04aa3ae87b ("tools/thermal: tmon: use "-fstack-protector" only if supported") included scripts/Kbuild.include from tools/thermal/tmon/Makefile to import the cc-option macro. - Commit c2390f16fc5b ("selftests: kvm: fix for compilers that do not support -no-pie") included scripts/Kbuild.include from tools/testing/selftests/kvm/Makefile to import the try-run macro. - Commit 9cae4ace80ef ("selftests/bpf: do not ignore clang failures") included scripts/Kbuild.include from tools/testing/selftests/bpf/Makefile to import the .DELETE_ON_ERROR target. - Commit 0695f8bca93e ("selftests/powerpc: Handle Makefile for unrecognized option") included scripts/Kbuild.include from tools/testing/selftests/powerpc/pmu/ebb/Makefile to import the try-run macro. Copy what they need into tools/build/Build.include, and make them include it instead of scripts/Kbuild.include. Link: https://lore.kernel.org/lkml/86dadf33-70f7-a5ac-cb8c-64966d2f45a1@linux.ibm.com/ Fixes: 57fd251c7896 ("kbuild: split cc-option and friends to scripts/Makefile.compiler") Reported-by: Janosch Frank Reported-by: Christian Borntraeger Signed-off-by: Masahiro Yamada Tested-by: Christian Borntraeger Acked-by: Yonghong Song commit 0e0345b77ac4605d5447b252d220e4a2ee118da7 Author: Alexey Dobriyan Date: Thu Apr 15 20:36:07 2021 +0300 kbuild: redo fake deps at include/config/*.h Make include/config/foo/bar.h fake deps files generation simpler. * delete .h suffix those aren't header files, shorten filenames, * delete tolower() Linux filesystems can deal with both upper and lowercase filenames very well, * put everything in 1 directory Presumably 'mkdir -p' split is from dark times when filesystems handled huge directories badly, disks were round adding to seek times. x86_64 allmodconfig lists 12364 files in include/config. ../obj/include/config/ ├── 104_QUAD_8 ├── 60XX_WDT ├── 64BIT ... ├── ZSWAP_DEFAULT_ON ├── ZSWAP_ZPOOL_DEFAULT └── ZSWAP_ZPOOL_DEFAULT_ZBUD 0 directories, 12364 files Signed-off-by: Alexey Dobriyan Signed-off-by: Masahiro Yamada commit e3456056f1d935491ee9148dbae98c6b95f58910 Author: Masahiro Yamada Date: Thu Apr 15 16:26:59 2021 +0900 kbuild: remove TMPO from try-run TMPO is only used by arch/x86/Makefile. Change arch/x86/Makefile to use $$TMPO.o and remove TMPO from scripts/Makefile.compiler. Signed-off-by: Masahiro Yamada commit 35f93a09e9683bf962f9164c0db5beeb65ad2c64 Author: Michal Suchanek Date: Thu Apr 8 23:31:40 2021 +0200 MAINTAINERS: add pattern for dummy-tools scripts/get_maintainer.pl does not find a maintainer for new files otherwise. Signed-off-by: Michal Suchanek Signed-off-by: Masahiro Yamada commit 1fdd7433a98a2f5511f49ad3f3b82bdd6f77265c Author: Yonghong Song Date: Thu Apr 1 16:27:23 2021 -0700 kbuild: add an elfnote for whether vmlinux is built with lto Currently, clang LTO built vmlinux won't work with pahole. LTO introduced cross-cu dwarf tag references and broke current pahole model which handles one cu as a time. The solution is to merge all cu's as one pahole cu as in [1]. We would like to do this merging only if cross-cu dwarf references happens. The LTO build mode is a pretty good indication for that. In earlier version of this patch ([2]), clang flag -grecord-gcc-switches is proposed to add to compilation flags so pahole could detect "-flto" and then merging cu's. This will increate the binary size of 1% without LTO though. Arnaldo suggested to use a note to indicate the vmlinux is built with LTO. Such a cheap way to get whether the vmlinux is built with LTO or not helps pahole but is also useful for tracing as LTO may inline/delete/demote global functions, promote static functions, etc. So this patch added an elfnote with a new type LINUX_ELFNOTE_LTO_INFO. The owner of the note is "Linux". With gcc 8.4.1 and clang trunk, without LTO, I got $ readelf -n vmlinux Displaying notes found in: .notes Owner Data size Description ... Linux 0x00000004 func description data: 00 00 00 00 ... With "readelf -x ".notes" vmlinux", I can verify the above "func" with type code 0x101. With clang thin-LTO, I got the same as above except the following: description data: 01 00 00 00 which indicates the vmlinux is built with LTO. [1] https://lore.kernel.org/bpf/20210325065316.3121287-1-yhs@fb.com/ [2] https://lore.kernel.org/bpf/20210331001623.2778934-1-yhs@fb.com/ Suggested-by: Arnaldo Carvalho de Melo Signed-off-by: Yonghong Song Reviewed-by: Nick Desaulniers Tested-by: Sedat Dilek # LLVM/Clang v12.0.0-rc4 (x86-64) Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Masahiro Yamada commit 6e74bc4c84546ddbf67ed0f4d45284c9bb153846 Author: Masahiro Yamada Date: Mon Mar 1 23:19:37 2021 +0900 ia64: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts ia64 to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada commit a92359aa6de8871b1502b17c1ea71b93f5eb606b Author: Masahiro Yamada Date: Mon Mar 1 23:19:36 2021 +0900 ia64: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts ia64 to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada commit 14b36dcfd640a69ed657a0c3085f7c3853d83569 Author: Masahiro Yamada Date: Mon Mar 1 23:18:26 2021 +0900 alpha: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts alpha to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada commit b186f2c3d877de82c7960bdac5145e69dcfe110d Author: Masahiro Yamada Date: Mon Mar 1 23:18:25 2021 +0900 alpha: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts alpha to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada commit d8fc9b667d483614974d80f59405f0db4dfc72e2 Author: Masahiro Yamada Date: Mon Jan 4 17:32:21 2021 +0900 sysctl: use min() helper for namecmp() Make it slightly readable by using min(). Signed-off-by: Masahiro Yamada Acked-by: Kees Cook commit c3d7ef377eb2564b165b1e8fdb4646952c90ac17 Author: Piotr Gorski Date: Wed Apr 7 18:09:27 2021 +0200 kbuild: add support for zstd compressed modules kmod 28 supports modules compressed in zstd format so let's add this possibility to kernel. Signed-off-by: Piotr Gorski Reviewed-by: Oleksandr Natalenko Signed-off-by: Masahiro Yamada commit d4bbe942098b0c9b487d424a3c545c9ed56462d7 Author: Masahiro Yamada Date: Wed Mar 31 22:38:10 2021 +0900 kbuild: remove CONFIG_MODULE_COMPRESS CONFIG_MODULE_COMPRESS is only used to activate the choice for module compression algorithm. It will be simpler to make the choice always visible, and add CONFIG_MODULE_COMPRESS_NONE in the choice. This is more consistent with the "Kernel compression mode" and "Built-in initramfs compression mode" choices. CONFIG_KERNEL_UNCOMPRESSED and CONFIG_INITRAMFS_COMPRESSION_NONE are available to choose no compression. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 961ab4a3cd66c285951cf4c8ec10bc8d9a4b0232 Author: Masahiro Yamada Date: Wed Mar 31 22:38:09 2021 +0900 kbuild: merge scripts/Makefile.modsign to scripts/Makefile.modinst scripts/Makefile.modsign is a subset of scripts/Makefile.modinst, and duplicates the code. Let's merge them. By the way, you do not need to run 'make modules_sign' explicitly because modules are signed as a part of 'make modules_install' when CONFIG_MODULE_SIG_ALL=y. If CONFIG_MODULE_SIG_ALL=n, mod_sign_cmd is set to 'true', so 'make modules_sign' is not functional. In my understanding, the reason of still keeping this is to handle corner cases like commit 64178cb62c32 ("builddeb: fix stripped module signatures if CONFIG_DEBUG_INFO and CONFIG_MODULE_SIG_ALL are set"). Signed-off-by: Masahiro Yamada commit 65ce9c38326e2588fcd1a3a4817c14b4660f430b Author: Masahiro Yamada Date: Wed Mar 31 22:38:08 2021 +0900 kbuild: move module strip/compression code into scripts/Makefile.modinst Both mod_strip_cmd and mod_compress_cmd are only used in scripts/Makefile.modinst, hence there is no good reason to define them in the top Makefile. Move the relevant code to scripts/Makefile.modinst. Also, show separate log messages for each of install, strip, sign, and compress. Signed-off-by: Masahiro Yamada commit ccae4cfa7bfbec323abc399228e0ada7c377b16b Author: Masahiro Yamada Date: Wed Mar 31 22:38:07 2021 +0900 kbuild: refactor scripts/Makefile.modinst scripts/Makefile.modinst is ugly and weird in multiple ways; it specifies real files $(modules) as phony, makes directory manipulation needlessly too complicated. Clean up the Makefile code, and show the full path of installed modules in the log. Signed-off-by: Masahiro Yamada commit 7f69180b8e905fe13559573b89245f6256b99434 Author: Masahiro Yamada Date: Wed Mar 31 22:38:06 2021 +0900 kbuild: rename extmod-prefix to extmod_prefix This seems to be useful in sub-make as well. As a preparation of exporting it, rename extmod-prefix to extmod_prefix because exported variables cannot contain hyphens. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers commit 1a998be620a10000c1e1240026e4bd6bc3378c96 Author: Masahiro Yamada Date: Wed Mar 31 22:38:05 2021 +0900 kbuild: check module name conflict for external modules as well If there are multiple modules with the same name in the same external module tree, there is ambiguity about which one will be loaded, and very likely something odd is happening. Signed-off-by: Masahiro Yamada commit 3ac42b2112532a71125eea6bb07361deeca9aaa1 Author: Masahiro Yamada Date: Wed Mar 31 22:38:04 2021 +0900 kbuild: show the target directory for depmod log It is clearer to show the directory which depmod will work on. Signed-off-by: Masahiro Yamada commit 3e3005df73b535cb849cf4ec8075d6aa3c460f68 Author: Masahiro Yamada Date: Wed Mar 31 22:38:03 2021 +0900 kbuild: unify modules(_install) for in-tree and external modules If you attempt to build or install modules ('make modules(_install)' with CONFIG_MODULES disabled, you will get a clear error message, but nothing for external module builds. Factor out the modules and modules_install rules into the common part, so you will get the same error message when you try to build external modules with CONFIG_MODULES=n. Signed-off-by: Masahiro Yamada commit 4b97ec0e9cfd5995f41b9726c88566a31f4625cc Author: Masahiro Yamada Date: Wed Mar 31 22:38:02 2021 +0900 kbuild: remove unneeded mkdir for external modules_install scripts/Makefile.modinst creates directories as needed. Signed-off-by: Masahiro Yamada commit f3945833e436d79d9a97e776c4986af8c9cbb483 Author: Bhaskar Chowdhury Date: Fri Mar 26 11:22:19 2021 +0530 scripts: modpost.c: Fix a few typos s/agorithm/algorithm/ s/criterias/criteria/ s/targetting/targeting/ ....two different places. Signed-off-by: Bhaskar Chowdhury Signed-off-by: Masahiro Yamada commit 0d95f41ebde40d552bb4fea64b1d618607915fd6 Author: Jae Hyun Yoo Date: Thu Apr 8 10:28:03 2021 -0700 Revert "i3c master: fix missing destroy_workqueue() on error in i3c_master_register" Adding the destroy_workqueue call in i3c_master_register introduced below kernel warning because it makes duplicate destroy_workqueue calls when i3c_master_register fails after allocating the workqueue. The workqueue will be destroyed by i3c_masterdev_release which is called by put_device at the end of the i3c_master_register function eventually in failure cases so the workqueue doesn't need to be destroyed in i3c_master_register. [ 6.972952] WARNING: CPU: 1 PID: 1 at lib/list_debug.c:48 __list_del_entry_valid+0x9c/0xf4 [ 6.982205] list_del corruption, 8fe03c08->prev is LIST_POISON2 (00000122) [ 6.989910] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G W 5.10.23-c12838a-dirty-31dc772 #1 [ 7.000295] Hardware name: Generic DT based system [ 7.005638] Backtrace: [ 7.008369] [<809133f0>] (dump_backtrace) from [<80913644>] (show_stack+0x20/0x24) [ 7.016819] r7:00000030 r6:60000013 r5:00000000 r4:813b5d40 [ 7.023137] [<80913624>] (show_stack) from [<8091e1a0>] (dump_stack+0x9c/0xb0) [ 7.031201] [<8091e104>] (dump_stack) from [<8011fa30>] (__warn+0xf8/0x154) [ 7.038972] r7:00000030 r6:00000009 r5:804fa1c8 r4:80b6eca4 [ 7.045289] [<8011f938>] (__warn) from [<80913d14>] (warn_slowpath_fmt+0x8c/0xc0) [ 7.053641] r7:00000030 r6:80b6eca4 r5:80b6ed74 r4:818cc000 [ 7.059960] [<80913c8c>] (warn_slowpath_fmt) from [<804fa1c8>] (__list_del_entry_valid+0x9c/0xf4) [ 7.069866] r9:96becf8c r8:818cc000 r7:8fe03c10 r6:8fe03c00 r5:8fe03ba0 r4:ff7ead4c [ 7.078513] [<804fa12c>] (__list_del_entry_valid) from [<8013f0b4>] (destroy_workqueue+0x1c4/0x23c) [ 7.088615] [<8013eef0>] (destroy_workqueue) from [<806aa124>] (i3c_masterdev_release+0x40/0xb0) [ 7.098421] r7:00000000 r6:81a43b80 r5:8fe65360 r4:8fe65048 [ 7.104740] [<806aa0e4>] (i3c_masterdev_release) from [<805f3f04>] (device_release+0x40/0xb0) [ 7.114254] r5:00000000 r4:8fe65048 [ 7.118245] [<805f3ec4>] (device_release) from [<808fe754>] (kobject_put+0xc8/0x204) [ 7.126885] r5:813978dc r4:8fe65048 [ 7.130877] [<808fe68c>] (kobject_put) from [<805f5fbc>] (put_device+0x20/0x24) [ 7.139037] r7:8fe65358 r6:8fe65368 r5:8fe65358 r4:8fe65048 [ 7.145355] [<805f5f9c>] (put_device) from [<806abac4>] (i3c_master_register+0x338/0xb00) [ 7.154487] [<806ab78c>] (i3c_master_register) from [<806ae084>] (dw_i3c_probe+0x224/0x24c) [ 7.163811] r10:00000000 r9:8fe7a100 r8:00000032 r7:819fa810 r6:819fa800 r5:8fe65040 [ 7.172547] r4:00000000 [ 7.175376] [<806ade60>] (dw_i3c_probe) from [<805fdc14>] (platform_drv_probe+0x44/0x80) [ 7.184409] r9:813a25c0 r8:00000000 r7:815ec114 r6:00000000 r5:813a25c0 r4:819fa810 [ 7.193053] [<805fdbd0>] (platform_drv_probe) from [<805fb83c>] (really_probe+0x108/0x50c) [ 7.202275] r5:815ec004 r4:819fa810 [ 7.206265] [<805fb734>] (really_probe) from [<805fc180>] (driver_probe_device+0xb4/0x190) [ 7.215492] r10:813dc000 r9:80c4385c r8:000000d9 r7:813a25c0 r6:819fa810 r5:00000000 [ 7.224228] r4:813a25c0 [ 7.227055] [<805fc0cc>] (driver_probe_device) from [<805fc5cc>] (device_driver_attach+0xb8/0xc0) [ 7.236959] r9:80c4385c r8:000000d9 r7:813a25c0 r6:819fa854 r4:819fa810 [ 7.244439] [<805fc514>] (device_driver_attach) from [<805fc65c>] (__driver_attach+0x88/0x16c) [ 7.254051] r7:00000000 r6:819fa810 r5:00000000 r4:813a25c0 [ 7.260369] [<805fc5d4>] (__driver_attach) from [<805f954c>] (bus_for_each_dev+0x88/0xc8) [ 7.269489] r7:00000000 r6:818cc000 r5:805fc5d4 r4:813a25c0 [ 7.275806] [<805f94c4>] (bus_for_each_dev) from [<805fc76c>] (driver_attach+0x2c/0x30) [ 7.284739] r7:81397c98 r6:00000000 r5:8fe7db80 r4:813a25c0 [ 7.291057] [<805fc740>] (driver_attach) from [<805f9eec>] (bus_add_driver+0x120/0x200) [ 7.299984] [<805f9dcc>] (bus_add_driver) from [<805fce44>] (driver_register+0x98/0x128) [ 7.309005] r7:80c4383c r6:00000000 r5:00000000 r4:813a25c0 [ 7.315323] [<805fcdac>] (driver_register) from [<805fedb4>] (__platform_driver_register+0x50/0x58) [ 7.325410] r5:818cc000 r4:81397c98 [ 7.329404] [<805fed64>] (__platform_driver_register) from [<80c23398>] (dw_i3c_driver_init+0x24/0x28) [ 7.339790] r5:818cc000 r4:80c23374 [ 7.343784] [<80c23374>] (dw_i3c_driver_init) from [<80c01300>] (do_one_initcall+0xac/0x1d0) [ 7.353206] [<80c01254>] (do_one_initcall) from [<80c01630>] (kernel_init_freeable+0x1a8/0x204) [ 7.362916] r8:000000d9 r7:80c4383c r6:00000007 r5:819ca2c0 r4:80c67680 [ 7.370398] [<80c01488>] (kernel_init_freeable) from [<8091eb18>] (kernel_init+0x18/0x12c) [ 7.379616] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:8091eb00 [ 7.388343] r4:00000000 [ 7.391170] [<8091eb00>] (kernel_init) from [<80100148>] (ret_from_fork+0x14/0x2c) [ 7.399607] Exception stack(0x818cdfb0 to 0x818cdff8) [ 7.405243] dfa0: 00000000 00000000 00000000 00000000 [ 7.414371] dfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 [ 7.423499] dfe0: 00000000 00000000 00000000 00000000 00000013 00000000 [ 7.430879] r5:8091eb00 r4:00000000 This reverts commit 59165d16c699182b86b5c65181013f1fd88feb62. Fixes: 59165d16c699 ("i3c master: fix missing destroy_workqueue() on error in i3c_master_register") Signed-off-by: Jae Hyun Yoo Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210408172803.24599-1-jae.hyun.yoo@linux.intel.com commit 4475dff55c54d855ef0179a055b3ce20a9c1ab3e Author: Masahiro Yamada Date: Fri Mar 26 03:54:11 2021 +0900 kbuild: fix false-positive modpost warning when all symbols are trimmed Nathan reports that the mips defconfig emits the following warning: WARNING: modpost: Symbol info of vmlinux is missing. Unresolved symbol check will be entirely skipped. This false-positive happens when CONFIG_TRIM_UNUSED_KSYMS is enabled, but no CONFIG option is set to 'm'. Commit a0590473c5e6 ("nfs: fix PNFS_FLEXFILE_LAYOUT Kconfig default") turned the last 'm' into 'y' for the mips defconfig, and uncovered this issue. In this case, the module feature itself is enabled, but we have no module to build. As a result, CONFIG_TRIM_UNUSED_KSYMS drops all the instances of EXPORT_SYMBOL. Then, modpost wrongly assumes vmlinux is missing because vmlinux.symvers is empty. (As another false-positive case, you can create a module that does not use any symbol of vmlinux). The current behavior is to entirely suppress the unresolved symbol warnings when vmlinux is missing just because there are too many. I found the origin of this code in the historical git tree. [1] If this is a matter of noisiness, I think modpost can display the first 10 warnings, and the number of suppressed warnings at the end. You will get a bit noisier logs when you run 'make modules' without vmlinux, but such warnings are better to show because you never know the resulting modules are actually loadable or not. This commit changes the following: - If any of input *.symver files is missing, pass -w option to let the module build keep going with warnings instead of errors. - If there are too many (10+) unresolved symbol warnings, show only the first 10, and also the number of suppressed warnings. [1]: https://git.kernel.org/pub/scm/linux/kernel/git/history/history.git/commit/?id=1cc0e0529569bf6a94f6d49770aa6d4b599d2c46 Reported-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit 5ab70ff4286f74732c082b65366bad39146d2b10 Author: Masahiro Yamada Date: Fri Mar 26 03:54:10 2021 +0900 kbuild: do not set -w for vmlinux.o modpost The -w option is meaningless for the first pass of modpost (vmlinux.o). We know there are unresolved symbols in vmlinux.o, hence we skip check_exports() and other checks when mod->is_vmlinux is set. See the following part in the for-loop. if (mod->is_vmlinux || mod->from_dump) continue; Signed-off-by: Masahiro Yamada commit 69bc8d386aebbd91a6bb44b6d33f77c8dfa9ed8c Author: Masahiro Yamada Date: Fri Mar 26 03:54:09 2021 +0900 kbuild: generate Module.symvers only when vmlinux exists The external module build shows the following warning if Module.symvers is missing in the kernel tree. WARNING: Symbol version dump "Module.symvers" is missing. Modules may not have dependencies or modversions. I think this is an important heads-up because the resulting modules may not work as expected. This happens when you did not build the entire kernel tree, for example, you might have prepared the minimal setups for external modules by 'make defconfig && make modules_preapre'. A problem is that 'make modules' creates Module.symvers even without vmlinux. In this case, that warning is suppressed since Module.symvers already exists in spite of its incomplete content. The incomplete (i.e. invalid) Module.symvers should not be created. This commit changes the second pass of modpost to dump symbols into modules-only.symvers. The final Module.symvers is created by concatenating vmlinux.symvers and modules-only.symvers if both exist. Module.symvers is supposed to collect symbols from both vmlinux and modules. It might be a bit confusing, and I am not quite sure if it is an official interface, but presumably it is difficult to rename it because some tools (e.g. kmod) parse it. Signed-off-by: Masahiro Yamada commit 987fdfec24102a151c032c467e51c7f0d6d18af9 Author: Masahiro Yamada Date: Wed Mar 24 16:11:28 2021 +0900 arm64: move --fix-cortex-a53-843419 linker test to Kconfig Since commit 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed"), "make ARCH=arm64 (modules_)install" shows a false positive warning. Move the ld-option test to Kconfig, so that the result can be stored in the .config file, avoiding multiple-time evaluations in the build and installation time. Reported-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Acked-by: Will Deacon Tested-by: Nathan Chancellor Reviewed-by: Nathan Chancellor commit 2e98815794fb51250da4528f67fc2f699d5e3c37 Author: Masahiro Yamada Date: Tue Mar 16 01:12:57 2021 +0900 kbuild: dwarf: use AS_VERSION instead of test_dwarf5_support.sh The test code in scripts/test_dwarf5_support.sh is somewhat difficult to understand, but after all, we want to check binutils >= 2.35.2 From the former discussion, the requirement for generating DWARF v5 from C code is as follows: - gcc + gnu as -> requires gcc 5.0+ (but 7.0+ for full support) - clang + gnu as -> requires binutils 2.35.2+ - clang + integrated as -> OK Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Reviewed-by: Nick Desaulniers commit ba64beb17493a4bfec563100c86a462a15926f24 Author: Masahiro Yamada Date: Tue Mar 16 01:12:56 2021 +0900 kbuild: check the minimum assembler version in Kconfig Documentation/process/changes.rst defines the minimum assembler version (binutils version), but we have never checked it in the build time. Kbuild never invokes 'as' directly because all assembly files in the kernel tree are *.S, hence must be preprocessed. I do not expect raw assembly source files (*.s) would be added to the kernel tree. Therefore, we always use $(CC) as the assembler driver, and commit aa824e0c962b ("kbuild: remove AS variable") removed 'AS'. However, we are still interested in the version of the assembler acting behind. As usual, the --version option prints the version string. $ as --version | head -n 1 GNU assembler (GNU Binutils for Ubuntu) 2.35.1 But, we do not have $(AS). So, we can add the -Wa prefix so that $(CC) passes --version down to the backing assembler. $ gcc -Wa,--version | head -n 1 gcc: fatal error: no input files compilation terminated. OK, we need to input something to satisfy gcc. $ gcc -Wa,--version -c -x assembler /dev/null -o /dev/null | head -n 1 GNU assembler (GNU Binutils for Ubuntu) 2.35.1 The combination of Clang and GNU assembler works in the same way: $ clang -no-integrated-as -Wa,--version -c -x assembler /dev/null -o /dev/null | head -n 1 GNU assembler (GNU Binutils for Ubuntu) 2.35.1 Clang with the integrated assembler fails like this: $ clang -integrated-as -Wa,--version -c -x assembler /dev/null -o /dev/null | head -n 1 clang: error: unsupported argument '--version' to option 'Wa,' For the last case, checking the error message is fragile. If the proposal for -Wa,--version support [1] is accepted, this may not be even an error in the future. One easy way is to check if -integrated-as is present in the passed arguments. We did not pass -integrated-as to CLANG_FLAGS before, but we can make it explicit. Nathan pointed out -integrated-as is the default for all of the architectures/targets that the kernel cares about, but it goes along with "explicit is better than implicit" policy. [2] With all this in my mind, I implemented scripts/as-version.sh to check the assembler version in Kconfig time. $ scripts/as-version.sh gcc GNU 23501 $ scripts/as-version.sh clang -no-integrated-as GNU 23501 $ scripts/as-version.sh clang -integrated-as LLVM 0 [1]: https://github.com/ClangBuiltLinux/linux/issues/1320 [2]: https://lore.kernel.org/linux-kbuild/20210307044253.v3h47ucq6ng25iay@archlinux-ax161/ Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor commit e24b3ffcf4216d819b52618b6f17ba7410d1d845 Author: Masahiro Yamada Date: Tue Mar 16 01:12:55 2021 +0900 kbuild: collect minimum tool versions into scripts/min-tool-version.sh The kernel build uses various tools, many of which are provided by the same software suite, for example, LLVM and Binutils. When you raise the minimum version of Clang/LLVM, you need to update clang_min_version in scripts/cc-version.sh and also lld_min_version in scripts/ld-version.sh. Kbuild can handle CC=clang and LD=ld.lld independently, but it does not make much sense to maintain their versions separately. Let's create a central place of minimum tool versions so you do not need to touch multiple files. scripts/min-tool-version.sh prints the minimum version of the given tool. Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor Acked-by: Miguel Ojeda Tested-by: Sedat Dilek commit 6e0839fda3f8598b164a7f23f3eec039e2db5fbc Author: Masahiro Yamada Date: Sun Mar 14 15:15:50 2021 +0900 kbuild: replace sed with $(subst ) or $(patsubst ) For simple text replacement, it is better to use a built-in function instead of sed if possible. You can save one process forking. I do not mean to replace all sed invocations because GNU Make itself does not support regular expression (unless you use guile). I just replaced simple ones. Signed-off-by: Masahiro Yamada commit 879a3209009fbbeb013a1d81952abcbe13918a13 Author: Bhaskar Chowdhury Date: Sun Mar 14 10:00:44 2021 +0530 docs: kbuild: Fix a typo in the file Kconfig.recursion-issue-02 s/sematics/semantics/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit eec08090bcc113643522d4272dc0b945045aba74 Author: Nathan Chancellor Date: Tue Mar 9 13:59:15 2021 -0700 Makefile: Only specify '--prefix=' when building with clang + GNU as When building with LLVM_IAS=1, there is no point to specifying '--prefix=' because that flag is only used to find GNU cross tools, which will not be used indirectly when using the integrated assembler. All of the tools are invoked directly from PATH or a full path specified via the command line, which does not depend on the value of '--prefix='. Sharing commands to reproduce issues becomes a little bit easier without a '--prefix=' value because that '--prefix=' value is specific to a user's machine due to it being an absolute path. Some further notes from Fangrui Song: clang can spawn GNU as (if -f?no-integrated-as is specified) and GNU objcopy (-f?no-integrated-as and -gsplit-dwarf and -g[123]). objcopy is only used for GNU as assembled object files. With integrated assembler, the object file streamer creates .o and .dwo simultaneously. With GNU as, two objcopy commands are needed to extract .debug*.dwo to .dwo files && another command to remove .debug*.dwo sections. A small consequence of this change (to keep things simple) is that '--prefix=' will always be specified now, even with a native build, when it was not before. This should not be an issue due to the way that the Makefile searches for the prefix (based on elfedit's location). This ends up improving the experience for host builds because PATH is better respected and matches GCC's behavior more closely. See the below thread for more details: https://lore.kernel.org/r/20210205213651.GA16907@Ryzen-5-4500U.localdomain/ Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada commit c91d4e47e10ee4d3163838b1b727fe1d0664115b Author: Nathan Chancellor Date: Tue Mar 9 13:59:14 2021 -0700 Makefile: Remove '--gcc-toolchain' flag This flag was originally added to allow clang to find the GNU cross tools in commit 785f11aa595b ("kbuild: Add better clang cross build support"). This flag was not enough to find the tools at times so '--prefix' was added to the list in commit ef8c4ed9db80 ("kbuild: allow to use GCC toolchain not in Clang search path") and improved upon in commit ca9b31f6bb9c ("Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation"). Now that '--prefix' specifies a full path and prefix, '--gcc-toolchain' serves no purpose because the kernel builds with '-nostdinc' and '-nostdlib'. This has been verified with self compiled LLVM 10.0.1 and LLVM 13.0.0 as well as a distribution version of LLVM 11.1.0 without binutils in the LLVM toolchain locations. Link: https://reviews.llvm.org/D97902 Signed-off-by: Nathan Chancellor Reviewed-by: Fangrui Song Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Tested-by: Sedat Dilek Signed-off-by: Masahiro Yamada commit a34e6d1e4a49035203819425694349caa004992a Author: Masahiro Yamada Date: Sat Mar 6 15:11:21 2021 +0900 kbuild: move $(strip ) to suffix-search definition Move $(strip ...) to the callee from the callers of suffix-search. It shortens the code slightly. Adding a space after a comma will not be a matter. I also dropped parentheses from single character variables. Signed-off-by: Masahiro Yamada commit a6601e01cd54838fc01e3c355476f67e7c887a67 Author: Masahiro Yamada Date: Sat Mar 6 15:11:20 2021 +0900 kbuild: rename multi-used-* to multi-obj-* I think multi-obj-* is clearer, and more consistent with real-obj-*. Rename as follows: multi-used-y -> multi-obj-y multi-used-m -> multi-obj-m multi-used -> multi-obj-ym Signed-off-by: Masahiro Yamada commit 0b956e204132ce3fe4221a062638bf83a30e6200 Author: Rasmus Villemoes Date: Fri Mar 5 11:02:12 2021 +0100 kbuild: apply fixdep logic to link-vmlinux.sh The patch adding CONFIG_VMLINUX_MAP revealed a small defect in the build system: link-vmlinux.sh takes decisions based on CONFIG_* options, but changing one of those does not always lead to vmlinux being linked again. For most of the CONFIG_* knobs referenced previously, this has probably been hidden by those knobs also affecting some object file, hence indirectly also vmlinux. But CONFIG_VMLINUX_MAP is only handled inside link-vmlinux.sh, and changing CONFIG_VMLINUX_MAP=n to CONFIG_VMLINUX_MAP=y does not cause the build system to re-link (and hence have vmlinux.map emitted). Since that map file is mostly a debugging aid, this is merely a nuisance which is easily worked around by just deleting vmlinux and building again. But one could imagine other (possibly future) CONFIG options that actually do affect the vmlinux binary but which are not captured through some object file dependency. To fix this, make link-vmlinux.sh emit a .vmlinux.d file in the same format as the dependency files generated by gcc, and apply the fixdep logic to that. I've tested that this correctly works with both in-tree and out-of-tree builds. Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada commit 5cc1247204616528b427e276c97c5bc4c9612347 Author: Rasmus Villemoes Date: Fri Mar 5 10:27:07 2021 +0100 kbuild: add CONFIG_VMLINUX_MAP expert option It can be quite useful to have ld emit a link map file, in order to debug or verify that special sections end up where they are supposed to, and to see what LD_DEAD_CODE_DATA_ELIMINATION manages to get rid of. The only reason I'm not just adding this unconditionally is that the .map file can be rather large (several MB), and that's a waste of space when one isn't interested in these things. Also make it depend on CONFIG_EXPERT. Signed-off-by: Rasmus Villemoes Signed-off-by: Masahiro Yamada commit 609bbb4de4f85b7ef45d81a88e6b7dfe3bf5ccea Author: Masahiro Yamada Date: Tue Mar 2 23:26:14 2021 +0900 kbuild: show warning if 'make headers_check' is used Since commit 7ecaf069da52 ("kbuild: move headers_check rule to usr/include/Makefile"), 'make headers_check' is no-op. This stub target is remaining here in case some scripts still invoke it. In order to prompt people to remove stale code, show a noisy warning message if used. The stub will be really removed after the Linux 5.15 release. Signed-off-by: Masahiro Yamada commit 805b2e1d427aab4bb27fa7c51ebb9db7547551b1 Author: Masahiro Yamada Date: Sun Feb 28 15:10:28 2021 +0900 kbuild: include Makefile.compiler only when compiler is needed Since commit f2f02ebd8f38 ("kbuild: improve cc-option to clean up all temporary files"), running 'make kernelversion' in a read-only source tree emits a bunch of warnings: mkdir: cannot create directory '.tmp_12345': Permission denied No-build targets such as kernelversion, clean, help, etc. do not need to evaluate $(call cc-option,) or friends. Skip Makefile.compiler so $(call cc-option,) becomes no-op. This not only fixes the warnings, but also runs non-build targets much faster. Basically, all installation targets should also be non-build targets. Unfortunately, vdso_install requires the compiler because it builds vdso before installation. This is a problem that must be fixed by a separate patch. Reported-by: Israel Tsadok Signed-off-by: Masahiro Yamada commit 57fd251c789647552d32d2fc51bedd4f90d70f9f Author: Masahiro Yamada Date: Sun Feb 28 15:10:27 2021 +0900 kbuild: split cc-option and friends to scripts/Makefile.compiler scripts/Kbuild.include is included everywhere, but macros such as cc-option are needed by build targets only. For example, when 'make clean' traverses the tree, it does not need to evaluate $(call cc-option,). Split cc-option, ld-option, etc. to scripts/Makefile.compiler, which is only included from the top Makefile and scripts/Makefile.build. Signed-off-by: Masahiro Yamada commit 765822e1569a37aab5e69736c52d4ad4a289eba6 Merge: 7c07012eb1be8 debf69cfd4c61 Author: Thomas Gleixner Date: Sat Apr 24 21:18:44 2021 +0200 Merge tag 'irqchip-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip and irqdomain updates from Marc Zyngier: New HW support: - New driver for the Nuvoton WPCM450 interrupt controller - New driver for the IDT 79rc3243x interrupt controller - Add support for interrupt trigger configuration to the MStar irqchip - Add more external interrupt support to the STM32 irqchip - Add new compatible strings for QCOM SC7280 to the qcom-pdc binding Fixes and cleanups: - Drop irq_create_strict_mappings() and irq_create_identity_mapping() from the irqdomain API, with cleanups in a couple of drivers - Fix nested NMI issue with spurious interrupts on GICv3 - Don't allow GICv4.1 vSGIs when the CPU doesn't support them - Various cleanups and minor fixes Link: https://lore.kernel.org/r/20210424094640.1731920-1-maz@kernel.org commit caa93d9bd2d7ca7ffe5a23df9f003b81721c8e1b Author: Fabio Estevam Date: Sat Apr 24 10:51:03 2021 -0300 usb: Fix up movement of USB core kerneldoc location Commit 855b35ea96c4 ("usb: common: move function's kerneldoc next to its definition") moved the USB common function documentation out of the linux/usb/ch9.h header file into drivers/usb/common/common.c and drivers/usb/common/debug.c, which causes the following 'make htmldocs' build warning: include/linux/usb/ch9.h:1: warning: no structured comments found Fix that up by pointing the documentation at the correct location. Fixes: 855b35ea96c4 ("usb: common: move function's kerneldoc next to its definition") Reported-by: Stephen Rothwell Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210424135103.2476670-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit 924e464f4a8a0bb9e011ed37342e7c23c1670dc2 Author: Erik Flodin Date: Tue Apr 20 21:12:00 2021 +0200 can: add a note that RECV_OWN_MSGS frames are subject to filtering Some parts of the documentation may lead the reader to think that the socket's own frames are always received when CAN_RAW_RECV_OWN_MSGS is enabled, but all frames are subject to filtering. As explained by Marc Kleine-Budde: On TX complete of a CAN frame it's pushed into the RX path of the networking stack, along with the information of the originating socket. Then the CAN frame is delivered into AF_CAN, where it is passed on to all registered receivers depending on filters. One receiver is the sending socket in CAN_RAW. Then in CAN_RAW the it is checked if the sending socket has RECV_OWN_MSGS enabled. Link: https://lore.kernel.org/r/20210420191212.42753-1-erik@flodin.me Signed-off-by: Erik Flodin Signed-off-by: Marc Kleine-Budde commit 1c9690dd308efd05e7f390c15bc4f26842822bf5 Author: Colin Ian King Date: Thu Apr 15 12:30:50 2021 +0100 can: etas_es58x: Fix a couple of spelling mistakes There are spelling mistakes in netdev_dbg and netdev_dbg messages, fix these. Link: https://lore.kernel.org/r/20210415113050.1942333-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Marc Kleine-Budde commit 2ce4fd5a0039b805a6716779e8669dd69a20ad60 Author: Colin Ian King Date: Thu Apr 15 09:47:23 2021 +0100 can: etas_es58x: Fix missing null check on netdev pointer There is an assignment to *netdev that is that can potentially be null but the null check is checking netdev and not *netdev as intended. Fix this by adding in the missing * operator. Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces") Link: https://lore.kernel.org/r/20210415084723.1807935-1-colin.king@canonical.com Addresses-Coverity: ("Dereference before null check") Signed-off-by: Colin Ian King Acked-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit debf69cfd4c618c7036a13cc4edd1faf87ce7d53 Author: Robert Hancock Date: Fri Apr 23 12:58:53 2021 -0600 irqchip/xilinx: Expose Kconfig option for Zynq/ZynqMP Previously the XILINX_INTC config option was hidden and only auto-selected on the MicroBlaze platform. However, this IP can also be used on the Zynq and ZynqMP platforms as a secondary cascaded controller. Allow this option to be user-enabled on those platforms. Signed-off-by: Robert Hancock Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210423185853.2556087-1-robert.hancock@calian.com commit f1b9acd3a5e800bb68e7b8abc5b56d01faf68bbc Author: Parav Pandit Date: Mon Mar 8 13:19:53 2021 +0200 net/mlx5: SF, Extend SF table for additional SF id range Extended the SF table to cover additioanl SF id range of external controller. A user optionallly provides the external controller number when user wants to create SF on the external controller. An example on eswitch system: $ devlink dev eswitch set pci/0033:01:00.0 mode switchdev $ devlink port show pci/0033:01:00.0/196607: type eth netdev enP51p1s0f0np0 flavour physical port 0 splittable false pci/0033:01:00.0/131072: type eth netdev eth0 flavour pcipf controller 1 pfnum 0 external true splittable false function: hw_addr 00:00:00:00:00:00 $ devlink port add pci/0033:01:00.0 flavour pcisf pfnum 0 sfnum 77 controller 1 pci/0033:01:00.0/163840: type eth netdev eth1 flavour pcisf controller 1 pfnum 0 sfnum 77 external true splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit a3088f87d984b3dddde3b3a3e453cef8033a0bd1 Author: Parav Pandit Date: Fri Mar 5 10:06:06 2021 +0200 net/mlx5: SF, Split mlx5_sf_hw_table into two parts Device has SF ids in two different contiguous ranges. One for the local controller and second for the external controller's PF. Each such range has its own maximum number of functions and base id. To allocate SF from either of the range, prepare code to split into range specific fields into its own structure. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 01ed9550e8b41e28f27a9ebf515e178fb5e3718b Author: Parav Pandit Date: Fri Mar 5 09:35:21 2021 +0200 net/mlx5: SF, Use helpers for allocation and free Use helper routines for SF id and SF table allocation and free so that subsequent patch can reuse it for multiple SF function id range. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 326c08a02034ada6586b55860e34c0f4695f62ec Author: Parav Pandit Date: Thu Mar 11 13:51:38 2021 +0200 net/mlx5: SF, Consider own vhca events of SF devices Vhca events on eswitch manager are received for all the functions on the NIC, including for SFs of external host PF controllers. While SF device handler is only interested in SF devices events related to its own PF. Hence, validate if the function belongs to self or not. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 7e6ccbc1878413b2a2dca717a1ae450eb19e1537 Author: Parav Pandit Date: Fri Mar 5 08:51:10 2021 +0200 net/mlx5: SF, Store and use start function id SF ids in the device are in two different contiguous ranges. One for the local controller and second for the external host controller. Prepare code to handle multiple start function id by storing it in the table. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit a1ab3e4554b5342b34845df452601ebd5a310d0a Author: Parav Pandit Date: Wed Mar 10 15:35:03 2021 +0200 devlink: Extend SF port attributes to have external attribute Extended SF port attributes to have optional external flag similar to PCI PF and VF port attributes. External atttibute is required to generate unique phys_port_name when PF number and SF number are overlapping between two controllers similar to SR-IOV VFs. When a SF is for external controller an example view of external SF port and config sequence. On eswitch system: $ devlink dev eswitch set pci/0033:01:00.0 mode switchdev $ devlink port show pci/0033:01:00.0/196607: type eth netdev enP51p1s0f0np0 flavour physical port 0 splittable false pci/0033:01:00.0/131072: type eth netdev eth0 flavour pcipf controller 1 pfnum 0 external true splittable false function: hw_addr 00:00:00:00:00:00 $ devlink port add pci/0033:01:00.0 flavour pcisf pfnum 0 sfnum 77 controller 1 pci/0033:01:00.0/163840: type eth netdev eth1 flavour pcisf controller 1 pfnum 0 sfnum 77 splittable false function: hw_addr 00:00:00:00:00:00 state inactive opstate detached phys_port_name construction: $ cat /sys/class/net/eth1/phys_port_name c1pf0sf77 Signed-off-by: Parav Pandit Reviewed-by: Jiri Pirko Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 1d7979352f9f0d32743528fb72425f4ff29efcb9 Author: Parav Pandit Date: Mon Mar 8 11:18:53 2021 +0200 net/mlx5: SF, Rely on hw table for SF devlink port allocation Supporting SF allocation is currently checked at two places: (a) SF devlink port allocator and (b) SF HW table handler. Both layers are using HCA CAP to identify it using helper routine mlx5_sf_supported() and mlx5_sf_max_functions(). Instead, rely on the HW table handler to check if SF is supported or not. Signed-off-by: Parav Pandit Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 87bd418ea7515d904a3dc69de2479396f5cbd7a4 Author: Parav Pandit Date: Tue Mar 2 14:20:21 2021 +0200 net/mlx5: E-Switch, Consider SF ports of host PF Query SF vports count and base id of host PF from the firmware. Account these ports in the total port calculation whenever it is non zero. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 47dd7e609f6957437b721af4d027737b63b217b8 Author: Parav Pandit Date: Fri Mar 19 05:21:31 2021 +0200 net/mlx5: E-Switch, Use xarray for vport number to vport and rep mapping Currently vport number to vport and its representor are mapped using an array and an index. Vport numbers of different types of functions are not contiguous. Adding new such discontiguous range using index and number mapping is increasingly complex and hard to maintain. Hence, maintain an xarray of vport and rep whose lookup is done based on the vport number. Each VF and SF entry is marked with a xarray mark to identify the function type. Additionally PF and VF needs special handling for legacy inline mode. They are additionally marked as host function using additional HOST_FN mark. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 9f8c7100c8f9879b7e972205cd1f33f0bc1cc8cb Author: Parav Pandit Date: Tue Mar 2 14:10:49 2021 +0200 net/mlx5: E-Switch, Prepare to return total vports from eswitch struct Total vports are already stored during eswitch initialization. Instead of calculating everytime, read directly from eswitch. Additionally, host PF's SF vport information is available using QUERY_HCA_CAP command. It is not available through HCA_CAP of the eswitch manager PF. Hence, this patch prepares the return total eswitch vport count from the existing eswitch struct. This further helps to keep eswitch port counting macros and logic within eswitch. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 06ec5acc7747f225154fcafaf2afe52324694baa Author: Parav Pandit Date: Tue Mar 2 13:54:42 2021 +0200 net/mlx5: E-Switch, Return eswitch max ports when eswitch is supported mlx5_eswitch_get_total_vports() doesn't honor MLX5_ESWICH Kconfig flag. When MLX5_ESWITCH is disabled, FS layer continues to initialize eswitch specific ACL namespaces. Instead, start honoring MLX5_ESWITCH flag and perform vport specific initialization only when vport count is non zero. Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed commit 350a62ca065be252ababc43a7c96f8aca390a18f Author: Tiezhu Yang Date: Fri Apr 23 09:23:30 2021 +0800 bpf: Document the pahole release info related to libbpf in bpf_devel_QA.rst pahole starts to use libbpf definitions and APIs since v1.13 after the commit 21507cd3e97b ("pahole: add libbpf as submodule under lib/bpf"). It works well with the git repository because the libbpf submodule will use "git submodule update --init --recursive" to update. Unfortunately, the default github release source code does not contain libbpf submodule source code and this will cause build issues, the tarball from https://git.kernel.org/pub/scm/devel/pahole/pahole.git/ is same with github, you can get the source tarball with corresponding libbpf submodule codes from https://fedorapeople.org/~acme/dwarves This change documents the above issues to give more information so that we can get the tarball from the right place, early discussion is here: https://lore.kernel.org/bpf/2de4aad5-fa9e-1c39-3c92-9bb9229d0966@loongson.cn/ Signed-off-by: Tiezhu Yang Signed-off-by: Alexei Starovoitov Reviewed-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/bpf/1619141010-12521-1-git-send-email-yangtiezhu@loongson.cn commit b2f0ca00e6b34bd57c9298a869ea133699e8ec39 Author: Radu Pirea (NXP OSS) Date: Fri Apr 23 18:00:50 2021 +0300 phy: nxp-c45-tja11xx: add interrupt support Added .config_intr and .handle_interrupt callbacks. Link event interrupt will trigger an interrupt every time when the link goes up or down. Signed-off-by: Radu Pirea (NXP OSS) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit cbbd21a47f83023665dff171a696d2af70c6e51e Author: Colin Ian King Date: Fri Apr 23 14:28:36 2021 +0100 net/atm: Fix spelling mistake "requed" -> "requeued" There is a spelling mistake in a printk message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit b881d089c7c9c7032da812cda1b4b0818f477780 Author: Po-Hsu Lin Date: Fri Apr 23 19:15:38 2021 +0800 selftests/net: bump timeout to 5 minutes We found that with the latest mainline kernel (5.12.0-051200rc8) on some KVM instances / bare-metal systems, the following tests will take longer than the kselftest framework default timeout (45 seconds) to run and thus got terminated with TIMEOUT error: * xfrm_policy.sh - took about 2m20s * pmtu.sh - took about 3m5s * udpgso_bench.sh - took about 60s Bump the timeout setting to 5 minutes to allow them have a chance to finish. https://bugs.launchpad.net/bugs/1856010 Signed-off-by: Po-Hsu Lin Signed-off-by: David S. Miller commit bd6e229f86c2c5210ccba80b3c71808135a3718a Merge: b1ce98c70eb99 df8aee6d6fa52 Author: David S. Miller Date: Fri Apr 23 14:06:32 2021 -0700 Merge branch 'mptcp-msg-flags' Mat Martineau says: ==================== mptcp: Compatibility with common msg flags These patches from the MPTCP tree handle some of the msg flags that are typically used with TCP, to make it easier to adapt userspace programs for use with MPTCP. Patches 1, 2, and 4 add support for MSG_ERRQUEUE (no-op for now), MSG_TRUNC, and MSG_PEEK on the receive side. Patch 3 ignores unsupported msg flags for send and receive. Patch 5 adds a selftest for MSG_PEEK. ==================== Signed-off-by: David S. Miller commit df8aee6d6fa520ff77f48d46ebd2034249669033 Author: Yonglong Li Date: Fri Apr 23 11:17:09 2021 -0700 selftests: mptcp: add a test case for MSG_PEEK Extend mptcp_connect tool with MSG_PEEK support and add a test case in mptcp_connect.sh that checks the data received from/after recv() with MSG_PEEK. Acked-by: Paolo Abeni Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Yonglong Li Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit ca4fb892579f110d3ab4865eb2aef36be7683a7c Author: Yonglong Li Date: Fri Apr 23 11:17:08 2021 -0700 mptcp: add MSG_PEEK support This patch adds support for MSG_PEEK flag. Packets are not removed from the receive_queue if MSG_PEEK set in recv() system call. Acked-by: Paolo Abeni Signed-off-by: Yonglong Li Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 987858e5d026d355535b34f17c6ceeb1d71ccf75 Author: Paolo Abeni Date: Fri Apr 23 11:17:07 2021 -0700 mptcp: ignore unsupported msg flags Currently mptcp_sendmsg() fails with EOPNOTSUPP if the user-space provides some unsupported flag. That is unexpected and may foul existing applications migrated to MPTCP, which expect a different behavior. Change the mentioned function to silently ignore the unsupported flags except MSG_FASTOPEN. This is the only flags currently not supported by MPTCP with user-space visible side-effects. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/162 Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d976092ce1b04d634d408f475224347cfae81201 Author: Paolo Abeni Date: Fri Apr 23 11:17:06 2021 -0700 mptcp: implement MSG_TRUNC support The mentioned flag is currently silenlty ignored. This change implements the TCP-like behaviour, dropping the pending data up to the specified length. Signed-off-by: Paolo Abeni Sigend-off-by: Mat Martineau Signed-off-by: David S. Miller commit cb9d80f4940ee5d4b7c7cad7418a6c893c6c4279 Author: Paolo Abeni Date: Fri Apr 23 11:17:05 2021 -0700 mptcp: implement dummy MSG_ERRQUEUE support mptcp_recvmsg() currently silently ignores MSG_ERRQUEUE, returning input data instead of error cmsg. This change provides a dummy implementation for MSG_ERRQUEUE - always returns no data. That is consistent with the current lack of a suitable IP_RECVERR setsockopt() support. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 7d3c10770603570081289511c8ce112696fb1d55 Merge: b1b9f535c48f5 a9dab4e456942 Author: Alexei Starovoitov Date: Fri Apr 23 14:05:28 2021 -0700 Merge branch 'BPF static linker: support externs' Andrii Nakryiko says: ==================== Add BPF static linker support for extern resolution of global variables, functions, and BTF-defined maps. This patch set consists of 4 parts: - few patches are extending bpftool to simplify working with BTF dump; - libbpf object loading logic is extended to support __hidden functions and overriden (unused) __weak functions; also BTF-defined map parsing logic is refactored to be re-used by linker; - the crux of the patch set is BPF static linker logic extension to perform extern resolution for three categories: global variables, BPF sub-programs, BTF-defined maps; - a set of selftests that validate that all the combinations of extern/weak/__hidden are working as expected. See respective patches for more details. One aspect hasn't been addressed yet and is going to be resolved in the next patch set, but is worth mentioning. With BPF static linking of multiple .o files, dealing with static everything becomes more problematic for BPF skeleton and in general for any by name look up APIs. This is due to static entities are allowed to have non-unique name. Historically this was never a problem due to BPF programs were always confined to a single C file. That changes now and needs to be addressed. The thinking so far is for BPF static linker to prepend filename to each static variable and static map (which is currently not supported by libbpf, btw), so that they can be unambiguously resolved by (mostly) unique name. Mostly, because even filenames can be duplicated, but that should be rare and easy to address by wiser choice of filenames by users. Fortunately, static BPF subprograms don't suffer from this issues, as they are not independent entities and are neither exposed in BPF skeleton, nor is lookup-able by any of libbpf APIs (and there is little reason to do that anyways). This and few other things will be the topic of the next set of patches. Some tests rely on Clang fix ([0]), so need latest Clang built from main. [0] https://reviews.llvm.org/D100362 v2->v3: - allow only STV_DEFAULT and STV_HIDDEN ELF symbol visibility (Yonghong); - update selftests' README for required Clang 13 fix dependency (Alexei); - comments, typos, slight code changes (Yonghong, Alexei); v1->v2: - make map externs support full attribute list, adjust linked_maps selftest to demonstrate that typedef works now (though no shared header file was added to simplicity sake) (Alexei); - remove commented out parts from selftests and fix few minor code style issues; - special __weak map definition semantics not yet implemented and will be addressed in a follow up. ==================== Signed-off-by: Alexei Starovoitov commit a9dab4e4569425e26cd9c2d8bdcc74bd12fcb8bf Author: Andrii Nakryiko Date: Fri Apr 23 11:13:48 2021 -0700 selftests/bpf: Document latest Clang fix expectations for linking tests Document which fixes are required to generate correct static linking selftests. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-19-andrii@kernel.org commit 3b2ad502256b7f0f9415978fd7f158656d11401e Author: Andrii Nakryiko Date: Fri Apr 23 11:13:47 2021 -0700 selftests/bpf: Add map linking selftest Add selftest validating various aspects of statically linking BTF-defined map definitions. Legacy map definitions do not support extern resolution between object files. Some of the aspects validated: - correct resolution of extern maps against concrete map definitions; - extern maps can currently only specify map type and key/value size and/or type information; - weak concrete map definitions are resolved properly. Static map definitions are not yet supported by libbpf, so they are not explicitly tested, though manual testing showes that BPF linker handles them properly. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-18-andrii@kernel.org commit 14f1aae17ee13d08315873d4b68d573e91df892f Author: Andrii Nakryiko Date: Fri Apr 23 11:13:46 2021 -0700 selftests/bpf: Add global variables linking selftest Add selftest validating various aspects of statically linking global variables: - correct resolution of extern variables across .bss, .data, and .rodata sections; - correct handling of weak definitions; - correct de-duplication of repeating special externs (.kconfig, .ksyms). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-17-andrii@kernel.org commit f2644fb44de9abd54e57b55f584c7c67526f7c02 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:45 2021 -0700 selftests/bpf: Add function linking selftest Add selftest validating various aspects of statically linking functions: - no conflicts and correct resolution for name-conflicting static funcs; - correct resolution of extern functions; - correct handling of weak functions, both resolution itself and libbpf's handling of unused weak function that "lost" (it leaves gaps in code with no ELF symbols); - correct handling of hidden visibility to turn global function into "static" for the purpose of BPF verification. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-16-andrii@kernel.org commit b131aed910097a2eeac8180bf3cf214eea475d9a Author: Andrii Nakryiko Date: Fri Apr 23 11:13:44 2021 -0700 selftests/bpf: Omit skeleton generation for multi-linked BPF object files Skip generating individual BPF skeletons for files that are supposed to be linked together to form the final BPF object file. Very often such files are "incomplete" BPF object files, which will fail libbpf bpf_object__open() step, if used individually, thus failing BPF skeleton generation. This is by design, so skip individual BPF skeletons and only validate them as part of their linked final BPF object file and skeleton. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-15-andrii@kernel.org commit 41c472e85b531a228067bee9be59a508900bcd9f Author: Andrii Nakryiko Date: Fri Apr 23 11:13:43 2021 -0700 selftests/bpf: Use -O0 instead of -Og in selftests builds While -Og is designed to work well with debugger, it's still inferior to -O0 in terms of debuggability experience. It will cause some variables to still be inlined, it will also prevent single-stepping some statements and otherwise interfere with debugging experience. So switch to -O0 which turns off any optimization and provides the best debugging experience. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-14-andrii@kernel.org commit 0a342457b3bd36e6f9b558da3ff520dee35c5363 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:42 2021 -0700 libbpf: Support extern resolution for BTF-defined maps in .maps section Add extra logic to handle map externs (only BTF-defined maps are supported for linking). Re-use the map parsing logic used during bpf_object__open(). Map externs are currently restricted to always match complete map definition. So all the specified attributes will be compared (down to pining, map_flags, numa_node, etc). In the future this restriction might be relaxed with no backwards compatibility issues. If any attribute is mismatched between extern and actual map definition, linker will report an error, pointing out which one mismatches. The original intent was to allow for extern to specify attributes that matters (to user) to enforce. E.g., if you specify just key information and omit value, then any value fits. Similarly, it should have been possible to enforce map_flags, pinning, and any other possible map attribute. Unfortunately, that means that multiple externs can be only partially overlapping with each other, which means linker would need to combine their type definitions to end up with the most restrictive and fullest map definition. This requires an extra amount of BTF manipulation which at this time was deemed unnecessary and would require further extending generic BTF writer APIs. So that is left for future follow ups, if there will be demand for that. But the idea seems intresting and useful, so I want to document it here. Weak definitions are also supported, but are pretty strict as well, just like externs: all weak map definitions have to match exactly. In the follow up patches this most probably will be relaxed, with __weak map definitions being able to differ between each other (with non-weak definition always winning, of course). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-13-andrii@kernel.org commit a46349227cd832b33c12f74b85712ea67de3c6c4 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:41 2021 -0700 libbpf: Add linker extern resolution support for functions and global variables Add BPF static linker logic to resolve extern variables and functions across multiple linked together BPF object files. For that, linker maintains a separate list of struct glob_sym structures, which keeps track of few pieces of metadata (is it extern or resolved global, is it a weak symbol, which ELF section it belongs to, etc) and ties together BTF type info and ELF symbol information and keeps them in sync. With adding support for extern variables/funcs, it's now possible for some sections to contain both extern and non-extern definitions. This means that some sections may start out as ephemeral (if only externs are present and thus there is not corresponding ELF section), but will be "upgraded" to actual ELF section as symbols are resolved or new non-extern definitions are appended. Additional care is taken to not duplicate extern entries in sections like .kconfig and .ksyms. Given libbpf requires BTF type to always be present for .kconfig/.ksym externs, linker extends this requirement to all the externs, even those that are supposed to be resolved during static linking and which won't be visible to libbpf. With BTF information always present, static linker will check not just ELF symbol matches, but entire BTF type signature match as well. That logic is stricter that BPF CO-RE checks. It probably should be re-used by .ksym resolution logic in libbpf as well, but that's left for follow up patches. To make it unnecessary to rewrite ELF symbols and minimize BTF type rewriting/removal, ELF symbols that correspond to externs initially will be updated in place once they are resolved. Similarly for BTF type info, VAR/FUNC and var_secinfo's (sec_vars in struct bpf_linker) are staying stable, but types they point to might get replaced when extern is resolved. This might leave some left-over types (even though we try to minimize this for common cases of having extern funcs with not argument names vs concrete function with names properly specified). That can be addresses later with a generic BTF garbage collection. That's left for a follow up as well. Given BTF type appending phase is separate from ELF symbol appending/resolution, special struct glob_sym->underlying_btf_id variable is used to communicate resolution and rewrite decisions. 0 means underlying_btf_id needs to be appended (it's not yet in final linker->btf), <0 values are used for temporary storage of source BTF type ID (not yet rewritten), so -glob_sym->underlying_btf_id is BTF type id in obj-btf. But by the end of linker_append_btf() phase, that underlying_btf_id will be remapped and will always be > 0. This is the uglies part of the whole process, but keeps the other parts much simpler due to stability of sec_var and VAR/FUNC types, as well as ELF symbol, so please keep that in mind while reviewing. BTF-defined maps require some extra custom logic and is addressed separate in the next patch, so that to keep this one smaller and easier to review. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-12-andrii@kernel.org commit 83a157279f2125ce1c4d6d93750440853746dff0 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:40 2021 -0700 libbpf: Tighten BTF type ID rewriting with error checking It should never fail, but if it does, it's better to know about this rather than end up with nonsensical type IDs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-11-andrii@kernel.org commit 386b1d241e1b975a239d33be836bc183a52ab18c Author: Andrii Nakryiko Date: Fri Apr 23 11:13:39 2021 -0700 libbpf: Extend sanity checking ELF symbols with externs validation Add logic to validate extern symbols, plus some other minor extra checks, like ELF symbol #0 validation, general symbol visibility and binding validations. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-10-andrii@kernel.org commit 42869d28527695a75346c988ceeedbba7e3880b7 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:38 2021 -0700 libbpf: Make few internal helpers available outside of libbpf.c Make skip_mods_and_typedefs(), btf_kind_str(), and btf_func_linkage() helpers available outside of libbpf.c, to be used by static linker code. Also do few cleanups (error code fixes, comment clean up, etc) that don't deserve their own commit. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-9-andrii@kernel.org commit beaa3711ada4e4a0c8e03a78fec72330185213bf Author: Andrii Nakryiko Date: Fri Apr 23 11:13:37 2021 -0700 libbpf: Factor out symtab and relos sanity checks Factor out logic for sanity checking SHT_SYMTAB and SHT_REL sections into separate sections. They are already quite extensive and are suffering from too deep indentation. Subsequent changes will extend SYMTAB sanity checking further, so it's better to factor each into a separate function. No functional changes are intended. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-8-andrii@kernel.org commit c7ef5ec9573f05535370d8716576263681cabec7 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:36 2021 -0700 libbpf: Refactor BTF map definition parsing Refactor BTF-defined maps parsing logic to allow it to be nicely reused by BPF static linker. Further, at least for BPF static linker, it's important to know which attributes of a BPF map were defined explicitly, so provide a bit set for each known portion of BTF map definition. This allows BPF static linker to do a simple check when dealing with extern map declarations. The same capabilities allow to distinguish attributes explicitly set to zero (e.g., __uint(max_entries, 0)) vs the case of not specifying it at all (no max_entries attribute at all). Libbpf is currently not utilizing that, but it could be useful for backwards compatibility reasons later. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-7-andrii@kernel.org commit 6245947c1b3c6783976e3af113bac30250d0a93e Author: Andrii Nakryiko Date: Fri Apr 23 11:13:35 2021 -0700 libbpf: Allow gaps in BPF program sections to support overriden weak functions Currently libbpf is very strict about parsing BPF program instruction sections. No gaps are allowed between sequential BPF programs within a given ELF section. Libbpf enforced that by keeping track of the next section offset that should start a new BPF (sub)program and cross-checks that by searching for a corresponding STT_FUNC ELF symbol. But this is too restrictive once we allow to have weak BPF programs and link together two or more BPF object files. In such case, some weak BPF programs might be "overridden" by either non-weak BPF program with the same name and signature, or even by another weak BPF program that just happened to be linked first. That, in turn, leaves BPF instructions of the "lost" BPF (sub)program intact, but there is no corresponding ELF symbol, because no one is going to be referencing it. Libbpf already correctly handles such cases in the sense that it won't append such dead code to actual BPF programs loaded into kernel. So the only change that needs to be done is to relax the logic of parsing BPF instruction sections. Instead of assuming next BPF (sub)program section offset, iterate available STT_FUNC ELF symbols to discover all available BPF subprograms and programs. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-6-andrii@kernel.org commit aea28a602fa19fb4fe66374030ab7e2c8ddf643e Author: Andrii Nakryiko Date: Fri Apr 23 11:13:34 2021 -0700 libbpf: Mark BPF subprogs with hidden visibility as static for BPF verifier Define __hidden helper macro in bpf_helpers.h, which is a short-hand for __attribute__((visibility("hidden"))). Add libbpf support to mark BPF subprograms marked with __hidden as static in BTF information to enforce BPF verifier's static function validation algorithm, which takes more information (caller's context) into account during a subprogram validation. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-5-andrii@kernel.org commit 0fec7a3cee1cf8e4f86ff563d229408ccbdc2d66 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:33 2021 -0700 libbpf: Suppress compiler warning when using SEC() macro with externs When used on externs SEC() macro will trigger compilation warning about inapplicable `__attribute__((used))`. That's expected for extern declarations, so suppress it with the corresponding _Pragma. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-4-andrii@kernel.org commit 5b438f01d7eb2dc9bec7cd79de881b5f155d9a71 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:32 2021 -0700 bpftool: Dump more info about DATASEC members Dump succinct information for each member of DATASEC: its kinds and name. This is extremely helpful to see at a quick glance what is inside each DATASEC of a given BTF. Without this, one has to jump around BTF data to just find out the name of a VAR or FUNC. DATASEC's var_secinfo member is special in that regard because it doesn't itself contain the name of the member, delegating that to the referenced VAR and FUNC kinds. Other kinds, like STRUCT/UNION/FUNC/ENUM, encode member names directly and thus are clearly identifiable in BTF dump. The new output looks like this: [35] DATASEC '.bss' size=0 vlen=6 type_id=8 offset=0 size=4 (VAR 'input_bss1') type_id=13 offset=0 size=4 (VAR 'input_bss_weak') type_id=16 offset=0 size=4 (VAR 'output_bss1') type_id=17 offset=0 size=4 (VAR 'output_data1') type_id=18 offset=0 size=4 (VAR 'output_rodata1') type_id=20 offset=0 size=8 (VAR 'output_sink1') [36] DATASEC '.data' size=0 vlen=2 type_id=9 offset=0 size=4 (VAR 'input_data1') type_id=14 offset=0 size=4 (VAR 'input_data_weak') [37] DATASEC '.kconfig' size=0 vlen=2 type_id=25 offset=0 size=4 (VAR 'LINUX_KERNEL_VERSION') type_id=28 offset=0 size=1 (VAR 'CONFIG_BPF_SYSCALL') [38] DATASEC '.ksyms' size=0 vlen=1 type_id=30 offset=0 size=1 (VAR 'bpf_link_fops') [39] DATASEC '.rodata' size=0 vlen=2 type_id=12 offset=0 size=4 (VAR 'input_rodata1') type_id=15 offset=0 size=4 (VAR 'input_rodata_weak') [40] DATASEC 'license' size=0 vlen=1 type_id=24 offset=0 size=4 (VAR 'LICENSE') Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-3-andrii@kernel.org commit 0dd7e456bb049ec2b5a9e00250918b346c0d17d5 Author: Andrii Nakryiko Date: Fri Apr 23 11:13:31 2021 -0700 bpftool: Support dumping BTF VAR's "extern" linkage Add dumping of "extern" linkage for BTF VAR kind. Also shorten "global-allocated" to "global" to be in line with FUNC's "global". Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210423181348.1801389-2-andrii@kernel.org commit b1ce98c70eb991e4b8521489dc74f446a25958b9 Merge: cbf2ec506c0b5 1f70dfc542e88 Author: David S. Miller Date: Fri Apr 23 14:04:43 2021 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 40GbE Intel Wired LAN Driver Updates 2021-04-23 This series contains updates to i40e and iavf drivers. Aleksandr adds support for VIRTCHNL_VF_CAP_ADV_LINK_SPEED in i40e which allows for reporting link speed to VF as a value instead of using an enum; helper functions are created to remove repeated code. Coiby Xu reduces memory use of i40e when using kdump by reducing Tx, Rx, and admin queue to minimum values. Current use causes failure of kdump. Stefan Assmann removes duplicated free calls in iavf. Haiyue cleans up a loop to return directly when if the value is found and changes some magic numbers to defines for better maintainability in iavf. ==================== Signed-off-by: David S. Miller commit 6477dd39e62c3a67cfa368ddc127410b4ae424c6 Author: Mat Martineau Date: Fri Apr 23 09:40:33 2021 -0700 mptcp: Retransmit DATA_FIN With this change, the MPTCP-level retransmission timer is used to resend DATA_FIN. The retranmit timer is not stopped while waiting for a MPTCP-level ACK of DATA_FIN, and retransmitted DATA_FINs are sent on all subflows. The retry interval starts at TCP_RTO_MIN and then doubles on each attempt, up to TCP_RTO_MAX. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/146 Fixes: 43b54c6ee382 ("mptcp: Use full MPTCP-level disconnect state machine") Acked-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit cbf2ec506c0b5226677aaf212e8b35f400777be5 Merge: e40fa65c79b59 1233898ab758c Author: David S. Miller Date: Fri Apr 23 14:01:28 2021 -0700 Merge branch 'mlxsw-selftest-fixes' Petr Machata says: ==================== selftests: mlxsw: Fixes This patch set carries fixes to selftest issues that we have hit in our nightly regression run. Almost all are in mlxsw selftests, though one is in a generic forwarding selftest. - In patch #1, in an ERSPAN test, install an FDB entry as static instead of (implicitly) as local. - In the mlxsw resource-scale test, an if statement overrides the value of $?, which is supposed to contain the result of the test. As a result, the resource scale test can spuriously pass. In patches #2 and #3, remove the if statements to fix the issue in, respectively, port_scale test and tc_flower_scale tests. - Again in the mlxsw resource-scale test, when more then one sub-test is run, a successful sub-test overrides any previous failures. This causes a spurious pass of the overall test. This is fixed in patch #4. - In patch #5, increase a tolerance in a mlxsw-specific RED backlog test. This test is very noisy, due to rounding errors and the unpredictability of software traffic generation. By bumping the tolerance from 5 % to 10, get the failure rate to zero. This shouldn't impact the accuracy, mistakes in backlog configuration (e.g. due to wrong cell size) are likely to cause a much larger discrepancy. - In patch #6, fix mausezahn invocation in the mlxsw ERSPAN scale test. The test failed because of the wrong invocation. ==================== Signed-off-by: David S. Miller commit 1233898ab758cbcf5f6fea10b8dd16a0b2c24fab Author: Petr Machata Date: Fri Apr 23 14:19:48 2021 +0200 selftests: mlxsw: Fix mausezahn invocation in ERSPAN scale test The mirror_gre_scale test creates as many ERSPAN sessions as the underlying chip supports, and tests that they all work. In order to determine that it issues a stream of ICMP packets and checks if they are mirrored as expected. However, the mausezahn invocation missed the -6 flag to identify the use of IPv6 protocol, and was sending ICMP messages over IPv6, as opposed to ICMP6. It also didn't pass an explicit source IP address, which apparently worked at some point in the past, but does not anymore. To fix these issues, extend the function mirror_test() in mirror_lib by detecting the IPv6 protocol addresses, and using a different ICMP scheme. Fix __mirror_gre_test() in the selftest itself to pass a source IP address. Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit dda7f4fa55839baeb72ae040aeaf9ccf89d3e416 Author: Petr Machata Date: Fri Apr 23 14:19:47 2021 +0200 selftests: mlxsw: Increase the tolerance of backlog buildup The intention behind this test is to make sure that qdisc limit is correctly projected to the HW. However, first, due to rounding in the qdisc, and then in the driver, the number cannot actually be accurate. And second, the approach to testing this is to oversubscribe the port with traffic generated on the same switch. The actual backlog size therefore fluctuates. In practice, this test proved to be noisier than the rest, and spuriously fails every now and then. Increase the tolerance to 10 % to avoid these issues. Signed-off-by: Petr Machata Acked-by: Jiri Pirko Signed-off-by: David S. Miller commit 059b18e21c631b0eb1668831ae99f4764fb8e7eb Author: Danielle Ratson Date: Fri Apr 23 14:19:46 2021 +0200 selftests: mlxsw: Return correct error code in resource scale tests Currently, the resource scale test checks a few cases, when the error code resets between the cases. So for example, if one case fails and the consecutive case passes, the error code eventually will fit the last test and will be 0. Save a new return code that will hold the 'or' return codes of all the cases, so the final return code will consider all the cases. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 1f1c92139e36223b89d8140f2b72f75e79baf8bd Author: Danielle Ratson Date: Fri Apr 23 14:19:45 2021 +0200 selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test Currently, the error return code of the failure condition is lost after using an if statement, so the test doesn't fail when it should. Remove the if statement that separates the condition and the error code check, so the test won't always pass. Fixes: abfce9e062021 ("selftests: mlxsw: Reduce running time using offload indication") Reported-by: Ido Schimmel Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit b6fc2f212108b3676f54d00a2c38e3bc36753980 Author: Danielle Ratson Date: Fri Apr 23 14:19:44 2021 +0200 selftests: mlxsw: Remove a redundant if statement in port_scale test Currently, the error return code of the failure condition is lost after using an if statement, so the test doesn't fail when it should. Remove the if statement that separates the condition and the error code check, so the test won't always pass. Fixes: 5154b1b826d9b ("selftests: mlxsw: Add a scale test for physical ports") Reported-by: Ido Schimmel Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit c8d0260cdd96fdccdef0509c4160e28a1012a5d7 Author: Petr Machata Date: Fri Apr 23 14:19:43 2021 +0200 selftests: net: mirror_gre_vlan_bridge_1q: Make an FDB entry static The FDB roaming test installs a destination MAC address on the wrong interface of an FDB database and tests whether the mirroring fails, because packets are sent to the wrong port. The test by mistake installs the FDB entry as local. This worked previously, because drivers were notified of local FDB entries in the same way as of static entries. However that has been fixed in the commit 6ab4c3117aec ("net: bridge: don't notify switchdev for local FDB addresses"), and local entries are not notified anymore. As a result, the HW is not reconfigured for the FDB roam, and mirroring keeps working, failing the test. To fix the issue, mark the FDB entry as static. Fixes: 9c7c8a82442c ("selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit e40fa65c79b59ef662bf3f9e81cc2236fb9581e3 Merge: 8f8590dd9b6ec 9382531ec63fc Author: David S. Miller Date: Fri Apr 23 13:58:25 2021 -0700 Merge tag 'wireless-drivers-next-2021-04-23' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.13 Third, and final, set of patches for v5.13. We got one more week before the merge window and this includes from that extra week. Smaller features to rtw88 and mt76, but mostly this contains fixes. rtw88 * 8822c: Add gap-k calibration to improve long range performance mt76 * parse rate power limits from DT * debugfs file to test firmware crash * debugfs to disable NAPI threaded mode ==================== Signed-off-by: David S. Miller commit 8f8590dd9b6ec232dab6f773b3b800c3f6e2a14a Merge: 7ce9c3d363ac1 55319eeb5bbcd Author: David S. Miller Date: Fri Apr 23 13:55:43 2021 -0700 Merge branch 'r8152-adjust-REALTEK_USB_DEVICE' Hayes Wang says: ==================== r8152: adjust REALTEK_USB_DEVICE Modify REALTEK_USB_DEVICE macro. ==================== Signed-off-by: David S. Miller commit 55319eeb5bbcd3c73366de92ff224bd62325a68d Author: Hayes Wang Date: Fri Apr 23 17:44:55 2021 +0800 r8152: redefine REALTEK_USB_DEVICE macro Redefine REALTEK_USB_DEVICE macro with USB_DEVICE_INTERFACE_CLASS and USB_DEVICE_AND_INTERFACE_INFO to simply the code. Although checkpatch.pl shows the following error, it is more readable. ERROR: Macros with complex values should be enclosed in parentheses Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit e7865ea51b0ba2b5eb793ea3ca701571b477674a Author: Hayes Wang Date: Fri Apr 23 17:44:54 2021 +0800 r8152: remove NCM mode from REALTEK_USB_DEVICE macro The RTL8156 support CDC NCM mode. And users could set the configuration of the USB device between vendor and NCM mode dynamically by themselves. That is, the driver doesn't need to set vendor mode from NCM mode. Fixes: 195aae321c82 ("r8152: support new chips") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 7ce9c3d363ac1af38fb7add7ef2db7e8509a5962 Author: Yangbo Lu Date: Fri Apr 23 17:33:55 2021 +0800 enetc: fix locking for one-step timestamping packet transfer The previous patch to support PTP Sync packet one-step timestamping described one-step timestamping packet handling logic as below in commit message: - Trasmit packet immediately if no other one in transfer, or queue to skb queue if there is already one in transfer. The test_and_set_bit_lock() is used here to lock and check state. - Start a work when complete transfer on hardware, to release the bit lock and to send one skb in skb queue if has. There was not problem of the description, but there was a mistake in implementation. The locking/test_and_set_bit_lock() should be put in enetc_start_xmit() which may be called by worker, rather than in enetc_xmit(). Otherwise, the worker calling enetc_start_xmit() after bit lock released is not able to lock again for transfer. Fixes: 7294380c5211 ("enetc: support PTP Sync packet one-step timestamping") Signed-off-by: Yangbo Lu Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit 7679f864a0b18aa6a6a870fb4f5169426ae1a3ef Merge: d02f304b4b60e 747b67088f8d3 Author: David S. Miller Date: Fri Apr 23 13:37:47 2021 -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 2021-04-23 1) The SPI flow key in struct flowi has no consumers, so remove it. From Florian Westphal. 2) Remove stray synchronize_rcu from xfrm_init. From Florian Westphal. 3) Use the new exit_pre hook to reset the netlink socket on net namespace destruction. From Florian Westphal. 4) Remove an unnecessary get_cpu() in ipcomp, that code is always called with BHs off. From Sabrina Dubroca. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit d02f304b4b60e4acd15bcf04c401cac1f7adf77c Merge: d90a94680bc0a 3bc8e0aff23be Author: David S. Miller Date: Fri Apr 23 13:31:58 2021 -0700 Merge branch 'mk_eth_soc_fixes-perf-improvements' Ilya Lipnitskiy says: ==================== mtk_eth_soc: fixes and performance improvements Most of these changes come from OpenWrt where they have been present and tested for months. First three patches are bug fixes. The rest are performance improvements. The last patch is a cleanup to use the iopoll.h macro for busy-waiting instead of a custom loop. v2: - Reverse christmas tree in "use iopoll.h macro for DMA init" - Use cond_resched() instead of iopoll.h macro in "reduce MDIO bus access latency" - Use napi_complete_done and rework NAPI callbacks in a new patch ==================== Signed-off-by: David S. Miller commit 3bc8e0aff23be0526af0dbc7973a8866a08d73f1 Author: Ilya Lipnitskiy Date: Thu Apr 22 22:21:08 2021 -0700 net: ethernet: mtk_eth_soc: use iopoll.h macro for DMA init Replace a tight busy-wait loop without a pause with a standard readx_poll_timeout_atomic routine with a 5 us poll period. Tested by booting a MT7621 device to ensure the driver initializes properly. Signed-off-by: Ilya Lipnitskiy Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit fa817272c37ef78e25dc14e4760ac78a7043a18a Author: Felix Fietkau Date: Thu Apr 22 22:21:07 2021 -0700 net: ethernet: mtk_eth_soc: set PPE flow hash as skb hash if present This improves GRO performance Signed-off-by: Felix Fietkau [Ilya: Use MTK_RXD4_FOE_ENTRY instead of GENMASK(13, 0)] Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit db2c7b353db3b3f71b55f9ff4627d8a786446fbe Author: Ilya Lipnitskiy Date: Thu Apr 22 22:21:06 2021 -0700 net: ethernet: mtk_eth_soc: rework NAPI callbacks Use napi_complete_done to communicate total TX and RX work done to NAPI. Count total RX work up instead of remaining work down for clarity. Remove unneeded local variables for clarity. Use do {} while instead of goto for clarity. Suggested-by: Jakub Kicinski Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 16769a8923fad5a5377253bcd76b0e0d64976c73 Author: Felix Fietkau Date: Thu Apr 22 22:21:05 2021 -0700 net: ethernet: mtk_eth_soc: reduce unnecessary interrupts Avoid rearming interrupt if napi_complete returns false Signed-off-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 816ac3e6e67bdd78d86226c6eb53619780750e92 Author: Felix Fietkau Date: Thu Apr 22 22:21:04 2021 -0700 net: ethernet: mtk_eth_soc: only read the full RX descriptor if DMA is done Uncached memory access is expensive, and there is no need to access all descriptor words if we can't process them anyway Signed-off-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 4e6bf609569c59b6bd6acf4a607c096cbd820d79 Author: Felix Fietkau Date: Thu Apr 22 22:21:03 2021 -0700 net: ethernet: mtk_eth_soc: cache HW pointer of last freed TX descriptor The value is only updated by the CPU, so it is cheaper to access from the ring data structure than from a hardware register. Signed-off-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit e9229ffd550b2d8c4997c67a501dbc3919fd4e26 Author: Felix Fietkau Date: Thu Apr 22 22:21:02 2021 -0700 net: ethernet: mtk_eth_soc: implement dynamic interrupt moderation Reduces the number of interrupts under load Signed-off-by: Felix Fietkau [Ilya: add documentation for new struct fields] Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 6b4423b258b91032c50a5efca15d3d9bb194ea1d Author: Felix Fietkau Date: Thu Apr 22 22:21:01 2021 -0700 net: ethernet: mtk_eth_soc: increase DMA ring sizes 256 descriptors is not enough for multi-gigabit traffic under load on MT7622. Bump it to 512 to improve performance. Signed-off-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 59555a8d0dd39bf60b7ca1ba5e7393d293f7398d Author: Felix Fietkau Date: Thu Apr 22 22:21:00 2021 -0700 net: ethernet: mtk_eth_soc: use larger burst size for QDMA TX Improves tx performance Signed-off-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 16ef670789b252b221700adc413497ed2f941d8a Author: Felix Fietkau Date: Thu Apr 22 22:20:59 2021 -0700 net: ethernet: mtk_eth_soc: remove unnecessary TX queue stops When running short on descriptors, only stop the queue for the netdev that tx was attempted for. By the time something tries to send on the other netdev, the ring might have some more room already. Signed-off-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 3630d519d7c3eab92567658690e44ffe0517d109 Author: Felix Fietkau Date: Thu Apr 22 22:20:58 2021 -0700 net: ethernet: mtk_eth_soc: reduce MDIO bus access latency usleep_range often ends up sleeping much longer than the 10-20us provided as a range here. This causes significant latency in mdio bus acceses, which easily adds multiple seconds to the boot time on MT7621 when polling DSA slave ports. Use cond_resched instead of usleep_range, since the MDIO access does not take much time Signed-off-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit c30c4a82739090a2de4a4e3f245355ea4fb3ec14 Author: Felix Fietkau Date: Thu Apr 22 22:20:57 2021 -0700 net: ethernet: mtk_eth_soc: use napi_consume_skb Should improve performance, since it can use bulk free Signed-off-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 787082ab9f7be4711e52f67c388535eda74a1269 Author: Ilya Lipnitskiy Date: Thu Apr 22 22:20:56 2021 -0700 net: ethernet: mtk_eth_soc: fix build_skb cleanup In case build_skb fails, call skb_free_frag on the correct pointer. Also update the DMA structures with the new mapping before exiting, because the mapping was successful Suggested-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 5196c417854942e218a59ec87bf7d414b3bd581e Author: Felix Fietkau Date: Thu Apr 22 22:20:55 2021 -0700 net: ethernet: mtk_eth_soc: unmap RX data before calling build_skb Since build_skb accesses the data area (for initializing shinfo), dma unmap needs to happen before that call Signed-off-by: Felix Fietkau [Ilya: split build_skb cleanup fix into a separate commit] Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit 3f57d8c40fea9b20543cab4da12f4680d2ef182c Author: Felix Fietkau Date: Thu Apr 22 22:20:54 2021 -0700 net: ethernet: mtk_eth_soc: fix RX VLAN offload The VLAN ID in the rx descriptor is only valid if the RX_DMA_VTAG bit is set. Fixes frames wrongly marked with VLAN tags. Signed-off-by: Felix Fietkau [Ilya: fix commit message] Signed-off-by: Ilya Lipnitskiy Signed-off-by: David S. Miller commit d13f048dd40e8577260cd43faea8ec9b77520197 Author: Phillip Potter Date: Fri Apr 23 00:49:45 2021 +0100 net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb Modify the header size check in geneve6_xmit_skb and geneve_xmit_skb to use pskb_inet_may_pull rather than pskb_network_may_pull. This fixes two kernel selftest failures introduced by the commit introducing the checks: IPv4 over geneve6: PMTU exceptions IPv4 over geneve6: PMTU exceptions - nexthop objects It does this by correctly accounting for the fact that IPv4 packets may transit over geneve IPv6 tunnels (and vice versa), and still fixes the uninit-value bug fixed by the original commit. Reported-by: kernel test robot Fixes: 6628ddfec758 ("net: geneve: check skb is large enough for IPv4/IPv6 header") Suggested-by: Sabrina Dubroca Signed-off-by: Phillip Potter Acked-by: Sabrina Dubroca Signed-off-by: David S. Miller commit d90a94680bc0a8069d93282bc5f2966d00b9c4a4 Author: Dexuan Cui Date: Thu Apr 22 13:08:16 2021 -0700 net: mana: Use int to check the return value of mana_gd_poll_cq() mana_gd_poll_cq() may return -1 if an overflow error is detected (this should never happen unless there is a bug in the driver or the hardware). Fix the type of the variable "comp_read" by using int rather than u32. Reported-by: Dan Carpenter Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)") Signed-off-by: Dexuan Cui Signed-off-by: David S. Miller commit f80bd740cb7c954791279590b2e810ba6c214e52 Author: Xuan Zhuo Date: Thu Apr 22 23:16:20 2021 +0800 virtio-net: fix use-after-free in skb_gro_receive When "headroom" > 0, the actual allocated memory space is the entire page, so the address of the page should be used when passing it to build_skb(). BUG: KASAN: use-after-free in skb_gro_receive (net/core/skbuff.c:4260) Write of size 16 at addr ffff88811619fffc by task kworker/u9:0/534 CPU: 2 PID: 534 Comm: kworker/u9:0 Not tainted 5.12.0-rc7-custom-16372-gb150be05b806 #3382 Hardware name: QEMU MSN2700, BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: xprtiod xs_stream_data_receive_workfn [sunrpc] Call Trace: dump_stack (lib/dump_stack.c:122) print_address_description.constprop.0 (mm/kasan/report.c:233) kasan_report.cold (mm/kasan/report.c:400 mm/kasan/report.c:416) skb_gro_receive (net/core/skbuff.c:4260) tcp_gro_receive (net/ipv4/tcp_offload.c:266 (discriminator 1)) tcp4_gro_receive (net/ipv4/tcp_offload.c:316) inet_gro_receive (net/ipv4/af_inet.c:1545 (discriminator 2)) dev_gro_receive (net/core/dev.c:6075) napi_gro_receive (net/core/dev.c:6168 net/core/dev.c:6198) receive_buf (drivers/net/virtio_net.c:1151) virtio_net virtnet_poll (drivers/net/virtio_net.c:1415 drivers/net/virtio_net.c:1519) virtio_net __napi_poll (net/core/dev.c:6964) net_rx_action (net/core/dev.c:7033 net/core/dev.c:7118) __do_softirq (./arch/x86/include/asm/jump_label.h:25 ./include/linux/jump_label.h:200 ./include/trace/events/irq.h:142 kernel/softirq.c:346) irq_exit_rcu (kernel/softirq.c:221 kernel/softirq.c:422 kernel/softirq.c:434) common_interrupt (arch/x86/kernel/irq.c:240 (discriminator 14)) Fixes: fb32856b16ad ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom") Signed-off-by: Xuan Zhuo Reported-by: Ido Schimmel Tested-by: Ido Schimmel Acked-by: Jason Wang Signed-off-by: David S. Miller commit ed744d819379ddeec5744b0bfc7eb6d0a8ac4e46 Author: Tonghao Zhang Date: Thu Apr 22 21:41:51 2021 +0800 net: sock: remove the unnecessary check in proto_register tw_prot_cleanup will check the twsk_prot. Fixes: 0f5907af3913 ("net: Fix potential memory leak in proto_register()") Cc: Miaohe Lin Signed-off-by: Tonghao Zhang Signed-off-by: David S. Miller commit 7d742b509dd773f6ae2f32ffe3d2c0f3ea598a6d Author: Ilya Maximets Date: Wed Apr 21 15:57:47 2021 +0200 openvswitch: meter: remove rate from the bucket size calculation Implementation of meters supposed to be a classic token bucket with 2 typical parameters: rate and burst size. Burst size in this schema is the maximum number of bytes/packets that could pass without being rate limited. Recent changes to userspace datapath made meter implementation to be in line with the kernel one, and this uncovered several issues. The main problem is that maximum bucket size for unknown reason accounts not only burst size, but also the numerical value of rate. This creates a lot of confusion around behavior of meters. For example, if rate is configured as 1000 pps and burst size set to 1, this should mean that meter will tolerate bursts of 1 packet at most, i.e. not a single packet above the rate should pass the meter. However, current implementation calculates maximum bucket size as (rate + burst size), so the effective bucket size will be 1001. This means that first 1000 packets will not be rate limited and average rate might be twice as high as the configured rate. This also makes it practically impossible to configure meter that will have burst size lower than the rate, which might be a desirable configuration if the rate is high. Inability to configure low values of a burst size and overall inability for a user to predict what will be a maximum and average rate from the configured parameters of a meter without looking at the OVS and kernel code might be also classified as a security issue, because drop meters are frequently used as a way of protection from DoS attacks. This change removes rate from the calculation of a bucket size, making it in line with the classic token bucket algorithm and essentially making the rate and burst tolerance being predictable from a users' perspective. Same change proposed for the userspace implementation. Fixes: 96fbc13d7e77 ("openvswitch: Add meter infrastructure") Signed-off-by: Ilya Maximets Signed-off-by: David S. Miller commit 4dd1c95306980c997b9a32e72877e060c25dc6f3 Merge: 0bbefa641a324 f80505fdff771 Author: Mark Brown Date: Fri Apr 23 19:01:23 2021 +0100 Merge remote-tracking branch 'regulator/for-5.13' into regulator-next commit 0bbefa641a324b5416a88189069ff5a30975970c Merge: bf05bf16c76bb a5ccccb3ec0b0 Author: Mark Brown Date: Fri Apr 23 19:01:21 2021 +0100 Merge remote-tracking branch 'regulator/for-5.12' into regulator-linus commit ffc9841d5200a484ea0ecc645157b4d7b873f3a6 Merge: d143a69fd452a 25c4a9b614f10 Author: Mark Brown Date: Fri Apr 23 19:01:02 2021 +0100 Merge remote-tracking branch 'asoc/for-5.13' into asoc-next commit d143a69fd452a047440391fcbe290ff416b14ab5 Merge: bf05bf16c76bb a89f3a93cd20f Author: Mark Brown Date: Fri Apr 23 19:01:00 2021 +0100 Merge remote-tracking branch 'asoc/for-5.12' into asoc-linus commit a16104617d212d4b482568847b25172972b87e60 Author: Dave Jiang Date: Tue Apr 20 12:00:34 2021 -0700 dmaengine: idxd: remove MSIX masking for interrupt handlers Remove interrupt masking and just let the hard irq handler keep firing for new events. This is less of a performance impact vs the MMIO readback inside the pci_msi_{mask,unmas}_irq(). Especially with a loaded system those flushes can be stuck behind large amounts of MMIO writes to flush. When guest kernel is running on top of VFIO mdev, mask/unmask causes a vmexit each time and is not desirable. Suggested-by: Dan Williams Signed-off-by: Dave Jiang Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/161894523436.3210025.1834640110556139277.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 53b2ee7f637c4f1fa2f50dbdb210088e30c11d2b Author: Dave Jiang Date: Tue Apr 20 12:00:56 2021 -0700 dmaengine: idxd: device cmd should use dedicated lock Create a dedicated lock for device command operations. Put the device command operation under finer grained locking instead of using the idxd->dev_lock. Suggested-by: Sanjay Kumar Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161894525685.3210132.16160045731436382560.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 5b0c68c473a131c2acb21abad44b0047b200e185 Author: Dave Jiang Date: Tue Apr 20 11:46:51 2021 -0700 dmaengine: idxd: support reporting of halt interrupt Unmask the halt error interrupt so it gets reported to the interrupt handler. When halt state interrupt is received, quiesce the kernel WQs and unmap the portals to stop submission. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161894441167.3202472.9485946398140619501.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit cf5f86a7d47df149857ba2fb72f9c6c9da46af2e Author: Dave Jiang Date: Tue Apr 20 11:46:46 2021 -0700 dmaengine: idxd: enable SVA feature for IOMMU Enable IOMMU_DEV_FEAT_SVA before attempt to bind pasid. This is needed according to iommu_sva_bind_device() comment. Currently Intel IOMMU code does this before bind call. It really needs to be controlled by the driver. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161894440621.3202472.17644507396206848134.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 8241571fac9eeb7f3424ad343369eaa411919da3 Author: Dave Jiang Date: Tue Apr 20 11:46:40 2021 -0700 dmaengine: idxd: convert sprintf() to sysfs_emit() for all usages Convert sprintf() to sysfs_emit() in order to check buffer overrun on sysfs outputs. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161894440044.3202472.13926639619695319753.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit eb15e7154fbfa3e61c777704b2ff28eb3a0d4796 Author: Dave Jiang Date: Tue Apr 20 11:46:34 2021 -0700 dmaengine: idxd: add interrupt handle request and release support DSA spec states that when Request Interrupt Handle and Release Interrupt Handle command bits are set in the CMDCAP register, these device commands must be supported by the driver. The interrupt handle is programmed in a descriptor. When Request Interrupt Handle is not supported, the interrupt handle is the index of the desired entry in the MSI-X table. When the command is supported, driver must use the command to obtain a handle to be programmed in the submitted descriptor. A requested handle may be revoked. After the handle is revoked, any use of the handle will result in Invalid Interrupt Handle error. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161894439422.3202472.17579543737810265471.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 8c66bbdc4fbf3c297ebc8edf71f359e4a132c9db Author: Dave Jiang Date: Tue Apr 20 11:46:28 2021 -0700 dmaengine: idxd: add support for readonly config mode The read-only configuration mode is defined by the DSA spec as a mode of the device WQ configuration. When GENCAP register bit 31 is set to 0, the device is in RO mode and group configuration and some fields of the workqueue configuration registers are read-only and reflect the fixed configuration of the device. Add support for RO mode. The driver will load the values from the registers directly setup all the internally cached data structures based on the device configuration. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161894438847.3202472.6317563824045432727.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 93a40a6d7428921897bb7fed5ffb4ce83df05432 Author: Dave Jiang Date: Tue Apr 20 11:46:22 2021 -0700 dmaengine: idxd: add percpu_ref to descriptor submission path Current submission path has no way to restrict the submitter from stop submiting on shutdown path or wq disable path. This provides a way to quiesce the submission path. Modeling after 'struct reqeust_queue' usage of percpu_ref. One of the abilities of per_cpu reference counting is the ability to stop new references from being taken while awaiting outstanding references to be dropped. On wq shutdown, we want to block any new submissions to the kernel workqueue and quiesce before disabling. The percpu_ref allows us to block any new submissions and wait for any current submission calls to finish submitting to the workqueue. A percpu_ref is embedded in each idxd_wq context to allow control for individual wq. The wq->wq_active counter is elevated before calling movdir64b() or enqcmds() to submit a descriptor to the wq and dropped once the submission call completes. The function is gated by percpu_ref_tryget_live(). On shutdown with percpu_ref_kill() called, any new submission would be blocked from acquiring a ref and failed. Once all references are dropped for the wq, shutdown can continue. Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161894438293.3202472.14894701611500822232.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit e7882cd7aebe0696fbe178df1f30257e5729fdda Author: Alexey Klimov Date: Thu Apr 22 00:41:56 2021 +0100 platform/x86: gigabyte-wmi: add support for B550M AORUS PRO-P From: Alexey Klimov Add the B550M AORUS PRO-P motherboard description to gigabyte_wmi_known_working_platforms. Signed-off-by: Alexey Klimov Acked-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20210421234156.3942343-1-aklimov@redhat.com Signed-off-by: Hans de Goede commit 25c4a9b614f101bb9f3e687960815db7dc439c0f Author: Mark Brown Date: Fri Apr 23 18:07:54 2021 +0100 ASoC: simple-card: Fix breakage on kontron-sl28-var3-ads2 A KernelCI bisection identified 59c35c44a9cf89 "ASoC: simple-card: add simple_parse_node()" as causing simple-card to fail to instantiate on kontron-sl28-var3-ads2 systems. Since the merge window is expected to open over the weekend drop that commit and subsequent ones which depend on it for now in case other systems are affected too. The boot log showed the error as: <4>[ 9.948821] sysfs: cannot create duplicate filename '/devices/platform/sound/(null)-wm8904-hifi' (backtrace) <3>[ 10.191982] kobject_add_internal failed for (null)-wm8904-hifi with -EEXIST, don't try to register things with the same name in the same directory. The dropped commits are: 73371bacf0475a20ab6 "ASoC: audio-graph: tidyup graph_dai_link_of_dpcm()" 434392271afcff350fe "ASoC: simple-card: add simple_link_init()" 59c35c44a9cf89a83a9 "ASoC: simple-card: add simple_parse_node()" Reported-by: Guillaume Tucker Reported-by: "kernelci.org bot" Signed-off-by: Mark Brown commit 8035e6c66a5e98f098edf7441667de74affb4e78 Author: Uwe Kleine-König Date: Tue Apr 20 11:51:18 2021 +0200 pwm: atmel: Improve duty cycle calculation in .apply() In the calculation of the register value determining the duty cycle the requested period is used instead of the actually implemented period which results in suboptimal settings. The following example assumes an input clock of 133333333 Hz on one of the SoCs with 16 bit period. When the following state is to be applied: .period = 414727681 .duty_cycle = 652806 the following register values used to be calculated: PRES = 10 CPRD = 54000 CDTY = 53916 which yields an actual duty cycle of a bit more than 645120 ns. The setting PRES = 10 CPRD = 54000 CDTY = 53915 however yields a duty of 652800 ns which is between the current result and the requested value and so is a better approximation. The reason for this error is that for the calculation of CDTY the requested period was used instead of the actually implemented one. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 453e8b3d8e36ddcb283b3d1698864a03ea45599a Author: Uwe Kleine-König Date: Tue Apr 20 11:51:17 2021 +0200 pwm: atmel: Fix duty cycle calculation in .get_state() The CDTY register contains the number of inactive cycles. .apply() does this correctly, however .get_state() got this wrong. Fixes: 651b510a74d4 ("pwm: atmel: Implement .get_state()") Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 721b595744f199c185fbcefaa6e7e5cea9da1941 Author: Nobuhiro Iwamatsu Date: Mon Apr 19 09:00:07 2021 +0900 pwm: visconti: Add Toshiba Visconti SoC PWM support Add driver for the PWM controller on Toshiba Visconti ARM SoC. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Uwe Kleine-König [thierry.reding@gmail.com: fix up a couple of checkpatch warnings] Signed-off-by: Thierry Reding commit 2a20b08f06e70860272bc7f52b5423c1b2f06696 Author: Marc Zyngier Date: Wed Apr 21 17:43:17 2021 +0100 ACPI: irq: Prevent unregistering of GIC SGIs When using ACPI on arm64, which implies the GIC IRQ model, no table should ever provide a GSI number in the range [0:15], as these are reserved for IPIs. However, drivers tend to call acpi_unregister_gsi() with any random GSI number provided by half baked tables, which results in an exploding kernel when its IPIs have been unconfigured. In order to catch this, check for the silly case early, warn that something is going wrong and avoid the above disaster. Signed-off-by: Marc Zyngier Reviewed-by: Sudeep Holla Tested-by: dann frazier Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Reviewed-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20210421164317.1718831-3-maz@kernel.org Signed-off-by: Catalin Marinas commit 1ecd5b129252249b9bc03d7645a7bda512747277 Author: Marc Zyngier Date: Wed Apr 21 17:43:16 2021 +0100 ACPI: GTDT: Don't corrupt interrupt mappings on watchdow probe failure When failing the driver probe because of invalid firmware properties, the GTDT driver unmaps the interrupt that it mapped earlier. However, it never checks whether the mapping of the interrupt actially succeeded. Even more, should the firmware report an illegal interrupt number that overlaps with the GIC SGI range, this can result in an IPI being unmapped, and subsequent fireworks (as reported by Dann Frazier). Rework the driver to have a slightly saner behaviour and actually check whether the interrupt has been mapped before unmapping things. Reported-by: dann frazier Fixes: ca9ae5ec4ef0 ("acpi/arm64: Add SBSA Generic Watchdog support in GTDT driver") Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/YH87dtTfwYgavusz@xps13.dannf Cc: Cc: Fu Wei Reviewed-by: Sudeep Holla Tested-by: dann frazier Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Reviewed-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20210421164317.1718831-2-maz@kernel.org Signed-off-by: Catalin Marinas commit 0bca3ec846d7a9ea5bddc3b5ab55f6968e690a84 Author: Matthew Wilcox (Oracle) Date: Tue Apr 20 18:22:45 2021 +0100 arm64: Show three registers per line Displaying two registers per line takes 15 lines. That improves to just 10 lines if we display three registers per line, which reduces the amount of information lost when oopses are cut off. It stays within 80 columns and matches x86-64. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Kees Cook Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210420172245.3679077-1-willy@infradead.org Signed-off-by: Catalin Marinas commit b1b9f535c48f5c20a0f6c218c11199b64347c0a6 Merge: e7a1c1300891d a8fad73e33341 Author: Alexei Starovoitov Date: Fri Apr 23 09:58:22 2021 -0700 Merge branch 'Simplify bpf_snprintf verifier code' Florent Revest says: ==================== Alexei requested a couple of cleanups to the bpf_snprintf and ARG_PTR_TO_CONST_STR verifier code. https://lore.kernel.org/bpf/CABRcYmL_SMT80UTyV98bRsOzW0wBd1sZcYUpTrcOAV+9m+YoWQ@mail.gmail.com/T/#t ==================== Signed-off-by: Alexei Starovoitov commit a8fad73e3334151196acb28c4dcde37732c82542 Author: Florent Revest Date: Fri Apr 23 01:55:43 2021 +0200 bpf: Remove unnecessary map checks for ARG_PTR_TO_CONST_STR reg->type is enforced by check_reg_type() and map should never be NULL (it would already have been dereferenced anyway) so these checks are unnecessary. Reported-by: Alexei Starovoitov Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210422235543.4007694-3-revest@chromium.org commit 8e8ee109b02c0e90021d63cd20dd0157c021f7a4 Author: Florent Revest Date: Fri Apr 23 01:55:42 2021 +0200 bpf: Notify user if we ever hit a bpf_snprintf verifier bug In check_bpf_snprintf_call(), a map_direct_value_addr() of the fmt map should never fail because it has already been checked by ARG_PTR_TO_CONST_STR. But if it ever fails, it's better to error out with an explicit debug message rather than silently fail. Reported-by: Alexei Starovoitov Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210422235543.4007694-2-revest@chromium.org commit b8417f7237655907df263db7f9fe5ebdf13917b6 Merge: 87d9ad028975e 2417b9869b818 Author: Jens Axboe Date: Fri Apr 23 10:56:31 2021 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.13/drivers Pull MD fixes from Song. * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/raid1: properly indicate failure when ending a failed write request md-cluster: fix use-after-free issue when removing rdev commit b0221e706cd7da74ee0aa557690f9ccfaf45bd53 Author: Nobuhiro Iwamatsu Date: Mon Apr 19 09:00:06 2021 +0900 dt-bindings: pwm: Add bindings for Toshiba Visconti PWM Controller Add bindings for the Toshiba Visconti PWM Controller. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Rob Herring Signed-off-by: Thierry Reding commit ba0d527be46f692463a4d94f840cc2b022169de2 Author: Johan Jonker Date: Mon Apr 12 22:01:55 2021 +0200 arm64: dts: rockchip: Remove clock-names from PWM nodes A test with the command below gives this error: /arch/arm64/boot/dts/rockchip/rk3368-evb-act8846.dt.yaml: pwm@ff680030: clock-names: ['pwm'] is too short Devices with only one PWM clock use it to both to derive the functional clock for the device and as the bus clock. The driver does not need "clock-names" to get a handle, so remove them all. make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml Signed-off-by: Johan Jonker Acked-by: Heiko Stuebner Signed-off-by: Thierry Reding commit 201fe12e7bb324da9fb5cfc2a1b89e7b45caf54d Author: Johan Jonker Date: Mon Apr 12 22:01:54 2021 +0200 ARM: dts: rockchip: Remove clock-names from PWM nodes A test with the command below gives this error: /arch/arm/boot/dts/rk3036-evb.dt.yaml: pwm@20050030: clock-names: ['pwm'] is too short Devices with only one PWM clock use it to both to derive the functional clock for the device and as the bus clock. The driver does not need "clock-names" to get a handle, so remove them all. make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/pwm/pwm-rockchip.yaml Signed-off-by: Johan Jonker Acked-by: Heiko Stuebner Signed-off-by: Thierry Reding commit 78e7da2c1058c9b31ad1c704814b86120d96bdc4 Author: Johan Jonker Date: Mon Apr 12 22:01:53 2021 +0200 dt-bindings: pwm: rockchip: Add more compatible strings The compatible strings below are already in use in the Rockchip DTSI files, but were somehow never added to a document, so add "rockchip,rk3328-pwm" "rockchip,rk3036-pwm", "rockchip,rk2928-pwm" "rockchip,rk3368-pwm", "rockchip,rk3288-pwm" "rockchip,rk3399-pwm", "rockchip,rk3288-pwm" "rockchip,px30-pwm", "rockchip,rk3328-pwm" "rockchip,rk3308-pwm", "rockchip,rk3328-pwm" for PWM nodes to pwm-rockchip.yaml. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Acked-by: Heiko Stuebner Signed-off-by: Thierry Reding commit a331099332957d30bce249182c8b66a57e439bae Author: Johan Jonker Date: Mon Apr 12 22:01:52 2021 +0200 dt-bindings: pwm: Convert pwm-rockchip.txt to YAML Current dts files with 'pwm' nodes are manually verified. In order to automate this process pwm-rockchip.txt has to be converted to YAML. Signed-off-by: Johan Jonker Reviewed-by: Rob Herring Acked-by: Heiko Stuebner Signed-off-by: Thierry Reding commit 0b638f5032849d701167764de38df80cbf825cc6 Author: Jiapeng Chong Date: Thu Apr 15 16:35:53 2021 +0800 pwm: mediatek: Remove unused function Fix the following clang warning: drivers/pwm/pwm-mediatek.c:110:19: warning: unused function 'pwm_mediatek_readl' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 9e6fd830abcae958f3a3465e511a6e5600a005f5 Author: Clemens Gruber Date: Thu Apr 15 14:14:50 2021 +0200 pwm: pca9685: Improve runtime PM behavior The chip does not come out of POR in active state but in sleep state. To be sure (in case the bootloader woke it up) we force it to sleep in probe. If runtime PM is disabled, we instead wake the chip in .probe and put it to sleep in .remove. Signed-off-by: Clemens Gruber Signed-off-by: Thierry Reding commit 8f4768a56b673cbff3f24cf7b1784852c0f572d1 Author: Clemens Gruber Date: Thu Apr 15 14:14:49 2021 +0200 pwm: pca9685: Support hardware readout Implement .get_state to read-out the current hardware state. The hardware readout may return slightly different values than those that were set in apply due to the limited range of possible prescale and counter register values. Also note that although the datasheet mentions 200 Hz as default frequency when using the internal 25 MHz oscillator, the calculated period from the default prescaler register setting of 30 is 5079040ns. Signed-off-by: Clemens Gruber Reviewed-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 9af1fba33b5751d71c0e6727a875b9fd7d8a99de Author: Clemens Gruber Date: Thu Apr 15 14:14:48 2021 +0200 pwm: pca9685: Switch to atomic API The switch to the atomic API goes hand in hand with a few fixes to previously experienced issues: - The duty cycle is no longer lost after disable/enable (previously the OFF registers were cleared in disable and the user was required to call config to restore the duty cycle settings) - If one sets a period resulting in the same prescale register value, the sleep and write to the register is now skipped - Previously, only the full ON bit was toggled in GPIO mode (and full OFF cleared if set to high), which could result in both full OFF and full ON not being set and on=0, off=0, which is not allowed according to the datasheet - The OFF registers were reset to 0 in probe, which could lead to the forbidden on=0, off=0. Fixed by resetting to POR default (full OFF) Signed-off-by: Clemens Gruber Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 2417b9869b81882ab90fd5ed1081a1cb2d4db1dd Author: Paul Clements Date: Thu Apr 15 17:17:57 2021 -0400 md/raid1: properly indicate failure when ending a failed write request This patch addresses a data corruption bug in raid1 arrays using bitmaps. Without this fix, the bitmap bits for the failed I/O end up being cleared. Since we are in the failure leg of raid1_end_write_request, the request either needs to be retried (R1BIO_WriteError) or failed (R1BIO_Degraded). Fixes: eeba6809d8d5 ("md/raid1: end bio when the device faulty") Cc: stable@vger.kernel.org # v5.2+ Signed-off-by: Paul Clements Signed-off-by: Song Liu commit f7c7a2f9a23e5b6e0f5251f29648d0238bb7757e Author: Heming Zhao Date: Thu Apr 8 15:44:15 2021 +0800 md-cluster: fix use-after-free issue when removing rdev md_kick_rdev_from_array will remove rdev, so we should use rdev_for_each_safe to search list. How to trigger: env: Two nodes on kvm-qemu x86_64 VMs (2C2G with 2 iscsi luns). ``` node2=192.168.0.3 for i in {1..20}; do echo ==== $i `date` ====; mdadm -Ss && ssh ${node2} "mdadm -Ss" wipefs -a /dev/sda /dev/sdb mdadm -CR /dev/md0 -b clustered -e 1.2 -n 2 -l 1 /dev/sda \ /dev/sdb --assume-clean ssh ${node2} "mdadm -A /dev/md0 /dev/sda /dev/sdb" mdadm --wait /dev/md0 ssh ${node2} "mdadm --wait /dev/md0" mdadm --manage /dev/md0 --fail /dev/sda --remove /dev/sda sleep 1 done ``` Crash stack: ``` stack segment: 0000 [#1] SMP ... ... RIP: 0010:md_check_recovery+0x1e8/0x570 [md_mod] ... ... RSP: 0018:ffffb149807a7d68 EFLAGS: 00010207 RAX: 0000000000000000 RBX: ffff9d494c180800 RCX: ffff9d490fc01e50 RDX: fffff047c0ed8308 RSI: 0000000000000246 RDI: 0000000000000246 RBP: 6b6b6b6b6b6b6b6b R08: ffff9d490fc01e40 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000 R13: ffff9d494c180818 R14: ffff9d493399ef38 R15: ffff9d4933a1d800 FS: 0000000000000000(0000) GS:ffff9d494f700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fe68cab9010 CR3: 000000004c6be001 CR4: 00000000003706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: raid1d+0x5c/0xd40 [raid1] ? finish_task_switch+0x75/0x2a0 ? lock_timer_base+0x67/0x80 ? try_to_del_timer_sync+0x4d/0x80 ? del_timer_sync+0x41/0x50 ? schedule_timeout+0x254/0x2d0 ? md_start_sync+0xe0/0xe0 [md_mod] ? md_thread+0x127/0x160 [md_mod] md_thread+0x127/0x160 [md_mod] ? wait_woken+0x80/0x80 kthread+0x10d/0x130 ? kthread_park+0xa0/0xa0 ret_from_fork+0x1f/0x40 ``` Fixes: dbb64f8635f5d ("md-cluster: Fix adding of new disk with new reload code") Fixes: 659b254fa7392 ("md-cluster: remove a disk asynchronously from cluster environment") Cc: stable@vger.kernel.org Reviewed-by: Gang He Signed-off-by: Heming Zhao Signed-off-by: Song Liu commit 1f70dfc542e88492a3bba3017e5e286dab7d3be6 Author: Haiyue Wang Date: Wed Mar 31 10:08:37 2021 +0800 iavf: redefine the magic number for FDIR GTP-U header fields The flex-byte for GTP-U protocol header fields uses the magic number, which is hard to maintain and understand, define the interested fields with meaningful macro name, based on the GTP-U protocol stack: GTP-U header +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0x1 |1|0|1|0|0| 0xff | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | TEID = 1654 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Sequence Number = 0 |N-PDU Number=0 |NextExtHdr=0x85| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ GTP-U Extension Header (PDU Session Container) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ExtHdrLen=2 |Type=0 | Spare |0|0| QFI | PPI | Spare | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Padding |NextExtHdr=0x0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Signed-off-by: Haiyue Wang Signed-off-by: Tony Nguyen commit f3b9da31f0e36a3cd3edad51131d63c044cd1ec4 Author: Haiyue Wang Date: Wed Mar 31 10:08:36 2021 +0800 iavf: enhance the duplicated FDIR list scan handling When the FDIR entry is found, just return the result directly to break the loop. Signed-off-by: Haiyue Wang Signed-off-by: Tony Nguyen commit f995f95af626cb1867cbfc702d011a50c4ff9538 Author: Haiyue Wang Date: Wed Mar 31 10:08:35 2021 +0800 iavf: change the flex-byte support number to macro definition The maximum number (2) of flex-byte support is derived from ethtool use-def data size (8 byte). Change the magic number 2 to macro definition, and add the comment to track the design thinking, so the code is clear and easily maintained. Signed-off-by: Haiyue Wang Signed-off-by: Tony Nguyen commit 1a0e880b028f97478dc689e2900b312741d0d772 Author: Stefan Assmann Date: Tue Mar 9 15:41:42 2021 +0100 iavf: remove duplicate free resources calls Both iavf_free_all_tx_resources() and iavf_free_all_rx_resources() have already been called in the very same function. Remove the duplicate calls. Signed-off-by: Stefan Assmann Signed-off-by: Tony Nguyen commit 5c208e9f498ed76ad03a09c5089efd4491631562 Author: Coiby Xu Date: Thu Mar 4 10:55:43 2021 +0800 i40e: use minimal admin queue for kdump The minimum size of admin send/receive queue is 1 and 2 respectively. The admin send queue can't be set to 1 because in that case, the firmware would fail to init. Signed-off-by: Coiby Xu Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit dcb75338f6e7092324cc6784f1c30c5c6da6340e Author: Coiby Xu Date: Thu Mar 4 10:55:42 2021 +0800 i40e: use minimal Rx and Tx ring buffers for kdump Use the minimum of the number of descriptors thus we will allocate the minimal ring buffers for kdump. Signed-off-by: Coiby Xu Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit 065aa694a76e213d5774eeb70a9c11b8cf0dfdb7 Author: Coiby Xu Date: Thu Mar 4 10:55:41 2021 +0800 i40e: use minimal Tx and Rx pairs for kdump Set the number of the MSI-X vectors to 1. When MSI-X is enabled, it's not allowed to use more TC queue pairs than MSI-X vectors (pf->num_lan_msix) exist. Thus the number of Tx and Rx pairs (vsi->num_queue_pairs) will be equal to the number of MSI-X vectors, i.e., 1. Signed-off-by: Coiby Xu Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit 6d2c322cce04c177d96baafdbd9bad5c49456719 Author: Aleksandr Loktionov Date: Wed Jan 27 10:58:36 2021 +0000 i40e: refactor repeated link state reporting code Refactor repeated link state reporting code into a separate helper functions: i40e_set_vf_link_state() i40e_vc_link_speed2mbps(). Add support of VIRTCHNL_VF_CAP_ADV_LINK_SPEED; Signed-off-by: Arkadiusz Kubalewski Signed-off-by: Aleksandr Loktionov Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 9fdd04918a452980631ecc499317881c1d120b70 Author: Dan Robertson Date: Fri Apr 23 00:02:13 2021 -0400 net: ieee802154: fix null deref in parse dev addr Fix a logic error that could result in a null deref if the user sets the mode incorrectly for the given addr type. Signed-off-by: Dan Robertson Acked-by: Alexander Aring Link: https://lore.kernel.org/r/20210423040214.15438-2-dan@dlrobertson.com Signed-off-by: Stefan Schmidt commit 84696cfaf4d90945eb2a8302edc6cf627db56b84 Author: Rasmus Villemoes Date: Fri Apr 23 11:45:29 2021 +0200 lib/vsprintf.c: remove leftover 'f' and 'F' cases from bstr_printf() Commit 9af7706492f9 ("lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps") removed support for %pF and %pf, and correctly removed the handling of those cases in vbin_printf(). However, the corresponding cases in bstr_printf() were left behind. In the same series, %pf was re-purposed for dealing with fwnodes (3bd32d6a2ee6, "lib/vsprintf: Add %pfw conversion specifier for printing fwnode names"). So should anyone use %pf with the binary printf routines, vbin_printf() would (correctly, as it involves dereferencing the pointer) do the string formatting to the u32 array, but bstr_printf() would not copy the string from the u32 array, but instead interpret the first sizeof(void*) bytes of the formatted string as a pointer - which generally won't end well (also, all subsequent get_args would be out of sync). Fixes: 9af7706492f9 ("lib/vsprintf: Remove support for %pF and %pf in favour of %pS and %ps") Cc: stable@vger.kernel.org Signed-off-by: Rasmus Villemoes Reviewed-by: Sakari Ailus Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210423094529.1862521-1-linux@rasmusvillemoes.dk commit b9f83ffaa0c096b4c832a43964fe6bff3acffe10 Author: Yunjian Wang Date: Fri Apr 23 17:42:58 2021 +0800 SUNRPC: Fix null pointer dereference in svc_rqst_free() When alloc_pages_node() returns null in svc_rqst_alloc(), the null rq_scratch_page pointer will be dereferenced when calling put_page() in svc_rqst_free(). Fix it by adding a null check. Addresses-Coverity: ("Dereference after null check") Fixes: 5191955d6fc6 ("SUNRPC: Prepare for xdr_stream-style decoding on the server-side") Signed-off-by: Yunjian Wang Signed-off-by: Chuck Lever commit 86527bcbc88922ea40df05d28189ee15489d2cf1 Author: Andy Shevchenko Date: Tue Apr 20 16:18:46 2021 +0300 spi: Rename enable1 to activate in spi_set_cs() The enable1 is confusing name. Change it to clearly show what is the intention behind it. No functional changes. Fixes: 25093bdeb6bc ("spi: implement SW control for CS times") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210420131846.75983-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit f80505fdff771c89c9350895e99140ffc824e564 Author: Ezequiel Garcia Date: Wed Apr 21 18:03:37 2021 -0300 regulator: Add binding for TCS4525 Add a compatible string to support TCS4525/TCS4526 devices, which are compatible with Fairchild FAN53555 regulators. Signed-off-by: Ezequiel Garcia Link: https://lore.kernel.org/r/20210421210338.43819-2-ezequiel@collabora.com Signed-off-by: Mark Brown commit 914df8faa7d6fdff7afa1fbde888a2bed8d72fa7 Author: Joseph Chen Date: Wed Apr 21 18:03:38 2021 -0300 regulator: fan53555: Add TCS4525 DCDC support TCS4525 main features: - 2.7V to 5.5V Input Voltage Range; - 3MHz Constant Switching Frequency; - 5A Available Load Current; - Programmable Output Voltage: 0.6V to 1.4V in 6.25mV Steps; - PFM/PWM Operation for Optimum Increased Efficiency; Signed-off-by: Joseph Chen [Ezequiel: Forward port] Signed-off-by: Ezequiel Garcia Link: https://lore.kernel.org/r/20210421210338.43819-3-ezequiel@collabora.com Signed-off-by: Mark Brown commit 3007accc39776e0888f7692bd1cb639c51cc29c5 Author: Ezequiel Garcia Date: Wed Apr 21 18:03:36 2021 -0300 dt-bindings: vendor-prefixes: Add Tang Cheng (TCS) Shenzhen City Tang Cheng Technology (http://www.tctek.cn/) is a power management IC manufacturer. Signed-off-by: Ezequiel Garcia Link: https://lore.kernel.org/r/20210421210338.43819-1-ezequiel@collabora.com Signed-off-by: Mark Brown commit a1aee7f7b71155595a06f21f2d021b6a58d04017 Author: Shuming Fan Date: Thu Apr 22 18:32:35 2021 +0800 ASoC: rt711-sdca: add the notification when volume changed This patch adds the return value when the volume settings were changed. The userspace application might monitor the kcontrols to check which control changed. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20210422103235.22048-1-shumingf@realtek.com Signed-off-by: Mark Brown commit ca5118c0c00f6bc8b7d0c82c95485159db3a5584 Author: Shuming Fan Date: Thu Apr 22 18:32:20 2021 +0800 ASoC: rt711-sdca: change capture switch controls The DAPM event and mixer control could mute/unmute the capture directly. That will be confused that capture still works if the user settings is unmute before the capture. Therefore, this patch uses the variables to record the capture switch status of DAPM and mixer. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20210422103220.21987-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 724cb4f9ec905173f32c5bd08fec26abaecc6a1d Author: Hao Xu Date: Wed Apr 21 23:19:11 2021 +0800 io_uring: check sqring and iopoll_list before shedule do this to avoid race below: userspace kernel | check sqring and iopoll_list submit sqe | check IORING_SQ_NEED_WAKEUP | (which is not set) | | | set IORING_SQ_NEED_WAKEUP wait cqe | schedule(never wakeup again) Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/1619018351-75883-1-git-send-email-haoxu@linux.alibaba.com Signed-off-by: Jens Axboe commit 4139cf940d523ed30d4a362306b93115a2c9354c Author: Jisheng Zhang Date: Sun Apr 18 21:52:31 2021 +0800 arm64: remove HAVE_DEBUG_BUGVERBOSE After commit 9fb7410f955f ("arm64/BUG: Use BRK instruction for generic BUG traps"), arm64 has switched to generic BUG implementation, so there's no need to select HAVE_DEBUG_BUGVERBOSE. Signed-off-by: Jisheng Zhang Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210418215231.563d4b72@xhacker Signed-off-by: Catalin Marinas commit 8d144746ecc5fe5d64f3f1599db2192bd5c795ff Author: Mark Rutland Date: Fri Apr 16 17:30:32 2021 +0100 arm64: alternative: simplify passing alt_region In __apply_alternatives() we take a pointer to void which we later assign to a pointer to struct alt_region. As all callers are passing a pointer to struct alt_region to begin with, it's simpler and more robust to take a pointer to struct alt region, so let's do so and avoid the need for a temporary variable. Signed-off-by: Mark Rutland Cc: Will Deacon Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210416163032.10857-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 782276b4d0ad2fdd7096f8177bb7a9827f5258e4 Author: Catalin Marinas Date: Tue Apr 20 10:35:59 2021 +0100 arm64: Force SPARSEMEM_VMEMMAP as the only memory management model Currently arm64 allows a choice of FLATMEM, SPARSEMEM and SPARSEMEM_VMEMMAP. However, only the latter is tested regularly. FLATMEM does not seem to boot in certain configurations (guest under KVM with Qemu as a VMM). Since the reduction of the SECTION_SIZE_BITS to 27 (4K pages) or 29 (64K page), there's little argument against the memory wasted by the mem_map array with SPARSEMEM. Make SPARSEMEM_VMEMMAP the only available option, non-selectable, and remove the corresponding #ifdefs under arch/arm64/. Signed-off-by: Catalin Marinas Cc: Will Deacon Acked-by: Will Deacon Acked-by: Ard Biesheuvel Acked-by: Marc Zyngier Reviewed-by: Anshuman Khandual Acked-by: Mike Rapoport Link: https://lore.kernel.org/r/20210420093559.23168-1-catalin.marinas@arm.com Signed-off-by: Catalin Marinas commit ef94340583eec5cb1544dc41a87baa4f684b3fe1 Author: Nick Desaulniers Date: Tue Apr 20 10:44:25 2021 -0700 arm64: vdso32: drop -no-integrated-as flag Clang can assemble these files just fine; this is a relic from the top level Makefile conditionally adding this. We no longer need --prefix, --gcc-toolchain, or -Qunused-arguments flags either with this change, so remove those too. To test building: $ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \ CROSS_COMPILE_COMPAT=arm-linux-gnueabi- make LLVM=1 LLVM_IAS=1 \ defconfig arch/arm64/kernel/vdso32/ Suggested-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Reviewed-by: Vincenzo Frascino Tested-by: Stephen Boyd Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210420174427.230228-1-ndesaulniers@google.com Signed-off-by: Catalin Marinas commit 2a269ba888d3dcf950ef7ceb8421f7ff6aeaa9c0 Author: Shiwu Zhang Date: Thu Apr 22 16:37:49 2021 +0800 drm/ttm: fix error handling if no BO can be swapped out v4 In case that all pre-allocated BOs are busy, just continue to populate BOs since likely half of system memory in total is still free. v4 (chk): fix code moved to VMWGFX as well Signed-off-by: Shiwu Zhang Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210422115757.3946-1-christian.koenig@amd.com commit a97709f563a078e259bf0861cd259aa60332890a Author: He Ying Date: Fri Apr 23 04:35:16 2021 -0400 irqchip/gic-v3: Do not enable irqs when handling spurious interrups We triggered the following error while running our 4.19 kernel with the pseudo-NMI patches backported to it: [ 14.816231] ------------[ cut here ]------------ [ 14.816231] kernel BUG at irq.c:99! [ 14.816232] Internal error: Oops - BUG: 0 [#1] SMP [ 14.816232] Process swapper/0 (pid: 0, stack limit = 0x(____ptrval____)) [ 14.816233] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 4.19.95.aarch64 #14 [ 14.816233] Hardware name: evb (DT) [ 14.816234] pstate: 80400085 (Nzcv daIf +PAN -UAO) [ 14.816234] pc : asm_nmi_enter+0x94/0x98 [ 14.816235] lr : asm_nmi_enter+0x18/0x98 [ 14.816235] sp : ffff000008003c50 [ 14.816235] pmr_save: 00000070 [ 14.816237] x29: ffff000008003c50 x28: ffff0000095f56c0 [ 14.816238] x27: 0000000000000000 x26: ffff000008004000 [ 14.816239] x25: 00000000015e0000 x24: ffff8008fb916000 [ 14.816240] x23: 0000000020400005 x22: ffff0000080817cc [ 14.816241] x21: ffff000008003da0 x20: 0000000000000060 [ 14.816242] x19: 00000000000003ff x18: ffffffffffffffff [ 14.816243] x17: 0000000000000008 x16: 003d090000000000 [ 14.816244] x15: ffff0000095ea6c8 x14: ffff8008fff5ab40 [ 14.816244] x13: ffff8008fff58b9d x12: 0000000000000000 [ 14.816245] x11: ffff000008c8a200 x10: 000000008e31fca5 [ 14.816246] x9 : ffff000008c8a208 x8 : 000000000000000f [ 14.816247] x7 : 0000000000000004 x6 : ffff8008fff58b9e [ 14.816248] x5 : 0000000000000000 x4 : 0000000080000000 [ 14.816249] x3 : 0000000000000000 x2 : 0000000080000000 [ 14.816250] x1 : 0000000000120000 x0 : ffff0000095f56c0 [ 14.816251] Call trace: [ 14.816251] asm_nmi_enter+0x94/0x98 [ 14.816251] el1_irq+0x8c/0x180 (IRQ C) [ 14.816252] gic_handle_irq+0xbc/0x2e4 [ 14.816252] el1_irq+0xcc/0x180 (IRQ B) [ 14.816253] arch_timer_handler_virt+0x38/0x58 [ 14.816253] handle_percpu_devid_irq+0x90/0x240 [ 14.816253] generic_handle_irq+0x34/0x50 [ 14.816254] __handle_domain_irq+0x68/0xc0 [ 14.816254] gic_handle_irq+0xf8/0x2e4 [ 14.816255] el1_irq+0xcc/0x180 (IRQ A) [ 14.816255] arch_cpu_idle+0x34/0x1c8 [ 14.816255] default_idle_call+0x24/0x44 [ 14.816256] do_idle+0x1d0/0x2c8 [ 14.816256] cpu_startup_entry+0x28/0x30 [ 14.816256] rest_init+0xb8/0xc8 [ 14.816257] start_kernel+0x4c8/0x4f4 [ 14.816257] Code: 940587f1 d5384100 b9401001 36a7fd01 (d4210000) [ 14.816258] Modules linked in: start_dp(O) smeth(O) [ 15.103092] ---[ end trace 701753956cb14aa8 ]--- [ 15.103093] Kernel panic - not syncing: Fatal exception in interrupt [ 15.103099] SMP: stopping secondary CPUs [ 15.103100] Kernel Offset: disabled [ 15.103100] CPU features: 0x36,a2400218 [ 15.103100] Memory Limit: none which is cause by a 'BUG_ON(in_nmi())' in nmi_enter(). From the call trace, we can find three interrupts (noted A, B, C above): interrupt (A) is preempted by (B), which is further interrupted by (C). Subsequent investigations show that (B) results in nmi_enter() being called, but that it actually is a spurious interrupt. Furthermore, interrupts are reenabled in the context of (B), and (C) fires with NMI priority. We end-up with a nested NMI situation, something we definitely do not want to (and cannot) handle. The bug here is that spurious interrupts should never result in any state change, and we should just return to the interrupted context. Moving the handling of spurious interrupts as early as possible in the GICv3 handler fixes this issue. Fixes: 3f1f3234bc2d ("irqchip/gic-v3: Switch to PMR masking before calling IRQ handler") Acked-by: Mark Rutland Signed-off-by: He Ying [maz: rewrote commit message, corrected Fixes: tag] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210423083516.170111-1-heying24@huawei.com Cc: stable@vger.kernel.org commit 9ec2a73f0b09f5a5070a0092f08b1531b2cb0d8d Author: Kuldeep Singh Date: Fri Mar 12 11:10:38 2021 +0530 spi: Convert Freescale QSPI binding to json schema Convert the Freescale QSPI binding to DT schema format using json-schema. Signed-off-by: Kuldeep Singh Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210312054038.3586706-1-kuldeep.singh@nxp.com Signed-off-by: Mark Brown commit a8ce7bd89689997537dd22dcbced46cf23dc19da Author: Vincent Whitchurch Date: Fri Apr 23 13:45:24 2021 +0200 regulator: core: Fix off_on_delay handling The jiffies-based off_on_delay implementation has a couple of problems that cause it to sometimes not actually delay for the required time: (1) If, for example, the off_on_delay time is equivalent to one jiffy, and the ->last_off_jiffy is set just before a new jiffy starts, then _regulator_do_enable() does not wait at all since it checks using time_before(). (2) When jiffies overflows, the value of "remaining" becomes higher than "max_delay" and the code simply proceeds without waiting. Fix these problems by changing it to use ktime_t instead. [Note that since jiffies doesn't start at zero but at INITIAL_JIFFIES ("-5 minutes"), (2) above also led to the code not delaying if the first regulator_enable() is called when the ->last_off_jiffy is not initialised, such as for regulators with ->constraints->boot_on set. It's not clear to me if this was intended or not, but I've preserved this behaviour explicitly with the check for a non-zero ->last_off.] Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20210423114524.26414-1-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit 41a36ffc182ad7d0da1121d67eb2fd8f9ee28ec8 Merge: 823543b739c89 a5ccccb3ec0b0 Author: Mark Brown Date: Fri Apr 23 13:17:36 2021 +0100 Merge branch 'for-5.12' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-5.13 commit 12f8127fe9e6154dd4197df97e44f3fd67583071 Author: Jerome Brunet Date: Wed Apr 21 14:05:12 2021 +0200 ASoC: da7219: properly get clk from the provider Instead of using the clk embedded in the clk_hw (which is meant to go away), a clock provider which need to interact with its own clock should request clk reference through the clock provider API. Reviewed-by: Stephen Boyd Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210421120512.413057-6-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 27dc72b44e85997dfd5f3b120e5ec847c43c272a Author: Jerome Brunet Date: Wed Apr 21 14:05:11 2021 +0200 ASoC: lpass: use the clock provider API Clock providers should be registered using the clk_hw API. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210421120512.413057-5-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 8691743c511d6f92d7647d78ea1e5f5ef69937b1 Author: Jerome Brunet Date: Wed Apr 21 14:05:10 2021 +0200 ASoC: rt5682: clock driver must use the clock provider API Clock drivers ops should not call the clk API but the clock provider (clk_hw) instead. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210421120512.413057-4-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 104c3a9ed07411288efcd34f08a577df318aafc0 Author: Jerome Brunet Date: Wed Apr 21 14:05:09 2021 +0200 ASoC: wcd934x: use the clock provider API Clock providers should use the clk_hw API Reviewed-by: Stephen Boyd Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210421120512.413057-3-jbrunet@baylibre.com Signed-off-by: Mark Brown commit 65d1cce726d4912793d0a84c55ecdb0ef5832130 Author: Jerome Brunet Date: Wed Apr 21 14:05:08 2021 +0200 ASoC: stm32: properly get clk from the provider Instead of using the clk embedded in the clk_hw (which is meant to go away), a clock provider which need to interact with its own clock should request clk reference through the clock provider API. Reviewed-by: Stephen Boyd Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210421120512.413057-2-jbrunet@baylibre.com Signed-off-by: Mark Brown commit c55944cc0ec57731931987ff478a9f69fe68f157 Author: Nick Desaulniers Date: Wed Apr 7 10:35:43 2021 -0700 MIPS: select ARCH_KEEP_MEMBLOCK unconditionally While removing allnoconfig_y from Kconfig, ARCH=mips allnoconfig builds started failing with the error: WARNING: modpost: vmlinux.o(.text+0x9c70): Section mismatch in reference from the function reserve_exception_space() to the function .meminit.text:memblock_reserve() The function reserve_exception_space() references the function __meminit memblock_reserve(). This is often because reserve_exception_space lacks a __meminit annotation or the annotation of memblock_reserve is wrong. ERROR: modpost: Section mismatches detected. Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. allnoconfig disables DEBUG_KERNEL and thus ARCH_KEEP_MEMBLOCK, which changes __init_memblock to be equivalent to __meminit triggering the above error. Link: https://lore.kernel.org/linux-kbuild/20210313194836.372585-11-masahiroy@kernel.org/ Reported-by: Guenter Roeck Signed-off-by: Nick Desaulniers Reviewed-by: Masahiro Yamada Signed-off-by: Thomas Bogendoerfer commit 462f8ddebccbb8a364b154008212052d515ac6b1 Author: Sean Christopherson Date: Tue Apr 20 18:08:50 2021 -0700 KVM: x86: Fix implicit enum conversion goof in scattered reverse CPUID code Take "enum kvm_only_cpuid_leafs" in scattered specific CPUID helpers (which is obvious in hindsight), and use "unsigned int" for leafs that can be the kernel's standard "enum cpuid_leaf" or the aforementioned KVM-only variant. Loss of the enum params is a bit disapponting, but gcc obviously isn't providing any extra sanity checks, and the various BUILD_BUG_ON() assertions ensure the input is in range. This fixes implicit enum conversions that are detected by clang-11: arch/x86/kvm/cpuid.c:499:29: warning: implicit conversion from enumeration type 'enum kvm_only_cpuid_leafs' to different enumeration type 'enum cpuid_leafs' [-Wenum-conversion] kvm_cpu_cap_init_scattered(CPUID_12_EAX, ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~ arch/x86/kvm/cpuid.c:837:31: warning: implicit conversion from enumeration type 'enum kvm_only_cpuid_leafs' to different enumeration type 'enum cpuid_leafs' [-Wenum-conversion] cpuid_entry_override(entry, CPUID_12_EAX); ~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~ 2 warnings generated. Fixes: 4e66c0cb79b7 ("KVM: x86: Add support for reverse CPUID lookup of scattered features") Cc: Kai Huang Signed-off-by: Sean Christopherson Message-Id: <20210421010850.3009718-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 10835602758d823c6c8c36cc38b576043db6a225 Author: Isaku Yamahata Date: Thu Apr 22 17:22:29 2021 -0700 KVM: VMX: use EPT_VIOLATION_GVA_TRANSLATED instead of 0x100 Use symbolic value, EPT_VIOLATION_GVA_TRANSLATED, instead of 0x100 in handle_ept_violation(). Signed-off-by: Yao Yuan Signed-off-by: Isaku Yamahata Message-Id: <724e8271ea301aece3eb2afe286a9e2e92a70b18.1619136576.git.isaku.yamahata@intel.com> Signed-off-by: Paolo Bonzini commit 1d7ba0165d8206ac073f7ac3b14fc0836b66eae7 Author: Romain Naour Date: Tue Apr 20 22:12:10 2021 +0100 mips: Do not include hi and lo in clobber list for R6 From [1] "GCC 10 (PR 91233) won't silently allow registers that are not architecturally available to be present in the clobber list anymore, resulting in build failure for mips*r6 targets in form of: ... .../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target 146 | __asm__ volatile ( \ | ^~~~~~~ This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension. This patch provides the alternative clobber list for r6 targets that won't include those registers." Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build for mips r6 cpus with gcc 10 for the same reason as glibc. [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8 [2] '24640f233b46 ("mips: Add support for generic vDSO")' Signed-off-by: Romain Naour Signed-off-by: Sudip Mukherjee Signed-off-by: Thomas Bogendoerfer commit 137fceb7d9213fa20ae388d8858739c919502118 Author: xiaochuan mao Date: Fri Apr 23 11:06:56 2021 +0800 MIPS:DTS:Correct the license for Loongson-2K make license from GPL3.0 to GPL2.0 Signed-off-by: xiaochuan mao Signed-off-by: Thomas Bogendoerfer commit c4f71901d53b6d8a4703389459d9f99fbd80ffd2 Merge: fd49e8ee70b30 9a8aae605b80f Author: Paolo Bonzini Date: Fri Apr 23 07:41:17 2021 -0400 Merge tag 'kvmarm-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/arm64 updates for Linux 5.13 New features: - Stage-2 isolation for the host kernel when running in protected mode - Guest SVE support when running in nVHE mode - Force W^X hypervisor mappings in nVHE mode - ITS save/restore for guests using direct injection with GICv4.1 - nVHE panics now produce readable backtraces - Guest support for PTP using the ptp_kvm driver - Performance improvements in the S2 fault handler - Alexandru is now a reviewer (not really a new feature...) Fixes: - Proper emulation of the GICR_TYPER register - Handle the complete set of relocation in the nVHE EL2 object - Get rid of the oprofile dependency in the PMU code (and of the oprofile body parts at the same time) - Debug and SPE fixes - Fix vcpu reset commit fe3083770c8d98e3dd8b9c6972153528970c251c Author: xiaochuan mao Date: Fri Apr 23 09:52:34 2021 +0800 MIPS:DTS:Fix label name and interrupt number of ohci for Loongson-2K from Loongson-2K1000 user manual know that under pci bus the device num is 4, function number is 2 and register is 0x2200 is ohci. the ohci interrupt number is 51. because Loongson-2K1000 has 64 interrupt sources, 0-31 correspond to the device tree liointc0 device node, and the other correspond to liointc1 node. so it should be number 19 correspon to liointc1. Signed-off-by: xiaochuan mao Signed-off-by: Thomas Bogendoerfer commit 25ab14cbe9d1b66fda44c71a2db7582a31b6f5cd Author: Maciej W. Rozycki Date: Thu Apr 22 22:36:12 2021 +0200 MIPS: Avoid handcoded DIVU in `__div64_32' altogether Remove the inline asm with a DIVU instruction from `__div64_32' and use plain C code for the intended DIVMOD calculation instead. GCC is smart enough to know that both the quotient and the remainder are calculated with single DIVU, so with ISAs up to R5 the same instruction is actually produced with overall similar code. For R6 compiled code will work, but separate DIVU and MODU instructions will be produced, which are also interlocked, so scalar implementations will likely not perform as well as older ISAs with their asynchronous MD unit. Likely still faster then the generic algorithm though. This removes a compilation error for R6 however where the original DIVU instruction is not supported anymore and the MDU accumulator registers have been removed and consequently GCC complains as to a constraint it cannot find a register for: In file included from ./include/linux/math.h:5, from ./include/linux/kernel.h:13, from mm/page-writeback.c:15: ./include/linux/math64.h: In function 'div_u64_rem': ./arch/mips/include/asm/div64.h:76:17: error: inconsistent operand constraints in an 'asm' 76 | __asm__("divu $0, %z1, %z2" \ | ^~~~~~~ ./include/asm-generic/div64.h:245:25: note: in expansion of macro '__div64_32' 245 | __rem = __div64_32(&(n), __base); \ | ^~~~~~~~~~ ./include/linux/math64.h:91:22: note: in expansion of macro 'do_div' 91 | *remainder = do_div(dividend, divisor); | ^~~~~~ This has passed correctness verification with test_div64 and reduced the module's average execution time down to 1.0404s from 1.0445s with R3400 @40MHz. The module's MIPS I machine code has also shrunk by 12 bytes or 3 instructions. Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit 517b322c07e17787fc8a22ca9cede709b6ae9ec0 Author: Maciej W. Rozycki Date: Thu Apr 22 22:36:08 2021 +0200 lib/math/test_div64: Correct the spelling of "dividend" The word is spelt with a final "d" of course. What a massive messup! Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit e2cb6b891ad2b8caa9131e3be70f45243df82a80 Author: Lin Ma Date: Mon Apr 12 19:17:57 2021 +0800 bluetooth: eliminate the potential race condition when removing the HCI controller There is a possible race condition vulnerability between issuing a HCI command and removing the cont. Specifically, functions hci_req_sync() and hci_dev_do_close() can race each other like below: thread-A in hci_req_sync() | thread-B in hci_dev_do_close() | hci_req_sync_lock(hdev); test_bit(HCI_UP, &hdev->flags); | ... | test_and_clear_bit(HCI_UP, &hdev->flags) hci_req_sync_lock(hdev); | | In this commit we alter the sequence in function hci_req_sync(). Hence, the thread-A cannot issue th. Signed-off-by: Lin Ma Cc: Marcel Holtmann Fixes: 7c6a329e4447 ("[Bluetooth] Fix regression from using default link policy") Signed-off-by: Greg Kroah-Hartman commit ddae7979cdd5ed417f2b3ebdc5742e2a600b5ad5 Author: Thinh Nguyen Date: Thu Apr 22 16:51:43 2021 -0700 usb: dwc3: gadget: Handle DEV_TXF_FLUSH_BYPASS capability DWC_usb32 IP introduces a new behavior when handling NoStream event for IN endpoints. If the controller is capable of DEV_TXF_FLUSH_BYPASS, then the driver does not need to force to restart stream for IN endpoints. The controller will generate ERDY and restart the stream periodically. Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/65c3070c666cd6b8beeee62d7f8e3e704ebf2d32.1619134559.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 16710380d3aa8f91411eb216352c4be4bc7af799 Author: Thinh Nguyen Date: Thu Apr 22 16:51:36 2021 -0700 usb: dwc3: Capture new capability register GHWPARAMS9 DWC_usb32 introduces a new HW capability register GHWPARAMS9. Capture this in the dwc->hwparams.hwparams9 field. Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/f76cc4a9c8c4ab325f5babe03c57b039166360b0.1619134559.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit f5079a9a2a31607a2343e544e9182ce35b030578 Author: Stefano Stabellini Date: Fri Mar 19 13:01:40 2021 -0700 xen/arm: introduce XENFEAT_direct_mapped and XENFEAT_not_direct_mapped Newer Xen versions expose two Xen feature flags to tell us if the domain is directly mapped or not. Only when a domain is directly mapped it makes sense to enable swiotlb-xen on ARM. Introduce a function on ARM to check the new Xen feature flags and also to deal with the legacy case. Call the function xen_swiotlb_detect. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/20210319200140.12512-1-sstabellini@kernel.org Signed-off-by: Juergen Gross commit 3003bbd0697b659944237f3459489cb596ba196c Author: David Howells Date: Thu Feb 6 14:22:29 2020 +0000 afs: Use the netfs_write_begin() helper Make AFS use the new netfs_write_begin() helper to do the pre-reading required before the write. If successful, the helper returns with the required page filled in and locked. It may read more than just one page, expanding the read to meet cache granularity requirements as necessary. Note: A more advanced version of this could be made that does generic_perform_write() for a whole cache granule. This would make it easier to avoid doing the download/read for the data to be overwritten. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/160588546422.3465195.1546354372589291098.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161539563244.286939.16537296241609909980.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653819291.2770958.406013201547420544.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789102743.6155.17396591236631761195.stgit@warthog.procyon.org.uk/ # v6 commit 5cbf03985c67c7f0ac8c5382cf5d4d0d630f95f3 Author: David Howells Date: Thu Feb 6 14:22:29 2020 +0000 afs: Use new netfs lib read helper API Make AFS use the new netfs read helpers to implement the VM read operations: - afs_readpage() now hands off responsibility to netfs_readpage(). - afs_readpages() is gone and replaced with afs_readahead(). - afs_readahead() just hands off responsibility to netfs_readahead(). These make use of the cache if a cookie is supplied, otherwise just call the ->issue_op() method a sufficient number of times to complete the entire request. Changes: v5: - Use proper wait function for PG_fscache in afs_page_mkwrite()[1]. - Use killable wait for PG_writeback in afs_page_mkwrite()[1]. v4: - Folded in error handling fixes to afs_req_issue_op(). - Added flag to netfs_subreq_terminated() to indicate that the caller may have been running async and stuff that might sleep needs punting to a workqueue. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/2499407.1616505440@warthog.procyon.org.uk [1] Link: https://lore.kernel.org/r/160588542733.3465195.7526541422073350302.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118158436.1232039.3884845981224091996.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161053540.2537118.14904446369309535330.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340418739.1303470.5908092911600241280.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539561926.286939.5729036262354802339.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653817977.2770958.17696456811587237197.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789101258.6155.3879271028895121537.stgit@warthog.procyon.org.uk/ # v6 commit dc4191841d0998978349e9119ab2ccb080b8b957 Author: David Howells Date: Fri Sep 18 09:11:15 2020 +0100 afs: Use the fs operation ops to handle FetchData completion Use the 'success' and 'aborted' afs_operations_ops methods and add a 'failed' method to handle the completion of an AFS.FetchData, AFS.FetchData64 or YFS.FetchData64 RPC operation rather than directly calling the done func pointed to by the afs_read struct from the call delivery handler. This means the done function will be called back on error also, not just on successful completion. This allows motion towards asynchronous data reception on data fetch calls and allows any error to be handed off to the fscache read helper in the same place as a successful completion. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/160588541471.3465195.8807019223378490810.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118157260.1232039.6549085372718234792.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161052647.2537118.12922380836599003659.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340417106.1303470.3502017303898569631.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539560673.286939.391310781674212229.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653816367.2770958.5856904574822446404.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789099994.6155.473719823490561190.stgit@warthog.procyon.org.uk/ # v6 commit e87b03f5830ecd8ca21836d3ee48c74f8d58fa31 Author: David Howells Date: Tue Oct 20 09:33:45 2020 +0100 afs: Prepare for use of THPs As a prelude to supporting transparent huge pages, use thp_size() and similar rather than PAGE_SIZE/SHIFT. Further, try and frame everything in terms of file positions and lengths rather than page indices and numbers of pages. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/160588540227.3465195.4752143929716269062.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118155821.1232039.540445038028845740.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161051439.2537118.15577827510426326534.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340415869.1303470.6040191748634322355.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539559365.286939.18344613540296085269.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653815142.2770958.454490670311230206.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789098713.6155.16394227991842480300.stgit@warthog.procyon.org.uk/ # v6 commit 810caa3e6708ba234fc12591d84d4b46f9f05d72 Author: David Howells Date: Fri Oct 30 10:01:09 2020 +0000 afs: Extract writeback extension into its own function Extract writeback extension into its own function to break up the writeback function a bit. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/160588538471.3465195.782513375683399583.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118154610.1232039.1765365632920504822.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161050546.2537118.2202554806419189453.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340414102.1303470.9078891484034668985.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539558417.286939.2879469588895925399.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653813972.2770958.12671731209438112378.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789097132.6155.4916609419912731964.stgit@warthog.procyon.org.uk/ # v6 commit 630f5dda8442ca0bbbc20ab0140c5a3db34b486e Author: David Howells Date: Thu Feb 6 14:22:28 2020 +0000 afs: Wait on PG_fscache before modifying/releasing a page PG_fscache is going to be used to indicate that a page is being written to the cache, and that the page should not be modified or released until it's finished. Make afs_invalidatepage() and afs_releasepage() wait for it. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/158861253957.340223.7465334678444521655.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/159465832417.1377938.3571599385208729791.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588536286.3465195.13231895135369807920.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118153708.1232039.3535103645871176749.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161049369.2537118.11591934943429117060.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340412903.1303470.6424701655031380012.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539556890.286939.5873470593519458598.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653812726.2770958.18167145829938766503.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789096241.6155.5907241930823579235.stgit@warthog.procyon.org.uk/ # v6 commit bd80d8a80e12895e56a1bb7862b2379942e46167 Author: David Howells Date: Thu Feb 6 14:22:28 2020 +0000 afs: Use ITER_XARRAY for writing Use a single ITER_XARRAY iterator to describe the portion of a file to be transmitted to the server rather than generating a series of small ITER_BVEC iterators on the fly. This will make it easier to implement AIO in afs. In theory we could maybe use one giant ITER_BVEC, but that means potentially allocating a huge array of bio_vec structs (max 256 per page) when in fact the pagecache already has a structure listing all the relevant pages (radix_tree/xarray) that can be walked over. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/153685395197.14766.16289516750731233933.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/158861251312.340223.17924900795425422532.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/159465828607.1377938.6903132788463419368.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588535018.3465195.14509994354240338307.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118152415.1232039.6452879415814850025.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161048194.2537118.13763612220937637316.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340411602.1303470.4661108879482218408.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539555629.286939.5241869986617154517.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653811456.2770958.7017388543246759245.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789095005.6155.6789055030327407928.stgit@warthog.procyon.org.uk/ # v6 commit c450846461f88b8888d6f5c2a2aa63ab64864978 Author: David Howells Date: Thu Feb 6 14:22:28 2020 +0000 afs: Set up the iov_iter before calling afs_extract_data() afs_extract_data() sets up a temporary iov_iter and passes it to AF_RXRPC each time it is called to describe the remaining buffer to be filled. Instead: (1) Put an iterator in the afs_call struct. (2) Set the iterator for each marshalling stage to load data into the appropriate places. A number of convenience functions are provided to this end (eg. afs_extract_to_buf()). This iterator is then passed to afs_extract_data(). (3) Use the new ITER_XARRAY iterator when reading data to load directly into the inode's pages without needing to create a list of them. This will allow O_DIRECT calls to be supported in future patches. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/152898380012.11616.12094591785228251717.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/153685394431.14766.3178466345696987059.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/153999787395.866.11218209749223643998.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/154033911195.12041.3882700371848894587.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/158861250059.340223.1248231474865140653.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/159465827399.1377938.11181327349704960046.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588533776.3465195.3612752083351956948.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118151238.1232039.17015723405750601161.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161047240.2537118.14721975104810564022.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340410333.1303470.16260122230371140878.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539554187.286939.15305559004905459852.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653810525.2770958.4630666029125411789.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789093719.6155.7877160739235087723.stgit@warthog.procyon.org.uk/ # v6 commit 05092755aab4b7f5ec7541144c32b0744eb8d136 Author: David Howells Date: Sun Jun 7 21:50:29 2020 +0100 afs: Log remote unmarshalling errors Log unmarshalling errors reported by the peer (ie. it can't parse what we sent it). Limit the maximum number of messages to 3. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/159465826250.1377938.16372395422217583913.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588532584.3465195.15618385466614028590.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118149739.1232039.208060911149801695.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161046033.2537118.7779717661044373273.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340409118.1303470.17812607349396199116.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539552964.286939.16503232687974398308.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653808989.2770958.11530765353025697860.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789092349.6155.8581594259882708631.stgit@warthog.procyon.org.uk/ # v6 commit f105da1a798f23f386ac5c4c2d776d57088bec32 Author: David Howells Date: Thu Feb 6 14:22:28 2020 +0000 afs: Don't truncate iter during data fetch Don't truncate the iterator to correspond to the actual data size when fetching the data from the server - rather, pass the length we want to read to rxrpc. This will allow the clear-after-read code in future to simply clear the remaining iterator capacity rather than having to reinitialise the iterator. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/158861249201.340223.13035445866976590375.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/159465825061.1377938.14403904452300909320.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588531418.3465195.10712005940763063144.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118148567.1232039.13380313332292947956.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161044610.2537118.17908520793806837792.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340407907.1303470.6501394859511712746.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539551721.286939.14655713136572200716.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653807790.2770958.14034599989374173734.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789090823.6155.15673999934535049102.stgit@warthog.procyon.org.uk/ # v6 commit c69bf479baa614f5e80a1ded355e752e15a52b72 Author: David Howells Date: Thu Feb 6 14:22:27 2020 +0000 afs: Move key to afs_read struct Stash the key used to authenticate read operations in the afs_read struct. This will be necessary to reissue the operation against the server if a read from the cache fails in upcoming cache changes. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/158861248336.340223.1851189950710196001.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/159465823899.1377938.11925978022348532049.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588529557.3465195.7303323479305254243.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118147693.1232039.13780672951838643842.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161043340.2537118.511899217704140722.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340406678.1303470.12676824086429446370.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539550819.286939.1268332875889175195.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653806683.2770958.11300984379283401542.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789089556.6155.14603302893431820997.stgit@warthog.procyon.org.uk/ # v6 commit f015cf1d6b660fc5933baecab2917357e669916b Author: David Howells Date: Thu Oct 22 14:38:15 2020 +0100 afs: Print the operation debug_id when logging an unexpected data version Print the afs_operation debug_id when logging an unexpected change in the data version. This allows the logged message to be matched against tracelines. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/160588528377.3465195.2206051235095182302.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118146111.1232039.11398082422487058312.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161042180.2537118.2471333561661033316.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340405772.1303470.3877167548944248214.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539549628.286939.15234870409714613954.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653805530.2770958.15120507632529970934.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789088290.6155.3494369629853673866.stgit@warthog.procyon.org.uk/ # v6 commit 67d78a6f6e7b38c1beb7d8c09c6d40f8682e60b1 Author: David Howells Date: Wed Oct 28 14:23:46 2020 +0000 afs: Pass page into dirty region helpers to provide THP size Pass a pointer to the page being accessed into the dirty region helpers so that the size of the page can be determined in case it's a transparent huge page. This also required the page to be passed into the afs_page_dirty trace point - so there's no need to specifically pass in the index or private data as these can be retrieved directly from the page struct. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/160588527183.3465195.16107942526481976308.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118144921.1232039.11377711180492625929.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161040747.2537118.11435394902674511430.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340404553.1303470.11414163641767769882.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539548385.286939.8864598314493255313.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653804285.2770958.3497360004849598038.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789087043.6155.16922142208140170528.stgit@warthog.procyon.org.uk/ # v6 commit 03ffae909278bd773ae4ce0f15fd8fd77a7b08a4 Author: David Howells Date: Mon Feb 10 10:00:22 2020 +0000 afs: Disable use of the fscache I/O routines Disable use of the fscache I/O routined by the AFS filesystem. It's about to transition to passing iov_iters down and fscache is about to have its I/O path to use iov_iter, so all that needs to change. Signed-off-by: David Howells Tested-By: Marc Dionne cc: linux-afs@lists.infradead.org cc: linux-cachefs@redhat.com cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/158861209824.340223.1864211542341758994.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/159465768717.1376105.2229314852486665807.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588457929.3465195.1730097418904945578.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118143744.1232039.2727898205333669064.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161039077.2537118.7986870854927176905.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340403323.1303470.8159439948319423431.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539547167.286939.3536238932531122332.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653802797.2770958.547311814861545911.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789085806.6155.2596146255056027428.stgit@warthog.procyon.org.uk/ # v6 commit 5ffa828534036348fa90fb3079ccc0972d202c4a Author: Dan Carpenter Date: Fri Apr 23 09:39:19 2021 +0930 soc: aspeed: fix a ternary sign expansion bug The intent here was to return negative error codes but it actually returns positive values. The problem is that type promotion with ternary operations is quite complicated. "ret" is an int. "copied" is a u32. And the snoop_file_read() function returns long. What happens is that "ret" is cast to u32 and becomes positive then it's cast to long and it's still positive. Fix this by removing the ternary so that "ret" is type promoted directly to long. Fixes: 3772e5da4454 ("drivers/misc: Aspeed LPC snoop output using misc chardev") Signed-off-by: Dan Carpenter Signed-off-by: Joel Stanley Reviewed-by: Patrick Venture Link: https://lore.kernel.org/r/YIE90PSXsMTa2Y8n@mwanda Link: https://lore.kernel.org/r/20210423000919.1249474-1-joel@jms.id.au' Signed-off-by: Arnd Bergmann commit 26aaeffcafe6cbb7c3978fa6ed7555122f8c9f8c Author: David Howells Date: Mon Feb 22 11:39:47 2021 +0000 fscache, cachefiles: Add alternate API to use kiocb for read/write to cache Add an alternate API by which the cache can be accessed through a kiocb, doing async DIO, rather than using the current API that tells the cache where all the pages are. The new API is intended to be used in conjunction with the netfs helper library. A filesystem must pick one or the other and not mix them. Filesystems wanting to use the new API must #define FSCACHE_USE_NEW_IO_API before #including the header. This prevents them from continuing to use the old API at the same time as there are incompatibilities in how the PG_fscache page bit is used. Changes: v6: - Provide a routine to shape a write so that the start and length can be aligned for DIO[3]. v4: - Use the vfs_iocb_iter_read/write() helpers[1] - Move initial definition of fscache_begin_read_operation() here. - Remove a commented-out line[2] - Combine ki->term_func calls in cachefiles_read_complete()[2]. - Remove explicit NULL initialiser[2]. - Remove extern on func decl[2]. - Put in param names on func decl[2]. - Remove redundant else[2]. - Fill out the kdoc comment for fscache_begin_read_operation(). - Rename fs/fscache/page2.c to io.c to match later patches. Signed-off-by: David Howells Reviewed-and-tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Christoph Hellwig cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20210216102614.GA27555@lst.de/ [1] Link: https://lore.kernel.org/r/20210216084230.GA23669@lst.de/ [2] Link: https://lore.kernel.org/r/161781047695.463527.7463536103593997492.stgit@warthog.procyon.org.uk/ [3] Link: https://lore.kernel.org/r/161118142558.1232039.17993829899588971439.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161037850.2537118.8819808229350326503.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340402057.1303470.8038373593844486698.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539545919.286939.14573472672781434757.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653801477.2770958.10543270629064934227.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789084517.6155.12799689829859169640.stgit@warthog.procyon.org.uk/ # v6 commit 0246f3e5737d0b083baefa552fecedd90832dad0 Author: David Howells Date: Tue Apr 6 17:31:54 2021 +0100 netfs: Add a tracepoint to log failures that would be otherwise unseen Add a tracepoint to log internal failures (such as cache errors) that we don't otherwise want to pass back to the netfs. Signed-off-by: David Howells Tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/161781048813.463527.1557000804674707986.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/161789082749.6155.15498680577213140870.stgit@warthog.procyon.org.uk/ # v6 commit 726218fdc22c9b52f16e1228499a804bbf262a20 Author: David Howells Date: Thu Feb 6 14:22:24 2020 +0000 netfs: Define an interface to talk to a cache Add an interface to the netfs helper library for reading data from the cache instead of downloading it from the server and support for writing data just downloaded or cleared to the cache. The API passes an iov_iter to the cache read/write routines to indicate the data/buffer to be used. This is done using the ITER_XARRAY type to provide direct access to the netfs inode's pagecache. When the netfs's ->begin_cache_operation() method is called, this must fill in the cache_resources in the netfs_read_request struct, including the netfs_cache_ops used by the helper lib to talk to the cache. The helper lib does not directly access the cache. Changes: v6: - Call trace_netfs_read() after beginning the cache op so that the cookie debug ID can be logged[3]. - Don't record the error from writing to the cache. We don't want to pass it back to the netfs[4]. - Fix copy-to-cache subreq amalgamation to not round up as it goes along otherwise it overcalculates the length of the write[5]. v5: - Use end_page_fscache() rather than unlock_page_fscache()[2]. v4: - Added flag to netfs_subreq_terminated() to indicate that the caller may have been running async and stuff that might sleep needs punting to a workqueue (can't use in_softirq()[1]). - Add missing inc of netfs_n_rh_read stat. - Move initial definition of fscache_begin_read_operation() elsewhere. - Need to call op->begin_cache_operation() from netfs_write_begin(). Signed-off-by: David Howells Reviewed-and-tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20210216084230.GA23669@lst.de/ [1] Link: https://lore.kernel.org/r/2499407.1616505440@warthog.procyon.org.uk/ [2] Link: https://lore.kernel.org/r/161781045123.463527.14533348855710902201.stgit@warthog.procyon.org.uk/ [3] Link: https://lore.kernel.org/r/161781046256.463527.18158681600085556192.stgit@warthog.procyon.org.uk/ [4] Link: https://lore.kernel.org/r/161781047695.463527.7463536103593997492.stgit@warthog.procyon.org.uk/ [5] Link: https://lore.kernel.org/r/161118141321.1232039.8296910406755622458.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161036700.2537118.11170748455436854978.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340399569.1303470.1138884774643385730.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539542874.286939.13337898213448136687.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653799826.2770958.9015430297426331950.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789081462.6155.3853904866933313256.stgit@warthog.procyon.org.uk/ # v6 commit e1b1240c1ff5f8bfba797f14996d8bac8a9ec437 Author: David Howells Date: Tue Sep 22 11:06:07 2020 +0100 netfs: Add write_begin helper Add a helper to do the pre-reading work for the netfs write_begin address space op. Changes v6: - Fixed a missing rreq put in netfs_write_begin()[3]. - Use DEFINE_READAHEAD()[4]. v5: - Made the wait for PG_fscache in netfs_write_begin() killable[2]. v4: - Added flag to netfs_subreq_terminated() to indicate that the caller may have been running async and stuff that might sleep needs punting to a workqueue (can't use in_softirq()[1]). Signed-off-by: David Howells Reviewed-and-tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20210216084230.GA23669@lst.de/ [1] Link: https://lore.kernel.org/r/2499407.1616505440@warthog.procyon.org.uk/ [2] Link: https://lore.kernel.org/r/161781042127.463527.9154479794406046987.stgit@warthog.procyon.org.uk/ [3] Link: https://lore.kernel.org/r/1234933.1617886271@warthog.procyon.org.uk/ [4] Link: https://lore.kernel.org/r/160588543960.3465195.2792938973035886168.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118140165.1232039.16418853874312234477.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161035539.2537118.15674887534950908530.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340398368.1303470.11242918276563276090.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539541541.286939.1889738674057013729.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653798616.2770958.17213315845968485563.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789080530.6155.1011847312392330491.stgit@warthog.procyon.org.uk/ # v6 commit 289af54cc67ace285b6d4335a54324562894c4e2 Author: David Howells Date: Tue Nov 3 11:32:41 2020 +0000 netfs: Gather stats Gather statistics from the netfs interface that can be exported through a seqfile. This is intended to be called by a later patch when viewing /proc/fs/fscache/stats. Signed-off-by: David Howells Reviewed-and-tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/161118139247.1232039.10556850937548511068.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161034669.2537118.2761232524997091480.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340397101.1303470.17581910581108378458.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539539959.286939.6794352576462965914.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653797700.2770958.5801990354413178228.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789079281.6155.17141344853277186500.stgit@warthog.procyon.org.uk/ # v6 commit 77b4d2c6316ab096e3f77eea240144941434f2a4 Author: David Howells Date: Fri Sep 18 09:25:13 2020 +0100 netfs: Add tracepoints Add three tracepoints to track the activity of the read helpers: (1) netfs/netfs_read This logs entry to the read helpers and also expansion of the range in a readahead request. (2) netfs/netfs_rreq This logs the progress of netfs_read_request objects which track read requests. A read request may be a compound of multiple subrequests. (3) netfs/netfs_sreq This logs the progress of netfs_read_subrequest objects, which track the contributions from various sources to a read request. Signed-off-by: David Howells Reviewed-and-tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/161118138060.1232039.5353374588021776217.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161033468.2537118.14021843889844001905.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340395843.1303470.7355519662919639648.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539538693.286939.10171713520419106334.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653796447.2770958.1870655382450862155.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789078003.6155.17814844411672989942.stgit@warthog.procyon.org.uk/ # v6 commit 3d3c95046742e4eebaa4b891b0b01cbbed94ebbd Author: David Howells Date: Wed May 13 17:41:20 2020 +0100 netfs: Provide readahead and readpage netfs helpers Add a pair of helper functions: (*) netfs_readahead() (*) netfs_readpage() to do the work of handling a readahead or a readpage, where the page(s) that form part of the request may be split between the local cache, the server or just require clearing, and may be single pages and transparent huge pages. This is all handled within the helper. Note that while both will read from the cache if there is data present, only netfs_readahead() will expand the request beyond what it was asked to do, and only netfs_readahead() will write back to the cache. netfs_readpage(), on the other hand, is synchronous and only fetches the page (which might be a THP) it is asked for. The netfs gives the helper parameters from the VM, the cache cookie it wants to use (or NULL) and a table of operations (only one of which is mandatory): (*) expand_readahead() [optional] Called to allow the netfs to request an expansion of a readahead request to meet its own alignment requirements. This is done by changing rreq->start and rreq->len. (*) clamp_length() [optional] Called to allow the netfs to cut down a subrequest to meet its own boundary requirements. If it does this, the helper will generate additional subrequests until the full request is satisfied. (*) is_still_valid() [optional] Called to find out if the data just read from the cache has been invalidated and must be reread from the server. (*) issue_op() [required] Called to ask the netfs to issue a read to the server. The subrequest describes the read. The read request holds information about the file being accessed. The netfs can cache information in rreq->netfs_priv. Upon completion, the netfs should set the error, transferred and can also set FSCACHE_SREQ_CLEAR_TAIL and then call fscache_subreq_terminated(). (*) done() [optional] Called after the pages have been unlocked. The read request is still pinning the file and mapping and may still be pinning pages with PG_fscache. rreq->error indicates any error that has been accumulated. (*) cleanup() [optional] Called when the helper is disposing of a finished read request. This allows the netfs to clear rreq->netfs_priv. Netfs support is enabled with CONFIG_NETFS_SUPPORT=y. It will be built even if CONFIG_FSCACHE=n and in this case much of it should be optimised away, allowing the filesystem to use it even when caching is disabled. Changes: v5: - Comment why netfs_readahead() is putting pages[2]. - Use page_file_mapping() rather than page->mapping[2]. - Use page_index() rather than page->index[2]. - Use set_page_fscache()[3] rather then SetPageFsCache() as this takes an appropriate ref too[4]. v4: - Folded in a kerneldoc comment fix. - Folded in a fix for the error handling in the case that ENOMEM occurs. - Added flag to netfs_subreq_terminated() to indicate that the caller may have been running async and stuff that might sleep needs punting to a workqueue (can't use in_softirq()[1]). Signed-off-by: David Howells Reviewed-and-tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20210216084230.GA23669@lst.de/ [1] Link: https://lore.kernel.org/r/20210321014202.GF3420@casper.infradead.org/ [2] Link: https://lore.kernel.org/r/2499407.1616505440@warthog.procyon.org.uk/ [3] Link: https://lore.kernel.org/r/CAHk-=wh+2gbF7XEjYc=HV9w_2uVzVf7vs60BPz0gFA=+pUm3ww@mail.gmail.com/ [4] Link: https://lore.kernel.org/r/160588497406.3465195.18003475695899726222.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118136849.1232039.8923686136144228724.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161032290.2537118.13400578415247339173.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340394873.1303470.6237319335883242536.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539537375.286939.16642940088716990995.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653795430.2770958.4947584573720000554.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789076581.6155.6745849361504760209.stgit@warthog.procyon.org.uk/ # v6 commit 99bff93c17c05470196b2c4e699c3e58d327022b Author: David Howells Date: Mon Feb 15 13:20:46 2021 +0000 netfs, mm: Add set/end/wait_on_page_fscache() aliases Add set/end/wait_on_page_fscache() as aliases of set/end/wait_page_private_2(). These allow a page to marked with PG_fscache, the flag to be removed and waiters woken and waiting for the flag to be cleared. A ref on the page is also taken and dropped. [Linus suggested putting the fscache-themed functions into the caching-specific headers rather than pagemap.h[1]] Changes: v5: - Mirror the changes to the core routines[2]. Signed-off-by: David Howells Tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Linus Torvalds cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/1330473.1612974547@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/CAHk-=wjgA-74ddehziVk=XAEMTKswPu1Yw4uaro1R3ibs27ztw@mail.gmail.com/ [1] Link: https://lore.kernel.org/r/161340393568.1303470.4997526899111310530.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539536093.286939.5076448803512118764.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/2499407.1616505440@warthog.procyon.org.uk/ [2] Link: https://lore.kernel.org/r/161653793873.2770958.12157243390965814502.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789075327.6155.7432127924219092385.stgit@warthog.procyon.org.uk/ # v6 commit b533a83f2bf97c22ab862a7493d13d80c93696f0 Author: David Howells Date: Mon Feb 15 13:23:33 2021 +0000 netfs, mm: Move PG_fscache helper funcs to linux/netfs.h Move the PG_fscache related helper funcs (such as SetPageFsCache()) to linux/netfs.h rather than linux/fscache.h as the intention is to move to a model where they're used by the network filesystem and the helper library, but not by fscache/cachefiles itself. Signed-off-by: David Howells Tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/161340392347.1303470.18065131603507621762.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539534516.286939.6265142985563005000.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653792959.2770958.5386546945273988117.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789073997.6155.18442271115255650614.stgit@warthog.procyon.org.uk/ # v6 commit fb28afccdb9717173dbe3c42d9649fb7f47b6e6e Author: David Howells Date: Mon Feb 22 13:17:24 2021 +0000 netfs: Documentation for helper library Add interface documentation for the netfs helper library. Signed-off-by: David Howells cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/161539533275.286939.6246011228676840978.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653791767.2770958.2012814194145060913.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789072591.6155.9448294406920216219.stgit@warthog.procyon.org.uk/ # v6 commit 3a5829fefd3bb50a4d724f44d016c74b8f19b352 Author: David Howells Date: Fri Oct 30 15:26:31 2020 +0000 netfs: Make a netfs helper module Make a netfs helper module to manage read request segmentation, caching support and transparent huge page support on behalf of a network filesystem. Signed-off-by: David Howells Reviewed-and-tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Matthew Wilcox cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/160588496284.3465195.10102643717770106661.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118135638.1232039.1622182202673126285.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161031028.2537118.1213974428943508753.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340391427.1303470.14884950716721956560.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539531569.286939.18317119181653706665.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653790328.2770958.6710423217716151549.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789071202.6155.16519256513958534906.stgit@warthog.procyon.org.uk/ # v6 commit 3ca236440126f75c91281c53f137794b8d5f884a Author: David Howells Date: Thu Sep 10 14:03:27 2020 +0100 mm: Implement readahead_control pageset expansion Provide a function, readahead_expand(), that expands the set of pages specified by a readahead_control object to encompass a revised area with a proposed size and length. The proposed area must include all of the old area and may be expanded yet more by this function so that the edges align on (transparent huge) page boundaries as allocated. The expansion will be cut short if a page already exists in either of the areas being expanded into. Note that any expansion made in such a case is not rolled back. This will be used by fscache so that reads can be expanded to cache granule boundaries, thereby allowing whole granules to be stored in the cache, but there are other potential users also. Changes: v6: - Fold in a patch from Matthew Wilcox to tell the ondemand readahead algorithm about the expansion so that the next readahead starts at the right place[2]. v4: - Moved the declaration of readahead_expand() to a better place[1]. Suggested-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Reviewed-by: Matthew Wilcox (Oracle) Tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Alexander Viro cc: Christoph Hellwig cc: Mike Marshall cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/20210217161358.GM2858050@casper.infradead.org/ [1] Link: https://lore.kernel.org/r/20210407201857.3582797-4-willy@infradead.org/ [2] Link: https://lore.kernel.org/r/159974633888.2094769.8326206446358128373.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588479816.3465195.553952688795241765.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118131787.1232039.4863969952441067985.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161028670.2537118.13831420617039766044.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340389201.1303470.14353807284546854878.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539530488.286939.18085961677838089157.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653789422.2770958.2108046612147345000.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789069829.6155.4295672417565512161.stgit@warthog.procyon.org.uk/ # v6 commit f615bd5c4725fde94387d3f0f4e752b4c01a4592 Author: Matthew Wilcox (Oracle) Date: Wed Apr 21 18:09:23 2021 +0100 mm/readahead: Handle ractl nr_pages being modified Filesystems are not currently permitted to modify the number of pages in the ractl. An upcoming patch to add readahead_expand() changes that rule, so remove the check and resync the loop counter after every call to the filesystem. Tested-by: Jeff Layton Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Link: https://lore.kernel.org/r/20210420200116.3715790-1-willy@infradead.org/ Link: https://lore.kernel.org/r/20210421170923.4005574-1-willy@infradead.org/ # v2 commit c790fbf20a53e8297c97ddb1c0c9d41c060067f3 Author: Matthew Wilcox (Oracle) Date: Wed Apr 7 21:18:56 2021 +0100 fs: Document file_ra_state Turn the comments into kernel-doc and improve the wording slightly. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne Link: https://lore.kernel.org/r/20210407201857.3582797-3-willy@infradead.org/ Link: https://lore.kernel.org/r/161789068619.6155.1397999970593531574.stgit@warthog.procyon.org.uk/ # v6 commit fcd9ae4f7f3b5fbd549285bab0478a339113620e Author: Matthew Wilcox (Oracle) Date: Wed Apr 7 21:18:55 2021 +0100 mm/filemap: Pass the file_ra_state in the ractl For readahead_expand(), we need to modify the file ra_state, so pass it down by adding it to the ractl. We have to do this because it's not always the same as f_ra in the struct file that is already being passed. Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: David Howells Tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne Link: https://lore.kernel.org/r/20210407201857.3582797-2-willy@infradead.org/ Link: https://lore.kernel.org/r/161789067431.6155.8063840447229665720.stgit@warthog.procyon.org.uk/ # v6 commit 73e10ded33a1cfc0c72404aaedc493e9813b6239 Author: David Howells Date: Mon Feb 10 10:00:21 2020 +0000 mm: Add set/end/wait functions for PG_private_2 Add three functions to manipulate PG_private_2: (*) set_page_private_2() - Set the flag and take an appropriate reference on the flagged page. (*) end_page_private_2() - Clear the flag, drop the reference and wake up any waiters, somewhat analogously with end_page_writeback(). (*) wait_on_page_private_2() - Wait for the flag to be cleared. Wrappers will need to be placed in the netfs lib header in the patch that adds that. [This implements a suggestion by Linus[1] to not mix the terminology of PG_private_2 and PG_fscache in the mm core function] Changes: v7: - Use compound_head() in all the functions to make them THP safe[6]. v5: - Add set and end functions, calling the end function end rather than unlock[3]. - Keep a ref on the page when PG_private_2 is set[4][5]. v4: - Remove extern from the declaration[2]. Suggested-by: Linus Torvalds Signed-off-by: David Howells Reviewed-by: Matthew Wilcox (Oracle) Tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Alexander Viro cc: Christoph Hellwig cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/1330473.1612974547@warthog.procyon.org.uk/ # v1 Link: https://lore.kernel.org/r/CAHk-=wjgA-74ddehziVk=XAEMTKswPu1Yw4uaro1R3ibs27ztw@mail.gmail.com/ [1] Link: https://lore.kernel.org/r/20210216102659.GA27714@lst.de/ [2] Link: https://lore.kernel.org/r/161340387944.1303470.7944159520278177652.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539528910.286939.1252328699383291173.stgit@warthog.procyon.org.uk # v4 Link: https://lore.kernel.org/r/20210321105309.GG3420@casper.infradead.org [3] Link: https://lore.kernel.org/r/CAHk-=wh+2gbF7XEjYc=HV9w_2uVzVf7vs60BPz0gFA=+pUm3ww@mail.gmail.com/ [4] Link: https://lore.kernel.org/r/CAHk-=wjSGsRj7xwhSMQ6dAQiz53xA39pOG+XA_WeTgwBBu4uqg@mail.gmail.com/ [5] Link: https://lore.kernel.org/r/20210408145057.GN2531743@casper.infradead.org/ [6] Link: https://lore.kernel.org/r/161653788200.2770958.9517755716374927208.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789066013.6155.9816857201817288382.stgit@warthog.procyon.org.uk/ # v6 commit 7ff5062079ef5c2f92af0c770dfc0ab925fa2128 Author: David Howells Date: Mon Feb 10 10:00:21 2020 +0000 iov_iter: Add ITER_XARRAY Add an iterator, ITER_XARRAY, that walks through a set of pages attached to an xarray, starting at a given page and offset and walking for the specified amount of bytes. The iterator supports transparent huge pages. The iterate_xarray() macro calls the helper function with rcu_access() helped. I think that this is only a problem for iov_iter_for_each_range() - and that returns an error for ITER_XARRAY (also, this function does not appear to be called). The caller must guarantee that the pages are all present and they must be locked using PG_locked, PG_writeback or PG_fscache to prevent them from going away or being migrated whilst they're being accessed. This is useful for copying data from socket buffers to inodes in network filesystems and for transferring data between those inodes and the cache using direct I/O. Whilst it is true that ITER_BVEC could be used instead, that would require a bio_vec array to be allocated to refer to all the pages - which should be redundant if inode->i_pages also points to all these pages. Note that older versions of this patch implemented an ITER_MAPPING instead, which was almost the same. Changes: v7: - Rename iter_xarray_copy_pages() to iter_xarray_populate_pages()[1]. Signed-off-by: David Howells Reviewed-and-tested-by: Jeff Layton Tested-by: Dave Wysochanski Tested-By: Marc Dionne cc: Alexander Viro cc: Matthew Wilcox (Oracle) cc: Christoph Hellwig cc: linux-mm@kvack.org cc: linux-cachefs@redhat.com cc: linux-afs@lists.infradead.org cc: linux-nfs@vger.kernel.org cc: linux-cifs@vger.kernel.org cc: ceph-devel@vger.kernel.org cc: v9fs-developer@lists.sourceforge.net cc: linux-fsdevel@vger.kernel.org Link: https://lore.kernel.org/r/3577430.1579705075@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/158861205740.340223.16592990225607814022.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/159465785214.1376674.6062549291411362531.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/160588477334.3465195.3608963255682568730.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161118129703.1232039.17141248432017826976.stgit@warthog.procyon.org.uk/ # rfc Link: https://lore.kernel.org/r/161161026313.2537118.14676007075365418649.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161340386671.1303470.10752208972482479840.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/161539527815.286939.14607323792547049341.stgit@warthog.procyon.org.uk/ # v4 Link: https://lore.kernel.org/r/161653786033.2770958.14154191921867463240.stgit@warthog.procyon.org.uk/ # v5 Link: https://lore.kernel.org/r/161789064740.6155.11932541175173658065.stgit@warthog.procyon.org.uk/ # v6 Link: https://lore.kernel.org/r/27c369a8f42bb8a617672b2dc0126a5c6df5a050.camel@kernel.org [1] commit aea0440ad023ab0662299326f941214b0d7480bd Author: Avri Altman Date: Tue Apr 20 16:46:41 2021 +0300 mmc: block: Update ext_csd.cache_ctrl if it was written The cache function can be turned ON and OFF by writing to the CACHE_CTRL byte (EXT_CSD byte [33]). However, card->ext_csd.cache_ctrl is only set on init if cache size > 0. Fix that by explicitly setting ext_csd.cache_ctrl on ext-csd write. Signed-off-by: Avri Altman Acked-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210420134641.57343-3-avri.altman@wdc.com Signed-off-by: Ulf Hansson commit a929e124060c448b367f56b28a0c118876147b1f Author: Jan Beulich Date: Wed Apr 7 16:37:58 2021 +0200 xen-pciback: simplify vpci's find hook There's no point in comparing SBDF - we can simply compare the struct pci_dev pointers. If they weren't the same for a given device, we'd have bigger problems from having stored a stale pointer. Signed-off-by: Jan Beulich Reviewed-by: Boris Ostrovsky Link: https://lore.kernel.org/r/158273a2-d1b9-3545-b25d-affca867376c@suse.com Signed-off-by: Juergen Gross commit e7a1c1300891d8f11d05b42665e299cc22a4b383 Author: Li RongQing Date: Wed Apr 14 13:39:12 2021 +0800 xsk: Align XDP socket batch size with DPDK DPDK default burst size is 32, however, kernel xsk sendto syscall can not handle all 32 at one time, and return with error. So make kernel XDP socket batch size larger to avoid unnecessary syscall fail and context switch which will help to increase performance. Signed-off-by: Li RongQing Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Link: https://lore.kernel.org/bpf/1618378752-4191-1-git-send-email-lirongqing@baidu.com commit ec3307a5bb6823bd687a660c1ece9b271e0b1288 Author: Bjorn Helgaas Date: Tue Jan 26 14:55:09 2021 -0600 xen-blkfront: Fix 'physical' typos Fix misspelling of "physical". Signed-off-by: Bjorn Helgaas Acked-by: Roger Pau Monné Link: https://lore.kernel.org/r/20210126205509.2917606-1-helgaas@kernel.org Signed-off-by: Juergen Gross commit d75e7f63b7c95c527cde42efb5d410d7f961498f Author: Paul Durrant Date: Tue Feb 2 17:56:59 2021 +0000 xen-blkback: fix compatibility bug with single page rings Prior to commit 4a8c31a1c6f5 ("xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront"), the behaviour of xen-blkback when connecting to a frontend was: - read 'ring-page-order' - if not present then expect a single page ring specified by 'ring-ref' - else expect a ring specified by 'ring-refX' where X is between 0 and 1 << ring-page-order This was correct behaviour, but was broken by the afforementioned commit to become: - read 'ring-page-order' - if not present then expect a single page ring (i.e. ring-page-order = 0) - expect a ring specified by 'ring-refX' where X is between 0 and 1 << ring-page-order - if that didn't work then see if there's a single page ring specified by 'ring-ref' This incorrect behaviour works most of the time but fails when a frontend that sets 'ring-page-order' is unloaded and replaced by one that does not because, instead of reading 'ring-ref', xen-blkback will read the stale 'ring-ref0' left around by the previous frontend will try to map the wrong grant reference. This patch restores the original behaviour. Fixes: 4a8c31a1c6f5 ("xen/blkback: rework connect_ring() to avoid inconsistent xenstore 'ring-page-order' set by malicious blkfront") Signed-off-by: Paul Durrant Reviewed-by: Dongli Zhang Reviewed-by: "Roger Pau Monné" Link: https://lore.kernel.org/r/20210202175659.18452-1-paul@xen.org Signed-off-by: Juergen Gross commit 01325044dbe47a7dc66b786445727a6de304f328 Author: Boris Ostrovsky Date: Tue Apr 13 13:52:24 2021 -0400 xen: Remove support for PV ACPI cpu/memory hotplug Commit 76fc253723ad ("xen/acpi-stub: Disable it b/c the acpi_processor_add is no longer called.") declared as BROKEN support for Xen ACPI stub (which is required for xen-acpi-{cpu|memory}-hotplug) and suggested that this is temporary and will be soon fixed. This was in March 2013. Further, commit cfafae940381 ("xen: rename dom0_op to platform_op") renamed an interface used by memory hotplug code without updating that code (as it was BROKEN and therefore not compiled). This was in November 2015 and has gone unnoticed for over 5 year. It is now clear that this code is of no interest to anyone and therefore should be removed. Signed-off-by: Boris Ostrovsky Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/1618336344-3162-1-git-send-email-boris.ostrovsky@oracle.com Signed-off-by: Juergen Gross commit edd602146507532c1714d8428f654b87205f492e Author: Andy Shevchenko Date: Mon Apr 19 14:24:59 2021 +0300 mmc: mmc_spi: Make of_mmc_spi.c resource provider agnostic In order to use the same driver on non-OF platforms, make of_mmc_spi.c resource provider agnostic. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210419112459.25241-6-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit 7240803b2b850a9b4b005a7a95f17ce362d24bfb Author: Andy Shevchenko Date: Mon Apr 19 14:24:58 2021 +0300 mmc: mmc_spi: Use already parsed IRQ SPI core already parses and maps IRQ for us if provided. Use it instead of double parsing in mmc_spi_get_pdata(). Due to above, change condition, since SPI core can hold an error pointer as invalid IRQ. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210419112459.25241-5-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit 6738fbc08f302a965080fd404f7408759caf8cd2 Author: Andy Shevchenko Date: Mon Apr 19 14:24:57 2021 +0300 mmc: mmc_spi: Drop unused NO_IRQ definition After the commit 073350f7b562 ("mmc: mmc_spi: Fix return value evaluation of irq_of_parse_and_map()") the NO_IRQ is not used anymore, drop it for good. Fixes: 073350f7b562 ("mmc: mmc_spi: Fix return value evaluation of irq_of_parse_and_map()") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210419112459.25241-4-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit 6c857ccf4eedfdf8b8cabdd36e3675469f59d31b Author: Andy Shevchenko Date: Mon Apr 19 14:24:56 2021 +0300 mmc: mmc_spi: Set up polling even if voltage-ranges is not present When voltage-ranges property is not present the driver assumes that it is 3.3v (3.2v..3.4v). But at the same time it disallows polling. Fix that by dropping the comparison to 0 when no property is provided. While at it, mark voltage-ranges property optional as it was initially. Fixes: 9c43df57910b ("mmc_spi: Add support for OpenFirmware bindings") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210419112459.25241-3-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit 6dab809bb5b183015e19d558bfa95107de660be0 Author: Andy Shevchenko Date: Mon Apr 19 14:24:55 2021 +0300 mmc: core: Convert mmc_of_parse_voltage() to use device property API mmc_of_parse() for a few years has been using device property API. Convert mmc_of_parse_voltage() as well. At the same time switch users to new API. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210419112459.25241-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit 0f2c771e74b56e8c0101cac2b8671bcf6feccd96 Author: Andy Shevchenko Date: Mon Apr 19 14:24:54 2021 +0300 mmc: core: Correct descriptions in mmc_of_parse() Since it has been converted to use device property API, the function and field descriptions become outdated. Correct them. Fixes: 73a47a9bb3e2 ("mmc: core: Use device_property_read instead of of_property_read") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210419112459.25241-1-andriy.shevchenko@linux.intel.com Signed-off-by: Ulf Hansson commit 28738fab6a424f58aea4b122ee96ee078ea1de93 Author: Muhammad Usama Anjum Date: Fri Mar 26 23:14:42 2021 +0500 xen/pciback: Fix incorrect type warnings Correct enum pci_channel_io_normal should be used instead of putting integer value 1. Fix following smatch warnings: drivers/xen/xen-pciback/pci_stub.c:805:40: warning: incorrect type in argument 2 (different base types) drivers/xen/xen-pciback/pci_stub.c:805:40: expected restricted pci_channel_state_t [usertype] state drivers/xen/xen-pciback/pci_stub.c:805:40: got int drivers/xen/xen-pciback/pci_stub.c:862:40: warning: incorrect type in argument 2 (different base types) drivers/xen/xen-pciback/pci_stub.c:862:40: expected restricted pci_channel_state_t [usertype] state drivers/xen/xen-pciback/pci_stub.c:862:40: got int drivers/xen/xen-pciback/pci_stub.c:973:31: warning: incorrect type in argument 2 (different base types) drivers/xen/xen-pciback/pci_stub.c:973:31: expected restricted pci_channel_state_t [usertype] state drivers/xen/xen-pciback/pci_stub.c:973:31: got int Signed-off-by: Muhammad Usama Anjum Reviewed-by: Juergen Gross Link: https://lore.kernel.org/r/20210326181442.GA1735905@LEGION Signed-off-by: Juergen Gross commit ed8e50800bf4c2d904db9c75408a67085e6cca3d Author: Marco Elver Date: Thu Apr 22 21:18:23 2021 +0200 signal, perf: Add missing TRAP_PERF case in siginfo_layout() Add the missing TRAP_PERF case in siginfo_layout() for interpreting the layout correctly as SIL_PERF_EVENT instead of just SIL_FAULT. This ensures the si_perf field is copied and not just the si_addr field. This was caught and tested by running the perf_events/sigtrap_threads kselftest as a 32-bit binary with a 64-bit kernel. Fixes: fb6cc127e0b6 ("signal: Introduce TRAP_PERF si_code and si_perf to siginfo") Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210422191823.79012-2-elver@google.com commit 3ddb3fd8cdb0a6c11b7c8d91ba42d84c4ea3cc43 Author: Marco Elver Date: Thu Apr 22 21:18:22 2021 +0200 signal, perf: Fix siginfo_t by avoiding u64 on 32-bit architectures The alignment of a structure is that of its largest member. On architectures like 32-bit Arm (but not e.g. 32-bit x86) 64-bit integers will require 64-bit alignment and not its natural word size. This means that there is no portable way to add 64-bit integers to siginfo_t on 32-bit architectures without breaking the ABI, because siginfo_t does not yet (and therefore likely never will) contain 64-bit fields on 32-bit architectures. Adding a 64-bit integer could change the alignment of the union after the 3 initial int si_signo, si_errno, si_code, thus introducing 4 bytes of padding shifting the entire union, which would break the ABI. One alternative would be to use the __packed attribute, however, it is non-standard C. Given siginfo_t has definitions outside the Linux kernel in various standard libraries that can be compiled with any number of different compilers (not just those we rely on), using non-standard attributes on siginfo_t should be avoided to ensure portability. In the case of the si_perf field, word size is sufficient since there is no exact requirement on size, given the data it contains is user-defined via perf_event_attr::sig_data. On 32-bit architectures, any excess bits of perf_event_attr::sig_data will therefore be truncated when copying into si_perf. Since si_perf is intended to disambiguate events (e.g. encoding relevant information if there are more events of the same type), 32 bits should provide enough entropy to do so on 32-bit architectures. For 64-bit architectures, no change is intended. Fixes: fb6cc127e0b6 ("signal: Introduce TRAP_PERF si_code and si_perf to siginfo") Reported-by: Marek Szyprowski Reported-by: Jon Hunter Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Tested-by: Marek Szyprowski Tested-by: Jon Hunter Link: https://lkml.kernel.org/r/20210422191823.79012-1-elver@google.com commit 32d35c4a96ec79446f0d7be308a6eb248b507a0b Author: Colin Ian King Date: Tue Apr 20 15:29:07 2021 +0100 perf/x86: Allow for 8 8. Fix this by making 0x03 a ULL so that the shift is performed using 64 bit arithmetic. This makes the arithmetic internally consistent and preparers for the day when hardware provides 8 Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210420142907.382417-1-colin.king@canonical.com commit 6b3788e5fb8041211ac2fa7c818ca9010e976a74 Author: Angelo Dureghello Date: Thu Apr 8 23:37:40 2021 +0200 m68k: coldfire: fix irq ranges Working on flexcan0, there was no way to have irq 128 working. Fix irq 128 and 196 setup. Signed-off-by: Angelo Dureghello Reviewed-by: Geert Uytterhoeven Signed-off-by: Greg Ungerer commit 09accc3a05f7f1a6486f4a278d209ac122289c0b Author: Damien Le Moal Date: Sat Apr 17 10:10:09 2021 +0900 riscv: Disable data start offset in flat binaries uclibc/gcc combined with elf2flt riscv linker file fully resolve the PC relative __global_pointer$ value at compile time and do not generate a relocation entry to set a correct value of the gp register at runtime. As a result, if the flatbin loader offsets the start of the data section, the relative position change between the text and data sections compared to the compile time positions results in an incorrect gp value being used. This causes flatbin executables to crash. Avoid this problem by enabling CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET automatically when CONFIG_RISCV is enabled and CONFIG_MMU is disabled. Signed-off-by: Damien Le Moal Acked-by: Palmer Dabbelt Signed-off-by: Greg Ungerer commit a1a1ca70deb3ec600eeabb21de7f3f48aaae5695 Merge: af8352f1ff54c a4394b6d0a273 Author: Dave Airlie Date: Fri Apr 23 12:56:21 2021 +1000 Merge tag 'drm-misc-next-fixes-2021-04-22' of git://anongit.freedesktop.org/drm/drm-misc into drm-next A few fixes for the next merge window, with some build fixes for anx7625 and lt8912b bridges, incorrect error handling for lt8912b and TTM, and one fix for TTM page limit accounting. Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210422163329.dvbuwre3akwdmzjt@gilmour commit fc5590fd56c9608f317729b59a56dad2a75d633f Author: Leonardo Bras Date: Thu Mar 18 14:44:17 2021 -0300 powerpc/kernel/iommu: Use largepool as a last resort when !largealloc As of today, doing iommu_range_alloc() only for !largealloc (npages <= 15) will only be able to use 3/4 of the available pages, given pages on largepool not being available for !largealloc. This could mean some drivers not being able to fully use all the available pages for the DMA window. Add pages on largepool as a last resort for !largealloc, making all pages of the DMA window available. Signed-off-by: Leonardo Bras Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210318174414.684630-2-leobras.c@gmail.com commit 3c0468d4451eb6b4f6604370639f163f9637a479 Author: Leonardo Bras Date: Thu Mar 18 14:44:14 2021 -0300 powerpc/kernel/iommu: Align size for IOMMU_PAGE_SIZE() to save TCEs Currently both iommu_alloc_coherent() and iommu_free_coherent() align the desired allocation size to PAGE_SIZE, and gets system pages and IOMMU mappings (TCEs) for that value. When IOMMU_PAGE_SIZE < PAGE_SIZE, this behavior may cause unnecessary TCEs to be created for mapping the whole system page. Example: - PAGE_SIZE = 64k, IOMMU_PAGE_SIZE() = 4k - iommu_alloc_coherent() is called for 128 bytes - 1 system page (64k) is allocated - 16 IOMMU pages (16 x 4k) are allocated (16 TCEs used) It would be enough to use a single TCE for this, so 15 TCEs are wasted in the process. Update iommu_*_coherent() to make sure the size alignment happens only for IOMMU_PAGE_SIZE() before calling iommu_alloc() and iommu_free(). Also, on iommu_range_alloc(), replace ALIGN(n, 1 << tbl->it_page_shift) with IOMMU_PAGE_ALIGN(n, tbl), which is easier to read and does the same. Signed-off-by: Leonardo Bras Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210318174414.684630-1-leobras.c@gmail.com commit 732de7dbdbd30df40a6d260a8da6fc5262039439 Author: Christoph Hellwig Date: Wed Apr 21 13:48:27 2021 -0700 xfs: rename struct xfs_legacy_ictimestamp Rename struct xfs_legacy_ictimestamp to struct xfs_log_legacy_timestamp as it is a type used for logging timestamps with no relationship to the in-core inode. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 6fc277c7c935c7e1fdee23e82da988d9d3cb6bef Author: Christoph Hellwig Date: Wed Apr 21 13:48:27 2021 -0700 xfs: rename xfs_ictimestamp_t Rename xfs_ictimestamp_t to xfs_log_timestamp_t as it is a type used for logging timestamps with no relationship to the in-core inode. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit bb556de79f0a9e647e8febe15786ee68483fa67b Merge: 27537929f30d3 dcabb06bf127b Author: David S. Miller Date: Thu Apr 22 15:08:35 2021 -0700 Merge branch 'RTL8211E-RGMII-D' Kunihiko Hayashi says: ==================== Change phy-mode to RGMII-ID to enable delay pins for RTL8211E UniPhier PXs2, LD20, and PXs3 boards have RTL8211E ethernet phy, and the phy have the RX/TX delays of RGMII interface using pull-ups on the RXDLY and TXDLY pins. After the commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"), the delays are working correctly, however, "rgmii" means no delay and the phy doesn't work. So need to set the phy-mode to "rgmii-id" to show that RX/TX delays are enabled. Changes since v1: - Fix the commit message ==================== Signed-off-by: David S. Miller commit dcabb06bf127b3e0d3fbc94a2b65dd56c2725851 Author: Kunihiko Hayashi Date: Fri Apr 23 02:31:49 2021 +0900 arm64: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E UniPhier LD20 and PXs3 boards have RTL8211E ethernet phy, and the phy have the RX/TX delays of RGMII interface using pull-ups on the RXDLY and TXDLY pins. After the commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"), the delays are working correctly, however, "rgmii" means no delay and the phy doesn't work. So need to set the phy-mode to "rgmii-id" to show that RX/TX delays are enabled. Fixes: c73730ee4c9a ("arm64: dts: uniphier: add AVE ethernet node") Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit 9ba585cc5b56ea14a453ba6be9bdb984ed33471a Author: Kunihiko Hayashi Date: Fri Apr 23 02:31:48 2021 +0900 ARM: dts: uniphier: Change phy-mode to RGMII-ID to enable delay pins for RTL8211E UniPhier PXs2 boards have RTL8211E ethernet phy, and the phy have the RX/TX delays of RGMII interface using pull-ups on the RXDLY and TXDLY pins. After the commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config"), the delays are working correctly, however, "rgmii" means no delay and the phy doesn't work. So need to set the phy-mode to "rgmii-id" to show that RX/TX delays are enabled. Fixes: e3cc931921d2 ("ARM: dts: uniphier: add AVE ethernet node") Signed-off-by: Kunihiko Hayashi Signed-off-by: David S. Miller commit cad4162a90aeff737a16c0286987f51e927f003a Merge: 79ebfb11fe084 676b7ec67d79a Author: David S. Miller Date: Thu Apr 22 15:02:41 2021 -0700 Merge branch 'stmmac-swmac-desc-prefetch' Mohammad Athari Bin Ismail says: ==================== Enable DWMAC HW descriptor prefetch This patch series to add setting for HW descriptor prefetch for DWMAC version 5.20 onwards. For Intel platform, enable the capability by default. ==================== Signed-off-by: David S. Miller commit 676b7ec67d79ae77c6634e75344d82fc4b885e65 Author: Mohammad Athari Bin Ismail Date: Thu Apr 22 15:55:01 2021 +0800 stmmac: intel: Enable HW descriptor prefetch by default Enable HW descriptor prefetch by default by setting plat->dma_cfg->dche = true in intel_mgbe_common_data(). Need to be noted that this capability only be supported in DWMAC core version 5.20 onwards. In stmmac, there is a checking to check the core version. If the core version is below 5.20, this capability wouldn`t be configured. Below is the iperf result comparison between HW descriptor prefetch disabled(DCHE=0b) and enabled(DCHE=1b). Tested on Intel Elkhartlake platform with DWMAC Core 5.20. Observed line rate performance improvement with HW descriptor prefetch enabled. DCHE = 0b [ 5] local 169.254.1.162 port 42123 connected to 169.254.244.142 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 96.7 MBytes 811 Mbits/sec 70050 [ 5] 1.00-2.00 sec 96.5 MBytes 809 Mbits/sec 69850 [ 5] 2.00-3.00 sec 96.3 MBytes 808 Mbits/sec 69720 [ 5] 3.00-4.00 sec 95.9 MBytes 804 Mbits/sec 69450 [ 5] 4.00-5.00 sec 96.0 MBytes 806 Mbits/sec 69530 [ 5] 5.00-6.00 sec 96.8 MBytes 812 Mbits/sec 70080 [ 5] 6.00-7.00 sec 96.9 MBytes 813 Mbits/sec 70140 [ 5] 7.00-8.00 sec 96.8 MBytes 812 Mbits/sec 70080 [ 5] 8.00-9.00 sec 97.0 MBytes 814 Mbits/sec 70230 [ 5] 9.00-10.00 sec 96.9 MBytes 813 Mbits/sec 70170 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 966 MBytes 810 Mbits/sec 0.000 ms 0/699300 (0%) sender [ 5] 0.00-10.00 sec 966 MBytes 810 Mbits/sec 0.011 ms 0/699265 (0%) receiver DCHE = 1b [ 5] local 169.254.1.162 port 49740 connected to 169.254.244.142 port 5201 [ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 97.9 MBytes 821 Mbits/sec 70880 [ 5] 1.00-2.00 sec 98.1 MBytes 823 Mbits/sec 71060 [ 5] 2.00-3.00 sec 98.2 MBytes 824 Mbits/sec 71140 [ 5] 3.00-4.00 sec 98.2 MBytes 824 Mbits/sec 71090 [ 5] 4.00-5.00 sec 98.1 MBytes 823 Mbits/sec 71050 [ 5] 5.00-6.00 sec 98.1 MBytes 823 Mbits/sec 71040 [ 5] 6.00-7.00 sec 98.1 MBytes 823 Mbits/sec 71050 [ 5] 7.00-8.00 sec 98.2 MBytes 824 Mbits/sec 71140 [ 5] 8.00-9.00 sec 98.2 MBytes 824 Mbits/sec 71120 [ 5] 9.00-10.00 sec 98.3 MBytes 824 Mbits/sec 71150 - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 981 MBytes 823 Mbits/sec 0.000 ms 0/710720 (0%) sender [ 5] 0.00-10.00 sec 981 MBytes 823 Mbits/sec 0.041 ms 0/710650 (0%) receiver Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: David S. Miller commit 96874c619c200bc704ae2d8e34a3746350922135 Author: Mohammad Athari Bin Ismail Date: Thu Apr 22 15:55:00 2021 +0800 net: stmmac: Add HW descriptor prefetch setting for DWMAC Core 5.20 onwards DWMAC Core 5.20 onwards supports HW descriptor prefetching. Additionally, it also depends on platform specific RTL configuration. This capability could be enabled by setting DMA_Mode bit-19 (DCHE). So, to enable this cability, platform must set plat->dma_cfg->dche = true and the DWMAC core version must be 5.20 onwards. Else, this capability wouldn`t be configured Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: David S. Miller commit 79ebfb11fe0848e916950787bb105f1c0559a577 Author: Hans Westgaard Ry Date: Thu Apr 22 08:21:40 2021 +0200 net/mlx4: Treat VFs fair when handling comm_channel_events Handling comm_channel_event in mlx4_master_comm_channel uses a double loop to determine which slaves have requested work. The search is always started at lowest slave. This leads to unfairness; lower VFs tends to be prioritized over higher VFs. The patch uses find_next_bit to determine which slaves to handle. Fairness is implemented by always starting at the next to the last start. An MPI program has been used to measure improvements. It runs 500 ibv_reg_mr, synchronizes with all other instances and then runs 500 ibv_dereg_mr. The results running 500 processes, time reported is for running 500 calls: ibv_reg_mr: Mod. Org. mlx4_1 403.356ms 424.674ms mlx4_2 403.355ms 424.674ms mlx4_3 403.354ms 424.674ms mlx4_4 403.355ms 424.674ms mlx4_5 403.357ms 424.677ms mlx4_6 403.354ms 424.676ms mlx4_7 403.357ms 424.675ms mlx4_8 403.355ms 424.675ms ibv_dereg_mr: Mod. Org. mlx4_1 116.408ms 142.818ms mlx4_2 116.434ms 142.793ms mlx4_3 116.488ms 143.247ms mlx4_4 116.679ms 143.230ms mlx4_5 112.017ms 107.204ms mlx4_6 112.032ms 107.516ms mlx4_7 112.083ms 184.195ms mlx4_8 115.089ms 190.618ms Suggested-by: Håkon Bugge Signed-off-by: Hans Westgaard Ry Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller commit 27537929f30d3136a71ef29db56127a33c92dad7 Author: Dan Carpenter Date: Thu Apr 22 12:10:28 2021 +0300 bnxt_en: fix ternary sign extension bug in bnxt_show_temp() The problem is that bnxt_show_temp() returns long but "rc" is an int and "len" is a u32. With ternary operations the type promotion is quite tricky. The negative "rc" is first promoted to u32 and then to long so it ends up being a high positive value instead of a a negative as we intended. Fix this by removing the ternary. Fixes: d69753fa1ecb ("bnxt_en: return proper error codes in bnxt_show_temp") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit c310e546164d5cca4c12faf9582b75989b030b68 Author: Colin Ian King Date: Thu Apr 22 13:04:12 2021 +0100 thermal/drivers/mtk_thermal: Remove redundant initializations of several variables Several variables are being initialized with values that is never read and 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 Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210422120412.246291-1-colin.king@canonical.com commit ab39c8853737158604e154ad3b03639e74082bd6 Author: Lukasz Luba Date: Thu Apr 22 16:36:24 2021 +0100 thermal/core/power allocator: Use the lockless __thermal_cdev_update() function Use the new helper function and avoid unnecessery second lock/unlock, which was present in old approach with thermal_cdev_update(). Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210422153624.6074-4-lukasz.luba@arm.com commit 1a93369810660905f5e89b527cd709fa6832f7c8 Author: Lukasz Luba Date: Thu Apr 22 16:36:23 2021 +0100 thermal/core/fair share: Use the lockless __thermal_cdev_update() function Use the new helper function and avoid unnecessery second lock/unlock, which was present in old approach with thermal_cdev_update(). Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210422153624.6074-3-lukasz.luba@arm.com commit fef05776eb02238dcad8d5514e666a42572c3f32 Author: Lukasz Luba Date: Thu Apr 22 16:36:22 2021 +0100 thermal/core/fair share: Lock the thermal zone while looping over instances The tz->lock must be hold during the looping over the instances in that thermal zone. This lock was missing in the governor code since the beginning, so it's hard to point into a particular commit. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210422153624.6074-2-lukasz.luba@arm.com commit 0952177f2a1f63ba87a1940fac21768f402c0b94 Author: Lukasz Luba Date: Thu Apr 22 12:43:08 2021 +0100 thermal/core/power_allocator: Update once cooling devices when temp is low The cooling device state change generates an event, also when there is no need, because temperature is low and device is not throttled. Avoid to unnecessary update the cooling device which means also not sending event. The cooling device state has not changed because the temperature is still below the first activation trip point value, so we can do this. Add a tracking mechanism to make sure it updates cooling devices only once - when the temperature dropps below first trip point. Reported-by: Daniel Lezcano Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210422114308.29684-4-lukasz.luba@arm.com commit d3b60ed9b135e2c652115db691a87dc28b324bea Author: Lukasz Luba Date: Thu Apr 22 12:43:07 2021 +0100 thermal/core/power_allocator: Maintain the device statistics from going stale When the temperature is below the first activation trip point the cooling devices are not checked, so they cannot maintain fresh statistics. It leads into the situation, when temperature crosses first trip point, the statistics are stale and show state for very long period. This has impact on IPA algorithm calculation and wrong decisions. Thus, check the cooling devices even when the temperature is low, to refresh these statistics. Signed-off-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210422114308.29684-3-lukasz.luba@arm.com commit 64ef3ddfa95ebf4606eedd3ec09a838e1c1af341 Author: Tiezhu Yang Date: Thu Apr 22 11:36:00 2021 +0800 bpf, doc: Fix some invalid links in bpf_devel_QA.rst There exist some errors "404 Not Found" when I click the link of "MAINTAINERS" [1], "samples/bpf/" [2] and "selftests" [3] in the documentation "HOWTO interact with BPF subsystem" [4]. As Alexei Starovoitov suggested, just remove "MAINTAINERS" and "samples/bpf/" links and use correct link of "selftests". [1] https://www.kernel.org/doc/html/MAINTAINERS [2] https://www.kernel.org/doc/html/samples/bpf/ [3] https://www.kernel.org/doc/html/tools/testing/selftests/bpf/ [4] https://www.kernel.org/doc/html/latest/bpf/bpf_devel_QA.html Fixes: 542228384888 ("bpf, doc: convert bpf_devel_QA.rst to use RST formatting") Signed-off-by: Tiezhu Yang Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/1619062560-30483-1-git-send-email-yangtiezhu@loongson.cn commit 3f9a3345a3a116af806064826d42cf5211dd611d Author: Kevin Hilman Date: Wed Apr 21 13:48:33 2021 -0700 dt-bindings: mali-bifrost: add dma-coherent Add optional dma-coherent property to binding doc. Found by 'make dtbs_check' on arm64/amlogic DT files. Signed-off-by: Kevin Hilman Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210421204833.18523-2-khilman@baylibre.com' Signed-off-by: Arnd Bergmann commit d9421d6c52942be85c42fe63bdcf2ce43d1a4b0e Author: Kevin Hilman Date: Wed Apr 21 13:48:32 2021 -0700 arm64: dts: amlogic: misc DT schema fixups Take a pass at cleaning up a bunch of warnings from 'make dtbs_check' that have crept in. Signed-off-by: Kevin Hilman Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210421204833.18523-1-khilman@baylibre.com' Signed-off-by: Arnd Bergmann commit 22b6034323fd736f260e00b9ea85c634abeb3446 Author: Martin Willi Date: Mon Apr 19 16:15:59 2021 +0200 net, xdp: Update pkt_type if generic XDP changes unicast MAC If a generic XDP program changes the destination MAC address from/to multicast/broadcast, the skb->pkt_type is updated to properly handle the packet when passed up the stack. When changing the MAC from/to the NICs MAC, PACKET_HOST/OTHERHOST is not updated, though, making the behavior different from that of native XDP. Remember the PACKET_HOST/OTHERHOST state before calling the program in generic XDP, and update pkt_type accordingly if the destination MAC address has changed. As eth_type_trans() assumes a default pkt_type of PACKET_HOST, restore that before calling it. The use case for this is when a XDP program wants to push received packets up the stack by rewriting the MAC to the NICs MAC, for example by cluster nodes sharing MAC addresses. Fixes: 297249569932 ("net: fix generic XDP to handle if eth header was mangled") Signed-off-by: Martin Willi Signed-off-by: Daniel Borkmann Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210419141559.8611-1-martin@strongswan.org commit f49c35b89b784c20a8868bb6f57f3e25277268c3 Author: Hayes Wang Date: Thu Apr 22 16:48:02 2021 +0800 r8152: replace return with break for ram code speedup mode timeout When the timeout occurs, we still have to run the following process for releasing patch request. Otherwise, the PHY would keep no link. Therefore, use break to stop the loop of loading firmware and release the patch request rather than return the function directly. Fixes: 4a51b0e8a014 ("r8152: support PHY firmware for RTL8156 series") Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 9904e1ee962b338a68ff4db647cb6218a087472a Merge: 3197a98c7081a e41985f0fe8b6 Author: David S. Miller Date: Thu Apr 22 13:57:21 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-04-22 This series contains updates to virtchnl header file, ice, and iavf drivers. Vignesh adds support to warn about potentially malicious VFs; those that are overflowing the mailbox for the ice driver. Michal adds support for an allowlist/denylist of VF commands based on supported capabilities for the ice driver. Brett adds support for iavf UDP segmentation offload by adding the capability bit to virtchnl, advertising support in the ice driver, and enabling it in the iavf driver. He also adds a helper function for getting the VF VSI for ice. Colin Ian King removes an unneeded pointer assignment. Qi enables support in the ice driver to support virtchnl requests from the iavf to configure its own RSS input set. This includes adding new capability bits, structures, and commands to virtchnl header file. Haiyue enables configuring RSS flow hash via ethtool to support TCP, UDP and SCTP protocols in iavf. ==================== Signed-off-by: David S. Miller commit 6c0912739699d8e4b6a87086401bf3ad3c59502d Author: Leah Rumancik Date: Thu Apr 22 18:08:34 2021 +0000 ext4: wipe ext4_dir_entry2 upon file deletion Upon file deletion, zero out all fields in ext4_dir_entry2 besides rec_len. In case sensitive data is stored in filenames, this ensures no potentially sensitive data is left in the directory entry upon deletion. Also, wipe these fields upon moving a directory entry during the conversion to an htree and when splitting htree nodes. The data wiped may still exist in the journal, but there are future commits planned to address this. Signed-off-by: Leah Rumancik Link: https://lore.kernel.org/r/20210422180834.2242353-1-leah.rumancik@gmail.com Signed-off-by: Theodore Ts'o commit 5899593f51e63dde2f07c67358bd65a641585abb Author: Jan Kara Date: Thu Apr 15 17:54:17 2021 +0200 ext4: Fix occasional generic/418 failure Eric has noticed that after pagecache read rework, generic/418 is occasionally failing for ext4 when blocksize < pagesize. In fact, the pagecache rework just made hard to hit race in ext4 more likely. The problem is that since ext4 conversion of direct IO writes to iomap framework (commit 378f32bab371), we update inode size after direct IO write only after invalidating page cache. Thus if buffered read sneaks at unfortunate moment like: CPU1 - write at offset 1k CPU2 - read from offset 0 iomap_dio_rw(..., IOMAP_DIO_FORCE_WAIT); ext4_readpage(); ext4_handle_inode_extension() the read will zero out tail of the page as it still sees smaller inode size and thus page cache becomes inconsistent with on-disk contents with all the consequences. Fix the problem by moving inode size update into end_io handler which gets called before the page cache is invalidated. Reported-and-tested-by: Eric Whitney Fixes: 378f32bab371 ("ext4: introduce direct I/O write using iomap infrastructure") CC: stable@vger.kernel.org Signed-off-by: Jan Kara Acked-by: Dave Chinner Link: https://lore.kernel.org/r/20210415155417.4734-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit 3197a98c7081a1c3db6ef63fece55d7f66c79bdc Author: Arnd Bergmann Date: Thu Apr 22 17:35:33 2021 +0200 vxge: avoid -Wemtpy-body warnings There are a few warnings about empty debug macros in this driver: drivers/net/ethernet/neterion/vxge/vxge-main.c: In function 'vxge_probe': drivers/net/ethernet/neterion/vxge/vxge-main.c:4480:76: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 4480 | "Failed in enabling SRIOV mode: %d\n", ret); Change them to proper 'do { } while (0)' expressions to make the code a little more robust and avoid the warnings. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 57e222475545f457ecf4833db31f156e8b7674c7 Author: Loic Poulain Date: Thu Apr 22 16:06:01 2021 +0200 net: wwan: core: Return poll error in case of port removal Ensure that the poll system call returns proper error flags when port is removed (nullified port ops), allowing user side to properly fail, without further read or write. Fixes: 9a44c1cc6388 ("net: Add a WWAN subsystem") Signed-off-by: Loic Poulain Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit a9b5d871abc417cf65a05a9ba50c6b81a6e427eb Author: Ido Schimmel Date: Thu Apr 22 16:50:50 2021 +0300 netdevsim: Only use sampling truncation length when valid When the sampling truncation length is invalid (zero), pass the length of the packet. Without the fix, no payload is reported to user space when the truncation length is zero. Fixes: a8700c3dd0a4 ("netdevsim: Add dummy psample implementation") Signed-off-by: Ido Schimmel Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 74c97ea3b61e4ce149444f904ee8d4fc7073505b Author: Arnd Bergmann Date: Thu Apr 22 15:35:11 2021 +0200 net: enetc: fix link error again A link time bug that I had fixed before has come back now that another sub-module was added to the enetc driver: ERROR: modpost: "enetc_ierb_register_pf" [drivers/net/ethernet/freescale/enetc/fsl-enetc.ko] undefined! The problem is that the enetc Makefile is not actually used for the ierb module if that is the only built-in driver in there and everything else is a loadable module. Fix it by always entering the directory this time, regardless of which symbols are configured. This should reliably fix the problem and prevent it from coming back another time. Fixes: 112463ddbe82 ("net: dsa: felix: fix link error") Fixes: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block") Signed-off-by: Arnd Bergmann Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit 45b102dd81491e30ac7596b5515856141f99319f Author: Arnd Bergmann Date: Thu Apr 22 15:34:34 2021 +0200 net: mana: fix PCI_HYPERV dependency The MANA driver causes a build failure in some configurations when it selects an unavailable symbol: WARNING: unmet direct dependencies detected for PCI_HYPERV Depends on [n]: PCI [=y] && X86_64 [=y] && HYPERV [=n] && PCI_MSI [=y] && PCI_MSI_IRQ_DOMAIN [=y] && SYSFS [=y] Selected by [y]: - MICROSOFT_MANA [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_MICROSOFT [=y] && PCI_MSI [=y] && X86_64 [=y] drivers/pci/controller/pci-hyperv.c: In function 'hv_irq_unmask': drivers/pci/controller/pci-hyperv.c:1217:9: error: implicit declaration of function 'hv_set_msi_entry_from_desc' [-Werror=implicit-function-declaration] 1217 | hv_set_msi_entry_from_desc(¶ms->int_entry.msi_entry, msi_desc); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ A PCI driver should never depend on a particular host bridge implementation in the first place, but if we have this dependency it's better to express it as a 'depends on' rather than 'select'. Signed-off-by: Arnd Bergmann Reviewed-by: Dexuan Cui Signed-off-by: David S. Miller commit e7679c55a7249f1315256cfc672d53e84072e223 Author: Maxim Kochetkov Date: Thu Apr 22 13:46:44 2021 +0300 net: phy: marvell: fix m88e1111_set_downshift Changing downshift params without software reset has no effect, so call genphy_soft_reset() after change downshift params. As the datasheet says: Changes to these bits are disruptive to the normal operation therefore, any changes to these registers must be followed by software reset to take effect. Fixes: 5c6bc5199b5d ("net: phy: marvell: add downshift support for M88E1111") Signed-off-by: Maxim Kochetkov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 990875b299b8612aeb85cb2e2751796f1add65ff Author: Maxim Kochetkov Date: Thu Apr 22 13:46:43 2021 +0300 net: phy: marvell: fix m88e1011_set_downshift Changing downshift params without software reset has no effect, so call genphy_soft_reset() after change downshift params. As the datasheet says: Changes to these bits are disruptive to the normal operation therefore, any changes to these registers must be followed by software reset to take effect. Fixes: 911af5e149bb ("net: phy: marvell: fix downshift function naming") Signed-off-by: Maxim Kochetkov Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 3532b0b4352ce79400b0aa68414f1a0fc422b920 Author: Mickaël Salaün Date: Thu Apr 22 17:41:23 2021 +0200 landlock: Enable user space to infer supported features Add a new flag LANDLOCK_CREATE_RULESET_VERSION to landlock_create_ruleset(2). This enables to retreive a Landlock ABI version that is useful to efficiently follow a best-effort security approach. Indeed, it would be a missed opportunity to abort the whole sandbox building, because some features are unavailable, instead of protecting users as much as possible with the subset of features provided by the running kernel. This new flag enables user space to identify the minimum set of Landlock features supported by the running kernel without relying on a filesystem interface (e.g. /proc/version, which might be inaccessible) nor testing multiple syscall argument combinations (i.e. syscall bisection). New Landlock features will be documented and tied to a minimum version number (greater than 1). The current version will be incremented for each new kernel release supporting new Landlock features. User space libraries can leverage this information to seamlessly restrict processes as much as possible while being compatible with newer APIs. This is a much more lighter approach than the previous landlock_get_features(2): the complexity is pushed to user space libraries. This flag meets similar needs as securityfs versions: selinux/policyvers, apparmor/features/*/version* and tomoyo/version. Supporting this flag now will be convenient for backward compatibility. Cc: Arnd Bergmann Cc: James Morris Cc: Jann Horn Cc: Kees Cook Cc: Serge E. Hallyn Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20210422154123.13086-14-mic@digikod.net Signed-off-by: James Morris commit 5526b450834331d9196cae26acef0bfd5afd9fc4 Author: Mickaël Salaün Date: Thu Apr 22 17:41:22 2021 +0200 landlock: Add user and kernel documentation Add a first document describing userspace API: how to define and enforce a Landlock security policy. This is explained with a simple example. The Landlock system calls are described with their expected behavior and current limitations. Another document is dedicated to kernel developers, describing guiding principles and some important kernel structures. This documentation can be built with the Sphinx framework. Cc: James Morris Cc: Jann Horn Cc: Serge E. Hallyn Signed-off-by: Mickaël Salaün Reviewed-by: Vincent Dagonneau Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422154123.13086-13-mic@digikod.net Signed-off-by: James Morris commit ba84b0bf5a164f0f523656c1e37568c30f3f3303 Author: Mickaël Salaün Date: Thu Apr 22 17:41:21 2021 +0200 samples/landlock: Add a sandbox manager example Add a basic sandbox tool to launch a command which can only access a list of file hierarchies in a read-only or read-write way. Cc: James Morris Cc: Serge E. Hallyn Signed-off-by: Mickaël Salaün Reviewed-by: Jann Horn Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422154123.13086-12-mic@digikod.net Signed-off-by: James Morris commit e1199815b47be83346c03e20a3de76f934e4bb34 Author: Mickaël Salaün Date: Thu Apr 22 17:41:20 2021 +0200 selftests/landlock: Add user space tests Test all Landlock system calls, ptrace hooks semantic and filesystem access-control with multiple layouts. Test coverage for security/landlock/ is 93.6% of lines. The code not covered only deals with internal kernel errors (e.g. memory allocation) and race conditions. Cc: James Morris Cc: Jann Horn Cc: Serge E. Hallyn Cc: Shuah Khan Signed-off-by: Mickaël Salaün Reviewed-by: Vincent Dagonneau Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422154123.13086-11-mic@digikod.net Signed-off-by: James Morris commit 265885daf3e5082eb9f6e2a23bdbf9ba4456a21b Author: Mickaël Salaün Date: Thu Apr 22 17:41:18 2021 +0200 landlock: Add syscall implementations These 3 system calls are designed to be used by unprivileged processes to sandbox themselves: * landlock_create_ruleset(2): Creates a ruleset and returns its file descriptor. * landlock_add_rule(2): Adds a rule (e.g. file hierarchy access) to a ruleset, identified by the dedicated file descriptor. * landlock_restrict_self(2): Enforces a ruleset on the calling thread and its future children (similar to seccomp). This syscall has the same usage restrictions as seccomp(2): the caller must have the no_new_privs attribute set or have CAP_SYS_ADMIN in the current user namespace. All these syscalls have a "flags" argument (not currently used) to enable extensibility. Here are the motivations for these new syscalls: * A sandboxed process may not have access to file systems, including /dev, /sys or /proc, but it should still be able to add more restrictions to itself. * Neither prctl(2) nor seccomp(2) (which was used in a previous version) fit well with the current definition of a Landlock security policy. All passed structs (attributes) are checked at build time to ensure that they don't contain holes and that they are aligned the same way for each architecture. See the user and kernel documentation for more details (provided by a following commit): * Documentation/userspace-api/landlock.rst * Documentation/security/landlock.rst Cc: Arnd Bergmann Cc: James Morris Cc: Jann Horn Cc: Kees Cook Signed-off-by: Mickaël Salaün Acked-by: Serge Hallyn Link: https://lore.kernel.org/r/20210422154123.13086-9-mic@digikod.net Signed-off-by: James Morris commit a49f4f81cb48925e8d7cbd9e59068f516e984144 Author: Mickaël Salaün Date: Thu Apr 22 17:41:19 2021 +0200 arch: Wire up Landlock syscalls Wire up the following system calls for all architectures: * landlock_create_ruleset(2) * landlock_add_rule(2) * landlock_restrict_self(2) Cc: Arnd Bergmann Cc: James Morris Cc: Jann Horn Cc: Kees Cook Cc: Serge E. Hallyn Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20210422154123.13086-10-mic@digikod.net Signed-off-by: James Morris commit 83e804f0bfee2247b1c0aa64845c81a38562da7a Author: Mickaël Salaün Date: Thu Apr 22 17:41:16 2021 +0200 fs,security: Add sb_delete hook The sb_delete security hook is called when shutting down a superblock, which may be useful to release kernel objects tied to the superblock's lifetime (e.g. inodes). This new hook is needed by Landlock to release (ephemerally) tagged struct inodes. This comes from the unprivileged nature of Landlock described in the next commit. Cc: Al Viro Cc: James Morris Signed-off-by: Mickaël Salaün Reviewed-by: Jann Horn Acked-by: Serge Hallyn Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422154123.13086-7-mic@digikod.net Signed-off-by: James Morris commit cb2c7d1a1776057c9a1f48ed1250d85e94d4850d Author: Mickaël Salaün Date: Thu Apr 22 17:41:17 2021 +0200 landlock: Support filesystem access-control Using Landlock objects and ruleset, it is possible to tag inodes according to a process's domain. To enable an unprivileged process to express a file hierarchy, it first needs to open a directory (or a file) and pass this file descriptor to the kernel through landlock_add_rule(2). When checking if a file access request is allowed, we walk from the requested dentry to the real root, following the different mount layers. The access to each "tagged" inodes are collected according to their rule layer level, and ANDed to create access to the requested file hierarchy. This makes possible to identify a lot of files without tagging every inodes nor modifying the filesystem, while still following the view and understanding the user has from the filesystem. Add a new ARCH_EPHEMERAL_INODES for UML because it currently does not keep the same struct inodes for the same inodes whereas these inodes are in use. This commit adds a minimal set of supported filesystem access-control which doesn't enable to restrict all file-related actions. This is the result of multiple discussions to minimize the code of Landlock to ease review. Thanks to the Landlock design, extending this access-control without breaking user space will not be a problem. Moreover, seccomp filters can be used to restrict the use of syscall families which may not be currently handled by Landlock. Cc: Al Viro Cc: Anton Ivanov Cc: James Morris Cc: Jann Horn Cc: Jeff Dike Cc: Kees Cook Cc: Richard Weinberger Cc: Serge E. Hallyn Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20210422154123.13086-8-mic@digikod.net Signed-off-by: James Morris commit 1aea7808372eee4ad01f98e064c88c57f1e94855 Author: Casey Schaufler Date: Thu Apr 22 17:41:15 2021 +0200 LSM: Infrastructure management of the superblock Move management of the superblock->sb_security blob out of the individual security modules and into the security infrastructure. Instead of allocating the blobs from within the modules, the modules tell the infrastructure how much space is required, and the space is allocated there. Cc: John Johansen Signed-off-by: Casey Schaufler Signed-off-by: Mickaël Salaün Reviewed-by: Stephen Smalley Acked-by: Serge Hallyn Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422154123.13086-6-mic@digikod.net Signed-off-by: James Morris commit afe81f754117dd96853677c5cb815f49abef0ba0 Author: Mickaël Salaün Date: Thu Apr 22 17:41:14 2021 +0200 landlock: Add ptrace restrictions Using ptrace(2) and related debug features on a target process can lead to a privilege escalation. Indeed, ptrace(2) can be used by an attacker to impersonate another task and to remain undetected while performing malicious activities. Thanks to ptrace_may_access(), various part of the kernel can check if a tracer is more privileged than a tracee. A landlocked process has fewer privileges than a non-landlocked process and must then be subject to additional restrictions when manipulating processes. To be allowed to use ptrace(2) and related syscalls on a target process, a landlocked process must have a subset of the target process's rules (i.e. the tracee must be in a sub-domain of the tracer). Cc: James Morris Signed-off-by: Mickaël Salaün Reviewed-by: Jann Horn Acked-by: Serge Hallyn Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422154123.13086-5-mic@digikod.net Signed-off-by: James Morris commit 385975dca53eb41031d0cbd1de318eb1bc5d6bb9 Author: Mickaël Salaün Date: Thu Apr 22 17:41:13 2021 +0200 landlock: Set up the security framework and manage credentials Process's credentials point to a Landlock domain, which is underneath implemented with a ruleset. In the following commits, this domain is used to check and enforce the ptrace and filesystem security policies. A domain is inherited from a parent to its child the same way a thread inherits a seccomp policy. Cc: James Morris Signed-off-by: Mickaël Salaün Reviewed-by: Jann Horn Acked-by: Serge Hallyn Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422154123.13086-4-mic@digikod.net Signed-off-by: James Morris commit ae271c1b14de343b888e77f74f640e3dcbdeb4c9 Author: Mickaël Salaün Date: Thu Apr 22 17:41:12 2021 +0200 landlock: Add ruleset and domain management A Landlock ruleset is mainly a red-black tree with Landlock rules as nodes. This enables quick update and lookup to match a requested access, e.g. to a file. A ruleset is usable through a dedicated file descriptor (cf. following commit implementing syscalls) which enables a process to create and populate a ruleset with new rules. A domain is a ruleset tied to a set of processes. This group of rules defines the security policy enforced on these processes and their future children. A domain can transition to a new domain which is the intersection of all its constraints and those of a ruleset provided by the current process. This modification only impact the current process. This means that a process can only gain more constraints (i.e. lose accesses) over time. Cc: James Morris Signed-off-by: Mickaël Salaün Acked-by: Serge Hallyn Reviewed-by: Kees Cook Reviewed-by: Jann Horn Link: https://lore.kernel.org/r/20210422154123.13086-3-mic@digikod.net Signed-off-by: James Morris commit 90945448e9830aa1b39d7acaa4e0724a001e2ff8 Author: Mickaël Salaün Date: Thu Apr 22 17:41:11 2021 +0200 landlock: Add object management A Landlock object enables to identify a kernel object (e.g. an inode). A Landlock rule is a set of access rights allowed on an object. Rules are grouped in rulesets that may be tied to a set of processes (i.e. subjects) to enforce a scoped access-control (i.e. a domain). Because Landlock's goal is to empower any process (especially unprivileged ones) to sandbox themselves, we cannot rely on a system-wide object identification such as file extended attributes. Indeed, we need innocuous, composable and modular access-controls. The main challenge with these constraints is to identify kernel objects while this identification is useful (i.e. when a security policy makes use of this object). But this identification data should be freed once no policy is using it. This ephemeral tagging should not and may not be written in the filesystem. We then need to manage the lifetime of a rule according to the lifetime of its objects. To avoid a global lock, this implementation make use of RCU and counters to safely reference objects. A following commit uses this generic object management for inodes. Cc: James Morris Signed-off-by: Mickaël Salaün Reviewed-by: Jann Horn Acked-by: Serge Hallyn Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210422154123.13086-2-mic@digikod.net Signed-off-by: James Morris commit a4b0fccfbdb4a2004b97cae3872088570495e274 Author: Ray Kinsella Date: Wed Apr 21 10:10:09 2021 +0100 perf tools: Update topdown documentation to permit rdpmc calls Update Topdown documentation to permit calls to rdpmc, and describe interaction with system calls. Signed-off-by: Ray Kinsella Reviewed-by: Andi Kleen Cc: Jiri Olsa Cc: Kan Liang Link: http://lore.kernel.org/lkml/20210421091009.1711565-1-mdr@ashroe.eu Signed-off-by: Arnaldo Carvalho de Melo commit fd49e8ee70b306a003323a17bbcc0633f322c135 Merge: 238eca821cee9 7aef27f0b2a8a Author: Paolo Bonzini Date: Thu Apr 22 02:39:48 2021 -0400 Merge branch 'kvm-sev-cgroup' into HEAD commit e41985f0fe8b68d1ac321bd4eda460fb553e65ad Author: Haiyue Wang Date: Tue Apr 13 08:48:44 2021 +0800 iavf: Support for modifying SCTP RSS flow hashing Provide the ability to enable SCTP RSS hashing by ethtool. It gives users option of generating RSS hash based on the SCTP source and destination ports numbers, IPv4 or IPv6 source and destination addresses. Signed-off-by: Haiyue Wang Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 7b8f3f957b22746bc9a410d7cd2e9edd0efcc9f5 Author: Haiyue Wang Date: Tue Apr 13 08:48:43 2021 +0800 iavf: Support for modifying UDP RSS flow hashing Provides the ability to enable UDP RSS hashing by ethtool. It gives users option of generating RSS hash based on the UDP source and destination ports numbers, IPv4 or IPv6 source and destination addresses. Signed-off-by: Haiyue Wang Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 5ab91e0593a15652d31d3eb0bd6d28bf0bc9b36c Author: Haiyue Wang Date: Tue Apr 13 08:48:42 2021 +0800 iavf: Support for modifying TCP RSS flow hashing Provides the ability to enable TCP RSS hashing by ethtool. It gives users option of generating RSS hash based on the TCP source and destination ports numbers, IPv4 or IPv6 source and destination addresses. Signed-off-by: Haiyue Wang Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 0aaeb4fbc842b9e6ef11ee1415e6e88171056afb Author: Haiyue Wang Date: Tue Apr 13 08:48:41 2021 +0800 iavf: Add framework to enable ethtool RSS config Add the virtchnl message interface to VF, so that VF can request RSS input set(s) based on PF's capability. This framework allows ethtool RSS config support on the VF driver. Signed-off-by: Haiyue Wang Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit ddd1f3cfed3f06906c25f917eb703d683c415e24 Author: Qi Zhang Date: Tue Apr 13 08:48:40 2021 +0800 ice: Support RSS configure removal for AVF Add the handler for virtchnl message VIRTCHNL_OP_DEL_RSS_CFG to remove an existing RSS configuration with matching hashed fields. Signed-off-by: Vignesh Sridhar Co-developed-by: Jia Guo Signed-off-by: Jia Guo Signed-off-by: Qi Zhang Signed-off-by: Haiyue Wang Tested-by: Bo Chen Signed-off-by: Tony Nguyen commit 222a8ab01698148c00c271cda82d96f4e6e7b0a8 Author: Qi Zhang Date: Tue Apr 13 08:48:39 2021 +0800 ice: Enable RSS configure for AVF Currently, RSS hash input is not available to AVF by ethtool, it is set by the PF directly. Add the RSS configure support for AVF through new virtchnl message, and define the capability flag VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF to query this new RSS offload support. Signed-off-by: Jia Guo Signed-off-by: Qi Zhang Signed-off-by: Haiyue Wang Tested-by: Bo Chen Signed-off-by: Tony Nguyen commit c5afbe99b778c15254d4496a74d3252ef6ba0a14 Author: Brett Creeley Date: Tue Mar 2 10:15:39 2021 -0800 ice: Add helper function to get the VF's VSI Currently, the driver gets the VF's VSI by using a long string of dereferences (i.e. vf->pf->vsi[vf->lan_vsi_idx]). If the method to get the VF's VSI were to change the driver would have to change it in every location. Fix this by adding the helper ice_get_vf_vsi(). Signed-off-by: Brett Creeley Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit c9b5f681fe418d68f1804512c7fbcd5920d0594e Author: Colin Ian King Date: Sat Feb 22 17:10:54 2020 +0000 ice: remove redundant assignment to pointer vsi Pointer vsi is being re-assigned a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Tested-by: Andrew Bowers Signed-off-by: Tony Nguyen commit c91a4f9feb67a199c27c2fe4df98ef9a49ab8ba0 Author: Brett Creeley Date: Tue Mar 2 10:12:13 2021 -0800 iavf: add support for UDP Segmentation Offload Add code to support UDP segmentation offload (USO) for hardware that supports it. Suggested-by: Jesse Brandeburg Signed-off-by: Brett Creeley Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 142da08c4dc0afd07f9136b4812d5386bd6e1717 Author: Brett Creeley Date: Tue Mar 2 10:12:12 2021 -0800 ice: Advertise virtchnl UDP segmentation offload capability As the hardware is capable of supporting UDP segmentation offload, add a capability bit to virtchnl.h to communicate this and have the driver advertise its support. Suggested-by: Jesse Brandeburg Signed-off-by: Brett Creeley Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit c0dcaa55f91d925c9ac2c950ff84138534337a6c Author: Michal Swiatkowski Date: Tue Mar 2 10:12:01 2021 -0800 ice: Allow ignoring opcodes on specific VF Declare bitmap of allowed commands on VF. Initialize default opcodes list that should be always supported. Declare array of supported opcodes for each caps used in virtchnl code. Change allowed bitmap by setting or clearing corresponding bit to allowlist (bit set) or denylist (bit clear). Signed-off-by: Michal Swiatkowski Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 0891c89674e8d39eb47310e7c0646c2b07228fe7 Author: Vignesh Sridhar Date: Tue Mar 2 10:12:00 2021 -0800 ice: warn about potentially malicious VFs Attempt to detect malicious VFs and, if suspected, log the information but keep going to allow the user to take any desired actions. Potentially malicious VFs are identified by checking if the VFs are transmitting too many messages via the PF-VF mailbox which could cause an overflow of this channel resulting in denial of service. This is done by creating a snapshot or static capture of the mailbox buffer which can be traversed and in which the messages sent by VFs are tracked. Co-developed-by: Yashaswini Raghuram Prathivadi Bhayankaram Signed-off-by: Yashaswini Raghuram Prathivadi Bhayankaram Co-developed-by: Paul M Stillwell Jr Signed-off-by: Paul M Stillwell Jr Co-developed-by: Brett Creeley Signed-off-by: Brett Creeley Signed-off-by: Vignesh Sridhar Tested-by: Konrad Jankowski Signed-off-by: Tony Nguyen commit 87d9ad028975e8f47a980fffa9196b426f69f258 Merge: f4be591f1436a 2637baed78010 Author: Jens Axboe Date: Thu Apr 22 10:23:55 2021 -0600 Merge tag 'nvme-5.13-2021-04-22' of git://git.infradead.org/nvme into for-5.13/drivers Pull NVMe updates from Christoph: "- add support for a per-namespace character device (Minwoo Im) - various KATO fixes and cleanups (Hou Pu, Hannes Reinecke) - APST fix and cleanup" * tag 'nvme-5.13-2021-04-22' of git://git.infradead.org/nvme: nvme: introduce generic per-namespace chardev nvme: cleanup nvme_configure_apst nvme: do not try to reconfigure APST when the controller is not live nvme: add 'kato' sysfs attribute nvme: sanitize KATO setting nvmet: avoid queuing keep-alive timer if it is disabled commit 316791b556f7c4aeb7a7fea8f400f4434e71d1bf Author: Takashi Iwai Date: Thu Apr 22 14:04:13 2021 +0200 ALSA: usb-audio: Generic application of implicit fb to Roland/BOSS devices Through the examinations and experiments with lots of Roland and BOSS USB-audio devices, we found out that the recently introduced full-duplex operations with the implicit feedback mode work fine for quite a few devices, while the others need only the capture-side quirk to enforce the full-duplex mode. The recent commit d86f43b17ed4 ("ALSA: usb-audio: Add support for many Roland devices' implicit feedback quirks") tried to add such quirk entries manually in the lists, but this turned out to be too many and error-prone, hence it was reverted again. This patch is another attempt to cover those missing Roland/BOSS devices but in a more generic way. It matches the devices with the vendor ID 0x0582, and checks whether they are with both ASYNC sync types or ASYNC is only for capture device. In the former case, it's the device with the implicit feedback mode, and applies accordingly. In both cases, the capture stream requires always the full-duplex mode, and we apply the known capture quirk for that, too. Basically the already existing BOSS device quirk entries become redundant after this generic matching, so those are removed. Although the capture_implicit_fb_quirks[] table became empty and superfluous, I keep it for now, so that people can put a special device easily at any time later again. Link: https://lore.kernel.org/r/CAOsVg8rA61B=005_VyUwpw3piVwA7Bo5fs1GYEB054efyzGjLw@mail.gmail.com Link: https://lore.kernel.org/r/20210414083255.9527-1-tiwai@suse.de BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212519 Tested-by: Lucas Endres Link: https://lore.kernel.org/r/20210422120413.457-2-tiwai@suse.de Signed-off-by: Takashi Iwai commit 37153cc5303aecd1ac7fc4b4b12bb93f634b4953 Author: Takashi Iwai Date: Thu Apr 22 14:04:12 2021 +0200 Revert "ALSA: usb-audio: Add support for many Roland devices..." This reverts commit d86f43b17ed4 ("ALSA: usb-audio: Add support for many Roland devices' feedback quirks"). It turned out that many quirk entries there don't contain the proper EP values and/or the quirk types, which lead to the broken operations. As we're going to cover all Roland/BOSS devices in a more generic way rather the explicit lists, let's revert the previous additions at first. Fixes: d86f43b17ed4 ("ALSA: usb-audio: Add support for many Roland devices' implicit feedback quirks") Link: https://lore.kernel.org/r/20210422120413.457-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit ee6b25fa7c037e42cc5f3b5c024b2a779edab6dd Author: Colin Ian King Date: Wed Dec 16 11:36:08 2020 +0000 powerpc/44x: fix spelling mistake in Kconfig "varients" -> "variants" There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20201216113608.11812-1-colin.king@canonical.com commit cc7130bf119add37f36238343a593b71ef6ecc1e Author: Alexey Kardashevskiy Date: Mon Mar 1 17:36:53 2021 +1100 powerpc/iommu: Annotate nested lock for lockdep The IOMMU table is divided into pools for concurrent mappings and each pool has a separate spinlock. When taking the ownership of an IOMMU group to pass through a device to a VM, we lock these spinlocks which triggers a false negative warning in lockdep (below). This fixes it by annotating the large pool's spinlock as a nest lock which makes lockdep not complaining when locking nested locks if the nest lock is locked already. === WARNING: possible recursive locking detected 5.11.0-le_syzkaller_a+fstn1 #100 Not tainted -------------------------------------------- qemu-system-ppc/4129 is trying to acquire lock: c0000000119bddb0 (&(p->lock)/1){....}-{2:2}, at: iommu_take_ownership+0xac/0x1e0 but task is already holding lock: c0000000119bdd30 (&(p->lock)/1){....}-{2:2}, at: iommu_take_ownership+0xac/0x1e0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(p->lock)/1); lock(&(p->lock)/1); === Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210301063653.51003-1-aik@ozlabs.ru commit 4be518d838809e21354f32087aa9c26efc50b410 Author: Alexey Kardashevskiy Date: Tue Feb 16 14:33:07 2021 +1100 powerpc/iommu: Do not immediately panic when failed IOMMU table allocation Most platforms allocate IOMMU table structures (specifically it_map) at the boot time and when this fails - it is a valid reason for panic(). However the powernv platform allocates it_map after a device is returned to the host OS after being passed through and this happens long after the host OS booted. It is quite possible to trigger the it_map allocation panic() and kill the host even though it is not necessary - the host OS can still use the DMA bypass mode (requires a tiny fraction of it_map's memory) and even if that fails, the host OS is runnnable as it was without the device for which allocating it_map causes the panic. Instead of immediately crashing in a powernv/ioda2 system, this prints an error and continues. All other platforms still call panic(). Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Reviewed-by: Leonardo Bras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210216033307.69863-3-aik@ozlabs.ru commit 7f1fa82d79947dfabb4046e1d787da9db2bc1c20 Author: Alexey Kardashevskiy Date: Tue Feb 16 14:33:06 2021 +1100 powerpc/iommu: Allocate it_map by vmalloc The IOMMU table uses the it_map bitmap to keep track of allocated DMA pages. This has always been a contiguous array allocated at either the boot time or when a passed through device is returned to the host OS. The it_map memory is allocated by alloc_pages() which allocates contiguous physical memory. Such allocation method occasionally creates a problem when there is no big chunk of memory available (no free memory or too fragmented). On powernv/ioda2 the default DMA window requires 16MB for it_map. This replaces alloc_pages_node() with vzalloc_node() which allocates contiguous block but in virtual memory. This should reduce changes of failure but should not cause other behavioral changes as it_map is only used by the kernel's DMA hooks/api when MMU is on. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210216033307.69863-2-aik@ozlabs.ru commit 0db11461677aa5105b9ebbd939aee0ceb77a988b Author: Yang Li Date: Mon Feb 8 18:41:10 2021 +0800 selftests/powerpc: remove unneeded semicolon Eliminate the following coccicheck warning: ./tools/testing/selftests/powerpc/nx-gzip/gzfht_test.c:327:4-5: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1612780870-95890-1-git-send-email-yang.lee@linux.alibaba.com commit caea7b833d866e0badf4b12dc41bf9fe6a7295f3 Author: Yang Li Date: Tue Feb 2 11:34:36 2021 +0800 powerpc/64s: remove unneeded semicolon Eliminate the following coccicheck warning: ./arch/powerpc/platforms/powernv/setup.c:160:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1612236877-104974-1-git-send-email-yang.lee@linux.alibaba.com commit f3d03fc748d4e48f4cd8dea1bfeb173cb3b0c19f Author: Yang Li Date: Tue Feb 2 11:21:36 2021 +0800 powerpc/eeh: remove unneeded semicolon Eliminate the following coccicheck warning: ./arch/powerpc/kernel/eeh.c:782:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Oliver O'Halloran Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1612236096-91154-1-git-send-email-yang.lee@linux.alibaba.com commit 290f7d8ce2b1eea5413bb120e0d9d610675b7fba Author: Ravi Bangoria Date: Mon Apr 12 16:52:18 2021 +0530 powerpc/selftests: Add selftest to test concurrent perf/ptrace events ptrace and perf watchpoints can't co-exists if their address range overlaps. See commit 29da4f91c0c1 ("powerpc/watchpoint: Don't allow concurrent perf and ptrace events") for more detail. Add selftest for the same. Sample o/p: # ./ptrace-perf-hwbreak test: ptrace-perf-hwbreak tags: git_version:powerpc-5.8-7-118-g937fa174a15d-dirty perf cpu event -> ptrace thread event (Overlapping): Ok perf cpu event -> ptrace thread event (Non-overlapping): Ok perf thread event -> ptrace same thread event (Overlapping): Ok perf thread event -> ptrace same thread event (Non-overlapping): Ok perf thread event -> ptrace other thread event: Ok ptrace thread event -> perf kernel event: Ok ptrace thread event -> perf same thread event (Overlapping): Ok ptrace thread event -> perf same thread event (Non-overlapping): Ok ptrace thread event -> perf other thread event: Ok ptrace thread event -> perf cpu event (Overlapping): Ok ptrace thread event -> perf cpu event (Non-overlapping): Ok ptrace thread event -> perf same thread & cpu event (Overlapping): Ok ptrace thread event -> perf same thread & cpu event (Non-overlapping): Ok ptrace thread event -> perf other thread & cpu event: Ok success: ptrace-perf-hwbreak Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412112218.128183-5-ravi.bangoria@linux.ibm.com commit c65c64cc7bbd273121edf96a7a5a0269038ab454 Author: Ravi Bangoria Date: Mon Apr 12 16:52:17 2021 +0530 powerpc/selftests/perf-hwbreak: Add testcases for 2nd DAWR Extend perf-hwbreak.c selftest to test multiple DAWRs. Also add testcase for testing 512 byte boundary removal. Sample o/p: # ./perf-hwbreak ... TESTED: Process specific, Two events, diff addr TESTED: Process specific, Two events, same addr TESTED: Process specific, Two events, diff addr, one is RO, other is WO TESTED: Process specific, Two events, same addr, one is RO, other is WO TESTED: Systemwide, Two events, diff addr TESTED: Systemwide, Two events, same addr TESTED: Systemwide, Two events, diff addr, one is RO, other is WO TESTED: Systemwide, Two events, same addr, one is RO, other is WO TESTED: Process specific, 512 bytes, unaligned success: perf_hwbreak Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412112218.128183-4-ravi.bangoria@linux.ibm.com commit c9cb0afb4eaa03801322f48dad4093979ff45e88 Author: Ravi Bangoria Date: Mon Apr 12 16:52:16 2021 +0530 powerpc/selftests/perf-hwbreak: Coalesce event creation code perf-hwbreak selftest opens hw-breakpoint event at multiple places for which it has same code repeated. Coalesce that code into a function. Signed-off-by: Ravi Bangoria Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412112218.128183-3-ravi.bangoria@linux.ibm.com commit dae4ff8031b49af4721101d6298fc14cb9c16a4c Author: Ravi Bangoria Date: Mon Apr 12 16:52:15 2021 +0530 powerpc/selftests/ptrace-hwbreak: Add testcases for 2nd DAWR Message-ID: <20210412112218.128183-2-ravi.bangoria@linux.ibm.com> (raw) Add selftests to test multiple active DAWRs with ptrace interface. Sample o/p: $ ./ptrace-hwbreak ... PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DW ALIGNED, WO, len: 6: Ok PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DW UNALIGNED, RO, len: 6: Ok PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DAWR Overlap, WO, len: 6: Ok PPC_PTRACE_SETHWDEBUG 2, MODE_RANGE, DAWR Overlap, RO, len: 6: Ok Signed-off-by: Ravi Bangoria Reviewed-by: Daniel Axtens [mpe: Fix build on older distros] Signed-off-by: Michael Ellerman commit 421a7483878cf3f356ebb871effe81997a45dda7 Author: Michael Ellerman Date: Tue Mar 2 13:09:54 2021 +1100 powerpc/configs: Add IBMVNIC to some 64-bit configs This is an IBM specific driver that we should enable to get some build/boot testing. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210302020954.2980046-1-mpe@ellerman.id.au commit da650ada100956b0f00aa4fe9ce33103378ce9ca Author: Thadeu Lima de Souza Cascardo Date: Thu Feb 25 17:19:49 2021 +1100 selftests/powerpc: Add uaccess flush test Also based on the RFI and entry flush tests, it counts the L1D misses by doing a syscall that does user access: uname, in this case. Signed-off-by: Thadeu Lima de Souza Cascardo [dja: forward port, rename function] Signed-off-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210225061949.1213404-1-dja@axtens.net commit 8a87a507714386efc39c3ae6fa24d4f79846b522 Author: Christophe Leroy Date: Wed Apr 21 17:24:03 2021 +0000 powerpc/52xx: Fix an invalid ASM expression ('addi' used instead of 'add') AS arch/powerpc/platforms/52xx/lite5200_sleep.o arch/powerpc/platforms/52xx/lite5200_sleep.S: Assembler messages: arch/powerpc/platforms/52xx/lite5200_sleep.S:184: Warning: invalid register expression In the following code, 'addi' is wrong, has to be 'add' /* local udelay in sram is needed */ udelay: /* r11 - tb_ticks_per_usec, r12 - usecs, overwrites r13 */ mullw r12, r12, r11 mftb r13 /* start */ addi r12, r13, r12 /* end */ Fixes: ee983079ce04 ("[POWERPC] MPC5200 low power mode") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cb4cec9131c8577803367f1699209a7e104cec2a.1619025821.git.christophe.leroy@csgroup.eu commit 0f197ddce403af33aa7f15af55644549778a9988 Author: Nicholas Piggin Date: Thu Apr 22 01:17:32 2021 +1000 powerpc/64s: Fix mm_cpumask memory ordering comment The memory ordering comment no longer applies, because mm_ctx_id is no longer used anywhere. At best always been difficult to follow. It's better to consider the load on which the slbmte depends on, which the MMU depends on before it can start loading TLBs, rather than a store which may or may not have a subsequent dependency chain to the slbmte. So update the comment and we use the load of the mm's user context ID. This is much more analogous the radix ordering too, which is good. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210421151733.212858-1-npiggin@gmail.com commit 66d9b7492887d34c711bc05b36c22438acba51b4 Author: Athira Rajeev Date: Thu Mar 4 01:40:15 2021 -0500 powerpc/perf: Fix the threshold event selection for memory events in power10 Memory events (mem-loads and mem-stores) currently use the threshold event selection as issue to finish. Power10 supports issue to complete as part of thresholding which is more appropriate for mem-loads and mem-stores. Hence fix the event code for memory events to use issue to complete. Fixes: a64e697cef23 ("powerpc/perf: power10 Performance Monitoring support") Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1614840015-1535-1-git-send-email-atrajeev@linux.vnet.ibm.com commit b4ded42268ee3d703da208278342b9901abe145a Author: Athira Rajeev Date: Thu Mar 4 06:55:37 2021 -0500 powerpc/perf: Fix sampled instruction type for larx/stcx Sampled Instruction Event Register (SIER) field [46:48] identifies the sampled instruction type. ISA v3.1 says value of 0b111 for this field as reserved, but in POWER10 it denotes LARX/STCX type which will hopefully be fixed in ISA v3.1 update. Patch fixes the functions to handle type value 7 for CPU_FTR_ARCH_31. Fixes: a64e697cef23 ("powerpc/perf: power10 Performance Monitoring support") Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan [mpe: Avoid reading mmcra until necessary, use early return to deindent if block] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1614858937-1485-1-git-send-email-atrajeev@linux.vnet.ibm.com commit 14ef64ebdc2a4564893022780907747567452f6c Author: Arnd Bergmann Date: Thu Apr 22 15:38:57 2021 +0200 spi: stm32-qspi: fix debug format string Printing size_t needs a special %zx format modifier to avoid a warning like: drivers/spi/spi-stm32-qspi.c:481:41: note: format string is defined here 481 | dev_dbg(qspi->dev, "%s len = 0x%x offs = 0x%llx buf = 0x%p\n", __func__, len, offs, buf); Patrice already tried to fix this, but picked %lx instead of %zx, which fixed some architectures but broke others in the same way. Using %zx works everywhere. Fixes: 18674dee3cd6 ("spi: stm32-qspi: Add dirmap support") Fixes: 1b8a7d4282c0 ("spi: stm32-qspi: Fix compilation warning in ARM64") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210422134955.1988316-1-arnd@kernel.org Signed-off-by: Mark Brown commit bc2e9578baed90f36abe6bb922b9598a327b0555 Author: Quanyang Wang Date: Thu Apr 22 18:26:04 2021 +0800 spi: tools: make a symbolic link to the header file spi.h The header file spi.h in include/uapi/linux/spi is needed for spidev.h, so we also need make a symbolic link to it to eliminate the error message as below: In file included from spidev_test.c:24: include/linux/spi/spidev.h:28:10: fatal error: linux/spi/spi.h: No such file or directory 28 | #include | ^~~~~~~~~~~~~~~~~ compilation terminated. Fixes: f7005142dace ("spi: uapi: unify SPI modes into a single spi.h") Signed-off-by: Quanyang Wang Link: https://lore.kernel.org/r/20210422102604.3034217-1-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit ccd4cc3ed0692aef8a3b4566391c37eb168d8d32 Author: Arnd Bergmann Date: Thu Apr 22 15:34:00 2021 +0200 ASoC: tegra: mark runtime-pm functions as __maybe_unused A reorganization of the driver source led to two of them causing a compile time warning in some configurations: tegra/tegra20_spdif.c:36:12: error: 'tegra20_spdif_runtime_resume' defined but not used [-Werror=unused-function] 36 | static int tegra20_spdif_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ tegra/tegra20_spdif.c:27:12: error: 'tegra20_spdif_runtime_suspend' defined but not used [-Werror=unused-function] 27 | static int tegra20_spdif_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tegra/tegra30_ahub.c:64:12: error: 'tegra30_ahub_runtime_resume' defined but not used [-Werror=unused-function] 64 | static int tegra30_ahub_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ tegra/tegra30_ahub.c:43:12: error: 'tegra30_ahub_runtime_suspend' defined but not used [-Werror=unused-function] 43 | static int tegra30_ahub_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Mark these functions as __maybe_unused to avoid this kind of warning. Fixes: b5571449e618 ("ASoC: tegra30: ahub: Remove handing of disabled runtime PM") Fixes: c53b396f0dd4 ("ASoC: tegra20: spdif: Remove handing of disabled runtime PM") Fixes: 80ec4a4cb36d ("ASoC: tegra20: i2s: Remove handing of disabled runtime PM") Fixes: b5f6f781fcb2 ("ASoC: tegra30: i2s: Remove handing of disabled runtime PM") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210422133418.1757893-1-arnd@kernel.org Signed-off-by: Mark Brown commit a5ccccb3ec0b052804d03df90c0d08689be54170 Author: Vincent Whitchurch Date: Thu Apr 22 10:30:44 2021 +0200 regulator: core: Respect off_on_delay at startup We currently do not respect off_on_delay the first time we turn on a regulator. This is problematic since the regulator could have been turned off by the bootloader, or it could it have been turned off during the probe of the regulator driver (such as when regulator-fixed requests the enable GPIO), either of which could potentially have happened less than off_on_delay microseconds ago before the first time a client requests for the regulator to be turned on. We can't know exactly when the regulator was turned off, but initialise off_on_delay to the current time when registering the regulator, so that we guarantee that we respect the off_on_delay in all cases. Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20210422083044.11479-1-vincent.whitchurch@axis.com Signed-off-by: Mark Brown commit a89f3a93cd20f77ac1f84089297258d4b409e280 Author: Niklas Carlsson Date: Thu Apr 22 15:02:26 2021 +0200 ASoC: adau17x1: Avoid overwriting CHPF Configuring number of channels per LRCLK frame by using e.g. snd_soc_dai_set_tdm_slot before configuring DAI format was being overwritten by the latter due to a regmap_write which would write over the whole register. Signed-off-by: Niklas Carlsson Link: https://lore.kernel.org/r/20210422130226.15201-1-Niklas.Carlsson@axis.com Signed-off-by: Mark Brown commit 05d7bf817019890e4d049e0b851940c596adbd9b Author: Thomas Bogendoerfer Date: Thu Apr 22 16:53:29 2021 +0200 dt-bindings: interrupt-controller: Add IDT 79RC3243x Interrupt Controller Document DT bindings for IDT 79RC3243x Interrupt Controller. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210422145330.73452-2-tsbogend@alpha.franken.de commit 529ea36818112530791a2ec083a1a3066be6174c Author: Thomas Bogendoerfer Date: Thu Apr 22 16:53:28 2021 +0200 irqchip: Add support for IDT 79rc3243x interrupt controller IDT 79rc3243x SoCs have rather simple interrupt controllers connected to the MIPS CPU interrupt lines. Each of them has room for up to 32 interrupts. Signed-off-by: Thomas Bogendoerfer Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210422145330.73452-1-tsbogend@alpha.franken.de commit cb579086536f6564f5846f89808ec394ef8b8621 Author: Dan Carpenter Date: Thu Apr 22 12:14:37 2021 +0300 SUNRPC: fix ternary sign expansion bug in tracing This code is supposed to pass negative "err" values for tracing but it passes positive values instead. The problem is that the trace_svcsock_tcp_send() function takes a long but "err" is an int and "sent" is a u32. The negative is first type promoted to u32 so it becomes a high positive then it is promoted to long and it stays positive. Fix this by casting "err" directly to long. Fixes: 998024dee197 ("SUNRPC: Add more svcsock tracepoints") Signed-off-by: Dan Carpenter Signed-off-by: Chuck Lever commit 817aad5d08d2ee61de7353ecb4593b0df495b12e Author: Marc Zyngier Date: Tue Apr 6 10:35:55 2021 +0100 irqdomain: Drop references to recusive irqdomain setup It was never completely implemented, and was removed a long time ago. Adjust the documentation to reflect this. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210406093557.1073423-8-maz@kernel.org commit 1a0b05e435544cd53cd3936bdab425d88784b71a Author: Marc Zyngier Date: Fri Apr 2 16:02:37 2021 +0100 irqdomain: Get rid of irq_create_strict_mappings() No user of this helper is left, remove it. Signed-off-by: Marc Zyngier commit 5f8b938bd790cff6542c7fe3c1495c71f89fef1b Author: Marc Zyngier Date: Tue Apr 6 10:35:51 2021 +0100 irqchip/jcore-aic: Kill use of irq_create_strict_mappings() irq_create_strict_mappings() is a poor way to allow the use of a linear IRQ domain as a legacy one. Let's be upfront about it. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210406093557.1073423-4-maz@kernel.org commit b68761da01114a64b9c521975c3bca6d10eeb950 Author: Marc Zyngier Date: Tue Apr 6 10:35:50 2021 +0100 ARM: PXA: Kill use of irq_create_strict_mappings() irq_create_strict_mappings() is a poor way to allow the use of a linear IRQ domain as a legacy one. Let's be upfront about it and use a legacy domain when appropriate. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210406093557.1073423-3-maz@kernel.org commit 46135d6f878ab00261d4a2082d620bfb41019aab Author: Lorenzo Pieralisi Date: Wed Mar 17 10:07:19 2021 +0000 irqchip/gic-v4.1: Disable vSGI upon (GIC CPUIF < v4.1) detection GIC CPU interfaces versions predating GIC v4.1 were not built to accommodate vINTID within the vSGI range; as reported in the GIC specifications (8.2 "Changes to the CPU interface"), it is CONSTRAINED UNPREDICTABLE to deliver a vSGI to a PE with ID_AA64PFR0_EL1.GIC < b0011. Check the GIC CPUIF version by reading the SYS_ID_AA64_PFR0_EL1. Disable vSGIs if a CPUIF version < 4.1 is detected to prevent using vSGIs on systems where they may misbehave. Signed-off-by: Lorenzo Pieralisi Cc: Marc Zyngier Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210317100719.3331-2-lorenzo.pieralisi@arm.com commit 9382531ec63fc123d1d6ff07b0558b6af4ea724b Merge: 7a4fc7154e327 3df932141e4fa Author: Kalle Valo Date: Thu Apr 22 17:41:56 2021 +0300 Merge tag 'mt76-for-kvalo-2021-04-21' of https://github.com/nbd168/wireless mt76 patches for 5.13 * testmode improvements * bugfixes * device tree power limits support for 7615 and newer * hardware recovery fixes * mt7663 reset/init fixes * mt7915 flash pre-calibration support * mt7921/mt7663 runtime power management fixes # gpg: Signature made Wed 21 Apr 2021 09:58:49 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 7a4fc7154e3275c5ce166d0ebd385b3def7a7ab3 Author: Christophe JAILLET Date: Mon Apr 19 21:35:17 2021 +0200 brcmfmac: Avoid GFP_ATOMIC when GFP_KERNEL is enough A workqueue is not atomic, so constraints can be relaxed here. GFP_KERNEL can be used instead of GFP_ATOMIC. Signed-off-by: Christophe JAILLET Acked-by: Arend van Spriel Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/b6e619415db4ee5de95389280d7195bb56e45f77.1618860716.git.christophe.jaillet@wanadoo.fr commit 130f634da1af649205f4a3dd86cbe5c126b57914 Author: Lee Gibson Date: Mon Apr 19 15:58:42 2021 +0100 qtnfmac: Fix possible buffer overflow in qtnf_event_handle_external_auth Function qtnf_event_handle_external_auth calls memcpy without checking the length. A user could control that length and trigger a buffer overflow. Fix by checking the length is within the maximum allowed size. Signed-off-by: Lee Gibson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210419145842.345787-1-leegib@gmail.com commit a9a4c080deb33f44e08afe35f4ca4bb9ece89f4e Author: Colin Ian King Date: Mon Apr 19 15:14:05 2021 +0100 wlcore: Fix buffer overrun by snprintf due to incorrect buffer size The size of the buffer than can be written to is currently incorrect, it is always the size of the entire buffer even though the snprintf is writing as position pos into the buffer. Fix this by setting the buffer size to be the number of bytes left in the buffer, namely sizeof(buf) - pos. Addresses-Coverity: ("Out-of-bounds access") Fixes: 7b0e2c4f6be3 ("wlcore: fix overlapping snprintf arguments in debugfs") Signed-off-by: Colin Ian King Reviewed-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210419141405.180582-1-colin.king@canonical.com commit bb43e5718d8f1b46e7a77e7b39be3c691f293050 Author: Gustavo A. R. Silva Date: Wed Apr 14 18:45:15 2021 -0500 wl3501_cs: Fix out-of-bounds warnings in wl3501_mgmt_join Fix the following out-of-bounds warnings by adding a new structure wl3501_req instead of duplicating the same members in structure wl3501_join_req and wl3501_scan_confirm: arch/x86/include/asm/string_32.h:182:25: warning: '__builtin_memcpy' offset [39, 108] from the object at 'sig' is out of the bounds of referenced subobject 'beacon_period' with type 'short unsigned int' at offset 36 [-Warray-bounds] arch/x86/include/asm/string_32.h:182:25: warning: '__builtin_memcpy' offset [25, 95] from the object at 'sig' is out of the bounds of referenced subobject 'beacon_period' with type 'short unsigned int' at offset 22 [-Warray-bounds] Refactor the code, accordingly: $ pahole -C wl3501_req drivers/net/wireless/wl3501_cs.o struct wl3501_req { u16 beacon_period; /* 0 2 */ u16 dtim_period; /* 2 2 */ u16 cap_info; /* 4 2 */ u8 bss_type; /* 6 1 */ u8 bssid[6]; /* 7 6 */ struct iw_mgmt_essid_pset ssid; /* 13 34 */ struct iw_mgmt_ds_pset ds_pset; /* 47 3 */ struct iw_mgmt_cf_pset cf_pset; /* 50 8 */ struct iw_mgmt_ibss_pset ibss_pset; /* 58 4 */ struct iw_mgmt_data_rset bss_basic_rset; /* 62 10 */ /* size: 72, cachelines: 2, members: 10 */ /* last cacheline: 8 bytes */ }; $ pahole -C wl3501_join_req drivers/net/wireless/wl3501_cs.o struct wl3501_join_req { u16 next_blk; /* 0 2 */ u8 sig_id; /* 2 1 */ u8 reserved; /* 3 1 */ struct iw_mgmt_data_rset operational_rset; /* 4 10 */ u16 reserved2; /* 14 2 */ u16 timeout; /* 16 2 */ u16 probe_delay; /* 18 2 */ u8 timestamp[8]; /* 20 8 */ u8 local_time[8]; /* 28 8 */ struct wl3501_req req; /* 36 72 */ /* size: 108, cachelines: 2, members: 10 */ /* last cacheline: 44 bytes */ }; $ pahole -C wl3501_scan_confirm drivers/net/wireless/wl3501_cs.o struct wl3501_scan_confirm { u16 next_blk; /* 0 2 */ u8 sig_id; /* 2 1 */ u8 reserved; /* 3 1 */ u16 status; /* 4 2 */ char timestamp[8]; /* 6 8 */ char localtime[8]; /* 14 8 */ struct wl3501_req req; /* 22 72 */ /* --- cacheline 1 boundary (64 bytes) was 30 bytes ago --- */ u8 rssi; /* 94 1 */ /* size: 96, cachelines: 2, members: 8 */ /* padding: 1 */ /* last cacheline: 32 bytes */ }; The problem is that the original code is trying to copy data into a bunch of struct members adjacent to each other in a single call to memcpy(). Now that a new struct wl3501_req enclosing all those adjacent members is introduced, memcpy() doesn't overrun the length of &sig.beacon_period and &this->bss_set[i].beacon_period, because the address of the new struct object _req_ is used as the destination, instead. This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1fbaf516da763b50edac47d792a9145aa4482e29.1618442265.git.gustavoars@kernel.org commit 820aa37638a252b57967bdf4038a514b1ab85d45 Author: Gustavo A. R. Silva Date: Wed Apr 14 18:43:19 2021 -0500 wl3501_cs: Fix out-of-bounds warnings in wl3501_send_pkt Fix the following out-of-bounds warnings by enclosing structure members daddr and saddr into new struct addr, in structures wl3501_md_req and wl3501_md_ind: arch/x86/include/asm/string_32.h:182:25: warning: '__builtin_memcpy' offset [18, 23] from the object at 'sig' is out of the bounds of referenced subobject 'daddr' with type 'u8[6]' {aka 'unsigned char[6]'} at offset 11 [-Warray-bounds] arch/x86/include/asm/string_32.h:182:25: warning: '__builtin_memcpy' offset [18, 23] from the object at 'sig' is out of the bounds of referenced subobject 'daddr' with type 'u8[6]' {aka 'unsigned char[6]'} at offset 11 [-Warray-bounds] Refactor the code, accordingly: $ pahole -C wl3501_md_req drivers/net/wireless/wl3501_cs.o struct wl3501_md_req { u16 next_blk; /* 0 2 */ u8 sig_id; /* 2 1 */ u8 routing; /* 3 1 */ u16 data; /* 4 2 */ u16 size; /* 6 2 */ u8 pri; /* 8 1 */ u8 service_class; /* 9 1 */ struct { u8 daddr[6]; /* 10 6 */ u8 saddr[6]; /* 16 6 */ } addr; /* 10 12 */ /* size: 22, cachelines: 1, members: 8 */ /* last cacheline: 22 bytes */ }; $ pahole -C wl3501_md_ind drivers/net/wireless/wl3501_cs.o struct wl3501_md_ind { u16 next_blk; /* 0 2 */ u8 sig_id; /* 2 1 */ u8 routing; /* 3 1 */ u16 data; /* 4 2 */ u16 size; /* 6 2 */ u8 reception; /* 8 1 */ u8 pri; /* 9 1 */ u8 service_class; /* 10 1 */ struct { u8 daddr[6]; /* 11 6 */ u8 saddr[6]; /* 17 6 */ } addr; /* 11 12 */ /* size: 24, cachelines: 1, members: 9 */ /* padding: 1 */ /* last cacheline: 24 bytes */ }; The problem is that the original code is trying to copy data into a couple of arrays adjacent to each other in a single call to memcpy(). Now that a new struct _addr_ enclosing those two adjacent arrays is introduced, memcpy() doesn't overrun the length of &sig.daddr[0] and &sig.daddr, because the address of the new struct object _addr_ is used, instead. This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Reported-by: kernel test robot Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/d260fe56aed7112bff2be5b4d152d03ad7b78e78.1618442265.git.gustavoars@kernel.org commit ff9f732a87caa5f7bab72bea3aaad58db9b1ac60 Author: Anilkumar Kolli Date: Thu Apr 8 10:27:10 2021 +0530 ath11k: fix warning in ath11k_mhi_config Initialize static variable ath11k_mhi_config for all hw_rev, return error for unknown hw_rev. This patch fixes below Smatch warning: drivers/net/wireless/ath/ath11k/mhi.c:357 ath11k_mhi_register() error: uninitialized symbol 'ath11k_mhi_config'. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1-01734-QCAHKSWPL_SILICONZ-1 Fixes: a233811ef600 ("ath11k: Add qcn9074 mhi controller config") Reported-by: Dan Carpenter Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1617857830-19315-1-git-send-email-akolli@codeaurora.org commit 6dc89f070d2844900891b4efff0bf300ad8c07d2 Author: Colin Ian King Date: Tue Mar 16 09:19:24 2021 +0000 ath11k: qmi: Fix spelling mistake "requeqst" -> "request" There is a spelling mistake in an ath11k_warn message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210316091924.15627-1-colin.king@canonical.com commit eaaf52e4b866f265eb791897d622961293fd48c1 Author: Shuah Khan Date: Tue Apr 6 17:02:28 2021 -0600 ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock ath10k_wmi_tlv_op_pull_peer_stats_info() could try to unlock RCU lock winthout locking it first when peer reason doesn't match the valid cases for this function. Add a default case to return without unlocking. Fixes: 09078368d516 ("ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()") Reported-by: Pavel Machek Signed-off-by: Shuah Khan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210406230228.31301-1-skhan@linuxfoundation.org commit 8392df5d7e0b6a7d21440da1fc259f9938f4dec3 Author: Lv Yunlong Date: Mon Mar 29 05:01:54 2021 -0700 ath10k: Fix a use after free in ath10k_htc_send_bundle In ath10k_htc_send_bundle, the bundle_skb could be freed by dev_kfree_skb_any(bundle_skb). But the bundle_skb is used later by bundle_skb->len. As skb_len = bundle_skb->len, my patch replaces bundle_skb->len to skb_len after the bundle_skb was freed. Fixes: c8334512f3dd1 ("ath10k: add htt TX bundle for sdio") Signed-off-by: Lv Yunlong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210329120154.8963-1-lyl2019@mail.ustc.edu.cn commit 7dd9a40fd6e0d0f1fd8e1931c007e080801dfdce Author: Toke Høiland-Jørgensen Date: Fri Mar 26 19:08:19 2021 +0100 ath9k: Fix error check in ath9k_hw_read_revisions() for PCI devices When the error check in ath9k_hw_read_revisions() was added, it checked for -EIO which is what ath9k_regread() in the ath9k_htc driver uses. However, for plain ath9k, the register read function uses ioread32(), which just returns -1 on error. So if such a read fails, it still gets passed through and ends up as a weird mac revision in the log output. Fix this by changing ath9k_regread() to return -1 on error like ioread32() does, and fix the error check to look for that instead of -EIO. Fixes: 2f90c7e5d094 ("ath9k: Check for errors when reading SREV register") Signed-off-by: Toke Høiland-Jørgensen Reviewed-by: Lorenzo Bianconi Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210326180819.142480-1-toke@redhat.com commit c6c11ad3ab9fe5eb279479879e3461da99f6fdf0 Author: Neta Ostrovsky Date: Sun Apr 18 16:41:26 2021 +0300 RDMA/nldev: Add QP numbers to SRQ information Add QP numbers that are associated with the SRQ to the SRQ information. The QPs are displayed in a range form. Sample output: $ rdma res show srq dev ibp8s0f0 srqn 0 type BASIC pdn 3 comm [ib_ipoib] dev ibp8s0f0 srqn 4 type BASIC lqpn 125-128,130-140 pdn 9 pid 3581 comm ibv_srq_pingpon dev ibp8s0f0 srqn 5 type BASIC lqpn 141-156 pdn 10 pid 3584 comm ibv_srq_pingpon dev ibp8s0f0 srqn 6 type BASIC lqpn 157-172 pdn 11 pid 3590 comm ibv_srq_pingpon dev ibp8s0f1 srqn 0 type BASIC pdn 3 comm [ib_ipoib] dev ibp8s0f1 srqn 1 type BASIC lqpn 329-344 pdn 4 pid 3586 comm ibv_srq_pingpon $ rdma res show srq lqpn 126-141 dev ibp8s0f0 srqn 4 type BASIC lqpn 126-128,130-140 pdn 9 pid 3581 comm ibv_srq_pingpon dev ibp8s0f0 srqn 5 type BASIC lqpn 141 pdn 10 pid 3584 comm ibv_srq_pingpon $ rdma res show srq lqpn 127 dev ibp8s0f0 srqn 4 type BASIC lqpn 127 pdn 9 pid 3581 comm ibv_srq_pingpon Link: https://lore.kernel.org/r/79a4bd4caec2248fd9583cccc26786af8e4414fc.1618753110.git.leonro@nvidia.com Signed-off-by: Neta Ostrovsky Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 391c6bd5ac80094a5a8984d7ca20df7e3ec5b837 Author: Neta Ostrovsky Date: Sun Apr 18 16:41:25 2021 +0300 RDMA/nldev: Return SRQ information Extend the RDMA nldev return a SRQ information, like SRQ number, SRQ type, PD number, CQ number and process ID that created that SRQ. Sample output: $ rdma res show srq dev ibp8s0f0 srqn 0 type BASIC pdn 3 comm [ib_ipoib] dev ibp8s0f0 srqn 4 type BASIC pdn 9 pid 3581 comm ibv_srq_pingpon dev ibp8s0f0 srqn 5 type BASIC pdn 10 pid 3584 comm ibv_srq_pingpon dev ibp8s0f0 srqn 6 type BASIC pdn 11 pid 3590 comm ibv_srq_pingpon dev ibp8s0f1 srqn 0 type BASIC pdn 3 comm [ib_ipoib] dev ibp8s0f1 srqn 1 type BASIC pdn 4 pid 3586 comm ibv_srq_pingpon Link: https://lore.kernel.org/r/322f9210b95812799190dd4a0fb92f3a3bba0333.1618753110.git.leonro@nvidia.com Signed-off-by: Neta Ostrovsky Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 48f8a70e899fa4d9c8f00369f482f0382173ece9 Author: Neta Ostrovsky Date: Sun Apr 18 16:41:24 2021 +0300 RDMA/restrack: Add support to get resource tracking for SRQ In order to track SRQ resources, a new restrack object is initialized and added to the resource tracking database. Link: https://lore.kernel.org/r/0db71c409f24f2f6b019bf8797a8fed96fe7079c.1618753110.git.leonro@nvidia.com Signed-off-by: Neta Ostrovsky Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 12ce208f40c757e70d7af60100e814be0d2f01bd Author: Neta Ostrovsky Date: Sun Apr 18 16:41:23 2021 +0300 RDMA/nldev: Return context information Extend the RDMA nldev return a context information, like ctx number and process ID that created that context. This functionality is helpful to find orphan contexts that are not closed for some reason. Sample output: $ rdma res show ctx dev ibp8s0f0 ctxn 0 pid 980 comm ibv_rc_pingpong dev ibp8s0f0 ctxn 1 pid 981 comm ibv_rc_pingpong dev ibp8s0f0 ctxn 2 pid 992 comm ibv_rc_pingpong dev ibp8s0f1 ctxn 0 pid 984 comm ibv_rc_pingpong dev ibp8s0f1 ctxn 1 pid 987 comm ibv_rc_pingpong $ rdma res show ctx dev ibp8s0f1 dev ibp8s0f1 ctxn 0 pid 984 comm ibv_rc_pingpong dev ibp8s0f1 ctxn 1 pid 987 comm ibv_rc_pingpong Link: https://lore.kernel.org/r/5c956acfeac4e9d532988575f3da7d64cb449374.1618753110.git.leonro@nvidia.com Signed-off-by: Neta Ostrovsky Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e48802333acecfa3ada7b13eb55fa03b08df9e74 Author: Colin Ian King Date: Fri Apr 16 13:43:52 2021 +0100 PM: wakeup: 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: Rafael J. Wysocki commit a6992bbe9774e044d3d0f973593d655c53efe089 Author: Randy Dunlap Date: Wed Apr 21 22:16:20 2021 -0700 irqchip/tb10x: Use 'fallthrough' to eliminate a warning Use the 'fallthrough' macro to document that this switch case does indeed fall through to the next case. ../drivers/irqchip/irq-tb10x.c: In function 'tb10x_irq_set_type': ../drivers/irqchip/irq-tb10x.c:62:13: warning: this statement may fall through [-Wimplicit-fallthrough=] 62 | flow_type = IRQ_TYPE_LEVEL_LOW; ../drivers/irqchip/irq-tb10x.c:63:2: note: here 63 | case IRQ_TYPE_LEVEL_LOW: | ^~~~ Fixes: b06eb0173ef1 ("irqchip: Add TB10x interrupt controller driver") Signed-off-by: Randy Dunlap Cc: Thomas Gleixner Cc: Marc Zyngier Cc: Christian Ruppert Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210422051620.23021-1-rdunlap@infradead.org commit 9a8aae605b80fc0a830cdce747eed48e11acc067 Merge: 4085ae809334f 7f318847a0f37 Author: Marc Zyngier Date: Thu Apr 22 13:41:49 2021 +0100 Merge branch 'kvm-arm64/kill_oprofile_dependency' into kvmarm-master/next Signed-off-by: Marc Zyngier commit f4abe9967c6fdb511ee567e129a014b60945ab93 Author: Arnd Bergmann Date: Wed Apr 21 15:50:38 2021 +0200 kcsan: Fix printk format string Printing a 'long' variable using the '%d' format string is wrong and causes a warning from gcc: kernel/kcsan/kcsan_test.c: In function 'nthreads_gen_params': include/linux/kern_levels.h:5:25: error: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Werror=format=] Use the appropriate format modifier. Fixes: f6a149140321 ("kcsan: Switch to KUNIT_CASE_PARAM for parameterized tests") Signed-off-by: Arnd Bergmann Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Marco Elver Acked-by: Paul E. McKenney Link: https://lkml.kernel.org/r/20210421135059.3371701-1-arnd@kernel.org commit 7f318847a0f37b96d8927e8d30ae7b8f149b11f1 Author: Marc Zyngier Date: Wed Apr 14 14:44:09 2021 +0100 perf: Get rid of oprofile leftovers perf_pmu_name() and perf_num_counters() are unused. Drop them. Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210414134409.1266357-6-maz@kernel.org commit ac21ecf5ad32b89909bee2b50161ce93d6462b7d Author: Marc Zyngier Date: Wed Apr 14 14:44:08 2021 +0100 sh: Get rid of oprofile leftovers perf_pmu_name() and perf_num_counters() are unused. Drop them. Signed-off-by: Marc Zyngier Reviewed-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210414134409.1266357-5-maz@kernel.org commit 8c3f7913a106aa8b94d331cb59709c84a9a1d55b Author: Marc Zyngier Date: Wed Apr 14 14:44:07 2021 +0100 s390: Get rid of oprofile leftovers perf_pmu_name() and perf_num_counters() are unused. Drop them. Signed-off-by: Marc Zyngier Acked-by: Heiko Carstens Link: https://lore.kernel.org/r/20210414134409.1266357-4-maz@kernel.org commit e9c74a686a45e54b2e1c4586b14c84f3ee2f2014 Author: Marc Zyngier Date: Wed Apr 14 14:44:06 2021 +0100 arm64: Get rid of oprofile leftovers perf_pmu_name() and perf_num_counters() are now unused. Drop them. Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210414134409.1266357-3-maz@kernel.org commit 5421db1be3b11c5e469cce3760d5c8a013a90f2c Author: Marc Zyngier Date: Wed Apr 14 14:44:05 2021 +0100 KVM: arm64: Divorce the perf code from oprofile helpers KVM/arm64 is the sole user of perf_num_counters(), and really could do without it. Stop using the obsolete API by relying on the existing probing code. Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210414134409.1266357-2-maz@kernel.org commit b70dbf40eb075c596d86c42d93b86ff502290fc5 Author: Lukasz Luba Date: Thu Apr 22 12:43:06 2021 +0100 thermal/core: Create a helper __thermal_cdev_update() without a lock There is a need to have a helper function which updates cooling device state from the governors code. With this change governor can use lock and unlock while calling helper function. This avoid unnecessary second time lock/unlock which was in previous solution present in governor implementation. This new helper function must be called with mutex 'cdev->lock' hold. The changed been discussed and part of code presented in thread: https://lore.kernel.org/linux-pm/20210419084536.25000-1-lukasz.luba@arm.com/ Co-developed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Signed-off-by: Lukasz Luba Link: https://lore.kernel.org/r/20210422114308.29684-2-lukasz.luba@arm.com commit 26b2f03d2adf43d0dc9aeeb3fff54dcc9fcdb1f4 Author: Ansuel Smith Date: Tue Apr 20 20:33:43 2021 +0200 dt-bindings: thermal: tsens: Document ipq8064 bindings Document the use of bindings used for msm8960 tsens based devices. msm8960 use the same gcc regs and is set as a child of the qcom gcc. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-10-ansuelsmth@gmail.com commit 6b3aeafbc12c18036809108e301efe8056249233 Author: Ansuel Smith Date: Tue Apr 20 20:33:42 2021 +0200 thermal/drivers/tsens: Add support for ipq8064-tsens Add support for tsens present in ipq806x SoCs based on generic msm8960 tsens driver. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-9-ansuelsmth@gmail.com commit 2ebd0982e6ba69d9f9c02a4a0aab705a5526283e Author: Ansuel Smith Date: Tue Apr 20 20:33:41 2021 +0200 thermal/drivers/tsens: Drop unused define for msm8960 Drop unused define for msm8960 replaced by generic api and reg_field. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-8-ansuelsmth@gmail.com commit dfc1193d4dbd6c3cb68c944413146c940bde290a Author: Ansuel Smith Date: Tue Apr 20 20:33:40 2021 +0200 thermal/drivers/tsens: Replace custom 8960 apis with generic apis Rework calibrate function to use common function. Derive the offset from a missing hardcoded slope table and the data from the nvmem calib efuses. Drop custom get_temp function and use generic api. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-7-ansuelsmth@gmail.com commit 3d08f029fdbbd29c8b363ef4c8c4bfe3b8f79ad0 Author: Ansuel Smith Date: Tue Apr 20 20:33:39 2021 +0200 thermal/drivers/tsens: Fix bug in sensor enable for msm8960 Device based on tsens VER_0 contains a hardware bug that results in some problem with sensor enablement. Sensor id 6-11 can't be enabled selectively and all of them must be enabled in one step. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-6-ansuelsmth@gmail.com commit fdda131f8fbadee2dfc21f0787d11547b42a961e Author: Ansuel Smith Date: Tue Apr 20 20:33:38 2021 +0200 thermal/drivers/tsens: Use init_common for msm8960 Use init_common and drop custom init for msm8960. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-5-ansuelsmth@gmail.com commit 53e2a20e4c41683b695145436b34aa4a14bbcd8c Author: Ansuel Smith Date: Tue Apr 20 20:33:37 2021 +0200 thermal/drivers/tsens: Add VER_0 tsens version VER_0 is used to describe device based on tsens version before v0.1. These device are devices based on msm8960 for example apq8064 or ipq806x. Add support for VER_0 in tsens.c and set the right tsens feat in tsens-8960.c file. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-4-ansuelsmth@gmail.com commit a0ed1411278db902a043e584c8ed320fe34346b6 Author: Ansuel Smith Date: Tue Apr 20 20:33:36 2021 +0200 thermal/drivers/tsens: Convert msm8960 to reg_field Convert msm9860 driver to reg_field to use the init_common function. Signed-off-by: Ansuel Smith Acked-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-3-ansuelsmth@gmail.com commit 9d51769b2e75bb33c56c8f9ee933eca2d92b375b Author: Ansuel Smith Date: Tue Apr 20 20:33:35 2021 +0200 thermal/drivers/tsens: Don't hardcode sensor slope Function compute_intercept_slope hardcode the sensor slope to SLOPE_DEFAULT. Change this and use the default value only if a slope is not defined. This is needed for tsens VER_0 that has a hardcoded slope table. Signed-off-by: Ansuel Smith Reviewed-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420183343.2272-2-ansuelsmth@gmail.com commit 3343f376d4bae98ec11fd104e0e211b275e754b8 Author: Dan Carpenter Date: Thu Apr 22 12:00:54 2021 +0300 usb: gadget: prevent a ternary sign expansion bug The problem is that "req->actual" is a u32, "req->status" is an int, and iocb->ki_complete() takes a long. We would expect that a negative error code in "req->status" would translate to a negative long value. But what actually happens is that because "req->actual" is a u32, the error codes is type promoted to a high positive value and then remains a positive value when it is cast to long. (No sign expansion). We can fix this by casting "req->status" to long. Acked-by: Felipe Balbi Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YIE7RrBPLWc3XtMg@mwanda Signed-off-by: Greg Kroah-Hartman commit a5655d90cf508598b5f5bbccd911924cf8dc9060 Author: Thara Gopinath Date: Thu Jan 21 21:34:06 2021 -0500 Documentation: driver-api: thermal: Remove thermal_notify_framework from documentation Since thermal_notify_framework is no longer supported/implemented remove the entry from sysfs-api.rst. Signed-off-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210122023406.3500424-4-thara.gopinath@linaro.org commit d60d6e7adfc3814f6de03c978ff1daab21478f87 Author: Thara Gopinath Date: Thu Jan 21 21:34:05 2021 -0500 thermal/core: Remove thermal_notify_framework thermal_notify_framework just updates for a single trip point where as thermal_zone_device_update does other bookkeeping like updating the temperature of the thermal zone and setting the next trip point. The only driver that was using thermal_notify_framework was updated in the previous patch to use thermal_zone_device_update instead. Since there are no users for thermal_notify_framework remove it. Signed-off-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210122023406.3500424-3-thara.gopinath@linaro.org commit 8720037d55dbfa3011b8795ca2187b00bb05ee03 Author: Johan Hovold Date: Thu Apr 22 10:02:11 2021 +0200 serial: extend compile-test coverage Allow more drivers to be compile tested more easily, for example, when doing subsystem-wide changes. Verified on X86_64 as well as arm, powerpc and m68k with minimal configs in order to catch missing implicit build dependencies (e.g. MAILBOX for SERIAL_TEGRA_TCU). Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210422080211.29326-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 93effd83b6927c0252bb1e35aa3e116d3e2527bb Author: Thara Gopinath Date: Thu Jan 21 21:34:04 2021 -0500 iwlwifi: mvm: tt: Replace thermal_notify_framework thermal_notify_framework just updates for a single trip point where as thermal_zone_device_update does other bookkeeping like updating the temperature of the thermal zone and setting the next trip point etc. Replace thermal_notify_framework with thermal_zone_device_update as the later is more thorough. Acked-by: Kalle Valo Signed-off-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210122023406.3500424-2-thara.gopinath@linaro.org commit 0bd3f9e953bd3636e73d296e9bed11a25c09c118 Author: Christophe Leroy Date: Tue Apr 20 13:32:49 2021 +0000 powerpc/legacy_serial: Use early_ioremap() [ 0.000000] ioremap() called early from find_legacy_serial_ports+0x3cc/0x474. Use early_ioremap() instead find_legacy_serial_ports() is called early from setup_arch(), before paging_init(). vmalloc is not available yet, ioremap shouldn't be used that early. Use early_ioremap() and switch to a regular ioremap() later. Signed-off-by: Christophe Leroy Signed-off-by: Christophe Leroy Tested-by: Chris Packham Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/103ed8ee9e5973c958ec1da2d0b0764f69395d01.1618925560.git.christophe.leroy@csgroup.eu commit 9ccba66d4d2aff9a3909aa77d57ea8b7cc166f3c Author: Christophe Leroy Date: Tue Apr 20 13:32:48 2021 +0000 powerpc/64: Fix the definition of the fixmap area At the time being, the fixmap area is defined at the top of the address space or just below KASAN. This definition is not valid for PPC64. For PPC64, use the top of the I/O space. Because of circular dependencies, it is not possible to include asm/fixmap.h in asm/book3s/64/pgtable.h , so define a fixed size AREA at the top of the I/O space for fixmap and ensure during build that the size is big enough. Fixes: 265c3491c4bc ("powerpc: Add support for GENERIC_EARLY_IOREMAP") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0d51620eacf036d683d1a3c41328f69adb601dc0.1618925560.git.christophe.leroy@csgroup.eu commit 389586333c0229a4fbc5c1a7f89148d141293682 Author: Randy Dunlap Date: Wed Apr 21 14:06:47 2021 -0700 powerpc: make ALTIVEC select PPC_FPU On a kernel config with ALTIVEC=y and PPC_FPU not set/enabled, there are build errors: drivers/cpufreq/pmac32-cpufreq.c:262:2: error: implicit declaration of function 'enable_kernel_fp' [-Werror,-Wimplicit-function-declaration] enable_kernel_fp(); ../arch/powerpc/lib/sstep.c: In function 'do_vec_load': ../arch/powerpc/lib/sstep.c:637:3: error: implicit declaration of function 'put_vr' [-Werror=implicit-function-declaration] 637 | put_vr(rn, &u.v); | ^~~~~~ ../arch/powerpc/lib/sstep.c: In function 'do_vec_store': ../arch/powerpc/lib/sstep.c:660:3: error: implicit declaration of function 'get_vr'; did you mean 'get_oc'? [-Werror=implicit-function-declaration] 660 | get_vr(rn, &u.v); | ^~~~~~ In theory ALTIVEC is independent of PPC_FPU but in practice nobody is going to build such a machine, so make ALTIVEC require PPC_FPU by selecting it. Reported-by: kernel test robot Signed-off-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210421210647.20836-1-rdunlap@infradead.org commit 7d946276570755d6b53d29bd100271f18cb8bf95 Author: Michael Ellerman Date: Tue Apr 20 14:22:09 2021 +1000 powerpc/64s: Add FA_DUMP to defconfig FA_DUMP (Firmware Assisted Dump) is a powerpc only feature that should be enabled in our defconfig to get some build / test coverage. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210420042209.1641634-1-mpe@ellerman.id.au commit d936f8182e1bd18f5e9e6c5e8d8b69261200ca96 Author: Michael Ellerman Date: Wed Apr 21 22:54:02 2021 +1000 powerpc/powernv: Fix type of opal_mpipl_query_tag() addr argument opal_mpipl_query_tag() takes a pointer to a 64-bit value, which firmware writes a value to. As OPAL is traditionally big endian this value will be big endian. This can be confirmed by looking at the implementation in skiboot: static uint64_t opal_mpipl_query_tag(enum opal_mpipl_tags tag, __be64 *tag_val) { ... *tag_val = cpu_to_be64(opal_mpipl_tags[tag]); return OPAL_SUCCESS; } Fix the declaration to annotate that the value is big endian. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210421125402.1955013-2-mpe@ellerman.id.au commit 2e341f56a16a71f240c87ec69711aad0d95a704c Author: Michael Ellerman Date: Wed Apr 21 22:54:01 2021 +1000 powerpc/fadump: Fix sparse warnings Sparse says: arch/powerpc/kernel/fadump.c:48:16: warning: symbol 'fadump_kobj' was not declared. Should it be static? arch/powerpc/kernel/fadump.c:55:27: warning: symbol 'crash_mrange_info' was not declared. Should it be static? arch/powerpc/kernel/fadump.c:61:27: warning: symbol 'reserved_mrange_info' was not declared. Should it be static? arch/powerpc/kernel/fadump.c:83:12: warning: symbol 'fadump_cma_init' was not declared. Should it be static? And indeed none of them are used outside this file, they can all be made static. Also fadump_kobj needs to be moved inside the ifdef where it's used. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210421125402.1955013-1-mpe@ellerman.id.au commit 2aa1bbb21f26de43b55a9d9cab9c0370c15a86ed Author: Fabrice Gasnier Date: Tue Apr 13 19:40:15 2021 +0200 serial: stm32: add FIFO threshold configuration Add the support for two optional DT properties, to configure RX and TX FIFO thresholds: - rx-threshold - tx-threshold This replaces hard-coded 8 bytes threshold. Keep 8 as the default value if not specified, for backward compatibility. Signed-off-by: Fabrice Gasnier Signed-off-by: Erwan Le Ray Changes in v2: Change added properties naming as proposed by Rob Herring. Link: https://lore.kernel.org/r/20210413174015.23011-5-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 31db3ce05b1a7c045ff462761a9c6c8ebe25d620 Author: Erwan Le Ray Date: Tue Apr 13 19:40:14 2021 +0200 dt-bindings: serial: 8250: update TX FIFO trigger level Remove data type from tx-threshold trigger level as defined now as a serial generic property. Reviewed-by: Rob Herring Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210413174015.23011-4-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit cd9de06e16104a9e37245275fa2c4a073edf2e44 Author: Erwan Le Ray Date: Tue Apr 13 19:40:13 2021 +0200 dt-bindings: serial: stm32: override FIFO threshold properties Override rx-threshold and tx-threshold properties: - extend description - provide default and expected values Signed-off-by: Fabrice Gasnier Signed-off-by: Erwan Le Ray Changes in v2: Change added properties naming and factorize it in serial.yaml as proposed by Rob Herring. Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210413174015.23011-3-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 8574c9e7292247b5d3ffa5db22399b3b53a0dbda Author: Erwan Le Ray Date: Tue Apr 13 19:40:12 2021 +0200 dt-bindings: serial: add RX and TX FIFO properties Add two optional DT properties to configure RX and TX FIFO thresholds: - rx-threshold - tx-threshold Reviewed-by: Rob Herring Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210413174015.23011-2-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 348fbd61700ce0527625582aee8bb136373f10af Author: Johan Hovold Date: Wed Apr 21 11:55:09 2021 +0200 serial: xilinx_uartps: drop low-latency workaround Commit c8dbdc842d30 ("serial: xuartps: Rewrite the interrupt handling logic") reworked the driver interrupt processing but also, without comment, added an unnecessary workaround for the infamous low_latency behaviour of tty_flip_buffer_push() which had been removed years before. Specifically, since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Cc: Michal Simek Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-27-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4e11dbb518fe97d9a4c53bdef7f2144de20a9ed3 Author: Johan Hovold Date: Wed Apr 21 11:55:08 2021 +0200 serial: vt8500: drop low-latency workaround Commit de49df58366f ("tty: serial: vt8500: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Cc: Tony Prisk Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-26-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 177765b350a06493b9437f814384f2a018fd7731 Author: Johan Hovold Date: Wed Apr 21 11:55:07 2021 +0200 serial: timbuart: drop low-latency workaround The timbuart driver has always carried a workaround for the infamous low_latency behaviour of tty_flip_buffer_push() which required not holding the port lock when the low_latency flag was set. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-25-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3f6dbe6212bdd2094db84015ddef3d1f50fcde20 Author: Johan Hovold Date: Wed Apr 21 11:55:06 2021 +0200 serial: sunsu: drop low-latency workaround The sunsu driver has been carrying a workaround for the infamous low_latency behaviour of tty_flip_buffer_push() by dropping and reacquiring the port lock in the interrupt handler since 2004. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Cc: "David S. Miller" Acked-by: David S. Miller Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-24-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0f8a732822bab43313400e5ae6af6560e4a7ce85 Author: Johan Hovold Date: Wed Apr 21 11:55:05 2021 +0200 serial: sifive: drop low-latency workaround The sifive driver has always carried an unnecessary workaround for the infamous low_latency behaviour of tty_flip_buffer_push() which had been removed years before the driver was added by commit 45c054d0815b ("tty: serial: add driver for the SiFive UART"). Specifically, since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Cc: Palmer Dabbelt Cc: Paul Walmsley Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-23-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 38616c225e7088915f00be11c090543b7591e9a4 Author: Johan Hovold Date: Wed Apr 21 11:55:04 2021 +0200 serial: txx9: drop low-latency workaround Commit f5ee56cc184e ("[PATCH] txx9 serial update") worked around the infamous low_latency behaviour of tty_flip_buffer_push() by simply dropping and reacquiring the port lock in the interrupt handler. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-22-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit f306226ee51d12983240fcd42daaf148fbdf19cd Author: Johan Hovold Date: Wed Apr 21 11:55:03 2021 +0200 serial: sa1100: drop low-latency workaround Commit 53e0e6706c76 ("tty: serial: sa1100: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-21-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit e1bd674499c570a4f3ceb0329dc16b6d59b14e27 Author: Johan Hovold Date: Wed Apr 21 11:55:02 2021 +0200 serial: rp2: drop low-latency workaround Commit de7053c77123 ("tty: serial: rp2: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Cc: Kevin Cernekee Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-20-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2225ee132c61481a7ed73d78c2bee9e775173262 Author: Johan Hovold Date: Wed Apr 21 11:55:01 2021 +0200 serial: rda: drop low-latency workaround The rda driver has always carried an unnecessary workaround for the infamous low_latency behaviour of tty_flip_buffer_push(), which had been removed years before the driver was added by commit c10b13325ced ("tty: serial: Add RDA8810PL UART driver"). Specifically, since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-19-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 493a275c04715cf0a571e017ad24e0b78af094eb Author: Johan Hovold Date: Wed Apr 21 11:55:00 2021 +0200 serial: owl: drop low-latency workaround The owl driver has always carried an unnecessary workaround for the infamous low_latency behaviour of tty_flip_buffer_push(), which had been removed years before the driver was added by commit fc60a8b675bd ("tty: serial: owl: Implement console driver"). Specifically, since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-18-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit c0a6c9f79e5266d750b73bff5a61761827f4687d Author: Johan Hovold Date: Wed Apr 21 11:54:59 2021 +0200 serial: msm_serial: drop low-latency workaround Commit f77232dab25b ("tty: serial: msm: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Cc: Andy Gross Cc: Bjorn Andersson Acked-by: Bjorn Andersson Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-17-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6e560913aae066d532e48beeb7224aa3339f8d8e Author: Johan Hovold Date: Wed Apr 21 11:54:58 2021 +0200 serial: mpc52xx_uart: drop low-latency workaround Commit fbe543b412ce ("Fix a potential issue in mpc52xx uart driver") worked around the infamous low_latency behaviour of tty_flip_buffer_push() by simply dropping and reacquiring the port lock in the interrupt handler. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-16-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit b8555963ca1abf94b0f69b5f67d208aa78471795 Author: Johan Hovold Date: Wed Apr 21 11:54:57 2021 +0200 serial: meson: drop low-latency workaround The meson driver has always carried an unnecessary workaround for the infamous low_latency behaviour of tty_flip_buffer_push(), which had already been removed by the time the driver was added by commit ff7693d079e5 ("ARM: meson: serial: add MesonX SoC on-chip uart driver"). Specifically, since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-15-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5d148754dac63c04d04bb05e6751c043e4abe325 Author: Johan Hovold Date: Wed Apr 21 11:54:56 2021 +0200 serial: mcf: drop low-latency workaround Commit 5275ad70fed3 ("tty: serial: mcf: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-14-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 46a2675e8f0d9c5da85b608ceb573f425432a6e7 Author: Johan Hovold Date: Wed Apr 21 11:54:55 2021 +0200 serial: lpc32xx_hs: drop low-latency workaround Commit ec128510905c ("tty: serial: lpc32xx_hs: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-13-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 4eec66e4b2a03a4c495f646d4cd98a655b4d9176 Author: Johan Hovold Date: Wed Apr 21 11:54:54 2021 +0200 serial: icom: drop low-latency workaround Commit 5faf75d7fed2 ("tty: serial: icom: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-12-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit acf484363177d87e4d4d32887e62df7ccfe18b9b Author: Johan Hovold Date: Wed Apr 21 11:54:53 2021 +0200 serial: bcm63xx: drop low-latency workaround Commit b4d499241c34 ("tty: serial: bcm63xx: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-11-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 983fe58ad72d45e5c12eb8166dc85657065dd34e Author: Johan Hovold Date: Wed Apr 21 11:54:52 2021 +0200 serial: atmel_serial: drop low-latency workaround Commit 1ecc26bd2789 ("atmel_serial: split the interrupt handler") worked around the infamous low_latency behaviour of tty_flip_buffer_push() by dropping and reacquiring the port lock in the tasklet callback. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Cc: Richard Genoud Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-10-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit e9af7e363af5632c3342559009d36d8003fa1709 Author: Johan Hovold Date: Wed Apr 21 11:54:51 2021 +0200 serial: arc_uart: drop low-latency workaround Commit 3fa1200851c7 ("tty: serial: arc: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Cc: Vineet Gupta Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-9-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 80d43febacf1502bb562e58d8ab76ecee2655a8b Author: Johan Hovold Date: Wed Apr 21 11:54:50 2021 +0200 serial: ar933x: drop low-latency workaround Commit b16c8e3eed12 ("tty: serial: ar933x: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-8-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit d0aa2820b9e85e79f5a76eb7874316aaa04bdff9 Author: Johan Hovold Date: Wed Apr 21 11:54:49 2021 +0200 serial: apbuart: drop low-latency workaround Commit 78d34d75c84d ("tty: serial: apbuart: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-7-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 02d5364007ba95eb3c90ba5710e3ccbdf6c56cfb Author: Johan Hovold Date: Wed Apr 21 11:54:48 2021 +0200 serial: amba-pl011: drop low-latency workaround Commit ead76f329f77 ("ARM: 6763/1: pl011: add optional RX DMA to PL011 v2") added RX DMA support and also reproduced the workaround for the infamous low_latency behaviour of tty_flip_buffer_push() by dropping and reacquiring the port lock during receive processing. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Note that the port lock is also dropped in the PIO path (see pl011_rx_chars), but it is not clear whether this is still needed by the DMA code added by the aforementioned commit. Cc: Linus Walleij Cc: Russell King Reviewed-by: Linus Walleij Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-6-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 173d37fc598a2c2cfc73288203a1154557c810be Author: Johan Hovold Date: Wed Apr 21 11:54:47 2021 +0200 serial: amba-pl010: drop low-latency workaround Commit 2389b272168c ("[ARM] 4417/1: Serial: Fix AMBA drivers locking") worked around the infamous low_latency behaviour of tty_flip_buffer_push() by simply dropping and reacquiring the port lock in the interrupt handler. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Cc: Russell King Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-5-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit d26595d188e6f1f0dc2e3e9591ef31492b4f64da Author: Johan Hovold Date: Wed Apr 21 11:54:46 2021 +0200 serial: altera_uart: drop low-latency workaround Commit dd085ed8ef6c ("tty: serial: altera: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Cc: Tobias Klauser Acked-by: Tobias Klauser Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit f22dd43fc16671c7c1237e855dfb65b5f73cc0eb Author: Johan Hovold Date: Wed Apr 21 11:54:45 2021 +0200 serial: altera_jtaguart: drop low-latency workaround Commit 53dd0ba7a6f4 ("tty: serial: altera_jtag: drop uart_port->lock before calling tty_flip_buffer_push()") claimed to address a locking issue but only provided a dubious lockdep splat from an unrelated driver, which in the end turned out to be due a broken local change carried by the author. Unfortunately these patches were merged before the issue had been analysed properly so the commit messages makes no sense whatsoever. The real issue was first seen on RT which at the time effectively always set the low_latency flag for all serial drivers by patching tty_flip_buffer_push(). This in turn revealed that many drivers did not handle the infamous low_latency behaviour which meant that data was pushed immediately to the line discipline instead of being deferred to a work queue. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/linux-serial/cover.1376923198.git.viresh.kumar@linaro.org/ Cc: Tobias Klauser Acked-by: Tobias Klauser Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 02ca144fa4891035b43770e96d51468c94aa8391 Author: Johan Hovold Date: Wed Apr 21 11:54:44 2021 +0200 tty: mxser: drop low-latency workaround Commit 67d2bc58afdd ("Char: mxser_new, fix recursive locking") worked around the infamous low_latency behaviour of tty_flip_buffer_push() by simply dropping and reacquiring the port lock in the interrupt handler. Since commit a9c3f68f3cd8 ("tty: Fix low_latency BUG"), tty_flip_buffer_push() always schedules a work item to push data to the line discipline and there's no need to keep any low_latency hacks around. Link: https://lore.kernel.org/lkml/3018694794025219@wsc.cz/T/#m06b04c640a7b6f41afb3d34a4cf29b1df4935d3a Reviewed-by: Jiri Slaby Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210421095509.3024-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit e2a5e8448e7393e96ccde346c68764b40a52cc10 Author: Dario Binacchi Date: Sun Apr 18 11:47:05 2021 +0200 serial: omap: fix rs485 half-duplex filtering Data received during half-duplex transmission must be filtered. If the target device responds quickly, emptying the FIFO at the end of the transmission can erase not only the echo characters but also part of the response message. By keeping the receive interrupt enabled even during transmission, it allows you to filter each echo character and only in a number equal to those transmitted. The issue was generated by a target device that started responding 240us later having received a request in communication at 115200bps. Sometimes, some messages received by the target were missing some of the first bytes. Fixes: 3a13884abea0 ("tty/serial: omap: empty the RX FIFO at the end of half-duplex TX") Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20210418094705.27014-1-dariobin@libero.it Signed-off-by: Greg Kroah-Hartman commit 45f6b6db53c80787b79044629b062dfcf2da71ec Author: Dario Binacchi Date: Thu Apr 15 23:09:45 2021 +0200 serial: omap: don't disable rs485 if rts gpio is missing There are rs485 transceivers (e.g. MAX13487E/MAX13488E) which automatically disable or enable the driver and receiver to keep the bus in the correct state. In these cases we don't need a GPIO for flow control. Fixes: 4a0ac0f55b18 ("OMAP: add RS485 support") Signed-off-by: Dario Binacchi Link: https://lore.kernel.org/r/20210415210945.25863-1-dariobin@libero.it Signed-off-by: Greg Kroah-Hartman commit cea37afd28f1bb7ca09a0c27e75f89cf2df9147d Author: Johan Hovold Date: Fri Apr 16 16:05:57 2021 +0200 serial: stm32: defer sysrq processing Use the uart_unlock_and_check_sysrq() helper to defer sysrq processing until receive processing is done and the port lock has been released. This allows cleaning up the console_write() implementation by not having to work around the recursive sysrq case (by dropping locking completely) and also makes the console code work with PREEMPT_RT by no longer relying on local_irq_save(). Reviewed-by: Valentin Caron Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210416140557.25177-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit e359b4411c2836cf87c8776682d1b594635570de Author: Johan Hovold Date: Fri Apr 16 16:05:56 2021 +0200 serial: stm32: fix threaded interrupt handling When DMA is enabled the receive handler runs in a threaded handler, but the primary handler up until very recently neither disabled interrupts in the device or used IRQF_ONESHOT. This would lead to a deadlock if an interrupt comes in while the threaded receive handler is running under the port lock. Commit ad7676812437 ("serial: stm32: fix a deadlock condition with wakeup event") claimed to fix an unrelated deadlock, but unfortunately also disabled interrupts in the threaded handler. While this prevents the deadlock mentioned in the previous paragraph it also defeats the purpose of using a threaded handler in the first place. Fix this by making the interrupt one-shot and not disabling interrupts in the threaded handler. Note that (receive) DMA must not be used for a console port as the threaded handler could be interrupted while holding the port lock, something which could lead to a deadlock in case an interrupt handler ends up calling printk. Fixes: ad7676812437 ("serial: stm32: fix a deadlock condition with wakeup event") Fixes: 3489187204eb ("serial: stm32: adding dma support") Cc: stable@vger.kernel.org # 4.9 Cc: Alexandre TORGUE Cc: Gerald Baeza Reviewed-by: Valentin Caron Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210416140557.25177-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 75f4e830fa9c47637054a3b7201765f2a314bda2 Author: Johan Hovold Date: Fri Apr 16 16:05:55 2021 +0200 serial: do not restore interrupt state in sysrq helper The uart_unlock_and_check_sysrq() helper can be used to defer processing of sysrq until the interrupt handler has released the port lock and is about to return. Since commit 81e2073c175b ("genirq: Disable interrupts for force threaded handlers") interrupt handlers that are not explicitly requested as threaded are always called with interrupts disabled and there is no need to save the interrupt state when taking the port lock. Instead of adding another sysrq helper for when the interrupt state has not needlessly been saved, drop the state parameter from uart_unlock_and_check_sysrq() and update its callers to no longer explicitly disable interrupts in their interrupt handlers. Cc: Joel Stanley Cc: Andrew Jeffery Cc: Andy Gross Cc: Bjorn Andersson Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210416140557.25177-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 86eb032675766e633ba1ad2902776533e8dd576b Author: Colin Ian King Date: Tue Apr 20 11:57:18 2021 +0100 tty: synclink_gt: remove redundant initialization of variable count The variable count 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. Reviewed-by: Jiri Slaby Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210420105718.377086-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit c0070e1e60270f6a1e09442a9ab2335f3eaeaad2 Author: Tetsuo Handa Date: Thu Apr 15 09:22:22 2021 +0900 ttyprintk: Add TTY hangup callback. syzbot is reporting hung task due to flood of tty_warn(tty, "%s: tty->count = 1 port count = %d\n", __func__, port->count); message [1], for ioctl(TIOCVHANGUP) prevents tty_port_close() from decrementing port->count due to tty_hung_up_p() == true. ---------- #include #include #include #include #include int main(int argc, char *argv[]) { int i; int fd[10]; for (i = 0; i < 10; i++) fd[i] = open("/dev/ttyprintk", O_WRONLY); ioctl(fd[0], TIOCVHANGUP); for (i = 0; i < 10; i++) close(fd[i]); close(open("/dev/ttyprintk", O_WRONLY)); return 0; } ---------- When TTY hangup happens, port->count needs to be reset via "struct tty_operations"->hangup callback. [1] https://syzkaller.appspot.com/bug?id=39ea6caa479af471183997376dc7e90bc7d64a6a Reported-by: syzbot Reported-by: syzbot Tested-by: syzbot Signed-off-by: Tetsuo Handa Fixes: 24b4b67d17c308aa ("add ttyprintk driver") Link: https://lore.kernel.org/r/17e0652d-89b7-c8c0-fb53-e7566ac9add4@i-love.sakura.ne.jp Signed-off-by: Greg Kroah-Hartman commit f88359e1588b85cf0e8209ab7d6620085f3441d9 Author: Yu Chen Date: Thu Apr 15 15:20:30 2021 -0700 usb: dwc3: core: Do core softreset when switch mode From: John Stultz According to the programming guide, to switch mode for DRD controller, the driver needs to do the following. To switch from device to host: 1. Reset controller with GCTL.CoreSoftReset 2. Set GCTL.PrtCapDir(host mode) 3. Reset the host with USBCMD.HCRESET 4. Then follow up with the initializing host registers sequence To switch from host to device: 1. Reset controller with GCTL.CoreSoftReset 2. Set GCTL.PrtCapDir(device mode) 3. Reset the device with DCTL.CSftRst 4. Then follow up with the initializing registers sequence Currently we're missing step 1) to do GCTL.CoreSoftReset and step 3) of switching from host to device. John Stult reported a lockup issue seen with HiKey960 platform without these steps[1]. Similar issue is observed with Ferry's testing platform[2]. So, apply the required steps along with some fixes to Yu Chen's and John Stultz's version. The main fixes to their versions are the missing wait for clocks synchronization before clearing GCTL.CoreSoftReset and only apply DCTL.CSftRst when switching from host to device. [1] https://lore.kernel.org/linux-usb/20210108015115.27920-1-john.stultz@linaro.org/ [2] https://lore.kernel.org/linux-usb/0ba7a6ba-e6a7-9cd4-0695-64fc927e01f1@gmail.com/ Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly") Cc: Andy Shevchenko Cc: Ferry Toth Cc: Wesley Cheng Cc: Tested-by: John Stultz Tested-by: Wesley Cheng Signed-off-by: Yu Chen Signed-off-by: John Stultz Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/374440f8dcd4f06c02c2caf4b1efde86774e02d9.1618521663.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 0fdf3c5e06aafdded33c9adab8a6f3bb1fe688f9 Author: Artur Petrosyan Date: Fri Apr 16 16:48:42 2021 +0400 usb: dwc2: Get rid of useless error checks in suspend interrupt Squashed from Douglas Anderson's suggested commit "usb: dwc2: Get rid of useless error checks for hibernation/partial power down" - After this commit there should never be any case where dwc2_enter_partial_power_down() and dwc2_enter_hibernation() are called when 'params.power_down' is not correct. Get rid of the pile of error checking. - As part of this cleanup some of the error messages not to have __func__ in them. That's not needed for dev_err() calls since they already have the device name as part of the message. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210416124843.9EDCDA005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 0112b7ce68ea85d4e88a5baf32d007c1e3856661 Author: Artur Petrosyan Date: Fri Apr 16 16:48:34 2021 +0400 usb: dwc2: Update dwc2_handle_usb_suspend_intr function. To avoid working in two modes (partial power down and hibernation) changed conditions for entering partial power down or hibernation. Instead of checking hw_params.power_optimized and hw_params.hibernation now checking power_down param which already set to one of the options (Hibernation or Partial Power Down) based on OTG_EN_PWROPT. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20210416124835.9F257A005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit a94f01814be4fb46fb89c08209f808b665182763 Author: Artur Petrosyan Date: Fri Apr 16 16:48:26 2021 +0400 usb: dwc2: Add exit hibernation mode before removing drive When dwc2 core is in hibernation mode loading driver again causes driver fail. Because in that mode registers are not accessible. In order to exit from hibernation checking dwc2 core power saving state in "dwc2_driver_remove()" function. If core is in hibernation, then checking the operational mode of the driver. To check whether dwc2 core is operating in host mode or device mode there is one way which is retrieving the backup value of "gotgctl" and compare the "CurMod" value. If previously core entered hibernation in host mode then the exit is performed for host if not then exit is performed for device mode. The introduced checking is because in hibernation state all registers are not accessible. Reported-by: kernel test robot Reported-by: Dan Carpenter Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124827.9BB59A005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit ae0da4fd225804a2c5c60a03b16fcf7d930d8581 Author: Artur Petrosyan Date: Fri Apr 16 16:48:18 2021 +0400 usb: dwc2: Add hibernation exiting flow by system resume Adds a new flow of exiting hibernation when PC is resumed from suspend state. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124819.A3B26A005C@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 755d0effebb82caf397b719602b9e76b1d5e2831 Author: Artur Petrosyan Date: Fri Apr 16 16:48:10 2021 +0400 usb: dwc2: Add hibernation entering flow by system suspend Adds a new flow of entering hibernation when PC is hibernated or suspended. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124811.BBFDBA005C@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit c3595df7a6115db74dfc23b0bac214c0ec62cad8 Author: Artur Petrosyan Date: Fri Apr 16 16:48:02 2021 +0400 usb: dwc2: Allow exit hibernation in urb enqueue When core is in hibernation state and an external hub is connected, upper layer sends URB enqueue request, which results in port reset issue. - Added exit from hibernation state to avoid port reset issue and process upper layer request properly. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124803.D1C1FA005F@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit e358c2159cd6be2fe1af348f7d652fd461a873cf Author: Artur Petrosyan Date: Fri Apr 16 16:47:54 2021 +0400 usb: dwc2: Move exit hibernation to dwc2_port_resume() function This move is done to call hibernation exit handler in "dwc2_port_resume()" function when core receives port resume. Otherwise it could be confusing to exit hibernation in "dwc2_hcd_hub_control()" function but other power saving modes in "dwc2_port_resume()" function. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124755.E47F3A005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 8f7f8689b6cf7c8b829d3875d7ede366e9b885d4 Author: Artur Petrosyan Date: Fri Apr 16 16:47:46 2021 +0400 usb: dwc2: Move enter hibernation to dwc2_port_suspend() function This move is done to call enter hibernation handler in "dwc2_port_suspend()" function when core receives port suspend. Otherwise it could be confusing to enter to hibernation in "dwc2_hcd_hub_control()" function but other power saving modes in "dwc2_port_suspend()" function. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124747.EE79EA005C@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 5160d6871aaede2f7e27e2137b6571940f25697a Author: Artur Petrosyan Date: Fri Apr 16 16:47:38 2021 +0400 usb: dwc2: Clear GINTSTS_RESTOREDONE bit after restore is generated. When hibernation exit is performed the dwc2_hib_restore_common() function is called. In that function we wait until GINTSTS_RESTOREDONE bit is set. However, after the setting of that bit we get a lot of (dwc2_hsotg_irq:) interrupts which indicates that (GINTSTS.RstrDoneInt) restore done interrupt is asserted. To avoid restore done interrupt storm after restore is generated clear GINTSTS_RESTOREDONE bit in GINTSTS register. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124739.D6269A005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 238f65aeeae8329fd6f6c2a9b87f2972b96094e5 Author: Artur Petrosyan Date: Fri Apr 16 16:47:30 2021 +0400 usb: dwc2: Clear fifo_map when resetting core. Switching from device mode to host mode by disconnecting device cable core enters and exits form hibernation. However, the fifo map remains not cleared. It results to a WARNING (WARNING: CPU: 5 PID: 0 at drivers/usb/dwc2/ gadget.c:307 dwc2_hsotg_init_fifo+0x12/0x152 [dwc2]) if in host mode we disconnect the micro a to b host cable. Because core reset occurs. To avoid the WARNING, fifo_map should be cleared in dwc2_core_reset() function by taking into account configs. fifo_map must be cleared only if driver is configured in "CONFIG_USB_DWC2_PERIPHERAL" or "CONFIG_USB_DWC2_DUAL_ROLE" mode. - Added "static inline void dwc2_clear_fifo_map()" helper function to clear fifo_map with peripheral or dual role mode. - Added a dummy version of "dwc2_clear_fifo_map()" helper for host-only mode. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124731.C500AA005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 4111d5f805d89cbf6c454357bf8782ba0387bb7c Author: Artur Petrosyan Date: Fri Apr 16 16:47:22 2021 +0400 usb: dwc2: Allow exiting hibernation from gpwrdn rst detect When device cable is disconnected core receives suspend interrupt and enters hibernation. After entering into hibernation GPWRDN_RST_DET and GPWRDN_STS_CHGINT interrupts are asserted. Allowed exit from gadget hibernation from GPWRDN_RST_DET by checking only linestate. Changed the return type of "dwc2_handle_gpwrdn_intr()" function from void to int because exit from hibernation functions have a return value. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124723.B6F17A005C@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 24d209dba5a3959b2ebde7cf3ad40c8015e814cf Author: Artur Petrosyan Date: Fri Apr 16 16:47:14 2021 +0400 usb: dwc2: Fix hibernation between host and device modes. When core is in hibernation in host mode and a device cable was connected then driver exited from device hibernation. However, registers saved for host mode and when exited from device hibernation register restore would be done for device register which was wrong because there was no device registers stored to restore. - Added dwc_handle_gpwrdn_disc_det() function which handles gpwrdn disconnect detect flow and exits hibernation without restoring the registers. - Updated exiting from hibernation in GPWRDN_STS_CHGINT with calling dwc_handle_gpwrdn_disc_det() function. Here no register is restored which is the solution described above. Fixes: 65c9c4c6b01f ("usb: dwc2: Add dwc2_handle_gpwrdn_intr() handler") Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20210416124715.75355A005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit c2db8d7b9568b10e014af83b3c15e39929e3579e Author: Artur Petrosyan Date: Fri Apr 16 16:47:06 2021 +0400 usb: dwc2: Fix host mode hibernation exit with remote wakeup flow. Added setting "port_connect_status_change" flag to "1" in order to re-enumerate, because after exit from hibernation port connection status is not detected. Fixes: c5c403dc4336 ("usb: dwc2: Add host/device hibernation functions") Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124707.5EEC2A005D@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit b29b494bcc2e612e3abcd1b136db25433eaeee1d Author: Artur Petrosyan Date: Fri Apr 16 16:46:58 2021 +0400 usb: dwc2: Reset DEVADDR after exiting gadget hibernation. Initially resetting device address was done in dwc2_hsotg_irq() interrupt handler. However, when core is hibernated USB RESET is not handled in dwc2_hsotg_irq() handler, instead USB RESET interrupt is handled in dwc2_handle_gpwrdn_intr() handler. - Added reset device address to zero when core exits from gadget hibernation. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Signed-off-by: Minas Harutyunyan Link: https://lore.kernel.org/r/20210416124659.652CFA005C@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit c363af9ce3db7e374b37e0509ccf31f8da4da404 Author: Artur Petrosyan Date: Fri Apr 16 16:46:50 2021 +0400 usb: dwc2: Update exit hibernation when port reset is asserted No need to check for "DWC2_POWER_DOWN_PARAM_HIBERNATION" param as "hsotg->hibernated" flag is already enough for exiting from hibernation mode. - Removes checking of "DWC2_POWER_DOWN_PARAM_HIBERNATION" param. - For code readability Hibernation exit code moved after debug message print. - Added "dwc2_exit_hibernation()" function error checking. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210416124651.51C8DA005C@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 7e25c20df40c88958dde73d79ba99e94ad99573e Merge: 3232a3ce55edf 039b81d50a482 Author: Greg Kroah-Hartman Date: Thu Apr 22 11:19:49 2021 +0200 Merge tag 'usb-serial-5.13-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for 5.13-rc1 Here are the USB-serial updates for 5.13-rc1, including: - better type detection for pl2303 - support for more line speeds for pl2303 (TA/TB) - fixed CSIZE handling for the new xr driver - core support for multi-interface functions - TIOCGSERIAL and TIOCSSERIAL fixes - generic TIOCSSERIAL support (e.g. for closing_wait) - fixed return value for unsupported ioctls - support for gpio valid masks in cp210x - drain-delay fixes and improvements - support for multi-port devices for xr - generalisation of the xr driver to support three new device classes (XR21B142X, XR21B1411 and XR2280X) Included are also various clean ups. All have been in linux-next with no reported issues. * tag 'usb-serial-5.13-rc1' of https://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial: (72 commits) USB: cdc-acm: add more Maxlinear/Exar models to ignore list USB: serial: xr: add copyright notice USB: serial: xr: reset FIFOs on open USB: serial: xr: add support for XR22801, XR22802, XR22804 USB: serial: xr: add support for XR21B1411 USB: serial: xr: add support for XR21B1421, XR21B1422 and XR21B1424 USB: serial: xr: add type abstraction USB: serial: xr: drop type prefix from shared defines USB: serial: xr: move pin configuration to probe USB: serial: xr: rename GPIO-pin defines USB: serial: xr: rename GPIO-mode defines USB: serial: xr: add support for XR21V1412 and XR21V1414 USB: serial: ti_usb_3410_5052: clean up termios CSIZE handling USB: serial: ti_usb_3410_5052: use kernel types consistently USB: serial: ti_usb_3410_5052: add port-command helpers USB: serial: ti_usb_3410_5052: clean up vendor-request helpers USB: serial: ti_usb_3410_5052: drop unnecessary packed attributes USB: serial: io_ti: drop unnecessary packed attributes USB: serial: io_ti: use kernel types consistently USB: serial: io_ti: add read-port-command helper ... commit 8b242ca700f8043be56542efd8360056358a42ed Author: Sai Krishna Potthuri Date: Thu Apr 22 14:00:02 2021 +0530 pinctrl: Add Xilinx ZynqMP pinctrl driver support Adding pinctrl driver for Xilinx ZynqMP platform. This driver queries pin information from firmware and registers pin control accordingly. Signed-off-by: Sai Krishna Potthuri Link: https://lore.kernel.org/r/1619080202-31924-4-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com Signed-off-by: Linus Walleij commit fa989ae7c7b38efbc6c3370571fb8a6f7350029a Author: Sai Krishna Potthuri Date: Thu Apr 22 14:00:00 2021 +0530 firmware: xilinx: Add pinctrl support Adding pinctrl support to query platform specific information (pins) from firmware. Signed-off-by: Sai Krishna Potthuri Acked-by: Michal Simek Link: https://lore.kernel.org/r/1619080202-31924-2-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com Signed-off-by: Linus Walleij commit 3232a3ce55edfc0d7f8904543b4088a5339c2b2b Author: Thinh Nguyen Date: Thu Apr 15 00:41:58 2021 -0700 usb: dwc3: gadget: Remove FS bInterval_m1 limitation The programming guide incorrectly stated that the DCFG.bInterval_m1 must be set to 0 when operating in fullspeed. There's no such limitation for all IPs. See DWC_usb3x programming guide section 3.2.2.1. Fixes: a1679af85b2a ("usb: dwc3: gadget: Fix setting of DEPCFG.bInterval_m1") Cc: Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/5d4139ae89d810eb0a2d8577fb096fc88e87bfab.1618472454.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 5951b7c20f1121d94cd8a3ef102b63863c955025 Author: Chunfeng Yun Date: Fri Apr 16 14:48:26 2021 +0800 usb: xhci-mtk: remove bus status check PM will take care of the status of child device, so no need check each port anymore. Suggested-by: Ikjoon Jang Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1618555706-6810-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ca0584c40a6648ae2c7f2ef50446af2f7bdf82db Author: Badhri Jagan Sridharan Date: Wed Apr 14 07:26:56 2021 -0700 dt-bindings: connector: Add slow-charger-loop definition Allows PMIC charger loops which are slow(i.e. cannot meet the 15ms deadline) to still comply to pSnkStby i.e Maximum power that can be consumed by sink while in Sink Standby state as defined in 7.4.2 Sink Electrical Parameters of USB Power Delivery Specification Revision 3.0, Version 1.2. This patch introduces slow-charger-loop which when set makes the port request PD_P_SNK_STDBY_MW(2.5W i.e 500mA@5V) upon entering SNK_DISCOVERY (instead of 3A or the 1.5A during SNK_DISCOVERY) and the actual currrent limit after RX of PD_CTRL_PSRDY for PD link or during SNK_READY for non-pd link. Acked-by: Rob Herring Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210414142656.63749-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 2e5db2c0e508f10daa348c47c3093d34f0b865c8 Author: Jeremy Linton Date: Tue Apr 13 16:58:34 2021 -0500 usb: dwc2: Enable RPi in ACPI mode The dwc2 driver has everything we need to run in ACPI mode except for the ACPI module device table boilerplate. With that added and identified as "BCM2848", an id in use by other OSs for this device, the dw2 controller on the BCM2711 will work. Signed-off-by: Jeremy Linton Link: https://lore.kernel.org/r/20210413215834.3126447-2-jeremy.linton@arm.com Signed-off-by: Greg Kroah-Hartman commit e8b767431798b54971811355be7d9ce6cef8ecd2 Author: Thinh Nguyen Date: Tue Apr 13 19:13:11 2021 -0700 dt-bindings: usb: dwc3: Add disabling LPM for gadget Add a new DT option to disable LPM for gadget and update the description for usb2-lpm-disable related to host for clarity. Acked-by: Rob Herring Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/f31348ba744318c83b3a9ab1eab75c61122b15ae.1618366071.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit a8b3b519618f30a87a304c4e120267ce6f8dc68a Author: Oliver Neukum Date: Wed Apr 21 09:45:13 2021 +0200 USB: CDC-ACM: fix poison/unpoison imbalance suspend() does its poisoning conditionally, resume() does it unconditionally. On a device with combined interfaces this will balance, on a device with two interfaces the counter will go negative and resubmission will fail. Both actions need to be done conditionally. Fixes: 6069e3e927c8f ("USB: cdc-acm: untangle a circular dependency between callback and softint") Signed-off-by: Oliver Neukum Cc: stable Link: https://lore.kernel.org/r/20210421074513.4327-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman commit ca91fd8c7643d93bfc18a6fec1a0d3972a46a18a Author: Chris Chiu Date: Wed Apr 21 01:46:51 2021 +0800 USB: Add reset-resume quirk for WD19's Realtek Hub Realtek Hub (0bda:5487) in Dell Dock WD19 sometimes fails to work after the system resumes from suspend with remote wakeup enabled device connected: [ 1947.640907] hub 5-2.3:1.0: hub_ext_port_status failed (err = -71) [ 1947.641208] usb 5-2.3-port5: cannot disable (err = -71) [ 1947.641401] hub 5-2.3:1.0: hub_ext_port_status failed (err = -71) [ 1947.641450] usb 5-2.3-port4: cannot reset (err = -71) Information of this hub: T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 10 Spd=480 MxCh= 5 D: Ver= 2.10 Cls=09(hub ) Sub=00 Prot=02 MxPS=64 #Cfgs= 1 P: Vendor=0bda ProdID=5487 Rev= 1.47 S: Manufacturer=Dell Inc. S: Product=Dell dock C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=01 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms I:* If#= 0 Alt= 1 #EPs= 1 Cls=09(hub ) Sub=00 Prot=02 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms The failure results from the ETIMEDOUT by chance when turning on the suspend feature for the specified port of the hub. The port seems to be in an unknown state so the hub_activate during resume fails the hub_port_status, then the hub will fail to work. The quirky hub needs the reset-resume quirk to function correctly. Acked-by: Alan Stern Signed-off-by: Chris Chiu Cc: stable Link: https://lore.kernel.org/r/20210420174651.6202-1-chris.chiu@canonical.com Signed-off-by: Greg Kroah-Hartman commit 53f666869db5d8bfdcb85709808708596b26f02f Author: Colin Ian King Date: Tue Apr 20 12:06:22 2021 +0100 usb: gadget: net2272: remove redundant initialization of 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 and move the declaration of status to the scope where it is used. Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210420110622.377339-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 95dbac94da7f9cff9a056fcf9c3a1679aa5ac337 Author: Colin Ian King Date: Tue Apr 20 12:38:18 2021 +0100 usb: storage: datafab: remove redundant assignment of variable result The variable result is being assigned with a value that is never read, the assignment is redundant and can be removed. Acked-by: Alan Stern Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210420113818.378478-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 2bda2c09625772ff4d514df183afe90c84d6d9c6 Author: Malte Deiseroth Date: Fri Apr 16 10:08:43 2021 +0200 usb: misc: adutux: fix whitespace coding style issue Correct missing space error ceckpatch.pl is complaining about. Signed-off-by: Malte Deiseroth Link: https://lore.kernel.org/r/20210416080843.GA137657@utop Signed-off-by: Greg Kroah-Hartman commit c8604656b0e00a586cd5babff197838a53befff3 Author: Saurav Girepunje Date: Sun Apr 18 23:17:20 2021 +0530 usb: musb: musb_core: Add space after that ',' Fix Error reported by checkpatch.pl ERROR: space required after that ',' (ctx:VxV) +#define can_bulk_split(musb,type) \ ^ ERROR: space required after that ',' (ctx:VxV) +#define can_bulk_combine(musb,type) \ ^ Signed-off-by: Saurav Girepunje Link: https://lore.kernel.org/r/20210418174720.GA59520@user Signed-off-by: Greg Kroah-Hartman commit 4a5d797a9f9c4f18585544237216d7812686a71f Author: Anirudh Rayabharam Date: Mon Apr 19 09:07:08 2021 +0530 usb: gadget: dummy_hcd: fix gpf in gadget_setup Fix a general protection fault reported by syzbot due to a race between gadget_setup() and gadget_unbind() in raw_gadget. The gadget core is supposed to guarantee that there won't be any more callbacks to the gadget driver once the driver's unbind routine is called. That guarantee is enforced in usb_gadget_remove_driver as follows: usb_gadget_disconnect(udc->gadget); if (udc->gadget->irq) synchronize_irq(udc->gadget->irq); udc->driver->unbind(udc->gadget); usb_gadget_udc_stop(udc); usb_gadget_disconnect turns off the pullup resistor, telling the host that the gadget is no longer connected and preventing the transmission of any more USB packets. Any packets that have already been received are sure to processed by the UDC driver's interrupt handler by the time synchronize_irq returns. But this doesn't work with dummy_hcd, because dummy_hcd doesn't use interrupts; it uses a timer instead. It does have code to emulate the effect of synchronize_irq, but that code doesn't get invoked at the right time -- it currently runs in usb_gadget_udc_stop, after the unbind callback instead of before. Indeed, there's no way for usb_gadget_remove_driver to invoke this code before the unbind callback. To fix this, move the synchronize_irq() emulation code to dummy_pullup so that it runs before unbind. Also, add a comment explaining why it is necessary to have it there. Reported-by: syzbot+eb4674092e6cc8d9e0bd@syzkaller.appspotmail.com Suggested-by: Alan Stern Acked-by: Alan Stern Signed-off-by: Anirudh Rayabharam Link: https://lore.kernel.org/r/20210419033713.3021-1-mail@anirudhrb.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit c295d3007ff63064181befa734d9705dfc10b396 Author: Christophe JAILLET Date: Tue Apr 20 14:05:10 2021 +0200 staging: octeon: Use 'for_each_child_of_node' Use 'for_each_child_of_node' instead of hand writing it. This saves a few line of code. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/eaffe388e6c51e97caf3e8fa474de74428575455.1618920182.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit bd36d5e2d5c48ee2cb12f98ad0b334d05917b850 Author: Amos Gross Date: Wed Apr 21 12:07:31 2021 +0000 Staging: rtl8723bs: rtw_xmit: fixed tabbing issue Fixed warning from checkpatch for code block not being indented correctly. Signed-off-by: Amos Gross Link: https://lore.kernel.org/r/YIAVfRxQ+XmKEf47@arch.localdomain Signed-off-by: Greg Kroah-Hartman commit 5369c41d165e45df874e387397b3ab4a62babb48 Author: Martin Kaiser Date: Mon Apr 19 22:11:26 2021 +0200 staging: rtl8188eu: remove unused function parameters The Enable and Linked parameters of _BeaconFunctionEnable are not used. Remove them. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210419201126.25633-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 94ed1611aaf53d81e46a23b4e965346ebe38fea7 Author: Martin Kaiser Date: Mon Apr 19 22:11:25 2021 +0200 staging: rtl8188eu: cmdThread is a task_struct cmdThread is the return value of kthread_run, i.e. a struct task_struct. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210419201126.25633-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 2a743d94ebff4fccacd29ad3630afc6347eb9b3b Author: Martin Kaiser Date: Mon Apr 19 22:11:24 2021 +0200 staging: rtl8188eu: remove constant variable and dead code g_wifi_on is always true. Remove the variable and the code that would be run only if g_wifi_on was false. While at it, remove a pointlesss comment that starts with /** and is misinterpreted as a kernel-doc comment. Reported-by: kernel test robot Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210419201126.25633-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 8a24201f824a7daee44662b412042f74ce46145b Author: Martin Kaiser Date: Mon Apr 19 22:11:23 2021 +0200 staging: rtl8188eu: change bLeisurePs' type to bool bLeisurePs is used as a boolean variable. Change its type from u8 to bool. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210419201126.25633-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 4ca91abbe40606a06549e556256c7919973749db Author: Fabio Aiuto Date: Thu Apr 15 12:07:24 2021 +0200 staging: rtl8723bs: remove empty #ifdef block remove #ifdef block left empty after DBG_871X_LEVEL deletion. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c2600c9a71d4e222963cbc600b2e703fe2b1289f.1618480688.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 180b9f220a59d51cd661174e0cab459d095d204e Author: Fabio Aiuto Date: Thu Apr 15 12:07:23 2021 +0200 staging: rtl8723bs: remove unused DBG_871X_LEVEL macro declarations remove unused DBG_871X_LEVEL macro declarations. DBG_871X_LEVEL macro wraps a raw printk call which is not recommended in a device driver context, prefer using netdev_*() log functions. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ec371fd8a4e53b4730b45f0a1c9210106b2914f2.1618480688.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 98dc120895a9a669e35155ee03b98452723aba95 Author: Fabio Aiuto Date: Thu Apr 15 12:07:22 2021 +0200 staging: rtl8723bs: split too long line fix the following post-commit hook checkpatch issue. WARNING: line length of 103 exceeds 100 columns 30: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:711: + receive_disconnect(padapter, pmlmeinfo->network.MacAddress, 0); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4e87fb741205b9f314aec739921405a7ebef908a.1618480688.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5a94f5c84281994253fb0c152d440691980d9e4c Author: Fabio Aiuto Date: Thu Apr 15 12:07:21 2021 +0200 staging: rtl8723bs: fix indentation in if block fix following post-commit hook checkpatch issues: WARNING: suspect code indent for conditional statements (32, 48) 323: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:708: if (!ret) { + netdev_dbg(padapter->pnetdev, Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7f548510ebe2427e85f3fe8b33ed937160c64e9f.1618480688.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 108b05a64621ee11bc23c9f811a357d478e1bffa Author: Fabio Aiuto Date: Thu Apr 15 12:07:20 2021 +0200 staging: rtl8723bs: fix code indent issue fix following post-commit hook checkpatch issues: ERROR: code indent should use tabs where possible 887: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1145: +^I^I "%s: ### ERROR #### driver in IPS + ####ERROR###!!!\n",$ ERROR: code indent should use tabs where possible 888: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1146: +^I^I __func__);$ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2e0ba5214df41de7e46b8df4e62d2f38acea92ec.1618480688.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 79df841b4350189e883c7db91d0fe495e087259e Author: Fabio Aiuto Date: Thu Apr 15 12:07:19 2021 +0200 staging: rtl8723bs: replace DBG_871X_LEVEL logs with netdev_*() Replace DBG_871X_LEVEL logs with netdev_*() functions where possible (i.e. where a pointer to netdev is easily available). This is not possible in correspondance of redundant log in module initialization. So remove those ones. DBG_871X_LEVEL macro wraps a raw printk call which is not recommended in a device driver context, prefer using netdev_*() log functions. The remove/replace operation has been done with the following semantic patch script: @@ expression list args; identifier padapter; identifier func; symbol _drv_always_, _drv_info_, _drv_warning_; symbol _drv_err_, _drv_emerg_; @@ func(..., struct adapter *padapter, ...) { <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(padapter->pnetdev, args); ) ...> } @rule@ identifier func, context, padapter; @@ func(void *context) { ... struct adapter *padapter = context; ... } @@ expression list args; identifier rule.padapter; identifier rule.func, rule.context; @@ func(void *context) { <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(padapter->pnetdev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(padapter->pnetdev, args); ) ...> } @@ expression list args; expression get_dev; identifier func, dev; @@ func(...) { ... struct net_device *dev = get_dev; <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(dev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(dev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(dev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(dev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(dev, args); ) ...> } @@ expression list args; identifier func, dev; @@ func(struct net_device *dev) { <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(dev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(dev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(dev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(dev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(dev, args); ) ...> } @@ expression list args; identifier func, dvobj; @@ func(struct dvobj_priv *dvobj) { <... ( - DBG_871X_LEVEL(_drv_always_, args); + netdev_dbg(dvobj->if1->pnetdev, args); | - DBG_871X_LEVEL(_drv_info_, args); + netdev_info(dvobj->if1->pnetdev, args); | - DBG_871X_LEVEL(_drv_warning_, args); + netdev_warn(dvobj->if1->pnetdev, args); | - DBG_871X_LEVEL(_drv_err_, args); + netdev_err(dvobj->if1->pnetdev, args); | - DBG_871X_LEVEL(_drv_emerg_, args); + netdev_emerg(dvobj->if1->pnetdev, args); ) ...> } @@ @@ - DBG_871X_LEVEL(...); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4a02f9f5665fa4b78c0b321ce0cc62254255c9dd.1618480688.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5cc83644945818c00eb5a6e69cf8fba730c92a38 Author: Ian Kewish Date: Thu Apr 15 13:06:45 2021 -0500 staging: rtl8192e: indent statement properly Indent statement in an else branch. Reported by checkpatch: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 8) Signed-off-by: Ian Kewish Link: https://lore.kernel.org/r/20210415180645.65699-1-iankewish@gmail.com Signed-off-by: Greg Kroah-Hartman commit 47de4477a8e6bfd202640567ce4bf17cc1de60be Author: Randy Dunlap Date: Tue Apr 20 19:20:41 2021 -0700 microblaze: add 'fallthrough' to memcpy/memset/memmove Fix "fallthrough" warnings in microblaze memcpy/memset/memmove library functions. CC arch/microblaze/lib/memcpy.o ../arch/microblaze/lib/memcpy.c: In function 'memcpy': ../arch/microblaze/lib/memcpy.c:70:4: warning: this statement may fall through [-Wimplicit-fallthrough=] 70 | --c; ../arch/microblaze/lib/memcpy.c:71:3: note: here 71 | case 2: ../arch/microblaze/lib/memcpy.c:73:4: warning: this statement may fall through [-Wimplicit-fallthrough=] 73 | --c; ../arch/microblaze/lib/memcpy.c:74:3: note: here 74 | case 3: ../arch/microblaze/lib/memcpy.c:178:10: warning: this statement may fall through [-Wimplicit-fallthrough=] 178 | *dst++ = *src++; ../arch/microblaze/lib/memcpy.c:179:2: note: here 179 | case 2: ../arch/microblaze/lib/memcpy.c:180:10: warning: this statement may fall through [-Wimplicit-fallthrough=] 180 | *dst++ = *src++; ../arch/microblaze/lib/memcpy.c:181:2: note: here 181 | case 1: CC arch/microblaze/lib/memset.o ../arch/microblaze/lib/memset.c: In function 'memset': ../arch/microblaze/lib/memset.c:71:4: warning: this statement may fall through [-Wimplicit-fallthrough=] 71 | --n; ../arch/microblaze/lib/memset.c:72:3: note: here 72 | case 2: ../arch/microblaze/lib/memset.c:74:4: warning: this statement may fall through [-Wimplicit-fallthrough=] 74 | --n; ../arch/microblaze/lib/memset.c:75:3: note: here 75 | case 3: CC arch/microblaze/lib/memmove.o ../arch/microblaze/lib/memmove.c: In function 'memmove': ../arch/microblaze/lib/memmove.c:92:4: warning: this statement may fall through [-Wimplicit-fallthrough=] 92 | --c; ../arch/microblaze/lib/memmove.c:93:3: note: here 93 | case 2: ../arch/microblaze/lib/memmove.c:95:4: warning: this statement may fall through [-Wimplicit-fallthrough=] 95 | --c; ../arch/microblaze/lib/memmove.c:96:3: note: here 96 | case 1: ../arch/microblaze/lib/memmove.c:203:10: warning: this statement may fall through [-Wimplicit-fallthrough=] 203 | *--dst = *--src; ../arch/microblaze/lib/memmove.c:204:2: note: here 204 | case 3: ../arch/microblaze/lib/memmove.c:205:10: warning: this statement may fall through [-Wimplicit-fallthrough=] 205 | *--dst = *--src; ../arch/microblaze/lib/memmove.c:206:2: note: here 206 | case 2: ../arch/microblaze/lib/memmove.c:207:10: warning: this statement may fall through [-Wimplicit-fallthrough=] 207 | *--dst = *--src; ../arch/microblaze/lib/memmove.c:208:2: note: here 208 | case 1: Signed-off-by: Randy Dunlap Cc: Michal Simek Link: https://lore.kernel.org/r/20210421022041.10689-1-rdunlap@infradead.org Signed-off-by: Michal Simek commit e3a606f2c544b231f6079c8c5fea451e772e1139 Author: Ard Biesheuvel Date: Wed Apr 21 09:55:11 2021 +0200 fsverity: relax build time dependency on CRYPTO_SHA256 CONFIG_CRYPTO_SHA256 denotes the generic C implementation of the SHA-256 shash algorithm, which is selected as the default crypto shash provider for fsverity. However, fsverity has no strict link time dependency, and the same shash could be exposed by an optimized implementation, and arm64 has a number of those (scalar, NEON-based and one based on special crypto instructions). In such cases, it makes little sense to require that the generic C implementation is incorporated as well, given that it will never be called. To address this, relax the 'select' clause to 'imply' so that the generic driver can be omitted from the build if desired. Acked-by: Eric Biggers Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit a0fc20333ee4bac1147c4cf75dea098c26671a2f Author: Ard Biesheuvel Date: Wed Apr 21 09:55:10 2021 +0200 fscrypt: relax Kconfig dependencies for crypto API algorithms Even if FS encryption has strict functional dependencies on various crypto algorithms and chaining modes. those dependencies could potentially be satisified by other implementations than the generic ones, and no link time dependency exists on the 'depends on' claused defined by CONFIG_FS_ENCRYPTION_ALGS. So let's relax these clauses to 'imply', so that the default behavior is still to pull in those generic algorithms, but in a way that permits them to be disabled again in Kconfig. Signed-off-by: Ard Biesheuvel Acked-by: Eric Biggers Signed-off-by: Herbert Xu commit d17d9227c332b7deca59b35fa9ff08e597666c2a Author: Randy Dunlap Date: Sat Apr 17 17:39:29 2021 -0700 crypto: camellia - drop duplicate "depends on CRYPTO" All 5 CAMELLIA crypto driver Kconfig symbols have a duplicate "depends on CRYPTO" line but they are inside an "if CRYPTO"/"endif # if CRYPTO" block, so drop the duplicate "depends" lines. These 5 symbols still depend on CRYPTO. Fixes: 584fffc8b196 ("[CRYPTO] kconfig: Ordering cleanup") Fixes: 0b95ec56ae19 ("crypto: camellia - add assembler implementation for x86_64") Fixes: d9b1d2e7e10d ("crypto: camellia - add AES-NI/AVX/x86_64 assembler implementation of camellia cipher") Fixes: f3f935a76aa0 ("crypto: camellia - add AVX2/AES-NI/x86_64 assembler implementation of camellia cipher") Fixes: c5aac2df6577 ("sparc64: Add DES driver making use of the new des opcodes.") Signed-off-by: Randy Dunlap Cc: Sebastian Siewior Cc: Jussi Kivilinna Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu commit 87bff3d8b94c94a7b1a7d34a66151079b6108ed9 Author: Krzysztof Kozlowski Date: Fri Apr 16 14:23:11 2021 +0200 crypto: s5p-sss - consistently use local 'dev' variable in probe() For code readability, the probe() function uses 'dev' variable instead of '&pdev->dev', so update remaining places. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 3d3b3a0067d2a0d2ac5727bff617c23890bef463 Author: Krzysztof Kozlowski Date: Fri Apr 16 14:23:10 2021 +0200 crypto: s5p-sss - remove unneeded local variable initialization The initialization of 'err' local variable is not needed as it is shortly after overwritten. Addresses-Coverity: Unused value Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 6b238db737014f192da5d48d22a7a94b3e5d7b57 Author: Krzysztof Kozlowski Date: Fri Apr 16 14:23:09 2021 +0200 crypto: s5p-sss - simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 195ec383d805e8dd3d1299b0bbd565ee5863b7ac Author: Devaraj Rangasamy Date: Fri Apr 16 14:50:56 2021 +0530 ccp: ccp - add support for Green Sardine Add a new PCI device entry for Green Sardine APU. Signed-off-by: Devaraj Rangasamy Tested-by: Babulu Ellune Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu commit 5d17c414e1029d245d535d10c6ead04dc2f65e15 Author: Tian Tao Date: Fri Apr 16 09:06:42 2021 +0800 crypto: ccp - Make ccp_dev_suspend and ccp_dev_resume void functions Since ccp_dev_suspend() and ccp_dev_resume() only return 0 which causes ret to equal 0 in sp_suspend and sp_resume, making the if condition impossible to use. it might be a more appropriate fix to have these be void functions and eliminate the if condition in sp_suspend() and sp_resume(). Signed-off-by: Tian Tao Cc: Herbert Xu Cc: "David S. Miller" Cc: Tom Lendacky Acked-by: Tom Lendacky Acked-by: John Allen Signed-off-by: Herbert Xu commit b2d17df35ea5ff9b7c003e5060bb79edd6d4c9c5 Author: Srujana Challa Date: Thu Apr 15 17:58:37 2021 +0530 crypto: octeontx2 - add support for OcteonTX2 98xx CPT block. OcteonTX2 series of silicons have multiple variants, the 98xx variant has two crypto (CPT0 & CPT1) blocks. This patch adds support for firmware load on new CPT block(CPT1). Signed-off-by: Srujana Challa Signed-off-by: Herbert Xu commit 66810912fd1e38fdd0405feb9f46fc23c024c70f Author: Vinay Kumar Yadav Date: Thu Apr 15 15:36:07 2021 +0530 crypto: chelsio/chcr - Remove useless MODULE_VERSION kernel version describes module state more accurately. hence remove chcr versioning. Signed-off-by: Vinay Kumar Yadav Signed-off-by: Herbert Xu commit 01fec8c3bbd06fdeac1fd950a9b1436a73c46eb3 Author: Wan Jiabing Date: Wed Apr 14 19:38:59 2021 +0800 crypto: ux500/cryp - Remove duplicate argument Fix the following coccicheck warning: ./drivers/crypto/ux500/cryp/cryp_p.h:84:6-27:duplicated argument to | Signed-off-by: Wan Jiabing Signed-off-by: Herbert Xu commit 25c2850eb80f1c5631bd267c258c324411bba306 Author: Jiapeng Chong Date: Wed Apr 14 14:52:57 2021 +0800 crypto: chelsio - remove unused function Fix the following clang warning: drivers/crypto/chelsio/chcr_algo.c:129:19: warning: unused function 'is_ofld_imm' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Herbert Xu commit 0bc42311cdff4ee8bdf08f68b28b0307895df90b Author: Peter Ujfalusi Date: Tue Apr 13 14:45:59 2021 +0530 crypto: sa2ul - Add support for AM64 The sa2ul module in am64 have limited support for algorithms, and the priv and priv_id used on the platform is different compared to AM654 or j721e. Use match data to get the SoC specific information and use it throughout the driver. Signed-off-by: Peter Ujfalusi Signed-off-by: Vaibhav Gupta Signed-off-by: Herbert Xu commit e8a4529d4598467577b847a8ace14ecc479e4f64 Author: Peter Ujfalusi Date: Tue Apr 13 14:45:58 2021 +0530 crypto: sa2ul - Support for per channel coherency On AM64 the DMA channel for sa2ul can be configured to be coherent or non coherent via DT binding. Use the dmaengine_get_device_for_dma_api() to get the device pointer which should be used for with the dma_api to use matching dma_ops for the channel coherency/non coherency. Signed-off-by: Peter Ujfalusi Signed-off-by: Vaibhav Gupta Signed-off-by: Herbert Xu commit 6535cbc490713b69333a183fcc2cae1e5f28eea1 Author: Peter Ujfalusi Date: Tue Apr 13 14:45:57 2021 +0530 dt-bindings: crypto: ti,sa2ul: Add new compatible for AM64 Add the AM64 version of sa2ul to the compatible list. [v_gupta@ti.com: Conditional dma-coherent requirement, clocks] Signed-off-by: Peter Ujfalusi Signed-off-by: Vaibhav Gupta Reviewed-by: Rob Herring Signed-off-by: Herbert Xu commit c4aab24448a3948bcc318a318bd963e25e4c5b02 Author: Weili Qian Date: Mon Apr 12 20:31:35 2021 +0800 crypto: hisilicon - enable new error types for QM QM adds 'qm_mailbox_timeout' and 'qm_flr_timeout' hardware error types on Kunpeng930. This patch enables the new error types and configures the error types as NFE. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 10594d1e5ff79f0bcc96d2abde364b58adc06ffb Author: Weili Qian Date: Mon Apr 12 20:31:34 2021 +0800 crypto: hisilicon - add new error type for SEC Kunpeng930 SEC adds several new hardware error types. This patch enables the new error types and configures the error types as NFE. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit b7220a7439fa5e2506428252e9046963ab51d48d Author: Weili Qian Date: Mon Apr 12 20:31:33 2021 +0800 crypto: hisilicon - support new error types for ZIP Kunpeng930 ZIP adds 'zip_axi_poison_err' 'zip_sva_err' and 'QM_ACC_DO_TASK_TIMEOUT' hardware error types. This patch enables the error types and configures the error types as NFE. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit d9e21600dc0930d49a09060dd20ec8544983f202 Author: Weili Qian Date: Mon Apr 12 20:31:32 2021 +0800 crypto: hisilicon - dynamic configuration 'err_info' 'err_info' does not support dynamic configuration since it is const type. Therefore, in order to support new error type later, 'err_info' is changed to dynamic configuration. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit b2a4411aca29ab7feb17c927d1d91d979361983c Author: Randy Dunlap Date: Sun Apr 11 17:05:56 2021 -0700 crypto: doc - fix kernel-doc notation in chacha.c and af_alg.c Fix function name in chacha.c kernel-doc comment to remove a warning. Convert af_alg.c to kernel-doc notation to eliminate many kernel-doc warnings. ../lib/crypto/chacha.c:77: warning: expecting prototype for chacha_block(). Prototype was for chacha_block_generic() instead chacha.c:104: warning: Excess function parameter 'out' description in 'hchacha_block_generic' af_alg.c:498: warning: Function parameter or member 'sk' not described in 'af_alg_alloc_tsgl' ../crypto/af_alg.c:539: warning: expecting prototype for aead_count_tsgl(). Prototype was for af_alg_count_tsgl() instead ../crypto/af_alg.c:596: warning: expecting prototype for aead_pull_tsgl(). Prototype was for af_alg_pull_tsgl() instead af_alg.c:663: warning: Function parameter or member 'areq' not described in 'af_alg_free_areq_sgls' af_alg.c:700: warning: Function parameter or member 'sk' not described in 'af_alg_wait_for_wmem' af_alg.c:700: warning: Function parameter or member 'flags' not described in 'af_alg_wait_for_wmem' af_alg.c:731: warning: Function parameter or member 'sk' not described in 'af_alg_wmem_wakeup' af_alg.c:757: warning: Function parameter or member 'sk' not described in 'af_alg_wait_for_data' af_alg.c:757: warning: Function parameter or member 'flags' not described in 'af_alg_wait_for_data' af_alg.c:757: warning: Function parameter or member 'min' not described in 'af_alg_wait_for_data' af_alg.c:796: warning: Function parameter or member 'sk' not described in 'af_alg_data_wakeup' af_alg.c:832: warning: Function parameter or member 'sock' not described in 'af_alg_sendmsg' af_alg.c:832: warning: Function parameter or member 'msg' not described in 'af_alg_sendmsg' af_alg.c:832: warning: Function parameter or member 'size' not described in 'af_alg_sendmsg' af_alg.c:832: warning: Function parameter or member 'ivsize' not described in 'af_alg_sendmsg' af_alg.c:985: warning: Function parameter or member 'sock' not described in 'af_alg_sendpage' af_alg.c:985: warning: Function parameter or member 'page' not described in 'af_alg_sendpage' af_alg.c:985: warning: Function parameter or member 'offset' not described in 'af_alg_sendpage' af_alg.c:985: warning: Function parameter or member 'size' not described in 'af_alg_sendpage' af_alg.c:985: warning: Function parameter or member 'flags' not described in 'af_alg_sendpage' af_alg.c:1040: warning: Function parameter or member 'areq' not described in 'af_alg_free_resources' af_alg.c:1059: warning: Function parameter or member '_req' not described in 'af_alg_async_cb' af_alg.c:1059: warning: Function parameter or member 'err' not described in 'af_alg_async_cb' af_alg.c:1083: warning: Function parameter or member 'file' not described in 'af_alg_poll' af_alg.c:1083: warning: Function parameter or member 'sock' not described in 'af_alg_poll' af_alg.c:1083: warning: Function parameter or member 'wait' not described in 'af_alg_poll' af_alg.c:1114: warning: Function parameter or member 'sk' not described in 'af_alg_alloc_areq' af_alg.c:1114: warning: Function parameter or member 'areqlen' not described in 'af_alg_alloc_areq' af_alg.c:1146: warning: Function parameter or member 'sk' not described in 'af_alg_get_rsgl' af_alg.c:1146: warning: Function parameter or member 'msg' not described in 'af_alg_get_rsgl' af_alg.c:1146: warning: Function parameter or member 'flags' not described in 'af_alg_get_rsgl' af_alg.c:1146: warning: Function parameter or member 'areq' not described in 'af_alg_get_rsgl' af_alg.c:1146: warning: Function parameter or member 'maxsize' not described in 'af_alg_get_rsgl' af_alg.c:1146: warning: Function parameter or member 'outlen' not described in 'af_alg_get_rsgl' Signed-off-by: Randy Dunlap Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Herbert Xu commit c560e76319a94a3b9285bc426c609903408e4826 Author: Thinh Nguyen Date: Mon Apr 19 19:11:12 2021 -0700 usb: dwc3: gadget: Fix START_TRANSFER link state check The START_TRANSFER command needs to be executed while in ON/U0 link state (with an exception during register initialization). Don't use dwc->link_state to check this since the driver only tracks the link state when the link state change interrupt is enabled. Check the link state from DSTS register instead. Note that often the host already brings the device out of low power before it sends/requests the next transfer. So, the user won't see any issue when the device starts transfer then. This issue is more noticeable in cases when the device delays starting transfer, which can happen during delayed control status after the host put the device in low power. Fixes: 799e9dc82968 ("usb: dwc3: gadget: conditionally disable Link State change events") Cc: Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/bcefaa9ecbc3e1936858c0baa14de6612960e909.1618884221.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 43c4cab006f55b6ca549dd1214e22f5965a8675f Author: Hemant Kumar Date: Wed Apr 21 12:47:32 2021 -0700 usb: gadget: Fix double free of device descriptor pointers Upon driver unbind usb_free_all_descriptors() function frees all speed descriptor pointers without setting them to NULL. In case gadget speed changes (i.e from super speed plus to super speed) after driver unbind only upto super speed descriptor pointers get populated. Super speed plus desc still holds the stale (already freed) pointer. Fix this issue by setting all descriptor pointers to NULL after freeing them in usb_free_all_descriptors(). Fixes: f5c61225cf29 ("usb: gadget: Update function for SuperSpeedPlus") cc: stable@vger.kernel.org Reviewed-by: Peter Chen Signed-off-by: Hemant Kumar Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1619034452-17334-1-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 374157ff88ae1a7f7927331cbc72c1ec11994e8a Author: Badhri Jagan Sridharan Date: Wed Apr 14 22:01:21 2021 -0700 usb: typec: tcpm: Fix error while calculating PPS out values "usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply" introduced a regression for req_out_volt and req_op_curr calculation. req_out_volt should consider the newly calculated max voltage instead of previously accepted max voltage by the port partner. Likewise, req_op_curr should consider the newly calculated max current instead of previously accepted max current by the port partner. Fixes: e3a072022487 ("usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply") Reviewed-by: Guenter Roeck Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210415050121.1928298-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit a943d76352dbb4707a5e5537bbe696c00f5ddd36 Author: Matti Vaittinen Date: Wed Apr 21 21:11:32 2021 +0300 devm-helpers: Fix devm_delayed_work_autocancel() kerneldoc The kerneldoc for devm_delayed_work_autocancel() contains invalid parameter description. Fix the parameter description. And while at it - make it more obvous that this function operates on delayed_work. That helps differentiating with resource-managed INIT_WORK description (which should follow in near future) Fixes: 0341ce544394 ("workqueue: Add resource managed version of delayed work init") Reviewed-by: Hans de Goede Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/db3a8b4b8899fdf109a0cc760807de12d3b4f09b.1619028482.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit 2637baed78010eeaae274feb5b99ce90933fadfb Author: Minwoo Im Date: Wed Apr 21 16:45:04 2021 +0900 nvme: introduce generic per-namespace chardev Userspace has not been allowed to I/O to device that's failed to be initialized. This patch introduces generic per-namespace character device to allow userspace to I/O regardless the block device is there or not. The chardev naming convention will similar to the existing blkdev naming, using a ng prefix instead of nvme, i.e. - /dev/ngXnY It also supports multipath which means it will not expose chardev for the hidden namespace blkdevs (e.g., nvmeXcYnZ). If /dev/ngXnY is created for a ns_head, then I/O request will be routed to a specific controller selected by the iopolicy of the subsystem. Signed-off-by: Minwoo Im Signed-off-by: Javier González Reviewed-by: Keith Busch Tested-by: Kanchan Joshi Signed-off-by: Christoph Hellwig commit 509f1010e4fc55e2dbfc036317afd573ccd0931c Author: Chao Yu Date: Wed Apr 21 09:54:55 2021 +0800 f2fs: avoid using native allocate_segment_by_default() As we did for other cases, in fix_curseg_write_pointer(), let's use wrapped f2fs_allocate_new_section() instead of native allocate_segment_by_default(), by this way, it fixes to cover segment allocation with curseg_lock and sentry_lock. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 85367040511f8402d7e4054d8c17b053c75e33ff Author: Ming Lei Date: Wed Apr 21 23:45:26 2021 +0800 scsi: blk-mq: Fix build warning when making htmldocs Fixes the following warning when running 'make htmldocs': include/linux/blk-mq.h:395: warning: Function parameter or member 'set_rq_budget_token' not described in 'blk_mq_ops' include/linux/blk-mq.h:395: warning: Function parameter or member 'get_rq_budget_token' not described in 'blk_mq_ops' [mkp: added warning messages] Link: https://lore.kernel.org/r/20210421154526.1954174-1-ming.lei@redhat.com Fixes: d022d18c045f ("scsi: blk-mq: Add callbacks for storing & retrieving budget token") Reported-by: Stephen Rothwell Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit e4c82eafb609c2badc56f4e11bc50fcf44b8e9eb Author: Paul Moore Date: Wed Apr 21 21:15:36 2021 -0400 selinux: add proper NULL termination to the secclass_map permissions This patch adds the missing NULL termination to the "bpf" and "perf_event" object class permission lists. This missing NULL termination should really only affect the tools under scripts/selinux, with the most important being genheaders.c, although in practice this has not been an issue on any of my dev/test systems. If the problem were to manifest itself it would likely result in bogus permissions added to the end of the object class; thankfully with no access control checks using these bogus permissions and no policies defining these permissions the impact would likely be limited to some noise about undefined permissions during policy load. Cc: stable@vger.kernel.org Fixes: ec27c3568a34 ("selinux: bpf: Add selinux check for eBPF syscall operations") Fixes: da97e18458fb ("perf_event: Add support for LSM and SELinux checks") Signed-off-by: Paul Moore commit fe202ea8e5b170ef7b3741da885e8cb7bae1106e Author: Jianqun Xu Date: Tue Apr 20 17:12:40 2021 +0800 pinctrl: rockchip: do coding style for mux route struct The mux route tables take many lines for each SoC, and it will be more instances for newly SoC, that makes the file size increase larger. This patch only do coding style for mux route struct, by adding a new definition and replace the structs by script which supplied by huangtao@rock-chips.com sed -i -e " /static struct rockchip_mux_route_data /bcheck b :append-next-line N :check /^[^;]*$/bappend-next-line s/[[:blank:]]*.bank_num = \([[:digit:]]*,\)\n/\tRK_MUXROUTE_SAME(\1/g s/[[:blank:]]*.pin =[[:blank:]]*0,\n/ RK_PA0,/g s/[[:blank:]]*.pin =[[:blank:]]*1,\n/ RK_PA1,/g s/[[:blank:]]*.pin =[[:blank:]]*2,\n/ RK_PA2,/g s/[[:blank:]]*.pin =[[:blank:]]*3,\n/ RK_PA3,/g s/[[:blank:]]*.pin =[[:blank:]]*4,\n/ RK_PA4,/g s/[[:blank:]]*.pin =[[:blank:]]*5,\n/ RK_PA5,/g s/[[:blank:]]*.pin =[[:blank:]]*6,\n/ RK_PA6,/g s/[[:blank:]]*.pin =[[:blank:]]*7,\n/ RK_PA7,/g s/[[:blank:]]*.pin =[[:blank:]]*8,\n/ RK_PB0,/g s/[[:blank:]]*.pin =[[:blank:]]*9,\n/ RK_PB1,/g s/[[:blank:]]*.pin =[[:blank:]]*10,\n/ RK_PB2,/g s/[[:blank:]]*.pin =[[:blank:]]*11,\n/ RK_PB3,/g s/[[:blank:]]*.pin =[[:blank:]]*12,\n/ RK_PB4,/g s/[[:blank:]]*.pin =[[:blank:]]*13,\n/ RK_PB5,/g s/[[:blank:]]*.pin =[[:blank:]]*14,\n/ RK_PB6,/g s/[[:blank:]]*.pin =[[:blank:]]*15,\n/ RK_PB7,/g s/[[:blank:]]*.pin =[[:blank:]]*16,\n/ RK_PC0,/g s/[[:blank:]]*.pin =[[:blank:]]*17,\n/ RK_PC1,/g s/[[:blank:]]*.pin =[[:blank:]]*18,\n/ RK_PC2,/g s/[[:blank:]]*.pin =[[:blank:]]*19,\n/ RK_PC3,/g s/[[:blank:]]*.pin =[[:blank:]]*20,\n/ RK_PC4,/g s/[[:blank:]]*.pin =[[:blank:]]*21,\n/ RK_PC5,/g s/[[:blank:]]*.pin =[[:blank:]]*22,\n/ RK_PC6,/g s/[[:blank:]]*.pin =[[:blank:]]*23,\n/ RK_PC7,/g s/[[:blank:]]*.pin =[[:blank:]]*24,\n/ RK_PD0,/g s/[[:blank:]]*.pin =[[:blank:]]*25,\n/ RK_PD1,/g s/[[:blank:]]*.pin =[[:blank:]]*26,\n/ RK_PD2,/g s/[[:blank:]]*.pin =[[:blank:]]*27,\n/ RK_PD3,/g s/[[:blank:]]*.pin =[[:blank:]]*28,\n/ RK_PD4,/g s/[[:blank:]]*.pin =[[:blank:]]*29,\n/ RK_PD5,/g s/[[:blank:]]*.pin =[[:blank:]]*30,\n/ RK_PD6,/g s/[[:blank:]]*.pin =[[:blank:]]*31,\n/ RK_PD7,/g s/[[:blank:]]*.func = \([[:digit:]]*,\)\n/ \1/g s/[[:blank:]]*.route_location =[[:blank:]]*\([[:print:]]*,\)\n//g s/[[:blank:]]*.route_offset = \(0x[[:xdigit:]]*,\)\n/ \1/g s/[[:blank:]]*.route_val =[[:blank:]]*\([[:print:]]*\),\n/ \1),/g s/\t{\n//g s/\t}, {\n//g s/\t},//g s/[[:blank:]]*\(\/\*[[:print:]]*\*\/\)\n[[:blank:]]*RK_MUXROUTE_SAME(\([[:print:]]*\)),\n/\tRK_MUXROUTE_SAME(\2), \1\n/g s/[[:blank:]]*\(\/\*[[:print:]]*\*\/\)\n[[:blank:]]*RK_MUXROUTE_SAME(\([[:print:]]*\)),/\tRK_MUXROUTE_SAME(\2), \1\n/g " drivers/pinctrl/pinctrl-rockchip.c Reviewed-by: Heiko Stuebner Signed-off-by: Jianqun Xu Link: https://lore.kernel.org/r/20210420091240.1246429-1-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit 09e11caaa4cffac681963688b774e1aa3063b3a9 Author: Andy Shevchenko Date: Mon Apr 12 17:07:41 2021 +0300 pinctrl: Add PIN_CONFIG_MODE_PWM to enum pin_config_param It seems that we will have more and more pin controllers that support PWM function on the (selected) pins. Due to it being a part of pin controller IP the idea is to have some code that will switch the mode and attach the corresponding driver, for example, via using it as a library. Meanwhile, put a corresponding item to the pin_config_param enumerator. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210412140741.39946-3-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 31f9a421a1d01538776db37ec9c5419a3a49d650 Author: Andy Shevchenko Date: Mon Apr 12 17:07:40 2021 +0300 pinctrl: Introduce MODE group in enum pin_config_param Better to have a MODE group of settings to keep them together when ordered alphabetically. Hence, rename PIN_CONFIG_LOW_POWER_MODE to PIN_CONFIG_MODE_LOW_POWER. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210412140741.39946-2-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 1de15e99a242a66ef4f803fe1ad357f86b3a75f8 Author: Andy Shevchenko Date: Mon Apr 12 17:07:39 2021 +0300 pinctrl: Keep enum pin_config_param ordered by name It seems the ordering is by name. Keep it that way. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210412140741.39946-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 1dccb5ec01231156b06420633e3eedef95b17eac Author: Sai Krishna Potthuri Date: Thu Apr 15 16:43:12 2021 +0530 dt-bindings: pinctrl: Add binding for ZynqMP pinctrl driver Adding documentation and dt-bindings file which contains MIO pin configuration defines for Xilinx ZynqMP pinctrl driver. Signed-off-by: Sai Krishna Potthuri Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1618485193-5403-3-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com Signed-off-by: Linus Walleij commit 11f054c114f261ae04fc0b2ad9c1d4e1becd8b14 Author: Andy Shevchenko Date: Thu Apr 15 15:35:21 2021 +0300 pinctrl: core: Fix kernel doc string for pin_get_name() The kernel doc string mistakenly advertises the pin_get_name_from_id(). Fix it, otherwise kernel doc validator is not happy: .../core.c:168: warning: expecting prototype for pin_get_name_from_id(). Prototype was for pin_get_name() instead Fixes: dcb5dbc305b9 ("pinctrl: show pin name for pingroups in sysfs") Cc: Dong Aisheng Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210415123521.86894-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij commit 56ab29ec6ff6c1441fda6ddcca0193be32d395b7 Author: Tzung-Bi Shih Date: Mon Apr 19 17:34:49 2021 +0800 pinctrl: mediatek: use spin lock in mtk_rmw Commit 42a46434e9b1 ("pinctrl: add lock in mtk_rmw function.") uses mutex lock in mtk_rmw. However the function is possible called from atomic context. For example call trace: mutex_lock+0x28/0x64 mtk_rmw+0x38/0x80 [snip] max98357a_daiops_trigger+0x8c/0x9c soc_pcm_trigger+0x5c/0x10c The max98357a_daiops_trigger() could run in either atomic or non-atomic context. As a result, dmesg shows some similar messages: "BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254". Uses spin lock in mtk_rmw instead. Fixes: 42a46434e9b1 ("pinctrl: add lock in mtk_rmw function.") Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20210419093449.3125704-1-tzungbi@google.com Signed-off-by: Linus Walleij commit cb5cd0ea4eb3ce338a593a5331ddb4986ae20faa Author: Shay Drory Date: Sun Apr 18 16:55:54 2021 +0300 RDMA/core: Add CM to restrack after successful attachment to a device The device attach triggers addition of CM_ID to the restrack DB. However, when error occurs, we releasing this device, but defer CM_ID release. This causes to the situation where restrack sees CM_ID that is not valid anymore. As a solution, add the CM_ID to the resource tracking DB only after the attachment is finished. Found by syzcaller: infiniband syz0: added syz_tun rdma_rxe: ignoring netdev event = 10 for syz_tun infiniband syz0: set down infiniband syz0: ib_query_port failed (-19) restrack: ------------[ cut here ]------------ infiniband syz0: BUG: RESTRACK detected leak of resources restrack: User CM_ID object allocated by syz-executor716 is not freed restrack: ------------[ cut here ]------------ Fixes: b09c4d701220 ("RDMA/restrack: Improve readability in task name management") Link: https://lore.kernel.org/r/ab93e56ba831eac65c322b3256796fa1589ec0bb.1618753862.git.leonro@nvidia.com Signed-off-by: Shay Drory Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ea9d2ed46520a3fb0b865143cc824aea27deb8fa Author: Zhiyong Tao Date: Tue Apr 13 13:57:01 2021 +0800 pinctrl: add drive for I2C related pins on MT8195 This patch provides the advanced drive raw data setting version for I2C used pins on MT8195. Signed-off-by: Zhiyong Tao Acked-by: Sean Wang Link: https://lore.kernel.org/r/20210413055702.27535-4-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij commit 6cf5e9ef362af824de2e4e8afb78d74537f1e3db Author: Zhiyong Tao Date: Tue Apr 13 13:57:00 2021 +0800 pinctrl: add pinctrl driver on mt8195 This commit includes pinctrl driver for mt8195. Signed-off-by: Zhiyong Tao Acked-by: Sean Wang Link: https://lore.kernel.org/r/20210413055702.27535-3-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij commit 7f7663899d9429476db74d8aceb042fe4a3756b7 Author: Zhiyong Tao Date: Tue Apr 13 13:56:59 2021 +0800 dt-bindings: pinctrl: mt8195: add pinctrl file and binding document 1. This patch adds pinctrl file for mt8195. 2. This patch adds mt8195 compatible node in binding document. Signed-off-by: Zhiyong Tao Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210413055702.27535-2-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij commit 943e0da15370341a6e5d9baa5b6a7649c020e105 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:33 2021 +0800 pinctrl: Ingenic: Add pinctrl driver for X2000. Add support for probing the pinctrl-ingenic driver on the X2000 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-13-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 0c9907404d24220f5a5196816d069f0e05dd4459 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:32 2021 +0800 pinctrl: Ingenic: Add pinctrl driver for JZ4775. Add support for probing the pinctrl-ingenic driver on the JZ4775 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-12-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit b582b5a434d35b617c9fde73210138365d681c26 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:31 2021 +0800 pinctrl: Ingenic: Add pinctrl driver for JZ4755. Add support for probing the pinctrl-ingenic driver on the JZ4755 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-11-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 215c81a3e96964bd5d2e96aa22191ebff2d198c3 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:30 2021 +0800 pinctrl: Ingenic: Add pinctrl driver for JZ4750. Add support for probing the pinctrl-ingenic driver on the JZ4750 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-10-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 424f39691f2d6f69fdad9904c958880f4ebd3ece Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:29 2021 +0800 pinctrl: Ingenic: Add pinctrl driver for JZ4730. Add support for probing the pinctrl-ingenic driver on the JZ4730 SoC from Ingenic. This driver is derived from Paul Boddie. It is worth to noting that the JZ4730 SoC is special in having two control registers (upper/lower), so add code to handle the JZ4730 specific register offsets and some register pairs which have 2 bits for each GPIO pin. Tested-by: H. Nikolaus Schaller # on Letux400 Co-developed-by: Paul Boddie Signed-off-by: Paul Boddie Signed-off-by: H. Nikolaus Schaller Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-9-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit beadd1b4b48236d49f4b32f0c1dfcc27671f65c2 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:28 2021 +0800 dt-bindings: pinctrl: Add bindings for new Ingenic SoCs. Add the pinctrl bindings for the JZ4730 SoC, the JZ4750 SoC, the JZ4755 SoC, the JZ4775 SoC and the X2000 SoC from Ingenic. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1618757073-1724-8-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 863becff89b291ca6772626ea4312db6955126b8 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:27 2021 +0800 pinctrl: Ingenic: Reformat the code. 1.Move the "INGENIC_PIN_GROUP_FUNCS" to the macro definition section. 2.Add tabs before values to align the code in the macro definition section. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-7-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 6adf2c5607377d22831af009241fc0a6e62d4077 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:26 2021 +0800 pinctrl: Ingenic: Add DMIC pins support for Ingenic SoCs. 1.Add DMIC pins support for the JZ4780 SoC. 2.Add DMIC pins support for the X1000 SoC. 3.Add DMIC pins support for the X1500 SoC. 4.Add DMIC pins support for the X1830 SoC. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-6-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 5e6332a7ff39eb7701c717c3b5ec652659a7fb6a Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:25 2021 +0800 pinctrl: Ingenic: Improve LCD pins related code. 1.In the JZ4740 part, remove pointless "lcd-no-pins", use "lcd-special" and "lcd-generic" instead "lcd-18bit-tft". Currently, in the mainline, no other devicetree out there is using the "lcd-18bit-tft" ABI, so we should be able to replace it safely. 2.In the JZ4725B part, adjust the location of the LCD pins related code to keep them consistent with the style of other parts. 3.In the JZ4760 part, add the missing comma and adjust element order in "jz4760_lcd_special_pins[]", keep them in the order of CLS/SPL/PS/REV like other "lcd_special_pins" arrays. And adjust the location of the "jz4760_lcd_generic" related code to keep them consistent with the style of other parts. 4.In the JZ4770 part, remove pointless "lcd-no-pins", add the missing "lcd-16bit", "lcd-18bit", "lcd-special", "lcd-generic". 5.In the X1000 part and the X1500 part, remove pointless "lcd-no-pins". 6.In the X1830 part, replace "lcd-rgb-18bit" with "lcd-tft-8bit" and "lcd-tft-24bit", because of the description of the TRANS_CONFIG.MODE register bits in the PM manual of the X1830, shows that the X1830 only supppots 24bit mode and 8bit mode for tft interface, only 18 pins in the GPIO table are because of the data[17:16], the data[9:8], and the data[1:0] has not been connected. And according to the description, the two interfaces supported by X1830 are respectively referred to as "TFT interface" and "SLCD interface", so the "lcd-rgb-xxx" is replaced with "lcd-tft-xxx" to avoid confusion. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-5-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 1101519695d0594f353bced77bc9995c13f31048 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:24 2021 +0800 pinctrl: Ingenic: Adjust the sequence of X1830 SSI pin groups. Adjust the sequence of X1830's SSI related codes to make it consistent with other Ingenic SoCs. Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-4-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 1d0bd580ef83b78a10c0b37f3313eaa59d8c80db Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:23 2021 +0800 pinctrl: Ingenic: Add support for read the pin configuration of X1830. Add X1830 support in "ingenic_pinconf_get()", so that it can read the configuration of X1830 SoC correctly. Fixes: d7da2a1e4e08 ("pinctrl: Ingenic: Add pinctrl driver for X1830.") Cc: Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-3-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 65afd97630a9d6dd9ea83ff182dfdb15bc58c5d1 Author: 周琰杰 (Zhou Yanjie) Date: Sun Apr 18 22:44:22 2021 +0800 pinctrl: Ingenic: Add missing pins to the JZ4770 MAC MII group. The MII group of JZ4770's MAC should have 7 pins, add missing pins to the MII group. Fixes: 5de1a73e78ed ("Pinctrl: Ingenic: Add missing parts for JZ4770 and JZ4780.") Cc: Signed-off-by: 周琰杰 (Zhou Yanjie) Reviewed-by: Andy Shevchenko Reviewed-by: Paul Cercueil Link: https://lore.kernel.org/r/1618757073-1724-2-git-send-email-zhouyanjie@wanyeetech.com Signed-off-by: Linus Walleij commit 60dc5f1bcfaa9cae9f99637e347d068cad7f8c9f Author: James Bottomley Date: Wed Apr 21 15:52:37 2021 -0700 KEYS: trusted: fix TPM trusted keys for generic framework The generic framework patch broke the current TPM trusted keys because it doesn't correctly remove the values consumed by the generic parser before passing them on to the implementation specific parser. Fix this by having the generic parser return the string minus the consumed tokens. Additionally, there may be no tokens left for the implementation specific parser, so make it handle the NULL case correctly and finally fix a TPM 1.2 specific check for no keyhandle. Fixes: 5d0682be3189 ("KEYS: trusted: Add generic trusted keys framework") Tested-by: Sumit Garg Signed-off-by: James Bottomley commit 4d51c3d9de4bf5b9d637966dce9d1df77ed93288 Author: Parav Pandit Date: Sun Apr 18 16:55:52 2021 +0300 RDMA/cma: Skip device which doesn't support CM A switchdev RDMA device do not support IB CM. When such device is added to the RDMA CM's device list, when application invokes rdma_listen(), cma attempts to listen to such device, however it has IB CM attribute disabled. Due to this, rdma_listen() call fails to listen for other non switchdev devices as well. A below error message can be seen. infiniband mlx5_0: RDMA CMA: cma_listen_on_dev, error -38 A failing call flow is below. cma_listen_on_all() cma_listen_on_dev() _cma_attach_to_dev() rdma_listen() <- fails on a specific switchdev device This is because rdma_listen() is hardwired to only work with iwarp or IB CM compatible devices. Hence, when a IB device doesn't support IB CM or IW CM, avoid adding such device to the cma list so rdma_listen() can't even be called. Link: https://lore.kernel.org/r/f9cac00d52864ea7c61295e43fb64cf4db4fdae6.1618753862.git.leonro@nvidia.com Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f99a8e4373eeacb279bc9696937a55adbff7a28a Author: Heinz Mauelshagen Date: Wed Apr 21 23:32:36 2021 +0200 dm raid: fix inconclusive reshape layout on fast raid4/5/6 table reload sequences If fast table reloads occur during an ongoing reshape of raid4/5/6 devices the target may race reading a superblock vs the the MD resync thread; causing an inconclusive reshape state to be read in its constructor. lvm2 test lvconvert-raid-reshape-stripes-load-reload.sh can cause BUG_ON() to trigger in md_run(), e.g.: "kernel BUG at drivers/md/raid5.c:7567!". Scenario triggering the bug: 1. the MD sync thread calls end_reshape() from raid5_sync_request() when done reshaping. However end_reshape() _only_ updates the reshape position to MaxSector keeping the changed layout configuration though (i.e. any delta disks, chunk sector or RAID algorithm changes). That inconclusive configuration is stored in the superblock. 2. dm-raid constructs a mapping, loading named inconsistent superblock as of step 1 before step 3 is able to finish resetting the reshape state completely, and calls md_run() which leads to mentioned bug in raid5.c. 3. the MD RAID personality's finish_reshape() is called; which resets the reshape information on chunk sectors, delta disks, etc. This explains why the bug is rarely seen on multi-core machines, as MD's finish_reshape() superblock update races with the dm-raid constructor's superblock load in step 2. Fix identifies inconclusive superblock content in the dm-raid constructor and resets it before calling md_run(), factoring out identifying checks into rs_is_layout_change() to share in existing rs_reshape_requested() and new rs_reset_inclonclusive_reshape(). Also enhance a comment and remove an empty line. Cc: stable@vger.kernel.org Signed-off-by: Heinz Mauelshagen Signed-off-by: Mike Snitzer commit eefb45eef5c4c425e87667af8f5e904fbdd47abf Author: Chinmay Agarwal Date: Thu Apr 22 01:12:22 2021 +0530 neighbour: Prevent Race condition in neighbour subsytem Following Race Condition was detected: : Executing: __netif_receive_skb() ->__netif_receive_skb_core() -> arp_rcv() -> arp_process().arp_process() calls __neigh_lookup() which takes a reference on neighbour entry 'n'. Moves further along, arp_process() and calls neigh_update()-> __neigh_update(). Neighbour entry is unlocked just before a call to neigh_update_gc_list. This unlocking paves way for another thread that may take a reference on the same and mark it dead and remove it from gc_list. - neigh_flush_dev() is under execution and calls neigh_mark_dead(n) marking the neighbour entry 'n' as dead. Also n will be removed from gc_list. Moves further along neigh_flush_dev() and calls neigh_cleanup_and_release(n), but since reference count increased in t1, 'n' couldn't be destroyed. - Code hits neigh_update_gc_list, with neighbour entry set as dead. - arp_process() finally calls neigh_release(n), destroying the neighbour entry and we have a destroyed ntry still part of gc_list. Fixes: eb4e8fac00d1("neighbour: Prevent a dead entry from updating gc_list") Signed-off-by: Chinmay Agarwal Signed-off-by: David S. Miller commit 5d869070569a23aa909c6e7e9d010fc438a492ef Author: Marek Behún Date: Wed Apr 21 16:08:03 2021 +0200 net: phy: marvell: don't use empty switch default case This causes error reported by kernel test robot. Signed-off-by: Marek Behún Fixes: 41d26bf4aba0 ("net: phy: marvell: refactor HWMON OOP style") Reported-by: kernel test robot Signed-off-by: David S. Miller commit 83d686a6822322c4981b745dc1d7185f1f40811b Author: jinyiting Date: Wed Apr 21 16:38:21 2021 +0800 bonding: 3ad: Fix the conflict between bond_update_slave_arr and the state machine The bond works in mode 4, and performs down/up operations on the bond that is normally negotiated. The probability of bond-> slave_arr is NULL Test commands: ifconfig bond1 down ifconfig bond1 up The conflict occurs in the following process: __dev_open (CPU A) --bond_open --queue_delayed_work(bond->wq,&bond->ad_work,0); --bond_update_slave_arr --bond_3ad_get_active_agg_info ad_work(CPU B) --bond_3ad_state_machine_handler --ad_agg_selection_logic ad_work runs on cpu B. In the function ad_agg_selection_logic, all agg->is_active will be cleared. Before the new active aggregator is selected on CPU B, bond_3ad_get_active_agg_info failed on CPU A, bond->slave_arr will be set to NULL. The best aggregator in ad_agg_selection_logic has not changed, no need to update slave arr. The conflict occurred in that ad_agg_selection_logic clears agg->is_active under mode_lock, but bond_open -> bond_update_slave_arr is inspecting agg->is_active outside the lock. Also, bond_update_slave_arr is normal for potential sleep when allocating memory, so replace the WARN_ON with a call to might_sleep. Signed-off-by: jinyiting Signed-off-by: David S. Miller commit d0a43c12ee9f57ddb284272187bd18726c2c2c98 Author: Guangqing Zhu Date: Wed Apr 21 22:36:50 2021 +0800 power: supply: cpcap-battery: fix invalid usage of list cursor Fix invalid usage of a list_for_each_entry in cpcap_battery_irq_thread(). Empty list or fully traversed list points to list head, which is not NULL (and before the first element containing real data). Signed-off-by: Guangqing Zhu Reviewed-by: Tony Lindgren Reviewed-by: Carl Philipp Klemm Tested-by: Carl Philipp Klemm Signed-off-by: Sebastian Reichel commit aed4349c5d259c970f24dd8c84255ab8a5cd4a7d Author: Rob Herring Date: Wed Apr 21 10:39:36 2021 -0500 of: overlay: Fix kerneldoc warning in of_overlay_remove() '*ovcs_id' causes a warning because '*' is treated as bold markup: Documentation/devicetree/kernel-api:56: ../drivers/of/overlay.c:1184: WARNING: Inline emphasis start-string without end-string. Fix this by using the normal '@' markup for function parameters. That appears to be enough to keep the '*' from being interpretted as markup. Reported-by: Stephen Rothwell Cc: Frank Rowand Link: https://lore.kernel.org/r/20210421154548.1192903-1-robh@kernel.org/ Signed-off-by: Rob Herring commit 68f5c12abbc9b6f8c5eea16c62f8b7be70793163 Author: Vladimir Oltean Date: Wed Apr 21 21:44:20 2021 +0300 net: bridge: fix error in br_multicast_add_port when CONFIG_NET_SWITCHDEV=n When CONFIG_NET_SWITCHDEV is disabled, the shim for switchdev_port_attr_set inside br_mc_disabled_update returns -EOPNOTSUPP. This is not caught, and propagated to the caller of br_multicast_add_port, preventing ports from joining the bridge. Reported-by: Christian Borntraeger Fixes: ae1ea84b33da ("net: bridge: propagate error code and extack from br_mc_disabled_update") Signed-off-by: Vladimir Oltean Acked-by: Florian Fainelli Tested-by: Christian Borntraeger Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 37bd59d3cef8e90055dc26e25d9aba00f06f5f9f Author: Dan Carpenter Date: Wed Apr 21 18:19:27 2021 +0300 platform/x86: intel_pmc_core: Uninitialized data in pmc_core_lpm_latch_mode_write() The simple_write_to_buffer() can return success if even a single byte is copied from user space. In this case it can result in using uninitalized data if the buf[] array is not fully initialized. Really we should only succeed if the whole buffer is copied. Just using copy_from_user() is simpler and more appropriate. Fixes: 8074a79fad2e ("platform/x86: intel_pmc_core: Add option to set/clear LPM mode") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YIBCf+G9Ef8wrGJw@mwanda Signed-off-by: Hans de Goede commit 45062f441590810772959d8e1f2b24ba57ce1bd9 Author: Bob Pearson Date: Tue Apr 20 22:59:53 2021 -0500 RDMA/rxe: Fix a bug in rxe_fill_ip_info() Fix a bug in rxe_fill_ip_info() which was attempting to convert from RDMA_NETWORK_XXX to RXE_NETWORK_XXX. .._IPV6 should have mapped to .._IPV6 not .._IPV4. Fixes: edebc8407b88 ("RDMA/rxe: Fix small problem in network_type patch") Link: https://lore.kernel.org/r/20210421035952.4892-1-rpearson@hpe.com Suggested-by: Frank Zago Signed-off-by: Bob Pearson Acked-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 3df932141e4fa3a39f8e0839af9ee7bdedb1da0c Author: Lorenzo Bianconi Date: Wed Apr 21 15:37:21 2021 +0200 mt76: mt7921: reinit wpdma during drv_own if necessary Check dummy reg to reinitialized WPDMA during driver_own operation Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 51252cc56ec9aaac71445e849c75b40b17277d7e Author: Lorenzo Bianconi Date: Wed Apr 21 15:21:31 2021 +0200 mt76: move mt76_token_init in mt76_alloc_device In order to remove duplicated code, move mt76_token_init in mt76_alloc_device routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2bf301bc81df81907ceabbfd7bf57743696899bb Author: Dan Carpenter Date: Wed Apr 21 16:16:06 2021 +0300 mt76: mt7921: fix a precision vs width bug in printk Precision %.*s was intended instead of width %*s. The original code is potentially an information leak. Fixes: c7cc5ec57303 ("mt76: mt7921: rework mt7921_mcu_debug_msg_event routine") Signed-off-by: Dan Carpenter Signed-off-by: Felix Fietkau commit b2bcc6d2a5874b0265aeeb926618e2d265f96b50 Author: Dan Carpenter Date: Wed Apr 21 16:40:40 2021 +0300 mt76: mt7915: fix a precision vs width bug in printk Precision %.*s was intended instead of width %*s. The original code will still print unintended data from beyond the end of skb->data. Fixes: 665b2c780d63 ("mt76: mt7915: limit firmware log message printk to buffer length") Signed-off-by: Dan Carpenter Signed-off-by: Felix Fietkau commit c8131dc32be24d4413e7ed534f53e8b0cc5d3c36 Author: Dan Carpenter Date: Wed Apr 21 16:14:40 2021 +0300 mt76: mt7615: fix a precision vs width bug in printk Precision "%.*s" was intended instead of width "%*s". The original code will print garbage from beyond the end of the skb->data. Fixes: d76d6c3ba2b0 ("mt76: mt7615: limit firmware log message printk to buffer length") Signed-off-by: Dan Carpenter Signed-off-by: Felix Fietkau commit fdc088a7f4b0fe5204995b9c236e338c200cc44c Author: Lorenzo Bianconi Date: Mon Mar 15 22:49:15 2021 +0100 mt76: debugfs: introduce napi_threaded node Introduce napi_threaded debugfs knob in order to enable/disable NAPI threaded support Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 36fcc8cff592ed4c6c308f23390e481885b136fc Author: Lorenzo Bianconi Date: Mon Apr 19 14:03:00 2021 +0200 mt76: mt7921: introduce mt7921_mcu_sta_add routine mt7921_mcu_sta_add will be used to add and remove wtbl entries. Create broadcast wtbl entry after AP association Co-developed-by: Deren Wu Signed-off-by: Deren Wu Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 081b37aea5085fd1535651150c5742e19ccfea82 Author: Sean Wang Date: Wed Apr 21 12:43:51 2021 +0200 mt76: mt7921: mt7921_stop should put device in fw_own state mt7921_stop should put device in fw_own state to reduce power consumption. Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b1bd7bb8121d89518b2248357a070d4bf8defd3e Author: Lorenzo Bianconi Date: Wed Apr 21 12:43:50 2021 +0200 mt76: connac: unschedule mac_work before going to sleep In order to wake the device less frequently and so reduce power consumpation, unschedule mac_work before going to sleep Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit abe912ae3cd42f95beeff8eb67acbe0ca8b8aedd Author: Lorenzo Bianconi Date: Wed Apr 21 12:43:49 2021 +0200 mt76: mt7663: add awake and doze time accounting Similar to mt7921, introduce awake and doze time accounting for runtime pm. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c18ba14c4bc953250aa497d03855592bd133ccde Author: Lorenzo Bianconi Date: Wed Apr 21 12:43:48 2021 +0200 mt76: mt7921: improve doze opportunity Increase mt7921 mac work timeout in oder to have move sleep opportunities Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d43b3257621dfe57c71d875afd3f624b9a042fc5 Author: Lorenzo Bianconi Date: Wed Apr 21 12:28:33 2021 +0200 mt76: mt7921: get rid of mcu_reset function pointer since mcu_reset it used only by mt7921, move the reset callback to mt7921_mcu_parse_response routine and get rid of the function pointer. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 422f351193401428d62035c3f5a933ed46967517 Author: Shayne Chen Date: Wed Apr 21 16:39:45 2021 +0800 mt76: mt7915: do not read rf value from efuse in flash mode Do not read rf value from efuse when driver is configured to use flash mode. Tested-by: Bruce Chuang Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit d089692bc7938a1030db98d493497cda9afe4b43 Author: Lorenzo Bianconi Date: Tue Apr 20 23:05:32 2021 +0200 mt76: move token utilities in mt76 common module Move token management in mt76 common module since it is shared between mt7615, mt7915 and mt7921 drivers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit b17aff3368916136ba2a87669bb3c319e5c6d0b2 Author: Lorenzo Bianconi Date: Tue Apr 20 23:05:31 2021 +0200 mt76: move token_lock, token and token_count in mt76_dev Move token_lock, token and token_count data structures in mt76_dev. This is a preliminary patch to move token management in mt76 common module since it is shared by mt7615, mt7915 and mt7921 drivers. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fe3fccde8870764ba3e60610774bd7bc9f8faeff Author: Sean Wang Date: Mon Apr 19 23:58:05 2021 +0800 mt76: mt7921: fix possible invalid register access Disable the interrupt and synchronze for the pending irq handlers to ensure the irq tasklet is not being scheduled after the suspend to avoid the possible invalid register access acts when the host pcie controller is suspended. [17932.910534] mt7921e 0000:01:00.0: pci_pm_suspend+0x0/0x22c returned 0 after 21375 usecs [17932.910590] pcieport 0000:00:00.0: calling pci_pm_suspend+0x0/0x22c @ 18565, parent: pci0000:00 [17932.910602] pcieport 0000:00:00.0: pci_pm_suspend+0x0/0x22c returned 0 after 8 usecs [17932.910671] mtk-pcie 11230000.pcie: calling platform_pm_suspend+0x0/0x60 @ 22783, parent: soc [17932.910674] mtk-pcie 11230000.pcie: platform_pm_suspend+0x0/0x60 returned 0 after 0 usecs ... 17933.615352] x1 : 00000000000d4200 x0 : ffffff8269ca2300 [17933.620666] Call trace: [17933.623127] mt76_mmio_rr+0x28/0xf0 [mt76] [17933.627234] mt7921_rr+0x38/0x44 [mt7921e] [17933.631339] mt7921_irq_tasklet+0x54/0x1d8 [mt7921e] [17933.636309] tasklet_action_common+0x12c/0x16c [17933.640754] tasklet_action+0x24/0x2c [17933.644418] __do_softirq+0x16c/0x344 [17933.648082] irq_exit+0xa8/0xac [17933.651224] scheduler_ipi+0xd4/0x148 [17933.654890] handle_IPI+0x164/0x2d4 [17933.658379] gic_handle_irq+0x140/0x178 [17933.662216] el1_irq+0xb8/0x180 [17933.665361] cpuidle_enter_state+0xf8/0x204 [17933.669544] cpuidle_enter+0x38/0x4c [17933.673122] do_idle+0x1a4/0x2a8 [17933.676352] cpu_startup_entry+0x24/0x28 [17933.680276] rest_init+0xd4/0xe0 [17933.683508] arch_call_rest_init+0x10/0x18 [17933.687606] start_kernel+0x340/0x3b4 [17933.691279] Code: aa0003f5 d503201f f953eaa8 8b344108 (b9400113) [17933.697373] ---[ end trace a24b8e26ffbda3c5 ]--- [17933.767846] Kernel panic - not syncing: Fatal exception in interrupt Fixes: ffa1bf97425b ("mt76: mt7921: introduce PM support") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 1792eb0ecdc51282d37c7ad43167d088e2bf71df Author: Sean Wang Date: Mon Apr 19 22:20:59 2021 +0800 mt76: mt7921: enable deep sleep when the device suspends Enable the deep sleep mode in suspend handler to reduce the power consumption further. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit c0b21255de9be39498b39e0f15e7598f3991e2ea Author: Sean Wang Date: Mon Apr 19 22:20:58 2021 +0800 mt76: connac: introduce mt76_connac_mcu_set_deep_sleep utility Introduce mt76_connac_mcu_set_deep_sleep to enable deep sleep mode and will be activated immediately when the host returns the ownership to the device. Co-developed-by: Leon Yen Signed-off-by: Leon Yen Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 77ba349101ac22bae2d4e635245b60173d49de2b Author: Lorenzo Bianconi Date: Mon Apr 19 22:20:57 2021 +0800 mt76: mt7921: introduce mt7921_wpdma_reinit_cond utility routine Add mt7921_wpdma_reinit_cond to check dummy reg if driver needs to reinitialized WPDMA after driver_own operation Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Leon Yen Signed-off-by: Leon Yen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5536e7354aa8abf0e27a1bc58f4b4653b4884bdf Author: Lorenzo Bianconi Date: Mon Apr 19 22:20:56 2021 +0800 mt76: mt7921: introduce mt7921_dma_{enable,disable} utilities Introduce mt7921_dma_enable and mt7921_dma_disable utilities routine in order for code reusing between mt7921_dma_reset and mt7921_dma_init. This is a preliminary patch to reset dma during device driver_own request. Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fcad15d52ef52002e069ed9a091a0c0a54691c27 Author: Lorenzo Bianconi Date: Mon Apr 19 22:20:55 2021 +0800 mt76: mt7921: introduce mt7921_wpdma_reset utility routine Introduce mt7921_wpdma_reset routine to reset wpdma during chip reset or driver_own request. Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0a1059d0f06023a7d045d05055c9d2ebad3b9c9d Author: Lorenzo Bianconi Date: Mon Apr 19 22:20:54 2021 +0800 mt76: mt7921: move mt7921_dma_reset in dma.c Move mt7921_dma_reset routine in dma.c and make mt7921_dma_prefetch static. Moreover add force parameter to mt7921_dma_reset signature. This is a preliminary patch to reset dma mt7921_mcu_drv_pmctrl. Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4a52d6abb193aea0f2923a2c917502bd2d718630 Author: Colin Ian King Date: Mon Apr 19 14:20:32 2021 +0100 mt76: mt7615: Fix a dereference of pointer sta before it is null checked Currently the assignment of idx dereferences pointer sta before sta is null checked, leading to a potential null pointer dereference. Fix this by assigning idx when it is required after the null check on pointer sta. Addresses-Coverity: ("Dereference before null check") Fixes: a4a5a430b076 ("mt76: mt7615: fix TSF configuration") Signed-off-by: Colin Ian King Signed-off-by: Felix Fietkau commit dc5d5f9d3fe4d0c26b4e4beb25d056ffcc5fbf02 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:45 2021 +0200 mt76: mt7921: enable sw interrupts Enable sw interrupts in order to wake the device from deep sleep receiving packets Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 36873246f78a2d82eb8c43f74af52f199757dcff Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:44 2021 +0200 mt76: mt7921: add awake and doze time accounting Introduce awake and doze time accounting for runtime pm. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 37a8648889f6aa398be67e254834372f5d5f8a78 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:43 2021 +0200 mt76: remove MT76_STATE_PM in tx path since tx/rx path is now relying pm ref counting, get rid of MT76_STATE_PM check in the tx path Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e5f35576c8a986c6456f7d0c7d0f1ff34ccaa165 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:42 2021 +0200 mt76: connac: use waitqueue for runtime-pm Simplify the code using a wait_queue_head_t instead of a completion to wait the chip is fully awake in mt76_connac_pm_wake routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 310718ba6a13a5d0d65ea1ea338ea9f9f992dacf Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:41 2021 +0200 mt76: connac: do not run mt76_txq_schedule_all directly In order to not break runtime-pm, do run mt76_txq_schedule_all in mt7615_set_channel/mt7921_set_channel but rely on mt76_worker_schedule Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 75e83c2035debe419ba25f6dc66fcd11d0dc0bcd Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:40 2021 +0200 mt76: mt7615: rely on pm refcounting in mt7615_led_set_config Rely on mt76_connac_pm_ref/mt76_connac_pm_unref utility routines in mt7615_led_set_config Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a61826203ba8806b4cdffd36bafdce3e9ad35c24 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:39 2021 +0200 mt76: connac: alaways wake the device before scanning move scanning check from mt76_connac_power_save_sched routine to mt7921_pm_power_save_work/mt7615_pm_power_save_work ones Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1d4f5c68a0ed1838383013b3aca69a124b2dc9ec Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:38 2021 +0200 mt76: mt7921: get rid of useless MT76_STATE_PM in mt7921_mac_work Remove useless MT76_STATE_PM check in mt7921_mac_work since mt7921_mutex_acquire will wake up the device if necessary Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit efe9ec5cec38181bf4faa871c73b63c4d25efef0 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:37 2021 +0200 mt76: connac: remove MT76_STATE_PM in mac_tx_free Get rid of MT76_STATE_PM chec in mt7615_mac_tx_free and mt7921_mac_tx_free since we already rely on mt76_connac_pm_unref in the NAPI callback. Remove mt76_connac_power_save_sched calls in mt7615_mac_tx_free and mt7921_mac_tx_free Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit ec7bd7b4a9c0e7e90d23b4f6a7dca2c713fe93ab Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:36 2021 +0200 mt76: connac: check wake refcount in mcu_fw_pmctrl In order to avoid synchronization races between tx and rx path, rely on mt76_connac_skip_fw_pmctrl putting the chip in sleep mode for mt7921 and mt7663 devices Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4f9b3aeb837a9df029b56179be7b0505de4400de Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:35 2021 +0200 mt76: connac: unschedule ps_work in mt76_connac_pm_wake In order to avoid synchronization issues between wake and ps works, cancel ps_work in mt76_connac_pm_wake routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit db928f1ab9789f99a0e57b35f3c8d652ad5350f8 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:34 2021 +0200 mt76: mt7663: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx/rx napi Introduce mt7615_poll_rx rx napi callback for mt7663. Do not access device registers in tx/rx napi if the device is not awake. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 917dccb6eebcafd2a5ff73d75d2b0c5c7251e5f5 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:33 2021 +0200 mt76: mt7921: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx/rx napi Introduce mt7921_poll_rx rx napi callback for mt7921. Do not access device registers in tx/rx napi if the device is not awake. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit cb8ed33d4b3f4ef8cbff2d164bffeca678427f5a Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:32 2021 +0200 mt76: dma: add the capability to define a custom rx napi poll routine Add the capability to define a custom rx napi callback for each driver. This is a preliminary patch to properly support runtime-pm on rx side Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 335e97ace24ade90aa5d5e8713bc448d2c276322 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:31 2021 +0200 mt76: mt7663: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path Introduce mt7615_tx_worker routine as mt76 tx worker callback for mt7663. Rely on mt76_connac_pm_ref/mt76_connac_pm_unref to check PM state and increment/decrement wake counter Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9800462ddc58ace3d96a006156ba6764824992f2 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:30 2021 +0200 mt76: mt7921: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path Introduce mt7921_tx_worker routine as mt76 tx worker callback for mt7921. Rely on mt76_connac_pm_ref/mt76_connac_pm_unref to check PM state and increment/decrement wake counter Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7f2bc8ba11a0e82d474f0047933c3baeebf4406c Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:29 2021 +0200 mt76: connac: introduce wake counter for fw_pmctrl synchronization Introduce wake counter and related spinlock in order to synchronize tx/rx path and fw_pmctrl request. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7cd740f0e499d9bfd672ff1f3f6512503141abbe Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:28 2021 +0200 mt76: mt7663: fix a race between mt7615_mcu_drv_pmctrl and mt7615_mcu_fw_pmctrl Introduce a mutex in order to avoid a race between mt7615_mcu_lp_drv_pmctrl and mt7615_mcu_fw_pmctrl routines since they are run two independent works Fixes: 1f549009b5b2 ("mt76: mt7615: do not request {driver,fw}_own if already granted") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fad90e43eac0434108af18e326e179d1b5153135 Author: Lorenzo Bianconi Date: Sun Apr 18 18:45:27 2021 +0200 mt76: mt7921: fix a race between mt7921_mcu_drv_pmctrl and mt7921_mcu_fw_pmctrl Introduce a mutex in order to avoid a race between mt7921_mcu_drv_pmctrl and mt7921_mcu_fw_pmctrl routines since they are run two independent works Fixes: 1d8efc741df8 ("mt76: mt7921: introduce Runtime PM support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d5a2abb0db9ea05f24d1e48d3e4787247e0c5248 Author: Lorenzo Bianconi Date: Sat Apr 17 18:51:37 2021 +0200 mt76: mt7921: remove leftover function declaration Get rid of leftover mt7921_mcu_add_bss_info routine declaration Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit f4f4089eb145d18af93977aebdcb899d8eaa890a Author: Lorenzo Bianconi Date: Sat Apr 17 12:28:49 2021 +0200 mt76: connac: move mcu_update_arp_filter in mt76_connac module Move mt76_connac_mcu_update_arp_filter in mt76_connac module since the code is shared between mt7615 and mt7921 Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 08e9fdfbb2248e93bbfaeb9cde284776085466cd Author: Rafał Miłecki Date: Tue Apr 20 23:01:04 2021 +0200 dt-bindings: thermal: brcm,ns-thermal: Convert to the json-schema This helps validating DTS files. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210420210104.10555-1-zajec5@gmail.com commit 823543b739c89cd232a6c6815362f32ed81a679e Merge: 72241e3190f2b beeab9bc8e85d Author: Mark Brown Date: Wed Apr 21 19:35:06 2021 +0100 Merge series "mfd/rtc/regulator: Drop board file support for Samsung PMIC" from Krzysztof Kozlowski : Hi, The Samsung PMIC drivers since long time are used only on devicetree platforms (Samsung Exynos) and there are no users with board files. Drop the support for board files entirely and depend on OF for matching. This makes the code smaller and simpler. Dependencies ============ The MFD pieces are rebased on my previous sec-core dirver changes: mfd: sec: Simplify getting of_device_id match data https://lore.kernel.org/linux-samsung-soc/20210420113929.278082-1-krzysztof.kozlowski@canonical.com/T/#t Applying - can be independent ============================= The last RTC and regulator patches can be picked up independently via regulator and rtc trees. There are no board files currently, so the code in these drivers is basically dead code and feature-bisection is preserved. Best regards, Krzysztof Krzysztof Kozlowski (9): mfd: sec: Drop support for board files and require devicetree mfd: sec: Remove unused cfg_pmic_irq in platform data mfd: sec: Remove unused device_type in platform data mfd: sec: Remove unused irq_base in platform data mfd: sec: Enable wakeup from suspend via devicetree property mfd: sec: Remove unused platform data members rtc: s5m: Remove reference to parent's device pdata regulator: s2mpa01: Drop initialization via platform data regulator: s2mps11: Drop initialization via platform data drivers/mfd/Kconfig | 1 + drivers/mfd/sec-core.c | 64 +++++--------------------------- drivers/mfd/sec-irq.c | 4 +- drivers/regulator/s2mpa01.c | 4 -- drivers/regulator/s2mps11.c | 22 +---------- drivers/rtc/rtc-s5m.c | 6 --- include/linux/mfd/samsung/core.h | 33 ---------------- 7 files changed, 14 insertions(+), 120 deletions(-) -- 2.25.1 commit 36e69da892f1224dabc4a5d0a5948764c318b117 Author: Adam Ford Date: Wed Apr 21 09:05:05 2021 -0500 net: ethernet: ravb: Fix release of refclk The call to clk_disable_unprepare() can happen before priv is initialized. This means moving clk_disable_unprepare out of out_release into a new label. Fixes: 8ef7adc6beb2 ("net: ethernet: ravb: Enable optional refclk") Signed-off-by: Adam Ford Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 47a017f33943278570c072bc71681809b2567b3a Author: Bjorn Andersson Date: Wed Apr 21 10:40:07 2021 -0700 net: qrtr: Avoid potential use after free in MHI send It is possible that the MHI ul_callback will be invoked immediately following the queueing of the skb for transmission, leading to the callback decrementing the refcount of the associated sk and freeing the skb. As such the dereference of skb and the increment of the sk refcount must happen before the skb is queued, to avoid the skb to be used after free and potentially the sk to drop its last refcount.. Fixes: 6e728f321393 ("net: qrtr: Add MHI transport layer") Signed-off-by: Bjorn Andersson Signed-off-by: David S. Miller commit 357a07c26697a770d39d28b6b111f978deb4017d Author: Martin Schiller Date: Wed Apr 21 07:50:47 2021 +0200 net: phy: intel-xway: enable integrated led functions The Intel xway phys offer the possibility to deactivate the integrated LED function and to control the LEDs manually. If this was set by the bootloader, it must be ensured that the integrated LED function is enabled for all LEDs when loading the driver. Before commit 6e2d85ec0559 ("net: phy: Stop with excessive soft reset") the LEDs were enabled by a soft-reset of the PHY (using genphy_soft_reset). Initialize the XWAY_MDIO_LED with it's default value (which is applied during a soft reset) instead of adding back the soft reset. This brings back the default LED configuration while still preventing an excessive amount of soft resets. Fixes: 6e2d85ec0559 ("net: phy: Stop with excessive soft reset") Signed-off-by: Martin Schiller Signed-off-by: David S. Miller commit 5718458b092bf6bf4482c5df32affba3c3259517 Author: Yoshihiro Shimoda Date: Wed Apr 21 13:52:46 2021 +0900 net: renesas: ravb: Fix a stuck issue when a lot of frames are received When a lot of frames were received in the short term, the driver caused a stuck of receiving until a new frame was received. For example, the following command from other device could cause this issue. $ sudo ping -f -l 1000 -c 1000 The previous code always cleared the interrupt flag of RX but checks the interrupt flags in ravb_poll(). So, ravb_poll() could not call ravb_rx() in the next time until a new RX frame was received if ravb_rx() returned true. To fix the issue, always calls ravb_rx() regardless the interrupt flags condition. Fixes: c156633f1353 ("Renesas Ethernet AVB driver proper") Signed-off-by: Yoshihiro Shimoda Signed-off-by: David S. Miller commit 5e6038b88a5718910dd74b949946d9d9cee9a041 Author: Ong Boon Leong Date: Wed Apr 21 17:11:49 2021 +0800 net: stmmac: fix TSO and TBS feature enabling during driver open TSO and TBS cannot co-exist and current implementation requires two fixes: 1) stmmac_open() does not need to call stmmac_enable_tbs() because the MAC is reset in stmmac_init_dma_engine() anyway. 2) Inside stmmac_hw_setup(), we should call stmmac_enable_tso() for TX Q that is _not_ configured for TBS. Fixes: 579a25a854d4 ("net: stmmac: Initial support for TBS") Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 17cb00704c217d88a93791c914a01904e685b499 Author: Ong Boon Leong Date: Wed Apr 21 16:46:06 2021 +0800 stmmac: intel: set TSO/TBS TX Queues default settings TSO and TBS cannot coexist, for now we set Intel mGbE controller to use below TX Queue mapping: TxQ0 uses TSO and the rest of TXQs supports TBS. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 70a7c484c7c3eaa17b679db2c74ec8ecbe8dc0e8 Author: Oleksij Rempel Date: Wed Apr 21 15:05:40 2021 +0200 net: dsa: fix bridge support for drivers without port_bridge_flags callback Starting with patch: a8b659e7ff75 ("net: dsa: act as passthrough for bridge port flags") drivers without "port_bridge_flags" callback will fail to join the bridge. Looking at the code, -EOPNOTSUPP seems to be the proper return value, which makes at least microchip and atheros switches work again. Fixes: 5961d6a12c13 ("net: dsa: inherit the actual bridge port flags at join time") Signed-off-by: Oleksij Rempel Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 53e35ebb9a17fd953d9b8fe059aaf4282fa524f2 Author: Dan Carpenter Date: Wed Apr 21 16:22:50 2021 +0300 stmmac: intel: unlock on error path in intel_crosststamp() We recently added some new locking to this function but one error path was overlooked. We need to drop the lock before returning. Fixes: f4da56529da6 ("net: stmmac: Add support for external trigger timestamping") Signed-off-by: Dan Carpenter Reviewed-by: Wong Vee Khee Signed-off-by: David S. Miller commit 90b669d65d99a3ee6965275269967cdee4da106e Author: Yinjun Zhang Date: Wed Apr 21 11:24:15 2021 +0200 nfp: devlink: initialize the devlink port attribute "lanes" The number of lanes of devlink port should be correctly initialized when registering the port, so that the input check when running "devlink port split count " can pass. Fixes: a21cf0a8330b ("devlink: Add a new devlink port lanes attribute and pass to netlink") Signed-off-by: Yinjun Zhang Signed-off-by: Louis Peens Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit 2acf63c16a3b8d7a8f11d9d6f9ef49b9771c1aee Merge: 0e91e9a5d699f 836021a2d0e0e Author: David S. Miller Date: Wed Apr 21 10:25:09 2021 -0700 Merge branch 'mv88e6xxx-small-improvements' Tobias Waldekranz says: ==================== net: dsa: mv88e6xxx: Tiny fixes/improvements Just some small things I have noticed that do not fit in any other series. ==================== Signed-off-by: David S. Miller commit 836021a2d0e0e4c90b895a35bd9c0342071855fb Author: Tobias Waldekranz Date: Wed Apr 21 14:04:54 2021 +0200 net: dsa: mv88e6xxx: Export cross-chip PVT as devlink region Export the raw PVT data in a devlink region so that it can be inspected from userspace and compared to the current bridge configuration. Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 281140a0a2ce4febf2c0ce5d29d0e7d961a826b1 Author: Tobias Waldekranz Date: Wed Apr 21 14:04:53 2021 +0200 net: dsa: mv88e6xxx: Fix off-by-one in VTU devlink region size In the unlikely event of the VTU being loaded to the brim with 4k entries, the last one was placed in the buffer, but the size reported to devlink was off-by-one. Make sure that the final entry is available to the caller. Fixes: ca4d632aef03 ("net: dsa: mv88e6xxx: Export VTU as devlink region") Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 78e70dbcfd0334c0eaf61c09e2083107f4762506 Author: Tobias Waldekranz Date: Wed Apr 21 14:04:52 2021 +0200 net: dsa: mv88e6xxx: Correct spelling of define "ADRR" -> "ADDR" Because ADRR is not a thing. Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0e91e9a5d699fe7cf16710f4a016fbba94b92d04 Merge: a926c025d56bb 2e2ee4cd0ab54 Author: David S. Miller Date: Wed Apr 21 10:23:17 2021 -0700 Merge branch 'octeontx2-af-cn10k' Srujana Challa says: ==================== Add support for CN10K CPT block OcteonTX3 (CN10K) silicon is a Marvell next-gen silicon. CN10K CPT introduces new features like reassembly support and some feature enhancements. This patchset adds new mailbox messages and some minor changes to existing mailbox messages to support CN10K CPT. v1-v2 Fixed sparse warnings. ==================== Signed-off-by: David S. Miller commit 2e2ee4cd0ab546859b5b5b2874b973b6caf855b3 Author: Srujana Challa Date: Wed Apr 21 14:53:02 2021 +0530 octeontx2-af: Add mailbox for CPT stats Adds a new mailbox to get CPT stats, includes performance counters, CPT engines status and RXC status. Signed-off-by: Narayana Prasad Raju Atherya Signed-off-by: Srujana Challa Signed-off-by: David S. Miller commit ecad2ce8c48fcaa23c6efd07e8d1467319a7bf8a Author: Srujana Challa Date: Wed Apr 21 14:53:01 2021 +0530 octeontx2-af: cn10k: Add mailbox to configure reassembly timeout CN10K CPT coprocessor includes a component named RXC which is responsible for reassembly of inner IP packets. RXC has the feature to evict oldest entries based on age/threshold. This patch adds a new mailbox to configure reassembly age or threshold. Signed-off-by: Jerin Jacob Kollanukkaran Signed-off-by: Srujana Challa Signed-off-by: David S. Miller commit e4bbc5c53a8f6b9235d8f1292377705cf7bcf59b Author: Srujana Challa Date: Wed Apr 21 14:53:00 2021 +0530 octeontx2-af: cn10k: Mailbox changes for CN10K CPT Adds changes to existing CPT mailbox messages to support CN10K CPT block. This patch also adds new register defines for CN10K CPT. Signed-off-by: Vidya Sagar Velumuri Signed-off-by: Srujana Challa Signed-off-by: David S. Miller commit 542c40957c0557f0b3ec326579a57c143412d0e4 Merge: d83b8aa5207d8 e7020bb068d8b Author: David S. Miller Date: Wed Apr 21 10:18:09 2021 -0700 Merge tag 'wireless-drivers-2021-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for v5.12 As there was -rc8 release, one more important fix for v5.12. iwlwifi * fix spinlock warning in gen2 devices ==================== Signed-off-by: David S. Miller commit 60df5de9b0532aff59a00475b57c265b4a3620e1 Author: Christoph Hellwig Date: Fri Apr 9 08:47:44 2021 +0200 nvme: cleanup nvme_configure_apst Remove a level of indentation from the main code implementating the table search by using a goto for the APST not supported case. Also move the main comment above the function. Signed-off-by: Christoph Hellwig Reviewed-by: Niklas Cassel commit 53fe2a30bc168db9700e00206d991ff934973cf1 Author: Christoph Hellwig Date: Fri Apr 9 11:46:12 2021 +0200 nvme: do not try to reconfigure APST when the controller is not live Do not call nvme_configure_apst when the controller is not live, given that nvme_configure_apst will fail due the lack of an admin queue when the controller is being torn down and nvme_set_latency_tolerance is called from dev_pm_qos_hide_latency_tolerance. Fixes: 510a405d945b("nvme: fix memory leak for power latency tolerance") Reported-by: Peng Liu Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch commit 74c22990f08c9f922f775939a4ebc814ca2c49eb Author: Hannes Reinecke Date: Fri Apr 16 13:46:21 2021 +0200 nvme: add 'kato' sysfs attribute Add a 'kato' controller sysfs attribute to display the current keep-alive timeout value (if any). This allows userspace to identify persistent discovery controllers, as these will have a non-zero KATO value. Signed-off-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit a70b81bd4d9d2d6c05cfe6ef2a10bccc2e04357a Author: Hannes Reinecke Date: Fri Apr 16 13:46:20 2021 +0200 nvme: sanitize KATO setting According to the NVMe base spec the KATO commands should be sent at half of the KATO interval, to properly account for round-trip times. As we now will only ever send one KATO command per connection we can easily use the recommended values. This also fixes a potential issue where the request timeout for the KATO command does not match the value in the connect command, which might be causing spurious connection drops from the target. Signed-off-by: Hannes Reinecke Signed-off-by: Christoph Hellwig commit 8f864c595bed20ef85fef3e7314212b73800d51d Author: Hou Pu Date: Fri Apr 16 10:45:21 2021 +0800 nvmet: avoid queuing keep-alive timer if it is disabled Issue following command: nvme set-feature -f 0xf -v 0 /dev/nvme1n1 # disable keep-alive timer nvme admin-passthru -o 0x18 /dev/nvme1n1 # send keep-alive command will make keep-alive timer fired and thus delete the controller like below: [247459.907635] nvmet: ctrl 1 keep-alive timer (0 seconds) expired! [247459.930294] nvmet: ctrl 1 fatal error occurred! Avoid this by not queuing delayed keep-alive if it is disabled when keep-alive command is received from the admin queue. Signed-off-by: Hou Pu Tested-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit f5d1499ae2096d7ea301023c4cc54e427300eb0a Author: Chris von Recklinghausen Date: Tue Apr 20 08:57:39 2021 -0400 PM: hibernate: x86: Use crc32 instead of md5 for hibernation e820 integrity check Hibernation fails on a system in fips mode because md5 is used for the e820 integrity check and is not available. Use crc32 instead. The check is intended to detect whether the E820 memory map provided by the firmware after cold boot unexpectedly differs from the one that was in use when the hibernation image was created. In this case, the hibernation image cannot be restored, as it may cover memory regions that are no longer available to the OS. A non-cryptographic checksum such as CRC-32 is sufficient to detect such inadvertent deviations. Fixes: 62a03defeabd ("PM / hibernate: Verify the consistent of e820 memory map by md5 digest") Reviewed-by: Eric Biggers Tested-by: Dexuan Cui Reviewed-by: Dexuan Cui Signed-off-by: Chris von Recklinghausen [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki commit 733dda9cc849895349b2a64f398aeb56e437f99f Author: Alexander Monakov Date: Tue Apr 20 00:57:07 2021 +0300 cpufreq: Kconfig: fix documentation links User documentation for cpufreq governors and drivers has been moved to admin-guide; adjust references from Kconfig entries accordingly. Remove references from undocumented cpufreq drivers, as well as the 'userspace' cpufreq governor, for which no additional details are provided in the admin-guide text. Fixes: 2a0e49279850 ("cpufreq: User/admin documentation update and consolidation") Signed-off-by: Alexander Monakov Signed-off-by: Rafael J. Wysocki commit f4be591f1436afff4a18ddd180f7bf9421ffddfe Author: Calvin Owens Date: Fri Apr 16 14:18:29 2021 -0700 brd: expose number of allocated pages in debugfs While the maximum size of each ramdisk is defined either as a module parameter, or compile time default, it's impossible to know how many pages have currently been allocated by each ram%d device, since they're allocated when used and never freed. This patch creates a new directory at this location: /sys/kernel/debug/ramdisk_pages/ which will contain a file named "ram%d" for each instantiated ramdisk on the system. The file is read-only, and read() will output the number of pages currently held by that ramdisk. We lose track how much memory a ramdisk is using as pages once used are simply recycled but never freed. In instances where we exhaust the size of the ramdisk with a file that exceeds it, encounter ENOSPC and delete the file for mitigation; df would show decrease in used and increase in available blocks but the since we have touched all pages, the memory footprint of the ramdisk does not reflect the blocks used/available count ... [root@localhost ~]# mkfs.ext2 /dev/ram15 mke2fs 1.45.6 (20-Mar-2020) Creating filesystem with 4096 1k blocks and 1024 inodes [root@localhost ~]# mount /dev/ram15 /mnt/ram15/ [root@localhost ~]# cat /sys/kernel/debug/ramdisk_pages/ram15 58 [root@kerneltest008.06.prn3 ~]# df /dev/ram15 Filesystem 1K-blocks Used Available Use% Mounted on /dev/ram15 3963 31 3728 1% /mnt/ram15 [root@kerneltest008.06.prn3 ~]# dd if=/dev/urandom of=/mnt/ram15/test2 bs=1M count=5 dd: error writing '/mnt/ram15/test2': No space left on device 4+0 records in 3+0 records out 4005888 bytes (4.0 MB, 3.8 MiB) copied, 0.0446614 s, 89.7 MB/s [root@kerneltest008.06.prn3 ~]# df /mnt/ram15/ Filesystem 1K-blocks Used Available Use% Mounted on /dev/ram15 3963 3960 0 100% /mnt/ram15 [root@kerneltest008.06.prn3 ~]# cat /sys/kernel/debug/ramdisk_pages/ram15 1024 [root@kerneltest008.06.prn3 ~]# rm /mnt/ram15/test2 rm: remove regular file '/mnt/ram15/test2'? y [root@kerneltest008.06.prn3 /var]# df /dev/ram15 Filesystem 1K-blocks Used Available Use% Mounted on /dev/ram15 3963 31 3728 1% /mnt/ram15 # Acutal memory footprint [root@kerneltest008.06.prn3 /var]# cat /sys/kernel/debug/ramdisk_pages/ram15 1024 ... This debugfs counter will always reveal the accurate number of permanently allocated pages to the ramdisk. Signed-off-by: Calvin Owens [cleaned up the !CONFIG_DEBUG_FS case and API changes for HEAD] Signed-off-by: Kyle McMartin [rebased] Signed-off-by: Saravanan D Signed-off-by: Jens Axboe commit 2dfbacc65d1d2eae587ccb6b93f6280542641858 Author: Luke D Jones Date: Mon Apr 19 19:39:17 2021 +1200 ACPI: video: use native backlight for GA401/GA502/GA503 Force backlight control in these models to use the native interface at /sys/class/backlight/amdgpu_bl0. Signed-off-by: Luke D. Jones Signed-off-by: Rafael J. Wysocki commit c3f2311e4b9e20785f870042ed6ddb3e55d43daf Author: Colin Ian King Date: Thu Apr 15 15:37:58 2021 +0100 ACPI: APEI: remove redundant assignment to variable rc The variable rc is being assigned a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Rafael J. Wysocki commit 238eca821cee90e91139da84ef4f38c74d7cf0d9 Author: Sean Christopherson Date: Tue Apr 6 15:49:52 2021 -0700 KVM: SVM: Allocate SEV command structures on local stack Use the local stack to "allocate" the structures used to communicate with the PSP. The largest struct used by KVM, sev_data_launch_secret, clocks in at 52 bytes, well within the realm of reasonable stack usage. The smallest structs are a mere 4 bytes, i.e. the pointer for the allocation is larger than the allocation itself. Now that the PSP driver plays nice with vmalloc pointers, putting the data on a virtually mapped stack (CONFIG_VMAP_STACK=y) will not cause explosions. Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210406224952.4177376-9-seanjc@google.com> Reviewed-by: Brijesh Singh Acked-by: Tom Lendacky [Apply same treatment to PSP migration commands. - Paolo] Signed-off-by: Paolo Bonzini commit a402e35177797d736dd3dc2d8537c1c9ac90d54a Author: Sean Christopherson Date: Tue Apr 6 15:49:51 2021 -0700 crypto: ccp: Use the stack and common buffer for INIT command Drop the dedicated init_cmd_buf and instead use a local variable. Now that the low level helper uses an internal buffer for all commands, using the stack for the upper layers is safe even when running with CONFIG_VMAP_STACK=y. Signed-off-by: Sean Christopherson Message-Id: <20210406224952.4177376-8-seanjc@google.com> Reviewed-by: Brijesh Singh Acked-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 38103671aad38e888743dd26c767869cfc15adca Author: Sean Christopherson Date: Tue Apr 6 15:49:50 2021 -0700 crypto: ccp: Use the stack and common buffer for status commands Drop the dedicated status_cmd_buf and instead use a local variable for PLATFORM_STATUS. Now that the low level helper uses an internal buffer for all commands, using the stack for the upper layers is safe even when running with CONFIG_VMAP_STACK=y. Signed-off-by: Sean Christopherson Message-Id: <20210406224952.4177376-7-seanjc@google.com> Reviewed-by: Brijesh Singh Acked-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit e4a9af799e5539b0feb99571f0aaed5a3c81dc5a Author: Sean Christopherson Date: Tue Apr 6 15:49:49 2021 -0700 crypto: ccp: Use the stack for small SEV command buffers For commands with small input/output buffers, use the local stack to "allocate" the structures used to communicate with the PSP. Now that __sev_do_cmd_locked() gracefully handles vmalloc'd buffers, there's no reason to avoid using the stack, e.g. CONFIG_VMAP_STACK=y will just work. Signed-off-by: Sean Christopherson Message-Id: <20210406224952.4177376-6-seanjc@google.com> Reviewed-by: Brijesh Singh Acked-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 8347b99473a313be6549a5b940bc3c56a71be81c Author: Sean Christopherson Date: Tue Apr 6 15:49:48 2021 -0700 crypto: ccp: Play nice with vmalloc'd memory for SEV command structs Copy the incoming @data comman to an internal buffer so that callers can put SEV command buffers on the stack without running afoul of CONFIG_VMAP_STACK=y, i.e. without bombing on vmalloc'd pointers. As of today, the largest supported command takes a 68 byte buffer, i.e. pretty much every command can be put on the stack. Because sev_cmd_mutex is held for the entirety of a transaction, only a single bounce buffer is required. Use the internal buffer unconditionally, as the majority of in-kernel users will soon switch to using the stack. At that point, checking virt_addr_valid() becomes (negligible) overhead in most cases, and supporting both paths slightly increases complexity. Since the commands are all quite small, the cost of the copies is insignificant compared to the latency of communicating with the PSP. Allocate a full page for the buffer as opportunistic preparation for SEV-SNP, which requires the command buffer to be in firmware state for commands that trigger memory writes from the PSP firmware. Using a full page now will allow SEV-SNP support to simply transition the page as needed. Cc: Brijesh Singh Cc: Borislav Petkov Cc: Tom Lendacky Cc: Christophe Leroy Signed-off-by: Sean Christopherson Message-Id: <20210406224952.4177376-5-seanjc@google.com> Reviewed-by: Brijesh Singh Acked-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit d5760dee127bf6f390b05e747369d7c37ae1a7b8 Author: Sean Christopherson Date: Tue Apr 6 15:49:47 2021 -0700 crypto: ccp: Reject SEV commands with mismatching command buffer WARN on and reject SEV commands that provide a valid data pointer, but do not have a known, non-zero length. And conversely, reject commands that take a command buffer but none is provided (data is null). Aside from sanity checking input, disallowing a non-null pointer without a non-zero size will allow a future patch to cleanly handle vmalloc'd data by copying the data to an internal __pa() friendly buffer. Note, this also effectively prevents callers from using commands that have a non-zero length and are not known to the kernel. This is not an explicit goal, but arguably the side effect is a good thing from the kernel's perspective. Cc: Brijesh Singh Cc: Borislav Petkov Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210406224952.4177376-4-seanjc@google.com> Reviewed-by: Brijesh Singh Acked-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 74c1f1366eb7714b8b211554f6c5cee315ff3fbc Author: Sean Christopherson Date: Tue Apr 6 15:49:46 2021 -0700 crypto: ccp: Detect and reject "invalid" addresses destined for PSP Explicitly reject using pointers that are not virt_to_phys() friendly as the source for SEV commands that are sent to the PSP. The PSP works with physical addresses, and __pa()/virt_to_phys() will not return the correct address in these cases, e.g. for a vmalloc'd pointer. At best, the bogus address will cause the command to fail, and at worst lead to system instability. While it's unlikely that callers will deliberately use a bad pointer for SEV buffers, a caller can easily use a vmalloc'd pointer unknowingly when running with CONFIG_VMAP_STACK=y as it's not obvious that putting the command buffers on the stack would be bad. The command buffers are relative small and easily fit on the stack, and the APIs to do not document that the incoming pointer must be a physically contiguous, __pa() friendly pointer. Cc: Brijesh Singh Cc: Borislav Petkov Cc: Tom Lendacky Cc: Christophe Leroy Fixes: 200664d5237f ("crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support") Signed-off-by: Sean Christopherson Message-Id: <20210406224952.4177376-3-seanjc@google.com> Reviewed-by: Brijesh Singh Acked-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit b61a9071dc72a3c709192c0c00ab87c2b3de1d94 Author: Sean Christopherson Date: Tue Apr 6 15:49:45 2021 -0700 crypto: ccp: Free SEV device if SEV init fails Free the SEV device if later initialization fails. The memory isn't technically leaked as it's tracked in the top-level device's devres list, but unless the top-level device is removed, the memory won't be freed and is effectively leaked. Signed-off-by: Sean Christopherson Message-Id: <20210406224952.4177376-2-seanjc@google.com> Reviewed-by: Brijesh Singh Acked-by: Tom Lendacky Signed-off-by: Paolo Bonzini commit 6a443def87d2698f4fa2d7b57e7f4e5f0f61671a Author: Brijesh Singh Date: Thu Apr 15 15:55:40 2021 +0000 KVM: SVM: Add KVM_SEV_RECEIVE_FINISH command The command finalize the guest receiving process and make the SEV guest ready for the execution. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Steve Rutherford Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-Id: Signed-off-by: Paolo Bonzini commit 15fb7de1a7f5af0d5910ca4352b26f887543e26e Author: Brijesh Singh Date: Thu Apr 15 15:55:17 2021 +0000 KVM: SVM: Add KVM_SEV_RECEIVE_UPDATE_DATA command The command is used for copying the incoming buffer into the SEV guest memory space. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Steve Rutherford Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-Id: Signed-off-by: Paolo Bonzini commit af43cbbf954b50ca97d5e7bb56c2edc6ffd209ef Author: Brijesh Singh Date: Thu Apr 15 15:54:50 2021 +0000 KVM: SVM: Add support for KVM_SEV_RECEIVE_START command The command is used to create the encryption context for an incoming SEV guest. The encryption context can be later used by the hypervisor to import the incoming data into the SEV guest memory space. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Steve Rutherford Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-Id: Signed-off-by: Paolo Bonzini commit 5569e2e7a650dfffd4df7635662b2f92162d6501 Author: Steve Rutherford Date: Tue Apr 20 05:01:20 2021 -0400 KVM: SVM: Add support for KVM_SEV_SEND_CANCEL command After completion of SEND_START, but before SEND_FINISH, the source VMM can issue the SEND_CANCEL command to stop a migration. This is necessary so that a cancelled migration can restart with a new target later. Reviewed-by: Nathan Tempelman Reviewed-by: Brijesh Singh Signed-off-by: Steve Rutherford Message-Id: <20210412194408.2458827-1-srutherford@google.com> Signed-off-by: Paolo Bonzini commit fddecf6a237ee464db7a1771fad6507d8c180c03 Author: Brijesh Singh Date: Thu Apr 15 15:54:15 2021 +0000 KVM: SVM: Add KVM_SEV_SEND_FINISH command The command is used to finailize the encryption context created with KVM_SEV_SEND_START command. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Steve Rutherford Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-Id: <5082bd6a8539d24bc55a1dd63a1b341245bb168f.1618498113.git.ashish.kalra@amd.com> Signed-off-by: Paolo Bonzini commit d3d1af85e2c75bb57da51535a6e182c7c45eceb0 Author: Brijesh Singh Date: Thu Apr 15 15:53:55 2021 +0000 KVM: SVM: Add KVM_SEND_UPDATE_DATA command The command is used for encrypting the guest memory region using the encryption context created with KVM_SEV_SEND_START. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by : Steve Rutherford Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-Id: Signed-off-by: Paolo Bonzini commit 4cfdd47d6d95aca4fb8d6cfbe73392472d353f82 Author: Brijesh Singh Date: Thu Apr 15 15:53:14 2021 +0000 KVM: SVM: Add KVM_SEV SEND_START command The command is used to create an outgoing SEV guest encryption context. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x86@kernel.org Cc: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Steve Rutherford Reviewed-by: Venu Busireddy Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra Message-Id: <2f1686d0164e0f1b3d6a41d620408393e0a48376.1618498113.git.ashish.kalra@amd.com> Signed-off-by: Paolo Bonzini commit 52acd22faa1af8a0514ccd075a6978ac97986425 Author: Wanpeng Li Date: Fri Apr 16 11:08:10 2021 +0800 KVM: Boost vCPU candidate in user mode which is delivering interrupt Both lock holder vCPU and IPI receiver that has halted are condidate for boost. However, the PLE handler was originally designed to deal with the lock holder preemption problem. The Intel PLE occurs when the spinlock waiter is in kernel mode. This assumption doesn't hold for IPI receiver, they can be in either kernel or user mode. the vCPU candidate in user mode will not be boosted even if they should respond to IPIs. Some benchmarks like pbzip2, swaptions etc do the TLB shootdown in kernel mode and most of the time they are running in user mode. It can lead to a large number of continuous PLE events because the IPI sender causes PLE events repeatedly until the receiver is scheduled while the receiver is not candidate for a boost. This patch boosts the vCPU candidiate in user mode which is delivery interrupt. We can observe the speed of pbzip2 improves 10% in 96 vCPUs VM in over-subscribe scenario (The host machine is 2 socket, 48 cores, 96 HTs Intel CLX box). There is no performance regression for other benchmarks like Unixbench spawn (most of the time contend read/write lock in kernel mode), ebizzy (most of the time contend read/write sem and TLB shoodtdown in kernel mode). Signed-off-by: Wanpeng Li Message-Id: <1618542490-14756-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit c265878fcb2c96befe7424e984011ed0ce6d095d Author: Paolo Bonzini Date: Tue Apr 20 04:57:06 2021 -0400 KVM: x86: document behavior of measurement ioctls with len==0 Signed-off-by: Paolo Bonzini commit bf1e15a82e3b74ee86bb119d6038b41e1ed2b319 Author: Paolo Bonzini Date: Tue Apr 20 04:13:03 2021 -0400 KVM: selftests: Always run vCPU thread with blocked SIG_IPI The main thread could start to send SIG_IPI at any time, even before signal blocked on vcpu thread. Therefore, start the vcpu thread with the signal blocked. Without this patch, on very busy cores the dirty_log_test could fail directly on receiving a SIGUSR1 without a handler (when vcpu runs far slower than main). Reported-by: Peter Xu Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 016ff1a442d9a8f36dcb3beca0bcdfc35e281e18 Author: Peter Xu Date: Sat Apr 17 10:36:01 2021 -0400 KVM: selftests: Sync data verify of dirty logging with guest sync This fixes a bug that can trigger with e.g. "taskset -c 0 ./dirty_log_test" or when the testing host is very busy. A similar previous attempt is done [1] but that is not enough, the reason is stated in the reply [2]. As a summary (partly quotting from [2]): The problem is I think one guest memory write operation (of this specific test) contains a few micro-steps when page is during kvm dirty tracking (here I'm only considering write-protect rather than pml but pml should be similar at least when the log buffer is full): (1) Guest read 'iteration' number into register, prepare to write, page fault (2) Set dirty bit in either dirty bitmap or dirty ring (3) Return to guest, data written When we verify the data, we assumed that all these steps are "atomic", say, when (1) happened for this page, we assume (2) & (3) must have happened. We had some trick to workaround "un-atomicity" of above three steps, as previous version of this patch wanted to fix atomicity of step (2)+(3) by explicitly letting the main thread wait for at least one vmenter of vcpu thread, which should work. However what I overlooked is probably that we still have race when (1) and (2) can be interrupted. One example calltrace when it could happen that we read an old interation, got interrupted before even setting the dirty bit and flushing data: __schedule+1742 __cond_resched+52 __get_user_pages+530 get_user_pages_unlocked+197 hva_to_pfn+206 try_async_pf+132 direct_page_fault+320 kvm_mmu_page_fault+103 vmx_handle_exit+288 vcpu_enter_guest+2460 kvm_arch_vcpu_ioctl_run+325 kvm_vcpu_ioctl+526 __x64_sys_ioctl+131 do_syscall_64+51 entry_SYSCALL_64_after_hwframe+68 It means iteration number cached in vcpu register can be very old when dirty bit set and data flushed. So far I don't see an easy way to guarantee all steps 1-3 atomicity but to sync at the GUEST_SYNC() point of guest code when we do verification of the dirty bits as what this patch does. [1] https://lore.kernel.org/lkml/20210413213641.23742-1-peterx@redhat.com/ [2] https://lore.kernel.org/lkml/20210417140956.GV4440@xz-x1/ Cc: Paolo Bonzini Cc: Sean Christopherson Cc: Andrew Jones Cc: stable@vger.kernel.org Signed-off-by: Peter Xu Message-Id: <20210417143602.215059-2-peterx@redhat.com> Signed-off-by: Paolo Bonzini commit 54526d1fd59338fd6a381dbd806b7ccbae3aa4aa Author: Nathan Tempelman Date: Thu Apr 8 22:32:14 2021 +0000 KVM: x86: Support KVM VMs sharing SEV context Add a capability for userspace to mirror SEV encryption context from one vm to another. On our side, this is intended to support a Migration Helper vCPU, but it can also be used generically to support other in-guest workloads scheduled by the host. The intention is for the primary guest and the mirror to have nearly identical memslots. The primary benefits of this are that: 1) The VMs do not share KVM contexts (think APIC/MSRs/etc), so they can't accidentally clobber each other. 2) The VMs can have different memory-views, which is necessary for post-copy migration (the migration vCPUs on the target need to read and write to pages, when the primary guest would VMEXIT). This does not change the threat model for AMD SEV. Any memory involved is still owned by the primary guest and its initial state is still attested to through the normal SEV_LAUNCH_* flows. If userspace wanted to circumvent SEV, they could achieve the same effect by simply attaching a vCPU to the primary VM. This patch deliberately leaves userspace in charge of the memslots for the mirror, as it already has the power to mess with them in the primary guest. This patch does not support SEV-ES (much less SNP), as it does not handle handing off attested VMSAs to the mirror. For additional context, we need a Migration Helper because SEV PSP migration is far too slow for our live migration on its own. Using an in-guest migrator lets us speed this up significantly. Signed-off-by: Nathan Tempelman Message-Id: <20210408223214.2582277-1-natet@google.com> Signed-off-by: Paolo Bonzini commit ee695f22b54a4b79753fdaa78cbbff1064050d13 Author: Krish Sadhukhan Date: Mon Apr 12 17:56:08 2021 -0400 nSVM: Check addresses of MSR and IO permission maps According to section "Canonicalization and Consistency Checks" in APM vol 2, the following guest state is illegal: "The MSR or IOIO intercept tables extend to a physical address that is greater than or equal to the maximum supported physical address." Suggested-by: Paolo Bonzini Signed-off-by: Krish Sadhukhan Message-Id: <20210412215611.110095-5-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit c968b89a1d446ec4a1ed3022ebd79d36de5ea1eb Author: Randy Dunlap Date: Fri Apr 16 23:12:44 2021 -0700 of: linux/of.h: fix kernel-doc warnings Correct kernel-doc notation warnings: ../include/linux/of.h:1211: warning: Function parameter or member 'output' not described in 'of_property_read_string_index' ../include/linux/of.h:1211: warning: Excess function parameter 'out_string' description in 'of_property_read_string_index' ../include/linux/of.h:1477: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Overlay support Signed-off-by: Randy Dunlap Cc: Greg Kroah-Hartman Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210417061244.2262-1-rdunlap@infradead.org commit b777f4c47781df6b23e3f4df6fdb92d9aceac7bb Author: Dan Carpenter Date: Wed Apr 21 13:19:45 2021 +0300 ataflop: fix off by one in ataflop_probe() Smatch complains that the "type > NUM_DISK_MINORS" should be >= instead of >. We also need to subtract one from "type" at the start. Fixes: bf9c0538e485 ("ataflop: use a separate gendisk for each media format") Reported-by: kernel test robot Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 1ffec389a6431782a8a28805830b6fae9bf00af1 Author: Dan Carpenter Date: Wed Apr 21 13:18:35 2021 +0300 ataflop: potential out of bounds in do_format() The function uses "type" as an array index: q = unit[drive].disk[type]->queue; Unfortunately the bounds check on "type" isn't done until later in the function. Fix this by moving the bounds check to the start. Fixes: bf9c0538e485 ("ataflop: use a separate gendisk for each media format") Reported-by: kernel test robot Signed-off-by: Dan Carpenter Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 24b5515aa3ac075880be776bf36553ff7f9712c7 Author: Christophe JAILLET Date: Tue Apr 20 21:46:13 2021 +0200 spi: fsi: add a missing of_node_put 'for_each_available_child_of_node' performs an of_node_get on each iteration, so a return from the middle of the loop requires an of_node_put. Fixes: bbb6b2f9865b ("spi: Add FSI-attached SPI controller driver") Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/504e431b900341249d331b868d90312cf41f415a.1618947919.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 31ed8ebc7a27c1937184b956727bf71d4adc7df3 Author: Andy Shevchenko Date: Tue Apr 20 19:40:40 2021 +0300 spi: Make error handling of gpiod_count() call cleaner Each time we call spi_get_gpio_descs() the num_chipselect is overwritten either by new value or by the old one. This is an extra operation in case gpiod_count() returns an error. Besides that it slashes the error handling of gpiod_count(). Refactor the code to make error handling of gpiod_count() call cleaner. Note, that gpiod_count() never returns 0, take this into account as well. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210420164040.40055-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 72241e3190f2be668d60493cf0343ec535357b5e Author: Sebastian Fricke Date: Wed Apr 21 05:52:37 2021 +0000 regulator: core.c: Improve a comment s/regulator may on/regulator may already be enabled/ s/or left on/or was left on/ The aim of this patch is to make the comment more readable and to make it clear, that this is about a regulator, that is already enabled instead of a regulator that may be switched on. Signed-off-by: Sebastian Fricke Link: https://lore.kernel.org/r/20210421055236.13148-1-sebastian.fricke@posteo.net Signed-off-by: Mark Brown commit 8a065ce92b218e453742b745162d75a6f86fb768 Author: Christophe JAILLET Date: Tue Apr 20 21:31:51 2021 +0200 regulator: Avoid a double 'of_node_get' in 'regulator_of_get_init_node()' 'for_each_available_child_of_node()' already performs an 'of_node_get()' on child, so there is no need to perform another one before returning. Otherwise, a double 'get' is performed and a resource may never be released. Fixes: 925c85e21ed8 ("regulator: Factor out location of init data OF node") Signed-off-by: Christophe JAILLET Acked-by: Charles Keepax Link: https://lore.kernel.org/r/a79f0068812b89ff412d572a1171f22109c24132.1618947049.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 69b8821e293aa823ba8184c80370e7e21bde81e6 Author: Shubhankar Kuranagatti Date: Tue Apr 20 09:17:18 2021 +0530 regulator: core.c: Fix indentation of comment Shifted the closing */ of multiline comment to a new line This is done to maintain code uniformity Signed-off-by: Shubhankar Kuranagatti Link: https://lore.kernel.org/r/20210420034718.t7wudu6xcfpahflv@kewl-virtual-machine Signed-off-by: Mark Brown commit beeab9bc8e85de6cacbbb2124a464166f2f5043d Author: Krzysztof Kozlowski Date: Tue Apr 20 19:02:44 2021 +0200 regulator: s2mps11: Drop initialization via platform data None of the platforms with S2MPS11 use board files, so any initialization via platform data can be safely removed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420170244.13467-5-krzysztof.kozlowski@canonical.com Signed-off-by: Mark Brown commit 378b40ae1a8639f03192711573e478a367ccb6e1 Author: Krzysztof Kozlowski Date: Tue Apr 20 19:02:43 2021 +0200 regulator: s2mpa01: Drop initialization via platform data None of the platforms with S2MPA01 use board files, so any initialization via platform data can be safely removed. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210420170244.13467-4-krzysztof.kozlowski@canonical.com Signed-off-by: Mark Brown commit 73371bacf0475a20ab6f3e7b6310e378ec5b3023 Author: Kuninori Morimoto Date: Wed Apr 21 14:45:56 2021 +0900 ASoC: audio-graph: tidyup graph_dai_link_of_dpcm() Use local variable at local area only. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6psi417.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 434392271afcff350fe11730f12b831fffaf33eb Author: Kuninori Morimoto Date: Wed Apr 21 14:45:52 2021 +0900 ASoC: simple-card: add simple_link_init() This patch adds simple_link_init() and share dai_link setting code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87bla8i41b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 59c35c44a9cf89a83a92a8d26749e59497d0317d Author: Kuninori Morimoto Date: Wed Apr 21 14:45:48 2021 +0900 ASoC: simple-card: add simple_parse_node() Parse dai/tdm/clk are common for both CPU/Codec node. This patch creates simple_parse_node() for it and share the code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87czuoi41f.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e51237b8d3052251421770468903fa6e4446d158 Author: Kuninori Morimoto Date: Wed Apr 21 14:45:43 2021 +0900 ASoC: audio-graph: add graph_link_init() This patch adds graph_link_init() and share dai_link setting code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eef4i41k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8859f809c7d5813c28ab90f5335f182e634d77af Author: Kuninori Morimoto Date: Wed Apr 21 14:45:21 2021 +0900 ASoC: audio-graph: add graph_parse_node() Parse mclk_fs/dai/tdm/clk are common for both CPU/Codec node. This patch creates graph_parse_node() for it and share the code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fszki426.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 013592be146a10d3567c0062cd1416faab060704 Author: Adam Ward Date: Wed Apr 21 12:03:06 2021 +0000 regulator: da9121: automotive variants identity fix This patch fixes identification of DA913x parts by the DA9121 driver, where a lack of clarity lead to implementation on the basis that variant IDs were to be identical to the equivalent rated non-automotive parts. There is a new emphasis on the DT identity to cope with overlap in these ID's - this is not considered to be problematic, because projects would be exclusively using automotive or consumer grade parts. Signed-off-by: Adam Ward Link: https://lore.kernel.org/r/20210421120306.DB5B880007F@slsrvapps-01.diasemi.com Signed-off-by: Mark Brown commit 62bad12bceebd7d336ced4e44f408b702c151ba0 Author: Sia Jee Heng Date: Wed Apr 21 08:55:46 2021 +0800 ASoC: Intel: KMB: Fix random noise at the HDMI output Random noise could be heard when playing audio to the HDMI output. This is due to the IEC conversion is invoked in the external loop. As a result, this additional loop takes up a lot of the processing cycle. hdmi_reformat_iec958() process the conversion using an internal loop, it is safe to move it out from the external loop to avoid unnecessary processing cycle been spent. Furthermore, ALSA IEC958 plugin works in 32bit format only. Signed-off-by: Sia Jee Heng Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210421005546.7534-1-jee.heng.sia@intel.com Signed-off-by: Mark Brown commit 1300c7037f0f08692008053e4b12a2fb6fbd185a Author: Vijendar Mukunda Date: Wed Apr 21 13:53:11 2021 +0530 ASoC: amd: drop S24_LE format support AMD I2S Controller doesn't support S24_LE format. Remove S24_LE format support from ACP DMA driver and CPU DAI Driver. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1618993402-10354-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit a3cc754ad9b80491e2db5ae6a5a956490654abb9 Author: Tian Tao Date: Tue Apr 13 09:43:16 2021 +0800 fs/reiserfs/journal.c: delete useless variables The value of 'cn' is not used, so just delete it. Link: https://lore.kernel.org/r/1618278196-17749-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Tian Tao Signed-off-by: Jan Kara commit 182dd5bad52c66a54c300fe320b772456572bf23 Author: Maciej W. Rozycki Date: Wed Apr 21 15:25:22 2021 +0200 lib/math/test_div64: Fix error message formatting Align the expected result with one actually produced for easier visual comparison; this has to take into account what the format specifiers will actually produce rather than the characters they consist of. E.g.: test_div64: ERROR: 10000000ab275080 / 00000009 => 01c71c71da20d00e,00000002 test_div64: ERROR: expected value => 0000000013045e47,00000001 (with a failure induced by setting bit #60 of the divident). Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit f75bf693c919438cbe44717d63aa11856a062b9a Author: Arnd Bergmann Date: Wed Apr 21 15:49:39 2021 +0200 platform/x86: intel_pmc_core: add ACPI dependency The driver now fails to build without ACPI: drivers/platform/x86/intel_pmc_core.c: In function 'pmc_core_get_tgl_lpm_reqs': drivers/platform/x86/intel_pmc_core.c:617:41: error: invalid use of undefined type 'struct acpi_device' 617 | out_obj = acpi_evaluate_dsm(adev->handle, &s0ix_dsm_guid, 0, This could probably be made optional, but it won't be used without ACPI in practice, so just add a Kconfig dependency. Fixes: 428131364f00 ("platform/x86: intel_pmc_core: Get LPM requirements for Tiger Lake") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210421134957.3329062-1-arnd@kernel.org Signed-off-by: Hans de Goede commit a4394b6d0a273941a75ebe86a86d6416d536ed0f Author: Felix Kuehling Date: Wed Apr 14 02:48:03 2021 -0400 drm/ttm: Don't count pages in SG BOs against pages_limit Pages in SG BOs were not allocated by TTM. So don't count them against TTM's pages limit. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210414064804.29356-9-Felix.Kuehling@amd.com commit 8a9d24f222ea1b1c20dffbc62bff736f3f94b768 Author: Christian König Date: Fri Apr 9 14:58:43 2021 +0200 drm/ttm: fix return value check The function returns the number of swapped pages here. Only abort when we get a negative error code. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210409130113.1459-1-christian.koenig@amd.com commit 39352430aaa05fbe4ba710231c70b334513078f2 Author: Christophe Leroy Date: Wed Apr 14 13:08:43 2021 +0000 powerpc: Move copy_inst_from_kernel_nofault() When probe_kernel_read_inst() was created, there was no good place to put it, so a file called lib/inst.c was dedicated for it. Since then, probe_kernel_read_inst() has been renamed copy_inst_from_kernel_nofault(). And mm/maccess.h didn't exist at that time. Today, mm/maccess.h is related to copy_from_kernel_nofault(). Move copy_inst_from_kernel_nofault() into mm/maccess.c Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9655d8957313906b77b8db5700a0e33ce06f45e5.1618405715.git.christophe.leroy@csgroup.eu commit 41d6cf68b5f611934bcc6a7d4a1a2d9bfd04b420 Author: Christophe Leroy Date: Wed Apr 14 13:08:42 2021 +0000 powerpc: Rename probe_kernel_read_inst() When probe_kernel_read_inst() was created, it was to mimic probe_kernel_read() function. Since then, probe_kernel_read() has been renamed copy_from_kernel_nofault(). Rename probe_kernel_read_inst() into copy_inst_from_kernel_nofault(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b783d1f7cdb8914992384a669a2af57051b6bdcf.1618405715.git.christophe.leroy@csgroup.eu commit 6449078d50111c839bb7156c3b99b9def80eed42 Author: Christophe Leroy Date: Wed Apr 14 13:08:41 2021 +0000 powerpc: Make probe_kernel_read_inst() common to PPC32 and PPC64 We have two independant versions of probe_kernel_read_inst(), one for PPC32 and one for PPC64. The PPC32 is identical to the first part of the PPC64 version. The remaining part of PPC64 version is not relevant for PPC32, but not contradictory, so we can easily have a common function with the PPC64 part opted out via a IS_ENABLED(CONFIG_PPC64). The only need is to add a version of ppc_inst_prefix() for PPC32. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f7b9dfddef3b3760182c7e5466356c121a293dc9.1618405715.git.christophe.leroy@csgroup.eu commit 6ac7897f08e04b47df3955d7691652e9d12d4068 Author: Christophe Leroy Date: Wed Apr 14 13:08:40 2021 +0000 powerpc: Remove probe_user_read_inst() Its name comes from former probe_user_read() function. That function is now called copy_from_user_nofault(). probe_user_read_inst() uses copy_from_user_nofault() to read only a few bytes. It is suboptimal. It does the same as get_user_inst() but in addition disables page faults. But on the other hand, it is not used for the time being. So remove it for now. If one day it is really needed, we can give it a new name more in line with today's naming, and implement it using get_user_inst() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5f6f82572242a59bfee1e19a71194d8f7ef5fca4.1618405715.git.christophe.leroy@csgroup.eu commit ee7c3ec3b4b1222b30272624897826bc40d79bc5 Author: Christophe Leroy Date: Mon Apr 12 11:44:18 2021 +0000 powerpc/ebpf32: Use standard function call for functions within 32M distance If the target of a function call is within 32 Mbytes distance, use a standard function call with 'bl' instead of the 'lis/ori/mtlr/blrl' sequence. In the first pass, no memory has been allocated yet and the code position is not known yet (image pointer is NULL). This pass is there to calculate the amount of memory to allocate for the EBPF code, so assume the 4 instructions sequence is required, so that enough memory is allocated. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/74944a1e3e5cfecc141e440a6ccd37920e186b70.1618227846.git.christophe.leroy@csgroup.eu commit e7de0023e1232f42a10ef6af03352538cc27eaf6 Author: Christophe Leroy Date: Mon Apr 12 11:44:17 2021 +0000 powerpc/ebpf32: Rework 64 bits shifts to avoid tests and branches Re-implement BPF_ALU64 | BPF_{LSH/RSH/ARSH} | BPF_X with branchless implementation copied from misc_32.S. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/03167350b05b2fe8b741e53363ee37709d0f878d.1618227846.git.christophe.leroy@csgroup.eu commit d228cc4969663623e6b5a749b02e4619352a0a8d Author: Christophe Leroy Date: Mon Apr 12 11:44:16 2021 +0000 powerpc/ebpf32: Fix comment on BPF_ALU{64} | BPF_LSH | BPF_K Replace <<== by <<= Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/34d12a4f75cb8b53a925fada5e7ddddd3b145203.1618227846.git.christophe.leroy@csgroup.eu commit 867e762480f4ad4106b16299a373fa23eccf5b4b Author: Christophe Leroy Date: Fri Jan 22 07:15:03 2021 +0000 powerpc/32: Use r2 in wrtspr() instead of r0 wrtspr() is a function to write an arbitrary value in a special register. It is used on 8xx to write to SPRN_NRI, SPRN_EID and SPRN_EIE. Writing any value to one of those will play with MSR EE and MSR RI regardless of that value. r0 is used many places in the generated code and using r0 for that creates an unnecessary dependency of this instruction with preceding ones using r0 in a few places in vmlinux. r2 is most likely the most stable register as it contains the pointer to 'current'. Using r2 instead of r0 avoids that unnecessary dependency. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/69f9968f4b592fefda55227f0f7430ea612cc950.1611299687.git.christophe.leroy@csgroup.eu commit f56607e85ee38f2a5bb7096e24e2d40f35d714f9 Author: Christophe Leroy Date: Wed Mar 31 13:59:17 2021 +0000 selftests/timens: Fix gettime_perf to work on powerpc On powerpc: - VDSO library is named linux-vdso32.so.1 or linux-vdso64.so.1 - clock_gettime is named __kernel_clock_gettime() Ensure gettime_perf tries these names before giving up. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/469f37ab91984309eb68c0fb47e8438cdf5b6463.1617198956.git.christophe.leroy@csgroup.eu commit 92d9d61be519f32f16c07602db5bcbe30a0836fe Author: Ganesh Goudar Date: Wed Apr 7 10:28:16 2021 +0530 powerpc/mce: save ignore_event flag unconditionally for UE When we hit an UE while using machine check safe copy routines, ignore_event flag is set and the event is ignored by mce handler, And the flag is also saved for defered handling and printing of mce event information, But as of now saving of this flag is done on checking if the effective address is provided or physical address is calculated, which is not right. Save ignore_event flag regardless of whether the effective address is provided or physical address is calculated. Without this change following log is seen, when the event is to be ignored. [ 512.971365] MCE: CPU1: machine check (Severe) UE Load/Store [Recovered] [ 512.971509] MCE: CPU1: NIP: [c0000000000b67c0] memcpy+0x40/0x90 [ 512.971655] MCE: CPU1: Initiator CPU [ 512.971739] MCE: CPU1: Unknown [ 512.972209] MCE: CPU1: machine check (Severe) UE Load/Store [Recovered] [ 512.972334] MCE: CPU1: NIP: [c0000000000b6808] memcpy+0x88/0x90 [ 512.972456] MCE: CPU1: Initiator CPU [ 512.972534] MCE: CPU1: Unknown Signed-off-by: Ganesh Goudar Reviewed-by: Santosh Sivaraj Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210407045816.352276-1-ganeshgr@linux.ibm.com commit eacf4c0202654adfa94bbb17b5c5c77c0be14af8 Author: Christophe Leroy Date: Tue Apr 20 14:02:07 2021 +0000 powerpc: Enable OPTPROBES on PPC32 For that, create a 32 bits version of patch_imm64_load_insns() and create a patch_imm_load_insns() which calls patch_imm32_load_insns() on PPC32 and patch_imm64_load_insns() on PPC64. Adapt optprobes_head.S for PPC32. Use PPC_LL/PPC_STL macros instead of raw ld/std, opt out things linked to paca and use stmw/lmw to save/restore registers. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bad58c66859b2a475c0ad516b53164ae3b4853cd.1618927318.git.christophe.leroy@csgroup.eu commit 693557ebf407a85ea400a0b501bb97687d8f4856 Author: Christophe Leroy Date: Tue Apr 20 14:02:06 2021 +0000 powerpc/inst: ppc_inst_as_u64() becomes ppc_inst_as_ulong() In order to simplify use on PPC32, change ppc_inst_as_u64() into ppc_inst_as_ulong() that returns the 32 bits instruction on PPC32. Will be used when porting OPTPROBES to PPC32. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/22cadf29620664b600b82026d2a72b8b23351777.1618927318.git.christophe.leroy@csgroup.eu commit e522331173ec9af563461e0fae534e83ce39e8e3 Author: Christophe Leroy Date: Mon Apr 19 15:48:11 2021 +0000 powerpc/irq: Enhance readability of trap types This patch makes use of trap types in irq.c Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f7f8c9f98c33eaea316755c7fef150d1d77e047d.1618847273.git.christophe.leroy@csgroup.eu commit 7fab639729ce4a0ecb3c528cd68b0c0598696ef9 Author: Christophe Leroy Date: Mon Apr 19 15:48:10 2021 +0000 powerpc/32s: Enhance readability of trap types This patch makes use of trap types in head_book3s_32.S Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bd80ace67757f489fc4ecdb76dd1a71511daba94.1618847273.git.christophe.leroy@csgroup.eu commit 0f5eb28a6ce6ab0882010e6727bfd6e8cd569273 Author: Christophe Leroy Date: Mon Apr 19 15:48:09 2021 +0000 powerpc/8xx: Enhance readability of trap types This patch makes use of trap types in head_8xx.S Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e1147287bf6f2fb0693048fe8db0298c7870e419.1618847273.git.christophe.leroy@csgroup.eu commit a9d2f9bb225fd2a764aef57738ab6c7f38d782ae Author: Leonardo Bras Date: Tue Apr 20 01:54:04 2021 -0300 powerpc/pseries/iommu: Fix window size for direct mapping with pmem As of today, if the DDW is big enough to fit (1 << MAX_PHYSMEM_BITS) it's possible to use direct DMA mapping even with pmem region. But, if that happens, the window size (len) is set to (MAX_PHYSMEM_BITS - page_shift) instead of MAX_PHYSMEM_BITS, causing a pagesize times smaller DDW to be created, being insufficient for correct usage. Fix this so the correct window size is used in this case. Fixes: bf6e2d562bbc4 ("powerpc/dma: Fallback to dma_ops when persistent memory present") Signed-off-by: Leonardo Bras Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210420045404.438735-1-leobras.c@gmail.com commit 9d57e61bf72336e13e4cd3c31e93ab26266296a8 Author: Leonardo Bras Date: Thu Apr 15 15:00:51 2021 -0300 of/pci: Add IORESOURCE_MEM_64 to resource flags for 64-bit memory addresses Many other resource flag parsers already add this flag when the input has bits 24 & 25 set, so update this one to do the same. Some devices (like virtio-net) have more than one memory resource (like MMIO32 and MMIO64) and without this flag it would be needed to verify the address range to know which one is which. Signed-off-by: Leonardo Bras Link: https://lore.kernel.org/r/20210415180050.373791-1-leobras.c@gmail.com Signed-off-by: Rob Herring commit 2ea46c6fc9452ac100ad907b051d797225847e33 Author: Peter Zijlstra Date: Tue Apr 20 20:04:19 2021 +0200 cpumask/hotplug: Fix cpu_dying() state tracking Vincent reported that for states with a NULL startup/teardown function we do not call cpuhp_invoke_callback() (because there is none) and as such we'll not update the cpu_dying() state. The stale cpu_dying() can eventually lead to triggering BUG(). Rectify this by updating cpu_dying() in the exact same places the hotplug machinery tracks its directional state, namely cpuhp_set_state() and cpuhp_reset_state(). Reported-by: Vincent Donnefort Suggested-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Donnefort Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/YH7r+AoQEReSvxBI@hirez.programming.kicks-ass.net commit 3a7956e25e1d7b3c148569e78895e1f3178122a9 Author: Peter Zijlstra Date: Tue Apr 20 10:18:17 2021 +0200 kthread: Fix PF_KTHREAD vs to_kthread() race The kthread_is_per_cpu() construct relies on only being called on PF_KTHREAD tasks (per the WARN in to_kthread). This gives rise to the following usage pattern: if ((p->flags & PF_KTHREAD) && kthread_is_per_cpu(p)) However, as reported by syzcaller, this is broken. The scenario is: CPU0 CPU1 (running p) (p->flags & PF_KTHREAD) // true begin_new_exec() me->flags &= ~(PF_KTHREAD|...); kthread_is_per_cpu(p) to_kthread(p) WARN(!(p->flags & PF_KTHREAD) <-- *SPLAT* Introduce __to_kthread() that omits the WARN and is sure to check both values. Use this to remove the problematic pattern for kthread_is_per_cpu() and fix a number of other kthread_*() functions that have similar issues but are currently not used in ways that would expose the problem. Notably kthread_func() is only ever called on 'current', while kthread_probe_data() is only used for PF_WQ_WORKER, which implies the task is from kthread_create*(). Fixes: ac687e6e8c26 ("kthread: Extract KTHREAD_IS_PER_CPU") Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/YH6WJc825C4P0FCK@hirez.programming.kicks-ass.net commit ad789f84c9a145f8a18744c0387cec22ec51651e Author: Waiman Long Date: Thu Apr 15 15:54:26 2021 -0400 sched/debug: Fix cgroup_path[] serialization The handling of sysrq key can be activated by echoing the key to /proc/sysrq-trigger or via the magic key sequence typed into a terminal that is connected to the system in some way (serial, USB or other mean). In the former case, the handling is done in a user context. In the latter case, it is likely to be in an interrupt context. Currently in print_cpu() of kernel/sched/debug.c, sched_debug_lock is taken with interrupt disabled for the whole duration of the calls to print_*_stats() and print_rq() which could last for the quite some time if the information dump happens on the serial console. If the system has many cpus and the sched_debug_lock is somehow busy (e.g. parallel sysrq-t), the system may hit a hard lockup panic depending on the actually serial console implementation of the system. The purpose of sched_debug_lock is to serialize the use of the global cgroup_path[] buffer in print_cpu(). The rests of the printk calls don't need serialization from sched_debug_lock. Calling printk() with interrupt disabled can still be problematic if multiple instances are running. Allocating a stack buffer of PATH_MAX bytes is not feasible because of the limited size of the kernel stack. The solution implemented in this patch is to allow only one caller at a time to use the full size group_path[], while other simultaneous callers will have to use shorter stack buffers with the possibility of path name truncation. A "..." suffix will be printed if truncation may have happened. The cgroup path name is provided for informational purpose only, so occasional path name truncation should not be a big problem. Fixes: efe25c2c7b3a ("sched: Reinstate group names in /proc/sched_debug") Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210415195426.6677-1-longman@redhat.com commit 9d10a13d1e4c349b76f1c675a874a7f981d6d3b4 Author: Charan Teja Reddy Date: Fri Apr 16 20:32:16 2021 +0530 sched,psi: Handle potential task count underflow bugs more gracefully psi_group_cpu->tasks, represented by the unsigned int, stores the number of tasks that could be stalled on a psi resource(io/mem/cpu). Decrementing these counters at zero leads to wrapping which further leads to the psi_group_cpu->state_mask is being set with the respective pressure state. This could result into the unnecessary time sampling for the pressure state thus cause the spurious psi events. This can further lead to wrong actions being taken at the user land based on these psi events. Though psi_bug is set under these conditions but that just for debug purpose. Fix it by decrementing the ->tasks count only when it is non-zero. Signed-off-by: Charan Teja Reddy Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/1618585336-37219-1-git-send-email-charante@codeaurora.org commit c006fac556e401a62054d065da168099ea5a5b10 Author: Paul Turner Date: Fri Apr 16 14:29:36 2021 -0700 sched: Warn on long periods of pending need_resched CPU scheduler marks need_resched flag to signal a schedule() on a particular CPU. But, schedule() may not happen immediately in cases where the current task is executing in the kernel mode (no preemption state) for extended periods of time. This patch adds a warn_on if need_resched is pending for more than the time specified in sysctl resched_latency_warn_ms. If it goes off, it is likely that there is a missing cond_resched() somewhere. Monitoring is done via the tick and the accuracy is hence limited to jiffy scale. This also means that we won't trigger the warning if the tick is disabled. This feature (LATENCY_WARN) is default disabled. Signed-off-by: Paul Turner Signed-off-by: Josh Don Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210416212936.390566-1-joshdon@google.com commit d99f2487e1de23a2e902d1a359a85a48bfd21fe7 Author: Trond Myklebust Date: Wed Apr 21 07:48:43 2021 -0400 NFS: The 'fattr_valid' field in struct nfs_server should be unsigned int Fix up a static compiler warning: "fs/nfs/nfs4proc.c:3882 _nfs4_server_capabilities() warn: was expecting a 64 bit value instead of '(1 << 11)'" The fix is to convert the fattr_valid field to match the type of the 'valid' field in struct nfs_fattr. Reported-by: Dan Carpenter Signed-off-by: Trond Myklebust commit 6f3377bc383b29ee380657b9b4da47e20f8fa6f1 Author: xiaochuan mao Date: Wed Apr 21 14:19:17 2021 +0800 mips/bootinfo:correct some comments of fw_arg from arch/mips/kernel/head.S we know that use a0~a3 for fw_arg0~fw_arg3 there is some code from head.S: LONG_S a0, fw_arg0 # firmware arguments LONG_S a1, fw_arg1 LONG_S a2, fw_arg2 LONG_S a3, fw_arg3 Signed-off-by: xiaochuan mao Signed-off-by: Thomas Bogendoerfer commit c1d337d45ec0a802299688e17d568c4e3a585895 Author: Maciej W. Rozycki Date: Tue Apr 20 04:50:48 2021 +0200 MIPS: Avoid DIVU in `__div64_32' is result would be zero We already check the high part of the divident against zero to avoid the costly DIVU instruction in that case, needed to reduce the high part of the divident, so we may well check against the divisor instead and set the high part of the quotient to zero right away. We need to treat the high part the divident in that case though as the remainder that would be calculated by the DIVU instruction we avoided. This has passed correctness verification with test_div64 and reduced the module's average execution time down to 1.0445s and 0.2619s from 1.0668s and 0.2629s respectively for an R3400 CPU @40MHz and a 5Kc CPU @160MHz. Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit c49f71f60754acbff37505e1d16ca796bf8a8140 Author: Maciej W. Rozycki Date: Tue Apr 20 04:50:40 2021 +0200 MIPS: Reinstate platform `__div64_32' handler Our current MIPS platform `__div64_32' handler is inactive, because it is incorrectly only enabled for 64-bit configurations, for which generic `do_div' code does not call it anyway. The handler is not suitable for being called from there though as it only calculates 32 bits of the quotient under the assumption the 64-bit divident has been suitably reduced. Code for such reduction used to be there, however it has been incorrectly removed with commit c21004cd5b4c ("MIPS: Rewrite to work with gcc 4.4.0."), which should have only updated an obsoleted constraint for an inline asm involving $hi and $lo register outputs, while possibly wiring the original MIPS variant of the `do_div' macro as `__div64_32' handler for the generic `do_div' implementation Correct the handler as follows then: - Revert most of the commit referred, however retaining the current formatting, except for the final two instructions of the inline asm sequence, which the original commit missed. Omit the original 64-bit parts though. - Rename the original `do_div' macro to `__div64_32'. Use the combined `x' constraint referring to the MD accumulator as a whole, replacing the original individual `h' and `l' constraints used for $hi and $lo registers respectively, of which `h' has been obsoleted with GCC 4.4. Update surrounding code accordingly. We have since removed support for GCC versions before 4.9, so no need for a special arrangement here; GCC has supported the `x' constraint since forever anyway, or at least going back to 1991. - Rename the `__base' local variable in `__div64_32' to `__radix' to avoid a conflict with a local variable in `do_div'. - Actually enable this code for 32-bit rather than 64-bit configurations by qualifying it with BITS_PER_LONG being 32 instead of 64. Include for this macro rather than as we don't need anything else. - Finally include last rather than first. This has passed correctness verification with test_div64 and reduced the module's average execution time down to 1.0668s and 0.2629s from 2.1529s and 0.5647s respectively for an R3400 CPU @40MHz and a 5Kc CPU @160MHz. For a reference 64-bit `do_div' code where we have the DDIVU instruction available to do the whole calculation right away averages at 0.0660s for the latter CPU. Fixes: c21004cd5b4c ("MIPS: Rewrite to work with gcc 4.4.0.") Reported-by: Huacai Chen Signed-off-by: Maciej W. Rozycki Cc: stable@vger.kernel.org # v2.6.30+ Signed-off-by: Thomas Bogendoerfer commit f2875832387a25efe7c3be3c5153f3a00e313906 Author: Maciej W. Rozycki Date: Tue Apr 20 04:50:33 2021 +0200 div64: Correct inline documentation for `do_div' Correct inline documentation for `do_div', which is a function-like macro the `n' parameter of which has the semantics of a C++ reference: it is both read and written in the context of the caller without an explicit dereference such as with a pointer. In the C programming language it has no equivalent for proper functions, in terms of which the documentation expresses the semantics of `do_div', but substituting a pointer in documentation is misleading, and using the C++ notation should at least raise the reader's attention and encourage to seek explanation even if the C++ semantics is not readily understood. While at it observe that "semantics" is an uncountable noun, so refer to it with a singular rather than plural verb. Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit 5086ea4b0f58ba72c19553c4a657d7b2c0d8efc2 Author: Maciej W. Rozycki Date: Tue Apr 20 04:50:28 2021 +0200 lib/math: Add a `do_div' test module Implement a module for correctness and performance evaluation for the `do_div' function, often handled in an optimised manner by platform code. Use a somewhat randomly generated set of inputs that is supposed to be representative, using the same set of divisors twice, expressed as a constant and as a variable each, so as to verify the implementation for both cases should they be handled by different code execution paths. Reference results were produced with GNU bc. At the conclusion output the total execution time elapsed. Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit 1b6bc35a01bd6b874165379255929b7badfdecb5 Author: zhaoxiao Date: Tue Apr 20 15:00:52 2021 +0800 MIPS: Makefile: Replace -pg with CC_FLAGS_FTRACE This patch replaces the "open-coded" -pg compile flag with a CC_FLAGS_FTRACE makefile variable which architectures can override if a different option should be used for code generation. Signed-off-by: zhaoxiao Signed-off-by: Thomas Bogendoerfer commit 987b42074b66cc5ca31e70cec89d3d0d14ad0ff3 Author: Ilya Lipnitskiy Date: Mon Apr 19 23:39:43 2021 -0700 MIPS: pci-legacy: revert "use generic pci_enable_resources" This mostly reverts commit 99bca615d895 ("MIPS: pci-legacy: use generic pci_enable_resources"). Fixes regressions such as: ata_piix 0000:00:0a.1: can't enable device: BAR 0 [io 0x01f0-0x01f7] not claimed ata_piix: probe of 0000:00:0a.1 failed with error -22 The only changes from the strict revert are to fix checkpatch errors: ERROR: spaces required around that '=' (ctx:VxV) #33: FILE: arch/mips/pci/pci-legacy.c:252: + for (idx=0; idx < PCI_NUM_RESOURCES; idx++) { ^ ERROR: do not use assignment in if condition #67: FILE: arch/mips/pci/pci-legacy.c:284: + if ((err = pcibios_enable_resources(dev, mask)) < 0) Reported-by: Guenter Roeck Signed-off-by: Ilya Lipnitskiy Tested-by: Guenter Roeck Signed-off-by: Thomas Bogendoerfer commit d473327f8f53418691cb2944a45da3e9ea51f9bf Author: Lin Ruizhe Date: Wed Apr 21 16:42:56 2021 +0800 thermal/drivers/ti-soc-thermal/bandgap Remove unused variable 'val' The function ti_bandgap_restore_ctxt() restores the context at resume time. It checks if the sensor has a counter, reads the register but does nothing with the value. The block was probably omitted by the commit b87ea759a4cc. Remove the unused variable as well as the block using it as we can consider it as dead code. Reported-by: Hulk Robot Fixes: b87ea759a4cc ("staging: omap-thermal: fix context restore function") Signed-off-by: Lin Ruizhe Reviewed-by: Tony Lindgren Tested-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210421084256.57591-1-linruizhe@huawei.com commit 6f3353c2d2b3eb4de52e9704cb962712033db181 Author: Vasily Gorbik Date: Tue Apr 20 11:04:10 2021 +0200 s390/disassembler: increase ebpf disasm buffer size Current ebpf disassembly buffer size of 64 is too small. E.g. this line takes 65 bytes: 01fffff8005822e: ec8100ed8065\tclgrj\t%r8,%r1,8,001fffff80058408\n\0 Double the buffer size like it is done for the kernel disassembly buffer. Fixes the following KASAN finding: UG: KASAN: stack-out-of-bounds in print_fn_code+0x34c/0x380 Write of size 1 at addr 001fff800ad5f970 by task test_progs/853 CPU: 53 PID: 853 Comm: test_progs Not tainted 5.12.0-rc7-23786-g23457d86b1f0-dirty #19 Hardware name: IBM 3906 M04 704 (LPAR) Call Trace: [<0000000cd8e0538a>] show_stack+0x17a/0x1668 [<0000000cd8e2a5d8>] dump_stack+0x140/0x1b8 [<0000000cd8e16e74>] print_address_description.constprop.0+0x54/0x260 [<0000000cd75a8698>] kasan_report+0xc8/0x130 [<0000000cd6e26da4>] print_fn_code+0x34c/0x380 [<0000000cd6ea0f4e>] bpf_int_jit_compile+0xe3e/0xe58 [<0000000cd72c4c88>] bpf_prog_select_runtime+0x5b8/0x9c0 [<0000000cd72d1bf8>] bpf_prog_load+0xa78/0x19c0 [<0000000cd72d7ad6>] __do_sys_bpf.part.0+0x18e/0x768 [<0000000cd6e0f392>] do_syscall+0x12a/0x220 [<0000000cd8e333f8>] __do_syscall+0x98/0xc8 [<0000000cd8e54834>] system_call+0x6c/0x94 1 lock held by test_progs/853: #0: 0000000cd9bf7460 (report_lock){....}-{2:2}, at: kasan_report+0x96/0x130 addr 001fff800ad5f970 is located in stack of task test_progs/853 at offset 96 in frame: print_fn_code+0x0/0x380 this frame has 1 object: [32, 96) 'buffer' Memory state around the buggy address: 001fff800ad5f800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 001fff800ad5f880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >001fff800ad5f900: 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00 f3 f3 ^ 001fff800ad5f980: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 001fff800ad5fa00: 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 Cc: Reviewed-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 28096067686c5a5cbd4c35b079749bd805df5010 Author: Harald Freudenberger Date: Tue Apr 20 08:23:12 2021 +0200 s390/archrandom: add parameter check for s390_arch_random_generate A review of the code showed, that this function which is exposed within the whole kernel should do a parameter check for the amount of bytes requested. If this requested bytes is too high an unsigned int overflow could happen causing this function to try to memcpy a really big memory chunk. This is not a security issue as there are only two invocations of this function from arch/s390/include/asm/archrandom.h and both are not exposed to userland. Reported-by: Sven Schnelle Signed-off-by: Harald Freudenberger Signed-off-by: Heiko Carstens commit 70fac8088cfad9f3b379c9082832b4d7532c16c2 Author: Harald Freudenberger Date: Thu Apr 15 11:22:03 2021 +0200 s390/zcrypt: fix zcard and zqueue hot-unplug memleak Tests with kvm and a kmemdebug kernel showed, that on hot unplug the zcard and zqueue structs for the unplugged card or queue are not properly freed because of a mismatch with get/put for the embedded kref counter. This fix now adjusts the handling of the kref counters. With init the kref counter starts with 1. This initial value needs to drop to zero with the unregister of the card or queue to trigger the release and free the object. Fixes: 29c2680fd2bf ("s390/ap: fix ap devices reference counting") Reported-by: Marc Hartmayer Signed-off-by: Harald Freudenberger Cc: stable@vger.kernel.org Reviewed-by: Julian Wiedmann Signed-off-by: Heiko Carstens commit 367518858e78b80ef09a0075b637a6d8e0b88dfb Author: Lorenzo Bianconi Date: Sat Apr 17 12:27:06 2021 +0200 mt76: mt7921: do not use 0 as NULL pointer Fix the following sparse warning: drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1425:70: warning: Using plain integer as NULL pointer Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e65a4d378480101f222e8f6978c22e590c1fb7b5 Merge: af8352f1ff54c 0349ec19c484e Author: Jani Nikula Date: Wed Apr 21 13:22:29 2021 +0300 Merge tag 'gvt-next-fixes-2021-04-21' of https://github.com/intel/gvt-linux into drm-intel-next-fixes gvt-next-fixes-2021-04-21 - Remove one unused function warning (Jiapeng) - Fix intel_gvt_init_device() return type (Dan) - Remove one duplicated register accessible check (Zhenyu) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20210421094522.GU1551@zhen-hp.sh.intel.com commit 5352efaed0812dc23308498a2e700630f603579f Author: Shayne Chen Date: Sat Apr 17 06:16:19 2021 +0800 mt76: mt7915: directly read per-rate tx power from registers Since driver no longer handler per-rate tx power setting, we need to read the power values directly from registers. Tested-by: Evelyn Tsai Signed-off-by: Shayne Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit ecb187a74e1846156fac7c14a60650130cbe3c22 Author: Shayne Chen Date: Sat Apr 17 06:16:18 2021 +0800 mt76: mt7915: rework the flow of txpower setting Clean up the flow of per-rate txpower limit setting to get rid of duplicate work since it has already been handled by firmware, and set proper max_power based on different channels and regdomains. Signed-off-by: Shayne Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 790d228a68745624c266c27aded0d7f46a0d5af4 Author: Shayne Chen Date: Sat Apr 17 06:16:17 2021 +0800 mt76: mt7915: add support for DT rate power limits Enable to limit per-rate max txpower from DT. Tested-by: Evelyn Tsai Signed-off-by: Shayne Chen Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit e513ae49088bbb0d00299a9f996f88f08cca7dc6 Author: Sean Wang Date: Fri Apr 16 23:30:36 2021 +0800 mt76: mt7921: abort uncompleted scan by wifi reset Scan abort should be required for the uncompleted hardware scan interrupted by wifi reset. Otherwise, it is possible that the scan request after wifi reset gets error code -EBUSY from mac80211 and then blocks the reconnectting to the access point. Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 0349ec19c484ed40dbc725820673df4d94334e8c Author: Zhenyu Wang Date: Wed Apr 14 16:48:13 2021 +0800 drm/i915/gvt: Remove duplicated register accessible check Looks this duplication was missed in code rebase. Remove extra check. Cc: Yan Zhao Fixes: 02dd2b12a685 ("drm/i915/gvt: unify lri cmd handler and mmio handlers") Reviewed-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20210414084813.3763353-2-zhenyuw@linux.intel.com commit 753ed9c95c37d058e50e7d42bbe296ee0bf6670d Author: Joseph Salisbury Date: Fri Apr 16 17:43:03 2021 -0700 drivers: hv: Create a consistent pattern for checking Hyper-V hypercall status There is not a consistent pattern for checking Hyper-V hypercall status. Existing code uses a number of variants. The variants work, but a consistent pattern would improve the readability of the code, and be more conformant to what the Hyper-V TLFS says about hypercall status. Implemented new helper functions hv_result(), hv_result_success(), and hv_repcomp(). Changed the places where hv_do_hypercall() and related variants are used to use the helper functions. Signed-off-by: Joseph Salisbury Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1618620183-9967-2-git-send-email-joseph.salisbury@linux.microsoft.com Signed-off-by: Wei Liu commit 6523592cee4650c6aa997d69cd0045a01e07a1ef Author: Joseph Salisbury Date: Fri Apr 16 17:43:02 2021 -0700 x86/hyperv: Move hv_do_rep_hypercall to asm-generic This patch makes no functional changes. It simply moves hv_do_rep_hypercall() out of arch/x86/include/asm/mshyperv.h and into asm-generic/mshyperv.h hv_do_rep_hypercall() is architecture independent, so it makes sense that it should be in the architecture independent mshyperv.h, not in the x86-specific mshyperv.h. This is done in preperation for a follow up patch which creates a consistent pattern for checking Hyper-V hypercall status. Signed-off-by: Joseph Salisbury Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1618620183-9967-1-git-send-email-joseph.salisbury@linux.microsoft.com Signed-off-by: Wei Liu commit f1ae92bbc43b68521bc0e866327dc896f10c11ee Author: Sean Wang Date: Fri Apr 16 23:30:35 2021 +0800 mt76: mt7921: add wifisys reset support in debugfs Introduce chip_reset knob in mt7921 debugfs to export a way to users able to trigger wifi reset, and group the similar operations previously defined in chip_config in the same knob. Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 987c8fb4de437344f19a23d074c06faf67520a11 Author: Lorenzo Bianconi Date: Fri Apr 16 00:21:54 2021 +0200 mt76: mt7921: run mt7921_mcu_fw_log_2_host holding mt76 mutex Wake the chip before configuring the mcu log level Fixes: 1d8efc741df8 ("mt76: mt7921: introduce Runtime PM support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 53d35b1aa0bd8a781a0252680b4495fd0193cc2c Author: Lorenzo Bianconi Date: Thu Apr 15 17:50:02 2021 +0200 mt76: improve mcu error logging Dump mcu command code in hex and related prefix to help debugging Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a8333801d69d98f0b9def7c5370939100ae3160d Author: Lorenzo Bianconi Date: Thu Apr 15 11:03:58 2021 +0200 mt76: mt7921: move hw configuration in mt7921_register_device Get rid of init work since firmware loading is already performed in mt7921_init_hardware Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 495184ac91bb866ad7d794ad6ceb064e191319d4 Author: Ryder Lee Date: Thu Apr 15 00:45:49 2021 +0800 mt76: mt7915: add support for applying pre-calibration data When the EEPROM data is read from flash, it can contain pre-calibration data, which can save calibration time. Note that group_cal can save 30% bootup calibration time, and dpd_cal can save 75% channel switching time. Tested-by: Bo Jiao Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 4efcfd5c36bd0d7c0f62713216a2291562eccfaa Author: Felix Fietkau Date: Fri Apr 16 10:24:46 2021 +0200 mt76: mt7615: load ROM patch before checking patch semaphore status For MT7663, the availability of the patch files is used to detect, which corresponding firmware is going to be used (AP firmware or STA offload firmware). If the ROM patch was already applied, it could attempt to load the wrong firmware (without considering the alternative). Signed-off-by: Felix Fietkau commit 5c7d374444afdeb9dd534a37c4f6c13af032da0c Author: Felix Fietkau Date: Thu Apr 15 21:07:53 2021 +0200 mt76: mt7615: fix entering driver-own state on mt7663 Fixes hardware wakeup issues Signed-off-by: Felix Fietkau commit 453873637b85b413456fb6257df336940b1d598a Author: Felix Fietkau Date: Thu Apr 15 20:57:42 2021 +0200 mt76: mt7615: fix hardware error recovery for mt7663 MT7663 uses different bits for communicating reset commands/status between MCU and host. Also add an extra initial reset command. Signed-off-by: Felix Fietkau commit ea29acc97c555bc4c295cd0ad78083a33b0272a2 Author: Sean Wang Date: Tue Apr 13 11:08:41 2021 +0200 mt76: mt7921: add dumping Tx power table Dump the tx power table saved in offload firmware. Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 18369a4f9d73bf0ccd43d8df691d394281ee3ed4 Author: Lorenzo Bianconi Date: Tue Apr 13 11:08:40 2021 +0200 mt76: introduce single-sku support for mt7663/mt7921 Introduce support for rate-txpower compensation for mt7663/mt7921 chipsets. Rate-txpower limit is specified through dts Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 729d3dbd3bf23d03b8259e692c5505d6a647726a Author: Lorenzo Bianconi Date: Tue Apr 13 11:08:39 2021 +0200 mt76: mt7615: do not use mt7615 single-sku values for mt7663 mt7663 mcu relies on different APIs to configure APIs per-rate power limit respect to mt7615 driver. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit fb0d90540b66523069d15ac05acab4ceb8e01055 Author: Felix Fietkau Date: Tue Apr 13 11:08:38 2021 +0200 mt76: mt7615: implement support for using DT rate power limits Limits are used to update the channel max_power settings and also passed to the firmware on channel changes Signed-off-by: Felix Fietkau Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a9627d992b5e3aa18315094b501eba0f4d883419 Author: Shayne Chen Date: Tue Apr 13 11:08:37 2021 +0200 mt76: extend DT rate power limits to support 11ax devices Enable parsing per-rate txpower limits from DT for 11ax chipsets. Co-developed-by: Felix Fietkau Signed-off-by: Felix Fietkau Tested-by: Evelyn Tsai Signed-off-by: Shayne Chen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 22b980badc0fc746431b81b9d402cf0612f59a7a Author: Felix Fietkau Date: Tue Apr 13 11:08:36 2021 +0200 mt76: add functions for parsing rate power limits from DT This subnode can be used to set per-rate tx power limits either per country code / regdomain or globally. These limits are typically provided by the device manufacturers and are used to limit sideband emissions and stay within regulatory limits Signed-off-by: Felix Fietkau Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2de6ccebe0e778b80b4092eff33918a752c48804 Author: Lorenzo Bianconi Date: Tue Apr 13 11:08:35 2021 +0200 dt-bindings:net:wireless:mediatek,mt76: introduce power-limits node Introduce power-limits node in mt76 binding in order to specify per-rate power limit values for each 802.11n/802.11ac rate Signed-off-by: Lorenzo Bianconi Reviewed-by: Rob Herring Signed-off-by: Felix Fietkau commit 6929d1d747b3934df3b0b2bb8af31b3f1f539ae4 Author: Felix Fietkau Date: Tue Apr 13 20:09:33 2021 +0200 mt76: flush tx status queue on DMA reset After DMA reset, tx status information for queued frames will never arrive. Flush the queue to free skbs immediately instead of waiting for a timeout Signed-off-by: Felix Fietkau commit 2b9ea5a8cf1bdc82f494da5a90191aa8b042980d Author: Lorenzo Bianconi Date: Tue Apr 13 14:13:54 2021 +0200 mt76: mt7921: add mt7921_dma_cleanup in mt7921_unregister_device In order to avoid memory leaks, clean the dma engine unloading the module Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 06991d1f73a9bdbc5f234ee96737b9102705b89c Author: Ryder Lee Date: Tue Apr 13 16:00:07 2021 +0800 mt76: mt7615: use ieee80211_free_txskb() in mt7615_tx_token_put() We should use ieee80211_free_txskb() to report skb status avoid wrong aql accounting after reset. Cc: stable@vger.kernel.org Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 91577ccae6461506a06889849dd944d9bdec09dd Author: Ryder Lee Date: Tue Apr 13 16:00:06 2021 +0800 mt76: mt7615: only free skbs after mt7615_dma_reset() when reset happens In mt7615_mac_reset_work(), make sure freeing skbs after mt7615_dma_reset(). Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 6362dd16596e8a694f895089726fac103b7f47ef Author: Ryder Lee Date: Tue Apr 13 15:26:20 2021 +0800 mt76: mt7915: only free skbs after mt7915_dma_reset() when reset happens In mt7915_mac_reset_work(), make sure freeing skbs after mt7915_dma_reset(). Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit e9d32af478cfc3744a45245c0b126738af4b3ac4 Author: Ryder Lee Date: Tue Apr 13 13:34:57 2021 +0800 mt76: mt7915: fix memleak when mt7915_unregister_device() mt7915_tx_token_put() should get call before mt76_free_pending_txwi(). Fixes: f285dfb98562 ("mt76: mt7915: reset token when mac_reset happens") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 8ab31da7b89f71c4c2defcca989fab7b42f87d71 Author: Ryder Lee Date: Tue Apr 13 13:34:56 2021 +0800 mt76: mt7615: fix memleak when mt7615_unregister_device() mt7615_tx_token_put() should get call before mt76_free_pending_txwi(). Fixes: a6275e934605 ("mt76: mt7615: reset token when mac_reset happens") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit cc91747be98f2a3fc305cf3efc8f3a9b7f6a9f3b Author: Shayne Chen Date: Mon Apr 12 13:39:54 2021 +0800 mt76: mt7915: fix rate setting of tx descriptor in testmode Fix ofdm rate index and ldpc setting in rate setting field of tx descriptor. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit e6678f9dc59ab1535ba29d8b28e80fad212156a0 Author: Shayne Chen Date: Mon Apr 12 13:39:53 2021 +0800 mt76: mt7915: rework mt7915_tm_set_tx_len() Rework mt7915_tm_set_tx_len() with mt76_testmode_alloc_skb() to support larger packet based on a longer tx_time. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 2601dda8faa7685bab921d63c86f04e9e356f9ac Author: Shayne Chen Date: Mon Apr 12 13:39:52 2021 +0800 mt76: testmode: add support to send larger packet Add support to send larger packet in testmode to meet requirements of some test cases. The limit of max packet size is determined based on tx rate mode setting. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit afda33499bea154dc792338c5c51a2038a206785 Author: Ping-Ke Shih Date: Mon Apr 19 14:59:56 2021 +0800 rtlwifi: implement set_tim by update beacon content Once beacon content is changed, we update the content to wifi card by send_beacon_frame(). Then, STA with PS can wake up properly to receive its packets. Since we update beacon content to PCI wifi devices every beacon interval, the only one usb device, 8192CU, needs to update beacon content when mac80211 calling set_tim. Reported-by: Maciej S. Szmigiero Signed-off-by: Ping-Ke Shih Tested-by: Maciej S. Szmigiero Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210419065956.6085-1-pkshih@realtek.com commit ff0224e97d5d1f8bd52c7d4dd31d38089503a6d8 Author: Wan Jiabing Date: Wed Mar 31 10:35:52 2021 +0800 libertas_tf: Remove duplicate struct declaration struct lbtf_private is declared twice. One has been declared at 157th line. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210331023557.2804128-4-wanjiabing@vivo.com commit 7bd3760c71f7a18485d2c10ea0887e1d41519f4e Author: Po-Hao Huang Date: Thu Apr 15 16:47:03 2021 +0800 rtw88: refine napi deinit flow We used to stop napi before disabling irqs. And it turns out to cause some problem when we try to stop device while interrupt arrives. To safely stop pci, we do three steps: 1. disable interrupt 2. synchronize_irq 3. stop_napi Since step 2 and 3 may not finish as expected when interrupt is enabled, use rtwpci->running to decide whether interrupt should be re-enabled at the time. Fixes: 9e2fd29864c5 ("rtw88: add napi support") Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210415084703.27255-4-pkshih@realtek.com commit a548909d7ad7e334c6c923a71f0b694d60980232 Author: Yu-Yen Ting Date: Thu Apr 15 16:47:02 2021 +0800 rtw88: Fix potential unrecoverable tx queue stop If there are lots of packets to be transmitted, the driver would check whether the available descriptors are sufficient according the read/write point of tx queue. Once the available descriptor is not enough, ieee80211_stop_queue is called. TX ISR, meanwhile, is releasing the tx resources after the packets are transmitted. This routine may call ieee80211_wake_queue by checking the available descriptor. The potential queue stop problem would occur when the tx queue is stopped due to the heavy traffic. Then thare is no chance to wake the queue up because the read point is not updated immediately, as a result, no more packets coulde be transmitted in this queue. This patch makes sure the ieee80211_wake_queue could be called properly and avoids the race condition when ring->r.rp, ring->queue_stopped are updated. Signed-off-by: Yu-Yen Ting Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210415084703.27255-3-pkshih@realtek.com commit 559f6cb318375e9deb01d7d0e957d0d90a2db63d Author: Guo-Feng Fan Date: Thu Apr 15 16:47:01 2021 +0800 rtw88: 8821c: Don't set RX_FLAG_DECRYPTED if packet has no encryption The value of GET_RX_DESC_SWDEC() indicates that if this RX packet requires software decryption or not. And software decryption is required when the packet was encrypted and the hardware failed to decrypt it. So, GET_RX_DESC_SWDEC() is negative does not mean that this packet is decrypted, it might just have no encryption at all. To actually see if the packet is decrypted, driver needs to further check if the hardware has successfully decrypted it, with a specific type of encryption algorithm. Signed-off-by: Guo-Feng Fan Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210415084703.27255-2-pkshih@realtek.com commit 3b25bac893534858a8cd0ff79afa929beb8e3b20 Author: Guo-Feng Fan Date: Mon Apr 19 08:37:48 2021 +0800 rtw88: 8822c: debug: allow debugfs to enable/disable TXGAPK Use "cat dm_cap" to show all features; where, prefix +/- means feature is enabled/disabled: $ cat dm_cap DM capability 0x00000002 ( 1) +TXGAPK To control dm_cap: use "echo +1 > dm_cap" to enable TXGAPK use "echo -1 > dm_cap" to disable TXGAPK Below is an example to disable TXGAPK. $ echo -1 > dm_cap $ cat dm_cap DM capability 0x00000000 ( 1) -TXGAPK Below is an example to show TXGAPK status $ echo 1 > dm_cap; cat dm_cap ( 1) +TXGAPK path 0: 0x56 = 0x88c89 [TXGAPK] offset 1 0 [TXGAPK] offset 1 1 [TXGAPK] offset 1 2 [TXGAPK] offset 1 3 [TXGAPK] offset 0 4 [TXGAPK] offset 0 5 [TXGAPK] offset 0 6 [TXGAPK] offset 0 7 [TXGAPK] offset 0 8 [TXGAPK] offset 0 9 path 1: 0x56 = 0x89c89 [TXGAPK] offset 1 0 [TXGAPK] offset 1 1 [TXGAPK] offset 1 2 [TXGAPK] offset 1 3 [TXGAPK] offset 0 4 [TXGAPK] offset 0 5 [TXGAPK] offset 0 6 [TXGAPK] offset 0 7 [TXGAPK] offset 0 8 [TXGAPK] offset 0 9 Signed-off-by: Guo-Feng Fan Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210419003748.3224-4-pkshih@realtek.com commit 056b239f867274b573f7da15c43ff8afb523e35c Author: Guo-Feng Fan Date: Mon Apr 19 08:37:47 2021 +0800 rtw88: 8822c: Add gap-k calibration to improve long range performance gap-k is a calibration mechanism to eliminate power gaps between two nearly rate groups. This mechanism improves performance in long range test by applying proper power value to those rate groups which have nonlinear power gap. Signed-off-by: Guo-Feng Fan Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210419003748.3224-3-pkshih@realtek.com commit f98bf9ee63122d91ab93bfd549c5dd73bf0fd55e Author: Guo-Feng Fan Date: Mon Apr 19 08:37:46 2021 +0800 rtw88: 8822c: reorder macro position according to the register number This patch doesn't change logic at all, just a refactor patch. 1. Move BIT MASK and BIT definition along with the register definition 2. Remove redundant definition 3. Align macros with Tab key Signed-off-by: Guo-Feng Fan Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210419003748.3224-2-pkshih@realtek.com commit ffe8768fb8f391cb478466778c55e2110525c15c Author: Jiapeng Chong Date: Thu Apr 15 16:45:25 2021 +0800 drm/vc4: remove unused function Fix the following clang warning: drivers/gpu/drm/vc4/vc4_vec.c:201:1: warning: unused function 'to_vc4_vec_connector' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/1618476325-112629-1-git-send-email-jiapeng.chong@linux.alibaba.com commit d61b3f9b91be32f714b218377ab5081932e3ebc2 Author: Ye Bin Date: Fri Apr 9 17:51:38 2021 +0800 platform/chrome: cros_ec_lpc: Use DEFINE_MUTEX() for mutex lock mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210409095138.2293869-1-yebin10@huawei.com commit 4423ee65f76818c8a8994e6f5821372661ea7f89 Author: Pi-Hsun Shih Date: Wed Apr 14 14:45:24 2021 +0800 platform/chrome: cros_usbpd_notify: Listen to EC_HOST_EVENT_USB_MUX host event On system that use ACPI, cros_usbpd_notify gets notifications of USB MUX host event same as PD host events [1]. But currently on system that use DT, the driver only listen on EC_HOST_EVENT_PD_MCU. Add EC_HOST_EVENT_USB_MUX to the list of host events, so we have same behavior on all platforms. [1]: https://chromium.googlesource.com/chromiumos/third_party/coreboot/+/refs/heads/chromeos-2016.05/src/ec/google/chromeec/acpi/ec.asl#382 Signed-off-by: Pi-Hsun Shih Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210414064524.2450908-1-pihsun@chromium.org commit c5bb32f57bf3a30ed03be51f7be0840325ba8b4a Author: Prashant Malani Date: Tue Apr 20 21:21:09 2021 -0700 platform/chrome: cros_ec_typec: Add DP mode check There are certain transitional situations where the dp_mode field in the PD_CONTROL response might not be populated with the right DP pin assignment value yet. Add a check for that to avoid sending an invalid value to the Type C mode switch. Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210421042108.2002-1-pmalani@chromium.org commit d12b64b9764ea17554fb230784ebf91287ed807e Author: Lukas Bulwahn Date: Tue Apr 20 22:40:26 2021 -0700 MAINTAINERS: repair reference in HYCON HY46XX TOUCHSCREEN SUPPORT Commit aa2f62cf211a ("Input: add driver for the Hycon HY46XX touchpanel series") adds the file ./drivers/input/touchscreen/hycon-hy46xx.c, but the file entry in MAINTAINERS refers to ./drivers/input/touchscreen/hy46xx.c. Hence, ./scripts/get_maintainer.pl --self-test=patterns complains: warning: no file matches F: drivers/input/touchscreen/hy46xx.c Repair the file entry by referring to the right location. Signed-off-by: Lukas Bulwahn Acked-by: Giulio Benetti Link: https://lore.kernel.org/r/20210419060023.3460-1-lukas.bulwahn@gmail.com Signed-off-by: Dmitry Torokhov commit 7845d80dda1fd998a34bb1a15ff9aba260a58f32 Author: Alex Deucher Date: Fri Apr 16 17:35:58 2021 -0400 drm/amdgpu/gmc9: remove dummy read workaround for newer chips Aldebaran has a hw fix so no longer requires the workaround. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5c88e3b86a88f14efa0a3ddd28641c6ff49fb9c4 Author: Jinzhou Su Date: Tue Apr 20 16:17:14 2021 +0800 drm/amdgpu: Add mem sync flag for IB allocated by SA The buffer of SA bo will be used by many cases. So it's better to invalidate the cache of indirect buffer allocated by SA before commit the IB. Signed-off-by: Jinzhou Su Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ceb47e0d84d9d327ef3cd7091fb54f612394f189 Author: Mukul Joshi Date: Wed Mar 24 11:51:35 2021 -0400 drm/amdgpu: Fix SDMA RAS error reporting on Aldebaran Fix the following issues with SDMA RAS error reporting: 1. Read the EDC_COUNTER2 register also to fetch error counts for all sub-blocks in SDMA. 2. SDMA RAS on Aldebaran suports single-bit uncorrectable errors only. So, report error count in UE count instead of CE count. Signed-off-by: Mukul Joshi Reviewed-By: John Clements Signed-off-by: Alex Deucher commit 1f0d8e3781f40c6cae7cb68a4cccfc54dd4ad3a1 Author: Mukul Joshi Date: Wed Mar 24 11:36:33 2021 -0400 drm/amdgpu: Reset RAS error count and status regs Reset the RAS error count and error status registers after reading to prevent over reporting error counts on Aldebaran. Signed-off-by: Mukul Joshi Reviewed-By: John Clements Signed-off-by: Alex Deucher commit 5f41741a6d46b55f187e4314b767bb15e7e263d0 Author: Oak Zeng Date: Thu Mar 11 11:17:51 2021 -0600 Revert "drm/amdgpu: workaround the TMR MC address issue (v2)" This reverts commit 2f055097daef498da57552f422f49de50a1573e6. 2f055097daef498da57552f422f49de50a1573e6 was a driver workaround when PSP firmware was not ready. Now the PSP fw is ready so we revert this driver workaround. Signed-off-by: Oak Zeng Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 839ede894d0843fdf16c88adcdd6d971e5d2e130 Author: Aric Cyr Date: Sun Apr 11 18:32:58 2021 -0400 drm/amd/display: 3.2.132 Signed-off-by: Aric Cyr Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit db6622e97e0433aec70df2e1d1e75cc73d6da12e Author: Anthony Koo Date: Sat Apr 10 10:03:54 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.62 Signed-off-by: Anthony Koo Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6016cd9dba0ff376e84b67823882850d051312e1 Author: Bing Guo Date: Mon Apr 5 16:51:24 2021 -0400 drm/amd/display: add helper for enabling mst stream features [Why] Some MST devices uses different method to enable mst specific stream features. [How] Add dm_helpers_mst_enable_stream features. This can be modified later when we are ready to implement those features. Signed-off-by: Bing Guo Reviewed-by: Anthony Koo Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fdf7d4f547f75c643a71ddc644080c69d743d8c3 Author: Dillon Varone Date: Fri Apr 9 11:27:49 2021 -0400 drm/amd/display: Report Proper Quantization Range in AVI Infoframe [Why?] When a monitor does not set both QS and QY bits, DC does not set Q0, Q1, QY0 and QY1 bits in AVI infoframe. Setting RGB bits should be separate from setting YCC bits. [How?] Separate logic for setting RGB and YCC quantization range bits in the AVI infoframe. Signed-off-by: Dillon Varone Reviewed-by: Chris Park Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dad6bd779a6f3a5d3d103fcafac8c6a659c77943 Author: Dillon Varone Date: Fri Apr 9 12:58:14 2021 -0400 drm/amd/display: Fix call to pass bpp in 16ths of a bit [Why & How?] Call to dc_dsc_compute_bandwidth_range should have min and max bpp in 16ths of a bit. Multiply min and max bpp from policy. Signed-off-by: Dillon Varone Reviewed-by: Eryk Brol Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5dac2b7399d73c3fbdf246977194c1dffa8be402 Author: David Galiffi Date: Wed Apr 7 23:30:23 2021 -0400 drm/amd/display: Fixed typo in function name. [How & Why] Changed "prsent" to "present". Signed-off-by: David Galiffi Reviewed-by: Chris Park Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e0912e15d3e3b4f65deb8e53d060b1a49236adb2 Author: Nicholas Kazlauskas Date: Thu Apr 8 12:21:47 2021 -0400 drm/amd/display: Always poll for rxstatus in authenticate [Why] Requirement from the spec - we shouldn't be potentially exiting out early based on encryption status. [How] Drop the calls from HDCP1 and HDCP2 execution that exit out early based on link encryption status. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Wenjing Liu Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0eda55ca52c34c64356b5b68e95f93b9c6c251ac Author: Michael Strauss Date: Tue Apr 6 12:20:51 2021 -0400 drm/amd/display: Add link rate optimization logs for ILR [Why&How] Add logs to verify ILR optimization behaviour on boot Signed-off-by: Michael Strauss Reviewed-by: Nicholas Kazlauskas Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 97d1765e67d61c45748deccc428ea2793983f86d Author: Wesley Chalmers Date: Mon Apr 5 19:35:37 2021 -0400 drm/amd/display: Unconditionally clear training pattern set after lt [WHY] While Link Training is being performed, and the LTTPRs are in Non-LTTPR or LTTPR Transparent mode, any DPCD registers besides those used for Link Training are not to be accessed. The spec defines the link training registers as DP_TRAINING_PATTERN_SET (102h) to DP_TRAINING_LANE3_SET (106h), and DP_LANE0_1_STATUS (202h) to DP_ADJUST_REQUEST_LANE2_3 (207h). [HOW] Move the current write to DPCD Address DP_LINK_TRAINING_PATTERN_SET out of its conditional block. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 41ef8fbbef8e21e01c94105ed87b3a772b868439 Author: Aric Cyr Date: Wed Mar 17 13:57:49 2021 -0400 drm/amd/display: Fix FreeSync when RGB MPO in use [WHY] We should skip programming manual trigger on non-primary planes when MPO is enabled. [HOW] Implement an explicit mechanism for skipping manual trigger programming for planes that shouldn't cause the frame to end. Signed-off-by: Aric Cyr Reviewed-by: Anthony Koo Acked-by: Aurabindo Pillai Acked-by: Krunoslav Kovac Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9c82354e8984b2073661e46c36ec96903f502276 Author: Hugo Hu Date: Wed Jan 20 15:54:11 2021 +0800 drm/amd/display: treat memory as a single-channel for asymmetric memory v2 Previous change had been reverted since it caused hang. Remake change to avoid defect. [Why] 1. Driver use umachannelnumber to calculate watermarks for stutter. In asymmetric memory config, the actual bandwidth is less than dual-channel. The bandwidth should be the same as single-channel. 2. We found single rank dimm need additional delay time for stutter. [How] Get information from each DIMM. Treat memory config as a single-channel for asymmetric memory in bandwidth calculating. Add additional delay time for single rank dimm. Fixes: b8720ed0b87d32 ("drm/amd/display: System black screen hangs on driver load") Signed-off-by: Hugo Hu Reviewed-by: Sung Lee Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8a20c973296911b2eebf39cd466fd1527735b326 Author: Robin Singh Date: Mon Apr 5 11:27:24 2021 -0400 drm/amd/display: removed unused function dc_link_reallocate_mst_payload. [Why] Found that dc_link_reallocate_mst_payload is not used anymore in any of the use case scenario. [How] removed dc_link_reallocate_mst_payload function definition and declaration. Signed-off-by: Robin Singh Reviewed-by: Harry Wentland Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 19a274f60104bf51ad80a2999ded527f8266fe42 Author: Anthony Wang Date: Mon Apr 5 17:25:25 2021 -0400 drm/amd/display: disable seamless boot for external DP [Why] Primary feature use case is with eDP panels. [How] Fail seamless boot validation if display is not an eDP panel. Signed-off-by: Anthony Wang Reviewed-by: Martin Leung Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 4ccf9446b2a3615615045346c97f8a1e2a16568a Author: Dingchen (David) Zhang Date: Mon Jan 25 18:05:50 2021 -0500 drm/amd/display: add handling for hdcp2 rx id list validation [why] the current implementation of hdcp2 rx id list validation does not have handler/checker for invalid message status, e.g. HMAC, the V parameter calculated from PSP not matching the V prime from Rx. [how] return a generic FAILURE for any message status not SUCCESS or REVOKED. Signed-off-by: Dingchen (David) Zhang Reviewed-by: Bhawanpreet Lakha Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 26739690354b699fbbe5f88dba825fc286179123 Author: Dingchen (David) Zhang Date: Fri Jan 8 17:32:47 2021 -0500 drm/amd/display: update hdcp display using correct CP type. [why] currently we enforce to update hdcp display using TYPE0, but there is case that connector CP type prop be TYPE1 instead of type0. [how] using the drm prop of CP type of the connector as input argument. Signed-off-by: Dingchen (David) Zhang Reviewed-by: Bhawanpreet Lakha Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7cd69b95a84bc9226d10042f3216fa3e78d060f8 Author: Anthony Wang Date: Mon Apr 5 17:13:58 2021 -0400 drm/amd/display: Add DSC check to seamless boot validation [Why & How] We want to immediately fail seamless boot validation if DSC is active, as VBIOS currently does not support DSC timings. Add a check for the relevant flag in dc_validate_seamless_boot_timing. Signed-off-by: Anthony Wang Reviewed-by: Martin Leung Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 19cc1f3829567e7dca21c1389ea6407b8f5efab4 Author: Robin Singh Date: Mon Dec 14 19:14:48 2020 -0500 drm/amd/display: fixed divide by zero kernel crash during dsc enablement [why] During dsc enable, a divide by zero condition triggered the kernel crash. [how] An IGT test, which enable the DSC, was crashing at the time of restore the default dsc status, becaue of h_totals value becoming 0. So add a check before divide condition. If h_total is zero, gracefully ignore and set the default value. kernel panic log: [ 128.758827] divide error: 0000 [#1] PREEMPT SMP NOPTI [ 128.762714] CPU: 5 PID: 4562 Comm: amd_dp_dsc Tainted: G W 5.4.19-android-x86_64 #1 [ 128.769728] Hardware name: ADVANCED MICRO DEVICES, INC. Mauna/Mauna, BIOS WMN0B13N Nov 11 2020 [ 128.777695] RIP: 0010:hubp2_vready_at_or_After_vsync+0x37/0x7a [amdgpu] [ 128.785707] Code: 80 02 00 00 48 89 f3 48 8b 7f 08 b ...... [ 128.805696] RSP: 0018:ffffad8f82d43628 EFLAGS: 00010246 ...... [ 128.857707] CR2: 00007106d8465000 CR3: 0000000426530000 CR4: 0000000000140ee0 [ 128.865695] Call Trace: [ 128.869712] hubp3_setup+0x1f/0x7f [amdgpu] [ 128.873705] dcn20_update_dchubp_dpp+0xc8/0x54a [amdgpu] [ 128.877706] dcn20_program_front_end_for_ctx+0x31d/0x463 [amdgpu] [ 128.885706] dc_commit_state+0x3d2/0x658 [amdgpu] [ 128.889707] amdgpu_dm_atomic_commit_tail+0x4b3/0x1e7c [amdgpu] [ 128.897699] ? dm_read_reg_func+0x41/0xb5 [amdgpu] [ 128.901707] ? dm_read_reg_func+0x41/0xb5 [amdgpu] [ 128.905706] ? __is_insn_slot_addr+0x43/0x48 [ 128.909706] ? fill_plane_buffer_attributes+0x29e/0x3dc [amdgpu] [ 128.917705] ? dm_plane_helper_prepare_fb+0x255/0x284 [amdgpu] [ 128.921700] ? usleep_range+0x7c/0x7c [ 128.925705] ? preempt_count_sub+0xf/0x18 [ 128.929706] ? _raw_spin_unlock_irq+0x13/0x24 [ 128.933732] ? __wait_for_common+0x11e/0x18f [ 128.937705] ? _raw_spin_unlock_irq+0x13/0x24 [ 128.941706] ? __wait_for_common+0x11e/0x18f [ 128.945705] commit_tail+0x8b/0xd2 [drm_kms_helper] [ 128.949707] drm_atomic_helper_commit+0xd8/0xf5 [drm_kms_helper] [ 128.957706] amdgpu_dm_atomic_commit+0x337/0x360 [amdgpu] [ 128.961705] ? drm_atomic_check_only+0x543/0x68d [drm] [ 128.969705] ? drm_atomic_set_property+0x760/0x7af [drm] [ 128.973704] ? drm_mode_atomic_ioctl+0x6f3/0x85a [drm] [ 128.977705] drm_mode_atomic_ioctl+0x6f3/0x85a [drm] [ 128.985705] ? drm_atomic_set_property+0x7af/0x7af [drm] [ 128.989706] drm_ioctl_kernel+0x82/0xda [drm] [ 128.993706] drm_ioctl+0x225/0x319 [drm] [ 128.997707] ? drm_atomic_set_property+0x7af/0x7af [drm] [ 129.001706] ? preempt_count_sub+0xf/0x18 [ 129.005713] amdgpu_drm_ioctl+0x4b/0x76 [amdgpu] [ 129.009705] vfs_ioctl+0x1d/0x2a [ 129.013705] do_vfs_ioctl+0x419/0x43d [ 129.017707] ksys_ioctl+0x52/0x71 [ 129.021707] __x64_sys_ioctl+0x16/0x19 [ 129.025706] do_syscall_64+0x78/0x85 [ 129.029705] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Signed-off-by: Robin Singh Reviewed-by: Harry Wentland Reviewed-by: Robin Singh Acked-by: Aurabindo Pillai Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 7c49ee9ec54c120a46487b9e4d8172c18f2ea9f6 Author: Jiansong Chen Date: Mon Apr 19 16:33:22 2021 +0800 drm/amdgpu: fix GCR_GENERAL_CNTL offset for dimgrey_cavefish dimgrey_cavefish has similar gc_10_3 ip with sienna_cichlid, so follow its registers offset setting. Signed-off-by: Jiansong Chen Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher commit f9727922fc686a4406bb84a91a671c2f0b615ecd Author: John Clements Date: Mon Apr 19 11:23:07 2021 +0800 drm/amdgpu: resolve erroneous gfx_v9_4_2 prints resolve bug on aldebaran where gfx error counts will print on driver load when there are no errors present Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 6df23f4c5cef5b6d8879720ef7c842adffc565c9 Author: Dennis Li Date: Fri Apr 16 22:41:11 2021 +0800 drm/amdgpu: fix a error injection failed issue because "sscanf(str, "retire_page")" always return 0, if application use the raw data for error injection, it always wrongly falls into "op == 3". Change to use strstr instead. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 1f8d3ad2a01957ddb7c8198ee293e0feaa03ea18 Author: Hawking Zhang Date: Fri Apr 16 17:30:12 2021 +0800 drm/amdgpu: only harvest gcea/mmea error status in aldebaran In aldebaran, driver only needs to harvest SDP RdRspStatus, WrRspStatus and first parity error on RdRsp data. Check error type before harvest error information. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Signed-off-by: Alex Deucher commit 53ee6609b42e09f89bf2cdd15a340c236694ecd3 Author: Hawking Zhang Date: Fri Apr 16 17:34:13 2021 +0800 drm/amdgpu: only harvest gcea/mmea error status in arcturus SDP RdRspStatus/WrRspStatus or first parity error on RdRsp data can cause system fatal error in arcturus. GPU will be freezed in such case. Driver needs to harvest these error information before reset the GPU. Check error type to avoid harvest normal gcea/mmea information. Signed-off-by: Hawking Zhang Reviewed-by: Stanley Yang Signed-off-by: Alex Deucher commit 9406d39bb6ef11e8525d7bd9acfcba5708db485b Author: Huang Rui Date: Wed Apr 14 18:45:54 2021 +0800 drm/amdgpu: enable tmz on renoir asics The tmz functions are verified on renoir chips as well. So enable it by default. Signed-off-by: Huang Rui Tested-by: Lang Yu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 28a5d7a58949aede16f8572ba501aa2ee2a60657 Author: Hawking Zhang Date: Fri Apr 16 14:44:27 2021 +0800 drm/amdgpu: correct default gfx wdt timeout setting When gfx wdt was configured to fatal_disable, the timeout period should be configured to 0x0 (timeout disabled) Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 20161e51dcea2b3ab7924991ba43f8f76bb30fb6 Author: Dennis Li Date: Wed Apr 14 19:00:34 2021 +0800 drm/amdkfd: add edc error interrupt handle for poison propogate mode In poison progogate mode, when driver receive the edc error interrupt from SQ, driver should kill the process by pasid which is using the poison data, and then trigger GPU reset. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a926c025d56bb1acd8a192fca0e307331ee91b30 Author: Loic Poulain Date: Tue Apr 20 11:36:22 2021 +0200 net: wwan: mhi_wwan_ctrl: Fix RX buffer starvation The mhi_wwan_rx_budget_dec function is supposed to return true if RX buffer budget has been successfully decremented, allowing to queue a new RX buffer for transfer. However the current implementation is broken when RX budget is '1', in which case budget is decremented but false is returned, preventing to requeue one buffer, and leading to RX buffer starvation. Fixes: fa588eba632d ("net: Add Qcom WWAN control driver") Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit d83b8aa5207d81f9f6daec9888390f079cc5db3f Author: Colin Ian King Date: Tue Apr 20 18:16:14 2021 +0100 net: davinci_emac: Fix incorrect masking of tx and rx error channel The bit-masks used for the TXERRCH and RXERRCH (tx and rx error channels) are incorrect and always lead to a zero result. The mask values are currently the incorrect post-right shifted values, fix this by setting them to the currect values. (I double checked these against the TMS320TCI6482 data sheet, section 5.30, page 127 to ensure I had the correct mask values for the TXERRCH and RXERRCH fields in the MACSTATUS register). Addresses-Coverity: ("Operands don't affect result") Fixes: a6286ee630f6 ("net: Add TI DaVinci EMAC driver") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 333980481b99edb24ebd5d1a53af70a15d9146de Author: Vadym Kochan Date: Tue Apr 20 16:31:51 2021 +0300 net: marvell: prestera: fix port event handling on init For some reason there might be a crash during ports creation if port events are handling at the same time because fw may send initial port event with down state. The crash points to cancel_delayed_work() which is called when port went is down. Currently I did not find out the real cause of the issue, so fixed it by cancel port stats work only if previous port's state was up & runnig. The following is the crash which can be triggered: [ 28.311104] Unable to handle kernel paging request at virtual address 000071775f776600 [ 28.319097] Mem abort info: [ 28.321914] ESR = 0x96000004 [ 28.324996] EC = 0x25: DABT (current EL), IL = 32 bits [ 28.330350] SET = 0, FnV = 0 [ 28.333430] EA = 0, S1PTW = 0 [ 28.336597] Data abort info: [ 28.339499] ISV = 0, ISS = 0x00000004 [ 28.343362] CM = 0, WnR = 0 [ 28.346354] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000100bf7000 [ 28.352842] [000071775f776600] pgd=0000000000000000, p4d=0000000000000000 [ 28.359695] Internal error: Oops: 96000004 [#1] PREEMPT SMP [ 28.365310] Modules linked in: prestera_pci(+) prestera uio_pdrv_genirq [ 28.372005] CPU: 0 PID: 1291 Comm: kworker/0:1H Not tainted 5.11.0-rc4 #1 [ 28.378846] Hardware name: DNI AmazonGo1 A7040 board (DT) [ 28.384283] Workqueue: prestera_fw_wq prestera_fw_evt_work_fn [prestera_pci] [ 28.391413] pstate: 60000085 (nZCv daIf -PAN -UAO -TCO BTYPE=--) [ 28.397468] pc : get_work_pool+0x48/0x60 [ 28.401442] lr : try_to_grab_pending+0x6c/0x1b0 [ 28.406018] sp : ffff80001391bc60 [ 28.409358] x29: ffff80001391bc60 x28: 0000000000000000 [ 28.414725] x27: ffff000104fc8b40 x26: ffff80001127de88 [ 28.420089] x25: 0000000000000000 x24: ffff000106119760 [ 28.425452] x23: ffff00010775dd60 x22: ffff00010567e000 [ 28.430814] x21: 0000000000000000 x20: ffff80001391bcb0 [ 28.436175] x19: ffff00010775deb8 x18: 00000000000000c0 [ 28.441537] x17: 0000000000000000 x16: 000000008d9b0e88 [ 28.446898] x15: 0000000000000001 x14: 00000000000002ba [ 28.452261] x13: 80a3002c00000002 x12: 00000000000005f4 [ 28.457622] x11: 0000000000000030 x10: 000000000000000c [ 28.462985] x9 : 000000000000000c x8 : 0000000000000030 [ 28.468346] x7 : ffff800014400000 x6 : ffff000106119758 [ 28.473708] x5 : 0000000000000003 x4 : ffff00010775dc60 [ 28.479068] x3 : 0000000000000000 x2 : 0000000000000060 [ 28.484429] x1 : 000071775f776600 x0 : ffff00010775deb8 [ 28.489791] Call trace: [ 28.492259] get_work_pool+0x48/0x60 [ 28.495874] cancel_delayed_work+0x38/0xb0 [ 28.500011] prestera_port_handle_event+0x90/0xa0 [prestera] [ 28.505743] prestera_evt_recv+0x98/0xe0 [prestera] [ 28.510683] prestera_fw_evt_work_fn+0x180/0x228 [prestera_pci] [ 28.516660] process_one_work+0x1e8/0x360 [ 28.520710] worker_thread+0x44/0x480 [ 28.524412] kthread+0x154/0x160 [ 28.527670] ret_from_fork+0x10/0x38 [ 28.531290] Code: a8c17bfd d50323bf d65f03c0 9278dc21 (f9400020) [ 28.537429] ---[ end trace 5eced933df3a080b ]--- Fixes: 501ef3066c89 ("net: marvell: prestera: Add driver for Prestera family ASIC devices") Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit 8f7e876273e294b732b42af2e5e6bba91d798954 Author: Michael Walle Date: Tue Apr 20 12:29:29 2021 +0200 net: phy: at803x: fix probe error if copper page is selected The commit c329e5afb42f ("net: phy: at803x: select correct page on config init") selects the copper page during probe. This fails if the copper page was already selected. In this case, the value of the copper page (which is 1) is propagated through phy_restore_page() and is finally returned for at803x_probe(). Fix it, by just using the at803x_page_write() directly. Also in case of an error, the regulator is not disabled and leads to a WARN_ON() when the probe fails. This couldn't happen before, because at803x_parse_dt() was the last call in at803x_probe(). It is hard to see, that the parse_dt() actually enables the regulator. Thus move the regulator_enable() to the probe function and undo it in case of an error. Fixes: c329e5afb42f ("net: phy: at803x: select correct page on config init") Signed-off-by: Michael Walle Reviewed-by: David Bauer Signed-off-by: David S. Miller commit 8432b8114957235f42e070a16118a7f750de9d39 Author: Stefano Garzarella Date: Tue Apr 20 13:07:27 2021 +0200 vsock/virtio: free queued packets when closing socket As reported by syzbot [1], there is a memory leak while closing the socket. We partially solved this issue with commit ac03046ece2b ("vsock/virtio: free packets during the socket release"), but we forgot to drain the RX queue when the socket is definitely closed by the scheduled work. To avoid future issues, let's use the new virtio_transport_remove_sock() to drain the RX queue before removing the socket from the af_vsock lists calling vsock_remove_sock(). [1] https://syzkaller.appspot.com/bug?extid=24452624fc4c571eedd9 Fixes: ac03046ece2b ("vsock/virtio: free packets during the socket release") Reported-and-tested-by: syzbot+24452624fc4c571eedd9@syzkaller.appspotmail.com Signed-off-by: Stefano Garzarella Signed-off-by: David S. Miller commit 55cdc26a91ac270887583945aef2bd460a2805f7 Author: Colin Ian King Date: Tue Apr 20 13:27:30 2021 +0100 net: mana: 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 eeddfd8e8d392bc94968d87e7a408ba9e9be4722 Merge: 4acd47644ef1e 172e269edfce3 Author: David S. Miller Date: Tue Apr 20 17:03:53 2021 -0700 Merge branch 'sfc-txq-lookups' Edward Cree says: ==================== sfc: fix TXQ lookups The TXQ handling changes in 12804793b17c ("sfc: decouple TXQ type from label") which were made as part of the support for encap offloads on EF10 caused some breakage on Siena (5000- and 6000-series) NICs, which caused null-dereference kernel panics. This series fixes those issues, and also a similarly incorrect code-path on EF10 which worked by chance. ==================== Signed-off-by: David S. Miller commit 172e269edfce34bac7c61c15551816bda4b0f140 Author: Edward Cree Date: Tue Apr 20 13:29:35 2021 +0100 sfc: ef10: fix TX queue lookup in TX event handling We're starting from a TXQ label, not a TXQ type, so efx_channel_get_tx_queue() is inappropriate. This worked by chance, because labels and types currently match on EF10, but we shouldn't rely on that. Fixes: 12804793b17c ("sfc: decouple TXQ type from label") Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 83b09a1807415608b387c7bc748d329fefc5617e Author: Edward Cree Date: Tue Apr 20 13:28:28 2021 +0100 sfc: farch: fix TX queue lookup in TX event handling We're starting from a TXQ label, not a TXQ type, so efx_channel_get_tx_queue() is inappropriate (and could return NULL, leading to panics). Fixes: 12804793b17c ("sfc: decouple TXQ type from label") Cc: stable@vger.kernel.org Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit 5b1faa92289b53cad654123ed2bc8e10f6ddd4ac Author: Edward Cree Date: Tue Apr 20 13:27:22 2021 +0100 sfc: farch: fix TX queue lookup in TX flush done handling We're starting from a TXQ instance number ('qid'), not a TXQ type, so efx_get_tx_queue() is inappropriate (and could return NULL, leading to panics). Fixes: 12804793b17c ("sfc: decouple TXQ type from label") Reported-by: Trevor Hemsley Cc: stable@vger.kernel.org Signed-off-by: Edward Cree Signed-off-by: David S. Miller commit af39c8f72301b268ad8b04bae646b6025918b82b Author: Eric Dumazet Date: Tue Apr 20 02:43:41 2021 -0700 virtio-net: fix use-after-free in page_to_skb() KASAN/syzbot had 4 reports, one of them being: BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:191 [inline] BUG: KASAN: slab-out-of-bounds in page_to_skb+0x5cf/0xb70 drivers/net/virtio_net.c:480 Read of size 12 at addr ffff888014a5f800 by task systemd-udevd/8445 CPU: 0 PID: 8445 Comm: systemd-udevd Not tainted 5.12.0-rc8-next-20210419-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:186 memcpy+0x20/0x60 mm/kasan/shadow.c:65 memcpy include/linux/fortify-string.h:191 [inline] page_to_skb+0x5cf/0xb70 drivers/net/virtio_net.c:480 receive_mergeable drivers/net/virtio_net.c:1009 [inline] receive_buf+0x2bc0/0x6250 drivers/net/virtio_net.c:1119 virtnet_receive drivers/net/virtio_net.c:1411 [inline] virtnet_poll+0x568/0x10b0 drivers/net/virtio_net.c:1516 __napi_poll+0xaf/0x440 net/core/dev.c:6962 napi_poll net/core/dev.c:7029 [inline] net_rx_action+0x801/0xb40 net/core/dev.c:7116 __do_softirq+0x29b/0x9fe kernel/softirq.c:559 invoke_softirq kernel/softirq.c:433 [inline] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 common_interrupt+0xa4/0xd0 arch/x86/kernel/irq.c:240 Fixes: fb32856b16ad ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom") Signed-off-by: Eric Dumazet Reported-by: syzbot Reported-by: Guenter Roeck Reported-by: Mat Martineau Cc: Xuan Zhuo Cc: Jason Wang Cc: "Michael S. Tsirkin" Cc: virtualization@lists.linux-foundation.org Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller commit 6b3a63100dedfa1f0887eb316110d5d7b0c51ed4 Author: Radu Pirea (NXP OSS) Date: Tue Apr 20 16:11:33 2021 +0300 phy: nxp-c45-tja11xx: fix phase offset calculation Fix phase offset calculation. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit 1b8caefaf4f063fdc43e4078384d38ce96147b35 Author: Michael Walle Date: Tue Apr 20 16:28:21 2021 +0200 net: enetc: automatically select IERB module Now that enetc supports flow control we have to make sure the settings in the IERB are correct. Therefore, we actually depend on the enetc-ierb module. Previously it was possible that this module was disabled while the enetc was enabled. Fix it by automatically select the enetc-ierb module. Fixes: e7d48e5fbf30 ("net: enetc: add a mini driver for the Integrated Endpoint Register Block") Signed-off-by: Michael Walle Acked-by: Vladimir Oltean Signed-off-by: David S. Miller commit f5d7872a8b8a3176e65dc6f7f0705ce7e9a699e6 Author: Eric Dumazet Date: Tue Apr 20 13:01:44 2021 -0700 virtio-net: restrict build_skb() use to some arches build_skb() is supposed to be followed by skb_reserve(skb, NET_IP_ALIGN), so that IP headers are word-aligned. (Best practice is to reserve NET_IP_ALIGN+NET_SKB_PAD, but the NET_SKB_PAD part is only a performance optimization if tunnel encaps are added.) Unfortunately virtio_net has not provisioned this reserve. We can only use build_skb() for arches where NET_IP_ALIGN == 0 We might refine this later, with enough testing. Fixes: fb32856b16ad ("virtio-net: page_to_skb() use build_skb when there's sufficient tailroom") Signed-off-by: Eric Dumazet Reported-by: Guenter Roeck Cc: Xuan Zhuo Cc: Jason Wang Cc: "Michael S. Tsirkin" Cc: virtualization@lists.linux-foundation.org Signed-off-by: David S. Miller commit b8c55ce266dee09b0e359ff9af885eb94e11480a Author: Loic Poulain Date: Tue Apr 20 21:09:57 2021 +0200 net: wwan: Fix bit ops double shift bit operation helpers such as test_bit, clear_bit, etc take bit position as parameter and not value. Current usage causes double shift => BIT(BIT(0)). Fix that in wwan_core and mhi_wwan_ctrl. Fixes: 9a44c1cc6388 ("net: Add a WWAN subsystem") Reported-by: Dan Carpenter Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit ebbcac3dc26b51d8eeaa228cc2a969cfe4cc5bb3 Merge: 08322284c1620 eb78cacebaf2f Author: David S. Miller Date: Tue Apr 20 16:51:20 2021 -0700 Merge branch 'dsa-tag-override' Tobias Waldekranz says: ==================== net: dsa: Allow default tag protocol to be overridden from DT This is a continuation of the work started in this patch: https://lore.kernel.org/netdev/20210323102326.3677940-1-tobias@waldekranz.com/ In addition to the mv88e6xxx support to dynamically change the protocol, it is now possible to override the protocol from the device tree. This means that when a board vendor finds an incompatibility, they can specify a working protocol in the DT, and users will not have to worry about it. Some background information: In a system using an NXP T1023 SoC connected to a 6390X switch, we noticed that TO_CPU frames where not reaching the CPU. This only happened on hardware port 8. Looking at the DSA master interface (dpaa-ethernet) we could see that an Rx error counter was bumped at the same rate. The logs indicated a parser error. It just so happens that a TO_CPU coming in on device 0, port 8, will result in the first two bytes of the DSA tag being one of: 00 40 00 44 00 46 My guess was that since these values looked like 802.3 length fields, the controller's parser would signal an error if the frame length did not match what was in the header. This was later confirmed using two different workarounds provided by Vladimir. Unfortunately these either bypass or ignore the hardware parser and thus robs working combinations of the ability to do RSS and other nifty things. It was therefore decided to go with the option of a DT override. v1 -> v2: - Fail if the device does not support changing protocols instead of falling back to the default. (Andrew) - Only call change_tag_protocol on CPU ports. (Andrew/Vladimir) - Only allow changing the protocol on chips that have at least "undocumented" level of support for EDSA. (Andrew). - List the supported protocols in the binding documentation. I opted for only listing the protocols that I have tested. As more people test their drivers, they can add them. (Rob) v2 -> v3: - Rename "dsa,tag-protocol" -> "dsa-tag-protocol". (Rob) - Some cleanups to 4/5. (Vladimir) - Add a comment detailing how tree/driver agreement on the tag protocol is enforced. (Vladimir). ==================== Signed-off-by: David S. Miller commit eb78cacebaf2ff76e787c8b8a0d70eacf6c4fa4e Author: Tobias Waldekranz Date: Tue Apr 20 20:53:11 2021 +0200 dt-bindings: net: dsa: Document dsa-tag-protocol property The 'dsa-tag-protocol' is used to force a switch tree to use a particular tag protocol, typically because the Ethernet controller that it is connected to is not compatible with the default one. Signed-off-by: Tobias Waldekranz Signed-off-by: David S. Miller commit deff710703d80c942c9c85a3f00a053025cfb1e4 Author: Tobias Waldekranz Date: Tue Apr 20 20:53:10 2021 +0200 net: dsa: Allow default tag protocol to be overridden from DT Some combinations of tag protocols and Ethernet controllers are incompatible, and it is hard for the driver to keep track of these. Therefore, allow the device tree author (typically the board vendor) to inform the driver of this fact by selecting an alternate protocol that is known to work. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 21e0b508c8d1fd7f1a4b91794391d1978431e083 Author: Tobias Waldekranz Date: Tue Apr 20 20:53:09 2021 +0200 net: dsa: Only notify CPU ports of changes to the tag protocol Previously DSA ports were also included, on the assumption that the protocol used by the CPU port had to the matched throughout the entire tree. As there is not yet any consumer in need of this, drop the call. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 9a99bef5f87f2fb025e9a51ff4ad820f7b8a9ffb Author: Tobias Waldekranz Date: Tue Apr 20 20:53:08 2021 +0200 net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol For devices that supports both regular and Ethertyped DSA tags, allow the user to change the protocol. Additionally, because there are ethernet controllers that do not handle regular DSA tags in all cases, also allow the protocol to be changed on devices with undocumented support for EDSA. But, in those cases, make sure to log the fact that an undocumented feature has been enabled. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 670bb80f8196ab2189e7f51473da236450dca1aa Author: Tobias Waldekranz Date: Tue Apr 20 20:53:07 2021 +0200 net: dsa: mv88e6xxx: Mark chips with undocumented EDSA tag support All devices are capable of using regular DSA tags. Support for Ethertyped DSA tags sort into three categories: 1. No support. Older chips fall into this category. 2. Full support. Datasheet explicitly supports configuring the CPU port to receive FORWARDs with a DSA tag. 3. Undocumented support. Datasheet lists the configuration from category 2 as "reserved for future use", but does empirically behave like a category 2 device. So, instead of listing the one true protocol that should be used by a particular chip, specify the level of support for EDSA (support for regular DSA is implicit on all chips). As before, we use EDSA for all chips that fully supports it. In upcoming changes, we will use this information to support dynamically changing the tag protocol. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 08322284c1620f01f0ece9907b6125be877e247b Merge: c9ad20573a91e 010bfbe768f7e Author: David S. Miller Date: Tue Apr 20 16:44:04 2021 -0700 Merge tag 'mac80211-next-for-net-next-2021-04-20' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Another set of updates, all over the map: * set sk_pacing_shift for 802.3->802.11 encap offload * some monitor support for 802.11->802.3 decap offload * HE (802.11ax) spec updates * userspace API for TDLS HE support * along with various other small features, cleanups and fixups ==================== Signed-off-by: David S. Miller commit c9ad20573a91ecfce45404bd0e33913b476613c5 Merge: 790aad0eccd20 0a4d0cb1a326c Author: David S. Miller Date: Tue Apr 20 16:43:13 2021 -0700 Merge branch 'mlxsw-refactor-qdisc-offload' Petr Machata says: ==================== mlxsw: Refactor qdisc offload Currently, mlxsw admits for offload a suitable root qdisc, and its children. Thus up to two levels of hierarchy are offloaded. Often, this is enough: one can configure TCs with RED and TCs with a shaper, and can even see counters for each TC by looking at a qdisc at a sufficiently shallow position. While simple, the system has obvious shortcomings. It is not possible to configure both RED and shaping on one TC. It is not possible to place a PRIO below root TBF, which would then be offloaded as port shaper. FIFOs are only offloaded at root or directly below, which is confusing to users, because RED and TBF of course have their own FIFO. This patchset is a step towards the end goal of allowing more comprehensive qdisc tree offload and cleans up the qdisc offload code. - Patches #1-#4 contain small cleanups. - Up until now, since mlxsw offloaded only a very simple qdisc configurations, basically all bookkeeping was done using one container for the root qdisc, and 8 containers for its children. Patches #5, #6, #8 and #9 gradually introduce a more dynamic structure, where parent-child relationships are tracked directly at qdiscs, instead of being implicit. - This tree management assumes only one qdisc is created at a time. In FIFO handlers, this condition was enforced simply by asserting RTNL lock. But instead of furthering this RTNL dependence, patch #7 converts the whole qdisc offload logic to a per-port mutex. - Patch #10 adds a selftest. ==================== Signed-off-by: David S. Miller commit 0a4d0cb1a326cf0070a625036e19871f544f2d25 Author: Petr Machata Date: Tue Apr 20 16:53:48 2021 +0200 selftests: mlxsw: sch_red_ets: Test proper counter cleaning in ETS There was a bug introduced during the rework which cause non-zero backlog being stuck at ETS. Introduce a selftest that would have caught the issue earlier. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 7de85b0431cd46db24f800a67011616ce0aa6120 Author: Petr Machata Date: Tue Apr 20 16:53:47 2021 +0200 mlxsw: spectrum_qdisc: Index future FIFOs by band number mlxsw used to hold an array of qdiscs indexed by the TC number. In the previous patch, it was changed to allocate child qdiscs dynamically, and they are now indexed by band number. Follow suit with the array of future FIFOs. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 5cbd96025330c4dacdf8c0c49203a6ef0aea21a2 Author: Petr Machata Date: Tue Apr 20 16:53:46 2021 +0200 mlxsw: spectrum_qdisc: Allocate child qdiscs dynamically Instead of keeping qdiscs in globally-preallocated arrays, introduce a per-qdisc-kind value num_classes, and then allocate the necessary child qdiscs (if any) based on that value. Since now dynamic allocation is involved, mlxsw_sp_qdisc_replace() gets messy enough that it is worth it to split it to two cases: a new qdisc allocation and a change of existing qdisc. (Note that the change also includes what TC formally calls replace, if the qdisc kind is the same.) Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit cff99e204553c500459712b523d06002a7aae18e Author: Petr Machata Date: Tue Apr 20 16:53:45 2021 +0200 mlxsw: spectrum_qdisc: Guard all qdisc accesses with a lock The FIFO handler currently guards accesses to the future FIFO tracking by asserting RTNL. In the future, the changes to the qdisc state will be more thorough, so other qdiscs will need this guarding is as well. In order to not further the RTNL infestation, instead convert to a custom lock that will guard accesses to the qdisc state. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 51d52ed955509d34d1a57c50efdce1300047f865 Author: Petr Machata Date: Tue Apr 20 16:53:44 2021 +0200 mlxsw: spectrum_qdisc: Track children per qdisc mlxsw currently allows a two-level structure of qdiscs: the root and possibly a number of children. In order to support offloading more general qdisc trees, introduce to struct mlxsw_sp_qdisc a pointer to child qdiscs. Refer to the child qdiscs through this pointer, instead of going through the tclass_qdiscs in qdisc_state. Additionally introduce a field num_classes, which holds number of given qdisc's children. Also introduce a generic function for walking qdisc trees. Rewrite mlxsw_sp_qdisc_find() and _find_by_handle() to use the generic walker. For now, keep the qdisc_state.tclass_qdisc, and just point root_qdiscs's children to this array. Following patches will make the allocation dynamic. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit b21832b56807aa513efcb3b06c5e3e5550d28de1 Author: Petr Machata Date: Tue Apr 20 16:53:43 2021 +0200 mlxsw: spectrum_qdisc: Promote backlog reduction to mlxsw_sp_qdisc_destroy() When a qdisc is removed, it is necessary to update the backlog value at its parent--unless the qdisc is at root position. RED, TBF and FIFO all do that, each separately. Since all of them need to do this, just promote the operation directly to mlxsw_sp_qdisc_destroy(), instead of deferring it to individual destructors. Since FIFO dtor thus becomes trivial, remove it. Add struct mlxsw_sp_qdisc.parent to point at the parent qdisc. This will be handy later as deeper structures are offloaded. Use the parent qdisc to find the chain of parents whose backlog value needs to be updated. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 017a131cdec6d3dd375d353fd25293a21896346d Author: Petr Machata Date: Tue Apr 20 16:53:42 2021 +0200 mlxsw: spectrum_qdisc: Track tclass_num as int, not u8 tclass_num is just a number, a value that would be ordinarily passed around as an int. (Which is unlike a u8 prio_bitmap.) In several places, tclass_num already is an int. Convert the remaining instances. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 549f2aae84ddf574dda36b0bf7e3b4c0872c6675 Author: Petr Machata Date: Tue Apr 20 16:53:41 2021 +0200 mlxsw: spectrum_qdisc: Drop an always-true condition The function mlxsw_sp_qdisc_compare() is invoked a couple lines above this check, which will bounce any requests where this condition does not hold. Therefore drop it. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 290fe2c595fbf9b9099a93528d6f85d3d7d21fa4 Author: Petr Machata Date: Tue Apr 20 16:53:40 2021 +0200 mlxsw: spectrum_qdisc: Simplify mlxsw_sp_qdisc_compare() The purpose of this function is to filter out events that are related to qdiscs that are not offloaded, or are not offloaded anymore. But the function is unnecessarily thorough: - mlxsw_sp_qdisc pointer is never NULL in the context where it is called - Two qdiscs with the same handle will never have different types. Even when replacing one qdisc with another in the same class, Linux will not permit handle reuse unless the qdisc type also matches. Simplify the function by omitting these two unnecessary conditions. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 17c0e6d1757f01ce54c7dee19396053d721ca006 Author: Petr Machata Date: Tue Apr 20 16:53:39 2021 +0200 mlxsw: spectrum_qdisc: Drop one argument from check_params callback The mlxsw_sp_qdisc argument is not used in any of the actual callbacks. Drop it. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 790aad0eccd206643f134bcf724b7078a04f63e0 Author: David S. Miller Date: Tue Apr 20 16:40:08 2021 -0700 korina: Fix build. Signed-off-by: David S. Miller commit b015f4efc4391d656db3d455a8295ee59e269286 Merge: 56e2e5de441a3 a978f7c479ea6 Author: David S. Miller Date: Tue Apr 20 16:27:54 2021 -0700 Merge branch 'marvell-phy-hwmon' Marek Behún says: ==================== net: phy: marvell: some HWMON updates Here are some updates for Marvell PHY HWMON, mainly - refactoring for code deduplication - Amethyst PHY support ==================== Signed-off-by: David S. Miller commit a978f7c479ea68d68a6267a37cbd44362bdd9811 Author: Marek Behún Date: Tue Apr 20 09:54:03 2021 +0200 net: phy: marvell: add support for Amethyst internal PHY Add support for Amethyst internal PHY. The only difference from Peridot is HWMON. Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit c5d015b0e09700bfd8ec120cc8ebe25f6fc5c32e Author: Marek Behún Date: Tue Apr 20 09:54:02 2021 +0200 net: dsa: mv88e6xxx: simulate Amethyst PHY model number Amethyst internal PHYs also report empty model number in MII_PHYSID2. Fill in switch product number, as is done for Topaz and Peridot. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 002181735184a2660fd081abea2ac560896f874b Author: Marek Behún Date: Tue Apr 20 09:54:01 2021 +0200 net: phy: marvell: use assignment by bitwise AND operator Use the &= operator instead of ret = ret & ... Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4f920c299d4c5226f5bc37df8bf288a55bce01a8 Author: Marek Behún Date: Tue Apr 20 09:54:00 2021 +0200 net: phy: marvell: fix HWMON enable register for 6390 Register 27_6.15:14 has the following description in 88E6393X documentation: Temperature Sensor Enable 0x0 - Sample every 1s 0x1 - Sense rate decided by bits 10:8 of this register 0x2 - Use 26_6.5 (One shot Temperature Sample) to enable 0x3 - Disable This is compatible with how the 6390 code uses this register currently, but the 6390 code handles it as two 1-bit registers (somewhat), instead of one register with 4 possible values. (A newer version of the 6390 documentation removed temperature sensor section completely. In an older version, the above mentioned register is reserved, although it is R/W. Since the code works, I think we can assume that it is correct.) Rename this register and define all 4 values according to 6393X documentation. Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit 41d26bf4aba070dfd2ab48866cc27a48ee6228c7 Author: Marek Behún Date: Tue Apr 20 09:53:59 2021 +0200 net: phy: marvell: refactor HWMON OOP style Use a structure of Marvell PHY specific HWMON methods to reduce code duplication. Store a pointer to this structure into the PHY driver's driver_data member. Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit 56e2e5de441a3a6590c94e70d071a6c1790c6124 Author: David S. Miller Date: Tue Apr 20 16:24:26 2021 -0700 korina: Fix conflict with global symbol desc_empty on x86. Signed-off-by: David S. Miller commit ff254dad0e5bbb77636c79501868487299c4bc0a Merge: 316bcffe44798 aeacb52a8de70 Author: David S. Miller Date: Tue Apr 20 16:14:02 2021 -0700 Merge tag 'mlx5-updates-2021-04-19' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-04-19 This patchset provides some updates to mlx5e and mlx5 SW steering drivers: 1) Tariq and Vladyslav they both provide some trivial update to mlx5e netdev. The next 12 patches in the patchset are focused toward mlx5 SW steering: 2) 3 trivial cleanup patches 3) Dynamic Flex parser support: Flex parser is a HW parser that can support protocols that are not natively supported by the HCA, such as Geneve (TLV options) and GTP-U. There are 8 such parsers, and each of them can be assigned to parse a specific set of protocols. 4) Enable matching on Geneve TLV options 5) Use Flex parser for MPLS over UDP/GRE 6) Enable matching on tunnel GTP-U and GTP-U first extension header using 7) Improved QoS for SW steering internal QPair for a better insertion rate ==================== Signed-off-by: David S. Miller commit 316bcffe44798d37144e908dea96ad7f8093114c Author: Xiaoliang Yang Date: Mon Apr 19 18:25:30 2021 +0800 net: dsa: felix: disable always guard band bit for TAS config ALWAYS_GUARD_BAND_SCH_Q bit in TAS config register is descripted as this: 0: Guard band is implemented for nonschedule queues to schedule queues transition. 1: Guard band is implemented for any queue to schedule queue transition. The driver set guard band be implemented for any queue to schedule queue transition before, which will make each GCL time slot reserve a guard band time that can pass the max SDU frame. Because guard band time could not be set in tc-taprio now, it will use about 12000ns to pass 1500B max SDU. This limits each GCL time interval to be more than 12000ns. This patch change the guard band to be only implemented for nonschedule queues to schedule queues transition, so that there is no need to reserve guard band on each GCL. Users can manually add guard band time for each schedule queues in their configuration if they want. Signed-off-by: Xiaoliang Yang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit e655bbf90330684ed377d19a0f3ac87525c292d7 Merge: e9377a911d772 a71acad90a3f0 Author: David S. Miller Date: Tue Apr 20 16:08:02 2021 -0700 Merge branch 'net-generic-selftest-support' Oleksij Rempel says: ==================== provide generic net selftest support changes v3: - make more granular tests - enable loopback for all PHYs by default - fix allmodconfig build errors - poll for link status update after switching to the loopback mode changes v2: - make generic selftests available for all networking devices. - make use of net_selftest* on FEC, ag71xx and all DSA switches. - add loopback support on more PHYs. This patch set provides diagnostic capabilities for some iMX, ag71xx or any DSA based devices. For proper functionality, PHY loopback support is needed. So far there is only initial infrastructure with basic tests. ==================== Signed-off-by: David S. Miller commit a71acad90a3f079685efcb068e2251b912083d68 Author: Oleksij Rempel Date: Mon Apr 19 15:01:06 2021 +0200 net: dsa: enable selftest support for all switches by default Most of generic selftest should be able to work with probably all ethernet controllers. The DSA switches are not exception, so enable it by default at least for DSA. This patch was tested with SJA1105 and AR9331. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit b62a12fc047d5382f1904c29de4f27dfde48ca28 Author: Oleksij Rempel Date: Mon Apr 19 15:01:05 2021 +0200 net: ag71xx: make use of generic NET_SELFTESTS library With this patch the ag71xx on Atheros AR9331 will able to run generic net selftests. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 6016ba345f97d9da485efc5d274d9185fe4e787b Author: Oleksij Rempel Date: Mon Apr 19 15:01:04 2021 +0200 net: fec: make use of generic NET_SELFTESTS library With this patch FEC on iMX will able to run generic net selftests Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 3e1e58d64c3d0a6789f9d865936c4ce46b20f3f5 Author: Oleksij Rempel Date: Mon Apr 19 15:01:03 2021 +0200 net: add generic selftest support Port some parts of the stmmac selftest and reuse it as basic generic selftest library. This patch was tested with following combinations: - iMX6DL FEC -> AT8035 - iMX6DL FEC -> SJA1105Q switch -> KSZ8081 - iMX6DL FEC -> SJA1105Q switch -> KSZ9031 - AR9331 ag71xx -> AR9331 PHY - AR9331 ag71xx -> AR9331 switch -> AR9331 PHY Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit 014068dcb5b17dae110354c4de241833124edba1 Author: Oleksij Rempel Date: Mon Apr 19 15:01:02 2021 +0200 net: phy: genphy_loopback: add link speed configuration In case of loopback, in most cases we need to disable autoneg support and force some speed configuration. Otherwise, depending on currently active auto negotiated link speed, the loopback may or may not work. This patch was tested with following PHYs: TJA1102, KSZ8081, KSZ9031, AT8035, AR9331. Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit f4f86d8d2c04bc0c90f8d944a1fcc30349ba01b3 Author: Oleksij Rempel Date: Mon Apr 19 15:01:01 2021 +0200 net: phy: execute genphy_loopback() per default on all PHYs The generic loopback is really generic and is defined by the 802.3 standard, we should just mandate that drivers implement a custom loopback if the generic one cannot work. Suggested-by: Florian Fainelli Signed-off-by: Oleksij Rempel Signed-off-by: David S. Miller commit be962b2f077e96533ed3080127fcbe60b224638a Author: Gustavo A. R. Silva Date: Tue Apr 20 18:09:02 2021 -0400 dm raid: fix fall-through warning in rs_check_takeover() for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mike Snitzer commit 441ca977a84dadac6173db7c07c25db110b76c1e Author: Yanteng Si Date: Fri Apr 16 18:32:34 2021 +0800 docs/zh_CN: add openrisc translation to zh_CN index This patch add zh_CN/openrisc to zh_CN/index. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/162fb50638028c9b0a92a0ce5c53e691be0cfec2.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit acc6a91a29bfd1c8cb991f93cef84c844b7fd6bf Author: Yanteng Si Date: Fri Apr 16 18:32:33 2021 +0800 docs/zh_CN: add openrisc index.rst translation This patch translates Documentation/openrisc/index.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/f3878525e0d5f94a9c541f5ec8fd31b44a6dc5cd.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 30d0f7d7aa8ce30e93d2db741fddcd9da939b973 Author: Yanteng Si Date: Fri Apr 16 18:32:32 2021 +0800 docs/zh_CN: add openrisc todo.rst translation This patch translates Documentation/openrisc/todo.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/daf5b352ba62a4737148d524bcae0e64756ed6da.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 3f59307f991ba0046df5dd679921139126a7bcec Author: Yanteng Si Date: Fri Apr 16 18:32:31 2021 +0800 docs/zh_CN: add openrisc openrisc_port.rst translation This patch tranlates Documentation/openrisc/openrisc_port.rst into Chinese Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/e116b3020dfd181c15a59ecf41673cd4dbeea3b2.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit aa93de2030648a7556262a7c23867576b9b31b65 Author: Yanteng Si Date: Fri Apr 16 18:32:30 2021 +0800 docs/zh_CN: add core api translation to zh_CN index This patch add zh_CN/core-api to zh_CN/index. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/f23ea90fe88a6ac34d29c6642abe9aceba7ccafb.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 6c5c146cd9af9e0cbabfcfa575b8b76f4c8ffbb2 Author: Yanteng Si Date: Fri Apr 16 18:32:29 2021 +0800 docs/zh_CN: add core-api index.rst translation This patch translates Documentation/core-api/index.rst into Chinese. add Documentation/translations/zh_CN/core-api/irq/* to zh_CN/core-api/index.rst. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/d246fcd092111338d64f6b678dda2cd67fcb3f4a.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit b9b4c38315272a871de14468645a16dc910e4537 Author: Yanteng Si Date: Fri Apr 16 18:32:28 2021 +0800 docs/zh_CN: add core-api irq index.rst translation This patch translates Documentation/core-api/irq/index.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/f6f2edfa645badfdd29122bee3ff0c9577197691.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 83d07650f5af99b4c808212949be232846e4e68c Author: Yanteng Si Date: Fri Apr 16 18:32:27 2021 +0800 docs/zh_CN: add core-api irq irqflags-tracing.rst translation This patch translates Documentation/core-api/irq/irqflags-tracing.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/deb4b3649d7001f7505672cf45813f0064c9a8d0.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 3e77439e691ae925aaa4242ddec676b7108f7130 Author: Yanteng Si Date: Fri Apr 16 18:32:26 2021 +0800 docs/zh_CN: add core-api irq irq-domain.rst translation This patch translates Documentation/core-api/irq/irq-domain.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/86e44d36315228408c8bd97360041a9f59a85462.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit e8ebbdff7b93056d2435d6c4f3d63054313b6c28 Author: Yanteng Si Date: Fri Apr 16 18:32:25 2021 +0800 docs/zh_CN: add core-api irq irq-affinity.rst translation This patch translates Documentation/core-api/irq/irq-affinity.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/d235db96434baf472441877fc8ffca0f6f70a9f5.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit b77e0ce62d63a761ffb7f7245a215a49f5921c2f Author: Yanteng Si Date: Fri Apr 16 18:32:24 2021 +0800 docs/zh_CN: add core-api irq concepts.rst translation This patch translates Documentation/core-api/irq/concepts.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Wu XiangCheng Link: https://lore.kernel.org/r/22babdd7e3fa5121360eff875d005ba5f4647e21.1618568135.git.siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit d044d9fc1380b66917dcb418ef4ec7e59dd6e597 Author: Jiri Olsa Date: Tue Apr 20 15:24:28 2021 +0200 selftests/bpf: Add docs target as all dependency Currently docs target is make dependency for TEST_GEN_FILES, which makes tests to be rebuilt every time you run make. Adding docs as all target dependency, so when running make on top of built selftests it will show just: $ make make[1]: Nothing to be done for 'docs'. After cleaning docs, only docs is rebuilt: $ make docs-clean CLEAN eBPF_helpers-manpage CLEAN eBPF_syscall-manpage $ make GEN ...selftests/bpf/bpf-helpers.rst GEN ...selftests/bpf/bpf-helpers.7 GEN ...selftests/bpf/bpf-syscall.rst GEN ...selftests/bpf/bpf-syscall.2 $ make make[1]: Nothing to be done for 'docs'. Fixes: a01d935b2e09 ("tools/bpf: Remove bpf-helpers from bpftool docs") Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210420132428.15710-1-jolsa@kernel.org commit 6327c911aa69bdf0c5f21a44970eab6dba213dde Author: Gustavo A. R. Silva Date: Tue Apr 20 15:25:51 2021 -0500 drbd: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a break statement instead of just letting the code fall through to the next, and by adding a fallthrough pseudo-keyword in places whre the code is intended to fall through. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe commit 76c50eb70d8e1133eaada0013845619c36345fbc Author: Gustavo A. R. Silva Date: Fri Nov 20 12:26:40 2020 -0600 nfsd: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Chuck Lever commit 28073eb09c5aa29e879490edb88cfd3e7073821e Author: Gustavo A. R. Silva Date: Fri Nov 20 12:25:46 2020 -0600 ima: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Mimi Zohar commit bd5d553653e4151030ad2a94ef39a46b40c75a9b Author: Rafał Miłecki Date: Thu Apr 15 13:21:21 2021 +0200 dt-bindings: thermal: thermal-sensor: require "#thermal-sensor-cells" This property is required for every thermal sensor as it's used when using phandles. Signed-off-by: Rafał Miłecki Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210415112121.4999-1-zajec5@gmail.com commit e5966cf20f0c7e40fd8c208ba1614e1a35a8deee Author: Gustavo A. R. Silva Date: Fri Nov 20 12:25:03 2020 -0600 gfs2: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple goto statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Andreas Gruenbacher commit e06abcc68cb555377efd5aa781c014d3d68498b6 Author: Gustavo A. R. Silva Date: Tue Apr 20 15:11:29 2021 -0500 libata: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Jens Axboe commit 9a89d3ad6d39cbdc9de47f776fc7f7e4b1145c70 Author: Mark Bloch Date: Sun Apr 18 13:59:21 2021 +0300 RDMA/mlx5: Expose private query port Expose a non standard query port via IOCTL that will be used to expose port attributes that are specific to mlx5 devices. The new interface receives a port number to query and returns a structure that contains the available attributes for that port. This will be used to fill the gap between pure DEVX use cases and use cases where a kernel needs to inform userspace about various kernel driver configurations that userspace must use in order to work correctly. Flags is used to indicate which fields are valid on return. MLX5_IB_UAPI_QUERY_PORT_VPORT: The vport number of the queered port. MLX5_IB_UAPI_QUERY_PORT_VPORT_VHCA_ID: The VHCA ID of the vport of the queered port. MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_RX: The vport's RX ICM address used for sw steering. MLX5_IB_UAPI_QUERY_PORT_VPORT_STEERING_ICM_TX: The vport's TX ICM address used for sw steering. MLX5_IB_UAPI_QUERY_PORT_VPORT_REG_C0: The metadata used to tag egress packets of the vport. MLX5_IB_UAPI_QUERY_PORT_ESW_OWNER_VHCA_ID: The E-Switch owner vhca id of the vport. Link: https://lore.kernel.org/r/6e2ef13e5a266a6c037eb0105eb1564c7bb52f23.1618743394.git.leonro@nvidia.com Reviewed-by: Maor Gottlieb Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit aa5b7d11c7cb87c266d705b237368985e7171958 Author: Michael Kelley Date: Tue Apr 20 08:44:19 2021 -0700 video: hyperv_fb: Add ratelimit on error message Due to a full ring buffer, the driver may be unable to send updates to the Hyper-V host. But outputing the error message can make the problem worse because console output is also typically written to the frame buffer. As a result, in some circumstances the error message is output continuously. Break the cycle by rate limiting the error message. Also output the error code for additional diagnosability. Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1618933459-10585-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 77db0ec8b7764cb9b09b78066ebfd47b2c0c1909 Author: Michael Kelley Date: Mon Apr 19 21:48:09 2021 -0700 Drivers: hv: vmbus: Increase wait time for VMbus unload When running in Azure, disks may be connected to a Linux VM with read/write caching enabled. If a VM panics and issues a VMbus UNLOAD request to Hyper-V, the response is delayed until all dirty data in the disk cache is flushed. In extreme cases, this flushing can take 10's of seconds, depending on the disk speed and the amount of dirty data. If kdump is configured for the VM, the current 10 second timeout in vmbus_wait_for_unload() may be exceeded, and the UNLOAD complete message may arrive well after the kdump kernel is already running, causing problems. Note that no problem occurs if kdump is not enabled because Hyper-V waits for the cache flush before doing a reboot through the BIOS/UEFI code. Fix this problem by increasing the timeout in vmbus_wait_for_unload() to 100 seconds. Also output periodic messages so that if anyone is watching the serial console, they won't think the VM is completely hung. Fixes: 911e1987efc8 ("Drivers: hv: vmbus: Add timeout to vmbus_wait_for_unload") Signed-off-by: Michael Kelley Reviewed-by: Vitaly Kuznetsov Link: https://lore.kernel.org/r/1618894089-126662-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 8c2d5e0640e53c14b6240e9bf1e32a2226e6e6ca Author: Andrea Parri (Microsoft) Date: Tue Apr 20 03:43:50 2021 +0200 Drivers: hv: vmbus: Initialize unload_event statically If a malicious or compromised Hyper-V sends a spurious message of type CHANNELMSG_UNLOAD_RESPONSE, the function vmbus_unload_response() will call complete() on an uninitialized event, and cause an oops. Reported-by: Michael Kelley Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20210420014350.2002-1-parri.andrea@gmail.com Signed-off-by: Wei Liu commit 054bd5aeac9ab7f5e1afcabc70eaf4edb33d17cc Author: Christophe JAILLET Date: Tue Apr 20 17:28:33 2021 +0200 RDMA/mlx4: Remove an unused variable 'in6' is unused. It is just declared and filled-in. It can be removed. This is a left over from commit 5ea8bbfc4929 ("mlx4: Implement IP based gids support for RoCE/SRIOV") Link: https://lore.kernel.org/r/413dc6e2ea9d85bda1131bbd6a730b7620839eab.1618932283.git.christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Jason Gunthorpe commit f2a48dd09b8e933f59570692e1382b81d4fddc49 Author: Pavel Begunkov Date: Tue Apr 20 12:03:33 2021 +0100 io_uring: refactor io_sq_offload_create() Just a bit of code tossing in io_sq_offload_create(), so it looks a bit better. No functional changes. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/939776f90de8d2cdd0414e1baa29c8ec0926b561.1618916549.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 07db298a1c96bdba2102d60ad51fcecb961177c9 Author: Pavel Begunkov Date: Tue Apr 20 12:03:32 2021 +0100 io_uring: safer sq_creds putting Put sq_creds as a part of io_ring_ctx_free(), it's easy to miss doing it in io_sq_thread_finish(), especially considering past mistakes related to ring creation failures. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3becb1866467a1de82a97345a0a90d7fb8ff875e.1618916549.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3a0a690235923b838390500fd46edc23bed092e0 Author: Pavel Begunkov Date: Tue Apr 20 12:03:31 2021 +0100 io_uring: move inflight un-tracking into cleanup REQ_F_INFLIGHT deaccounting doesn't do any spinlocking or resource freeing anymore, so it's safe to move it into the normal cleanup flow, i.e. into io_clean_op(), so making it cleaner. Also move io_req_needs_clean() to be first in io_dismantle_req() so it doesn't reload req->flags. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/90653a3a5de4107e3a00536fa4c2ea5f2c38a4ac.1618916549.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 18bb8bbf13c1839b43c9e09e76d397b753989af2 Author: Johannes Thumshirn Date: Mon Apr 19 16:41:02 2021 +0900 btrfs: zoned: automatically reclaim zones When a file gets deleted on a zoned file system, the space freed is not returned back into the block group's free space, but is migrated to zone_unusable. As this zone_unusable space is behind the current write pointer it is not possible to use it for new allocations. In the current implementation a zone is reset once all of the block group's space is accounted as zone unusable. This behaviour can lead to premature ENOSPC errors on a busy file system. Instead of only reclaiming the zone once it is completely unusable, kick off a reclaim job once the amount of unusable bytes exceeds a user configurable threshold between 51% and 100%. It can be set per mounted filesystem via the sysfs tunable bg_reclaim_threshold which is set to 75% by default. Similar to reclaiming unused block groups, these dirty block groups are added to a to_reclaim list and then on a transaction commit, the reclaim process is triggered but after we deleted unused block groups, which will free space for the relocation process. Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1799bb1065ba6e9be0a1562400cd0b9afdcf65e7 Merge: 3a1634daf8cbf ba2fc167e9447 Author: Mark Brown Date: Tue Apr 20 19:30:54 2021 +0100 Merge series "spi: altera: Add DFL bus support for Altera SPI" from matthew.gerlach@linux.intel.com Matthew Gerlach : From: Matthew Gerlach This patch set adds Device Feature List (DFL) bus support for the Altera SPI Master controller. Patch 1 separates spi-altera.c into spi-altera-core.c and spi-altera-platform.c. Patch 2 adds spi-altera-dfl.c. Matthew Gerlach (2): spi: altera: separate core code from platform code spi: altera: Add DFL bus driver for Altera API Controller drivers/spi/Kconfig | 18 +- drivers/spi/Makefile | 4 +- drivers/spi/spi-altera-core.c | 222 ++++++++++++++++++++++ drivers/spi/spi-altera-dfl.c | 204 ++++++++++++++++++++ drivers/spi/spi-altera-platform.c | 172 +++++++++++++++++ drivers/spi/spi-altera.c | 378 -------------------------------------- include/linux/spi/altera.h | 21 +++ 7 files changed, 639 insertions(+), 380 deletions(-) create mode 100644 drivers/spi/spi-altera-core.c create mode 100644 drivers/spi/spi-altera-dfl.c create mode 100644 drivers/spi/spi-altera-platform.c delete mode 100644 drivers/spi/spi-altera.c -- 1.8.3.1 commit 23b16df6c9c91f70df070be43c5b13ef4016c1e7 Merge: 7342db3cddcd1 63f2f9cceb09f Author: Mark Brown Date: Tue Apr 20 19:30:50 2021 +0100 Merge series "ASoC: audio-graph: cleanups" from Kuninori Morimoto : Hi Mark These patches cleanups audio-graph. This is part of prepare for new audio-graph-card2. Kuninori Morimoto (6): ASoC: audio-graph: move audio_graph_card_probe() to simple-card-utils.c ASoC: audio-graph: move audio_graph_remove() to simple-card-utils.c ASoC: audio-graph: check ports if exists ASoC: audio-graph: remove "audio-graph-card," preix support ASoC: audio-graph: remove unused "node" from graph_parse_mclk_fs() ASoC: audio-graph: remove Platform support include/sound/graph_card.h | 4 -- include/sound/simple_card_utils.h | 3 ++ sound/soc/generic/audio-graph-card.c | 52 ++++-------------------- sound/soc/generic/simple-card-utils.c | 25 ++++++++++++ sound/soc/generic/simple-card.c | 7 ---- sound/soc/tegra/tegra_audio_graph_card.c | 4 +- 6 files changed, 38 insertions(+), 57 deletions(-) -- 2.25.1 Thank you for your help !! Best regards --- Kuninori Morimoto commit f33720657d29d6b7282dd2e5e8634e0a39ad372e Author: Johannes Thumshirn Date: Mon Apr 19 16:41:01 2021 +0900 btrfs: rename delete_unused_bgs_mutex to reclaim_bgs_lock As a preparation for extending the block group deletion use case, rename the unused_bgs_mutex to reclaim_bgs_lock. Reviewed-by: Filipe Manana Reviewed-by: Josef Bacik Signed-off-by: Johannes Thumshirn Reviewed-by: David Sterba Signed-off-by: David Sterba commit 01e86008aaa534867a7fb0fcbc116ab085e2b2c6 Author: Johannes Thumshirn Date: Mon Apr 19 16:41:00 2021 +0900 btrfs: zoned: reset zones of relocated block groups When relocating a block group the freed up space is not discarded in one big block, but each extent is discarded on its own with -odisard=sync. For a zoned filesystem we need to discard the whole block group at once, so btrfs_discard_extent() will translate the discard into a REQ_OP_ZONE_RESET operation, which then resets the device's zone. Failure to reset the zone is not fatal error. Discussion about the approach and regarding transaction blocking: https://lore.kernel.org/linux-btrfs/CAL3q7H4SjS_d5rBepfTMhU8Th3bJzdmyYd0g4Z60yUgC_rC_ZA@mail.gmail.com/ Reviewed-by: Josef Bacik Reviewed-by: Filipe Manana Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit e9306ad4ef5c2a09dcb5bf22ba71d1a969de8355 Author: Qu Wenruo Date: Thu Feb 25 09:18:14 2021 +0800 btrfs: more graceful errors/warnings on 32bit systems when reaching limits Btrfs uses internally mapped u64 address space for all its metadata. Due to the page cache limit on 32bit systems, btrfs can't access metadata at or beyond (ULONG_MAX + 1) << PAGE_SHIFT. See how MAX_LFS_FILESIZE and page::index are defined. This is 16T for 4K page size while 256T for 64K page size. Users can have a filesystem which doesn't have metadata beyond the boundary at mount time, but later balance can cause it to create metadata beyond the boundary. And modification to MM layer is unrealistic just for such minor use case. We can't do more than to prevent mounting such filesystem or warn early when the numbers are still within the limits. To address such problem, this patch will introduce the following checks: - Mount time rejection This will reject any fs which has metadata chunk at or beyond the boundary. - Mount time early warning If there is any metadata chunk beyond 5/8th of the boundary, we do an early warning and hope the end user will see it. - Runtime extent buffer rejection If we're going to allocate an extent buffer at or beyond the boundary, reject such request with EOVERFLOW. This is definitely going to cause problems like transaction abort, but we have no better ways. - Runtime extent buffer early warning If an extent buffer beyond 5/8th of the max file size is allocated, do an early warning. Above error/warning message will only be printed once for each fs to reduce dmesg flood. If the mount is rejected, the filesystem will be mountable only on a 64bit host. Link: https://lore.kernel.org/linux-btrfs/1783f16d-7a28-80e6-4c32-fdf19b705ed0@gmx.com/ Reported-by: Erik Jensen Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 944b3a639573796debe3cd47298a5dd79810be73 Author: Prashant Malani Date: Tue Apr 20 10:16:13 2021 -0700 platform/chrome: cros_ec_typec: Handle hard reset The Chrome Embedded Controller (EC) generates a hard reset type C event when a USB Power Delivery (PD) hard reset is encountered. Handle this event by unregistering the partner and cable on the associated port and clearing the event flag. Cc: Benson Leung Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210420171617.3830902-2-pmalani@chromium.org commit 67880f1bc342ed4c94e72cad7f8ca76e5121aae3 Author: Prashant Malani Date: Tue Apr 20 10:16:11 2021 -0700 platform/chrome: cros_ec: Add Type C hard reset Update the EC command header to include the new event bit. This bit is included in the latest version of the Chrome EC headers[1]. [1] https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/include/ec_commands.h Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210420171617.3830902-1-pmalani@chromium.org commit 670160fea22c587b384d56698bbb661fa4801534 Author: Prashant Malani Date: Tue Apr 20 10:10:09 2021 -0700 platform/chrome: cros_ec_typec: Track port role Stash the currently reported port role in the port struct and add a check for that too while determining whether to re-configure on-board Type C switches (this deals with cases like role swaps where the mux flags don't change, but the port role does). Signed-off-by: Prashant Malani Suggested-by: Nikunj A. Dadhania Tested-by: Deepti Deshatty Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210420171008.3829549-1-pmalani@chromium.org commit 0dc16ef4f6c2708407fab6d141908d46a3b737bc Author: Filipe Manana Date: Wed Apr 14 14:05:26 2021 +0100 btrfs: zoned: fix unpaired block group unfreeze during device replace When doing a device replace on a zoned filesystem, if we find a block group with ->to_copy == 0, we jump to the label 'done', which will result in later calling btrfs_unfreeze_block_group(), even though at this point we never called btrfs_freeze_block_group(). Since at this point we have neither turned the block group to RO mode nor made any progress, we don't need to jump to the label 'done'. So fix this by jumping instead to the label 'skip' and dropping our reference on the block group before the jump. Fixes: 78ce9fc269af6e ("btrfs: zoned: mark block groups to copy for device-replace") CC: stable@vger.kernel.org # 5.12 Reviewed-by: Johannes Thumshirn Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f9690f426b2134cc3e74bfc5d9dfd6a4b2ca5281 Author: Filipe Manana Date: Tue Apr 20 10:55:44 2021 +0100 btrfs: fix race when picking most recent mod log operation for an old root Commit dbcc7d57bffc0c ("btrfs: fix race when cloning extent buffer during rewind of an old root"), fixed a race when we need to rewind the extent buffer of an old root. It was caused by picking a new mod log operation for the extent buffer while getting a cloned extent buffer with an outdated number of items (off by -1), because we cloned the extent buffer without locking it first. However there is still another similar race, but in the opposite direction. The cloned extent buffer has a number of items that does not match the number of tree mod log operations that are going to be replayed. This is because right after we got the last (most recent) tree mod log operation to replay and before locking and cloning the extent buffer, another task adds a new pointer to the extent buffer, which results in adding a new tree mod log operation and incrementing the number of items in the extent buffer. So after cloning we have mismatch between the number of items in the extent buffer and the number of mod log operations we are going to apply to it. This results in hitting a BUG_ON() that produces the following stack trace: ------------[ cut here ]------------ kernel BUG at fs/btrfs/tree-mod-log.c:675! invalid opcode: 0000 [#1] SMP KASAN PTI CPU: 3 PID: 4811 Comm: crawl_1215 Tainted: G W 5.12.0-7d1efdf501f8-misc-next+ #99 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014 RIP: 0010:tree_mod_log_rewind+0x3b1/0x3c0 Code: 05 48 8d 74 10 (...) RSP: 0018:ffffc90001027090 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffff8880a8514600 RCX: ffffffffaa9e59b6 RDX: 0000000000000007 RSI: dffffc0000000000 RDI: ffff8880a851462c RBP: ffffc900010270e0 R08: 00000000000000c0 R09: ffffed1004333417 R10: ffff88802199a0b7 R11: ffffed1004333416 R12: 000000000000000e R13: ffff888135af8748 R14: ffff88818766ff00 R15: ffff8880a851462c FS: 00007f29acf62700(0000) GS:ffff8881f2200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0e6013f718 CR3: 000000010d42e003 CR4: 0000000000170ee0 Call Trace: btrfs_get_old_root+0x16a/0x5c0 ? lock_downgrade+0x400/0x400 btrfs_search_old_slot+0x192/0x520 ? btrfs_search_slot+0x1090/0x1090 ? free_extent_buffer.part.61+0xd7/0x140 ? free_extent_buffer+0x13/0x20 resolve_indirect_refs+0x3e9/0xfc0 ? lock_downgrade+0x400/0x400 ? __kasan_check_read+0x11/0x20 ? add_prelim_ref.part.11+0x150/0x150 ? lock_downgrade+0x400/0x400 ? __kasan_check_read+0x11/0x20 ? lock_acquired+0xbb/0x620 ? __kasan_check_write+0x14/0x20 ? do_raw_spin_unlock+0xa8/0x140 ? rb_insert_color+0x340/0x360 ? prelim_ref_insert+0x12d/0x430 find_parent_nodes+0x5c3/0x1830 ? stack_trace_save+0x87/0xb0 ? resolve_indirect_refs+0xfc0/0xfc0 ? fs_reclaim_acquire+0x67/0xf0 ? __kasan_check_read+0x11/0x20 ? lockdep_hardirqs_on_prepare+0x210/0x210 ? fs_reclaim_acquire+0x67/0xf0 ? __kasan_check_read+0x11/0x20 ? ___might_sleep+0x10f/0x1e0 ? __kasan_kmalloc+0x9d/0xd0 ? trace_hardirqs_on+0x55/0x120 btrfs_find_all_roots_safe+0x142/0x1e0 ? find_parent_nodes+0x1830/0x1830 ? trace_hardirqs_on+0x55/0x120 ? ulist_free+0x1f/0x30 ? btrfs_inode_flags_to_xflags+0x50/0x50 iterate_extent_inodes+0x20e/0x580 ? tree_backref_for_extent+0x230/0x230 ? release_extent_buffer+0x225/0x280 ? read_extent_buffer+0xdd/0x110 ? lock_downgrade+0x400/0x400 ? __kasan_check_read+0x11/0x20 ? lock_acquired+0xbb/0x620 ? __kasan_check_write+0x14/0x20 ? do_raw_spin_unlock+0xa8/0x140 ? _raw_spin_unlock+0x22/0x30 ? release_extent_buffer+0x225/0x280 iterate_inodes_from_logical+0x129/0x170 ? iterate_inodes_from_logical+0x129/0x170 ? btrfs_inode_flags_to_xflags+0x50/0x50 ? iterate_extent_inodes+0x580/0x580 ? __vmalloc_node+0x92/0xb0 ? init_data_container+0x34/0xb0 ? init_data_container+0x34/0xb0 ? kvmalloc_node+0x60/0x80 btrfs_ioctl_logical_to_ino+0x158/0x230 btrfs_ioctl+0x2038/0x4360 ? __kasan_check_write+0x14/0x20 ? mmput+0x3b/0x220 ? btrfs_ioctl_get_supported_features+0x30/0x30 ? __kasan_check_read+0x11/0x20 ? __kasan_check_read+0x11/0x20 ? lock_release+0xc8/0x650 ? __might_fault+0x64/0xd0 ? __kasan_check_read+0x11/0x20 ? lock_downgrade+0x400/0x400 ? lockdep_hardirqs_on_prepare+0x210/0x210 ? lockdep_hardirqs_on_prepare+0x13/0x210 ? _raw_spin_unlock_irqrestore+0x51/0x63 ? __kasan_check_read+0x11/0x20 ? do_vfs_ioctl+0xfc/0x9d0 ? ioctl_file_clone+0xe0/0xe0 ? lock_downgrade+0x400/0x400 ? lockdep_hardirqs_on_prepare+0x210/0x210 ? __kasan_check_read+0x11/0x20 ? lock_release+0xc8/0x650 ? __task_pid_nr_ns+0xd3/0x250 ? __kasan_check_read+0x11/0x20 ? __fget_files+0x160/0x230 ? __fget_light+0xf2/0x110 __x64_sys_ioctl+0xc3/0x100 do_syscall_64+0x37/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f29ae85b427 Code: 00 00 90 48 8b (...) RSP: 002b:00007f29acf5fcf8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f29acf5ff40 RCX: 00007f29ae85b427 RDX: 00007f29acf5ff48 RSI: 00000000c038943b RDI: 0000000000000003 RBP: 0000000001000000 R08: 0000000000000000 R09: 00007f29acf60120 R10: 00005640d5fc7b00 R11: 0000000000000246 R12: 0000000000000003 R13: 00007f29acf5ff48 R14: 00007f29acf5ff40 R15: 00007f29acf5fef8 Modules linked in: ---[ end trace 85e5fce078dfbe04 ]--- (gdb) l *(tree_mod_log_rewind+0x3b1) 0xffffffff819e5b21 is in tree_mod_log_rewind (fs/btrfs/tree-mod-log.c:675). 670 * the modification. As we're going backwards, we do the 671 * opposite of each operation here. 672 */ 673 switch (tm->op) { 674 case BTRFS_MOD_LOG_KEY_REMOVE_WHILE_FREEING: 675 BUG_ON(tm->slot < n); 676 fallthrough; 677 case BTRFS_MOD_LOG_KEY_REMOVE_WHILE_MOVING: 678 case BTRFS_MOD_LOG_KEY_REMOVE: 679 btrfs_set_node_key(eb, &tm->key, tm->slot); (gdb) quit The following steps explain in more detail how it happens: 1) We have one tree mod log user (through fiemap or the logical ino ioctl), with a sequence number of 1, so we have fs_info->tree_mod_seq == 1. This is task A; 2) Another task is at ctree.c:balance_level() and we have eb X currently as the root of the tree, and we promote its single child, eb Y, as the new root. Then, at ctree.c:balance_level(), we call: ret = btrfs_tree_mod_log_insert_root(root->node, child, true); 3) At btrfs_tree_mod_log_insert_root() we create a tree mod log operation of type BTRFS_MOD_LOG_KEY_REMOVE_WHILE_FREEING, with a ->logical field pointing to ebX->start. We only have one item in eb X, so we create only one tree mod log operation, and store in the "tm_list" array; 4) Then, still at btrfs_tree_mod_log_insert_root(), we create a tree mod log element of operation type BTRFS_MOD_LOG_ROOT_REPLACE, ->logical set to ebY->start, ->old_root.logical set to ebX->start, ->old_root.level set to the level of eb X and ->generation set to the generation of eb X; 5) Then btrfs_tree_mod_log_insert_root() calls tree_mod_log_free_eb() with "tm_list" as argument. After that, tree_mod_log_free_eb() calls tree_mod_log_insert(). This inserts the mod log operation of type BTRFS_MOD_LOG_KEY_REMOVE_WHILE_FREEING from step 3 into the rbtree with a sequence number of 2 (and fs_info->tree_mod_seq set to 2); 6) Then, after inserting the "tm_list" single element into the tree mod log rbtree, the BTRFS_MOD_LOG_ROOT_REPLACE element is inserted, which gets the sequence number 3 (and fs_info->tree_mod_seq set to 3); 7) Back to ctree.c:balance_level(), we free eb X by calling btrfs_free_tree_block() on it. Because eb X was created in the current transaction, has no other references and writeback did not happen for it, we add it back to the free space cache/tree; 8) Later some other task B allocates the metadata extent from eb X, since it is marked as free space in the space cache/tree, and uses it as a node for some other btree; 9) The tree mod log user task calls btrfs_search_old_slot(), which calls btrfs_get_old_root(), and finally that calls tree_mod_log_oldest_root() with time_seq == 1 and eb_root == eb Y; 10) The first iteration of the while loop finds the tree mod log element with sequence number 3, for the logical address of eb Y and of type BTRFS_MOD_LOG_ROOT_REPLACE; 11) Because the operation type is BTRFS_MOD_LOG_ROOT_REPLACE, we don't break out of the loop, and set root_logical to point to tm->old_root.logical, which corresponds to the logical address of eb X; 12) On the next iteration of the while loop, the call to tree_mod_log_search_oldest() returns the smallest tree mod log element for the logical address of eb X, which has a sequence number of 2, an operation type of BTRFS_MOD_LOG_KEY_REMOVE_WHILE_FREEING and corresponds to the old slot 0 of eb X (eb X had only 1 item in it before being freed at step 7); 13) We then break out of the while loop and return the tree mod log operation of type BTRFS_MOD_LOG_ROOT_REPLACE (eb Y), and not the one for slot 0 of eb X, to btrfs_get_old_root(); 14) At btrfs_get_old_root(), we process the BTRFS_MOD_LOG_ROOT_REPLACE operation and set "logical" to the logical address of eb X, which was the old root. We then call tree_mod_log_search() passing it the logical address of eb X and time_seq == 1; 15) But before calling tree_mod_log_search(), task B locks eb X, adds a key to eb X, which results in adding a tree mod log operation of type BTRFS_MOD_LOG_KEY_ADD, with a sequence number of 4, to the tree mod log, and increments the number of items in eb X from 0 to 1. Now fs_info->tree_mod_seq has a value of 4; 16) Task A then calls tree_mod_log_search(), which returns the most recent tree mod log operation for eb X, which is the one just added by task B at the previous step, with a sequence number of 4, a type of BTRFS_MOD_LOG_KEY_ADD and for slot 0; 17) Before task A locks and clones eb X, task A adds another key to eb X, which results in adding a new BTRFS_MOD_LOG_KEY_ADD mod log operation, with a sequence number of 5, for slot 1 of eb X, increments the number of items in eb X from 1 to 2, and unlocks eb X. Now fs_info->tree_mod_seq has a value of 5; 18) Task A then locks eb X and clones it. The clone has a value of 2 for the number of items and the pointer "tm" points to the tree mod log operation with sequence number 4, not the most recent one with a sequence number of 5, so there is mismatch between the number of mod log operations that are going to be applied to the cloned version of eb X and the number of items in the clone; 19) Task A then calls tree_mod_log_rewind() with the clone of eb X, the tree mod log operation with sequence number 4 and a type of BTRFS_MOD_LOG_KEY_ADD, and time_seq == 1; 20) At tree_mod_log_rewind(), we set the local variable "n" with a value of 2, which is the number of items in the clone of eb X. Then in the first iteration of the while loop, we process the mod log operation with sequence number 4, which is targeted at slot 0 and has a type of BTRFS_MOD_LOG_KEY_ADD. This results in decrementing "n" from 2 to 1. Then we pick the next tree mod log operation for eb X, which is the tree mod log operation with a sequence number of 2, a type of BTRFS_MOD_LOG_KEY_REMOVE_WHILE_FREEING and for slot 0, it is the one added in step 5 to the tree mod log tree. We go back to the top of the loop to process this mod log operation, and because its slot is 0 and "n" has a value of 1, we hit the BUG_ON: (...) switch (tm->op) { case BTRFS_MOD_LOG_KEY_REMOVE_WHILE_FREEING: BUG_ON(tm->slot < n); fallthrough; (...) Fix this by checking for a more recent tree mod log operation after locking and cloning the extent buffer of the old root node, and use it as the first operation to apply to the cloned extent buffer when rewinding it. Stable backport notes: due to moved code and renames, in =< 5.11 the change should be applied to ctree.c:get_old_root. Reported-by: Zygo Blaxell Link: https://lore.kernel.org/linux-btrfs/20210404040732.GZ32440@hungrycats.org/ Fixes: 834328a8493079 ("Btrfs: tree mod log's old roots could still be part of the tree") CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit eb372672295450caa34875d64415735b26e7888a Author: Jens Axboe Date: Tue Apr 20 11:24:22 2021 -0600 io-wq: remove unused io_wqe_need_worker() function A previous commit removed the need for this, but overlooked that we no longer use it at all. Get rid of it. Fixes: 685fe7feedb9 ("io-wq: eliminate the need for a manager thread") Reported-by: kernel test robot Signed-off-by: Jens Axboe commit 67addf29004c5be9fa0383c82a364bb59afc7f84 Author: Filipe Manana Date: Tue Apr 20 10:55:12 2021 +0100 btrfs: fix metadata extent leak after failure to create subvolume When creating a subvolume we allocate an extent buffer for its root node after starting a transaction. We setup a root item for the subvolume that points to that extent buffer and then attempt to insert the root item into the root tree - however if that fails, due to ENOMEM for example, we do not free the extent buffer previously allocated and we do not abort the transaction (as at that point we did nothing that can not be undone). This means that we effectively do not return the metadata extent back to the free space cache/tree and we leave a delayed reference for it which causes a metadata extent item to be added to the extent tree, in the next transaction commit, without having backreferences. When this happens 'btrfs check' reports the following: $ btrfs check /dev/sdi Opening filesystem to check... Checking filesystem on /dev/sdi UUID: dce2cb9d-025f-4b05-a4bf-cee0ad3785eb [1/7] checking root items [2/7] checking extents ref mismatch on [30425088 16384] extent item 1, found 0 backref 30425088 root 256 not referenced back 0x564a91c23d70 incorrect global backref count on 30425088 found 1 wanted 0 backpointer mismatch on [30425088 16384] owner ref check failed [30425088 16384] ERROR: errors found in extent allocation tree or chunk allocation [3/7] checking free space cache [4/7] checking fs roots [5/7] checking only csums items (without verifying data) [6/7] checking root refs [7/7] checking quota groups skipped (not enabled on this FS) found 212992 bytes used, error(s) found total csum bytes: 0 total tree bytes: 131072 total fs tree bytes: 32768 total extent tree bytes: 16384 btree space waste bytes: 124669 file data blocks allocated: 65536 referenced 65536 So fix this by freeing the metadata extent if btrfs_insert_root() returns an error. CC: stable@vger.kernel.org # 4.4+ Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5a4a8235fee69b5a31cf1c56a9fa14b0d21a930c Author: Zhen Lei Date: Tue Apr 6 17:19:12 2021 +0800 thermal/drivers/ti-soc-thermal/ti-bandgap: Rearrange all the included header files alphabetically For the sake of lisibility, reorder the header files alphabetically. Signed-off-by: Zhen Lei Reviewed-by: Keerthy Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210406091912.2583-2-thunder.leizhen@huawei.com commit 3a1634daf8cbf7d1e76b120fea9665325557be8c Author: Shivamurthy Shastri Date: Mon Apr 19 20:40:15 2021 +0000 spidev: Add Micron SPI NOR Authenta device compatible Add compatible string for Micron SPI NOR Authenta device. Signed-off-by: Shivamurthy Shastri Link: https://lore.kernel.org/r/20210419204015.1769-1-sshivamurthy@micron.com Signed-off-by: Mark Brown commit 7d82f89c39ad3193893d36924fc1f8d44f3dc612 Author: Rafał Miłecki Date: Fri Apr 16 21:47:23 2021 +0200 spi: brcm,spi-bcm-qspi: convert to the json-schema This helps validating DTS files. Changes that require mentioning: 1. reg-names "mspi_regs" and "bspi_regs" were renamed to "mspi" and "bspi" as that is what's used in DTS files and in Linux driver 2. interrupt-names Names were reordered. "mspi_done" has to go first as it's always required. 3. spi-rx-bus-width Property description was dropped as it's part of the spi-controller.yaml 4. Examples: * drop partitions as they are well documented elsewhere * regs and interrupts were formatted and reordered to match yaml * <0x1c> was replaced with <&gic> * "m25p80" node name became "flash" * dropped invalid "m25p,fast-read" property * dropped undocumented and Linux-unused "clock-names" This rewritten binding validates cleanly using the "dt_binding_check". Some Linux stored DTS files will require reordering regs and interrupts to make dtbs_check happy. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210416194723.23855-1-zajec5@gmail.com Signed-off-by: Mark Brown commit ba2fc167e9447596a812e828842d0130ea9cd0e4 Author: Matthew Gerlach Date: Fri Apr 16 09:57:20 2021 -0700 spi: altera: Add DFL bus driver for Altera API Controller This patch adds a Device Feature List (DFL) bus driver for the Altera SPI Master controller. The SPI master is connected to an Intel SPI Slave to Avalon Bridge inside an Intel MAX10 BMC Chip. Signed-off-by: Matthew Gerlach Link: https://lore.kernel.org/r/20210416165720.554144-3-matthew.gerlach@linux.intel.com Signed-off-by: Mark Brown commit b0c3d9354de1f87eebc00694d5218b6611265933 Author: Matthew Gerlach Date: Fri Apr 16 09:57:19 2021 -0700 spi: altera: separate core code from platform code In preparation of adding support for a new bus type, separate the core spi-altera code from the platform driver code. Signed-off-by: Matthew Gerlach Link: https://lore.kernel.org/r/20210416165720.554144-2-matthew.gerlach@linux.intel.com Signed-off-by: Mark Brown commit 7342db3cddcd1d8ff54f4dff8c942e04232f1d6d Author: Viorel Suman Date: Tue Apr 20 18:44:13 2021 +0800 ASoC: ak4458: enable daisy chain Enable Daisy Chain if in TDM mode and the number of played channels is bigger than the maximum supported number of channels. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1618915453-29445-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 63f2f9cceb09f8e5f668e36c1cf764eea468ebed Author: Kuninori Morimoto Date: Mon Apr 19 11:02:43 2021 +0900 ASoC: audio-graph: remove Platform support Platform was one of mandatory component on ASoC before, and audio-graph-card was assuming that CPU and Platform were same driver. But it is no longer mandatory on ASoC. Current ASoC will just ignore if Platform and CPU were same or doplicated component. Of course ASoC is supporting Platform, but current audio-graph-card doesn't support detecting it from DT. This means current audio-graph-card operation for Platform so far is 100% useless. This patch removes it. We can respawn it when we need it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sg3n3ubg.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 67800ae93982eb4496f446cfd06f98ba7382ce36 Author: Kuninori Morimoto Date: Mon Apr 19 11:02:38 2021 +0900 ASoC: audio-graph: remove unused "node" from graph_parse_mclk_fs() graph_parse_mclk_fs() has "node", but is not used. This patch removes unused "node" Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tuo33ubl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 14d78d74d7bc47c6ff3a66fb9d405084de7b6b02 Author: Kuninori Morimoto Date: Mon Apr 19 11:02:34 2021 +0900 ASoC: audio-graph: remove "audio-graph-card, " preix support No upstream code is using "audio-graph-card," preix, and Yaml base Document doesn't indicate it. Let's remove it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v98j3ubp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6769ea1e4315999624ce4637c9c338b9d88a85e6 Author: Kuninori Morimoto Date: Mon Apr 19 11:02:29 2021 +0900 ASoC: audio-graph: check ports if exists "endpoint" and "port" are always exists, but there is no guarantee for "ports". This patch checks "ports" if exists, otherwise, it might set un-expected settings. This patch also do align to 100 char in 1 line. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87wnsz3ubu.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f6fcc820e0c96664e2f21c0d6bb60630243ef36a Author: Kuninori Morimoto Date: Mon Apr 19 11:02:25 2021 +0900 ASoC: audio-graph: move audio_graph_remove() to simple-card-utils.c audio-graph-card2 can reuse audio_graph_remove() / asoc_simple_remove(). This patch moves it to simple-card-utils.c. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y2df3uby.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1a456b1c6be13514a8fc5c1a99e6763f491d17e9 Author: Kuninori Morimoto Date: Mon Apr 19 11:02:19 2021 +0900 ASoC: audio-graph: move audio_graph_card_probe() to simple-card-utils.c audio-graph-card2 can reuse audio_graph_card_probe(). This patch moves it to simple-card-utils.c. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zgxv3uc4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4085ae809334f036ec01790d1bac41a8ec3116da Merge: 979a265264d18 182a71a3653c4 Author: Marc Zyngier Date: Tue Apr 20 17:22:10 2021 +0100 Merge branch 'kvm-arm64/ptp' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 182a71a3653c4324672fd87e4384fae2fbd63269 Author: Zenghui Yu Date: Sat Apr 17 19:38:04 2021 +0800 KVM: arm64: Fix Function ID typo for PTP_KVM service Per include/linux/arm-smccc.h, the Function ID of PTP_KVM service is defined as ARM_SMCCC_VENDOR_HYP_KVM_PTP_FUNC_ID. Fix the typo in documentation to keep the git grep consistent. Signed-off-by: Zenghui Yu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210417113804.1992-1-yuzenghui@huawei.com commit a86ed2cfa13c5175eb082c50a644f6bf29ac65cc Author: Jon Hunter Date: Tue Apr 20 14:24:19 2021 +0100 ptp: Don't print an error if ptp_kvm is not supported Commit 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64") enable ptp_kvm support for ARM platforms and for any ARM platform that does not support this, the following error message is displayed ... ERR KERN fail to initialize ptp_kvm For platforms that do not support ptp_kvm this error is a bit misleading and so fix this by only printing this message if the error returned by kvm_arch_ptp_init() is not -EOPNOTSUPP. Note that -EOPNOTSUPP is only returned by ARM platforms today if ptp_kvm is not supported. Fixes: 300bb1fe7671 ("ptp: arm/arm64: Enable ptp_kvm for arm/arm64") Signed-off-by: Jon Hunter Acked-by: Richard Cochran Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210420132419.1318148-1-jonathanh@nvidia.com commit 366f0a30c8a01e79255221539a52909cc4c7bd25 Author: Dan Carpenter Date: Tue Apr 20 11:44:02 2021 +0300 platform/surface: aggregator: fix a bit test The "funcs" variable is a u64. If "func" is more than 31 then the BIT() shift will wrap instead of testing the high bits. Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem") Reported-by: kernel test robot Signed-off-by: Dan Carpenter Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/YH6UUhJhGk3mk13b@mwanda Signed-off-by: Hans de Goede commit dd5566d6d80c2d9936f8b8b36a7a9599cbfe47a7 Author: Hans de Goede Date: Mon Apr 19 16:31:09 2021 +0200 platform/x86: intel_pmc_core: Fix "unsigned 'ret' is never less than zero" smatch warning Change the type of ret form a size_t to a ssize_t, matching the prototype of simple_write_to_buffer(), fixing this warning reported by smatch: drivers/platform/x86/intel_pmc_core.c:1369 pmc_core_lpm_latch_mode_write() warn: unsigned 'ret' is never less than zero. Fixes: 8074a79fad2e ("platform/x86: intel_pmc_core: Add option to set/clear LPM mode") Cc: David E. Box Reported-by: kernel test robot Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210419143109.30612-1-hdegoede@redhat.com commit cfd577acb769301b19c31361d45ae1f145318b7a Author: Colin Ian King Date: Tue Apr 20 14:47:19 2021 +0100 ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails Currently when the call to usb_urb_ep_type_check fails (returning -EINVAL) the error return path returns -ENOMEM via the exit label "error". Other uses of the same error exit label set the err variable to -ENOMEM but this is not being used. I believe the original intent was for the error exit path to return the value in err rather than the hard coded -ENOMEM, so return this rather than the hard coded -ENOMEM. Addresses-Coverity: ("Unused value") Fixes: 738d9edcfd44 ("ALSA: usb-audio: Add sanity checks for invalid EPs") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210420134719.381409-1-colin.king@canonical.com Signed-off-by: Takashi Iwai commit 57b93ed435e6de049d190b5c1052c35d4b223631 Author: Dima Stepanov Date: Mon Apr 19 09:37:22 2021 +0200 block/rnbd: Use strscpy instead of strlcpy During checkpatch analyzing the following warning message was found: WARNING:STRLCPY: Prefer strscpy over strlcpy - see: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Fix it by using strscpy calls instead of strlcpy. Signed-off-by: Dima Stepanov Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210419073722.15351-20-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 3db7cf55d532a15ea26b4a14e8f8729ccd96fd22 Author: Dima Stepanov Date: Mon Apr 19 09:37:21 2021 +0200 block/rnbd-clt-sysfs: Remove copy buffer overlap in rnbd_clt_get_path_name cppcheck report the following error: rnbd/rnbd-clt-sysfs.c:522:36: error: The variable 'buf' is used both as a parameter and as destination in snprintf(). The origin and destination buffers overlap. Quote from glibc (C-library) documentation (http://www.gnu.org/software/libc/manual/html_mono/libc.html#Formatted-Output-Functions): "If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined." [sprintfOverlappingData] Fix it by initializing the buf variable in the first snprintf call. Fixes: 91f4acb2801c ("block/rnbd-clt: support mapping two devices") Signed-off-by: Dima Stepanov Cc: Arnd Bergmann Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210419073722.15351-19-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 503438a4f29e83bd21af60288ae6a6644af5de6f Author: Jack Wang Date: Mon Apr 19 09:37:20 2021 +0200 block/rnbd-clt: Remove max_segment_size We always map with SZ_4K, so do not need max_segment_size. Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Gioh Kim Acked-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20210419073722.15351-18-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 3ba1c6935c6f0529df993a485f07a1dc45265f21 Author: Md Haris Iqbal Date: Mon Apr 19 09:37:19 2021 +0200 block/rnbd-clt: Generate kobject_uevent when the rnbd device state changes When an RTRS session state changes, the transport layer generates an event to RNBD. Then RNBD will change the state of the RNBD client device accordingly. This commit add kobject_uevent when the RNBD device state changes. With this udev rules can be configured to react accordingly. Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Link: https://lore.kernel.org/r/20210419073722.15351-17-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit c81cba85512ef584c0b5896015d9c964a9086ea3 Author: Gioh Kim Date: Mon Apr 19 09:37:18 2021 +0200 block/rnbd-srv: Remove unused arguments of rnbd_srv_rdma_ev struct rtrs_srv is not used when handling rnbd_srv_rdma_ev messages, so cleaned up rdma_ev function pointer in rtrs_srv_ops also is changed. Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Signed-off-by: Aleksei Marov Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Reviewed-by: Chaitanya Kulkarni Acked-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20210419073722.15351-16-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 015fcf13c41f5dc06132e96540755fcf3f32e72f Author: Gioh Kim Date: Mon Apr 19 09:37:17 2021 +0200 Documentation/ABI/rnbd-clt: Add description for nr_poll_queues describe how to set nr_poll_queues and enable the polling Signed-off-by: Gioh Kim Acked-by: Jack Wang Link: https://lore.kernel.org/r/20210419073722.15351-15-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 2958a995edc94654df690318df7b9b49e5a3ef88 Author: Gioh Kim Date: Mon Apr 19 09:37:16 2021 +0200 block/rnbd-clt: Support polling mode for IO latency optimization RNBD can make double-queues for irq-mode and poll-mode. For example, on 4-CPU system 8 request-queues are created, 4 for irq-mode and 4 for poll-mode. If the IO has HIPRI flag, the block-layer will call .poll function of RNBD. Then IO is sent to the poll-mode queue. Add optional nr_poll_queues argument for map_devices interface. To support polling of RNBD, RTRS client creates connections for both of irq-mode and direct-poll-mode. For example, on 4-CPU system it could've create 5 connections: con[0] => user message (softirq cq) con[1:4] => softirq cq After this patch, it can create 9 connections: con[0] => user message (softirq cq) con[1:4] => softirq cq con[5:8] => DIRECT-POLL cq Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Acked-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20210419073722.15351-14-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 12b06533104e802df73c1fbe159437c19933d6c0 Author: Gioh Kim Date: Mon Apr 19 09:37:15 2021 +0200 block/rnbd-clt: Fix missing a memory free when unloading the module When unloading the rnbd-clt module, it does not free a memory including the filename of the symbolic link to /sys/block/rnbdX. It is found by kmemleak as below. unreferenced object 0xffff9f1a83d3c740 (size 16): comm "bash", pid 736, jiffies 4295179665 (age 9841.310s) hex dump (first 16 bytes): 21 64 65 76 21 6e 75 6c 6c 62 30 40 62 6c 61 00 !dev!nullb0@bla. backtrace: [<0000000039f0c55e>] 0xffffffffc0456c24 [<000000001aab9513>] kernfs_fop_write+0xcf/0x1c0 [<00000000db5aa4b3>] vfs_write+0xdb/0x1d0 [<000000007a2e2207>] ksys_write+0x65/0xe0 [<00000000055e280a>] do_syscall_64+0x50/0x1b0 [<00000000c2b51831>] entry_SYSCALL_64_after_hwframe+0x49/0xbe Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20210419073722.15351-13-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit ce9d2b4f7bbeec818766f1e809816ba37b9aa4fa Author: Tom Rix Date: Mon Apr 19 09:37:14 2021 +0200 block/rnbd-clt: Improve find_or_create_sess() return check clang static analysis reports this problem rnbd-clt.c:1212:11: warning: Branch condition evaluates to a garbage value else if (!first) ^~~~~~ This is triggered in the find_and_get_or_create_sess() call because the variable first is not initialized and the earlier check is specifically for if (sess == ERR_PTR(-ENOMEM)) This is false positive. But the if-check can be reduced by initializing first to false and then returning if the call to find_or_creat_sess() does not set it to true. When it remains false, either sess will be valid or not. The not case is caught by find_and_get_or_create_sess()'s caller rnbd_clt_map_device() sess = find_and_get_or_create_sess(...); if (IS_ERR(sess)) return ERR_CAST(sess); Since find_and_get_or_create_sess() initializes first to false setting it in find_or_create_sess() is not needed. Signed-off-by: Tom Rix Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Link: https://lore.kernel.org/r/20210419073722.15351-12-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit c77bfa8f5dbd3f8bbb99a751bab00ebcc229a5c5 Author: Gioh Kim Date: Mon Apr 19 09:37:13 2021 +0200 block/rnbd-srv: Remove force_close file after holding a lock We changed the rnbd_srv_sess_dev_force_close to use try-lock because rnbd_srv_sess_dev_force_close and process_msg_close can generate a deadlock. Now rnbd_srv_sess_dev_force_close would do nothing if it fails to get the lock. So removing the force_close file should be moved to after the lock. Or the force_close file is removed but the others are not removed. Signed-off-by: Gioh Kim Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20210419073722.15351-11-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit b168e1d85cf3201663698dd9dcb3d46c7e67f621 Author: Gioh Kim Date: Mon Apr 19 09:37:12 2021 +0200 block/rnbd-srv: Prevent a deadlock generated by accessing sysfs in parallel We got a warning message below. When server tries to close one session by force, it locks the sysfs interface and locks the srv_sess lock. The problem is that client can send a request to close at the same time. By close request, server locks the srv_sess lock and locks the sysfs to remove the sysfs interfaces. The simplest way to prevent that situation could be just use mutex_trylock. [ 234.153965] ====================================================== [ 234.154093] WARNING: possible circular locking dependency detected [ 234.154219] 5.4.84-storage #5.4.84-1+feature+linux+5.4.y+dbg+20201216.1319+b6b887b~deb10 Tainted: G O [ 234.154381] ------------------------------------------------------ [ 234.154531] kworker/1:1H/618 is trying to acquire lock: [ 234.154651] ffff8887a09db0a8 (kn->count#132){++++}, at: kernfs_remove_by_name_ns+0x40/0x80 [ 234.154819] but task is already holding lock: [ 234.154965] ffff8887ae5f6518 (&srv_sess->lock){+.+.}, at: rnbd_srv_rdma_ev+0x144/0x1590 [rnbd_server] [ 234.155132] which lock already depends on the new lock. [ 234.155311] the existing dependency chain (in reverse order) is: [ 234.155462] -> #1 (&srv_sess->lock){+.+.}: [ 234.155614] __mutex_lock+0x134/0xcb0 [ 234.155761] rnbd_srv_sess_dev_force_close+0x36/0x50 [rnbd_server] [ 234.155889] rnbd_srv_dev_session_force_close_store+0x69/0xc0 [rnbd_server] [ 234.156042] kernfs_fop_write+0x13f/0x240 [ 234.156162] vfs_write+0xf3/0x280 [ 234.156278] ksys_write+0xba/0x150 [ 234.156395] do_syscall_64+0x62/0x270 [ 234.156513] entry_SYSCALL_64_after_hwframe+0x49/0xbe [ 234.156632] -> #0 (kn->count#132){++++}: [ 234.156782] __lock_acquire+0x129e/0x23a0 [ 234.156900] lock_acquire+0xf3/0x210 [ 234.157043] __kernfs_remove+0x42b/0x4c0 [ 234.157161] kernfs_remove_by_name_ns+0x40/0x80 [ 234.157282] remove_files+0x3f/0xa0 [ 234.157399] sysfs_remove_group+0x4a/0xb0 [ 234.157519] rnbd_srv_destroy_dev_session_sysfs+0x19/0x30 [rnbd_server] [ 234.157648] rnbd_srv_rdma_ev+0x14c/0x1590 [rnbd_server] [ 234.157775] process_io_req+0x29a/0x6a0 [rtrs_server] [ 234.157924] __ib_process_cq+0x8c/0x100 [ib_core] [ 234.158709] ib_cq_poll_work+0x31/0xb0 [ib_core] [ 234.158834] process_one_work+0x4e5/0xaa0 [ 234.158958] worker_thread+0x65/0x5c0 [ 234.159078] kthread+0x1e0/0x200 [ 234.159194] ret_from_fork+0x24/0x30 [ 234.159309] other info that might help us debug this: [ 234.159513] Possible unsafe locking scenario: [ 234.159658] CPU0 CPU1 [ 234.159775] ---- ---- [ 234.159891] lock(&srv_sess->lock); [ 234.160005] lock(kn->count#132); [ 234.160128] lock(&srv_sess->lock); [ 234.160250] lock(kn->count#132); [ 234.160364] *** DEADLOCK *** [ 234.160536] 3 locks held by kworker/1:1H/618: [ 234.160677] #0: ffff8883ca1ed528 ((wq_completion)ib-comp-wq){+.+.}, at: process_one_work+0x40a/0xaa0 [ 234.160840] #1: ffff8883d2d5fe10 ((work_completion)(&cq->work)){+.+.}, at: process_one_work+0x40a/0xaa0 [ 234.161003] #2: ffff8887ae5f6518 (&srv_sess->lock){+.+.}, at: rnbd_srv_rdma_ev+0x144/0x1590 [rnbd_server] [ 234.161168] stack backtrace: [ 234.161312] CPU: 1 PID: 618 Comm: kworker/1:1H Tainted: G O 5.4.84-storage #5.4.84-1+feature+linux+5.4.y+dbg+20201216.1319+b6b887b~deb10 [ 234.161490] Hardware name: Supermicro H8QG6/H8QG6, BIOS 3.00 09/04/2012 [ 234.161643] Workqueue: ib-comp-wq ib_cq_poll_work [ib_core] [ 234.161765] Call Trace: [ 234.161910] dump_stack+0x96/0xe0 [ 234.162028] check_noncircular+0x29e/0x2e0 [ 234.162148] ? print_circular_bug+0x100/0x100 [ 234.162267] ? register_lock_class+0x1ad/0x8a0 [ 234.162385] ? __lock_acquire+0x68e/0x23a0 [ 234.162505] ? trace_event_raw_event_lock+0x190/0x190 [ 234.162626] __lock_acquire+0x129e/0x23a0 [ 234.162746] ? register_lock_class+0x8a0/0x8a0 [ 234.162866] lock_acquire+0xf3/0x210 [ 234.162982] ? kernfs_remove_by_name_ns+0x40/0x80 [ 234.163127] __kernfs_remove+0x42b/0x4c0 [ 234.163243] ? kernfs_remove_by_name_ns+0x40/0x80 [ 234.163363] ? kernfs_fop_readdir+0x3b0/0x3b0 [ 234.163482] ? strlen+0x1f/0x40 [ 234.163596] ? strcmp+0x30/0x50 [ 234.163712] kernfs_remove_by_name_ns+0x40/0x80 [ 234.163832] remove_files+0x3f/0xa0 [ 234.163948] sysfs_remove_group+0x4a/0xb0 [ 234.164068] rnbd_srv_destroy_dev_session_sysfs+0x19/0x30 [rnbd_server] [ 234.164196] rnbd_srv_rdma_ev+0x14c/0x1590 [rnbd_server] [ 234.164345] ? _raw_spin_unlock_irqrestore+0x43/0x50 [ 234.164466] ? lockdep_hardirqs_on+0x1a8/0x290 [ 234.164597] ? mlx4_ib_poll_cq+0x927/0x1280 [mlx4_ib] [ 234.164732] ? rnbd_get_sess_dev+0x270/0x270 [rnbd_server] [ 234.164859] process_io_req+0x29a/0x6a0 [rtrs_server] [ 234.164982] ? rnbd_get_sess_dev+0x270/0x270 [rnbd_server] [ 234.165130] __ib_process_cq+0x8c/0x100 [ib_core] [ 234.165279] ib_cq_poll_work+0x31/0xb0 [ib_core] [ 234.165404] process_one_work+0x4e5/0xaa0 [ 234.165550] ? pwq_dec_nr_in_flight+0x160/0x160 [ 234.165675] ? do_raw_spin_lock+0x119/0x1d0 [ 234.165796] worker_thread+0x65/0x5c0 [ 234.165914] ? process_one_work+0xaa0/0xaa0 [ 234.166031] kthread+0x1e0/0x200 [ 234.166147] ? kthread_create_worker_on_cpu+0xc0/0xc0 [ 234.166268] ret_from_fork+0x24/0x30 [ 234.251591] rnbd_server L243: : Device closed [ 234.604221] rnbd_server L264: RTRS Session close_device_session disconnected Signed-off-by: Gioh Kim Signed-off-by: Md Haris Iqbal Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20210419073722.15351-10-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 9f455eeafde3d81cf36ea9979ca6596cf808bcf2 Author: Gioh Kim Date: Mon Apr 19 09:37:11 2021 +0200 block/rnbd-clt: Replace {NO_WAIT,WAIT} with RTRS_PERMIT_{WAIT,NOWAIT} They are defined with the same value and similar meaning, let's remove one of them, then we can remove {WAIT,NOWAIT}. Also change the type of 'wait' from 'int' to 'enum wait_type' to make it clear. Cc: Leon Romanovsky Cc: linux-rdma@vger.kernel.org Signed-off-by: Guoqing Jiang Reviewed-by: Md Haris Iqbal Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Reviewed-by: Chaitanya Kulkarni Acked-by: Jason Gunthorpe Reviewed-by: Leon Romanovsky Link: https://lore.kernel.org/r/20210419073722.15351-9-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit d16b5ac87454996f9fae6d49be0fdcbcb7dbdd58 Author: Guoqing Jiang Date: Mon Apr 19 09:37:10 2021 +0200 block/rnbd: Kill destroy_device_cb We can use destroy_device directly since destroy_device_cb is just the wrapper of destroy_device. Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210419073722.15351-8-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 8e43c90a268b9e6fd1529ddda7d61477dd78f1f2 Author: Guoqing Jiang Date: Mon Apr 19 09:37:09 2021 +0200 block/rnbd: Kill rnbd_clt_destroy_default_group No need to have it since we can call sysfs_remove_group in the rnbd_clt_destroy_sysfs_files. Then rnbd_clt_destroy_sysfs_files is paired with it's counterpart rnbd_clt_create_sysfs_files. Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210419073722.15351-7-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit d0a70ab10b9cbd4a9e272f4eebe2c07e2e5943cb Author: Guoqing Jiang Date: Mon Apr 19 09:37:08 2021 +0200 block/rnbd-clt: Move add_disk(dev->gd) to rnbd_clt_setup_gen_disk It makes more sense to add gendisk in rnbd_clt_setup_gen_disk, instead of do it in rnbd_clt_map_device. Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210419073722.15351-6-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 8b7f05114b3446e71b69f5d74d1ef8a92980793e Author: Guoqing Jiang Date: Mon Apr 19 09:37:07 2021 +0200 block/rnbd-clt: Remove some arguments from rnbd_client_setup_device Remove them since both sess and idx can be dereferenced from dev. And sess is not used in the function. Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210419073722.15351-5-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit 02ee80f5fea4d9539446af7d7ff8faafdadedd61 Author: Guoqing Jiang Date: Mon Apr 19 09:37:06 2021 +0200 block/rnbd-clt: Remove some arguments from insert_dev_if_not_exists_devpath Remove 'pathname' and 'sess' since we can dereference it from 'dev'. Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210419073722.15351-4-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit e5f221c701dc81705f50999bc052f71a27efef31 Author: Gioh Kim Date: Mon Apr 19 09:37:05 2021 +0200 Documentation/sysfs-block-rnbd: Add descriptions for remap_device and resize Two sysfs entries, remap_device and resize, are missing. Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Link: https://lore.kernel.org/r/20210419073722.15351-3-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit ceeb7218c6b3b0d7c514f86aadd7d3fb94343d2d Author: Danil Kipnis Date: Mon Apr 19 09:37:04 2021 +0200 MAINTAINERS: Change maintainer for rnbd module Danil steps down, Haris will take over. Also update email address to ionos.com, the old cloud.ionos.com will still work for some time. Signed-off-by: Danil Kipnis Acked-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Link: https://lore.kernel.org/r/20210419073722.15351-2-gi-oh.kim@ionos.com Signed-off-by: Jens Axboe commit b53002e03559e97fdfb18d1c2b36c218d7bb742f Author: Colin Ian King Date: Thu Apr 15 14:00:20 2021 +0100 floppy: remove redundant assignment to variable st The variable st is being assigned 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: Denis Efremov Acked-by: Willy Tarreau Link: https://lore.kernel.org/r/20210415130020.1959951-1-colin.king@canonical.com Signed-off-by: Jens Axboe commit a720e11f0a9a016266c8757f06e72622bea86a54 Author: Denis Efremov Date: Fri Apr 16 11:34:49 2021 +0300 floppy: cleanups: remove FLOPPY_SILENT_DCL_CLEAR undef FLOPPY_SILENT_DCL_CLEAR is not defined anywhere and comes from pre-git era. Just drop this undef. There is FD_SILENT_DCL_CLEAR which is really used. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20210416083449.72700-6-efremov@linux.com Signed-off-by: Jens Axboe commit fa6b885e876ed4d29d1513fcf2d8bdc5c4b3b527 Author: Denis Efremov Date: Fri Apr 16 11:34:48 2021 +0300 floppy: cleanups: use memcpy() to copy reply_buffer Use memcpy() in raw_cmd_done() to copy reply_buffer instead of a for loop. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20210416083449.72700-5-efremov@linux.com Signed-off-by: Jens Axboe commit f6df18f20d5bd496c4c2cb7564853cb60543332a Author: Denis Efremov Date: Fri Apr 16 11:34:47 2021 +0300 floppy: cleanups: use memset() to zero reply_buffer Use memset() to zero reply buffer in raw_cmd_copyin() instead of a for loop. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20210416083449.72700-4-efremov@linux.com Signed-off-by: Jens Axboe commit 67c07161c5035a68eccd3922b11cb9839f28c8a3 Author: Denis Efremov Date: Fri Apr 16 11:34:46 2021 +0300 floppy: cleanups: use ST0 as reply_buffer index 0 Use ST0 as 0 index for reply_buffer array. get_fdc_version() is the only function that uses index 0 directly instead of the ST0 define. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20210416083449.72700-3-efremov@linux.com Signed-off-by: Jens Axboe commit ab50200ab04d105017b1bed8787f44b8725cb39a Author: Denis Efremov Date: Fri Apr 16 11:34:45 2021 +0300 floppy: cleanups: remove trailing whitespaces Cleanup trailing whitespaces as checkpatch.pl suggests. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20210416083449.72700-2-efremov@linux.com Signed-off-by: Jens Axboe commit 43d8766372f49a2f40339e4e95abaa63bcc10905 Author: Krzysztof Kozlowski Date: Mon Apr 19 18:33:36 2021 +0200 power: supply: bq256xx: add kerneldoc for structure members Document members of structure to fix W=1 warnings like: drivers/power/supply/bq256xx_charger.c:240: warning: Function parameter or member 'charger' not described in 'bq256xx_device' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 4667d52fad3b1c99ac6c9271a49d84c92a14cbc2 Author: Krzysztof Kozlowski Date: Mon Apr 19 18:33:35 2021 +0200 power: supply: act8945a: correct kerneldoc Remove incorrect kerneldoc marker to fix W=1 warning: drivers/power/supply/act8945a_charger.c:22: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 6dfbb2cece78fc54a3f8bd116dbe20cf3bc63df1 Author: Krzysztof Kozlowski Date: Mon Apr 19 18:33:34 2021 +0200 power: supply: max17040: remove unneeded double cast There is no need for double explicit cast from of_device_get_match_data() (uintptr_t and then to target enum) because implicit conversion from uintptr_t to enum is straightforward (uintptr_t is a integer type). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit a837f35c5ae0b0fb2b2b6bc1765b7be5a44b0a19 Author: Krzysztof Kozlowski Date: Mon Apr 19 18:33:33 2021 +0200 power: supply: max17040: handle device_property_read_u8_array() failure The device_property_read_u8_array() call should not fail because it is preceded with device_property_count_u8() and check for number of readable u8 values. However the code is more obvious and easier to read if the return value of device_property_read_u8_array() is checked. Otherwise reader needs to investigate whether really there is no risk of using random stack values of 'rcomp' variable. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 01dcfe7849875db439d24600d6d89ef40ae97eac Author: Krzysztof Kozlowski Date: Mon Apr 19 18:33:32 2021 +0200 power: supply: max14577: remove unneeded variable initialization The local 'current_bits' variable does not have to be initialized because all cases in following switch() either return or initialize it. Addresses-Coverity: Unused value Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 9049572fb145746725b198a19e27fa2671b80448 Author: Guenter Roeck Date: Tue Apr 20 04:08:30 2021 -0700 hwmon: Remove amd_energy driver Commit 60268b0e8258 ("hwmon: (amd_energy) modify the visibility of the counters") restricted visibility of AMD energy counters to work around a side-channel attack using energy data to determine which instructions are executed. The attack is described in 'PLATYPUS: Software-based Power Side-Channel Attacks on x86'. It relies on quick and accurate energy readings. This change made the counters provided by the amd_energy driver effectively unusable for non-provileged users. However, unprivileged read access is the whole point of hardware monitoring attributes. An attempt to remedy the situation by limiting and randomizing access to chip registers was rejected by AMD. Since the driver is for all practical purposes unusable, remove it. Cc: Naveen Krishna Chatradhi Cc: Greg Kroah-Hartman Acked-by: Greg Kroah-Hartman Signed-off-by: Guenter Roeck commit e1576396a7a0c1657326ec20ca50599bdc4def0d Author: Guenter Roeck Date: Mon Apr 19 10:59:48 2021 -0700 hwmon: Clarify scope of attribute access Hardware monitoring sysfs attributes are used and displayed by unrestricted userspace applications. Standard attributes therefore have to be world readable, since otherwise those userspace applications would either have to run as super-user or display an error. None of those makes sense. Clarify the expected scope of attribute access in the ABI document. Cc: Naveen Krishna Chatradhi Signed-off-by: Guenter Roeck commit b94ca77eeae79258bc7497ebe47bb5c085acf002 Author: Guenter Roeck Date: Mon Apr 19 23:07:07 2021 -0700 hwmon: (pmbus) Introduce PMBUS symbol namespace Exported pmbus symbols are only supposed to be used from PMBus code. Introduce PMBUS symbol namespace to prevent misuse from other code. Signed-off-by: Guenter Roeck commit 1e4063329fe865380177945efed3a42c0bbbfa05 Author: Erik Rosen Date: Mon Apr 19 12:12:51 2021 +0200 hwmon: (pmbus) Add pmbus driver for MAX15301 Add pmbus driver support for Maxim MAX15301 InTune Automatically Compensated Digital PoL Controller with Driver and PMBus Telemetry Even though the specification does not specifically mention it, extensive empirical testing has revealed that auto-detection of limit-registers will fail in a random fashion unless the delay parameter is set to above about 80us. The default delay is set to 100us to include some safety margin. This patch is tested on a Flex BMR461 converter module. Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210419101251.24840-1-erik.rosen@metormote.com [groeck: Added rationale for delay to driver header] Signed-off-by: Guenter Roeck commit bab10bf90aaa20a95d629c2406411770acbfaf08 Author: Armin Wolf Date: Sat Apr 17 23:09:20 2021 +0200 hwmon: (sch5627) Remove unnecessary error path Calling remove() on error whould have only unregistered the watchdog, and since a failure in registering him is considered non-fatal and happens last, remove the error path and return the error codes directly. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20210417210920.15496-3-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit 93a6fb2c9135a14a6675bcb9a0250c307eae1af6 Author: Armin Wolf Date: Sat Apr 17 23:09:19 2021 +0200 hwmon: (sch5627) Use devres function Use devm_hwmon_device_register_with_info() and remove hwmon_dev from sch5627_data struct as it is not needed anymore. Signed-off-by: Armin Wolf Link: https://lore.kernel.org/r/20210417210920.15496-2-W_Armin@gmx.de Reviewed-by: Hans de Goede Signed-off-by: Guenter Roeck commit f025314306ae17a3fdaf2874d7e878ce19cea363 Author: Paul Fertser Date: Fri Apr 16 13:29:04 2021 +0300 hwmon: (pmbus/pxe1610) don't bail out when not all pages are active Certain VRs might be configured to use only the first output channel and so the mode for the second will be 0. Handle this gracefully. Fixes: b9fa0a3acfd8 ("hwmon: (pmbus/core) Add support for vid mode detection per page bases") Signed-off-by: Paul Fertser Link: https://lore.kernel.org/r/20210416102926.13614-1-fercerpav@gmail.com Signed-off-by: Guenter Roeck commit 1734b4135a62fd2402232346b809e99177ea6b4c Author: Václav Kubernát Date: Wed Apr 14 10:00:17 2021 +0200 hwmon: Add driver for fsp-3y PSUs and PDUs This patch adds support for these devices: - YH-5151E - the PDU - YM-2151E - the PSU The device datasheet says that the devices support PMBus 1.2, but in my testing, a lot of the commands aren't supported and if they are, they sometimes behave strangely or inconsistently. For example, writes to the PAGE command requires using PEC, otherwise the write won't work and the page won't switch, even though, the standard says that PEC is optional. On the other hand, writes to SMBALERT don't require PEC. Because of this, the driver is mostly reverse engineered with the help of a tool called pmbus_peek written by David Brownell (and later adopted by my colleague Jan Kundrát). The device also has some sort of a timing issue when switching pages, which is explained further in the code. Because of this, the driver support is limited. It exposes only the values that have been tested to work correctly. Signed-off-by: Václav Kubernát Link: https://lore.kernel.org/r/20210414080019.3530794-1-kubernat@cesnet.cz [groeck: Fixed up "missing braces around initializer" from 0-day] Signed-off-by: Guenter Roeck commit 25b000a80bd79f037de56a76d62dbf1cca0db63a Author: Matthew Gerlach Date: Tue Apr 13 15:58:35 2021 -0700 hwmon: (intel-m10-bmc-hwmon) add sensor support of Intel D5005 card Like the Intel N3000 card, the Intel D5005 has a MAX10 based BMC. This commit adds support for the D5005 sensors that are monitored by the MAX10 BMC. Signed-off-by: Matthew Gerlach Signed-off-by: Russ Weight Acked-by: Lee Jones Reviewed-by: Tom Rix Link: https://lore.kernel.org/r/20210413225835.459662-3-matthew.gerlach@linux.intel.com Signed-off-by: Guenter Roeck commit 790ac8fab116b31e0ff389f8a1c26fefe09000fa Author: Armin Wolf Date: Sun Apr 11 18:42:25 2021 +0200 hwmon: (sch5627) Split sch5627_update_device() An error in sch5627_update_device() could cause sch5627_read() to fail even if the error did not affect the target sensor type. Split sch5627_update_device() to prevent that. Tested on a Fujitsu Esprimo P720. Signed-off-by: Armin Wolf Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210411164225.11967-3-W_Armin@gmx.de Signed-off-by: Guenter Roeck commit e7e0b466a8489288795e3bb0f93acde5b2e6ffa2 Author: Armin Wolf Date: Sun Apr 11 18:42:24 2021 +0200 hwmon: (sch5627) Convert to hwmon_device_register_with_info() hwmon_device_register() is deprecated. Convert driver to use hwmon_device_register_with_info() and remove sysfs attributes which are now being handled by the hwmon subsystem. Channel handling was inspired by corsair-cpro. Tested on a Fujitsu Esprimo P720. Signed-off-by: Armin Wolf Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210411164225.11967-2-W_Armin@gmx.de [groeck: Replaced 0 with NULL] Signed-off-by: Guenter Roeck commit c3dd4b7d1e09a09d496b1084a89413cb1f523fa2 Author: Jiapeng Chong Date: Tue Apr 13 14:02:50 2021 +0800 hwmon: (nct6683) remove useless function Fix the following clang warning: drivers/hwmon/nct6683.c:491:19: warning: unused function 'in_to_reg' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1618293770-55307-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Guenter Roeck commit 807b8c29db4f80198ae83ff722ec592a460bfcdf Author: Sebastian Oechsle Date: Sun Apr 11 11:57:41 2021 +0200 hwmon: (dell-smm) Add Dell Latitude E7440 to fan control whitelist Allow manual PWM control on Dell Latitude E7440. Reviewed-by: Pali Rohár Link: https://lore.kernel.org/r/20210411095741.zmllsuc7pevdipvy@icloud.com Signed-off-by: Sebastian Oechsle Signed-off-by: Guenter Roeck commit e3b65ffa13bd040757fd4910f2dcd2c93f553d76 Author: Guenter Roeck Date: Fri Apr 9 23:26:23 2021 -0700 MAINTAINERS: Add keyword pattern for hwmon registration functions A pattern match for hardware monitoring registration functions ensures that hardware monitoring maintainers are copied whenever hardware monitoring drivers are added to the tree. Reviewed-by: Jean Delvare Signed-off-by: Guenter Roeck commit f7bf7eb2d734d25a5883a6832eeebc40d7816b3f Author: Vadim Pasternak Date: Mon Mar 22 19:22:37 2021 +0200 hwmon: (mlxreg-fan) Add support for fan drawers capability and present registers Add support for fan drawer's capability and present registers in order to set mapping between the fan drawers and tachometers. Some systems are equipped with fan drawers with one tachometer inside. Others with fan drawers with several tachometers inside. Using present register along with tachometer-to-drawer mapping allows to skip reading missed tachometers and expose input for them as zero, instead of exposing fault code returned by hardware. Signed-off-by: Vadim Pasternak Link: https://lore.kernel.org/r/20210322172237.2213584-1-vadimp@nvidia.com Signed-off-by: Guenter Roeck commit cb3d37b59012d8ed20864799ea8d0a2373967e69 Author: Erik Rosen Date: Mon Mar 22 20:37:34 2021 +0100 hwmon: (pmbus/tps53679) Add support for TI TPS53676 Add support for TI TPS53676 controller to the tps53679 pmbus driver The driver uses the USER_DATA_03 register to figure out how many phases are enabled and to which channel they are assigned, and sets the number of pages and phases accordingly. Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210322193734.75127-3-erik.rosen@metormote.com Signed-off-by: Guenter Roeck commit fd1edbd398629bf7d70226b9b84861e9701e2e84 Author: Erik Rosen Date: Thu Mar 18 22:24:40 2021 +0100 dt-bindings: Add trivial device entry for TPS53676 Add trivial device entry for TPS53676 Signed-off-by: Erik Rosen Reviewed-by: Guenter Roeck Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210318212441.69050-2-erik.rosen@metormote.com Signed-off-by: Guenter Roeck commit 73a76220e45e1a65c72a4b83774d63bd12cf3b1b Author: Bhaskar Chowdhury Date: Tue Mar 23 10:04:38 2021 +0530 hwmon: (ftsteutates) Rudimentary typo fixes s/Temprature/Temperature/ s/revsion/revision/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210323043438.1321903-1-unixbhaskar@gmail.com Signed-off-by: Guenter Roeck commit 15b2703e5e02301323e27a3c534fbc9431a7bf98 Author: Chris Packham Date: Wed Mar 17 17:02:31 2021 +1300 hwmon: (pmbus) Add driver for BluTek BPA-RS600 The BPA-RS600 is a compact 600W AC to DC removable power supply module. Signed-off-by: Chris Packham Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210317040231.21490-3-chris.packham@alliedtelesis.co.nz [groeck: Added bpa-rs600 to index.rst] Signed-off-by: Guenter Roeck commit 90e85e6309ffa8ba377148fe075acca99b61e92b Author: Chris Packham Date: Wed Mar 17 17:02:29 2021 +1300 dt-bindings: Add vendor prefix and trivial device for BluTek BPA-RS600 Add vendor prefix "blutek" for BluTek Power. Add trivial device entry for BPA-RS600. Signed-off-by: Chris Packham Reviewed-by: Guenter Roeck Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210317040231.21490-1-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit 1f4d4af4d7a1c794a4f003f75fcfd38fafb5dff3 Author: Guenter Roeck Date: Sun Mar 21 20:49:10 2021 -0700 hwmon: replace snprintf in show functions with sysfs_emit coccicheck complains about the use of snprintf() in sysfs show functions. drivers/hwmon/ina3221.c:701:8-16: WARNING: use scnprintf or sprintf This results in a large number of patch submissions. Fix it all in one go using the following coccinelle rules. Use sysfs_emit instead of scnprintf or sprintf since that makes more sense. @depends on patch@ identifier show, dev, attr, buf; @@ ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> } @depends on patch@ identifier show, dev, attr, buf, rc; @@ ssize_t show(struct device *dev, struct device_attribute *attr, char *buf) { <... rc = - snprintf(buf, \( PAGE_SIZE \| PAGE_SIZE - 1 \), + sysfs_emit(buf, ...); ...> } While at it, remove unnecessary braces and as well as unnecessary else after return statements to address checkpatch warnings in the resulting patch. Cc: Zihao Tang Cc: Jay Fang Signed-off-by: Guenter Roeck commit f807e8be46991a5a58774a4d6344359b01c949e8 Author: Chris Packham Date: Wed Mar 17 17:02:30 2021 +1300 hwmon: (pmbus) Replace - with _ in device names before registration The hwmon sysfs ABI requires that the `name` property doesn't include any dashes. But when the pmbus code picks the name up from the device tree it quite often does. Replace '-' with '_' before registering the device. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20210317040231.21490-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit 82e3430dfa8c32f35ce24a5c628e3e221f168769 Author: Jonas Malaco Date: Fri Mar 19 01:55:44 2021 -0300 hwmon: add driver for NZXT Kraken X42/X52/X62/X72 These are "all-in-one" CPU liquid coolers that can be monitored and controlled through a proprietary USB HID protocol. While the models have differently sized radiators and come with varying numbers of fans, they are all indistinguishable at the software level. The driver exposes fan/pump speeds and coolant temperature through the standard hwmon sysfs interface. Fan and pump control, while supported by the devices, are not currently exposed. The firmware accepts up to 61 trip points per channel (fan/pump), but the same set of trip temperatures has to be maintained for both; with pwmX_auto_point_Y_temp attributes, users would need to maintain this invariant themselves. Instead, fan and pump control, as well as LED control (which the device also supports for 9 addressable RGB LEDs on the CPU water block) are left for existing and already mature user-space tools, which can still be used alongside the driver, thanks to hidraw. A link to one, which I also maintain, is provided in the documentation. The implementation is based on USB traffic analysis. It has been runtime tested on x86_64, both as a built-in driver and as a module. Signed-off-by: Jonas Malaco Link: https://lore.kernel.org/r/20210319045544.416138-1-jonas@protocubo.io [groeck: Removed unnecessary spinlock.h include] Signed-off-by: Guenter Roeck commit af9a973040bd5c27dfa1c7b5e970b7cf9238b530 Author: Zihao Tang Date: Tue Mar 16 19:00:57 2021 +0800 hwmon: (ina2xx) Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/hwmon/ina2xx.c:313:8-16: WARNING: use scnprintf or sprintf drivers/hwmon/ina2xx.c:453:8-16: WARNING: use scnprintf or sprintf drivers/hwmon/ina2xx.c:484:8-16: WARNING: use scnprintf or sprintf drivers/hwmon/ina2xx.c:540:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1615892457-35501-1-git-send-email-f.fangjian@huawei.com Signed-off-by: Guenter Roeck commit 9d2227bb9bd4ae799e77c0575452e7e5716658ea Author: Guenter Roeck Date: Thu Mar 18 12:06:19 2021 -0700 hwmon: Use kobj_to_dev() coccinelle complains about WARNING opportunity for kobj_to_dev() in several files, resulting in one-by-one patch submissions. Handle all remaining instances in one go. Signed-off-by: Guenter Roeck commit f3e3464ec893409189cb1a0657c2eca31ca82504 Author: Tian Tao Date: Thu Mar 18 09:55:04 2021 +0800 hwmon: (ds1621) Use kobj_to_dev() fixed the following coccicheck: ./drivers/hwmon/ds1621.c:329:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1616032504-59817-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Guenter Roeck commit 23bc3caf42bd0f140182ba60cc68d7872e81aeea Author: zuoqilin Date: Thu Mar 18 20:46:37 2021 +0800 hwmon: (ftsteutates) Fix spelling typo Change 'revsion' to 'revision'. Signed-off-by: zuoqilin Link: https://lore.kernel.org/r/20210318124637.1331-1-zuoqilin1@163.com Signed-off-by: Guenter Roeck commit c2d5f273c505d12ebe98d795eb4a152b3c935566 Author: Wilken Gottwalt Date: Thu Mar 18 15:17:14 2021 +0100 hwmon: (corsair-psu) add support for critical values Adds support for reading the critical values of the temperature sensors and the rail sensors (voltage and current) once and caches them. Updates the naming of the constants following a more clear scheme. Also updates the documentation and fixes some typos. Updates is_visible and ops_read functions to be more readable. The new sensors output of a Corsair HX850i will look like this: corsairpsu-hid-3-1 Adapter: HID adapter v_in: 230.00 V v_out +12v: 12.14 V (crit min = +8.41 V, crit max = +15.59 V) v_out +5v: 5.03 V (crit min = +3.50 V, crit max = +6.50 V) v_out +3.3v: 3.30 V (crit min = +2.31 V, crit max = +4.30 V) psu fan: 0 RPM vrm temp: +46.2°C (crit = +70.0°C) case temp: +39.8°C (crit = +70.0°C) power total: 152.00 W power +12v: 108.00 W power +5v: 41.00 W power +3.3v: 5.00 W curr +12v: 9.00 A (crit max = +85.00 A) curr +5v: 8.31 A (crit max = +40.00 A) curr +3.3v: 1.62 A (crit max = +40.00 A) Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/YFNg6vGk3sQmyqgB@monster.powergraphx.local Signed-off-by: Guenter Roeck commit 42bfe7dd0f9918fb796049e2d159dedc6865f480 Author: Erik Rosen Date: Thu Feb 18 12:52:49 2021 +0100 hwmon: (pmbus/stpddc60) Add ST STPDDC60 pmbus driver Add hardware monitoring support for ST STPDDC60 Unversal Digital Multicell Controller. Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210218115249.28513-3-erik.rosen@metormote.com [groeck: Fixed whitespace error in Makefile] Signed-off-by: Guenter Roeck commit d3e33067a6e4594edc70d0687feedb249079547c Author: Erik Rosen Date: Thu Feb 18 12:52:48 2021 +0100 hwmon: (pmbus) Add pmbus_set_update() function to set update flag For the STPDDC60 chip, the vout alarm-limits are represented as an offset relative to the commanded output voltage. This means that the limits are dynamic and must not be cached by the pmbus driver. This patch adds a pmbus_set_sensor() function to pmbus_core to be able to set the update flag on selected sensors after auto-detection of limit attributes. Signed-off-by: Erik Rosen Link: https://lore.kernel.org/r/20210218115249.28513-2-erik.rosen@metormote.com Signed-off-by: Guenter Roeck commit bfbbbe04d01222aa484400a7257f34a952af2237 Author: Jiqi Li Date: Thu Mar 4 18:44:21 2021 +0800 hwmon: (nct6683) Support NCT6686D Add support for NCT6686D chip used in the Lenovo P620. Signed-off-by: Jiqi Li Reviewed-by: Mark Pearson Link: https://lore.kernel.org/r/20210304104421.1912934-1-lijq9@lenovo.com Signed-off-by: Guenter Roeck commit e20a7198a20fcd406809ccf25e6331331d352718 Author: Chris Packham Date: Mon Mar 1 16:59:54 2021 +1300 hwmon: (pmbus) Add driver for Infineon IR36021 The IR36021 is a dual‐loop digital multi‐phase buck controller. Signed-off-by: Chris Packham Link: https://lore.kernel.org/r/20210301035954.16713-3-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit 9cff4d8b32d9462a3f8ee26c8b9140415caf22f2 Author: Chris Packham Date: Mon Mar 1 16:59:53 2021 +1300 dt-bindings: trivial-devices: Add infineon,ir36021 Add infineon,ir36021 to trivial-devices.yaml. Signed-off-by: Chris Packham Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210301035954.16713-2-chris.packham@alliedtelesis.co.nz Signed-off-by: Guenter Roeck commit 918f22104d64d209a62020ebda9338e8219019c3 Author: Wilken Gottwalt Date: Sat Feb 27 10:34:42 2021 +0100 hwmon: (corsair-psu) Update calculation of LINEAR11 values Changes the way how LINEAR11 values are calculated. The new method increases the precision of 2-3 digits. old method: corsairpsu-hid-3-1 Adapter: HID adapter v_in: 230.00 V v_out +12v: 12.00 V v_out +5v: 5.00 V v_out +3.3v: 3.00 V psu fan: 0 RPM vrm temp: +44.0°C case temp: +37.0°C power total: 152.00 W power +12v: 112.00 W power +5v: 38.00 W power +3.3v: 5.00 W curr in: N/A curr +12v: 9.00 A curr +5v: 7.00 A curr +3.3v: 1000.00 mA new method: corsairpsu-hid-3-1 Adapter: HID adapter v_in: 230.00 V v_out +12v: 12.16 V v_out +5v: 5.01 V v_out +3.3v: 3.30 V psu fan: 0 RPM vrm temp: +44.5°C case temp: +37.8°C power total: 148.00 W power +12v: 108.00 W power +5v: 37.00 W power +3.3v: 4.50 W curr in: N/A curr +12v: 9.25 A curr +5v: 7.50 A curr +3.3v: 1.50 A Co-developed-by: Jack Doan Signed-off-by: Jack Doan Signed-off-by: Wilken Gottwalt Link: https://lore.kernel.org/r/YDoSMqFbgoTXyoru@monster.powergraphx.local Signed-off-by: Guenter Roeck commit 77d76768d0984510b2be1987a3c410df598a9ea2 Author: Yang Li Date: Tue Feb 23 17:14:27 2021 +0800 hwmon: Switch to using the new API kobj_to_dev() fixed the following coccicheck: ./drivers/hwmon/hwmon.c:82:60-61: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1614071667-5665-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Guenter Roeck commit 124b7e34a5a6bf2618bca2fa7062922e338db122 Author: Guenter Roeck Date: Wed Mar 10 21:54:33 2021 -0800 hwmon: (adm9240) Convert to devm_hwmon_device_register_with_info API Also use regmap for register caching. This change reduces code and data size by more than 40%. While at it, fixed some warnings reported by checkpatch. Cc: Chris Packham Reviewed-by: Chris Packham Tested-by: Chris Packham Signed-off-by: Guenter Roeck commit 4f427dcb8963846f7ab189f2774272cd898415af Author: Guenter Roeck Date: Wed Mar 10 20:09:25 2021 -0800 hwmon: (adm9240) Store i2c device instead of client in local data We only use the pointer to i2c_client to access &client->dev. Store the device pointer directly instead of retrieving it from i2c_client. Cc: Chris Packham Reviewed-by: Chris Packham Tested-by: Chris Packham Signed-off-by: Guenter Roeck commit 69698bde1873bb203fc0cb20026765ea5c4f93fe Author: Guenter Roeck Date: Wed Mar 10 20:11:54 2021 -0800 hwmon: (adm9240) Drop log messages from detect function Not detecting a chip in the detect function is normal and should not generate any log messages, much less error messages. Cc: Chris Packham Reviewed-by: Chris Packham Tested-by: Chris Packham Signed-off-by: Guenter Roeck commit 557853f4e23e60b6c5a6ec4771bbdf39bbae15d0 Author: Marc Zyngier Date: Tue Mar 30 16:11:45 2021 +0100 PCI: Refactor HT advertising of NO_MSI flag The few quirks that deal with NO_MSI tend to be copy-paste heavy. Refactor them so that the hierarchy of conditions is slightly cleaner. Link: https://lore.kernel.org/r/20210330151145.997953-15-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 61af69296cbadf4c88a1076a3b3e5572827b04c8 Author: Marc Zyngier Date: Tue Mar 30 16:11:44 2021 +0100 PCI/MSI: Document the various ways of ending up with NO_MSI We have now three ways of ending up with NO_MSI being set. Document them. Link: https://lore.kernel.org/r/20210330151145.997953-14-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 645e9c38383d7fcde2784ee537fa18ec9bed54d9 Author: Thomas Gleixner Date: Tue Mar 30 16:11:43 2021 +0100 PCI: mediatek: Advertise lack of built-in MSI handling Some Mediatek host bridges cannot handle MSIs, which is sad. This also results in an ugly warning at device probe time, as the core PCI code wasn't told that MSIs were not available. Advertise this fact to the rest of the core PCI code by using the 'msi_domain' attribute, which still opens the possibility for another block to provide the MSI functionnality. [maz: commit message, switched over to msi_domain attribute] Link: https://lore.kernel.org/r/20210330151145.997953-13-maz@kernel.org Reported-by: Frank Wunderlich Signed-off-by: Thomas Gleixner Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 9ec37efb87832b578d7972fc80b04d94f5d2bbe3 Author: Marc Zyngier Date: Tue Mar 30 16:11:42 2021 +0100 PCI/MSI: Make pci_host_common_probe() declare its reliance on MSI domains The generic PCI host driver relies on MSI domains for MSIs to be provided to its end-points. Make this dependency explicit. This cures the warnings occuring on arm/arm64 VMs when booted with PCI virtio devices and no MSI controller (no GICv3 ITS, for example). It is likely that other drivers will need to express the same dependency. Link: https://lore.kernel.org/r/20210330151145.997953-12-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 94e89b145371b68fa0ea294855adebcd03e0522e Author: Marc Zyngier Date: Tue Mar 30 16:11:41 2021 +0100 PCI/MSI: Let PCI host bridges declare their reliance on MSI domains There is a whole class of host bridges that cannot know whether MSIs will be provided or not, as they rely on other blocks to provide the MSI functionnality, using MSI domains. This is the case for example on systems that use the ARM GIC architecture. Introduce a new attribute ('msi_domain') indicating that implicit dependency, and use this property to set the NO_MSI flag when no MSI domain is found at probe time. Link: https://lore.kernel.org/r/20210330151145.997953-11-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit f8bcf249d9cf292c6ceb3d9f5bd90815090f5286 Author: Marc Zyngier Date: Tue Mar 30 16:11:40 2021 +0100 PCI/MSI: Kill default_teardown_msi_irqs() It doesn't have any caller left. Link: https://lore.kernel.org/r/20210330151145.997953-10-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit b227be0d7314d0869d4e28c199ac1fc7075cf06e Author: Marc Zyngier Date: Tue Mar 30 16:11:39 2021 +0100 PCI/MSI: Kill msi_controller structure msi_controller had a good, long life as the abstraction for a driver providing MSIs to PCI devices. But it has been replaced in all drivers by the more expressive generic MSI framework. Farewell, struct msi_controller. Link: https://lore.kernel.org/r/20210330151145.997953-9-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 3a05d08f6cc75b74079290c33d6127b2857226fa Author: Marc Zyngier Date: Tue Mar 30 16:11:38 2021 +0100 PCI/MSI: Drop use of msi_controller from core code As there is no driver using msi_controller, we can now safely remove its use from the PCI probe code. Link: https://lore.kernel.org/r/20210330151145.997953-8-maz@kernel.org Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit e0fad163b6e7482be32ae99662240268aa0e1bf1 Author: Marc Zyngier Date: Tue Mar 30 16:11:37 2021 +0100 PCI: hv: Drop msi_controller structure The Hyper-V PCI driver still makes use of a msi_controller structure, but it looks more like a distant leftover than anything actually useful, since it is initialised to 0 and never used for anything. Just remove it. Link: https://lore.kernel.org/r/20210330151145.997953-7-maz@kernel.org Tested-by: Michael Kelley Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Reviewed-by: Michael Kelley Acked-by: Bjorn Helgaas commit 313b64c3ae52bc8e953319077204cf1d286a8a99 Author: Marc Zyngier Date: Tue Mar 30 16:11:36 2021 +0100 PCI: xilinx: Convert to MSI domains In anticipation of the removal of the msi_controller structure, convert the ancient xilinx host controller driver to MSI domains. We end-up with the usual two domain structure, the top one being a generic PCI/MSI domain, the bottom one being xilinx-specific and handling the actual HW interrupt allocation. This allows us to fix some of the most appaling MSI programming, where the message programmed in the device is the virtual IRQ number instead of the allocated vector number. The allocator is also made safe with a mutex. This should allow support for MultiMSI, but I decided not to even try, since I cannot test it. Link: https://lore.kernel.org/r/20210330151145.997953-6-maz@kernel.org Tested-by: Bharat Kumar Gogada Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 161260e7f7bc58d6a0972eb41a6072e82d0b58a5 Author: Marc Zyngier Date: Tue Mar 30 16:11:35 2021 +0100 PCI: xilinx: Don't allocate extra memory for the MSI capture address A long cargo-culted behaviour of PCI drivers is to allocate memory to obtain an address that is fed to the controller as the MSI capture address (i.e. the MSI doorbell). But there is no actual requirement for this address to be RAM. All it needs to be is a suitable aligned address that will *not* be DMA'd to. Use the physical address of the 'port' data structure as the MSI capture address, aligned on a 4K boundary. Link: https://lore.kernel.org/r/20210330151145.997953-5-maz@kernel.org Tested-by: Bharat Kumar Gogada Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi commit 83ed8d4fa656d37d17bb83203485e3f7a2360e7a Author: Marc Zyngier Date: Tue Mar 30 16:11:34 2021 +0100 PCI: rcar: Convert to MSI domains In anticipation of the removal of the msi_controller structure, convert the Rcar host controller driver to MSI domains. We end-up with the usual two domain structure, the top one being a generic PCI/MSI domain, the bottom one being Rcar-specific and handling the actual HW interrupt allocation. Link: https://lore.kernel.org/r/20210330151145.997953-4-maz@kernel.org Tested-by: Marek Vasut Signed-off-by: Marc Zyngier [lorenzo.pieralisi@arm.com: merged fix https://lore.kernel.org/linux-pci/87y2e2p9wk.wl-maz@kernel.org] Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 93cd1bb4862d71298ad5ec86991eac0a119d024d Author: Marc Zyngier Date: Tue Mar 30 16:11:33 2021 +0100 PCI: rcar: Don't allocate extra memory for the MSI capture address A long cargo-culted behaviour of PCI drivers is to allocate memory to obtain an address that is fed to the controller as the MSI capture address (i.e. the MSI doorbell). But there is no actual requirement for this address to be RAM. All it needs to be is a suitable aligned address that will *not* be DMA'd to. Since the rcar platform already has a requirement that this address should be in the first 4GB of the physical address space, use the controller's own base address as the capture address. Link: https://lore.kernel.org/r/20210330151145.997953-3-maz@kernel.org Tested-by: Yoshihiro Shimoda Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Reviewed-by: Yoshihiro Shimoda commit 2c99e55f795593c5f029f65c4b4ab2a72bb076a3 Author: Marc Zyngier Date: Tue Mar 30 16:11:32 2021 +0100 PCI: tegra: Convert to MSI domains In anticipation of the removal of the msi_controller structure, convert the Tegra host controller driver to MSI domains. We end-up with the usual two domain structure, the top one being a generic PCI/MSI domain, the bottom one being Tegra-specific and handling the actual HW interrupt allocation. While at it, convert the normal interrupt handler to a chained handler, handle the controller's MSI IRQ edge triggered, support multiple MSIs per device and use the AFI_MSI_EN_VEC* registers to provide MSI masking. [treding@nvidia.com: fix, clean up and address TODOs from Marc's draft] Link: https://lore.kernel.org/r/20210330151145.997953-2-maz@kernel.org Signed-off-by: Thierry Reding Signed-off-by: Marc Zyngier Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 81bbf03905aae47a80fd05604cc9b0d1ca20e30a Author: Niklas Schnelle Date: Wed Feb 24 11:29:36 2021 +0100 s390/pci: expose a PCI device's UID as its index On s390 each PCI device has a user-defined ID (UID) exposed under /sys/bus/pci/devices//uid. This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the device configured in the hypervisor. To serve as a primary identifier the UID must be unique within the Linux instance, this is guaranteed by the platform if and only if the UID Uniqueness Checking flag is set within the CLP List PCI Functions response. In this sense the UID serves an analogous function as the SMBIOS instance number or ACPI index exposed as the "index" respectively "acpi_index" device attributes and used by e.g. systemd to set interface names. As s390 does not use and will likely never use ACPI nor SMBIOS there is no conflict and we can just expose the UID under the "index" attribute whenever UID Uniqueness Checking is active and get systemd's interface naming support for free. Link: https://lore.kernel.org/lkml/20210412135905.1434249-1-schnelle@linux.ibm.com/ Acked-by: Viktor Mihajlovski Acked-by: Bjorn Helgaas Acked-by: Narendra K Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 1b8a7d4282c038b3846f2485d86cb990c55c38d9 Author: Patrice Chotard Date: Tue Apr 20 10:21:03 2021 +0200 spi: stm32-qspi: Fix compilation warning in ARM64 This fixes warnings detected when compiling in ARM64. Introduced by 'commit 18674dee3cd6 ("spi: stm32-qspi: Add dirmap support")' Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20210420082103.1693-1-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit ec1af6c64db94e4f24e53011a77b2bf2220ae000 Author: Thierry Reding Date: Mon Apr 19 18:41:17 2021 +0200 ASoC: simple-card-utils: Allocate link info structure on heap struct link_info can grow fairly large and may cause the stack frame size to be exceeded when allocated on the stack. Some architectures such as 32-bit ARM, RISC-V or PowerPC have small stack frames where this causes a compiler warning, so allocate these structures on the heap instead of the stack. Fixes: 343e55e71877 ("ASoC: simple-card-utils: Increase maximum number of links to 128") Reported-by: Kuninori Morimoto Reported-by: Stephen Rothwell Reported-by: kernel test robot Signed-off-by: Thierry Reding Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20210419164117.1422242-1-thierry.reding@gmail.com Signed-off-by: Mark Brown commit 7f51384f17b3e1039fbb2d3535cc777585dc3175 Author: Jack Yu Date: Tue Apr 20 09:30:48 2021 +0000 ASoC: rt1015p: add support on format S32_LE Add support on format S32_LE for rt1015p. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/377f0ee05d514c66b567eb6385ac7753@realtek.com Signed-off-by: Mark Brown commit 982b7c140ecd0a5607df24706252f2d34377a959 Author: Maor Gottlieb Date: Sun Apr 18 16:49:40 2021 +0300 RDMA/mlx5: Fix type assignment for ICM DM We should hold the UAPI DM type in the base struct and not the internal mlx5 type. Fixes: 251b9d788750 ("RDMA/mlx5: Re-organize the DM code") Link: https://lore.kernel.org/r/58dedbd5c132660f808e59166d434e2eaa6ecf7a.1618753425.git.leonro@nvidia.com Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit dedbc2d35863f692295aff96ac9e34bf30a68707 Author: Parav Pandit Date: Sun Apr 18 16:49:39 2021 +0300 IB/mlx5: Set right RoCE l3 type and roce version while deleting GID Currently when GID is deleted, it zero out all the fields of the RoCE address in the SET_ROCE_ADDRESS command for a specified index. roce_version = 0 means RoCEv1 in the SET_ROCE_ADDRESS command. This assumes that device has RoCEv1 always enabled which is not always correct. For example Subfunction does not support RoCEv1. Due to this assumption a previously added RoCEv2 GID is always deleted as RoCEv1 GID. This results in a below syndrome: mlx5_core.sf mlx5_core.sf.4: mlx5_cmd_check:777:(pid 4256): SET_ROCE_ADDRESS(0x761) op_mod(0x0) failed, status bad parameter(0x3), syndrome (0x12822d) Hence set the right RoCE version during GID deletion provided by the core. Link: https://lore.kernel.org/r/d3f54129c90ca329caf438dbe31875d8ad08d91a.1618753425.git.leonro@nvidia.com Signed-off-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit bd15b15523fd3197d1bb46403e02e92877a4f412 Author: Kai-Heng Feng Date: Tue Apr 20 19:55:29 2021 +0800 ALSA: hda/realtek: Enable mute/micmute LEDs and limit mic boost on EliteBook 845 G8 On HP EliteBook 845 G8, the audio LEDs can be enabled by ALC285_FIXUP_HP_MUTE_LED. So use it accordingly. In addition to that, the mic captures lots of noises, so also limits the mic boost. The quality of capture audio becomes crystal clear after limiting the mic boost. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20210420115530.1349353-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 783a11bf2400e5d5c42a943c3083dc0330751842 Author: Sindhu Devale Date: Thu Apr 15 19:21:04 2021 -0500 RDMA/i40iw: Fix error unwinding when i40iw_hmc_sd_one fails When i40iw_hmc_sd_one fails, chunk is freed without the deletion of chunk entry in the PBLE info list. Fix it by adding the chunk entry to the PBLE info list only after successful addition of SD in i40iw_hmc_sd_one. This fixes a static checker warning reported here: https://lore.kernel.org/linux-rdma/YHV4CFXzqTm23AOZ@mwanda/ Fixes: 9715830157be ("i40iw: add pble resource files") Link: https://lore.kernel.org/r/20210416002104.323-1-shiraz.saleem@intel.com Reported-by: Dan Carpenter Signed-off-by: Sindhu Devale Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe commit 3a6684385928d00b29acac7658a5ae1f2a44494c Author: Potnuri Bharat Teja Date: Thu Apr 15 20:44:22 2021 +0530 RDMA/cxgb4: add missing qpid increment missing qpid increment leads to skipping few qpids while allocating QP. This eventually leads to adapter running out of qpids after establishing fewer connections than it actually supports. Current patch increments the qpid correctly. Fixes: cfdda9d76436 ("RDMA/cxgb4: Add driver for Chelsio T4 RNIC") Link: https://lore.kernel.org/r/20210415151422.9139-1-bharat@chelsio.com Signed-off-by: Potnuri Bharat Teja Signed-off-by: Jason Gunthorpe commit 9480fd557be4781ea2f3d50b148218bcad826284 Author: Wan Jiabing Date: Thu Apr 15 17:21:16 2021 +0800 IB/ipoib: Remove unnecessary struct declaration struct ipoib_cm_tx is defined at 245th line. And the definition is independent on the MACRO. The declaration here is unnecessary. Remove it. Link: https://lore.kernel.org/r/20210415092124.27684-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Reviewed-by: Christoph Lameter Signed-off-by: Jason Gunthorpe commit bb7db8699b6cd877c766ce69f3b44ab0830d85a4 Author: Arnaldo Carvalho de Melo Date: Thu Apr 15 21:15:34 2021 -0300 perf tools: Add a build-test variant to use in builds from a tarball To use in automated tests inside containers from a tarball generated by 'make perf-tar-src-pkg*', where testing building from a tarball is obviously not needed, so add a 'build-test-tarball' for that case. And don't build with gtk2 as this complicates things for cross builds where we don't always have all the libraries a full perf build requires available for the target arch, ditto for static builds. Signed-off-by: Arnaldo Carvalho de Melo commit 59a1a843b028c88b2ed33a459ff2767c737d8d69 Author: Zhen Lei Date: Thu Apr 15 16:34:16 2021 +0800 perf data: Fix error return code in perf_data__create_dir() Although 'ret' has been initialized to -1, but it will be reassigned by the "ret = open(...)" statement in the for loop. So that, the value of 'ret' is unknown when asprintf() failed. Reported-by: Hulk Robot Signed-off-by: Zhen Lei Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210415083417.3740-1-thunder.leizhen@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit b96da02bd6b8d7d81b345c94d3d76d8733f5ef60 Author: Ian Rogers Date: Fri Apr 16 14:41:13 2021 -0700 perf arm64: Fix off-by-one directory paths. Relative path include works in the regular build due to -I paths but may break in other situations. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Sergey Senozhatsky Cc: Stephane Eranian Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210416214113.552252-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit f89a82a82b20261e5778132f5237971991bad8e6 Author: Martin Liška Date: Sun Feb 21 13:46:36 2021 +0100 perf annotate: Add line number like in TUI and source location at EOL The patch changes the output format in 2 ways: - line number is displayed for all source lines (matching TUI mode) - source locations for the hottest lines are printed at the line end in order to preserve layout Before: 0.00 : 405ef1: inc %r15 : tmpsd * (TD + tmpsd * TDD))); 0.01 : 405ef4: vfmadd213sd 0x2b9b3(%rip),%xmm0,%xmm3 # 4318b0 <_IO_stdin_used+0x8b0> : tmpsd * (TC + eff.c:1811 0.67 : 405efd: vfmadd213sd 0x2b9b2(%rip),%xmm0,%xmm3 # 4318b8 <_IO_stdin_used+0x8b8> : TA + tmpsd * (TB + 0.35 : 405f06: vfmadd213sd 0x2b9b1(%rip),%xmm0,%xmm3 # 4318c0 <_IO_stdin_used+0x8c0> : dumbo = eff.c:1809 1.41 : 405f0f: vfmadd213sd 0x2b9b0(%rip),%xmm0,%xmm3 # 4318c8 <_IO_stdin_used+0x8c8> : sumi -= sj * tmpsd * dij2i * dumbo; eff.c:1813 2.58 : 405f18: vmulsd %xmm3,%xmm0,%xmm0 2.81 : 405f1c: vfnmadd213sd 0x30(%rsp),%xmm1,%xmm0 3.78 : 405f23: vmovsd %xmm0,0x30(%rsp) : for (k = 0; k < lpears[i] + upears[i]; k++) { eff.c:1761 0.90 : 405f29: cmp %r15d,%r12d After: 0.00 : 405ef1: inc %r15 : 1812 tmpsd * (TD + tmpsd * TDD))); 0.01 : 405ef4: vfmadd213sd 0x2b9b3(%rip),%xmm0,%xmm3 # 4318b0 <_IO_stdin_used+0x8b0> : 1811 tmpsd * (TC + 0.67 : 405efd: vfmadd213sd 0x2b9b2(%rip),%xmm0,%xmm3 # 4318b8 <_IO_stdin_used+0x8b8> // eff.c:1811 : 1810 TA + tmpsd * (TB + 0.35 : 405f06: vfmadd213sd 0x2b9b1(%rip),%xmm0,%xmm3 # 4318c0 <_IO_stdin_used+0x8c0> : 1809 dumbo = 1.41 : 405f0f: vfmadd213sd 0x2b9b0(%rip),%xmm0,%xmm3 # 4318c8 <_IO_stdin_used+0x8c8> // eff.c:1809 : 1813 sumi -= sj * tmpsd * dij2i * dumbo; 2.58 : 405f18: vmulsd %xmm3,%xmm0,%xmm0 // eff.c:1813 2.81 : 405f1c: vfnmadd213sd 0x30(%rsp),%xmm1,%xmm0 3.78 : 405f23: vmovsd %xmm0,0x30(%rsp) : 1761 for (k = 0; k < lpears[i] + upears[i]; k++) { Where e.g. '// eff.c:1811' shares the same color as the percentantage at the line beginning. Signed-off-by: Martin Liška Link: http://lore.kernel.org/lkml/a0d53f31-f633-5013-c386-a4452391b081@suse.cz Signed-off-by: Arnaldo Carvalho de Melo commit 537f1e38f31a2d2b9941f16d6e2a9ab24cdab086 Author: Alexander Antonov Date: Mon Apr 19 12:41:47 2021 +0300 perf: Update .gitignore file After a "make -C tools/perf", git reports the following untracked file: perf-iostat Add this generated file to perf's .gitignore file. Signed-off-by: Alexander Antonov Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Alexey V Bayduraev Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210419094147.15909-5-alexander.antonov@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f9ed693e8bc0e7de9eb766a3c7178590e8bb6cd5 Author: Alexander Antonov Date: Mon Apr 19 12:41:46 2021 +0300 perf stat: Enable iostat mode for x86 platforms This functionality is based on recently introduced sysfs attributes for Intel® Xeon® Scalable processor family (code name Skylake-SP): Commit bb42b3d39781d7fc ("perf/x86/intel/uncore: Expose an Uncore unit to IIO PMON mapping") Mode is intended to provide four I/O performance metrics in MB per each PCIe root port: - Inbound Read: I/O devices below root port read from the host memory - Inbound Write: I/O devices below root port write to the host memory - Outbound Read: CPU reads from I/O devices below root port - Outbound Write: CPU writes to I/O devices below root port Each metric requiries only one uncore event which increments at every 4B transfer in corresponding direction. The formulas to compute metrics are generic: #EventCount * 4B / (1024 * 1024) Acked-by: Namhyung Kim Signed-off-by: Alexander Antonov Cc: Alexander Shishkin Cc: Alexey V Bayduraev Cc: Andi Kleen Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210419094147.15909-4-alexander.antonov@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 19776d3cede733dc9be79d880339acb9b2f456d6 Author: Alexander Antonov Date: Mon Apr 19 12:41:45 2021 +0300 perf stat: Helper functions for PCIe root ports list in iostat mode Introduce helper functions to control PCIe root ports list. These helpers will be used in the follow-up patch. Signed-off-by: Alexander Antonov Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Alexey V Bayduraev Cc: Andi Kleen Cc: Arnaldo Carvalho de Melo Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210419094147.15909-3-alexander.antonov@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit f07952b17969777196512368a216baae1ad45ea6 Author: Alexander Antonov Date: Mon Apr 19 12:41:44 2021 +0300 perf stat: Basic support for iostat in perf Add basic flow for a new iostat mode in perf. Mode is intended to provide four I/O performance metrics per each PCIe root port: Inbound Read, Inbound Write, Outbound Read, Outbound Write. The actual code to compute the metrics and attribute it to root port is in follow-on patches. Signed-off-by: Alexander Antonov Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Alexey V Bayduraev Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210419094147.15909-2-alexander.antonov@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 32daa5d7899e03433429bedf9e20d7963179703a Author: Kajol Jain Date: Mon Apr 19 16:50:01 2021 +0530 perf vendor events: Initial JSON/events list for power10 platform Patch adds initial JSON/events for POWER10. Signed-off-by: Kajol Jain Reviewed-by: Paul Clarke Tested-by: Paul Clarke Acked-by: Michael Ellerman Cc: Athira Jajeev Cc: Jiri Olsa Cc: Madhavan Srinivasan Cc: Ravi Bangoria Cc: linuxppc-dev@lists.ozlabs.org Link: http://lore.kernel.org/lkml/20210419112001.71466-1-kjain@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 435b512dbc0dac42b34348393049b386bb1a19bd Author: Dave Jiang Date: Thu Apr 15 16:38:09 2021 -0700 dmaengine: idxd: remove detection of device type Move all static data type for per device type to an idxd_driver_data data structure. The data can be attached to the pci_device_id and provided by the pci probe function. This removes a lot of unnecessary type detection and setup code. Suggested-by: Dan Williams Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161852988924.2203940.2787590808682466398.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 4b73e4ebd43ce48101a4c09bf13d439a954d61c5 Author: Dave Jiang Date: Thu Apr 15 16:38:03 2021 -0700 dmaengine: idxd: iax bus removal There is no need to have an additional bus for the IAX device. The removal of IAX will change user ABI as /sys/bus/iax will no longer exist. The iax device will be moved to the dsa bus. The device id for dsa and iax will now be combined rather than unique for each device type in order to accommodate the iax devices. This is in preparation for fixing the sub-driver code for idxd. There's no hardware deployment for Sapphire Rapids platform yet, which means that users have no reason to have developed scripts against this ABI. There is some exposure to released versions of accel-config, but those are being fixed up and an accel-config upgrade is reasonable to get IAX support. As far as accel-config is concerned IAX support starts when these devices appear under /sys/bus/dsa, and old accel-config just assumes that an empty / missing /sys/bus/iax just means a lack of platform support. Fixes: f25b463883a8 ("dmaengine: idxd: add IAX configuration support in the IDXD driver") Suggested-by: Dan Williams Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161852988298.2203940.4529909758034944428.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 04922b7445a1950b86f130a1fe8c52cc27b3e30b Author: Dave Jiang Date: Thu Apr 15 16:37:57 2021 -0700 dmaengine: idxd: fix cdev setup and free device lifetime issues The char device setup and cleanup has device lifetime issues regarding when parts are initialized and cleaned up. The initialization of struct device is done incorrectly. device_initialize() needs to be called on the 'struct device' and then additional changes can be added. The ->release() function needs to be setup via device_type before dev_set_name() to allow proper cleanup. The change re-parents the cdev under the wq->conf_dev to get natural reference inheritance. No known dependency on the old device path exists. Reported-by: Jason Gunthorpe Fixes: 42d279f9137a ("dmaengine: idxd: add char driver to expose submission portal to userland") Signed-off-by: Dave Jiang Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/161852987721.2203940.1478218825576630810.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit defe49f96012ca91e8e673cb95b5c30b4a3735e8 Author: Dave Jiang Date: Thu Apr 15 16:37:51 2021 -0700 dmaengine: idxd: fix group conf_dev lifetime Remove devm_* allocation and fix group->conf_dev 'struct device' lifetime. Address issues flagged by CONFIG_DEBUG_KOBJECT_RELEASE. Add release functions in order to free the allocated memory at the group->conf_dev destruction time. Reported-by: Jason Gunthorpe Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161852987144.2203940.8830315575880047.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 75b911309060f42ba94bbbf46f5f497d35d5cd02 Author: Dave Jiang Date: Thu Apr 15 16:37:44 2021 -0700 dmaengine: idxd: fix engine conf_dev lifetime Remove devm_* allocation and fix engine->conf_dev 'struct device' lifetime. Address issues flagged by CONFIG_DEBUG_KOBJECT_RELEASE. Add release functions in order to free the allocated memory at the engine conf_dev destruction time. Reported-by: Jason Gunthorpe Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161852986460.2203940.16603218225412118431.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 7c5dd23e57c14cf7177b8a5e0fd08916e0c60005 Author: Dave Jiang Date: Thu Apr 15 16:37:39 2021 -0700 dmaengine: idxd: fix wq conf_dev 'struct device' lifetime Remove devm_* allocation and fix wq->conf_dev 'struct device' lifetime. Address issues flagged by CONFIG_DEBUG_KOBJECT_RELEASE. Add release functions in order to free the allocated memory for the wq context at device destruction time. Reported-by: Jason Gunthorpe Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161852985907.2203940.6840120734115043753.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 47c16ac27d4cb664cee53ee0b9b7e2f907923fb3 Author: Dave Jiang Date: Thu Apr 15 16:37:33 2021 -0700 dmaengine: idxd: fix idxd conf_dev 'struct device' lifetime The devm managed lifetime is incompatible with 'struct device' objects that resides in idxd context. This is one of the series that clean up the idxd driver 'struct device' lifetime. Fix idxd->conf_dev 'struct device' lifetime. Address issues flagged by CONFIG_DEBUG_KOBJECT_RELEASE. Add release functions in order to free the allocated memory at the appropriate time. Reported-by: Jason Gunthorpe Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161852985319.2203940.4650791514462735368.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit f7f7739847bd68b3c3103fd1b50d943038bd14c7 Author: Dave Jiang Date: Thu Apr 15 16:37:27 2021 -0700 dmaengine: idxd: use ida for device instance enumeration The idr is only used for an device id, never to lookup context from that id. Switch to plain ida. Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Reported-by: Jason Gunthorpe Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161852984730.2203940.15032482460902003819.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit a39c7cd0438ee2f0b859ee1eb86cdc52217d2223 Author: Dave Jiang Date: Thu Apr 15 16:37:21 2021 -0700 dmaengine: idxd: removal of pcim managed mmio mapping The devm managed lifetime is incompatible with 'struct device' objects that resides in idxd context. This is one of the series that clean up the idxd driver 'struct device' lifetime. Remove pcim_* management of the PCI device and the ioremap of MMIO BAR and replace with unmanaged versions. This is for consistency of removing all the pcim/devm based calls. Reported-by: Jason Gunthorpe Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/161852984150.2203940.8043988289748519056.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 5fc8e85ff12ce0530ac658686902a0ee64600f56 Author: Dave Jiang Date: Thu Apr 15 16:37:15 2021 -0700 dmaengine: idxd: cleanup pci interrupt vector allocation management The devm managed lifetime is incompatible with 'struct device' objects that resides in idxd context. This is one of the series that clean up the idxd driver 'struct device' lifetime. Remove devm managed pci interrupt vectors and replace with unmanged allocators. Reported-by: Jason Gunthorpe Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/161852983563.2203940.8116028229124776669.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 397862855619271296e46d10f7dfa7bafe71eb81 Author: Dave Jiang Date: Thu Apr 15 16:37:10 2021 -0700 dmaengine: idxd: fix dma device lifetime The devm managed lifetime is incompatible with 'struct device' objects that resides in idxd context. This is one of the series that clean up the idxd driver 'struct device' lifetime. Remove embedding of dma_device and dma_chan in idxd since it's not the only interface that idxd will use. The freeing of the dma_device will be managed by the ->release() function. Reported-by: Jason Gunthorpe Fixes: bfe1d56091c1 ("dmaengine: idxd: Init and probe for Intel data accelerators") Signed-off-by: Dave Jiang Reviewed-by: Dan Williams Link: https://lore.kernel.org/r/161852983001.2203940.14817017492384561719.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul commit 63606522b9c28c2950cb9c418f0ba2270009d4ad Merge: 361e5fc7420ab ea9aadc06a9f1 Author: Vinod Koul Date: Tue Apr 20 16:43:43 2021 +0530 Merge branch 'fixes' into next commit 818869489ba3c4a4ed1360e22b2f66be488ea9f5 Author: Rob Herring Date: Wed Apr 14 14:57:58 2021 -0500 libperf xyarray: Add bounds checks to xyarray__entry() xyarray__entry() is missing any bounds checking yet often the x and y parameters come from external callers. Add bounds checks and an unchecked __xyarray__entry(). Committer notes: Make the 'x' and 'y' arguments to the new xyarray__entry() that does bounds check to be of type 'size_t', so that we cover also the case where 'x' and 'y' could be negative, which is needed anyway as having them as 'int' breaks the build with: /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h: In function ‘xyarray__entry’: /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h:28:8: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] 28 | if (x >= xy->max_x || y >= xy->max_y) | ^~ /home/acme/git/perf/tools/lib/perf/include/internal/xyarray.h:28:26: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare] 28 | if (x >= xy->max_x || y >= xy->max_y) | ^~ cc1: all warnings being treated as errors Signed-off-by: Rob Herring Suggested-by: Arnaldo Carvalho de Melo Suggested-by: Namhyung Kim Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210414195758.4078803-1-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 47d01e7b9999b9591077a59a1ecec11c6ce570de Author: Rob Herring Date: Wed Apr 14 11:07:39 2021 -0500 libperf: Add support for user space counter access x86 and arm64 can both support direct access of event counters in userspace. The access sequence is less than trivial and currently exists in perf test code (tools/perf/arch/x86/tests/rdpmc.c) with copies in projects such as PAPI and libpfm4. In order to support userspace access, an event must be mmapped first with perf_evsel__mmap(). Then subsequent calls to perf_evsel__read() will use the fast path (assuming the arch supports it). Committer notes: Added a '__maybe_unused' attribute to the read_perf_counter() argument to fix the build on arches other than x86_64 and arm. Committer testing: Building and running the libperf tests in verbose mode (V=1) now shows those "loop = N, count = N" extra lines, testing user space counter access. # make V=1 -C tools/lib/perf tests make: Entering directory '/home/acme/git/perf/tools/lib/perf' make -f /home/acme/git/perf/tools/build/Makefile.build dir=. obj=libperf make -C /home/acme/git/perf/tools/lib/api/ O= libapi.a make -f /home/acme/git/perf/tools/build/Makefile.build dir=./fd obj=libapi make -f /home/acme/git/perf/tools/build/Makefile.build dir=./fs obj=libapi make -C tests gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-cpumap-a test-cpumap.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-threadmap-a test-threadmap.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-evlist-a test-evlist.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -o test-evsel-a test-evsel.c ../libperf.a /home/acme/git/perf/tools/lib/api/libapi.a gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-cpumap-so test-cpumap.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-threadmap-so test-threadmap.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-evlist-so test-evlist.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf gcc -I/home/acme/git/perf/tools/lib/perf/include -I/home/acme/git/perf/tools/include -I/home/acme/git/perf/tools/lib -g -Wall -L.. -o test-evsel-so test-evsel.c /home/acme/git/perf/tools/lib/api/libapi.a -lperf make -C tests run running static: - running test-cpumap.c...OK - running test-threadmap.c...OK - running test-evlist.c...OK - running test-evsel.c... loop = 65536, count = 333926 loop = 131072, count = 655781 loop = 262144, count = 1311141 loop = 524288, count = 2630126 loop = 1048576, count = 5256955 loop = 65536, count = 524594 loop = 131072, count = 1058916 loop = 262144, count = 2097458 loop = 524288, count = 4205429 loop = 1048576, count = 8406606 OK running dynamic: - running test-cpumap.c...OK - running test-threadmap.c...OK - running test-evlist.c...OK - running test-evsel.c... loop = 65536, count = 328102 loop = 131072, count = 655782 loop = 262144, count = 1317494 loop = 524288, count = 2627851 loop = 1048576, count = 5255187 loop = 65536, count = 524601 loop = 131072, count = 1048923 loop = 262144, count = 2107917 loop = 524288, count = 4194606 loop = 1048576, count = 8409322 OK make: Leaving directory '/home/acme/git/perf/tools/lib/perf' # Signed-off-by: Rob Herring Acked-by: Jiri Olsa Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: Catalin Marinas Cc: Itaru Kitayama Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Link: http://lore.kernel.org/lkml/20210414155412.3697605-4-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 361e5fc7420ab56e4a940b8a500207a91830cd32 Author: YueHaibing Date: Wed Apr 7 21:25:43 2021 +0800 dmaengine: at_xdmac: Remove unused inline function at_xdmac_csize() commit 765c37d87669 ("dmaengine: at_xdmac: rework slave configuration part") left behind this, so can remove it. Signed-off-by: YueHaibing Reviewed-by: Tudor Ambarus Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20210407132543.23652-1-yuehaibing@huawei.com Signed-off-by: Vinod Koul commit 28ac8e03c43dfc6a703aa420d18222540b801120 Author: Colin Ian King Date: Thu Apr 15 12:06:54 2021 +0100 dmaengine: idxd: Fix potential null dereference on pointer status There are calls to idxd_cmd_exec that pass a null status pointer however a recent commit has added an assignment to *status that can end up with a null pointer dereference. The function expects a null status pointer sometimes as there is a later assignment to *status where status is first null checked. Fix the issue by null checking status before making the assignment. Addresses-Coverity: ("Explicit null dereferenced") Fixes: 89e3becd8f82 ("dmaengine: idxd: check device state before issue command") Signed-off-by: Colin Ian King Acked-by: Dave Jiang Link: https://lore.kernel.org/r/20210415110654.1941580-1-colin.king@canonical.com Signed-off-by: Vinod Koul commit 0b0f93cf913b96f7a6f3d6b1ab5dc697d7b9d0f6 Author: Felipe Balbi Date: Sat Apr 17 09:19:50 2021 +0300 dt-bindings: dmaengine: qcom: gpi: add compatible for sm8150 No functional changes, just adding a new compatible for a diferent SoC. Signed-off-by: Felipe Balbi Link: https://lore.kernel.org/r/20210417061951.2105530-2-balbi@kernel.org Signed-off-by: Vinod Koul commit d028b508c112b0414ec60163c2cca0ca3a478709 Merge: a85a8d52bf500 f0145db24e65f Author: Arnd Bergmann Date: Tue Apr 20 11:20:56 2021 +0200 Merge tag 'bmc-5.13-devicetree-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/dt BMC device tree updates for 5.13, round two - Fixes to the first pull request for Rainier - Small changes for Rainier, EthanolX and Tiogapass * tag 'bmc-5.13-devicetree-2' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: dts: aspeed: tiogapass: add hotplug controller ARM: dts: aspeed: amd-ethanolx: Enable all used I2C busses ARM: dts: aspeed: Rainier: Update to pass 2 hardware ARM: dts: aspeed: Rainier 1S4U: Fix fan nodes ARM: dts: aspeed: Rainier: Fix humidity sensor bus address ARM: dts: aspeed: Rainier: Fix PCA9552 on bus 8 Link: https://lore.kernel.org/r/CACPK8XeJdHmxyJn43Ju5hmxJ7+rJgHmx=ANFaL17YUmp+gOtJg@mail.gmail.com Signed-off-by: Arnd Bergmann commit 9cc742078c9a90cdd4cf131e9f760e6965df9048 Author: Jianjun Wang Date: Tue Apr 20 14:17:18 2021 +0800 PCI: Export pci_pio_to_address() for module use This interface will be used by PCI host drivers for PIO translation, export it to support compiling those drivers as kernel modules. Link: https://lore.kernel.org/r/20210420061723.989-3-jianjun.wang@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: Lorenzo Pieralisi Acked-by: Bjorn Helgaas commit 07ca255e3d49bb31f6b7398bd0b3c62c94142c19 Author: Jianjun Wang Date: Tue Apr 20 14:17:17 2021 +0800 dt-bindings: PCI: mediatek-gen3: Add YAML schema Add YAML schemas documentation for Gen3 PCIe controller on MediaTek SoCs. Link: https://lore.kernel.org/r/20210420061723.989-2-jianjun.wang@mediatek.com Signed-off-by: Jianjun Wang Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring Acked-by: Ryder Lee commit 1c9d9dfd2d254211cb37b1513b1da3e6835b8f00 Author: Kailang Yang Date: Tue Apr 20 14:17:34 2021 +0800 ALSA: hda/realtek - Headset Mic issue on HP platform Boot with plugged headset, the Headset Mic will be gone. Signed-off-by: Kailang Yang Cc: Link: https://lore.kernel.org/r/207eecfc3189466a820720bc0c409ea9@realtek.com Signed-off-by: Takashi Iwai commit 47903dc10e7ebb876c9a0f0522cc07a71c10273f Author: Krish Sadhukhan Date: Mon Apr 12 17:56:05 2021 -0400 KVM: SVM: Define actual size of IOPM and MSRPM tables Define the actual size of the IOPM and MSRPM tables so that the actual size can be used when initializing them and when checking the consistency of their physical address. These #defines are placed in svm.h so that they can be shared. Suggested-by: Sean Christopherson Signed-off-by: Krish Sadhukhan Message-Id: <20210412215611.110095-2-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit fe7e948837f312d87853b3fce743795d1ae3715a Author: Sean Christopherson Date: Mon Apr 12 16:21:43 2021 +1200 KVM: x86: Add capability to grant VM access to privileged SGX attribute Add a capability, KVM_CAP_SGX_ATTRIBUTE, that can be used by userspace to grant a VM access to a priveleged attribute, with args[0] holding a file handle to a valid SGX attribute file. The SGX subsystem restricts access to a subset of enclave attributes to provide additional security for an uncompromised kernel, e.g. to prevent malware from using the PROVISIONKEY to ensure its nodes are running inside a geniune SGX enclave and/or to obtain a stable fingerprint. To prevent userspace from circumventing such restrictions by running an enclave in a VM, KVM restricts guest access to privileged attributes by default. Cc: Andy Lutomirski Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: <0b099d65e933e068e3ea934b0523bab070cb8cea.1618196135.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit 72add915fbd5bf5c57deee3da5b2605e966ac199 Author: Sean Christopherson Date: Mon Apr 12 16:21:42 2021 +1200 KVM: VMX: Enable SGX virtualization for SGX1, SGX2 and LC Enable SGX virtualization now that KVM has the VM-Exit handlers needed to trap-and-execute ENCLS to ensure correctness and/or enforce the CPU model exposed to the guest. Add a KVM module param, "sgx", to allow an admin to disable SGX virtualization independent of the kernel. When supported in hardware and the kernel, advertise SGX1, SGX2 and SGX LC to userspace via CPUID and wire up the ENCLS_EXITING bitmap based on the guest's SGX capabilities, i.e. to allow ENCLS to be executed in an SGX-enabled guest. With the exception of the provision key, all SGX attribute bits may be exposed to the guest. Guest access to the provision key, which is controlled via securityfs, will be added in a future patch. Note, KVM does not yet support exposing ENCLS_C leafs or ENCLV leafs. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: Signed-off-by: Paolo Bonzini commit b6f084ca553845135ccade79ce6548035e52884a Author: Sean Christopherson Date: Mon Apr 12 16:21:41 2021 +1200 KVM: VMX: Add ENCLS[EINIT] handler to support SGX Launch Control (LC) Add a VM-Exit handler to trap-and-execute EINIT when SGX LC is enabled in the host. When SGX LC is enabled, the host kernel may rewrite the hardware values at will, e.g. to launch enclaves with different signers, thus KVM needs to intercept EINIT to ensure it is executed with the correct LE hash (even if the guest sees a hardwired hash). Switching the LE hash MSRs on VM-Enter/VM-Exit is not a viable option as writing the MSRs is prohibitively expensive, e.g. on SKL hardware each WRMSR is ~400 cycles. And because EINIT takes tens of thousands of cycles to execute, the ~1500 cycle overhead to trap-and-execute EINIT is unlikely to be noticed by the guest, let alone impact its overall SGX performance. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: <57c92fa4d2083eb3be9e6355e3882fc90cffea87.1618196135.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit 8f102445d4045384799627c53d82c45ca2cad3a5 Author: Sean Christopherson Date: Mon Apr 12 16:21:40 2021 +1200 KVM: VMX: Add emulation of SGX Launch Control LE hash MSRs Emulate the four Launch Enclave public key hash MSRs (LE hash MSRs) that exist on CPUs that support SGX Launch Control (LC). SGX LC modifies the behavior of ENCLS[EINIT] to use the LE hash MSRs when verifying the key used to sign an enclave. On CPUs without LC support, the LE hash is hardwired into the CPU to an Intel controlled key (the Intel key is also the reset value of the LE hash MSRs). Track the guest's desired hash so that a future patch can stuff the hash into the hardware MSRs when executing EINIT on behalf of the guest, when those MSRs are writable in host. Signed-off-by: Sean Christopherson Co-developed-by: Kai Huang Signed-off-by: Kai Huang Message-Id: [Add a comment regarding the MSRs being available until SGX is locked. - Paolo] Signed-off-by: Paolo Bonzini commit 70210c044b4ea8f05e93ec62abc30cab4233ec88 Author: Sean Christopherson Date: Mon Apr 12 16:21:39 2021 +1200 KVM: VMX: Add SGX ENCLS[ECREATE] handler to enforce CPUID restrictions Add an ECREATE handler that will be used to intercept ECREATE for the purpose of enforcing and enclave's MISCSELECT, ATTRIBUTES and XFRM, i.e. to allow userspace to restrict SGX features via CPUID. ECREATE will be intercepted when any of the aforementioned masks diverges from hardware in order to enforce the desired CPUID model, i.e. inject #GP if the guest attempts to set a bit that hasn't been enumerated as allowed-1 in CPUID. Note, access to the PROVISIONKEY is not yet supported. Signed-off-by: Sean Christopherson Co-developed-by: Kai Huang Signed-off-by: Kai Huang Message-Id: Signed-off-by: Paolo Bonzini commit 9798adbc04cf1b14325dc7e2c882639693516a69 Author: Sean Christopherson Date: Mon Apr 12 16:21:38 2021 +1200 KVM: VMX: Frame in ENCLS handler for SGX virtualization Introduce sgx.c and sgx.h, along with the framework for handling ENCLS VM-Exits. Add a bool, enable_sgx, that will eventually be wired up to a module param to control whether or not SGX virtualization is enabled at runtime. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: <1c782269608b2f5e1034be450f375a8432fb705d.1618196135.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit 3c0c2ad1ae75963c05bf89ec91918c6a53a72696 Author: Sean Christopherson Date: Mon Apr 12 16:21:37 2021 +1200 KVM: VMX: Add basic handling of VM-Exit from SGX enclave Add support for handling VM-Exits that originate from a guest SGX enclave. In SGX, an "enclave" is a new CPL3-only execution environment, wherein the CPU and memory state is protected by hardware to make the state inaccesible to code running outside of the enclave. When exiting an enclave due to an asynchronous event (from the perspective of the enclave), e.g. exceptions, interrupts, and VM-Exits, the enclave's state is automatically saved and scrubbed (the CPU loads synthetic state), and then reloaded when re-entering the enclave. E.g. after an instruction based VM-Exit from an enclave, vmcs.GUEST_RIP will not contain the RIP of the enclave instruction that trigered VM-Exit, but will instead point to a RIP in the enclave's untrusted runtime (the guest userspace code that coordinates entry/exit to/from the enclave). To help a VMM recognize and handle exits from enclaves, SGX adds bits to existing VMCS fields, VM_EXIT_REASON.VMX_EXIT_REASON_FROM_ENCLAVE and GUEST_INTERRUPTIBILITY_INFO.GUEST_INTR_STATE_ENCLAVE_INTR. Define the new architectural bits, and add a boolean to struct vcpu_vmx to cache VMX_EXIT_REASON_FROM_ENCLAVE. Clear the bit in exit_reason so that checks against exit_reason do not need to account for SGX, e.g. "if (exit_reason == EXIT_REASON_EXCEPTION_NMI)" continues to work. KVM is a largely a passive observer of the new bits, e.g. KVM needs to account for the bits when propagating information to a nested VMM, but otherwise doesn't need to act differently for the majority of VM-Exits from enclaves. The one scenario that is directly impacted is emulation, which is for all intents and purposes impossible[1] since KVM does not have access to the RIP or instruction stream that triggered the VM-Exit. The inability to emulate is a non-issue for KVM, as most instructions that might trigger VM-Exit unconditionally #UD in an enclave (before the VM-Exit check. For the few instruction that conditionally #UD, KVM either never sets the exiting control, e.g. PAUSE_EXITING[2], or sets it if and only if the feature is not exposed to the guest in order to inject a #UD, e.g. RDRAND_EXITING. But, because it is still possible for a guest to trigger emulation, e.g. MMIO, inject a #UD if KVM ever attempts emulation after a VM-Exit from an enclave. This is architecturally accurate for instruction VM-Exits, and for MMIO it's the least bad choice, e.g. it's preferable to killing the VM. In practice, only broken or particularly stupid guests should ever encounter this behavior. Add a WARN in skip_emulated_instruction to detect any attempt to modify the guest's RIP during an SGX enclave VM-Exit as all such flows should either be unreachable or must handle exits from enclaves before getting to skip_emulated_instruction. [1] Impossible for all practical purposes. Not truly impossible since KVM could implement some form of para-virtualization scheme. [2] PAUSE_LOOP_EXITING only affects CPL0 and enclaves exist only at CPL3, so we also don't need to worry about that interaction. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: <315f54a8507d09c292463ef29104e1d4c62e9090.1618196135.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit 01de8682b32d3ed4f0136f7379e1e3ae2e563308 Author: Sean Christopherson Date: Mon Apr 12 16:21:36 2021 +1200 KVM: x86: Add reverse-CPUID lookup support for scattered SGX features Define a new KVM-only feature word for advertising and querying SGX sub-features in CPUID.0x12.0x0.EAX. Because SGX1 and SGX2 are scattered in the kernel's feature word, they need to be translated so that the bit numbers match those of hardware. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: Signed-off-by: Paolo Bonzini commit 4e66c0cb79b732b01b82e094b21b8e22a20dff83 Author: Sean Christopherson Date: Mon Apr 12 16:21:35 2021 +1200 KVM: x86: Add support for reverse CPUID lookup of scattered features Introduce a scheme that allows KVM's CPUID magic to support features that are scattered in the kernel's feature words. To advertise and/or query guest support for CPUID-based features, KVM requires the bit number of an X86_FEATURE_* to match the bit number in its associated CPUID entry. For scattered features, this does not hold true. Add a framework to allow defining KVM-only words, stored in kvm_cpu_caps after the shared kernel caps, that can be used to gather the scattered feature bits by translating X86_FEATURE_* flags into their KVM-defined feature. Note, because reverse_cpuid_check() effectively forces kvm_cpu_caps lookups to be resolved at compile time, there is no runtime cost for translating from kernel-defined to kvm-defined features. More details here: https://lkml.kernel.org/r/X/jxCOLG+HUO4QlZ@google.com Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: <16cad8d00475f67867fb36701fc7fb7c1ec86ce1.1618196135.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit 00e7646c3563d2f1a46a8fa1824c32373d77a8be Author: Sean Christopherson Date: Mon Apr 12 16:21:34 2021 +1200 KVM: x86: Define new #PF SGX error code bit Page faults that are signaled by the SGX Enclave Page Cache Map (EPCM), as opposed to the traditional IA32/EPT page tables, set an SGX bit in the error code to indicate that the #PF was induced by SGX. KVM will need to emulate this behavior as part of its trap-and-execute scheme for virtualizing SGX Launch Control, e.g. to inject SGX-induced #PFs if EINIT faults in the host, and to support live migration. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Message-Id: Signed-off-by: Paolo Bonzini commit 54f958cdaa8c43c0e9b9ef850ae613a6e1bda44e Author: Sean Christopherson Date: Mon Apr 12 16:21:33 2021 +1200 KVM: x86: Export kvm_mmu_gva_to_gpa_{read,write}() for SGX (VMX) Export the gva_to_gpa() helpers for use by SGX virtualization when executing ENCLS[ECREATE] and ENCLS[EINIT] on behalf of the guest. To execute ECREATE and EINIT, KVM must obtain the GPA of the target Secure Enclave Control Structure (SECS) in order to get its corresponding HVA. Because the SECS must reside in the Enclave Page Cache (EPC), copying the SECS's data to a host-controlled buffer via existing exported helpers is not a viable option as the EPC is not readable or writable by the kernel. SGX virtualization will also use gva_to_gpa() to obtain HVAs for non-EPC pages in order to pass user pointers directly to ECREATE and EINIT, which avoids having to copy pages worth of data into the kernel. Signed-off-by: Sean Christopherson Acked-by: Jarkko Sakkinen Signed-off-by: Kai Huang Message-Id: <02f37708321bcdfaa2f9d41c8478affa6e84b04d.1618196135.git.kai.huang@intel.com> Signed-off-by: Paolo Bonzini commit b9c2bd50eca5dc6ed8eaacbbb2e17df95a56bd1c Author: Yanan Wang Date: Tue Mar 30 16:08:56 2021 +0800 KVM: selftests: Add a test for kvm page table code This test serves as a performance tester and a bug reproducer for kvm page table code (GPA->HPA mappings), so it gives guidance for people trying to make some improvement for kvm. The function guest_code() can cover the conditions where a single vcpu or multiple vcpus access guest pages within the same memory region, in three VM stages(before dirty logging, during dirty logging, after dirty logging). Besides, the backing src memory type(ANONYMOUS/THP/HUGETLB) of the tested memory region can be specified by users, which means normal page mappings or block mappings can be chosen by users to be created in the test. If ANONYMOUS memory is specified, kvm will create normal page mappings for the tested memory region before dirty logging, and update attributes of the page mappings from RO to RW during dirty logging. If THP/HUGETLB memory is specified, kvm will create block mappings for the tested memory region before dirty logging, and split the blcok mappings into normal page mappings during dirty logging, and coalesce the page mappings back into block mappings after dirty logging is stopped. So in summary, as a performance tester, this test can present the performance of kvm creating/updating normal page mappings, or the performance of kvm creating/splitting/recovering block mappings, through execution time. When we need to coalesce the page mappings back to block mappings after dirty logging is stopped, we have to firstly invalidate *all* the TLB entries for the page mappings right before installation of the block entry, because a TLB conflict abort error could occur if we can't invalidate the TLB entries fully. We have hit this TLB conflict twice on aarch64 software implementation and fixed it. As this test can imulate process from dirty logging enabled to dirty logging stopped of a VM with block mappings, so it can also reproduce this TLB conflict abort due to inadequate TLB invalidation when coalescing tables. Signed-off-by: Yanan Wang Reviewed-by: Ben Gardon Reviewed-by: Andrew Jones Message-Id: <20210330080856.14940-11-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit a4b3c8b583bfc8b3a3d04c63a527cbd081eac9f7 Author: Yanan Wang Date: Tue Mar 30 16:08:55 2021 +0800 KVM: selftests: Adapt vm_userspace_mem_region_add to new helpers With VM_MEM_SRC_ANONYMOUS_THP specified in vm_userspace_mem_region_add(), we have to get the transparent hugepage size for HVA alignment. With the new helpers, we can use get_backing_src_pagesz() to check whether THP is configured and then get the exact configured hugepage size. As different architectures may have different THP page sizes configured, this can get the accurate THP page sizes on any platform. Signed-off-by: Yanan Wang Reviewed-by: Ben Gardon Reviewed-by: Andrew Jones Message-Id: <20210330080856.14940-10-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit 623653b7d4622cb7d016e9a81e6a9d0d9b1326df Author: Yanan Wang Date: Tue Mar 30 16:08:54 2021 +0800 KVM: selftests: List all hugetlb src types specified with page sizes With VM_MEM_SRC_ANONYMOUS_HUGETLB, we currently can only use system default hugetlb pages to back the testing guest memory. In order to add flexibility, now list all the known hugetlb backing src types with different page sizes, so that we can specify use of hugetlb pages of the exact granularity that we want. And as all the known hugetlb page sizes are listed, it's appropriate for all architectures. Besides, the helper get_backing_src_pagesz() is added to get the granularity of different backing src types(anonumous, thp, hugetlb). Suggested-by: Ben Gardon Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones Message-Id: <20210330080856.14940-9-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit 5579fa682a3411e5ed58bde35af5128f1044a4b9 Author: Yanan Wang Date: Tue Mar 30 16:08:53 2021 +0800 KVM: selftests: Add a helper to get system default hugetlb page size If HUGETLB is configured in the host kernel, then we can know the system default hugetlb page size through *cat /proc/meminfo*. Otherwise, we will not see the information of hugetlb pages in file /proc/meminfo if it's not configured. So add a helper to determine whether HUGETLB is configured and then get the default page size by reading /proc/meminfo. This helper can be useful when a program wants to use the default hugetlb pages of the system and doesn't know the default page size. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones Message-Id: <20210330080856.14940-8-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit 3b70c4d128a7781f507fa072d60ce5df3fdfcaa6 Author: Yanan Wang Date: Tue Mar 30 16:08:52 2021 +0800 KVM: selftests: Add a helper to get system configured THP page size If we want to have some tests about transparent hugepages, the system configured THP hugepage size should better be known by the tests, which can be used for kinds of alignment or guest memory accessing of vcpus... So it makes sense to add a helper to get the transparent hugepage size. With VM_MEM_SRC_ANONYMOUS_THP specified in vm_userspace_mem_region_add(), we now stat /sys/kernel/mm/transparent_hugepage to check whether THP is configured in the host kernel before madvise(). Based on this, we can also read file /sys/kernel/mm/transparent_hugepage/hpage_pmd_size to get THP hugepage size. Signed-off-by: Yanan Wang Reviewed-by: Ben Gardon Reviewed-by: Andrew Jones Message-Id: <20210330080856.14940-7-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit 6436430e29fb250c140c94a8fcc218a832dcaf74 Author: Yanan Wang Date: Tue Mar 30 16:08:51 2021 +0800 KVM: selftests: Make a generic helper to get vm guest mode strings For generality and conciseness, make an API which can be used in all kvm libs and selftests to get vm guest mode strings. And the index i is checked in the API in case of possiable faults. Suggested-by: Sean Christopherson Signed-off-by: Yanan Wang Reviewed-by: Ben Gardon Reviewed-by: Andrew Jones Message-Id: <20210330080856.14940-6-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit c412d6ac28ac55505c5b079e259caddd9f55d293 Author: Yanan Wang Date: Tue Mar 30 16:08:50 2021 +0800 KVM: selftests: Print the errno besides error-string in TEST_ASSERT Print the errno besides error-string in TEST_ASSERT in the format of "errno=%d - %s" will explicitly indicate that the string is an error information. Besides, the errno is easier to be used for debugging than the error-string. Suggested-by: Andrew Jones Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones Message-Id: <20210330080856.14940-5-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit fa76c775be27bdc49cc2d39f8ebdb926a9d53294 Author: Yanan Wang Date: Tue Mar 30 16:08:47 2021 +0800 tools/headers: sync headers of asm-generic/hugetlb_encode.h This patch syncs contents of tools/include/asm-generic/hugetlb_encode.h and include/uapi/asm-generic/hugetlb_encode.h. Arch powerpc supports 16KB hugepages and ARM64 supports 32MB/512MB hugepages. The corresponding mmap flags have already been added in include/uapi/asm-generic/hugetlb_encode.h, but not tools/include/asm-generic/hugetlb_encode.h. Cc: Ingo Molnar Cc: Adrian Hunter Cc: Jiri Olsa Cc: Arnaldo Carvalho de Melo Signed-off-by: Yanan Wang Reviewed-by: Ben Gardon Message-Id: <20210330080856.14940-2-wangyanan55@huawei.com> Signed-off-by: Paolo Bonzini commit 870c575a56c751d515d036495316a302ff6e7f6e Author: Haiwei Li Date: Fri Apr 9 10:24:56 2021 +0800 KVM: vmx: add mismatched size assertions in vmcs_check32() Add compile-time assertions in vmcs_check32() to disallow accesses to 64-bit and 64-bit high fields via vmcs_{read,write}32(). Upper level KVM code should never do partial accesses to VMCS fields. KVM handles the split accesses automatically in vmcs_{read,write}64() when running as a 32-bit kernel. Reviewed-and-tested-by: Sean Christopherson Signed-off-by: Haiwei Li Message-Id: <20210409022456.23528-1-lihaiwei.kernel@gmail.com> Signed-off-by: Paolo Bonzini commit 7c896d375565a032705f64804f8c1189df1f7a89 Author: Sean Christopherson Date: Mon Apr 12 15:20:50 2021 -0700 KVM: Add proper lockdep assertion in I/O bus unregister Convert a comment above kvm_io_bus_unregister_dev() into an actual lockdep assertion, and opportunistically add curly braces to a multi-line for-loop. Signed-off-by: Sean Christopherson Message-Id: <20210412222050.876100-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5d3c4c79384af06e3c8e25b7770b6247496b4417 Author: Sean Christopherson Date: Mon Apr 12 15:20:49 2021 -0700 KVM: Stop looking for coalesced MMIO zones if the bus is destroyed Abort the walk of coalesced MMIO zones if kvm_io_bus_unregister_dev() fails to allocate memory for the new instance of the bus. If it can't instantiate a new bus, unregister_dev() destroys all devices _except_ the target device. But, it doesn't tell the caller that it obliterated the bus and invoked the destructor for all devices that were on the bus. In the coalesced MMIO case, this can result in a deleted list entry dereference due to attempting to continue iterating on coalesced_zones after future entries (in the walk) have been deleted. Opportunistically add curly braces to the for-loop, which encompasses many lines but sneaks by without braces due to the guts being a single if statement. Fixes: f65886606c2d ("KVM: fix memory leak in kvm_io_bus_unregister_dev()") Cc: stable@vger.kernel.org Reported-by: Hao Sun Signed-off-by: Sean Christopherson Message-Id: <20210412222050.876100-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2ee3757424be7c1cd1d0bbfa6db29a7edd82a250 Author: Sean Christopherson Date: Mon Apr 12 15:20:48 2021 -0700 KVM: Destroy I/O bus devices on unregister failure _after_ sync'ing SRCU If allocating a new instance of an I/O bus fails when unregistering a device, wait to destroy the device until after all readers are guaranteed to see the new null bus. Destroying devices before the bus is nullified could lead to use-after-free since readers expect the devices on their reference of the bus to remain valid. Fixes: f65886606c2d ("KVM: fix memory leak in kvm_io_bus_unregister_dev()") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210412222050.876100-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 24e7475f931ad7090c1e63dbaf12f338aeb81eac Author: Emanuele Giuseppe Esposito Date: Tue Mar 16 18:08:14 2021 +0100 doc/virt/kvm: move KVM_CAP_PPC_MULTITCE in section 8 KVM_CAP_PPC_MULTITCE is a capability, not an ioctl. Therefore move it from section 4.97 to the new 8.31 (other capabilities). To fill the gap, move KVM_X86_SET_MSR_FILTER (was 4.126) to 4.97, and shifted Xen-related ioctl (were 4.127 - 4.130) by one place (4.126 - 4.129). Also fixed minor typo in KVM_GET_MSR_INDEX_LIST ioctl description (section 4.3). Signed-off-by: Emanuele Giuseppe Esposito Message-Id: <20210316170814.64286-1-eesposit@redhat.com> Signed-off-by: Paolo Bonzini commit d90b15edbefb2229d22c6a69113e954e761e1072 Author: Keqian Zhu Date: Tue Apr 6 14:35:04 2021 +0800 KVM: x86: Remove unused function declaration kvm_mmu_slot_largepage_remove_write_access() is decared but not used, just remove it. Signed-off-by: Keqian Zhu Message-Id: <20210406063504.17552-1-zhukeqian1@huawei.com> Reviewed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit 44f1b5586df03b044704f3c57f529ea4120f406b Author: Sean Christopherson Date: Tue Apr 6 10:18:11 2021 -0700 KVM: SVM: Enhance and clean up the vmcb tracking comment in pre_svm_run() Explicitly document why a vmcb must be marked dirty and assigned a new asid when it will be run on a different cpu. The "what" is relatively obvious, whereas the "why" requires reading the APM and/or KVM code. Opportunistically remove a spurious period and several unnecessary newlines in the comment. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210406171811.4043363-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 554cf31474937f0a78045aaa7df565ffb6a29c43 Author: Sean Christopherson Date: Tue Apr 6 10:18:10 2021 -0700 KVM: SVM: Add a comment to clarify what vcpu_svm.vmcb points at Add a comment above the declaration of vcpu_svm.vmcb to call out that it is simply a shorthand for current_vmcb->ptr. The myriad accesses to svm->vmcb are quite confusing without this crucial detail. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210406171811.4043363-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d1788191fdb03691059ab7aeed36206977f2d784 Author: Sean Christopherson Date: Tue Apr 6 10:18:09 2021 -0700 KVM: SVM: Drop vcpu_svm.vmcb_pa Remove vmcb_pa from vcpu_svm and simply read current_vmcb->pa directly in the one path where it is consumed. Unlike svm->vmcb, use of the current vmcb's address is very limited, as evidenced by the fact that its use can be trimmed to a single dereference. Opportunistically add a comment about using vmcb01 for VMLOAD/VMSAVE, at first glance using vmcb01 instead of vmcb_pa looks wrong. No functional change intended. Cc: Maxim Levitsky Signed-off-by: Sean Christopherson Message-Id: <20210406171811.4043363-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 17e5e964eee05a3ee434cf0958ecce741a6874b1 Author: Sean Christopherson Date: Tue Apr 6 10:18:08 2021 -0700 KVM: SVM: Don't set current_vmcb->cpu when switching vmcb Do not update the new vmcb's last-run cpu when switching to a different vmcb. If the vCPU is migrated between its last run and a vmcb switch, e.g. for nested VM-Exit, then setting the cpu without marking the vmcb dirty will lead to KVM running the vCPU on a different physical cpu with stale clean bit settings. vcpu->cpu current_vmcb->cpu hardware pre_svm_run() cpu0 cpu0 cpu0,clean kvm_arch_vcpu_load() cpu1 cpu0 cpu0,clean svm_switch_vmcb() cpu1 cpu1 cpu0,clean pre_svm_run() cpu1 cpu1 kaboom Simply delete the offending code; unlike VMX, which needs to update the cpu at switch time due to the need to do VMPTRLD, SVM only cares about which cpu last ran the vCPU. Fixes: af18fa775d07 ("KVM: nSVM: Track the physical cpu of the vmcb vmrun through the vmcb") Cc: Cathy Avery Signed-off-by: Sean Christopherson Message-Id: <20210406171811.4043363-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3f5ad91488e813026f8c5f46b839e91a83912703 Author: YueHaibing Date: Mon Mar 29 22:40:29 2021 +0800 sched/fair: Move update_nohz_stats() to the CONFIG_NO_HZ_COMMON block to simplify the code & fix an unused function warning When !CONFIG_NO_HZ_COMMON we get this new GCC warning: kernel/sched/fair.c:8398:13: warning: ‘update_nohz_stats’ defined but not used [-Wunused-function] Move update_nohz_stats() to an already existing CONFIG_NO_HZ_COMMON #ifdef block. Beyond fixing the GCC warning, this also simplifies the update_nohz_stats() function. [ mingo: Rewrote the changelog. ] Fixes: 0826530de3cb ("sched/fair: Remove update of blocked load from newidle_balance") Signed-off-by: YueHaibing Signed-off-by: Ingo Molnar Reviewed-by: Vincent Guittot Link: https://lore.kernel.org/r/20210329144029.29200-1-yuehaibing@huawei.com commit d0d252b8ca7a636640a7dca8606edf7c3bcfe0b8 Merge: 9406415f46f61 bf05bf16c76bb Author: Ingo Molnar Date: Tue Apr 20 10:13:58 2021 +0200 Merge tag 'v5.12-rc8' into sched/core, to pick up fixes Signed-off-by: Ingo Molnar commit 27743f01e391ee1d80e3be2a09237507b965f91b Author: Ingo Molnar Date: Tue Apr 20 10:03:02 2021 +0200 x86/platform/uv: Remove dead !CONFIG_KEXEC_CORE code The !CONFIG_KEXEC_CORE code in arch/x86/platform/uv/uv_nmi.c was unused, untested and didn't even build for 7 years. Since we fixed this by requiring X86_UV to depend on CONFIG_KEXEC_CORE, remove the (now) dead code. Also move the uv_nmi_kexec_failed definition back up to where the other file-scope global variables are defined. Signed-off-by: Ingo Molnar Cc: Mike Travis Cc: linux-kernel@vger.kernel.org commit c2209ea55612efac75de0a58ef5f7394fae7fa0f Author: Ingo Molnar Date: Tue Apr 20 09:47:42 2021 +0200 x86/platform/uv: Fix !KEXEC build failure When KEXEC is disabled, the UV build fails: arch/x86/platform/uv/uv_nmi.c:875:14: error: ‘uv_nmi_kexec_failed’ undeclared (first use in this function) Since uv_nmi_kexec_failed is only defined in the KEXEC_CORE #ifdef branch, this code cannot ever have been build tested: if (main) pr_err("UV: NMI kdump: KEXEC not supported in this kernel\n"); atomic_set(&uv_nmi_kexec_failed, 1); Nor is this use possible in uv_handle_nmi(): atomic_set(&uv_nmi_kexec_failed, 0); These bugs were introduced in this commit: d0a9964e9873: ("x86/platform/uv: Implement simple dump failover if kdump fails") Which added the uv_nmi_kexec_failed assignments to !KEXEC code, while making the definition KEXEC-only - apparently without testing the !KEXEC case. Instead of complicating the #ifdef maze, simplify the code by requiring X86_UV to depend on KEXEC_CORE. This pattern is present in other architectures as well. ( We'll remove the untested, 7 years old !KEXEC complications from the file in a separate commit. ) Fixes: d0a9964e9873: ("x86/platform/uv: Implement simple dump failover if kdump fails") Signed-off-by: Ingo Molnar Cc: Mike Travis Cc: linux-kernel@vger.kernel.org commit fc88f7ad763a8ef2a20f8904bd241930b7696f86 Author: dingsenjie Date: Wed Apr 14 14:39:43 2021 +0800 thermal/drivers/tegra: Use devm_platform_ioremap_resource_byname Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: dingsenjie Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210414063943.96244-1-dingsenjie@163.com commit beaa41029fdea9d3e01af3a1a800538542d30869 Author: Ye Bin Date: Fri Apr 9 15:52:24 2021 +0800 thermal/drivers/hisi: Remove redundant dev_err call in hisi_thermal_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210409075224.2109503-1-yebin10@huawei.com commit 2eb87d75f980bcc7c2bd370661f8fcc4ec273ea5 Author: Zhang Rui Date: Mon Apr 12 20:59:01 2021 +0800 thermal/drivers/intel: Introduce tcc cooling driver On Intel processors, the core frequency can be reduced below OS request, when the current temperature reaches the TCC (Thermal Control Circuit) activation temperature. The default TCC activation temperature is specified by MSR_IA32_TEMPERATURE_TARGET. However, it can be adjusted by specifying an offset in degrees C, using the TCC Offset bits in the same MSR register. This patch introduces a cooling devices driver that utilizes the TCC Offset feature. The bigger the current cooling state is, the lower the effective TCC activation temperature is, so that the processors can be throttled earlier before system critical overheats. Note that, on different platforms, the behavior might be different on how fast the setting takes effect, and how much the CPU frequency is reduced. This patch has been tested on a KabyLake mobile platform from me, and also on a CometLake platform from Doug. Signed-off-by: Zhang Rui Tested by: Doug Smythies Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210412125901.12549-1-rui.zhang@intel.com commit d1ab7c3a33d27e7b63fd6207d88852561072ae36 Author: Ruiqi Gong Date: Thu Apr 8 06:03:29 2021 -0400 thermal/drivers/bcm2835: Remove redundant dev_err call in bcm2835_thermal_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Ruiqi Gong Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210408100329.7585-1-gongruiqi1@huawei.com commit 8cd7ab2a1a393f37f2e2f4b3ff595d98c245b854 Author: Ruiqi Gong Date: Thu Apr 8 06:01:44 2021 -0400 thermal/drivers/thermal_mmio: Remove redundant dev_err call in thermal_mmio_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Ruiqi Gong Acked-by: Talel Shenhar Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210408100144.7494-1-gongruiqi1@huawei.com commit a2149ab815fce21d0d83082818116519e44f87be Author: Konrad Dybcio Date: Fri Mar 19 23:08:02 2021 +0100 thermal/drivers/qcom/tsens-v0_1: Add support for MDM9607 MDM9607 TSENS IP is very similar to the one of MSM8916, with minor adjustments to various tuning values. Signed-off-by: Konrad Dybcio Acked-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210319220802.198215-2-konrad.dybcio@somainline.org commit e4e8bc1df691ba5ba749d1e2b67acf9827e51a35 Author: Michael Ellerman Date: Mon Apr 19 22:01:39 2021 +1000 powerpc/kvm: Fix PR KVM with KUAP/MEM_KEYS enabled The changes to add KUAP support with the hash MMU broke booting of KVM PR guests. The symptom is no visible progress of the guest, or possibly just "SLOF" being printed to the qemu console. Host code is still executing, but breaking into xmon might show a stack trace such as: __might_fault+0x84/0xe0 (unreliable) kvm_read_guest+0x1c8/0x2f0 [kvm] kvmppc_ld+0x1b8/0x2d0 [kvm] kvmppc_load_last_inst+0x50/0xa0 [kvm] kvmppc_exit_pr_progint+0x178/0x220 [kvm_pr] kvmppc_handle_exit_pr+0x31c/0xe30 [kvm_pr] after_sprg3_load+0x80/0x90 [kvm_pr] kvmppc_vcpu_run_pr+0x104/0x260 [kvm_pr] kvmppc_vcpu_run+0x34/0x48 [kvm] kvm_arch_vcpu_ioctl_run+0x340/0x450 [kvm] kvm_vcpu_ioctl+0x2ac/0x8c0 [kvm] sys_ioctl+0x320/0x1060 system_call_exception+0x160/0x270 system_call_common+0xf0/0x27c Bisect points to commit b2ff33a10c8b ("powerpc/book3s64/hash/kuap: Enable kuap on hash"), but that's just the commit that enabled KUAP with hash and made the bug visible. The root cause seems to be that KVM PR is creating kernel mappings that don't use the correct key, since we switched to using key 3. We have a helper for adding the right key value, however it's designed to take a pteflags variable, which the KVM code doesn't have. But we can make it work by passing 0 for the pteflags, and tell it explicitly that it should use the kernel key. With that changed guests boot successfully. Fixes: d94b827e89dc ("powerpc/book3s64/kuap: Use Key 3 for kernel mapping with hash translation") Cc: stable@vger.kernel.org # v5.11+ Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210419120139.1455937-1-mpe@ellerman.id.au commit ed8029d7b472369a010a1901358567ca3b6dbb0d Author: Michael Ellerman Date: Sun Apr 18 23:54:13 2021 +1000 powerpc/pseries: Stop calling printk in rtas_stop_self() RCU complains about us calling printk() from an offline CPU: ============================= WARNING: suspicious RCU usage 5.12.0-rc7-02874-g7cf90e481cb8 #1 Not tainted ----------------------------- kernel/locking/lockdep.c:3568 RCU-list traversed in non-reader section!! other info that might help us debug this: RCU used illegally from offline CPU! rcu_scheduler_active = 2, debug_locks = 1 no locks held by swapper/0/0. stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.12.0-rc7-02874-g7cf90e481cb8 #1 Call Trace: dump_stack+0xec/0x144 (unreliable) lockdep_rcu_suspicious+0x124/0x144 __lock_acquire+0x1098/0x28b0 lock_acquire+0x128/0x600 _raw_spin_lock_irqsave+0x6c/0xc0 down_trylock+0x2c/0x70 __down_trylock_console_sem+0x60/0x140 vprintk_emit+0x1a8/0x4b0 vprintk_func+0xcc/0x200 printk+0x40/0x54 pseries_cpu_offline_self+0xc0/0x120 arch_cpu_idle_dead+0x54/0x70 do_idle+0x174/0x4a0 cpu_startup_entry+0x38/0x40 rest_init+0x268/0x388 start_kernel+0x748/0x790 start_here_common+0x1c/0x614 Which happens because by the time we get to rtas_stop_self() we are already offline. In addition the message can be spammy, and is not that helpful for users, so remove it. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210418135413.1204031-1-mpe@ellerman.id.au commit 3027a37c06be364e6443d3df3adf45576fba50cb Author: Michael Ellerman Date: Sun Apr 18 23:16:41 2021 +1000 powerpc: Only define _TASK_CPU for 32-bit We have some interesting code in our Makefile to define _TASK_CPU, based on awk'ing the value out of asm-offsets.h. It exists to circumvent some circular header dependencies that prevent us from referring to task_struct in the relevant code. See the comment around _TASK_CPU in smp.h for more detail. Maybe one day we can come up with a better solution, but for now we can at least limit that logic to 32-bit, because it's not needed for 64-bit. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210418131641.1186227-1-mpe@ellerman.id.au commit 39d0099f94390eb7a677e1a5c9bb56a4daa242a1 Author: Tyrel Datwyler Date: Thu Apr 1 18:13:25 2021 -0600 powerpc/pseries: Add shutdown() to vio_driver and vio_bus Currently, neither the vio_bus or vio_driver structures provide support for a shutdown() routine. Add support for shutdown() by allowing drivers to provide a implementation via function pointer in their vio_driver struct and provide a proper implementation in the driver template for the vio_bus that calls a vio drivers shutdown() if defined. In the case that no shutdown() is defined by a vio driver and a kexec is in progress we implement a big hammer that calls remove() to ensure no further DMA for the devices is possible. Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210402001325.939668-1-tyreld@linux.ibm.com commit af31fd0c9107e400a8eb89d0eafb40bb78802f79 Author: Athira Rajeev Date: Mon Mar 22 10:57:23 2021 -0400 powerpc/perf: Expose processor pipeline stage cycles using PERF_SAMPLE_WEIGHT_STRUCT Performance Monitoring Unit (PMU) registers in powerpc provides information on cycles elapsed between different stages in the pipeline. This can be used for application tuning. On ISA v3.1 platform, this information is exposed by sampling registers. Patch adds kernel support to capture two of the cycle counters as part of perf sample using the sample type: PERF_SAMPLE_WEIGHT_STRUCT. The power PMU function 'get_mem_weight' currently uses 64 bit weight field of perf_sample_data to capture memory latency. But following the introduction of PERF_SAMPLE_WEIGHT_TYPE, weight field could contain 64-bit or 32-bit value depending on the architexture support for PERF_SAMPLE_WEIGHT_STRUCT. Patches uses WEIGHT_STRUCT to expose the pipeline stage cycles info. Hence update the ppmu functions to work for 64-bit and 32-bit weight values. If the sample type is PERF_SAMPLE_WEIGHT, use the 64-bit weight field. if the sample type is PERF_SAMPLE_WEIGHT_STRUCT, memory subsystem latency is stored in the low 32bits of perf_sample_weight structure. Also for CPU_FTR_ARCH_31, capture the two cycle counter information in two 16 bit fields of perf_sample_weight structure. Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1616425047-1666-2-git-send-email-atrajeev@linux.vnet.ibm.com commit 2886e2df10beaf50352dad7a90907251bc692029 Author: Haren Myneni Date: Sun Apr 18 12:29:42 2021 -0700 Documentation/powerpc: Add proper links for manual and tests The links that are mentioned in this document are no longer valid. So changed the proper links for NXGZIP user manual and test cases. Reported-by: Bulent Abali Signed-off-by: Haren Myneni Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/08511c1e92ac239f20ac88c73c59d1f8cf02e6ad.camel@linux.ibm.com commit 29c9a2699e71a7866a98ebdf6ea38135d31b4e1f Author: Daniel Henrique Barboza Date: Fri Apr 16 18:02:16 2021 -0300 powerpc/pseries: Set UNISOLATE on dlpar_cpu_remove() failure The RTAS set-indicator call, when attempting to UNISOLATE a DRC that is already UNISOLATED or CONFIGURED, returns RTAS_OK and does nothing else for both QEMU and phyp. This gives us an opportunity to use this behavior to signal the hypervisor layer when an error during device removal happens, allowing it to do a proper error handling, while not breaking QEMU/phyp implementations that don't have this support. This patch introduces this idea by unisolating all CPU DRCs that failed to be removed by dlpar_cpu_remove_by_index(), when handling the PSERIES_HP_ELOG_ID_DRC_INDEX event. This is being done for this event only because its the only CPU removal event QEMU uses, and there's no need at this moment to add this mechanism for phyp only code. Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210416210216.380291-3-danielhb413@gmail.com commit 0e3b3ff83ce24a7a01e467ca42e3e33e87195c0d Author: Daniel Henrique Barboza Date: Fri Apr 16 18:02:15 2021 -0300 powerpc/pseries: Introduce dlpar_unisolate_drc() Next patch will execute a set-indicator call in hotplug-cpu.c. Create a dlpar_unisolate_drc() helper to avoid spreading more rtas_set_indicator() calls outside of dlpar.c. Signed-off-by: Daniel Henrique Barboza Reviewed-by: David Gibson Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210416210216.380291-2-danielhb413@gmail.com commit 864ec4d40c83365b16483d88990e7e579537635c Author: Ganesh Goudar Date: Fri Apr 16 18:27:50 2021 +0530 powerpc/pseries/mce: Fix a typo in error type assignment The error type is ICACHE not DCACHE, for case MCE_ERROR_TYPE_ICACHE. Signed-off-by: Ganesh Goudar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210416125750.49550-1-ganeshgr@linux.ibm.com commit aeacb52a8de7046be5399ba311f49bce96e1b269 Author: Yevgeny Kliteynik Date: Tue Nov 3 01:31:53 2020 +0200 net/mlx5: DR, Add support for isolate_vl_tc QP When using SW steering, rule insertion rate depends on the RDMA RC QP performance used for writing to the ICM. During stress this QP is competing on the HW resources with all the other QPs that are used to send data. To protect SW steering QP's performance in such cases, we set this QP to use isolated VL. The VL number is reserved by FW and is not exposed to the driver. Support for this QP on isolated VL exists only when both force-loopback and isolate_vl_tc capabilities are set. Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 7304d603a57a1edecfecfbcc26f85edcda4cae81 Author: Yevgeny Kliteynik Date: Mon Nov 2 23:57:13 2020 +0200 net/mlx5: DR, Add support for force-loopback QP When supported by the device, SW steering RoCE RC QP that is used to write/read to/from ICM will be created with force-loopback attribute. Such QP doesn't require GID index upon creation. Signed-off-by: Erez Shitrit Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit df9dd15ae118e4c95fba6fe2d870ae23a99c3de2 Author: Yevgeny Kliteynik Date: Sun Feb 7 04:40:16 2021 +0200 net/mlx5: DR, Add support for matching tunnel GTP-U Enable matching on tunnel GTP-U and GTP-U first extension header using dynamic flex parser. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 35ba005d820b541d69c188fd415f0d41fe4919e6 Author: Yevgeny Kliteynik Date: Sun Feb 7 04:37:56 2021 +0200 net/mlx5: DR, Set flex parser for TNL_MPLS dynamically Query the flex_parser id that's intended for TNL_MPLS and use an appropriate flex parser for MPLS over UDP/GRE. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 3442e0335e70f348728c17bca924ec507ad6358a Author: Yevgeny Kliteynik Date: Sun Feb 7 04:27:48 2021 +0200 net/mlx5: DR, Add support for matching on geneve TLV option Enable matching on tunnel geneve TLV option using the flex parser. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 4923938d2fb589e6684e484c2e6031fae7048b02 Author: Yevgeny Kliteynik Date: Sun Feb 7 04:19:27 2021 +0200 net/mlx5: DR, Set STEv0 ICMP flex parser dynamically Set the flex parser ID dynamicly for ICMP instead of relying on hardcoded values. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 160e9cb37a8496edfe4ce74abe33ade103f59db2 Author: Yevgeny Kliteynik Date: Tue Nov 24 19:48:09 2020 +0200 net/mlx5: DR, Add support for dynamic flex parser Flex parser is a HW parser that can support protocols that are not natively supported by the HCA, such as Geneve (TLV options) and GTP-U. There are 8 such parsers, and each of them can be assigned to parse a specific set of protocols. This patch adds misc4 match params which allows using a correct flex parser that was programmed to the required protocol. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 323b91acc1898281da8c5cec32a50aa272ef5f5a Author: Muhammad Sammar Date: Wed Oct 21 08:29:49 2020 +0300 net/mlx5: DR, Remove protocol-specific flex_parser_3 definitions Remove MPLS specific fields from flex parser 3 layout. Flex parser can be used for multiple protocols and should not be hardcoded to a specific type. Signed-off-by: Muhammad Sammar Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 704cfecdd03d7b84403ed96ba0009ea07270e74e Author: Yevgeny Kliteynik Date: Sun Feb 28 23:48:27 2021 +0200 net/mlx5: mlx5_ifc updates for flex parser Added the required definitions for supporting more protocols by flex parsers (GTP-U, Geneve TLV options), and for using the right flex parser that was configured for this protocol. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 25cb317680422f199ec6ac6ba359eb98f2748429 Author: Yevgeny Kliteynik Date: Sat Feb 6 15:44:53 2021 +0200 net/mlx5: E-Switch, Improve error messages in term table creation Add error code to the error messages and removed duplicated message: if termination table creation failed, we already get an error message in mlx5_eswitch_termtbl_create, so no need for the additional error print in the calling function. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit ff1925bb0de4c6e657e40e2c0d5ecf0fabbfbdd3 Author: Yevgeny Kliteynik Date: Sat Feb 6 22:44:41 2021 +0200 net/mlx5: DR, Fix SQ/RQ in doorbell bitmask QP doorbell size is 16 bits. Fixing sw steering's QP doorbel bitmask, which had 20 bits. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 7d22ad732d15a35d49b66756cfa396c43562a7f8 Author: Yevgeny Kliteynik Date: Thu Sep 24 20:58:16 2020 +0300 net/mlx5: DR, Rename an argument in dr_rdma_segments Rename the argument to better reflect that the meaning is not number of records, but wheather or not we should ring the dorbell. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed commit 6980ffa0c5a8e65d53ff803d2cafdba3e2022714 Author: Tariq Toukan Date: Sun Jun 21 21:35:34 2020 +0300 net/mlx5e: RX, Add checks for calculated Striding RQ attributes Striding RQ attributes below are mutually dependent. An unaware change to one might take the others out of the valid range derived by the HW caps: - The MPWQE size in bytes - The number of strides in a MPWQE - The stride size Add checks to verify they are valid and comply to the HW spec and SW assumptions/requirements. This is not a fix, no particular issue exists today. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 6a5689ba0259acded00f69856fc364b158c54c2e Author: Vladyslav Tarasiuk Date: Tue Apr 13 11:15:49 2021 +0300 net/mlx5e: Fix possible non-initialized struct usage If mlx5e_devlink_port_register() fails, driver may try to register devlink health TX and RX reporters on non-registered devlink port. Instead, create health reporters only if mlx5e_devlink_port_register() does not fail. And destroy reporters only if devlink_port is registered. Also, change mlx5e_get_devlink_port() behavior and return NULL in case port is not registered to replicate devlink's wrapper when ndo is not implemented. Signed-off-by: Vladyslav Tarasiuk Signed-off-by: Saeed Mahameed commit d408c01caef41d8ab1b43203164c8b6cbf18d084 Author: Tariq Toukan Date: Wed Apr 14 20:43:33 2021 +0300 net/mlx5e: Fix lost changes during code movements The changes done in commit [1] were missed by the code movements done in [2], as they were developed in ~parallel. Here we re-apply them. [1] commit e4484d9df500 ("net/mlx5e: Enable striding RQ for Connect-X IPsec capable devices") [2] commit b3a131c2a160 ("net/mlx5e: Move params logic into its dedicated file") Fixes: b3a131c2a160 ("net/mlx5e: Move params logic into its dedicated file") Signed-off-by: Tariq Toukan Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit 0b1f557a1fa02174a982f557581e348d91987ec6 Author: Junlin Yang Date: Sat Mar 6 11:23:14 2021 +0800 csky: Fixup typos fixes three typos found by codespell. Signed-off-by: Junlin Yang Signed-off-by: Guo Ren commit 4f192ac00a1ba11e5137b7d901cc9384fadf2bf9 Author: Zhang Yunkai Date: Wed Mar 3 00:04:10 2021 -0800 csky: Remove duplicate include in arch/csky/kernel/entry.S 'asm/setup.h' included in 'arch/csky/kernel/entry.S' is duplicated. Signed-off-by: Zhang Yunkai Signed-off-by: Guo Ren commit 69443c47305e541f5bf8b5a26f442c0c7f34cafe Merge: 137733d08f4ab c77cec5c207b6 Author: Alexei Starovoitov Date: Mon Apr 19 18:23:34 2021 -0700 Merge branch 'bpf: refine retval for bpf_get_task_stack helper' Dave Marchevsky says: ==================== Similarly to the bpf_get_stack helper, bpf_get_task_stack's return value can be more tightly bound by the verifier - it's the number of bytes written to a user-supplied buffer, or a negative error value. Currently the verifier believes bpf_task_get_stack's retval bounds to be unknown, requiring extraneous bounds checking to remedy. Adding it to do_refine_retval_range fixes the issue, as evidenced by new selftests which fail to load if retval bounds are not refined. v2: Addressed comment nit in patch 3 ==================== Signed-off-by: Alexei Starovoitov commit c77cec5c207b68a3cbc2af2f81070ec428f41145 Author: Dave Marchevsky Date: Fri Apr 16 13:47:04 2021 -0700 bpf/selftests: Add bpf_get_task_stack retval bounds test_prog Add a libbpf test prog which feeds bpf_get_task_stack's return value into seq_write after confirming it's positive. No attempt to bound the value from above is made. Load will fail if verifier does not refine retval range based on buf sz input to bpf_get_task_stack. Signed-off-by: Dave Marchevsky Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210416204704.2816874-4-davemarchevsky@fb.com commit bdc4e369454fcae108e18feb0fcbb6f06815f94b Author: Dave Marchevsky Date: Fri Apr 16 13:47:03 2021 -0700 bpf/selftests: Add bpf_get_task_stack retval bounds verifier test Add a bpf_iter test which feeds bpf_get_task_stack's return value into seq_write after confirming it's positive. No attempt to bound the value from above is made. Load will fail if verifier does not refine retval range based on buf sz input to bpf_get_task_stack. Signed-off-by: Dave Marchevsky Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210416204704.2816874-3-davemarchevsky@fb.com commit fd0b88f73f5372c08ceff5cc7ddd8ceac502679c Author: Dave Marchevsky Date: Fri Apr 16 13:47:02 2021 -0700 bpf: Refine retval for bpf_get_task_stack helper Verifier can constrain the min/max bounds of bpf_get_task_stack's return value more tightly than the default tnum_unknown. Like bpf_get_stack, return value is num bytes written into a caller-supplied buf, or error, so do_refine_retval_range will work. Signed-off-by: Dave Marchevsky Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210416204704.2816874-2-davemarchevsky@fb.com commit 137733d08f4ab14a354dacaa9a8fc35217747605 Author: Yaqi Chen Date: Fri Apr 16 23:48:03 2021 +0800 samples/bpf: Fix broken tracex1 due to kprobe argument change >From commit c0bbbdc32feb ("__netif_receive_skb_core: pass skb by reference"), the first argument passed into __netif_receive_skb_core has changed to reference of a skb pointer. This commit fixes by using bpf_probe_read_kernel. Signed-off-by: Yaqi Chen Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210416154803.37157-1-chendotjs@gmail.com commit e9377a911d772d27ef2810c241154ba479bad368 Author: Jakub Kicinski Date: Mon Apr 19 14:52:35 2021 -0700 ethtool: add missing EEPROM to list of messages ETHTOOL_MSG_MODULE_EEPROM_GET is missing from the list of messages. ETHTOOL_MSG_MODULE_EEPROM_GET_REPLY is sadly a rather long name so we need to adjust column length. v2: use spaces (Andrew) Fixes: c781ff12a2f3 ("ethtool: Allow network drivers to dump arbitrary EEPROM data") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 4acd47644ef1e1c8f8f5bc40b7cf1c5b9bcbbc4e Author: Lijun Pan Date: Mon Apr 19 16:25:25 2021 -0500 MAINTAINERS: update I am making this change again since I received the following instruction. "As an IBM employee, you are not allowed to use your gmail account to work in any way on VNIC. You are not allowed to use your personal email account as a "hobby". You are an IBM employee 100% of the time. Please remove yourself completely from the maintainers file. I grant you a 1 time exception on contributions to VNIC to make this change." Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit d1f0a5e1fb4e2f2f603bec8df79ca51768f2bdae Author: Jakub Kicinski Date: Mon Apr 19 13:03:45 2021 -0700 ethtool: stats: clarify the initialization to ETHTOOL_STAT_NOT_SET Ido suggests we add a comment about the init of stats to -1. This is unlikely to be clear to first time readers. Suggested-by: Ido Schimmel Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 37434782d63f89de5b9c383a449b6a82dc3fa4fb Author: Jakub Kicinski Date: Mon Apr 19 13:02:42 2021 -0700 bnxt: add more ethtool standard stats Michael suggest a few more stats we can expose. $ ethtool -S eth0 --groups eth-mac Standard stats for eth0: eth-mac-FramesTransmittedOK: 902623288966 eth-mac-FramesReceivedOK: 28727667047 eth-mac-FrameCheckSequenceErrors: 1 eth-mac-AlignmentErrors: 0 eth-mac-OutOfRangeLengthField: 0 $ ethtool -S eth0 | grep '\(fcs\|align\|oor\)' rx_fcs_err_frames: 1 rx_align_err_frames: 0 tx_fcs_err_frames: 0 Suggested-by: Michael Chan Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 9b8fd2c9f14b029dbcc4a6fc79419f17c4980ff4 Merge: ced97eea3974e b050f2f15e04f Author: David S. Miller Date: Mon Apr 19 16:19:44 2021 -0700 Merge branch 'tja1103-driver' Radu Pirea says: ==================== TJA1103 driver This small series adds the TJA1103 PHY driver. Changes in v3: - use phy_read_mmd_poll_timeout instead of spin_until_cond - changed the phy name from a generic one to something specific - minor indentation change Changes in v2: - implemented genphy_c45_pma_suspend/genphy_c45_pma_suspend - set default internal delays set to 2ns(90 degrees) - added "VEND1_" prefix to the register definitions - disable rxid in case of txid - disable txid in case of rxid - disable internal delays in rgmii mode - reduced max line length to 80 characters - rebased on top of net-next/master - use genphy_c45_loopback as .set_loopback callback - renamed the driver from nxp-c45 to nxp-c45-tja11xx - used phy phy_set_bits_mmd/phy_clear_bits_mmd instead on phy_write_mmd where I had to set/clear one bit. ==================== Signed-off-by: David S. Miller commit b050f2f15e04f0416118f689f740fda466a47752 Author: Radu Pirea (NXP OSS) Date: Mon Apr 19 19:14:00 2021 +0300 phy: nxp-c45: add driver for tja1103 Add driver for tja1103 driver and for future NXP C45 PHYs. Signed-off-by: Radu Pirea (NXP OSS) Signed-off-by: David S. Miller commit da702f34e3cc4b6b87ed2d63c17d65d841fa81c6 Author: Radu Pirea (NXP OSS) Date: Mon Apr 19 19:13:59 2021 +0300 net: phy: add genphy_c45_pma_suspend/resume Add generic PMA suspend and resume callback functions for C45 PHYs. Signed-off-by: Radu Pirea (NXP OSS) Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ced97eea3974e6eaa33e771d8790f4c0ada0d226 Author: Vadym Kochan Date: Sat Apr 17 02:17:51 2021 +0300 net: marvell: prestera: add support for AC3X 98DX3265 device Add PCI match for AC3X 98DX3265 device which is supported by the current driver and firmware. Signed-off-by: Vadym Kochan Signed-off-by: David S. Miller commit c1102e9d49eb36c0be18cb3e16f6e46ffb717964 Author: Di Zhu Date: Mon Apr 19 21:56:41 2021 +0800 net: fix a data race when get vlan device We encountered a crash: in the packet receiving process, we got an illegal VLAN device address, but the VLAN device address saved in vmcore is correct. After checking the code, we found a possible data competition: CPU 0: CPU 1: (RCU read lock) (RTNL lock) vlan_do_receive() register_vlan_dev() vlan_find_dev() ->__vlan_group_get_device() ->vlan_group_prealloc_vid() In vlan_group_prealloc_vid(), We need to make sure that memset() in kzalloc() is executed before assigning value to vlan devices array: ================================= kzalloc() ->memset(object, 0, size) smp_wmb() vg->vlan_devices_arrays[pidx][vidx] = array; ================================== Because __vlan_group_get_device() function depends on this order. otherwise we may get a wrong address from the hardware cache on another cpu. So fix it by adding memory barrier instruction to ensure the order of memory operations. Signed-off-by: Di Zhu Signed-off-by: David S. Miller commit 7ad18ff6449cbd6beb26b53128ddf56d2685aa93 Author: Alexander Lobakin Date: Mon Apr 19 12:53:06 2021 +0000 gro: fix napi_gro_frags() Fast GRO breakage due to IP alignment check Commit 38ec4944b593 ("gro: ensure frag0 meets IP header alignment") did the right thing, but missed the fact that napi_gro_frags() logics calls for skb_gro_reset_offset() *before* pulling Ethernet header to the skb linear space. That said, the introduced check for frag0 address being aligned to 4 always fails for it as Ethernet header is obviously 14 bytes long, and in case with NET_IP_ALIGN its start is not aligned to 4. Fix this by adding @nhoff argument to skb_gro_reset_offset() which tells if an IP header is placed right at the start of frag0 or not. This restores Fast GRO for napi_gro_frags() that became very slow after the mentioned commit, and preserves the introduced check to avoid silent unaligned accesses. From v1 [0]: - inline tiny skb_gro_reset_offset() to let the code be optimized more efficively (esp. for the !NET_IP_ALIGN case) (Eric); - pull in Reviewed-by from Eric. [0] https://lore.kernel.org/netdev/20210418114200.5839-1-alobakin@pm.me Fixes: 38ec4944b593 ("gro: ensure frag0 meets IP header alignment") Reviewed-by: Eric Dumazet Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit d7f576dc98364fcb076234f76b54d07cdeca54eb Author: Wong Vee Khee Date: Mon Apr 19 19:25:30 2021 +0800 net: stmmac: fix memory leak during driver probe On driver probe, kmemleak reported the following memory leak which was due to allocated bitmap that was not being freed in stmmac_dvr_probe(). unreferenced object 0xffff9276014b13c0 (size 8): comm "systemd-udevd", pid 2143, jiffies 4294681112 (age 116.720s) hex dump (first 8 bytes): 00 00 00 00 00 00 00 00 ........ backtrace: [<00000000c51e34b2>] stmmac_dvr_probe+0x1c0/0x440 [stmmac] [<00000000b530eb41>] intel_eth_pci_probe.cold+0x2b/0x14e [dwmac_intel] [<00000000b10f8929>] pci_device_probe+0xd2/0x150 [<00000000fb254c74>] really_probe+0xf8/0x410 [<0000000034128a59>] driver_probe_device+0x5d/0x150 [<00000000016104d5>] device_driver_attach+0x53/0x60 [<00000000cb18cd07>] __driver_attach+0x96/0x140 [<00000000da9ffd5c>] bus_for_each_dev+0x7a/0xc0 [<00000000af061a88>] bus_add_driver+0x184/0x1f0 [<000000008be5c1c5>] driver_register+0x6c/0xc0 [<0000000052b18a9e>] do_one_initcall+0x4d/0x210 [<00000000154d4f07>] do_init_module+0x5c/0x230 [<000000009b648d09>] load_module+0x2a5a/0x2d40 [<000000000d86b76d>] __do_sys_finit_module+0xb5/0x120 [<000000002b0cef95>] do_syscall_64+0x33/0x40 [<0000000067b45bbb>] entry_SYSCALL_64_after_hwframe+0x44/0xa9 Fixes: bba2556efad6 ("net: stmmac: Enable RX via AF_XDP zero-copy") Cc: Ong Boon Leong Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit a2a12d3ae24d54c2488d06bd290e24e83eded22b Merge: 9652168304b10 d1a2c2315cc90 Author: David S. Miller Date: Mon Apr 19 15:58:15 2021 -0700 Merge branch 'korina-next' Thomas Bogendoerfer says: ==================== net: Korina improvements While converting Mikrotik RB532 support to use device tree I stumbled over the korina ethernet driver, which used way too many MIPS specific hacks. This series cleans this all up and adds support for device tree. Changes in v6: - remove korina from resource names and adapt DT binding to it - removed superfluous braces around of_get_mac_address Changes in v5: - fixed email address in binding document, which prevented sending it Changes in v4: - improve error returns in mdio_read further - added clock name and improved clk handling - fixed binding errors Changes in v3: - use readl_poll_timeout_atomic in mdio_wait - return -ETIMEDOUT, if mdio_wait failed - added DT binding and changed name to idt,3243x-emac - fixed usage of of_get_mac_address for net-next Changes in v2: - added device tree support to get rid of idt_cpu_freq - fixed compile test on 64bit archs - fixed descriptor current address handling by storing/using mapped dma addresses (dma controller modifies current address) ==================== Signed-off-by: David S. Miller commit d1a2c2315cc90f7220da8975b79349cf727334ec Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:48 2021 +0200 dt-bindings: net: korina: Add DT bindings for IDT 79RC3243x SoCs Add device tree bindings for ethernet controller integrated into IDT 79RC3243x SoCs. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 6ef92063bf94cd8a6fa9fea3a82596955eb25424 Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:47 2021 +0200 net: korina: Make driver COMPILE_TESTable Move structs/defines for ethernet/dma register into driver, since they are only used for this driver and remove any MIPS specific includes. This makes it possible to COMPILE_TEST the driver. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit e4cd854ec487fde631fe57049f588d2396da281c Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:46 2021 +0200 net: korina: Get mdio input clock via common clock framework With device tree clock is provided via CCF. For non device tree use a maximum clock value to not overclock the PHY. The non device tree usage will go away after platform is converted to DT. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 10b26f0781511dc5c1b29303ee431cad08aa9944 Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:45 2021 +0200 net: korina: Add support for device tree If there is no mac address passed via platform data try to get it via device tree and fall back to a random mac address, if all fail. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit af80425e05b23e937e4a3490442f37eedb5242f6 Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:44 2021 +0200 net: korina: Only pass mac address via platform data Get rid of access to struct korina_device by just passing the mac address via platform data and use drvdata for passing netdev to remove function. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 0fc96939a97ffd4929b19a3e2d1b3858ab9efa8b Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:43 2021 +0200 net: korina: Use DMA API Instead of messing with MIPS specific macros use DMA API for mapping descriptors and skbs. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 0fe632471aeb0b0b6cc9150c5c43780d58975988 Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:42 2021 +0200 net: korina: Remove nested helpers Remove helpers, which are only used in one call site. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit e42f10533d7c8a512399571804c59b0dc862eefe Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:41 2021 +0200 net: korina: Remove not needed cache flushes Descriptors are mapped uncached so there is no need to do any cache handling for them. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit b4cd249a8cc017e0f7910baf6b7cdc282fe8c4e5 Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:40 2021 +0200 net: korina: Use devres functions Simplify probe/remove code by using devm_ functions. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 89f9d5400b53bedbeb8f1d7854abe6f7412251da Author: Thomas Bogendoerfer Date: Mon Apr 19 00:19:39 2021 +0200 net: korina: Fix MDIO functions Fixed MDIO functions to work reliable and not just by accident. Signed-off-by: Thomas Bogendoerfer Signed-off-by: David S. Miller commit 9652168304b10126fbe21695f267fb43e4054fef Merge: 6dd06ec7c13bc f5c2cb583abe8 Author: David S. Miller Date: Mon Apr 19 15:55:05 2021 -0700 Merge branch 'mtk_ppe_offload-fixes' Pablo Neira Ayuso says: ==================== mtk_ppe_offload fixes A few incremental fixes for the initial flowtable offload support and this driver: 1) Fix undefined reference to `dsa_port_from_netdev' due to missing dependencies in Kconfig, reported by Kbuild robot. 2) Missing mutex to serialize flow events via workqueue to the driver. 3) Handle FLOW_ACTION_VLAN_POP tag action. ==================== Signed-off-by: David S. Miller commit f5c2cb583abe8a5049a32c7b093e2852f344a3e9 Author: Pablo Neira Ayuso Date: Sun Apr 18 23:11:45 2021 +0200 net: ethernet: mtk_eth_soc: handle VLAN pop action Do not hit EOPNOTSUPP when flowtable offload provides a VLAN pop action. Fixes: efce49dfe6a8 ("netfilter: flowtable: add vlan pop action offload support") Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 014d029876b23f5963c792c4622eb0eaea930f19 Author: Pablo Neira Ayuso Date: Sun Apr 18 23:11:44 2021 +0200 net: ethernet: mtk_eth_soc: missing mutex Patch 2ed37183abb7 ("netfilter: flowtable: separate replace, destroy and stats to different workqueues") splits the workqueue per event type. Add a mutex to serialize updates. Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support") Reported-by: Frank Wunderlich Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 0e389028ad75412ff624b304913bba14f8d46ec4 Author: Pablo Neira Ayuso Date: Sun Apr 18 23:11:43 2021 +0200 net: ethernet: mtk_eth_soc: fix undefined reference to `dsa_port_from_netdev' Caused by: CONFIG_NET_DSA=m CONFIG_NET_MEDIATEK_SOC=y mtk_ppe_offload.c:undefined reference to `dsa_port_from_netdev' Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support") Reported-by: kernel test robot Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 6dd06ec7c13bc970edb0729221a47bf6368e2b9e Merge: c6400e3fc3fa8 b72920f6e4a9d Author: David S. Miller Date: Mon Apr 19 15:49:50 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following patchset contains Netfilter updates for net-next: 1) Add vlan match and pop actions to the flowtable offload, patches from wenxu. 2) Reduce size of the netns_ct structure, which itself is embedded in struct net Make netns_ct a read-mostly structure. Patches from Florian Westphal. 3) Add FLOW_OFFLOAD_XMIT_UNSPEC to skip dst check from garbage collector path, as required by the tc CT action. From Roi Dayan. 4) VLAN offload fixes for nftables: Allow for matching on both s-vlan and c-vlan selectors. Fix match of VLAN id due to incorrect byteorder. Add a new routine to properly populate flow dissector ethertypes. 5) Missing keys in ip{6}_route_me_harder() results in incorrect routes. This includes an update for selftest infra. Patches from Ido Schimmel. 6) Add counter hardware offload support through FLOW_CLS_STATS. ==================== Signed-off-by: David S. Miller commit 8d892d60941b00c86d2029c8a99db24ab4979673 Author: Linus Walleij Date: Sun Apr 18 20:28:53 2021 +0200 net: ethernet: ixp4xx: Set the DMA masks explicitly The former fix only papered over the actual problem: the ethernet core expects the netdev .dev member to have the proper DMA masks set, or there will be BUG_ON() triggered in kernel/dma/mapping.c. Fix this by simply copying dma_mask and dma_mask_coherent from the parent device. Fixes: e45d0fad4a5f ("net: ethernet: ixp4xx: Use parent dev for DMA pool") Signed-off-by: Linus Walleij Signed-off-by: David S. Miller commit c6400e3fc3fa821a26a58cf867331e0877a4c56b Author: Alexey Dobriyan Date: Sat Apr 17 14:38:07 2021 +0300 netlink: simplify nl_set_extack_cookie_u64(), nl_set_extack_cookie_u32() Taking address of a function argument directly works just fine. Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit 6ecaf81d4ac6365f9284f9d68d74f7c209e74f98 Author: DENG Qingfang Date: Sat Apr 17 15:29:04 2021 +0800 net: ethernet: mediatek: fix a typo bug in flow offloading Issue was traffic problems after a while with increased ping times if flow offload is active. It turns out that key_offset with cookie is needed in rhashtable_params but was re-assigned to head_offset. Fix the assignment. Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support") Signed-off-by: DENG Qingfang Tested-by: Frank Wunderlich Signed-off-by: David S. Miller commit 32c1fdb5e9ca9fe8722479797f3c37009e021a4c Merge: 46fd4471615c1 e407efdd94cde Author: David S. Miller Date: Mon Apr 19 15:38:05 2021 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: misc updates for -next This series includes some misc updates for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit e407efdd94cde88c8b84588cdb5ab31dc97589b0 Author: Huazhong Tan Date: Sat Apr 17 15:09:24 2021 +0800 net: hns3: change the value of the SEPARATOR_VALUE macro in hclgevf_main.c The SEPARATOR_VALUE macro is used as separator when getting the register value, but the value of this macro is different between pf and vf, it is a bit confusing for the user, so synchronize the value of vf with pf. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 8ed64dbe0bdf39479772896b2b4e5cbbdf89f086 Author: Huazhong Tan Date: Sat Apr 17 15:09:23 2021 +0800 net: hns3: cleanup inappropriate spaces in struct hlcgevf_tqp_stats Modify some inappropriate spaces in comments of struct hlcgevf_tqp_stats. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1c5a2ba67989c01b8aeda81969b7a4a3702c51b5 Author: Huazhong Tan Date: Sat Apr 17 15:09:22 2021 +0800 net: hns3: remove a duplicate pf reset counting When enter suspend mode the counter of pf reset will be increased twice, since both hclge_prepare_general() and hclge_prepare_wait() increase this counter. So remove the duplicate counting in hclge_prepare_general(). Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 46fd4471615c1bff9d87c411140807762c25667a Author: Randy Dunlap Date: Fri Apr 16 23:55:54 2021 -0700 net: xilinx: drivers need/depend on HAS_IOMEM kernel test robot reports build errors in 3 Xilinx ethernet drivers. They all use ioremap functions that are only available when HAS_IOMEM is set/enabled. If it is not enabled, they all have build errors, so make these 3 drivers depend on HAS_IOMEM. ld: drivers/net/ethernet/xilinx/xilinx_emaclite.o: in function `xemaclite_of_probe': xilinx_emaclite.c:(.text+0x9fc): undefined reference to `devm_ioremap_resource' ld: drivers/net/ethernet/xilinx/xilinx_axienet_main.o: in function `axienet_probe': xilinx_axienet_main.c:(.text+0x942): undefined reference to `devm_ioremap_resource' ld: drivers/net/ethernet/xilinx/ll_temac_main.o: in function `temac_probe': ll_temac_main.c:(.text+0x1283): undefined reference to `devm_platform_ioremap_resource_byname' ld: ll_temac_main.c:(.text+0x13ad): undefined reference to `devm_of_iomap' ld: ll_temac_main.c:(.text+0x162e): undefined reference to `devm_platform_ioremap_resource' Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Radhey Shyam Pandey Cc: Gary Guo Cc: Zhang Changzhong Cc: Andre Przywara Cc: stable@vger.kernel.org Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller commit 6ed33c13128799b666904106996b6a278546afe9 Merge: c1d9e34e11281 a8648887880f9 Author: David S. Miller Date: Mon Apr 19 15:31:45 2021 -0700 Merge branch 'enetc-flow-control' Vladimir Oltean says: ==================== Flow control for NXP ENETC This patch series contains logic for enabling the lossless mode on the RX rings of the ENETC, and the PAUSE thresholds on the internal FIFO memory. During testing it was found that, with the default FIFO configuration, a sender which isn't persuaded by our PAUSE frames and keeps sending will cause some MAC RX frame errors. To mitigate this, we need to ensure that the FIFO never runs completely full, so we need to fix up a setting that was supposed to be configured well out of reset. Unfortunately this requires the addition of a new mini-driver. ==================== Signed-off-by: David S. Miller commit a8648887880f90137f0893aeb1a0abef30858c01 Author: Vladimir Oltean Date: Sat Apr 17 02:42:25 2021 +0300 net: enetc: add support for flow control In the ENETC receive path, a frame received by the MAC is first stored in a 256KB 'FIFO' memory, then transferred to DRAM when enqueuing it to the RX ring. The FIFO is a shared resource for all ENETC ports, but every port keeps track of its own memory utilization, on RX and on TX. There is a setting for RX rings through which they can either operate in 'lossy' mode (where the lack of a free buffer causes an immediate discard of the frame) or in 'lossless' mode (where the lack of a free buffer in the ring makes the frame stay longer in the FIFO). In turn, when the memory utilization of the FIFO exceeds a certain margin, the MAC can be configured to emit PAUSE frames. There is enough FIFO memory to buffer up to 3 MTU-sized frames per RX port while not jeopardizing the other use cases (jumbo frames), and also not consume bytes from the port TX allocations. Also, 3 MTU-sized frames worth of memory is enough to ensure zero loss for 64 byte packets at 1G line rate. Signed-off-by: Vladimir Oltean Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit b764dc6cc1ba8b82d844bbcfe97e1d432a2dca5b Author: Vladimir Oltean Date: Sat Apr 17 02:42:24 2021 +0300 arm64: dts: ls1028a: declare the Integrated Endpoint Register Block node Add a node describing the address in the SoC memory space for the IERB. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e7d48e5fbf30f85c89d83683c3d2dbdaa8884103 Author: Vladimir Oltean Date: Sat Apr 17 02:42:23 2021 +0300 net: enetc: add a mini driver for the Integrated Endpoint Register Block The NXP ENETC is a 4-port Ethernet controller which 'smells' to operating systems like 4 distinct PCIe PFs with SR-IOV, each PF having its own driver instance, but in fact there are some hardware resources which are shared between all ports, like for example the 256 KB SRAM FIFO between the MACs and the Host Transfer Agent which DMAs frames to DRAM. To hide the stuff that cannot be neatly exposed per port, the hardware designers came up with this idea of having a dedicated register block which is supposed to be populated by the bootloader, and contains everything configuration-related: MAC addresses, FIFO partitioning, etc. When a port is reset using PCIe Function Level Reset, its defaults are transferred from the IERB configuration. Most of the time, the settings made through the IERB are read-only in the port's memory space (if they are even visible), so they cannot be modified at runtime. Linux doesn't have any advanced FIFO partitioning requirements at all, but when reading through the hardware manual, it became clear that, even though there are many good 'recommendations' for default values, many of them were not actually put in practice on LS1028A. So we end up with a default configuration that: (a) does not have enough TX and RX byte credits to support the max MTU of 9600 (which the Linux driver claims already) properly (at full speed) (b) allows the FIFO to be overrun with RX traffic, potentially overwriting internal data structures. The last part sounds a bit catastrophic, but it isn't. Frames are supposed to transit the FIFO for a very short time, but they can actually accumulate there under 2 conditions: (a) there is very severe congestion on DRAM memory, or (b) the RX rings visible to the operating system were configured for lossless operation, and they just ran out of free buffers to copy the frame to. This is what is used to put backpressure onto the MAC with flow control. So since ENETC has not supported flow control thus far, RX FIFO overruns were never seen with Linux. But with the addition of flow control, we should configure some registers to prevent this from happening. What we are trying to protect against are bad actors which continue to send us traffic despite the fact that we have signaled a PAUSE condition. Of course we can't be lossless in that case, but it is best to configure the FIFO to do tail dropping rather than letting it overrun. So in a nutshell, this driver is a fixup for all the IERB default values that should have been but aren't. The IERB configuration needs to be done _before_ the PFs are enabled. So every PF searches for the presence of the "fsl,ls1028a-enetc-ierb" node in the device tree, and if it finds it, it "registers" with the IERB, which means that it requests the IERB to fix up its default values. This is done through -EPROBE_DEFER. The IERB driver is part of the fsl_enetc module, but is technically a platform driver, since the IERB is a good old fashioned MMIO region, as opposed to ENETC ports which pretend to be PCIe devices. The driver was already configuring ENETC_PTXMBAR (FIFO allocation for TX) because due to an omission, TXMBAR is a read/write register in the PF memory space. But the manual is quite clear that the formula for this should depend upon the TX byte credits (TXBCR). In turn, the TX byte credits are only readable/writable through the IERB. So if we want to ensure that the TXBCR register also has a value that is correct and in line with TXMBAR, there is simply no way this can be done from the PF driver, access to the IERB is needed. I could have modified U-Boot to fix up the IERB values, but that is quite undesirable, as old U-Boot versions are likely to be floating around for quite some time from now. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4ac7acc67f29927975e2493a9f4ede0c631bb87a Author: Vladimir Oltean Date: Sat Apr 17 02:42:22 2021 +0300 dt-bindings: net: fsl: enetc: add the IERB documentation Mention the required compatible string and base address for the Integrated Endpoint Register Block node. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 87614b931c24d9dfc934ef9deaaf55d1cbdc2ac2 Author: Vladimir Oltean Date: Sat Apr 17 02:42:21 2021 +0300 net: enetc: create a common enetc_pf_to_port helper Even though ENETC interfaces are exposed as individual PCIe PFs with their own driver instances, the ENETC is still fundamentally a multi-port Ethernet controller, and some parts of the IP take a port number (as can be seen in the PSFP implementation). Create a common helper that can be used outside of the TSN code for retrieving the ENETC port number based on the PF number. This is only correct for LS1028A, the only Linux-capable instantiation of ENETC thus far. Note that ENETC port 3 is PF 6. The TSN code did not care about this because ENETC port 3 does not support TSN, so the wrong mapping done by enetc_get_port for PF 6 could have never been hit. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ed8157f1ebf1ae81a8fa2653e3f20d2076fad1c9 Author: Du Cheng Date: Sat Apr 17 07:30:46 2021 +0800 net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule There is a reproducible sequence from the userland that will trigger a WARN_ON() condition in taprio_get_start_time, which causes kernel to panic if configured as "panic_on_warn". Catch this condition in parse_taprio_schedule to prevent this condition. Reported as bug on syzkaller: https://syzkaller.appspot.com/bug?extid=d50710fd0873a9c6b40c Reported-by: syzbot+d50710fd0873a9c6b40c@syzkaller.appspotmail.com Signed-off-by: Du Cheng Acked-by: Cong Wang Signed-off-by: David S. Miller commit 900367b208ee04768bb4323d0051ba11c434bafc Merge: cdf0e80e9fbe7 c2e39c6bdc7eb Author: Alexei Starovoitov Date: Mon Apr 19 15:27:37 2021 -0700 Merge branch 'Add a snprintf eBPF helper' Florent Revest says: ==================== We have a usecase where we want to audit symbol names (if available) in callback registration hooks. (ex: fentry/nf_register_net_hook) A few months back, I proposed a bpf_kallsyms_lookup series but it was decided in the reviews that a more generic helper, bpf_snprintf, would be more useful. This series implements the helper according to the feedback received in https://lore.kernel.org/bpf/20201126165748.1748417-1-revest@google.com/T/#u - A new arg type guarantees the NULL-termination of string arguments and lets us pass format strings in only one arg - A new helper is implemented using that guarantee. Because the format string is known at verification time, the format string validation is done by the verifier - To implement a series of tests for bpf_snprintf, the logic for marshalling variadic args in a fixed-size array is reworked as per: https://lore.kernel.org/bpf/20210310015455.1095207-1-revest@chromium.org/T/#u --- Changes in v5: - Fixed the bpf_printf_buf_used counter logic in try_get_fmt_tmp_buf - Added a couple of extra incorrect specifiers tests - Call test_snprintf_single__destroy unconditionally - Fixed a C++-style comment --- Changes in v4: - Moved bpf_snprintf, bpf_printf_prepare and bpf_printf_cleanup to kernel/bpf/helpers.c so that they get built without CONFIG_BPF_EVENTS - Added negative test cases (various invalid format strings) - Renamed put_fmt_tmp_buf() as bpf_printf_cleanup() - Fixed a mistake that caused temporary buffers to be unconditionally freed in bpf_printf_prepare - Fixed a mistake that caused missing 0 character to be ignored - Fixed a warning about integer to pointer conversion - Misc cleanups --- Changes in v3: - Simplified temporary buffer acquisition with try_get_fmt_tmp_buf() - Made zero-termination check more consistent - Allowed NULL output_buffer - Simplified the BPF_CAST_FMT_ARG macro - Three new test cases: number padding, simple string with no arg and string length extraction only with a NULL output buffer - Clarified helper's description for edge cases (eg: str_size == 0) - Lots of cosmetic changes --- Changes in v2: - Extracted the format validation/argument sanitization in a generic way for all printf-like helpers. - bpf_snprintf's str_size can now be 0 - bpf_snprintf is now exposed to all BPF program types - We now preempt_disable when using a per-cpu temporary buffer - Addressed a few cosmetic changes ==================== Acked-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov commit c1d9e34e11281a8ba1a1c54e4db554232a461488 Author: Gustavo A. R. Silva Date: Fri Apr 16 15:15:40 2021 -0500 ethtool: ioctl: Fix out-of-bounds warning in store_link_ksettings_for_user() Fix the following out-of-bounds warning: net/ethtool/ioctl.c:492:2: warning: 'memcpy' offset [49, 84] from the object at 'link_usettings' is out of the bounds of referenced subobject 'base' with type 'struct ethtool_link_settings' at offset 0 [-Warray-bounds] The problem is that the original code is trying to copy data into a some struct members adjacent to each other in a single call to memcpy(). This causes a legitimate compiler warning because memcpy() overruns the length of &link_usettings.base. Fix this by directly using &link_usettings and _from_ as destination and source addresses, instead. This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit c2e39c6bdc7eb48459ec1d34d4f27eb82299f4b7 Author: Florent Revest Date: Mon Apr 19 17:52:43 2021 +0200 selftests/bpf: Add a series of tests for bpf_snprintf The "positive" part tests all format specifiers when things go well. The "negative" part makes sure that incorrect format strings fail at load time. Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210419155243.1632274-7-revest@chromium.org commit 58c2b1f5e0121efd698b6ec8e45e47e58ca9caee Author: Florent Revest Date: Mon Apr 19 17:52:42 2021 +0200 libbpf: Introduce a BPF_SNPRINTF helper macro Similarly to BPF_SEQ_PRINTF, this macro turns variadic arguments into an array of u64, making it more natural to call the bpf_snprintf helper. Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210419155243.1632274-6-revest@chromium.org commit 83cd92b46484aa8f64cdc0bff8ac6940d1f78519 Author: Florent Revest Date: Mon Apr 19 17:52:41 2021 +0200 libbpf: Initialize the bpf_seq_printf parameters array field by field When initializing the __param array with a one liner, if all args are const, the initial array value will be placed in the rodata section but because libbpf does not support relocation in the rodata section, any pointer in this array will stay NULL. Fixes: c09add2fbc5a ("tools/libbpf: Add bpf_iter support") Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210419155243.1632274-5-revest@chromium.org commit 7b15523a989b63927c2bb08e9b5b0bbc10b58bef Author: Florent Revest Date: Mon Apr 19 17:52:40 2021 +0200 bpf: Add a bpf_snprintf helper The implementation takes inspiration from the existing bpf_trace_printk helper but there are a few differences: To allow for a large number of format-specifiers, parameters are provided in an array, like in bpf_seq_printf. Because the output string takes two arguments and the array of parameters also takes two arguments, the format string needs to fit in one argument. Thankfully, ARG_PTR_TO_CONST_STR is guaranteed to point to a zero-terminated read-only map so we don't need a format string length arg. Because the format-string is known at verification time, we also do a first pass of format string validation in the verifier logic. This makes debugging easier. Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210419155243.1632274-4-revest@chromium.org commit fff13c4bb646ef849fd74ced87eef54340d28c21 Author: Florent Revest Date: Mon Apr 19 17:52:39 2021 +0200 bpf: Add a ARG_PTR_TO_CONST_STR argument type This type provides the guarantee that an argument is going to be a const pointer to somewhere in a read-only map value. It also checks that this pointer is followed by a zero character before the end of the map value. Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210419155243.1632274-3-revest@chromium.org commit d9c9e4db186ab4d81f84e6f22b225d333b9424e3 Author: Florent Revest Date: Mon Apr 19 17:52:38 2021 +0200 bpf: Factorize bpf_trace_printk and bpf_seq_printf Two helpers (trace_printk and seq_printf) have very similar implementations of format string parsing and a third one is coming (snprintf). To avoid code duplication and make the code easier to maintain, this moves the operations associated with format string parsing (validation and argument sanitization) into one generic function. The implementation of the two existing helpers already drifted quite a bit so unifying them entailed a lot of changes: - bpf_trace_printk always expected fmt[fmt_size] to be the terminating NULL character, this is no longer true, the first 0 is terminating. - bpf_trace_printk now supports %% (which produces the percentage char). - bpf_trace_printk now skips width formating fields. - bpf_trace_printk now supports the X modifier (capital hexadecimal). - bpf_trace_printk now supports %pK, %px, %pB, %pi4, %pI4, %pi6 and %pI6 - argument casting on 32 bit has been simplified into one macro and using an enum instead of obscure int increments. - bpf_seq_printf now uses bpf_trace_copy_string instead of strncpy_from_kernel_nofault and handles the %pks %pus specifiers. - bpf_seq_printf now prints longs correctly on 32 bit architectures. - both were changed to use a global per-cpu tmp buffer instead of one stack buffer for trace_printk and 6 small buffers for seq_printf. - to avoid per-cpu buffer usage conflict, these helpers disable preemption while the per-cpu buffer is in use. - both helpers now support the %ps and %pS specifiers to print symbols. The implementation is also moved from bpf_trace.c to helpers.c because the upcoming bpf_snprintf helper will be made available to all BPF programs and will need it. Signed-off-by: Florent Revest Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210419155243.1632274-2-revest@chromium.org commit ca9c54d2d6a5ab2430c4eda364c77125d62e5e0f Author: Dexuan Cui Date: Fri Apr 16 13:11:59 2021 -0700 net: mana: Add a driver for Microsoft Azure Network Adapter (MANA) Add a VF driver for Microsoft Azure Network Adapter (MANA) that will be available in the future. Co-developed-by: Haiyang Zhang Signed-off-by: Haiyang Zhang Co-developed-by: Shachar Raindel Signed-off-by: Shachar Raindel Signed-off-by: Dexuan Cui Reviewed-by: Stephen Hemminger Signed-off-by: David S. Miller commit 83c1ca257aca5ecf776858d8a917fcd18623b708 Author: Taehee Yoo Date: Fri Apr 16 17:41:48 2021 +0000 mld: remove unnecessary prototypes Some prototypes are unnecessary, so delete it. Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit c589fa10f1ed2d963c3ceaa40005d30231a0e556 Merge: 56aa7b21a5a7d bf5eb67dc80a7 Author: David S. Miller Date: Mon Apr 19 15:20:35 2021 -0700 Merge branch 'nh-flushing' Ido Schimmel says: ==================== nexthop: Support large scale nexthop flushing Patch #1 fixes a day-one bug in the nexthop code and allows "ip nexthop flush" to work correctly with large number of nexthops that do not fit in a single-part dump. Patch #2 adds a test case. Targeting at net-next since this use case never worked, the flow is pretty obscure and such a large number of nexthops is unlikely to be used in any real-world scenario. Tested with fib_nexthops.sh: Tests passed: 219 Tests failed: 0 ==================== Signed-off-by: David S. Miller commit bf5eb67dc80a75e0756269084b087c06f0360b78 Author: Ido Schimmel Date: Fri Apr 16 18:55:35 2021 +0300 selftests: fib_nexthops: Test large scale nexthop flushing Test that all the nexthops are flushed when a multi-part nexthop dump is required for the flushing. Without previous patch: # ./fib_nexthops.sh TEST: Large scale nexthop flushing [FAIL] With previous patch: # ./fib_nexthops.sh TEST: Large scale nexthop flushing [ OK ] Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 9e46fb656fdb40baec33a8942743d81a40f30fd3 Author: Ido Schimmel Date: Fri Apr 16 18:55:34 2021 +0300 nexthop: Restart nexthop dump based on last dumped nexthop identifier Currently, a multi-part nexthop dump is restarted based on the number of nexthops that have been dumped so far. This can result in a lot of nexthops not being dumped when nexthops are simultaneously deleted: # ip nexthop | wc -l 65536 # ip nexthop flush Dump was interrupted and may be inconsistent. Flushed 36040 nexthops # ip nexthop | wc -l 29496 Instead, restart the dump based on the nexthop identifier (fixed number) of the last successfully dumped nexthop: # ip nexthop | wc -l 65536 # ip nexthop flush Dump was interrupted and may be inconsistent. Flushed 65536 nexthops # ip nexthop | wc -l 0 Reported-by: Maksym Yaremchuk Tested-by: Maksym Yaremchuk Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: David S. Miller commit a3ba26ecfb569f4aa3f867e80c02aa65f20aadad Author: Tom Lendacky Date: Fri Apr 9 09:38:42 2021 -0500 KVM: SVM: Make sure GHCB is mapped before updating Access to the GHCB is mainly in the VMGEXIT path and it is known that the GHCB will be mapped. But there are two paths where it is possible the GHCB might not be mapped. The sev_vcpu_deliver_sipi_vector() routine will update the GHCB to inform the caller of the AP Reset Hold NAE event that a SIPI has been delivered. However, if a SIPI is performed without a corresponding AP Reset Hold, then the GHCB might not be mapped (depending on the previous VMEXIT), which will result in a NULL pointer dereference. The svm_complete_emulated_msr() routine will update the GHCB to inform the caller of a RDMSR/WRMSR operation about any errors. While it is likely that the GHCB will be mapped in this situation, add a safe guard in this path to be certain a NULL pointer dereference is not encountered. Fixes: f1c6366e3043 ("KVM: SVM: Add required changes to support intercepts under SEV-ES") Fixes: 647daca25d24 ("KVM: SVM: Add support for booting APs in an SEV-ES guest") Signed-off-by: Tom Lendacky Cc: stable@vger.kernel.org Message-Id: Signed-off-by: Paolo Bonzini commit a1fa4cbd53d9bc7bb0eaa7bcf7c8a5904372a4ec Author: Wanpeng Li Date: Fri Apr 9 12:18:31 2021 +0800 KVM: X86: Do not yield to self If the target is self we do not need to yield, we can avoid malicious guest to play this. Signed-off-by: Wanpeng Li Message-Id: <1617941911-5338-3-git-send-email-wanpengli@tencent.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini commit 4a7132efff1c9f4f80b3cdba75b81c4344e088c2 Author: Wanpeng Li Date: Fri Apr 9 12:18:30 2021 +0800 KVM: X86: Count attempted/successful directed yield To analyze some performance issues with lock contention and scheduling, it is nice to know when directed yield are successful or failing. Signed-off-by: Wanpeng Li Message-Id: <1617941911-5338-2-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 2b519b5797d432923afaba9522b6b62e13313e4e Author: Wanpeng Li Date: Fri Apr 9 12:18:29 2021 +0800 x86/kvm: Don't bother __pv_cpu_mask when !CONFIG_SMP Enable PV TLB shootdown when !CONFIG_SMP doesn't make sense. Let's move it inside CONFIG_SMP. In addition, we can avoid define and alloc __pv_cpu_mask when !CONFIG_SMP and get rid of 'alloc' variable in kvm_alloc_cpumask. Signed-off-by: Wanpeng Li Message-Id: <1617941911-5338-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini commit 4c6654bd160dbf4503b360ef8eed80b99eb1b8d9 Author: Ben Gardon Date: Thu Apr 1 16:37:36 2021 -0700 KVM: x86/mmu: Tear down roots before kvm_mmu_zap_all_fast returns To avoid saddling a vCPU thread with the work of tearing down an entire paging structure, take a reference on each root before they become obsolete, so that the thread initiating the fast invalidation can tear down the paging structure and (most likely) release the last reference. As a bonus, this teardown can happen under the MMU lock in read mode so as not to block the progress of vCPU threads. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-14-bgardon@google.com> Signed-off-by: Paolo Bonzini commit b7cccd397f310739fb85383033e95580f99927e0 Author: Ben Gardon Date: Thu Apr 1 16:37:35 2021 -0700 KVM: x86/mmu: Fast invalidation for TDP MMU Provide a real mechanism for fast invalidation by marking roots as invalid so that their reference count will quickly fall to zero and they will be torn down. One negative side affect of this approach is that a vCPU thread will likely drop the last reference to a root and be saddled with the work of tearing down an entire paging structure. This issue will be resolved in a later commit. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-13-bgardon@google.com> [Move the loop to tdp_mmu.c, otherwise compilation fails on 32-bit. - Paolo] Signed-off-by: Paolo Bonzini commit 56aa7b21a5a7d30484ab5833641cb172356225f1 Merge: 11ac4e668a449 fb8517f4fade4 Author: David S. Miller Date: Mon Apr 19 14:35:05 2021 -0700 Merge tag 'wireless-drivers-next-2021-04-18' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.13 Second set of patches for v5.13. A lot of iwlwifi and mt76 patches this time, and also smaller features and fixes all over. mt76 * mt7915/mt7615 decapsulation offload support * threaded NAPI support * new device IDs * mt7921 device reset support * rx timestamp support iwlwifi * passive scan support for 6GHz * new hardware support wilc1000 * CRC support for SPI bus ==================== Signed-off-by: David S. Miller commit e16edc99d658cd41c60a44cc14d170697aa3271f Author: Stefano Garzarella Date: Fri Apr 16 12:44:16 2021 +0200 vsock/vmci: log once the failed queue pair allocation VMCI feature is not supported in conjunction with the vSphere Fault Tolerance (FT) feature. VMware Tools can repeatedly try to create a vsock connection. If FT is enabled the kernel logs is flooded with the following messages: qp_alloc_hypercall result = -20 Could not attach to queue pair with -20 "qp_alloc_hypercall result = -20" was hidden by commit e8266c4c3307 ("VMCI: Stop log spew when qp allocation isn't possible"), but "Could not attach to queue pair with -20" is still there flooding the log. Since the error message can be useful in some cases, print it only once. Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Signed-off-by: Stefano Garzarella Reviewed-by: Jorgen Hansen Signed-off-by: David S. Miller commit aba2072f452346d56a462718bcde93d697383148 Author: J. Bruce Fields Date: Fri Apr 16 14:00:18 2021 -0400 nfsd: grant read delegations to clients holding writes It's OK to grant a read delegation to a client that holds a write, as long as it's the only client holding the write. We originally tried to do this in commit 94415b06eb8a ("nfsd4: a client's own opens needn't prevent delegations"), which had to be reverted in commit 6ee65a773096 ("Revert "nfsd4: a client's own opens needn't prevent delegations""). Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit ebd9d2c2f5a7ebaaed2d7bb4dee148755f46033d Author: J. Bruce Fields Date: Fri Apr 16 14:00:17 2021 -0400 nfsd: reshuffle some code No change in behavior, I'm just moving some code around to avoid forward references in a following patch. (To do someday: figure out how to split up nfs4state.c. It's big and disorganized.) Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit a0ce48375a367222989c2618fe68bf34db8c7bb7 Author: J. Bruce Fields Date: Fri Apr 16 14:00:16 2021 -0400 nfsd: track filehandle aliasing in nfs4_files It's unusual but possible for multiple filehandles to point to the same file. In that case, we may end up with multiple nfs4_files referencing the same inode. For delegation purposes it will turn out to be useful to flag those cases. Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit f9b60e2209213fdfcc504ba25a404977c5d08b77 Author: J. Bruce Fields Date: Fri Apr 16 14:00:15 2021 -0400 nfsd: hash nfs4_files by inode number The nfs4_file structure is per-filehandle, not per-inode, because the spec requires open and other state to be per filehandle. But it will turn out to be convenient for nfs4_files associated with the same inode to be hashed to the same bucket, so let's hash on the inode instead of the filehandle. Filehandle aliasing is rare, so that shouldn't have much performance impact. (If you have a ton of exported filesystems, though, and all of them have a root with inode number 2, could that get you an overlong hash chain? Perhaps this (and the v4 open file cache) should be hashed on the inode pointer instead.) Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 1d8ba9e7e785b6625f4d8e978e8a284b144a7077 Author: Qu Wenruo Date: Tue Aug 4 15:25:47 2020 +0800 btrfs: handle remount to no compress during compression [BUG] When running btrfs/071 with inode_need_compress() removed from compress_file_range(), we got the following crash: BUG: kernel NULL pointer dereference, address: 0000000000000018 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page Workqueue: btrfs-delalloc btrfs_work_helper [btrfs] RIP: 0010:compress_file_range+0x476/0x7b0 [btrfs] Call Trace: ? submit_compressed_extents+0x450/0x450 [btrfs] async_cow_start+0x16/0x40 [btrfs] btrfs_work_helper+0xf2/0x3e0 [btrfs] process_one_work+0x278/0x5e0 worker_thread+0x55/0x400 ? process_one_work+0x5e0/0x5e0 kthread+0x168/0x190 ? kthread_create_worker_on_cpu+0x70/0x70 ret_from_fork+0x22/0x30 ---[ end trace 65faf4eae941fa7d ]--- This is already after the patch "btrfs: inode: fix NULL pointer dereference if inode doesn't need compression." [CAUSE] @pages is firstly created by kcalloc() in compress_file_extent(): pages = kcalloc(nr_pages, sizeof(struct page *), GFP_NOFS); Then passed to btrfs_compress_pages() to be utilized there: ret = btrfs_compress_pages(... pages, &nr_pages, ...); btrfs_compress_pages() will initialize each page as output, in zlib_compress_pages() we have: pages[nr_pages] = out_page; nr_pages++; Normally this is completely fine, but there is a special case which is in btrfs_compress_pages() itself: switch (type) { default: return -E2BIG; } In this case, we didn't modify @pages nor @out_pages, leaving them untouched, then when we cleanup pages, the we can hit NULL pointer dereference again: if (pages) { for (i = 0; i < nr_pages; i++) { WARN_ON(pages[i]->mapping); put_page(pages[i]); } ... } Since pages[i] are all initialized to zero, and btrfs_compress_pages() doesn't change them at all, accessing pages[i]->mapping would lead to NULL pointer dereference. This is not possible for current kernel, as we check inode_need_compress() before doing pages allocation. But if we're going to remove that inode_need_compress() in compress_file_extent(), then it's going to be a problem. [FIX] When btrfs_compress_pages() hits its default case, modify @out_pages to 0 to prevent such problem from happening. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212331 CC: stable@vger.kernel.org # 5.10+ Reviewed-by: Josef Bacik Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6a5f4386798d81f7f413e93c87e2b6de7439beea Author: Zhang Rui Date: Mon Apr 12 07:31:05 2021 -0700 perf/x86/rapl: Add support for Intel Alder Lake Alder Lake RAPL support is the same as previous Sky Lake. Add Alder Lake model for RAPL. Signed-off-by: Zhang Rui Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-26-git-send-email-kan.liang@linux.intel.com commit d0ca946bcf84e1f9847571923bb1e6bd1264f424 Author: Kan Liang Date: Mon Apr 12 07:31:04 2021 -0700 perf/x86/cstate: Add Alder Lake CPU support Compared with the Rocket Lake, the CORE C1 Residency Counter is added for Alder Lake, but the CORE C3 Residency Counter is removed. Other counters are the same. Create a new adl_cstates for Alder Lake. Update the comments accordingly. The External Design Specification (EDS) is not published yet. It comes from an authoritative internal source. The patch has been tested on real hardware. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-25-git-send-email-kan.liang@linux.intel.com commit 19d3a81fd92dc9b73950564955164ecfd0dfbea1 Author: Kan Liang Date: Mon Apr 12 07:31:03 2021 -0700 perf/x86/msr: Add Alder Lake CPU support PPERF and SMI_COUNT MSRs are also supported on Alder Lake. The External Design Specification (EDS) is not published yet. It comes from an authoritative internal source. The patch has been tested on real hardware. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-24-git-send-email-kan.liang@linux.intel.com commit 772ed05f3c5ce722b9de6c4c2dd87538a33fb8d3 Author: Kan Liang Date: Mon Apr 12 07:31:02 2021 -0700 perf/x86/intel/uncore: Add Alder Lake support The uncore subsystem for Alder Lake is similar to the previous Tiger Lake. The difference includes: - New MSR addresses for global control, fixed counters, CBOX and ARB. Add a new adl_uncore_msr_ops for uncore operations. - Add a new threshold field for CBOX. - New PCIIDs for IMC devices. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-23-git-send-email-kan.liang@linux.intel.com commit 55bcf6ef314ae8ba81bcd74aa760247b635ed47b Author: Kan Liang Date: Mon Apr 12 07:31:01 2021 -0700 perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE Current Hardware events and Hardware cache events have special perf types, PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE. The two types don't pass the PMU type in the user interface. For a hybrid system, the perf subsystem doesn't know which PMU the events belong to. The first capable PMU will always be assigned to the events. The events never get a chance to run on the other capable PMUs. Extend the two types to become PMU aware types. The PMU type ID is stored at attr.config[63:32]. Add a new PMU capability, PERF_PMU_CAP_EXTENDED_HW_TYPE, to indicate a PMU which supports the extended PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE. The PMU type is only required when searching a specific PMU. The PMU specific codes will only be interested in the 'real' config value, which is stored in the low 32 bit of the event->attr.config. Update the event->attr.config in the generic code, so the PMU specific codes don't need to calculate it separately. If a user specifies a PMU type, but the PMU doesn't support the extended type, error out. If an event cannot be initialized in a PMU specified by a user, error out immediately. Perf should not try to open it on other PMUs. The new PMU capability is only set for the X86 hybrid PMUs for now. Other architectures, e.g., ARM, may need it as well. The support on ARM may be implemented later separately. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1618237865-33448-22-git-send-email-kan.liang@linux.intel.com commit f83d2f91d2590318e083d05bd7b1beda2489050e Author: Kan Liang Date: Mon Apr 12 07:31:00 2021 -0700 perf/x86/intel: Add Alder Lake Hybrid support Alder Lake Hybrid system has two different types of core, Golden Cove core and Gracemont core. The Golden Cove core is registered to "cpu_core" PMU. The Gracemont core is registered to "cpu_atom" PMU. The difference between the two PMUs include: - Number of GP and fixed counters - Events - The "cpu_core" PMU supports Topdown metrics. The "cpu_atom" PMU supports PEBS-via-PT. The "cpu_core" PMU is similar to the Sapphire Rapids PMU, but without PMEM. The "cpu_atom" PMU is similar to Tremont, but with different events, event_constraints, extra_regs and number of counters. The mem-loads AUX event workaround only applies to the Golden Cove core. Users may disable all CPUs of the same CPU type on the command line or in the BIOS. For this case, perf still register a PMU for the CPU type but the CPU mask is 0. Current caps/pmu_name is usually the microarch codename. Assign the "alderlake_hybrid" to the caps/pmu_name of both PMUs to indicate the hybrid Alder Lake microarchitecture. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-21-git-send-email-kan.liang@linux.intel.com commit 3e9a8b219e4cc897dba20e19185d0471f129f6f3 Author: Kan Liang Date: Mon Apr 12 07:30:59 2021 -0700 perf/x86: Support filter_match callback Implement filter_match callback for X86, which check whether an event is schedulable on the current CPU. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-20-git-send-email-kan.liang@linux.intel.com commit 58ae30c29a370c09eb49e0007d881a9aed13c5a3 Author: Kan Liang Date: Mon Apr 12 07:30:58 2021 -0700 perf/x86/intel: Add attr_update for Hybrid PMUs The attribute_group for Hybrid PMUs should be different from the previous cpu PMU. For example, cpumask is required for a Hybrid PMU. The PMU type should be included in the event and format attribute. Add hybrid_attr_update for the Hybrid PMU. Check the PMU type in is_visible() function. Only display the event or format for the matched Hybrid PMU. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-19-git-send-email-kan.liang@linux.intel.com commit a9c81ccdf52dd73a20178c40bca34cf52991fdea Author: Kan Liang Date: Mon Apr 12 07:30:57 2021 -0700 perf/x86: Add structures for the attributes of Hybrid PMUs Hybrid PMUs have different events and formats. In theory, Hybrid PMU specific attributes should be maintained in the dedicated struct x86_hybrid_pmu, but it wastes space because the events and formats are similar among Hybrid PMUs. To reduce duplication, all hybrid PMUs will share a group of attributes in the following patch. To distinguish an attribute from different Hybrid PMUs, a PMU aware attribute structure is introduced. A PMU type is required for the attribute structure. The type is internal usage. It is not visible in the sysfs API. Hybrid PMUs may support the same event name, but with different event encoding, e.g., the mem-loads event on an Atom PMU has different event encoding from a Core PMU. It brings issue if two attributes are created for them. Current sysfs_update_group finds an attribute by searching the attr name (aka event name). If two attributes have the same event name, the first attribute will be replaced. To address the issue, only one attribute is created for the event. The event_str is extended and stores event encodings from all Hybrid PMUs. Each event encoding is divided by ";". The order of the event encodings must follow the order of the hybrid PMU index. The event_str is internal usage as well. When a user wants to show the attribute of a Hybrid PMU, only the corresponding part of the string is displayed. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-18-git-send-email-kan.liang@linux.intel.com commit d9977c43bff895ed49a9d25e1f382b0a98bb271f Author: Kan Liang Date: Mon Apr 12 07:30:56 2021 -0700 perf/x86: Register hybrid PMUs Different hybrid PMUs have different PMU capabilities and events. Perf should registers a dedicated PMU for each of them. To check the X86 event, perf has to go through all possible hybrid pmus. All the hybrid PMUs are registered at boot time. Before the registration, add intel_pmu_check_hybrid_pmus() to check and update the counters information, the event constraints, the extra registers and the unique capabilities for each hybrid PMUs. Postpone the display of the PMU information and HW check to CPU_STARTING, because the boot CPU is the only online CPU in the init_hw_perf_events(). Perf doesn't know the availability of the other PMUs. Perf should display the PMU information only if the counters of the PMU are available. One type of CPUs may be all offline. For this case, users can still observe the PMU in /sys/devices, but its CPU mask is 0. All hybrid PMUs have capability PERF_PMU_CAP_HETEROGENEOUS_CPUS. The PMU name for hybrid PMUs will be "cpu_XXX", which will be assigned later in a separated patch. The PMU type id for the core PMU is still PERF_TYPE_RAW. For the other hybrid PMUs, the PMU type id is not hard code. The event->cpu must be compatitable with the supported CPUs of the PMU. Add a check in the x86_pmu_event_init(). The events in a group must be from the same type of hybrid PMU. The fake cpuc used in the validation must be from the supported CPU of the event->pmu. Perf may not retrieve a valid core type from get_this_hybrid_cpu_type(). For example, ADL may have an alternative configuration. With that configuration, Perf cannot retrieve the core type from the CPUID leaf 0x1a. Add a platform specific get_hybrid_cpu_type(). If the generic way fails, invoke the platform specific get_hybrid_cpu_type(). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1618237865-33448-17-git-send-email-kan.liang@linux.intel.com commit e11c1a7eb302ac8f6f47c18fa662546405a5fd83 Author: Kan Liang Date: Mon Apr 12 07:30:55 2021 -0700 perf/x86: Factor out x86_pmu_show_pmu_cap The PMU capabilities are different among hybrid PMUs. Perf should dump the PMU capabilities information for each hybrid PMU. Factor out x86_pmu_show_pmu_cap() which shows the PMU capabilities information. The function will be reused later when registering a dedicated hybrid PMU. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-16-git-send-email-kan.liang@linux.intel.com commit b98567298bad891774054113690b30bd90d5738d Author: Kan Liang Date: Mon Apr 12 07:30:54 2021 -0700 perf/x86: Remove temporary pmu assignment in event_init The temporary pmu assignment in event_init is unnecessary. The assignment was introduced by commit 8113070d6639 ("perf_events: Add fast-path to the rescheduling code"). At that time, event->pmu is not assigned yet when initializing an event. The assignment is required. However, from commit 7e5b2a01d2ca ("perf: provide PMU when initing events"), the event->pmu is provided before event_init is invoked. The temporary pmu assignment in event_init should be removed. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-15-git-send-email-kan.liang@linux.intel.com commit 34d5b61f29eea656be4283213273c33d5987e4d2 Author: Kan Liang Date: Mon Apr 12 07:30:53 2021 -0700 perf/x86/intel: Factor out intel_pmu_check_extra_regs Each Hybrid PMU has to check and update its own extra registers before registration. The intel_pmu_check_extra_regs will be reused later to check the extra registers of each hybrid PMU. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-14-git-send-email-kan.liang@linux.intel.com commit bc14fe1beeec1d80ee39f03019c10e130c8d376b Author: Kan Liang Date: Mon Apr 12 07:30:52 2021 -0700 perf/x86/intel: Factor out intel_pmu_check_event_constraints Each Hybrid PMU has to check and update its own event constraints before registration. The intel_pmu_check_event_constraints will be reused later to check the event constraints of each hybrid PMU. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-13-git-send-email-kan.liang@linux.intel.com commit b8c4d1a87610ba20da1abddb7aacbde0b2817c1a Author: Kan Liang Date: Mon Apr 12 07:30:51 2021 -0700 perf/x86/intel: Factor out intel_pmu_check_num_counters Each Hybrid PMU has to check its own number of counters and mask fixed counters before registration. The intel_pmu_check_num_counters will be reused later to check the number of the counters for each hybrid PMU. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-12-git-send-email-kan.liang@linux.intel.com commit 183af7366b4e813ee4e0b995ff731e3ac28251f0 Author: Kan Liang Date: Mon Apr 12 07:30:50 2021 -0700 perf/x86: Hybrid PMU support for extra_regs Different hybrid PMU may have different extra registers, e.g. Core PMU may have offcore registers, frontend register and ldlat register. Atom core may only have offcore registers and ldlat register. Each hybrid PMU should use its own extra_regs. An Intel Hybrid system should always have extra registers. Unconditionally allocate shared_regs for Intel Hybrid system. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-11-git-send-email-kan.liang@linux.intel.com commit 24ee38ffe61a68fc35065fcab1908883a34c866b Author: Kan Liang Date: Mon Apr 12 07:30:49 2021 -0700 perf/x86: Hybrid PMU support for event constraints The events are different among hybrid PMUs. Each hybrid PMU should use its own event constraints. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-10-git-send-email-kan.liang@linux.intel.com commit 0d18f2dfead8dd63bf1186c9ef38528d6a615a55 Author: Kan Liang Date: Mon Apr 12 07:30:48 2021 -0700 perf/x86: Hybrid PMU support for hardware cache event The hardware cache events are different among hybrid PMUs. Each hybrid PMU should have its own hw cache event table. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1618237865-33448-9-git-send-email-kan.liang@linux.intel.com commit eaacf07d1116f6bf3b93b265515fccf2301097f2 Author: Kan Liang Date: Mon Apr 12 07:30:47 2021 -0700 perf/x86: Hybrid PMU support for unconstrained The unconstrained value depends on the number of GP and fixed counters. Each hybrid PMU should use its own unconstrained. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1618237865-33448-8-git-send-email-kan.liang@linux.intel.com commit d4b294bf84db7a84e295ddf19cb8e7f71b7bd045 Author: Kan Liang Date: Mon Apr 12 07:30:46 2021 -0700 perf/x86: Hybrid PMU support for counters The number of GP and fixed counters are different among hybrid PMUs. Each hybrid PMU should use its own counter related information. When handling a certain hybrid PMU, apply the number of counters from the corresponding hybrid PMU. When reserving the counters in the initialization of a new event, reserve all possible counters. The number of counter recored in the global x86_pmu is for the architecture counters which are available for all hybrid PMUs. KVM doesn't support the hybrid PMU yet. Return the number of the architecture counters for now. For the functions only available for the old platforms, e.g., intel_pmu_drain_pebs_nhm(), nothing is changed. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-7-git-send-email-kan.liang@linux.intel.com commit fc4b8fca2d8fc8aecd58508e81d55afe4ed76344 Author: Kan Liang Date: Mon Apr 12 07:30:45 2021 -0700 perf/x86: Hybrid PMU support for intel_ctrl The intel_ctrl is the counter mask of a PMU. The PMU counter information may be different among hybrid PMUs, each hybrid PMU should use its own intel_ctrl to check and access the counters. When handling a certain hybrid PMU, apply the intel_ctrl from the corresponding hybrid PMU. When checking the HW existence, apply the PMU and number of counters from the corresponding hybrid PMU as well. Perf will check the HW existence for each Hybrid PMU before registration. Expose the check_hw_exists() for a later patch. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andi Kleen Link: https://lkml.kernel.org/r/1618237865-33448-6-git-send-email-kan.liang@linux.intel.com commit d0946a882e6220229a29f9031641e54379be5a1e Author: Kan Liang Date: Mon Apr 12 07:30:44 2021 -0700 perf/x86/intel: Hybrid PMU support for perf capabilities Some platforms, e.g. Alder Lake, have hybrid architecture. Although most PMU capabilities are the same, there are still some unique PMU capabilities for different hybrid PMUs. Perf should register a dedicated pmu for each hybrid PMU. Add a new struct x86_hybrid_pmu, which saves the dedicated pmu and capabilities for each hybrid PMU. The architecture MSR, MSR_IA32_PERF_CAPABILITIES, only indicates the architecture features which are available on all hybrid PMUs. The architecture features are stored in the global x86_pmu.intel_cap. For Alder Lake, the model-specific features are perf metrics and PEBS-via-PT. The corresponding bits of the global x86_pmu.intel_cap should be 0 for these two features. Perf should not use the global intel_cap to check the features on a hybrid system. Add a dedicated intel_cap in the x86_hybrid_pmu to store the model-specific capabilities. Use the dedicated intel_cap to replace the global intel_cap for thse two features. The dedicated intel_cap will be set in the following "Add Alder Lake Hybrid support" patch. Add is_hybrid() to distinguish a hybrid system. ADL may have an alternative configuration. With that configuration, the X86_FEATURE_HYBRID_CPU is not set. Perf cannot rely on the feature bit. Add a new static_key_false, perf_is_hybrid, to indicate a hybrid system. It will be assigned in the following "Add Alder Lake Hybrid support" patch as well. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1618237865-33448-5-git-send-email-kan.liang@linux.intel.com commit 61e76d53c39bb768ad264d379837cfc56b9e35b4 Author: Kan Liang Date: Mon Apr 12 07:30:43 2021 -0700 perf/x86: Track pmu in per-CPU cpu_hw_events Some platforms, e.g. Alder Lake, have hybrid architecture. In the same package, there may be more than one type of CPU. The PMU capabilities are different among different types of CPU. Perf will register a dedicated PMU for each type of CPU. Add a 'pmu' variable in the struct cpu_hw_events to track the dedicated PMU of the current CPU. Current x86_get_pmu() use the global 'pmu', which will be broken on a hybrid platform. Modify it to apply the 'pmu' of the specific CPU. Initialize the per-CPU 'pmu' variable with the global 'pmu'. There is nothing changed for the non-hybrid platforms. The is_x86_event() will be updated in the later patch ("perf/x86: Register hybrid PMUs") for hybrid platforms. For the non-hybrid platforms, nothing is changed here. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1618237865-33448-4-git-send-email-kan.liang@linux.intel.com commit 250b3c0d79d1f4a55e54d8a9ef48058660483fef Author: Ricardo Neri Date: Mon Apr 12 07:30:42 2021 -0700 x86/cpu: Add helper function to get the type of the current hybrid CPU On processors with Intel Hybrid Technology (i.e., one having more than one type of CPU in the same package), all CPUs support the same instruction set and enumerate the same features on CPUID. Thus, all software can run on any CPU without restrictions. However, there may be model-specific differences among types of CPUs. For instance, each type of CPU may support a different number of performance counters. Also, machine check error banks may be wired differently. Even though most software will not care about these differences, kernel subsystems dealing with these differences must know. Add and expose a new helper function get_this_hybrid_cpu_type() to query the type of the current hybrid CPU. The function will be used later in the perf subsystem. The Intel Software Developer's Manual defines the CPU type as 8-bit identifier. Signed-off-by: Ricardo Neri Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tony Luck Reviewed-by: Len Brown Acked-by: Borislav Petkov Link: https://lkml.kernel.org/r/1618237865-33448-3-git-send-email-kan.liang@linux.intel.com commit a161545ab53b174c016b0eb63c2895266665d2f6 Author: Ricardo Neri Date: Mon Apr 12 07:30:41 2021 -0700 x86/cpufeatures: Enumerate Intel Hybrid Technology feature bit Add feature enumeration to identify a processor with Intel Hybrid Technology: one in which CPUs of more than one type are the same package. On a hybrid processor, all CPUs support the same homogeneous (i.e., symmetric) instruction set. All CPUs enumerate the same features in CPUID. Thus, software (user space and kernel) can run and migrate to any CPU in the system as well as utilize any of the enumerated features without any change or special provisions. The main difference among CPUs in a hybrid processor are power and performance properties. Signed-off-by: Ricardo Neri Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Tony Luck Reviewed-by: Len Brown Acked-by: Borislav Petkov Link: https://lkml.kernel.org/r/1618237865-33448-2-git-send-email-kan.liang@linux.intel.com commit 1900357e75dc2ff578d9965e14823a61f477c4a9 Author: Leon Romanovsky Date: Thu Apr 1 09:57:13 2021 +0300 RDMA/bnxt_re: Get rid of custom module reference counting Instead of manually messing with parent driver module reference counting rely on export symbol mechanism to ensure that proper probe/remove chain is performed. Link: https://lore.kernel.org/r/20210401065715.565226-4-leon@kernel.org Signed-off-by: Leon Romanovsky Acked-By: Devesh Sharma Signed-off-by: Jason Gunthorpe commit bcf9ee0520fa95c692eaf6ec5e61e55059c75e15 Author: Leon Romanovsky Date: Thu Apr 1 09:57:12 2021 +0300 RDMA/bnxt_re: Create direct symbol link between bnxt modules Convert indirect probe call to its direct equivalent to create a symbol link between RDMA and netdev modules. This will give us an ability to remove custom module reference counting that doesn't belong to the driver. Link: https://lore.kernel.org/r/20210401065715.565226-3-leon@kernel.org Signed-off-by: Leon Romanovsky Acked-By: Devesh Sharma Signed-off-by: Jason Gunthorpe commit ae9884829c48528ae43b963bddd8856505fcfef1 Author: Leon Romanovsky Date: Thu Apr 1 09:57:11 2021 +0300 RDMA/bnxt_re: Depend on bnxt ethernet driver and not blindly select it The "select" kconfig keyword provides reverse dependency, however it doesn't check that selected symbol meets its own dependencies. Usually "select" is used for non-visible symbols, so instead of trying to keep dependencies in sync with BNXT ethernet driver, simply "depends on" it, like Kconfig documentation suggest. * CONFIG_PCI is already required by BNXT * CONFIG_NETDEVICES and CONFIG_ETHERNET are needed to chose BNXT Link: https://lore.kernel.org/r/20210401065715.565226-2-leon@kernel.org Signed-off-by: Leon Romanovsky Acked-By: Devesh Sharma Signed-off-by: Jason Gunthorpe commit 338a010cb616b6b257bd7fe615bd4a87ca575c3a Author: Manjunath Patil Date: Tue Apr 13 11:36:05 2021 -0700 IB/ipoib: Improve latency in ipoib/cm connection formation Currently IPoIB connected mode queries the device to get the pkey table entry during connection formation. This will increase the time taken to form the connection, especially when limited pkeys are in use. This gets worse when multiple connection attempts are done in parallel. Since ipoib interfaces are locked to a single pkey, use the pkey index that was determined at link up time instead of searching for anything. This improved the latency from 500ms to 1ms on an internal setup. Link: https://lore.kernel.org/r/1618338965-16717-1-git-send-email-manjunath.b.patil@oracle.com Suggested-by: Jason Gunthorpe Signed-off-by: Manjunath Patil Signed-off-by: Jason Gunthorpe commit 7d3d10e0e85fb7c23a86a70f795b1eabd2bc030b Author: Josh Poimboeuf Date: Wed Feb 24 10:29:26 2021 -0600 x86/crypto: Enable objtool in crypto code Now that all the stack alignment prologues have been cleaned up in the crypto code, enable objtool. Among other benefits, this will allow ORC unwinding to work. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/fc2a1918c50e33e46ef0e9a5de02743f2f6e3639.1614182415.git.jpoimboe@redhat.com commit 27d26793f2105281d9374928448142777cef6f74 Author: Josh Poimboeuf Date: Wed Feb 24 10:29:25 2021 -0600 x86/crypto/sha512-ssse3: Standardize stack alignment prologue Use a more standard prologue for saving the stack pointer before realigning the stack. This enables ORC unwinding by allowing objtool to understand the stack realignment. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/6ecaaac9f3828fbb903513bf90c34a08380a8e35.1614182415.git.jpoimboe@redhat.com commit ec063e090bd6487097d459bb4272508b78448270 Author: Josh Poimboeuf Date: Wed Feb 24 10:29:24 2021 -0600 x86/crypto/sha512-avx2: Standardize stack alignment prologue Use a more standard prologue for saving the stack pointer before realigning the stack. This enables ORC unwinding by allowing objtool to understand the stack realignment. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/b1a7b29fcfc65d60a3b6e77ef75f4762a5b8488d.1614182415.git.jpoimboe@redhat.com commit d61684b56edf369f0a6d388088d7c9d59f1618d4 Author: Josh Poimboeuf Date: Wed Feb 24 10:29:23 2021 -0600 x86/crypto/sha512-avx: Standardize stack alignment prologue Use a more standard prologue for saving the stack pointer before realigning the stack. This enables ORC unwinding by allowing objtool to understand the stack realignment. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/d36e9ea1c819d87fa89b3df3fa83e2a1ede18146.1614182415.git.jpoimboe@redhat.com commit ce5846668076aa76a17ab559f0296374e3611fec Author: Josh Poimboeuf Date: Wed Feb 24 10:29:22 2021 -0600 x86/crypto/sha256-avx2: Standardize stack alignment prologue Use a more standard prologue for saving the stack pointer before realigning the stack. This enables ORC unwinding by allowing objtool to understand the stack realignment. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/8048e7444c49a8137f05265262b83dc50f8fb7f3.1614182415.git.jpoimboe@redhat.com commit 20114c899cafa8313534a841cab0ab1f7ab09672 Author: Josh Poimboeuf Date: Wed Feb 24 10:29:21 2021 -0600 x86/crypto/sha1_avx2: Standardize stack alignment prologue Use a more standard prologue for saving the stack pointer before realigning the stack. This enables ORC unwinding by allowing objtool to understand the stack realignment. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/fdaaf8670ed1f52f55ba9a6bbac98c1afddc1af6.1614182415.git.jpoimboe@redhat.com commit 35a0067d2c02a7c35466db5f207b7b9265de84d9 Author: Josh Poimboeuf Date: Wed Feb 24 10:29:20 2021 -0600 x86/crypto/sha_ni: Standardize stack alignment prologue Use a more standard prologue for saving the stack pointer before realigning the stack. This enables ORC unwinding by allowing objtool to understand the stack realignment. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/5033e1a79867dff1b18e1b4d0783c38897d3f223.1614182415.git.jpoimboe@redhat.com commit 2b02ed55482a1c5c310a7f53707292fcf1601e7a Author: Josh Poimboeuf Date: Wed Feb 24 10:29:19 2021 -0600 x86/crypto/crc32c-pcl-intel: Standardize jump table Simplify the jump table code so that it resembles a compiler-generated table. This enables ORC unwinding by allowing objtool to follow all the potential code paths. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/5357a039def90b8ef6b5874ef12cda008ecf18ba.1614182415.git.jpoimboe@redhat.com commit dabe5167a3cbb4bf16b20c0e5b6497513e2e3a08 Author: Josh Poimboeuf Date: Wed Feb 24 10:29:18 2021 -0600 x86/crypto/camellia-aesni-avx2: Unconditionally allocate stack buffer A conditional stack allocation violates traditional unwinding requirements when a single instruction can have differing stack layouts. There's no benefit in allocating the stack buffer conditionally. Just do it unconditionally. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/85ac96613ee5784b6239c18d3f68b1f3c509caa3.1614182415.git.jpoimboe@redhat.com commit e163be86fff3deec70f63330fc43fedf892c9aee Author: Josh Poimboeuf Date: Wed Feb 24 10:29:17 2021 -0600 x86/crypto/aesni-intel_avx: Standardize stack alignment prologue Use RBP instead of R14 for saving the old stack pointer before realignment. This resembles what compilers normally do. This enables ORC unwinding by allowing objtool to understand the stack realignment. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/02d00a0903a0959f4787e186e2a07d271e1f63d4.1614182415.git.jpoimboe@redhat.com commit ff5796b6dbea4763fdca002101e32b60aa17f8e8 Author: Josh Poimboeuf Date: Wed Feb 24 10:29:16 2021 -0600 x86/crypto/aesni-intel_avx: Fix register usage comments Fix register usage comments to match reality. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/8655d4513a0ed1eddec609165064153973010aa2.1614182415.git.jpoimboe@redhat.com commit 4f08300916e882a0c34a2f325ff3fea2be2e57b3 Author: Josh Poimboeuf Date: Wed Feb 24 10:29:15 2021 -0600 x86/crypto/aesni-intel_avx: Remove unused macros These macros are no longer used; remove them. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/53f7136ea93ebdbca399959e6d2991ecb46e733e.1614182415.git.jpoimboe@redhat.com commit 99033461e685b48549ec77608b4bda75ddf772ce Author: Josh Poimboeuf Date: Wed Feb 24 10:29:14 2021 -0600 objtool: Support asm jump tables Objtool detection of asm jump tables would normally just work, except for the fact that asm retpolines use alternatives. Objtool thinks the alternative code path (a jump to the retpoline) is a sibling call. Don't treat alternative indirect branches as sibling calls when the original instruction has a jump table. Signed-off-by: Josh Poimboeuf Tested-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Sami Tolvanen Acked-by: Peter Zijlstra (Intel) Acked-by: Herbert Xu Link: https://lore.kernel.org/r/460cf4dc675d64e1124146562cabd2c05aa322e8.1614182415.git.jpoimboe@redhat.com commit e7020bb068d8be50a92f48e36b236a1a1ef9282e Author: Jiri Kosina Date: Sat Apr 17 11:13:39 2021 +0200 iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_gen2_enqueue_hcmd() Analogically to what we did in 2800aadc18a6 ("iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_enqueue_hcmd()"), we must apply the same fix to iwl_pcie_gen2_enqueue_hcmd(), as it's being called from exactly the same contexts. Reported-by: Heiner Kallweit Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/nycvar.YFH.7.76.2104171112390.18270@cbobk.fhfr.pm commit 734551df6f9bedfbefcd113ede665945e9de0b99 Author: Pavel Begunkov Date: Sun Apr 18 14:52:09 2021 +0100 io_uring: fix shared sqpoll cancellation hangs [ 736.982891] INFO: task iou-sqp-4294:4295 blocked for more than 122 seconds. [ 736.982897] Call Trace: [ 736.982901] schedule+0x68/0xe0 [ 736.982903] io_uring_cancel_sqpoll+0xdb/0x110 [ 736.982908] io_sqpoll_cancel_cb+0x24/0x30 [ 736.982911] io_run_task_work_head+0x28/0x50 [ 736.982913] io_sq_thread+0x4e3/0x720 We call io_uring_cancel_sqpoll() one by one for each ctx either in sq_thread() itself or via task works, and it's intended to cancel all requests of a specified context. However the function uses per-task counters to track the number of inflight requests, so it counts more requests than available via currect io_uring ctx and goes to sleep for them to appear (e.g. from IRQ), that will never happen. Cancel a bit more than before, i.e. all ctxs that share sqpoll and continue to use shared counters. Don't forget that we should not remove ctx from the list before running that task_work sqpoll-cancel, otherwise the function wouldn't be able to find the context and will hang. Reported-by: Joakim Hassila Reported-by: Jens Axboe Fixes: 37d1e2e3642e2 ("io_uring: move SQPOLL thread io-wq forked worker") Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1bded7e6c6b32e0bae25fce36be2868e46b116a0.1618752958.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3b763ba1c77da5806e4fdc5684285814fe970c98 Author: Pavel Begunkov Date: Sun Apr 18 14:52:08 2021 +0100 io_uring: remove extra sqpoll submission halting SQPOLL task won't submit requests for a context that is currently dying, so no need to remove ctx from sqd_list prior the main loop of io_ring_exit_work(). Kill it, will be removed by io_sq_thread_finish() and only brings confusion and lockups. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/f220c2b786ba0f9499bebc9f3cd9714d29efb6a5.1618752958.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 87d5742b73f24ca389cd832fa088170ca5d3d093 Author: Jiapeng Chong Date: Wed Apr 14 14:32:56 2021 +0800 dm clone metadata: remove unused function Fix the following clang warning: drivers/md/dm-clone-metadata.c:279:19: warning: unused function 'superblock_write_lock' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Mike Snitzer commit 4b1013f407dc75e28df2af086e94e8e0cbacfb9d Merge: 11a9b987611f1 aa2f9c12821e6 Author: Mark Brown Date: Mon Apr 19 18:18:45 2021 +0100 Merge series "ASoC: rt286/rt298: Fixes for DMIC2 config and combo jack" from David Ward : The last two patches in this series fix a longstanding issue that prevented the ALC3263 codec from using a headset mic. This codec can be found on Dell systems including the Latitude 13 7350, Venue 11 Pro 7140, and XPS 13 9343. In fact, there is an ACPI quirk for the XPS 13 9343, which forces it to use legacy HD Audio just to avoid this issue: https://lore.kernel.org/alsa-devel/CAPeXnHv07HkvcHrYFmZMr8OTp7U7F=k_k=LPYnUtp89iPn2d2Q@mail.gmail.com/ This may allow that ACPI quirk to be removed. Either way, the other systems mentioned above do not support this quirk and already use the ASoC driver, so this fix is necessary for headset mic support on those systems. Note: there is likely other handling for this codec that only exists in the HDA driver, but which also belongs in the ASoC driver. Commit 394c97f824fa ("ALSA: hda/realtek - Change EAPD to verb control") describes an issue that does not seem to be resolved in the ASoC driver, to give an example. Other patches in this series are not specific to the ALC3263. These patches set the correct combo jack configuration when headphones are inserted, and fix a misaligned value set in the DMIC2 Configuration Default register. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=114171 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=150601 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205961 Signed-off-by: David Ward David Ward (5): ASoC: rt286: Fix upper byte in DMIC2 configuration ASoC: rt286: Configure combo jack for headphones ASoC: rt298: Configure combo jack for headphones ASoC: rt286: Make RT286_SET_GPIO_* readable and writable ASoC: rt286: Generalize support for ALC3263 codec sound/soc/codecs/rt286.c | 34 +++++++++++++++++++++------------- sound/soc/codecs/rt298.c | 9 +++++++-- 2 files changed, 28 insertions(+), 15 deletions(-) -- 2.31.1 commit 17e9e134a8efabbbf689a0904eee92bb5a868172 Author: Tian Tao Date: Wed Apr 14 09:43:44 2021 +0800 dm integrity: fix missing goto in bitmap_flush_interval error handling Fixes: 468dfca38b1a ("dm integrity: add a bitmap mode") Cc: stable@vger.kernel.org Signed-off-by: Tian Tao Signed-off-by: Mike Snitzer commit 7a35693adcd38664b852ad10e3742782b3e87987 Author: Matthew Wilcox (Oracle) Date: Wed Apr 7 14:25:22 2021 +0100 dm: replace dm_vcalloc() Use kvcalloc or kvmalloc_array instead (depending whether zeroing is useful). Signed-off-by: Matthew Wilcox (Oracle) Signed-off-by: Mike Snitzer commit 5208692e80a1f3c8ce2063a22b675dd5589d1d80 Author: Joe Thornber Date: Tue Apr 13 09:11:53 2021 +0100 dm space map common: fix division bug in sm_ll_find_free_block() This division bug meant the search for free metadata space could skip the final allocation bitmap's worth of entries. Fix affects DM thinp, cache and era targets. Cc: stable@vger.kernel.org Signed-off-by: Joe Thornber Tested-by: Ming-Hung Tsai Signed-off-by: Mike Snitzer commit a88b2358f1da2c9f9fcc432f2e0a79617fea397c Author: Joe Thornber Date: Mon Mar 29 16:34:57 2021 +0100 dm persistent data: packed struct should have an aligned() attribute too Otherwise most non-x86 architectures (e.g. riscv, arm) will resort to byte-by-byte access. Cc: stable@vger.kernel.org Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit f73e2e70ec48c9a9d45494c4866230a5059062ad Author: Joe Thornber Date: Mon Mar 29 16:34:03 2021 +0100 dm btree spine: remove paranoid node_check call in node_prep_for_write() Remove this extra BUG_ON() that calls node_check() -- which avoids extra crc checking. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit d6db294fd8194e05a82f368ad97f4efafbd04f2a Author: Joe Thornber Date: Tue Mar 9 14:56:59 2021 +0000 dm space map disk: remove redundant calls to sm_disk_get_nr_free() Both sm_disk_new_block and sm_disk_commit are needlessly calling sm_disk_get_nr_free(). Looks like old queries used for some debugging. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer commit a7b4e506dcc461c214734d03816c1d47bd88c9a3 Author: Wan Jiabing Date: Mon Apr 19 10:20:03 2021 +0800 f2fs: remove unnecessary struct declaration struct dnode_of_data is defined at 897th line. The declaration here is unnecessary. Remove it. Signed-off-by: Wan Jiabing Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a881537dfaf281bfcb94313d69dcf9ef8fc89afe Author: Fabio Estevam Date: Mon Apr 19 11:03:50 2021 -0300 Revert "mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND" This reverts commit bd9c9fe2ad04546940f4a9979d679e62cae6aa51. Since commit bd9c9fe2ad04 ("mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND") the bad block table cannot be found on a imx27-phytec-phycard-s-rdk board: Bad block table not found for chip 0 Bad block table not found for chip 0 Revert it for now, until a better solution can be found. Signed-off-by: Fabio Estevam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210419140350.809853-1-festevam@gmail.com commit 65d4801ae44e842cddca60278cfe299e1c2417c3 Author: Håkon Bugge Date: Tue Apr 6 12:37:03 2021 +0200 RDMA/core: Unify RoCE check and re-factor code In cm_req_handler(), unify the check for RoCE and re-factor to avoid one test. Link: https://lore.kernel.org/r/1617705423-15570-1-git-send-email-haakon.bugge@oracle.com Suggested-by: Jason Gunthorpe Fixes: 8f9748602491 ("IB/cm: Reduce dependency on gid attribute ndev check") Fixes: 194f64a3cad3 ("RDMA/core: Fix corrupted SL on passive side") Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit aa2f9c12821e6a4ba1df4fb34a3dbc6a2a1ee7fe Author: David Ward Date: Sun Apr 18 09:46:58 2021 -0400 ASoC: rt286: Generalize support for ALC3263 codec The ALC3263 codec on the XPS 13 9343 is also found on the Latitude 13 7350 and Venue 11 Pro 7140. They require the same handling for the combo jack to work with a headset: GPIO pin 6 must be set. The HDA driver always sets this pin on the ALC3263, which it distinguishes by the codec vendor/device ID 0x10ec0288 and PCI subsystem vendor ID 0x1028 (Dell). The ASoC driver does not use PCI, so adapt this check to use DMI to determine if Dell is the system vendor. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=150601 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205961 Signed-off-by: David Ward Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210418134658.4333-6-david.ward@gatech.edu Signed-off-by: Mark Brown commit f3bd4dde9f048fa711e98626c8c3bc4d1eae3436 Author: David Ward Date: Sun Apr 18 09:46:56 2021 -0400 ASoC: rt298: Configure combo jack for headphones During jack detection, the combo jack is configured for a CTIA headset, and then for an OMTP headset, while sensing the mic connection. If a mic is not found in either case, the combo jack should be re-configured for headphones only. This is consistent with the HDA driver behavior. Signed-off-by: David Ward Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210418134658.4333-4-david.ward@gatech.edu Signed-off-by: Mark Brown commit b15c3ea7e0d2c53b33adc8ca0896de378d6df853 Author: David Ward Date: Sun Apr 18 09:46:55 2021 -0400 ASoC: rt286: Configure combo jack for headphones During jack detection, the combo jack is configured for a CTIA headset, and then for an OMTP headset, while sensing the mic connection. If a mic is not found in either case, the combo jack should be re-configured for headphones only. This is consistent with the HDA driver behavior. Signed-off-by: David Ward Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210418134658.4333-3-david.ward@gatech.edu Signed-off-by: Mark Brown commit 11a9b987611f17e6a95e9bb34c1f5f9aa0b6ae25 Author: Niklas Carlsson Date: Mon Apr 19 16:49:01 2021 +0200 ASoC: sigmadsp: Disable cache mechanism for readbacks The ALSA control readback functionality only works for non-volatile controls, i.e. control values that does not change on their own without driver interaction. This doesn't work for readbacks since the DSP firmware updates the control value. Disable the cache mechanism in the driver if the control name matches the prefix used for readbacks to ensure that the control value is valid. Signed-off-by: Niklas Carlsson Link: https://lore.kernel.org/r/20210419144901.9441-1-Niklas.Carlsson@axis.com Signed-off-by: Mark Brown commit 1fa27f35ee23b52e0bd708d00c272c5df805afc8 Merge: a523ef731ac66 cd8499d5c03ba Author: Mark Brown Date: Mon Apr 19 16:51:43 2021 +0100 Merge series "ASoC: rt286/rt298: Fixes for DMIC2 config and combo jack" from David Ward : The last two patches in this series fix a longstanding issue that prevented the ALC3263 codec from using a headset mic. This codec can be found on Dell systems including the Latitude 13 7350, Venue 11 Pro 7140, and XPS 13 9343. In fact, there is an ACPI quirk for the XPS 13 9343, which forces it to use legacy HD Audio just to avoid this issue: https://lore.kernel.org/alsa-devel/CAPeXnHv07HkvcHrYFmZMr8OTp7U7F=k_k=LPYnUtp89iPn2d2Q@mail.gmail.com/ This may allow that ACPI quirk to be removed. Either way, the other systems mentioned above do not support this quirk and already use the ASoC driver, so this fix is necessary for headset mic support on those systems. Note: there is likely other handling for this codec that only exists in the HDA driver, but which also belongs in the ASoC driver. Commit 394c97f824fa ("ALSA: hda/realtek - Change EAPD to verb control") describes an issue that does not seem to be resolved in the ASoC driver, to give an example. Other patches in this series are not specific to the ALC3263. These patches set the correct combo jack configuration when headphones are inserted, and fix a misaligned value set in the DMIC2 Configuration Default register. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=114171 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=150601 BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=205961 Signed-off-by: David Ward David Ward (5): ASoC: rt286: Fix upper byte in DMIC2 configuration ASoC: rt286: Configure combo jack for headphones ASoC: rt298: Configure combo jack for headphones ASoC: rt286: Make RT286_SET_GPIO_* readable and writable ASoC: rt286: Generalize support for ALC3263 codec sound/soc/codecs/rt286.c | 34 +++++++++++++++++++++------------- sound/soc/codecs/rt298.c | 9 +++++++-- 2 files changed, 28 insertions(+), 15 deletions(-) -- 2.31.1 base-commit: a38fd8748464831584a19438cbb3082b5a2dab15 commit cd8499d5c03ba260e3191e90236d0e5f6b147563 Author: David Ward Date: Sun Apr 18 09:46:57 2021 -0400 ASoC: rt286: Make RT286_SET_GPIO_* readable and writable The GPIO configuration cannot be applied if the registers are inaccessible. This prevented the headset mic from working on the Dell XPS 13 9343. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=114171 Signed-off-by: David Ward Link: https://lore.kernel.org/r/20210418134658.4333-5-david.ward@gatech.edu Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit dfa7b01dbdc9723ced606425b47005bb583a8778 Author: David Ward Date: Sun Apr 18 09:46:54 2021 -0400 ASoC: rt286: Fix upper byte in DMIC2 configuration This HDA verb sets the upper byte of the Configuration Default register, so only an 8-bit value should be used. For the rt298, the same fix was applied in commit f8f2dc4a7127 ("ASoC: rt298: fix wrong setting of gpio2_en"). Signed-off-by: David Ward Link: https://lore.kernel.org/r/20210418134658.4333-2-david.ward@gatech.edu Reviewed-by: Pierre-Louis Bossart Signed-off-by: Mark Brown commit fd9db1058c6c2a8c02f00707b26c4647d95e6acc Author: Takashi Iwai Date: Mon Apr 19 17:39:18 2021 +0200 ALSA: usb-audio: Re-apply implicit feedback mode to Pioneer devices Pioneer devices are supposed to be working with the implicit feedback mode, but so far the attempt to apply the implicit feedback caused issues, hence we explicitly skipped the implicit feedback mode for them. Recently, Geraldo discovered that the device actually works if you skip the generic matching of the sync EPs for the capture stream. That is, we should apply the implicit feedback setup for the playback like other similar devices, while we need to return 1 from audioformat_capture_quirk() so that no further matching will be done. And, later on, Olivia reported later that the fiddling with the capture quirk alone doesn't suffice for the test with speaker-test program. This seems to be a similar case like the recently fixed BOSS devices. Indeed, the problem could be addressed by setting playback_first flag, which indicates that the playback URBs have to be sent out at first even in the implicit feedback mode. This patch implements the application of the implicit feedback to Pioneer devices as described in the above. The former skip_pioneer_sync_ep() was dropped, and instead we provide is_pioneer_implicit_fb() to check the Pioneer devices that need the implicit feedback. In the audioformat_implicit_fb_quirk(), simply apply the implicit fb for playback and set chip->playback_first flag if matching, and in audioformat_capture_quirk()(), it returns 1 for skipping the generic EP sync handling. Reported-by: Geraldo Tested-by: Olivia Mackintosh Link: https://lore.kernel.org/r/s5ha6pygqfz.wl-tiwai@suse.de Link: https://lore.kernel.org/r/20210419153918.450-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 028a1e968435383c9555fc9386d116688f31dfce Merge: 2de5bb9956563 7de91b665600c Author: Arnd Bergmann Date: Mon Apr 19 17:39:12 2021 +0200 Merge tag 'qcom-defconfig-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM defconfig updates for 5.13 This enables all the hardware support currently available for the Qualcomm SDX55 platform in the qcom_defconfig. Due to (current) size limitations these changes are not done in the multi-platform config. * tag 'qcom-defconfig-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: configs: qcom_defconfig: Reduce CMA size to 64MB ARM: configs: qcom_defconfig: Enable GLINK SMEM driver ARM: configs: qcom_defconfig: Enable SDX55 interconnect driver ARM: configs: qcom_defconfig: Enable Q6V5_PAS remoteproc driver ARM: configs: qcom_defconfig: Enable CPUFreq support ARM: configs: qcom_defconfig: Enable SDX55 A7 PLL and APCS clock driver ARM: configs: qcom_defconfig: Enable APCS IPC mailbox driver Link: https://lore.kernel.org/r/20210419152143.861934-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit a85a8d52bf5007b14cbe70f9197bda25c78cab53 Merge: 6417554e3d34e 1b86cc7330895 Author: Arnd Bergmann Date: Mon Apr 19 17:37:38 2021 +0200 Merge tag 'qcom-arm64-for-5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Even more Qualcomm ARM64 updates for v5.13 This contains three audio related fixes for the sc7180 Trogdor devices. * tag 'qcom-arm64-for-5.13-3' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: dts: qcom: sc7180: Update iommu property for simultaneous playback arm64: dts: qcom: sc7180: pompom: Add "dmic_clk_en" + sound model arm64: dts: qcom: sc7180: coachz: Add "dmic_clk_en" Link: https://lore.kernel.org/r/20210419151637.861409-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 1d68128c107a0b8c0c9125cb05d4771ddc438369 Author: Johannes Thumshirn Date: Fri Apr 16 12:05:27 2021 +0900 btrfs: zoned: fail mount if the device does not support zone append For zoned btrfs, zone append is mandatory to write to a sequential write only zone, otherwise parallel writes to the same zone could result in unaligned write errors. If a zoned block device does not support zone append (e.g. a dm-crypt zoned device using a non-NULL IV cypher), fail to mount. CC: stable@vger.kernel.org # 5.12 Signed-off-by: Johannes Thumshirn Signed-off-by: Damien Le Moal Reviewed-by: David Sterba Signed-off-by: David Sterba commit 061dde8245356d8864d29e25207aa4daa0be4d3c Author: Filipe Manana Date: Mon Apr 5 12:32:16 2021 +0100 btrfs: fix race between transaction aborts and fsyncs leading to use-after-free There is a race between a task aborting a transaction during a commit, a task doing an fsync and the transaction kthread, which leads to an use-after-free of the log root tree. When this happens, it results in a stack trace like the following: BTRFS info (device dm-0): forced readonly BTRFS warning (device dm-0): Skipping commit of aborted transaction. BTRFS: error (device dm-0) in cleanup_transaction:1958: errno=-5 IO failure BTRFS warning (device dm-0): lost page write due to IO error on /dev/mapper/error-test (-5) BTRFS warning (device dm-0): Skipping commit of aborted transaction. BTRFS warning (device dm-0): direct IO failed ino 261 rw 0,0 sector 0xa4e8 len 4096 err no 10 BTRFS error (device dm-0): error writing primary super block to device 1 BTRFS warning (device dm-0): direct IO failed ino 261 rw 0,0 sector 0x12e000 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 261 rw 0,0 sector 0x12e008 len 4096 err no 10 BTRFS warning (device dm-0): direct IO failed ino 261 rw 0,0 sector 0x12e010 len 4096 err no 10 BTRFS: error (device dm-0) in write_all_supers:4110: errno=-5 IO failure (1 errors while writing supers) BTRFS: error (device dm-0) in btrfs_sync_log:3308: errno=-5 IO failure general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b68: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC PTI CPU: 2 PID: 2458471 Comm: fsstress Not tainted 5.12.0-rc5-btrfs-next-84 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 RIP: 0010:__mutex_lock+0x139/0xa40 Code: c0 74 19 (...) RSP: 0018:ffff9f18830d7b00 EFLAGS: 00010202 RAX: 6b6b6b6b6b6b6b68 RBX: 0000000000000001 RCX: 0000000000000002 RDX: ffffffffb9c54d13 RSI: 0000000000000000 RDI: 0000000000000000 RBP: ffff9f18830d7bc0 R08: 0000000000000000 R09: 0000000000000000 R10: ffff9f18830d7be0 R11: 0000000000000001 R12: ffff8c6cd199c040 R13: ffff8c6c95821358 R14: 00000000fffffffb R15: ffff8c6cbcf01358 FS: 00007fa9140c2b80(0000) GS:ffff8c6fac600000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa913d52000 CR3: 000000013d2b4003 CR4: 0000000000370ee0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: ? __btrfs_handle_fs_error+0xde/0x146 [btrfs] ? btrfs_sync_log+0x7c1/0xf20 [btrfs] ? btrfs_sync_log+0x7c1/0xf20 [btrfs] btrfs_sync_log+0x7c1/0xf20 [btrfs] btrfs_sync_file+0x40c/0x580 [btrfs] do_fsync+0x38/0x70 __x64_sys_fsync+0x10/0x20 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fa9142a55c3 Code: 8b 15 09 (...) RSP: 002b:00007fff26278d48 EFLAGS: 00000246 ORIG_RAX: 000000000000004a RAX: ffffffffffffffda RBX: 0000563c83cb4560 RCX: 00007fa9142a55c3 RDX: 00007fff26278cb0 RSI: 00007fff26278cb0 RDI: 0000000000000005 RBP: 0000000000000005 R08: 0000000000000001 R09: 00007fff26278d5c R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000340 R13: 00007fff26278de0 R14: 00007fff26278d96 R15: 0000563c83ca57c0 Modules linked in: btrfs dm_zero dm_snapshot dm_thin_pool (...) ---[ end trace ee2f1b19327d791d ]--- The steps that lead to this crash are the following: 1) We are at transaction N; 2) We have two tasks with a transaction handle attached to transaction N. Task A and Task B. Task B is doing an fsync; 3) Task B is at btrfs_sync_log(), and has saved fs_info->log_root_tree into a local variable named 'log_root_tree' at the top of btrfs_sync_log(). Task B is about to call write_all_supers(), but before that... 4) Task A calls btrfs_commit_transaction(), and after it sets the transaction state to TRANS_STATE_COMMIT_START, an error happens before it waits for the transaction's 'num_writers' counter to reach a value of 1 (no one else attached to the transaction), so it jumps to the label "cleanup_transaction"; 5) Task A then calls cleanup_transaction(), where it aborts the transaction, setting BTRFS_FS_STATE_TRANS_ABORTED on fs_info->fs_state, setting the ->aborted field of the transaction and the handle to an errno value and also setting BTRFS_FS_STATE_ERROR on fs_info->fs_state. After that, at cleanup_transaction(), it deletes the transaction from the list of transactions (fs_info->trans_list), sets the transaction to the state TRANS_STATE_COMMIT_DOING and then waits for the number of writers to go down to 1, as it's currently 2 (1 for task A and 1 for task B); 6) The transaction kthread is running and sees that BTRFS_FS_STATE_ERROR is set in fs_info->fs_state, so it calls btrfs_cleanup_transaction(). There it sees the list fs_info->trans_list is empty, and then proceeds into calling btrfs_drop_all_logs(), which frees the log root tree with a call to btrfs_free_log_root_tree(); 7) Task B calls write_all_supers() and, shortly after, under the label 'out_wake_log_root', it deferences the pointer stored in 'log_root_tree', which was already freed in the previous step by the transaction kthread. This results in a use-after-free leading to a crash. Fix this by deleting the transaction from the list of transactions at cleanup_transaction() only after setting the transaction state to TRANS_STATE_COMMIT_DOING and waiting for all existing tasks that are attached to the transaction to release their transaction handles. This makes the transaction kthread wait for all the tasks attached to the transaction to be done with the transaction before dropping the log roots and doing other cleanups. Fixes: ef67963dac255b ("btrfs: drop logs when we've aborted a transaction") CC: stable@vger.kernel.org # 5.10+ Reviewed-by: Josef Bacik Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit c4aec299fa8f73f0fd10bc556f936f0da50e3e83 Author: Qu Wenruo Date: Tue Apr 6 08:36:03 2021 +0800 btrfs: introduce submit_eb_subpage() to submit a subpage metadata page The new function, submit_eb_subpage(), will submit all the dirty extent buffers in the page. The major difference between submit_eb_page() and submit_eb_subpage() is: - How to grab extent buffer Now we use find_extent_buffer_nospinlock() other than using page::private. All other different handling is already done in functions like lock_extent_buffer_for_io() and write_one_eb(). Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit f3156df944754d9984b1595994caa1c93b8cae3b Author: Qu Wenruo Date: Tue Apr 6 08:36:02 2021 +0800 btrfs: make lock_extent_buffer_for_io() to be subpage compatible For subpage metadata, we don't use page locking at all. So just skip the page locking part for subpage. The rest of the function can be reused. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 35b6ddfa9626d1461d54eb203e9b6021d97dd13c Author: Qu Wenruo Date: Tue Apr 6 08:36:01 2021 +0800 btrfs: introduce write_one_subpage_eb() function The new function, write_one_subpage_eb(), as a subroutine for subpage metadata write, will handle the extent buffer bio submission. The major differences between the new write_one_subpage_eb() and write_one_eb() is: - No page locking When entering write_one_subpage_eb() the page is no longer locked. We only lock the page for its status update, and unlock immediately. Now we completely rely on extent io tree locking. - Extra bitmap update along with page status update Now page dirty and writeback is controlled by btrfs_subpage::dirty_bitmap and btrfs_subpage::writeback_bitmap. They both follow the schema that any sector is dirty/writeback, then the full page gets dirty/writeback. - When to update the nr_written number Now we take a shortcut, if we have cleared the last dirty bit of the page, we update nr_written. This is not completely perfect, but should emulate the old behavior well enough. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit 2f3186d8eed5ef6c9234b05c0e67023fec6edd4d Author: Qu Wenruo Date: Tue Apr 6 08:36:00 2021 +0800 btrfs: introduce end_bio_subpage_eb_writepage() function The new function, end_bio_subpage_eb_writepage(), will handle the metadata writeback endio. The major differences involved are: - How to grab extent buffer Now page::private is a pointer to btrfs_subpage, we can no longer grab extent buffer directly. Thus we need to use the bv_offset to locate the extent buffer manually and iterate through the whole range. - Use btrfs_subpage_end_writeback() caller This helper will handle the subpage writeback for us. Since this function is executed under endio context, when grabbing extent buffers it can't grab eb->refs_lock as that lock is not designed to be grabbed under hardirq context. So here introduce a helper, find_extent_buffer_nolock(), for such situation, and convert find_extent_buffer() to use that helper. Signed-off-by: Qu Wenruo Signed-off-by: David Sterba commit fb686c6824dd6294ca772b92424b8fba666e7d00 Author: Josef Bacik Date: Fri Mar 12 15:25:34 2021 -0500 btrfs: check return value of btrfs_commit_transaction in relocation There are a few places where we don't check the return value of btrfs_commit_transaction in relocation.c. Thankfully all these places have straightforward error handling, so simply change all of the sites at once. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 24213fa46c7080c31d79aa2e3e2f0d9480cab700 Author: Josef Bacik Date: Fri Mar 12 15:25:33 2021 -0500 btrfs: do proper error handling in merge_reloc_roots We have a BUG_ON() if we get an error back from btrfs_get_fs_root(). This honestly should never fail, as at this point we have a solid coordination of fs root to reloc root, and these roots will all be in memory. But in the name of killing BUG_ON()'s remove these and handle the error condition properly, ASSERT()'ing for developers. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8717cf440db670ba87596d8f5f6660d2a94f4401 Author: Josef Bacik Date: Fri Mar 12 15:25:32 2021 -0500 btrfs: handle extent corruption with select_one_root properly In corruption cases we could have paths from a block up to no root at all, and thus we'll BUG_ON(!root) in select_one_root. Handle this by adding an ASSERT() for developers, and returning an error for normal users. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit e0b085b0b03fa5c435b7240668f144199ed989c4 Author: Josef Bacik Date: Fri Mar 12 15:25:31 2021 -0500 btrfs: cleanup error handling in prepare_to_merge This probably can't happen even with a corrupt file system, because we would have failed much earlier on than here. However there's no reason we can't just check and bail out as appropriate, so do that and convert the correctness BUG_ON() to an ASSERT(). Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba commit 57a304cfd43b2b4a5b44b8f5dc026abb34183068 Author: Josef Bacik Date: Fri Mar 12 15:25:30 2021 -0500 btrfs: do not panic in __add_reloc_root If we have a duplicate entry for a reloc root then we could have fs corruption that resulted in a double allocation. Since this shouldn't happen unless there is corruption, add an ASSERT(ret != -EEXIST) to all of the callers of __add_reloc_root() to catch any logic mistakes for developers, otherwise normal error handling will happen for normal users. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3c9258632c49436558f10776be1809ae051cdb9e Author: Josef Bacik Date: Fri Mar 12 15:25:29 2021 -0500 btrfs: handle __add_reloc_root failures in btrfs_recover_relocation We can already handle errors appropriately from this function, deal with an error coming from __add_reloc_root appropriately. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba commit 790c1b8cd477af069a93375fa268d637ef799794 Author: Josef Bacik Date: Fri Mar 12 15:25:28 2021 -0500 btrfs: do proper error handling in create_reloc_inode We already handle some errors in this function, and the callers do the correct error handling, so clean up the rest of the function to do the appropriate error handling. There's a little extra work that needs to be done here, as we create the inode item before we create the orphan item. We could potentially add the orphan item, but if we failed to create the inode item we would have to abort the transaction. Instead add a helper to delete the inode item we created in the case that we're unable to look up the inode (this would likely be caused by an ENOMEM), which if it succeeds means we can avoid a transaction abort in this particular error case. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 24cd638902d4c6b05eae958707ce01729631d012 Author: Josef Bacik Date: Fri Mar 12 15:25:27 2021 -0500 btrfs: remove the extent item sanity checks in relocate_block_group These checks are all taken care of for us by the tree checker code: - the flags don't change or are updated consistently - the v0 extent item format is invalid and caught in many other places too Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 0ebb6bbbd499987248b4ce8f4f7c5eeb6e1fa905 Author: Josef Bacik Date: Fri Mar 12 15:25:26 2021 -0500 btrfs: tree-checker: check for BTRFS_BLOCK_FLAG_FULL_BACKREF being set improperly We need to validate that a data extent item does not have the FULL_BACKREF flag set on its flags. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit eb6b7fb4b544ae0ab19a85b55ca548d838dc4beb Author: Josef Bacik Date: Fri Mar 12 15:25:25 2021 -0500 btrfs: handle extent reference errors in do_relocation We can already deal with errors appropriately from do_relocation, simply handle any errors that come from changing the refs at this point cleanly. We have to abort the transaction if we fail here as we've modified metadata at this point. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 253e258c34262c50ce2622b38d2769911a9cddfd Author: Josef Bacik Date: Fri Mar 12 15:25:24 2021 -0500 btrfs: handle errors in reference count manipulation in replace_path If any of the reference count manipulation stuff fails in replace_path we need to abort the transaction, as we've modified the blocks already. We can simply break at this point and everything will be cleaned up. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0e9873e2fe43ea098e70c30c996ebb90a22cce43 Author: Josef Bacik Date: Fri Mar 12 15:25:23 2021 -0500 btrfs: handle btrfs_search_slot failure in replace_path The search can fail for various reasons, in case of errors there's no cleanup to be done so we can pass the error to the caller, adjusting for the case where the key is not found and search slot returns 1. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ update changelog ] Signed-off-by: David Sterba commit 45b87c5d2557a327bb702d00040cfbf2271b56ed Author: Josef Bacik Date: Fri Mar 12 15:25:22 2021 -0500 btrfs: handle btrfs_cow_block errors in replace_path If we error out COWing the root node when doing a replace_path then we simply unlock and free the buffer and return the error. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7a9213a93546e7eaef90e6e153af6b8fc7553f10 Author: Josef Bacik Date: Fri Mar 12 15:25:21 2021 -0500 btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s A few BUG_ON()'s in replace_path are purely to keep us from making logical mistakes, so replace them with ASSERT()'s. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 592fbcd50c99b8adf999a2a54f9245caff333139 Author: Josef Bacik Date: Fri Mar 12 15:25:20 2021 -0500 btrfs: do proper error handling in btrfs_update_reloc_root We call btrfs_update_root in btrfs_update_reloc_root, which can fail for all sorts of reasons, including IO errors. Instead of panicing the box lets return the error, now that all callers properly handle those errors. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit bbae13f8ab22fb997403ee8a67f87432f4751a8d Author: Josef Bacik Date: Fri Mar 12 15:25:19 2021 -0500 btrfs: handle btrfs_update_reloc_root failure in prepare_to_merge btrfs_update_reloc_root will will return errors in the future, so handle an error properly in prepare_to_merge. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7934133fae5ea08346b224ecabffdbf14dd076c6 Author: Josef Bacik Date: Fri Mar 12 15:25:18 2021 -0500 btrfs: handle btrfs_update_reloc_root failure in insert_dirty_subvol btrfs_update_reloc_root will will return errors in the future, so handle the error properly in insert_dirty_subvol. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ac54da6c37f1eb45218e107f9c924e4d7f054e5b Author: Josef Bacik Date: Fri Mar 12 15:25:17 2021 -0500 btrfs: change insert_dirty_subvol to return errors This will be able to return errors in the future, so change it to return an error and handle the errors appropriately. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2dd8298eb3e90103f3cb36a975aee84bae66f218 Author: Josef Bacik Date: Fri Mar 12 15:25:16 2021 -0500 btrfs: handle btrfs_update_reloc_root failure in commit_fs_roots btrfs_update_reloc_root will will return errors in the future, so handle the error properly in commit_fs_roots. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 39200e59089e260af8edb9feeb69c54ba51699c5 Author: Josef Bacik Date: Fri Mar 12 15:25:15 2021 -0500 btrfs: validate root::reloc_root after recording root in trans If we fail to setup a root->reloc_root in a different thread that path will error out, however it still leaves root->reloc_root NULL but would still appear set up in the transaction. Subsequent calls to btrfs_record_root_in_transaction would succeed without attempting to create the reloc root, as the transid has already been updated. Handle this case by making sure we have a root->reloc_root set after a btrfs_record_root_in_transaction call so we don't end up dereferencing a NULL pointer. Reported-by: Zygo Blaxell Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 84c50ba5214c2f3c1be4a931d521ec19f55dfdc8 Author: Josef Bacik Date: Fri Mar 12 15:25:14 2021 -0500 btrfs: do proper error handling in create_reloc_root We do memory allocations here, read blocks from disk, all sorts of operations that could easily fail at any given point. Instead of panicing the box, simply return the error back up the chain, all callers at this point have proper error handling. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 00bb36a0e76ab7e94bdd70d561baf25f9bc1415d Author: Josef Bacik Date: Fri Mar 12 15:25:13 2021 -0500 btrfs: have proper error handling in btrfs_init_reloc_root create_reloc_root will return errors in the future, and __add_reloc_root can return ENOMEM or EEXIST, so handle these errors properly. Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba commit 03a7e111a94961092e2832a6259d39c8c01d6def Author: Josef Bacik Date: Fri Mar 12 15:25:12 2021 -0500 btrfs: return an error from btrfs_record_root_in_trans We can create a reloc root when we record the root in the trans, which can fail for all sorts of different reasons. Propagate this error up the chain of callers. Future patches will fix the callers of btrfs_record_root_in_trans() to handle the error. Reviewed-by: Qu Wenruo Reviewed-by: Johannes Thumshirn Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit f0118cb6bcd3afefd01b5bcaa4baaddbb6085092 Author: Josef Bacik Date: Fri Mar 12 15:25:11 2021 -0500 btrfs: handle record_root_in_trans failure in create_pending_snapshot record_root_in_trans can currently fail, so handle this failure properly. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1409e6cc7461d091b2ef1ad16954972d4ca1c784 Author: Josef Bacik Date: Fri Mar 12 15:25:10 2021 -0500 btrfs: handle record_root_in_trans failure in btrfs_record_root_in_trans record_root_in_trans can fail currently, handle this failure properly. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1c442d22466074b8290d89ddda2c2edbf8be1eaf Author: Josef Bacik Date: Fri Mar 12 15:25:09 2021 -0500 btrfs: handle record_root_in_trans failure in qgroup_account_snapshot record_root_in_trans can fail currently, so handle this failure properly. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 68075ea8d760d6136900a268d65b7fd072977ccb Author: Josef Bacik Date: Fri Mar 12 15:25:08 2021 -0500 btrfs: handle btrfs_record_root_in_trans failure in start_transaction btrfs_record_root_in_trans will return errors in the future, so handle the error properly in start_transaction. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba commit d18c7bd95c3d1adf5de385acc8c0bdb64b1a8d68 Author: Josef Bacik Date: Fri Mar 12 15:25:07 2021 -0500 btrfs: handle btrfs_record_root_in_trans failure in relocate_tree_block btrfs_record_root_in_trans will return errors in the future, so handle the error properly in relocate_tree_block. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 221581e485751811db3b43148177be2a0bdb2f3c Author: Josef Bacik Date: Fri Mar 12 15:25:06 2021 -0500 btrfs: handle btrfs_record_root_in_trans failure in create_subvol btrfs_record_root_in_trans will return errors in the future, so handle the error properly in create_subvol. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2002ae112a7415403896c66971532c2bb8d09ab7 Author: Josef Bacik Date: Fri Mar 12 15:25:05 2021 -0500 btrfs: handle btrfs_record_root_in_trans failure in btrfs_recover_log_trees btrfs_record_root_in_trans will return errors in the future, so handle the error properly in btrfs_recover_log_trees. This appears tricky, however we have a reference count on the destination root, so if this fails we need to continue on in the loop to make sure the proper cleanup is done. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba [ add comment ] Signed-off-by: David Sterba commit 2731f5186ba8e641515a01a1016b88f09b34777d Author: Josef Bacik Date: Fri Mar 12 15:25:04 2021 -0500 btrfs: handle btrfs_record_root_in_trans failure in btrfs_delete_subvolume btrfs_record_root_in_trans will return errors in the future, so handle the error properly in btrfs_delete_subvolume. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit b0fec6fd330fe10cb68c137f6b7a17898ee69671 Author: Josef Bacik Date: Fri Mar 12 15:25:03 2021 -0500 btrfs: handle btrfs_record_root_in_trans failure in btrfs_rename btrfs_record_root_in_trans will return errors in the future, so handle the error properly in btrfs_rename. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 00aa8e87c9dc63bf145bee00d890198cf7c45a24 Author: Josef Bacik Date: Fri Mar 12 15:25:02 2021 -0500 btrfs: handle btrfs_record_root_in_trans failure in btrfs_rename_exchange btrfs_record_root_in_trans will return errors in the future, so handle the error properly in btrfs_rename_exchange. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 404bccbcaa7ecb073b4d7c1126efda47b346be4a Author: Josef Bacik Date: Fri Mar 12 15:25:01 2021 -0500 btrfs: do proper error handling in record_reloc_root_in_trans Generally speaking this shouldn't ever fail, the corresponding fs root for the reloc root will already be in memory, so we won't get ENOMEM here. However if there is no corresponding root for the reloc root then we could get ENOMEM when we try to allocate it or we could get ENOENT when we look it up and see that it doesn't exist. Convert these BUG_ON()'s into ASSERT()'s and add proper error handling for the case of corruption. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 92de551b837650568486b94b67f4168e4c6cc68a Author: Josef Bacik Date: Fri Mar 12 15:25:00 2021 -0500 btrfs: check record_root_in_trans related failures in select_reloc_root We will record the fs root or the reloc root in the trans in select_reloc_root. These will actually return errors in the following patches, so check their return value here and return it up the stack. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8ee66afe99584e14250db2250397d110af6f4885 Author: Josef Bacik Date: Fri Mar 12 15:24:59 2021 -0500 btrfs: convert BUG_ON()'s in select_reloc_root() to proper errors We have several BUG_ON()'s in select_reloc_root() that can be tripped if there is an extent tree corruption. Convert these to ASSERT()'s, because if we hit it during testing it really is bad, or could indicate a problem with the backref walking code. However if users hit these problems it generally indicates corruption, I've hit a few machines in the fleet that trip over these with clearly corrupted extent trees, so be nice and print out an error message and return an error instead of bringing the whole box down. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit cbdc2ebc7c42a744d2f52a8a4adb0b725798469e Author: Josef Bacik Date: Fri Mar 12 15:24:58 2021 -0500 btrfs: handle errors from select_reloc_root() Currently select_reloc_root() doesn't return an error, but followup patches will make it possible for it to return an error. We do have proper error recovery in do_relocation however, so handle the possibility of select_reloc_root() having an error properly instead of BUG_ON(!root). I've also adjusted select_reloc_root() to return ERR_PTR(-ENOENT) if we don't find a root, instead of NULL, to make the error case easier to deal with. I've replaced the BUG_ON(!root) with an ASSERT(0) for this case as it indicates we messed up the backref walking code, but it could also indicate corruption. Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1c7bfa159fe796f0f6d310b02215d765f066b9c2 Author: Josef Bacik Date: Fri Mar 12 15:24:57 2021 -0500 btrfs: convert BUG_ON()'s in relocate_tree_block We have a couple of BUG_ON()'s in relocate_tree_block() that can be tripped if we have file system corruption. Convert these to ASSERT()'s so developers still get yelled at when they break the backref code, but error out nicely for users so the whole box doesn't go down. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit ffe30dd892ad37f1193ae639ce7e2ad142a62721 Author: Josef Bacik Date: Fri Mar 12 15:24:56 2021 -0500 btrfs: convert some BUG_ON()'s to ASSERT()'s in do_relocation A few of these are checking for correctness, and won't be triggered by corrupted file systems, so convert them to ASSERT() instead of BUG_ON() and add a comment explaining their existence. Reviewed-by: Qu Wenruo Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 32c0a6bcaa1f57e80f67bf3ae2b35d00cea8361a Author: Matthew Wilcox (Oracle) Date: Sun Mar 21 21:03:11 2021 +0000 btrfs: add and use readahead_batch_length Implement readahead_batch_length() to determine the number of bytes in the current batch of readahead pages and use it in btrfs. Also use the readahead_pos to get the offset. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Sterba Signed-off-by: David Sterba commit 183ebab766aff0ab17350c74eed1c0c6965687e1 Author: Wan Jiabing Date: Thu Apr 1 16:03:39 2021 +0800 btrfs: move forward declarations to the beginning of extent_io.h There are two forward declarations deep in extent_io.h, move them to the beginning and remove the duplicate one. Reviewed-by: Nikolay Borisov Signed-off-by: Wan Jiabing Reviewed-by: David Sterba Signed-off-by: David Sterba commit 894d137818723ae4bc4df36c2c19d5ae5ddd8c78 Author: Qu Wenruo Date: Thu Mar 25 15:14:45 2021 +0800 btrfs: subpage: add overview comments This patch adds an overview how btrfs subpage support works: - limitations - behavior - basic implementation points Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5a2c60752a5f49609ac00a36d3d129669a633529 Author: Qu Wenruo Date: Thu Mar 25 15:14:44 2021 +0800 btrfs: make set_btree_ioerr accept extent buffer and be subpage compatible Current set_btree_ioerr() only accepts @page parameter and grabs extent buffer from page::private. This works fine for sector size == PAGE_SIZE case, but not for subpage case. Add an extra parameter, @eb, for callers to pass extent buffer to this function, so that subpage code can reuse this function. And also add subpage special handling to update btrfs_subpage::error_bitmap. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0d27797e92cb72264b04a281f55cf9f4e9c4fded Author: Qu Wenruo Date: Thu Mar 25 15:14:43 2021 +0800 btrfs: make set/clear_extent_buffer_dirty() subpage compatible For set_extent_buffer_dirty() to support subpage sized metadata, just call btrfs_page_set_dirty() to handle both cases. For clear_extent_buffer_dirty(), it needs to clear the page dirty if and only if all extent buffers in the page range are no longer dirty. Also do the same for page error. This is pretty different from the existing clear_extent_buffer_dirty() routine, so add a new helper function, clear_subpage_extent_buffer_dirty() to do this for subpage metadata. Also since the main part of clearing page dirty code is still the same, extract that into btree_clear_page_dirty() so that it can be utilized for both cases. But there is a special race between set_extent_buffer_dirty() and clear_extent_buffer_dirty(), where we can clear the page dirty. [POSSIBLE RACE WINDOW] For the race window between clear_subpage_extent_buffer_dirty() and set_extent_buffer_dirty(), due to the fact that we can't call clear_page_dirty_for_io() under subpage spin lock, we can race like below: T1 (eb1 in the same page) | T2 (eb2 in the same page) -------------------------------+------------------------------ set_extent_buffer_dirty() | clear_extent_buffer_dirty() |- was_dirty = false; | |- clear_subpagE_extent_buffer_dirty() | | |- btrfs_clear_and_test_dirty() | | | Since eb2 is the last dirty page | | | we got: | | | last == true; | | | |- btrfs_page_set_dirty() | | | We set the page dirty and | | | subpage dirty bitmap | | | | |- if (last) | | | Since we don't have subpage lock | | | held, now @last is no longer | | | correct | | |- btree_clear_page_dirty() | | Now PageDirty == false, even if | | we have dirty_bitmap not zero. |- ASSERT(PageDirty()); | ^^^^ CRASH The solution here is to also lock the eb->pages[0] for subpage case of set_extent_buffer_dirty(), to prevent racing with clear_extent_buffer_dirty(). Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit b8f957715eae0490ceca13da43d43e9f1eba39ac Author: Qu Wenruo Date: Thu Mar 25 15:14:42 2021 +0800 btrfs: support page uptodate assertions in subpage mode There are quite some assert checks on page uptodate in extent buffer write accessors. They ensure the destination page is already uptodate. This is fine for regular sector size case, but not for subpage case, as for subpage we only mark the page uptodate if the page contains no hole and all its extent buffers are uptodate. So instead of checking PageUptodate(), for subpage case we check the uptodate bitmap of btrfs_subpage structure. To make the check more elegant, introduce a helper, assert_eb_page_uptodate() to do the check for both subpage and regular sector size cases. The following functions are involved: - write_extent_buffer_chunk_tree_uuid() - write_extent_buffer_fsid() - write_extent_buffer() - memzero_extent_buffer() - copy_extent_buffer() - extent_buffer_test_bit() - extent_buffer_bitmap_set() - extent_buffer_bitmap_clear() Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 1e5eb3d6a443d0271a5bb798e1bc94d549895efe Author: Qu Wenruo Date: Thu Mar 25 15:14:41 2021 +0800 btrfs: make alloc_extent_buffer() check subpage dirty bitmap In alloc_extent_buffer(), we make sure that the newly allocated page is never dirty. This is fine for sector size == PAGE_SIZE case, but for subpage it's possible that one extent buffer in the page is dirty, thus the whole page is marked dirty, and could cause false alert. To support subpage, call btrfs_page_test_dirty() to handle both cases. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit eca0f6f64349c412695315490c30cda1622fba9f Author: Qu Wenruo Date: Thu Mar 25 15:14:40 2021 +0800 btrfs: subpage: support metadata checksum calculation at write time Add a new helper, csum_dirty_subpage_buffers(), to iterate through all dirty extent buffers in one bvec. Also extract the code of calculating csum for one extent buffer into csum_one_extent_buffer(), so that both the existing csum_dirty_buffer() and the new csum_dirty_subpage_buffers() can reuse the same routine. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 139e8cd32592affac5a1e719c2be96ecb8405c19 Author: Qu Wenruo Date: Thu Mar 25 15:14:39 2021 +0800 btrfs: subpage: do more sanity checks on metadata page dirtying For btree_set_page_dirty(), we should also check the extent buffer sanity for subpage support. Unlike the regular sector size case, since one page can contain multiple extent buffers, we need to make sure there is at least one dirty extent buffer in the page. So this patch will iterate through the btrfs_subpage::dirty_bitmap to get the extent buffers, and check if any dirty extent buffer in the page range has EXTENT_BUFFER_DIRTY and proper refs. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3470da3b7d87fde4b9729d4e29c2dc074cd59c10 Author: Qu Wenruo Date: Thu Mar 25 15:14:38 2021 +0800 btrfs: subpage: introduce helpers for writeback status Introduces the following functions to handle subpage writeback status: - btrfs_subpage_set_writeback() - btrfs_subpage_clear_writeback() - btrfs_subpage_test_writeback() These helpers can only be called when the range is ensured to be inside the page. - btrfs_page_set_writeback() - btrfs_page_clear_writeback() - btrfs_page_test_writeback() These helpers can handle both regular sector size and subpage without problem. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit d8a5713e891dab2b0d13a82455df8ddf73fa9af4 Author: Qu Wenruo Date: Thu Mar 25 15:14:37 2021 +0800 btrfs: subpage: introduce helpers for dirty status Introduce the following functions to handle subpage dirty status: - btrfs_subpage_set_dirty() - btrfs_subpage_clear_dirty() - btrfs_subpage_test_dirty() These helpers can only be called when the range is ensured to be inside the page. - btrfs_page_set_dirty() - btrfs_page_clear_dirty() - btrfs_page_test_dirty() These helpers can handle both regular sector size and subpage without problem. Thus they would be used to replace PageDirty() related calls in later patches. There is one special point to note here, just like set_page_dirty() and clear_page_dirty_for_io(), btrfs_*page_set_dirty() and btrfs_*page_clear_dirty() must be called with page locked. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit d239bcb83b3eb43faf50a50948c4381eea6335bc Author: Qu Wenruo Date: Thu Mar 25 15:14:35 2021 +0800 btrfs: remove unnecessary variable shadowing in btrfs_invalidatepage() In btrfs_invalidatepage() we re-declare @tree variable as btrfs_ordered_inode_tree. Since it's only used to do the spinlock, we can grab it from inode directly, and remove the unnecessary declaration completely. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit ac5804eb8521bea5c1ec1b7e07ad87c469bf7437 Author: Qu Wenruo Date: Thu Mar 25 15:14:34 2021 +0800 btrfs: use min() to replace open-code in btrfs_invalidatepage() In btrfs_invalidatepage() we introduce a temporary variable, new_len, to update ordered->truncated_len. But we can use min() to replace it completely and no need for the variable. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit fc57ad8d338cbe78c3f7565f3c0812938835fad8 Author: Qu Wenruo Date: Thu Mar 25 15:14:33 2021 +0800 btrfs: add sysfs interface for supported sectorsize Export supported sector sizes in /sys/fs/btrfs/features/supported_sectorsizes. Currently all architectures have PAGE_SIZE, There's some disparity between read-only and read-write support but that will be unified in the future so there's only one file exporting the size. The read-only support for systems with 64K pages also works for 4K sector size. This new sysfs interface would help eg. mkfs.btrfs to print more accurate warnings about potentially incompatible option combinations. Reviewed-by: Anand Jain Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit ace75066ced9b9abf432049699d0f9f911d8e496 Author: Filipe Manana Date: Wed Mar 31 11:56:21 2021 +0100 btrfs: improve btree readahead for full send operations Currently a full send operation uses the standard btree readahead when iterating over the subvolume/snapshot btree, which despite bringing good performance benefits, it could be improved in a few aspects for use cases such as full send operations, which are guaranteed to visit every node and leaf of a btree, in ascending and sequential order. The limitations of that standard btree readahead implementation are the following: 1) It only triggers readahead for leaves that are physically close to the leaf being read, within a 64K range; 2) It only triggers readahead for the next or previous leaves if the leaf being read is not currently in memory; 3) It never triggers readahead for nodes. So add a new readahead mode that addresses all these points and use it for full send operations. The following test script was used to measure the improvement on a box using an average, consumer grade, spinning disk and with 16GiB of RAM: $ cat test.sh #!/bin/bash DEV=/dev/sdj MNT=/mnt/sdj MKFS_OPTIONS="--nodesize 16384" # default, just to be explicit MOUNT_OPTIONS="-o max_inline=2048" # default, just to be explicit mkfs.btrfs -f $MKFS_OPTIONS $DEV > /dev/null mount $MOUNT_OPTIONS $DEV $MNT # Create files with inline data to make it easier and faster to create # large btrees. add_files() { local total=$1 local start_offset=$2 local number_jobs=$3 local total_per_job=$(($total / $number_jobs)) echo "Creating $total new files using $number_jobs jobs" for ((n = 0; n < $number_jobs; n++)); do ( local start_num=$(($start_offset + $n * $total_per_job)) for ((i = 1; i <= $total_per_job; i++)); do local file_num=$((start_num + $i)) local file_path="$MNT/file_${file_num}" xfs_io -f -c "pwrite -S 0xab 0 2000" $file_path > /dev/null if [ $? -ne 0 ]; then echo "Failed creating file $file_path" break fi done ) & worker_pids[$n]=$! done wait ${worker_pids[@]} sync echo echo "btree node/leaf count: $(btrfs inspect-internal dump-tree -t 5 $DEV | egrep '^(node|leaf) ' | wc -l)" } initial_file_count=500000 add_files $initial_file_count 0 4 echo echo "Creating first snapshot..." btrfs subvolume snapshot -r $MNT $MNT/snap1 echo echo "Adding more files..." add_files $((initial_file_count / 4)) $initial_file_count 4 echo echo "Updating 1/50th of the initial files..." for ((i = 1; i < $initial_file_count; i += 50)); do xfs_io -c "pwrite -S 0xcd 0 20" $MNT/file_$i > /dev/null done echo echo "Creating second snapshot..." btrfs subvolume snapshot -r $MNT $MNT/snap2 umount $MNT echo 3 > /proc/sys/vm/drop_caches blockdev --flushbufs $DEV &> /dev/null hdparm -F $DEV &> /dev/null mount $MOUNT_OPTIONS $DEV $MNT echo echo "Testing full send..." start=$(date +%s) btrfs send $MNT/snap1 > /dev/null end=$(date +%s) echo echo "Full send took $((end - start)) seconds" umount $MNT The durations of the full send operation in seconds were the following: Before this change: 217 seconds After this change: 205 seconds (-5.7%) Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit eafa4fd0ad06074da8be4e28ff93b4dca9ffa407 Author: Filipe Manana Date: Wed Mar 31 11:55:50 2021 +0100 btrfs: fix exhaustion of the system chunk array due to concurrent allocations When we are running out of space for updating the chunk tree, that is, when we are low on available space in the system space info, if we have many task concurrently allocating block groups, via fallocate for example, many of them can end up all allocating new system chunks when only one is needed. In extreme cases this can lead to exhaustion of the system chunk array, which has a size limit of 2048 bytes, and results in a transaction abort with errno EFBIG, producing a trace in dmesg like the following, which was triggered on a PowerPC machine with a node/leaf size of 64K: [1359.518899] ------------[ cut here ]------------ [1359.518980] BTRFS: Transaction aborted (error -27) [1359.519135] WARNING: CPU: 3 PID: 16463 at ../fs/btrfs/block-group.c:1968 btrfs_create_pending_block_groups+0x340/0x3c0 [btrfs] [1359.519152] Modules linked in: (...) [1359.519239] Supported: Yes, External [1359.519252] CPU: 3 PID: 16463 Comm: stress-ng Tainted: G X 5.3.18-47-default #1 SLE15-SP3 [1359.519274] NIP: c008000000e36fe8 LR: c008000000e36fe4 CTR: 00000000006de8e8 [1359.519293] REGS: c00000056890b700 TRAP: 0700 Tainted: G X (5.3.18-47-default) [1359.519317] MSR: 800000000282b033 CR: 48008222 XER: 00000007 [1359.519356] CFAR: c00000000013e170 IRQMASK: 0 [1359.519356] GPR00: c008000000e36fe4 c00000056890b990 c008000000e83200 0000000000000026 [1359.519356] GPR04: 0000000000000000 0000000000000000 0000d52a3b027651 0000000000000007 [1359.519356] GPR08: 0000000000000003 0000000000000001 0000000000000007 0000000000000000 [1359.519356] GPR12: 0000000000008000 c00000063fe44600 000000001015e028 000000001015dfd0 [1359.519356] GPR16: 000000000000404f 0000000000000001 0000000000010000 0000dd1e287affff [1359.519356] GPR20: 0000000000000001 c000000637c9a000 ffffffffffffffe5 0000000000000000 [1359.519356] GPR24: 0000000000000004 0000000000000000 0000000000000100 ffffffffffffffc0 [1359.519356] GPR28: c000000637c9a000 c000000630e09230 c000000630e091d8 c000000562188b08 [1359.519561] NIP [c008000000e36fe8] btrfs_create_pending_block_groups+0x340/0x3c0 [btrfs] [1359.519613] LR [c008000000e36fe4] btrfs_create_pending_block_groups+0x33c/0x3c0 [btrfs] [1359.519626] Call Trace: [1359.519671] [c00000056890b990] [c008000000e36fe4] btrfs_create_pending_block_groups+0x33c/0x3c0 [btrfs] (unreliable) [1359.519729] [c00000056890ba90] [c008000000d68d44] __btrfs_end_transaction+0xbc/0x2f0 [btrfs] [1359.519782] [c00000056890bae0] [c008000000e309ac] btrfs_alloc_data_chunk_ondemand+0x154/0x610 [btrfs] [1359.519844] [c00000056890bba0] [c008000000d8a0fc] btrfs_fallocate+0xe4/0x10e0 [btrfs] [1359.519891] [c00000056890bd00] [c0000000004a23b4] vfs_fallocate+0x174/0x350 [1359.519929] [c00000056890bd50] [c0000000004a3cf8] ksys_fallocate+0x68/0xf0 [1359.519957] [c00000056890bda0] [c0000000004a3da8] sys_fallocate+0x28/0x40 [1359.519988] [c00000056890bdc0] [c000000000038968] system_call_exception+0xe8/0x170 [1359.520021] [c00000056890be20] [c00000000000cb70] system_call_common+0xf0/0x278 [1359.520037] Instruction dump: [1359.520049] 7d0049ad 40c2fff4 7c0004ac 71490004 40820024 2f83fffb 419e0048 3c620000 [1359.520082] e863bcb8 7ec4b378 48010d91 e8410018 <0fe00000> 3c820000 e884bcc8 7ec6b378 [1359.520122] ---[ end trace d6c186e151022e20 ]--- The following steps explain how we can end up in this situation: 1) Task A is at check_system_chunk(), either because it is allocating a new data or metadata block group, at btrfs_chunk_alloc(), or because it is removing a block group or turning a block group RO. It does not matter why; 2) Task A sees that there is not enough free space in the system space_info object, that is 'left' is < 'thresh'. And at this point the system space_info has a value of 0 for its 'bytes_may_use' counter; 3) As a consequence task A calls btrfs_alloc_chunk() in order to allocate a new system block group (chunk) and then reserves 'thresh' bytes in the chunk block reserve with the call to btrfs_block_rsv_add(). This changes the chunk block reserve's 'reserved' and 'size' counters by an amount of 'thresh', and changes the 'bytes_may_use' counter of the system space_info object from 0 to 'thresh'. Also during its call to btrfs_alloc_chunk(), we end up increasing the value of the 'total_bytes' counter of the system space_info object by 8MiB (the size of a system chunk stripe). This happens through the call chain: btrfs_alloc_chunk() create_chunk() btrfs_make_block_group() btrfs_update_space_info() 4) After it finishes the first phase of the block group allocation, at btrfs_chunk_alloc(), task A unlocks the chunk mutex; 5) At this point the new system block group was added to the transaction handle's list of new block groups, but its block group item, device items and chunk item were not yet inserted in the extent, device and chunk trees, respectively. That only happens later when we call btrfs_finish_chunk_alloc() through a call to btrfs_create_pending_block_groups(); Note that only when we update the chunk tree, through the call to btrfs_finish_chunk_alloc(), we decrement the 'reserved' counter of the chunk block reserve as we COW/allocate extent buffers, through: btrfs_alloc_tree_block() btrfs_use_block_rsv() btrfs_block_rsv_use_bytes() And the system space_info's 'bytes_may_use' is decremented everytime we allocate an extent buffer for COW operations on the chunk tree, through: btrfs_alloc_tree_block() btrfs_reserve_extent() find_free_extent() btrfs_add_reserved_bytes() If we end up COWing less chunk btree nodes/leaves than expected, which is the typical case since the amount of space we reserve is always pessimistic to account for the worst possible case, we release the unused space through: btrfs_create_pending_block_groups() btrfs_trans_release_chunk_metadata() btrfs_block_rsv_release() block_rsv_release_bytes() btrfs_space_info_free_bytes_may_use() But before task A gets into btrfs_create_pending_block_groups()... 6) Many other tasks start allocating new block groups through fallocate, each one does the first phase of block group allocation in a serialized way, since btrfs_chunk_alloc() takes the chunk mutex before calling check_system_chunk() and btrfs_alloc_chunk(). However before everyone enters the final phase of the block group allocation, that is, before calling btrfs_create_pending_block_groups(), new tasks keep coming to allocate new block groups and while at check_system_chunk(), the system space_info's 'bytes_may_use' keeps increasing each time a task reserves space in the chunk block reserve. This means that eventually some other task can end up not seeing enough free space in the system space_info and decide to allocate yet another system chunk. This may repeat several times if yet more new tasks keep allocating new block groups before task A, and all the other tasks, finish the creation of the pending block groups, which is when reserved space in excess is released. Eventually this can result in exhaustion of system chunk array in the superblock, with btrfs_add_system_chunk() returning EFBIG, resulting later in a transaction abort. Even when we don't reach the extreme case of exhausting the system array, most, if not all, unnecessarily created system block groups end up being unused since when finishing creation of the first pending system block group, the creation of the following ones end up not needing to COW nodes/leaves of the chunk tree, so we never allocate and deallocate from them, resulting in them never being added to the list of unused block groups - as a consequence they don't get deleted by the cleaner kthread - the only exceptions are if we unmount and mount the filesystem again, which adds any unused block groups to the list of unused block groups, if a scrub is run, which also adds unused block groups to the unused list, and under some circumstances when using a zoned filesystem or async discard, which may also add unused block groups to the unused list. So fix this by: *) Tracking the number of reserved bytes for the chunk tree per transaction, which is the sum of reserved chunk bytes by each transaction handle currently being used; *) When there is not enough free space in the system space_info, if there are other transaction handles which reserved chunk space, wait for some of them to complete in order to have enough excess reserved space released, and then try again. Otherwise proceed with the creation of a new system chunk. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit b7a7a8346378d7ddb35e02bdb81cf6a6fbe366af Author: Filipe Manana Date: Tue Mar 23 18:39:49 2021 +0000 btrfs: make reflinks respect O_SYNC O_DSYNC and S_SYNC flags If we reflink to or from a file opened with O_SYNC/O_DSYNC or to/from a file that has the S_SYNC attribute set, we totally ignore that and do not durably persist the reflink changes. Since a reflink can change the data readable from a file (and mtime/ctime, or a file size), it makes sense to durably persist (fsync) the source and destination files/ranges. This was previously discussed at: https://lore.kernel.org/linux-btrfs/20200903035225.GJ6090@magnolia/ The recently introduced test case generic/628, from fstests, exercises these scenarios and currently fails without this change. So make sure we fsync the source and destination files/ranges when either of them was opened with O_SYNC/O_DSYNC or has the S_SYNC attribute set, just like XFS already does. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit bb05b298af8b2330db2b39971bf0029798e7ad59 Author: Arnd Bergmann Date: Tue Mar 23 15:31:19 2021 +0100 btrfs: zoned: bail out in btrfs_alloc_chunk for bad input gcc complains that the ctl->max_chunk_size member might be used uninitialized when none of the three conditions for initializing it in init_alloc_chunk_ctl_policy_zoned() are true: In function ‘init_alloc_chunk_ctl_policy_zoned’, inlined from ‘init_alloc_chunk_ctl’ at fs/btrfs/volumes.c:5023:3, inlined from ‘btrfs_alloc_chunk’ at fs/btrfs/volumes.c:5340:2: include/linux/compiler-gcc.h:48:45: error: ‘ctl.max_chunk_size’ may be used uninitialized [-Werror=maybe-uninitialized] 4998 | ctl->max_chunk_size = min(limit, ctl->max_chunk_size); | ^~~ fs/btrfs/volumes.c: In function ‘btrfs_alloc_chunk’: fs/btrfs/volumes.c:5316:32: note: ‘ctl’ declared here 5316 | struct alloc_chunk_ctl ctl; | ^~~ If we ever get into this condition, something is seriously wrong, as validity is checked in the callers btrfs_alloc_chunk init_alloc_chunk_ctl init_alloc_chunk_ctl_policy_zoned so the same logic as in init_alloc_chunk_ctl_policy_regular() and a few other places should be applied. This avoids both further data corruption, and the compile-time warning. Fixes: 1cd6121f2a38 ("btrfs: zoned: implement zoned chunk allocator") Signed-off-by: Arnd Bergmann Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3227788cd369d734d2d3cd94f8af7536b60fa552 Author: BingJing Chang Date: Thu Mar 25 09:56:22 2021 +0800 btrfs: fix a potential hole punching failure In commit d77815461f04 ("btrfs: Avoid trucating page or punching hole in a already existed hole."), existing holes can be skipped by calling find_first_non_hole() to adjust start and len. However, if the given len is invalid and large, when an EXTENT_MAP_HOLE extent is found, len will not be set to zero because (em->start + em->len) is less than (start + len). Then the ret will be 1 but len will not be set to 0. The propagated non-zero ret will result in fallocate failure. In the while-loop of btrfs_replace_file_extents(), len is not updated every time before it calls find_first_non_hole(). That is, after btrfs_drop_extents() successfully drops the last non-hole file extent, it may fail with ENOSPC when attempting to drop a file extent item representing a hole. The problem can happen. After it calls find_first_non_hole(), the cur_offset will be adjusted to be larger than or equal to end. However, since the len is not set to zero, the break-loop condition (ret && !len) will not be met. After it leaves the while-loop, fallocate will return 1, which is an unexpected return value. We're not able to construct a reproducible way to let btrfs_drop_extents() fail with ENOSPC after it drops the last non-hole file extent but with remaining holes left. However, it's quite easy to fix. We just need to update and check the len every time before we call find_first_non_hole(). To make the while loop more readable, we also pull the variable updates to the bottom of loop like this: while (cur_offset < end) { ... // update cur_offset & len // advance cur_offset & len in hole-punching case if needed } Reported-by: Robbie Ko Fixes: d77815461f04 ("btrfs: Avoid trucating page or punching hole in a already existed hole.") CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Robbie Ko Reviewed-by: Chung-Chiang Cheng Reviewed-by: Filipe Manana Signed-off-by: BingJing Chang Signed-off-by: David Sterba commit e75f9fd194090e69c5ffd856ba89160683d343da Author: Naohiro Aota Date: Wed Mar 24 23:23:11 2021 +0900 btrfs: zoned: move log tree node allocation out of log_root_tree->log_mutex Commit 6e37d2459941 ("btrfs: zoned: fix deadlock on log sync") pointed out a deadlock warning and removed mutex_{lock,unlock} of fs_info::tree_root->log_mutex. While it looks like it always cause a deadlock, we didn't see actual deadlock in fstests runs. The reason is log_root_tree->log_mutex != fs_info->tree_root->log_mutex, not taking the same lock. So, the warning was actually a false-positive. Since btrfs_alloc_log_tree_node() is protected only by fs_info->tree_root->log_mutex, we can (and should) move the code out of the lock scope of log_root_tree->log_mutex and silence the warning. Fixes: 6e37d2459941 ("btrfs: zoned: fix deadlock on log sync") Reviewed-by: Filipe Manana Reviewed-by: Johannes Thumshirn Signed-off-by: Naohiro Aota Signed-off-by: David Sterba commit 2cdb3909c9e95879b6fa63a49caaa3b8824f1cb8 Author: Josef Bacik Date: Wed Mar 24 09:44:21 2021 -0400 btrfs: use percpu_read_positive instead of sum_positive for need_preempt Looking at perf data for a fio workload I noticed that we were spending a pretty large chunk of time (around 5%) doing percpu_counter_sum() in need_preemptive_reclaim. This is silly, as we only want to know if we have more ordered than delalloc to see if we should be counting the delayed items in our threshold calculation. Change this to percpu_read_positive() to avoid the overhead. I ran this through fsperf to validate the changes, obviously the latency numbers in dbench and fio are quite jittery, so take them as you wish, but overall the improvements on throughput, iops, and bw are all positive. Each test was run two times, the given value is the average of both runs for their respective column. btrfs ssd normal test results bufferedrandwrite16g results metric baseline current diff ========================================================== write_io_kbytes 16777216 16777216 0.00% read_clat_ns_p99 0 0 0.00% write_bw_bytes 1.04e+08 1.05e+08 1.12% read_iops 0 0 0.00% write_clat_ns_p50 13888 11840 -14.75% read_io_kbytes 0 0 0.00% read_io_bytes 0 0 0.00% write_clat_ns_p99 35008 29312 -16.27% read_bw_bytes 0 0 0.00% elapsed 170 167 -1.76% write_lat_ns_min 4221.50 3762.50 -10.87% sys_cpu 39.65 35.37 -10.79% write_lat_ns_max 2.67e+10 2.50e+10 -6.63% read_lat_ns_min 0 0 0.00% write_iops 25270.10 25553.43 1.12% read_lat_ns_max 0 0 0.00% read_clat_ns_p50 0 0 0.00% dbench60 results metric baseline current diff ================================================== qpathinfo 11.12 12.73 14.52% throughput 416.09 445.66 7.11% flush 3485.63 1887.55 -45.85% qfileinfo 0.70 1.92 173.86% ntcreatex 992.60 695.76 -29.91% qfsinfo 2.43 3.71 52.48% close 1.67 3.14 88.09% sfileinfo 66.54 105.20 58.10% rename 809.23 619.59 -23.43% find 16.88 15.46 -8.41% unlink 820.54 670.86 -18.24% writex 3375.20 2637.91 -21.84% deltree 386.33 449.98 16.48% readx 3.43 3.41 -0.60% mkdir 0.05 0.03 -38.46% lockx 0.26 0.26 -0.76% unlockx 0.81 0.32 -60.33% dio4kbs16threads results metric baseline current diff ================================================================ write_io_kbytes 5249676 3357150 -36.05% read_clat_ns_p99 0 0 0.00% write_bw_bytes 89583501.50 57291192.50 -36.05% read_iops 0 0 0.00% write_clat_ns_p50 242688 263680 8.65% read_io_kbytes 0 0 0.00% read_io_bytes 0 0 0.00% write_clat_ns_p99 15826944 36732928 132.09% read_bw_bytes 0 0 0.00% elapsed 61 61 0.00% write_lat_ns_min 42704 42095 -1.43% sys_cpu 5.27 3.45 -34.52% write_lat_ns_max 7.43e+08 9.27e+08 24.71% read_lat_ns_min 0 0 0.00% write_iops 21870.97 13987.11 -36.05% read_lat_ns_max 0 0 0.00% read_clat_ns_p50 0 0 0.00% randwrite2xram results metric baseline current diff ================================================================ write_io_kbytes 24831972 28876262 16.29% read_clat_ns_p99 0 0 0.00% write_bw_bytes 83745273.50 92182192.50 10.07% read_iops 0 0 0.00% write_clat_ns_p50 13952 11648 -16.51% read_io_kbytes 0 0 0.00% read_io_bytes 0 0 0.00% write_clat_ns_p99 50176 52992 5.61% read_bw_bytes 0 0 0.00% elapsed 314 332 5.73% write_lat_ns_min 5920.50 5127 -13.40% sys_cpu 7.82 7.35 -6.07% write_lat_ns_max 5.27e+10 3.88e+10 -26.44% read_lat_ns_min 0 0 0.00% write_iops 20445.62 22505.42 10.07% read_lat_ns_max 0 0 0.00% read_clat_ns_p50 0 0 0.00% untarfirefox results metric baseline current diff ============================================== elapsed 47.41 47.40 -0.03% Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit e2b84217f344c41f824d68a07bd3531e19a6c12b Author: Filipe Manana Date: Fri Mar 26 13:14:41 2021 +0000 btrfs: update outdated comment at btrfs_replace_file_extents() There is a comment at btrfs_replace_file_extents() that mentions that we set the full sync flag on an inode when cloning into a file with a size greater than or equals to 16MiB, through try_release_extent_mapping() when we truncate the page cache after replacing file extents during a clone operation. That is not true anymore since commit 5e548b32018d96 ("btrfs: do not set the full sync flag on the inode during page release"), so update the comment to remove that part and rephrase it slightly to make it more clear why the full sync flag is set at btrfs_replace_file_extents(). Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 0c0218e9a6cb2042cb8d00e8ae3956ff60f3ee29 Author: Filipe Manana Date: Tue Mar 16 16:54:13 2021 +0000 btrfs: update outdated comment at btrfs_orphan_cleanup() btrfs_orphan_cleanup() has a comment referring to find_dead_roots, but function does not exists since commit cb517eabba4f10 ("Btrfs: cleanup the similar code of the fs root read"). What we use now to find and load dead roots is btrfs_find_orphan_roots(). So update the comment and make it a bit more detailed about why we can not delete an orphan item for a root. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit ffbc10a144313d49d588e7e8a005294bad3b807b Author: Filipe Manana Date: Thu Mar 11 14:31:13 2021 +0000 btrfs: update debug message when checking seq number of a delayed ref We used to encode two different numbers in the tree mod log counter used for sequence numbers, one in the upper 32 bits and the other one in the lower 32 bits. However that is no longer the case, we stopped doing that since commit fcebe4562dec83 ("Btrfs: rework qgroup accounting"). So update the debug message at btrfs_check_delayed_seq to stop extracting the two 32 bits counters and print instead the 64 bits sequence numbers. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 4bae788075107efcad1d95aeca9084e40477c6b0 Author: Filipe Manana Date: Thu Mar 11 14:31:12 2021 +0000 btrfs: add and use helper to get lowest sequence number for the tree mod log There are two places outside the tree mod log module that extract the lowest sequence number of the tree mod log. These places end up duplicating code and open coding the logic and internal implementation details of the tree mod log. So add a helper to the tree mod log module and header that returns the lowest sequence number or 0 if there aren't any tree mod log users at the moment. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit ffe1d039d7ad4ffe53b110065c1c67dca0b9bfb6 Author: Filipe Manana Date: Thu Mar 11 14:31:11 2021 +0000 btrfs: remove unnecessary leaf check at btrfs_tree_mod_log_free_eb() At btrfs_tree_mod_log_free_eb() we check if we are dealing with a leaf, and if so, return immediately and do nothing. However this check can be removed, because after it we call tree_mod_need_log(), which returns false when given an extent buffer that corresponds to a leaf. So just remove the leaf check and pass the extent buffer to tree_mod_need_log(). Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 888dd183390d733734c855e2fa97103762c737c9 Author: Filipe Manana Date: Thu Mar 11 14:31:10 2021 +0000 btrfs: use the new bit BTRFS_FS_TREE_MOD_LOG_USERS at btrfs_free_tree_block() Instead of exposing implementation details of the tree mod log to check if there are active tree mod log users at btrfs_free_tree_block(), use the new bit BTRFS_FS_TREE_MOD_LOG_USERS for fs_info->flags instead. This way extent-tree.c does not need to known about any of the internals of the tree mod log and avoids taking a lock unnecessarily as well. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit bc03f39ec3c18454b624cd753b536fdb790f18f0 Author: Filipe Manana Date: Thu Mar 11 14:31:09 2021 +0000 btrfs: use a bit to track the existence of tree mod log users The tree modification log functions are called very frequently, basically they are called every time a btree is modified (a pointer added or removed to a node, a new root for a btree is set, etc). Because of that, to avoid heavy lock contention on the lock that protects the list of tree mod log users, we have checks that test the emptiness of the list with a full memory barrier before the checks, so that when there are no tree mod log users we avoid taking the lock. Replace the memory barrier and list emptiness check with a test for a new bit set at fs_info->flags. This bit is used to indicate when there are tree mod log users, set whenever a user is added to the list and cleared when the last user is removed from the list. This makes the intention a bit more obvious and possibly more efficient (assuming test_bit() may be cheaper than a full memory barrier on some architectures). Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 406808ab2f0ba3dfb01ca591f55173af8f8d2c66 Author: Filipe Manana Date: Thu Mar 11 14:31:08 2021 +0000 btrfs: use booleans where appropriate for the tree mod log functions Several functions of the tree modification log use integers as booleans, so change them to use booleans instead, making their use more clear. Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit f3a84ccd28d0b04da0358cf1289706f3469ff9ad Author: Filipe Manana Date: Thu Mar 11 14:31:07 2021 +0000 btrfs: move the tree mod log code into its own file The tree modification log, which records modifications done to btrees, is quite large and currently spread all over ctree.c, which is a huge file already. To make things better organized, move all that code into its own separate source and header files. Functions and definitions that are used outside of the module (mostly by ctree.c) are renamed so that they start with a "btrfs_" prefix. Everything else remains unchanged. This makes it easier to go over the tree modification log code every time I need to go read it to fix a bug. Reviewed-by: Anand Jain Signed-off-by: Filipe Manana Reviewed-by: David Sterba [ minor comment updates ] Signed-off-by: David Sterba commit 9a002d531b30bfe81d900f61a5ca955a85fab0e6 Author: Ira Weiny Date: Tue Feb 16 18:48:26 2021 -0800 btrfs: integrity-checker: convert block context kmap's to kmap_local_page btrfsic_read_block() (which calls kmap()) and btrfsic_release_block_ctx() (which calls kunmap()) are always called within a single thread of execution. Therefore the mappings created within these calls can be a thread local mapping. Convert the kmap() of bloc_ctx->pagev to kmap_local_page(). Luckily the unmap loops backwards through the array pointer so no adjustment needs to be made to the unmapping order. Signed-off-by: Ira Weiny Reviewed-by: David Sterba Signed-off-by: David Sterba commit 3e037efdbd72799d94afa6e0fcef5ff70359a895 Author: Ira Weiny Date: Tue Feb 16 18:48:25 2021 -0800 btrfs: integrity-checker: use kmap_local_page in __btrfsic_submit_bio Again there is an array of pointers which must be unmapped in the correct order. Convert the kmap()'s to kmap_local_page() and adjust the unmapping to work backwards through the unmapping loop. Signed-off-by: Ira Weiny Reviewed-by: David Sterba Signed-off-by: David Sterba commit 94a0b58d2d3b92c72fbf1b97d9129e470c1d2175 Author: Ira Weiny Date: Tue Feb 16 18:48:24 2021 -0800 btrfs: raid56: convert kmaps to kmap_local_page These kmaps are thread local and don't need to be atomic. So they can use the more efficient kmap_local_page(). However, the mapping of pages in the stripes and the additional parity and qstripe pages are a bit trickier because the unmapping must occur in the opposite order from the mapping. Furthermore, the pointer array in __raid_recover_end_io() may get reordered. Convert these calls to kmap_local_page() taking care to reverse the unmappings of any page arrays as well as being careful with the mappings of any special pages such as the parity and qstripe pages. Signed-off-by: Ira Weiny Reviewed-by: David Sterba Signed-off-by: David Sterba commit 58c1a35cd52268ae1524b3ff5eac9fa2414e6efc Author: Ira Weiny Date: Tue Feb 16 18:48:23 2021 -0800 btrfs: convert kmap to kmap_local_page, simple cases Use a simple coccinelle script to help convert the most common kmap()/kunmap() patterns to kmap_local_page()/kunmap_local(). Note that some kmaps which were caught by this script needed to be handled by hand because of the strict unmapping order of kunmap_local() so they are not included in this patch. But this script got us started. There's another temp variable added for the final length write to the first page so it does not interfere with cpage_out that is used for mapping other pages. The development of this patch was aided by the follow script: // // SPDX-License-Identifier: GPL-2.0-only // Find kmap and replace with kmap_local_page then mark kunmap // // Confidence: Low // Copyright: (C) 2021 Intel Corporation // URL: http://coccinelle.lip6.fr/ @ catch_all @ expression e, e2; @@ ( -kmap(e) +kmap_local_page(e) ) ... ( -kunmap(...) +kunmap_local() ) // Signed-off-by: Ira Weiny Reviewed-by: David Sterba Signed-off-by: David Sterba commit cea628008fc8c6c9c7b53902f6659e040f33c790 Author: Johannes Thumshirn Date: Tue Mar 16 19:04:01 2021 +0900 btrfs: remove duplicated in_range() macro The in_range() macro is defined twice in btrfs' source, once in ctree.h and once in misc.h. Remove the definition in ctree.h and include misc.h in the files depending on it. Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba commit 209ecbb8585bf6fd8d68ae8bafd8a8223fb41a60 Author: Filipe Manana Date: Tue Feb 23 12:08:49 2021 +0000 btrfs: remove stale comment and logic from btrfs_inode_in_log() Currently btrfs_inode_in_log() checks the list of modified extents of the inode, and has a comment mentioning why, as it used to be necessary to make sure if we did something like the following: mmap write range A mmap write range B msync range A (ranged fsync) msync range B (ranged fsync) we ended up with both ranges being logged. If we did not check it, then the second fsync would do nothing because btrfs_inode_in_log() would return true. This was added in 125c4cf9f37c98 ("Btrfs: set inode's logged_trans/last_log_commit after ranged fsync") and test case generic/325 from fstests exercises that scenario. However, as of commit 487781796d3022 ("btrfs: make fast fsyncs wait only for writeback"), every ranged fsync is now turned into a full ranged fsync (operates on the range from 0 to LLONG_MAX), so it is now pointless to test of emptiness of the list of modified extents, and the comment is clearly outdated. So just remove the comment and list emptiness check, while also changing the function's return type to be a boolean instead of an integer. In case one day we get support for ranged fsyncs again, it will be easy to notice the check is necessary again, because it will make generic/325 always fail. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit bc0939fcfab0d7efb2ed12896b1af3d819954a14 Author: Filipe Manana Date: Tue Feb 23 12:08:48 2021 +0000 btrfs: fix race between marking inode needs to be logged and log syncing We have a race between marking that an inode needs to be logged, either at btrfs_set_inode_last_trans() or at btrfs_page_mkwrite(), and between btrfs_sync_log(). The following steps describe how the race happens. 1) We are at transaction N; 2) Inode I was previously fsynced in the current transaction so it has: inode->logged_trans set to N; 3) The inode's root currently has: root->log_transid set to 1 root->last_log_commit set to 0 Which means only one log transaction was committed to far, log transaction 0. When a log tree is created we set ->log_transid and ->last_log_commit of its parent root to 0 (at btrfs_add_log_tree()); 4) One more range of pages is dirtied in inode I; 5) Some task A starts an fsync against some other inode J (same root), and so it joins log transaction 1. Before task A calls btrfs_sync_log()... 6) Task B starts an fsync against inode I, which currently has the full sync flag set, so it starts delalloc and waits for the ordered extent to complete before calling btrfs_inode_in_log() at btrfs_sync_file(); 7) During ordered extent completion we have btrfs_update_inode() called against inode I, which in turn calls btrfs_set_inode_last_trans(), which does the following: spin_lock(&inode->lock); inode->last_trans = trans->transaction->transid; inode->last_sub_trans = inode->root->log_transid; inode->last_log_commit = inode->root->last_log_commit; spin_unlock(&inode->lock); So ->last_trans is set to N and ->last_sub_trans set to 1. But before setting ->last_log_commit... 8) Task A is at btrfs_sync_log(): - it increments root->log_transid to 2 - starts writeback for all log tree extent buffers - waits for the writeback to complete - writes the super blocks - updates root->last_log_commit to 1 It's a lot of slow steps between updating root->log_transid and root->last_log_commit; 9) The task doing the ordered extent completion, currently at btrfs_set_inode_last_trans(), then finally runs: inode->last_log_commit = inode->root->last_log_commit; spin_unlock(&inode->lock); Which results in inode->last_log_commit being set to 1. The ordered extent completes; 10) Task B is resumed, and it calls btrfs_inode_in_log() which returns true because we have all the following conditions met: inode->logged_trans == N which matches fs_info->generation && inode->last_subtrans (1) <= inode->last_log_commit (1) && inode->last_subtrans (1) <= root->last_log_commit (1) && list inode->extent_tree.modified_extents is empty And as a consequence we return without logging the inode, so the existing logged version of the inode does not point to the extent that was written after the previous fsync. It should be impossible in practice for one task be able to do so much progress in btrfs_sync_log() while another task is at btrfs_set_inode_last_trans() right after it reads root->log_transid and before it reads root->last_log_commit. Even if kernel preemption is enabled we know the task at btrfs_set_inode_last_trans() can not be preempted because it is holding the inode's spinlock. However there is another place where we do the same without holding the spinlock, which is in the memory mapped write path at: vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf) { (...) BTRFS_I(inode)->last_trans = fs_info->generation; BTRFS_I(inode)->last_sub_trans = BTRFS_I(inode)->root->log_transid; BTRFS_I(inode)->last_log_commit = BTRFS_I(inode)->root->last_log_commit; (...) So with preemption happening after setting ->last_sub_trans and before setting ->last_log_commit, it is less of a stretch to have another task do enough progress at btrfs_sync_log() such that the task doing the memory mapped write ends up with ->last_sub_trans and ->last_log_commit set to the same value. It is still a big stretch to get there, as the task doing btrfs_sync_log() has to start writeback, wait for its completion and write the super blocks. So fix this in two different ways: 1) For btrfs_set_inode_last_trans(), simply set ->last_log_commit to the value of ->last_sub_trans minus 1; 2) For btrfs_page_mkwrite() only set the inode's ->last_sub_trans, just like we do for buffered and direct writes at btrfs_file_write_iter(), which is all we need to make sure multiple writes and fsyncs to an inode in the same transaction never result in an fsync missing that the inode changed and needs to be logged. Turn this into a helper function and use it both at btrfs_page_mkwrite() and at btrfs_file_write_iter() - this also fixes the problem that at btrfs_page_mkwrite() we were setting those fields without the protection of the inode's spinlock. This is an extremely unlikely race to happen in practice. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 885f46d87f29a94eafe3cc707d5c4dea2be248f3 Author: Filipe Manana Date: Tue Feb 23 12:08:47 2021 +0000 btrfs: fix race between memory mapped writes and fsync When doing an fsync we flush all delalloc, lock the inode (VFS lock), flush any new delalloc that might have been created before taking the lock and then wait either for the ordered extents to complete or just for the writeback to complete (depending on whether the full sync flag is set or not). We then start logging the inode and assume that while we are doing it no one else is touching the inode's file extent items (or adding new ones). That is generally true because all operations that modify an inode acquire the inode's lock first, including buffered and direct IO writes. However there is one exception: memory mapped writes, which do not and can not acquire the inode's lock. This can cause two types of issues: ending up logging file extent items with overlapping ranges, which is detected by the tree checker and will result in aborting the transaction when starting writeback for a log tree's extent buffers, or a silent corruption where we log a version of the file that never existed. Scenario 1 - logging overlapping extents The following steps explain how we can end up with file extents items with overlapping ranges in a log tree due to a race between a fsync and memory mapped writes: 1) Task A starts an fsync on inode X, which has the full sync runtime flag set. First it starts by flushing all delalloc for the inode; 2) Task A then locks the inode and flushes any other delalloc that might have been created after the previous flush and waits for all ordered extents to complete; 3) In the inode's root we have the following leaf: Leaf N, generation == current transaction id: --------------------------------------------------------- | (...) [ file extent item, offset 640K, length 128K ] | --------------------------------------------------------- The last file extent item in leaf N covers the file range from 640K to 768K; 4) Task B does a memory mapped write for the page corresponding to the file range from 764K to 768K; 5) Task A starts logging the inode. At copy_inode_items_to_log() it uses btrfs_search_forward() to search for leafs modified in the current transaction that contain items for the inode. It finds leaf N and copies all the inode items from that leaf into the log tree. Now the log tree has a copy of the last file extent item from leaf N. At the end of the while loop at copy_inode_items_to_log(), we have the minimum key set to: min_key.objectid = min_key.type = BTRFS_EXTENT_DATA_KEY min_key.offset = 640K Then we increment the key's offset by 1 so that the next call to btrfs_search_forward() leaves us at the first key greater than the key we just processed. But before btrfs_search_forward() is called again... 6) Dellaloc for the page at offset 764K, dirtied by task B, is started. It can be started for several reasons: - The async reclaim task is attempting to satisfy metadata or data reservation requests, and it has reached a point where it decided to flush delalloc; - Due to memory pressure the VMM triggers writeback of dirty pages; - The system call sync_file_range(2) is called from user space. 7) When the respective ordered extent completes, it trims the length of the existing file extent item for file offset 640K from 128K to 124K, and a new file extent item is added with a key offset of 764K and a length of 4K; 8) Task A calls btrfs_search_forward(), which returns us a path pointing to the leaf (can be leaf N or some other) containing the new file extent item for file offset 764K. We end up copying this item to the log tree, which overlaps with the last copied file extent item, which covers the file range from 640K to 768K. When writeback is triggered for log tree's extent buffers, the issue will be detected by the tree checker which will dump a trace and an error message on dmesg/syslog. If the writeback is triggered when syncing the log, which typically is, then we also end up aborting the current transaction. This is the same type of problem fixed in 0c713cbab6200b ("Btrfs: fix race between ranged fsync and writeback of adjacent ranges"). Scenario 2 - logging a version of the file that never existed This scenario only happens when using the NO_HOLES feature and results in a silent corruption, in the sense that is not detectable by 'btrfs check' or the tree checker: 1) We have an inode I with a size of 1M and two file extent items, one covering an extent with disk_bytenr == X for the file range [0, 512K) and another one covering another extent with disk_bytenr == Y for the file range [512K, 1M); 2) A hole is punched for the file range [512K, 1M); 3) Task A starts an fsync of inode I, which has the full sync runtime flag set. It starts by flushing all existing delalloc, locks the inode (VFS lock), starts any new delalloc that might have been created before taking the lock and waits for all ordered extents to complete; 4) Some other task does a memory mapped write for the page corresponding to the file range [640K, 644K) for example; 5) Task A then logs all items of the inode with the call to copy_inode_items_to_log(); 6) In the meanwhile delalloc for the range [640K, 644K) is started. It can be started for several reasons: - The async reclaim task is attempting to satisfy metadata or data reservation requests, and it has reached a point where it decided to flush delalloc; - Due to memory pressure the VMM triggers writeback of dirty pages; - The system call sync_file_range(2) is called from user space. 7) The ordered extent for the range [640K, 644K) completes and a file extent item for that range is added to the subvolume tree, pointing to a 4K extent with a disk_bytenr == Z; 8) Task A then calls btrfs_log_holes(), to scan for implicit holes in the subvolume tree. It finds two implicit holes: - one for the file range [512K, 640K) - one for the file range [644K, 1M) As a result we end up neither logging a hole for the range [640K, 644K) nor logging the file extent item with a disk_bytenr == Z. This means that if we have a power failure and replay the log tree we end up getting the following file extent layout: [ disk_bytenr X ] [ hole ] [ disk_bytenr Y ] [ hole ] 0 512K 512K 640K 640K 644K 644K 1M Which does not corresponding to any layout the file ever had before the power failure. The only two valid layouts would be: [ disk_bytenr X ] [ hole ] 0 512K 512K 1M and [ disk_bytenr X ] [ hole ] [ disk_bytenr Z ] [ hole ] 0 512K 512K 640K 640K 644K 644K 1M This can be fixed by serializing memory mapped writes with fsync, and there are two ways to do it: 1) Make a fsync lock the entire file range, from 0 to (u64)-1 / LLONG_MAX in the inode's io tree. This prevents the race but also blocks any reads during the duration of the fsync, which has a negative impact for many common workloads; 2) Make an fsync write lock the i_mmap_lock semaphore in the inode. This semaphore was recently added by Josef's patch set: btrfs: add a i_mmap_lock to our inode btrfs: cleanup inode_lock/inode_unlock uses btrfs: exclude mmaps while doing remap btrfs: exclude mmap from happening during all fallocate operations and is used to solve races between memory mapped writes and clone/dedupe/fallocate. This also makes us have the same behaviour we have regarding other writes (buffered and direct IO) and fsync - block them while the inode logging is in progress. This change uses the second approach due to the performance impact of the first one. Signed-off-by: Filipe Manana Signed-off-by: David Sterba commit 8d9b4a162a37cee384e2d872f3673be386351e2d Author: Josef Bacik Date: Wed Feb 10 17:14:36 2021 -0500 btrfs: exclude mmap from happening during all fallocate operations There's a small window where a deadlock can happen between fallocate and mmap. This is described in detail by Filipe: """ When doing a fallocate operation we lock the inode, flush delalloc within the target range, wait for any ordered extents to complete and then lock the file range. Before we lock the range and after we flush delalloc, there is a time window where another task can come in and do a memory mapped write for a page within the fallocate range. This means that after fallocate locks the range, there can be a dirty page in the range. More often than not, this does not cause any problem. The exception is when we are low on available metadata space, because an fallocate operation needs to start a transaction while holding the file range locked, either through btrfs_prealloc_file_range() or through the call to btrfs_fallocate_update_isize(). If that's the case, we can end up in a deadlock. The following list of steps explains how that happens: 1) A fallocate operation starts, locks the inode, flushes delalloc in the range and waits for ordered extents in the range to complete; 2) Before the fallocate task locks the file range, another task does a memory mapped write for a page in the fallocate target range. This is possible since memory mapped writes do not (and can not) lock the inode; 3) The fallocate task locks the file range. At this point there is one dirty page in the range (due to the memory mapped write); 4) When the fallocate task attempts to start a transaction, it blocks when attempting to reserve metadata space, since we are low on available metadata space. Before blocking (wait on its reservation ticket), it starts the async reclaim task (if not running already); 5) The async reclaim task is not able to release space through any other means, so it decides to flush delalloc for inodes with dirty pages. It finds that the inode used in the fallocate operation has a dirty page and therefore queues a job (fs_info->flush_workers workqueue) to flush delalloc for that inode and waits on that job to complete; 6) The flush job blocks when attempting to lock the file range because it is currently locked by the fallocate task; 7) The fallocate task keeps waiting for its metadata reservation, waiting for a wakeup on its reservation ticket. The async reclaim task is waiting on the flush job, which in turn is waiting for locking the file range that is currently locked by the fallocate task. So unless some other task is able to release enough metadata space, for example an ordered extent for some other inode completes, we end up in a deadlock between all these tasks. When this happens stack traces like the following show up in dmesg/syslog: INFO: task kworker/u16:11:1810830 blocked for more than 120 seconds. Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u16:11 state:D stack: 0 pid:1810830 ppid: 2 flags:0x00004000 Workqueue: btrfs-flush_delalloc btrfs_work_helper [btrfs] Call Trace: __schedule+0x5d1/0xcf0 schedule+0x45/0xe0 lock_extent_bits+0x1e6/0x2d0 [btrfs] ? finish_wait+0x90/0x90 btrfs_invalidatepage+0x32c/0x390 [btrfs] ? __mod_memcg_state+0x8e/0x160 __extent_writepage+0x2d4/0x400 [btrfs] extent_write_cache_pages+0x2b2/0x500 [btrfs] ? lock_release+0x20e/0x4c0 ? trace_hardirqs_on+0x1b/0xf0 extent_writepages+0x43/0x90 [btrfs] ? lock_acquire+0x1a3/0x490 do_writepages+0x43/0xe0 ? __filemap_fdatawrite_range+0xa4/0x100 __filemap_fdatawrite_range+0xc5/0x100 btrfs_run_delalloc_work+0x17/0x40 [btrfs] btrfs_work_helper+0xf1/0x600 [btrfs] process_one_work+0x24e/0x5e0 worker_thread+0x50/0x3b0 ? process_one_work+0x5e0/0x5e0 kthread+0x153/0x170 ? kthread_mod_delayed_work+0xc0/0xc0 ret_from_fork+0x22/0x30 INFO: task kworker/u16:1:2426217 blocked for more than 120 seconds. Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u16:1 state:D stack: 0 pid:2426217 ppid: 2 flags:0x00004000 Workqueue: events_unbound btrfs_async_reclaim_metadata_space [btrfs] Call Trace: __schedule+0x5d1/0xcf0 ? kvm_clock_read+0x14/0x30 ? wait_for_completion+0x81/0x110 schedule+0x45/0xe0 schedule_timeout+0x30c/0x580 ? _raw_spin_unlock_irqrestore+0x3c/0x60 ? lock_acquire+0x1a3/0x490 ? try_to_wake_up+0x7a/0xa20 ? lock_release+0x20e/0x4c0 ? lock_acquired+0x199/0x490 ? wait_for_completion+0x81/0x110 wait_for_completion+0xab/0x110 start_delalloc_inodes+0x2af/0x390 [btrfs] btrfs_start_delalloc_roots+0x12d/0x250 [btrfs] flush_space+0x24f/0x660 [btrfs] btrfs_async_reclaim_metadata_space+0x1bb/0x480 [btrfs] process_one_work+0x24e/0x5e0 worker_thread+0x20f/0x3b0 ? process_one_work+0x5e0/0x5e0 kthread+0x153/0x170 ? kthread_mod_delayed_work+0xc0/0xc0 ret_from_fork+0x22/0x30 (...) several tasks waiting for the inode lock held by the fallocate task below (...) RIP: 0033:0x7f61efe73fff Code: Unable to access opcode bytes at RIP 0x7f61efe73fd5. RSP: 002b:00007ffc3371bbe8 EFLAGS: 00000202 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007ffc3371bea0 RCX: 00007f61efe73fff RDX: 00000000ffffff9c RSI: 0000560fbd5d90a0 RDI: 00000000ffffff9c RBP: 00007ffc3371beb0 R08: 0000000000000001 R09: 0000000000000003 R10: 0000560fbd5d7ad0 R11: 0000000000000202 R12: 0000000000000001 R13: 000000000000005e R14: 00007ffc3371bea0 R15: 00007ffc3371beb0 task:fdm-stress state:D stack: 0 pid:2508243 ppid:2508153 flags:0x00000000 Call Trace: __schedule+0x5d1/0xcf0 ? _raw_spin_unlock_irqrestore+0x3c/0x60 schedule+0x45/0xe0 __reserve_bytes+0x4a4/0xb10 [btrfs] ? finish_wait+0x90/0x90 btrfs_reserve_metadata_bytes+0x29/0x190 [btrfs] btrfs_block_rsv_add+0x1f/0x50 [btrfs] start_transaction+0x2d1/0x760 [btrfs] btrfs_replace_file_extents+0x120/0x930 [btrfs] ? btrfs_fallocate+0xdcf/0x1260 [btrfs] btrfs_fallocate+0xdfb/0x1260 [btrfs] ? filename_lookup+0xf1/0x180 vfs_fallocate+0x14f/0x440 ioctl_preallocate+0x92/0xc0 do_vfs_ioctl+0x66b/0x750 ? __do_sys_newfstat+0x53/0x60 __x64_sys_ioctl+0x62/0xb0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 """ Fix this by disallowing mmaps from happening while we're doing any of the fallocate operations on this inode. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 8c99516a8cdd15fe6b64a12297a5c7f52dcee9a5 Author: Josef Bacik Date: Wed Feb 10 17:14:35 2021 -0500 btrfs: exclude mmaps while doing remap Darrick reported a potential issue to me where we could allow mmap writes after validating a page range matched in the case of dedupe. Generally we rely on lock page -> lock extent with the ordered flush to protect us, but this is done after we check the pages because we use the generic helpers, so we could modify the page in between doing the check and locking the range. There also exists a deadlock, as described by Filipe """ When cloning a file range, we lock the inodes, flush any delalloc within the respective file ranges, wait for any ordered extents and then lock the file ranges in both inodes. This means that right after we flush delalloc and before we lock the file ranges, memory mapped writes can come in and dirty pages in the file ranges of the clone operation. Most of the time this is harmless and causes no problems. However, if we are low on available metadata space, we can later end up in a deadlock when starting a transaction to replace file extent items. This happens if when allocating metadata space for the transaction, we need to wait for the async reclaim thread to release space and the reclaim thread needs to flush delalloc for the inode that got the memory mapped write and has its range locked by the clone task. Basically what happens is the following: 1) A clone operation locks inodes A and B, flushes delalloc for both inodes in the respective file ranges and waits for any ordered extents in those ranges to complete; 2) Before the clone task locks the file ranges, another task does a memory mapped write (which does not lock the inode) for one of the inodes of the clone operation. So now we have a dirty page in one of the ranges used by the clone operation; 3) The clone operation locks the file ranges for inodes A and B; 4) Later, when iterating over the file extents of inode A, the clone task attempts to start a transaction. There's not enough available free metadata space, so the async reclaim task is started (if not running already) and we wait for someone to wake us up on our reservation ticket; 5) The async reclaim task is not able to release space by any other means and decides to flush delalloc for the inode of the clone operation; 6) The workqueue job used to flush the inode blocks when starting delalloc for the inode, since the file range is currently locked by the clone task; 7) But the clone task is waiting on its reservation ticket and the async reclaim task is waiting on the flush job to complete, which can't progress since the clone task has the file range locked. So unless some other task is able to release space, for example an ordered extent for some other inode completes, we have a deadlock between all these tasks; When this happens stack traces like the following show up in dmesg/syslog: INFO: task kworker/u16:11:1810830 blocked for more than 120 seconds. Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u16:11 state:D stack: 0 pid:1810830 ppid: 2 flags:0x00004000 Workqueue: btrfs-flush_delalloc btrfs_work_helper [btrfs] Call Trace: __schedule+0x5d1/0xcf0 schedule+0x45/0xe0 lock_extent_bits+0x1e6/0x2d0 [btrfs] ? finish_wait+0x90/0x90 btrfs_invalidatepage+0x32c/0x390 [btrfs] ? __mod_memcg_state+0x8e/0x160 __extent_writepage+0x2d4/0x400 [btrfs] extent_write_cache_pages+0x2b2/0x500 [btrfs] ? lock_release+0x20e/0x4c0 ? trace_hardirqs_on+0x1b/0xf0 extent_writepages+0x43/0x90 [btrfs] ? lock_acquire+0x1a3/0x490 do_writepages+0x43/0xe0 ? __filemap_fdatawrite_range+0xa4/0x100 __filemap_fdatawrite_range+0xc5/0x100 btrfs_run_delalloc_work+0x17/0x40 [btrfs] btrfs_work_helper+0xf1/0x600 [btrfs] process_one_work+0x24e/0x5e0 worker_thread+0x50/0x3b0 ? process_one_work+0x5e0/0x5e0 kthread+0x153/0x170 ? kthread_mod_delayed_work+0xc0/0xc0 ret_from_fork+0x22/0x30 INFO: task kworker/u16:1:2426217 blocked for more than 120 seconds. Tainted: G B W 5.10.0-rc4-btrfs-next-73 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u16:1 state:D stack: 0 pid:2426217 ppid: 2 flags:0x00004000 Workqueue: events_unbound btrfs_async_reclaim_metadata_space [btrfs] Call Trace: __schedule+0x5d1/0xcf0 ? kvm_clock_read+0x14/0x30 ? wait_for_completion+0x81/0x110 schedule+0x45/0xe0 schedule_timeout+0x30c/0x580 ? _raw_spin_unlock_irqrestore+0x3c/0x60 ? lock_acquire+0x1a3/0x490 ? try_to_wake_up+0x7a/0xa20 ? lock_release+0x20e/0x4c0 ? lock_acquired+0x199/0x490 ? wait_for_completion+0x81/0x110 wait_for_completion+0xab/0x110 start_delalloc_inodes+0x2af/0x390 [btrfs] btrfs_start_delalloc_roots+0x12d/0x250 [btrfs] flush_space+0x24f/0x660 [btrfs] btrfs_async_reclaim_metadata_space+0x1bb/0x480 [btrfs] process_one_work+0x24e/0x5e0 worker_thread+0x20f/0x3b0 ? process_one_work+0x5e0/0x5e0 kthread+0x153/0x170 ? kthread_mod_delayed_work+0xc0/0xc0 ret_from_fork+0x22/0x30 (...) several other tasks blocked on inode locks held by the clone task below (...) RIP: 0033:0x7f61efe73fff Code: Unable to access opcode bytes at RIP 0x7f61efe73fd5. RSP: 002b:00007ffc3371bbe8 EFLAGS: 00000202 ORIG_RAX: 000000000000013c RAX: ffffffffffffffda RBX: 00007ffc3371bea0 RCX: 00007f61efe73fff RDX: 00000000ffffff9c RSI: 0000560fbd604690 RDI: 00000000ffffff9c RBP: 00007ffc3371beb0 R08: 0000000000000002 R09: 0000560fbd5d75f0 R10: 0000560fbd5d81f0 R11: 0000000000000202 R12: 0000000000000002 R13: 000000000000000b R14: 00007ffc3371bea0 R15: 00007ffc3371beb0 task: fdm-stress state:D stack: 0 pid:2508234 ppid:2508153 flags:0x00004000 Call Trace: __schedule+0x5d1/0xcf0 ? _raw_spin_unlock_irqrestore+0x3c/0x60 schedule+0x45/0xe0 __reserve_bytes+0x4a4/0xb10 [btrfs] ? finish_wait+0x90/0x90 btrfs_reserve_metadata_bytes+0x29/0x190 [btrfs] btrfs_block_rsv_add+0x1f/0x50 [btrfs] start_transaction+0x2d1/0x760 [btrfs] btrfs_replace_file_extents+0x120/0x930 [btrfs] ? lock_release+0x20e/0x4c0 btrfs_clone+0x3e4/0x7e0 [btrfs] ? btrfs_lookup_first_ordered_extent+0x8e/0x100 [btrfs] btrfs_clone_files+0xf6/0x150 [btrfs] btrfs_remap_file_range+0x324/0x3d0 [btrfs] do_clone_file_range+0xd4/0x1f0 vfs_clone_file_range+0x4d/0x230 ? lock_release+0x20e/0x4c0 ioctl_file_clone+0x8f/0xc0 do_vfs_ioctl+0x342/0x750 __x64_sys_ioctl+0x62/0xb0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 """ Fix both of these issues by excluding mmaps from happening we are doing any sort of remap, which prevents this race completely. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Signed-off-by: David Sterba commit 64708539cd23b31d0f235a2c12a0cf782f95908a Author: Josef Bacik Date: Wed Feb 10 17:14:34 2021 -0500 btrfs: use btrfs_inode_lock/btrfs_inode_unlock inode lock helpers A few places we intermix btrfs_inode_lock with a inode_unlock, and some places we just use inode_lock/inode_unlock instead of btrfs_inode_lock. None of these places are using this incorrectly, but as we adjust some of these callers it would be nice to keep everything consistent, so convert everybody to use btrfs_inode_lock/btrfs_inode_unlock. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 8318ba79eeeb1ab69bea1cc4386d5a185abc0cb8 Author: Josef Bacik Date: Wed Feb 10 17:14:33 2021 -0500 btrfs: add a i_mmap_lock to our inode We need to be able to exclude page_mkwrite from happening concurrently with certain operations. To facilitate this, add a i_mmap_lock to our inode, down_read() it in our mkwrite, and add a new ILOCK flag to indicate that we want to take the i_mmap_lock as well. I used pahole to check the size of the btrfs_inode, the sizes are as follows no lockdep: before: 1120 (3 per 4k page) after: 1160 (3 per 4k page) lockdep: before: 2072 (1 per 4k page) after: 2224 (1 per 4k page) We're slightly larger but it doesn't change how many objects we can fit per page. Reviewed-by: Filipe Manana Signed-off-by: Josef Bacik Reviewed-by: David Sterba Signed-off-by: David Sterba commit 5e295768a0c6086901250b6be22f14eb01232ba1 Author: Goldwyn Rodrigues Date: Wed Mar 3 06:55:37 2021 -0600 btrfs: remove mirror argument from btrfs_csum_verify_data() The parameter mirror is not used and does not make sense for checksum verification of the given bio. Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit 6e65ae762900dc885f44ef5e1f887224368b10f3 Author: Goldwyn Rodrigues Date: Thu Mar 4 09:06:25 2021 -0600 btrfs: remove force argument from run_delalloc_nocow() force_cow can be calculated from inode and does not need to be passed as an argument. This simplifies run_delalloc_nocow() call from btrfs_run_delalloc_range() A new function, should_nocow() checks if the range should be NOCOWed or not. The function returns true iff either BTRFS_INODE_NODATA or BTRFS_INODE_PREALLOC, but is not a defrag extent. Tested-by: Johannes Thumshirn Reviewed-by: Johannes Thumshirn Signed-off-by: Goldwyn Rodrigues Reviewed-by: David Sterba Signed-off-by: David Sterba commit d6ade6894edaf5279fa1a7274b38ed6e7d4377f5 Author: Nikolay Borisov Date: Tue Mar 2 12:44:40 2021 +0200 btrfs: don't opencode extent_changeset_free Reviewed-by: Johannes Thumshirn Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 7000babddac651d6038200ee847d50a7f930a2cc Author: Jiapeng Chong Date: Wed Mar 3 17:45:28 2021 +0800 btrfs: assign proper values to a bool variable in dev_extent_hole_check_zoned Fix the following coccicheck warnings: ./fs/btrfs/volumes.c:1462:10-11: WARNING: return of 0/1 in function 'dev_extent_hole_check_zoned' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2ce73c633573f1472dc6367668cab836a57f6a55 Author: Filipe Manana Date: Mon Mar 1 09:26:43 2021 +0000 btrfs: add btree read ahead for incremental send operations Currently we do not do btree read ahead when doing an incremental send, however we know that we will read and process any node or leaf in the send root that has a generation greater than the generation of the parent root. So triggering read ahead for such nodes and leafs is beneficial for an incremental send. This change does that, triggers read ahead of any node or leaf in the send root that has a generation greater then the generation of the parent root. As for the parent root, no readahead is triggered because knowing in advance which nodes/leaves are going to be read is not so linear and there's often a large time window between visiting nodes or leaves of the parent root. So I opted to leave out the parent root, and triggering read ahead for its nodes/leaves seemed to have not made significant difference. The following test script was used to measure the improvement on a box using an average, consumer grade, spinning disk and with 16GiB of ram: $ cat test.sh #!/bin/bash DEV=/dev/sdj MNT=/mnt/sdj MKFS_OPTIONS="--nodesize 16384" # default, just to be explicit MOUNT_OPTIONS="-o max_inline=2048" # default, just to be explicit mkfs.btrfs -f $MKFS_OPTIONS $DEV > /dev/null mount $MOUNT_OPTIONS $DEV $MNT # Create files with inline data to make it easier and faster to create # large btrees. add_files() { local total=$1 local start_offset=$2 local number_jobs=$3 local total_per_job=$(($total / $number_jobs)) echo "Creating $total new files using $number_jobs jobs" for ((n = 0; n < $number_jobs; n++)); do ( local start_num=$(($start_offset + $n * $total_per_job)) for ((i = 1; i <= $total_per_job; i++)); do local file_num=$((start_num + $i)) local file_path="$MNT/file_${file_num}" xfs_io -f -c "pwrite -S 0xab 0 2000" $file_path > /dev/null if [ $? -ne 0 ]; then echo "Failed creating file $file_path" break fi done ) & worker_pids[$n]=$! done wait ${worker_pids[@]} sync echo echo "btree node/leaf count: $(btrfs inspect-internal dump-tree -t 5 $DEV | egrep '^(node|leaf) ' | wc -l)" } initial_file_count=500000 add_files $initial_file_count 0 4 echo echo "Creating first snapshot..." btrfs subvolume snapshot -r $MNT $MNT/snap1 echo echo "Adding more files..." add_files $((initial_file_count / 4)) $initial_file_count 4 echo echo "Updating 1/50th of the initial files..." for ((i = 1; i < $initial_file_count; i += 50)); do xfs_io -c "pwrite -S 0xcd 0 20" $MNT/file_$i > /dev/null done echo echo "Creating second snapshot..." btrfs subvolume snapshot -r $MNT $MNT/snap2 umount $MNT echo 3 > /proc/sys/vm/drop_caches blockdev --flushbufs $DEV &> /dev/null hdparm -F $DEV &> /dev/null mount $MOUNT_OPTIONS $DEV $MNT echo echo "Testing full send..." start=$(date +%s) btrfs send $MNT/snap1 > /dev/null end=$(date +%s) echo echo "Full send took $((end - start)) seconds" umount $MNT echo 3 > /proc/sys/vm/drop_caches blockdev --flushbufs $DEV &> /dev/null hdparm -F $DEV &> /dev/null mount $MOUNT_OPTIONS $DEV $MNT echo echo "Testing incremental send..." start=$(date +%s) btrfs send -p $MNT/snap1 $MNT/snap2 > /dev/null end=$(date +%s) echo echo "Incremental send took $((end - start)) seconds" umount $MNT Before this change, incremental send duration: with $initial_file_count == 200000: 51 seconds with $initial_file_count == 500000: 168 seconds After this change, incremental send duration: with $initial_file_count == 200000: 39 seconds (-26.7%) with $initial_file_count == 500000: 125 seconds (-29.4%) For $initial_file_count == 200000 there are 62600 nodes and leaves in the btree of the first snapshot, and 77759 nodes and leaves in the btree of the second snapshot. The root nodes were at level 2. While for $initial_file_count == 500000 there are 152476 nodes and leaves in the btree of the first snapshot, and 190511 nodes and leaves in the btree of the second snapshot. The root nodes were at level 2 as well. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 19358b154fcebc0f5a609c608e0023695889f9e6 Author: Filipe Manana Date: Mon Mar 1 09:26:42 2021 +0000 btrfs: add btree read ahead for full send operations When doing a full send we know that we are going to be reading every node and leaf of the send root, so we benefit from enabling read ahead for the btree. This change enables read ahead for full send operations only, incremental sends will have read ahead enabled in a different way by a separate patch. The following test script was used to measure the improvement on a box using an average, consumer grade, spinning disk and with 16GiB of RAM: $ cat test.sh #!/bin/bash DEV=/dev/sdj MNT=/mnt/sdj MKFS_OPTIONS="--nodesize 16384" # default, just to be explicit MOUNT_OPTIONS="-o max_inline=2048" # default, just to be explicit mkfs.btrfs -f $MKFS_OPTIONS $DEV > /dev/null mount $MOUNT_OPTIONS $DEV $MNT # Create files with inline data to make it easier and faster to create # large btrees. add_files() { local total=$1 local start_offset=$2 local number_jobs=$3 local total_per_job=$(($total / $number_jobs)) echo "Creating $total new files using $number_jobs jobs" for ((n = 0; n < $number_jobs; n++)); do ( local start_num=$(($start_offset + $n * $total_per_job)) for ((i = 1; i <= $total_per_job; i++)); do local file_num=$((start_num + $i)) local file_path="$MNT/file_${file_num}" xfs_io -f -c "pwrite -S 0xab 0 2000" $file_path > /dev/null if [ $? -ne 0 ]; then echo "Failed creating file $file_path" break fi done ) & worker_pids[$n]=$! done wait ${worker_pids[@]} sync echo echo "btree node/leaf count: $(btrfs inspect-internal dump-tree -t 5 $DEV | egrep '^(node|leaf) ' | wc -l)" } initial_file_count=500000 add_files $initial_file_count 0 4 echo echo "Creating first snapshot..." btrfs subvolume snapshot -r $MNT $MNT/snap1 echo echo "Adding more files..." add_files $((initial_file_count / 4)) $initial_file_count 4 echo echo "Updating 1/50th of the initial files..." for ((i = 1; i < $initial_file_count; i += 50)); do xfs_io -c "pwrite -S 0xcd 0 20" $MNT/file_$i > /dev/null done echo echo "Creating second snapshot..." btrfs subvolume snapshot -r $MNT $MNT/snap2 umount $MNT echo 3 > /proc/sys/vm/drop_caches blockdev --flushbufs $DEV &> /dev/null hdparm -F $DEV &> /dev/null mount $MOUNT_OPTIONS $DEV $MNT echo echo "Testing full send..." start=$(date +%s) btrfs send $MNT/snap1 > /dev/null end=$(date +%s) echo echo "Full send took $((end - start)) seconds" umount $MNT echo 3 > /proc/sys/vm/drop_caches blockdev --flushbufs $DEV &> /dev/null hdparm -F $DEV &> /dev/null mount $MOUNT_OPTIONS $DEV $MNT echo echo "Testing incremental send..." start=$(date +%s) btrfs send -p $MNT/snap1 $MNT/snap2 > /dev/null end=$(date +%s) echo echo "Incremental send took $((end - start)) seconds" umount $MNT Before this change, full send duration: with $initial_file_count == 200000: 165 seconds with $initial_file_count == 500000: 407 seconds After this change, full send duration: with $initial_file_count == 200000: 149 seconds (-10.2%) with $initial_file_count == 500000: 353 seconds (-14.2%) For $initial_file_count == 200000 there are 62600 nodes and leaves in the btree of the first snapshot, while for $initial_file_count == 500000 there are 152476 nodes and leaves. The roots were at level 2. Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba commit 98686ffc71f58191ab3f4069d9ae7eee60fb3889 Author: Nikolay Borisov Date: Mon Feb 22 18:40:47 2021 +0200 btrfs: simplify code flow in btrfs_delayed_inode_reserve_metadata btrfs_block_rsv_add can return only ENOSPC since it's called with NO_FLUSH modifier. This so simplify the logic in btrfs_delayed_inode_reserve_metadata to exploit this invariant. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba [ add assert and comment ] Signed-off-by: David Sterba commit 8e3c9d3cf8a449cdc4c9bd8a62ba7b5e4bd52972 Author: Nikolay Borisov Date: Mon Feb 22 18:40:46 2021 +0200 btrfs: remove btrfs_inode parameter from btrfs_delayed_inode_reserve_metadata It's only used for tracepoint to obtain the inode number, but we already have the ino from btrfs_delayed_node::inode_id. Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit ae396a3b7ad00c0730ef0d08916525acd3853af5 Author: Nikolay Borisov Date: Mon Feb 22 18:40:45 2021 +0200 btrfs: simplify commit logic in try_flush_qgroup It's no longer expected to call this function with an open transaction so all the workarounds concerning this can be removed. In fact it'll constitute a bug to call this function with a transaction already held so WARN in this case. Reviewed-by: Qu Wenruo Signed-off-by: Nikolay Borisov Signed-off-by: David Sterba commit e5ce9886904a1ed20c17bdc182c0faf5c341f00b Author: Anand Jain Date: Wed Feb 10 21:25:17 2021 -0800 btrfs: scrub: drop a few function declarations Drop function declarations at the beginning of the file scrub.c. These functions are defined before they are used in the same file and don't need forward declaration. No functional changes. Reviewed-by: Johannes Thumshirn Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit f4639636b6b89aafe6071906305cb2a117e91a8b Author: Anand Jain Date: Wed Feb 10 21:25:16 2021 -0800 btrfs: change return type to bool in btrfs_extent_readonly btrfs_extent_readonly() checks if the block group is readonly, the bool return type should be used. Reviewed-by: Johannes Thumshirn Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit 05947ae18692736c665be4dfa5bb39a54c6b98ae Author: Anand Jain Date: Wed Feb 10 21:25:15 2021 -0800 btrfs: unexport btrfs_extent_readonly() and make it static btrfs_extent_readonly() is used by can_nocow_extent() in inode.c. So move it from extent-tree.c to inode.c and declare it as static. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba commit b6e9f16c5fda08e4af8c675b71be580dac3286d6 Author: Nikolay Borisov Date: Wed Feb 17 15:12:50 2021 +0200 btrfs: replace open coded while loop with proper construct btrfs_inc_block_group_ro wants to ensure that the current transaction is not running dirty block groups, if it is it waits and loops again. That logic is currently implemented using a goto label. Actually using a proper do {} while() construct doesn't hurt readability nor does it introduce excessive nesting and makes the relevant code stand out by being encompassed in the loop construct. No functional changes. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 20bbf20e95a3a160feea45619b5113582b578d63 Author: Nikolay Borisov Date: Wed Feb 17 15:12:49 2021 +0200 btrfs: replace offset_in_entry with in_range No point in duplicating the functionality just use the generic helper that has the same semantics. Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit cca5de97aed7b789ca4fa45ee6a609914b5f4100 Author: Nikolay Borisov Date: Wed Feb 17 15:12:48 2021 +0200 btrfs: make find_desired_extent take btrfs_inode Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit bfc78479eba905368328dd25fb407a81eaf63a32 Author: Nikolay Borisov Date: Wed Feb 17 15:12:47 2021 +0200 btrfs: make btrfs_replace_file_extents take btrfs_inode Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba commit 0b3dcd131d5b02ab8e038e55fef243e51b06fe96 Author: Qu Wenruo Date: Thu Feb 11 16:14:05 2021 +0800 btrfs: fix comment for btrfs ordered extent flag bits There is small error in comment about BTRFS_ORDERED_* flags, added in commit 3c198fe06449 ("btrfs: rework the order of btrfs_ordered_extent::flags") but the fixup did not get merged in time. The 4 types are for ordered extent itself, not for direct io. Only 3 types support direct io, REGULAR/NOCOW/PREALLOC. Fix the comment to reflect that. Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba commit 2e9f02689e4d7f248b491171cabc7b3a33e421ee Merge: c914dbf88fa86 18674dee3cd65 Author: Mark Brown Date: Mon Apr 19 16:21:50 2021 +0100 Merge series "spi: stm32-qspi: Fix and update" from Patrice Chotard : From: Patrice Chotard Christophe Kerello (1): spi: stm32-qspi: fix pm_runtime usage_count counter Patrice Chotard (2): spi: stm32-qspi: Trigger DMA only if more than 4 bytes to transfer spi: stm32-qspi: Add dirmap support drivers/spi/spi-stm32-qspi.c | 106 +++++++++++++++++++++++++++-------- 1 file changed, 84 insertions(+), 22 deletions(-) -- 2.17.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 87143bfdb9f7ddc14b129fda610e114d29077596 Merge: e86a53fb64ed0 9726db36ed836 Author: Mark Brown Date: Mon Apr 19 16:21:45 2021 +0100 Merge series "ASoC: remove more cppcheck warnings" from Pierre-Louis Bossart : I missed those warnings in the previous rounds, they are mostly trivial and shouldn't change the behavior. Pierre-Louis Bossart (5): ASoC: soc-acpi: remove useless initialization ASoC: soc-core: fix signed/unsigned issue ASoC: soc-core: fix always-false condition ASoC: codecs: lpass-rx-macro: remove useless return ASoC: codecs: rt5682: clarify expression sound/soc/codecs/lpass-rx-macro.c | 2 -- sound/soc/codecs/rt5682.c | 2 +- sound/soc/soc-acpi.c | 2 +- sound/soc/soc-core.c | 7 +------ 4 files changed, 3 insertions(+), 10 deletions(-) -- 2.25.1 commit 6417554e3d34e238566b91e3e1632acb63a9cf29 Merge: 3060a15ccaed1 06ad53efeb496 Author: Arnd Bergmann Date: Mon Apr 19 17:15:50 2021 +0200 Merge tag 'qcom-dts-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt More Qualcomm DTS updates for 5.13 This adds CPUfreq, interconnect providers, IPC, remoteproc and IPA to the SDX55 platform and then adds board files for the Telit FN980 TLB and Thundercomm TurboX T55. * tag 'qcom-dts-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: sdx55: add IPA information ARM: dts: qcom: sdx55: Add basic devicetree support for Thundercomm T55 dt-bindings: arm: qcom: Add binding for Thundercomm T55 kit ARM: dts: qcom: sdx55: Add basic devicetree support for Telit FN980 TLB dt-bindings: arm: qcom: Add binding for Telit FN980 TLB board ARM: dts: qcom: sdx55: Add Modem remoteproc node ARM: dts: qcom: Fix node name for NAND controller node ARM: dts: qcom: sdx55: Add interconnect nodes ARM: dts: qcom: sdx55: Add SCM node dt-bindings: firmware: scm: Add compatible for SDX55 ARM: dts: qcom: sdx55: Add IMEM and PIL info region ARM: dts: qcom: sdx55: Add modem SMP2P node ARM: dts: qcom: sdx55: Add CPUFreq support ARM: dts: qcom: sdx55: Add support for APCS block ARM: dts: qcom: sdx55: Add support for A7 PLL clock Link: https://lore.kernel.org/r/20210419150956.860423-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 1b86cc7330895b11df0a7dc15fbbbef60be9f7bb Author: V Sujith Kumar Reddy Date: Tue Apr 6 22:03:30 2021 +0530 arm64: dts: qcom: sc7180: Update iommu property for simultaneous playback Update iommu property in lpass cpu node for supporting simultaneous playback on headset and speaker. Reviewed-by: Stephen Boyd Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/20210406163330.11996-1-srivasam@codeaurora.org Signed-off-by: Bjorn Andersson commit 108ec20b8c0a17c5447181a44346e92ae5f986d8 Author: Douglas Anderson Date: Mon Mar 15 13:39:31 2021 -0700 arm64: dts: qcom: sc7180: pompom: Add "dmic_clk_en" + sound model Match what's downstream for this board. Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Cc: Srinivasa Rao Mandadapu Cc: Ajit Pandey Cc: Judy Hsiao Cc: Cheng-Yi Chiang Cc: Stephen Boyd Cc: Matthias Kaehlcke Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210315133924.v2.2.If218189eff613a6c48ba12d75fad992377d8f181@changeid Signed-off-by: Bjorn Andersson commit a4c5ba1df10e3623c0f55140e757dd8386b25bc9 Author: Douglas Anderson Date: Mon Mar 15 13:39:30 2021 -0700 arm64: dts: qcom: sc7180: coachz: Add "dmic_clk_en" This was present downstream. Add upstream too. NOTE: upstream I managed to get some sort of halfway state and got one pinctrl entry in the coachz-r1 device tree. Remove that as part of this since it's now in the dtsi. Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Cc: Srinivasa Rao Mandadapu Cc: Ajit Pandey Cc: Judy Hsiao Cc: Cheng-Yi Chiang Cc: Stephen Boyd Cc: Matthias Kaehlcke Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210315133924.v2.1.I601a051cad7cfd0923e55b69ef7e5748910a6096@changeid Signed-off-by: Bjorn Andersson commit 3060a15ccaed1c24078d4bb46259cd169f7d37cc Author: Daniel Palmer Date: Sat Apr 17 10:10:15 2021 +0900 ARM: dts: mstar: Add a dts for M5Stack UnitV2 M5Stack are releasing a new widget based on the SigmaStar SSD202D. We have some support for the SSD202D so lets add a dts for it. Signed-off-by: Daniel Palmer Link: https://m5stack-store.myshopify.com/products/unitv2-ai-camera-gc2145 Link: https://lore.kernel.org/r/20210417011015.2105280-4-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit c5208ff7f6c2c907ebf22a33c0a53959d33ec87a Author: Daniel Palmer Date: Sat Apr 17 10:10:14 2021 +0900 dt-bindings: arm: mstar: Add compatible for M5Stack UnitV2 Add a compatible for the M5Stack UnitV2 that is based on the SigmaStar SSD202D (inifinity2m). Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20210417011015.2105280-3-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit f8d6fb74bbb7bb451d3f236b0b49d6fa43ed5f8b Author: Daniel Palmer Date: Sat Apr 17 10:10:13 2021 +0900 dt-bindings: vendor-prefixes: Add vendor prefix for M5Stack M5Stack make various modules for STEM, Makers, IoT. Their UnitV2 is based on a SigmaStar SSD202D SoC which we already have some minimal support for so add a prefix in preparation for UnitV2 board support. Signed-off-by: Daniel Palmer Link: https://m5stack.com/ Link: https://lore.kernel.org/r/20210417011015.2105280-2-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit f538437b315c85623816702fc926332ab06f0889 Author: Matthias Brugger Date: Fri Apr 16 16:39:23 2021 +0200 arm64: dts: mt8183: fix dtbs_check warning Fix unit names to make dtbs_check happy. Signed-off-by: Matthias Brugger Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210414144643.17435-2-matthias.bgg@kernel.org Link: https://lore.kernel.org/r/20210416143923.23406-3-matthias.bgg@kernel.org' Signed-off-by: Arnd Bergmann commit f9929b452ac1091fbcfdcb2cdaa362d9ada7470c Author: Matthias Brugger Date: Fri Apr 16 16:39:22 2021 +0200 arm64: dts: mt8183-pumpkin: fix dtbs_check warning Fix unit names to make dtbs_check happy. Signed-off-by: Matthias Brugger Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210414144643.17435-1-matthias.bgg@kernel.org Link: https://lore.kernel.org/r/20210416143923.23406-2-matthias.bgg@kernel.org' Signed-off-by: Arnd Bergmann commit 8c0bd213de32aa23bbdc930f2ac74731a32b8171 Merge: 41c39cfc841d3 6ce2c05b21189 Author: Arnd Bergmann Date: Mon Apr 19 16:32:34 2021 +0200 Merge tag 'memory-controller-drv-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.13, part two 1. Renesas RPC: fix possible NULL pointer. 2. Exynos5422 DMC: add proper error checking for clk_prepare. 3. Mediatek SMI: use device-links instead of explicit PM runtime calls. * tag 'memory-controller-drv-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: mtk-smi: Add device-link between smi-larb and smi-common memory: samsung: exynos5422-dmc: handle clk_set_parent() failure memory: renesas-rpc-if: fix possible NULL pointer dereference of resource Link: https://lore.kernel.org/r/20210415065514.7385-1-krzysztof.kozlowski@canonical.com Signed-off-by: Arnd Bergmann commit 59cda49ecf6c9a32fae4942420701b6e087204f6 Author: Amir Goldstein Date: Mon Mar 22 19:39:44 2021 +0200 shmem: allow reporting fanotify events with file handles on tmpfs Since kernel v5.1, fanotify_init(2) supports the flag FAN_REPORT_FID for identifying objects using file handle and fsid in events. fanotify_mark(2) fails with -ENODEV when trying to set a mark on filesystems that report null f_fsid in stasfs(2). Use the digest of uuid as f_fsid for tmpfs to uniquely identify tmpfs objects as best as possible and allow setting an fanotify mark that reports events with file handles on tmpfs. Link: https://lore.kernel.org/r/20210322173944.449469-3-amir73il@gmail.com Acked-by: Hugh Dickins Reviewed-by: Christian Brauner Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 9591c3a34f7722bd77f42c98d76fd5a5bad465f0 Author: Amir Goldstein Date: Mon Mar 22 19:39:43 2021 +0200 fs: introduce a wrapper uuid_to_fsid() Some filesystem's use a digest of their uuid for f_fsid. Create a simple wrapper for this open coded folding. Filesystems that have a non null uuid but use the block device number for f_fsid may also consider using this helper. [JK: Added missing asm/byteorder.h include] Link: https://lore.kernel.org/r/20210322173944.449469-2-amir73il@gmail.com Acked-by: Damien Le Moal Reviewed-by: Christian Brauner Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit c914dbf88fa8619602e0913e8a952a19631ed195 Author: Joe Burmeister Date: Mon Apr 19 14:06:31 2021 +0100 spi: Handle SPI device setup callback failure. If the setup callback failed, but the controller has auto_runtime_pm and set_cs, the setup failure could be missed. Signed-off-by: Joe Burmeister Link: https://lore.kernel.org/r/20210419130631.4586-1-joe.burmeister@devtank.co.uk Signed-off-by: Mark Brown commit d347b4aaa1a042ea528e385d9070b74c77a14321 Author: David Bauer Date: Fri Apr 16 21:59:56 2021 +0200 spi: sync up initial chipselect state When initially probing the SPI slave device, the call for disabling an SPI device without the SPI_CS_HIGH flag is not applied, as the condition for checking whether or not the state to be applied equals the one currently set evaluates to true. This however might not necessarily be the case, as the chipselect might be active. Add a force flag to spi_set_cs which allows to override this early exit condition. Set it to false everywhere except when called from spi_setup to sync up the initial CS state. Fixes commit d40f0b6f2e21 ("spi: Avoid setting the chip select if we don't need to") Signed-off-by: David Bauer Link: https://lore.kernel.org/r/20210416195956.121811-1-mail@david-bauer.net Signed-off-by: Mark Brown commit 18674dee3cd651279eb3d9ba789fe483ddfe1137 Author: Patrice Chotard Date: Mon Apr 19 14:15:41 2021 +0200 spi: stm32-qspi: Add dirmap support Add stm32_qspi_dirmap_read() and stm32_qspi_dirmap_create() to get dirmap support. Update the exec_op callback which doens't allow anymore memory map access. Memory map access are only available through the dirmap_read callback. Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20210419121541.11617-4-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit f3530f26f8e9869e6e8c3370cf6f61330774fe2b Author: Patrice Chotard Date: Mon Apr 19 14:15:40 2021 +0200 spi: stm32-qspi: Trigger DMA only if more than 4 bytes to transfer In order to optimize accesses to spi flashes, trigger a DMA only if more than 4 bytes has to be transferred. DMA transfer preparation's cost becomes negligible above 4 bytes to transfer. Below this threshold, indirect transfer give more throughput. mtd_speedtest shows that page write throughtput increases : - from 779 to 853 KiB/s (~9.5%) with s25fl512s SPI-NOR. - from 5283 to 5666 KiB/s (~7.25%) with Micron SPI-NAND. Signed-off-by: Christophe Kerello Signed-off-by: Patrice Chotard Link: https://lore.kernel.org/r/20210419121541.11617-3-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit 102e9d1936569d43f55dd1ea89be355ad207143c Author: Christophe Kerello Date: Mon Apr 19 14:15:39 2021 +0200 spi: stm32-qspi: fix pm_runtime usage_count counter pm_runtime usage_count counter is not well managed. pm_runtime_put_autosuspend callback drops the usage_counter but this one has never been increased. Add pm_runtime_get_sync callback to bump up the usage counter. It is also needed to use pm_runtime_force_suspend and pm_runtime_force_resume APIs to handle properly the clock. Fixes: 9d282c17b023 ("spi: stm32-qspi: Add pm_runtime support") Signed-off-by: Christophe Kerello Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210419121541.11617-2-patrice.chotard@foss.st.com Signed-off-by: Mark Brown commit 24ae4cfaaaa22a4f293acd0c7d97804454b7e9fb Author: Ben Gardon Date: Thu Apr 1 16:37:34 2021 -0700 KVM: x86/mmu: Allow enabling/disabling dirty logging under MMU read lock To reduce lock contention and interference with page fault handlers, allow the TDP MMU functions which enable and disable dirty logging to operate under the MMU read lock. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-12-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 2db6f772b530eedcf69069e63dd7c4fdf05305fc Author: Ben Gardon Date: Thu Apr 1 16:37:33 2021 -0700 KVM: x86/mmu: Allow zapping collapsible SPTEs to use MMU read lock To reduce the impact of disabling dirty logging, change the TDP MMU function which zaps collapsible SPTEs to run under the MMU read lock. This way, page faults on zapped SPTEs can proceed in parallel with kvm_mmu_zap_collapsible_sptes. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-11-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 6103bc074048876794fa6d21fd8989331690ccbd Author: Ben Gardon Date: Thu Apr 1 16:37:32 2021 -0700 KVM: x86/mmu: Allow zap gfn range to operate under the mmu read lock To reduce lock contention and interference with page fault handlers, allow the TDP MMU function to zap a GFN range to operate under the MMU read lock. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-10-bgardon@google.com> Signed-off-by: Paolo Bonzini commit c0e64238ac53e8226e3fe72279e5e76253e85f88 Author: Ben Gardon Date: Thu Apr 1 16:37:31 2021 -0700 KVM: x86/mmu: Protect the tdp_mmu_roots list with RCU Protect the contents of the TDP MMU roots list with RCU in preparation for a future patch which will allow the iterator macro to be used under the MMU lock in read mode. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-9-bgardon@google.com> Signed-off-by: Paolo Bonzini commit fb10129335ca6cc7a229226b03f54394757d773d Author: Ben Gardon Date: Thu Apr 1 16:37:30 2021 -0700 KVM: x86/mmu: handle cmpxchg failure in kvm_tdp_mmu_get_root To reduce dependence on the MMU write lock, don't rely on the assumption that the atomic operation in kvm_tdp_mmu_get_root will always succeed. By not relying on that assumption, threads do not need to hold the MMU lock in write mode in order to take a reference on a TDP MMU root. In the root iterator, this change means that some roots might have to be skipped if they are found to have a zero refcount. This will still never happen as of this patch, but a future patch will need that flexibility to make the root iterator safe under the MMU read lock. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-8-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 11cccf5c04721c8a08f9d72a1a5e7281a4041d86 Author: Ben Gardon Date: Thu Apr 1 16:37:29 2021 -0700 KVM: x86/mmu: Make TDP MMU root refcount atomic In order to parallelize more operations for the TDP MMU, make the refcount on TDP MMU roots atomic, so that a future patch can allow multiple threads to take a reference on the root concurrently, while holding the MMU lock in read mode. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-7-bgardon@google.com> Signed-off-by: Paolo Bonzini commit cfc109979b3c879ea9df05e048bb83615964f3e3 Author: Ben Gardon Date: Thu Apr 1 16:37:28 2021 -0700 KVM: x86/mmu: Refactor yield safe root iterator Refactor the yield safe TDP MMU root iterator to be more amenable to changes in future commits which will allow it to be used under the MMU lock in read mode. Currently the iterator requires a complicated dance between the helper functions and different parts of the for loop which makes it hard to reason about. Moving all the logic into a single function simplifies the iterator substantially. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-6-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 2bdb3d84cebca2e3b482788615ff1559bc8cedb5 Author: Ben Gardon Date: Thu Apr 1 16:37:27 2021 -0700 KVM: x86/mmu: Merge TDP MMU put and free root kvm_tdp_mmu_put_root and kvm_tdp_mmu_free_root are always called together, so merge the functions to simplify TDP MMU root refcounting / freeing. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-5-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 4bba36d72bf95038727d091a64dcb524dccc5da1 Author: Ben Gardon Date: Thu Apr 1 16:37:26 2021 -0700 KVM: x86/mmu: use tdp_mmu_free_sp to free roots Minor cleanup to deduplicate the code used to free a struct kvm_mmu_page in the TDP MMU. No functional change intended. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-4-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 76eb54e7e717455b4c5b82cec5c879ea017610f5 Author: Ben Gardon Date: Thu Apr 1 16:37:25 2021 -0700 KVM: x86/mmu: Move kvm_mmu_(get|put)_root to TDP MMU The TDP MMU is almost the only user of kvm_mmu_get_root and kvm_mmu_put_root. There is only one use of put_root in mmu.c for the legacy / shadow MMU. Open code that one use and move the get / put functions to the TDP MMU so they can be extended in future commits. No functional change intended. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-3-bgardon@google.com> Signed-off-by: Paolo Bonzini commit 8ca6f063b73d3754213d009efb3df486c8fe52d2 Author: Ben Gardon Date: Thu Apr 1 16:37:24 2021 -0700 KVM: x86/mmu: Re-add const qualifier in kvm_tdp_mmu_zap_collapsible_sptes kvm_tdp_mmu_zap_collapsible_sptes unnecessarily removes the const qualifier from its memlsot argument, leading to a compiler warning. Add the const annotation and pass it to subsequent functions. Signed-off-by: Ben Gardon Message-Id: <20210401233736.638171-2-bgardon@google.com> Signed-off-by: Paolo Bonzini commit e1eed5847b09fe41d4db4b86f9d840aba869c905 Author: Sean Christopherson Date: Thu Apr 1 17:56:58 2021 -0700 KVM: x86/mmu: Allow yielding during MMU notifier unmap/zap, if possible Let the TDP MMU yield when unmapping a range in response to a MMU notification, if yielding is allowed by said notification. There is no reason to disallow yielding in this case, and in theory the range being invalidated could be quite large. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210402005658.3024832-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e86a53fb64ed0a4749eeac2eccc7a6412fd3c920 Author: Viorel Suman Date: Mon Apr 19 17:54:32 2021 +0800 ASoC: ak4458: check reset control status check the return value of ak4458_rstn_control. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1618826072-29344-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 9726db36ed83670be93d053e05e150308e3ce743 Author: Pierre-Louis Bossart Date: Fri Apr 16 14:11:44 2021 -0500 ASoC: codecs: rt5682: clarify expression cppcheck warning: sound/soc/codecs/rt5682.c:2404:42: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp << RT5682_PLL_M_BP_SFT | RT5682_PLL_RST)); ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210416191144.27006-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 36924a12c32021a098fec621fb5ea707a72cd5b5 Author: Pierre-Louis Bossart Date: Fri Apr 16 14:11:43 2021 -0500 ASoC: codecs: lpass-rx-macro: remove useless return cppcheck warning: sound/soc/codecs/lpass-rx-macro.c:1626:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/lpass-rx-macro.c:1623:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/lpass-rx-macro.c:1626:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210416191144.27006-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e2290daefef3afa08135a0a65d4f0ce7fe23d5c0 Author: Pierre-Louis Bossart Date: Fri Apr 16 14:11:42 2021 -0500 ASoC: soc-core: fix always-false condition cppcheck warning: sound/soc/soc-core.c:2784:6: style: Condition '!num_routes' is always false [knownConditionTrueFalse] if (!num_routes) { ^ sound/soc/soc-core.c:2777:17: note: Assuming that condition 'num_routes<0' is not redundant if (num_routes < 0 || num_routes & 1) { ^ sound/soc/soc-core.c:2783:2: note: Compound assignment '/=', assigned value is 0 num_routes /= 2; ^ sound/soc/soc-core.c:2784:6: note: Condition '!num_routes' is always false if (!num_routes) { ^ The documentation for of_property_count_string reads " * Returns the number of strings on * success, -EINVAL if the property does not exist, -ENODATA if property * does not have a value, and -EILSEQ if the string is not null-terminated * within the length of the property data. " Since the case for num_routes == 0 is not possible, let's remove this test. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210416191144.27006-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d3b47a888f0bc66a8590941cfa57ba015b288040 Author: Pierre-Louis Bossart Date: Fri Apr 16 14:11:41 2021 -0500 ASoC: soc-core: fix signed/unsigned issue cppcheck warning: sound/soc/soc-core.c:2237:13: warning: %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] } else if (sscanf(name, "%x-%x", &id1, &id2) == 2) { ^ sound/soc/soc-core.c:2237:13: warning: %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] } else if (sscanf(name, "%x-%x", &id1, &id2) == 2) { ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210416191144.27006-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 59ce3233a538fc21c5c59ff38cafd784cbcd6de0 Author: Pierre-Louis Bossart Date: Fri Apr 16 14:11:40 2021 -0500 ASoC: soc-acpi: remove useless initialization cppcheck warning: value that is never used. [unreadVariable] acpi_status status = AE_OK; ^ sound/soc/soc-acpi.c:37:21: style: Variable 'status' is assigned a Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210416191144.27006-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit cbd3d5ba46b68c033986a6087209930f001cbcca Author: Michael Ellerman Date: Mon Apr 19 22:24:32 2021 +1000 powerpc/fadump: Fix compile error since trap type change sfr reports that the allyesconfig build fails with: arch/powerpc/kernel/fadump.c: In function 'crash_fadump': arch/powerpc/kernel/fadump.c:731:28: error: 'INTERRUPT_SYSTEM_RESET' undeclared 731 | if (TRAP(&(fdh->regs)) == INTERRUPT_SYSTEM_RESET) { Add an include of interrupt.h to fix it. Fixes: 7153d4bf0b37 ("powerpc/traps: Enhance readability for trap types") Signed-off-by: Stephen Rothwell [mpe: Reformat change log] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210419191425.281dc58a@canb.auug.org.au commit 0ef3439cd80ba7770723edb0470d15815914bb62 Author: Maciej W. Rozycki Date: Wed Apr 14 12:38:28 2021 +0200 x86/build: Disable HIGHMEM64G selection for M486SX Fix a regression caused by making the 486SX separately selectable in Kconfig, for which the HIGHMEM64G setting has not been updated and therefore has become exposed as a user-selectable option for the M486SX configuration setting unlike with original M486 and all the other settings that choose non-PAE-enabled processors: High Memory Support > 1. off (NOHIGHMEM) 2. 4GB (HIGHMEM4G) 3. 64GB (HIGHMEM64G) choice[1-3?]: With the fix in place the setting is now correctly removed: High Memory Support > 1. off (NOHIGHMEM) 2. 4GB (HIGHMEM4G) choice[1-2?]: [ bp: Massage commit message. ] Fixes: 87d6021b8143 ("x86/math-emu: Limit MATH_EMULATION to 486SX compatibles") Signed-off-by: Maciej W. Rozycki Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org # v5.5+ Link: https://lkml.kernel.org/r/alpine.DEB.2.21.2104141221340.44318@angie.orcam.me.uk commit 010bfbe768f7ecc876ffba92db30432de4997e2a Author: Johannes Berg Date: Fri Apr 16 09:42:14 2021 +0200 cfg80211: scan: drop entry from hidden_list on overflow If we overflow the maximum number of BSS entries and free the new entry, drop it from any hidden_list that it may have been added to in the code above or in cfg80211_combine_bsses(). Reported-by: Dan Carpenter Link: https://lore.kernel.org/r/20210416094212.5de7d1676ad7.Ied283b0bc5f504845e7d6ab90626bdfa68bb3dc0@changeid Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg commit 2f5164447cdab6419edddde3a214f93a53aa4e60 Author: Johannes Berg Date: Fri Apr 9 12:40:24 2021 +0300 wireless: fix spelling of A-MSDU in HE capabilities In the HE capabilities, spell A-MSDU correctly, not "A-MDSU". Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.9e6ff1af1181.If6868bc6902ccd9a95c74c78f716c4b41473ef14@changeid Signed-off-by: Johannes Berg commit 1f851b8dfd76a0e91560247802dd25a4754753c7 Author: Johannes Berg Date: Fri Apr 9 12:40:20 2021 +0300 wireless: align HE capabilities A-MPDU Length Exponent Extension The A-MPDU length exponent extension is defined differently in 802.11ax D6.1, align with that. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.c2a257d3e2df.I3455245d388c52c61dace7e7958dbed7e807cfb6@changeid Signed-off-by: Johannes Berg commit 76cf42213307f0908e010ac4c2bdcb77113202dd Author: Johannes Berg Date: Fri Apr 9 12:40:17 2021 +0300 wireless: align some HE capabilities with the spec Some names were changed, align that with the spec as of 802.11ax-D6.1. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.b1e5fbab0d8c.I3eb6076cb0714ec6aec6b8f9dee613ce4a05d825@changeid Signed-off-by: Johannes Berg commit 747b67088f8d34b3ec64d31447a1044be92dd348 Author: Sabrina Dubroca Date: Fri Apr 16 17:11:46 2021 +0200 xfrm: ipcomp: remove unnecessary get_cpu() While testing ipcomp on a realtime kernel, Xiumei reported a "sleeping in atomic" bug, caused by a memory allocation while preemption is disabled (ipcomp_decompress -> alloc_page -> ... get_page_from_freelist). As Sebastian noted [1], this get_cpu() isn't actually needed, since ipcomp_decompress() is called in napi context anyway, so BH is already disabled. This patch replaces get_cpu + per_cpu_ptr with this_cpu_ptr, then simplifies the error returns, since there isn't any common operation left. [1] https://lore.kernel.org/lkml/20190820082810.ixkmi56fp7u7eyn2@linutronix.de/ Cc: Juri Lelli Reported-by: Xiumei Mu Suggested-by: Sebastian Andrzej Siewior Signed-off-by: Sabrina Dubroca Signed-off-by: Steffen Klassert commit 6218fe186109b93a2fa2343e13981e016e9961ab Author: Florian Westphal Date: Wed Apr 14 18:12:53 2021 +0200 xfrm: avoid synchronize_rcu during netns destruction Use the new exit_pre hook to NULL the netlink socket. The net namespace core will do a synchronize_rcu() between the exit_pre and exit/exit_batch handlers. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 7baf867fef7cc65d666792e9d1b911beffe74ad7 Author: Florian Westphal Date: Wed Apr 14 18:12:52 2021 +0200 xfrm: remove stray synchronize_rcu from xfrm_init This function is called during boot, from ipv4 stack, there is no need to set the pointer to NULL (static storage duration, so already NULL). No need for the synchronize_rcu either. Remove both. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit b07dd26f07af294ceed9715fd11e312ff8de6138 Author: Florian Westphal Date: Wed Apr 14 18:12:51 2021 +0200 flow: remove spi key from flowi struct xfrm session decode ipv4 path (but not ipv6) sets this, but there are no consumers. Remove it. Signed-off-by: Florian Westphal Signed-off-by: Steffen Klassert commit 34e5269bf987aff9a33ad3ab4f5d65c02913cbc1 Author: Wan Jiabing Date: Thu Apr 15 11:14:50 2021 +0800 m68k: sun3x: Remove unneeded semicolon Fix the following coccicheck warning: ./arch/m68k/include/asm/sun3xflop.h:109:2-3: Unneeded semicolon Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210415031450.23379-1-wanjiabing@vivo.com Signed-off-by: Geert Uytterhoeven commit 7dd231eb9ca607d93d00be39df1f01377e2b7d1f Author: Naftali Goldstein Date: Fri Apr 9 12:40:14 2021 +0300 mac80211: drop the connection if firmware crashed while in CSA Don't bother keeping the link in that case. It is way too complicated to keep the connection. Signed-off-by: Emmanuel Grumbach Signed-off-by: Naftali Goldstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.a126c8833398.I677bdac314dd50d90474a90593902c17f9410cc4@changeid Signed-off-by: Johannes Berg commit f12ce9f607ffa5c617cd86cb7a7a0aaefe58f127 Author: Ilan Peer Date: Fri Apr 9 12:40:15 2021 +0300 nl80211: Add new RSNXE related nl80211 extended features Draft P802.11ax_D2.5 defines the following capabilities that can be negotiated using RSNXE capabilities: - Secure LTF measurement exchange protocol. - Secure RTT measurement exchange protocol. - Management frame protection for all management frames exchanged during the negotiation and range measurement procedure. Extend the nl80211 API to allow drivers to declare support for these new capabilities as part of extended feature. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.8280e31d8091.Ifcb29f84f432290338f80c8378aa5c9e0a390c93@changeid Signed-off-by: Johannes Berg commit 253907ab8bc0818639af382f6398810fa1f022b3 Author: Emmanuel Grumbach Date: Fri Apr 9 12:40:16 2021 +0300 mac80211: properly drop the connection in case of invalid CSA IE In case the frequency is invalid, ieee80211_parse_ch_switch_ie will fail and we may not even reach the check in ieee80211_sta_process_chanswitch. Drop the connection in case ieee80211_parse_ch_switch_ie failed, but still take into account the CSA mode to remember not to send a deauth frame in case if it is forbidden to. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.34712ef96a0a.I75d7ad7f1d654e8b0aa01cd7189ff00a510512b3@changeid Signed-off-by: Johannes Berg commit f30386a85f695aced2fa5b124d65ce5a5f3dc3ac Author: Emmanuel Grumbach Date: Fri Apr 9 12:40:19 2021 +0300 mac80211: make ieee80211_vif_to_wdev work when the vif isn't in the driver This will allow the low level driver to get the wdev during the add_interface flow. In order to do that, remove a few checks from there and do not return NULL for vifs that were not yet added to the driver. Note that all the current callers of this helper function assume that the vif already exists: - The callers from the drivers already have a vif pointer. Before this change, ieee80211_vif_to_wdev would return NULL in some cases, but those callers don't even check they get a non-NULL pointer from ieee80211_vif_to_wdev. - The callers from net/mac80211/cfg.c assume the vif is already added to the driver as well. So, this change has no impact on existing callers of this helper function. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.6078d3517095.I1907a45f267a62dab052bcc44428aa7a2005ffc9@changeid Signed-off-by: Johannes Berg commit 73807523f9a6612106582ab19217f280ed128f24 Author: Avraham Stern Date: Fri Apr 9 12:40:25 2021 +0300 nl80211/cfg80211: add a flag to negotiate for LMR feedback in NDP ranging Add a flag that indicates that the ISTA shall indicate support for LMR feedback in NDP ranging negotiation. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.eff546283504.I2606161e700ac24d94d0b50c8edcdedd4c0395c2@changeid Signed-off-by: Johannes Berg commit efce5b50bad8b63d07719318c34a664ccdb56b70 Author: Avraham Stern Date: Fri Apr 9 12:40:26 2021 +0300 ieee80211: add the values of ranging parameters max LTF total field Add an enum with the values of the ranging parameters max LTF total field, as defined in IEEE802.11az_D2.6, table Table 9-322h23fc. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.d2588ebb1974.I9424c8ade13c4c938cb9999d8ce99d0d4c1cc198@changeid Signed-off-by: Johannes Berg commit 8de8570489d109d969649d67d5f49318128c1fda Author: Johannes Berg Date: Fri Apr 9 12:40:28 2021 +0300 mac80211: aes_cmac: check crypto_shash_setkey() return value As crypto_shash_setkey() can fail, we should check the return value. Addresses-Coverity-ID: 1401813 ("Unchecked return value") Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210409123755.533ff7acf1d2.I034bafa201c4a6823333f8410aeaa60cca5ee9e0@changeid Signed-off-by: Johannes Berg commit bab7f5ca81de4a2a5693a837bffe1124744028fe Author: Colin Ian King Date: Fri Apr 16 10:51:37 2021 +0100 mac80211: minstrel_ht: remove extraneous indentation on if statement The increment of idx is indented one level too deeply, clean up the code by removing the extraneous tab. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210416095137.2033469-1-colin.king@canonical.com Signed-off-by: Johannes Berg commit ca47b46294eabc5b9e85bc2ec9de0bf097a39af6 Author: Johannes Berg Date: Fri Apr 16 13:47:04 2021 +0200 mac80211: properly process TXQ management frames My previous commit to not apply flow control to management frames that are going over TXQs (which is currently only the case for iwlwifi, I think) broke things, with iwlwifi firmware crashing on certain frames. As it turns out, that was due to the frame being too short: space for the MIC wasn't added at the end of encrypted management frames. Clearly, this is due to using the 'frags' queue - this is meant only for frames that have already been processed for TX, and the code in ieee80211_tx_dequeue() just returns them. This caused all management frames to now not get any TX processing. To fix this, use IEEE80211_TX_INTCFL_NEED_TXPROCESSING (which is currently used only in other circumstances) to indicate that the frames need processing, and clear it immediately after so that, at least in theory, MMPDUs can be fragmented. Fixes: 73bc9e0af594 ("mac80211: don't apply flow control on management frames") Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20210416134702.ef8486a64293.If0a9025b39c71bb91b11dd6ac45547aba682df34@changeid Signed-off-by: Johannes Berg commit 623b988f2dcbecf3e638ecfaec97cc56a95eaa6a Author: Joe Perches Date: Sun Apr 18 01:39:53 2021 -0700 cfg80211: constify ieee80211_get_response_rate return It's not modified so make it const with the eventual goal of moving data to text for various static struct ieee80211_rate arrays. Signed-off-by: Joe Perches Link: https://lore.kernel.org/r/8b210b5f5972e39eded269b35a1297cf824c4181.camel@perches.com Signed-off-by: Johannes Berg commit 5d9c358d05f62aa01ff5d63dae70a897498b0bae Author: Randy Dunlap Date: Fri Apr 16 23:01:42 2021 -0700 cfg80211: fix a few kernel-doc warnings Fix multiple kernel-doc warnings in cfg80211.h. cfg80211.h:363: warning: missing initial short description on line: * struct ieee80211_sband_iftype_data cfg80211.h:6743: warning: missing initial short description on line: * cfg80211_vendor_cmd_get_sender Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20210417060142.1648-1-rdunlap@infradead.org Signed-off-by: Johannes Berg commit 810344ed07d9ea55e42e99d87034e234e7e6a4a5 Author: Emmanuel Grumbach Date: Tue Apr 13 14:38:50 2021 +0300 cfg80211: fix an htmldoc warning The htmldoc produces this warning which was introduced bu the commit below. include/net/cfg80211.h:6643: warning: expecting prototype for wiphy_rfkill_set_hw_state(). Prototype was for wiphy_rfkill_set_hw_state_reason() instead Fixes: 6f779a66dc84 ("cfg80211: allow specifying a reason for hw_rfkill") Signed-off-by: Emmanuel Grumbach Link: https://lore.kernel.org/r/20210413113850.59098-1-emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg commit 8d01cf643b3f8bc79c5b6bf18382b943143d9090 Author: Hans de Goede Date: Sat Apr 17 19:31:05 2021 +0200 platform/x86: touchscreen_dmi: Add info for the Teclast Tbook 11 tablet Add touchscreen info for the Teclast Tbook 11 tablet. This includes info for getting the firmware directly from the UEFI, so that the user does not need to manually install the firmware in /lib/firmware/silead. This change will make the touchscreen on these devices work OOTB, without requiring any manual setup. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210417173105.4134-1-hdegoede@redhat.com commit 0636cdc9456f7b1467207e496c9e847214663345 Author: David E. Box Date: Fri Apr 16 20:12:52 2021 -0700 platform/x86: intel_pmc_core: Add support for Alder Lake PCH-P Alder PCH-P is based on Tiger Lake PCH. Signed-off-by: David E. Box Reviewed-by: Hans de Goede Acked-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20210417031252.3020837-10-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 43ef6c226a60b1c52890791af73f7015f68a315a Author: Gayatri Kammela Date: Fri Apr 16 20:12:51 2021 -0700 platform/x86: intel_pmc_core: Add LTR registers for Tiger Lake Just like Ice Lake, Tiger Lake uses Cannon Lake's LTR information and supports a few additional registers. Hence add the LTR registers specific to Tiger Lake to the cnp_ltr_show_map[]. Also adjust the number of LTR IPs for Tiger Lake to the correct amount. Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Hans de Goede Acked-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20210417031252.3020837-9-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 8074a79fad2e34fce11ea2b2c515b984fc6b2a08 Author: David E. Box Date: Fri Apr 16 20:12:50 2021 -0700 platform/x86: intel_pmc_core: Add option to set/clear LPM mode By default the Low Power Mode (LPM or sub-state) status registers will latch condition status on every entry into Package C10. This is configurable in the PMC to allow latching on any achievable sub-state. Add a debugfs file to support this. Also add the option to clear the status registers to 0. Clearing the status registers before testing removes ambiguity around when the current values were set. The new file, latch_lpm_mode, looks like this: [c10] S0i2.0 S0i3.0 S0i2.1 S0i3.1 S0i3.2 clear Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210417031252.3020837-8-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 952c15538e5346fcb0548370f25380b7bc62ed40 Author: Gayatri Kammela Date: Fri Apr 16 20:12:49 2021 -0700 platform/x86: intel_pmc_core: Add requirements file to debugfs Add the debugfs file, substate_requirements, to view the low power mode (LPM) requirements for each enabled mode alongside the last latched status of the condition. After this patch, the new file will look like this: Element | S0i2.0 | S0i3.0 | S0i2.1 | S0i3.1 | S0i3.2 | Status | USB2PLL_OFF_STS | Required | Required | Required | Required | Required | | PCIe/USB3.1_Gen2PLL_OFF_STS | Required | Required | Required | Required | Required | | PCIe_Gen3PLL_OFF_STS | Required | Required | Required | Required | Required | Yes | OPIOPLL_OFF_STS | Required | Required | Required | Required | Required | Yes | OCPLL_OFF_STS | Required | Required | Required | Required | Required | Yes | MainPLL_OFF_STS | | Required | | Required | Required | | Signed-off-by: Gayatri Kammela Co-developed-by: David E. Box Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210417031252.3020837-7-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 428131364f0073a18682a5d3ee9cf13d8042cfce Author: Gayatri Kammela Date: Fri Apr 16 20:12:48 2021 -0700 platform/x86: intel_pmc_core: Get LPM requirements for Tiger Lake Platforms that support low power modes (LPM) such as Tiger Lake maintain requirements for each sub-state that a readable in the PMC. However, unlike LPM status registers, requirement registers are not memory mapped but are available from an ACPI _DSM. Collect the requirements for Tiger Lake using the _DSM method and store in a buffer. Signed-off-by: Gayatri Kammela Co-developed-by: David E. Box Signed-off-by: David E. Box Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210417031252.3020837-6-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 29c2dd88ac9ed5780a762e49585e65e99c90d5a8 Author: Gayatri Kammela Date: Fri Apr 16 20:12:47 2021 -0700 platform/x86: intel_pmc_core: Show LPM residency in microseconds Modify the low power mode (LPM or sub-state) residency counters to display in microseconds just like the slp_s0_residency counter. The granularity of the counter is approximately 30.5us per tick. Double this value then divide by two to maintain accuracy. Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Hans de Goede Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20210417031252.3020837-5-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 005125bfd70eb5532d284cc6e23396e161eb679e Author: Gayatri Kammela Date: Fri Apr 16 20:12:46 2021 -0700 platform/x86: intel_pmc_core: Handle sub-states generically The current implementation of pmc_core_substate_res_show() is written specifically for Tiger Lake. However, new platform will also have sub-states and may support different modes. Therefore rewrite the code to handle sub-states generically. Obtain the number and type of enabled states form the PMC. Use the Low Power Mode (LPM) priority register to store the states in order from shallowest to deepest for displays. Add a for_each macro to simplify this. While changing the sub-state display it makes sense to show only the "enabled" sub-states instead of showing all possible ones. After this patch, the debugfs file looks like this: Substate Residency S0i2.0 0 S0i3.0 0 S0i2.1 9329279 S0i3.1 0 S0i3.2 0 Suggested-by: David E. Box Signed-off-by: Gayatri Kammela Signed-off-by: David E. Box Reviewed-by: Hans de Goede Acked-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20210417031252.3020837-4-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 7dc4dc563dd40c596f72aa4e8ba4d61c82ab73c5 Author: David E. Box Date: Fri Apr 16 20:12:45 2021 -0700 platform/x86: intel_pmc_core: Remove global struct pmc_dev The intel_pmc_core driver did not always bind to a device which meant it lacked a struct device that could be used to maintain driver data. So a global instance of struct pmc_dev was used for this purpose and functions accessed this directly. Since the driver now binds to an ACPI device, remove the global pmc_dev in favor of one that is allocated during probe. Modify users of the global to obtain the object by argument instead. Signed-off-by: David E. Box Reviewed-by: Hans de Goede Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20210417031252.3020837-3-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit c9f86d6ca6b5e23d30d16ade4b9fff5b922a610a Author: David E. Box Date: Fri Apr 16 20:12:44 2021 -0700 platform/x86: intel_pmc_core: Don't use global pmcdev in quirks The DMI callbacks, used for quirks, currently access the PMC by getting the address a global pmc_dev struct. Instead, have the callbacks set a global quirk specific variable. In probe, after calling dmi_check_system(), pass pmc_dev to a function that will handle each quirk if its variable condition is met. This allows removing the global pmc_dev later. Signed-off-by: David E. Box Reviewed-by: Hans de Goede Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20210417031252.3020837-2-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 82104edc5934955ca8571ba576f6850fec8301ae Merge: df4e137299d56 7412dee9f1fd3 Author: Ulf Hansson Date: Mon Apr 19 09:52:08 2021 +0200 Merge branch 'fixes' into next commit e7df7df5a3809d733888db6ce6592a644acaac19 Author: Olivia Mackintosh Date: Sun Apr 18 17:59:01 2021 +0100 ALSA: usb-audio: DJM-750: ensure format is set Add case statement to set sample-rate for the DJM-750 Pioneer mixer. This was included as part of another patch but I think it has been archived on Patchwork and hasn't been merged. Signed-off-by: Olivia Mackintosh Cc: Link: https://lore.kernel.org/r/20210418165901.25776-1-livvy@base.nu Signed-off-by: Takashi Iwai commit 76fae6185f5456865ff1bcb647709d44fd987eb6 Author: Luke D Jones Date: Mon Apr 19 15:04:11 2021 +1200 ALSA: hda/realtek: GA503 use same quirks as GA401 The GA503 has almost exactly the same default setup as the GA401 model with the same issues. The GA401 quirks solve all the issues so we will use the full quirk chain. Signed-off-by: Luke D Jones Cc: Link: https://lore.kernel.org/r/20210419030411.28304-1-luke@ljones.dev Signed-off-by: Takashi Iwai commit 92f8a9217a1215cc3d71e82d5d1cde0793cf0501 Author: Randy Dunlap Date: Sat Apr 17 22:51:23 2021 -0700 kconfig: highlight xconfig 'comment' lines with '***' Mark Kconfig "comment" lines with "*** ***" so that it is clear that these lines are comments and not some kconfig item that cannot be modified. This is helpful in some menus to be able to provide a menu "sub-heading" for groups of similar config items. This also makes the comments be presented in a way that is similar to menuconfig and nconfig. Signed-off-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit 5fb35ec10bb0665080c8de8a360fb4dba9a0f73f Author: Randy Dunlap Date: Sat Apr 17 22:51:22 2021 -0700 kconfig: highlight gconfig 'comment' lines with '***' Mark Kconfig "comment" lines with "*** ***" so that it is clear that these lines are comments and not some kconfig item that cannot be modified. This is helpful in some menus to be able to provide a menu "sub-heading" for groups of similar config items. This also makes the comments be presented in a way that is similar to menuconfig and nconfig. Signed-off-by: Randy Dunlap Signed-off-by: Masahiro Yamada commit ed63ef7796979835d7cfb4dc2d108b6eeeb2b7c2 Author: Masahiro Yamada Date: Sat Apr 17 23:50:37 2021 +0900 kconfig: gconf: remove unused code Remove the unused inclusion, and commented out lines. Signed-off-by: Masahiro Yamada commit 9046625511ad8dfbc8c6c2de16b3532c43d68d48 Author: Jeffrey Mitchell Date: Fri Feb 26 15:00:23 2021 -0600 ecryptfs: fix kernel panic with null dev_name When mounting eCryptfs, a null "dev_name" argument to ecryptfs_mount() causes a kernel panic if the parsed options are valid. The easiest way to reproduce this is to call mount() from userspace with an existing eCryptfs mount's options and a "source" argument of 0. Error out if "dev_name" is null in ecryptfs_mount() Fixes: 237fead61998 ("[PATCH] ecryptfs: fs/Makefile and fs/Kconfig") Cc: stable@vger.kernel.org Signed-off-by: Jeffrey Mitchell Signed-off-by: Tyler Hicks commit 989e5d4b576f010de4bacb9fdad0cb879c75e9d7 Author: Masahiro Yamada Date: Sat Apr 17 23:50:36 2021 +0900 kconfig: remove unused PACKAGE definition Commit 3b9fa0931dd8 ("[PATCH] Kconfig i18n support") added this code, and then commit ("kconfig: drop localization support") removed the i18n support entirely. Remove the left-over. Signed-off-by: Masahiro Yamada commit 7f06ecd3afb0f976a324d5d8505242c67e4b4719 Author: Christian Brauner Date: Fri Apr 9 18:24:20 2021 +0200 ecryptfs: remove unused helpers Remove two helpers that are unused. Cc: Amir Goldstein Cc: Tyler Hicks Cc: ecryptfs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Christian Brauner Signed-off-by: Tyler Hicks commit 1abbe1106d48ab0ee4980f8afb04ae2c71bbf3cc Author: Sascha Hauer Date: Wed Feb 24 12:30:59 2021 +0100 ecryptfs: Fix typo in message ecryptfs_decrypt_page() issues a warning "Error encrypting extent". This should be "Error decrypting extent" instead. Fixes: 0216f7f79217 ("eCryptfs: replace encrypt, decrypt, and inode size write") Signed-off-by: Sascha Hauer Signed-off-by: Tyler Hicks commit 724fa86291d0df2e15c3654c4b5684c64bb1d49c Author: Ye Bin Date: Fri Apr 9 17:51:42 2021 +0800 eCryptfs: Use DEFINE_MUTEX() for mutex lock mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Tyler Hicks commit ffbed072be00c1617e25396054f6f349befddffc Author: Lee Jones Date: Tue Mar 30 17:44:58 2021 +0100 ecryptfs: keystore: Fix some kernel-doc issues and demote non-conformant headers Fixes the following W=1 kernel build warning(s): fs/ecryptfs/keystore.c:25: warning: Incorrect use of kernel-doc format: * request_key returned an error instead of a valid key address; fs/ecryptfs/keystore.c:30: warning: Function parameter or member 'err_code' not described in 'process_request_key_err' fs/ecryptfs/keystore.c:30: warning: expecting prototype for eCryptfs(). Prototype was for process_request_key_err() instead fs/ecryptfs/keystore.c:558: warning: Function parameter or member 'auth_tok_key' not described in 'ecryptfs_find_auth_tok_for_sig' fs/ecryptfs/keystore.c:558: warning: Function parameter or member 'mount_crypt_stat' not described in 'ecryptfs_find_auth_tok_for_sig' fs/ecryptfs/keystore.c:558: warning: Excess function parameter 'crypt_stat' description in 'ecryptfs_find_auth_tok_for_sig' fs/ecryptfs/keystore.c:584: warning: cannot understand function prototype: 'struct ecryptfs_write_tag_70_packet_silly_stack ' fs/ecryptfs/keystore.c:622: warning: Function parameter or member 'dest' not described in 'ecryptfs_write_tag_70_packet' fs/ecryptfs/keystore.c:622: warning: Function parameter or member 'remaining_bytes' not described in 'ecryptfs_write_tag_70_packet' fs/ecryptfs/keystore.c:622: warning: Function parameter or member 'packet_size' not described in 'ecryptfs_write_tag_70_packet' fs/ecryptfs/keystore.c:622: warning: Function parameter or member 'mount_crypt_stat' not described in 'ecryptfs_write_tag_70_packet' fs/ecryptfs/keystore.c:622: warning: Function parameter or member 'filename_size' not described in 'ecryptfs_write_tag_70_packet' fs/ecryptfs/keystore.c:622: warning: expecting prototype for write_tag_70_packet(). Prototype was for ecryptfs_write_tag_70_packet() instead fs/ecryptfs/keystore.c:895: warning: expecting prototype for parse_tag_70_packet(). Prototype was for ecryptfs_parse_tag_70_packet() instead Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: "Michael C. Thompson" Cc: "Trevor S. Highland" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit d17074ac9ec8d4b7a5c2a305625443e5960fc530 Author: Lee Jones Date: Tue Mar 30 17:44:57 2021 +0100 ecryptfs: inode: Help out nearly-there header and demote non-conformant ones Fixes the following W=1 kernel build warning(s): fs/ecryptfs/inode.c:27: warning: Function parameter or member 'dentry' not described in 'lock_parent' fs/ecryptfs/inode.c:27: warning: Function parameter or member 'lower_dentry' not described in 'lock_parent' fs/ecryptfs/inode.c:27: warning: Function parameter or member 'lower_dir' not described in 'lock_parent' fs/ecryptfs/inode.c:27: warning: expecting prototype for eCryptfs(). Prototype was for lock_parent() instead fs/ecryptfs/inode.c:211: warning: Function parameter or member 'ecryptfs_dentry' not described in 'ecryptfs_initialize_file' fs/ecryptfs/inode.c:211: warning: Function parameter or member 'ecryptfs_inode' not described in 'ecryptfs_initialize_file' fs/ecryptfs/inode.c:258: warning: Function parameter or member 'mnt_userns' not described in 'ecryptfs_create' fs/ecryptfs/inode.c:258: warning: Function parameter or member 'directory_inode' not described in 'ecryptfs_create' fs/ecryptfs/inode.c:258: warning: Function parameter or member 'ecryptfs_dentry' not described in 'ecryptfs_create' fs/ecryptfs/inode.c:258: warning: Function parameter or member 'excl' not described in 'ecryptfs_create' fs/ecryptfs/inode.c:258: warning: Excess function parameter 'dir' description in 'ecryptfs_create' fs/ecryptfs/inode.c:258: warning: Excess function parameter 'dentry' description in 'ecryptfs_create' fs/ecryptfs/inode.c:320: warning: Function parameter or member 'dentry' not described in 'ecryptfs_lookup_interpose' fs/ecryptfs/inode.c:320: warning: Function parameter or member 'lower_dentry' not described in 'ecryptfs_lookup_interpose' fs/ecryptfs/inode.c:887: warning: Function parameter or member 'mnt_userns' not described in 'ecryptfs_setattr' Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: "Michael C. Thompsion" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit 688a9f7cd824e76a893590e35c15017f1f956b88 Author: Lee Jones Date: Tue Mar 30 17:44:56 2021 +0100 ecryptfs: mmap: Help out one function header and demote other abuses Fixes the following W=1 kernel build warning(s): fs/ecryptfs/mmap.c:26: warning: Incorrect use of kernel-doc format: * ecryptfs_get_locked_page fs/ecryptfs/mmap.c:34: warning: Function parameter or member 'inode' not described in 'ecryptfs_get_locked_page' fs/ecryptfs/mmap.c:34: warning: Function parameter or member 'index' not described in 'ecryptfs_get_locked_page' fs/ecryptfs/mmap.c:34: warning: expecting prototype for eCryptfs(). Prototype was for ecryptfs_get_locked_page() instead fs/ecryptfs/mmap.c:52: warning: Function parameter or member 'wbc' not described in 'ecryptfs_writepage' fs/ecryptfs/mmap.c:98: warning: Incorrect use of kernel-doc format: * ecryptfs_copy_up_encrypted_with_header fs/ecryptfs/mmap.c:110: warning: Function parameter or member 'page' not described in 'ecryptfs_copy_up_encrypted_with_header' fs/ecryptfs/mmap.c:110: warning: Function parameter or member 'crypt_stat' not described in 'ecryptfs_copy_up_encrypted_with_header' fs/ecryptfs/mmap.c:110: warning: expecting prototype for Header Extent(). Prototype was for ecryptfs_copy_up_encrypted_with_header() instead fs/ecryptfs/mmap.c:233: warning: wrong kernel-doc identifier on line: fs/ecryptfs/mmap.c:379: warning: Function parameter or member 'ecryptfs_inode' not described in 'ecryptfs_write_inode_size_to_header' Cc: Tyler Hicks Cc: James Morris Cc: Tycho Andersen Cc: Christian Brauner Cc: "Michael A. Halcrow" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit 5da877eadffb8b6b5b302673ab14ea4c3d7d1546 Author: Lee Jones Date: Tue Mar 30 17:44:55 2021 +0100 ecryptfs: crypto: Supply some missing param descriptions and demote abuses Fixes the following W=1 kernel build warning(s): fs/ecryptfs/crypto.c:29: warning: expecting prototype for eCryptfs(). Prototype was for DECRYPT() instead fs/ecryptfs/crypto.c:360: warning: Function parameter or member 'crypt_stat' not described in 'lower_offset_for_page' fs/ecryptfs/crypto.c:360: warning: Function parameter or member 'page' not described in 'lower_offset_for_page' fs/ecryptfs/crypto.c:637: warning: Function parameter or member 'crypt_stat' not described in 'ecryptfs_compute_root_iv' fs/ecryptfs/crypto.c:1386: warning: Function parameter or member 'ecryptfs_dentry' not described in 'ecryptfs_read_metadata' fs/ecryptfs/crypto.c:1463: warning: Function parameter or member 'filename' not described in 'ecryptfs_encrypt_filename' fs/ecryptfs/crypto.c:1463: warning: Function parameter or member 'mount_crypt_stat' not described in 'ecryptfs_encrypt_filename' fs/ecryptfs/crypto.c:1897: warning: Function parameter or member 'encoded_name_size' not described in 'ecryptfs_encrypt_and_encode_filename' fs/ecryptfs/crypto.c:1897: warning: Function parameter or member 'mount_crypt_stat' not described in 'ecryptfs_encrypt_and_encode_filename' fs/ecryptfs/crypto.c:1897: warning: Function parameter or member 'name_size' not described in 'ecryptfs_encrypt_and_encode_filename' fs/ecryptfs/crypto.c:1897: warning: Excess function parameter 'crypt_stat' description in 'ecryptfs_encrypt_and_encode_filename' fs/ecryptfs/crypto.c:1897: warning: Excess function parameter 'length' description in 'ecryptfs_encrypt_and_encode_filename' fs/ecryptfs/crypto.c:2006: warning: Function parameter or member 'sb' not described in 'ecryptfs_decode_and_decrypt_filename' fs/ecryptfs/crypto.c:2006: warning: Excess function parameter 'ecryptfs_dir_dentry' description in 'ecryptfs_decode_and_decrypt_filename' Cc: Tyler Hicks Cc: Eric Biggers Cc: "Michael A. Halcrow" Cc: "Michael C. Thompson" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones [tyhicks: Fix typo in ecryptfs_encrypt_and_encode_filename() func docs] Signed-off-by: Tyler Hicks commit 65bbb7b84611c59725276ed1e03105fa002da9af Author: Lee Jones Date: Tue Mar 30 17:44:54 2021 +0100 ecryptfs: miscdev: File headers are not good kernel-doc candidates Supply description for the 'daemon' param too. Fixes the following W=1 kernel build warning(s): fs/ecryptfs/miscdev.c:19: warning: cannot understand function prototype: 'atomic_t ecryptfs_num_miscdev_opens; ' fs/ecryptfs/miscdev.c:323: warning: Function parameter or member 'daemon' not described in 'ecryptfs_miscdev_response' Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit e24012062e3dfacc40fda0776af0c2987ee0c9ab Author: Lee Jones Date: Tue Mar 30 17:44:53 2021 +0100 ecryptfs: main: Demote a bunch of non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): fs/ecryptfs/main.c:28: warning: Incorrect use of kernel-doc format: * Module parameter that defines the ecryptfs_verbosity level. fs/ecryptfs/main.c:30: warning: cannot understand function prototype: 'int ecryptfs_verbosity = 0; ' fs/ecryptfs/main.c:40: warning: cannot understand function prototype: 'unsigned int ecryptfs_message_buf_len = ECRYPTFS_DEFAULT_MSG_CTX_ELEMS; ' fs/ecryptfs/main.c:52: warning: cannot understand function prototype: 'signed long ecryptfs_message_wait_timeout = ECRYPTFS_MAX_MSG_CTX_TTL / HZ; ' fs/ecryptfs/main.c:65: warning: cannot understand function prototype: 'unsigned int ecryptfs_number_of_users = ECRYPTFS_DEFAULT_NUM_USERS; ' fs/ecryptfs/main.c:106: warning: Function parameter or member 'dentry' not described in 'ecryptfs_init_lower_file' fs/ecryptfs/main.c:106: warning: Function parameter or member 'lower_file' not described in 'ecryptfs_init_lower_file' fs/ecryptfs/main.c:106: warning: Excess function parameter 'ecryptfs_dentry' description in 'ecryptfs_init_lower_file' fs/ecryptfs/main.c:244: warning: Function parameter or member 'sbi' not described in 'ecryptfs_parse_options' fs/ecryptfs/main.c:244: warning: Excess function parameter 'sb' description in 'ecryptfs_parse_options' fs/ecryptfs/main.c:478: warning: Function parameter or member 'fs_type' not described in 'ecryptfs_mount' fs/ecryptfs/main.c:478: warning: Function parameter or member 'flags' not described in 'ecryptfs_mount' fs/ecryptfs/main.c:478: warning: expecting prototype for ecryptfs_get_sb(). Prototype was for ecryptfs_mount() instead fs/ecryptfs/main.c:645: warning: Function parameter or member 'vptr' not described in 'inode_info_init_once' Cc: Tyler Hicks Cc: Christian Brauner Cc: James Morris Cc: "Michael A. Halcrow" Cc: "Michael C. Thompson" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones [tyhicks: Correct the function documentation for ecryptfs_mount()] Signed-off-by: Tyler Hicks commit 1ab8e268ead8ef305ece732557c07e2e18632b5b Author: Lee Jones Date: Tue Mar 30 17:44:52 2021 +0100 ecryptfs: messaging: Add missing param descriptions and demote abuses Fixes the following W=1 kernel build warning(s): fs/ecryptfs/messaging.c:15: warning: Function parameter or member 'ecryptfs_msg_ctx_free_list' not described in 'LIST_HEAD' fs/ecryptfs/messaging.c:15: warning: expecting prototype for eCryptfs(). Prototype was for LIST_HEAD() instead fs/ecryptfs/messaging.c:157: warning: Function parameter or member 'daemon' not described in 'ecryptfs_exorcise_daemon' fs/ecryptfs/messaging.c:207: warning: Function parameter or member 'daemon' not described in 'ecryptfs_process_response' fs/ecryptfs/messaging.c:207: warning: expecting prototype for ecryptfs_process_reponse(). Prototype was for ecryptfs_process_response() instead fs/ecryptfs/messaging.c:262: warning: Function parameter or member 'msg_type' not described in 'ecryptfs_send_message_locked' Cc: Tyler Hicks Cc: David Howells Cc: Johannes Weiner Cc: Waiman Long Cc: Michal Hocko Cc: Andrew Morton Cc: "Michael A. Halcrow" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit 1c6675cafc8cf69dd33dab1fa129c00f56a3c84e Author: Lee Jones Date: Tue Mar 30 17:44:51 2021 +0100 ecryptfs: super: Fix formatting, naming and kernel-doc abuses Fixes the following W=1 kernel build warning(s): fs/ecryptfs/super.c:22: warning: cannot understand function prototype: 'struct kmem_cache *ecryptfs_inode_info_cache; ' fs/ecryptfs/super.c:91: warning: Function parameter or member 'dentry' not described in 'ecryptfs_statfs' fs/ecryptfs/super.c:91: warning: Excess function parameter 'sb' description in 'ecryptfs_statfs' fs/ecryptfs/super.c:120: warning: Function parameter or member 'inode' not described in 'ecryptfs_evict_inode' fs/ecryptfs/super.c:133: warning: Function parameter or member 'm' not described in 'ecryptfs_show_options' fs/ecryptfs/super.c:133: warning: Function parameter or member 'root' not described in 'ecryptfs_show_options' Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: "Michael C. Thompson" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit a62187eb1f483e46e5dca796146f203112608cbc Author: Lee Jones Date: Tue Mar 30 17:44:50 2021 +0100 ecryptfs: file: Demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): fs/ecryptfs/file.c:23: warning: Incorrect use of kernel-doc format: * ecryptfs_read_update_atime fs/ecryptfs/file.c:34: warning: Function parameter or member 'iocb' not described in 'ecryptfs_read_update_atime' fs/ecryptfs/file.c:34: warning: Function parameter or member 'to' not described in 'ecryptfs_read_update_atime' fs/ecryptfs/file.c:34: warning: expecting prototype for eCryptfs(). Prototype was for ecryptfs_read_update_atime() instead Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: "Michael C. Thompson" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit 446b5836af9fc3518142077bde116e6a4b196e05 Author: Lee Jones Date: Tue Mar 30 17:44:49 2021 +0100 ecryptfs: kthread: Demote file header and provide description for 'cred' Fixes the following W=1 kernel build warning(s): fs/ecryptfs/kthread.c:16: warning: cannot understand function prototype: 'struct ecryptfs_open_req ' fs/ecryptfs/kthread.c:120: warning: Function parameter or member 'cred' not described in 'ecryptfs_privileged_open' Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit 64cbb654ed779a5beeda907c80c187a9c1f4f8cb Author: Lee Jones Date: Tue Mar 30 17:44:48 2021 +0100 ecryptfs: dentry: File headers are not good candidates for kernel-doc Fixes the following W=1 kernel build warning(s): fs/ecryptfs/dentry.c:19: warning: Incorrect use of kernel-doc format: * ecryptfs_d_revalidate - revalidate an ecryptfs dentry fs/ecryptfs/dentry.c:32: warning: Function parameter or member 'dentry' not described in 'ecryptfs_d_revalidate' fs/ecryptfs/dentry.c:32: warning: Function parameter or member 'flags' not described in 'ecryptfs_d_revalidate' fs/ecryptfs/dentry.c:32: warning: expecting prototype for eCryptfs(). Prototype was for ecryptfs_d_revalidate() instead Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit b0cfbeff12dab1ce89d55f5da11ae9d5dc20a9e2 Author: Lee Jones Date: Tue Mar 30 17:44:47 2021 +0100 ecryptfs: debug: Demote a couple of kernel-doc abuses Fixes the following W=1 kernel build warning(s): fs/ecryptfs/debug.c:13: warning: Incorrect use of kernel-doc format: * ecryptfs_dump_auth_tok - debug function to print auth toks fs/ecryptfs/debug.c:19: warning: Function parameter or member 'auth_tok' not described in 'ecryptfs_dump_auth_tok' fs/ecryptfs/debug.c:19: warning: expecting prototype for eCryptfs(). Prototype was for ecryptfs_dump_auth_tok() instead Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit 09d02efaafdc2114565a5ad218172b6064404f0f Author: Lee Jones Date: Tue Mar 30 17:44:46 2021 +0100 ecryptfs: read_write: File headers do not make good candidates for kernel-doc Provide missing param description for 'page_index' too. Fixes the following W=1 kernel build warning(s): fs/ecryptfs/read_write.c:16: warning: Incorrect use of kernel-doc format: * ecryptfs_write_lower fs/ecryptfs/read_write.c:29: warning: Function parameter or member 'ecryptfs_inode' not described in 'ecryptfs_write_lower' fs/ecryptfs/read_write.c:29: warning: Function parameter or member 'data' not described in 'ecryptfs_write_lower' fs/ecryptfs/read_write.c:29: warning: Function parameter or member 'offset' not described in 'ecryptfs_write_lower' fs/ecryptfs/read_write.c:29: warning: Function parameter or member 'size' not described in 'ecryptfs_write_lower' fs/ecryptfs/read_write.c:29: warning: expecting prototype for eCryptfs(). Prototype was for ecryptfs_write_lower() instead fs/ecryptfs/read_write.c:248: warning: Function parameter or member 'page_index' not described in 'ecryptfs_read_lower_page_segment' Cc: Tyler Hicks Cc: "Michael A. Halcrow" Cc: ecryptfs@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Tyler Hicks commit b7f8f259896f669f131713b0c74ba4d008daa71d Merge: 902af369942f8 d434405aaab7d Author: Tyler Hicks Date: Mon Apr 19 04:39:17 2021 +0000 Merge tag 'v5.12-rc7' into ecryptfs/next Required to pick up idmapped mount changes which changed some function parameters. commit d8a1d6c58986d8778768b15dc5bac0b4b082d345 Author: Madhavan Srinivasan Date: Thu Apr 8 13:15:04 2021 +0530 powerpc/perf: Add platform specific check_attr_config Add platform specific attr.config value checks. Patch includes checks for both power9 and power10. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408074504.248211-2-maddy@linux.ibm.com commit 04d82a6d0881ef1ab1e9f66f10805177ee2fb1e8 Author: Damien Le Moal Date: Sat Apr 17 10:10:08 2021 +0900 binfmt_flat: allow not offsetting data start Commit 2217b9826246 ("binfmt_flat: revert "binfmt_flat: don't offset the data start"") restored offsetting the start of the data section by a number of words defined by MAX_SHARED_LIBS. As a result, since MAX_SHARED_LIBS is never 0, a gap between the text and data sections always exists. For architectures which cannot support a such gap between the text and data sections (e.g. riscv nommu), flat binary programs cannot be executed. To allow an architecture to request no data start offset to allow for contiguous text and data sections for binaries flagged with FLAT_FLAG_RAM, introduce the new config option CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET. Using this new option, the macro DATA_START_OFFSET_WORDS is conditionally defined in binfmt_flat.c to MAX_SHARED_LIBS for architectures tolerating or needing the data start offset (CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET disabled case) and to 0 when CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET is enabled. DATA_START_OFFSET_WORDS is used in load_flat_file() to calculate the data section length and start position. Signed-off-by: Damien Le Moal Signed-off-by: Greg Ungerer commit b72920f6e4a9d6607b723d69b7f412c829769c75 Author: Pablo Neira Ayuso Date: Thu Apr 15 20:10:18 2021 +0200 netfilter: nftables: counter hardware offload support This patch adds the .offload_stats operation to synchronize hardware stats with the expression data. Update the counter expression to use this new interface. The hardware stats are retrieved from the netlink dump path via FLOW_CLS_STATS command to the driver. Signed-off-by: Pablo Neira Ayuso commit 8826218215de1aae9d89a6ea8d3786f224711334 Author: Ido Schimmel Date: Wed Apr 14 11:20:33 2021 +0300 selftests: fib_tests: Add test cases for interaction with mangling Test that packets are correctly routed when netfilter mangling rules are present. Without previous patch: # ./fib_tests.sh -t ipv4_mangle IPv4 mangling tests TEST: Connection with correct parameters [ OK ] TEST: Connection with incorrect parameters [ OK ] TEST: Connection with correct parameters - mangling [FAIL] TEST: Connection with correct parameters - no mangling [ OK ] TEST: Connection check - server side [FAIL] Tests passed: 3 Tests failed: 2 # ./fib_tests.sh -t ipv6_mangle IPv6 mangling tests TEST: Connection with correct parameters [ OK ] TEST: Connection with incorrect parameters [ OK ] TEST: Connection with correct parameters - mangling [FAIL] TEST: Connection with correct parameters - no mangling [ OK ] TEST: Connection check - server side [FAIL] Tests passed: 3 Tests failed: 2 With previous patch: # ./fib_tests.sh -t ipv4_mangle IPv4 mangling tests TEST: Connection with correct parameters [ OK ] TEST: Connection with incorrect parameters [ OK ] TEST: Connection with correct parameters - mangling [ OK ] TEST: Connection with correct parameters - no mangling [ OK ] TEST: Connection check - server side [ OK ] Tests passed: 5 Tests failed: 0 # ./fib_tests.sh -t ipv6_mangle IPv6 mangling tests TEST: Connection with correct parameters [ OK ] TEST: Connection with incorrect parameters [ OK ] TEST: Connection with correct parameters - mangling [ OK ] TEST: Connection with correct parameters - no mangling [ OK ] TEST: Connection check - server side [ OK ] Tests passed: 5 Tests failed: 0 Signed-off-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: Pablo Neira Ayuso commit 812fa71f0d967dea7616810f27e98135d410b27e Author: Ido Schimmel Date: Wed Apr 14 11:20:32 2021 +0300 netfilter: Dissect flow after packet mangling Netfilter tries to reroute mangled packets as a different route might need to be used following the mangling. When this happens, netfilter does not populate the IP protocol, the source port and the destination port in the flow key. Therefore, FIB rules that match on these fields are ignored and packets can be misrouted. Solve this by dissecting the outer flow and populating the flow key before rerouting the packet. Note that flow dissection only happens when FIB rules that match on these fields are installed, so in the common case there should not be a penalty. Reported-by: Michal Soltys Signed-off-by: Ido Schimmel Signed-off-by: Pablo Neira Ayuso commit 783003f3bb8a565326e89d18bbd948ad8ffc816a Author: Pablo Neira Ayuso Date: Mon Apr 12 14:20:55 2021 +0200 netfilter: nftables_offload: special ethertype handling for VLAN The nftables offload parser sets FLOW_DISSECTOR_KEY_BASIC .n_proto to the ethertype field in the ethertype frame. However: - FLOW_DISSECTOR_KEY_BASIC .n_proto field always stores either IPv4 or IPv6 ethertypes. - FLOW_DISSECTOR_KEY_VLAN .vlan_tpid stores either the 802.1q and 802.1ad ethertypes. Same as for FLOW_DISSECTOR_KEY_CVLAN. This function adjusts the flow dissector to handle two scenarios: 1) FLOW_DISSECTOR_KEY_VLAN .vlan_tpid is set to 802.1q or 802.1ad. Then, transfer: - the .n_proto field to FLOW_DISSECTOR_KEY_VLAN .tpid. - the original FLOW_DISSECTOR_KEY_VLAN .tpid to the FLOW_DISSECTOR_KEY_CVLAN .tpid - the original FLOW_DISSECTOR_KEY_CVLAN .tpid to the .n_proto field. 2) .n_proto is set to 802.1q or 802.1ad. Then, transfer: - the .n_proto field to FLOW_DISSECTOR_KEY_VLAN .tpid. - the original FLOW_DISSECTOR_KEY_VLAN .tpid to the .n_proto field. Fixes: a82055af5959 ("netfilter: nft_payload: add VLAN offload support") Signed-off-by: Pablo Neira Ayuso commit ff4d90a89d3d4d9814e0a2696509a7d495be4163 Author: Pablo Neira Ayuso Date: Mon Apr 12 14:20:15 2021 +0200 netfilter: nftables_offload: VLAN id needs host byteorder in flow dissector The flow dissector representation expects the VLAN id in host byteorder. Add the NFT_OFFLOAD_F_NETWORK2HOST flag to swap the bytes from nft_cmp. Fixes: a82055af5959 ("netfilter: nft_payload: add VLAN offload support") Signed-off-by: Pablo Neira Ayuso commit 14c20643ef9457679cc6934d77adc24296505214 Author: Pablo Neira Ayuso Date: Mon Apr 12 14:11:39 2021 +0200 netfilter: nft_payload: fix C-VLAN offload support - add another struct flow_dissector_key_vlan for C-VLAN - update layer 3 dependency to allow to match on IPv4/IPv6 Fixes: 89d8fd44abfb ("netfilter: nft_payload: add C-VLAN offload support") Signed-off-by: Pablo Neira Ayuso commit a637b3bfa43aead7221b79cd92e092ef911c8253 Author: Heiko Carstens Date: Sat Apr 17 14:48:32 2021 +0200 s390/atomic,cmpxchg: always inline __xchg/__cmpxchg Make sure to always inline __xchg() and __cmpxchg() otherwise the compiler might decide to generate out-of-line versions which will fail at link time: s390-linux-ld: lib/atomic64_test.o: in function `__xchg': >> atomic64_test.c:(.text.unlikely+0xa4): undefined reference to `__xchg_called_with_bad_pointer' Reported-by: kernel test robot Link: https://lore.kernel.org/linux-mm/202104170449.SIIFKVjT-lkp@intel.com/ Fixes: d2b1f6d2d350 ("s390/cmpxchg: get rid of gcc atomic builtins") Signed-off-by: Heiko Carstens commit b44913fceb1324be8eaefa8a96c9ae5d368b39c5 Author: Alexander Gordeev Date: Tue Apr 6 17:38:11 2021 +0200 s390/smp: fix do_restart() prototype Funciton do_restart() is a callback invoked from the restart CPU routine and passed a single parameter. Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit ff23f8c970ab79238d9777f3d0d886eff13f7c06 Author: Marc Zyngier Date: Wed Apr 14 14:44:07 2021 +0100 s390: get rid of oprofile leftovers perf_pmu_name() and perf_num_counters() are unused. Drop them. Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210414134409.1266357-4-maz@kernel.org Signed-off-by: Heiko Carstens commit fb700ef026766c95578aafc0db1b208946e7ad4f Author: Trond Myklebust Date: Thu Apr 15 17:33:07 2021 -0400 NFSv4.1: Simplify layout return in pnfs_layout_process() If the server hands us a layout that does not match the one we currently hold, then have pnfs_mark_matching_lsegs_return() just ditch the old layout if NFS_LSEG_LAYOUTRETURN is not set. Signed-off-by: Trond Myklebust commit de144ff4234f935bd2150108019b5d87a90a8a96 Author: Trond Myklebust Date: Sun Apr 18 15:00:45 2021 -0400 NFSv4: Don't discard segments marked for return in _pnfs_return_layout() If the pNFS layout segment is marked with the NFS_LSEG_LAYOUTRETURN flag, then the assumption is that it has some reporting requirement to perform through a layoutreturn (e.g. flexfiles layout stats or error information). Fixes: 6d597e175012 ("pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust commit 57ac51667d8cd62731223d687e5fe7b41c502f89 Author: Manivannan Sadhasivam Date: Wed Apr 14 04:41:16 2021 +0100 ARM: 9075/1: kernel: Fix interrupted SMC calls On Qualcomm ARM32 platforms, the SMC call can return before it has completed. If this occurs, the call can be restarted, but it requires using the returned session ID value from the interrupted SMC call. The ARM32 SMCC code already has the provision to add platform specific quirks for things like this. So let's make use of it and add the Qualcomm specific quirk (ARM_SMCCC_QUIRK_QCOM_A6) used by the QCOM_SCM driver. This change is similar to the below one added for ARM64 a while ago: commit 82bcd087029f ("firmware: qcom: scm: Fix interrupted SCM calls") Without this change, the Qualcomm ARM32 platforms like SDX55 will return -EINVAL for SMC calls used for modem firmware loading and validation. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Bjorn Andersson Signed-off-by: Russell King commit 5fafafe7eeac02643cb221fac9b27d72a86c286e Author: Jisheng Zhang (syna) Date: Mon Apr 12 09:14:27 2021 +0100 ARM: 9074/1: ptdump: convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Jisheng Zhang Reviewed-by: Steven Price Signed-off-by: Russell King commit a5e8acd94fe1fe60d92176424a2be6e52c8bd058 Author: Jisheng Zhang (syna) Date: Mon Apr 12 09:12:36 2021 +0100 ARM: 9073/1: ptdump: add __init section marker to three functions They are not needed after booting, so mark them as __init to move them to the .init section. Signed-off-by: Jisheng Zhang Reviewed-by: Steven Price Signed-off-by: Russell King commit aefdd4383bb0057c1ec1e32e7de348ccd749eb20 Author: Jisheng Zhang (syna) Date: Mon Apr 12 09:05:48 2021 +0100 ARM: 9072/1: mm: remove set_kernel_text_r[ow]() After commit 5a735583b764 ("arm/ftrace: Use __patch_text()"), the last and only user of these functions has gone, remove them. Signed-off-by: Jisheng Zhang Signed-off-by: Russell King commit 93fb0c8df6d2f24957c441bbba52e5efc9aa0b03 Author: Nishanth Menon Date: Thu Apr 15 19:59:53 2021 -0500 dt-bindings: mailbox: ti,secure-proxy: Convert to json schema Convert the ti,secure-proxy to yaml for better checks and documentation. Differences being mostly in the examples: - Dropped the example usage of mailbox client, it is better done in tisci node definition. - Switched reg usage for address-cells and size-cells 1 - aligned with schema checks as well. - included header in example for a buildable example. While at this, lets make sure to support upto 100 rx threads even though typically upto 1 threads is practically in use. NOTE: The following checkpatch warning is generated since we do include the header in the example, but this is a false positive warning. WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst Signed-off-by: Nishanth Menon Reviewed-by: Rob Herring Signed-off-by: Jassi Brar commit a38cb4171928f622c8c0ab7902971516540cacad Merge: 49c1d07fd04f5 732f21a3053cf Author: Michael Ellerman Date: Sun Apr 18 23:55:12 2021 +1000 Merge branch 'topic/ppc-kvm' into next Merge some powerpc KVM patches we are keeping in a topic branch just in case anyone else needs to merge them. commit 49c1d07fd04f54eb588c4a1dfcedc8d22c5ffd50 Author: Nicholas Piggin Date: Fri Apr 2 12:41:24 2021 +1000 powerpc/powernv: Enable HAIL (HV AIL) for ISA v3.1 processors Starting with ISA v3.1, LPCR[AIL] no longer controls the interrupt mode for HV=1 interrupts. Instead, a new LPCR[HAIL] bit is defined which behaves like AIL=3 for HV interrupts when set. Set HAIL on bare metal to give us mmu-on interrupts and improve performance. This also fixes an scv bug: we don't implement scv real mode (AIL=0) vectors because they are at an inconvenient location, so we just disable scv support when AIL can not be set. However powernv assumes that LPCR[AIL] will enable AIL mode so it enables scv support despite HV interrupts being AIL=0, which causes scv interrupts to go off into the weeds. Fixes: 7fa95f9adaee ("powerpc/64s: system call support for scv/rfscv instructions") Cc: stable@vger.kernel.org # v5.9+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210402024124.545826-1-npiggin@gmail.com commit b635ccc1ec26b9b6e2cb1495c3d9d903e0b4f95a Author: Andrea Parri (Microsoft) Date: Fri Apr 16 16:34:49 2021 +0200 Drivers: hv: vmbus: Check for pending channel interrupts before taking a CPU offline Check that enough time has passed such that the modify channel message has been processed before taking a CPU offline. Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20210416143449.16185-4-parri.andrea@gmail.com Signed-off-by: Wei Liu commit 870ced0548c895eb0bf8d982400344e5a9b2df00 Author: Andrea Parri (Microsoft) Date: Fri Apr 16 16:34:48 2021 +0200 Drivers: hv: vmbus: Drivers: hv: vmbus: Introduce CHANNELMSG_MODIFYCHANNEL_RESPONSE Introduce the CHANNELMSG_MODIFYCHANNEL_RESPONSE message type, and code to receive and process such a message. Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20210416143449.16185-3-parri.andrea@gmail.com Signed-off-by: Wei Liu commit 1df53d212c803c0e11a2b10d47ec830d3576b972 Author: Andrea Parri (Microsoft) Date: Fri Apr 16 16:34:47 2021 +0200 Drivers: hv: vmbus: Introduce and negotiate VMBus protocol version 5.3 Hyper-V has added VMBus protocol version 5.3. Allow Linux guests to negotiate the new version on version of Hyper-V that support it. Signed-off-by: Andrea Parri (Microsoft) Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/20210416143449.16185-2-parri.andrea@gmail.com Signed-off-by: Wei Liu commit fb8517f4fade44fa5e42e29ca4d6e4a7ed50b512 Author: Po-Hao Huang Date: Fri Apr 16 11:09:01 2021 +0800 rtw88: 8822c: add CFO tracking Add CFO tracking, which stands for central frequency offset tracking, to adjust oscillator to align central frequency of connected AP. Then, it can yield better performance. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210416030901.7099-1-pkshih@realtek.com commit c544d89b0d67d9b714846035913c270375c0ce00 Author: Johannes Berg Date: Thu Apr 15 16:48:46 2021 +0300 iwlwifi: pcie: don't enable BHs with IRQs disabled After the fix from Jiri that disabled local IRQs instead of just BHs (necessary to fix an issue with submitting a command with IRQs already disabled), there was still a situation in which we could deep in there enable BHs, if the device config sets the apmg_wake_up_wa configuration, which is true on all 7000 series devices. To fix that, but not require reverting commit 1ed08f6fb5ae ("iwlwifi: remove flags argument for nic_access"), split up nic access into a version with BH manipulation to use most of the time, and without it for this specific case where the local IRQs are already disabled. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20210415164821.d0f2edda1651.I75f762e0bed38914d1300ea198b86dd449b4b206@changeid commit fa84df705260513a6f690275d4fd2c0b054849b0 Author: Jiapeng Chong Date: Wed Apr 14 14:39:14 2021 +0800 bcma: remove unused function Fix the following clang warning: drivers/bcma/driver_mips.c:55:20: warning: unused function 'mips_write32' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1618382354-866-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 5e6087559e85470fbf96b78c3deb79465cefcbfd Author: Jiapeng Chong Date: Wed Apr 7 17:46:06 2021 +0800 wil6210: wmi: Remove useless code Fix the following whitescan warning: An unsigned value can never be less than 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1617788766-91433-1-git-send-email-jiapeng.chong@linux.alibaba.com commit cf366b15470484f41a69fd634e4fc638bcce81ae Author: Christophe JAILLET Date: Fri Apr 2 23:31:00 2021 +0200 carl9170: remove get_tid_h 'get_tid_h()' is the same as 'ieee80211_get_tid()'. So this function can be removed to save a few lines of code. Signed-off-by: Christophe JAILLET Acked-by: Christian Lamparter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/68efad7a597159e22771d37fc8b4a8a613866d60.1617399010.git.christophe.jaillet@wanadoo.fr commit a8e083ee8e2a6c94c29733835adae8bf5b832748 Author: Lv Yunlong Date: Fri Apr 2 11:26:27 2021 -0700 mwl8k: Fix a double Free in mwl8k_probe_hw In mwl8k_probe_hw, hw->priv->txq is freed at the first time by dma_free_coherent() in the call chain: if(!priv->ap_fw)->mwl8k_init_txqs(hw)->mwl8k_txq_init(hw, i). Then in err_free_queues of mwl8k_probe_hw, hw->priv->txq is freed at the second time by mwl8k_txq_deinit(hw, i)->dma_free_coherent(). My patch set txq->txd to NULL after the first free to avoid the double free. Fixes: a66098daacee2 ("mwl8k: Marvell TOPDOG wireless driver") Signed-off-by: Lv Yunlong Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210402182627.4256-1-lyl2019@mail.ustc.edu.cn commit 2ff25985ea9ccc6c9af2c77b0b49045adcc62e0e Author: Ping-Ke Shih Date: Thu Apr 1 14:27:17 2021 -0500 rtw88: Fix array overrun in rtw_get_tx_power_params() Using a kernel with the Undefined Behaviour Sanity Checker (UBSAN) enabled, the following array overrun is logged: ================================================================================ UBSAN: array-index-out-of-bounds in /home/finger/wireless-drivers-next/drivers/net/wireless/realtek/rtw88/phy.c:1789:34 index 5 is out of range for type 'u8 [5]' CPU: 2 PID: 84 Comm: kworker/u16:3 Tainted: G O 5.12.0-rc5-00086-gd88bba47038e-dirty #651 Hardware name: TOSHIBA TECRA A50-A/TECRA A50-A, BIOS Version 4.50 09/29/2014 Workqueue: phy0 ieee80211_scan_work [mac80211] Call Trace: dump_stack+0x64/0x7c ubsan_epilogue+0x5/0x40 __ubsan_handle_out_of_bounds.cold+0x43/0x48 rtw_get_tx_power_params+0x83a/drivers/net/wireless/realtek/rtw88/0xad0 [rtw_core] ? rtw_pci_read16+0x20/0x20 [rtw_pci] ? check_hw_ready+0x50/0x90 [rtw_core] rtw_phy_get_tx_power_index+0x4d/0xd0 [rtw_core] rtw_phy_set_tx_power_level+0xee/0x1b0 [rtw_core] rtw_set_channel+0xab/0x110 [rtw_core] rtw_ops_config+0x87/0xc0 [rtw_core] ieee80211_hw_config+0x9d/0x130 [mac80211] ieee80211_scan_state_set_channel+0x81/0x170 [mac80211] ieee80211_scan_work+0x19f/0x2a0 [mac80211] process_one_work+0x1dd/0x3a0 worker_thread+0x49/0x330 ? rescuer_thread+0x3a0/0x3a0 kthread+0x134/0x150 ? kthread_create_worker_on_cpu+0x70/0x70 ret_from_fork+0x22/0x30 ================================================================================ The statement where an array is being overrun is shown in the following snippet: if (rate <= DESC_RATE11M) tx_power = pwr_idx_2g->cck_base[group]; else ====> tx_power = pwr_idx_2g->bw40_base[group]; The associated arrays are defined in main.h as follows: struct rtw_2g_txpwr_idx { u8 cck_base[6]; u8 bw40_base[5]; struct rtw_2g_1s_pwr_idx_diff ht_1s_diff; struct rtw_2g_ns_pwr_idx_diff ht_2s_diff; struct rtw_2g_ns_pwr_idx_diff ht_3s_diff; struct rtw_2g_ns_pwr_idx_diff ht_4s_diff; }; The problem arises because the value of group is 5 for channel 14. The trivial increase in the dimension of bw40_base fails as this struct must match the layout of efuse. The fix is to add the rate as an argument to rtw_get_channel_group() and set the group for channel 14 to 4 if rate <= DESC_RATE11M. This patch fixes commit fa6dfe6bff24 ("rtw88: resolve order of tx power setting routines") Fixes: fa6dfe6bff24 ("rtw88: resolve order of tx power setting routines") Reported-by: Богдан Пилипенко Signed-off-by: Larry Finger Signed-off-by: Ping-Ke Shih Cc: Stable Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210401192717.28927-1-Larry.Finger@lwfinger.net commit 444a9af68b5cc2ca33d073605f747e0f00d6e7b9 Author: Wan Jiabing Date: Wed Mar 31 10:35:51 2021 +0800 wilc1000: Remove duplicate struct declaration struct wilc is declared twice. One has been declared at 352nd line. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210331023557.2804128-3-wanjiabing@vivo.com commit d663bc3317c9faf04c555331135a083b7648e939 Author: Wan Jiabing Date: Wed Mar 31 10:35:50 2021 +0800 brcmfmac: Remove duplicate struct declaration struct brcmf_bus is declared twice. One has been declared at 37th line. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210331023557.2804128-2-wanjiabing@vivo.com commit 7f50ddc5d4fe2384fab1f185f0c548dd9da48328 Author: Eric Lin Date: Wed Mar 31 09:04:18 2021 +0800 wl3501: fix typo of 'Networks' in comment Signed-off-by: Eric Lin Reported-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210331010418.1632816-2-dslin1010@gmail.com commit c434e5e48dc4e626364491455f97e2db0aa137b1 Author: Marek Vasut Date: Sun Mar 28 00:59:32 2021 +0100 rsi: Use resume_noirq for SDIO The rsi_resume() does access the bus to enable interrupts on the RSI SDIO WiFi card, however when calling sdio_claim_host() in the resume path, it is possible the bus is already claimed and sdio_claim_host() spins indefinitelly. Enable the SDIO card interrupts in resume_noirq instead to prevent anything else from claiming the SDIO bus first. Fixes: 20db07332736 ("rsi: sdio suspend and resume support") Signed-off-by: Marek Vasut Cc: Amitkumar Karwar Cc: Angus Ainslie Cc: David S. Miller Cc: Jakub Kicinski Cc: Kalle Valo Cc: Karun Eagalapati Cc: Martin Kepplinger Cc: Sebastian Krzyszkowiak Cc: Siva Rebbagondla Cc: netdev@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210327235932.175896-1-marex@denx.de commit ec7480ed0801dbecd431ae5b7e5c1debcf173b63 Author: Po-Hao Huang Date: Fri Mar 26 17:21:47 2021 +0800 rtw88: update statistics to fw for fine-tuning performance Since firmware can't have proper statistics, driver update the statistics periodically to firmware to assist in tuning performance. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210326092147.30252-1-pkshih@realtek.com commit d3240418a6623f0f308d013d621928f4ddf2b8d8 Author: Wan Jiabing Date: Thu Mar 25 14:41:51 2021 +0800 libertas: struct lbs_private is declared duplicately struct lbs_private has been declared at 22nd line. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210325064154.854245-1-wanjiabing@vivo.com commit 705b5cfab183c78618c4757262ef741a8d2db7e9 Author: Bhaskar Chowdhury Date: Tue Mar 23 10:06:57 2021 +0530 brcmfmac: A typo fix s/revsion/revision/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210323043657.1466296-1-unixbhaskar@gmail.com commit 3051946056c3b634605b275a223e48bcb796f49b Author: Aditya Srivastava Date: Mon Mar 15 23:02:59 2021 +0530 rsi: fix comment syntax in file headers The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are some files in drivers/net/wireless/rsi which follow this syntax in their file headers, i.e. start with '/**' like comments, which causes unexpected warnings from kernel-doc. E.g., running scripts/kernel-doc -none on drivers/net/wireless/rsi/rsi_coex.h causes this warning: "warning: wrong kernel-doc identifier on line: * Copyright (c) 2018 Redpine Signals Inc." Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e., "/*", to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Reviewed-by: Randy Dunlap Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210315173259.8757-1-yashsri421@gmail.com commit 5afa7e8b70d65819245fece61a65fd753b4aae33 Author: Theodore Ts'o Date: Sat Apr 17 23:03:50 2021 -0400 fs: fix reporting supported extra file attributes for statx() statx(2) notes that any attribute that is not indicated as supported by stx_attributes_mask has no usable value. Commits 801e523796004 ("fs: move generic stat response attr handling to vfs_getattr_nosec") and 712b2698e4c02 ("fs/stat: Define DAX statx attribute") sets STATX_ATTR_AUTOMOUNT and STATX_ATTR_DAX, respectively, without setting stx_attributes_mask, which can cause xfstests generic/532 to fail. Fix this in the same way as commit 1b9598c8fb99 ("xfs: fix reporting supported extra file attributes for statx()") Fixes: 801e523796004 ("fs: move generic stat response attr handling to vfs_getattr_nosec") Fixes: 712b2698e4c02 ("fs/stat: Define DAX statx attribute") Cc: stable@kernel.org Signed-off-by: Theodore Ts'o commit 75c4021aacbd9b5cc13b173d32b49007fd8ccada Author: Pavel Begunkov Date: Thu Apr 15 13:07:40 2021 +0100 io_uring: check register restriction afore quiesce Move restriction checks of __io_uring_register() before quiesce, saves from waiting for requests in fail case and simplifies the code a bit. Also add array_index_nospec() for safety Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/88d7913c9280ee848fdb7b584eea37a465391cee.1618488258.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 38134ada0ceea3e848fe993263c0ff6207fd46e7 Author: Pavel Begunkov Date: Thu Apr 15 13:07:39 2021 +0100 io_uring: fix overflows checks in provide buffers Colin reported before possible overflow and sign extension problems in io_provide_buffers_prep(). As Linus pointed out previous attempt did nothing useful, see d81269fecb8ce ("io_uring: fix provide_buffers sign extension"). Do that with help of check__overflow helpers. And fix struct io_provide_buf::len type, as it doesn't make much sense to keep it signed. Reported-by: Colin Ian King Fixes: efe68c1ca8f49 ("io_uring: validate the full range of provided buffers for access") Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/46538827e70fce5f6cdb50897cff4cacc490f380.1618488258.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c82d5bc703825a47af5c600e82e1e0c1db49e036 Author: Pavel Begunkov Date: Thu Apr 15 13:40:50 2021 +0100 io_uring: don't fail submit with overflow backlog Don't fail submission attempts if there are CQEs in the overflow backlog, but give away the decision making to the userspace. It might be very inconvenient to the userspace, especially if submission and completion are done by different threads. We can remove it because of recent changes, where requests are now not locked by the backlog, backlog entries are allocated separately, so they take less space and cgroup accounted. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 11ac4e668a449af328379f9fb2e1712357d2eca5 Author: Heiner Kallweit Date: Thu Apr 15 20:59:47 2021 +0200 r8169: keep pause settings on interface down/up cycle Currently, if the user changes the pause settings, the default settings will be restored after an interface down/up cycle, and also when resuming from suspend. This doesn't seem to provide the best user experience. Change this to keep user settings, and just ensure that in jumbo mode pause is disabled. Small drawback: When switching back mtu from jumbo to non-jumbo then pause remains disabled (but user can enable it using ethtool). I think that's a not too common scenario and acceptable. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit a80f24945fcfdff31bdf04837145e56570741a67 Author: Qii Wang Date: Sat Apr 17 14:46:52 2021 +0800 i2c: mediatek: Use scl_int_delay_ns to compensate clock-stretching The parameters of tSU,STA/tHD,STA/tSU,STOP maybe out of spec due to device clock-stretch or circuit loss, we could get a suitable scl_int_delay_ns from i2c_timings to compensate these parameters to meet the spec via EXT_CONF register. Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 3186b880447ad3cc9b6487fa626a71d64b831524 Author: Qii Wang Date: Sat Apr 17 14:46:51 2021 +0800 i2c: mediatek: Fix wrong dma sync flag The right flag is apdma_sync when apdma remove hand-shake signel. Fixes: 05f6f7271a38 ("i2c: mediatek: Fix apdma and i2c hand-shake timeout") Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 63ce8e3df8f6deca2da52eaf064751ad4018b46e Author: Qii Wang Date: Sat Apr 17 14:46:50 2021 +0800 i2c: mediatek: Fix send master code at more than 1MHz There are some omissions in the previous patch about replacing I2C_MAX_FAST_MODE__FREQ with I2C_MAX_FAST_MODE_PLUS_FREQ and need to fix it. Fixes: b44658e755b5("i2c: mediatek: Send i2c master code at more than 1MHz") Signed-off-by: Qii Wang Signed-off-by: Wolfram Sang commit 92dfb27240fea2776f61c5422472cb6defca7767 Author: Sergey Shtylyov Date: Sat Apr 17 22:05:05 2021 +0300 i2c: sh7760: fix IRQ error path While adding the invalid IRQ check after calling platform_get_irq(), I managed to overlook that the driver has a complex error path in its probe() method, thus a simple *return* couldn't be used. Use a proper *goto* instead! Fixes: e5b2e3e74201 ("i2c: sh7760: add IRQ check") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang commit 8203c7ce4ef2840929d38b447b4ccd384727f92b Merge: 474f459360399 88a5af943985f Author: Jakub Kicinski Date: Sat Apr 17 10:42:54 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net drivers/net/ethernet/stmicro/stmmac/stmmac_main.c - keep the ZC code, drop the code related to reinit net/bridge/netfilter/ebtables.c - fix build after move to net_generic Signed-off-by: Jakub Kicinski commit 7909a590eba6d021f104958857cbc4f0089daceb Author: Arnd Bergmann Date: Tue Mar 23 14:16:28 2021 +0100 airo: work around stack usage warning gcc-11 with KASAN on 32-bit arm produces a warning about a function that needs a lot of stack space: drivers/net/wireless/cisco/airo.c: In function 'setup_card.constprop': drivers/net/wireless/cisco/airo.c:3960:1: error: the frame size of 1512 bytes is larger than 1400 bytes [-Werror=frame-larger-than=] Most of this is from a single large structure that could be dynamically allocated or moved into the per-device structure. However, as the callers all seem to have a fairly well bounded call chain, the easiest change is to pull out the part of the function that needs the large variables into a separate function and mark that as noinline_for_stack. This does not reduce the total stack usage, but it gets rid of the warning and requires minimal changes otherwise. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210323131634.2669455-1-arnd@kernel.org commit 7b0e2c4f6be3ec68bf807c84e985e81c21404cd1 Author: Arnd Bergmann Date: Tue Mar 23 13:57:14 2021 +0100 wlcore: fix overlapping snprintf arguments in debugfs gcc complains about undefined behavior in calling snprintf() with the same buffer as input and output: drivers/net/wireless/ti/wl18xx/debugfs.c: In function 'diversity_num_of_packets_per_ant_read': drivers/net/wireless/ti/wl18xx/../wlcore/debugfs.h:86:3: error: 'snprintf' argument 4 overlaps destination object 'buf' [-Werror=restrict] 86 | snprintf(buf, sizeof(buf), "%s[%d] = %d\n", \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 87 | buf, i, stats->sub.name[i]); \ | ~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ti/wl18xx/debugfs.c:24:2: note: in expansion of macro 'DEBUGFS_FWSTATS_FILE_ARRAY' 24 | DEBUGFS_FWSTATS_FILE_ARRAY(a, b, c, wl18xx_acx_statistics) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/ti/wl18xx/debugfs.c:159:1: note: in expansion of macro 'WL18XX_DEBUGFS_FWSTATS_FILE_ARRAY' 159 | WL18XX_DEBUGFS_FWSTATS_FILE_ARRAY(diversity, num_of_packets_per_ant, There are probably other ways of handling the debugfs file, without using on-stack buffers, but a simple workaround here is to remember the current position in the buffer and just keep printing in there. Fixes: bcca1bbdd412 ("wlcore: add debugfs macro to help print fw statistics arrays") Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210323125723.1961432-1-arnd@kernel.org commit 01414f8882f944fe106a52a6d4c2ae8869822195 Author: Arnd Bergmann Date: Mon Mar 22 11:43:34 2021 +0100 libertas: avoid -Wempty-body warning Building without mesh supports shows a couple of warnings with 'make W=1': drivers/net/wireless/marvell/libertas/main.c: In function 'lbs_start_card': drivers/net/wireless/marvell/libertas/main.c:1068:37: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 1068 | lbs_start_mesh(priv); Change the macros to use the usual "do { } while (0)" instead to shut up the warnings and make the code a litte more robust. Signed-off-by: Arnd Bergmann Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210322104343.948660-4-arnd@kernel.org commit 431eb49e87ed8de7728b879e7288d85fb87f83ff Author: Christophe JAILLET Date: Mon Apr 5 11:09:14 2021 +0200 rtl8xxxu: Simplify locking of a skb list accesses The 'c2hcmd_lock' spinlock is only used to protect some __skb_queue_tail() and __skb_dequeue() calls. Use the lock provided in the skb itself and call skb_queue_tail() and skb_dequeue(). These functions already include the correct locking. Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/8bcec6429615aeb498482dc7e1955ce09b456585.1617613700.git.christophe.jaillet@wanadoo.fr commit 2f51061edab942988b1a3c057d21228e938603db Author: Dan Carpenter Date: Fri Mar 19 17:47:31 2021 +0300 wilc1000: fix a loop timeout condition If the loop fails, the "while(trials--) {" loop will exit with "trials" set to -1. The test for that expects it to end with "trials" set to 0 so the warning message will not be printed. Fix this by changing from a post-op to a pre-op. This does mean that we only make 99 attempts instead of 100 but that's okay. Fixes: f135a1571a05 ("wilc1000: Support chip sleep over SPI") Signed-off-by: Dan Carpenter Acked-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/YFS5gx/gi70zlIaO@mwanda commit c81852a48e137c61e8c85863b5a5104acc1a8270 Author: zuoqilin Date: Wed Mar 17 14:33:53 2021 +0800 mwifiex: Remove unneeded variable: "ret" Remove unneeded variable: "ret" Signed-off-by: zuoqilin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210317063353.1055-1-zuoqilin1@163.com commit bf3365a856a19ac6b96973dbf17069e0e5013e28 Author: Gustavo A. R. Silva Date: Fri Mar 5 03:48:50 2021 -0600 rtl8xxxu: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case. Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210305094850.GA141221@embeddedor commit a381b78a1598dde34a6e40dae2842024308a6ef2 Author: David Mosberger-Tang Date: Wed Mar 3 19:50:07 2021 +0000 wilc1000: Bring MAC address setting in line with typical Linux behavior Linux network drivers normally disallow changing the MAC address when the interface is up. This driver has been different in that it allows to change the MAC address *only* when it's up. This patch brings wilc1000 behavior more in line with other network drivers. We could have replaced wilc_set_mac_addr() with eth_mac_addr() but that would break existing documentation on how to change the MAC address. Likewise, return -EADDRNOTAVAIL (not -EINVAL) when the specified MAC address is invalid or unavailable. Signed-off-by: David Mosberger-Tang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210303194846.1823596-1-davidm@egauge.net commit c872e7ae056f16e27311fb30d637032cc3b1cb46 Author: David Mosberger-Tang Date: Sat Feb 27 17:31:38 2021 +0000 wilc1000: Add support for enabling CRC The driver so far has always disabled CRC protection. This means any data corruption that occurrs during the SPI transfers could go undetected. This patch adds module parameters enable_crc7 and enable_crc16 to selectively turn on CRC7 (for command transfers) and CRC16 (for data transfers), respectively. The default configuration remains unchanged, with both CRC7 and CRC16 off. The performance impact of CRC was measured by running ttcp -t four times in a row on a SAMA5 device: CRC7 CRC16 Throughput: Standard deviation: ---- ----- ----------- ------------------- off off 1720 +/- 48 KB/s on off 1658 +/- 58 KB/s on on 1579 +/- 84 KB/s Signed-off-by: David Mosberger-Tang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210227172818.1711071-4-davidm@egauge.net commit ce3b933832b6286d181c30f646449d6ccc2a2c8c Author: David Mosberger-Tang Date: Sat Feb 27 17:29:46 2021 +0000 wilc1000: Check for errors at end of DMA write After a DMA write to the WILC chip, check for and report any errors. This is based on code from the wilc driver in the linux-at91 repository. Signed-off-by: David Mosberger-Tang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210227172818.1711071-3-davidm@egauge.net commit 5ee2d9dd73fc7b371d208bea0971f81585b5ad3d Author: David Mosberger-Tang Date: Sat Feb 27 17:29:22 2021 +0000 wilc1000: Introduce symbolic names for SPI protocol register The WILC1000 protocol control register has bits for enabling the CRCs (CRC7 for commands and CRC16 for data) and to set the data packet size. Define symbolic names for those so the code is more easily understood. Signed-off-by: David Mosberger-Tang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210227172818.1711071-2-davidm@egauge.net commit f2131fa516b883841a593fc877dede57edd1ab0e Author: David Mosberger-Tang Date: Sat Feb 27 17:29:14 2021 +0000 wilc1000: Make SPI transfers work at 48MHz For CMD_SINGLE_READ and CMD_INTERNAL_READ, WILC may insert one or more zero bytes between the command response and the DATA Start tag (0xf3). This behavior appears to be undocumented in "ATWILC1000 USER GUIDE" (https://tinyurl.com/4hhshdts) but we have observed 1-4 zero bytes when the SPI bus operates at 48MHz and none when it operates at 1MHz. This code is derived from the equivalent code of the wilc driver in the linux-at91 repository. Signed-off-by: David Mosberger-Tang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210227172818.1711071-1-davidm@egauge.net commit d23a962203531ab281f233fa6140cf66ed4fb69f Author: Brian Norris Date: Wed Feb 24 18:44:54 2021 -0800 mwifiex: don't print SSID to logs There are a few reasons not to dump SSIDs as-is in kernel logs: 1) they're not guaranteed to be any particular text encoding (UTF-8, ASCII, ...) in general 2) it's somewhat redundant; the BSSID should be enough to uniquely identify the AP/STA to which we're connecting 3) BSSIDs have an easily-recognized format, whereas SSIDs do not (they are free-form) 4) other common drivers (e.g., everything based on mac80211) get along just fine by only including BSSIDs when logging state transitions Additional notes on reason #3: this is important for the privacy-conscious, especially when providing tools that convey kernel logs on behalf of a user -- e.g., when reporting bugs. So for example, it's easy to automatically filter logs for MAC addresses, but it's much harder to filter SSIDs out of unstructured text. Signed-off-by: Brian Norris Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210225024454.4106485-1-briannorris@chromium.org commit 260a9ad9446723d4063ed802989758852809714d Author: Dan Carpenter Date: Wed Apr 14 11:29:55 2021 +0300 ipw2x00: potential buffer overflow in libipw_wx_set_encodeext() The "ext->key_len" is a u16 that comes from the user. If it's over SCM_KEY_LEN (32) that could lead to memory corruption. Fixes: e0d369d1d969 ("[PATCH] ieee82011: Added WE-18 support to default wireless extension handler") Cc: stable@vger.kernel.org Signed-off-by: Dan Carpenter Acked-by: Stanislav Yakovlev Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/YHaoA1i+8uT4ir4h@mwanda commit e9642be26a372013e47801e1dd98e8f4dcf78f50 Author: Guobin Huang Date: Tue Apr 6 20:16:46 2021 +0800 rtlwifi: rtl8192de: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1617711406-49649-1-git-send-email-huangguobin4@huawei.com commit fb98734f79365d5aa0737a6fec0a8c84c05c8eaa Author: wengjianfeng Date: Tue Apr 6 10:52:06 2021 +0800 qtnfmac: remove meaningless goto statement and labels some function's label meaningless, the label statement follows the goto statement, no other statements, so just remove it. Reported-by: kernel test robot Signed-off-by: wengjianfeng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210406025206.4924-1-samirweng1979@163.com commit 1186006adee97ebb5b16db0e4ae64e8efb2c8f76 Author: Christophe JAILLET Date: Mon Apr 5 09:57:14 2021 +0200 rtlwifi: Simplify locking of a skb list accesses The 'c2hcmd_lock' spinlock is only used to protect some __skb_queue_tail() and __skb_dequeue() calls. Use the lock provided in the skb itself and call skb_queue_tail() and skb_dequeue(). These functions already include the correct locking. Signed-off-by: Christophe JAILLET Acked-by: Larry Finger Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/99cf8894fd52202cb7ce2ec6e3200eef400bc071.1617609346.git.christophe.jaillet@wanadoo.fr commit 987e9bcdd0b76a9d35f0b82013294429b401f7bb Author: Christophe JAILLET Date: Fri Apr 2 19:09:35 2021 +0200 rtlwifi: remove rtl_get_tid_h 'rtl_get_tid_h()' is the same as 'ieee80211_get_tid()'. So this function can be removed to save a line of code. Signed-off-by: Christophe JAILLET Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/db340a67a95c119e4f9ba8fa99aea1c73d0dcfc9.1617383263.git.christophe.jaillet@wanadoo.fr commit 8e04a06530c613b6a4c7806c1078d8305a788086 Author: Yang Li Date: Wed Mar 31 17:13:43 2021 +0800 rtlwifi: rtl8188ee: remove redundant assignment of variable rtlpriv->btcoexist.reg_bt_sco Assigning value "3" to "rtlpriv->btcoexist.reg_bt_sco" here, but that stored value is overwritten before it can be used. Coverity reports this problem as CWE563: A value assigned to a variable is never used. drivers/net/wireless/realtek/rtlwifi/rtl8188ee/hw.c: rtl8188ee_bt_reg_init Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1617182023-110950-1-git-send-email-yang.lee@linux.alibaba.com commit 87431bc1f0f67aa2d23ca1b9682fe54f68549d42 Author: Colin Ian King Date: Sat Mar 27 23:00:14 2021 +0000 rtlwifi: remove redundant assignment to variable err Variable err is assigned -ENODEV followed by an error return path via label error_out that does not access the variable and returns with the -ENODEV error return code. The assignment to err 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/20210327230014.25554-1-colin.king@canonical.com commit 2377b1c49d4831c09af269cdbe21791e8945cf97 Author: Bhaskar Chowdhury Date: Sun Mar 21 01:14:26 2021 +0530 rtlwifi: Few mundane typo fixes s/resovle/resolve/ s/broadcase/broadcast/ s/sytem/system/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210320194426.21621-1-unixbhaskar@gmail.com commit a221d0afbf39fcaadd481acf3551cd7269b647c2 Author: wengjianfeng Date: Tue Feb 23 14:57:54 2021 +0800 qtnfmac: remove meaningless labels some function's label meaningless, the return statement follows the goto statement, so just remove it. Signed-off-by: wengjianfeng Reviewed-by: Sergey Matyukevich Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210223065754.34392-1-samirweng1979@163.com commit 18fb0bedb5fc2fddc057dbe48b7360a6ffda34b3 Author: Ping-Ke Shih Date: Fri Feb 19 13:26:07 2021 +0800 rtlwifi: 8821ae: upgrade PHY and RF parameters The signal strength of 5G is quite low, so user can't connect to an AP far away. New parameters with new format and its parser are updated by the commit 84d26fda52e2 ("rtlwifi: Update 8821ae new phy parameters and its parser."), but some parameters are missing. Use this commit to update to the novel parameters that use new format. Fixes: 84d26fda52e2 ("rtlwifi: Update 8821ae new phy parameters and its parser") Signed-off-by: Ping-Ke Shih Tested-by: Kai-Heng Feng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210219052607.7323-1-pkshih@realtek.com commit 9dc5fdc8c4f889bd9ea5b6aa8b9d47ff9acef47e Author: Chen Lin Date: Tue Feb 16 12:30:33 2021 +0800 cw1200: Remove unused function pointer typedef wsm_* Remove the 'wsm_*' typedef as it is not used. Signed-off-by: Chen Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1613449833-4910-1-git-send-email-chen45464546@163.com commit 1c22233a745e46dbc11db30d1f65aaae01e26eb5 Author: Chen Lin Date: Tue Feb 16 11:41:58 2021 +0800 cw1200: Remove unused function pointer typedef cw1200_wsm_handler Remove the 'cw1200_wsm_handler' typedef as it is not used. Signed-off-by: Chen Lin Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1613446918-4532-1-git-send-email-chen45464546@163.com commit 2d036dfa5f10df9782f5278fc591d79d283c1fad Author: Chen Jun Date: Wed Apr 14 03:04:49 2021 +0000 posix-timers: Preserve return value in clock_adjtime32() The return value on success (>= 0) is overwritten by the return value of put_old_timex32(). That works correct in the fault case, but is wrong for the success case where put_old_timex32() returns 0. Just check the return value of put_old_timex32() and return -EFAULT in case it is not zero. [ tglx: Massage changelog ] Fixes: 3a4d44b61625 ("ntp: Move adjtimex related compat syscalls to native counterparts") Signed-off-by: Chen Jun Signed-off-by: Thomas Gleixner Reviewed-by: Richard Cochran Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210414030449.90692-1-chenjun102@huawei.com commit 6980d13f0dd189846887bbbfa43793d9a41768d3 Author: Srikar Dronamraju Date: Thu Apr 1 21:12:00 2021 +0530 powerpc/smp: Set numa node before updating mask Geethika reported a trace when doing a dlpar CPU add. ------------[ cut here ]------------ WARNING: CPU: 152 PID: 1134 at kernel/sched/topology.c:2057 CPU: 152 PID: 1134 Comm: kworker/152:1 Not tainted 5.12.0-rc5-master #5 Workqueue: events cpuset_hotplug_workfn NIP: c0000000001cfc14 LR: c0000000001cfc10 CTR: c0000000007e3420 REGS: c0000034a08eb260 TRAP: 0700 Not tainted (5.12.0-rc5-master+) MSR: 8000000000029033 CR: 28828422 XER: 00000020 CFAR: c0000000001fd888 IRQMASK: 0 #012GPR00: c0000000001cfc10 c0000034a08eb500 c000000001f35400 0000000000000027 #012GPR04: c0000035abaa8010 c0000035abb30a00 0000000000000027 c0000035abaa8018 #012GPR08: 0000000000000023 c0000035abaaef48 00000035aa540000 c0000035a49dffe8 #012GPR12: 0000000028828424 c0000035bf1a1c80 0000000000000497 0000000000000004 #012GPR16: c00000000347a258 0000000000000140 c00000000203d468 c000000001a1a490 #012GPR20: c000000001f9c160 c0000034adf70920 c0000034aec9fd20 0000000100087bd3 #012GPR24: 0000000100087bd3 c0000035b3de09f8 0000000000000030 c0000035b3de09f8 #012GPR28: 0000000000000028 c00000000347a280 c0000034aefe0b00 c0000000010a2a68 NIP [c0000000001cfc14] build_sched_domains+0x6a4/0x1500 LR [c0000000001cfc10] build_sched_domains+0x6a0/0x1500 Call Trace: [c0000034a08eb500] [c0000000001cfc10] build_sched_domains+0x6a0/0x1500 (unreliable) [c0000034a08eb640] [c0000000001d1e6c] partition_sched_domains_locked+0x3ec/0x530 [c0000034a08eb6e0] [c0000000002936d4] rebuild_sched_domains_locked+0x524/0xbf0 [c0000034a08eb7e0] [c000000000296bb0] rebuild_sched_domains+0x40/0x70 [c0000034a08eb810] [c000000000296e74] cpuset_hotplug_workfn+0x294/0xe20 [c0000034a08ebc30] [c000000000178dd0] process_one_work+0x300/0x670 [c0000034a08ebd10] [c0000000001791b8] worker_thread+0x78/0x520 [c0000034a08ebda0] [c000000000185090] kthread+0x1a0/0x1b0 [c0000034a08ebe10] [c00000000000ccec] ret_from_kernel_thread+0x5c/0x70 Instruction dump: 7d2903a6 4e800421 e8410018 7f67db78 7fe6fb78 7f45d378 7f84e378 7c681b78 3c62ff1a 3863c6f8 4802dc35 60000000 <0fe00000> 3920fff4 f9210070 e86100a0 ---[ end trace 532d9066d3d4d7ec ]--- Some of the per-CPU masks use cpu_cpu_mask as a filter to limit the search for related CPUs. On a dlpar add of a CPU, update cpu_cpu_mask before updating the per-CPU masks. This will ensure the cpu_cpu_mask is updated correctly before its used in setting the masks. Setting the numa_node will ensure that when cpu_cpu_mask() gets called, the correct node number is used. This code movement helped fix the above call trace. Reported-by: Geetika Moolchandani Signed-off-by: Srikar Dronamraju Reviewed-by: Nathan Lynch Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210401154200.150077-1-srikar@linux.vnet.ibm.com commit 8931a454aea03bab21b3b8fcdc94f674eebd1c5d Author: Sean Christopherson Date: Thu Apr 1 17:56:56 2021 -0700 KVM: Take mmu_lock when handling MMU notifier iff the hva hits a memslot Defer acquiring mmu_lock in the MMU notifier paths until a "hit" has been detected in the memslots, i.e. don't take the lock for notifications that don't affect the guest. For small VMs, spurious locking is a minor annoyance. And for "volatile" setups where the majority of notifications _are_ relevant, this barely qualifies as an optimization. But, for large VMs (hundreds of threads) with static setups, e.g. no page migration, no swapping, etc..., the vast majority of MMU notifier callbacks will be unrelated to the guest, e.g. will often be in response to the userspace VMM adjusting its own virtual address space. In such large VMs, acquiring mmu_lock can be painful as it blocks vCPUs from handling page faults. In some scenarios it can even be "fatal" in the sense that it causes unacceptable brownouts, e.g. when rebuilding huge pages after live migration, a significant percentage of vCPUs will be attempting to handle page faults. x86's TDP MMU implementation is especially susceptible to spurious locking due it taking mmu_lock for read when handling page faults. Because rwlock is fair, a single writer will stall future readers, while the writer is itself stalled waiting for in-progress readers to complete. This is exacerbated by the MMU notifiers often firing multiple times in quick succession, e.g. moving a page will (always?) invoke three separate notifiers: .invalidate_range_start(), invalidate_range_end(), and .change_pte(). Unnecessarily taking mmu_lock each time means even a single spurious sequence can be problematic. Note, this optimizes only the unpaired callbacks. Optimizing the .invalidate_range_{start,end}() pairs is more complex and will be done in a future patch. Suggested-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210402005658.3024832-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f922bd9bf33bd5a8c6694927f010f32127810fbf Author: Sean Christopherson Date: Thu Apr 1 17:56:55 2021 -0700 KVM: Move MMU notifier's mmu_lock acquisition into common helper Acquire and release mmu_lock in the __kvm_handle_hva_range() helper instead of requiring the caller to do the same. This paves the way for future patches to take mmu_lock if and only if an overlapping memslot is found, without also having to introduce the on_lock() shenanigans used to manipulate the notifier count and sequence. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210402005658.3024832-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b4c5936c47f86295cc76672e8dbeeca8b2379ba6 Author: Sean Christopherson Date: Thu Apr 1 17:56:54 2021 -0700 KVM: Kill off the old hva-based MMU notifier callbacks Yank out the hva-based MMU notifier APIs now that all architectures that use the notifiers have moved to the gfn-based APIs. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210402005658.3024832-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b1c5356e873cc4fcbb8f58965e0cd910f3ee37a9 Author: Sean Christopherson Date: Thu Apr 1 17:56:53 2021 -0700 KVM: PPC: Convert to the gfn-based MMU notifier callbacks Move PPC to the gfn-base MMU notifier APIs, and update all 15 bajillion PPC-internal hooks to work with gfns instead of hvas. No meaningful functional change intended, though the exact order of operations is slightly different since the memslot lookups occur before calling into arch code. Signed-off-by: Sean Christopherson Message-Id: <20210402005658.3024832-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d923ff258423b7c30e257d7adcd791f845e1b5fb Author: Sean Christopherson Date: Thu Apr 1 17:56:52 2021 -0700 KVM: MIPS/MMU: Convert to the gfn-based MMU notifier callbacks Move MIPS to the gfn-based MMU notifier APIs, which do the hva->gfn lookup in common code, and whose code is nearly identical to MIPS' lookup. No meaningful functional change intended, though the exact order of operations is slightly different since the memslot lookups occur before calling into arch code. Signed-off-by: Sean Christopherson Message-Id: <20210402005658.3024832-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit cd4c7183522817087278b3e000b8a888f9f91b5c Author: Sean Christopherson Date: Thu Apr 1 17:56:51 2021 -0700 KVM: arm64: Convert to the gfn-based MMU notifier callbacks Move arm64 to the gfn-base MMU notifier APIs, which do the hva->gfn lookup in common code. No meaningful functional change intended, though the exact order of operations is slightly different since the memslot lookups occur before calling into arch code. Reviewed-by: Marc Zyngier Tested-by: Marc Zyngier Signed-off-by: Sean Christopherson Message-Id: <20210402005658.3024832-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3039bcc744980afe87c612122e47a27306483bc2 Author: Sean Christopherson Date: Thu Apr 1 17:56:50 2021 -0700 KVM: Move x86's MMU notifier memslot walkers to generic code Move the hva->gfn lookup for MMU notifiers into common code. Every arch does a similar lookup, and some arch code is all but identical across multiple architectures. In addition to consolidating code, this will allow introducing optimizations that will benefit all architectures without incurring multiple walks of the memslots, e.g. by taking mmu_lock if and only if a relevant range exists in the memslots. The use of __always_inline to avoid indirect call retpolines, as done by x86, may also benefit other architectures. Consolidating the lookups also fixes a wart in x86, where the legacy MMU and TDP MMU each do their own memslot walks. Lastly, future enhancements to the memslot implementation, e.g. to add an interval tree to track host address, will need to touch far less arch specific code. MIPS, PPC, and arm64 will be converted one at a time in future patches. Signed-off-by: Sean Christopherson Message-Id: <20210402005658.3024832-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c13fda237f08a388ba8a0849785045944bf39834 Author: Sean Christopherson Date: Fri Apr 2 02:56:49 2021 +0200 KVM: Assert that notifier count is elevated in .change_pte() In KVM's .change_pte() notification callback, replace the notifier sequence bump with a WARN_ON assertion that the notifier count is elevated. An elevated count provides stricter protections than bumping the sequence, and the sequence is guarnateed to be bumped before the count hits zero. When .change_pte() was added by commit 828502d30073 ("ksm: add mmu_notifier set_pte_at_notify()"), bumping the sequence was necessary as .change_pte() would be invoked without any surrounding notifications. However, since commit 6bdb913f0a70 ("mm: wrap calls to set_pte_at_notify with invalidate_range_start and invalidate_range_end"), all calls to .change_pte() are guaranteed to be surrounded by start() and end(), and so are guaranteed to run with an elevated notifier count. Note, wrapping .change_pte() with .invalidate_range_{start,end}() is a bug of sorts, as invalidating the secondary MMU's (KVM's) PTE defeats the purpose of .change_pte(). Every arch's kvm_set_spte_hva() assumes .change_pte() is called when the relevant SPTE is present in KVM's MMU, as the original goal was to accelerate Kernel Samepage Merging (KSM) by updating KVM's SPTEs without requiring a VM-Exit (due to invalidating the SPTE). I.e. it means that .change_pte() is effectively dead code on _all_ architectures. x86 and MIPS are clearcut nops if the old SPTE is not-present, and that is guaranteed due to the prior invalidation. PPC simply unmaps the SPTE, which again should be a nop due to the invalidation. arm64 is a bit murky, but it's also likely a nop because kvm_pgtable_stage2_map() is called without a cache pointer, which means it will map an entry if and only if an existing PTE was found. For now, take advantage of the bug to simplify future consolidation of KVMs's MMU notifier code. Doing so will not greatly complicate fixing .change_pte(), assuming it's even worth fixing. .change_pte() has been broken for 8+ years and no one has complained. Even if there are KSM+KVM users that care deeply about its performance, the benefits of avoiding VM-Exits via .change_pte() need to be reevaluated to justify the added complexity and testing burden. Ripping out .change_pte() entirely would be a lot easier. Signed-off-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit fe9a5b055116dff7fcee081abc2def4b14d24c21 Author: Paolo Bonzini Date: Wed Mar 31 09:40:39 2021 +0200 KVM: MIPS: defer flush to generic MMU notifier code Return 1 from kvm_unmap_hva_range and kvm_set_spte_hva if a flush is needed, so that the generic code can coalesce the flushes. Signed-off-by: Paolo Bonzini commit 566a0beef52c83f13b67aef02b2bc0aa63c0e0d6 Author: Paolo Bonzini Date: Fri Apr 2 11:44:56 2021 +0200 KVM: MIPS: let generic code call prepare_flush_shadow Since all calls to kvm_flush_remote_tlbs must be preceded by kvm_mips_callbacks->prepare_flush_shadow, repurpose kvm_arch_flush_remote_tlb to invoke it. This makes it possible to use the TLB flushing mechanism provided by the generic MMU notifier code. Signed-off-by: Paolo Bonzini commit 5194552fb1ffb4248c8db3f7286aa4ac7ae3163b Author: Paolo Bonzini Date: Wed Mar 31 09:38:16 2021 +0200 KVM: MIPS: rework flush_shadow_* callbacks into one that prepares the flush Both trap-and-emulate and VZ have a single implementation that covers both .flush_shadow_all and .flush_shadow_memslot, and both of them end with a call to kvm_flush_remote_tlbs. Unify the callbacks into one and extract the call to kvm_flush_remote_tlbs. The next patches will pull it further out of the the architecture-specific MMU notifier functions kvm_unmap_hva_range and kvm_set_spte_hva. Signed-off-by: Paolo Bonzini commit 6c9dd6d26216ad9733e57f382e1669c142494aab Author: Paolo Bonzini Date: Fri Apr 2 17:53:09 2021 +0200 KVM: constify kvm_arch_flush_remote_tlbs_memslot memslots are stored in RCU and there should be no need to change them. Signed-off-by: Paolo Bonzini commit 85f479308333c538ddb39ac8e0b009a03a1af066 Author: Sean Christopherson Date: Tue Apr 6 12:07:40 2021 -0700 KVM: Explicitly use GFP_KERNEL_ACCOUNT for 'struct kvm_vcpu' allocations Use GFP_KERNEL_ACCOUNT when allocating vCPUs to make it more obvious that that the allocations are accounted, to make it easier to audit KVM's allocations in the future, and to be consistent with other cache usage in KVM. When using SLAB/SLUB, this is a nop as the cache itself is created with SLAB_ACCOUNT. When using SLOB, there are caveats within caveats. SLOB doesn't honor SLAB_ACCOUNT, so passing GFP_KERNEL_ACCOUNT will result in vCPU allocations now being accounted. But, even that depends on internal SLOB details as SLOB will only go to the page allocator when its cache is depleted. That just happens to be extremely likely for vCPUs because the size of kvm_vcpu is larger than the a page for almost all combinations of architecture and page size. Whether or not the SLOB behavior is by design is unknown; it's just as likely that no SLOB users care about accounding and so no one has bothered to implemented support in SLOB. Regardless, accounting vCPU allocations will not break SLOB+KVM+cgroup users, if any exist. Reviewed-by: Wanpeng Li Acked-by: David Rientjes Signed-off-by: Sean Christopherson Message-Id: <20210406190740.4055679-1-seanjc@google.com> Signed-off-by: Paolo Bonzini commit dbb6964e4c38509936719223530acb1870cd6e86 Author: Paolo Bonzini Date: Fri Apr 2 08:05:19 2021 -0400 KVM: MMU: protect TDP MMU pages only down to required level When using manual protection of dirty pages, it is not necessary to protect nested page tables down to the 4K level; instead KVM can protect only hugepages in order to split them lazily, and delay write protection at 4K-granularity until KVM_CLEAR_DIRTY_LOG. This was overlooked in the TDP MMU, so do it there as well. Fixes: a6a0b05da9f37 ("kvm: x86/mmu: Support dirty logging for the TDP MMU") Cc: Ben Gardon Reviewed-by: Keqian Zhu Signed-off-by: Paolo Bonzini commit a43b80b782c9f56b3bcc2e5e51261dc3980839ec Author: Maxim Levitsky Date: Thu Apr 1 16:54:47 2021 +0300 KVM: s390x: implement KVM_CAP_SET_GUEST_DEBUG2 Define KVM_GUESTDBG_VALID_MASK and use it to implement this capabiity. Compile tested only. Signed-off-by: Maxim Levitsky Message-Id: <20210401135451.1004564-6-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit fa18aca927578f4ae2a01fd588e791d4ea5fe085 Author: Maxim Levitsky Date: Thu Apr 1 16:54:46 2021 +0300 KVM: aarch64: implement KVM_CAP_SET_GUEST_DEBUG2 Move KVM_GUESTDBG_VALID_MASK to kvm_host.h and use it to return the value of this capability. Compile tested only. Signed-off-by: Maxim Levitsky Message-Id: <20210401135451.1004564-5-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 7e582ccbbd737181a5f9a7e3b8f7523a62550796 Author: Maxim Levitsky Date: Thu Apr 1 16:54:45 2021 +0300 KVM: x86: implement KVM_CAP_SET_GUEST_DEBUG2 Store the supported bits into KVM_GUESTDBG_VALID_MASK macro, similar to how arm does this. Signed-off-by: Maxim Levitsky Message-Id: <20210401135451.1004564-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 8b13c36493d8cb56fc3b386507873c5412b7108d Author: Paolo Bonzini Date: Tue Apr 6 10:24:07 2021 -0400 KVM: introduce KVM_CAP_SET_GUEST_DEBUG2 This capability will allow the user to know which KVM_GUESTDBG_* bits are supported. Signed-off-by: Maxim Levitsky Message-Id: <20210401135451.1004564-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 4020da3b9f0c7e403b654c43da989f8c0bb05b57 Author: Maxim Levitsky Date: Thu Apr 1 17:38:14 2021 +0300 KVM: x86: pending exceptions must not be blocked by an injected event Injected interrupts/nmi should not block a pending exception, but rather be either lost if nested hypervisor doesn't intercept the pending exception (as in stock x86), or be delivered in exitintinfo/IDT_VECTORING_INFO field, as a part of a VMexit that corresponds to the pending exception. The only reason for an exception to be blocked is when nested run is pending (and that can't really happen currently but still worth checking for). Signed-off-by: Maxim Levitsky Message-Id: <20210401143817.1030695-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit b9c36fdedd837021f2e72a36e9a12cd4971bcb35 Author: Yang Yingliang Date: Thu Apr 1 22:25:14 2021 +0800 KVM: selftests: remove redundant semi-colon Signed-off-by: Yang Yingliang Message-Id: <20210401142514.1688199-1-yangyingliang@huawei.com> Signed-off-by: Paolo Bonzini commit 232f75d3b4b5456de6f0b671aa86345d62de1473 Author: Maxim Levitsky Date: Thu Apr 1 17:18:10 2021 +0300 KVM: nSVM: call nested_svm_load_cr3 on nested state load While KVM's MMU should be fully reset by loading of nested CR0/CR3/CR4 by KVM_SET_SREGS, we are not in nested mode yet when we do it and therefore only root_mmu is reset. On regular nested entries we call nested_svm_load_cr3 which both updates the guest's CR3 in the MMU when it is needed, and it also initializes the mmu again which makes it initialize the walk_mmu as well when nested paging is enabled in both host and guest. Since we don't call nested_svm_load_cr3 on nested state load, the walk_mmu can be left uninitialized, which can lead to a NULL pointer dereference while accessing it if we happen to get a nested page fault right after entering the nested guest first time after the migration and we decide to emulate it, which leads to the emulator trying to access walk_mmu->gva_to_gpa which is NULL. Therefore we should call this function on nested state load as well. Suggested-by: Paolo Bonzini Signed-off-by: Maxim Levitsky Message-Id: <20210401141814.1029036-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 8486039a6c9f8f56ae8ad06394043b61fcbb7211 Author: David Edmondson Date: Thu Mar 18 12:08:41 2021 +0000 KVM: x86: dump_vmcs should include the autoload/autostore MSR lists When dumping the current VMCS state, include the MSRs that are being automatically loaded/stored during VM entry/exit. Suggested-by: Paolo Bonzini Signed-off-by: David Edmondson Message-Id: <20210318120841.133123-6-david.edmondson@oracle.com> Signed-off-by: Paolo Bonzini commit 0702a3cbbf735a0ae67fb336590f75be37f01efe Author: David Edmondson Date: Thu Mar 18 12:08:40 2021 +0000 KVM: x86: dump_vmcs should show the effective EFER If EFER is not being loaded from the VMCS, show the effective value by reference to the MSR autoload list or calculation. Suggested-by: Sean Christopherson Signed-off-by: David Edmondson Message-Id: <20210318120841.133123-5-david.edmondson@oracle.com> Signed-off-by: Paolo Bonzini commit 5518da62d433ccee53d39e98c4afe353132b1f56 Author: David Edmondson Date: Thu Mar 18 12:08:39 2021 +0000 KVM: x86: dump_vmcs should consider only the load controls of EFER/PAT When deciding whether to dump the GUEST_IA32_EFER and GUEST_IA32_PAT fields of the VMCS, examine only the VM entry load controls, as saving on VM exit has no effect on whether VM entry succeeds or fails. Suggested-by: Sean Christopherson Signed-off-by: David Edmondson Message-Id: <20210318120841.133123-4-david.edmondson@oracle.com> Signed-off-by: Paolo Bonzini commit 699e1b2e557810ad8596971b969ddcd7712dfd70 Author: David Edmondson Date: Thu Mar 18 12:08:38 2021 +0000 KVM: x86: dump_vmcs should not conflate EFER and PAT presence in VMCS Show EFER and PAT based on their individual entry/exit controls. Signed-off-by: David Edmondson Message-Id: <20210318120841.133123-3-david.edmondson@oracle.com> Signed-off-by: Paolo Bonzini commit d9e46d344e62a0d56fd86a8289db5bed8a57c92e Author: David Edmondson Date: Thu Mar 18 12:08:37 2021 +0000 KVM: x86: dump_vmcs should not assume GUEST_IA32_EFER is valid If the VM entry/exit controls for loading/saving MSR_EFER are either not available (an older processor or explicitly disabled) or not used (host and guest values are the same), reading GUEST_IA32_EFER from the VMCS returns an inaccurate value. Because of this, in dump_vmcs() don't use GUEST_IA32_EFER to decide whether to print the PDPTRs - always do so if the fields exist. Fixes: 4eb64dce8d0a ("KVM: x86: dump VMCS on invalid entry") Signed-off-by: David Edmondson Message-Id: <20210318120841.133123-2-david.edmondson@oracle.com> Signed-off-by: Paolo Bonzini commit adc2a23734acd607bdf30dc08ba8ffc5ee2a8c9d Author: Maxim Levitsky Date: Thu Apr 1 14:19:28 2021 +0300 KVM: nSVM: improve SYSENTER emulation on AMD Currently to support Intel->AMD migration, if CPU vendor is GenuineIntel, we emulate the full 64 value for MSR_IA32_SYSENTER_{EIP|ESP} msrs, and we also emulate the sysenter/sysexit instruction in long mode. (Emulator does still refuse to emulate sysenter in 64 bit mode, on the ground that the code for that wasn't tested and likely has no users) However when virtual vmload/vmsave is enabled, the vmload instruction will update these 32 bit msrs without triggering their msr intercept, which will lead to having stale values in kvm's shadow copy of these msrs, which relies on the intercept to be up to date. Fix/optimize this by doing the following: 1. Enable the MSR intercepts for SYSENTER MSRs iff vendor=GenuineIntel (This is both a tiny optimization and also ensures that in case the guest cpu vendor is AMD, the msrs will be 32 bit wide as AMD defined). 2. Store only high 32 bit part of these msrs on interception and combine it with hardware msr value on intercepted read/writes iff vendor=GenuineIntel. 3. Disable vmload/vmsave virtualization if vendor=GenuineIntel. (It is somewhat insane to set vendor=GenuineIntel and still enable SVM for the guest but well whatever). Then zero the high 32 bit parts when kvm intercepts and emulates vmload. Thanks a lot to Paulo Bonzini for helping me with fixing this in the most correct way. This patch fixes nested migration of 32 bit nested guests, that was broken because incorrect cached values of SYSENTER msrs were stored in the migration stream if L1 changed these msrs with vmload prior to L2 entry. Signed-off-by: Maxim Levitsky Message-Id: <20210401111928.996871-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit c1df4aac44494cbf266ce1ba12a9172a6c23c1b1 Author: Maxim Levitsky Date: Thu Apr 1 14:19:27 2021 +0300 KVM: x86: add guest_cpuid_is_intel This is similar to existing 'guest_cpuid_is_amd_or_hygon' Signed-off-by: Maxim Levitsky Message-Id: <20210401111928.996871-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit eba04b20e4861d9bdbd8470a13c0c6e824521a36 Author: Sean Christopherson Date: Tue Mar 30 19:30:25 2021 -0700 KVM: x86: Account a variety of miscellaneous allocations Switch to GFP_KERNEL_ACCOUNT for a handful of allocations that are clearly associated with a single task/VM. Note, there are a several SEV allocations that aren't accounted, but those can (hopefully) be fixed by using the local stack for memory. Signed-off-by: Sean Christopherson Message-Id: <20210331023025.2485960-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8727906fde6ea665b52e68ddc58833772537f40a Author: Sean Christopherson Date: Tue Mar 30 20:19:36 2021 -0700 KVM: SVM: Do not allow SEV/SEV-ES initialization after vCPUs are created Reject KVM_SEV_INIT and KVM_SEV_ES_INIT if they are attempted after one or more vCPUs have been created. KVM assumes a VM is tagged SEV/SEV-ES prior to vCPU creation, e.g. init_vmcb() needs to mark the VMCB as SEV enabled, and svm_create_vcpu() needs to allocate the VMSA. At best, creating vCPUs before SEV/SEV-ES init will lead to unexpected errors and/or behavior, and at worst it will crash the host, e.g. sev_launch_update_vmsa() will dereference a null svm->vmsa pointer. Fixes: 1654efcbc431 ("KVM: SVM: Add KVM_SEV_INIT command") Fixes: ad73109ae7ec ("KVM: SVM: Provide support to launch and run an SEV-ES guest") Cc: stable@vger.kernel.org Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210331031936.2495277-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 9fa1521daafb58d878d03d75f6863a11312fae22 Author: Sean Christopherson Date: Tue Mar 30 20:19:35 2021 -0700 KVM: SVM: Do not set sev->es_active until KVM_SEV_ES_INIT completes Set sev->es_active only after the guts of KVM_SEV_ES_INIT succeeds. If the command fails, e.g. because SEV is already active or there are no available ASIDs, then es_active will be left set even though the VM is not fully SEV-ES capable. Refactor the code so that "es_active" is passed on the stack instead of being prematurely shoved into sev_info, both to avoid having to unwind sev_info and so that it's more obvious what actually consumes es_active in sev_guest_init() and its helpers. Fixes: ad73109ae7ec ("KVM: SVM: Provide support to launch and run an SEV-ES guest") Cc: stable@vger.kernel.org Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210331031936.2495277-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c36b16d29f3af5f32fc1b2a3401bf48f71cabee1 Author: Sean Christopherson Date: Tue Mar 30 20:19:34 2021 -0700 KVM: SVM: Use online_vcpus, not created_vcpus, to iterate over vCPUs Use the kvm_for_each_vcpu() helper to iterate over vCPUs when encrypting VMSAs for SEV, which effectively switches to use online_vcpus instead of created_vcpus. This fixes a possible null-pointer dereference as created_vcpus does not guarantee a vCPU exists, since it is updated at the very beginning of KVM_CREATE_VCPU. created_vcpus exists to allow the bulk of vCPU creation to run in parallel, while still correctly restricting the max number of max vCPUs. Fixes: ad73109ae7ec ("KVM: SVM: Provide support to launch and run an SEV-ES guest") Cc: stable@vger.kernel.org Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210331031936.2495277-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8f8f52a45d928d638c7ffbd081de85c692b28964 Author: Sean Christopherson Date: Tue Mar 30 17:49:42 2021 -0700 KVM: x86/mmu: Simplify code for aging SPTEs in TDP MMU Use a basic NOT+AND sequence to clear the Accessed bit in TDP MMU SPTEs, as opposed to the fancy ffs()+clear_bit() logic that was copied from the legacy MMU. The legacy MMU uses clear_bit() because it is operating on the SPTE itself, i.e. clearing needs to be atomic. The TDP MMU operates on a local variable that it later writes to the SPTE, and so doesn't need to be atomic or even resident in memory. Opportunistically drop unnecessary initialization of new_spte, it's guaranteed to be written before being accessed. Using NOT+AND instead of ffs()+clear_bit() reduces the sequence from: 0x0000000000058be6 <+134>: test %rax,%rax 0x0000000000058be9 <+137>: je 0x58bf4 0x0000000000058beb <+139>: test %rax,%rdi 0x0000000000058bee <+142>: je 0x58cdc 0x0000000000058bf4 <+148>: mov %rdi,0x8(%rsp) 0x0000000000058bf9 <+153>: mov $0xffffffff,%edx 0x0000000000058bfe <+158>: bsf %eax,%edx 0x0000000000058c01 <+161>: movslq %edx,%rdx 0x0000000000058c04 <+164>: lock btr %rdx,0x8(%rsp) 0x0000000000058c0b <+171>: mov 0x8(%rsp),%r15 to: 0x0000000000058bdd <+125>: test %rax,%rax 0x0000000000058be0 <+128>: je 0x58beb 0x0000000000058be2 <+130>: test %rax,%r8 0x0000000000058be5 <+133>: je 0x58cc0 0x0000000000058beb <+139>: not %rax 0x0000000000058bee <+142>: and %r8,%rax 0x0000000000058bf1 <+145>: mov %rax,%r15 thus eliminating several memory accesses, including a locked access. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210331004942.2444916-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6d9aafb96d5f665d038229e7561388c38430b3a8 Author: Sean Christopherson Date: Tue Mar 30 17:49:41 2021 -0700 KVM: x86/mmu: Remove spurious clearing of dirty bit from TDP MMU SPTE Don't clear the dirty bit when aging a TDP MMU SPTE (in response to a MMU notifier event). Prematurely clearing the dirty bit could cause spurious PML updates if aging a page happened to coincide with dirty logging. Note, tdp_mmu_set_spte_no_acc_track() flows into __handle_changed_spte(), so the host PFN will be marked dirty, i.e. there is no potential for data corruption. Fixes: a6a0b05da9f3 ("kvm: x86/mmu: Support dirty logging for the TDP MMU") Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210331004942.2444916-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6dfbd6b5d5de19bad36f44710359200f21191134 Author: Sean Christopherson Date: Thu Mar 25 19:19:57 2021 -0700 KVM: x86/mmu: Drop trace_kvm_age_page() tracepoint Remove x86's trace_kvm_age_page() tracepoint. It's mostly redundant with the common trace_kvm_age_hva() tracepoint, and if there is a need for the extra details, e.g. gfn, referenced, etc... those details should be added to the common tracepoint so that all architectures and MMUs benefit from the info. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-19-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 501b918525efec2e701e806f04d474d7da350962 Author: Sean Christopherson Date: Thu Mar 25 19:19:48 2021 -0700 KVM: Move arm64's MMU notifier trace events to generic code Move arm64's MMU notifier trace events into common code in preparation for doing the hva->gfn lookup in common code. The alternative would be to trace the gfn instead of hva, but that's not obviously better and could also be done in common code. Tracing the notifiers is also quite handy for debug regardless of architecture. Remove a completely redundant tracepoint from PPC e500. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5f7c292b8975c9146063abbb91c0b9cdc1a5e9c5 Author: Sean Christopherson Date: Thu Mar 25 19:19:47 2021 -0700 KVM: Move prototypes for MMU notifier callbacks to generic code Move the prototypes for the MMU notifier callbacks out of arch code and into common code. There is no benefit to having each arch replicate the prototypes since any deviation from the invocation in common code will explode. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit aaaac889cf63a6c2e5f4b20c20cccf5aeb78bd51 Author: Sean Christopherson Date: Thu Mar 25 19:19:46 2021 -0700 KVM: x86/mmu: Use leaf-only loop for walking TDP SPTEs when changing SPTE Use the leaf-only TDP iterator when changing the SPTE in reaction to a MMU notifier. Practically speaking, this is a nop since the guts of the loop explicitly looks for 4k SPTEs, which are always leaf SPTEs. Switch the iterator to match age_gfn_range() and test_age_gfn() so that a future patch can consolidate the core iterating logic. No real functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a3f15bda46e85c33e55b23aa51dd542453f134e3 Author: Sean Christopherson Date: Thu Mar 25 19:19:45 2021 -0700 KVM: x86/mmu: Pass address space ID to TDP MMU root walkers Move the address space ID check that is performed when iterating over roots into the macro helpers to consolidate code. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2b9663d8a19d0a3efd29fd4f5f3e2c4ea88982c7 Author: Sean Christopherson Date: Thu Mar 25 19:19:44 2021 -0700 KVM: x86/mmu: Pass address space ID to __kvm_tdp_mmu_zap_gfn_range() Pass the address space ID to TDP MMU's primary "zap gfn range" helper to allow the MMU notifier paths to iterate over memslots exactly once. Currently, both the legacy MMU and TDP MMU iterate over memslots when looking for an overlapping hva range, which can be quite costly if there are a large number of memslots. Add a "flush" parameter so that iterating over multiple address spaces in the caller will continue to do the right thing when yielding while a flush is pending from a previous address space. Note, this also has a functional change in the form of coalescing TLB flushes across multiple address spaces in kvm_zap_gfn_range(), and also optimizes the TDP MMU to utilize range-based flushing when running as L1 with Hyper-V enlightenments. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-6-seanjc@google.com> [Keep separate for loops to prepare for other incoming patches. - Paolo] Signed-off-by: Paolo Bonzini commit 1a61b7db7a8dc44ce5010926ed48b519dda92d84 Author: Sean Christopherson Date: Thu Mar 25 19:19:43 2021 -0700 KVM: x86/mmu: Coalesce TLB flushes across address spaces for gfn range zap Gather pending TLB flushes across both address spaces when zapping a given gfn range. This requires feeding "flush" back into subsequent calls, but on the plus side sets the stage for further batching between the legacy MMU and TDP MMU. It also allows refactoring the address space iteration to cover the legacy and TDP MMUs without introducing truly ugly code. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 142ccde1f7b1b0c621c299cbcc8feb6353f7cc92 Author: Sean Christopherson Date: Thu Mar 25 19:19:42 2021 -0700 KVM: x86/mmu: Coalesce TLB flushes when zapping collapsible SPTEs Gather pending TLB flushes across both the legacy and TDP MMUs when zapping collapsible SPTEs to avoid multiple flushes if both the legacy MMU (for nested guests) and TDP MMU have mappings for the memslot. Note, this also optimizes the TDP MMU to flush only the relevant range when running as L1 with Hyper-V enlightenments. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 302695a5747e82267c344d177cdd4866cbccee8e Author: Sean Christopherson Date: Thu Mar 25 19:19:41 2021 -0700 KVM: x86/mmu: Move flushing for "slot" handlers to caller for legacy MMU Place the onus on the caller of slot_handle_*() to flush the TLB, rather than handling the flush in the helper, and rename parameters accordingly. This will allow future patches to coalesce flushes between address spaces and between the legacy and TDP MMUs. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit af95b53e56e34a4df343cec32b3a3276d9d06ad3 Author: Sean Christopherson Date: Thu Mar 25 19:19:40 2021 -0700 KVM: x86/mmu: Coalesce TDP MMU TLB flushes when zapping collapsible SPTEs When zapping collapsible SPTEs across multiple roots, gather pending flushes and perform a single remote TLB flush at the end, as opposed to flushing after processing every root. Note, flush may be cleared by the result of zap_collapsible_spte_range(). This is intended and correct, e.g. yielding may have serviced a prior pending flush. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210326021957.1424875-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c28fa560c5bb4a58b362622beb0ca8479a480636 Author: Vitaly Kuznetsov Date: Mon Mar 29 14:48:04 2021 +0200 KVM: x86/vPMU: Forbid reading from MSR_F15H_PERF MSRs when guest doesn't have X86_FEATURE_PERFCTR_CORE MSR_F15H_PERF_CTL0-5, MSR_F15H_PERF_CTR0-5 MSRs have a CPUID bit assigned to them (X86_FEATURE_PERFCTR_CORE) and when it wasn't exposed to the guest the correct behavior is to inject #GP an not just return zero. Signed-off-by: Vitaly Kuznetsov Message-Id: <20210329124804.170173-1-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini commit 9a7de6ecc3ed80efb95fe1d97b6440922e55dbda Author: Krish Sadhukhan Date: Tue Mar 23 13:50:03 2021 -0400 KVM: nSVM: If VMRUN is single-stepped, queue the #DB intercept in nested_svm_vmexit() According to APM, the #DB intercept for a single-stepped VMRUN must happen after the completion of that instruction, when the guest does #VMEXIT to the host. However, in the current implementation of KVM, the #DB intercept for a single-stepped VMRUN happens after the completion of the instruction that follows the VMRUN instruction. When the #DB intercept handler is invoked, it shows the RIP of the instruction that follows VMRUN, instead of of VMRUN itself. This is an incorrect RIP as far as single-stepping VMRUN is concerned. This patch fixes the problem by checking, in nested_svm_vmexit(), for the condition that the VMRUN instruction is being single-stepped and if so, queues the pending #DB intercept so that the #DB is accounted for before we execute L1's next instruction. Suggested-by: Paolo Bonzini Signed-off-by: Krish Sadhukhan Message-Id: <20210323175006.73249-2-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit 4a38162ee9f10f5f67c36f4f5aa4f6be2657efd5 Author: Paolo Bonzini Date: Thu Apr 8 08:10:25 2021 -0400 KVM: MMU: load PDPTRs outside mmu_lock On SVM, reading PDPTRs might access guest memory, which might fault and thus might sleep. On the other hand, it is not possible to release the lock after make_mmu_pages_available has been called. Therefore, push the call to make_mmu_pages_available and the mmu_lock critical section within mmu_alloc_direct_roots and mmu_alloc_shadow_roots. Reported-by: Wanpeng Li Co-developed-by: Sean Christopherson Signed-off-by: Paolo Bonzini commit d9bd0082e2e2f38c4a15fa53f06ef0817102b4a6 Merge: 387cb8e89d7fb 523caed9efbb0 Author: Paolo Bonzini Date: Sat Apr 17 08:29:47 2021 -0400 Merge remote-tracking branch 'tip/x86/sgx' into kvm-next Pull generic x86 SGX changes needed to support SGX in virtual machines. commit 387cb8e89d7fb731337120cce04931f0f06113ea Merge: 6c377b02a8018 44bada2821903 Author: Paolo Bonzini Date: Sat Apr 17 08:29:41 2021 -0400 Merge tag 'kvm-s390-next-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Fix potential crash in preemptible kernels There is a potential race for preemptible kernels, where the host kernel would get a fault when it is preempted as the wrong point in time. commit 7153d4bf0b373428d0393c001019da4d0483fddb Author: Xiongwei Song Date: Wed Apr 14 19:00:33 2021 +0800 powerpc/traps: Enhance readability for trap types Define macros to list ppc interrupt types in interttupt.h, replace the reference of the trap hex values with these macros. Referred the hex numbers in arch/powerpc/kernel/exceptions-64e.S, arch/powerpc/kernel/exceptions-64s.S, arch/powerpc/kernel/head_*.S, arch/powerpc/kernel/head_booke.h and arch/powerpc/include/asm/kvm_asm.h. Signed-off-by: Xiongwei Song [mpe: Resolve conflicts in nmi_disables_ftrace(), fix 40x build] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1618398033-13025-1-git-send-email-sxwjean@me.com commit 9406415f46f6127fd31bb66f0260f7a61a8d2786 Author: Peter Zijlstra Date: Thu Apr 15 18:23:17 2021 +0200 sched/debug: Rename the sched_debug parameter to sched_verbose CONFIG_SCHED_DEBUG is the build-time Kconfig knob, the boot param sched_debug and the /debug/sched/debug_enabled knobs control the sched_debug_enabled variable, but what they really do is make SCHED_DEBUG more verbose, so rename the lot. Signed-off-by: Peter Zijlstra (Intel) commit 9b9310445f5a6741399ebe2ba08137fecd7f73f9 Author: Jiapeng Chong Date: Thu Apr 15 16:37:01 2021 +0800 rtc: ds1511: remove unused function Fix the following clang warning: drivers/rtc/rtc-ds1511.c:108:1: warning: unused function 'rtc_write_alarm' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1618475821-102974-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 7fcb86185978661c9188397d474f90364745b8d9 Author: Michael Walle Date: Wed Apr 14 10:40:06 2021 +0200 rtc: fsl-ftm-alarm: add MODULE_TABLE() The module doesn't load automatically. Fix it by adding the missing MODULE_TABLE(). Fixes: 7b0b551dbc1e ("rtc: fsl-ftm-alarm: add FTM alarm driver") Signed-off-by: Michael Walle Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210414084006.17933-1-michael@walle.cc commit 197b9c152badc4003b1e10837f4536cb66a50f3c Merge: 961b27ffc58ef 7c81a025054cd Author: Kalle Valo Date: Sat Apr 17 11:38:01 2021 +0300 Merge tag 'iwlwifi-next-for-kalle-2021-04-12-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next iwlwifi patches for v5.13 * Add support for new FTM FW APIs; * Some CSA fixes; * Support for new HW family and other HW detection fixes; * Robustness improvement in the HW detection code; * One fix in PMF; * Some new regulatory features; * Support for passive scan in 6GHz; * Some improvements in the sync queue implementation; * Support for new devices; * Support for a new FW API command version; * Some locking fixes; * Bump the FW API version support for AX devices; * Some other small fixes, clean-ups and improvements. # gpg: Signature made Wed 14 Apr 2021 12:33:29 PM EEST using RSA key ID 1A3CC5FA # gpg: Good signature from "Luciano Roth Coelho (Luca) " # gpg: aka "Luciano Roth Coelho (Intel) " commit 961b27ffc58efbcccce0c275cce9a8f70e064d0f Merge: 3a1aa533f7f67 481fc927c8289 Author: Kalle Valo Date: Sat Apr 17 11:34:43 2021 +0300 Merge tag 'mt76-for-kvalo-2021-04-12' of https://github.com/nbd168/wireless mt76 patches for 5.13 * code cleanup * mt7915/mt7615 decap offload support * driver fixes * mt7613 eeprom support * MCU code unification * threaded NAPI support * new device IDs * mt7921 device reset support * rx timestamp support # gpg: Signature made Tue 13 Apr 2021 12:11:25 AM 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 d86f43b17ed4cd751f73d890ea63f818ffa5ef3d Author: Lucas Endres Date: Fri Apr 16 11:50:20 2021 -0500 ALSA: usb-audio: Add support for many Roland devices' implicit feedback quirks It makes USB audio capture and playback possible and pristine on my Roland INTEGRA-7, Boutique D-05, and R-26, along with many more I've encountered people having had issues with over the last decade or so. Signed-off-by: Lucas Endres Link: https://lore.kernel.org/r/CAOsVg8rA61B=005_VyUwpw3piVwA7Bo5fs1GYEB054efyzGjLw@mail.gmail.com Signed-off-by: Takashi Iwai commit 7de21e679e6a789f3729e8402bc440b623a28eae Author: Tony Ambardar Date: Thu Sep 17 06:54:37 2020 -0700 powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h A few archs like powerpc have different errno.h values for macros EDEADLOCK and EDEADLK. In code including both libc and linux versions of errno.h, this can result in multiple definitions of EDEADLOCK in the include chain. Definitions to the same value (e.g. seen with mips) do not raise warnings, but on powerpc there are redefinitions changing the value, which raise warnings and errors (if using "-Werror"). Guard against these redefinitions to avoid build errors like the following, first seen cross-compiling libbpf v5.8.9 for powerpc using GCC 8.4.0 with musl 1.1.24: In file included from ../../arch/powerpc/include/uapi/asm/errno.h:5, from ../../include/linux/err.h:8, from libbpf.c:29: ../../include/uapi/asm-generic/errno.h:40: error: "EDEADLOCK" redefined [-Werror] #define EDEADLOCK EDEADLK In file included from toolchain-powerpc_8540_gcc-8.4.0_musl/include/errno.h:10, from libbpf.c:26: toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/errno.h:58: note: this is the location of the previous definition #define EDEADLOCK 58 cc1: all warnings being treated as errors Cc: Stable Reported-by: Rosen Penev Signed-off-by: Tony Ambardar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200917135437.1238787-1-Tony.Ambardar@gmail.com commit c1e53367dab15e41814cff4e37df8ec4ac8fb9d7 Author: Srikar Dronamraju Date: Thu Apr 15 17:39:34 2021 +0530 powerpc/smp: Cache CPU to chip lookup On systems with large CPUs per node, even with the filtered matching of related CPUs, there can be large number of calls to cpu_to_chip_id for the same CPU. For example with 4096 vCPU, 1 node QEMU configuration, with 4 threads per core, system could be see upto 1024 calls to cpu_to_chip_id() for the same CPU. On a given system, cpu_to_chip_id() for a given CPU would always return the same. Hence cache the result in a lookup table for use in subsequent calls. Since all CPUs sharing the same core will belong to the same chip, the lookup_table has an entry for one CPU per core. chip_id_lookup_table is not being freed and would be used on subsequent CPU online post CPU offline. Reported-by: Daniel Henrique Barboza Suggested-by: Michael Ellerman Signed-off-by: Srikar Dronamraju Tested-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210415120934.232271-4-srikar@linux.vnet.ibm.com commit 131c82b6a1d261705a6f98368e501d43d994018d Author: Srikar Dronamraju Date: Thu Apr 15 17:39:33 2021 +0530 Revert "powerpc/topology: Update topology_core_cpumask" Now that cpu_core_mask has been reintroduced, lets revert commit 4bce545903fa ("powerpc/topology: Update topology_core_cpumask") Post this commit, lscpu should reflect topologies as requested by a user when a QEMU instance is launched with NUMA spanning multiple sockets. Reported-by: Daniel Henrique Barboza Signed-off-by: Srikar Dronamraju Tested-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210415120934.232271-3-srikar@linux.vnet.ibm.com commit c47f892d7aa62765bf0689073f75990b4517a4cf Author: Srikar Dronamraju Date: Thu Apr 15 17:39:32 2021 +0530 powerpc/smp: Reintroduce cpu_core_mask Daniel reported that with Commit 4ca234a9cbd7 ("powerpc/smp: Stop updating cpu_core_mask") QEMU was unable to set single NUMA node SMP topologies such as: -smp 8,maxcpus=8,cores=2,threads=2,sockets=2 i.e he expected 2 sockets in one NUMA node. The above commit helped to reduce boot time on Large Systems for example 4096 vCPU single socket QEMU instance. PAPR is silent on having more than one socket within a NUMA node. cpu_core_mask and cpu_cpu_mask for any CPU would be same unless the number of sockets is different from the number of NUMA nodes. One option is to reintroduce cpu_core_mask but use a slightly different method to arrive at the cpu_core_mask. Previously each CPU's chip-id would be compared with all other CPU's chip-id to verify if both the CPUs were related at the chip level. Now if a CPU 'A' is found related / (unrelated) to another CPU 'B', all the thread siblings of 'A' and thread siblings of 'B' are automatically marked as related / (unrelated). Also if a platform doesn't support ibm,chip-id property, i.e its cpu_to_chip_id returns -1, cpu_core_map holds a copy of cpu_cpu_mask(). Fixes: 4ca234a9cbd7 ("powerpc/smp: Stop updating cpu_core_mask") Reported-by: Daniel Henrique Barboza Signed-off-by: Srikar Dronamraju Tested-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210415120934.232271-2-srikar@linux.vnet.ibm.com commit e9e16917bc388846163b8566a298a291d71e44c9 Author: Cédric Le Goater Date: Tue Apr 13 15:03:52 2021 +0200 powerpc/xive: Use the "ibm, chip-id" property only under PowerNV The 'chip_id' field of the XIVE CPU structure is used to choose a target for a source located on the same chip. For that, the XIVE driver queries the chip identifier from the "ibm,chip-id" property and compares it to a 'src_chip' field identifying the chip of a source. This information is only available on the PowerNV platform, 'src_chip' being assigned to XIVE_INVALID_CHIP_ID under pSeries. The "ibm,chip-id" property is also not available on all platforms. It was first introduced on PowerNV and later, under QEMU for pSeries/KVM. However, the property is not part of PAPR and does not exist under pSeries/PowerVM. Assign 'chip_id' to XIVE_INVALID_CHIP_ID by default and let the PowerNV platform override the value with the "ibm,chip-id" property. Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210413130352.1183267-1-clg@kaod.org commit 474f459360399c5becfd0f189a8894e9e17ad3d3 Merge: 820dd7a244fe2 442279154c73b Author: David S. Miller Date: Fri Apr 16 17:10:40 2021 -0700 Merge branch 'mptcp-fixes-and-tracepoints' Mat Martineau says: ==================== mptcp: Fixes and tracepoints from the mptcp tree Here's one more batch of changes that we've tested out in the MPTCP tree. Patch 1 makes the MPTCP KUnit config symbol more consistent with other subsystems. Patch 2 fixes a couple of format specifiers in pr_debug()s Patches 3-7 add four helpful tracepoints for MPTCP. Patch 8 is a one-line refactor to use an available helper macro. ==================== Signed-off-by: David S. Miller commit 442279154c73bc681e5346bdd1270a628dfdfdc7 Author: Geliang Tang Date: Fri Apr 16 15:38:08 2021 -0700 mptcp: use mptcp_for_each_subflow in mptcp_close This patch used the macro helper mptcp_for_each_subflow() instead of list_for_each_entry() in mptcp_close. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d96a838a7ce2772ed181f89becd79b72d267f93a Author: Geliang Tang Date: Fri Apr 16 15:38:07 2021 -0700 mptcp: add tracepoint in subflow_check_data_avail This patch added a tracepoint in subflow_check_data_avail() to show the mapping status. Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit ed66bfb4ce34a94174bb755eeaca85d1661d36ad Author: Geliang Tang Date: Fri Apr 16 15:38:06 2021 -0700 mptcp: add tracepoint in ack_update_msk This patch added a tracepoint in ack_update_msk() to track the incoming data_ack and window/snd_una updates. Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 0918e34b85c7e125f531caaf3d2918baf2b1a5f9 Author: Geliang Tang Date: Fri Apr 16 15:38:05 2021 -0700 mptcp: add tracepoint in get_mapping_status This patch added a tracepoint in the mapping status function get_mapping_status() to dump every mpext field. Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit e10a9892097672b62be4ea265a9eb48f698ca3b8 Author: Geliang Tang Date: Fri Apr 16 15:38:04 2021 -0700 mptcp: add tracepoint in mptcp_subflow_get_send This patch added a tracepoint in the packet scheduler function mptcp_subflow_get_send(). Suggested-by: Paolo Abeni Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 43f1140b9678e0fd9dcddd96faee8fad86a70061 Author: Geliang Tang Date: Fri Apr 16 15:38:03 2021 -0700 mptcp: export mptcp_subflow_active This patch moved the static function mptcp_subflow_active to protocol.h as an inline one. Acked-by: Paolo Abeni Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit e4b6135134a75f530bd634ea7c168efaf0f9dff3 Author: Geliang Tang Date: Fri Apr 16 15:38:02 2021 -0700 mptcp: fix format specifiers for unsigned int Some of the sequence numbers are printed as the negative ones in the debug log: [ 46.250932] MPTCP: DSS [ 46.250940] MPTCP: data_fin=0 dsn64=0 use_map=0 ack64=1 use_ack=1 [ 46.250948] MPTCP: data_ack=2344892449471675613 [ 46.251012] MPTCP: msk=000000006e157e3f status=10 [ 46.251023] MPTCP: msk=000000006e157e3f snd_data_fin_enable=0 pending=0 snd_nxt=2344892449471700189 write_seq=2344892449471700189 [ 46.251343] MPTCP: msk=00000000ec44a129 ssk=00000000f7abd481 sending dfrag at seq=-1658937016627538668 len=100 already sent=0 [ 46.251360] MPTCP: data_seq=16787807057082012948 subflow_seq=1 data_len=100 dsn64=1 This patch used the format specifier %u instead of %d for the unsigned int values to fix it. Fixes: d9ca1de8c0cd ("mptcp: move page frag allocation in mptcp_sendmsg()") Reviewed-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 3fcc8a25e39171a48b8025835942571b84455fd9 Author: Nico Pache Date: Fri Apr 16 15:38:01 2021 -0700 kunit: mptcp: adhere to KUNIT formatting standard Drop 'S' from end of CONFIG_MPTCP_KUNIT_TESTS in order to adhere to the KUNIT *_KUNIT_TEST config name format. Fixes: a00a582203db (mptcp: move crypto test to KUNIT) Reviewed-by: David Gow Reviewed-by: Matthieu Baerts Signed-off-by: Nico Pache Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 820dd7a244fe2d990d414172110f36cf5e8a936a Merge: bc45f524d90ff 24e3930971717 Author: David S. Miller Date: Fri Apr 16 17:08:40 2021 -0700 Merge branch 'enetc-xdp-fixes' Vladimir Oltean says: ==================== Fixups for XDP on NXP ENETC After some more XDP testing on the NXP LS1028A, this is a set of 10 bug fixes, simplifications and tweaks, ranging from addressing Toke's feedback (the network stack can run concurrently with XDP on the same TX rings) to fixing some OOM conditions seen under TX congestion. ==================== Signed-off-by: David S. Miller commit 24e393097171719e3a64abb8f4cc7bf8fbce2ac4 Author: Vladimir Oltean Date: Sat Apr 17 00:22:25 2021 +0300 net: enetc: apply the MDIO workaround for XDP_REDIRECT too Described in fd5736bf9f23 ("enetc: Workaround for MDIO register access issue") is a workaround for a hardware bug that requires a register access of the MDIO controller to never happen concurrently with a register access of a port PF. To avoid that, a mutual exclusion scheme with rwlocks was implemented - the port PF accessors are the 'read' side, and the MDIO accessors are the 'write' side. When we do XDP_REDIRECT between two ENETC interfaces, all is fine because the MDIO lock is already taken from the NAPI poll loop. But when the ingress interface is not ENETC, just the egress is, the MDIO lock is not taken, so we might access the port PF registers concurrently with MDIO, which will make the link flap due to wrong values returned from the PHY. To avoid this, let's just slap an enetc_lock_mdio/enetc_unlock_mdio at the beginning and ending of enetc_xdp_xmit. The fact that the MDIO lock is designed as a rwlock is important here, because the read side is reentrant (that is one of the main reasons why we chose it). Usually, the way we benefit of its reentrancy is by running the data path concurrently on both CPUs, but in this case, we benefit from the reentrancy by taking the lock even when the lock is already taken (and that's the situation where ENETC is both the ingress and the egress interface for XDP_REDIRECT, which was fine before and still is fine now). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 92ff9a6e578dc32950567efaf987328c32fefdc6 Author: Vladimir Oltean Date: Sat Apr 17 00:22:24 2021 +0300 net: enetc: fix buffer leaks with XDP_TX enqueue rejections If the TX ring is congested, enetc_xdp_tx() returns false for the current XDP frame (represented as an array of software BDs). This array of software TX BDs is constructed in enetc_rx_swbd_to_xdp_tx_swbd from software BDs freshly cleaned from the RX ring. The issue is that we scrub the RX software BDs too soon, more precisely before we know that we can enqueue the TX BDs successfully into the TX ring. If we can't enqueue them (and enetc_xdp_tx returns false), we call enetc_xdp_drop which attempts to recycle the buffers held by the RX software BDs. But because we scrubbed those RX BDs already, two things happen: (a) we leak their memory (b) we populate the RX software BD ring with an all-zero rx_swbd structure, which makes the buffer refill path allocate more memory. enetc_refill_rx_ring -> if (unlikely(!rx_swbd->page)) -> enetc_new_page That is a recipe for fast OOM. Fixes: 7ed2bc80074e ("net: enetc: add support for XDP_TX") Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 975acc833c9f34d784075815a8374760d1c6358b Author: Vladimir Oltean Date: Sat Apr 17 00:22:23 2021 +0300 net: enetc: handle the invalid XDP action the same way as XDP_DROP When the XDP program returns an invalid action, we should free the RX buffer. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7eab503b11ee1c4bb4a28866a6b029b0bbbeadfe Author: Vladimir Oltean Date: Sat Apr 17 00:22:22 2021 +0300 net: enetc: use dedicated TX rings for XDP It is possible for one CPU to perform TX hashing (see netdev_pick_tx) between the 8 ENETC TX rings, and the TX hashing to select TX queue 1. At the same time, it is possible for the other CPU to already use TX ring 1 for XDP (either XDP_TX or XDP_REDIRECT). Since there is no mutual exclusion between XDP and the network stack, we run into an issue because the ENETC TX procedure is not reentrant. The obvious approach would be to just make XDP take the lock of the network stack's TX queue corresponding to the ring it's about to enqueue in. For XDP_REDIRECT, this is quite straightforward, a lock at the beginning and end of enetc_xdp_xmit() should do the trick. But for XDP_TX, it's a bit more complicated. For one, we do TX batching all by ourselves for frames with the XDP_TX verdict. This is something we would like to keep the way it is, for performance reasons. But batching means that the network stack's lock should be kept from the first enqueued XDP_TX frame and until we ring the doorbell. That is mostly fine, except for cases when in the same NAPI loop we have mixed XDP_TX and XDP_REDIRECT frames. So if enetc_xdp_xmit() gets called while we are holding the lock from the RX NAPI, then bam, deadlock. The naive answer could be 'just flush the XDP_TX frames first, then release the network stack's TX queue lock, then call xdp_do_flush_map()'. But even xdp_do_redirect() is capable of flushing the batched XDP_REDIRECT frames, so unless we unlock/relock the TX queue around xdp_do_redirect(), there simply isn't any clean way to protect XDP_TX from concurrent network stack .ndo_start_xmit() on another CPU. So we need to take a different approach, and that is to reserve two rings for the sole use of XDP. We leave TX rings 0..ndev->real_num_tx_queues-1 to be handled by the network stack, and we pick them from the end of the priv->tx_ring array. We make an effort to keep the mapping done by enetc_alloc_msix() which decides which CPU handles the TX completions of which TX ring in its NAPI poll. So the XDP TX ring of CPU 0 is handled by TX ring 6, and the XDP TX ring of CPU 1 is handled by TX ring 7. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit ee3e875f10fca68fb7478c23c75b553e56da319c Author: Vladimir Oltean Date: Sat Apr 17 00:22:21 2021 +0300 net: enetc: increase TX ring size Now that commit d6a2829e82cf ("net: enetc: increase RX ring default size") has increased the RX ring size, it is quite easy to congest the TX rings when the traffic is predominantly XDP_TX, as the RX ring is quite a bit larger than the TX one. Since we bit the bullet and did the expensive thing already (larger RX rings consume more memory pages), it seems quite foolish to keep the TX rings small. So make them equally sized with TX. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a6369fe6e07d7e45aa5e73eccc6d426e92525e5c Author: Vladimir Oltean Date: Sat Apr 17 00:22:20 2021 +0300 net: enetc: remove unneeded xdp_do_flush_map() xdp_do_redirect already contains: -> dev_map_enqueue -> __xdp_enqueue -> bq_enqueue -> bq_xmit_all // if we have more than 16 frames So the logic from enetc will never be hit, because ENETC_DEFAULT_TX_WORK is 128. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8f50d8bb3f1c173492d1d224bce99486fd6ccd32 Author: Vladimir Oltean Date: Sat Apr 17 00:22:19 2021 +0300 net: enetc: stop XDP NAPI processing when build_skb() fails When the code path below fails: enetc_clean_rx_ring_xdp // XDP_PASS -> enetc_build_skb -> enetc_map_rx_buff_to_skb -> build_skb enetc_clean_rx_ring_xdp will 'break', but that 'break' instruction isn't strong enough to actually break the NAPI poll loop, just the switch/case statement for XDP actions. So we increment rx_frm_cnt and go to the next frames minding our own business. Instead let's do what the skb NAPI poll function does, and break the loop now, waiting for the memory pressure to go away. Otherwise the next calls to build_skb() are likely to fail too. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 672f9a21989e56c8233d1d8daab3e5eecf76c59e Author: Vladimir Oltean Date: Sat Apr 17 00:22:18 2021 +0300 net: enetc: recycle buffers for frames with RX errors When receiving a frame with errors, currently we do nothing with it (we don't construct an skb or an xdp_buff), we just exit the NAPI poll loop. Let's put the buffer back into the RX ring (similar to XDP_DROP). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6b04830d5e0d7cbe137310527e9ad114686edef7 Author: Vladimir Oltean Date: Sat Apr 17 00:22:17 2021 +0300 net: enetc: rename the buffer reuse helpers enetc_put_xdp_buff has nothing to do with XDP, frankly, it is just a helper to populate the recycle end of the shadow RX BD ring (next_to_alloc) with a given buffer. On the other hand, enetc_put_rx_buff plays more tricks than its name would suggest. So let's rename enetc_put_rx_buff into enetc_flip_rx_buff to reflect the half-page buffer reuse tricks that it employs, and enetc_put_xdp_buff into enetc_put_rx_buff which suggests a more garden-variety operation. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e9e49ae88ec86c370aae56700c9ff7421dcf91fe Author: Vladimir Oltean Date: Sat Apr 17 00:22:16 2021 +0300 net: enetc: remove redundant clearing of skb/xdp_frame pointer in TX conf path Later in enetc_clean_tx_ring we have: /* Scrub the swbd here so we don't have to do that * when we reuse it during xmit */ memset(tx_swbd, 0, sizeof(*tx_swbd)); So these assignments are unnecessary. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit bc45f524d90ffd7f3d4fb48f273046adb1ce5d2b Merge: 1e3d976dbb23b 1feaf60ff2608 Author: David S. Miller Date: Fri Apr 16 17:06:14 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2021-04-16 This series contains updates to igb and igc drivers. Ederson adjusts Tx buffer distributions in Qav mode to improve TSN-aware traffic for igb. He also enable PPS support and auxiliary PHC functions for igc. Grzegorz checks that the MTA register was properly written and retries if not for igb. Sasha adds reporting of EEE low power idle counters to ethtool and fixes a return value being overwritten through looping for igc. ==================== Signed-off-by: David S. Miller commit 1e3d976dbb23b3fce544752b434bdc32ce64aabc Author: Gustavo A. R. Silva Date: Fri Apr 16 14:31:51 2021 -0500 flow_dissector: Fix out-of-bounds warning in __skb_flow_bpf_to_target() Fix the following out-of-bounds warning: net/core/flow_dissector.c:835:3: warning: 'memcpy' offset [33, 48] from the object at 'flow_keys' is out of the bounds of referenced subobject 'ipv6_src' with type '__u32[4]' {aka 'unsigned int[4]'} at offset 16 [-Warray-bounds] The problem is that the original code is trying to copy data into a couple of struct members adjacent to each other in a single call to memcpy(). So, the compiler legitimately complains about it. As these are just a couple of members, fix this by copying each one of them in separate calls to memcpy(). This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 1c86514d7fda55c5311c6b75aacb8c41b2e83999 Merge: e5272ad4aab34 b572ec9ff087e Author: David S. Miller Date: Fri Apr 16 17:00:03 2021 -0700 Merge branch 'ethtool-stats' Jakub Kicinski says: ==================== ethtool: add uAPI for reading standard stats Continuing the effort of providing a unified access method to standard stats, and explicitly tying the definitions to the standards this series adds an API for general stats which do no fit into more targeted control APIs. There is nothing clever here, just a netlink API for dumping statistics defined by standards and RFCs which today end up in ethtool -S under infinite variations of names. This series adds basic IEEE stats (for PHY, MAC, Ctrl frames) and RMON stats. AFAICT other RFCs only duplicate the IEEE stats. This series does _not_ add a netlink API to read driver-defined stats. There seems to be little to gain from moving that part to netlink. The netlink message format is very simple, and aims to allow adding stats and groups with no changes to user tooling (which IIUC is expected for ethtool). On user space side we can re-use -S, and make it dump standard stats if --groups are defined. $ ethtool -S eth0 --groups eth-phy eth-mac eth-ctrl rmon Stats for eth0: eth-phy-SymbolErrorDuringCarrier: 0 eth-mac-FramesTransmittedOK: 0 eth-mac-FrameTooLongErrors: 0 eth-ctrl-MACControlFramesTransmitted: 0 eth-ctrl-MACControlFramesReceived: 1 eth-ctrl-UnsupportedOpcodesReceived: 0 rmon-etherStatsUndersizePkts: 0 rmon-etherStatsJabbers: 0 rmon-rx-etherStatsPkts64Octets: 1 rmon-rx-etherStatsPkts128to255Octets: 0 rmon-rx-etherStatsPkts1024toMaxOctets: 1 rmon-tx-etherStatsPkts64Octets: 1 rmon-tx-etherStatsPkts128to255Octets: 0 rmon-tx-etherStatsPkts1024toMaxOctets: 1 v1: Driver support for mlxsw, mlx5 and bnxt included. Compared to the RFC I went ahead with wrapping the stats into a 1:1 nest. Now IDs of stats can start from 0, at a cost of slightly "careful" u64 alignment handling. v2: Add missing kdoc in patch 5. ==================== Signed-off-by: David S. Miller commit b572ec9ff087eb71a857d5af277480818f6a1c59 Author: Jakub Kicinski Date: Fri Apr 16 12:27:45 2021 -0700 mlx5: implement ethtool standard stats Add support for PHY/MAC/Ctrl/RMON stats. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 782bc00affcd63dacaa34e9ab6da588605423312 Author: Jakub Kicinski Date: Fri Apr 16 12:27:44 2021 -0700 bnxt: implement ethtool standard stats Most of the names seem to strongly correlate with names from the standard and RFC. Whether ..+good_frames are indeed Frames..OK I'm the least sure of. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit c1912ab0eeba6ba7fbf601bad9c2992d5f528672 Author: Jakub Kicinski Date: Fri Apr 16 12:27:43 2021 -0700 mlxsw: implement ethtool standard stats mlxsw has nicely grouped stats, add support for standard uAPI. I'm guessing the register access part. Compile tested only. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit a8b06e9d40d8b18c41c8ce060e8dc004fa59e708 Author: Jakub Kicinski Date: Fri Apr 16 12:27:42 2021 -0700 ethtool: add interface to read RMON stats Most devices maintain RMON (RFC 2819) stats - particularly the "histogram" of packets received by size. Unlike other RFCs which duplicate IEEE stats, the short/oversized frame counters in RMON don't seem to match IEEE stats 1-to-1 either, so expose those, too. Do not expose basic packet, CRC errors etc - those are already otherwise covered. Because standard defines packet ranges only up to 1518, and everything above that should theoretically be "oversized" - devices often create their own ranges. Going beyond what the RFC defines - expose the "histogram" in the Tx direction (assume for now that the ranges will be the same). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit bfad2b979ddcc330c08bb071eb3c3f7b3411a681 Author: Jakub Kicinski Date: Fri Apr 16 12:27:41 2021 -0700 ethtool: add interface to read standard MAC Ctrl stats Number of devices maintains the standard-based MAC control counters for control frames. Add a API for those. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ca2244547ec7505d1cf61d43f5e76e3ffd99cf77 Author: Jakub Kicinski Date: Fri Apr 16 12:27:40 2021 -0700 ethtool: add interface to read standard MAC stats Most of the MAC statistics are included in struct rtnl_link_stats64, but some fields are aggregated. Besides it's good to expose these clearly hardware stats separately. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit f09ea6fb12723d6726293d68de00b6307368bd76 Author: Jakub Kicinski Date: Fri Apr 16 12:27:39 2021 -0700 ethtool: add a new command for reading standard stats Add an interface for reading standard stats, including stats which don't have a corresponding control interface. Start with IEEE 802.3 PHY stats. There seems to be only one stat to expose there. Define API to not require user space changes when new stats or groups are added. Groups are based on bitset, stats have a string set associated. v1: wrap stats in a nest Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ddc78b3621242dd691ef4c234a80e316422c2876 Author: Jakub Kicinski Date: Fri Apr 16 12:27:38 2021 -0700 docs: ethtool: document standard statistics Add documentation for ETHTOOL_MSG_STATS_GET. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit f117c48c0dc88a50dc2f761fd3df25bd6f9b6c6f Author: Jakub Kicinski Date: Fri Apr 16 12:27:37 2021 -0700 docs: networking: extend the statistics documentation Make the lack of expectations for switching NICs explicit, describe the new stats. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit e5272ad4aab347dde5610c0aedb786219e3ff793 Author: Gustavo A. R. Silva Date: Fri Apr 16 14:12:36 2021 -0500 sctp: Fix out-of-bounds warning in sctp_process_asconf_param() Fix the following out-of-bounds warning: net/sctp/sm_make_chunk.c:3150:4: warning: 'memcpy' offset [17, 28] from the object at 'addr' is out of the bounds of referenced subobject 'v4' with type 'struct sockaddr_in' at offset 0 [-Warray-bounds] This helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva Reviewed-by: Kees Cook Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller commit 03e481e88b194296defdff3600b2fcebb04bd6cf Merge: 70c183759b2ce 95742c1cc59d0 Author: David S. Miller Date: Fri Apr 16 16:53:52 2021 -0700 Merge tag 'mlx5-updates-2021-04-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-04-16 This patchset introduces updates to mlx5e netdev driver. 1) Tariq refactors TLS offloads and adds resiliency against RX resync failures 2) Maxim reduces code duplications by unifying channels reset flow regardless if channels are closed or open 3) Aya Enhances TX/RX health reporters diagnostics to expose the internal clock time-stamping format 4) Moshe adds support for ethtool extended link state, to show the reason for link down ==================== Signed-off-by: David S. Miller commit 8f51c1763ae98bb63fc04627ceae383aa0e8ff7b Author: Jarkko Nikula Date: Mon Apr 12 16:41:12 2021 +0300 i2c: i801: Add support for Intel Alder Lake PCH-M Add PCI ID of SMBus controller on Intel Alder Lake PCH-M. Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit 068ff57d78011e6ed3561455a999f4a0272ea2c7 Author: Tian Tao Date: Mon Apr 5 16:18:42 2021 +0800 i2c: core: Fix spacing error by checkpatch Fix the following checkpatch error: #614: FILE: drivers/i2c/i2c-core-base.c:614: + len = acpi_device_modalias(dev, buf, PAGE_SIZE -1); ^ No functional changes. Signed-off-by: Tian Tao Signed-off-by: Wolfram Sang commit af92cca1710f63741925d97fe6ec0bd5eecec627 Author: Krzysztof Kozlowski Date: Thu Apr 15 11:38:02 2021 +0200 i2c: s3c2410: simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Wolfram Sang commit 880f25d690150937e42a2e8b86c111aae8da6d08 Author: Tian Tao Date: Mon Mar 15 10:39:30 2021 +0800 rtc: rtc-spear: replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1615775970-59070-1-git-send-email-tiantao6@hisilicon.com commit 70c183759b2cece2f9ba82e63e38fa32bebc9db2 Merge: 0e672f306a28d 221e8c126b781 Author: David S. Miller Date: Fri Apr 16 15:46:15 2021 -0700 Merge branch 'gianfar-mq-polling' Claudiu Manoil says: ==================== net: gianfar: Drop GFAR_MQ_POLLING support Drop long time obsolete "per NAPI multi-queue" support in gianfar, and related (and undocumented) device tree properties. ==================== Signed-off-by: David S. Miller commit 221e8c126b7810c1d8d90286cb0c279071be6843 Author: Claudiu Manoil Date: Fri Apr 16 20:11:23 2021 +0300 powerpc: dts: fsl: Drop obsolete fsl,rx-bit-map and fsl,tx-bit-map properties These are very old properties that were used by the "gianfar" ethernet driver. They don't have documented bindings and are obsolete. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 8eda54c5e6c4eb3f3a9b70fdea278f4e0f8496b2 Author: Claudiu Manoil Date: Fri Apr 16 20:11:22 2021 +0300 gianfar: Drop GFAR_MQ_POLLING support Gianfar used to enable all 8 Rx queues (DMA rings) per ethernet device, even though the controller can only support 2 interrupt lines at most. This meant that multiple Rx queues would have to be grouped per NAPI poll routine, and the CPU would have to split the budget and service them in a round robin manner. The overhead of this scheme proved to outweight the potential benefits. The alternative was to introduce the "Single Queue" polling mode, supporting one Rx queue per NAPI, which became the default packet processing option and helped improve the performance of the driver. MQ_POLLING also relies on undocumeted device tree properties to specify how to map the 8 Rx and Tx queues to a given interrupt line (aka "interrupt group"). Using module parameters to enable this mode wasn't an option either. Long story short, MQ_POLLING became obsolete, now it is just dead code, and no one asked for it so far. For the Tx queues, multi-queue support (more than 1 Tx queue per CPU) could be revisited by adding tc MQPRIO support, but again, one has to consider that there are only 2 interrupt lines. So the NAPI poll routine would have to service multiple Tx rings. Signed-off-by: Claudiu Manoil Signed-off-by: David S. Miller commit 0e672f306a28ddd55d2fb2ab89afdc615b5324a4 Author: Toke Høiland-Jørgensen Date: Fri Apr 16 17:47:45 2021 +0200 veth: check for NAPI instead of xdp_prog before xmit of XDP frame The recent patch that tied enabling of veth NAPI to the GRO flag also has the nice side effect that a veth device can be the target of an XDP_REDIRECT without an XDP program needing to be loaded on the peer device. However, the patch adding this extra NAPI mode didn't actually change the check in veth_xdp_xmit() to also look at the new NAPI pointer, so let's fix that. Fixes: 6788fa154546 ("veth: allow enabling NAPI even without XDP") Signed-off-by: Toke Høiland-Jørgensen Acked-by: Jesper Dangaard Brouer Acked-by: Paolo Abeni Signed-off-by: David S. Miller commit aa8caa767e319bad34a82bfce7da1ed2b9c0ed6f Author: Taehee Yoo Date: Fri Apr 16 14:16:06 2021 +0000 mld: fix suspicious RCU usage in __ipv6_dev_mc_dec() __ipv6_dev_mc_dec() internally uses sleepable functions so that caller must not acquire atomic locks. But caller, which is addrconf_verify_rtnl() acquires rcu_read_lock_bh(). So this warning occurs in the __ipv6_dev_mc_dec(). Test commands: ip netns add A ip link add veth0 type veth peer name veth1 ip link set veth1 netns A ip link set veth0 up ip netns exec A ip link set veth1 up ip a a 2001:db8::1/64 dev veth0 valid_lft 2 preferred_lft 1 Splat looks like: ============================ WARNING: suspicious RCU usage 5.12.0-rc6+ #515 Not tainted ----------------------------- kernel/sched/core.c:8294 Illegal context switch in RCU-bh read-side critical section! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 4 locks held by kworker/4:0/1997: #0: ffff88810bd72d48 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work+0x761/0x1440 #1: ffff888105c8fe00 ((addr_chk_work).work){+.+.}-{0:0}, at: process_one_work+0x795/0x1440 #2: ffffffffb9279fb0 (rtnl_mutex){+.+.}-{3:3}, at: addrconf_verify_work+0xa/0x20 #3: ffffffffb8e30860 (rcu_read_lock_bh){....}-{1:2}, at: addrconf_verify_rtnl+0x23/0xc60 stack backtrace: CPU: 4 PID: 1997 Comm: kworker/4:0 Not tainted 5.12.0-rc6+ #515 Workqueue: ipv6_addrconf addrconf_verify_work Call Trace: dump_stack+0xa4/0xe5 ___might_sleep+0x27d/0x2b0 __mutex_lock+0xc8/0x13f0 ? lock_downgrade+0x690/0x690 ? __ipv6_dev_mc_dec+0x49/0x2a0 ? mark_held_locks+0xb7/0x120 ? mutex_lock_io_nested+0x1270/0x1270 ? lockdep_hardirqs_on_prepare+0x12c/0x3e0 ? _raw_spin_unlock_irqrestore+0x47/0x50 ? trace_hardirqs_on+0x41/0x120 ? __wake_up_common_lock+0xc9/0x100 ? __wake_up_common+0x620/0x620 ? memset+0x1f/0x40 ? netlink_broadcast_filtered+0x2c4/0xa70 ? __ipv6_dev_mc_dec+0x49/0x2a0 __ipv6_dev_mc_dec+0x49/0x2a0 ? netlink_broadcast_filtered+0x2f6/0xa70 addrconf_leave_solict.part.64+0xad/0xf0 ? addrconf_join_solict.part.63+0xf0/0xf0 ? nlmsg_notify+0x63/0x1b0 __ipv6_ifa_notify+0x22c/0x9c0 ? inet6_fill_ifaddr+0xbe0/0xbe0 ? lockdep_hardirqs_on_prepare+0x12c/0x3e0 ? __local_bh_enable_ip+0xa5/0xf0 ? ipv6_del_addr+0x347/0x870 ipv6_del_addr+0x3b1/0x870 ? addrconf_ifdown+0xfe0/0xfe0 ? rcu_read_lock_any_held.part.27+0x20/0x20 addrconf_verify_rtnl+0x8a9/0xc60 addrconf_verify_work+0xf/0x20 process_one_work+0x84c/0x1440 In order to avoid this problem, it uses rcu_read_unlock_bh() for a short time. RCU is used for avoiding freeing ifp(struct *inet6_ifaddr) while ifp is being used. But this will not be released even if rcu_read_unlock_bh() is used. Because before rcu_read_unlock_bh(), it uses in6_ifa_hold(ifp). So this is safe. Fixes: 63ed8de4be81 ("mld: add mc_lock for protecting per-interface mld data") Suggested-by: Eric Dumazet Reported-by: Eric Dumazet Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit d8214c7aae6166137a2509053e793434e8dfb2c5 Merge: fb32856b16ad9 9ce062ba6a8d0 Author: David S. Miller Date: Fri Apr 16 15:38:32 2021 -0700 Merge branch 'ipa-fw-names' Alex Elder says: ==================== net: ipa: allow different firmware names Add the ability to define a "firmware-name" property in the IPA DT node, specifying an alternate name to use for the firmware file. Used only if the AP (Trust Zone) does early IPA initialization. ==================== Signed-off-by: David S. Miller commit 9ce062ba6a8d0a22e873e6b8cf068bf278adb5e7 Author: Alex Elder Date: Fri Apr 16 08:08:50 2021 -0500 net: ipa: optionally define firmware name via DT IPA initialization includes loading some firmware. This step is done either by the modem or by the AP under Trust Zone. If the AP loads firmware, the name of the firmware file is currently hard-coded ("ipa_fws.mdt"). Add the ability to specify the relative path of the firmware file to use in a property in the Device Tree IPA node. If the property is not found (or if any other error occurs attempting to get it), fall back to using a default relative path. Use the "old" fixed name as the default. Rename the symbol that represents this default to emphasize its purpose. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d8604b209e9b3762280b8321162f0f64219d51c9 Author: Alex Elder Date: Fri Apr 16 08:08:49 2021 -0500 dt-bindings: net: qcom,ipa: add firmware-name property Add a new optional firmware-name property to the IPA DT node. It is used only if the modem is not doing early initialization (i.e., if the modem-init property is not present). Its value is the name of the firmware file to use; if it's not specified, a default name ("ipa_fws.mdt") is used. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fb32856b16ad9d5bcd75b76a274e2c515ac7b9d7 Author: Xuan Zhuo Date: Fri Apr 16 17:16:15 2021 +0800 virtio-net: page_to_skb() use build_skb when there's sufficient tailroom In page_to_skb(), if we have enough tailroom to save skb_shared_info, we can use build_skb to create skb directly. No need to alloc for additional space. And it can save a 'frags slot', which is very friendly to GRO. Here, if the payload of the received package is too small (less than GOOD_COPY_LEN), we still choose to copy it directly to the space got by napi_alloc_skb. So we can reuse these pages. Testing Machine: The four queues of the network card are bound to the cpu1. Test command: for ((i=0;i<5;++i)); do sockperf tp --ip 192.168.122.64 -m 1000 -t 150& done The size of the udp package is 1000, so in the case of this patch, there will always be enough tailroom to use build_skb. The sent udp packet will be discarded because there is no port to receive it. The irqsoftd of the machine is 100%, we observe the received quantity displayed by sar -n DEV 1: no build_skb: 956864.00 rxpck/s build_skb: 1158465.00 rxpck/s Signed-off-by: Xuan Zhuo Suggested-by: Jason Wang Signed-off-by: David S. Miller commit fa588eba632df14d296436995e6bbea0c146ae77 Author: Loic Poulain Date: Fri Apr 16 10:36:34 2021 +0200 net: Add Qcom WWAN control driver The MHI WWWAN control driver allows MHI QCOM-based modems to expose different modem control protocols/ports via the WWAN framework, so that userspace modem tools or daemon (e.g. ModemManager) can control WWAN config and state (APN config, SMS, provider selection...). A QCOM-based modem can expose one or several of the following protocols: - AT: Well known AT commands interactive protocol (microcom, minicom...) - MBIM: Mobile Broadband Interface Model (libmbim, mbimcli) - QMI: QCOM MSM/Modem Interface (libqmi, qmicli) - QCDM: QCOM Modem diagnostic interface (libqcdm) - FIREHOSE: XML-based protocol for Modem firmware management (qmi-firmware-update) Note that this patch is mostly a rework of the earlier MHI UCI tentative that was a generic interface for accessing MHI bus from userspace. As suggested, this new version is WWAN specific and is dedicated to only expose channels used for controlling a modem, and for which related opensource userpace support exist. Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit 9a44c1cc63887627284ae232a9626a9f1cd066fc Author: Loic Poulain Date: Fri Apr 16 10:36:33 2021 +0200 net: Add a WWAN subsystem This change introduces initial support for a WWAN framework. Given the complexity and heterogeneity of existing WWAN hardwares and interfaces, there is no strict definition of what a WWAN device is and how it should be represented. It's often a collection of multiple devices that perform the global WWAN feature (netdev, tty, chardev, etc). One usual way to expose modem controls and configuration is via high level protocols such as the well known AT command protocol, MBIM or QMI. The USB modems started to expose them as character devices, and user daemons such as ModemManager learnt to use them. This initial version adds the concept of WWAN port, which is a logical pipe to a modem control protocol. The protocols are rawly exposed to user via character device, allowing straigthforward support in existing tools (ModemManager, ofono...). The WWAN core takes care of the generic part, including character device management, and relies on port driver operations to receive/submit protocol data. Since the different devices exposing protocols for a same WWAN hardware do not necessarily know about each others (e.g. two different USB interfaces, PCI/MHI channel devices...) and can be created/removed in different orders, the WWAN core ensures that all WAN ports contributing to the 'whole' WWAN feature are grouped under the same virtual WWAN device, relying on the provided parent device (e.g. mhi controller, USB device). It's a 'trick' I copied from Johannes's earlier WWAN subsystem proposal. This initial version is purposely minimalist, it's essentially moving the generic part of the previously proposed mhi_wwan_ctrl driver inside a common WWAN framework, but the implementation is open and flexible enough to allow extension for further drivers. Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit 4ad29b1a484e0c58acfffdcd87172ed17f35c1dd Author: Stefan Chulski Date: Fri Apr 16 11:15:17 2021 +0300 net: mvpp2: Add parsing support for different IPv4 IHL values Add parser entries for different IPv4 IHL values. Each entry will set the L4 header offset according to the IPv4 IHL field. L3 header offset will set during the parsing of the IPv4 protocol. Because of missed parser support for IP header length > 20, RX IPv4 checksum HW offload fails and skb->ip_summed set to CHECKSUM_NONE(checksum done by Network stack). This patch adds RX IPv4 checksum HW offload capability for frames with IP header length > 20. v1 --> v2 - Improve commit message. Suggested-by: Dana Vardi Signed-off-by: Stefan Chulski Signed-off-by: David S. Miller commit af1fa6b696cca5c559ed6d38cad0213544f299a0 Merge: c5d66587b8900 c2198943e33b1 Author: David S. Miller Date: Fri Apr 16 15:28:32 2021 -0700 Merge branch 'r8152--new-chips' Hayes Wang says: ==================== r8152: support new chips Support new RTL8153 and RTL8156 series. ==================== Signed-off-by: David S. Miller commit c2198943e33b100ed21dfb636c8fa6baef841e9d Author: Hayes Wang Date: Fri Apr 16 16:04:37 2021 +0800 r8152: search the configuration of vendor mode The vendor mode is not always at config #1, so it is necessary to set the correct configuration number. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 4a51b0e8a0143b0e83d51d9c58c6416c3818a9f2 Author: Hayes Wang Date: Fri Apr 16 16:04:36 2021 +0800 r8152: support PHY firmware for RTL8156 series Support new firmware type and method for RTL8156 series. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 195aae321c829dd1945900d75561e6aa79cce208 Author: Hayes Wang Date: Fri Apr 16 16:04:35 2021 +0800 r8152: support new chips Support RTL8153C, RTL8153D, RTL8156A, and RTL8156B. The RTL8156A and RTL8156B are the 2.5G ethernet. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 67ce1a806f164e59a074fea8809725d3411eaa20 Author: Hayes Wang Date: Fri Apr 16 16:04:34 2021 +0800 r8152: add help function to change mtu The different chips may have different requests when changing mtu. Therefore, add a new help function of rtl_ops to change mtu. Besides, reset the tx/rx after changing mtu. Additionally, add mtu_to_size() and size_to_mtu() macros to simplify the code. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit a8a7be178e81a3d4b6972cbeb0ccd091ca2f9f89 Author: Hayes Wang Date: Fri Apr 16 16:04:33 2021 +0800 r8152: adjust rtl8152_check_firmware function Use bits operations to record and check the firmware. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit 5133bcc7481528e36fff0a3b056601efb704fb32 Author: Hayes Wang Date: Fri Apr 16 16:04:32 2021 +0800 r8152: set inter fram gap time depending on speed Set the maximum inter frame gap time (144ns) for speed 10M/half and 100M/half. It improves the performance for those speeds. And, there is no effect for the other speeds. For 10M/half and 100M/half, the fast inter frame gap time let the device couldn't use the feature of the aggregation effectively, because the transfer would be completed fastly. Therefore, use the maximum value to improve the effect of the aggregation. However, you may not feel the improvement for fast CPUs, because they compensate for the effect of the aggregation. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller commit c5d66587b8900201e1530b7c18d41e87bd5812f4 Author: Ilya Lipnitskiy Date: Thu Apr 15 17:37:48 2021 -0700 net: ethernet: mediatek: ppe: fix busy wait loop The intention is for the loop to timeout if the body does not succeed. The current logic calls time_is_before_jiffies(timeout) which is false until after the timeout, so the loop body never executes. Fix by using readl_poll_timeout as a more standard and less error-prone solution. Fixes: ba37b7caf1ed ("net: ethernet: mtk_eth_soc: add support for initializing the PPE") Signed-off-by: Ilya Lipnitskiy Cc: Felix Fietkau Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c133acf38ca4ab498d0bfa25f3c218c263f6664a Merge: a1150a04b7e8c dc65fe82fb07e Author: David S. Miller Date: Fri Apr 16 15:23:10 2021 -0700 Merge branch 'mptcp-socket-options' Mat Martineau says: ==================== mptcp: Improve socket option handling MPTCP sockets have previously had limited socket option support. The architecture of MPTCP sockets (one userspace-facing MPTCP socket that manages one or more in-kernel TCP subflow sockets) adds complexity for passing options through to lower levels. This patch set adds MPTCP support for socket options commonly used with TCP. Patch 1 reverts an interim socket option fix (a socket option blocklist) that was merged in the net tree for v5.12. Patch 2 moves the socket option code to a separate file, with no functional changes. Patch 3 adds an allowlist for socket options that are known to function with MPTCP. Later patches in this set add more allowed options. Patches 4 and 5 add infrastructure for syncing MPTCP-level options with the TCP subflows. Patches 6-12 add support for specific socket options. Patch 13 adds a socket option self test. ==================== Signed-off-by: David S. Miller commit dc65fe82fb07e610e03a9b05bd445f46f93175f5 Author: Florian Westphal Date: Thu Apr 15 16:45:02 2021 -0700 selftests: mptcp: add packet mark test case Extend mptcp_connect tool with SO_MARK support (-M ) and add a test case that checks that the packet mark gets copied to all subflows. This is done by only allowing packets with either skb->mark 1 or 2 via iptables. DROP rule packet counter is checked; if its not zero, print an error message and fail the test case. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit aa1fbd94e5c7d3a356058b4ee4a455d952dd48aa Author: Florian Westphal Date: Thu Apr 15 16:45:01 2021 -0700 mptcp: sockopt: add TCP_CONGESTION and TCP_INFO TCP_CONGESTION is set for all subflows. The mptcp socket gains icsk_ca_ops too so it can be used to keep the authoritative state that should be set on new/future subflows. TCP_INFO will return first subflow only. The out-of-tree kernel has a MPTCP_INFO getsockopt, this could be added later on. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit a03c99b253c232d7d305c9dd476b5b120841dff7 Author: Florian Westphal Date: Thu Apr 15 16:45:00 2021 -0700 mptcp: setsockopt: SO_DEBUG and no-op options Handle SO_DEBUG and set it on all subflows. Ignore those values not implemented on TCP sockets. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6f0d7198084c4096794ae58b9cf5d30c79eea222 Author: Florian Westphal Date: Thu Apr 15 16:44:59 2021 -0700 mptcp: setsockopt: add SO_INCOMING_CPU Replicate to all subflows. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 36704413db79127f6716ea402f85f85465fba165 Author: Florian Westphal Date: Thu Apr 15 16:44:58 2021 -0700 mptcp: setsockopt: add SO_MARK support Value is synced to all subflows. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 268b1238746086f3608daa20b068182ddc2b0128 Author: Florian Westphal Date: Thu Apr 15 16:44:57 2021 -0700 mptcp: setsockopt: support SO_LINGER Similar to PRIORITY/KEEPALIVE: needs to be mirrored to all subflows. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 5d0a6bc82d38d773c20b44aa1b9f312c4294b594 Author: Florian Westphal Date: Thu Apr 15 16:44:56 2021 -0700 mptcp: setsockopt: handle receive/send buffer and device bind Similar to previous patch: needs to be mirrored to all subflows. Device bind is simpler: it is only done on the initial (listener) sk. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 1b3e7ede1365a24db1b4fd837e58a595f52fa4ad Author: Florian Westphal Date: Thu Apr 15 16:44:55 2021 -0700 mptcp: setsockopt: handle SO_KEEPALIVE and SO_PRIORITY start with something simple: both take an integer value, both need to be mirrored to all subflows. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit df00b087da24c0b5341178bbd5353101c7cef98f Author: Florian Westphal Date: Thu Apr 15 16:44:54 2021 -0700 mptcp: tag sequence_seq with socket state Paolo Abeni suggested to avoid re-syncing new subflows because they inherit options from listener. In case options were set on listener but are not set on mptcp-socket there is no need to do any synchronisation for new subflows. This change sets sockopt_seq of new mptcp sockets to the seq of the mptcp listener sock. Subflow sequence is set to the embedded tcp listener sk. Add a comment explaing why sk_state is involved in sockopt_seq generation. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 7896248983ef4eec18c8bd301a81d8672dbc9955 Author: Florian Westphal Date: Thu Apr 15 16:44:53 2021 -0700 mptcp: add skeleton to sync msk socket options to subflows Handle following cases: 1. setsockopt is called with multiple subflows. Change might have to be mirrored to all of them. This is done directly in process context/setsockopt call. 2. Outgoing subflow is created after one or several setsockopt() calls have been made. Old setsockopt changes should be synced to the new socket. 3. Incoming subflow, after setsockopt call(s). Cases 2 and 3 are handled right after the join list is spliced to the conn list. Not all sockopt values can be just be copied by value, some require helper calls. Those can acquire socket lock (which can sleep). If the join->conn list splicing is done from preemptible context, synchronization can be done right away, otherwise its deferred to work queue. Acked-by: Paolo Abeni Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d9e4c129181004ec94b315b0c9db5eeb09da75e6 Author: Paolo Abeni Date: Thu Apr 15 16:44:52 2021 -0700 mptcp: only admit explicitly supported sockopt Unrolling mcast state at msk dismantel time is bug prone, as syzkaller reported: ====================================================== WARNING: possible circular locking dependency detected 5.11.0-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor905/8822 is trying to acquire lock: ffffffff8d678fe8 (rtnl_mutex){+.+.}-{3:3}, at: ipv6_sock_mc_close+0xd7/0x110 net/ipv6/mcast.c:323 but task is already holding lock: ffff888024390120 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1600 [inline] ffff888024390120 (sk_lock-AF_INET6){+.+.}-{0:0}, at: mptcp6_release+0x57/0x130 net/mptcp/protocol.c:3507 which lock already depends on the new lock. Instead we can simply forbid any mcast-related setsockopt. Let's do the same with all other non supported sockopts. Fixes: 717e79c867ca5 ("mptcp: Add setsockopt()/getsockopt() socket operations") Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 0abdde82b163600dcafb80da6e155dbf60c331bc Author: Paolo Abeni Date: Thu Apr 15 16:44:51 2021 -0700 mptcp: move sockopt function into a new file The MPTCP sockopt implementation is going to be much more big and complex soon. Let's move it to a different source file. No functional change intended. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit bd005f53862b9e840977907e14e28cbcc10c6d51 Author: Matthieu Baerts Date: Thu Apr 15 16:44:50 2021 -0700 mptcp: revert "mptcp: forbit mcast-related sockopt on MPTCP sockets" This change reverts commit 86581852d771 ("mptcp: forbit mcast-related sockopt on MPTCP sockets"). As announced in the cover letter of the mentioned patch above, the following commits introduce a larger MPTCP sockopt implementation refactor. This time, we switch from a blocklist to an allowlist. This is safer for the future where new sockoptions could be added while not being fully supported with MPTCP sockets and thus causing unstabilities. Suggested-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 8138c5f0318c69a878582d2140dac08e6a99880d Author: satya priya Date: Fri Apr 9 19:29:26 2021 +0530 dt-bindings: rtc: qcom-pm8xxx-rtc: Add qcom pm8xxx rtc bindings Add binding doc for qcom pm8xxx rtc device. Signed-off-by: satya priya Reviewed-by: Bjorn Andersson Reported-by: kernel test robot Reviewed-by: Rob Herring Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1617976766-7852-5-git-send-email-skakit@codeaurora.org commit c8f0ca8b7a4b91f637ccd9a55f37dbac73d6f6bf Author: satya priya Date: Fri Apr 9 19:29:23 2021 +0530 rtc: pm8xxx: Add RTC support for PMIC PMK8350 Add the comaptible string for PMIC PMK8350. Signed-off-by: satya priya Reviewed-by: Bjorn Andersson Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/1617976766-7852-2-git-send-email-skakit@codeaurora.org commit a1150a04b7e8caee235e38996e042e1bcb1a6574 Author: Gatis Peisenieks Date: Wed Apr 14 22:09:20 2021 +0300 atl1c: move tx cleanup processing out of interrupt Tx queue cleanup happens in interrupt handler on same core as rx queue processing. Both can take considerable amount of processing in high packet-per-second scenarios. Sending big amounts of packets can stall the rx processing which is unfair and also can lead to out-of-memory condition since __dev_kfree_skb_irq queues the skbs for later kfree in softirq which is not allowed to happen with heavy load in interrupt handler. This puts tx cleanup in its own napi and enables threaded napi to allow the rx/tx queue processing to happen on different cores. The ability to sustain equal amounts of tx/rx traffic increased: from 280Kpps to 1130Kpps on Threadripper 3960X with upcoming Mikrotik 10/25G NIC, from 520Kpps to 850Kpps on Intel i3-3320 with Mikrotik RB44Ge adapter. Signed-off-by: Gatis Peisenieks Signed-off-by: David S. Miller commit 2576e5d31f0df37c8d2f037f2d6f9f0a73c45a7a Merge: e7ad33fa7bc5f 2c4eca3ef7161 Author: David S. Miller Date: Fri Apr 16 15:15:45 2021 -0700 Merge branch 'BR_FDB_LOCAL' Vladimir Oltean says: ==================== Pass the BR_FDB_LOCAL information to switchdev drivers Bridge FDB entries with the is_local flag are entries which are terminated locally and not forwarded. Switchdev drivers might want to be notified of these addresses so they can trap them. If they don't program these entries to hardware, there is no guarantee that they will do the right thing with these entries, and they won't be, let's say, flooded. Ideally none of the switchdev drivers should ignore these entries, but having access to the is_local bit is the bare minimum change that should be done in the bridge layer, before this is even possible. These 2 changes are extracted from the larger "RX filtering in DSA" series: https://patchwork.kernel.org/project/netdevbpf/patch/20210224114350.2791260-8-olteanv@gmail.com/ https://patchwork.kernel.org/project/netdevbpf/patch/20210224114350.2791260-9-olteanv@gmail.com/ and submitted separately, because they touch all switchdev drivers, while the rest is mostly specific to DSA. This change is not a functional one, in the sense that everybody still ignores the local FDB entries, but this will be changed by further patches at least for DSA. ==================== Signed-off-by: David S. Miller commit 2c4eca3ef7161f6632959c00c8eae182f4398901 Author: Vladimir Oltean Date: Wed Apr 14 19:52:56 2021 +0300 net: bridge: switchdev: include local flag in FDB notifications As explained in bugfix commit 6ab4c3117aec ("net: bridge: don't notify switchdev for local FDB addresses") as well as in this discussion: https://lore.kernel.org/netdev/20210117193009.io3nungdwuzmo5f7@skbuf/ the switchdev notifiers for FDB entries managed to have a zero-day bug, which was that drivers would not know what to do with local FDB entries, because they were not told that they are local. The bug fix was to simply not notify them of those addresses. Let us now add the 'is_local' bit to bridge FDB entries, and make all drivers ignore these entries by their own choice. Co-developed-by: Tobias Waldekranz Signed-off-by: Tobias Waldekranz Signed-off-by: Vladimir Oltean Reviewed-by: Grygorii Strashko Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit e5b4b8988b7a1348790caf6f7e593a4541eafb2c Author: Tobias Waldekranz Date: Wed Apr 14 19:52:55 2021 +0300 net: bridge: switchdev: refactor br_switchdev_fdb_notify Instead of having to add more and more arguments to br_switchdev_fdb_call_notifiers, get rid of it and build the info struct directly in br_switchdev_fdb_notify. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Signed-off-by: Vladimir Oltean Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit c52409eb16672907804b7acf1658bb1fd9dcb426 Author: Liam Beguin Date: Wed Apr 7 22:40:28 2021 -0400 rtc: ab-eoz9: make use of RTC_FEATURE_ALARM Move the alarm callbacks in rtc_ops and use RTC_FEATURE_ALARM to notify the core whether alarm capabilities are available or not. Signed-off-by: Liam Beguin Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210408024028.3526564-4-liambeguin@gmail.com commit e70e52e1bf1d6d0ea60e2f8294d5e76a8d8f5370 Author: Liam Beguin Date: Wed Apr 7 22:40:27 2021 -0400 rtc: ab-eoz9: add alarm support Add alarm support for the rtc-ab-eoz9. Signed-off-by: Liam Beguin Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210408024028.3526564-3-liambeguin@gmail.com commit f1d304766c7f5388239d273fc0b72efa62acd9ca Author: Liam Beguin Date: Wed Apr 7 22:40:26 2021 -0400 rtc: ab-eoz9: set regmap max_register Set regmap's max_register property to allow users to dump registers using debufgs. Signed-off-by: Liam Beguin Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210408024028.3526564-2-liambeguin@gmail.com commit 03531606ef4cda25b629f500d1ffb6173b805c05 Author: Francois Gervais Date: Wed Mar 10 16:10:26 2021 -0500 rtc: pcf85063: fallback to parent of_node The rtc device node is always NULL. Since v5.12-rc1-dontuse/3c9ea42802a1fbf7ef29660ff8c6e526c58114f6 this will lead to a NULL pointer dereference. To fix this use the parent node which is the i2c client node as set by devm_rtc_allocate_device(). Using the i2c client node seems to be what other similar drivers do e.g. rtc-pcf8563.c. Signed-off-by: Francois Gervais Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210310211026.27299-1-fgervais@distech-controls.com commit 1e91e28e374d0b0b912154c192716374609360d9 Author: Saravanan D Date: Wed Apr 7 10:59:58 2021 -0700 blk-mq: Fix spurious debugfs directory creation during initialization blk_mq_debugfs_register_sched_hctx() called from device_add_disk()->elevator_init_mq()->blk_mq_init_sched() initialization sequence does not have relevant parent directory setup and thus spuriously attempts "sched" directory creation from root mount of debugfs for every hw queue detected on the block device dmesg ... debugfs: Directory 'sched' with parent '/' already present! debugfs: Directory 'sched' with parent '/' already present! . . debugfs: Directory 'sched' with parent '/' already present! ... The parent debugfs directory for hw queues get properly setup device_add_disk()->blk_register_queue()->blk_mq_debugfs_register() ->blk_mq_debugfs_register_hctx() later in the block device initialization sequence. A simple check for debugfs_dir has been added to thwart premature debugfs directory/file creation attempts. Signed-off-by: Saravanan D Signed-off-by: Jens Axboe commit ffeee417d97f9171bce9f43c22c9f477e4c84f54 Author: Chunguang Xu Date: Tue Apr 13 09:39:05 2021 +0800 cgroup: use tsk->in_iowait instead of delayacct_is_task_waiting_on_io() If delayacct is disabled, then delayacct_is_task_waiting_on_io() always returns false, which causes the statistical value to be wrong. Perhaps tsk->in_iowait is better. Signed-off-by: Chunguang Xu Signed-off-by: Tejun Heo commit 3fd00fdc4f11c656a63e6a6280c0bcb63cf109a2 Author: Laurent Vivier Date: Tue Mar 23 23:14:29 2021 +0100 rtc: goldfish: remove dependency to OF We want to use the goldfish RTC on a machine without OF. As there is no real dependency on it, remove the OF dependency from the goldfish entry in Kconfig Signed-off-by: Laurent Vivier Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210323221430.3735147-2-laurent@vivier.eu commit 1feaf60ff26086d4ae212c0fd61ff5755e1fd10c Author: Sasha Neftin Date: Wed Mar 24 15:15:25 2021 +0200 igc: Expose LPI counters Expose EEE Tx and Rx low power idle counters via ethtool A EEE TX or RX LPI event occurs when the transmitter or the receiver enters EEE (IEEE802.3az) LPI state. ethtool --statistics Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit b3d4f405620a7c9f3f601329e9a55e6133b15aca Author: Sasha Neftin Date: Wed Mar 24 10:05:31 2021 +0200 igc: Fix overwrites return value drivers/net/ethernet/intel/igc/igc_i225.c:235 igc_write_nvm_srwr() warn: loop overwrites return value 'ret_val' Reported-by: Dan Carpenter Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 87938851b6efb6d5b44ae93c83226c6f991d5cc1 Author: Ederson de Souza Date: Thu Feb 18 17:31:04 2021 -0800 igc: enable auxiliary PHC functions for the i225 The i225 device offers a number of special PTP Hardware Clock features on the Software Defined Pins (SDPs) - much like i210, which is used as inspiration for this patch. It enables two possible functions, namely time stamping external events and periodic output signals. The assignment of PHC functions to the four SDP can be freely chosen by the user. For the external events time stamping, when the SDP (configured as input by user) level changes, an interrupt is generated and the kernel Precision Time Protocol (PTP) is informed. For the periodic output signals, the i225 is configured to generate them (so the SDP level will change periodically) and the driver also has to keep updating the time of the next level change. However, this work is not necessary for some frequencies as the i225 takes care of them (namely, anything with a half-cycle of 500ms, 250ms, 125ms or < 70ms). While i225 allows up to four timers to be used to source the time used on the external events or output signals, this patch uses only one of those timers. Main reason is to keep it simple, as it's not clear how these extra timers would be exposed to users. Note that currently a NIC can expose a single PTP device. Signed-off-by: Ederson de Souza Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 64433e5bf40abf893c7edbc60899bdcdd7c70b76 Author: Ederson de Souza Date: Thu Feb 18 17:31:03 2021 -0800 igc: Enable internal i225 PPS The i225 device can produce one interrupt on the full second, much like i210 - from where this patch is inspired. This patch sets up the full second interruption on the i225 and when receiving it, it sends a PPS event to PTP (Precision Time Protocol) kernel subsystem. The PTP subsystem exposes the PPS events via ioctl and sysfs, and one can use the `testptp` tool (tools/testing/selftests/ptp) to check that the events are being generated. Signed-off-by: Ederson de Souza Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 1d3cb90cb0101bb44254d295a421a89f3b73f6e8 Author: Grzegorz Siwik Date: Tue Feb 23 15:15:27 2021 +0100 igb: Add double-check MTA_REGISTER for i210 and i211 Add new function which checks MTA_REGISTER if its filled correctly. If not then writes again to same register. There is possibility that i210 and i211 could not accept MTA_REGISTER settings, specially when you add and remove many of multicast addresses in short time. Without this patch there is possibility that multicast settings will be not always set correctly in hardware. Signed-off-by: Grzegorz Siwik Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit ea3b50c51d19e2ac00861ac195a3ed5617765255 Author: chakravarthikulkarni Date: Mon Mar 1 12:51:45 2021 +0530 PCI: acpiphp: Fix whitespace issue Fix coding style for braces. [bhelgaas: drop comment change] Link: https://lore.kernel.org/r/20210301072145.19018-1-chakravarthikulkarni2021@gmail.com Signed-off-by: chakravarthikulkarni Signed-off-by: Bjorn Helgaas commit 217fd6f625af591e2866bebb8cda778cf85bea2e Author: J. Bruce Fields Date: Fri Apr 16 14:00:14 2021 -0400 nfsd: ensure new clients break delegations If nfsd already has an open file that it plans to use for IO from another, it may not need to do another vfs open, but it still may need to break any delegations in case the existing opens are for another client. Symptoms are that we may incorrectly fail to break a delegation on a write open from a different client, when the delegation-holding client already has a write open. Fixes: 28df3d1539de ("nfsd: clients don't need to break their own delegations") Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 9c336c9935cff267470bb3aaa85c66fac194b650 Author: Jindong Yue Date: Wed Mar 31 16:33:18 2021 +0800 tick/broadcast: Allow late registered device to enter oneshot mode The broadcast device is switched to oneshot mode when the system switches to oneshot mode. If a broadcast clock event device is registered after the system switched to oneshot mode, it will stay in periodic mode forever. Ensure that a late registered device which is selected as broadcast device is initialized in oneshot mode when the system already uses oneshot mode. [ tglx: Massage changelog ] Signed-off-by: Jindong Yue Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210331083318.21794-1-jindong.yue@nxp.com commit d7840aaadd6e84915866a8f0dab586f6107dadf1 Author: Wang Wensheng Date: Fri Mar 26 02:23:28 2021 +0000 tick: Use tick_check_replacement() instead of open coding it The function tick_check_replacement() is the combination of tick_check_percpu() and tick_check_preferred(), but tick_check_new_device() has the same logic open coded. Use the helper to simplify the code. [ tglx: Massage changelog ] Signed-off-by: Wang Wensheng Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210326022328.3266-1-wangwensheng4@huawei.com commit 07ff4aed015c564d03fd518d2fb54e5e6948903c Author: Marc Kleine-Budde Date: Wed Mar 3 11:35:44 2021 +0100 time/timecounter: Mark 1st argument of timecounter_cyc2time() as const The timecounter is not modified in this function. Mark it as const. Signed-off-by: Marc Kleine-Budde Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210303103544.994855-1-mkl@pengutronix.de commit 95742c1cc59d0a6aa2ca9e75bd21f2a8721f5129 Author: Aya Levin Date: Mon Mar 8 12:26:35 2021 +0200 net/mlx5: Enhance diagnostics info for TX/RX reporters Add ts_format to 'Common Config' section of the TX/RX devlink reporters diagnostics info. Possible values for ts_format: 'RT' or 'FRC' which stands for: Real Time and Free Running Counters correspondingly. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit 302522e67c70c57bd35c2793d419dba457871ca0 Author: Aya Levin Date: Sun Mar 7 12:43:24 2021 +0200 net/mlx5: Add helper to initialize 1PPS Wrap 1PPS initialization in a helper for a cleaner init flow. Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit b3446acb2b9ae6128587cd2d311214950adfb68b Author: Moshe Tal Date: Tue Feb 23 13:42:17 2021 +0200 net/mlx5e: Add ethtool extended link state In case the interface was set up but cannot establish the link, ethtool will print more information to help the user troubleshoot the state. For example, no link due to missing cable: $ ethtool eth1 ... 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 eth1 ... Link detected: no (Autoneg, No partner detected) The extended state is available only for specific cases, in other cases ethtool with print only "Link detected: no" as before Signed-off-by: Moshe Tal Signed-off-by: Saeed Mahameed commit 36830159acbeb9896d7684b5f52db7b22efa197f Author: Moshe Tal Date: Mon Feb 15 16:13:02 2021 +0200 net/mlx5: Add register layout to support extended link state Add needed structure layouts and defines for pddr register (Port Diagnostics Database Register) and the troublshooting page. This will be used to get extended link state from the monitor opcode bits. Signed-off-by: Moshe Tal Signed-off-by: Saeed Mahameed commit 5cec6de0ae09457bdab2308e9fbac962dd7be3db Author: Maor Dickman Date: Sun Apr 11 11:50:18 2021 +0300 net/mlx5: Allocate FC bulk structs with kvzalloc() instead of kzalloc() The bulk size is larger than 16K so use kvzalloc(). The bulk bitmask upper size limit is 16K so use kvcalloc(). Signed-off-by: Maor Dickman Signed-off-by: Saeed Mahameed commit 94872d4ef9c09cb0938595b473c68f4a5fb138f6 Author: Maxim Mikityanskiy Date: Tue Mar 16 15:47:58 2021 +0200 net/mlx5e: Cleanup safe switch channels API by passing params mlx5e_safe_switch_channels accepts new_chs as a parameter and opens new channels in place, then copying them to priv->channels. It requires all the callers to allocate space for this temporary storage of the new channels. This commit cleans up the API by replacing new_chs with new_params, a meaningful subset of new_chs to be filled by the caller. The temporary space for the new channels is allocated inside mlx5e_safe_switch_params (a new name for mlx5e_safe_switch_channels). An extra copy of params is made, but since it's control flow, it's not critical. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit b3b886cf965d5f8d8e51f9481ce60ee8f9548580 Author: Maxim Mikityanskiy Date: Thu Feb 4 12:21:16 2021 +0200 net/mlx5e: Refactor on-the-fly configuration changes This commit extends mlx5e_safe_switch_channels() to support on-the-fly configuration changes, when the channels are open, but don't need to be recreated. Such flows exist when a parameter being changed doesn't affect how the queues are created, or when the queues can be modified while remaining active. Before this commit, such flows were handled as special cases on the caller site. This commit adds this functionality to mlx5e_safe_switch_channels(), allowing the caller to pass a boolean indicating whether it's required to recreate the channels or it's allowed to skip it. The logic of switching channel parameters is now completely encapsulated into mlx5e_safe_switch_channels(). Signed-off-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 69cc4185dcbaaedc52d5d8d13b4aac2a3836a874 Author: Maxim Mikityanskiy Date: Thu Jan 28 15:36:21 2021 +0200 net/mlx5e: Use mlx5e_safe_switch_channels when channels are closed This commit uses new functionality of mlx5e_safe_switch_channels introduced by the previous commit to reduce the amount of repeating similar code all over the driver. It's very common in mlx5e to call mlx5e_safe_switch_channels when the channels are open, but assign parameters and run hardware commands manually when the channels are closed. After the previous commit it's no longer needed to do such manual things every time, so this commit removes unneeded code and relies on the new functionality of mlx5e_safe_switch_channels. Some of the places are refactored and simplified, where more complex flows are used to change configuration on the fly, without recreating the channels (the logic is rewritten in a more robust way, with a reset required by default and a list of exceptions). Signed-off-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit 6cad120d9e621a4eeff1d45dca41416a1e0b77d5 Author: Maxim Mikityanskiy Date: Wed Jan 27 18:28:03 2021 +0200 net/mlx5e: Allow mlx5e_safe_switch_channels to work with channels closed mlx5e_safe_switch_channels is used to modify channel parameters and/or hardware configuration in a safe way, so that if anything goes wrong, everything reverts to the old configuration and remains in a consistent state. However, this function only works when the channels are open. When the caller needs to modify some parameters, first it has to check that the channels are open, otherwise it has to assign parameters directly, and such boilerplate repeats in many different places. This commit prepares for the refactoring of such places by allowing mlx5e_safe_switch_channels to work when the channels are closed. In this case it will assign the new parameters and run the preactivate hook. Signed-off-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit e9ce991bce5bacf71641bd0f72f4b7c589529f40 Author: Tariq Toukan Date: Wed Feb 24 16:26:34 2021 +0200 net/mlx5e: kTLS, Add resiliency to RX resync failures When the TLS logic finds a tcp seq match for a kTLS RX resync request, it calls the driver callback function mlx5e_ktls_resync() to handle it and communicate it to the device. Errors might occur during mlx5e_ktls_resync(), however, they are not reported to the stack. Moreover, there is no error handling in the stack for these errors. In this patch, the driver obtains responsibility on errors handling, adding queue and retry mechanisms to these resyncs. We maintain a linked list of resync matches, and try posting them to the async ICOSQ in the NAPI context. Only possible failure that demands driver handling is ICOSQ being full. By relying on the NAPI mechanism, we make sure that the entries in list will be handled when ICOSQ completions arrive and make some room available. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 72f6f2f8d6aa213a85b69a0f0ca2c6f4f80aa85e Author: Tariq Toukan Date: Tue Feb 16 12:27:57 2021 +0200 net/mlx5e: TX, Inline function mlx5e_tls_handle_tx_wqe() When TLS is supported, WQE ctrl segment of every transmitted packet is updated with the (possibly empty, for non-TLS packets) TISN field. Take this one-liner function into the header file and inline it, to save the overhead of a function call per packet. While here, remove unused function parameter. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b6b3ad2175c852557c06fb52ed533e35a143fb72 Author: Tariq Toukan Date: Tue Mar 9 16:37:42 2021 +0200 net/mlx5e: TX, Inline TLS skb check When TLS is supported and enabled, every transmitted packet is tested to identify if TLS offload is required. Take the early-return condition into an inline function, to save the overhead of a function call for non-TLS packets. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8668587a33b99492b73fd4dbec432f793853376d Author: Tariq Toukan Date: Wed Mar 31 11:02:09 2021 +0300 net/mlx5e: Cleanup unused function parameter Socket parameter is not used in accel_rule_init(), remove it. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 2f014f4016db44103864d295ba427eb1e0086551 Author: Tariq Toukan Date: Tue Mar 9 16:30:10 2021 +0200 net/mlx5e: Remove non-essential TLS SQ state bit Maintaining an SQ state bit to indicate TLS support has no real need, a simple and fast test [1] for the SKB is almost equally good. [1] !skb->sk || !tls_is_sk_tx_device_offloaded(skb->sk) Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e7ad33fa7bc5f788cdb14eea68c65c4da0f06edf Author: Eric Dumazet Date: Fri Apr 16 11:35:38 2021 -0700 scm: fix a typo in put_cmsg() We need to store cmlen instead of len in cm->cmsg_len. Fixes: 38ebcf5096a8 ("scm: optimize put_cmsg()") Signed-off-by: Eric Dumazet Reported-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1df1fc8c62f7527d953c7f3869930067bf5b3f29 Author: Tudor Ambarus Date: Sat Apr 3 09:09:31 2021 +0300 mtd: core: Constify buf in mtd_write_user_prot_reg() The write buffer comes from user and should be const. Constify write buffer in mtd core and across all _write_user_prot_reg() users. cfi_cmdset_{0001, 0002} and onenand_base will pay the cost of an explicit cast to discard the const qualifier since the beginning, since they are using an otp_op_t function prototype that is used for both reads and writes. mtd_dataflash and SPI NOR will benefit of the const buffer because they are using different paths for writes and reads. Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210403060931.7119-1-tudor.ambarus@microchip.com commit d63f2a88d5cfaad025f26e1107f3807d579654c5 Author: Rob Herring Date: Fri Apr 16 13:01:18 2021 -0500 ASoC: mt6359: Drop ASoC mt6359 ASoC accdet jack document This reverts commit e61c589587c772c5f672b22683c3e0b38be20702. The binding document has lots of schema errors and there's been no effort to fix them, so let's remove it. Cc: Argus Lin Cc: Mark Brown Cc: Liam Girdwood Cc: Matthias Brugger Cc: alsa-devel@alsa-project.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210416180118.3662904-1-robh@kernel.org Signed-off-by: Mark Brown commit 26b67f5a1e067605d5db3062090618ca542115b8 Author: Ederson de Souza Date: Wed Feb 3 17:50:25 2021 -0800 igb: Redistribute memory for transmit packet buffers when in Qav mode i210 has a total of 24KB of transmit packet buffer. When in Qav mode, this buffer is divided into four pieces, one for each Tx queue. Currently, 8KB are given to each of the two SR queues and 4KB are given to each of the two SP queues. However, it was noticed that such distribution can make best effort traffic (which would usually go to the SP queues when Qav is enabled, as the SR queues would be used by ETF or CBS qdiscs for TSN-aware traffic) perform poorly. Using iperf3 to measure, one could see the performance of best effort traffic drop by nearly a third (from 935Mbps to 578Mbps), with no TSN traffic competing. This patch redistributes the 24KB to each queue equally: 6KB each. On tests, there was no notable performance reduction of best effort traffic performance when there was no TSN traffic competing. Below, more details about the data collected: All experiments were run using the following qdisc setup: qdisc taprio 100: root refcnt 9 tc 4 map 3 3 3 2 3 0 0 3 3 3 3 3 3 3 3 3 queues offset 0 count 1 offset 1 count 1 offset 2 count 1 offset 3 count 1 clockid TAI base-time 0 cycle-time 10000000 cycle-time-extension 0 index 0 cmd S gatemask 0xf interval 10000000 qdisc etf 8045: parent 100:1 clockid TAI delta 1000000 offload on deadline_mode off skip_sock_check off TSN traffic, when enabled, had this characteristics: Packet size: 1500 bytes Transmission interval: 125us ---------------------------------- Without this patch: ---------------------------------- - TCP data: - No TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.35 GBytes 578 Mbits/sec 0 - With TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.07 GBytes 460 Mbits/sec 1 - TCP data limiting iperf3 buffer size to 4K: - No TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.35 GBytes 579 Mbits/sec 0 - With TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.08 GBytes 462 Mbits/sec 0 - TCP data limiting iperf3 buffer size to 192 bytes (smallest size without serious performance degradation): - No TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.34 GBytes 577 Mbits/sec 0 - With TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.07 GBytes 461 Mbits/sec 1 - UDP data at 1000Mbit/sec: - No TSN traffic: [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-20.00 sec 1.36 GBytes 586 Mbits/sec 0.000 ms 0/1011407 (0%) - With TSN traffic: [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-20.00 sec 1.05 GBytes 451 Mbits/sec 0.000 ms 0/778672 (0%) ---------------------------------- With this patch: ---------------------------------- - TCP data: - No TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 2.17 GBytes 932 Mbits/sec 0 - With TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.50 GBytes 646 Mbits/sec 1 - TCP data limiting iperf3 buffer size to 4K: - No TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 2.17 GBytes 931 Mbits/sec 0 - With TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.50 GBytes 645 Mbits/sec 0 - TCP data limiting iperf3 buffer size to 192 bytes (smallest size without serious performance degradation): - No TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 2.17 GBytes 932 Mbits/sec 1 - With TSN traffic: [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-20.00 sec 1.50 GBytes 645 Mbits/sec 0 - UDP data at 1000Mbit/sec: - No TSN traffic: [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-20.00 sec 2.23 GBytes 956 Mbits/sec 0.000 ms 0/1650226 (0%) - With TSN traffic: [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-20.00 sec 1.51 GBytes 649 Mbits/sec 0.000 ms 0/1120264 (0%) Signed-off-by: Ederson de Souza Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 5deac80d4571dffb51f452f0027979d72259a1b9 Author: Nathan Chancellor Date: Wed Apr 14 17:11:12 2021 -0700 perf/amd/uncore: Fix sysfs type mismatch dev_attr_show() calls the __uncore_*_show() functions via an indirect call but their type does not currently match the type of the show() member in 'struct device_attribute', resulting in a Control Flow Integrity violation. $ cat /sys/devices/amd_l3/format/umask config:8-15 $ dmesg | grep "CFI failure" [ 1258.174653] CFI failure (target: __uncore_umask_show...): Update the type in the DEFINE_UNCORE_FORMAT_ATTR macro to match 'struct device_attribute' so that there is no more CFI violation. Fixes: 06f2c24584f3 ("perf/amd/uncore: Prepare to scale for more attributes that vary per family") Signed-off-by: Nathan Chancellor Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210415001112.3024673-2-nathan@kernel.org commit de5bc7b425d4c27ae5faa00ea7eb6b9780b9a355 Author: Nathan Chancellor Date: Wed Apr 14 17:11:11 2021 -0700 x86/events/amd/iommu: Fix sysfs type mismatch dev_attr_show() calls _iommu_event_show() via an indirect call but _iommu_event_show()'s type does not currently match the type of the show() member in 'struct device_attribute', resulting in a Control Flow Integrity violation. $ cat /sys/devices/amd_iommu_1/events/mem_dte_hit csource=0x0a $ dmesg | grep "CFI failure" [ 3526.735140] CFI failure (target: _iommu_event_show...): Change _iommu_event_show() and 'struct amd_iommu_event_desc' to 'struct device_attribute' so that there is no more CFI violation. Fixes: 7be6296fdd75 ("perf/x86/amd: AMD IOMMU Performance Counter PERF uncore PMU implementation") Signed-off-by: Nathan Chancellor Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210415001112.3024673-1-nathan@kernel.org commit d0d1dd628527c77db2391ce0293c1ed344b2365f Author: Namhyung Kim Date: Wed Feb 10 17:33:26 2021 +0900 perf core: Add PERF_COUNT_SW_CGROUP_SWITCHES event This patch adds a new software event to count context switches involving cgroup switches. So it's counted only if cgroups of previous and next tasks are different. Note that it only checks the cgroups in the perf_event subsystem. For cgroup v2, it shouldn't matter anyway. One can argue that we can do this by using existing sched_switch event with eBPF. But some systems might not have eBPF for some reason so I'd like to add this as a simple way. Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210210083327.22726-2-namhyung@kernel.org commit 7c8056bb366b1b2dc8e4a3cc0b876e15a8ebca2c Author: Namhyung Kim Date: Wed Feb 10 17:33:25 2021 +0900 perf core: Factor out __perf_sw_event_sched In some cases, we need to check more than whether the software event is enabled. So split the condition check and the actual event handling. This is a preparation for the next change. Suggested-by: Peter Zijlstra Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210210083327.22726-1-namhyung@kernel.org commit 7f100744749e4fe547dece3bb6557fae5f0a7252 Author: Vidya Sagar Date: Fri Apr 16 19:15:37 2021 +0530 PCI: tegra: Add Tegra194 MCFG quirks for ECAM errata The PCIe controller in Tegra194 SoC is not ECAM-compliant. With the current hardware design, ECAM can be enabled only for one controller (the C5 controller) with bus numbers starting from 160 instead of 0. A different approach is taken to avoid this abnormal way of enabling ECAM for just one controller but to enable configuration space access for all the other controllers. In this approach, ops are added through MCFG quirk mechanism which access the configuration spaces by dynamically programming iATU (internal AddressTranslation Unit) to generate respective configuration accesses just like the way it is done in DesignWare core sub-system. This issue is specific to Tegra194 and it would be fixed in the future generations of Tegra SoCs. Link: https://lore.kernel.org/r/20210416134537.19474-1-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas commit a7b6864da7e3fb59c5385bb1c28f3a676dc3da27 Author: Jiapeng Chong Date: Thu Apr 15 16:30:22 2021 +0800 PCI: shpchp: Remove unused shpc_writeb() Fix the following clang warning: drivers/pci/hotplug/shpchp_hpc.c:177:20: warning: unused function 'shpc_writeb' [-Wunused-function]. Link: https://lore.kernel.org/r/1618475422-96531-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit fa2f98378f941786a93f8e63696f59fb4ac7538b Author: Jack Yu Date: Mon Mar 29 06:54:00 2021 +0000 ASoC: rt715: remove kcontrols which no longer be used Using new kcontrols "Capture Switch" and "Capture Volume" instead, remove kcontrols which no longer be used. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/5c314f5512654aca9fff0195f77264de@realtek.com Signed-off-by: Mark Brown commit dcca646c4977d885af3466b454df97b9cb0e0d26 Author: Jack Yu Date: Mon Mar 29 06:53:54 2021 +0000 ASoC: rt715: add main capture switch and main capture volume Add main capture switch and main capture volume control. Main capture control has its own channel value respectivelly. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/dfd43a8db04e4d52a889d6f5c1262173@realtek.com Signed-off-by: Mark Brown commit a48f928e13a01d60c9c2a7a7ffab3afd1f7337bf Author: Jack Yu Date: Mon Mar 29 06:54:05 2021 +0000 ASoC: rt715: modification for code simplicity Modification for code simplicity. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/340ee2df83ce47fcb1b59541b12ba7f4@realtek.com Signed-off-by: Mark Brown commit 7ae6af41317416565951cb7dd035ce32c7d56782 Merge: ac22cf52523a6 d25bbe80485f8 Author: Mark Brown Date: Fri Apr 16 16:55:32 2021 +0100 Merge series "ASoC: Intel: add new TGL/ADL configurations" from Pierre-Louis Bossart : Very little code but quite a few descriptors to add TigerLake (TGL) /AlderLake (ADL) ACPI match tables for I2S and SoundWire devices, new dailinks for Bluetooth offload. Some day this will be read from platform firmware. Also clarify how microphones are handled for SoundWire devices, and create modules to avoid linking the same code multiple times. Pierre-Louis Bossart (5): ASoC: Intel: soc-acpi: add ADL SoundWire base configurations ASoC: Intel: soc-acpi: add ADL jack-less SoundWire configurations ASoC: Intel: sof_sdw: add mutual exclusion between PCH DMIC and RT715 ASoC: Intel: boards: handle hda-dsp-common as a module ASoC: Intel: boards: create sof-maxim-common module Vamshi Krishna Gopal (3): ASoC: Intel: soc-acpi: add entries for i2s machines in ADL match table ASoC: Intel: sof_sdw: add quirk for new ADL-P Rvp ASoC: Intel: boards: add support for adl boards in sof-rt5682 Yong Zhi (1): ASoC: Intel: Boards: tgl_max98373: Add BT offload support sound/soc/intel/boards/Kconfig | 18 ++ sound/soc/intel/boards/Makefile | 28 +- sound/soc/intel/boards/bxt_da7219_max98357a.c | 1 + sound/soc/intel/boards/bxt_rt298.c | 1 + sound/soc/intel/boards/cml_rt1011_rt5682.c | 1 + sound/soc/intel/boards/ehl_rt5660.c | 1 + sound/soc/intel/boards/glk_rt5682_max98357a.c | 1 + sound/soc/intel/boards/hda_dsp_common.c | 5 + sound/soc/intel/boards/skl_hda_dsp_generic.c | 1 + sound/soc/intel/boards/sof_da7219_max98373.c | 1 + sound/soc/intel/boards/sof_maxim_common.c | 24 +- sound/soc/intel/boards/sof_maxim_common.h | 6 +- sound/soc/intel/boards/sof_pcm512x.c | 1 + sound/soc/intel/boards/sof_rt5682.c | 67 ++++- sound/soc/intel/boards/sof_sdw.c | 32 ++- sound/soc/intel/boards/sof_sdw_common.h | 1 + sound/soc/intel/boards/sof_sdw_max98373.c | 4 +- .../intel/common/soc-acpi-intel-adl-match.c | 249 ++++++++++++++++++ 18 files changed, 415 insertions(+), 27 deletions(-) -- 2.25.1 commit ac22cf52523a6a71fd8866e8c9d3ae1e79663381 Merge: 343e55e718774 9c2ae363f3347 Author: Mark Brown Date: Fri Apr 16 16:55:31 2021 +0100 Merge series "ASoC: soc-pcm: ignore dummy-DAI at soc_pcm_params_symmetry()" from Kuninori Morimoto : Hi Mark I noticed if we have... 1) Sound Card used DPCM 2) It exchanges rate to 48kHz by using .be_hw_params_fixup() 3) Codec had symmetric_rate = 1 We will get below error. I didn't confirm, but maybe same things happen if it exchanged channels/sample_bits. # aplay 44100.wav # aplay 44100.wav => [kernel] be.ak4613-hifi: ASoC: unmatched rate symmetry: snd-soc-dummy-dai:44100 - soc_pcm_params_symmetry:48000 [kernel] be.ak4613-hifi: ASoC: hw_params BE failed -22 [kernel] fe.rsnd-dai.0: ASoC: hw_params BE failed -22 aplay: set_params:1407: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: 44100 PERIOD_TIME: (23219 23220) PERIOD_SIZE: 1024 PERIOD_BYTES: 4096 PERIODS: 4 BUFFER_TIME: (92879 92880) BUFFER_SIZE: 4096 BUFFER_BYTES: 16384 TICK_TIME: 0 This patch-set solves this issue. patch 1) - 3) are just cleanup patches. 4) is fot this issue. Link: https://lore.kernel.org/r/87a6q0z4xt.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (4): ASoC: soc-pcm: don't use "name" on __soc_pcm_params_symmetry() macro ASoC: soc-pcm: indicate DAI name if soc_pcm_params_symmetry() failed ASoC: soc-utils: add snd_soc_component_is_dummy() ASoC: soc-pcm: ignore dummy-DAI at soc_pcm_params_symmetry() include/sound/soc-component.h | 1 + sound/soc/soc-core.c | 2 +- sound/soc/soc-pcm.c | 14 ++++++++------ sound/soc/soc-utils.c | 6 ++++++ 4 files changed, 16 insertions(+), 7 deletions(-) -- 2.25.1 commit 343e55e71877415a23372388b3e0c59a9bba42f6 Author: Thierry Reding Date: Fri Apr 16 09:11:47 2021 +0200 ASoC: simple-card-utils: Increase maximum number of links to 128 On Tegra186 and later, the number of links can go up to 72, so bump the maximum number of links to the next power of two (128). Fixes: f2138aed231c ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform") Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210416071147.2149109-2-thierry.reding@gmail.com Reviewed-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Mark Brown commit 0f687d826736a5b4eee03170382fe54d413b912a Author: Thierry Reding Date: Fri Apr 16 09:11:46 2021 +0200 ASoC: simple-card-utils: Propagate errors on too many links The DAI counting code doesn't propagate errors when the number of maximum links is exceeded, which causes subsequent initialization code to continue to run and that eventually leads to memory corruption with the code trying to access memory that is out of bounds. Fix this by propagating errors when the maximum number of links is reached, which ensures that the driver fails to load and prevents the memory corruption. Fixes: f2138aed231c ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform") Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210416071147.2149109-1-thierry.reding@gmail.com Reviewed-by: Jon Hunter Tested-by: Jon Hunter Signed-off-by: Mark Brown commit a7be7c23cfdd2cb57609fd2d607923a9cb2a305d Author: Jens Axboe Date: Thu Apr 15 11:31:14 2021 -0600 io_uring: fix merge error for async resubmit A hand-edit while applying this patch on top of a new base resulted in a reverted check for re-issue, resulting in spurious -EAGAIN errors. Fixes: 8c130827f417 ("io_uring: don't alter iopoll reissue fail ret code") Signed-off-by: Jens Axboe commit 75652a30ff67539999148859da071ede862090ca Author: Jens Axboe Date: Thu Apr 15 09:52:40 2021 -0600 io_uring: tie req->apoll to request lifetime We manage these separately right now, just tie it to the request lifetime and make it be part of the usual REQ_F_NEED_CLEANUP logic. Signed-off-by: Jens Axboe commit 4e3d9ff905cd3e6fc80a1f54b89c3aca67bc72be Author: Jens Axboe Date: Thu Apr 15 17:44:34 2021 -0600 io_uring: put flag checking for needing req cleanup in one spot We have this in two spots right now, which is a bit fragile. In preparation for moving REQ_F_POLLED cleanup into the same spot, move the check into a separate helper so we only have it once. Signed-off-by: Jens Axboe commit 76adf92a30f3b92a7f91bb00b28ea80efccd0f01 Author: Darrick J. Wong Date: Wed Apr 14 07:56:36 2021 -0700 xfs: remove xfs_quiesce_attr declaration The function was renamed, so get rid of the declaration. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner commit 2d471b20c55e13c98d1dba413bf2de618e89cdac Author: Robin Murphy Date: Thu Apr 1 14:56:26 2021 +0100 iommu: Streamline registration interface Rather than have separate opaque setter functions that are easy to overlook and lead to repetitive boilerplate in drivers, let's pass the relevant initialisation parameters directly to iommu_device_register(). Acked-by: Will Deacon Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/ab001b87c533b6f4db71eb90db6f888953986c36.1617285386.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit c0aec6680b6c82fe893a546e322e1130cd5cf21e Author: Robin Murphy Date: Thu Apr 1 14:56:25 2021 +0100 iommu: Statically set module owner It happens that the 3 drivers which first supported being modular are also ones which play games with their pgsize_bitmap, so have non-const iommu_ops where dynamically setting the owner manages to work out OK. However, it's less than ideal to force that upon all drivers which want to be modular - like the new sprd-iommu driver which now has a potential bug in that regard - so let's just statically set the module owner and let ops remain const wherever possible. Reviewed-by: Christoph Hellwig Acked-by: Will Deacon Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/31423b99ff609c3d4b291c701a7a7a810d9ce8dc.1617285386.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 49d11527e560f7b62bd740d42e01d895e1d7a606 Merge: d434405aaab7d 3431c3f660a39 ac304c070c544 fe99782702bfa d0272ea1839b2 a56af062ae7cd 38c527aeb4192 304c73ba69459 84b6269c3c28b Author: Joerg Roedel Date: Fri Apr 16 17:16:03 2021 +0200 Merge branches 'iommu/fixes', 'arm/mediatek', 'arm/smmu', 'arm/exynos', 'unisoc', 'x86/vt-d', 'x86/amd' and 'core' into next commit ac304c070c54413efabf29f9e73c54576d329774 Author: Yong Wu Date: Mon Apr 12 14:48:43 2021 +0800 iommu/mediatek-v1: Add error handle for mtk_iommu_probe In the original code, we lack the error handle. This patch adds them. Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20210412064843.11614-2-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit f90a9a85fb946e11092f8ca43e30210a2d427bf4 Author: Yong Wu Date: Mon Apr 12 14:48:42 2021 +0800 iommu/mediatek-v1: Avoid build fail when build as module When this driver build as module, It build fail like: ERROR: modpost: "of_phandle_iterator_args" [drivers/iommu/mtk_iommu_v1.ko] undefined! This patch remove this interface to avoid this build fail. Reported-by: Valdis Kletnieks Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20210412064843.11614-1-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit b34ea31fe013569d42b7e8681ef3f717f77c5b72 Author: Dafna Hirschfeld Date: Fri Apr 16 12:54:49 2021 +0200 iommu/mediatek: Always enable the clk on resume In mtk_iommu_runtime_resume always enable the clk, even if m4u_dom is null. Otherwise the 'suspend' cb might disable the clk which is already disabled causing the warning: [ 1.586104] infra_m4u already disabled [ 1.586133] WARNING: CPU: 0 PID: 121 at drivers/clk/clk.c:952 clk_core_disable+0xb0/0xb8 [ 1.594391] mtk-iommu 10205000.iommu: bound 18001000.larb (ops mtk_smi_larb_component_ops) [ 1.598108] Modules linked in: [ 1.598114] CPU: 0 PID: 121 Comm: kworker/0:2 Not tainted 5.12.0-rc5 #69 [ 1.609246] mtk-iommu 10205000.iommu: bound 14027000.larb (ops mtk_smi_larb_component_ops) [ 1.617487] Hardware name: Google Elm (DT) [ 1.617491] Workqueue: pm pm_runtime_work [ 1.620545] mtk-iommu 10205000.iommu: bound 19001000.larb (ops mtk_smi_larb_component_ops) [ 1.627229] pstate: 60000085 (nZCv daIf -PAN -UAO -TCO BTYPE=--) [ 1.659297] pc : clk_core_disable+0xb0/0xb8 [ 1.663475] lr : clk_core_disable+0xb0/0xb8 [ 1.667652] sp : ffff800011b9bbe0 [ 1.670959] x29: ffff800011b9bbe0 x28: 0000000000000000 [ 1.676267] x27: ffff800011448000 x26: ffff8000100cfd98 [ 1.681574] x25: ffff800011b9bd48 x24: 0000000000000000 [ 1.686882] x23: 0000000000000000 x22: ffff8000106fad90 [ 1.692189] x21: 000000000000000a x20: ffff0000c0048500 [ 1.697496] x19: ffff0000c0048500 x18: ffffffffffffffff [ 1.702804] x17: 0000000000000000 x16: 0000000000000000 [ 1.708112] x15: ffff800011460300 x14: fffffffffffe0000 [ 1.713420] x13: ffff8000114602d8 x12: 0720072007200720 [ 1.718727] x11: 0720072007200720 x10: 0720072007200720 [ 1.724035] x9 : ffff800011b9bbe0 x8 : ffff800011b9bbe0 [ 1.729342] x7 : 0000000000000009 x6 : ffff8000114b8328 [ 1.734649] x5 : 0000000000000000 x4 : 0000000000000000 [ 1.739956] x3 : 00000000ffffffff x2 : ffff800011460298 [ 1.745263] x1 : 1af1d7de276f4500 x0 : 0000000000000000 [ 1.750572] Call trace: [ 1.753010] clk_core_disable+0xb0/0xb8 [ 1.756840] clk_core_disable_lock+0x24/0x40 [ 1.761105] clk_disable+0x20/0x30 [ 1.764501] mtk_iommu_runtime_suspend+0x88/0xa8 [ 1.769114] pm_generic_runtime_suspend+0x2c/0x48 [ 1.773815] __rpm_callback+0xe0/0x178 [ 1.777559] rpm_callback+0x24/0x88 [ 1.781041] rpm_suspend+0xdc/0x470 [ 1.784523] rpm_idle+0x12c/0x170 [ 1.787831] pm_runtime_work+0xa8/0xc0 [ 1.791573] process_one_work+0x1e8/0x360 [ 1.795580] worker_thread+0x44/0x478 [ 1.799237] kthread+0x150/0x158 [ 1.802460] ret_from_fork+0x10/0x30 [ 1.806034] ---[ end trace 82402920ef64573b ]--- [ 1.810728] ------------[ cut here ]------------ In addition, we now don't need to enable the clock from the function mtk_iommu_hw_init since it is already enabled by the resume. Fixes: c0b57581b73b ("iommu/mediatek: Add power-domain operation") Signed-off-by: Dafna Hirschfeld Reviewed-by: Yong Wu Link: https://lore.kernel.org/r/20210416105449.4744-1-dafna.hirschfeld@collabora.com Signed-off-by: Joerg Roedel commit 5a7bd25992e48aacdbd73c09a54f15cd163e92cd Author: Adrien Grassein Date: Wed Mar 31 15:33:13 2021 +0200 drm/bridge: lt8912b: fix incorrect handling of of_* return values A static analysis shows several issues in the driver code at probing time. DT parsing errors were bad handled and could lead to bugs: - Bad error detection; - Bad release of resources Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge") Reported-by: Dan Carpenter Suggested-by: Dan Carpenter Signed-off-by: Adrien Grassein Reviewed-by: Andrzej Hajda Reviewed-by: Dan Carpenter Link: https://patchwork.freedesktop.org/patch/msgid/20210415183639.1487-1-rdunlap@infradead.org Signed-off-by: Robert Foss commit 0c2de3f054a59f15e01804b75a04355c48de628c Author: Peter Zijlstra Date: Thu Mar 25 13:44:46 2021 +0100 sched,fair: Alternative sched_slice() The current sched_slice() seems to have issues; there's two possible things that could be improved: - the 'nr_running' used for __sched_period() is daft when cgroups are considered. Using the RQ wide h_nr_running seems like a much more consistent number. - (esp) cgroups can slice it real fine, which makes for easy over-scheduling, ensure min_gran is what the name says. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210412102001.611897312@infradead.org commit d27e9ae2f244805bbdc730d85fba28685d2471e5 Author: Peter Zijlstra Date: Thu Mar 25 15:18:19 2021 +0100 sched: Move /proc/sched_debug to debugfs Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Greg Kroah-Hartman Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210412102001.548833671@infradead.org commit 3b87f136f8fccddf7da016ab7d04bb3cf9b180f0 Author: Peter Zijlstra Date: Thu Mar 25 11:31:20 2021 +0100 sched,debug: Convert sysctl sched_domains to debugfs Stop polluting sysctl, move to debugfs for SCHED_DEBUG stuff. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Reviewed-by: Valentin Schneider Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/YHgB/s4KCBQ1ifdm@hirez.programming.kicks-ass.net commit 9af0440ec86ebdab075e1b3d231f81fe7decb575 Author: Peter Zijlstra Date: Thu Mar 25 10:53:55 2021 +0100 debugfs: Implement debugfs_create_str() Implement debugfs_create_str() to easily display names and such in debugfs. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Greg Kroah-Hartman Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210412102001.415407080@infradead.org commit 1011dcce99f8026d48fdd7b9cc259e32a8b472be Author: Peter Zijlstra Date: Thu Mar 25 12:21:38 2021 +0100 sched,preempt: Move preempt_dynamic to debug.c Move the #ifdef SCHED_DEBUG bits to kernel/sched/debug.c in order to collect all the debugfs bits. Signed-off-by: Peter Zijlstra (Intel) Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210412102001.353833279@infradead.org commit 8a99b6833c884fa0e7919030d93fecedc69fc625 Author: Peter Zijlstra Date: Wed Mar 24 11:43:21 2021 +0100 sched: Move SCHED_DEBUG sysctl to debugfs Stop polluting sysctl with undocumented knobs that really are debug only, move them all to /debug/sched/ along with the existing /debug/sched_* files that already exist. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Greg Kroah-Hartman Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210412102001.287610138@infradead.org commit d86ba831656611872e4939b895503ddac63d8196 Author: Peter Zijlstra Date: Wed Mar 24 19:48:34 2021 +0100 sched: Don't make LATENCYTOP select SCHED_DEBUG SCHED_DEBUG is not in fact required for LATENCYTOP, don't select it. Suggested-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210412102001.224578981@infradead.org commit 1d1c2509de4488cc58c924d0a6117c62de1d4f9c Author: Peter Zijlstra Date: Wed Mar 24 19:47:43 2021 +0100 sched: Remove sched_schedstats sysctl out from under SCHED_DEBUG CONFIG_SCHEDSTATS does not depend on SCHED_DEBUG, it is inconsistent to have the sysctl depend on it. Suggested-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210412102001.161151631@infradead.org commit b7cc6ec744b307db59568c654a8904a5928aa855 Author: Mel Gorman Date: Wed Mar 24 13:39:16 2021 +0000 sched/numa: Allow runtime enabling/disabling of NUMA balance without SCHED_DEBUG The ability to enable/disable NUMA balancing is not a debugging feature and should not depend on CONFIG_SCHED_DEBUG. For example, machines within a HPC cluster may disable NUMA balancing temporarily for some jobs and re-enable it for other jobs without needing to reboot. This patch removes the dependency on CONFIG_SCHED_DEBUG for kernel.numa_balancing sysctl. The other numa balancing related sysctls are left as-is because if they need to be tuned then it is more likely that NUMA balancing needs to be fixed instead. Signed-off-by: Mel Gorman Signed-off-by: Peter Zijlstra (Intel) Tested-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210324133916.GQ15768@suse.de commit b5c4477366fb5e6a2f0f38742c33acd666c07698 Author: Peter Zijlstra Date: Thu Jan 21 16:09:32 2021 +0100 sched: Use cpu_dying() to fix balance_push vs hotplug-rollback Use the new cpu_dying() state to simplify and fix the balance_push() vs CPU hotplug rollback state. Specifically, we currently rely on notifiers sched_cpu_dying() / sched_cpu_activate() to terminate balance_push, however if the cpu_down() fails when we're past sched_cpu_deactivate(), it should terminate balance_push at that point and not wait until we hit sched_cpu_activate(). Similarly, when cpu_up() fails and we're going back down, balance_push should be active, where it currently is not. So instead, make sure balance_push is enabled below SCHED_AP_ACTIVE (when !cpu_active()), and gate it's utility with cpu_dying(). Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/YHgAYef83VQhKdC2@hirez.programming.kicks-ass.net commit e40f74c535b8a0ecf3ef0388b51a34cdadb34fb5 Author: Peter Zijlstra Date: Tue Jan 19 18:43:45 2021 +0100 cpumask: Introduce DYING mask Introduce a cpumask that indicates (for each CPU) what direction the CPU hotplug is currently going. Notably, it tracks rollbacks. Eg. when an up fails and we do a roll-back down, it will accurately reflect the direction. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210310150109.151441252@infradead.org commit b02a4fd8148f655095d9e3d6eddd8f0042bcc27c Author: Peter Zijlstra Date: Mon Jan 25 16:46:49 2021 +0100 cpumask: Make cpu_{online,possible,present,active}() inline Prepare for addition of another mask. Primarily a code movement to avoid having to create more #ifdef, but while there, convert everything with an argument to an inline function. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210310150109.045447765@infradead.org commit b4193622707846637ea58bd3bdcaf8be997c4db9 Author: Shawn Guo Date: Thu Apr 15 18:47:27 2021 +0800 dt-bindings: bcm4329-fmac: add optional brcm,ccode-map Add optional brcm,ccode-map property to support translation from ISO3166 country code to brcmfmac firmware country code and revision. The country revision is needed because the RF parameters that provide regulatory compliance are tweaked per platform/customer. So depending on the RF path tight to the chip, certain country revision needs to be specified. As such they could be seen as device specific calibration data which is a good fit into device tree. Signed-off-by: Shawn Guo Reviewed-by: Arend van Spriel Link: https://lore.kernel.org/r/20210415104728.8471-2-shawn.guo@linaro.org Signed-off-by: Rob Herring commit 46ade4740bbf9bf4e804ddb2c85845cccd219f3c Author: Kan Liang Date: Wed Apr 14 07:36:29 2021 -0700 perf/x86: Move cpuc->running into P4 specific code The 'running' variable is only used in the P4 PMU. Current perf sets the variable in the critical function x86_pmu_start(), which wastes cycles for everybody not running on P4. Move cpuc->running into the P4 specific p4_pmu_enable_event(). Add a static per-CPU 'p4_running' variable to replace the 'running' variable in the struct cpu_hw_events. Saves space for the generic structure. The p4_pmu_enable_all() also invokes the p4_pmu_enable_event(), but it should not set cpuc->running. Factor out __p4_pmu_enable_event() for p4_pmu_enable_all(). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1618410990-21383-1-git-send-email-kan.liang@linux.intel.com commit 6216798bf98e82c382922f1b71ecc4a13d6e65cb Author: Marco Elver Date: Thu Apr 8 12:36:03 2021 +0200 selftests/perf_events: Add kselftest for remove_on_exec Add kselftest to test that remove_on_exec removes inherited events from child tasks. Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210408103605.1676875-9-elver@google.com commit f2c3c32f45002de19c6dec33f32fd259e82f2557 Author: Marco Elver Date: Thu Apr 8 12:36:02 2021 +0200 selftests/perf_events: Add kselftest for process-wide sigtrap handling Add a kselftest for testing process-wide perf events with synchronous SIGTRAP on events (using breakpoints). In particular, we want to test that changes to the event propagate to all children, and the SIGTRAPs are in fact synchronously sent to the thread where the event occurred. Note: The "signal_stress" test case is also added later in the series to perf tool's built-in tests. The test here is more elaborate in that respect, which on one hand avoids bloating the perf tool unnecessarily, but we also benefit from structured tests with TAP-compliant output that the kselftest framework provides. Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210408103605.1676875-8-elver@google.com commit 97ba62b278674293762c3d91f724f1bb922f04e0 Author: Marco Elver Date: Thu Apr 8 12:36:01 2021 +0200 perf: Add support for SIGTRAP on perf events Adds bit perf_event_attr::sigtrap, which can be set to cause events to send SIGTRAP (with si_code TRAP_PERF) to the task where the event occurred. The primary motivation is to support synchronous signals on perf events in the task where an event (such as breakpoints) triggered. To distinguish perf events based on the event type, the type is set in si_errno. For events that are associated with an address, si_addr is copied from perf_sample_data. The new field perf_event_attr::sig_data is copied to si_perf, which allows user space to disambiguate which event (of the same type) triggered the signal. For example, user space could encode the relevant information it cares about in sig_data. We note that the choice of an opaque u64 provides the simplest and most flexible option. Alternatives where a reference to some user space data is passed back suffer from the problem that modification of referenced data (be it the event fd, or the perf_event_attr) can race with the signal being delivered (of course, the same caveat applies if user space decides to store a pointer in sig_data, but the ABI explicitly avoids prescribing such a design). Suggested-by: Peter Zijlstra Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Acked-by: Dmitry Vyukov Link: https://lore.kernel.org/lkml/YBv3rAT566k+6zjg@hirez.programming.kicks-ass.net/ commit fb6cc127e0b6e629252cdd0f77d5a1f49db95b92 Author: Marco Elver Date: Thu Apr 8 12:36:00 2021 +0200 signal: Introduce TRAP_PERF si_code and si_perf to siginfo Introduces the TRAP_PERF si_code, and associated siginfo_t field si_perf. These will be used by the perf event subsystem to send signals (if requested) to the task where an event occurred. Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Acked-by: Geert Uytterhoeven # m68k Acked-by: Arnd Bergmann # asm-generic Link: https://lkml.kernel.org/r/20210408103605.1676875-6-elver@google.com commit 2e498d0a74e5b88a6689ae1b811f247f91ff188e Author: Marco Elver Date: Thu Apr 8 12:35:59 2021 +0200 perf: Add support for event removal on exec Adds bit perf_event_attr::remove_on_exec, to support removing an event from a task on exec. This option supports the case where an event is supposed to be process-wide only, and should not propagate beyond exec, to limit monitoring to the original process image only. Suggested-by: Peter Zijlstra Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210408103605.1676875-5-elver@google.com commit 2b26f0aa004995f49f7b6f4100dd0e4c39a9ed5f Author: Marco Elver Date: Thu Apr 8 12:35:58 2021 +0200 perf: Support only inheriting events if cloned with CLONE_THREAD Adds bit perf_event_attr::inherit_thread, to restricting inheriting events only if the child was cloned with CLONE_THREAD. This option supports the case where an event is supposed to be process-wide only (including subthreads), but should not propagate beyond the current process's shared environment. Suggested-by: Peter Zijlstra Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/lkml/YBvj6eJR%2FDY2TsEB@hirez.programming.kicks-ass.net/ commit 47f661eca0700928012e11c57ea0328f5ccfc3b9 Author: Marco Elver Date: Thu Apr 8 12:35:57 2021 +0200 perf: Apply PERF_EVENT_IOC_MODIFY_ATTRIBUTES to children As with other ioctls (such as PERF_EVENT_IOC_{ENABLE,DISABLE}), fix up handling of PERF_EVENT_IOC_MODIFY_ATTRIBUTES to also apply to children. Suggested-by: Dmitry Vyukov Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dmitry Vyukov Link: https://lkml.kernel.org/r/20210408103605.1676875-3-elver@google.com commit ef54c1a476aef7eef26fe13ea10dc090952c00f8 Author: Peter Zijlstra Date: Thu Apr 8 12:35:56 2021 +0200 perf: Rework perf_event_exit_event() Make perf_event_exit_event() more robust, such that we can use it from other contexts. Specifically the up and coming remove_on_exec. For this to work we need to address a few issues. Remove_on_exec will not destroy the entire context, so we cannot rely on TASK_TOMBSTONE to disable event_function_call() and we thus have to use perf_remove_from_context(). When using perf_remove_from_context(), there's two races to consider. The first is against close(), where we can have concurrent tear-down of the event. The second is against child_list iteration, which should not find a half baked event. To address this, teach perf_remove_from_context() to special case !ctx->is_active and about DETACH_CHILD. [ elver@google.com: fix racing parent/child exit in sync_child_event(). ] Signed-off-by: Marco Elver Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210408103605.1676875-2-elver@google.com commit 874fc35cdd55e2d46161901de43ec58ca2efc5fe Author: Alexander Shishkin Date: Wed Apr 14 18:49:55 2021 +0300 perf intel-pt: Use aux_watermark Turns out, the default setting of attr.aux_watermark to half of the total buffer size is not very useful, especially with smaller buffers. The problem is that, after half of the buffer is filled up, the kernel updates ->aux_head and sets up the next "transaction", while observing that ->aux_tail is still zero (as userspace haven't had the chance to update it), meaning that the trace will have to stop at the end of this second "transaction". This means, for example, that the second PERF_RECORD_AUX in every trace comes with TRUNCATED flag set. Setting attr.aux_watermark to quarter of the buffer gives enough space for the ->aux_tail update to be observed and prevents the data loss. The obligatory before/after showcase: > # perf_before record -e intel_pt//u -m,8 uname > Linux > [ perf record: Woken up 6 times to write data ] > Warning: > AUX data lost 4 times out of 10! > > [ perf record: Captured and wrote 0.099 MB perf.data ] > # perf record -e intel_pt//u -m,8 uname > Linux > [ perf record: Woken up 4 times to write data ] > [ perf record: Captured and wrote 0.039 MB perf.data ] The effect is still visible with large workloads and large buffers, although less pronounced. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210414154955.49603-3-alexander.shishkin@linux.intel.com commit d68e6799a5c87f415d3bfa0dea49caee28ab00d1 Author: Alexander Shishkin Date: Wed Apr 14 18:49:54 2021 +0300 perf: Cap allocation order at aux_watermark Currently, we start allocating AUX pages half the size of the total requested AUX buffer size, ignoring the attr.aux_watermark setting. This, in turn, makes intel_pt driver disregard the watermark also, as it uses page order for its SG (ToPA) configuration. Now, this can be fixed in the intel_pt PMU driver, but seeing as it's the only one currently making use of high order allocations, there is no reason not to fix the allocator instead. This way, any other driver wishing to add this support would not have to worry about this. Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210414154955.49603-2-alexander.shishkin@linux.intel.com commit 0c37e2eb6b83e375e8a654d01598292d5591fc65 Author: Kai Vehmanen Date: Fri Apr 16 16:11:57 2021 +0300 ALSA: hda/hdmi: fix race in handling acomp ELD notification at resume When snd-hda-codec-hdmi is used with ASoC HDA controller like SOF (acomp used for ELD notifications), display connection change done during suspend, can be lost due to following sequence of events: 1. system in S3 suspend 2. DP/HDMI receiver connected 3. system resumed 4. HDA controller resumed, but card->deferred_resume_work not complete 5. acomp eld_notify callback 6. eld_notify ignored as power state is not CTL_POWER_D0 7. HDA resume deferred work completed, power state set to CTL_POWER_D0 This results in losing the notification, and the jack state reported to user-space is not correct. The check on step 6 was added in commit 8ae743e82f0b ("ALSA: hda - Skip ELD notification during system suspend"). It would seem with the deferred resume logic in ASoC core, this check is not safe. Fix the issue by modifying the check to use "dev.power.power_state.event" instead of ALSA specific card power state variable. BugLink: https://github.com/thesofproject/linux/issues/2825 Suggested-by: Takashi Iwai Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210416131157.1881366-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 38d0b1c9cec71e6d0f3bddef0bbce41d05a3e796 Author: Tyrel Datwyler Date: Thu Feb 11 12:24:35 2021 -0600 powerpc/pseries: extract host bridge from pci_bus prior to bus removal The pci_bus->bridge reference may no longer be valid after pci_bus_remove() resulting in passing a bad value to device_unregister() for the associated bridge device. Store the host_bridge reference in a separate variable prior to pci_bus_remove(). Fixes: 7340056567e3 ("powerpc/pci: Reorder pci bus/bridge unregistration during PHB removal") Signed-off-by: Tyrel Datwyler Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210211182435.47968-1-tyreld@linux.ibm.com commit 0751fdf280416847d31d9b7276e4afc614fc6e15 Author: Michael Ellerman Date: Fri Apr 16 21:38:04 2021 +1000 macintosh/via-pmu: Fix build warning Now that __fake_sleep is static, we get a warning about it being unused in some configurations: drivers/macintosh/via-pmu.c:190:12: warning: '__fake_sleep' defined but not used 190 | static int __fake_sleep; Move it inside the ifdef where it's used to avoid the warning. Fixes: 95d143923379 ("macintosh/via-pmu: Make some symbols static") Reported-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210416114139.772236-1-mpe@ellerman.id.au commit 9c2ae363f3347baacd2353a017eb62363420a1ea Author: Kuninori Morimoto Date: Fri Apr 16 11:00:32 2021 +0900 ASoC: soc-pcm: ignore dummy-DAI at soc_pcm_params_symmetry() soc_pcm_params_symmetry() checks CPU / Codec symmetry. Unfortunately there was bug on it (= A) which didn't check Codec. But is back by (B). A: v5.7: commit c840f7698d26 ("ASoC: soc-pcm: Merge for_each_rtd_cpu/codec_dais()") B: v5.12: commit 3a9067211122 ("ASoC: soc-pcm: cleanup soc_pcm_params_symmetry()") In total, old - v5.6 (= Generation-1): symmetric_rate : DAI_Link / CPU / Codec symmetric_channels : DAI_Link / CPU / Codec symmetric_sample_bits : DAI_Link / CPU / Codec v5.7 - v5.11 (= Generation-2): (= because of bug by (A)) symmetric_rate : DAI_Link / CPU symmetric_channels : DAI_Link / CPU / Codec symmetric_sample_bits : DAI_Link / CPU / Codec v5.12 - (= Generation-3): (= back by (B)) symmetric_rate : DAI_Link / CPU / Codec symmetric_channels : DAI_Link / CPU / Codec symmetric_sample_bits : DAI_Link / CPU / Codec OTOH, we can use DPCM which is configured by FE / BE. Both FE / BE uses dummy-DAI. FE: CPU <-> dummy-DAI BE: dummy-DAI <-> Codec One note is that we can use .be_hw_params_fixup in DPCM case. This means BE settings might be fixuped/updated by FE. This feature is used for example on MIXer case. It can be happen not only for rate, but for channels/sample_bits too. Because of these reasons, below issue happen on Generation-1 / Generation-3, if... 1) Sound Card used DPCM 2) It exchanges rate to 48kHz by using .be_hw_params_fixup() 3) Codec had symmetric_rate = 1 I didn't confirm, but maybe same things happen if it exchanged channels/sample_bits at Generation-1/2/3 too. # aplay 44100.wav # aplay 44100.wav => [kernel] be.ak4613-hifi: ASoC: unmatched rate symmetry: snd-soc-dummy-dai:44100 - soc_pcm_params_symmetry:48000 [kernel] be.ak4613-hifi: ASoC: hw_params BE failed -22 [kernel] fe.rsnd-dai.0: ASoC: hw_params BE failed -22 aplay: set_params:1407: Unable to install hw params: ACCESS: RW_INTERLEAVED FORMAT: S16_LE SUBFORMAT: STD SAMPLE_BITS: 16 FRAME_BITS: 32 CHANNELS: 2 RATE: 44100 PERIOD_TIME: (23219 23220) PERIOD_SIZE: 1024 PERIOD_BYTES: 4096 PERIODS: 4 BUFFER_TIME: (92879 92880) BUFFER_SIZE: 4096 BUFFER_BYTES: 16384 TICK_TIME: 0 soc_pcm_params_symmetry() checks by below if (symmetry) for_each_rtd_cpu_dais(rtd, i, cpu_dai) if (cpu_dai->xxx && cpu_dai->xxx != d.xxx) { dev_err(rtd->dev, "..."); return -EINVAL; } Because of above reason 3) (= Codec had symmetric_rate = 1) BE can't ignore "if (symmetric)". At 1st aplay, soc_pcm_params_symmetry() ignores it, because dummy-DAI->rate is 0. After this check, each DAI sets/keep settings. In above sample case, BE gets 48000 and FE gets 44100, and it happen BE -> FE order. Because DPCM is sharing *same* dummy-DAI, dummy-DAI sets as 48000 by BE, and is overwrote by 44100 by FE. This settings never be cleaned (= a) after 1st aplay, because dummy-DAI is used from FE/BE, never be last user (b). static int soc_pcm_hw_clean(...) { ... for_each_rtd_dais(rtd, i, dai) { ... (b) if (snd_soc_dai_active(dai) == 1) (a) soc_pcm_set_dai_params(dai, NULL); ... } ... } At 2nd aplay, BE gets 48000 but dummy-DAI is keeping 44100, soc_pcm_params_symmetry() checks will fail. To solve this issue, this patch ignores dummy-DAI at soc_pcm_params_symmetry() Link: https://lore.kernel.org/r/87a6q0z4xt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87y2djxa2n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8f1a16818a08047c83bc6e29efc07b15fd11fa29 Author: Kuninori Morimoto Date: Fri Apr 16 11:00:26 2021 +0900 ASoC: soc-utils: add snd_soc_component_is_dummy() There is snd_soc_dai_is_dummy(), but not for component. This patch adds it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zgxzxa2t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ee39d77ed91f220b1458137118dea158a095d5c5 Author: Kuninori Morimoto Date: Fri Apr 16 11:00:11 2021 +0900 ASoC: soc-pcm: indicate DAI name if soc_pcm_params_symmetry() failed It indicates unmatched symmetry value, but not indicates on which DAI. This patch indicates it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871rbbyono.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1cacbac447d9b29a4057d7bbffe8c3d4125ec82a Author: Kuninori Morimoto Date: Fri Apr 16 10:59:48 2021 +0900 ASoC: soc-pcm: don't use "name" on __soc_pcm_params_symmetry() macro __soc_pcm_params_symmetry() macro is using "name" as parameter which will be exchanged to rate/channles/sample_bit, like below dai->name => dai->rate dai->name => dai->channels dai->name => dai->sample_bit But, dai itself has "name". This means 1) It is very confusable naming 2) It can't use dai->name This patch use "xxx" instead of "name" Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8735vryoob.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit df4e137299d5688f70c409f2c298cbdc729253ce Author: Shawn Lin Date: Fri Apr 16 10:17:34 2021 +0800 mmc: dw_mmc-rockchip: Just set default sample value for legacy mode .set_ios() is called from .resume() as well. For SDIO device which sets keep-power-in-suspend, nothing should be changed after resuming, as well as sample tuning value, since this value is tuned already. So we should not overwrite it with the default value. Signed-off-by: Shawn Lin Link: https://lore.kernel.org/r/1618539454-182170-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Ulf Hansson commit 39fd01863616964f009599e50ca5c6ea9ebf88d6 Author: Trond Myklebust Date: Thu Apr 15 15:41:57 2021 -0400 NFS: Don't discard pNFS layout segments that are marked for return If the pNFS layout segment is marked with the NFS_LSEG_LAYOUTRETURN flag, then the assumption is that it has some reporting requirement to perform through a layoutreturn (e.g. flexfiles layout stats or error information). Fixes: e0b7d420f72a ("pNFS: Don't discard layout segments that are marked for return") Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust commit 8926cc8302819be9e67f70409ed001ecb2c924a9 Author: Trond Myklebust Date: Thu Apr 15 15:09:41 2021 -0400 NFSv4.x: Don't return NFS4ERR_NOMATCHING_LAYOUT if we're unmounting If the NFS super block is being unmounted, then we currently may end up telling the server that we've forgotten the layout while it is actually still in use by the client. In that case, just assume that the client will soon return the layout anyway, and so return NFS4ERR_DELAY in response to the layout recall. Fixes: 58ac3e59235f ("NFSv4/pnfs: Clean up nfs_layout_find_inode()") Signed-off-by: Trond Myklebust commit 126bdb606fd2802454e6048caef1be3e25dd121e Author: Quanyang Wang Date: Fri Apr 16 08:46:52 2021 +0800 spi: spi-zynqmp-gqspi: return -ENOMEM if dma_map_single fails The spi controller supports 44-bit address space on AXI in DMA mode, so set dma_addr_t width to 44-bit to avoid using a swiotlb mapping. In addition, if dma_map_single fails, it should return immediately instead of continuing doing the DMA operation which bases on invalid address. This fixes the following crash which occurs in reading a big block from flash: [ 123.633577] zynqmp-qspi ff0f0000.spi: swiotlb buffer is full (sz: 4194304 bytes), total 32768 (slots), used 0 (slots) [ 123.644230] zynqmp-qspi ff0f0000.spi: ERR:rxdma:memory not mapped [ 123.784625] Unable to handle kernel paging request at virtual address 00000000003fffc0 [ 123.792536] Mem abort info: [ 123.795313] ESR = 0x96000145 [ 123.798351] EC = 0x25: DABT (current EL), IL = 32 bits [ 123.803655] SET = 0, FnV = 0 [ 123.806693] EA = 0, S1PTW = 0 [ 123.809818] Data abort info: [ 123.812683] ISV = 0, ISS = 0x00000145 [ 123.816503] CM = 1, WnR = 1 [ 123.819455] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000805047000 [ 123.825887] [00000000003fffc0] pgd=0000000803b45003, p4d=0000000803b45003, pud=0000000000000000 [ 123.834586] Internal error: Oops: 96000145 [#1] PREEMPT SMP Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang Link: https://lore.kernel.org/r/20210416004652.2975446-6-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit a2c5bedb2d55dd27c642c7b9fb6886d7ad7bdb58 Author: Quanyang Wang Date: Fri Apr 16 08:46:51 2021 +0800 spi: spi-zynqmp-gqspi: fix use-after-free in zynqmp_qspi_exec_op When handling op->addr, it is using the buffer "tmpbuf" which has been freed. This will trigger a use-after-free KASAN warning. Let's use temporary variables to store op->addr.val and op->cmd.opcode to fix this issue. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang Link: https://lore.kernel.org/r/20210416004652.2975446-5-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit 2530b3df4326023a171977ab46fdfeac0340f5b2 Author: Amit Kumar Mahapatra Date: Fri Apr 16 08:46:50 2021 +0800 spi: spi-zynqmp-gqspi: Resolved slab-out-of-bounds bug During a transfer the driver filled the fifo with 4bytes, even if the data that needs to be transfer is less that 4bytes. This resulted in slab-out-of-bounds bug in KernelAddressSanitizer. This patch resolves slab-out-of-bounds bug by filling the fifo with the number of bytes that needs to transferred. Signed-off-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20210416004652.2975446-4-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit 799f923f0a66a9c99f0a3eaa078b306db7a8b33a Author: Quanyang Wang Date: Fri Apr 16 08:46:49 2021 +0800 spi: spi-zynqmp-gqspi: fix hang issue when suspend/resume After calling platform_set_drvdata(pdev, xqspi) in probe, the return value of dev_get_drvdata(dev) is a pointer to struct zynqmp_qspi but not struct spi_controller. A wrong structure type passing to the functions spi_controller_suspend/resume will hang the system. And we should check the return value of spi_controller_suspend, if an error is returned, return it to PM subsystem to stop suspend. Also, GQSPI_EN_MASK should be written to GQSPI_EN_OFST to enable the spi controller in zynqmp_qspi_resume since it was disabled in zynqmp_qspi_suspend before. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang Link: https://lore.kernel.org/r/20210416004652.2975446-3-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit c6bdae08012b2ca3e94f3a41ef4ca8cfe7c9ab6f Author: Quanyang Wang Date: Fri Apr 16 08:46:48 2021 +0800 spi: spi-zynqmp-gqspi: fix clk_enable/disable imbalance issue The clks "pclk" and "ref_clk" are enabled twice during the probe. The first time is in the function zynqmp_qspi_probe and the second time is in zynqmp_qspi_setup_op which is called by devm_spi_register_controller. Then calling zynqmp_qspi_remove (rmmod this module) to disable these clks will trigger a warning as below: [ 309.124604] Unpreparing enabled qspi_ref [ 309.128641] WARNING: CPU: 1 PID: 537 at drivers/clk/clk.c:824 clk_core_unprepare+0x108/0x110 Since pm_runtime works now, clks can be enabled/disabled by calling zynqmp_runtime_suspend/resume. So we don't need to enable these clks explicitly in zynqmp_qspi_setup_op. Remove them to fix this issue. And remove clk enabling/disabling in zynqmp_qspi_resume because there is no spi transfer operation so enabling ref_clk is redundant meanwhile pclk is not disabled for it is shared with other peripherals. Furthermore replace clk_enable/disable with clk_prepare_enable and clk_disable_unprepare in runtime_suspend/resume functions. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang Link: https://lore.kernel.org/r/20210416004652.2975446-2-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit d97140033948363ffdf5ed71dd2366f717e120e7 Author: Daniel Baluta Date: Wed Apr 14 13:12:12 2021 +0300 ASoC: core: Don't set platform name when of_node is set A DAI link has 3 components: * CPU * platform * codec(s) A component is specified via: * name * of_node * dai_name In order to avoid confusion when building a sound card we disallow matching by both name and of_node (1). soc_check_tplg_fes allows overriding certain BE links by overriding BE link name. This doesn't work well if BE link was specified via DT, because we end up with a link with both name and of_node specified which is conflicting with (1). In order to fix this we need to: * override of_node if component was specified via DT * override name, otherwise. Signed-off-by: Daniel Baluta Link: https://lore.kernel.org/r/20210414101212.65573-1-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown commit d25bbe80485f8bcbbeb91a2a6cd8798c124b27b7 Author: Vamshi Krishna Gopal Date: Thu Apr 15 12:50:09 2021 -0500 ASoC: Intel: sof_sdw: add quirk for new ADL-P Rvp Add quirks for jack detection, rt711 DAI and DMIC Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Signed-off-by: Vamshi Krishna Gopal Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210415175013.192862-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 870dc42fe8311ef5b291ccb21eda3f7069b6f599 Author: Pierre-Louis Bossart Date: Thu Apr 15 12:50:06 2021 -0500 ASoC: Intel: soc-acpi: add ADL jack-less SoundWire configurations Add one configuration with no RT711. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Libin Yang Link: https://lore.kernel.org/r/20210415175013.192862-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 093b9dcb597611ce65f8c5610ee446616c0be304 Author: Pierre-Louis Bossart Date: Thu Apr 15 12:50:05 2021 -0500 ASoC: Intel: soc-acpi: add ADL SoundWire base configurations Add configurations ported over from TGL. The topology names need to include link information given all the hardware permutations. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Libin Yang Link: https://lore.kernel.org/r/20210415175013.192862-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 75b62ab65d2715ce6ff0794033d61ab9dc4a2dfc Author: Jonas Witschel Date: Fri Apr 16 12:58:54 2021 +0200 ALSA: hda/realtek: fix mute/micmute LEDs for HP ProBook 445 G7 The HP ProBook 445 G7 (17T32ES) uses ALC236. Like ALC236_FIXUP_HP_GPIO_LED, COEF index 0x34 bit 5 is used to control the playback mute LED, but the microphone mute LED is controlled using pin VREF instead of a COEF index. AlsaInfo: https://alsa-project.org/db/?f=0d3f4d1af39cc359f9fea9b550727ee87e5cf45a Signed-off-by: Jonas Witschel Cc: Link: https://lore.kernel.org/r/20210416105852.52588-1-diabonas@archlinux.org Signed-off-by: Takashi Iwai commit 7687b38ae470f01749e420079c36cccb24b8619a Author: Lin Feng Date: Thu Apr 15 11:43:26 2021 +0800 bfq/mq-deadline: remove redundant check for passthrough request Since commit 01e99aeca39796003 'blk-mq: insert passthrough request into hctx->dispatch directly', passthrough request should not appear in IO-scheduler any more, so blk_rq_is_passthrough checking in addon IO schedulers is redundant. (Notes: this patch passes generic IO load test with hdds under SAS controller and hdds under AHCI controller but obviously not covers all. Not sure if passthrough request can still escape into IO scheduler from blk_mq_sched_insert_requests, which is used by blk_mq_flush_plug_list and has lots of indirect callers.) Signed-off-by: Lin Feng Reviewed-by: Ming Lei Signed-off-by: Jens Axboe commit 8d663f34f8afcf5fc6a84c3cc4fa28cc84d58e39 Author: Lin Feng Date: Thu Apr 15 11:39:20 2021 +0800 blk-mq: bypass IO scheduler's limit_depth for passthrough request Commit 01e99aeca39796003 ("blk-mq: insert passthrough request into hctx->dispatch directly") gives high priority to passthrough requests and bypass underlying IO scheduler. But as we allocate tag for such request it still runs io-scheduler's callback limit_depth, while we really want is to give full sbitmap-depth capabity to such request for acquiring available tag. blktrace shows PC requests(dmraid -s -c -i) hit bfq's limit_depth: 8,0 2 0 0.000000000 39952 1,0 m N bfq [bfq_limit_depth] wr_busy 0 sync 0 depth 8 8,0 2 1 0.000008134 39952 D R 4 [dmraid] 8,0 2 2 0.000021538 24 C R [0] 8,0 2 0 0.000035442 39952 1,0 m N bfq [bfq_limit_depth] wr_busy 0 sync 0 depth 8 8,0 2 3 0.000038813 39952 D R 24 [dmraid] 8,0 2 4 0.000044356 24 C R [0] This patch introduce a new wrapper to make code not that ugly. Signed-off-by: Lin Feng Reviewed-by: Ming Lei Link: https://lore.kernel.org/r/20210415033920.213963-1-linf@wangsu.com Signed-off-by: Jens Axboe commit 0f049f7d11dc5ef122c9922bbc2e468b2b6ad933 Author: Christophe JAILLET Date: Sat Apr 10 22:30:16 2021 +0200 crypto: crc32-generic - Use SPDX-License-Identifier Use SPDX-License-Identifier: GPL-2.0-only, instead of hand writing it. This also removes a reference to http://www.xyratex.com which seems to be down. Signed-off-by: Christophe JAILLET Signed-off-by: Herbert Xu commit 705f6e134ad17b171884fb7a64458184e3ecc808 Author: Hui Tang Date: Sat Apr 10 17:50:32 2021 +0800 crypto: hisilicon/hpre - delete redundant log and return in advance 'hpre_cfg_by_dsm' has checked and printed error path internally. It is not necessary to do it here, so remove it. It should return error immediately when return value of 'hpre_cfg_by_dsm' is non-zero, and no need to execute the remaining sentences. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 5bc3962c53c7062a711ed84cf97a15bef97ecf17 Author: Hui Tang Date: Sat Apr 10 17:47:01 2021 +0800 crypto: hisilicon/hpre - add debug log When the received sqe is abnormal, the error message in the sqe written back by the hardware is printed to help to analyze the abnormal causes. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit c4433247d91f5e1fe2c8db6b09288d7a0808037c Author: Hui Tang Date: Sat Apr 10 17:47:00 2021 +0800 crypto: hisilicon/hpre - use the correct variable type The return value of 'le32_to_cpu' is unsigned, so change the variable type from 'int' to 'unsigned int'. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit a2035904f012090e6d5362bd9e0fe35eb3a32eb1 Author: Hui Tang Date: Sat Apr 10 17:46:59 2021 +0800 crypto: hisilicon/hpre - delete the rudundant space after return There are two spaces after return, just keep one. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 44200f2d9b8b52389c70e6c7bbe51e0dc6eaf938 Author: Nathan Chancellor Date: Fri Apr 9 15:11:55 2021 -0700 crypto: arm/curve25519 - Move '.fpu' after '.arch' Debian's clang carries a patch that makes the default FPU mode 'vfp3-d16' instead of 'neon' for 'armv7-a' to avoid generating NEON instructions on hardware that does not support them: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/-/raw/5a61ca6f21b4ad8c6ac4970e5ea5a7b5b4486d22/debian/patches/clang-arm-default-vfp3-on-armv7a.patch https://bugs.debian.org/841474 https://bugs.debian.org/842142 https://bugs.debian.org/914268 This results in the following build error when clang's integrated assembler is used because the '.arch' directive overrides the '.fpu' directive: arch/arm/crypto/curve25519-core.S:25:2: error: instruction requires: NEON vmov.i32 q0, #1 ^ arch/arm/crypto/curve25519-core.S:26:2: error: instruction requires: NEON vshr.u64 q1, q0, #7 ^ arch/arm/crypto/curve25519-core.S:27:2: error: instruction requires: NEON vshr.u64 q0, q0, #8 ^ arch/arm/crypto/curve25519-core.S:28:2: error: instruction requires: NEON vmov.i32 d4, #19 ^ Shuffle the order of the '.arch' and '.fpu' directives so that the code builds regardless of the default FPU mode. This has been tested against both clang with and without Debian's patch and GCC. Cc: stable@vger.kernel.org Fixes: d8f1308a025f ("crypto: arm/curve25519 - wire up NEON implementation") Link: https://github.com/ClangBuiltLinux/continuous-integration2/issues/118 Reported-by: Arnd Bergmann Suggested-by: Arnd Bergmann Suggested-by: Jessica Clarke Signed-off-by: Nathan Chancellor Acked-by: Jason A. Donenfeld Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Signed-off-by: Herbert Xu commit 1c4d9d5bbb5a94ff51853be1089dd48546d4f81c Author: Wojciech Ziemba Date: Fri Apr 9 14:56:19 2021 +0100 crypto: qat - enable detection of accelerators hang Enable the detection of hangs by setting watchdog timers (WDTs) on generations that supports that feature. The default timeout value comes from HW specs. WTDs are reset each time an accelerator wins arbitration and is able to send/read a command to/from an accelerator. The value has added significant margin to make sure there are no spurious timeouts. The scope of watchdog is per QAT device. If a timeout is detected, the firmware resets the accelerator and returns a response descriptor with an appropriate error code. Signed-off-by: Wojciech Ziemba Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 7e958d301c0db051c358001d818c8b8637131190 Author: Kai Ye Date: Fri Apr 9 17:04:04 2021 +0800 crypto: hisilicon/sgl - fix the sg buf unmap Add data cleared operation for sge data. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 4b95e17b8fcce5a137403f508fc77cad7d014c68 Author: Kai Ye Date: Fri Apr 9 17:04:03 2021 +0800 crypto: hisilicon/sgl - fix the soft sg map to hardware sg The buffer of the hardware sge needs to be initialized by soft sgl. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 197272b8f0bb8de37248a30469262a79edb8e512 Author: Kai Ye Date: Fri Apr 9 17:04:02 2021 +0800 crypto: hisilicon/sgl - add some dfx logs Add some dfx logs in some abnormal exit situations. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit c5f735bbf35a67c5f3c6db0d7621159f1cb536d1 Author: Kai Ye Date: Fri Apr 9 17:04:01 2021 +0800 crypto: hisilicon/sgl - delete unneeded variable initialization Delete unneeded variable initialization Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 51028c6efa90ba4ab2311b0977287aac8c154f5b Author: Kai Ye Date: Fri Apr 9 17:04:00 2021 +0800 crypto: hisilicon/sgl - add a comment for block size initialization This seems "32" and "31" is obfuscating, It might be better to add a comment, which explain it. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 07a4356bafa932eb64159866059ce17847520ecb Author: Kai Ye Date: Thu Apr 8 18:23:51 2021 +0800 crypto: hisilicon/sec - use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 3eb75fc7d8c79c7c6cfe388330c14999cf333d29 Author: Kai Ye Date: Thu Apr 8 18:23:50 2021 +0800 crypto: atmel - use the correct print format According to Documentation/core-api/printk-formats.rst, Use the correct print format. Printing an unsigned int value should use %u instead of %d. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 1f34cc4a8da34fbb250efb928f9b8c6fe7ee0642 Author: Shixin Liu Date: Thu Apr 8 15:18:39 2021 +0800 crypto: omap-aes - Fix PM reference leak on omap-aes.c pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: Shixin Liu Signed-off-by: Herbert Xu commit 13343badae093977295341d5a050f51ef128821c Author: Shixin Liu Date: Thu Apr 8 15:18:37 2021 +0800 crypto: sa2ul - Fix PM reference leak in sa_ul_probe() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: Shixin Liu Signed-off-by: Herbert Xu commit 747bf30fd944f02f341b5f3bc7d97a13f2ae2fbe Author: Shixin Liu Date: Thu Apr 8 15:18:36 2021 +0800 crypto: stm32/cryp - Fix PM reference leak on stm32-cryp.c pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: Shixin Liu Signed-off-by: Herbert Xu commit 1cb3ad701970e68f18a9e5d090baf2b1b703d729 Author: Shixin Liu Date: Thu Apr 8 15:18:35 2021 +0800 crypto: stm32/hash - Fix PM reference leak on stm32-hash.c pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: Shixin Liu Signed-off-by: Herbert Xu commit cc987ae9150c255352660d235ab27c834aa527be Author: Shixin Liu Date: Thu Apr 8 15:18:33 2021 +0800 crypto: sun8i-ce - Fix PM reference leak in sun8i_ce_probe() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: Shixin Liu Signed-off-by: Herbert Xu commit 06cd7423cf451d68bfab289278d7890c9ae01a14 Author: Shixin Liu Date: Thu Apr 8 15:18:32 2021 +0800 crypto: sun8i-ss - Fix PM reference leak when pm_runtime_get_sync() fails pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: Shixin Liu Signed-off-by: Herbert Xu commit ac98fc5e1c321112dab9ccac9df892c154540f5d Author: Shixin Liu Date: Thu Apr 8 15:18:31 2021 +0800 crypto: sun4i-ss - Fix PM reference leak when pm_runtime_get_sync() fails pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Signed-off-by: Shixin Liu Signed-off-by: Herbert Xu commit 1aa33c7a48972888347bdb729377faf233efff60 Author: Tian Tao Date: Thu Apr 8 11:21:51 2021 +0800 crypto: cavium/zip - remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Signed-off-by: Zhiqi Song Signed-off-by: Herbert Xu commit e0e638f7e09c10ca0d1e67837125d0dfc6284974 Author: YueHaibing Date: Wed Apr 7 22:18:19 2021 +0800 crypto: ccree - Remove redundant dev_err call in init_cc_resources() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 6dab3746738939f0b2381d3f71a45fc5b4c674ad Author: YueHaibing Date: Wed Apr 7 22:18:18 2021 +0800 crypto: keembay - Remove redundant dev_err calls There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit bea47077ece6f19aa301801faef3d4016b5d7783 Author: YueHaibing Date: Wed Apr 7 22:18:17 2021 +0800 crypto: ux500 - Remove redundant dev_err calls There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit a790f9de1da73af778576dc0aeeb78bc83720cc8 Author: YueHaibing Date: Wed Apr 7 22:18:16 2021 +0800 crypto: img-hash - Remove redundant dev_err call in img_hash_probe() devm_platform_ioremap_resource() and devm_ioremap_resource() will print err msg while failing, so the redundant dev_err call can be removed. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 8553856cc6f720cb22fae14dc144c52c39085ca5 Author: YueHaibing Date: Wed Apr 7 22:18:15 2021 +0800 crypto: atmel-tdes - Remove redundant dev_err call in atmel_tdes_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: YueHaibing Signed-off-by: Herbert Xu commit 6e57871c3b756029f44caf08815a9cdee871eb59 Author: Weili Qian Date: Wed Apr 7 17:44:33 2021 +0800 crypto: hisilicon/trng - add version to adapt new algorithm Kunpeng930 supports trng and prng, but Kunpeng920 only supports trng. Therefore, version information is added to ensure that prng is not registered to Crypto subsystem on Kunpeng920. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 0f19dbc994dcb7f7137f2e056e813c84530b7538 Author: Ard Biesheuvel Date: Tue Apr 6 16:25:23 2021 +0200 crypto: arm64/aes-ce - deal with oversight in new CTR carry code The new carry handling code in the CTR driver can deal with a carry occurring in the 4x/5x parallel code path, by using a computed goto to jump into the carry sequence at the right place as to only apply the carry to a subset of the blocks being processed. If the lower half of the counter wraps and ends up at exactly 0x0, a carry needs to be applied to the counter, but not to the counter values taken for the 4x/5x parallel sequence. In this case, the computed goto skips all register assignments, and branches straight to the jump instruction that gets us back to the fast path. This produces the correct result, but due to the fact that this branch target does not carry the correct BTI annotation, this fails when BTI is enabled. Let's omit the computed goto entirely in this case, and jump straight back to the fast path after applying the carry to the main counter. Fixes: 5318d3db465d ("crypto: arm64/aes-ctr - improve tail handling") Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 7ed83901326f781524af2d969185440efe23f964 Author: Weili Qian Date: Tue Apr 6 20:56:02 2021 +0800 crypto: hisilicon/qm - add stop queue by hardware Kunpeng930 could be able to stop queue by writing hardware registers, which will trigger tasks in device to be flushed out. In order to be compatible with the kunpeng920 driver, add 'qm_hw_ops_v3' to adapt Kunpeng930. And 'stop_qp' callback is added in 'qm_hw_ops_v3' to write hardware registers. Call 'stop_qp' to drain the tasks in device before releasing queue. Signed-off-by: Weili Qian Reviewed-by: Longfang Liu Signed-off-by: Herbert Xu commit 7dad7d007ab73b36a4a2438f063dfabbdc2df288 Author: Guobin Huang Date: Tue Apr 6 20:02:57 2021 +0800 crypto: ixp4xx - use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: Herbert Xu commit 25ee76a221b01c4044fbcfe0b8cfd3d4f5982f2b Author: Guobin Huang Date: Tue Apr 6 20:00:03 2021 +0800 crypto: geode - use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: Herbert Xu commit fa07c1a30be7144f5d3292208f5d58799c92189f Author: Meng Yu Date: Tue Apr 6 10:32:59 2021 +0800 crypto: ecc - delete a useless function declaration This function declaration has been added in 'ecc_curve.h', delete it in 'crypto/ecc.h'. Fixes: 4e6602916bc6(crypto: ecdsa - Add support for ECDSA ...) Signed-off-by: Meng Yu Signed-off-by: Herbert Xu commit 7767d9ac89cee29c68f5dd278b3bb411d1c69287 Author: Michael Ellerman Date: Fri Apr 16 21:07:06 2021 +1000 powerpc/papr_scm: Fix build error due to wrong printf specifier When I changed the rc variable to be long rather than int64_t I neglected to update the printk(), leading to a build break: arch/powerpc/platforms/pseries/papr_scm.c: In function 'papr_scm_pmem_flush': arch/powerpc/platforms/pseries/papr_scm.c:144:26: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'long int' [-Wformat=] Fixes: 75b7c05ebf90 ("powerpc/papr_scm: Implement support for H_SCM_FLUSH hcall") Reported-by: Stephen Rothwell Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210416111209.765444-2-mpe@ellerman.id.au commit d6481a7195df4a8c828f9ee0b382f2dd36d3575c Author: Michael Ellerman Date: Fri Apr 16 21:05:47 2021 +1000 powerpc/configs: Add PAPR_SCM to pseries_defconfig This is a pseries only driver, it should be built by default as part of pseries_defconfig to get some build coverage. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210416111209.765444-1-mpe@ellerman.id.au commit df448cdfc01ffc117702a494ef302e7fb76df78a Author: Borislav Petkov Date: Mon Apr 12 10:59:51 2021 +0200 MAINTAINERS: Remove me from IDE/ATAPI section It has been years since I've touched this and "this" is going away anyway... any day now. :-) So remove me so that I do not get CCed on bugs/patches. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210412090346.31213-1-bp@alien8.de commit 0b45143b4b9440579e7fa889708cfc4bc7fdb9a3 Author: Georges Aureau Date: Thu Mar 11 09:10:28 2021 -0600 x86/platform/uv: Add more to secondary CPU kdump info Add call to run_crash_ipi_callback() to gather more info of what the secondary CPUs were doing to help with failure analysis. Excerpt from Georges: 'It is only changing where crash secondaries will be stalling after having taken care of properly laying down "crash note regs". Please note that "crash note regs" are a key piece of data used by crash dump debuggers to provide a reliable backtrace of running processors.' Secondary change pursuant to a5f526ecb075 ("CodingStyle: Inclusive Terminology"): change master/slave to main/secondary. [ bp: Massage commit message. ] Signed-off-by: Georges Aureau Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Link: https://lkml.kernel.org/r/20210311151028.82678-1-mike.travis@hpe.com commit 26d4be3ea1b77cc00b5b638faed7a357204f9150 Author: Mike Travis Date: Thu Apr 8 11:00:47 2021 -0500 x86/platform/uv: Use x2apic enabled bit as set by BIOS to indicate APIC mode BIOS now sets the x2apic enabled bit (and the ACPI table) for extended APIC modes. Use that bit to indicate if extended mode is set. [ bp: Fixup subject prefix, merge subsequent fix https://lkml.kernel.org/r/20210415220626.223955-1-mike.travis@hpe.com ] Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210408160047.1703-1-mike.travis@hpe.com commit 3e9bf43f7f7a46f21ec071cb47be92d0874c48da Author: Dan Carpenter Date: Tue Apr 13 13:50:04 2021 +0300 Drivers: hv: vmbus: Use after free in __vmbus_open() The "open_info" variable is added to the &vmbus_connection.chn_msg_list, but the error handling frees "open_info" without removing it from the list. This will result in a use after free. First remove it from the list, and then free it. Fixes: 6f3d791f3006 ("Drivers: hv: vmbus: Fix rescind handling issues") Signed-off-by: Dan Carpenter Reviewed-by: Andrea Parri Link: https://lore.kernel.org/r/YHV3XLCot6xBS44r@mwanda Signed-off-by: Wei Liu commit ad085b3a712a89e4a48472121b231add7a8362e4 Author: Randy Dunlap Date: Thu Apr 15 11:36:39 2021 -0700 drm: bridge: fix LONTIUM use of mipi_dsi_() functions The Lontium DRM bridge drivers use mipi_dsi_() function interfaces so they need to select DRM_MIPI_DSI to prevent build errors. ERROR: modpost: "mipi_dsi_attach" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined! ERROR: modpost: "mipi_dsi_device_register_full" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined! ERROR: modpost: "of_find_mipi_dsi_host_by_node" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined! ERROR: modpost: "mipi_dsi_device_unregister" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined! ERROR: modpost: "mipi_dsi_detach" [drivers/gpu/drm/bridge/lontium-lt9611uxc.ko] undefined! ERROR: modpost: "mipi_dsi_attach" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined! ERROR: modpost: "mipi_dsi_device_register_full" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined! ERROR: modpost: "of_find_mipi_dsi_host_by_node" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined! ERROR: modpost: "mipi_dsi_device_unregister" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined! ERROR: modpost: "mipi_dsi_detach" [drivers/gpu/drm/bridge/lontium-lt9611.ko] undefined! WARNING: modpost: suppressed 5 unresolved symbol warnings because there were too many) Fixes: 23278bf54afe ("drm/bridge: Introduce LT9611 DSI to HDMI bridge") Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridge") Fixes: 30e2ae943c26 ("drm/bridge: Introduce LT8912B DSI to HDMI bridge") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Reviewed-by: Adren Grassein Cc: Dmitry Baryshkov Cc: Sam Ravnborg Cc: Vinod Koul Cc: Bjorn Andersson Cc: Srinivas Kandagatla Cc: Adrien Grassein Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: dri-devel@lists.freedesktop.org Cc: stable@vger.kernel.org Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210415183639.1487-1-rdunlap@infradead.org commit ed01fca38717169fcb61bd45ad1c3750d9c40d59 Author: Randy Dunlap Date: Thu Apr 15 11:36:19 2021 -0700 drm: bridge: fix ANX7625 use of mipi_dsi_() functions The Analogix DRM ANX7625 bridge driver uses mips_dsi_() function interfaces so it should select DRM_MIPI_DSI to prevent build errors. ERROR: modpost: "mipi_dsi_attach" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined! ERROR: modpost: "mipi_dsi_device_register_full" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined! ERROR: modpost: "of_find_mipi_dsi_host_by_node" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined! ERROR: modpost: "mipi_dsi_device_unregister" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined! ERROR: modpost: "mipi_dsi_detach" [drivers/gpu/drm/bridge/analogix/anx7625.ko] undefined! Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP") Reported-by: kernel test robot Signed-off-by: Randy Dunlap Reviewed-by: Robert Foss Cc: Xin Ji Cc: Sam Ravnborg Cc: dri-devel@lists.freedesktop.org Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Robert Foss Cc: stable@vger.kernel.org Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210415183619.1431-1-rdunlap@infradead.org commit f7c475b8dfc23d461a47dfac5e498f8cc96faea5 Author: xinhui pan Date: Wed Feb 24 11:28:08 2021 +0800 drm/ttm: Do not add non-system domain BO into swap list BO would be added into swap list if it is validated into system domain. If BO is validated again into non-system domain, say, VRAM domain. It actually should not be in the swap list. Acked-by: Alex Deucher Signed-off-by: xinhui pan Signed-off-by: Alex Deucher Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210224032808.150465-1-xinhui.pan@amd.com Signed-off-by: Christian König commit 26928ca1f06aab4361eb5adbe7ef3b5c82f13cf2 Author: Takashi Iwai Date: Fri Apr 16 10:12:11 2021 +0200 ALSA: hda/realtek: Add quirk for Lenovo Ideapad S740 Lenovo Ideapad S740 requires quite a few COEF setups to make its speakers working. The verb table was provided from Ryan Prescott as the result of investigation via qemu: https://github.com/ryanprescott/realtek-verb-tools/wiki/How-to-sniff-verbs-from-a-Windows-sound-driver BugLink: https://github.com/thesofproject/linux/issues/2748 Tested-by: Ryan Prescott Link: https://lore.kernel.org/r/20210416081211.20059-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d1ee66c5d3c5a0498dd5e3f2af5b8c219a98bba5 Author: Phil Calvin Date: Thu Apr 15 18:01:29 2021 -0400 ALSA: hda/realtek: fix mic boost on Intel NUC 8 Fix two bugs with the Intel HDA Realtek ALC233 sound codec present in Intel NUC NUC8i7BEH and probably a few other similar NUC models. These codecs advertise a 4-level microphone input boost amplifier on pin 0x19, but the highest two boost settings do not work correctly, and produce only low analog noise that does not seem to contain any discernible signal. There is an existing fixup for this exact problem but for a different PCI subsystem ID, so we re-use that logic. Changing the boost level also triggers a DC spike in the input signal that bleeds off over about a second and overwhelms any input during that time. Thankfully, the existing fixup has the side effect of making the boost control show up in userspace as a mute/unmute switch, and this keeps (e.g.) PulseAudio from fiddling with it during normal input volume adjustments. Finally, the NUC hardware has built-in inverted stereo mics. This patch also enables the usual fixup for this so the two channels cancel noise instead of the actual signal. [ Re-ordered the quirk entry point by tiwai ] Signed-off-by: Phil Calvin Cc: Link: https://lore.kernel.org/r/80dc5663-7734-e7e5-25ef-15b5df24511a@philcalvin.com Signed-off-by: Takashi Iwai commit 998f26f47e556f14cd124c508d76bceb2c3f6e6a Author: Takashi Iwai Date: Thu Apr 15 15:18:56 2021 +0200 ALSA: control: Fix racy management of user ctl memory size account We've got a report about the possible race in the user control element counts (card->user_ctl_count), and it was confirmed that the race wasn't serious in the old code up to 5.12. There, the value modification itself was exclusive and protected via a write semaphore, hence it's at most concurrent reads and evaluations before the increment. Since it's only about the soft-limit to avoid the exhausting memory usage, one-off isn't a big problem at all. Meanwhile, the relevant code has been largely modified recently, and now card->user_ctl_count was replaced with card->user_ctl_alloc_size, and a few more places were added to access this field. And, in this new code, it turned out to be more serious: the modifications are scattered in various places, and a few of them are without protection. It implies that it may lead to an inconsistent value by racy accesses. For addressing it, this patch extends the range covered by the card->controls_rwsem write lock at snd_ctl_elem_add() so that the all code paths that modify and refer to card->user_ctl_alloc_size are protected by the rwsem properly. The patch adds also comments in a couple of functions to indicate that they are under the rwsem lock. Fixes: 66c6d1ef86ff ("ALSA: control: Add memory consumption limit to user controls") Link: https://lore.kernel.org/r/FEEBF384-44BE-42CF-8FB3-93470933F64F@purdue.edu Link: https://lore.kernel.org/r/20210415131856.13113-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 9204ff94868496f2d9b8b173af52ec455160c364 Author: Mike Leach Date: Thu Apr 15 14:24:04 2021 -0600 coresight: etm-perf: Fix define build issue when built as module CONFIG_CORESIGHT_SOURCE_ETM4X is undefined when built as module, CONFIG_CORESIGHT_SOURCE_ETM4X_MODULE is defined instead. Therefore code in format_attr_contextid_show() not correctly complied when coresight built as module. Use IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X) to correct this. Link: https://lore.kernel.org/r/20210414194808.22872-1-mike.leach@linaro.org Fixes: 88f11864cf1d ("coresight: etm-perf: Support PID tracing for kernel at EL2") Reviewed-by: Leo Yan Signed-off-by: Mike Leach Signed-off-by: Mathieu Poirier Cc: stable Link: https://lore.kernel.org/r/20210415202404.945368-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 6ce48897ce476bed86fde28752c27596e8753277 Author: Huacai Chen Date: Tue Apr 13 16:57:23 2021 +0800 MIPS: Loongson64: Add kexec/kdump support Add kexec/kdump support for Loongson64 by: 1, Provide Loongson-specific kexec functions: loongson_kexec_prepare(), loongson_kexec_shutdown() and loongson_crash_shutdown(); 2, Provide Loongson-specific assembly code in kexec_smp_wait(); To start Loongson64, The boot CPU needs 3 parameters: fw_arg0: the number of arguments in cmdline (i.e., argc). fw_arg1: structure holds cmdline such as "root=/dev/sda1 console=tty" (i.e., argv). fw_arg2: environment (i.e., envp, additional boot parameters from LEFI). Non-boot CPUs do not need one parameter as the IPI mailbox base address. They query their own IPI mailbox to get PC, SP and GP in a loopi, until the boot CPU brings them up. loongson_kexec_prepare(): Setup cmdline for kexec/kdump. The kexec/kdump cmdline comes from kexec's "append" option string. This structure will be parsed in fw_init_cmdline() of arch/mips/fw/lib/cmdline.c. Both image ->control_code_page and the cmdline need to be in a safe memory region (memory allocated by the old kernel may be corrupted by the new kernel). In order to maintain compatibility for the old firmware, the low 2MB is reserverd and safe for Loongson. So let KEXEC_CTRL_CODE and KEXEC_ARGV_ ADDR be here. LEFI parameters may be corrupted at runtime, so backup it at mips_reboot_setup(), and then restore it at loongson_kexec_shutdown() /loongson_crash_shutdown(). loongson_kexec_shutdown(): Wake up all present CPUs and let them go to reboot_code_buffer. Pass the kexec parameters to kexec_args. loongson_crash_shutdown(): Pass the kdump parameters to kexec_args. The assembly part in kexec_smp_wait provide a routine as BIOS does, in order to keep secondary CPUs in a querying loop. The layout of low 2MB memory in our design: 0x80000000, the first MB, the first 64K, Exception vectors 0x80010000, the first MB, the second 64K, STR (suspend) data 0x80020000, the first MB, the third and fourth 64K, UEFI HOB 0x80040000, the first MB, the fifth 64K, RT-Thread for SMC 0x80100000, the second MB, the first 64K, KEXEC code 0x80108000, the second MB, the second 64K, KEXEC data Cc: Eric Biederman Tested-by: Jinyang He Signed-off-by: Huacai Chen Signed-off-by: Jinyang He Signed-off-by: Youling Tang Signed-off-by: Thomas Bogendoerfer commit 99bca615d89510917864fac6b26fd343eff2aba2 Author: Ilya Lipnitskiy Date: Tue Apr 13 20:12:40 2021 -0700 MIPS: pci-legacy: use generic pci_enable_resources Follow the reasoning from commit 842de40d93e0 ("PCI: add generic pci_enable_resources()"): The only functional difference from the MIPS version is that the generic one uses "!r->parent" to check for resource collisions instead of "!r->start && r->end". That should have no effect on any pci-legacy driver. Suggested-by: Bjorn Helgaas Signed-off-by: Ilya Lipnitskiy Signed-off-by: Thomas Bogendoerfer commit 0af83d2e447af3e5098583cb6320bb1b1fb0976b Author: Ilya Lipnitskiy Date: Tue Apr 13 20:12:39 2021 -0700 MIPS: pci-legacy: remove busn_resource field No drivers set the busn_resource field in the pci_controller struct. Commit 7ee214b540d9 ("MIPS: PCI: Remove unused busn_offset") almost removed it over 3 years ago. Remove it for good to free up memory and eliminate messages like: pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0] Signed-off-by: Ilya Lipnitskiy Cc: Bjorn Helgaas Signed-off-by: Thomas Bogendoerfer commit 317f553bb677e324c9c865ff7f14597bc5ceeb9c Author: Ilya Lipnitskiy Date: Tue Apr 13 20:12:38 2021 -0700 MIPS: pci-legacy: remove redundant info messages Remove the following pci-legacy message: PCI host bridge /pci@440000/host-bridge ranges: MEM 0x0000000020000000..0x000000002fffffff IO 0x0000000000460000..0x000000000046ffff It is followed shortly by the same data from pci_register_host_bridge: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff] pci_bus 0000:00: root bus resource [io 0x460000-0x46ffff] Signed-off-by: Ilya Lipnitskiy Signed-off-by: Thomas Bogendoerfer commit 3ecb9dc1581eebecaee56decac70e35365260866 Author: Ilya Lipnitskiy Date: Tue Apr 13 20:12:37 2021 -0700 MIPS: pci-legacy: stop using of_pci_range_to_resource Mirror commit aeba3731b150 ("powerpc/pci: Fix IO space breakage after of_pci_range_to_resource() change"). Most MIPS platforms do not define PCI_IOBASE, nor implement pci_address_to_pio(). Moreover, IO_SPACE_LIMIT is 0xffff for most MIPS platforms. of_pci_range_to_resource passes the _start address_ of the IO range into pci_address_to_pio, which then checks it against IO_SPACE_LIMIT and fails, because for MIPS platforms that use pci-legacy (pci-lantiq, pci-rt3883, pci-mt7620), IO ranges start much higher than 0xffff. In fact, pci-mt7621 in staging already works around this problem, see commit 09dd629eeabb ("staging: mt7621-pci: fix io space and properly set resource limits") So just stop using of_pci_range_to_resource, which does not work for MIPS. Fixes PCI errors like: pci_bus 0000:00: root bus resource [io 0xffffffff] Fixes: 0b0b0893d49b ("of/pci: Fix the conversion of IO ranges into IO resources") Signed-off-by: Ilya Lipnitskiy Cc: Liviu Dudau Signed-off-by: Thomas Bogendoerfer commit 2f802e17d5343780ae50b337ccd33a92c0aa4243 Author: Ilya Lipnitskiy Date: Tue Apr 13 20:12:36 2021 -0700 MIPS: pci-rt3883: more accurate DT error messages Existing strings do not make sense: one is always NULL and the other refers to the wrong parent node. Signed-off-by: Ilya Lipnitskiy Signed-off-by: Thomas Bogendoerfer commit becb0425bebfaf778f10c458634c11ab8d9e1a13 Author: Ilya Lipnitskiy Date: Tue Apr 13 20:12:35 2021 -0700 MIPS: pci-rt3883: trivial: remove unused variable Fixes the following compiler warning: warning: unused variable 'flags' [-Wunused-variable] Fixes: e5067c718b3a ("MIPS: pci-rt3883: Remove odd locking in PCI config space access code") Signed-off-by: Ilya Lipnitskiy Acked-by: Sergey Ryazanov Cc: trivial@kernel.org Signed-off-by: Thomas Bogendoerfer commit 791a7be27e76edfe8269e9fce2598cc58defa405 Author: Ilya Lipnitskiy Date: Tue Apr 13 20:12:34 2021 -0700 MIPS: pci-rt2880: remove unneeded locks Mirror pci-rt3883 fix from commit e5067c718b3a ("MIPS: pci-rt3883: Remove odd locking in PCI config space access code"). pci-rt2880 shares the driver layout with pci-rt3883 and the same reasons apply. Caller (generic PCI code) already does proper locking, so no need to add another one here. Local PCI read/write functions are never called simultaneously, also they do not require synchronization with the PCI controller ops, since they are used before the controller registration. Suggested-by: Sergey Ryazanov Signed-off-by: Ilya Lipnitskiy Reviewed-by: Sergey Ryazanov Signed-off-by: Thomas Bogendoerfer commit 8e98b697006d749d745d3b174168a877bb96c500 Author: Ilya Lipnitskiy Date: Tue Apr 13 20:12:33 2021 -0700 MIPS: pci-rt2880: fix slot 0 configuration pci_fixup_irqs() used to call pcibios_map_irq on every PCI device, which for RT2880 included bus 0 slot 0. After pci_fixup_irqs() got removed, only slots/funcs with devices attached would be called. While arguably the right thing, that left no chance for this driver to ever initialize slot 0, effectively bricking PCI and USB on RT2880 devices such as the Belkin F5D8235-4 v1. Slot 0 configuration needs to happen after PCI bus enumeration, but before any device at slot 0x11 (func 0 or 1) is talked to. That was determined empirically by testing on a Belkin F5D8235-4 v1 device. A minimal BAR 0 config write followed by read, then setting slot 0 PCI_COMMAND to MASTER | IO | MEMORY is all that seems to be required for proper functionality. Tested by ensuring that full- and high-speed USB devices get enumerated on the Belkin F5D8235-4 v1 (with an out of tree DTS file from OpenWrt). Fixes: 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Signed-off-by: Ilya Lipnitskiy Cc: Lorenzo Pieralisi Cc: Tobias Wolf Cc: # v4.14+ Signed-off-by: Thomas Bogendoerfer commit 8c94b430b9f6213dec84e309bb480a71778c4213 Author: Mihai Moldovan Date: Thu Apr 15 09:28:03 2021 +0200 kconfig: nconf: stop endless search loops If the user selects the very first entry in a page and performs a search-up operation, or selects the very last entry in a page and performs a search-down operation that will not succeed (e.g., via [/]asdfzzz[Up Arrow]), nconf will never terminate searching the page. The reason is that in this case, the starting point will be set to -1 or n, which is then translated into (n - 1) (i.e., the last entry of the page) or 0 (i.e., the first entry of the page) and finally the search begins. This continues to work fine until the index reaches 0 or (n - 1), at which point it will be decremented to -1 or incremented to n, but not checked against the starting point right away. Instead, it's wrapped around to the bottom or top again, after which the starting point check occurs... and naturally fails. My original implementation added another check for -1 before wrapping the running index variable around, but Masahiro Yamada pointed out that the actual issue is that the comparison point (starting point) exceeds bounds (i.e., the [0,n-1] interval) in the first place and that, instead, the starting point should be fixed. This has the welcome side-effect of also fixing the case where the starting point was n while searching down, which also lead to an infinite loop. OTOH, this code is now essentially all his work. Amazingly, nobody seems to have been hit by this for 11 years - or at the very least nobody bothered to debug and fix this. Signed-off-by: Mihai Moldovan Signed-off-by: Masahiro Yamada commit ed917b028d0cea5d6f81472a9b7c3266feb9dd42 Author: Vinod Koul Date: Thu Apr 8 11:59:14 2021 +0530 phy: Revert "phy: ti: j721e-wiz: add missing of_node_put" This reverts commit 00f2e6f668b0 ("phy: ti: j721e-wiz: add missing of_node_put") as it erroneously adds the of_node_put() as incorrect place. Reported-by: Junlin Yang Link: https://lore.kernel.org/r/20210408062914.3813102-1-vkoul@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman commit 76b453873628946d4794964fee75835114e5f35b Author: Shixin Liu Date: Thu Apr 8 09:28:29 2021 +0800 phy: ti: j721e-wiz: Add missing include linux/slab.h When compiling with CONFIG_PHY_J721E_WIZ, Hulk Robot reported: drivers/phy/ti/phy-j721e-wiz.c: In function ‘wiz_mux_clk_register’: drivers/phy/ti/phy-j721e-wiz.c:659:17: error: implicit declaration of function ‘kzalloc’; did you mean ‘vzalloc’? [-Werror=implicit-function-declaration] 659 | parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL); | ^~~~~~~ | vzalloc drivers/phy/ti/phy-j721e-wiz.c:659:15: warning: assignment to ‘const char **’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] 659 | parent_names = kzalloc((sizeof(char *) * num_parents), GFP_KERNEL); | ^ drivers/phy/ti/phy-j721e-wiz.c:697:2: error: implicit declaration of function ‘kfree’; did you mean ‘vfree’? [-Werror=implicit-function-declaration] 697 | kfree(parent_names); | ^~~~~ | vfre Fixes: 040cbe768731 ("phy: ti: j721e-wiz: Model the internal clocks without device tree input") Reported-by: Hulk Robot Signed-off-by: Shixin Liu Link: https://lore.kernel.org/r/20210408012829.432938-1-liushixin2@huawei.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman commit e1723d8b87b73ab363256e7ca3af3ddb75855680 Author: Yang Yingliang Date: Wed Apr 7 17:27:16 2021 +0800 phy: phy-twl4030-usb: Fix possible use-after-free in twl4030_usb_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210407092716.3270248-1-yangyingliang@huawei.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman commit 41c9f7fb64f8423750b0ccd916a8a3cf4f5c99c1 Author: Andy Shevchenko Date: Thu Apr 15 12:15:55 2021 +0300 stm class: Use correct UUID APIs It appears that the STM code didn't manage to accurately decypher the delicate inner workings of an alternative thought process behind the UUID API and directly called generate_random_uuid() that clearly needs to be a static function in lib/uuid.c. At the same time, said STM code is poking directly at the byte array inside the uuid_t when it uses the UUID for its internal purposes. Fix these two transgressions by using intended APIs instead. Signed-off-by: Andy Shevchenko [ash: changed back to uuid_t and updated the commit message] Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/r/20210415091555.88085-1-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 48cb17531b15967d9d3f34c770a25cc6c4ca6ad1 Author: Alexander Shishkin Date: Wed Apr 14 20:12:51 2021 +0300 intel_th: pci: Add Alder Lake-M support This adds support for the Trace Hub in Alder Lake-M PCH. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org # v4.14+ Link: https://lore.kernel.org/r/20210414171251.14672-8-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9f7f2a5e01ab4ee56b6d9c0572536fe5fd56e376 Author: Alexander Shishkin Date: Wed Apr 14 20:12:50 2021 +0300 intel_th: pci: Add Rocket Lake CPU support This adds support for the Trace Hub in Rocket Lake CPUs. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Cc: stable # v4.14+ Link: https://lore.kernel.org/r/20210414171251.14672-7-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 18ffbc47d45a1489b664dd68fb3a7610a6e1dea3 Author: Pavel Machek Date: Wed Apr 14 20:12:49 2021 +0300 intel_th: Consistency and off-by-one fix Consistently use "< ... +1" in for loops. Fix of-by-one in for_each_set_bit(). Signed-off-by: Pavel Machek Signed-off-by: Alexander Shishkin Link: https://lore.kernel.org/lkml/20190724095841.GA6952@amd/ Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414171251.14672-6-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d9962f6f428449fe227f1c88c65ac3fffdf7dceb Author: Rikard Falkeborn Date: Wed Apr 14 20:12:48 2021 +0300 intel_th: Constify attribute_group structs The only usage of them is to pass their address to sysfs_create_group() and sysfs_remove_group(), both which have pointers to const attribute_group structs as input. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414171251.14672-5-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a525ed1787abfc007eb892c38b098352707137bc Author: Alexander Shishkin Date: Wed Apr 14 20:12:47 2021 +0300 intel_th: Constify all drvdata references Anything that deals with drvdata structures should leave them intact. Reflect this in function signatures. Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414171251.14672-4-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3fae829eac71a1a1e3265337b3d25eaf80d41d9b Author: Jiapeng Chong Date: Wed Apr 14 20:12:45 2021 +0300 stm class: Remove an unused function Fix the following clang warning: drivers/hwtracing/stm/policy.c:60:21: warning: unused function 'stp_policy_node_name' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alexander Shishkin Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414171251.14672-2-alexander.shishkin@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b4e964f84c1a44b0c63a5036efb24cf0f938db0a Author: Colin Ian King Date: Mon Apr 12 17:10:12 2021 +0100 habanalabs/gaudi: Fix uninitialized return code rc when read size is zero In the case where size is zero the while loop never assigns rc and the return value is uninitialized. Fix this by initializing rc to zero. Fixes: 639781dcab82 ("habanalabs/gaudi: add debugfs to DMA from the device") Reviewed-by: Oded Gabbay Acked-by: Arnd Bergmann Signed-off-by: Colin Ian King Addresses-Coverity: ("Uninitialized scalar variable") Link: https://lore.kernel.org/r/20210412161012.1628202-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 39d2a7898d7fb61276ec766046940dda9080fd4b Author: Randy Dunlap Date: Wed Apr 14 22:43:38 2021 -0700 greybus: es2: fix kernel-doc warnings Fix these kernel-doc complaints: ../drivers/greybus/es2.c:79: warning: bad line: ../drivers/greybus/es2.c:100: warning: cannot understand function prototype: 'struct es2_ap_dev ' es2.c:126: warning: Function parameter or member 'cdsi1_in_use' not described in 'es2_ap_dev' Cc: Johan Hovold Cc: Alex Elder Cc: Greg Kroah-Hartman Cc: greybus-dev@lists.linaro.org (moderated for non-subscribers) Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20210415054338.2223-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 42eb0d54c08a0331d6d295420f602237968d792b Author: Christoph Hellwig Date: Thu Mar 25 09:22:09 2021 +0100 fs: split receive_fd_replace from __receive_fd receive_fd_replace shares almost no code with the general case, so split it out. Also remove the "Bump the sock usage counts" comment from both copies, as that is now what __receive_sock actually does. [AV: ... and make the only user of receive_fd_replace() choose between it and receive_fd() according to what userland had passed to it in flags] Signed-off-by: Christoph Hellwig Signed-off-by: Al Viro commit f0145db24e65f6cf13347a90ffb86e5ef2ff2ca2 Author: Paul Fertser Date: Thu Apr 15 17:05:00 2021 +0300 ARM: dts: aspeed: tiogapass: add hotplug controller The ADM1278 IC is accessible on I2C bus and on both Wiwynn and Quanta Tioga Pass implementations a pair of parallel 0.5 mOhm resistors is used for current measurement. Signed-off-by: Paul Fertser Link: https://lore.kernel.org/r/20210415140521.11352-1-fercerpav@gmail.com Signed-off-by: Joel Stanley commit 6e3587986841512add15e85aee602ff638d3e152 Author: Konstantin Aladyshev Date: Thu Apr 15 18:52:59 2021 +0300 ARM: dts: aspeed: amd-ethanolx: Enable all used I2C busses Enable all I2C busses that are used in AMD EthanolX CRB: i2c0 - APML P0 i2c1 - APML P1 i2c2 - FPGA i2c3 - 24LC128 EEPROM i2c4 - P0 Power regulators i2c5 - P1 Power regulators i2c6 - P0/P1 Thermal diode i2c7 - Thermal Sensors i2c8 - BMC I2C Signed-off-by: Konstantin Aladyshev Link: https://lore.kernel.org/r/20210415155300.1135-1-aladyshev22@gmail.com Signed-off-by: Joel Stanley commit 4f57c6b9db6be3e5daaaea5413cd61cf35eed7b5 Author: Eddie James Date: Tue Apr 13 14:43:08 2021 -0500 ARM: dts: aspeed: Rainier: Update to pass 2 hardware Add the muxes present in pass 2 and remove the eeproms that were removed. Signed-off-by: Eddie James Signed-off-by: Joel Stanley commit 45171b7dd2b81dbd38dc4027686774f8b02f2390 Author: Eddie James Date: Tue Apr 13 14:43:07 2021 -0500 ARM: dts: aspeed: Rainier 1S4U: Fix fan nodes The 1S4U system populates fans 0, 1, 2, and 4. Update the dts to reflect this. Fixes: 7f03894a6555 ("ARM: dts: aspeed: Add Rainier 1S4U machine") Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 1d5d46a1adafafce2b0c9105eab563709c84e3db Author: Eddie James Date: Tue Apr 13 14:43:06 2021 -0500 ARM: dts: aspeed: Rainier: Fix humidity sensor bus address The si7021 was incorrectly placed at 0x20 on i2c bus 7. It is at 0x40. Fixes: 9c44db7096e0 ("ARM: dts: aspeed: rainier: Add i2c devices") Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 9a490b28dd838a0bb51948d49dc7d563e159ada7 Author: Eddie James Date: Tue Apr 13 14:43:05 2021 -0500 ARM: dts: aspeed: Rainier: Fix PCA9552 on bus 8 The second presence detection PCA9552 was incorrectly added to bus 9. Fixes: 8be44de6f209 ("ARM: dts: aspeed: Rainier: Add presence GPIOs") Signed-off-by: Eddie James Reviewed-by: Joel Stanley Signed-off-by: Joel Stanley commit 7a3beeae289385f7be9f61a33a6e4f6c7e2400d3 Author: Bart Van Assche Date: Thu Apr 15 15:08:26 2021 -0700 scsi: target: tcm_fc: Fix a kernel-doc header Fix the function name in the kernel-doc header above ft_prli(). Link: https://lore.kernel.org/r/20210415220826.29438-21-bvanassche@acm.org Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit baa75afde8cb53f15d166acae2a675a1f33c0a61 Author: Bart Van Assche Date: Thu Apr 15 15:08:25 2021 -0700 scsi: target: Shorten ALUA error messages Do not print tg_pt_gp->tg_pt_gp_valid_id if we already know that it is zero. Link: https://lore.kernel.org/r/20210415220826.29438-20-bvanassche@acm.org Cc: Mike Christie Reviewed-by: Mike Christie Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit e15c745295a22470b663b101f5130d29e16fbde3 Author: Bart Van Assche Date: Thu Apr 15 15:08:24 2021 -0700 scsi: target: Fix two format specifiers Use format specifier '%u' to format the u32 data type instead of '%hu'. Link: https://lore.kernel.org/r/20210415220826.29438-19-bvanassche@acm.org Cc: Mike Christie Reviewed-by: Mike Christie Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 15df85e0d63d870e67fbd39c416f1d9815a107d0 Author: Bart Van Assche Date: Thu Apr 15 15:08:23 2021 -0700 scsi: target: Compare explicitly with SAM_STAT_GOOD Instead of leaving it implicit that SAM_STAT_GOOD == 0, compare explicitly with SAM_STAT_GOOD. Link: https://lore.kernel.org/r/20210415220826.29438-18-bvanassche@acm.org Reviewed-by: Mike Christie Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 41e70e3006f63b89ae3b0d49557ac9f620bac524 Author: Bart Van Assche Date: Thu Apr 15 15:08:22 2021 -0700 scsi: sd: Introduce a new local variable in sd_check_events() Instead of using 'retval' to represent first a SCSI status and later whether or not a disk change event occurred, introduce a new variable for the latter purpose. Link: https://lore.kernel.org/r/20210415220826.29438-17-bvanassche@acm.org Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 22dc227e8f0e913d86552f5714fccb0e622ec650 Author: Bart Van Assche Date: Thu Apr 15 15:08:21 2021 -0700 scsi: dc395x: Open-code status_byte(u8) calls The dc395x driver is one of the two drivers that passes an u8 argument to status_byte() instead of an s32 argument. Open-code status_byte() in preparation of changing SCSI status values into a structure. Link: https://lore.kernel.org/r/20210415220826.29438-16-bvanassche@acm.org Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 3940ebf7ba52a82db2aae16a3aa00835d7a98109 Author: Bart Van Assche Date: Thu Apr 15 15:08:20 2021 -0700 scsi: 53c700: Open-code status_byte(u8) calls The 53c700 driver is one of the two drivers that passes an u8 argument to status_byte() instead of an s32 argument. Open-code status_byte in preparation of changing SCSI status values into a structure. Link: https://lore.kernel.org/r/20210415220826.29438-15-bvanassche@acm.org Cc: "James E.J. Bottomley" Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit c64aab41c5e15063de41b15c0f1e301aef59ae2f Author: Bart Van Assche Date: Thu Apr 15 15:08:19 2021 -0700 scsi: smartpqi: Remove unused functions This was detected by building the kernel with clang and W=1. Link: https://lore.kernel.org/r/20210415220826.29438-14-bvanassche@acm.org Cc: Don Brace Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 11417cd5e2ec4a07a573586c15134a08ff56909a Author: Bart Van Assche Date: Thu Apr 15 15:08:18 2021 -0700 scsi: qla4xxx: Remove an unused function This was detected by building the kernel with clang and W=1. Link: https://lore.kernel.org/r/20210415220826.29438-13-bvanassche@acm.org Cc: Nilesh Javali Acked-by: Manish Rangankar Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 40d1373b604794e1c3b496f5415ef2e3a9074ca8 Author: Bart Van Assche Date: Thu Apr 15 15:08:17 2021 -0700 scsi: myrs: Remove unused functions This was detected by building the kernel with clang and W=1. Link: https://lore.kernel.org/r/20210415220826.29438-12-bvanassche@acm.org Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 3690ad6708c5bfbbf4c5dbb0cd7a0877580d62a6 Author: Bart Van Assche Date: Thu Apr 15 15:08:16 2021 -0700 scsi: myrb: Remove unused functions This was detected by building the kernel with clang and W=1. Link: https://lore.kernel.org/r/20210415220826.29438-11-bvanassche@acm.org Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 3ad0b1da0da2e073b1c9d2e317a5ebf7704f98e6 Author: Bart Van Assche Date: Thu Apr 15 15:08:15 2021 -0700 scsi: mpt3sas: Fix two kernel-doc headers Fix the following warnings: drivers/scsi/mpt3sas/mpt3sas_base.c:5430: warning: Excess function parameter 'ct' description in '_base_allocate_pcie_sgl_pool' drivers/scsi/mpt3sas/mpt3sas_base.c:5493: warning: Excess function parameter 'ctr' description in '_base_allocate_chain_dma_pool' Link: https://lore.kernel.org/r/20210415220826.29438-10-bvanassche@acm.org Fixes: d6adc251dd2f ("scsi: mpt3sas: Force PCIe scatterlist allocations to be within same 4 GB region") Fixes: 7dd847dae1c4 ("scsi: mpt3sas: Force chain buffer allocations to be within same 4 GB region") Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit be5aeee30e45678668a6314a9a2dc1d3b2562818 Author: Bart Van Assche Date: Thu Apr 15 15:08:14 2021 -0700 scsi: fcoe: Suppress a compiler warning Suppress the following compiler warning: warning: cast to smaller integer type 'enum fip_mode' from 'void *' [-Wvoid-pointer-to-enum-cast] enum fip_mode fip_mode = (enum fip_mode)kp->arg; ^~~~~~~~~~~~~~~~~~~~~~ Link: https://lore.kernel.org/r/20210415220826.29438-9-bvanassche@acm.org Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 90d6697810f06aceea9de71ad836a8c7669789cd Author: Bart Van Assche Date: Thu Apr 15 15:08:13 2021 -0700 scsi: libfc: Fix a format specifier Since the 'mfs' member has been declared as 'u32' in include/scsi/libfc.h, use the %u format specifier instead of %hu. This patch fixes the following clang compiler warning: warning: format specifies type 'unsigned short' but the argument has type 'u32' (aka 'unsigned int') [-Wformat] "lport->mfs:%hu\n", mfs, lport->mfs); ~~~ ^~~~~~~~~~ %u Link: https://lore.kernel.org/r/20210415220826.29438-8-bvanassche@acm.org Cc: Hannes Reinecke Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 56853f0e615bd347daa29b1d7ab165f2bc5ac5f4 Author: Bart Van Assche Date: Thu Apr 15 15:08:12 2021 -0700 scsi: aacraid: Remove an unused function This was detected by building the kernel with clang and W=1. Link: https://lore.kernel.org/r/20210415220826.29438-7-bvanassche@acm.org Cc: aacraid@microsemi.com Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit b8e162f9e7e2da6e823a4984d6aa0523e278babf Author: Bart Van Assche Date: Thu Apr 15 15:08:11 2021 -0700 scsi: core: Introduce enum scsi_disposition Improve readability of the code in the SCSI core by introducing an enumeration type for the values used internally that decide how to continue processing a SCSI command. The eh_*_handler return values have not been changed because that would involve modifying all SCSI drivers. The output of the following command has been inspected to verify that no out-of-range values are assigned to a variable of type enum scsi_disposition: KCFLAGS=-Wassign-enum make CC=clang W=1 drivers/scsi/ Link: https://lore.kernel.org/r/20210415220826.29438-6-bvanassche@acm.org Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 280e91b026653af77296b5feb54f16d85973b104 Author: Bart Van Assche Date: Thu Apr 15 15:08:10 2021 -0700 scsi: core: Modify the scsi_send_eh_cmnd() return value for the SDEV_BLOCK case The comment above scsi_send_eh_cmnd() says: "Returns SUCCESS or FAILED or NEEDS_RETRY". This patch makes all values returned by scsi_send_eh_cmnd() match the documentation of this function. This change does not affect the behavior of scsi_eh_tur() nor of scsi_eh_try_stu() nor of the scsi_request_sense() callers. See also commit bbe9fb0d04b9 ("scsi: Avoid that .queuecommand() gets called for a blocked SCSI device"; v5.3). Link: https://lore.kernel.org/r/20210415220826.29438-5-bvanassche@acm.org Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 0d2810cd62d91bd44f42c87f386c126f6620a43d Author: Bart Van Assche Date: Thu Apr 15 15:08:09 2021 -0700 scsi: core: Rename scsi_softirq_done() into scsi_complete() Commit 320ae51feed5 ("blk-mq: new multi-queue block IO queueing mechanism"; v3.13) introduced a code path that calls the blk-mq completion function from interrupt context. scsi-mq was introduced by commit d285203cf647 ("scsi: add support for a blk-mq based I/O path."; v3.17). Since the introduction of scsi-mq, scsi_softirq_done() can be called from interrupt context. That made the name of the function misleading, rename it to scsi_complete(). Link: https://lore.kernel.org/r/20210415220826.29438-4-bvanassche@acm.org Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 886874af943953bc4ee575d828c3e3cc7d1aebe9 Author: Bart Van Assche Date: Thu Apr 15 15:08:08 2021 -0700 scsi: core: Remove an incorrect comment scsi_device.sdev_target is used in more code than the single_lun code, hence remove the comment next to the definition of the sdev_target member. Link: https://lore.kernel.org/r/20210415220826.29438-3-bvanassche@acm.org Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 76fc0df9a0e717f7213424a28cbe1263355d8228 Author: Bart Van Assche Date: Thu Apr 15 15:08:07 2021 -0700 scsi: core: Make the scsi_alloc_sgtables() documentation more accurate The current scsi_alloc_sgtables() documentation does not accurately explain what this function does. Hence improve the documentation of this function. Link: https://lore.kernel.org/r/20210415220826.29438-2-bvanassche@acm.org Cc: Christoph Hellwig Cc: Johannes Thumshirn Cc: Hannes Reinecke Cc: Daniel Wagner Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 80e5d1ff5d5f1ed5167a69b7c2fe86071b615f6b Author: Al Viro Date: Thu Apr 15 19:46:50 2021 -0400 useful constants: struct qstr for ".." Signed-off-by: Al Viro commit 1f02beff224e6176c1a0aacced7fb5127b240996 Author: Viswas G Date: Thu Apr 15 16:03:52 2021 +0530 scsi: pm80xx: Remove global lock from outbound queue processing Introduce spin lock for outbound queue. With this, driver need not acquire HBA global lock for outbound queue processing. Link: https://lore.kernel.org/r/20210415103352.3580-9-Viswas.G@microchip.com Acked-by: Jack Wang Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Ashokkumar N Signed-off-by: Martin K. Petersen commit b431472bc88b4a230c88049ed077fcccf4448980 Author: Viswas G Date: Thu Apr 15 16:03:51 2021 +0530 scsi: pm80xx: Reset PI and CI memory during re-initialization Producer index(PI) outbound queue and consumer index(CI) for Outbound queue are in DMA memory. During resume(), the stale PI and CI Values will lead to unexpected behavior. These values should be reset to 0 during driver reinitialization. Link: https://lore.kernel.org/r/20210415103352.3580-8-Viswas.G@microchip.com Acked-by: Jack Wang Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Ashokkumar N Signed-off-by: Martin K. Petersen commit 4f5deeb40f9cf721030a1bdfecb19584fca9091e Author: Ruksar Devadi Date: Thu Apr 15 16:03:50 2021 +0530 scsi: pm80xx: Completing pending I/O after fatal error When controller runs into fatal error, I/Os get stuck with no response, handler event is defined to complete the pending I/Os (SAS task and internal task) and also perform the cleanup for the drives. Link: https://lore.kernel.org/r/20210415103352.3580-7-Viswas.G@microchip.com Acked-by: Jack Wang Signed-off-by: Ruksar Devadi Signed-off-by: Viswas G Signed-off-by: Ashokkumar N Signed-off-by: Martin K. Petersen commit b0c306e6216749378ce43f2c5ac4f17bb5ba35ff Author: Vishakha Channapattan Date: Thu Apr 15 16:03:49 2021 +0530 scsi: pm80xx: Add sysfs attribute to track iop1 count A new sysfs variable 'ctl_iop1_count' is being introduced that tells if the controller is alive by indicating controller ticks. If on subsequent run we see the ticks changing that indicates that controller is not dead. Using the 'ctl_iop1_count' sysfs variable we can see ticks incrementing: linux-9saw:~# cat /sys/class/scsi_host/host*/ctl_iop1_count 0x00000069 0x0000006b 0x0000006d 0x00000072 Link: https://lore.kernel.org/r/20210415103352.3580-6-Viswas.G@microchip.com Acked-by: Jack Wang Signed-off-by: Vishakha Channapattan Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Ashokkumar N Signed-off-by: Radha Ramachandran Signed-off-by: Martin K. Petersen commit 0602624ace23afddb92ec842fc602df04fad97c0 Author: Vishakha Channapattan Date: Thu Apr 15 16:03:48 2021 +0530 scsi: pm80xx: Add sysfs attribute to track iop0 count A new sysfs variable 'ctl_iop0_count' is being introduced that tells if the controller is alive by indicating controller ticks. If on subsequent run we see the ticks changing that indicates that controller is not dead. Using the 'ctl_iop0_count' sysfs variable we can see ticks incrementing: linux-9saw:~# cat /sys/class/scsi_host/host*/ctl_iop0_count 0x000000a3 0x000001db 0x000001e4 0x000001e7 Link: https://lore.kernel.org/r/20210415103352.3580-5-Viswas.G@microchip.com Acked-by: Jack Wang Signed-off-by: Vishakha Channapattan Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Ashokkumar N Signed-off-by: Radha Ramachandran Signed-off-by: Martin K. Petersen commit dd49ded8aa432e2877e8b8bafcc00898c20ca381 Author: Vishakha Channapattan Date: Thu Apr 15 16:03:47 2021 +0530 scsi: pm80xx: Add sysfs attribute to track RAAE count A new sysfs variable 'ctl_raae_count' is being introduced that tells if the controller is alive by indicating controller ticks. If on subsequent run we see the ticks changing in RAAE count that indicates that controller is not dead. Using the 'ctl_raae_count' sysfs variable we can see ticks incrementing: linux-9saw:~# cat /sys/class/scsi_host/host*/ctl_raae_count 0x00002245 0x00002253 0x0000225e Link: https://lore.kernel.org/r/20210415103352.3580-4-Viswas.G@microchip.com Acked-by: Jack Wang Signed-off-by: Vishakha Channapattan Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Ashokkumar N Signed-off-by: Radha Ramachandran Signed-off-by: Martin K. Petersen commit a4c55e16c50022825966864cf1f08b9efa3ebb86 Author: Vishakha Channapattan Date: Thu Apr 15 16:03:46 2021 +0530 scsi: pm80xx: Add sysfs attribute to check controller hmi error A new sysfs variable 'ctl_hmi_error' is being introduced to give the error details if the MPI initialization fails Using the 'ctl_hmi_error' sysfs variable we can check the error details: linux-2dq0:~# cat /sys/class/scsi_host/host*/ctl_hmi_error 0x00000000 0x00000000 0x00000000 Link: https://lore.kernel.org/r/20210415103352.3580-3-Viswas.G@microchip.com Signed-off-by: Vishakha Channapattan Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Martin K. Petersen commit 4ddbea1b6f51a2ac07c4b80b3c3f50ea37367828 Author: Vishakha Channapattan Date: Thu Apr 15 16:03:45 2021 +0530 scsi: pm80xx: Add sysfs attribute to check MPI state A new sysfs variable 'ctl_mpi_state' is being introduced to check the state of MPI. Using the 'ctl_mpi_state' sysfs variable we can check the MPI state: linux-2dq0:~# cat /sys/class/scsi_host/host*/ctl_mpi_state MPI is successfully initialized Link: https://lore.kernel.org/r/20210415103352.3580-2-Viswas.G@microchip.com Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Vishakha Channapattan Signed-off-by: Viswas G Signed-off-by: Ruksar Devadi Signed-off-by: Ashokkumar N Signed-off-by: Radha Ramachandran Signed-off-by: kernel test robot Signed-off-by: Martin K. Petersen commit b3f0a1ee9e3986106869eec49b61b40abdccdcf7 Author: Julian Wiedmann Date: Wed Apr 14 19:08:04 2021 +0200 scsi: zfcp: Lift Request Queue tasklet & timer from qdio The qdio layer currently provides its own infrastructure to scan for Request Queue completions & to report them to the device driver. This comes with several drawbacks - having an async tasklet & timer construct in qdio introduces additional lifetime complexity, and makes it harder to integrate them with the rest of the device driver. The timeouts are also currently hard-coded, and can't be tweaked without affecting other qdio drivers (ie. qeth). But due to recent enhancements to the qdio layer, zfcp can actually take full control of the Request Queue completion processing. It merely needs to opt-out from the qdio layer mechanisms by setting the scan_threshold to 0, and then use qdio_inspect_queue() to scan for completions. So re-implement the tasklet & timer mechanism in zfcp, while initially copying the scan conditions from qdio's handle_outbound() and qdio_outbound_tasklet(). One minor behavioural change is that zfcp_qdio_send() will unconditionally reduce the timeout to 1 HZ, rather than leaving it at 10 Hz if it was last armed by the tasklet. This just makes things more consistent. Also note that we can drop a lot of the accumulated cruft in qdio_outbound_tasklet(), as zfcp doesn't even use PCI interrupt requests any longer. This also slightly touches the Response Queue processing, as qdio_get_next_buffers() will no longer implicitly scan for Request Queue completions. So complete the migration to qdio_inspect_queue() here as well and make the tasklet_schedule() visible. Link: https://lore.kernel.org/r/018d3ddd029f8d6ac00cf4184880288c637c4fd1.1618417667.git.bblock@linux.ibm.com Reviewed-by: Benjamin Block Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit be46e39ae3be8cde8dd0d09d7c0f8eed443747ab Author: Qinglang Miao Date: Wed Apr 14 19:08:03 2021 +0200 scsi: zfcp: Move the position of put_device() Place the put_device() call after device_unregister() in both zfcp_unit_remove() and zfcp_sysfs_port_remove_store() to make it more natural. put_device() ought to be the last time we touch the object in both functions. Add comments after put_device() to make code clearer. Link: https://lore.kernel.org/r/0a568c7733ba0f1dde28b0c663b90270d44dd540.1618417667.git.bblock@linux.ibm.com Suggested-by: Steffen Maier Suggested-by: Benjamin Block Signed-off-by: Qinglang Miao Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 20540a5645f00015ca8eb968b98d62a1b275ceb8 Author: Julian Wiedmann Date: Wed Apr 14 19:08:02 2021 +0200 scsi: zfcp: Clean up sysfs code for SFP diagnostics The error path from zfcp_adapter_enqueue() no longer attempts to remove the diagnostics attributes if they haven't been created yet. So remove the manual 'sysfs_established' guard for this case, and use device_add_groups() to add all adapter-related sysfs attributes in one go. Link: https://lore.kernel.org/r/37a97537f675d643006271f37723c346189b6eec.1618417667.git.bblock@linux.ibm.com Reviewed-by: Benjamin Block Reviewed-by: Steffen Maier Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit ab1fa88062f8d1d9e8947719b8ed3ab48a60476c Author: Julian Wiedmann Date: Wed Apr 14 19:08:01 2021 +0200 scsi: zfcp: Fix sysfs roll-back on error in zfcp_adapter_enqueue() When zfcp_adapter_enqueue() fails to create the zfcp_sysfs_adapter_attrs group, it calls zfcp_adapter_unregister() to tear down the adapter state again. This then unconditionally attempts to remove the zfcp_sysfs_adapter_attrs group, resulting in a "group not found" WARN from sysfs code. Avoid this by copying most of zfcp_adapter_unregister() into the error path, allowing for more fine-granular roll-back. Then skip the sysfs tear-down steps if we haven't progressed this far in the initialization. Link: https://lore.kernel.org/r/790922cc3af075795fff9a4b787e6bda19bdb3be.1618417667.git.bblock@linux.ibm.com Reviewed-by: Benjamin Block Reviewed-by: Steffen Maier Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 8824db894dd1da48bad363612577ef410a5d1828 Author: Yevhen Viktorov Date: Wed Apr 14 19:08:00 2021 +0200 scsi: zfcp: Fix indentation coding style issue Code indentation should use tabs where possible. Link: https://lore.kernel.org/r/e8a15a2f3d64e2e76a214647cfd4fe23d370b165.1618417667.git.bblock@linux.ibm.com Signed-off-by: Yevhen Viktorov Signed-off-by: Steffen Maier Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit 91cf21ec6d04db21ab51d47014fd9970b5bd9861 Author: Julian Wiedmann Date: Wed Apr 14 19:07:59 2021 +0200 scsi: zfcp: Remove unneeded INIT_LIST_HEAD() for FSF requests INIT_LIST_HEAD() is only needed for actual list heads, while req->list is used as a list entry. Note that when the error path in zfcp_fsf_req_send() removes the request from the adapter's list of pending requests, it actually looks up the request from the zfcp_reqlist - rather than just calling list_del(). So there's no risk of us calling list_del() on a request that hasn't been added to any list yet. Link: https://lore.kernel.org/r/254dc0ae28dccc43ab0b1079ef2c8dcb5fe1d2e4.1618417667.git.bblock@linux.ibm.com Reviewed-by: Benjamin Block Reviewed-by: Steffen Maier Signed-off-by: Julian Wiedmann Signed-off-by: Benjamin Block Signed-off-by: Martin K. Petersen commit ea6a693d862d4f0edd748a1fa3fc6faf2c39afb2 Author: Jens Axboe Date: Thu Apr 15 09:47:13 2021 -0600 io_uring: disable multishot poll for double poll add cases The re-add handling isn't correct for the multi wait case, so let's just disable it for now explicitly until we can get that sorted out. This just turns it into a one-shot request. Since we pass back whether or not a poll request terminates in multishot mode on completion, this should not break properly behaving applications that check for IORING_CQE_F_MORE on completion. Signed-off-by: Jens Axboe commit f02d4086a8f36a0e1aaebf559b54cf24a177a486 Author: Roman Bolshakov Date: Mon Apr 12 19:57:40 2021 +0300 scsi: qla2xxx: Reserve extra IRQ vectors Commit a6dcfe08487e ("scsi: qla2xxx: Limit interrupt vectors to number of CPUs") lowers the number of allocated MSI-X vectors to the number of CPUs. That breaks vector allocation assumptions in qla83xx_iospace_config(), qla24xx_enable_msix() and qla2x00_iospace_config(). Either of the functions computes maximum number of qpairs as: ha->max_qpairs = ha->msix_count - 1 (MB interrupt) - 1 (default response queue) - 1 (ATIO, in dual or pure target mode) max_qpairs is set to zero in case of two CPUs and initiator mode. The number is then used to allocate ha->queue_pair_map inside qla2x00_alloc_queues(). No allocation happens and ha->queue_pair_map is left NULL but the driver thinks there are queue pairs available. qla2xxx_queuecommand() tries to find a qpair in the map and crashes: if (ha->mqenable) { uint32_t tag; uint16_t hwq; struct qla_qpair *qpair = NULL; tag = blk_mq_unique_tag(cmd->request); hwq = blk_mq_unique_tag_to_hwq(tag); qpair = ha->queue_pair_map[hwq]; # <- HERE if (qpair) return qla2xxx_mqueuecommand(host, cmd, qpair); } 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 CPU: 0 PID: 72 Comm: kworker/u4:3 Tainted: G W 5.10.0-rc1+ #25 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.0.0-prebuilt.qemu-project.org 04/01/2014 Workqueue: scsi_wq_7 fc_scsi_scan_rport [scsi_transport_fc] RIP: 0010:qla2xxx_queuecommand+0x16b/0x3f0 [qla2xxx] Call Trace: scsi_queue_rq+0x58c/0xa60 blk_mq_dispatch_rq_list+0x2b7/0x6f0 ? __sbitmap_get_word+0x2a/0x80 __blk_mq_sched_dispatch_requests+0xb8/0x170 blk_mq_sched_dispatch_requests+0x2b/0x50 __blk_mq_run_hw_queue+0x49/0xb0 __blk_mq_delay_run_hw_queue+0xfb/0x150 blk_mq_sched_insert_request+0xbe/0x110 blk_execute_rq+0x45/0x70 __scsi_execute+0x10e/0x250 scsi_probe_and_add_lun+0x228/0xda0 __scsi_scan_target+0xf4/0x620 ? __pm_runtime_resume+0x4f/0x70 scsi_scan_target+0x100/0x110 fc_scsi_scan_rport+0xa1/0xb0 [scsi_transport_fc] process_one_work+0x1ea/0x3b0 worker_thread+0x28/0x3b0 ? process_one_work+0x3b0/0x3b0 kthread+0x112/0x130 ? kthread_park+0x80/0x80 ret_from_fork+0x22/0x30 The driver should allocate enough vectors to provide every CPU it's own HW queue and still handle reserved (MB, RSP, ATIO) interrupts. The change fixes the crash on dual core VM and prevents unbalanced QP allocation where nr_hw_queues is two less than the number of CPUs. Link: https://lore.kernel.org/r/20210412165740.39318-1-r.bolshakov@yadro.com Fixes: a6dcfe08487e ("scsi: qla2xxx: Limit interrupt vectors to number of CPUs") Cc: Daniel Wagner Cc: Himanshu Madhani Cc: Quinn Tran Cc: Nilesh Javali Cc: Martin K. Petersen Cc: stable@vger.kernel.org # 5.11+ Reported-by: Aleksandr Volkov Reported-by: Aleksandr Miloserdov Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Roman Bolshakov Signed-off-by: Martin K. Petersen commit 5cad5a507241b4b72b7cad27cf769ac645e53d45 Author: Don Brace Date: Thu Apr 15 11:42:10 2021 -0500 scsi: smartpqi: Fix device pointer variable reference static checker issue Dan Carpenter found a possible NULL pointer dereference issue in function pqi_sas_port_add_rphy(): drivers/scsi/smartpqi/smartpqi_sas_transport.c:97 pqi_sas_port_add_rphy() warn: variable dereferenced before check 'pqi_sas_port->device' (see line 95) Correct issue by moving reference of pqi_sas_port->device after the check for the device pointer being non-NULL. Link: https://www.mail-archive.com/kbuild@lists.01.org/msg06329.html Link: https://lore.kernel.org/r/161850493026.7302.10032784239320437353.stgit@brunhilda Fixes: ec504b23df9d ("scsi: smartpqi: Add phy ID support for the physical drives") Reported-by: Dan Carpenter Reported-by: kernel test robot Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 667298ceaf042e28b856478e02cfa2cbe8ed83c6 Author: Don Brace Date: Thu Apr 15 11:42:04 2021 -0500 scsi: smartpqi: Fix blocks_per_row static checker issue Dan Carpenter found a possible divide by 0 issue in the smartpqi driver in functions pci_get_aio_common_raid_map_values() and pqi_calc_aio_r5_or_r6(). The variable rmd->blocks_per_row is used as a divisor and could be 0. Using rmd->blocks_per_row as a divisor without checking it for 0 first. Correct these possible divide by 0 conditions by insuring that rmd->blocks_per_row is not zero before usage. The check for non-0 was too late to prevent a divide by 0 condition. Add in a comment to explain why the check for non-zero is necessary. If the member is 0, return PQI_RAID_BYPASS_INELIGIBLE before any division is performed. Link: https://lore.kernel.org/linux-scsi/YG%2F5kWHHAr7w5dU5@mwanda/ Link: https://lore.kernel.org/r/161850492435.7302.392780350442938047.stgit@brunhilda Fixes: 6702d2c40f31 ("scsi: smartpqi: Add support for RAID5 and RAID6 writes") Reported-by: Dan Carpenter Reported-by: kernel test robot Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit d692d397e8a69f4ecdd7fb35ff0140d69bf17e18 Author: Al Viro Date: Thu Apr 15 22:03:00 2021 -0400 hostfs_open(): don't open-code file_dentry() Signed-off-by: Al Viro commit 392c36e5be1dee19ffce8c8ba8f07f90f5aa3f7c Merge: 38ebcf5096a86 1703bb50df0e4 Author: David S. Miller Date: Thu Apr 15 17:08:30 2021 -0700 Merge branch 'ehtool-fec-stats' Jakub Kicinski says: ==================== ethtool: add standard FEC statistics This set adds uAPI for reporting standard FEC statistics, and implements it in a handful of drivers. The statistics are taken from the IEEE standard, with one extra seemingly popular but not standard statistics added. The implementation is similar to that of the pause frame statistics, user requests the stats by setting a bit (ETHTOOL_FLAG_STATS) in the common ethtool header of ETHTOOL_MSG_FEC_GET. Since standard defines the statistics per lane what's reported is both total and per-lane counters: # ethtool -I --show-fec eth0 FEC parameters for eth0: Configured FEC encodings: None Active FEC encoding: None Statistics: corrected_blocks: 256 Lane 0: 255 Lane 1: 1 uncorrectable_blocks: 145 Lane 0: 128 Lane 1: 17 v2: check for errors in mlx5 register access ==================== Signed-off-by: David S. Miller commit 1703bb50df0e4248b8def88fc6dd43a505479c66 Author: Jakub Kicinski Date: Thu Apr 15 15:53:18 2021 -0700 mlx5: implement ethtool::get_fec_stats Report corrected bits. v2: catch reg access errors (Saeed) Signed-off-by: Jakub Kicinski Acked-by: Saeed Mahameed Signed-off-by: David S. Miller commit cab351be53c263c857563eb56b2bbfe67e8a12a0 Author: Jakub Kicinski Date: Thu Apr 15 15:53:17 2021 -0700 sfc: ef10: implement ethtool::get_fec_stats Report what appears to be the standard block counts: - 30.5.1.1.17 aFECCorrectedBlocks - 30.5.1.1.18 aFECUncorrectableBlocks Don't report the per-lane symbol counts, if those really count symbols they are not what the standard calls for (even if symbols seem like the most useful thing to count.) Fingers crossed that fec_corrected_errors is not in symbols. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit c9ca5c3aabafcaa934731b8a841f28f8df990b7f Author: Jakub Kicinski Date: Thu Apr 15 15:53:16 2021 -0700 bnxt: implement ethtool::get_fec_stats Report corrected bits. Signed-off-by: Jakub Kicinski Reviewed-by: Michael Chan Signed-off-by: David S. Miller commit be85dbfeb37c8c4d4344da2ee594d78034b82489 Author: Jakub Kicinski Date: Thu Apr 15 15:53:15 2021 -0700 ethtool: add FEC statistics Similarly to pause statistics add stats for FEC. The IEEE standard mandates two sets of counters: - 30.5.1.1.17 aFECCorrectedBlocks - 30.5.1.1.18 aFECUncorrectableBlocks where block is a block of bits FEC operates on. Each of these counters is defined per lane (PCS instance). Multiple vendors provide number of corrected _bits_ rather than/as well as blocks. This set adds the 2 standard-based block counters and a extra one for corrected bits. Counters are exposed to user space via netlink in new attributes. Each attribute carries an array of u64s, first element is the total count, and the following ones are a per-lane break down. Much like with pause stats the operation will not fail when driver does not implement the get_fec_stats callback (nor can the driver fail the operation by returning an error). If stats can't be reported the relevant attributes will be empty. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3d7cc109ecf76afc74f40eb71d5c9baa03c167a3 Author: Jakub Kicinski Date: Thu Apr 15 15:53:14 2021 -0700 ethtool: fec_prepare_data() - jump to error handling Refactor fec_prepare_data() a little bit to skip the body of the function and exit on error. Currently the code depends on the fact that we only have one call which may fail between ethnl_ops_begin() and ethnl_ops_complete() and simply saves the error code. This will get hairy with the stats also being queried. No functional changes. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit c5797f8a64158f724238d13fa5a4b351b03fe42d Author: Jakub Kicinski Date: Thu Apr 15 15:53:13 2021 -0700 ethtool: move ethtool_stats_init We'll need it for FEC stats as well. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 38ebcf5096a86762b82262e96b2c8b170fe79040 Author: Eric Dumazet Date: Thu Apr 15 10:37:53 2021 -0700 scm: optimize put_cmsg() Calling two copy_to_user() for very small regions has very high overhead. Switch to inlined unsafe_put_user() to save one stac/clac sequence, and avoid copy_to_user(). Signed-off-by: Eric Dumazet Cc: Soheil Hassas Yeganeh Acked-by: Soheil Hassas Yeganeh Signed-off-by: David S. Miller commit b6faf160d0dac3c8654aa911e6e281541628d304 Author: Yangbo Lu Date: Thu Apr 15 13:34:55 2021 +0800 enetc: convert to schedule_work() Convert system_wq queue_work() to schedule_work() which is a wrapper around it, since the former is a rare construct. Fixes: 7294380c5211 ("enetc: support PTP Sync packet one-step timestamping") Signed-off-by: Yangbo Lu Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 8f571c4cad55a32db2fba1f6d7477bfd646c376a Merge: c329e5afb42ff 01305e16ebe77 Author: David S. Miller Date: Thu Apr 15 16:51:29 2021 -0700 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: updates for -next This series adds support for pushing link status to VFs for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit 01305e16ebe7791e7a1b97485f83999f48cd79d0 Author: Guangbin Huang Date: Thu Apr 15 10:20:39 2021 +0800 net: hns3: VF not request link status when PF support push link status feature To reduce the processing of unnecessary mailbox command when PF supports actively push its link status to VFs, VFs stop sending request link status command in periodic service task in this case. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 18b6e31f8bf4ac7af7b057228f38a5a530378e4e Author: Guangbin Huang Date: Thu Apr 15 10:20:38 2021 +0800 net: hns3: PF add support for pushing link status to VFs Previously, VF updates its link status every second by send query command to PF in periodic service task. If link stats of PF is changed, VF may need at most one second to update its link status. To reduce delay of link status between PF and VFs, PF actively push its link status to VFs when its link status is updated. And to let VF know PF supports this new feature, the link status changed mailbox command adds one bit to indicate it. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit cdf0e80e9fbe7b8d6d465b5fe6666f8ea8b86b61 Merge: d3d93e34bd98e 8af50142763c6 Author: Alexei Starovoitov Date: Thu Apr 15 16:50:22 2021 -0700 Merge branch 'bpf: tools: support build selftests/bpf with clang' Yonghong Song says: ==================== To build kernel with clang, people typically use make -j60 LLVM=1 LLVM_IAS=1 LLVM_IAS=1 is not required for non-LTO build but is required for LTO build. In my environment, I am always having LLVM_IAS=1 regardless of whether LTO is enabled or not. After kernel is build with clang, the following command can be used to build selftests with clang: make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 I am using latest bpf-next kernel code base and latest clang built from source from https://github.com/llvm/llvm-project.git Using earlier version of llvm may have compilation errors, see tools/testing/selftests/bpf due to continuous development in llvm bpf features and selftests to use these features. To run bpf selftest properly, you need have certain necessary kernel configs like at: bpf-next:tools/testing/selftests/bpf/config (not that this is not a complete .config file and some other configs might still be needed.) Currently, using the above command, some compilations still use gcc and there are also compilation errors and warnings. This patch set intends to fix these issues. Patch #1 and #2 fixed the issue so clang/clang++ is used instead of gcc/g++. Patch #3 fixed a compilation failure. Patch #4 and #5 fixed various compiler warnings. Changelog: v2 -> v3: . more test environment description in cover letter. (Sedat) . use a different fix, but similar to other use in selftests/bpf Makefile, to exclude header files from CXX compilation command line. (Andrii) . fix codes instead of adding -Wno-format-security. (Andrii) v1 -> v2: . add -Wno-unused-command-line-argument and -Wno-format-security for clang only as (1). gcc does not exhibit those warnings, and (2). -Wno-unused-command-line-argument is only supported by clang. (Sedat) ==================== Signed-off-by: Alexei Starovoitov commit 8af50142763c6e70d426e45278b23d7103e5b7a7 Author: Yonghong Song Date: Tue Apr 13 08:34:35 2021 -0700 bpftool: Fix a clang compilation warning With clang compiler: make -j60 LLVM=1 LLVM_IAS=1 <=== compile kernel # build selftests/bpf or bpftool make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 make -j60 -C tools/bpf/bpftool LLVM=1 LLVM_IAS=1 the following compilation warning showed up, net.c:160:37: warning: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'int' [-Wsign-compare] for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len); ^~~~~~~~~~~~~~~~~ .../tools/include/uapi/linux/netlink.h:99:24: note: expanded from macro 'NLMSG_OK' (nlh)->nlmsg_len <= (len)) ~~~~~~~~~~~~~~~~ ^ ~~~ In this particular case, "len" is defined as "int" and (nlh)->nlmsg_len is "unsigned int". The macro NLMSG_OK is defined as below in uapi/linux/netlink.h. #define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && \ (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \ (nlh)->nlmsg_len <= (len)) The clang compiler complains the comparision "(nlh)->nlmsg_len <= (len))", but in bpftool/net.c, it is already ensured that "len > 0" must be true. So theoretically the compiler could deduce that comparison of "(nlh)->nlmsg_len" and "len" is okay, but this really depends on compiler internals. Let us add an explicit type conversion (from "int" to "unsigned int") for "len" in NLMSG_OK to silence this warning right now. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210413153435.3029635-1-yhs@fb.com commit ef9985893caf905b769fae8984780847e8527065 Author: Yonghong Song Date: Tue Apr 13 08:34:29 2021 -0700 selftests/bpf: Silence clang compilation warnings With clang compiler: make -j60 LLVM=1 LLVM_IAS=1 <=== compile kernel make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 Some linker flags are not used/effective for some binaries and we have warnings like: warning: -lelf: 'linker' input unused [-Wunused-command-line-argument] We also have warnings like: .../selftests/bpf/prog_tests/ns_current_pid_tgid.c:74:57: note: treat the string as an argument to avoid this if (CHECK(waitpid(cpid, &wstatus, 0) == -1, "waitpid", strerror(errno))) ^ "%s", .../selftests/bpf/test_progs.h:129:35: note: expanded from macro 'CHECK' _CHECK(condition, tag, duration, format) ^ .../selftests/bpf/test_progs.h:108:21: note: expanded from macro '_CHECK' fprintf(stdout, ##format); \ ^ The first warning can be silenced with clang option -Wno-unused-command-line-argument. For the second warning, source codes are modified as suggested by the compiler to silence the warning. Since gcc does not support the option -Wno-unused-command-line-argument and the warning only happens with clang compiler, the option -Wno-unused-command-line-argument is enabled only when clang compiler is used. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210413153429.3029377-1-yhs@fb.com commit a22c0c81da644223d911466746ef414a786cb1c8 Author: Yonghong Song Date: Tue Apr 13 08:34:24 2021 -0700 selftests/bpf: Fix test_cpp compilation failure with clang With clang compiler: make -j60 LLVM=1 LLVM_IAS=1 <=== compile kernel make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 the test_cpp build failed due to the failure: warning: treating 'c-header' input as 'c++-header' when in C++ mode, this behavior is deprecated [-Wdeprecated] clang-13: error: cannot specify -o when generating multiple output files test_cpp compilation flag looks like: clang++ -g -Og -rdynamic -Wall -I<...> ... \ -Dbpf_prog_load=bpf_prog_test_load -Dbpf_load_program=bpf_test_load_program \ test_cpp.cpp <...>/test_core_extern.skel.h <...>/libbpf.a <...>/test_stub.o \ -lcap -lelf -lz -lrt -lpthread -o <...>/test_cpp The clang++ compiler complains the header file in the command line and also failed the compilation due to this. Let us remove the header file from the command line which is not intended any way, and this fixed the compilation problem. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210413153424.3028986-1-yhs@fb.com commit f62700ce63a315b4607cc9e97aa15ea409a677b9 Author: Yonghong Song Date: Tue Apr 13 08:34:19 2021 -0700 tools: Allow proper CC/CXX/... override with LLVM=1 in Makefile.include selftests/bpf/Makefile includes tools/scripts/Makefile.include. With the following command make -j60 LLVM=1 LLVM_IAS=1 <=== compile kernel make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 V=1 some files are still compiled with gcc. This patch fixed the case if CC/AR/LD/CXX/STRIP is allowed to be overridden, it will be written to clang/llvm-ar/..., instead of gcc binaries. The definition of CC_NO_CLANG is also relocated to the place after the above CC is defined. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210413153419.3028165-1-yhs@fb.com commit 26e6dd1072763cd5696b75994c03982dde952ad9 Author: Yonghong Song Date: Tue Apr 13 08:34:13 2021 -0700 selftests: Set CC to clang in lib.mk if LLVM is set selftests/bpf/Makefile includes lib.mk. With the following command make -j60 LLVM=1 LLVM_IAS=1 <=== compile kernel make -j60 -C tools/testing/selftests/bpf LLVM=1 LLVM_IAS=1 V=1 some files are still compiled with gcc. This patch fixed lib.mk issue which sets CC to gcc in all cases. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210413153413.3027426-1-yhs@fb.com commit c329e5afb42ff0a88285eb4d8a391a18793e4777 Author: David Bauer Date: Thu Apr 15 03:26:50 2021 +0200 net: phy: at803x: select correct page on config init The Atheros AR8031 and AR8033 expose different registers for SGMII/Fiber as well as the copper side of the PHY depending on the BT_BX_REG_SEL bit in the chip configure register. The driver assumes the copper side is selected on probe, but this might not be the case depending which page was last selected by the bootloader. Notably, Ubiquiti UniFi bootloaders show this behavior. Select the copper page when probing to circumvent this. Signed-off-by: David Bauer Signed-off-by: David S. Miller commit bd363f5493965e9c4d37cad1ec3fbf26ab1df647 Merge: 3a1aa533f7f67 4c26f69d0cf96 Author: David S. Miller Date: Thu Apr 15 16:45:14 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-04-14 This series contains updates to ice driver only. Bruce changes and removes open coded values to instead use existing kernel defines and suppresses false cppcheck issues. Ani adds new VSI states to track netdev allocation and registration. He also removes leading underscores in the ice_pf_state enum. Jesse refactors ITR by introducing helpers to reduce duplicated code and structures to simplify checking of ITR mode. He also triggers a software interrupt when exiting napi poll or busy-poll to ensure all work is processed. Modifies /proc/iomem to display driver name instead of PCI address. He also changes the checks of vsi->type to use a local variable in ice_vsi_rebuild() and removes an unneeded struct member. Jake replaces the driver's adaptive interrupt moderation algorithm to use the kernel's DIM library implementation. Scott reworks module reads to reduce the number of reads needed and remove excessive increment of QSFP page. Brett sets the vsi->vf_id to invalid for non-VF VSIs. Paul removes the return value from ice_vsi_manage_rss_lut() as it's not communicating anything critical. He also reduces the scope of a variable. ==================== Signed-off-by: David S. Miller commit d3d93e34bd98e4dbb002310fed08630f4b549a08 Author: Alexei Starovoitov Date: Thu Apr 15 07:18:17 2021 -0700 libbpf: Remove unused field. relo->processed is set, but not used. Remove it. Signed-off-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210415141817.53136-1-alexei.starovoitov@gmail.com commit 5c08b0f75575648032f309a6f58294453423ed93 Author: Dan Carpenter Date: Fri Apr 9 14:08:17 2021 +0300 HSI: core: fix resource leaks in hsi_add_client_from_dt() If some of the allocations fail between the dev_set_name() and the device_register() then the name will not be freed. Fix this by moving dev_set_name() directly in front of the call to device_register(). Fixes: a2aa24734d9d ("HSI: Add common DT binding for HSI client devices") Signed-off-by: Dan Carpenter Reviewed-by: Jason Gunthorpe Signed-off-by: Sebastian Reichel commit e9dfeed2518671e94779a6103301cded67fae0e2 Author: Jonathan Corbet Date: Thu Apr 15 16:01:50 2021 -0600 docs: sphinx-pre-install: don't barf on beta Sphinx releases sphinx-pre-install is picky when it comes to parsing sphinx versions; it failed when run with sphinx 4.0.0b1. Tweak the regex to tolerate a trailing "bN" on the version number. Signed-off-by: Jonathan Corbet commit 2c92ef8ff8d327797c1920ae7f938bcc6f3f7421 Author: Thomas Bogendoerfer Date: Thu Apr 15 23:21:11 2021 +0200 MIPS: Fix strnlen_user access check Commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs") changed the access_ok for strnlen_user to check the whole range, which broke some callers of strndup_user(). Restore the old behaviour and just check the first byte. Fixes: 04324f44cb69 ("MIPS: Remove get_fs/set_fs") Signed-off-by: Thomas Bogendoerfer commit f9bbc12ccb35ac8b3fa01cec1a19cb523a7707c7 Author: Aditya Srivastava Date: Thu Apr 15 00:55:29 2021 +0530 scripts: kernel-doc: improve parsing for kernel-doc comments syntax Currently kernel-doc does not identify some cases of probable kernel doc comments, for e.g. pointer used as declaration type for identifier, space separated identifier, etc. Some example of these cases in files can be: i)" * journal_t * jbd2_journal_init_dev() - creates and initialises a journal structure" in fs/jbd2/journal.c ii) "* dget, dget_dlock - get a reference to a dentry" in include/linux/dcache.h iii) " * DEFINE_SEQLOCK(sl) - Define a statically allocated seqlock_t" in include/linux/seqlock.h Also improve identification for non-kerneldoc comments. For e.g., i) " * The following functions allow us to read data using a swap map" in kernel/power/swap.c does follow the kernel-doc like syntax, but the content inside does not adheres to the expected format. Improve parsing by adding support for these probable attempts to write kernel-doc comment. Suggested-by: Jonathan Corbet Link: https://lore.kernel.org/lkml/87mtujktl2.fsf@meer.lwn.net Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210414192529.9080-1-yashsri421@gmail.com [ jc: fixed some line-length issues ] Signed-off-by: Jonathan Corbet commit ed102bf2afed226703eaf85a704755bdbea34583 Author: Randy Dunlap Date: Thu Apr 15 10:13:52 2021 -0700 um: Fix W=1 missing-include-dirs warnings Currently when using "W=1" with UML builds, there are over 700 warnings like so: CC arch/um/drivers/stderr_console.o cc1: warning: ./arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs] but arch/um/ does not have include/uapi/ at all, so add that subdir and put one Kbuild file into it (since git does not track empty subdirs). Signed-off-by: Randy Dunlap Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Reviewed-by: Masahiro Yamada Signed-off-by: Richard Weinberger commit 1a594f0afa2b176531e600a6bf8074849fe2a780 Author: Randy Dunlap Date: Tue Apr 13 23:43:49 2021 -0700 um: elf.h: Fix W=1 warning for empty body in 'do' statement Use the common kernel style to eliminate a warning: ./arch/x86/um/asm/elf.h:215:32: warning: suggest braces around empty body in ‘do’ statement [-Wempty-body] #define SET_PERSONALITY(ex) do ; while(0) ^ Signed-off-by: Randy Dunlap Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Richard Weinberger commit 6e166319a63448c1ba9e310ddd94c8e3e9ac4e3c Author: Randy Dunlap Date: Tue Apr 13 23:43:48 2021 -0700 um: pgtable.h: Fix W=1 warning for empty body in 'do' statement Use the common kernel style to eliminate a warning: ./arch/um/include/asm/pgtable.h:305:47: warning: suggest braces around empty body in ‘do’ statement [-Wempty-body] #define update_mmu_cache(vma,address,ptep) do ; while (0) ^ mm/filemap.c:3212:3: note: in expansion of macro ‘update_mmu_cache’ update_mmu_cache(vma, addr, vmf->pte); ^~~~~~~~~~~~~~~~ Signed-off-by: Randy Dunlap Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Signed-off-by: Richard Weinberger commit c521db95d4e3f7ba7dd8fd0679ff148d848c1d4b Author: Yang Li Date: Tue Apr 6 10:00:50 2021 +0800 um: Remove unused including Fix the following versioncheck warning: ./arch/um/drivers/vector_kern.c: 11 linux/version.h not needed. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Richard Weinberger commit a730af6e3114d549555f4b130c216bad1c3aa80e Author: Randy Dunlap Date: Sun Apr 4 11:20:44 2021 -0700 um: Add 2 missing libs to fix various build errors Fix many build errors (at least 18 build error reports) for uml on i386 by adding 2 more library object files. All missing symbols are either cmpxchg8b_emu or atomic*386. Here are a few examples of the build errors that are eliminated: /usr/bin/ld: core.c:(.text+0xd83): undefined reference to `cmpxchg8b_emu' /usr/bin/ld: core.c:(.text+0x2bb2): undefined reference to `atomic64_add_386' /usr/bin/ld: core.c:(.text+0x2c5d): undefined reference to `atomic64_xchg_386' syscall.c:(.text+0x2f49): undefined reference to `atomic64_set_386' /usr/bin/ld: syscall.c:(.text+0x2f54): undefined reference to `atomic64_set_386' syscall.c:(.text+0x33a4): undefined reference to `atomic64_inc_386' /usr/bin/ld: syscall.c:(.text+0x33ac): undefined reference to `atomic64_inc_386' /usr/bin/ld: net/ipv4/inet_timewait_sock.o: in function `inet_twsk_alloc': inet_timewait_sock.c:(.text+0x3d1): undefined reference to `atomic64_read_386' /usr/bin/ld: inet_timewait_sock.c:(.text+0x3dd): undefined reference to `atomic64_set_386' /usr/bin/ld: net/ipv4/inet_connection_sock.o: in function `inet_csk_clone_lock': inet_connection_sock.c:(.text+0x1d74): undefined reference to `atomic64_read_386' /usr/bin/ld: inet_connection_sock.c:(.text+0x1d80): undefined reference to `atomic64_set_386' /usr/bin/ld: net/ipv4/tcp_input.o: in function `inet_reqsk_alloc': tcp_input.c:(.text+0xa345): undefined reference to `atomic64_set_386' /usr/bin/ld: net/mac80211/wpa.o: in function `ieee80211_crypto_tkip_encrypt': wpa.c:(.text+0x739): undefined reference to `atomic64_inc_return_386' Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Brendan Jackman Cc: Alexei Starovoitov Cc: kbuild-all@lists.01.org Cc: Jeff Dike Cc: Richard Weinberger Cc: Anton Ivanov Cc: linux-um@lists.infradead.org Cc: Johannes Berg Cc: Johannes Berg Signed-off-by: Richard Weinberger commit 24271ffed750bc84ea8f73bbab30c59d53f56171 Author: Yang Li Date: Wed Mar 17 15:11:36 2021 +0800 um: Replace if (cond) BUG() with BUG_ON() Fix the following coccinelle reports: ./arch/um/kernel/mem.c:77:3-6: WARNING: Use BUG_ON instead of if condition followed by BUG. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Richard Weinberger commit ad3d19911632debc886ef4a992d41d6de7927006 Author: Johannes Berg Date: Mon Mar 15 23:47:31 2021 +0100 um: Disable CONFIG_GCOV with MODULES CONFIG_GCOV doesn't work with modules, and for various reasons it cannot work, see also https://lore.kernel.org/r/d36ea54d8c0a8dd706826ba844a6f27691f45d55.camel@sipsolutions.net Make CONFIG_GCOV depend on !MODULES to avoid anyone running into issues there. This also means we need not export the gcov symbols. Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit ea8e896cc15e8fac586d018733fd67f56cd721cc Author: Yang Li Date: Wed Mar 10 16:49:08 2021 +0800 um: Remove unneeded variable 'ret' Fix the following coccicheck warning: ./arch/um/drivers/hostaudio_kern.c:125:10-14: Unneeded variable: "mask". Return "0" on line 131 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Richard Weinberger commit d5027ca63e0e778b641cf23e3f5c6d6212cf412b Author: Johannes Berg Date: Fri Mar 5 21:43:15 2021 +0100 um: Mark all kernel symbols as local Ritesh reported a bug [1] against UML, noting that it crashed on startup. The backtrace shows the following (heavily redacted): (gdb) bt ... #26 0x0000000060015b5d in sem_init () at ipc/sem.c:268 #27 0x00007f89906d92f7 in ?? () from /lib/x86_64-linux-gnu/libcom_err.so.2 #28 0x00007f8990ab8fb2 in call_init (...) at dl-init.c:72 ... #40 0x00007f89909bf3a6 in nss_load_library (...) at nsswitch.c:359 ... #44 0x00007f8990895e35 in _nss_compat_getgrnam_r (...) at nss_compat/compat-grp.c:486 #45 0x00007f8990968b85 in __getgrnam_r [...] #46 0x00007f89909d6b77 in grantpt [...] #47 0x00007f8990a9394e in __GI_openpty [...] #48 0x00000000604a1f65 in openpty_cb (...) at arch/um/os-Linux/sigio.c:407 #49 0x00000000604a58d0 in start_idle_thread (...) at arch/um/os-Linux/skas/process.c:598 #50 0x0000000060004a3d in start_uml () at arch/um/kernel/skas/process.c:45 #51 0x00000000600047b2 in linux_main (...) at arch/um/kernel/um_arch.c:334 #52 0x000000006000574f in main (...) at arch/um/os-Linux/main.c:144 indicating that the UML function openpty_cb() calls openpty(), which internally calls __getgrnam_r(), which causes the nsswitch machinery to get started. This loads, through lots of indirection that I snipped, the libcom_err.so.2 library, which (in an unknown function, "??") calls sem_init(). Now, of course it wants to get libpthread's sem_init(), since it's linked against libpthread. However, the dynamic linker looks up that symbol against the binary first, and gets the kernel's sem_init(). Hajime Tazaki noted that "objcopy -L" can localize a symbol, so the dynamic linker wouldn't do the lookup this way. I tried, but for some reason that didn't seem to work. Doing the same thing in the linker script instead does seem to work, though I cannot entirely explain - it *also* works if I just add "VERSION { { global: *; }; }" instead, indicating that something else is happening that I don't really understand. It may be that explicitly doing that marks them with some kind of empty version, and that's different from the default. Explicitly marking them with a version breaks kallsyms, so that doesn't seem to be possible. Marking all the symbols as local seems correct, and does seem to address the issue, so do that. Also do it for static link, nsswitch libraries could still be loaded there. [1] https://bugs.debian.org/983379 Reported-by: Ritesh Raj Sarraf Signed-off-by: Johannes Berg Acked-By: Anton Ivanov Tested-By: Ritesh Raj Sarraf Signed-off-by: Richard Weinberger commit dc01a3b9db43abf95b801c9694980777a329e303 Author: Johannes Berg Date: Tue Feb 23 10:44:08 2021 +0100 um: Fix tag order in stub_32.h "static void inline" is the wrong way around, fix that. Reported-by: kernel test robot Fixes: 9f0b4807a44f ("um: rework userspace stubs to not hard-code stub location") Signed-off-by: Johannes Berg Signed-off-by: Richard Weinberger commit 9a18473cef5292d2edde1c1f9ad69fc09091f2f6 Author: Wu XiangCheng Date: Wed Apr 14 11:34:37 2021 +0800 docs/zh_CN: two minor fixes in zh_CN/doc-guide/ zh_CN/doc-guide/kernel-doc.rst replace a ref tag to solve docs-next warning zh_CN/doc-guide/parse-headers.rst fix an unperfect word Signed-off-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210414033435.GA27907@bobwxc.top Signed-off-by: Jonathan Corbet commit c797997a244cd2c58908093509a24711fc67d146 Author: David Gow Date: Wed Apr 14 22:40:36 2021 -0700 Documentation: dev-tools: Add Testing Overview The kernel now has a number of testing and debugging tools, and we've seen a bit of confusion about what the differences between them are. Add a basic documentation outlining the testing tools, when to use each, and how they interact. This is a pretty quick overview rather than the idealised "kernel testing guide" that'd probably be optimal, but given the number of times questions like "When do you use KUnit and when do you use Kselftest?" are being asked, it seemed worth at least having something. Hopefully this can form the basis for more detailed documentation later. Signed-off-by: David Gow Reviewed-by: Marco Elver Reviewed-by: Daniel Latypov Link: https://lore.kernel.org/r/20210415054036.581117-1-davidgow@google.com Signed-off-by: Jonathan Corbet commit e5143657d9916d4ff0f94c83d1eb482bf1999d5c Author: Bernard Zhao Date: Thu Apr 15 13:43:06 2021 +0800 docs/zh_CN: add translations in zh_CN/dev-tools/gcov Add new zh translations * zh_CN/dev-tools/gcov.rst * zh_CN/dev-tools/index.rst and link them to zh_CN/index.rst Signed-off-by: Bernard Zhao Reviewed-by: Wu XiangCheng Reviewed-by: Alex Shi Reviewed-by: Fangrui Song Signed-off-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210415054304.GA26689@bobwxc.top Signed-off-by: Jonathan Corbet commit e1db6338d6fa0d409e45cf20ab5aeaca704f68e7 Author: Steven Rostedt (VMware) Date: Thu Apr 15 16:34:26 2021 -0400 ftrace: Reuse the output of the function tracer for func_repeats The func_repeats event shows the output of the function tracer followed by a count of the number of repeats the previous function had made, as well as the timestamp of the last function that was repeated. The printing of the function should be the same as is for the function it is displaying. Reuse the code in trace_fn_trace() by making a helper function print_fn_trace() and use it for trace_func_repeats_print(). Signed-off-by: Steven Rostedt (VMware) commit 611ed9a5a14e5ebdab682bcb37a46016613e6881 Author: Yang Li Date: Thu Apr 15 17:30:20 2021 +0800 drm/radeon/si: Fix inconsistent indenting Kernel test robot throws below warning -> smatch warnings: drivers/gpu/drm/radeon/si.c:4514 si_vm_packet3_cp_dma_check() warn: inconsistent indenting Fixed the inconsistent indenting. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Alex Deucher commit bbdfe5aaef3c1d5c5e62fa235ef13f064e4c1c17 Author: Dan Carpenter Date: Wed Apr 14 08:59:22 2021 +0300 drm/amd/pm: fix error code in smu_set_power_limit() We should return -EINVAL instead of success if the "limit" is too high. Fixes: e098bc9612c2 ("drm/amd/pm: optimize the power related source code layout") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 90cb3d8aca1baea9471d28f28d5de1528dd5e424 Author: Dan Carpenter Date: Wed Apr 14 08:58:55 2021 +0300 drm/amdgpu: fix an error code in init_pmu_entry_by_type_and_add() If the kmemdup() fails then this should return a negative error code but it currently returns success Fixes: b4a7db71ea06 ("drm/amdgpu: add per device user friendly xgmi events for vega20") Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit f689f2be0c7d8885ca7f2d18a6b3adc9d6a41912 Author: Tian Tao Date: Tue Apr 13 11:26:19 2021 +0800 drm/radeon/cik: remove set but not used variables The value of pipe_id and queue_id are not used under certain circumstances, so just delete. Signed-off-by: Tian Tao Signed-off-by: Alex Deucher commit 951796f2f492430c838d8cd6619a04e0978a653c Author: Simon Ser Date: Fri Mar 26 17:59:44 2021 +0100 amd/display: allow non-linear multi-planar formats Accept non-linear buffers which use a multi-planar format, as long as they don't use DCC. Tested on GFX9 with NV12. Signed-off-by: Simon Ser Cc: Alex Deucher Cc: Harry Wentland Cc: Nicholas Kazlauskas Cc: Bas Nieuwenhuizen Reviewed-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit ea9bc8b9289a6e524f0b0eeafc09addb7cfac9fd Author: Shashank Sharma Date: Thu Apr 15 23:18:12 2021 +0530 drm/amdgpu/dm: Fix NULL pointer crash during DP MST hotplug This patch checks the return value of the function dc_link_add_remote_sink before using it. This was causing a crash during consecutive hotplugs of DP MST displays. Cc: Harry Wentland Reviewed-by: Harry Wentland Signed-off-by: Shashank Sharma Signed-off-by: Alex Deucher commit fe180178390b264ffab631eca85e97430ad77d16 Author: Qingqing Zhuo Date: Wed Apr 14 19:14:14 2021 -0400 Revert "Revert "drm/amdgpu: Ensure that the modifier requested is supported by plane."" This reverts commit 55fa622fe635bfc3f2587d784f6facc30f8fdf12. The regression caused by the original patch has been cleared, thus introduce back the change. Signed-off-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 2b60818258dca9391109fdaa4d79f77a489bf1a6 Author: Qingqing Zhuo Date: Wed Apr 14 19:00:01 2021 -0400 drm/amd/display: Update modifier list for gfx10_3 [Why] Current list supports modifiers that have DCC_MAX_COMPRESSED_BLOCK set to AMD_FMT_MOD_DCC_BLOCK_128B, while AMD_FMT_MOD_DCC_BLOCK_64B is used instead by userspace. [How] Replace AMD_FMT_MOD_DCC_BLOCK_128B with AMD_FMT_MOD_DCC_BLOCK_64B for modifiers with DCC supported. Fixes: faa37f54ce0462 ("drm/amd/display: Expose modifiers") Signed-off-by: Qingqing Zhuo Reviewed-by: Bas Nieuwenhuizen Tested-by: Bas Nieuwenhuizen Signed-off-by: Alex Deucher commit a99a5116cdba50c419a18aa4a6ecebeae8baa13b Author: Xiaojian Du Date: Wed Apr 14 14:55:27 2021 +0800 drm/amd/pm: revise two names of sensor values for vangogh This patch is to revise two names of sensor values for vangogh. New smu metrics table is supported by new pmfw (from version 4.63.36.00 ), it includes two parts, one part is the current smu metrics table data and the other part is the average smu metrics table data. The hwmon will read the current gfxclk and mclk from the current smu metrics table data. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 3ef9d1e0cb14c134d2b6d669403fea89f246021d Author: Xiaojian Du Date: Tue Apr 13 15:52:17 2021 +0800 drm/amd/pm: remove the "set" function of pp_dpm_mclk for vangogh This patch is to remove the "set" function of pp_dpm_mclk for vangogh. For vangogh, mclk bonds with fclk, they will lock each other on the same perfomance level. But according to the smu message from pmfw, only fclk is allowed to set value manually, so remove the unnecessary code of "set" function for mclk. Signed-off-by: Xiaojian Du Acked-by: Huang Rui Signed-off-by: Alex Deucher commit 47e5d79a45225f788713895afecd99a5a17e6979 Author: Joseph Greathouse Date: Thu Apr 15 14:02:46 2021 +0800 drm/amdgpu: Copy MEC FW version to MEC2 if we skipped loading MEC2 If we skipped loading MEC2 firmware separately from MEC, then MEC2 will be running the same firmware image. Copy the MEC version and feature numbers into MEC2 version and feature numbers. This is needed for things like GWS support, where we rely on knowing what version of firmware is running on MEC2. Leaving these MEC2 entries blank breaks our ability to version-check enables and workarounds. Signed-off-by: Joseph Greathouse Reviewed-by: Hawking Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit eb607a00d3be734867a59e7169bd7c2dfe212d3a Author: Xiaojian Du Date: Tue Apr 13 15:08:41 2021 +0800 drm/amd/pm: add the callback to get the bootup values for renoir This patch is to add the callback to get the bootup values for renoir. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Reviewed-by: Lijo Lazar Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit af48a06daaf15e0ee7c354a1e5ce6e8b06d67a38 Author: Xiaojian Du Date: Tue Apr 13 15:03:42 2021 +0800 drm/amd: update the atomfirmware header for smu12 This patch is to update the atomfirmware header for smu12. v2: remove some unnecessary members Signed-off-by: Xiaojian Du Acked-by: Alex Deucher Reviewed-by: Huang Rui Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit f45e6b9d03ff767ff946b6fce7ed3b004ab43ba4 Author: Felix Kuehling Date: Wed Apr 7 17:30:05 2021 -0400 drm/amdkfd: Remove legacy code not acquiring VMs ROCm user mode has acquired VMs from DRM file descriptors for as long as it supported the upstream KFD. Legacy code to support older versions of ROCm is not needed any more. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit ba5b662c36de37060296bc8b2518c51ac2c2d279 Author: Ramesh Errabolu Date: Mon Apr 12 18:23:05 2021 -0500 drm/amdgpu: Use iterator methods exposed by amdgpu_res_cursor.h in building SG_TABLE's for a VRAM BO Extend current implementation of SG_TABLE construction method to allow exportation of sub-buffers of a VRAM BO. This capability will enable logical partitioning of a VRAM BO into multiple non-overlapping sub-buffers. One example of this use case is to partition a VRAM BO into two sub-buffers, one for SRC and another for DST. Reviewed-by: Christian König Signed-off-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 546aa546b05aef582956f44ad917c0eee2cb8027 Author: Luben Tuikov Date: Wed Apr 14 11:17:01 2021 -0400 drm/amdgpu: Add double-sscanf but invert Add back the double-sscanf so that both decimal and hexadecimal values could be read in, but this time invert the scan so that hexadecimal format with a leading 0x is tried first, and if that fails, then try decimal format. Also use a logical-AND instead of nesting double if-conditional. See commit "drm/amdgpu: Fix a bug for input with double sscanf" Cc: Alexander Deucher Cc: Hawking Zhang Signed-off-by: Luben Tuikov Reviewed-by: John Clements Signed-off-by: Alex Deucher commit b960cb25b1e36a930a0d31097e932f313bdee9b0 Author: Kenneth Feng Date: Wed Apr 14 11:01:42 2021 +0800 drm/amd/amdgpu: add ASPM support on polaris add ASPM support on polaris Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9d015c0dae05e7650000f2d51f3c80c6c77fdde5 Author: Kenneth Feng Date: Wed Apr 14 18:34:55 2021 +0800 drm/amd/amdgpu: enable ASPM on vega enable ASPM on vega to save the power without the performance hurt. Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3273f8b9e652f2c363c262c0fc90764f159b4cc6 Author: Kenneth Feng Date: Wed Apr 14 18:31:05 2021 +0800 drm/amd/amdgpu: enable ASPM on navi1x enable ASPM on navi1x for the benifit of system power consumption without performance hurt. Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d4abd006631998493971a916b8b54cdc31c73840 Author: Jack Zhang Date: Wed Apr 14 16:51:59 2021 +0800 drm/amd/sriov no need to config GECC for sriov No need to config GECC feature here for sriov Leave the host drvier to do the configuration job. Signed-off-by: Jack Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7f353342bdab4dde0b4e583236474fb2afc1ad17 Author: Lijo Lazar Date: Fri Apr 9 20:16:59 2021 +0800 drm/amd/pm: Show updated clocks on aldebaran When GFXCLK range is updated in manual/determinism mode, show the updated min/max clock range. Signed-off-by: Lijo Lazar Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 737c375b88eb33102164ab38fae7d22a501a47d8 Author: Luben Tuikov Date: Tue Apr 13 08:48:59 2021 -0400 drm/amdgpu: Fix kernel-doc for the RAS sysfs interface Imporve the kernel-doc for the RAS sysfs interface. Fix the grammar, fix the context. Cc: Alexander Deucher Cc: Hawking Zhang Signed-off-by: Luben Tuikov Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7fb6407145479dad41deecb5919d248539e38667 Author: Luben Tuikov Date: Tue Apr 13 08:40:18 2021 -0400 drm/amdgpu: Add bad_page_cnt_threshold to debugfs Add bad_page_cnt_threshold to debugfs, an optional file system used for debugging, for reporting purposes only--it usually matches the size of EEPROM but may be different depending on the "bad_page_threshold" kernel module option. The "bad_page_cnt_threshold" is a dynamically computed value. It depends on three things: the VRAM size; the size of the EEPROM (or the size allocated to the RAS table therein); and the "bad_page_threshold" module parameter. It is a dynamically computed value, when the amdgpu module is run, on which further parameters and logic depend, and as such it is helpful to see the dynamically computed value in debugfs. Cc: Alexander Deucher Cc: Hawking Zhang Signed-off-by: Luben Tuikov Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 80b0cd0fb97ec3c02b0f2c4dc26fe3e8be94dc01 Author: Luben Tuikov Date: Tue Apr 13 08:31:59 2021 -0400 drm/amdgpu: Fix a bug in checking the result of reserve page Fix if (ret) --> if (!ret), a bug, for "retire_page", which caused the kernel to recall the method with *pos == end of file, and that bounced back with error. On the first run, we advanced *pos, but returned 0 back to fs layer, also a bug. Fix the logic of the check of the result of amdgpu_reserve_page_direct()--it is 0 on success, and non-zero on error, not the other way around. This patch fixes this bug. Cc: Alexander Deucher Cc: John Clements Cc: Hawking Zhang Signed-off-by: Luben Tuikov Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6cb7a1d40acb2425b9dabb99cdaf522bf47295cb Author: Luben Tuikov Date: Tue Apr 13 07:49:11 2021 -0400 drm/amdgpu: Fix a bug for input with double sscanf Remove double-sscanf to scan for %llu and 0x%llx, as that is not going to work! The %llu will consume the "0" in "0x" of your input, and the hex value you think you're entering will always be 0. That is, a valid hex value can never be consumed. On the other hand, just entering a hex number without leading 0x will either be scanned as a string and not match, for instance FAB123, or the leading decimal portion is scanned as the %llu, for instance 123FAB will be scanned as 123, which is not correct. Thus remove the first %llu scan and leave only the %llx scan, removing the leading 0x since %llx can scan either. Addresses are usually always hex values, so this suffices. Cc: Alexander Deucher Cc: Xinhui Pan Cc: Hawking Zhang Signed-off-by: Luben Tuikov Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b45fdeab45bc42c2cd2dfbb3d11a3dd797907af6 Author: Jinzhou Su Date: Mon Apr 12 15:45:31 2021 +0800 drm/amdgpu: Add graphics cache rinse packet for sdma Add emit mem sync callback for sdma_v5_2 In amdgpu sync object test, three threads created jobs to send GFX IB and SDMA IB in sequence. After the first GFX thread joined, sometimes the third thread will reuse the same physical page to store the SDMA IB. There will be a risk that SDMA will read GFX IB in the previous physical page. So it's better to flush the cache before commit sdma IB. Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui Acked-by: Christian König Signed-off-by: Alex Deucher commit 0133840fba2de9d70c6e092dd9701b0be317347f Author: Kent Russell Date: Mon Apr 12 08:45:58 2021 -0400 drm/amdgpu: Ensure dcefclk isn't created on Aldebaran Like Arcturus, this isn't available on Aldebaran, so remove it accordingly Signed-off-by: Kent Russell Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit a8b0a3321588bc3a0a50ee98004952a48330f8e2 Author: Anthony Koo Date: Sun Apr 4 10:38:19 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.61 Signed-off-by: Anthony Koo Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 74d85a4af7c0e78f784c1a81e18117a0f81ee036 Author: Aric Cyr Date: Sun Apr 4 12:32:38 2021 -0400 drm/amd/display: 3.2.131 DC version 3.2.131 brings improvements in multiple areas. In summary, we highlight: -Enhancement for multiple eDP BL control. -Add debug flag to enable eDP ILR by default and debugfs to repress HPD/HPR_RX IRQ. -Fixes for DSC enable sequence,Force vsync flip,hang when psr is enabled etc. -Firmware releases: 0.0.60 0.0.61 Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 2ff3cf8238826b19d604d6a99d9bfcc5ce25081f Author: Roman Li Date: Wed Mar 31 16:50:44 2021 -0400 drm/amd/display: Fix hangs with psr enabled on dcn3.xx [Why] SKIP_CRTC_DISABLE bit should be applicable to all dcn asics not only Raven. [How] Replace check for Raven only with check for all DCNs. Signed-off-by: Roman Li Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e922057b556d37c54f8f88e44f7d7b731d6365b1 Author: Jake Wang Date: Thu Apr 1 15:04:50 2021 -0400 drm/amd/display: Added support for multiple eDP BL control [WHY & HOW] Driver currently assumes only 1 eDP is connected. Added support for multiple eDP BL control. Signed-off-by: Jake Wang Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 86c8236eecc66df9e3abd087f1759d9a1555c829 Author: Xiaojian Du Date: Fri Apr 9 16:19:43 2021 +0800 drm/amd/pm: add support for new smu metrics table for vangogh This patch is to add support for new smu metrics table for vangogh. It will support new and legacy smu metrics table in the meanwhile. New pmfw version is 4.63.36.00, and new smu interface version is #3. v1: check smu pmfw version to determine to use new or legacy smu metrics table v2: check smu interface version to determine to use new or legacy smu metrics table v3: revise wrong symbol Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit f4994be248b62da0411e9e0f300373f2e56efe5e Author: Xiaojian Du Date: Thu Mar 25 16:33:27 2021 +0800 drm/amd/pm: update the driver interface header for vangogh This patch is to update the driver interface header for vangogh. New version driver interface header will support new version pmfw (from version 4.63.36.00) which uses new smu metrics table. Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 4f6baaf0bf36554d226aa28969c83d3c84ca2edc Author: Anthony Koo Date: Thu Apr 1 17:57:40 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.60 Signed-off-by: Anthony Koo Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f83d2a214d93dc4b80977ea3a6f270b272c40ef8 Author: Lewis Huang Date: Fri Mar 26 16:12:45 2021 +0800 drm/amd/display: wait vblank when stream enabled and update dpp clock [Why] When boot into OS, seamless boot device won't blank stream. Driver update dpp clock when scanline position in vactive will show garbage on screen. [How] Wait for vblank for seamless boot edp display when driver update dpp clock. The apply seamless boot flag will be clear when OS call SetVisibility on. Therefore we only wait for vblank once after boot into OS. Signed-off-by: Lewis Huang Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b972b4f913eee029233be88e1a84a7cc36073c8b Author: Harry Wentland Date: Fri Oct 2 13:32:00 2020 -0400 drm/amd/display: Add debugfs to repress HPD and HPR_RX IRQs [Why] For debugging reasons it can be beneficial to disable any hotplug and DP shortpulse interrupt handling. [How] Expose a debugfs to set a flag to bypass HPD IRQ handling and skip IRQ handling if flag is set. Signed-off-by: Harry Wentland Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 83d76eeb7bf3955051824170aec44600793f63e5 Author: Mikita Lipski Date: Tue Dec 1 10:52:58 2020 -0500 drm/amd/display: Connect clock optimization function to dcn301 [why/how] Connecting clock optimization functions to dcn301 HWSS to enable power state enter/exit optimization Signed-off-by: Mikita Lipski Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 719349f849e8d0af6197629774ccf795ecde9d29 Author: Mikita Lipski Date: Tue Oct 27 15:52:43 2020 -0400 drm/amd/display: Remove unused flag from stream state [why & how] Removing unused DSC flag which is incorrect and is not used. We are only using stream->timing.flags.DSC for DSC's current state. Stream state as an input parameter and should not contain any past status flags. Signed-off-by: Mikita Lipski Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 56d63782af9bbd1271bff1422a6a013123eade4d Author: Anthony Wang Date: Wed Mar 31 11:03:35 2021 -0400 drm/amd/display: Force vsync flip when reconfiguring MPCC [Why] Underflow observed when disabling PIP overlay in-game when vsync is disabled, due to OTC master lock not working with game pipe which is immediate flip. [How] When performing a full update, override flip_immediate value to false for all planes, so that flip occurs on vsync. Signed-off-by: Anthony Wang Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit fab8580107b88b1576a17f0e48b238caecc46d96 Author: Wesley Chalmers Date: Tue Mar 30 18:15:21 2021 -0400 drm/amd/display: Set LTTPR mode to non-LTTPR if no repeaters found [WHY] If no repeaters are found, we do not need or want to attempt to link-train repeaters, as this could cause bugs. Signed-off-by: Wesley Chalmers Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit b0f3438286bcf33a51d039ebd20a0d5dd89a794d Author: Nicholas Kazlauskas Date: Tue Mar 30 16:25:56 2021 -0400 drm/amd/display: Fix DML validation of simple vs native 422 modes [Why] We're always validating DML with simple 422 DSC even if native 422 DSC is in use. [How] Use the mode configuration from the timing. Signed-off-by: Nicholas Kazlauskas Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8efd0f5a44c29f0e14ebf6401025ad18e84aa378 Author: Michael Strauss Date: Mon Mar 22 14:53:29 2021 -0400 drm/amd/display: Remove static property from decide_edp_link_settings [Why & How] Static cleanup for eDP ILR Support. Signed-off-by: Michael Strauss Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 8cf9575d70793f9c0bf41cf63ac7f759962e3178 Author: Mike Hsieh Date: Mon Jan 25 12:46:21 2021 +0800 drm/amd/display: Fix DSC enable sequence [Why] DSC is enabled before reset link and potentially cause DSC enable fail problem. [How] Enable DSC after link is reseted Signed-off-by: Mike Hsieh Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f9fc6f3948a42dcd04e1158b98b9fd5b36d0c4af Author: Michael Strauss Date: Tue Mar 9 14:35:05 2021 -0500 drm/amd/display: Disable boot optimizations if ILR optimzation is required [Why] VBIOS currently sets the max link rate found in eDP 1.4 SUPPORTED_LINK_RATES table If eDP fastboot optimizations are enabled, the link rate remains at max after init [How] Determine optimal link rate during boot, disable seamless boot and eDP fastboot optimizations if link rate optimization is required Signed-off-by: Michael Strauss Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 66611a721b59027e737d7517b0e5126368895385 Author: Michael Strauss Date: Mon Mar 22 15:13:13 2021 -0400 drm/amd/display: Add debug flag to enable eDP ILR by default [Why & How] Allow per-asic enablement of ILR feature with debug flag Signed-off-by: Michael Strauss Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 28fb89ff97b06cdf4229ce5705f3ead3bb010ba0 Author: Tian Tao Date: Mon Apr 5 17:03:50 2021 +0800 i2c: nomadik: Fix space errors Fix the following checkpatch errors: ERROR: space prohibited before that ',' (ctx:WxW) #280: FILE: drivers/i2c/busses/i2c-nomadik.c:280: + i2c_clr_bit(dev->virtbase + I2C_CR , I2C_CR_PE); ^ ERROR: space prohibited before that ',' (ctx:WxW) #528: FILE: drivers/i2c/busses/i2c-nomadik.c:528: + i2c_set_bit(dev->virtbase + I2C_CR , I2C_CR_PE); ^ No functional changes. Signed-off-by: Tian Tao Signed-off-by: Zihao Tang Signed-off-by: Wolfram Sang commit 87c2de5fa6f1cf59dac90f53a5a482a281c16da0 Author: Tian Tao Date: Mon Apr 5 17:03:49 2021 +0800 i2c: iop3xx: Fix coding style issues Fix 20 checkpatch errors. Among these errors, 18 of them are incorrect space usage, such as: ERROR: space prohibited after that open parenthesis '(' #128: FILE: drivers/i2c/busses/i2c-iop3xx.c:128: + if ( !rc ) rc = -I2C_ERR_BERR The remaining two errors are trailing statements should be on next line, such as: ERROR: trailing statements should be on next line #128: FILE: drivers/i2c/busses/i2c-iop3xx.c:128: + if ( !rc ) rc = -I2C_ERR_BERR; No functional changes. Signed-off-by: Tian Tao Signed-off-by: Zihao Tang Signed-off-by: Wolfram Sang commit 5e77a61f506b1ac8d86355edd52ebeb038179339 Author: Tian Tao Date: Mon Apr 5 17:03:48 2021 +0800 i2c: amd8111: Fix coding style issues Fix the following checkpatch errors: ERROR: "foo * bar" should be "foo *bar" #189: FILE: drivers/i2c/busses/i2c-amd8111.c:189: ERROR: "foo * bar" should be "foo *bar" #191: FILE: drivers/i2c/busses/i2c-amd8111.c:191: ERROR: switch and case should be at the same indent #201: FILE: drivers/i2c/busses/i2c-amd8111.c:201: ERROR: switch and case should be at the same indent #359: FILE: drivers/i2c/busses/i2c-amd8111.c:359: No functional changes. Signed-off-by: Tian Tao Signed-off-by: Zihao Tang Signed-off-by: Wolfram Sang commit 30b9cb274da2d2c6d9dffe4372d7311a8cb80a64 Author: Andy Shevchenko Date: Thu Apr 15 10:33:25 2021 +1200 i2c: mpc: Drop duplicate message from devm_platform_ioremap_resource() devm_platform_ioremap_resource() prints a message in case of error. Drop custom one. Signed-off-by: Andy Shevchenko Reviewed-by: Chris Packham Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 30a153815c690e7a7d98834fb17ff25166cd9b39 Author: Andy Shevchenko Date: Thu Apr 15 10:33:24 2021 +1200 i2c: mpc: Use device_get_match_data() helper Use the device_get_match_data() helper instead of open coding. Signed-off-by: Andy Shevchenko Reviewed-by: Chris Packham Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 66679e9b8362163a05348e73d8ddae6da7a572c5 Author: Andy Shevchenko Date: Thu Apr 15 10:33:23 2021 +1200 i2c: mpc: Remove CONFIG_PM_SLEEP ifdeffery Use __maybe_unused for the suspend()/resume() hooks and get rid of the CONFIG_PM_SLEEP ifdeffery to improve the code. Signed-off-by: Andy Shevchenko Reviewed-by: Chris Packham Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit c9598d04e738e289a2d95721b2f8c63ba0d977d2 Author: Andy Shevchenko Date: Thu Apr 15 10:33:22 2021 +1200 i2c: mpc: Use devm_clk_get_optional() The peripheral 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: Andy Shevchenko Reviewed-by: Chris Packham Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 97b4dff130f5451bcfb7e677f16366c205b51d0f Author: Chris Packham Date: Thu Apr 15 10:33:21 2021 +1200 i2c: mpc: Update license and copyright Use SPDX-License-Identifier and add copyright for Allied Telesis because of the reasonably large rewrite in the preceding patch. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 1538d82f4647c686f09888b36604dca2fc2bdaf6 Author: Chris Packham Date: Thu Apr 15 10:33:20 2021 +1200 i2c: mpc: Interrupt driven transfer The fsl-i2c controller will generate an interrupt after every byte transferred. Make use of this interrupt to drive a state machine which allows the next part of a transfer to happen as soon as the interrupt is received. This is particularly helpful with SMBUS devices like the LM81 which will timeout if we take too long between bytes in a transfer. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 6890f4cb9a12338d8842e54a4b490fedcb525d81 Author: Eric Huang Date: Tue Apr 6 13:19:40 2021 -0400 drm/amdkfd: change MTYPEs for Aldebaran's HW requirement Due to changes of HW memory model, we need to change Aldebaran MTYPEs to meet HW changes. Signed-off-by: Eric Huang Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 36c082378c381c8c0e52f81e2b00b4364324f57e Author: Oak Zeng Date: Thu Apr 1 14:36:42 2021 -0500 drm/amdgpu: Introduce new SETUP_TMR interface This new interface passes both virtual and physical address to PSP. It is backward compatible with old interface. v2: use a function to simplify tmr physical address calc (Lijo) Signed-off-by: Oak Zeng Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit 0ca565ab97083acaf640dd58a6f66cbe3d802356 Author: Oak Zeng Date: Thu Apr 1 14:36:41 2021 -0500 drm/amdgpu: Calling address translation functions to simplify codes Use amdgpu_gmc_vram_pa and amdgpu_gmc_vram_cpu_pa to simplify codes. No logic change. Signed-off-by: Oak Zeng Signed-off-by: Harish Kasiviswanathan Acked-by: Christian König Signed-off-by: Alex Deucher commit dead5e421ac437deb94ea18c423e898c70a807a5 Author: Oak Zeng Date: Thu Apr 1 14:36:40 2021 -0500 drm/amdgpu: Introduce functions for vram physical addr calculation Add one function to calculate BO's GPU physical address. And another function to calculate BO's CPU physical address. v2: Use functions vs macros (Christian) Use more proper function names (Christian) Signed-off-by: Oak Zeng Suggested-by: Lijo Lazar Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 651a03212178e4004370b07344827d62e122b534 Author: John Clements Date: Mon Apr 12 16:12:56 2021 +0800 drm/amdgpu: update gfx 9.4.2 ras error reporting only output ras error status if an error bit is set or error counter is set Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 89514083f828cfd4ab3c80bf50d571c77e1b2383 Author: John Clements Date: Mon Apr 12 16:12:41 2021 +0800 drm/amdgpu: update mmhub 1.7 ras error reporting only output ras error status if an error bit is set Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 9a29f7f020e06f14eb126bcb84a7f0d166415824 Author: Wan Jiabing Date: Tue Apr 6 15:16:18 2021 +0800 ubi: Remove unnecessary struct declaration struct ubi_wl_entry is defined at 178th line. The declaration here is unnecessary. Remove it. Reviewed-by: Tudor Ambarus Signed-off-by: Wan Jiabing Signed-off-by: Richard Weinberger commit 42984af09afc414d540fcc8247f42894b0378a91 Author: Joel Stanley Date: Wed Mar 31 00:15:37 2021 +1030 jffs2: Hook up splice_write callback overlayfs using jffs2 as the upper filesystem would fail in some cases since moving to v5.10. The test case used was to run 'touch' on a file that exists in the lower fs, causing the modification time to be updated. It returns EINVAL when the bug is triggered. A bisection showed this was introduced in v5.9-rc1, with commit 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops"). Reverting that commit restores the expected behaviour. Some digging showed that this was due to jffs2 lacking an implementation of splice_write. (For unknown reasons the warn_unsupported that should trigger was not displaying any output). Adding this patch resolved the issue and the test now passes. Cc: stable@vger.kernel.org Fixes: 36e2c7421f02 ("fs: don't allow splice read/write without explicit ops") Signed-off-by: Joel Stanley Reviewed-by: Christoph Hellwig Tested-by: Lei YU Signed-off-by: Richard Weinberger commit 96381e3a0a932aa30e2cac74c65755cd8a6fa20a Author: Lijo Lazar Date: Mon Apr 12 13:57:35 2021 +0800 drm/amd/pm: Use VBIOS PPTable for aldebaran Keep the logic to force-use VBIOS PPTable in aldebaran rather than in generic SMU13. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 81af4b7b53d3f2931db907c90822d0b89f0166b7 Author: Arnd Bergmann Date: Mon Mar 22 12:34:29 2021 +0100 jffs2: avoid Wempty-body warnings Building with W=1 shows a few warnings for empty macros: fs/jffs2/scan.c: In function 'jffs2_scan_xattr_node': fs/jffs2/scan.c:378:66: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 378 | jffs2_sum_add_xattr_mem(s, rx, ofs - jeb->offset); | ^ fs/jffs2/scan.c: In function 'jffs2_scan_xref_node': fs/jffs2/scan.c:434:65: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 434 | jffs2_sum_add_xref_mem(s, rr, ofs - jeb->offset); | ^ fs/jffs2/scan.c: In function 'jffs2_scan_eraseblock': fs/jffs2/scan.c:893:88: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 893 | jffs2_sum_add_padding_mem(s, je32_to_cpu(node->totlen)); | ^ Change all these macros to 'do { } while (0)' statements to avoid the warnings and make the code a little more robust. Signed-off-by: Arnd Bergmann Signed-off-by: Richard Weinberger commit 960b9a8a7676b9054d8b46a2c7db52a0c8766b56 Author: lizhe Date: Thu Mar 18 11:06:57 2021 +0800 jffs2: Fix kasan slab-out-of-bounds problem KASAN report a slab-out-of-bounds problem. The logs are listed below. It is because in function jffs2_scan_dirent_node, we alloc "checkedlen+1" bytes for fd->name and we check crc with length rd->nsize. If checkedlen is less than rd->nsize, it will cause the slab-out-of-bounds problem. jffs2: Dirent at *** has zeroes in name. Truncating to %d char ================================================================== BUG: KASAN: slab-out-of-bounds in crc32_le+0x1ce/0x260 at addr ffff8800842cf2d1 Read of size 1 by task test_JFFS2/915 ============================================================================= BUG kmalloc-64 (Tainted: G B O ): kasan: bad access detected ----------------------------------------------------------------------------- INFO: Allocated in jffs2_alloc_full_dirent+0x2a/0x40 age=0 cpu=1 pid=915 ___slab_alloc+0x580/0x5f0 __slab_alloc.isra.24+0x4e/0x64 __kmalloc+0x170/0x300 jffs2_alloc_full_dirent+0x2a/0x40 jffs2_scan_eraseblock+0x1ca4/0x3b64 jffs2_scan_medium+0x285/0xfe0 jffs2_do_mount_fs+0x5fb/0x1bbc jffs2_do_fill_super+0x245/0x6f0 jffs2_fill_super+0x287/0x2e0 mount_mtd_aux.isra.0+0x9a/0x144 mount_mtd+0x222/0x2f0 jffs2_mount+0x41/0x60 mount_fs+0x63/0x230 vfs_kern_mount.part.6+0x6c/0x1f4 do_mount+0xae8/0x1940 SyS_mount+0x105/0x1d0 INFO: Freed in jffs2_free_full_dirent+0x22/0x40 age=27 cpu=1 pid=915 __slab_free+0x372/0x4e4 kfree+0x1d4/0x20c jffs2_free_full_dirent+0x22/0x40 jffs2_build_remove_unlinked_inode+0x17a/0x1e4 jffs2_do_mount_fs+0x1646/0x1bbc jffs2_do_fill_super+0x245/0x6f0 jffs2_fill_super+0x287/0x2e0 mount_mtd_aux.isra.0+0x9a/0x144 mount_mtd+0x222/0x2f0 jffs2_mount+0x41/0x60 mount_fs+0x63/0x230 vfs_kern_mount.part.6+0x6c/0x1f4 do_mount+0xae8/0x1940 SyS_mount+0x105/0x1d0 entry_SYSCALL_64_fastpath+0x1e/0x97 Call Trace: [] dump_stack+0x59/0x7e [] print_trailer+0x125/0x1b0 [] object_err+0x34/0x40 [] kasan_report.part.1+0x21f/0x534 [] ? vprintk+0x2d/0x40 [] ? crc32_le+0x1ce/0x260 [] kasan_report+0x26/0x30 [] __asan_load1+0x3d/0x50 [] crc32_le+0x1ce/0x260 [] ? jffs2_alloc_full_dirent+0x2a/0x40 [] jffs2_scan_eraseblock+0x1d0c/0x3b64 [] ? jffs2_scan_medium+0xccf/0xfe0 [] ? jffs2_scan_make_ino_cache+0x14c/0x14c [] ? kasan_unpoison_shadow+0x35/0x50 [] ? kasan_unpoison_shadow+0x35/0x50 [] ? kasan_kmalloc+0x5e/0x70 [] ? kmem_cache_alloc_trace+0x10c/0x2cc [] ? mtd_point+0xf7/0x130 [] jffs2_scan_medium+0x285/0xfe0 [] ? jffs2_scan_eraseblock+0x3b64/0x3b64 [] ? kasan_unpoison_shadow+0x35/0x50 [] ? kasan_unpoison_shadow+0x35/0x50 [] ? kasan_kmalloc+0x5e/0x70 [] ? __kmalloc+0x12b/0x300 [] ? kasan_kmalloc+0x5e/0x70 [] ? jffs2_sum_init+0x9f/0x240 [] jffs2_do_mount_fs+0x5fb/0x1bbc [] ? jffs2_del_noinode_dirent+0x640/0x640 [] ? kasan_kmalloc+0x5e/0x70 [] ? __init_rwsem+0x97/0xac [] jffs2_do_fill_super+0x245/0x6f0 [] jffs2_fill_super+0x287/0x2e0 [] ? jffs2_parse_options+0x594/0x594 [] mount_mtd_aux.isra.0+0x9a/0x144 [] mount_mtd+0x222/0x2f0 [] ? jffs2_parse_options+0x594/0x594 [] ? mount_mtd_aux.isra.0+0x144/0x144 [] ? free_pages+0x13/0x1c [] ? selinux_sb_copy_data+0x278/0x2e0 [] jffs2_mount+0x41/0x60 [] mount_fs+0x63/0x230 [] ? alloc_vfsmnt+0x32f/0x3b0 [] vfs_kern_mount.part.6+0x6c/0x1f4 [] do_mount+0xae8/0x1940 [] ? audit_filter_rules.constprop.6+0x1d10/0x1d10 [] ? copy_mount_string+0x40/0x40 [] ? alloc_pages_current+0xa4/0x1bc [] ? __get_free_pages+0x25/0x50 [] ? copy_mount_options.part.17+0x183/0x264 [] SyS_mount+0x105/0x1d0 [] ? copy_mnt_ns+0x560/0x560 [] ? msa_space_switch_handler+0x13d/0x190 [] entry_SYSCALL_64_fastpath+0x1e/0x97 [] ? msa_space_switch+0xb0/0xe0 Memory state around the buggy address: ffff8800842cf180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8800842cf200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8800842cf280: fc fc fc fc fc fc 00 00 00 00 01 fc fc fc fc fc ^ ffff8800842cf300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8800842cf380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Cc: stable@vger.kernel.org Reported-by: Kunkun Xu Signed-off-by: lizhe Signed-off-by: Richard Weinberger commit 8aa058d79b6d491778836626ba94a5165589acaf Author: Gustavo A. R. Silva Date: Fri Mar 5 02:28:32 2021 -0600 ubi: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Richard Weinberger commit 829ad58a04e28e1979cc8b9ac7d2db69cc44dc80 Author: Martin Devera Date: Wed Mar 3 10:05:19 2021 +0100 ubifs: Report max LEB count at mount time There is no other way to directly report/query this quantity. It is useful when planing how given filesystem can be resized. Signed-off-by: Martin Devera Signed-off-by: Richard Weinberger commit af61e7bf927855e9647393f6c5ac4e411ac2041e Author: Steffen Trumtrar Date: Tue Feb 16 08:23:34 2021 +0100 ubifs: Set s_uuid in super block to support ima/evm uuid options This is required to provide uuid based integrity functionality for: ima_policy (fsuuid option) and the 'evmctl' command ('--uuid' option). Co-developed-by: Oleksij Rempel Co-developed-by: Juergen Borleis Signed-off-by: Steffen Trumtrar Reviewed-by: Andy Shevchenko Signed-off-by: Richard Weinberger commit ba4884a6dbf002401081a8eb0ba85e5dc87025e1 Author: Rui Salvaterra Date: Mon Apr 5 16:29:35 2021 +0100 ubifs: Default to zstd compression Compared to lzo and zlib, zstd is the best all-around performer, both in terms of speed and compression ratio. Set it as the default, if available. Signed-off-by: Rui Salvaterra Signed-off-by: Richard Weinberger commit 3e903315790baf4a966436e7f32e9c97864570ac Author: Guochun Mao Date: Tue Mar 16 16:52:14 2021 +0800 ubifs: Only check replay with inode type to judge if inode linked Conside the following case, it just write a big file into flash, when complete writing, delete the file, and then power off promptly. Next time power on, we'll get a replay list like: ... LEB 1105:211344 len 4144 deletion 0 sqnum 428783 key type 1 inode 80 LEB 15:233544 len 160 deletion 1 sqnum 428785 key type 0 inode 80 LEB 1105:215488 len 4144 deletion 0 sqnum 428787 key type 1 inode 80 ... In the replay list, data nodes' deletion are 0, and the inode node's deletion is 1. In current logic, the file's dentry will be removed, but inode and the flash space it occupied will be reserved. User will see that much free space been disappeared. We only need to check the deletion value of the following inode type node of the replay entry. Fixes: e58725d51fa8 ("ubifs: Handle re-linking of inodes correctly while recovery") Cc: stable@vger.kernel.org Signed-off-by: Guochun Mao Signed-off-by: Richard Weinberger commit d3003d9e686890a1e9f0cc7c08aa02ef2953b1f0 Author: Rob Herring Date: Wed Apr 14 11:07:38 2021 -0500 libperf tests: Add support for verbose printing Add __T_VERBOSE() so tests can add verbose output. The verbose output is enabled with the '-v' command line option. Running 'make tests V=1' will enable the '-v' option when running the tests. It'll be used in the next patch, for a user space counter access test. Signed-off-by: Rob Herring Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Catalin Marinas Cc: Itaru Kitayama Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Link: http://lore.kernel.org/lkml/20210414155412.3697605-3-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 6cd70754f262e593febc06a02d7ea637c927ea42 Author: Rob Herring Date: Wed Apr 14 11:07:37 2021 -0500 libperf: Add evsel mmap support In order to support usersapce access, an event must be mmapped. While there's already mmap support for evlist, the usecase is a bit different than the self monitoring with userspace access. So let's add new perf_evsel__mmap()/perf_evsel_munmap() functions to mmap/munmap an evsel. This allows implementing userspace access as a fastpath for perf_evsel__read(). The mmapped address is returned by perf_evsel__mmap_base() which primarily for users/tests to check if userspace access is enabled. Signed-off-by: Rob Herring Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Catalin Marinas Cc: Itaru Kitayama Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Link: http://lore.kernel.org/lkml/20210414155412.3697605-2-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2fc83c2cd77703cfcfc1ffaa092614fb1f837292 Author: Rob Herring Date: Wed Apr 14 10:54:09 2021 -0500 tools include: Add an initial math64.h Add an initial math64.h similar to linux/math64.h with functions mul_u64_u64_div64() and mul_u64_u32_shr(). This isn't a direct copy of include/linux/math64.h as that doesn't define mul_u64_u64_div64(). Implementation was written by Peter Zilkstra based on linux/math64.h and div64.h[1]. The original implementation was not optimal on arm64 as __int128 division is not optimal with a call out to __udivti3, so I dropped the __int128 variant of mul_u64_u64_div64(). [1] https://lore.kernel.org/lkml/20200322101848.GF2452@worktop.programming.kicks-ass.net/ Signed-off-by: Rob Herring Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: Catalin Marinas Cc: Itaru Kitayama Cc: Mark Rutland Cc: Peter Zijlstra Cc: Will Deacon Link: http://lore.kernel.org/lkml/20210414155412.3697605-2-robh@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 2e1daee14e67fbf9b27280b974e2c680a22cabea Author: Vitaly Chikunov Date: Wed Apr 14 21:27:23 2021 +0300 perf beauty: Fix fsconfig generator After gnulib update sed stopped matching `[[:space:]]*+' as before, causing the following compilation error: In file included from builtin-trace.c:719: trace/beauty/generated/fsconfig_arrays.c:2:3: error: expected expression before ']' token 2 | [] = "", | ^ trace/beauty/generated/fsconfig_arrays.c:2:3: error: array index in initializer not of integer type trace/beauty/generated/fsconfig_arrays.c:2:3: note: (near initialization for 'fsconfig_cmds') Fix this by correcting the regular expression used in the generator. Also, clean up the script by removing redundant egrep, xargs, and printf invocations. Committer testing: Continues to work: $ cat tools/perf/trace/beauty/fsconfig.sh #!/bin/sh # SPDX-License-Identifier: LGPL-2.1 if [ $# -ne 1 ] ; then linux_header_dir=tools/include/uapi/linux else linux_header_dir=$1 fi linux_mount=${linux_header_dir}/mount.h printf "static const char *fsconfig_cmds[] = {\n" ms='[[:space:]]*' sed -nr "s/^${ms}FSCONFIG_([[:alnum:]_]+)${ms}=${ms}([[:digit:]]+)${ms},.*/\t[\2] = \"\1\",/p" \ ${linux_mount} printf "};\n" $ tools/perf/trace/beauty/fsconfig.sh static const char *fsconfig_cmds[] = { [0] = "SET_FLAG", [1] = "SET_STRING", [2] = "SET_BINARY", [3] = "SET_PATH", [4] = "SET_PATH_EMPTY", [5] = "SET_FD", [6] = "CMD_CREATE", [7] = "CMD_RECONFIGURE", }; $ Fixes: d35293004a5e4 ("perf beauty: Add generator for fsconfig's 'cmd' arg values") Signed-off-by: Vitaly Chikunov Co-authored-by: Dmitry V. Levin Tested-by: Arnaldo Carvalho de Melo Link: http://lore.kernel.org/lkml/20210414182723.1670663-1-vt@altlinux.org Signed-off-by: Arnaldo Carvalho de Melo commit 3535a6967c0d590381c16d6676c6fdfa60f4d733 Author: Arnaldo Carvalho de Melo Date: Wed Apr 14 09:32:14 2021 -0300 perf record: Improve 'Workload failed' message printing events + what was exec'ed Before: # perf record -a cycles,instructions,cache-misses Workload failed: No such file or directory # After: # perf record -a cycles,instructions,cache-misses Failed to collect 'cycles' for the 'cycles,instructions,cache-misses' workload: No such file or directory # Helps disambiguating other error scenarios: # perf record -a -e cycles,instructions,cache-misses bla Failed to collect 'cycles,instructions,cache-misses' for the 'bla' workload: No such file or directory # perf record -a cycles,instructions,cache-misses sleep 1 Failed to collect 'cycles' for the 'cycles,instructions,cache-misses' workload: No such file or directory # When all goes well we're back to the usual: # perf record -a -e cycles,instructions,cache-misses sleep 1 [ perf record: Woken up 3 times to write data ] [ perf record: Captured and wrote 3.151 MB perf.data (21242 samples) ] # Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20210414131628.2064862-3-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit 9865ea8ab31f2e56be59125099ee251ce573f293 Author: Arnaldo Carvalho de Melo Date: Wed Apr 14 10:08:16 2021 -0300 perf evlist: Add a method to return the list of evsels as a string Add a 'scnprintf' method to obtain the list of evsels in a evlist as a string, excluding the "dummy" event used for things like receiving metadata events (PERF_RECORD_FORK, MMAP, etc) when synthesizing preexisting threads. Will be used to improve the error message for workload failure in 'perf record. Acked-by: Ian Rogers Cc: Adrian Hunter Cc: Jiri Olsa Cc: Namhyung Kim Link: http://lore.kernel.org/lkml/20210414131628.2064862-2-acme@kernel.org Signed-off-by: Arnaldo Carvalho de Melo commit ef4ed780d005d65b1a70ba7803233cace93a73ac Merge: 256437ebda641 32cbc7cb70b07 Author: Richard Weinberger Date: Thu Apr 15 21:14:51 2021 +0200 Merge tag 'nand/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next MTD core: * Handle possible -EPROBE_DEFER from parse_mtd_partitions() NAND core: * Fix error handling in nand_prog_page_op() (x2) * Add a helper to retrieve the number of ECC bytes per step * Add a helper to retrieve the number of ECC steps * Let ECC engines advertize the exact number of steps * ECC Hamming: - Populate the public nsteps field - Use the public nsteps field * ECC BCH: - Populate the public nsteps field - Use the public nsteps field Raw NAND core: * Add support for secure regions in NAND memory * Try not to use the ECC private structures * Remove duplicate include in rawnand.h * BBT: - Skip bad blocks when searching for the BBT in NAND Raw NAND controller drivers: * Qcom: - Convert bindings to YAML - Use dma_mapping_error() for error check - Add missing nand_cleanup() in error path - Return actual error code instead of -ENODEV - Update last code word register - Add helper to configure location register - Rename parameter name in macro - Add helper to check last code word - Convert nandc to chip in Read/Write helper - Update register macro name for 0x2c offset * GPMI: - Fix a double free in gpmi_nand_init * Rockchip: - Use flexible-array member instead of zero-length array * Atmel: - Update ecc_stats.corrected counter * MXC: - Remove unneeded of_match_ptr() * R852: - replace spin_lock_irqsave by spin_lock in hard IRQ * Brcmnand: - Move to polling in pio mode on oops write - Read/write oob during EDU transfer - Fix OOB R/W with Hamming ECC * FSMC: - Fix error code in fsmc_nand_probe() * OMAP: - Use ECC information from the generic structures SPI-NAND core: * Add missing MODULE_DEVICE_TABLE() SPI-NAND drivers: * gigadevice: Support GD5F1GQ5UExxG commit 256437ebda641c49abbbe919becc16f75848380b Merge: 203ba0f64eefd 46094049a49be Author: Richard Weinberger Date: Thu Apr 15 21:13:51 2021 +0200 Merge tag 'spi-nor/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next SPI NOR core changes: - Add OTP support - Fix module unload while an op in progress - Add various cleanup patches SPI NOR controller drivers changes: - intel-spi: Move platform data header to x86 subfolder commit 203ba0f64eefd0b751c1f34189f4fb1b21182b94 Merge: 28f0be44b263c f3907773d6022 Author: Richard Weinberger Date: Thu Apr 15 21:12:54 2021 +0200 Merge tag 'cfi/for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux into mtd/next CFI changes Just a couple of fixes for v5.13-rc1 * Disable broken buffered writes for CFI chips within ID 0x2201 * Address a Coverity report for unused value commit 22db095d57b51ff71aaa8ddba515180399f54334 Author: Yordan Karadzhov (VMware) Date: Thu Apr 15 21:18:54 2021 +0300 tracing: Add "func_no_repeats" option for function tracing If the option is activated the function tracing record gets consolidated in the cases when a single function is called number of times consecutively. Instead of having an identical record for each call of the function we will record only the first call following by event showing the number of repeats. Link: https://lkml.kernel.org/r/20210415181854.147448-7-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) Signed-off-by: Steven Rostedt (VMware) commit 4994891ebbb89b18903637dc1c8f27b42cb8b8b2 Author: Yordan Karadzhov (VMware) Date: Thu Apr 15 21:18:53 2021 +0300 tracing: Unify the logic for function tracing options Currently the logic for dealing with the options for function tracing has two different implementations. One is used when we set the flags (in "static int func_set_flag()") and another used when we initialize the tracer (in "static int function_trace_init()"). Those two implementations are meant to do essentially the same thing and they are both not very convenient for adding new options. In this patch we add a helper function that provides a single implementation of the logic for dealing with the options and we make it such that new options can be easily added. Link: https://lkml.kernel.org/r/20210415181854.147448-6-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) Signed-off-by: Steven Rostedt (VMware) commit c658797f1a70561205a224be0c8be64977ed64e8 Author: Yordan Karadzhov (VMware) Date: Thu Apr 15 21:18:52 2021 +0300 tracing: Add method for recording "func_repeats" events This patch only provides the implementation of the method. Later we will used it in a combination with a new option for function tracing. Link: https://lkml.kernel.org/r/20210415181854.147448-5-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) Signed-off-by: Steven Rostedt (VMware) commit 20344c54d1c7ab7428e312bbe9b0097750875002 Author: Yordan Karadzhov (VMware) Date: Thu Apr 15 21:18:51 2021 +0300 tracing: Add "last_func_repeats" to struct trace_array The field is used to keep track of the consecutive (on the same CPU) calls of a single function. This information is needed in order to consolidate the function tracing record in the cases when a single function is called number of times. Link: https://lkml.kernel.org/r/20210415181854.147448-4-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) Signed-off-by: Steven Rostedt (VMware) commit f689e4f280b69cd7341743c2ecacd1b13528a0d8 Author: Yordan Karadzhov (VMware) Date: Thu Apr 15 21:18:50 2021 +0300 tracing: Define new ftrace event "func_repeats" The event aims to consolidate the function tracing record in the cases when a single function is called number of times consecutively. while (cond) do_func(); This may happen in various scenarios (busy waiting for example). The new ftrace event can be used to show repeated function events with a single event and save space on the ring buffer Link: https://lkml.kernel.org/r/20210415181854.147448-3-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) Signed-off-by: Steven Rostedt (VMware) commit eaa7a897206ac5bfa7da3f647686209ada1984d0 Author: Yordan Karadzhov (VMware) Date: Thu Apr 15 21:18:49 2021 +0300 tracing: Define static void trace_print_time() The part of the code that prints the time of the trace record in "int trace_print_context()" gets extracted in a static function. This is done as a preparation for a following patch, in which we will define a new ftrace event called "func_repeats". The new static method, defined here, will be used by this new event to print the time of the last repeat of a function that is consecutively called number of times. Link: https://lkml.kernel.org/r/20210415181854.147448-2-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) Signed-off-by: Steven Rostedt (VMware) commit c7ed5fd5fbb279a75a58cf641b873f57ef906ac7 Merge: 58eaa7b2d07d3 8c4ffe4d023d7 Author: Mark Brown Date: Thu Apr 15 19:29:40 2021 +0100 Merge branch 'for-5.12' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.13 commit 455abda6c972eddf3457ec098a64cce39b1c2652 Merge: e63c8eb132d5b 404a8ef512587 Author: Jens Axboe Date: Thu Apr 15 12:15:48 2021 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.13/drivers Pull MD updates from Song: "1. mddev_find_or_alloc() clean up, from Christoph. 2. Fix NULL pointer deref with external bitmap, from Sudhakar." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md/bitmap: wait for external bitmap writes to complete during tear down md: do not return existing mddevs from mddev_find_or_alloc md: refactor mddev_find_or_alloc md: factor out a mddev_alloc_unit helper from mddev_find commit e63c8eb132d5b41cb62eaa1176f13a8b1cb43a9e Merge: f8ee34a929a4a d6609084b0b81 Author: Jens Axboe Date: Thu Apr 15 12:15:12 2021 -0600 Merge tag 'nvme-5.13-2021-04-15' of git://git.infradead.org/nvme into for-5.13/drivers Pull NVMe updates from Christoph: "nvme updates for Linux 5.13 - refactor the ioctl code - fix a segmentation fault during io parsing error in nvmet-tcp (Elad Grupi) - fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store (Gopal Tiwari) - properly respect the sgl_threshold flag in nvme-pci (Niklas Cassel) - misc cleanups (Niklas Cassel, Amit Engel, Minwoo Im, Colin Ian King)" * tag 'nvme-5.13-2021-04-15' of git://git.infradead.org/nvme: nvme: fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store nvme: let namespace probing continue for unsupported features nvme: factor out nvme_ns_open and nvme_ns_release helpers nvme: move nvme_ns_head_ops to multipath.c nvme: factor out a nvme_tryget_ns_head helper nvme: move the ioctl code to a separate file nvme: don't bother to look up a namespace for controller ioctls nvme: simplify block device ioctl handling for the !multipath case nvme: simplify the compat ioctl handling nvme: factor out a nvme_ns_ioctl helper nvme: pass a user pointer to nvme_nvm_ioctl nvme: cleanup setting the disk name nvme: add a nvme_ns_head_multipath helper nvme: remove single trailing whitespace nvme-multipath: remove single trailing whitespace nvme-pci: remove single trailing whitespace nvme-pci: don't simple map sgl when sgls are disabled nvmet: fix a spelling mistake "nubmer" -> "number" nvmet-fc: simplify nvmet_fc_alloc_hostport nvmet-tcp: fix a segmentation fault during io parsing error commit 404a8ef512587b2460107d3272c17a89aef75edf Author: Sudhakar Panneerselvam Date: Tue Apr 13 04:08:29 2021 +0000 md/bitmap: wait for external bitmap writes to complete during tear down NULL pointer dereference was observed in super_written() when it tries to access the mddev structure. [The below stack trace is from an older kernel, but the problem described in this patch applies to the mainline kernel.] [ 1194.474861] task: ffff8fdd20858000 task.stack: ffffb99d40790000 [ 1194.488000] RIP: 0010:super_written+0x29/0xe1 [ 1194.499688] RSP: 0018:ffff8ffb7fcc3c78 EFLAGS: 00010046 [ 1194.512477] RAX: 0000000000000000 RBX: ffff8ffb7bf4a000 RCX: ffff8ffb78991048 [ 1194.527325] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8ffb56b8a200 [ 1194.542576] RBP: ffff8ffb7fcc3c90 R08: 000000000000000b R09: 0000000000000000 [ 1194.558001] R10: ffff8ffb56b8a298 R11: 0000000000000000 R12: ffff8ffb56b8a200 [ 1194.573070] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 1194.588117] FS: 0000000000000000(0000) GS:ffff8ffb7fcc0000(0000) knlGS:0000000000000000 [ 1194.604264] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1194.617375] CR2: 00000000000002b8 CR3: 00000021e040a002 CR4: 00000000007606e0 [ 1194.632327] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1194.647865] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1194.663316] PKRU: 55555554 [ 1194.674090] Call Trace: [ 1194.683735] [ 1194.692948] bio_endio+0xae/0x135 [ 1194.703580] blk_update_request+0xad/0x2fa [ 1194.714990] blk_update_bidi_request+0x20/0x72 [ 1194.726578] __blk_end_bidi_request+0x2c/0x4d [ 1194.738373] __blk_end_request_all+0x31/0x49 [ 1194.749344] blk_flush_complete_seq+0x377/0x383 [ 1194.761550] flush_end_io+0x1dd/0x2a7 [ 1194.772910] blk_finish_request+0x9f/0x13c [ 1194.784544] scsi_end_request+0x180/0x25c [ 1194.796149] scsi_io_completion+0xc8/0x610 [ 1194.807503] scsi_finish_command+0xdc/0x125 [ 1194.818897] scsi_softirq_done+0x81/0xde [ 1194.830062] blk_done_softirq+0xa4/0xcc [ 1194.841008] __do_softirq+0xd9/0x29f [ 1194.851257] irq_exit+0xe6/0xeb [ 1194.861290] do_IRQ+0x59/0xe3 [ 1194.871060] common_interrupt+0x1c6/0x382 [ 1194.881988] [ 1194.890646] RIP: 0010:cpuidle_enter_state+0xdd/0x2a5 [ 1194.902532] RSP: 0018:ffffb99d40793e68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff43 [ 1194.917317] RAX: ffff8ffb7fce27c0 RBX: ffff8ffb7fced800 RCX: 000000000000001f [ 1194.932056] RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000000 [ 1194.946428] RBP: ffffb99d40793ea0 R08: 0000000000000004 R09: 0000000000002ed2 [ 1194.960508] R10: 0000000000002664 R11: 0000000000000018 R12: 0000000000000003 [ 1194.974454] R13: 000000000000000b R14: ffffffff925715a0 R15: 0000011610120d5a [ 1194.988607] ? cpuidle_enter_state+0xcc/0x2a5 [ 1194.999077] cpuidle_enter+0x17/0x19 [ 1195.008395] call_cpuidle+0x23/0x3a [ 1195.017718] do_idle+0x172/0x1d5 [ 1195.026358] cpu_startup_entry+0x73/0x75 [ 1195.035769] start_secondary+0x1b9/0x20b [ 1195.044894] secondary_startup_64+0xa5/0xa5 [ 1195.084921] RIP: super_written+0x29/0xe1 RSP: ffff8ffb7fcc3c78 [ 1195.096354] CR2: 00000000000002b8 bio in the above stack is a bitmap write whose completion is invoked after the tear down sequence sets the mddev structure to NULL in rdev. During tear down, there is an attempt to flush the bitmap writes, but for external bitmaps, there is no explicit wait for all the bitmap writes to complete. For instance, md_bitmap_flush() is called to flush the bitmap writes, but the last call to md_bitmap_daemon_work() in md_bitmap_flush() could generate new bitmap writes for which there is no explicit wait to complete those writes. The call to md_bitmap_update_sb() will return simply for external bitmaps and the follow-up call to md_update_sb() is conditional and may not get called for external bitmaps. This results in a kernel panic when the completion routine, super_written() is called which tries to reference mddev in the rdev that has been set to NULL(in unbind_rdev_from_array() by tear down sequence). The solution is to call md_super_wait() for external bitmaps after the last call to md_bitmap_daemon_work() in md_bitmap_flush() to ensure there are no pending bitmap writes before proceeding with the tear down. Cc: stable@vger.kernel.org Signed-off-by: Sudhakar Panneerselvam Reviewed-by: Zhao Heming Signed-off-by: Song Liu commit 0d809b3837a0bede8f58a67e303e339585777bf4 Author: Christoph Hellwig Date: Mon Apr 12 10:05:30 2021 +0200 md: do not return existing mddevs from mddev_find_or_alloc Instead of returning an existing mddev, just for it to be discarded later directly return -EEXIST. Rename the function to mddev_alloc now that it doesn't find an existing mddev. Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu commit d144fe6ff176d79efd411e520103a99e11874c36 Author: Christoph Hellwig Date: Mon Apr 12 10:05:29 2021 +0200 md: refactor mddev_find_or_alloc Allocate the new mddev first speculatively, which greatly simplifies the code flow. Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu commit 85c8c3c1f8d9e31f626c93435dd91c2f85603e07 Author: Christoph Hellwig Date: Mon Apr 12 10:05:28 2021 +0200 md: factor out a mddev_alloc_unit helper from mddev_find Split out a self contained helper to find a free minor for the md "unit" number. Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu commit eea1d18e9b2d959df908746b193f66dba3078473 Author: Ranjani Sridharan Date: Thu Apr 15 11:21:07 2021 -0500 ASoC: SOF: use current DAI config during resume Recently, the sof_pcm_dai_link_fixup() function was updated to match SSP config with the PCM hw_params and set the current_config for the DAI widget. But the sof_restore_pipelines() function still chooses the default config for the DAI widget upon resuming. Fix this to use the last used config when setting up the DAI widget during resume. Fixes: c943a586f6e49 ("ASoC: SOF: match SSP config with pcm hw params") Reviewed-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210415162107.130963-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6c377b02a801801b04ec6e5f9a921fca83ff9e54 Merge: 657f1d86a38e4 c3171e94cc1cd Author: Paolo Bonzini Date: Thu Apr 15 13:02:13 2021 -0400 Merge tag 'kvm-s390-next-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: Updates for 5.13 - properly handle MVPG in nesting KVM (vsie) - allow to forward the yield_to hypercall (diagnose 9c) - fixes commit a523ef731ac6674dc07574f31bf44cc5bfa14e4d Author: Lukasz Majczak Date: Thu Apr 15 14:43:47 2021 +0200 ASoC: Intel: kbl_da7219_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. Based on similar fix in kbl_rt5663_rt5514_max98927.c from Harsha Priya and Vamshi Krishna Gopal Cc: # 5.4+ Signed-off-by: Lukasz Majczak Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210415124347.475432-1-lma@semihalf.com Signed-off-by: Mark Brown commit 620f7c08d9852e7972b9935e383904141e55f5bf Merge: 22ff9c4230bd0 ae0727ab77419 Author: Mark Brown Date: Thu Apr 15 18:00:52 2021 +0100 Merge series "ASoC: simple-card/audio-graph: adjust to multi CPU/Codec" from Kuninori Morimoto : Hi Mark These patches adjusts to multi CPU/Codec on simple-card / audio-graph. This is part of prepare for new audio-graph-card2. Kuninori Morimoto (5): ASoC: simple-card: remove unused variable from simple_parse_of() ASoC: simple-card: use asoc_link_to_xxx() macro ASoC: simple-card: use simple_props_to_xxx() macro ASoC: audio-graph: use asoc_link_to_xxx() macro ASoC: audio-graph: use simple_props_to_xxx() macro sound/soc/generic/audio-graph-card.c | 43 +++++++++++++----------- sound/soc/generic/simple-card.c | 50 +++++++++++++--------------- 2 files changed, 47 insertions(+), 46 deletions(-) -- 2.25.1 commit b2197a36c0ef5b35a0ed83de744610a462da1ad3 Author: Christoph Hellwig Date: Tue Apr 13 11:15:12 2021 -0700 xfs: remove XFS_IFEXTENTS The in-memory XFS_IFEXTENTS is now only used to check if an inode with extents still needs the extents to be read into memory before doing operations that need the extent map. Add a new xfs_need_iread_extents helper that returns true for btree format forks that do not have any entries in the in-memory extent btree, and use that instead of checking the XFS_IFEXTENTS flag. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0779f4a68d4df539a7ea624f7e1560f48aa46ad9 Author: Christoph Hellwig Date: Tue Apr 13 11:15:11 2021 -0700 xfs: remove XFS_IFINLINE Just check for an inline format fork instead of the using the equivalent in-memory XFS_IFINLINE flag. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ac1e067211d1476dae304e8881c10b40c90614d5 Author: Christoph Hellwig Date: Tue Apr 13 11:15:11 2021 -0700 xfs: remove XFS_IFBROOT Just check for a btree format fork instead of the using the equivalent in-memory XFS_IFBROOT flag. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0eba048dd3b73fab6c97742468176dff58650860 Author: Christoph Hellwig Date: Tue Apr 13 11:15:10 2021 -0700 xfs: only look at the fork format in xfs_idestroy_fork Stop using the XFS_IFEXTENTS flag, and instead switch on the fork format in xfs_idestroy_fork to decide how to cleanup. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 605e74e29218bb22edd5ddcf90a4d37df00446cc Author: Christoph Hellwig Date: Tue Apr 13 11:15:10 2021 -0700 xfs: simplify xfs_attr_remove_args Directly return from the subfunctions and avoid the error variable. Also remove the not really needed dp local variable. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2ac131df03d4f06bb0d825335663cc5064421993 Author: Christoph Hellwig Date: Tue Apr 13 11:15:10 2021 -0700 xfs: rename and simplify xfs_bmap_one_block xfs_bmap_one_block is only called for the attribute fork. Move it to xfs_attr.c, drop the unused whichfork argument and code only executed for the data fork and rename the result to xfs_attr_is_leaf. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 862a804aae3031e91bd0ae0b13c90a1b13d77af3 Author: Christoph Hellwig Date: Tue Apr 13 11:15:09 2021 -0700 xfs: move the XFS_IFEXTENTS check into xfs_iread_extents Move the XFS_IFEXTENTS check from the callers into xfs_iread_extents to simplify the code. Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2c88d45edbb89029c1190bb3b136d2602f057c98 Author: Alison Schofield Date: Wed Mar 10 11:02:33 2021 -0800 x86, sched: Treat Intel SNC topology as default, COD as exception Commit 1340ccfa9a9a ("x86,sched: Allow topologies where NUMA nodes share an LLC") added a vendor and model specific check to never call topology_sane() for Intel Skylake Server systems where NUMA nodes share an LLC. Intel Ice Lake and Sapphire Rapids CPUs also enumerate an LLC that is shared by multiple NUMA nodes. The LLC on these CPUs is shared for off-package data access but private to the NUMA node for on-package access. Rather than managing a list of allowable SNC topologies, make this SNC topology the default, and treat Intel's Cluster-On-Die (COD) topology as the exception. In SNC mode, Sky Lake, Ice Lake, and Sapphire Rapids servers do not emit this warning: sched: CPU #3's llc-sibling CPU #0 is not on the same node! [node: 1 != 0]. Ignoring dependency. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Alison Schofield Signed-off-by: Peter Zijlstra (Intel) Acked-by: Dave Hansen Cc: stable@vger.kernel.org Link: https://lkml.kernel.org/r/20210310190233.31752-1-alison.schofield@intel.com commit 049ae601f3fb3d5b1c1efdb434499770c96237f6 Author: Randy Dunlap Date: Sun Apr 11 17:55:28 2021 -0700 security: commoncap: clean up kernel-doc comments Fix kernel-doc notation in commoncap.c. Use correct (matching) function name in comments as in code. Use correct function argument names in kernel-doc comments. Use kernel-doc's "Return:" format for function return values. Fixes these kernel-doc warnings: ../security/commoncap.c:1206: warning: expecting prototype for cap_task_ioprio(). Prototype was for cap_task_setioprio() instead ../security/commoncap.c:1219: warning: expecting prototype for cap_task_ioprio(). Prototype was for cap_task_setnice() instead Signed-off-by: Randy Dunlap Reviewed-by: Serge Hallyn Signed-off-by: James Morris commit 979a265264d18eca756319daeb2b583ac39158bb Merge: a2387e0a1315a d3debfcc4e3f6 Author: Marc Zyngier Date: Thu Apr 15 17:05:27 2021 +0100 Merge branch 'kvm-arm64/nvhe-panic-info' into kvmarm-master/next Signed-off-by: Marc Zyngier commit d3debfcc4e3f65f1370ad4ca2ab61e7f0ff683cd Author: Marc Zyngier Date: Wed Apr 14 17:41:14 2021 +0100 bug: Provide dummy version of bug_get_file_line() when !GENERIC_BUG Provide the missing dummy bug_get_file_line() implementation when GENENERIC_BUG isn't selected. Reported-by: kernel test robot Fixes: 26dbc7e299c7 ("bug: Factor out a getter for a bug's file line") Cc: Andrew Scull Signed-off-by: Marc Zyngier commit 4da6d76fb43994e558ceb82619a776e300a35e08 Author: Andy Shevchenko Date: Wed Apr 14 15:53:10 2021 +0300 PM: wakeup: use dev_set_name() directly We have open coded dev_set_name() implementation, replace that with a direct call. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 3e5ee32392efd00399d038cdad07478237d9a9f1 Author: Heiko Carstens Date: Tue Apr 13 15:30:32 2021 +0200 s390/atomic,cmpxchg: make constraints work with old compilers Old gcc versions may fail with an internal compiler error if only the T or S constraint is specified for an operand, and no displacement is needed at all. To fix this use RT and QS as constraints, which reflects the union of both. Later gcc versions do the right thing and always accept single T and S constraints. See gcc commit 3e4be43f69da ("S/390: Memory constraint cleanup"). Fixes: ca897bb1814f ("s390/atomic: use proper constraints") Fixes: b23eb636d7f9 ("s390/atomic: get rid of gcc atomic builtins") Fixes: d2b1f6d2d350 ("s390/cmpxchg: get rid of gcc atomic builtins") Signed-off-by: Heiko Carstens commit 5d8da6951ee2b2f7785ead62f785f3b3dd254104 Author: Vasily Gorbik Date: Tue Apr 13 13:28:50 2021 +0200 s390/test_unwind: print test suite start/end info Add couple of additional info lines to make it easier to match test suite output and results. Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 13525f0a62cc258b2b2266478cc5fec0a45d1e71 Author: Heiko Carstens Date: Tue Apr 13 11:23:30 2021 +0200 s390/cmpxchg: use unsigned long values instead of void pointers gcc and clang warn about incompatible pointer types due to the recent cmpxchg changes: drivers/gpu/drm/drm_lock.c:75:10: error: passing 'typeof (lock)' (aka 'volatile unsigned int *') to parameter of type 'void *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] prev = cmpxchg(lock, old, new); ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/atomic-instrumented.h:1685:2: note: expanded from macro 'cmpxchg' arch_cmpxchg(__ai_ptr, __VA_ARGS__); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To avoid this simply cast pointers to unsigned long and use them instead of void pointers. This allows to stay with functions, instead of using complex defines and having to deal with all their potential side effects. Reported-by: kernel test robot Fixes: d2b1f6d2d350 ("s390/cmpxchg: get rid of gcc atomic builtins") Link: https://lore.kernel.org/linux-s390/202104130131.sMmSqpb5-lkp@intel.com/ Signed-off-by: Heiko Carstens commit 58eaa7b2d07d3c25e1068b0bf42ca7e7464f4bca Author: Dinghao Liu Date: Thu Apr 15 15:46:44 2021 +0800 spi: spi-zynqmp-gqspi: Fix runtime PM imbalance in zynqmp_qspi_probe There is a PM usage counter decrement after zynqmp_qspi_init_hw() without any refcount increment, which leads to refcount leak.Add a refcount increment to balance the refcount. Also set auto_runtime_pm to resume suspended spi controller. Fixes: 9e3a000362aec ("spi: zynqmp: Add pm runtime support") Signed-off-by: Dinghao Liu Tested-by: Quanyang Wang Link: https://lore.kernel.org/r/20210415074644.24646-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown commit d6371415517700ae225dd1aaa8a35a86a659ada6 Author: Krzysztof Kozlowski Date: Wed Apr 14 22:33:43 2021 +0200 spi: s3c64xx: constify driver/match data The match data (struct s3c64xx_spi_port_config) stored in of_device_id and platform_device_id tables is not modified by the driver and can be handled entirely in a const-way to increase the code safety. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20210414203343.203119-3-krzysztof.kozlowski@canonical.com Signed-off-by: Mark Brown commit 7d712f799a938b37d24359ea836f58866be5e0bb Author: Krzysztof Kozlowski Date: Wed Apr 14 22:33:42 2021 +0200 spi: s3c64xx: correct kerneldoc of s3c64xx_spi_port_config Correct the name of s3c64xx_spi_port_config structure in kerneldoc: drivers/spi/spi-s3c64xx.c:154: warning: expecting prototype for struct s3c64xx_spi_info. Prototype was for struct s3c64xx_spi_port_config instead Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20210414203343.203119-2-krzysztof.kozlowski@canonical.com Signed-off-by: Mark Brown commit 609a2f9529d3d3e627776614b6cff34b21f64144 Author: Krzysztof Kozlowski Date: Wed Apr 14 22:33:41 2021 +0200 spi: s3c64xx: simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller and to remove the of_device_id table forward declaration. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20210414203343.203119-1-krzysztof.kozlowski@canonical.com Signed-off-by: Mark Brown commit 22ff9c4230bd09ade8971c05463b90ec1d513245 Author: Guangqing Zhu Date: Thu Apr 15 15:38:29 2021 +0800 ASoC: codecs: wcd934x: Fix missing IRQF_ONESHOT as only threaded handler Coccinelle noticed: sound/soc/codecs/wcd934x.c:5041:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Guangqing Zhu Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210415073829.22750-1-zhuguangqing83@gmail.com Signed-off-by: Mark Brown commit ae0727ab77419d550d6f68b698ce37ef2bf315df Author: Kuninori Morimoto Date: Wed Apr 14 08:20:20 2021 +0900 ASoC: audio-graph: use simple_props_to_xxx() macro We shouldn't use dai_props->cpus/codecs directly, because these are array now to supporting multi CPU/Codec/Platform. This patch uses simple_props_to_xxx() macro for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0p5zs97.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7ed5920995cea34d66e4af00c7f468cc933251cf Author: Kuninori Morimoto Date: Wed Apr 14 08:20:15 2021 +0900 ASoC: audio-graph: use asoc_link_to_xxx() macro We shouldn't use dai_link->cpus/codecs/platforms directly, because these are array now to supporting multi CPU/Codec/Platform. This patch uses asoc_link_to_xxx() macro for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lf9lzs9c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 2c33e20ffd68df097d61fad9b87dc6276354b139 Author: Kuninori Morimoto Date: Wed Apr 14 08:20:10 2021 +0900 ASoC: simple-card: use simple_props_to_xxx() macro We shouldn't use dai_props->cpus/codecs directly, because these are array now to supporting multi CPU/Codec/Platform. This patch uses simple_props_to_xxx() macro for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mtu1zs9i.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5bb5ac71e3f4f85500b96ea03e54bf6e2d8be3f2 Author: Kuninori Morimoto Date: Wed Apr 14 08:20:04 2021 +0900 ASoC: simple-card: use asoc_link_to_xxx() macro We shouldn't use dai_link->cpus/codecs/platforms directly, because these are array now to supporting multi CPU/Codec/Platform. This patch uses asoc_link_to_xxx() macro for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8ehzs9n.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8cbea89e2fba2f92937cd15211490b62f14a46ff Author: Kuninori Morimoto Date: Wed Apr 14 08:19:55 2021 +0900 ASoC: simple-card: remove unused variable from simple_parse_of() commit d9ffff696c5b4 ("ASoC: simple-card: Use snd_soc_of_parse_aux_devs()") switched to use snd_soc_of_parse_aux_devs() on simple_parse_of(). Thus noone is using *top anymore. Let's cleanup unused variable. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pmyxzs9w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8c4ffe4d023d7a3153c1d3d1084d98d17bf684b9 Author: Jarkko Nikula Date: Thu Apr 15 16:59:17 2021 +0300 spi: pxa2xx: Add support for Intel Alder Lake PCH-M Add support for LPSS SPI on Intel Alder Lake PCH-M. Signed-off-by: Jarkko Nikula Link: https://lore.kernel.org/r/20210415135917.54144-1-jarkko.nikula@linux.intel.com Signed-off-by: Mark Brown commit 84b6269c3c28b920088d4d5ae3723dc740221ae9 Author: Joerg Roedel Date: Thu Apr 15 16:44:42 2021 +0200 iommu/fsl-pamu: Fix uninitialized variable warning The variable 'i' in the function update_liodn_stash() is not initialized and only used in a debug printk(). So it has no meaning at all, remove it. Reported-by: kernel test robot Signed-off-by: Joerg Roedel Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210415144442.25103-1-joro@8bytes.org commit 38c527aeb41926c71902dd42f788a8b093b21416 Author: Longpeng(Mike) Date: Thu Apr 15 08:46:28 2021 +0800 iommu/vt-d: Force to flush iotlb before creating superpage The translation caches may preserve obsolete data when the mapping size is changed, suppose the following sequence which can reveal the problem with high probability. 1.mmap(4GB,MAP_HUGETLB) 2. while (1) { (a) DMA MAP 0,0xa0000 (b) DMA UNMAP 0,0xa0000 (c) DMA MAP 0,0xc0000000 * DMA read IOVA 0 may failure here (Not present) * if the problem occurs. (d) DMA UNMAP 0,0xc0000000 } The page table(only focus on IOVA 0) after (a) is: PML4: 0x19db5c1003 entry:0xffff899bdcd2f000 PDPE: 0x1a1cacb003 entry:0xffff89b35b5c1000 PDE: 0x1a30a72003 entry:0xffff89b39cacb000 PTE: 0x21d200803 entry:0xffff89b3b0a72000 The page table after (b) is: PML4: 0x19db5c1003 entry:0xffff899bdcd2f000 PDPE: 0x1a1cacb003 entry:0xffff89b35b5c1000 PDE: 0x1a30a72003 entry:0xffff89b39cacb000 PTE: 0x0 entry:0xffff89b3b0a72000 The page table after (c) is: PML4: 0x19db5c1003 entry:0xffff899bdcd2f000 PDPE: 0x1a1cacb003 entry:0xffff89b35b5c1000 PDE: 0x21d200883 entry:0xffff89b39cacb000 (*) Because the PDE entry after (b) is present, it won't be flushed even if the iommu driver flush cache when unmap, so the obsolete data may be preserved in cache, which would cause the wrong translation at end. However, we can see the PDE entry is finally switch to 2M-superpage mapping, but it does not transform to 0x21d200883 directly: 1. PDE: 0x1a30a72003 2. __domain_mapping dma_pte_free_pagetable Set the PDE entry to ZERO Set the PDE entry to 0x21d200883 So we must flush the cache after the entry switch to ZERO to avoid the obsolete info be preserved. Cc: David Woodhouse Cc: Lu Baolu Cc: Nadav Amit Cc: Alex Williamson Cc: Joerg Roedel Cc: Kevin Tian Cc: Gonglei (Arei) Fixes: 6491d4d02893 ("intel-iommu: Free old page tables before creating superpage") Cc: # v3.0+ Link: https://lore.kernel.org/linux-iommu/670baaf8-4ff8-4e84-4be3-030b95ab5a5e@huawei.com/ Suggested-by: Lu Baolu Signed-off-by: Longpeng(Mike) Acked-by: Lu Baolu Link: https://lore.kernel.org/r/20210415004628.1779-1-longpeng2@huawei.com Signed-off-by: Joerg Roedel commit 70c5307564035c160078401f541c397d77b95415 Author: Vasily Averin Date: Thu Apr 15 15:00:58 2021 +0300 nfsd: removed unused argument in nfsd_startup_generic() Since commit 501cb1849f86 ("nfsd: rip out the raparms cache") nrservs is not used in nfsd_startup_generic() Signed-off-by: Vasily Averin Signed-off-by: Chuck Lever commit 363f8dd5eecd6c67fe9840ef6065440f0ee7df3a Author: Jiapeng Chong Date: Thu Apr 15 16:38:24 2021 +0800 nfsd: remove unused function Fix the following clang warning: fs/nfsd/nfs4state.c:6276:1: warning: unused function 'end_offset' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Chuck Lever commit 304c73ba69459d4c18c2a4b843be6f5777b4b85c Author: Paul Menzel Date: Mon Apr 12 20:01:41 2021 +0200 iommu/amd: Put newline after closing bracket in warning Currently, on the Dell OptiPlex 5055 the EFR mismatch warning looks like below. [ 1.479774] smpboot: CPU0: AMD Ryzen 5 PRO 1500 Quad-Core Processor (family: 0x17, model: 0x1, stepping: 0x1) […] [ 2.507370] AMD-Vi: [Firmware Warn]: EFR mismatch. Use IVHD EFR (0xf77ef22294ada : 0x400f77ef22294ada ). Add the newline after the `).`, so it’s on one line. Fixes: a44092e326d4 ("iommu/amd: Use IVHD EFR for early initialization of IOMMU features") Cc: iommu@lists.linux-foundation.org Cc: Suravee Suthikulpanit Cc: Brijesh Singh Cc: Robert Richter Signed-off-by: Paul Menzel Link: https://lore.kernel.org/r/20210412180141.29605-1-pmenzel@molgen.mpg.de Signed-off-by: Joerg Roedel commit 745610c4a3e3baaebf6d1f8cd5b4d82892432520 Author: Christophe JAILLET Date: Sun Apr 11 09:08:17 2021 +0200 iommu/vt-d: Fix an error handling path in 'intel_prepare_irq_remapping()' If 'intel_cap_audit()' fails, we should return directly, as already done in the surrounding error handling path. Fixes: ad3d19029979 ("iommu/vt-d: Audit IOMMU Capabilities and add helper functions") Signed-off-by: Christophe JAILLET Acked-by: Lu Baolu Link: https://lore.kernel.org/r/98d531caabe66012b4fffc7813fd4b9470afd517.1618124777.git.christophe.jaillet@wanadoo.fr Signed-off-by: Joerg Roedel commit 906f86c860304e84c36cd4c42a6a73928c4ed74c Author: Lu Baolu Date: Sun Apr 11 14:23:12 2021 +0800 iommu/vt-d: Fix build error of pasid_enable_wpe() with !X86 Commit f68c7f539b6e9 ("iommu/vt-d: Enable write protect for supervisor SVM") added pasid_enable_wpe() which hit below compile error with !X86. ../drivers/iommu/intel/pasid.c: In function 'pasid_enable_wpe': ../drivers/iommu/intel/pasid.c:554:22: error: implicit declaration of function 'read_cr0' [-Werror=implicit-function-declaration] 554 | unsigned long cr0 = read_cr0(); | ^~~~~~~~ In file included from ../include/linux/build_bug.h:5, from ../include/linux/bits.h:22, from ../include/linux/bitops.h:6, from ../drivers/iommu/intel/pasid.c:12: ../drivers/iommu/intel/pasid.c:557:23: error: 'X86_CR0_WP' undeclared (first use in this function) 557 | if (unlikely(!(cr0 & X86_CR0_WP))) { | ^~~~~~~~~~ ../include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ ../drivers/iommu/intel/pasid.c:557:23: note: each undeclared identifier is reported only once for each function it appears in 557 | if (unlikely(!(cr0 & X86_CR0_WP))) { | ^~~~~~~~~~ ../include/linux/compiler.h:78:42: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | Add the missing dependency. Cc: Sanjay Kumar Cc: Jacob Pan Cc: Randy Dunlap Reported-by: kernel test robot Reported-by: Randy Dunlap Fixes: f68c7f539b6e9 ("iommu/vt-d: Enable write protect for supervisor SVM") Signed-off-by: Lu Baolu Acked-by: Randy Dunlap # build-tested Link: https://lore.kernel.org/r/20210411062312.3057579-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 994d6608efe4a4c8834bdc5014c86f4bc6aceea6 Author: Suravee Suthikulpanit Date: Fri Apr 9 03:58:48 2021 -0500 iommu/amd: Remove performance counter pre-initialization test In early AMD desktop/mobile platforms (during 2013), when the IOMMU Performance Counter (PMC) support was first introduced in commit 30861ddc9cca ("perf/x86/amd: Add IOMMU Performance Counter resource management"), there was a HW bug where the counters could not be accessed. The result was reading of the counter always return zero. At the time, the suggested workaround was to add a test logic prior to initializing the PMC feature to check if the counters can be programmed and read back the same value. This has been working fine until the more recent desktop/mobile platforms start enabling power gating for the PMC, which prevents access to the counters. This results in the PMC support being disabled unnecesarily. Unfortunatly, there is no documentation of since which generation of hardware the original PMC HW bug was fixed. Although, it was fixed soon after the first introduction of the PMC. Base on this, we assume that the buggy platforms are less likely to be in used, and it should be relatively safe to remove this legacy logic. Link: https://lore.kernel.org/linux-iommu/alpine.LNX.3.20.13.2006030935570.3181@monopod.intra.ispras.ru/ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201753 Cc: Tj (Elloe Linux) Cc: Shuah Khan Cc: Alexander Monakov Cc: David Coe Cc: Paul Menzel Signed-off-by: Suravee Suthikulpanit Tested-by: Shuah Khan Link: https://lore.kernel.org/r/20210409085848.3908-3-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit 715601e4e36903a653cd4294dfd3ed0019101991 Author: Paul Menzel Date: Fri Apr 9 03:58:47 2021 -0500 Revert "iommu/amd: Fix performance counter initialization" This reverts commit 6778ff5b21bd8e78c8bd547fd66437cf2657fd9b. The original commit tries to address an issue, where PMC power-gating causing the IOMMU PMC pre-init test to fail on certain desktop/mobile platforms where the power-gating is normally enabled. There have been several reports that the workaround still does not guarantee to work, and can add up to 100 ms (on the worst case) to the boot process on certain platforms such as the MSI B350M MORTAR with AMD Ryzen 3 2200G. Therefore, revert this commit as a prelude to removing the pre-init test. Link: https://lore.kernel.org/linux-iommu/alpine.LNX.3.20.13.2006030935570.3181@monopod.intra.ispras.ru/ Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201753 Cc: Tj (Elloe Linux) Cc: Shuah Khan Cc: Alexander Monakov Cc: David Coe Signed-off-by: Paul Menzel Signed-off-by: Suravee Suthikulpanit Link: https://lore.kernel.org/r/20210409085848.3908-2-suravee.suthikulpanit@amd.com Signed-off-by: Joerg Roedel commit 45ed93374a3a66ed35412f18fa356b3550c9f622 Author: Shaokun Zhang Date: Fri Apr 9 11:30:40 2021 +0800 iommu/amd: Remove duplicate check of devid 'devid' has been checked in function check_device, no need to double check and clean up this. Cc: Joerg Roedel Cc: Will Deacon Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1617939040-35579-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Joerg Roedel commit d0272ea1839b2fd013f11289c22166005ef774ce Author: Krzysztof Kozlowski Date: Thu Apr 8 22:16:22 2021 +0200 iommu/exynos: Remove unneeded local variable initialization The initialization of 'fault_addr' local variable is not needed as it is shortly after overwritten. Addresses-Coverity: Unused value Signed-off-by: Krzysztof Kozlowski Acked-by: Marek Szyprowski Link: https://lore.kernel.org/r/20210408201622.78009-1-krzysztof.kozlowski@canonical.com Signed-off-by: Joerg Roedel commit 44bada28219031f9e8e86b84460606efa57b871e Author: Heiko Carstens Date: Thu Apr 15 10:01:27 2021 +0200 KVM: s390: fix guarded storage control register handling store_regs_fmt2() has an ordering problem: first the guarded storage facility is enabled on the local cpu, then preemption disabled, and then the STGSC (store guarded storage controls) instruction is executed. If the process gets scheduled away between enabling the guarded storage facility and before preemption is disabled, this might lead to a special operation exception and therefore kernel crash as soon as the process is scheduled back and the STGSC instruction is executed. Fixes: 4e0b1ab72b8a ("KVM: s390: gs support for kvm guests") Signed-off-by: Heiko Carstens Reviewed-by: Christian Borntraeger Reviewed-by: David Hildenbrand Reviewed-by: Janosch Frank Reviewed-by: Cornelia Huck Cc: # 4.12 Link: https://lore.kernel.org/r/20210415080127.1061275-1-hca@linux.ibm.com Signed-off-by: Christian Borntraeger commit a27a8816568964fcef62a3ae5f9d2228ec1ebc68 Merge: 604df13d7aada b90e483938ce3 Author: Catalin Marinas Date: Thu Apr 15 14:00:48 2021 +0100 Merge branch 'for-next/pac-set-get-enabled-keys' into for-next/core * for-next/pac-set-get-enabled-keys: : Introduce arm64 prctl(PR_PAC_{SET,GET}_ENABLED_KEYS). arm64: pac: Optimize kernel entry/exit key installation code paths arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) arm64: mte: make the per-task SCTLR_EL1 field usable elsewhere commit 604df13d7aadae6902d3b7f03a35bb21d887f0cf Merge: a1e1eddef2b5b e80a76aa1a910 Author: Catalin Marinas Date: Thu Apr 15 14:00:47 2021 +0100 Merge branch 'for-next/mte-async-kernel-mode' into for-next/core * for-next/mte-async-kernel-mode: : Add MTE asynchronous kernel mode support kasan, arm64: tests supports for HW_TAGS async mode arm64: mte: Report async tag faults before suspend arm64: mte: Enable async tag check fault arm64: mte: Conditionally compile mte_enable_kernel_*() arm64: mte: Enable TCO in functions that can read beyond buffer limits kasan: Add report for async mode arm64: mte: Drop arch_enable_tagging() kasan: Add KASAN mode kernel parameter arm64: mte: Add asynchronous mode support commit a1e1eddef2b5b6d81071e18879ce7d05011cf87a Merge: 087dfa5ca7d89 314bcbf09f147 59511cfd08f32 6e554abd07002 3889ba70102ed 18107f8a2df6b acc3042d62cb9 230800cd315cd 2d726d0db6ac4 2c2e21e78a945 13150149aa6de Author: Catalin Marinas Date: Thu Apr 15 14:00:38 2021 +0100 Merge branches 'for-next/misc', 'for-next/kselftest', 'for-next/xntable', 'for-next/vdso', 'for-next/fiq', 'for-next/epan', 'for-next/kasan-vmalloc', 'for-next/fgt-boot-init', 'for-next/vhe-only' and 'for-next/neon-softirqs-disabled', remote-tracking branch 'arm64/for-next/perf' into for-next/core * for-next/misc: : Miscellaneous patches arm64/sve: Add compile time checks for SVE hooks in generic functions arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG. arm64/sve: Remove redundant system_supports_sve() tests arm64: mte: Remove unused mte_assign_mem_tag_range() arm64: Add __init section marker to some functions arm64/sve: Rework SVE access trap to convert state in registers docs: arm64: Fix a grammar error arm64: smp: Add missing prototype for some smp.c functions arm64: setup: name `tcr` register arm64: setup: name `mair` register arm64: stacktrace: Move start_backtrace() out of the header arm64: barrier: Remove spec_bar() macro arm64: entry: remove test_irqs_unmasked macro ARM64: enable GENERIC_FIND_FIRST_BIT arm64: defconfig: Use DEBUG_INFO_REDUCED * for-next/kselftest: : Various kselftests for arm64 kselftest: arm64: Add BTI tests kselftest/arm64: mte: Report filename on failing temp file creation kselftest/arm64: mte: Fix clang warning kselftest/arm64: mte: Makefile: Fix clang compilation kselftest/arm64: mte: Output warning about failing compiler kselftest/arm64: mte: Use cross-compiler if specified kselftest/arm64: mte: Fix MTE feature detection kselftest/arm64: mte: common: Fix write() warnings kselftest/arm64: mte: user_mem: Fix write() warning kselftest/arm64: mte: ksm_options: Fix fscanf warning kselftest/arm64: mte: Fix pthread linking kselftest/arm64: mte: Fix compilation with native compiler * for-next/xntable: : Add hierarchical XN permissions for all page tables arm64: mm: use XN table mapping attributes for user/kernel mappings arm64: mm: use XN table mapping attributes for the linear region arm64: mm: add missing P4D definitions and use them consistently * for-next/vdso: : Minor improvements to the compat vdso and sigpage arm64: compat: Poison the compat sigpage arm64: vdso: Avoid ISB after reading from cntvct_el0 arm64: compat: Allow signal page to be remapped arm64: vdso: Remove redundant calls to flush_dcache_page() arm64: vdso: Use GFP_KERNEL for allocating compat vdso and signal pages * for-next/fiq: : Support arm64 FIQ controller registration arm64: irq: allow FIQs to be handled arm64: Always keep DAIF.[IF] in sync arm64: entry: factor irq triage logic into macros arm64: irq: rework root IRQ handler registration arm64: don't use GENERIC_IRQ_MULTI_HANDLER genirq: Allow architectures to override set_handle_irq() fallback * for-next/epan: : Support for Enhanced PAN (execute-only permissions) arm64: Support execute-only permissions with Enhanced PAN * for-next/kasan-vmalloc: : Support CONFIG_KASAN_VMALLOC on arm64 arm64: Kconfig: select KASAN_VMALLOC if KANSAN_GENERIC is enabled arm64: kaslr: support randomized module area with KASAN_VMALLOC arm64: Kconfig: support CONFIG_KASAN_VMALLOC arm64: kasan: abstract _text and _end to KERNEL_START/END arm64: kasan: don't populate vmalloc area for CONFIG_KASAN_VMALLOC * for-next/fgt-boot-init: : Booting clarifications and fine grained traps setup arm64: Require that system registers at all visible ELs be initialized arm64: Disable fine grained traps on boot arm64: Document requirements for fine grained traps at boot * for-next/vhe-only: : Dealing with VHE-only CPUs (a.k.a. M1) arm64: Get rid of CONFIG_ARM64_VHE arm64: Cope with CPUs stuck in VHE mode arm64: cpufeature: Allow early filtering of feature override * arm64/for-next/perf: arm64: perf: Remove redundant initialization in perf_event.c perf/arm_pmu_platform: Clean up with dev_printk perf/arm_pmu_platform: Fix error handling perf/arm_pmu_platform: Use dev_err_probe() for IRQ errors docs: perf: Address some html build warnings docs: perf: Add new description on HiSilicon uncore PMU v2 drivers/perf: hisi: Add support for HiSilicon PA PMU driver drivers/perf: hisi: Add support for HiSilicon SLLC PMU driver drivers/perf: hisi: Update DDRC PMU for programmable counter drivers/perf: hisi: Add new functions for HHA PMU drivers/perf: hisi: Add new functions for L3C PMU drivers/perf: hisi: Add PMU version for uncore PMU drivers. drivers/perf: hisi: Refactor code for more uncore PMUs drivers/perf: hisi: Remove unnecessary check of counter index drivers/perf: Simplify the SMMUv3 PMU event attributes drivers/perf: convert sysfs sprintf family to sysfs_emit drivers/perf: convert sysfs scnprintf family to sysfs_emit_at() and sysfs_emit() drivers/perf: convert sysfs snprintf family to sysfs_emit * for-next/neon-softirqs-disabled: : Run kernel mode SIMD with softirqs disabled arm64: fpsimd: run kernel mode NEON with softirqs disabled arm64: assembler: introduce wxN aliases for wN registers arm64: assembler: remove conditional NEON yield macros commit 087dfa5ca7d89c3cf6f4e972e279406a5dee5f67 Author: Mark Brown Date: Thu Apr 15 13:17:42 2021 +0100 arm64/sve: Add compile time checks for SVE hooks in generic functions The FPSIMD code was relying on IS_ENABLED() checks in system_suppors_sve() to cause the compiler to delete references to SVE functions in some places, add explicit IS_ENABLED() checks back. Fixes: ef9c5d09797d ("arm64/sve: Remove redundant system_supports_sve() tests") Reported-by: kernel test robot Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210415121742.36628-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit 329328ec6a87f2c1275f50d979d55513de458409 Author: Dan Carpenter Date: Wed Apr 14 09:01:38 2021 +0300 drm/i915/gvt: Fix error code in intel_gvt_init_device() The intel_gvt_init_vgpu_type_groups() function is only called from intel_gvt_init_device(). If it fails then the intel_gvt_init_device() prints the error code and propagates it back again. That's a bug because false is zero/success. The fix is to modify it to return zero or negative error codes and make everything consistent. Fixes: c5d71cb31723 ("drm/i915/gvt: Move vGPU type related code into gvt file") Signed-off-by: Dan Carpenter Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/YHaFQtk/DIVYK1u5@mwanda Reviewed-by: Zhenyu Wang commit df2640b5b96ed09d0fb8d642de3334010060aa9a Author: Jiapeng Chong Date: Tue Apr 13 14:18:48 2021 +0800 drm/i915/gvt: remove useless function Fix the following clang warning: drivers/gpu/drm/i915/gvt/gtt.c:590:20: warning: unused function 'ppgtt_set_guest_root_entry' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/1618294728-78952-1-git-send-email-jiapeng.chong@linux.alibaba.com Reviewed-by: Zhenyu Wang commit e614740a063ff8a87930861674e64347d4b091ba Author: Krzysztof Kozlowski Date: Thu Apr 15 10:44:12 2021 +0200 mmc: sdhci-s3c: constify uses of driver/match data The driver data (struct sdhci_s3c_drv_data) stored in of_device_id table is allocated as const and used only in const-way. Skip unnecessary const-away casts and convert all users to work with pointer to const. This is both more logical and safer. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20210415084412.51125-3-krzysztof.kozlowski@canonical.com Signed-off-by: Ulf Hansson commit 90cdaa84c57dbf29e4a70d6e1204224f662f4873 Author: Krzysztof Kozlowski Date: Thu Apr 15 10:44:11 2021 +0200 mmc: sdhci-s3c: correct kerneldoc of sdhci_s3c_drv_data Correct the name of sdhci_s3c_drv_data structure in kerneldoc: drivers/mmc/host/sdhci-s3c.c:143: warning: expecting prototype for struct sdhci_s3c_driver_data. Prototype was for struct sdhci_s3c_drv_data instead Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20210415084412.51125-2-krzysztof.kozlowski@canonical.com Signed-off-by: Ulf Hansson commit 0ab53e498fa4c06145a62ade08633f5c4ecb9ee8 Author: Krzysztof Kozlowski Date: Thu Apr 15 10:44:10 2021 +0200 mmc: sdhci-s3c: simplify getting of_device_id match data Use of_device_get_match_data() to make the code slightly smaller and to remove the of_device_id table forward declaration. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20210415084412.51125-1-krzysztof.kozlowski@canonical.com Signed-off-by: Ulf Hansson commit 0751d56ef1f25c4206626dff99445db34dedf437 Author: Wolfram Sang Date: Tue Apr 13 10:31:37 2021 +0200 mmc: tmio: always restore irq register Currently, only SDHI on R-Car Gen2+ reinitializes the irq register during reset but it should be done on all instances. We can move it from the SDHI driver to the TMIO core, because we now have the 'sd_irq_mask_all' variable which carries the proper value to use. That also means we can remove the initialization from tmio_mmc_probe() because it calls tmio_mmc_reset(), too. We only move that tmio_mmc_reset() call there a little to ensure 'sd_irq_mask_all' is properly set. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210413083137.11171-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 9751bacc8c212eeb15b10231492840086ca719f3 Author: Ben Chuang Date: Thu Apr 15 11:26:37 2021 +0800 mmc: sdhci-pci-gli: Enlarge ASPM L1 entry delay of GL975x GL975x enters ASPM L1 state after a short idle in default. Enlarge the idle period to 7.9us for improving the R/W performance. Signed-off-by: Ben Chuang Link: https://lore.kernel.org/r/20210415032637.5219-1-benchuanggli@gmail.com Signed-off-by: Ulf Hansson commit 823b31517ad3196324322804ee365d5fcff704d6 Author: Guangqing Zhu Date: Thu Apr 15 17:14:35 2021 +0800 platform/x86: intel_chtdc_ti_pwrbtn: Fix missing IRQF_ONESHOT as only threaded handler Coccinelle noticed: drivers/platform/x86/intel_chtdc_ti_pwrbtn.c:59:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Guangqing Zhu Link: https://lore.kernel.org/r/20210415091435.10486-1-zhuguangqing83@gmail.com Tested-by: Hans de Goede Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5b96247c68d891ffdfd103315d04989e7feaa4ed Author: Bean Huo Date: Wed Apr 14 23:22:36 2021 +0200 mmc: core: Let eMMC sanitize not retry in case of timeout/failure Not all commands need to be retried in case of a timeout/failure. This is the case for the eMMC sanitize command, for example, which is issued through the ioctl interface. More precisely, in case of timeout, retrying could make the user wait for a very long time as each retry loop could last for a couple of minutes. Therefore, let's not use retries for the eMMC sanitize command. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20210414212236.346813-3-huobean@gmail.com Signed-off-by: Ulf Hansson commit 5e52a168be3775c06cce279b03d156efbad5478b Author: Bean Huo Date: Wed Apr 14 23:22:35 2021 +0200 mmc: core: Add a retries parameter to __mmc_switch function Add command retries parameter to __mmc_switch(), let caller pass retries according to the caller's condition. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20210414212236.346813-2-huobean@gmail.com Signed-off-by: Ulf Hansson commit 0b276e470a4d43e1365d3eb53c608a3d208cabd4 Author: Marco Felsch Date: Fri Mar 5 09:23:54 2021 +0100 media: coda: fix macroblocks count control usage Commit b2d3bef1aa78 ("media: coda: Add a V4L2 user for control error macroblocks count") add the control for the decoder devices. But during streamon() this ioctl gets called for all (encoder and decoder) devices and on encoder devices this causes a null pointer exception. Fix this by setting the control only if it is really accessible. Fixes: b2d3bef1aa78 ("media: coda: Add a V4L2 user for control error macroblocks count") Signed-off-by: Marco Felsch Cc: Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac746729178bd7c08bb7e5242df92bd01593a732 Author: Dafna Hirschfeld Date: Mon Mar 1 18:18:35 2021 +0100 media: rkisp1: params: fix wrong bits settings The histogram mode is set using 'rkisp1_params_set_bits'. Only the bits of the mode should be the value argument for that function. Otherwise bits outside the mode mask are turned on which is not what was intended. Fixes: bae1155cf579 ("media: staging: rkisp1: add output device for parameters") Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c0612265295bc7bbbc7189ab811192fe77be8196 Author: Robert Foss Date: Wed Mar 24 13:43:08 2021 +0100 dt-bindings: thermal: qcom-tsens: Add compatible for sm8350 Add tsens bindings for sm8350. Signed-off-by: Robert Foss Reviewed-by: Vinod Koul Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210324124308.1265626-1-robert.foss@linaro.org commit f4136863e8899fa0554343201b78b9e197c78a78 Author: Guangqing Zhu Date: Sun Apr 4 20:54:31 2021 +0800 thermal/drivers/tsens: Fix missing put_device error Fixes coccicheck error: drivers/thermal/qcom/tsens.c:759:4-10: ERROR: missing put_device; call of_find_device_by_node on line 715, but without a corresponding object release within this function. Fixes: a7ff82976122 ("drivers: thermal: tsens: Merge tsens-common.c into tsens.c") Signed-off-by: Guangqing Zhu Reviewed-by: Bjorn Andersson Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210404125431.12208-1-zhuguangqing83@gmail.com commit 5b5f1121d60bca8305951930d7aa2123fb213cb0 Author: Lukasz Luba Date: Wed Feb 17 11:59:08 2021 +0000 MAINTAINERS: update thermal CPU cooling section Update maintainers responsible for CPU cooling on Arm side. Signed-off-by: Lukasz Luba Acked-by: Viresh Kumar Acked-by: Javi Merino Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210217115908.22547-1-lukasz.luba@arm.com commit aa92b3310c55b21153ca1514719ff8d5dfe74bd7 Author: David Collins Date: Wed Jul 29 09:52:52 2020 -0700 thermal/drivers/qcom-spmi-temp-alarm: Add support for GEN2 rev 1 PMIC peripherals Add support for TEMP_ALARM GEN2 PMIC peripherals with digital major revision 1. This revision utilizes a different temperature threshold mapping than earlier revisions. Signed-off-by: David Collins Signed-off-by: Guru Das Srinagesh Reviewed-by: Stephen Boyd Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/69c90a004b3f5b7ae282f5ec5ca2920a48f23e02.1596040416.git.gurus@codeaurora.org commit 34ab17cc6c2c1ac93d7e5d53bb972df9a968f085 Author: brian-sy yang Date: Tue Dec 29 13:08:31 2020 +0800 thermal/drivers/cpufreq_cooling: Fix slab OOB issue Slab OOB issue is scanned by KASAN in cpu_power_to_freq(). If power is limited below the power of OPP0 in EM table, it will cause slab out-of-bound issue with negative array index. Return the lowest frequency if limited power cannot found a suitable OPP in EM table to fix this issue. Backtrace: [] die+0x104/0x5ac [] bug_handler+0x64/0xd0 [] brk_handler+0x160/0x258 [] do_debug_exception+0x248/0x3f0 [] el1_dbg+0x14/0xbc [] __kasan_report+0x1dc/0x1e0 [] kasan_report+0x10/0x20 [] __asan_report_load8_noabort+0x18/0x28 [] cpufreq_power2state+0x180/0x43c [] power_actor_set_power+0x114/0x1d4 [] allocate_power+0xaec/0xde0 [] power_allocator_throttle+0x3ec/0x5a4 [] handle_thermal_trip+0x160/0x294 [] thermal_zone_device_check+0xe4/0x154 [] process_one_work+0x5e4/0xe28 [] worker_thread+0xa4c/0xfac [] kthread+0x33c/0x358 [] ret_from_fork+0xc/0x18 Fixes: 371a3bc79c11b ("thermal/drivers/cpufreq_cooling: Fix wrong frequency converted from power") Signed-off-by: brian-sy yang Signed-off-by: Michael Kao Reviewed-by: Lukasz Luba Cc: stable@vger.kernel.org #v5.7 Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20201229050831.19493-1-michael.kao@mediatek.com commit 4481b39f9390e82c73fb03193b4a5e7e242d22a4 Author: Hao Fang Date: Tue Mar 30 14:45:33 2021 +0800 thermal/drivers/hisi: Use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g. It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1617086733-2705-1-git-send-email-fanghao11@huawei.com commit 957781612e44f9525a8c7ed52086ab4caaa301f6 Author: Konrad Dybcio Date: Fri Mar 19 23:08:01 2021 +0100 dt-bindings: tsens: qcom: Document MDM9607 compatible Add the compatible for MDM9607. Signed-off-by: Konrad Dybcio Signed-off-by: Daniel Lezcano Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319220802.198215-1-konrad.dybcio@somainline.org commit 6cc7b38c0ca3187abd07af849ec179b42337bcf6 Author: Daniel Lezcano Date: Fri Mar 19 21:25:22 2021 +0100 thermal/drivers/cpuidle_cooling: Fix use after error When the function successfully finishes it logs an information about the registration of the cooling device and use its name to build the message. Unfortunately it was freed right before: drivers/thermal/cpuidle_cooling.c:218 __cpuidle_cooling_register() warn: 'name' was already freed. Fix this by freeing after the message happened. Fixes: 6fd1b186d900 ("thermal/drivers/cpuidle_cooling: Use device name instead of auto-numbering") Reported-by: Dan Carpenter Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20210319202522.891061-1-daniel.lezcano@linaro.org commit 9aa80ab2c0ba67ce3281aee604b543293f71390d Author: Daniel Lezcano Date: Fri Mar 19 21:24:23 2021 +0100 thermal/drivers/devfreq_cooling: Fix wrong return on error path The following error is reported by kbuild: smatch warnings: drivers/thermal/devfreq_cooling.c:433 of_devfreq_cooling_register_power() warn: passing zero to 'ERR_PTR' Fix the error code by the setting the 'err' variable instead of 'cdev'. Fixes: f8d354e821b2 ("thermal/drivers/devfreq_cooling: Use device name instead of auto-numbering") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210319202424.890968-1-daniel.lezcano@linaro.org commit d44616c6cc3e35eea03ecfe9040edfa2b486a059 Author: Daniel Lezcano Date: Fri Mar 19 21:22:57 2021 +0100 thermal/core: Fix memory leak in the error path Fix the following error: smatch warnings: drivers/thermal/thermal_core.c:1020 __thermal_cooling_device_register() warn: possible memory leak of 'cdev' by freeing the cdev when exiting the function in the error path. Fixes: 584837618100 ("thermal/drivers/core: Use a char pointer for the cooling device name") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210319202257.890848-1-daniel.lezcano@linaro.org commit 147d211cc9b4d753148d1640a1758b25edfbf437 Author: Jernej Skrabec Date: Mon Apr 12 17:43:49 2021 +0200 media: cedrus: Fix H265 status definitions Some of the H265 status flags are wrong. Redefine them to corespond to Allwinner CedarC open source userspace library. Only one of these flags is actually used and new value also matches value used in libvdpau-sunxi library, which is proven to be working. Note that wrong (old) value in right circumstances (in combination with another H265 decoding bug) causes driver lock up. With this fix decoding is still broken (green output) but at least driver doesn't lock up. Fixes: 86caab29da78 ("media: cedrus: Add HEVC/H.265 decoding support") Signed-off-by: Jernej Skrabec Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 87e780db2253a1759822c2c9ea207135fcc059de Author: Neil Armstrong Date: Mon Apr 12 15:48:33 2021 +0200 media: meson-ge2d: fix rotation parameters With these settings, 90deg and 270deg rotation leads to inverted vertical, fix them to have correct rotation. Fixes: 59a635327ca7 ("media: meson: Add M2M driver for the Amlogic GE2D Accelerator Unit") Signed-off-by: Neil Armstrong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ac34b79da14d67a9b494f6125186becbd067e225 Author: Hans Verkuil Date: Mon Apr 12 13:51:23 2021 +0200 media: v4l2-ctrls: fix reference to freed memory When controls are used together with the Request API, then for each request a v4l2_ctrl_handler struct is allocated. This contains the controls that can be set in a request. If a control is *not* set in the request, then the value used in the most recent previous request must be used, or the current value if it is not found in any outstanding requests. The framework tried to find such a previous request and it would set the 'req' pointer in struct v4l2_ctrl_ref to the v4l2_ctrl_ref of the control in such a previous request. So far, so good. However, when that previous request was applied to the hardware, returned to userspace, and then userspace would re-init or free that request, any 'ref' pointer in still-queued requests would suddenly point to freed memory. This was not noticed before since the drivers that use this expected that each request would always have the controls set, so there was never any need to find a control in older requests. This requirement was relaxed, and now this bug surfaced. It was also made worse by changeset 2fae4d6aabc8 ("media: v4l2-ctrls: v4l2_ctrl_request_complete() should always set ref->req") which increased the chance of this happening. The use of the 'req' pointer in v4l2_ctrl_ref was very fragile, so drop this entirely. Instead add a valid_p_req bool to indicate that p_req contains a valid value for this control. And if it is false, then just use the current value of the control. Note that VIDIOC_G_EXT_CTRLS will always return -EACCES when attempting to get a control from a request until the request is completed. And in that case, all controls in the request will have the control value set (i.e. valid_p_req is true). This means that the whole 'find the most recent previous request containing a control' idea is pointless, and the code can be simplified considerably. The v4l2_g_ext_ctrls_common() function was refactored a bit to make it more understandable. It also avoids updating volatile controls in a completed request since that was already done when the request was completed. Signed-off-by: Hans Verkuil Fixes: 2fae4d6aabc8 ("media: v4l2-ctrls: v4l2_ctrl_request_complete() should always set ref->req") Fixes: 6fa6f831f095 ("media: v4l2-ctrls: add core request support") Cc: # for v5.9 and up Tested-by: Alexandre Courbot Signed-off-by: Mauro Carvalho Chehab commit d566e78dd6af957d021eb9550955777268fbc2f2 Author: Dikshita Agarwal Date: Mon Apr 12 10:05:08 2021 +0200 media: venus : hfi: add venus image info into smem Fill fw version info into smem to be printed as part of soc info. Signed-off-by: Dikshita Agarwal Reviewed-by: Stephen Boyd Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit e75b756fde0cf5b84f356566f813d01ab71e2b26 Author: Dikshita Agarwal Date: Wed Mar 17 09:35:28 2021 +0100 media: venus: Fix internal buffer size calculations for v6. - Update persist buffer size for encoder to 204800. - Update persist buffer size calculation for h264 decoder. - h264d level 6 support needs update in internal buffer size. update below buffers size - h264 decoder colocated motion vector buffer. - h264 decoder VPP command buffer. - h265 decoder VPP command buffer. - Update VP9_NUM_FRAME_INFO_BUF to 32. Signed-off-by: Dikshita Agarwal Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 7bf28a2153ea3cc8362d78a76e1bccf06ce7805d Author: Vikash Garodia Date: Wed Mar 31 11:28:22 2021 +0200 media: venus: helpers: keep max bandwidth when mbps exceeds the supported range When the video usecase have macro blocks per sec which is more than supported, keep the required bus bandwidth as the maximum supported. Signed-off-by: Vikash Garodia Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit bcf6b264a806295cd4578aa7a03b3bcb15b1ab30 Author: Mansur Alisha Shaik Date: Thu Apr 8 15:35:00 2021 +0200 media: venus: fix hw overload error log condition In current video driver, frequency is calculated for all the running video instances and check aganist maximum supported frequency. If both calculated frequency and maximum supported frequency are same, even then HW overload error is printed. Fix this by printing error log only when frequency is greater than maximum supported frequency. Signed-off-by: Mansur Alisha Shaik Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit fb2b008b00fe6fdd1888f08c0f3db199b52d6eb4 Author: Dmitry Baryshkov Date: Fri Apr 9 02:33:55 2021 +0200 media: venus: core: correct firmware name for sm8250 Firmware name for venus should be qcom/vpu-1.0/venus.mdt, not qcom/sm8250/venus.mdt. Signed-off-by: Dmitry Baryshkov Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 999267d07240f0a9d8a85c0521b311331081b605 Author: Colin Ian King Date: Wed Apr 7 15:48:31 2021 +0200 media: venus: core,pm: fix potential infinite loop The for-loop iterates with a u8 loop counter i and compares this with the loop upper limit of res->resets_num which is an unsigned int type. There is a potential infinite loop if res->resets_num is larger than the u8 loop counter i. Fix this by making the loop counter the same type as res->resets_num. Addresses-Coverity: ("Infinite loop") Fixes: 3bca43585e22 ("media: venus: core,pm: Add handling for resets") Signed-off-by: Colin Ian King Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit c9072b674f76ef2c52fecda2ebd2e66c99c451ab Author: Stanimir Varbanov Date: Wed Apr 7 11:28:45 2021 +0200 media: venus: core: Fix kerneldoc warnings Fix kerneldoc warnings in description of venus_core and venus_inst structures Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit f9f54983005cdd1060b85b16933677442139d88d Author: Ulrich Hecht Date: Thu Apr 15 11:35:47 2021 +0200 serial: sh-sci: remove obsolete latency workaround Since the transition to hrtimers there is no more need to set a minimum RX timeout to work around latency issues. Reviewed-by: Yoshihiro Shimoda Signed-off-by: Ulrich Hecht Link: https://lore.kernel.org/r/20210415093547.21639-1-uli+renesas@fpond.eu Signed-off-by: Greg Kroah-Hartman commit 8779c688edbbb387aa2f6953ce7bcaa56012cc6e Author: Julian Labus Date: Thu Apr 15 09:45:26 2021 +0200 platform/x86: gigabyte-wmi: add X570 AORUS ELITE Add the X570 AORUS ELITE to gigabyte_wmi_known_working_platforms Signed-off-by: Julian Labus Acked-By: Thomas Weißschuh Link: https://lore.kernel.org/r/20210415074526.1782-1-julian@labus-online.de Signed-off-by: Hans de Goede commit 00cc42630a2e8893836ea2fc2b68334494b4534f Author: Hans de Goede Date: Tue Apr 13 09:21:12 2021 +0200 platform/x86: thinkpad_acpi: Add labels to the first 2 temperature sensors On EC version 3, the first 2 temperature sensors are always CPU and GPU add labels for these. This changes e.g. the "sensors" command output on a X1C8 from: thinkpad-isa-0000 Adapter: ISA adapter fan1: 2694 RPM temp1: +42.0°C temp2: N/A temp3: +33.0°C temp4: +0.0°C temp5: +35.0°C temp6: +42.0°C temp7: +42.0°C temp8: N/A into: thinkpad-isa-0000 Adapter: ISA adapter fan1: 2694 RPM CPU: +42.0°C GPU: N/A temp3: +33.0°C temp4: +0.0°C temp5: +35.0°C temp6: +42.0°C temp7: +42.0°C temp8: N/A Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210413072112.183550-1-hdegoede@redhat.com commit 4615df5df23031120637baf0c4e4a20b1459737e Merge: 0df74278faedf c1de07884f2ba Author: Greg Kroah-Hartman Date: Thu Apr 15 11:06:46 2021 +0200 Merge tag 'icc-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next Georgi writes: interconnect changes for 5.13 These are the interconnect changes for the 5.13-rc1 merge window with the highlights being drivers for two new platforms. Driver changes: - New driver for SM8350 platforms. - New driver for SDM660 platforms. Signed-off-by: Georgi Djakov * tag 'icc-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: interconnect: qcom: sm8350: Add missing link between nodes interconnect: qcom: sm8350: Use the correct ids interconnect: qcom: sdm660: Fix kerneldoc warning MAINTAINERS: icc: add interconnect tree interconnect: qcom: Add SM8350 interconnect provider driver dt-bindings: interconnect: Add Qualcomm SM8350 DT bindings interconnect: qcom: icc-rpm: record slave RPM id in error log interconnect: qcom: Add SDM660 interconnect provider driver dt-bindings: interconnect: Add bindings for Qualcomm SDM660 NoC commit 4b00ed3c5072751fc46677970f4d84683b555969 Author: Jiapeng Chong Date: Wed Apr 14 10:21:43 2021 +0800 memstick: r592: remove unused variable Fix the following clang warning: drivers/memstick/host/r592.c:363:6: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1618366903-94346-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Ulf Hansson commit bd2a895f21eb9195a42e52e5f451dccc854cc71d Author: Andy Shevchenko Date: Wed Apr 14 15:53:10 2021 +0300 PM / wakeup: use dev_set_name() directly We have open coded dev_set_name() implementation, replace that with a direct call. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210414125310.10900-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b622b24519f5b008f6d4e20e5675eaffa8fbd87b Author: Heikki Krogerus Date: Wed Apr 14 10:54:38 2021 +0300 software node: Allow node addition to already existing device If the node is added to an already exiting device, the node needs to be also linked to the device separately. This will make sure the reference count is kept in balance also when the node is injected to a device afterwards. Fixes: e68d0119e328 ("software node: Introduce device_add_software_node()") Reported-by: Pierre-Louis Bossart Signed-off-by: Heikki Krogerus Cc: stable Link: https://lore.kernel.org/r/20210414075438.64547-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5ffa6e344a1c92a27c242f500fc74e6eb361a4bc Author: Greg Kroah-Hartman Date: Thu Apr 8 14:51:34 2021 +0200 tty: clean include/linux/tty.h up There are a lot of tty-core-only functions that are listed in include/linux/tty.h. Move them to drivers/tty/tty.h so that no one else can accidentally call them or think that they are public functions. Cc: Jiri Slaby Link: https://lore.kernel.org/r/20210408125134.3016837-14-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 9f72cab1596327e1011ab4599c07b165e0fb45db Author: Greg Kroah-Hartman Date: Thu Apr 8 14:51:32 2021 +0200 tty: move some tty-only functions to drivers/tty/tty.h The flow change and restricted_tty_write() logic is internal to the tty core only, so move it out of the include/linux/tty.h file. Cc: Jiri Slaby Link: https://lore.kernel.org/r/20210408125134.3016837-12-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit dd9f611442578ca8392e90adbca5815d79946b5e Author: Greg Kroah-Hartman Date: Thu Apr 8 14:51:31 2021 +0200 tty: make tty_release_redirect() static No one calls this outside of the tty_io.c file, so mark this static and do not export the symbol anymore. Cc: Jiri Slaby Link: https://lore.kernel.org/r/20210408125134.3016837-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6c80c0b94b94192d9a34b400f8237703c6475f4d Author: Greg Kroah-Hartman Date: Thu Apr 8 14:51:30 2021 +0200 tty: move some internal tty lock enums and functions out of tty.h Move the TTY_LOCK_* enums and tty_ldisc lock functions out of the global tty.h into the local header file to clean things up. Cc: Jiri Slaby Link: https://lore.kernel.org/r/20210408125134.3016837-10-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit da5d669e00d2c437b3f508d60add417fc74f4bb6 Author: Greg Kroah-Hartman Date: Thu Apr 8 14:51:29 2021 +0200 tty: audit: move some local functions out of tty.h The functions tty_audit_add_data() and tty_audit_tiocsti() are local to the tty core code, and do not need to be in a "kernel-wide" header file so move them to drivers/tty/tty.h Cc: Jiri Slaby Link: https://lore.kernel.org/r/20210408125134.3016837-9-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 4d5a64cbc7add9e2697080c6bb78f961e9bbd2c3 Author: Greg Kroah-Hartman Date: Thu Apr 8 14:51:23 2021 +0200 tty: tty.h: remove tty_info() No one is calling this macro, and no one should, so remove it from the .h file. Cc: Tetsuo Handa Cc: Jiri Slaby Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210408125134.3016837-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 98602c010ceba82f2c2384122dbd07bc965fd367 Author: Greg Kroah-Hartman Date: Thu Apr 8 14:51:22 2021 +0200 tty: create internal tty.h file There are a number of functions and #defines in include/linux/tty.h that do not belong there as they are private to the tty core code. Create an initial drivers/tty/tty.h file and copy the odd "tty logging" macros into it to seed the file with some initial things that we know nothing outside of the tty core should be calling. Cc: Tetsuo Handa Cc: Jiri Slaby Link: https://lore.kernel.org/r/20210408125134.3016837-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 0a360e8b65d62fe1a994f0a8da4f8d20877b2100 Author: Hillf Danton Date: Mon Apr 12 11:57:58 2021 +0800 tty: n_gsm: check error while registering tty devices Add the error path for registering tty devices and roll back in case of error in bid to avoid the UAF like the below one reported. Plus syzbot reported general protection fault in cdev_del() on Sep 24, 2020 and both cases are down to the kobject_put() in tty_cdev_add(). ------------[ cut here ]------------ refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 8923 at lib/refcount.c:28 refcount_warn_saturate+0x1cf/0x210 -origin/lib/refcount.c:28 Modules linked in: CPU: 1 PID: 8923 Comm: executor Not tainted 5.12.0-rc5+ #8 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.1 04/01/2014 RIP: 0010:refcount_warn_saturate+0x1cf/0x210 -origin/lib/refcount.c:28 Code: 4f ff ff ff e8 32 fa b5 fe 48 c7 c7 3d f8 f6 86 e8 d6 ab c6 fe c6 05 7c 34 67 04 01 48 c7 c7 68 f8 6d 86 31 c0 e8 81 2e 9d fe <0f> 0b e9 22 ff ff ff e8 05 fa b5 fe 48 c7 c7 3e f8 f6 86 e8 a9 ab RSP: 0018:ffffc90001633c60 EFLAGS: 00010246 RAX: 15d08b2e34b77800 RBX: 0000000000000003 RCX: ffff88804c056c80 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000003 R08: ffffffff813767aa R09: 0001ffffffffffff R10: 0001ffffffffffff R11: ffff88804c056c80 R12: ffff888040b7d000 R13: ffff88804c206938 R14: ffff88804c206900 R15: ffff888041b18488 FS: 00000000022c9940(0000) GS:ffff88807ec00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9f9b122008 CR3: 0000000044b4b000 CR4: 0000000000750ee0 PKRU: 55555554 Call Trace: __refcount_sub_and_test -origin/./include/linux/refcount.h:283 [inline] __refcount_dec_and_test -origin/./include/linux/refcount.h:315 [inline] refcount_dec_and_test -origin/./include/linux/refcount.h:333 [inline] kref_put -origin/./include/linux/kref.h:64 [inline] kobject_put+0x17b/0x180 -origin/lib/kobject.c:753 cdev_del+0x4b/0x50 -origin/fs/char_dev.c:597 tty_unregister_device+0x99/0xd0 -origin/drivers/tty/tty_io.c:3343 gsmld_detach_gsm -origin/drivers/tty/n_gsm.c:2409 [inline] gsmld_close+0x6c/0x140 -origin/drivers/tty/n_gsm.c:2478 tty_ldisc_close -origin/drivers/tty/tty_ldisc.c:488 [inline] tty_ldisc_kill -origin/drivers/tty/tty_ldisc.c:636 [inline] tty_ldisc_release+0x1b6/0x400 -origin/drivers/tty/tty_ldisc.c:809 tty_release_struct+0x19/0xb0 -origin/drivers/tty/tty_io.c:1714 tty_release+0x9ad/0xa00 -origin/drivers/tty/tty_io.c:1885 __fput+0x260/0x4e0 -origin/fs/file_table.c:280 ____fput+0x11/0x20 -origin/fs/file_table.c:313 task_work_run+0x8e/0x110 -origin/kernel/task_work.c:140 tracehook_notify_resume -origin/./include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop -origin/kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x16b/0x1a0 -origin/kernel/entry/common.c:208 __syscall_exit_to_user_mode_work -origin/kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x20/0x40 -origin/kernel/entry/common.c:301 do_syscall_64+0x45/0x80 -origin/arch/x86/entry/common.c:56 entry_SYSCALL_64_after_hwframe+0x44/0xae Reported-by: syzbot+c49fe6089f295a05e6f8@syzkaller.appspotmail.com Reported-and-tested-by: Hao Sun Signed-off-by: Hillf Danton Link: https://lore.kernel.org/r/20210412035758.1974-1-hdanton@sina.com Signed-off-by: Greg Kroah-Hartman commit 845766b63fb53cbaf9b8d68c6be9879f8a5f2902 Author: Zev Weiss Date: Sun Apr 11 22:47:12 2021 -0500 dt-bindings: serial: 8250: add aspeed, lpc-io-reg and aspeed, lpc-interrupts These correspond to the existing lpc_address, sirq, and sirq_polarity sysfs attributes; the second element of aspeed,lpc-interrupts provides a replacement for the deprecated aspeed,sirq-polarity-sense property. Reviewed-by: Rob Herring Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20210412034712.16778-5-zev@bewilderbeest.net Signed-off-by: Greg Kroah-Hartman commit ca03042f0f1221c3173bbe81ebd974b91a4dbb15 Author: Zev Weiss Date: Sun Apr 11 22:47:11 2021 -0500 serial: 8250_aspeed_vuart: add aspeed, lpc-io-reg and aspeed, lpc-interrupts DT properties These allow describing all the Aspeed VUART attributes currently available via sysfs. aspeed,lpc-interrupts provides a replacement for the deprecated aspeed,sirq-polarity-sense property. Reviewed-by: Andrew Jeffery Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20210412034712.16778-4-zev@bewilderbeest.net Signed-off-by: Greg Kroah-Hartman commit 3b44af4f9f4d9aab7d369b06e7c53db274927582 Author: Zev Weiss Date: Sun Apr 11 22:47:10 2021 -0500 serial: 8250_aspeed_vuart: refactor sirq and lpc address setting code This splits dedicated aspeed_vuart_set_{sirq,lpc_address}() functions out of the sysfs store functions in preparation for adding DT properties that will be poking the same registers. While we're at it, these functions now provide some basic bounds-checking on their arguments. Reviewed-by: Andrew Jeffery Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20210412034712.16778-3-zev@bewilderbeest.net Signed-off-by: Greg Kroah-Hartman commit a13df3bec5963dc8f0f49257ae4f83c1445acaff Author: Zev Weiss Date: Sun Apr 11 22:47:09 2021 -0500 dt-bindings: serial: 8250: deprecate aspeed, sirq-polarity-sense This property ties SIRQ polarity to SCU register bits that don't necessarily have any direct relationship to it; the only use of it was removed in commit c82bf6e133d3 ("ARM: aspeed: g5: Do not set sirq polarity"). Reviewed-by: Joel Stanley Acked-by: Rob Herring Signed-off-by: Zev Weiss Link: https://lore.kernel.org/r/20210412034712.16778-2-zev@bewilderbeest.net Signed-off-by: Greg Kroah-Hartman commit 71d3edc61e29e45b613b841108688d711846f969 Author: Fabio M. De Francesco Date: Thu Apr 15 09:17:31 2021 +0200 staging: rtl8723bs: Remove led_blink_hdl() and everything related Removed useless led_blink_hdl() prototype and definition. Removed struct LedBlink_param. Removed LedBlink entries in rtw_cmd_callback[] and in wlancmds[]. Everything related to LedBlink is not anymore needed. Index of slots changed in arrays comments to reflect current positions. Reported-by: Julia Lawall Reported-by: Fabio Aiuto Reported-by: Greg Kroah-Hartman Suggested-by: Matthew Wilcox Suggested-by: Dan Carpenter Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210415071731.25725-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8ffdff6a8cfbdc174a3a390b6f825a277b5bb895 Author: Greg Kroah-Hartman Date: Wed Apr 14 10:58:10 2021 +0200 staging: comedi: move out of staging directory The comedi code came into the kernel back in 2008, but traces its lifetime to much much earlier. It's been polished and buffed and there's really nothing preventing it from being part of the "real" portion of the kernel. So move it to drivers/comedi/ as it belongs there. Many thanks to the hundreds of developers who did the work to make this happen. Cc: Ian Abbott Cc: H Hartley Sweeten Link: https://lore.kernel.org/r/YHauop4u3sP6lz8j@kroah.com Signed-off-by: Greg Kroah-Hartman commit 027ffa10b80be722c284067f7eee431ced1db208 Author: Bryan Brattlof Date: Wed Apr 14 17:39:03 2021 +0000 staging: rtl8723bs: remove sdio_drv_priv structure The sdio_drv_priv structure is a small wrapper around sdio_driver in linux/mmc/sdio_func.h with an added drv_registered integer. drv_registered is never used anywhere in the driver and only assigned to during the sdio registering and unregistering process. We can safely remove sdio_drv_priv and use the sdio_driver structure directly. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20210414173751.317762-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 586c402882069fe835cb9874a72316eaa2923c6f Author: Nico Pache Date: Wed Apr 14 04:58:05 2021 -0400 kunit: software node: adhear to KUNIT formatting standard Change CONFIG_KUNIT_DRIVER_PE_TEST to CONFIG_DRIVER_PE_KUNIT_TEST inorder to adhear to the KUNIT *_KUNIT_TEST config name format. Fixes: aa811e3cecec (software node: introduce CONFIG_KUNIT_DRIVER_PE_TEST) Signed-off-by: Nico Pache Link: https://lore.kernel.org/r/ef06f65f4a622cf83cce5ba2ba5a060d2aa2e1b9.1618388989.git.npache@redhat.com Signed-off-by: Greg Kroah-Hartman commit d6609084b0b81abc74dc9db0281cdd0e074df5d4 Author: Gopal Tiwari Date: Wed Apr 14 14:16:45 2021 +0530 nvme: fix NULL derefence in nvme_ctrl_fast_io_fail_tmo_show/store Adding entry for dev_attr_fast_io_fail_tmo to avoid the kernel crash while reading and writing the fast_io_fail_tmo. Fixes: 09fbed636382 (nvme: export fast_io_fail_tmo to sysfs) Signed-off-by: Gopal Tiwari Reviewed-by: Keith Busch Signed-off-by: Christoph Hellwig commit a9e0e6bc728ebcfe9f6acdca84e5c6cafee895cf Author: Christoph Hellwig Date: Wed Apr 7 15:03:16 2021 +0200 nvme: let namespace probing continue for unsupported features Instead of failing to scan the namespace entirely when unsupported features are detected, just mark the gendisk hidden but allow other access like the upcoming per-namespace character device. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González commit f5b9a51db29c31f4e486b08d1d823d6f75f2c2c7 Author: Christoph Hellwig Date: Wed Apr 7 14:36:47 2021 +0200 nvme: factor out nvme_ns_open and nvme_ns_release helpers These will be reused for the per-namespace character devices. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González Reviewed-by: Chaitanya Kulkarni commit 1496bd4936d215fed40b008e9486c38e6acf01db Author: Christoph Hellwig Date: Wed Apr 7 14:22:12 2021 +0200 nvme: move nvme_ns_head_ops to multipath.c Move the multipath block_device_operations to multipath.c, where they belong. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González Reviewed-by: Chaitanya Kulkarni commit 871ca3ef132650b9b7777c2f2fd15b72c282d792 Author: Christoph Hellwig Date: Wed Apr 7 14:20:40 2021 +0200 nvme: factor out a nvme_tryget_ns_head helper Add a helper to avoid opencoding ns_head->ref manipulations. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González Reviewed-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni commit 2405252a680e2151046f4f256d706c3ca92fedef Author: Christoph Hellwig Date: Sat Apr 10 08:42:03 2021 +0200 nvme: move the ioctl code to a separate file Split out the ioctl code from core.c into a new file. Also update copyrights while we're at it. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González Reviewed-by: Chaitanya Kulkarni commit 3557a4409701a132e8f86ad234ac8cf6e97b052e Author: Christoph Hellwig Date: Fri Aug 14 11:11:49 2020 +0200 nvme: don't bother to look up a namespace for controller ioctls Don't bother to look up a namespace just to drop if after retreiving the controller for the multipath case. Just look up a live controller for the subsystem directly. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González commit 2f907f7f96d96c518652410b90ad2edb50305a4c Author: Christoph Hellwig Date: Fri Aug 14 10:55:32 2020 +0200 nvme: simplify block device ioctl handling for the !multipath case Only use the existing ioctl handler for the multipath case, and add a simpler one that reverts to the pre-multipath case for not shared use case. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González commit 89b3d6e60550ded5a88ae69cd04d17558e948878 Author: Christoph Hellwig Date: Thu Apr 8 14:04:42 2021 +0200 nvme: simplify the compat ioctl handling Don't bother defining a separate compat_ioctl handler, and just handle the NVME_IOCTL_SUBMIT_IO32 case inline. Also only defined it for those ABIs (currently just i386 vs x86_64) that are affected. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González commit a5d737f10022bd5d2acf5127935ff813fc832f6e Author: Christoph Hellwig Date: Fri Aug 14 10:30:50 2020 +0200 nvme: factor out a nvme_ns_ioctl helper Factor out a helper for the namespace based ioctls. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González Reviewed-by: Chaitanya Kulkarni commit d7790d3739cfd5051ba8990732a2dce795d4fae2 Author: Christoph Hellwig Date: Fri Aug 14 10:33:14 2020 +0200 nvme: pass a user pointer to nvme_nvm_ioctl Pass the proper user pointer instead of the not all that useful integer representation. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González commit 9953ab0c5ae722dabbfa89a82c0d30a261125da0 Author: Christoph Hellwig Date: Wed Apr 7 12:46:46 2021 +0200 nvme: cleanup setting the disk name Return false from nvme_set_disk_name and let the caller set the non-multipath name instead of duplicating the naming information in two places. Also remove the pointless local variables for the disk name and flags and the not needed ctrl argument. Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González commit 3089738868b665ecc25e7f36e004c073883c16a0 Author: Minwoo Im Date: Wed Apr 7 17:49:29 2021 +0200 nvme: add a nvme_ns_head_multipath helper Move the multipath gendisk out of #ifdef CONFIG_NVME_MULTIPATH and add a new nvme_ns_head_multipath that uses it to check if a ns_head has a multipath device associated with it. Signed-off-by: Minwoo Im [hch: added the IS_ENABLED, converted a few existing users] Signed-off-by: Christoph Hellwig Reviewed-by: Keith Busch Reviewed-by: Javier González Reviewed-by: Chaitanya Kulkarni commit 95d54bd1a4c1873aa0e2d4c09966f37954c32b80 Author: Niklas Cassel Date: Sat Apr 10 20:16:21 2021 +0000 nvme: remove single trailing whitespace There is a single trailing whitespace in core.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: Niklas Cassel Signed-off-by: Christoph Hellwig commit e234f1f8bb6dda941390e5d3f20b8f2d958f163d Author: Niklas Cassel Date: Sat Apr 10 20:15:45 2021 +0000 nvme-multipath: remove single trailing whitespace There is a single trailing whitespace in multipath.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: Niklas Cassel Signed-off-by: Christoph Hellwig commit 53dc180e7c01038d0248cd00476583b1bfe0cb5c Author: Niklas Cassel Date: Sat Apr 10 20:15:43 2021 +0000 nvme-pci: remove single trailing whitespace There is a single trailing whitespace in pci.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: Niklas Cassel Signed-off-by: Christoph Hellwig commit e51183be1fa96dc6d3cd11b3c25a0f595807315e Author: Niklas Cassel Date: Fri Apr 9 20:12:55 2021 +0200 nvme-pci: don't simple map sgl when sgls are disabled According to the module parameter description for sgl_threshold, a value of 0 means that SGLs are disabled. If SGLs are disabled, we should respect that, even for the case where the request is made up of a single physical segment. Fixes: 297910571f08 ("nvme-pci: optimize mapping single segment requests using SGLs") Signed-off-by: Niklas Cassel Signed-off-by: Christoph Hellwig commit ccc1003b5b2ba9404b390f3183979f81136a3f1f Author: Colin Ian King Date: Wed Apr 7 12:10:20 2021 +0100 nvmet: fix a spelling mistake "nubmer" -> "number" There is a spelling mistake in a pr_err error message. Fix it. Signed-off-by: Colin Ian King Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 0d8ddeea11d00010c8b0ecbe9d3b90811cd19867 Author: Amit Engel Date: Mon Mar 22 21:57:17 2021 +0200 nvmet-fc: simplify nvmet_fc_alloc_hostport Once a host is already created, avoid allocate additional hostports that will be thrown away. add an helper function to handle host search. Reviewed-by: Himanshu Madhani Signed-off-by: James Smart Signed-off-by: Amit Engel Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit bdaf13279192c60b2b1fc99badef53b494fec055 Author: Elad Grupi Date: Wed Mar 31 17:13:14 2021 +0800 nvmet-tcp: fix a segmentation fault during io parsing error In case there is an io that contains inline data and it goes to parsing error flow, command response will free command and iov before clearing the data on the socket buffer. This will delay the command response until receive flow is completed. Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Signed-off-by: Elad Grupi Signed-off-by: Hou Pu Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 069904ce318e0e15dc67f3c2829303237c5e912b Author: zuoqilin Date: Wed Apr 14 22:16:39 2021 +0800 tools/testing: Remove unused variable Remove unused variable "ret2". Signed-off-by: zuoqilin Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210414141639.1446-1-zuoqilin1@163.com commit 1969b3c60db675040ec0d1b09698807647aac7ed Author: Florent Revest Date: Wed Apr 14 17:56:32 2021 +0200 selftests/bpf: Fix the ASSERT_ERR_PTR macro It is just missing a ';'. This macro is not used by any test yet. Fixes: 22ba36351631 ("selftests/bpf: Move and extend ASSERT_xxx() testing macros") Signed-off-by: Florent Revest Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210414155632.737866-1-revest@chromium.org commit 4c26f69d0cf966044ef0c31a87c2da68fc6d066a Author: Paul M Stillwell Jr Date: Wed Mar 31 14:17:08 2021 -0700 ice: reduce scope of variable The scope of this variable can be reduced so do that. Signed-off-by: Paul M Stillwell Jr Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 4fe36226943b9ca99cf51573297b39644a1946d6 Author: Paul M Stillwell Jr Date: Wed Mar 31 14:17:07 2021 -0700 ice: remove return variable We were saving the return value from ice_vsi_manage_rss_lut(), but the errors from that function are not critical so change it to return void and remove the code that saved the value. Signed-off-by: Paul M Stillwell Jr Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit b370245b4b95a07433a03e06eb3d32a01ded2c5d Author: Bruce Allan Date: Wed Mar 31 14:17:05 2021 -0700 ice: suppress false cppcheck issues Silence false errors, warnings and style issues reported by cppcheck. Signed-off-by: Bruce Allan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit c931c782d8465c0408e14bf031e951134c30b059 Author: Brett Creeley Date: Wed Mar 31 14:17:04 2021 -0700 ice: Set vsi->vf_id as ICE_INVAL_VFID for non VF VSI types Currently the vsi->vf_id is set only for ICE_VSI_VF and it's left as 0 for all other VSI types. This is confusing and could be problematic since 0 is a valid vf_id. Fix this by always setting non VF VSI types to ICE_INVAL_VFID. Signed-off-by: Brett Creeley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 1cdea9a7eae3a976adc2735bc7ce62ac07cafcdb Author: Jesse Brandeburg Date: Wed Mar 31 14:17:03 2021 -0700 ice: remove unused struct member The only time you can ever have a rq_last_status is if a firmware event was somehow reporting a status on the receive queue, which are generally firmware initiated events or mailbox messages from a VF. Mostly this struct member was unused. Fix this problem by still printing the value of the field in a debug print, but don't store the value forever in a struct, potentially creating opportunities for callers to use the wrong struct member. Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 58623c52b4278de6ed462e6f25402457ffbdd63f Author: Jesse Brandeburg Date: Wed Mar 31 14:17:02 2021 -0700 ice: use local for consistency Do a minor refactor on ice_vsi_rebuild to use a local variable to store vsi->type. Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 80ad6dde61894dd880c3690b33eebbbc813e0276 Author: Jesse Brandeburg Date: Wed Mar 31 14:17:01 2021 -0700 ice: print name in /proc/iomem The driver previously printed it's PCI address in the name field for the pci resource, which when displayed via /proc/iomem, would print the same thing twice. It's more useful for debugging to see the driver name, as most other modules do. Here's a diff of before and after this change: 99100000-991fffff : 0000:3b:00.1 9a000000-a04fffff : PCI Bus 0000:3b 9a000000-9bffffff : 0000:3b:00.1 - 9a000000-9bffffff : 0000:3b:00.1 + 9a000000-9bffffff : ice 9c000000-9dffffff : 0000:3b:00.0 - 9c000000-9dffffff : 0000:3b:00.0 + 9c000000-9dffffff : ice 9e000000-9effffff : 0000:3b:00.1 9f000000-9fffffff : 0000:3b:00.0 a0000000-a000ffff : 0000:3b:00.1 Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit e9c9692c8a81aacf0854f68ab54dc182f8be38e8 Author: Scott W Taylor Date: Wed Mar 31 14:17:00 2021 -0700 ice: Reimplement module reads used by ethtool There was an excessive increment of the QSFP page, which is now fixed. Additionally, this new update now reads 8 bytes at a time and will retry each request if the module/bus is busy. Also, prevent reading from upper pages if module does not support those pages. Signed-off-by: Scott W Taylor Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit d59684a07e37b06295e314301c9d0c04915a52f7 Author: Jesse Brandeburg Date: Wed Mar 31 14:16:59 2021 -0700 ice: refactor ITR data structures Use a dedicated bitfield in order to both increase the amount of checking around the length of ITR writes as well as simplify the checks of dynamic mode. Basically unpack the "high bit means dynamic" logic into bitfields. Also, remove some unused ITR defines. Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit b7306b42beaf6abdbcb49849b5254ad06321abd1 Author: Jesse Brandeburg Date: Wed Mar 31 14:16:58 2021 -0700 ice: manage interrupts during poll exit The driver would occasionally miss that there were outstanding descriptors to clean when exiting busy/napi poll. This issue has been in the code since the introduction of the ice driver. Attempt to "catch" any remaining work by triggering a software interrupt when exiting napi poll or busy-poll. This will not cause extra interrupts in the case of normal execution. This issue was found when running sfnt-pingpong, with busy poll enabled, and typically with larger I/O sizes like > 8192, the program would occasionally report > 1 second maximums to complete a ping pong. Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit cdf1f1f169179659621bb540575b3a9d1cd38072 Author: Jacob Keller Date: Wed Mar 31 14:16:57 2021 -0700 ice: replace custom AIM algorithm with kernel's DIM library The ice driver has support for adaptive interrupt moderation, an algorithm for tuning the interrupt rate dynamically. This algorithm is based on various assumptions about ring size, socket buffer size, link speed, SKB overhead, ethernet frame overhead and more. The Linux kernel has support for a dynamic interrupt moderation algorithm known as "dimlib". Replace the custom driver-specific implementation of dynamic interrupt moderation with the kernel's algorithm. The Intel hardware has a different hardware implementation than the originators of the dimlib code had to work with, which requires the driver to use a slightly different set of inputs for the actual moderation values, while getting all the advice from dimlib of better/worse, shift left or right. The change made for this implementation is to use a pair of values for each of the 5 "slots" that the dimlib moderation expects, and the driver will program those pairs when dimlib recommends a slot to use. The currently implementation uses two tables, one for receive and one for transmit, and the pairs of values in each slot set the maximum delay of an interrupt and a maximum number of interrupts per second (both expressed in microseconds). There are two separate kinds of bugs fixed by using DIMLIB, one is UDP single stream send was too slow, and the other is that 8K ping-pong was going to the most aggressive moderation and has much too high latency. The overall result of using DIMLIB is that we meet or exceed our performance expectations set based on the old algorithm. Co-developed-by: Jesse Brandeburg Signed-off-by: Jesse Brandeburg Signed-off-by: Jacob Keller Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit b8b4772377dd8a916479796c8a8c5425f937fcaf Author: Jesse Brandeburg Date: Wed Mar 31 14:16:56 2021 -0700 ice: refactor interrupt moderation writes Introduce several new helpers for writing ITR and GLINT_RATE registers, and refactor the code calling them. This resulted in removal of several duplicate functions and rolled a bunch of simple code back into the calling routines. In particular this removes some code that was doing both a store and a set in a helper function, which seems better done as separate tasks in the caller (and generally takes less lines of code even with a tiny bit of repetition). Signed-off-by: Jesse Brandeburg Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit a476d72abe6cdd2cccc3dbf5a844286cfe9684ed Author: Anirudh Venkataramanan Date: Tue Mar 2 10:15:41 2021 -0800 ice: Add new VSI states to track netdev alloc/registration Add two new VSI states, one to track if a netdev for the VSI has been allocated and the other to track if the netdev has been registered. Call unregister_netdev/free_netdev only when the corresponding state bits are set. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 7e408e07b42dceba4bc6630ff9ce9a55fcb043e0 Author: Anirudh Venkataramanan Date: Tue Mar 2 10:15:38 2021 -0800 ice: Drop leading underscores in enum ice_pf_state Remove the leading underscores in enum ice_pf_state. This is not really communicating anything and is unnecessary. No functional change. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit d41f26b5ef8fb4d5ae6f9b51526eefa62ec53348 Author: Bruce Allan Date: Tue Mar 2 10:12:06 2021 -0800 ice: use kernel definitions for IANA protocol ports and ether-types The well-known IANA protocol port 3260 (iscsi-target 0x0cbc) and the ether-types 0x8906 (ETH_P_FCOE) and 0x8914 (ETH_P_FIP) are already defined in kernel header files. Use those definitions instead of open-coding the same. Signed-off-by: Bruce Allan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 3a1aa533f7f676aad68f8dbbbba10b9502903770 Merge: 94f633ea8ade8 e2b1e4b532abd Author: David S. Miller Date: Wed Apr 14 14:37:02 2021 -0700 Merge tag 'linux-can-next-for-5.13-20210414' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2021-04-14 this is a pull request of a single patch for net-next/master. Vincent Mailhol's patch fixes a NULL pointer dereference when handling error frames in the etas_es58x driver, which has been added in the previous PR. ==================== Signed-off-by: David S. Miller commit 94f633ea8ade8418634d152ad0931133338226f6 Author: Eric Dumazet Date: Wed Apr 14 12:36:44 2021 -0700 net/packet: remove data races in fanout operations af_packet fanout uses RCU rules to ensure f->arr elements are not dismantled before RCU grace period. However, it lacks rcu accessors to make sure KCSAN and other tools wont detect data races. Stupid compilers could also play games. Fixes: dc99f600698d ("packet: Add fanout support.") Signed-off-by: Eric Dumazet Reported-by: "Gong, Sishuai" Cc: Willem de Bruijn Signed-off-by: David S. Miller commit ae1ea84b33dab45c7b6c1754231ebda5959b504c Author: Florian Fainelli Date: Wed Apr 14 22:22:57 2021 +0300 net: bridge: propagate error code and extack from br_mc_disabled_update Some Ethernet switches might only be able to support disabling multicast snooping globally, which is an issue for example when several bridges span the same physical device and request contradictory settings. Propagate the return value of br_mc_disabled_update() such that this limitation is transmitted correctly to user-space. Signed-off-by: Florian Fainelli Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4a65912fde5b2a0bde4df90426bb8c51a48f1230 Merge: 652d3be21dc83 5b232ea94c90a Author: David S. Miller Date: Wed Apr 14 14:14:03 2021 -0700 Merge tag 'mlx5-updates-2021-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-04-13 mlx5 core and netdev driver updates 1) E-Switch updates from Parav, 1.1) Devlink parameter to control mlx5 metadata enablement for E-Switch 1.2) Trivial cleanups for E-Switch code 1.3) Dynamically allocate vport steering namespaces only when required 2) From Jianbo, Use variably sized data structures for Software steering 3) Several minor cleanups ==================== Signed-off-by: David S. Miller commit 652d3be21dc838f526c01837cbc837894f9c7bc1 Author: Michael Walle Date: Wed Apr 14 16:48:14 2021 +0200 net: enetc: fetch MAC address from device tree Normally, the bootloader will already initialize the MAC address registers of the ENETC and the driver will just use them or generate a random one, if it is not initialized. Add a new way to provide the MAC address: via device tree. Besides the usual 'mac-address' property, there is also the possibility to fetch it via a NVMEM provider. The sl28 board stores the MAC address in the SPI NOR flash OTP region. Having this will allow linux to fetch the MAC address from there without being dependent on the bootloader. No in-tree boards have the device tree properties set, thus for these, this is a no-op. Signed-off-by: Michael Walle Signed-off-by: David S. Miller commit ace8d281aa71ef785d7b58e9c6b0fcc198103606 Author: Wan Jiabing Date: Wed Apr 14 19:06:45 2021 +0800 sfc: Remove duplicate argument Fix the following coccicheck warning: ./drivers/net/ethernet/sfc/enum.h:80:7-28: duplicated argument to | Signed-off-by: Wan Jiabing Signed-off-by: David S. Miller commit 17c3df7078e3742bd9e907f3006a9e3469383007 Author: Paolo Abeni Date: Wed Apr 14 12:48:48 2021 +0200 skbuff: revert "skbuff: remove some unnecessary operation in skb_segment_list()" the commit 1ddc3229ad3c ("skbuff: remove some unnecessary operation in skb_segment_list()") introduces an issue very similar to the one already fixed by commit 53475c5dd856 ("net: fix use-after-free when UDP GRO with shared fraglist"). If the GSO skb goes though skb_clone() and pskb_expand_head() before entering skb_segment_list(), the latter will unshare the frag_list skbs and will release the old list. With the reverted commit in place, when skb_segment_list() completes, skb->next points to the just released list, and later on the kernel will hit UaF. Note that since commit e0e3070a9bc9 ("udp: properly complete L4 GRO over UDP tunnel packet") the critical scenario can be reproduced also receiving UDP over vxlan traffic with: NIC (NETIF_F_GRO_FRAGLIST enabled) -> vxlan -> UDP sink Attaching a packet socket to the NIC will cause skb_clone() and the tunnel decapsulation will call pskb_expand_head(). Fixes: 1ddc3229ad3c ("skbuff: remove some unnecessary operation in skb_segment_list()") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 73d7de66aa3c76d90092649766278296042ba836 Author: Jiapeng Chong Date: Wed Apr 14 15:13:39 2021 +0800 atm: idt77252: remove unused function Fix the following clang warning: drivers/atm/idt77252.c:1787:1: warning: unused function 'idt77252_fbq_level' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 3a306a5b60165a79c963585ac1863a12bba0ae7e Author: Guobin Huang Date: Tue Apr 6 20:06:37 2021 +0800 PCI: cpqphp: Use DEFINE_SPINLOCK() for int15_lock Initialize the static int15_lock spinlock with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Link: https://lore.kernel.org/r/1617710797-48903-1-git-send-email-huangguobin4@huawei.com Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: Bjorn Helgaas commit 8c1186be3f1b02ec85db003506b1aa71d5dc5a1b Merge: 216f78ea8cf6f 6ad2dd6c14d39 Author: David S. Miller Date: Wed Apr 14 13:15:12 2021 -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 2021-04-14 Not much this time: 1) Simplification of some variable calculations in esp4 and esp6. From Jiapeng Chong and Junlin Yang. 2) Fix a clang Wformat warning in esp6 and ah6. From Arnd Bergmann. Please pull or let me know if there are problems. ==================== Signed-off-by: David S. Miller commit 216f78ea8cf6fae5140aeb55657ebdab71a05502 Author: Heiner Kallweit Date: Wed Apr 14 08:23:15 2021 +0200 r8169: add support for pause ethtool ops This adds support for the [g|s]et_pauseparam ethtool ops. It considers that the chip doesn't support pause frame use in jumbo mode. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 1141bfef9c4700488619ef513772701635a6c80c Merge: f4da56529da60 ce2cb12dccab5 Author: David S. Miller Date: Wed Apr 14 12:59:41 2021 -0700 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 10GbE Intel Wired LAN Driver Updates 2021-04-13 This series contains updates to ixgbe and ixgbevf driver. Jostar Yang adds support for BCM54616s PHY for ixgbe. Chen Lin removes an unused function pointer for ixgbe and ixgbevf. Bhaskar Chowdhury fixes a typo in ixgbe. ==================== Signed-off-by: David S. Miller commit f4da56529da602010979e8497d1f02eaf5df8883 Author: Tan Tee Min Date: Wed Apr 14 08:16:17 2021 +0800 net: stmmac: Add support for external trigger timestamping The Synopsis MAC controller supports auxiliary snapshot feature that allows user to store a snapshot of the system time based on an external event. This patch add supports to the above mentioned feature. Users will be able to triggered capturing the time snapshot from user-space using application such as testptp or any other applications that uses the PTP_EXTTS_REQUEST ioctl request. Cc: Richard Cochran Signed-off-by: Tan Tee Min Co-developed-by: Wong Vee Khee Signed-off-by: Wong Vee Khee Acked-by: Richard Cochran Signed-off-by: David S. Miller commit 945c6ff851d8cc41571a8bb5735fb40a925a7aa2 Merge: 87b7e5c05c98c d7029f55cc460 Author: David S. Miller Date: Wed Apr 14 12:56:44 2021 -0700 Merge branch 'marvell-88x2222-improvements' Ivan Bornyakov says: ==================== net: phy: marvell-88x2222: a couple of improvements First, there are some SFP modules that only uses RX_LOS for link indication. Add check that link is operational before actual read of line-side status. Second, it is invalid to set 10G speed without autonegotiation, according to phy_ethtool_ksettings_set(). Implement switching between 10GBase-R and 1000Base-X/SGMII if autonegotiation can't complete but there is signal in line. Changelog: v1 -> v2: * make checking that link is operational more friendly for trancievers without SFP cages. * split swapping 1G/10G modes into non-functional and functional commits for the sake of easier review. ==================== Signed-off-by: David S. Miller commit d7029f55cc46066d833cbf7f532b1ae8d6835859 Author: Ivan Bornyakov Date: Tue Apr 13 23:54:52 2021 +0300 net: phy: marvell-88x2222: swap 1G/10G modes on autoneg Setting 10G without autonegotiation is invalid according to phy_ethtool_ksettings_set(). Thus, we need to set it during autonegotiation. If 1G autonegotiation can't complete for quite a time, but there is signal in line, switch line interface type to 10GBase-R, if supported, in hope for link to be established. And vice versa. If 10GBase-R link can't be established for quite a time, and autonegotiation is enabled, and there is signal in line, switch line interface type to appropriate 1G mode, i.e. 1000Base-X or SGMII, if supported. Signed-off-by: Ivan Bornyakov Signed-off-by: David S. Miller commit 473960a7b4434dbda6f628eb9e29e989f730343f Author: Ivan Bornyakov Date: Tue Apr 13 23:54:51 2021 +0300 net: phy: marvell-88x2222: move read_status after config_aneg No functional changes, just move read link status routines below autonegotiation configuration to make future functional changes more distinct. Signed-off-by: Ivan Bornyakov Signed-off-by: David S. Miller commit 58581478a734b07eb27032299fcb36caa4f9988b Author: Ivan Bornyakov Date: Tue Apr 13 23:54:50 2021 +0300 net: phy: marvell-88x2222: check that link is operational Some SFP modules uses RX_LOS for link indication. In such cases link will be always up, even without cable connected. RX_LOS changes will trigger link_up()/link_down() upstream operations. Thus, check that SFP link is operational before actual read link status. If there is no SFP cage connected to the tranciever, check only PMD Recieve Signal Detect register. Signed-off-by: Ivan Bornyakov Signed-off-by: David S. Miller commit 0df74278faedf20f9696bf2755cf0ce34afa4c3a Author: Tomas Winkler Date: Wed Apr 14 07:52:00 2021 +0300 mei: me: add Alder Lake P device id. Add Alder Lake P device ID. Cc: Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20210414045200.3498241-1-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman commit 467d98420936009a10ce7f95985dece7150acd36 Author: Fabio Aiuto Date: Wed Apr 14 14:18:50 2021 +0200 staging: rtl8723bs: remove unused argument in function removed unused 'void *sel' argument in rtw_odm_dbg_comp_msg() function, after DBG_871X_SEL_NL replacement. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1bd83b936584432fdb09406f26ed8a8b66cd4c8d.1618401896.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ccbdd3fdf3e888d469778b44f955cad116e844ba Author: Fabio Aiuto Date: Wed Apr 14 14:18:49 2021 +0200 staging: rtl8723bs: remove DBG_871X_SEL_NL macro declaration remove DBG_871X_SEL_NL obsolete macro declaration. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8839231b53881c8bf1f8a4d70953ec8acaa2fe95.1618401896.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 07d488b0c1d4c4d3f4729d19606f424df3a80109 Author: Fabio Aiuto Date: Wed Apr 14 14:18:48 2021 +0200 staging: rtl8723bs: replace DBG_871X_SEL_NL with netdev_dbg() replace DGB_871X_SEL_NL macro with netdev_dbg(). DBG_871X_SEL_NL macro expands to a raw prink call or a seq_printf if selected stream _is not_ a local debug symbol set to null. This second scenario never occurs so replace all macro usages with netdev_dbg(). This is done with the following coccinelle script: @@ expression sel; expression list args; identifier padapter; identifier func; @@ func(..., struct adapter *padapter, ...) { <... - DBG_871X_SEL_NL(sel, args); + netdev_dbg(padapter->pnetdev, args); ...> } fix by hand one coccinelle output newline issue Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9d4597097d75a1900c65e4a15077eb0c8bce1c9b.1618401896.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5b232ea94c90aa6196321820740e2969ae64e9cb Author: Aya Levin Date: Wed Apr 7 14:09:05 2021 +0300 net/mlx5e: Fix RQ creation flow for queues which doesn't support XDP Allow to create an RQ which is not registered as an XDP RQ. For example: the trap-RQ doesn't register as an XDP RQ. Fixes: 869c5f926247 ("net/mlx5e: Generalize open RQ") Signed-off-by: Aya Levin Signed-off-by: Saeed Mahameed commit 31450b435fe660c4d5ed25efcde5783952942f0d Author: Wenpeng Liang Date: Thu Apr 1 21:07:43 2021 +0800 net/mlx5: Replace spaces with tab at the start of a line There should be no spaces at the start of the line. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Saeed Mahameed commit 9dee115bc1478b6a51f664defbc5b091985a3fd3 Author: Wenpeng Liang Date: Thu Apr 1 21:07:42 2021 +0800 net/mlx5: Remove return statement exist at the end of void function void function return statements are not generally useful. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Saeed Mahameed commit 02f47c04c36cdc0e002fbe7cc12fbb7c1d8fc56f Author: Wenpeng Liang Date: Thu Apr 1 21:07:41 2021 +0800 net/mlx5: Add a blank line after declarations There should be a blank lines after declarations. Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Saeed Mahameed commit 82c3ba31c370b6001cbf90689e98da1fb6f26aef Author: Colin Ian King Date: Tue Apr 6 17:53:46 2021 +0100 net/mlx5: Fix bit-wise and with zero The bit-wise and of the action field with MLX5_ACCEL_ESP_ACTION_DECRYPT is incorrect as MLX5_ACCEL_ESP_ACTION_DECRYPT is zero and not intended to be a bit-flag. Fix this by using the == operator as was originally intended. Addresses-Coverity: ("Logically dead code") Fixes: 7dfee4b1d79e ("net/mlx5: IPsec, Refactor SA handle creation and destruction") Signed-off-by: Colin Ian King Signed-off-by: Saeed Mahameed commit b7f86258a26402e5dd6b492b1d523e1b1bde34ec Author: Roi Dayan Date: Mon Mar 15 10:22:51 2021 +0200 net/mlx5: DR, Alloc cmd buffer with kvzalloc() instead of kzalloc() The cmd size is 8K so use kvzalloc(). Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 9dac2966c531365d9cd1fb33d8d3a70cec349e35 Author: Jianbo Liu Date: Thu Nov 12 01:32:52 2020 +0000 net/mlx5: DR, Use variably sized data structures for different actions mlx5dr_action is a generally used data structure, and there is an union for different types of actions in it. The size of mlx5dr_action is about 72 bytes, but for those actions with fewer fields, most of the allocated memory is wasted. Remove this union, and mlx5dr_action becomes a generic action header. Then actions are dynamically allocated with needed memory, the data for each action is stored right after the header. Signed-off-by: Jianbo Liu Signed-off-by: Saeed Mahameed commit a74ed24c437eddda3299904d870f0df5ef23e475 Author: Parav Pandit Date: Fri Mar 5 07:38:02 2021 +0200 net/mlx5: SF, Reuse stored hardware function id SF's hardware function id is already stored in mlx5_sf. Reuse it, instead of querying the hw table. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 6e74e6ea1b64a7684a52d6e593255c8ef84b8252 Author: Parav Pandit Date: Fri Mar 5 10:11:21 2021 +0200 net/mlx5: SF, Use device pointer directly At many places in the code, device pointer is directly available. Make use of it, instead of accessing it from the table. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 57b92bdd9e14f969de85d25cefc10abc3f73defd Author: Parav Pandit Date: Mon Mar 1 14:12:13 2021 +0200 net/mlx5: E-Switch, Initialize eswitch acls ns when eswitch is enabled Currently eswitch flow steering (FS) namespace of vport's ingress and egress ACL are enabled when FS layer is initialized. This is done even when eswitch is diabled. This demands that total eswitch ports to be known to FS layer without eswitch in use. Given the FS core is not dependent on eswitch, make namespace init and cleanup routines as helper routines to be invoked only when eswitch is needed. With this change, ingress and egress ACL namespaces are created only when eswitch legacy/offloads mode is enabled. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit b55b35382e51c84bcddc45bd87cf8fa16621452b Author: Parav Pandit Date: Fri Feb 26 14:30:50 2021 +0200 net/mlx5: E-Switch, Move legacy code to a individual file Currently eswitch offers two modes. Legacy and offloads. Offloads code is already in its own file eswitch_offloads.c However eswitch.c contains the eswitch legacy code and common infrastructure code. To enable future extensions and to better manage generic common eswitch infrastructure code, move the legacy code to its own legacy.c file. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit b16f2bb6b6ca926e303273913288461091ba8cd8 Author: Parav Pandit Date: Fri Feb 26 14:36:22 2021 +0200 net/mlx5: E-Switch, Convert a macro to a helper routine Convert ESW_ALLOWED macro to a helper routine so that it can be used in other eswitch files. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 13795553a84dd3411d0870e161d40fee9c4ebe5c Author: Parav Pandit Date: Tue Mar 2 21:39:01 2021 +0200 net/mlx5: E-Switch Make cleanup sequence mirror of init Make cleanup sequence mirror of init sequence for cleaning up reps and freeing vports. Also when reps initialization fails, there is no need to perform reps cleanup. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 6308a5f06be08f3ea1f1a895a9ef54c7b65c4c35 Author: Parav Pandit Date: Tue Mar 2 21:27:47 2021 +0200 net/mlx5: E-Switch, Make vport number u16 Vport number is 16-bit field in hardware. Make it u16. Move location of vport in the structure so that it reduces a hole in the structure. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 7d5ae47891929235c4a269b91996ab951cbf3c20 Author: Parav Pandit Date: Mon Mar 8 11:50:40 2021 +0200 net/mlx5: E-Switch, Skip querying SF enabled bits With vhca events, SF state is queried through the VHCA events. Device no longer expects SF bitmap in the query eswitch functions command. Hence, remove it to simplify the code. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 7bf481d7e75a474e2a0f564b4de6bc2f1eeafc9a Author: Parav Pandit Date: Fri Oct 30 22:44:16 2020 +0200 net/mlx5: E-Switch, let user to enable disable metadata Currently each packet inserted in eswitch is tagged with a internal metadata to indicate source vport. Metadata tagging is not always needed. Metadata insertion is needed for multi-port RoCE, failover between representors and stacked devices. In many other cases, metadata enablement is not needed. Metadata insertion slows down the packet processing rate of the E-switch when it is in switchdev mode. Below table show performance gain with metadata disabled for VXLAN offload rules in both SMFS and DMFS steering mode on ConnectX-5 device. ---------------------------------------------- | steering | metadata | pkt size | rx pps | | mode | | | (million) | ---------------------------------------------- | smfs | disabled | 128Bytes | 42 | ---------------------------------------------- | smfs | enabled | 128Bytes | 36 | ---------------------------------------------- | dmfs | disabled | 128Bytes | 42 | ---------------------------------------------- | dmfs | enabled | 128Bytes | 36 | ---------------------------------------------- Hence, allow user to disable metadata using driver specific devlink parameter. Metadata setting of the eswitch is applicable only for the switchdev mode. Example to show and disable metadata before changing eswitch mode: $ devlink dev param show pci/0000:06:00.0 name esw_port_metadata pci/0000:06:00.0: name esw_port_metadata type driver-specific values: cmode runtime value true $ devlink dev param set pci/0000:06:00.0 \ name esw_port_metadata value false cmode runtime $ devlink dev eswitch set pci/0000:06:00.0 mode switchdev Signed-off-by: Parav Pandit Reviewed-by: Roi Dayan Reviewed-by: Vu Pham Signed-off-by: Saeed Mahameed --- changelog: v1->v2: - added performance numbers in commit log - updated commit log and documentation for switchdev mode - added explicit note on when user can disable metadata in documentation commit 43dcf6ccf8953a868dfd194ff2fad279eb55883e Author: Keqian Zhu Date: Mon Apr 12 10:44:15 2021 +0800 vfio/iommu_type1: Remove unused pinned_page_dirty_scope in vfio_iommu pinned_page_dirty_scope is optimized out by commit 010321565a7d ("vfio/iommu_type1: Mantain a counter for non_pinned_groups"), but appears again due to some issues during merging branches. We can safely remove it here. Signed-off-by: Keqian Zhu Message-Id: <20210412024415.30676-1-zhukeqian1@huawei.com> Signed-off-by: Alex Williamson commit a00fcbc115f9c934fe92e96358a7f392bb5549f0 Merge: 4ce535ec0084f d434405aaab7d Author: Greg Kroah-Hartman Date: Wed Apr 14 19:53:39 2021 +0200 Merge tag 'v5.12-rc7' into driver-core-next We need the driver core fix in here as well. Signed-off-by: Greg Kroah-Hartman commit 23188e0d45c505b9c3175121855b793578ee50f0 Author: Gustavo Pimentel Date: Sat Apr 10 16:52:59 2021 +0200 dw-xdata-pcie: Update outdated info and improve text format Removes old information related to the stop file interface in sysfs left by mistake during patch revision. Improves the document text format to be more user-friendly and adds basic driver related information, such as support, datasheet, and author. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/4e72f931474a784d478e5a67961ecf116911997a.1618066164.git.gustavo.pimentel@synopsys.com Signed-off-by: Greg Kroah-Hartman commit b21a57636c71c95deac98c9136ac91c975aa6e6c Author: Gustavo Pimentel Date: Sat Apr 10 16:52:58 2021 +0200 dw-xdata-pcie: Fix documentation build warns Fixes documentation build warns related to indentation, text formatting, and missing reference on toc. This fix solves the following warnings: WARNING: Unexpected indentation. WARNING: Block quote ends without a blank line; unexpected unindent. WARNING: document isn't included in any toctree Link: https://lore.kernel.org/linux-next/20210406214615.40cf3493@canb.auug.org.au/ Fixes: e1181b5bbc3c ("Documentation: misc-devices: Add Documentation for dw-xdata-pcie driver") Reported-by: Stephen Rothwell Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/42ed2d9d27579291dc7cce89c0164bd9255fe337.1618066164.git.gustavo.pimentel@synopsys.com Signed-off-by: Greg Kroah-Hartman commit b1160a06e0ea8c59454bc13b8d2a21cf569c0ff5 Author: Chen Hui Date: Fri Apr 9 15:57:48 2021 +0800 PCI: altera-msi: Remove redundant dev_err call in altera_msi_probe() There is a error message within devm_ioremap_resource() already, so remove the dev_err() call to avoid redundant error message. Link: https://lore.kernel.org/r/20210409075748.226141-1-clare.chenhui@huawei.com Signed-off-by: Chen Hui Signed-off-by: Lorenzo Pieralisi Reviewed-by: Ley Foon Tan commit c5de00366e3e675f9e321983d9bd357c1fbea0e9 Author: Pavel Begunkov Date: Wed Apr 14 13:38:37 2021 +0100 io_uring: move poll update into remove not add Having poll update function as a part of IORING_OP_POLL_ADD is not great, we have to do hack around struct layouts and add some overhead in the way of more popular POLL_ADD. Even more serious drawback is that POLL_ADD requires file and always grabs it, and so poll update, which doesn't need it. Incorporate poll update into IORING_OP_POLL_REMOVE instead of IORING_OP_POLL_ADD. It also more consistent with timeout remove/update. Fixes: b69de288e913 ("io_uring: allow events and user_data update of running poll requests") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9096af3e9c8734a34703bd9fb5ab14292296f911 Author: Pavel Begunkov Date: Wed Apr 14 13:38:36 2021 +0100 io_uring: add helper for parsing poll events Isolate poll mask SQE parsing and preparations into a new function, which will be reused shortly. Fixes: b69de288e913 ("io_uring: allow events and user_data update of running poll requests") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9ba5fac8cf3b607652397f863dc229bbc8c3cbc1 Author: Pavel Begunkov Date: Wed Apr 14 13:38:35 2021 +0100 io_uring: fix POLL_REMOVE removing apoll Don't allow REQ_OP_POLL_REMOVE to kill apoll requests, users should not know about it. Also, remove weird -EACCESS in io_poll_update(), it shouldn't know anything about apoll, and have to work even if happened to have a poll and an async poll'ed request with same user_data. Fixes: b69de288e913 ("io_uring: allow events and user_data update of running poll requests") Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 7f00651aebc9af600be1d9df2a775eeeaee6bebb Author: Pavel Begunkov Date: Wed Apr 14 13:38:34 2021 +0100 io_uring: refactor io_ring_exit_work() Don't reinit io_ring_exit_work()'s exit work/completions on each iteration, that's wasteful. Also add list_rotate_left(), so if we failed to complete the task job, we don't try it again and again but defer it until others are processed. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8727f78855b8d770b192949adbb1425092529e0f Author: Chuck Lever Date: Sun Apr 11 14:19:08 2021 -0400 svcrdma: Pass a useful error code to the send_err tracepoint Capture error codes in @ret, which is passed to the send_err tracepoint, so that they can be logged when something goes awry. Signed-off-by: Chuck Lever commit c7731d5e055453191a240d526c9d9e778ae2fce2 Author: Chuck Lever Date: Tue Apr 13 17:55:28 2021 -0400 svcrdma: Rename goto labels in svc_rdma_sendto() Clean up: Make the goto labels consistent with other similar functions. Signed-off-by: Chuck Lever commit 351461f332db5670056a9c6bce6916027f91072f Author: Chuck Lever Date: Tue Apr 13 17:53:22 2021 -0400 svcrdma: Don't leak send_ctxt on Send errors Address a rare send_ctxt leak in the svc_rdma_sendto() error paths. Signed-off-by: Chuck Lever commit 5e0ccd4a3b01c5a71732a13186ca110a138516ea Author: Eric Dumazet Date: Tue Apr 13 13:33:52 2021 -0700 rseq: Optimise rseq_get_rseq_cs() and clear_rseq_cs() Commit ec9c82e03a74 ("rseq: uapi: Declare rseq_cs field as union, update includes") added regressions for our servers. Using copy_from_user() and clear_user() for 64bit values is suboptimal. We can use faster put_user() and get_user() on 64bit arches. Signed-off-by: Eric Dumazet Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mathieu Desnoyers Link: https://lkml.kernel.org/r/20210413203352.71350-4-eric.dumazet@gmail.com commit 0ed96051531ecc6965f6456d25b19b9b6bdb5c28 Author: Eric Dumazet Date: Tue Apr 13 13:33:51 2021 -0700 rseq: Remove redundant access_ok() After commit 8f2817701492 ("rseq: Use get_user/put_user rather than __get_user/__put_user") we no longer need an access_ok() call from __rseq_handle_notify_resume() Mathieu pointed out the same cleanup can be done in rseq_syscall(). Signed-off-by: Eric Dumazet Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mathieu Desnoyers Link: https://lkml.kernel.org/r/20210413203352.71350-3-eric.dumazet@gmail.com commit 60af388d23889636011488c42763876bcdda3eab Author: Eric Dumazet Date: Tue Apr 13 13:33:50 2021 -0700 rseq: Optimize rseq_update_cpu_id() Two put_user() in rseq_update_cpu_id() are replaced by a pair of unsafe_put_user() with appropriate surroundings. This removes one stac/clac pair on x86 in fast path. Signed-off-by: Eric Dumazet Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mathieu Desnoyers Link: https://lkml.kernel.org/r/20210413203352.71350-2-eric.dumazet@gmail.com commit 4bad58ebc8bc4f20d89cff95417c9b4674769709 Author: Thomas Gleixner Date: Tue Mar 23 22:05:39 2021 +0100 signal: Allow tasks to cache one sigqueue struct The idea for this originates from the real time tree to make signal delivery for realtime applications more efficient. In quite some of these application scenarios a control tasks signals workers to start their computations. There is usually only one signal per worker on flight. This works nicely as long as the kmem cache allocations do not hit the slow path and cause latencies. To cure this an optimistic caching was introduced (limited to RT tasks) which allows a task to cache a single sigqueue in a pointer in task_struct instead of handing it back to the kmem cache after consuming a signal. When the next signal is sent to the task then the cached sigqueue is used instead of allocating a new one. This solved the problem for this set of application scenarios nicely. The task cache is not preallocated so the first signal sent to a task goes always to the cache allocator. The cached sigqueue stays around until the task exits and is freed when task::sighand is dropped. After posting this solution for mainline the discussion came up whether this would be useful in general and should not be limited to realtime tasks: https://lore.kernel.org/r/m11rcu7nbr.fsf@fess.ebiederm.org One concern leading to the original limitation was to avoid a large amount of pointlessly cached sigqueues in alive tasks. The other concern was vs. RLIMIT_SIGPENDING as these cached sigqueues are not accounted for. The accounting problem is real, but on the other hand slightly academic. After gathering some statistics it turned out that after boot of a regular distro install there are less than 10 sigqueues cached in ~1500 tasks. In case of a 'mass fork and fire signal to child' scenario the extra 80 bytes of memory per task are well in the noise of the overall memory consumption of the fork bomb. If this should be limited then this would need an extra counter in struct user, more atomic instructions and a seperate rlimit. Yet another tunable which is mostly unused. The caching is actually used. After boot and a full kernel compile on a 64CPU machine with make -j128 the number of 'allocations' looks like this: From slab: 23996 From task cache: 52223 I.e. it reduces the number of slab cache operations by ~68%. A typical pattern there is: <...>-58490 __sigqueue_alloc: for 58488 from slab ffff8881132df460 <...>-58488 __sigqueue_free: cache ffff8881132df460 <...>-58488 __sigqueue_alloc: for 1149 from cache ffff8881103dc550 bash-1149 exit_task_sighand: free ffff8881132df460 bash-1149 __sigqueue_free: cache ffff8881103dc550 The interesting sequence is that the exiting task 58488 grabs the sigqueue from bash's task cache to signal exit and bash sticks it back into it's own cache. Lather, rinse and repeat. The caching is probably not noticable for the general use case, but the benefit for latency sensitive applications is clear. While kmem caches are usually just serving from the fast path the slab merging (default) can depending on the usage pattern of the merged slabs cause occasional slow path allocations. The time spared per cached entry is a few micro seconds per signal which is not relevant for e.g. a kernel build, but for signal heavy workloads it's measurable. As there is no real downside of this caching mechanism making it unconditionally available is preferred over more conditional code or new magic tunables. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Oleg Nesterov Link: https://lkml.kernel.org/r/87sg4lbmxo.fsf@nanos.tec.linutronix.de commit 69995ebbb9d3717306a165db88a1292b63f77a37 Author: Thomas Gleixner Date: Mon Mar 22 10:19:42 2021 +0100 signal: Hand SIGQUEUE_PREALLOC flag to __sigqueue_alloc() There is no point in having the conditional at the callsite. Just hand in the allocation mode flag to __sigqueue_alloc() and use it to initialize sigqueue::flags. No functional change. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210322092258.898677147@linutronix.de commit 1ceb019e7830fb831dac10b0fe0688dea24687db Merge: 8577bf61a6359 b5fb388da472a Author: Mark Brown Date: Wed Apr 14 16:29:35 2021 +0100 Merge series "kunit: Fix formatting of KUNIT tests to meet the standard" from Nico Pache : There are few instances of KUNIT tests that are not properly defined. This commit focuses on correcting these issues to match the standard defined in the Documentation. Issues Fixed: - tests should end in KUNIT_TEST, some fixes have been applied to correct issues were KUNIT_TESTS is used or KUNIT is not mentioned. - Tests should default to KUNIT_ALL_TESTS - Tests configs tristate should have if !KUNIT_ALL_TESTS No functional changes other than CONFIG name changes Changes since v2: - Split patch 1 by subcomponents - fix issues where config was *KUNIT_TEST_TEST - properly threaded/chained messages Nico Pache (6): kunit: ASoC: topology: adhear to KUNIT formatting standard kunit: software node: adhear to KUNIT formatting standard kunit: ext4: adhear to KUNIT formatting standard kunit: lib: adhear to KUNIT formatting standard kunit: mptcp: adhear to KUNIT formatting standard m68k: update configs to match the proper KUNIT syntax arch/m68k/configs/amiga_defconfig | 6 +++--- arch/m68k/configs/apollo_defconfig | 6 +++--- arch/m68k/configs/atari_defconfig | 6 +++--- arch/m68k/configs/bvme6000_defconfig | 6 +++--- arch/m68k/configs/hp300_defconfig | 6 +++--- arch/m68k/configs/mac_defconfig | 6 +++--- arch/m68k/configs/multi_defconfig | 6 +++--- arch/m68k/configs/mvme147_defconfig | 6 +++--- arch/m68k/configs/mvme16x_defconfig | 6 +++--- arch/m68k/configs/q40_defconfig | 6 +++--- arch/m68k/configs/sun3_defconfig | 6 +++--- arch/m68k/configs/sun3x_defconfig | 6 +++--- drivers/base/test/Kconfig | 2 +- drivers/base/test/Makefile | 2 +- fs/ext4/.kunitconfig | 2 +- fs/ext4/Kconfig | 2 +- fs/ext4/Makefile | 2 +- lib/Kconfig.debug | 21 +++++++++++++-------- lib/Makefile | 6 +++--- net/mptcp/Kconfig | 2 +- net/mptcp/Makefile | 2 +- net/mptcp/crypto.c | 2 +- net/mptcp/token.c | 2 +- sound/soc/Kconfig | 2 +- sound/soc/Makefile | 4 ++-- 25 files changed, 64 insertions(+), 59 deletions(-) -- 2.30.2 commit 8577bf61a6359bf2387f85a2fda713a4f05185c3 Merge: e42b6e813f423 63346d3d2f7cd Author: Mark Brown Date: Wed Apr 14 16:29:34 2021 +0100 Merge series "ASoC: rsnd: tidyup Renesas sound" from Kuninori Morimoto : Hi Mark These are tidyup patches for Renesas sound drivers. Kuninori Morimoto (5): ASoC: rsnd: call rsnd_ssi_master_clk_start() from rsnd_ssi_init() ASoC: rsnd: check all BUSIF status when error ASoC: rsnd: add rsnd_ssi_busif_err_status_clear() ASoC: rsnd: add rsnd_ssi_busif_err_irq_enable/disable() ASoC: rsnd: add usage for SRC sound/soc/sh/rcar/src.c | 9 ++ sound/soc/sh/rcar/ssi.c | 225 ++++++++++++++++++---------------------- 2 files changed, 110 insertions(+), 124 deletions(-) -- 2.25.1 commit 61d74d8e39c88cd5d4300162a0cf96b01b8218d2 Author: Jiapeng Chong Date: Wed Apr 14 14:21:22 2021 +0800 Drivers: hv: vmbus: remove unused function Fix the following clang warning: drivers/hv/ring_buffer.c:89:1: warning: unused function 'hv_set_next_read_location' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Michael Kelley Link: https://lore.kernel.org/r/1618381282-119135-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Wei Liu commit f9386c91574fe6da9f4fca9a47734816b0db0019 Author: Russ Weight Date: Mon Apr 12 12:53:28 2021 -0700 mfd: intel-m10-bmc: Add support for MAX10 BMC Secure Updates Add macros and definitions required by the MAX10 BMC Secure Update driver. Signed-off-by: Russ Weight Signed-off-by: Lee Jones commit 2397c3eef24c3511d2065f4b99c1fae399b9e0df Author: Timon Baetz Date: Mon Apr 5 07:14:35 2021 +0000 Revert "mfd: max8997: Add of_compatible to Extcon and Charger mfd_cell" This reverts commit 9c03008da125c1007919a9186628af3cc105f526. commit 41a8a027f4d3 ("regulator: dt-bindings: Document charger-supply for max8997") introduced a binding which uses a property of the max8997 pmic node to configure charger supply, making subnodes for MFD cells obsolete. Signed-off-by: Timon Baetz Signed-off-by: Lee Jones commit ed25b4f00b61e109b29dc443dd1333b9b0da9bb4 Author: YueHaibing Date: Thu Apr 1 22:18:40 2021 +0800 mfd: twl: Remove unused inline function twl4030charger_usb_en() There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Lee Jones commit f2f2bc3c0cfc81ee70ad97833a5f788f5e58f600 Author: satya priya Date: Fri Apr 9 19:29:25 2021 +0530 dt-bindings: mfd: Convert pm8xxx bindings to yaml Convert pm8xxx bindings from .txt to .yaml format. Also, split this binding into two: parent binding(qcom-pm8xxx.yaml) and child node RTC binding(qcom-pm8xxx-rtc.yaml). Signed-off-by: satya priya Reviewed-by: Bjorn Andersson Reported-by: kernel test robot Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit c3a9432429ebce2fe7f161286b311f6caa31a4e9 Author: satya priya Date: Fri Apr 9 19:29:24 2021 +0530 dt-bindings: mfd: Add compatible for pmk8350 rtc Add compatible string for pmk8350 rtc support. Signed-off-by: satya priya Reviewed-by: Bjorn Andersson Acked-by: Rob Herring Signed-off-by: Lee Jones commit 5a517b5bf687028149d55ba50b393c288a054601 Author: Andy Shevchenko Date: Wed Mar 31 18:48:51 2021 +0300 i2c: designware: Get rid of legacy platform data Platform data is a legacy interface to supply device properties to the driver. In this case we don't have anymore in-kernel users for it. Just remove it for good. Signed-off-by: Andy Shevchenko Acked-by: Wolfram Sang Acked-by: Jarkko Nikula Signed-off-by: Lee Jones commit c58ddd297fb903e11b0fcae0c0d38106125c1b58 Author: Andy Shevchenko Date: Wed Mar 31 18:48:50 2021 +0300 mfd: intel_quark_i2c_gpio: Convert I²C to use software nodes The driver can provide a software node group instead of passing legacy platform data. This will allow to drop the legacy platform data structures along with unifying a child device driver to use same interface for all property providers, i.e. Device Tree, ACPI, and board files. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 922e8ce883e59b52786b2c11656d84dc58ef084a Author: Andy Shevchenko Date: Wed Mar 3 18:49:44 2021 +0200 mfd: lpc_sch: Partially revert "Add support for Intel Quark X1000" The IRQ support for SCH GPIO is not specific to the Intel Quark SoC. Moreover the IRQ routing is quite interesting there, so while it's needs a special support, the driver haven't it anyway yet. Due to above remove basically redundant code of IRQ support. This reverts commit ec689a8a8155ce8b966bd5d7737a3916f5e48be3. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit fe6df2b48043bbe1e852b2320501d3b169363c35 Author: Dinghao Liu Date: Wed Apr 7 13:11:49 2021 +0800 mfd: arizona: Fix rumtime PM imbalance on error pm_runtime_get_sync() will increase the rumtime PM counter even it returns an error. Thus a pairing decrement is needed to prevent refcount leak. Fix this by replacing this API with pm_runtime_resume_and_get(), which will not change the runtime PM counter on error. Signed-off-by: Dinghao Liu Acked-by: Charles Keepax Signed-off-by: Lee Jones commit 0b79c53e8a1c5c26c5a364c8f041ca6890a29f08 Author: Timon Baetz Date: Wed Jan 27 07:32:42 2021 +0000 mfd: max8997: Replace 8998 with 8997 The max8997 header is using "max8998" in some identifiers. Fix it by replacing 8998 with 8997 in enum and macro. Signed-off-by: Timon Baetz Signed-off-by: Lee Jones commit 40cb71f321dd753afa65cf9d90fb803f13b82df0 Author: Andy Shevchenko Date: Tue Apr 6 15:32:20 2021 +0300 mfd: core: Use acpi_find_child_device() for child devices lookup Use acpi_find_child_device() for child devices lookup in mfd_acpi_add_device() instead of open coded approach. No functional change intended. While at it, amend a note comment, since usage of _ADR is found on other platforms and tables than Intel Galileo Gen 2, in particular USB wired devices are using it, according to Microsoft specifications for embedded platforms. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 6dac44c602bef283484ca84591396e65f8d8f1a5 Author: Andy Shevchenko Date: Fri Mar 26 14:48:42 2021 +0200 mfd: intel_quark_i2c_gpio: Don't play dirty trick with const As Linus rightfully noticed, the driver plays dirty trick with const, i.e. it assigns a place holder data structure to the const field in the MFD cell and then drops the const by explicit casting. This is not how it should be. Assign local pointers of the cell and resource to the respective non-const place holders in the intel_quark_i2c_setup() and intel_quark_gpio_setup(). Reported-by: Linus Torvalds Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 91076ebb3e2204cbb81aa2d6930f2a88638e4bb0 Author: Andy Shevchenko Date: Wed Mar 24 19:08:34 2021 +0200 mfd: intel_quark_i2c_gpio: Enable MSI interrupt Allow interrupts to be MSI if supported by hardware. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 98d6e7fce6b0174c701dc596539dc7bc1e96f8ce Author: Andy Shevchenko Date: Tue Mar 23 14:34:32 2021 +0200 mfd: intel_quark_i2c_gpio: Reuse BAR definitions for MFD cell indexing It's convenient and less error prone to use definitions to address different cells in an array. For this purpose we may reuse existing BAR definitions. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit d1157530d476ffce4485182eea5b492065362a09 Author: Andreas Kemnade Date: Mon Mar 15 20:18:32 2021 +0100 mfd: ntxec: Support for EC in Tolino Shine 2 HD Add the version of the EC in the Tolino Shine 2 HD to the supported versions. It seems not to have an RTC and does not ack data written to it. The vendor kernel happily ignores write errors, using I2C via userspace i2c-set also shows the error. So add a quirk to ignore that error. PWM can be successfully configured despite of that error. Signed-off-by: Andreas Kemnade Reviewed-by: Jonathan Neuschäfer Signed-off-by: Lee Jones commit 4917e498c6894ba077867aff78f82cffd5ffbb5c Author: Fabrice Gasnier Date: Wed Mar 3 18:51:35 2021 +0100 mfd: stm32-timers: Avoid clearing auto reload register The ARR register is cleared unconditionally upon probing, after the maximum value has been read. This initial condition is rather not intuitive, when considering the counter child driver. It rather expects the maximum value by default: - The counter interface shows a zero value by default for 'ceiling' attribute. - Enabling the counter without any prior configuration makes it doesn't count. The reset value of ARR register is the maximum. So Choice here is to backup it, and restore it then, instead of clearing its value. It also fixes the initial condition seen by the counter driver. Fixes: d0f949e220fd ("mfd: Add STM32 Timers driver") Signed-off-by: Fabrice Gasnier Acked-by: William Breathitt Gray Signed-off-by: Lee Jones commit 10d82ade4fa7dd032b60fc6ba76cd587b276608e Author: Andy Shevchenko Date: Tue Mar 2 15:56:19 2021 +0200 mfd: intel_quark_i2c_gpio: Replace I²C speeds with descriptive definitions I²C header provides a descriptive definitions for standard bus speeds. Use them instead of plain numbers. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 2b77ea7a0a42878a0a3f2956cfc657281fcf74c0 Author: Andy Shevchenko Date: Tue Mar 2 15:56:18 2021 +0200 mfd: intel_quark_i2c_gpio: Remove unused struct device member The device pointer in the custom structure is not used anywhere, remove it for good. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 1514ce4935f317384313af88c387341997665c78 Author: Andy Shevchenko Date: Tue Mar 2 15:56:17 2021 +0200 mfd: intel_quark_i2c_gpio: Unregister resources in reversed order In ->remove() unregister resources in reversed order, i.e. MFD devices first followed by I²C clock. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 0cab0aa14928ddf626d9e55944b59a3520187ac7 Author: Geert Uytterhoeven Date: Tue Mar 16 14:37:00 2021 +0100 mfd: Kconfig: ABX500_CORE should depend on ARCH_U8500 The ST-Ericsson ABX500 Mixed Signal IC family chips are only present on ST-Ericsson U8500 Series platforms. Hence add a dependency on ARCH_U8500, to prevent asking the user about this driver when configuring a kernel without U8500 support. Also, merely enabling CONFIG_COMPILE_TEST should not enable additional code, and thus should not enable this driver by default. Signed-off-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Signed-off-by: Lee Jones commit 4502647e60cb4afd74f74d648bc2990954c1b73a Author: Andreas Kemnade Date: Sun Mar 14 12:02:36 2021 +0100 mfd: rn5t618: Do not cache various USB related registers These register get reset to their OTP defaults after USB plugging. And while at it, also add a missing register for detecting the charger type. Signed-off-by: Andreas Kemnade Signed-off-by: Lee Jones commit c0d46b89ddeae419ee3ee8679fe6836119a83e14 Author: Wei Yongjun Date: Thu Mar 11 13:15:07 2021 +0000 mfd: Make symbol 'atc260x_i2c_of_match' static The sparse tool complains as follows: drivers/mfd/atc260x-i2c.c:45:27: warning: symbol 'atc260x_i2c_of_match' was not declared. Should it be static? This symbol is not used outside of atc260x-i2c.c, so this commit marks it static. Fixes: f7cb7fe34db9 ("mfd: Add MFD driver for ATC260x PMICs") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Cristian Ciocaltea Signed-off-by: Lee Jones commit b4a66acc0997cff7cb9a4c3992e97808700aa1ff Author: Heikki Krogerus Date: Mon Mar 1 16:42:22 2021 +0200 mfd: core: Remove support for dangling device properties From now on only accepting complete software nodes. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 03152e35dd228065d4189464fe1b2554434da6ac Author: Heikki Krogerus Date: Mon Mar 1 16:42:21 2021 +0200 mfd: intel-lpss: Switch to use the software nodes Software node was always created for the device if it was supplied with additional device properties, so those nodes might as well be constant. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 9677e6f78f75470318f021d0ac43107ffee62dc0 Author: Andy Shevchenko Date: Mon Mar 1 16:42:20 2021 +0200 mfd: intel-lpss: Constify device property structures There is no point to have non-constant device properties in this driver. Thus, constify them for good. Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 42e59982917a25ad254b74e6e8decee5e684763d Author: Heikki Krogerus Date: Mon Mar 1 16:42:19 2021 +0200 mfd: core: Add support for software nodes The old device property API is going to be removed and replaced with the newer software node API. This prepares MFD subsystem for the transition. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones commit 586478bfc9f7e16504d6f64cf18bcbdf6fd0cbc9 Author: Hubert Streidl Date: Tue Mar 16 17:22:37 2021 +0100 mfd: da9063: Support SMBus and I2C mode By default the PMIC DA9063 2-wire interface is SMBus compliant. This means the PMIC will automatically reset the interface when the clock signal ceases for more than the SMBus timeout of 35 ms. If the I2C driver / device is not capable of creating atomic I2C transactions, a context change can cause a ceasing of the clock signal. This can happen if for example a real-time thread is scheduled. Then the DA9063 in SMBus mode will reset the 2-wire interface. Subsequently a write message could end up in the wrong register. This could cause unpredictable system behavior. The DA9063 PMIC also supports an I2C compliant mode for the 2-wire interface. This mode does not reset the interface when the clock signal ceases. Thus the problem depicted above does not occur. This patch tests for the bus functionality "I2C_FUNC_I2C". It can reasonably be assumed that the bus cannot obey SMBus timings if this functionality is set. SMBus commands most probably are emulated in this case which is prone to the latency issue described above. This patch enables the I2C bus mode if I2C_FUNC_I2C is set or otherwise keeps the default SMBus mode. Signed-off-by: Hubert Streidl Signed-off-by: Mark Jonas Reviewed-by: Wolfram Sang Signed-off-by: Lee Jones commit 0c8f2d1081fd67fb045e055f98869bc0f64e44ec Author: Krzysztof Kozlowski Date: Tue Mar 16 14:25:15 2021 +0100 mfd: sec: Initialize driver via module_platform_driver() The driver was using subsys_initcall() because in old times deferred probe was not supported everywhere and specific ordering was needed. Since probe deferral works fine and specific ordering is discouraged (hides dependencies between drivers and couples their boot order), the driver can be converted to regular module_platform_driver. Signed-off-by: Krzysztof Kozlowski Tested-by: Marek Szyprowski Signed-off-by: Lee Jones commit 21119896d26881505084d78a75231663fb30e735 Author: Krzysztof Kozlowski Date: Tue Mar 16 09:10:00 2021 +0100 MAINTAINERS: Move Milo Kim to credits Milo Kim's email in TI bounces with permanent error (550: Invalid recipient). Last email from him on LKML was in 2017. Move Milo Kim to credits and remove the separate driver entries for: - TI LP855x backlight driver, - TI LP8727 charger driver, - TI LP8788 MFD (ADC, LEDs, charger and regulator) drivers. Signed-off-by: Krzysztof Kozlowski Acked-by: Sebastian Reichel Signed-off-by: Lee Jones commit 58d91f1c1701de9420acc43a2f4f8004af85c363 Author: Xu Yilun Date: Wed Mar 10 23:55:48 2021 +0800 MAINTAINERS: Add entry for Intel MAX 10 mfd driver This patch adds maintainer info for Intel MAX 10 mfd driver. Signed-off-by: Xu Yilun Reviewed-by: Tom Rix Signed-off-by: Lee Jones commit 8169f74ca6f318f4187536050d2f5408fce9c264 Author: Matthew Gerlach Date: Wed Mar 10 23:55:47 2021 +0800 mfd: intel-m10-bmc: Add access table configuration to the regmap This patch adds access tables to the MAX 10 BMC regmap. This prevents the host from accessing the unwanted I/O space. It also filters out the invalid outputs when reading the regmap debugfs interface. Signed-off-by: Matthew Gerlach Signed-off-by: Xu Yilun Reviewed-by: Tom Rix Signed-off-by: Lee Jones commit 5893f4d1f43036664010e3ae1d3f7a98b2165a5d Author: Xu Yilun Date: Wed Mar 10 23:55:46 2021 +0800 mfd: intel-m10-bmc: Simplify the legacy version reg definition The version register is the only one in the legacy I/O space to be accessed, so it is not necessary to define the legacy base & version register offset. A direct definition of the legacy version register address would be fine. Signed-off-by: Xu Yilun Reviewed-by: Tom Rix Signed-off-by: Lee Jones commit d9b326b2c3673f939941806146aee38e5c635fd0 Author: Xu Yilun Date: Wed Mar 10 23:55:45 2021 +0800 mfd: intel-m10-bmc: Fix the register access range This patch fixes the max register address of MAX 10 BMC. The range 0x20000000 ~ 0x200000fc are for control registers of the QSPI flash controller, which are not accessible to host. Signed-off-by: Xu Yilun Reviewed-by: Tom Rix Signed-off-by: Lee Jones commit 23144a323118380a97e39b3b3f09ae3099c5aeb4 Author: Yang Li Date: Tue Feb 23 17:42:24 2021 +0800 mfd: lm3533: Switch to using the new API kobj_to_dev() Fixes the following coccicheck warning: drivers/mfd/lm3533-core.c:361:60-61: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Lee Jones commit 3a65a3e72cd9797b845567ccd7bf4b00a530db54 Author: Luca Ceresoli Date: Fri Feb 26 15:28:51 2021 +0100 dt-bindings: mfd: lp875xx: Add optional reset GPIO Document the LP8756x-Q1 and LP87524-Q1 ICs reset pin. Signed-off-by: Luca Ceresoli Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 0517224c567dea9ea3edbfc28dcd9288e152d186 Author: Xu Yilun Date: Mon Mar 1 13:59:45 2021 +0800 MAINTAINERS: Add entry for Intel MAX 10 mfd driver This patch adds maintainer info for Intel MAX 10 mfd driver. Signed-off-by: Xu Yilun Reviewed-by: Tom Rix Signed-off-by: Lee Jones commit 5a2cf054221a78f394b4c0f4c0ed1ae94a710ae3 Author: Wei Yongjun Date: Mon Mar 8 12:31:47 2021 +0000 mfd: ene-kb3930: Make local symbol 'kb3930_power_off' static The sparse tool complains as follows: drivers/mfd/ene-kb3930.c:36:15: warning: symbol 'kb3930_power_off' was not declared. Should it be static? The symbol is not used outside of this file. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Lubomir Rintel Signed-off-by: Lee Jones commit 16f961544bfd7170f75d805d7585e09023671dbc Author: Arnd Bergmann Date: Sun Mar 7 21:23:25 2021 +0100 mfd: Remove support for AB3100 The ST-Ericsson U300 platform has been removed, so this driver is no longer needed. Signed-off-by: Arnd Bergmann Reviewed-by: Linus Walleij Signed-off-by: Lee Jones commit a98688d2ddfe274cb7c7ca3c6b6afbe9f844ffc3 Author: Linus Walleij Date: Sun Mar 7 00:22:27 2021 +0100 mfd: ab8500: Drop bm disable parameter Nobody is passing the module parameter to disable the battery management portions so just drop this parameter. Signed-off-by: Linus Walleij Signed-off-by: Lee Jones commit cb9e880a797a77c21c0f0e7ccd553da8eb4870af Author: Rikard Falkeborn Date: Fri Mar 5 00:07:09 2021 +0100 mfd: stmpe: Revert "Constify static struct resource" In stmpe_devices_init(), the start and end field of these structs are modified, so they can not be const. Add a comment to those structs that lacked it to reduce the risk that this happens again. This reverts commit 8d7b3a6dac4eae22c58b0853696cbd256966741b. Fixes: 8d7b3a6dac4e ("mfd: stmpe: Constify static struct resource") Reported-by: Andy Shevchenko Signed-off-by: Rikard Falkeborn Reviewed-by: Andy Shevchenko Signed-off-by: Lee Jones commit 911490a5ca2a3289ac734ca7c127c7dbc72466cc Author: Luca Ceresoli Date: Fri Feb 19 23:39:09 2021 +0100 mfd: lp87565: Remove unused define 'LP87565_NUM_BUCK' This define appears incorrect, but it is completely unused so it can be removed. Signed-off-by: Luca Ceresoli Signed-off-by: Lee Jones commit c4d09226d5c484665e5f394bd8d278e071c5e2ee Author: Wei Yongjun Date: Wed Feb 10 07:56:26 2021 +0000 mfd: arizona: Make some symbols static The sparse tool complains as follows: drivers/mfd/arizona-spi.c:28:31: warning: symbol 'reset_gpios' was not declared. Should it be static? drivers/mfd/arizona-spi.c:29:31: warning: symbol 'ldoena_gpios' was not declared. Should it be static? Those symbols are not used outside of arizona-spi.c, so this commit marks them static. Fixes: e933836744a2 ("mfd: arizona: Add support for ACPI enumeration of WM5102 connected over SPI") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Hans de Goede Acked-by: Charles Keepax Signed-off-by: Lee Jones commit 1c7c1488898e1b3fd15d38f373a8c947a2d9b1e3 Author: Jiapeng Chong Date: Wed Feb 10 15:07:36 2021 +0800 mfd: dbx500-prcmu: Use true and false for bool variable Fix the following coccicheck warning: ./include/linux/mfd/db8500-prcmu.h:723:8-9: WARNING: return of 0/1 in function 'db8500_prcmu_is_ac_wake_requested' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Lee Jones commit 94f6f62a63853091882ee2a81a5f30152f4747c4 Author: Lee Jones Date: Mon Mar 1 10:30:26 2021 +0000 dt-bindings: mfd: ricoh,rn5t618: Trivial: Fix spelling mistake of 'additionally' Signed-off-by: Lee Jones commit 7bab92ca364affb36d1f34ff5893c55621c2f85a Author: Andreas Kemnade Date: Sun Jan 31 22:57:30 2021 +0100 dt-bindings: mfd: Convert rn5t618 to json-schema Convert the RN5T618 binding to DT schema format. Also clearly state which regulators are available. Signed-off-by: Andreas Kemnade Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit a7639136a929fd16dbb1d4a2b531fc9c57eb8bd2 Merge: 1658d6242a3d0 42fc191d60e6d Author: Lee Jones Date: Wed Apr 14 16:01:10 2021 +0100 Merge tag 'ib-mfd-watchdog-v5.13' into ibs-for-mfd-merged Immutable branch between MFD and Watchdog due for the v5.13 merge window commit 1658d6242a3d0bf95d93b8297fe729b2073d7899 Merge: 5a8a64d9a38b9 a908a716696ee eac013a0b7041 aa47ad3f853ae ee0975c3089e1 edbda8f787235 fb8fee9efdcf0 Author: Lee Jones Date: Wed Apr 14 15:59:22 2021 +0100 Merge tags 'ib-mfd-clk-gpio-regulator-rtc-v5.13', 'ib-mfd-extcon-v5.13', 'ib-mfd-input-v5.13-1', 'ib-mfd-platform-x86-v5.13', 'ib-mfd-power-v5.13', 'ib-mfd-pwm-rtc-v5.13-1' and 'ib-regulator-list-ramp-helpers-v5.13' into ibs-for-mfd-merged Immutable branch between MFD, Clock, GPIO, Regulator and RTC due for the v5.13 merge window Immutable branch between MFD and Extcon due for the v5.13 merge window Immutable branch between MFD and Input due for the v5.13 merge window Immutable branch between MFD and Platform/x86 due for the v5.13 merge window Immutable branch between MFD and Power due for the v5.13 merge window Immutable branch between MFD, PWM and RTC due for the v5.13 merge window commit edf696f26855788cdff832ac83319e1f2aafcc90 Author: Arnaud Pouliquen Date: Wed Mar 31 09:33:47 2021 +0200 remoteproc: stm32: add capability to detach A mechanism similar to the shutdown mailbox signal is implemented to detach a remote processor. Upon detachment, a signal is sent to the remote firmware, allowing it to perform specific actions such as stopping rpmsg communication. The Cortex-M hold boot is also disabled to allow the remote processor to restart in case of crash. Signed-off-by: Arnaud Pouliquen Reviewed-by: Mathieu Poirier Tested-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210331073347.8293-3-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit aca8f94e5b69b31d7a6a18476a1011093e2a1c30 Author: Arnaud Pouliquen Date: Wed Mar 31 09:33:46 2021 +0200 dt-bindings: remoteproc: stm32-rproc: add new mailbox channel for detach Add the "detach" mailbox item, that allows to define a mailbox to send a IPCC signal to the remote processor on remoteproc detach action. Signed-off-by: Arnaud Pouliquen Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210331073347.8293-2-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit febfeaaefefb6e3a42e4ca279270a740014ce227 Author: Trond Myklebust Date: Wed Apr 14 10:27:39 2021 -0400 NFSv42: Don't force attribute revalidation of the copy offload source When a copy offload is performed, we do not expect the source file to change other than perhaps to see the atime be updated. Signed-off-by: Trond Myklebust commit 4b853c236c7b5161a2e444bd8b3c76fe5aa5ddcb Author: Chunfeng Yun Date: Sat Apr 10 13:10:06 2021 +0800 usb: xhci-mtk: remove unused members Now some members about phys and wakeup are not used anymore, remove them. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1618031406-15347-5-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 7fed6368ebd9de2025e4faf97b82c5f1e1d9097d Author: Chunfeng Yun Date: Sat Apr 10 13:10:05 2021 +0800 usb: xhci-mtk: use clock bulk to get clocks Use clock bulk helpers to get/enable/disable clocks, meanwhile make sys_ck optional, then will be easier to handle clocks. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1618031406-15347-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 04284eb74e0c350be5e75eda178b97063343af13 Author: Chunfeng Yun Date: Sat Apr 10 13:10:04 2021 +0800 usb: xhci-mtk: add support runtime PM A dedicated wakeup irq will be used to handle runtime suspend/resume, we use dev_pm_set_dedicated_wake_irq API to take care of requesting and attaching wakeup irq, then the suspend/resume framework will help to enable/disable wakeup irq. The runtime PM is default off since some platforms may not support it. users can enable it via power/control (set "auto") in sysfs. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1618031406-15347-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 94d202d5ca39d0eb757d16ef2624b013fb64f64d Author: Trond Myklebust Date: Wed Apr 14 10:10:09 2021 -0400 NFSv42: Copy offload should update the file size when appropriate If the result of a copy offload or clone operation is to grow the destination file size, then we should update it. The reason is that when a client holds a delegation, it is authoritative for the file size. Fixes: 16abd2a0c124 ("NFSv4.2: fix client's attribute cache management for copy_file_range") Signed-off-by: Trond Myklebust commit fe8e488058c47e9a8a2c85321f7198a0a17b0131 Author: Chunfeng Yun Date: Sat Apr 10 13:10:03 2021 +0800 dt-bindings: usb: mtk-xhci: add wakeup interrupt Add an interrupt which is EINT usually to support runtime PM, meanwhile add "interrupt-names" property, for backward compatibility, it's optional and used when wakeup interrupt exists Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1618031406-15347-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 82dad9fb68fbcce4986503ae446e409ba2aad699 Author: Chunfeng Yun Date: Sat Apr 10 13:10:02 2021 +0800 usb: xhci-mtk: check return value in suspend/resume hooks Return error number if encounter errors during suspend and resume. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1618031406-15347-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 1373fefc6243cc96b3565f0ffffadfac4ccfb977 Author: Badhri Jagan Sridharan Date: Tue Apr 13 19:39:59 2021 -0700 usb: typec: tcpm: Allow slow charging loops to comply to pSnkStby When a PD charger advertising Rp-3.0 is connected to a sink port, the sink port current limit would 3A, during SNK_DISCOVERY, till power negotiation starts. Once the negotiation starts the power limit needs to drop down to pSnkStby(500mA @ 5V) and to negotiated current limit once the explicit contract is in place. Not all charging loops can ramp up to 3A and drop down to 500mA within tSnkStdby which is 15ms. The port partner might hard reset if tSnkStdby is not met. To solve this problem, this patch introduces slow-charger-loop which when set makes the port request PD_P_SNK_STDBY_MW upon entering SNK_DISCOVERY(instead of 3A or the 1.5A during SNK_DISCOVERY) and the actual currrent limit after RX of PD_CTRL_PSRDY for PD link or during SNK_READY for non-pd link. Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210414024000.4175263-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 123086843372bc93d26f52edfb71dbf951cd2f17 Author: Badhri Jagan Sridharan Date: Tue Apr 13 19:39:58 2021 -0700 usb: typec: tcpm: Honour pSnkStdby requirement during negotiation >From PD Spec: The Sink Shall transition to Sink Standby before a positive or negative voltage transition of VBUS. During Sink Standby the Sink Shall reduce its power draw to pSnkStdby. This allows the Source to manage the voltage transition as well as supply sufficient operating current to the Sink to maintain PD operation during the transition. The Sink Shall complete this transition to Sink Standby within tSnkStdby after evaluating the Accept Message from the Source. The transition when returning to Sink operation from Sink Standby Shall be completed within tSnkNewPower. The pSnkStdby requirement Shall only apply if the Sink power draw is higher than this level. The above requirement needs to be met to prevent hard resets from port partner. Without the patch: (5V/3A during SNK_DISCOVERY all the way through explicit contract) [ 95.711984] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected] [ 95.712007] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS] [ 95.712017] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS] [ 95.837190] VBUS on [ 95.882075] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms] [ 95.882082] state change SNK_DEBOUNCED -> SNK_ATTACHED [rev3 NONE_AMS] [ 95.882086] polarity 1 [ 95.883151] set_auto_vbus_discharge_threshold mode:0 pps_active:n vbus:5000 ret:0 [ 95.883441] enable vbus discharge ret:0 [ 95.883445] Requesting mux state 1, usb-role 2, orientation 2 [ 95.883776] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS] [ 95.883879] pending state change SNK_STARTUP -> SNK_DISCOVERY @ 500 ms [rev3 NONE_AMS] [ 96.038960] VBUS on [ 96.383939] state change SNK_STARTUP -> SNK_DISCOVERY [delayed 500 ms] [ 96.383946] Setting voltage/current limit 5000 mV 3000 mA [ 96.383961] vbus=0 charge:=1 [ 96.386044] state change SNK_DISCOVERY -> SNK_WAIT_CAPABILITIES [rev3 NONE_AMS] [ 96.386309] pending state change SNK_WAIT_CAPABILITIES -> HARD_RESET_SEND @ 450 ms [rev3 NONE_AMS] [ 96.394404] PD RX, header: 0x2161 [1] [ 96.394408] PDO 0: type 0, 5000 mV, 3000 mA [E] [ 96.394410] PDO 1: type 0, 9000 mV, 2000 mA [] [ 96.394412] state change SNK_WAIT_CAPABILITIES -> SNK_NEGOTIATE_CAPABILITIES [rev2 POWER_NEGOTIATION] [ 96.394416] Setting usb_comm capable false [ 96.395083] cc=0 cc1=0 cc2=5 vbus=0 vconn=sink polarity=1 [ 96.395089] Requesting PDO 1: 9000 mV, 2000 mA [ 96.395093] PD TX, header: 0x1042 [ 96.397404] PD TX complete, status: 0 [ 96.397424] pending state change SNK_NEGOTIATE_CAPABILITIES -> HARD_RESET_SEND @ 60 ms [rev2 POWER_NEGOTIATION] [ 96.400826] PD RX, header: 0x363 [1] [ 96.400829] state change SNK_NEGOTIATE_CAPABILITIES -> SNK_TRANSITION_SINK [rev2 POWER_NEGOTIATION] [ 96.400832] pending state change SNK_TRANSITION_SINK -> HARD_RESET_SEND @ 500 ms [rev2 POWER_NEGOTIATION] [ 96.577315] PD RX, header: 0x566 [1] [ 96.577321] Setting voltage/current limit 9000 mV 2000 mA [ 96.578363] set_auto_vbus_discharge_threshold mode:3 pps_active:n vbus:9000 ret:0 [ 96.578370] state change SNK_TRANSITION_SINK -> SNK_READY [rev2 POWER_NEGOTIATION] With the patch: [ 168.398573] CC1: 0 -> 0, CC2: 0 -> 5 [state TOGGLING, polarity 0, connected] [ 168.398605] state change TOGGLING -> SNK_ATTACH_WAIT [rev3 NONE_AMS] [ 168.398619] pending state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED @ 170 ms [rev3 NONE_AMS] [ 168.522348] VBUS on [ 168.568676] state change SNK_ATTACH_WAIT -> SNK_DEBOUNCED [delayed 170 ms] [ 168.568684] state change SNK_DEBOUNCED -> SNK_ATTACHED [rev3 NONE_AMS] [ 168.568688] polarity 1 [ 168.569867] set_auto_vbus_discharge_threshold mode:0 pps_active:n vbus:5000 ret:0 [ 168.570158] enable vbus discharge ret:0 [ 168.570161] Requesting mux state 1, usb-role 2, orientation 2 [ 168.570504] state change SNK_ATTACHED -> SNK_STARTUP [rev3 NONE_AMS] [ 168.570634] pending state change SNK_STARTUP -> SNK_DISCOVERY @ 500 ms [rev3 NONE_AMS] [ 169.070689] state change SNK_STARTUP -> SNK_DISCOVERY [delayed 500 ms] [ 169.070695] Setting voltage/current limit 5000 mV 3000 mA [ 169.070702] vbus=0 charge:=1 [ 169.072719] state change SNK_DISCOVERY -> SNK_WAIT_CAPABILITIES [rev3 NONE_AMS] [ 169.073145] pending state change SNK_WAIT_CAPABILITIES -> HARD_RESET_SEND @ 450 ms [rev3 NONE_AMS] [ 169.077162] PD RX, header: 0x2161 [1] [ 169.077172] PDO 0: type 0, 5000 mV, 3000 mA [E] [ 169.077178] PDO 1: type 0, 9000 mV, 2000 mA [] [ 169.077183] state change SNK_WAIT_CAPABILITIES -> SNK_NEGOTIATE_CAPABILITIES [rev2 POWER_NEGOTIATION] [ 169.077191] Setting usb_comm capable false [ 169.077753] cc=0 cc1=0 cc2=5 vbus=0 vconn=sink polarity=1 [ 169.077759] Requesting PDO 1: 9000 mV, 2000 mA [ 169.077762] PD TX, header: 0x1042 [ 169.079990] PD TX complete, status: 0 [ 169.080013] pending state change SNK_NEGOTIATE_CAPABILITIES -> HARD_RESET_SEND @ 60 ms [rev2 POWER_NEGOTIATION] [ 169.083183] VBUS on [ 169.084195] PD RX, header: 0x363 [1] [ 169.084200] state change SNK_NEGOTIATE_CAPABILITIES -> SNK_TRANSITION_SINK [rev2 POWER_NEGOTIATION] [ 169.084206] Setting standby current 5000 mV @ 500 mA [ 169.084209] Setting voltage/current limit 5000 mV 500 mA [ 169.084220] pending state change SNK_TRANSITION_SINK -> HARD_RESET_SEND @ 500 ms [rev2 POWER_NEGOTIATION] [ 169.260222] PD RX, header: 0x566 [1] [ 169.260227] Setting voltage/current limit 9000 mV 2000 mA [ 169.261315] set_auto_vbus_discharge_threshold mode:3 pps_active:n vbus:9000 ret:0 [ 169.261321] state change SNK_TRANSITION_SINK -> SNK_READY [rev2 POWER_NEGOTIATION] [ 169.261570] AMS POWER_NEGOTIATION finished Fixes: f0690a25a140b ("staging: typec: USB Type-C Port Manager (tcpm)") Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210414024000.4175263-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit b5fb388da472a69858355560d803602e0ace1006 Author: Nico Pache Date: Wed Apr 14 04:58:04 2021 -0400 ASoC: topology: adhere to KUNIT formatting standard Drop 'S' from end of SND_SOC_TOPOLOGY_KUNIT_TESTS inorder to adhear to the KUNIT *_KUNIT_TEST config name format. Signed-off-by: Nico Pache Link: https://lore.kernel.org/r/dcf79e592f9a7e14483dde32ac561f6af2632e50.1618388989.git.npache@redhat.com Signed-off-by: Mark Brown commit e42b6e813f4231d3c38362fd800724bd41040ef9 Author: Yang Li Date: Wed Apr 14 14:14:43 2021 +0800 ASoC: cs35l35: remove unused including Fix the following versioncheck warning: ./sound/soc/codecs/cs35l35.c: 12 linux/version.h not needed. Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1618380883-114841-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 4d5d75ce2b32577afef26a233119d8ee1b764ea7 Author: Shengjiu Wang Date: Wed Apr 14 14:33:44 2021 +0800 ASoC: ak5558: change function name to ak5558_reset Change function name to ak5558_reset to match devicetree property "reset-gpios". Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1618382024-31725-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 0b93bbc977af55fd10687f2c96c807cba95cb927 Author: Shengjiu Wang Date: Wed Apr 14 14:33:43 2021 +0800 ASoC: ak5558: correct reset polarity Reset (aka power off) happens when the reset gpio is made active. The reset gpio is GPIO_ACTIVE_LOW Fixes: 920884777480 ("ASoC: ak5558: Add support for AK5558 ADC driver") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1618382024-31725-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 63346d3d2f7cd96746149b9710a4cc5401c0cb5c Author: Kuninori Morimoto Date: Thu Apr 8 13:29:15 2021 +0900 ASoC: rsnd: add usage for SRC This patch add missing usage comment for SRC. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87zgy9z9es.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 15c57ce07ce207069f1cd57ec117b11871f3afa6 Author: Kuninori Morimoto Date: Thu Apr 8 13:29:08 2021 +0900 ASoC: rsnd: add rsnd_ssi_busif_err_irq_enable/disable() Current ssi.c has duplicated code to control BUSIF over/under run interrupt. This patch adds new rsnd_ssi_busif_err_irq_enable/disable() and share the code. Signed-off-by: Kuninori Morimoto Cc: Yongbo Zhang Cc: Chen Li Link: https://lore.kernel.org/r/871rbl1jsb.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 691b379cbe348fbead33e49d1c1d0f045a2e3446 Author: Kuninori Morimoto Date: Thu Apr 8 13:28:55 2021 +0900 ASoC: rsnd: add rsnd_ssi_busif_err_status_clear() Current ssi.c clears BUSIF error status at __rsnd_ssi_interrupt(), but its code is verbose. This patch off-load it to rsnd_ssi_busif_err_status_clear(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8735w11jso.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a4856e15e58b54977f1c0c0299309ad4d1f13365 Author: Kuninori Morimoto Date: Thu Apr 8 13:28:47 2021 +0900 ASoC: rsnd: check all BUSIF status when error commit 66c705d07d784 ("SoC: rsnd: add interrupt support for SSI BUSIF buffer") adds __rsnd_ssi_interrupt() checks for BUSIF status, but is using "break" at for loop. This means it is not checking all status. Let's check all BUSIF status. Fixes: commit 66c705d07d784 ("SoC: rsnd: add interrupt support for SSI BUSIF buffer") Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874kgh1jsw.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a122a116fc6d8fcf2f202dcd185173a54268f239 Author: Kuninori Morimoto Date: Thu Apr 8 13:28:38 2021 +0900 ASoC: rsnd: call rsnd_ssi_master_clk_start() from rsnd_ssi_init() Current rsnd needs to call .prepare (P) for clock settings, .trigger for playback start (S) and stop (E). It should be called as below from SSI point of view. P -> S -> E -> P -> S -> E -> ... But, if you used MIXer, below case might happen (2) 1: P -> S ---> E -> ... 2: P ----> S -> ... (1) (3) P(1) setups clock, but E(2) resets it. and starts playback (3). In such case, it will reports "SSI parent/child should use same rate". rsnd_ssi_master_clk_start() which is the main function at (P) was called from rsnd_ssi_init() (= S) before, but was moved by below patch to rsnd_soc_dai_prepare() (= P) to avoid using clk_get_rate() which shouldn't be used under atomic context. commit 4d230d1271064 ("ASoC: rsnd: fixup not to call clk_get/set under non-atomic") Because of above patch, rsnd_ssi_master_clk_start() is now called at (P) which is for non atomic context. But (P) is assuming that spin lock is *not* used. One issue now is rsnd_ssi_master_clk_start() is checking ssi->xxx which should be protected by spin lock. After above patch, adg.c had below patch for other reasons. commit 06e8f5c842f2d ("ASoC: rsnd: don't call clk_get_rate() under atomic context") clk_get_rate() is used at probe() timing by this patch. In other words, rsnd_ssi_master_clk_start() is no longer using clk_get_rate() any more. This means we can call it from rsnd_ssi_init() (= S) again which is protected by spin lock. This patch re-move it to under spin lock, and solves 1. checking ssi->xxx without spin lock issue. 2. clk setting / device start / device stop race condition. Reported-by: Linh Phung T. Y. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875z0x1jt5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 475e8be53d0496f9bc6159f4abb3ff5f9b90e8de Author: Thinh Nguyen Date: Tue Apr 13 19:13:18 2021 -0700 usb: dwc3: gadget: Check for disabled LPM quirk If the device doesn't support LPM, make sure to disable the LPM capability and don't advertise to the host that it supports it. Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/9e68527ff932b1646f92a7593d4092a903754666.1618366071.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 568262bf5492a9bb2fcc4c204b8d38fd6be64e28 Author: Sandeep Maheswaram Date: Wed Apr 14 11:33:29 2021 +0530 usb: dwc3: core: Add shutdown callback for dwc3 This patch adds a shutdown callback to USB DWC core driver to ensure that it is properly shutdown in reboot/shutdown path. This is required where SMMU address translation is 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). Acked-by: Felipe Balbi Signed-off-by: Sandeep Maheswaram Link: https://lore.kernel.org/r/1618380209-20114-1-git-send-email-sanm@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit e66bbfb0fbbe53ce0144b6715fa0c4c27e3784ae Author: Thinh Nguyen Date: Mon Apr 12 20:00:45 2021 -0700 usb: dwc3: gadget: Ignore Packet Pending bit Currently the controller handles single stream only. So, Ignore Packet Pending bit for stream selection and don't search for another stream if the host sends Data Packet with PP=0 (for OUT direction) or ACK with NumP=0 and PP=0 (for IN direction). This slightly improves the stream performance. Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/097ba9e104c143f7ba0195ebff29390ec3043692.1618282705.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit d21e5abd3a005253eb033090aab2e43bce090d89 Author: Steffen Dirkwinkel Date: Mon Apr 12 15:30:06 2021 +0200 platform/x86: pmc_atom: Match all Beckhoff Automation baytrail boards with critclk_systems DMI table pmc_plt_clk* clocks are used for ethernet controllers, so need to stay turned on. This adds the affected board family to critclk_systems DMI table, so the clocks are marked as CLK_CRITICAL and not turned off. This replaces the previously listed boards with a match for the whole device family CBxx63. CBxx63 matches only baytrail devices. There are new affected boards that would otherwise need to be listed. There are unaffected boards in the family, but having the clocks turned on is not an issue. Fixes: 648e921888ad ("clk: x86: Stop marking clocks as CLK_IS_CRITICAL") Reviewed-by: Andy Shevchenko Signed-off-by: Steffen Dirkwinkel Link: https://lore.kernel.org/r/20210412133006.397679-1-linux-kernel-dev@beckhoff.com Signed-off-by: Hans de Goede commit 09252177d5f924f404551b4b4eded5daa7f04a3a Author: Chris Dion Date: Sun Apr 4 21:29:26 2021 -0400 SUNRPC: Handle major timeout in xprt_adjust_timeout() Currently if a major timeout value is reached, but the minor value has not been reached, an ETIMEOUT will not be sent back to the caller. This can occur if the v4 server is not responding to requests and retrans is configured larger than the default of two. For example, A TCP mount with a configured timeout value of 50 and a retransmission count of 3 to a v4 server which is not responding: 1. Initial value and increment set to 5s, maxval set to 20s, retries at 3 2. Major timeout is set to 20s, minor timeout set to 5s initially 3. xport_adjust_timeout() is called after 5s, retry with 10s timeout, minor timeout is bumped to 10s 4. And again after another 10s, 15s total time with minor timeout set to 15s 5. After 20s total time xport_adjust_timeout is called as major timeout is reached, but skipped because the minor timeout is not reached - After this time the cpu spins continually calling xport_adjust_timeout() and returning 0 for 10 seconds. As seen on perf sched: 39243.913182 [0005] mount.nfs[3794] 4607.938 0.017 9746.863 6. This continues until the 15s minor timeout condition is reached (in this case for 10 seconds). After which the ETIMEOUT is processed back to the caller, the cpu spinning stops, and normal operations continue Fixes: 7de62bc09fe6 ("SUNRPC dont update timeout value on connection reset") Signed-off-by: Chris Dion Signed-off-by: Trond Myklebust commit 6cf23783f750634e10daeede48b0f5f5d64ebf3a Author: Chuck Lever Date: Wed Mar 31 16:03:08 2021 -0400 SUNRPC: Remove trace_xprt_transmit_queued This tracepoint can crash when dereferencing snd_task because when some transports connect, they put a cookie in that field instead of a pointer to an rpc_task. BUG: KASAN: use-after-free in trace_event_raw_event_xprt_writelock_event+0x141/0x18e [sunrpc] Read of size 2 at addr ffff8881a83bd3a0 by task git/331872 CPU: 11 PID: 331872 Comm: git Tainted: G S 5.12.0-rc2-00007-g3ab6e585a7f9 #1453 Hardware name: Supermicro SYS-6028R-T/X10DRi, BIOS 1.1a 10/16/2015 Call Trace: dump_stack+0x9c/0xcf print_address_description.constprop.0+0x18/0x239 kasan_report+0x174/0x1b0 trace_event_raw_event_xprt_writelock_event+0x141/0x18e [sunrpc] xprt_prepare_transmit+0x8e/0xc1 [sunrpc] call_transmit+0x4d/0xc6 [sunrpc] Fixes: 9ce07ae5eb1d ("SUNRPC: Replace dprintk() call site in xprt_prepare_transmit") Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit e936a5970ef596ff48fca72aa8200955753c543f Author: Chuck Lever Date: Wed Mar 31 13:22:27 2021 -0400 SUNRPC: Add tracepoint that fires when an RPC is retransmitted A separate tracepoint can be left enabled all the time to capture rare but important retransmission events. So for example: kworker/u26:3-568 [009] 156.967933: xprt_retransmit: task:44093@5 xid=0xa25dbc79 nfsv3 WRITE ntrans=2 Or, for example, enable all nfs and nfs4 tracepoints, and set up a trigger to disable tracing when xprt_retransmit fires to capture everything that leads up to it. Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 7638e0bfaed1b653d3ca663e560e9ffb44bb1030 Author: Chuck Lever Date: Wed Mar 31 13:22:14 2021 -0400 SUNRPC: Move fault injection call sites I've hit some crashes that occur in the xprt_rdma_inject_disconnect path. It appears that, for some provides, rdma_disconnect() can take so long that the transport can disconnect and release its hardware resources while rdma_disconnect() is still running, resulting in a UAF in the provider. The transport's fault injection method may depend on the stability of transport data structures. That means it needs to be invoked only from contexts that hold the transport write lock. Fixes: 4a0682583988 ("SUNRPC: Transport fault injection") Signed-off-by: Chuck Lever Signed-off-by: Trond Myklebust commit 73f5c88f521a630ea1628beb9c2d48a2e777a419 Author: Olga Kornievskaia Date: Wed Mar 31 15:30:25 2021 -0400 NFSv4.2 fix handling of sr_eof in SEEK's reply Currently the client ignores the value of the sr_eof of the SEEK operation. According to the spec, if the server didn't find the requested extent and reached the end of the file, the server would return sr_eof=true. In case the request for DATA and no data was found (ie in the middle of the hole), then the lseek expects that ENXIO would be returned. Fixes: 1c6dcbe5ceff8 ("NFS: Implement SEEK") Signed-off-by: Olga Kornievskaia Signed-off-by: Trond Myklebust commit ed34695e15aba74f45247f1ee2cf7e09d449f925 Author: Nikola Livic Date: Mon Mar 29 11:56:49 2021 +0300 pNFS/flexfiles: fix incorrect size check in decode_nfs_fh() We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym bazalii) observed the check: if (fh->size > sizeof(struct nfs_fh)) should not use the size of the nfs_fh struct which includes an extra two bytes from the size field. struct nfs_fh { unsigned short size; unsigned char data[NFS_MAXFHSIZE]; } but should determine the size from data[NFS_MAXFHSIZE] so the memcpy will not write 2 bytes beyond destination. The proposed fix is to compare against the NFS_MAXFHSIZE directly, as is done elsewhere in fs code base. Fixes: d67ae825a59d ("pnfs/flexfiles: Add the FlexFile Layout Driver") Signed-off-by: Nikola Livic Signed-off-by: Dan Carpenter Signed-off-by: Trond Myklebust commit eb3d58c68e39fad68d8054e0324eb06d82dcedbb Author: Trond Myklebust Date: Thu Apr 1 14:03:26 2021 -0400 NFSv4: Catch and trace server filehandle encoding errors If the server returns a filehandle with an invalid length, then trace that, and return an EREMOTEIO error. Signed-off-by: Trond Myklebust commit 3d66bae156a652be18e278f3c88bc3e069ae824b Author: Trond Myklebust Date: Thu Apr 1 13:54:19 2021 -0400 NFSv4: Convert nfs_xdr_status tracepoint to an event class We would like the ability to record other XDR errors, particularly those that are due to server bugs. Signed-off-by: Trond Myklebust commit da934ae0a8aa20f5ac6bfa04bdfe8bd8c5b438e7 Author: Trond Myklebust Date: Thu Apr 1 14:38:13 2021 -0400 NFSv4: Add tracing for COMPOUND errors When the server returns a different operation than we expected, then trace that. Signed-off-by: Trond Myklebust commit ce62b114bbad9346641d16853c528ba01513e1b0 Author: Trond Myklebust Date: Mon Mar 5 15:01:18 2018 -0500 NFS: Split attribute support out from the server capabilities There are lots of attributes, and they are crowding out the bit space. Signed-off-by: Trond Myklebust commit cc7f2dae63bca9579d65a46f3bf2c48a15961e19 Author: Trond Myklebust Date: Sun Apr 11 14:31:24 2021 -0400 NFS: Don't store NFS_INO_REVAL_FORCED NFS_INO_REVAL_FORCED is intended to tell us that the cache needs revalidation despite the fact that we hold a delegation. We shouldn't need to store it anymore, though. Signed-off-by: Trond Myklebust commit 1301e421b75b90b1a6101961b3aca2d91a9a0599 Author: Trond Myklebust Date: Thu Apr 1 14:57:56 2021 -0400 NFSv4: link must update the inode nlink. Signed-off-by: Trond Myklebust commit 82eae5a432cb2d50d7ea51428dcad7894e4165fe Author: Trond Myklebust Date: Thu Apr 1 14:59:59 2021 -0400 NFSv4: nfs4_inc/dec_nlink_locked should also invalidate ctime If the nlink changes, then so will the ctime. Signed-off-by: Trond Myklebust commit aec00aa04b1131e17e6744681b380779f89d77b3 Author: Colin Ian King Date: Mon Apr 12 17:01:01 2021 +0100 KEYS: trusted: Fix missing null return from kzalloc call The kzalloc call can return null with the GFP_KERNEL flag so add a null check and exit via a new error exit label. Use the same exit error label for another error path too. Addresses-Coverity: ("Dereference null return value") Fixes: 830027e2cb55 ("KEYS: trusted: Add generic trusted keys framework") Signed-off-by: Colin Ian King Reviewed-by: Sumit Garg Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 3d785d73b4c1014839d9f9af0ee526f8d5706a73 Author: Zhihao Cheng Date: Fri Apr 9 09:12:01 2021 +0800 char: tpm: fix error return code in tpm_cr50_i2c_tis_recv() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 3a253caaad11 ("char: tpm: add i2c driver for cr50") Reported-by: Hulk Robot Signed-off-by: Zhihao Cheng Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 9d53913fad3ee800d0067c39881a86a5eb739ae3 Author: Sumit Garg Date: Mon Mar 1 18:41:27 2021 +0530 MAINTAINERS: Add entry for TEE based Trusted Keys Add MAINTAINERS entry for TEE based Trusted Keys framework. Signed-off-by: Sumit Garg Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit c429805fdf70cce1d4bd56f1099909acfb45ff12 Author: Sumit Garg Date: Mon Mar 1 18:41:26 2021 +0530 doc: trusted-encrypted: updates with TEE as a new trust source Update documentation for Trusted and Encrypted Keys with TEE as a new trust source. Following is brief description of updates: - Add a section to demonstrate a list of supported devices along with their security properties/guarantees. - Add a key generation section. - Updates for usage section including differences specific to a trust source. Co-developed-by: Elaine Palmer Signed-off-by: Elaine Palmer Signed-off-by: Sumit Garg Signed-off-by: Jarkko Sakkinen commit 0a95ebc91305a5f2400e9080911e8d240b6b05ca Author: Sumit Garg Date: Mon Mar 1 18:41:25 2021 +0530 KEYS: trusted: Introduce TEE based Trusted Keys Add support for TEE based trusted keys where TEE provides the functionality to seal and unseal trusted keys using hardware unique key. Refer to Documentation/staging/tee.rst for detailed information about TEE. Signed-off-by: Sumit Garg Tested-by: Jarkko Sakkinen Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 5d0682be318910e028bdf57c90a1695ffc34be37 Author: Sumit Garg Date: Mon Mar 1 18:41:24 2021 +0530 KEYS: trusted: Add generic trusted keys framework Current trusted keys framework is tightly coupled to use TPM device as an underlying implementation which makes it difficult for implementations like Trusted Execution Environment (TEE) etc. to provide trusted keys support in case platform doesn't posses a TPM device. Add a generic trusted keys framework where underlying implementations can be easily plugged in. Create struct trusted_key_ops to achieve this, which contains necessary functions of a backend. Also, define a module parameter in order to select a particular trust source in case a platform support multiple trust sources. In case its not specified then implementation itetrates through trust sources list starting with TPM and assign the first trust source as a backend which has initiazed successfully during iteration. Note that current implementation only supports a single trust source at runtime which is either selectable at compile time or during boot via aforementioned module parameter. Suggested-by: Jarkko Sakkinen Signed-off-by: Sumit Garg Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit e5fb5d2c5a03e229ded1f45aa2a42f2c288689c7 Author: James Bottomley Date: Wed Jan 27 11:06:17 2021 -0800 security: keys: trusted: Make sealed key properly interoperable The current implementation appends a migratable flag to the end of a key, meaning the format isn't exactly interoperable because the using party needs to know to strip this extra byte. However, all other consumers of TPM sealed blobs expect the unseal to return exactly the key. Since TPM2 keys have a key property flag that corresponds to migratable, use that flag instead and make the actual key the only sealed quantity. This is secure because the key properties are bound to a hash in the private part, so if they're altered the key won't load. Backwards compatibility is implemented by detecting whether we're loading a new format key or not and correctly setting migratable from the last byte of old format keys. Signed-off-by: James Bottomley Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit f2219745250f388edacabe6cca73654131c67d0a Author: James Bottomley Date: Wed Jan 27 11:06:16 2021 -0800 security: keys: trusted: use ASN.1 TPM2 key format for the blobs Modify the TPM2 key format blob output to export and import in the ASN.1 form for TPM2 sealed object keys. For compatibility with prior trusted keys, the importer will also accept two TPM2B quantities representing the public and private parts of the key. However, the export via keyctl pipe will only output the ASN.1 format. The benefit of the ASN.1 format is that it's a standard and thus the exported key can be used by userspace tools (openssl_tpm2_engine, openconnect and tpm2-tss-engine). The format includes policy specifications, thus it gets us out of having to construct policy handles in userspace and the format includes the parent meaning you don't have to keep passing it in each time. This patch only implements basic handling for the ASN.1 format, so keys with passwords but no policy. Signed-off-by: James Bottomley Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit de66514d934d70ce73c302ce0644b54970fc7196 Author: James Bottomley Date: Wed Jan 27 11:06:15 2021 -0800 security: keys: trusted: fix TPM2 authorizations In TPM 1.2 an authorization was a 20 byte number. The spec actually recommended you to hash variable length passwords and use the sha1 hash as the authorization. Because the spec doesn't require this hashing, the current authorization for trusted keys is a 40 digit hex number. For TPM 2.0 the spec allows the passing in of variable length passwords and passphrases directly, so we should allow that in trusted keys for ease of use. Update the 'blobauth' parameter to take this into account, so we can now use plain text passwords for the keys. so before keyctl add trusted kmk "new 32 blobauth=f572d396fae9206628714fb2ce00f72e94f2258fkeyhandle=81000001" @u after we will accept both the old hex sha1 form as well as a new directly supplied password: keyctl add trusted kmk "new 32 blobauth=hello keyhandle=81000001" @u Since a sha1 hex code must be exactly 40 bytes long and a direct password must be 20 or less, we use the length as the discriminator for which form is input. Note this is both and enhancement and a potential bug fix. The TPM 2.0 spec requires us to strip leading zeros, meaning empyty authorization is a zero length HMAC whereas we're currently passing in 20 bytes of zeros. A lot of TPMs simply accept this as OK, but the Microsoft TPM emulator rejects it with TPM_RC_BAD_AUTH, so this patch makes the Microsoft TPM emulator work with trusted keys. Fixes: 0fe5480303a1 ("keys, trusted: seal/unseal with TPM 2.0 chips") Signed-off-by: James Bottomley Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 1c6476e9741e30be57e0b370d4405214f055607c Author: James Bottomley Date: Wed Jan 27 11:06:14 2021 -0800 oid_registry: Add TCG defined OIDS for TPM keys The TCG has defined an OID prefix "2.23.133.10.1" for the various TPM key uses. We've defined three of the available numbers: 2.23.133.10.1.3 TPM Loadable key. This is an asymmetric key (Usually RSA2048 or Elliptic Curve) which can be imported by a TPM2_Load() operation. 2.23.133.10.1.4 TPM Importable Key. This is an asymmetric key (Usually RSA2048 or Elliptic Curve) which can be imported by a TPM2_Import() operation. Both loadable and importable keys are specific to a given TPM, the difference is that a loadable key is wrapped with the symmetric secret, so must have been created by the TPM itself. An importable key is wrapped with a DH shared secret, and may be created without access to the TPM provided you know the public part of the parent key. 2.23.133.10.1.5 TPM Sealed Data. This is a set of data (up to 128 bytes) which is sealed by the TPM. It usually represents a symmetric key and must be unsealed before use. The ASN.1 binary key form starts of with this OID as the first element of a sequence, giving the binary form a unique recognizable identity marker regardless of encoding. Signed-off-by: James Bottomley Reviewed-by: David Howells Acked-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit b07067627cd5f1f6dc60c224b47c728f7f4b7b45 Author: James Bottomley Date: Wed Jan 27 11:06:13 2021 -0800 lib: Add ASN.1 encoder We have a need in the TPM2 trusted keys to return the ASN.1 form of the TPM key blob so it can be operated on by tools outside of the kernel. The specific tools are the openssl_tpm2_engine, openconnect and the Intel tpm2-tss-engine. To do that, we have to be able to read and write the same binary key format the tools use. The current ASN.1 decoder does fine for reading, but we need pieces of an ASN.1 encoder to write the key blob in binary compatible form. For backwards compatibility, the trusted key reader code will still accept the two TPM2B quantities that it uses today, but the writer will only output the ASN.1 form. The current implementation only encodes the ASN.1 bits we actually need. Signed-off-by: James Bottomley Reviewed-by: David Howells Reviewed-by: Jarkko Sakkinen Tested-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 9716ac65efc8f780549b03bddf41e60c445d4709 Author: Stefan Berger Date: Wed Mar 10 17:19:16 2021 -0500 tpm: vtpm_proxy: Avoid reading host log when using a virtual device Avoid allocating memory and reading the host log when a virtual device is used since this log is of no use to that driver. A virtual device can be identified through the flag TPM_CHIP_FLAG_VIRTUAL, which is only set for the tpm_vtpm_proxy driver. Cc: stable@vger.kernel.org Fixes: 6f99612e2500 ("tpm: Proxy driver for supporting multiple emulated TPMs") Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 3dcd15665aca80197333500a4be3900948afccc1 Author: Stefan Berger Date: Wed Mar 10 17:19:15 2021 -0500 tpm: acpi: Check eventlog signature before using it Check the eventlog signature before using it. This avoids using an empty log, as may be the case when QEMU created the ACPI tables, rather than probing the EFI log next. This resolves an issue where the EFI log was empty since an empty ACPI log was used. Cc: stable@vger.kernel.org Fixes: 85467f63a05c ("tpm: Add support for event log pointer found in TPM2 ACPI table") Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 48cff270b037022e37835d93361646205ca25101 Author: Stefan Berger Date: Wed Mar 10 17:19:14 2021 -0500 tpm: efi: Use local variable for calculating final log size When tpm_read_log_efi is called multiple times, which happens when one loads and unloads a TPM2 driver multiple times, then the global variable efi_tpm_final_log_size will at some point become a negative number due to the subtraction of final_events_preboot_size occurring each time. Use a local variable to avoid this integer underflow. The following issue is now resolved: Mar 8 15:35:12 hibinst kernel: Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015 Mar 8 15:35:12 hibinst kernel: Workqueue: tpm-vtpm vtpm_proxy_work [tpm_vtpm_proxy] Mar 8 15:35:12 hibinst kernel: RIP: 0010:__memcpy+0x12/0x20 Mar 8 15:35:12 hibinst kernel: Code: 00 b8 01 00 00 00 85 d2 74 0a c7 05 44 7b ef 00 0f 00 00 00 c3 cc cc cc 66 66 90 66 90 48 89 f8 48 89 d1 48 c1 e9 03 83 e2 07 48 a5 89 d1 f3 a4 c3 66 0f 1f 44 00 00 48 89 f8 48 89 d1 f3 a4 Mar 8 15:35:12 hibinst kernel: RSP: 0018:ffff9ac4c0fcfde0 EFLAGS: 00010206 Mar 8 15:35:12 hibinst kernel: RAX: ffff88f878cefed5 RBX: ffff88f878ce9000 RCX: 1ffffffffffffe0f Mar 8 15:35:12 hibinst kernel: RDX: 0000000000000003 RSI: ffff9ac4c003bff9 RDI: ffff88f878cf0e4d Mar 8 15:35:12 hibinst kernel: RBP: ffff9ac4c003b000 R08: 0000000000001000 R09: 000000007e9d6073 Mar 8 15:35:12 hibinst kernel: R10: ffff9ac4c003b000 R11: ffff88f879ad3500 R12: 0000000000000ed5 Mar 8 15:35:12 hibinst kernel: R13: ffff88f878ce9760 R14: 0000000000000002 R15: ffff88f77de7f018 Mar 8 15:35:12 hibinst kernel: FS: 0000000000000000(0000) GS:ffff88f87bd00000(0000) knlGS:0000000000000000 Mar 8 15:35:12 hibinst kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Mar 8 15:35:12 hibinst kernel: CR2: ffff9ac4c003c000 CR3: 00000001785a6004 CR4: 0000000000060ee0 Mar 8 15:35:12 hibinst kernel: Call Trace: Mar 8 15:35:12 hibinst kernel: tpm_read_log_efi+0x152/0x1a7 Mar 8 15:35:12 hibinst kernel: tpm_bios_log_setup+0xc8/0x1c0 Mar 8 15:35:12 hibinst kernel: tpm_chip_register+0x8f/0x260 Mar 8 15:35:12 hibinst kernel: vtpm_proxy_work+0x16/0x60 [tpm_vtpm_proxy] Mar 8 15:35:12 hibinst kernel: process_one_work+0x1b4/0x370 Mar 8 15:35:12 hibinst kernel: worker_thread+0x53/0x3e0 Mar 8 15:35:12 hibinst kernel: ? process_one_work+0x370/0x370 Cc: stable@vger.kernel.org Fixes: 166a2809d65b ("tpm: Don't duplicate events from the final event log in the TCG2 log") Signed-off-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen commit 8f23fe35ff1e5491b4d279323a8209a31f03ae65 Author: Kai-Heng Feng Date: Mon Apr 12 21:54:53 2021 +0800 USB: Add LPM quirk for Lenovo ThinkPad USB-C Dock Gen2 Ethernet This is another branded 8153 device that doesn't work well with LPM enabled: [ 400.597506] r8152 5-1.1:1.0 enx482ae3a2a6f0: Tx status -71 So disable LPM to resolve the issue. Signed-off-by: Kai-Heng Feng BugLink: https://bugs.launchpad.net/bugs/1922651 Link: https://lore.kernel.org/r/20210412135455.791971-1-kai.heng.feng@canonical.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 434438d8f9d3f2bc8f404b937f87a70da3fbc7fb Author: Dan Carpenter Date: Wed Apr 14 10:44:40 2021 +0300 usb: typec: silence a static checker warning Smatch complains about a potential missing error code: drivers/usb/typec/port-mapper.c:168 typec_link_port() warn: missing error code 'ret' This is a false positive and returning zero is intentional. Let's re-arrange the code to silence the warning and make the intent more clear. Reviewed-by: Heikki Krogerus Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YHadaACH8Mq/10F7@mwanda Signed-off-by: Greg Kroah-Hartman commit 7098f8f0cf0387443fd8702f24a8a2521d5133f3 Author: Michael Ellerman Date: Tue Apr 13 23:54:27 2021 +1000 powerpc/mm/radix: Make radix__change_memory_range() static The lkp bot pointed out that with W=1 we get: arch/powerpc/mm/book3s64/radix_pgtable.c:183:6: error: no previous prototype for 'radix__change_memory_range' Which is really saying that it could be static, make it so. Reported-by: kernel test robot Signed-off-by: Michael Ellerman commit 74205b3fc2effde821b219d955c70e727dc43cc6 Author: Christophe Leroy Date: Wed Mar 31 16:48:47 2021 +0000 powerpc/vdso: Add support for time namespaces This patch adds the necessary glue to provide time namespaces. Things are mainly copied from ARM64. __arch_get_timens_vdso_data() calculates timens vdso data position based on the vdso data position, knowing it is the next page in vvar. This avoids having to redo the mflr/bcl/mflr/mtlr dance to locate the page relative to running code position. Signed-off-by: Christophe Leroy Reviewed-by: Vincenzo Frascino # vDSO parts Acked-by: Andrei Vagin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1a15495f80ec19a87b16cf874dbf7c3fa5ec40fe.1617209142.git.christophe.leroy@csgroup.eu commit 1c4bce6753857dc409a0197342d18764e7f4b741 Author: Dmitry Safonov <0x7f454c46@gmail.com> Date: Wed Mar 31 16:48:46 2021 +0000 powerpc/vdso: Separate vvar vma from vdso Since commit 511157ab641e ("powerpc/vdso: Move vdso datapage up front") VVAR page is in front of the VDSO area. In result it breaks CRIU (Checkpoint Restore In Userspace) [1], where CRIU expects that "[vdso]" from /proc/../maps points at ELF/vdso image, rather than at VVAR data page. Laurent made a patch to keep CRIU working (by reading aux vector). But I think it still makes sence to separate two mappings into different VMAs. It will also make ppc64 less "special" for userspace and as a side-bonus will make VVAR page un-writable by debugger (which previously would COW page and can be unexpected). I opportunistically Cc stable on it: I understand that usually such stuff isn't a stable material, but that will allow us in CRIU have one workaround less that is needed just for one release (v5.11) on one platform (ppc64), which we otherwise have to maintain. I wouldn't go as far as to say that the commit 511157ab641e is ABI regression as no other userspace got broken, but I'd really appreciate if it gets backported to v5.11 after v5.12 is released, so as not to complicate already non-simple CRIU-vdso code. Thanks! [1]: https://github.com/checkpoint-restore/criu/issues/1417 Cc: stable@vger.kernel.org # v5.11 Signed-off-by: Dmitry Safonov Signed-off-by: Christophe Leroy Tested-by: Christophe Leroy Reviewed-by: Vincenzo Frascino # vDSO parts. Acked-by: Andrei Vagin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f401eb1ebc0bfc4d8f0e10dc8e525fd409eb68e2.1617209142.git.christophe.leroy@csgroup.eu commit 808094fcbf4196be0feb17afbbdc182ec95c8cec Author: Christophe Leroy Date: Wed Mar 31 16:48:45 2021 +0000 lib/vdso: Add vdso_data pointer as input to __arch_get_timens_vdso_data() For the same reason as commit e876f0b69dc9 ("lib/vdso: Allow architectures to provide the vdso data pointer"), powerpc wants to avoid calculation of relative position to code. As the timens_vdso_data is next page to vdso_data, provide vdso_data pointer to __arch_get_timens_vdso_data() in order to ease the calculation on powerpc in following patches. Signed-off-by: Christophe Leroy Reviewed-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Acked-by: Andrei Vagin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/539c4204b1baa77c55f758904a1ea239abbc7a5c.1617209142.git.christophe.leroy@csgroup.eu commit 58efe9f696cf908f40d6672aeca81cb2ad2bc762 Author: Christophe Leroy Date: Wed Mar 31 16:48:44 2021 +0000 lib/vdso: Mark do_hres_timens() and do_coarse_timens() __always_inline() In the same spirit as commit c966533f8c6c ("lib/vdso: Mark do_hres() and do_coarse() as __always_inline"), mark do_hres_timens() and do_coarse_timens() __always_inline. The measurement below in on a non timens process, ie on the fastest path. On powerpc32, without the patch: clock-gettime-monotonic-raw: vdso: 1155 nsec/call clock-gettime-monotonic-coarse: vdso: 813 nsec/call clock-gettime-monotonic: vdso: 1076 nsec/call With the patch: clock-gettime-monotonic-raw: vdso: 1100 nsec/call clock-gettime-monotonic-coarse: vdso: 667 nsec/call clock-gettime-monotonic: vdso: 1025 nsec/call Signed-off-by: Christophe Leroy Reviewed-by: Thomas Gleixner Reviewed-by: Vincenzo Frascino Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/90dcf45ebadfd5a07f24241551c62f619d1cb930.1617209142.git.christophe.leroy@csgroup.eu commit 8f6cc75a97d162011fad3c470e5a14e298383a07 Author: Nicholas Piggin Date: Tue Mar 16 20:42:05 2021 +1000 powerpc: move norestart trap flag to bit 0 Compact the trap flags down to use the low 4 bits of regs.trap. A few 64e interrupt trap numbers set bit 4. Although they tended to be trivial so it wasn't a real problem[1], it is not the right thing to do, and confusing. [*] E.g., 0x310 hypercall goes to unknown_exception, which prints regs->trap directly so 0x310 will appear fine, and only the syscall interrupt will test norestart, so it won't be confused by 0x310. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-12-npiggin@gmail.com commit 8dc7f0229b7892ccb23e19c9f30511c68cc0fdcc Author: Nicholas Piggin Date: Tue Mar 16 20:42:04 2021 +1000 powerpc: remove partial register save logic All subarchitectures always save all GPRs to pt_regs interrupt frames now. Remove FULL_REGS and associated bits. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-11-npiggin@gmail.com commit c45ba4f44f6b9c98a5fc1511d8853ad6843c877b Author: Nicholas Piggin Date: Tue Mar 16 20:42:03 2021 +1000 powerpc: clean up do_page_fault search_exception_tables + __bad_page_fault can be substituted with bad_page_fault, do_page_fault no longer needs to return a value to asm for any sub-architecture, and __bad_page_fault can be static. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-10-npiggin@gmail.com commit d738ee8d56de38c91610741f672ec5c1ffae76fc Author: Nicholas Piggin Date: Tue Mar 16 20:42:02 2021 +1000 powerpc/64e/interrupt: handle bad_page_fault in C With non-volatile registers saved on interrupt, bad_page_fault can now be called by do_page_fault. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-9-npiggin@gmail.com commit ceff77efa4f8d9f02d8442171b325d3b7068fe5e Author: Nicholas Piggin Date: Tue Mar 16 20:42:01 2021 +1000 powerpc/64e/interrupt: Use new interrupt context tracking scheme With the new interrupt exit code, context tracking can be managed more precisely, so remove the last of the 64e workarounds and switch to the new context tracking code already used by 64s. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-8-npiggin@gmail.com commit 097157e16cf8bf91b9cf6fbda05d234d3599c01f Author: Nicholas Piggin Date: Tue Mar 16 20:42:00 2021 +1000 powerpc/64e/interrupt: reconcile irq soft-mask state in C Use existing 64s interrupt entry wrapper code to reconcile irqs in C. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-7-npiggin@gmail.com commit 3db8aa10de9a478b3086db7894e0266def3d77af Author: Nicholas Piggin Date: Tue Mar 16 20:41:59 2021 +1000 powerpc/64e/interrupt: NMI save irq soft-mask state in C 64e non-maskable interrupts save the state of the irq soft-mask in asm. This can be done in C in interrupt wrappers as 64s does. I haven't been able to test this with qemu because it doesn't seem to cause FSL bookE WDT interrupts. This makes WatchdogException an NMI interrupt, which affects 32-bit as well (okay, or create a new handler?) Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-6-npiggin@gmail.com commit 0c2472de23aea5ce9139a3e887191925759d1259 Author: Nicholas Piggin Date: Tue Mar 16 20:41:58 2021 +1000 powerpc/64e/interrupt: use new interrupt return Update the new C and asm interrupt return code to account for 64e specifics, switch over to use it. The now-unused old ret_from_except code, that was moved to 64e after the 64s conversion, is removed. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-5-npiggin@gmail.com commit dc6231821a148d0392292924fdae5b34679af6b2 Author: Nicholas Piggin Date: Tue Mar 16 20:41:57 2021 +1000 powerpc/interrupt: update common interrupt code for This makes adjustments to 64-bit asm and common C interrupt return code to be usable by the 64e subarchitecture. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-4-npiggin@gmail.com commit 4228b2c3d20e9f80b847f809c38e6cf82864fa50 Author: Nicholas Piggin Date: Tue Mar 16 20:41:56 2021 +1000 powerpc/64e/interrupt: always save nvgprs on interrupt In order to use the C interrupt return, nvgprs must always be saved. Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-3-npiggin@gmail.com commit 5a5a893c4ad897b8a36f846602895515b7407a71 Author: Nicholas Piggin Date: Tue Mar 16 20:41:55 2021 +1000 powerpc/syscall: switch user_exit_irqoff and trace_hardirqs_off order user_exit_irqoff() -> __context_tracking_exit -> vtime_user_exit warns in __seqprop_assert due to lockdep thinking preemption is enabled because trace_hardirqs_off() has not yet been called. Switch the order of these two calls, which matches their ordering in interrupt_enter_prepare. Fixes: 5f0b6ac3905f ("powerpc/64/syscall: Reconcile interrupts") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316104206.407354-2-npiggin@gmail.com commit 2e2a441d2c0bb639b6fdbb64b15ee0a43599bcec Author: Madhavan Srinivasan Date: Thu Apr 8 13:15:03 2021 +0530 powerpc/perf: Infrastructure to support checking of attr.config* Introduce code to support the checking of attr.config* for values which are reserved for a given platform. Performance Monitoring Unit (PMU) configuration registers have fields that are reserved and some specific values for bit fields are reserved. For ex., MMCRA[61:62] is Random Sampling Mode (SM) and value of 0b11 for this field is reserved. Writing non-zero or invalid values in these fields will have unknown behaviours. Patch adds a generic call-back function "check_attr_config" in "struct power_pmu", to be called in event_init to check for attr.config* values for a given platform. Signed-off-by: Madhavan Srinivasan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408074504.248211-1-maddy@linux.ibm.com commit 59fd366b9bef2d048af763e27cd1622ee5a1dfd4 Author: Pu Lehui Date: Thu Apr 8 14:20:12 2021 +0800 powerpc/fadump: make symbol 'rtas_fadump_set_regval' static Fix sparse warnings: arch/powerpc/platforms/pseries/rtas-fadump.c:250:6: warning: symbol 'rtas_fadump_set_regval' was not declared. Should it be static? Signed-off-by: Pu Lehui Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408062012.85973-1-pulehui@huawei.com commit 7e9ab144c128df7660a2f33c9c6d1422fe798060 Author: Christophe Leroy Date: Thu Apr 8 15:30:33 2021 +0000 powerpc/mem: Use kmap_local_page() in flushing functions Flushing functions don't rely on preemption being disabled, so use kmap_local_page() instead of kmap_atomic(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b6a880ea0ec7886b51edbb4979c188be549231c0.1617895813.git.christophe.leroy@csgroup.eu commit 6c96020882b17fb6f4fbf7f8cef8c606460fc14d Author: Christophe Leroy Date: Thu Apr 8 15:30:32 2021 +0000 powerpc/mem: Inline flush_dcache_page() flush_dcache_page() is only a few lines, it is worth inlining. ia64, csky, mips, openrisc and riscv have a similar flush_dcache_page() and inline it. On pmac32_defconfig, we get a small size reduction. On ppc64_defconfig, we get a very small size increase. In both case that's in the noise (less than 0.1%). text data bss dec hex filename 18991155 5934744 1497624 26423523 19330e3 vmlinux64.before 18994829 5936732 1497624 26429185 1934701 vmlinux64.after 9150963 2467502 184548 11803013 b41985 vmlinux32.before 9149689 2467302 184548 11801539 b413c3 vmlinux32.after Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/21c417488b70b7629dae316539fb7bb8bdef4fdd.1617895813.git.christophe.leroy@csgroup.eu commit 67b8e6af191a6ed717be548307eb15048f8181d8 Author: Christophe Leroy Date: Thu Apr 8 15:30:31 2021 +0000 powerpc/mem: Help GCC realise __flush_dcache_icache() flushes single pages 'And' the given page address with PAGE_MASK to help GCC. With the patch: 00000024 <__flush_dcache_icache>: 24: 54 63 00 26 rlwinm r3,r3,0,0,19 28: 39 40 00 40 li r10,64 2c: 7c 69 1b 78 mr r9,r3 30: 7d 49 03 a6 mtctr r10 34: 7c 00 48 6c dcbst 0,r9 38: 39 29 00 20 addi r9,r9,32 3c: 7c 00 48 6c dcbst 0,r9 40: 39 29 00 20 addi r9,r9,32 44: 42 00 ff f0 bdnz 34 <__flush_dcache_icache+0x10> 48: 7c 00 04 ac hwsync 4c: 39 20 00 40 li r9,64 50: 7d 29 03 a6 mtctr r9 54: 7c 00 1f ac icbi 0,r3 58: 38 63 00 20 addi r3,r3,32 5c: 7c 00 1f ac icbi 0,r3 60: 38 63 00 20 addi r3,r3,32 64: 42 00 ff f0 bdnz 54 <__flush_dcache_icache+0x30> 68: 7c 00 04 ac hwsync 6c: 4c 00 01 2c isync 70: 4e 80 00 20 blr Without the patch: 00000024 <__flush_dcache_icache>: 24: 54 6a 00 34 rlwinm r10,r3,0,0,26 28: 39 23 10 1f addi r9,r3,4127 2c: 7d 2a 48 50 subf r9,r10,r9 30: 55 29 d9 7f rlwinm. r9,r9,27,5,31 34: 41 82 00 94 beq c8 <__flush_dcache_icache+0xa4> 38: 71 28 00 01 andi. r8,r9,1 3c: 38 c9 ff ff addi r6,r9,-1 40: 7d 48 53 78 mr r8,r10 44: 7d 27 4b 78 mr r7,r9 48: 40 82 00 6c bne b4 <__flush_dcache_icache+0x90> 4c: 54 e7 f8 7e rlwinm r7,r7,31,1,31 50: 7c e9 03 a6 mtctr r7 54: 7c 00 40 6c dcbst 0,r8 58: 39 08 00 20 addi r8,r8,32 5c: 7c 00 40 6c dcbst 0,r8 60: 39 08 00 20 addi r8,r8,32 64: 42 00 ff f0 bdnz 54 <__flush_dcache_icache+0x30> 68: 7c 00 04 ac hwsync 6c: 71 28 00 01 andi. r8,r9,1 70: 39 09 ff ff addi r8,r9,-1 74: 40 82 00 2c bne a0 <__flush_dcache_icache+0x7c> 78: 55 29 f8 7e rlwinm r9,r9,31,1,31 7c: 7d 29 03 a6 mtctr r9 80: 7c 00 57 ac icbi 0,r10 84: 39 4a 00 20 addi r10,r10,32 88: 7c 00 57 ac icbi 0,r10 8c: 39 4a 00 20 addi r10,r10,32 90: 42 00 ff f0 bdnz 80 <__flush_dcache_icache+0x5c> 94: 7c 00 04 ac hwsync 98: 4c 00 01 2c isync 9c: 4e 80 00 20 blr a0: 7c 00 57 ac icbi 0,r10 a4: 2c 08 00 00 cmpwi r8,0 a8: 39 4a 00 20 addi r10,r10,32 ac: 40 82 ff cc bne 78 <__flush_dcache_icache+0x54> b0: 4b ff ff e4 b 94 <__flush_dcache_icache+0x70> b4: 7c 00 50 6c dcbst 0,r10 b8: 2c 06 00 00 cmpwi r6,0 bc: 39 0a 00 20 addi r8,r10,32 c0: 40 82 ff 8c bne 4c <__flush_dcache_icache+0x28> c4: 4b ff ff a4 b 68 <__flush_dcache_icache+0x44> c8: 7c 00 04 ac hwsync cc: 7c 00 04 ac hwsync d0: 4c 00 01 2c isync d4: 4e 80 00 20 blr Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/23030822ea5cd0a122948b10226abe56602dc027.1617895813.git.christophe.leroy@csgroup.eu commit 52d490437ffb1bab0a63ab7b1a64514d8c17dd4d Author: Christophe Leroy Date: Thu Apr 8 15:30:30 2021 +0000 powerpc/mem: flush_dcache_icache_phys() is for HIGHMEM pages only __flush_dcache_icache() is usable for non HIGHMEM pages on every platform. It is only for HIGHMEM pages that BOOKE needs kmap() and BOOK3S needs flush_dcache_icache_phys(). So make flush_dcache_icache_phys() dependent on CONFIG_HIGHMEM and call it only when it is a HIGHMEM page. We could make flush_dcache_icache_phys() available at all time, but as it is declared NOKPROBE_SYMBOL(), GCC doesn't optimise it out when it is not used. So define a stub for !CONFIG_HIGHMEM in order to remove the #ifdef in flush_dcache_icache_page() and use IS_ENABLED() instead. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/79ed5d7914f497cd5fcd681ca2f4d50a91719455.1617895813.git.christophe.leroy@csgroup.eu commit cd97d9e8b5aa45a7f867a10e99f1d6ce0a5deb8b Author: Christophe Leroy Date: Thu Apr 8 15:30:29 2021 +0000 powerpc/mem: Optimise flush_dcache_icache_hugepage() flush_dcache_icache_hugepage() is a static function, with only one caller. That caller calls it when PageCompound() is true, so bugging on !PageCompound() is useless if we can trust the compiler a little. Remove the BUG_ON(!PageCompound()). The number of elements of a page won't change over time, but GCC doesn't know about it, so it gets the value at every iteration. To avoid that, call compound_nr() outside the loop and save it in a local variable. Whether the page is a HIGHMEM page or not doesn't change over time. But GCC doesn't know it so it does the test on every iteration. Do the test outside the loop. When the page is not a HIGHMEM page, page_address() will fallback on lowmem_page_address(), so call lowmem_page_address() directly and don't suffer the call to page_address() on every iteration. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ab03712b70105fccfceef095aa03007de9295a40.1617895813.git.christophe.leroy@csgroup.eu commit e618c7aea1f2a2d615a99948f1f5cb4c11b6bf57 Author: Christophe Leroy Date: Thu Apr 8 15:30:28 2021 +0000 powerpc/mem: Call flush_coherent_icache() at higher level flush_coherent_icache() doesn't need the address anymore, so it can be called immediately when entering the public functions and doesn't need to be disseminated among lower level functions. And use page_to_phys() instead of open coding the calculation of phys address to call flush_dcache_icache_phys(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5f063986e325d2efdd404b8f8c5f4bcbd4eb11a6.1617895813.git.christophe.leroy@csgroup.eu commit 131637a17dc97fde3d007ab224e30c7ff4e62f6e Author: Christophe Leroy Date: Thu Apr 8 15:30:27 2021 +0000 powerpc/mem: Remove address argument to flush_coherent_icache() flush_coherent_icache() can use any valid address as mentionned by the comment. Use PAGE_OFFSET as base address. This allows removing the user access stuff. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/742b6360ae4f344a1c6ecfadcf3b6645f443fa7a.1617895813.git.christophe.leroy@csgroup.eu commit bf26e0bbd2f82b52605cd7c880245eefe67e09f3 Author: Christophe Leroy Date: Thu Apr 8 15:30:26 2021 +0000 powerpc/mem: Declare __flush_dcache_icache() static __flush_dcache_icache() is only used in mem.c. Move it before the functions that use it and declare it static. And also fix the name of the parameter in the comment. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3fa903eb5a10b2bc7d99a8c559ffdaa05452d8e0.1617895813.git.christophe.leroy@csgroup.eu commit b26e8f27253a47bff90972b987112fd8396e9b8d Author: Christophe Leroy Date: Thu Apr 8 15:30:24 2021 +0000 powerpc/mem: Move cache flushing functions into mm/cacheflush.c Cache flushing functions are in the middle of completely unrelated stuff in mm/mem.c Create a dedicated mm/cacheflush.c for those functions. Also cleanup the list of included headers. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7bf6f1600acad146e541a4e220940062f2e5b03d.1617895813.git.christophe.leroy@csgroup.eu commit ff0b4155ae9903539d1299a9a4c8717fb7eb6009 Author: Bixuan Cui Date: Fri Apr 9 14:38:55 2021 +0800 powerpc/powernv: make symbol 'mpipl_kobj' static The sparse tool complains as follows: arch/powerpc/platforms/powernv/opal-core.c:74:16: warning: symbol 'mpipl_kobj' was not declared. This symbol is not used outside of opal-core.c, so marks it static. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210409063855.57347-1-cuibixuan@huawei.com commit f234ad405a35262ed2d8dd2d29fc633908dce955 Author: Pu Lehui Date: Fri Apr 9 15:01:51 2021 +0800 powerpc/xmon: Make symbol 'spu_inst_dump' static Fix sparse warning: arch/powerpc/xmon/xmon.c:4216:1: warning: symbol 'spu_inst_dump' was not declared. Should it be static? This symbol is not used outside of xmon.c, so make it static. Signed-off-by: Pu Lehui Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210409070151.163424-1-pulehui@huawei.com commit cc331eee03eadd750af1fb957d020b3f24e5e056 Author: Bixuan Cui Date: Fri Apr 9 17:01:24 2021 +0800 powerpc/perf/hv-24x7: Make some symbols static The sparse tool complains as follows: arch/powerpc/perf/hv-24x7.c:229:1: warning: symbol '__pcpu_scope_hv_24x7_txn_flags' was not declared. Should it be static? arch/powerpc/perf/hv-24x7.c:230:1: warning: symbol '__pcpu_scope_hv_24x7_txn_err' was not declared. Should it be static? arch/powerpc/perf/hv-24x7.c:236:1: warning: symbol '__pcpu_scope_hv_24x7_hw' was not declared. Should it be static? arch/powerpc/perf/hv-24x7.c:244:1: warning: symbol '__pcpu_scope_hv_24x7_reqb' was not declared. Should it be static? arch/powerpc/perf/hv-24x7.c:245:1: warning: symbol '__pcpu_scope_hv_24x7_resb' was not declared. Should it be static? This symbol is not used outside of hv-24x7.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210409090124.59492-1-cuibixuan@huawei.com commit 107dadb046178173dea18e0a78ff8ea3cc27c213 Author: Bixuan Cui Date: Fri Apr 9 17:01:19 2021 +0800 powerpc/perf: Make symbol 'isa207_pmu_format_attr' static The sparse tool complains as follows: arch/powerpc/perf/isa207-common.c:24:18: warning: symbol 'isa207_pmu_format_attr' was not declared. Should it be static? This symbol is not used outside of isa207-common.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210409090119.59444-1-cuibixuan@huawei.com commit 2235dea17d56238642121a8085b71d68598534bb Author: Bixuan Cui Date: Fri Apr 9 17:01:14 2021 +0800 powerpc/pseries/pmem: Make symbol 'drc_pmem_match' static The sparse tool complains as follows: arch/powerpc/platforms/pseries/pmem.c:142:27: warning: symbol 'drc_pmem_match' was not declared. Should it be static? This symbol is not used outside of pmem.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210409090114.59396-1-cuibixuan@huawei.com commit 193e4cd8ed9dd01092d01df7706a6b344c946af4 Author: Bixuan Cui Date: Fri Apr 9 17:01:09 2021 +0800 powerpc/pseries: Make symbol '__pcpu_scope_hcall_stats' static The sparse tool complains as follows: arch/powerpc/platforms/pseries/hvCall_inst.c:29:1: warning: symbol '__pcpu_scope_hcall_stats' was not declared. Should it be static? This symbol is not used outside of hvCall_inst.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210409090109.59347-1-cuibixuan@huawei.com commit 472724111f0f72042deb6a9dcee9578e5398a1a1 Author: Leonardo Bras Date: Thu Apr 8 17:19:16 2021 -0300 powerpc/iommu: Enable remaining IOMMU Pagesizes present in LoPAR According to LoPAR, ibm,query-pe-dma-window output named "IO Page Sizes" will let the OS know all possible pagesizes that can be used for creating a new DDW. Currently Linux will only try using 3 of the 8 available options: 4K, 64K and 16M. According to LoPAR, Hypervisor may also offer 32M, 64M, 128M, 256M and 16G. Enabling bigger pages would be interesting for direct mapping systems with a lot of RAM, while using less TCE entries. Signed-off-by: Leonardo Bras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408201915.174217-1-leobras.c@gmail.com commit 672bff581e19d5d7bef993f910ed385c4054cbbc Author: Masahiro Yamada Date: Tue Mar 2 00:30:19 2021 +0900 powerpc/syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts powerpc to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210301153019.362742-2-masahiroy@kernel.org commit 14b3c9d24a7a5c274a9df27d245516f466d3bc5f Author: Masahiro Yamada Date: Tue Mar 2 00:30:18 2021 +0900 powerpc/syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts powerpc to use scripts/syscalltbl.sh. This also unifies syscall_table_32.h and syscall_table_c32.h. Signed-off-by: Masahiro Yamada Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210301153019.362742-1-masahiroy@kernel.org commit e5d56763525e65417dad0d46572b234fa0008e40 Author: Nathan Lynch Date: Thu Apr 8 09:06:30 2021 -0500 powerpc/rtas: rename RTAS_RMOBUF_MAX to RTAS_USER_REGION_SIZE RTAS_RMOBUF_MAX doesn't actually describe a "maximum" value in any sense. It represents the size of an area of memory set aside for user space to use as work areas for certain RTAS calls. Rename it to RTAS_USER_REGION_SIZE. Signed-off-by: Nathan Lynch Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408140630.205502-6-nathanl@linux.ibm.com commit 0649cdc8237943c15fc977e96033dc8ae28cc2bd Author: Nathan Lynch Date: Thu Apr 8 09:06:29 2021 -0500 powerpc/rtas: move syscall filter setup into separate function Reduce conditionally compiled sections within rtas_initialize() by moving the filter table initialization into its own function already guarded by CONFIG_PPC_RTAS_FILTER. No behavior change intended. Signed-off-by: Nathan Lynch Reviewed-by: Alexey Kardashevskiy Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408140630.205502-5-nathanl@linux.ibm.com commit 0ab1c929ae38262c4deb18b4a2e03a4f0cb5c5ed Author: Nathan Lynch Date: Thu Apr 8 09:06:28 2021 -0500 powerpc/rtas: remove ibm_suspend_me_token There's not a compelling reason to cache the value of the token for the ibm,suspend-me function. Just look it up when needed in the RTAS syscall's special case for it. Signed-off-by: Nathan Lynch Reviewed-by: Alexey Kardashevskiy Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408140630.205502-4-nathanl@linux.ibm.com commit 01c1b9984a12a379f332c39c4b1fd96e473b93b0 Author: Nathan Lynch Date: Thu Apr 8 09:06:27 2021 -0500 powerpc/rtas-proc: remove unused RMO_READ_BUF_MAX This constant is unused. Signed-off-by: Nathan Lynch Reviewed-by: Alexey Kardashevskiy Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408140630.205502-3-nathanl@linux.ibm.com commit c13ff6f3251318f5e1ff5b1a6d05f76996db672a Author: Nathan Lynch Date: Thu Apr 8 09:06:26 2021 -0500 powerpc/rtas: improve ppc_rtas_rmo_buf_show documentation Add kerneldoc for ppc_rtas_rmo_buf_show(), the callback for /proc/powerpc/rtas/rmo_buffer, explaining its expected use. Signed-off-by: Nathan Lynch Reviewed-by: Alexey Kardashevskiy Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408140630.205502-2-nathanl@linux.ibm.com commit 5ae5bc12d0728db60a0aa9b62160ffc038875f1a Author: Mahesh Salgaonkar Date: Mon Apr 12 13:22:50 2021 +0530 powerpc/eeh: Fix EEH handling for hugepages in ioremap space. During the EEH MMIO error checking, the current implementation fails to map the (virtual) MMIO address back to the pci device on radix with hugepage mappings for I/O. This results into failure to dispatch EEH event with no recovery even when EEH capability has been enabled on the device. eeh_check_failure(token) # token = virtual MMIO address addr = eeh_token_to_phys(token); edev = eeh_addr_cache_get_dev(addr); if (!edev) return 0; eeh_dev_check_failure(edev); <= Dispatch the EEH event In case of hugepage mappings, eeh_token_to_phys() has a bug in virt -> phys translation that results in wrong physical address, which is then passed to eeh_addr_cache_get_dev() to match it against cached pci I/O address ranges to get to a PCI device. Hence, it fails to find a match and the EEH event never gets dispatched leaving the device in failed state. The commit 33439620680be ("powerpc/eeh: Handle hugepages in ioremap space") introduced following logic to translate virt to phys for hugepage mappings: eeh_token_to_phys(): + pa = pte_pfn(*ptep); + + /* On radix we can do hugepage mappings for io, so handle that */ + if (hugepage_shift) { + pa <<= hugepage_shift; <= This is wrong + pa |= token & ((1ul << hugepage_shift) - 1); + } This patch fixes the virt -> phys translation in eeh_token_to_phys() function. $ cat /sys/kernel/debug/powerpc/eeh_address_cache mem addr range [0x0000040080000000-0x00000400807fffff]: 0030:01:00.1 mem addr range [0x0000040080800000-0x0000040080ffffff]: 0030:01:00.1 mem addr range [0x0000040081000000-0x00000400817fffff]: 0030:01:00.0 mem addr range [0x0000040081800000-0x0000040081ffffff]: 0030:01:00.0 mem addr range [0x0000040082000000-0x000004008207ffff]: 0030:01:00.1 mem addr range [0x0000040082080000-0x00000400820fffff]: 0030:01:00.0 mem addr range [0x0000040082100000-0x000004008210ffff]: 0030:01:00.1 mem addr range [0x0000040082110000-0x000004008211ffff]: 0030:01:00.0 Above is the list of cached io address ranges of pci 0030:01:00.. Before this patch: Tracing 'arg1' of function eeh_addr_cache_get_dev() during error injection clearly shows that 'addr=' contains wrong physical address: kworker/u16:0-7 [001] .... 108.883775: eeh_addr_cache_get_dev: (eeh_addr_cache_get_dev+0xc/0xf0) addr=0x80103000a510 dmesg shows no EEH recovery messages: [ 108.563768] bnx2x: [bnx2x_timer:5801(eth2)]MFW seems hanged: drv_pulse (0x9ae) != mcp_pulse (0x7fff) [ 108.563788] bnx2x: [bnx2x_hw_stats_update:870(eth2)]NIG timer max (4294967295) [ 108.883788] bnx2x: [bnx2x_acquire_hw_lock:2013(eth1)]lock_status 0xffffffff resource_bit 0x1 [ 108.884407] bnx2x 0030:01:00.0 eth1: MDC/MDIO access timeout [ 108.884976] bnx2x 0030:01:00.0 eth1: MDC/MDIO access timeout <..> After this patch: eeh_addr_cache_get_dev() trace shows correct physical address: -0 [001] ..s. 1043.123828: eeh_addr_cache_get_dev: (eeh_addr_cache_get_dev+0xc/0xf0) addr=0x40080bc7cd8 dmesg logs shows EEH recovery getting triggerred: [ 964.323980] bnx2x: [bnx2x_timer:5801(eth2)]MFW seems hanged: drv_pulse (0x746f) != mcp_pulse (0x7fff) [ 964.323991] EEH: Recovering PHB#30-PE#10000 [ 964.324002] EEH: PE location: N/A, PHB location: N/A [ 964.324006] EEH: Frozen PHB#30-PE#10000 detected <..> Fixes: 33439620680b ("powerpc/eeh: Handle hugepages in ioremap space") Cc: stable@vger.kernel.org # v5.3+ Reported-by: Dominic DeMarco Signed-off-by: Mahesh Salgaonkar Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/161821396263.48361.2796709239866588652.stgit@jupiter commit fd6db2892ebaa1383a93b4a609c65b96e615510a Author: Cédric Le Goater Date: Wed Mar 31 16:45:14 2021 +0200 powerpc/xive: Modernize XIVE-IPI domain with an 'alloc' handler Instead of calling irq_create_mapping() to map the IPI for a node, introduce an 'alloc' handler. This is usually an extension to support hierarchy irq_domains which is not exactly the case for XIVE-IPI domain. However, we can now use the irq_domain_alloc_irqs() routine which allocates the IRQ descriptor on the specified node, even better for cache performance on multi node machines. Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331144514.892250-10-clg@kaod.org commit 7dcc37b3eff97379b194adb17eb9a8270512dd1d Author: Cédric Le Goater Date: Wed Mar 31 16:45:13 2021 +0200 powerpc/xive: Map one IPI interrupt per node ipistorm [*] can be used to benchmark the raw interrupt rate of an interrupt controller by measuring the number of IPIs a system can sustain. When applied to the XIVE interrupt controller of POWER9 and POWER10 systems, a significant drop of the interrupt rate can be observed when crossing the second node boundary. This is due to the fact that a single IPI interrupt is used for all CPUs of the system. The structure is shared and the cache line updates impact greatly the traffic between nodes and the overall IPI performance. As a workaround, the impact can be reduced by deactivating the IRQ lockup detector ("noirqdebug") which does a lot of accounting in the Linux IRQ descriptor structure and is responsible for most of the performance penalty. As a fix, this proposal allocates an IPI interrupt per node, to be shared by all CPUs of that node. It solves the scaling issue, the IRQ lockup detector still has an impact but the XIVE interrupt rate scales linearly. It also improves the "noirqdebug" case as showed in the tables below. * P9 DD2.2 - 2s * 64 threads "noirqdebug" Mint/s Mint/s chips cpus IPI/sys IPI/chip IPI/chip IPI/sys -------------------------------------------------------------- 1 0-15 4.984023 4.875405 4.996536 5.048892 0-31 10.879164 10.544040 10.757632 11.037859 0-47 15.345301 14.688764 14.926520 15.310053 0-63 17.064907 17.066812 17.613416 17.874511 2 0-79 11.768764 21.650749 22.689120 22.566508 0-95 10.616812 26.878789 28.434703 28.320324 0-111 10.151693 31.397803 31.771773 32.388122 0-127 9.948502 33.139336 34.875716 35.224548 * P10 DD1 - 4s (not homogeneous) 352 threads "noirqdebug" Mint/s Mint/s chips cpus IPI/sys IPI/chip IPI/chip IPI/sys -------------------------------------------------------------- 1 0-15 2.409402 2.364108 2.383303 2.395091 0-31 6.028325 6.046075 6.089999 6.073750 0-47 8.655178 8.644531 8.712830 8.724702 0-63 11.629652 11.735953 12.088203 12.055979 0-79 14.392321 14.729959 14.986701 14.973073 0-95 12.604158 13.004034 17.528748 17.568095 2 0-111 9.767753 13.719831 19.968606 20.024218 0-127 6.744566 16.418854 22.898066 22.995110 0-143 6.005699 19.174421 25.425622 25.417541 0-159 5.649719 21.938836 27.952662 28.059603 0-175 5.441410 24.109484 31.133915 31.127996 3 0-191 5.318341 24.405322 33.999221 33.775354 0-207 5.191382 26.449769 36.050161 35.867307 0-223 5.102790 29.356943 39.544135 39.508169 0-239 5.035295 31.933051 42.135075 42.071975 0-255 4.969209 34.477367 44.655395 44.757074 4 0-271 4.907652 35.887016 47.080545 47.318537 0-287 4.839581 38.076137 50.464307 50.636219 0-303 4.786031 40.881319 53.478684 53.310759 0-319 4.743750 43.448424 56.388102 55.973969 0-335 4.709936 45.623532 59.400930 58.926857 0-351 4.681413 45.646151 62.035804 61.830057 [*] https://github.com/antonblanchard/ipistorm Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331144514.892250-9-clg@kaod.org commit 33e4bc5946432a4ac173fd08e8e30a13ab94d06d Author: Cédric Le Goater Date: Wed Mar 31 16:45:12 2021 +0200 powerpc/xive: Fix xmon command "dxi" When under xmon, the "dxi" command dumps the state of the XIVE interrupts. If an interrupt number is specified, only the state of the associated XIVE interrupt is dumped. This form of the command lacks an irq_data parameter which is nevertheless used by xmon_xive_get_irq_config(), leading to an xmon crash. Fix that by doing a lookup in the system IRQ mapping to query the IRQ descriptor data. Invalid interrupt numbers, or not belonging to the XIVE IRQ domain, OPAL event interrupt number for instance, should be caught by the previous query done at the firmware level. Fixes: 97ef27507793 ("powerpc/xive: Fix xmon support on the PowerNV platform") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Cédric Le Goater Tested-by: Greg Kurz Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331144514.892250-8-clg@kaod.org commit 6bf66eb8f404050030805c65cf39a810892f5f8e Author: Cédric Le Goater Date: Wed Mar 31 16:45:11 2021 +0200 powerpc/xive: Simplify the dump of XIVE interrupts under xmon Move the xmon routine under XIVE subsystem and rework the loop on the interrupts taking into account the xive_irq_domain to filter out IPIs. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331144514.892250-7-clg@kaod.org commit a74ce5926b20cd0e6d624a9b2527073a96dfed7f Author: Cédric Le Goater Date: Wed Mar 31 16:45:10 2021 +0200 powerpc/xive: Drop check on irq_data in xive_core_debug_show() When looping on IRQ descriptor, irq_data is always valid. Fixes: 930914b7d528 ("powerpc/xive: Add a debugfs file to dump internal XIVE state") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331144514.892250-6-clg@kaod.org commit 5159d9872823230669b7949ba3caf18c4c314846 Author: Cédric Le Goater Date: Wed Mar 31 16:45:09 2021 +0200 powerpc/xive: Simplify xive_core_debug_show() Now that the IPI interrupt has its own domain, the checks on the HW interrupt number XIVE_IPI_HW_IRQ and on the chip can be replaced by a check on the domain. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331144514.892250-5-clg@kaod.org commit 1835e72942b5aa779c8ada62aaeba03ab66d92c9 Author: Cédric Le Goater Date: Wed Mar 31 16:45:08 2021 +0200 powerpc/xive: Remove useless check on XIVE_IPI_HW_IRQ The IPI interrupt has its own domain now. Testing the HW interrupt number is not needed anymore. Signed-off-by: Cédric Le Goater Reviewed-by: Greg Kurz Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331144514.892250-4-clg@kaod.org commit 7d348494136c8b47c39d1f7ccba28c47d5094a54 Author: Cédric Le Goater Date: Wed Mar 31 16:45:07 2021 +0200 powerpc/xive: Introduce an IPI interrupt domain The IPI interrupt is a special case of the XIVE IRQ domain. When mapping and unmapping the interrupts in the Linux interrupt number space, the HW interrupt number 0 (XIVE_IPI_HW_IRQ) is checked to distinguish the IPI interrupt from other interrupts of the system. Simplify the XIVE interrupt domain by introducing a specific domain for the IPI. Signed-off-by: Cédric Le Goater Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331144514.892250-3-clg@kaod.org commit 078277acbd7c3fdb25c01a3cd5b4a1a875a1ab2f Author: Yu Kuai Date: Wed Apr 7 20:59:03 2021 +0800 powerpc/smp: Make some symbols static The sparse tool complains as follows: arch/powerpc/kernel/smp.c:86:1: warning: symbol '__pcpu_scope_cpu_coregroup_map' was not declared. Should it be static? arch/powerpc/kernel/smp.c:125:1: warning: symbol '__pcpu_scope_thread_group_l1_cache_map' was not declared. Should it be static? arch/powerpc/kernel/smp.c:132:1: warning: symbol '__pcpu_scope_thread_group_l2_cache_map' was not declared. Should it be static? These symbols are not used outside of smp.c, so this commit marks them static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210407125903.4139663-1-yukuai3@huawei.com commit 95d143923379ffb0e706b064305681d44c05ec4b Author: Yu Kuai Date: Wed Apr 7 20:58:03 2021 +0800 macintosh/via-pmu: Make some symbols static The sparse tool complains as follows: drivers/macintosh/via-pmu.c:183:5: warning: symbol 'pmu_cur_battery' was not declared. Should it be static? drivers/macintosh/via-pmu.c:190:5: warning: symbol '__fake_sleep' was not declared. Should it be static? These symbols are not used outside of via-pmu.c, so this commit marks them static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210407125803.4138837-1-yukuai3@huawei.com commit 4204ecd598cb0a044e6fcfd48e569080955347f4 Author: Yu Kuai Date: Wed Apr 7 20:57:38 2021 +0800 windfarm: make symbol 'wf_thread' static The sparse tool complains as follows: drivers/macintosh/windfarm_core.c:59:20: warning: symbol 'wf_thread' was not declared. Should it be static? This symbol is not used outside of windfarm_core.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210407125738.4138480-1-yukuai3@huawei.com commit 13ddd0e3acf988a98b46800178ae691640b0cd00 Author: Yu Kuai Date: Wed Apr 7 20:57:12 2021 +0800 macintosh/windfarm: Make symbol 'pm121_sys_state' static The sparse tool complains as follows: drivers/macintosh/windfarm_pm121.c:436:24: warning: symbol 'pm121_sys_state' was not declared. Should it be static? This symbol is not used outside of windfarm_pm121.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210407125712.4138033-1-yukuai3@huawei.com commit f6f1f48e8b3b242dfa684d6e1b930d239d87533a Author: Li Huafei Date: Thu Apr 8 11:58:02 2021 +0800 powerpc/mce: Make symbol 'mce_ue_event_work' static The sparse tool complains as follows: arch/powerpc/kernel/mce.c:43:1: warning: symbol 'mce_ue_event_work' was not declared. Should it be static? This symbol is not used outside of mce.c, so this commit marks it static. Signed-off-by: Li Huafei Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408035802.31853-1-lihuafei1@huawei.com commit 7f262b4dcf7edf75097c3946e676d6c6d77fc599 Author: Li Huafei Date: Thu Apr 8 11:39:51 2021 +0800 powerpc/security: Make symbol 'stf_barrier' static The sparse tool complains as follows: arch/powerpc/kernel/security.c:253:6: warning: symbol 'stf_barrier' was not declared. Should it be static? This symbol is not used outside of security.c, so this commit marks it static. Signed-off-by: Li Huafei Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210408033951.28369-1-lihuafei1@huawei.com commit 80edc68e0479bafdc4869ec3351e42316b824596 Author: Christophe Leroy Date: Thu Apr 1 13:30:43 2021 +0000 powerpc/32s: Define a MODULE area below kernel text all the time On book3s/32, the segment below kernel text is used for module allocation when CONFIG_STRICT_KERNEL_RWX is defined. In order to benefit from the powerpc specific module_alloc() function which allocate modules with 32 Mbytes from end of kernel text, use that segment below PAGE_OFFSET at all time. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a46dcdd39a9e80b012d86c294c4e5cd8d31665f3.1617283827.git.christophe.leroy@csgroup.eu commit 9132a2e82adc6e5a1c7c7385df3bfb25576bdd80 Author: Christophe Leroy Date: Thu Apr 1 13:30:42 2021 +0000 powerpc/8xx: Define a MODULE area below kernel text On the 8xx, TASK_SIZE is 0x80000000. The space between TASK_SIZE and PAGE_OFFSET is not used. In order to benefit from the powerpc specific module_alloc() function which allocate modules with 32 Mbytes from end of kernel text, define MODULES_VADDR and MODULES_END. Set a 256Mb area just below PAGE_OFFSET, like book3s/32. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a225606d5b3a8bc53fe612ad52c855c60b0a0a58.1617283827.git.christophe.leroy@csgroup.eu commit 2ec13df167040cd153c25c4d96d0ffc573ac4c40 Author: Christophe Leroy Date: Thu Apr 1 13:30:41 2021 +0000 powerpc/modules: Load modules closer to kernel text On book3s/32, when STRICT_KERNEL_RWX is selected, modules are allocated on the segment just before kernel text, ie on the 0xb0000000-0xbfffffff when PAGE_OFFSET is 0xc0000000. On the 8xx, TASK_SIZE is 0x80000000. The space between TASK_SIZE and PAGE_OFFSET is not used and could be used for modules. The idea comes from ARM architecture. Having modules just below PAGE_OFFSET offers an opportunity to minimise the distance between kernel text and modules and avoid trampolines in modules to access kernel functions or other module functions. When MODULES_VADDR is defined, powerpc has it's own module_alloc() function. In that function, first try to allocate the module above the limit defined by '_etext - 32M'. Then if the allocation fails, fallback to the entire MODULES area. DEBUG logs in module_32.c without the patch: [ 1572.588822] module_32: Applying ADD relocate section 13 to 12 [ 1572.588891] module_32: Doing plt for call to 0xc00671a4 at 0xcae04024 [ 1572.588964] module_32: Initialized plt for 0xc00671a4 at cae04000 [ 1572.589037] module_32: REL24 value = CAE04000. location = CAE04024 [ 1572.589110] module_32: Location before: 48000001. [ 1572.589171] module_32: Location after: 4BFFFFDD. [ 1572.589231] module_32: ie. jump to 03FFFFDC+CAE04024 = CEE04000 [ 1572.589317] module_32: Applying ADD relocate section 15 to 14 [ 1572.589386] module_32: Doing plt for call to 0xc00671a4 at 0xcadfc018 [ 1572.589457] module_32: Initialized plt for 0xc00671a4 at cadfc000 [ 1572.589529] module_32: REL24 value = CADFC000. location = CADFC018 [ 1572.589601] module_32: Location before: 48000000. [ 1572.589661] module_32: Location after: 4BFFFFE8. [ 1572.589723] module_32: ie. jump to 03FFFFE8+CADFC018 = CEDFC000 With the patch: [ 279.404671] module_32: Applying ADD relocate section 13 to 12 [ 279.404741] module_32: REL24 value = C00671B4. location = BF808024 [ 279.404814] module_32: Location before: 48000001. [ 279.404874] module_32: Location after: 4885F191. [ 279.404933] module_32: ie. jump to 0085F190+BF808024 = C00671B4 [ 279.405016] module_32: Applying ADD relocate section 15 to 14 [ 279.405085] module_32: REL24 value = C00671B4. location = BF800018 [ 279.405156] module_32: Location before: 48000000. [ 279.405215] module_32: Location after: 4886719C. [ 279.405275] module_32: ie. jump to 0086719C+BF800018 = C00671B4 We see that with the patch, no plt entries are set. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0c3d5cb8a4dfdf6ca1b8aeb385c01470d6628d55.1617283827.git.christophe.leroy@csgroup.eu commit a5d6a3e73acbd619dd5b7b831762b755f9e2db80 Author: Vaibhav Jain Date: Sun Apr 4 22:01:48 2021 +0530 powerpc/mm: Add cond_resched() while removing hpte mappings While removing large number of mappings from hash page tables for large memory systems as soft-lockup is reported because of the time spent inside htap_remove_mapping() like one below: watchdog: BUG: soft lockup - CPU#8 stuck for 23s! NIP plpar_hcall+0x38/0x58 LR pSeries_lpar_hpte_invalidate+0x68/0xb0 Call Trace: 0x1fffffffffff000 (unreliable) pSeries_lpar_hpte_removebolted+0x9c/0x230 hash__remove_section_mapping+0xec/0x1c0 remove_section_mapping+0x28/0x3c arch_remove_memory+0xfc/0x150 devm_memremap_pages_release+0x180/0x2f0 devm_action_release+0x30/0x50 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+0xd4/0x270 ksys_write+0xdc/0x130 system_call+0x5c/0x70 Fix this by adding a cond_resched() to the loop in htap_remove_mapping() that issues hcall to remove hpte mapping. The call to cond_resched() is issued every HZ jiffies which should prevent the soft-lockup from being reported. Suggested-by: Aneesh Kumar K.V Signed-off-by: Vaibhav Jain Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210404163148.321346-1-vaibhav@linux.ibm.com commit 75b7c05ebf902632f7f540c3eb0a8945c2d74aab Author: Shivaprasad G Bhat Date: Mon Mar 29 13:36:43 2021 -0400 powerpc/papr_scm: Implement support for H_SCM_FLUSH hcall Add support for ND_REGION_ASYNC capability if the device tree indicates 'ibm,hcall-flush-required' property in the NVDIMM node. Flush is done by issuing H_SCM_FLUSH hcall to the hypervisor. If the flush request failed, the hypervisor is expected to to reflect the problem in the subsequent nvdimm H_SCM_HEALTH call. This patch prevents mmap of namespaces with MAP_SYNC flag if the nvdimm requires an explicit flush[1]. References: [1] https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/memory/ndctl.py.data/map_sync.c Signed-off-by: Shivaprasad G Bhat Reviewed-by: Aneesh Kumar K.V [mpe: Use unsigned long / long instead of uint64_t/int64_t] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/161703936121.36.7260632399582101498.stgit@e1fbed493c87 commit 83fa2d13d628be901a21cdfb3553963cd8858052 Author: Sumit Garg Date: Mon Feb 8 13:32:22 2021 +0530 kdb: Refactor env variables get/set code Add two new kdb environment access methods as kdb_setenv() and kdb_printenv() in order to abstract out environment access code from kdb command functions. Also, replace (char *)0 with NULL as an initializer for environment variables array. Signed-off-by: Sumit Garg Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/1612771342-16883-1-git-send-email-sumit.garg@linaro.org [daniel.thompson@linaro.org: Replaced (char *)0/NULL initializers with an array size] Signed-off-by: Daniel Thompson commit ebe8dc5afb3912e2d4f5c62cf7c492a13143a77a Author: Takashi Iwai Date: Wed Apr 14 10:32:55 2021 +0200 ALSA: usb-audio: Apply implicit feedback mode for BOSS devices During the recent rewrite of the implicit feedback support, we've tested to apply the implicit fb on BOSS devices, but it failed, as the capture stream didn't start without the playback. As the end result, it got another type of quirk for tying both streams but starts playback always (commit 6234fdc1cede "ALSA: usb-audio: Quirk for BOSS GT-001"). Meanwhile, Mike Oliphant has tested the real implicit feedback mode for the playback again with the latest code, and found out that it actually works if the initial feedback sync is skipped; that is, on those BOSS devices, the playback stream has to be started at first without waiting for the capture URB completions. Otherwise it gets stuck. In the rest operations after the capture stream processed, we can take them as the implicit feedback source. This patch is an attempt to improve the support for BOSS devices with the implicit feedback mode in the way described above. It adds a new flag to snd_usb_audio, playback_first, indicating that the playback stream starts without sync with the initial capture completion. This flag is set in the quirk table with the new IMPLICIT_FB_BOTH type. Reported-and-tested-by: Mike Oliphant Link: https://lore.kernel.org/r/20210414083255.9527-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5676dba708bbb1fc94a9d3b2e9c114db9e4c6699 Author: Yang Jihong Date: Fri Mar 19 20:35:27 2021 +0800 perf annotate: Fix sample events lost in stdio mode In hist__find_annotations(), since different 'struct hist_entry' entries may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, entry will skipped if notes->src is NULL to avoid repeated output. However, there is a problem, for example, run the following command: # perf record -e branch-misses -e branch-instructions -a sleep 1 perf.data file contains different types of sample event. If the same IP sample event exists in branch-misses and branch-instructions, this event uses the same symbol. When annotate branch-misses events, notes->src corresponding to this event is set to null, as a result, when annotate branch-instructions events, this event is skipped and no annotate is output. Solution of this patch is to remove zfree in hists__find_annotations and change sort order to "dso,symbol" to avoid duplicate output when different processes correspond to the same symbol. Signed-off-by: Yang Jihong Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: Gustavo A. R. Silva Cc: Jin Yao Cc: Jiri Olsa Cc: Mark Rutland Cc: Martin Liška Cc: Peter Zijlstra Cc: zhangjinhao2@huawei.com Link: http://lore.kernel.org/lkml/20210319123527.173883-1-yangjihong1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 543f8d780867bdbd8b0792487fa1644d89faa19c Author: Jaroslav Kysela Date: Wed Apr 14 12:58:58 2021 +0200 ALSA: control_led - fix the stack usage (control element ops) It's a bad idea to allocate big structures on the stack. Mark the variables as static and add a note for the locking. Fixes: 22d8de62f11b ("ALSA: control - add generic LED trigger module as the new control layer") Cc: Nathan Chancellor Cc: Takashi Sakamoto Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210414105858.1937710-1-perex@perex.cz Signed-off-by: Takashi Iwai commit 914a307c3b4f2eb3401a1778bb98a7dfbfed1ccb Author: Ezequiel Garcia Date: Sat Apr 10 17:45:00 2021 -0300 dt-bindings: pinctrl: rockchip: add RK3568 SoC support Add RK3568/RK3566 SoC support to pinctrl. Signed-off-by: Ezequiel Garcia Reviewed-by: Heiko Stuebner Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210410204500.18091-1-ezequiel@collabora.com Signed-off-by: Linus Walleij commit 5a8a64d9a38b9d3794f9f5e153fc0358b858cc24 Author: Matti Vaittinen Date: Mon Apr 5 14:45:09 2021 +0300 MAINTAINERS: Add ROHM BD71815AGW Add maintainer entries for ROHM BD71815AGW drivers. New regulator and GPIO drivers were introduced for these PMICs. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit c56dc069f2687280090e0eb7454971cae3e8f2a5 Author: Matti Vaittinen Date: Mon Apr 5 14:44:50 2021 +0300 rtc: bd70528: Support RTC on ROHM BD71815 BD71815 contains similar RTC block as BD71828. Only the address offsets seem different. Support also BD71815 RTC using rtc-bd70528. Signed-off-by: Matti Vaittinen Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit 42391f7e218581f810461b41a2912e487f2f1f50 Author: Matti Vaittinen Date: Mon Apr 5 14:44:32 2021 +0300 clk: bd718x7: Add support for clk gate on ROHM BD71815 PMIC ROHM BD71815 also provide clk signal for RTC. Add control for gating this clock. Signed-off-by: Matti Vaittinen Reviewed-by: Stephen Boyd Signed-off-by: Lee Jones commit 1aad39001e851cd7ee2d811eb5fd4b044979d9d5 Author: Matti Vaittinen Date: Mon Apr 5 14:44:16 2021 +0300 regulator: Support ROHM BD71815 regulators Support voltage control for regulators on ROHM BD71815 PMIC. ROHM BD71815 contains 5 bucks, 7 LDOs and a boost (intended for LED). Bucks 1 and 2 support HW state based voltage level and enable states. Other regulators support HW state based enable states. All bucks and LDOs 1-5 allow voltage changes for RUN state and LDO4 can be enabled/disabled via GPIO. LDO3 does support changing between two predetermined voltages by using a GPIO but this functionality is not included in this commit. This work is derived from driver originally written by Tony Luo - although not much of original work is left. Signed-off-by: Matti Vaittinen Acked-by: Mark Brown Signed-off-by: Lee Jones commit 18f3c62586f7b4e1f038f570acda61a25c97c4ee Author: Matti Vaittinen Date: Mon Apr 5 14:44:00 2021 +0300 regulator: bd718x7, bd71828: Use ramp-delay helper Use generic regamp ramp-delay helper function instead of implementing own. Signed-off-by: Matti Vaittinen Acked-by: Mark Brown Signed-off-by: Lee Jones commit 80a71170646df80914a7290a197aca1e6116a49d Author: Matti Vaittinen Date: Mon Apr 5 14:43:44 2021 +0300 regulator: rohm-regulator: Support SNVS HW state. The ROHM BD71815 supports setting voltage levels/regulator status for HW-states "RUN", "SUSPEND", "LPSR" and "SNVS". Add DT parsing helper also for SNVS state. Signed-off-by: Matti Vaittinen Acked-by: Mark Brown Signed-off-by: Lee Jones commit 9cf37cec4b7d2cb972ba1682dd5c8f39a5761129 Author: Matti Vaittinen Date: Mon Apr 5 14:43:26 2021 +0300 regulator: rohm-regulator: linear voltage support The helper for obtaining HW-state based DVS voltage levels currently only works for regulators using linear-ranges. Extend support to regulators with simple linear mappings and add also proper error path if pickable-ranges regulators call this. Signed-off-by: Matti Vaittinen Acked-by: Mark Brown Signed-off-by: Lee Jones commit 703b288f3edf7b08d256499802fba88df5032d53 Author: Matti Vaittinen Date: Mon Apr 5 14:43:08 2021 +0300 gpio: Support ROHM BD71815 GPOs Support GPO(s) found from ROHM BD71815 power management IC. The IC has two GPO pins but only one is properly documented in the data-sheet. The driver exposes by default only the documented GPO. The second GPO is connected to E5 pin and is marked as GND in the data-sheet. Control for this undocumented pin can be enabled using a special DT property. This driver is derived from work by Peter Yang although not so much of the original is left. Signed-off-by: Matti Vaittinen Acked-by: Bartosz Golaszewski Acked-by: Linus Walleij Signed-off-by: Lee Jones commit 4dcdcfd5abb34d3139669fcd830b756d45678c47 Author: Matti Vaittinen Date: Mon Apr 5 14:42:51 2021 +0300 mfd: Support for ROHM BD71815 PMIC core Add core support for ROHM BD71815 Power Management IC. The IC integrates regulators, a battery charger with a coulomb counter, a real-time clock (RTC), clock gate and general-purpose outputs (GPO). Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit 06b2f5f5ecf3e3a3b74b42057b654a5dba7e63bb Author: Matti Vaittinen Date: Mon Apr 5 14:42:34 2021 +0300 mfd: Sort ROHM chip ID list for better readability Sort the ID list so it is easier to see which ICs are present. Signed-off-by: Matti Vaittinen Suggested-by: Lee Jones Signed-off-by: Lee Jones commit 488b205e57181a56f3503cb97240d32798d3d3bd Author: Matti Vaittinen Date: Mon Apr 5 14:42:13 2021 +0300 mfd: Add ROHM BD71815 ID Add chip ID for ROHM BD71815 and PMIC so that drivers can identify this IC. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit 4238dc1e649060a5655717b0bc8ae1cca64790ed Author: Matti Vaittinen Date: Mon Apr 5 14:41:55 2021 +0300 dt_bindings: mfd: Add ROHM BD71815 PMIC Document DT bindings for ROHM BD71815. BD71815 is a single-chip power management IC mainly for battery-powered portable devices. The IC integrates 5 bucks, 7 LDOs, a boost driver for LED, a battery charger with a Coulomb counter, a real-time clock, a 32kHz clock and two general-purpose outputs although only one is documented by the data-sheet. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 5b3dc252beda1f38fb1a2b2a5e7923eecd9e2572 Author: Matti Vaittinen Date: Mon Apr 5 14:41:30 2021 +0300 dt_bindings: regulator: Add ROHM BD71815 PMIC regulators Add binding documentation for regulators on ROHM BD71815 PMIC. 5 bucks, 7 LDOs and a boost for LED. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit d6ee7f2360c28e5547667edbb24867a867bffa71 Author: Matti Vaittinen Date: Mon Apr 5 14:41:07 2021 +0300 dt_bindings: bd71828: Add clock output mode The BD71828 allows configuring the clk32kout pin mode to CMOS or open-drain. Add device-tree property for specifying the preferred mode. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 316d0d92fbc9b926bda8ce7ccc109de0dccb4d92 Author: Matti Vaittinen Date: Mon Apr 5 14:40:44 2021 +0300 mfd: bd718x7: simplify by cleaning unnecessary device data Most ROHM PMIC sub-devices only use the regmap pointer from parent device. They can obtain this by dev_get_regamap so in most cases the MFD device does not need to allocate and populate the driver data. Simplify drivers by removing this. The BD70528 still needs the access to watchdog mutex so keep rohm_regmap_dev in use on BD70528 RTC and WDG drivers for now. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit f87c0d2e6c0c09d4e220ab3c17bf04dbadedf410 Author: Matti Vaittinen Date: Mon Apr 5 14:40:24 2021 +0300 rtc: bd70528: Do not require parent data The ROHM BD71828 and BD71815 RTC drivers only need the regmap pointer from parent. Regmap can be obtained via dev_get_regmap() so do not require parent to populate driver data for that. BD70528 on the other hand requires parent data to access the watchdog so leave the parent data for BD70528 here for now. Signed-off-by: Matti Vaittinen Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit 7c81a025054cd0aeeeaf17aba2e9757f0a6a38a1 Author: Mukesh Sisodiya Date: Sun Apr 11 13:25:44 2021 +0300 iwlwifi: dbg: disable ini debug in 9000 family and below Yoyo based debug is not applicable to old devices. As init debug is enabled by default in the driver, it needs to be disabled to work the old debug mechanism in old devices. Signed-off-by: Mukesh Sisodiya Fixes: b0d8d2c27007 ("iwlwifi: yoyo: enable yoyo by default") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411132130.805401a1b8ec.I30db38184a418cfc1c5ca1a305cc14a52501d415@changeid Signed-off-by: Luca Coelho commit 8932abef6ea433228aea0e39eb237b244ae2b091 Author: Matti Gottlieb Date: Sun Apr 11 13:25:43 2021 +0300 iwlwifi: pcie: Change ma product string name Change ma product string name to the correct name, and to reflect the CRF and not the CNV. Signed-off-by: Matti Gottlieb Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411132130.c05b4c55540f.I8dd0361b033f63658999ba53640949701b048f17@changeid Signed-off-by: Luca Coelho commit 378c7be65ccd173762242805f4591618249b91ae Author: Johannes Berg Date: Sun Apr 11 13:25:42 2021 +0300 iwlwifi: fw: print out trigger delay when collecting data It can be confusing to see "Collecting data: ..." followed by that not actually happening immediately so print out the delay in that message. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411132130.5bd095dc579a.Id1f3b746ac61497951638ba7ce70fc4b63dd87d1@changeid Signed-off-by: Luca Coelho commit d12455fdbfe9430affd88bfbfee51777356667a0 Author: Johannes Berg Date: Sun Apr 11 13:25:41 2021 +0300 iwlwifi: trans/pcie: defer transport initialisation In a few PCIe devices we may have to swap out the configuration after we allocate/initialise some parts of the device because we only know the correct one after reading some registers. This causes some things such as the byte-count table allocations to be incorrect, since the configuration is swapped for one with a bigger queue size. Fix this by initialising most of the transport much later, only after the configuration has finally been determined. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411132130.8f5db97db1e4.Ic622da559b586a04ca536a0ec49ed5ecf03a9354@changeid Signed-off-by: Luca Coelho commit 7db67f68392c1c5a6373c1caa7dd951bf94e550b Author: Luca Coelho Date: Sun Apr 11 13:25:40 2021 +0300 iwlwifi: bump FW API to 63 for AX devices Start supporting API version 63 for AX devices. Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411132130.a588a9dacd98.Ie4f96b8988c2cbd5f096ee64d0eb0f4829d55aee@changeid Signed-off-by: Luca Coelho commit 997254a9169c9a8fab1c8408db4ef64a4081f4ce Author: Emmanuel Grumbach Date: Sun Apr 11 13:25:39 2021 +0300 iwlwifi: mvm: don't WARN if we can't remove a time event It is not very useful to WARN if we can't send a host command The firmware is likely in a bad situation and the fact that we didn't send the host command has an impact on the firmware only, not on the driver. The driver could clean up all its state. Don't WARN in this case, but just leave a smaller note. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411132130.0324abc169c8.I4f9b769bc38d68f8ed43f77d2cd75e8f1993e964@changeid Signed-off-by: Luca Coelho commit cc61d3ced2aac08230f20809378c5e3134f6702d Author: Emmanuel Grumbach Date: Sun Apr 11 13:25:38 2021 +0300 iwlwifi: mvm: don't disconnect immediately if we don't hear beacons after CSA When we switch channel, we may miss a few beacons on the new channel. Don't disconnect if the time event for the switch ends before we hear the beacons. Note that this is relevant only for old devices that still use the TIME_EVENT firmware API for channel switch. The check that we hear a beacon before the time event ends was meant to be used for the association time event and not for the channel switch time event. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411132130.3d710091a0bd.I37a161ffdfb099a10080fbdc3b70a4deb76952e2@changeid Signed-off-by: Luca Coelho commit a9174578262b86f15cb1882f35e53b1fae0649fd Author: Mordechay Goodstein Date: Sun Apr 11 12:46:30 2021 +0300 iwlwifi: rs-fw: don't support stbc for HE 160 Our HE doesn't support it so never set HE 160 stbc Fixes: 3e467b8e4cf4 ("iwlwifi: rs-fw: enable STBC in he correctly") Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124418.550fd1903eb7.I8ddbc2f87044a5ef78d916c9c59be797811a1b7f@changeid Signed-off-by: Luca Coelho commit 70c9101d0a3e499b418e119d475d0e4533409e08 Author: Johannes Berg Date: Sun Apr 11 12:46:29 2021 +0300 iwlwifi: warn on SKB free w/o op-mode If this ever happens, and it looks like some code in PCIe is a bit broken and might lead to this, we want to know without crashing, so add a WARN_ON_ONCE(). Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124418.a18b7443dc55.Ia29836738acf14a55af5504aba90c6fea9fff785@changeid Signed-off-by: Luca Coelho commit 3c21990b0ccecf0e3679f82cd1931999bd78b261 Author: Miri Korenblit Date: Sun Apr 11 12:46:28 2021 +0300 iwlwifi: mvm: add support for version 3 of LARI_CONFIG_CHANGE command. Add support for version 3 of the LARI_CONFIG_CHANGE command. This is needed to support FW API change which is needed to support 11ax enablement in Russia. Signed-off-by: Miri Korenblit Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124418.7e68856c8a95.I83acdbe39b63c363cabc04ad42d1d0b9ce98901c@changeid Signed-off-by: Luca Coelho commit 9d401222db54dac353fecad26f2610c12c33ef47 Author: Mordechay Goodstein Date: Sun Apr 11 12:46:27 2021 +0300 iwlwifi: pcie: add ISR debug info for msix debug The debug prints help in case we get timeout on waiting for hw. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.306e2e56d3e8.I72e2977abbb1fddf23b8476bedf6a183fe969ff5@changeid Signed-off-by: Luca Coelho commit 2b6166664d2b5553953a8a5dee0843f3b1ca18e2 Author: Mordechay Goodstein Date: Sun Apr 11 12:46:26 2021 +0300 iwlwifi: pcie: merge napi_poll_msix functions The only difference between iwl_pcie_napi_poll_msix_shared() and iwl_pcie_napi_poll_msix() is when we have a shared queue and nothing in the rx queue. This case doesn't affect CPU performance, so we can merge the two functions. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.9d1b61ef53a5.I60b33d5379cf7c12f1de30fc3fd4cefc38220141@changeid Signed-off-by: Luca Coelho commit 6da29d3b42ea8b23251f8312e083a8da2e5ed6eb Author: Johannes Berg Date: Sun Apr 11 12:46:25 2021 +0300 iwlwifi: mvm: don't lock mutex in RCU critical section We cannot lock a mutex while we're in an RCU critical section. At the same time, we're accessing data structures that are protected by the mvm->mutex anyway, so just move the entire locking here to use only that. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.4d27bd36e10e.I1fd8e8fe442c41a5deaa560452b598ed7a60ada5@changeid Signed-off-by: Luca Coelho commit aa1540ca7616b996327abb8cb6f19ee91b34dbe0 Author: Mordechay Goodstein Date: Sun Apr 11 12:46:24 2021 +0300 iwlwifi: mvm: remove PS from lower rates. Power save (PS) should only be enabled when we reach the max phy rate. Before we reach it (MCS_9) for VHT, we should keep trying to improve the throughput. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.2a2fb9f9c25e.I7c7bbcfbdc1d35d2c3338778fb397dd5b08ea0e8@changeid Signed-off-by: Luca Coelho commit 4f7411d648939dfac596a7af8f28fc6eeb9833e8 Author: Roee Goldfiner Date: Sun Apr 11 12:46:23 2021 +0300 iwlwifi: mvm: umac error table mismatch umac_error_table In TLV address was read using mask on MSB but on the same table in alive message it was without which caused mismatch in devices with different memory region MSB Signed-off-by: Roee Goldfiner Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.179fee442115.Ib6eabe86cfda0b6044f07c07448c366b6e07e53d@changeid Signed-off-by: Luca Coelho commit 4cf2f5904d971a461f67825434ae3c31900ff84b Author: Mordechay Goodstein Date: Sun Apr 11 12:46:22 2021 +0300 iwlwifi: queue: avoid memory leak in reset flow In case the device is stopped any usage of hw queues needs to be reallocated in fw due to fw reset after device stop, so all driver internal queue should also be freed, and if we don't free the next usage would leak the old memory and get in recover flows "iwlwifi 0000:00:03.0: dma_pool_destroy iwlwifi:bc" warning. Also warn about trying to reuse an internal allocated queue. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.c72d2f0355c4.Ia3baff633b9b9109f88ab379ef0303aa152c16bf@changeid Signed-off-by: Luca Coelho commit 2b84e6328e65e263f62bae602894712449f41bc9 Author: Emmanuel Grumbach Date: Sun Apr 11 12:46:21 2021 +0300 iwlwifi: don't warn if we can't wait for empty tx queues If the firmware is dead, the Tx queues won't drain, but leaving a print in the log is enough, no need to WARN. If the firmware is dead, we must already have printed enough information in the log anyway. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.9a438b2320a9.I4aa897178df82acefd80173d76dd6849ad1bcdc1@changeid Signed-off-by: Luca Coelho commit fb54b86339adb6915a512d955d49d0d7f2aa4ba2 Author: Johannes Berg Date: Sun Apr 11 12:46:20 2021 +0300 iwlwifi: remove remaining software checksum code After the removal of the software checksum code for the A-MSDU path that we had for testing, the csum_skb variable stuck around. Remove it. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.280f268ae679.Iad455b6c91e427c9f74963bbd3eb0ce743aaac53@changeid Signed-off-by: Luca Coelho commit 0c73f47b430d125163ae42d7f271df1050cb993f Author: Emmanuel Grumbach Date: Sun Apr 11 12:46:19 2021 +0300 iwlwifi: remove TCM events Nobody uses that in the user space. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210411124417.b6560a5de0cd.I5dac9c60faed7f48b06d352aa2d65bcf8142c2dc@changeid Signed-off-by: Luca Coelho commit 098f1ea54e7ce80c39ecdf1b61a0939380674c1b Author: Ravi Darsi Date: Wed Mar 31 12:14:52 2021 +0300 iwlwifi: mvm: Use IWL_INFO in fw_reset_handshake() Debug message "firmware didn't ACK the reset - continue anyway\n" in fw_reset_handshake() is classified as error, however this is not an error as it is ignored. So, change it to info message for proper classification of debug messages. Signed-off-by: Ravi Darsi Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.449b3092c330.I515edcc41913ca7fbe4a4de923671d120d5618c6@changeid Signed-off-by: Luca Coelho commit f21afabae70394aa2cf4bdee24f34884cdb93be1 Author: Harish Mitty Date: Wed Mar 31 12:14:51 2021 +0300 iwlwifi: mvm: refactor ACPI DSM evaluation function Instead of implementing the DSM evaluation function in the MVM code, refactor it so it can be generalized and part of the common ACPI implementation. Signed-off-by: Harish Mitty [reworded subject and commit message] Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.a24af3551aac.I8e6bd5eb05f853b6331fa4823750f7ba8ffe46e6@changeid Signed-off-by: Luca Coelho commit d2bfda8addf9d78146c1ae3a39f4df3c845ea0d5 Author: Miri Korenblit Date: Wed Mar 31 12:14:50 2021 +0300 iwlwifi: mvm: support BIOS enable/disable for 11ax in Ukraine Read the new BIOS DSM and Pass to FW if to disable\enable 11ax for Ukraine according to the BIOS key. this is needed to enable OEMs to control enable/disable 11ax in Ukraine Signed-off-by: Miri Korenblit Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.055654e7707e.If7eaf9839cd5d59729a235df07e31668b408e740@changeid Signed-off-by: Luca Coelho commit 9cd243f24ec1960403de5f24f45155af24d94b13 Author: Mordechay Goodstein Date: Wed Mar 31 12:14:49 2021 +0300 iwlwifi: move iwl_configure_rxq to be used by other op_modes All the op_modes need to send this command as well. Instead of duplicating the code from mvm, put the code in a common place. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.deb71fce883a.I5eef009512f180e5974f3f491ff56c763cdcc878@changeid Signed-off-by: Luca Coelho commit 9a0f28d8628ecf86841682784d4d34aac9b1d336 Author: ybaruch Date: Wed Mar 31 12:14:48 2021 +0300 iwlwifi: add new so-gf device add new so-gf device to the driver. Signed-off-by: ybaruch Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.d6b0c1f85a7e.I2098ca066607edc48336021ea2e5afdbf8196acf@changeid Signed-off-by: Luca Coelho commit e12cfc7bbfd31c1be6567b296ea058e35fba91ab Author: Miri Korenblit Date: Wed Mar 31 12:14:47 2021 +0300 iwlwifi: mvm: enable PPAG in China Add support for ppag in China by reading revision 2 of the ppag table from ACPI, and passing the data to the FW. This is needed to enable OEMs to control ppag enablement in China. Signed-off-by: Miri Korenblit Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.69af388d0dce.I8cfddf9e6837bf394b00390181b4b774ded19acd@changeid Signed-off-by: Luca Coelho commit e8fe3b41c3a36c7a7aa88bdfec112b91530577e4 Author: Ilan Peer Date: Wed Mar 31 12:14:46 2021 +0300 iwlwifi: mvm: Add support for 6GHz passive scan When doing scan while 6GHz channels are not enabled, the 6GHz band is not scanned. Thus, if there are no APs on the 2GHz and 5GHz bands (that will allow discovery of geographic location etc. that would allow enabling the 6GHz channels) but there are non collocated APs on 6GHz PSC channels these would never be discovered. To overcome this, FW added support for performing passive UHB scan in case no APs were discovered during scan on the 2GHz and 5GHz channels. Add support for enabling such scan when the following conditions are met: - 6GHz channels are supported but not enabled by regulatory. - Station interface is not associated or less than a defined time interval passed from the last resume or HW reset flows. - At least 4 channels are included in the scan request - The scan request includes the widlcard SSID. - At least 50 minutes passed from the last 6GHz passive scan. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.7c7bd00e0aeb.Ib226ad57e416b43a710c36a78a617d4243458b99@changeid Signed-off-by: Luca Coelho commit 85b5fd94d7d9d7e775024cd0ba0f31c432bea79b Author: ybaruch Date: Wed Mar 31 12:14:44 2021 +0300 iwlwifi: add ax201 killer device add new killer devices configurations. Signed-off-by: ybaruch Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.54967363d26d.I5d1a3d810cf6abace51ebb2630d62d891e9fd302@changeid Signed-off-by: Luca Coelho commit 517a5eb9fab2bf1d078ee0d3f95abf6a7aa092f8 Author: Avraham Stern Date: Wed Mar 31 12:14:43 2021 +0300 iwlwifi: mvm: when associated with PMF, use protected NDP ranging negotiation When associated to the resonder with PMF, request to protect the NDP ranging negotiation with PMF. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.e7982c72e12b.Ib6db362d01a31132c638e194d49476cd8e3ff430@changeid Signed-off-by: Luca Coelho commit 5e1688ce914d46f37cce4695f6aebb1ecb9943e0 Author: Johannes Berg Date: Wed Mar 31 12:14:42 2021 +0300 iwlwifi: mvm: clean up queue sync implementation When we do queue sync, it's confusing that we have the structures declared in the FW API header files that aren't really firmware, and the union is also confusing - especially now in the code that checks the size on the return. So rework this: change the type of sync and whether to do it in a synchronous fashion to arguments, and build the data structure in the function, so we don't need the union. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.f62833fd9893.I612d7ac1c655ec4880329360e15d207698c750bc@changeid Signed-off-by: Luca Coelho commit 5f8a3561ea8bf75ad52cb16dafe69dd550fa542e Author: Johannes Berg Date: Wed Mar 31 12:14:41 2021 +0300 iwlwifi: mvm: write queue_sync_state only for sync We use mvm->queue_sync_state to wait for synchronous queue sync messages, but if an async one happens inbetween we shouldn't clear mvm->queue_sync_state after sending the async one, that can run concurrently (at least from the CPU POV) with another synchronous queue sync. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210331121101.d11c9bcdb4aa.I0772171dbaec87433a11513e9586d98b5d920b5f@changeid Signed-off-by: Luca Coelho commit 20578872d503d5c211bdf334185ccd8afe4ae697 Author: Avraham Stern Date: Tue Mar 30 16:25:00 2021 +0300 iwlwifi: mvm: responder: support responder config command version 8 Version 8 add NDP ranging parameters configuration, as well as enable/disable NDP ranging and LMR feedback. Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.ce9570d755d3.Ic81cb8da9aecbbc9edff468cb4ffbb741418cc73@changeid Signed-off-by: Luca Coelho commit 9896b0b904455ef5371327e0fa8de823d192c5a1 Author: Avraham Stern Date: Tue Mar 30 16:24:59 2021 +0300 iwlwifi: mvm: support range request command version 12 Version 12 adds configuration of NDP ranging parameters: - max number of LTF repetitions - max number of spatial streams - max total LTFs Signed-off-by: Avraham Stern Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.2c30c376c5cf.I01460f7277594ee7c98a8e1fe5447c59e70bf073@changeid Signed-off-by: Luca Coelho commit 48a5494d6a4cb5812f0640d9515f1876ffc7a013 Author: Johannes Berg Date: Tue Mar 30 16:24:58 2021 +0300 iwlwifi: pcie: make cfg vs. trans_cfg more robust If we (for example) have a trans_cfg entry in the PCI IDs table, but then don't find a full cfg entry for it in the info table, we fall through to the code that treats the PCI ID table entry as a full cfg entry. This obviously causes crashes later, e.g. when trying to build the firmware name string. Avoid such crashes by using the low bit of the pointer as a tag for trans_cfg entries (automatically using a macro that checks the type when assigning) and then checking that before trying to use the data as a full entry - if it's just a partial entry at that point, fail. Since we're adding some macro magic, also check that the type is in fact either struct iwl_cfg_trans_params or struct iwl_cfg, failing compilation ("initializer element is not constant") if it isn't. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.6f69fe6e4128.I921d4ae20ef5276716baeeeda0b001cf25b9b968@changeid Signed-off-by: Luca Coelho commit d4626f91739b76633dbb3013e843e178c4a26618 Author: Mordechay Goodstein Date: Tue Mar 30 16:24:57 2021 +0300 iwlwifi: pcie: clear only FH bits handle in the interrupt For simplicity we assume that msix has 2 IRQ lines one used for rx data called msix_non_share, and another used for one bit flags messages (alive, hw error, sw error, rx data flag) called msix_share. Every time the FW has data to send it puts it on the RX queue and HW turns on the flags in msix_share (inta_fw) indicating about rx data, and HW sends an interrupt a bit later to the msix_non_share _unless_ the msix_shared RX data bit was cleared. Currently in the code every time we get an msix_shared we clear all bits including rx data queue bits. So we can have a race ---------------------------------------------------- DRIVER | HW | FW ---------------------------------------------------- - send host cmd to FW | | | | - handle message | | and put a response | | on the RX queue | - RX flag on | | | - send alive msix | - alive flag on | | - interrupt | | msix_share driver | - handle msix_shared | | and clear all flags | | bits | | | - don't send an | | interrupt on | | msix_non_shared | | (driver cleared) | - driver timeout on | | waiting for host cmd | | respond | | | | ---------------------------------------------------- The change is to clear only the msi_shared flags that are handled in the msix_shared flow, which will cause the hardware to send an interrupt on the msix_non_share line as well, when it has data. Signed-off-by: Mordechay Goodstein Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.a1cdda2fa270.I02a82312679f4541f30bb8db8747a797dbb70ee7@changeid Signed-off-by: Luca Coelho commit a7ff1899a7bb97f2e396100c1be373d17a0ae836 Author: ybaruch Date: Tue Mar 30 16:24:56 2021 +0300 iwlwifi: add 160Mhz to killer 1550 name change the name of 1550 killer device to 160Mhz. Signed-off-by: ybaruch Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.b87618a26ff8.Icf1d9c150ec108f30ce0e72c18b9350da6ae5087@changeid Signed-off-by: Luca Coelho commit 20d04296b3cf1be81d5399a0ca12a38c8623dfe9 Author: ybaruch Date: Tue Mar 30 16:24:55 2021 +0300 iwlwifi: change name to AX 211 and 411 family change the name of the ax211 and ax411. Signed-off-by: ybaruch Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.fc3218805052.I203f1a802338f59955bd511c90217f63b918390b@changeid Signed-off-by: Luca Coelho commit 39ab22c127aabc0634ea6fa268ffb9b938d31d9d Author: ybaruch Date: Tue Mar 30 16:24:54 2021 +0300 iwlwifi: change step in so-gf struct change the step of iwlax210_2ax_cfg_so_jf_a0 to iwlax210_2ax_cfg_so_jf_b0 as it is on the wcd_fw-dev repository. Signed-off-by: ybaruch Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.e9a9d1da76bc.Ie964f37872bbb88d1a02094134f9a2c38faad884@changeid Signed-off-by: Luca Coelho commit 2be05dfd9c3f86c66ebcfd7b2a01d07c7e0158dd Author: Matti Gottlieb Date: Tue Mar 30 16:24:53 2021 +0300 iwlwifi: pcie: Add support for Bz Family Add support for different combinations of Bz and CRFs. Note: As of now we do not know the exact values for ltr_delay and xtal_latency, so for now use the worst case scenario values until the actual values are clarified. Signed-off-by: Matti Gottlieb Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.caac8d996532.I6a22d6decb106cd50d7954b19236b69d685dcc39@changeid Signed-off-by: Luca Coelho commit 2360acbd5e22d95d1a8fcd096478198c572d9b85 Author: Emmanuel Grumbach Date: Tue Mar 30 16:24:52 2021 +0300 iwlwifi: mvm: don't allow CSA if we haven't been fully associated "Fully associated" means that we heard a beacon with the DTIM information and the firmware is configured to track the beacons. Since the firmware needs to track the beacons for the CSA, we can't configure the firmware for CSA before it knows when the beacons are expected otherwise we'd get ASSERT 301D. If we are required to start CSA before we told the firmware when the beacons are expected to arrive, just report a failure and let mac80211 disconnect. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.9adaedeb59e4.Idaad6aaf3f9759d023b8e00b10064915c0db9aa3@changeid Signed-off-by: Luca Coelho commit 416dde0f83a87f35fa8ca44e0837a55903b46ffe Author: Johannes Berg Date: Tue Mar 30 16:24:51 2021 +0300 iwlwifi: pcie: normally grab NIC access for inflight-hcmd We currently have a special, separate, code path to acquire NIC access for the in-flight host-command workaround on 7000 series hardware. However, the normal code path here has grown a number of additional workarounds/semantics over time, such as reprobing the device if things fail. Rather than try to replicate any of this logic, call the normal grab_nic_access logic for the workaround. This changes the spinlock to _bh, but that's OK since it's just redundant, we already have soft-IRQs disabled when we get here, and so didn't (have to) do it again. Since it's only for commands there's however no point in making the code more complex just to not use _bh here. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.d196fc6ffb23.Idc1ce3ce9fed9178beee7e5409bc669f79b06a0d@changeid Signed-off-by: Luca Coelho commit 72bc934cb393d9aa0a3a73026c020da36e817fa1 Author: Johannes Berg Date: Tue Mar 30 16:24:50 2021 +0300 iwlwifi: pcie: avoid unnecessarily taking spinlock Most devices don't set the apmg_wake_up_wa flag, so we don't do anything for them. Avoid taking the spinlock for every command unless the device needs this workaround. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.1ab60af3f318.I51cc202f68a2a953223e70c3e8610343412961b6@changeid Signed-off-by: Luca Coelho commit 7686fd52b8757aaedb4cf3b38bf02d1911674545 Author: Sara Sharon Date: Tue Mar 30 16:24:49 2021 +0300 iwlwifi: mvm: enable TX on new CSA channel before disconnecting When moving to the new channel, we block TX until we hear the first beacon. if it is not heard, we proceed to disconnect. Since TX is blocked (without mac80211 being aware of it) the frame is stuck, resulting with queue hang. Instead, reenable TX before reporting on the connection loss. As we are on the new channel, there is no problem with that, even if the original CSA had quiet mode. Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20210330162204.eb4f2ff1b863.Ib16238106b33d58b2b7688dc6297018b915ecef4@changeid Signed-off-by: Luca Coelho commit d5c09ff06901cb869ff0f6faef3548258a0a9f44 Author: Fabio Aiuto Date: Wed Apr 14 10:17:39 2021 +0200 staging: rtl8723bs: fix indentation issue introduced by long line split fix indentation of last line in if condition. Fixes: af6afdb63f17 (staging: rtl8723bs: split long lines) Reported-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210414081739.2990-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3c9c14338c12fb6f8d3aea7e7a1b7f93ce9e84b0 Author: Miklos Szeredi Date: Wed Apr 14 10:40:58 2021 +0200 cuse: simplify refcount Put extra reference early in cuse_channel_open(). Signed-off-by: Miklos Szeredi commit 8217673d07256b22881127bf50dce874d0e51653 Author: Miklos Szeredi Date: Wed Apr 14 10:40:58 2021 +0200 cuse: prevent clone For cloned connections cuse_channel_release() will be called more than once, resulting in use after free. Prevent device cloning for CUSE, which does not make sense at this point, and highly unlikely to be used in real life. Signed-off-by: Miklos Szeredi commit 0a7419c68a45d2d066b996be5087aa2d07ce80eb Author: Miklos Szeredi Date: Wed Apr 14 10:40:58 2021 +0200 virtiofs: fix userns get_user_ns() is done twice (once in virtio_fs_get_tree() and once in fuse_conn_init()), resulting in a reference leak. Also looks better to use fsc->user_ns (which *should* be the current_user_ns() at this point). Signed-off-by: Miklos Szeredi commit 07595bfa24ce7e8ecef70c84fee9a2374d8c0a61 Author: Jiapeng Chong Date: Tue Apr 13 17:22:23 2021 +0800 virtiofs: remove useless function Fix the following clang warning: fs/fuse/virtio_fs.c:130:35: warning: unused function 'vq_to_fpq' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Miklos Szeredi commit a7f0d7aab0b4f3f0780b1f77356e2fe7202ac0cb Author: Connor Kuehl Date: Thu Mar 18 08:52:22 2021 -0500 virtiofs: split requests that exceed virtqueue size If an incoming FUSE request can't fit on the virtqueue, the request is placed onto a workqueue so a worker can try to resubmit it later where there will (hopefully) be space for it next time. This is fine for requests that aren't larger than a virtqueue's maximum capacity. However, if a request's size exceeds the maximum capacity of the virtqueue (even if the virtqueue is empty), it will be doomed to a life of being placed on the workqueue, removed, discovered it won't fit, and placed on the workqueue yet again. Furthermore, from section 2.6.5.3.1 (Driver Requirements: Indirect Descriptors) of the virtio spec: "A driver MUST NOT create a descriptor chain longer than the Queue Size of the device." To fix this, limit the number of pages FUSE will use for an overall request. This way, each request can realistically fit on the virtqueue when it is decomposed into a scattergather list and avoid violating section 2.6.5.3.1 of the virtio spec. Signed-off-by: Connor Kuehl Reviewed-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit c79c5e0178922a9e092ec8fed026750f39dcaef4 Author: Luis Henriques Date: Wed Mar 17 08:44:43 2021 +0000 virtiofs: fix memory leak in virtio_fs_probe() When accidentally passing twice the same tag to qemu, kmemleak ended up reporting a memory leak in virtiofs. Also, looking at the log I saw the following error (that's when I realised the duplicated tag): virtiofs: probe of virtio5 failed with error -17 Here's the kmemleak log for reference: unreferenced object 0xffff888103d47800 (size 1024): comm "systemd-udevd", pid 118, jiffies 4294893780 (age 18.340s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ff ff ff ff ff ff 80 90 02 a0 ff ff ff ff ................ backtrace: [<000000000ebb87c1>] virtio_fs_probe+0x171/0x7ae [virtiofs] [<00000000f8aca419>] virtio_dev_probe+0x15f/0x210 [<000000004d6baf3c>] really_probe+0xea/0x430 [<00000000a6ceeac8>] device_driver_attach+0xa8/0xb0 [<00000000196f47a7>] __driver_attach+0x98/0x140 [<000000000b20601d>] bus_for_each_dev+0x7b/0xc0 [<00000000399c7b7f>] bus_add_driver+0x11b/0x1f0 [<0000000032b09ba7>] driver_register+0x8f/0xe0 [<00000000cdd55998>] 0xffffffffa002c013 [<000000000ea196a2>] do_one_initcall+0x64/0x2e0 [<0000000008f727ce>] do_init_module+0x5c/0x260 [<000000003cdedab6>] __do_sys_finit_module+0xb5/0x120 [<00000000ad2f48c6>] do_syscall_64+0x33/0x40 [<00000000809526b5>] entry_SYSCALL_64_after_hwframe+0x44/0xae Cc: stable@vger.kernel.org Signed-off-by: Luis Henriques Fixes: a62a8ef9d97d ("virtio-fs: add virtiofs filesystem") Reviewed-by: Stefan Hajnoczi Reviewed-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 3466958beb31a8e9d3a1441a34228ed088b84f3e Author: Vivek Goyal Date: Tue Apr 6 10:07:06 2021 -0400 fuse: invalidate attrs when page writeback completes In fuse when a direct/write-through write happens we invalidate attrs because that might have updated mtime/ctime on server and cached mtime/ctime will be stale. What about page writeback path. Looks like we don't invalidate attrs there. To be consistent, invalidate attrs in writeback path as well. Only exception is when writeback_cache is enabled. In that case we strust local mtime/ctime and there is no need to invalidate attrs. Recently users started experiencing failure of xfstests generic/080, geneirc/215 and generic/614 on virtiofs. This happened only newer "stat" utility and not older one. This patch fixes the issue. So what's the root cause of the issue. Here is detailed explanation. generic/080 test does mmap write to a file, closes the file and then checks if mtime has been updated or not. When file is closed, it leads to flushing of dirty pages (and that should update mtime/ctime on server). But we did not explicitly invalidate attrs after writeback finished. Still generic/080 passed so far and reason being that we invalidated atime in fuse_readpages_end(). This is called in fuse_readahead() path and always seems to trigger before mmaped write. So after mmaped write when lstat() is called, it sees that atleast one of the fields being asked for is invalid (atime) and that results in generating GETATTR to server and mtime/ctime also get updated and test passes. But newer /usr/bin/stat seems to have moved to using statx() syscall now (instead of using lstat()). And statx() allows it to query only ctime or mtime (and not rest of the basic stat fields). That means when querying for mtime, fuse_update_get_attr() sees that mtime is not invalid (only atime is invalid). So it does not generate a new GETATTR and fill stat with cached mtime/ctime. And that means updated mtime is not seen by xfstest and tests start failing. Invalidating attrs after writeback completion should solve this problem in a generic manner. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 550a7d3bc0c4049ef8d36ff4d9ed7082ee8cb5ec Author: Vivek Goyal Date: Thu Mar 25 11:18:23 2021 -0400 fuse: add a flag FUSE_SETXATTR_ACL_KILL_SGID to kill SGID When posix access ACL is set, it can have an effect on file mode and it can also need to clear SGID if. - None of caller's group/supplementary groups match file owner group. AND - Caller is not priviliged (No CAP_FSETID). As of now fuser server is responsible for changing the file mode as well. But it does not know whether to clear SGID or not. So add a flag FUSE_SETXATTR_ACL_KILL_SGID and send this info with SETXATTR to let file server know that sgid needs to be cleared as well. Reported-by: Luis Henriques Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 52a4c95f4d24b8bcb50745732f7b9f8513c49c5f Author: Vivek Goyal Date: Thu Mar 25 11:18:22 2021 -0400 fuse: extend FUSE_SETXATTR request Fuse client needs to send additional information to file server when it calls SETXATTR(system.posix_acl_access), so add extra flags field to the structure. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit 6076f5f341e612152879bfda99f0b76c1953bf0b Author: Alessio Balsini Date: Fri Mar 19 15:05:14 2021 +0000 fuse: fix matching of FUSE_DEV_IOC_CLONE command With commit f8425c939663 ("fuse: 32-bit user space ioctl compat for fuse device") the matching constraints for the FUSE_DEV_IOC_CLONE ioctl command are relaxed, limited to the testing of command type and number. As Arnd noticed, this is wrong as it wouldn't ensure the correctness of the data size or direction for the received FUSE device ioctl. Fix by bringing back the comparison of the ioctl received by the FUSE device to the originally generated FUSE_DEV_IOC_CLONE. Fixes: f8425c939663 ("fuse: 32-bit user space ioctl compat for fuse device") Reported-by: Arnd Bergmann Signed-off-by: Alessio Balsini Signed-off-by: Miklos Szeredi commit aa6ff555f0e62bc1c85a2d181c1fae95d47c00ce Author: Bhaskar Chowdhury Date: Fri Mar 26 06:46:42 2021 +0530 fuse: fix a typo s/reponsible/responsible/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Miklos Szeredi commit a73d47f57792dc3140348cc07271500c610b5624 Author: Miklos Szeredi Date: Wed Apr 14 10:40:56 2021 +0200 fuse: don't zero pages twice All callers of fuse_short_read already set the .page_zeroing flag, so no need to do the tail zeroing again. Signed-off-by: Miklos Szeredi commit 4b91459ad283a7b174c7a092e31c470f217d1a31 Author: Connor Kuehl Date: Thu Mar 18 08:52:23 2021 -0500 fuse: fix typo for fuse_conn.max_pages comment 'Maxmum' -> 'Maximum' Signed-off-by: Connor Kuehl Signed-off-by: Miklos Szeredi commit 4f06dd92b5d0a6f8eec6a34b8d6ef3e1f4ac1e10 Author: Vivek Goyal Date: Wed Oct 21 16:12:49 2020 -0400 fuse: fix write deadlock There are two modes for write(2) and friends in fuse: a) write through (update page cache, send sync WRITE request to userspace) b) buffered write (update page cache, async writeout later) The write through method kept all the page cache pages locked that were used for the request. Keeping more than one page locked is deadlock prone and Qian Cai demonstrated this with trinity fuzzing. The reason for keeping the pages locked is that concurrent mapped reads shouldn't try to pull possibly stale data into the page cache. For full page writes, the easy way to fix this is to make the cached page be the authoritative source by marking the page PG_uptodate immediately. After this the page can be safely unlocked, since mapped/cached reads will take the written data from the cache. Concurrent mapped writes will now cause data in the original WRITE request to be updated; this however doesn't cause any data inconsistency and this scenario should be exceedingly rare anyway. If the WRITE request returns with an error in the above case, currently the page is not marked uptodate; this means that a concurrent read will always read consistent data. After this patch the page is uptodate between writing to the cache and receiving the error: there's window where a cached read will read the wrong data. While theoretically this could be a regression, it is unlikely to be one in practice, since this is normal for buffered writes. In case of a partial page write to an already uptodate page the locking is also unnecessary, with the above caveats. Partial write of a not uptodate page still needs to be handled. One way would be to read the complete page before doing the write. This is not possible, since it might break filesystems that don't expect any READ requests when the file was opened O_WRONLY. The other solution is to serialize the synchronous write with reads from the partial pages. The easiest way to do this is to keep the partial pages locked. The problem is that a write() may involve two such pages (one head and one tail). This patch fixes it by only locking the partial tail page. If there's a partial head page as well, then split that off as a separate WRITE request. Reported-by: Qian Cai Link: https://lore.kernel.org/linux-fsdevel/4794a3fa3742a5e84fb0f934944204b55730829b.camel@lca.pw/ Fixes: ea9b9907b82a ("fuse: implement perform_write") Cc: # v2.6.26 Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit c567fb9da3dd0477c281a3b673f7e9ac28feb039 Author: Mitali Borkar Date: Wed Apr 14 12:26:20 2021 +0530 staging: rtl8192e: removed multiple blank lines Removed multiple blank lines to make code better and neater. Reported by checkpatch. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/2bfe551f152a611cc49a71a4984f41ef7ee69df5.1618380932.git.mitaliborkar810@gmail.com Signed-off-by: Greg Kroah-Hartman commit e3a8607981e757651a9369b5ce5f1635e5a737d2 Author: Mitali Borkar Date: Wed Apr 14 12:25:41 2021 +0530 staging: rtl8192e: remove unnecessary blank line after close brace Removed an extra blank line after close brace '{' as it was not necessary. Reported by checkpatch Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/40f72a84750f402c342b4685e0a2f15d27875c9a.1618380932.git.mitaliborkar810@gmail.com Signed-off-by: Greg Kroah-Hartman commit c7dabf1a45bbdc39723f43ef8aa0338fab4cb60c Author: Mitali Borkar Date: Wed Apr 14 12:25:21 2021 +0530 staging: rtl8192e: remove unnecessary blank line before brace Removed an extra blank line before close brace as it was not necessary. Reported by checkpatch. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/cad6a7885f30dcfabaf1ccab1fd0644416fea194.1618380932.git.mitaliborkar810@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3cc112a0886d24c2d2da761d9274f546a3a8152b Author: Mitali Borkar Date: Wed Apr 14 12:25:03 2021 +0530 staging: rtl8192e: add spaces around binary operators Added spaces around binary operators like '+', '*', '|', '-', '&', to improve readability and to meet linux kernel coding style. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/28cbc4825fdfacf5d5ea8bb688a8bd6a1c65f059.1618380932.git.mitaliborkar810@gmail.com Signed-off-by: Greg Kroah-Hartman commit f013209cbf8ef24142617803f56b52d59a31ef63 Author: Fabio M. De Francesco Date: Wed Apr 14 08:13:46 2021 +0200 staging: rtl8723bs: hal: Remove four set but not used variables Removed four variables that were set but not used. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210414061346.11423-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 77e14dfe53c033f60bfa92606d81c7e6b8a1ba9d Author: Fabio Aiuto Date: Tue Apr 13 16:56:31 2021 +0200 staging: rtl8723bs: remove two unused functions remove dump_drv_version() and dump_log_level() function definitions and prototypes. Those functions are unused, and add unnecessary wrap level to log calls. They wrap DBG_871X_SEL_NL which will be replaced by netdev_dbg() with coccinelle script application. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2e8dd88c053735daed95701140b2f03b4cfe2a2e.1618325614.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ee31d57e4022855307dc7199a2b9c169c4ceea37 Author: Fabio Aiuto Date: Tue Apr 13 16:56:30 2021 +0200 staging: rtl8723bs: remove unnecessary dump_drv_version() usage remove unnecessary dump_drv_version() usage. This prepares dump_drv_version() for removal, before coccinelle script application. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9ce6559cac69eaebfdb07206921d14e99d2b1967.1618325614.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 69c3331aa099af811f85b1f8d3ae9df194c56531 Author: Fabio Aiuto Date: Tue Apr 13 16:56:29 2021 +0200 staging: rtl8723bs: replace dump_drv_version() usage with netdev_dbg() replace dump_drv_version() usage with netdev_dbg(). There's no need to further wrap a netdev_dbg() call for such a low number of occurrences. The string printed is the same contained in DBG_871X_SEL_NL macro called inside dump_drv_version(). This is just preparation before bulk DBG_871X_SEL_NL macro replacement by coccinelle, as the semantic patch that will be used just replaces, doesn't remove. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a4df375dba6c004a22cf197ff8d498d0e4f3b52e.1618325614.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3d7ac0402907012c8a62ab9a83f12199ed2d0087 Author: Fabio M. De Francesco Date: Tue Apr 13 17:05:17 2021 +0200 staging: rtl8723bs: core: Remove unused but set variable Removed "ledBlink_param" because it was set to the value of "pbuf" but was never reused. This set was made by direct assignment (no helper had been called), therefore it had no side effect to the location pointed by "pbuf". Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210413150517.12533-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit e5b2e3e742015dd2aa6bc7bcef2cb59b2de1221c Author: Sergey Shtylyov Date: Sat Apr 10 23:25:10 2021 +0300 i2c: sh7760: add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: a26c20b1fa6d ("i2c: Renesas SH7760 I2C master driver") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang commit c3db59cfe16ad81d691904d9420fdefa34063b29 Author: Fabio M. De Francesco Date: Tue Apr 13 12:20:33 2021 +0200 staging: rtl8188eu: Move channel_table away from rtw_mlme_ext.h Moved "static const struct channel_table[]" from include/rtw_mlme_ext.h to core/rtw_ioctl_set.c because the latter is the only file that uses that array of struct(s) in the whole driver. "make rtl8188eu/ W=1" output several warnings about "'channel_table' defined but not used [-Wunused-const-variable=]". Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210413102033.24781-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 147178cf03a6dcb337e703d4dacd008683022a58 Author: Sergey Shtylyov Date: Sat Apr 10 23:23:33 2021 +0300 i2c: rcar: add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with the invalid IRQ #s. Fixes: 6ccbe607132b ("i2c: add Renesas R-Car I2C driver") Signed-off-by: Sergey Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit 174250f8d965ac06823e8935917b26cee5bdeac5 Author: Mikko Talikka Date: Tue Apr 13 10:16:37 2021 +0200 staging: comedi: adv_pci_dio: remove whitespace Fixed checkpatch.pl warning: CHECK: Blank lines aren't necessary before a close brace '}' + + } Signed-off-by: Mikko Talikka Link: https://lore.kernel.org/r/AM0PR01MB42597C4CAA1B9E51D4AE3D5E974F9@AM0PR01MB4259.eurprd01.prod.exchangelabs.com Signed-off-by: Greg Kroah-Hartman commit 0d3bf53e897dce943b98d975bbde77156af6cd81 Author: Sergey Shtylyov Date: Sat Apr 10 23:20:49 2021 +0300 i2c: mlxbf: add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: b5b5b32081cd ("i2c: mlxbf: I2C SMBus driver for Mellanox BlueField SoC") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang commit c5e5f7a8d931fb4beba245bdbc94734175fda9de Author: Sergey Shtylyov Date: Sat Apr 10 23:18:31 2021 +0300 i2c: jz4780: add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: ba92222ed63a ("i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang commit bb6129c32867baa7988f7fd2066cf18ed662d240 Author: Sergey Shtylyov Date: Sat Apr 10 23:16:41 2021 +0300 i2c: emev2: add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: 5faf6e1f58b4 ("i2c: emev2: add driver") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang commit 5581c2c5d02bc63a0edb53e061c8e97cd490646e Author: Sergey Shtylyov Date: Sat Apr 10 23:14:35 2021 +0300 i2c: cadence: add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to devm_request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding an original error code. Stop calling devm_request_irq() with invalid IRQ #s. Fixes: df8eb5691c48 ("i2c: Add driver for Cadence I2C controller") Signed-off-by: Sergey Shtylyov Signed-off-by: Wolfram Sang commit c4b1fcc310e655fa8414696c38a84d36c00684c8 Author: Ye Weihua Date: Thu Apr 8 19:06:38 2021 +0800 i2c: imx: Fix PM reference leak in i2c_imx_reg_slave() pm_runtime_get_sync() will increment the PM reference count even on failure. Forgetting to put the reference again will result in a leak. Replace it with pm_runtime_resume_and_get() to keep the usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Ye Weihua Signed-off-by: Wolfram Sang commit a85c5c7a3aa8041777ff691400b4046e56149fd3 Author: Qinglang Miao Date: Tue Dec 1 17:31:46 2020 +0800 i2c: xiic: fix reference leak when pm_runtime_get_sync fails The PM reference count is not expected to be incremented on return in xiic_xfer and xiic_i2c_remove. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 10b17004a74c ("i2c: xiic: Fix the clocking across bind unbind") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Wolfram Sang commit 2c662660ce2bd3b09dae21a9a9ac9395e1e6c00b Author: Qinglang Miao Date: Tue Dec 1 17:31:45 2020 +0800 i2c: stm32f7: fix reference leak when pm_runtime_get_sync fails The PM reference count is not expected to be incremented on return in these stm32f7_i2c_xx serious functions. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: ea6dd25deeb5 ("i2c: stm32f7: add PM_SLEEP suspend/resume support") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Wolfram Sang commit 3a4f326463117cee3adcb72999ca34a9aaafda93 Author: Qinglang Miao Date: Tue Dec 1 17:31:44 2020 +0800 i2c: sprd: fix reference leak when pm_runtime_get_sync fails The PM reference count is not expected to be incremented on return in sprd_i2c_master_xfer() and sprd_i2c_remove(). However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 8b9ec0719834 ("i2c: Add Spreadtrum I2C controller driver") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Wolfram Sang commit 780f629741257ed6c54bd3eb53b57f648eabf200 Author: Qinglang Miao Date: Tue Dec 1 17:31:43 2020 +0800 i2c: omap: fix reference leak when pm_runtime_get_sync fails The PM reference count is not expected to be incremented on return in omap_i2c_probe() and omap_i2c_remove(). However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. I Replace it with pm_runtime_resume_and_get to keep usage counter balanced. What's more, error path 'err_free_mem' seems not like a proper name any more. So I change the name to err_disable_pm and move pm_runtime_disable below, for pm_runtime of 'pdev->dev' should be disabled when pm_runtime_resume_and_get fails. Fixes: 3b0fb97c8dc4 ("I2C: OMAP: Handle error check for pm runtime") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Reviewed-by: Grygorii Strashko Reviewed-by: Vignesh Raghavendra Signed-off-by: Wolfram Sang commit 47ff617217ca6a13194fcb35c6c3a0c57c080693 Author: Qinglang Miao Date: Tue Dec 1 17:31:41 2020 +0800 i2c: imx: fix reference leak when pm_runtime_get_sync fails In i2c_imx_xfer() and i2c_imx_remove(), the pm reference count is not expected to be incremented on return. However, pm_runtime_get_sync will increment pm reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 3a5ee18d2a32 ("i2c: imx: implement master_xfer_atomic callback") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Reviewed-by: Oleksij Rempel Signed-off-by: Wolfram Sang commit 278e5bbdb9a94fa063c0f9bcde2479d0b8042462 Author: Qinglang Miao Date: Tue Dec 1 17:31:40 2020 +0800 i2c: imx-lpi2c: fix reference leak when pm_runtime_get_sync fails The PM reference count is not expected to be incremented on return in lpi2c_imx_master_enable. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 13d6eb20fc79 ("i2c: imx-lpi2c: add runtime pm support") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Wolfram Sang commit 223125e37af8a641ea4a09747a6a52172fc4b903 Author: Qinglang Miao Date: Tue Dec 1 17:31:39 2020 +0800 i2c: img-scb: fix reference leak when pm_runtime_get_sync fails The PM reference count is not expected to be incremented on return in functions img_i2c_xfer and img_i2c_init. However, pm_runtime_get_sync will increment the PM reference count even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 93222bd9b966 ("i2c: img-scb: Add runtime PM") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Wolfram Sang commit 23ceb8462dc6f4b4decdb5536a7e5fc477cdf0b6 Author: Qinglang Miao Date: Tue Dec 1 17:31:17 2020 +0800 i2c: cadence: fix reference leak when pm_runtime_get_sync fails The PM reference count is not expected to be incremented on return in functions cdns_i2c_master_xfer and cdns_reg_slave. However, pm_runtime_get_sync will increment pm usage counter even failed. Forgetting to putting operation will result in a reference leak here. Replace it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 7fa32329ca03 ("i2c: cadence: Move to sensible power management") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Wolfram Sang commit e2b1e4b532abdd39bfb7313146153815e370d60c Author: Vincent Mailhol Date: Tue Apr 13 20:42:42 2021 +0900 can: etas_es58x: fix null pointer dereference when handling error frames During the handling of CAN bus errors, a CAN error SKB is allocated using alloc_can_err_skb(). Even if the allocation of the SKB fails, the function continues in order to do the stats handling. All access to the can_frame pointer (cf) should be guarded by an if statement: if (cf) However, the increment of the rx_bytes stats: netdev->stats.rx_bytes += cf->can_dlc; dereferences the cf pointer and was not guarded by an if condition leading to a NULL pointer dereference if the can_err_skb() function failed. Replacing the cf->can_dlc by the macro CAN_ERR_DLC (which is the length of any CAN error frames) solves this NULL pointer dereference. Fixes: 8537257874e9 ("can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces") Link: https://lore.kernel.org/r/20210413114242.2760-1-mailhol.vincent@wanadoo.fr Reported-by: Arunachalam Santhanam Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 376f9e34c10faa3e94b881088b160cfda540ae5f Author: Julian Braha Date: Tue Apr 13 22:51:38 2021 -0400 drivers: pinctrl: qcom: fix Kconfig dependency on GPIOLIB When PINCTRL_MSM is enabled, and GPIOLIB is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for GPIOLIB_IRQCHIP Depends on [n]: GPIOLIB [=n] Selected by [y]: - PINCTRL_MSM [=y] && PINCTRL [=y] && (ARCH_QCOM || COMPILE_TEST [=y]) This is because PINCTRL_MSM selects GPIOLIB_IRQCHIP, without selecting or depending on GPIOLIB, despite GPIOLIB_IRQCHIP depending on GPIOLIB. Having PINCTRL_MSM select GPIOLIB will cause a recursive dependency error. Signed-off-by: Julian Braha Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210414025138.480085-1-julianbraha@gmail.com Signed-off-by: Linus Walleij commit a77a05dc9cf24a8c88b9d9c70e8984f936d075f3 Author: Masahiro Yamada Date: Wed Apr 14 00:08:17 2021 +0900 kconfig: split menu.c out of parser.y Compile menu.c as an independent compilation unit. Signed-off-by: Masahiro Yamada commit 08718745d8610c2ed9870568b8d9c01b7f103efb Author: Masahiro Yamada Date: Mon Apr 12 10:12:27 2021 +0900 kconfig: nconf: refactor in print_in_middle() This helper is the same as the sample code in the NCURSES HOWTO [1], but it is over-engineering to be used for nconf. I do not see any good reason to use the 'float' type just for the division by 2. All the call-sites pass a non-NULL pointer to the first argument, so 'if (win == NULL) win = stdscr;' is dead code. 'if (startx != 0) x = startx;' is dead code because 'x' will be overridden some lines below, by 'x = startx + (int)temp;'. All the call-sites pass a non-zero value to the second argument, so 'if (starty != 0)' is always true. getyx(win, y, x) is also dead-code because both 'y' and 'x' are overridden. All the call-sites pass 0 to the third parameter, so 'startx' can be removed. All the call-sites pass a non-zero value to the fourth parameter, so 'if (width == 0) width = 80;' is dead code. The window will be refreshed later, so there is no need to call refresh() in this function. Change the type of the last parameter from 'chtype' to 'int' to be aligned with the prototype, 'int wattrset(WINDOW *win, int attrs);' I also slightly cleaned up the indentation style. [1]: https://tldp.org/HOWTO/NCURSES-Programming-HOWTO/color.html Signed-off-by: Masahiro Yamada commit 0a94768cfda6a77c42e5373d264c96c77ef1a2e5 Author: Masahiro Yamada Date: Mon Apr 12 10:12:26 2021 +0900 kconfig: nconf: remove meaningless wattrset() call from show_menu() This attribute is not used because it will be overridden some lines below: wattrset(main_window, attr_main_menu_box); Signed-off-by: Masahiro Yamada commit ecdb733f8fa843f632f4306939a5c3704be4a2dd Author: Masahiro Yamada Date: Mon Apr 12 10:12:25 2021 +0900 kconfig: nconf: change set_config_filename() to void function No one uses the return value of this function. Signed-off-by: Masahiro Yamada commit 93487b17b147f22400378240d06f33badc3368da Author: Masahiro Yamada Date: Sun Apr 11 04:45:34 2021 +0900 kconfig: nconf: refactor attributes setup code The current attributes setup code is strange; the array attribute[] is set to values outside the range of the attribute_t enum. At least, attributes_t attributes[ATTR_MAX+1] = {0}; ... should be int attribute[ATTR_MAX+1] = {0}; Also, there is no need to hard-code the color-pair numbers in attributes_t. The current code is messy. Rewrite it. Signed-off-by: Masahiro Yamada commit 16b0e10238b45251790ea1a2683855d4f8f3c1a3 Author: Masahiro Yamada Date: Sun Apr 11 04:45:33 2021 +0900 kconfig: nconf: remove unneeded default for menu prompt The rootmenu always has a prompt even if the 'mainmenu' statement is missing in the top Kconfig file. conf_parse() calls menu_add_prompt(P_MENU, "Main menu", NULL) in this case. So, every 'menu' has a prompt. Signed-off-by: Masahiro Yamada commit 2ba50da9ec34196a895b4947dc6bb1dbf1ace670 Author: Masahiro Yamada Date: Sun Apr 11 04:45:32 2021 +0900 kconfig: nconf: get rid of (void) casts from wattrset() calls This reverts commit 10175ba65fde ("nconfig: Silence unused return values from wattrset"). With this patch applied, recent GCC versions can cleanly build nconf without "value computed is not used" warnings. The wattrset() used to be implemented as a macro, like this: #define wattrset(win,at) \ (NCURSES_OK_ADDR(win) \ ? ((win)->_attrs = NCURSES_CAST(attr_t, at), \ OK) \ : ERR) The GCC bugzilla [1] reported a false-positive -Wunused-value warning in a similar test case. It was fixed by GCC 4.4.1. Let's revert that commit, and see if somebody will claim the issue. [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39889 Signed-off-by: Masahiro Yamada commit 7f5ff55bf8eb99e42c10388ccffdfbb0a0caac67 Author: Masahiro Yamada Date: Sun Apr 11 04:45:31 2021 +0900 kconfig: nconf: fix NORMAL attributes The lower 8-bit of attributes should be 0, but this code wrongly sets it to NORMAL (=1). The correct one is A_NORMAL. Signed-off-by: Masahiro Yamada commit 68876c38c4b30653c1779414954ce747a455253c Author: Masahiro Yamada Date: Sun Apr 11 04:45:30 2021 +0900 kconfig: mconf,nconf: remove unneeded '\0' termination after snprintf() snprintf() always terminates the destination buffer with '\0' even if the buffer is not long enough. (In this case, the last element of the buffer becomes '\0'.) The explicit termination is unneeded. Signed-off-by: Masahiro Yamada commit f02aa48dde8b96eef5998b049ad11547bfc16080 Author: Masahiro Yamada Date: Sat Apr 10 23:31:58 2021 +0900 kconfig: use /boot/config-* etc. as DEFCONFIG_LIST only for native build When the .config file is missing, 'make config', 'make menuconfig', etc. uses a file listed in DEFCONFIG_LIST, if found, as base configuration. Ususally, /boot/config-$(uname -r) exists, and is used as default. However, when you are cross-compiling the kernel, it does not make sense to use /boot/config-* on the build host. It should default to arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). UML previously did not use DEFCONFIG_LIST at all, but it should be able to use arch/um/configs/$(KBUILD_DEFCONFIG) as a base config file. Signed-off-by: Masahiro Yamada commit 5ee546594025fc9337e4cc8b79db89f1258cf480 Author: Masahiro Yamada Date: Sat Apr 10 15:57:22 2021 +0900 kconfig: change sym_change_count to a boolean flag sym_change_count has no good reason to be 'int' type. sym_set_change_count() compares the old and new values after casting both of them to (bool). I do not see any practical diffrence between sym_set_change_count(1) and sym_add_change_count(1). Use the boolean flag, conf_changed. Signed-off-by: Masahiro Yamada commit 1f035a52918a4c97b99c5d9f0d5023fe659bccaa Author: Masahiro Yamada Date: Sat Apr 10 15:52:46 2021 +0900 kconfig: nconf: fix core dump when searching in empty menu The following code in get_mext_match(): index = (index + items_num) % items_num; ... makes the program crash when items_num is zero (that is, the menu is empty). A menu can be empty when all the options in it are hidden by unmet 'depends on'. For example, menu "This menu will be empty" config FOO bool "foo" depends on BROKEN endmenu If you visit this menu and press a '/' key and then another key, nconf crashes with: Floating point exception (core dumped) When the number of items is zero, it does not make sense to search in the menu. In this case, current_item() returns NULL, and item_index() ERR, but get_mext_match() does not check it. Let's make get_mext_match() just return if the menu is empty. While I am here, change items_num from 'int' to 'unsigned int' because it should never become negative. Signed-off-by: Masahiro Yamada commit bffbf6e2ad6a8c9fbf78f3561404527fe69ef23d Author: Bhaskar Chowdhury Date: Sat Mar 27 02:48:57 2021 +0530 kconfig: lxdialog: A spello fix and a punctuation added s/propperly/properly/ s/thats/that\'s/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Masahiro Yamada commit 21f8b32fbdbc1cf94e285384daf490d9c4ae5ae3 Author: Bhaskar Chowdhury Date: Fri Mar 26 11:31:22 2021 +0530 kconfig: streamline_config.pl: Couple of typo fixes s/configuraton/configuration/ s/orignal/original/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Masahiro Yamada commit a69b191f6297310ff140f2868b89fe2a2f355b90 Author: Yang Li Date: Mon Mar 15 14:55:44 2021 +0800 kconfig: use true and false for bool variable fixed the following coccicheck: ./scripts/kconfig/confdata.c:36:9-10: WARNING: return of 0/1 in function 'is_dir' with return type bool Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Masahiro Yamada commit 6dd85ff178cd76851e2184b13e545f5a88d1be30 Author: Masahiro Yamada Date: Sun Mar 14 04:48:36 2021 +0900 kconfig: change "modules" from sub-option to first-level attribute Now "modules" is the only member of the "option" property. Remove "option", and move "modules" to the top level property. Signed-off-by: Masahiro Yamada commit ab838577aaaeda12242b7f1e2da3f25c9b4cec3a Author: Masahiro Yamada Date: Sun Mar 14 04:48:35 2021 +0900 kconfig: remove allnoconfig_y option Now that the only user, CONFIG_EMBEDDED has stopped using this option, remove it entirely. Signed-off-by: Masahiro Yamada commit f8f0d06438e5c810d1e13b5f8c2fed501fe36e9c Author: Masahiro Yamada Date: Sun Mar 14 04:48:34 2021 +0900 kconfig: do not use allnoconfig_y option allnoconfig_y is an ugly hack that sets a symbol to 'y' by allnoconfig. allnoconfig does not mean a minimal set of CONFIG options because a bunch of prompts are hidden by 'if EMBEDDED' or 'if EXPERT', but I do not like to hack Kconfig this way. Use the pre-existing feature, KCONFIG_ALLCONFIG, to provide a one liner config fragment. CONFIG_EMBEDDED=y is still forced when allnoconfig is invoked as a part of tinyconfig. No change in the .config file produced by 'make tinyconfig'. The output of 'make allnoconfig' will be changed; we will get CONFIG_EMBEDDED=n because allnoconfig literally sets all symbols to n. Signed-off-by: Masahiro Yamada commit dd4659963a4d2dde9756e31ffe5d7c639bcaa26e Author: Masahiro Yamada Date: Sun Mar 14 04:48:33 2021 +0900 kconfig: move default KBUILD_DEFCONFIG back to scripts/kconfig/Makefile This is a partial revert of commit 2a86f6612164 ("kbuild: use KBUILD_DEFCONFIG as the fallback for DEFCONFIG_LIST"). Now that the reference to $(DEFCONFIG_LIST) was removed from init/Kconfig, the default KBUILD_DEFCONFIG can go back home. Signed-off-by: Masahiro Yamada commit b75b0a819af9f78fc395b189cddd40f590194d20 Author: Masahiro Yamada Date: Sun Mar 14 04:48:32 2021 +0900 kconfig: change defconfig_list option to environment variable "defconfig_list" is a weird option that defines a static symbol that declares the list of base config files in case the .config does not exist yet. This is quite different from other normal symbols; we just abused the "string" type and the "default" properties to list out the input files. They must be fixed values since these are searched for and loaded in the parse stage. It is an ugly hack, and should not exist in the first place. Providing this feature as an environment variable is a saner approach. Signed-off-by: Masahiro Yamada commit 406616213bb776a6e6ec69192df39ab1042690f1 Author: Masahiro Yamada Date: Sun Mar 14 04:48:31 2021 +0900 kconfig: move JUMP_NB to mconf.c This macro is only used in mconf.c. Signed-off-by: Masahiro Yamada commit 16854b567dff767e5ec5e6dc23021271136733a5 Author: Jan Kiszka Date: Mon Oct 26 18:39:06 2020 +0100 x86/pat: Do not compile stubbed functions when X86_PAT is off Those are already provided by linux/io.h as stubs. The conflict remains invisible until someone would pull linux/io.h into memtype.c. This fixes a build error when this file is used outside of the kernel tree. [ bp: Massage commit message. ] Signed-off-by: Jan Kiszka Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/a9351615-7a0d-9d47-af65-d9e2fffe8192@siemens.com commit 98f8475c78697f6c1155f93d3a346d9027deb5aa Author: Masahiro Yamada Date: Sun Mar 14 04:48:30 2021 +0900 kconfig: move conf_set_all_new_symbols() to conf.c This function is only used in conf.c. Move it there together with the randomize_choice_values() helper. Define 'enum conf_def_mode' locally in conf.c as well. Signed-off-by: Masahiro Yamada commit c361e5d4d07d63768880e1994c7ed999b3a94cd9 Author: Mike Rapoport Date: Tue Apr 13 21:08:39 2021 +0300 x86/setup: Move trim_snb_memory() later in setup_arch() to fix boot hangs Commit a799c2bd29d1 ("x86/setup: Consolidate early memory reservations") moved reservation of the memory inaccessible by Sandy Bride integrated graphics very early, and, as a result, on systems with such devices the first 1M was reserved by trim_snb_memory() which prevented the allocation of the real mode trampoline and made the boot hang very early. Since the purpose of trim_snb_memory() is to prevent problematic pages ever reaching the graphics device, it is safe to reserve these pages after memblock allocations are possible. Move trim_snb_memory() later in boot so that it will be called after reserve_real_mode() and make comments describing trim_snb_memory() operation more elaborate. [ bp: Massage a bit. ] Fixes: a799c2bd29d1 ("x86/setup: Consolidate early memory reservations") Reported-by: Randy Dunlap Signed-off-by: Mike Rapoport Signed-off-by: Borislav Petkov Tested-by: Randy Dunlap Tested-by: Hugh Dickins Link: https://lkml.kernel.org/r/f67d3e03-af90-f790-baf4-8d412fe055af@infradead.org commit 06ad53efeb496d8841169ec0919ba6852c7852f6 Author: Alex Elder Date: Fri Apr 9 10:52:51 2021 -0500 ARM: dts: qcom: sdx55: add IPA information Add IPA-related nodes and definitions to "sdx55.dtsi". The SMP2P nodes (ipa_smp2p_out and ipa_smp2p_in) are already present. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20210409155251.955632-1-elder@linaro.org Signed-off-by: Bjorn Andersson commit 7de91b665600c96b1fc66c4c5a679db275c0c674 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:39:30 2021 +0530 ARM: configs: qcom_defconfig: Reduce CMA size to 64MB Not all platforms are able to allocate CMA size of 256MB. One such platform is SDX55. Hence, use the standard 64MB size for CMA. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170930.91834-8-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 436d35bdd9fd4dd50d852d5376eafd2f10a86bde Author: Manivannan Sadhasivam Date: Thu Apr 8 22:39:29 2021 +0530 ARM: configs: qcom_defconfig: Enable GLINK SMEM driver Enable the Qualcomm GLINK SMEM driver to support GLINK protocol over shared memory. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170930.91834-7-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 05c35d83852bc57abebe5919099463e8c5eaeace Author: Manivannan Sadhasivam Date: Thu Apr 8 22:39:28 2021 +0530 ARM: configs: qcom_defconfig: Enable SDX55 interconnect driver Enable interconnect driver for SDX55 platform to manage the interconnect providers. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170930.91834-6-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 15f54d0100c4754d1f967b688a9046aa0e1ac1bd Author: Manivannan Sadhasivam Date: Thu Apr 8 22:39:27 2021 +0530 ARM: configs: qcom_defconfig: Enable Q6V5_PAS remoteproc driver Enable the Qualcomm Q6V5_PAS (Peripheral Authentication Service) remoteproc driver to manage the modem co-processor in SDX55 platform. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170930.91834-5-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit cdb6c63d2cc5a6ea358d6f0261951460886b57aa Author: Manivannan Sadhasivam Date: Thu Apr 8 22:39:26 2021 +0530 ARM: configs: qcom_defconfig: Enable CPUFreq support Enable CPUFreq and CPUFreq DT drivers to carry out CPU Frequency scaling duties on platforms like SDX55. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170930.91834-4-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit fde56f62a103c16cab41a138e29316b303e81c80 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:39:25 2021 +0530 ARM: configs: qcom_defconfig: Enable SDX55 A7 PLL and APCS clock driver Enable A7 PLL driver and APCS clock driver on SDX55 platform. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170930.91834-3-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit a4ce57235842c8feead038767a3a45d5e38f58a2 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:39:24 2021 +0530 ARM: configs: qcom_defconfig: Enable APCS IPC mailbox driver Enable Qualcomm APCS IPC mailbox driver for IPC communication between application processor and other masters in platforms like SDX55. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170930.91834-2-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 3263d4be57881837d5307143afdeac5a1f4c0e2f Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:55 2021 +0530 ARM: dts: qcom: sdx55: Add basic devicetree support for Thundercomm T55 Thundercomm T55 is the development platform based on the Qualcomm SDX55 chipset. This basic support includes support for debug serial, NAND flash, BAM DMA, USB and regulators support. https://www.thundercomm.com/app_en/product/1593506006365532 Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-14-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 328008f41cad1a96e4b3204d3c55587e7cf8d82b Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:54 2021 +0530 dt-bindings: arm: qcom: Add binding for Thundercomm T55 kit Add devicetree binding for Thundercomm T55 Dev kit based on SDX55. Acked-by: Rob Herring Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-13-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 6a5d3c61193063bfdf252200809dfdcc65a1f7fc Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:53 2021 +0530 ARM: dts: qcom: sdx55: Add basic devicetree support for Telit FN980 TLB Telit FN980 TLB is the development platform based on the Qualcomm SDX55 chipset. This basic support includes support for debug serial, NAND flash, BAM DMA, USB and regulators support. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-12-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 222ed6a21c1396d564b6bd16dc36acb3777bca55 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:52 2021 +0530 dt-bindings: arm: qcom: Add binding for Telit FN980 TLB board Add devicetree binding for Telit FN980 TLB board based on SDX55. Acked-by: Rob Herring Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-11-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 67b4744a0c16858d614ed1049bc76e6b62765944 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:57 2021 +0530 ARM: dts: qcom: sdx55: Add Modem remoteproc node Add modem support to SDX55 using the PAS remoteproc driver. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-16-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 5e4c1243071d29ed5511121d044116b942ba6a7b Author: Peng Fan Date: Thu Apr 8 09:44:49 2021 +0800 remoteproc: imx_rproc: support remote cores booted before Linux Kernel - When remote cores are kicked before Linux Kernel, we are not able to get resource table from the firmware elf file, so we need to add rsc_table to hold the resource table published by remote cores and imx_rproc_get_loaded_rsc_table is to get the resource table. - Per remoteproc framework, add attach hook for processor in a detached state. - Add imx_rproc_detect_mode to detect remote cores' working mode to set the state which is required by remoteproc framework. Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1617846289-13496-5-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 10a3d4079eaea06472f1981152e2840e7232ffa9 Author: Peng Fan Date: Thu Apr 8 09:44:48 2021 +0800 remoteproc: imx_rproc: move memory parsing to rproc_ops Use the rproc_ops::prepare() hook for doing memory resources reallocation when reattaching a remote procesor. Suggested-by: Mathieu Poirier Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1617846289-13496-4-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit f638a19775ae60ae919ff604fdc04362ff4f817f Author: Peng Fan Date: Thu Apr 8 09:44:47 2021 +0800 remoteproc: imx_rproc: enlarge IMX7D_RPROC_MEM_MAX 8 is not enough when we need more, such as resource table for remote cores that booted before Linux Kernel, so enlarge IMX7D_RPROC_MEM_MAX to 32. And also rename it to IMX_RPROC_MEM_MAX which make more sense. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/1617846289-13496-3-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 6e962bfe56b99843ab716dc8a9438039476c99e2 Author: Peng Fan Date: Thu Apr 8 09:44:46 2021 +0800 remoteproc: imx_rproc: add missing of_node_put After of_parse_phandle, we need of_node_put to decrease the refcount of the device_node. Reported-by: Mathieu Poirier Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/1617846289-13496-2-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 889cb0d43d18ed348971e49378ed6a63e3a4745e Author: Wei Yongjun Date: Wed Mar 31 12:27:09 2021 +0000 remoteproc: imx_rproc: fix build error without CONFIG_MAILBOX Fix build error when CONFIG_MAILBOX is not set: arm-linux-gnueabi-ld: drivers/remoteproc/imx_rproc.o: in function `imx_rproc_kick': imx_rproc.c:(.text+0x328): undefined reference to `mbox_send_message' arm-linux-gnueabi-ld: drivers/remoteproc/imx_rproc.o: in function `imx_rproc_probe': imx_rproc.c:(.text+0x52c): undefined reference to `mbox_request_channel_byname' arm-linux-gnueabi-ld: imx_rproc.c:(.text+0x548): undefined reference to `mbox_request_channel_byname' arm-linux-gnueabi-ld: imx_rproc.c:(.text+0x76c): undefined reference to `mbox_free_channel' arm-linux-gnueabi-ld: imx_rproc.c:(.text+0x774): undefined reference to `mbox_free_channel' arm-linux-gnueabi-ld: imx_rproc.c:(.text+0x7c4): undefined reference to `mbox_free_channel' arm-linux-gnueabi-ld: drivers/remoteproc/imx_rproc.o: in function `imx_rproc_remove': imx_rproc.c:(.text+0x86c): undefined reference to `mbox_free_channel' arm-linux-gnueabi-ld: imx_rproc.c:(.text+0x874): undefined reference to `mbox_free_channel' make: *** [Makefile:1292: vmlinux] Error 1 Reviewed-by: Mathieu Poirier Fixes: 2df7062002d0 ("remoteproc: imx_proc: enable virtio/mailbox") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210331122709.3935521-1-weiyongjun1@huawei.com Signed-off-by: Bjorn Andersson commit 6353da47ee0082286e4d4a7dc4b38d4ee5ea4cb4 Author: Junlin Yang Date: Thu Apr 8 22:33:22 2021 +0800 remoteproc: qcom: wcss: Remove unnecessary PTR_ERR() Remove unnecessary PTR_ERR(), it has been assigned to ret before, so return ret directly. Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210408143322.1647-1-angkery@163.com Signed-off-by: Bjorn Andersson commit ca0e89406ba18e9ba98d28413b50469f631bb583 Author: Wei Yongjun Date: Fri Mar 26 02:47:41 2021 +0000 remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR() PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. This commit fix it by return 'ret' directly. Reviewed-by: Dan Carpenter Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210326024741.841267-1-weiyongjun1@huawei.com Signed-off-by: Bjorn Andersson commit 3fdba9d27cc68a4d561da80bfecd4f73239b9a86 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:42:11 2021 +0530 remoteproc: qcom: pas: Add modem support for SDX55 Add remoteproc support for Hexagon modem found on the Qualcomm SDX55 platform. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408171211.92141-1-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 7a64a5c2e04a9613425b76b0294fa75607cdd513 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:56 2021 +0530 dt-bindings: remoteproc: qcom: pas: Add binding for SDX55 Add devicetree binding for SDX55 remoteproc. Acked-by: Rob Herring Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-15-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit ce2cb12dccab57179fc97d2c89f872333ff369f0 Author: Bhaskar Chowdhury Date: Wed Mar 17 15:30:01 2021 +0530 net: ethernet: intel: Fix a typo in the file ixgbe_dcb_nl.c s/Reprogam/Reprogram/ Signed-off-by: Bhaskar Chowdhury Reviewed-by: Jesse Brandeburg Acked-by: Randy Dunlap Signed-off-by: Tony Nguyen commit 7eceea90c5427c8a4deed38e67c1250c31df8363 Author: Chen Lin Date: Mon Feb 15 20:04:58 2021 +0800 net: intel: Remove unused function pointer typedef ixgbe_mc_addr_itr Remove the 'ixgbe_mc_addr_itr' typedef as it is not used. Signed-off-by: Chen Lin Tested-by: Dave Switzer Signed-off-by: Tony Nguyen commit 47222864c14bc10c7769378f7601e2a45bd52026 Author: Jostar Yang Date: Thu Nov 12 21:33:56 2020 +0100 ixgbe: Support external GBE SerDes PHY BCM54616s The Broadcom PHY is used in switches, so add the ID, and hook it up. This upstreams the Linux kernel patch from the network operating system SONiC from February 2020 [1]. [1]: https://github.com/Azure/sonic-linux-kernel/pull/122 Signed-off-by: Jostar Yang Signed-off-by: Guohan Lu Signed-off-by: Paul Menzel Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit aa2f62cf211a0985c14fd78a17d55296769698d6 Author: Giulio Benetti Date: Tue Apr 13 18:46:53 2021 -0700 Input: add driver for the Hycon HY46XX touchpanel series This patch adds support for Hycon HY46XX. Signed-off-by: Giulio Benetti Link: https://lore.kernel.org/r/20210413144446.2277817-4-giulio.benetti@benettiengineering.com Signed-off-by: Dmitry Torokhov commit d19989a2d9d79c226bb5c094d1cc9f0c8959e9f4 Author: Giulio Benetti Date: Tue Apr 13 18:46:41 2021 -0700 dt-bindings: touchscreen: Add HY46XX bindings This adds device tree bindings for the Hycon HY46XX touchscreen series. Signed-off-by: Giulio Benetti Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210413144446.2277817-3-giulio.benetti@benettiengineering.com Signed-off-by: Dmitry Torokhov commit 2254f405d199385e133fe730a4f3bab3f06a050f Author: Giulio Benetti Date: Tue Apr 13 18:46:30 2021 -0700 dt-bindings: Add Hycon Technology vendor prefix Update Documentation/devicetree/bindings/vendor-prefixes.yaml to include "hycon" as a vendor prefix for "Hycon Technology". Company website: https://www.hycontek.com/ Signed-off-by: Giulio Benetti Reviewed-by: Jonathan Neuschäfer Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210413144446.2277817-2-giulio.benetti@benettiengineering.com Signed-off-by: Dmitry Torokhov commit 9e1e00f18afc83de7782f47583ec844afb162372 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:51 2021 +0530 ARM: dts: qcom: Fix node name for NAND controller node Use the common "nand-controller" node name for NAND controller node to fix the `make dtbs_check` validation for Qcom platforms. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-10-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit ce5a28d12ead42bc0b4a61524244f9b42eb7d918 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:50 2021 +0530 ARM: dts: qcom: sdx55: Add interconnect nodes Add interconnect nodes for the providers in SDX55 platform. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-9-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 6bf6655ddcfee15d7747583fa124e6e3c613092b Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:49 2021 +0530 ARM: dts: qcom: sdx55: Add SCM node Add SCM node to enable SCM functionality on SDX55 platform. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-8-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 5c00af37e95b0c557b26b980ffba4f94d6c9d0f4 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:48 2021 +0530 dt-bindings: firmware: scm: Add compatible for SDX55 Add devicetree compatible for SCM present in SDX55 platform. Acked-by: Rob Herring Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-7-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 9b7069edb11d54787a8ac5c06e6763b3b1d5b587 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:47 2021 +0530 ARM: dts: qcom: sdx55: Add IMEM and PIL info region Add a simple-mfd representing IMEM on SDX55 and define the PIL relocation info region, so that post mortem tools will be able to locate the loaded remoteproc. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-6-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 21e6e1dced4f950b65f0b99a722dfc36bb14d99f Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:46 2021 +0530 ARM: dts: qcom: sdx55: Add modem SMP2P node Add SMP2P nodes for the SDX55 platform to communicate with the modem. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-5-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 0ec7bde7b590f8efa5823df3b52b32dd373060ff Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:45 2021 +0530 ARM: dts: qcom: sdx55: Add CPUFreq support Add CPUFreq support to SDX55 platform using the cpufreq-dt driver. There is no dedicated hardware block available on this platform to carry on the CPUFreq duties. Hence, it is accomplished using the CPU clock and regulators tied together by the operating points table. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-4-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 8e3d9a7c4798f7fdd63f14c0331fcb978b2eafbb Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:44 2021 +0530 ARM: dts: qcom: sdx55: Add support for APCS block The APCS block on SDX55 acts as a mailbox controller and also provides clock output for the Cortex A7 CPU. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-3-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 37f0f245f92a1fbb4786762129b7b1f090720a43 Author: Manivannan Sadhasivam Date: Thu Apr 8 22:34:43 2021 +0530 ARM: dts: qcom: sdx55: Add support for A7 PLL clock On SDX55 there is a separate A7 PLL which is used to provide high frequency clock to the Cortex A7 CPU via a MUX. Signed-off-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408170457.91409-2-manivannan.sadhasivam@linaro.org Signed-off-by: Bjorn Andersson commit 463c2149ede72b696c42b0d6c5a03c061600d04c Author: Toke Høiland-Jørgensen Date: Tue Apr 13 11:16:07 2021 +0200 selftests/bpf: Add tests for target information in bpf_link info queries Extend the fexit_bpf2bpf test to check that the info for the bpf_link returned by the kernel matches the expected values. While we're updating the test, change existing uses of CHEC() to use the much easier to read ASSERT_*() macros. v2: - Convert last CHECK() call and get rid of 'duration' var - Split ASSERT_OK_PTR() checks to two separate if statements Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210413091607.58945-2-toke@redhat.com commit 441e8c66b23e027c00ccebd70df9fd933918eefe Author: Toke Høiland-Jørgensen Date: Tue Apr 13 11:16:06 2021 +0200 bpf: Return target info when a tracing bpf_link is queried There is currently no way to discover the target of a tracing program attachment after the fact. Add this information to bpf_link_info and return it when querying the bpf_link fd. Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210413091607.58945-1-toke@redhat.com commit a683246a069b13bb661033b8cda0355686b85443 Author: Qiheng Lin Date: Fri Apr 9 19:07:54 2021 +0800 mailbox: arm_mhu_db: Remove redundant dev_err call in mhu_db_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Signed-off-by: Jassi Brar commit 6457f4cd7810fdd1bd7d261845898292e632ede8 Author: Orson Zhai Date: Fri Mar 19 14:15:37 2021 +0800 mailbox: sprd: Add supplementary inbox support Some sensors connected to Unisoc mailbox will send data very frequently. This makes channel 0 very busy and the messages from other remote cores not able to be handled as soon as possible. It's a trick (un-documented) from Unisoc ASIC designers to resolve this special requirement that an inbox assigned to one of the remote cores before was modified to be exposed to host cpu core. Then from host side, a supplementary inbox is added for transferring mass but not emergency messages from the remote cores, such as step counting sensor, with an independent FIFO and interrupt which is as same as channel 0. Meanwihle, inbox part of this channel is still kept for original remote core to use. Signed-off-by: Orson Zhai Reviewed-by: Baolin Wang Signed-off-by: Jassi Brar commit 6203b954fc2360e272846da168cfe77dffdb6da9 Author: Orson Zhai Date: Fri Mar 19 14:15:36 2021 +0800 dt-bindings: mailbox: Add interrupt-names to SPRD mailbox We add an optional supp-outbox interrupt support to SPRD mailbox driver with newly added sc9863a support and change to configure interrupts with names in device tree files. Signed-off-by: Orson Zhai Reviewed-by: Rob Herring Signed-off-by: Jassi Brar commit 9468ab84032f96496e998cfa173cd1d0ac316bcd Author: Orson Zhai Date: Fri Mar 19 14:15:35 2021 +0800 mailbox: sprd: Introduce refcnt when clients requests/free channels Unisoc mailbox has no way to be enabled/disabled for any single channel. They can only be set to startup or shutdown as a whole device at same time. Add a variable to count references to avoid mailbox FIFO being reset unexpectedly when clients are requesting or freeing channels. Also add a lock to dismiss possible conflicts from register r/w in different startup or shutdown threads. And fix the crash problem when early interrupts come from channel which has not been requested by client yet. Fixes: ca27fc26cd22 ("mailbox: sprd: Add Spreadtrum mailbox driver") Signed-off-by: Orson Zhai Reviewed-by: Baolin Wang Signed-off-by: Jassi Brar commit a8f96891077ec0a2226904fd84e36d2398d79cb4 Author: Bjorn Andersson Date: Thu Mar 11 15:13:28 2021 -0800 MAINTAINERS: Add DT bindings directory to mailbox DT bindings related to mailbox drivers are typically picked by the mailbox maintainer, so add the binding folder to the maintainers entry to make sure get_maintainer finds it. Signed-off-by: Bjorn Andersson Signed-off-by: Jassi Brar commit 9d2e8b93236a45f20ae0b71cc507301111cc2f58 Author: Tom Saeger Date: Fri Mar 12 19:31:10 2021 -0700 mailbox: fix various typos in comments Fix trivial typos in mailbox driver comments. s/Intergrated/Integrated/ s/extenstion/extension/ s/atleast/at least/ s/commnunication/communication/ s/assgined/assigned/ s/commnunication/communication/ s/recevied/received/ s/succeded/succeeded/ s/implmentation/implementation/ s/definiation/definition/ s/traget/target/ s/wont/won't/ Cc: trivial@kernel.org Signed-off-by: Tom Saeger Reviewed-by: Randy Dunlap Signed-off-by: Jassi Brar commit 3cfc7489667bcd2ab4eb1638ec7bc8b67c6324d0 Author: Yang Li Date: Wed Mar 3 17:05:04 2021 +0800 mailbox: pcc: fix platform_no_drv_owner.cocci warnings ./drivers/mailbox/pcc.c:580:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Jassi Brar commit 2a7db0d6eb5e76197ced6bf7f2519011ead809a9 Author: Vinod Koul Date: Fri Mar 12 10:42:03 2021 +0530 dt-bindings: mailbox: Add compatible for SM8350 IPCC Add the compatible string for SM8350 IPCC block on this SoC Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Signed-off-by: Jassi Brar commit 3ccbd9333f2783e27d8a631337fbd4d625ffea76 Author: Jack Wang Date: Thu Apr 8 11:32:15 2021 +0200 RDMA/ipoib: Print a message if only child interface is UP When "enhanced IPoIB" is enabled for CX-5 devices it requires the parent device to be UP, otherwise the child devices won't work. Thus add a debug message to give admin a hint when only the child interface is UP but parent interface is not. Link: https://lore.kernel.org/r/20210408093215.24023-1-jinpu.wang@ionos.com Signed-off-by: Jack Wang Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 719d13415f5977710afeb5f4e622c5c9c18976fa Author: Xi Wang Date: Tue Apr 6 21:25:14 2021 +0800 RDMA/hns: Remove duplicated hem page size config code Remove duplicated code for setting hem page size in PF and VF. Link: https://lore.kernel.org/r/1617715514-29039-7-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 0b567cde9d7aa0a6667cc5ac4b89a0927b7b2c3a Author: Wei Xu Date: Tue Apr 6 21:25:13 2021 +0800 RDMA/hns: Enable RoCE on virtual functions Introduce the VF support by adding code changes to allow VF PCI device initialization, assgining the reserved resource of the PF to the active VFs, setting the default abilities, applying the interruptions, resetting and reducing the default QP/GID number to aovid exceeding the hardware limitation. Link: https://lore.kernel.org/r/1617715514-29039-6-git-send-email-liweihang@huawei.com Signed-off-by: Wei Xu Signed-off-by: Shengming Shu Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit accfc1affe9e8f25a393a53fdf9936d5bc3dc001 Author: Wei Xu Date: Tue Apr 6 21:25:12 2021 +0800 RDMA/hns: Set parameters of all the functions belong to a PF Switch parameters of all functions belong to a PF should be set including VFs. Link: https://lore.kernel.org/r/1617715514-29039-5-git-send-email-liweihang@huawei.com Signed-off-by: Wei Xu Signed-off-by: Shengming Shu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 2a424e1d112aee2b74786b5d29125ea57da1146f Author: Wei Xu Date: Tue Apr 6 21:25:11 2021 +0800 RDMA/hns: Reserve the resource for the VFs Query the resource including EQC/SMAC/SGID from the firmware in the PF and distribute fairly among all the functions belong to the PF. Link: https://lore.kernel.org/r/1617715514-29039-4-git-send-email-liweihang@huawei.com Signed-off-by: Wei Xu Signed-off-by: Shengming Shu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 5b03a4226c42cf805c0ea11519c936cd76103ddd Author: Wei Xu Date: Tue Apr 6 21:25:10 2021 +0800 RDMA/hns: Query the number of functions supported by the PF Query how many functions are supported by the PF from the FW and store it in the hns_roce_dev structure which will be used to support the configuration of virtual functions. Link: https://lore.kernel.org/r/1617715514-29039-3-git-send-email-liweihang@huawei.com Signed-off-by: Wei Xu Signed-off-by: Shengming Shu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 0fb46da051aec3c143e41adc321f3c8a7506d19c Author: Xi Wang Date: Tue Apr 6 21:25:09 2021 +0800 RDMA/hns: Simplify function's resource related command Use hr_reg_write/read() to simplify codes about configuring function's resource. And because the design of PF/VF fields is same, they can be defined only once. Link: https://lore.kernel.org/r/1617715514-29039-2-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 7c71f0d12eee4b7375e158dc11f8de6ffc524590 Author: Gioh Kim Date: Tue Apr 6 14:36:39 2021 +0200 RDMA/rtrs-clt: Simplify error message Two error messages are only different message but have common code to generate the path string. Link: https://lore.kernel.org/r/20210406123639.202899-4-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 42cdc1909d701d5dcd24c2a797b6331b7f30b5c6 Author: Gioh Kim Date: Tue Apr 6 14:36:38 2021 +0200 RDMA/rtrs-srv: More debugging info when fail to send reply It does not help to debug if it only print error message without any debugging information which session and connection the error happened. Link: https://lore.kernel.org/r/20210406123639.202899-3-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 2f37b01725382cd1237d32363e844d4190268b33 Author: Gioh Kim Date: Tue Apr 6 14:36:37 2021 +0200 RDMA/rtrs-clt: Print more info when an error happens Client prints only error value and it is not enough for debugging. 1. When client receives an error from server: the client does not only print the error value but also more information of server connection. 2. When client failes to send IO: the client gets an error from RDMA layer. It also print more information of server connection. Link: https://lore.kernel.org/r/20210406123639.202899-2-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit abdeef3b2388385e142d90f1d0359aa3b11ac5e6 Author: Gioh Kim Date: Wed Apr 7 13:34:44 2021 +0200 Documentation/ABI/rtrs-clt: Add descriptions for min-latency policy Describe new multipath policy min-latency of the RTRS client. Link: https://lore.kernel.org/r/20210407113444.150961-5-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit cc85392bcd27f619a77a953e384998ce413f197b Author: Gioh Kim Date: Wed Apr 7 13:34:42 2021 +0200 RDMA/rtrs-clt: New sysfs attribute to print the latency of each path It shows the latest latency that the client checked when sending the heart-beat. Link: https://lore.kernel.org/r/20210407113444.150961-3-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit dc3b66a0ce70ec40fd60884a835b9ef976765914 Author: Gioh Kim Date: Wed Apr 7 13:34:41 2021 +0200 RDMA/rtrs-clt: Add a minimum latency multipath policy This patch adds new multipath policy: min-latency. Client checks the latency of each path when it sends the heart-beat. And it sends IO to the path with the minimum latency. Link: https://lore.kernel.org/r/20210407113444.150961-2-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit fe73f96e7b04412c4b3c8670fc9cd600e552aa9d Merge: 780278c2c8bb5 18731642d4e1f Author: Jason Gunthorpe Date: Tue Apr 13 19:37:17 2021 -0300 Merge branch 'mlx5_memic_ops' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Maor Gottlieb says: ==================== This series from Maor extends MEMIC to support atomic operations from the host in addition to already supported regular read/write. ==================== * 'memic_ops': RDMA/mlx5: Expose UAPI to query DM RDMA/mlx5: Add support in MEMIC operations RDMA/mlx5: Add support to MODIFY_MEMIC command RDMA/mlx5: Re-organize the DM code RDMA/mlx5: Move all DM logic to separate file RDMA/uverbs: Make UVERBS_OBJECT_METHODS to consider line number net/mlx5: Add MEMIC operations related bits commit 18731642d4e1f73e446710389d3b01233d6fbc78 Author: Maor Gottlieb Date: Sun Apr 11 15:29:24 2021 +0300 RDMA/mlx5: Expose UAPI to query DM Expose UAPI to query MEMIC DM, this will let user space application that didn't allocate the DM but has access to by owning the matching command FD to retrieve its information. Link: https://lore.kernel.org/r/20210411122924.60230-8-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit cea85fa5dbc2e0206b58095c0c12ff035b11d129 Author: Maor Gottlieb Date: Sun Apr 11 15:29:23 2021 +0300 RDMA/mlx5: Add support in MEMIC operations MEMIC buffer, in addition to regular read and write operations, can support atomic operations from the host. Introduce and implement new UAPI to allocate address space for MEMIC operations such as atomic. This includes: 1. Expose new IOCTL for request mapping of MEMIC operation. 2. Hold the operations address in a list, so same operation to same DM will be allocated only once. 3. Manage refcount on the mlx5_ib_dm object, so it would be keep valid until all addresses were unmapped. Link: https://lore.kernel.org/r/20210411122924.60230-7-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 39cc792ff2e8d7814b322547514ef1e3ce5c36a5 Author: Maor Gottlieb Date: Sun Apr 11 15:29:22 2021 +0300 RDMA/mlx5: Add support to MODIFY_MEMIC command Add two functions to allocate and deallocate MEMIC operations by using the MODIFY_MEMIC command. Link: https://lore.kernel.org/r/20210411122924.60230-6-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 251b9d7887505d67dbe5089f78ad5f8d610b2c2f Author: Maor Gottlieb Date: Sun Apr 11 15:29:21 2021 +0300 RDMA/mlx5: Re-organize the DM code 1. Inline the checks from check_dm_type_support() into their respective allocation functions. 2. Fix use after free when driver fails to copy the MEMIC address to the user by moving the allocation code into their respective functions, hence we avoid the explicit call to free the DM in the error flow. 3. Split mlx5_ib_dm struct to memic and icm proper typesafety throughout. Fixes: dc2316eba73f ("IB/mlx5: Fix device memory flows") Link: https://lore.kernel.org/r/20210411122924.60230-5-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 831df88381f73bca0f5624b69ab985cac3d036bc Author: Maor Gottlieb Date: Sun Apr 11 15:29:20 2021 +0300 RDMA/mlx5: Move all DM logic to separate file Move all device memory related code to a separate file. Link: https://lore.kernel.org/r/20210411122924.60230-4-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7ca2b8a378ca0d4ce52edc63d6b160467d8a10c1 Author: Maor Gottlieb Date: Sun Apr 11 15:29:19 2021 +0300 RDMA/uverbs: Make UVERBS_OBJECT_METHODS to consider line number In order to support multiple methods declaration in the same file we should use the line number as part of the name. Link: https://lore.kernel.org/r/20210411122924.60230-3-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 87b7e5c05c98c5f3947345d7fba68472e43cf611 Author: Arnd Bergmann Date: Tue Apr 13 16:16:17 2021 +0200 net: Space: remove hp100 probe The driver was removed last year, but the static initialization got left behind by accident. Fixes: a10079c66290 ("staging: remove hp100 driver") Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit 90a825a47c96e069c880b7dbf96a8cd20deeb99f Merge: 5871d0c6b8ea8 166179542e805 Author: David S. Miller Date: Tue Apr 13 15:12:19 2021 -0700 Merge branch 'dpaa2-switch-tc-hw-offload' Ioana Ciornei says: ==================== dpaa2-switch: add tc hardware offload on ingress traffic This patch set adds tc hardware offload on ingress traffic in dpaa2-switch. The cls flower and matchall classifiers are supported using the same ACL infrastructure supported by the dpaa2-switch. The first patch creates a new structure to hold all the necessary information related to an ACL table. This structure is used in the next patches to create a link between each switch port and the table used. Multiple ports can share the same ACL table when they also share the ingress tc block. Also, some small changes in the priority of the default STP trap is done in the second patch. The support for cls flower is added in the 3rd patch, while the 4th one builds on top of the infrastructure put in place and adds cls matchall support. The following flow keys are supported: - Ethernet: dst_mac/src_mac - IPv4: dst_ip/src_ip/ip_proto/tos - VLAN: vlan_id/vlan_prio/vlan_tpid/vlan_dei - L4: dst_port/src_port Each filter can support only one action from the following list: - drop - mirred egress redirect - trap With the last patch, we reuse the dpaa2_switch_acl_entry_add() function added previously instead of open-coding the install of a new ACL entry into the table. ==================== Signed-off-by: David S. Miller commit 166179542e805a793a0337010f95168cfa143a6f Author: Ioana Ciornei Date: Tue Apr 13 16:24:48 2021 +0300 dpaa2-switch: reuse dpaa2_switch_acl_entry_add() for STP frames trap Since we added the dpaa2_switch_acl_entry_add() function in the previous patches to hide all the details of actually adding the ACL entry by issuing a firmware command, let's use it also for adding a CPU trap for the STP frames. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 4ba28c1a1aff053e6471151cffee860668ead786 Author: Ioana Ciornei Date: Tue Apr 13 16:24:47 2021 +0300 dpaa2-switch: add tc matchall filter support Add support TC_SETUP_CLSMATCHALL by using the same ACL table entries framework as for tc flower. Adding a matchall rule is done by installing an entry which has a mask of all zeroes, thus matching on any packet. This can be used as a catch-all type of rule if used correctly, ie the priority of the matchall filter should be kept as the lowest one in the entire filter block. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 1110318d83e8011c4dfcb2f7dd343bcfb1623c5f Author: Ioana Ciornei Date: Tue Apr 13 16:24:46 2021 +0300 dpaa2-switch: add tc flower hardware offload on ingress traffic This patch adds support for tc flower hardware offload on the ingress path. Shared filter blocks are supported by sharing a single ACL table between multiple ports. The following flow keys are supported: - Ethernet: dst_mac/src_mac - IPv4: dst_ip/src_ip/ip_proto/tos - VLAN: vlan_id/vlan_prio/vlan_tpid/vlan_dei - L4: dst_port/src_port As per flow actions, the following are supported: - drop - mirred egress redirect - trap Each ACL entry (filter) can be setup with only one of the listed actions. A sorted single linked list is used to keep the ACL entries by their order of priority. When adding a new filter, this enables us to quickly ascertain if the new entry has the highest priority of the entire block or if we should make some space in the ACL table by increasing the priority of the filters already in the table. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 2bf90ba5100efa2a06eeecda52fec72a2b024d50 Author: Ioana Ciornei Date: Tue Apr 13 16:24:45 2021 +0300 dpaa2-switch: install default STP trap rule with the highest priority Change the default ACL trap rule for STP frames to have the highest priority. In the same ACL table will reside both default rules added by the driver for its internal use as well as rules added with tc flower. In this case, the default rules such as the STP one that we already have should have the highest priority. Also, remove the check for a full ACL table since we already know that it's sized so that we don't hit this case. The last thing changes is that default trap filters will not be counted in the acl_tbl's num_rules variable since their number doesn't change. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 1b0f14b6c218238de8e1e3ebb06a4efad58043b5 Author: Ioana Ciornei Date: Tue Apr 13 16:24:44 2021 +0300 dpaa2-switch: create a central dpaa2_switch_acl_tbl structure Introduce a new structure - dpaa2_switch_acl_tbl - to hold all data related to an ACL table: number of rules added, ACL table id, etc. This will be used more in the next patches when adding support for sharing an ACL table between ports. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 5871d0c6b8ea805916c3135d0c53b095315bc674 Author: Dan Carpenter Date: Tue Apr 13 13:47:59 2021 +0300 ionic: return -EFAULT if copy_to_user() fails The copy_to_user() function returns the number of bytes that it wasn't able to copy. We want to return -EFAULT to the user. Fixes: fee6efce565d ("ionic: add hw timestamp support files") Signed-off-by: Dan Carpenter Acked-by: Shannon Nelson Signed-off-by: David S. Miller commit 23ba511722706be1c5e8f2c74e8ec9bd69e57ce2 Merge: ee684c325df99 132c32ee5bc09 Author: David S. Miller Date: Tue Apr 13 15:06:51 2021 -0700 Merge branch 'stmmac-xdp-zc' Ong Boon Leong says: ==================== stmmac: add XDP ZC support This is the v2 patch series to add XDP ZC support to stmmac driver. Summary of v2 patch change:- 6/7: fix synchronize_rcu() is called stmmac_disable_all_queues() that is used by ndo_setup_tc(). ######################################################################## Continuous burst traffics are generated by pktgen script and in the midst of each packet processing operation by xdpsock the following tc-loop.sh script is looped continuously:- #!/bin/bash tc qdisc del dev eth0 parent root tc qdisc add dev eth0 ingress tc qdisc add dev eth0 root mqprio num_tc 4 map 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 queues 1@0 1@1 1@2 1@3 hw 0 tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 0 hw_tc 0 tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 1 hw_tc 1 tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 2 hw_tc 2 tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 3 hw_tc 3 tc qdisc list dev eth0 tc filter show dev eth0 ingress On different ssh terminal $ while true; do ./tc-loop.sh; sleep 1; done The v2 patch series have been tested using the xdpsock app: $ ./xdpsock -i eth0 -l -z From xdpsock poller pps report and dmesg, we don't find any warning related to rcu and the only difference when the script is executed is the pps rate drops momentarily. sock0@eth0:0 l2fwd xdp-drv pps pkts 1.00 rx 436347 191361334 tx 436411 191361334 sock0@eth0:0 l2fwd xdp-drv pps pkts 1.00 rx 254117 191615476 tx 254053 191615412 sock0@eth0:0 l2fwd xdp-drv pps pkts 1.00 rx 466395 192081924 tx 466395 192081860 sock0@eth0:0 l2fwd xdp-drv pps pkts 1.00 rx 287410 192369365 tx 287474 192369365 sock0@eth0:0 l2fwd xdp-drv pps pkts 1.00 rx 395853 192765329 tx 395789 192765265 sock0@eth0:0 l2fwd xdp-drv pps pkts 1.00 rx 466132 193231514 tx 466132 193231450 ######################################################################## Based on the above result, the fix looks promising. Appreciate that if community can help to review the patch series and provide me feedback for improvement. ==================== commit 132c32ee5bc09b1d2fa518f3b38a01f4b859b6df Author: Ong Boon Leong Date: Tue Apr 13 17:36:26 2021 +0800 net: stmmac: Add TX via XDP zero-copy socket We add the support of XDP ZC TX submission and cleaning into stmmac_tx_clean(). The function is made to clean as many TX complete frames as possible, i.e. limit by priv->dma_tx_size instead of NAPI budget. For TX ring that is associated with XSK pool, the function stmmac_xdp_xmit_zc() is introduced to TX frame buffers from XSK pool by using xsk_tx_peek_desc(). To make stmmac_tx_clean() support the cleaning of XSK TX frames, STMMAC_TXBUF_T_XSK_TX TX buffer type is introduced. As stmmac_tx_clean() uses the return value to cue whether NAPI function should continue to poll, we augment the caller of stmmac_tx_clean() to pass NAPI budget instead of priv->dma_tx_size through 'budget' input and made stmmac_tx_clean() to always clean up-to the TX ring size instead. This allows us to use the return boolean status of stmmac_xdp_xmit_zc() to decide if XSK TX work is done or not: If true, set 'xmits' to return 'budget - 1' so that NAPI poll may exit. Else, set 'xmits' to return 'budget' to make NAPI poll continue to poll since XSK TX work is not done. Finally, at the end of stmmac_tx_clean(), the function now take a maximum value between 'count' and 'xmits' so that status from both TX cleaning and XSK TX (only for XDP ZC) is considered. This patch adds a new NAPI poll called stmmac_napi_poll_rxtx() that is meant to be enabled/disabled for RX and TX ring that are bound to XSK pool. This NAPI poll function starts with cleaning TX ring, then submits XSK TX frames to TX ring before proceed to perform RX operations, i.e. , receiving RX frames and replenishing RX ring with RX free buffers obtained from XSK pool. Therefore, during XSK RX and TX setup, the driver enables stmmac_napi_poll_rxtx() for RX and TX operations, then during XSK RX and TX pool tear-down, the driver reenables the exisiting independent NAPI poll functions accordingly: stmmac_napi_poll_rx() and stmmac_napi_poll_tx(). Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit bba2556efad66e7eaa56fece13f7708caa1187f8 Author: Ong Boon Leong Date: Tue Apr 13 17:36:25 2021 +0800 net: stmmac: Enable RX via AF_XDP zero-copy This patch adds the support for receiving packet via AF_XDP zero-copy mechanism. XDP ZC uses 1:1 mapping of XDP buffer to receive packet, therefore the use of split header is not used currently. The 'xdp_buff' is declared as union together with a struct that contains 'page', 'addr' and 'page_offset' that are associated with primary buffer. RX buffers are now allocated either via page_pool or xsk pool. For RX buffers from xsk_pool they are allocated and deallocated using below functions: * stmmac_alloc_rx_buffers_zc(struct stmmac_priv *priv, u32 queue) * dma_free_rx_xskbufs(struct stmmac_priv *priv, u32 queue) With above functions now available, we then extend the following driver functions to support XDP ZC: * stmmac_reinit_rx_buffers() * __init_dma_rx_desc_rings() * init_dma_rx_desc_rings() * __free_dma_rx_desc_resources() Note: stmmac_alloc_rx_buffers_zc() may return -ENOMEM due to RX XDP buffer pool is not allocated (e.g. samples/bpf/xdpsock TX-only). But, it is still ok to let TX XDP ZC to continue, therefore, the -ENOMEM is silently ignored to let the driver succcessfully transition to XDP ZC mode for the said RX and TX queue. As XDP ZC buffer size is different, the DMA buffer size is required to be reprogrammed accordingly for RX DMA/Queue that is populated with XDP buffer from XSK pool. Next, to add or remove per-queue XSK pool, stmmac_xdp_setup_pool() will call stmmac_xdp_enable_pool() or stmmac_xdp_disable_pool() that in-turn coordinates the tearing down and setting up RX ring via RX buffers and descriptors removal and reallocation through stmmac_disable_rx_queue() and stmmac_enable_rx_queue(). In addition, stmmac_xsk_wakeup() is added to initiate XDP RX buffer replenishing by signalling user application to add available XDP frames back to FILL queue. For RX processing using XDP zero-copy buffer, stmmac_rx_zc() is introduced which is implemented with the assumption that RX split header is disabled. For XDP verdict is XDP_PASS, the XDP buffer is copied into a sk_buff allocated through stmmac_construct_skb_zc() and sent to Linux network GRO inside stmmac_dispatch_skb_zc(). Free RX buffers are then replenished using stmmac_rx_refill_zc() v2: introduce __stmmac_disable_all_queues() to contain the original code that does napi_disable() and then make stmmac_setup_tc_block_cb() to use it. Move synchronize_rcu() into stmmac_disable_all_queues() that eventually calls __stmmac_disable_all_queues(). Then, make both stmmac_release() and stmmac_suspend() to use stmmac_disable_all_queues(). Thanks David Miller for spotting the synchronize_rcu() issue in v1 patch. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit bba71cac680f30de93486c989ee283cccedc5f77 Author: Ong Boon Leong Date: Tue Apr 13 17:36:24 2021 +0800 net: stmmac: Refactor __stmmac_xdp_run_prog for XDP ZC Prepare stmmac_xdp_run_prog() for AF_XDP zero-copy support which will be added by upcoming patches by splitting out the XDP verdict processing into __stmmac_xdp_run_prog() and it callable for XDP ZC path which does not need to verify bpf_prog is not NULL. The stmmac_xdp_run_prog() is used for regular XDP Rx path which requires bpf_prog to be verified. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit de0b90e52a116a951ca8b13c924c359d5fc39fa0 Author: Ong Boon Leong Date: Tue Apr 13 17:36:23 2021 +0800 net: stmmac: rearrange RX and TX desc init into per-queue basis Below functions are made to be per-queue in preparation of XDP ZC: __init_dma_rx_desc_rings(struct stmmac_priv *priv, u32 queue, gfp_t flags) __init_dma_tx_desc_rings(struct stmmac_priv *priv, u32 queue) The original functions below are stay maintained for all queue usage: init_dma_rx_desc_rings(struct net_device *dev, gfp_t flags) init_dma_tx_desc_rings(struct net_device *dev) Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit da5ec7f22a0f1a10a5a9c3063421e73ae054649d Author: Ong Boon Leong Date: Tue Apr 13 17:36:22 2021 +0800 net: stmmac: refactor stmmac_init_rx_buffers for stmmac_reinit_rx_buffers The per-queue RX buffer allocation in stmmac_reinit_rx_buffers() can be made to use stmmac_alloc_rx_buffers() by merging the page_pool alloc checks for "buf->page" and "buf->sec_page" in stmmac_init_rx_buffers(). This is in preparation for XSK pool allocation later. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 80f573c995fc8e385d4aebc0ffce88f6b32bb183 Author: Ong Boon Leong Date: Tue Apr 13 17:36:21 2021 +0800 net: stmmac: introduce dma_recycle_rx_skbufs for stmmac_reinit_rx_buffers Rearrange RX buffer page_pool recycling logics into dma_recycle_rx_skbufs, so that we prepare stmmac_reinit_rx_buffers() for XSK pool expansion. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 4298255f26fa91c698048e5cc79e371f3bfaf1da Author: Ong Boon Leong Date: Tue Apr 13 17:36:20 2021 +0800 net: stmmac: rearrange RX buffer allocation and free functions This patch restructures the per RX queue buffer allocation from page_pool to stmmac_alloc_rx_buffers(). We also rearrange dma_free_rx_skbufs() so that it can be used in init_dma_rx_desc_rings() during freeing of RX buffer in the event of page_pool allocation failure to replace the more efficient method earlier. The replacement is needed to make the RX buffer alloc and free method scalable to XDP ZC xsk_pool alloc and free later. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit ee684c325df99fe6c07c4257cf6fb74b01169d3c Merge: 1da41aa110df5 e557dc82418d2 Author: David S. Miller Date: Tue Apr 13 15:02:25 2021 -0700 Merge branch 'ipa-SM8350-SoC' Alex Elder says: ==================== net: ipa: add support for the SM8350 SoC This small series adds IPA driver support for the Qualcomm SM8350 SoC, which implements IPA v4.9. The first patch updates the DT binding, and depends on a previous patch that has already been accepted into net-next. The second just defines the IPA v4.9 configuration data file. (Device Tree files to support this SoC will be sent separately and will go through the Qualcomm tree.) ==================== Signed-off-by: David S. Miller commit e557dc82418d24a5fb035815dc57131b68239801 Author: Alex Elder Date: Tue Apr 13 11:38:26 2021 -0500 net: ipa: add IPA v4.9 configuration data Add support for the SM8350 SoC, which includes IPA version 4.9. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 15c88e185eb98b86157bb887e7d851c366348be5 Author: Alex Elder Date: Tue Apr 13 11:38:25 2021 -0500 dt-bindings: net: qcom,ipa: add support for SM8350 Add support for "qcom,sm8350-ipa", which uses IPA v4.9. Use "enum" rather than "oneOf/const ..." to specify compatible strings, as suggested by Rob Herring. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 1da41aa110df51bfe1f2a060af8c834cc796455e Author: Shannon Nelson Date: Tue Apr 13 10:22:16 2021 -0700 ionic: git_ts_info bit shifters All the uses of HWTSTAMP_FILTER_* values need to be bit shifters, not straight values. v2: fixed subject and added Cc Dan and SoB Allen Fixes: f8ba81da73fc ("ionic: add ethtool support for PTP") Cc: Dan Carpenter Signed-off-by: Shannon Nelson Signed-off-by: Allen Hubbe Signed-off-by: David S. Miller commit 870e04ae45ea2e569d1ca2780439b16e988da08d Author: Lijun Pan Date: Tue Apr 13 14:33:39 2021 -0500 ibmvnic: queue reset work in system_long_wq The reset process for ibmvnic commonly takes multiple seconds, clearly making it inappropriate for schedule_work/system_wq. The reason to make this change is that ibmvnic's use of the default system-wide workqueue for a relatively long-running work item can negatively affect other workqueue users. So, queue the relatively slow reset job to the system_long_wq. Suggested-by: Nathan Lynch Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 9fb434bcf825f112b3a0f2f9aa344b97b6b2bb99 Merge: 46568170036d0 bd573ea572047 Author: David S. Miller Date: Tue Apr 13 14:53:11 2021 -0700 Merge tag 'linux-can-next-for-5.13-20210413' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2021-04-13 this is a pull request of 14 patches for net-next/master. The first patch is by Yoshihiro Shimoda and updates the DT bindings for the rcar_can driver. Vincent Mailhol contributes 3 patches that add support for several ETAS USB CAN adapters. The final 10 patches are by me and clean up the peak_usb CAN driver. ==================== Signed-off-by: David S. Miller commit 46568170036d0b627d92c99fc9ad95209fdc4159 Author: Yang Li Date: Tue Apr 13 17:46:12 2021 +0800 rsi: remove unused including Fix the following versioncheck warning: ./drivers/net/wireless/rsi/rsi_91x_ps.c: 19 linux/version.h not needed. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: David S. Miller commit eba43fac8dfafc07141315e8d7715e317d5cfe95 Author: wengjianfeng Date: Tue Apr 13 17:45:30 2021 +0800 nfc: st-nci: remove unnecessary label in st_nci_spi_write function, first assign a value to a variable then goto exit label. return statement just follow the label and exit label just used once, so we should directly return and remove exit label. Signed-off-by: wengjianfeng Signed-off-by: David S. Miller commit 334c4241472916851d97aae209aedf1927ec84e3 Author: Lijun Pan Date: Tue Apr 13 03:31:44 2021 -0500 ibmvnic: improve failover sysfs entry The current implementation relies on H_IOCTL call to issue a H_SESSION_ERR_DETECTED command to let the hypervisor to send a failover signal. However, it may not work if there is no backup device or if the vnic is already in error state, e.g., "ibmvnic 30000003 env3: rx buffer returned with rc 6". Add a last resort, that is to schedule a failover reset via CRQ command. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 314332023b1f095fb24e230e60b50aff981943c3 Author: Andreas Roeseler Date: Mon Apr 12 16:23:56 2021 -0500 icmp: ICMPV6: pass RFC 8335 reply messages to ping_rcv The current icmp_rcv function drops all unknown ICMP types, including ICMP_EXT_ECHOREPLY (type 43). In order to parse Extended Echo Reply messages, we have to pass these packets to the ping_rcv function, which does not do any other filtering and passes the packet to the designated socket. Pass incoming RFC 8335 ICMP Extended Echo Reply packets to the ping_rcv handler instead of discarding the packet. Signed-off-by: Andreas Roeseler Signed-off-by: David S. Miller commit af8352f1ff54c4fecf84e36315fd1928809a580b Merge: 213cc929cbfd7 a29c8c0241654 Author: Daniel Vetter Date: Tue Apr 13 23:33:41 2021 +0200 Merge tag 'drm-msm-next-2021-04-11' of https://gitlab.freedesktop.org/drm/msm into drm-next msm-next from Rob: * Big DSI phy/pll cleanup. Includes some clk patches, acked by maintainer * Initial support for sc7280 * compatibles fixes for sm8150/sm8250 * cleanups for all dpu gens to use same bandwidth scaling paths (\o/) * various shrinker path lock contention optimizations * unpin/swap support for GEM objects (disabled by default, enable with msm.enable_eviction=1 .. due to various combinations of iommu drivers with older gens I want to get more testing on hw I don't have in front of me before enabling by default) * The usual assortment of misc fixes and cleanups Signed-off-by: Daniel Vetter From: Rob Clark Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvL=4aw15qoY8fbKG9FCgnx8Y-dCtf7xiFwTQSHopwSQg@mail.gmail.com commit affb05d9109cbde23862691f7c8f0db4f8015c4e Merge: 40b5d2f15c091 f10843e04a075 Author: David S. Miller Date: Tue Apr 13 14:35:02 2021 -0700 Merge branch 'non-platform-devices-of_get_mac_address' Michael Walle says: ==================== of: net: support non-platform devices in of_get_mac_address() of_get_mac_address() is commonly used to fetch the MAC address from the device tree. It also supports reading it from a NVMEM provider. But the latter is only possible for platform devices, because only platform devices are searched for a matching device node. Add a second method to fetch the NVMEM cell by a device tree node instead of a "struct device". Moreover, the NVMEM subsystem will return dynamically allocated data which has to be freed after use. Currently, this is handled by allocating a device resource manged buffer to store the MAC address. of_get_mac_address() then returns a pointer to this buffer. Without a device, this trick is not possible anymore. Thus, change the of_get_mac_address() API to have the caller supply a buffer. It was considered to use the network device to attach the buffer to, but then the order matters and netdev_register() has to be called before of_get_mac_address(). No driver does it this way. ==================== Signed-off-by: David S. Miller commit f10843e04a075202dbb39dfcee047e3a2fdf5a8d Author: Michael Walle Date: Mon Apr 12 19:47:18 2021 +0200 of: net: fix of_get_mac_addr_nvmem() for non-platform devices of_get_mac_address() already supports fetching the MAC address by an nvmem provider. But until now, it was just working for platform devices. Esp. it was not working for DSA ports and PCI devices. It gets more common that PCI devices have a device tree binding since SoCs contain integrated root complexes. Use the nvmem of_* binding to fetch the nvmem cells by a struct device_node. We still have to try to read the cell by device first because there might be a nvmem_cell_lookup associated with that device. Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 83216e3988cd196183542937c9bd58b279f946af Author: Michael Walle Date: Mon Apr 12 19:47:17 2021 +0200 of: net: pass the dst buffer to of_get_mac_address() of_get_mac_address() returns a "const void*" pointer to a MAC address. Lately, support to fetch the MAC address by an NVMEM provider was added. But this will only work with platform devices. It will not work with PCI devices (e.g. of an integrated root complex) and esp. not with DSA ports. There is an of_* variant of the nvmem binding which works without devices. The returned data of a nvmem_cell_read() has to be freed after use. On the other hand the return of_get_mac_address() points to some static data without a lifetime. The trick for now, was to allocate a device resource managed buffer which is then returned. This will only work if we have an actual device. Change it, so that the caller of of_get_mac_address() has to supply a buffer where the MAC address is written to. Unfortunately, this will touch all drivers which use the of_get_mac_address(). Usually the code looks like: const char *addr; addr = of_get_mac_address(np); if (!IS_ERR(addr)) ether_addr_copy(ndev->dev_addr, addr); This can then be simply rewritten as: of_get_mac_address(np, ndev->dev_addr); Sometimes is_valid_ether_addr() is used to test the MAC address. of_get_mac_address() already makes sure, it just returns a valid MAC address. Thus we can just test its return code. But we have to be careful if there are still other sources for the MAC address before the of_get_mac_address(). In this case we have to keep the is_valid_ether_addr() call. The following coccinelle patch was used to convert common cases to the new style. Afterwards, I've manually gone over the drivers and fixed the return code variable: either used a new one or if one was already available use that. Mansour Moufid, thanks for that coccinelle patch! @a@ identifier x; expression y, z; @@ - x = of_get_mac_address(y); + x = of_get_mac_address(y, z); <... - ether_addr_copy(z, x); ...> @@ identifier a.x; @@ - if (<+... x ...+>) {} @@ identifier a.x; @@ if (<+... x ...+>) { ... } - else {} @@ identifier a.x; expression e; @@ - if (<+... x ...+>@e) - {} - else + if (!(e)) {...} @@ expression x, y, z; @@ - x = of_get_mac_address(y, z); + of_get_mac_address(y, z); ... when != x All drivers, except drivers/net/ethernet/aeroflex/greth.c, were compile-time tested. Suggested-by: Andrew Lunn Signed-off-by: Michael Walle Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit db16c1fe92d7ba7d39061faef897842baee2c887 Author: Ilya Leoshkevich Date: Tue Apr 13 21:00:43 2021 +0200 bpf: Generate BTF_KIND_FLOAT when linking vmlinux pahole v1.21 supports the --btf_gen_floats flag, which makes it generate the information about the floating-point types [1]. Adjust link-vmlinux.sh to pass this flag to pahole in case it's supported, which is determined using a simple version check. [1] https://lore.kernel.org/dwarves/YHRiXNX1JUF2Az0A@kernel.org/ Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210413190043.21918-1-iii@linux.ibm.com commit 40b5d2f15c091fa9c854acde91ad2acb504027d7 Author: René van Dorst Date: Mon Apr 12 08:50:31 2021 +0200 net: dsa: mt7530: Add support for EEE features This patch adds EEE support. Signed-off-by: René van Dorst Signed-off-by: David S. Miller commit 213cc929cbfd7962164420b300f9a6c60aaff189 Merge: cd951b3971cdc d434405aaab7d Author: Daniel Vetter Date: Tue Apr 13 23:06:34 2021 +0200 Merge drm/drm-fixes into drm-next msm-next pull request has a baseline with stuff from -fixes, roll forward first. Some simple conflicts in amdgpu, ttm and one in i915 where git gets confused and tries to add the same function twice. Signed-off-by: Daniel Vetter commit 6161a4b18a66746c3f5afa72c054d7e58e49c847 Author: Thorsten Leemhuis Date: Fri Apr 9 13:47:24 2021 +0200 docs: reporting-issues: make people CC the regressions list Make people CC the recently created mailing list dedicated to Linux kernel regressions when reporting one. Some paragraphs had to be reshuffled and slightly rewritten during the process, as the text otherwise would have gotten unnecessarily hard to follow. Signed-off-by: Thorsten Leemhuis Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/ac28089d710d5d41f295221bc726555ba32f4984.1617967127.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit ad4db83425fa53321c9af870357d1b1a6f76faa5 Author: Thorsten Leemhuis Date: Fri Apr 9 13:47:23 2021 +0200 MAINTAINERS: add regressions mailing list Add the newly created regression mailing list finally created after it already had been agreed on during the maintainers summit 2017 (see https://lwn.net/Articles/738216/ ). The topic was recently discussed again, where an idea to create a broader list for all issues was discussed, but Linus preferred a more targeted list: https://lkml.kernel.org/r/CAHk-=wgiYqqLzsb9-UpfH+=ktk7ra-2fOsdc_ZJ7WF47wS73CA@mail.gmail.com/ Hence, the creation for that list was asked for and granted: https://bugzilla.kernel.org/show_bug.cgi?id=212557 In the end it became regressions@lists.linux.dev instead of linux-regressions@lists.linux.dev as 'Linux' would have been redundant in the latter case. Signed-off-by: Thorsten Leemhuis Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/ecf1f0125399c5242ff213b827eacc6f93af3172.1617967127.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 5fff4c14ae01275a3432ecebcf6c3e6c1bd14932 Merge: 8ef7adc6beb2e fa9f5d0e0b45a Author: David S. Miller Date: Tue Apr 13 14:12:34 2021 -0700 Merge tag 'wireless-drivers-next-2021-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers-next patches for v5.13 First set of patches for v5.13. I have been offline for a couple of and I have a smaller pull request this time. The next one will be bigger. Nothing really special standing out. ath11k * add initial support for QCN9074, but not enabled yet due to firmware problems * enable radar detection for 160MHz secondary segment * handle beacon misses in station mode rtw88 * 8822c: support firmware crash dump mt7601u * enable TDLS support ==================== Signed-off-by: David S. Miller commit 511aaf2b3227976a591ffa6d3e7e5f78a7d7a0ab Author: Federico Vaga Date: Sat Apr 10 00:41:04 2021 +0200 doc:it_IT: align Italian documentation Translation for the following patches commit 7dfbea4c468c ("scripts: remove namespace.pl") commit 1a63f9cce7b7 ("docs: Remove make headers_check from checklist") commit 1e013ff7cb54 ("docs: Document cross-referencing using relative path") commit 0be1511f516e ("Documentation: doc-guide: fixes to sphinx.rst") commit 911358401284 ("kernel-doc: Fix example in Nested structs/unions") commit 875f82cb374b ("Documentation/submitting-patches: Extend commit message layout description") commit 78f101a1b258 ("Documentation/submitting-patches: Add blurb about backtraces in commit messages") commit f0ea149eee6b ("docs: submitting-patches: Emphasise the requirement to Cc: stable when using Fixes: tag") commit 05a5f51ca566 ("Documentation: Replace lkml.org links with lore") commit 9bf19b78a203 ("Documentation/submitting-patches: Document the SoB chain") commit b7592e5b82db ("docs: Remove the Microsoft rhetoric") commit 26606ce072d4 ("coding-style.rst: Avoid comma statements") commit dd58e649742a ("docs: Make syscalls' helpers naming consistent") commit 460cd17e9f7d ("net: switch to the kernel.org patchwork instance") commit 163ba35ff371 ("doc: use KCFLAGS instead of EXTRA_CFLAGS to pass flags from command line") commit 0ef597c3ac49 ("docs: remove mention of ENABLE_MUST_CHECK") commit f8408264c77a ("drivers: Remove CONFIG_OPROFILE support") commit 0653c358d2dc ("scsi: Drop gdth driver") commit f8ae7bbec726 ("net: x25_asy: Delete the x25_asy driver") commit cf6d6fc27936 ("docs: process/howto.rst: make sections on bug reporting match practice") commit da514157c4f0 ("docs: make reporting-bugs.rst obsolete") commit 4f8af077a02e ("docs: Fix reST markup when linking to sections") commit 3a4928cf5e3c ("Documentation: kernel-hacking: change 'current()' to 'current'") commit c170f2eb9648 ("docs: Document cross-referencing between documentation pages") Signed-off-by: Federico Vaga Link: https://lore.kernel.org/r/20210409224104.30471-1-federico.vaga@vaga.pv.it Signed-off-by: Jonathan Corbet commit 7eb33bdece299f3ec4ce5beb254e473a01df336b Author: Wu XiangCheng Date: Tue Apr 13 15:29:36 2021 +0800 docs/zh_CN: sync reporting-issues.rst Sync zh translation reporting-issues.rst to commit 58c539453b71 ("docs: reporting-issues: reduce quoting and assorted fixes") Drop reporting-bug.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210413072934.GA2674@bobwxc.top Signed-off-by: Jonathan Corbet commit e18f54f9bfdbcfc02c5e0b93888bcfe1f2174bd2 Author: Wu XiangCheng Date: Tue Apr 13 15:13:39 2021 +0800 docs/zh_CN: Link zh_CN/doc-guide to zh_CN/index.rst Add zh_CN/doc-guide entry in zh_CN/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/8738b39c1b54e15477a937c861f114165a8c0648.1618295149.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit febe6c2f859ee1b51b67ec4933367321329839c9 Author: Wu XiangCheng Date: Tue Apr 13 15:13:26 2021 +0800 docs/zh_CN: Add translation zh_CN/doc-guide/index.rst Add new translation Documentation/translations/zh_CN/doc-guide/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/4a01400c3d65b2f7eb1c1bebd3a0e102ed29208f.1618295149.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 28418abdee40debf46fbf6f9b70413615878dcc2 Author: Wu XiangCheng Date: Tue Apr 13 15:13:13 2021 +0800 docs/zh_CN: Add translation zh_CN/doc-guide/maintainer-profile.rst Add new translation Documentation/translations/zh_CN/doc-guide/maintainer-profile.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/0ea1acfd30e8a0f2676981100e27513178cde06b.1618295149.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 0374bbba2dc10a0f31fbd369be58124f9dec6382 Author: Wu XiangCheng Date: Tue Apr 13 15:12:58 2021 +0800 docs/zh_CN: Add translation zh_CN/doc-guide/contributing.rst Add new translation Documentation/translations/zh_CN/doc-guide/contributing.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/3c48979277abe63d1d157c7eb9187d32380db42a.1618295149.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 7e402ef5715279f6dba09f04ecc84195b9cb5aa1 Author: Wu XiangCheng Date: Tue Apr 13 15:12:21 2021 +0800 docs/zh_CN: Add translation zh_CN/doc-guide/parse-headers.rst Add new translation Documentation/translations/zh_CN/doc-guide/parse-headers.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/81d98cf80325ff3b1c4145965bc7d05ddb2b3c49.1618295149.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 3a5915156429cc3206a99065313367483d5e6881 Author: Wu XiangCheng Date: Tue Apr 13 15:12:07 2021 +0800 docs/zh_CN: Add translation zh_CN/doc-guide/kernel-doc.rst Add new translation Documentation/translations/zh_CN/doc-guide/kernel-doc.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/783d134b1dd18f580f2c0511c2330382a86e79b5.1618295149.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit bb17248373d4a47655052e5697046af25668e7ae Author: Wu XiangCheng Date: Tue Apr 13 15:11:16 2021 +0800 docs/zh_CN: Add translation zh_CN/doc-guide/sphinx.rst Add new translation Documentation/translations/zh_CN/doc-guide/sphinx.rst Signed-off-by: Wu XiangCheng Reviewed-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/7c8c2eeb6c0b73410fbdb66cf702dc0e58b02a3e.1618295149.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 6349469a4f3c036315bf40d700fa55e179f9e51d Author: Borislav Petkov Date: Tue Apr 13 13:38:34 2021 +0200 Documentation/submitting-patches: Document RESEND tag on patches Explain when a submitter should tag a patch or a patch series with the "RESEND" tag. This has been partially carved out from a tip subsystem handbook patchset by Thomas Gleixner: https://lkml.kernel.org/r/20181107171010.421878737@linutronix.de and incorporates follow-on comments. Signed-off-by: Borislav Petkov Signed-off-by: Jonathan Corbet commit 859fd2418b4ba00bba56263b8abc7f54f4a7260f Author: Wei Yongjun Date: Fri Mar 19 09:41:00 2021 +0000 remoteproc: qcom: wcss: Fix return value check in q6v5_wcss_init_mmio() 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: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210319094100.4185044-1-weiyongjun1@huawei.com Signed-off-by: Bjorn Andersson commit 880a66e026fbe6a17cd59fe0ee942bbad62a6c26 Author: Suman Anna Date: Wed Apr 7 10:56:41 2021 -0500 remoteproc: pru: Fix and cleanup firmware interrupt mapping logic The PRU firmware interrupt mappings are configured and unconfigured in .start() and .stop() callbacks respectively using the variables 'evt_count' and a 'mapped_irq' pointer. These variables are modified only during these callbacks but are not re-initialized/reset properly during unwind or failure paths. These stale values caused a kernel crash while stopping a PRU remoteproc running a different firmware with no events on a subsequent run after a previous run that was running a firmware with events. Fix this crash by ensuring that the evt_count is 0 and the mapped_irq pointer is set to NULL in pru_dispose_irq_mapping(). Also, reset these variables properly during any failures in the .start() callback. While at this, the pru_dispose_irq_mapping() callsites are all made to look the same, moving any conditional logic to inside the function. Reviewed-by: Mathieu Poirier Fixes: c75c9fdac66e ("remoteproc: pru: Add support for PRU specific interrupt configuration") Reported-by: Vignesh Raghavendra Signed-off-by: Suman Anna Link: https://lore.kernel.org/r/20210407155641.5501-4-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 1fe72bcfac087dba5ab52778e0646ed9e145cd32 Author: Suman Anna Date: Wed Apr 7 10:56:40 2021 -0500 remoteproc: pru: Fix wrong success return value for fw events The irq_create_fwspec_mapping() returns a proper virq value on success and 0 upon any failure. The pru_handle_intrmap() treats this as an error and disposes all firmware event mappings correctly, but is returning this incorrect value as is, letting the pru_rproc_start() interpret it as a success and boot the PRU. Fix this by returning an error value back upon any such failure. While at this, revise the error trace to print some meaningful info about the failed event. Fixes: c75c9fdac66e ("remoteproc: pru: Add support for PRU specific interrupt configuration") Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210407155641.5501-3-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 6d1f2803cb6b414c2e45fa64d1fdad6b581e1e88 Author: Suman Anna Date: Wed Apr 7 10:56:39 2021 -0500 remoteproc: pru: Fixup interrupt-parent logic for fw events The PRU firmware interrupt mapping logic in pru_handle_intrmap() uses of_irq_find_parent() with PRU device node to get a handle to the PRUSS Interrupt Controller at present. This logic however requires that the PRU nodes always define a interrupt-parent property. This property is neither a required/defined property as per the PRU remoteproc binding, nor is relevant from a DT node point of view without any associated interrupts. The current logic finds a wrong interrupt controller and fails to perform proper mapping without any interrupt-parent property in the PRU nodes. Fix this logic to always find and use the sibling interrupt controller. Also, while at this, fix the acquired interrupt controller device node reference properly. Fixes: c75c9fdac66e ("remoteproc: pru: Add support for PRU specific interrupt configuration") Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210407155641.5501-2-s-anna@ti.com Signed-off-by: Bjorn Andersson commit 63f9c44bca5e10fb1fd86aee7e38039ed98f95cc Author: Maor Gottlieb Date: Sun Apr 11 15:29:18 2021 +0300 net/mlx5: Add MEMIC operations related bits Add the MEMIC operations bits and structures to the mlx5_ifc file. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky commit 473b2922c7e54260268c9bb037d2ff9f327422ab Merge: da66658638c94 89698becf06d3 Author: Arnaldo Carvalho de Melo Date: Tue Apr 13 15:14:37 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes from perf/urgent that got into upstream. Signed-off-by: Arnaldo Carvalho de Melo commit 594b6d0428ae304e0b44457398beb458b938f005 Author: Yi Chen Date: Tue Apr 13 17:30:50 2021 +0800 f2fs: fix to avoid NULL pointer dereference Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 pc : f2fs_put_page+0x1c/0x26c lr : __revoke_inmem_pages+0x544/0x75c f2fs_put_page+0x1c/0x26c __revoke_inmem_pages+0x544/0x75c __f2fs_commit_inmem_pages+0x364/0x3c0 f2fs_commit_inmem_pages+0xc8/0x1a0 f2fs_ioc_commit_atomic_write+0xa4/0x15c f2fs_ioctl+0x5b0/0x1574 file_ioctl+0x154/0x320 do_vfs_ioctl+0x164/0x740 __arm64_sys_ioctl+0x78/0xa4 el0_svc_common+0xbc/0x1d0 el0_svc_handler+0x74/0x98 el0_svc+0x8/0xc In f2fs_put_page, we access page->mapping is NULL. The root cause is: In some cases, the page refcount and ATOMIC_WRITTEN_PAGE flag miss set for page-priavte flag has been set. We add f2fs_bug_on like this: f2fs_register_inmem_page() { ... f2fs_set_page_private(page, ATOMIC_WRITTEN_PAGE); f2fs_bug_on(F2FS_I_SB(inode), !IS_ATOMIC_WRITTEN_PAGE(page)); ... } The bug on stack follow link this: PC is at f2fs_register_inmem_page+0x238/0x2b4 LR is at f2fs_register_inmem_page+0x2a8/0x2b4 f2fs_register_inmem_page+0x238/0x2b4 f2fs_set_data_page_dirty+0x104/0x164 set_page_dirty+0x78/0xc8 f2fs_write_end+0x1b4/0x444 generic_perform_write+0x144/0x1cc __generic_file_write_iter+0xc4/0x174 f2fs_file_write_iter+0x2c0/0x350 __vfs_write+0x104/0x134 vfs_write+0xe8/0x19c SyS_pwrite64+0x78/0xb8 To fix this issue, let's add page refcount add page-priavte flag. The page-private flag is not cleared and needs further analysis. Signed-off-by: Chao Yu Signed-off-by: Ge Qiu Signed-off-by: Dehe Gu Signed-off-by: Yi Chen Signed-off-by: Jaegeuk Kim commit 453e2ff8e4ff2747acee1799e7ef959970c5cc78 Author: Chao Yu Date: Tue Apr 13 17:56:18 2021 +0800 f2fs: avoid duplicated codes for cleanup f2fs_segment_has_free_slot() was copied and modified from __next_free_blkoff(), they are almost the same, clean up to reuse common code as much as possible. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 38740707c5bc1253069eb932bc6d244f80ec21f0 Author: Chao Yu Date: Tue Apr 13 17:56:53 2021 +0800 f2fs: document: add description about compressed space handling User or developer may still be confused about why f2fs doesn't expose compressed space to userspace, add description about compressed space handling policy into f2fs documentation. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 347b546d5a9bd5871279a29be3dce8b5aad47ef6 Author: Bart Van Assche Date: Mon Apr 12 20:41:42 2021 -0700 block: Remove an obsolete comment from sg_io() Commit b7819b925918 ("block: remove the blk_execute_rq return value") changed the return type of blk_execute_rq() from int into void. That change made a comment in sg_io() obsolete. Hence remove that comment. Cc: Christoph Hellwig Cc: Johannes Thumshirn Signed-off-by: Bart Van Assche Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Link: https://lore.kernel.org/r/20210413034142.23460-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit 780278c2c8bb50fc01b70a7392af6ab3ba360074 Author: Mike Marciniszyn Date: Mon Mar 29 09:54:16 2021 -0400 IB/hfi1: Rework AIP and VNIC dummy netdev usage All other users of the dummy netdevice embed the netdev in other structures: init_dummy_netdev(&mal->dummy_dev); init_dummy_netdev(ð->dummy_dev); init_dummy_netdev(&ar->napi_dev); init_dummy_netdev(&irq_grp->napi_ndev); init_dummy_netdev(&wil->napi_ndev); init_dummy_netdev(&trans_pcie->napi_dev); init_dummy_netdev(&dev->napi_dev); init_dummy_netdev(&bus->mux_dev); The AIP and VNIC implementation turns that model inside out and used a kfree() to free what appears to be a netdev struct when in reality, it is a struct that enbodies the rx state as well as the dummy netdev used to support napi_poll across disparate receive contexts. The relationship is infered by the odd allocation: const int netdev_size = sizeof(*dd->dummy_netdev) + sizeof(struct hfi1_netdev_priv); dd->dummy_netdev = kcalloc_node(1, netdev_size, GFP_KERNEL, dd->node); Correct the issue by: - Correctly naming the alloc and free functions - Renaming hfi1_netdev_priv to hfi1_netdev_rx - Replacing dd dummy_netdev with a netdev_rx pointer - Embedding the net_device in hfi1_netdev_rx - Moving the init_dummy_netdev to the alloc routine - Adjusting wrappers to fit the new model Fixes: 6991abcb993c ("IB/hfi1: Add functions to receive accelerated ipoib packets") Link: https://lore.kernel.org/r/1617026056-50483-11-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 839157876f97fcc7ead0b62c9377bb50f75a3df9 Author: zhouchuangao Date: Tue Mar 30 04:57:50 2021 -0700 arm64/kernel/probes: Use BUG_ON instead of if condition followed by BUG. It can be optimized at compile time. Signed-off-by: zhouchuangao Reviewed-by: Masami Hiramatsu Link: https://lore.kernel.org/r/1617105472-6081-1-git-send-email-zhouchuangao@vivo.com Signed-off-by: Catalin Marinas commit a2387e0a1315ac0af4be2158c174ca882c1d27a9 Merge: 3284cd638b859 68d400c079978 Author: Marc Zyngier Date: Tue Apr 13 17:47:55 2021 +0100 Merge remote-tracking branch 'coresight/next-ETE-TRBE' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 039b81d50a4822edfc07a7c2e6963823e993b2f0 Author: Mauro Carvalho Chehab Date: Mon Apr 12 11:55:57 2021 +0200 USB: cdc-acm: add more Maxlinear/Exar models to ignore list Now that the xr_serial got support for other models, add their USB IDs as well. The Maxlinear/Exar USB UARTs can be used in either ACM mode using the cdc-acm driver or in "custom driver" mode in which further features such as hardware and software flow control, GPIO control and in-band line-status reporting are available. In ACM mode the device always enables RTS/CTS flow control, something which could prevent transmission in case the CTS input isn't wired up correctly. Ensure that cdc_acm will not bind to these devices if the custom USB-serial driver is enabled. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5155887a764cbc11f8da0217fe08a24a77d120b4.1616571453.git.mchehab+huawei@kernel.org [ johan: rewrite commit message, clean up entries ] Cc: Oliver Neukum Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit d801c8d438b3e8f2b6d2f79e3c75b8e0c5dd86df Author: Johan Hovold Date: Mon Apr 12 11:55:56 2021 +0200 USB: serial: xr: add copyright notice Add another copyright notice for the work done in 2021. Signed-off-by: Johan Hovold commit 06f79d57f4f572395082da07d663fef91c9bb891 Author: Johan Hovold Date: Mon Apr 12 11:55:55 2021 +0200 USB: serial: xr: reset FIFOs on open Reset the transmit and receive FIFOs before enabling the UARTs as part of open() in order to flush any stale data. Note that the XR21V141X needs a type-specific implementation due to its UART Manager registers. Signed-off-by: Johan Hovold commit 6da99f9de5feb25b01cbe37fdb15f26a2d7d64a9 Author: Johan Hovold Date: Mon Apr 12 11:55:54 2021 +0200 USB: serial: xr: add support for XR22801, XR22802, XR22804 The XR22801, XR22802 and XR22804 are compound devices with an embedded hub and up to seven downstream USB devices including one, two or four UARTs respectively. The UART function is similar to XR21B142X but most registers are offset by 0x40, the register requests are different and are directed at the device rather than interface, and 5 and 6-bit words are not supported. Signed-off-by: Johan Hovold commit 4099d4ba476325100fcafb139fc6c49d0441bc7c Author: Johan Hovold Date: Mon Apr 12 11:55:53 2021 +0200 USB: serial: xr: add support for XR21B1411 The single-port XR21B1411 is similar to the XR21B142X type but uses 12-bit registers and 16-bit register addresses, the register requests are different and are directed at the device rather than interface, and 5 and 6-bit words are not supported. The register layout is very similar to XR21B142X except that most registers are offset by 0xc00 (corresponding to a channel index of 12 in the MSB of wIndex). As the device is single-port so that the derived channel index is 0, the current register accessors can be reused after simply changing the address width. Signed-off-by: Johan Hovold commit 607f67183742eeb45e316e89dc7fec64d6288308 Author: Johan Hovold Date: Mon Apr 12 11:55:52 2021 +0200 USB: serial: xr: add support for XR21B1421, XR21B1422 and XR21B1424 The XR21B1421, XR21B1422 and XR21B1424 are the one-, two- and four-port models of a second XR21B142X type of the Maxlinear/Exar USB UARTs. The XR21B142X type differs from XR21V141X in several ways, including: - register layout - register width (16-bit instead of 8-bit) - vendor register requests - UART enable/disable sequence - custom-driver mode flag - three additional GPIOs (9 instead of 6) As for XR21V141X, the XR21B142X vendor requests encode the channel index in the MSB of wIndex, but it lacks the UART Manager registers which have been replaced by regular UART registers. The new type also uses the interface number of the control interface (0, 2, 4, 6) as channel index instead of the channel number (0, 1, 2, 3). The XR21B142X lacks the divisor and format registers used by XR21V141X and instead uses the CDC SET_LINE_CONTROL request to configure the line settings. Note that the currently supported XR21V141X type lacks the custom-driver mode flag that prevents the device from entering CDC-ACM mode when a CDC requests is received. This specifically means that the SET_LINE_CONTROL request cannot be used with XR21V141X even though it is otherwise supported. The UART enable sequence for XR21B142X does not involve explicitly enabling the FIFOs, but according to datasheet the UART must be disabled when writing any register but GPIO_SET, GPIO_CLEAR, TX_BREAK and ERROR_STATUS. Signed-off-by: Johan Hovold commit f865e614604cb6b5ea76462ad314c90a62b918c4 Author: Johan Hovold Date: Mon Apr 12 11:55:51 2021 +0200 USB: serial: xr: add type abstraction There are at least four types of Maxlinear/Exar USB UARTs which differ in various ways such as in their register layouts: XR21V141X XR21B142X XR21B1411 XR22804 It is not clear whether the device type can be inferred from the descriptors so encode it in the device-id table for now. Add a type structure that can be used to abstract the register layout and other features, and use it when accessing the XR21V141X UART registers that are shared by all types. Note that the currently supported XR21V141X type is the only type that has a set of UART Manager registers and that these will need to be handled specifically. Similarly, XR21V141X is the only type which has the divisor registers and that needs to use the format register when configuring the line settings. Signed-off-by: Johan Hovold commit 958d6b958574a7b609982f1499bf3d792284ce7b Author: Johan Hovold Date: Mon Apr 12 11:55:50 2021 +0200 USB: serial: xr: drop type prefix from shared defines In preparation for adding support for further types, drop the type prefix from defines that are not specific to XR21V141X. Signed-off-by: Johan Hovold commit 49036fd021ce77764bc8059166f646c9768a1b26 Author: Johan Hovold Date: Mon Apr 12 11:55:49 2021 +0200 USB: serial: xr: move pin configuration to probe There's no need to configure the pins on every open and judging from the vendor driver and datasheet it can be done before enabling the UART. Move pin configuration from open() to port probe and make sure to deassert DTR and RTS after configuring all pins as GPIO. Signed-off-by: Johan Hovold commit 5f70fe320e47de0611150dd4628c86eb9212eb00 Author: Johan Hovold Date: Mon Apr 12 11:55:48 2021 +0200 USB: serial: xr: rename GPIO-pin defines Rename the GPIO-pin defines so that they reflect how they are used. Signed-off-by: Johan Hovold commit 3c369a850d3f30ff258ed9b9982b6d06a6232985 Author: Johan Hovold Date: Mon Apr 12 11:55:47 2021 +0200 USB: serial: xr: rename GPIO-mode defines Rename the GPIO mode defines so that they reflect the datasheet and how they are used. Signed-off-by: Johan Hovold commit 23b7998e81aa37d97897aa236bdcfba3f6edeb66 Author: Johan Hovold Date: Mon Apr 12 11:55:46 2021 +0200 USB: serial: xr: add support for XR21V1412 and XR21V1414 Add support for the two- and four-port variants of XR21V1410. Use the interface number of each control interface (e.g. 0, 2, 4, 6) to derive the zero-based channel index: XR21V1410 0 XR21V1412 0, 1 XR21V1414 0, 1, 2, 3 Note that the UART registers reside in separate blocks per channel, while the UART Manager functionality is implemented using per-channel registers. Signed-off-by: Johan Hovold commit b90e483938ce387c256e03fb144f82f64551847b Author: Peter Collingbourne Date: Thu Mar 18 20:10:54 2021 -0700 arm64: pac: Optimize kernel entry/exit key installation code paths The kernel does not use any keys besides IA so we don't need to install IB/DA/DB/GA on kernel exit if we arrange to install them on task switch instead, which we can expect to happen an order of magnitude less often. Furthermore we can avoid installing the user IA in the case where the user task has IA disabled and just leave the kernel IA installed. This also lets us avoid needing to install IA on kernel entry. On an Apple M1 under a hypervisor, the overhead of kernel entry/exit has been measured to be reduced by 15.6ns in the case where IA is enabled, and 31.9ns in the case where IA is disabled. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/Ieddf6b580d23c9e0bed45a822dabe72d2ffc9a8e Link: https://lore.kernel.org/r/2d653d055f38f779937f2b92f8ddd5cf9e4af4f4.1616123271.git.pcc@google.com Signed-off-by: Catalin Marinas commit 201698626fbca1cf1a3b686ba14cf2a056500716 Author: Peter Collingbourne Date: Thu Mar 18 20:10:53 2021 -0700 arm64: Introduce prctl(PR_PAC_{SET,GET}_ENABLED_KEYS) This change introduces a prctl that allows the user program to control which PAC keys are enabled in a particular task. The main reason why this is useful is to enable a userspace ABI that uses PAC to sign and authenticate function pointers and other pointers exposed outside of the function, while still allowing binaries conforming to the ABI to interoperate with legacy binaries that do not sign or authenticate pointers. The idea is that a dynamic loader or early startup code would issue this prctl very early after establishing that a process may load legacy binaries, but before executing any PAC instructions. This change adds a small amount of overhead to kernel entry and exit due to additional required instruction sequences. On a DragonBoard 845c (Cortex-A75) with the powersave governor, the overhead of similar instruction sequences was measured as 4.9ns when simulating the common case where IA is left enabled, or 43.7ns when simulating the uncommon case where IA is disabled. These numbers can be seen as the worst case scenario, since in more realistic scenarios a better performing governor would be used and a newer chip would be used that would support PAC unlike Cortex-A75 and would be expected to be faster than Cortex-A75. On an Apple M1 under a hypervisor, the overhead of the entry/exit instruction sequences introduced by this patch was measured as 0.3ns in the case where IA is left enabled, and 33.0ns in the case where IA is disabled. Signed-off-by: Peter Collingbourne Reviewed-by: Dave Martin Link: https://linux-review.googlesource.com/id/Ibc41a5e6a76b275efbaa126b31119dc197b927a5 Link: https://lore.kernel.org/r/d6609065f8f40397a4124654eb68c9f490b4d477.1616123271.git.pcc@google.com Signed-off-by: Catalin Marinas commit 2f79d2fc391e4ba64df908b8c07dda6c3a907056 Author: Peter Collingbourne Date: Thu Mar 18 20:10:52 2021 -0700 arm64: mte: make the per-task SCTLR_EL1 field usable elsewhere In an upcoming change we are going to introduce per-task SCTLR_EL1 bits for PAC. Move the existing per-task SCTLR_EL1 field out of the MTE-specific code so that we will be able to use it from both the PAC and MTE code paths and make the task switching code more efficient. Signed-off-by: Peter Collingbourne Link: https://linux-review.googlesource.com/id/Ic65fac78a7926168fa68f9e8da591c9e04ff7278 Link: https://lore.kernel.org/r/13d725cb8e741950fb9d6e64b2cd9bd54ff7c3f9.1616123271.git.pcc@google.com Signed-off-by: Catalin Marinas commit 4ef8f235778716476528a0ca270a4783ef6a40bb Author: Johan Hovold Date: Mon Apr 12 11:47:38 2021 +0200 USB: serial: ti_usb_3410_5052: clean up termios CSIZE handling Remove the random white space from the CSIZE switch. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit b7cff0c412dcb31961e4b536cddd9ffa7a76c225 Author: Johan Hovold Date: Mon Apr 12 11:47:37 2021 +0200 USB: serial: ti_usb_3410_5052: use kernel types consistently Replace the remaining uses of user-space __XX types. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 3bfe43988c93ada8c8fc8fb16c95271381606289 Author: Johan Hovold Date: Mon Apr 12 11:47:36 2021 +0200 USB: serial: ti_usb_3410_5052: add port-command helpers Add two port-command helpers to handle the UART module-id parameter instead of open coding. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit d24223367d21240c1985456859daddb5e7d227b8 Author: Johan Hovold Date: Mon Apr 12 11:47:35 2021 +0200 USB: serial: ti_usb_3410_5052: clean up vendor-request helpers Make the vendor-request helpers data parameters be void pointers and drop the caller casts. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit a1db84f6cab79780954ffd55bb114c52b867d81d Author: Johan Hovold Date: Mon Apr 12 11:47:34 2021 +0200 USB: serial: ti_usb_3410_5052: drop unnecessary packed attributes Drop unnecessary packed attributes from structures that don't need it. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 46388e865273bc67dc29fee9772e1b8b59eaafd3 Author: Johan Hovold Date: Mon Apr 12 11:47:33 2021 +0200 USB: serial: io_ti: drop unnecessary packed attributes Drop unnecessary packed attributes from structures that don't need it and use the __packed macro consistently. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 35aeb1b31b73359902d8c8031c8dae5d390fd14f Author: Johan Hovold Date: Mon Apr 12 11:47:32 2021 +0200 USB: serial: io_ti: use kernel types consistently Use kernel types consistently by replacing the remaining __uXX types. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 13c613393cee59a6f6fd4627f7003606392690d1 Author: Johan Hovold Date: Mon Apr 12 11:47:31 2021 +0200 USB: serial: io_ti: add read-port-command helper Add a read-port-command helper analogous to the send-port-command helper to take care of the UART module id instead of open coding. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 7a14fac0c94472ad2d11ac14cefbeab5bf98e303 Author: Johan Hovold Date: Mon Apr 12 11:47:30 2021 +0200 USB: serial: io_ti: add send-port-command helper Add a send-port-command helper which takes care of determining the UART module id when sending commands instead of doing so at every call site. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit e8d89db01a97be04050fb2bc74ed6b6f01ed9169 Author: Johan Hovold Date: Mon Apr 12 11:47:29 2021 +0200 USB: serial: io_ti: clean up vendor-request helpers Clean up the vendor-request helpers by using kernel-types consistently and using void pointers for the data arguments, which allows removing a cast from one caller. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit bd49224a2ecf19bf5ce9128d8175fa69eeb952b5 Author: Johan Hovold Date: Mon Apr 12 11:38:15 2021 +0200 USB: serial: ti_usb_3410_5052: drop drain delay for 3410 Unlike the TUSB5052, the TUSB3410 has an LSR TEMT bit to tell if both the transmitter data and shift registers are empty. Make sure to check also the shift register on TUSB3410 when waiting for the transmit buffer to drain during close and drop the time-based one-char delay which is otherwise needed (e.g. 90 ms at 110 bps). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit c505b8b2ef274ce60a79f18a33bf23efd17a04de Author: Johan Hovold Date: Mon Apr 12 11:38:14 2021 +0200 USB: serial: ti_usb_3410_5052: reduce drain delay to one char The three-character drain delay was added by commit f1175daa5312 ("USB: ti_usb_3410_5052: kill custom closing_wait") when removing the custom closing-wait implementation, which used a fixed 20 ms poll period and drain delay. This was likely a bit too conservative as a one-character timeout (e.g. 33 ms at 300 bps) should be enough to compensate for the lack of a transmitter empty bit in the TUSB5052 line-status register. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 4b8e07951ff53e702bd5d6d21450b17152d124d7 Author: Johan Hovold Date: Mon Apr 12 11:38:13 2021 +0200 USB: serial: io_ti: document reason for drain delay Document that the device line-status register doesn't tell when the transmitter shift register has emptied and that this is why the one-character drain delay is needed. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 8674cabe052b9ce23f72abb83058fc1d545e257a Author: Johan Hovold Date: Mon Apr 12 11:38:12 2021 +0200 USB: serial: f81232: drop time-based drain delay The f81232 driver now waits for the transmit FIFO to drain during close so there is no need to keep the time-based drain delay, which would add up to two seconds on every close for low line speeds. Fixes: 98405f81036d ("USB: serial: f81232: add tx_empty function") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 9c8823e0d365b554088eb00fe70b6df7dcb6030f Author: Jiapeng Chong Date: Tue Apr 13 17:11:03 2021 +0800 RDMA/qib: Remove useless qib_read_ureg() function Fix the following clang warning: drivers/infiniband/hw/qib/qib_iba7322.c:803:19: warning: unused function 'qib_read_ureg' [-Wunused-function]. Link: https://lore.kernel.org/r/1618305063-29007-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Jason Gunthorpe commit dc1d06e699b5fe58f97df7123996ba8556b386c9 Author: Yixian Liu Date: Tue Apr 13 17:11:27 2021 +0800 RDMA/hns: Remove unnecessary flush operation for workqueue As a flush operation is implemented inside destroy_workqueue(), there is no need to do flush operation before. Fixes: bfcc681bd09d ("IB/hns: Fix the bug when free mr") Fixes: 0425e3e6e0c7 ("RDMA/hns: Support flush cqe for hip08 in kernel space") Link: https://lore.kernel.org/r/1618305087-30799-1-git-send-email-liweihang@huawei.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 68d400c079978f649e7f63aba966d219743edd64 Author: Wei Yongjun Date: Fri Apr 9 09:49:01 2021 +0000 coresight: trbe: Fix return value check in arm_trbe_register_coresight_cpu() In case of error, the function devm_kasprintf() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210409094901.1903622-1-weiyongjun1@huawei.com Signed-off-by: Mathieu Poirier commit f39c8a5b1130fe17db9c66d08aa473d9587543a9 Author: Pavel Begunkov Date: Tue Apr 13 02:58:46 2021 +0100 io_uring: inline io_iopoll_getevents() io_iopoll_getevents() is of no use to us anymore, io_iopoll_check() handles all the cases. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7e50b8917390f38bee4f822c6f4a6a98a27be037.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e9979b36a467dcdb2073ec8391a2c167971bee46 Author: Pavel Begunkov Date: Tue Apr 13 02:58:45 2021 +0100 io_uring: skip futile iopoll iterations The only way to get out of io_iopoll_getevents() and continue iterating is to have empty iopoll_list, otherwise the main loop would just exit. So, instead of the unlock on 8th time heuristic, do that based on iopoll_list. Also, as no one can add new requests to iopoll_list while io_iopoll_check() hold uring_lock, it's useless to spin with the list empty, return in that case. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/5b8ebe84f5fff7ffa1f708952dfef7fc78b668e2.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit cce4b8b0ce1f9fdf67f4f73ed12a2da2a085d5e3 Author: Pavel Begunkov Date: Tue Apr 13 02:58:44 2021 +0100 io_uring: don't fail overflow on in_idle As CQE overflows are now untied from requests and so don't hold any ref, we don't need to handle exiting/exec'ing cases there anymore. Moreover, it's much nicer in regards to userspace to save overflowed CQEs whenever possible, so remove failing on in_idle. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d873b7dab75c7f3039ead9628a745bea01f2cfd2.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e31001a3abb81a2dba976b842b8ab65d123bca2a Author: Pavel Begunkov Date: Tue Apr 13 02:58:43 2021 +0100 io_uring: clean up io_poll_remove_waitqs() Move some parts of io_poll_remove_waitqs() that are opcode independent. Looks better and stresses that both do __io_poll_remove_one(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bbc717f82117cc335c89cbe67ec8d72608178732.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit fd9c7bc542dae7cca3b02c77f7863823d54ddee0 Author: Pavel Begunkov Date: Tue Apr 13 02:58:42 2021 +0100 io_uring: refactor hrtimer_try_to_cancel uses Don't save return values of hrtimer_try_to_cancel() in a variable, but use right away. It's in general safer to not have an intermediate variable, which may be reused and passed out wrongly, but it be contracted out. Also clean io_timeout_extract(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d2566ef7ce632e6882dc13e022a26249b3fd30b5.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 8c855885b8b35af24f45cdd288a9b6ba6274a8ac Author: Pavel Begunkov Date: Tue Apr 13 02:58:41 2021 +0100 io_uring: add timeout completion_lock annotation Add one more sparse locking annotation for readability in io_kill_timeout(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bdbb22026024eac29203c1aa0045c4954a2488d1.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9d8058926be7008c1dd49a4e5fb33044f17873c1 Author: Pavel Begunkov Date: Tue Apr 13 02:58:40 2021 +0100 io_uring: split poll and poll update structures struct io_poll_iocb became pretty nasty combining also update fields. Split them, so we would have more clarity to it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/b2f74d64ffebb57a648f791681af086c7211e3a4.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 66d2d00d0ac44f98499dc7ec61e2289eb8b138e7 Author: Pavel Begunkov Date: Tue Apr 13 02:58:39 2021 +0100 io_uring: fix uninit old data for poll event upd Both IORING_POLL_UPDATE_EVENTS and IORING_POLL_UPDATE_USER_DATA need old_user_data to find/cancel a poll request, but it's set only for the first one. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/ab08fd35b7652e977f9a475f01741b04102297f1.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 084804002e512427bfe52b448cb7cac0d4209b64 Author: Pavel Begunkov Date: Tue Apr 13 02:58:38 2021 +0100 io_uring: fix leaking reg files on exit If io_sqe_files_unregister() faults on io_rsrc_ref_quiesce(), it will fail to do unregister leaving files referenced. And that may well happen because of a strayed signal or just because it does allocations inside. In io_ring_ctx_free() do an unsafe version of unregister, as it's guaranteed to not have requests by that point and so quiesce is useless. Cc: stable@vger.kernel.org Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e696e9eade571b51997d0dc1d01f144c6d685c05.1618278933.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit d19dea75b9920cfd78df397e836d5b885b4fcc37 Author: Wei Yongjun Date: Fri Apr 9 09:49:00 2021 +0000 coresight: core: Make symbol 'csdev_sink' static The sparse tool complains as follows: drivers/hwtracing/coresight/coresight-core.c:26:1: warning: symbol '__pcpu_scope_csdev_sink' was not declared. Should it be static? As csdev_sink is not used outside of coresight-core.c after the introduction of coresight_[set|get]_percpu_sink() helpers, this change marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210409094900.1902783-1-weiyongjun1@huawei.com Signed-off-by: Mathieu Poirier commit f8ee34a929a4adf6d29a7ef2145393e6865037ad Author: Christoph Hellwig Date: Tue Apr 13 10:52:57 2021 +0000 lightnvm: deprecated OCSSD support and schedule it for removal in Linux 5.15 Lightnvm was an innovative idea to expose more low-level control over SSDs. But it failed to get properly standardized and remains a non-standarized extension to NVMe that requires vendor specific quirks for a few now mostly obsolete SSD devices. The standardized ZNS command set for NVMe has take over a lot of the approaches and allows for fully standardized operation. Remove the Linux code to support open channel SSDs as the few production deployments of the above mentioned SSDs are using userspace driver stacks instead of the fairly limited Linux support. Signed-off-by: Christoph Hellwig Reviewed-by: Javier González Signed-off-by: Matias Bjørling Link: https://lore.kernel.org/r/20210413105257.159260-5-matias.bjorling@wdc.com Signed-off-by: Jens Axboe commit 655cdafdec1105d0552aa19ffb5ffef7aead1548 Author: Zhang Yunkai Date: Tue Apr 13 10:52:56 2021 +0000 lightnvm: remove duplicate include in lightnvm.h 'linux/blkdev.h' and 'uapi/linux/lightnvm.h' included in 'lightnvm.h' is duplicated.It is also included in the 5th and 7th line. Signed-off-by: Zhang Yunkai Signed-off-by: Matias Bjørling Link: https://lore.kernel.org/r/20210413105257.159260-4-matias.bjorling@wdc.com Signed-off-by: Jens Axboe commit 1c6b0bc73fac9306462bd4794d00520690e97ef8 Author: Tian Tao Date: Tue Apr 13 10:52:55 2021 +0000 lightnvm: return the correct return value When memdup_user returns an error, memdup_user has two different return values, use PTR_ERR to get the correct return value. Signed-off-by: Tian Tao Signed-off-by: Matias Bjørling Link: https://lore.kernel.org/r/20210413105257.159260-3-matias.bjorling@wdc.com Signed-off-by: Jens Axboe commit 327e1d2957ab7dfdc0334f70d89ffed03040c6a5 Author: Chaitanya Kulkarni Date: Tue Apr 13 10:52:54 2021 +0000 lightnvm: use kobj_to_dev() This fixs coccicheck warning: drivers/nvme//host/lightnvm.c:1243:60-61: WARNING opportunity for kobj_to_dev() Signed-off-by: Chaitanya Kulkarni Signed-off-by: Matias Bjørling Link: https://lore.kernel.org/r/20210413105257.159260-2-matias.bjorling@wdc.com Signed-off-by: Jens Axboe commit 6ce2c05b21189eb17b3aa26720cc5841acf9dce8 Author: Yong Wu Date: Sat Apr 10 17:11:16 2021 +0800 memory: mtk-smi: Add device-link between smi-larb and smi-common Normally, If the smi-larb HW need work, we should enable the smi-common HW power and clock firstly. This patch adds device-link between the smi-larb dev and the smi-common dev. then If pm_runtime_get_sync(smi-larb-dev), the pm_runtime_get_sync (smi-common-dev) will be called automatically. Also, Add DL_FLAG_STATELESS to avoid the smi-common clocks be gated when probe. CC: Matthias Brugger Suggested-by: Tomasz Figa Signed-off-by: Yong Wu Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210410091128.31823-5-yong.wu@mediatek.com commit 132c17c3ff878c7beaba51bdd275d5cc654c0e33 Author: Krzysztof Kozlowski Date: Wed Apr 7 17:45:35 2021 +0200 memory: samsung: exynos5422-dmc: handle clk_set_parent() failure clk_set_parent() can fail and ignoring such case could lead to invalid clock setup for given frequency. Addresses-Coverity: Unchecked return value Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422") Signed-off-by: Krzysztof Kozlowski Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20210407154535.70756-1-krzysztof.kozlowski@canonical.com commit 59e27d7c94aa02da039b000d33c304c179395801 Author: Krzysztof Kozlowski Date: Wed Apr 7 17:43:57 2021 +0200 memory: renesas-rpc-if: fix possible NULL pointer dereference of resource The platform_get_resource_byname() can return NULL which would be immediately dereferenced by resource_size(). Instead dereference it after validating the resource. Addresses-Coverity: Dereference null return value Fixes: ca7d8b980b67 ("memory: add Renesas RPC-IF driver") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210407154357.70200-1-krzysztof.kozlowski@canonical.com commit 3284cd638b85916ba6518f913586116412d190c6 Merge: 8320832940761 13150149aa6de Author: Marc Zyngier Date: Tue Apr 13 15:46:58 2021 +0100 Merge remote-tracking branch 'arm64/for-next/neon-softirqs-disabled' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 8320832940761e32cb6147a9ffb870eb6ba97065 Merge: e629003215e03 2d726d0db6ac4 Author: Marc Zyngier Date: Tue Apr 13 15:42:40 2021 +0100 Merge remote-tracking branch 'arm64/for-next/vhe-only' into kvmarm-master/next Signed-off-by: Marc Zyngier commit e629003215e03a8260326b5626fdd655618a79bd Merge: c90aad55c52e0 8082d50f4817f Author: Marc Zyngier Date: Tue Apr 13 15:41:45 2021 +0100 Merge branch 'kvm-arm64/vlpi-save-restore' into kvmarm-master/next Signed-off-by: Marc Zyngier commit c90aad55c52e032b0a39a2459c68702c9de543d4 Merge: d8f37d291cd76 94ac0835391ef Author: Marc Zyngier Date: Tue Apr 13 15:41:33 2021 +0100 Merge branch 'kvm-arm64/vgic-5.13' into kvmarm-master/next Signed-off-by: Marc Zyngier commit d8f37d291cd764ee966014ea2768709268d04abb Merge: bba8857febb1d 127ce0b14133f Author: Marc Zyngier Date: Tue Apr 13 15:41:22 2021 +0100 Merge branch 'kvm-arm64/ptp' into kvmarm-master/next Signed-off-by: Marc Zyngier commit bba8857febb1d0574480bd13a1be0567ac0f0ce9 Merge: 3b7e56be78646 c8a4b35f5063c Author: Marc Zyngier Date: Tue Apr 13 15:41:08 2021 +0100 Merge branch 'kvm-arm64/nvhe-wxn' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 3b7e56be786462423802ff84525b9a12539c5887 Merge: 5c92a7643b14a a9f8696d4be52 Author: Marc Zyngier Date: Tue Apr 13 15:40:59 2021 +0100 Merge branch 'kvm-arm64/nvhe-sve' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 5c92a7643b14a5bc93bac6e2af5f9010e284b584 Merge: ad569b70aa02f aec0fae62e470 Author: Marc Zyngier Date: Tue Apr 13 15:38:03 2021 +0100 Merge branch 'kvm-arm64/nvhe-panic-info' into kvmarm-master/next Signed-off-by: Marc Zyngier commit ad569b70aa02ffba1e86411b79570cbe4e6c7bb8 Merge: 3d63ef4d523ed 85d703746154c Author: Marc Zyngier Date: Tue Apr 13 15:35:58 2021 +0100 Merge branch 'kvm-arm64/misc-5.13' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 3d63ef4d523edb365dd6c91464ccc18e7bda510d Merge: ac5ce2456e3e6 10ba2d17d2972 Author: Marc Zyngier Date: Tue Apr 13 15:35:40 2021 +0100 Merge branch 'kvm-arm64/memslot-fixes' into kvmarm-master/next Signed-off-by: Marc Zyngier commit ac5ce2456e3e68c8ab6f03be2c2af832ec0f99b5 Merge: fbb31e5f3ace5 b1306fef1f48c Author: Marc Zyngier Date: Tue Apr 13 15:35:09 2021 +0100 Merge branch 'kvm-arm64/host-stage2' into kvmarm-master/next Signed-off-by: Marc Zyngier commit fbb31e5f3ace5386aa13236be77d1b4d481c8c89 Merge: 53648ed3f0859 96f4f6809beec Author: Marc Zyngier Date: Tue Apr 13 15:34:15 2021 +0100 Merge branch 'kvm-arm64/debug-5.13' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 94ac0835391efc1a30feda6fc908913ec012951e Author: Eric Auger Date: Mon Apr 12 17:00:34 2021 +0200 KVM: arm/arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST read When reading the base address of the a REDIST region through KVM_VGIC_V3_ADDR_TYPE_REDIST we expect the redistributor region list to be populated with a single element. However list_first_entry() expects the list to be non empty. Instead we should use list_first_entry_or_null which effectively returns NULL if the list is empty. Fixes: dbd9733ab674 ("KVM: arm/arm64: Replace the single rdist region by a list") Cc: # v4.18+ Signed-off-by: Eric Auger Reported-by: Gavin Shan Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210412150034.29185-1-eric.auger@redhat.com commit 7b24dacf0840056f9c51107eddc5bd7efbd20133 Author: Trond Myklebust Date: Fri Apr 9 09:30:21 2021 -0400 NFS: Another inode revalidation improvement If we're trying to update the inode because a previous update left the cache in a partially unrevalidated state, then allow the update if the change attrs match. Signed-off-by: Trond Myklebust commit 6f9be83d07615e6af8838a1d489080b399f42a08 Author: Trond Myklebust Date: Fri Mar 26 11:01:19 2021 -0400 NFS: Use information about the change attribute to optimise updates If the NFSv4.2 server supports the 'change_attr_type' attribute, then allow the client to optimise its attribute cache update strategy. Signed-off-by: Trond Myklebust commit 7f08a3359a3c1e39c2a118fbbe583d8c8db14ace Author: Trond Myklebust Date: Fri Mar 26 09:50:19 2021 -0400 NFSv4: Add support for the NFSv4.2 "change_attr_type" attribute The change_attr_type allows the server to provide a description of how the change attribute will behave. This again will allow the client to optimise its behaviour w.r.t. attribute revalidation. Signed-off-by: Trond Myklebust commit 993e2d4bd9efc41f0943de39e9374ffdfde62e87 Author: Trond Myklebust Date: Mon Apr 12 12:15:50 2021 -0400 NFSv4: Don't modify the change attribute cached in the inode When the client is caching data and a write delegation is held, then the server may send a CB_GETATTR to query the attributes. When this happens, the client is supposed to bump the change attribute value that it returns if it holds cached data. However that process uses a value that is stored in the delegation. We do not want to bump the change attribute held in the inode. Signed-off-by: Trond Myklebust commit 57a789a1dee39e1625956d7dea4f7637f9160f21 Author: Trond Myklebust Date: Fri Mar 26 10:17:25 2021 -0400 NFSv4: Fix value of decode_fsinfo_maxsz At least two extra fields have been added to fsinfo since this was last updated. Signed-off-by: Trond Myklebust commit 04c63498b6d4ea445cd2cb02599467b48687244b Author: Trond Myklebust Date: Thu Mar 25 18:13:36 2021 -0400 NFS: Simplify cache consistency in nfs_check_inode_attributes() We should not be invalidating the access or acl caches in nfs_check_inode_attributes(), since the point is we're unsure about whether the contents of the struct nfs_fattr are fully up to date. Signed-off-by: Trond Myklebust commit c88c696c59f5775d8781d632f7d10823563027eb Author: Trond Myklebust Date: Thu Mar 25 14:53:48 2021 -0400 NFS: Remove a line of code that has no effect in nfs_update_inode() Commit 0b467264d0db ("NFS: Fix attribute revalidation") changed the way we populate the 'invalid' attribute, and made the line that strips away the NFS_INO_INVALID_ATTR bits redundant. Signed-off-by: Trond Myklebust commit 709fa5769914b377af87962bbe4ff81ffb019b2d Author: Trond Myklebust Date: Thu Mar 25 14:51:36 2021 -0400 NFS: Fix up handling of outstanding layoutcommit in nfs_update_inode() If there is an outstanding layoutcommit, then the list of attributes whose values are expected to change is not the full set. So let's be explicit about the full list. Signed-off-by: Trond Myklebust commit e7b07d3e00dc8547be43467a63c4d1e7823b640c Author: Andy Shevchenko Date: Tue Apr 13 02:20:52 2021 +0300 ACPI: utils: Capitalize abbreviations in the comments The DSDT and ACPI should be capitalized. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 81eeb2f57782d0dff15db97665599121e289b614 Author: Andy Shevchenko Date: Tue Apr 13 02:20:51 2021 +0300 ACPI: utils: Document for_each_acpi_dev_match() macro The macro requires to call acpi_dev_put() on each iteration. Due to this it doesn't tolerate sudden disappearence of the devices. Document all these nuances to prevent users blindly call it without understanding the possible issues. While at it, add the note to the acpi_dev_get_next_match_dev() and advertise acpi_dev_put() instead of put_device() in the whole family of the helper functions. Fixes: bf263f64e804 ("media: ACPI / bus: Add acpi_dev_get_next_match_dev() and helper macro") Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 720869eb19f3161980d6d4631d3df7e8c5355993 Author: Trond Myklebust Date: Tue Apr 13 09:41:16 2021 -0400 NFS: Separate tracking of file mode cache validity from the uid/gid chown()/chgrp() and chmod() are separate operations, and in addition, there are mode operations that are performed automatically by the server. So let's track mode validity separately from the file ownership validity. Signed-off-by: Trond Myklebust commit 4cbaba4e3e4a8a00ed90193ae519c52ba01ea756 Author: Andy Shevchenko Date: Tue Apr 13 01:23:58 2021 +0300 ACPI: bus: Introduce acpi_dev_get() and reuse it in ACPI code Introduce acpi_dev_get() to have a symmetrical API with acpi_dev_put() and reuse both in ACPI code in drivers/acpi/. While at it, use acpi_bus_put_acpi_device() in one place instead of the above. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit cdf20c3ef0e90b962e62ae7d835d7f46333285bc Author: Christophe JAILLET Date: Sun Apr 11 14:57:13 2021 +0200 ASoC: cs35l36: Fix an error handling path in 'cs35l36_i2c_probe()' If 'devm_regmap_init_i2c()' fails, there is no need to goto err. We should return directly as already done by the surrounding error handling paths. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/9fec48e75bc1d3c92626e6f6aca2344bda223379.1618145790.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 38c694e98f6a6c8dfa48f2ba6f442363ed836efb Author: Christophe JAILLET Date: Sun Apr 11 14:51:06 2021 +0200 ASoC: cs35l35: Fix an error handling path in 'cs35l35_i2c_probe()' If 'devm_regmap_init_i2c()' fails, there is no need to goto err. We should return directly as already done by the surrounding error handling paths. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/15720439769ba94ffb65c90217392b0758b08f61.1618145369.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown commit 637251bcfe649cd0cff4bc60cfb29ae0ddf333ca Merge: 462c47c2fcc26 fcfd763bef4ff Author: Mark Brown Date: Tue Apr 13 14:11:53 2021 +0100 Merge series "ASoC: simple-card-utils: prepare for multi support" from Kuninori Morimoto : Hi Mark This patch-set is for v2 of Multi-CPU/Codec support, and some cleanups. v1 had patch-conflict on simple-card / audio-graph with below. v2 was solved it. fa74c223b6fd78a5314b4c61b9abdbed3c2185b4 ("ASoC: simple-card: fix possible uninitialized single_cpu local variable") I want to add new audio-graph-card2 driver which can support not only DPCM, but also Multi-CPU/Codec, and Codec2Codec. And it is also supporting audio-graph-card2 base custom driver. But before supporting such driver, we need to cleanup existing simple-card / audio-graph, because these and new driver are sharing code. Link: https://lore.kernel.org/r/87wntmod33.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/20210408141639.GA39604@sirena.org.uk Kuninori Morimoto (12): ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing ASoC: simple-card-utils: remove li->dais/li->conf ASoC: simple-card-utils: use for_each_prop_xxx() ASoC: simple-card-utils: remove asoc_simple_parse_xxx() ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference() ASoC: simple-card-utils: indicate dai_fmt if exist ASoC: simple-card-utils: indicate missing CPU/Codec numbers for debug ASoC: simple-card-utils: add simple_props_to_xxx() macro ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform() ASoC: simple-card-utils: tidyup debug info for clock ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line ASoC: simple-card-utils: tidyup asoc_simple_parse_convert() include/sound/simple_card_utils.h | 107 ++++++++++------ sound/soc/generic/audio-graph-card.c | 64 ++++------ sound/soc/generic/simple-card-utils.c | 174 ++++++++++++++++---------- sound/soc/generic/simple-card.c | 70 ++++------- 4 files changed, 226 insertions(+), 189 deletions(-) -- 2.25.1 commit fabf2b341502e894001d70f91309dd6f3785e2dc Author: Trond Myklebust Date: Thu Mar 25 13:14:42 2021 -0400 NFS: Separate tracking of file nlinks cache validity from the mode/uid/gid Rename can cause us to revalidate the access cache, so lets track the nlinks separately from the mode/uid/gid. Signed-off-by: Trond Myklebust commit a71029b86752e8d40301af235a6bbf4896cc1402 Author: Trond Myklebust Date: Sat Apr 10 00:23:03 2021 -0400 NFSv4: Fix nfs4_bitmap_copy_adjust() Don't remove flags from the set retrieved from the cache_validity. We do want to retrieve all attributes that are listed as being invalid, whether or not there is a delegation set. Signed-off-by: Trond Myklebust commit d5c1d60697a5f591bf717fd84d077585f0bff778 Author: Bixuan Cui Date: Sat Apr 10 11:50:44 2021 +0800 i2c: sprd: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Reviewed-by: Baolin Wang Signed-off-by: Wolfram Sang commit 168b84d5d2c07ae6c96ea40a7f420b5b525defa0 Author: Paul Burton Date: Sat Feb 9 19:47:36 2019 +0000 MIPS: Fix access_ok() for the last byte of user space The MIPS implementation of access_ok() incorrectly reports that access to the final byte of user memory is not OK, much as the alpha & SH versions did prior to commit 94bd8a05cd4d ("Fix 'acccess_ok()' on alpha and SH"). For example on a MIPS64 system with __UA_LIMIT == 0xffff000000000000 we incorrectly fail in the following cases: access_ok(0xffffffffffff, 0x1) = 0 access_ok(0xfffffffffffe, 0x2) = 0 Fix MIPS in the same way as alpha & SH, by subtracting one from the addr + size condition when size is non-zero. With this the access_ok() calls above return 1 indicating that the access may be valid. The cost of the improved check is pretty minimal - we gain 2410 bytes, or 0.03%, in kernel code size for a 64r6el_defconfig kernel built using GCC 8.1.0. Signed-off-by: Paul Burton Reported-by: Linus Torvalds Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit e8bbc3497e63a887231f88b58e7aeb56906dc1c4 Author: Chris Packham Date: Tue Apr 13 17:09:56 2021 +1200 MAINTAINERS: Add Chris Packham as FREESCALE MPC I2C maintainer Add Chris Packham as FREESCALE MPC I2C maintainer. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 270282bdf4e5a2484e1244db67e3743cefca6d8f Author: Chris Packham Date: Tue Apr 13 17:09:54 2021 +1200 i2c: mpc: Remove redundant NULL check In mpc_i2c_get_fdr_8xxx div is assigned as we iterate through the mpc_i2c_dividers_8xxx array. By the time we exit the loop div will either have the value that matches the requested speed or be pointing at the last entry in mpc_i2c_dividers_8xxx. Checking for div being NULL after the loop is redundant so remove the check. Reported-by: Wolfram Sang Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 4aa3e48d2e09424449b2e0f2d5581388ba9e261b Author: Wei Yongjun Date: Mon Apr 12 16:00:26 2021 +0000 i2c: mpc: drop release for resource allocated with devm_* It's not necessary to release resource which allocated with devm_* and those release may leads to a double free. And also remove useless irq_dispose_mapping() call since mapping not created. Fixes: 09aab7add7bf ("i2c: mpc: use device managed APIs") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Chris Packham Signed-off-by: Wolfram Sang commit ef9c5d09797db874a29a97407c3ea3990210432b Author: Mark Brown Date: Mon Apr 12 18:23:20 2021 +0100 arm64/sve: Remove redundant system_supports_sve() tests Currently there are a number of places in the SVE code where we check both system_supports_sve() and TIF_SVE. This is a bit redundant given that we should never get into a situation where we have set TIF_SVE without having SVE support and it is not clear that silently ignoring a mistakenly set TIF_SVE flag is the most sensible error handling approach. For now let's just drop the system_supports_sve() checks since this will at least reduce overhead a little. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210412172320.3315-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit 78ed0a9bc6db76f8e5f5f4cb0d2b2f0d1bb21b24 Author: Roi Dayan Date: Tue Apr 13 11:06:05 2021 +0300 netfilter: flowtable: Add FLOW_OFFLOAD_XMIT_UNSPEC xmit type It could be xmit type was not set and would default to FLOW_OFFLOAD_XMIT_NEIGH and in this type the gc expect to have a route info. Fix that by adding FLOW_OFFLOAD_XMIT_UNSPEC which defaults to 0. Fixes: 8b9229d15877 ("netfilter: flowtable: dst_check() from garbage collector path") Signed-off-by: Roi Dayan Signed-off-by: Pablo Neira Ayuso commit 462c47c2fcc26d838c82646a31d6e3e8fc01ce68 Author: Chen Lifu Date: Fri Apr 9 09:59:53 2021 +0800 ASoC: sti: sti_uniperif: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Chen Lifu Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210409015953.259688-1-chenlifu@huawei.com Signed-off-by: Mark Brown commit fcfd763bef4ff7f6371790979a6ceac9c4ac425a Author: Kuninori Morimoto Date: Mon Apr 12 08:53:00 2021 +0900 ASoC: simple-card-utils: tidyup asoc_simple_parse_convert() dev is not used. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eefgwf8j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 3919249e80995ed5f125f94d05fcb6171f79e732 Author: Kuninori Morimoto Date: Mon Apr 12 08:52:55 2021 +0900 ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line We can use 100 char now for 1 line. This patch tidyup unreadable dev_dbg() message. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87fszwwf8o.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 33cd6b191f1cdb5f332717a80ce26f661f53e924 Author: Kuninori Morimoto Date: Mon Apr 12 08:52:50 2021 +0900 ASoC: simple-card-utils: tidyup debug info for clock simple-card / audio-graph can use clock as dai->clk or dai->sysclk. These related information should be indicated at same position. This patch tidyup it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7kcwf8t.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c826ec0391c83f06354a4ebb25c7b2480c18f33a Author: Kuninori Morimoto Date: Mon Apr 12 08:52:45 2021 +0900 ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform() Current asoc_simple_canonicalize_cpu/platform() is assuming single CPU, single Platform, but we want to support Multi support. This patch is prepare for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87im4swf8y.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9830d3e99f51fc1c1c6ab8be7778fd205af198ad Author: Kuninori Morimoto Date: Mon Apr 12 08:52:32 2021 +0900 ASoC: simple-card-utils: add simple_props_to_xxx() macro We shouldn't use dai_props->cpus/codecs/cpu_dai/codec_dai/codec_conf directly, because these are array to supporting multi CPU/Codec/Platform. This patch adds asoc_link_to_xxx() macro for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0p8wf9b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 40d8cbe70e71be170e0a4fe6ab112d9aaa9cfb18 Author: Kuninori Morimoto Date: Mon Apr 12 08:52:27 2021 +0900 ASoC: simple-card-utils: indicate missing CPU/Codec numbers for debug Now ALSA is supporting multi-CPU/Codec, thus, we want to know number of CPU/Codec when debugging. This patch indicates it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lf9owf9g.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit ac813c625ad5c3ee98a99e1b37659a0d85178978 Author: Kuninori Morimoto Date: Mon Apr 12 08:52:23 2021 +0900 ASoC: simple-card-utils: indicate dai_fmt if exist link->dai_fmt might be 0. Don't indicate it in such case when debugging. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mtu4wf9k.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1cf6805700ecf25942468a01eff902ab8c32ce3c Author: Kuninori Morimoto Date: Mon Apr 12 08:52:18 2021 +0900 ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference() ASoC is now supporting multi DAI, but, current simple-card / audio-graph are assuming fixed single DAI. This patch cares multi DAI at asoc_simple_clean_reference() for of_node_put(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8ekwf9p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e25704f84ca2b586e8e65d1b2ab686205b3076fe Author: Kuninori Morimoto Date: Mon Apr 12 08:52:13 2021 +0900 ASoC: simple-card-utils: remove asoc_simple_parse_xxx() ASoC is now supporting multi DAI, but, current simple-card / audio-graph are assuming fixed single DAI. Now, asoc_simple_parse_xxx() macro is assuming single DAI. To support multi-CPU/Codec, this patch unpack asoc_simple_parse_xxx() macro, and uses "&dai_link->cpus[i]" instead of "dai_link->cpus". Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pmz0wf9u.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit fafc05aadd4b6ce5c161135de9d3a653fc054543 Author: Kuninori Morimoto Date: Mon Apr 12 08:52:09 2021 +0900 ASoC: simple-card-utils: use for_each_prop_xxx() ASoC is now supporting multi DAI, but, current simple-card / audio-graph are assuming fixed single DAI. This patch uses for_each_prop_xxx() to support multi DAI. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r1jgwf9y.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f899006d558546a8ee39c93f816eb3847c5bc6c0 Author: Kuninori Morimoto Date: Mon Apr 12 08:52:04 2021 +0900 ASoC: simple-card-utils: remove li->dais/li->conf li->dais is same as number of CPU + Codec, li->conf is same as number of Codec when dummy-Codec. li->dais/li->conf are no longer needed. This patch removes these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sg3wwfa3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 59f5cd96e9b9e1025ab0a9dc4ce9dd8633190794 Author: Kuninori Morimoto Date: Mon Apr 12 08:51:59 2021 +0900 ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing We couldn't setup dai_props cpu_dai/codec_dai at the initial timing, because "counting DAIs loop" and "detecting DAIs loop" were different. But we can do it now, because these are using same loops. This patch setups dai_props cpu_dai/codec_dai at the initial timing. It can removes triky code from simple-card / audio-graph. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tuocwfa8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 858066864a6383d1eecd2fa96a0b8e69935632f8 Author: Jerome Brunet Date: Mon Apr 12 15:22:56 2021 +0200 ASoC: meson: axg-frddr: fix fifo depth on g12 and sm1 Previous fifo depth patch was only tested on axg, not g12 or sm1. Of course, while adding hw_params dai callback for the axg, I forgot to do the same for g12 and sm1, leaving the depth unset and breaking playback on these SoCs. Add hw_params callback to the g12 dai_ops to fix the problem. Fixes: 6f68accaa864 ("ASoC: meson: axg-frddr: set fifo depth according to the period") Reported-by: Christian Hewitt Tested-by: Christian Hewitt Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210412132256.89920-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit cbe6fc4e01421c890d74422cdd04c6b1c8f62dda Author: Tian Tao Date: Tue Apr 13 09:58:23 2021 +0800 fs/locks: remove useless assignment in fcntl_getlk Function parameter 'cmd' is rewritten with unused value at locks.c Signed-off-by: Tian Tao Signed-off-by: Jeff Layton commit 9b1a4d0f914b1186248fc88b1cb6ee49e336a2b2 Author: Florian Westphal Date: Mon Apr 12 21:55:44 2021 +0200 netfilter: conntrack: convert sysctls to u8 log_invalid sysctl allows values of 0 to 255 inclusive so we no longer need a range check: the min/max values can be removed. This also removes all member variables that were moved to net_generic data in previous patches. This reduces size of netns_ct struct by one cache line. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit c53bd0e96662c2f77109e08a9889c9e1ee86c52d Author: Florian Westphal Date: Mon Apr 12 21:55:43 2021 +0200 netfilter: conntrack: move ct counter to net_generic data Its only needed from slowpath (sysctl, ctnetlink, gc worker) and when a new conntrack object is allocated. Furthermore, each write dirties the otherwise read-mostly pernet data in struct net.ct, which are accessed from packet path. Move it to the net_generic data. This makes struct netns_ct read-mostly. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f6f2e580d5f7152fb5ab11232edecb7fbeca3759 Author: Florian Westphal Date: Mon Apr 12 21:55:42 2021 +0200 netfilter: conntrack: move expect counter to net_generic data Creation of a new conntrack entry isn't a frequent operation (compared to 'ct entry already exists'). Creation of a new entry that is also an expected (related) connection even less so. Place this counter in net_generic data. A followup patch will also move the conntrack count -- this will make netns_ct a read-mostly structure. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 67f28216ca04b9ba965cd652fea08f670b99a0c6 Author: Florian Westphal Date: Mon Apr 12 21:55:41 2021 +0200 netfilter: conntrack: move autoassign_helper sysctl to net_generic data While at it, make it an u8, no need to use an integer for a boolean. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 098b5d3565e2391ca260964807e7324d489dd10b Author: Florian Westphal Date: Mon Apr 12 21:55:40 2021 +0200 netfilter: conntrack: move autoassign warning member to net_generic data Not accessed in fast path, place this is generic_net data instead. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit efce49dfe6a8ec491759ad9eaa85fadbf26654c5 Author: wenxu Date: Sat Apr 3 21:59:43 2021 +0800 netfilter: flowtable: add vlan pop action offload support This patch adds vlan pop action offload in the flowtable offload. Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 3e1b0c168f6c8648f217c78ed6a4135af8c9d830 Author: wenxu Date: Sat Apr 3 21:59:42 2021 +0800 netfilter: flowtable: add vlan match offload support This patch adds support for vlan_id, vlan_priority and vlan_proto match for flowtable offload. Signed-off-by: wenxu Signed-off-by: Pablo Neira Ayuso commit 87db343f809d611405c45cbb691657e7df5c047d Author: Qiheng Lin Date: Wed Mar 31 16:59:38 2021 +0800 PCI: mediatek: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Link: https://lore.kernel.org/r/20210331085938.3115-1-linqiheng@huawei.com Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Signed-off-by: Lorenzo Pieralisi commit acaef7981a218813e3617edb9c01837808de063c Author: Yang Yingliang Date: Wed Mar 31 16:40:12 2021 +0800 PCI: endpoint: Fix missing destroy_workqueue() Add the missing destroy_workqueue() before return from pci_epf_test_init() in the error handling case and add destroy_workqueue() in pci_epf_test_exit(). Link: https://lore.kernel.org/r/20210331084012.2091010-1-yangyingliang@huawei.com Fixes: 349e7a85b25fa ("PCI: endpoint: functions: Add an EP function to test PCI") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Lorenzo Pieralisi commit 80c253bd7ffbb40ae550c8ae5bed9126b8f99f96 Author: Colin Ian King Date: Fri Mar 26 19:09:09 2021 +0000 PCI: endpoint: Remove redundant initialization of pointer dev The pointer dev 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/20210326190909.622369-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński commit cd951b3971cdc1f8c76b075f2c97ff357bf141e2 Merge: c103b850721e4 cbb8f989d5a07 Author: Daniel Vetter Date: Tue Apr 13 12:25:16 2021 +0200 Merge tag 'amd-drm-next-5.13-2021-04-12' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.13-2021-04-12: amdgpu: - Re-enable GPU reset on VanGogh - Enable DPM flags for SMART_SUSPEND and MAY_SKIP_RESUME - Disentangle HG from vga_switcheroo - S0ix fixes - W=1 fixes - Resource iterator fixes - DMCUB updates - UBSAN fixes - More PM API cleanup - Aldebaran updates - Modifier fixes - Enable VCN load balancing with asymmetric engines - Rework BO structs - Aldebaran reset support - Initial LTTPR display work - Display MALL fixes - Fall back to YCbCr420 when YCbCr444 fails - SR-IOV fixes - RAS updates - Misc cleanups and fixes radeon: - Typo fixes - Fix error handling for firmware on r6xx - Fix a missing check in DP MST handling Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210412220732.3845-1-alexander.deucher@amd.com commit 401411bbc4e62bcbcc020c2c458ecb90843140a8 Author: Artur Petrosyan Date: Tue Apr 13 11:37:30 2021 +0400 usb: dwc2: Add exit clock gating before removing driver When dwc2 core is in clock gating mode loading driver again causes driver fail. Because in that mode registers are not accessible. Added a flow of exiting clock gating mode to avoid the driver reload failure. Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073731.3C81BA022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit ef5e0eec476426791d3d5e74fa96b2a30076922d Author: Artur Petrosyan Date: Tue Apr 13 11:37:22 2021 +0400 usb: dwc2: Add clock gating exiting flow by system resume If not hibernation nor partial power down are supported, port resume is done using the clock gating programming flow. Adds a new flow of exiting clock gating when PC is resumed. Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073723.BA0FEA022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 50fb0c128b6e8df62200ba85c05ecd6b1396476d Author: Artur Petrosyan Date: Tue Apr 13 11:37:15 2021 +0400 usb: dwc2: Add clock gating entering flow by system suspend If not hibernation nor partial power down are supported, clock gating is used to save power. Adds a new flow of entering clock gating when PC is suspended. Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073716.30C13A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 16c729f90bdf30577450704ac93fa8309f4fd35a Author: Artur Petrosyan Date: Tue Apr 13 11:37:07 2021 +0400 usb: dwc2: Allow exit clock gating in urb enqueue When core is in clock gating state and an external hub is connected, upper layer sends URB enqueue request, which results in port reset issue. Added exit from clock gating state to avoid port reset issue and process upper layer request properly. Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073708.ADFC6A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 3cf8143e47a9d49ad0ab4aedf18b5693cab7d1f5 Author: Artur Petrosyan Date: Tue Apr 13 11:37:00 2021 +0400 usb: dwc2: Update exit clock gating when port is resumed Updates the implementation of exiting clock gating mode when core receives port resume. Instead of setting the required bit fields of the registers inline, called the "dwc2_host_exit_clock_gating()" function. Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073701.367E0A022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit d37b939cf41f6a211d6c5611915c5dd4552cd935 Author: Artur Petrosyan Date: Tue Apr 13 11:36:52 2021 +0400 usb: dwc2: Update enter clock gating when port is suspended Updates the implementation of entering clock gating mode when core receives port suspend. Instead of setting the required bit fields of the registers inline, called the "dwc2_host_enter_clock_gating()" function. Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073653.9F493A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 5f9e60c06175c3525c2f7ae1d6807f7d6c61efe3 Author: Artur Petrosyan Date: Tue Apr 13 11:36:45 2021 +0400 usb: dwc2: Add exit clock gating when port reset is asserted Adds clock gating exit flow when set port feature reset is received in suspended state. Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073646.27217A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 9b4965d77e115b550a5612dce3987a4ca69f86bc Author: Artur Petrosyan Date: Tue Apr 13 11:36:37 2021 +0400 usb: dwc2: Add exit clock gating from session request interrupt Added clock gating exit flow from session request interrupt handler according programming guide. Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073638.921E8A0099@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 5d240efddc7f02e1454ed2fd8caf57b891e23b55 Author: Artur Petrosyan Date: Tue Apr 13 11:36:30 2021 +0400 usb: dwc2: Add exit clock gating from wakeup interrupt Added exit from clock gating mode when wakeup interrupt is detected. To exit from the clock gating in device mode "dwc2_gadget_exit_clock_gating()" function is used with rem_wakeup parameter 0. To exit clock gating in host mode "dwc2_host_exit_clock_gating()" with rem_wakeup parameter 1. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073630.EF2CEA0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit cbe1e903e5ab690c34510ab98df749ce6377ad5f Author: Artur Petrosyan Date: Tue Apr 13 11:36:22 2021 +0400 usb: dwc2: Allow entering clock gating from USB_SUSPEND interrupt If core doesn't support hibernation or partial power down power saving options, power can still be saved using clock gating on all the clocks. - Added entering clock gating state from USB_SUSPEND interrupt. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073623.65355A022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 79c87c3c3721341dda12e1d70b6a086fae797197 Author: Artur Petrosyan Date: Tue Apr 13 11:36:14 2021 +0400 usb: dwc2: Add host clock gating support functions Added host clock gating support functions according programming guide. Added function names: dwc2_host_enter_clock_gating() dwc2_host_exit_clock_gating() Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073615.B3E84A022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 012466fc8ccc013f9a3320428043e096dc581b36 Author: Artur Petrosyan Date: Tue Apr 13 11:36:07 2021 +0400 usb: dwc2: Add device clock gating support functions Added device clock gating support functions according programming guide. Moved "bus_suspended" flag to "dwc2_hsotg" struct because we need to set that flag while entering to clock gating in case when the driver is built in peripheral mode. Added function names: dwc2_gadget_enter_clock_gating() dwc2_gadget_exit_clock_gating() Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210413073607.F41E8A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 5367f82a212305c35b35303a8a21ca348f653ca3 Merge: 9bc46a12c53d8 6f3badead6a07 Author: Greg Kroah-Hartman Date: Tue Apr 13 12:17:14 2021 +0200 Merge tag 'thunderbolt-for-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-next Mika writes: thunderbolt: Changes for v5.13 merge window This includes following Thunderbolt/USB4 changes for v5.13 merge window: * Debugfs improvements * Align the inter-domain (peer-to-peer) support with the USB4 inter-domain spec for better interoperability * Add support for USB4 DROM and the new product descriptor * More KUnit tests * Detailed uevent for routers * Few miscellaneous improvements All these have been in linux-next without reported issues. * tag 'thunderbolt-for-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: (24 commits) thunderbolt: Hide authorized attribute if router does not support PCIe tunnels thunderbolt: Add details to router uevent thunderbolt: Unlock on error path in tb_domain_add() thunderbolt: Add support for USB4 DROM thunderbolt: Check quirks in tb_switch_add() thunderbolt: Add KUnit tests for DMA tunnels thunderbolt: Add KUnit tests for XDomain properties net: thunderbolt: Align the driver to the USB4 networking spec thunderbolt: Allow multiple DMA tunnels over a single XDomain connection thunderbolt: Drop unused tb_port_set_initial_credits() thunderbolt: Use dedicated flow control for DMA tunnels thunderbolt: Add support for maxhopid XDomain property thunderbolt: Add tb_property_copy_dir() thunderbolt: Align XDomain protocol timeouts with the spec thunderbolt: Use pseudo-random number as initial property block generation thunderbolt: Do not re-establish XDomain DMA paths automatically thunderbolt: Add more logging to XDomain connections Documentation / thunderbolt: Drop speed/lanes entries for XDomain thunderbolt: Decrease control channel timeout for software connection manager thunderbolt: Do not pass timeout for tb_cfg_reset() ... commit d2e8f641257d0d3af6e45d6ac2d6f9d56b8ea964 Author: Takashi Iwai Date: Tue Apr 13 10:41:52 2021 +0200 ALSA: usb-audio: Explicitly set up the clock selector In the current code, we have some assumption that the audio clock selector has been set up implicitly and don't want to touch it unless it's really needed for the fallback autoclock setup. This works for most devices but some seem having a problem. Partially this was covered for the devices with a single connector at the initialization phase (commit 086b957cc17f "ALSA: usb-audio: Skip the clock selector inquiry for single connections"), but also there are cases where the wrong clock set up is kept silently. The latter seems to be the cause of the noises on Behringer devices. In this patch, we explicitly set up the audio clock selector whenever the appropriate node is found. Reported-by: Geraldo Nascimento BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199327 Link: https://lore.kernel.org/r/CAEsQvcvF7LnO8PxyyCxuRCx=7jNeSCvFAd-+dE0g_rd1rOxxdw@mail.gmail.com Cc: Link: https://lore.kernel.org/r/20210413084152.32325-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 41c39cfc841d3ed0d302edd2a539d752a13fa06e Merge: 5418db1f6ee3d 242b0b398ccd3 Author: Arnd Bergmann Date: Tue Apr 13 11:06:03 2021 +0200 Merge tag 'soc-fsl-next-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux into arm/drivers NXP/FSL SoC driver updates for v5.13 - Add ACPI support for RCPM driver - Use generic io{read,write} for QE drivers after performance optimized for PowerPC - Fix QBMAN probe to cleanup HW states correctly for kexec - Various cleanup and style fix for QBMAN/QE/GUTS drivers * tag 'soc-fsl-next-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/leo/linux: soc: fsl: enable acpi support in RCPM driver Revert "soc: fsl: qe: introduce qe_io{read,write}* wrappers" tty: serial: ucc_uart: replace qe_io{read,write}* wrappers by generic io{read,write}* soc: fsl: qe: replace qe_io{read,write}* wrappers by generic io{read,write}* soc: fsl: guts: fix comment syntax in file soc: fsl: guts: remove unneeded semicolon soc: fsl: qe: Use DEFINE_SPINLOCK() for spinlock soc: fsl: qbman: Delete useless kfree code soc: fsl: qbman: Ensure device cleanup is run for kexec Link: https://lore.kernel.org/r/20210409205719.27927-1-leoyang.li@nxp.com Signed-off-by: Arnd Bergmann commit 5418db1f6ee3d876945f280d19a23fa3bcb8d8c5 Merge: 30be8446db39b 79bfe480a0a0b Author: Arnd Bergmann Date: Tue Apr 13 10:59:45 2021 +0200 Merge tag 'zynqmp-soc-for-v5.13' of https://github.com/Xilinx/linux-xlnx into arm/drivers arm64: soc: ZynqMP SoC changes for v5.13 - Fix firmware removal path - Cleanup eemi doc and *ops() * tag 'zynqmp-soc-for-v5.13' of https://github.com/Xilinx/linux-xlnx: firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE) firmware: xilinx: Fix dereferencing freed memory Link: https://lore.kernel.org/r/a44f8e9f-cea7-57ef-c3bc-10f5f5e064fc@monstr.eu Signed-off-by: Arnd Bergmann commit 40bb91338a60affd2f05a9b8d9d18dbf0e6f9593 Merge: f00a99a7a5d06 73d677e9f3799 Author: Arnd Bergmann Date: Tue Apr 13 10:56:58 2021 +0200 Merge tag 'zynqmp-dt-for-v5.13' of https://github.com/Xilinx/linux-xlnx into arm/dt arm64: dts: ZynqMP DT changes for v5.13 - Add power-domains for DP - Remove si5328 node without compatible string * tag 'zynqmp-dt-for-v5.13' of https://github.com/Xilinx/linux-xlnx: arm64: dts: zynqmp: Remove si5328 device nodes arm64: dts: zynqmp: Add power domain for the DisplayPort DMA controller Link: https://lore.kernel.org/r/e422fa9c-3e58-28b4-f6f0-65aa44254131@xilinx.com Signed-off-by: Arnd Bergmann commit f00a99a7a5d066061df21bdce1f2adfd84eb4c2b Merge: 91f059a0fc238 5dcbe7e3862df Author: Arnd Bergmann Date: Tue Apr 13 10:55:19 2021 +0200 Merge tag 'v5.13-rockchip-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt New board the NanoPi R4S, OPP adjustments on rk3399 (sync with vendor and using ranged values to allow better compatibility with regulator steps), gpu opps on px30, infrared receiver on rockpro64, USB3 support on rk3328, MMC alias fixups, dt-compatible fixes. * tag 'v5.13-rockchip-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: arm64: dts: rockchip: move mmc aliases to board dts on rk3399 arm64: dts: rockchip: move mmc aliases to board dts on rk3368 arm64: dts: rockchip: move mmc aliases to board dts on rk3328 arm64: dts: rockchip: move mmc aliases to board dts on rk3308 arm64: dts: rockchip: move mmc aliases to board dts on px30 arm64: dts: rockchip: add new watchdog compatible to rk3399.dtsi arm64: dts: rockchip: add new watchdog compatible to rk3328.dtsi arm64: dts: rockchip: add new watchdog compatible to rk3308.dtsi arm64: dts: rockchip: add new watchdog compatible to px30.dtsi arm64: dts: rockchip: enable dwc3 usb for A95X Z2 arm64: dts: rockchip: add rk3328 dwc3 usb controller node rockchip: rk3399: Add support for FriendlyARM NanoPi R4S dt-bindings: Add doc for FriendlyARM NanoPi R4S arm64: dts: rockchip: add phandle to timer0 on rk3368 arm64: dts: rockchip: add infrared receiver node to rockpro64 arm64: dts: rockchip: drop separate opp table on rk3399-puma arm64: dts: rockchip: used range'd gpu opps on rk3399 arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel arm64: dts: rockchip: Add gpu opp nodes to px30 dtsi Link: https://lore.kernel.org/r/2191862.ElGaqSPkdT@phil Signed-off-by: Arnd Bergmann commit 91f059a0fc238a11acd9af062c22e000f4656ded Merge: e4379d649e0e5 e89db2b4c706b Author: Arnd Bergmann Date: Tue Apr 13 10:54:16 2021 +0200 Merge tag 'v5.13-rockchip-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/dt MMC aliases fixups and some property/compatible cleanups. * tag 'v5.13-rockchip-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: move rv1108 mmcx aliases to board dts files ARM: dts: rockchip: move rk322x mmcx aliases to board dts files ARM: dts: rockchip: remove clock-names property from watchdog node in rv1108.dtsi ARM: dts: rockchip: add new watchdog compatible to rk322x.dtsi ARM: dts: rockchip: add new watchdog compatible to rv1108.dtsi Link: https://lore.kernel.org/r/4638723.31r3eYUQgx@phil Signed-off-by: Arnd Bergmann commit bd573ea5720470d1ea70f3e39fb2e2efad219311 Author: Marc Kleine-Budde Date: Mon Apr 5 14:44:15 2021 +0200 can: peak_usb: pcan_usb: replace open coded endianness conversion of unaligned data This patch replaces the open coded endianness conversion of unaligned data by the appropriate get/put_unaligned_leXX() variants. Link: https://lore.kernel.org/r/20210406111622.1874957-11-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit b7a29d35a9849e898232111ec083e382fb1adf25 Author: Marc Kleine-Budde Date: Mon Apr 5 19:52:19 2021 +0200 can: peak_usb: pcan_usb_get_serial(): unconditionally assign serial_number The function serial_number is only called from one location with a valid serial_number pointer. Remove not needed NULL pointer check. Link: https://lore.kernel.org/r/20210406111622.1874957-10-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit 0a7d6cdf90c0f10fd62b1b2d80fbaeb7e0172c13 Author: Marc Kleine-Budde Date: Mon Apr 5 13:49:45 2021 +0200 can: peak_usb: pcan_usb_get_serial(): make use of le32_to_cpup() This patch replaces the memcpy() + le32_to_cpu() by le32_to_cpup(). Link: https://lore.kernel.org/r/20210406111622.1874957-9-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit 5e164a4f0aaee1b604e920a8cf99878c06fe3f11 Author: Marc Kleine-Budde Date: Mon Apr 5 19:52:19 2021 +0200 can: peak_usb: pcan_usb_get_serial(): remove error message from error path The caller of pcan_usb_get_serial() already prints an error message, so remove this one and return immediately. Link: https://lore.kernel.org/r/20210406111622.1874957-8-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit 426718f3fe0e4315d36edf88f11748d118558acc Author: Marc Kleine-Budde Date: Mon Apr 5 13:49:45 2021 +0200 can: peak_usb: pcan_usb_{,pro}_get_device_id(): remove unneeded check for device_id The callback struct peak_usb_adapter::dev_get_device_id, which is implemented by the functions pcan_usb_{,pro}_get_device_id() is only ever called with a valid device_id pointer. This patch removes the unneeded check if the device_id pointer is valid. Link: https://lore.kernel.org/r/20210406111622.1874957-7-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit 592bf5a09d195e70652bed4187254c540e7cca9e Author: Marc Kleine-Budde Date: Mon Apr 5 12:34:56 2021 +0200 can: peak_usb: peak_usb_probe(): make use of driver_info There's no need to iterate over all supported adapters to find the struct peak_usb_adapter that describes the currently probed devices's capabilities. The driver core gives us the information for free, if we assign it to the struct usb_device_id::driver_info. This patch assigns the usb_device_id::driver_info and converts peak_usb_probe() to make use of it. This reduces the driver size by 100 bytes on ARCH=arm. | add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-124 (-124) | Function old new delta | peak_usb_adapters_list 24 - -24 | peak_usb_probe 236 136 -100 | Total: Before=25263, After=25139, chg -0.49% Link: https://lore.kernel.org/r/20210406111622.1874957-6-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit 1a5a5eedf80772ac0fb3f1ec443711c2eab030a5 Author: Marc Kleine-Budde Date: Sat Apr 3 14:10:25 2021 +0200 can: peak_usb: remove write only variable struct peak_usb_adapter::ts_period The variable struct peak_usb_adapter::ts_period is only ever written to. This patch removes it from the driver. Link: https://lore.kernel.org/r/20210406111622.1874957-5-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit c779e1271a9e2beb81bfd3cd36b45f4d26b13c95 Author: Marc Kleine-Budde Date: Mon Apr 5 15:05:28 2021 +0200 can: peak_usb: remove unused variables from struct peak_usb_device This patch removes the unused variables struct peak_usb_device::echo_skb and struct peak_usb_device::bus_load from the driver. Link: https://lore.kernel.org/r/20210406111622.1874957-4-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit fa34e0a18f8a24e87de66d7e3b32c50e9c1ce1d7 Author: Marc Kleine-Budde Date: Mon Apr 5 21:31:52 2021 +0200 can: peak_usb: pcan_usb_pro.h: remove double space in indention This patch replaces the double space indention after the u8 with a single space in pcan_usb_pro.h. Link: https://lore.kernel.org/r/20210406111622.1874957-3-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit bc256b95971f50ff5b88c6a9617c514bd72413bb Author: Marc Kleine-Budde Date: Mon Apr 5 12:34:56 2021 +0200 can: peak_usb: fix checkpatch warnings This patch cleans several checkpatch warnings in the peak_usb driver. Link: https://lore.kernel.org/r/20210406111622.1874957-2-mkl@pengutronix.de Acked-by: Stephane Grosjean Tested-by: Stephane Grosjean Signed-off-by: Marc Kleine-Budde commit c664e2137a27680922d8aeb64fb10313416b254f Author: Vincent Mailhol Date: Sat Apr 10 18:59:48 2021 +0900 can: etas_es58x: add support for the ETAS ES58X_FD CAN USB interfaces This patch add support for the ES582.1 and ES584.1 interfaces from ETAS GmbH (https://www.etas.com/en/products/es58x.php). Link: https://lore.kernel.org/r/20210410095948.233305-4-mailhol.vincent@wanadoo.fr Co-developed-by: Arunachalam Santhanam Signed-off-by: Arunachalam Santhanam Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 1dfb6005a60b13d18aacf190b853bf6f89d31820 Author: Vincent Mailhol Date: Sat Apr 10 18:59:47 2021 +0900 can: etas_es58x: add support for ETAS ES581.4 CAN USB interface This patch adds support for the ES581.4 interface from ETAS GmbH (https://www.etas.com/en/products/es58x.php). Link: https://lore.kernel.org/r/20210410095948.233305-3-mailhol.vincent@wanadoo.fr Co-developed-by: Arunachalam Santhanam Signed-off-by: Arunachalam Santhanam Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 8537257874e949a59c834cecfd5a063e11b64b0b Author: Vincent Mailhol Date: Sat Apr 10 18:59:46 2021 +0900 can: etas_es58x: add core support for ETAS ES58X CAN USB interfaces This patch adds the core support for various USB CAN interfaces from ETAS GmbH (https://www.etas.com/en/products/es58x.php). The next patches add the glue code drivers for the individual interfaces. Link: https://lore.kernel.org/r/20210410095948.233305-2-mailhol.vincent@wanadoo.fr Co-developed-by: Arunachalam Santhanam Signed-off-by: Arunachalam Santhanam Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit cfa00070a1a82fce8c0ad3327fad1f182d4c691f Author: Yoshihiro Shimoda Date: Fri Apr 9 09:00:20 2021 +0900 dt-bindings: net: can: rcar_can: Document r8a77961 support Document SoC specific bindings for R-Car M3-W+ (r8a77961) SoC. Also as R8A7796 is now called R8A77960 so that update those references. Link: https://lore.kernel.org/r/20210409000020.2317696-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Yoshihiro Shimoda Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Reviewed-by: Wolfram Sang Signed-off-by: Marc Kleine-Budde commit 572931972cb56f7b5d7b55fde959d62cd2fbdb11 Author: Thomas Weißschuh Date: Mon Apr 12 14:35:13 2021 +0200 platform/x86: add Gigabyte WMI temperature driver Tested with * X570 I Aorus Pro Wifi (rev 1.0) * B550M DS3H * B550 Gaming X V2 (rev.1.x) * Z390 I AORUS PRO WIFI (rev. 1.0) Those mainboards contain an ITE chips for management and monitoring. They could also be handled by drivers/hwmon/i87.c. But the SuperIO range used by i87 is already claimed and used by the firmware. The following warning is printed at boot: kernel: ACPI Warning: SystemIO range 0x0000000000000A45-0x0000000000000A46 conflicts with OpRegion 0x0000000000000A45-0x0000000000000A46 (\GSA1.SIO1) (20200528/utaddress-204) kernel: ACPI: This conflict may cause random problems and system instability kernel: ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver This driver implements such an ACPI driver. Unfortunately not all sensor registers are handled by the firmware and even less are exposed via WMI. Signed-off-by: Thomas Weißschuh Reviewed-by: Guenter Roeck Link: https://lore.kernel.org/r/20210412123513.628901-1-linux@weissschuh.net Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 07ff20cf172f31f0dfbc456662f20339767c69fd Author: Tian Tao Date: Tue Apr 13 08:53:03 2021 +0800 staging: fieldbus: simplify devm_anybuss_host_common_probe Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1618275183-56792-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit cc444aa522b18069eba204c9b5e3cf5a69de29a5 Author: Mitali Borkar Date: Tue Apr 13 08:55:41 2021 +0530 staging: rtl8192e: remove unnecessary ftrace-like logging Removed unncessary ftrace-like logging by simply deleting that statement as we have other modes of logging like ftrace. Reported by checkpatch. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/460ba9cdd256bf1064c4e3a694caa046171cb60e.1618283232.git.mitaliborkar810@gmail.com Signed-off-by: Greg Kroah-Hartman commit 59bc0e634b2e920067b4a7df3f3a2c5a606455dd Author: Bryan Brattlof Date: Mon Apr 12 17:23:08 2021 +0000 staging: rtl8723bs: remove unnecessary adapter The if2 adapter is defined in rtw_dvr_init() and in the dvobj_priv structure but never used anywhere in the driver. This will remove all definitions of if2 Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20210412172147.43509-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 1ec0ee058dcb58c4686e6f7f18fdb47d891eea54 Author: Beatriz Martins de Carvalho Date: Mon Apr 12 17:29:38 2021 +0100 staging: rtl8723bs: hal: Correct indentation Correct random indentation to improve readability. This problem was observed when working on other checkpatch reports in the file Hal8723BReg.h Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/68e91c54a3be0b57607101fa8b284c00bb7dff1a.1618243073.git.martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8b7d276ea8160516d1695485f0e3a1be6165ce77 Author: Beatriz Martins de Carvalho Date: Mon Apr 12 17:29:37 2021 +0100 staging: rtl8723bs: hal: Remove extra blank line Remove multiple blank lines to conform Linux kernel coding style. Reported by checkpatch in file Hal8723BReg.h Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/7f48b48d92b54c1f5db29f0d23c8c1c666236c43.1618243073.git.martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit ac23a3cbcd54f88a7a39b6af1ca2ca2a9487a983 Author: Beatriz Martins de Carvalho Date: Mon Apr 12 17:29:36 2021 +0100 staging: rtl8723bs: hal: remove space before tabs Remove unnecessary space before tabs to conform with Linux kernel coding style. Reported by checkpatch in file Hal8723BReg.h Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/9694aafb614bdcbb15fdea614502c1b31a534871.1618243073.git.martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit c9d134a13bd243e735703d41b442f51eae76aecf Author: Mitali Borkar Date: Mon Apr 12 16:14:27 2021 +0530 staging: vc04_services: TODO: rectify spelling mistake Corrected the misspelled word. Reported by checkpatch. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/967c328610909bc010b0bb82a1f89b71a57fa7a3.1618223171.git.mitaliborkar810@gmail.com Signed-off-by: Greg Kroah-Hartman commit 70bdf4cc49f91ea4470af98afe135f829983f8e7 Author: Mitali Borkar Date: Mon Apr 12 16:14:09 2021 +0530 staging: vc04_services: TODO: remove trailing whitespace Removed trailing whitespace to adhere to linux kernel coding style. Reported by checkpatch. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/5a54a06bae846f1f037165c0c7ba7ffe5a55a4a8.1618223171.git.mitaliborkar810@gmail.com Signed-off-by: Greg Kroah-Hartman commit cbde6c823bfaa553fb162257a5926ba15ebaaa43 Author: Tudor Ambarus Date: Fri Apr 9 11:25:22 2021 +0300 pinctrl: at91-pio4: Fix slew rate disablement The slew rate was enabled by default for each configuration of the pin. In case the pin had more than one configuration, even if we set the slew rate as disabled in the device tree, the next pin configuration would set again the slew rate enabled by default, overwriting the slew rate disablement. Instead of enabling the slew rate by default for each pin configuration, enable the slew rate by default just once per pin, regardless of the number of configurations. This way the slew rate disablement will also work for cases where pins have multiple configurations. Fixes: c709135e576b ("pinctrl: at91-pio4: add support for slew-rate") Signed-off-by: Tudor Ambarus Reviewed-by: Claudiu Beznea Acked-by: Ludovic Desroches Link: https://lore.kernel.org/r/20210409082522.625168-1-tudor.ambarus@microchip.com Signed-off-by: Linus Walleij commit ee7abc105e2b30378187e520be458a127d1d3762 Author: Tamar Mashiah Date: Sun Apr 11 17:15:32 2021 +0300 platform/x86: intel_pmc_core: export platform global reset bits via etr3 sysfs file During PCH (platform/board) manufacturing process a global platform reset has to be induced in order for the configuration changes take the effect upon following platform reset. This is an internal platform state and is not intended to be used in the regular platform resets. The setting is exposed via ETR3 (Extended Test Mode Register 3). After the manufacturing process is completed the register cannot be written anymore and is hardware locked. This setting was commonly done by accessing PMC registers via /dev/mem but due to security concerns /dev/mem access is much more restricted, hence the reason for exposing this setting via the dedicated sysfs interface. To prevent post manufacturing abuse the register is protected by hardware locking and the file is set to read-only mode via is_visible handler. The register in MMIO space is defined for Cannon Lake and newer PCHs. Cc: Hans de Goede Cc: David E Box Reviewed-by: Andy Shevchenko Signed-off-by: Tamar Mashiah Signed-off-by: Tomas Winkler Link: https://lore.kernel.org/r/20210411141532.3004893-1-tomas.winkler@intel.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 6759e18e5cd8745a5dfc5726e4a3db5281ec1639 Author: Mark Pearson Date: Wed Apr 7 17:20:15 2021 -0400 platform/x86: thinkpad_acpi: Correct thermal sensor allocation On recent Thinkpad platforms it was reported that temp sensor 11 was always incorrectly displaying 66C. It turns out the reason for this is that this location in EC RAM is not a temperature sensor but is the power supply ID (offset 0xC2). Based on feedback from the Lenovo firmware team the EC RAM version can be determined and for the current version (3) only the 0x78 to 0x7F range is used for temp sensors. I don't have any details for earlier versions so I have left the implementation unaltered there. Note - in this block only 0x78 and 0x79 are officially designated (CPU & GPU sensors). The use of the other locations in the block will vary from platform to platform; but the existing logic to detect a sensor presence holds. Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20210407212015.298222-1-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 46fc466e01a187ef7c1e21448a89b831c3f5b519 Author: Ping Cheng Date: Mon Apr 5 20:46:34 2021 -0700 HID: wacom: Setup pen input capabilities to the targeted tools Only set the bits that are supported by the targeted devices. This patch also removes duplicated set_bit calls. Signed-off-by: Ping Cheng Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina commit 15cfef8623a449d40d16541687afd58e78033be3 Author: Brian King Date: Mon Apr 12 18:10:09 2021 -0600 scsi: ibmvfc: Fix invalid state machine BUG_ON() This fixes an issue hitting the BUG_ON() in ibmvfc_do_work(). When going through a host action of IBMVFC_HOST_ACTION_RESET, we change the action to IBMVFC_HOST_ACTION_TGT_DEL, then drop the host lock, and reset the CRQ, which changes the host state to IBMVFC_NO_CRQ. If, prior to setting the host state to IBMVFC_NO_CRQ, ibmvfc_init_host() is called, it can then end up changing the host action to IBMVFC_HOST_ACTION_INIT. If we then change the host state to IBMVFC_NO_CRQ, we will then hit the BUG_ON(). Make a couple of changes to avoid this. Leave the host action to be IBMVFC_HOST_ACTION_RESET or IBMVFC_HOST_ACTION_REENABLE until after we drop the host lock and reset or reenable the CRQ. Also harden the host state machine to ensure we cannot leave the reset / reenable state until we've finished processing the reset or reenable. Link: https://lore.kernel.org/r/20210413001009.902400-1-tyreld@linux.ibm.com Fixes: 73ee5d867287 ("[SCSI] ibmvfc: Fix soft lockup on resume") Signed-off-by: Brian King [tyreld: added fixes tag] Signed-off-by: Tyrel Datwyler [mkp: fix comment checkpatch warnings] Signed-off-by: Martin K. Petersen commit cf270817cafb394547b1d301edfda8222030a26e Author: James Smart Date: Sun Apr 11 18:31:27 2021 -0700 scsi: lpfc: Copyright updates for 12.8.0.9 patches Update copyrights to 2021 for files modified in the 12.8.0.9 patch set. Link: https://lore.kernel.org/r/20210412013127.2387-17-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 3ebd25b0a44359befbbfb17c545d96a10d84e77a Author: James Smart Date: Sun Apr 11 18:31:26 2021 -0700 scsi: lpfc: Update lpfc version to 12.8.0.9 Update lpfc version to 12.8.0.9 Link: https://lore.kernel.org/r/20210412013127.2387-16-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 5b1f5089b6e65a8a146ae9d0c69708d369c349e4 Author: James Smart Date: Sun Apr 11 18:31:25 2021 -0700 scsi: lpfc: Eliminate use of LPFC_DRIVER_NAME in lpfc_attr.c During code inspection, several cases of creating a dynamic attribute names in logs messages using a define was found. This is unnecessary. Place the native symbol name in the log messages. Link: https://lore.kernel.org/r/20210412013127.2387-15-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f115612528b8e25ff01b6749e0ac61ff6a0f51a0 Author: James Smart Date: Sun Apr 11 18:31:24 2021 -0700 scsi: lpfc: Standardize discovery object logging format Code inspection showed lpfc was using three different pointer formats when logging discovery object pointers. Standardize the pointer format to x%px. Note: %px use is limited to discovery objects in order to aid core analysis. Link: https://lore.kernel.org/r/20210412013127.2387-14-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 3bfab8a026b393d5836e6e5abdc201d510dda857 Author: James Smart Date: Sun Apr 11 18:31:23 2021 -0700 scsi: lpfc: Fix various trivial errors in comments and log messages Clean up minor issues spotted by tools and code review: - Spelling Errors - Spurious characters and errors in function headers - nvme_info wqerr and err fields source data reversed - Extraneous new line in log message 0466 - Spacing error in log message 0109 - Messages 0140 and 0141 have portname and nodename reversed - Incorrect function labelling in comment Link: https://lore.kernel.org/r/20210412013127.2387-13-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit b62232ba8caccaf1954e197058104a6478fac1af Author: James Smart Date: Sun Apr 11 18:31:22 2021 -0700 scsi: lpfc: Remove unsupported mbox PORT_CAPABILITIES logic SLI-4 does not contain a PORT_CAPABILITIES mailbox command (only SLI-3 does, and SLI-3 doesn't use it), yet there are SLI-4 code paths that have code to issue the command. The command will always fail. Remove the code for the mailbox command and leave only the resulting "failure path" logic. Link: https://lore.kernel.org/r/20210412013127.2387-12-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit d3de0d11a219f32b185d525cca2568817e22d3a1 Author: James Smart Date: Sun Apr 11 18:31:21 2021 -0700 scsi: lpfc: Fix lpfc_hdw_queue attribute being ignored The lpfc_hdw_queue attribute is to set the number of hardware queues to be created on the adapter. Normally, the value is set to a default, which allows the hw queue count to be sized dynamically based on adapter capabilities, CPU/platform architecture, or CPU type. Currently, when lpfc_hdw_queue is set to a specific value, is has no effect and the dynamic sizing occurs. The routine checking whether parameters are default or not ignores the lpfc_hdw_queue setting and invokes the dynamic logic. Fix the routine to additionally check the lpfc_hdw_queue attribute value before using dynamic scaling. Additionally, SLI-3 supports only a small number of queues with dedicated functions, thus it needs to be exempted from the variable scaling and set to the expected values. Link: https://lore.kernel.org/r/20210412013127.2387-11-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a314dec37c0e3879e964b574564b205b3529daa5 Author: James Smart Date: Sun Apr 11 18:31:20 2021 -0700 scsi: lpfc: Fix missing FDMI registrations after Mgmt Svc login FDMI registration needs to be performed after every login with the FC Mgmt service. The flag the driver is using to track registration is cleared on link up, but never on Mgmt service logout/re-login. Fix by clearing the flag whenever a new login is completed with the FC Mgmt service. While perusing the flag use, logging was performed as if FDMI registration occurred on vports. However, it is limited to the physical port only. Revise the logging to reflect physical port based. Link: https://lore.kernel.org/r/20210412013127.2387-10-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a1a553e31a994be6f68d3123c0546a84c04a7f6c Author: James Smart Date: Sun Apr 11 18:31:19 2021 -0700 scsi: lpfc: Fix silent memory allocation failure in lpfc_sli4_bsg_link_diag_test() In the unlikely case of a failure to allocate an LPFC_MBOXQ_t structure, no return status is set, thus the routine never logs an error and returns success to the callee. Fix by setting a return code on failure. Link: https://lore.kernel.org/r/20210412013127.2387-9-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 724f6b43a3492b02e2ebc88f9fb749d1405098e2 Author: James Smart Date: Sun Apr 11 18:31:18 2021 -0700 scsi: lpfc: Fix use-after-free on unused nodes after port swap During target port swap, the swap logic ignores the DROPPED flag in the nodes. As a node then moves into the UNUSED state, the reference count will be dropped. If a node is later reused and moved out of the UNUSED state, an access can result in a use-after-free assert. Fix by having the port swap logic propagate the DROPPED flag when switching nodes. This will avoid reference from being dropped. Link: https://lore.kernel.org/r/20210412013127.2387-8-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 304ee43238fed517faa123e034b593905b8679f8 Author: James Smart Date: Sun Apr 11 18:31:17 2021 -0700 scsi: lpfc: Fix error handling for mailboxes completed in MBX_POLL mode In SLI-4, when performing a mailbox command with MBX_POLL, the driver uses the BMBX register to send the command rather than the MQ. A flag is set indicating the BMBX register is active and saves the mailbox job struct (mboxq) in the mbox_active element of the adapter. The routine then waits for completion or timeout. The mailbox job struct is not freed by the routine. In cases of timeout, the adapter will be reset. The lpfc_sli_mbox_sys_flush() routine will clean up the mbox in preparation for the reset. It clears the BMBX active flag and marks the job structure as MBX_NOT_FINISHED. But, it never frees the mboxq job structure. Expectation in both normal completion and timeout cases is that the issuer of the mbx command will free the structure. Unfortunately, not all calling paths are freeing the memory in cases of error. All calling paths were looked at and updated, if missing, to free the mboxq memory regardless of completion status. Link: https://lore.kernel.org/r/20210412013127.2387-7-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 4e76d4a9a226e3c7d453675f22359aba34e73ec4 Author: James Smart Date: Sun Apr 11 18:31:16 2021 -0700 scsi: lpfc: Fix lack of device removal on port swaps with PRLIs During target port-swap testing with link flips, the initiator could encounter PRLI errors. If the target node disappears permanently, the ndlp is found stuck in UNUSED state with ref count of 1. The rmmod of the driver will hang waiting for this node to be freed. While handling a link error in PRLI completion path, the code intends to skip triggering the discovery state machine. However this is causing the final reference release path to be skipped. This causes the node to be stuck with ref count of 1 Fix by ensuring the code path triggers the device removal event on the node state machine. Link: https://lore.kernel.org/r/20210412013127.2387-6-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a789241e49b6adce84cdba7a24c92ecc845aface Author: James Smart Date: Sun Apr 11 18:31:15 2021 -0700 scsi: lpfc: Fix NMI crash during rmmod due to circular hbalock dependency Remove hbalock dependency for lpfc_abts_els_sgl_list and lpfc_abts_nvmet_ctx_list. The lists are adaquately synchronized with the sgl_list_lock and abts_nvmet_buf_list_lock. Link: https://lore.kernel.org/r/20210412013127.2387-5-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit f866eb06c087125619457b53e9211a9e758f64f7 Author: James Smart Date: Sun Apr 11 18:31:14 2021 -0700 scsi: lpfc: Fix reference counting errors in lpfc_cmpl_els_rsp() Call traces are being seen that result from a nodelist structure ref counting error. They are typically seen after transmission of an LS_RJT ELS response. Aged code in lpfc_cmpl_els_rsp() calls lpfc_nlp_not_used() which, if the ndlp reference count is exactly 1, will decrement the reference count. Previously lpfc_nlp_put() was within lpfc_els_free_iocb(), and the 'put' within the free would only be invoked if cmdiocb->context1 was not NULL. Since the nodelist structure reference count is decremented when exiting lpfc_cmpl_els_rsp() the lpfc_nlp_not_used() calls are no longer required. Calling them is causing the reference count issue. Fix by removing the lpfc_nlp_not_used() calls. Link: https://lore.kernel.org/r/20210412013127.2387-4-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit fffd18ec6579c2d9c72b212169259062fe747888 Author: James Smart Date: Sun Apr 11 18:31:13 2021 -0700 scsi: lpfc: Fix crash when a REG_RPI mailbox fails triggering a LOGO response Fix a crash caused by a double put on the node when the driver completed an ACC for an unsolicted abort on the same node. The second put was executed by lpfc_nlp_not_used() and is wrong because the completion routine executes the nlp_put when the iocbq was released. Additionally, the driver is issuing a LOGO then immediately calls lpfc_nlp_set_state to put the node into NPR. This call does nothing. Remove the lpfc_nlp_not_used call and additional set_state in the completion routine. Remove the lpfc_nlp_set_state post issue_logo. Isn't necessary. Link: https://lore.kernel.org/r/20210412013127.2387-3-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 078c68b87a717b9fcd8e0f2109f73456fbc55490 Author: James Smart Date: Sun Apr 11 18:31:12 2021 -0700 scsi: lpfc: Fix rmmod crash due to bad ring pointers to abort_iotag Rmmod on SLI-4 adapters is sometimes hitting a bad ptr dereference in lpfc_els_free_iocb(). A prior patch refactored the lpfc_sli_abort_iocb() routine. One of the changes was to convert from building/sending an abort within the routine to using a common routine. The reworked routine passes, without modification, the pring ptr to the new common routine. The older routine had logic to check SLI-3 vs SLI-4 and adapt the pring ptr if necessary as callers were passing SLI-3 pointers even when not on an SLI-4 adapter. The new routine is missing this check and adapt, so the SLI-3 ring pointers are being used in SLI-4 paths. Fix by cleaning up the calling routines. In review, there is no need to pass the ring ptr argument to abort_iocb at all. The routine can look at the adapter type itself and reference the proper ring. Link: https://lore.kernel.org/r/20210412013127.2387-2-jsmart2021@gmail.com Fixes: db7531d2b377 ("scsi: lpfc: Convert abort handling to SLI-3 and SLI-4 handlers") Cc: # v5.11+ Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8350e19658c1632874888971052a5ace92dae7c5 Author: Wan Jiabing Date: Tue Apr 6 18:59:13 2021 +0800 scsi: isci: Remove unnecessary struct declaration struct sci_phy_proto was already defined on line 142. The declaration here is unnecessary. Remove it. Link: https://lore.kernel.org/r/20210406105913.676746-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Martin K. Petersen commit cf17ff2678806780ddfe33cf3e9457f369170661 Author: Jiapeng Chong Date: Mon Apr 12 13:59:06 2021 +0800 scsi: message: fusion: Remove unused local variable 'vtarget' Fix the following gcc warning: drivers/message/fusion/mptsas.c:783:14: warning: variable ‘vtarget’ set but not used [-Wunused-but-set-variable]. Link: https://lore.kernel.org/r/1618207146-96542-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit c436b41a99b74936eb0a0ff34c42696ae36da156 Author: Jiapeng Chong Date: Thu Apr 8 17:06:20 2021 +0800 scsi: message: fusion: Remove unused local variable 'status' Fix the following gcc warning: drivers/message/fusion/mptbase.c:3087:9: warning: variable ‘status’ set but not used [-Wunused-but-set-variable]. Link: https://lore.kernel.org/r/1617872780-126448-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 30264737bd954a2af6361316b862afeed579d103 Author: Zhen Lei Date: Thu Apr 8 14:18:50 2021 +0800 scsi: message: fusion: Remove unused local variable 'port' Fixes the following W=1 kernel build warning: drivers/message/fusion/mptctl.c: In function ‘mptctl_gettargetinfo drivers/message/fusion/mptctl.c:1372:7: warning: variable ‘port’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210408061851.3089-3-thunder.leizhen@huawei.com Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit 039cf38166486ac42ce54df3c4cb951561e91617 Author: Zhen Lei Date: Thu Apr 8 14:18:49 2021 +0800 scsi: message: fusion: Remove unused local variable 'time_count' Fixes the following W=1 kernel build warning: drivers/message/fusion/mptctl.c: In function ‘mptctl_do_taskmgmt: drivers/message/fusion/mptctl.c:324:17: warning: variable ‘time_count’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210408061851.3089-2-thunder.leizhen@huawei.com Fixes: 7d757f185540 ("[SCSI] mptfusion: Updated SCSI IO IOCTL error handling.") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Martin K. Petersen commit eb5a3e3b75fe31a5ce53ad632bbc96c76c63d3e9 Author: Qiheng Lin Date: Fri Apr 9 20:03:45 2021 +0800 scsi: qla4xxx: Remove unneeded if-null-free check Eliminate the following coccicheck warning: drivers/scsi/qla4xxx/ql4_os.c:4175:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla4xxx/ql4_os.c:4196:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla4xxx/ql4_os.c:4215:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla4xxx/ql4_os.c:6400:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla4xxx/ql4_os.c:6402:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla4xxx/ql4_os.c:6555:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla4xxx/ql4_os.c:6557:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla4xxx/ql4_os.c:7838:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla4xxx/ql4_os.c:7840:2-7: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/r/20210409120345.6447-1-linqiheng@huawei.com Signed-off-by: Qiheng Lin Signed-off-by: Martin K. Petersen commit 5dc3468888f8ba54c3a2fdd38b13288f6b8daed2 Author: Christophe JAILLET Date: Sun Apr 11 11:21:40 2021 +0200 scsi: qla2xxx: Reuse existing error handling path There is no need to duplicate code, use the existing error handling path to free resources. This is more future-proof. Link: https://lore.kernel.org/r/6973844a1532ec2dc8e86f3533362e79d78ed774.1618132821.git.christophe.jaillet@wanadoo.fr Reviewed-by: Bart Van Assche Signed-off-by: Christophe JAILLET Signed-off-by: Martin K. Petersen commit efd2617100d9c6a49c8cd27160a2353b04844d78 Author: Qiheng Lin Date: Fri Apr 9 20:09:25 2021 +0800 scsi: qla2xxx: Remove unneeded if-null-free check Eliminate the following coccicheck warning: drivers/scsi/qla2xxx/qla_os.c:4622:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/scsi/qla2xxx/qla_os.c:4637:3-8: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/r/20210409120925.7122-1-linqiheng@huawei.com Reviewed-by: Himanshu Madhani Signed-off-by: Qiheng Lin Signed-off-by: Martin K. Petersen commit 16660db3fc2af8664af5e0a3cac69c4a54bfb794 Author: Gustavo A. R. Silva Date: Thu Apr 1 11:20:54 2021 -0500 scsi: mpt3sas: Fix out-of-bounds warnings in _ctl_addnl_diag_query Fix the following out-of-bounds warnings by embedding existing struct htb_rel_query into struct mpt3_addnl_diag_query, instead of duplicating its members: include/linux/fortify-string.h:20:29: warning: '__builtin_memcpy' offset [19, 32] from the object at 'karg' is out of the bounds of referenced subobject 'buffer_rel_condition' with type 'short unsigned int' at offset 16 [-Warray-bounds] include/linux/fortify-string.h:22:29: warning: '__builtin_memset' offset [19, 32] from the object at 'karg' is out of the bounds of referenced subobject 'buffer_rel_condition' with type 'short unsigned int' at offset 16 [-Warray-bounds] The problem is that the original code is trying to copy data into a bunch of struct members adjacent to each other in a single call to memcpy(). All those members are exactly the same contained in struct htb_rel_query, so instead of duplicating them into struct mpt3_addnl_diag_query, replace them with new member rel_query of type struct htb_rel_query. So, now that this new object is introduced, memcpy() doesn't overrun the length of &karg.buffer_rel_condition, because the address of the new struct object _rel_query_ is used as destination, instead. The same issue is present when calling memset(), and it is fixed with this same approach. Below is a comparison of struct mpt3_addnl_diag_query, before and after this change (the size and cachelines remain the same): $ pahole -C mpt3_addnl_diag_query drivers/scsi/mpt3sas/mpt3sas_ctl.o struct mpt3_addnl_diag_query { struct mpt3_ioctl_header hdr; /* 0 12 */ uint32_t unique_id; /* 12 4 */ uint16_t buffer_rel_condition; /* 16 2 */ uint16_t reserved1; /* 18 2 */ uint32_t trigger_type; /* 20 4 */ uint32_t trigger_info_dwords[2]; /* 24 8 */ uint32_t reserved2[2]; /* 32 8 */ /* size: 40, cachelines: 1, members: 7 */ /* last cacheline: 40 bytes */ }; $ pahole -C mpt3_addnl_diag_query drivers/scsi/mpt3sas/mpt3sas_ctl.o struct mpt3_addnl_diag_query { struct mpt3_ioctl_header hdr; /* 0 12 */ uint32_t unique_id; /* 12 4 */ struct htb_rel_query rel_query; /* 16 16 */ uint32_t reserved2[2]; /* 32 8 */ /* size: 40, cachelines: 1, members: 4 */ /* last cacheline: 40 bytes */ }; Also, this helps with the ongoing efforts to globally enable -Warray-bounds and get us closer to being able to tighten the FORTIFY_SOURCE routines on memcpy(). Link: https://github.com/KSPP/linux/issues/109 Link: https://lore.kernel.org/lkml/60659889.bJJILx2THu3hlpxW%25lkp@intel.com/ Link: https://lore.kernel.org/r/20210401162054.GA397186@embeddedor Build-tested-by: kernel test robot Reported-by: kernel test robot Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 5c507329000e282dce91e6c98ee6ffa61a8a5e49 Author: Pedro Tammela Date: Mon Apr 12 16:24:32 2021 -0300 libbpf: Clarify flags in ringbuf helpers In 'bpf_ringbuf_reserve()' we require the flag to '0' at the moment. For 'bpf_ringbuf_{discard,submit,output}' a flag of '0' might send a notification to the process if needed. Signed-off-by: Pedro Tammela Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210412192434.944343-1-pctammela@mojatatu.com commit 9d6f87c25ad57b52a4dc8c2d904ead37fe829512 Author: Javed Hasan Date: Wed Mar 31 09:49:17 2021 -0700 scsi: qedf: Use devlink to report errors and recovery Use devlink_health_report() to push error indications. Implement this in qede via a callback function to make it possible to reuse it for other drivers sitting on top of qed in future. Also remove forcible recovery trigger and put it as a normal devlink callback in qed module. This allows user to enable/disable it via: devlink health set pci/xxxx:xx:xx.x reporter fw_fatal auto_recover false Link: https://lore.kernel.org/r/20210331164917.24662-3-jhasan@marvell.com Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 4aab946f789ed7c2e44481f395ab2eab0b63824a Author: Javed Hasan Date: Wed Mar 31 09:49:16 2021 -0700 scsi: qedf: Enable devlink support Devlink instance lifetime was linked to qed_dev object. That caused devlink to be recreated on each recovery. Change it by making higher level driver (qede) responsible for lifetime management. This way devlink survives recoveries. qede now stores devlink structure pointer as a part of its device object, devlink private data contains a linkage structure, qed_devlink. Link: https://lore.kernel.org/r/20210331164917.24662-2-jhasan@marvell.com Signed-off-by: Javed Hasan Signed-off-by: Martin K. Petersen commit 1160d61bc51e87e509cfaf9da50a0060f67b6de4 Author: Sergey Shtylyov Date: Tue Mar 30 20:45:12 2021 +0300 scsi: sni_53c710: Add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to request_irq() (which takes *unsigned* IRQ #s), causing it to fail with -EINVAL (overridden by -ENODEV further below). Stop calling request_irq() with the invalid IRQ #s. Link: https://lore.kernel.org/r/8f4b8fa5-8251-b977-70a1-9099bcb4bb17@omprussia.ru Fixes: c27d85f3f3c5 ("[SCSI] SNI RM 53c710 driver") Signed-off-by: Sergey Shtylyov Signed-off-by: Martin K. Petersen commit 14b321380eb333c82853d7d612d0995f05f88fdc Author: Sergey Shtylyov Date: Tue Mar 30 20:44:08 2021 +0300 scsi: sun3x_esp: Add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding the real error code. Stop calling request_irq() with the invalid IRQ #s. Link: https://lore.kernel.org/r/363eb4c8-a3bf-4dc9-2a9e-90f349030a15@omprussia.ru Fixes: 0bb67f181834 ("[SCSI] sun3x_esp: convert to esp_scsi") Signed-off-by: Sergey Shtylyov Signed-off-by: Martin K. Petersen commit 38fca15c29db6ed06e894ac194502633e2a7d1fb Author: Sergey Shtylyov Date: Tue Mar 30 20:43:23 2021 +0300 scsi: jazz_esp: Add IRQ check The driver neglects to check the result of platform_get_irq()'s call and blithely passes the negative error codes to request_irq() (which takes *unsigned* IRQ #), causing it to fail with -EINVAL, overriding the real error code. Stop calling request_irq() with the invalid IRQ #s. Link: https://lore.kernel.org/r/594aa9ae-2215-49f6-f73c-33bd38989912@omprussia.ru Fixes: 352e921f0dd4 ("[SCSI] jazz_esp: converted to use esp_core") Signed-off-by: Sergey Shtylyov Signed-off-by: Martin K. Petersen commit 6c11dc060427e07ca144eacaccd696106b361b06 Author: Sergey Shtylyov Date: Sat Apr 3 23:43:55 2021 +0300 scsi: hisi_sas: Fix IRQ checks Commit df2d8213d9e3 ("hisi_sas: use platform_get_irq()") failed to take into account that irq_of_parse_and_map() and platform_get_irq() have a different way of indicating an error: the former returns 0 and the latter returns a negative error code. Fix up the IRQ checks! Link: https://lore.kernel.org/r/810f26d3-908b-1d6b-dc5c-40019726baca@omprussia.ru Fixes: df2d8213d9e3 ("hisi_sas: use platform_get_irq()") Acked-by: John Garry Signed-off-by: Sergey Shtylyov Signed-off-by: Martin K. Petersen commit 339c9b63cc7ce779ce45c675bf709cb58b807fc3 Author: Sergey Shtylyov Date: Mon Mar 29 23:50:58 2021 +0300 scsi: ufs: ufshcd-pltfrm: Fix deferred probing The driver overrides the error codes returned by platform_get_irq() to -ENODEV, so if it returns -EPROBE_DEFER, the driver would fail the probe permanently instead of the deferred probing. Propagate the error code upstream as it should have been done from the start... Link: https://lore.kernel.org/r/420364ca-614a-45e3-4e35-0e0653c7bc53@omprussia.ru Fixes: 2953f850c3b8 ("[SCSI] ufs: use devres functions for ufshcd") Signed-off-by: Sergey Shtylyov Signed-off-by: Martin K. Petersen commit 54300bfd738b649004793ce138a29c30e900ec21 Author: dingsenjie Date: Wed Mar 31 14:53:25 2021 +0800 scsi: snic: Convert to DEFINE_SHOW_ATTRIBUTE() Use DEFINE_SHOW_ATTRIBUTE() macro to simplify the code. Link: https://lore.kernel.org/r/20210331065326.18804-1-dingsenjie@163.com Signed-off-by: dingsenjie Signed-off-by: Martin K. Petersen commit 4811d9929cdae4238baf5b2522247bd2f9fa7b50 Author: Theodore Ts'o Date: Mon Apr 12 17:19:00 2021 -0400 ext4: allow the dax flag to be set and cleared on inline directories This is needed to allow generic/607 to pass for file systems with the inline data_feature enabled, and it allows the use of file systems where the directories use inline_data, while the files are accessed via DAX. Cc: stable@kernel.org Signed-off-by: Theodore Ts'o commit 790f9a48abd0e4cd1b202b6093055c295d4b8e3d Author: Ye Bin Date: Fri Apr 9 15:55:22 2021 +0800 scsi: ufs: ufs-qcom: Remove redundant dev_err() call in ufs_qcom_init() There is a error message within devm_ioremap_resource() already, so remove the dev_err() call to avoid redundant error message. Link: https://lore.kernel.org/r/20210409075522.2111083-1-yebin10@huawei.com Reported-by: Hulk Robot Reviewed-by: Manivannan Sadhasivam Signed-off-by: Ye Bin Signed-off-by: Martin K. Petersen commit f4df167ad5a2274c12680ba3e7d816d32d1fc375 Author: Luo Jiaxing Date: Tue Apr 6 19:48:31 2021 +0800 scsi: hisi_sas: Print SATA device SAS address for soft reset failure Add (pseudo) SAS address for ATA software reset failure log to assist in debugging. Link: https://lore.kernel.org/r/1617709711-195853-7-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 2d31cb20a3cd611a9a544f9586eb3908ee2085cf Author: Luo Jiaxing Date: Tue Apr 6 19:48:30 2021 +0800 scsi: hisi_sas: Warn in v3 hw channel interrupt handler when status reg cleared If a channel interrupt occurs without any status bit set, the handler will return directly. However, if such redundant interrupts are received, it's better to check what happen, so add logs for this. Link: https://lore.kernel.org/r/1617709711-195853-6-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: Yihang Li Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 2c74cb1f9222ebfcc204c02018275ad167d25212 Author: Jianqin Xie Date: Tue Apr 6 19:48:29 2021 +0800 scsi: hisi_sas: Directly snapshot registers when executing a reset The debugfs snapshot should be executed before the reset occurs to ensure that the register contents are saved properly. As such, it is incorrect to queue the debugfs dump when running a reset as the reset will occur prior to the snapshot work item is handler. Therefore, directly snapshot registers in the reset work handler. Link: https://lore.kernel.org/r/1617709711-195853-5-git-send-email-john.garry@huawei.com Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit f467666504bf0c7eae95b929d0c86f77ff9b4356 Author: Xiang Chen Date: Tue Apr 6 19:48:28 2021 +0800 scsi: hisi_sas: Call sas_unregister_ha() to roll back if .hw_init() fails Function sas_unregister_ha() needs to be called to roll back if hisi_hba->hw->hw_init() fails in function hisi_sas_probe() or hisi_sas_v3_probe(). Make that change. Link: https://lore.kernel.org/r/1617709711-195853-4-git-send-email-john.garry@huawei.com Signed-off-by: Xiang Chen Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 4da0b7f6fac331f2d2336df3ca88a335f545b4dc Author: Luo Jiaxing Date: Tue Apr 6 19:48:27 2021 +0800 scsi: hisi_sas: Print SAS address for v3 hw erroneous completion print To help debugging efforts, print the device SAS address for v3 hw erroneous completion log. Here is an example print: hisi_sas_v3_hw 0000:b4:02.0: erroneous completion iptt=2193 task=000000002b0c13f8 dev id=17 addr=570fd45f9d17b001 Link: https://lore.kernel.org/r/1617709711-195853-3-git-send-email-john.garry@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: John Garry Signed-off-by: Martin K. Petersen commit 2843d2fb42254ac443c83e5e0b97e1cae6b7a4de Author: Luo Jiaxing Date: Tue Apr 6 19:48:26 2021 +0800 scsi: hisi_sas: Delete some unused callbacks The debugfs code has been relocated to v3 hw driver, so delete unused struct hisi_sas_hw function pointers snapshot_{prepare, restore}. Link: https://lore.kernel.org/r/1617709711-195853-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 fa5ac2beabadc2ef5eaae0f99407e708bd5dbd66 Author: Luo Jiaxing Date: Thu Apr 8 20:56:33 2021 +0800 scsi: pm8001: Clean up open braces checkpatch reports the following: ERROR: that open brace { should be on the previous line +static struct error_fw flash_error_table[] = +{ Fix a couple of instances of misplaced open bracket. Link: https://lore.kernel.org/r/1617886593-36421-3-git-send-email-luojiaxing@huawei.com Acked-by: Jack Wang Signed-off-by: Luo Jiaxing Signed-off-by: Jianqin Xie Signed-off-by: Martin K. Petersen commit 8a23dbc600895694b7deb4302b735f2b8d274a5d Author: Luo Jiaxing Date: Thu Apr 8 20:56:32 2021 +0800 scsi: pm8001: Clean up white space checkpatch reports the following: ERROR: space prohibited before that ',' (ctx:WxW) +int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb); Remove unnecessary whitespace. Link: https://lore.kernel.org/r/1617886593-36421-2-git-send-email-luojiaxing@huawei.com Acked-by: Jack Wang Signed-off-by: Luo Jiaxing Signed-off-by: Jianqin Xie Signed-off-by: Martin K. Petersen commit 40fa7394a1ad5706e795823276f2e394cca145d0 Author: Colin Ian King Date: Wed Apr 7 14:58:40 2021 +0100 scsi: pm80xx: Fix potential infinite loop The for-loop iterates with a u8 loop counter i and compares this with the loop upper limit of pm8001_ha->max_q_num which is a u32 type. There is a potential infinite loop if pm8001_ha->max_q_num is larger than the u8 loop counter. Fix this by making the loop counter the same type as pm8001_ha->max_q_num. [mkp: this is purely theoretical, max_q_num is currently limited to 64] Link: https://lore.kernel.org/r/20210407135840.494747-1-colin.king@canonical.com Fixes: 65df7d1986a1 ("scsi: pm80xx: Fix chip initialization failure") Addresses-Coverity: ("Infinite loop") Reviewed-by: Johannes Thumshirn Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 6f305bf699fe233ef27d80cc29fd1650423c8e74 Author: Igor Pylypiv Date: Tue Apr 6 11:05:34 2021 -0700 scsi: pm80xx: Remove busy wait from mpi_uninit_check() mpi_uninit_check() is not being called in an atomic context. The only caller of mpi_uninit_check() is pm80xx_chip_soft_rst(). Callers of pm80xx_chip_soft_rst(): - pm8001_ioctl_soft_reset() - pm8001_pci_probe() - pm8001_pci_remove() - pm8001_pci_suspend() - pm8001_pci_resume() There was a similar fix for mpi_init_check() in commit d71023af4bec ("scsi: pm80xx: Do not busy wait in MPI init check") Link: https://lore.kernel.org/r/20210406180534.1924345-3-ipylypiv@google.com Reviewed-by: Vishakha Channapattan Acked-by: Jack Wang Signed-off-by: Igor Pylypiv Signed-off-by: Martin K. Petersen commit 3f744a14f331f56703a9d74e86520db045f11831 Author: Igor Pylypiv Date: Tue Apr 6 11:05:33 2021 -0700 scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check() The mpi_uninit_check() takes longer for inbound doorbell register to be cleared. Increase the timeout substantially so that the driver does not fail to load. Previously, the inbound doorbell wait time was mistakenly increased in the mpi_init_check() instead of mpi_uninit_check(). It is okay to leave the mpi_init_check() wait time as-is as these are timeout values and if there is a failure, waiting longer is not an issue. Link: https://lore.kernel.org/r/20210406180534.1924345-2-ipylypiv@google.com Fixes: e90e236250e9 ("scsi: pm80xx: Increase timeout for pm80xx mpi_uninit_check") Reviewed-by: Vishakha Channapattan Acked-by: Jack Wang Signed-off-by: Igor Pylypiv Signed-off-by: Martin K. Petersen commit 08976cb548d67d8a492d75c9202fde28e21915e2 Author: Bodo Stroesser Date: Wed Mar 24 20:57:58 2021 +0100 scsi: target: tcmu: Make data_pages_per_blk changeable via configfs Make data_pages_per_blk changeable similar to the way it is done for max_data_area_mb. One can change the value by typing: echo "data_pages_per_blk=N" >control The value is printed when doing: cat info In addition, a new readonly attribute 'data_pages_per_blk' returns the value on read. Link: https://lore.kernel.org/r/20210324195758.2021-7-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit e719afdcf6911425c404ec50403a9aa116b2b616 Author: Bodo Stroesser Date: Wed Mar 24 20:57:57 2021 +0100 scsi: target: tcmu: Replace block size definitions with new udev members Replace DATA_PAGES_PER_BLK and DATA_BLOCK_SIZE with new struct elements tcmu_dev->data_pages_per_blk and tcmu_dev->data_blk_size. These new variables are still loaded with constant definition DATA_PAGES_PER_BLK_DEF (= 1) and DATA_PAGES_PER_BLK_DEF * PAGE_SIZE. There is no way yet to set the values via configfs. Link: https://lore.kernel.org/r/20210324195758.2021-6-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 3722e36c4ea4b9e39fe468dd1776b43c61a0c459 Author: Bodo Stroesser Date: Wed Mar 24 20:57:56 2021 +0100 scsi: target: tcmu: Remove function tcmu_get_block_page() There is only one caller of tcmu_get_block_page left. Since it is a one-liner, we can remove the function. Link: https://lore.kernel.org/r/20210324195758.2021-5-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit f5ce815f34bc97b92f5605eced806f1d32e1d602 Author: Bodo Stroesser Date: Wed Mar 24 20:57:55 2021 +0100 scsi: target: tcmu: Support DATA_BLOCK_SIZE = N * PAGE_SIZE Change tcmu to support DATA_BLOCK_SIZE being a multiple of PAGE_SIZE. There are two reasons why one would like to have a bigger DATA_BLOCK_SIZE: 1) If userspace - e.g. due to data compression, encryption or deduplication - needs to have receive or transmit data in a consecutive buffer, we can define DATA_BLOCK_SIZE to the maximum size of a SCSI READ/WRITE to enforce that userspace sees just one consecutive buffer. That way we can avoid the need for doing data copy in userspace. 2) Using a bigger data block size can speed up command processing in tcmu. The number of free data blocks to look up in bitmap is reduced substantially. The lookup for data pages in radix_tree can be done more efficiently if there are multiple pages in a data block. The maximum number of IOVs to set up is lower so cmd entries in the ring become smaller. Link: https://lore.kernel.org/r/20210324195758.2021-4-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 8b084d9dfb0158362c3be6ee7fdc8c8320a0ba30 Author: Bodo Stroesser Date: Wed Mar 24 20:57:54 2021 +0100 scsi: target: tcmu: Prepare for PAGE_SIZE != DATA_BLOCK_SIZE Rename some variables and definitions as a first preparation for DATA_BLOCK_SIZE != PAGE_SIZE and add the new DATA_PAGES_PER_BLK definition containing the number of pages per data block. Rename tcmu_try_get_block_page() to tcmu_try_get_data_page(). Keep name tcmu_get_block_page() since it will go away in a following commit when there is only one caller left. Subsequent commits will then add full support for DATA_PAGES_PER_BLK != 1, which also means DATA_BLOCK_SIZE = DATA_PAGES_PER_BLK * PAGE_SIZE Link: https://lore.kernel.org/r/20210324195758.2021-3-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit ecddbb7e945daabdf28a29b95c4a2d88d166a891 Author: Bodo Stroesser Date: Wed Mar 24 20:57:53 2021 +0100 scsi: target: tcmu: Adjust names of variables and definitions Some definitions and members of struct tcmu_dev had misleading names. Examples: - ring_size was used for the size of mailbox + cmd ring + data area - CMDR_SIZE was used for size of mailbox + cmd ring I added the new definition MB_CMDR_SIZE (mailbox + command ring), changed CMDR_SIZE to hold the size of the command ring only and replaced in struct tcmu_dev the member ring_size with mmap_pages, because the member is now used in tcmu_mmap() only, where we need page count, not size. I also added the new struct tcmu_dev member 'cmdr' which is used to replace some occurences of '(void *)mb + CMDR_OFF' with 'udev->cmdr' for better readability. Link: https://lore.kernel.org/r/20210324195758.2021-2-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 0ec3815a8c1d8fe7215b1748117ac14cbeeda453 Author: Sergio Paracuellos Date: Sat Apr 10 07:50:59 2021 +0200 MAINTAINERS: add MT7621 CLOCK maintainer Adding myself as maintainer for mt7621 clock driver. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210410055059.13518-5-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd commit 49268e249a5be079b5458a7d265782776397f455 Author: Sergio Paracuellos Date: Sat Apr 10 07:50:58 2021 +0200 staging: mt7621-dts: use valid vendor 'mediatek' instead of invalid 'mtk' Vendor listed for mediatek in kernel vendor file 'vendor-prefixes.yaml' contains 'mediatek' as a valid vendor string. Some nodes in the device tree are using an invalid vendor string vfor 'mtk' instead. Fix all of them in dts file. Update also ralink mt7621 related code to properly match new strings. Even there are used in the device tree there are some strings that are not referred anywhere but have been also updated with new vendor name. These are 'mtk,mt7621-wdt', 'mtk,mt7621-nand', 'mtk,mt7621-mc', and 'mtk,mt7621-cpc'. Acked-by: Greg Kroah-Hartman Acked-by: Thomas Bogendoerfer Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210410055059.13518-4-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd commit b2f471a26721cb045375921a433a290c970ab2d8 Author: Sergio Paracuellos Date: Sat Apr 10 07:50:57 2021 +0200 staging: mt7621-dts: make use of new 'mt7621-clk' Clocks for SoC mt7621 have been properly integrated so there is no need to declare fixed clocks at all in the device tree. Remove all of them, add new device tree nodes for mt7621-clk and update the rest of the nodes to use them. Acked-by: Greg Kroah-Hartman Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210410055059.13518-3-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd commit 48df7a26f4700aac8b7e5ab68796daf25c27e062 Author: Sergio Paracuellos Date: Sat Apr 10 07:50:56 2021 +0200 clk: ralink: add clock driver for mt7621 SoC The documentation for this SOC only talks about two registers regarding to the clocks: * SYSC_REG_CPLL_CLKCFG0 - provides some information about boostrapped refclock. PLL and dividers used for CPU and some sort of BUS. * SYSC_REG_CPLL_CLKCFG1 - a banch of gates to enable/disable clocks for all or some ip cores. Looking into driver code, and some openWRT patched there are another frequencies which are used in some drivers (uart, sd...). According to all of this information the clock plan for this SoC is set as follows: - Main top clock "xtal" from where all the rest of the world is derived. - CPU clock "cpu" derived from "xtal" frequencies and a bunch of register reads and predividers. - BUS clock "bus" derived from "cpu" and with (cpu / 4) MHz. - Fixed clocks from "xtal": * "50m": 50 MHz. * "125m": 125 MHz. * "150m": 150 MHz. * "250m": 250 MHz. * "270m": 270 MHz. We also have a buch of gate clocks with their parents: * "hsdma": "150m" * "fe": "250m" * "sp_divtx": "270m" * "timer": "50m" * "pcm": "270m" * "pio": "50m" * "gdma": "bus" * "nand": "125m" * "i2c": "50m" * "i2s": "270m" * "spi": "bus" * "uart1": "50m" * "uart2": "50m" * "uart3": "50m" * "eth": "50m" * "pcie0": "125m" * "pcie1": "125m" * "pcie2": "125m" * "crypto": "250m" * "shxc": "50m" With this information the clk driver will provide clock and gates functionality from a a set of hardcoded clocks allowing to define a nice device tree without fixed clocks. Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210410055059.13518-2-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd commit f6b1340dc751a6caa2a0567b667d0f4f4172cd58 Author: Colin Ian King Date: Fri Apr 9 10:01:03 2021 +0100 clk: uniphier: Fix potential infinite loop The for-loop iterates with a u8 loop counter i and compares this with the loop upper limit of num_parents that is an int type. There is a potential infinite loop if num_parents is larger than the u8 loop counter. Fix this by making the loop counter the same type as num_parents. Also make num_parents an unsigned int to match the return type of the call to clk_hw_get_num_parents. Addresses-Coverity: ("Infinite loop") Fixes: 734d82f4a678 ("clk: uniphier: add core support code for UniPhier clock driver") Signed-off-by: Colin Ian King Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210409090104.629722-1-colin.king@canonical.com Signed-off-by: Stephen Boyd commit 84b20b8062e76a0290aee7360c8238df681c106e Merge: 857a80bbd7321 5cd0f6f57639c Author: Martin K. Petersen Date: Mon Apr 12 21:41:54 2021 -0400 Merge branch '5.12/scsi-fixes' into 5.13/scsi-staging Resolve a couple of conflicts between the 5.12 fixes branch and the 5.13 staging tree (iSCSI target and UFS). Signed-off-by: Martin K. Petersen commit b2150cab9a97c1fcc15684200a6020b6d231106d Author: Alex Elder Date: Fri Apr 9 08:44:07 2021 -0500 clk: qcom: rpmh: add support for SDX55 rpmh IPA clock The IPA core clock is required for SDX55. Define it. Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20210409134407.841137-1-elder@linaro.org Reviewed-by: Manivannan Sadhasivam Tested-by: Manivannan Sadhasivam Signed-off-by: Stephen Boyd commit 36a9346c225270262d9f34e66c91aa1723fa903f Author: Trond Myklebust Date: Thu Mar 25 21:20:32 2021 -0400 NFS: Don't set NFS_INO_REVAL_PAGECACHE in the inode cache validity It is no longer necessary to preserve the NFS_INO_REVAL_PAGECACHE flag. Signed-off-by: Trond Myklebust commit 13c0b082b6a90b1b87b5fb100983d05bcc75d9b6 Author: Trond Myklebust Date: Thu Mar 25 21:07:21 2021 -0400 NFS: Replace use of NFS_INO_REVAL_PAGECACHE when checking cache validity When checking cache validity, be more specific than just 'we want to check the page cache validity'. In almost all cases, we want to check that change attribute, and possibly also the size. Signed-off-by: Trond Myklebust commit 1f3208b2d6975f31b9c7c6bf174b84fe9c97492f Author: Trond Myklebust Date: Thu Mar 25 11:04:34 2021 -0400 NFS: Add a cache validity flag argument to nfs_revalidate_inode() Add an argument to nfs_revalidate_inode() to allow callers to specify which attributes they need to check for validity. Signed-off-by: Trond Myklebust commit 1f9f4328155a6944903e2364f38bb6ed1e1ea9e9 Author: Trond Myklebust Date: Mon Apr 12 20:08:00 2021 -0400 NFS: nfs_setattr_update_inode() should clear the suid/sgid bits When we do a 'chown' or 'chgrp', the server will clear the suid/sgid bits. Ensure that we mirror that in nfs_setattr_update_inode(). Signed-off-by: Trond Myklebust commit 7f4a8592ff29f19c5a2ca549d0973821319afaad Author: Gioh Kim Date: Mon Apr 12 10:40:02 2021 +0200 RDMA/rtrs-clt: destroy sysfs after removing session from active list A session can be removed dynamically by sysfs interface "remove_path" that eventually calls rtrs_clt_remove_path_from_sysfs function. The current rtrs_clt_remove_path_from_sysfs first removes the sysfs interfaces and frees sess->stats object. Second it removes the session from the active list. Therefore some functions could access non-connected session and access the freed sess->stats object even-if they check the session status before accessing the session. For instance rtrs_clt_request and get_next_path_min_inflight check the session status and try to send IO to the session. The session status could be changed when they are trying to send IO but they could not catch the change and update the statistics information in sess->stats object, and generate use-after-free problem. (see: "RDMA/rtrs-clt: Check state of the rtrs_clt_sess before reading its stats") This patch changes the rtrs_clt_remove_path_from_sysfs to remove the session from the active session list and then destroy the sysfs interfaces. Each function still should check the session status because closing or error recovery paths can change the status. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://lore.kernel.org/r/20210412084002.33582-1-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Reviewed-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 6bc950beff0c440ac567cdc4e7f4542a9920953d Author: Wang Wensheng Date: Thu Apr 8 11:31:32 2021 +0000 RDMA/srpt: Fix error return code in srpt_cm_req_recv() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: db7683d7deb2 ("IB/srpt: Fix login-related race conditions") Link: https://lore.kernel.org/r/20210408113132.87250-1-wangwensheng4@huawei.com Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Reviewed-by: Bart Van Assche Signed-off-by: Jason Gunthorpe commit 5aa54bd28ce2b066d82cdd515269b9d562bd6e66 Author: Håkon Bugge Date: Wed Mar 31 20:43:14 2021 +0200 rds: ib: Remove two ib_modify_qp() calls For some HCAs, ib_modify_qp() is an expensive operation running virtualized. For both the active and passive side, the QP returned by the CM has the state set to RTS, so no need for this excess RTS -> RTS transition. With IB Core's ability to set the RNR Retry timer, we use this interface to shave off another ib_modify_qp(). Fixes: ec16227e1414 ("RDS/IB: Infiniband transport") Link: https://lore.kernel.org/r/1617216194-12890-3-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 3aeffc46afde05140551abb49efaa4563adba38c Author: Håkon Bugge Date: Wed Mar 31 20:43:13 2021 +0200 IB/cma: Introduce rdma_set_min_rnr_timer() Introduce the ability for kernel ULPs to adjust the minimum RNR Retry timer. The INIT -> RTR transition executed by RDMA CM will be used for this adjustment. This avoids an additional ib_modify_qp() call. rdma_set_min_rnr_timer() must be called before the call to rdma_connect() on the active side and before the call to rdma_accept() on the passive side. The default value of RNR Retry timer is zero, which translates to 655 ms. When the receiver is not ready to accept a send messages, it encodes the RNR Retry timer value in the NAK. The requestor will then wait at least the specified time value before retrying the send. The 5-bit value to be supplied to the rdma_set_min_rnr_timer() is documented in IBTA Table 45: "Encoding for RNR NAK Timer Field". Link: https://lore.kernel.org/r/1617216194-12890-2-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Acked-by: Jason Gunthorpe Signed-off-by: Jason Gunthorpe commit d95af61df072a7d70b311a11c0c24cf7d8ccebd9 Author: Lu Jialin Date: Thu Apr 8 16:03:46 2021 +0800 cgroup/cpuset: fix typos in comments Change hierachy to hierarchy and unrechable to unreachable, no functionality changed. Signed-off-by: Lu Jialin Signed-off-by: Tejun Heo commit 63cdd7edfd2871e63f4ca001ff6b8e1e166a74ae Author: Trond Myklebust Date: Wed Mar 24 14:29:12 2021 -0400 NFS: Fix up statx() results If statx has valid attributes available that weren't asked for, then return them and set the result mask appropriately. Signed-off-by: Trond Myklebust commit e8764a6f96d3ca17be7466c7b0fddef64f4e3d14 Author: Trond Myklebust Date: Wed Mar 24 13:55:09 2021 -0400 NFS: Don't revalidate attributes that are not being asked for If the user doesn't set STATX_UID/GID/MODE, then don't care if they are known to be stale. Ditto if we're not being asked for the file size. Signed-off-by: Trond Myklebust commit 4cdfeb648ac56ef0f961549528ccebd76042f1d3 Author: Trond Myklebust Date: Wed Mar 24 12:29:41 2021 -0400 NFS: Fix up revalidation of space used Ensure that when the change attribute or the size change, we also remember to revalidate the space used. Signed-off-by: Trond Myklebust commit 50c7a7994dd20af56e4d47e90af10bab71b71001 Author: Trond Myklebust Date: Thu Mar 25 20:46:36 2021 -0400 NFS: NFS_INO_REVAL_PAGECACHE should mark the change attribute invalid When we're looking to revalidate the page cache, we should just ensure that we mark the change attribute invalid. Signed-off-by: Trond Myklebust commit 4eb6a8230b589eb2bb02c4ce7418032552ef6470 Author: Trond Myklebust Date: Thu Mar 25 15:59:53 2021 -0400 NFS: Mask out unsupported attributes in nfs_getattr() We don't currently support STATX_BTIME, so don't advertise it in the return values for nfs_getattr(). Signed-off-by: Trond Myklebust commit 8a27c7ccca3b0df83f13c591f58d68b057b67780 Author: Trond Myklebust Date: Thu Mar 25 15:45:09 2021 -0400 NFS: Fix up inode cache tracing Add missing enum definitions and missing entries for nfs_show_cache_validity(). Signed-off-by: Trond Myklebust commit 9fdbfad1777cb4638f489eeb62d85432010c0031 Author: Trond Myklebust Date: Mon Mar 29 16:46:05 2021 -0400 NFS: Deal correctly with attribute generation counter overflow We need to use unsigned long subtraction and then convert to signed in order to deal correcly with C overflow rules. Fixes: f5062003465c ("NFS: Set an attribute barrier on all updates") Signed-off-by: Trond Myklebust commit 99f23783224355e7022ceea9b8d9f62c0fd01bd8 Author: Trond Myklebust Date: Sun Mar 28 18:17:14 2021 -0400 NFSv4.2: Always flush out writes in nfs42_proc_fallocate() Whether we're allocating or delallocating space, we should flush out the pending writes in order to avoid races with attribute updates. Fixes: 1e564d3dbd68 ("NFSv4.2: Fix a race in nfs42_proc_deallocate()") Signed-off-by: Trond Myklebust commit e99812e1382f0bfb6149393262bc70645c9f537a Author: Trond Myklebust Date: Sun Mar 28 18:12:03 2021 -0400 NFS: Fix attribute bitmask in _nfs42_proc_fallocate() We can't use nfs4_fattr_bitmap as a bitmask, because it hasn't been filtered to represent the attributes supported by the server. Instead, let's revert to using server->cache_consistency_bitmask after adding in the missing SPACE_USED attribute. Fixes: 913eca1aea87 ("NFS: Fallocate should use the nfs4_fattr_bitmap") Signed-off-by: Trond Myklebust commit 332d1a0373be32a3a3c152756bca45ff4f4e11b5 Author: Trond Myklebust Date: Thu Mar 25 18:15:36 2021 -0400 NFS: nfs4_bitmask_adjust() must not change the server global bitmasks As currently set, the calls to nfs4_bitmask_adjust() will end up overwriting the contents of the nfs_server cache_consistency_bitmask field. The intention here should be to modify a private copy of that mask in the close/delegreturn/write arguments. Fixes: 76bd5c016ef4 ("NFSv4: make cache consistency bitmask dynamic") Signed-off-by: Trond Myklebust commit 481fc927c8289919cc0be58666fcd1b7da187a0c Author: Lorenzo Bianconi Date: Mon Apr 12 14:25:54 2021 +0200 mt76: mt7921: add rcu section in mt7921_mcu_tx_rate_report Introduce rcu section in mt7921_mcu_tx_rate_report before dereferencing wcid pointer otherwise loockdep will report the following issue: [ 115.245740] ============================= [ 115.245754] WARNING: suspicious RCU usage [ 115.245771] 5.10.20 #0 Not tainted [ 115.245784] ----------------------------- [ 115.245816] other info that might help us debug this: [ 115.245830] rcu_scheduler_active = 2, debug_locks = 1 [ 115.245845] 3 locks held by kworker/u4:1/20: [ 115.245858] #0: ffffff80065ab138 ((wq_completion)phy0){+.+.}-{0:0}, at: process_one_work+0x1f8/0x6b8 [ 115.245948] #1: ffffffc01198bdd8 ((work_completion)(&(&dev->mphy.mac_work)->work)){+.+.}-{0:0}, at: process_one_8 [ 115.246027] #2: ffffff8006543ce8 (&dev->mutex#2){+.+.}-{3:3}, at: mt7921_mac_work+0x60/0x2b0 [mt7921e] [ 115.246125] [ 115.246125] stack backtrace: [ 115.246142] CPU: 1 PID: 20 Comm: kworker/u4:1 Not tainted 5.10.20 #0 [ 115.246152] Hardware name: MediaTek MT7622 RFB1 board (DT) [ 115.246168] Workqueue: phy0 mt7921_mac_work [mt7921e] [ 115.246188] Call trace: [ 115.246201] dump_backtrace+0x0/0x1a8 [ 115.246213] show_stack+0x14/0x30 [ 115.246228] dump_stack+0xec/0x134 [ 115.246240] lockdep_rcu_suspicious+0xcc/0xdc [ 115.246255] mt7921_get_wtbl_info+0x2a4/0x310 [mt7921e] [ 115.246269] mt7921_mac_work+0x284/0x2b0 [mt7921e] [ 115.246281] process_one_work+0x2a0/0x6b8 [ 115.246293] worker_thread+0x40/0x440 [ 115.246305] kthread+0x144/0x148 [ 115.246317] ret_from_fork+0x10/0x18 Fixes: 1c099ab44727c ("mt76: mt7921: add MCU support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8ef7adc6beb2ef0bce83513dc9e4505e7b21e8c2 Author: Adam Ford Date: Mon Apr 12 08:26:19 2021 -0500 net: ethernet: ravb: Enable optional refclk For devices that use a programmable clock for the AVB reference clock, the driver may need to enable them. Add code to find the optional clock and enable it when available. Signed-off-by: Adam Ford Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 6f43735b6da64bd46bc1ee2af5edce584a09012d Author: Adam Ford Date: Mon Apr 12 08:26:18 2021 -0500 dt-bindings: net: renesas,etheravb: Add additional clocks The AVB driver assumes there is an external crystal, but it could be clocked by other means. In order to enable a programmable clock, it needs to be added to the clocks list and enabled in the driver. Since there currently only one clock, there is no clock-names list either. Update bindings to add the additional optional clock, and explicitly name both of them. Signed-off-by: Adam Ford Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Reviewed-by: Sergei Shtylyov Signed-off-by: David S. Miller commit 2afd17b4d0fc15cba0144e7a4c26549b0e829ce9 Author: Lorenzo Bianconi Date: Sun Apr 11 21:03:45 2021 +0200 mt76: mt7921: introduce MCU_EVENT_LP_INFO event parsing Report trace event related to MCU_EVENT_LP_INFO that is sent by the mcu when it is ready to enter in deep sleep state Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 66978204f71b36c2c0240e50c5789fae2d8b87a6 Author: Felix Fietkau Date: Sun Apr 11 16:58:50 2021 +0200 mt76: mt7615: always add rx header translation tlv when adding stations Ensures that header translation is disabled for interfaces that do not support it. Fixes: d4b98c63d7a7 ("mt76: mt7615: add support for rx decapsulation offload") Signed-off-by: Felix Fietkau commit 30ad36214ab52a5eb3475e012e6bf327f843aa48 Author: Ryder Lee Date: Fri Apr 9 00:36:32 2021 +0800 mt76: mt7615: add missing SPDX tag in mmio.c Resolve the following checkpatch.pl script warning: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 6d88629e158dc1a3f58a0f9b528fe0057d44e8f6 Author: Ryder Lee Date: Fri Apr 9 00:36:31 2021 +0800 mt76: mt7915: add mmio.c Add mmio.c in order to use mt76_bus_ops throughout the driver. It will be also shared with the future APSoC revision. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 0fda6d7bb5a29b241fba8d37b92567c6bec79655 Author: Ryder Lee Date: Tue Mar 30 01:25:00 2021 +0800 mt76: report Rx timestamp Frame reception timestamp (low 32-bits) that indicates the value of the local TSF timer value at the time the first bit of the MAC header in the received frame (PPDU unit) arriving at the MAC. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 92e916362ba58e080a8b8e97556d11670ea6ce3d Author: Felix Fietkau Date: Sun Apr 11 12:46:17 2021 +0200 mt76: mt7921: remove 80+80 MHz support capabilities This mode is not supported by the hardware Signed-off-by: Felix Fietkau commit b4403cee6400c5f679e9c4a82b91d61aa961eccf Author: Felix Fietkau Date: Tue Mar 23 22:47:37 2021 +0100 mt76: fix potential DMA mapping leak With buf uninitialized in mt76_dma_tx_queue_skb_raw, its field skip_unmap could potentially inherit a non-zero value from stack garbage. If this happens, it will cause DMA mappings for MCU command frames to not be unmapped after completion Fixes: 27d5c528a7ca ("mt76: fix double DMA unmap of the first buffer on 7615/7915") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau commit 4da64fe086d95daa66d0def40fbd1b02d4f813fd Author: Sean Wang Date: Tue Apr 6 11:34:39 2021 +0800 mt76: mt7921: reduce the data latency during hw scan Reduce the data latency during hw_scan by the split scan which would switch back to operational channel right after scanning each channel done. Suggested-by: Asda Wen Suggested-by: Soul Huang Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 49897c529f85504139a6e54417a65f26a07492d2 Author: Sean Wang Date: Tue Apr 6 11:34:37 2021 +0800 mt76: mt7921: fix the insmod hangs Fix the second insert module causing the device hangs after remove module. Fixes: 1c099ab44727 ("mt76: mt7921: add MCU support") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit e230f0c44f011f3270680a506b19b7e84c5e8923 Author: Sean Wang Date: Tue Apr 6 11:34:36 2021 +0800 mt76: mt7921: fix kernel crash when the firmware fails to download Fix kernel crash when the firmware is missing or fails to download. [ 9.444758] kernel BUG at drivers/pci/msi.c:375! [ 9.449363] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP [ 9.501033] pstate: a0400009 (NzCv daif +PAN -UAO) [ 9.505814] pc : free_msi_irqs+0x180/0x184 [ 9.509897] lr : free_msi_irqs+0x40/0x184 [ 9.513893] sp : ffffffc015193870 [ 9.517194] x29: ffffffc015193870 x28: 00000000f0e94fa2 [ 9.522492] x27: 0000000000000acd x26: 000000000000009a [ 9.527790] x25: ffffffc0152cee58 x24: ffffffdbb383e0d8 [ 9.533087] x23: ffffffdbb38628d0 x22: 0000000000040200 [ 9.538384] x21: ffffff8cf7de7318 x20: ffffff8cd65a2480 [ 9.543681] x19: ffffff8cf7de7000 x18: 0000000000000000 [ 9.548979] x17: ffffff8cf9ca03b4 x16: ffffffdc13ad9a34 [ 9.554277] x15: 0000000000000000 x14: 0000000000080800 [ 9.559575] x13: ffffff8cd65a2980 x12: 0000000000000000 [ 9.564873] x11: ffffff8cfa45d820 x10: ffffff8cfa45d6d0 [ 9.570171] x9 : 0000000000000040 x8 : ffffff8ccef1b780 [ 9.575469] x7 : aaaaaaaaaaaaaaaa x6 : 0000000000000000 [ 9.580766] x5 : ffffffdc13824900 x4 : ffffff8ccefe0000 [ 9.586063] x3 : 0000000000000000 x2 : 0000000000000000 [ 9.591362] x1 : 0000000000000125 x0 : ffffff8ccefe0000 [ 9.596660] Call trace: [ 9.599095] free_msi_irqs+0x180/0x184 [ 9.602831] pci_disable_msi+0x100/0x130 [ 9.606740] pci_free_irq_vectors+0x24/0x30 [ 9.610915] mt7921_pci_probe+0xbc/0x250 [mt7921e] [ 9.615693] pci_device_probe+0xd4/0x14c [ 9.619604] really_probe+0x134/0x2ec [ 9.623252] driver_probe_device+0x64/0xfc [ 9.627335] device_driver_attach+0x4c/0x6c [ 9.631506] __driver_attach+0xac/0xc0 [ 9.635243] bus_for_each_dev+0x8c/0xd4 [ 9.639066] driver_attach+0x2c/0x38 [ 9.642628] bus_add_driver+0xfc/0x1d0 [ 9.646365] driver_register+0x64/0xf8 [ 9.650101] __pci_register_driver+0x6c/0x7c [ 9.654360] init_module+0x28/0xfdc [mt7921e] [ 9.658704] do_one_initcall+0x13c/0x2d0 [ 9.662615] do_init_module+0x58/0x1e8 [ 9.666351] load_module+0xd80/0xeb4 [ 9.669912] __arm64_sys_finit_module+0xa8/0xe0 [ 9.674430] el0_svc_common+0xa4/0x16c [ 9.678168] el0_svc_compat_handler+0x2c/0x40 [ 9.682511] el0_svc_compat+0x8/0x10 [ 9.686076] Code: a94257f6 f9400bf7 a8c47bfd d65f03c0 (d4210000) [ 9.692155] ---[ end trace 7621f966afbf0a29 ]--- [ 9.697385] Kernel panic - not syncing: Fatal exception [ 9.702599] SMP: stopping secondary CPUs [ 9.706549] Kernel Offset: 0x1c03600000 from 0xffffffc010000000 [ 9.712456] PHYS_OFFSET: 0xfffffff440000000 [ 9.716625] CPU features: 0x080026,2a80aa18 [ 9.720795] Memory Limit: none Fixes: 5c14a5f944b9 ("mt76: mt7921: introduce mt7921e support") Reported-by: Claire Chang Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit d27139c54499de361c0be6ddf22b4bbaf416cabd Merge: 8043edee9a344 7294380c52116 Author: David S. Miller Date: Mon Apr 12 13:34:21 2021 -0700 Merge branch 'enetc-ptp' Yangbo Lu says: ==================== enetc: support PTP Sync packet one-step timestamping This patch-set is to add support for PTP Sync packet one-step timestamping. Since ENETC single-step register has to be configured dynamically per packet for correctionField offeset and UDP checksum update, current one-step timestamping packet has to be sent only when the last one completes transmitting on hardware. So, on the TX, this patch handles one-step timestamping packet as below: - Trasmit packet immediately if no other one in transfer, or queue to skb queue if there is already one in transfer. The test_and_set_bit_lock() is used here to lock and check state. - Start a work when complete transfer on hardware, to release the bit lock and to send one skb in skb queue if has. Changes for v2: - Rebased. - Fixed issues from patchwork checks. - netif_tx_lock for one-step timestamping packet sending. Changes for v3: - Used system workqueue. - Set bit lock when transmitted one-step packet, and scheduled work when completed. The worker cleared the bit lock, and transmitted one skb in skb queue if has, instead of a loop. ==================== Signed-off-by: David S. Miller commit 7294380c5211687aa4d66166984b152ee84caf5f Author: Yangbo Lu Date: Mon Apr 12 17:03:27 2021 +0800 enetc: support PTP Sync packet one-step timestamping This patch is to add support for PTP Sync packet one-step timestamping. Since ENETC single-step register has to be configured dynamically per packet for correctionField offeset and UDP checksum update, current one-step timestamping packet has to be sent only when the last one completes transmitting on hardware. So, on the TX, this patch handles one-step timestamping packet as below: - Trasmit packet immediately if no other one in transfer, or queue to skb queue if there is already one in transfer. The test_and_set_bit_lock() is used here to lock and check state. - Start a work when complete transfer on hardware, to release the bit lock and to send one skb in skb queue if has. And the configuration for one-step timestamping on ENETC before transmitting is, - Set one-step timestamping flag in extension BD. - Write 30 bits current timestamp in tstamp field of extension BD. - Update PTP Sync packet originTimestamp field with current timestamp. - Configure single-step register for correctionField offeset and UDP checksum update. Signed-off-by: Yangbo Lu Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit f768e75130159b5444ee691bbdd201bef8e5bb24 Author: Yangbo Lu Date: Mon Apr 12 17:03:26 2021 +0800 enetc: mark TX timestamp type per skb Mark TX timestamp type per skb on skb->cb[0], instead of global variable for all skbs. This is a preparation for one step timestamp support. For one-step timestamping enablement, there will be both one-step and two-step PTP messages to transfer. And a skb queue is needed for one-step PTP messages making sure start to send current message only after the last one completed on hardware. (ENETC single-step register has to be dynamically configured per message.) So, marking TX timestamp type per skb is required. Signed-off-by: Yangbo Lu Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit 8043edee9a344f1f2e641e53d6a03db17b29ba66 Merge: c82eaa4064f3c 0666ef7f61ca7 Author: David S. Miller Date: Mon Apr 12 13:31:27 2021 -0700 Merge branch 'ibmvnic-errors' Lijun Pan says: ==================== ibmvnic: improve error printing Patch 1 prints reset reason as a string. Patch 2 prints adapter state as a string. ==================== Signed-off-by: David S. Miller commit 0666ef7f61ca763897fdcd385d65555dd4764514 Author: Lijun Pan Date: Mon Apr 12 02:41:28 2021 -0500 ibmvnic: print adapter state as a string The adapter state can be added or deleted over different versions of the source code. Print a string instead of a number. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit caee7bf5b0a9a1b0956b5910f0c44278ec1a9bb4 Author: Lijun Pan Date: Mon Apr 12 02:41:27 2021 -0500 ibmvnic: print reset reason as a string The reset reason can be added or deleted over different versions of the source code. Print a string instead of a number. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit c82eaa4064f3c59f8b026a6b6e5f8693b5be92da Author: Lijun Pan Date: Mon Apr 12 02:40:59 2021 -0500 ibmvnic: clean up the remaining debugfs data structures Commit e704f0434ea6 ("ibmvnic: Remove debugfs support") did not clean up everything. Remove the remaining code. Signed-off-by: Lijun Pan Signed-off-by: David S. Miller commit 645b34a7b544686d82c6a082bc78df33c322cae9 Merge: a115d24a636e8 2671fa4dc0109 Author: David S. Miller Date: Mon Apr 12 13:27:11 2021 -0700 Merge branch 'netns-sysctl-isolation' Jonathon Reinhart says: ==================== Ensuring net sysctl isolation This patchset is the result of an audit of /proc/sys/net to prove that it is safe to be mouted read-write in a container when a net namespace is in use. See [1]. The first commit adds code to detect sysctls which are not netns-safe, and can "leak" changes to other net namespaces. My manual audit found, and the above feature confirmed, that there are two nf_conntrack sysctls which are in fact not netns-safe. I considered sending the latter to netfilter-devel, but I think it's better to have both together on net-next: Adding only the former causes undesirable warnings in the kernel log. [1]: https://github.com/opencontainers/runc/issues/2826 ==================== Signed-off-by: David S. Miller commit 2671fa4dc0109d3fb581bc3078fdf17b5d9080f6 Author: Jonathon Reinhart Date: Mon Apr 12 00:24:53 2021 -0400 netfilter: conntrack: Make global sysctls readonly in non-init netns These sysctls point to global variables: - NF_SYSCTL_CT_MAX (&nf_conntrack_max) - NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max) - NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user) Because their data pointers are not updated to point to per-netns structures, they must be marked read-only in a non-init_net ns. Otherwise, changes in any net namespace are reflected in (leaked into) all other net namespaces. This problem has existed since the introduction of net namespaces. The current logic marks them read-only only if the net namespace is owned by an unprivileged user (other than init_user_ns). Commit d0febd81ae77 ("netfilter: conntrack: re-visit sysctls in unprivileged namespaces") "exposes all sysctls even if the namespace is unpriviliged." Since we need to mark them readonly in any case, we can forego the unprivileged user check altogether. Fixes: d0febd81ae77 ("netfilter: conntrack: re-visit sysctls in unprivileged namespaces") Signed-off-by: Jonathon Reinhart Signed-off-by: David S. Miller commit 31c4d2f160eb7b17cbead24dc6efed06505a3fee Author: Jonathon Reinhart Date: Mon Apr 12 00:24:52 2021 -0400 net: Ensure net namespace isolation of sysctls This adds an ensure_safe_net_sysctl() check during register_net_sysctl() to validate that sysctl table entries for a non-init_net netns are sufficiently isolated. To be netns-safe, an entry must adhere to at least (and usually exactly) one of these rules: 1. It is marked read-only inside the netns. 2. Its data pointer does not point to kernel/module global data. An entry which fails both of these checks is indicative of a bug, whereby a child netns can affect global net sysctl values. If such an entry is found, this code will issue a warning to the kernel log, and force the entry to be read-only to prevent a leak. To test, simply create a new netns: $ sudo ip netns add dummy As it sits now, this patch will WARN for two sysctls which will be addressed in a subsequent patch: - /proc/sys/net/netfilter/nf_conntrack_max - /proc/sys/net/netfilter/nf_conntrack_expect_max Signed-off-by: Jonathon Reinhart Signed-off-by: David S. Miller commit a115d24a636e892ddd1ae58f8e23c78a0390cb68 Author: wengjianfeng Date: Mon Apr 12 10:20:06 2021 +0800 nfc: pn533: remove redundant assignment In many places,first assign a value to a variable and then return the variable. which is redundant, we should directly return the value. in pn533_rf_field funciton,return rc also in the if statement, so we use return 0 to replace the last return rc. Signed-off-by: wengjianfeng Signed-off-by: David S. Miller commit 5711ffd31355e17d87710e7691899409a640f58a Merge: 0d77036057789 ac797ced1fd0f Author: David S. Miller Date: Mon Apr 12 13:20:38 2021 -0700 Merge branch 'bnxt_en-error-recovery' Michael Chan says: ==================== bnxt_en: Error recovery fixes. This series adds some fixes and enhancements to the error recovery logic. The health register logic is improved and we also add missing code to free and re-create VF representors in the firmware after error recovery. ==================== Signed-off-by: David S. Miller commit ac797ced1fd0faba285c460eb1f64d1296b9cfa4 Author: Sriharsha Basavapatna Date: Sun Apr 11 20:18:15 2021 -0400 bnxt_en: Free and allocate VF-Reps during error recovery. During firmware recovery, VF-Rep configuration in the firmware is lost. Fix it by freeing and (re)allocating VF-Reps in FW at relevant points during the error recovery process. Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 90f4fd02968720bdeb38a16deeff96fa770206e4 Author: Michael Chan Date: Sun Apr 11 20:18:14 2021 -0400 bnxt_en: Refactor __bnxt_vf_reps_destroy(). Add a new helper function __bnxt_free_one_vf_rep() to free one VF rep. We also reintialize the VF rep fields to proper initial values so that the function can be used without freeing the VF rep data structure. This will be used in subsequent patches to free and recreate VF reps after error recovery. Reviewed-by: Edwin Peer Reviewed-by: Sriharsha Basavapatna Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit ea2d37b2b3079a896bc3f44a1962d3f01aa81b7f Author: Sriharsha Basavapatna Date: Sun Apr 11 20:18:13 2021 -0400 bnxt_en: Refactor bnxt_vf_reps_create(). Add a new function bnxt_alloc_vf_rep() to allocate a VF representor. This function will be needed in subsequent patches to recreate the VF reps after error recovery. Signed-off-by: Sriharsha Basavapatna Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 190eda1a9dbc47409073bec79b81f362e21973b6 Author: Vasundhara Volam Date: Sun Apr 11 20:18:12 2021 -0400 bnxt_en: Invalidate health register mapping at the end of probe. After probe is successful, interface may not be bought up in all the cases and health register mapping could be invalid if firmware undergoes reset. Fix it by invalidating the health register at the end of probe. It will be remapped during ifup. Fixes: 43a440c4007b ("bnxt_en: Improve the status_reliable flag in bp->fw_health.") Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 17e1be342d46eb0b7c3df4c7e623493483080b63 Author: Michael Chan Date: Sun Apr 11 20:18:11 2021 -0400 bnxt_en: Treat health register value 0 as valid in bnxt_try_reover_fw(). The retry loop in bnxt_try_recover_fw() should not abort when the health register value is 0. It is a valid value that indicates the firmware is booting up. Fixes: 861aae786f2f ("bnxt_en: Enhance retry of the first message to the firmware.") Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 0d770360577895a204634f01b4780e6fbf4adc95 Author: Andrea Mayer Date: Sat Apr 10 19:46:14 2021 +0200 net: seg6: trivial fix of a spelling mistake in comment There is a comment spelling mistake "interfarence" -> "interference" in function parse_nla_action(). Fix it. Signed-off-by: Andrea Mayer Signed-off-by: David S. Miller commit d0494135f94c7ab5a9cf7a9094fbb233275c7ba6 Author: Colin Ian King Date: Fri Apr 9 17:37:26 2021 +0100 net: hns3: Fix potential null pointer defererence of null ae_dev The reset_prepare and reset_done calls have a null pointer check on ae_dev however ae_dev is being dereferenced via the call to ns3_is_phys_func with the ae->pdev argument. Fix this by performing a null pointer check on ae_dev and hence short-circuiting the dereference to ae_dev on the call to ns3_is_phys_func. Addresses-Coverity: ("Dereference before null check") Fixes: 715c58e94f0d ("net: hns3: add suspend and resume pm_ops") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit e701a25840360706fe4cf5de0015913ca19c274b Author: Colin Ian King Date: Fri Apr 9 14:07:26 2021 +0100 net: thunderx: Fix unintentional sign extension issue The shifting of the u8 integers rq->caching by 26 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that rq->caching is greater than 0x1f then all then all the upper 32 bits of the u64 end up as also being set because of the int sign-extension. Fix this by casting the u8 values to a u64 before the 26 bit left shift. Addresses-Coverity: ("Unintended sign extension") Fixes: 4863dea3fab0 ("net: Adding support for Cavium ThunderX network controller") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit dd2c79677375c37f8f9f8d663eb4708495d595ef Author: Colin Ian King Date: Fri Apr 9 12:08:57 2021 +0100 cxgb4: Fix unintentional sign extension issues The shifting of the u8 integers f->fs.nat_lip[] by 24 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that the top bit of the u8 is set then all then all the upper 32 bits of the u64 end up as also being set because of the sign-extension. Fix this by casting the u8 values to a u64 before the 24 bit left shift. Addresses-Coverity: ("Unintended sign extension") Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 89bf9bb75e5b561585cd08b308f5064ede6e2b4c Merge: a38fd87484648 40f29839d8bef Author: Stephen Boyd Date: Mon Apr 12 12:40:32 2021 -0700 Merge tag 'v5.13-rockchip-clocks' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip Pull Rockchip clk driver updates from Heiko Stuebner: - Support for the clock controller on the new rk3568 - Some cleanups for rk3399 modularization * tag 'v5.13-rockchip-clocks' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: drop MODULE_ALIAS from rk3399 clock controller clk: rockchip: drop parenthesis from ARM || COMPILE_TEST depends clk: rockchip: add clock controller for rk3568 clk: rockchip: support more core div setting dt-binding: clock: Document rockchip, rk3568-cru bindings clk: rockchip: add dt-binding header for rk3568 commit a4d5ed3b54f0c66b331d81bebb2ba4a92abc43a3 Author: Qiheng Lin Date: Sat Apr 10 12:12:49 2021 +0800 power: supply: surface-charger: Make symbol 'surface_ac_pm_ops' static The sparse tool complains as follows: drivers/power/supply/surface_charger.c:229:1: warning: symbol 'surface_ac_pm_ops' was not declared. Should it be static? This symbol is not used outside of surface_charger.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Acked-by: Maximilian Luz Signed-off-by: Sebastian Reichel commit 5ea2edd67a0467920e01c4909194e720d437fa26 Author: Qiheng Lin Date: Sat Apr 10 12:12:46 2021 +0800 power: supply: surface-battery: Make some symbols static The sparse tool complains as follows: drivers/power/supply/surface_battery.c:700:1: warning: symbol 'dev_attr_alarm' was not declared. Should it be static? drivers/power/supply/surface_battery.c:805:1: warning: symbol 'surface_battery_pm_ops' was not declared. Should it be static? This symbol is not used outside of surface_battery.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Acked-by: Maximilian Luz Signed-off-by: Sebastian Reichel commit e318c3c2ae7d64ae47467044523bd3e2da5c5ce6 Author: Bixuan Cui Date: Sat Apr 10 11:50:40 2021 +0800 power: reset: restart-poweroff: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Signed-off-by: Sebastian Reichel commit 089cde07977cccbc6a0729485a9bee04fb86c9ea Merge: 6043357263fbe 4a46f88681ca5 Author: Mark Brown Date: Mon Apr 12 19:56:27 2021 +0100 Merge series "Minor updates for hisi-sfc-v3xx" from Yicong Yang : This series fix a potential interrupt race condition and cleanup the ACPI protection for the driver. Change since v1: - reword the commit in patch #2 Link: https://lore.kernel.org/linux-spi/1617881505-51552-1-git-send-email-yangyicong@hisilicon.com/ Yicong Yang (2): spi: hisi-sfc-v3xx: fix potential irq race condition spi: hisi-sfc-v3xx: drop unnecessary ACPI_PTR and related ifendif protection drivers/spi/spi-hisi-sfc-v3xx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.8.1 commit 13a9e21b80abf7956f8127304a07863ff2476828 Merge: 2976eef29ec58 4ad03f894b3c9 Author: Mark Brown Date: Mon Apr 12 19:56:23 2021 +0100 Merge series "ASoC: SOF: Intel: descriptor corrections for TGL and ADL" from Pierre-Louis Bossart : One missed property for TigerLake and need for separate descriptors between ADL-S and the other flavors. Libin Yang (1): ASoC: SOF: Intel: add missing use_acpi_target_states for TGL platforms Sathya Prakash M R (1): ASoC: SOF: Intel: Update ADL P to use its own descriptor sound/soc/sof/intel/pci-tgl.c | 20 +++++++++++++++++++- sound/soc/sof/intel/tgl.c | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) -- 2.25.1 commit 2976eef29ec5875e42418dd90d71f7654aec8362 Merge: 6fede18b0c1ee 4d1284cd79529 Author: Mark Brown Date: Mon Apr 12 19:56:22 2021 +0100 Merge series "ASoC: SOF: simplify probe and report errors" from Ranjani Sridharan : These patches simplify the sof_probe_complete handling and address reporting of errors during probe. Peter Ujfalusi (2): ASoC: SOF: core: Add missing error prints to device probe operation ASoC: SOF: Simplify sof_probe_complete handling for acpi/pci/of sound/soc/sof/core.c | 9 +++++++-- sound/soc/sof/sof-acpi-dev.c | 18 +++--------------- sound/soc/sof/sof-of-dev.c | 18 +++--------------- sound/soc/sof/sof-pci-dev.c | 20 ++++---------------- 4 files changed, 17 insertions(+), 48 deletions(-) -- 2.25.1 commit 6fede18b0c1ee6cd6f19408c34c78246d47a0841 Merge: 7459f8b703db5 4c1cc83fcc7e0 Author: Mark Brown Date: Mon Apr 12 19:56:21 2021 +0100 Merge series "ASoC: SOF: simplify nocodec mode" from Ranjani Sridharan : This set of patches simplify the implementation of nocodec mode in SOF. Pierre-Louis Bossart (6): ASoC: SOF: add Kconfig option for probe workqueues ASoC: soc-acpi: add new fields for mach_params ASoC: SOF: change signature of set_mach_params() callback ASoC: SOF: Intel: update set_mach_params() ASoC: SOF: pcm: export snd_pcm_dai_link_fixup ASOC: SOF: simplify nocodec mode include/sound/soc-acpi.h | 4 ++++ include/sound/sof.h | 3 --- sound/soc/sof/Kconfig | 11 +++++++++++ sound/soc/sof/intel/bdw.c | 8 ++++++-- sound/soc/sof/intel/byt.c | 22 +++++++++++++--------- sound/soc/sof/intel/hda.c | 8 ++++++-- sound/soc/sof/intel/hda.h | 2 +- sound/soc/sof/nocodec.c | 39 +++++++++++++++++++++------------------ sound/soc/sof/ops.h | 6 ++---- sound/soc/sof/pcm.c | 1 + sound/soc/sof/sof-audio.c | 34 +++++++++++++++------------------- sound/soc/sof/sof-priv.h | 2 +- 12 files changed, 81 insertions(+), 59 deletions(-) -- 2.25.1 commit 8166e0090511275f0da13a09824bdb43c7972405 Author: Ye Bin Date: Fri Apr 9 17:51:47 2021 +0800 RDMA/i40iw: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Link: https://lore.kernel.org/r/20210409095147.2294269-1-yebin10@huawei.com Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Jason Gunthorpe commit 22efb0a8d130c6379c1eb64cbace1542b27e37ff Author: Wang Wensheng Date: Thu Apr 8 11:31:37 2021 +0000 RDMA/bnxt_re: Fix error return code in bnxt_qplib_cq_process_terminal() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Link: https://lore.kernel.org/r/20210408113137.97202-1-wangwensheng4@huawei.com Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Signed-off-by: Jason Gunthorpe commit 4c7d9c69adadfc31892c7e8e134deb3546552106 Author: Wang Wensheng Date: Thu Apr 8 11:31:40 2021 +0000 IB/hfi1: Fix error return code in parse_platform_config() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Link: https://lore.kernel.org/r/20210408113140.103032-1-wangwensheng4@huawei.com Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Signed-off-by: Jason Gunthorpe commit 10dd83dbcd157baf7a78a09ddb2f84c627bc7f1d Author: Wang Wensheng Date: Thu Apr 8 11:31:35 2021 +0000 RDMA/qedr: Fix error return code in qedr_iw_connect() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 82af6d19d8d9 ("RDMA/qedr: Fix synchronization methods and memory leaks in qedr") Link: https://lore.kernel.org/r/20210408113135.92165-1-wangwensheng4@huawei.com Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Acked-by: Michal Kalderon  Signed-off-by: Jason Gunthorpe commit 26caea5fda6e6f3d0dfeb26e71afd1623fab38c6 Author: Wenpeng Liang Date: Wed Apr 7 16:15:52 2021 +0800 RDMA/core: Correct format of block comments Block comments should not use a trailing */ on a separate line and every line of a block comment should start with an '*'. Link: https://lore.kernel.org/r/1617783353-48249-7-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit b6eb7011f561a29d91f290e02a8dabee8169da9d Author: Wenpeng Liang Date: Wed Apr 7 16:15:51 2021 +0800 RDMA/core: Correct format of braces Do following cleanups about braces: - Add the necessary braces to maintain context alignment. - Fix the open '{' that is not on the same line as "switch". - Remove braces that are not necessary for single statement blocks. - Fix "else" that doesn't follow close brace '}'. Link: https://lore.kernel.org/r/1617783353-48249-6-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit f681967ae7d5d3d28e67f754f069bf6cdc87a0d2 Author: Wenpeng Liang Date: Wed Apr 7 16:15:50 2021 +0800 RDMA/core: Remove redundant spaces Space is not required after '(', before ')', before ',' and between '*' and symbol name of a definition. Link: https://lore.kernel.org/r/1617783353-48249-5-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 9516b8f9ec663ad3e385ea98c0a3b7c5ba03b9e2 Author: Wenpeng Liang Date: Wed Apr 7 16:15:49 2021 +0800 RDMA/core: Add necessary spaces Space is required before '(' of switch statements and around '='. Link: https://lore.kernel.org/r/1617783353-48249-4-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 9279c35b63e587f7810f19a6a702ec649121dff3 Author: Wenpeng Liang Date: Wed Apr 7 16:15:48 2021 +0800 RDMA/core: Remove the redundant return statements The return statements at the end of a void function is meaningless. Link: https://lore.kernel.org/r/1617783353-48249-3-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ab27f45fdfcc6a0035a2589998e0f358e133893c Author: Wenpeng Liang Date: Wed Apr 7 16:15:47 2021 +0800 RDMA/core: Print the function name by __func__ instead of an fixed string It's better to use __func__ than a fixed string to print a function's name. Link: https://lore.kernel.org/r/1617783353-48249-2-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 523caed9efbb049339706b124185c9358c1b6477 Author: Wei Yongjun Date: Mon Apr 12 16:00:23 2021 +0000 x86/sgx: Mark sgx_vepc_vm_ops static Fix the following sparse warning: arch/x86/kernel/cpu/sgx/virt.c:95:35: warning: symbol 'sgx_vepc_vm_ops' was not declared. Should it be static? This symbol is not used outside of virt.c so mark it static. [ bp: Massage commit message. ] Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210412160023.193850-1-weiyongjun1@huawei.com commit 020505581119d191ee8da478783e2465d7f5fa8e Author: Andy Shevchenko Date: Sat Apr 10 17:02:53 2021 +0300 ACPI: scan: Utilize match_string() API We have already an API to match a string in the array of strings. Utilize it instead of open coded analogues. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit 4ad03f894b3c96d77e51474f0c9731793fac412e Author: Sathya Prakash M R Date: Mon Apr 12 11:15:19 2021 -0500 ASoC: SOF: Intel: Update ADL P to use its own descriptor ADL P has specific machines and hence having its own table will help separate the machines and FW Reviewed-by: Bard Liao Reviewed-by: Kai Vehmanen Signed-off-by: Sathya Prakash M R Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210412161519.13508-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1b9889974ce93dea50d010972a93c0eb529ac612 Author: Libin Yang Date: Mon Apr 12 11:15:18 2021 -0500 ASoC: SOF: Intel: add missing use_acpi_target_states for TGL platforms All Intel TigerLake platforms should support the feature of getting the system state from acpi to deal with S0ix support. This was missed in previous commits, likely due to copy/paste from older code. Reviewed-by: Ranjani Sridharan Signed-off-by: Libin Yang Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210412161519.13508-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a0354d230843da87c2853c6fed2d5860259bef49 Merge: 69455df04e123 e71b75f73763d Author: Jason Gunthorpe Date: Mon Apr 12 13:49:48 2021 -0300 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== This pr contains changes from mlx5-next branch, already reviewed on netdev and rdma mailing lists, links below. 1) From Leon, Dynamically assign MSI-X vectors count Already Acked by Bjorn Helgaas. https://patchwork.kernel.org/project/netdevbpf/cover/20210314124256.70253-1-leon@kernel.org/ 2) Cleanup series: https://patchwork.kernel.org/project/netdevbpf/cover/20210311070915.321814-1-saeed@kernel.org/ From Mark, E-Switch cleanups and refactoring, and the addition of single FDB mode needed HW bits. From Mikhael, Remove unused struct field From Saeed, Cleanup W=1 prototype warning From Zheng, Esw related cleanup From Tariq, User order-0 page allocation for EQs ==================== * mlx5-next: net/mlx5: Implement sriov_get_vf_total_msix/count() callbacks net/mlx5: Dynamically assign MSI-X vectors count net/mlx5: Add dynamic MSI-X capabilities bits PCI/IOV: Add sysfs MSI-X vector assignment interface net/mlx5: Use order-0 allocations for EQs net/mlx5: Add IFC bits needed for single FDB mode net/mlx5: E-Switch, Refactor send to vport to be more generic RDMA/mlx5: Use representor E-Switch when getting netdev and metadata net/mlx5: E-Switch, Add eswitch pointer to each representor net/mlx5: E-Switch, Add match on vhca id to default send rules net/mlx5: Remove unused mlx5_core_health member recover_work net/mlx5: simplify the return expression of mlx5_esw_offloads_pair() net/mlx5: Cleanup prototype warning Signed-off-by: Jason Gunthorpe commit 9169cff168ff262b4b78597f542e23843d0c494a Author: Jason Gunthorpe Date: Tue Apr 6 16:40:41 2021 -0300 vfio/mdev: Correct the function signatures for the mdev_type_attributes The driver core standard is to pass in the properly typed object, the properly typed attribute and the buffer data. It stems from the root kobject method: ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,..) Each subclass of kobject should provide their own function with the same signature but more specific types, eg struct device uses: ssize_t (*show)(struct device *dev, struct device_attribute *attr,..) In this case the existing signature is: ssize_t (*show)(struct kobject *kobj, struct device *dev,..) Where kobj is a 'struct mdev_type *' and dev is 'mdev_type->parent->dev'. Change the mdev_type related sysfs attribute functions to: ssize_t (*show)(struct mdev_type *mtype, struct mdev_type_attribute *attr,..) In order to restore type safety and match the driver core standard There are no current users of 'attr', but if it is ever needed it would be hard to add in retroactively, so do it now. Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Message-Id: <18-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit c2ef2f50ad0ccf5460bf4824bc6669240b6c7936 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:40 2021 -0300 vfio/mdev: Remove kobj from mdev_parent_ops->create() The kobj here is a type-erased version of mdev_type, which is already stored in the struct mdev_device being passed in. It was only ever used to compute the type_group_id, which is now extracted directly from the mdev. Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Message-Id: <17-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 383987fd15ba8f37bdc20994dadeb13df76342d6 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:39 2021 -0300 vfio/gvt: Use mdev_get_type_group_id() intel_gvt_init_vgpu_type_groups() makes gvt->types 1:1 with the supported_type_groups array, so the type_group_id is also the index into gvt->types. Use it directly and remove the string matching. Reviewed-by: Kevin Tian Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Message-Id: <16-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Reviewed-by: Zhenyu Wang Signed-off-by: Alex Williamson commit 07e543f4f9d116d6b4240644191dee6388ef4a85 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:38 2021 -0300 vfio/gvt: Make DRM_I915_GVT depend on VFIO_MDEV At some point there may have been some reason for this weird split in this driver, but today only the VFIO side is actually implemented. However, it got messed up at some point and mdev code was put in gvt.c and is pretending to be "generic" by masquerading as some generic attribute list: static MDEV_TYPE_ATTR_RO(description); But MDEV_TYPE attributes are only usable with mdev_device, nothing else. Ideally all of this would be moved to kvmgt.c, but it is entangled with the rest of the "generic" code in an odd way. Thus put in a kconfig dependency so we don't get randconfig failures when the next patch creates a link time dependency related to the use of MDEV_TYPE. Reviewed-by: Kevin Tian Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Message-Id: <15-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Acked-by: Zhenyu Wang Signed-off-by: Alex Williamson commit 6043357263fbe2df0bf0736d971ad5dce7d19dc1 Author: Wei Yongjun Date: Mon Apr 12 16:00:25 2021 +0000 spi: spi-zynqmp-gqspi: Fix missing unlock on error in zynqmp_qspi_exec_op() Add the missing unlock before return from function zynqmp_qspi_exec_op() in the error handling case. Fixes: a0f65be6e880 ("spi: spi-zynqmp-gqspi: add mutex locking for exec_op") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210412160025.194171-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit 4a46f88681ca514f9cb33b39312d0ec4e2ec84da Author: Yicong Yang Date: Mon Apr 12 19:58:28 2021 +0800 spi: hisi-sfc-v3xx: drop unnecessary ACPI_PTR and related ifendif protection We use ACPI_PTR() and related ifendif protection for the id table. This is unnecessary as the struct acpi_device_id is defined in mod_devicetable.h and doesn't rely on ACPI. The driver doesn't use any ACPI apis, so it can be compiled in the ACPI=n case with no warnings. So remove the ACPI_PTR and related ifendif protection, also replace the header acpi.h with mod_devicetable.h. Acked-by: John Garry Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/1618228708-37949-3-git-send-email-yangyicong@hisilicon.com Signed-off-by: Mark Brown commit 4c84e42d29afa3dce201a4db747db2a5ba404604 Author: Yicong Yang Date: Mon Apr 12 19:58:27 2021 +0800 spi: hisi-sfc-v3xx: fix potential irq race condition We mask the irq when the command completion is timeout. This won't stop the already running irq handler. Use sychronize_irq() after we mask the irq, to make sure there is no running handler. Acked-by: John Garry Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/1618228708-37949-2-git-send-email-yangyicong@hisilicon.com Signed-off-by: Mark Brown commit 7459f8b703db589e1fa6482449cd681a6a612189 Author: Ranjani Sridharan Date: Fri Apr 9 15:05:22 2021 -0700 ASoC: SOF: topology: remove useless code The patch "ASoC: SOF: Intel: hda: assign link DMA channel at run-time" fixed the sof_link_hda_unload() to remove the call to the BE hw_free op but left the rest of code that become redundant. So, remove sof_link_hda_unload() along with the link_unload() op entirely as it is not longer needed. Reported-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220522.1542865-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit b2fe85790d8d67ae25af58ff94673afc6cb081d9 Author: Libin Yang Date: Fri Apr 9 15:13:08 2021 -0700 ASoC: SOF: Kconfig: fix typo of SND_SOC_SOF_PCI It should be 'endif ## SND_SOC_SOF_PCI' instead of 'endif ## SND_SOC_SOF_INTEL_PCI' Signed-off-by: Libin Yang Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409221308.1544000-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 4c1cc83fcc7e02f6f6f76da2ea66af86a95fd675 Author: Pierre-Louis Bossart Date: Fri Apr 9 15:01:21 2021 -0700 ASOC: SOF: simplify nocodec mode Replace ugly #if (!IS_ENABLED) by if (!IS_ENABLED), remove cross-module dependencies and use classic mechanism to pass information to the machine driver. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220121.1542362-7-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit f3f3af1743350fdc7c373772fb3740dc223db8e5 Author: Pierre-Louis Bossart Date: Fri Apr 9 15:01:20 2021 -0700 ASoC: SOF: pcm: export snd_pcm_dai_link_fixup In preparation of the nocodec refactoring, export the dai-link fixup. This will also be required when we have more clients and platform drivers. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220121.1542362-6-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 974cccf490ebbc0c7ea0d19edd88542cef174d38 Author: Pierre-Louis Bossart Date: Fri Apr 9 15:01:19 2021 -0700 ASoC: SOF: Intel: update set_mach_params() Add information for num_dai_drivers and dai_drivers[], which will be used in the refactored nocodec implementation Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220121.1542362-5-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 17e9d6b0a395a1d8973a9e1d20db88d791e157b1 Author: Pierre-Louis Bossart Date: Fri Apr 9 15:01:18 2021 -0700 ASoC: SOF: change signature of set_mach_params() callback To set additional parameters, we need to have access to sdev, not the plain vanilla struct device pointer. No functionality change. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220121.1542362-4-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit ca6a0122557faa4fa01d6dbfa742870c33c46218 Author: Pierre-Louis Bossart Date: Fri Apr 9 15:01:17 2021 -0700 ASoC: soc-acpi: add new fields for mach_params We currently have an ugly way of handling the SOF nocodec mode, with blatant violations between layers. To create the nocodec card, let's add two new fields and the existing mach_params structure, that way there will be no differences with regular cards. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220121.1542362-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit e4330cae2a8cf4e4f3004947794bdd549e32cede Author: Pierre-Louis Bossart Date: Fri Apr 9 15:01:16 2021 -0700 ASoC: SOF: add Kconfig option for probe workqueues The probe workqueue is currently used in the HDaudio case, following the example of the snd-hda-intel driver. For development and validation, it's useful to enable the probe workqueue even with ACPI devices or NOCODEC mode. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Kai Vehmanen Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220121.1542362-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 4d1284cd795296e4aa7be6db5fdce85f31374520 Author: Peter Ujfalusi Date: Fri Apr 9 15:09:59 2021 -0700 ASoC: SOF: Simplify sof_probe_complete handling for acpi/pci/of Set the sof_data->sof_probe_complete callback unconditionally of CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE. The sof_probe_complete will be called when the sof_probe_continue() function is successfully executed, called either directly from snd_sof_device_probe() or from the scheduled work. Since all error cases within the call chain of snd_sof_device_probe() have error prints, there is no need to print again in the acpi/pci/of level. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220959.1543456-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit 3bcae98e101727457c727b354c95c3ea8f074dce Author: Peter Ujfalusi Date: Fri Apr 9 15:09:58 2021 -0700 ASoC: SOF: core: Add missing error prints to device probe operation Two error cases in snd_sof_device_probe() and sof_probe_continue() are missing error prints. If either of them happens it is not possible to identify the reason for the failure. Add dev_err() prints for the cases to aim debugging. Signed-off-by: Peter Ujfalusi Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409220959.1543456-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit aadb2bb83ff789de63b48b4edeab7329423a50d3 Author: Cong Wang Date: Wed Apr 7 20:05:56 2021 -0700 sock_map: Fix a potential use-after-free in sock_map_close() The last refcnt of the psock can be gone right after sock_map_remove_links(), so sk_psock_stop() could trigger a UAF. The reason why I placed sk_psock_stop() there is to avoid RCU read critical section, and more importantly, some callee of sock_map_remove_links() is supposed to be called with RCU read lock, we can not simply get rid of RCU read lock here. Therefore, the only choice we have is to grab an additional refcnt with sk_psock_get() and put it back after sk_psock_stop(). Fixes: 799aa7f98d53 ("skmsg: Avoid lock_sock() in sk_psock_backlog()") Reported-by: syzbot+7b6548ae483d6f4c64ae@syzkaller.appspotmail.com Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210408030556.45134-1-xiyou.wangcong@gmail.com commit 51e0158a54321a48d260e95998393934bb0de52c Author: Cong Wang Date: Tue Apr 6 20:21:11 2021 -0700 skmsg: Pass psock pointer to ->psock_update_sk_prot() Using sk_psock() to retrieve psock pointer from sock requires RCU read lock, but we already get psock pointer before calling ->psock_update_sk_prot() in both cases, so we can just pass it without bothering sk_psock(). Fixes: 8a59f9d1e3d4 ("sock: Introduce sk->sk_prot->psock_update_sk_prot()") Reported-by: syzbot+320a3bc8d80f478c37e4@syzkaller.appspotmail.com Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Tested-by: syzbot+320a3bc8d80f478c37e4@syzkaller.appspotmail.com Reviewed-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210407032111.33398-1-xiyou.wangcong@gmail.com commit f70865db5ff35f5ed0c7e9ef63e7cca3d4947f04 Author: Pavel Begunkov Date: Sun Apr 11 01:46:40 2021 +0100 io_uring: return back safer resurrect Revert of revert of "io_uring: wait potential ->release() on resurrect", which adds a helper for resurrect not racing completion reinit, as was removed because of a strange bug with no clear root or link to the patch. Was improved, instead of rcu_synchronize(), just wait_for_completion() because we're at 0 refs and it will happen very shortly. Specifically use non-interruptible version to ignore all pending signals that may have ended prior interruptible wait. This reverts commit cb5e1b81304e089ee3ca948db4d29f71902eb575. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7a080c20f686d026efade810b116b72f88abaff9.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e4335ed33eb54ba00c58557753dc84c0ee762ef1 Author: Pavel Begunkov Date: Sun Apr 11 01:46:39 2021 +0100 io_uring: improve hardlink code generation req_set_fail_links() condition checking is bulky. Even though it's always in a slow path, it's inlined and generates lots of extra code, simplify it be moving HARDLINK checking into helpers killing linked requests. text data bss dec hex filename before: 79318 12330 8 91656 16608 ./fs/io_uring.o after: 79126 12330 8 91464 16548 ./fs/io_uring.o Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/96a9387db658a9d5a44ecbfd57c2a62cb888c9b6.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 88885f66e8c66311923c16caf1ccb6415ebfef72 Author: Pavel Begunkov Date: Sun Apr 11 01:46:38 2021 +0100 io_uring: improve sqo stop Set IO_SQ_THREAD_SHOULD_STOP before taking sqd lock, so the sqpoll task sees earlier. Not a problem, it will stop eventually. Also check invariant that it's stopped only once. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/653b24ee93843a50ff65a45847d9138f5adb76d7.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit aeca241b0bdd831ad5706605f5e09b44fe940220 Author: Pavel Begunkov Date: Sun Apr 11 01:46:37 2021 +0100 io_uring: split file table from rsrc nodes We don't need to store file tables in rsrc nodes, for now it's easier to handle tables not generically, so move file tables into the context. A nice side effect is having one less pointer dereference for request with fixed file initialisation. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/de9fc4cd3545f24c26c03be4556f58ba3d18b9c3.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 87094465d01a248cd888b81da0e6bc10324d4dc0 Author: Pavel Begunkov Date: Sun Apr 11 01:46:36 2021 +0100 io_uring: cleanup buffer register In preparation for more changes do a little cleanup of io_sqe_buffers_register(). Move all args/invariant checking into it from io_buffers_map_alloc(), because it's confusing. And add a bit more cleaning for the loop. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/93292cb9708c8455e5070cc855861d94e11ca042.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 7f61a1e9ef511660d66ea926b5899559fe94b1d0 Author: Pavel Begunkov Date: Sun Apr 11 01:46:35 2021 +0100 io_uring: add buffer unmap helper Add a helper for unmapping registered buffers, better than double indexing and will be reused in the future. Suggested-by: Bijan Mottahedeh Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/66cbc6ea863be865bac7b7080ed6a3d5c542b71f.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3e9424989b59fbab5b46d1db29b271cd29643ab4 Author: Pavel Begunkov Date: Sun Apr 11 01:46:34 2021 +0100 io_uring: simplify io_rsrc_data refcounting We don't take many references of struct io_rsrc_data, only one per each io_rsrc_node, so using percpu refs is overkill. Use atomic ref instead, which is much simpler. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1551d90f7c9b183cf2f0d7b5e5b923430acb03fa.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit cbaa683bb3923df4d3c12481bff6cb6d8fdbc060 Author: Daniel Borkmann Date: Mon Apr 12 17:19:00 2021 +0200 bpf: Sync bpf headers in tooling infrastucture Synchronize tools/include/uapi/linux/bpf.h which was missing changes from various commits: - f3c45326ee71 ("bpf: Document PROG_TEST_RUN limitations") - e5e35e754c28 ("bpf: BPF-helper for MTU checking add length input") Signed-off-by: Daniel Borkmann commit 5f03414d4098b5718f1a5e99b43b9d9cb6f3612a Author: Christoph Hellwig Date: Mon Apr 12 15:46:58 2021 +0200 block: move bio_list_copy_data to pktcdvd bio_list_copy_data is only used by pktcdvd, so move it there. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210412134658.2623190-2-hch@lst.de Reviewed-by: Johannes Thumshirn Signed-off-by: Jens Axboe commit 6f822e1b5d9dda3d20e87365de138046e3baa03a Author: Christoph Hellwig Date: Mon Apr 12 15:46:57 2021 +0200 block: remove zero_fill_bio_iter zero_fill_bio_iter is only used to implement zero_fill_bio, so remove the indirection. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20210412134658.2623190-1-hch@lst.de Signed-off-by: Jens Axboe commit f3c45326ee71d1d3ec11e9ddb5afc04bca9ae492 Author: Joe Stringer Date: Sat Apr 10 10:45:48 2021 -0700 bpf: Document PROG_TEST_RUN limitations Per net/bpf/test_run.c, particular prog types have additional restrictions around the parameters that can be provided, so document these in the header. I didn't bother documenting the limitation on duration for raw tracepoints since that's an output parameter anyway. Tested with ./tools/testing/selftests/bpf/test_doc_build.sh. Suggested-by: Yonghong Song Signed-off-by: Joe Stringer Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20210410174549.816482-1-joe@cilium.io commit dbd815c0dccadffbee5c9780308858fd07669ce2 Author: Lifu Chen Date: Sat Mar 27 17:52:25 2021 +0800 MIPS: Alchemy: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Lifu Chen Signed-off-by: Thomas Bogendoerfer commit 6decd1aad15f56b169217789630a0098b496de0e Author: Ilya Lipnitskiy Date: Wed Apr 7 13:07:38 2021 -0700 MIPS: add support for buggy MT7621S core detection Most MT7621 SoCs have 2 cores, which is detected and supported properly by CPS. Unfortunately, MT7621 SoC has a less common S variant with only one core. On MT7621S, GCR_CONFIG still reports 2 cores, which leads to hangs when starting SMP. CPULAUNCH registers can be used in that case to detect the absence of the second core and override the GCR_CONFIG PCORES field. Rework a long-standing OpenWrt patch to override the value of mips_cps_numcores on single-core MT7621 systems. Tested on a dual-core MT7621 device (Ubiquiti ER-X) and a single-core MT7621 device (Netgear R6220). Original 4.14 OpenWrt patch: Link: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=4cdbc90a376dd0555201c1434a2081e055e9ceb7 Current 5.10 OpenWrt patch: Link: https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ramips/patches-5.10/320-mt7621-core-detect-hack.patch;h=c63f0f4c1ec742e24d8480e80553863744b58f6a;hb=10267e17299806f9885d086147878f6c492cb904 Suggested-by: Felix Fietkau Signed-off-by: Ilya Lipnitskiy Signed-off-by: Thomas Bogendoerfer commit e607ff630c6053ecc67502677c0e50053d7892d4 Author: Nathan Chancellor Date: Fri Apr 9 12:21:28 2021 -0700 MIPS: generic: Update node names to avoid unit addresses With the latest mkimage from U-Boot 2021.04, the generic defconfigs no longer build, failing with: /usr/bin/mkimage: verify_header failed for FIT Image support with exit code 1 This is expected after the linked U-Boot commits because '@' is forbidden in the node names due to the way that libfdt treats nodes with the same prefix but different unit addresses. Switch the '@' in the node name to '-'. Drop the unit addresses from the hash and kernel child nodes because there is only one node so they do not need to have a number to differentiate them. Cc: stable@vger.kernel.org Link: https://source.denx.de/u-boot/u-boot/-/commit/79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4 Link: https://source.denx.de/u-boot/u-boot/-/commit/3f04db891a353f4b127ed57279279f851c6b4917 Suggested-by: Simon Glass Signed-off-by: Nathan Chancellor Reviewed-by: Tom Rini Signed-off-by: Thomas Bogendoerfer commit ddb002d6d6af12c45dd9d565cadf0f40b36b7c25 Author: Thomas Bogendoerfer Date: Thu Apr 8 20:14:37 2021 +0200 MIPS: uaccess: Reduce number of nested macros Clean up macros even further after removal get_fs/set_fs. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Christoph Hellwig commit 9bc46a12c53d8268392774172742aa9e5dd6953d Merge: 5bdb080f9603c 10076de33b5ed Author: Greg Kroah-Hartman Date: Mon Apr 12 16:21:35 2021 +0200 Merge tag 'usb-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: Several Cadence3 improvements are introduced in v5.13-rc1: - Add recovery during resume if the controller was lost power at system suspend - Reduce DMA memory footprint - Other small improvements * tag 'usb-v5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb: usb: cdnsp: Fixes issue with Configure Endpoint command usb: cdnsp: remove redundant initialization of variable ret usb: cdns3: delete repeated clear operations usb: cdns3: Optimize DMA request buffer allocation usb: cdns3: Use dma_pool_* api to alloc trb pool usb: cdns3: fix static checker warning. usb: cdns3: imx: mark cdns_imx_system_resume as __maybe_unused usb: cdns3: trace: delete the trace parameter for request->trb usb: cdns3: imx: add power lost support for system resume usb: cdns3: add power lost support for system resume commit e4379d649e0e546da73f3af5d01f18832044cc09 Author: Nicolas Ferre Date: Thu Apr 8 18:44:43 2021 +0200 ARM: dts: at91: sama5d2/trivial: fix letter case for etm hex address Fix the etm node hex address to lower case for matching regexp specification and removing the additional warning that looks like: arch/arm/boot/dts/at91-sama5d2_ptc_ek.dt.yaml: /: 'etm@73C000' does not match any of the regexes: '@(0|[1-9a-f][0-9a-f]*)$', '^[^@]+$', 'pinctrl-[0-9]+' Reported-by: Arnd Bergmann Signed-off-by: Nicolas Ferre Signed-off-by: Arnd Bergmann commit c4fe8aef2f07c8a41169bcb2c925f6a3a6818ca3 Author: Miklos Szeredi Date: Thu Apr 8 11:11:19 2021 +0200 ovl: remove unneeded ioctls The FS_IOC_[GS]ETFLAGS/FS_IOC_FS[GS]ETXATTR ioctls are now handled via the fileattr api. The only unconverted filesystem remaining is CIFS and it is not allowed to be overlayed due to case insensitive filenames. Signed-off-by: Miklos Szeredi commit 72227eac177dd126355ab8d8bd71b46af56c5cf3 Author: Miklos Szeredi Date: Thu Apr 8 11:11:19 2021 +0200 fuse: convert to fileattr Since fuse just passes ioctl args through to/from server, converting to the fileattr API is more involved, than most other filesystems. Both .fileattr_set() and .fileattr_get() need to obtain an open file to operate on. The simplest way is with the following sequence: FUSE_OPEN FUSE_IOCTL FUSE_RELEASE If this turns out to be a performance problem, it could be optimized for the case when there's already a file (any file) open for the inode. Signed-off-by: Miklos Szeredi commit b9d54c6f29d9dc04d3fa92e466349d3dfea58eb2 Author: Miklos Szeredi Date: Wed Apr 7 14:36:45 2021 +0200 fuse: add internal open/release helpers Clean out 'struct file' from internal helpers. Signed-off-by: Miklos Szeredi commit 54d601cb67572c49177a5e4001e6c3b59fed4ba5 Author: Miklos Szeredi Date: Wed Apr 7 14:36:45 2021 +0200 fuse: unsigned open flags Release helpers used signed int. Signed-off-by: Miklos Szeredi commit 9ac29fd3f87ffdd993505d75e89714ab931cdedb Author: Miklos Szeredi Date: Wed Apr 7 14:36:45 2021 +0200 fuse: move ioctl to separate source file Next patch will expand ioctl code and fuse/file.c is large enough as it is. Signed-off-by: Miklos Szeredi commit 51db776a430edd7477a779be0dc5c6fef4a05884 Author: Miklos Szeredi Date: Wed Apr 7 14:36:44 2021 +0200 vfs: remove unused ioctl helpers Remove vfs_ioc_setflags_prepare(), vfs_ioc_fssetxattr_check() and simple_fill_fsxattr(), which are no longer used. Signed-off-by: Miklos Szeredi Reviewed-by: Darrick J. Wong commit 8871d84c8f8b0c6bc2430cca3aa5f2e272596961 Author: Miklos Szeredi Date: Wed Apr 7 14:36:44 2021 +0200 ubifs: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Richard Weinberger commit 03eb60661332f46659634eb247821323e5dbc75e Author: Miklos Szeredi Date: Wed Apr 7 14:36:44 2021 +0200 reiserfs: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jan Kara commit 2b5f52c562d3001e442683065ffa7526831b55d4 Author: Miklos Szeredi Date: Wed Apr 7 14:36:44 2021 +0200 ocfs2: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Joel Becker commit 7c7c436e14b863ce56d9983477d35e05e54a220b Author: Miklos Szeredi Date: Wed Apr 7 14:36:44 2021 +0200 nilfs2: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Ryusuke Konishi commit 2ca58e30b148044adc3b517931036c87ca9f8d76 Author: Miklos Szeredi Date: Wed Apr 7 14:36:44 2021 +0200 jfs: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Dave Kleikamp commit 9cbae74838e62ed2d669d3b7eba181fe807ef842 Author: Miklos Szeredi Date: Wed Apr 7 14:36:44 2021 +0200 hfsplus: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi commit d701ea284cf908c2c9aeed54e3c851927155796f Author: Miklos Szeredi Date: Wed Apr 7 14:36:44 2021 +0200 efivars: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Matthew Garrett commit 9fefd5db08ce01abffffcdca3dc0964d9cb6ee69 Author: Miklos Szeredi Date: Wed Apr 7 14:36:43 2021 +0200 xfs: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Darrick J. Wong commit 1f26b0627b4613e623ba0c858a338ea7c77a55fb Author: Miklos Szeredi Date: Wed Apr 7 14:36:43 2021 +0200 orangefs: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Mike Marshall commit 88b631cbfbeb49f881737b974394a1735d3e7da7 Author: Miklos Szeredi Date: Wed Apr 7 14:36:43 2021 +0200 gfs2: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Andreas Gruenbacher commit 9b1bb01c8ae7e308486996f18216bd260258e076 Author: Miklos Szeredi Date: Wed Apr 7 14:36:43 2021 +0200 f2fs: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jaegeuk Kim commit 4db5c2e6236f82cf1aa408a53ae2890248059762 Author: Miklos Szeredi Date: Wed Apr 7 14:36:43 2021 +0200 ext4: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: "Theodore Ts'o" commit aba405e33e150860dd9e55be582a70e36d457039 Author: Miklos Szeredi Date: Wed Apr 7 14:36:43 2021 +0200 ext2: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: Jan Kara commit 97fc2977548786b073b17aa18174fcbaae9cb6a8 Author: Miklos Szeredi Date: Wed Apr 7 14:36:43 2021 +0200 btrfs: convert to fileattr Use the fileattr API to let the VFS handle locking, permission checking and conversion. Signed-off-by: Miklos Szeredi Cc: David Sterba commit 66dbfabf10d3cb68ee01df60b11c0b3777a4217b Author: Miklos Szeredi Date: Wed Apr 7 14:36:43 2021 +0200 ovl: stack fileattr ops Add stacking for the fileattr operations. Add hack for calling security_file_ioctl() for now. Probably better to have a pair of specific hooks for these operations. Signed-off-by: Miklos Szeredi commit 97e2dee9752bbd0eddfaec47e8036d35947521d9 Author: Miklos Szeredi Date: Wed Apr 7 14:36:42 2021 +0200 ecryptfs: stack fileattr ops Add stacking for the fileattr operations. Signed-off-by: Miklos Szeredi Cc: Tyler Hicks commit 4c5b479975212065ef39786e115fde42847e95a9 Author: Miklos Szeredi Date: Wed Apr 7 14:36:42 2021 +0200 vfs: add fileattr ops There's a substantial amount of boilerplate in filesystems handling FS_IOC_[GS]ETFLAGS/ FS_IOC_FS[GS]ETXATTR ioctls. Also due to userspace buffers being involved in the ioctl API this is difficult to stack, as shown by overlayfs issues related to these ioctls. Introduce a new internal API named "fileattr" (fsxattr can be confused with xattr, xflags is inappropriate, since this is more than just flags). There's significant overlap between flags and xflags and this API handles the conversions automatically, so filesystems may choose which one to use. In ->fileattr_get() a hint is provided to the filesystem whether flags or xattr are being requested by userspace, but in this series this hint is ignored by all filesystems, since generating all the attributes is cheap. If a filesystem doesn't implemement the fileattr API, just fall back to f_op->ioctl(). When all filesystems are converted, the fallback can be removed. 32bit compat ioctls are now handled by the generic code as well. Signed-off-by: Miklos Szeredi commit a8ed1a0607cfa5478ff6009539f44790c4d0956d Author: Christoph Hellwig Date: Mon Apr 12 10:03:18 2021 +0200 block: remove the -ERESTARTSYS handling in blkdev_get_by_dev Now that md has been cleaned up we can get rid of this hack. Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe commit 907d52310024fae6632aabfc7e833decaf185e5f Author: Jeffle Xu Date: Thu Apr 1 10:19:25 2021 +0800 block: add queue_to_disk() to get gendisk from request_queue Sometimes we need to get the corresponding gendisk from request_queue. It is preferred that block drivers store private data in gendisk->private_data rather than request_queue->queuedata, e.g. see: commit c4a59c4e5db3 ("dm: stop using ->queuedata"). So if only request_queue is given, we need to get its corresponding gendisk to get the private data stored in that gendisk. Reviewed-by: Hannes Reinecke Reviewed-by: Mike Snitzer Signed-off-by: Jeffle Xu Signed-off-by: Ming Lei Signed-off-by: Jens Axboe commit eed7a175089bb615af8c47ea5e07574062298187 Merge: e49d033bddf5b a8bb0e872bfb9 Author: Rafael J. Wysocki Date: Mon Apr 12 14:49:31 2021 +0200 Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull OPP (Operating Performance Points) framework updates for v5.13 from Viresh Kumar: "This adds devm variants for OPP APIs and updates few of the users as well (Yangtao Li and Dmitry Osipenko)." * 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: memory: samsung: exynos5422-dmc: Convert to use resource-managed OPP API drm/panfrost: Convert to use resource-managed OPP API drm/lima: Convert to use resource-managed OPP API mmc: sdhci-msm: Convert to use resource-managed OPP API spi: spi-qcom-qspi: Convert to use resource-managed OPP API spi: spi-geni-qcom: Convert to use resource-managed OPP API serial: qcom_geni_serial: Convert to use resource-managed OPP API opp: Change return type of devm_pm_opp_attach_genpd() opp: Change return type of devm_pm_opp_register_set_opp_helper() opp: Add devres wrapper for dev_pm_opp_of_add_table opp: Add devres wrapper for dev_pm_opp_set_supported_hw opp: Add devres wrapper for dev_pm_opp_set_regulators opp: Add devres wrapper for dev_pm_opp_set_clkname commit cee1b21523495ea3f153442d97d1689a17967648 Author: Max Gurtovoy Date: Mon Apr 12 09:55:23 2021 +0000 null_blk: add option for managing virtual boundary This will enable changing the virtual boundary of null blk devices. For now, null blk devices didn't have any restriction on the scatter/gather elements received from the block layer. Add a module parameter and a configfs option that will control the virtual boundary. This will enable testing the efficiency of the block layer bounce buffer in case a suitable application will send discontiguous IO to the given device. Initial testing with patched FIO showed the following results (64 jobs, 128 iodepth, 1 nullb device): IO size READ (virt=false) READ (virt=true) Write (virt=false) Write (virt=true) ---------- ------------------- ----------------- ------------------- ------------------- 1k 10.7M 8482k 10.8M 8471k 2k 10.4M 8266k 10.4M 8271k 4k 10.4M 8274k 10.3M 8226k 8k 10.2M 8131k 9800k 7933k 16k 9567k 7764k 8081k 6828k 32k 8865k 7309k 5570k 5153k 64k 7695k 6586k 2682k 2617k 128k 5346k 5489k 1320k 1296k Signed-off-by: Max Gurtovoy Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20210412095523.278632-1-mgurtovoy@nvidia.com Signed-off-by: Jens Axboe commit 0210b8eb7290bd6c10ded80b2dfb796aef46812e Merge: b989bc0f3cf24 dbbd49bade054 Author: Rafael J. Wysocki Date: Mon Apr 12 14:46:33 2021 +0200 Merge branch 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm Pull ARM cpufreq updates for v5.13 from Viresh Kumar: "- Fix typos in s5pv210 cpufreq driver (Bhaskar Chowdhury). - Armada 37xx: Fix cpufreq changing base CPU speed to 800 MHz from 1000 MHz (Pali Rohár and Marek Behún). - cpufreq-dt: Return -EPROBE_DEFER on failure to add table (Quanyang Wang). - Minor cleanup in cppc driver (Tom Saeger). - Add frequency invariance support for CPPC driver and generalize freq invariance support arch-topology driver (Viresh Kumar)." * 'cpufreq/arm/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: cpufreq: armada-37xx: Fix module unloading cpufreq: armada-37xx: Remove cur_frequency variable cpufreq: armada-37xx: Fix determining base CPU frequency cpufreq: armada-37xx: Fix driver cleanup when registration failed clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0 clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz cpufreq: armada-37xx: Fix the AVS value for load L1 clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock cpufreq: armada-37xx: Fix setting TBG parent for load levels cpufreq: dt: dev_pm_opp_of_cpumask_add_table() may return -EPROBE_DEFER cpufreq: cppc: simplify default delay_us setting cpufreq: Rudimentary typos fix in the file s5pv210-cpufreq.c cpufreq: CPPC: Add support for frequency invariance arch_topology: Export arch_freq_scale and helpers arch_topology: Allow multiple entities to provide sched_freq_tick() callback arch_topology: Rename freq_scale as arch_freq_scale commit cbb749cf377aa8aa32a036ebe9dd9f2d89037bf0 Author: Christoph Hellwig Date: Fri Apr 9 17:04:46 2021 +0200 block: remove an incorrect check from blk_rq_append_bio blk_rq_append_bio is also used for the copy case, not just the map case, so tis debug check is not correct. Fixes: 393bb12e0058 ("block: stop calling blk_queue_bounce for passthrough requests") Reported-by: Guenter Roeck Signed-off-by: Christoph Hellwig Tested-by: Guenter Roeck Reviewed-by: Himanshu Madhani Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210409150447.1977410-1-hch@lst.de Signed-off-by: Jens Axboe commit d173b65aa75fe8d97bccf429c001633910d20bfb Author: Christoph Hellwig Date: Thu Apr 8 21:41:40 2021 +0200 block: initialize ret in bdev_disk_changed Avoid a potentially initialized variabe in the invalidate case. Fixes: d3c4a43d9291 ("block: refactor blk_drop_partitions") Reported-by: kernel test robot Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Reviewed-by: Keith Busch Link: https://lore.kernel.org/r/20210408194140.1816537-1-hch@lst.de Signed-off-by: Jens Axboe commit a1ff1e3f0e1cb8e314220e7af8eb3155da343bf9 Author: Jens Axboe Date: Mon Apr 12 06:40:02 2021 -0600 io_uring: provide io_resubmit_prep() stub for !CONFIG_BLOCK Randy reports the following error on CONFIG_BLOCK not being set: ../fs/io_uring.c: In function ‘kiocb_done’: ../fs/io_uring.c:2766:7: error: implicit declaration of function ‘io_resubmit_prep’; did you mean ‘io_put_req’? [-Werror=implicit-function-declaration] if (io_resubmit_prep(req)) { Provide a dummy stub for io_resubmit_prep() like we do for io_rw_should_reissue(), which also helps remove an ifdef sequence from io_complete_rw_iopoll() as well. Fixes: 8c130827f417 ("io_uring: don't alter iopoll reissue fail ret code") Reported-by: Randy Dunlap Signed-off-by: Jens Axboe commit 5bdb080f9603c5db51597ee7bda457a153106a9a Author: Greg Kroah-Hartman Date: Mon Apr 12 14:36:02 2021 +0200 Revert "usb: Link the ports to the connectors they are attached to" This reverts commit 63cd78617350dae99cc5fbd8f643b83ee819fe33 as it causes a build error: depmod: ERROR: Cycle detected: usbcore -> typec -> usbcore depmod: ERROR: Found 2 modules in dependency cycles! Reported-by: Stephen Rothwell Link: https://lore.kernel.org/r/20210412213655.3776e15e@canb.auug.org.au Cc: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman commit 10076de33b5ed5b1e049593a611d2fd9eba60565 Author: Pawel Laszczak Date: Wed Apr 7 08:36:29 2021 +0200 usb: cdnsp: Fixes issue with Configure Endpoint command Patch adds flag EP_UNCONFIGURED to detect whether endpoint was unconfigured. This flag is set in cdnsp_reset_device after Reset Device command. Among others this command disables all non control endpoints. Flag is used in cdnsp_gadget_ep_disable to protect controller against invoking Configure Endpoint command on disabled endpoint. Lack of this protection in some cases caused that Configure Endpoint command completed with Context State Error code completion. Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver") Signed-off-by: Pawel Laszczak Signed-off-by: Peter Chen commit 9ecc3eb03c37b54c507ba5127a4c781d36b0c121 Author: Colin Ian King Date: Fri Mar 26 19:13:57 2021 +0000 usb: cdnsp: 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 Reviewed-by: Pawel Laszczak Signed-off-by: Peter Chen commit 8079ebf5ff51503574b5e6fd8d141de80032d761 Author: Wang Qing Date: Sat Mar 13 10:41:43 2021 +0800 usb: cdns3: delete repeated clear operations dma_alloc_coherent already zeroes out memory, so memset is not needed. Signed-off-by: Wang Qing Reviewed-by: Pawel Laszczak Acked-by: Pawel Laszczak Signed-off-by: Peter Chen commit 8430e98f2c877e2034e5a5adaa6bf0b4a3041e1d Author: Sanket Parmar Date: Mon Mar 22 11:26:30 2021 +0100 usb: cdns3: Optimize DMA request buffer allocation dma_alloc_coherent() might fail on the platform with a small DMA region. To avoid such failure in cdns3_prepare_aligned_request_buf(), dma_alloc_coherent() is replaced with dma_alloc_noncoherent() to allocate aligned request buffer of dynamic length. Reported-by: Aswath Govindraju Signed-off-by: Sanket Parmar Signed-off-by: Peter Chen commit b9b1eae761eeae665824ca6ef7f91da4fc798ebb Author: Sanket Parmar Date: Tue Mar 9 06:19:39 2021 +0100 usb: cdns3: Use dma_pool_* api to alloc trb pool Allocation of DMA coherent memory in atomic context using dma_alloc_coherent() might fail on platforms with smaller DMA region. To fix it, dma_alloc_coherent() is replaced with dma_pool API to allocate a smaller chunk of DMA coherent memory for TRB rings. Reported-by: Aswath Govindraju Signed-off-by: Sanket Parmar Signed-off-by: Peter Chen commit 575dd7ece61fa93270cb5749708b140a9c9cf947 Author: Frank Li Date: Wed Mar 10 10:01:25 2021 -0600 usb: cdns3: fix static checker warning. The patch c450e48eb570: "usb: cdns3: add power lost support for system resume" from Feb 18, 2021, leads to the following static checker warning: drivers/usb/cdns3/core.c:551 cdns_resume() error: uninitialized symbol 'ret'. drivers/usb/cdns3/core.c 544 545 if (!role_changed) { 546 if (cdns->role == USB_ROLE_HOST) 547 ret = cdns_drd_host_on(cdns); 548 else if (cdns->role == USB_ROLE_DEVICE) 549 ret = cdns_drd_gadget_on(cdns); "ret" is uninitialized at else branch. Reported-by: Dan Carpenter Signed-off-by: Frank Li Signed-off-by: Peter Chen commit ef32e0513a130945a08debbbc6d126b54c59fa58 Author: Wei Yongjun Date: Wed Mar 10 10:46:54 2021 +0000 usb: cdns3: imx: mark cdns_imx_system_resume as __maybe_unused The function cdns_imx_system_resume() may have no callers depending on configuration, so it must be marked __maybe_unused to avoid harmless warning: drivers/usb/cdns3/cdns3-imx.c:378:12: warning: 'cdns_imx_system_resume' defined but not used [-Wunused-function] 378 | static int cdns_imx_system_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ Fixes: 67982dfa59de ("usb: cdns3: imx: add power lost support for system resume") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Peter Chen commit 39be23f4f16f5e743471c87c1e04bc90fc6d100a Author: Peter Chen Date: Sun Mar 7 17:53:43 2021 +0800 usb: cdns3: trace: delete the trace parameter for request->trb It is not correct using %pa to print virtual address of request->trb, and it is hard to print its physical address due to the virtual address is zero before using. It could use index (start_trb/end_trb) to know the current trb position, so no matter virtual address or physical address for request-trb is not so meaningful. Reported-by: Steven Rostedt Signed-off-by: Peter Chen commit 2fd69eca06333a4c1170e81bedf2736548ccb63d Author: Frank Li Date: Thu Feb 18 16:51:09 2021 -0600 usb: cdns3: imx: add power lost support for system resume imx need special handle when controller lost power Signed-off-by: Peter Chen Signed-off-by: Frank Li Signed-off-by: Peter Chen commit 2cf2581cd2290ccef674f1be5f7977d66702eedb Author: Frank Li Date: Thu Feb 18 16:51:08 2021 -0600 usb: cdns3: add power lost support for system resume If the controller lost its power during the system suspend, we need to do all initialiation operations. Signed-off-by: Peter Chen Signed-off-by: Frank Li Signed-off-by: Peter Chen commit 50eae6bada81d287d7d2105dac5fe66f182a2b6f Author: Laibin Qiu Date: Fri Apr 9 10:38:01 2021 +0800 mmc: sdhci-st: Remove unnecessary error log devm_ioremap_resource() has recorded error log, so it's unnecessary to record log again. Reported-by: Hulk Robot Signed-off-by: Laibin Qiu Reviewed-by: Patrice Chotard Link: https://lore.kernel.org/r/20210409023801.3326572-1-qiulaibin@huawei.com Signed-off-by: Ulf Hansson commit ffa4877c0a291c9d6798faa48cdcf1e863f5df68 Author: Jia Yang Date: Fri Apr 9 09:54:24 2021 +0800 mmc: sdhci-msm: Remove unnecessary error log devm_ioremap_resource() has recorded error log, so it's unnecessary to record log again. Reported-by: Hulk Robot Signed-off-by: Jia Yang Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210409015424.3277212-1-jiayang5@huawei.com Signed-off-by: Ulf Hansson commit 489702f450360f82c6bae0bb2852c56a4d490b1d Author: Laibin Qiu Date: Fri Apr 9 10:33:49 2021 +0800 mmc: owl-mmc: Remove unnecessary error log devm_ioremap_resource() has recorded error log, so it's unnecessary to record log again. Reported-by: Hulk Robot Signed-off-by: Laibin Qiu Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210409023349.3325907-1-qiulaibin@huawei.com Signed-off-by: Ulf Hansson commit 87e985aea2bef73242cf2a7d2ef81f950d677361 Author: Wolfram Sang Date: Fri Apr 9 11:46:06 2021 +0200 mmc: renesas_sdhi: enable WAIT_WHILE_BUSY Now that we got the timeout handling in the driver correct, we can use this capability to avoid polling via the MMC core. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210409094606.4317-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 5ec6fa5a6dc5e42a4aa782f3a81d5f08b0fac1e6 Author: Aniruddha Tvs Rao Date: Wed Apr 7 10:46:17 2021 +0100 mmc: sdhci-tegra: Add required callbacks to set/clear CQE_EN bit CMD8 is not supported with Command Queue Enabled. Add required callback to clear CQE_EN and CQE_INTR fields in the host controller register before sending CMD8. Add corresponding callback in the CQHCI resume path to re-enable CQE_EN and CQE_INTR fields. Reported-by: Kamal Mostafa Tested-by: Kamal Mostafa Signed-off-by: Aniruddha Tvs Rao Signed-off-by: Jon Hunter Acked-by: Adrian Hunter Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20210407094617.770495-1-jonathanh@nvidia.com Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Ulf Hansson commit 1b6216a61e1d5b6683f2d3362ff76d183e66c29f Author: Hao Fang Date: Thu Apr 1 19:50:20 2021 +0800 dmaengine: k3dma: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g. It should use capital S, according to the official website. Signed-off-by: Hao Fang Acked-by: Zhangfei Gao Link: https://lore.kernel.org/r/1617277820-26971-1-git-send-email-fanghao11@huawei.com Signed-off-by: Vinod Koul commit ee1bf567c90df6fd04a3c31acb0995cb13f62c48 Author: Jiapeng Chong Date: Thu Apr 1 17:53:36 2021 +0800 dmaengine: qcom_hidma: remove unused code Fix the following clang warning: drivers/dma/qcom/hidma.c:94:20: warning: unused function 'to_hidma_desc' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1617270816-36400-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Vinod Koul commit af072b1a9d4d9edc24da84a071b0671e147026cb Author: Christophe Leroy Date: Sun Apr 11 16:39:53 2021 +0000 powerpc/signal32: Fix build failure with CONFIG_SPE Add missing fault exit label in unsafe_copy_from_user() in order to avoid following build failure with CONFIG_SPE CC arch/powerpc/kernel/signal_32.o arch/powerpc/kernel/signal_32.c: In function 'restore_user_regs': arch/powerpc/kernel/signal_32.c:565:36: error: macro "unsafe_copy_from_user" requires 4 arguments, but only 3 given 565 | ELF_NEVRREG * sizeof(u32)); | ^ In file included from ./include/linux/uaccess.h:11, from ./include/linux/sched/task.h:11, from ./include/linux/sched/signal.h:9, from ./include/linux/rcuwait.h:6, from ./include/linux/percpu-rwsem.h:7, from ./include/linux/fs.h:33, from ./include/linux/huge_mm.h:8, from ./include/linux/mm.h:707, from arch/powerpc/kernel/signal_32.c:17: ./arch/powerpc/include/asm/uaccess.h:428: note: macro "unsafe_copy_from_user" defined here 428 | #define unsafe_copy_from_user(d, s, l, e) \ | arch/powerpc/kernel/signal_32.c:564:3: error: 'unsafe_copy_from_user' undeclared (first use in this function); did you mean 'raw_copy_from_user'? 564 | unsafe_copy_from_user(current->thread.evr, &sr->mc_vregs, | ^~~~~~~~~~~~~~~~~~~~~ | raw_copy_from_user arch/powerpc/kernel/signal_32.c:564:3: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [arch/powerpc/kernel/signal_32.o] Error 1 Fixes: 627b72bee84d ("powerpc/signal32: Convert restore_[tm]_user_regs() to user access block") Reported-by: kernel test robot Reported-by: Guenter Roeck Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/aad2cb1801a3cc99bc27081022925b9fc18a0dfb.1618159169.git.christophe.leroy@csgroup.eu commit f7b21a0e41171d22296b897dac6e4c41d2a3643c Author: Jan Kiszka Date: Sun Apr 11 10:12:16 2021 +0200 x86/asm: Ensure asm/proto.h can be included stand-alone Fix: ../arch/x86/include/asm/proto.h:14:30: warning: ‘struct task_struct’ declared \ inside parameter list will not be visible outside of this definition or declaration long do_arch_prctl_64(struct task_struct *task, int option, unsigned long arg2); ^~~~~~~~~~~ .../arch/x86/include/asm/proto.h:40:34: warning: ‘struct task_struct’ declared \ inside parameter list will not be visible outside of this definition or declaration long do_arch_prctl_common(struct task_struct *task, int option, ^~~~~~~~~~~ if linux/sched.h hasn't be included previously. This fixes a build error when this header is used outside of the kernel tree. [ bp: Massage commit message. ] Signed-off-by: Jan Kiszka Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/b76b4be3-cf66-f6b2-9a6c-3e7ef54f9845@web.de commit 13150149aa6ded1e6bbe0025beac6e12604dd87c Author: Ard Biesheuvel Date: Tue Mar 2 10:01:12 2021 +0100 arm64: fpsimd: run kernel mode NEON with softirqs disabled Kernel mode NEON can be used in task or softirq context, but only in a non-nesting manner, i.e., softirq context is only permitted if the interrupt was not taken at a point where the kernel was using the NEON in task context. This means all users of kernel mode NEON have to be aware of this limitation, and either need to provide scalar fallbacks that may be much slower (up to 20x for AES instructions) and potentially less safe, or use an asynchronous interface that defers processing to a later time when the NEON is guaranteed to be available. Given that grabbing and releasing the NEON is cheap, we can relax this restriction, by increasing the granularity of kernel mode NEON code, and always disabling softirq processing while the NEON is being used in task context. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210302090118.30666-4-ardb@kernel.org Signed-off-by: Catalin Marinas commit 4c4dcd3541f83d216f2e403cb83dd431e09759b1 Author: Ard Biesheuvel Date: Tue Mar 2 10:01:11 2021 +0100 arm64: assembler: introduce wxN aliases for wN registers The AArch64 asm syntax has this slightly tedious property that the names used in mnemonics to refer to registers depend on whether the opcode in question targets the entire 64-bits (xN), or only the least significant 8, 16 or 32 bits (wN). When writing parameterized code such as macros, this can be annoying, as macro arguments don't lend themselves to indexed lookups, and so generating a reference to wN in a macro that receives xN as an argument is problematic. For instance, an upcoming patch that modifies the implementation of the cond_yield macro to be able to refer to 32-bit registers would need to modify invocations such as cond_yield 3f, x8 to cond_yield 3f, 8 so that the second argument can be token pasted after x or w to emit the correct register reference. Unfortunately, this interferes with the self documenting nature of the first example, where the second argument is obviously a register, whereas in the second example, one would need to go and look at the code to find out what '8' means. So let's fix this by defining wxN aliases for all xN registers, which resolve to the 32-bit alias of each respective 64-bit register. This allows the macro implementation to paste the xN reference after a w to obtain the correct register name. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210302090118.30666-3-ardb@kernel.org Signed-off-by: Catalin Marinas commit 27248fe1abb2a0e6fe4c744c25700f557b04466c Author: Ard Biesheuvel Date: Tue Mar 2 10:01:10 2021 +0100 arm64: assembler: remove conditional NEON yield macros The users of the conditional NEON yield macros have all been switched to the simplified cond_yield macro, and so the NEON specific ones can be removed. Signed-off-by: Ard Biesheuvel Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210302090118.30666-2-ardb@kernel.org Signed-off-by: Catalin Marinas commit 9d42a4d3e27db3cabad82483ed876d4c8b8bed65 Author: Vasily Gorbik Date: Fri Apr 9 00:31:47 2021 +0200 s390/test_unwind: add WARN if tests failed Trigger a warning if any of unwinder tests fail. This should help to prevent quiet ignoring of test results when panic_on_warn is enabled. Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit f169f42130653bd4da24ed0d1b2cc91af5977928 Author: Vasily Gorbik Date: Fri Apr 9 00:21:14 2021 +0200 s390/test_unwind: unify error handling paths Handle the case of "unwind state reliable but addr is 0" like other error cases in this function and trigger output of failing stacktrace to aid debugging. Signed-off-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 4dd4269ea51eeb68a073b900df6b5f5b78159633 Author: Heiko Carstens Date: Sat Apr 10 19:18:25 2021 +0200 s390: update defconfigs Set CONFIG_FRAME_WARN to 2048, which is the default for 64 bit architectures. Signed-off-by: Heiko Carstens commit 4f9abb7e70f2f4808f0fce36b66232890201c6a3 Author: Heiko Carstens Date: Mon Mar 22 16:12:56 2021 +0100 s390/spinlock: use R constraint in inline assembly Allow the compiler to generate slightly better code by using the R constraint. Signed-off-by: Heiko Carstens commit 000174233b91340ca52a9eca905d029a9a2aefd9 Author: Heiko Carstens Date: Tue Apr 6 21:33:47 2021 +0200 s390/atomic,cmpxchg: switch to use atomic-instrumented.h Add arch_ prefix to all atomic operations, and define ARCH_ATOMIC. This enables KASAN instrumentation for all atomic operations on s390. This is the s390 variant of commit 8bf705d13039 ("locking/atomic/x86: Switch atomic.h to use atomic-instrumented.h"). Signed-off-by: Heiko Carstens commit d2b1f6d2d35043d2c9d079c1595f10c93bfca7d2 Author: Heiko Carstens Date: Tue Apr 6 14:51:48 2021 +0200 s390/cmpxchg: get rid of gcc atomic builtins s390 is the only architecture in the kernel which makes use of gcc's atomic builtin functions. Even though I don't see any technical problem with that right now, remove this code and open-code compare-and-swap loops again, like every other architecture is doing it also. We can switch to a generic implementation when other architectures are doing that also. See also https://lwn.net/Articles/586838/ for forther details. This basically reverts commit f318a1229bd8 ("s390/cmpxchg: use compiler builtins"). Signed-off-by: Heiko Carstens commit b23eb636d7f9f3d7c3ae0dd443cf26c4cc1e18f7 Author: Heiko Carstens Date: Mon Mar 22 16:36:27 2021 +0100 s390/atomic: get rid of gcc atomic builtins s390 is the only architecture in the kernel which makes use of gcc's atomic builtin functions. Even though I don't see any technical problem with that right now, remove this code and open-code compare-and-swap loops again, like every other architecture is doing it also. We can switch to a generic implementation when other architectures are doing that also. See also https://lwn.net/Articles/586838/ for forther details. Signed-off-by: Heiko Carstens commit ca897bb1814fc77ce2ded7b31350ff2b25ccb0a4 Author: Heiko Carstens Date: Mon Mar 22 14:08:39 2021 +0100 s390/atomic: use proper constraints Use the R,T, and S constraints instead of the Q constraint in atomic inline assemblies wherever possible. This allows the compiler to generate better code. (~ -2kb code size). Signed-off-by: Heiko Carstens commit c8a91c285d8c3449b32021b28bcb7fb5662403a8 Author: Heiko Carstens Date: Mon Mar 22 14:02:55 2021 +0100 s390/atomic: move remaining inline assemblies to atomic_ops.h Move all remaining inline assemblies from atomic.h to atomic_ops.h. That way all atomic inline assemblies are contained within only a single header file. Signed-off-by: Heiko Carstens commit 6000b5f4032e9be5413dcfcdd9e39eb1c9cc2453 Author: Heiko Carstens Date: Tue Apr 6 20:12:16 2021 +0200 s390/bitops: make bitops only work on longs The bitops code was optimized to generate test under mask instructions with the __bitops_byte() helper. However that was many years ago and in the meantime a lot of new instructions were introduced. Changing the code so that it always operates on longs nowadays even generates shorter code (~ -20kb, defconfig, gcc 10, march=zE12). Signed-off-by: Heiko Carstens commit 17a363dcd2f7455d8661a7b2f9ba7cfb85bbc7e4 Author: Heiko Carstens Date: Fri Apr 9 10:34:43 2021 +0200 s390/traps,mm: add conditional trap handlers Add conditional trap handlers similar to conditional system calls (COND_SYSCALL), to reduce the number of ifdefs. Trap handlers which may or may not exist depending on config options are supposed to have a COND_TRAP entry, which redirects to default_trap_handler() for non-existent trap handlers during link time. This allows to get rid of the secure execution trap handlers for the !PGSTE case. Reviewed-by: Vasily Gorbik Signed-off-by: Heiko Carstens commit 61311e32892b008886478bdba4ce2a34f4d938f8 Author: Niklas Schnelle Date: Fri Mar 26 13:58:48 2021 +0100 s390/pci: narrow scope of zpci_configure_device() Currently zpci_configure_device() can be called on a zPCI function in two completely different states. Either the underlying zPCI function has already been configured by the platform and we are only doing the scanning to get it usable by Linux drivers. Or the underlying function is in Standby and we first do an SCLP to get it configured. This makes zpci_configure_device() harder to reason about. Since calling zpci_configure_device() on a function in Standby only happens in enable_slot() simply pull out the SCLP call and setting of zdev->state and thus call zpci_configure_device() under the same circumstances as in the event handling code. Reviewed-by: Matthew Rosato Reviewed-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 14c87ba8123abe6b707d04e1711eef90653567f2 Author: Niklas Schnelle Date: Fri Feb 12 11:57:58 2021 +0100 s390/pci: separate zbus registration from scanning Now that the zbus can be created without being scanned we can go one step further and make registering a device to a zbus independent from scanning it. This way the zbus handling becomes much more natural in that functions can be registered on the zbus to be scanned later more closely resembling the handling of both real PCI hardware and other virtual PCI busses like Hyper-V's virtual PCI bus (see for example drivers/pci/controller/pci-hyperv.c:create_root_hv_pci_bus()). Having zbus registration separate from scanning allows us to return fully initialized but still disabled zdevs from zpci_create_device() which can then be configured just as we would configure a zdev from standby (minus the SCLP Configure already done by the platform). There is still the exception that a PCI function with non-zero devfn can be plugged before its PCI bus, which depends on the function with zero devfn, is created. In this case the zdev returend from zpci_create_device() is still missing its bus, hotplug slot, and resources which need to be created later but at least it doesn't wait in the enabled state and can otherwise be treated as initialized. With this we also separate the initial PCI scan using CLP List PCI Functions into two phases. In the CLP loop's callback we only register each function with a virtual zbus creating the latter as needed. Then, after we have built this virtual PCI topology based on our list of zbusses, we can make use of the common code functionality to scan each complete zbus as a separate child bus. Reviewed-by: Matthew Rosato Acked-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 0350276168942a9fb7540c03995229e3502976a2 Author: Niklas Schnelle Date: Fri Feb 12 10:16:46 2021 +0100 s390/pci: use mutex not spinlock for zbus list In a later change we will first collect all PCI functions from the CLP List PCI functions call, then register them to/creating the relevant zbus. Then only after we've created our virtual bus structure will we scan all zbusses iterating over the zbus list. Since scanning is relatively slow a spinlock is a bad fit for protecting the loop over the devices on the zbus. Furthermore doing the probing on the bus we need to use pci_lock_rescan_remove() as devices are added to the PCI subsystem and that is a mutex which can't be locked nested inside a spinlock section. Note that the contention of this lock should be very low either way as zbusses are only added/removed concurrently on hotplug events. Reviewed-by: Matthew Rosato Reviewed-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit a50297cf8235b062bcdeaa8b1dad58e69d3e1b43 Author: Niklas Schnelle Date: Fri Feb 12 14:19:31 2021 +0100 s390/pci: separate zbus creation from scanning In the existing code the creation of the PCI bus and the scanning of function zero all happens in zpci_scan_bus(). This in turn requires functions to be enabled and their resources to be available before the PCI bus is even created. This not only means that functions are enabled long before they are actually made available to the common PCI subsystem. In case of functions with non-zero devfn which appeared before the function with devfn zero they can wait arbitrarily long in this enabled but not scanned state. Fix this by separating the creation of the PCI bus from scanning it and only prepare, that is enable and setup MMIO bus resources, functions just before they are scanned. As they may be scanned multiple times track if we already created resources in the zdev. Reviewed-by: Matthew Rosato Acked-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 7dc697d6b2b5299ab7e09c592d727671a3859be2 Author: Niklas Schnelle Date: Fri Feb 12 12:17:53 2021 +0100 s390/pci: do more bus setup in zpci_bus_scan() Pull setting the maximum bus speed and multifunction attribute into zpci_bus_scan() in preparation for handling bus creation separately from scanning the bus. Reviewed-by: Matthew Rosato Acked-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit faf29a4d93a98b4ccd8a10297353a9d0779d231f Author: Niklas Schnelle Date: Thu Feb 11 14:20:03 2021 +0100 s390/pci: introduce zpci_bus_scan_device() To match zpci_bus_scan_device() and the PCI common code terminology and to remove some code duplication, we pull the multiple uses of pci_scan_single_device() into a function. For now this has the side effect of adding each device to the PCI bus separately and locking and unlocking the rescan/remove lock for each instead of just once per bus. This is clearly less efficient but provides a correct intermediate behavior until a follow on change does both the adding and scanning only once per bus. Reviewed-by: Matthew Rosato Acked-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 6f8daa2953ecd1e8e853939f2007b4160591b8a6 Author: Heiko Carstens Date: Wed Apr 7 21:06:41 2021 +0200 s390/traps: convert pgm_check.S to C Convert the program check table to C. Which allows to get rid of yet another assembler file, and also enables proper type checking for the table. Reviewed-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 3081e6160565078b3a37ebb33bd8301ab18dd6d7 Author: Vineeth Vijayan Date: Mon Mar 29 20:38:07 2021 +0200 s390/cio: use DECLARE_WAIT_QUEUE_HEAD for static work_queue_head_t Use DECLARE_WAIT_QUEUE_HEAD to declare and statically initialize the work_queue_head_t. Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit 644975179c00802936c5afc732d9df7f63f735a0 Author: zhongbaisong Date: Wed Apr 7 20:38:55 2021 +0800 s390/protvirt: fix error return code in uv_info_init() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Reported-by: Hulk Robot Signed-off-by: Baisong Zhong Fixes: 37564ed834ac ("s390/uv: add prot virt guest/host indication files") Link: https://lore.kernel.org/r/2f7d62a4-3e75-b2b4-951b-75ef8ef59d16@huawei.com Signed-off-by: Heiko Carstens commit 0ee3f73914d93e47bb0146371bc66ca2982970c9 Merge: 8bc00c04d87ee a994eddb947ea Author: Heiko Carstens Date: Mon Apr 12 12:45:38 2021 +0200 Merge branch 'fixes' into features * fixes: s390/entry: save the caller of psw_idle s390/entry: avoid setting up backchain in ext|io handlers s390/setup: use memblock_free_late() to free old stack s390/irq: fix reading of ext_params2 field from lowcore s390/unwind: add machine check handler stack s390/cpcmd: fix inline assembly register clobbering MAINTAINERS: add backups for s390 vfio drivers s390/vdso: fix initializing and updating of vdso_data s390/vdso: fix tod_steering_delta type s390/vdso: copy tod_steering_delta value to vdso_data page Signed-off-by: Heiko Carstens commit d91cbe83d319e8923d36f974d8c9b1e1b56fea62 Author: Chen Huang Date: Thu Apr 8 12:54:29 2021 +0000 ALSA: virtio: use module_virtio_driver() to simplify the code module_virtio_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Chen Huang Reviewed-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210408125429.1158703-1-chenhuang5@huawei.com Signed-off-by: Takashi Iwai commit 5e717c6fa41ff9b9b0c1e5959ccf5d8ef42f804b Author: Amir Goldstein Date: Sat Apr 10 12:17:50 2021 +0300 ovl: add debug print to ovl_do_getxattr() It was the only ovl_do helper missing it. Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 65cd913ec9d9d71529665924c81015b7ab7d9381 Author: Amir Goldstein Date: Sun Apr 11 12:22:23 2021 +0300 ovl: invalidate readdir cache on changes to dir with origin The test in ovl_dentry_version_inc() was out-dated and did not include the case where readdir cache is used on a non-merge dir that has origin xattr, indicating that it may contain leftover whiteouts. To make the code more robust, use the same helper ovl_dir_is_real() to determine if readdir cache should be used and if readdir cache should be invalidated. Fixes: b79e05aaa166 ("ovl: no direct iteration for dir with origin xattr") Link: https://lore.kernel.org/linux-unionfs/CAOQ4uxht70nODhNHNwGFMSqDyOKLXOKrY0H6g849os4BQ7cokA@mail.gmail.com/ Cc: Chris Murphy Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 708fa01597fa002599756bf56a96d0de1677375c Author: Miklos Szeredi Date: Mon Apr 12 12:00:37 2021 +0200 ovl: allow upperdir inside lowerdir Commit 146d62e5a586 ("ovl: detect overlapping layers") made sure we don't have overlapping layers, but it also broke the arguably valid use case of mount -olowerdir=/,upperdir=/subdir,.. where upperdir overlaps lowerdir on the same filesystem. This has been causing regressions. Revert the check, but only for the specific case where upperdir and/or workdir are subdirectories of lowerdir. Any other overlap (e.g. lowerdir is subdirectory of upperdir, etc) case is crazy, so leave the check in place for those. Overlaps are detected at lookup time too, so reverting the mount time check should be safe. Fixes: 146d62e5a586 ("ovl: detect overlapping layers") Cc: # v5.2 Signed-off-by: Miklos Szeredi commit 321b46b904816241044e177c1d6282ad20f17416 Author: Giuseppe Scrivano Date: Thu Mar 4 17:45:15 2021 +0100 ovl: show "userxattr" in the mount data This was missed when adding the option. Signed-off-by: Giuseppe Scrivano Reviewed-by: Vivek Goyal Fixes: 2d2f2d7322ff ("ovl: user xattr") Signed-off-by: Miklos Szeredi commit f48bbfb20e1f96f6ada1fe8c62fb9072fb4c6c88 Author: Bhaskar Chowdhury Date: Sat Mar 13 09:00:23 2021 +0530 ovl: trivial typo fixes in the file inode.c s/peresistent/persistent/ s/xatts/xattrs/ s/annotaion/annotation/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Miklos Szeredi commit 597534e7bcfa6af175264885b8e044d4a1ed8d57 Author: Xiong Zhenwu Date: Thu Mar 18 04:30:27 2021 -0700 ovl: fix misspellings using codespell tool A typo is found out by codespell tool: $ codespell ./fs/overlayfs/ ./fs/overlayfs/util.c:217: dependig ==> depending Fix a typo found by codespell. Signed-off-by: Xiong Zhenwu Signed-off-by: Miklos Szeredi commit 568edee485a4b4f138eb8cea9e532b3fb6fdd5fe Author: Chengguang Xu Date: Fri Feb 26 17:24:17 2021 +0800 ovl: do not copy attr several times In ovl_xattr_set() we have already copied attr of real inode so no need to copy it again in ovl_posix_acl_xattr_set(). Signed-off-by: Chengguang Xu Signed-off-by: Miklos Szeredi commit c68e7ec53a53903aff4cb94ba35c58486008983d Author: youngjun Date: Mon Feb 22 08:59:21 2021 -0800 ovl: remove ovl_map_dev_ino() return value ovl_map_dev_ino() always returns success. Remove unnecessary return value. Signed-off-by: youngjun Signed-off-by: Miklos Szeredi commit d7b49b10d5a92f22333a3800dfae89ea0822751b Author: Chengguang Xu Date: Mon Mar 1 14:19:30 2021 +0800 ovl: fix error for ovl_fill_super() There are some places should return -EINVAL instead of -ENOMEM in ovl_fill_super(). [Amir] Consistently set error before checking the error condition. Signed-off-by: Chengguang Xu Signed-off-by: Miklos Szeredi commit 7b279bbfd2b230c7a210ff8f405799c7e46bbf48 Author: Dan Carpenter Date: Tue Mar 23 16:19:35 2021 +0300 ovl: fix missing revert_creds() on error path Smatch complains about missing that the ovl_override_creds() doesn't have a matching revert_creds() if the dentry is disconnected. Fix this by moving the ovl_override_creds() until after the disconnected check. Fixes: aa3ff3c152ff ("ovl: copy up of disconnected dentries") Signed-off-by: Dan Carpenter Signed-off-by: Miklos Szeredi commit eaab1d45cdb4bb0c846bd23c3d666d5b90af7b41 Author: Mickaël Salaün Date: Mon Mar 29 18:49:07 2021 +0200 ovl: fix leaked dentry Since commit 6815f479ca90 ("ovl: use only uppermetacopy state in ovl_lookup()"), overlayfs doesn't put temporary dentry when there is a metacopy error, which leads to dentry leaks when shutting down the related superblock: overlayfs: refusing to follow metacopy origin for (/file0) ... BUG: Dentry (____ptrval____){i=3f33,n=file3} still in use (1) [unmount of overlay overlay] ... WARNING: CPU: 1 PID: 432 at umount_check.cold+0x107/0x14d CPU: 1 PID: 432 Comm: unmount-overlay Not tainted 5.12.0-rc5 #1 ... RIP: 0010:umount_check.cold+0x107/0x14d ... Call Trace: d_walk+0x28c/0x950 ? dentry_lru_isolate+0x2b0/0x2b0 ? __kasan_slab_free+0x12/0x20 do_one_tree+0x33/0x60 shrink_dcache_for_umount+0x78/0x1d0 generic_shutdown_super+0x70/0x440 kill_anon_super+0x3e/0x70 deactivate_locked_super+0xc4/0x160 deactivate_super+0xfa/0x140 cleanup_mnt+0x22e/0x370 __cleanup_mnt+0x1a/0x30 task_work_run+0x139/0x210 do_exit+0xb0c/0x2820 ? __kasan_check_read+0x1d/0x30 ? find_held_lock+0x35/0x160 ? lock_release+0x1b6/0x660 ? mm_update_next_owner+0xa20/0xa20 ? reacquire_held_locks+0x3f0/0x3f0 ? __sanitizer_cov_trace_const_cmp4+0x22/0x30 do_group_exit+0x135/0x380 __do_sys_exit_group.isra.0+0x20/0x20 __x64_sys_exit_group+0x3c/0x50 do_syscall_64+0x45/0x70 entry_SYSCALL_64_after_hwframe+0x44/0xae ... VFS: Busy inodes after unmount of overlay. Self-destruct in 5 seconds. Have a nice day... This fix has been tested with a syzkaller reproducer. Cc: Amir Goldstein Cc: # v5.8+ Reported-by: syzbot Fixes: 6815f479ca90 ("ovl: use only uppermetacopy state in ovl_lookup()") Signed-off-by: Mickaël Salaün Link: https://lore.kernel.org/r/20210329164907.2133175-1-mic@digikod.net Reviewed-by: Vivek Goyal Signed-off-by: Miklos Szeredi commit b0e0f69731cde2de09a45c9a7a881378e7dbc4ba Author: Amir Goldstein Date: Tue Mar 9 18:26:54 2021 +0200 ovl: restrict lower null uuid for "xino=auto" Commit a888db310195 ("ovl: fix regression with re-formatted lower squashfs") attempted to fix a regression with existing setups that use a practice that we are trying to discourage. The discourage part was described this way in the commit message: "To avoid the reported regression while still allowing the new features with single lower squashfs, do not allow decoding origin with lower null uuid unless user opted-in to one of the new features that require following the lower inode of non-dir upper (index, xino, metacopy)." The three mentioned features are disabled by default in Kconfig, so it was assumed that if they are enabled, the user opted-in for them. Apparently, distros started to configure CONFIG_OVERLAY_FS_XINO_AUTO=y some time ago, so users upgrading their kernels can still be affected by said regression even though they never opted-in for any new feature. To fix this, treat "xino=on" as "user opted-in", but not "xino=auto". Since we are changing the behavior of "xino=auto" to no longer follow to lower origin with null uuid, take this one step further and disable xino in that corner case. To be consistent, disable xino also in cases of lower fs without file handle support and upper fs without xattr support. Update documentation w.r.t the new "xino=auto" behavior and fix the out dated bits of documentation regarding "xino" and regarding offline modifications to lower layers. Link: https://lore.kernel.org/linux-unionfs/b36a429d7c563730c28d763d4d57a6fc30508a4f.1615216996.git.kevin@kevinlocke.name/ Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit e21a6c57e3905313664aa012727346a0067effd5 Author: Amir Goldstein Date: Thu Apr 8 14:30:20 2021 +0300 ovl: check that upperdir path is not on a read-only mount So far we only checked that sb is not read-only. Suggested-by: Christian Brauner Signed-off-by: Amir Goldstein Signed-off-by: Miklos Szeredi commit 1f0cb8bcc7f96bcd816c80618eb0a7a361c70fbd Author: Sargun Dhillon Date: Sun Nov 29 19:00:39 2020 -0800 ovl: plumb through flush method Filesystems can implement their own flush method that release resources, or manipulate caches. Currently if one of these filesystems is used with overlayfs, the flush method is not called. [Amir: fix fd leak in ovl_flush()] Signed-off-by: Sargun Dhillon Signed-off-by: Miklos Szeredi commit d07082277f55cb395be00c813c62f3c956d1edb6 Author: Johan Hovold Date: Fri Apr 9 17:52:16 2021 +0200 USB: serial: cp210x: add gpio-configuration debug printk Add a debug printk to dump the GPIO configuration stored in EEPROM during probe. Reviewed-by: Andy Shevchenko Signed-off-by: Johan Hovold commit b979248d16d12b913501dacd61bddc7a36aac886 Author: Johan Hovold Date: Fri Apr 9 17:52:15 2021 +0200 USB: serial: cp210x: provide gpio valid mask Use the new GPIO valid-mask feature to inform gpiolib which pins are available for use instead of handling that in a request callback. This also allows user space to figure out which pins are available through the chardev interface without having to request each pin in turn. Note that the return value when requesting an unavailable pin will now be -EINVAL instead of -ENODEV. Reviewed-by: Andy Shevchenko Signed-off-by: Johan Hovold commit f829b4b212a315b912cb23fd10aaf30534bb5ce9 Author: Liam Howlett Date: Wed Apr 7 20:00:45 2021 +0000 m68k: Add missing mmap_read_lock() to sys_cacheflush() When the superuser flushes the entire cache, the mmap_read_lock() is not taken, but mmap_read_unlock() is called. Add the missing mmap_read_lock() call. Fixes: cd2567b6850b1648 ("m68k: call find_vma with the mmap_sem held in sys_cacheflush()") Signed-off-by: Liam R. Howlett Reviewed-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20210407200032.764445-1-Liam.Howlett@Oracle.com Signed-off-by: Geert Uytterhoeven commit f2f560e1bdc055a6a306e6b7823ba589794e6564 Author: Stefan Wahren Date: Sun Apr 11 20:11:40 2021 +0200 staging: vchiq_core: split exit conditions Some exit conditions are rather complex. So better split them up. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-11-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit fa80183c5513528ad21be719f761cc505ef43949 Author: Stefan Wahren Date: Sun Apr 11 20:11:39 2021 +0200 staging: vchiq_core: fix if alignments This fixes the alignment of some if statements. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-10-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit a8def5034a277e312e2ac6ec82a862aa5f1323ec Author: Stefan Wahren Date: Sun Apr 11 20:11:38 2021 +0200 staging: vchiq_core: introduce SLOT_QUEUE_INDEX_FROM_POS_MASKED Define a macro which already masked the result of SLOT_QUEUE_INDEX_FROM_POS. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-9-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 7a4da84ce81810eb6f9f0842c7199f1d57fbca79 Author: Stefan Wahren Date: Sun Apr 11 20:11:37 2021 +0200 staging: vchiq_core: use BITSET_WORD macro Use this macro to make the index retrieval less opaque. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-8-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 0e345d97730678d526bed36947beda4eb15642de Author: Stefan Wahren Date: Sun Apr 11 20:11:36 2021 +0200 staging: vchiq_core: improve readability of request_poll Storing the index for poll services in a local var will increase the readability of the second loop. Also we get the rid off the checkpatch issue about the line ending with a square bracket. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-7-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 63276d45bac52bd0ecfc35f613b81522fadf26c1 Author: Stefan Wahren Date: Sun Apr 11 20:11:35 2021 +0200 staging: vchiq_core: introduce service skip In case there is no service pointer provided, we can skip these polling. Use a goto to reduce the indentation, which is necessary for the following patches. Btw fix the brace alignment of the loops. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-6-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit b3582ed4269d1654680ee9daafc1976ca1d9c119 Author: Stefan Wahren Date: Sun Apr 11 20:11:34 2021 +0200 staging: vchiq_core: Exit early in 2 functions Exit early allow us to reduce the indention in vchiq_open_service_internal() and vchiq_set_service_option(). Btw we can avoid the multi-line assignments of quota. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-5-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 32129ec093ed96d156e0bbb5ce83d550646c96ef Author: Stefan Wahren Date: Sun Apr 11 20:11:33 2021 +0200 staging: vchiq_core: Get the rid off curly braces around cases Additional curly braces around cases are a bit harder to read. So change the scope of service quota to get the rid off those braces. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-4-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit e04e90083007275ba5b2f2be6baa399a5a60841f Author: Stefan Wahren Date: Sun Apr 11 20:11:32 2021 +0200 staging: vchiq_core: Shorten var name for service quota Readibility and following clean-ups will benefit from the shorter name. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-3-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit acdb1d908fdb31970569e3e65aaea05845c5001e Author: Stefan Wahren Date: Sun Apr 11 20:11:31 2021 +0200 staging: vchiq_core: Simplify vchiq_send_remote_use* There is no need for variable status. So drop it and improve readability. Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1618164700-21150-2-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit 8333e5a95855163600a5cc6b4d7ea1ccf0542de3 Author: Mitali Borkar Date: Sun Apr 11 23:03:23 2021 +0530 staging: rts5208: remove unnecessary ftrace-like logging Removed unnecessary ftrace-like logging by simply deleting that statement as we have other modes of logging like ftrace. Reported by checkpatch. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/YHMy457UGosfeaC0@kali Signed-off-by: Greg Kroah-Hartman commit 5a04ad1d1d4327498a9516e981eb27aee0a6509b Author: Fabio Aiuto Date: Sun Apr 11 14:57:37 2021 +0200 staging: rtl8723bs: remove unused variable 'start' in hal/sdio_halinit.c fix following W=1 compiler issue: drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function '_ReadAdapterInfo8723BS': drivers/staging/rtl8723bs/hal/sdio_halinit.c:1156:16: warning: variable 'start' set but not used [-Wunused-but-set-variable] 1156 | unsigned long start; | ^~~~~ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ce1faa15052b519738656e11658dee93f9e91c29.1618145345.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a2e2a05d5d57c08d70ed86c68b5c684246eb4e08 Author: Bryan Brattlof Date: Sun Apr 11 13:36:39 2021 +0000 staging: rtl8723bs: remove unnecessary goto jumps The next instruction for both 'goto exit' jump statements is to execute the exit jump instructions regardless. We can safely remove all jump statements from __init rtw_drv_entry() Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20210411133625.38195-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 9e74999b1a68ca17f985e65e007eda2bb5167931 Author: Dmitrii Wolf Date: Sun Apr 11 15:03:02 2021 +0300 Staging: rtl8192u: ieee80211: remove odd backslash. This backslash should be deleted - looks like leftover and not needed. Signed-off-by: Dmitrii Wolf Link: https://lore.kernel.org/r/20210411120301.6549-1-dev.dragon@bk.ru Signed-off-by: Greg Kroah-Hartman commit 16ae2044e91e186d69390a8e67bc16141c3c406f Author: Fabio M. De Francesco Date: Sun Apr 11 13:04:58 2021 +0200 staging: rtl8723bs: Change controlling expressions Change controlling expressions within 'if' statements: don't compare with 'true'. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210411110458.15955-5-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 13c57439feccdf77f4755e7762e610a138fb75c3 Author: Fabio M. De Francesco Date: Sun Apr 11 13:04:57 2021 +0200 staging: rtl8723bs: include: Change the type of a variable Change the type of fw_current_in_ps_mode from u8 to bool, because it is used everywhere as a bool and, accordingly, it should be declared as a bool. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210411110458.15955-4-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 97f136ec590aa281bcd2c470f248a3d47d0e7ee1 Author: Fabio M. De Francesco Date: Sun Apr 11 13:04:56 2021 +0200 staging: rtl8723bs: include: Fix misspelled words in comments Correct misspelled words in comments of several files. Issue (largely) detected by checkpatch.pl. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210411110458.15955-3-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 90b69822a5cb6bb9d1f2fe385dc6f6ec453c294f Author: Fabio M. De Francesco Date: Sun Apr 11 13:04:55 2021 +0200 staging: rtl8723bs: Remove camelcase in several files Remove camelcase in bFwCurrentInPSMode, a variable used by code of several subdirectories/files of the driver. Issue detected by checkpatch.pl. Delete the unnecessary "b" (that stands for "byte") from the beginning of the name. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210411110458.15955-2-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1d08ed588c6a85a35a24c82eb4cf0807ec2b366a Author: Ye Bin Date: Thu Apr 8 19:23:05 2021 +0800 usbip: vudc: fix missing unlock on error in usbip_sockfd_store() Add the missing unlock before return from function usbip_sockfd_store() in the error handling case. Fixes: bd8b82042269 ("usbip: vudc synchronize sysfs code paths") Reported-by: Hulk Robot Acked-by: Shuah Khan Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408112305.1022247-1-yebin10@huawei.com Signed-off-by: Greg Kroah-Hartman commit baaaf55d99ef4485d4c9e371d92809f0cbd53b85 Author: Ben Chuang Date: Wed Apr 7 17:38:16 2021 +0800 mmc: sdhci-pci-gli: Improve GL9763E L1 entry delay to increase battery life For GL9763E, although there is the best performance at the maximum delay. Change the value to 20us in order to have better power consumption. This change may reduce the maximum performance by 10%. Signed-off-by: Ben Chuang Link: https://lore.kernel.org/r/20210407093816.8863-1-benchuanggli@gmail.com Signed-off-by: Ulf Hansson commit 5e2ea2db04713437b01dd7f9311c7599b9804cb3 Author: Nicolas Saenz Julienne Date: Tue Apr 6 12:48:01 2021 +0200 dt-bindings: mmc: iproc-sdhci: Convert to json-schema Convert the brcm,iproc-sdhci binding to DT schema format using json-schema Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210406104802.20898-2-nsaenz@kernel.org Signed-off-by: Ulf Hansson commit ae3519b6abc2b9ec5eda05f735681820c0535c81 Author: Yang Li Date: Fri Apr 2 17:53:51 2021 +0800 mmc: moxart: Remove unused variable 'dma_time' and 'pio_time' Fixes the following W=1 kernel build warning(s): drivers/mmc/host/moxart-mmc.c:257:7: warning: variable ‘dma_time’ set but not used drivers/mmc/host/moxart-mmc.c:395:7: warning: variable ‘pio_time’ set but not used Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1617357231-93064-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit 4f111d04fb350e1d6930ee80ee700b6e43bdf6f7 Author: Bean Huo Date: Fri Apr 2 11:24:31 2021 +0200 mmc: core: Use userland specified timeout value for eMMC sanitize As the density increases, the 4-minute timeout value for sanitize is no longer feasible. At the same time, devices of different densities have different timeout values, which makes it difficult to use a common timeout value. Therefore, let's pass down the userland-specified sanitize timeout value so it can be used. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20210402092432.25069-2-huobean@gmail.com Signed-off-by: Ulf Hansson commit 14d34d2dbbe2d9144a65bae1549202d1717062e2 Merge: 3db53374405fb d434405aaab7d Author: Greg Kroah-Hartman Date: Mon Apr 12 08:15:27 2021 +0200 Merge 5.12-rc7 into usb-next We need the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 16a9874fe468855e8ddd72883ca903f706d0a9d0 Author: Ayush Sawal Date: Sat Apr 3 00:55:48 2021 +0530 crypto: chelsio - Read rxchannel-id from firmware The rxchannel id is updated by the driver using the port no value, but this does not ensure that the value is correct. So now rx channel value is obtained from etoc channel map value. Fixes: 567be3a5d227 ("crypto: chelsio - Use multiple txq/rxq per...") Signed-off-by: Ayush Sawal Signed-off-by: Herbert Xu commit 732f21a3053cf279eb6b85d19b7818a8f1dd2071 Author: Nicholas Piggin Date: Mon Apr 12 11:48:45 2021 +1000 KVM: PPC: Book3S HV: Ensure MSR[HV] is always clear in guest MSR Rather than clear the HV bit from the MSR at guest entry, make it clear that the hypervisor does not allow the guest to set the bit. The HV clear is kept in guest entry for now, but a future patch will warn if it is set. Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-13-npiggin@gmail.com commit 946cf44ac6ce61378ea02386d39394a06d502f28 Author: Nicholas Piggin Date: Mon Apr 12 11:48:44 2021 +1000 KVM: PPC: Book3S HV: Ensure MSR[ME] is always set in guest MSR Rather than add the ME bit to the MSR at guest entry, make it clear that the hypervisor does not allow the guest to clear the bit. The ME set is kept in guest entry for now, but a future patch will warn if it's not present. Signed-off-by: Nicholas Piggin Reviewed-by: Daniel Axtens Reviewed-by: Fabiano Rosas Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-12-npiggin@gmail.com commit da487a5d1bee6a30798a8db15986d3d028c8ac92 Author: Nicholas Piggin Date: Mon Apr 12 11:48:43 2021 +1000 powerpc/64s: remove KVM SKIP test from instruction breakpoint handler The code being executed in KVM_GUEST_MODE_SKIP is hypervisor code with MSR[IR]=0, so the faults of concern are the d-side ones caused by access to guest context by the hypervisor. Instruction breakpoint interrupts are not a concern here. It's unlikely any good would come of causing breaks in this code, but skipping the instruction that caused it won't help matters (e.g., skip the mtmsr that sets MSR[DR]=0 or clears KVM_GUEST_MODE_SKIP). [Paul notes: "the 0x1300 interrupt was dropped from the architecture a long time ago and is not generated by P7, P8, P9 or P10." So add a comment about this in the handler code while we're here. ] Signed-off-by: Nicholas Piggin Reviewed-by: Daniel Axtens Reviewed-by: Fabiano Rosas Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-11-npiggin@gmail.com commit 5eee8371828a92a2620453907d6b2b6dc819ab3a Author: Nicholas Piggin Date: Mon Apr 12 11:48:42 2021 +1000 powerpc/64s: Remove KVM handler support from CBE_RAS interrupts Cell does not support KVM. Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-10-npiggin@gmail.com commit 0fd85cb83fbd7048d8a024ba1338924349e26fd5 Author: Nicholas Piggin Date: Mon Apr 12 11:48:41 2021 +1000 KVM: PPC: Book3S HV: Fix CONFIG_SPAPR_TCE_IOMMU=n default hcalls This config option causes the warning in init_default_hcalls to fire because the TCE handlers are in the default hcall list but not implemented. Signed-off-by: Nicholas Piggin Reviewed-by: Daniel Axtens Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-9-npiggin@gmail.com commit 6c12c4376bbbc89fc84480096ba838e07ab7c405 Author: Nicholas Piggin Date: Mon Apr 12 11:48:40 2021 +1000 KVM: PPC: Book3S HV: remove unused kvmppc_h_protect argument The va argument is not used in the function or set by its asm caller, so remove it to be safe. Signed-off-by: Nicholas Piggin Reviewed-by: Daniel Axtens Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-8-npiggin@gmail.com commit 4b5f0a0d49e663adf1c7c6f2dd05cb18dd53db8c Author: Nicholas Piggin Date: Mon Apr 12 11:48:39 2021 +1000 KVM: PPC: Book3S HV: Remove redundant mtspr PSPB This SPR is set to 0 twice when exiting the guest. Suggested-by: Fabiano Rosas Signed-off-by: Nicholas Piggin Reviewed-by: Daniel Axtens Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-7-npiggin@gmail.com commit 72c15287210f7433f5fcb55452b05e4b6ccc6c15 Author: Nicholas Piggin Date: Mon Apr 12 11:48:38 2021 +1000 KVM: PPC: Book3S HV: Prevent radix guests setting LPCR[TC] Prevent radix guests setting LPCR[TC]. This bit only applies to hash partitions. Signed-off-by: Nicholas Piggin Reviewed-by: Alexey Kardashevskiy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-6-npiggin@gmail.com commit bcc92a0d6d6eae1e7b34a88f58ae69c081d85f97 Author: Nicholas Piggin Date: Mon Apr 12 11:48:37 2021 +1000 KVM: PPC: Book3S HV: Disallow LPCR[AIL] to be set to 1 or 2 These are already disallowed by H_SET_MODE from the guest, also disallow these by updating LPCR directly. AIL modes can affect the host interrupt behaviour while the guest LPCR value is set, so filter it here too. Suggested-by: Fabiano Rosas Signed-off-by: Nicholas Piggin Acked-by: Paul Mackerras Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-5-npiggin@gmail.com commit 67145ef4960f55923b9e404c0b184944bfeded4d Author: Nicholas Piggin Date: Mon Apr 12 11:48:36 2021 +1000 KVM: PPC: Book3S HV: Add a function to filter guest LPCR bits Guest LPCR depends on hardware type, and future changes will add restrictions based on errata and guest MMU mode. Move this logic to a common function and use it for the cases where the guest wants to update its LPCR (or the LPCR of a nested guest). This also adds a warning in other places that set or update LPCR if we try to set something that would have been disallowed by the filter, as a sanity check. Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-4-npiggin@gmail.com commit a19b70abc69aea8ea5974c57e1c3457d9df6aff2 Author: Nicholas Piggin Date: Mon Apr 12 11:48:35 2021 +1000 KVM: PPC: Book3S HV: Nested move LPCR sanitising to sanitise_hv_regs This will get a bit more complicated in future patches. Move it into the helper function. This change allows the L1 hypervisor to determine some of the LPCR bits that the L0 is using to run it, which could be a privilege violation (LPCR is HV-privileged), although the same problem exists now for HFSCR for example. Discussion of the HV privilege issue is ongoing and can be resolved with a later change. Signed-off-by: Nicholas Piggin Reviewed-by: Fabiano Rosas Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-3-npiggin@gmail.com commit 5088eb4092df12d701af8e0e92860b7186365279 Author: Nicholas Piggin Date: Mon Apr 12 11:48:34 2021 +1000 KVM: PPC: Book3S HV P9: Restore host CTRL SPR after guest exit The host CTRL (runlatch) value is not restored after guest exit. The host CTRL should always be 1 except in CPU idle code, so this can result in the host running with runlatch clear, and potentially switching to a different vCPU which then runs with runlatch clear as well. This has little effect on P9 machines, CTRL is only responsible for some PMU counter logic in the host and so other than corner cases of software relying on that, or explicitly reading the runlatch value (Linux does not appear to be affected but it's possible non-Linux guests could be), there should be no execution correctness problem, though it could be used as a covert channel between guests. There may be microcontrollers, firmware or monitoring tools that sample the runlatch value out-of-band, however since the register is writable by guests, these values would (should) not be relied upon for correct operation of the host, so suboptimal performance or incorrect reporting should be the worst problem. Fixes: 95a6432ce9038 ("KVM: PPC: Book3S HV: Streamlined guest entry/exit path on P9 for radix guests") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210412014845.1517916-2-npiggin@gmail.com commit c38ae56ee034623c59e39c0130ca0dec086c1a39 Author: Junlin Yang Date: Fri Apr 9 21:54:26 2021 +0800 pata_ipx4xx_cf: Fix unsigned comparison with less than zero The return from the call to platform_get_irq() is int, it can be a negative error code, however this is being assigned to an unsigned int variable 'irq', so making 'irq' an int, and change the position to keep the code format. ./drivers/ata/pata_ixp4xx_cf.c:168:5-8: WARNING: Unsigned expression compared with zero: irq > 0 Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210409135426.1773-1-angkery@163.com Signed-off-by: Jens Axboe commit 8b625d01fd503d08005eaff68d05a39d3e1f80e4 Author: Sowjanya Komatineni Date: Thu Apr 8 13:55:15 2021 -0700 ata: ahci_tegra: call tegra_powergate_power_off only when PM domain is not present This patch adds check to call legacy power domain API tegra_powergate_power_off() only when PM domain is not present. Fixes: 868ed7311cd8 ("ata: ahci_tegra: Add AHCI support for Tegra186") Reviewed-by: Dmitry Osipenko Acked-by: Thierry Reding Link: https://lore.kernel.org/r/1617915315-13639-2-git-send-email-skomatineni@nvidia.com Signed-off-by: Sowjanya Komatineni Signed-off-by: Jens Axboe commit eb87e4e90bca55ab581dcb0bf1be278cd1c27c96 Author: Chaitanya Kulkarni Date: Sun Apr 11 15:43:30 2021 -0700 gdrom: fix compilation error Use the right name for the struct request variable that removes the following compilation error :- make --silent --keep-going --jobs=8 O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=sh CROSS_COMPILE=sh4-linux-gnu- 'CC=sccache sh4-linux-gnu-gcc' 'HOSTCC=sccache gcc' In file included from /builds/linux/include/linux/scatterlist.h:9, from /builds/linux/include/linux/dma-mapping.h:10, from /builds/linux/drivers/cdrom/gdrom.c:16: /builds/linux/drivers/cdrom/gdrom.c: In function 'gdrom_readdisk_dma': /builds/linux/drivers/cdrom/gdrom.c:586:61: error: 'rq' undeclared (first use in this function) 586 | __raw_writel(page_to_phys(bio_page(req->bio)) + bio_offset(rq->bio), | ^~ Fixes: 1d2c82001a5f ("gdrom: support highmem") Reported-by: Naresh Kamboju Tested-by: Naresh Kamboju Signed-off-by: Chaitanya Kulkarni Signed-off-by: Jens Axboe commit 8d13326e56c1a2b4e3af89843e1376b72a2ae6b7 Author: Pavel Begunkov Date: Sun Apr 11 01:46:33 2021 +0100 io_uring: optimise fill_event() by inlining There are three cases where we much care about performance of io_cqring_fill_event() -- flushing inline completions, iopoll and io_req_complete_post(). Inline a hot part of fill_event() into them. All others are not as important and we don't want to bloat binary for them, so add a noinline version of the function for all other use use cases. nops test(batch=32): 16.932 vs 17.822 KIOPS Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a11d59424bf4417aca33f5ec21008bb3b0ebd11e.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit ff64216423d46396db2ca8b92fc75cc00ee6df4f Author: Pavel Begunkov Date: Sun Apr 11 01:46:32 2021 +0100 io_uring: always pass cflags into fill_event() A simple preparation patch inlining io_cqring_fill_event(), which only role was to pass cflags=0 into an actual fill event. It helps to keep number of related helpers sane in following patches. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/704f9c85b7d9843e4ad50a9f057200c58f5adc6e.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 44c769de6ffc3f1ea524fc9b7517c97078796e29 Author: Pavel Begunkov Date: Sun Apr 11 01:46:31 2021 +0100 io_uring: optimise non-eventfd post-event Eventfd is not the canonical way of using io_uring, annotate io_should_trigger_evfd() with likely so it improves code generation for non-eventfd branch. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/42fdaa51c68d39479f02cef4fe5bcb24624d60fa.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 4af3417a347d06c8632346a6a9035c28b1dd94b4 Author: Pavel Begunkov Date: Sun Apr 11 01:46:30 2021 +0100 io_uring: refactor compat_msghdr import Add an entry for user pointer to compat_msghdr into io_connect, so it's explicit that we may use it as this, and removes annoying casts. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/73fd644dea1518f528d3648981cf777ce6e537e9.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0bdf3398b06ef1082b7d796039d34fc61a1285ea Author: Pavel Begunkov Date: Sun Apr 11 01:46:29 2021 +0100 io_uring: enable inline completion for more cases Take advantage of delayed/inline completion flushing and pass right issue flags for completion of open, open2, fadvise and poll remove opcodes. All others either already use it or always punted and never executed inline. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0badc7512e82f7350b73bb09abbebbecbdd5dab8.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a1fde923e3065a89abccfeef95096c933f6a954c Author: Pavel Begunkov Date: Sun Apr 11 01:46:28 2021 +0100 io_uring: refactor io_close A small refactoring shrinking it and making easier to read. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/19b24eed7cd491a0243b50366dd2a23b558e2665.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 3f48cf18f886c97a7e775af10696bfed9ddcff31 Author: Pavel Begunkov Date: Sun Apr 11 01:46:27 2021 +0100 io_uring: unify files and task cancel Now __io_uring_cancel() and __io_uring_files_cancel() are very similar and mostly differ by how we count requests, merge them and allow tctx_inflight() to handle counting. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/1a5986a97df4dc1378f3fe0ca1eb483dbcf42112.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b303fe2e5a3802b0b1fb8d997e5c9caef48f6dd8 Author: Pavel Begunkov Date: Sun Apr 11 01:46:26 2021 +0100 io_uring: track inflight requests through counter Instead of keeping requests in a inflight_list, just track them with a per tctx atomic counter. Apart from it being much easier and more consistent with task cancel, it frees ->inflight_entry from being shared between iopoll and cancel-track, so less headache for us. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3c2ee0863cd7eeefa605f3eaff4c1c461a6f1157.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 368b2080853f4694db780528c942f191f1c1687c Author: Pavel Begunkov Date: Sun Apr 11 01:46:25 2021 +0100 io_uring: unify task and files cancel loops Move tracked inflight number check up the stack into __io_uring_files_cancel() so it's similar to task cancel. Will be used for further cleaning. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/dca5a395efebd1e3e0f3bbc6b9640c5e8aa7e468.1618101759.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0ea13b448ee75ef0c68c18d207f6c488f143e725 Author: Pavel Begunkov Date: Fri Apr 9 09:13:21 2021 +0100 io_uring: simplify apoll hash removal hash_del() works well with non-hashed nodes, there's no need to check if it is hashed first. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e27414bef7b4f25f4569401e42bc68d9fdfc3125 Author: Pavel Begunkov Date: Fri Apr 9 09:13:20 2021 +0100 io_uring: refactor io_poll_complete() Remove error parameter from io_poll_complete(), 0 is always passed, and do a bit of cleaning on top. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f40b964a66ace54cda811d8ba96eccec210cd7ad Author: Pavel Begunkov Date: Fri Apr 9 09:13:19 2021 +0100 io_uring: clean up io_poll_task_func() io_poll_complete() always fills an event (even an overflowed one), so we always should do io_cqring_ev_posted() afterwards. And that's what is currently happening, because second EPOLLONESHOT check is always true, it can't return !done for oneshots. Remove those branching, it's much easier to read. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e0051d7d18e0b3e25195ab332beea1a1a2fba5ca Author: Peter Zijlstra Date: Thu Apr 8 11:44:50 2021 +0200 io-wq: Fix io_wq_worker_affinity() Do not include private headers and do not frob in internals. On top of that, while the previous code restores the affinity, it doesn't ensure the task actually moves there if it was running, leading to the fun situation that it can be observed running outside of its allowed mask for potentially significant time. Use the proper API instead. Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/YG7QkiUzlEbW85TU@hirez.programming.kicks-ass.net Signed-off-by: Jens Axboe commit cb3b200e4f66524d03d6410dd51bcf42f265a4d0 Author: Jens Axboe Date: Tue Apr 6 09:49:31 2021 -0600 io_uring: don't attempt re-add of multishot poll request if racing We currently allow racy updates to multishot requests, but we can end up double adding the poll request if both completion and update does it. Ensure that we skip re-add on the update side if someone else is completing it. Fixes: b69de288e913 ("io_uring: allow events and user_data update of running poll requests") Reported-by: Joakim Hassila Signed-off-by: Jens Axboe commit 417b5052be9ec892d06a45dbecf6d3f6ae211ae3 Author: Hao Xu Date: Tue Apr 6 11:08:45 2021 +0800 io-wq: simplify code in __io_worker_busy() Leverage XOR to simplify the code in __io_worker_busy. Signed-off-by: Hao Xu Link: https://lore.kernel.org/r/1617678525-3129-1-git-send-email-haoxu@linux.alibaba.com Signed-off-by: Jens Axboe commit 53a3126756d6edfe4fd5fa9037cd949df94dfe55 Author: Pavel Begunkov Date: Thu Apr 1 15:44:05 2021 +0100 io_uring: kill outdated comment about splice punt The splice/tee comment in io_prep_async_work() isn't relevant since the section was moved, delete it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/892a549c89c3d422b679677b8e68ffd3fcb736b6.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a04b0ac0cb64fc403822de9288d68e6511ce6dc2 Author: Pavel Begunkov Date: Thu Apr 1 15:44:04 2021 +0100 io_uring: encapsulate fixed files into struct Add struct io_fixed_file representing a single registered file, first to hide ugly struct file **, which may be misleading, and secondly to retype it to unsigned long as conversions to it and back to file * for handling and masking FFS_* flags are getting nasty. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/78669731a605a7614c577c3de552631cfaf0869a.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 846a4ef22bf6d6ede4547fe8fa500385a90c64ba Author: Pavel Begunkov Date: Thu Apr 1 15:44:03 2021 +0100 io_uring: refactor file tables alloc/free Introduce a heler io_free_file_tables() doing all the cleaning, there are several places where it's hand coded. Also move all allocations into io_sqe_alloc_file_tables() and rename it, so all of it is in one place. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/502a84ebf41ff119b095e59661e678eacb752bf8.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f4f7d21ce46474128934caeb80dfb1e5396b596e Author: Pavel Begunkov Date: Thu Apr 1 15:44:02 2021 +0100 io_uring: don't quiesce intial files register There is no reason why we would want to fully quiesce ring on IORING_REGISTER_FILES, if it's already registered we fail. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/563bb8060bb2d3efbc32fce6101678281c574d2a.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 9a321c98490c70653a4f0a10b28c45edbcf7a93d Author: Pavel Begunkov Date: Thu Apr 1 15:44:01 2021 +0100 io_uring: set proper FFS* flags on reg file update Set FFS_* flags (e.g. FFS_ASYNC_READ) not only in initial registration but also on registered files update. Not a bug, but may miss getting profit out of the feature. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/df29a841a2d3d3695b509cdffce5070777d9d942.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 044118069a23fdfb31677631cfdfc5e33b488752 Author: Pavel Begunkov Date: Thu Apr 1 15:44:00 2021 +0100 io_uring: deduplicate NOSIGNAL setting Set MSG_NOSIGNAL and REQ_F_NOWAIT in send/recv prep routines and don't duplicate it in all four send/recv handlers. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e1133a3ed1c0e192975b7341ea4b0bf91f63b132.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit df9727affa058f4f18e388b30247650f8ae13cd8 Author: Pavel Begunkov Date: Thu Apr 1 15:43:59 2021 +0100 io_uring: put link timeout req consistently Don't put linked timeout req in io_async_find_and_cancel() but do it in io_link_timeout_fn(), so we have only one point for that and won't have to do it differently as it's now (put vs put_deferred). Btw, improve a bit io_async_find_and_cancel()'s locking. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/d75b70957f245275ab7cba83e0ac9c1b86aae78a.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c4ea060e85eabe40f3572969daff4fc2f242b7b8 Author: Pavel Begunkov Date: Thu Apr 1 15:43:58 2021 +0100 io_uring: simplify overflow handling Overflowed CQEs doesn't lock requests anymore, so we don't care so much about cancelling them, so kill cq_overflow_flushed and simplify the code. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/5799867aeba9e713c32f49aef78e5e1aef9fbc43.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e07785b0029165fdb1c72ac12fe42801ba5f9f61 Author: Pavel Begunkov Date: Thu Apr 1 15:43:57 2021 +0100 io_uring: lock annotate timeouts and poll Add timeout and poll ->comletion_lock annotations for Sparse, makes life easier while looking at the functions. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2345325643093d41543383ba985a735aeb899eac.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 47e90392c8ad982c25f58125e9be3fc4d476b9ed Author: Pavel Begunkov Date: Thu Apr 1 15:43:56 2021 +0100 io_uring: kill unused forward decls Kill unused forward declarations for io_ring_file_put() and io_queue_next(). Also btw rename the first one. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/64aa27c3f9662e14615cc119189f5eaf12989671.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 4751f53d74a688137de6a2a0b12ee591288c6dc8 Author: Pavel Begunkov Date: Thu Apr 1 15:43:55 2021 +0100 io_uring: store reg buffer end instead of length It's a bit more convenient for us to store a registered buffer end address instead of length, see struct io_mapped_ubuf, as it allow to not recompute it every time. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/39164403fe92f1dc437af134adeec2423cdf9395.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 75769e3f7357171dbe040a5ed55445c2642295d1 Author: Pavel Begunkov Date: Thu Apr 1 15:43:54 2021 +0100 io_uring: improve import_fixed overflow checks Replace a hand-coded overflow check with a specialised function. Even though compilers are smart enough to generate identical binary (i.e. check carry bit), but it's more foolproof and conveys the intention better. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e437dcdc929bacbb6f11a4824ecbbf17225cb82a.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 0aec38fda2b6e36c0b066a87ff727ace3666cade Author: Pavel Begunkov Date: Thu Apr 1 15:43:53 2021 +0100 io_uring: refactor io_async_cancel() Remove extra tctx==NULL checks that are already done by io_async_cancel_one(). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/70c2a8b958d942e86958a28af0452966ce1095b0.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e146a4a3f69e843a2153735875c64990aca244b1 Author: Pavel Begunkov Date: Thu Apr 1 15:43:52 2021 +0100 io_uring: remove unused hash_wait No users of io_uring_ctx::hash_wait left, kill it. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/e25cb83c233a5f75f15275596b49fbafbea606fa.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 7394161cb8bd26be43ebf0075e3b0197a6c3ca01 Author: Pavel Begunkov Date: Thu Apr 1 15:43:51 2021 +0100 io_uring: better ref handling in poll_remove_one Instead of io_put_req() to drop not a final ref, use req_ref_put(), which is slimmer and will also check the invariant. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/85b5774ce13ae55cc2e705abdc8cbafe1212f1bd.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 89b5066ea1d96b321c0743259169c599d3f4f969 Author: Pavel Begunkov Date: Thu Apr 1 15:43:50 2021 +0100 io_uring: combine lock/unlock sections on exit io_ring_exit_work() already does uring_lock lock/unlock, no need to repeat it for lock waiting trick in io_ring_ctx_free(). Move the waiting with comments and spinlocking into io_ring_exit_work. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/a8ae0589b0ea64ad4791e2c282e4e9b713dd7024.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 215c39026023dbfb4026b670c318371252be909f Author: Pavel Begunkov Date: Thu Apr 1 15:43:48 2021 +0100 io_uring: remove useless is_dying check on quiesce rsrc_data refs should always be valid for potential submitters, io_rsrc_ref_quiesce() restores it before unlocking, so percpu_ref_is_dying() check in io_sqe_files_unregister() does nothing and misleading. Concurrent quiesce is prevented with struct io_rsrc_data::quiesce. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/bf97055e1748ee3a382e66daf384a469eb90b931.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 28a9fe2521348ee350b65ae89e63c1def87b0cb6 Author: Pavel Begunkov Date: Thu Apr 1 15:43:47 2021 +0100 io_uring: reuse io_rsrc_node_destroy() Reuse io_rsrc_node_destroy() in __io_rsrc_put_work(). Also move it to a more appropriate place -- to the other node routines, and remove forward declaration. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cccafba41aee1e5bb59988704885b1340aef3a27.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit a7f0ed5acdc9ce251c66b9380e08766e59fa4ee8 Author: Pavel Begunkov Date: Thu Apr 1 15:43:46 2021 +0100 io_uring: ctx-wide rsrc nodes If we're going to ever support multiple types of resources we need shared rsrc nodes to not bloat requests, that is implemented in this patch. It also gives a nicer API and saves one pointer dereference in io_req_set_rsrc_node(). We may say that all requests bound to a resource belong to one and only one rsrc node, and considering that nodes are removed and recycled strictly in-order, this separates requests into generations, where generation are changed on each node switch (i.e. io_rsrc_node_switch()). The API is simple, io_rsrc_node_switch() switches to a new generation if needed, and also optionally kills a passed in io_rsrc_data. Each call to io_rsrc_node_switch() have to be preceded with io_rsrc_node_switch_start(). The start function is idempotent and should not necessarily be followed by switch. One difference is that once a node was set it will always retain a valid rsrc node, even on unregister. It may be a nuisance at the moment, but makes much sense for multiple types of resources. Another thing changed is that nodes are bound to/associated with a io_rsrc_data later just before killing (i.e. switching). Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/7e9c693b4b9a2f47aa784b616ce29843021bb65a.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit e7c78371bbf749087ff6b1f37c0d60f0ae82572c Author: Pavel Begunkov Date: Thu Apr 1 15:43:45 2021 +0100 io_uring: refactor io_queue_rsrc_removal() Pass rsrc_node into io_queue_rsrc_removal() explicitly. Just a simple preparation patch, makes following changes nicer. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/002889ce4de7baf287f2b010eef86ffe889174c6.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 40ae0ff70fb1379cb00041ef4061681e5e84e7f9 Author: Pavel Begunkov Date: Thu Apr 1 15:43:44 2021 +0100 io_uring: move rsrc_put callback into io_rsrc_data io_rsrc_node's callback operates only on a single io_rsrc_data and only with its resources, so rsrc_put() callback is actually a property of io_rsrc_data. Move it there, it makes code much nicecr. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/9417c2fba3c09e8668f05747006a603d416d34b4.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 82fbcfa996e0b0f66ae0187082b0704d0ba50bdd Author: Pavel Begunkov Date: Thu Apr 1 15:43:43 2021 +0100 io_uring: encapsulate rsrc node manipulations io_rsrc_node_get() and io_rsrc_node_set() are always used together, merge them into one so most users don't even see io_rsrc_node and don't need to care about it. It helped to catch io_sqe_files_register() inferring rsrc data argument for get and set differently, not a problem but a good sign. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/0827b080b2e61b3dec795380f7e1a1995595d41f.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit f3baed39929edc5fa0ce7a897567153c87551776 Author: Pavel Begunkov Date: Thu Apr 1 15:43:42 2021 +0100 io_uring: use rsrc prealloc infra for files reg Keep it consistent with update and use io_rsrc_node_prealloc() + io_rsrc_node_get() in io_sqe_files_register() as well, that will be used in future patches, not as error prone and allows to deduplicate rsrc_node init. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/cf87321e6be5e38f4dc7fe5079d2aa6945b1ace0.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 221aa92409f945a19ce28c5cb54b4d9957f90715 Author: Pavel Begunkov Date: Thu Apr 1 15:43:41 2021 +0100 io_uring: simplify io_rsrc_node_ref_zero Replace queue_delayed_work() with mod_delayed_work() in io_rsrc_node_ref_zero() as the later one can schedule a new work, and cleanup it further for better readability. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/3b2b23e3a1ea4bbf789cd61815d33e05d9ff945e.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit b895c9a632e70ad977c1c0e31e640be5c98b56c6 Author: Pavel Begunkov Date: Thu Apr 1 15:43:40 2021 +0100 io_uring: name rsrc bits consistently Keep resource related structs' and functions' naming consistent, in particular use "io_rsrc" prefix for everything. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/962f5acdf810f3a62831e65da3932cde24f6d9df.1617287883.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit c80ca4707d1aa8b6ba2cb8e57a521ebb6f9f22a2 Author: Jens Axboe Date: Thu Apr 1 19:57:07 2021 -0600 io-wq: cancel task_work on exit only targeting the current 'wq' With using task_work_cancel(), we're potentially canceling task_work that isn't related to this specific io_wq. Use the newly added task_work_cancel_match() to ensure that we only remove and cancel work items that are specific to this io_wq. Fixes: 685fe7feedb9 ("io-wq: eliminate the need for a manager thread") Signed-off-by: Jens Axboe commit c7aab1a7c52b82d9afd7e03c398eb03dc2aa0507 Author: Jens Axboe Date: Thu Apr 1 19:53:29 2021 -0600 task_work: add helper for more targeted task_work canceling The only exported helper we have right now is task_work_cancel(), which cancels any task_work from a given task where func matches the queued work item. This is a bit too coarse for some use cases. Add a task_work_cancel_match() that allows to more specifically target individual work items outside of purely the callback function used. task_work_cancel() can be trivially implemented on top of that, hence do so. Reviewed-by: Oleg Nesterov Signed-off-by: Jens Axboe commit b2e720ace221f9be75fefdba7d0ebab9d05fc561 Author: Jens Axboe Date: Wed Mar 31 09:03:03 2021 -0600 io_uring: fix race around poll update and poll triggering Joakim reports that in some conditions he sees a multishot poll request being canceled, and that it coincides with getting -EALREADY on modification. As part of the poll update procedure, there's a small window where the request is marked as canceled, and if this coincides with the event actually triggering, then we can get a spurious -ECANCELED and termination of the multishot request. Don't mark the poll request as being canceled for update. We also don't care if we race on removal unless it's a one-shot request, we can safely updated for either case. Fixes: b69de288e913 ("io_uring: allow events and user_data update of running poll requests") Reported-by: Joakim Hassila Signed-off-by: Jens Axboe commit 5b489fea977c2b23e26e2f630478da0f4bfdc879 Merge: 95291ced8169d 927c5043459ec Author: David S. Miller Date: Sun Apr 11 16:49:08 2021 -0700 Merge branch 'ipa-next' Alex Elder says: ==================== net: ipa: support two more platforms This series adds IPA support for two more Qualcomm SoCs. The first patch updates the DT binding to add compatible strings. The second temporarily disables checksum offload support for IPA version 4.5 and above. Changes are required to the RMNet driver to support the "inline" checksum offload used for IPA v4.5+, and once those are present this capability will be enabled for IPA. The third and fourth patches add configuration data for IPA versions 4.5 (used for the SDX55 SoC) and 4.11 (used for the SD7280 SoC). ==================== Signed-off-by: David S. Miller commit 927c5043459ec613bad281074293f073599d2906 Author: Alex Elder Date: Fri Apr 9 15:40:24 2021 -0500 net: ipa: add IPA v4.11 configuration data Add support for the SC7280 SoC, which includes IPA version 4.11. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fbb763e7e7366c27848cbfb09d983802b6322709 Author: Alex Elder Date: Fri Apr 9 15:40:23 2021 -0500 net: ipa: add IPA v4.5 configuration data Add support for the SDX55 SoC, which includes IPA version 4.5. Starting with IPA v4.5, a few of the memory regions have a different number of "canary" values; update comments in the where the region identifers are defined to accurately reflect that. I'll note three differences in SDX55 versus the other two existing platforms (SDM845 and SC7180): - SDX55 uses a 32-bit Linux kernel - SDX55 has four interconnects rather than three - SDX55 uses IPA v4.5, which uses inline checksum offload Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit c88c34fcf8f501d588c0a999aa7e51e18552c5f0 Author: Alex Elder Date: Fri Apr 9 15:40:22 2021 -0500 net: ipa: disable checksum offload for IPA v4.5+ Checksum offload for IPA v4.5+ is implemented differently, using "inline" offload (which uses a common header format for both upload and download offload). The IPA hardware must be programmed to enable MAP checksum offload, but the RMNet driver is responsible for interpreting checksum metadata supplied with messages. Currently, the RMNet driver does not support inline checksum offload. This support is imminent, but until it is available, do not allow newer versions of IPA to specify checksum offload for endpoints. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit c3264fee72e7565ca5df2896a221672678d595b2 Author: Alex Elder Date: Fri Apr 9 15:40:21 2021 -0500 dt-bindings: net: qcom,ipa: add some compatible strings Add existing supported platform "qcom,sc7180-ipa" to the set of IPA compatible strings. Also add newly-supported "qcom,sdx55-ipa", "qcom,sc7280-ipa". Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 95291ced8169d157f42232e2463d27fb16da2efe Author: Qiheng Lin Date: Fri Apr 9 19:09:11 2021 +0800 ehea: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Signed-off-by: David S. Miller commit 50e96989d736b8e5623059815247be01ca6713c1 Author: Pavel Begunkov Date: Wed Mar 24 22:59:01 2021 +0000 io_uring: reg buffer overflow checks hardening We are safe with overflows in io_sqe_buffer_register() because it will just yield alloc failure, but it's nicer to check explicitly. Signed-off-by: Pavel Begunkov Link: https://lore.kernel.org/r/2b0625551be3d97b80a5fd21c8cd79dc1c91f0b5.1616624589.git.asml.silence@gmail.com Signed-off-by: Jens Axboe commit 548d819d1eed7b6bf86d36c8de2fbc54b69db571 Author: Jens Axboe Date: Thu Mar 25 10:21:35 2021 -0600 io_uring: allow SQPOLL without CAP_SYS_ADMIN or CAP_SYS_NICE Now that we have any worker being attached to the original task as threads, accounting of CPU time is directly attributed to the original task as well. This means that we no longer have to restrict SQPOLL to needing elevated privileges, as it's really no different from just having the task spawn a busy looping thread in userspace. Reported-by: Stefano Garzarella Signed-off-by: Jens Axboe commit 685fe7feedb96771683437107ba72131410e2350 Author: Jens Axboe Date: Mon Mar 8 09:37:51 2021 -0700 io-wq: eliminate the need for a manager thread io-wq relies on a manager thread to create/fork new workers, as needed. But there's really no strong need for it anymore. We have the following cases that fork a new worker: 1) Work queue. This is done from the task itself always, and it's trivial to create a worker off that path, if needed. 2) All workers have gone to sleep, and we have more work. This is called off the sched out path. For this case, use a task_work items to queue a fork-worker operation. 3) Hashed work completion. Don't think we need to do anything off this case. If need be, it could just use approach 2 as well. Part of this change is incrementing the running worker count before the fork, to avoid cases where we observe we need a worker and then queue creation of one. Then new work comes in, we fork a new one. That last queue operation should have waited for the previous worker to come up, it's quite possible we don't even need it. Hence move the worker running from before we fork it off to more efficiently handle that case. Signed-off-by: Jens Axboe commit 66ae0d1e2d9fe6ec70e73fcfdcf4b390e271c1ac Author: Jens Axboe Date: Mon Mar 22 09:39:12 2021 -0600 kernel: allow fork with TIF_NOTIFY_SIGNAL pending fork() fails if signal_pending() is true, but there are two conditions that can lead to that: 1) An actual signal is pending. We want fork to fail for that one, like we always have. 2) TIF_NOTIFY_SIGNAL is pending, because the task has pending task_work. We don't need to make it fail for that case. Allow fork() to proceed if just task_work is pending, by changing the signal_pending() check to task_sigpending(). Signed-off-by: Jens Axboe commit b69de288e913030082bed3a324ddc58be6c1e983 Author: Jens Axboe Date: Wed Mar 17 08:37:41 2021 -0600 io_uring: allow events and user_data update of running poll requests This adds two new POLL_ADD flags, IORING_POLL_UPDATE_EVENTS and IORING_POLL_UPDATE_USER_DATA. As with the other POLL_ADD flag, these are masked into sqe->len. If set, the POLL_ADD will have the following behavior: - sqe->addr must contain the the user_data of the poll request that needs to be modified. This field is otherwise invalid for a POLL_ADD command. - If IORING_POLL_UPDATE_EVENTS is set, sqe->poll_events must contain the new mask for the existing poll request. There are no checks for whether these are identical or not, if a matching poll request is found, then it is re-armed with the new mask. - If IORING_POLL_UPDATE_USER_DATA is set, sqe->off must contain the new user_data for the existing poll request. A POLL_ADD with any of these flags set may complete with any of the following results: 1) 0, which means that we successfully found the existing poll request specified, and performed the re-arm procedure. Any error from that re-arm will be exposed as a completion event for that original poll request, not for the update request. 2) -ENOENT, if no existing poll request was found with the given user_data. 3) -EALREADY, if the existing poll request was already in the process of being removed/canceled/completing. 4) -EACCES, if an attempt was made to modify an internal poll request (eg not one originally issued ass IORING_OP_POLL_ADD). The usual -EINVAL cases apply as well, if any invalid fields are set in the sqe for this command type. Signed-off-by: Jens Axboe commit b2cb805f6dd40938c0398c94787741a08ed5e921 Author: Jens Axboe Date: Wed Mar 17 08:17:19 2021 -0600 io_uring: abstract out a io_poll_find_helper() We'll need this helper for another purpose, for now just abstract it out and have io_poll_cancel() use it for lookups. Signed-off-by: Jens Axboe commit 5082620fb2cab74b623c3bf5da5a222add564871 Author: Jens Axboe Date: Tue Feb 23 09:02:26 2021 -0700 io_uring: terminate multishot poll for CQ ring overflow If we hit overflow and fail to allocate an overflow entry for the completion, terminate the multishot poll mode. Signed-off-by: Jens Axboe commit b2c3f7e1715605c045f46fb369d850ada4749388 Author: Jens Axboe Date: Tue Feb 23 08:58:04 2021 -0700 io_uring: abstract out helper for removing poll waitqs/hashes No functional changes in this patch, just preparation for kill multishot poll on CQ overflow. Signed-off-by: Jens Axboe commit 88e41cf928a6e1a0eb5a9492e2d091ec6193cce4 Author: Jens Axboe Date: Mon Feb 22 22:08:01 2021 -0700 io_uring: add multishot mode for IORING_OP_POLL_ADD The default io_uring poll mode is one-shot, where once the event triggers, the poll command is completed and won't trigger any further events. If we're doing repeated polling on the same file or socket, then it can be more efficient to do multishot, where we keep triggering whenever the event becomes true. This deviates from the usual norm of having one CQE per SQE submitted. Add a CQE flag, IORING_CQE_F_MORE, which tells the application to expect further completion events from the submitted SQE. Right now the only user of this is POLL_ADD in multishot mode. Since sqe->poll_events is using the space that we normally use for adding flags to commands, use sqe->len for the flag space for POLL_ADD. Multishot mode is selected by setting IORING_POLL_ADD_MULTI in sqe->len. An application should expect more CQEs for the specificed SQE if the CQE is flagged with IORING_CQE_F_MORE. In multishot mode, only cancelation or an error will terminate the poll request, in which case the flag will be cleared. Signed-off-by: Jens Axboe commit 7471e1afabf8a9adcb4659170f4e198c05f5b5a6 Author: Jens Axboe Date: Mon Feb 22 22:05:00 2021 -0700 io_uring: include cflags in completion trace event We should be including the completion flags for better introspection on exactly what completion event was logged. Signed-off-by: Jens Axboe commit 6c2450ae55656f6b0370bfd4cb52ec8a4ecd0916 Author: Pavel Begunkov Date: Tue Feb 23 12:40:22 2021 +0000 io_uring: allocate memory for overflowed CQEs Instead of using a request itself for overflowed CQE stashing, allocate a separate entry. The disadvantage is that the allocation may fail and it will be accounted as lost (see rings->cq_overflow), so we lose reliability in case of memory pressure if the application is driving the CQ ring into overflow. However, it opens a way for for multiple CQEs per an SQE and even generating SQE-less CQEs. Signed-off-by: Pavel Begunkov [axboe: use GFP_ATOMIC | __GFP_ACCOUNT] Signed-off-by: Jens Axboe commit 464dca612bc6bceceafadfb4bf28f1a27ccc4632 Author: Jens Axboe Date: Fri Mar 19 14:06:24 2021 -0600 io_uring: mask in error/nval/hangup consistently for poll Instead of masking these in as part of regular POLL_ADD prep, do it in io_init_poll_iocb(), and include NVAL as that's generally unmaskable, and RDHUP alongside the HUP that is already set. Signed-off-by: Jens Axboe commit 9532b99bd9ca3f8f2f17b38500a8901ac1e7baee Author: Pavel Begunkov Date: Mon Mar 22 01:58:34 2021 +0000 io_uring: optimise rw complete error handling Expect read/write to succeed and create a hot path for this case, in particular hide all error handling with resubmission under a single check with the desired result. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit ab454438aa8dc9eb113df7d00f2cf9ec628a26ce Author: Pavel Begunkov Date: Mon Mar 22 01:58:33 2021 +0000 io_uring: hide iter revert in resubmit_prep Move iov_iter_revert() resetting iterator in case of -EIOCBQUEUED into io_resubmit_prep(), so we don't do heavy revert in hot path, also saves a couple of checks. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8c130827f417da791edb919df8cac56af30a1489 Author: Pavel Begunkov Date: Mon Mar 22 01:58:32 2021 +0000 io_uring: don't alter iopoll reissue fail ret code When reissue_prep failed in io_complete_rw_iopoll(), we change return code to -EIO to prevent io_iopoll_complete() from doing resubmission. Mark requests with a new flag (i.e. REQ_F_DONT_REISSUE) instead and retain the original return value. It also removes io_rw_reissue() from io_iopoll_complete() that will be used later. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1c98679db94155a145f8389f9aaee30c99dbbd5a Author: Pavel Begunkov Date: Mon Mar 22 01:58:31 2021 +0000 io_uring: optimise kiocb_end_write for !ISREG file_end_write() is only for regular files, so the function do a couple of dereferences to get inode and check for it. However, we already have REQ_F_ISREG at hand, just use it and inline file_end_write(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 59d7001345a7b9d849e2e768903458883395b00f Author: Pavel Begunkov Date: Mon Mar 22 01:58:30 2021 +0000 io_uring: kill unused REQ_F_NO_FILE_TABLE current->files are always valid now even for io-wq threads, so kill not used anymore REQ_F_NO_FILE_TABLE. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e1d675df1a36e33e43c614e01d9f714618ac121e Author: Pavel Begunkov Date: Mon Mar 22 01:58:29 2021 +0000 io_uring: don't init req->work fully in advance req->work is mostly unused unless it's punted, and io_init_req() is too hot for fully initialising it. Fortunately, we can skip init work.next as it's controlled by io-wq, and can not touch work.flags by moving everything related into io_prep_async_work(). The only field left is req->work.creds, but there is nothing can be done, keep maintaining it. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8418f22a53795f4478a302aaec3d056795f56089 Author: Pavel Begunkov Date: Mon Mar 22 01:58:28 2021 +0000 io-wq: refactor *_get_acct() Extract a helper for io_work_get_acct() and io_wqe_get_acct() to avoid duplication. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 05356d86c64271b6f545fc14342526ab33514682 Author: Pavel Begunkov Date: Mon Mar 22 01:58:27 2021 +0000 io_uring: remove tctx->sqpoll struct io_uring_task::sqpoll is not used anymore, kill it Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 682076801a2f46867743d9520d228e3c7eca751f Author: Pavel Begunkov Date: Mon Mar 22 01:58:25 2021 +0000 io_uring: don't do extra EXITING cancellations io_match_task() matches all requests with PF_EXITING task, even though those may be valid requests. It was necessary for SQPOLL cancellation, but now it kills all requests before exiting via io_uring_cancel_sqpoll(), so it's not needed. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit d4729fbde7665e81f4345e04e2ca86c0b52994d3 Author: Pavel Begunkov Date: Mon Mar 22 01:58:24 2021 +0000 io_uring: don't clear REQ_F_LINK_TIMEOUT REQ_F_LINK_TIMEOUT is a hint that to look for linked timeouts to cancel, we're leaving it even when it's already fired. Hence don't care to clear it in io_kill_linked_timeout(), it's safe and is called only once. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit c15b79dee51bd73d56fe526a779e8fbc02b09e6c Author: Pavel Begunkov Date: Fri Mar 19 17:22:44 2021 +0000 io_uring: optimise io_req_task_work_add() Inline io_task_work_add() into io_req_task_work_add(). They both work with a request, so keeping them separate doesn't make things much more clear, but merging allows optimise it. Apart from small wins like not reading req->ctx or not calculating @notify in the hot path, i.e. with tctx->task_state set, it avoids doing wake_up_process() for every single add, but only after actually done task_work_add(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e1d767f078b88423bb8ed179fbfe3369395e10f8 Author: Pavel Begunkov Date: Fri Mar 19 17:22:43 2021 +0000 io_uring: abolish old io_put_file() io_put_file() doesn't do a good job at generating a good code. Inline it, so we can check REQ_F_FIXED_FILE first, prioritising FIXED_FILE case over requests without files, and saving a memory load in that case. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 094bae49e5ed9c30c1a6e50e121be20469486fab Author: Pavel Begunkov Date: Fri Mar 19 17:22:42 2021 +0000 io_uring: optimise io_dismantle_req() fast path Reshuffle io_dismantle_req() checks to put most of slow path stuff under a single if. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 68fb897966febe814f89f9462aa819abae00725f Author: Pavel Begunkov Date: Fri Mar 19 17:22:41 2021 +0000 io_uring: inline io_clean_op()'s fast path Inline io_clean_op(), leaving __io_clean_op() but renaming it. This will be used in following patches. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2593553a01c803e01e7c5c2131993885879efbec Author: Pavel Begunkov Date: Fri Mar 19 17:22:40 2021 +0000 io_uring: remove __io_req_task_cancel() Both io_req_complete_failed() and __io_req_task_cancel() do the same thing: set failure flag, put both req refs and emit an CQE. The former one is a bit more advance as it puts req back into a req cache, so make it to take over __io_req_task_cancel() and remove the last one. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dac7a09864938a310eea08f26f5960d369680629 Author: Pavel Begunkov Date: Fri Mar 19 17:22:39 2021 +0000 io_uring: add helper flushing locked_free_list Add a new helper io_flush_cached_locked_reqs() that splices locked_free_list to free_list, and does it right doing all sync and invariant reinit. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit a05432fb49b6439d0c5b803053dfdd875940116d Author: Pavel Begunkov Date: Fri Mar 19 17:22:38 2021 +0000 io_uring: refactor io_free_req_deferred() We don't care about ret value in io_free_req_deferred(), make the code a bit more concise. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 0d85035a7368a6c6dc91ddeca6da12a50d24164e Author: Pavel Begunkov Date: Fri Mar 19 17:22:37 2021 +0000 io_uring: inline io_put_req and friends One big omission is that io_put_req() haven't been marked inline, and at least gcc 9 doesn't inline it, not to mention that it's really hot and extra function call is intolerable, especially when it doesn't put a final ref. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8dd03afe611d371b8c8a2ebeec2720de662a21dc Author: Pavel Begunkov Date: Fri Mar 19 17:22:36 2021 +0000 io_uring: refactor rsrc refnode allocation There are two problems: 1) we always allocate refnodes in advance and free them if those haven't been used. It's expensive, takes two allocations, where one of them is percpu. And it may be pretty common not actually using them. 2) Current API with allocating a refnode and setting some of the fields is error prone, we don't ever want to have a file node runninng fixed buffer callback... Solve both with pre-init/get API. Pre-init just leaves the node for later if not used, and for get (i.e. io_rsrc_refnode_get()), you need to explicitly pass all arguments setting callbacks/etc., so it's more resilient. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dd78f49260dd49f21bbf12080cceb8e13ce53db3 Author: Pavel Begunkov Date: Fri Mar 19 17:22:35 2021 +0000 io_uring: refactor io_flush_cached_reqs() Emphasize that return value of io_flush_cached_reqs() depends on number of requests in the cache. It looks nicer and might help tools from false-negative analyses. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 1840038e119573fc624a2fc586a1c5ced50b59f2 Author: Pavel Begunkov Date: Fri Mar 19 17:22:34 2021 +0000 io_uring: optimise success case of __io_queue_sqe Move the case of successfully issued request by doing that check first. It's not much of a difference, just generates slightly better code for me. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit de968c182b4f48a421b0a3862e747c4147a7da22 Author: Pavel Begunkov Date: Fri Mar 19 17:22:33 2021 +0000 io_uring: inline __io_queue_linked_timeout() Inline __io_queue_linked_timeout(), we don't need it Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 966706579a7124fa6334f10c48474193fd6780c0 Author: Pavel Begunkov Date: Fri Mar 19 17:22:32 2021 +0000 io_uring: keep io_req_free_batch() call locality Don't do a function call (io_dismantle_req()) in the middle and place it to near other function calls, otherwise may lead to excessive register spilling. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit cf27f3b14961845d816c49abc99aae4863207c77 Author: Pavel Begunkov Date: Fri Mar 19 17:22:31 2021 +0000 io_uring: optimise tctx node checks/alloc First of all, w need to set tctx->sqpoll only when we add a new entry into ->xa, so move it from the hot path. Also extract a hot path for io_uring_add_task_file() as an inline helper. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 33f993da9829738da3e088fb5d3128880a4137ba Author: Pavel Begunkov Date: Fri Mar 19 17:22:30 2021 +0000 io_uring: optimise io_uring_enter() Add unlikely annotations, because my compiler pretty much mispredicts every first check, and apart jumping around in the fast path, it also generates extra instructions, like in advance setting ret value. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 493f3b158a1e445e24d567847045baf5a723d206 Author: Pavel Begunkov Date: Fri Mar 19 17:22:29 2021 +0000 io_uring: don't take ctx refs in task_work handler __tctx_task_work() guarantees that ctx won't be killed while running task_works, so we can remove now unnecessary ctx pinning for internally armed polling. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 45ab03b19e8bf33af3e5f5a24729e5564d54fae9 Author: Jens Axboe Date: Tue Feb 23 08:19:33 2021 -0700 io_uring: transform ret == 0 for poll cancelation completions We can set canceled == true and complete out-of-line, ensure that we catch that and correctly return -ECANCELED if the poll operation got canceled. Signed-off-by: Jens Axboe commit b9b0e0d39c7b4be7af7976c52bdb8664dfa389f5 Author: Jens Axboe Date: Tue Feb 23 08:18:36 2021 -0700 io_uring: correct comment on poll vs iopoll The correct function is io_iopoll_complete(), which deals with completions of IOPOLL requests, not io_poll_complete(). Signed-off-by: Jens Axboe commit 7b29f92da377c358955b522045d0778aa79a540a Author: Jens Axboe Date: Fri Mar 12 08:30:14 2021 -0700 io_uring: cache async and regular file state for fixed files We have to dig quite deep to check for particularly whether or not a file supports a fast-path nonblock attempt. For fixed files, we can do this lookup once and cache the state instead. This adds two new bits to track whether we support async read/write attempt, and lines up the REQ_F_ISREG bit with those two. The file slot re-uses the last 3 (or 2, for 32-bit) of the file pointer to cache that state, and then we mask it in when we go and use a fixed file. Signed-off-by: Jens Axboe commit d44f554e105b0c20e5b06b9f821bef228e04d573 Author: Jens Axboe Date: Fri Mar 12 08:27:05 2021 -0700 io_uring: don't check for io_uring_fops for fixed files We don't allow them at registration time, so limit the check for needing inflight tracking in io_file_get() to the non-fixed path. Signed-off-by: Jens Axboe commit c9dca27dc7f9c5dc4ee4ba5b77f7584387f867fe Author: Pavel Begunkov Date: Wed Mar 10 13:13:55 2021 +0000 io_uring: simplify io_sqd_update_thread_idle() Use a more comprehensible() max instead of hand coding it with ifs in io_sqd_update_thread_idle(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit abc54d634334f24d9a3253b8207b42eda852f25a Author: Jens Axboe Date: Wed Feb 24 13:32:30 2021 -0700 io_uring: switch to atomic_t for io_kiocb reference count io_uring manipulates references twice for each request, and hence is very sensitive to performance of the reference count. This commit borrows a trick from: commit f958d7b528b1b40c44cfda5eabe2d82760d868c3 Author: Linus Torvalds Date: Thu Apr 11 10:06:20 2019 -0700 mm: make page ref count overflow check tighter and more explicit and switches to atomic_t for references, while still retaining overflow and underflow checks. This is good for a 2-3% increase in peak IOPS on a single core. Before: IOPS=2970879, IOS/call=31/31, inflight=128 (128) IOPS=2952597, IOS/call=31/31, inflight=128 (128) IOPS=2943904, IOS/call=31/31, inflight=128 (128) IOPS=2930006, IOS/call=31/31, inflight=96 (96) and after: IOPS=3054354, IOS/call=31/31, inflight=128 (128) IOPS=3059038, IOS/call=31/31, inflight=128 (128) IOPS=3060320, IOS/call=31/31, inflight=128 (128) IOPS=3068256, IOS/call=31/31, inflight=96 (96) Signed-off-by: Jens Axboe commit de9b4ccad750f216616730b74ed2be16c80892a4 Author: Jens Axboe Date: Wed Feb 24 13:28:27 2021 -0700 io_uring: wrap io_kiocb reference count manipulation in helpers No functional changes in this patch, just in preparation for handling the references a bit more efficiently. Signed-off-by: Jens Axboe commit 179ae0d15e8b3a2d9affe680281009f1f10c4a9d Author: Pavel Begunkov Date: Sun Feb 28 22:35:20 2021 +0000 io_uring: simplify io_resubmit_prep() If not for async_data NULL check, io_resubmit_prep() is already an rw specific version of io_req_prep_async(), but slower because 1) it always goes through io_import_iovec() even if following io_setup_async_rw() the result 2) instead of initialising iovec/iter in-place it does it on-stack and then copies with io_setup_async_rw(). Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit b7e298d265f20eafc3615be271a3e5d90e4dc3dd Author: Pavel Begunkov Date: Sun Feb 28 22:35:19 2021 +0000 io_uring: merge defer_prep() and prep_async() Merge two function and do renaming in favour of the second one, it relays the meaning better. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 26f0505a9ce571f3b1fcef6e86c5c99c68ca7eca Author: Pavel Begunkov Date: Sun Feb 28 22:35:18 2021 +0000 io_uring: rethink def->needs_async_data needs_async_data controls allocation of async_data, and used in two cases. 1) when async setup requires it (by io_req_prep_async() or handler themselves), and 2) when op always needs additional space to operate, like timeouts do. Opcode preps already don't bother about the second case and do allocation unconditionally, restrict needs_async_data to the first case only and rename it into needs_async_setup. Signed-off-by: Pavel Begunkov [axboe: update for IOPOLL fix] Signed-off-by: Jens Axboe commit 6cb78689fa94c80784faef76744746aee558c344 Author: Pavel Begunkov Date: Sun Feb 28 22:35:17 2021 +0000 io_uring: untie alloc_async_data and needs_async_data All opcode handlers pretty well know whether they need async data or not, and can skip testing for needs_async_data. The exception is rw the generic path, but those test the flag by hand anyway. So, check the flag and make io_alloc_async_data() allocating unconditionally. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2e052d443df15d71277f6b8509badae4310ebd92 Author: Pavel Begunkov Date: Sun Feb 28 22:35:16 2021 +0000 io_uring: refactor out send/recv async setup IORING_OP_[SEND,RECV] don't need async setup neither will get into io_req_prep_async(). Remove them from io_req_prep_async() and remove needs_async_data checks from the related setup functions. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 8c3f9cd1603d0e4af6c50ebc6d974ab7bdd03cf4 Author: Pavel Begunkov Date: Sun Feb 28 22:35:15 2021 +0000 io_uring: use better types for cflags __io_cqring_fill_event() takes cflags as long to squeeze it into u32 in an CQE, awhile all users pass int or unsigned. Replace it with unsigned int and store it as u32 in struct io_completion to match CQE. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 9fb8cb49c7b634982ac2a4302b5158d7120f0186 Author: Pavel Begunkov Date: Sun Feb 28 22:35:13 2021 +0000 io_uring: refactor provide/remove buffer locking Always complete request holding the mutex instead of doing that strange dancing with conditional ordering. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit f41db2732d4835799af64159c61e522063786e5c Author: Pavel Begunkov Date: Sun Feb 28 22:35:12 2021 +0000 io_uring: add a helper failing not issued requests Add a simple helper doing CQE posting, marking request for link-failure, and putting both submission and completion references. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit dafecf19e25f9b864ce0f3b8bb12de2e3d5f6da6 Author: Pavel Begunkov Date: Sun Feb 28 22:35:11 2021 +0000 io_uring: further deduplicate file slot selection io_fixed_file_slot() and io_file_from_index() behave pretty similarly, DRY and call one from another. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 2c4b8eb6435e615544b92acdcd4b25a85e83f300 Author: Pavel Begunkov Date: Sun Feb 28 22:35:10 2021 +0000 io_uring: reuse io_req_task_queue_fail() Use io_req_task_queue_fail() on the fail path of io_req_task_queue(). It's unlikely to happen, so don't care about additional overhead, but allows to keep all the req->result invariant in a single function. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit e83acd7d37d83035f2fe078f656f87418ea2a687 Author: Pavel Begunkov Date: Sun Feb 28 22:35:09 2021 +0000 io_uring: avoid taking ctx refs for task-cancel Don't bother to take a ctx->refs for io_req_task_cancel() because it take uring_lock before putting a request, and the context is promised to stay alive until unlock happens. Signed-off-by: Pavel Begunkov Signed-off-by: Jens Axboe commit 23cfa4d4aa9fa634e43edd7f92cde4f050b4f2db Merge: 7dc85b599ae17 1c3cadbe02420 Author: David S. Miller Date: Sun Apr 11 16:39:28 2021 -0700 Merge branch 'veth-gro' Paolo Abeni says: ==================== veth: allow GRO even without XDP This series allows the user-space to enable GRO/NAPI on a veth device even without attaching an XDP program. It does not change the default veth behavior (no NAPI, no GRO), except that the GRO feature bit on top of this series will be effectively off by default on veth devices. Note that currently the GRO bit is on by default, but GRO never takes place in absence of XDP. On top of this series, setting the GRO feature bit enables NAPI and allows the GRO to take place. The TSO features on the peer device are preserved. The main goal is improving UDP forwarding performances for containers in a typical virtual network setup: (container) veth -> veth peer -> bridge/ovs -> vxlan -> NIC Enabling the NAPI threaded mode, GRO the NETIF_F_GRO_UDP_FWD feature on the veth peer improves the UDP stream performance with not void netfilter configuration by 2x factor with no measurable overhead for TCP traffic: some heuristic ensures that TCP will not go through the additional NAPI/GRO layer. Some self-tests are added to check the expected behavior in the default configuration, with XDP and with plain GRO enabled. ==================== Signed-off-by: David S. Miller commit 1c3cadbe02420e6c85251c416a78a16f17761231 Author: Paolo Abeni Date: Fri Apr 9 13:04:40 2021 +0200 self-tests: add veth tests Add some basic veth tests, that verify the expected flags and aggregation with different setups (default, xdp, etc...) Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 47e550e0105be9b716a3860545731735a67c6b3c Author: Paolo Abeni Date: Fri Apr 9 13:04:39 2021 +0200 veth: refine napi usage After the previous patch, when enabling GRO, locally generated TCP traffic experiences some measurable overhead, as it traverses the GRO engine without any chance of aggregation. This change refine the NAPI receive path admission test, to avoid unnecessary GRO overhead in most scenarios, when GRO is enabled on a veth peer. Only skbs that are eligible for aggregation enter the GRO layer, the others will go through the traditional receive path. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit d3256efd8e8b234a6251e4d4580bd2c3c31fdc4c Author: Paolo Abeni Date: Fri Apr 9 13:04:38 2021 +0200 veth: allow enabling NAPI even without XDP Currently the veth device has the GRO feature bit set, even if no GRO aggregation is possible with the default configuration, as the veth device does not hook into the GRO engine. Flipping the GRO feature bit from user-space is a no-op, unless XDP is enabled. In such scenario GRO could actually take place, but TSO is forced to off on the peer device. This change allow user-space to really control the GRO feature, with no need for an XDP program. The GRO feature bit is now cleared by default - so that there are no user-visible behavior changes with the default configuration. When the GRO bit is set, the per-queue NAPI instances are initialized and registered. On xmit, when napi instances are available, we try to use them. Some additional checks are in place to ensure we initialize/delete NAPIs only when needed in case of overlapping XDP and GRO configuration changes. Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit c75fb320d482a5ce6e522378d137fd2c3bf79225 Author: Paolo Abeni Date: Fri Apr 9 13:04:37 2021 +0200 veth: use skb_orphan_partial instead of skb_orphan As described by commit 9c4c325252c5 ("skbuff: preserve sock reference when scrubbing the skb."), orphaning a skb in the TX path will cause OoO. Let's use skb_orphan_partial() instead of skb_orphan(), so that we keep the sk around for queue's selection sake and we still avoid the problem fixed with commit 4bf9ffa0fb57 ("veth: Orphan skb before GRO") Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 7dc85b599ae17fb705ffae1b7321ace4b3056aeb Merge: cbd3125392846 c97a31f66ebca Author: David S. Miller Date: Sun Apr 11 16:34:56 2021 -0700 Merge branch 'ethtool-eeprom' Moshe Shemesh says: ==================== ethtool: Extend module EEPROM dump API Ethtool supports module EEPROM dumps via the `ethtool -m ` command. But in current state its functionality is limited - offset and length parameters, which are used to specify a linear desired region of EEPROM data to dump, is not enough, considering emergence of complex module EEPROM layouts such as CMIS 4.0. Moreover, CMIS 4.0 extends the amount of pages that may be accessible by introducing another parameter for page addressing - banks. Besides, currently module EEPROM is represented as a chunk of concatenated pages, where lower 128 bytes of all pages, except page 00h, are omitted. Offset and length are used to address parts of this fake linear memory. But in practice drivers, which implement get_module_info() and get_module_eeprom() ethtool ops still calculate page number and set I2C address on their own. This series tackles these issues by adding ethtool op, which allows to pass page number, bank number and I2C address in addition to offset and length parameters to the driver, adds corresponding netlink infrastructure and implements the new interface in mlx5 driver. This allows to extend userspace 'ethtool -m' CLI by adding new parameters - page, bank and i2c. New command line format: ethtool -m [hex on|off] [raw on|off] [offset N] [length N] [page N] [bank N] [i2c N] The consequence of this series is a possibility to dump arbitrary EEPROM page at a time, in contrast to dumps of concatenated pages. Therefore, offset and length change their semantics and may be used only to specify a part of data within half page boundary, which size is currently limited to 128 bytes. As for drivers that support legacy get_module_info() and get_module_eeprom() pair, the series addresses it by implementing a fallback mechanism. As mentioned earlier, such drivers derive a page number from 'global' offset, so this can be done vice versa without their involvement thanks to standardization. If kernel netlink handler of 'ethtool -m' command detects that new ethtool op is not supported by the driver, it calculates offset from given page number and page offset and calls old ndos, if they are available. ==================== \Signed-off-by: David S. Miller commit c97a31f66ebcab54c006878142fb683c6116bed1 Author: Andrew Lunn Date: Fri Apr 9 11:06:41 2021 +0300 ethtool: wire in generic SFP module access If the device has a sfp bus attached, call its sfp_get_module_eeprom_by_page() function, otherwise use the ethtool op for the device. This follows how the IOCTL works. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit d740513f05a24b1a46722325974223980f068728 Author: Andrew Lunn Date: Fri Apr 9 11:06:40 2021 +0300 phy: sfp: add netlink SFP support to generic SFP code The new netlink API for reading SFP data requires a new op to be implemented. The idea of the new netlink SFP code is that userspace is responsible to parsing the EEPROM data and requesting pages, rather than have the kernel decide what pages are interesting and returning them. This allows greater flexibility for newer formats. Currently the generic SFP code only supports simple SFPs. Allow i2c address 0x50 and 0x51 to be accessed with page and bank must always be 0. This interface will later be extended when for example QSFP support is added. Signed-off-by: Andrew Lunn Signed-off-by: Vladyslav Tarasiuk Signed-off-by: David S. Miller commit 96d971e307cc0e434f96329b42bbd98cfbca07d2 Author: Vladyslav Tarasiuk Date: Fri Apr 9 11:06:39 2021 +0300 ethtool: Add fallback to get_module_eeprom from netlink command In case netlink get_module_eeprom_by_page() callback is not implemented by the driver, try to call old get_module_info() and get_module_eeprom() pair. Recalculate parameters to get_module_eeprom() offset and len using page number and their sizes. Return error if this can't be done. Signed-off-by: Vladyslav Tarasiuk Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 95dfc7effd88b49d66791678e042970824cae838 Author: Andrew Lunn Date: Fri Apr 9 11:06:38 2021 +0300 net: ethtool: Export helpers for getting EEPROM info There are two ways to retrieve information from SFP EEPROMs. Many devices make use of the common code, and assign the sfp_bus pointer in the netdev to point to the bus holding the SFP device. Some MAC drivers directly implement ops in there ethool structure. Export within net/ethtool the two helpers used to call these methods, so that they can also be used in the new netlink code. Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller commit 4c88fa412a100f925b8ab1aa952a672895f69d35 Author: Vladyslav Tarasiuk Date: Fri Apr 9 11:06:37 2021 +0300 net/mlx5: Add support for DSFP module EEPROM dumps Allow the driver to recognise DSFP transceiver module ID and therefore allow its EEPROM dumps using ethtool. Signed-off-by: Vladyslav Tarasiuk Signed-off-by: David S. Miller commit e109d2b204daa223e6d3cdaa369071c3ea96dcbf Author: Vladyslav Tarasiuk Date: Fri Apr 9 11:06:36 2021 +0300 net/mlx5: Implement get_module_eeprom_by_page() Implement ethtool_ops::get_module_eeprom_by_page() to enable support of new SFP standards. Signed-off-by: Vladyslav Tarasiuk Signed-off-by: David S. Miller commit e19b0a3474ab9ef90dd110af9f39fc87329755f1 Author: Vladyslav Tarasiuk Date: Fri Apr 9 11:06:35 2021 +0300 net/mlx5: Refactor module EEPROM query Prepare for ethtool_ops::get_module_eeprom_data() implementation by extracting common part of mlx5_query_module_eeprom() into a separate function. Signed-off-by: Vladyslav Tarasiuk Signed-off-by: David S. Miller commit c781ff12a2f37a9795e13bf328e5053d3e69f9e0 Author: Vladyslav Tarasiuk Date: Fri Apr 9 11:06:34 2021 +0300 ethtool: Allow network drivers to dump arbitrary EEPROM data Define get_module_eeprom_by_page() ethtool callback and implement netlink infrastructure. get_module_eeprom_by_page() allows network drivers to dump a part of module's EEPROM specified by page and bank numbers along with offset and length. It is effectively a netlink replacement for get_module_info() and get_module_eeprom() pair, which is needed due to emergence of complex non-linear EEPROM layouts. Signed-off-by: Vladyslav Tarasiuk Signed-off-by: David S. Miller commit 9db419f0cb39a63fb2f645a846cae17b81cd5c96 Author: Sean Wang Date: Tue Apr 6 11:34:35 2021 +0800 mt76: mt7921: fix the dwell time control dwell time for the scan is not configurable according to the current firmware submitted into linux-firmware.git, so leave the dwell time 0 to indicate the dwell time always determined by the firmware. Fixes: 399090ef9605 ("mt76: mt76_connac: move hw_scan and sched_scan routine in mt76_connac_mcu module") Suggested-by: Soul Huang Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 9c9d83213424679b087267600d53a35acfa0201f Author: Sean Wang Date: Tue Apr 6 11:34:34 2021 +0800 mt76: mt7921: fix inappropriate WoW setup with the missing ARP informaiton Fix the Wake-on-WoWLAN failure should rely on ARP Information is being updated in time to the firmware. Fixes: ffa1bf97425b ("mt76: mt7921: introduce PM support") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit f2d167c7dd2c0bc444e2d5639bcf856d0ea09a71 Author: Lorenzo Bianconi Date: Sun Apr 4 13:36:57 2021 +0200 mt76: mt7921: introduce MT_WFDMA_DUMMY_CR definition Introduce MT_WFDMA_DUMMY_CR definition and remove magic numbers Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e07419a7dca97dd9bddfe5d099380857c19535f3 Author: Ryder Lee Date: Tue Apr 6 12:46:09 2021 +0800 mt76: mt7915: add wifi subsystem reset Reset wifi subsystem when MCU is already running. Fixes firmware download failure after soft reboot on systems where the PCIe reset could not be performed properly. Signed-off-by: Ryder Lee Co-developed-by: Felix Fietkau Signed-off-by: Felix Fietkau commit ac15f9b6da3957b360c356a3a6bb74f5727e433e Author: Ryder Lee Date: Sun Apr 4 15:48:24 2021 +0800 mt76: mt7915: fix mt7915_mcu_add_beacon ieee80211_beacon_get_template() returns NULL when beacon state is disabled. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 8a5a5dbfc18c667832e1f73b436dc324659fbbf8 Author: Ryder Lee Date: Sun Apr 4 15:48:23 2021 +0800 mt76: mt7615: fix .add_beacon_offload() ieee80211_beacon_get_template() returns NULL when beacon state is disabled, so beacon_offload cannot be disabled for some devices. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit c7cc5ec5730321ea6c86f0f87cb562fc3827b0d3 Author: Lorenzo Bianconi Date: Sat Apr 3 14:35:12 2021 +0200 mt76: mt7921: rework mt7921_mcu_debug_msg_event routine Rework mt7921_mcu_debug_msg_event routing removing unnecessary assignments and relying on wiphy_info Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 859c85fd19715349ce01539459095fd5fc7e483a Author: Lorenzo Bianconi Date: Sat Apr 3 14:26:39 2021 +0200 mt76: mt7921: always wake the device in mt7921_remove_interface Make sure the mcu is not in sleep mode before sending mcu messages in mt7921_remove_interface routine. Fixes: 1d8efc741df80 ("mt76: mt7921: introduce Runtime PM support") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Leon Yen Signed-off-by: Leon Yen Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 60468f7fd7072c804b2613f1cadabace8d77d311 Author: Lorenzo Bianconi Date: Sat Mar 27 10:10:14 2021 +0100 mt76: mt7921: fix key set/delete issue Similar to the mt7915 driver, deleting a key with the previous key index deletes the current key. Rework the code to better keep track of multiple keys and check for the key index before deleting the current key Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a226ccd04c479ccd23d6927c64bad1b441707f70 Author: Shayne Chen Date: Thu Apr 1 10:31:29 2021 +0800 mt76: mt7915: fix txpower init for TSSI off chips Fix incorrect txpower init value for TSSI off chips which causes too small txpower. Signed-off-by: Shayne Chen Signed-off-by: Felix Fietkau commit 2df51a2b7a256b242a91450325c143faae13f234 Author: Guobin Huang Date: Sat Mar 27 17:56:18 2021 +0800 mt76: mt7615: remove redundant dev_err call in mt7622_wmac_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: Felix Fietkau commit 1735e44dddc04e27860b6fc5099a64e4866115b7 Author: Lorenzo Bianconi Date: Sun Mar 28 19:37:48 2021 +0200 dt-bindings:net:wireless:mediatek,mt76: txt to yaml conversion Convert mt76 dts bindings from .txt to .yaml Signed-off-by: Lorenzo Bianconi Reviewed-by: Rob Herring Signed-off-by: Felix Fietkau commit 7c82bbb1acc04ef38698582f6ae6c13358563406 Author: Lorenzo Bianconi Date: Wed Mar 24 22:49:59 2021 +0100 dt-bindings:net:wireless:ieee80211: txt to yaml conversion Convert generic ieee80211 dts bindings from .txt to .yaml Signed-off-by: Lorenzo Bianconi Reviewed-by: Rob Herring Signed-off-by: Felix Fietkau commit 665b2c780d63762349646e9abaea507192c6666a Author: Felix Fietkau Date: Fri Mar 26 10:40:55 2021 +0100 mt76: mt7915: limit firmware log message printk to buffer length Avoid including garbage from previous rx data Signed-off-by: Felix Fietkau commit d76d6c3ba2b0addbf8398641f406b339d91b4fbc Author: Felix Fietkau Date: Fri Mar 26 10:38:25 2021 +0100 mt76: mt7615: limit firmware log message printk to buffer length Avoid including garbage from previous rx data Signed-off-by: Felix Fietkau commit 1cb7ea2acb725bf8752dc765c1c1645c7ecc23bb Author: Felix Fietkau Date: Fri Mar 26 21:52:11 2021 +0100 mt76: mt7615: fix chip reset on MT7622 and MT7663e After chip reset, the DMA scheduler needs to be initialized as well. Since the code is PCI/SoC specific, move it to pci_mac.c, so that it can depend on a function in dma.c Signed-off-by: Felix Fietkau commit 1ebea45ef027ee31cd50ed92903071391e792edb Author: Ryder Lee Date: Fri Mar 26 02:28:56 2021 +0800 mt76: mt7915: cleanup mcu tx queue in mt7915_dma_reset() Cleanup mcu queues in mt7915_mac_reset_work(). Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit a9bae3f5361487c9b3859f288e112ad045973a4a Author: Ryder Lee Date: Thu Mar 25 16:06:05 2021 +0800 mt76: mt7915: keep mcu_add_bss_info enabled till interface removal The same as mt7615. Keep BSS_INFO_BASIC enabled throughout interfaces life cycle. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit d9852ab2f362fc4fcf501f4350d007b08559ccc1 Author: Ryder Lee Date: Thu Mar 25 16:06:04 2021 +0800 mt76: mt7615: keep mcu_add_bss_info enabled till interface removal BSS_INFO_BASIC is never called alone with inactive state, which always follows beacon offload disable, so keep it enabled throughout interfaces life cycle. Inactive state also removes sta record of all connected stations, thurs causes connection lost which defeats the purpose of CSA. Lastly, this is especially an unexpected behavior that keeping mt7622 failing beacon buffer recyled when scanning channels. bss_conf change is updated with active state only, so just overwrite it. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit ad2a1ea49f631bb739116e9839b6f65231053112 Author: Ryder Lee Date: Thu Mar 25 16:06:03 2021 +0800 mt76: mt7622: trigger hif interrupt for system reset hif interrupt needs to be triggered after MT_MCU_INT_EVENT. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 69e74d7f23d515fb559b2e0bebfdf4c458d9507d Author: Ryder Lee Date: Thu Mar 25 16:06:02 2021 +0800 mt76: mt7615: cleanup mcu tx queue in mt7615_dma_reset() With this patch, mt7615_mac_reset_work() can recover system back. Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 6104edf9e8a364c9fc586f88867850887524ca04 Author: Ryder Lee Date: Thu Mar 25 16:06:01 2021 +0800 mt76: mt7615: only enable DFS test knobs for mt7615 DFS knobs should not be visible to non-DFS devices. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 93c81df520a1ba506757a47c6e4a148f4372a282 Author: Lorenzo Bianconi Date: Wed Mar 24 09:37:37 2021 +0100 mt76: mt7921: properly configure rcpi adding a sta to the fw Properly configure rcpi based on association process rssi. rcpi is used by rate controller embedded into the fw to initialize amsdu size. Tested-by: Jayden.Kuo Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5802106f8bc710cac0e2db6d5d2d219d5f9490b1 Author: Lorenzo Bianconi Date: Wed Mar 24 09:37:36 2021 +0100 mt76: connac: introduce mt76_sta_cmd_info data structure Introduce mt76_sta_cmd_info data structure to contain parameters passed to mt76_sta_cmd_info routine. This is preliminary patch to properly configure rcpi for mt7921 devices. Tested-by: Jayden.Kuo Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 14edf1093836e53804c2c6d7699b4ddcbe40c27f Author: Lorenzo Bianconi Date: Wed Mar 24 09:25:22 2021 +0100 mt76: mt7921: get rid of mt7921_mac_wtbl_lmac_addr Get rid of mt7921_mac_wtbl_lmac_addr routine since mt7921 wtbl size is 19 entries Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9add4bf2b81eb32754a6b34f7e12c0ecd2009cfc Author: Felix Fietkau Date: Tue Feb 16 15:23:13 2021 +0100 mt76: mt7915: refresh repeater entry MAC address when setting BSSID When disassociating and clearing the BSSID of a repeater entry used by a client mode interface, the corresponding MAC address entry can get lost too, causing the client interface to not be able to associate anymore. Fix this by also refreshing the MAC address when setting the BSSID Signed-off-by: Felix Fietkau commit 1da4fd48d28436f8b690cdc2879603dede6d8355 Author: Felix Fietkau Date: Mon Mar 22 21:39:57 2021 +0100 mt76: mt7915: fix key set/delete issue Deleting a key with the previous key index deletes the current key Rework the code to better keep track of multiple keys and check for the key index before deleting the current key Signed-off-by: Felix Fietkau commit 12f4be0e6a68650dbc9b73a047748431b2253904 Author: Lorenzo Bianconi Date: Mon Mar 15 09:21:10 2021 +0100 mt76: mt7921: remove duplicated macros in mcu.h Remove mcu definitions already available in mt76_connac_mcu.h Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1921b8925c6f2a171af6294bba6af733da2409b9 Author: Colin Ian King Date: Fri Mar 12 17:29:49 2021 +0000 mt76: mt7921: remove redundant check on type Currently in the switch statement case where type is NL80211_IFTYPE_STATION there is a check to see if type is not NL80211_IFTYPE_STATION. This check is always false and is redundant dead code that can be removed. Addresses-Coverity: ("Logically dead code") Fixes: e0f9fdda81bd ("mt76: mt7921: add ieee80211_ops") Signed-off-by: Colin Ian King Signed-off-by: Felix Fietkau commit de29d0afebad775910b428816427b55ba2bea50b Author: Lorenzo Bianconi Date: Thu Mar 11 10:46:21 2021 +0100 mt76: mt7921: remove leftovers from dbdc configuration Remove leftovers from dbdc configuration since mt7921 does not support it. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0c1ce988460765ece1ba8eacd00533eefb6e666a Author: Lorenzo Bianconi Date: Sun Mar 7 19:20:51 2021 +0100 mt76: mt7921: add wifi reset support Introduce wifi chip reset support for mt7921 device to recover mcu hangs. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c001df978e4cb88975147ddd2c829c9e12a55076 Author: Lorenzo Bianconi Date: Sun Mar 7 19:20:50 2021 +0100 mt76: dma: export mt76_dma_rx_cleanup routine Export mt76_dma_rx_cleanup routine in mt76_queue_ops data structure. This is a preliminary patch to introduce mt7921 chip reset support. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3990465db6829c91e8ebfde51ba2d98885020249 Author: Lorenzo Bianconi Date: Sun Mar 7 19:20:49 2021 +0100 mt76: dma: introduce mt76_dma_queue_reset routine Introduce mt76_dma_queue_reset utility routine to reset a given hw queue. This is a preliminary patch to introduce mt7921 chip reset support. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 1f7396acfef4691b8cf4a3e631fd3f59d779c0f2 Author: Lorenzo Bianconi Date: Sun Mar 7 19:20:48 2021 +0100 mt76: mt7921: introduce __mt7921_start utility routine This is a preliminary patch to introduce mt7921 chip reset support. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d32464e68ffc9cbec4960cd06f05bf48b3b3703f Author: Lorenzo Bianconi Date: Sun Mar 7 19:20:47 2021 +0100 mt76: mt7921: introduce mt7921_run_firmware utility routine. This is a preliminary patch to introduce chip reset for mt7921 devices. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit acf337c33de55dbeb25a8c34fa2051d42d77aecc Author: Lorenzo Bianconi Date: Sun Mar 7 19:20:46 2021 +0100 mt76: introduce mcu_reset function pointer in mt76_mcu_ops structure Introduce mcu_reset function pointer in mt76_mcu_ops structure in order to run hw related reset function for the mcu running on the chipset. This is a preliminary patch to introduce chip reset for mt7921 devices. Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a2a6cd54eec4649c7cefd00ddb58f55a98c6d951 Author: Lorenzo Bianconi Date: Sun Mar 7 19:20:45 2021 +0100 mt76: mt7921: reduce mcu timeouts for suspend, offload and hif_ctrl msg Reduce mcu timeout for the following uni mcu commands: - MCU_UNI_CMD_SUSPEND - MCU_UNI_CMD_OFFLOAD - MCU_UNI_CMD_HIF_CTRL This is a preliminary patch to introduce chip reset support Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 782018391748f3547d44c76341ef89a2118ffe32 Author: Ryder Lee Date: Fri Mar 5 16:46:41 2021 +0800 mt76: mt7915: fix possible deadlock while mt7915_register_ext_phy() ieee80211_register_hw() is called with rtnl_lock held, and this could be caused lockdep from a work item that's on a workqueue that is flushed with the rtnl held. Move mt7915_register_ext_phy() outside the init_work(). Signed-off-by: Evelyn Tsai Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit dc0a108bb060e3023090f97149e0ca81a2636e36 Author: Ryder Lee Date: Fri Mar 5 08:22:14 2021 +0800 mt76: mt7615: add missing capabilities for DBDC This improves performance for second phy. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 45247a85614b49b07b9dc59a4e6783b17e766ff2 Author: Sean Wang Date: Thu Mar 4 21:25:23 2021 +0800 mt76: mt7663s: fix the possible device hang in high traffic Use the additional memory barrier to ensure the skb list up-to-date between the skb producer and consumer to avoid the invalid skb content written into sdio controller and then cause device hang due to mcu assert caught by WR_TIMEOUT_INT. Fixes: 1522ff731f84 ("mt76: mt7663s: introduce sdio tx aggregation") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 455ae5aabcc72fed7e5c803d59d122415500dc08 Author: Sean Wang Date: Thu Mar 4 21:25:22 2021 +0800 mt76: mt7663s: make all of packets 4-bytes aligned in sdio tx aggregation Each packet should be padded with the additional zero to become 4-bytes alignment in sdio tx aggregation. Fixes: 1522ff731f84 ("mt76: mt7663s: introduce sdio tx aggregation") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 4bec61d9fb9629c21e60cd24a97235ea1f6020ec Author: Sean Wang Date: Thu Mar 4 21:25:21 2021 +0800 mt76: mt7663: fix when beacon filter is being applied HW beacon filter command is being applied until we're in associated state because the command would rely on the associated access point's beacon interval and DTIM information. Fixes: 7124198ab1a4 ("mt76: mt7615: enable beacon filtering by default for offload fw") Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit c3800cc2919721640021c00e5845c32c2e7ad24d Author: Ryder Lee Date: Fri Mar 5 23:52:59 2021 +0800 mt76: mt7615: check mcu returned values in mt7615_ops Properly check returned values from mcu utility routines in mt7615_ops. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit b1bed649ad0378afc01226c89d7e89f0580788ba Author: Ryder Lee Date: Wed Mar 3 18:38:01 2021 +0800 mt76: mt7915: check mcu returned values in mt7915_ops Properly check returned values from mcu utility routines in mt7915_ops. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit f43b941fd61003659a3f0e039595e5e525917aa8 Author: Ryder Lee Date: Wed Mar 3 18:38:00 2021 +0800 mt76: mt7915: fix txrate reporting Properly check rate_info to fix unexpected reporting. [ 1215.161863] Call trace: [ 1215.164307] cfg80211_calculate_bitrate+0x124/0x200 [cfg80211] [ 1215.170139] ieee80211s_update_metric+0x80/0xc0 [mac80211] [ 1215.175624] ieee80211_tx_status_ext+0x508/0x838 [mac80211] [ 1215.181190] mt7915_mcu_get_rx_rate+0x28c/0x8d0 [mt7915e] [ 1215.186580] mt7915_mac_tx_free+0x324/0x7c0 [mt7915e] [ 1215.191623] mt7915_queue_rx_skb+0xa8/0xd0 [mt7915e] [ 1215.196582] mt76_dma_cleanup+0x7b0/0x11d0 [mt76] [ 1215.201276] __napi_poll+0x38/0xf8 [ 1215.204668] napi_workfn+0x40/0x80 [ 1215.208062] process_one_work+0x1fc/0x390 [ 1215.212062] worker_thread+0x48/0x4d0 [ 1215.215715] kthread+0x120/0x128 [ 1215.218935] ret_from_fork+0x10/0x1c Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Fixes: e4c5ead632ff ("mt76: mt7915: rename mt7915_mcu_get_rate_info to mt7915_mcu_get_tx_rate") Reported-by: Evelyn Tsai Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 7883906d22c1e73f1f316bd84fc4a7ff8edd12aa Author: Ryder Lee Date: Wed Mar 3 18:37:59 2021 +0800 mt76: mt7915: fix rxrate reporting Avoid directly updating sinfo->rxrate from firmware since rate_info might be overwritten by wrong results even mt7915_mcu_get_rx_rate() fails check. Add more error handlings accordingly. Fixes: 11553d88d0b9 ("mt76: mt7915: query station rx rate from firmware") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 51bf9d60fb927b850ec2abdc1f9f72de523098a3 Author: Eric Y.Y. Wong Date: Wed Mar 3 11:43:52 2021 +0800 mt76: mt76x0u: Add support for TP-Link T2UHP(UN) v1 There are two variants of TP-Link Archer T2UHP V1, which are US and UN: https://www.tp-link.com/us/support/download/archer-t2uhp/ https://www.tp-link.com/hk/support/download/archer-t2uhp/v1/ From the driver source code provided by the vendor: https://www.tp-link.com/hk/support/download/archer-t2uhp/v1/#Driver eric@eric-VirtualBox:~/src$ grep -n USB_DEVICE.*0x2357 DPA_mt7610u_wifi_sta_v3004_rev1_20140529/NETIF/common/rtusb_dev_id.c 45: {USB_DEVICE(0x2357,0x0105)}, /* T1Uv1 */ 46: {USB_DEVICE(0x2357,0x010B)}, /* T2UHP_UN_v1 */ 47: {USB_DEVICE(0x2357,0x0123)}, /* T2UHP_US_v1 */ eric@eric-VirtualBox:~/src$ lsusb -d 2357: Bus 001 Device 003: ID 2357:010b TP-Link WiFi eric@eric-VirtualBox:~/src$ sudo modprobe mt76x0u eric@eric-VirtualBox:~/src$ sudo sh -c "echo 2357 010b > /sys/bus/usb/drivers/mt76x0u/new_id" [snip] eric@eric-VirtualBox:~/src$ ifconfig -a enp0s3: flags=4163 mtu 1500 ether 08:00:27:74:d9:ee txqueuelen 1000 (Ethernet) RX packets 78 bytes 16146 (16.1 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 75 bytes 8413 (8.4 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73 mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (Local Loopback) RX packets 56 bytes 5496 (5.4 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 56 bytes 5496 (5.4 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 wlx18d6c71b6e3e: flags=4163 mtu 1500 inet 192.168.1.106 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::21c7:2d90:e47d:ee48 prefixlen 64 scopeid 0x20 ether 18:d6:c7:1b:6e:3e txqueuelen 1000 (Ethernet) RX packets 37 bytes 5345 (5.3 KB) RX errors 0 dropped 7 overruns 0 frame 0 TX packets 77 bytes 10513 (10.5 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eric@eric-VirtualBox:~/src$ dmesg | tail -n 30 12:51:25.551584 main Log opened 2021-03-01T12:51:25.551572000Z [ 46.855763] 12:51:25.551995 main OS Product: Linux [ 46.855838] 12:51:25.552075 main OS Release: 5.4.0-66-generic [ 46.855897] 12:51:25.552150 main OS Version: #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 [ 46.855971] 12:51:25.552207 main Executable: /opt/VBoxGuestAdditions-6.1.16/sbin/VBoxService 12:51:25.552208 main Process ID: 898 12:51:25.552209 main Package type: LINUX_64BITS_GENERIC [ 46.858699] 12:51:25.554921 main 6.1.16 r140961 started. Verbose level = 0 [ 46.863116] 12:51:25.559319 main vbglR3GuestCtrlDetectPeekGetCancelSupport: Supported (#1) [ 140.687550] usb 1-2: new high-speed USB device number 3 using xhci_hcd [ 140.838279] usb 1-2: New USB device found, idVendor=2357, idProduct=010b, bcdDevice= 1.00 [ 140.838281] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 140.838283] usb 1-2: Product: WiFi [ 140.838284] usb 1-2: Manufacturer: MediaTek [ 140.838285] usb 1-2: SerialNumber: 1.0 [ 178.374187] cfg80211: Loading compiled-in X.509 certificates for regulatory database [ 178.378370] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' [ 178.417507] usbcore: registered new interface driver mt76x0u [ 178.557165] usb 1-2: reset high-speed USB device number 3 using xhci_hcd [ 178.720436] mt76x0u 1-2:1.0: ASIC revision: 76100002 MAC revision: 76502000 [ 180.156077] mt76x0u 1-2:1.0: EEPROM ver:02 fae:04 [ 181.190558] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht' [ 181.225560] mt76x0u 1-2:1.0 wlx18d6c71b6e3e: renamed from wlan0 [ 188.660826] wlx18d6c71b6e3e: authenticate with d0:17:c2:e0:d7:9c [ 189.447781] wlx18d6c71b6e3e: send auth to d0:17:c2:e0:d7:9c (try 1/3) [ 189.618282] wlx18d6c71b6e3e: authenticated [ 189.619008] wlx18d6c71b6e3e: associate with d0:17:c2:e0:d7:9c (try 1/3) [ 189.715268] wlx18d6c71b6e3e: RX AssocResp from d0:17:c2:e0:d7:9c (capab=0x1011 status=0 aid=8) [ 189.734720] wlx18d6c71b6e3e: associated [ 190.233239] IPv6: ADDRCONF(NETDEV_CHANGE): wlx18d6c71b6e3e: link becomes ready Signed-off-by: Eric Y.Y. Wong Signed-off-by: Felix Fietkau commit 1623474167f83252576c90b1df42292c6a99ccb7 Author: Ryder Lee Date: Sat Feb 27 15:39:46 2021 +0800 mt76: mt7915: fix PHY mode for DBDC Fix PHY mode configuration for DBDC. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 6636539283780a0c34880e43a2f4ada561509f61 Author: Ryder Lee Date: Sat Feb 27 15:39:45 2021 +0800 mt76: mt7915: stop ext_phy queue when mac reset happens Stop Tx burst for ext_phy after mac reset. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit b6d20ce433c97fa995d7ec067e642cfdf02c0aac Author: Ryder Lee Date: Sat Feb 27 15:39:44 2021 +0800 mt76: mt7915: fix CSA notification for DBDC Add CSA notification for second phy. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 62da7a38e04131178e1344f080a7d02f76f9c149 Author: Ryder Lee Date: Sat Feb 27 15:39:43 2021 +0800 mt76: mt7615: stop ext_phy queue when mac reset happens Stop Tx burst for ext_phy after mac reset. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 402a695b1ae69b1cc2e445b2258841fd39f92780 Author: Ryder Lee Date: Sat Feb 27 15:39:42 2021 +0800 mt76: mt7615: fix CSA notification for DBDC Add CSA notification for second phy. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit e268fcaa67b855af41c5eb4c641288a2bef05b17 Author: Ryder Lee Date: Sat Feb 27 00:44:27 2021 +0800 mt76: mt7915: add missing capabilities for DBDC This improves dbdc performance. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit f92f81d35ac26f8a519866f1b561743fe70e33a5 Author: Lorenzo Bianconi Date: Fri Feb 26 12:17:23 2021 +0100 mt76: mt7921: check mcu returned values in mt7921_start Properly check returned values from mcu utility routines in mt7921_start. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 53a8fb4afdc877f8f2d5e1e15cc5ad66155987a6 Author: Sean Wang Date: Fri Feb 26 16:23:27 2021 +0800 mt76: mt7921: fix the base of the dynamic remap We should change the base for the dynamic remap into another one, because the current base (0xe0000) have been the one used to operate the device ownership. Fixes: 163f4d22c118 ("mt76: mt7921: add MAC support") Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Felix Fietkau commit 23c1d2dc9ed5be1d0df7987335f5646e3826a461 Author: Sean Wang Date: Fri Feb 26 16:23:26 2021 +0800 mt76: mt7921: fix the base of PCIe interrupt Should use 0x10000 as the base to operate PCIe interrupt according to the vendor reference driver. Fixes: ffa1bf97425b ("mt76: mt7921: introduce PM support") Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Tested-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 3ab0269d75cd4800750f7e3e1b037db144f9d034 Author: Lorenzo Bianconi Date: Wed Feb 24 16:57:18 2021 +0100 mt76: mt7921: get rid of mt7921_sta_rc_update routine Since the rate selection is currently managed by the fw, get rid of empty mt7921_sta_rc_update routine Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 57b8b57516c5108b0078051a31c68dc9dfcbf68f Author: Lorenzo Bianconi Date: Wed Feb 24 12:29:34 2021 +0100 mt76: check return value of mt76_txq_send_burst in mt76_txq_schedule_list Since mt76_txq_send_burst routine can report a negative error code, check the returned value before incrementing the number of transmitted frames in mt76_txq_schedule_list routine. Return -EBUSY directly if the device is in reset or in power management. Fixes: 90fdc1717b186 ("mt76: use mac80211 txq scheduling") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c996f0346e40e3b1ac2ebaf0681df898fb157f60 Author: Lorenzo Bianconi Date: Tue Feb 23 18:28:43 2021 +0100 mt76: connac: fix kernel warning adding monitor interface Fix the following kernel warning adding a monitor interface in mt76_connac_mcu_uni_add_dev routine. [ 507.984882] ------------[ cut here ]------------ [ 507.989515] WARNING: CPU: 1 PID: 3017 at mt76_connac_mcu_uni_add_dev+0x178/0x190 [mt76_connac_lib] [ 508.059379] CPU: 1 PID: 3017 Comm: ifconfig Not tainted 5.4.98 #0 [ 508.065461] Hardware name: MT7622_MT7531 RFB (DT) [ 508.070156] pstate: 80000005 (Nzcv daif -PAN -UAO) [ 508.074939] pc : mt76_connac_mcu_uni_add_dev+0x178/0x190 [mt76_connac_lib] [ 508.081806] lr : mt7921_eeprom_init+0x1288/0x1cb8 [mt7921e] [ 508.087367] sp : ffffffc013a33930 [ 508.090671] x29: ffffffc013a33930 x28: ffffff801e628ac0 [ 508.095973] x27: ffffff801c7f1200 x26: ffffff801c7eb008 [ 508.101275] x25: ffffff801c7eaef0 x24: ffffff801d025610 [ 508.106577] x23: ffffff801d022990 x22: ffffff801d024de8 [ 508.111879] x21: ffffff801d0226a0 x20: ffffff801c7eaee8 [ 508.117181] x19: ffffff801d0226a0 x18: 000000005d00b000 [ 508.122482] x17: 00000000ffffffff x16: 0000000000000000 [ 508.127785] x15: 0000000000000080 x14: ffffff801d704000 [ 508.133087] x13: 0000000000000040 x12: 0000000000000002 [ 508.138389] x11: 000000000000000c x10: 0000000000000000 [ 508.143691] x9 : 0000000000000020 x8 : 0000000000000001 [ 508.148992] x7 : 0000000000000000 x6 : 0000000000000000 [ 508.154294] x5 : ffffff801c7eaee8 x4 : 0000000000000006 [ 508.159596] x3 : 0000000000000001 x2 : 0000000000000000 [ 508.164898] x1 : ffffff801c7eac08 x0 : ffffff801d0226a0 [ 508.170200] Call trace: [ 508.172640] mt76_connac_mcu_uni_add_dev+0x178/0x190 [mt76_connac_lib] [ 508.179159] mt7921_eeprom_init+0x1288/0x1cb8 [mt7921e] [ 508.184394] drv_add_interface+0x34/0x88 [mac80211] [ 508.189271] ieee80211_add_virtual_monitor+0xe0/0xb48 [mac80211] [ 508.195277] ieee80211_do_open+0x86c/0x918 [mac80211] [ 508.200328] ieee80211_do_open+0x900/0x918 [mac80211] [ 508.205372] __dev_open+0xcc/0x150 [ 508.208763] __dev_change_flags+0x134/0x198 [ 508.212937] dev_change_flags+0x20/0x60 [ 508.216764] devinet_ioctl+0x3e8/0x748 [ 508.220503] inet_ioctl+0x1e4/0x350 [ 508.223983] sock_do_ioctl+0x48/0x2a0 [ 508.227635] sock_ioctl+0x310/0x4f8 [ 508.231116] do_vfs_ioctl+0xa4/0xac0 [ 508.234681] ksys_ioctl+0x44/0x90 [ 508.237985] __arm64_sys_ioctl+0x1c/0x48 [ 508.241901] el0_svc_common.constprop.1+0x7c/0x100 [ 508.246681] el0_svc_handler+0x18/0x20 [ 508.250421] el0_svc+0x8/0x1c8 [ 508.253465] ---[ end trace c7b90fee13d72c39 ]--- [ 508.261278] ------------[ cut here ]------------ Fixes: d0e274af2f2e4 ("mt76: mt76_connac: create mcu library") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 2b35050a321865859fd2f12a3c18ed7be27858c9 Author: Ryder Lee Date: Tue Feb 23 22:00:36 2021 +0800 mt76: mt7915: fix mib stats counter reporting to mac80211 In order to properly report MIB counters to mac80211, resets stats in mt7915_get_stats routine() and hold mt76 mutex accessing MIB counters. Sum up MIB counters in mt7915_mac_update_mib_stats routine. Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 2eb6f6c437745bce46bd7a8f3a22a732d5b9becb Author: Lorenzo Bianconi Date: Tue Feb 23 11:42:49 2021 +0100 mt76: mt7615: fix mib stats counter reporting to mac80211 In order to properly report MIB counters to mac80211, resets stats in mt7615_get_stats routine and hold mt76 mutex accessing MIB counters. Sum up MIB counters in mt7615_mac_update_mib_stats routine. Fixes: c388d8584bc83 ("mt76: mt7615: add a get_stats() callback") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d43c7301d3308828220ad733043e53254fb98cd7 Author: Ryder Lee Date: Tue Feb 23 16:43:12 2021 +0800 mt76: mt7615: remove hdr->fw_ver check Only mt7615 uses v1 version. Also, some of released firmware doesn't have hdr->fw_ver. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit a4a5a430b076860691e95337787bc666c8ab28ff Author: Ryder Lee Date: Tue Feb 23 16:43:11 2021 +0800 mt76: mt7615: fix TSF configuration The index of TSF counters should follow HWBSSID. Fixes: d8d59f66d136 ("mt76: mt7615: support 16 interfaces") Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit f76e9019913bffee0e49b096068e6f6b12f9b0e0 Author: Lorenzo Bianconi Date: Mon Feb 22 19:17:49 2021 +0100 mt76: mt7921: fix stats register definitions Fix register definitions for mac80211 stats reporting. Move mib counter reset to mt7921_get_stats routine. Fixes: 163f4d22c118d ("mt76: mt7921: add MAC support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 8e84836283f18c8a408c422794a9d4ec1412f3c6 Author: Jiapeng Chong Date: Mon Feb 22 17:03:31 2021 +0800 mt76: mt7921: remove unneeded semicolon Fix the following coccicheck warnings: ./drivers/net/wireless/mediatek/mt76/mt7921/mac.c:1402:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Felix Fietkau commit 9fb9d755fae20b5ad62ef8b4e9289e5baea2c6fc Author: Lorenzo Bianconi Date: Mon Feb 22 02:14:36 2021 +0100 mt76: mt7915: fix aggr len debugfs node Similar to mt7921, fix 802.11 aggr len debugfs reporting for mt7915 driver. Fixes: e57b7901469fc ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 461e3b7f45766f38eeb24ca7354ff01d993b5b47 Author: Lorenzo Bianconi Date: Mon Feb 22 02:12:09 2021 +0100 mt76: mt7921: fix aggr length histogram Fix register definitions for 802.11 aggr length histogram estimation. Fixes: 474a9f21e2e2 ("mt76: mt7921: add debugfs support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 49cc85059a2cb656f96ff3693f891e8fe8f669a9 Author: Lorenzo Bianconi Date: Fri Feb 19 18:22:11 2021 +0100 mt76: mt7615: fix memory leak in mt7615_coredump_work Similar to the issue fixed in mt7921_coredump_work, fix a possible memory leak in mt7615_coredump_work routine. Fixes: d2bf7959d9c0f ("mt76: mt7663: introduce coredump support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit d4b98c63d7a772cfc2ed68c646915d5b3988e934 Author: Ryder Lee Date: Thu Feb 18 09:34:40 2021 +0800 mt76: mt7615: add support for rx decapsulation offload For AP and Client mode, the hardware can pass received packets as 802.3 frames that can be passed to the network stack as-is. Tested-by: Frank Wunderlich Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 2122dfbfd0bd951a6bded5fbd9a1e87b37c41caa Author: Ryder Lee Date: Thu Feb 18 09:34:39 2021 +0800 mt76: mt7615: add rx checksum offload support Set skb->ip_summed to CHECKSUM_UNNECESSARY if the hardware has validated the IP and TCP/UDP checksum Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit e78d73e01db3309bbc099be87a5157d3c710fcc8 Author: Ryder Lee Date: Thu Feb 18 09:34:38 2021 +0800 mt76: mt7615: enable hw rx-amsdu de-aggregation Enable hw rx-amsdu de-aggregation support. This is a preliminary patch to enable rx checksum offload. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit aa40528a5bca990ef8f6a82eb26d23c81b4b3cff Author: Felix Fietkau Date: Sun Jul 26 13:09:51 2020 +0200 mt76: use threaded NAPI With threaded NAPI, the rx handler function is no longer bound to the CPU that fired the interrupt, which significantly helps to spread the workload over multiple CPUs, especially when multiple devices are using threaded NAPI at the same time. Exclude the tx handler from threaded NAPI by using a separate dummy netdev. The work is small and short-lived enough that it makes more sense to run it in softirq instead of creating a dedicated thread Signed-off-by: Felix Fietkau commit 7139b5c0c98af1e2a04bd9ff09d2c01c40f1da41 Author: Sean Wang Date: Fri Feb 19 18:28:51 2021 +0100 mt76: connac: update sched_scan cmd usage Update sched_scan command usage according to the current firmware submitted into linux-firmware.git. Fixes: 80fc1e37c0eb ("mt76: mt7921: rely on mt76_connac_mcu module for sched_scan and hw_scan") Co-developed-by: Soul Huang Signed-off-by: Soul Huang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 9dfd2785ac730f617b06b572683d76bfc51b67c2 Author: Sean Wang Date: Fri Feb 19 18:28:49 2021 +0100 mt76: mt7921: add flush operation add flush operation to make sure cfg80211_mlme_deauth is able to flush the deauthtication frame into air immediately. Co-developed-by: YN Chen Signed-off-by: YN Chen Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 0940605a2a70803fc3362eeccba4c31adf4e70e7 Author: Sean Wang Date: Fri Feb 19 18:28:48 2021 +0100 mt76: mt7921: fixup rx bitrate statistics Since the related rx bitrate fields have been moved to group3 in Rxv, fix rx bitrate statistics in mt7921_mac_fill_rx routine. Fixes: 163f4d22c118d ("mt76: mt7921: add MAC support") Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit a7e3033fcdb60ad51b03896ae99ad9447389bed0 Author: Sean Wang Date: Fri Feb 19 18:28:47 2021 +0100 mt76: connac: fix up the setting for ht40 mode in mt76_connac_mcu_uni_add_bss Use proper value for ht40 mode configuration in mt76_connac_mcu_uni_add_bss routine and not ht20 one Fixes: d0e274af2f2e4 ("mt76: mt76_connac: create mcu library") Co-developed-by: Soul Huang Signed-off-by: Soul Huang Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 159f6dd619d953e2a137bfb42cbce7cbed621c76 Author: Sean Wang Date: Fri Feb 19 18:28:46 2021 +0100 mt76: mt7921: switch to new api for hardware beacon filter Current firmware only supports new api for enabling hardware beacon filter. Fixes: 1d8efc741df80 ("mt76: mt7921: introduce Runtime PM support") Beacon filter cmd have to rely on the associatied access point's beacon interval and DTIM information. Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 782b3e86ea970e899f8e723db9f64708a15ca30e Author: Sean Wang Date: Fri Feb 19 18:28:45 2021 +0100 mt76: mt7921: fix memory leak in mt7921_coredump_work Fix possible memory leak in mt7921_coredump_work. Fixes: 1c099ab44727c ("mt76: mt7921: add MCU support") Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 5e30931494b4940ba74fa5796ca0b6d7e4c84e88 Author: Sean Wang Date: Fri Feb 19 18:28:44 2021 +0100 mt76: mt7921: fix suspend/resume sequence Any pcie access should happen in pci D0 state and we should give ownership back to the device at the end of the suspend procedure. Fixes: 1d8efc741df80 ("mt76: mt7921: introduce Runtime PM support") Signed-off-by: Sean Wang Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 7715a1d54bdf47f89194b0a088e07dcd76820f51 Author: Ryder Lee Date: Tue Feb 2 21:57:59 2021 +0800 mt76: use PCI_VENDOR_ID_MEDIATEK to avoid open coded Use PCI standard defines. Signed-off-by: Ryder Lee Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 45f93e368211fbbd247e1ece254ffb121e20fa10 Author: Lorenzo Bianconi Date: Fri Feb 12 20:30:04 2021 +0100 mt76: mt7915: always check return value from mt7915_mcu_alloc_wtbl_req As done for mt76_connac_mcu_alloc_wtbl_req, even if this is not a real bug since mt7915_mcu_alloc_wtbl_req routine can fails just if nskb is NULL, always check return value from mt7915_mcu_alloc_wtbl_req in order to avoid possible future mistake. Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit baa3afb39e94965f4ca5b5d3d274379504b8fa24 Author: Lorenzo Bianconi Date: Fri Feb 12 12:51:05 2021 +0100 mt76: connac: always check return value from mt76_connac_mcu_alloc_wtbl_req Even if this is not a real bug since mt76_connac_mcu_alloc_wtbl_req routine can fails just if nskb is NULL , always check return value from mt76_connac_mcu_alloc_wtbl_req in order to avoid possible future mistake. Reported-by: Dan Carpenter Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 4b36cc6b390f18dbc59a45fb4141f90d7dfe2b23 Author: David Bauer Date: Sun Feb 7 16:09:17 2021 +0100 mt76: mt76x0: disable GTK offloading When operating two VAP on a MT7610 with encryption (PSK2, SAE, OWE), only the first one to be created will transmit properly encrypteded frames. All subsequently created VAPs will sent out frames with the payload left unencrypted, breaking multicast traffic (ICMP6 NDP) and potentially disclosing information to a third party. Disable GTK offloading and encrypt these frames in software to circumvent this issue. THis only seems to be necessary on MT7610 chips, as MT7612 is not affected from our testing. Signed-off-by: David Bauer Signed-off-by: Felix Fietkau commit be2a2872d0b1db26222cfcd829f2d9e08f4c84c9 Author: Ryder Lee Date: Fri Feb 5 13:13:01 2021 +0800 mt76: always use WTBL_MAX_SIZE for tlv allocation Simplify WTBL defines. Signed-off-by: Ryder Lee Signed-off-by: Felix Fietkau commit 00ac71ff8dc8b8b9ea07947164e8e5e06c520807 Author: Lorenzo Bianconi Date: Sat Feb 6 11:35:41 2021 +0100 mt76: mt7921: removed unused definitions in mcu.h Get rid of the following definitions in mt7921/mcu.h since they are not actually used: - MT7921_WTBL_UPDATE_MAX_SIZE - MT7921_STA_UPDATE_MAX_SIZE - MT7921_WTBL_UPDATE_BA_SIZE Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit c2fa8edcca3b87c1d5cd6b9de00cb649abd636f5 Author: Nigel Christian Date: Sat Feb 13 22:02:37 2021 -0500 mt76: mt7921: remove unnecessary variable In mt7921_pm_set() the variable "ret" is initialized to zero and then returned. Remove it and return zero. Signed-off-by: Nigel Christian Signed-off-by: Felix Fietkau commit c1941b8902794c55328a220c5bf3654b1b54ba09 Author: Lorenzo Bianconi Date: Sat Jan 30 13:28:36 2021 +0100 mt76: mt7921: enable random mac addr during scanning Notify mac80211 mt7921 devices support random mac address during hw frequency scanning Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit 858ebf446bee7d5077bd99488aae617908c3f4fe Author: Sander Vanheule Date: Tue Feb 2 09:59:53 2021 +0100 mt76: mt7615: support loading EEPROM for MT7613BE EEPROM blobs for MT7613BE radios start with (little endian) 0x7663, which is also the PCI device ID for this device. The EEPROM is required for the radio to work at useful power levels, otherwise only the lowest power level is available. Suggested-by: Georgi Vlaev Tested-by: Stijn Segers Signed-off-by: Sander Vanheule Signed-off-by: Felix Fietkau commit 7dcf3c04f0aca746517a77433b33d40868ca4749 Author: Felix Fietkau Date: Sat Feb 13 18:44:10 2021 +0100 mt76: mt7915: fix tx skb dma unmap The first pointer in the txp needs to be unmapped as well, otherwise it will leak DMA mapping entries Reported-by: Ben Greear Fixes: 27d5c528a7ca ("mt76: fix double DMA unmap of the first buffer on 7615/7915") Signed-off-by: Felix Fietkau commit ebee7885bb12a8fe2c2f9bac87dbd87a05b645f9 Author: Felix Fietkau Date: Sat Feb 13 18:42:15 2021 +0100 mt76: mt7615: fix tx skb dma unmap The first pointer in the txp needs to be unmapped as well, otherwise it will leak DMA mapping entries Fixes: 27d5c528a7ca ("mt76: fix double DMA unmap of the first buffer on 7615/7915") Signed-off-by: Felix Fietkau commit 730d6d0da8d8f5905faafe645a5b3c08ac3f5a8f Author: Felix Fietkau Date: Mon Feb 8 17:07:27 2021 +0100 mt76: mt7615: fix key set/delete issues There were multiple issues in the current key set/remove code: - deleting a key with the previous key index deletes the current key - BIP key would only be uploaded correctly initially and corrupted on rekey Rework the code to better keep track of multiple keys and check for the key index before deleting the current key Signed-off-by: Felix Fietkau commit 90e3abf07c80a70f31227eea861f306312d5dbea Author: Felix Fietkau Date: Wed Dec 16 21:13:13 2020 +0100 mt76: mt7915: add support for rx decapsulation offload For AP and Client mode, the hardware can pass received packets as 802.3 frames that can be passed to the network stack as-is. Signed-off-by: Felix Fietkau commit 94244d2ea503455cddec5a4de28d59c74e1aaf47 Author: Felix Fietkau Date: Wed Dec 16 19:04:24 2020 +0100 mt76: mt7915: add rx checksum offload support Set skb->ip_summed to CHECKSUM_UNNECESSARY if the hardware has validated the IP and TCP/UDP checksum Signed-off-by: Felix Fietkau commit cc4b3c139ad308fcd0086baa9dc13bf60e1b802f Author: Lorenzo Bianconi Date: Sun Oct 11 23:37:12 2020 +0200 mt76: mt7915: enable hw rx-amsdu de-aggregation Enable hw rx-amsdu de-aggregation support available in 7915 devices. This is a preliminary patch to enable rx checksum offload Signed-off-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau commit e195dad1411594809cb955c96a7a514bcc4ad638 Author: Felix Fietkau Date: Wed Dec 16 16:05:51 2020 +0100 mt76: add support for 802.3 rx frames Do not try to access the header when receiving them Signed-off-by: Felix Fietkau commit 33ec5dfe8f42aaf0163a16e2b450ab06f3a7f1f3 Author: Coly Li Date: Sun Apr 11 21:43:16 2021 +0800 bcache: fix a regression of code compiling failure in debug.c The patch "bcache: remove PTR_CACHE" introduces a compiling failure in debug.c with following error message, In file included from drivers/md/bcache/bcache.h:182:0, from drivers/md/bcache/debug.c:9: drivers/md/bcache/debug.c: In function 'bch_btree_verify': drivers/md/bcache/debug.c:53:19: error: 'c' undeclared (first use in this function) bio_set_dev(bio, c->cache->bdev); ^ This patch fixes the regression by replacing c->cache->bdev by b->c-> cache->bdev. Signed-off-by: Coly Li Cc: Christoph Hellwig Link: https://lore.kernel.org/r/20210411134316.80274-8-colyli@suse.de Signed-off-by: Jens Axboe commit 62594f189e81caffa6a3bfa2fdb08eec2e347c76 Author: Gustavo A. R. Silva Date: Sun Apr 11 21:43:15 2021 +0800 bcache: Use 64-bit arithmetic instead of 32-bit Cast multiple variables to (int64_t) in order to give the compiler complete information about the proper arithmetic to use. Notice that these variables are being used in contexts that expect expressions of type int64_t (64 bit, signed). And currently, such expressions are being evaluated using 32-bit arithmetic. Fixes: d0cf9503e908 ("octeontx2-pf: ethtool fec mode support") Addresses-Coverity-ID: 1501724 ("Unintentional integer overflow") Addresses-Coverity-ID: 1501725 ("Unintentional integer overflow") Addresses-Coverity-ID: 1501726 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20210411134316.80274-7-colyli@suse.de Signed-off-by: Jens Axboe commit 9c9b81c45619e76d315eb3b9934e9d4bfa7d3bcd Author: Bhaskar Chowdhury Date: Sun Apr 11 21:43:14 2021 +0800 md: bcache: Trivial typo fixes in the file journal.c s/condidate/candidate/ s/folowing/following/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20210411134316.80274-6-colyli@suse.de Signed-off-by: Jens Axboe commit be3bacececd7c4ab233105171d39082858de1baa Author: Arnd Bergmann Date: Sun Apr 11 21:43:13 2021 +0800 md: bcache: avoid -Wempty-body warnings building with 'make W=1' shows a harmless warning for each user of the EBUG_ON() macro: drivers/md/bcache/bset.c: In function 'bch_btree_sort_partial': drivers/md/bcache/util.h:30:55: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 30 | #define EBUG_ON(cond) do { if (cond); } while (0) | ^ drivers/md/bcache/bset.c:1312:9: note: in expansion of macro 'EBUG_ON' 1312 | EBUG_ON(oldsize >= 0 && bch_count_data(b) != oldsize); | ^~~~~~~ Reword the macro slightly to avoid the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20210411134316.80274-5-colyli@suse.de Signed-off-by: Jens Axboe commit f9a018e8a6af2898dc782f6e526bd11f6f352e87 Author: Yang Li Date: Sun Apr 11 21:43:12 2021 +0800 bcache: use NULL instead of using plain integer as pointer This fixes the following sparse warnings: drivers/md/bcache/features.c:22:16: warning: Using plain integer as NULL pointer Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20210411134316.80274-4-colyli@suse.de Signed-off-by: Jens Axboe commit 11e9560e6c005b4adca12d17b27dc5ac22b40663 Author: Christoph Hellwig Date: Sun Apr 11 21:43:11 2021 +0800 bcache: remove PTR_CACHE Remove the PTR_CACHE inline and replace it with a direct dereference of c->cache. (Coly Li: fix the typo from PTR_BUCKET to PTR_CACHE in commit log) Signed-off-by: Christoph Hellwig Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20210411134316.80274-3-colyli@suse.de Signed-off-by: Jens Axboe commit 13e1db65d2b9263c3dfe447077981e7a32c857ae Author: Zhiqiang Liu Date: Sun Apr 11 21:43:10 2021 +0800 bcache: reduce redundant code in bch_cached_dev_run() In bch_cached_dev_run(), free(env[1])|free(env[2])|free(buf) show up three times. This patch introduce out tag in which free(env[1])|free(env[2])|free(buf) are only called one time. If we need to call free() when errors occur, we can set error code to ret, and then goto out tag directly. Signed-off-by: Zhiqiang Liu Signed-off-by: Coly Li Link: https://lore.kernel.org/r/20210411134316.80274-2-colyli@suse.de Signed-off-by: Jens Axboe commit c9450f728cfba0613163ed85f8c26eeeeed9def2 Merge: eedd6341340c1 49ab51b01ec6f Author: Ingo Molnar Date: Sun Apr 11 14:36:23 2021 +0200 Merge branch 'for-mingo-lkmm' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core Pull LKMM changes from Paul E. McKenney: misc documentation updates. Signed-off-by: Ingo Molnar commit eedd6341340c19a70cea7a89e0070a47b70c4e8d Merge: 9432bbd969c66 bd0ccc4afca2d Author: Ingo Molnar Date: Sun Apr 11 14:35:02 2021 +0200 Merge branch 'for-mingo-kcsan' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into locking/core Pull KCSAN changes from Paul E. McKenney: misc updates. Signed-off-by: Ingo Molnar commit 120b566d1df22a0a4543ac0e8aef875c49dd2c21 Merge: e49d033bddf5b ab6ad3dbddaf0 Author: Ingo Molnar Date: Sun Apr 11 14:31:43 2021 +0200 Merge branch 'for-mingo-rcu' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu Pull RCU changes from Paul E. McKenney: - Bitmap support for "N" as alias for last bit - kvfree_rcu updates - mm_dump_obj() updates. (One of these is to mm, but was suggested by Andrew Morton.) - RCU callback offloading update - Polling RCU grace-period interfaces - Realtime-related RCU updates - Tasks-RCU updates - Torture-test updates - Torture-test scripting updates - Miscellaneous fixes Signed-off-by: Ingo Molnar commit e80a76aa1a91018d919d2210366943f9bf17009e Author: Andrey Konovalov Date: Mon Mar 15 13:20:19 2021 +0000 kasan, arm64: tests supports for HW_TAGS async mode This change adds KASAN-KUnit tests support for the async HW_TAGS mode. In async mode, tag fault aren't being generated synchronously when a bad access happens, but are instead explicitly checked for by the kernel. As each KASAN-KUnit test expect a fault to happen before the test is over, check for faults as a part of the test handler. Acked-by: Catalin Marinas Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210315132019.33202-10-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit eab0e6e17d876381b4d47996eef3b5fd46ea4011 Author: Vincenzo Frascino Date: Mon Mar 15 13:20:18 2021 +0000 arm64: mte: Report async tag faults before suspend When MTE async mode is enabled TFSR_EL1 contains the accumulative asynchronous tag check faults for EL1 and EL0. During the suspend/resume operations the firmware might perform some operations that could change the state of the register resulting in a spurious tag check fault report. Report asynchronous tag faults before suspend and clear the TFSR_EL1 register after resume to prevent this to happen. Cc: Will Deacon Cc: Lorenzo Pieralisi Reviewed-by: Catalin Marinas Reviewed-by: Lorenzo Pieralisi Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210315132019.33202-9-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit 65812c6921cc849d86811147038dd246fa0ea18c Author: Vincenzo Frascino Date: Mon Mar 15 13:20:17 2021 +0000 arm64: mte: Enable async tag check fault MTE provides a mode that asynchronously updates the TFSR_EL1 register when a tag check exception is detected. To take advantage of this mode the kernel has to verify the status of the register at: 1. Context switching 2. Return to user/EL0 (Not required in entry from EL0 since the kernel did not run) 3. Kernel entry from EL1 4. Kernel exit to EL1 If the register is non-zero a trace is reported. Add the required features for EL1 detection and reporting. Note: ITFSB bit is set in the SCTLR_EL1 register hence it guaranties that the indirect writes to TFSR_EL1 are synchronized at exception entry to EL1. On the context switch path the synchronization is guarantied by the dsb() in __switch_to(). The dsb(nsh) in mte_check_tfsr_exit() is provisional pending confirmation by the architects. Cc: Will Deacon Reviewed-by: Catalin Marinas Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210315132019.33202-8-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit d8969752cc4e3294074ff0582de42d0e3c982eba Author: Vincenzo Frascino Date: Mon Mar 15 13:20:16 2021 +0000 arm64: mte: Conditionally compile mte_enable_kernel_*() mte_enable_kernel_*() are not needed if KASAN_HW is disabled. Add ash defines around the functions to conditionally compile the functions. Signed-off-by: Vincenzo Frascino Acked-by: Catalin Marinas Link: https://lore.kernel.org/r/20210315132019.33202-7-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit e60beb95c08baf29416d0e06a9e1d4887faf5d1c Author: Vincenzo Frascino Date: Mon Mar 15 13:20:15 2021 +0000 arm64: mte: Enable TCO in functions that can read beyond buffer limits load_unaligned_zeropad() and __get/put_kernel_nofault() functions can read past some buffer limits which may include some MTE granule with a different tag. When MTE async mode is enabled, the load operation crosses the boundaries and the next granule has a different tag the PE sets the TFSR_EL1.TF1 bit as if an asynchronous tag fault is happened. Enable Tag Check Override (TCO) in these functions before the load and disable it afterwards to prevent this to happen. Note: The same condition can be hit in MTE sync mode but we deal with it through the exception handling. In the current implementation, mte_async_mode flag is set only at boot time but in future kasan might acquire some runtime features that that change the mode dynamically, hence we disable it when sync mode is selected for future proof. Cc: Will Deacon Reported-by: Branislav Rankov Tested-by: Branislav Rankov Reviewed-by: Catalin Marinas Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210315132019.33202-6-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit 8f7b5054755e48cc7b217a41e3f1891e01338d2f Author: Vincenzo Frascino Date: Mon Mar 15 13:20:14 2021 +0000 kasan: Add report for async mode KASAN provides an asynchronous mode of execution. Add reporting functionality for this mode. Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Reviewed-by: Andrey Konovalov Acked-by: Catalin Marinas Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/20210315132019.33202-5-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit c137c6145b11dc513407bd2e4406cf0a7b8a217d Author: Vincenzo Frascino Date: Mon Mar 15 13:20:13 2021 +0000 arm64: mte: Drop arch_enable_tagging() arch_enable_tagging() was left in memory.h after the introduction of async mode to not break the bysectability of the KASAN KUNIT tests. Remove the function now that KASAN has been fully converted. Cc: Will Deacon Acked-by: Catalin Marinas Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210315132019.33202-4-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit 2603f8a78dfb1d54f62dbacc490ea44aa6d80e04 Author: Vincenzo Frascino Date: Mon Mar 15 13:20:12 2021 +0000 kasan: Add KASAN mode kernel parameter Architectures supported by KASAN_HW_TAGS can provide a sync or async mode of execution. On an MTE enabled arm64 hw for example this can be identified with the synchronous or asynchronous tagging mode of execution. In synchronous mode, an exception is triggered if a tag check fault occurs. In asynchronous mode, if a tag check fault occurs, the TFSR_EL1 register is updated asynchronously. The kernel checks the corresponding bits periodically. KASAN requires a specific kernel command line parameter to make use of this hw features. Add KASAN HW execution mode kernel command line parameter. Note: This patch adds the kasan.mode kernel parameter and the sync/async kernel command line options to enable the described features. [ Add a new var instead of exposing kasan_arg_mode to be consistent with flags for other command line arguments. ] Cc: Dmitry Vyukov Cc: Andrey Ryabinin Cc: Alexander Potapenko Cc: Andrey Konovalov Reviewed-by: Andrey Konovalov Acked-by: Catalin Marinas Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Signed-off-by: Andrey Konovalov Link: https://lore.kernel.org/r/20210315132019.33202-3-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit f3b7deef8dcaf84fd659108ae300626ea5420f87 Author: Vincenzo Frascino Date: Mon Mar 15 13:20:11 2021 +0000 arm64: mte: Add asynchronous mode support MTE provides an asynchronous mode for detecting tag exceptions. In particular instead of triggering a fault the arm64 core updates a register which is checked by the kernel after the asynchronous tag check fault has occurred. Add support for MTE asynchronous mode. The exception handling mechanism will be added with a future patch. Note: KASAN HW activates async mode via kasan.mode kernel parameter. The default mode is set to synchronous. The code that verifies the status of TFSR_EL1 will be added with a future patch. Cc: Will Deacon Reviewed-by: Catalin Marinas Reviewed-by: Andrey Konovalov Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210315132019.33202-2-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit fa9f5d0e0b45a06802f7cb3afed237be6066821e Author: Arnd Bergmann Date: Mon Mar 22 11:43:33 2021 +0100 iwlegacy: avoid -Wempty-body warning There are a couple of warnings in this driver when building with W=1: drivers/net/wireless/intel/iwlegacy/common.c: In function 'il_power_set_mode': drivers/net/wireless/intel/iwlegacy/common.c:1195:60: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 1195 | il->chain_noise_data.state); | ^ drivers/net/wireless/intel/iwlegacy/common.c: In function 'il_do_scan_abort': drivers/net/wireless/intel/iwlegacy/common.c:1343:57: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] Change the empty debug macros to no_printk(), which avoids the warnings and adds useful format string checks. Signed-off-by: Arnd Bergmann Acked-by: Stanislaw Gruszka Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210322104343.948660-3-arnd@kernel.org commit 670d9e53886c942b7f29c475b2b494278e586921 Author: Lorenzo Bianconi Date: Sun Feb 28 19:23:09 2021 +0100 mt7601u: enable TDLS support Notify mac80211 the mt7601u chipset support 802.11 TDLS. The feature has been tested with a mt7610u peer. Signed-off-by: Lorenzo Bianconi Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/8f9fd662cdbbb70ba896f1bea80e696b15011d3f.1614536496.git.lorenzo@kernel.org commit 87fce88658ba047ae62e83497d3f3c5dc22fa6f9 Author: Colin Ian King Date: Thu Feb 25 18:32:41 2021 +0000 mt7601u: fix always true expression Currently the expression ~nic_conf1 is always true because nic_conf1 is a u16 and according to 6.5.3.3 of the C standard the ~ operator promotes the u16 to an integer before flipping all the bits. Thus the top 16 bits of the integer result are all set so the expression is always true. If the intention was to flip all the bits of nic_conf1 then casting the integer result back to a u16 is a suitabel fix. Interestingly static analyzers seem to thing a bitwise ! should be used instead of ~ for this scenario, so I think the original intent of the expression may need some extra consideration. Addresses-Coverity: ("Logical vs. bitwise operator") Fixes: c869f77d6abb ("add mt7601u driver") Signed-off-by: Colin Ian King Acked-by: Jakub Kicinski Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210225183241.1002129-1-colin.king@canonical.com commit c9eaee0c2ec6b1002044fb698cdfb5d9ef4ed28c Author: Dan Carpenter Date: Mon Mar 15 12:23:37 2021 +0300 rtw88: Fix an error code in rtw_debugfs_set_rsvd_page() The sscanf() function returns the number of matches (0 or 1 in this case). It doesn't return error codes. We should return -EINVAL if the string is invalid Fixes: c376c1fc87b7 ("rtw88: add h2c command in debugfs") Signed-off-by: Dan Carpenter Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/YE8nmatMDBDDWkjq@mwanda commit 4517f811258d81a4666a7d0228a774dfbdb1e4fd Author: Ching-Te Ku Date: Fri Mar 19 13:42:18 2021 +0800 rtw88: coex: fix A2DP stutters while WL busy + WL scan While WL scan, WL is more high priority than BT. The packets from AP will be a big interference to A2DP. It will lead to A2DP stutters. Stop answering CTS to AP to decrease AP's packets Tx while WL scan + WL busy. Enable BT AFH feature to make BT leave away from WL channel. Desired BT firmware BT-COEX version: 0x1c Desired WL firmware version: 9.9.x Signed-off-by: Ching-Te Ku Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210319054218.3319-8-pkshih@realtek.com commit 7ae7784ec2a812c07d2ca91a6538ef2470154fb6 Author: Po-Hao Huang Date: Fri Mar 19 13:42:16 2021 +0800 rtw88: 8822c: add LC calibration for RTL8822C Fix power tracking issue by replacing unnecessary IQ calibration with LC calibration. When thermal difference exceeds limitation, let RF circuit adjsut its characteristic to fit in current environment. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210319054218.3319-6-pkshih@realtek.com commit a08398833ec22a245c6386a8688ccbec10f03363 Author: Zong-Zhe Yang Date: Fri Mar 19 13:42:15 2021 +0800 rtw88: 8822c: update tx power limit table to RF v40.1 update tx power limits to RF v40 and apply fix on FCC's channel 12 and 13, so change the patch level to 1. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210319054218.3319-5-pkshih@realtek.com commit 76325506e8111ed013ff9d1f9e86bf015bda234d Author: Zong-Zhe Yang Date: Fri Mar 19 13:42:14 2021 +0800 rtw88: fix DIG min setting DIG min is expected to be set according to chip. And actually we assigned it under each chip information. However, we didn't use the setting when we did DIG process. It is unexpected, so we fix it. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210319054218.3319-4-pkshih@realtek.com commit 7b33ec8b93c9fa401a8fcd92ebde3129a1beb844 Author: Zong-Zhe Yang Date: Fri Mar 19 13:42:12 2021 +0800 rtw88: add flush hci support Though mac queue flushing has been supported, sometimes data may be waiting on interface from host to chip. If it occurs, there may still be data that flows into mac just after we do flush. To avoid that, we add the hci part of flushing. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210319054218.3319-2-pkshih@realtek.com commit 5dcbe7e3862dfc89d219f37a9ed5e53944fa13c2 Author: Heiko Stuebner Date: Wed Mar 24 13:22:35 2021 +0100 arm64: dts: rockchip: move mmc aliases to board dts on rk3399 As suggested by Arnd Bergmann, the newly added mmc aliases should be board specific, so move them from the general dtsi to the individual boards. Suggested-by: Arnd Bergmann Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210324122235.1059292-7-heiko@sntech.de commit 751a78a8bd25ac2634baa19f6f918912360fba93 Author: Heiko Stuebner Date: Wed Mar 24 13:22:34 2021 +0100 arm64: dts: rockchip: move mmc aliases to board dts on rk3368 As suggested by Arnd Bergmann, the newly added mmc aliases should be board specific, so move them from the general dtsi to the individual boards. Suggested-by: Arnd Bergmann Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210324122235.1059292-6-heiko@sntech.de commit 28869aa53506a12d98f6e5ff54b051400be1c2bf Author: Heiko Stuebner Date: Wed Mar 24 13:22:33 2021 +0100 arm64: dts: rockchip: move mmc aliases to board dts on rk3328 As suggested by Arnd Bergmann, the newly added mmc aliases should be board specific, so move them from the general dtsi to the individual boards. Suggested-by: Arnd Bergmann Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210324122235.1059292-5-heiko@sntech.de commit 3f6c22987c0bdfb42b497e346d77b6cdaed55de3 Author: Heiko Stuebner Date: Wed Mar 24 13:22:32 2021 +0100 arm64: dts: rockchip: move mmc aliases to board dts on rk3308 As suggested by Arnd Bergmann, the newly added mmc aliases should be board specific, so move them from the general dtsi to the individual boards. Suggested-by: Arnd Bergmann Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210324122235.1059292-4-heiko@sntech.de commit 78b8513b763c121d0ac5ed8fef3188ea065913bb Author: Heiko Stuebner Date: Wed Mar 24 13:22:31 2021 +0100 arm64: dts: rockchip: move mmc aliases to board dts on px30 As suggested by Arnd Bergmann, the newly added mmc aliases should be board specific, so move them from the general dtsi to the individual boards. For the Engicam-boards this means a split as the core boards contains the emmc while the commit baseboard handles sdmmc and sdio. Suggested-by: Arnd Bergmann Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210324122235.1059292-3-heiko@sntech.de commit e89db2b4c706b9ca1293e7025ef5e8730b5d1b5b Author: Heiko Stuebner Date: Wed Mar 24 13:22:30 2021 +0100 ARM: dts: rockchip: move rv1108 mmcx aliases to board dts files As suggested by Arnd Bergmann, mmc-aliases are supposed to be board-specific, so move the newly added general aliases to the board-level on rv1108-based boards. Suggested-by: Arnd Bergmann Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210324122235.1059292-2-heiko@sntech.de commit 23a52b0dfebf8b9ae44829c561c3d82d8b9c48e3 Author: Heiko Stuebner Date: Wed Mar 24 13:22:29 2021 +0100 ARM: dts: rockchip: move rk322x mmcx aliases to board dts files As suggested by Arnd Bergmann, mmc-aliases are supposed to be board-specific, so move the newly added general aliases to the board-level on rk322x-based boards. Suggested-by: Arnd Bergmann Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210324122235.1059292-1-heiko@sntech.de commit 96f4f6809beec1bb2338e1aeac408e6a733f8135 Author: Alexandru Elisei Date: Fri Apr 9 16:21:54 2021 +0100 KVM: arm64: Don't advertise FEAT_SPE to guests Even though KVM sets up MDCR_EL2 to trap accesses to the SPE buffer and sampling control registers and to inject an undefined exception, the presence of FEAT_SPE is still advertised in the ID_AA64DFR0_EL1 register, if the hardware supports it. Getting an undefined exception when accessing a register usually happens for a hardware feature which is not implemented, and indeed this is how PMU emulation is handled when the virtual machine has been created without the KVM_ARM_VCPU_PMU_V3 feature. Let's be consistent and never advertise FEAT_SPE, because KVM doesn't have support for emulating it yet. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210409152154.198566-3-alexandru.elisei@arm.com commit 13611bc80d3da162aaf32b01ceffc804e027d406 Author: Alexandru Elisei Date: Fri Apr 9 16:21:53 2021 +0100 KVM: arm64: Don't print warning when trapping SPE registers KVM sets up MDCR_EL2 to trap accesses to the SPE buffer and sampling control registers and it relies on the fact that KVM injects an undefined exception for unknown registers. This mechanism of injecting undefined exceptions also prints a warning message for the host kernel; for example, when a guest tries to access PMSIDR_EL1: [ 2.691830] kvm [142]: Unsupported guest sys_reg access at: 80009e78 [800003c5] [ 2.691830] { Op0( 3), Op1( 0), CRn( 9), CRm( 9), Op2( 7), func_read }, This is unnecessary, because KVM has explicitly configured trapping of those registers and is well aware of their existence. Prevent the warning by adding the SPE registers to the list of registers that KVM emulates. The access function will inject the undefined exception. Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210409152154.198566-2-alexandru.elisei@arm.com commit 46094049a49be777f12a9589798f7c70b90cd03f Author: Tudor Ambarus Date: Fri Apr 2 11:20:30 2021 +0300 Revert "mtd: spi-nor: macronix: Add support for mx25l51245g" This reverts commit 04b8edad262eec0d153005973dfbdd83423c0dcb. mx25l51245g and mx66l51235l have the same flash ID. The flash detection returns the first entry in the flash_info array that matches the flash ID that was read, thus for the 0xc2201a ID, mx25l51245g was always hit, introducing a regression for mx66l51235l. If one wants to differentiate the flash names, a better fix would be to differentiate between the two at run-time, depending on SFDP, and choose the correct name from a list of flash names, depending on the SFDP differentiator. Fixes: 04b8edad262e ("mtd: spi-nor: macronix: Add support for mx25l51245g") Signed-off-by: Tudor Ambarus Acked-by: Pratyush Yadav Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210402082031.19055-2-tudor.ambarus@microchip.com commit be94215be1ab19e5d38f50962f611c88d4bfc83a Author: Xiang Chen Date: Thu Apr 1 15:34:46 2021 +0800 mtd: spi-nor: core: Fix an issue of releasing resources during read/write If rmmod the driver during read or write, the driver will release the resources which are used during read or write, so it is possible to refer to NULL pointer. Use the testcase "mtd_debug read /dev/mtd0 0xc00000 0x400000 dest_file & sleep 0.5;rmmod spi_hisi_sfc_v3xx.ko", the issue can be reproduced in hisi_sfc_v3xx driver. To avoid the issue, fill the interface _get_device and _put_device of mtd_info to grab the reference to the spi controller driver module, so the request of rmmod the driver is rejected before read/write is finished. Fixes: b199489d37b2 ("mtd: spi-nor: add the framework for SPI NOR") Signed-off-by: Xiang Chen Signed-off-by: Yicong Yang Signed-off-by: Tudor Ambarus Tested-by: Michael Walle Tested-by: Tudor Ambarus Reviewed-by: Michael Walle Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1617262486-4223-1-git-send-email-yangyicong@hisilicon.com commit 31d8df9f4ae540bee25ca963a8c8b6847867a3d0 Merge: aa87e31757e82 a503d1628c9c3 Author: Greg Kroah-Hartman Date: Sun Apr 11 08:53:17 2021 +0200 Merge tag 'mhi-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI changes for v5.13 core: - Added support for Flash Programmer execution environment which allows the host machine (like x86) to flash the modem firmware to NAND or eMMC in the modem. The MHI bus will expose EDL channels (34, 35) and then the opensource QDL tool [1] can be used to flash the firmware from the host. - Added an internal helper for polling the MHI registers with a retry interval. This helper is used now to poll for the MHI ready state in MHI STATUS register. - Various fixes for issues found during the bringup of SDX24/SDX55 based Quectel and Telit modems. - Updates to the Execution environment handling for proper downloading of the AMSS image from SBL (Secondary Bootloader) mode. - Added support for sending STOP channel command to the MHI device and also made changes to the MHI core for proper handling of stop and restart. - Fixed the runtime_pm handling in the core by forcing the device to be in wake mode until TX completion and allowing it to suspend for RX. - Added sanity checks for values read from the device to avoid crash if those are corrupted somehow. - Fixed warnings generated by sparse (W=2) - Couple of kernel doc cleanups in mhi.h pci_generic: - Added support for runtime PM and generic PM - Added Firehose channels for flashing the firmware - Added support for modems such as Quectel EM1XXGR-L, SDX24, SDX65, Foxconn T99W175 exposing relevant channels. [1] https://git.linaro.org/landing-teams/working/qualcomm/qdl.git * tag 'mhi-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mani/mhi: (49 commits) bus: mhi: fix typo in comments for struct mhi_channel_config bus: mhi: core: Fix shadow declarations bus: mhi: pci_generic: Constify mhi_controller_config struct definitions bus: mhi: pci_generic: Introduce Foxconn T99W175 support bus: mhi: core: Sanity check values from remote device before use bus: mhi: pci_generic: Add FIREHOSE channels bus: mhi: pci_generic: Implement PCI shutdown callback bus: mhi: Improve documentation on channel transfer setup APIs bus: mhi: core: Remove __ prefix for MHI channel unprepare function bus: mhi: core: Check channel execution environment before issuing reset bus: mhi: core: Clear configuration from channel context during reset bus: mhi: core: Hold device wake for channel update commands bus: mhi: core: Update debug messages to use client device bus: mhi: core: Improvements to the channel handling state machine bus: mhi: core: Clear context for stopped channels from remove() bus: mhi: core: Allow sending the STOP channel command bus: mhi: pci_generic: Add SDX65 based modem support bus: mhi: core: Remove pre_init flag used for power purposes bus: mhi: pm: reduce PM state change verbosity bus: mhi: core: Fix MHI runtime_pm behavior ... commit aa87e31757e82f686bb07544a2dec845bd700e5e Merge: 19ab233989d0f b575a7673e3d0 Author: Greg Kroah-Hartman Date: Sun Apr 11 08:52:09 2021 +0200 Merge tag 'misc-habanalabs-next-2021-04-10' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux into char-misc-next Oded writes: This tag contains habanalabs driver changes for v5.13: - Add support to reset device after the user closes the file descriptor. Because we support a single user, we can reset the device (if needs to) after a user closes its file descriptor to make sure the device is in idle and clean state for the next user. - Add a new feature to allow the user to wait on interrupt. This is needed for future ASICs - Replace GFP_ATOMIC with GFP_KERNEL wherever possible and add code to support failure of allocating with GFP_ATOMIC. - Update code to support the latest firmware image: - More security features are done in the firmware - Remove hard-coded assumptions and replace them with values that are sent to the firmware on loading. - Print device unusable error - Reset device in case the communication between driver and firmware gets out of sync. - Support new PCI device ids for secured GAUDI. - Expose current power draw through the INFO IOCTL. - Support resetting the device upon a request from the BMC (through F/W). - Always use only a single MSI in GAUDI, due to H/W limitation. - Improve data-path code by taking out code from spinlock protection. - Allow user to specify custom timeout per Command Submission. - Some enhancements to debugfs. - Various minor changes and improvements. * tag 'misc-habanalabs-next-2021-04-10' of https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/linux: (41 commits) habanalabs: print f/w boot unknown error habanalabs: update to latest F/W communication header habanalabs/gaudi: skip iATU if F/W security is enabled habanalabs/gaudi: derive security status from pci id habanalabs: move dram scrub to free sequence habanalabs: send dynamic msi-x indexes to f/w habanalabs/gaudi: clear QM errors only if not in stop_on_err mode habanalabs: support DEVICE_UNUSABLE error indication from FW habanalabs: use strscpy instead of sprintf and strlcpy habanalabs: remove the store jobs array from CS IOCTL habanalabs/gaudi: add debugfs to DMA from the device habanalabs/gaudi: sync stream add protection to SOB reset flow habanalabs: add custom timeout flag per cs habanalabs: improve utilization calculation habanalabs: support legacy and new pll indexes habanalabs: move relevant datapath work outside cs lock habanalabs: avoid soft lockup bug upon mapping error habanalabs/gaudi: Update async events header habanalabs/gaudi: unsecure TPC cfg status registers habanalabs/gaudi: always use single-msi mode ... commit 1b9e18de8d43bf798622cc365f99b41f180b446f Author: Fabio Aiuto Date: Sat Apr 10 16:20:38 2021 +0200 staging: rtl8723bs: remove more empty if blocks after DBG_8192C deletion remove more empty if-blocks after DBG_8192C deletion. Reported-by: kernel test robot Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/99b111d2bac822b9dc7ff6e1cfd3d3efc62ef836.1618064275.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d6b08255f8fb0084ea78f8358b529d6d27e9c103 Author: Fabio Aiuto Date: Sat Apr 10 16:20:37 2021 +0200 staging: rtl8723bs: remove more unnecessary parentheses remove more unnecessary parentheses after DBG_8192C deletion. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c730d2719cb2ed385dd55811d6e205c6c31f2355.1618064275.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1e95e1e49aee7305e110e999d5314bc7116c02c2 Author: Fabio Aiuto Date: Sat Apr 10 16:20:36 2021 +0200 staging: rtl8723bs: fix comparison to true issue fix following post-commit hook checkpatch issue: CHECK: Using comparison to true is error prone 136: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: 2497: + if (psta->dot8021xalg != 1 || psta->bpairwise_key_installed == true) { Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/680d86950d760003a694f8880c0a912a9d815a5e.1618064275.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 05c19e212a5d46c40ec0542d68bb1b2814c87af0 Author: Fabio Aiuto Date: Sat Apr 10 16:20:35 2021 +0200 staging: rtl8723bs: remove empty else block in os_dep/ioctl_cfg80211.c remove empty else-block Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1bee993834410c2c11a6799e1868589efc1334f6.1618064275.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 279fa77760fb621694769cdde27f7bd54e686a95 Author: Fabio Aiuto Date: Sat Apr 10 16:20:34 2021 +0200 staging: rtl8723bs: remove unnecessary parentheses in os_dep/ioctl_cfg80211.c fix following post-commit hook checkpatch issue: WARNING: braces {} are not necessary for single statement blocks 94: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1225: + if (pwdev_priv->scan_request->wiphy == pwdev_priv->rtw_wdev->wiphy) { cfg80211_scan_done(pwdev_priv->scan_request, &info); } Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/fabc590b9f74f687cc0f7ea978577f0357df2974.1618064275.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5bb62a191be0ee516bb5314554fa14498d9eba53 Author: Fabio Aiuto Date: Sat Apr 10 16:20:33 2021 +0200 staging: rtl8723bs: put constant on the right side of a test in os_dep/ioctl_cfg80211.c fix following post-commit hook checkpatch issue: CHECK: Comparison to NULL could be written "psta" 72: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854: + if (psta != NULL) { Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5ac547f3a4bd228f372da7057bbfb3cac1535857.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit da742b02a1e5079e53d3ecf6bffcb20eea4c5e16 Author: Fabio Aiuto Date: Sat Apr 10 16:20:32 2021 +0200 staging: rtl8723bs: remove empty if and else blocks remove if and else blocks after DBG_8192C removal Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2d2e09d5033bda1ceb77576e582ecf1dcfccf428.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d290bb31a718baf53e5c0e32c195b1013cfdedc5 Author: Fabio Aiuto Date: Sat Apr 10 16:20:31 2021 +0200 staging: rtl8723bs: put constant on the right side of the test fix following post-commit hook checpatch issues: WARNING: Comparisons should place the constant on the right side of the test 287: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:738: + if (_SUCCESS != ret) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e19cff736413714dea4265c17b512882d051a311.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ca39cd7459da838a0301c9eab86307015bfd877 Author: Fabio Aiuto Date: Sat Apr 10 16:20:30 2021 +0200 staging: rtl8723bs: split long line fix following post-commit hook checkpatch issue: WARNING: line length of 103 exceeds 100 columns 168: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1086: + if (efuse_OneByteRead(padapter, efuse_addr, &efuse_data, bPseudoTest) == false) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/28c078c685059c9b883b563f2c08cfb1d49cb82c.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9d5ed87234ae9557692ed867f248720b29f22dba Author: Fabio Aiuto Date: Sat Apr 10 16:20:29 2021 +0200 staging: rtl8723bs: put spaces around operators fix following post-commit hook checkpatch issues: CHECK: spaces preferred around that '+' (ctx:VxV) 87: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:746: + if ((_offset+_size_byte) > EFUSE_MAX_MAP_LEN) -- CHECK: spaces preferred around that '+' (ctx:VxV) 105: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:847: + if ((_offset+_size_byte) > EFUSE_BT_MAP_LEN) -- CHECK: spaces preferred around that '-' (ctx:VxV) 133: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:906: + if ((eFuse_Addr-1) < total) -- CHECK: spaces preferred around that '|' (ctx:VxV) 392: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2485: + if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != true) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/65b7cf4b1ae3cea25a316f3c9f56c697ee7be8af.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 71839eac6bbc0784cca71b152d509172b707d67b Author: Fabio Aiuto Date: Sat Apr 10 16:20:28 2021 +0200 staging: rtl8723bs: fix comparison to null fix following post-commit hook checkpatch issues: CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_req_ie" 348: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1319: + if (pmlmepriv->wps_probe_req_ie == NULL) CHECK: Comparison to NULL could be written "!dvobj" 459: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:184: + if (dvobj == NULL) CHECK: Comparison to NULL could be written "!padapter" 470: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:231: + if (padapter == NULL) CHECK: Comparison to NULL could be written "!padapter" 481: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:240: + if (padapter == NULL) CHECK: Comparison to NULL could be written "!padapter" 492: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:256: + if (padapter == NULL) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2c7557a465aeda7fb6989df30c6250f9ec56ebe1.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 04c35396c5c6c68d131fb61c39460cba351d0af7 Author: Fabio Aiuto Date: Sat Apr 10 16:20:27 2021 +0200 staging: rtl8723bs: remove unnecessary bracks remove unnecessary bracks in if-else blocks Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/812e5e0dcb78e49568276237b68dc6f9632c198d.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8f32a6c89ce45b21b886a2a93947d5befb52fab2 Author: Fabio Aiuto Date: Sat Apr 10 16:20:26 2021 +0200 staging: rtl8723bs: remove commented out DEBUG_CFG80211 symbol definition remove commented out DEBUG_CFG80211 symbol definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b884ecb5c83c222f0b48839f89e53c45f4489e06.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5ffbfcf38b800911dbc6516605391fd46188ef32 Author: Fabio Aiuto Date: Sat Apr 10 16:20:25 2021 +0200 staging: rtl8723bs: remove empty ifdef blocks conditioned to DEBUG_CFG80211 definition remove empty ifdef blocks conditioned to DEBUG_CFG80211 definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7c4485a9d02e8c553c1d81f8b98c8479f481e54c.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8a095d44d88b996f319fac166711b04edd300e79 Author: Fabio Aiuto Date: Sat Apr 10 16:20:24 2021 +0200 staging: rtl8723bs: remove commented out SDIO_DEBUG_IO symbol definition remove commented out SDIO_DEBUG_IO symbol definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/7a45b1419bcf4eb2abc25d661acae77018432e46.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit add69c59ebb23b834dce2fbf95c1036b635fe259 Author: Fabio Aiuto Date: Sat Apr 10 16:20:23 2021 +0200 staging: rtl8723bs: remove code block guarded by undefined SDIO_DEBUG_IO remove code block guarded by SDIO_DEBUG_IO symbol. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ee77c4b4e6fbba8e0182e9558f793c88cf398cb5.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 96efb46098422c67b9693ee776b01c1528252c96 Author: Fabio Aiuto Date: Sat Apr 10 16:20:22 2021 +0200 staging: rtl8723bs: remove empty code block guarded by DBG_CCX remove code block guarded by DBG_CCX symbol, left empty after DBG_8192C removal. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b9ff4d7f14decf33064c30b307c3b20494aecbb2.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0268c26750a9ba0c262ed487e55b1b3294c6e3b1 Author: Fabio Aiuto Date: Sat Apr 10 16:20:21 2021 +0200 staging: rtl8723bs: remove code blocks guarded by DEBUG symbol remove code blocks guarded by DEBUG symbol remove undefinition of DEBUG Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/381da3f0c1ddf825b2aa7cbfd074ee2bf42aac4f.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit aaf2a07724dae8dba0fab83204b4a72218f8562e Author: Fabio Aiuto Date: Sat Apr 10 16:20:20 2021 +0200 staging: rtl8723bs: remove commented out DEBUG_RTL871X definition remove commented out DEBUG_RTL871X definition Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9d04ab2b645e242e35d31abbb1a301e2ad8c4401.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0a62cc7a5ac5832060bf11103d676abb1bd73c72 Author: Fabio Aiuto Date: Sat Apr 10 16:20:19 2021 +0200 staging: rtl8723bs: remove unused code blocks guarded by DEBUG_RTL871X remove unused code blocks guarded by never set DEBUG_RTL871X Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c7b590b7ae7fad08cd913462ab385db9230ede4d.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit fa50dda745be62b542ed75d45918c7ccfe0b937a Author: Fabio Aiuto Date: Sat Apr 10 16:20:18 2021 +0200 staging: rtl8723bs: put spaces around operators fix following post-commit hook checkpatch issue: CHECK: spaces preferred around that '+' (ctx:VxV) 89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431: + rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, ; ^ len-_FIXED_IE_LENGTH_, NULL, &wps_ielen) CHECK: spaces preferred around that '-' (ctx:VxV) 89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431: + rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_, ^ NULL, &wps_ielen); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/35c6c5efa2661c6fd9d40c3a681eb8470c5015e6.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit edf3967a8d95bd276319d240e56aab14bf126b4d Author: Fabio Aiuto Date: Sat Apr 10 16:20:17 2021 +0200 staging: rtl8723bs: remove all if-blocks left empty by DBG_8192C-remove coccinelle script remove all empty if blocks left empty by coccinelle script for DBG_8192C macro removal. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1676083964fe176e996c2c05dfdcb723b49febb6.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7519f4f89692e2a312a990580278e97bb1a91609 Author: Fabio Aiuto Date: Sat Apr 10 16:20:16 2021 +0200 staging: rtl8723bs: remove DBG_8192C macro definitions remove all DBG_8192C macro definitions. Macro DBG_8192C belongs to a family of verbose private tracing macros. The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand. So just remove it Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e7259eeb5927d48a2920548b92dc507befa5e6af.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 334ef6ab8f44dd01bbf8f11467a59643be237d13 Author: Fabio Aiuto Date: Sat Apr 10 16:20:15 2021 +0200 staging: rtl8723bs: remove all commented out DBG_8192C logs remove all commented out DBG_8192C logs. Macro DBG_8192C belongs to a family of verbose private tracing macros. The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand. So just remove it Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/d954fbde0ae689cd053a57f57f954f14b5d013cb.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit dcc48e0837493db429cc22511c11e62912ee930d Author: Fabio Aiuto Date: Sat Apr 10 16:20:14 2021 +0200 staging: rtl8723bs: remove all DBG_8192C logs remove all DBG_8192C logs. Macro DBG_8192C belongs to a family of verbose private tracing macros. The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand. So just remove it with the following semantic patch: @@ expression a, b, c, d, e, f, g, h, i, j, k; constant B, C, D, E; @@ ( - DBG_8192C(a); | - DBG_8192C(a, b); | - DBG_8192C(a, B); | - DBG_8192C(a, b, c); | - DBG_8192C(a, B, c); | - DBG_8192C(a, b, C); | - DBG_8192C(a, B, C); | - DBG_8192C(a, b, c, d); | - DBG_8192C(a, B, c, d); | - DBG_8192C(a, b, C, d); | - DBG_8192C(a, b, c, D); | - DBG_8192C(a, B, C, d); | - DBG_8192C(a, B, c, D); | - DBG_8192C(a, b, C, D); | - DBG_8192C(a, B, C, D); | - DBG_8192C(a, b, c, d, e); | - DBG_8192C(a, B, c, d, e); | - DBG_8192C(a, b, C, d, e); | - DBG_8192C(a, b, c, D, e); | - DBG_8192C(a, b, c, d, E); | - DBG_8192C(a, B, C, d, e); | - DBG_8192C(a, B, c, D, e); | - DBG_8192C(a, B, c, d, E); | - DBG_8192C(a, b, C, D, e); | - DBG_8192C(a, b, C, d, E); | - DBG_8192C(a, b, c, D, E); | - DBG_8192C(a, B, C, D, e); | - DBG_8192C(a, B, C, d, E); | - DBG_8192C(a, B, c, D, E); | - DBG_8192C(a, b, C, D, E); | - DBG_8192C(a, B, C, D, E); | - DBG_8192C(a, b, c, d, e, f); | - DBG_8192C(a, b, c, d, e, f, g); | - DBG_8192C(a, b, c, d, e, f, g, h); | - DBG_8192C(a, b, c, d, e, f, g, h, i); | - DBG_8192C(a, b, c, d, e, f, g, h, i, j); | - DBG_8192C(a, b, c, d, e, f, g, h, i, j, k); ) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9b338b3781e40c04104f26832add075e7f72d890.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 426ceac43197bee3b1466d6f52527d5394638352 Author: Ilya Lipnitskiy Date: Sat Apr 10 10:33:31 2021 -0700 staging: mt7621-pci: stop using of_pci_range_to_resource The logic here was already overriding the erroneous IO addresses returned from of_pci_range_to_resource, which is the bulk of the logic. So stop using it altogether and initialize the fields explicitly, as done in aeba3731b150 ("powerpc/pci: Fix IO space breakage after of_pci_range_to_resource() change"). Cc: Sergio Paracuellos Reviewed-by: Sergio Paracuellos Signed-off-by: Ilya Lipnitskiy Link: https://lore.kernel.org/r/20210410173331.57949-1-ilya.lipnitskiy@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4e63e9b77449371fc42c8b0763502f6a6e6b6951 Author: Fabio M. De Francesco Date: Sat Apr 10 17:00:06 2021 +0200 staging: rtl8723bs: core: Remove an unused variable Delete local variable "u8 sec_idx" because is declared and set, but never used. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210410150008.5460-4-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 26be3a5d845312bae0397b1008e766340945cb53 Author: Mitali Borkar Date: Sat Apr 10 20:26:40 2021 +0530 staging: rtl8192e: Fix incorrect pointer check In commit 92172da23c56 ("staging: rtl8192e: replace comparison to NULL by bool") a check was changed from looking at the data to the pointer, which was incorrect, so revert that portion of the commit to have the proper logic restored. Reported-by: Julia Lawall Signed-off-by: Mitali Borkar Fixes: 92172da23c56 ("staging: rtl8192e: replace comparison to NULL by bool") Link: https://lore.kernel.org/r/YHG8qARLUX2KPWwI@kali Signed-off-by: Greg Kroah-Hartman commit 09aab7add7bf9a7368da94fd09529847255f5fd9 Author: Chris Packham Date: Mon Mar 29 14:52:05 2021 +1300 i2c: mpc: use device managed APIs Use device managed functions an clean up error handling. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit bc72675228c781996d7f62849e84dd23145479d5 Author: Chris Packham Date: Mon Mar 29 14:52:04 2021 +1300 i2c: mpc: make interrupt mandatory and remove polling code All the in-tree dts files that use one of the compatible strings from i2c-mpc.c provide an interrupt property. By making this mandatory we can simplify the code. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 65171b2df15eb7545431d75c2729b5062da89b43 Author: Chris Packham Date: Mon Mar 29 14:52:03 2021 +1300 i2c: mpc: Make use of i2c_recover_bus() Move the existing calls of mpc_i2c_fixup() to a recovery function registered via bus_recovery_info. This makes it more obvious that recovery is supported and allows for a future where recovery is triggered by the i2c core. Signed-off-by: Chris Packham Signed-off-by: Wolfram Sang commit 81acb4015a96cb9646765e8a022681934817fa7a Author: Chris Packham Date: Mon Mar 29 14:52:02 2021 +1300 dt-bindings: i2c: convert i2c-mpc to json-schema Convert i2c-mpc to YAML. Signed-off-by: Chris Packham Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit a888f9b95a448017d9c6b1dc58e6dc57f02505de Author: Chris Packham Date: Mon Mar 29 14:52:01 2021 +1300 dt-bindings: i2c-mpc: Document interrupt property as required All of the in-tree device-trees that use the one of the compatible strings from i2c-mpc.c supply an interrupts property. Make this property mandatory to aid refactoring the driver. Signed-off-by: Chris Packham Reviewed-by: Rob Herring Signed-off-by: Wolfram Sang commit 5b5475826c5265cead7ce4ca6d34ec0c566c70aa Author: Dmitry Torokhov Date: Sun Mar 21 18:38:32 2021 -0700 i2c: ensure timely release of driver-allocated resources More and more drivers rely on devres to manage their resources, however if bus' probe() and release() methods are not trivial and control some of resources as well (for example enable or disable clocks, or attach device to a power domain), we need to make sure that driver-allocated resources are released immediately after driver's remove() method returns, and not postponed until driver core gets around to releasing resources. To fix that we open a new devres group before calling driver's probe() and explicitly release it when we return from driver's remove(). Tested-by: Jeff LaBundy Signed-off-by: Dmitry Torokhov Signed-off-by: Wolfram Sang commit 71aee62783e9dc16472acf7657ce16318613ad2f Author: Andy Shevchenko Date: Thu Apr 8 19:17:21 2021 +0800 i2c: designware: Switch over to i2c_freq_mode_string() Use generic i2c_freq_mode_string() helper to print chosen bus speed. Acked-by: Jarkko Nikula Signed-off-by: Andy Shevchenko Signed-off-by: Yicong Yang Signed-off-by: Wolfram Sang commit d62fbdb99a85730af408399bfae9fa2aa708c6f1 Author: Yicong Yang Date: Thu Apr 8 19:17:19 2021 +0800 i2c: add support for HiSilicon I2C controller Add HiSilicon I2C controller driver for the Kunpeng SoC. It provides the access to the i2c busses, which connects to the eeprom, rtc, etc. The driver works with IRQ mode, and supports basic I2C features and 10bit address. The DMA is not supported. Reviewed-by: Andy Shevchenko Reviewed-by: Dmitry Osipenko Signed-off-by: Yicong Yang Signed-off-by: Wolfram Sang commit 3b4c747cd32078172dd238929e38a43cfed83580 Author: Yicong Yang Date: Thu Apr 8 19:17:18 2021 +0800 i2c: core: add api to provide frequency mode strings Some I2C drivers like Designware and HiSilicon will print the bus frequency mode information, so add a public one that everyone can make use of. Tested-by: Jarkko Nikula Reviewed-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Signed-off-by: Yicong Yang Signed-off-by: Wolfram Sang commit 07740c92ae57ca21204f1e0c6f59272cdf3190cc Author: Yicong Yang Date: Thu Apr 8 19:17:17 2021 +0800 i2c: core: add managed function for adding i2c adapters Some I2C controller drivers will only unregister the I2C adapter in their .remove() callback, which can be done by simply using a managed variant to add the I2C adapter. So add the managed functions for adding the I2C adapter. Reviewed-by: Andy Shevchenko Reviewed-by: Dmitry Osipenko Signed-off-by: Yicong Yang Signed-off-by: Wolfram Sang commit 2375843b50d6139b82648499daaad2034576905b Merge: 660f58b6d2904 4b2b4cc50ba6d Author: Wolfram Sang Date: Sat Apr 10 21:48:34 2021 +0200 Merge branch 'i2c/software-nodes' into i2c/for-5.13 commit 4b2b4cc50ba6d607d1611ea6b2046a58d16e45eb Author: Heikki Krogerus Date: Mon Mar 29 13:50:47 2021 +0300 i2c: Remove support for dangling device properties From now on only accepting complete software nodes. Signed-off-by: Heikki Krogerus Signed-off-by: Wolfram Sang commit 9d383e96448dbfdd97a37e618f6af5a17a60ce0d Author: Heikki Krogerus Date: Mon Mar 29 13:50:46 2021 +0300 Input: elantech - Prepare a complete software node for the device Creating a software node and supplying that for the device instead of only the device properties in it. A software node was always created in any case to hold the additional device properties, so this change does not have any real effect. This change makes it possible to remove support for the problematic "dangling" device properties from i2c subsystem, i.e. the "properties" member from struct i2c_board_info. The problems caused by them are not related to this driver. Signed-off-by: Heikki Krogerus Acked-by: Dmitry Torokhov Signed-off-by: Wolfram Sang commit 2c02f659851a962a57fc663e9aa33fe57606086a Author: Heikki Krogerus Date: Mon Mar 29 13:50:45 2021 +0300 platform/chrome: chromeos_laptop - Prepare complete software nodes The older device property API is going to be removed soon and that will affect also I2C subystem. Supplying complete software nodes instead of only the properties in them for the I2C devices. Signed-off-by: Heikki Krogerus Acked-by: Enric Balletbo i Serra Signed-off-by: Wolfram Sang commit dd7a37102b79ae55184d8dea641774254cf8b1ac Author: Heikki Krogerus Date: Mon Mar 29 13:50:44 2021 +0300 i2c: icy: Constify the software node Complete software node can now be supplied to the device with struct i2c_board_info. Signed-off-by: Heikki Krogerus Reviewed-by: Max Staudt Signed-off-by: Wolfram Sang commit 239798f5fb5e87b7ed253df5c5de893aad57fc6b Author: Heikki Krogerus Date: Mon Mar 29 13:50:43 2021 +0300 i2c: nvidia-gpu: Constify the software node Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus Signed-off-by: Wolfram Sang commit f9c3d2734343c934f2e7270c0d47a4c88e10b847 Author: Heikki Krogerus Date: Mon Mar 29 13:50:42 2021 +0300 i2c: cht-wc: Constify the software node Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus Reviewed-by: Hans de Goede Signed-off-by: Wolfram Sang commit 3a3438e594bf8b2d8fcfd11f3aa2a93e215b92b7 Author: Heikki Krogerus Date: Mon Mar 29 13:50:41 2021 +0300 platform/x86: intel_cht_int33fe_microb: Constify the software node Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus Reviewed-by: Hans de Goede Signed-off-by: Wolfram Sang commit dc317fb81b57ba36cd7e15c8bd98c3d6be013f5f Author: Heikki Krogerus Date: Mon Mar 29 13:50:40 2021 +0300 ARM: s3c: mini2440: Constify the software node Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus Acked-by: Krzysztof Kozlowski Signed-off-by: Wolfram Sang commit 4335168600ef7f4aae9d70c7785d5dcdf09c0f52 Author: Heikki Krogerus Date: Mon Mar 29 13:50:39 2021 +0300 ARM: pxa: stargate2: Constify the software node Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus Acked-by: Robert Jarzmik Signed-off-by: Wolfram Sang commit 5f029c045c948b6cb8ccfda614e73240c4a8363b Author: Yi Zhuang Date: Tue Apr 6 09:47:35 2021 +0800 f2fs: clean up build warnings This patch combined the below three clean-up patches. - modify open brace '{' following function definitions - ERROR: spaces required around that ':' - ERROR: spaces required before the open parenthesis '(' - ERROR: spaces prohibited before that ',' - Made suggested modifications from checkpatch in reference to WARNING: Missing a blank line after declarations Signed-off-by: Yi Zhuang Signed-off-by: Jia Yang Signed-off-by: Jack Qiu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 0d6c8e1e246586b81cb4e6ab1a93a6d4a08a0cf9 Author: Aditya Srivastava Date: Wed Mar 31 03:00:22 2021 +0530 x86/platform/intel/quark: Fix incorrect kernel-doc comment syntax in files The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are certain files in arch/x86/platform/intel-quark, which follow this syntax, but the content inside does not comply with kernel-doc. Such lines were probably not meant for kernel-doc parsing, but are parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc. E.g., presence of kernel-doc like comment in the header lines for arch/x86/platform/intel-quark/imr.c causes these warnings: "warning: Function parameter or member 'fmt' not described in 'pr_fmt'" "warning: expecting prototype for c(). Prototype was for pr_fmt() instead" Similarly for arch/x86/platform/intel-quark/imr_selftest.c too. Provide a simple fix by replacing these occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Signed-off-by: Thomas Gleixner Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210330213022.28769-1-yashsri421@gmail.com commit 7c07012eb1be8b4a95d3502fd30795849007a40e Author: Nicholas Piggin Date: Fri Apr 2 23:20:37 2021 +1000 genirq: Reduce irqdebug cacheline bouncing note_interrupt() increments desc->irq_count for each interrupt even for percpu interrupt handlers, even when they are handled successfully. This causes cacheline bouncing and limits scalability. Instead of incrementing irq_count every time, only start incrementing it after seeing an unhandled irq, which should avoid the cache line bouncing in the common path. This actually should give better consistency in handling misbehaving irqs too, because instead of the first unhandled irq arriving at an arbitrary point in the irq_count cycle, its arrival will begin the irq_count cycle. Cédric reports the result of his IPI throughput test: Millions of IPIs/s ----------- -------------------------------------- upstream upstream patched chips cpus default noirqdebug default (irqdebug) ----------- ----------------------------------------- 1 0-15 4.061 4.153 4.084 0-31 7.937 8.186 8.158 0-47 11.018 11.392 11.233 0-63 11.460 13.907 14.022 2 0-79 8.376 18.105 18.084 0-95 7.338 22.101 22.266 0-111 6.716 25.306 25.473 0-127 6.223 27.814 28.029 Signed-off-by: Nicholas Piggin Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210402132037.574661-1-npiggin@gmail.com commit c5e3a41187ac01425f5ad1abce927905e4ac44e4 Author: Tetsuo Handa Date: Thu Apr 1 14:58:23 2021 +0900 kernel: Initialize cpumask before parsing KMSAN complains that new_value at cpumask_parse_user() from write_irq_affinity() from irq_affinity_proc_write() is uninitialized. [ 148.133411][ T5509] ===================================================== [ 148.135383][ T5509] BUG: KMSAN: uninit-value in find_next_bit+0x325/0x340 [ 148.137819][ T5509] [ 148.138448][ T5509] Local variable ----new_value.i@irq_affinity_proc_write created at: [ 148.140768][ T5509] irq_affinity_proc_write+0xc3/0x3d0 [ 148.142298][ T5509] irq_affinity_proc_write+0xc3/0x3d0 [ 148.143823][ T5509] ===================================================== Since bitmap_parse() from cpumask_parse_user() calls find_next_bit(), any alloc_cpumask_var() + cpumask_parse_user() sequence has possibility that find_next_bit() accesses uninitialized cpu mask variable. Fix this problem by replacing alloc_cpumask_var() with zalloc_cpumask_var(). Signed-off-by: Tetsuo Handa Signed-off-by: Thomas Gleixner Acked-by: Steven Rostedt (VMware) Link: https://lore.kernel.org/r/20210401055823.3929-1-penguin-kernel@I-love.SAKURA.ne.jp commit 99cb64de36d5c9397a664808b92943e35bdce25e Author: Andrew Cooper Date: Fri Apr 9 13:10:27 2021 +0100 x86/cpu: Comment Skylake server stepping too Further to 53375a5a218e ("x86/cpu: Resort and comment Intel models"), CascadeLake and CooperLake are steppings of Skylake, and make up the 1st to 3rd generation "Xeon Scalable Processor" line. Signed-off-by: Andrew Cooper Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210409121027.16437-1-andrew.cooper3@citrix.com commit 19ab233989d0f7ab1de19a036e247afa4a0a1e9c Author: Phillip Potter Date: Wed Mar 31 23:07:19 2021 +0100 fbdev: zero-fill colormap in fbcmap.c Use kzalloc() rather than kmalloc() for the dynamically allocated parts of the colormap in fb_alloc_cmap_gfp, to prevent a leak of random kernel data to userspace under certain circumstances. Fixes a KMSAN-found infoleak bug reported by syzbot at: https://syzkaller.appspot.com/bug?id=741578659feabd108ad9e06696f0c1f2e69c4b6e Reported-by: syzbot+47fa9c9c648b765305b9@syzkaller.appspotmail.com Cc: stable Reviewed-by: Geert Uytterhoeven Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210331220719.1499743-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 4ce535ec0084f0d712317cb99d383cad3288e713 Author: Dan Carpenter Date: Fri Apr 9 14:01:57 2021 +0300 node: fix device cleanups in error handling code We can't use kfree() to free device managed resources so the kfree(dev) is against the rules. It's easier to write this code if we open code the device_register() as a device_initialize() and device_add(). That way if dev_set_name() set name fails we can call put_device() and it will clean up correctly. Fixes: acc02a109b04 ("node: Add memory-side caching attributes") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YHA0JUra+F64+NpB@mwanda Signed-off-by: Greg Kroah-Hartman commit b4104180a2efb85f55e1ba1407885c9421970338 Author: Greg Kroah-Hartman Date: Mon Apr 5 11:48:52 2021 +0200 kobject_uevent: remove warning in init_uevent_argv() syzbot can trigger the WARN() in init_uevent_argv() which isn't the nicest as the code does properly recover and handle the error. So change the WARN() call to pr_warn() and provide some more information on what the buffer size that was needed. Link: https://lore.kernel.org/r/20201107082206.GA19079@kroah.com Cc: "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org Reported-by: syzbot+92340f7b2b4789907fdb@syzkaller.appspotmail.com Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210405094852.1348499-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 2954a6f12f250890ec2433cec03ba92784d613e8 Author: He Ying Date: Tue Apr 6 05:42:00 2021 -0400 firmware: qcom-scm: Fix QCOM_SCM configuration When CONFIG_QCOM_SCM is y and CONFIG_HAVE_ARM_SMCCC is not set, compiling errors are encountered as follows: drivers/firmware/qcom_scm-smc.o: In function `__scm_smc_do_quirk': qcom_scm-smc.c:(.text+0x36): undefined reference to `__arm_smccc_smc' drivers/firmware/qcom_scm-legacy.o: In function `scm_legacy_call': qcom_scm-legacy.c:(.text+0xe2): undefined reference to `__arm_smccc_smc' drivers/firmware/qcom_scm-legacy.o: In function `scm_legacy_call_atomic': qcom_scm-legacy.c:(.text+0x1f0): undefined reference to `__arm_smccc_smc' Note that __arm_smccc_smc is defined when HAVE_ARM_SMCCC is y. So add dependency on HAVE_ARM_SMCCC in QCOM_SCM configuration. Fixes: 916f743da354 ("firmware: qcom: scm: Move the scm driver to drivers/firmware") Reported-by: Hulk Robot Signed-off-by: He Ying Link: https://lore.kernel.org/r/20210406094200.60952-1-heying24@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0d5cf954656387a595a8d5bb7e376f31829aae4d Author: Yang Yingliang Date: Tue Apr 6 11:44:34 2021 +0800 speakup: i18n: Switch to kmemdup_nul() in spk_msg_set() Use kmemdup_nul() helper instead of open-coding to simplify the code in spk_msg_set(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210406034434.442251-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 6c00365d531163a44ce57d862883db9424bd19ab Author: Chen Huang Date: Thu Apr 8 13:09:54 2021 +0000 w1: ds28e17: Use module_w1_family to simplify the code module_w1_family() makes the code simpler by eliminating boilerplate code. Signed-off-by: Chen Huang Link: https://lore.kernel.org/r/20210408130954.1158963-2-chenhuang5@huawei.com Signed-off-by: Greg Kroah-Hartman commit 88adcd66108eae9d96aac7e38686a77fcb4cde24 Author: Chen Huang Date: Thu Apr 8 13:09:53 2021 +0000 w1: ds2805: Use module_w1_family to simplify the code module_w1_family() makes the code simpler by eliminating boilerplate code. Signed-off-by: Chen Huang Link: https://lore.kernel.org/r/20210408130954.1158963-1-chenhuang5@huawei.com Signed-off-by: Greg Kroah-Hartman commit a7dc1e6f99df59799ab0128d9c4e47bbeceb934d Author: Hang Lu Date: Fri Apr 9 17:40:46 2021 +0800 binder: tell userspace to dump current backtrace when detected oneway spamming When async binder buffer got exhausted, some normal oneway transactions will also be discarded and may cause system or application failures. By that time, the binder debug information we dump may not be relevant to the root cause. And this issue is difficult to debug if without the backtrace of the thread sending spam. This change will send BR_ONEWAY_SPAM_SUSPECT to userspace when oneway spamming is detected, request to dump current backtrace. Oneway spamming will be reported only once when exceeding the threshold (target process dips below 80% of its oneway space, and current process is responsible for either more than 50 transactions, or more than 50% of the oneway space). And the detection will restart when the async buffer has returned to a healthy state. Acked-by: Todd Kjos Signed-off-by: Hang Lu Link: https://lore.kernel.org/r/1617961246-4502-3-git-send-email-hangl@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 005169157448ca41eff8716d79dc1b8f158229d2 Author: Hang Lu Date: Fri Apr 9 17:40:45 2021 +0800 binder: fix the missing BR_FROZEN_REPLY in binder_return_strings Add BR_FROZEN_REPLY in binder_return_strings to support stat function. Fixes: ae28c1be1e54 ("binder: BINDER_GET_FROZEN_INFO ioctl") Acked-by: Todd Kjos Signed-off-by: Hang Lu Link: https://lore.kernel.org/r/1617961246-4502-2-git-send-email-hangl@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 3db53374405fbf7a474086ed984189f65b6f0008 Author: Serge Semin Date: Fri Apr 9 14:30:27 2021 +0300 usb: dwc3: qcom: Detect DWC3 DT-nodes using compatible string In accordance with the USB HCD/DRD schema all the USB controllers are supposed to have DT-nodes named with prefix "^usb(@.*)?". Since the existing DT-nodes will be renamed in a subsequent patch let's fix the DWC3 Qcom-specific code to detect the DWC3 sub-node just by checking its compatible string to match the "snps,dwc3". The semantic of the code won't change seeing all the DWC USB3 nodes are supposed to have the compatible property with any of those strings set. Signed-off-by: Serge Semin Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210409113029.7144-7-Sergey.Semin@baikalelectronics.ru Signed-off-by: Greg Kroah-Hartman commit dc1e7e9a27e05260c45e142d28fb56ae63f94966 Author: Bixuan Cui Date: Sat Apr 10 10:48:18 2021 +0800 usb: dwc3: qcom: Remove redundant dev_err call in dwc3_qcom_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Link: https://lore.kernel.org/r/20210410024818.65659-1-cuibixuan@huawei.com Signed-off-by: Greg Kroah-Hartman commit 90d28fb53d4a51299ff324dede015d5cb11b88a2 Author: Chunfeng Yun Date: Sat Apr 10 09:20:45 2021 +0800 usb: core: reduce power-on-good delay time of root hub Return the exactly delay time given by root hub descriptor, this helps to reduce resume time etc. Due to the root hub descriptor is usually provided by the host controller driver, if there is compatibility for a root hub, we can fix it easily without affect other root hub Acked-by: Alan Stern Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1618017645-12259-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 26b75952ca0b8b4b3050adb9582c8e2f44d49687 Author: Longfang Liu Date: Fri Apr 9 16:48:01 2021 +0800 USB:ehci:fix Kunpeng920 ehci hardware problem Kunpeng920's EHCI controller does not have SBRN register. Reading the SBRN register when the controller driver is initialized will get 0. When rebooting the EHCI driver, ehci_shutdown() will be called. if the sbrn flag is 0, ehci_shutdown() will return directly. The sbrn flag being 0 will cause the EHCI interrupt signal to not be turned off after reboot. this interrupt that is not closed will cause an exception to the device sharing the interrupt. Therefore, the EHCI controller of Kunpeng920 needs to skip the read operation of the SBRN register. Acked-by: Alan Stern Signed-off-by: Longfang Liu Link: https://lore.kernel.org/r/1617958081-17999-1-git-send-email-liulongfang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 63bbdb4ea02b17f929fa4f5c536357183eba9639 Author: Yu Kuai Date: Wed Apr 7 20:58:26 2021 +0800 tty: hvc: make symbol 'hvc_udbg_dev' static The sparse tool complains as follows: drivers/tty/hvc/hvc_udbg.c:20:19: warning: symbol 'hvc_udbg_dev' was not declared. Should it be static? This symbol is not used outside of hvc_udbg.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Yu Kuai Link: https://lore.kernel.org/r/20210407125826.4139130-1-yukuai3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 86b20677e8b657c8c9701edd907f356795e9e427 Author: Johan Hovold Date: Fri Apr 9 09:35:12 2021 +0200 tty: clarify that not all ttys have a class device Commit 30004ac9c090 ("tty: add tty_struct->dev pointer to corresponding device instance") added a struct device pointer field to struct tty_struct which was populated with the corresponding tty class device during initialisation. Unfortunately, not all ttys have a class device (e.g. pseudoterminals and serdev) in which case the device pointer will be set to NULL, something which have bit driver authors over the years. In retrospect perhaps this field should never have been added, but let's at least document the current behaviour. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210409073512.6876-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 9e5313acadfc0a28a227ff72b5c300b26925ff86 Author: Bixuan Cui Date: Sat Apr 10 11:50:48 2021 +0800 serial: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Link: https://lore.kernel.org/r/20210410035048.11466-1-cuibixuan@huawei.com Signed-off-by: Greg Kroah-Hartman commit e7d1737c2a16b671828847ad364cbf7c1117944a Author: Krzysztof Kozlowski Date: Fri Apr 9 19:20:27 2021 +0200 dt-bindings: serial: samsung: include generic dtschema to match bluetooth child Include the generic serial.yaml dtschema so the child node like "bluetooth" will be properly matched: arch/arm/boot/dts/exynos4210-universal_c210.dt.yaml: serial@13800000: 'bluetooth' does not match any of the regexes: 'pinctrl-[0-9]+' Reviewed-by: Rob Herring Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210409172027.11296-1-krzysztof.kozlowski@canonical.com Signed-off-by: Greg Kroah-Hartman commit 79c5966cec7b148199386ef9933c31b999379065 Author: Johan Hovold Date: Wed Apr 7 11:52:08 2021 +0200 serial: core: return early on unsupported ioctls Drivers can return -ENOIOCTLCMD when an ioctl is not recognised to tell the upper layers to continue looking for a handler. This is not the case for the RS485 and ISO7816 ioctls whose handlers should return -ENOTTY directly in case a serial driver does not implement the corresponding methods. Fixes: a5f276f10ff7 ("serial_core: Handle TIOC[GS]RS485 ioctls.") Fixes: ad8c0eaa0a41 ("tty/serial_core: add ISO7816 infrastructure") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407095208.31838-9-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8b57b3a123718c6fe95f83f3881b7d8eca623764 Author: Johan Hovold Date: Wed Apr 7 11:52:07 2021 +0200 serial: core: drop redundant TIOCGSERIAL memset Since commit 5099d234a52a ("serial_core: switch to ->[sg]et_serial()") the serial structure passed to uart_get_info() has already have been cleared by the tty layer so drop the redundant memset. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407095208.31838-8-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5a35b040d0567f9dce6e801e6e3b575b9c463028 Author: Johan Hovold Date: Wed Apr 7 11:52:06 2021 +0200 tty: add ASYNC_SPLIT_TERMIOS to deprecation mask Callout devices are long-gone, but the ASYNC_SPLIT_TERMIOS flag was never added to the deprecation mask. Add it so that a warning is printed if it is ever used. Fixes: 8a8ae62f8296 ("tty: warn on deprecated serial flags") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407095208.31838-7-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 885c77d528e14df86c1e146541c57f1c0ce0708e Author: Johan Hovold Date: Wed Apr 7 11:52:05 2021 +0200 tty: refactor TIOCSSERIAL handling Factor out the deprecated serial flags handling and tty-operation check shared with the compat TIOCSSERIAL handler. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407095208.31838-6-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1b7bc6b10a7eab0f5f9d7d8ee5a4b230a9dcb487 Author: Johan Hovold Date: Wed Apr 7 11:52:04 2021 +0200 tty: use pr_warn_ratelimited() for deprecated serial flags Use pr_warn_ratelimited() when warning about deprecated serial flags instead of open coding. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407095208.31838-5-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8871de06ff78e9333d86c87d7071452b690e7c9b Author: Johan Hovold Date: Wed Apr 7 11:52:03 2021 +0200 tty: fix return value for unsupported termiox ioctls Drivers should return -ENOTTY ("Inappropriate I/O control operation") when an ioctl isn't supported, while -EINVAL is used for invalid arguments. Support for termiox was added by commit 1d65b4a088de ("tty: Add termiox") in 2008 but no driver support ever followed and it was recently ripped out by commit e0efb3168d34 ("tty: Remove dead termiox code"). Fix the return value for the unsupported termiox ioctls, which have always returned -EINVAL, by explicitly returning -ENOTTY rather than removing them completely and falling back to the default unrecognised- ioctl handling. Fixes: 1d65b4a088de ("tty: Add termiox") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407095208.31838-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1b8b20868a6d64cfe8174a21b25b74367bdf0560 Author: Johan Hovold Date: Wed Apr 7 11:52:02 2021 +0200 tty: fix return value for unsupported ioctls Drivers should return -ENOTTY ("Inappropriate I/O control operation") when an ioctl isn't supported, while -EINVAL is used for invalid arguments. Fix up the TIOCMGET, TIOCMSET and TIOCGICOUNT helpers which returned -EINVAL when a tty driver did not implement the corresponding operations. Note that the TIOCMGET and TIOCMSET helpers predate git and do not get a corresponding Fixes tag below. Fixes: d281da7ff6f7 ("tty: Make tiocgicount a handler") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407095208.31838-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit d09845e98a05850a8094ea8fd6dd09a8e6824fff Author: Johan Hovold Date: Wed Apr 7 11:52:01 2021 +0200 tty: actually undefine superseded ASYNC flags Some kernel-internal ASYNC flags have been superseded by tty-port flags and should no longer be used by kernel drivers. Fix the misspelled "__KERNEL__" compile guards which failed their sole purpose to break out-of-tree drivers that have not yet been updated. Fixes: 5c0517fefc92 ("tty: core: Undefine ASYNC_* flags superceded by TTY_PORT* flags") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407095208.31838-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit b89585461834e317f447dcdb14bdb8d27af40ce4 Author: Xiaofei Tan Date: Wed Apr 7 15:06:50 2021 +0800 tty: tty_ldisc: Remove the repeated word 'the' Remove the repeated word 'the' following advice of checkpatch.pl Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-11-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 408795b0252fe3b060c3c62b630f5419db415adf Author: Xiaofei Tan Date: Wed Apr 7 15:06:49 2021 +0800 tty: tty_ldisc: Do not use assignment in if condition Do not use assignment in if condition following the advice of checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-10-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 72a8dcd7bb9163cbdaabbd50541e2ded2347835e Author: Xiaofei Tan Date: Wed Apr 7 15:06:48 2021 +0800 tty: tty_ldisc: Fix coding style issues of block comments Fix coding style issues of block comments, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-9-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit d72383591d36b6e8b7398d36b9cc1d39bfc75e68 Author: Xiaofei Tan Date: Wed Apr 7 15:06:47 2021 +0800 tty: tty_ldisc: Add a blank line after declarations Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-8-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 5d3945e84b801a1fe068e0e98a0ca38b84d7d0b5 Author: Xiaofei Tan Date: Wed Apr 7 15:06:46 2021 +0800 tty: tty_ldisc: Fix an issue of code indent should use tabs Fix an issue of code indent should use tabs, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-7-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 96d508259c188862b92db4142bfb235058636664 Author: Xiaofei Tan Date: Wed Apr 7 15:06:45 2021 +0800 tty: tty_jobctrl: Remove spaces before tabs Remove spaces before tabs following the advice of checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-6-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 63eeafd43951fd3f07c5b83366e3eaac810ca72b Author: Xiaofei Tan Date: Wed Apr 7 15:06:44 2021 +0800 tty: tty_jobctrl: Fix coding style issues of block comments Fix coding style issues of block comments, reported by checkpatch.pl. Besides, do some expression optimization for the sentenses. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-5-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit d4e1d903a31e6551fff224628c65e4c923799ba6 Author: Xiaofei Tan Date: Wed Apr 7 15:06:43 2021 +0800 tty: tty_jobctrl: Add a blank line after declarations Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-4-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 149ad2c67b39b7200d330d13556394332440c88c Author: Xiaofei Tan Date: Wed Apr 7 15:06:42 2021 +0800 tty/sysrq: Fix issues of code indent should use tabs Fix issues of code indent should use tabs, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-3-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2c4a4cded5ea68212244a74fb9f721665a12006c Author: Xiaofei Tan Date: Wed Apr 7 15:06:41 2021 +0800 tty/sysrq: Add a blank line after declarations Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617779210-51576-2-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 32abcac8037da5dc570c22abf266cbb92eee9fc9 Author: Qiheng Lin Date: Sat Apr 10 14:49:32 2021 +0800 staging: comedi: tests: ni_routes_test: Remove unused variable 'olddevroutes' GCC reports the following warning with W=1: drivers/staging/comedi/drivers/tests/ni_routes_test.c:215:45: warning: variable 'olddevroutes' set but not used [-Wunused-but-set-variable] 215 | const struct ni_device_routes *devroutes, *olddevroutes; | ^~~~~~~~~~~~ This variable is not used in function , this commit remove it to fix the warning. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Link: https://lore.kernel.org/r/20210410064932.12905-1-linqiheng@huawei.com Signed-off-by: Greg Kroah-Hartman commit 3eea531bcc24aee8f93b206adfde605fdd6f3d44 Author: Bixuan Cui Date: Sat Apr 10 11:50:37 2021 +0800 staging: ralink-gdma: Add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Link: https://lore.kernel.org/r/20210410035037.11322-1-cuibixuan@huawei.com Signed-off-by: Greg Kroah-Hartman commit 08aa09135c969b4a512f00bb0551acd1b7143a1c Author: Mitali Borkar Date: Sat Apr 10 05:42:10 2021 +0530 staging: rtl8192e: remove unnecesasry f-trace like logging Fixed Check: Remove unnecessary f-trace like logging by simply deleting that statement as we have other modes of logging like ftrace. Reported by checkpatch. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/YHDtWizzh5EVLL4/@kali Signed-off-by: Greg Kroah-Hartman commit 92172da23c56faefca9a8790d441010bfa74bb20 Author: Mitali Borkar Date: Sat Apr 10 05:16:34 2021 +0530 staging: rtl8192e: replace comparison to NULL by bool Fixed Comparison to NULL can be written as '!...' by replacing it with simpler form i.e boolean expression. This makes code more readable alternative. Reported by checkpatch. Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/YHDnWpWztxeZospi@kali Signed-off-by: Greg Kroah-Hartman commit 98a847ae5d5d3eab47983898363b34def5b3318d Author: Bryan Brattlof Date: Fri Apr 9 20:13:08 2021 +0000 staging: rtl8723bs: remove redundant initialization The variable ret is being initialized as 0 and is never used until it's updated by sdio_register_driver() This removes the redundant initialization of ret Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20210409201235.407671-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit dadf1fd8807e61b1b1744836c96f48eb9ad56f5b Author: Linus Walleij Date: Sat Apr 10 00:34:58 2021 -0700 Input: cyttsp - flag the device properly This device is certainly a very simple touchscreen so we set INPUT_MT_DIRECT. Reviewed-by: Javier Martinez Canillas Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210408131153.3446138-9-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit ddfe7e1ce3d5ce5ae0b25d107ba9d26fe8a4923b Author: Linus Walleij Date: Sat Apr 10 00:33:46 2021 -0700 Input: cyttsp - set abs params for ABS_MT_TOUCH_MAJOR The driver is certainly reporting pressure in cyttsp_report_tchdata() with input_report_abs(input, ABS_MT_TOUCH_MAJOR, tch->z); so we should also advertise this capability. Reviewed-by: Javier Martinez Canillas Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210408131153.3446138-8-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 0bffa508d1365794b7688b9a2d1ad5af63434b58 Author: Linus Walleij Date: Sat Apr 10 00:32:46 2021 -0700 Input: cyttsp - drop the phys path When I test to use the CY8CTMA340 with PostmarketOS I don't have any problem whatsoever in dropping this phys path, it finds and uses the touchscreen just as well. I suppose it is because userspace is using modern input libraries. I challenge the maintainers to point out a valid and still used userspace that actually need this. I say we drop it. Reviewed-by: Javier Martinez Canillas Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210408131153.3446138-7-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit c61ac36fd52cb3015acd93af5da01f8f8350051f Author: Linus Walleij Date: Sat Apr 10 00:31:52 2021 -0700 Input: cyttsp - reduce reset pulse timings The data sheet for CY8CTMA340 specifies that the reset pulse shall be at least 1 ms. Specify 1-2 ms with usleep_range() to cut some slack for the scheduler. Curiously the datasheet does not specify how long we have to wait after a hard reset until the chip is up, but I have found a vendor tree (Samsung GT-S7710) that has code for this touch screen and there this is set to 5 ms so I use this with the same 1 ms fuzz. Reviewed-by: Javier Martinez Canillas Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210408131153.3446138-6-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 39841136766651e487458d9ee1660fe86aa697f3 Author: Linus Walleij Date: Sat Apr 10 00:31:12 2021 -0700 Input: cyttsp - error message on boot mode exit error Provide a proper error message when attempting to exit boot loader mode and failing, which is something that happened to me. Reviewed-by: Javier Martinez Canillas Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210408131153.3446138-5-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 236798a1a95fa0c3f923d92d570ff656d2d8e8f5 Author: Jiapeng Chong Date: Fri Apr 9 23:28:32 2021 -0700 Input: apbps2 - remove useless variable Fix the following gcc warning: drivers/input/serio/apbps2.c:106:16: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1617958859-64707-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Dmitry Torokhov commit 618fad3d921a781fe500bdf8cbecbf2c4ec1f696 Author: Ranjani Sridharan Date: Fri Apr 9 14:46:16 2021 -0700 ALSA: HDA: Add access description in __snd_hda_add_vmaster Add description for access parameter in __snd_hda_add_vmaster() to prevent the compilation warning: warning: Function parameter or member 'access' not described in '__snd_hda_add_vmaster' Fixes: e65bf99718b5 ("ALSA: HDA - remove the custom implementation for the audio LED trigger") Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210409214616.1539685-1-ranjani.sridharan@linux.intel.com Signed-off-by: Takashi Iwai commit 53fefdd1d3a3403d8c44e28898d1031d8763b913 Author: Linus Walleij Date: Fri Apr 9 23:04:35 2021 -0700 Input: mms114 - support MMS136 The Melfas MMS136 is similar to the other MMS variants but has event packages of 6 bytes rather than 8 as the others. The define is named FINGER_EVENT_SZ in the vendor drivers so I renamed it from MMS*_PACKET_SZ to MMS*_EVENT_SZ. After this patch, the touchscreen on the Samsung GT-I8530 works fine with PostmarketOS. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210404232619.3092682-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit a811ecf8f1dbae02b7d54d6e2e33cc6bce1f1200 Author: Linus Walleij Date: Fri Apr 9 23:05:32 2021 -0700 Input: mms114 - convert bindings to YAML and extend This converts the Melfas MMS114 bindings and extend like this: - Require nodename touchscreen@ (this seems to be the case for all in-tree DTS files) - Add the mms134s and mms136 compatibles - Add the avdd and vdd power supplies - Define the I2C clock frequency property Signed-off-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210330201233.2360006-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 42370681bd46d2162093d40eb453695495483733 Author: Joe Hung Date: Fri Apr 9 15:24:31 2021 -0700 Input: Add support for ILITEK Lego Series Add support for ILITEK Lego series of touch devices. Lego series includes ILITEK 213X/23XX/25XX. Tested/passed with evaluation board with ILI2520/2322 IC. Signed-off-by: Joe Hung Link: https://lore.kernel.org/r/20210324122601.125873-2-joe_hung@ilitek.com Signed-off-by: Dmitry Torokhov commit 7c06272f0ed87f13f5ab1a81f18ad4a173da3556 Author: Joe Hung Date: Fri Apr 9 15:24:15 2021 -0700 dt-bindings: input: touchscreen: ilitek_ts_i2c: Add bindings Add binding documentation for ILITEK touch devices. Signed-off-by: Joe Hung Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324122601.125873-1-joe_hung@ilitek.com Signed-off-by: Dmitry Torokhov commit cbdb24e59e7fc1943bc72bab4a7b477d298a2d80 Author: Vincent Knecht Date: Fri Apr 9 13:29:03 2021 -0700 Input: add MStar MSG2638 touchscreen driver Add support for the msg2638 touchscreen IC from MStar. Firmware handling, wakeup gestures and other specialties are not supported. This driver reuses zinitix.c structure, while the checksum and irq handler functions are based on out-of-tree driver for Alcatel Idol 3 (4.7"). Signed-off-by: Vincent Knecht Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210305153815.126937-2-vincent.knecht@mailoo.org Signed-off-by: Dmitry Torokhov commit 2911ce35faf3df41eb09610cc5c55796fe69104b Author: Vincent Knecht Date: Fri Apr 9 13:16:49 2021 -0700 dt-bindings: input/touchscreen: add bindings for msg2638 This adds dts bindings for the mstar msg2638 touchscreen. Reviewed-by: Linus Walleij Signed-off-by: Vincent Knecht Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210305153815.126937-1-vincent.knecht@mailoo.org Signed-off-by: Dmitry Torokhov commit e479187748a8f151a85116a7091c599b121fdea5 Author: Hans de Goede Date: Fri Apr 9 22:29:49 2021 -0700 Input: silead - add workaround for x86 BIOS-es which bring the chip up in a stuck state Some buggy BIOS-es bring up the touchscreen-controller in a stuck state where it blocks the I2C bus. Specifically this happens on the Jumper EZpad 7 tablet model. After much poking at this problem I have found that the following steps are necessary to unstuck the chip / bus: 1. Turn off the Silead chip. 2. Try to do an I2C transfer with the chip, this will fail in response to which the I2C-bus-driver will call: i2c_recover_bus() which will unstuck the I2C-bus. Note the unstuck-ing of the I2C bus only works if we first drop the chip of the bus by turning it off. 3. Turn the chip back on. On the x86/ACPI systems were this problem is seen, step 1. and 3. require making ACPI calls and dealing with ACPI Power Resources. This commit adds a workaround which runtime-suspends the chip to turn it off, leaving it up to the ACPI subsystem to deal with all the ACPI specific details. There is no good way to detect this bug, so the workaround gets activated by a new "silead,stuck-controller-bug" boolean device-property. Since this is only used on x86/ACPI, this will be set by model specific device-props set by drivers/platform/x86/touchscreen_dmi.c. Therefor this new device-property is not documented in the DT-bindings. Dmesg will contain the following messages on systems where the workaround is activated: [ 54.309029] silead_ts i2c-MSSL1680:00: [Firmware Bug]: Stuck I2C bus: please ignore the next 'controller timed out' error [ 55.373593] i2c_designware 808622C1:04: controller timed out [ 55.582186] silead_ts i2c-MSSL1680:00: Silead chip ID: 0x80360000 Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210405202745.16777-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit 65299e8bfb24774e6340e93ae49f6626598917c8 Author: Hans de Goede Date: Fri Apr 9 22:29:07 2021 -0700 Input: elants_i2c - do not bind to i2c-hid compatible ACPI instantiated devices Several users have been reporting that elants_i2c gives several errors during probe and that their touchscreen does not work on their Lenovo AMD based laptops with a touchscreen with a ELAN0001 ACPI hardware-id: [ 0.550596] elants_i2c i2c-ELAN0001:00: i2c-ELAN0001:00 supply vcc33 not found, using dummy regulator [ 0.551836] elants_i2c i2c-ELAN0001:00: i2c-ELAN0001:00 supply vccio not found, using dummy regulator [ 0.560932] elants_i2c i2c-ELAN0001:00: elants_i2c_send failed (77 77 77 77): -121 [ 0.562427] elants_i2c i2c-ELAN0001:00: software reset failed: -121 [ 0.595925] elants_i2c i2c-ELAN0001:00: elants_i2c_send failed (77 77 77 77): -121 [ 0.597974] elants_i2c i2c-ELAN0001:00: software reset failed: -121 [ 0.621893] elants_i2c i2c-ELAN0001:00: elants_i2c_send failed (77 77 77 77): -121 [ 0.622504] elants_i2c i2c-ELAN0001:00: software reset failed: -121 [ 0.632650] elants_i2c i2c-ELAN0001:00: elants_i2c_send failed (4d 61 69 6e): -121 [ 0.634256] elants_i2c i2c-ELAN0001:00: boot failed: -121 [ 0.699212] elants_i2c i2c-ELAN0001:00: invalid 'hello' packet: 00 00 ff ff [ 1.630506] elants_i2c i2c-ELAN0001:00: Failed to read fw id: -121 [ 1.645508] elants_i2c i2c-ELAN0001:00: unknown packet 00 00 ff ff Despite these errors, the elants_i2c driver stays bound to the device (it returns 0 from its probe method despite the errors), blocking the i2c-hid driver from binding. Manually unbinding the elants_i2c driver and binding the i2c-hid driver makes the touchscreen work. Check if the ACPI-fwnode for the touchscreen contains one of the i2c-hid compatiblity-id strings and if it has the I2C-HID spec's DSM to get the HID descriptor address, If it has both then make elants_i2c not bind, so that the i2c-hid driver can bind. This assumes that non of the (older) elan touchscreens which actually need the elants_i2c driver falsely advertise an i2c-hid compatiblity-id + DSM in their ACPI-fwnodes. If some of them actually do have this false advertising, then this change may lead to regressions. While at it also drop the unnecessary DEVICE_NAME prefixing of the "I2C check functionality error", dev_err already outputs the driver-name. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207759 Acked-by: Benjamin Tissoires Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210405202756.16830-1-hdegoede@redhat.com Signed-off-by: Dmitry Torokhov commit cbd3125392846cf94bf14d32b95ef4ec78fc49e1 Merge: 8859a44ea0df9 602a1c76f8472 Author: Jakub Kicinski Date: Fri Apr 9 20:57:28 2021 -0700 Merge branch 'net-ipa-a-few-small-fixes' Alex Elder says: ==================== net: ipa: a few small fixes This series implements some minor bug fixes or improvements. The first patch removes an apparently unnecessary restriction, which results in an error on a 32-bit ARM build. The second makes a definition used for SDM845 match what is used in the downstream code. The third just ensures two netdev pointers are only non-null when valid. The fourth simplifies a little code, knowing that a called function never returns an error. The fifth and sixth just remove some empty/place holder functions. And the last patch fixes a comment, makes a function private, and removes an unnecessary double-negation of a Boolean variable. This patch produces a warning from checkpatch, indicating that a pair of parentheses is unnecessary. I agree with that advice, but it conflicts with a suggestion from the compiler. I left the "problem" in place to avoid the compiler warning. ==================== Link: https://lore.kernel.org/r/20210409180722.1176868-1-elder@linaro.org Signed-off-by: Jakub Kicinski commit 602a1c76f84720c56ad4f6a56a330954cab87d05 Author: Alex Elder Date: Fri Apr 9 13:07:22 2021 -0500 net: ipa: three small fixes Some time ago changes were made to stop referring to clearing the hardware pipeline as a "tag process." Fix a comment to use the newer terminology. Get rid of a pointless double-negation of the Boolean toward_ipa flag in ipa_endpoint_config(). make ipa_endpoint_exit_one() private; it's only referenced inside "ipa_endpoint.c". Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 57ab8ca42fa07fdbd02828a0b90de704605f70cd Author: Alex Elder Date: Fri Apr 9 13:07:21 2021 -0500 net: ipa: get rid of empty GSI functions There are place holder functions in the GSI code that do nothing. Remove these, knowing we can add something back in their place if they're really needed someday. Some of these are inverse functions (such as teardown to match setup). Explicitly comment that there is no inverse in these cases. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 74858b63c47cfbacafb26ea9701b26ffa18acd4a Author: Alex Elder Date: Fri Apr 9 13:07:20 2021 -0500 net: ipa: get rid of empty IPA functions There are place holder functions in the IPA code that do nothing. For the most part these are inverse functions, for example, once the routing or filter tables are set up there is no need to perform any matching teardown activity at shutdown, or in the case of an error. These can be safely removed, resulting in some code simplification. Add comments in these spots making it explicit that there is no inverse. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 077e770f2601e9786331c00aa6f8b02cfdbc7fd9 Author: Alex Elder Date: Fri Apr 9 13:07:19 2021 -0500 net: ipa: ipa_stop() does not return an error In ipa_modem_stop(), if the modem netdev pointer is non-null we call ipa_stop(). We check for an error and if one is returned we handle it. But ipa_stop() never returns an error, so this extra handling is unnecessary. Simplify the code in ipa_modem_stop() based on the knowledge no error handling is needed at this spot. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 57f63faf05625db10a49743287d3cbcb820d2afd Author: Alex Elder Date: Fri Apr 9 13:07:18 2021 -0500 net: ipa: only set endpoint netdev pointer when in use In ipa_modem_start(), we set endpoint netdev pointers before the network device is registered. If registration fails, we don't undo those assignments. Instead, wait to assign the netdev pointer until after registration succeeds. Set these endpoint netdev pointers to NULL in ipa_modem_stop() before unregistering the network device. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 49e76a418981293bcd8cb1e32df5b0e00e34d8ff Author: Alex Elder Date: Fri Apr 9 13:07:17 2021 -0500 net: ipa: update sequence type for modem TX endpoint On IPA v3.5.1, the sequencer type for the modem TX endpoint does not define the replication portion in the same way the downstream code does. This difference doesn't affect the behavior of the upstream code, but I'd prefer the two code bases use the same configuration value here. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 7ad3bd52cbcb7d263d320a9dca5cfe409734f62e Author: Alex Elder Date: Fri Apr 9 13:07:16 2021 -0500 net: ipa: relax pool entry size requirement I no longer know why a validation check ensured the size of an entry passed to gsi_trans_pool_init() was restricted to be a multiple of 8. For 32-bit builds, this condition doesn't always hold, and for DMA pools, the size is rounded up to a power of 2 anyway. Remove this restriction. Signed-off-by: Alex Elder Signed-off-by: Jakub Kicinski commit 8859a44ea0df92bccdc942ef15781ebbfe0ad9f3 Merge: 6c5e6b4ccc1bb 4e04e7513b0fa Author: Jakub Kicinski Date: Fri Apr 9 20:46:01 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Conflicts: MAINTAINERS - keep Chandrasekar drivers/net/ethernet/mellanox/mlx5/core/en_main.c - simple fix + trust the code re-added to param.c in -next is fine include/linux/bpf.h - trivial include/linux/ethtool.h - trivial, fix kdoc while at it include/linux/skmsg.h - move to relevant place in tcp.c, comment re-wrapped net/core/skmsg.c - add the sk = sk // sk = NULL around calls net/tipc/crypto.c - trivial Signed-off-by: Jakub Kicinski commit fcdf3c34b7abdcbb49690c94c7fa6ce224dc9749 Author: Arnd Bergmann Date: Fri Apr 9 22:12:05 2021 +0200 ext4: fix debug format string warning Using no_printk() for jbd_debug() revealed two warnings: fs/jbd2/recovery.c: In function 'fc_do_one_pass': fs/jbd2/recovery.c:256:30: error: format '%d' expects a matching 'int' argument [-Werror=format=] 256 | jbd_debug(3, "Processing fast commit blk with seq %d"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fs/ext4/fast_commit.c: In function 'ext4_fc_replay_add_range': fs/ext4/fast_commit.c:1732:30: error: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Werror=format=] 1732 | jbd_debug(1, "Converting from %d to %d %lld", The first one was added incorrectly, and was also missing a few newlines in debug output, and the second one happened when the type of an argument changed. Reported-by: kernel test robot Fixes: d556435156b7 ("jbd2: avoid -Wempty-body warnings") Fixes: 6db074618969 ("ext4: use BIT() macro for BH_** state bits") Fixes: 5b849b5f96b4 ("jbd2: fast commit recovery path") Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210409201211.1866633-1-arnd@kernel.org Signed-off-by: Theodore Ts'o commit 666245d9a436d9b98c975ca19d0a707d600d8666 Author: Jack Qiu Date: Fri Apr 9 12:20:35 2021 +0800 ext4: fix trailing whitespace Made suggested modifications from checkpatch in reference to ERROR: trailing whitespace Signed-off-by: Jack Qiu Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20210409042035.15516-1-jack.qiu@huawei.com Signed-off-by: Theodore Ts'o commit 3088e5a5153cda27ec26461e5edf2821e15e802c Author: Bhaskar Chowdhury Date: Sat Mar 27 16:00:05 2021 +0530 ext4: fix various seppling typos Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/cover.1616840203.git.unixbhaskar@gmail.com Signed-off-by: Theodore Ts'o commit e1262cd2e68a0870fb9fc95eb202d22e8f0074b7 Author: Xu Yihang Date: Thu Apr 8 15:00:33 2021 +0800 ext4: fix error return code in ext4_fc_perform_commit() In case of if not ext4_fc_add_tlv branch, an error return code is missing. Cc: stable@kernel.org Fixes: aa75f4d3daae ("ext4: main fast-commit commit path") Reported-by: Hulk Robot Signed-off-by: Xu Yihang Reviewed-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20210408070033.123047-1-xuyihang@huawei.com Signed-off-by: Theodore Ts'o commit 6c5e6b4ccc1bb9ac56579a9aed25d517d2318be6 Author: Claudiu Manoil Date: Fri Apr 9 10:16:13 2021 +0300 enetc: Use generic rule to map Tx rings to interrupt vectors Even if the current mapping is correct for the 1 CPU and 2 CPU cases (currently enetc is included in SoCs with up to 2 CPUs only), better use a generic rule for the mapping to cover all possible cases. The number of CPUs is the same as the number of interrupt vectors: Per device Tx rings - device_tx_ring[idx], where idx = 0..n_rings_total-1 Per interrupt vector Tx rings - int_vector[i].ring[j], where i = 0..n_int_vects-1 j = 0..n_rings_per_v-1 Mapping rule - n_rings_per_v = n_rings_total / n_int_vects for i = 0..n_int_vects - 1: for j = 0..n_rings_per_v - 1: idx = n_int_vects * j + i int_vector[i].ring[j] <- device_tx_ring[idx] Signed-off-by: Claudiu Manoil Tested-by: Vladimir Oltean Link: https://lore.kernel.org/r/20210409071613.28912-1-claudiu.manoil@nxp.com Signed-off-by: Jakub Kicinski commit 83fe6b18b8d04c6c849379005e1679bac9752466 Author: Jan Kara Date: Tue Apr 6 18:18:00 2021 +0200 ext4: annotate data race in jbd2_journal_dirty_metadata() Assertion checks in jbd2_journal_dirty_metadata() are known to be racy but we don't want to be grabbing locks just for them. We thus recheck them under b_state_lock only if it looks like they would fail. Annotate the checks with data_race(). Cc: stable@kernel.org Reported-by: Hao Sun Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20210406161804.20150-2-jack@suse.cz Signed-off-by: Theodore Ts'o commit 3b1833e92baba135923af4a07e73fe6e54be5a2f Author: Jan Kara Date: Tue Apr 6 18:17:59 2021 +0200 ext4: annotate data race in start_this_handle() Access to journal->j_running_transaction is not protected by appropriate lock and thus is racy. We are well aware of that and the code handles the race properly. Just add a comment and data_race() annotation. Cc: stable@kernel.org Reported-by: syzbot+30774a6acf6a2cf6d535@syzkaller.appspotmail.com Signed-off-by: Jan Kara Link: https://lore.kernel.org/r/20210406161804.20150-1-jack@suse.cz Signed-off-by: Theodore Ts'o commit a93580a02dbf9e67c4f801e2ff1b32ec4c748516 Author: Vladimir Oltean Date: Fri Apr 9 22:27:59 2021 +0300 net: enetc: fix TX ring interrupt storm The blamed commit introduced a bit in the TX software buffer descriptor structure for determining whether a BD is final or not; we rearm the TX interrupt vector for every frame (hence final BD) transmitted. But there is a problem with the patch: it replaced a condition whose expression is a bool which was evaluated at the beginning of the "while" loop with a bool expression that is evaluated on the spot: tx_swbd->is_eof. The problem with the latter expression is that the tx_swbd has already been incremented at that stage, so the tx_swbd->is_eof check is in fact with the _next_ software BD. Which is _not_ final. The effect is that the CPU is in 100% load with ksoftirqd because it does not acknowledge the TX interrupt, so the handler keeps getting called again and again. The fix is to restore the code structure, and keep the local bool is_eof variable, just to assign it the tx_swbd->is_eof value instead of !!tx_swbd->skb. Fixes: d504498d2eb3 ("net: enetc: add a dedicated is_eof bit in the TX software BD") Reported-by: Alex Marginean Signed-off-by: Vladimir Oltean Reviewed-by: Claudiu Manoil Link: https://lore.kernel.org/r/20210409192759.3895104-1-olteanv@gmail.com Signed-off-by: Jakub Kicinski commit 95b5c291322be25431391d08020db0138631c8b2 Merge: 626b598aa8bec e71b75f73763d Author: Jakub Kicinski Date: Fri Apr 9 18:07:20 2021 -0700 Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux Saeed Mahameed says: ==================== mlx5-next 2021-04-09 This pr contains changes from mlx5-next branch, already reviewed on netdev and rdma mailing lists, links below. 1) From Leon, Dynamically assign MSI-X vectors count Already Acked by Bjorn Helgaas. https://patchwork.kernel.org/project/netdevbpf/cover/20210314124256.70253-1-leon@kernel.org/ 2) Cleanup series: https://patchwork.kernel.org/project/netdevbpf/cover/20210311070915.321814-1-saeed@kernel.org/ From Mark, E-Switch cleanups and refactoring, and the addition of single FDB mode needed HW bits. From Mikhael, Remove unused struct field From Saeed, Cleanup W=1 prototype warning From Zheng, Esw related cleanup From Tariq, User order-0 page allocation for EQs * 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux: net/mlx5: Implement sriov_get_vf_total_msix/count() callbacks net/mlx5: Dynamically assign MSI-X vectors count net/mlx5: Add dynamic MSI-X capabilities bits PCI/IOV: Add sysfs MSI-X vector assignment interface net/mlx5: Use order-0 allocations for EQs net/mlx5: Add IFC bits needed for single FDB mode net/mlx5: E-Switch, Refactor send to vport to be more generic RDMA/mlx5: Use representor E-Switch when getting netdev and metadata net/mlx5: E-Switch, Add eswitch pointer to each representor net/mlx5: E-Switch, Add match on vhca id to default send rules net/mlx5: Remove unused mlx5_core_health member recover_work net/mlx5: simplify the return expression of mlx5_esw_offloads_pair() net/mlx5: Cleanup prototype warning ==================== Link: https://lore.kernel.org/r/20210409200704.10886-1-saeed@kernel.org Signed-off-by: Jakub Kicinski commit 6810fad956df9e5467e8e8a5ac66fda0836c71fa Author: Ye Bin Date: Tue Apr 6 10:53:31 2021 +0800 ext4: fix ext4_error_err save negative errno into superblock Fix As write_mmp_block() so that it returns -EIO instead of 1, so that the correct error gets saved into the superblock. Cc: stable@kernel.org Fixes: 54d3adbc29f0 ("ext4: save all error info in save_error_info() and drop ext4_set_errno()") Reported-by: Liu Zhi Qiang Signed-off-by: Ye Bin Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20210406025331.148343-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o commit f88f1466e2a2e5ca17dfada436d3efa1b03a3972 Author: Fengnan Chang Date: Fri Apr 2 18:16:31 2021 +0800 ext4: fix error code in ext4_commit_super We should set the error code when ext4_commit_super check argument failed. Found in code review. Fixes: c4be0c1dc4cdc ("filesystem freeze: add error handling of write_super_lockfs/unlockfs"). Cc: stable@kernel.org Signed-off-by: Fengnan Chang Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20210402101631.561-1-changfengnan@vivo.com Signed-off-by: Theodore Ts'o commit ac2f7ca51b0929461ea49918f27c11b680f28995 Author: Ye Bin Date: Thu Apr 1 16:19:03 2021 +0800 ext4: always panic when errors=panic is specified Before commit 014c9caa29d3 ("ext4: make ext4_abort() use __ext4_error()"), the following series of commands would trigger a panic: 1. mount /dev/sda -o ro,errors=panic test 2. mount /dev/sda -o remount,abort test After commit 014c9caa29d3, remounting a file system using the test mount option "abort" will no longer trigger a panic. This commit will restore the behaviour immediately before commit 014c9caa29d3. (However, note that the Linux kernel's behavior has not been consistent; some previous kernel versions, including 5.4 and 4.19 similarly did not panic after using the mount option "abort".) This also makes a change to long-standing behaviour; namely, the following series commands will now cause a panic, when previously it did not: 1. mount /dev/sda -o ro,errors=panic test 2. echo test > /sys/fs/ext4/sda/trigger_fs_error However, this makes ext4's behaviour much more consistent, so this is a good thing. Cc: stable@kernel.org Fixes: 014c9caa29d3 ("ext4: make ext4_abort() use __ext4_error()") Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210401081903.3421208-1-yebin10@huawei.com Signed-off-by: Theodore Ts'o commit fa0c10a5f3a49130dd11281aa27e7e1c8654abc7 Author: Krzysztof Kozlowski Date: Thu Apr 8 21:50:29 2021 +0200 pinctrl: samsung: use 'int' for register masks in Exynos The Special Function Registers on all Exynos SoC, including ARM64, are 32-bit wide, so entire driver uses matching functions like readl() or writel(). On 64-bit ARM using unsigned long for register masks: 1. makes little sense as immediately after bitwise operation it will be cast to 32-bit value when calling writel(), 2. is actually error-prone because it might promote other operands to 64-bit. Addresses-Coverity: Unintentional integer overflow Signed-off-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Link: https://lore.kernel.org/r/20210408195029.69974-1-krzysztof.kozlowski@canonical.com Signed-off-by: Linus Walleij commit 626b598aa8becc95ad1c56e721c90ddfc6a8c409 Author: Dan Carpenter Date: Fri Apr 9 15:24:28 2021 +0300 net: enetc: fix array underflow in error handling code This loop will try to unmap enetc_unmap_tx_buff[-1] and crash. Fixes: 9d2b68cc108d ("net: enetc: add support for XDP_REDIRECT") Signed-off-by: Dan Carpenter Reviewed-by: Claudiu Manoil Reviewed-by: Vladimir Oltean Link: https://lore.kernel.org/r/YHBHfCY/yv3EnM9z@mwanda Signed-off-by: Jakub Kicinski commit 524e001b7dcaf50ade6eb115745561a46e374b06 Author: Qiheng Lin Date: Fri Apr 9 19:53:39 2021 +0800 cxgb4: remove unneeded if-null-free check Eliminate the following coccicheck warning: drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:529:3-9: WARNING: NULL check before some freeing functions is not needed. drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_u32.c:533:2-8: WARNING: NULL check before some freeing functions is not needed. drivers/net/ethernet/chelsio/cxgb4/cxgb4_cudbg.c:161:2-7: WARNING: NULL check before some freeing functions is not needed. drivers/net/ethernet/chelsio/cxgb4/clip_tbl.c:327:3-9: WARNING: NULL check before some freeing functions is not needed. Signed-off-by: Qiheng Lin Link: https://lore.kernel.org/r/20210409115339.4598-1-linqiheng@huawei.com Signed-off-by: Jakub Kicinski commit 6597b5c21c1b53df702d1de369a21aaa31dbbe2c Merge: a7150e382267d 5c2280fc2ee4c Author: Jakub Kicinski Date: Fri Apr 9 16:37:08 2021 -0700 Merge branch 'net-make-phy-pm-ops-a-no-op-if-mac-driver-manages-phy-pm' Heiner Kallweit says: ==================== net: make PHY PM ops a no-op if MAC driver manages PHY PM Resume callback of the PHY driver is called after the one for the MAC driver. The PHY driver resume callback calls phy_init_hw(), and this is potentially problematic if the MAC driver calls phy_start() in its resume callback. One issue was reported with the fec driver and a KSZ8081 PHY which seems to become unstable if a soft reset is triggered during aneg. The new flag allows MAC drivers to indicate that they take care of suspending/resuming the PHY. Then the MAC PM callbacks can handle any dependency between MAC and PHY PM. ==================== Link: https://lore.kernel.org/r/9e695411-ab1d-34fe-8b90-3e8192ab84f6@gmail.com Signed-off-by: Jakub Kicinski commit 5c2280fc2ee4c6f0ee1f0d0adf6b76f1023b5e99 Author: Heiner Kallweit Date: Wed Apr 7 17:53:52 2021 +0200 r8169: use mac-managed PHY PM Use the new mac_managed_pm flag to indicate that the driver takes care of PHY power management. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit 557d5dc83f6831b4e54d141e9b121850406f9a60 Author: Heiner Kallweit Date: Wed Apr 7 17:52:45 2021 +0200 net: fec: use mac-managed PHY PM Use the new mac_managed_pm flag to work around an issue with KSZ8081 PHY that becomes unstable when a soft reset is triggered during aneg. Reported-by: Joakim Zhang Tested-by: Joakim Zhang Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit fba863b816049b03f3fbb07b10ebdcfe5c4141f7 Author: Heiner Kallweit Date: Wed Apr 7 17:51:56 2021 +0200 net: phy: make PHY PM ops a no-op if MAC driver manages PHY PM Resume callback of the PHY driver is called after the one for the MAC driver. The PHY driver resume callback calls phy_init_hw(), and this is potentially problematic if the MAC driver calls phy_start() in its resume callback. One issue was reported with the fec driver and a KSZ8081 PHY which seems to become unstable if a soft reset is triggered during aneg. The new flag allows MAC drivers to indicate that they take care of suspending/resuming the PHY. Then the MAC PM callbacks can handle any dependency between MAC and PHY PM. Signed-off-by: Heiner Kallweit Signed-off-by: Jakub Kicinski commit a7150e382267d5d2bb3e1a2a07776e97646b0952 Author: Eric Dumazet Date: Fri Apr 9 10:02:37 2021 -0700 Revert "tcp: Reset tcp connections in SYN-SENT state" This reverts commit e880f8b3a24a73704731a7227ed5fee14bd90192. 1) Patch has not been properly tested, and is wrong [1] 2) Patch submission did not include TCP maintainer (this is me) [1] divide error: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 8426 Comm: syz-executor478 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__tcp_select_window+0x56d/0xad0 net/ipv4/tcp_output.c:3015 Code: 44 89 ff e8 d5 cd f0 f9 45 39 e7 0f 8d 20 ff ff ff e8 f7 c7 f0 f9 44 89 e3 e9 13 ff ff ff e8 ea c7 f0 f9 44 89 e0 44 89 e3 99 7c 24 04 29 d3 e9 fc fe ff ff e8 d3 c7 f0 f9 41 f7 dc bf 1f 00 RSP: 0018:ffffc9000184fac0 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff87832e76 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff87832e14 R11: 0000000000000000 R12: 0000000000000000 R13: 1ffff92000309f5c R14: 0000000000000000 R15: 0000000000000000 FS: 00000000023eb300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fc2b5f426c0 CR3: 000000001c5cf000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: tcp_select_window net/ipv4/tcp_output.c:264 [inline] __tcp_transmit_skb+0xa82/0x38f0 net/ipv4/tcp_output.c:1351 tcp_transmit_skb net/ipv4/tcp_output.c:1423 [inline] tcp_send_active_reset+0x475/0x8e0 net/ipv4/tcp_output.c:3449 tcp_disconnect+0x15a9/0x1e60 net/ipv4/tcp.c:2955 inet_shutdown+0x260/0x430 net/ipv4/af_inet.c:905 __sys_shutdown_sock net/socket.c:2189 [inline] __sys_shutdown_sock net/socket.c:2183 [inline] __sys_shutdown+0xf1/0x1b0 net/socket.c:2201 __do_sys_shutdown net/socket.c:2209 [inline] __se_sys_shutdown net/socket.c:2207 [inline] __x64_sys_shutdown+0x50/0x70 net/socket.c:2207 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: e880f8b3a24a ("tcp: Reset tcp connections in SYN-SENT state") Signed-off-by: Eric Dumazet Reported-by: syzbot Cc: Manoj Basapathi Cc: Sauvik Saha Link: https://lore.kernel.org/r/20210409170237.274904-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski commit b98b33043c95a3886b5feb73814f8882a9cceaad Author: Florian Westphal Date: Thu Apr 8 19:45:02 2021 +0200 net: dccp: use net_generic storage DCCP is virtually never used, so no need to use space in struct net for it. Put the pernet ipv4/v6 socket in the dccp ipv4/ipv6 modules instead. Signed-off-by: Florian Westphal Link: https://lore.kernel.org/r/20210408174502.1625-1-fw@strlen.de Signed-off-by: Jakub Kicinski commit cbb8f989d5a07cb3e39e9c149a6f89d6c83432aa Author: John Clements Date: Fri Apr 9 17:25:29 2021 +0800 drm/amdgpu: page retire over debugfs mechanism added support in RAS debugfs to add bad page for isolated page retirement testing Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 25315ebfaefcffd126a266116b37bb8a3d1c4620 Author: Yingjie Wang Date: Tue Apr 6 20:10:04 2021 -0700 drm/radeon: Fix a missing check bug in radeon_dp_mst_detect() In radeon_dp_mst_detect(), We should check whether or not @connector has been unregistered from userspace. If the connector is unregistered, we should return disconnected status. Fixes: 9843ead08f18 ("drm/radeon: add DisplayPort MST support (v2)") Signed-off-by: Yingjie Wang Signed-off-by: Alex Deucher commit a3fe0e334f319072746c472185be94a4d5f1a772 Author: Shaokun Zhang Date: Thu Apr 8 20:41:58 2021 +0800 drm/amd/display: Fix the Wunused-function warning drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:941:13: warning: ‘dm_dmub_trace_high_irq’ defined but not used [-Wunused-function] 941 | static void dm_dmub_trace_high_irq(void *interrupt_params) | ^~~~~~~~~~~~~~~~~~~~~~ Fixes: a08f16cfe8dc ("drm/amd/display: Log DMCUB trace buffer events") Cc: Leo (Hanghong) Ma Cc: Daniel Wheeler Cc: Harry Wentland Cc: Solomon Chiu Cc: Alex Deucher Reviewed-by: Harry Wentland Signed-off-by: Shaokun Zhang Signed-off-by: Alex Deucher commit ccfc4392f257f9844bf36a1f254d617bef7193aa Author: Tian Tao Date: Thu Apr 8 20:13:31 2021 +0800 drm/radeon/r600: Fix variables that are not used after assignment err was not used after being assigned -EINVAL and was given a new value, so here add goto to handle the error case. Signed-off-by: Tian Tao Signed-off-by: Alex Deucher commit 1f7cfaa3637838332dde29b87e0bc7c10a2f9bf5 Author: Alex Deucher Date: Wed Apr 7 09:28:23 2021 -0400 drm/amdgpu/smu7: fix CAC setting on TOPAZ We need to enable MC CAC for mclk switching to work. Fixes: d765129a719f ("drm/amd/pm: correct sclk/mclk dpm enablement") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1561 Tested-by: Konstantin Kharlamov Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 79f02534810c9557fb3217b538616dc42a1de3b9 Author: Joshua Aberback Date: Tue Apr 6 17:21:50 2021 -0400 drm/amd/display: Update DCN302 SR Exit Latency [Why&How] Update SR Exit Latency to fix screen flickering caused due to OTG underflow. This is the recommended value given by the hardware IP team. Signed-off-by: Joshua Aberback Acked-by: Aurabindo Pillai Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 52a9df8180fb62895b3296c34f489487d830615c Author: John Clements Date: Thu Apr 8 17:59:18 2021 +0800 drm/amdgpu: enable ras eeprom on aldebaran enable ras eeprom loading by default on aldebaran Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 134d16d50f0948f00e7172b509e869b6eaecf437 Author: John Clements Date: Thu Mar 25 17:10:10 2021 +0800 drm/amdgpu: RAS harvest on driver load In event of RAS UE + warm reset, error counters shall be harvested and cleared on driver load Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 340c571bebbefe03da1c1139b62a55f4ec6fcdce Author: John Clements Date: Thu Mar 25 15:47:42 2021 +0800 drm/amdgpu: add ras aldebaran ras eeprom driver added host to smu cmd to access i2c eeprom Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 055162645a40567080d8c2d1b135f934977ac3cf Author: charles sun Date: Wed Apr 7 14:44:27 2021 +0800 drm/amd/pm: increase time out value when sending msg to SMU when do S3 stress, low rate that PowerUpVcn message will get response more than 1s, so here increase the timeout to 2s Signed-off-by: charles sun Reviewed-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit f066af882b3755c5cdd2574e860433750c6bce1e Author: Jude Shih Date: Thu Apr 1 11:10:41 2021 +0800 drm/amdgpu: add DMUB outbox event IRQ source define/complete/debug flag [Why & How] We use outbox interrupt that allows us to do the AUX via DMUB Therefore, we need to add some irq source related definition in the header files; Signed-off-by: Jude Shih Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 3495d3c3267af7cd8aa692c8685fcf1465a5f97d Author: Xiaojian Du Date: Wed Apr 7 16:17:19 2021 +0800 drm/amd/pm: add the callback to get vbios bootup values for vangogh This patch is to add the callback to get vbios bootup values for vangogh, it will get the bootup values of gfxclk, mclk, socclk and so on. Signed-off-by: Xiaojian Du Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit a441d7ea5c7b60943b8873d044eaa858b0caadf0 Author: xinhui pan Date: Wed Apr 7 20:57:50 2021 +0800 drm/radeon: Fix size overflow ttm->num_pages is uint32. Hit overflow when << PAGE_SHIFT directly Fixes: 230c079fdcf4 ("drm/ttm: make num_pages uint32_t") Signed-off-by: xinhui pan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit b16e685725a92bd7fd8496e38468622caf743771 Author: xinhui pan Date: Wed Apr 7 19:29:39 2021 +0800 drm/amdgpu: Fix size overflow ttm->num_pages is uint32. Hit overflow when << PAGE_SHIFT directly Fixes: 230c079fdcf4 ("drm/ttm: make num_pages uint32_t") Signed-off-by: xinhui pan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit d844c6d74740b3bd7795140b00d28dcc5ef78665 Author: Hawking Zhang Date: Wed Apr 7 00:02:25 2021 +0800 drm/amdgpu: move mmhub ras_func init to ip specific file mmhub ras is always owned by gpu driver. ras_funcs initialization shall be done at ip level, instead of putting it in common gmc interface file Signed-off-by: Hawking Zhang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit e90f8be3b91c99346b70b419ec6f4a3d5a4c828e Author: Thomas Zimmermann Date: Tue Apr 6 11:08:57 2021 +0200 drm/amdgpu: Remove unused function amdgpu_bo_fbdev_mmap() Remove an unused function. Mapping the fbdev framebuffer is apparently not supported. Signed-off-by: Thomas Zimmermann Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 55fa622fe635bfc3f2587d784f6facc30f8fdf12 Author: Qingqing Zhuo Date: Mon Apr 5 10:28:02 2021 -0400 Revert "drm/amdgpu: Ensure that the modifier requested is supported by plane." This reverts commit f4a9be998c8ee39a30a68cb775c91928fe10a384. The original commit was found to cause the following two issues on sienna cichlid: 1. Refresh rate locked during vrrdemo 2. Display sticks on flipped landscape mode after changing orientation, and cannot be changed back to regular landscape Signed-off-by: Qingqing Zhuo Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c25675e0b30bf38edbe88f455283f4da5a8ee1ea Author: Aric Cyr Date: Sun Mar 28 20:56:46 2021 -0400 drm/amd/display: 3.2.130 DC version 3.2.130 brings improvements in multiple areas. In summary, we highlight: - Firmware release 0.0.59 - Fixes on display experiences for 4k TVs, register mask missing, etc. - Enhancements on MST, code cleaning and debug messages. Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ecc116010637dbea504271da4c9c685fdaaa7529 Author: Anthony Koo Date: Sat Mar 27 21:47:38 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.59 [How&Why] add params to send FEC status to firmware Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 091e3131a8c237e17e310db2b3b59aa576075574 Author: Nicholas Kazlauskas Date: Fri Mar 26 14:25:21 2021 -0400 drm/amd/display: Cleanup DML DSC input bpc validation [Why & How] Pipe input DSC bpc has a type mismatch with maximum DSC input bpc - align the maximum with the pipe input type, unsigned integer. When checking the type we shoudl also check for an implicit value of 0 and align with what the spreadsheet does - default to max. Rename output_bpc to dsc_input_bpc to reflect what the field is actually used for. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Dmytro Laktyushkin Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 0774e08adf5fe789eac2f9feca9c4eab03cbbc69 Author: Harry VanZyllDeJong Date: Fri Mar 26 11:20:58 2021 -0400 drm/amd/display: Fixed corruption on 4K tvs [WHY] When on the desktop freesync is not enabled, doing a frame stretch causes the TV to display undesired output. [HOW] By changing the logic so that when ever fresync is supported the TV is notified we are in fressync instead on a non fresync state. Signed-off-by: Harry VanZyllDeJong Reviewed-by: Tony Cheng Acked-by: Anthony Koo Acked-by: Jun Lei Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ec3721869cc4211ab61b7b78fe4d8a9ac319b372 Author: Mikita Lipski Date: Tue Sep 29 11:24:08 2020 -0400 drm/amd/display: Determine synchronization edge based on master's vsync [Why&How] The driver always wants to synchronize streams to the first edge of master's vsync pulse. In order to determine that we can read timing flags that are used to program vsync. Master stream's vsync polarity - Multi Display Stream Synchronization edge: Negative - Falling Edge Positive - Rising Edge Signed-off-by: Mikita Lipski Reviewed-by: Sun peng Li Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 41efcd3879b1df7213dcd1b190a9feb86765cc9b Author: Mikita Lipski Date: Tue Sep 15 08:50:49 2020 -0400 drm/amd/display: Add MST capability to trigger_hotplug interface [Why] Need to be able to trigger software hotplug for MST connectors [How] For unplug the driver calls to disable topologies manager that connector is attached to. For plugging in it does the whole rediscovery of all connectors in drm device and enbles their topologies if attached. The interface for MST connectors works in the following way: 1. To disconnect all MST topologies currently connected: echo 0 > /sys/kernel/debug/dri/0/amdgpu_dm_trigger_hpd_mst 2. To reconnect/rediscover all topologies that are physically connected to the card: echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_trigger_hpd_mst A related fix which has been merged with this patch Leo Ma(Hanghong Ma)'s work: Set power states before disable MST topology [Why] When we try to disable MST topology from the debugfs entry, some receiver will hang. [How] Set DPCD 600h power states to 2(power down mode)before disable MST topology. Signed-off-by: Mikita Lipski Reviewed-by: Sun peng Li Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit f5b6a20c7ef40599095c796b0500d842ffdbc639 Author: Mikita Lipski Date: Thu Aug 13 09:44:45 2020 -0400 drm/amd/display: Directly retrain link from debugfs [why/how] Skip logic that sets preffered link settings and just retrain with new link_settings from Debugfs Signed-off-by: Mikita Lipski Acked-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ada577258b9483c8495685a0b1e51935b4e564cb Author: Qingqing Zhuo Date: Thu Mar 25 03:44:11 2021 -0400 drm/amd/display: Add missing mask for DCN3 [Why] DCN3 is not reusing DCN1 mask_sh_list, causing SURFACE_FLIP_INT_MASK missing in the mapping. [How] Add the corresponding entry to DCN3 list. Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 874ec9f7e568ecae01564703287d33c890da4169 Author: Wayne Lin Date: Wed Mar 24 17:23:36 2021 +0800 drm/amd/display: Tweak the kernel doc for crc_rd_wrk [Why] Commit 1c85f3db778ffbeba91d71e9d6c8aa299f9b4efd ("drm/amd/display: Add kernel doc to crc_rd_wrk field") adds kernel doc for crc_rd_wrk field in amdgpu_dm.h but it's incorrectly formatted. Make htmldocs warns: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:398: warning: Incorrect use of kernel-doc format: * @crc_rd_wrk [How] Tweak the kernel doc for crc_rd_wrk. Fixes: 1c85f3db778ffb ("drm/amd/display: Add kernel doc to crc_rd_wrk field") Signed-off-by: Wayne Lin Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 8532467cc9019fdff9d98cfeb68b6c3eb19eadf7 Author: Mikita Lipski Date: Wed Aug 26 08:00:42 2020 -0400 drm/amd/display: Set initial value to a divider [why/how] Due to compiler optimization the values would be passed to the division function uninitialized causing a div by zero. Initialize the numerator and denominator to 0 and 1 to prevent division by zero. Signed-off-by: Mikita Lipski Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 712343cd21ea709ba63869f74246466524172ad4 Author: Victor Lu Date: Wed Jul 22 16:16:48 2020 -0400 drm/amd/display: Add function and debugfs to dump DCC_EN bit [why] Currently to view the DCC_EN bit the entire DTN log must be dumped. A compact method to view the DCC_EN bit is desirable. [how] Introduce new debugfs interface that only dumps the DCC_EN bit. Example usage: cat /sys/kernel/debug/dri/0/amdgpu_dm_dcc_en Signed-off-by: Victor Lu Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit ad0d8ebcb8dfc55b15b47fb98a4b4391633d2e16 Author: Harry Wentland Date: Wed Jun 24 16:26:12 2020 -0400 drm/amd/display: Add dc_debug flag to disable min fclk [Why&How] Add debug flag for an option to disable min fclk. Signed-off-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 73affd3052c03ac0c74c1614b6effacb743cbcbf Author: Harry Wentland Date: Wed Jun 24 10:36:00 2020 -0400 drm/amd/display: Add debug prints for SMU messages [Why&How] Add debug prints for SMU messages with regard to versions, clocks, and more. Signed-off-by: Harry Wentland Reviewed-by: Robin Singh Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 3306ace54efbf48960dfc0fc87aae026c21a6d2c Author: Jake Wang Date: Tue Mar 23 13:51:19 2021 -0400 drm/amd/display: Added dc_edp_id_count to dc_context [Why] We need to keep track of the number of eDP links to properly enumerate edp panel control instance. [How] Added dc_edp_id_count to dc_context to keep track of number of eDP links. Signed-off-by: Jake Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 37bedd9929b925b25a4b5397d7f32d3600067688 Author: Aurabindo Pillai Date: Tue Mar 23 17:51:56 2021 -0400 drm/amd/display: Add debugfs entry for LTTPR register status [Why] Functionality of LTTPR is reporter through the DPCD register [How] Expose a interface in debugfs to read the current status of LTTPR as reported from the device's DPCD register Signed-off-by: Aurabindo Pillai Reviewed-by: Rodrigo Siqueira Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 9df857f930d6035996d481b4e5bc9ce082990afb Author: Leo Li Date: Thu Apr 2 15:38:22 2020 -0400 drm/amd/display: Move vupdate keepout programming from DCN20 to DCN10 [Why] The OTG_VUPDATE_KEEPOUT register and fields is available on DCN10, and named the same in DCN20. [How] Move register definition and programming function to dcn10 optc. There is no functional change. Signed-off-by: Leo Li Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 148493a81e3b60aee445b60bac65f800aebf05cc Author: Robin Singh Date: Tue Mar 9 16:47:20 2021 -0500 drm/amd/display: add NULL check to avoid kernel crash in DC. [why] There is case when the userspace like IGT test updates the custom timings, i.e. the number of active lines CRTC property value, and without committing the change, followed by resetting the display, creating FB and plane to the pipe and committing. The NULL pointer of pipe_ctx->plane_state occurs and result in kernel crash. We need to avoid that. [how] add pointer check for the dc_plane_state of the pipe context in the call of committing planes for stream in DC component. Signed-off-by: Robin Singh Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 815f72be4d8a1e8629e5892e60beb8e2487db399 Author: David (Dingchen) Zhang Date: Wed Dec 4 10:17:03 2019 -0500 drm/amd/display: use MST downstream AUX to dump DPRX CRCs [why] In MST setup, we'd use MST downstream AUX to dump the DPRX CRCs from sink device. [how] Assign the mst_port->aux to read DPCD registers. Signed-off-by: David (Dingchen) Zhang Reviewed-by: Harry Wentland Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 6bdb2e3821616329125fea108c48fe5fe54aaafc Author: Wyatt Wood Date: Mon Mar 22 14:02:56 2021 -0400 drm/amd/display: Add delay in dmub_srv_send_gpint_command [Why] Today a parameter is passed to dmub_srv_send_gpint_command which specifies the max amount of time to wait for the command to be acked. This parameter instead specifies the number of times to check if the command was acked. We wish to add a lower bound to the timeout, which can be accomplished by using a delay or a timestamp. It has been decided to use udelay instead of a timestamp simply because we don't want to expose a high precision counter if it doesn't yield large benefits. [How] Add udelay(1) between each for loop iteration. Signed-off-by: Wyatt Wood Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 04f3c88f09554714f25caa01d1a8ba999fc487bb Author: Wyatt Wood Date: Fri Mar 19 13:44:55 2021 -0400 drm/amd/display: Retry getting PSR state if command times out [Why] GPINT command to get PSR state from FW times out. [How] Add retry to get valid PSR state. Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 719a9b332305b8c4b91805c4bedee27ce82ee916 Author: Hawking Zhang Date: Fri Mar 19 16:59:09 2021 +0800 drm/amdgpu: split gfx callbacks into ras and non-ras ones gfx ras is only available in cerntain ip generations. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 8bc7b360ad4b0a090380d7548dbf24a627f0b035 Author: Hawking Zhang Date: Fri Mar 19 15:50:14 2021 +0800 drm/amdgpu: split mmhub callbacks into ras and non-ras ones mmhub ras is only avaiable in cerntain mmhub ip generation. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 68d705dd6a4091f99b710204df63ba6b5a686ae9 Author: Hawking Zhang Date: Wed Mar 17 19:28:52 2021 +0800 drm/amdgpu: do not register df_mca interrupt in certain config df/mca ras is not managed by gpu driver when gpu is connected to cpu through xgmi. gpu driver should register x86 mca notifier for umc ras error notification Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 49070c4ea3d97b76c5666466efb35dcc42c6c8fd Author: Hawking Zhang Date: Wed Mar 17 19:17:52 2021 +0800 drm/amdgpu: split umc callbacks to ras and non-ras ones umc ras is not managed by gpu driver when gpu is connected to cpu through xgmi. split umc callbacks into ras and non-ras ones so gpu driver only initializes umc ras callbacks when it manages umc ras. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 52137ca8526cdeceab7651c314ce68ac49963512 Author: Hawking Zhang Date: Thu Mar 18 20:18:19 2021 +0800 drm/amdgpu: move xgmi ras functions to xgmi_ras_funcs xgmi ras is not managed by gpu driver when gpu is connected to cpu through xgmi. move all xgmi ras functions to xgmi_ras_funcs so gpu driver only initializes xgmi ras functions when it manages xgmi ras. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 6e36f23193cc870856a41e87281f62fb2b04bd1f Author: Hawking Zhang Date: Fri Apr 2 14:39:36 2021 +0800 drm/amdgpu: split nbio callbacks into ras and non-ras ones nbio ras is not managed by gpu driver when gpu is connected to cpu through xgmi. split nbio callbacks into ras and non-ras ones so gpu driver only initializes nbio ras callbacks when it manages nbio ras. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 87da0cc101e723833446e52971fac5fa7358dec5 Author: Hawking Zhang Date: Thu Mar 11 16:41:47 2021 +0800 drm/amdgpu: implement query_ras_error_address callback query_ras_error_address will be invoked to query bad page address when there is poison data in HBM consumed by GPU engines. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 878b9e944c566d6ef301e6155fc3e299f90f89ce Author: Hawking Zhang Date: Tue Mar 9 22:18:50 2021 +0800 drm/amdgpu: implement umc query error count callback umc query_ras_error_count will be invoked to query umc correctable and uncorrectable error. It will reset the umc ras error counter after the query. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 3f903560d1f0a42575fc7b14608004291772572a Author: Hawking Zhang Date: Mon Mar 8 20:43:15 2021 +0800 drm/amdgpu: add helper funtion to query umc ras error Add helper functions to query correctable and uncorrectable umc ras error. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 1696bf35896b7805499c3dfe32e94ecd6a2ae08b Author: Hawking Zhang Date: Mon Mar 8 16:56:31 2021 +0800 drm/amdgpu: create umc_v6_7_funcs for aldebaran umc_v6_7_funcs are callbacks to support umc ras functionalities in aldebaran Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 75f06251c921baf99c003662c529c25ba9937b2d Author: Hawking Zhang Date: Mon Mar 8 16:40:07 2021 +0800 drm/amdgpu: initialze ras caps per paltform config Driver only manages GFX/SDMA/MMHUB RAS in platforms that gpu node is connected to cpu through XGMI, other than that, it queries VBIOS for RAS capabilities. Signed-off-by: Hawking Zhang Acked-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 158fc08d174d0f7070d8456599fb60d6f0fdb5bd Author: Amber Lin Date: Tue Mar 30 13:05:33 2021 -0400 drm/amdkfd: Avoid null pointer in SMI event Power Management IP is initialized/enabled before KFD init. When a thermal throttling happens before kfd_smi_init is done, calling the KFD SMI update function causes a stack dump by referring a NULL pointer ( smi_clients list). Check if kfd_init is completed before calling the function. Signed-off-by: Amber Lin Reviewed-by: Mukul Joshi Signed-off-by: Alex Deucher commit 92b15eb07ad773c3b321fbdf5ecd9a0f3b8b351e Author: Wan Jiabing Date: Thu Apr 1 18:27:37 2021 +0800 amd: display: modules: Remove repeated struct declaration struct mod_hdcp is declared twice. One is declared at 33rd line. The blew one is not needed. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Alex Deucher commit c108aef148c4f212118141009c2949624994ea00 Author: Alex Deucher Date: Wed Mar 31 10:05:28 2021 -0400 drm/amdgpu: drop some unused atombios functions These were leftover from the old CI dpm code which was retired a while ago. Acked-by: Christian König Signed-off-by: Alex Deucher commit f08726868c7543e0754212dcadae0d6911f721bd Author: Bernard Zhao Date: Wed Mar 31 06:12:03 2021 -0700 drm/amd: cleanup coding style a bit Fix patch check warning: WARNING: suspect code indent for conditional statements (8, 17) + if (obj && obj->use < 0) { + DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name); WARNING: braces {} are not necessary for single statement blocks + if (obj && obj->use < 0) { + DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name); + } Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit ccc4343041f21023a321ba36c5de8dff2ba6121a Author: Bernard Zhao Date: Wed Mar 31 06:12:18 2021 -0700 drm/amd: use kmalloc_array over kmalloc with multiply Fix patch check warning: WARNING: Prefer kmalloc_array over kmalloc with multiply + buf = kmalloc(MAX_KFIFO_SIZE * sizeof(*buf), GFP_KERNEL); Signed-off-by: Bernard Zhao Signed-off-by: Alex Deucher commit 5a4345270474c886dceee48c5b54b5c2c07aa877 Author: Stanley.Yang Date: Thu Apr 1 19:10:54 2021 +0800 drm/amdgpu: support sdma error injection Signed-off-by: Stanley.Yang Reivewed-by: Dennis Li Signed-off-by: Alex Deucher commit 2b665c3735b318a1c24a4aba22c1d02460d6d963 Author: Philip Yang Date: Thu Apr 1 00:22:23 2021 -0400 drm/amdgpu: reserve fence slot to update page table Forgot to reserve a fence slot to use sdma to update page table, cause below kernel BUG backtrace to handle vm retry fault while application is exiting. [ 133.048143] kernel BUG at /home/yangp/git/compute_staging/kernel/drivers/dma-buf/dma-resv.c:281! [ 133.048487] Workqueue: events amdgpu_irq_handle_ih1 [amdgpu] [ 133.048506] RIP: 0010:dma_resv_add_shared_fence+0x204/0x280 [ 133.048672] amdgpu_vm_sdma_commit+0x134/0x220 [amdgpu] [ 133.048788] amdgpu_vm_bo_update_range+0x220/0x250 [amdgpu] [ 133.048905] amdgpu_vm_handle_fault+0x202/0x370 [amdgpu] [ 133.049031] gmc_v9_0_process_interrupt+0x1ab/0x310 [amdgpu] [ 133.049165] ? kgd2kfd_interrupt+0x9a/0x180 [amdgpu] [ 133.049289] ? amdgpu_irq_dispatch+0xb6/0x240 [amdgpu] [ 133.049408] amdgpu_irq_dispatch+0xb6/0x240 [amdgpu] [ 133.049534] amdgpu_ih_process+0x9b/0x1c0 [amdgpu] [ 133.049657] amdgpu_irq_handle_ih1+0x21/0x60 [amdgpu] [ 133.049669] process_one_work+0x29f/0x640 [ 133.049678] worker_thread+0x39/0x3f0 [ 133.049685] ? process_one_work+0x640/0x640 Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 5e025531b773ee9789a9a9948fc7e74e6077ddd5 Author: Peng Ju Zhou Date: Mon Mar 22 15:18:01 2021 +0800 drm/amdgpu: indirect register access for nv12 sriov 1. expand rlcg interface for gc & mmhub indirect access 2. add rlcg interface for no kiq v2: squash in fix for gfx9 (Changfeng) Signed-off-by: Peng Ju Zhou Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit 5d23851029b78fb6d6d56a40300676d49a0ce609 Author: Peng Ju Zhou Date: Tue Mar 30 18:27:15 2021 +0800 drm/amdgpu: indirect register access for nv12 sriov using the control bits got from host to control registers access. Signed-off-by: Peng Ju Zhou Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit 77eabc6f5975dafeb76f7c7c2451282b91e9f5b6 Author: Peng Ju Zhou Date: Mon Mar 29 15:47:20 2021 +0800 drm/amdgpu: indirect register access for nv12 sriov get pf2vf msg info at it's earliest time so that guest driver can use these info to decide whether register indirect access enabled. Signed-off-by: Peng Ju Zhou Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit 8b8a162da820d48bb94261ae4684f2c839ce148c Author: Peng Ju Zhou Date: Wed Mar 31 11:19:02 2021 +0800 drm/amdgpu: indirect register access for nv12 sriov unify host driver and guest driver indirect access control bits names Signed-off-by: Peng Ju Zhou Reviewed-by: Emily.Deng Signed-off-by: Alex Deucher commit 2dd88ce862a5dfaff1377d46c4b259da37d20807 Author: Alex Deucher Date: Thu Apr 1 10:16:04 2021 -0400 drm/amdgpu/display: fix warning on 32 bit in dmub Use uintptr_t rather than uint64_t. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: Dave Airlie Cc: Harry Wentland commit 9a89a721b41b23c6da8f8a6dd0e382966a850dcf Author: Xℹ Ruoyao Date: Tue Mar 30 23:33:34 2021 +0800 drm/amdgpu: check alignment on CPU page for bo map The page table of AMDGPU requires an alignment to CPU page so we should check ioctl parameters for it. Return -EINVAL if some parameter is unaligned to CPU page, instead of corrupt the page table sliently. Reviewed-by: Christian König Signed-off-by: Xi Ruoyao Signed-off-by: Alex Deucher commit f4d3da72a76a9ce5f57bba64788931686a9dc333 Author: Huacai Chen Date: Tue Mar 30 23:33:33 2021 +0800 drm/amdgpu: Set a suitable dev_info.gart_page_size In Mesa, dev_info.gart_page_size is used for alignment and it was set to AMDGPU_GPU_PAGE_SIZE(4KB). However, the page table of AMDGPU driver requires an alignment on CPU pages. So, for non-4KB page system, gart_page_size should be max_t(u32, PAGE_SIZE, AMDGPU_GPU_PAGE_SIZE). Signed-off-by: Rui Wang Signed-off-by: Huacai Chen Link: https://github.com/loongson-community/linux-stable/commit/caa9c0a1 [Xi: rebased for drm-next, use max_t for checkpatch, and reworded commit message.] Signed-off-by: Xi Ruoyao BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1549 Tested-by: Dan Horák Reviewed-by: Christian König Signed-off-by: Alex Deucher commit fd6ecc906960c1063c17f23b0b8dad5f6dcea4bc Author: Guchun Chen Date: Tue Mar 30 22:02:06 2021 +0800 drm/radeon: avoid potential null pointer access Leverage the same logic from amdgpu_ttm_tt_unpin_userptr. Signed-off-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9973de10b5b70b0e5ed9e01e3b392dfc65ab215d Author: Guchun Chen Date: Tue Mar 30 17:58:28 2021 +0800 drm/amdgpu: fix compiler warning(v2) warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] int write = !(gtt->userflags & AMDGPU_GEM_USERPTR_READONLY); v2: put short variable declaration last Signed-off-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 3c3dc654333f6389803cdcaf03912e94173ae510 Author: Guchun Chen Date: Tue Mar 30 17:52:18 2021 +0800 drm/amdgpu: fix NULL pointer dereference ttm->sg needs to be checked before accessing its child member. Call Trace: amdgpu_ttm_backend_destroy+0x12/0x70 [amdgpu] ttm_bo_cleanup_memtype_use+0x3a/0x60 [ttm] ttm_bo_release+0x17d/0x300 [ttm] amdgpu_bo_unref+0x1a/0x30 [amdgpu] amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x78b/0x8b0 [amdgpu] kfd_ioctl_alloc_memory_of_gpu+0x118/0x220 [amdgpu] kfd_ioctl+0x222/0x400 [amdgpu] ? kfd_dev_is_large_bar+0x90/0x90 [amdgpu] __x64_sys_ioctl+0x8e/0xd0 ? __context_tracking_exit+0x52/0x90 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x7f97f264d317 Code: b3 66 90 48 8b 05 71 4b 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 41 4b 2d 00 f7 d8 64 89 01 48 RSP: 002b:00007ffdb402c338 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f97f3cc63a0 RCX: 00007f97f264d317 RDX: 00007ffdb402c380 RSI: 00000000c0284b16 RDI: 0000000000000003 RBP: 00007ffdb402c380 R08: 00007ffdb402c428 R09: 00000000c4000004 R10: 00000000c4000004 R11: 0000000000000246 R12: 00000000c0284b16 R13: 0000000000000003 R14: 00007f97f3cc63a0 R15: 00007f8836200000 Signed-off-by: Guchun Chen Acked-by: Christian König Signed-off-by: Alex Deucher commit cb2318b7c98703b839c91d7f4c32d4905654c702 Author: Victor Lu Date: Tue Mar 30 12:07:30 2021 -0400 drm/amd/display: Use pr_debug in DM to prevent dmesg flooding [why] Our CI enables drm.debug=0x4 logs and the dmesg is flooded with cursor updates. We probably want to avoid spamming the log with DRM_DEBUG_KMS. [how] Define and use pr_debug macros instead of a few spammy DRM_DEBUG_*'s. Signed-off-by: Victor Lu Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit d91a275e4e8643b517a4c42ae5f7effb1ce94703 Author: Guchun Chen Date: Fri Mar 26 14:49:55 2021 +0800 drm/amd/display: add DMCUB trace irq support for DCN302 Otherwise, below errors will be found on DIMGREY_CAVEFISH with DCN302. Error log observed in driver load: [drm:amdgpu_dm_irq_register_interrupt [amdgpu]] *ERROR* DM_IRQ: invalid irq_source: 0! Error observed in mode1_rest sequence: [ 27.265920] #PF: supervisor read access in kernel mode [ 27.265941] #PF: error_code(0x0000) - not-present page [ 27.265956] PGD 0 P4D 0 [ 27.265967] Oops: 0000 [#1] SMP NOPTI [ 27.265979] CPU: 0 PID: 1360 Comm: cat Tainted: G W 5.11.0-99b3786c1770 #20210323 [ 27.266005] Hardware name: System manufacturer System Product Name/PRIME Z390-A, BIOS 1401 11/26/2019 [ 27.266033] RIP: 0010:dal_irq_service_ack+0x25/0x60 [amdgpu] [ 27.266203] Code: 5d 5d c3 66 90 0f 1f 44 00 00 55 83 fe 61 48 89 e5 77 27 89 f0 48 8d 04 40 48 c1 e0 04 48 03 47 08 74 17 48 8b 50 28 48 89 c6 <48> 8b 52 08 48 85 d2 74 20 e8 1d 64 45 c9 5d c3 89 f2 48 c7 c7 f0 [ 27.266248] RSP: 0018:ffffa115824a3c08 EFLAGS: 00010082 [ 27.266270] RAX: ffffffffc0942c10 RBX: ffffffffc0942c10 RCX: 0000000000000000 [ 27.266288] RDX: 0000000000000000 RSI: ffffffffc0942c10 RDI: ffff88d509cba7a0 [ 27.266312] RBP: ffffa115824a3c08 R08: 0000000000000000 R09: 0000000000000001 [ 27.266335] R10: ffffa115824a3b20 R11: ffffa115824a3b58 R12: ffff88d509cba7a0 [ 27.266353] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000246 [ 27.266377] FS: 00007fb3e2438580(0000) GS:ffff88d50dc00000(0000) knlGS:0000000000000000 [ 27.266402] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 27.266417] CR2: 0000000000000008 CR3: 000000083e5ac006 CR4: 00000000003706f0 [ 27.266441] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 27.266464] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 27.266483] Call Trace: [ 27.266491] dal_irq_service_set+0x31/0x80 [amdgpu] [ 27.266639] dc_interrupt_set+0x24/0x30 [amdgpu] [ 27.266775] amdgpu_dm_set_dmub_trace_irq_state+0x22/0x30 [amdgpu] [ 27.266920] amdgpu_irq_update+0x57/0xa0 [amdgpu] [ 27.267030] amdgpu_irq_gpu_reset_resume_helper+0x64/0xa0 [amdgpu] [ 27.267135] amdgpu_do_asic_reset+0x211/0x420 [amdgpu] [ 27.267232] amdgpu_device_gpu_recover+0x517/0xa70 [amdgpu] [ 27.267325] gpu_recover_get+0x2e/0x60 [amdgpu] [ 27.267421] simple_attr_read+0x6b/0x130 [ 27.267441] debugfs_attr_read+0x49/0x70 [ 27.267454] full_proxy_read+0x5c/0x90 [ 27.267474] vfs_read+0xa1/0x190 [ 27.267486] ksys_read+0xa7/0xe0 [ 27.267501] __x64_sys_read+0x1a/0x20 [ 27.267521] do_syscall_64+0x37/0x80 [ 27.267541] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 27.267562] RIP: 0033:0x7fb3e2356142 Signed-off-by: Guchun Chen Reviewed-by: Leo (Hanghong) Ma Signed-off-by: Alex Deucher commit 4d675e1eb863596811f005802116a3c4afbfa95a Author: Rohit Khaire Date: Mon Mar 29 15:40:13 2021 -0400 drm/amdgpu: Add new PF2VF flags for VF register access method Add 3 sub flags to notify guest for indirect reg access of gc, mmhub and ih The host sets these flags depending on L1 RAP version, asic and other scenarios. These flags ensure that there is compatibility between different guest/host/vbios versions. Signed-off-by: Rohit Khaire Reviewed-by: Monk Liu Acked-by: Alex Deucher Acked-by: Luben Tuikov Signed-off-by: Alex Deucher commit 1c0f04303b217984222261a98738676ecf193130 Author: Alex Deucher Date: Fri Mar 26 16:56:07 2021 -0400 drm/amdgpu/vangogh: don't check for dpm in is_dpm_running when in suspend Do the same thing we do for Renoir. We can check, but since the sbios has started DPM, it will always return true which causes the driver to skip some of the SMU init when it shouldn't. Reviewed-by: Zhan Liu Acked-by: Evan Quan Signed-off-by: Alex Deucher commit ec5c0ffaad87ee002e017de981e786a368bc3632 Author: Diego Viola Date: Sun Mar 28 02:35:04 2021 -0300 drm/amd/display: fix typo: liason -> liaison Signed-off-by: Diego Viola Signed-off-by: Alex Deucher commit 68eb3ae3c63708f823aeeb63bb15197c727bd9bf Author: Werner Sembach Date: Wed Mar 17 16:13:48 2021 +0100 drm/amd/display: Try YCbCr420 color when YCbCr444 fails When encoder validation of a display mode fails, retry with less bandwidth heavy YCbCr420 color mode, if available. This enables some HDMI 1.4 setups to support 4k60Hz output, which previously failed silently. On some setups, while the monitor and the gpu support display modes with pixel clocks of up to 600MHz, the link encoder might not. This prevents YCbCr444 and RGB encoding for 4k60Hz, but YCbCr420 encoding might still be possible. However, which color mode is used is decided before the link encoder capabilities are checked. This patch fixes the problem by retrying to find a display mode with YCbCr420 enforced and using it, if it is valid. Reviewed-by: Harry Wentland Signed-off-by: Werner Sembach Signed-off-by: Alex Deucher commit bb01091cec980a4f4c9e2375573a26582d34a8fb Author: Aric Cyr Date: Fri Mar 19 20:20:03 2021 -0400 drm/amd/display: 3.2.129 This version brings along following features/fixes: - LTTPR improvements - Disable MALL when SMU not present - Fix bug in HW that causes P-State to hang when DPG is enabled in certain conditions - Update code path for enabling DPG - Update display endpoint control path - Add dynamic link encoder selection - Fix debugfs MST topology to dump from the root MST node - Enable DP DSC Compliance automation for Linux - ASSR is enabled only when DPCD is supported and the display connected is internal - Added kernel trace event to print real-time refresh rate value to debug VRR issues Signed-off-by: Aric Cyr Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 6213044059d2d54046c63757754ddb99d4d302de Author: Chris Park Date: Fri Mar 19 14:55:12 2021 -0400 drm/amd/display: Disable MALL when SMU not present [Why] Bring-up purpose code to disable DMUB calling into SMU and timeout for MALL when SMU is not present. [How] Disable MALL when SMU is not present. Signed-off-by: Chris Park Reviewed-by: Nicholas Kazlauskas Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 3b77bd247878d398218fbb47c5b1ffe756c3ae11 Author: Anthony Koo Date: Fri Mar 19 16:46:52 2021 -0400 drm/amd/display: [FW Promotion] Release 0.0.58 Signed-off-by: Anthony Koo Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 925890201eb29b5a0677d15a0c2f4bf0b772f89b Author: Qingqing Zhuo Date: Thu Mar 18 14:37:06 2021 -0400 drm/amd/display: add log for automated test [Why&How] Add log for easier debug purposes. Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 482812d56698efeeb5f5760482c27006e3088985 Author: Wesley Chalmers Date: Fri Mar 12 21:47:13 2021 -0500 drm/amd/display: Set max TTU on DPG enable [WHY] There is a bug in HW that causes P-State to hang when DPG is enabled in certain conditions. [HOW] The solution is to force MIN_TTU_VBLANK register to maximum value whenever DPG has been enabled. Make stream do a full update on test pattern change, so that the TTUs get updated. When DPG is enabled, update the ttu_regs.min_ttu_vblank field of each pipe in the stream's topology to the maximum value (0xffffff). v2: squash in build fix for when DCN is not defined (Alex) Signed-off-by: Wesley Chalmers Reviewed-by: Tony Cheng Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit b126a69906ed6ef6ee45aa9790cd03ba002c217e Author: Wesley Chalmers Date: Mon Nov 30 13:37:53 2020 -0500 drm/amd/display: New path for enabling DPG [WHY] We want to make enabling test pattern a part of the stream update code path. This change is the first step towards that goal. Signed-off-by: Wesley Chalmers Reviewed-by: Aric Cyr Reviewed-by: Tony Cheng Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 79ed7354d70f6e9579c25afc682b5f5ad44791bf Author: Jimmy Kizito Date: Wed Jan 6 15:21:11 2021 -0500 drm/amd/display: Update display endpoint control path. [Why] Some display endpoints may be dynamically mapped to the link encoders which drive them. [How] Update the code paths for display enabling/disabling to accommodate the dynamic association between links and link encoders. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit f42ef862fb1fbbd291fb381f38d3910da644a44d Author: Jimmy Kizito Date: Tue Jan 5 14:25:23 2021 -0500 drm/amd/display: Add dynamic link encoder selection. [Why] Some display endpoints may be programmably mapped to compatible link encoders. The assignment of link encoders to links has to be dynamic to accommodate the increased flexibility in comparison to conventional display endpoints. [How] - Add link encoder assignment tracking variables. - Execute link encoder assignment algorithm before enabling link and release link encoders from links once they are disabled. Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit b9db41235a2a3de7e65891e30a9868fe50a2d7e1 Author: Eryk Brol Date: Thu Mar 18 14:44:17 2021 -0400 drm/amd/display: Fix MST topology debugfs [why] The drm dump_topology function was previously called on all DP connectors. This resulted in empty topology dumps for those connectors which weren't root MST nodes. [how] Make sure we only dump topology from the root MST node. Signed-off-by: Eryk Brol Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 7809fc00e20e6efb51891b95dccd327316beefdf Author: Wesley Chalmers Date: Wed Mar 17 17:16:48 2021 -0400 drm/amd/display: LTTPR config logic [WHY] Some systems can enable LTTPR through bits in BIOS, while other systems can be configured at boot to enable LTTPR. Some configs enable Non-Transparent mode, while others enable Transparent mode. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 3128b285021ec04b13a8387f9d0aee6c70dfef7f Author: Wesley Chalmers Date: Mon Mar 15 18:40:08 2021 -0400 drm/amd/display: Enumerate LTTPR modes [WHY] There are three possible modes for LTTPR: - Non-LTTPR mode, where AUX timeout is 400 us and no per-hop link training is done - LTTPR Transparent mode, where AUX timeout is 3200 us and no per-hop link training is done - LTTPR Non-Transparent mode, where AUX timeout is 3200 us and per-hop link training is done [HOW] Use an enum instead of a bool to track LTTPR state; modify comparisons accordingly. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit dd8a86877ec0dece66b5633b57622767696fc31f Author: Wesley Chalmers Date: Wed Mar 17 16:36:47 2021 -0400 drm/amd/display: Interface for LTTPR interop [WHY] The logic to toggle LTTPR transparent/non-transparent requires 2 flags provided by BIOS [HOW] Repurpose the interface to get dce caps so both LTTPR querying functions can use them. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 6b91a404c8a57728a5fddfbf7dc47cf8517bfcc2 Author: Krunoslav Kovac Date: Fri Mar 12 19:14:09 2021 -0500 drm/amd/display: Rename fs_params to hdr_tm_params [Why&How] Renaming structure to better indicate its meaning. Signed-off-by: Krunoslav Kovac Reviewed-by: Aric Cyr Acked-by: Anson Jacob Acked-by: Anthony Koo Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 553ef24d06fc487fa0372903e262c0ce8832dee9 Author: Vladimir Stempen Date: Tue Mar 2 13:55:59 2021 -0500 drm/amd/display: Fix typo for variable name [why] Word "remainder" was misspelled as "reminder" in reduceSizeAndFraction method variable. [how] Fix the spelling. Signed-off-by: Vladimir Stempen Reviewed-by: Alexander Deucher Reviewed-by: Bindu R Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 45f673e61521269cf0d60ed3cb912fd569b7f704 Author: Wenjing Liu Date: Thu Mar 11 13:14:25 2021 -0500 drm/amd/display: add mod hdcp interface for supporting encryption state query Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 4fe1fdcc230189bdeb3a0d3fd49ef52416099c8c Author: Wenjing Liu Date: Wed Mar 10 14:26:01 2021 -0500 drm/amd/display: define mod_hdcp_display_disable_option struct Signed-off-by: Wenjing Liu Reviewed-by: George Shen Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit ac3a4fa11ff46395ef3775eca0c24a7d1a37b5a7 Author: Qingqing Zhuo Date: Tue Mar 16 15:32:08 2021 -0400 drm/amd/display: enable DP DSC Compliance automation [Why] Color depth data is not parsed during test requests. [How] Update display color depth according to color depth request from the test equipment. Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 9127daa0a8d88a6e6452eb8b7c9be4c3f42a867e Author: Stylon Wang Date: Tue Mar 2 19:25:56 2021 +0800 drm/amd/display: Guard ASSR with internal display flag [Why] ASSR enabling only considers capability declared in DPCD. We also need to check whether the connector is internal. [How] ASSR enabling need to check both DPCD capability and internal display flag. Signed-off-by: Stylon Wang Reviewed-by: Harry Wentland Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 6c8e1f3b95a2fb3dbad1fe0f72d2902f34cfb75f Author: Leo (Hanghong) Ma Date: Mon Mar 15 18:31:55 2021 -0400 drm/amd/display: Fix static checker warnings on tracebuff_fb [Why] Static analysis on linux-next has found a potential null pointer dereference; [How] Refactor the function, add ASSERT and remove the unnecessary check. Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 4758823355a0ed90bd9bfec508de41635a75d4d1 Author: Rodrigo Siqueira Date: Wed Mar 10 10:04:56 2021 -0500 drm/amd/display: Add refresh rate trace When we have to debug VRR issues, we usually want to know the current refresh rate; for this reason, it is handy to have a way to check in real-time the refresh rate value. This commit introduces a kernel trace that can provide such information. Signed-off-by: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 95574c6961476e26236f16b48bfd98d6a1ceff4c Author: Wesley Chalmers Date: Sun Feb 21 23:05:48 2021 -0500 drm/amd/display: BIOS LTTPR Caps Interface [WHY] Some platforms will have LTTPR capabilities forced on by VBIOS flags; the functions added here will access those flags. Signed-off-by: Wesley Chalmers Reviewed-by: Jun Lei Acked-by: Anson Jacob Tested-by: Dan Wheeler Signed-off-by: Alex Deucher commit 0698b13403788a646073fcd9b2294f2dce0ce429 Author: Feifei Xu Date: Mon Mar 29 15:56:14 2021 +0800 drm/amdgpu: skip PP_MP1_STATE_UNLOAD on aldebaran This message is not needed on Aldebaran. Signed-off-by: Feifei Xu Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 4a7ffbdb27d5c7f5820fb391563f0d22836c3d43 Author: Chengming Gui Date: Thu Mar 18 17:10:58 2021 +0800 drm/amd/amdgpu: set MP1 state to UNLOAD before reload its FW for vega20/ALDEBARAN When resume from gpu reset, need set MP1 state to UNLOAD before reload SMU FW otherwise will cause following errors: [ 121.642772] [drm] reserve 0x400000 from 0x87fec00000 for PSP TMR [ 123.801051] [drm] failed to load ucode id (24) [ 123.801055] [drm] psp command (0x6) failed and response status is (0x0) [ 123.801214] [drm:psp_load_smu_fw [amdgpu]] *ERROR* PSP load smu failed! [ 123.801398] [drm:psp_resume [amdgpu]] *ERROR* PSP resume failed [ 123.801536] [drm:amdgpu_device_fw_loading [amdgpu]] *ERROR* resume of IP block failed -22 [ 123.801632] amdgpu 0000:04:00.0: amdgpu: GPU reset(9) failed [ 123.801691] amdgpu 0000:07:00.0: amdgpu: GPU reset(9) failed [ 123.802899] amdgpu 0000:04:00.0: amdgpu: GPU reset end with ret = -22 v2: add error info and including ALDEBARAN also Signed-off-by: Chengming Gui Reviewed-and-tested-by: Guchun Chen Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 404b277bbe4945830e5ebc01a93ff9fe8403702f Author: Lijo Lazar Date: Fri Mar 26 17:47:20 2021 +0800 drm/amdgpu: Reset error code for 'no handler' case If reset handler is not implemented, reset error before proceeding. Fixes issue with the following trace - [ 106.508592] amdgpu 0000:b1:00.0: amdgpu: ASIC reset failed with error, -38 for drm dev, 0000:b1:00.0 [ 106.508972] amdgpu 0000:b1:00.0: amdgpu: GPU reset succeeded, trying to resume [ 106.509116] [drm] PCIE GART of 512M enabled. [ 106.509120] [drm] PTB located at 0x0000008000000000 [ 106.509136] [drm] VRAM is lost due to GPU reset! [ 106.509332] [drm] PSP is resuming... Signed-off-by: Lijo Lazar Reviewed-and-tested-by: Guchun Chen Signed-off-by: Alex Deucher commit fe8858bb097ba344a1d8280faef050504ce8d142 Author: Nikola Cornij Date: Fri Mar 26 19:13:52 2021 -0400 drm/amd/display: Fix black screen with scaled modes on some eDP panels [why] This was a regression introduced by commit: drm/amd/display: Skip modeset for front porch change Due to the change how timing parameters were set, scaled modes would cause a black screen on some eDP panels. Would probably apply to other displays (i.e. even non-eDP) that only have scaled modes, but such case is not that usual for external displays. [how] Pick up crtc frame dimensions when programming the timing unless it's FreeSync video mode. Fixes: 6f59f229f8ed7a ("drm/amd/display: Skip modeset for front porch change") Signed-off-by: Nikola Cornij Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 03e70a0271f68a2a2d1640ac68bdb5c65876336b Author: Alex Sierra Date: Wed Dec 16 09:59:23 2020 -0600 drm/amdgpu: ih reroute for newer asics than vega20 Starting Arcturus, it supports ih reroute through mmio directly in bare metal environment. This is also valid for newer asics such as Aldebaran. Signed-off-by: Alex Sierra Acked-by: Christian König Reviewed-by: Hawking Zhang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b010affea45d812d8d386cc49c3b2bafd74b4154 Author: Qu Huang Date: Thu Jan 28 20:14:25 2021 +0800 drm/amdkfd: dqm fence memory corruption Amdgpu driver uses 4-byte data type as DQM fence memory, and transmits GPU address of fence memory to microcode through query status PM4 message. However, query status PM4 message definition and microcode processing are all processed according to 8 bytes. Fence memory only allocates 4 bytes of memory, but microcode does write 8 bytes of memory, so there is a memory corruption. Changes since v1: * Change dqm->fence_addr as a u64 pointer to fix this issue, also fix up query_status and amdkfd_fence_wait_timeout function uses 64 bit fence value to make them consistent. Signed-off-by: Qu Huang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher commit 84e070f58ad22879787602bb18df656c326f6492 Author: Nirmoy Das Date: Fri Mar 26 16:08:10 2021 +0100 drm/amdgpu: fix offset calculation in amdgpu_vm_bo_clear_mappings() Offset calculation wasn't correct as start addresses are in pfn not in bytes. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 53df89ddc0ccb016edbf8c4cc1d66e75ade28837 Author: Tom St Denis Date: Fri Mar 26 07:07:25 2021 -0400 drm/amd/amdgpu: Add CP_IB1_BASE_* to gc_10_3_0 headers Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit f41f8e0886d3443f63240fd95a4e3921ec2da04a Author: Lijo Lazar Date: Fri Mar 26 13:43:14 2021 +0800 drm/amd/pm: Fix DPM level count on aldebaran Firmware returns zero-based max level, increment by one to get total levels. This fixes the issue of not showing all levels and current frequency when frequency is at max DPM level. Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 2d64d23e9596b1815fa1b536b3ac096afac10bd5 Author: Evan Quan Date: Thu Mar 25 13:16:48 2021 +0800 drm/amd/pm: unify the interface for gfx state setting No need to have special handling for swSMU supported ASICs. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit d2b0b4832b90fabab282e85f2a6eff085af95a98 Author: Evan Quan Date: Thu Mar 25 13:01:09 2021 +0800 drm/amd/pm: unify the interface for power gating No need to have special handling for swSMU supported ASICs. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit d34a1ea94aef6fd695283a9231191fd6f23f70bd Author: Evan Quan Date: Thu Mar 25 11:34:31 2021 +0800 drm/amd/pm: fix missing static declarations Add "static" declarations for those APIs used internally. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 2e4b2f7b570a58fc67f25c04a1f6ee93a0938caa Author: Evan Quan Date: Wed Mar 24 16:51:52 2021 +0800 drm/amd/pm: unify the interface for loading SMU microcode No need to have special handling for swSMU supported ASICs. Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 1fb4968bec71ed3e8f28918ab2cbed39d2383613 Author: Evan Quan Date: Tue Mar 23 16:30:38 2021 +0800 drm/amd/pm: no need to force MCLK to highest when no display connected Correct the check for vblank short. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Tested-by: Alex Deucher Signed-off-by: Alex Deucher commit 928a0fe6889ebc1cc0288b516d4604810ff1e2e7 Author: Lijo Lazar Date: Wed Mar 24 12:56:28 2021 +0800 drm/amdgpu: Fix build warnings Fix header guard and make internal functions static. Fixes the below warnings: drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_reset.h:24:9: warning: '__AMDUGPU_RESET_H__' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] drivers/gpu/drm/amd/amdgpu/aldebaran.c:110:6: warning: no previous prototype for function 'aldebaran_async_reset' [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/aldebaran_ppt.c:1435:5: warning: no previous prototype for function 'aldebaran_mode2_reset' [-Wmissing-prototypes] Signed-off-by: Lijo Lazar Reported-by: kernel test robot Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit ea4e96a7b3e7a8e23e81d0c8faca0fbb3f4679bb Author: Lijo Lazar Date: Tue Mar 23 18:50:50 2021 +0800 drm/amdgpu: Enable recovery on aldebaran Add aldebaran to devices which support recovery Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 142600e854b17f7dac25c8f971c030bb1700d2b6 Author: Lijo Lazar Date: Tue Mar 16 21:36:28 2021 +0800 drm/amdgpu: Add mode2 reset support for aldebaran v1: Aldebaran uses reset control to support mode2 reset. The sequences to reset and restore hardware context are specific to a particular configuration. v2: Clear bus mastering before reset. Fix coding style issues, drop unwanted variables and info log. Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5d89bb2d2f53b27460f77c89756597dee507cd34 Author: Lijo Lazar Date: Tue Mar 16 21:14:40 2021 +0800 drm/amdgpu: Make set PG/CG state functions public Expose PG/CG set states functions for other clients Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a2052839cd9fc5ee76c3ba05efbc939219b53cb4 Author: Lijo Lazar Date: Tue Mar 16 20:56:43 2021 +0800 drm/amdgpu: Add PSP public function to load a list of FWs v1: Adds a function to load a list of FWs as passed by the caller. This is needed as only a select need to loaded for some use cases. v2: Omit unrelated change, remove info log, fix return value when count is 0 Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 04442bf70debb197d4ed4e850aa77213e685b352 Author: Lijo Lazar Date: Tue Mar 16 20:31:51 2021 +0800 drm/amdgpu: Add reset control handling to reset workflow This prefers reset control based handling if it's implemented for a particular ASIC. If not, it takes the legacy path. It uses the legacy method of preparing environment (job, scheduler tasks) and restoring environment. v2: remove unused variable (Alex) Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e071dce38f0a3acb2f6d019c6bb7933fd20d3357 Author: Lijo Lazar Date: Tue Mar 16 20:19:06 2021 +0800 drm/amdgpu: Add reset control to amdgpu_device v1: Add generic amdgpu_reset_control to handle different types of resets. It may be added at device, hive or ip level. Each reset control has a list of handlers associated with it to handle different types of reset. Reset control is responsible for choosing the right handler given a particular reset context. Handler objects may implement a set of functions on how to handle a particular type of reset. prepare_env = Prepare environment/software context (not used currently). prepare_hwcontext = Prepare hardware context for the reset. perform_reset = Perform the type of reset. restore_hwcontext = Restore the hw context after reset. restore_env = Restore the environment after reset (not used currently). Reset context carries the context of reset, as of now this is based on the parameters used for current set of resets. v2: Fix coding style Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c941e9fe9c65da0ac2f85f5f89c7bec74c54ac8c Author: Lijo Lazar Date: Tue Mar 16 19:47:51 2021 +0800 drm/amd/pm: Add support for reset completion on aldebaran v1: On aldebaran, after hardware context restore, another handshake needs to happen with PMFW so that reset recovery is complete from PMFW side. Treat this as RESET_COMPLETE event for aldebaran. v2: Cleanup coding style, info logs Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6d77dd9f75bc7fd6b984aeea48e4919523c2e3c9 Author: Lijo Lazar Date: Tue Mar 16 19:34:38 2021 +0800 drm/amd/pm: Add function to wait for smu events v1: Add function to wait for specific event/states from PMFW v2: Add mutex lock, simplify sequence Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e42569d02acb25bc3a840caeb6dbf35d859dcec4 Author: Lijo Lazar Date: Tue Mar 16 19:19:09 2021 +0800 drm/amd/pm: Modify mode2 msg sequence on aldebaran v1: During mode2 reset, PCI space is lost after message is sent. Restore PCI space before waiting for response from firmware. v2: Move mode2 sequence to aldebaran and update PMFW version. Handle generic sequence in smu13 without PMFW version check. Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e6c6338f393b74ac0b303d567bb918b44ae7ad75 Author: Jack Zhang Date: Mon Mar 8 12:41:27 2021 +0800 drm/amd/amdgpu implement tdr advanced mode [Why] Previous tdr design treats the first job in job_timeout as the bad job. But sometimes a later bad compute job can block a good gfx job and cause an unexpected gfx job timeout because gfx and compute ring share internal GC HW mutually. [How] This patch implements an advanced tdr mode.It involves an additinal synchronous pre-resubmit step(Step0 Resubmit) before normal resubmit step in order to find the real bad job. 1. At Step0 Resubmit stage, it synchronously submits and pends for the first job being signaled. If it gets timeout, we identify it as guilty and do hw reset. After that, we would do the normal resubmit step to resubmit left jobs. 2. For whole gpu reset(vram lost), do resubmit as the old way. v2: squash in build fix (Alex) Signed-off-by: Jack Zhang Reviewed-by: Andrey Grodzovsky Signed-off-by: Alex Deucher commit 030bb4addb36ee94e286eb51486f990cac433825 Author: Nirmoy Das Date: Mon Mar 15 16:02:37 2021 +0100 drm/amdgpu: make BO type check less restrictive BO with ttm_bo_type_sg type can also have tiling_flag and metadata. So so BO type check for only ttm_bo_type_kernel. Reviewed-by: Christian König Signed-off-by: Nirmoy Das Reported-by: Tom StDenis Signed-off-by: Alex Deucher commit cc1bcf85b0112ad660e70464d00d3e36e103cedd Author: Nirmoy Das Date: Mon Mar 8 14:03:35 2021 +0100 drm/amdgpu: use amdgpu_bo_user bo for metadata and tiling flag Tiling flag and metadata are only needed for BOs created by amdgpu_gem_object_create(), so we can remove those from the base class. v2: * squash tiling_flags and metadata relared patches into one * use BUG_ON for non ttm_bo_type_device type when accessing tiling_flags and metadata._ v3: *include to_amdgpu_bo_user Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 22b40f7a3ad17176b05413893228a82823bbe9e5 Author: Nirmoy Das Date: Tue Mar 9 08:31:25 2021 +0100 drm/amdgpu: use amdgpu_bo_create_user() for when possible Use amdgpu_bo_create_user() for all the BO allocations for ttm_bo_type_device type. v2: include amdgpu_amdkfd_alloc_gws() as well it calls amdgpu_bo_create() for ttm_bo_type_device Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9ad0d033ed4be2370bfff6589fc52ab220e7c514 Author: Nirmoy Das Date: Fri Mar 5 13:00:22 2021 +0100 drm/amdgpu: introduce struct amdgpu_bo_user Implement a new struct amdgpu_bo_user as subclass of struct amdgpu_bo and a function to created amdgpu_bo_user bo with a flag to identify the owner. v2: amdgpu_bo_to_amdgpu_bo_user -> to_amdgpu_bo_user() Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9fd5543e9552acff859af7f154bd3402b7983dc5 Author: Nirmoy Das Date: Mon Mar 8 14:00:06 2021 +0100 drm/amdgpu: allow variable BO struct creation Allow allocating BO structures with different structure size than struct amdgpu_bo. v2: Check bo_ptr_size in all amdgpu_bo_create() caller. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 87cc7f9ebf7ce10f82250002d667ef3e93a79d44 Author: Christian König Date: Wed Feb 10 13:55:13 2021 +0100 drm/amdgpu: load balance VCN3 decode as well v8 Add VCN3 IB parsing to figure out to which instance we can send the stream for decode. v2: remove VCN instance limit as well, fix amdgpu_cs_find_mapping, check supported formats instead of unsupported. v3: fix typo and error handling v4: make sure the message BO is CPU accessible v5: fix addr calculation once more v6: only check message buffers v7: fix constant and use defines v8: fix create msg calculation Signed-off-by: Christian König Reviewed-by: Sonny Jiang Signed-off-by: Alex Deucher commit c62dfdbbf7109592d6aa6fc59fb954dba12743d7 Author: Christian König Date: Tue Feb 2 13:13:29 2021 +0100 drm/amdgpu: share scheduler score on VCN3 instances The VCN3 instances can do both decode as well as encode. Share the scheduler load balancing score and remove fixing encode to only the second instance. Signed-off-by: Christian König Reviewed-and-Tested-by: Leo Liu Signed-off-by: Alex Deucher commit c107171b8d3241d872807c04917e7e8fb70e8b71 Author: Christian König Date: Tue Feb 2 13:05:49 2021 +0100 drm/amdgpu: add the sched_score to amdgpu_ring_init Allow separate ring to share the same scheduler score. No functional change. Signed-off-by: Christian König Reviewed-and-Tested-by: Leo Liu Signed-off-by: Alex Deucher commit 7df4ceb60fa9a3c5160cfd5b696657291934a2c9 Author: Sefa Eyeoglu Date: Tue Mar 16 22:50:06 2021 +0100 drm/amd/display: check fb of primary plane Sometimes the primary plane might not be initialized (yet), which causes dm_check_crtc_cursor to divide by zero. Apparently a weird state before a S3-suspend causes the aforementioned divide-by-zero error when resuming from S3. This was explained in bug 212293 on Bugzilla. To avoid this divide-by-zero error we check if the primary plane's fb isn't NULL. If it's NULL the src_w and src_h attributes will be 0, which would cause a divide-by-zero. This fixes Bugzilla report 212293 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=212293 Fixes: 12f4849a1cfd69f3 ("drm/amd/display: check cursor scaling") Reviewed-by: Simon Ser Reviewed-by: Harry Wentland Signed-off-by: Sefa Eyeoglu Signed-off-by: Alex Deucher commit 5af50b0b1c200d31f6798a9ddd18aa706c868306 Author: Bindu Ramamurthy Date: Tue Mar 16 17:08:47 2021 -0400 drm/amd/display: Allow idle optimization based on vblank. [Why] idle optimization was being disabled after commit. [How] check vblank count for display off and enable idle optimization based on this count. Also,check added to ensure vblank count does not decrement, when count reaches 0. Reviewed-by: Kenneth Feng Signed-off-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 5bf314abfb8a3edf84af9565c12156041395d3a8 Author: Bhaskar Chowdhury Date: Tue Mar 23 02:36:12 2021 +0530 drm/amd: Fix a typo in two different sentences s/defintion/definition/ .....two different places. Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit 63a93023ee8ca1c0f238d7da1a6deccf8febed92 Author: Bhaskar Chowdhury Date: Thu Mar 25 14:23:24 2021 +0530 drm/amd/amdgpu/gfx_v7_0: Trivial typo fixes s/acccess/access/ s/inferface/interface/ s/sequnce/sequence/ .....two different places. s/retrive/retrieve/ s/sheduling/scheduling/ s/independant/independent/ s/wether/whether/ ......two different places. s/emmit/emit/ s/synce/sync/ Reviewed-by: Nirmoy Das Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit f19a2067a2e1329d3cd15c9845c44c16f068e2c3 Author: Bhaskar Chowdhury Date: Thu Mar 25 04:59:41 2021 +0530 drm/radeon/r600_cs: Few typo fixes s/miror/mirror/ s/needind/needing/ s/informations/information/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit 9e76e7b2066657e0e04906b6941ee0d364d8e3b8 Author: Arnd Bergmann Date: Wed Mar 24 14:36:52 2021 +0100 amdgpu: securedisplay: simplify i2c hexdump output A previous fix I did left a rather complicated loop in amdgpu_securedisplay_debugfs_write() for what could be expressed in a simple sprintf, as Rasmus pointed out. This drops the leading 0x for each byte, but is otherwise much nicer. Suggested-by: Rasmus Villemoes Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit f4a9be998c8ee39a30a68cb775c91928fe10a384 Author: Mark Yacoub Date: Wed Mar 24 16:16:24 2021 -0400 drm/amdgpu: Ensure that the modifier requested is supported by plane. On initializing the framebuffer, call drm_any_plane_has_format to do a check if the modifier is supported. drm_any_plane_has_format calls dm_plane_format_mod_supported which is extended to validate that the modifier is on the list of the plane's supported modifiers. The bug was caught using igt-gpu-tools test: kms_addfb_basic.addfb25-bad-modifier Tested on ChromeOS Zork by turning on the display, running an overlay test, and running a YT video. === Changes from v1 === Explicitly handle DRM_FORMAT_MOD_INVALID modifier. Cc: Alex Deucher Cc: Bas Nieuwenhuizen Signed-off-by: Mark Yacoub Signed-off-by: Alex Deucher commit a9ca9bb3af8530fc879d37bfe99f68386073761b Author: Tian Tao Date: Wed Mar 24 17:17:41 2021 +0800 drm/amd/pm: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/gpu/drm/amd/pm/amdgpu_pm.c:1940:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:1978:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2022:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:294:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:154:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:496:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:512:9-17: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:1740:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:1667:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2074:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2047:9-17: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2768:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2738:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2442:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3246:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3253:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2458:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3047:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3133:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3209:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3216:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2410:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2496:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2470:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2426:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2965:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:2972:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3006:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/amd/pm/amdgpu_pm.c:3013:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Signed-off-by: Alex Deucher commit 36000c7a51080840902d79e1558851076ecb7a96 Author: Tian Tao Date: Wed Mar 24 17:17:40 2021 +0800 drm/amdgpu: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/gpu//drm/amd/amdgpu/amdgpu_ras.c:434:9-17: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c:220:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_xgmi.c:249:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/df_v3_6.c:208:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_psp.c:2973:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:75:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:112:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:58:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:93:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_vram_mgr.c:125:9-17: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_gtt_mgr.c:52:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_gtt_mgr.c:71:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_device.c:140:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_device.c:164:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_device.c:186:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_device.c:208:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/amd/amdgpu/amdgpu_atombios.c:1916:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Signed-off-by: Alex Deucher commit 2b0e617af3e09e71e9564208678a558ec1e6163d Author: Tian Tao Date: Wed Mar 24 14:47:55 2021 +0800 drm/radeon/radeon_pm: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/gpu//drm/radeon/radeon_pm.c:521:9-17: WARNING: use scnprintf or sprintf drivers/gpu//drm/radeon/radeon_pm.c:475:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/radeon/radeon_pm.c:418:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/radeon/radeon_pm.c:363:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/radeon/radeon_pm.c:734:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/radeon/radeon_pm.c:688:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/radeon/radeon_pm.c:704:8-16: WARNING: use scnprintf or sprintf drivers/gpu//drm/radeon/radeon_pm.c:755:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Signed-off-by: Alex Deucher commit d2ae842d24625756fb7ac5440335ed2973463b7d Author: Alex Deucher Date: Wed Mar 24 17:09:41 2021 -0400 drm/amdgpu/pm: bail on sysfs/debugfs queries during platform suspend The GPU is in the process of being shutdown. Spurious queries during suspend and resume can put the SMU into a bad state. Runtime PM is handled dynamically so we check if we are in non-runtime suspend. Reviewed-by: Evan Quan Acked-by: Christian König Signed-off-by: Alex Deucher commit dd67d7a6202c4ec173b1aac96be6d4cc4d6166cc Author: Alex Deucher Date: Tue Mar 23 23:48:49 2021 -0400 drm/amdgpu/pm: mark pcie link/speed arrays as const They are read only. Noticed-by: Dave Airlie Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 266b2d25e3fe741ad8413ce913ef462bfbd823a0 Author: Christian König Date: Fri Mar 19 13:24:03 2021 +0100 drm/amdgpu: remove irq_src->data handling That is unused for quite some time now. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit d7232ec626136a7d79ac15663582e047bb511982 Author: Anson Jacob Date: Tue Mar 23 16:43:42 2021 -0400 drm/amd/display: Removing unused code from dmub_cmd.h Removing code that is not used at the moment. Signed-off-by: Anson Jacob Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 084e2640e51626f413f85663e3ba7e32d4272477 Author: Luben Tuikov Date: Thu Mar 11 19:11:01 2021 -0500 drm/amdgpu: Fix check for RAS support Use positive logic to check for RAS support. Rename the function to actually indicate what it is testing for. Essentially, make the function a predicate with the correct name. Cc: Stanley Yang Cc: Alexander Deucher Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 4711c033f6d88e89c3423d6df7b2a7e33005fed6 Author: Luben Tuikov Date: Fri Mar 19 23:49:38 2021 -0400 drm/amd/display: Use appropriate DRM_DEBUG_... level Convert IRQ-based prints from DRM_DEBUG_DRIVER to the appropriate DRM log type, since IRQ-based prints drown out the rest of the driver's DRM_DEBUG_DRIVER messages. v2: Update as per feedback to fine-tune for each type of DRM log level. Cc: Harry Wentland Cc: Alex Deucher Signed-off-by: Luben Tuikov Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 9b7f1e04677a9742ff93c66222c01bb30a24779a Author: Philip Cox Date: Wed Mar 24 09:15:45 2021 -0400 drm/amdgpu: Set amdgpu.noretry=1 for Arcturus Setting amdgpu.noretry=1 as default for Arcturus. Signed-off-by: Philip Cox Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit cad7b7510c4437687ea3ae3d0ecaf0982f1e235f Author: John Clements Date: Wed Mar 24 21:13:17 2021 +0800 drm/amdgpu: added support for dynamic GECC updated host to send boot config to psp to enable GECC for sienna cichlid Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit e40889ecfd795c0f8ecf20473ed61633625f233e Author: John Clements Date: Wed Mar 24 21:12:06 2021 +0800 drm/amdgpu: update host to psp interface added interface support for setting boot config Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 9a8fe5557d76274f524bfa8cf447551c9acba872 Author: Lijo Lazar Date: Tue Mar 23 20:53:12 2021 +0800 drm/amd/pm: Update aldebaran pmfw interface Update aldebaran PMFW interfaces to version 0x6 Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 437f3e0b6eb24cc777473ae55f4b98e720258779 Author: Horace Chen Date: Tue Mar 23 14:22:22 2021 +0800 drm/amdgpu: move vram recover into sriov full access [what] currently driver recover vram after full access, which may hit a corner case that meanwhile another whole gpu reset may be triggered by another VF, which will cause vram recover fail then fail the whole device reset. [how] move the recover vram into full access. So another bad VF will not disturb the recover sequence for this vf. Signed-off-by: Horace Chen Reviewed by: Monk.Liu Signed-off-by: Alex Deucher commit 181e772f7d1ac724ede20d37f5ea2dca9359d797 Author: Evan Quan Date: Fri Mar 19 16:22:17 2021 +0800 drm/amd/pm: drop redundant and unneeded BACO APIs V2 Use other APIs which are with the same functionality but much more clean. V2: drop mediate unneeded interface Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c6ce68e67659fd245dc261e5f737f38b61389906 Author: Evan Quan Date: Fri Mar 19 14:00:15 2021 +0800 drm/amd/pm: label these APIs used internally as static Also drop unnecessary header file and declarations. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 5f400639dd4ef9e23a74f72cdd007fa67ee35e5c Author: Evan Quan Date: Fri Mar 19 12:15:47 2021 +0800 drm/amd/pm: make DAL communicate with SMU through unified interfaces No need to have special handlings for swSMU supported ASICs. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 42b599732ee1d4ac742760050603fb6046789011 Author: Alex Deucher Date: Tue Mar 23 12:59:26 2021 -0400 drm/amdgpu/display: fix memory leak for dimgrey cavefish We need to clean up the dcn3 clk_mgr. Acked-by: Nirmoy Das Signed-off-by: Alex Deucher commit 19c383affd5866fffe7646b913aa78cbdd608325 Author: Arnd Bergmann Date: Tue Mar 23 14:04:20 2021 +0100 amdgpu: fix gcc -Wrestrict warning gcc warns about an sprintf() that uses the same buffer as source and destination, which is undefined behavior in C99: drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c: In function 'amdgpu_securedisplay_debugfs_write': drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:141:6: error: 'sprintf' argument 3 overlaps destination object 'i2c_output' [-Werror=restrict] 141 | sprintf(i2c_output, "%s 0x%X", i2c_output, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 142 | securedisplay_cmd->securedisplay_out_message.send_roi_crc.i2c_buf[i]); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c:97:7: note: destination object referenced by 'restrict'-qualified argument 1 was declared here 97 | char i2c_output[256]; | ^~~~~~~~~~ Rewrite it to remember the current offset into the buffer instead. Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 7d98d416c2cc1c1f7d9508e887de4630e521d797 Author: Arnd Bergmann Date: Mon Mar 22 12:54:42 2021 +0100 amdgpu: avoid incorrect %hu format string clang points out that the %hu format string does not match the type of the variables here: drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c:263:7: warning: format specifies type 'unsigned short' but the argument has type 'unsigned int' [-Wformat] version_major, version_minor); ^~~~~~~~~~~~~ include/drm/drm_print.h:498:19: note: expanded from macro 'DRM_ERROR' __drm_err(fmt, ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ Change it to a regular %u, the same way a previous patch did for another instance of the same warning. Reviewed-by: Christian König Reviewed-by: Tom Rix Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 32c811b0972ca10a49217c35080771c64b7ddca6 Author: Wan Jiabing Date: Mon Mar 22 20:02:25 2021 +0800 drivers: gpu: Remove duplicate include of amdgpu_hdp.h amdgpu_hdp.h has been included at line 91, so remove the duplicate include. Acked-by: Christian König Signed-off-by: Wan Jiabing Signed-off-by: Alex Deucher commit d73610211eec8aa027850982b1a48980aa1bc96e Author: Qu Huang Date: Sun Mar 21 16:28:18 2021 +0800 drm/amdkfd: Fix cat debugfs hang_hws file causes system crash bug Here is the system crash log: [ 1272.884438] BUG: unable to handle kernel NULL pointer dereference at (null) [ 1272.884444] IP: [< (null)>] (null) [ 1272.884447] PGD 825b09067 PUD 8267c8067 PMD 0 [ 1272.884452] Oops: 0010 [#1] SMP [ 1272.884509] CPU: 13 PID: 3485 Comm: cat Kdump: loaded Tainted: G [ 1272.884515] task: ffff9a38dbd4d140 ti: ffff9a37cd3b8000 task.ti: ffff9a37cd3b8000 [ 1272.884517] RIP: 0010:[<0000000000000000>] [< (null)>] (null) [ 1272.884520] RSP: 0018:ffff9a37cd3bbe68 EFLAGS: 00010203 [ 1272.884522] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000014d5f [ 1272.884524] RDX: fffffffffffffff4 RSI: 0000000000000001 RDI: ffff9a38aca4d200 [ 1272.884526] RBP: ffff9a37cd3bbed0 R08: ffff9a38dcd5f1a0 R09: ffff9a31ffc07300 [ 1272.884527] R10: ffff9a31ffc07300 R11: ffffffffaddd5e9d R12: ffff9a38b4e0fb00 [ 1272.884529] R13: 0000000000000001 R14: ffff9a37cd3bbf18 R15: ffff9a38aca4d200 [ 1272.884532] FS: 00007feccaa67740(0000) GS:ffff9a38dcd40000(0000) knlGS:0000000000000000 [ 1272.884534] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1272.884536] CR2: 0000000000000000 CR3: 00000008267c0000 CR4: 00000000003407e0 [ 1272.884537] Call Trace: [ 1272.884544] [] ? seq_read+0x130/0x440 [ 1272.884548] [] vfs_read+0x9f/0x170 [ 1272.884552] [] SyS_read+0x7f/0xf0 [ 1272.884557] [] system_call_fastpath+0x22/0x27 [ 1272.884558] Code: Bad RIP value. [ 1272.884562] RIP [< (null)>] (null) [ 1272.884564] RSP [ 1272.884566] CR2: 0000000000000000 Signed-off-by: Qu Huang Signed-off-by: Alex Deucher commit a8a1de90e0dcb8d0af4915e991271ecf4dbc3b09 Author: Bhaskar Chowdhury Date: Sun Mar 21 00:06:42 2021 +0530 drm/atomic: Couple of typo fixes s/seralization/serialization/ s/parallism/parallelism/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit 05eacc0f8f6c7e27f1841343611f4bed9ee178c1 Author: Tong Zhang Date: Sun Mar 21 11:19:07 2021 -0400 drm/radeon: don't evict if not initialized TTM_PL_VRAM may not initialized at all when calling radeon_bo_evict_vram(). We need to check before doing eviction. [ 2.160837] BUG: kernel NULL pointer dereference, address: 0000000000000020 [ 2.161212] #PF: supervisor read access in kernel mode [ 2.161490] #PF: error_code(0x0000) - not-present page [ 2.161767] PGD 0 P4D 0 [ 2.163088] RIP: 0010:ttm_resource_manager_evict_all+0x70/0x1c0 [ttm] [ 2.168506] Call Trace: [ 2.168641] radeon_bo_evict_vram+0x1c/0x20 [radeon] [ 2.168936] radeon_device_fini+0x28/0xf9 [radeon] [ 2.169224] radeon_driver_unload_kms+0x44/0xa0 [radeon] [ 2.169534] radeon_driver_load_kms+0x174/0x210 [radeon] [ 2.169843] drm_dev_register+0xd9/0x1c0 [drm] [ 2.170104] radeon_pci_probe+0x117/0x1a0 [radeon] Reviewed-by: Christian König Suggested-by: Christian König Signed-off-by: Tong Zhang Signed-off-by: Alex Deucher commit 6ae2784114c037c770d8726e9d3fdae72907656b Author: Alex Sierra Date: Wed Apr 1 16:35:06 2020 -0500 drm/amdgpu: replace per_device_list by array Remove per_device_list from kfd_process and replace it with a kfd_process_device pointers array of MAX_GPU_INSTANCES size. This helps to manage the kfd_process_devices binded to a specific kfd_process. Also, functions used by kfd_chardev to iterate over the list were removed, since they are not valid anymore. Instead, it was replaced by a local loop iterating the array. Signed-off-by: Alex Sierra Signed-off-by: Felix Kuehling Reviewed-by: Jonathan Kim Signed-off-by: Alex Deucher commit 5eba2858416df5376e577675836ecf4a65b2f306 Author: Aric Cyr Date: Sun Mar 14 23:59:22 2021 -0400 drm/amd/display: 3.2.128 This version brings along following fixes: - Populate socclk entries for dcn2.1 - hide VGH asic specific structs - Add kernel doc to crc_rd_wrk field - revert max lb lines change - Log DMCUB trace buffer events - Fix debugfs link_settings entry - revert max lb use by default for n10 - Deallocate IRQ handlers on amdgpu_dm_irq_fini - Fixed Clock Recovery Sequence - Fix UBSAN: shift-out-of-bounds warning - [FW Promotion] Release 0.0.57 - Change input parameter for set_drr - Use pwrseq instance to determine eDP instance Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 7d707dddc95ce43b451beb14801f8c8f8bbfe133 Author: Jake Wang Date: Wed Mar 17 14:26:55 2021 -0400 drm/amd/display: Use pwrseq instance to determine eDP instance [Why & How] Link index doesn't always correspond to the appropriate eDP instance. We can assume lower link index is a lower eDP instance and set panel control instance accordingly. Tested-by: Daniel Wheeler Signed-off-by: Jake Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Signed-off-by: Alex Deucher commit 49c70ece54b0d1c51bc31b2b0c1070777c992c26 Author: Alvin Lee Date: Mon Apr 20 10:45:27 2020 -0400 drm/amd/display: Change input parameter for set_drr [Why] Change set_drr to pass in the entire dc_crtc_timing_adjust structure instead of passing in the parameters individually. This is to more easily pass in required parameters in the adjust structure when it gets updated. Tested-by: Daniel Wheeler Signed-off-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 8c1f05e2472c1326e61dfb0a6c1d3c668f4616a9 Author: Anthony Koo Date: Fri Mar 12 16:48:57 2021 -0500 drm/amd/display: [FW Promotion] Release 0.0.57 Tested-by: Daniel Wheeler Signed-off-by: Anthony Koo Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 54718747a6e1037317a8b3610c3be40621b2b75e Author: Anson Jacob Date: Mon Mar 1 14:25:44 2021 -0500 drm/amd/display: Fix UBSAN: shift-out-of-bounds warning [Why] On NAVI14 CONFIG_UBSAN reported shift-out-of-bounds at display_rq_dlg_calc_20v2.c:304:38 rq_param->misc.rq_c.blk256_height is 0 when chroma(*_c) is invalid. dml_log2 returns -1023 for log2(0), although log2(0) is undefined. Which ended up as: rq_param->dlg.rq_c.swath_height = 1 << -1023 [How] Fix applied on all dml versions. 1. Ensure dml_log2 is only called if the argument is greater than 0. 2. Subtract req128_l/req128_c from log2_swath_height_l/log2_swath_height_c only when it is greater than 0. Tested-by: Daniel Wheeler Signed-off-by: Anson Jacob Reviewed-by: Dmytro Laktyushkin Reviewed-by: Jun Lei Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 3d223c5528a387f84ed8bdbed2ce05227be9afe0 Author: David Galiffi Date: Thu Mar 11 18:13:12 2021 -0500 drm/amd/display: Fixed Clock Recovery Sequence [Why] When performing clock recovery, if a pre-emphasis adjustment is requested, but voltage swing remains constant, the the retry counter will not be reset. This can lead to prematurely failing link training. [How] Reset the clock recovery retry counter if an adjustment is requested for either voltage swing or pre-emphasis. Tested-by: Daniel Wheeler Signed-off-by: Calvin Hou Signed-off-by: David Galiffi Reviewed-by: Jun Lei Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 4aa8607e25942077cfc6268b51d6190993c207ab Author: Victor Lu Date: Fri Mar 5 11:24:37 2021 -0500 drm/amd/display: Deallocate IRQ handlers on amdgpu_dm_irq_fini [why] The amdgpu_dm IRQ handlers are not freed during the IRQ teardown. [how] Add function to deallocate IRQ handlers on amdgpu_dm_irq_fini step. Tested-by: Daniel Wheeler Signed-off-by: Victor Lu Reviewed-by: Roman Li Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit b4e031e40f49fdb3b36b24084a752b8c6c10fa3b Author: Dmytro Laktyushkin Date: Thu Mar 11 18:25:34 2021 -0500 drm/amd/display: revert max lb use by default for n10 This is causing a pstate change underflow regression for unknown reason Tested-by: Daniel Wheeler Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit c006a1c00de29e8cdcde1d0254ac23433ed3fee9 Author: Fangzhi Zuo Date: Tue Mar 9 11:22:36 2021 -0500 drm/amd/display: Fix debugfs link_settings entry 1. Catch invalid link_rate and link_count settings 2. Call dc interface to overwrite preferred link settings, and wait until next stream update to apply the new settings. Tested-by: Daniel Wheeler Signed-off-by: Fangzhi Zuo Reviewed-by: Nicholas Kazlauskas Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit a08f16cfe8dc7402228840d9ef857d6253bba9ee Author: Leo (Hanghong) Ma Date: Fri Feb 19 16:22:58 2021 -0500 drm/amd/display: Log DMCUB trace buffer events [Why] We want to log DMCUB trace buffer events as Linux kernel traces. [How] Register an IRQ handler for DMCUB outbox0 interrupt in amdgpu_dm, and log the messages in the DMCUB tracebuffer to a new DMCUB TRACE_EVENT as soon as we receive the outbox0 IRQ from DMCUB FW. Tested-by: Daniel Wheeler Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 234cc26f7dd15761dcd2ef818b9acaf4fe9cf92e Author: Dmytro Laktyushkin Date: Thu Mar 11 09:19:34 2021 -0500 drm/amd/display: revert max lb lines change Some hardware revisions do have a max number of lines limitation not honouring which can cause pstate switch underflow. Tested-by: Daniel Wheeler Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 1c85f3db778ffbeba91d71e9d6c8aa299f9b4efd Author: Wayne Lin Date: Wed Mar 10 16:29:51 2021 +0800 drm/amd/display: Add kernel doc to crc_rd_wrk field [Why] Receive warning message below: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h:380: warning: Function parameter or member 'crc_rd_wrk' not described in 'amdgpu_display_manager' [How] Add documentation for crc_rd_wrk. Tested-by: Daniel Wheeler Reported-by: Stephen Rothwell Signed-off-by: Wayne Lin Reviewed-by: Rodrigo Siqueira Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 62eab49faae7c393c85eaf5e48fdc2674dd152cd Author: Dmytro Laktyushkin Date: Tue Mar 9 15:58:18 2021 -0500 drm/amd/display: hide VGH asic specific structs The pmfw structs are specific to the asic and should not be present in base clk_mgr struct v2: squash in SI fix (Alex) Tested-by: Daniel Wheeler Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Yang Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 4b256c28ad08116357055bd45d9726bf49fdfe47 Author: Roman Li Date: Tue Feb 23 21:28:25 2021 -0500 drm/amd/display: Populate socclk entries for dcn2.1 [Why] Dcn2.1 socclk entries in bandwidth params are not initialized. They are not used now, but will be needed for dml validation. [How] Populate socclk bw params from dpm clock table Tested-by: Daniel Wheeler Signed-off-by: Roman Li Reviewed-by: Dmytro Laktyushkin Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 639979887a11e9c2c5d7e3ce2a560ed16b68854a Author: xinhui pan Date: Mon Mar 22 08:48:54 2021 +0800 drm/amdgpu: Use correct size when access vram To make size is 4 byte aligned. Use &~0x3ULL instead of &3ULL. Signed-off-by: xinhui pan Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 9113a0fb614b3f42a8927d47198cf73854a3b016 Author: Guchun Chen Date: Tue Mar 23 13:41:00 2021 +0800 drm/amd/pm: fix gpu reset failure by MP1 state setting Instead of blocking varied unsupported MP1 state in upper level, defer and skip such MP1 state handling in specific ASIC. Signed-off-by: Lijo Lazar Signed-off-by: Guchun Chen Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit c93ebea0cbc3ed56e05a7948adb6e7c4c4fe2f7d Author: Guchun Chen Date: Mon Mar 22 14:07:38 2021 +0800 drm/amd/pm: fix MP1 state setting failure in s3 test Skip PP_MP1_STATE_NONE in MP1 state setting, otherwise, it will break S3 sequence. [ 50.188269] [drm:amdgpu_device_ip_suspend_phase2 [amdgpu]] *ERROR* SMC failed to set mp1 state 0, -22 [ 50.969901] amdgpu 0000:03:00.0: amdgpu: SMU is resuming... [ 50.970024] sd 0:0:0:0: [sda] Starting disk [ 50.979723] serial 00:02: activated [ 51.353644] ata4: SATA link down (SStatus 4 SControl 300) [ 51.353669] ata3: SATA link down (SStatus 4 SControl 300) [ 51.353747] ata6: SATA link down (SStatus 4 SControl 300) [ 51.357694] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300) [ 51.357711] ata5: SATA link down (SStatus 4 SControl 300) [ 51.357729] ata2: SATA link down (SStatus 4 SControl 300) [ 51.358005] ata1.00: supports DRM functions and may not be fully accessible [ 51.360491] ata1.00: supports DRM functions and may not be fully accessible [ 51.362573] ata1.00: configured for UDMA/133 [ 51.362610] ahci 0000:00:17.0: port does not support device sleep [ 51.362946] ata1.00: Enabling discard_zeroes_data [ 52.566438] amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state! [ 54.126316] amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state! [ 54.126317] amdgpu 0000:03:00.0: amdgpu: Failed to SetDriverDramAddr! [ 54.126318] amdgpu 0000:03:00.0: amdgpu: Failed to setup smc hw! [ 54.126319] [drm:amdgpu_device_ip_resume_phase2 [amdgpu]] *ERROR* resume of IP block failed -62 [ 54.126398] amdgpu 0000:03:00.0: amdgpu: amdgpu_device_ip_resume failed (-62). [ 54.126399] PM: dpm_run_callback(): pci_pm_resume+0x0/0x90 returns -62 [ 54.126403] PM: Device 0000:03:00.0 failed to resume async: error -62 Fixes: 1689fca0d62aa7 ("drm/amd/pm: fix Navi1x runtime resume failure V2") Signed-off-by: Evan Quan Signed-off-by: Guchun Chen Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 85a44ecd34e35bc4dd3e23279e827b2b0360c36d Author: Shirish S Date: Fri Mar 19 12:28:40 2021 +0530 drm/amdgpu/powerplay/smu10: refactor AMDGPU_PP_SENSOR_GPU_LOAD refactor AMDGPU_PP_SENSOR_GPU_LOAD to ensure code consistency with other commands Signed-off-by: Shirish S Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 15e16daa35ba15424969cccb1b0aad2b8810e761 Author: Nirmoy Das Date: Fri Mar 19 19:54:31 2021 +0100 drm/amdgpu: fix amdgpu_res_first() Fix size comparison in the resource cursor. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit eec64a5e5d07e6e66a0c7255b4324183ed57df1a Author: Alex Deucher Date: Tue Feb 16 12:22:40 2021 -0500 drm/amdgpu/display: restore AUX_DPHY_TX_CONTROL for DCN2.x Commit 098214999c8f added fetching of the AUX_DPHY register values from the vbios, but it also changed the default values in the case when there are no values in the vbios. This causes problems with displays with high refresh rates. To fix this, switch back to the original default value for AUX_DPHY_TX_CONTROL. Fixes: 098214999c8f ("drm/amd/display: Read VBIOS Golden Settings Tbl") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1426 Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: Igor Kravchenko Cc: Aric Cyr Cc: Aurabindo Pillai commit 3bb1105071fb974e3e3ca2f92ddfd69c81285ab6 Author: Nirmoy Das Date: Wed Mar 17 11:38:11 2021 +0100 drm/amd/display: use GFP_ATOMIC in dcn20_resource_construct Replace GFP_KERNEL with GFP_ATOMIC as dcn20_resource_construct() can't sleep. Partially fixes: https://bugzilla.kernel.org/show_bug.cgi?id=212311 as dcn20_resource_construct() also calls into SMU functions which does mutex_lock(). Reviewed-by: Harry Wentland Signed-off-by: Nirmoy Das Signed-off-by: Alex Deucher commit 3ca401459cf1b22ad1748f8854e1264b4240cc4e Author: Lee Jones Date: Fri Mar 19 08:24:16 2021 +0000 drm/amd/display/dc/calcs/dce_calcs: Remove some large variables from the stack Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function ‘bw_calcs_init’: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:2726:1: warning: the frame size of 1336 bytes is larger than 1024 bytes [-Wframe-larger-than=] v2: squash in sizeof fix Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Harry Wentland Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2be8989d0fc29659b2b05580dd280a75212c46b7 Author: Lee Jones Date: Fri Mar 19 08:24:15 2021 +0000 drm/amd/display/dc/calcs/dce_calcs: Move some large variables from the stack to the heap Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function ‘calculate_bandwidth’: drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:2016:1: warning: the frame size of 1216 bytes is larger than 1024 bytes [-Wframe-larger-than=] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Colin Ian King Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Harry Wentland Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 2b8d0f1f3e501149f6df7975232f9e09e42680d2 Author: Lee Jones Date: Fri Mar 19 08:24:17 2021 +0000 drm/amd/display/dc/dce80/dce80_resource: Make local functions static Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_resource.c:527:17: warning: no previous prototype for ‘dce80_aux_engine_create’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_resource.c:565:20: warning: no previous prototype for ‘dce80_i2c_hw_create’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_resource.c:581:20: warning: no previous prototype for ‘dce80_i2c_sw_create’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_resource.c:715:22: warning: no previous prototype for ‘dce80_link_encoder_create’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_resource.c:754:22: warning: no previous prototype for ‘dce80_clock_source_create’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_resource.c:778:6: warning: no previous prototype for ‘dce80_clock_source_destroy’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_resource.c:868:6: warning: no previous prototype for ‘dce80_validate_bandwidth’ [-Wmissing-prototypes] drivers/gpu/drm/amd/amdgpu/../display/dc/dce80/dce80_resource.c:913:16: warning: no previous prototype for ‘dce80_validate_global’ [-Wmissing-prototypes] Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: Anthony Koo Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Reviewed-by: Harry Wentland Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 1689fca0d62aa7a685363999f9fc380c0666d955 Author: Evan Quan Date: Wed Mar 17 12:10:15 2021 +0800 drm/amd/pm: fix Navi1x runtime resume failure V2 The RLC was put into a wrong state on runtime suspend. Thus the RLC autoload will fail on the succeeding runtime resume. By adding an intermediate PPSMC_MSG_PrepareMp1ForUnload(some GC hard reset involved, designed for PnP), we can bring RLC back into the desired state. V2: integrate INTERRUPTS_ENABLED flag clearing into current mp1 state set routines Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit 50ca25228e8a0cc4eca531cdac4c9ece1e7bed68 Author: Lijo Lazar Date: Tue Mar 2 18:26:04 2021 +0800 drm/amdgpu: Enable VCN/JPEG CG on aldebaran Enable clockgating for VCN and JPEG blocks on aldebaran Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 4a49751041bd2b06c8cbf9b44d718a60f3174cbc Author: Bhaskar Chowdhury Date: Fri Mar 19 04:48:15 2021 +0530 drm/amdgpu: Fix a typo s/proces/process/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit 7c4f2b235d6f9c81095836d4dbfa094eb0ec2a26 Author: Bhaskar Chowdhury Date: Fri Mar 19 01:54:14 2021 +0530 drm/amdgpu: Fix a typo s/traing/training/ ...Plus the entire sentence construction for better readability. Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit 5aeaa43e0ef1006320c077cbc49f4a8229ca3460 Author: Daniel Gomez Date: Thu Mar 18 09:32:36 2021 +0100 drm/radeon/ttm: Fix memory leak userptr pages If userptr pages have been pinned but not bounded, they remain uncleared. Reviewed-by: Christian König Signed-off-by: Daniel Gomez Signed-off-by: Alex Deucher commit 0f6f9dd490d524930081a6ef1d60171ce39220b9 Author: Daniel Gomez Date: Wed Mar 17 17:08:37 2021 +0100 drm/amdgpu/ttm: Fix memory leak userptr pages If userptr pages have been pinned but not bounded, they remain uncleared. Reviewed-by: Christian König Signed-off-by: Daniel Gomez Signed-off-by: Alex Deucher commit 5d3a2d95224da3213b1ce60fe28bf60b3dfe6827 Author: Alex Deucher Date: Tue Mar 16 22:02:14 2021 -0400 drm/amdgpu: skip kfd suspend/resume for S0ix GFX is in gfxoff mode during s0ix so we shouldn't need to actually tear anything down and restore it. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 50ec83f0d820bd7c7ef0c88a91816a7e2bb2682c Author: Alex Deucher Date: Tue Mar 16 14:18:30 2021 -0400 drm/amdgpu: drop S0ix checks around CG/PG in suspend We handle it properly within the CG/PG functions directly now. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 5d70a549d00dc1b8f8ae227ff192ca38f902b57c Author: Pratik Vishwakarma Date: Tue Mar 16 14:15:44 2021 -0400 drm/amdgpu: skip CG/PG for gfx during S0ix Not needed as the device is in gfxoff state so the CG/PG state is handled just like it would be for gfxoff during runtime gfxoff. This should also prevent delays on resume. Reworked from Pratik's original patch (Alex) Acked-by: Evan Quan Signed-off-by: Alex Deucher Signed-off-by: Pratik Vishwakarma commit 32ff160da7ffc707e3bccfe1fdd3711ac2246164 Author: Alex Deucher Date: Tue Mar 16 14:00:36 2021 -0400 drm/amdgpu: update comments about s0ix suspend/resume Provide and explanation as to why we skip GFX and PSP for S0ix. GFX goes into gfxoff, same as runtime, so no need to tear down and re-init. PSP is part of the always on state, so no need to touch it. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit f937008757a2048e1b22bb067e5fe36b1f4fb1af Author: Alex Deucher Date: Fri Mar 12 16:00:21 2021 -0500 drm/amdgpu/swsmu: skip gfx cgpg on s0ix suspend The SMU expects CGPG to be enabled when entering S0ix. with this we can re-enable SMU suspend. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 557f42a2b38cc763736ba4f88f012c1cf8f259e2 Author: Alex Deucher Date: Fri Mar 12 15:36:04 2021 -0500 drm/amdgpu: re-enable suspend phase 2 for S0ix This really needs to be done to properly tear down the device. SMC, PSP, and GFX are still problematic, need to dig deeper into what aspect of them that is problematic. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 344169315707a1147cf5bda629ac6ee1fbd3a1bd Author: Alex Deucher Date: Fri Mar 12 15:33:46 2021 -0500 drm/amdgpu: move s0ix check into amdgpu_device_ip_suspend_phase2 (v3) No functional change. v2: use correct dev v3: rework Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit a2e15b0e6c91a13d2219fba1f9e83ecd473a60db Author: Alex Deucher Date: Fri Mar 19 16:34:45 2021 -0400 drm/amdgpu: clean up non-DC suspend/resume handling Move the non-DC specific code into the DCE IP blocks similar to how we handle DC. This cleans up the common suspend and resume pathes. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 48ccbf730c945c7fc86e8790a8246247a2c0478b Author: Alex Deucher Date: Tue Mar 9 23:20:46 2021 -0500 drm/amdgpu: don't evict vram on APUs for suspend to ram (v4) Vram is system memory, so no need to evict. v2: use PM_EVENT messages v3: use correct dev v4: use driver flags Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 62498733d4c4fde8bc15215c5502923ff8224f86 Author: Alex Deucher Date: Fri Mar 12 15:22:36 2021 -0500 drm/amdgpu: rework S3/S4/S0ix state handling Set flags at the top level pmops callbacks to track state. This cleans up the current set of flags and properly handles S4 on S0ix capable systems. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit e5192f7b4af684e0ba09f8b9ae30cb164bdedde5 Author: Prike Liang Date: Tue Mar 9 09:34:00 2021 +0800 drm/amdgpu: fix the hibernation suspend with s0ix During system hibernation suspend still need un-gate gfx CG/PG firstly to handle HW status check before HW resource destory. Signed-off-by: Prike Liang Acked-by: Alex Deucher Acked-by: Huang Rui Signed-off-by: Alex Deucher commit b98c6299ef992660f5ca4392287a11ea2439c664 Author: Alex Deucher Date: Wed Mar 10 00:43:35 2021 -0500 drm/amdgpu: disentangle HG systems from vgaswitcheroo There's no need to keep vgaswitcheroo around for HG systems. They don't use muxes and their power control is handled via ACPI. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit b2aba43af90415e0538b0201fe93f0c72b5741d9 Author: Alex Deucher Date: Fri Jan 22 17:45:29 2021 -0500 drm/amdgpu: enable DPM_FLAG_MAY_SKIP_RESUME and DPM_FLAG_SMART_SUSPEND flags (v2) Once the device has runtime suspended, we don't need to power it back up again for system suspend. Likewise for resume, we don't to power up the device again on resume only to power it back off again via runtime pm because it's still idle. v2: add DPM_FLAG_SMART_PREPARE as well Reviewed-by: Evan Quan Acked-by: Rajneesh Bhardwaj (v1) Signed-off-by: Alex Deucher commit e25443d2765f40a9b3d0056dc4d560a007dd850c Author: Alex Deucher Date: Wed Mar 10 00:41:49 2021 -0500 drm/amdgpu: add a dev_pm_ops prepare callback (v2) as per: https://www.kernel.org/doc/html/latest/driver-api/pm/devices.html The prepare callback is required to support the DPM_FLAG_SMART_SUSPEND driver flag. This allows runtime pm to auto complete when the system goes into suspend avoiding a wake up on suspend and on resume. Apply this for hybrid gfx and BOCO systems where d3cold is provided by the ACPI platform. v2: check if device is runtime suspended in prepare. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit ed098aa34c51d81a16de93f59c64e36a136fd201 Author: Alex Deucher Date: Thu Mar 18 16:44:10 2021 -0400 drm/amdgpu: Add additional Sienna Cichlid PCI ID Add new DID. Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit ce4f17d076f02b0c97416115948314dfb95aa85a Author: Alex Deucher Date: Wed Mar 17 10:44:31 2021 -0400 drm/amdgpu/display/dm: add missing parameter documentation Added a new parameter and forgot to update the documentation. Fixes: b6f91fc183f7 ("drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work") Reviewed-by: Xiaogang Chen Signed-off-by: Alex Deucher Cc: Stephen Rothwell Cc: Xiaogang Chen commit 5a8cd98e6e335ad03493502b3479fcbadcb4889e Author: Nirmoy Das Date: Fri Mar 12 10:42:41 2021 +0100 drm/amdgpu: wrap kiq ring ops with kiq spinlock KIQ ring is being operated by kfd as well as amdgpu. KFD is using kiq lock, we should the same from amdgpu side as well. Signed-off-by: Nirmoy Das Acked-by: Christian König Signed-off-by: Alex Deucher commit fe68ceef3412544aa8e2e2ff397f76edfedf6bd9 Author: Xiaojian Du Date: Thu Mar 18 15:39:21 2021 +0800 Revert "drm/amdgpu: disable gpu reset on Vangogh for now" This reverts commit 33cf440d594bfbf81fc20604957bc64f02d0b560. And it will enable mode-2 gpu reset for vangogh, it asks PSP firmware version is 00.1A.00.0F or newer. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 56b53c0b5aa5de49747351b2ad323fd36089eb52 Author: Dennis Li Date: Wed Mar 10 17:20:45 2021 +0800 drm/amdgpu: add codes to capture invalid hardware access when recovery When recovery thread has begun GPU reset, there should be not other threads to access hardware, otherwise system randomly hang. v2 (chk): rewritten from scratch, use trylock and lockdep instead of hand wiring the logic. v3: add in_irq check v4: change to check in_task Signed-off-by: Dennis Li Signed-off-by: Christian König Reviewed-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c551f66c5dfefd00687f7567183fec6889ba46a3 Author: Lee Jones Date: Tue Mar 30 17:44:29 2021 +0100 gfs2: Fix a number of kernel-doc warnings Building the kernel with W=1 results in a number of kernel-doc warnings like incorrect function names and parameter descriptions. Fix those, mostly by adding missing parameter descriptions, removing left-over descriptions, and demoting some less important kernel-doc comments into regular comments. Originally proposed by Lee Jones; improved and combined into a single patch by Andreas. Signed-off-by: Lee Jones Signed-off-by: Andreas Gruenbacher commit d92e5e32fb4fce7ae939ad322aad77955dd5dcda Merge: f72de385f8c38 0072f6c37f020 Author: Arnd Bergmann Date: Fri Apr 9 21:48:03 2021 +0200 Merge tag 'arm-soc/for-5.13/maintainers' of https://github.com/Broadcom/stblinux into arm/soc This pull request contains Broadcom SoC MAINTAINERS file entries and .mailmap updates for 5.13, please pull the following: - Nicolas updates his maintainer email to a kernel.org address for continuity * tag 'arm-soc/for-5.13/maintainers' of https://github.com/Broadcom/stblinux: mailmap: Update email address for Nicolas Saenz MAINTAINERS: Update BCM2711/BCM2335 maintainer's mail Link: https://lore.kernel.org/r/20210409175018.3051283-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit f72de385f8c38bc76269205d3a7d09d446829d02 Author: Kunihiko Hayashi Date: Sat Apr 10 01:36:11 2021 +0900 MAINTAINERS: Update ARM/UniPhier SoCs maintainers and status Mark the UniPhier platform maintained and Masami Hiramatsu and Kunihiko Hayashi are taking over maintainership of the UniPhier platform. Signed-off-by: Kunihiko Hayashi Reviewed-by: Masami Hiramatsu Link: https://lore.kernel.org/r/1617986171-20346-1-git-send-email-hayashi.kunihiko@socionext.com' Signed-off-by: Arnd Bergmann commit c103b850721e4a79ff9578f131888129c37a4679 Merge: 9c0fed84d5750 e8b8b0df8694e Author: Dave Airlie Date: Sat Apr 10 05:27:11 2021 +1000 Merge tag 'drm-misc-next-2021-04-09' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.13: UAPI Changes: Cross-subsystem Changes: Core Changes: - bridge: Fix Kconfig dependency - cmdline: Refuse zero width/height mode - ttm: Ignore signaled move fences, ioremap buffer according to mem caching settins Driver Changes: - Conversions to sysfs_emit - tegra: Don't register DP AUX channels before connectors - zynqmp: Fix for an out-of-bound (but within struct padding) memset Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210409090020.jroa2d4p4qansrpa@gilmour commit 30be8446db39be8dc52fc8cd2cb601d3d6319e9d Merge: 36841008059ca 0648c55e3a21c Author: Arnd Bergmann Date: Fri Apr 9 21:46:14 2021 +0200 Merge tag 'qcom-drivers-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers More Qualcomm driver updates for 5.13 This improves the Qualcomm SCM driver logic related to detecting the calling convention, in particular on SC7180, and fixes a few small issues in the same. It introduces additonal sanity checks of the size of loaded segments in the MDT loader and adds a missing error in the return path of pdr_register_listener(). It makes it possible to specify the OEM specific firmware path in the wcn36xx control (and WiFi) driver. Lastly it adds a missing path specifier in the MAINTAINERS' entry and fixes a bunch of kerneldoc issues in various drivers. * tag 'qcom-drivers-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: soc: qcom: mdt_loader: Detect truncated read of segments soc: qcom: mdt_loader: Validate that p_filesz < p_memsz soc: qcom: pdr: Fix error return code in pdr_register_listener firmware: qcom_scm: Fix kernel-doc function names to match firmware: qcom_scm: Suppress sysfs bind attributes firmware: qcom_scm: Workaround lack of "is available" call on SC7180 firmware: qcom_scm: Reduce locking section for __get_convention() firmware: qcom_scm: Make __qcom_scm_is_call_available() return bool soc: qcom: wcnss_ctrl: Allow reading firmware-name from DT soc: qcom: wcnss_ctrl: Introduce local variable "dev" dt-bindings: soc: qcom: wcnss: Add firmware-name property soc: qcom: address kernel-doc warnings MAINTAINERS: add another entry for ARM/QUALCOMM SUPPORT Link: https://lore.kernel.org/r/20210409162001.775851-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit db7a033f2b1f54c46244efe54687fe8f4b9b7c21 Merge: a8f6ba28257ab 412c8fa8c3748 Author: Arnd Bergmann Date: Fri Apr 9 21:43:47 2021 +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.13 (round 2) - updates/cleanups for Hardkernel Odroid N2/N2+ * tag 'amlogic-dt64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: add GPIO line names to ODROID N2/N2+ arm64: dts: meson: add saradc node to ODROID N2/N2+ arm64: dts: meson: remove extra tab from ODROID N2/N2+ ext_mdio node Link: https://lore.kernel.org/r/7htuofgwaz.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit a8f6ba28257ab6fcf08138496afdcb2d6de3955c Merge: e8adf27e97665 7178d4cc0702b Author: Arnd Bergmann Date: Fri Apr 9 21:42:05 2021 +0200 Merge tag 'qcom-arm64-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt More Qualcomm ARM64 DT updates for 5.13 This adds RPMh regulators, coresight, AOSS qmp, ipcc, llcc for the SC7280. It adds interconnect, PRNG and thermal pieces to SM8350. It specifies the now required clocks for the SDM845 gcc, corrects the firmware-name for adsp and cdsp on the db845c and defines DSI and panel bits for Xiaomi Pocophone F1. SM8150 gains iommu settings and the remaining I2C controllers and SM8250 gains Venus and the QMP PHY is updated to include the DP portion. It adds the MSM8998 based OnePlus 5/5T device and enables sound support on the Trogdor device family. Lastly it adds the GIC hypervisor registers & interrupt for when Linux is booted in EL2 on MSM8916. * tag 'qcom-arm64-for-5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (25 commits) arm64: dts: qcom: update usb qmp phy clock-cells property arm64: dts: qcom: msm8916: Add GICv2 hypervisor registers/interrupt arm64: dts: sdm845-db845c: make firmware filenames follow linux-firmware arm64: dts: qcom: sdm845-xiaomi-beryllium: Add DSI and panel bits arm64: dts: qcom: sc7280: Add Coresight support arm64: dts: qcom: sc7280: Add AOSS QMP node arm64: dts: qcom: sc7280: Add IPCC for SC7280 SoC arm64: dts: qcom: sc7280: Add device tree node for LLCC arm64: dts: qcom: Add support for OnePlus 5/5T arm64: dts: qcom: msm8998: Disable MSS remoteproc by default arm64: dts: qcom: Move rmtfs memory region arm64: dts: qcom: Add sound node for sc7180-trogdor-coachz arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver arm64: dts: qcom: use dp_phy to provide clocks to dispcc arm64: dts: qcom: sm8250: switch usb1 qmp phy to USB3+DP mode arm64: dts: qcom: sm8250: Add venus DT node arm64: dts: qcom: sm8250: Add videocc DT node arm64: dts: qcom: sm8350: Add interconnects arm64: dts: qcom: sm8350: Add support for PRNG EE arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp ... Link: https://lore.kernel.org/r/20210409163949.776530-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit e8adf27e9766525ebedb8e6607c023997f93c353 Merge: be0f990acfdd4 885aae6860fae Author: Arnd Bergmann Date: Fri Apr 9 21:40:30 2021 +0200 Merge tag 'qcom-dts-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm dts updates for v5.13 This adds Bluetooth support on the Samsung Galaxy S5, corrects the mount matrix for the IMU on Nexus 5 and corrects the fuel gauge irq trigger for the two devices. * tag 'qcom-dts-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: ARM: dts: qcom: msm8974-klte: Add bluetooth support ARM: dts: qcom: msm8974: add blsp2_uart8 ARM: dts: qcom: msm8974-samsung-klte: correct fuel gauge interrupt trigger level ARM: dts: qcom: msm8974-lge-nexus5: correct fuel gauge interrupt trigger level ARM: dts: qcom: msm8974-hammerhead: add mount matrix for IMU Link: https://lore.kernel.org/r/20210409162359.776076-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 8e6c8fa9f2e95c88a642521a5da19a8e31748846 Author: Gao Xiang Date: Wed Apr 7 12:39:27 2021 +0800 erofs: enable big pcluster feature Enable COMPR_CFGS and BIG_PCLUSTER since the implementations are all settled properly. Link: https://lore.kernel.org/r/20210407043927.10623-11-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit 598162d050801e556750defff4ddab499e5d76ed Author: Gao Xiang Date: Wed Apr 7 12:39:26 2021 +0800 erofs: support decompress big pcluster for lz4 backend Prior to big pcluster, there was only one compressed page so it'd easy to map this. However, when big pcluster is enabled, more work needs to be done to handle multiple compressed pages. In detail, - (maptype 0) if there is only one compressed page + no need to copy inplace I/O, just map it directly what we did before; - (maptype 1) if there are more compressed pages + no need to copy inplace I/O, vmap such compressed pages instead; - (maptype 2) if inplace I/O needs to be copied, use per-CPU buffers for decompression then. Another thing is how to detect inplace decompression is feasable or not (it's still quite easy for non big pclusters), apart from the inplace margin calculation, inplace I/O page reusing order is also needed to be considered for each compressed page. Currently, if the compressed page is the xth page, it shouldn't be reused as [0 ... nrpages_out - nrpages_in + x], otherwise a full copy will be triggered. Although there are some extra optimization ideas for this, I'd like to make big pcluster work correctly first and obviously it can be further optimized later since it has nothing with the on-disk format at all. Link: https://lore.kernel.org/r/20210407043927.10623-10-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit b86269f43892316ef5a177d7180d09d101a46f22 Author: Gao Xiang Date: Wed Apr 7 12:39:25 2021 +0800 erofs: support parsing big pcluster compact indexes Different from non-compact indexes, several lclusters are packed as the compact form at once and an unique base blkaddr is stored for each pack, so each lcluster index would take less space on avarage (e.g. 2 bytes for COMPACT_2B.) btw, that is also why BIG_PCLUSTER switch should be consistent for compact head0/1. Prior to big pcluster, the size of all pclusters was 1 lcluster. Therefore, when a new HEAD lcluster was scanned, blkaddr would be bumped by 1 lcluster. However, that way doesn't work anymore for big pcluster since we actually don't know the compressed size of pclusters in advance (before reading CBLKCNT lcluster). So, instead, let blkaddr of each pack be the first pcluster blkaddr with a valid CBLKCNT, in detail, 1) if CBLKCNT starts at the pack, this first valid pcluster is itself, e.g. _____________________________________________________________ |_CBLKCNT0_|_NONHEAD_| .. |_HEAD_|_CBLKCNT1_| ... |_HEAD_| ... ^ = blkaddr base ^ += CBLKCNT0 ^ += CBLKCNT1 2) if CBLKCNT doesn't start at the pack, the first valid pcluster is the next pcluster, e.g. _________________________________________________________ | NONHEAD_| .. |_HEAD_|_CBLKCNT0_| ... |_HEAD_|_HEAD_| ... ^ = blkaddr base ^ += CBLKCNT0 ^ += 1 When a CBLKCNT is found, blkaddr will be increased by CBLKCNT lclusters, or a new HEAD is found immediately, bump blkaddr by 1 instead (see the picture above.) Also noted if CBLKCNT is the end of the pack, instead of storing delta1 (distance of the next HEAD lcluster) as normal NONHEADs, it still uses the compressed block count (delta0) since delta1 can be calculated indirectly but the block count can't. Adjust decoding logic to fit big pcluster compact indexes as well. Link: https://lore.kernel.org/r/20210407043927.10623-9-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit cec6e93beadfd145758af2c0854fcc2abb8170cb Author: Gao Xiang Date: Wed Apr 7 12:39:24 2021 +0800 erofs: support parsing big pcluster compress indexes When INCOMPAT_BIG_PCLUSTER sb feature is enabled, legacy compress indexes will also have the same on-disk header compact indexes to keep per-file configurations instead of leaving it zeroed. If ADVISE_BIG_PCLUSTER is set for a file, CBLKCNT will be loaded for each pcluster in this file by parsing 1st non-head lcluster. Link: https://lore.kernel.org/r/20210407043927.10623-8-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit 4fea63f7d76e425965033938bab6488e48579e3f Author: Gao Xiang Date: Wed Apr 7 12:39:23 2021 +0800 erofs: adjust per-CPU buffers according to max_pclusterblks Adjust per-CPU buffers on demand since big pcluster definition is available. Also, bail out unsupported pcluster size according to Z_EROFS_PCLUSTER_MAX_SIZE. Link: https://lore.kernel.org/r/20210407043927.10623-7-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit 5404c33010cb8ee063c05376d4a2eba129872281 Author: Gao Xiang Date: Wed Apr 7 12:39:22 2021 +0800 erofs: add big physical cluster definition Big pcluster indicates the size of compressed data for each physical pcluster is no longer fixed as block size, but could be more than 1 block (more accurately, 1 logical pcluster) When big pcluster feature is enabled for head0/1, delta0 of the 1st non-head lcluster index will keep block count of this pcluster in lcluster size instead of 1. Or, the compressed size of pcluster should be 1 lcluster if pcluster has no non-head lcluster index. Also note that BIG_PCLUSTER feature reuses COMPR_CFGS feature since it depends on COMPR_CFGS and will be released together. Link: https://lore.kernel.org/r/20210407043927.10623-6-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit 81382f5f5cb0c9c5694c19d36460f757a8c96841 Author: Gao Xiang Date: Wed Apr 7 12:39:21 2021 +0800 erofs: fix up inplace I/O pointer for big pcluster When picking up inplace I/O pages, it should be traversed in reverse order in aligned with the traversal order of file-backed online pages. Also, index should be updated together when preloading compressed pages. Previously, only page-sized pclustersize was supported so no problem at all. Also rename `compressedpages' to `icpage_ptr' to reflect its functionality. Link: https://lore.kernel.org/r/20210407043927.10623-5-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit 9f6cc76e6ff0631a99cd94eab8af137057633a52 Author: Gao Xiang Date: Wed Apr 7 12:39:20 2021 +0800 erofs: introduce physical cluster slab pools Since multiple pcluster sizes could be used at once, the number of compressed pages will become a variable factor. It's necessary to introduce slab pools rather than a single slab cache now. This limits the pclustersize to 1M (Z_EROFS_PCLUSTER_MAX_SIZE), and get rid of the obsolete EROFS_FS_CLUSTER_PAGE_LIMIT, which has no use now. Link: https://lore.kernel.org/r/20210407043927.10623-4-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit 524887347fcb67faa0a63dd3c4c02ab48d4968d4 Author: Gao Xiang Date: Sat Apr 10 03:06:30 2021 +0800 erofs: introduce multipage per-CPU buffers To deal the with the cases which inplace decompression is infeasible for some inplace I/O. Per-CPU buffers was introduced to get rid of page allocation latency and thrash for low-latency decompression algorithms such as lz4. For the big pcluster feature, introduce multipage per-CPU buffers to keep such inplace I/O pclusters temporarily as well but note that per-CPU pages are just consecutive virtually. When a new big pcluster fs is mounted, its max pclustersize will be read and per-CPU buffers can be growed if needed. Shrinking adjustable per-CPU buffers is more complex (because we don't know if such size is still be used), so currently just release them all when unloading. Link: https://lore.kernel.org/r/20210409190630.19569-1-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit fdac035ed0ea4618fd991c25bfb9164777bbe6e2 Merge: a38fd87484648 7f32917642c7e Author: Stephen Boyd Date: Fri Apr 9 12:13:15 2021 -0700 Merge tag 'clk-v5.13-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk into clk-samsung Pull Samsung clk driver updates from Sylwester Nawrocki: - clean up of redundant dev_err() calls after dev_ioremap_resource() - fix for the clk-exynos7 driver (part of upcoming Galaxy S6 device support) * tag 'clk-v5.13-samsung' of https://git.kernel.org/pub/scm/linux/kernel/git/snawrocki/clk: clk: samsung: Remove redundant dev_err calls clk: exynos7: Mark aclk_fsys1_200 as critical commit 26e33ed9f18475ebdc981d45150ac9a019e69f07 Author: Vijendar Mukunda Date: Thu Apr 8 18:32:36 2021 +0530 ASoC: amd: Add support for ALC1015P codec in acp3x machine driver Add ALC1015p codec support for acp3x machine driver. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1617886984-9500-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit a29c8c0241654d5f3165d52e9307e4feff955621 Author: Kalyan Thota Date: Fri Mar 19 05:54:06 2021 -0700 drm/msm/disp/dpu1: fix display underruns during modeset. During crtc disable, display perf structures are reset to 0 which includes state varibles which are immutable. On crtc enable, we use the same structures and they don't refelect the actual values 1) Fix is to avoid updating the state structures during disable. 2) Reset the perf structures during atomic check when there is no modeset enable. Signed-off-by: Kalyan Thota Reported-by: Stephen Boyd Tested-by: Douglas Anderson Link: https://lore.kernel.org/r/1616158446-19290-1-git-send-email-kalyan_t@codeaurora.org Signed-off-by: Rob Clark commit 33b2b91e3430b0764234dc2ec28c5ae128828fe0 Author: AngeloGioacchino Del Regno Date: Tue Apr 6 23:47:26 2021 +0200 drm/msm/mdp5: Disable pingpong autorefresh at tearcheck init If pp autorefresh is up (from bootloader splash), we will surely get vblank and pp timeouts. Ensure it is turned off. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Marijn Suijten Link: https://lore.kernel.org/r/20210406214726.131534-4-marijn.suijten@somainline.org Signed-off-by: Rob Clark commit 377569f82ea8228c421cef4da33e056a900b58ca Author: Marijn Suijten Date: Tue Apr 6 23:47:25 2021 +0200 drm/msm/mdp5: Do not multiply vclk line count by 100 Neither vtotal nor drm_mode_vrefresh contain a value that is premultiplied by 100 making the x100 variable name incorrect and resulting in vclks_line to become 100 times larger than it is supposed to be. The hardware counts 100 clockticks too many before tearcheck, leading to severe panel issues on at least the Sony Xperia lineup. This is likely an artifact from the original MDSS DSI panel driver where the calculation [1] corrected for a premultiplied reference framerate by 100 [2]. It does not appear that the above values were ever premultiplied in the history of the DRM MDP5 driver. With this change applied the value written to the SYNC_CONFIG_VSYNC register is now identical to downstream kernels. [1]: https://source.codeaurora.org/quic/la/kernel/msm-3.18/tree/drivers/video/msm/mdss/mdss_mdp_intf_cmd.c?h=LA.UM.8.6.c26-02400-89xx.0#n288 [2]: https://source.codeaurora.org/quic/la/kernel/msm-3.18/tree/drivers/video/msm/mdss/mdss_dsi_panel.c?h=LA.UM.8.6.c26-02400-89xx.0#n1648 Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Marijn Suijten Link: https://lore.kernel.org/r/20210406214726.131534-3-marijn.suijten@somainline.org Signed-off-by: Rob Clark commit 2ad52bdb220de5ab348098e3482b01235d15a842 Author: Marijn Suijten Date: Tue Apr 6 23:47:24 2021 +0200 drm/msm/mdp5: Configure PP_SYNC_HEIGHT to double the vtotal Leaving this at a close-to-maximum register value 0xFFF0 means it takes very long for the MDSS to generate a software vsync interrupt when the hardware TE interrupt doesn't arrive. Configuring this to double the vtotal (like some downstream kernels) leads to a frame to take at most twice before the vsync signal, until hardware TE comes up. In this case the hardware interrupt responsible for providing this signal - "disp-te" gpio - is not hooked up to the mdp5 vsync/pp logic at all. This solves severe panel update issues observed on at least the Xperia Loire and Tone series, until said gpio is properly hooked up to an irq. Suggested-by: AngeloGioacchino Del Regno Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20210406214726.131534-2-marijn.suijten@somainline.org Signed-off-by: Rob Clark commit d63e1c765a3e7e50b4bb52e030c33e4b465fa02a Author: Dmitry Baryshkov Date: Fri Apr 9 21:30:03 2021 +0300 clk: qcom: gcc-sdm845: get rid of the test clock The test clock isn't in the bindings and apparently it's not used by anyone upstream. Remove it. Suggested-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210409183004.1617777-4-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit ea434d7a92ce02bfff85adfc1fbe9c500f67900f Author: Dmitry Baryshkov Date: Fri Apr 9 21:30:02 2021 +0300 clk: qcom: convert SDM845 Global Clock Controller to parent_data Convert the clock driver to specify parent data rather than parent names, to actually bind using 'clock-names' specified in the DTS rather than global clock names. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210409183004.1617777-3-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit ca22cac2e413255985267af69bdc36e048399675 Author: Dmitry Baryshkov Date: Fri Apr 9 21:30:01 2021 +0300 dt-bindings: clock: separate SDM845 GCC clock bindings Separate qcom,gcc-sdm845 clock bindings from the clock-less qcom,gcc.yaml, so that we can add required clocks and clock-names properties. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210409183004.1617777-2-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit d0a859edda46b45baeab9687d173102300d76e2b Author: Chen Hui Date: Fri Apr 9 16:23:52 2021 +0800 clk: qcom: apss-ipq-pll: Add missing MODULE_DEVICE_TABLE CONFIG_IPQ_APSS_PLL is tristate option and therefore this driver can be compiled as a module. This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Fixes: ecd2bacfbbc4 ("clk: qcom: Add ipq apss pll driver") Signed-off-by: Chen Hui Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210409082352.233810-4-clare.chenhui@huawei.com Signed-off-by: Stephen Boyd commit 790b516ada10a4dcc0f0a56dc0ced475d86d5820 Author: Chen Hui Date: Fri Apr 9 16:23:51 2021 +0800 clk: qcom: a53-pll: Add missing MODULE_DEVICE_TABLE CONFIG_QCOM_A53PLL is tristate option and therefore this driver can be compiled as a module. This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Fixes: 0c6ab1b8f894 ("clk: qcom: Add A53 PLL support") Signed-off-by: Chen Hui Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210409082352.233810-3-clare.chenhui@huawei.com Signed-off-by: Stephen Boyd commit 77a618b1481f6fdb41b7585ed0f67c47fb8401e5 Author: Chen Hui Date: Fri Apr 9 16:23:50 2021 +0800 clk: qcom: a7-pll: Add missing MODULE_DEVICE_TABLE CONFIG_QCOM_A7PLL is tristate option and therefore this driver can be compiled as a module. This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Fixes: 5a5223ffd7ef ("clk: qcom: Add A7 PLL support") Signed-off-by: Chen Hui Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210409082352.233810-2-clare.chenhui@huawei.com Signed-off-by: Stephen Boyd commit 0072f6c37f02071821eb2135b80daa404d783704 Author: Nicolas Saenz Julienne Date: Fri Apr 9 13:14:53 2021 +0200 mailmap: Update email address for Nicolas Saenz Add my kernel.org address for old email address. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli commit 704f6af2e0c67a1f63f61159f040e827b290ba38 Author: Sergio Paracuellos Date: Tue Mar 9 06:22:22 2021 +0100 dt: bindings: add mt7621-sysc device tree binding documentation Adds device tree binding documentation for clocks in the MT7621 SOC. Reviewed-by: Rob Herring Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210309052226.29531-3-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd commit 712373d8c6aedc3e36643e9cf2cf771eb34d405c Author: Sergio Paracuellos Date: Tue Mar 9 06:22:21 2021 +0100 dt-bindings: clock: add dt binding header for mt7621 clocks Adds dt binding header for 'mediatek,mt7621-clk' clocks. Acked-by: Rob Herring Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210309052226.29531-2-sergio.paracuellos@gmail.com Signed-off-by: Stephen Boyd commit 7d0b91147c91296187e59ca8211612be0b8728c3 Author: Nicolas Saenz Julienne Date: Fri Apr 9 12:44:47 2021 +0200 MAINTAINERS: Update BCM2711/BCM2335 maintainer's mail The @kernel.org e-mail address is likely to last longer than the current one, so use it. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Florian Fainelli commit e7a3d7e792a5ad50583a2e6c35e72bd2ca6096f4 Author: Brian Foster Date: Fri Apr 9 10:27:56 2021 -0700 xfs: drop unnecessary setfilesize helper xfs_setfilesize() is the only remaining caller of the internal __xfs_setfilesize() helper. Fold them into a single function. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 044c6449f18f174ba8d86640936add3fc7582e49 Author: Brian Foster Date: Fri Apr 9 10:27:55 2021 -0700 xfs: drop unused ioend private merge and setfilesize code XFS no longer attaches anthing to ioend->io_private. Remove the unnecessary ->io_private merging code. This removes the only remaining user of xfs_setfilesize_ioend() so remove that function as well. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7adb8f14e134d5f885d47c4ccd620836235f0b7f Author: Brian Foster Date: Fri Apr 9 10:27:55 2021 -0700 xfs: open code ioend needs workqueue helper Open code xfs_ioend_needs_workqueue() into the only remaining caller. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7cd3099f4925d7c15887d1940ebd65acd66100f5 Author: Brian Foster Date: Fri Apr 9 10:27:43 2021 -0700 xfs: drop submit side trans alloc for append ioends Per-inode ioend completion batching has a log reservation deadlock vector between preallocated append transactions and transactions that are acquired at completion time for other purposes (i.e., unwritten extent conversion or COW fork remaps). For example, if the ioend completion workqueue task executes on a batch of ioends that are sorted such that an append ioend sits at the tail, it's possible for the outstanding append transaction reservation to block allocation of transactions required to process preceding ioends in the list. Append ioend completion is historically the common path for on-disk inode size updates. While file extending writes may have completed sometime earlier, the on-disk inode size is only updated after successful writeback completion. These transactions are preallocated serially from writeback context to mitigate concurrency and associated log reservation pressure across completions processed by multi-threaded workqueue tasks. However, now that delalloc blocks unconditionally map to unwritten extents at physical block allocation time, size updates via append ioends are relatively rare. This means that inode size updates most commonly occur as part of the preexisting completion time transaction to convert unwritten extents. As a result, there is no longer a strong need to preallocate size update transactions. Remove the preallocation of inode size update transactions to avoid the ioend completion processing log reservation deadlock. Instead, continue to send all potential size extending ioends to workqueue context for completion and allocate the transaction from that context. This ensures that no outstanding log reservation is owned by the ioend completion worker task when it begins to process ioends. Signed-off-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3b6dd9a9aeeada19d0c820ff68e979243a888bb6 Author: Colin Ian King Date: Fri Apr 9 10:27:34 2021 -0700 xfs: fix return of uninitialized value in variable error A previous commit removed a call to xfs_attr3_leaf_read that assigned an error return code to variable error. We now have a few early error return paths to label 'out' that return error if error is set; however error now is uninitialized so potentially garbage is being returned. Fix this by setting error to zero to restore the original behaviour where error was zero at the label 'restart'. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 07120f1abdff ("xfs: Add xfs_has_attr and subroutines") Signed-off-by: Colin Ian King Reviewed-by: Brian Foster Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 026f57ebe1beeae086f48c27cb0664cbb30cd955 Author: Darrick J. Wong Date: Wed Apr 7 17:59:39 2021 -0700 xfs: get rid of the ip parameter to xchk_setup_* Now that the scrub context stores a pointer to the file that was used to invoke the scrub call, the struct xfs_inode pointer that we passed to all the setup functions is no longer necessary. This is only ever used if the caller wants us to scrub the metadata of the open file. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 71bddbccab436a261a22afe5d90de269941d0fe7 Author: Darrick J. Wong Date: Mon Mar 22 09:51:51 2021 -0700 xfs: fix scrub and remount-ro protection when running scrub While running a new fstest that races a readonly remount with scrub running in repair mode, I observed the kernel tripping over debugging assertions in the log quiesce code that were checking that the CIL was empty. When the sysadmin runs scrub in repair mode, the scrub code allocates real transactions (with reservations) to change things, but doesn't increment the superblock writers count to block a readonly remount attempt while it is running. We don't require the userspace caller to have a writable file descriptor to run repairs, so we have to call mnt_want_write_file to obtain freeze protection and increment the writers count. It's ok to remove the call to sb_start_write for the dry-run case because commit 8321ddb2fa29 removed the behavior where scrub and fsfreeze fight over the buffer LRU. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Reviewed-by: Christoph Hellwig commit 85d703746154cdc6794b6654b587b0b0354c97e9 Author: Marc Zyngier Date: Wed Apr 7 18:54:16 2021 +0100 KVM: arm64: Fully zero the vcpu state on reset On vcpu reset, we expect all the registers to be brought back to their initial state, which happens to be a bunch of zeroes. However, some recent commit broke this, and is now leaving a bunch of registers (such as the FP state) with whatever was left by the guest. My bad. Zero the reset of the state (32bit SPSRs and FPSIMD state). Cc: stable@vger.kernel.org Fixes: e47c2055c68e ("KVM: arm64: Make struct kvm_regs userspace-only") Signed-off-by: Marc Zyngier commit 5b32a53d6d057ab213abae33fc275be844051695 Author: Marc Zyngier Date: Tue Apr 6 13:46:42 2021 +0100 KVM: arm64: Clarify vcpu reset behaviour Although the KVM_ARM_VCPU_INIT documentation mention that the registers are reset to their "initial values", it doesn't describe what these values are. Describe this state explicitly. Reviewed-by: Alexandru Elisei Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 3cd461712cb450ea6aa8a8200f35f24eb296bfb2 Author: Yang Guo Date: Thu Apr 1 15:03:30 2021 +0800 ext4: delete redundant uptodate check for buffer The buffer uptodate state has been checked in function set_buffer_uptodate, there is no need use buffer_uptodate before calling set_buffer_uptodate and delete it. Cc: "Theodore Ts'o" Cc: Andreas Dilger Signed-off-by: Yang Guo Signed-off-by: Shaokun Zhang Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/1617260610-29770-1-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Theodore Ts'o commit 5c55197cbf9bfa9a025ddf220d65d376fc389f02 Merge: a38fd87484648 054ef44ea3ef2 Author: Stephen Boyd Date: Fri Apr 9 09:50:46 2021 -0700 Merge tag 'clk-imx-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux into clk-imx Pull i.MX clk driver updates from Abel Vesa: - Fix reparenting of UART clocks by initializing only the ones associated to stdout - Correct the PCIE clocks for i.MX8MP and i.MX8MQ - Make LPCG and SCU clocks return on registering failure * tag 'clk-imx-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/abelvesa/linux: clk: imx: Reference preceded by free clk: imx8mq: Correct the pcie1 sels clk: imx8mp: Remove the none exist pcie clocks clk: imx: Fix reparenting of UARTs not associated with stdout commit 72ffb49a7b623c92a37657eda7cc46a06d3e8398 Author: Zhang Yi Date: Wed Mar 31 11:31:38 2021 +0800 ext4: do not set SB_ACTIVE in ext4_orphan_cleanup() When CONFIG_QUOTA is enabled, if we failed to mount the filesystem due to some error happens behind ext4_orphan_cleanup(), it will end up triggering a after free issue of super_block. The problem is that ext4_orphan_cleanup() will set SB_ACTIVE flag if CONFIG_QUOTA is enabled, after we cleanup the truncated inodes, the last iput() will put them into the lru list, and these inodes' pages may probably dirty and will be write back by the writeback thread, so it could be raced by freeing super_block in the error path of mount_bdev(). After check the setting of SB_ACTIVE flag in ext4_orphan_cleanup(), it was used to ensure updating the quota file properly, but evict inode and trash data immediately in the last iput does not affect the quotafile, so setting the SB_ACTIVE flag seems not required[1]. Fix this issue by just remove the SB_ACTIVE setting. [1] https://lore.kernel.org/linux-ext4/99cce8ca-e4a0-7301-840f-2ace67c551f3@huawei.com/T/#m04990cfbc4f44592421736b504afcc346b2a7c00 Cc: stable@kernel.org Signed-off-by: Zhang Yi Tested-by: Jan Kara Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210331033138.918975-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 0349a070881f7e3b4472d886989db092ed3ccac8 Author: Raphael Norwitz Date: Thu Apr 8 19:05:27 2021 +0000 PCI: Delay after FLR of Intel DC P4510 NVMe Like the Intel DC P3700 NVMe, the Intel P4510 NVMe exhibits a timeout failure when the driver tries to interact with the device too soon after an FLR. Add a device-specific reset method that delays 250ms after doing an FLR. Link: https://lore.kernel.org/r/20210408190521.16897-1-raphael.norwitz@nutanix.com Signed-off-by: Alay Shah Signed-off-by: Suresh Gumpula Signed-off-by: Raphael Norwitz Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson commit 282c0a4d15b6d44b4684e2a4e19785c9fbcc102f Author: Jiele Zhao Date: Wed Apr 7 01:44:38 2021 +0000 integrity: Add declarations to init_once void arguments. init_once is a callback to kmem_cache_create. The parameter type of this function is void *, so it's better to give a explicit cast here. Signed-off-by: Jiele Zhao Signed-off-by: Mimi Zohar commit 41d75dd96205ef409f20556021f6e44860f2acce Author: Jiele Zhao Date: Tue Apr 6 02:12:10 2021 +0000 ima: Fix function name error in comment. The original function name was ima_path_check(). The policy parsing still supports PATH_CHECK. Commit 9bbb6cad0173 ("ima: rename ima_path_check to ima_file_check") renamed the function to ima_file_check(), but missed modifying the function name in the comment. Fixes: 9bbb6cad0173 ("ima: rename ima_path_check to ima_file_check"). Signed-off-by: Jiele Zhao Signed-off-by: Mimi Zohar commit 26594c6bbb60c6bc87e3762a86ceece57d164c66 Author: Jia-Ju Bai Date: Sat Mar 6 05:36:24 2021 -0800 rpmsg: qcom_glink_native: fix error return code of qcom_glink_rx_data() When idr_find() returns NULL to intent, no error return code of qcom_glink_rx_data() is assigned. To fix this bug, ret is assigned with -ENOENT in this case. Fixes: 64f95f87920d ("rpmsg: glink: Use the local intents when receiving data") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210306133624.17237-1-baijiaju1990@gmail.com Signed-off-by: Bjorn Andersson commit 4aed8aa41524a1fc6439171881c2bb7ace197528 Author: Valentin Schneider Date: Wed Apr 7 23:06:28 2021 +0100 sched/fair: Introduce a CPU capacity comparison helper During load-balance, groups classified as group_misfit_task are filtered out if they do not pass group_smaller_max_cpu_capacity(, ); which itself employs fits_capacity() to compare the sgc->max_capacity of both groups. Due to the underlying margin, fits_capacity(X, 1024) will return false for any X > 819. Tough luck, the capacity_orig's on e.g. the Pixel 4 are {261, 871, 1024}. If a CPU-bound task ends up on one of those "medium" CPUs, misfit migration will never intentionally upmigrate it to a CPU of higher capacity due to the aforementioned margin. One may argue the 20% margin of fits_capacity() is excessive in the advent of counter-enhanced load tracking (APERF/MPERF, AMUs), but one point here is that fits_capacity() is meant to compare a utilization value to a capacity value, whereas here it is being used to compare two capacity values. As CPU capacity and task utilization have different dynamics, a sensible approach here would be to add a new helper dedicated to comparing CPU capacities. Also note that comparing capacity extrema of local and source sched_group's doesn't make much sense when at the day of the day the imbalance will be pulled by a known env->dst_cpu, whose capacity can be anywhere within the local group's capacity extrema. While at it, replace group_smaller_{min, max}_cpu_capacity() with comparisons of the source group's min/max capacity and the destination CPU's capacity. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Reviewed-by: Qais Yousef Reviewed-by: Vincent Guittot Tested-by: Lingutla Chandrasekhar Link: https://lkml.kernel.org/r/20210407220628.3798191-4-valentin.schneider@arm.com commit 23fb06d9602b0fcfa1a16357a5d7a7f7076a39e2 Author: Valentin Schneider Date: Wed Apr 7 23:06:27 2021 +0100 sched/fair: Clean up active balance nr_balance_failed trickery When triggering an active load balance, sd->nr_balance_failed is set to such a value that any further can_migrate_task() using said sd will ignore the output of task_hot(). This behaviour makes sense, as active load balance intentionally preempts a rq's running task to migrate it right away, but this asynchronous write is a bit shoddy, as the stopper thread might run active_load_balance_cpu_stop before the sd->nr_balance_failed write either becomes visible to the stopper's CPU or even happens on the CPU that appended the stopper work. Add a struct lb_env flag to denote active balancing, and use it in can_migrate_task(). Remove the sd->nr_balance_failed write that served the same purpose. Cleanup the LBF_DST_PINNED active balance special case. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210407220628.3798191-3-valentin.schneider@arm.com commit 9bcb959d05eeb564dfc9cac13a59843a4fb2edf2 Author: Lingutla Chandrasekhar Date: Wed Apr 7 23:06:26 2021 +0100 sched/fair: Ignore percpu threads for imbalance pulls During load balance, LBF_SOME_PINNED will be set if any candidate task cannot be detached due to CPU affinity constraints. This can result in setting env->sd->parent->sgc->group_imbalance, which can lead to a group being classified as group_imbalanced (rather than any of the other, lower group_type) when balancing at a higher level. In workloads involving a single task per CPU, LBF_SOME_PINNED can often be set due to per-CPU kthreads being the only other runnable tasks on any given rq. This results in changing the group classification during load-balance at higher levels when in reality there is nothing that can be done for this affinity constraint: per-CPU kthreads, as the name implies, don't get to move around (modulo hotplug shenanigans). It's not as clear for userspace tasks - a task could be in an N-CPU cpuset with N-1 offline CPUs, making it an "accidental" per-CPU task rather than an intended one. KTHREAD_IS_PER_CPU gives us an indisputable signal which we can leverage here to not set LBF_SOME_PINNED. Note that the aforementioned classification to group_imbalance (when nothing can be done) is especially problematic on big.LITTLE systems, which have a topology the likes of: DIE [ ] MC [ ][ ] 0 1 2 3 L L B B arch_scale_cpu_capacity(L) < arch_scale_cpu_capacity(B) Here, setting LBF_SOME_PINNED due to a per-CPU kthread when balancing at MC level on CPUs [0-1] will subsequently prevent CPUs [2-3] from classifying the [0-1] group as group_misfit_task when balancing at DIE level. Thus, if CPUs [0-1] are running CPU-bound (misfit) tasks, ill-timed per-CPU kthreads can significantly delay the upgmigration of said misfit tasks. Systems relying on ASYM_PACKING are likely to face similar issues. Signed-off-by: Lingutla Chandrasekhar [Use kthread_is_per_cpu() rather than p->nr_cpus_allowed] [Reword changelog] Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Dietmar Eggemann Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210407220628.3798191-2-valentin.schneider@arm.com commit c722f35b513f807629603bbf24640b1a48be21b5 Author: Rik van Riel Date: Fri Mar 26 15:19:32 2021 -0400 sched/fair: Bring back select_idle_smt(), but differently Mel Gorman did some nice work in 9fe1f127b913 ("sched/fair: Merge select_idle_core/cpu()"), resulting in the kernel being more efficient at finding an idle CPU, and in tasks spending less time waiting to be run, both according to the schedstats run_delay numbers, and according to measured application latencies. Yay. The flip side of this is that we see more task migrations (about 30% more), higher cache misses, higher memory bandwidth utilization, and higher CPU use, for the same number of requests/second. This is most pronounced on a memcache type workload, which saw a consistent 1-3% increase in total CPU use on the system, due to those increased task migrations leading to higher L2 cache miss numbers, and higher memory utilization. The exclusive L3 cache on Skylake does us no favors there. On our web serving workload, that effect is usually negligible. It appears that the increased number of CPU migrations is generally a good thing, since it leads to lower cpu_delay numbers, reflecting the fact that tasks get to run faster. However, the reduced locality and the corresponding increase in L2 cache misses hurts a little. The patch below appears to fix the regression, while keeping the benefit of the lower cpu_delay numbers, by reintroducing select_idle_smt with a twist: when a socket has no idle cores, check to see if the sibling of "prev" is idle, before searching all the other CPUs. This fixes both the occasional 9% regression on the web serving workload, and the continuous 2% CPU use regression on the memcache type workload. With Mel's patches and this patch together, task migrations are still high, but L2 cache misses, memory bandwidth, and CPU time used are back down to what they were before. The p95 and p99 response times for the memcache type application improve by about 10% over what they were before Mel's patches got merged. Signed-off-by: Rik van Riel Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Mel Gorman Acked-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210326151932.2c187840@imladris.surriel.com commit 07125072b0a08a13331b46990ea48997fa0c64b4 Author: Johan Hovold Date: Thu Apr 8 17:08:59 2021 +0200 USB: serial: do not use tty class device for debugging Use the port struct device rather than tty class device for debugging. Note that while USB serial doesn't support serdev yet (due to serdev not handling hotplugging), serdev ttys do not have a corresponding class device and would have been logged using a "(NULL device *):" prefix. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 21175ca434c5d49509b73cf473618b01b0b85437 Author: Harshad Shirwadkar Date: Thu Apr 1 10:21:29 2021 -0700 ext4: make prefetch_block_bitmaps default Block bitmap prefetching is needed for these allocator optimization data structures to get populated and provide better group scanning order. So, turn it on bu default. prefetch_block_bitmaps mount option is now marked as removed and a new option no_prefetch_block_bitmaps is added to disable block bitmap prefetching. Signed-off-by: Harshad Shirwadkar Link: https://lore.kernel.org/r/20210401172129.189766-8-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit f68f4063855903fd3a279e646451eab04db0655f Author: Harshad Shirwadkar Date: Thu Apr 1 10:21:28 2021 -0700 ext4: add proc files to monitor new structures This patch adds a new file "mb_structs_summary" which allows us to see the summary of the new allocator structures added in this series. Here's the sample output of file: optimize_scan: 1 max_free_order_lists: list_order_0_groups: 0 list_order_1_groups: 0 list_order_2_groups: 0 list_order_3_groups: 0 list_order_4_groups: 0 list_order_5_groups: 0 list_order_6_groups: 0 list_order_7_groups: 0 list_order_8_groups: 0 list_order_9_groups: 0 list_order_10_groups: 0 list_order_11_groups: 0 list_order_12_groups: 0 list_order_13_groups: 40 fragment_size_tree: tree_min: 16384 tree_max: 32768 tree_nodes: 40 Signed-off-by: Harshad Shirwadkar Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20210401172129.189766-7-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 196e402adf2e4cd66f101923409f1970ec5f1af3 Author: Harshad Shirwadkar Date: Thu Apr 1 10:21:27 2021 -0700 ext4: improve cr 0 / cr 1 group scanning Instead of traversing through groups linearly, scan groups in specific orders at cr 0 and cr 1. At cr 0, we want to find groups that have the largest free order >= the order of the request. So, with this patch, we maintain lists for each possible order and insert each group into a list based on the largest free order in its buddy bitmap. During cr 0 allocation, we traverse these lists in the increasing order of largest free orders. This allows us to find a group with the best available cr 0 match in constant time. If nothing can be found, we fallback to cr 1 immediately. At CR1, the story is slightly different. We want to traverse in the order of increasing average fragment size. For CR1, we maintain a rb tree of groupinfos which is sorted by average fragment size. Instead of traversing linearly, at CR1, we traverse in the order of increasing average fragment size, starting at the most optimal group. This brings down cr 1 search complexity to log(num groups). For cr >= 2, we just perform the linear search as before. Also, in case of lock contention, we intermittently fallback to linear search even in CR 0 and CR 1 cases. This allows us to proceed during the allocation path even in case of high contention. There is an opportunity to do optimization at CR2 too. That's because at CR2 we only consider groups where bb_free counter (number of free blocks) is greater than the request extent size. That's left as future work. All the changes introduced in this patch are protected under a new mount option "mb_optimize_scan". With this patchset, following experiment was performed: Created a highly fragmented disk of size 65TB. The disk had no contiguous 2M regions. Following command was run consecutively for 3 times: time dd if=/dev/urandom of=file bs=2M count=10 Here are the results with and without cr 0/1 optimizations introduced in this patch: |---------+------------------------------+---------------------------| | | Without CR 0/1 Optimizations | With CR 0/1 Optimizations | |---------+------------------------------+---------------------------| | 1st run | 5m1.871s | 2m47.642s | | 2nd run | 2m28.390s | 0m0.611s | | 3rd run | 2m26.530s | 0m1.255s | |---------+------------------------------+---------------------------| Signed-off-by: Harshad Shirwadkar Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20210401172129.189766-6-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 4b68f6df105966f04f45f1eca0561b86f2b3551d Author: Harshad Shirwadkar Date: Thu Apr 1 10:21:26 2021 -0700 ext4: add MB_NUM_ORDERS macro A few arrays in mballoc.c use the total number of valid orders as their size. Currently, this value is set as "sb->s_blocksize_bits + 2". This makes code harder to read. So, instead add a new macro MB_NUM_ORDERS(sb) to make the code more readable. Signed-off-by: Harshad Shirwadkar Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20210401172129.189766-5-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit a6c75eaf11032f4a3d2b3ce2265a194ac6e4a7f0 Author: Harshad Shirwadkar Date: Thu Apr 1 10:21:25 2021 -0700 ext4: add mballoc stats proc file Add new stats for measuring the performance of mballoc. This patch is forked from Artem Blagodarenko's work that can be found here: https://github.com/lustre/lustre-release/blob/master/ldiskfs/kernel_patches/patches/rhel8/ext4-simple-blockalloc.patch This patch reorganizes the stats by cr level. This is how the output looks like: mballoc: reqs: 0 success: 0 groups_scanned: 0 cr0_stats: hits: 0 groups_considered: 0 useless_loops: 0 bad_suggestions: 0 cr1_stats: hits: 0 groups_considered: 0 useless_loops: 0 bad_suggestions: 0 cr2_stats: hits: 0 groups_considered: 0 useless_loops: 0 cr3_stats: hits: 0 groups_considered: 0 useless_loops: 0 extents_scanned: 0 goal_hits: 0 2^n_hits: 0 breaks: 0 lost: 0 buddies_generated: 0/40 buddies_time_used: 0 preallocated: 0 discarded: 0 Signed-off-by: Harshad Shirwadkar Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20210401172129.189766-4-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit b237e3044450fcabc6d63d8578b2fbc8237caba3 Author: Harshad Shirwadkar Date: Thu Apr 1 10:21:24 2021 -0700 ext4: add ability to return parsed options from parse_options Before this patch, the function parse_options() was returning journal_devnum and journal_ioprio variables to the caller. This patch generalizes that interface to allow parse_options to return any parsed options to return back to the caller. In this patch series, it gets used to capture the value of "mb_optimize_scan=%u" mount option. Signed-off-by: Harshad Shirwadkar Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20210401172129.189766-3-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit 67d25186046145748d5fe4c5019d832215e01c1e Author: Harshad Shirwadkar Date: Thu Apr 1 10:21:23 2021 -0700 ext4: drop s_mb_bal_lock and convert protected fields to atomic s_mb_buddies_generated gets used later in this patch series to determine if the cr 0 and cr 1 optimziations should be performed or not. Currently, s_mb_buddies_generated is protected under a spin_lock. In the allocation path, it is better if we don't depend on the lock and instead read the value atomically. In order to do that, we drop s_bal_lock altogether and we convert the only two protected fields by it s_mb_buddies_generated and s_mb_generation_time to atomic type. Signed-off-by: Harshad Shirwadkar Reviewed-by: Andreas Dilger Reviewed-by: Ritesh Harjani Link: https://lore.kernel.org/r/20210401172129.189766-2-harshadshirwadkar@gmail.com Signed-off-by: Theodore Ts'o commit a149d2a5cabbf6507a7832a1c4fd2593c55fd450 Author: Zhang Yi Date: Wed Mar 31 20:15:16 2021 +0800 ext4: fix check to prevent false positive report of incorrect used inodes Commit <50122847007> ("ext4: fix check to prevent initializing reserved inodes") check the block group zero and prevent initializing reserved inodes. But in some special cases, the reserved inode may not all belong to the group zero, it may exist into the second group if we format filesystem below. mkfs.ext4 -b 4096 -g 8192 -N 1024 -I 4096 /dev/sda So, it will end up triggering a false positive report of a corrupted file system. This patch fix it by avoid check reserved inodes if no free inode blocks will be zeroed. Cc: stable@kernel.org Fixes: 50122847007 ("ext4: fix check to prevent initializing reserved inodes") Signed-off-by: Zhang Yi Suggested-by: Jan Kara Link: https://lore.kernel.org/r/20210331121516.2243099-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o commit 828b480977421e9fbe93ecbdc65689ec7cc1e834 Merge: 30700a057ce84 41d3109300845 Author: Mark Brown Date: Fri Apr 9 16:28:09 2021 +0100 Merge series "spi: spi-zynqmp-gpspi: fix some issues" from quanyang.wang@windriver.com Quanyang Wang : From: Quanyang Wang Hello, This series fix some issues that occurs when the gqspi driver switches to spi-mem framework. Hi Amit, I rewrite the "Subject" and "commit message" of these patches, so they look different from the ones which you reviewed before. I still keep your "Reviewed-by" and hope you will not mind. Regards, Quanyang Wang Quanyang Wang (4): spi: spi-zynqmp-gqspi: use wait_for_completion_timeout to make zynqmp_qspi_exec_op not interruptible spi: spi-zynqmp-gqspi: add mutex locking for exec_op spi: spi-zynqmp-gqspi: transmit dummy circles by using the controller's internal functionality spi: spi-zynqmp-gqspi: fix incorrect operating mode in zynqmp_qspi_read_op drivers/spi/spi-zynqmp-gqspi.c | 53 +++++++++++++++++----------------- 1 file changed, 27 insertions(+), 26 deletions(-) -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit 2c412337cfe655bcc6adff8904fc653a1678f70f Author: Alan Stern Date: Thu Apr 8 11:22:09 2021 -0400 PM: runtime: Add documentation for pm_runtime_resume_and_get() Commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") added a new runtime-PM API function without updating the documentation in runtime_pm.rst. Add the missing documentation. Signed-off-by: Alan Stern Fixes: dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") Signed-off-by: Rafael J. Wysocki commit b989bc0f3cf24122ec700e66eb8ffb93432f18c5 Author: Rafael J. Wysocki Date: Wed Apr 7 16:21:55 2021 +0200 cpufreq: intel_pstate: Simplify intel_pstate_update_perf_limits() Because pstate.max_freq is always equal to the product of pstate.max_pstate and pstate.scaling and, analogously, pstate.turbo_freq is always equal to the product of pstate.turbo_pstate and pstate.scaling, the result of the max_policy_perf computation in intel_pstate_update_perf_limits() is always equal to the quotient of policy_max and pstate.scaling, regardless of whether or not turbo is disabled. Analogously, the result of min_policy_perf in intel_pstate_update_perf_limits() is always equal to the quotient of policy_min and pstate.scaling. Accordingly, intel_pstate_update_perf_limits() need not check whether or not turbo is enabled at all and in order to compute max_policy_perf and min_policy_perf it can always divide policy_max and policy_min, respectively, by pstate.scaling. Make it do so. While at it, move the definition and initialization of the turbo_max local variable to the code branch using it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Tested-by: Chen Yu commit 903a0e76aa01f78782bb32b6202dc066c3fde8f1 Author: Andy Shevchenko Date: Tue Apr 6 16:16:15 2021 +0300 tty: pti: Remove Kconfig leftovers The commit 8ba59e9dee31 ("misc: pti: Remove driver for deprecated platform") got rid of deprecated drivers under TTY subsystem, but cleaned only one Kconfig entry. Remove Kconfig leftovers. Fixes: 8ba59e9dee31 ("misc: pti: Remove driver for deprecated platform") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210406131615.85432-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 312723a0b34d6d110aa4427a982536bb36ab8471 Author: Kees Cook Date: Mon Apr 5 14:39:59 2021 -0700 debugfs: Make debugfs_allow RO after init Since debugfs_allow is only set at boot time during __init, make it read-only after being set. Fixes: a24c6f7bc923 ("debugfs: Add access restriction option") Cc: Peter Enderborg Reviewed-by: Peter Enderborg Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210405213959.3079432-1-keescook@chromium.org Signed-off-by: Greg Kroah-Hartman commit 60c8eb38c1b75e83194a07ec7acfe85852fcc0d8 Merge: 7990ccafaa37d 6cbdfb3d91bab Author: Mimi Zohar Date: Fri Apr 9 10:41:57 2021 -0400 Merge branch 'ima-module-signing-v4' into next-integrity From the series cover letter: Kernel modules are currently only signed when CONFIG_MODULE_SIG is enabled. The kernel module signing key is a self-signed CA only loaded onto the .builtin_trusted_key keyring. On secure boot enabled systems with an arch specific IMA policy enabled, but without MODULE_SIG enabled, kernel modules are not signed, nor is the kernel module signing public key loaded onto the IMA keyring. In order to load the the kernel module signing key onto the IMA trusted keyring ('.ima'), the certificate needs to be signed by a CA key either on the builtin or secondary keyrings. The original version of this patch set created and loaded a kernel-CA key onto the builtin keyring. The kernel-CA key signed the kernel module signing key, allowing it to be loaded onto the IMA trusted keyring. However, missing from this version was support for the kernel-CA to sign the hardware token certificate. Adding that support would add additional complexity. Since the kernel module signing key is embedded into the Linux kernel at build time, instead of creating and loading a kernel-CA onto the builtin trusted keyring, this version makes an exception and allows the self-signed kernel module signing key to be loaded directly onto the trusted IMA keyring. commit 6cbdfb3d91bab122033bd2ecae8c259cb6e4f7d0 Author: Nayna Jain Date: Fri Apr 9 10:35:07 2021 -0400 ima: enable loading of build time generated key on .ima keyring The kernel currently only loads the kernel module signing key onto the builtin trusted keyring. Load the module signing key onto the IMA keyring as well. Signed-off-by: Nayna Jain Acked-by: Stefan Berger Signed-off-by: Mimi Zohar commit 0165f4ca223b04bb032095753fadd28816dc435f Author: Nayna Jain Date: Fri Apr 9 10:35:06 2021 -0400 ima: enable signing of modules with build time generated key The kernel build process currently only signs kernel modules when MODULE_SIG is enabled. Also, sign the kernel modules at build time when IMA_APPRAISE_MODSIG is enabled. Signed-off-by: Nayna Jain Acked-by: Stefan Berger Signed-off-by: Mimi Zohar commit b31f2a495debc71bdfefefea8056ade429f79c4b Author: Nayna Jain Date: Fri Apr 9 10:35:05 2021 -0400 keys: cleanup build time module signing keys The "mrproper" target is still looking for build time generated keys in the kernel root directory instead of certs directory. Fix the path and remove the names of the files which are no longer generated. Fixes: cfc411e7fff3 ("Move certificate handling to its own directory") Signed-off-by: Nayna Jain Reviewed-by: Stefan Berger Reviewed-by: Jarkko Sakkinen Signed-off-by: Mimi Zohar commit d55c46f360279862d62dc03b8de3104e2786f026 Author: Fabio Aiuto Date: Fri Apr 9 14:40:03 2021 +0200 staging: rtl8723bs: remove MSG_8192C macro definitions remove obsolete MSG_8192C macro definitions. MSG_8192C is a private trace mechanism macro and is deactivated. (i.e. the default behaviour is _do nothing_) The only way to activate it is to manually define a debug symbol. So just remove it. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/97f38f269e8dabb3dd7464d49022a62cd9773657.1617971593.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e727b582075a4c7ddd896c1fe63060468c16f936 Author: Fabio Aiuto Date: Fri Apr 9 14:40:02 2021 +0200 staging: rtl8723bs: remove commented out MSG_8192C log remove commented out MSG_8192C log. MSG_8192C is a private trace mechanism macro and is deactivated. (i.e. the default behaviour is _do nothing_) The only way to activate it is to manually define a debug symbol. So just remove it. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/845969563d7c90d1b7aa3215ae29dd91afc5100c.1617971592.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c841b8e27487956361ebefdffa76859cac2393c4 Author: Fabio Aiuto Date: Fri Apr 9 14:40:01 2021 +0200 staging: rtl8723bs: remove all MSG_8192C logs remove all MSG_8192C logs. MSG_8192C is a private trace mechanism macro and is deactivated. (i.e. the default behaviour is _do nothing_) The only way to activate it is to manually define a debug symbol. So just remove it. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/fa7f52aa90928dc86b3249ca9c5b27f92c2b071b.1617971592.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 345c4e9a7ecedd97a31d6d961b463f33617cbc32 Author: Fabio Aiuto Date: Fri Apr 9 12:01:39 2021 +0200 staging: rtl8723bs: remove decl of unused static const variable in os_dep/ioctl_linux.c fix following kernel test robot warning: At top level: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27: warning: 'iw_operation_mode' defined but not used [-Wunused-const-variable=] 36 | static const char * const iw_operation_mode[] = { | ^~~~~~~~~~~~~~~~~ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/05cc97a114269ee55ac9a91c61493c885fcc0193.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1fdc17a793206b877fd726449c5c2dfa7c7fe6b9 Author: Fabio Aiuto Date: Fri Apr 9 12:01:38 2021 +0200 staging: rtl8723bs: remove unused variable in os_dep/ioctl_linux.c fix following kernel test robot warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_wx_set_mlme’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1128:6: warning: variable ‘reason’ set but not used [-Wunused-but-set-variable] u16 reason; ^~~~~~ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6211c4177a9ef1e677987c9ebac445df08605f40.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc122027a5cee334ed41090c25f075c973aa258b Author: Fabio Aiuto Date: Fri Apr 9 12:01:37 2021 +0200 staging: rtl8723bs: remove unused variable declaration in include/rtw_security.h fix following kernel test robot warning: At top level: drivers/staging/rtl8723bs/include/rtw_security.h:336:28: warning: 'K' defined but not used [-Wunused-const-variable=] 336 | static const unsigned long K[64] = { | ^ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/819680ab87bbe543aba966f1fe47b209d3d8a69f.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit dc06fdd79fc4ac3f4e289a7b401e564ab5fdcb08 Author: Fabio Aiuto Date: Fri Apr 9 12:01:36 2021 +0200 staging: rtl8723bs: remove unused pmlmepriv variable in rtw_dbg_port() in os_dep/ioctl_linux.c remove unused variable. Fix W=1 compiler warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2444:20: warning: unused variable ‘pmlmepriv’ [-Wunused-variable] struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e8a31937b0075162104347e1c8ecc5e6d079f6d2.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9af90936f091c75f39326c6e2ba32684f2208bbe Author: Fabio Aiuto Date: Fri Apr 9 12:01:35 2021 +0200 staging: rtl8723bs: remove unused cur_network variable in rtw_dbg_port() in os_dep/ioctl_linux.c remove unused variable. Fix W=1 compiler warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2447:23: warning: unused variable ‘cur_network’ [-Wunused-variable] struct wlan_network *cur_network = &(pmlmepriv->cur_network); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6aed13408f912b6c36a19a5e91e17b1126fc6247.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 96f85950ca96ed4d965feb387ae80c68093ad5d7 Author: Fabio Aiuto Date: Fri Apr 9 12:01:34 2021 +0200 staging: rtl8723bs: remove unused variable pstapriv in rtw_dbg_port() in os_dep/ioctl_linux.c remove unused variable. W=1 compiler issue: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2448:19: warning: unused variable ‘pstapriv’ [-Wunused-variable] struct sta_priv *pstapriv = &padapter->stapriv; Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/d433ffa5b52d6510811c882a80c1146c7d7be536.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8db11e79ac2a686e540f11ef9f659633607356c1 Author: Fabio Aiuto Date: Fri Apr 9 12:01:33 2021 +0200 staging: rtl8723bs: remove set but unused psta variable in rtw_dbg_port() in os_dep/ioctl_linux.c remove set but unused variable. Fix W=1 compiler warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2443:19: warning: variable ‘psta’ set but not used [-Wunused-but-set-variable] struct sta_info *psta; ^~~~ Remove also the function call that sets this variable. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/62b6c48b887decdde4b5343472089665518d205b.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4f4cbe7e853c5437068ee78c2c8c7a5684d3a746 Author: Fabio Aiuto Date: Fri Apr 9 12:01:32 2021 +0200 staging: rtl8723bs: remove unused variables and code block left unused in os_dep/ioctl_linux.c fix following kernel test robot warnings: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2548:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] struct recv_reorder_ctrl *preorder_ctrl; ^~~~~~~~~~~~~ remove also unnecessary conditional code block. Reported-by: kernel test robot Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0e950e74565b573a98b851092cc2078045d5ac3d.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2f0b03160d80ed0133b8a1d98f6f5375e1c52d2c Author: Fabio Aiuto Date: Fri Apr 9 12:01:31 2021 +0200 staging: rtl8723bs: remove unused code block in os_dep/ioctl_linux.c remove unused code block which does nothing. A list is parsed but no value is written outside the scope of the function rtw_dbg_port. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b1d8f99f949fd79b27295e8a508d1b0c5861622f.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ffdbed83c48c4f3e66f968ccaa8421e7e65aa5bb Author: Fabio Aiuto Date: Fri Apr 9 12:01:30 2021 +0200 staging: rtl8723bs: remove unused variable and empty for cycles left unused in os_dep/ioctl_linux.c fix following kernel test robot warnings: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] struct recv_reorder_ctrl *preorder_ctrl; ^~~~~~~~~~~~~ remove also empty for cycle left unused and counter variable. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/fb1e8ea3cfeda1af27ab1a9393140e144b5cb4b5.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2fd8a02012112d35a502eb5a2969ecd52a1ec7b7 Author: Fabio Aiuto Date: Fri Apr 9 12:01:29 2021 +0200 staging: rtl8723bs: remove unused variable in core/rtw_cmd.c fix following kernel test robot warning: drivers/staging/rtl8723bs/core/rtw_cmd.c: In function 'rtw_cmd_thread': >> drivers/staging/rtl8723bs/core/rtw_cmd.c:390:16: warning: variable 'cmd_start_time' set but not used [-Wunused-but-set-variable] 390 | unsigned long cmd_start_time; | ^~~~~~~~~~~~~~ Reported-by: kernel test robot Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/509eeb1c4a7fcfc37b69cb8578ea146b95b50864.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e28a09fc0b9d25cd3dbf662f5aed9e59892899da Author: Martin Kaiser Date: Thu Apr 8 21:56:01 2021 +0200 staging: rtl8188eu: simplify rtw_cmd_thread's main loop In rtw_cmd_thread's main loop, we wait until there's a command in the queue. To skip this wait statement in subsequent iterations, the driver uses a label and goto instead of the actual loop. We only get back to the initial wait if the queue is empty when we read it. Basically, all we want to do is check if there's a command in the queue. If yes, we process it. If not, we wait until someone enqueues a command. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 92d056d6cb023184312837116f65887407defbfe Author: Martin Kaiser Date: Thu Apr 8 21:56:00 2021 +0200 staging: rtl8188eu: remove a dead assignment There's no need to set cmd_hdl to NULL after it's used. It will be set again before the next command is processed. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ea21efe66253191163ad9384b19e0f8d02254ce6 Author: Martin Kaiser Date: Thu Apr 8 21:55:59 2021 +0200 staging: rtl8188eu: remove duplicate if statement There's two identical checks if the device was stopped or unplugged. Remove one of them. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit ddc7e53e5eca4fa237ce3b1cc0a5f67674a1cdad Author: Martin Kaiser Date: Thu Apr 8 21:55:58 2021 +0200 staging: rtl8188eu: always free cmd_obj in the cmd thread The rtl8188 driver starts a command thread that reads commands from a queue and processes them. Each command consists of a struct cmd_obj. The command thread may call a function to process the current command and optionally a post-processing function. Eventually, the command's cmd_obj must be freed. At the moment, if there's a post-processing function for the current command, this function has to free the cmd_obj. If there's no post-processing function, the command thread frees cmd_obj. It's much simpler if we always leave it to the command thread to free cmd_obj. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e2794029df299754b5d7662f8e57a6c9ba423f1f Author: Martin Kaiser Date: Thu Apr 8 21:55:57 2021 +0200 staging: rtl8188eu: move another static array from .h to .c Move the declaration of the rtw_cmd_callback array from rtw_cmd.h to rtw_cmd.c. The _RTW_CMD_C_ symbol is now obsolete and can be removed. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 7b697f098d8a438b0e2750a46980781d2198e94f Author: Martin Kaiser Date: Thu Apr 8 21:55:56 2021 +0200 staging: rtl8188eu: move static array from .h to .c Declaring a static array in a header file is likely to cause name conflicts if the declaration is pulled in multiple times. The rtl8188 driver protects the declaration of the wlancmds array in rtw_mlme_ext.h with ifdef _RTW_CMD_C_, which is defined only in rtw_cmd.c. It makes more sense to declare the array in the .c file. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 2fa087e0ae72e39e256c12642ee870da1fdf1164 Author: Martin Kaiser Date: Thu Apr 8 21:55:55 2021 +0200 staging: rtl8188eu: remove a constant variable enqueue is always 0. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit dfb1a3ae1d111a0038d73d988b8dae7f813c0958 Author: Martin Kaiser Date: Thu Apr 8 21:55:54 2021 +0200 staging: rtl8188eu: remove unused function parameter The struct adapter parameter of rtw_os_recvbuf_resource_alloc is not used. Remove it. While at it, use the same parameter name in the prototype and the function definition. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit f40e1901bed016400452e639293741f8b5731fca Author: Martin Kaiser Date: Thu Apr 8 21:55:53 2021 +0200 staging: rtl8188eu: replace switch-case with if This switch has only one case. Replace it with an if statement. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 062f6d14521d4f27f1612940b30566f8b5b430a0 Author: Martin Kaiser Date: Thu Apr 8 21:55:52 2021 +0200 staging: rtl8188eu: make ffaddr2pipehdl static This function is used only inside usb_ops_linux.c. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 767d1c72aa3f49d5ac7ccd46fc69b5f4462fd944 Author: Martin Kaiser Date: Thu Apr 8 21:55:51 2021 +0200 staging: rtl8188eu: remove prototype for non-existing function There's no usb_read_port_cancel function in this driver. Remove its prototype. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e46ff78bc2b155ac980558a84d0a118d00fb4b12 Author: Martin Kaiser Date: Thu Apr 8 21:55:50 2021 +0200 staging: rtl8188eu: remove the last urb callback macros Both usb_read_port_complete and usb_write_port_complete have a regs parameter that is not used. When this parameter is removed, the functions can be used as urb completion callbacks directly. There's no need for the macros that strip the second parameter. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210408195601.4762-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit eae92424d1835634397f8f8e32c56ae777eb6cc9 Author: Jiapeng Chong Date: Fri Apr 9 14:23:45 2021 +0800 staging: comedi: cb_pcidas64: remove useless function Fix the following gcc warning: drivers/staging/comedi/drivers/cb_pcidas64.c:232:19: warning: unused function 'analog_trig_low_threshold_bits' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1617949425-105420-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 3f8f36da0c5d6c40d90fc144d41d04950b9ec03f Author: Sergei Krainov Date: Fri Apr 9 14:46:11 2021 +0200 staging: rtl8712: fix wrong function output Return NULL from r8712_find_network() if no matched wlan_network was found. Code with a bug: while (plist != phead) { pnetwork = container_of(plist, struct wlan_network, list); plist = plist->next; if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN)) break; } spin_unlock_irqrestore(&scanned_queue->lock, irqL); return pnetwork; In this code last processed pnetwork returned if list end was reached and no pnetwork matched test condition. Signed-off-by: Sergei Krainov Link: https://lore.kernel.org/r/20210409124611.GA3981@test-VirtualBox Signed-off-by: Greg Kroah-Hartman commit 57b138dde3504b79358cd0d95d989bf5eba8280b Author: Dan Carpenter Date: Fri Apr 9 15:34:41 2021 +0300 ALSA: control - double free in snd_ctl_led_init() "group - 1" was intended here instead of "group". The current error handling will double free the first item in the array and leak the last item. Fixes: cb17fe0045aa ("ALSA: control - add sysfs support to the LED trigger module") Signed-off-by: Dan Carpenter Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/YHBJ4frGxErWB182@mwanda Signed-off-by: Takashi Iwai commit b3dffce0e0aa7114fd6da1ce3e602044ed6254cc Author: Pu Lehui Date: Fri Apr 9 12:57:28 2021 +0800 staging: rtl8723bs: remove unused variable pwrctl GCC reports the following warning with W=1: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:532:23: warning: variable 'pwrctl' set but not used [-Wunused-but-set-variable] 532 | struct pwrctrl_priv *pwrctl; | ^~~~~~ This variable is not used so remove it to fix the warning. Signed-off-by: Pu Lehui Link: https://lore.kernel.org/r/20210409045728.125852-1-pulehui@huawei.com Signed-off-by: Greg Kroah-Hartman commit 8ff753bc1631487d4b4046161472f2bc0468af84 Author: Muhammad Usama Anjum Date: Fri Apr 9 01:44:57 2021 +0500 staging: rtl8723bs: Remove unnecessary code The same code is executed when the condition "!show_errors" is true or false. Remove the if condition from here. The original intension of this condition was to not to report any error logs if condition was true. But this driver doesn't has those logs added. So this if condition can be removed. Signed-off-by: Muhammad Usama Anjum Addresses-Coverity: ("Same code execution") Link: https://lore.kernel.org/r/20210408204457.GA3079308@LEGION Signed-off-by: Greg Kroah-Hartman commit 8b4fa9c356c37f212261ecc2f5396ccc4801e3b4 Author: Christophe JAILLET Date: Thu Apr 8 21:58:53 2021 +0200 staging: rtl8712: remove (most of) enum WIFI_FRAME_TYPE The values defined in enum WIFI_FRAME_TYPE are the same the #define IEEE80211_FTYPE_xxx from Use these values to avoid code duplication. WIFI_QOS_DATA_TYPE is a bit more tricky and doesn't have a direct equivalence in . So leave this one as-is for now. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/e009a4ee6429a3f79742f9a912e3f6a650fb33ed.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 6e2baa44c6d1f455fae887112f0c2926a7d253e4 Author: Christophe JAILLET Date: Thu Apr 8 21:58:40 2021 +0200 staging: rtl8712: remove enum WIFI_FRAME_SUBTYPE The values defined in enum WIFI_FRAME_SUBTYPE are the same the #define IEEE80211_STYPE_xxx from Use theses values to avoid code duplication. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/5a6fdcf0b5eb43c3d5511b5badd60bfac9389628.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 63ee275711d55d74551265a230f760b660a8c2f8 Author: Christophe JAILLET Date: Thu Apr 8 21:58:27 2021 +0200 staging: rtl8712: remove struct rtl_ieee80211_ht_cap and ieee80211_ht_addt_info struct 'ieee80211_ht_addt_info' is unused and can be removed. struct 'rtl_ieee80211_ht_cap' can be replaced by 'ieee80211_ht_cap' defined in which has the same layout. Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/4291cb10744457cc12c89fc9fd414c37d732bc9d.1617911201.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 7569c1bc3ffea7fbb44f01b724a172c5c7f4f950 Author: Tian Tao Date: Thu Apr 8 16:17:25 2021 +0800 staging: rtl8723bs: remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Signed-off-by: Zhiqi Song Link: https://lore.kernel.org/r/1617869845-43046-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit bb40b33d3045c147b7a42ec3750c76bfe09c2198 Author: Mitali Borkar Date: Thu Apr 8 17:21:09 2021 +0530 staging: rtl8712: add spaces around '+' Added spaces around '+' to improve readability and adhere to linux kernel coding style. Reported by checkpatch Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/YG7uLQLGmAh97xB1@kali Signed-off-by: Greg Kroah-Hartman commit 496960274153bdeb9d1f904ff1ea875cef8232c1 Author: Johan Hovold Date: Thu Apr 8 15:16:02 2021 +0200 USB: cdc-acm: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when it is not used. Similarly, baud_base could be used to set the UART base clock when it could not be detected, but might as well be left unset when it is not known (which is the case for CDC). Fix the cdc-acm TIOCGSERIAL implementation by dropping its custom interpretation of the unused xmit_fifo_size and baud_base fields, which overflowed the former with the URB buffer size and set the latter to the current line speed. Also return the port line number, which is the only other value used besides the close parameters. Note that the current line speed can still be retrieved through the standard termios interfaces. Fixes: 18c75720e667 ("USB: allow users to run setserial with cdc-acm") Acked-by: Oliver Neukum Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210408131602.27956-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit dd5619582d60007139f0447382d2839f4f9e339b Author: Johan Hovold Date: Thu Apr 8 15:16:01 2021 +0200 USB: cdc-acm: fix unprivileged TIOCCSERIAL TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. A non-privileged user has only ever been able to set the since long deprecated ASYNC_SPD flags and trying to change any other *supported* feature should result in -EPERM being returned. Setting the current values for any supported features should return success. Fix the cdc-acm implementation which instead indicated that the TIOCSSERIAL ioctl was not even implemented when a non-privileged user set the current values. Fixes: ba2d8ce9db0a ("cdc-acm: implement TIOCSSERIAL to avoid blocking close(2)") Acked-by: Oliver Neukum Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210408131602.27956-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 729f7955cb987c5b7d7e54c87c5ad71c789934f7 Author: Johan Hovold Date: Thu Apr 8 15:16:00 2021 +0200 Revert "USB: cdc-acm: fix rounding error in TIOCSSERIAL" This reverts commit b401f8c4f492cbf74f3f59c9141e5be3071071bb. The offending commit claimed that trying to set the values reported back by TIOCGSERIAL as a regular user could result in an -EPERM error when HZ is 250, but that was never the case. With HZ=250, the default 0.5 second value of close_delay is converted to 125 jiffies when set and is converted back to 50 centiseconds by TIOCGSERIAL as expected (not 12 cs as was claimed, even if that was the case before an earlier fix). Comparing the internal current and new jiffies values is just fine to determine if the value is about to change so drop the bogus workaround (which was also backported to stable). For completeness: With different default values for these parameters or with a HZ value not divisible by two, the lack of rounding when setting the default values in tty_port_init() could result in an -EPERM being returned, but this is hardly something we need to worry about. Cc: Anthony Mallet Cc: stable@vger.kernel.org Acked-by: Oliver Neukum Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210408131602.27956-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3d28466e5f4f8110da44ebad6a3054ec3020cdc4 Author: Hans de Goede Date: Fri Apr 9 15:40:33 2021 +0200 platform/x86/intel_cht_int33fe: Add displayport altmode fwnode to the connector fwnode Add a displayport altmode fwnode to the usb-connector fwnode, devices which use this driver support display-port altmode through the PI3USB30532 USB switch, this enables support for this. Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210409134033.105834-4-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 55d8b34772e0728a224198ba605eed8cfc570aa0 Author: Hans de Goede Date: Fri Apr 9 15:40:32 2021 +0200 usb: typec: tcpm: Add support for altmodes Add support for altmodes described in the usb-connector fwnode associated with the Type-C controller by calling the new typec_port_register_altmodes_from_fwnode() helper for this. Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210409134033.105834-3-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 7b458a4c5d7302947556e12c83cfe4da769665d0 Author: Hans de Goede Date: Fri Apr 9 15:40:31 2021 +0200 usb: typec: Add typec_port_register_altmodes() This can be used by Type-C controller drivers which use a standard usb-connector fwnode, with altmodes sub-node, to describe the available altmodes. Note there are is no devicetree bindings documentation for the altmodes node, this is deliberate. ATM the fwnodes used to register the altmodes are only used internally to pass platform info from a drivers/platform/x86 driver to the type-c subsystem. When a devicetree user of this functionally comes up and the dt-bindings have been hashed out the internal use can be adjusted to match the dt-bindings. Currently the typec_port_register_altmodes() function expects an "altmodes" child fwnode on port->dev with this "altmodes" fwnode having child fwnodes itself with each child containing 2 integer properties: 1. A "svid" property, which sets the id of the altmode, e.g. displayport altmode has a svid of 0xff01. 2. A "vdo" property, typically used as a bitmask describing the capabilities of the altmode, the bits in the vdo are specified in the specification of the altmode. Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210409134033.105834-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 3a2a91a2d51761557843996a66098eb7182b48b4 Author: Hans de Goede Date: Fri Apr 9 14:41:36 2021 +0200 usb: roles: Call try_module_get() from usb_role_switch_find_by_fwnode() usb_role_switch_find_by_fwnode() returns a reference to the role-switch which must be put by calling usb_role_switch_put(). usb_role_switch_put() calls module_put(sw->dev.parent->driver->owner), add a matching try_module_get() to usb_role_switch_find_by_fwnode(), making it behave the same as the other usb_role_switch functions which return a reference. This avoids a WARN_ON being hit at kernel/module.c:1158 due to the module-refcount going below 0. Fixes: c6919d5e0cd1 ("usb: roles: Add usb_role_switch_find_by_fwnode()") Cc: stable Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210409124136.65591-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 124b11cc4f6276e9e435802b160c368f35f59e1a Author: Manish Narani Date: Thu Apr 8 23:24:08 2021 +0530 usb: dwc3: xilinx: Remove the extra freeing of clocks The clocks are configured by devm_clk_bulk_get_all() in this driver. In case of any error the clocks freeing will be handled automatically. There is no need to explicitly free the clocks. Fix the same. Fixes: 84770f028fab ("usb: dwc3: Add driver for Xilinx platforms") Signed-off-by: Manish Narani Link: https://lore.kernel.org/r/1617904448-74611-3-git-send-email-manish.narani@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 3a2a68ecb25ec743004af6930bcdb9a3ae3ff217 Author: Manish Narani Date: Thu Apr 8 23:24:07 2021 +0530 usb: dwc3: Resolve kernel-doc warning for Xilinx DWC3 driver The kernel-doc run gave a warning for Xilinx DWC3 driver: drivers/usb/dwc3/dwc3-xilinx.c:27: warning: expecting prototype for dwc3(). Prototype was for XLNX_USB_PHY_RST_EN() instead Basically it was due to an extra '*' in line:2. This patch fixes the same. Reported-by: kernel test robot Signed-off-by: Manish Narani Link: https://lore.kernel.org/r/1617904448-74611-2-git-send-email-manish.narani@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 17af793217a68ce344c46e1f96c86587011d6785 Author: Hongren Zheng (Zenithal) Date: Wed Mar 31 01:00:13 2021 +0800 docs: usbip: Fix major fields and descriptions in protocol The old document for usbip protocol is misleading and hard to read: * Some fields in header are incorrect * Explanation of some fields are unclear or even wrong * Padding of header (namely all headers have the same length) is not explicitly pointed out, which is crucial for stream protocol like TCP Major changes: * Document the correct field as described in the codebase. * Document the padding in usbip headers. This is crucial for TCP stream hence these padding should be explicitly point out. In code these padding are implemented by a union of all headers. * Fix two FIXME related to usbip unlink and Document the behavior of unlink in different situation. * Clarify some field with more accurate explanation, like those fields associated with URB. Some constraints are extracted from code. * Delete specific transfer_flag doc in usbip as it should be documented by the URB doc in Documentation/driver-api/usb/URB.rst * Add data captured from wire as example Version change: From "PRELIMINARY DRAFT, MAY CONTAIN MISTAKES, 28 Jun 2011" To "Version 1, 31 Mar 2021" Co-developed-by: Alexandre Demers Reviewed-by: Randy Dunlap Reviewed-by: Shuah Khan Signed-off-by: Hongren Zheng Link: https://lore.kernel.org/r/YGNZHfmAbHO6fyAr@Sun Signed-off-by: Greg Kroah-Hartman commit 025f97d188006eeee4417bb475a6878d1e0eed3f Author: Bixuan Cui Date: Thu Apr 8 21:08:31 2021 +0800 usb: core: hub: Fix PM reference leak in usb_port_resume() pm_runtime_get_sync will increment pm usage counter even it failed. thus a pairing decrement is needed. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Link: https://lore.kernel.org/r/20210408130831.56239-1-cuibixuan@huawei.com Signed-off-by: Greg Kroah-Hartman commit 9535b99533904e9bc1607575aa8e9539a55435d7 Author: Bixuan Cui Date: Thu Apr 8 17:18:36 2021 +0800 usb: musb: fix PM reference leak in musb_irq_work() pm_runtime_get_sync will increment pm usage counter even it failed. thus a pairing decrement is needed. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Bixuan Cui Link: https://lore.kernel.org/r/20210408091836.55227-1-cuibixuan@huawei.com Signed-off-by: Greg Kroah-Hartman commit a932ee40c276767cd55fadec9e38829bf441db41 Author: Yang Yingliang Date: Wed Apr 7 17:29:47 2021 +0800 usb: gadget: tegra-xudc: Fix possible use-after-free in tegra_xudc_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210407092947.3271507-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 7c53624cbdbe9f6b0c71533efd7c8637ea4a47e3 Author: Zheng Yongjun Date: Mon Apr 5 18:14:34 2021 +0800 usb: host: u132-hcd: use DEFINE_MUTEX() for mutex lock mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun Link: https://lore.kernel.org/r/20210405101434.14878-1-zhengyongjun3@huawei.com Signed-off-by: Greg Kroah-Hartman commit 9c2076090c2815fe7c49676df68dde7e60a9b9fc Author: Colin Ian King Date: Tue Apr 6 19:45:10 2021 +0100 usb: gadget: r8a66597: Add missing null check on return from platform_get_resource The call to platform_get_resource can potentially return a NULL pointer on failure, so add this check and return -EINVAL if it fails. Fixes: c41442474a26 ("usb: gadget: R8A66597 peripheral controller support.") Signed-off-by: Colin Ian King Addresses-Coverity: ("Dereference null return") Link: https://lore.kernel.org/r/20210406184510.433497-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 782de5e7190de0a773417708e17d9461d9109bf9 Author: Heikki Krogerus Date: Thu Apr 8 11:31:44 2021 +0300 usb: dwc3: pci: add support for the Intel Alder Lake-M This patch adds the necessary PCI ID for Intel Alder Lake-M devices. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210408083144.69350-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ee64fc599b721cafb56a28ce2922343e02aa2d41 Author: Heikki Krogerus Date: Wed Apr 7 09:55:55 2021 +0300 usb: typec: Link all ports during connector registration The connectors may be registered after the ports, so the "connector" links need to be created for the ports also when ever a new connector gets registered. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210407065555.88110-5-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b433c4c789d612cf58739a772bbddbd949bafd20 Author: Heikki Krogerus Date: Wed Apr 7 09:55:54 2021 +0300 usb: Iterator for ports Introducing usb_for_each_port(). It works the same way as usb_for_each_dev(), but instead of going through every USB device in the system, it walks through the USB ports in the system. Acked-by: Alan Stern Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210407065555.88110-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 63cd78617350dae99cc5fbd8f643b83ee819fe33 Author: Heikki Krogerus Date: Wed Apr 7 09:55:53 2021 +0300 usb: Link the ports to the connectors they are attached to Creating link to the USB Type-C connector for every new port that is added when possible. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210407065555.88110-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ae196ddb0d3186bc08e529b8ea4bf62161ddfce2 Author: Heikki Krogerus Date: Wed Apr 7 09:55:52 2021 +0300 usb: typec: Port mapping utility Adding functions that can be used to link/unlink ports - USB ports, TBT3/USB4 ports, DisplayPorts and so on - to the USB Type-C connectors they are attached to inside a system. The symlink that is created for the port device is named "connector". Initially only ACPI is supported. ACPI port object shares the _PLD (Physical Location of Device) with the USB Type-C connector that it's attached to. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210407065555.88110-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4050f2683f2c3151dc3dd1501ac88c57caf810ff Author: Badhri Jagan Sridharan Date: Wed Apr 7 13:07:20 2021 -0700 usb: typec: tcpm: update power supply once partner accepts power_supply_changed needs to be called to notify clients after the partner accepts the requested values for the pps case. Also, remove the redundant power_supply_changed at the end of the tcpm_reset_port as power_supply_changed is already called right after usb_type is changed. Fixes: f2a8aa053c176 ("typec: tcpm: Represent source supply through power_supply") Signed-off-by: Badhri Jagan Sridharan Cc: stable Reviewed-by: Adam Thomson Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210407200723.1914388-3-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit e3a0720224873587954b55d193d5b4abb14f0443 Author: Badhri Jagan Sridharan Date: Wed Apr 7 13:07:19 2021 -0700 usb: typec: tcpm: Address incorrect values of tcpm psy for pps supply tcpm_pd_select_pps_apdo overwrites port->pps_data.min_volt, port->pps_data.max_volt, port->pps_data.max_curr even before port partner accepts the requests. This leaves incorrect values in current_limit and supply_voltage that get exported by "tcpm-source-psy-". Solving this problem by caching the request values in req_min_volt, req_max_volt, req_max_curr, req_out_volt, req_op_curr. min_volt, max_volt, max_curr gets updated once the partner accepts the request. current_limit, supply_voltage gets updated once local port's tcpm enters SNK_TRANSITION_SINK when the accepted current_limit and supply_voltage is enforced. Fixes: f2a8aa053c176 ("typec: tcpm: Represent source supply through power_supply") Signed-off-by: Badhri Jagan Sridharan Cc: stable Reviewed-by: Adam Thomson Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210407200723.1914388-2-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit f3dedafb8263ca4791a92a23f5230068f5bde008 Author: Badhri Jagan Sridharan Date: Wed Apr 7 13:07:18 2021 -0700 usb: typec: tcpm: Address incorrect values of tcpm psy for fixed supply tcpm_pd_build_request overwrites current_limit and supply_voltage even before port partner accepts the requests. This leaves stale values in current_limit and supply_voltage that get exported by "tcpm-source-psy-". Solving this problem by caching the request values of current limit/supply voltage in req_current_limit and req_supply_voltage. current_limit/supply_voltage gets updated once the port partner accepts the request. Fixes: f2a8aa053c176 ("typec: tcpm: Represent source supply through power_supply") Signed-off-by: Badhri Jagan Sridharan Cc: stable Reviewed-by: Guenter Roeck Reviewed-by: Adam Thomson Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210407200723.1914388-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 64d7d074acd52e1bdff621f2cb86c0aae9bcef80 Author: Uwe Kleine-König Date: Wed Apr 7 10:01:53 2021 +0200 pwm: lpss: Don't modify HW state in .remove callback A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. So drop the hardware modification from the .remove() callback. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit a503d1628c9c341dc5e1a26272e38182dca3e823 Author: Jarvis Jiang Date: Thu Apr 8 03:02:20 2021 -0700 bus: mhi: fix typo in comments for struct mhi_channel_config The word 'rung' is a typo in below comment, fix it. * @event_ring: The event rung index that services this channel Signed-off-by: Jarvis Jiang Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408100220.3853-1-jarvis.w.jiang@gmail.com Signed-off-by: Manivannan Sadhasivam commit b46b1ef7b0da5c9257b98a0d1d658422e7851783 Author: Artur Petrosyan Date: Thu Apr 8 13:46:14 2021 +0400 usb: dwc2: Add exit partial power down before removing driver When dwc2 core is in partial power down mode loading driver again causes driver fail. Because in that mode registers are not accessible. Added a flow of exiting the partial power down mode to avoid the driver reload failure. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094615.8AE35A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit c74c26f6e398387cc953b3fdb54858f09bfb696b Author: Artur Petrosyan Date: Thu Apr 8 13:46:06 2021 +0400 usb: dwc2: Fix partial power down exiting by system resume Fixes the implementation of exiting from partial power down power saving mode when PC is resumed. Added port connection status checking which prevents exiting from Partial Power Down mode from _dwc2_hcd_resume() if not in Partial Power Down mode. Rearranged the implementation to get rid of many "if" statements. NOTE: Switch case statement is used for hibernation partial power down and clock gating mode determination. In this patch only Partial Power Down is implemented the Hibernation and clock gating implementations are planned to be added. Fixes: 6f6d70597c15 ("usb: dwc2: bus suspend/resume for hosts with DWC2_POWER_DOWN_PARAM_NONE") Cc: Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094607.1A9BAA0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 113f86d0c302997cbf176489e7775b1c3b3b15b1 Author: Artur Petrosyan Date: Thu Apr 8 13:45:58 2021 +0400 usb: dwc2: Update partial power down entering by system suspend With current implementation the port power is being disabled, which is not required by the programming guide. Also, if there is a system which works only in "DWC2_POWER_DOWN_PARAM_NONE" (clock gating) mode the current implementation does not set Gate hclk bit in pcgctl register. Rearranges and updates the implementation of entering to partial power down power saving mode when PC is suspended to get rid of many "if" statements and removes disabling of port power. NOTE: Switch case statement is used for hibernation partial power down and clock gating mode determination. In this patch only Partial Power Down is implemented the Hibernation and clock gating implementations are planned to be added. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094559.33541A022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 42b32b164acecd850edef010915a02418345a033 Author: Artur Petrosyan Date: Thu Apr 8 13:45:49 2021 +0400 usb: dwc2: Fix session request interrupt handler According to programming guide in host mode, port power must be turned on in session request interrupt handlers. Fixes: 21795c826a45 ("usb: dwc2: exit hibernation on session request") Cc: Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094550.75484A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 75f43ac3c1fd72e7349ef8e013fdbd1e36ced996 Author: Artur Petrosyan Date: Thu Apr 8 13:45:41 2021 +0400 usb: dwc2: Allow exit partial power down in urb enqueue When core is in partial power down state and an external hub is connected, upper layer sends URB enqueue request, which results in port reset issue. Added exit from partial power down state to avoid port reset issue and process upper layer request correctly. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094542.685BAA0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 4d4d99afa2b0fc53dc55f0c3ed215cdecd1197c5 Author: Artur Petrosyan Date: Thu Apr 8 13:45:33 2021 +0400 usb: dwc2: Add part. power down exit from dwc2_conn_id_status_change(). Before changing to connector B exiting from Partial Power Down is required. - Added exiting from Partial Power Down mode when connector ID status changes to "connId B". Because if connector ID status changed to B connector while core was in partial power down mode, HANG would accrue from a soft reset. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094534.4AA7AA022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit e97570f7a72022b459ba0c8d1123019594ee8bdb Author: Artur Petrosyan Date: Thu Apr 8 13:45:25 2021 +0400 usb: dwc2: Add exit partial power down when port reset is asserted Adds Partial Power Down exiting flow when set port feature reset is received in suspended state. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094526.4DD7AA022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 1e0890ebaa3fe868c3ea4651f05fa86d72740993 Author: Artur Petrosyan Date: Thu Apr 8 13:45:17 2021 +0400 usb: dwc2: Add exit partial power down when port is resumed Added flow of exiting Partial Power Down in "dwc2_port_resume()" function when core receives resume. NOTE: Switch case statement is used for hibernation partial power down and clock gating mode determination. In this patch only Partial Power Down is implemented the Hibernation and clock gating implementations are planned to be added. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094518.6DA1DA022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 22ff0c8e529ed3c3385f9807ec8efacf440c4c8e Author: Artur Petrosyan Date: Thu Apr 8 13:45:09 2021 +0400 usb: dwc2: Add enter partial power down when port is suspended Adds flow of entering Partial Power Down in "dwc2_port_suspend()" function when core receives suspend. NOTE: Switch case statement is used for hibernation partial power down and clock gating mode determination. In this patch only Partial Power Down is implemented the Hibernation and clock gating implementations are planned to be added. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094510.6C4E9A022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 139fae7a08381c21026b05732e63c79018bb6c60 Author: Artur Petrosyan Date: Thu Apr 8 13:45:01 2021 +0400 usb: dwc2: Update port suspend/resume function definitions. Earlier "dwc2_port_suspend()" and "dwc2_port_resume()" functions were implemented without proper description and host or device mode difference. - Added "dwc2_port_suspend" and "dwc2_port_resume" functions to "core.h" header file. - Updated function description in documentation. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094502.61D18A0232@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit b77b0d0021ec8f6bbcce659c5e6500e2dbc74e3c Author: Artur Petrosyan Date: Thu Apr 8 13:44:53 2021 +0400 usb: dwc2: Add partial power down exit flow in wakeup intr. According to programming guide added host partial power down exit flow in wakeup detected interrupt handler. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094454.5BBCBA0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit c9c394abfa8456808fd3a0083f7fd81c3188bd0c Author: Artur Petrosyan Date: Thu Apr 8 13:44:45 2021 +0400 usb: dwc2: Update enter and exit partial power down functions These are wrapper functions which are calling device or host enter/exit partial power down functions. This change is done because we need to separate device and host partial power down functions as the programming flow has a lot of difference between host and device. With this update during partial power down exit driver relies on backup value of "GOTGCTL_CURMODE_HOST" to determine the mode of core before entering to PPD. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094446.6491BA022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 9ce9e5ad17d6c7cf943c9d365e8e12d6759e01db Author: Artur Petrosyan Date: Thu Apr 8 13:44:37 2021 +0400 usb: dwc2: Add host partial power down functions For host mode Partial Power Down entering and exiting separate functions are needed to implement the logic. Earlier the logic was implemented in one function. Which was confusing the readability. Also both host and device implementations were in the same function. - Added host partial power down functions which must be called by dwc2_enter_partial_power_down()/dwc2_exit_partial_power_down() functions. Added function names: dwc2_host_enter_partial_power_down() dwc2_host_exit_partial_power_down() NOTE: There is a checkpatch "CHECK" warning on "udelay(100)". The delay is needed to properly exit gadget Partial Power Down A delay less than 100 doesn't work. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094438.56CFBA022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit be2b960e57154aadd18d57897fec2cae2eef137c Author: Artur Petrosyan Date: Thu Apr 8 13:44:29 2021 +0400 usb: dwc2: Add device partial power down functions For device mode Partial Power Down entering and exiting separate functions are needed to implement the logic. Earlier the logic was implemented in one function. Which was confusing the readability. Also both host and device implementations were in the same function. - Added device partial power down functions which must be called by dwc2_enter_partial_power_down()/dwc2_exit_partial_power_down() functions. - Added "in_ppd" flag in "dwc2_hsotg" struct to indicate the core state after entering into partial power down mode. Added function names: dwc2_gadget_enter_partial_power_down() dwc2_gadget_exit_partial_power_down() NOTE: There is a checkpatch "CHECK" warning on "udelay(100)". The delay is needed to properly exit gadget Partial Power Down A delay less than 100 doesn't work. Acked-by: Minas Harutyunyan Signed-off-by: Artur Petrosyan Link: https://lore.kernel.org/r/20210408094430.383B9A0094@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman commit 0e719e8ca3946bac0034152309fe7565616bde50 Author: Uwe Kleine-König Date: Tue Mar 30 14:37:42 2021 +0200 pwm: sti: Free resources only after pwmchip_remove() Before pwmchip_remove() returns the PWM is expected to be functional. So remove the pwmchip before disabling the clocks. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit a9ea2e793e5aee690b90d115dbb9229934d30f2e Author: Uwe Kleine-König Date: Tue Mar 30 14:37:41 2021 +0200 pwm: sti: Don't modify HW state in .remove callback A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. So drop the hardware modification from the .remove() callback. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 13ef0414c891658c7d4c1d13fbd58a8d59a09dd4 Author: Uwe Kleine-König Date: Mon Mar 29 08:41:11 2021 +0200 pwm: lpc3200: Don't modify HW state in .remove callback A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing). Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. So drop the hardware modification from the .remove() callback. Signed-off-by: Uwe Kleine-König Acked-by: Vladimir Zapolskiy Signed-off-by: Thierry Reding commit d58a484e7cf00412b8f7c17cd60caaa9fb4c2b42 Author: Uwe Kleine-König Date: Sat Mar 27 22:24:28 2021 +0100 pwm: lpc18xx-sct: Free resources only after pwmchip_remove() Before pwmchip_remove() returns the PWM is expected to be functional. So remove the pwmchip before disabling the clock. Signed-off-by: Uwe Kleine-König Acked-by: Vladimir Zapolskiy Signed-off-by: Thierry Reding commit 819e82460ac858cdca38f748829979602a7708ee Author: Uwe Kleine-König Date: Fri Mar 26 09:18:04 2021 +0100 pwm: bcm-kona: Don't modify HW state in .remove callback A consumer is expected to disable a PWM before calling pwm_put(). And if they didn't there is hopefully a good reason (or the consumer needs fixing.) Also if disabling an enabled PWM was the right thing to do, this should better be done in the framework instead of in each low level driver. So drop the hardware modification from the .remove() callback. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 30700a057ce84e6f18f4cc3627570f8b2ae3c17f Author: Tian Tao Date: Wed Mar 31 08:58:39 2021 +0800 spi: davinci: Use device_get_match_data() helper Use the device_get_match_data() helper instead of open coding. Signed-off-by: Tian Tao Suggested-by: Fabio Estevam Link: https://lore.kernel.org/r/1617152319-17701-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Mark Brown commit cec77e0a249892ceb10061bf17b63f9fb111d870 Author: Wang Li Date: Fri Apr 9 09:54:58 2021 +0000 spi: qup: fix PM reference leak in spi_qup_remove() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Reported-by: Hulk Robot Signed-off-by: Wang Li Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210409095458.29921-1-wangli74@huawei.com Signed-off-by: Mark Brown commit e980048263ba72dcdbbf45d59e84c02001340f75 Author: Muhammad Usama Anjum Date: Fri Apr 9 00:57:18 2021 +0500 spi: orion: set devdata properly as it is being used later If device_get_match_data returns NULL, devdata isn't being updated properly. It is being used later in the function. Both devdata and spi->devdata should be updated to avoid NULL pointer dereference. Addresses-Coverity: ("NULL pointer dereference") Fixes: 0e6521f13c2 ("spi: orion: Use device_get_match_data() helper") Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20210408195718.GA3075166@LEGION Signed-off-by: Mark Brown commit 4df2f5e1372e9eec8f9e1b4a3025b9be23487d36 Author: Clark Wang Date: Thu Apr 8 18:33:47 2021 +0800 spi: imx: add a check for speed_hz before calculating the clock When some drivers use spi to send data, spi_transfer->speed_hz is not assigned. If spidev->max_speed_hz is not assigned as well, it will cause an error in configuring the clock. Add a check for these two values before configuring the clock. An error will be returned when they are not assigned. Signed-off-by: Clark Wang Link: https://lore.kernel.org/r/20210408103347.244313-2-xiaoning.wang@nxp.com Signed-off-by: Mark Brown commit a23faea76d4cf5f75decb574491e66f9ecd707e7 Author: Wei Yongjun Date: Fri Apr 9 08:29:54 2021 +0000 spi: omap-100k: Fix reference leak to master Call spi_master_get() holds the reference count to master device, thus we need an additional spi_master_put() call to reduce the reference count, otherwise we will leak a reference to master. This commit fix it by removing the unnecessary spi_master_get(). Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210409082954.2906933-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit a03675497970a93fcf25d81d9d92a59c2d7377a7 Author: Wang Li Date: Fri Apr 9 09:54:30 2021 +0000 spi: fsl-lpspi: Fix PM reference leak in lpspi_prepare_xfer_hardware() pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in reference leak here. Fix it by replacing it with pm_runtime_resume_and_get to keep usage counter balanced. Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi") Reported-by: Hulk Robot Signed-off-by: Wang Li Link: https://lore.kernel.org/r/20210409095430.29868-1-wangli74@huawei.com Signed-off-by: Mark Brown commit 59ebbe40fb51e307032ae7f63b2749fad2d4635a Author: Tian Tao Date: Thu Apr 8 08:55:07 2021 +0800 spi: simplify devm_spi_register_controller Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional changes. Signed-off-by: Tian Tao Signed-off-by: Yicong Yang Link: https://lore.kernel.org/r/1617843307-53853-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Mark Brown commit 9b844b087124c1538d05f40fda8a4fec75af55be Author: Wei Yongjun Date: Fri Apr 9 08:29:55 2021 +0000 spi: dln2: Fix reference leak to master Call spi_master_get() holds the reference count to master device, thus we need an additional spi_master_put() call to reduce the reference count, otherwise we will leak a reference to master. This commit fix it by removing the unnecessary spi_master_get(). Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210409082955.2907950-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit 41d310930084502433fcb3c4baf219e7424b7734 Author: Quanyang Wang Date: Thu Apr 8 12:02:23 2021 +0800 spi: spi-zynqmp-gqspi: fix incorrect operating mode in zynqmp_qspi_read_op When starting a read operation, we should call zynqmp_qspi_setuprxdma first to set xqspi->mode according to xqspi->bytes_to_receive and to calculate correct xqspi->dma_rx_bytes. Then in the function zynqmp_qspi_fillgenfifo, generate the appropriate command with operating mode and bytes to transfer, and fill the GENFIFO with the command to perform the read operation. Calling zynqmp_qspi_fillgenfifo before zynqmp_qspi_setuprxdma will result in incorrect transfer length and operating mode. So change the calling order to fix this issue. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang Reviewed-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20210408040223.23134-5-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit 8ad07d79bd56a531990a1a3f3f1c0eb19d2de806 Author: Quanyang Wang Date: Thu Apr 8 12:02:22 2021 +0800 spi: spi-zynqmp-gqspi: transmit dummy circles by using the controller's internal functionality There is a data corruption issue that occurs in the reading operation (cmd:0x6c) when transmitting common data as dummy circles. The gqspi controller has the functionality to send dummy clock circles. When writing data with the fields [receive, transmit, data_xfer] = [0,0,1] to the Generic FIFO, and configuring the correct SPI mode, the controller will transmit dummy circles. So let's switch to hardware dummy cycles transfer to fix this issue. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang Reviewed-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20210408040223.23134-4-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit a0f65be6e880a14d3445b75e7dc03d7d015fc922 Author: Quanyang Wang Date: Thu Apr 8 12:02:21 2021 +0800 spi: spi-zynqmp-gqspi: add mutex locking for exec_op The spi-mem framework has no locking to prevent ctlr->mem_ops->exec_op from concurrency. So add the locking to zynqmp_qspi_exec_op. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang Reviewed-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20210408040223.23134-3-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit a16bff68b75fd082d36aa0b14b540bd7a3ebebbd Author: Quanyang Wang Date: Thu Apr 8 12:02:20 2021 +0800 spi: spi-zynqmp-gqspi: use wait_for_completion_timeout to make zynqmp_qspi_exec_op not interruptible When Ctrl+C occurs during the process of zynqmp_qspi_exec_op, the function wait_for_completion_interruptible_timeout will return a non-zero value -ERESTARTSYS immediately. This will disrupt the SPI memory operation because the data transmitting may begin before the command or address transmitting completes. Use wait_for_completion_timeout to prevent the process from being interruptible. This patch fixes the error as below: root@xilinx-zynqmp:~# flash_erase /dev/mtd3 0 0 Erasing 4 Kibyte @ 3d000 -- 4 % complete (Press Ctrl+C) [ 169.581911] zynqmp-qspi ff0f0000.spi: Chip select timed out [ 170.585907] zynqmp-qspi ff0f0000.spi: Chip select timed out [ 171.589910] zynqmp-qspi ff0f0000.spi: Chip select timed out [ 172.593910] zynqmp-qspi ff0f0000.spi: Chip select timed out [ 173.597907] zynqmp-qspi ff0f0000.spi: Chip select timed out [ 173.603480] spi-nor spi0.0: Erase operation failed. [ 173.608368] spi-nor spi0.0: Attempted to modify a protected sector. Fixes: 1c26372e5aa9 ("spi: spi-zynqmp-gqspi: Update driver to use spi-mem framework") Signed-off-by: Quanyang Wang Reviewed-by: Amit Kumar Mahapatra Link: https://lore.kernel.org/r/20210408040223.23134-2-quanyang.wang@windriver.com Signed-off-by: Mark Brown commit 33e12dea130d4b0abbaa9ae944e696d1a9d5261b Author: Ye Bin Date: Thu Apr 8 14:26:44 2021 +0800 ASoC: wcd9335: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062644.802988-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 81df40a0807fed36f0f1f1eaeef2a780773934c2 Author: Ye Bin Date: Thu Apr 8 14:26:57 2021 +0800 ASoC: codecs: lpass-tx-macro: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062657.803668-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 4150cc7306fa84577dd0c33f158949b0f085aea0 Author: Ye Bin Date: Thu Apr 8 14:26:58 2021 +0800 ASoC: amd: renoir: acp3x-pdm-dma: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062658.803724-1-yebin10@huawei.com Signed-off-by: Mark Brown commit a893a666b5b9a8c9d331df4afa72f23f4d4f83fd Author: Ye Bin Date: Thu Apr 8 14:26:42 2021 +0800 ASoC: codecs: lpass-wsa-macro: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062642.802846-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 4f3b0f8e364029f2674875396f0e65a98ef84498 Author: Jack Yu Date: Fri Apr 9 08:52:29 2021 +0000 ASoC: rt1019: remove registers to sync with rt1019 datasheet Remove some registers to synchronize with the latest rt1019 datasheet. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/01e6409f0db0451aa1e45ca7d82cca9c@realtek.com Signed-off-by: Mark Brown commit 3cab801e8b94280264ba23ab0683cd3a9c13ca9f Author: Ye Bin Date: Thu Apr 8 14:26:47 2021 +0800 ASoC: rt711-sdca: Constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062647.803141-1-yebin10@huawei.com Signed-off-by: Mark Brown commit e994cf82689465ddae2dfa9c9bc69616a0003649 Author: Ye Bin Date: Thu Apr 8 14:26:48 2021 +0800 ASoC: wcd934x: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062648.803227-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 1f34084cc85d654a542c547df6714dae8a32d3c9 Author: Ye Bin Date: Thu Apr 8 14:26:54 2021 +0800 ASoC: rt715-sdca: Constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062654.803538-1-yebin10@huawei.com Signed-off-by: Mark Brown commit a457dd92d14acdf3dd64285f04ed9225d14d195a Author: Ye Bin Date: Thu Apr 8 14:26:53 2021 +0800 ASoC: Intel: KMB: Constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062653.803478-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 857b602a3424a7d9ef875f8f137ddcb68de41c6f Author: Ye Bin Date: Thu Apr 8 14:26:50 2021 +0800 ASoC: codecs: lpass-rx-macro: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062650.803309-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 45475bf60cc1d42da229a0aa757180c88bab8d22 Author: Gyeongtaek Lee Date: Wed Apr 7 13:14:04 2021 +0900 ASoC: soc-compress: lock pcm_mutex to resolve lockdep error If panic_on_warn=1 is added in bootargs and compress offload playback with DPCM is started, kernel panic would be occurred because rtd->card->pcm_mutex isn't held in soc_compr_open_fe() and soc_compr_free_fe() and it generates lockdep warning in the following code. void snd_soc_runtime_action(struct snd_soc_pcm_runtime *rtd, int stream, int action) { struct snd_soc_dai *dai; int i; lockdep_assert_held(&rtd->card->pcm_mutex); To prevent lockdep warning but minimize side effect by adding mutex, pcm_mutex is held just before snd_soc_runtime_activate() and snd_soc_runtime_deactivate() and is released right after them. Signed-off-by: Gyeongtaek Lee Link: https://lore.kernel.org/r/1891546521.01617772502282.JavaMail.epsvc@epcpadp3 Signed-off-by: Mark Brown commit 3e075e842899779bd321520a3524a278442467d0 Author: Ye Bin Date: Thu Apr 8 14:26:51 2021 +0800 ASoC: amd: raven: acp3x-i2s: Constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062651.803413-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 3c817469a53d93bbae52f8ead207dc0b9aeebae9 Author: Uwe Kleine-König Date: Thu Mar 25 09:29:31 2021 +0100 pwm: bcm2835: Free resources only after pwmchip_remove() Before pwmchip_remove() returns the PWM is expected to be functional. So remove the pwmchip before disabling the clock. Signed-off-by: Uwe Kleine-König Acked-by: Florian Fainelli Signed-off-by: Thierry Reding commit d4ac3917bca64a4f630dc6f7ba47fe71dbf0273e Author: Uwe Kleine-König Date: Wed Mar 24 21:01:34 2021 +0100 pwm: bcm-iproc: Free resources only after pwmchip_remove() Before pwmchip_remove() returns the PWM is expected to be functional. So remove the pwmchip before disabling the clock. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 89c6f314602efeecfe8d9093571b3bbfe1029ab5 Author: Uwe Kleine-König Date: Wed Mar 24 20:56:35 2021 +0100 pwm: atmel: Free resources only after pwmchip_remove() Before pwmchip_remove() returns the PWM is expected to be functional. So remove the pwmchip before disabling the clock. Signed-off-by: Uwe Kleine-König Acked-by: Claudiu Beznea Signed-off-by: Thierry Reding commit 1a7a6e8072ea0e4582de2da63a9088841fde798e Author: Uwe Kleine-König Date: Tue Apr 6 09:30:36 2021 +0200 pwm: Clarify which state pwm_get_state() returns Given that lowlevel drivers usually cannot implement exactly what a consumer requests with pwm_apply_state() there is some rounding involved. pwm_get_state() returns the setting that was requested most recently by the consumer (opposed to what was actually implemented in hardware in reply to the last request). Clarify this in the function kerneldoc. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit e7442ffe1cc5d89d101a99ff78eb68edb1961e30 Author: Ian Abbott Date: Fri Apr 9 12:08:44 2021 +0100 staging: comedi: Kconfig: Fix COMEDI_TESTS_NI_ROUTES selections The COMEDI_TESTS_NI_ROUTES option currently selects NI_ROUTING, which doesn't exist. It should be selecting COMEDI_NI_ROUTING. Fix it. Selecting COMEDI_TESTS_NI_ROUTES without COMEDI_NI_ROUTING resulted in the following build errors: ERROR: modpost: "ni_lookup_route_register" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_is_cmd_dest" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_find_route_source" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_get_valid_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_count_valid_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_sort_device_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_assign_device_routes" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_find_route_set" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_route_set_has_source" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! ERROR: modpost: "ni_route_to_register" [drivers/staging/comedi/drivers/tests/ni_routes_test.ko] undefined! Reported-by: kernel test robot Fixes: c82b130616e3 ("staging: comedi: Add Kconfig options to build unit test modules") Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210409110844.148378-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 2d54a2222c4ad03b5a5e86fc77c053053ef921c7 Author: Chen Lifu Date: Fri Apr 9 10:50:11 2021 +0800 power: reset: hisi-reboot: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Chen Lifu Signed-off-by: Sebastian Reichel commit 9432bbd969c667fc9c4b1c140c5a745ff2a7b540 Author: Peter Zijlstra Date: Tue Mar 23 16:49:03 2021 +0100 static_call: Relax static_call_update() function argument type static_call_update() had stronger type requirements than regular C, relax them to match. Instead of requiring the @func argument has the exact matching type, allow any type which C is willing to promote to the right (function) pointer type. Specifically this allows (void *) arguments. This cleans up a bunch of static_call_update() callers for PREEMPT_DYNAMIC and should get around silly GCC11 warnings for free. Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/YFoN7nCl8OfGtpeh@hirez.programming.kicks-ass.net commit 7d95f22798ecea513f37b792b39fec4bcf20fec3 Author: Matthieu Baerts Date: Fri Mar 26 11:50:23 2021 +0100 static_call: Fix unused variable warn w/o MODULE Here is the warning converted as error and reported by GCC: kernel/static_call.c: In function ‘__static_call_update’: kernel/static_call.c:153:18: error: unused variable ‘mod’ [-Werror=unused-variable] 153 | struct module *mod = site_mod->mod; | ^~~ cc1: all warnings being treated as errors make[1]: *** [scripts/Makefile.build:271: kernel/static_call.o] Error 1 This is simply because since recently, we no longer use 'mod' variable elsewhere if MODULE is unset. When using 'make tinyconfig' to generate the default kconfig, MODULE is unset. There are different ways to fix this warning. Here I tried to minimised the number of modified lines and not add more #ifdef. We could also move the declaration of the 'mod' variable inside the if-statement or directly use site_mod->mod. Fixes: 698bacefe993 ("static_call: Align static_call_is_init() patching condition") Signed-off-by: Matthieu Baerts Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210326105023.2058860-1-matthieu.baerts@tessares.net commit 4f4e6644cd876c844cdb3bea2dd7051787d5ae25 Author: Hans Verkuil Date: Thu Apr 8 12:31:20 2021 +0200 media: gscpa/stv06xx: fix memory leak For two of the supported sensors the stv06xx driver allocates memory which is stored in sd->sensor_priv. This memory is freed on a disconnect, but if the probe() fails, then it isn't freed and so this leaks memory. Add a new probe_error() op that drivers can use to free any allocated memory in case there was a probe failure. Thanks to Pavel Skripkin for discovering the cause of the memory leak. Reported-and-tested-by: syzbot+e7f4c64a4248a0340c37@syzkaller.appspotmail.com Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 98965af1ebc3a652a597cee902f462f496ef9e11 Author: Tian Tao Date: Thu Apr 8 08:04:13 2021 +0200 media: cx25821: remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Signed-off-by: Zhiqi Song Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3d451720089bf1cd02ecc068fe256133eb29ea13 Author: Muhammad Usama Anjum Date: Wed Apr 7 18:09:21 2021 +0200 media: staging: media/meson: remove redundant dev_err call devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Muhammad Usama Anjum Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3e057b8a5f99bb0bd65d56ab6f543bb6fd1e7b40 Author: Hans Verkuil Date: Wed Apr 7 16:16:18 2021 +0200 media: adv7842: support 1 block EDIDs, fix clearing EDID Add support for EDIDs consisting of one EDID block. Related to this, improve CEC physical address handling. Clearing the EDID caused a bug since v4l2_calc_aspect_ratio() was called with a NULL pointer. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e0a4205d656d1d2eb3e3cc82f68adca820b0418d Author: Hans Verkuil Date: Wed Apr 7 16:16:17 2021 +0200 media: adv7842: configure all pads Only the first pad was configured, but there are 4. This causes set_fmt to fail with -EINVAL since the passed pad is > 0. Configure all three sink pads and the source pad. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 074e8eaaa29412a3a7d91e4b02409749468bbcc9 Author: Hans Verkuil Date: Wed Apr 7 09:36:06 2021 +0200 media: allegro: change kernel-doc comment blocks to normal comments The /** at the start indicates that these are kernel-doc comments, but really these are just regular comments. Replace /** by /* to avoid a large number of warnings from kernel-doc. Signed-off-by: Hans Verkuil Suggested-by: Michael Tretter Signed-off-by: Mauro Carvalho Chehab commit a24bbbf24d9c968de0f996b53695993095737386 Author: Yang Yingliang Date: Fri Apr 9 07:06:33 2021 +0200 media: camss: ispif: Remove redundant dev_err call in msm_ispif_subdev_init() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5f58ac04f36e32507d8f60fd47266ae2a60a2fa8 Author: Jacopo Mondi Date: Fri Mar 19 17:41:39 2021 +0100 media: i2c: rdamc21: Fix warning on u8 cast Sparse reports a warning on a cast to u8 of a 16 bits constant. drivers/media/i2c/rdacm21.c:348:62: warning: cast truncates bits from constant value (300a becomes a) Even if the behaviour is intended, silence the sparse warning replacing the cast with a bitwise & operation. Fixes: a59f853b3b4b ("media: i2c: Add driver for RDACM21 camera module") Reported-by: Hans Verkuil Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cdc62bfba0d71a5e88fe6a83a6cfc69f05a6f26b Author: Zhansaya Bagdauletkyzy Date: Sat Apr 3 20:09:07 2021 +0200 media: staging: media: zoran: Rename 'He' to 'he' Rename variable 'He' to 'he' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 646ef5813e1fe93a92974145c2570f1b14d3bbaf Author: Zhansaya Bagdauletkyzy Date: Sat Apr 3 20:09:05 2021 +0200 media: staging: media: zoran: Rename 'We' to 'we' Rename variable 'We' to 'we' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d7bea8a6979b5f26bbf51ee203a7520cf9452d10 Author: Zhansaya Bagdauletkyzy Date: Sat Apr 3 20:09:04 2021 +0200 media: staging: media: zoran: Rename 'VidWinHt' to 'vid_win_ht' Rename 'VidWinHt' to 'vid_win_ht' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aee0b05b7609b9c59d8a8930fc9b8a6a007d1820 Author: Zhansaya Bagdauletkyzy Date: Sat Apr 3 20:09:02 2021 +0200 media: staging: media: zoran: Rename 'VidWinWid' to 'vid_win_wid' Rename variable 'VidWinWid' to 'vid_win_wid' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 076557a6e2ff6dff0d8df25fd119e4b3a997c438 Author: Zhansaya Bagdauletkyzy Date: Sat Apr 3 20:09:01 2021 +0200 media: staging: media: zoran: Rename 'DispMode' to 'disp_mode' Rename variable 'DispMode' to 'disp_mode' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bc17584130755af37542915887c37e4b792a44bc Author: Zhansaya Bagdauletkyzy Date: Sat Apr 3 20:09:00 2021 +0200 media: staging: media: zoran: Rename 'VEnd' to 'v_end' Rename variable 'VEnd' to 'v_end' to eliminate camelcase. Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4e587c935875f061d88c555f38d2f27892ea3237 Author: Zhansaya Bagdauletkyzy Date: Sat Apr 3 20:08:59 2021 +0200 media: staging: media: zoran: Rename 'HEnd' to 'h_end' Rename variable 'HEnd' to 'h_end' to eliminate camelcase Reported by checkpatch.pl. Signed-off-by: Zhansaya Bagdauletkyzy Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0a3c89f1dcfa0a76b21c49abd084e32c242a14df Author: Beatriz Martins de Carvalho Date: Thu Apr 1 17:07:39 2021 +0200 media: staging: media: omap4iss: align arguments with open parenthesis Cleans up checks of "Alignment should match open parenthesis" in iss.c:96. Signed-off-by: Beatriz Martins de Carvalho Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b575a7673e3d0396992fc72fce850723d39264e3 Author: Oded Gabbay Date: Thu Apr 8 09:38:32 2021 +0300 habanalabs: print f/w boot unknown error We need to print a message to the kernel log in case we encounter an unknown error in the f/w boot to help the user understand what happened. In addition, we shouldn't print unknown error in case of known errors. Moreover, in case of warnings/info, we shouldn't return -EIO that will fail the initialization and mark the device as disabled Signed-off-by: Oded Gabbay commit 669b018835326b3caa42572ba7cb31f84fa22f9d Author: Ohad Sharabi Date: Wed Apr 7 17:09:36 2021 +0300 habanalabs: update to latest F/W communication header update files to latest version from F/W team. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 41f458f205a508dcdce58bdaa0af35bb6ef6efdb Author: Ofir Bitton Date: Wed Mar 10 15:08:44 2021 +0200 habanalabs/gaudi: skip iATU if F/W security is enabled As part of the securing GAUDI, the F/W will configure the PCI iATU regions. If the driver identifies a secured PCI ID, it will know to skip iATU configuration in a very early stage. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e5042a6fa6d4aa1168b3521298c92a53978c9d99 Author: Ofir Bitton Date: Thu Apr 1 13:43:40 2021 +0300 habanalabs/gaudi: derive security status from pci id As F/ security indication must be available before driver approaches PCI bus, F/W security should be derived from PCI id rather than be fetched during boot handshake with F/W. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d4b1e5da54c067ca248191aaee5f531c4d30ba29 Author: Bharat Jauhari Date: Thu Mar 18 12:11:19 2021 +0200 habanalabs: move dram scrub to free sequence DRAM scrubbing can take time hence it adds to latency during allocation. To minimize latency during initialization, scrubbing is moved to release call. In case scrubbing fails it means the device is in a bad state, hence HARD reset is initiated. Signed-off-by: Bharat Jauhari Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e9c2003be4d4809c7e3bf17167ef08a3be7b43d2 Author: Ohad Sharabi Date: Mon Mar 22 14:30:52 2021 +0200 habanalabs: send dynamic msi-x indexes to f/w In order to minimize hard coded values between F/W and the driver, we send msi-x indexes dynamically to the F/W. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 1b4971573fde0c4d4ed7de70c3a9cfd08330a541 Author: Tomer Tayar Date: Tue Apr 6 13:32:20 2021 +0300 habanalabs/gaudi: clear QM errors only if not in stop_on_err mode Clearing QM errors by the driver will prevent these H/W blocks from stopping in case they are configured to stop on errors, so perform this clearing only if this mode is not in use. Signed-off-by: Tomer Tayar Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 7d21114b03618a1b528804a631098b471eac6481 Author: Koby Elbaz Date: Thu Mar 11 15:32:55 2021 +0200 habanalabs: support DEVICE_UNUSABLE error indication from FW In case of multiple ECC errors, FW will set the DEVICE_UNUSABLE bit. On boot-up, the driver will therefore fail inserting the device. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit ae382c22fc06058b24bb49c92f3b0af653499589 Author: Oded Gabbay Date: Sat Apr 3 16:37:29 2021 +0300 habanalabs: use strscpy instead of sprintf and strlcpy Prefer the use of strscpy when copying the ASIC name into a char array, to prevent accidentally exceeding the array's length. In addition, strlcpy is frowned upon so replace it. Signed-off-by: Oded Gabbay commit 131d1ba1304a9a2040648cb03309d9444e7fe45f Author: Oded Gabbay Date: Fri Apr 2 22:24:38 2021 +0300 habanalabs: remove the store jobs array from CS IOCTL The store part was never implemented in the code and never been used by the userspace applications. We currently use the related parameters to a different purpose with a defined union. However, there is no point in that and it is better to just remove the union and the store parameters. Signed-off-by: Oded Gabbay commit 639781dcab8261f39c7028db4ed4fd0e760d69fa Author: Oded Gabbay Date: Fri Apr 2 01:43:18 2021 +0300 habanalabs/gaudi: add debugfs to DMA from the device When trying to debug program, the user often needs to dump large parts of the device's DRAM, which can reach to tens of GBs. Because reading from the device's internal memory through the PCI BAR is extremely slow, the debug can take hours. Instead, we can provide the user to copy data through one of the DMA engines. This will make the operation much faster. Currently, only GAUDI is supported. In GAUDI, we need to find a PCI DMA engine that is IDLE and set the DMA as secured to be able to bypass our MMU as we currently don't map the temporary buffer to the MMU. Example bash one-line to dump entire HBM to file (~2 minutes): for (( i=0x0; i < 0x800000000; i+=0x8000000 )); do \ printf '0x%x\n' $i | sudo tee /sys/kernel/debug/habanalabs/hl0/addr ; \ echo 0x8000000 | sudo tee /sys/kernel/debug/habanalabs/hl0/dma_size ; \ sudo cat /sys/kernel/debug/habanalabs/hl0/data_dma >> hbm.txt ; done Signed-off-by: Oded Gabbay commit e65448faf4cfeddd95a0e661aabf2fae1efc9831 Author: farah kassabri Date: Tue Mar 30 16:38:02 2021 +0300 habanalabs/gaudi: sync stream add protection to SOB reset flow Since we moved the SOB reset flow to workqueue and not part of the fence release flow, we might reach a scenario where new context is created while we in the middle of resetting the SOB. in such cases the reset may fail due to idle check. This will mess up the streams sync since the SOB value is invalid. so we protect this area with a mutex, to delay context creation. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit cf39395034c6b927d49abe554fb4e93730d00543 Author: Alon Mizrahi Date: Mon Feb 22 15:53:24 2021 +0200 habanalabs: add custom timeout flag per cs There is a need to allow to user to send command submissions with custom timeout as some CS take longer than the max timeout that is used by default. Signed-off-by: Alon Mizrahi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit cd5def8020637836b7836fc8228b70cdc9af4ea1 Author: Koby Elbaz Date: Tue Feb 23 21:31:27 2021 +0200 habanalabs: improve utilization calculation The new approach is based on the notion that the relative current power consumption is in relation of proportionality to device's true utilization. Utilization info ranges between [0,100]% Currently, dc_power values are hard-coded. Signed-off-by: Koby Elbaz Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e8f9392a5c7fabe0fdeb33b354b489c8c4b236bc Author: Ohad Sharabi Date: Mon Mar 15 20:49:28 2021 +0200 habanalabs: support legacy and new pll indexes In order to use minimum of hard coded values common to LKD and F/W a dynamic method to work with PLLs is introduced in this patch. Formerly asic specific PLL numbering is now common for all asics. To be backward compatible a bit in dev status is defined, if the bit is not set LKD will keep working with old PLL numbering. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 8445dde1b9fb8025ef05c148966f384a4d014824 Author: Ofir Bitton Date: Thu Mar 18 17:36:57 2021 +0200 habanalabs: move relevant datapath work outside cs lock In order to shorten the time cs lock is being held, we move any possible work outside of the cs lock. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2f6274e4773570ab763d5a588504ff35b908b2cf Author: farah kassabri Date: Thu Mar 11 11:24:57 2021 +0200 habanalabs: avoid soft lockup bug upon mapping error Add a little sleep between page unmappings in case mapping of large number of host pages failed, in order to avoid soft lockup bug during the rollback. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d661d79930b41d3103c0cc959757deec4421e8ff Author: Ofir Bitton Date: Tue Mar 9 14:45:04 2021 +0200 habanalabs/gaudi: Update async events header Update with latest version from the Firmware team. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f951eb08a96b43fd2a8c3e9c6293fc2e7b6750bb Author: Ofir Bitton Date: Wed Mar 10 08:50:01 2021 +0200 habanalabs/gaudi: unsecure TPC cfg status registers Unsecure relevant registers as TPC engine need access to TPC status. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 12e66a172773320e66df29908d7533f4f4663938 Author: Oded Gabbay Date: Mon Mar 8 18:06:57 2021 +0200 habanalabs/gaudi: always use single-msi mode The device can get into deadlock in case it use indirect mode for MSI interrupts (multi-msi) and have hard-reset during interrupt storm. To prevent that, always use direct mode which means single-msi mode. The F/W will prevent the host from writing to the indirect MSI registers to prevent any malicious user from causing this scenario. Signed-off-by: Oded Gabbay commit 2ea09537ad7747944c20ff70078be304a71b3e33 Author: Ofir Bitton Date: Wed Mar 3 13:23:47 2021 +0200 habanalabs/gaudi: reset device upon BMC request In case the BMC of the devices' box wants to initiate a reset of a specific device, it must go through driver. Once driver will receive the request it will initiate a hard reset flow. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a5778d10a12da26de55f88a9d03cbea78f73f8c4 Author: Ofir Bitton Date: Wed Feb 24 11:51:40 2021 +0200 habanalabs: debugfs access to user mapped host addresses In order to have a better debuggability we allow debugfs access to user mmu mapped host memory. Non-user host memory access will be rejected. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit dd0a25c77a00e2b10d7520af31cfac949e51bbba Author: Yang Li Date: Tue Feb 23 17:12:24 2021 +0800 habanalabs: Switch to using the new API kobj_to_dev() fixed the following coccicheck: ./drivers/misc/habanalabs/common/sysfs.c:347:60-61: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 99cb017e728227f5c046a044a6acec088f68a1c8 Author: Ohad Sharabi Date: Wed Feb 24 12:42:01 2021 +0200 habanalabs: update hl_boot_if.h Update to the latest version of the file as supplied by the F/W. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit e42a6400fb381060c4a18ab76648ff542e7d4566 Author: Ohad Sharabi Date: Wed Feb 17 20:42:48 2021 +0200 habanalabs: skip DISABLE PCI packet to FW on heartbeat if reset is due to heartbeat, device CPU is no responsive in which case no point sending PCI disable message to it. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit d5eb8373b2cee72a6f1f2157130b56e6a88894dc Author: Ofir Bitton Date: Sun Feb 14 15:35:56 2021 +0200 habanalabs: replace GFP_ATOMIC with GFP_KERNEL As there are incorrect assumptions in which some of the initialization and data path flows cannot sleep, most allocations are being done using GFP_ATOMIC. We modify the code to use GFP_ATOMIC only when realy needed, as sleepable flow should use GFP_KERNEL. In addition add a fallback to allocate memory using GFP_KERNEL, once ATOMIC allocation fails. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit f209e5ad1848828474c46a357441505078cca5c0 Author: Ofir Bitton Date: Thu Feb 25 12:48:06 2021 +0200 habanalabs/gaudi: update extended async event header Update to the latest definition of the firmware Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 586f2caf0ef952ca5e0f38a00b7ba8d945345cf7 Author: Sagiv Ozeri Date: Tue Feb 23 18:00:05 2021 +0200 habanalabs: return current power via INFO IOCTL Add driver implementation for reading the current power from the device CPU F/W. Signed-off-by: Sagiv Ozeri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit a4371c1a1ec150bc8bb87333e0a59935c4a630e2 Author: Sagiv Ozeri Date: Tue Feb 23 11:01:08 2021 +0200 habanalabs: support HW blocks vm show Improve "vm" debugfs node to print also the virtual addresses which are currently mapped to HW blocks in the device. Signed-off-by: Sagiv Ozeri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 6a2f5d7098c868eeb9349ed02210ca1c04aa5cfb Author: Ofir Bitton Date: Mon Feb 15 13:23:04 2021 +0200 habanalabs: use a single FW loading bringup flag For simplicity, use a single bringup flag indicating which FW binaries should loaded to device. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 366addb0c3c582bf7b9a2162bb398eb450b17218 Author: Oded Gabbay Date: Wed Feb 17 09:14:55 2021 +0200 habanalabs: use correct define for 32-bit max value Timeout in wait for interrupt is in 32-bit variable so we need to use the correct maximum value to compare. Signed-off-by: Oded Gabbay commit ab5f5c3089a2c9b863ad0b67e89f168ec7e8f7e5 Author: Ofir Bitton Date: Tue Jan 12 18:37:19 2021 +0200 habanalabs: wait for interrupt support In order to support command submissions from user space, the driver need to add support for user interrupt completions. The driver will allow multiple user threads to wait for an interrupt and perform a comparison with a given user address once interrupt expires. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 2d44c6f6b3a10c1d82d667b92a39621c3753b229 Author: Ofir Bitton Date: Tue Jan 12 14:43:09 2021 +0200 habanalabs: enable all IRQs for user interrupt support In order to support user interrupts, driver must enable all MSI-X interrupts for any case user will trigger them. We differentiate between a valid user interrupt and a non valid one. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 5d6a198f9dba12c78f82a0436d64bd683c031b13 Author: Ohad Sharabi Date: Mon Feb 8 14:53:56 2021 +0200 habanalabs: reset device in case of sync error As the F/wW is the first to detect out of sync event, a new event is added to notify the driver on such event. In which case the driver performs hard reset. Signed-off-by: Ohad Sharabi Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit 17b59dd3399c45d8e96dcc2c7d1761231dc638b6 Author: Oded Gabbay Date: Wed Feb 17 13:34:44 2021 +0200 habanalabs: change default CS timeout to 30 seconds Because our graph contains network operations, we need to account for delay in the network. 5 seconds timeout per CS is not enough to account for that. Signed-off-by: Oded Gabbay commit 278b5f7acbe1ae299aae8b9669a3e67d5a2635ff Author: Oded Gabbay Date: Thu Feb 18 10:24:02 2021 +0200 habanalabs: print if device is used on FD close Notify to the user that although he closed the FD, the device is still in use because there are live CS and/or memory mappings (mmaps). Signed-off-by: Oded Gabbay commit d3ee681afd7dcf62b592d343d8091c0361efc07a Author: Oded Gabbay Date: Tue Feb 16 22:49:27 2021 +0200 habanalabs: reset_upon_device_release is for bring-up Move the field to correct location in structure and remove comment. Signed-off-by: Oded Gabbay commit 23c3efd1fb0eb19b9e39eeb07515b167f6d4517a Author: Oded Gabbay Date: Tue Feb 16 22:46:17 2021 +0200 habanalabs: fail reset if device is not idle After any reset (soft or hard) the device (the engines/QMANs) should be idle. If they are not idle, fail the reset. If it is soft-reset, the driver will try to do hard-reset automatically. If it is hard-reset, the driver will make the device non-operational. Signed-off-by: Oded Gabbay commit 35862d1c99471e3a03175e94d267815a0921e9ca Author: Oded Gabbay Date: Tue Feb 16 22:34:24 2021 +0200 habanalabs: reset after device is actually released The device is actually released only after the refcnt of the hpriv structure is 0, which means all its contexts were closed. If we reset the device while a context is still open, there are possibilities for unexpected behavior and crashes. For example, if the process has a mapping of a register block that is now currently being reset, and the process writes/reads to that block during the reset, the device can get stuck. Signed-off-by: Oded Gabbay commit 8e9445a678cab4478aa90a5f8898ba093371e30f Author: Ofir Bitton Date: Wed Feb 10 14:29:33 2021 +0200 habanalabs: add reset support when user closes FD In order to support command submissions that are done directly from user space, the driver must perform soft reset once user closes its FD. In case the soft reset fails or device is not idle, a hard reset should be performed. Signed-off-by: Ofir Bitton Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit b6821b3c65c80f11f92f1abb27be2ad9683acefc Author: farah kassabri Date: Sun Feb 7 12:34:52 2021 +0200 habanalabs: set max asid to 2 currently we support only 2 asids in all asics. asid 0 for driver, and asic 1 for user. no need to setup 1024 asids configurations at init phase. Signed-off-by: farah kassabri Reviewed-by: Oded Gabbay Signed-off-by: Oded Gabbay commit dccfe2548746ca9cca3a20401ece4cf255d1f171 Author: Ricardo Ribalda Date: Fri Apr 9 10:41:35 2021 +0200 media: staging/intel-ipu3: Fix race condition during set_fmt Do not modify imgu_pipe->nodes[inode].vdev_fmt.fmt.pix_mp, until the format has been correctly validated. Otherwise, even if we use a backup variable, there is a period of time where imgu_pipe->nodes[inode].vdev_fmt.fmt.pix_mp might have an invalid value that can be used by other functions. Cc: stable@vger.kernel.org Fixes: ad91849996f9 ("media: staging/intel-ipu3: Fix set_fmt error handling") Reviewed-by: Tomasz Figa Signed-off-by: Ricardo Ribalda Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 3630901933afba1d16c462b04d569b7576339223 Author: Ricardo Ribalda Date: Mon Mar 15 13:34:05 2021 +0100 media: staging/intel-ipu3: Fix memory leak in imu_fmt We are losing the reference to an allocated memory if try. Change the order of the check to avoid that. Cc: stable@vger.kernel.org Fixes: 6d5f26f2e045 ("media: staging/intel-ipu3-v4l: reduce kernel stack usage") Signed-off-by: Ricardo Ribalda Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4103369093df0e2ccc295ad08a3077b72aed0ccb Author: Jiapeng Chong Date: Thu Mar 25 09:39:56 2021 +0100 media: mxl692: remove impossible condition Fix the following coverity warning: This greater-than-or-equal-to-zero comparison of an unsigned value is always true. "opcode >= 0". Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit be8cd6cccf0e3d42f61040bc341ac92a9adde08b Author: Arnd Bergmann Date: Mon Mar 22 11:07:25 2021 +0100 media: dvb-usb: avoid -Wempty-body warnings Building with 'make W=1' shows many warnings -Wempty-body warnings like drivers/media/usb/dvb-usb/vp702x-fe.c: In function 'vp702x_fe_set_frontend': drivers/media/usb/dvb-usb/vp702x-fe.c:190:46: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 190 | deb_fe("tuning succeeded.\n"); drivers/media/usb/dvb-usb/dtt200u.c: In function 'dtt200u_rc_query': drivers/media/usb/dvb-usb/dtt200u.c:124:58: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 124 | deb_info("st->data: %*ph\n", 5, st->data); drivers/media/usb/dvb-usb/m920x.c: In function 'm920x_rc_query': drivers/media/usb/dvb-usb/m920x.c:207:58: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 207 | deb("Unknown rc key %02x\n", rc_state[1]); Change the empty dprintk() macros to no_printk(), which avoids this warning and adds format string checking. Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d6bed580ebd1cc34f5abb49ee74b5e6ff84f8636 Author: Arnd Bergmann Date: Mon Mar 22 11:07:24 2021 +0100 media: flexcop: avoid -Wempty-body warning Building with 'make W=1' shows many warnings -Wempty-body warnings like drivers/media/common/b2c2/flexcop-misc.c: In function 'flexcop_determine_revision': drivers/media/common/b2c2/flexcop-misc.c:35:85: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 35 | deb_info("this FlexCop has the 6 basic main hardware pid filter.\n"); drivers/media/usb/b2c2/flexcop-usb.c: In function 'flexcop_usb_process_frame': drivers/media/usb/b2c2/flexcop-usb.c:357:79: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 357 | deb_ts("not ts packet %*ph\n", 4, b+2); | ^ drivers/media/common/b2c2/flexcop-misc.c: In function 'flexcop_determine_revision': drivers/media/common/b2c2/flexcop-misc.c:35:85: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 35 | deb_info("this FlexCop has the 6 basic main hardware pid filter.\n"); | ^ Change the empty dprintk() macros to no_printk(), which avoids this warning and adds format string checking. Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 49e851de7e573529885fd1df4365e2459c6030ee Author: Sean Young Date: Thu Apr 8 10:33:22 2021 +0200 media: ite-cir: probe of ITE8708 on ASUS PN50 fails The Asus PN50 has 16 byte io region for the ITE8708 in its DSDT, which causes the probe fail. So, accept larger regions. Link: https://www.spinics.net/lists/linux-media/msg177725.html Cc: Nikolaos Beredimas Reported-by: Michael Zimmermann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 6d3e4a4bebd47c158bbcb6b728908031cba9ca59 Author: Andre Przywara Date: Wed Jan 27 18:24:51 2021 +0100 media: dt-bindings: media: IR: Add H616 IR compatible string Add the obvious compatible name to the existing IR binding, and pair it with the existing A31 fallback compatible string, as the devices are compatible. On the way use enums to group all compatible devices together. Signed-off-by: Andre Przywara Acked-by: Rob Herring Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit d931392c8da1664104896ee5aad58603e64db326 Author: Hao Fang Date: Tue Mar 30 08:50:00 2021 +0200 media: rc: ir-hix5hd2: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g. It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 799ddc03708550f655e362d0934d025b702c78c2 Author: Arnd Bergmann Date: Wed Jan 20 15:25:42 2021 +0100 media: rc: remove zte zx ir driver The zte zx platform is getting removed, so this driver is no longer needed. Cc: Jun Nie Cc: Shawn Guo Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit b7cd0da982e3043f2eec7235ac5530cb18d6af1d Author: Pavel Skripkin Date: Sun Mar 28 21:32:19 2021 +0200 media: dvb-usb: fix memory leak in dvb_usb_adapter_init syzbot reported memory leak in dvb-usb. The problem was in invalid error handling in dvb_usb_adapter_init(). for (n = 0; n < d->props.num_adapters; n++) { .... if ((ret = dvb_usb_adapter_stream_init(adap)) || (ret = dvb_usb_adapter_dvb_init(adap, adapter_nrs)) || (ret = dvb_usb_adapter_frontend_init(adap))) { return ret; } ... d->num_adapters_initialized++; ... } In case of error in dvb_usb_adapter_dvb_init() or dvb_usb_adapter_dvb_init() d->num_adapters_initialized won't be incremented, but dvb_usb_adapter_exit() relies on it: for (n = 0; n < d->num_adapters_initialized; n++) So, allocated objects won't be freed. Signed-off-by: Pavel Skripkin Reported-by: syzbot+3c2be7424cea3b932b0e@syzkaller.appspotmail.com Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 3ddcea9f7da0d7df25e12c2f2e06082341fed4fb Author: Christian Hewitt Date: Mon Mar 29 17:12:26 2021 +0200 media: rc: add keymaps for mecool-kii-pro/kiii-pro remotes Add keymaps and bindings for the simple IR (NEC) remotes used with the MeCool KII-Pro and MeCool KIII-Pro Android STB devices. Tested-by: Drazen Spio Signed-off-by: Christian Hewitt Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0fa430e96d3c3561a78701f51fd8593da68b8474 Author: Arnd Bergmann Date: Mon Mar 22 17:46:00 2021 +0100 media: dvb-usb-remote: fix dvb_usb_nec_rc_key_to_event type mismatch gcc-11 warns about the prototype not exactly matching the function definition: drivers/media/usb/dvb-usb/dvb-usb-remote.c:363:20: error: argument 2 of type ‘u8[5]’ {aka ‘unsigned char[5]’} with mismatched bound [-Werror=array-parameter=] 363 | u8 keybuf[5], u32 *event, int *state) | ~~~^~~~~~~~~ In file included from drivers/media/usb/dvb-usb/dvb-usb-common.h:13, from drivers/media/usb/dvb-usb/dvb-usb-remote.c:9: drivers/media/usb/dvb-usb/dvb-usb.h:490:65: note: previously declared as ‘u8[]’ {aka ‘unsigned char[]’} 490 | extern int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *, u8[], u32 *, int *); | ^~~~ Fixes: 776338e121b9 ("[PATCH] dvb: Add generalized dvb-usb driver") Signed-off-by: Arnd Bergmann Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 7030a96bd99032c4565889082a8ab67db3b62180 Author: Colin Ian King Date: Tue Mar 23 15:00:47 2021 +0100 media: dvb-frontends: Remove redundant error check on variable ret An earlier commit removed a call to lgdt3306a_spectral_inversion and omitted to remove the error return check. The check on ret is now redundant and can be removed. Addresses-Coverity: ("Logically dead code") Fixes: d4a3fa6652e3 ("media: dvb-frontends: lgdt3306a.c: remove dead code") Signed-off-by: Colin Ian King Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit a2e2c1b86209f056d1630983749baf0cd92af5ee Author: Hans Verkuil Date: Wed Apr 7 16:11:57 2021 +0200 media: cobalt: drop static for sd_fmt The struct v4l2_subdev_format sd_fmt cannot be static since it can be written back by the subdev. Just have it on the stack. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f1995d5e43cf897f63b4d7a7f84a252d891ae820 Author: Dinghao Liu Date: Wed Apr 7 07:46:06 2021 +0200 media: sun8i-di: Fix runtime PM imbalance in deinterlace_start_streaming pm_runtime_get_sync() will increase the runtime PM counter even it returns an error. Thus a pairing decrement is needed to prevent refcount leak. Fix this by replacing this API with pm_runtime_resume_and_get(), which will not change the runtime PM counter on error. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 69306a947b3ae21e0d1cbfc9508f00fec86c7297 Author: Dinghao Liu Date: Wed Apr 7 07:43:13 2021 +0200 media: platform: sti: Fix runtime PM imbalance in regs_show pm_runtime_get_sync() will increase the runtime PM counter even it returns an error. Thus a pairing decrement is needed to prevent refcount leak. Fix this by replacing this API with pm_runtime_resume_and_get(), which will not change the runtime PM counter on error. Signed-off-by: Dinghao Liu Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7385209770fcb29f31e713e0c3db6a16f51cb8b9 Author: Mirela Rabulea Date: Tue Apr 6 19:34:28 2021 +0200 media: imx-jpeg: Fix double free in mxc_jpeg_remove The video_unregister_device already calls video_device_release, so remove video_device_release, to avoid a double free, when removing the module. This showed up in a repeated rmmod/insmod scenario. Signed-off-by: Mirela Rabulea Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4a15275b6a18597079f18241c87511406575179a Author: Yang Yingliang Date: Tue Apr 6 15:50:53 2021 +0200 media: i2c: adv7842: fix possible use-after-free in adv7842_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7f820ab5d4eebfe2d970d32a76ae496a6c286f0f Author: Yang Yingliang Date: Tue Apr 6 15:49:45 2021 +0200 media: i2c: tda1997: Fix possible use-after-free in tda1997x_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2c9541720c66899adf6f3600984cf3ef151295ad Author: Yang Yingliang Date: Tue Apr 6 15:48:12 2021 +0200 media: i2c: adv7511-v4l2: fix possible use-after-free in adv7511_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fa56f5f1fe31c2050675fa63b84963ebd504a5b3 Author: Yang Yingliang Date: Tue Apr 6 15:42:46 2021 +0200 media: adv7604: fix possible use-after-free in adv76xx_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6107a4fdf8554a7aa9488bdc835bb010062fa8a9 Author: Yang Yingliang Date: Tue Apr 6 15:39:29 2021 +0200 media: tc358743: fix possible use-after-free in tc358743_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b3efb50f7831102cb44d8a0e55d21f2cbac85fa Merge: d4c7c28806616 8120891105ba3 Author: Thomas Gleixner Date: Fri Apr 9 12:25:16 2021 +0200 Merge tag 'timers-v5.13-rc1' of https://git.linaro.org/people/daniel.lezcano/linux into timers/core Pull clocksource/event updates from Daniel Lezcano: - Add dt bindings for the wpcm450 and the timer declaration (Jonathan Neuschäfer) - Add dt bindings for the JZ4760, the timer declaration for the ingenic ost and timer (Paul Cercueil) - Add dt bindings for the cmt r8a779a0 (Wolfram Sang) - Add dt bindings for the cmt r8a77961 (Niklas Söderlund) - Add missing dt bindings for the tmu r8a7795, r8a7796, r8a77961, r8a77965, r8a77990 and r8a77995 (Niklas Söderlund) - Check pending post before writing a new post in register for the timer TI dm and add the stopped callback ops to prevent any spurious interrupt (Tony Lindgren) - Fix return value check at init when calling device_node_to_regmap() for the Ingenic OST timer (Wei Yongjun) - Fix a trivial typo s/overflw/overflow/ for the pistachio timer (Drew Fustini) - Don't use CMTOUT_IE with R-Car Gen2/3 (Wolfram Sang) - Fix rollback when the initialization fails on the dw_apb timer (Dinh Nguyen) - Switch to timer TI dm on dra7 in order to prevent using the bogus architected timer which fails to wrap correctly after 388 days (Tony Lindgren) - Add function annotation to optimize memory for the ARM architected timer (Jisheng Zhang) commit dbbd49bade0548db87ceb1943951dea456af2e22 Author: Pali Rohár Date: Thu Apr 8 13:42:23 2021 +0200 cpufreq: armada-37xx: Fix module unloading This driver is missing module_exit hook. Add proper driver exit function which unregisters the platform device and cleans up the data. Signed-off-by: Pali Rohár Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Signed-off-by: Viresh Kumar commit 5f23eb9dc0cd2a58bbfe887f335ad632368e530a Author: Pali Rohár Date: Thu Apr 8 13:42:22 2021 +0200 cpufreq: armada-37xx: Remove cur_frequency variable Variable cur_frequency in armada37xx_cpufreq_driver_init() is unused. Signed-off-by: Pali Rohár Acked-by: Gregory CLEMENT Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Signed-off-by: Viresh Kumar commit 8bad3bf23cbc40abe1d24cec08a114df6facf858 Author: Pali Rohár Date: Thu Apr 8 13:42:21 2021 +0200 cpufreq: armada-37xx: Fix determining base CPU frequency When current CPU load is not L0 then loading armada-37xx-cpufreq.ko driver fails with following error: # modprobe armada-37xx-cpufreq [ 502.702097] Unsupported CPU frequency 250 MHz This issue was partially fixed by commit 8db82563451f ("cpufreq: armada-37xx: fix frequency calculation for opp"), but only for calculating CPU frequency for opp. Fix this also for determination of base CPU frequency. Signed-off-by: Pali Rohár Acked-by: Gregory CLEMENT Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Fixes: 92ce45fb875d ("cpufreq: Add DVFS support for Armada 37xx") Signed-off-by: Viresh Kumar commit 92963903a8e11b9576eb7249f8e81eefa93b6f96 Author: Pali Rohár Date: Thu Apr 8 13:42:20 2021 +0200 cpufreq: armada-37xx: Fix driver cleanup when registration failed Commit 8db82563451f ("cpufreq: armada-37xx: fix frequency calculation for opp") changed calculation of frequency passed to the dev_pm_opp_add() function call. But the code for dev_pm_opp_remove() function call was not updated, so the driver cleanup phase does not work when registration fails. This fixes the issue by using the same frequency in both calls. Signed-off-by: Pali Rohár Acked-by: Gregory CLEMENT Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Fixes: 8db82563451f ("cpufreq: armada-37xx: fix frequency calculation for opp") Signed-off-by: Viresh Kumar commit e93033aff684641f71a436ca7a9d2a742126baaf Author: Pali Rohár Date: Thu Apr 8 13:42:19 2021 +0200 clk: mvebu: armada-37xx-periph: Fix workaround for switching from L1 to L0 When CPU frequency is at 250 MHz and set_rate() is called with 500 MHz (L1) quickly followed by a call with 1 GHz (L0), the CPU does not necessarily stay in L1 for at least 20ms as is required by Marvell errata. This situation happens frequently with the ondemand cpufreq governor and can be also reproduced with userspace governor. In most cases it causes CPU to crash. This change fixes the above issue and ensures that the CPU always stays in L1 for at least 20ms when switching from any state to L0. Signed-off-by: Marek Behún Signed-off-by: Pali Rohár Acked-by: Stephen Boyd Acked-by: Gregory CLEMENT Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Fixes: 61c40f35f5cd ("clk: mvebu: armada-37xx-periph: Fix switching CPU rate from 300Mhz to 1.2GHz") Signed-off-by: Viresh Kumar commit 4decb9187589f61fe9fc2bc4d9b01160b0a610c5 Author: Pali Rohár Date: Thu Apr 8 13:42:18 2021 +0200 clk: mvebu: armada-37xx-periph: Fix switching CPU freq from 250 Mhz to 1 GHz It was observed that the workaround introduced by commit 61c40f35f5cd ("clk: mvebu: armada-37xx-periph: Fix switching CPU rate from 300Mhz to 1.2GHz") when base CPU frequency is 1.2 GHz is also required when base CPU frequency is 1 GHz. Otherwise switching CPU frequency directly from L2 (250 MHz) to L0 (1 GHz) causes a crash. When base CPU frequency is just 800 MHz no crashed were observed during switch from L2 to L0. Signed-off-by: Pali Rohár Acked-by: Stephen Boyd Acked-by: Gregory CLEMENT Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Fixes: 2089dc33ea0e ("clk: mvebu: armada-37xx-periph: add DVFS support for cpu clocks") Signed-off-by: Viresh Kumar commit d118ac2062b5b8331c8768ac81e016617e0996ee Author: Pali Rohár Date: Thu Apr 8 13:42:17 2021 +0200 cpufreq: armada-37xx: Fix the AVS value for load L1 The original CPU voltage value for load L1 is too low for Armada 37xx SoC when base CPU frequency is 1000 or 1200 MHz. It leads to instabilities where CPU gets stuck soon after dynamic voltage scaling from load L1 to L0. Update the CPU voltage value for load L1 accordingly when base frequency is 1000 or 1200 MHz. The minimal L1 value for base CPU frequency 1000 MHz is updated from the original 1.05V to 1.108V and for 1200 MHz is updated to 1.155V. This minimal L1 value is used only in the case when it is lower than value for L0. This change fixes CPU instability issues on 1 GHz and 1.2 GHz variants of Espressobin and 1 GHz Turris Mox. Marvell previously for 1 GHz variant of Espressobin provided a patch [1] suitable only for their Marvell Linux kernel 4.4 fork which workarounded this issue. Patch forced CPU voltage value to 1.108V in all loads. But such change does not fix CPU instability issues on 1.2 GHz variants of Armada 3720 SoC. During testing we come to the conclusion that using 1.108V as minimal value for L1 load makes 1 GHz variants of Espressobin and Turris Mox boards stable. And similarly 1.155V for 1.2 GHz variant of Espressobin. These two values 1.108V and 1.155V are documented in Armada 3700 Hardware Specifications as typical initial CPU voltage values. Discussion about this issue is also at the Armbian forum [2]. [1] - https://github.com/MarvellEmbeddedProcessors/linux-marvell/commit/dc33b62c90696afb6adc7dbcc4ebbd48bedec269 [2] - https://forum.armbian.com/topic/10429-how-to-make-espressobin-v7-stable/ Signed-off-by: Pali Rohár Acked-by: Gregory CLEMENT Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Fixes: 1c3528232f4b ("cpufreq: armada-37xx: Add AVS support") Signed-off-by: Viresh Kumar commit 4e435a9dd26c46ac018997cc0562d50b1a96f372 Author: Marek Behún Date: Thu Apr 8 13:42:16 2021 +0200 clk: mvebu: armada-37xx-periph: remove .set_parent method for CPU PM clock Remove the .set_parent method in clk_pm_cpu_ops. This method was supposed to be needed by the armada-37xx-cpufreq driver, but was never actually called due to wrong assumptions in the cpufreq driver. After this was fixed in the cpufreq driver, this method is not needed anymore. Signed-off-by: Marek Behún Acked-by: Stephen Boyd Acked-by: Gregory CLEMENT Tested-by: Pali Rohár Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Fixes: 2089dc33ea0e ("clk: mvebu: armada-37xx-periph: add DVFS support for cpu clocks") Signed-off-by: Viresh Kumar commit 22592df194e31baf371906cc720da38fa0ab68f5 Author: Marek Behún Date: Thu Apr 8 13:42:15 2021 +0200 cpufreq: armada-37xx: Fix setting TBG parent for load levels With CPU frequency determining software [1] we have discovered that after this driver does one CPU frequency change, the base frequency of the CPU is set to the frequency of TBG-A-P clock, instead of the TBG that is parent to the CPU. This can be reproduced on EspressoBIN and Turris MOX: cd /sys/devices/system/cpu/cpufreq/policy0 echo powersave >scaling_governor echo performance >scaling_governor Running the mhz tool before this driver is loaded reports 1000 MHz, and after loading the driver and executing commands above the tool reports 800 MHz. The change of TBG clock selector is supposed to happen in function armada37xx_cpufreq_dvfs_setup. Before the function returns, it does this: parent = clk_get_parent(clk); clk_set_parent(clk, parent); The armada-37xx-periph clock driver has the .set_parent method implemented correctly for this, so if the method was actually called, this would work. But since the introduction of the common clock framework in commit b2476490ef11 ("clk: introduce the common clock..."), the clk_set_parent function checks whether the parent is actually changing, and if the requested new parent is same as the old parent (which is obviously the case for the code above), the .set_parent method is not called at all. This patch fixes this issue by filling the correct TBG clock selector directly in the armada37xx_cpufreq_dvfs_setup during the filling of other registers at the same address. But the determination of CPU TBG index cannot be done via the common clock framework, therefore we need to access the North Bridge Peripheral Clock registers directly in this driver. [1] https://github.com/wtarreau/mhz Signed-off-by: Marek Behún Acked-by: Gregory CLEMENT Tested-by: Pali Rohár Tested-by: Tomasz Maciej Nowak Tested-by: Anders Trier Olesen Tested-by: Philip Soares Fixes: 92ce45fb875d ("cpufreq: Add DVFS support for Armada 37xx") Signed-off-by: Viresh Kumar commit e86e75596623e1ce5d784db8214687326712a8ae Author: Thomas Bogendoerfer Date: Thu Apr 8 23:48:46 2021 +0200 MIPS: octeon: Add __raw_copy_[from|to|in]_user symbols Cavium Octeon has its own memcpy implementation and also need the change done in commit 04324f44cb69 ("MIPS: Remove get_fs/set_fs"). Fixes: 04324f44cb69 ("MIPS: Remove get_fs/set_fs") Reported-by: kernel test robot Signed-off-by: Thomas Bogendoerfer commit 6f3badead6a078cf3c71f381f9d84ac922984a00 Author: Mika Westerberg Date: Tue Mar 2 16:11:07 2021 +0200 thunderbolt: Hide authorized attribute if router does not support PCIe tunnels With USB4 devices PCIe tunneling is optional so for device routers without PCIe upstream adapter it does not make much sense to expose the authorized attribute. For this reason hide it if PCIe tunneling is not supported by the device router. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 2f608ba19610e9b05c38747d41b97af75455a478 Author: Mika Westerberg Date: Tue Mar 2 15:51:44 2021 +0200 thunderbolt: Add details to router uevent Expose two environment variables for routers as part of the initial uevent: USB4_VERSION=1.0 USB4_TYPE=host|device|hub Userspace can use this information to expose more details about each connected device. Only USB4 devices have USB4_VERSION but all devices have USB4_TYPE. Signed-off-by: Mika Westerberg Reviewed-by: Greg Kroah-Hartman commit 64f40f9be14106e7df0098c427cb60be645bddb7 Author: Takashi Iwai Date: Wed Apr 7 16:45:49 2021 +0200 ALSA: usb-audio: Add MIDI quirk for Vox ToneLab EX ToneLab EX guitar pedal device requires the same quirk like ToneLab ST for supporting the MIDI. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212593 Cc: Link: https://lore.kernel.org/r/20210407144549.1530-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit d763145312582c08c4e9ed99d61276cde8488256 Author: Takashi Iwai Date: Thu Apr 8 09:56:56 2021 +0200 ALSA: usb-audio: Skip probe of UA-101 devices UA-101 device and co are supported by another driver, snd-ua101, but the USB audio class driver (snd-usb-audio) catches all and this resulted in the lack of functionality like missing MIDI devices. This patch introduces a sort of deny-listing for those devices to just return -ENODEV at probe in snd-usb-audio driver, so that it falls back to the probe by snd-ua101. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212477 Link: https://lore.kernel.org/r/20210408075656.30184-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 473d5ae82d73c3b21160b725af0e247fa94d7832 Merge: 66c6d1ef86ff3 c8426b2700b57 Author: Takashi Iwai Date: Fri Apr 9 09:56:58 2021 +0200 Merge branch 'for-linus' into for-next Signed-off-by: Takashi Iwai commit f7cae626cabb3350b23722b78fe34dd7a615ca04 Author: Lv Yunlong Date: Fri Apr 2 10:13:48 2021 -0700 crypto: qat - Fix a double free in adf_create_ring In adf_create_ring, if the callee adf_init_ring() failed, the callee will free the ring->base_addr by dma_free_coherent() and return -EFAULT. Then adf_create_ring will goto err and the ring->base_addr will be freed again in adf_cleanup_ring(). My patch sets ring->base_addr to NULL after the first freed to avoid the double free. Fixes: a672a9dc872ec ("crypto: qat - Intel(R) QAT transport code") Signed-off-by: Lv Yunlong Signed-off-by: Herbert Xu commit 556b64b9f39e678e64bd69fa180098e5174f3104 Author: Kai Ye Date: Fri Apr 2 19:22:30 2021 +0800 crypto: hisilicon/qm - delete redundant code The "qdma" is a structure variable instead of actual data. This structure doesn't need to be zerod, The memset is useless and redundant. So delete it. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit ae6ce7b17e508d335387ee4f280bda0134758aaf Author: Kai Ye Date: Fri Apr 2 10:47:57 2021 +0800 crypto: hisilicon/sec - fixup checking the 3DES weak key skcipher: Add a verifying to check whether the triple DES key is weak. Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 854b7737199848a91f6adfa0a03cf6f0c46c86e8 Author: Colin Ian King Date: Thu Apr 1 16:28:39 2021 +0100 crypto: sa2ul - Fix memory leak of rxd There are two error return paths that are not freeing rxd and causing memory leaks. Fix these. Addresses-Coverity: ("Resource leak") Fixes: 00c9211f60db ("crypto: sa2ul - Fix DMA mapping API usage") Signed-off-by: Colin Ian King Signed-off-by: Herbert Xu commit 50274b01ac1689b1a3f6bc4b5b3dbf361a55dd3a Author: Colin Ian King Date: Thu Apr 1 16:18:27 2021 +0100 crypto: sun8i-ss - Fix memory leak of pad It appears there are several failure return paths that don't seem to be free'ing pad. Fix these. Addresses-Coverity: ("Resource leak") Fixes: d9b45418a917 ("crypto: sun8i-ss - support hash algorithms") Signed-off-by: Colin Ian King Acked-by: Corentin Labbe Tested-by: Corentin Labbe Signed-off-by: Herbert Xu commit 3d8c5f5a08c39835a365c69d1a6d9518722ed19e Author: Kai Ye Date: Thu Apr 1 11:01:39 2021 +0800 crypto: rockchip - delete unneeded variable initialization Delete unneeded variable initialization Signed-off-by: Kai Ye Signed-off-by: Herbert Xu commit 63655b62f56023ef2fa661b8a426589cd27adda7 Author: Tang Yizhou Date: Wed Mar 31 10:00:55 2021 +0800 crypto: ccp - Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Tang Yizhou Signed-off-by: Herbert Xu commit fd4317b7b2c96e51b5ff3bed2af4ccfd66e9288a Author: Ruiqi Gong Date: Tue Mar 30 07:51:24 2021 -0400 crypto: hisilicon/hpre - fix a typo in hpre_crypto.c Do a trivial typo fix. s/discribed/described Reported-by: Hulk Robot Signed-off-by: Ruiqi Gong Signed-off-by: Herbert Xu commit a52c7b16ddf31ad6f4ccbc10a50b7ae48b35fd13 Author: Jiapeng Chong Date: Tue Mar 30 18:10:29 2021 +0800 crypto: ccp - A value assigned to a variable is never used Fix the following whitescan warning: Assigning value "64" to "dst.address" here, but that stored value is overwritten before it can be used. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Acked-by: John Allen Signed-off-by: Herbert Xu commit da6503f52bf85a7da29fbd7126320658f906dd9a Author: Longfang Liu Date: Tue Mar 30 16:02:32 2021 +0800 crypto: hisilicon/sec - Fix a module parameter error ctx_q_num is a module parameter set by the user to specify the number of qp queues required to create a ctx. When the number of qp queues allocated by PF or VF is less than the ctx_q_num, an error will be reported when ctx is initialized in kernel mode, which leads to the problem that the registered algorithms cannot be used. Therefore, when PF or VF is initialized, if the number of qp queues is not enough to create a ctx, the kernel mode cannot be used, and there is no need to register the kernel mode algorithms. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit ac1af1a788b2002eb9d6f5ca6054517ad27f1930 Author: Corentin Labbe Date: Mon Mar 29 22:12:00 2021 +0200 crypto: allwinner - add missing CRYPTO_ prefix Some CONFIG select miss CRYPTO_. Reported-by: Chen-Yu Tsai Fixes: 56f6d5aee88d1 ("crypto: sun8i-ce - support hash algorithms") Fixes: d9b45418a9177 ("crypto: sun8i-ss - support hash algorithms") Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit be0f990acfdd42437f10d5f27e2fc427645c9097 Author: Arnd Bergmann Date: Fri Apr 9 09:35:08 2021 +0200 ARM: dts: clps711x: fix missing interrupt parent The kernelci.org bot reports a build time regression: arch/arm/boot/dts/ep7209.dtsi:187.17-192.4: Warning (interrupts_property): /keypad: Missing interrupt-parent There is only one interrupt controller in this SoC, so I assume this is the parent. Fixes: 2bd86203acf3 ("ARM: dts: clps711x: Add keypad node") Reported-by: kernelci.org bot Signed-off-by: Arnd Bergmann commit 420c4c4619e1a0bc6aa39aa9b79377bd56adb7af Author: Arnd Bergmann Date: Fri Apr 9 09:29:39 2021 +0200 ARM: dts: mvebu: fix SPI device node dtc warns about a mismatched address: arch/arm/boot/dts/armada-385-atl-x530.dts:171.14-199.4: Warning (spi_bus_reg): /soc/spi@10680/spi-flash@0: SPI bus unit address format error, expected "1" I assume the "reg" property is correct here, so adjust the unit address accordingly. Fixes: c6dfc019c239 ("ARM: dts: mvebu: Add device tree for ATL-x530 Board") Reported-by: Stephen Rothwell Reported-by: kernelci.org bot Signed-off-by: Arnd Bergmann commit 36841008059caec9667459a7e126efac6379676b Author: Krzysztof Kozlowski Date: Sun Mar 14 12:07:09 2021 +0100 clk: socfpga: fix iomem pointer cast on 64-bit Pointers should be cast with uintptr_t instead of integer. This fixes warning when compile testing on ARM64: drivers/clk/socfpga/clk-gate.c: In function ‘socfpga_clk_recalc_rate’: drivers/clk/socfpga/clk-gate.c:102:7: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] Fixes: b7cec13f082f ("clk: socfpga: Look for the GPIO_DB_CLK by its offset") Signed-off-by: Krzysztof Kozlowski Acked-by: Dinh Nguyen Signed-off-by: Arnd Bergmann commit 39b95079f68cf17888a4cee93ad3c4acc3854b38 Merge: a38fd87484648 09e6d2b71ae67 Author: Arnd Bergmann Date: Fri Apr 9 09:02:55 2021 +0200 Merge tag 'bmc-5.13-wpcm450' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/newsoc Nuvoton WPCM450 BMC SoC This adds basic support for the Nuvoton WPCM450 BMC SoC. It's an older SoC but still commonly found on eBay, mostly in Supermicro X9 server boards. Third-party documentation is available at: https://github.com/neuschaefer/wpcm450/wiki The code has been contributed by Jonathan Neuschäfer who has also stepped forward to maintain the soc. * tag 'bmc-5.13-wpcm450' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: ARM: config: Add WPCM to multi v5 MAINTAINERS: Add entry for Nuvoton WPCM450 ARM: dts: Add devicetree for Supermicro X9SCi-LN4F based on WPCM450 ARM: dts: Add devicetree for Nuvoton WPCM450 BMC chip watchdog: npcm: Add support for WPCM450 ARM: npcm: Introduce Nuvoton WPCM450 SoC dt-bindings: watchdog: npcm: Add nuvoton,wpcm450-wdt dt-bindings: arm: npcm: Add nuvoton,wpcm450 compatible string dt-bindings: vendor-prefixes: Add Supermicro ARM: dts: Add board-specific compatible string to npcm750-evb devicetree dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML Link: https://lore.kernel.org/r/CACPK8Xdj20TcJckH8fx757ACa4hT4j3bZEctT0Przjv8XJd7KA@mail.gmail.com Signed-off-by: Arnd Bergmann commit d60f314b93b637e9721c406f5a61cf2157e59b48 Merge: 0a8e73301d2b0 489774ff5db94 Author: Arnd Bergmann Date: Fri Apr 9 09:00:58 2021 +0200 Merge tag 'aspeed-5.13-lpc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/drivers ASPEED LPC updates for 5.13 These patches fix the ASPEED LPC bindings and LPC-related device drivers so in the future the KCS driver can properly use the hardware. * tag 'aspeed-5.13-lpc' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: soc: aspeed: Adapt to new LPC device tree layout pinctrl: aspeed-g5: Adapt to new LPC device tree layout ipmi: kcs: aspeed: Adapt to new LPC DTS layout ARM: dts: Remove LPC BMC and Host partitions dt-bindings: aspeed-lpc: Remove LPC partitioning Link: https://lore.kernel.org/r/CACPK8Xcb12LsVr7CUaXXjQskKbVjb7x+jgueG1Hik-kBPWtDSg@mail.gmail.com Signed-off-by: Arnd Bergmann commit e3bbc53ac8827babb5001037883e4edd2068168d Merge: d8fcfbf38fe16 ee33e2fb3d702 Author: Arnd Bergmann Date: Fri Apr 9 08:57:48 2021 +0200 Merge tag 'bmc-5.13-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into arm/dt BMC device tree updates for 5.13 The ASPEED and Nuvoton pull request now comes as a combined BMC pull request. - New machines * ASRock E3C246D4I, an AST2500 BMC for an Xeon E-2100/E-2200 mini-ITX system * Quanta GBS, an NPCM730 BMC for an x86 server - Power10 BMC updates for Everest and Rainier - GPIO line names for Mihawk * tag 'bmc-5.13-devicetree' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc: (21 commits) ARM: dts: nuvoton: Add Quanta GBS BMC Device Tree ARM: dts: aspeed: mihawk: Add GPIO line names ARM: dts: aspeed: Add Rainier 1S4U machine ARM: dts: aspeed: everest: Add size/address cells ARM: dts: aspeed: everest: Enable fan watchdog ARM: dts: aspeed: everest: Add RTC ARM: dts: aspeed: everest: GPIOs support ARM: dts: aspeed: everest: Add UCD90320 power sequencer ARM: dts: aspeed: everest: Add power supply i2c devices ARM: dts: aspeed: everest: Add pca9552 fan presence ARM: dts: aspeed: everest: Add FSI CFAMs and re-number engines ARM: dts: aspeed: everest: Add max31785 fan controller device ARM: dts: aspeed: everest: Add I2C components ARM: dts: aspeed: rainier 4U: Fix fan configuration ARM: dts: aspeed: rainier: Add missing fan nodes ARM: dts: aspeed: rainier: Enable fan watchdog ARM: dts: aspeed: rainier: Add presence GPIOs ARM: dts: aspeed: rainier: Add additional processor CFAMs ARM: dts: aspeed: rainier: Add gpio-keys-polled for fans ARM: dts: aspeed: rainier: Add directly controlled LEDs ... Link: https://lore.kernel.org/r/CACPK8Xe-KV5BeQwOH6NKC1++FCVqwwNCGBh7hEbBORfrmxfTtQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 92d3bff28aa40a86e1bd8f359a046838493fc913 Merge: 957dca3df624a cfc0889cebccb Author: Andrii Nakryiko Date: Thu Apr 8 23:47:06 2021 -0700 Merge branch 'bpf/selftests: page size fixes' Yauheni Kaliuta says: ==================== A set of fixes for selftests to make them working on systems with PAGE_SIZE > 4K + cleanup (version) and ringbuf_multi extention. --- v3->v4: - zero initialize BPF programs' static variables; - add bpf_map__inner_map to libbpf.map in alphabetical order; - add bpf_map__set_inner_map_fd test to ringbuf_multi; v2->v3: - reorder: move version removing patch first to keep main patches in one group; - rename "selftests/bpf: pass page size from userspace in sockopt_sk" as suggested; - convert sockopt_sk test to use ASSERT macros; - set page size from userspace - split patches to pairs userspace/bpf. It's easier to check that every conversion works as expected; v1->v2: - add missed 'selftests/bpf: test_progs/sockopt_sk: Convert to use BPF skeleton' ==================== Signed-off-by: Andrii Nakryiko commit cfc0889cebccbc398a9d7a14e4e1b4724afe4bb3 Author: Yauheni Kaliuta Date: Thu Apr 8 09:13:10 2021 +0300 selftests/bpf: ringbuf_multi: Test bpf_map__set_inner_map_fd Test map__set_inner_map_fd() interaction with map-in-map initialization. Use hashmap of maps just to make it different to existing array of maps. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-9-yauheni.kaliuta@redhat.com commit f3f4c23e1238783f3d719cfbda6c5e2fd03a48c4 Author: Yauheni Kaliuta Date: Thu Apr 8 09:13:09 2021 +0300 selftests/bpf: ringbuf_multi: Use runtime page size Set bpf table sizes dynamically according to the runtime page size value. Do not switch to ASSERT macros, keep CHECK, for consistency with the rest of the test. Can be a separate cleanup patch. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-8-yauheni.kaliuta@redhat.com commit b3278099b2f6e81771c6c2b70fcf9a56e9ba5d93 Author: Andrii Nakryiko Date: Thu Apr 8 09:13:08 2021 +0300 libbpf: Add bpf_map__inner_map API The API gives access to inner map for map in map types (array or hash of map). It will be used to dynamically set max_entries in it. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-7-yauheni.kaliuta@redhat.com commit 23a65766066bb6e42a44e9097ddf79f72292a19f Author: Yauheni Kaliuta Date: Thu Apr 8 09:13:07 2021 +0300 selftests/bpf: ringbuf: Use runtime page size Replace hardcoded 4096 with runtime value in the userspace part of the test and set bpf table sizes dynamically according to the value. Do not switch to ASSERT macros, keep CHECK, for consistency with the rest of the test. Can be a separate cleanup patch. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-6-yauheni.kaliuta@redhat.com commit 34090aaf256e469a39401cc04d5cd43275ccd97d Author: Yauheni Kaliuta Date: Thu Apr 8 09:13:06 2021 +0300 selftests/bpf: mmap: Use runtime page size Replace hardcoded 4096 with runtime value in the userspace part of the test and set bpf table sizes dynamically according to the value. Do not switch to ASSERT macros, keep CHECK, for consistency with the rest of the test. Can be a separate cleanup patch. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-5-yauheni.kaliuta@redhat.com commit 7a85e4dfa7f5d052ae5016e96f1ee426a8870e78 Author: Yauheni Kaliuta Date: Thu Apr 8 09:13:05 2021 +0300 selftests/bpf: Pass page size from userspace in map_ptr Use ASSERT to check result but keep CHECK where format was used to report error. Use bpf_map__set_max_entries() to set map size dynamically from userspace according to page size. Zero-initialize the variable in bpf prog, otherwise it will cause problems on some versions of Clang. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-4-yauheni.kaliuta@redhat.com commit 361d32028c7d52d28d7f0562193a2f4a41d10351 Author: Yauheni Kaliuta Date: Thu Apr 8 09:13:04 2021 +0300 selftests/bpf: Pass page size from userspace in sockopt_sk Since there is no convenient way for bpf program to get PAGE_SIZE from inside of the kernel, pass the value from userspace. Zero-initialize the variable in bpf prog, otherwise it will cause problems on some versions of Clang. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-3-yauheni.kaliuta@redhat.com commit cad99cce133dd5377f22da1e75d7eb5c4b886d75 Author: Yauheni Kaliuta Date: Thu Apr 8 09:13:03 2021 +0300 selftests/bpf: test_progs/sockopt_sk: Convert to use BPF skeleton Switch the test to use BPF skeleton to save some boilerplate and make it easy to access bpf program bss segment. The latter will be used to pass PAGE_SIZE from userspace since there is no convenient way for bpf program to get it from inside of the kernel. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-2-yauheni.kaliuta@redhat.com commit ff182bc572cec4ca757775bf2a33a3ce8611227a Author: Yauheni Kaliuta Date: Thu Apr 8 09:13:02 2021 +0300 selftests/bpf: test_progs/sockopt_sk: Remove version As pointed by Andrii Nakryiko, _version is useless now, remove it. Signed-off-by: Yauheni Kaliuta Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210408061310.95877-1-yauheni.kaliuta@redhat.com commit ea96292838397682530ac77a429974f8ff5f2df3 Author: Hector Martin Date: Fri Apr 9 14:20:38 2021 +0900 asm-generic/io.h: Unbork ioremap_np() declaration It accidentally slipped into the #ifdef for ioremap_uc(). Signed-off-by: Hector Martin Link: https://lore.kernel.org/r/20210409052038.58925-1-marcan@marcan.st' Signed-off-by: Arnd Bergmann commit 09e6d2b71ae673dccf9f59f0fc1e17109113b6f4 Author: Joel Stanley Date: Fri Apr 9 15:15:11 2021 +0930 ARM: config: Add WPCM to multi v5 This is a newly added ARM926 platform that is not covered by any other defconfigs. Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210409054511.1534181-1-joel@jms.id.au commit ef9c51b45cda2df86a31c1050141955ef4a9f4bd Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:21 2021 +0200 MAINTAINERS: Add entry for Nuvoton WPCM450 I am adding myself as the maintainer of WPCM450-related code. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210406120921.2484986-11-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit 37e9f9fa71fb8024c7c6c88b738d13f098401ca6 Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:20 2021 +0200 ARM: dts: Add devicetree for Supermicro X9SCi-LN4F based on WPCM450 The Supermicro X9SCi-LN4F is a server mainboard featuring the WPCM450 BMC. This patch adds a minimal devicetree for Linux running on the BMC. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210406120921.2484986-10-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit ed09d269b9589db37fb1aea04b793cff7ac183bb Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:19 2021 +0200 ARM: dts: Add devicetree for Nuvoton WPCM450 BMC chip The WPCM450 is an older BMC SoC in the Nuvoton NPCM family, originally marketed as Winbond WPCM450. This patch adds a devicetree with basic functionality. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210406120921.2484986-9-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit 328d1c1a92d9eea42943af9edd5393dcd06bd591 Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:18 2021 +0200 watchdog: npcm: Add support for WPCM450 Add a compatible string for WPCM450, which has essentially the same watchdog mechanism as NPCM750. Signed-off-by: Jonathan Neuschäfer Acked-by: Guenter Roeck Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210406120921.2484986-8-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit ece3fe93e8f4d0c9322b8ca24a250ea9292052fb Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:16 2021 +0200 ARM: npcm: Introduce Nuvoton WPCM450 SoC The WPCM450 is an older BMC SoC in the Nuvoton NPCM family, originally marketed as Winbond WPCM450. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210406120921.2484986-6-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit 9b39efacd6c13239a58952f4e5c43c68beff9a66 Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:15 2021 +0200 dt-bindings: watchdog: npcm: Add nuvoton,wpcm450-wdt Add a compatible string for the WPCM450 SoC, which has the same watchdog timer. Signed-off-by: Jonathan Neuschäfer Acked-by: Rob Herring Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210406120921.2484986-5-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit f31fc98b6306fd26ac2bac05fa07e27f03b36034 Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:13 2021 +0200 dt-bindings: arm: npcm: Add nuvoton,wpcm450 compatible string The WPCM450 is an older BMC SoC in the Nuvoton NPCM family, originally marketed as Winbond WPCM450. Signed-off-by: Jonathan Neuschäfer Acked-by: Rob Herring Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210406120921.2484986-3-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit 9f6f07169207653f4ffd91b7d44e4a5bae9e1bbf Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:12 2021 +0200 dt-bindings: vendor-prefixes: Add Supermicro Super Micro Computer, Inc. (https://www.supermicro.com/en/), commonly known as Supermicro, is a manufacturer of server hardware. Signed-off-by: Jonathan Neuschäfer Acked-by: Rob Herring Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210406120921.2484986-2-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit 683e77cadc839b39cd712c18dbb317cae49357c0 Author: Manivannan Sadhasivam Date: Fri Apr 9 10:11:05 2021 +0530 bus: mhi: core: Fix shadow declarations This commit fixes below sparse warnings with W=2 about shadow declarations: drivers/bus/mhi/core/main.c: In function ‘parse_xfer_event’: drivers/bus/mhi/core/main.c:667:17: warning: declaration of ‘flags’ shadows a previous local [-Wshadow] 667 | unsigned long flags; | ^~~~~ drivers/bus/mhi/core/main.c:565:16: note: shadowed declaration is here 565 | unsigned long flags = 0; | ^~~~~ drivers/bus/mhi/core/main.c: In function ‘mhi_process_ctrl_ev_ring’: drivers/bus/mhi/core/main.c:856:23: warning: declaration of ‘new_state’ shadows a previous local [-Wshadow] 856 | enum mhi_pm_state new_state; | ^~~~~~~~~ drivers/bus/mhi/core/main.c:837:19: note: shadowed declaration is here 837 | enum mhi_state new_state; | ^~~~~~~~~ Signed-off-by: Manivannan Sadhasivam commit 489774ff5db943642751f4f0fdac9033239208c6 Author: Chia-Wei, Wang Date: Fri Mar 19 16:57:36 2021 +1030 soc: aspeed: Adapt to new LPC device tree layout Add check against LPC device v2 compatible string to ensure that the fixed device tree layout is adopted. The LPC register offsets are also fixed accordingly. Signed-off-by: Chia-Wei Wang Reviewed-by: Andrew Jeffery Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210319062752.145730-5-andrew@aj.id.au Signed-off-by: Joel Stanley commit eaffd32bea0c93226d4701b1736b04827f754ccf Author: Chia-Wei, Wang Date: Fri Mar 19 16:57:35 2021 +1030 pinctrl: aspeed-g5: Adapt to new LPC device tree layout Add check against LPC device v2 compatible string to ensure that the fixed device tree layout is adopted. The LPC register offsets are also fixed accordingly. Signed-off-by: Chia-Wei Wang Reviewed-by: Andrew Jeffery Acked-by: Linus Walleij Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210319062752.145730-4-andrew@aj.id.au Signed-off-by: Joel Stanley commit 8f88156f82ea4c152b3a90cc9f2a111327089d47 Author: Chia-Wei, Wang Date: Fri Mar 19 16:57:34 2021 +1030 ipmi: kcs: aspeed: Adapt to new LPC DTS layout Add check against LPC device v2 compatible string to ensure that the fixed device tree layout is adopted. The LPC register offsets are also fixed accordingly. Signed-off-by: Chia-Wei Wang Reviewed-by: Andrew Jeffery Acked-by: Haiyue Wang Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210319062752.145730-3-andrew@aj.id.au Signed-off-by: Joel Stanley commit 311bf0f18cd68f55a8ffd30089ccb74a2318b86d Author: Chia-Wei, Wang Date: Fri Mar 19 16:57:33 2021 +1030 ARM: dts: Remove LPC BMC and Host partitions The LPC controller has no concept of the BMC and the Host partitions. A concrete instance is that the HICRB[5:4] are for the I/O port address configurtaion of KCS channel 1/2. However, the KCS driver cannot access HICRB for channel 1/2 initialization via syscon regmap interface due to the parition boundary. (i.e. offset 80h) In addition, for the HW design backward compatibility, a newly added HW control bit could be located at any reserved one over the LPC addressing space. Thereby, this patch removes the lpc-bmc and lpc-host child node and thus the LPC partitioning. Note that this change requires the synchronization between device tree change and the driver change. To prevent the misuse of old devicetrees with new drivers, or vice versa, the v2 compatible strings are adopted for the LPC device as listed: "aspeed,ast2400-lpc-v2" "aspeed,ast2500-lpc-v2" "aspeed,ast2600-lpc-v2" Signed-off-by: Chia-Wei Wang Reviewed-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210319062752.145730-2-andrew@aj.id.au Signed-off-by: Joel Stanley commit baffc34d48b7a162f07cd842eeb37838612234ee Author: Chia-Wei, Wang Date: Fri Mar 19 16:57:32 2021 +1030 dt-bindings: aspeed-lpc: Remove LPC partitioning The LPC controller has no concept of the BMC and the Host partitions. This patch fixes the documentation by removing the description on LPC partitions. The register offsets illustrated in the DTS node examples are also fixed to adapt to the LPC DTS change. Signed-off-by: Chia-Wei Wang Reviewed-by: Andrew Jeffery Acked-by: Rob Herring Acked-by: Lee Jones Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210319062752.145730-1-andrew@aj.id.au Signed-off-by: Joel Stanley commit e8b8b0df8694e39ea6bbbdb9e2fcfa78a61e2e42 Author: Tian Tao Date: Tue Mar 30 09:54:48 2021 +0800 drm/panel: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/gpu/drm/panel//panel-tpo-td043mtea1.c:217:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/panel//panel-tpo-td043mtea1.c:189:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1617069288-8317-1-git-send-email-tiantao6@hisilicon.com commit 9186ad8e66bab6a1edc66a939dd56c4638cda948 Author: Sami Tolvanen Date: Thu Apr 8 11:28:43 2021 -0700 arm64: allow CONFIG_CFI_CLANG to be selected Select ARCH_SUPPORTS_CFI_CLANG to allow CFI to be enabled. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-19-samitolvanen@google.com commit 67dfd72b3e8ab237aaa09cad5380b9e8c8cb65db Author: Sami Tolvanen Date: Thu Apr 8 11:28:42 2021 -0700 KVM: arm64: Disable CFI for nVHE Disable CFI for the nVHE code to avoid address space confusion. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-18-samitolvanen@google.com commit 800618f955a9647d8e03b9a367da974f7eecb120 Author: Sami Tolvanen Date: Thu Apr 8 11:28:41 2021 -0700 arm64: ftrace: use function_nocfi for ftrace_call With CONFIG_CFI_CLANG, the compiler replaces function pointers with jump table addresses, which breaks dynamic ftrace as the address of ftrace_call is replaced with the address of ftrace_call.cfi_jt. Use function_nocfi() to get the address of the actual function instead. Suggested-by: Ben Dai Signed-off-by: Sami Tolvanen Acked-by: Mark Rutland Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-17-samitolvanen@google.com commit 9562f3dc6f502d78fd5c8c56f5826e93b781bd46 Author: Sami Tolvanen Date: Thu Apr 8 11:28:40 2021 -0700 arm64: add __nocfi to __apply_alternatives __apply_alternatives makes indirect calls to functions whose address is taken in assembly code using the alternative_cb macro. With non-canonical CFI, the compiler won't replace these function references with the jump table addresses, which trips CFI. Disable CFI checking in the function to work around the issue. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-16-samitolvanen@google.com commit cbdac8413e33bd1b9de45eeb10221c4686d743a6 Author: Sami Tolvanen Date: Thu Apr 8 11:28:39 2021 -0700 arm64: add __nocfi to functions that jump to a physical address Disable CFI checking for functions that switch to linear mapping and make an indirect call to a physical address, since the compiler only understands virtual addresses and the CFI check for such indirect calls would always fail. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-15-samitolvanen@google.com commit bde33977bf24b7ed52e2bac0eb9235769a0a11f6 Author: Sami Tolvanen Date: Thu Apr 8 11:28:38 2021 -0700 arm64: use function_nocfi with __pa_symbol With CONFIG_CFI_CLANG, the compiler replaces function address references with the address of the function's CFI jump table entry. This means that __pa_symbol(function) returns the physical address of the jump table entry, which can lead to address space confusion as the jump table points to the function's virtual address. Therefore, use the function_nocfi() macro to ensure we are always taking the address of the actual function instead. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Mark Rutland Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-14-samitolvanen@google.com commit 4ecfca89893843d4ae266485bb878aa760ba82da Author: Sami Tolvanen Date: Thu Apr 8 11:28:37 2021 -0700 arm64: implement function_nocfi With CONFIG_CFI_CLANG, the compiler replaces function addresses in instrumented C code with jump table addresses. This change implements the function_nocfi() macro, which returns the actual function address instead. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Mark Rutland Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-13-samitolvanen@google.com commit 167d0da23f2422a7986278c1379c472a88186c75 Author: Sami Tolvanen Date: Thu Apr 8 11:28:36 2021 -0700 psci: use function_nocfi for cpu_resume With CONFIG_CFI_CLANG, the compiler replaces function pointers with jump table addresses, which results in __pa_symbol returning the physical address of the jump table entry. As the jump table contains an immediate jump to an EL1 virtual address, this typically won't work as intended. Use function_nocfi to get the actual address of cpu_resume. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Mark Rutland Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-12-samitolvanen@google.com commit 6c4df54ed293f6383efb97fca0e643b8dcbc3769 Author: Sami Tolvanen Date: Thu Apr 8 11:28:35 2021 -0700 lkdtm: use function_nocfi To ensure we take the actual address of a function in kernel text, use function_nocfi. Otherwise, with CONFIG_CFI_CLANG, the compiler replaces the address with a pointer to the CFI jump table, which is actually in the module when compiled with CONFIG_LKDTM=m. Signed-off-by: Sami Tolvanen Acked-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-11-samitolvanen@google.com commit 4f0f586bf0c898233d8f316f471a21db2abd522d Author: Sami Tolvanen Date: Thu Apr 8 11:28:34 2021 -0700 treewide: Change list_sort to use const pointers list_sort() internally casts the comparison function passed to it to a different type with constant struct list_head pointers, and uses this pointer to call the functions, which trips indirect call Control-Flow Integrity (CFI) checking. Instead of removing the consts, this change defines the list_cmp_func_t type and changes the comparison function types of all list_sort() callers to use const pointers, thus avoiding type mismatches. Suggested-by: Nick Desaulniers Signed-off-by: Sami Tolvanen Reviewed-by: Nick Desaulniers Reviewed-by: Christoph Hellwig Reviewed-by: Kees Cook Tested-by: Nick Desaulniers Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-10-samitolvanen@google.com commit 9f5b4009980f369acb80b72235b2d66c3fd6eca6 Author: Sami Tolvanen Date: Thu Apr 8 11:28:33 2021 -0700 bpf: disable CFI in dispatcher functions BPF dispatcher functions are patched at runtime to perform direct instead of indirect calls. Disable CFI for the dispatcher functions to avoid conflicts. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-9-samitolvanen@google.com commit 8b8e6b5d3b013b0bd849990af2cc0f1321850e19 Author: Sami Tolvanen Date: Thu Apr 8 11:28:32 2021 -0700 kallsyms: strip ThinLTO hashes from static functions With CONFIG_CFI_CLANG and ThinLTO, Clang appends a hash to the names of all static functions not marked __used. This can break userspace tools that don't expect the function name to change, so strip out the hash from the output. Suggested-by: Jack Pham Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-8-samitolvanen@google.com commit 0a5b412891dfdc72eb86fcd640fe1296a4cfa9ae Author: Sami Tolvanen Date: Thu Apr 8 11:28:31 2021 -0700 kthread: use WARN_ON_FUNCTION_MISMATCH With CONFIG_CFI_CLANG, a callback function passed to __kthread_queue_delayed_work from a module points to a jump table entry defined in the module instead of the one used in the core kernel, which breaks function address equality in this check: WARN_ON_ONCE(timer->function != ktead_delayed_work_timer_fn); Use WARN_ON_FUNCTION_MISMATCH() instead to disable the warning when CFI and modules are both enabled. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-7-samitolvanen@google.com commit 981731129e0fc1d3aa3213195904c9bf45fa9f36 Author: Sami Tolvanen Date: Thu Apr 8 11:28:30 2021 -0700 workqueue: use WARN_ON_FUNCTION_MISMATCH With CONFIG_CFI_CLANG, a callback function passed to __queue_delayed_work from a module points to a jump table entry defined in the module instead of the one used in the core kernel, which breaks function address equality in this check: WARN_ON_ONCE(timer->function != delayed_work_timer_fn); Use WARN_ON_FUNCTION_MISMATCH() instead to disable the warning when CFI and modules are both enabled. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-6-samitolvanen@google.com commit 28aad1c29053195b1a9f56742e64b679d61e786b Author: Sami Tolvanen Date: Thu Apr 8 11:28:29 2021 -0700 module: ensure __cfi_check alignment CONFIG_CFI_CLANG_SHADOW assumes the __cfi_check() function is page aligned and at the beginning of the .text section. While Clang would normally align the function correctly, it fails to do so for modules with no executable code. This change ensures the correct __cfi_check() location and alignment. It also discards the .eh_frame section, which Clang can generate with certain sanitizers, such as CFI. Link: https://bugs.llvm.org/show_bug.cgi?id=46293 Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Jessica Yu Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-5-samitolvanen@google.com commit 5caf968262df0ec7a3377fb67d4a6bfa979cb028 Author: Sami Tolvanen Date: Thu Apr 8 11:28:28 2021 -0700 mm: add generic function_nocfi macro With CONFIG_CFI_CLANG, the compiler replaces function addresses in instrumented C code with jump table addresses. This means that __pa_symbol(function) returns the physical address of the jump table entry instead of the actual function, which may not work as the jump table code will immediately jump to a virtual address that may not be mapped. To avoid this address space confusion, this change adds a generic definition for function_nocfi(), which architectures that support CFI can override. The typical implementation of would use inline assembly to take the function address, which avoids compiler instrumentation. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Mark Rutland Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-4-samitolvanen@google.com commit ff301ceb5299551c3650d0e07ba879b766da4cc0 Author: Sami Tolvanen Date: Thu Apr 8 11:28:27 2021 -0700 cfi: add __cficanonical With CONFIG_CFI_CLANG, the compiler replaces a function address taken in C code with the address of a local jump table entry, which passes runtime indirect call checks. However, the compiler won't replace addresses taken in assembly code, which will result in a CFI failure if we later jump to such an address in instrumented C code. The code generated for the non-canonical jump table looks this: : /* In C, &noncanonical points here */ jmp noncanonical ... : /* function body */ ... This change adds the __cficanonical attribute, which tells the compiler to use a canonical jump table for the function instead. This means the compiler will rename the actual function to .cfi and points the original symbol to the jump table entry instead: : /* jump table entry */ jmp canonical.cfi ... : /* function body */ ... As a result, the address taken in assembly, or other non-instrumented code always points to the jump table and therefore, can be used for indirect calls in instrumented code without tripping CFI checks. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Acked-by: Bjorn Helgaas # pci.h Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-3-samitolvanen@google.com commit cf68fffb66d60d96209446bfc4a15291dc5a5d41 Author: Sami Tolvanen Date: Thu Apr 8 11:28:26 2021 -0700 add support for Clang CFI This change adds support for Clang’s forward-edge Control Flow Integrity (CFI) checking. With CONFIG_CFI_CLANG, the compiler injects a runtime check before each indirect function call to ensure the target is a valid function with the correct static type. This restricts possible call targets and makes it more difficult for an attacker to exploit bugs that allow the modification of stored function pointers. For more details, see: https://clang.llvm.org/docs/ControlFlowIntegrity.html Clang requires CONFIG_LTO_CLANG to be enabled with CFI to gain visibility to possible call targets. Kernel modules are supported with Clang’s cross-DSO CFI mode, which allows checking between independently compiled components. With CFI enabled, the compiler injects a __cfi_check() function into the kernel and each module for validating local call targets. For cross-module calls that cannot be validated locally, the compiler calls the global __cfi_slowpath_diag() function, which determines the target module and calls the correct __cfi_check() function. This patch includes a slowpath implementation that uses __module_address() to resolve call targets, and with CONFIG_CFI_CLANG_SHADOW enabled, a shadow map that speeds up module look-ups by ~3x. Clang implements indirect call checking using jump tables and offers two methods of generating them. With canonical jump tables, the compiler renames each address-taken function to .cfi and points the original symbol to a jump table entry, which passes __cfi_check() validation. This isn’t compatible with stand-alone assembly code, which the compiler doesn’t instrument, and would result in indirect calls to assembly code to fail. Therefore, we default to using non-canonical jump tables instead, where the compiler generates a local jump table entry .cfi_jt for each address-taken function, and replaces all references to the function with the address of the jump table entry. Note that because non-canonical jump table addresses are local to each component, they break cross-module function address equality. Specifically, the address of a global function will be different in each module, as it's replaced with the address of a local jump table entry. If this address is passed to a different module, it won’t match the address of the same function taken there. This may break code that relies on comparing addresses passed from other components. CFI checking can be disabled in a function with the __nocfi attribute. Additionally, CFI can be disabled for an entire compilation unit by filtering out CC_FLAGS_CFI. By default, CFI failures result in a kernel panic to stop a potential exploit. CONFIG_CFI_PERMISSIVE enables a permissive mode, where the kernel prints out a rate-limited warning instead, and allows execution to continue. This option is helpful for locating type mismatches, but should only be enabled during development. Signed-off-by: Sami Tolvanen Reviewed-by: Kees Cook Tested-by: Nathan Chancellor Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210408182843.1754385-2-samitolvanen@google.com commit ea119e5a482aaf08dd22cf53400c29cb16af8416 Author: Guru Das Srinagesh Date: Thu Apr 8 10:25:07 2021 -0700 pinctrl: qcom-pmic-gpio: Add support for pm8008 Add support for the two GPIOs present on Qualcomm Technologies, Inc. PM8008. Reviewed-by: Bjorn Andersson Signed-off-by: Guru Das Srinagesh Link: https://lore.kernel.org/r/129d241ee510e28536d35dbfeee75474e12d8d22.1617901945.git.gurus@codeaurora.org Signed-off-by: Linus Walleij commit 18d2719f46bc1cbbc17673b6a0f7576c622e5694 Author: Guru Das Srinagesh Date: Thu Apr 8 10:25:06 2021 -0700 dt-bindings: pinctrl: qcom-pmic-gpio: Add pm8008 support Add support for the 2 GPIOs present on Qualcomm Technologies, Inc. PM8008. Acked-by: Bjorn Andersson Signed-off-by: Guru Das Srinagesh Link: https://lore.kernel.org/r/2be34cc205ae96d40b04a9efdcf9287d5da9d1c0.1617901945.git.gurus@codeaurora.org Signed-off-by: Linus Walleij commit 90876fd477fc50a699b6372d564c671ad84880d6 Author: Lyude Paul Date: Fri Mar 26 16:38:06 2021 -0400 drm/dp_mst: Drop DRM_ERROR() on kzalloc() fail in drm_dp_mst_handle_up_req() Checkpatch was complaining about this - there's no need for us to print errors when kzalloc() fails, as kzalloc() will already WARN for us. So, let's fix that before converting things to make checkpatch happy. Signed-off-by: Lyude Paul Cc: Robert Foss Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210326203807.105754-20-lyude@redhat.com commit c5261e93758a6b36f4292403027af383ec9da129 Author: Lyude Paul Date: Fri Mar 26 16:37:54 2021 -0400 drm/print: Fixup DRM_DEBUG_KMS_RATELIMITED() Since we're about to move drm_dp_helper.c over to drm_dbg_*(), we'll want to make sure that we can also add ratelimited versions of these macros in order to retain some of the previous debugging output behavior we had. However, as I was preparing to do this I noticed that the current rate limited macros we have are kind of bogus. It looks like when I wrote these, I didn't notice that we'd always be calling __ratelimit() even if the debugging message we'd be printing would normally be filtered out due to the relevant DRM debugging category being disabled. So, let's fix this by making sure to check drm_debug_enabled() in our ratelimited macros before calling __ratelimit(), and start using drm_dev_printk() in order to print debugging messages since that will save us from doing a redundant drm_debug_enabled() check. And while we're at it, let's move the code for this into another macro that we can reuse for defining new ratelimited DRM debug macros more easily. v2: * Make sure to use tabs where possible in __DRM_DEFINE_DBG_RATELIMITED() Signed-off-by: Lyude Paul Cc: Robert Foss Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210326203807.105754-8-lyude@redhat.com commit 74031824cac501b1c6db18ee1e49a2197e3b67bd Author: Heikki Krogerus Date: Mon Mar 29 13:50:38 2021 +0300 ARM: omap1: osk: Constify the software node Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus Acked-by: Tony Lindgren Signed-off-by: Wolfram Sang commit 95e272dc364a6bb70d461a42014a0142ab25ea82 Author: Heikki Krogerus Date: Mon Mar 29 13:50:37 2021 +0300 ARM: davinci: Constify the software nodes Additional device properties are always just a part of a software fwnode. If the device properties are constant, the software node can also be constant. Signed-off-by: Heikki Krogerus Acked-by: Bartosz Golaszewski Signed-off-by: Wolfram Sang commit 714638e02d94fa28c9e030d13d03e663fe24925e Author: Heikki Krogerus Date: Mon Mar 29 13:50:36 2021 +0300 i2c: Add support for software nodes This makes it possible for the drivers to assign complete software fwnodes to the devices instead of only the device properties in those nodes. Signed-off-by: Heikki Krogerus Signed-off-by: Wolfram Sang commit 39c17ae60ea9ad265f6402f6e23e988f06dfc441 Author: Lyude Paul Date: Fri Mar 26 16:37:49 2021 -0400 drm/tegra: Don't register DP AUX channels before connectors As pointed out by the documentation for drm_dp_aux_register(), drm_dp_aux_init() should be used in situations where the AUX channel for a display driver can potentially be registered before it's respective DRM driver. This is the case with Tegra, since the DP aux channel exists as a platform device instead of being a grandchild of the DRM device. Since we're about to add a backpointer to a DP AUX channel's respective DRM device, let's fix this so that we don't potentially allow userspace to use the AUX channel before we've associated it with it's DRM connector. Signed-off-by: Lyude Paul Acked-by: Thierry Reding Link: https://patchwork.freedesktop.org/patch/msgid/20210326203807.105754-3-lyude@redhat.com commit 45d969992c1893df42ccae064aba6f05dded67ee Author: Lyude Paul Date: Fri Mar 26 16:37:48 2021 -0400 drm/dp: Fixup kernel docs for struct drm_dp_aux * Make sure that struct members are referred to using @, otherwise they won't be formatted as such * Make sure to refer to other struct types using & so they link back to each struct's definition * Make sure to precede constant values with % so they're formatted correctly Signed-off-by: Lyude Paul Acked-by: Randy Dunlap Link: https://patchwork.freedesktop.org/patch/msgid/20210326203807.105754-2-lyude@redhat.com commit 242b0b398ccd34f73772120bd27a87a1bf00e30b Author: Peng Ma Date: Thu Apr 8 11:03:53 2021 +0800 soc: fsl: enable acpi support in RCPM driver This patch enables ACPI support in RCPM driver. Signed-off-by: Peng Ma Signed-off-by: Ran Wang Signed-off-by: Li Yang commit 4438669eb703d1a7416c2b19a8a15b0400b36738 Merge: 4914a4f6a7a5e a61d67188f29f Author: David S. Miller Date: Thu Apr 8 14:19:32 2021 -0700 Merge tag 'for-net-next-2021-04-08' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Luiz Augusto von Dentz says: ==================== bluetooth-next pull request for net-next: - Proper support for BCM4330 and BMC4334 - Various improvements for firmware download of Intel controllers - Update management interface revision to 20 - Support for AOSP HCI vendor commands - Initial Virtio support ==================== Signed-off-by: Luiz Augusto von Dentz Signed-off-by: David S. Miller commit 4914a4f6a7a5ee5f8faeb91bb6ee4ee19c2a72b7 Merge: 4667bf7135147 2e20521b80c76 Author: David S. Miller Date: Thu Apr 8 14:18:25 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-04-08 This series contains updates to ice driver only. Chinh adds retrying of sending some AQ commands when receiving EBUSY error. Victor modifies how nodes are added to reduce stack usage. Ani renames some variables to either follow spec naming or to be inline with naming in the rest of the driver. Ignores EMODE error as there are cases where this error is expected. Performs some cleanup such as removing unnecessary checks, doing variable assignments over copies, and removing unneeded variables. Revises some error codes returned in link settings to be more appropriate. He also implements support for new firmware option to get default link configuration which accounts for any needed NVM based overrides for PHY configuration. He also removes the rx_gro_dropped stat as the value no longer changes. Jeb removes setting specific link modes on firmwares that no longer require it. Brett removes unnecessary checks when adding and removing VLANs. Tony fixes a checkpatch warning for unnecessary blank line. ==================== Signed-off-by: David S. Miller commit 660f58b6d290417828680f417f43d7b810fa9138 Author: Tian Tao Date: Thu Apr 1 21:37:47 2021 +0800 i2c: remove unused 'version.h' include in drivers Signed-off-by: Tian Tao Signed-off-by: Zhiqi Song Acked-by: Florian Fainelli # for brcmstb Signed-off-by: Wolfram Sang commit 6db12ee0456d0e369c7b59788d46e15a56ad0294 Author: Josh Hunt Date: Thu Apr 1 22:58:33 2021 -0400 psi: allow unprivileged users with CAP_SYS_RESOURCE to write psi files Currently only root can write files under /proc/pressure. Relax this to allow tasks running as unprivileged users with CAP_SYS_RESOURCE to be able to write to these files. Signed-off-by: Josh Hunt Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20210402025833.27599-1-johunt@akamai.com commit 4667bf7135147aaf71947bb9195b35eded1df55c Merge: c5f77ad8bb77c 35796c1d34387 Author: David S. Miller Date: Thu Apr 8 14:03:17 2021 -0700 Merge tag 'batadv-next-pullrequest-20210408' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== This cleanup patchset includes the following patches: - for kerneldoc in batadv_priv, by Linus Luessing - drop unused header preempt.h, by Sven Eckelmann - Fix misspelled "wont", by Sven Eckelmann ==================== Signed-off-by: David S. Miller commit bb7f086b8404e70ac2891ba539f959805f1684b0 Author: Yicong Yang Date: Thu Apr 8 20:17:40 2021 +0800 i2c: core: simplify devm_i2c_new_dummy_device() Use devm_add_action_or_reset() instead of devres_alloc() and devres_add(), which works the same. This will simplify the code. There is no functional change. Signed-off-by: Yicong Yang Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit c5f77ad8bb77cc017724b9227537557675a512e7 Merge: fbe82b3db3e58 652e3124c3ee6 Author: David S. Miller Date: Thu Apr 8 13:50:14 2021 -0700 Merge branch 'net-sched-action-tests' Vlad Buslov says: ==================== Additional tests for action API Add two new tests for action create/change code. ==================== Acked-by: Cong Wang Signed-off-by: David S. Miller commit 652e3124c3ee60d9770e070afab0e0a862e9bfd7 Author: Vlad Buslov Date: Wed Apr 7 18:46:43 2021 +0300 tc-testing: add simple action test to verify batch change cleanup Verify cleanup of failed actions batch change where second action in batch fails after successful init of first action. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 79749ae19de6863d0748419d413b231b0d57e28a Author: Vlad Buslov Date: Wed Apr 7 18:46:42 2021 +0300 tc-testing: add simple action test to verify batch add cleanup Verify cleanup of failed actions batch add where second action in batch fails after successful init of first action. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit 3ab4ce2daf09b62e38934a7afe3e9fc3f3cbcdec Author: Wei Yongjun Date: Wed Apr 7 03:11:37 2021 +0000 i2c: designware: Fix return value check in navi_amd_register_client() In case of error, the function i2c_new_client_device() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 17631e8ca2d3 ("i2c: designware: Add driver support for AMD NAVI GPU") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Jarkko Nikula Signed-off-by: Wolfram Sang commit fbe82b3db3e58edca33a7e7d9157eb7bdda6e537 Author: Tian Tao Date: Thu Apr 8 15:00:41 2021 +0800 net: qed: remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Signed-off-by: Zhiqi Song Signed-off-by: David S. Miller commit 9e60d24dc39322e5816138c2aa1956a45c3153bf Merge: c69b67185ccd3 715c58e94f0d7 Author: David S. Miller Date: Thu Apr 8 13:23:01 2021 -0700 Merge branch 'hns3-pm_ops' Huazhong Tan says: ==================== net: hns3: add support for pm_ops This series adds support for pm_ops in the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit 715c58e94f0d78907bfccde12c2ca5236502c53e Author: Jiaran Zhang Date: Thu Apr 8 11:40:05 2021 +0800 net: hns3: add suspend and resume pm_ops To implement the system suspend/resume functions, the NIC driver needs to support: 1. When the system enters the suspend mode, the driver needs to implement the suspend callback function of the NIC device. The driver needs to mute the device, stop all RX/TX activities of the device, and unmap the interrupt. 2. When the system enters the resume mode, the driver needs to implement the resume callback function of the NIC device and restore the device to the state before suspension. When the system enters the suspend and resume mode, the NIC driver actually executes the PF function reset process. When the PFs are suspending/resuming, VFs also enter the suspend/resume state because the PFs trigger the VFs to reset, therefore no operation is required when the VF pci_driver is suspending or resuming. Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit bb1890d5f97425766a865d75f99fd556d5dc6893 Author: Jiaran Zhang Date: Thu Apr 8 11:40:04 2021 +0800 net: hns3: change flr_prepare/flr_done function names The flr_prepare/flr_done functions are not only used in the FLR scenario, but also used in the suspend/resume. Change the function names to prepare_for_reset/rebuild_for_reset, change the flr_prepare/flr_done to reset_prepare/reset_done in hnae3_ae_ops. Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit c69b67185ccd3a7d2ad9c25497fc3c4f5ef751dc Merge: 9ba7ffa6d8a3b f3318099658ed Author: David S. Miller Date: Thu Apr 8 13:18:49 2021 -0700 Merge branch 'ionic-hwtstamp-tweaks' Shannon Nelson says: ==================== ionic: hwstamp tweaks A few little changes after review comments and additional internal testing. ==================== Signed-off-by: David S. Miller commit f3318099658edcc899b95cdf54257edd428e7fbb Author: Shannon Nelson Date: Wed Apr 7 16:20:01 2021 -0700 ionic: extend ts_config set locking Make sure the configuration is locked before operating on it for the replay. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 829600ce5e4e985a8a49c445c5e5c72ca613ce41 Author: Shannon Nelson Date: Wed Apr 7 16:20:00 2021 -0700 ionic: add ts_config replay Split the call into ionic_lif_hwstamp_set() to have two separate interfaces, one from the ioctl() for changing the configuration and one for replaying the current configuration after a FW RESET. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 99b5bea04f0f0dc9e6278536a269e1f4795b73e1 Author: Shannon Nelson Date: Wed Apr 7 16:19:59 2021 -0700 ionic: ignore EBUSY on queue start When starting the queues in the link-check, don't go into the BROKEN state if the return was EBUSY. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 51117874554d7883c9b8051d361cb6a5c847c31a Author: Shannon Nelson Date: Wed Apr 7 16:19:58 2021 -0700 ionic: re-start ptp after queues up When returning after a firmware reset, re-start the PTP after we've restarted the general queues. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit bd7856bcd498498a91b275904b9aa43882cf85a0 Author: Shannon Nelson Date: Wed Apr 7 16:19:57 2021 -0700 ionic: add SKBTX_IN_PROGRESS Set the SKBTX_IN_PROGRESS when offloading the Tx timestamp. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit e2ce148e948e7cf6267351ea407ac45a6b561a54 Author: Shannon Nelson Date: Wed Apr 7 16:19:56 2021 -0700 ionic: check for valid tx_mode on SKBTX_HW_TSTAMP xmit Make sure the device is in a Tx offload mode before calling the hwstamp offload xmit. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit e1edcc966ae8579b76db720a94084866bd7dcd6c Author: Shannon Nelson Date: Wed Apr 7 16:19:55 2021 -0700 ionic: remove unnecessary compat ifdef We don't need to look for HAVE_HWSTAMP_TX_ONESTEP_P2P in the upstream kernel. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 33c252e1ba8b9ba00831bc520f7017c816429179 Author: Shannon Nelson Date: Wed Apr 7 16:19:54 2021 -0700 ionic: fix up a couple of code style nits Clean up variable declarations. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 9ba7ffa6d8a3bccb2ac8d87bf0f0bd6dd24db391 Merge: 3cd52c1e32fe7 9187b6cfe7fcc Author: David S. Miller Date: Thu Apr 8 13:15:34 2021 -0700 Merge branch 'marvell10g-updates' Marek Behún says: ==================== net: phy: marvell10g updates Here are some updates for marvell10g PHY driver. I am still working on some more changes for this driver, but I would like to have at least something reviewed / applied. Changes since v3: - added Andrew's Reviewed-by tags - removed patches adding variadic-macro library and bitmap initialization macro - it causes warning that we are not currently able to fix easily. Instead the supported_interfaces bitmap is now initialized via a chip specific method - added explanation of mactype initialization to commit message of patch 07/16 - fixed repeated word in commit message of second to last patch Changes since v2: - code refactored to use an additional structure mv3310_chip describing mv3310 specific properties / operations for PHYs supported by this driver - added separate phy_driver structures for 88X3340 and 88E2111 - removed 88E2180 specific code (dual-port and quad-port SXGMII modes are ignored for now) Changes since v1: - added various MACTYPEs support also for 88E21XX - differentiate between specific models with same PHY_ID - better check for compatible interface - print exact model ==================== Signed-off-by: David S. Miller commit 9187b6cfe7fcc6f2f5330e82768652bc4931ffb3 Author: Marek Behún Date: Wed Apr 7 22:22:54 2021 +0200 MAINTAINERS: add myself as maintainer of marvell10g driver Add myself as maintainer of the marvell10g ethernet PHY driver, in addition to Russell King. Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit c7dce05e63ebc238ad941796d2ca0a90b5902ad3 Author: Marek Behún Date: Wed Apr 7 22:22:53 2021 +0200 net: phy: marvell10g: change module description This module supports not only Alaska X, but also Alaska M. Change module description appropriately. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0fca947cbb27ddb28155996e29385b4ddf5d94f3 Author: Marek Behún Date: Wed Apr 7 22:22:52 2021 +0200 net: phy: marvell10g: differentiate 88E2110 vs 88E2111 88E2111 is a variant of 88E2110 which does not support 5 gigabit speeds. Differentiate these variants via the match_phy_device() method, since they have the same PHY ID. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 53f111cbfac6f2000c604994ddf01d3299d7de6b Author: Marek Behún Date: Wed Apr 7 22:22:51 2021 +0200 net: phy: add constants for 2.5G and 5G speed in PCS speed register Add constants for 2.5G and 5G speed in PCS speed register into mdio.h. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c89f27d4d239d263a8b5abc597a963bb6b15a661 Author: Marek Behún Date: Wed Apr 7 22:22:50 2021 +0200 net: phy: marvell10g: fix driver name for mv88e2110 The driver name "mv88x2110" should be instead "mv88e2110". Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9885d016ffa9465f91498e7a70c413c30446ad49 Author: Marek Behún Date: Wed Apr 7 22:22:49 2021 +0200 net: phy: marvell10g: add separate structure for 88X3340 The 88X3340 contains 4 cores similar to 88X3310, but there is a difference: it does not support xaui host mode. Instead the corresponding MACTYPE means rxaui / 5gbase-r / 2500base-x / sgmii without AN Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ccbf2891de9813fc35b6f35cee97731532e9d386 Author: Marek Behún Date: Wed Apr 7 22:22:48 2021 +0200 net: phy: marvell10g: support other MACTYPEs Currently the only "changing" MACTYPE we support is when the PHY changes between 10gbase-r / 5gbase-r / 2500base-x / sgmii Add support for usxgmii xaui / 5gbase-r / 2500base-x / sgmii rxaui / 5gbase-r / 2500base-x / sgmii and also 5gbase-r / 2500base-x / sgmii for 88E2110. Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit 884d9a6758a1a704367e7bb3d3cc814a6fe8f20c Author: Marek Behún Date: Wed Apr 7 22:22:47 2021 +0200 net: phy: marvell10g: store temperature read method in chip strucutre Now that we have a chip structure, we can store the temperature reading method in this structure (OOP style). Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 261a74c64bb67fbd9795e4ece94c2579f3c866f2 Author: Marek Behún Date: Wed Apr 7 22:22:46 2021 +0200 net: phy: marvell10g: check for correct supported interface mode The 88E2110 does not support xaui nor rxaui modes. Check for correct interface mode for different chips. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 97bbe3bd6922e7ccf8ecd308640a7da55ae3c2f9 Author: Marek Behún Date: Wed Apr 7 22:22:45 2021 +0200 net: phy: marvell10g: support all rate matching modes Add support for all rate matching modes for 88X3310 (currently only 10gbase-r is supported, but xaui and rxaui can also be used). Add support for rate matching for 88E2110 (on 88E2110 the MACTYPE register is at a different place). Currently rate matching mode is selected by strapping pins (by setting the MACTYPE register). There is work in progress to enable this driver to deduce the best MACTYPE from the knowledge of which interface modes are supported by the host, but this work is not finished yet. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9ab0fbd0ffcebe0ba95f7f05af49bea273ffd4db Author: Marek Behún Date: Wed Apr 7 22:22:44 2021 +0200 net: phy: marvell10g: add MACTYPE definitions for 88E21xx Add all MACTYPE definitions for 88E2110, 88E2180, 88E2111 and 88E2181. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f8ee45fcbc5a94177d031b22f4e5a47d45874037 Author: Marek Behún Date: Wed Apr 7 22:22:43 2021 +0200 net: phy: marvell10g: add all MACTYPE definitions for 88X33x0 Add all MACTYPE definitions for 88X3310, 88X3310P, 88X3340 and 88X3340P. In order to have consistent naming, rename MV_V2_33X0_PORT_CTRL_MACTYPE_RATE_MATCH to MV_V2_33X0_PORT_CTRL_MACTYPE_10GBASER_RATE_MATCH. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 9893f31690162bf90ef7f85d9dda80731696d586 Author: Marek Behún Date: Wed Apr 7 22:22:42 2021 +0200 net: phy: marvell10g: indicate 88X33x0 only port control registers Rename port control registers to indicate that they are valid only for 88X33x0, not for 88E21x0. Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit 0d3755428d6990637cf6dc45f007980a1dce28d1 Author: Marek Behún Date: Wed Apr 7 22:22:41 2021 +0200 net: phy: marvell10g: allow 5gbase-r and usxgmii These modes are also supported by these PHYs. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 283828142fad71a6bab4c1a6b0ba28c323fd36a0 Author: Marek Behún Date: Wed Apr 7 22:22:40 2021 +0200 net: phy: marvell10g: fix typo This space should be a tab instead. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit bd79d9aa6145897c0180964e8e68fcf9ba6b2206 Author: Marek Behún Date: Wed Apr 7 22:22:39 2021 +0200 net: phy: marvell10g: rename register The MV_V2_PORT_MAC_TYPE_* is part of the CTRL register. Rename to MV_V2_PORT_CTRL_MACTYPE_*. Signed-off-by: Marek Behún Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit d8fcfbf38fe168d55a1e73095f831a60e3e95b91 Author: Cristian Ciocaltea Date: Thu Apr 8 11:52:32 2021 +0530 ARM: dts: owl-s500-roseapplepi: Add ATC2603C PMIC Add device tree node for ATC2603C PMIC and remove the 'fixed-3.1V' dummy regulator used for the uSD supply. Additionally, add 'SYSPWR' fixed regulator and provide cpu0 supply. Signed-off-by: Cristian Ciocaltea Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/2e0a2931ae3757f016948e7c78e8e54afa325ae0.1615538629.git.cristian.ciocaltea@gmail.com Link: https://lore.kernel.org/r/20210408062232.3575-1-mani@kernel.org' Signed-off-by: Arnd Bergmann commit e3e1276295a4c5eddc31dd297e8f6af275ca9c4f Merge: e2b064fec8e49 c6dfc019c239c Author: Arnd Bergmann Date: Thu Apr 8 22:08:32 2021 +0200 Merge tag 'mvebu-dt-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt for 5.13 (part 1) Add support for ATL-x530 Board (Armada 38x based) * tag 'mvebu-dt-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: ARM: dts: mvebu: Add device tree for ATL-x530 Board Link: https://lore.kernel.org/r/87v98xbzir.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 2de5bb995656312ac1464ee29294140e9aacd642 Merge: d515102f56a02 f6a7ea04ad204 Author: Arnd Bergmann Date: Thu Apr 8 22:05:50 2021 +0200 Merge tag 'omap-for-v5.13/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/defconfig Defconfig changes for omaps for v5.13 Update defconfig to have nefilter available as loadable modules to make the defconfig more usable for networked devices. And we now select SIMPLE_PM_BUS so it can be dropped. And some devices use EEPROM_AT25 so let's add it as a loadable module. * tag 'omap-for-v5.13/defconfig-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: omap2plus_defconfig: Add AT25 EEPROM module ARM: omap2plus_defconfig: Enable Netfilter components as modules ARM: omap2plus_defconfig: Update for dropped simple-pm-bus Link: https://lore.kernel.org/r/pull-1617703816-65652@atomide.com-3 Signed-off-by: Arnd Bergmann commit d515102f56a02b68c5cc840880b45730736df73d Merge: 630bc9784b637 1a0252abb6ff8 Author: Arnd Bergmann Date: Thu Apr 8 22:04:21 2021 +0200 Merge tag 'qcom-arm64-defconfig-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/defconfig Qualcomm ARM64 defconfig udpate for 5.13 This enables the SM8350 TLMM and GCC drivers, needed to boot the platform. * tag 'qcom-arm64-defconfig-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: arm64: defconfig: Enable Qualcomm SM8350 TLMM and GCC Link: https://lore.kernel.org/r/20210404164841.712845-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit a0c97a6bd63019707f16d36812a5aa2fce3fe29f Merge: f47e8e14373a7 6031008780efa Author: Arnd Bergmann Date: Thu Apr 8 22:02:11 2021 +0200 Merge tag 'samsung-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc Samsung mach/soc changes for v5.13 1. Update Krzysztof Kozlowski's email address in Maintainers. 2. Replace deprecated pwm_request() with pwm_get() in S3C24xx. 3. Correct kerneldoc. * tag 'samsung-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos: correct kernel doc in platsmp ARM: s3c: Use pwm_get() in favour of pwm_request() in RX1950 MAINTAINERS: use Krzysztof Kozlowski's Canonical address Link: https://lore.kernel.org/r/20210407065828.7213-3-krzysztof.kozlowski@canonical.com Signed-off-by: Arnd Bergmann commit f47e8e14373a731ab4fbd08615b2694ce1fc5142 Merge: d74b25572a4f5 206fa766ca215 Author: Arnd Bergmann Date: Thu Apr 8 21:56:11 2021 +0200 Merge tag 'omap-for-v5.13/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc SoC changes for omaps for v5.13 Minor non-urgent fixes for issues found by robots and few typo fixes: - Use DEFINE_DEBUGFS_ATTRIBUTE - Add missing of_node_put() - Use true and false for bool variable - Use DEFINE_SPINLOCK - Fix incorrect kerneldoc usage * tag 'omap-for-v5.13/soc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP1: fix incorrect kernel-doc comment syntax in file ARM: OMAP2+: fix incorrect kernel-doc comment syntax in file ARM: OMAP2+: Use DEFINE_SPINLOCK() for spinlock ARM: OMAP2+: use true and false for bool variable ARM: OMAP2+: add missing call to of_node_put() ARM: OMAP2+: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Link: https://lore.kernel.org/r/pull-1617703816-65652@atomide.com Signed-off-by: Arnd Bergmann commit d74b25572a4f567b1a200a68dc0d9a9ec9d15390 Merge: 6f35f62958ea3 c1ce9d8081a9f Author: Arnd Bergmann Date: Thu Apr 8 21:54:57 2021 +0200 Merge tag 'hisi-armv7soc-for-5.13' of git://github.com/hisilicon/linux-hisi into arm/soc HiSilicon ARMv7 SoC updates for v5.13 - Correct the HiSilicon copyright * tag 'hisi-armv7soc-for-5.13' of git://github.com/hisilicon/linux-hisi: ARM: hisi: use the correct HiSilicon copyright Link: https://lore.kernel.org/r/eba8b55e-0969-8ca2-eca3-7c471cb0ff6f@hisilicon.com Signed-off-by: Arnd Bergmann commit 1bb2fd3880d479a7a1bf833baee731ae69f09060 Merge: 5b8c86b92c6ea 7d2d16ccf15d8 Author: Arnd Bergmann Date: Thu Apr 8 21:48:28 2021 +0200 Merge tag 'm1-soc-bringup-v5' of https://github.com/AsahiLinux/linux into arm/apple-m1 Apple M1 SoC platform bring-up This series brings up initial support for the Apple M1 SoC, used in the 2020 Mac Mini, MacBook Pro, and MacBook Air models. The following features are supported in this initial port: - UART (samsung-style) with earlycon support - Interrupts, including affinity and IPIs (Apple Interrupt Controller) - SMP (through standard spin-table support) - simplefb-based framebuffer - Devicetree for the Mac Mini (should work for the others too at this stage) == Merge notes == This tag is based on v5.12-rc3 and includes the following two dependencies merged in: * Tip of arm64/for-next/fiq: 3889ba70102e This is a hard (build) dependency that adds support for FIQ interrupts, which is required for this SoC and the included AIC irqchip driver. It is already merged in the arm64 tree. * From tty/tty-next: 71b25f4df984 This commit includes the Samsung UART changes that have already been merged into the tty tree. It is nominally a soft dependency, but if this series is merged first it would trigger devicetree validation failures as the DT included in it depends on bindings introduced in the tty tree. There was a merge conflict here. It has been resolved the same way gregkh resolved it in a later tty merge, and both tty-next and torvalds/master merge cleanly with this series at this time. This series additionally depends on the nVHE changes in [1] to boot, but we are letting those get merged through arm64. [1] https://lore.kernel.org/linux-arm-kernel/20210408131010.1109027-1-maz@kernel.org/T/#u == Testing notes == This has been tested on an Apple M1 Mac Mini booting to a framebuffer and serial console, with SMP and KASLR, with an arm64 defconfig (+ CONFIG_FB_SIMPLE for the fb). In addition, the AIC driver now supports running in EL1, tested in UP mode only. == About the hardware == These machines officially support booting unsigned/user-provided XNU-like kernels, with a very different boot protocol and devicetree format. We are developing an initial bootloader, m1n1 [1], to take care of as many hardware peculiarities as possible and present a standard Linux arm64 boot protocol and device tree. In the future, I expect that production setups will add U-Boot and perhaps GRUB into the boot chain, to make the boot process similar to other ARM64 platforms. The machines expose their debug UART over USB Type C, triggered with vendor-specific USB-PD commands. Currently, the easiest way to get a serial console on these machines is to use a second M1 box and a simple USB C cable [2]. You can also build a DIY interface using an Arduino, a FUSB302 chip or board, and a 1.2V UART-TTL adapter [3]. In the coming weeks we will be designing an open hardware project to provide serial/debug connectivity to these machines (and, hopefully, also support other UART-over-Type C setups from other vendors). Please contact me privately if you are interested in getting an early prototype version of one of these devices. We also have WIP/not merged yet support for loading kernels and interacting via dwc3 usb-gadget, which works with a standard C-C or C-A cable and any Linux host. A quickstart guide to booting Linux kernels on these machines is available at [4], and we are documenting the hardware at [5]. [1] https://github.com/AsahiLinux/m1n1/ [2] https://github.com/AsahiLinux/macvdmtool/ [3] https://github.com/AsahiLinux/vdmtool/ [4] https://github.com/AsahiLinux/docs/wiki/Developer-Quickstart [5] https://github.com/AsahiLinux/docs/wiki == Project Blurb == Asahi Linux is an open community project dedicated to developing and maintaining mainline support for Apple Silicon on Linux. Feel free to drop by #asahi and #asahi-dev on freenode to chat with us, or check our website for more information on the project: https://asahilinux.org/ Signed-off-by: Hector Martin * tag 'm1-soc-bringup-v5' of https://github.com/AsahiLinux/linux: arm64: apple: Add initial Apple Mac mini (M1, 2020) devicetree dt-bindings: display: Add apple,simple-framebuffer arm64: Kconfig: Introduce CONFIG_ARCH_APPLE irqchip/apple-aic: Add support for the Apple Interrupt Controller dt-bindings: interrupt-controller: Add DT bindings for apple-aic arm64: Move ICH_ sysreg bits from arm-gic-v3.h to sysreg.h of/address: Add infrastructure to declare MMIO as non-posted asm-generic/io.h: implement pci_remap_cfgspace using ioremap_np arm64: Implement ioremap_np() to map MMIO as nGnRnE docs: driver-api: device-io: Document ioremap() variants & access funcs docs: driver-api: device-io: Document I/O access functions asm-generic/io.h: Add a non-posted variant of ioremap() arm64: arch_timer: Implement support for interrupt-names dt-bindings: timer: arm,arch_timer: Add interrupt-names support arm64: cputype: Add CPU implementor & types for the Apple M1 cores dt-bindings: arm: cpus: Add apple,firestorm & icestorm compatibles dt-bindings: arm: apple: Add bindings for Apple ARM platforms dt-bindings: vendor-prefixes: Add apple prefix Link: https://lore.kernel.org/r/bdb18e9f-fcd7-1e31-2224-19c0e5090706@marcan.st Signed-off-by: Arnd Bergmann commit 5b8c86b92c6ea4f3c8e999d4a8915c54f729a817 Merge: 1e28eed17697b 847bea3d08af9 Author: Arnd Bergmann Date: Thu Apr 8 21:46:58 2021 +0200 Merge branch 'apple/m1-dependency' into arm/apple-m1 Pull in two dependency branches from the tty and arm64 trees to make it possible to build all the remaining patches for the Apple M1 series added next. * apple/m1-dependency: (61 commits) arm64: irq: allow FIQs to be handled arm64: Always keep DAIF.[IF] in sync arm64: entry: factor irq triage logic into macros arm64: irq: rework root IRQ handler registration arm64: don't use GENERIC_IRQ_MULTI_HANDLER tty: serial: samsung_tty: Add earlycon support for Apple UARTs tty: serial: samsung_tty: Add support for Apple UARTs dt-bindings: serial: samsung: Add apple,s5l-uart compatible tty: serial: samsung_tty: Use devm_ioremap_resource tty: serial: samsung_tty: IRQ rework tty: serial: samsung_tty: Add s3c24xx_port_type tty: serial: samsung_tty: Separate S3C64XX ops structure tty: serial: samsung_tty: Add ucon_mask parameter ... Signed-off-by: Arnd Bergmann commit 40c7fd3fdfba97a18724a0b96d132335fd419e98 Author: Peter Zijlstra Date: Thu Apr 8 11:46:12 2021 +0200 block: Fix sys_ioprio_set(.which=IOPRIO_WHO_PGRP) task iteration do_each_pid_thread() { } while_each_pid_thread() is a double loop and thus break doesn't work as expected. Also, it should be used under tasklist_lock because otherwise we can race against change_pid() for PGID/SID. Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/YG7Q5C4Rb5dx5GFx@hirez.programming.kicks-ass.net Signed-off-by: Jens Axboe commit 69455df04e12334a51b8e80569cb3dfe4de57373 Author: Lang Cheng Date: Fri Apr 2 17:07:34 2021 +0800 RDMA/hns: Prevent le32 from being implicitly converted to u32 Replace BUILD_BUG_ON_ZERO() with BUILD_BUG_ON() to avoid sparse complaining "restricted __le32 degrades to integer". Link: https://lore.kernel.org/r/1617354454-47840-10-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 782832f25404b03de1aa745fe9c26d373dc1198a Author: Yixing Liu Date: Fri Apr 2 17:07:33 2021 +0800 RDMA/hns: Simplify the function config_eqc() Use "hr_reg_write" replace "roce_set_filed". Link: https://lore.kernel.org/r/1617354454-47840-9-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 495c24808ce71429d6c746390e5798896fc4ad88 Author: Wenpeng Liang Date: Fri Apr 2 17:07:32 2021 +0800 RDMA/hns: Add XRC subtype in QPC and XRC type in SRQC A field to distuiguish basic SRQ from XRC SRQ in SRQC and a field in QPC to determine whether a QP is XRC TGT QP or XRC INI QP are missing. Fixes: 32548870d438 ("RDMA/hns: Add support for XRC on HIP09") Link: https://lore.kernel.org/r/1617354454-47840-8-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 537bc924f367e35a351cbddbc502995cf5bd18c8 Author: Wenpeng Liang Date: Fri Apr 2 17:07:31 2021 +0800 RDMA/hns: Remove unsupported QP types The hns ROCEE does not support UC QP currently. Link: https://lore.kernel.org/r/1617354454-47840-7-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 7bd5d90d8fc652148e7ce71b5543a7f6069d1e5d Author: Yangyang Li Date: Fri Apr 2 17:07:30 2021 +0800 RDMA/hns: Delete unused members in the structure hns_roce_hw Some structure members in hns_roce_hw have never been used and need to be deleted. Fixes: 9a4435375cd1 ("IB/hns: Add driver files for hns RoCE driver") Fixes: b156269d88e4 ("RDMA/hns: Add modify CQ support for hip08") Fixes: c7bcb13442e1 ("RDMA/hns: Add SRQ support for hip08 kernel mode") Link: https://lore.kernel.org/r/1617354454-47840-6-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 2371efab9794bdf845b03473858a90d65035e331 Author: Wenpeng Liang Date: Fri Apr 2 17:07:29 2021 +0800 RDMA/hns: Delete redundant abnormal interrupt status The hardware supports only two types of abnormal interrupts. Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08") Link: https://lore.kernel.org/r/1617354454-47840-5-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 714a597baab099e728307768e3b5c3b82d7b2ce3 Author: Yangyang Li Date: Fri Apr 2 17:07:28 2021 +0800 RDMA/hns: Delete redundant condition judgment related to eq The register value related to the eq interrupt depends only on enable_flag, so the redundant condition judgment is deleted. Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08") Link: https://lore.kernel.org/r/1617354454-47840-4-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 9eab614338cdfe08db343954454fa5191d082a11 Author: Weihang Li Date: Fri Apr 2 17:07:27 2021 +0800 RDMA/hns: Fix missing assignment of max_inline_data When querying QP, the ULPs should be informed of the max length of inline data supported by the hardware. Fixes: 30b707886aeb ("RDMA/hns: Support inline data in extented sge space for RC") Link: https://lore.kernel.org/r/1617354454-47840-3-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 24f3f1cd515447207c339f8981d8a709bd949011 Author: Weihang Li Date: Fri Apr 2 17:07:26 2021 +0800 RDMA/hns: Avoid enabling RQ inline on UD RQ inline is not supported on UD/GSI QP, it should be disabled in QPC. Link: https://lore.kernel.org/r/1617354454-47840-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 8d78e7b478d5d7e3dc71eabcb4848c14d431f601 Author: Wenpeng Liang Date: Thu Apr 1 15:32:21 2021 +0800 RDMA/hns: Modify prints for mailbox and command queue Use ratelimited print in mbox and cmq. And print mailbox operation if mailbox fails because it's useful information for the user. Link: https://lore.kernel.org/r/1617262341-37571-4-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 0835cf58393c3c161647ff8b5a3b3298955404a2 Author: Lang Cheng Date: Thu Apr 1 15:32:20 2021 +0800 RDMA/hns: Support more return types of command queue Add error code definition according to the return code from firmware to help find out more detailed reasons why a command fails to be sent. Link: https://lore.kernel.org/r/1617262341-37571-3-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit a389d016c03012cc39e6655d4f5b3e06e3161445 Author: Lang Cheng Date: Thu Apr 1 15:32:19 2021 +0800 RDMA/hns: Enable all CMDQ context Fix error of cmd's context number calculation algorithm to enable all of 32 cmd entries and support 32 concurrent accesses. Link: https://lore.kernel.org/r/1617262341-37571-2-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ea492251894073cbb366c9fcd227f62cbaa7ef4b Author: Bob Pearson Date: Thu Apr 1 19:10:17 2021 -0500 RDMA/rxe: Fix missing acks from responder All responder errors from request packets that do not consume a receive WQE fail to generate acks for RC QPs. This patch corrects this behavior by making the flow follow the same path as request packets that do consume a WQE after the completion. Link: https://lore.kernel.org/r/20210402001016.3210-1-rpearson@hpe.com Link: https://lore.kernel.org/linux-rdma/1a7286ac-bcea-40fb-2267-480134dd301b@gmail.com/ Signed-off-by: Bob Pearson Signed-off-by: Jason Gunthorpe commit 71f4dd34419f46435da717c72e93e9b03ff41a3f Merge: 31c6ae47620af 22141d5f41189 Author: Rafael J. Wysocki Date: Thu Apr 8 20:05:49 2021 +0200 Merge back earlier cpuidle updates for v5.13. commit 31c6ae47620af0eb5657b5448559a59339794ecc Merge: e49d033bddf5b 498ba2a8a2756 Author: Rafael J. Wysocki Date: Thu Apr 8 20:04:41 2021 +0200 Merge tag 'cpuidle-v5.13-rc1' of https://git.linaro.org/people/daniel.lezcano/linux Pull ARM cpuidle updates for v5.13 from Daniel Lezcano: "- Fix the C7 state on the tegra114 by setting the L2-no-flush flag unconditionally (Dmitry Osipenko) - Remove the do_idle firmware call as it is not supported by the ATF on tegra SoC (Dmitry Osipenko) - Add a missing dependency on CONFIG_MMU to prevent linkage error (He Ying)" * tag 'cpuidle-v5.13-rc1' of https://git.linaro.org/people/daniel.lezcano/linux: cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration cpuidle: tegra: Remove do_idle firmware call cpuidle: tegra: Fix C7 idling state on Tegra114 commit d08a745729646f407277e904b02991458f20d261 Author: Angela Czubak Date: Thu Apr 8 12:37:59 2021 +0200 resource: Prevent irqresource_disabled() from erasing flags Some Chromebooks use hard-coded interrupts in their ACPI tables. This is an excerpt as dumped on Relm: ... Name (_HID, "ELAN0001") // _HID: Hardware ID Name (_DDN, "Elan Touchscreen ") // _DDN: DOS Device Name Name (_UID, 0x05) // _UID: Unique ID Name (ISTP, Zero) Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Name (BUF0, ResourceTemplate () { I2cSerialBusV2 (0x0010, ControllerInitiated, 0x00061A80, AddressingMode7Bit, "\\_SB.I2C1", 0x00, ResourceConsumer, , Exclusive, ) Interrupt (ResourceConsumer, Edge, ActiveLow, Exclusive, ,, ) { 0x000000B8, } }) Return (BUF0) /* \_SB_.I2C1.ETSA._CRS.BUF0 */ } ... This interrupt is hard-coded to 0xB8 = 184 which is too high to be mapped to IO-APIC, so no triggering information is propagated as acpi_register_gsi() fails and irqresource_disabled() is issued, which leads to erasing triggering and polarity information. Do not overwrite flags as it leads to erasing triggering and polarity information which might be useful in case of hard-coded interrupts. This way the information can be read later on even though mapping to APIC domain failed. Signed-off-by: Angela Czubak [ rjw: Changelog rearrangement ] Signed-off-by: Rafael J. Wysocki commit 2bc6262c6117dd18106d5aa50d53e945b5d99c51 Author: Nathan Chancellor Date: Wed Apr 7 14:30:48 2021 -0700 ACPI: CPPC: Replace cppc_attr with kobj_attribute All of the CPPC sysfs show functions are called via indirect call in kobj_attr_show(), where they should be of type ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, char *buf); because that is the type of the ->show() member in 'struct kobj_attribute' but they are actually of type ssize_t (*show)(struct kobject *kobj, struct attribute *attr, char *buf); because of the ->show() member in 'struct cppc_attr', resulting in a Control Flow Integrity violation [1]. $ cat /sys/devices/system/cpu/cpu0/acpi_cppc/highest_perf 3400 $ dmesg | grep "CFI failure" [ 175.970559] CFI failure (target: show_highest_perf+0x0/0x8): As far as I can tell, the only difference between 'struct cppc_attr' and 'struct kobj_attribute' aside from the type of the attr parameter is the type of the count parameter in the ->store() member (ssize_t vs. size_t), which does not actually matter because all of these nodes are read-only. Eliminate 'struct cppc_attr' in favor of 'struct kobj_attribute' to fix the violation. [1]: https://lore.kernel.org/r/20210401233216.2540591-1-samitolvanen@google.com/ Fixes: 158c998ea44b ("ACPI / CPPC: add sysfs support to compute delivered performance") Link: https://github.com/ClangBuiltLinux/linux/issues/1343 Signed-off-by: Nathan Chancellor Signed-off-by: Rafael J. Wysocki commit c830dbcfccbf70be94f15dbb4781be5ffb210d98 Author: Rafael J. Wysocki Date: Wed Apr 7 16:33:38 2021 +0200 ACPI: scan: Call acpi_get_object_info() from acpi_set_pnp_ids() Notice that it is not necessary to call acpi_get_object_info() from acpi_add_single_object() in order to pass the pointer returned by it to acpi_init_device_object() and from there to acpi_set_pnp_ids(). It is more straightforward to call acpi_get_object_info() from acpi_set_pnp_ids() and avoid unnecessary pointer passing, so change the code accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit f5d9ab1d803456f5215f853e9286659933b59afe Author: Rafael J. Wysocki Date: Wed Apr 7 16:32:43 2021 +0200 ACPI: scan: Drop sta argument from acpi_init_device_object() Use the observation that the initial status check for ACPI_BUS_TYPE_PROCESSOR objects can be carried out in the same way as for ACPI_BUS_TYPE_DEVICE objects and it is not necessary to fail acpi_add_single_object() if acpi_bus_get_status_handle() returns an error for a processor (its status can be set to 0 instead) to simplify acpi_add_single_object(). Accordingly, drop the "sta" argument from acpi_init_device_object() as it can always set the initial status to ACPI_STA_DEFAULT and let its caller correct that later on. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit f926e94338158a5f84cbe4b0c7a9438c303762f8 Author: Rafael J. Wysocki Date: Wed Apr 7 16:31:54 2021 +0200 ACPI: scan: Drop sta argument from acpi_add_single_object() Move the initial status check for ACPI_BUS_TYPE_PROCESSOR objects into acpi_add_single_object() so it is not necessary to pass the "sta" argument to it, get rid of that argument from there and update the callers of that function accordingly. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit 02056a4f9209b7e9f65fab193069cbff36ec92b5 Author: Rafael J. Wysocki Date: Wed Apr 7 16:30:56 2021 +0200 ACPI: scan: Rearrange checks in acpi_bus_check_add() Rearrange the checks in acpi_bus_check_add() to avoid checking the "type" twice and take "check_dep" into account only for ACPI_TYPE_DEVICE objects. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit e6c1067dc1becf6c00408f59e0efa28b8d206371 Author: Rafael J. Wysocki Date: Wed Apr 7 16:30:01 2021 +0200 ACPI: scan: Fold acpi_bus_type_and_status() into its caller There is only one caller of acpi_bus_type_and_status() which is acpi_bus_check_add(), so fold the former into the latter and use the observation that the initial status of the device is ACPI_STA_DEFAULT in all cases except for ACPI_BUS_TYPE_PROCESSOR to simplify the code. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hans de Goede commit 498ba2a8a2756694b6f3888857426dbc8a5e6b6c Author: He Ying Date: Tue Apr 6 08:33:28 2021 -0400 cpuidle: Fix ARM_QCOM_SPM_CPUIDLE configuration When CONFIG_ARM_QCOM_SPM_CPUIDLE is y and CONFIG_MMU is not set, compiling errors are encountered as follows: drivers/cpuidle/cpuidle-qcom-spm.o: In function `spm_dev_probe': cpuidle-qcom-spm.c:(.text+0x140): undefined reference to `cpu_resume_arm' cpuidle-qcom-spm.c:(.text+0x148): undefined reference to `cpu_resume_arm' Note that cpu_resume_arm is defined when MMU is set. So, add dependency on MMU in ARM_QCOM_SPM_CPUIDLE configuration. Fixes: a871be6b8eee ("cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver") Reported-by: Hulk Robot Signed-off-by: He Ying Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210406123328.92904-1-heying24@huawei.com commit 2dabed47778958cca7880544c20e55984bf43d33 Author: Dmitry Osipenko Date: Tue Mar 2 12:54:05 2021 +0300 cpuidle: tegra: Remove do_idle firmware call The do_idle firmware call is unused by all Tegra SoCs, hence remove it in order to keep driver's code clean. Tested-by: Anton Bambura # TF701 T114 Tested-by: Matt Merhar # Ouya T30 Tested-by: Peter Geis # Ouya T30 Signed-off-by: Dmitry Osipenko Reviewed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210302095405.28453-2-digetx@gmail.com commit 32c8c34d8132b5fe8497c2538597445a0d65c29d Author: Dmitry Osipenko Date: Tue Mar 2 12:54:04 2021 +0300 cpuidle: tegra: Fix C7 idling state on Tegra114 Trusted Foundation firmware doesn't implement the do_idle call and in this case suspending should fall back to the common suspend path. In order to fix this issue we will unconditionally set the NOFLUSH_L2 mode via firmware call, which is a NO-OP on Tegra30/124, and then proceed to the C7 idling, like it was done by the older Tegra114 cpuidle driver. Fixes: 14e086baca50 ("cpuidle: tegra: Squash Tegra114 driver into the common driver") Cc: stable@vger.kernel.org # 5.7+ Reported-by: Anton Bambura # TF701 T114 Tested-by: Anton Bambura # TF701 T114 Tested-by: Matt Merhar # Ouya T30 Tested-by: Peter Geis # Ouya T30 Signed-off-by: Dmitry Osipenko Reviewed-by: Daniel Lezcano Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210302095405.28453-1-digetx@gmail.com commit 81cc7e9947c0d54ba2b714899ca90f14f029cb0b Author: Hans de Goede Date: Tue Apr 6 23:16:53 2021 +0200 ACPI: video: Check LCD flag on ACPI-reduced-hardware devices Starting with Windows 8, Windows no longer uses the ACPI-video interface for backlight control by default. Instead backlight control is left up to the GPU drivers and these are typically directly accessing the GPU for this instead of going through ACPI. This means that the ACPI video interface is no longer being tested by many vendors, which leads to false-positive /sys/class/backlight entries on devices which don't have a backlight at all such as desktops or top-set boxes. These false-positives causes desktop environments to show a non functional brightness slider in various places. Checking the LCD flag greatly reduces the amount of false-positives, so commit 5928c281524f ("ACPI / video: Default lcd_only to true on Win8-ready and newer machines") enabled the checking of this flag by default on all win8 BIOS-es. But this let to regressions on some models, so the check was made stricter adding a DMI chassis-type check to only enable the LCD flag checking on desktop/server chassis. Unfortunately the chassis-type reported in the DMI strings is not always reliable. One class of devices where this is a problem is Intel Bay Trail-T based top-set boxes / mini PCs / HDMI sticks. These are based on reference designs which were targetets and the reference design BIOS code is often used without changing the chassis-type to something more appropriate. There are many, many Bay Trail-T based devices affected by this, so DMI quirking our way out of this is a bad idea. This patch takes a different approach, Bay Trail-T (unlike regular Bay Trail) is an ACPI-reduced-hw platform and ACPI-reduced-hw platforms generally don't have an embedded-controller and thus will use a native (GPU specific) backlight interface. This patch enables Checking the LCD flag by default on ACPI-reduced-hw platforms with a win8 BIOS independent of the reported chassis-type, fixing the false positive /sys/class/backlight entries on these devices. Note in hindsight I should have never added the DMI chassis-type check when the enabling of LCD flag checking on Windows 8 BIOS-es let to some regressions. Instead I should have added DMI quirks for the (presumably few) models where the LCD flag check let to issues. But I'm afraid that it is too late to change this now, changing this now will likely lead to a bunch of regressions. This patch was tested on a Mele PCG03 mini PC. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 8eb99e9a64a07ea08070591bdc2615526a103e62 Author: Hans de Goede Date: Wed Apr 7 19:58:20 2021 +0200 ACPI: utils: Add acpi_reduced_hardware() helper Add a getter for the acpi_gbl_reduced_hardware variable so that modules can check if they are running on an ACPI reduced-hw platform or not. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki commit 2d726d0db6ac479d91bf74490455badd34af6b1d Author: Marc Zyngier Date: Thu Apr 8 14:10:10 2021 +0100 arm64: Get rid of CONFIG_ARM64_VHE CONFIG_ARM64_VHE was introduced with ARMv8.1 (some 7 years ago), and has been enabled by default for almost all that time. Given that newer systems that are VHE capable are finally becoming available, and that some systems are even incapable of not running VHE, drop the configuration altogether. Anyone willing to stick to non-VHE on VHE hardware for obscure reasons should use the 'kvm-arm.mode=nvhe' command-line option. Suggested-by: Will Deacon Signed-off-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210408131010.1109027-4-maz@kernel.org Signed-off-by: Catalin Marinas commit 31a32b49b80f79cbb84a9c948c5609c6fc044443 Author: Marc Zyngier Date: Thu Apr 8 14:10:09 2021 +0100 arm64: Cope with CPUs stuck in VHE mode It seems that the CPUs part of the SoC known as Apple M1 have the terrible habit of being stuck with HCR_EL2.E2H==1, in violation of the architecture. Try and work around this deplorable state of affairs by detecting the stuck bit early and short-circuit the nVHE dance. Additional filtering code ensures that attempts at switching to nVHE from the command-line are also ignored. It is still unknown whether there are many more such nuggets to be found... Reported-by: Hector Martin Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210408131010.1109027-3-maz@kernel.org Signed-off-by: Catalin Marinas commit cac642c12a805ae7565a263b59fb94ad19e81952 Author: Marc Zyngier Date: Thu Apr 8 14:10:08 2021 +0100 arm64: cpufeature: Allow early filtering of feature override Some CPUs are broken enough that some overrides need to be rejected at the earliest opportunity. In some cases, that's right at cpu feature override time. Provide the necessary infrastructure to filter out overrides, and to report such filtered out overrides to the core cpufeature code. Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210408131010.1109027-2-maz@kernel.org Signed-off-by: Catalin Marinas commit dfc7927d4ee008c69c5b60f9076e2ad8980589bc Author: Wu XiangCheng Date: Mon Mar 29 23:15:53 2021 +0800 doc/zh_CN: Clean zh_CN translation maintainer Remove Harry Wei and from MAINTAINERS Chinese Translation. According to git logs, Harry Wei (aka WeiWei Jia) * last submitted at 2012-05-07 commit a9e73211fb0f ("Fix a mistake sentence in the file 'Documentation/zh_CN/magic-number.txt'") * last Reviewed-by at 2016-02-16 commit 45c73ea7a785 ("Documentation: Chinese translation of arm64/silicon-errata.txt") * last Signed-off-by at 2019-03-13 (pick by Alex Shi) commit 95dcdb6e125f ("docs/zh_CN: rename magic-numbers as rst doc") According to mail list archives, Harry Wei * last replied at 2016-02-15 * last appeared at 2018-05-12 He/She did not maintain zh_CN translations for a long time. is a maillist for Linux group of Xi'an University of Posts and Telecommunications, not special for zh_CN translation work. Anyway, many thanks him/her and Xiyou for their contributions to the early Chinese translation work! Signed-off-by: Wu XiangCheng Link: https://lore.kernel.org/r/20210329151551.GA10901@mipc Signed-off-by: Jonathan Corbet commit 84de8154c516b821bd60493b90d4782c5a4905ab Author: Masanari Iida Date: Fri Apr 2 16:05:14 2021 +0900 tools: Fix a typo in kernel-chktaint This patch fixes a spelling typo in kernel-chktaint Signed-off-by: Masanari Iida Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210402070514.336376-1-standby24x7@gmail.com Signed-off-by: Jonathan Corbet commit 269dd42f477612a728637787812abcb8717c99d3 Author: Yanteng Si Date: Tue Apr 6 15:02:39 2021 +0800 docs/zh_CN: add riscv to zh_CN index All the files in the riscv directory have been translated into Chinese and it is time to add them to the zh_CN index. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210406070239.19910-9-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 2061761e4b576a480c58c32da8be806004b5a3bb Author: Yanteng Si Date: Tue Apr 6 15:02:38 2021 +0800 docs/zh_CN: add iio to zh_CN index All the files in the iio directory have been translated into Chinese and it is time to add them to the zh_CN index. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210406070239.19910-8-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 057e7eff6ba7a78b38e115fa9d3317404d54b182 Author: Yanteng Si Date: Tue Apr 6 15:02:37 2021 +0800 docs/zh_CN: add mips to zh_CN index All the files in the mips directory have been translated into Chinese and it is time to add them to the zh_CN index. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210406070239.19910-7-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit b8dc02995a39c86029be94f21b6fb1acc60a7684 Author: Yanteng Si Date: Tue Apr 6 15:02:36 2021 +0800 docs/zh_CN: add cpu-freq to zh_CN index All the files in the cpu-freq directory have been translated into Chinese and it is time to add them to the zh_CN index. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210406070239.19910-6-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 4d6687730dd587b49c3c2b8e3a89f7d52df0e0a3 Author: Yanteng Si Date: Tue Apr 6 15:02:35 2021 +0800 docs/zh_CN: add cpu-freq index.rst translation This patch translates Documention/cpu-freq/index.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210406070239.19910-5-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit ffd1f19d083432d708412c5252571bc69e16d499 Author: Yanteng Si Date: Tue Apr 6 15:02:34 2021 +0800 docs/zh_CN: add cpu-freq cpufreq-stats.rst translation This patch translates Documention/cpu-freq/cpufreq-stats.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210406070239.19910-4-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 8b6d5ae8a9968c0a3807587d33b5952cdf71de1b Author: Yanteng Si Date: Tue Apr 6 15:02:33 2021 +0800 docs/zh_CN: add cpu-freq cpu-drivers.rst translation This patch translates Documention/cpu-freq/cpu-drivers.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210406070239.19910-3-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit dde201b901bf40ffa792fd94c3873af5c5deb015 Author: Yanteng Si Date: Tue Apr 6 15:02:32 2021 +0800 docs/zh_CN: add cpu-freq core.rst translation This patch translates Documention/cpu-freq/core.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210406070239.19910-2-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 230800cd315cd5e2093e603cf7ee150b7591ce1a Author: Mark Brown Date: Thu Apr 1 19:09:41 2021 +0100 arm64: Require that system registers at all visible ELs be initialized Currently we require that software at a higher exception level initialise all registers at the exception level the kernel will be entered prior to starting the kernel in order to ensure that there is nothing uninitialised which could result in an UNKNOWN state while running the kernel. The expectation is that the software running at the highest exception levels will be tightly coupled to the system and can ensure that all available features are appropriately initialised and that the kernel can initialise anything else. There is a gap here in the case where new registers are added to lower exception levels that require initialisation but the kernel does not yet understand them. Extend the requirement to also include exception levels below the one where the kernel is entered to cover this. Suggested-by: Catalin Marinas Signed-off-by: Mark Brown Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20210401180942.35815-4-broonie@kernel.org Signed-off-by: Catalin Marinas commit 31c00d2aeaa2da89361f5b64a64ca831433be5fc Author: Mark Brown Date: Thu Apr 1 19:09:40 2021 +0100 arm64: Disable fine grained traps on boot The arm64 FEAT_FGT extension introduces a set of traps to EL2 for accesses to small sets of registers and instructions from EL1 and EL0. Currently Linux makes no use of this feature, ensure that it is not active at boot by disabling the traps during EL2 setup. Signed-off-by: Mark Brown Reviewed-by: Marc Zyngier Link: https://lore.kernel.org/r/20210401180942.35815-3-broonie@kernel.org Signed-off-by: Catalin Marinas commit 3e237387bb76cbbd254e82fb1e996e2f3af9e6a7 Author: Mark Brown Date: Thu Apr 1 19:09:39 2021 +0100 arm64: Document requirements for fine grained traps at boot The arm64 FEAT_FGT extension introduces a set of traps to EL2 for accesses to small sets of registers and instructions from EL1 and EL0, access to which is controlled by EL3. Require access to it so that it is available to us in future and so that we can ensure these traps are disabled during boot. Signed-off-by: Mark Brown Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20210401180942.35815-2-broonie@kernel.org Signed-off-by: Catalin Marinas commit e4b2897ae1a81cce79a8f5fcceda74c3f31c4b73 Author: Lu Jialin Date: Thu Apr 8 16:14:44 2021 +0800 PM: sleep: fix typos in comments Change "occured" to "occurred" in kernel/power/autosleep.c. Change "consiting" to "consisting" in kernel/power/snapshot.c. Change "avaiable" to "available" in kernel/power/swap.c. No functionality changed. Signed-off-by: Lu Jialin Signed-off-by: Rafael J. Wysocki commit d1ad0a7361227185c0a74307f7971a24e7448be0 Author: Stéphane Blondon Date: Tue Apr 6 14:31:50 2021 +0200 docs: Minor spelling fix in spi documentation Signed-off-by: Stéphane Blondon Link: https://lore.kernel.org/r/CAOy+up7EdTf4ouh5onVy_ZzXFWGBEP+P6CPqY-=E+1UFwCeq8w@mail.gmail.com Signed-off-by: Jonathan Corbet commit 7f32917642c7ea486c1bae5dfdebeeb56c35b29b Author: Chen Hui Date: Thu Apr 8 21:48:56 2021 +0800 clk: samsung: Remove redundant dev_err calls There is error message within devm_ioremap_resource already, so remove the dev_err calls to avoid redundant error messages. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Chen Hui Link: https://lore.kernel.org/linux-clk/20210408134856.207305-1-clare.chenhui@huawei.com Signed-off-by: Sylwester Nawrocki commit e9ff02264d75f4b84214f907b1cf30cea48c0d4f Merge: e49d033bddf5b 0a7dc8318c281 Author: Rafael J. Wysocki Date: Thu Apr 8 19:30:46 2021 +0200 Merge tag 'devfreq-next-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux Pull devfreq updates for v5.13 from Chanwoo Choi: "1. Update devfreq core - Register devfreq as a cooling device when adding devfreq device, basically if the flag of devfreq device is set as cooling device. - Add missing unlock opeation in devfreq_add_device - Use the next frequency as resume_freq instead of previous frequency when using opp-suspend property - Check whether .get_dev_status in struct devfreq_dev_profile is implemented or not by devfreq driver before calling .get_dev_status function. 2. Update devfreq drivers - Use dev_err_probe to simplify the error handling on rk3399_dmc.c - Remove unused .get_dev_status function on imx8m-ddrc.c because imx8m_ddrc_get_dev_status has not returend the any current status of the device. - Remove unneeded of_match_ptr() from imx-bus.c and imx8m-ddrc.ca - Add missing phandle informatioon and replace undefined variable with integer value for rk3399_dmc.txt devicetree binding document. 3. Fix minor issues - Fix the wrong set_freq path of userspace governor in drivers/devfreq/Kconfig. - Remove the invalid description from .get_target_freq in struct devfreq_dev_profile." * tag 'devfreq-next-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux: PM / devfreq: imx8m-ddrc: Remove unneeded of_match_ptr() PM / devfreq: imx-bus: Remove unneeded of_match_ptr() PM / devfreq: imx8m-ddrc: Remove imx8m_ddrc_get_dev_status PM / devfreq: Remove the invalid description for get_target_freq PM / devfreq: Check get_dev_status in devfreq_update_stats PM / devfreq: Fix the wrong set_freq path for userspace governor in Kconfig dt-bindings: devfreq: rk3399_dmc: Remove references of unexistant defines dt-bindings: devfreq: rk3399_dmc: Add rockchip,pmu phandle. PM / devfreq: rk3399_dmc: Simplify with dev_err_probe() PM / devfreq: Use more accurate returned new_freq as resume_freq PM / devfreq: Unlock mutex and free devfreq struct in error path PM / devfreq: Register devfreq as a cooling device on demand commit 60943bbdb42e966aa4d50d587913721b95208fef Author: Shaokun Zhang Date: Tue Apr 6 15:00:59 2021 +0800 cpufreq: Remove unused for_each_policy macro Macro 'for_each_policy' has become unused since commit f963735a3ca3 ("cpufreq: Create for_each_{in}active_policy()"), so remove it. Signed-off-by: Shaokun Zhang Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit da66658638c947cab0fb157289f03698453ff8d5 Author: Smita Koralahalli Date: Tue Apr 6 16:59:44 2021 -0500 perf vendor events amd: Add Zen3 events Add PMU events for AMD Zen3 processors as documented in the AMD Processor Programming Reference for Family 19h and Model 01h [1]. Below are the events which are new on Zen3: PMCx041 ls_mab_alloc.{all_allocations|hardware_prefetcher_allocations|load_store_allocations} PMCx043 ls_dmnd_fills_from_sys.ext_cache_local PMCx044 ls_any_fills_from_sys.{mem_io_remote|ext_cache_remote|mem_io_local|ext_cache_local|int_cache|lcl_l2} PMCx047 ls_misal_loads.{ma4k|ma64} PMCx059 ls_sw_pf_dc_fills.ext_cache_local PMCx05a ls_hw_pf_dc_fills.ext_cache_local PMCx05f ls_alloc_mab_count PMCx085 bp_l1_tlb_miss_l2_tlb_miss.coalesced_4k PMCx0ab de_dis_cops_from_decoder.disp_op_type.{any_integer_dispatch|any_fp_dispatch} PMCx0cc ex_ret_ind_brch_instr PMCx18e ic_tag_hit_miss.{all_instruction_cache_accesses|instruction_cache_miss|instruction_cache_hit} PMCx1c7 ex_ret_msprd_brnch_instr_dir_msmtch PMCx28f op_cache_hit_miss.{all_op_cache_accesses|op_cache_miss|op_cache_hit} Section 2.1.17.2 "Performance Measurement" of "PPR for AMD Family 19h, Model 01h, Revision B1 Processors - 55898 Rev 0.35 - Feb 5, 2021." lists new metrics. Add them. Preserve the events for Zen3 if they are measurable and non-zero as taken from Zen2 directory even if the PPR of Zen3 [1] omits them. Those events are the following: PMCx000 fpu_pipe_assignment.{total|total0|total1|total2|total3} PMCx004 fp_num_mov_elim_scal_op.{optimized|opt_potential|sse_mov_ops_elim|sse_mov_ops} PMCx02D ls_rdtsc PMCx040 ls_dc_accesses PMCx046 ls_tablewalker.{iside|ic_type1|ic_type0|dside|dc_type1|dc_type0} PMCx061 l2_request_g2.{group1|ls_rd_sized|ls_rd_sized_nc|ic_rd_sized|ic_rd_sized_nc|smc_inval|bus_lock_originator|bus_locks_responses} PMCx062 l2_latency.l2_cycles_waiting_on_fills PMCx063 l2_wcb_req.{wcb_write|wcb_close|zero_byte_store|cl_zero} PMCx06d l2_fill_pending.l2_fill_busy PMCx080 ic_fw32 PMCx081 ic_fw32_miss PMCx086 bp_snp_re_sync PMCx087 ic_fetch_stall.{ic_stall_any|ic_stall_dq_empty|ic_stall_back_pressure} PMCx08a bp_l1_btb_correct PMCx08c ic_cache_inval.{l2_invalidating_probe|fill_invalidated} PMCx099 bp_tlb_rel PMCx0a9 de_dis_uop_queue_empty_di0 PMCx0c7 ex_ret_brn_resync PMCx28a ic_oc_mode_switch.{oc_ic_mode_switch|ic_oc_mode_switch} L3PMCx01 l3_request_g1.caching_l3_cache_accesses L3PMCx06 l3_comb_clstr_state.{other_l3_miss_typs|request_miss} [1] Processor Programming Reference (PPR) for AMD Family 19h, Model 01h, Revision B1 Processors - 55898 Rev 0.35 - Feb 5, 2021. [2] Processor Programming Reference (PPR) for AMD Family 17h Model 71h, Revision B0 Processors, 56176 Rev 3.06 - Jul 17, 2019. [3] Processor Programming Reference (PPR) for AMD Family 17h Models 01h,08h, Revision B2 Processors, 54945 Rev 3.03 - Jun 14, 2019. All of the PPRs can be found at: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Reviewed-by: Robert Richter Signed-off-by: Smita Koralahalli Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kim Phillips Cc: Mark Rutland Cc: Martin Liška Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vijay Thakkar Cc: linux-perf-users@vger.kernel.org Link: https://lore.kernel.org/r/20210406215944.113332-5-Smita.KoralahalliChannabasappa@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit e5f2b4e1b8b1c709d32e895c9ca77845b8e71ee3 Author: Smita Koralahalli Date: Tue Apr 6 16:59:43 2021 -0500 perf vendor events amd: Use 0x%02x format for event code and umask Use 0x%02x format for all event codes and umasks as this helps in tracking changes of automatically generated event tables. Reviewed-by: Robert Richter Signed-off-by: Smita Koralahalli Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kim Phillips Cc: Mark Rutland Cc: Martin Liška Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vijay Thakkar Cc: linux-perf-users@vger.kernel.org Link: https://lore.kernel.org/r/20210406215944.113332-4-Smita.KoralahalliChannabasappa@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit ff64c98195c5c48c4cd98ff1347543cdb0631433 Author: Smita Koralahalli Date: Tue Apr 6 16:59:42 2021 -0500 perf vendor events amd: Use lowercases for all the eventcodes and umasks The values of event codes and umasks are inconsistent with letter cases. Enforce a unique style and default everything to lower case as this helps in tracking changes of automatically generated event tables. Reviewed-by: Robert Richter Signed-off-by: Smita Koralahalli Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kim Phillips Cc: Mark Rutland Cc: Martin Liška Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vijay Thakkar Cc: linux-perf-users@vger.kernel.org Link: https://lore.kernel.org/r/20210406215944.113332-3-Smita.KoralahalliChannabasappa@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 86c2bc3da769124e3e856b6e9457be3667c30919 Author: Smita Koralahalli Date: Tue Apr 6 16:59:41 2021 -0500 perf vendor events amd: Fix broken L2 Cache Hits from L2 HWPF metric Commit 08ed77e414ab2342 ("perf vendor events amd: Add recommended events") added the hits event "L2 Cache Hits from L2 HWPF" with the same metric expression as the accesses event "L2 Cache Accesses from L2 HWPF": $ perf list --details ... l2_cache_accesses_from_l2_hwpf [L2 Cache Accesses from L2 HWPF] [l2_pf_hit_l2 + l2_pf_miss_l2_hit_l3 + l2_pf_miss_l2_l3] l2_cache_hits_from_l2_hwpf [L2 Cache Hits from L2 HWPF] [l2_pf_hit_l2 + l2_pf_miss_l2_hit_l3 + l2_pf_miss_l2_l3] ... This was wrong and led to counting hits the same as accesses. Section 2.1.15.2 "Performance Measurement" of "PPR for AMD Family 17h Model 31h B0 - 55803 Rev 0.54 - Sep 12, 2019", documents the hits event with EventCode 0x70 which is the same as l2_pf_hit_l2. Fix this, and massage the description for l2_pf_hit_l2 as the hits event is now the duplicate of l2_pf_hit_l2. AMD recommends using the recommended event over other events if the duplicate exists and maintain both for consistency. Hence, l2_cache_hits_from_l2_hwpf should override l2_pf_hit_l2. Before: # perf stat -M l2_cache_accesses_from_l2_hwpf,l2_cache_hits_from_l2_hwpf sleep 1 Performance counter stats for 'sleep 1': 1,436 l2_pf_miss_l2_l3 # 11114.00 l2_cache_accesses_from_l2_hwpf # 11114.00 l2_cache_hits_from_l2_hwpf 4,482 l2_pf_hit_l2 5,196 l2_pf_miss_l2_hit_l3 1.001765339 seconds time elapsed After: # perf stat -M l2_cache_accesses_from_l2_hwpf sleep 1 Performance counter stats for 'sleep 1': 1,477 l2_pf_miss_l2_l3 # 10442.00 l2_cache_accesses_from_l2_hwpf 3,978 l2_pf_hit_l2 4,987 l2_pf_miss_l2_hit_l3 1.001491186 seconds time elapsed # perf stat -e l2_cache_hits_from_l2_hwpf sleep 1 Performance counter stats for 'sleep 1': 3,983 l2_cache_hits_from_l2_hwpf 1.001329970 seconds time elapsed Note the difference in performance counter values for the accesses versus the hits after the fix, and the hits event now counting the same as l2_pf_hit_l2. Fixes: 08ed77e414ab ("perf vendor events amd: Add recommended events") Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Reviewed-by: Robert Richter Signed-off-by: Smita Koralahalli Tested-by: Arnaldo Carvalho de Melo # On a 3900X Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Kim Phillips Cc: Mark Rutland Cc: Martin Liška Cc: Michael Petlan Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Vijay Thakkar Cc: linux-perf-users@vger.kernel.org Link: https://lore.kernel.org/r/20210406215944.113332-2-Smita.KoralahalliChannabasappa@amd.com Signed-off-by: Arnaldo Carvalho de Melo commit 0cc177cfc95d565e1a458136a592b0bd6d487db0 Author: John Garry Date: Wed Apr 7 18:32:50 2021 +0800 perf vendor events arm64: Add Hisi hip08 L3 metrics Add L3 metrics. Reviewed-by: Kajol Jain Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: https://lore.kernel.org/r/1617791570-165223-7-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 03837173487a1c664b71f047e97209112be37dd5 Author: John Garry Date: Wed Apr 7 18:32:49 2021 +0800 perf vendor events arm64: Add Hisi hip08 L2 metrics Add L2 metrics. Reviewed-by: Kajol Jain Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: https://lore.kernel.org/r/1617791570-165223-6-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit c4e1dc4a94931805fd4c69de71117dc040d8db2a Author: John Garry Date: Wed Apr 7 18:32:48 2021 +0800 perf vendor events arm64: Add Hisi hip08 L1 metrics Add L1 metrics. Formula is as consistent as possible with MAN pages description for these metrics. Reviewed-by: Kajol Jain Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Paul Clarke Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: https://lore.kernel.org/r/1617791570-165223-5-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit e126bef55f1dfb44440d632f9aae66af3240a435 Author: John Garry Date: Wed Apr 7 18:32:47 2021 +0800 perf pmu: Add pmu_events_map__find() function to find the common PMU map for the system Add a function to find the common PMU map for the system. For arm64, a special variant is added. This is because arm64 supports heterogeneous CPU systems. As such, it cannot be guaranteed that the cpumap is same for all CPUs. So in case of heterogeneous systems, don't return a cpumap. Reviewed-by: Kajol Jain Signed-off-by: John Garry Tested-by: Paul A. Clarke Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Cc: linuxarm@huawei.com Link: https://lore.kernel.org/r/1617791570-165223-4-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit a48a995edcde832f2d4c4ec1bfb73e0da93810fb Author: John Garry Date: Wed Apr 7 18:32:46 2021 +0800 perf test: Handle metric reuse in pmu-events parsing test The pmu-events parsing test does not handle metric reuse at all. Introduce some simple handling to resolve metrics who reference other metrics. Reviewed-by: Kajol Jain Signed-off-by: John Garry Tested-by: Paul A. Clarke Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linuxarm@huawei.com Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1617791570-165223-3-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit dedb76d3598618e67b3a9af89bf4f418430acbe4 Author: John Garry Date: Wed Apr 7 18:32:45 2021 +0800 perf metricgroup: Make find_metric() public with name change Function find_metric() is required for the metric processing in the pmu-events testcase, so make it public. Also change the name to include "metricgroup". Tested-by: Paul A. Clarke Reviewed-by: Kajol Jain Signed-off-by: John Garry Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shaokun Zhang Cc: Will Deacon Cc: linuxarm@huawei.com Cc: linux-arm-kernel@lists.infradead.org Link: https://lore.kernel.org/r/1617791570-165223-2-git-send-email-john.garry@huawei.com Signed-off-by: Arnaldo Carvalho de Melo commit 1446e32235b127b29bceb61fb196d02ca7327f1e Author: Wu XiangCheng Date: Sat Apr 3 19:37:54 2021 +0800 docs/gcov: Convert two tags to ref in dev-tools/gov.rst Htmldocs does not display the chapter number, convert the two manual chapter number tags to ref tags. Signed-off-by: Wu XiangCheng Acked-by: Peter Oberparleiter Link: https://lore.kernel.org/r/20210403113752.GA32236@mipc Signed-off-by: Jonathan Corbet commit 22141d5f411895bb1b0df2a6b05f702e11e63918 Author: Artem Bityutskiy Date: Wed Apr 7 09:10:28 2021 +0300 intel_idle: add Iclelake-D support This patch adds Icelake Xeon D support to the intel_idle driver. Since Icelake D and Icelake SP C-state characteristics the same, we use Icelake SP C-states table for Icelake D as well. Signed-off-by: Artem Bityutskiy Acked-by: Chen Yu Signed-off-by: Rafael J. Wysocki commit 953c1fd96b1a70bcbbfb10973c2126eba8d891c7 Author: YueHaibing Date: Fri Apr 2 14:14:22 2021 +0800 PM: runtime: Replace inline function pm_runtime_callbacks_present() Commit 9a7875461fd0 ("PM: runtime: Replace pm_runtime_callbacks_present()") forgot to change the inline version. Fixes: 9a7875461fd0 ("PM: runtime: Replace pm_runtime_callbacks_present()") Signed-off-by: YueHaibing Signed-off-by: Rafael J. Wysocki commit 2efa3377230bab432fdeabe5828d19d2d49a96d2 Author: YueHaibing Date: Thu Apr 1 22:15:37 2021 +0800 freezer: Remove unused inline function try_to_freeze_nowarn() There is no caller in tree, so can remove it. Signed-off-by: YueHaibing Signed-off-by: Rafael J. Wysocki commit 5859c926d1f052ee61b5815b14658875c14f6243 Author: Dinghao Liu Date: Thu Apr 8 15:26:58 2021 +0800 PCI: tegra: Fix runtime PM imbalance in pex_ep_event_pex_rst_deassert() pm_runtime_get_sync() will increase the runtime PM counter even it returns an error. Thus a pairing decrement is needed to prevent refcount leak. Fix this by replacing this API with pm_runtime_resume_and_get(), which will not change the runtime PM counter on error. Link: https://lore.kernel.org/r/20210408072700.15791-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Signed-off-by: Lorenzo Pieralisi Acked-by: Thierry Reding commit 35eb1f5033cf301bda48a22f2edcaed2fda70bfd Author: Wan Jiabing Date: Tue Mar 30 14:39:23 2021 +0800 powercap: RAPL: Fix struct declaration in header file struct rapl_package is declared twice in intel_rapl.h, once at line 80 and once earlier. Code inspection suggests that the first instance should be struct rapl_domain rather than rapl_package, so change it. Signed-off-by: Wan Jiabing [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit df652a16a65735c228c88e5fb75a938614f1368b Author: Vincenzo Frascino Date: Wed Apr 7 14:38:17 2021 +0100 arm64: mte: Remove unused mte_assign_mem_tag_range() mte_assign_mem_tag_range() was added in commit 85f49cae4dfc ("arm64: mte: add in-kernel MTE helpers") in 5.11 but moved out of mte.S by commit 2cb34276427a ("arm64: kasan: simplify and inline MTE functions") in 5.12 and renamed to mte_set_mem_tag_range(). 2cb34276427a did not delete the old function prototypes in mte.h. Remove the unused prototype from mte.h. Cc: Will Deacon Reported-by: Derrick McKee Signed-off-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210407133817.23053-1-vincenzo.frascino@arm.com Signed-off-by: Catalin Marinas commit a7dcf58ae5d2f7c6f1bbe13290897f539f9cd75b Author: Jisheng Zhang Date: Tue Mar 30 13:54:49 2021 +0800 arm64: Add __init section marker to some functions They are not needed after booting, so mark them as __init to move them to the .init section. Signed-off-by: Jisheng Zhang Reviewed-by: Steven Price Link: https://lore.kernel.org/r/20210330135449.4dcffd7f@xhacker.debian Signed-off-by: Catalin Marinas commit cccb78ce89c45a4414db712be4986edfb92434bd Author: Mark Brown Date: Fri Mar 12 19:03:13 2021 +0000 arm64/sve: Rework SVE access trap to convert state in registers When we enable SVE usage in userspace after taking a SVE access trap we need to ensure that the portions of the register state that are not shared with the FPSIMD registers are zeroed. Currently we do this by forcing the FPSIMD registers to be saved to the task struct and converting them there. This is wasteful in the common case where the task state is loaded into the registers and we will immediately return to userspace since we can initialise the SVE state directly in registers instead of accessing multiple copies of the register state in memory. Instead in that common case do the conversion in the registers and update the task metadata so that we can return to userspace without spilling the register state to memory unless there is some other reason to do so. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210312190313.24598-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit 703fe25d11ae613c77b8e72bb06efc06de871648 Merge: f2ec1ebb25715 205eb17eddb47 Author: Mark Brown Date: Thu Apr 8 17:39:58 2021 +0100 Merge series "ASoC: simple-card-utils: prepare for multi support" from Kuninori Morimoto : Hi Mark I want to add new audio-graph-card2 driver which can support not only DPCM, but also Multi-CPU/Codec, and Codec2Codec. And it is also supporting audio-graph-card2 base custom driver. But before supporting such driver, we need to cleanup existing simple-card / audio-graph, because these and new driver are sharing code. This patch-set are for Multi-CPU/Codec support, and some cleanups. Kuninori Morimoto (14): ASoC: simple-card-utils: enable flexible CPU/Codec/Platform ASoC: simple-card-utils: share dummy DAI and reduce memory ASoC: simple-card-utils: setup dai_props cpu_dai/codec_dai at initial timing ASoC: simple-card-utils: remove li->dais/li->conf ASoC: simple-card-utils: use for_each_prop_xxx() ASoC: simple-card-utils: remove asoc_simple_parse_xxx() ASoC: simple-card-utils: care multi DAI at asoc_simple_clean_reference() ASoC: simple-card-utils: indicate dai_fmt if exist ASoC: simple-card-utils: indicate missing CPU/Codec numbers for debug ASoC: simple-card-utils: add simple_props_to_xxx() macro ASoC: simple-card-utils: multi support at asoc_simple_canonicalize_cpu/platform() ASoC: simple-card-utils: tidyup debug info for clock ASoC: simple-card-utils: tidyup dev_dbg() to use 1 line ASoC: simple-card-utils: tidyup asoc_simple_parse_convert() include/sound/simple_card_utils.h | 116 +++++++---- sound/soc/generic/audio-graph-card.c | 90 ++++----- sound/soc/generic/simple-card-utils.c | 272 +++++++++++++++++--------- sound/soc/generic/simple-card.c | 104 +++++----- 4 files changed, 352 insertions(+), 230 deletions(-) -- 2.25.1 commit 3212135a718b06be38811f2d9a320ae842e76409 Author: Christoph Hellwig Date: Tue Apr 6 08:23:02 2021 +0200 block: remove disk_part_iter Just open code the xa_for_each in the remaining user. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-12-hch@lst.de Signed-off-by: Jens Axboe commit 7fae67cc9c0e0645e8c82156ba3a8bb7bae995bb Author: Christoph Hellwig Date: Tue Apr 6 08:23:01 2021 +0200 block: simplify diskstats_show Just use xa_for_each to iterate over the partitions as there is no need to grab a reference to each partition. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-11-hch@lst.de Signed-off-by: Jens Axboe commit ecc75a98b89917f18f295e154cd0bf056481c48f Author: Christoph Hellwig Date: Tue Apr 6 08:23:00 2021 +0200 block: simplify show_partition Just use xa_for_each to iterate over the partitions as there is no need to grab a reference to each partition. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-10-hch@lst.de Signed-off-by: Jens Axboe commit e559f58d20dbcc0b541552ac6b5cbab29c964d6a Author: Christoph Hellwig Date: Tue Apr 6 08:22:59 2021 +0200 block: simplify printk_all_partitions Just use xa_for_each to iterate over the partitions as there is no need to grab a reference to each partition. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-9-hch@lst.de Signed-off-by: Jens Axboe commit e30691237bc1e055c55b0fe256ed7fc1a4ee1122 Author: Christoph Hellwig Date: Tue Apr 6 08:22:58 2021 +0200 block: simplify partition_overlaps Just use xa_for_each to iterate over the partitions as there is no need to grab a reference to each partition. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-8-hch@lst.de Signed-off-by: Jens Axboe commit 6c4541a8bb94a1cccca55ee53c866eb72bf279cf Author: Christoph Hellwig Date: Tue Apr 6 08:22:57 2021 +0200 block: simplify partition removal Always look up the first available entry instead of the complicated stateful traversal. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-7-hch@lst.de Signed-off-by: Jens Axboe commit c76f48eb5c084b1e15c931ae8cc1826cd771d70d Author: Christoph Hellwig Date: Tue Apr 6 08:22:56 2021 +0200 block: take bd_mutex around delete_partitions in del_gendisk There is nothing preventing an ioctl from trying do delete partition concurrenly with del_gendisk, so take open_mutex to serialize against that. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-6-hch@lst.de Signed-off-by: Jens Axboe commit d3c4a43d9291279c28b26757351a6ab72c110753 Author: Christoph Hellwig Date: Tue Apr 6 08:22:55 2021 +0200 block: refactor blk_drop_partitions Move the busy check and disk-wide sync into the only caller, so that the remainder can be shared with del_gendisk. Also pass the gendisk instead of the bdev as that is all that is needed. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-5-hch@lst.de Signed-off-by: Jens Axboe commit 473338be3aaea117a7133720305f240eb7f68951 Author: Christoph Hellwig Date: Tue Apr 6 08:22:54 2021 +0200 block: move more syncing and invalidation to delete_partition Move the calls to fsync_bdev and __invalidate_device from del_gendisk to delete_partition. For the other two callers that check that there are no openers for the delete partitions(s) the callouts are a no-op as no file system can be mounted, but this keeps all the cleanup in one place. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-4-hch@lst.de Signed-off-by: Jens Axboe commit 45611837bb37e4544ca048e33d833483b06e3b03 Author: Christoph Hellwig Date: Tue Apr 6 08:22:53 2021 +0200 block: remove invalidate_partition invalidate_partition has two callers, one of which already performs the remove_inode_hash just after the call. Just open code the function in the two callsites. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406062303.811835-3-hch@lst.de Signed-off-by: Jens Axboe commit b896fa85e0ee4f09ba4be48a3f405fc82c38afb4 Author: Christoph Hellwig Date: Tue Apr 6 08:22:52 2021 +0200 dasd: use bdev_disk_changed instead of blk_drop_partitions Use the more general interface - the behavior is the same except that now a change uevent is sent, which is the right thing to do when the device becomes unusable. Signed-off-by: Christoph Hellwig Acked-by: Stefan Haberland Link: https://lore.kernel.org/r/20210406062303.811835-2-hch@lst.de Signed-off-by: Jens Axboe commit 3bbfd319034ddce59e023837a4aa11439460509b Author: Feilong Lin Date: Thu Mar 25 15:26:00 2021 +0800 ACPI / hotplug / PCI: Fix reference count leak in enable_slot() In enable_slot(), if pci_get_slot() returns NULL, we clear the SLOT_ENABLED flag. When pci_get_slot() finds a device, it increments the device's reference count. In this case, we did not call pci_dev_put() to decrement the reference count, so the memory of the device (struct pci_dev type) will eventually leak. Call pci_dev_put() to decrement its reference count when pci_get_slot() returns a PCI device. Link: https://lore.kernel.org/r/b411af88-5049-a1c6-83ac-d104a1f429be@huawei.com Signed-off-by: Feilong Lin Signed-off-by: Zhiqiang Liu Signed-off-by: Bjorn Helgaas Reviewed-by: Rafael J. Wysocki commit ff917638359e2d0dc122acbb23b74be294ee3d77 Merge: 9c282c29a3aee 65aa97c4d2bfd Author: Jens Axboe Date: Thu Apr 8 09:55:14 2021 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.13/drivers Pull MD updates from Song: "These patches fix a race condition with md_release() and md_open()." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: split mddev_find md: factor out a mddev_find_locked helper from mddev_find md: md_open returns -EBUSY when entering racing area commit 0a8e73301d2b071a9e4ceb1901773502d50b897a Merge: f8e547f5285b8 d8d5cbc619e86 Author: Arnd Bergmann Date: Thu Apr 8 17:47:49 2021 +0200 Merge tag 'memory-controller-drv-tegra-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.13 - Tegra SoC 1. Few cleanups. 2. Add debug statistics to Tegra20 memory controller. 3. Update bindings and convert to dtschema. This update is not backwards compatible (ABI break) however the broken part was added recently (v5.11) and there are no users of it yet. * tag 'memory-controller-drv-tegra-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: dt-bindings: memory: tegra20: mc: Convert to schema dt-bindings: memory: tegra124: emc: Replace core regulator with power domain dt-bindings: memory: tegra30: emc: Replace core regulator with power domain dt-bindings: memory: tegra20: emc: Replace core regulator with power domain memory: tegra: Print out info-level once per driver probe memory: tegra20: Protect debug code with a lock memory: tegra20: Correct comment to MC_STAT registers writes memory: tegra20: Add debug statistics memory: tegra: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Link: https://lore.kernel.org/r/20210407161333.73013-2-krzysztof.kozlowski@canonical.com Signed-off-by: Arnd Bergmann commit f8e547f5285b8e4f862de90b0425a93999499e25 Merge: 4a3c88952e131 25dcca7fedcd4 Author: Arnd Bergmann Date: Thu Apr 8 17:46:21 2021 +0200 Merge tag 'memory-controller-drv-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl into arm/drivers Memory controller drivers for v5.13 1. OMAP: fix unlikely but possible out of bounds read. 2. PL353: fix mask used in setting ECC page_size in config register. 3. Minor cleanup: Freescale Corenet. * tag 'memory-controller-drv-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux-mem-ctrl: memory: pl353: fix mask of ECC page_size config register memory: fsl-corenet-cf: Remove redundant dev_err call in ccf_probe() memory: gpmc: fix out of bounds read and dereference on gpmc_cs[] Link: https://lore.kernel.org/r/20210407161333.73013-1-krzysztof.kozlowski@canonical.com Signed-off-by: Arnd Bergmann commit 4a3c88952e13172bde13bbb718265805861bcab2 Merge: 0ffc253e2e0ea 060f7875bd230 Author: Arnd Bergmann Date: Thu Apr 8 17:45:28 2021 +0200 Merge tag 'v5.12-next-soc.2' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers MT8167: - add support for mmsys subsystem * tag 'v5.12-next-soc.2' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: mmsys: Add support for MT8167 SoC dt-bindings: mediatek: mmsys: add mt8167 binding Link: https://lore.kernel.org/r/14104322-3a6c-e8eb-cd21-a5343a81aa0f@gmail.com Signed-off-by: Arnd Bergmann commit 0ffc253e2e0ea7b0a1a6b73f019ba38dfe7a3e44 Merge: 207481077b07d 38ad957b04c5c Author: Arnd Bergmann Date: Thu Apr 8 17:44:14 2021 +0200 Merge tag 'socfpga_update_for_v5.13_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/drivers SoCFPGA updates for v5.13, part 2 - Only build Stratix10 Service Layer and RSU drivers on ARM64 * tag 'socfpga_update_for_v5.13_part2' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: firmware: stratix10-svc: build only on 64-bit ARM Link: https://lore.kernel.org/r/20210405155026.86309-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 207481077b07d53cb378bc5dc71ae5379c91e8a8 Merge: 4be3f47e1bd5c ac6ad7c2a862d Author: Arnd Bergmann Date: Thu Apr 8 17:41:52 2021 +0200 Merge tag 'qcom-drivers-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/drivers Qualcomm driver updates for 5.13 This introduces SC7280 and SM8350 support in the RPMH power-domain driver, SC7280 support to the LLCC driver, SC7280 support tot he AOSS QMP driver, cleanups to the RPMH driver and a few smaller fixes to the SMEM, QMI and EBI2 drivers. * tag 'qcom-drivers-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: bus: qcom: Put child node before return dt-bindings: firmware: scm: Add sc7280 support soc: qcom: rpmh-rsc: Fold WARN_ON() into if condition soc: qcom: rpmh-rsc: Loop over fewer bits in irq handler soc: qcom: rpmh-rsc: Remove tcs_is_free() API soc: qcom: smem: Update max processor count soc: qcom: aoss: Add AOSS QMP support for SC7280 dt-bindings: soc: qcom: aoss: Add SC7280 compatible soc: qcom: llcc: Add configuration data for SC7280 dt-bindings: arm: msm: Add LLCC for SC7280 soc: qcom: Fix typos in the file qmi_encdec.c soc: qcom: rpmhpd: Add sc7280 powerdomains dt-bindings: power: rpmpd: Add sc7280 to rpmpd binding soc: qcom: rpmhpd: Add SM8350 power domains dt-bindings: power: Add rpm power domain bindings for SM8350 Link: https://lore.kernel.org/r/20210404164951.713045-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit 4be3f47e1bd5c9be4c4b95de5f3531f062a28a66 Merge: ba87f2009edb6 d4f9dddd21f39 Author: Arnd Bergmann Date: Thu Apr 8 17:38:20 2021 +0200 Merge tag 'scmi-updates-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/drivers ARM SCMI updates for v5.13 The major and big addition this time is to support modularisation of individual SCMI protocols thus enabling to add support for vendors' custom SCMI protocol. This changes the interface provided by the SCMI driver to all the users of SCMI and hence involved changes in various other subsystem SCMI drivers. The change has been split with a bit of transient code to preserve bisectability and avoiding one big patch bomb changing all the users. This also includes SCMI IIO driver(pulled from IIO tree) and support for per-cpu DVFS. * tag 'scmi-updates-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: (41 commits) firmware: arm_scmi: Add dynamic scmi devices creation firmware: arm_scmi: Add protocol modularization support firmware: arm_scmi: Rename non devres notify_ops firmware: arm_scmi: Make notify_priv really private firmware: arm_scmi: Cleanup events registration transient code firmware: arm_scmi: Cleanup unused core transfer helper wrappers firmware: arm_scmi: Cleanup legacy protocol init code firmware: arm_scmi: Make references to handle const firmware: arm_scmi: Remove legacy scmi_voltage_ops protocol interface regulator: scmi: Port driver to the new scmi_voltage_proto_ops interface firmware: arm_scmi: Port voltage protocol to new protocols interface firmware: arm_scmi: Port systempower protocol to new protocols interface firmware: arm_scmi: Remove legacy scmi_sensor_ops protocol interface iio/scmi: Port driver to the new scmi_sensor_proto_ops interface hwmon: (scmi) port driver to the new scmi_sensor_proto_ops interface firmware: arm_scmi: Port sensor protocol to new protocols interface firmware: arm_scmi: Remove legacy scmi_reset_ops protocol interface reset: reset-scmi: Port driver to the new scmi_reset_proto_ops interface firmware: arm_scmi: Port reset protocol to new protocols interface firmware: arm_scmi: Remove legacy scmi_clk_ops protocol interface ... Link: https://lore.kernel.org/r/20210331100657.ilu63i4swnr3zp4e@bogus Signed-off-by: Arnd Bergmann commit 0648c55e3a21ccd816e99b6600d6199fbf39d23a Author: Bjorn Andersson Date: Thu Jan 7 15:25:26 2021 -0800 soc: qcom: mdt_loader: Detect truncated read of segments Given that no validation of how much data the firmware loader read in for a given segment truncated segment files would best case result in a hash verification failure, without any indication of what went wrong. Improve this by validating that the firmware loader did return the amount of data requested. Fixes: 445c2410a449 ("soc: qcom: mdt_loader: Use request_firmware_into_buf()") Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20210107232526.716989-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 84168d1b54e76a1bcb5192991adde5176abe02e3 Author: Bjorn Andersson Date: Thu Jan 7 15:31:19 2021 -0800 soc: qcom: mdt_loader: Validate that p_filesz < p_memsz The code validates that segments of p_memsz bytes of a segment will fit in the provided memory region, but does not validate that p_filesz bytes will, which means that an incorrectly crafted ELF header might write beyond the provided memory region. Fixes: 051fb70fd4ea ("remoteproc: qcom: Driver for the self-authenticating Hexagon v5") Reviewed-by: Sibi Sankar Link: https://lore.kernel.org/r/20210107233119.717173-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit ae40aaf6bdbf0354a75b8284a0de453fcf5f4d32 Author: Jarkko Sakkinen Date: Thu Apr 8 12:29:24 2021 +0300 x86/sgx: Do not update sgx_nr_free_pages in sgx_setup_epc_section() The commit in Fixes: changed the SGX EPC page sanitization to end up in sgx_free_epc_page() which puts clean and sanitized pages on the free list. This was done for the reason that it is best to keep the logic to assign available-for-use EPC pages to the correct NUMA lists in a single location. sgx_nr_free_pages is also incremented by sgx_free_epc_pages() but those pages which are being added there per EPC section do not belong to the free list yet because they haven't been sanitized yet - they land on the dirty list first and the sanitization happens later when ksgxd starts massaging them. So remove that addition there and have sgx_free_epc_page() do that solely. [ bp: Sanitize commit message too. ] Fixes: 51ab30eb2ad4 ("x86/sgx: Replace section->init_laundry_list with sgx_dirty_page_list") Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210408092924.7032-1-jarkko@kernel.org commit 7178d4cc0702bfe6a7e0f21e37d6e3dfe8e40f11 Author: Jonathan Marek Date: Mon Nov 23 09:37:05 2020 -0500 arm64: dts: qcom: update usb qmp phy clock-cells property The top-level node doesn't provide any clocks, the subnode provides a single clock with of_clk_hw_simple_get. Signed-off-by: Jonathan Marek Link: https://lore.kernel.org/r/20201123143705.14277-1-jonathan@marek.ca Signed-off-by: Bjorn Andersson commit 8385119b3295fa87c43a80faed5644bbdab02b8c Author: Stephan Gerhold Date: Wed Apr 7 18:36:48 2021 +0200 arm64: dts: qcom: msm8916: Add GICv2 hypervisor registers/interrupt The ARM Cortex-A53 CPU cores and QGIC2 interrupt controller (an implementation of the ARM GIC 2.0 specification) used in MSM8916 support virtualization, e.g. for KVM on Linux. However, so far it was not possible to make use of this functionality, because Qualcomm's proprietary "hyp" firmware blocks the EL2 mode of the CPU and only allows booting Linux in EL1. However, on devices without (firmware) secure boot there is no need to rely on all of Qualcomm's firmware. The "hyp" firmware on MSM8916 seems simple enough that it can be replaced with an open-source alternative created only based on trial and error - with some similar EL2/EL1 initialization code adapted from Linux and U-Boot. qhypstub [1] is such an open-source firmware for MSM8916 that can be used as drop-in replacement for Qualcomm's "hyp" firmware. It does not implement any hypervisor functionality. Instead, it allows booting Linux/KVM (or other hypervisors) in EL2. With Linux booting in EL2, KVM seems to be working just fine on MSM8916. However, so far it is not possible to make use of the virtualization features in the GICv2. To use KVM's VGICv2 code, the QGIC2 device tree node needs additional resources (according to binding documentation): - The CPU interface region (second reg) must be at least 8 KiB large to access the GICC_DIR register (mapped at 0x1000 offset) - Virtual control/CPU interface register base and size - Hypervisor maintenance interrupt Fortunately, the public APQ8016E TRM [2] provides the required information: - The CPU interface region (at 0x0B002000) actually has a size of 8 KiB - Virtual control/CPU interface register is at 0x0B001000/0x0B004000 - Hypervisor maintenance interrupt is "PPI #0" Note: This is a bit strange since almost all other ARM SoCs use GIC_PPI 9 for this. However, I have verified that this is indeed the interrupt that fires when bits are set in GICH_HCR. Add the additional resources to the QGIC2 device tree node in msm8916.dtsi. There is no functional difference when Linux is started in EL1 since the additional resources are ignored in that case. With these changes (and qhypstub), KVM seems to be fully working on the DragonBoard 410c (apq8016-sbc) and BQ Aquaris X5 (longcheer-l8910). [1]: https://github.com/msm8916-mainline/qhypstub [2]: https://developer.qualcomm.com/download/sd410/snapdragon-410e-technical-reference-manual.pdf Acked-by: Marc Zyngier Signed-off-by: Stephan Gerhold Link: https://lore.kernel.org/r/20210407163648.4708-1-stephan@gerhold.net Signed-off-by: Bjorn Andersson commit fe99782702bfa30aaeee1cb05e551c18e31a6be7 Merge: 1e28eed17697b e0bb4b7354049 Author: Joerg Roedel Date: Thu Apr 8 17:09:33 2021 +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.13 - SMMUv3: * Drop vestigial PREFETCH_ADDR support * Elide TLB sync logic for empty gather * Fix "Service Failure Mode" handling - SMMUv2: * New Qualcomm compatible string commit 268aa4548277a1e50f326c6fbca75dd1073574d4 Author: Nadav Amit Date: Tue Mar 23 14:06:19 2021 -0700 iommu/amd: Page-specific invalidations for more than one page Currently, IOMMU invalidations and device-IOTLB invalidations using AMD IOMMU fall back to full address-space invalidation if more than a single page need to be flushed. Full flushes are especially inefficient when the IOMMU is virtualized by a hypervisor, since it requires the hypervisor to synchronize the entire address-space. AMD IOMMUs allow to provide a mask to perform page-specific invalidations for multiple pages that match the address. The mask is encoded as part of the address, and the first zero bit in the address (in bits [51:12]) indicates the mask size. Use this hardware feature to perform selective IOMMU and IOTLB flushes. Combine the logic between both for better code reuse. The IOMMU invalidations passed a smoke-test. The device IOTLB invalidations are untested. Cc: Joerg Roedel Cc: Will Deacon Cc: Jiajun Cao Cc: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Nadav Amit Link: https://lore.kernel.org/r/20210323210619.513069-1-namit@vmware.com Signed-off-by: Joerg Roedel commit 53648ed3f0859d0b46bba82c0e79768bf2cb02b1 Merge: 1e28eed17697b 4fb13790417a7 Author: Marc Zyngier Date: Thu Apr 8 15:42:47 2021 +0100 Merge remote-tracking branch 'coresight/next-ETE-TRBE' into kvmarm-master/next Signed-off-by: Marc Zyngier commit 8120891105ba32b45bc35f7dc07e6d87a8314556 Author: Jonathan Neuschäfer Date: Sat Mar 20 19:16:01 2021 +0100 dt-bindings: timer: nuvoton,npcm7xx: Add wpcm450-timer Add a compatible string for WPCM450, which has essentially the same timer controller. Signed-off-by: Jonathan Neuschäfer Acked-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210320181610.680870-6-j.neuschaefer@gmx.net commit e2bf384d4329bb478ad003eae1ab644756a42266 Author: Jisheng Zhang Date: Tue Mar 30 14:04:44 2021 +0800 clocksource/drivers/arm_arch_timer: Add __ro_after_init and __init Some functions are not needed after booting, so mark them as __init to move them to the .init section. Some global variables are never modified after init, so can be __ro_after_init. Signed-off-by: Jisheng Zhang Acked-by: Marc Zyngier Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210330140444.4fb2a7cb@xhacker.debian commit 25de4ce5ed02994aea8bc111d133308f6fd62566 Author: Tony Lindgren Date: Tue Mar 23 09:43:26 2021 +0200 clocksource/drivers/timer-ti-dm: Handle dra7 timer wrap errata i940 There is a timer wrap issue on dra7 for the ARM architected timer. In a typical clock configuration the timer fails to wrap after 388 days. To work around the issue, we need to use timer-ti-dm percpu timers instead. Let's configure dmtimer3 and 4 as percpu timers by default, and warn about the issue if the dtb is not configured properly. Let's do this as a single patch so it can be backported to v5.8 and later kernels easily. Note that this patch depends on earlier timer-ti-dm systimer posted mode fixes, and a preparatory clockevent patch "clocksource/drivers/timer-ti-dm: Prepare to handle dra7 timer wrap issue". For more information, please see the errata for "AM572x Sitara Processors Silicon Revisions 1.1, 2.0": https://www.ti.com/lit/er/sprz429m/sprz429m.pdf The concept is based on earlier reference patches done by Tero Kristo and Keerthy. Cc: Keerthy Cc: Tero Kristo Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210323074326.28302-3-tony@atomide.com commit 6ee4bdc27d1aee6fb4dde9b28c95fe87d87c1438 Author: Xiaofei Tan Date: Sat Mar 27 20:08:24 2021 +0800 ACPI: dock: fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including following types: WARNING: Missing a blank line after declarations ERROR: spaces required around that ':' WARNING: Statements should start on a tabstop Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit d0fb66e999ffafe425833b8bdfcaabb3d7941c93 Author: Xiaofei Tan Date: Sat Mar 27 20:08:23 2021 +0800 ACPI: sysfs: fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including following types: WARNING: Missing a blank line after declarations WARNING: Block comments should align the * on each line ERROR: open brace '{' following function definitions go on the next line Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit 3da8236bb0d50c6842f5525216a948b5f1cd51cb Author: Xiaofei Tan Date: Sat Mar 27 20:08:22 2021 +0800 ACPI: PM: add a missed blank line after declarations Add a missed blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit 4dea6e898c39358530d98edb4bfa043e6a0e71fe Author: Xiaofei Tan Date: Sat Mar 27 20:08:21 2021 +0800 ACPI: custom_method: fix a coding style issue Fix the following coding style issue reported by checkpatch.pl ERROR: "foo * bar" should be "foo *bar" FILE: drivers/acpi/custom_method.c:22: +static ssize_t cm_write(struct file *file, const char __user * user_buf, Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit e69ae675879d5e39602b9269f7b6a0363c864f77 Author: Xiaofei Tan Date: Sat Mar 27 20:08:20 2021 +0800 ACPI: CPPC: fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including the following types: WARNING: Missing a blank line after declarations WARNING: unnecessary whitespace before a quoted newline ERROR: spaces required around that '>=' ERROR: switch and case should be at the same indent Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit effbe6404e6c1cccaa351a50f1d431f83b34d9a5 Author: Xiaofei Tan Date: Sat Mar 27 20:08:19 2021 +0800 ACPI: button: fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including the following types: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line ERROR: code indent should use tabs where possible Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit 65545abd8aa3a98c44472525bb459aacffa052c1 Author: Xiaofei Tan Date: Sat Mar 27 20:08:18 2021 +0800 ACPI: battery: fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including the following types: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line ERROR: code indent should use tabs where possible WARNING: Missing a blank line after declarations ERROR: spaces required around that '?' (ctx:WxV) WARNING: Block comments should align the * on each line Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit c8eb628cbdd98ed2abcc38e2196bcb5e6bb3ddf9 Author: Xiaofei Tan Date: Sat Mar 27 20:08:17 2021 +0800 ACPI: acpi_pad: add a missed blank line after declarations Add a missed blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit bb415ed540a18f7ad56ac18ce61b3164bf2dfcb6 Author: Xiaofei Tan Date: Sat Mar 27 20:08:16 2021 +0800 ACPI: LPSS: add a missed blank line after declarations Add a missed blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit fc6a1f84e80b9113e1170151c7fca0e1c332ee22 Author: Xiaofei Tan Date: Sat Mar 27 20:08:15 2021 +0800 ACPI: ipmi: remove useless return statement for void function Remove useless return statement for void function, reported by checkpatch.pl. WARNING: void function return statements are not generally useful FILE: drivers/acpi/acpi_ipmi.c:482: + return; +} Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit c8deb1c2576237d27aadce0e769be4b18518fab1 Author: Xiaofei Tan Date: Sat Mar 27 20:08:14 2021 +0800 ACPI: processor: fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including the following types: ERROR: code indent should use tabs where possible WARNING: Block comments use a trailing */ on a separate line WARNING: Missing a blank line after declarations WARNING: labels should not be indented Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit 0955b3a5c54a016172fb216f8263178c755d138c Author: Xiaofei Tan Date: Sat Mar 27 20:08:13 2021 +0800 ACPI: APD: fix a block comment align issue Fix the following coding style issue reported by checkpatch.pl: WARNING: Block comments should align the * on each line +/** +* Create platform device during acpi scan attach handle. Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit 5fed9fe5b41aea58e5b32be506dc50c9ab9a0e4d Author: Yang Yingliang Date: Thu Apr 1 22:03:50 2021 +0800 spi: fsl: add missing iounmap() on error in of_fsl_spi_probe() Add the missing iounmap() before return from of_fsl_spi_probe() in the error handling case. Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210401140350.1677925-1-yangyingliang@huawei.com Signed-off-by: Mark Brown commit d570838efb6fb3154cbd08ab1b22d1f6442b1e78 Author: Linus Walleij Date: Thu Apr 8 09:50:45 2021 +0200 ARM/spi: spear: Drop PL022 num_chipselect A previous refactoring moved the chip select number handling to the SPI core and we missed a leftover platform data user in the ST spear platform. The spear is not using this chipselect or PL022 for anything and should be using device tree like the rest of the platform so just delete the offending platform data. Cc: Viresh Kumar Cc: Shiraz Hashim Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Linus Walleij Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20210408075045.3435046-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit f2ec1ebb257155fb534cad390575d696dfd567fb Author: Ye Bin Date: Thu Apr 8 14:26:46 2021 +0800 ASoC: tas2770: Constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062646.803053-1-yebin10@huawei.com Signed-off-by: Mark Brown commit e9a216d8f14ac4d926078885e7e772db08e6aad9 Author: Ye Bin Date: Thu Apr 8 14:26:56 2021 +0800 ASoC: cx2072x: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062656.803606-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 5e71e9c14db4e49cca56354c95ce10e0e00214d1 Author: Ye Bin Date: Thu Apr 8 14:27:01 2021 +0800 ASoC: rt1019: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062701.803865-1-yebin10@huawei.com Signed-off-by: Mark Brown commit a93799d55fd479f540ed97066e69114aa7709787 Author: Muhammad Usama Anjum Date: Wed Apr 7 14:56:34 2021 +0500 ASoC: fsl: sunxi: remove redundant dev_err call devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20210407095634.GA1379642@LEGION Signed-off-by: Mark Brown commit 38ec3006eccb46a6db6f4a36536f78db8e9042ac Author: Jiri Prchal Date: Thu Apr 8 08:07:41 2021 +0200 ASoC: codecs: tlv320aic3x: add SPI to the DT binding Added note and example of SPI support. Signed-off-by: Jiri Prchal Link: https://lore.kernel.org/r/20210408060741.6879-1-jiri.prchal@aksignal.cz Signed-off-by: Mark Brown commit b186e7c17d9f2c2bc9cd0bd362402eddbea7749b Author: Ye Bin Date: Thu Apr 8 14:26:43 2021 +0800 ASoC: tas2764: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062643.802908-1-yebin10@huawei.com Signed-off-by: Mark Brown commit a0bc855ffdb55cbb9fbf7fa9611d17f19db889a8 Author: Jiri Prchal Date: Thu Apr 8 15:59:08 2021 +0200 ASoC: codecs: tlv320aic3x: add AIC3106 In DT binding is mentioned that this driver is compatible with 3106. So added compatibility string and model number. Signed-off-by: Jiri Prchal Link: https://lore.kernel.org/r/20210408135908.125667-1-jiri.prchal@aksignal.cz Signed-off-by: Mark Brown commit f985838003ee618daba7a38da3efe27c639575e2 Author: Ye Bin Date: Thu Apr 8 14:27:00 2021 +0800 ASoC: codecs: wsa881x: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210408062700.803792-1-yebin10@huawei.com Signed-off-by: Mark Brown commit 507cf5a2f1e2cd32feaee6e931e18dd74cfe60ce Author: Tian Tao Date: Wed Apr 7 15:00:52 2021 +0800 platform/surface: aggregator: move to use request_irq by IRQF_NO_AUTOEN flag disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which is being merged: https://lore.kernel.org/patchwork/patch/1388765/ Signed-off-by: Tian Tao Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/1617778852-26492-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Hans de Goede commit bee3ecfed0fc9ad104722c501aac1e892b53d1e3 Author: Tian Tao Date: Wed Apr 7 16:59:43 2021 +0800 platform/mellanox: mlxreg-hotplug: move to use request_irq by IRQF_NO_AUTOEN flag disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. this patch is made base on "add IRQF_NO_AUTOEN for request_irq" which is being merged: https://lore.kernel.org/patchwork/patch/1388765/ Signed-off-by: Tian Tao Acked-by: Vadim Pasternak Link: https://lore.kernel.org/r/1617785983-28878-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Hans de Goede commit bbca17c0ada71c652df497bdad7ec9edeacac844 Merge: 7a47f86bba748 cbe16f35bee68 Author: Hans de Goede Date: Thu Apr 8 16:19:52 2021 +0200 Merge tag 'irq-no-autoen-2021-03-25' into review-hans Tag for the input subsystem to pick up commit 205eb17eddb473c3159743c7d3aaf68db37b7231 Author: Kuninori Morimoto Date: Thu Apr 1 13:15:33 2021 +0900 ASoC: simple-card-utils: share dummy DAI and reduce memory Current simple-card / audio-graph creates 1xCPU + 1xCodec + 1xPlatform for all dai_link, but some of them is not needed. For example Platform is not needed for DPCM BE case. Moreover, we can share snd-soc-dummy DAI for CPU-dummy / dummy-Codec in DPCM. This patch adds dummy DAI and share it when DPCM case, I beliave it can contribute to reduce memory. By this patch, CPU-dummy / dummy-CPU are set at asoc_simple_init_priv(), thus, its settings are no longer needed at DPCM detecting timing on simple-card / audio-graph. Moreover, we can remove triky Platform settings code for DPCM BE, because un-needed Platform is not created. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87tuoqod22.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f2138aed231c88d5c4fa8d06aa15ad19685087c2 Author: Kuninori Morimoto Date: Thu Apr 1 13:15:23 2021 +0900 ASoC: simple-card-utils: enable flexible CPU/Codec/Platform Current simple-card / audio-graph are assuming fixed single-CPU/Codec/Platform. This patch prepares multi-CPU/Codec/Platform support. Note is that it is not yet full-multi-support. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87v996od2c.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 9104457ea524391112f4a4fd685ea532550a29b1 Author: Xiaofei Tan Date: Sat Mar 27 11:47:01 2021 +0800 ACPI: AC: fix some coding style issues Fix some coding style issues reported by checkpatch.pl, including the following types: ERROR: "foo * bar" should be "foo *bar" ERROR: code indent should use tabs where possible WARNING: Block comments use a trailing */ on a separate line WARNING: braces {} are not necessary for single statement blocks WARNING: void function return statements are not generally useful WARNING: CVS style keyword markers, these will _not_ be updated Signed-off-by: Xiaofei Tan Signed-off-by: Rafael J. Wysocki commit 3efe7a878a11c13b5297057bfc1e5639ce1241ce Author: Tony Lindgren Date: Tue Mar 23 09:43:25 2021 +0200 clocksource/drivers/timer-ti-dm: Prepare to handle dra7 timer wrap issue There is a timer wrap issue on dra7 for the ARM architected timer. In a typical clock configuration the timer fails to wrap after 388 days. To work around the issue, we need to use timer-ti-dm timers instead. Let's prepare for adding support for percpu timers by adding a common dmtimer_clkevt_init_common() and call it from dmtimer_clockevent_init(). This patch makes no intentional functional changes. Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210323074326.28302-2-tony@atomide.com commit 794aaf01444d4e765e2b067cba01cc69c1c68ed9 Author: William A. Kennington III Date: Wed Apr 7 02:55:27 2021 -0700 spi: Fix use-after-free with devm_spi_alloc_* We can't rely on the contents of the devres list during spi_unregister_controller(), as the list is already torn down at the time we perform devres_find() for devm_spi_release_controller. This causes devices registered with devm_spi_alloc_{master,slave}() to be mistakenly identified as legacy, non-devm managed devices and have their reference counters decremented below 0. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 660 at lib/refcount.c:28 refcount_warn_saturate+0x108/0x174 [] (refcount_warn_saturate) from [] (kobject_put+0x90/0x98) [] (kobject_put) from [] (put_device+0x20/0x24) r4:b6700140 [] (put_device) from [] (devm_spi_release_controller+0x3c/0x40) [] (devm_spi_release_controller) from [] (release_nodes+0x84/0xc4) r5:b6700180 r4:b6700100 [] (release_nodes) from [] (devres_release_all+0x5c/0x60) r8:b1638c54 r7:b117ad94 r6:b1638c10 r5:b117ad94 r4:b163dc10 [] (devres_release_all) from [] (__device_release_driver+0x144/0x1ec) r5:b117ad94 r4:b163dc10 [] (__device_release_driver) from [] (device_driver_detach+0x84/0xa0) r9:00000000 r8:00000000 r7:b117ad94 r6:b163dc54 r5:b1638c10 r4:b163dc10 [] (device_driver_detach) from [] (unbind_store+0xe4/0xf8) Instead, determine the devm allocation state as a flag on the controller which is guaranteed to be stable during cleanup. Fixes: 5e844cc37a5c ("spi: Introduce device-managed SPI controller allocation") Signed-off-by: William A. Kennington III Link: https://lore.kernel.org/r/20210407095527.2771582-1-wak@google.com Signed-off-by: Mark Brown commit a21fbc42807b15b74b0891bd557063e6acf4fcae Author: Dinghao Liu Date: Thu Apr 8 17:25:59 2021 +0800 spi: spi-zynqmp-gqspi: Fix runtime PM imbalance in zynqmp_qspi_probe When platform_get_irq() fails, a pairing PM usage counter increment is needed to keep the counter balanced. It's the same for the following error paths. Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20210408092559.3824-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown commit 7b3f5b207da5116add56c335c5fb92cee140dc63 Author: Dinghao Liu Date: Thu Apr 8 14:40:34 2021 +0800 ASoC: codecs: Fix runtime PM imbalance in tas2552_probe There is a rumtime PM imbalance between the error handling path after devm_snd_soc_register_component() and all other error handling paths. Add a PM runtime increment to balance refcount. Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20210408064036.6691-1-dinghao.liu@zju.edu.cn Signed-off-by: Mark Brown commit 44de8d80dba4e65f4fe7c17ea4be75e3cf9a902c Author: Jack Yu Date: Thu Apr 8 08:32:40 2021 +0000 ASoC: rt1011: remove pack_id check in rt1011 For latest design, different package could use the same setting, therefore the check of pack_id will no longer be used. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/4cbe1cd3b8664140889132464c7dee7b@realtek.com Signed-off-by: Mark Brown commit 775c93a7c5b4d31f716db21fd097a64e9b5bf3b7 Author: Niklas Söderlund Date: Sun Mar 28 18:42:22 2021 +0200 docs: pin-control: Fix error path for control state example The error is constructed using the wrong variable. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210328164222.720525-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Linus Walleij commit 8a83ecd8ec6ce8c1c15e00a8ae3ebc71107ef044 Author: Fabio Estevam Date: Sun Mar 28 15:30:34 2021 -0300 pinctrl: imx: Disallow driver unbind Performing the 'unbind' operation on pinctrl drivers is not a sensible usecase, so pass the suppress_bind_attrs atribute to prevent it. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210328183034.555702-2-festevam@gmail.com Signed-off-by: Linus Walleij commit f6b6db2dfd617522de702d85095d6d33e3b86e93 Author: Fabio Estevam Date: Sun Mar 28 15:30:33 2021 -0300 pinctrl: imx: Remove unneeded of_match_ptr() i.MX is a DT-only platform, so of_match_ptr() can be safely removed. Remove the unneeded of_match_ptr(). Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210328183034.555702-1-festevam@gmail.com Signed-off-by: Linus Walleij commit 57c855f742c192a42fc4f37c8aff6ebebb61ae72 Author: Junlin Yang Date: Tue Mar 30 14:26:55 2021 +0800 pinctrl: ti: fix error return code of ti_iodelay_dt_node_to_map() when devm_kcalloc fails, use -ENOMEM instead of -EINVAL, and consistent with other devm_kcalloc return values. Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210330062655.1027-1-angkery@163.com Signed-off-by: Linus Walleij commit 5630c1009bd960c37ddb3c80055668f59fbeabcb Author: Manivannan Sadhasivam Date: Thu Apr 8 19:15:29 2021 +0530 bus: mhi: pci_generic: Constify mhi_controller_config struct definitions "mhi_controller_config" struct is not modified inside "mhi_pci_dev_info" struct. So constify the instances. Signed-off-by: Manivannan Sadhasivam commit aac426562f568520b674f0d5ae3929977be9f1c0 Author: Jarvis Jiang Date: Thu Apr 8 02:55:24 2021 -0700 bus: mhi: pci_generic: Introduce Foxconn T99W175 support Add support for T99W175 modems, this modem series is based on SDX55 qcom chip. The modem is mainly based on MBIM protocol for both the data and control path. This patch adds support for below modems: - T99W175(based on sdx55), Both for eSIM and Non-eSIM - DW5930e(based on sdx55), With eSIM, It's also T99W175 - DW5930e(based on sdx55), Non-eSIM, It's also T99W175 This patch was tested with Ubuntu 20.04 X86_64 PC as host Signed-off-by: Jarvis Jiang Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/20210408095524.3559-1-jarvis.w.jiang@gmail.com Signed-off-by: Manivannan Sadhasivam commit c0dadc0e47a895e95c17a4df1fa12737e1d57d6f Author: Jianqun Xu Date: Fri Mar 19 16:14:41 2021 +0800 pinctrl: rockchip: add support for rk3568 RK3568 SoCs have 5 gpio controllers, each gpio has 32 pins. GPIO supports set iomux, pull, drive strength and schmitt. Signed-off-by: Jianqun Xu Link: https://lore.kernel.org/r/20210319081441.368358-1-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit 8a16ffdc4cf37c1e6204054b0fb44052c8a48f0d Author: Ilan Peer Date: Thu Apr 8 14:32:24 2021 +0200 cfg80211: Remove wrong RNR IE validation check Remove a wrong length check for RNR information element as it can have arbitrary length. Signed-off-by: Ilan Peer Link: https://lore.kernel.org/r/20210408143224.c7eeaf1a5270.Iead7762982e941a1cbff93f68bf8b5139447ff0c@changeid Signed-off-by: Johannes Berg commit db878e27a98106a70315d264cc92230d84009e72 Author: Johannes Berg Date: Thu Apr 8 14:31:50 2021 +0200 mac80211: bail out if cipher schemes are invalid If any of the cipher schemes specified by the driver are invalid, bail out and fail the registration rather than just warning. Otherwise, we might later crash when we try to use the invalid cipher scheme, e.g. if the hdr_len is (significantly) less than the pn_offs + pn_len, we'd have an out-of-bounds access in RX validation. Fixes: 2475b1cc0d52 ("mac80211: add generic cipher scheme support") Link: https://lore.kernel.org/r/20210408143149.38a3a13a1b19.I6b7f5790fa0958ed8049cf02ac2a535c61e9bc96@changeid Signed-off-by: Johannes Berg commit d6843d1ee283137723b4a8c76244607ce6db1951 Author: Emmanuel Grumbach Date: Thu Apr 8 14:31:25 2021 +0200 mac80211: clear the beacon's CRC after channel switch After channel switch, we should consider any beacon with a CSA IE as a new switch. If the CSA IE is a leftover from before the switch that the AP forgot to remove, we'll get a CSA-to-Self. This caused issues in iwlwifi where the firmware saw a beacon with a CSA-to-Self with mode = 1 on the new channel after a switch. The firmware considered this a new switch and closed its queues. Since the beacon didn't change between before and after the switch, we wouldn't handle it (the CRC is the same) and we wouldn't let the firmware open its queues again or disconnect if the CSA IE stays for too long. Clear the CRC valid state after we switch to make sure that we handle the beacon and handle the CSA IE as required. Signed-off-by: Emmanuel Grumbach Link: https://lore.kernel.org/r/20210408143124.b9e68aa98304.I465afb55ca2c7d59f7bf610c6046a1fd732b4c28@changeid Signed-off-by: Johannes Berg commit 96a7109a16665255b65d021e24141c2edae0e202 Author: Johan Almbladh Date: Thu Apr 1 18:44:55 2021 +0200 mac80211: Set priority and queue mapping for injected frames Some drivers, for example mt76, use the skb priority field, and expects that to be consistent with the skb queue mapping. On some frame injection code paths that was not true, and it broke frame injection. Now the skb queue mapping is set according to the skb priority value when the frame is injected. The skb priority value is also derived from the frame data for all frame types, as it was done prior to commit dbd50a851c50 (only allocate one queue when using iTXQs). Fixes frame injection with the mt76 driver on MT7610E chipset. Signed-off-by: Johan Almbladh Link: https://lore.kernel.org/r/20210401164455.978245-1-johan.almbladh@anyfinetworks.com Signed-off-by: Johannes Berg commit 127ce0b14133f48a5635faa9dac69a3a99f85146 Author: Marc Zyngier Date: Thu Apr 8 14:31:24 2021 +0100 KVM: arm64: Fix table format for PTP documentation The documentation build legitimately screams about the PTP documentation table being misformated. Fix it by adjusting the table width guides. Reported-by: Stephen Rothwell Signed-off-by: Marc Zyngier commit 55f8205e7dddb2151def733cefbbf63deba9e1a5 Author: Sriram R Date: Tue Mar 30 07:05:16 2021 +0530 mac80211: Allow concurrent monitor iface and ethernet rx decap Some HW/driver can support passing ethernet rx decap frames and raw 802.11 frames for the monitor interface concurrently and via separate RX calls to mac80211. Packets going to the monitor interface(s) would be in 802.11 format and thus not have the RX_FLAG_8023 set, and 802.11 format monitoring frames should have RX_FLAG_ONLY_MONITOR set. Drivers doing such can enable the SUPPORTS_CONC_MON_RX_DECAP to allow using ethernet decap offload while a monitor interface is active, currently RX decapsulation offload gets disabled when a monitor interface is added. Signed-off-by: Sriram R Link: https://lore.kernel.org/r/1617068116-32253-1-git-send-email-srirrama@codeaurora.org [add proper documentation, rewrite commit message] Signed-off-by: Johannes Berg commit a4122a95ce6a6058a75266a3603f0e27721e5dd3 Author: Andreas Gruenbacher Date: Wed Apr 7 00:59:03 2021 +0200 gfs2: Make gfs2_setattr_simple static This function is only used in inode.c. Signed-off-by: Andreas Gruenbacher commit 9f9eb5a516e3750aec9342427457c6da849838cd Author: Bob Peterson Date: Fri May 22 13:54:41 2020 -0500 gfs2: Add new sysfs file for gfs2 status This patch adds a new file: /sys/fs/gfs2/*/status which will report the status of the file system. Catting this file dumps the current status of the file system according to various superblock variables. For example: Journal Checked: 1 Journal Live: 1 Journal ID: 0 Spectator: 0 Withdrawn: 0 No barriers: 0 No recovery: 0 Demote: 0 No Journal ID: 1 Mounted RO: 0 RO Recovery: 0 Skip DLM Unlock: 0 Force AIL Flush: 0 FS Frozen: 0 Withdrawing: 0 Withdraw In Prog: 0 Remote Withdraw: 0 Withdraw Recovery: 0 sd_log_error: 0 sd_log_flush_lock: 0 sd_log_num_revoke: 0 sd_log_in_flight: 0 sd_log_blks_needed: 0 sd_log_blks_free: 32768 sd_log_flush_head: 0 sd_log_flush_tail: 5384 sd_log_blks_reserved: 0 sd_log_revokes_available: 503 Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit be318fd85bf2c73c10850a6ce50a87e6f0068926 Author: Christian König Date: Thu Apr 1 14:50:15 2021 +0200 drm/sched: add missing member documentation Just fix a warning. Signed-off-by: Christian König Reported-by: Stephen Rothwell Fixes: f2f12eb9c32b ("drm/scheduler: provide scheduler score externally") Reviewed-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210401125213.138855-1-christian.koenig@amd.com commit 68ae256945d2abe9036a7b68af4cc65aff79d5b7 Author: Yang Yingliang Date: Wed Apr 7 17:19:03 2021 +0800 power: supply: s3c_adc_battery: fix possible use-after-free in s3c_adc_bat_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit b6cfa007b3b229771d9588970adb4ab3e0487f49 Author: Yang Yingliang Date: Wed Apr 7 17:17:06 2021 +0800 power: supply: generic-adc-battery: fix possible use-after-free in gab_remove() This driver's remove path calls cancel_delayed_work(). However, that function does not wait until the work function finishes. This means that the callback function may still be running after the driver's remove function has finished, which would result in a use-after-free. Fix by calling cancel_delayed_work_sync(), which ensures that the work is properly cancelled, no longer running, and unable to re-schedule itself. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Sebastian Reichel commit e61ffb344591fca443be4fc633290cbf15ee3298 Author: Maximilian Luz Date: Tue Apr 6 01:41:26 2021 +0200 power: supply: Add AC driver for Surface Aggregator Module On newer Microsoft Surface models (specifically 7th-generation, i.e. Surface Pro 7, Surface Book 3, Surface Laptop 3, and Surface Laptop Go), battery and AC status/information is no longer handled via standard ACPI devices, but instead directly via the Surface System Aggregator Module (SSAM), i.e. the embedded controller on those devices. While on previous generation models, AC status is also handled via SSAM, an ACPI shim was present to translate the standard ACPI AC interface to SSAM requests. The SSAM interface itself, which is modeled closely after the ACPI interface, has not changed. This commit introduces a new SSAM client device driver to support AC status/information via the aforementioned interface on said Surface models. Signed-off-by: Maximilian Luz Signed-off-by: Sebastian Reichel commit 167f77f7d0b3891941866ae66f9cf4362ec33f93 Author: Maximilian Luz Date: Tue Apr 6 01:41:25 2021 +0200 power: supply: Add battery driver for Surface Aggregator Module On newer Microsoft Surface models (specifically 7th-generation, i.e. Surface Pro 7, Surface Book 3, Surface Laptop 3, and Surface Laptop Go), battery and AC status/information is no longer handled via standard ACPI devices, but instead directly via the Surface System Aggregator Module (SSAM), i.e. the embedded controller on those devices. While on previous generation models, battery status is also handled via SSAM, an ACPI shim was present to translate the standard ACPI battery interface to SSAM requests. The SSAM interface itself, which is modeled closely after the ACPI interface, has not changed. This commit introduces a new SSAM client device driver to support battery status/information via the aforementioned interface on said Surface models. It is in parts based on the standard ACPI battery driver. Signed-off-by: Maximilian Luz Signed-off-by: Sebastian Reichel commit b6dc03fafe63e0e76c094e4303e6d43bc29a06d7 Merge: 04722cec1436c aebf0a11a8c1f Author: Sebastian Reichel Date: Thu Apr 8 14:30:07 2021 +0200 Merge tag 'tags/platform-drivers-x86-surface-aggregator-v5.13-1' into psy-next Signed tag for the immutable platform-surface-aggregator-registry branch for merging into other sub-systems. Note this is based on v5.12-rc2. Signed-off-by: Sebastian Reichel commit 53375a5a218e7ea0ac18087946b5391f749b764f Author: Peter Zijlstra Date: Mon Mar 15 17:12:53 2021 +0100 x86/cpu: Resort and comment Intel models The INTEL_FAM6 list has become a mess again. Try and bring some sanity back into it. Where previously we had one microarch per year and a number of SKUs within that, this no longer seems to be the case. We now get different uarch names that share a 'core' design. Add the core name starting at skylake and reorder to keep the cores in chronological order. Furthermore, Intel marketed the names {Amber, Coffee, Whiskey} Lake, but those are in fact steppings of Kaby Lake, add comments for them. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/YE+HhS8i0gshHD3W@hirez.programming.kicks-ass.net commit 70918779aec9bd01d16f4e6e800ffe423d196021 Author: Kees Cook Date: Thu Apr 1 16:23:46 2021 -0700 arm64: entry: Enable random_kstack_offset support Allow for a randomized stack offset on a per-syscall basis, with roughly 5 bits of entropy. (And include AAPCS rationale AAPCS thanks to Mark Rutland.) In order to avoid unconditional stack canaries on syscall entry (due to the use of alloca()), also disable stack protector to avoid triggering needless checks and slowing down the entry path. As there is no general way to control stack protector coverage with a function attribute[1], this must be disabled at the compilation unit level. This isn't a problem here, though, since stack protector was not triggered before: examining the resulting syscall.o, there are no changes in canary coverage (none before, none now). [1] a working __attribute__((no_stack_protector)) has been added to GCC and Clang but has not been released in any version yet: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=346b302d09c1e6db56d9fe69048acb32fbb97845 https://reviews.llvm.org/rG4fbf84c1732fca596ad1d6e96015e19760eb8a9b Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210401232347.2791257-6-keescook@chromium.org commit 68ef8735d253f3d840082b78f996bf2d89ee6e5f Author: Kees Cook Date: Thu Apr 1 16:23:47 2021 -0700 lkdtm: Add REPORT_STACK for checking stack offsets For validating the stack offset behavior, report the offset from a given process's first seen stack address. Add s script to calculate the results to the LKDTM kselftests. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210401232347.2791257-7-keescook@chromium.org commit fe950f6020338c8ac668ef823bb692d36b7542a2 Author: Kees Cook Date: Thu Apr 1 16:23:45 2021 -0700 x86/entry: Enable random_kstack_offset support Allow for a randomized stack offset on a per-syscall basis, with roughly 5-6 bits of entropy, depending on compiler and word size. Since the method of offsetting uses macros, this cannot live in the common entry code (the stack offset needs to be retained for the life of the syscall, which means it needs to happen at the actual entry point). Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210401232347.2791257-5-keescook@chromium.org commit 39218ff4c625dbf2e68224024fe0acaa60bcd51a Author: Kees Cook Date: Thu Apr 1 16:23:44 2021 -0700 stack: Optionally randomize kernel stack offset each syscall This provides the ability for architectures to enable kernel stack base address offset randomization. This feature is controlled by the boot param "randomize_kstack_offset=on/off", with its default value set by CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT. This feature is based on the original idea from the last public release of PaX's RANDKSTACK feature: https://pax.grsecurity.net/docs/randkstack.txt All the credit for the original idea goes to the PaX team. Note that the design and implementation of this upstream randomize_kstack_offset feature differs greatly from the RANDKSTACK feature (see below). Reasoning for the feature: This feature aims to make harder the various stack-based attacks that rely on deterministic stack structure. We have had many such attacks in past (just to name few): https://jon.oberheide.org/files/infiltrate12-thestackisback.pdf https://jon.oberheide.org/files/stackjacking-infiltrate11.pdf https://googleprojectzero.blogspot.com/2016/06/exploiting-recursion-in-linux-kernel_20.html As Linux kernel stack protections have been constantly improving (vmap-based stack allocation with guard pages, removal of thread_info, STACKLEAK), attackers have had to find new ways for their exploits to work. They have done so, continuing to rely on the kernel's stack determinism, in situations where VMAP_STACK and THREAD_INFO_IN_TASK_STRUCT were not relevant. For example, the following recent attacks would have been hampered if the stack offset was non-deterministic between syscalls: https://repositorio-aberto.up.pt/bitstream/10216/125357/2/374717.pdf (page 70: targeting the pt_regs copy with linear stack overflow) https://a13xp0p0v.github.io/2020/02/15/CVE-2019-18683.html (leaked stack address from one syscall as a target during next syscall) The main idea is that since the stack offset is randomized on each system call, it is harder for an attack to reliably land in any particular place on the thread stack, even with address exposures, as the stack base will change on the next syscall. Also, since randomization is performed after placing pt_regs, the ptrace-based approach[1] to discover the randomized offset during a long-running syscall should not be possible. Design description: During most of the kernel's execution, it runs on the "thread stack", which is pretty deterministic in its structure: it is fixed in size, and on every entry from userspace to kernel on a syscall the thread stack starts construction from an address fetched from the per-cpu cpu_current_top_of_stack variable. The first element to be pushed to the thread stack is the pt_regs struct that stores all required CPU registers and syscall parameters. Finally the specific syscall function is called, with the stack being used as the kernel executes the resulting request. The goal of randomize_kstack_offset feature is to add a random offset after the pt_regs has been pushed to the stack and before the rest of the thread stack is used during the syscall processing, and to change it every time a process issues a syscall. The source of randomness is currently architecture-defined (but x86 is using the low byte of rdtsc()). Future improvements for different entropy sources is possible, but out of scope for this patch. Further more, to add more unpredictability, new offsets are chosen at the end of syscalls (the timing of which should be less easy to measure from userspace than at syscall entry time), and stored in a per-CPU variable, so that the life of the value does not stay explicitly tied to a single task. As suggested by Andy Lutomirski, the offset is added using alloca() and an empty asm() statement with an output constraint, since it avoids changes to assembly syscall entry code, to the unwinder, and provides correct stack alignment as defined by the compiler. In order to make this available by default with zero performance impact for those that don't want it, it is boot-time selectable with static branches. This way, if the overhead is not wanted, it can just be left turned off with no performance impact. The generated assembly for x86_64 with GCC looks like this: ... ffffffff81003977: 65 8b 05 02 ea 00 7f mov %gs:0x7f00ea02(%rip),%eax # 12380 ffffffff8100397e: 25 ff 03 00 00 and $0x3ff,%eax ffffffff81003983: 48 83 c0 0f add $0xf,%rax ffffffff81003987: 25 f8 07 00 00 and $0x7f8,%eax ffffffff8100398c: 48 29 c4 sub %rax,%rsp ffffffff8100398f: 48 8d 44 24 0f lea 0xf(%rsp),%rax ffffffff81003994: 48 83 e0 f0 and $0xfffffffffffffff0,%rax ... As a result of the above stack alignment, this patch introduces about 5 bits of randomness after pt_regs is spilled to the thread stack on x86_64, and 6 bits on x86_32 (since its has 1 fewer bit required for stack alignment). The amount of entropy could be adjusted based on how much of the stack space we wish to trade for security. My measure of syscall performance overhead (on x86_64): lmbench: /usr/lib/lmbench/bin/x86_64-linux-gnu/lat_syscall -N 10000 null randomize_kstack_offset=y Simple syscall: 0.7082 microseconds randomize_kstack_offset=n Simple syscall: 0.7016 microseconds So, roughly 0.9% overhead growth for a no-op syscall, which is very manageable. And for people that don't want this, it's off by default. There are two gotchas with using the alloca() trick. First, compilers that have Stack Clash protection (-fstack-clash-protection) enabled by default (e.g. Ubuntu[3]) add pagesize stack probes to any dynamic stack allocations. While the randomization offset is always less than a page, the resulting assembly would still contain (unreachable!) probing routines, bloating the resulting assembly. To avoid this, -fno-stack-clash-protection is unconditionally added to the kernel Makefile since this is the only dynamic stack allocation in the kernel (now that VLAs have been removed) and it is provably safe from Stack Clash style attacks. The second gotcha with alloca() is a negative interaction with -fstack-protector*, in that it sees the alloca() as an array allocation, which triggers the unconditional addition of the stack canary function pre/post-amble which slows down syscalls regardless of the static branch. In order to avoid adding this unneeded check and its associated performance impact, architectures need to carefully remove uses of -fstack-protector-strong (or -fstack-protector) in the compilation units that use the add_random_kstack() macro and to audit the resulting stack mitigation coverage (to make sure no desired coverage disappears). No change is visible for this on x86 because the stack protector is already unconditionally disabled for the compilation unit, but the change is required on arm64. There is, unfortunately, no attribute that can be used to disable stack protector for specific functions. Comparison to PaX RANDKSTACK feature: The RANDKSTACK feature randomizes the location of the stack start (cpu_current_top_of_stack), i.e. including the location of pt_regs structure itself on the stack. Initially this patch followed the same approach, but during the recent discussions[2], it has been determined to be of a little value since, if ptrace functionality is available for an attacker, they can use PTRACE_PEEKUSR/PTRACE_POKEUSR to read/write different offsets in the pt_regs struct, observe the cache behavior of the pt_regs accesses, and figure out the random stack offset. Another difference is that the random offset is stored in a per-cpu variable, rather than having it be per-thread. As a result, these implementations differ a fair bit in their implementation details and results, though obviously the intent is similar. [1] https://lore.kernel.org/kernel-hardening/2236FBA76BA1254E88B949DDB74E612BA4BC57C1@IRSMSX102.ger.corp.intel.com/ [2] https://lore.kernel.org/kernel-hardening/20190329081358.30497-1-elena.reshetova@intel.com/ [3] https://lists.ubuntu.com/archives/ubuntu-devel/2019-June/040741.html Co-developed-by: Elena Reshetova Signed-off-by: Elena Reshetova Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210401232347.2791257-4-keescook@chromium.org commit 51cba1ebc60df9c4ce034a9f5441169c0d0956c0 Author: Kees Cook Date: Thu Apr 1 16:23:43 2021 -0700 init_on_alloc: Optimize static branches The state of CONFIG_INIT_ON_ALLOC_DEFAULT_ON (and ...ON_FREE...) did not change the assembly ordering of the static branches: they were always out of line. Use the new jump_label macros to check the CONFIG settings to default to the "expected" state, which slightly optimizes the resulting assembly code. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Reviewed-by: Alexander Potapenko Acked-by: Vlastimil Babka Link: https://lore.kernel.org/r/20210401232347.2791257-3-keescook@chromium.org commit 0d66ccc1627013c95f1e7ef10b95b8451cd7834e Author: Kees Cook Date: Thu Apr 1 16:23:42 2021 -0700 jump_label: Provide CONFIG-driven build state defaults As shown in the comment in jump_label.h, choosing the initial state of static branches changes the assembly layout. If the condition is expected to be likely it's inline, and if unlikely it is out of line via a jump. A few places in the kernel use (or could be using) a CONFIG to choose the default state, which would give a small performance benefit to their compile-time declared default. Provide the infrastructure to do this. Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210401232347.2791257-2-keescook@chromium.org commit 66c6d1ef86ff3c1466e646d94c8eb3dcc9ccf873 Author: Takashi Sakamoto Date: Thu Apr 8 19:31:49 2021 +0900 ALSA: control: Add memory consumption limit to user controls ALSA control interface allows users to add arbitrary control elements (called "user controls" or "user elements"), and its resource usage is limited just by the max number of control sets (currently 32). This limit, however, is quite loose: each allocation of control set may have 1028 elements, and each element may have up to 512 bytes (ILP32) or 1024 bytes (LP64) of value data. Moreover, each control set may contain the enum strings and TLV data, which can be up to 64kB and 128kB, respectively. Totally, the whole memory consumption may go over 38MB -- it's quite large, and we'd rather like to reduce the size. OTOH, there have been other requests even to increase the max number of user elements; e.g. ALSA firewire stack require the more user controls, hence we want to raise the bar, too. For satisfying both requirements, this patch changes the management of user controls: instead of setting the upper limit of the number of user controls, we check the actual memory allocation size and set the upper limit of the total allocation in bytes. As long as the memory consumption stays below the limit, more user controls are allowed than the current limit 32. At the same time, we set the lower limit (8MB) as default than the current theoretical limit, in order to lower the risk of DoS. As a compromise for lowering the default limit, now the actual memory limit is defined as a module option, 'max_user_ctl_alloc_size', so that user can increase/decrease the limit if really needed, too. Link: https://lore.kernel.org/r/s5htur3zl5e.wl-tiwai@suse.de Co-developed-by: Takashi Iwai Reviewed-by: Takashi Sakamoto Tested-by: Takashi Sakamoto Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210408103149.40357-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 397dc6f7ca3c858dc95800f299357311ccf679e6 Author: Dinh Nguyen Date: Mon Mar 22 07:18:44 2021 -0500 clocksource/drivers/dw_apb_timer_of: Add handling for potential memory leak Add calls to disable the clock and unmap the timer base address in case of any failures. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Dinh Nguyen Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210322121844.2271041-1-dinguyen@kernel.org commit 690daddcb60246d8a510aaad7b954bcc53eba17e Author: Jonathan Neuschäfer Date: Sat Mar 20 19:16:06 2021 +0100 clocksource/drivers/npcm: Add support for WPCM450 Add a compatible string for WPCM450, which has essentially the same timer controller. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210320181610.680870-11-j.neuschaefer@gmx.net commit 68c70aae06e9660473a00fd7d68e0b53f4d7b6f4 Author: Wolfram Sang Date: Tue Mar 9 10:44:48 2021 +0100 clocksource/drivers/sh_cmt: Don't use CMTOUT_IE with R-Car Gen2/3 CMTOUT_IE is only supported for older SoCs. Newer SoCs shall not set this bit. So, add a version check. Reported-by: Phong Hoang Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Wolfram Sang Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210309094448.31823-1-wsa+renesas@sang-engineering.com commit a47d7ef4550d08fb428ea4c3f1a9c71674212208 Author: Drew Fustini Date: Fri Mar 5 01:03:17 2021 -0800 clocksource/drivers/pistachio: Fix trivial typo Fix trivial typo, rename local variable from 'overflw' to 'overflow' in pistachio_clocksource_read_cycles(). Reported-by: Gustavo A. R. Silva Signed-off-by: Drew Fustini Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210305090315.384547-1-drew@beagleboard.org commit 2a65f7e2772613debd03fa2492e76a635aa04545 Author: Wei Yongjun Date: Mon Mar 8 12:30:31 2021 +0000 clocksource/drivers/ingenic_ost: Fix return value check in ingenic_ost_probe() In case of error, the function device_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: ca7b72b5a5f2 ("clocksource: Add driver for the Ingenic JZ47xx OST") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210308123031.2285083-1-weiyongjun1@huawei.com commit ac4daf737674b4d29e19b7c300caff3bcf7160d8 Author: Tony Lindgren Date: Thu Mar 4 09:21:35 2021 +0200 clocksource/drivers/timer-ti-dm: Add missing set_state_oneshot_stopped To avoid spurious timer interrupts when KTIME_MAX is used, we need to configure set_state_oneshot_stopped(). Although implementing this is optional, it still affects things like power management for the extra timer interrupt. For more information, please see commit 8fff52fd5093 ("clockevents: Introduce CLOCK_EVT_STATE_ONESHOT_STOPPED state") and commit cf8c5009ee37 ("clockevents/drivers/arm_arch_timer: Implement ->set_state_oneshot_stopped()"). Fixes: 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support") Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210304072135.52712-4-tony@atomide.com commit 212709926c5493a566ca4086ad4f4b0d4e66b553 Author: Tony Lindgren Date: Thu Mar 4 09:21:33 2021 +0200 clocksource/drivers/timer-ti-dm: Fix posted mode status check order When the timer is configured in posted mode, we need to check the write- posted status register (TWPS) before writing to the register. We now check TWPS after the write starting with commit 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support"). For example, in the TRM for am571x the following is documented in chapter "22.2.4.13.1.1 Write Posting Synchronization Mode": "For each register, a status bit is provided in the timer write-posted status (TWPS) register. In this mode, it is mandatory that software check this status bit before any write access. If a write is attempted to a register with a previous access pending, the previous access is discarded without notice." The regression happened when I updated the code to use standard read/write accessors for the driver instead of using __omap_dm_timer_load_start(). We have__omap_dm_timer_load_start() check the TWPS status correctly using __omap_dm_timer_write(). Fixes: 52762fbd1c47 ("clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support") Signed-off-by: Tony Lindgren Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210304072135.52712-2-tony@atomide.com commit 446e1a943554e07a4e6431fff6dd06c0f130895a Author: Niklas Söderlund Date: Thu Feb 11 15:33:44 2021 +0100 dt-bindings: timer: renesas,cmt: Document R8A77961 Add missing bindings for M3-W+. Signed-off-by: Niklas Söderlund Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210211143344.352588-1-niklas.soderlund+renesas@ragnatech.se commit fe8324f37cfebf72e2669e97b9d76ea9794d2972 Author: Wolfram Sang Date: Thu Mar 11 10:09:18 2021 +0100 dt-bindings: timer: renesas,cmt: Add r8a779a0 CMT support Signed-off-by: Wolfram Sang Reviewed-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210311090918.2197-1-wsa+renesas@sang-engineering.com commit 352408aff91d06fd2f0e35d52079bd0cd70cd29e Author: Paul Cercueil Date: Mon Mar 8 21:23:02 2021 +0000 clocksource/drivers/ingenic-ost: Add support for the JZ4760B The OST in the JZ4760B SoC works exactly the same as in the JZ4770. But since the JZ4760B is older, its Device Tree string does not fall back to the JZ4770 one; so add support for the JZ4760B compatible string here. Signed-off-by: Paul Cercueil Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210308212302.10288-3-paul@crapouillou.net commit 8a3f717f35a3e9a28a935f8e4459c72ba00e90ca Author: Paul Cercueil Date: Mon Mar 8 21:23:01 2021 +0000 clocksource/drivers/ingenic: Add support for the JZ4760 Add support for the TCU (Timer/Counter Unit) of the JZ4760 and JZ4760B SoCs. Signed-off-by: Paul Cercueil Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210308212302.10288-2-paul@crapouillou.net commit 507d8c5a418a5d413bf9751d4ff94b259e947736 Author: Paul Cercueil Date: Mon Mar 8 21:23:00 2021 +0000 dt-bindings: timer: ingenic: Add compatible strings for JZ4760(B) Add compatible strings to support the system timer, clocksource, OST, watchdog and PWM blocks of the JZ4760 and JZ4760B SoCs. Newer SoCs which behave like the JZ4760 or JZ4760B now see their compatible string require a fallback compatible string that corresponds to one of these two SoCs. Signed-off-by: Paul Cercueil Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210308212302.10288-1-paul@crapouillou.net commit c4d814416fe3f5eb27438209a83582d7508ba80a Author: Niklas Söderlund Date: Thu Feb 11 15:31:02 2021 +0100 dt-bindings: timer: renesas,tmu: Document missing Gen3 SoCs Add missing bindings for Gen3 SoCs. Signed-off-by: Niklas Söderlund Reviewed-by: Rob Herring Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210211143102.350719-1-niklas.soderlund+renesas@ragnatech.se commit 13e133ea1a6b864f16663c3f8941f33e25593de3 Author: Guobin Huang Date: Tue Apr 6 19:55:14 2021 +0800 gma500: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1617710114-48071-1-git-send-email-huangguobin4@huawei.com commit 7d2d16ccf15d8eb84accfaf44a0b324f36e39588 Author: Hector Martin Date: Thu Feb 4 22:30:21 2021 +0900 arm64: apple: Add initial Apple Mac mini (M1, 2020) devicetree This currently supports: * SMP (via spin-tables) * AIC IRQs * Serial (with earlycon) * Framebuffer A number of properties are dynamic, and based on system firmware decisions that vary from version to version. These are expected to be filled in by the loader. Reviewed-by: Rob Herring Signed-off-by: Hector Martin commit aad9742f0c8f81d47d00886dfdd4d65bb9e836f2 Author: Hector Martin Date: Fri Feb 5 00:16:05 2021 +0900 dt-bindings: display: Add apple,simple-framebuffer Apple SoCs run firmware that sets up a simplefb-compatible framebuffer for us. Add a compatible for it, and two missing supported formats. Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Hector Martin commit aea5f69f2e9181054fbcec56870be4143814c69b Author: Hector Martin Date: Wed Jan 20 16:51:23 2021 +0900 arm64: Kconfig: Introduce CONFIG_ARCH_APPLE This adds a Kconfig option to toggle support for Apple ARM SoCs. At this time this targets the M1 and later "Apple Silicon" Mac SoCs. Signed-off-by: Hector Martin commit 76cde26394114f6af2710c6b2ad6854f1e8ee859 Author: Hector Martin Date: Thu Jan 21 08:55:15 2021 +0900 irqchip/apple-aic: Add support for the Apple Interrupt Controller This is the root interrupt controller used on Apple ARM SoCs such as the M1. This irqchip driver performs multiple functions: * Handles both IRQs and FIQs * Drives the AIC peripheral itself (which handles IRQs) * Dispatches FIQs to downstream hard-wired clients (currently the ARM timer). * Implements a virtual IPI multiplexer to funnel multiple Linux IPIs into a single hardware IPI Reviewed-by: Marc Zyngier Acked-by: Will Deacon Signed-off-by: Hector Martin commit f531d25bda553c71696bb5fc6bf90fb28c6fae36 Author: Hector Martin Date: Thu Feb 4 23:01:56 2021 +0900 dt-bindings: interrupt-controller: Add DT bindings for apple-aic AIC is the Apple Interrupt Controller found on Apple ARM SoCs, such as the M1. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Hector Martin commit 8a657f71705f9f9c2bf8308e2cfd57b9f329e0d9 Author: Hector Martin Date: Mon Mar 1 12:36:24 2021 +0900 arm64: Move ICH_ sysreg bits from arm-gic-v3.h to sysreg.h These definitions are in arm-gic-v3.h for historical reasons which no longer apply. Move them to sysreg.h so the AIC driver can use them, as it needs to peek into vGIC registers to deal with the GIC maintentance interrupt. Acked-by: Marc Zyngier Acked-by: Will Deacon Signed-off-by: Hector Martin commit 89897f739d7b5e8d572909efc3c2ba7583b8aaba Author: Hector Martin Date: Thu Feb 11 21:41:56 2021 +0900 of/address: Add infrastructure to declare MMIO as non-posted This implements the 'nonposted-mmio' boolean property. Placing this property in a bus marks all direct child devices as requiring non-posted MMIO mappings. If no such property is found, the default is posted MMIO. of_mmio_is_nonposted() performs this check to determine if a given device has requested non-posted MMIO. of_address_to_resource() uses this to set the IORESOURCE_MEM_NONPOSTED flag on resources that require non-posted MMIO. of_iomap() and of_io_request_and_map() then use this flag to pick the correct ioremap() variant. This mechanism is currently restricted to builds that support Apple ARM platforms, as an optimization. Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Hector Martin commit b10eb2d50911f98a8f1cacf00b1b677339593f4c Author: Hector Martin Date: Thu Mar 25 22:50:19 2021 +0900 asm-generic/io.h: implement pci_remap_cfgspace using ioremap_np Now that we have ioremap_np(), we can make pci_remap_cfgspace() default to it, falling back to ioremap() on platforms where it is not available. Remove the arm64 implementation, since that is now redundant. Future cleanups should be able to do the same for other arches, and eventually make the generic pci_remap_cfgspace() unconditional. Acked-by: Will Deacon Signed-off-by: Hector Martin commit 9a63ae85025526a6a5f432cfe41b6df649798aa4 Author: Hector Martin Date: Thu Feb 11 21:37:48 2021 +0900 arm64: Implement ioremap_np() to map MMIO as nGnRnE This is used on Apple ARM platforms, which require most MMIO (except PCI devices) to be mapped as nGnRnE. Acked-by: Marc Zyngier Acked-by: Will Deacon Signed-off-by: Hector Martin commit 08e9b5be9efba97804f7c9aef561dfa818c39ca5 Author: Hector Martin Date: Fri Mar 5 03:41:53 2021 +0900 docs: driver-api: device-io: Document ioremap() variants & access funcs This documents the newly introduced ioremap_np() along with all the other common ioremap() variants, and some higher-level abstractions available. Reviewed-by: Linus Walleij Signed-off-by: Hector Martin commit eeba4b01686454fbf1a790e1d69abc07d676721c Author: Arnd Bergmann Date: Fri Mar 5 04:53:50 2021 +0900 docs: driver-api: device-io: Document I/O access functions This adds more detailed descriptions of the various read/write primitives available for use with I/O memory/ports. Reviewed-by: Linus Walleij Signed-off-by: Arnd Bergmann Signed-off-by: Hector Martin commit 7c566bb5e4d5fb0d89579a90d8a1f54eaff6f95d Author: Hector Martin Date: Thu Feb 11 21:35:46 2021 +0900 asm-generic/io.h: Add a non-posted variant of ioremap() ARM64 currently defaults to posted MMIO (nGnRE), but some devices require the use of non-posted MMIO (nGnRnE). Introduce a new ioremap() variant to handle this case. ioremap_np() returns NULL on arches that do not implement this variant. sparc64 is the only architecture that needs to be touched directly, because it includes neither of the generic io.h or iomap.h headers. This adds the IORESOURCE_MEM_NONPOSTED flag, which maps to this variant and marks a given resource as requiring non-posted mappings. This is implemented in the resource system because it is a SoC-level requirement, so existing drivers do not need special-case code to pick this ioremap variant. Then this is implemented in devres by introducing devm_ioremap_np(), and making devm_ioremap_resource() automatically select this variant when the resource has the IORESOURCE_MEM_NONPOSTED flag set. Acked-by: Marc Zyngier Signed-off-by: Hector Martin commit 86332e9e3477af8f31c9d5f3e81e57e0fd2118e7 Author: Hector Martin Date: Sun Feb 14 16:11:30 2021 +0900 arm64: arch_timer: Implement support for interrupt-names This allows the devicetree to correctly represent the available set of timers, which varies from device to device, without the need for fake dummy interrupts for unavailable slots. Also add the hyp-virt timer/PPI, which is not currently used, but worth representing. Reviewed-by: Tony Lindgren Reviewed-by: Linus Walleij Reviewed-by: Marc Zyngier Signed-off-by: Hector Martin commit a6cf39fbe133857a7f26f0cab8198869caf44dee Author: Hector Martin Date: Sun Feb 14 16:07:27 2021 +0900 dt-bindings: timer: arm,arch_timer: Add interrupt-names support Not all platforms provide the same set of timers/interrupts, and Linux only needs one (plus kvm/guest ones); some platforms are working around this by using dummy fake interrupts. Implementing interrupt-names allows the devicetree to specify an arbitrary set of available interrupts, so the timer code can pick the right one. This also adds the hyp-virt timer/interrupt, which was previously not expressed in the fixed 4-interrupt form. Reviewed-by: Linus Walleij Acked-by: Marc Zyngier Reviewed-by: Tony Lindgren Reviewed-by: Rob Herring Signed-off-by: Hector Martin commit 11ecdad722daafcac09c4859dddf31b3d46449bc Author: Hector Martin Date: Thu Feb 4 22:56:13 2021 +0900 arm64: cputype: Add CPU implementor & types for the Apple M1 cores The implementor will be used to condition the FIQ support quirk. The specific CPU types are not used at the moment, but let's add them for documentation purposes. Acked-by: Will Deacon Signed-off-by: Hector Martin commit 6e33145afc84232a05eae6e05440f70683cf7eb2 Author: Hector Martin Date: Fri Feb 5 03:55:22 2021 +0900 dt-bindings: arm: cpus: Add apple,firestorm & icestorm compatibles These are the CPU cores in the "Apple Silicon" M1 SoC. Reviewed-by: Rob Herring Signed-off-by: Hector Martin commit 007bd42364b5b65264564ff9455627109b441dba Author: Hector Martin Date: Fri Feb 5 04:11:20 2021 +0900 dt-bindings: arm: apple: Add bindings for Apple ARM platforms This introduces bindings for all three 2020 Apple M1 devices: * apple,j274 - Mac mini (M1, 2020) * apple,j293 - MacBook Pro (13-inch, M1, 2020) * apple,j313 - MacBook Air (M1, 2020) Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Hector Martin commit fd8b0990d9159b981d15a202ce84b02b148d2f40 Author: Hector Martin Date: Fri Feb 5 03:29:41 2021 +0900 dt-bindings: vendor-prefixes: Add apple prefix This is different from the legacy AAPL prefix used on PPC, but consensus is that we prefer `apple` for these new platforms. Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Signed-off-by: Hector Martin commit c46bbf5d2defae50d61ddf31502017ee8952af83 Author: Christophe Leroy Date: Mon Apr 5 09:57:27 2021 +0000 powerpc/32: Remove powerpc specific definition of 'ptrdiff_t' For unknown reason, old commit d27dfd388715 ("Import pre2.0.8") changed 'ptrdiff_t' from 'int' to 'long'. GCC expects it as 'int' really, and this leads to the following warning when building KFENCE: CC mm/kfence/report.o In file included from ./include/linux/printk.h:7, from ./include/linux/kernel.h:16, from mm/kfence/report.c:10: mm/kfence/report.c: In function 'kfence_report_error': ./include/linux/kern_levels.h:5:18: warning: format '%td' expects argument of type 'ptrdiff_t', but argument 6 has type 'long int' [-Wformat=] 5 | #define KERN_SOH "\001" /* ASCII Start Of Header */ | ^~~~~~ ./include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' 11 | #define KERN_ERR KERN_SOH "3" /* error conditions */ | ^~~~~~~~ ./include/linux/printk.h:343:9: note: in expansion of macro 'KERN_ERR' 343 | printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__) | ^~~~~~~~ mm/kfence/report.c:213:3: note: in expansion of macro 'pr_err' 213 | pr_err("Out-of-bounds %s at 0x%p (%luB %s of kfence-#%td):\n", | ^~~~~~ defines it as 'int', and defines 'size_t' and 'ssize_t' exactly as powerpc do, so remove the powerpc specific definitions and fallback on generic ones. Signed-off-by: Christophe Leroy Acked-by: Segher Boessenkool Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e43d133bf52fa19e577f64f3a3a38cedc570377d.1617616601.git.christophe.leroy@csgroup.eu commit b27dadecdf9102838331b9a0b41ffc1cfe288154 Author: Randy Dunlap Date: Sun Apr 4 12:26:23 2021 -0700 powerpc: iommu: fix build when neither PCI or IBMVIO is set When neither CONFIG_PCI nor CONFIG_IBMVIO is set/enabled, iommu.c has a build error. The fault injection code is not useful in that kernel config, so make the FAIL_IOMMU option depend on PCI || IBMVIO. Prevents this build error (warning escalated to error): ../arch/powerpc/kernel/iommu.c:178:30: error: 'fail_iommu_bus_notifier' defined but not used [-Werror=unused-variable] 178 | static struct notifier_block fail_iommu_bus_notifier = { Fixes: d6b9a81b2a45 ("powerpc: IOMMU fault injection") Reported-by: kernel test robot Suggested-by: Michael Ellerman Signed-off-by: Randy Dunlap Acked-by: Randy Dunlap # build-tested Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210404192623.10697-1-rdunlap@infradead.org commit 01ed0510941ae1350c501977132bdb54630614e2 Author: Yang Li Date: Tue Apr 6 09:33:05 2021 +0800 powerpc/pseries: remove unneeded semicolon Eliminate the following coccicheck warning: ./arch/powerpc/platforms/pseries/lpar.c:1633:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1617672785-81372-1-git-send-email-yang.lee@linux.alibaba.com commit 98db179a78dd8379e9d2cbfc3f00224168a9344c Author: Nicholas Piggin Date: Tue Apr 6 12:55:08 2021 +1000 powerpc/64s: power4 nap fixup in C There is no need for this to be in asm, use the new intrrupt entry wrapper. Signed-off-by: Nicholas Piggin Tested-by: Andreas Schwab Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210406025508.821718-1-npiggin@gmail.com commit 10f8f96179ecc7f69c927f6d231f6d02736cea83 Author: Athira Rajeev Date: Tue Apr 6 12:16:01 2021 -0400 powerpc/perf: Fix PMU constraint check for EBB events The power PMU group constraints includes check for EBB events to make sure all events in a group must agree on EBB. This will prevent scheduling EBB and non-EBB events together. But in the existing check, settings for constraint mask and value is interchanged. Patch fixes the same. Before the patch, PMU selftest "cpu_event_pinned_vs_ebb_test" fails with below in dmesg logs. This happens because EBB event gets enabled along with a non-EBB cpu event. [35600.453346] cpu_event_pinne[41326]: illegal instruction (4) at 10004a18 nip 10004a18 lr 100049f8 code 1 in cpu_event_pinned_vs_ebb_test[10000000+10000] Test results after the patch: $ ./pmu/ebb/cpu_event_pinned_vs_ebb_test test: cpu_event_pinned_vs_ebb tags: git_version:v5.12-rc5-93-gf28c3125acd3-dirty Binding to cpu 8 EBB Handler is at 0x100050c8 read error on event 0x7fffe6bd4040! PM_RUN_INST_CMPL: result 9872 running/enabled 37930432 success: cpu_event_pinned_vs_ebb This bug was hidden by other logic until commit 1908dc911792 (perf: Tweak perf_event_attr::exclusive semantics). Fixes: 4df489991182 ("powerpc/perf: Add power8 EBB support") Reported-by: Thadeu Lima de Souza Cascardo Signed-off-by: Athira Rajeev [mpe: Mention commit 1908dc911792] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1617725761-1464-1-git-send-email-atrajeev@linux.vnet.ibm.com commit 812aa68ef7d4d71bed996468ead665092a3f8de9 Author: Jordan Niethe Date: Thu Feb 25 14:21:07 2021 +1100 selftests/powerpc: Suggest memtrace instead of /dev/mem for ci memory The suggested alternative for getting cache-inhibited memory with 'mem=' and /dev/mem is pretty hacky. Also, PAPR guests do not allow system memory to be mapped cache-inhibited so despite /dev/mem being available this will not work which can cause confusion. Instead recommend using the memtrace buffers. memtrace is only available on powernv so there will not be any chance of trying to do this in a guest. Signed-off-by: Jordan Niethe Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210225032108.1458352-2-jniethe5@gmail.com commit 08a022ad3dfafc7e33d4529015e14bb75179cacc Author: Jordan Niethe Date: Thu Feb 25 14:21:06 2021 +1100 powerpc/powernv/memtrace: Allow mmaping trace buffers Let the memory removed from the linear mapping to be used for the trace buffers be mmaped. This is a useful way of providing cache-inhibited memory for the alignment_handler selftest. Signed-off-by: Jordan Niethe [mpe: make memtrace_mmap() static as noticed by lkp@intel.com] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210225032108.1458352-1-jniethe5@gmail.com commit acd4dfeb49c8ec1071b1e67683c5779e97fdc5b9 Author: Michael Ellerman Date: Mon Mar 15 14:41:59 2021 +1100 powerpc/kexec: Don't use .machine ppc64 in trampoline_64.S As best as I can tell the ".machine" directive in trampoline_64.S is no longer, or never was, necessary. It was added in commit 0d97631392c2 ("powerpc: Add purgatory for kexec_file_load() implementation."), which created the file based on the kexec-tools purgatory. It may be/have-been necessary in the kexec-tools version, but we have a completely different build system, and we already pass the desired CPU flags, eg: gcc ... -m64 -Wl,-a64 -mabi=elfv2 -Wa,-maltivec -Wa,-mpower4 -Wa,-many ... arch/powerpc/purgatory/trampoline_64.S So drop the ".machine" directive and rely on the assembler flags. Reported-by: Daniel Axtens Signed-off-by: Michael Ellerman Reviewed-by: Segher Boessenkool Link: https://lore.kernel.org/r/20210315034159.315675-1-mpe@ellerman.id.au commit c6b4c9147f8b85d159f670d7bce71a93d16062a2 Author: Michael Ellerman Date: Fri Mar 26 21:12:01 2021 +1100 powerpc/64: Move security code into security.c When the original spectre/meltdown mitigations were merged we put them in setup_64.c for lack of a better place. Since then we created security.c for some of the other mitigation related code. But it should all be in there. This sort of code movement can cause trouble for backports, but hopefully this code is relatively stable these days (famous last words). Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210326101201.1973552-1-mpe@ellerman.id.au commit bd573a81312fd9d6520b1cc81a88fd29e670e1ff Author: Michael Ellerman Date: Wed Mar 31 11:38:45 2021 +1100 powerpc/mm/64s: Allow STRICT_KERNEL_RWX again We have now fixed the known bugs in STRICT_KERNEL_RWX for Book3S 64-bit Hash and Radix MMUs, see preceding commits, so allow the option to be selected again. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331003845.216246-6-mpe@ellerman.id.au commit 87e65ad7bd3a84a992723753fcc23d31c2d063c2 Author: Michael Ellerman Date: Wed Mar 31 11:38:44 2021 +1100 powerpc/mm/64s/hash: Add real-mode change_memory_range() for hash LPAR When we enabled STRICT_KERNEL_RWX we received some reports of boot failures when using the Hash MMU and running under phyp. The crashes are intermittent, and often exhibit as a completely unresponsive system, or possibly an oops. One example, which was caught in xmon: [ 14.068327][ T1] devtmpfs: mounted [ 14.069302][ T1] Freeing unused kernel memory: 5568K [ 14.142060][ T347] BUG: Unable to handle kernel instruction fetch [ 14.142063][ T1] Run /sbin/init as init process [ 14.142074][ T347] Faulting instruction address: 0xc000000000004400 cpu 0x2: Vector: 400 (Instruction Access) at [c00000000c7475e0] pc: c000000000004400: exc_virt_0x4400_instruction_access+0x0/0x80 lr: c0000000001862d4: update_rq_clock+0x44/0x110 sp: c00000000c747880 msr: 8000000040001031 current = 0xc00000000c60d380 paca = 0xc00000001ec9de80 irqmask: 0x03 irq_happened: 0x01 pid = 347, comm = kworker/2:1 ... enter ? for help [c00000000c747880] c0000000001862d4 update_rq_clock+0x44/0x110 (unreliable) [c00000000c7478f0] c000000000198794 update_blocked_averages+0xb4/0x6d0 [c00000000c7479f0] c000000000198e40 update_nohz_stats+0x90/0xd0 [c00000000c747a20] c0000000001a13b4 _nohz_idle_balance+0x164/0x390 [c00000000c747b10] c0000000001a1af8 newidle_balance+0x478/0x610 [c00000000c747be0] c0000000001a1d48 pick_next_task_fair+0x58/0x480 [c00000000c747c40] c000000000eaab5c __schedule+0x12c/0x950 [c00000000c747cd0] c000000000eab3e8 schedule+0x68/0x120 [c00000000c747d00] c00000000016b730 worker_thread+0x130/0x640 [c00000000c747da0] c000000000174d50 kthread+0x1a0/0x1b0 [c00000000c747e10] c00000000000e0f0 ret_from_kernel_thread+0x5c/0x6c This shows that CPU 2, which was idle, woke up and then appears to randomly take an instruction fault on a completely valid area of kernel text. The cause turns out to be the call to hash__mark_rodata_ro(), late in boot. Due to the way we layout text and rodata, that function actually changes the permissions for all of text and rodata to read-only plus execute. To do the permission change we use a hypervisor call, H_PROTECT. On phyp that appears to be implemented by briefly removing the mapping of the kernel text, before putting it back with the updated permissions. If any other CPU is executing during that window, it will see spurious faults on the kernel text and/or data, leading to crashes. To fix it we use stop machine to collect all other CPUs, and then have them drop into real mode (MMU off), while we change the mapping. That way they are unaffected by the mapping temporarily disappearing. We don't see this bug on KVM because KVM always use VPM=1, where faults are directed to the hypervisor, and the fault will be serialised vs the h_protect() by HPTE_V_HVLOCK. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331003845.216246-5-mpe@ellerman.id.au commit 6f223ebe9c3f3ed315a06cec156086f1f7f7ded1 Author: Michael Ellerman Date: Wed Mar 31 11:38:43 2021 +1100 powerpc/mm/64s/hash: Factor out change_memory_range() Pull the loop calling hpte_updateboltedpp() out of hash__change_memory_range() into a helper function. We need it to be a separate function for the next patch. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331003845.216246-4-mpe@ellerman.id.au commit 2c02e656a29d5f64193eb93da92781bcf0517146 Author: Michael Ellerman Date: Wed Mar 31 11:38:42 2021 +1100 powerpc/64s: Use htab_convert_pte_flags() in hash__mark_rodata_ro() In hash__mark_rodata_ro() we pass the raw PP_RXXX value to hash__change_memory_range(). That has the effect of setting the key to zero, because PP_RXXX contains no key value. Fix it by using htab_convert_pte_flags(), which knows how to convert a pgprot into a pp value, including the key. Fixes: d94b827e89dc ("powerpc/book3s64/kuap: Use Key 3 for kernel mapping with hash translation") Signed-off-by: Michael Ellerman Reviewed-by: Daniel Axtens Link: https://lore.kernel.org/r/20210331003845.216246-3-mpe@ellerman.id.au commit b56d55a5aa4aa9fc166595a7feb57f153ef7b555 Author: Michael Ellerman Date: Wed Mar 31 11:38:41 2021 +1100 powerpc/pseries: Add key to flags in pSeries_lpar_hpte_updateboltedpp() The flags argument to plpar_pte_protect() (aka. H_PROTECT), includes the key in bits 9-13, but currently we always set those bits to zero. In the past that hasn't been a problem because we always used key 0 for the kernel, and updateboltedpp() is only used for kernel mappings. However since commit d94b827e89dc ("powerpc/book3s64/kuap: Use Key 3 for kernel mapping with hash translation") we are now inadvertently changing the key (to zero) when we call plpar_pte_protect(). That hasn't broken anything because updateboltedpp() is only used for STRICT_KERNEL_RWX, which is currently disabled on 64s due to other bugs. But we want to fix that, so first we need to pass the key correctly to plpar_pte_protect(). We can't pass our newpp value directly in, we have to convert it into the form expected by the hcall. The hcall we're using here is H_PROTECT, which is specified in section 14.5.4.1.6 of LoPAPR v1.1. It takes a `flags` parameter, and the description for flags says: * flags: AVPN, pp0, pp1, pp2, key0-key4, n, and for the CMO option: CMO Option flags as defined in Table 189‚ If you then go to the start of the parent section, 14.5.4.1, on page 405, it says: Register Linkage (For hcall() tokens 0x04 - 0x18) * On Call * R3 function call token * R4 flags (see Table 178‚ “Page Frame Table Access flags field definition‚” on page 401) Then you have to go to section 14.5.3, and on page 394 there is a list of hcalls and their tokens (table 176), and there you can see that H_PROTECT == 0x18. Finally you can look at table 178, on page 401, where it specifies the layout of the bits for the key: Bit Function ----------------- 50-54 | key0-key4 Those are big-endian bit numbers, converting to normal bit numbers you get bits 9-13, or 0x3e00. In the kernel we have: #define HPTE_R_KEY_HI ASM_CONST(0x3000000000000000) #define HPTE_R_KEY_LO ASM_CONST(0x0000000000000e00) So the LO bits of newpp are already in the right place, and the HI bits need to be shifted down by 48. Fixes: d94b827e89dc ("powerpc/book3s64/kuap: Use Key 3 for kernel mapping with hash translation") Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331003845.216246-2-mpe@ellerman.id.au commit 56bec2f9d4d05675cada96772a8a93010f4d82bf Author: Michael Ellerman Date: Wed Mar 31 11:38:40 2021 +1100 powerpc/mm/64s: Add _PAGE_KERNEL_ROX In the past we had a fallback definition for _PAGE_KERNEL_ROX, but we removed that in commit d82fd29c5a8c ("powerpc/mm: Distribute platform specific PAGE and PMD flags and definitions") and added definitions for each MMU family. However we missed adding a definition for 64s, which was not really a bug because it's currently not used. But we'd like to use PAGE_KERNEL_ROX in a future patch so add a definition now. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210331003845.216246-1-mpe@ellerman.id.au commit 29e3ea8cbd2958cf237b84652ec236803f2c6202 Author: Jordan Niethe Date: Mon Feb 8 14:29:57 2021 +1100 selftests/powerpc: Test for spurious kernel memory faults on radix Previously when mapping kernel memory on radix, no ptesync was included which would periodically lead to unhandled spurious faults. Mapping kernel memory is used when code patching with Strict RWX enabled. As suggested by Chris Riedl, turning ftrace on and off does a large amount of code patching so is a convenient way to see this kind of fault. Add a selftest to try and trigger this kind of a spurious fault. It tests for 30 seconds which is usually long enough for the issue to show up. Signed-off-by: Jordan Niethe [mpe: Rename it to better reflect what it does, rather than the symptom] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210208032957.1232102-2-jniethe5@gmail.com commit b8b2f37cf632434456182e9002d63cbc4cccc50c Author: Jordan Niethe Date: Mon Feb 8 14:29:56 2021 +1100 powerpc/64s: Fix pte update for kernel memory on radix When adding a PTE a ptesync is needed to order the update of the PTE with subsequent accesses otherwise a spurious fault may be raised. radix__set_pte_at() does not do this for performance gains. For non-kernel memory this is not an issue as any faults of this kind are corrected by the page fault handler. For kernel memory these faults are not handled. The current solution is that there is a ptesync in flush_cache_vmap() which should be called when mapping from the vmalloc region. However, map_kernel_page() does not call flush_cache_vmap(). This is troublesome in particular for code patching with Strict RWX on radix. In do_patch_instruction() the page frame that contains the instruction to be patched is mapped and then immediately patched. With no ordering or synchronization between setting up the PTE and writing to the page it is possible for faults. As the code patching is done using __put_user_asm_goto() the resulting fault is obscured - but using a normal store instead it can be seen: BUG: Unable to handle kernel data access on write at 0xc008000008f24a3c Faulting instruction address: 0xc00000000008bd74 Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: nop_module(PO+) [last unloaded: nop_module] CPU: 4 PID: 757 Comm: sh Tainted: P O 5.10.0-rc5-01361-ge3c1b78c8440-dirty #43 NIP: c00000000008bd74 LR: c00000000008bd50 CTR: c000000000025810 REGS: c000000016f634a0 TRAP: 0300 Tainted: P O (5.10.0-rc5-01361-ge3c1b78c8440-dirty) MSR: 9000000000009033 CR: 44002884 XER: 00000000 CFAR: c00000000007c68c DAR: c008000008f24a3c DSISR: 42000000 IRQMASK: 1 This results in the kind of issue reported here: https://lore.kernel.org/linuxppc-dev/15AC5B0E-A221-4B8C-9039-FA96B8EF7C88@lca.pw/ Chris Riedl suggested a reliable way to reproduce the issue: $ mount -t debugfs none /sys/kernel/debug $ (while true; do echo function > /sys/kernel/debug/tracing/current_tracer ; echo nop > /sys/kernel/debug/tracing/current_tracer ; done) & Turning ftrace on and off does a large amount of code patching which in usually less then 5min will crash giving a trace like: ftrace-powerpc: (____ptrval____): replaced (4b473b11) != old (60000000) ------------[ ftrace bug ]------------ ftrace failed to modify [] napi_busy_loop+0xc/0x390 actual: 11:3b:47:4b Setting ftrace call site to call ftrace function ftrace record flags: 80000001 (1) expected tramp: c00000000006c96c ------------[ cut here ]------------ WARNING: CPU: 4 PID: 809 at kernel/trace/ftrace.c:2065 ftrace_bug+0x28c/0x2e8 Modules linked in: nop_module(PO-) [last unloaded: nop_module] CPU: 4 PID: 809 Comm: sh Tainted: P O 5.10.0-rc5-01360-gf878ccaf250a #1 NIP: c00000000024f334 LR: c00000000024f330 CTR: c0000000001a5af0 REGS: c000000004c8b760 TRAP: 0700 Tainted: P O (5.10.0-rc5-01360-gf878ccaf250a) MSR: 900000000282b033 CR: 28008848 XER: 20040000 CFAR: c0000000001a9c98 IRQMASK: 0 GPR00: c00000000024f330 c000000004c8b9f0 c000000002770600 0000000000000022 GPR04: 00000000ffff7fff c000000004c8b6d0 0000000000000027 c0000007fe9bcdd8 GPR08: 0000000000000023 ffffffffffffffd8 0000000000000027 c000000002613118 GPR12: 0000000000008000 c0000007fffdca00 0000000000000000 0000000000000000 GPR16: 0000000023ec37c5 0000000000000000 0000000000000000 0000000000000008 GPR20: c000000004c8bc90 c0000000027a2d20 c000000004c8bcd0 c000000002612fe8 GPR24: 0000000000000038 0000000000000030 0000000000000028 0000000000000020 GPR28: c000000000ff1b68 c000000000bf8e5c c00000000312f700 c000000000fbb9b0 NIP ftrace_bug+0x28c/0x2e8 LR ftrace_bug+0x288/0x2e8 Call Trace: ftrace_bug+0x288/0x2e8 (unreliable) ftrace_modify_all_code+0x168/0x210 arch_ftrace_update_code+0x18/0x30 ftrace_run_update_code+0x44/0xc0 ftrace_startup+0xf8/0x1c0 register_ftrace_function+0x4c/0xc0 function_trace_init+0x80/0xb0 tracing_set_tracer+0x2a4/0x4f0 tracing_set_trace_write+0xd4/0x130 vfs_write+0xf0/0x330 ksys_write+0x84/0x140 system_call_exception+0x14c/0x230 system_call_common+0xf0/0x27c To fix this when updating kernel memory PTEs using ptesync. Fixes: f1cb8f9beba8 ("powerpc/64s/radix: avoid ptesync after set_pte and ptep_set_access_flags") Signed-off-by: Jordan Niethe Reviewed-by: Nicholas Piggin [mpe: Tidy up change log slightly] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210208032957.1232102-1-jniethe5@gmail.com commit 4763d37827643750a39a8c7a9205928c09618a6f Author: Bhaskar Chowdhury Date: Wed Jan 20 19:50:21 2021 +0530 powerpc: Spelling/typo fixes Various spelling/typo fixes. Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Michael Ellerman commit d84d13d6f6e03a7aaac9e7d064a11cf6f5087da6 Author: Vamsi Krishna Date: Tue Mar 2 20:20:36 2021 +0530 nl80211: Add interface to indicate TDLS peer's HE capability Enhance enum nl80211_tdls_peer_capability to configure TDLS peer's support for HE mode. Userspace decodes the TDLS setup response frame and confugures the HE mode support to driver if the peer has advertized HE mode support in TDLS setup response frame. The driver uses this information to decide whether to include HE operation IE in TDLS setup confirmation frame. Signed-off-by: Vamsi Krishna Link: https://lore.kernel.org/r/1614696636-30144-1-git-send-email-vamsin@codeaurora.org Signed-off-by: Johannes Berg commit 6f779a66dc84450ceb4825024d3e337f42e633de Author: Emmanuel Grumbach Date: Mon Mar 22 22:46:31 2021 +0200 cfg80211: allow specifying a reason for hw_rfkill rfkill now allows to report a reason for the hw_rfkill state. Allow cfg80211 drivers to specify this reason. Keep the current API to use the default reason (RFKILL_HARD_BLOCK_SIGNAL). Signed-off-by: Emmanuel Grumbach Link: https://lore.kernel.org/r/20210322204633.102581-4-emmanuel.grumbach@intel.com Signed-off-by: Johannes Berg commit 2552fb66ae301f490ea37f64d2cdc5778ae61874 Author: Wan Jiabing Date: Thu Apr 1 16:17:03 2021 +0800 drm/drm_internal.h: Remove repeated struct declaration struct drm_gem_object is declared twice. One is declared at 40th line. The blew one is not needed. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210401081704.1000863-1-wanjiabing@vivo.com commit 5842ab76bbfadb37eaea91e53c1efe34ae504e4a Author: Dan Carpenter Date: Tue Mar 30 12:31:52 2021 +0300 drm: xlnx: zynqmp: fix a memset in zynqmp_dp_train() The dp->train_set[] for this driver is only two characters, not four so this memsets too much. Fortunately, this ends up corrupting a struct hole and not anything important. Fixes: d76271d22694 ("drm: xlnx: DRM/KMS driver for Xilinx ZynqMP DisplayPort Subsystem") Signed-off-by: Dan Carpenter Reviewed-by: Michal Simek Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/YGLwCBMotnrKZu6P@mwanda commit be54ffe0ab6636854d4bdc441223199fdf39bbdb Author: Dafna Hirschfeld Date: Fri Mar 26 11:32:16 2021 +0100 drm/bridge: fix typo in Kconfig fix 's/controller/controllers/' in the sentence: Most display controller handle display connectors... Signed-off-by: Dafna Hirschfeld Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210326103216.7918-2-dafna.hirschfeld@collabora.com commit 94bc94209a66f05532c065279f4a719058d447e4 Author: Marc Zyngier Date: Thu Apr 8 08:56:27 2021 +0100 irqchip/wpcm450: Drop COMPILE_TEST This driver is (for now) ARM specific, and currently doesn't build with a variety of architectures (ia64, RISC-V, x86_64 at the very least). Drop COMPILE_TEST from Kconfig until it gets sorted out. Reviewed-by: Jonathan Neuschäfer Reported-by: Stephen Rothwell Signed-off-by: Marc Zyngier commit a61d67188f29ff678e94fb3ffba6c6d292e852c7 Author: Marcel Holtmann Date: Tue Apr 6 21:55:56 2021 +0200 Bluetooth: Allow Microsoft extension to indicate curve validation Some controllers don't support the Simple Pairing Options feature that can indicate the support for P-192 and P-256 public key validation. However they might support the Microsoft vendor extension that can indicate the validiation capability as well. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit ba29d0360a092997074e07524cf6f798a95a71d8 Author: Marcel Holtmann Date: Tue Apr 6 21:55:55 2021 +0200 Bluetooth: Set defaults for le_scan_{int,window}_adv_monitor The le_scan_{int,window}_adv_monitor settings have not been set with a sensible default. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit cfa15cca51ef10d9aa363ed1d6907c40343ce34a Author: Marcel Holtmann Date: Tue Apr 6 21:55:54 2021 +0200 Bluetooth: Fix default values for advertising interval The DISCOV_LE_FAST_ADV_INT_{MIN,MAX} contants are in msec, but then used later on directly while it is suppose to be N * 0.625 ms according to the Bluetooth Core specification. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit afd2daa26c7abd734d78bd274fc6c59a15e61063 Author: Marcel Holtmann Date: Tue Apr 6 21:55:53 2021 +0200 Bluetooth: Add support for virtio transport driver This adds support for Bluetooth HCI transport over virtio. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit 847bea3d08af9158ae9e17b43632d6aa4f1702a0 Merge: fd3b2aa100fa8 3889ba70102ed Author: Hector Martin Date: Thu Apr 8 19:21:57 2021 +0900 Merge remote-tracking branch 'arm64/for-next/fiq' The FIQ support series, already merged into arm64, is a dependency of the M1 bring-up series and was split off after the first few versions. Signed-off-by: Hector Martin commit b849bec29a991d25689507315db5641f7512def3 Author: Oak Zeng Date: Fri Feb 26 19:09:42 2021 -0600 drm/ttm: ioremap buffer according to TTM mem caching setting If tbo.mem.bus.caching is cached, buffer is intended to be mapped as cached from CPU. Map it with ioremap_cache. This wasn't necessary before as device memory was never mapped as cached from CPU side. It becomes necessary for aldebaran as device memory is mapped cached from CPU. Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Signed-off-by: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/1614638628-10508-1-git-send-email-Oak.Zeng@amd.com Signed-off-by: Christian König commit e92b0ff603435c200256524dd234618d91bbd8e1 Author: Felix Kuehling Date: Fri Feb 26 22:43:04 2021 -0500 drm/ttm: Ignore signaled move fences Move fences that have already signaled should not prevent memory allocations with no_wait_gpu. Signed-off-by: Felix Kuehling Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210227034524.21763-1-Felix.Kuehling@amd.com Signed-off-by: Christian König commit fd921693fe989afe82600d97b37f54c942a6db6c Author: David Stevens Date: Thu Apr 8 18:54:28 2021 +0900 drm/syncobj: use newly allocated stub fences Allocate a new private stub fence in drm_syncobj_assign_null_handle, instead of using a static stub fence. When userspace creates a fence with DRM_SYNCOBJ_CREATE_SIGNALED or when userspace signals a fence via DRM_IOCTL_SYNCOBJ_SIGNAL, the timestamp obtained when the fence is exported and queried with SYNC_IOC_FILE_INFO should match when the fence's status was changed from the perspective of userspace, which is during the respective ioctl. When a static stub fence started being used in by these ioctls, this behavior changed. Instead, the timestamp returned by SYNC_IOC_FILE_INFO became the first time anything used the static stub fence, which has no meaning to userspace. Signed-off-by: David Stevens Link: https://patchwork.freedesktop.org/patch/msgid/20210408095428.3983055-1-stevensd@google.com Reviewed-by: Christian König Signed-off-by: Christian König commit fd3b2aa100fa879848ae28fd4cb6ff7bb682ae7d Merge: 1e28eed17697b 71b25f4df9849 Author: Hector Martin Date: Thu Apr 8 19:17:19 2021 +0900 Merge commit '71b25f4df984' from tty/tty-next This point in gregkh's tty-next tree includes all the samsung_tty changes that were part of v3 of the M1 bring-up series, and have already been merged in. Signed-off-by: Hector Martin commit 0750cfd8b7fd491c9d7c8bd19d9ac380cd3c84ee Author: James Prestwood Date: Thu Mar 11 15:03:33 2021 -0800 nl80211: better document CMD_ROAM behavior The docs were very sparse with how exactly CMD_ROAM should be used. Specifically related to BSS information normally obtained through a user space scan. Signed-off-by: James Prestwood Link: https://lore.kernel.org/r/20210311230333.103934-1-prestwoj@gmail.com Signed-off-by: Johannes Berg commit 196900fd97e26292f0bb90758690db4cd5e64e98 Author: Lorenzo Bianconi Date: Mon Mar 8 23:01:49 2021 +0100 mac80211: set sk_pacing_shift for 802.3 txpath Similar to 802.11 txpath, set socket sk_pacing_shift for 802.3 tx path. Signed-off-by: Lorenzo Bianconi Link: https://lore.kernel.org/r/7230abc48dcf940657838546cdaef7dce691ecdd.1615240733.git.lorenzo@kernel.org Signed-off-by: Johannes Berg commit 73bc9e0af5945d03d398668dd97885742a5e85f7 Author: Johannes Berg Date: Fri Mar 19 23:28:01 2021 +0100 mac80211: don't apply flow control on management frames In some cases (depending on the driver, but it's true e.g. for iwlwifi) we're using an internal TXQ for management packets, mostly to simplify the code and to have a place to queue them. However, it appears that in certain cases we can confuse the code and management frames are dropped, which is certainly not what we want. Short-circuit the processing of management frames. To keep the impact minimal, only put them on the frags queue and check the tid == management only for doing that and to skip the airtime fairness checks, if applicable. Signed-off-by: Johannes Berg Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/r/20210319232800.0e876c800866.Id2b66eb5a17f3869b776c39b5ca713272ea09d5d@changeid Signed-off-by: Johannes Berg commit 3e7bbe15ed84e3baa7dfab3aebed3a06fd39b806 Author: Zhao Xuehui Date: Thu Apr 8 17:52:18 2021 +0800 x86/msr: Make locally used functions static The functions msr_read() and msr_write() are not used outside of msr.c, make them static. [ bp: Massage commit message. ] Signed-off-by: Zhao Xuehui Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210408095218.152264-1-zhaoxuehui1@huawei.com commit 7513ce49027c8218a6fce7ec45c3289b903ba4bd Author: Zhang Jianhua Date: Thu Apr 8 17:38:22 2021 +0800 drm/bridge: lt8912b: Add header file If CONFIG_DRM_LONTIUM_LT8912B=m, the following errors will be seen while compiling lontium-lt8912b.c drivers/gpu/drm/bridge/lontium-lt8912b.c: In function ‘lt8912_hard_power_on’: drivers/gpu/drm/bridge/lontium-lt8912b.c:252:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration] gpiod_set_value_cansleep(lt->gp_reset, 0); ^~~~~~~~~~~~~~~~~~~~~~~~ gpio_set_value_cansleep drivers/gpu/drm/bridge/lontium-lt8912b.c: In function ‘lt8912_parse_dt’: drivers/gpu/drm/bridge/lontium-lt8912b.c:628:13: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_gpio_request_one’? [-Werror=implicit-function-declaration] gp_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); ^~~~~~~~~~~~~~~~~~~~~~~ devm_gpio_request_one drivers/gpu/drm/bridge/lontium-lt8912b.c:628:51: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’? gp_reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); ^~~~~~~~~~~~~~ GPIOF_INIT_HIGH Signed-off-by: Zhang Jianhua Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210408093822.207917-1-zhangjianhua18@huawei.com commit 272cd0e8d4a639a87fe2fa40323871043ad9876e Author: Aloka Dixit Date: Mon Feb 22 13:20:59 2021 -0800 nl80211: Add missing line in nl80211_fils_discovery_policy Add NL80211_FILS_DISCOVERY_ATTR_TMPL explicitly in nl80211_fils_discovery_policy definition. Signed-off-by: Aloka Dixit Link: https://lore.kernel.org/r/20210222212059.22492-1-alokad@codeaurora.org Signed-off-by: Johannes Berg commit 958574cbcc3ae31f18bbe0b1d7f3ab3f2bd109f1 Author: Colin Ian King Date: Sun Mar 28 22:37:29 2021 +0100 mac80211: remove redundant assignment of variable result The variable result is being assigned 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/20210328213729.65819-1-colin.king@canonical.com Signed-off-by: Johannes Berg commit 026dfac85f0a70cd1fd00181f1079b2c256b0e12 Author: Wei Yongjun Date: Fri Mar 26 02:48:43 2021 +0000 mac80211: minstrel_ht: remove unused variable 'mg' in minstrel_ht_next_jump_rate() GCC reports the following warning with W=1: net/mac80211/rc80211_minstrel_ht.c:871:34: warning: variable 'mg' set but not used [-Wunused-but-set-variable] 871 | struct minstrel_mcs_group_data *mg; | ^~ This variable is not used in function , this commit remove it to fix the warning. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210326024843.987941-1-weiyongjun1@huawei.com Signed-off-by: Johannes Berg commit 81d94f47beaa561840776087d22a809b17c11033 Author: Qiheng Lin Date: Thu Mar 25 22:38:54 2021 +0800 cfg80211: regulatory: use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Link: https://lore.kernel.org/r/20210325143854.13186-1-linqiheng@huawei.com Signed-off-by: Johannes Berg commit 30a70d18e862d505a34f2b21ccb83f5d4792e2d5 Author: Guobin Huang Date: Sat Mar 27 17:59:20 2021 +0800 mac80211_hwsim: use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Link: https://lore.kernel.org/r/1616839160-6654-1-git-send-email-huangguobin4@huawei.com Signed-off-by: Johannes Berg commit ed7247f30982bbc6f8bffd12a0c76398b90ec319 Author: Guobin Huang Date: Tue Apr 6 20:11:56 2021 +0800 rfkill: use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Link: https://lore.kernel.org/r/1617711116-49370-1-git-send-email-huangguobin4@huawei.com Signed-off-by: Johannes Berg commit 686ee9b6253f9b6d7f1151e73114698940cc0894 Author: Mauro Carvalho Chehab Date: Thu Apr 8 08:49:12 2021 +0200 media: venus: don't de-reference NULL pointers at IRQ time Smatch is warning that: drivers/media/platform/qcom/venus/hfi_venus.c:1100 venus_isr() warn: variable dereferenced before check 'hdev' (see line 1097) The logic basically does: hdev = to_hfi_priv(core); with is translated to: hdev = core->priv; If the IRQ code can receive a NULL pointer for hdev, there's a bug there, as it will first try to de-reference the pointer, and then check if it is null. After looking at the code, it seems that this indeed can happen: Basically, the venus IRQ thread is started with: devm_request_threaded_irq() So, it will only be freed after the driver unbinds. In order to prevent the IRQ code to work with freed data, the logic at venus_hfi_destroy() sets core->priv to NULL, which would make the IRQ code to ignore any pending IRQs. There is, however a race condition, as core->priv is set to NULL only after being freed. So, we need also to move the core->priv = NULL to happen earlier. Signed-off-by: Mauro Carvalho Chehab commit 589b9b8b7b98ef091d1a5c5c6e27e9cef221d83f Author: Marek Vasut Date: Tue Apr 6 20:00:35 2021 +0200 pinctrl: stm32: Print invalid AF warning inside stm32_pctrl_is_function_valid() The "invalid function %d on pin %d .\n" message is triplicated in the driver in different variants, just pull it into the function and have it once in the driver. The bonus is that all variants of the message now print the pin number and AF consistently, so it is easier to debug such pinmux problems. Signed-off-by: Marek Vasut Cc: Fabien Dessenne Cc: Alexandre Torgue Cc: Linus Walleij Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Acked-by: Fabien Dessenne Link: https://lore.kernel.org/r/20210406180035.279249-1-marex@denx.de Signed-off-by: Linus Walleij commit da35b19d62c17f1f25878be5cb2d8cd501b1c3c6 Author: Randy Dunlap Date: Thu Apr 1 10:47:03 2021 -0700 pinctrl: bcm63xx: Fix More dependencies The additional patch below fixes all of the kconfig warnings and build errors for me. Link: https://lore.kernel.org/r/9e1cec76-1c0a-9203-7995-4c2d09b711d8@infradead.org Signed-off-by: Randy Dunlap [Tweaked some other line in the BCMxxx] Signed-off-by: Linus Walleij commit f8edbd5186548e670bfb583cd2ad90f3e203a010 Author: Johan Hovold Date: Wed Apr 7 12:46:29 2021 +0200 USB: serial: io_edgeport: drop unused definitions Drop unused definitions relating to a never mainlined custom proc-interface and some likewise unused string descriptor definitions. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 8665444b80e62c3a3d95be24a284dc7332537e42 Author: Johan Hovold Date: Wed Apr 7 12:45:29 2021 +0200 USB: serial: ti_usb_3410_5052: switch to 30-second closing wait Switch to using the system-wide default 30-second closing-wait timeout instead of the driver specific 40-second timeout. The timeout can be changed per port using TIOCSSERIAL (setserial) if needed. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 9b31f8cd9174c835e76b63bd71f82dca4b3d7e4f Author: Johan Hovold Date: Wed Apr 7 12:45:28 2021 +0200 USB: serial: ti_usb_3410_5052: drop closing_wait module parameter The ti_usb_3410_5052 has supported changing the closing_wait parameter through TIOCSSERIAL (setserial) for about a decade and commit f1175daa5312 ("USB: ti_usb_3410_5052: kill custom closing_wait"). It's time to drop the corresponding driver-specific module parameter. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 2813b16533408129bb34ee243520fc6fb87a5d8d Author: Johan Hovold Date: Wed Apr 7 12:45:27 2021 +0200 USB: serial: io_ti: switch to 30-second closing wait Switch to using the system-wide default 30-second closing-wait timeout instead of the driver specific 40-second timeout. The timeout can be changed per port using TIOCSSERIAL (setserial) if needed. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit d669a51d572742acc8749cf1f25aa6db0055352c Author: Johan Hovold Date: Wed Apr 7 12:45:26 2021 +0200 USB: serial: io_ti: drop closing_wait module parameter Now that all USB serial drivers supports setting the closing_wait parameter through TIOCSSERIAL (setserial) it's time to drop the corresponding io_ti module parameter. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 0428bf6807fe77e6d97c8e78538a594119d4aab2 Author: Johan Hovold Date: Wed Apr 7 12:39:25 2021 +0200 USB: serial: ftdi_sio: clean up TIOCSSERIAL The TIOCSSERIAL implementation needs to compare the old flag and divisor settings with the new to detect ASYNC_SPD changes, but there's no need to copy all driver state to the stack for that. While at it, unbreak the function parameter list. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit c12860c0f6e6b6b0301760a2b0e3e6b3f83eace8 Author: Johan Hovold Date: Wed Apr 7 12:39:24 2021 +0200 USB: serial: ftdi_sio: simplify TIOCGSERIAL permission check Changing the deprecated custom_divisor field is an unprivileged operation so after verifying that flag field does not contain any privileged changes both updates can be carried out by any user. Combine the two branches and drop the erroneous comment. Note that private flags field is only used for ASYNC flags so there's no need to try to retain any other bits when updating the flags. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 9378379b15e3bab6915193874e1ac4464f36d869 Author: Johan Hovold Date: Wed Apr 7 12:39:23 2021 +0200 USB: serial: ftdi_sio: ignore baud_base changes The TIOCSSERIAL error handling is inconsistent at best, but drivers tend to ignore requests to change parameters which cannot be changed rather than return an error. The FTDI driver ignores change requests for all immutable parameters but baud_base so return success also in this case for consistency. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit f64d74a59c476df7d5abbddc23011f0d8475c7cc Author: Johan Hovold Date: Wed Apr 7 12:39:22 2021 +0200 USB: serial: stop reporting legacy UART types The TIOCGSERIAL ioctl can be used to set and retrieve the UART type for legacy UARTs, but some USB serial drivers have been reporting back random types in order to "make user-space happy". Some applications have historically expected TIOCGSERIAL to be implemented, but judging from the Debian sources, the port type not being PORT_UNKNOWN is only used to check for the existence of legacy serial ports (ttySn). Drivers like ftdi_sio have been using PORT_UNKNOWN for twenty years (and option for 10 years) without anyone complaining so let's stop reporting back anything else. In the unlikely event that this do cause problems, this should be fixed tree-wide anyway (e.g. for all USB serial drivers and also CDC-ACM). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 01fd45f676f1b3785b7cdd5d815f9c31ddcd9dd1 Author: Johan Hovold Date: Wed Apr 7 12:39:21 2021 +0200 USB: serial: add generic support for TIOCSSERIAL TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The closing_wait parameter determines how long to wait for the transfer buffers to drain during close and the default timeout of 30 seconds may not be sufficient at low line speeds. In other cases, when for example flow is stopped, the default timeout may instead be too long. Add generic support for TIOCSSERIAL and TIOCGSERIAL with handling of the three common parameters close_delay, closing_wait and line for the benefit of all USB serial drivers while still allowing drivers to implement further functionality through the existing callbacks. This currently includes a few drivers that report their base baud clock rate even if that is really only of interest when setting custom divisors through the deprecated ASYNC_SPD_CUST interface; an interface which only the FTDI driver actually implements. Some drivers have also been reporting back a fake UART type, something which should no longer be needed and will be dropped by a follow-on patch. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 5f92aee93a68c3f3b13dc28a7e220adbdc3433b0 Author: Johan Hovold Date: Wed Apr 7 12:39:20 2021 +0200 USB: serial: fix return value for unsupported ioctls Drivers should return -ENOTTY ("Inappropriate I/O control operation") when an ioctl isn't supported, while -EINVAL is used for invalid arguments. Fix up the TIOCMGET, TIOCMSET and TIOCGICOUNT helpers which returned -EINVAL when a USB serial driver did not implement the corresponding methods. Note that the TIOCMGET and TIOCMSET helpers predate git and do not get a corresponding Fixes tag below. Fixes: d281da7ff6f7 ("tty: Make tiocgicount a handler") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 6f9f8aeab7fd5cc9a54096f5053fa3c79154756e Author: Johan Hovold Date: Wed Apr 7 12:39:19 2021 +0200 USB: serial: whiteheat: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit b6be55625138c07627d7559ecdd11333545436ae Author: Johan Hovold Date: Wed Apr 7 12:39:18 2021 +0200 USB: serial: usb_wwan: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The baud_base parameter could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. Fix the usb_wwan TIOCGSERIAL implementation by dropping its custom interpretation of the unused port and baud_base fields, which were set to the port index and current line speed, respectively. Fixes: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit a3cb01e2fe3793b8ffcb9cc7f7c7f2ca55793e62 Author: Johan Hovold Date: Wed Apr 7 12:39:17 2021 +0200 USB: serial: usb_wwan: fix unprivileged TIOCCSERIAL TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. A non-privileged user has only ever been able to set the since long deprecated ASYNC_SPD flags and trying to change any other *supported* feature should result in -EPERM being returned. Setting the current values for any supported features should return success. Fix the usb_wwan implementation which instead indicated that the TIOCSSERIAL ioctl was not even implemented when a non-privileged user set the current values. Fixes: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 3d732690d2267f4d0e19077b178dffbedafdf0c9 Author: Johan Hovold Date: Wed Apr 7 12:39:16 2021 +0200 USB: serial: usb_wwan: fix TIOCSSERIAL jiffies conversions The port close_delay and closing_wait parameters set by TIOCSSERIAL are specified in jiffies and not milliseconds. Add the missing conversions so that the TIOCSSERIAL works as expected also when HZ is not 1000. Fixes: 02303f73373a ("usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)") Cc: stable@vger.kernel.org # 2.6.38 Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit d370c90dcd64e427a79a093a070117a1571d4cd8 Author: Johan Hovold Date: Wed Apr 7 12:39:15 2021 +0200 USB: serial: ti_usb_3410_5052: fix TIOCSSERIAL permission check Changing the port closing-wait parameter is a privileged operation so make sure to return -EPERM if a regular user tries to change it. Cc: stable@vger.kernel.org Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 4c47dc2a3a00cb288fc4888691227927430e2683 Author: Johan Hovold Date: Wed Apr 7 12:39:14 2021 +0200 USB: serial: ti_usb_3410_5052: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing close_delay, but let's report back the default value actually used (0.5 seconds). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 67a948779067f5b2e4e0c5aa67d010c525c8a0ad Author: Johan Hovold Date: Wed Apr 7 12:39:13 2021 +0200 USB: serial: ssu100: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Similarly, baud_base could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: 52af95459939 ("USB: add USB serial ssu100 driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 4065158c4897533abc430c02f5071d2e3ddbb191 Author: Johan Hovold Date: Wed Apr 7 12:39:12 2021 +0200 USB: serial: quatech2: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Similarly, baud_base could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 5b489012e9a4965c5dbefe88aa59676152b607f0 Author: Johan Hovold Date: Wed Apr 7 12:39:11 2021 +0200 USB: serial: pl2303: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The baud_base parameter could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit aa6a45850224fc19dbc6058598a9dc57db45b530 Author: Johan Hovold Date: Wed Apr 7 12:39:10 2021 +0200 USB: serial: opticon: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Similarly, baud_base could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: faac64ad9c7b ("USB: serial: opticon: add serial line ioctls") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit a804834bdf5e6be93fa7a0557e9bb80fd6d92664 Author: Johan Hovold Date: Wed Apr 7 12:39:09 2021 +0200 USB: serial: mos7840: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Similarly, baud_base could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 8458e35443d30ec97ecc4b969eca77f2990d0d32 Author: Johan Hovold Date: Wed Apr 7 12:39:08 2021 +0200 USB: serial: mos7720: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Similarly, baud_base could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: 0f64478cbc7a ("USB: add USB serial mos7720 driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit c2f58d2457fb08ed045923fc6114c8d1c46f1884 Author: Johan Hovold Date: Wed Apr 7 12:39:07 2021 +0200 USB: serial: io_ti: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Similarly, baud_base could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing close_delay, but let's report back the default value actually used (0.5 seconds). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit e54fbdbf0763b04e8f27b6db31fd07c8952d4c4b Author: Johan Hovold Date: Wed Apr 7 12:39:06 2021 +0200 USB: serial: io_edgeport: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Similarly, baud_base could be used to set the uart base clock when it could not be detected, but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds (not jiffies). The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 2ab5836101f8e06877917458aed1e13020a43e43 Author: Johan Hovold Date: Wed Apr 7 12:39:05 2021 +0200 USB: serial: ftdi_sio: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The FTDI driver is the only USB serial driver supporting the deprecated ASYNC_SPD flags, which are reported back as they should by TIOCGSERIAL, but the returned parameters did not include the line number. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 5c1426df9bb4363ed06bfbb35aaa7cf6076e9953 Author: Johan Hovold Date: Wed Apr 7 12:39:04 2021 +0200 USB: serial: f81534: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: aac1fc386fa1 ("USB: serial: add Fintek F81232 usb to serial driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 5486a9dd37f424750b540633d809f1dfef605788 Author: Johan Hovold Date: Wed Apr 7 12:39:03 2021 +0200 USB: serial: f81232: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: aac1fc386fa1 ("USB: serial: add Fintek F81232 usb to serial driver") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 9d76b10ac643f1115121d2054f0d47f2e295f743 Author: Johan Hovold Date: Wed Apr 7 12:39:02 2021 +0200 USB: serial: ark3116: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The port parameter is used to set the I/O port and does not make any sense to use for USB serial devices. The baud_base parameter could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing these, but let's report back the default values actually used (0.5 and 30 seconds, respectively). Fixes: 2f430b4bbae7 ("USB: ark3116: Add TIOCGSERIAL and TIOCSSERIAL ioctl calls.") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 4e35b91390fcd13bf46e12acd3b6f94a082a6cf3 Author: Bryan Brattlof Date: Wed Apr 7 20:19:37 2021 +0000 staging: rtl8723bs: remove extra indent There is an extra tab in the conditional statement. This removes it. Signed-off-by: Bryan Brattlof Link: https://lore.kernel.org/r/20210407201842.80074-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman commit 73aba1b5f0afccdd41e5dec2002f3bd79e33636e Author: Mitali Borkar Date: Thu Apr 8 07:55:41 2021 +0530 staging: rtl8712: removed extra blank line Removed an extra blank line so that only one blank line is present in between two functions which separates them out. Reported by checkpatch Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/YG5ppTlGhRp5WVgS@kali Signed-off-by: Greg Kroah-Hartman commit d03f499e6453abeeb231c4af5e518c787a9bd557 Author: Mitali Borkar Date: Thu Apr 8 08:28:31 2021 +0530 staging: rtl8712: matched alignment with open parenthesis Aligned arguments with open parenthesis to meet linux kernel coding style Reported by checkpatch Signed-off-by: Mitali Borkar Link: https://lore.kernel.org/r/YG5xV5q7ODTUTVK/@kali Signed-off-by: Greg Kroah-Hartman commit 5f0bf36ed66e111936a518daddb79b8a8d269f7a Author: Fabio M. De Francesco Date: Thu Apr 8 09:05:53 2021 +0200 staging: rtl8723bs: hal: Remove camelcase in sdio_ops.c Remove camelcase. Issue detected by checkpatch.pl. For now, change only names of static functions in order to not break the driver's code. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210408070553.30363-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit c82b130616e3aed2ff8c635353360978716c5762 Author: Ian Abbott Date: Wed Apr 7 19:13:42 2021 +0100 staging: comedi: Add Kconfig options to build unit test modules The comedi unit-test modules in "drivers/staging/comedi/drivers/tests/" are built if the `CONFIG_COMEDI_TESTS` option is enabled, but the comedi Kconfig file contains no code to enable the option. Add config options to allow each of the unit-test modules to be enabled individually. The "ni_route_tests" module depends on the "ni_routing" module, so select it if the "ni_route_tests" module is configured to be built. Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407181342.1117754-7-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 5b7b4ce1d1163beb41b7c76db428c285d6989a62 Author: Ian Abbott Date: Wed Apr 7 19:13:41 2021 +0100 staging: comedi: tests: example_test: Rename to 'comedi_example_test' Rename the "example_test" module to "comedi_example_test" to make the name more relevant to Comedi. Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407181342.1117754-6-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 9a457447b3268c7e3b21020c0ba3e626df125a15 Author: Ian Abbott Date: Wed Apr 7 19:13:40 2021 +0100 staging: comedi: tests: example_test: Declare functions static The "example_test" module contains a couple of functions with external linkage that are not called externally. Declare them `static`. Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407181342.1117754-5-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 30c1b1a22cc389b0bddfc2ae3e39260333fc4085 Author: Ian Abbott Date: Wed Apr 7 19:13:39 2021 +0100 staging: comedi: tests: example_test: Reduce stack usage Declare the `unit_tests` array in `unittest_enter()` `static` to reduce stack usage a bit. Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407181342.1117754-4-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 31f218546e54b38fee185d871639f823a5f7856c Author: Ian Abbott Date: Wed Apr 7 19:13:38 2021 +0100 staging: comedi: tests: ni_route_tests: Declare functions static The "ni_routes_test" module contains a bunch of functions with external linkage that are not called externally. Declare them `static`. Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407181342.1117754-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 7a1de298de04c2db2c32c862618ddc9ba749deae Author: Ian Abbott Date: Wed Apr 7 19:13:37 2021 +0100 staging: comedi: tests: ni_routes_test: Reduce stack usage Declare the `unit_tests` array in `ni_routes_unittest()` `static` to reduce stack usage. Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407181342.1117754-2-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 3fca1c763ed186bd84bc65c43bfcf9fea0eb91d0 Author: Martin Kaiser Date: Wed Apr 7 19:05:31 2021 +0200 staging: rtl8188eu: make rtw_usb_if1_init return a status Return an error status instead of the struct adapter that was allocated and filled. This is more useful for the probe function, who calls rtw_usb_if1_init. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 7a267097504f68ca4cd64fb1a80902a113230e1e Author: Martin Kaiser Date: Wed Apr 7 19:05:30 2021 +0200 staging: rtl8188eu: make usb_dvobj_init return a status usb_dvobj_init populates a struct dvobj_priv and installs it as interface data of the usb interface. There's no point in returning this struct to the caller, it makes more sense to return an error status. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 57ae96149e8967ab1043dc1351966ac61b620978 Author: Martin Kaiser Date: Wed Apr 7 19:05:29 2021 +0200 staging: rtl8188eu: rtw_usb_if1_init needs no dvobj parameter rtw_usb_if1_init receives a pointer to struct usb_interface. dvobj is the interface data for this interface. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 78ea2e24470e744b8ccb8d2c4b05105bfb571cf9 Author: Martin Kaiser Date: Wed Apr 7 19:05:28 2021 +0200 staging: rtl8188eu: remove unnecessary variable We just want to check if rtw_usb_if1_init returns NULL, which means there was an error. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 6b1164553276fbecf587eb1ffb802b7c0288d5ed Author: Martin Kaiser Date: Wed Apr 7 19:05:27 2021 +0200 staging: rtl8188eu: clean up rtw_recv_entry Change the return type to int, the function returns 0 or 1. Remove the goto statement, we're not doing any cleanup on exit. Summarize variable declarations and assignments. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 889ed8b5e374780560d778677ba68e6956204101 Author: Martin Kaiser Date: Wed Apr 7 19:05:26 2021 +0200 staging: rtl8188eu: set pipe only once Set the pipe for reading or writing in usbctrl_vendorreq only once. There's no need to set it again for every retry. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit b048a8db29446bbf898c496b228be546c6cdcf21 Author: Martin Kaiser Date: Wed Apr 7 19:05:25 2021 +0200 staging: rtl8188eu: move defines into the .c file Some of the defines from usb_ops_linux.h are used only inside usb_ops_linux.c. Move them to the .c file. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit cf862de40b35d725b60f4800bc795e72e9549fdf Author: Martin Kaiser Date: Wed Apr 7 19:05:24 2021 +0200 staging: rtl8188eu: remove unused defines Some defines in usb_ops_linux.h are not used by the rtl8188eu driver. Remove them. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 5c422a42d1a625eef0fb12bb7466b8b67b8acc21 Author: Martin Kaiser Date: Wed Apr 7 19:05:23 2021 +0200 staging: rtl8188eu: remove unnecessary brackets ESHUTDOWN is just a number, it needs no brackets. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 46694b686d4a0360acb7aa4329ff73754049596f Author: Martin Kaiser Date: Wed Apr 7 19:05:22 2021 +0200 staging: rtl8188eu: remove unused macros usb_ops_linux.h contains a couple of macros to make functions usable as urb completion callbacks. Most of them are unused and can be removed. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210407170531.29356-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 1c4282349223269b086d6de908e80636aa01ec5d Author: Muhammad Usama Anjum Date: Wed Apr 7 21:12:02 2021 +0500 staging: axis-fifo: remove redundant dev_err call devm_ioremap_resource() prints error message in itself. Remove the dev_err call to avoid redundant error message. Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20210407161202.GA1505056@LEGION Signed-off-by: Greg Kroah-Hartman commit b195b20b7145bcae22ad261abc52d68336f5e913 Merge: d7ea31ca4de2c 7b1222b224aff Author: Greg Kroah-Hartman Date: Thu Apr 8 08:45:30 2021 +0200 Merge tag 'extcon-next-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-next Chanwoo writes: Update extcon next for v5.13 Detailed description for this pull request: 1. Update extcon provider driver - Add the support of charging interrupt to detect charger connector for extcon-max8997.c - Detect OTG when USB_ID pin is connected to ground for extcon-sm5502.c - Add the support for VBUS detection for extcon-qcom-spmi-misc.c and replace qcom,pm8941-misc binding document with yaml style. * tag 'extcon-next-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon: extcon: qcom-spmi: Add support for VBUS detection bindings: pm8941-misc: Add support for VBUS detection bindings: pm8941-misc: Convert bindings to YAML extcon: sm5502: Detect OTG when USB_ID is connected to ground extcon: max8997: Add CHGINS and CHGRM interrupt handling commit d7ea31ca4de2c52e7488043c82159227e2bf81e9 Merge: e76e8b56fe1ab a78a51a851ed3 Author: Greg Kroah-Hartman Date: Thu Apr 8 08:42:08 2021 +0200 Merge tag 'fpga-late-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-next Moritz writes: Second set of FPGA Manager changes for 5.13-rc1 FPGA Manager: - Russ' first change improves port_enable reliability - Russ' second change adds a new device ID for a DFL device - Geert's change updates the examples in binding with dt overlay sugar syntax All patches have been reviewed on the mailing list, and have been in the last linux-next releases (as part of my for-next branch) without issues. Signed-off-by: Moritz Fischer * tag 'fpga-late-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: dfl: pci: add DID for D5005 PAC cards dt-bindings: fpga: fpga-region: Convert to sugar syntax fpga: dfl: afu: harden port enable logic fpga: Add support for Xilinx DFX AXI Shutdown manager dt-bindings: fpga: Add compatible value for Xilinx DFX AXI shutdown manager fpga: xilinx-pr-decoupler: Simplify code by using dev_err_probe() fpga: fpga-mgr: xilinx-spi: fix error messages on -EPROBE_DEFER commit b6f139947e93fec1ade5faf3517dfb2b3b9bcd41 Author: Mauro Carvalho Chehab Date: Thu Apr 8 08:35:30 2021 +0200 media: venus: use NULL instead of zero for pointers As reported by sparse: drivers/media/platform/qcom/venus/core.c:227:41: warning: Using plain integer as NULL pointer drivers/media/platform/qcom/venus/core.c:228:34: warning: Using plain integer as NULL pointer Two vars are using zero instead of NULL for pointers. Not really an issue, but using NULL makes it clearer that the init data is expecting a pointer. Signed-off-by: Mauro Carvalho Chehab commit ec32332df7645e0ba463a08d483fe97665167071 Author: Jeffrey Hugo Date: Wed Mar 10 14:30:55 2021 -0700 bus: mhi: core: Sanity check values from remote device before use When parsing the structures in the shared memory, there are values which come from the remote device. For example, a transfer completion event will have a pointer to the tre in the relevant channel's transfer ring. As another example, event ring elements may specify a channel in which the event occurred, however the specified channel value may not be valid as no channel is defined at that index even though the index may be less than the maximum allowed index. Such values should be considered to be untrusted, and validated before use. If we blindly use such values, we may access invalid data or crash if the values are corrupted. If validation fails, drop the relevant event. Signed-off-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Reviewed-by: Hemant Kumar Link: https://lore.kernel.org/r/1615411855-15053-1-git-send-email-jhugo@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 2531fdbf8bfc22b0a2554bb3e3772dd8105d74ad Author: Dmitry Torokhov Date: Wed Apr 7 23:14:50 2021 -0700 Input: gpio-keys - fix crash when disabliing GPIO-less buttons My brain-damaged adjustments to Paul's patch caused crashes in gpio_keys_disable_button() when driver is used in GPIO-less (i.e. purely interrupt-driven) setups, because I mixed together debounce and release timers when they are in fact separate: Unable to handle kernel NULL pointer dereference at virtual address 0000000c ... PC is at hrtimer_active+0xc/0x98 LR is at hrtimer_try_to_cancel+0x24/0x140 ... [] (hrtimer_active) from [] (hrtimer_try_to_cancel+0x24/0x140) [] (hrtimer_try_to_cancel) from [] (hrtimer_cancel+0x14/0x4c) [] (hrtimer_cancel) from [] (gpio_keys_attr_store_helper+0x1b8/0x1d8 [gpio_keys]) [] (gpio_keys_attr_store_helper [gpio_keys]) from [] (gpio_keys_store_disabled_keys+0x18/0x24 [gpio_keys]) [] (gpio_keys_store_disabled_keys [gpio_keys]) from [] (kernfs_fop_write_iter+0x10c/0x1cc) [] (kernfs_fop_write_iter) from [] (vfs_write+0x2ac/0x404) [] (vfs_write) from [] (ksys_write+0x64/0xdc) [] (ksys_write) from [] (ret_fast_syscall+0x0/0x58) Let's fix it up. Fixes: c9efb0ba281e ("Input: gpio-keys - use hrtimer for software debounce, if possible") Reported-by: Tony Lindgren Tested-by: Tony Lindgren Link: https://lore.kernel.org/r/YG1DFFgojSVfdpaz@google.com Signed-off-by: Dmitry Torokhov commit 65aa97c4d2bfd76677c211b9d03ef05a98c6d68e Author: Christoph Hellwig Date: Sat Apr 3 18:15:29 2021 +0200 md: split mddev_find Split mddev_find into a simple mddev_find that just finds an existing mddev by the unit number, and a more complicated mddev_find that deals with find or allocating a mddev. This turns out to fix this bug reported by Zhao Heming. ----------------------------- snip ------------------------------ commit d3374825ce57 ("md: make devices disappear when they are no longer needed.") introduced protection between mddev creating & removing. The md_open shouldn't create mddev when all_mddevs list doesn't contain mddev. With currently code logic, there will be very easy to trigger soft lockup in non-preempt env. *** env *** kvm-qemu VM 2C1G with 2 iscsi luns kernel should be non-preempt *** script *** about trigger 1 time with 10 tests `1 node1="15sp3-mdcluster1" 2 node2="15sp3-mdcluster2" 3 4 mdadm -Ss 5 ssh ${node2} "mdadm -Ss" 6 wipefs -a /dev/sda /dev/sdb 7 mdadm -CR /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sda \ /dev/sdb --assume-clean 8 9 for i in {1..100}; do 10 echo ==== $i ====; 11 12 echo "test ...." 13 ssh ${node2} "mdadm -A /dev/md0 /dev/sda /dev/sdb" 14 sleep 1 15 16 echo "clean ....." 17 ssh ${node2} "mdadm -Ss" 18 done ` I use mdcluster env to trigger soft lockup, but it isn't mdcluster speical bug. To stop md array in mdcluster env will do more jobs than non-cluster array, which will leave enough time/gap to allow kernel to run md_open. *** stack *** `ID: 2831 TASK: ffff8dd7223b5040 CPU: 0 COMMAND: "mdadm" #0 [ffffa15d00a13b90] __schedule at ffffffffb8f1935f #1 [ffffa15d00a13ba8] exact_lock at ffffffffb8a4a66d #2 [ffffa15d00a13bb0] kobj_lookup at ffffffffb8c62fe3 #3 [ffffa15d00a13c28] __blkdev_get at ffffffffb89273b9 #4 [ffffa15d00a13c98] blkdev_get at ffffffffb8927964 #5 [ffffa15d00a13cb0] do_dentry_open at ffffffffb88dc4b4 #6 [ffffa15d00a13ce0] path_openat at ffffffffb88f0ccc #7 [ffffa15d00a13db8] do_filp_open at ffffffffb88f32bb #8 [ffffa15d00a13ee0] do_sys_open at ffffffffb88ddc7d #9 [ffffa15d00a13f38] do_syscall_64 at ffffffffb86053cb ffffffffb900008c or: [ 884.226509] mddev_put+0x1c/0xe0 [md_mod] [ 884.226515] md_open+0x3c/0xe0 [md_mod] [ 884.226518] __blkdev_get+0x30d/0x710 [ 884.226520] ? bd_acquire+0xd0/0xd0 [ 884.226522] blkdev_get+0x14/0x30 [ 884.226524] do_dentry_open+0x204/0x3a0 [ 884.226531] path_openat+0x2fc/0x1520 [ 884.226534] ? seq_printf+0x4e/0x70 [ 884.226536] do_filp_open+0x9b/0x110 [ 884.226542] ? md_release+0x20/0x20 [md_mod] [ 884.226543] ? seq_read+0x1d8/0x3e0 [ 884.226545] ? kmem_cache_alloc+0x18a/0x270 [ 884.226547] ? do_sys_open+0x1bd/0x260 [ 884.226548] do_sys_open+0x1bd/0x260 [ 884.226551] do_syscall_64+0x5b/0x1e0 [ 884.226554] entry_SYSCALL_64_after_hwframe+0x44/0xa9 ` *** rootcause *** "mdadm -A" (or other array assemble commands) will start a daemon "mdadm --monitor" by default. When "mdadm -Ss" is running, the stop action will wakeup "mdadm --monitor". The "--monitor" daemon will immediately get info from /proc/mdstat. This time mddev in kernel still exist, so /proc/mdstat still show md device, which makes "mdadm --monitor" to open /dev/md0. The previously "mdadm -Ss" is removing action, the "mdadm --monitor" open action will trigger md_open which is creating action. Racing is happening. `: "mdadm -Ss" md_release mddev_put deletes mddev from all_mddevs queue_work for mddev_delayed_delete at this time, "/dev/md0" is still available for opening : "mdadm --monitor ..." md_open + mddev_find can't find mddev of /dev/md0, and create a new mddev and | return. + trigger "if (mddev->gendisk != bdev->bd_disk)" and return -ERESTARTSYS. ` In non-preempt kernel, is occupying on current CPU. and mddev_delayed_delete which was created in also can't be schedule. In preempt kernel, it can also trigger above racing. But kernel doesn't allow one thread running on a CPU all the time. after running some time, the later "mdadm -A" (refer above script line 13) will call md_alloc to alloc a new gendisk for mddev. it will break md_open statement "if (mddev->gendisk != bdev->bd_disk)" and return 0 to caller, the soft lockup is broken. ------------------------------ snip ------------------------------ Cc: stable@vger.kernel.org Fixes: d3374825ce57 ("md: make devices disappear when they are no longer needed.") Reported-by: Heming Zhao Reviewed-by: Heming Zhao Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu commit 8b57251f9a91f5e5a599de7549915d2d226cc3af Author: Christoph Hellwig Date: Sat Apr 3 18:15:28 2021 +0200 md: factor out a mddev_find_locked helper from mddev_find Factor out a self-contained helper to just lookup a mddev by the dev_t "unit". Cc: stable@vger.kernel.org Reviewed-by: Heming Zhao Signed-off-by: Christoph Hellwig Signed-off-by: Song Liu commit 6a4db2a60306eb65bfb14ccc9fde035b74a4b4e7 Author: Zhao Heming Date: Sat Apr 3 11:01:25 2021 +0800 md: md_open returns -EBUSY when entering racing area commit d3374825ce57 ("md: make devices disappear when they are no longer needed.") introduced protection between mddev creating & removing. The md_open shouldn't create mddev when all_mddevs list doesn't contain mddev. With currently code logic, there will be very easy to trigger soft lockup in non-preempt env. This patch changes md_open returning from -ERESTARTSYS to -EBUSY, which will break the infinitely retry when md_open enter racing area. This patch is partly fix soft lockup issue, full fix needs mddev_find is split into two functions: mddev_find & mddev_find_or_alloc. And md_open should call new mddev_find (it only does searching job). For more detail, please refer with Christoph's "split mddev_find" patch in later commits. *** env *** kvm-qemu VM 2C1G with 2 iscsi luns kernel should be non-preempt *** script *** about trigger every time with below script ``` 1 node1="mdcluster1" 2 node2="mdcluster2" 3 4 mdadm -Ss 5 ssh ${node2} "mdadm -Ss" 6 wipefs -a /dev/sda /dev/sdb 7 mdadm -CR /dev/md0 -b clustered -e 1.2 -n 2 -l mirror /dev/sda \ /dev/sdb --assume-clean 8 9 for i in {1..10}; do 10 echo ==== $i ====; 11 12 echo "test ...." 13 ssh ${node2} "mdadm -A /dev/md0 /dev/sda /dev/sdb" 14 sleep 1 15 16 echo "clean ....." 17 ssh ${node2} "mdadm -Ss" 18 done ``` I use mdcluster env to trigger soft lockup, but it isn't mdcluster speical bug. To stop md array in mdcluster env will do more jobs than non-cluster array, which will leave enough time/gap to allow kernel to run md_open. *** stack *** ``` [ 884.226509] mddev_put+0x1c/0xe0 [md_mod] [ 884.226515] md_open+0x3c/0xe0 [md_mod] [ 884.226518] __blkdev_get+0x30d/0x710 [ 884.226520] ? bd_acquire+0xd0/0xd0 [ 884.226522] blkdev_get+0x14/0x30 [ 884.226524] do_dentry_open+0x204/0x3a0 [ 884.226531] path_openat+0x2fc/0x1520 [ 884.226534] ? seq_printf+0x4e/0x70 [ 884.226536] do_filp_open+0x9b/0x110 [ 884.226542] ? md_release+0x20/0x20 [md_mod] [ 884.226543] ? seq_read+0x1d8/0x3e0 [ 884.226545] ? kmem_cache_alloc+0x18a/0x270 [ 884.226547] ? do_sys_open+0x1bd/0x260 [ 884.226548] do_sys_open+0x1bd/0x260 [ 884.226551] do_syscall_64+0x5b/0x1e0 [ 884.226554] entry_SYSCALL_64_after_hwframe+0x44/0xa9 ``` *** rootcause *** "mdadm -A" (or other array assemble commands) will start a daemon "mdadm --monitor" by default. When "mdadm -Ss" is running, the stop action will wakeup "mdadm --monitor". The "--monitor" daemon will immediately get info from /proc/mdstat. This time mddev in kernel still exist, so /proc/mdstat still show md device, which makes "mdadm --monitor" to open /dev/md0. The previously "mdadm -Ss" is removing action, the "mdadm --monitor" open action will trigger md_open which is creating action. Racing is happening. ``` : "mdadm -Ss" md_release mddev_put deletes mddev from all_mddevs queue_work for mddev_delayed_delete at this time, "/dev/md0" is still available for opening : "mdadm --monitor ..." md_open + mddev_find can't find mddev of /dev/md0, and create a new mddev and | return. + trigger "if (mddev->gendisk != bdev->bd_disk)" and return -ERESTARTSYS. ``` In non-preempt kernel, is occupying on current CPU. and mddev_delayed_delete which was created in also can't be schedule. In preempt kernel, it can also trigger above racing. But kernel doesn't allow one thread running on a CPU all the time. after running some time, the later "mdadm -A" (refer above script line 13) will call md_alloc to alloc a new gendisk for mddev. it will break md_open statement "if (mddev->gendisk != bdev->bd_disk)" and return 0 to caller, the soft lockup is broken. Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Zhao Heming Signed-off-by: Song Liu commit 0a7dc8318c2817fb33dc50946f7ca6e0ff28f036 Author: Fabio Estevam Date: Mon Mar 29 09:24:25 2021 -0300 PM / devfreq: imx8m-ddrc: Remove unneeded of_match_ptr() i.MX is a DT-only platform, so of_match_ptr() can be safely removed. Remove the unneeded of_match_ptr(). Signed-off-by: Fabio Estevam Signed-off-by: Chanwoo Choi commit ca948312e00056124e8026478a36d3b7baeb0b22 Author: Fabio Estevam Date: Mon Mar 29 09:24:24 2021 -0300 PM / devfreq: imx-bus: Remove unneeded of_match_ptr() i.MX is a DT-only platform, so of_match_ptr() can be safely removed. Remove the unneeded of_match_ptr(). Signed-off-by: Fabio Estevam Signed-off-by: Chanwoo Choi commit 6c4b264c70adcec0d4e2cdb4573ee8e4526b584d Author: Dong Aisheng Date: Tue Mar 23 15:20:11 2021 +0800 PM / devfreq: imx8m-ddrc: Remove imx8m_ddrc_get_dev_status Current driver actually does not support simple ondemand governor as it's unable to provide device load information. So removing the unnecessary callback to avoid confusing. Right now the driver is using userspace governor by default. polling_ms was also dropped as it's not needed for non-ondemand governor. Signed-off-by: Dong Aisheng Signed-off-by: Chanwoo Choi commit 05f15314f0895bf7dfee67142cd3f7aca3414658 Author: Dong Aisheng Date: Tue Mar 23 15:20:09 2021 +0800 PM / devfreq: Remove the invalid description for get_target_freq First of all, no_central_polling was removed since commit 7e6fdd4bad03 ("PM / devfreq: Core updates to support devices which can idle") Secondly, get_target_freq() is not only called only with update_devfreq() notified by OPP now, but also min/max freq qos notifier. So remove this invalid description now to avoid confusing. Signed-off-by: Dong Aisheng Signed-off-by: Chanwoo Choi commit b19e13463a1054b1b51f4314a1a53da02aed776f Author: Dong Aisheng Date: Tue Mar 9 20:58:38 2021 +0800 PM / devfreq: Check get_dev_status in devfreq_update_stats Check .get_dev_status() in devfreq_update_stats in case it's abused when a device does not provide it. Signed-off-by: Dong Aisheng Signed-off-by: Chanwoo Choi commit 5f104f9fc1bb1423058b98b8a64b01af70f44547 Author: Dong Aisheng Date: Tue Mar 9 20:58:33 2021 +0800 PM / devfreq: Fix the wrong set_freq path for userspace governor in Kconfig Fix the wrong set_freq path for userspace governor in Kconfig. Signed-off-by: Dong Aisheng Signed-off-by: Chanwoo Choi commit 0913507c10eec8c8ec9592c7008e489a302160ad Author: Gaël PORTAY Date: Tue Mar 9 00:38:58 2021 +0100 dt-bindings: devfreq: rk3399_dmc: Remove references of unexistant defines Those DDR related defines do not exist. Replace their references with their numerical constant. Signed-off-by: Gaël PORTAY Reviewed-by: Rob Herring Signed-off-by: Daniel Lezcano Signed-off-by: Chanwoo Choi commit 62467a843e2e40cfb71aabb99835cdcf5f534007 Author: Enric Balletbo i Serra Date: Tue Mar 9 00:38:55 2021 +0100 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: Daniel Lezcano Signed-off-by: Chanwoo Choi commit fbf821ec632b4bb93ec9224c1e75c36b01ad16ed Author: Krzysztof Kozlowski Date: Sun Feb 28 15:52:32 2021 +0900 PM / devfreq: rk3399_dmc: Simplify with dev_err_probe() Common pattern of handling deferred probe can be simplified with dev_err_probe(). Less code and the error value gets printed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Chanwoo Choi commit 62453f1ba5d5def9d58e140a50f3f168f028da38 Author: Dong Aisheng Date: Tue Mar 23 15:20:08 2021 +0800 PM / devfreq: Use more accurate returned new_freq as resume_freq Use the more accurate returned new_freq as resume_freq. It's the same as how devfreq->previous_freq was updated. Fixes: 83f8ca45afbf0 ("PM / devfreq: add support for suspend/resume of a devfreq device") Signed-off-by: Dong Aisheng Signed-off-by: Chanwoo Choi commit 8b50a7995770d41a2e8d9c422cd2882aca0dedd2 Author: Lukasz Luba Date: Mon Mar 15 09:31:23 2021 +0000 PM / devfreq: Unlock mutex and free devfreq struct in error path The devfreq->lock is held for time of setup. Release the lock in the error path, before jumping to the end of the function. Change the goto destination which frees the allocated memory. Cc: v5.9+ # v5.9+ Fixes: 4dc3bab8687f ("PM / devfreq: Add support delayed timer for polling mode") Signed-off-by: Lukasz Luba Signed-off-by: Chanwoo Choi commit 75d1b0b6677054d9b3f0186d014daf461abca68c Merge: e49d033bddf5b 1224451bb6f93 Author: Chanwoo Choi Date: Thu Apr 8 13:13:09 2021 +0900 Merge branch 'immutable-devfreq-v5.13-rc1' into devfreq-next commit 7b1222b224aff41739319ae81cd266825464ad8f Author: Anirudh Ghayal Date: Mon Jan 25 16:38:32 2021 -0800 extcon: qcom-spmi: Add support for VBUS detection VBUS can be detected via a dedicated PMIC pin. Add support for reporting the VBUS status. Signed-off-by: Anirudh Ghayal Signed-off-by: Kavya Nunna Signed-off-by: Guru Das Srinagesh Signed-off-by: Chanwoo Choi commit 4fcdd677c4ea0f57eda1be6fcd965ddd7d9551d6 Author: Guru Das Srinagesh Date: Mon Jan 25 16:38:31 2021 -0800 bindings: pm8941-misc: Add support for VBUS detection Add interrupt support for reporting VBUS detection status that can be detected via a dedicated PMIC pin. Signed-off-by: Anirudh Ghayal Signed-off-by: Guru Das Srinagesh Reviewed-by: Rob Herring Signed-off-by: Chanwoo Choi commit dd6f5afb1c2db352f8dd2d181597b3835f132657 Author: Guru Das Srinagesh Date: Mon Jan 25 16:38:30 2021 -0800 bindings: pm8941-misc: Convert bindings to YAML Convert bindings from txt to YAML. Signed-off-by: Guru Das Srinagesh Reviewed-by: Rob Herring Signed-off-by: Chanwoo Choi commit e3f60329097be9e6c314de36c8dd0c7c5c2c0c7b Author: Nikita Travkin Date: Tue Jan 19 18:33:47 2021 +0500 extcon: sm5502: Detect OTG when USB_ID is connected to ground In it's curent state this driver ignores OTG adapters with ID pin connected to ground. This commit adds a check to set extcon into host mode when such OTG adapter is connected. Signed-off-by: Nikita Travkin Signed-off-by: Chanwoo Choi commit 17e8ff013e3e82a66d239777d113b2aaa97a77d4 Author: Timon Baetz Date: Wed Dec 30 20:51:53 2020 +0000 extcon: max8997: Add CHGINS and CHGRM interrupt handling This allows the MAX8997 charger to set the current limit depending on the detected extcon charger type. Signed-off-by: Timon Baetz Signed-off-by: Chanwoo Choi commit 9c0fed84d5750e1eea6c664e073ffa2534a17743 Merge: 41d1d0c51f5ff 81f1f8f1e1489 Author: Dave Airlie Date: Thu Apr 8 14:02:14 2021 +1000 Merge tag 'drm-intel-next-2021-04-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Features: - Add support for FBs requiring a power-of-two stride padding (Imre) Refactoring: - Disassociate display version from gen (Matt) - Refactor legacy DP and HDMI code to separate files (Ville) - Refactor FB plane code to a separate file (Imre) - Refactor VBT child device info parsing and usage (Jani) - Refactor KBL/TGL/ADL-S display and gt stepping schemes (Jani) Fixes: - DP Link-Training Tunable PHY Repeaters (LTTPR) fixes (Imre) - HDCP fixes (Anshuman) - DP 2.0 HDMI 2.1 PCON Fixed Rate Link (FRL) fixes (Ankit) - Set HDA link parameters in driver (Kai) - Fix enabled_planes bitmask (Ville) - Fix transposed arguments to skl_plane_wm_level() (Ville) - Stop adding planes to the commit needlessly (Ville) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87v996ml17.fsf@intel.com commit 769738fc49bb578e05d404b481a9241d18147d86 Author: Qinglang Miao Date: Wed Nov 25 14:50:34 2020 +0800 soc: qcom: pdr: Fix error return code in pdr_register_listener Fix to return the error code -EREMOTEIO from pdr_register_listener rather than 0. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Link: https://lore.kernel.org/r/20201125065034.154217-1-miaoqinglang@huawei.com Signed-off-by: Bjorn Andersson commit 41d1d0c51f5ffd5c2c35e82e4a675b185cccea13 Merge: 0c7997179a35b 2da21daa7d938 Author: Dave Airlie Date: Thu Apr 8 12:42:46 2021 +1000 Merge tag 'drm-intel-gt-next-2021-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Driver Changes: - Prepare for local/device memory support on DG1 by starting to use it for kernel internal allocations: context, ring and engine scratch (Matt A, CQ, Abdiel, Imre) - Sandybridge fix to avoid hard hang on ring resume (Chris) - Limit imported dma-buf size to int32 (Matt A) - Double check heartbeat timeout before resetting (Chris) - Use new tasklet API for execution list (Emil) - Fix SPDX checkpats warnings (Chris) - Fixes for various checkpatch warnings (Chris) - Selftest improvements (Chris) - Move the defer_request waiter active assertion to correct spot (Chris) - Make local-memory probing a GT operation (Matt, Tvrtko) - Protect against request freeing during cancellation on wedging (Chris) - Retire unexpected starting state error dumping (Chris) - Distinction of memory regions in debugging (Zbigniew) - Always flush the submission queue on checking for idle (Chris) - Consolidate 2big error check to helper (Matt) - Decrease number of subplatform bits (Tvrtko) - Remove unused internal request priority levels (Chris) - Document the unused internal header bits in buddy allocator (Matt) - Cleanup the region class/instance encoding (Matt) Signed-off-by: Dave Airlie From: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/YGxksaZGXHnFxlwg@jlahtine-mobl.ger.corp.intel.com commit 0c7997179a35bf40ab3140bdbb65b376cbb481ab Merge: 1539f71602edf 2e47739152235 Author: Dave Airlie Date: Thu Apr 8 12:41:56 2021 +1000 Merge tag 'mediatek-drm-next-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux into drm-next Mediatek DRM Next for Linux 5.13 1. Fine tune the line time for EOTp. 2. Add support mt8192 dpi. 3. Make crtc config-updating atomic. 4. Don't support hdmi connector creation. From: Chun-Kuang Hu Link: https://patchwork.freedesktop.org/patch/msgid/20210405082248.3578-1-chunkuang.hu@kernel.org Signed-off-by: Dave Airlie commit 8a8cba741b58f367998cb29c99cdf834a2276dbf Author: Jonathan Neuschäfer Date: Sat Mar 20 17:40:22 2021 +0100 ARM: dts: Add board-specific compatible string to npcm750-evb devicetree According to the revised binding, the devicetree needs a board-specific compatible string. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20210320164023.614059-2-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit 281192c4db75443ff01565b8f6db5cbd6846b9a0 Author: Jonathan Neuschäfer Date: Sat Mar 20 17:40:21 2021 +0100 dt-bindings: arm: Convert nuvoton,npcm750 binding to YAML The general trend is to have devicetree bindings in YAML format, to allow automatic validation of bindings and devicetrees. Convert the NPCM SoC family's binding to YAML before it accumulates more entries. The nuvoton,npcm750-evb compatible string is introduced to keep the structure of the binding a little simpler. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210320164023.614059-1-j.neuschaefer@gmx.net Signed-off-by: Joel Stanley commit ee33e2fb3d70267de00f7c0b09e7e3b309a686df Author: George Hung Date: Tue Mar 30 15:13:36 2021 +0800 ARM: dts: nuvoton: Add Quanta GBS BMC Device Tree Add the device tree for the Quanta GBS BMC based on NPCM730 SoC. Signed-off-by: George Hung Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210330071336.18370-1-george.hung@quantatw.com Signed-off-by: Joel Stanley commit 62b8a07b069034e991463d5559e1e334a75209c9 Author: Nichole Wang Date: Tue Mar 30 10:08:08 2021 +0800 ARM: dts: aspeed: mihawk: Add GPIO line names Name the GPIOs to help userspace work with them. The names describe the functionality the lines provide, not the net or ball name. This makes it easier to share userspace code across different systems and makes the use of the lines more obvious. Signed-off-by: Nichole Wang Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210330020808.830-1-Nichole_Wang@wistron.com Signed-off-by: Joel Stanley commit 7f03894a6555a6e33cf18430ad848c521efc5e98 Author: Eddie James Date: Mon Mar 29 10:00:20 2021 -0500 ARM: dts: aspeed: Add Rainier 1S4U machine The 1S4U version of the Rainier system has only 4 fans. Create a new tree, include the 4U version, and delete the 2 extra fans. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-23-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 7aaa2074d582f8e44e1b2a66d3b96fec40cfae7a Author: Joel Stanley Date: Thu Apr 8 10:48:17 2021 +0930 ARM: dts: aspeed: everest: Add size/address cells The gpio and fan nodes reg properties cause dtc to emit a noisy warning about relying on default sizes. Signed-off-by: Joel Stanley commit 6cebf3764fea1cd4afae7a0b6f1274469c3de857 Author: Eddie James Date: Mon Mar 29 10:00:18 2021 -0500 ARM: dts: aspeed: everest: Enable fan watchdog Set watchdog 1 to pulse the fan watchdog circuit that drives the FAULT pin of the MAX31785, resulting in fans running at full speed, if at any point the BMC stops pulsing it, such as a BMC reboot at runtime. Enable watchdog 2 for BMC reboots. Signed-off-by: Matthew Barth Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-21-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 5dbbacd43fc529b3998e9229b65e97451c1a56d4 Author: Eddie James Date: Mon Mar 29 10:00:17 2021 -0500 ARM: dts: aspeed: everest: Add RTC Add the RTC at the appropriate I2C bus and address. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-20-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 3c00ebf08a5b4dcfed60a56e6729bd23be1c65e2 Author: Alpana Kumari Date: Mon Mar 29 10:00:16 2021 -0500 ARM: dts: aspeed: everest: GPIOs support This commit adds support for- - Presence GPIOs - I2C control GPIOs - Op-panel GPIOs (ex PHR) Signed-off-by: Alpana Kumari Signed-off-by: Eddie James Reviewed-by: Brandon Wyman Link: https://lore.kernel.org/r/20210329150020.13632-19-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 22db69f04cd23e75d5961d47785495633c4952bf Author: Jim Wright Date: Mon Mar 29 10:00:15 2021 -0500 ARM: dts: aspeed: everest: Add UCD90320 power sequencer Add UCD90320 chip to Everest device tree. Signed-off-by: Jim Wright Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-18-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit d66d720b64e5da08cdd5dc441a33c7b98c467505 Author: Brandon Wyman Date: Mon Mar 29 10:00:14 2021 -0500 ARM: dts: aspeed: everest: Add power supply i2c devices Add the i2c/pmbus power supply devices to the everest device tree. Signed-off-by: Brandon Wyman Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-17-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit baf1fb2668e2be1015b05827632e4a5087ee1230 Author: Matthew Barth Date: Mon Mar 29 10:00:13 2021 -0500 ARM: dts: aspeed: everest: Add pca9552 fan presence Add the pca9552 at address 0x61 on i2c14 behind mux0 channel 3 with the 4 GPIO fan presence inputs. Signed-off-by: Matthew Barth Signed-off-by: Eddie James Reviewed-by: Brandon Wyman Link: https://lore.kernel.org/r/20210329150020.13632-16-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit d9406d17e9d5bd5dfaf4da2351bfa384a4664fc3 Author: Eddie James Date: Mon Mar 29 10:00:12 2021 -0500 ARM: dts: aspeed: everest: Add FSI CFAMs and re-number engines Add additional CFAMs and re-number the existing engines for the extra processors present on the Everest system. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-15-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 7313cde52aed3f391ad25a66f283d6cac27afaf1 Author: Matthew Barth Date: Mon Mar 29 10:00:11 2021 -0500 ARM: dts: aspeed: everest: Add max31785 fan controller device Add the max31785 configuration at address 0x52 on i2c14 behind mux0 channel 3. Signed-off-by: Matthew Barth Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-14-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 03b5e43f7d50bb7aff35bc5216b9607cee13e7fb Author: Priyanga Ramasamy Date: Mon Mar 29 10:00:10 2021 -0500 ARM: dts: aspeed: everest: Add I2C components Tested and able to bound the devices with i2c driver. Signed-off-by: Priyanga Ramasamy Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-13-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 0d7208d9080c44cb0f41ea72b9768f08f3690790 Author: Eddie James Date: Mon Mar 29 10:00:09 2021 -0500 ARM: dts: aspeed: rainier 4U: Fix fan configuration The 4U fans didn't have the correct properties since the fan nodes were redefined. Fix this by referencing each fan individually and adding the differences to the 4U fans. Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-12-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 510ed4320a2f0bc7624f1fcadb8dac637b993538 Author: Joel Stanley Date: Thu Apr 8 10:44:33 2021 +0930 ARM: dts: aspeed: rainier: Add missing fan nodes The Maxim fan controller has six fans attached. Two of these were missing from the description. Signed-off-by: Joel Stanley commit 2f9a9f3c931b797d9af0db71fb536eac313810c3 Author: Eddie James Date: Mon Mar 29 10:00:08 2021 -0500 ARM: dts: aspeed: rainier: Enable fan watchdog Set watchdog 1 to pulse the fan watchdog circuit that drives the FAULT pin of the MAX31785, resulting in fans running at full speed, if at any point the BMC stops pulsing it, such as a BMC reboot at runtime. Enable watchdog 2 for BMC reboots. Signed-off-by: Matthew Barth Signed-off-by: Eddie James Acked-by: Andrew Jeffery Link: https://lore.kernel.org/r/20210329150020.13632-11-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 8be44de6f2099e90674284046444ded593937d0e Author: Alpana Kumari Date: Mon Mar 29 10:00:07 2021 -0500 ARM: dts: aspeed: rainier: Add presence GPIOs This commit adds presence detect GPIO chips for various FRUs on Rainier. Also, correct the I2C address for the tca9554. Signed-off-by: Alpana Kumari Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-10-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 79432ed403f44c1aea3137d7e3da525e650d8f71 Author: Eddie James Date: Mon Mar 29 10:00:02 2021 -0500 ARM: dts: aspeed: rainier: Add additional processor CFAMs Rainier has two dual-chip modules and therefore four CFAMs with their associated engines. Add these to the devicetree with the i2c busses that have devices on them. Signed-off-by: Eddie James Signed-off-by: Joel Stanley Link: https://lore.kernel.org/r/20210329150020.13632-5-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 44ab6f28531f45405cfef9b379db85b1aca67d4f Author: Brandon Wyman Date: Mon Mar 29 10:00:01 2021 -0500 ARM: dts: aspeed: rainier: Add gpio-keys-polled for fans Add a gpio-keys-polled section to the Rainier device tree for the fan presence signals on the PCA9552 I2C device on bus 7. Signed-off-by: Brandon Wyman Signed-off-by: Matthew Barth Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-4-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 44a2c58e7996c42304dd4e9629bdd860462b13c6 Author: Vishwanatha Subbanna Date: Mon Mar 29 10:00:00 2021 -0500 ARM: dts: aspeed: rainier: Add directly controlled LEDs These LEDs are directly connected to the BMC's GPIO bank. Signed-off-by: Vishwanatha Subbanna Signed-off-by: Eddie James Link: https://lore.kernel.org/r/20210329150020.13632-3-eajames@linux.ibm.com Signed-off-by: Joel Stanley commit 2b81613ce417745c3bddbea950624014166e00d7 Author: Zev Weiss Date: Wed Mar 31 23:42:31 2021 -0500 ARM: dts: aspeed: Add ASRock E3C246D4I BMC This is a relatively low-cost AST2500-based Xeon E-2100/E-2200 series mini-ITX board that we hope can provide a decent platform for OpenBMC development. This initial device-tree provides the necessary configuration for basic BMC functionality such as host power control, serial console and KVM support, and POST code snooping. Signed-off-by: Zev Weiss Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210401044232.9637-1-zev@bewilderbeest.net Signed-off-by: Joel Stanley commit 394cdb69a3c30b33524cf1204afe5cceaba69cdc Author: Quanyang Wang Date: Tue Apr 6 23:31:31 2021 +0800 clk: zynqmp: pll: add set_pll_mode to check condition in zynqmp_pll_enable If there is a IOCTL_SET_PLL_FRAC_MODE request sent to ATF ever, we shouldn't skip invoking PM_CLOCK_ENABLE fn even though this pll has been enabled. In ATF implementation, it will only assign the mode to the variable (struct pm_pll *)pll->mode when handling IOCTL_SET_PLL_FRAC_MODE call. Invoking PM_CLOCK_ENABLE can force ATF send request to PWU to set the pll mode to PLL's register. There is a scenario that happens in enabling VPLL_INT(clk_id:96): 1) VPLL_INT has been enabled during booting. 2) A driver calls clk_set_rate and according to the rate, the VPLL_INT should be set to FRAC mode. Then zynqmp_pll_set_mode is called to pass IOCTL_SET_PLL_FRAC_MODE to ATF. Note that at this point ATF just stores the mode to a variable. 3) This driver calls clk_prepare_enable and zynqmp_pll_enable is called to try to enable VPLL_INT pll. Because of 1), the function zynqmp_pll_enable just returns without doing anything after checking that this pll has been enabled. In the scenario above, the pll mode of VPLL_INT will never be set successfully. So adding set_pll_mode to check condition to fix it. Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver") Signed-off-by: Quanyang Wang Tested-by: Laurent Pinchart Link: https://lore.kernel.org/r/20210406153131.601701-1-quanyang.wang@windriver.com Signed-off-by: Stephen Boyd commit d7fd3f9f53df8bb2212dff70f66f12cae0e1a653 Author: Quanyang Wang Date: Tue Apr 6 23:40:15 2021 +0800 clk: zynqmp: move zynqmp_pll_set_mode out of round_rate callback The round_rate callback should only perform rate calculation and not involve calling zynqmp_pll_set_mode to change the pll mode. So let's move zynqmp_pll_set_mode out of round_rate and to set_rate callback. Fixes: 3fde0e16d016 ("drivers: clk: Add ZynqMP clock driver") Reported-by: Laurent Pinchart Signed-off-by: Quanyang Wang Link: https://lore.kernel.org/r/20210406154015.602779-1-quanyang.wang@windriver.com Signed-off-by: Stephen Boyd commit 21f237534661a93cb6edc68d8cf9aacd025da9c2 Author: Punit Agrawal Date: Mon Mar 22 15:17:54 2021 +0900 clk: zynqmp: Drop dependency on ARCH_ZYNQMP The clock driver depends on ZYNQMP_FIRMWARE which in turn depends on ARCH_ZYNQMP. Simplify the Kconfig by dropping the redundant dependency on ARCH_ZYNQMP as it'll be applied transitively via ZYNQMP_FIRMWARE. Signed-off-by: Punit Agrawal Link: https://lore.kernel.org/r/20210322061754.1065367-3-punit1.agrawal@toshiba.co.jp Reviewed-by: Michal Simek Signed-off-by: Stephen Boyd commit c3ce6a4a812b8426ee0c7877cbd0b413841e770f Author: Punit Agrawal Date: Mon Mar 22 15:17:53 2021 +0900 clk: zynqmp: Enable the driver if ZYNQMP_FIRMWARE is selected When booting the kernel on zynqmp based platforms such as Ultra96v2, peripheral drivers such as that for the sdcard depend on the presence of clocks. Enable the clock driver if it's dependencies are compiled to avoid building an unbootable kernel. Signed-off-by: Punit Agrawal Link: https://lore.kernel.org/r/20210322061754.1065367-2-punit1.agrawal@toshiba.co.jp Acked-by: Michal Simek Signed-off-by: Stephen Boyd commit 886fd9a4b428650d00d0f38c79fe0c8900426c21 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:43 2021 +0300 clk: qcom: gcc-sm8350: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data easy and errorproof. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-34-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit c864cd5f506cf53b7f2290009fba6e933a34770d Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:42 2021 +0300 clk: qcom: gcc-sm8250: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data easy and errorproof. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-33-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 60ca4670fd6436c07cea38472ebcee3b00f03bc7 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:41 2021 +0300 clk: qcom: gcc-sm8150: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data easy and errorproof. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-32-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit b6cf77a7a96154acbb5b57d2d5f4d8710af14353 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:40 2021 +0300 clk: qcom: gcc-sc8180x: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data easy and errorproof. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-31-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit e957ca2a930ad42e47bf5c9ea2a7afa0960ec1d8 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:39 2021 +0300 clk: qcom: gcc-sc7180: use ARRAY_SIZE instead of specifying num_parents Use ARRAY_SIZE() instead of manually specifying num_parents. This makes adding/removing entries to/from parent_data easy and errorproof. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-30-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit b707291351399f45225da29626d853987c22c5b4 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:38 2021 +0300 clk: qcom: videocc-sm8250: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-29-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit c97b6b41e983cfc93cd4d2db6efef0a5ba720fb6 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:37 2021 +0300 clk: qcom: videocc-sm8150: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-28-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 55321d6faeee11b929b821ac2fb4066ca9eb24e3 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:36 2021 +0300 clk: qcom: gpucc-sm8250: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-27-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 637bc9c0abce02dc64f80e87292e6d0eebe289f4 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:35 2021 +0300 clk: qcom: gpucc-sm8150: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-26-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 097a88884272d79f2c5ed60629ad873f25caedc2 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:34 2021 +0300 clk: qcom: gcc-sm8350: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-25-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 31192234a1be1d0cc73848f069eb05bd80c38f01 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:33 2021 +0300 clk: qcom: gcc-sm8250: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-24-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 6326cc388bdb89c505fa16d8023a857e69eb0589 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:32 2021 +0300 clk: qcom: gcc-sm8150: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-23-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 8e41d02717e7291db36016a8477d55509993eb63 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:31 2021 +0300 clk: qcom: gcc-sdx55: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-22-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 53ec3b325f8926729a32cefbb819045d052f36ac Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:30 2021 +0300 clk: qcom: gcc-sc7280: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-21-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 041b893be48510ab72345b813b94eb2067132e9a Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:29 2021 +0300 clk: qcom: gcc-sc7180: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-20-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 634e438f4cdf1c30ce49b9601ac3af1a33ac2d71 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:28 2021 +0300 clk: qcom: dispcc-sm8250: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-19-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit f8fae78c81c8dfd882eb7c1199e777f4a3dc7791 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:27 2021 +0300 clk: qcom: dispcc-sc7180: use parent_hws where possible Switch to using parent_hws instead of parent_data when parents are defined in this driver and so accessible using clk_hw. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-18-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 789ab2c2c33bdd96d4d5e7db1717ec0d90016d03 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:26 2021 +0300 clk: qcom: videocc-sdm845: get rid of the test clock The test clock isn't in the bindings and apparently it's not used by anyone upstream. Remove it. Suggested-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-17-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 35e4368fa3ea9638cb467bd79ed085e254cd93fd Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:25 2021 +0300 clk: qcom: dispcc-sdm845: get rid of the test clock The test clock isn't in the bindings and apparently it's not used by anyone upstream. Remove it. Suggested-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-16-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit c9bef8edb0c3f6d13adc8df560554a11d81995c2 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:24 2021 +0300 clk: qcom: gpucc-sdm845: get rid of the test clock The test clock isn't in the bindings and apparently it's not used by anyone upstream. Remove it. Suggested-by: Stephen Boyd Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-15-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 7f195c06e3459034394eba32f71e2e51abc6ecf1 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:23 2021 +0300 clk: qcom: videocc-sdm845: convert to parent data Convert the clock driver to specify parent data rather than parent names, to actually bind using 'clock-names' specified in the DTS rather than global clock names. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-14-dmitry.baryshkov@linaro.org [sboyd@kernel.org: Silence checkpatch block comments] Signed-off-by: Stephen Boyd commit 040184b7d0155027cc5975b25c3a7a5169be8d96 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:22 2021 +0300 clk: qcom: gpucc-sdm845: convert to parent data Convert the clock driver to specify parent data rather than parent names, to actually bind using 'clock-names' specified in the DTS rather than global clock names. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-13-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 7acd22512907c3afe07cfd759d47a5f8eb8fb04f Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:21 2021 +0300 clk: qcom: dispcc-sdm845: convert to parent data Convert the clock driver to specify parent data rather than parent names, to actually bind using 'clock-names' specified in the DTS rather than global clock names. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-12-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 2e30f6492c3181e7e24f8ae47cab6cbbf773f1bc Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:20 2021 +0300 clk: qcom: videocc-sm8250: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-11-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 477c59f0747b58a74bb5208373e0839f8adbcd13 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:19 2021 +0300 clk: qcom: videocc-sm8150: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-10-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit c33794a4c1f757338e0e4b1111e49f34e45283f4 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:18 2021 +0300 clk: qcom: videocc-sc7180: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20210405224743.590029-9-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 5f1792e98596a70a3bc6f8da7ecd3edee475dc5a Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:17 2021 +0300 clk: qcom: gpucc-sm8250: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20210405224743.590029-8-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit a138f93137458e6438a1b09a2042d497f658d8e0 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:16 2021 +0300 clk: qcom: gpucc-sm8150: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-7-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 2bd019f22d9f8a3c091520c0e6aaddecf4a4800d Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:15 2021 +0300 clk: qcom: gpucc-sdm845: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-6-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit c9944417ee1484957133ffaab9c55fb8ee1dbfa5 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:14 2021 +0300 clk: qcom: gpucc-sc7180: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-5-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit b6f3fd686e2d572dac0daf102eea08964036bd01 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:13 2021 +0300 clk: qcom: gcc-sm8250: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-4-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 6fec0c87ad00425d0ac08b3925437a60387d2970 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:12 2021 +0300 clk: qcom: dispcc-sm8250: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210405224743.590029-3-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit c68da22dc9cc39ced8fc30b65fca5ce2f9583735 Author: Dmitry Baryshkov Date: Tue Apr 6 01:47:11 2021 +0300 clk: qcom: dispcc-sc7180: drop unused enum entries Drop unused enum entries from the list of parent enums. Signed-off-by: Dmitry Baryshkov Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20210405224743.590029-2-dmitry.baryshkov@linaro.org Signed-off-by: Stephen Boyd commit 2e20521b80c76ba517a060a5db752a9ca21c597c Author: Tony Nguyen Date: Tue Mar 2 10:15:44 2021 -0800 ice: Remove unnecessary blank line Checkpatch reports the following, fix it. ----------------------------------------- drivers/net/ethernet/intel/ice/ice_main.c ----------------------------------------- CHECK:BRACES: Blank lines aren't necessary before a close brace '}' FILE: drivers/net/ethernet/intel/ice/ice_main.c:455: + +} Signed-off-by: Tony Nguyen Tested-by: Tony Brelinski commit 771015b90b8686a20f9f328a050ef624e490f475 Author: Brett Creeley Date: Thu Mar 25 15:35:17 2021 -0700 ice: Remove unnecessary checks in add/kill_vid ndo ops Currently the driver is doing two unnecessary checks. First both ops are checking if the VLAN ID passed in is less than VLAN_N_VID and second both ops are checking to see if a port VLAN is configured on the VSI. The first check is already handled by the 8021q driver so this is an unnecessary check. The second check is unnecessary because the PF VSI is never put into a port VLAN. Remove these checks. Signed-off-by: Brett Creeley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 51fe27e179b1fba5504068bdf02453acfabe96b0 Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:16 2021 -0700 ice: Remove rx_gro_dropped stat Tracking of the rx_gro_dropped statistic was removed in commit f73fc40327c0 ("ice: drop dead code in ice_receive_skb()"). Remove the associated variables and its reporting to ethtool stats. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit efc1eddb28aaeb445800041d1fbb9db4e977bf01 Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:15 2021 -0700 ice: Use local variable instead of pointer derefs Replace multiple instances of vsi->back and pi->phy with equivalent local variables Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit dc6aaa139fb74d51c446a624ce8a7fb543e49e57 Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:14 2021 -0700 ice: Remove unnecessary variable In ice_init_phy_user_cfg, vsi is used only to get to hw. Remove this and just use pi->hw Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 75751c80d6d841ec1f803f0a6c9b116345458d16 Author: Jeb Cramer Date: Thu Mar 25 15:35:13 2021 -0700 ice: Limit forced overrides based on FW version Beyond a specific version of firmware, there is no need to provide override values to the firmware when setting PHY capabilities. In this case, we do not need to indicate whether we're in Strict or Lenient Link Mode. In the case of translating capabilities to the configuration structure, the module compliance enforcement is already correctly set by firmware, so the extra code block is redundant. Signed-off-by: Jeb Cramer Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 0a02944feaa75df4309103b8a19c56960cf32164 Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:12 2021 -0700 ice: Use default configuration mode for PHY configuration Recent firmware supports a new "get PHY capabilities" mode ICE_AQC_REPORT_DFLT_CFG which makes it unnecessary for the driver to track and apply NVM based default link overrides. If FW AQ API version supports it, use Report Default Configuration. Add check function for Report Default Configuration support and update accordingly. Also change adv_phy_type_[lo|hi] to advert_phy_type[lo|hi] for clarity. Co-developed-by: Mateusz Pacuszka Signed-off-by: Mateusz Pacuszka Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 178a666daa0e32d0dcc2035d54a6071b568b974d Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:11 2021 -0700 ice: Replace some memsets and memcpys with assignment In ice_set_link_ksettings, use assignment instead of memset/memcpy where possible Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 450f10e794199b49d0a134f5dae47896c8ab0f44 Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:10 2021 -0700 ice: Fix error return codes in ice_set_link_ksettings Return more appropriate error codes so that the right error message is communicated to the user by ethtool. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 0be39bb4c7c8c358f7baf10296db2426f7cf814c Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:09 2021 -0700 ice: Rename a couple of variables In ice_set_link_ksettings, change 'abilities' to 'phy_caps' and 'p' to 'pi'. This is more consistent with similar usages elsewhere in the driver. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit fd3dc1655eda6173566d56eaeb54f27ab4c9e33c Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:08 2021 -0700 ice: Remove unnecessary checker loop The loop checking for PF VSI doesn't make any sense. The VSI type backing the netdev passed to ice_set_link_ksettings will always be of type ICE_PF_VSI. Remove it. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit d348d51771b9db562b9b8c88c3ac76953741b906 Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:07 2021 -0700 ice: Ignore EMODE return for opcode 0x0605 When link is owned by manageability, the driver is not allowed to fiddle with link. FW returns ICE_AQ_RC_EMODE if the driver attempts to do so. This patch adds a new function ice_set_link which abstracts the call to ice_aq_set_link_restart_an and provides a clean way to turn on/off link. While making this change, I also spotted that an int variable was being used to hold both an ice_status return code and the Linux errno return code. This pattern more often than not results in the driver inadvertently returning ice_status back to kernel which is a major boo-boo. Clean it up. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit d6730a871e68f10c786cdee59aebd6f92d49d249 Author: Anirudh Venkataramanan Date: Thu Mar 25 15:35:06 2021 -0700 ice: Align macro names to the specification For get PHY abilities AQ, the specification defines "report modes" as "with media", "without media" and "active configuration". For clarity, rename macros to align with the specification. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 7fb09a737536fc7bff75c7018133acb30328ca07 Author: Victor Raj Date: Thu Mar 25 15:35:05 2021 -0700 ice: Modify recursive way of adding nodes Remove the recursive way of adding the nodes to the layer in order to reduce the stack usage. Instead the algorithm is modified to use a while loop. The previous code was scanning recursively the nodes horizontally. The total stack consumption will be based on number of nodes present on that layer. In some cases it can consume more stack. Signed-off-by: Victor Raj Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 3056df93f7a83f456d20536c92260db0b1290ef5 Author: Chinh T Cao Date: Thu Mar 25 15:35:04 2021 -0700 ice: Re-send some AQ commands, as result of EBUSY AQ error Retry sending some AQ commands, as result of EBUSY AQ error. ice_aqc_opc_get_link_topo ice_aqc_opc_lldp_stop ice_aqc_opc_lldp_start ice_aqc_opc_lldp_filter_ctrl This change follows the latest guidelines from HW team. It is better to retry the same AQ command several times, as the result of EBUSY, instead of returning error to the caller right away. Signed-off-by: Chinh T Cao Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 52d1a8da40b3c3e165e7b89d1a21a48da196792f Author: Colin Ian King Date: Tue Apr 6 19:27:46 2021 +0100 clk: socfpga: remove redundant initialization of variable div The variable div 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/20210406182746.432861-1-colin.king@canonical.com Acked-by: Dinh Nguyen Signed-off-by: Stephen Boyd commit 657d4d1934f75a2d978c3cf2086495eaa542e7a9 Author: Colin Ian King Date: Tue Apr 6 18:01:15 2021 +0100 clk: socfpga: arria10: Fix memory leak of socfpga_clk on error return There is an error return path that is not kfree'ing socfpga_clk leading to a memory leak. Fix this by adding in the missing kfree call. Addresses-Coverity: ("Resource leak") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210406170115.430990-1-colin.king@canonical.com Acked-by: Dinh Nguyen Reviewed-by: Krzysztof Kozlowski Signed-off-by: Stephen Boyd commit 7d8f346504ebde71d92905e3055d40ea8f34416e Author: Yixian Liu Date: Tue Apr 6 16:46:12 2021 +0800 RDMA/core: Make the wc status prompt message clearer Local invalidate is also a kind of memory management operation, not only memory bind operation. Furthermore, as invalidate operations include local and remote, add prefix to the prompt message to make it clearer. Link: https://lore.kernel.org/r/1617698772-13871-1-git-send-email-liweihang@huawei.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 2abb7431736be539b2e0926388c7c2602a68a178 Author: Wei Yongjun Date: Wed Apr 7 15:49:00 2021 +0000 RDMA/hns: Use GFP_ATOMIC under spin lock A spin lock is taken here so we should use GFP_ATOMIC. Fixes: f91696f2f053 ("RDMA/hns: Support congestion control type selection according to the FW") Link: https://lore.kernel.org/r/20210407154900.3486268-1-weiyongjun1@huawei.com Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Jason Gunthorpe commit 7e111bbff92620f56609a81353bba5bd1944851b Author: Praveen Kumar Kannoju Date: Sat Apr 3 04:53:55 2021 +0000 IB/mlx5: Reduce max order of memory allocated for xlt update To update xlt (during mlx5_ib_reg_user_mr()), the driver can request up to 1 MB (order-8) memory, depending on the size of the MR. This costly allocation can sometimes take very long to return (a few seconds). This causes the calling application to hang for a long time, especially when the system is fragmented. To avoid these long latency spikes, the calls the higher order allocations need to fail faster in case they are not available. In order to acheive this we need __GFP_NORETRY flag in the gfp_mask before during fetching the free pages. Allow the algorithm to automatically fall back to smaller page sizes. Link: https://lore.kernel.org/r/1617425635-35631-1-git-send-email-praveen.kannoju@oracle.com Signed-off-by: Praveen Kumar Kannoju Acked-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fdde1aa09a82992cb09af8082d50afae5d22bfa4 Author: Kaike Wan Date: Mon Mar 29 10:06:31 2021 -0400 IB/hfi1: Remove unused function Remove the unused function sdma_iowait_schedule(). Fixes: 7724105686e7 ("IB/hfi1: add driver files") Link: https://lore.kernel.org/r/1617026791-89997-1-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Mike Marciniszyn Signed-off-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit ca5f72568e034e1295a7ae350b1f786fcbfb2848 Author: Mike Marciniszyn Date: Mon Mar 29 09:54:14 2021 -0400 IB/hfi1: Use kzalloc() for mmu_rb_handler allocation The code currently assumes that the mmu_notifier struct embedded in mmu_rb_handler only contains two fields. There are now extra fields: struct mmu_notifier { struct hlist_node hlist; const struct mmu_notifier_ops *ops; struct mm_struct *mm; struct rcu_head rcu; unsigned int users; }; Given that there in no init for the mmu_notifier, a kzalloc() should be used to insure that any newly added fields are given a predictable initial value of zero. Fixes: 06e0ffa69312 ("IB/hfi1: Re-factor MMU notification code") Link: https://lore.kernel.org/r/1617026056-50483-9-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Adam Goldman Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 6b13215df1d37f5be23fc4a01a915a287b25ce15 Author: Mike Marciniszyn Date: Mon Mar 29 09:54:13 2021 -0400 IB/hfi1: Add additional usdma traces Add traces that were vital in isolating an issue with pq waitlist in commit fa8dac396863 ("IB/hfi1: Fix another case where pq is left on waitlist") Link: https://lore.kernel.org/r/1617026056-50483-8-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 326a23930793ae9711363922ec0f331e29c47f63 Author: Mike Marciniszyn Date: Mon Mar 29 09:54:11 2021 -0400 IB/hfi1: Remove indirect call to hfi1_ipoib_send_dma() hfi1_ipoib_send() directly calls hfi1_ipoib_send_dma() with no value add. Fix by renaming hfi1_ipoib_send_dma() to hfi1_ipoib_send(). Link: https://lore.kernel.org/r/1617026056-50483-6-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 70d44c18a7b32fcaa14d165b2004d7e5ba21f5ed Author: Mike Marciniszyn Date: Mon Mar 29 09:54:10 2021 -0400 IB/hfi1: Use napi_schedule_irqoff() for tx napi The call is from an ISR context and napi_schedule_irqoff() can be used. Change the call to the more efficient type. Link: https://lore.kernel.org/r/1617026056-50483-5-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit b536d4b2a279733f440c911dc831764690b90050 Author: Mike Marciniszyn Date: Mon Mar 29 09:54:09 2021 -0400 IB/hfi1: Correct oversized ring allocation The completion ring for tx is using the wrong size to size the ring, oversizing the ring by two orders of magniture. Correct the allocation size and use kcalloc_node() to allocate the ring. Fix mistaken GFP defines in similar allocations. Link: https://lore.kernel.org/r/1617026056-50483-4-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 042a00f93aad5874937e00f36e68301f7e3a0af1 Author: Mike Marciniszyn Date: Mon Mar 29 09:54:08 2021 -0400 IB/{ipoib,hfi1}: Add a timeout handler for rdma_netdev The current rdma_netdev handling in ipoib hooks the tx_timeout handler, but prints out a totally useless message that prevents effective debugging especially when multiple transmit queues are being used. Add a tx_timeout rdma_netdev hook and implement the callback in the hfi1 to print additional information. The existing non-helpful message is avoided when the driver has presented a callback. Link: https://lore.kernel.org/r/1617026056-50483-3-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Kaike Wan Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit 4bd00b55c978017aad10f0ff3e45525cd62cca07 Author: Mike Marciniszyn Date: Mon Mar 29 09:54:07 2021 -0400 IB/hfi1: Add AIP tx traces Add traces to allow for debugging issues with AIP tx. Link: https://lore.kernel.org/r/1617026056-50483-2-git-send-email-dennis.dalessandro@cornelisnetworks.com Reviewed-by: Kaike Wan Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe commit de2fcb3e62013738f22bbb42cbd757d9a242574e Author: Daniel Latypov Date: Tue Apr 6 15:51:00 2021 -0700 Documentation: kunit: add tips for using current->kunit_test As of commit 359a376081d4 ("kunit: support failure from dynamic analysis tools"), we can use current->kunit_test to find the current kunit test. Mention this in tips.rst and give an example of how this can be used in conjunction with `test->priv` to pass around state and specifically implement something like mocking. There's a lot more we could go into on that topic, but given that example is already longer than every other "tip" on this page, we just point to the API docs and leave filling in the blanks as an exercise to the reader. Also give an example of kunit_fail_current_test(). Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit e75074781f1735c1976bc551e29ccf2ba9a4b17f Author: Fenghua Yu Date: Wed Apr 7 19:57:28 2021 +0000 selftests/resctrl: Change a few printed messages Change a few printed messages to report test progress more clearly. Add a missing "\n" at the end of one printed message. Suggested-by: Shuah Khan Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 3cd52c1e32fe7dfee09815ced702db9ee9f84ec9 Author: Wei Yongjun Date: Wed Apr 7 15:07:12 2021 +0000 net: fealnx: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 6381c45b28385451c5bb54d131475d38849639f3 Author: Wei Yongjun Date: Wed Apr 7 15:07:11 2021 +0000 net: atheros: atl2: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit f670149a4f5f17190a828b6631e6c8de74efa975 Author: Wei Yongjun Date: Wed Apr 7 15:07:09 2021 +0000 net: sundance: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 02f2743ecd7baa64f0e716cde4f5b2fd18811955 Author: Wei Yongjun Date: Wed Apr 7 15:07:08 2021 +0000 tulip: de2104x: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 95b2fbdb9321168fc557fdc4a5d58c9bf9d13fef Author: Wei Yongjun Date: Wed Apr 7 15:07:07 2021 +0000 tulip: windbond-840: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 1ffa6604431aadbd36e2f95c0078a2455518464e Author: Wei Yongjun Date: Wed Apr 7 15:07:05 2021 +0000 enic: use module_pci_driver to simplify the code Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit 4e92cac843d3c1bfe033de9edbde483525ebd1c4 Author: Wei Yongjun Date: Wed Apr 7 15:07:04 2021 +0000 net: encx24j600: use module_spi_driver to simplify the code module_spi_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit a18f19e912014782c6ec67038e07f2dfea81625b Author: Johan Hovold Date: Wed Apr 7 12:48:56 2021 +0200 net: wan: z85230: drop unused async state According to the changelog, asynchronous mode was dropped sometime before v2.2. Let's get rid of the unused driver-specific async state as well so that it doesn't show up when doing tree-wide tty work. Signed-off-by: Johan Hovold Signed-off-by: David S. Miller commit 298b58f00c0f86868ea717426beb5c1198772f81 Author: Colin Ian King Date: Wed Apr 7 11:12:48 2021 +0100 liquidio: Fix unintented sign extension of a left shift of a u16 The macro CN23XX_PEM_BAR1_INDEX_REG is being used to shift oct->pcie_port (a u16) left 24 places. There are two subtle issues here, first the shift gets promoted to an signed int and then sign extended to a u64. If oct->pcie_port is 0x80 or more then the upper bits get sign extended to 1. Secondly shfiting a u16 24 bits will lead to an overflow so it needs to be cast to a u64 for all the bits to not overflow. It is entirely possible that the u16 port value is never large enough for this to fail, but it is useful to fix unintended overflows such as this. Fix this by casting the port parameter to the macro to a u64 before the shift. Addresses-Coverity: ("Unintended sign extension") Fixes: 5bc67f587ba7 ("liquidio: CN23XX register definitions") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 7b3ae17f0f681027a5de532c6a94d99334d97633 Author: Colin Ian King Date: Wed Apr 7 10:39:22 2021 +0100 xircom: remove redundant error check on variable err The error check on err is always false as err is always 0 at the port_found label. The code is redundant and can be removed. Addresses-Coverity: ("Logically dead code") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 33b32a2984269706449ff4702682cac2dda01c7e Merge: 0854fa82c96ca c7eb923c3caf4 Author: David S. Miller Date: Wed Apr 7 14:44:52 2021 -0700 Merge tag 'linux-can-next-for-5.13-20210407' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2021-04-07 this is a pull request of 6 patches for net-next/master. The first patch targets the CAN driver infrastructure, it improves the alloc_can{,fd}_skb() function to set the pointer to the CAN frame to NULL if skb allocation fails. The next patch adds missing error handling to the m_can driver's RX path (the code was introduced in -next, no need to backport). In the next patch an unused constant is removed from an enum in the c_can driver. The last 3 patches target the mcp251xfd driver. They add BQL support and try to work around a sometimes broken CRC when reading the TBC register. ==================== Signed-off-by: David S. Miller commit 0854fa82c96ca37a35e954b7079c0bfd795affb1 Author: Andrei Vagin Date: Tue Apr 6 23:40:51 2021 -0700 net: remove the new_ifindex argument from dev_change_net_namespace Here is only one place where we want to specify new_ifindex. In all other cases, callers pass 0 as new_ifindex. It looks reasonable to add a low-level function with new_ifindex and to convert dev_change_net_namespace to a static inline wrapper. Fixes: eeb85a14ee34 ("net: Allow to specify ifindex when device is moved to another namespace") Suggested-by: Jakub Kicinski Signed-off-by: Andrei Vagin Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 7e4a51319d3a71ac8002c96f817bcbeb36789b07 Author: Andrei Vagin Date: Tue Apr 6 23:40:03 2021 -0700 net: introduce nla_policy for IFLA_NEW_IFINDEX In this case, we don't need to check that new_ifindex is positive in validate_linkmsg. Fixes: eeb85a14ee34 ("net: Allow to specify ifindex when device is moved to another namespace") Suggested-by: Jakub Kicinski Signed-off-by: Andrei Vagin Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3d3a360e5706169a60fd4f26a9cec7da196a41c9 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:37 2021 -0300 vfio/mbochs: Use mdev_get_type_group_id() The mbochs_types array is parallel to the supported_type_groups array, so the type_group_id indexes both. Instead of doing string searching just directly index with type_group_id in all places. Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Message-Id: <14-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit adc9d1f6f5db811f5269cfc66c48fc0cab6c041c Author: Jason Gunthorpe Date: Tue Apr 6 16:40:36 2021 -0300 vfio/mdpy: Use mdev_get_type_group_id() The mdpy_types array is parallel to the supported_type_groups array, so the type_group_id indexes both. Instead of doing string searching just directly index with type_group_id in all places. Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Message-Id: <13-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit c594b26ff78e2cb315101ade73155baf868158eb Author: Jason Gunthorpe Date: Tue Apr 6 16:40:35 2021 -0300 vfio/mtty: Use mdev_get_type_group_id() The type_group_id directly gives the single or dual port index, no need for string searching. Reviewed-by: Christoph Hellwig Signed-off-by: Jason Gunthorpe Message-Id: <12-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 15fcc44be0c7afa2945b1896a96ac2ddf09f1fa7 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:34 2021 -0300 vfio/mdev: Add mdev/mtype_get_type_group_id() This returns the index in the supported_type_groups array that is associated with the mdev_type attached to the struct mdev_device or its containing struct kobject. Each mdev_device can be spawned from exactly one mdev_type, which in turn originates from exactly one supported_type_group. Drivers are using weird string calculations to try and get back to this index, providing a direct access to the index removes a bunch of wonky driver code. mdev_type->group can be deleted as the group is obtained using the type_group_id. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <11-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit fbea43239074e16c91048f5ce70378664efbdb99 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:33 2021 -0300 vfio/mdev: Remove duplicate storage of parent in mdev_device mdev_device->type->parent is the same thing. The struct mdev_device was relying on the kref on the mdev_parent to also indirectly hold a kref on the mdev_type pointer. Now that the type holds a kref on the parent we can directly kref the mdev_type and remove this implicit relationship. Reviewed-by: Christoph Hellwig Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <10-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 18d731242d5c67c0783126c42d3f85870cec2df5 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:32 2021 -0300 vfio/mdev: Add missing error handling to dev_set_name() This can fail, and seems to be a popular target for syzkaller error injection. Check the error return and unwind with put_device(). Fixes: 7b96953bc640 ("vfio: Mediated device Core driver") Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Max Gurtovoy Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <9-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit fbd0e2b0c3d0b2eeaef471c9fe19ae5a7b2ee970 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:31 2021 -0300 vfio/mdev: Reorganize mdev_device_create() Once the memory for the struct mdev_device is allocated it should immediately be device_initialize()'d and filled in so that put_device() can always be used to undo the allocation. Place the mdev_get/put_parent() so that they are clearly protecting the mdev->parent pointer. Move the final put to the release function so that the lifetime rules are trivial to understand. Update the goto labels to follow the normal convention. Remove mdev_device_free() as the release function via device_put() is now usable in all cases. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <8-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 9a302449a58d45d0ef2aab686f64b35919bc604c Author: Jason Gunthorpe Date: Tue Apr 6 16:40:30 2021 -0300 vfio/mdev: Add missing reference counting to mdev_type struct mdev_type holds a pointer to the kref'd object struct mdev_parent, but doesn't hold the kref. The lifetime of the parent becomes implicit because parent_remove_sysfs_files() is supposed to remove all the access before the parent can be freed, but this is very hard to reason about. Make it obviously correct by adding the missing get. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <7-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit a9f8111d0b5f445d853345e6917c1781573e4ba9 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:29 2021 -0300 vfio/mdev: Expose mdev_get/put_parent to mdev_private.h The next patch will use these in mdev_sysfs.c While here remove the now dead code checks for NULL, a mdev_type can never have a NULL parent. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <6-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 417fd5bf242d7691c15fe0bd705ab76c69276572 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:28 2021 -0300 vfio/mdev: Use struct mdev_type in struct mdev_device The kobj pointer in mdev_device is actually pointing at a struct mdev_type. Use the proper type so things are understandable. There are a number of places that are confused and passing both the mdev and the mtype as function arguments, fix these to derive the mtype directly from the mdev to remove the redundancy. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <5-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 91b9969d9c6bb7c02253bbfc536bfd892f636fdc Author: Jason Gunthorpe Date: Tue Apr 6 16:40:27 2021 -0300 vfio/mdev: Simplify driver registration This is only done once, we don't need to generate code to initialize a structure stored in the ELF .data segment. Fill in the three required .driver members directly instead of copying data into them during mdev_register_driver(). Further the to_mdev_driver() function doesn't belong in a public header, just inline it into the two places that need it. Finally, we can now clearly see that 'drv' derived from dev->driver cannot be NULL, firstly because the driver core forbids it, and secondly because NULL won't pass through the container_of(). Remove the dead code. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <4-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 2a3d15f270efa50d78d8a32d895e9d5396668f3a Author: Jason Gunthorpe Date: Tue Apr 6 16:40:26 2021 -0300 vfio/mdev: Add missing typesafety around mdev_device The mdev API should accept and pass a 'struct mdev_device *' in all places, not pass a 'struct device *' and cast it internally with to_mdev_device(). Particularly in its struct mdev_driver functions, the whole point of a bus's struct device_driver wrapper is to provide type safety compared to the default struct device_driver. Further, the driver core standard is for bus drivers to expose their device structure in their public headers that can be used with container_of() inlines and '&foo->dev' to go between the class levels, and '&foo->dev' to be used with dev_err/etc driver core helper functions. Move 'struct mdev_device' to mdev.h Once done this allows moving some one instruction exported functions to static inlines, which in turns allows removing one of the two grotesque symbol_get()'s related to mdev in the core code. Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Reviewed-by: Christoph Hellwig Message-Id: <3-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit b5a1f8921d5040bb788492bf33a66758021e4be5 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:25 2021 -0300 vfio/mdev: Do not allow a mdev_type to have a NULL parent pointer There is a small race where the parent is NULL even though the kobj has already been made visible in sysfs. For instance the attribute_group is made visible in sysfs_create_files() and the mdev_type_attr_show() does: ret = attr->show(kobj, type->parent->dev, buf); Which will crash on NULL parent. Move the parent setup to before the type pointer leaves the stack frame. Fixes: 7b96953bc640 ("vfio: Mediated device Core driver") Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Max Gurtovoy Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <2-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 6cbf507fd08b52901d62bf11f3507e80f84c0db4 Author: Jason Gunthorpe Date: Tue Apr 6 16:40:24 2021 -0300 vfio/mdev: Fix missing static's on MDEV_TYPE_ATTR's These should always be prefixed with static, otherwise compilation will fail on non-modular builds with ld: samples/vfio-mdev/mbochs.o:(.data+0x2e0): multiple definition of `mdev_type_attr_name'; samples/vfio-mdev/mdpy.o:(.data+0x240): first defined here Fixes: a5e6e6505f38 ("sample: vfio bochs vbe display (host device for bochs-drm)") Fixes: d61fc96f47fd ("sample: vfio mdev display - host device") Signed-off-by: Jason Gunthorpe Reviewed-by: Christoph Hellwig Message-Id: <1-v2-d36939638fc6+d54-vfio2_jgg@nvidia.com> Signed-off-by: Alex Williamson commit f86c70ed0476eaaa0215a97005af336f687baa77 Merge: 872fff333fb1a f94d6389f6a8a Author: David S. Miller Date: Wed Apr 7 14:38:24 2021 -0700 Merge tag 'mlx5-updates-2021-04-06' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-04-06 Introduce TC sample offload Background ---------- The tc sample action allows user to sample traffic matched by tc classifier. The sampling consists of choosing packets randomly and sampling them using psample module. The tc sample parameters include group id, sampling rate and packet's truncation (to save kernel-user traffic). Sample in TC SW --------------- User must specify rate and group id for sample action, truncate is optional. tc filter add dev enp4s0f0_0 ingress protocol ip prio 1 flower \ src_mac 02:25:d0:14:01:02 dst_mac 02:25:d0:14:01:03 \ action sample rate 10 group 5 trunc 60 \ action mirred egress redirect dev enp4s0f0_1 The tc sample action kernel module 'act_sample' will call another kernel module 'psample' to send sampled packets to userspace. MLX5 sample HW offload - MLX5 driver patches -------------------------------------------- The sample action is translated to a goto flow table object destination which samples packets according to the provided sample ratio. Sampled packets are duplicated. One copy is processed by a termination table, named the sample table, which sends the packet to the eswitch manager port (that will be processed by software). The second copy is processed by the default table which executes the subsequent actions. The default table is created per tuple as rules with different prios and chains may overlap. For example, for the following typical flow table: +-------------------------------+ + original flow table + +-------------------------------+ + original match + +-------------------------------+ + sample action + other actions + +-------------------------------+ We translate the tc filter with sample action to the following HW model: +---------------------+ + original flow table + +---------------------+ + original match + +---------------------+ | v +------------------------------------------------+ + Flow Sampler Object + +------------------------------------------------+ + sample ratio + +------------------------------------------------+ + sample table id | default table id + +------------------------------------------------+ | | v v +-----------------------------+ +----------------------------------------+ + sample table + + default table per + +-----------------------------+ +----------------------------------------+ + forward to management vport + + original match + +-----------------------------+ +----------------------------------------+ + other actions + +----------------------------------------+ Flow sampler object ------------------- Hardware introduces flow sampler object to do sample. It is a new destination type. Driver needs to specify two flow table ids in it. One is sample table id. The other one is the default table id. Sample table samples the packets according to the sample rate and forward the sampled packets to eswitch manager port. Default table finishes the subsequent actions. Group id and reg_c0 ------------------- Userspace program will take different actions for sampled packets according to tc sample action group id. So hardware must pass group id to software for each sampled packets. In Paul Blakey's "Introduce connection tracking offload" patch set, reg_c0 lower 16 bits are used for miss packet chain id restore. We convert reg_c0 lower 16 bits to a common object pool, so other features can also use it. Since sample group id is 32 bits, create a 16 bits object id to map the group id and write the object id to reg_c0 lower 16 bits. reg_c0 can only be used for matching. Write reg_c0 to flow_tag, so software can get the object id via flow_tag and find group id via the common object pool. Sampler restore handle ---------------------- Use common object pool to create an object id to map sample parameters. Allocate a modify header action to write the object id to reg_c0 lower 16 bits. Create a restore rule to pass the object id to software. So software can identify sampled packets via the object id and send it to userspace. Aggregate the modify header action, restore rule and object id to a sample restore handle. Re-use identical sample restore handle for the same object id. Send sampled packets to userspace --------------------------------- The destination for sampled packets is eswitch manager port, so representors can receive sampled packets together with the group id. Driver will send sampled packets and group id to userspace via psample. ==================== Signed-off-by: David S. Miller commit 7d88329e5b0fe636e63e2b1f078696bc85780442 Author: Darrick J. Wong Date: Tue Mar 23 16:59:31 2021 -0700 xfs: move the check for post-EOF mappings into xfs_can_free_eofblocks Fix the weird split of responsibilities between xfs_can_free_eofblocks and xfs_free_eofblocks by moving the chunk of code that looks for any actual post-EOF space mappings from the second function into the first. This clears the way for deferred inode inactivation to be able to decide if an inode needs inactivation work before committing the released inode to the inactivation code paths (vs. marking it for reclaim). Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 2b156ff8c82eed24d2b06520923856946143ba17 Author: Darrick J. Wong Date: Tue Mar 23 16:59:31 2021 -0700 xfs: move the xfs_can_free_eofblocks call under the IOLOCK In xfs_inode_free_eofblocks, move the xfs_can_free_eofblocks call further down in the function to the point where we have taken the IOLOCK. This is preparation for the next patch, where we will need that lock (or equivalent) so that we can check if there are any post-eof blocks to clean out. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b2941046ea85d2cd94b485831bf03402f34f4060 Author: Dave Chinner Date: Tue Apr 6 07:03:24 2021 -0700 xfs: precalculate default inode attribute offset Default attr fork offset is based on inode size, so is a fixed geometry parameter of the inode. Move it to the xfs_ino_geometry structure and stop calculating it on every call to xfs_default_attroffset(). Signed-off-by: Dave Chinner Tested-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson commit 683ec9ba887d096a6cbd9a5778be9400efe6468c Author: Dave Chinner Date: Tue Apr 6 07:02:04 2021 -0700 xfs: default attr fork size does not handle device inodes Device inodes have a non-default data fork size of 8 bytes as checked/enforced by xfs_repair. xfs_default_attroffset() doesn't handle this, so lets do a minor refactor so it does. Fixes: e6a688c33238 ("xfs: initialise attr fork on inode create") Signed-off-by: Dave Chinner Tested-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson commit 8de1cb0038026a35dca276c69fa5caa5453879f3 Author: Dave Chinner Date: Tue Apr 6 07:01:41 2021 -0700 xfs: inode fork allocation depends on XFS_IFEXTENT flag Due to confusion on when the XFS_IFEXTENT needs to be set, the changes in e6a688c33238 ("xfs: initialise attr fork on inode create") failed to set the flag when initialising the empty attribute fork at inode creation. Set this flag the same way xfs_bmap_add_attrfork() does after attry fork allocation. Fixes: e6a688c33238 ("xfs: initialise attr fork on inode create") Signed-off-by: Dave Chinner Tested-by: Brian Foster Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson commit 2442ee15bb1e726e0db1b90faf02211f88fb5d71 Author: Dave Chinner Date: Tue Apr 6 07:01:00 2021 -0700 xfs: eager inode attr fork init needs attr feature awareness The pitfalls of regression testing on a machine without realising that selinux was disabled. Only set the attr fork during inode allocation if the attr feature bits are already set on the superblock. Fixes: e6a688c33238 ("xfs: initialise attr fork on inode create") Signed-off-by: Dave Chinner Tested-by: Brian Foster Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Reviewed-by: Allison Henderson commit ae7bae68ea4943318e3014d4a6d4a2a289e16aab Author: Chandan Babu R Date: Tue Apr 6 06:59:18 2021 -0700 xfs: scrub: Disable check for unoptimized data fork bmbt node xchk_btree_check_minrecs() checks if the contents of the immediate child of a bmbt root block can fit within the root block. This check could fail on inodes with an attr fork since xfs_bmap_add_attrfork_btree() used to demote the current root node of the data fork as the child of a newly allocated root node if it found that the size of "struct xfs_btree_block" along with the space required for records exceeded that of space available in the data fork. xfs_bmap_add_attrfork_btree() should have used "struct xfs_bmdr_block" instead of "struct xfs_btree_block" for the above mentioned space requirement calculation. This commit disables the check for unoptimized (in terms of disk space usage) data fork bmbt trees since there could be filesystems in use that already have such a layout. Suggested-by: Darrick J. Wong Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit b6785e279d53ca5c4fa6be1146e85000870d73ef Author: Chandan Babu R Date: Fri Apr 2 15:07:33 2021 -0700 xfs: Use struct xfs_bmdr_block instead of struct xfs_btree_block to calculate root node size The incore data fork of an inode stores the bmap btree root node as 'struct xfs_btree_block'. However, the ondisk version of the inode stores the bmap btree root node as a 'struct xfs_bmdr_block'. xfs_bmap_add_attrfork_btree() checks if the btree root node fits inside the data fork of the inode. However, it incorrectly uses 'struct xfs_btree_block' to compute the size of the bmap btree root node. Since size of 'struct xfs_btree_block' is larger than that of 'struct xfs_bmdr_block', xfs_bmap_add_attrfork_btree() could end up unnecessarily demoting the current root node as the child of newly allocated root node. This commit optimizes space usage by modifying xfs_bmap_add_attrfork_btree() to use 'struct xfs_bmdr_block' to check if the bmap btree root node fits inside the data fork of the inode. Reviewed-by: Christoph Hellwig Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit fcb62c28031eeeb626392e6a338a90dedbdecf1c Author: Anthony Iliopoulos Date: Wed Mar 31 13:56:47 2021 -0700 xfs: deprecate BMV_IF_NO_DMAPI_READ flag Use of the flag has had no effect since kernel commit 288699fecaff ("xfs: drop dmapi hooks"), which removed all dmapi related code, so deprecate it. Signed-off-by: Anthony Iliopoulos Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4422501da6b3265c52af2740ba9925f15f08cc7d Author: Christoph Hellwig Date: Mon Mar 29 11:11:46 2021 -0700 xfs: merge _xfs_dic2xflags into xfs_ip2xflags Merge _xfs_dic2xflags into its only caller. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e98d5e882b3ccb0f7f38d4e893fe60c1dd7934db Author: Christoph Hellwig Date: Mon Mar 29 11:11:45 2021 -0700 xfs: move the di_crtime field to struct xfs_inode Move the crtime field from struct xfs_icdinode into stuct xfs_inode and remove the now entirely unused struct xfs_icdinode. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 3e09ab8fdc4d4c9d0afee7a63a3b39e5ade3c863 Author: Christoph Hellwig Date: Mon Mar 29 11:11:45 2021 -0700 xfs: move the di_flags2 field to struct xfs_inode In preparation of removing the historic icinode struct, move the flags2 field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit db07349da2f564742c0f23528691991e641e315e Author: Christoph Hellwig Date: Mon Mar 29 11:11:44 2021 -0700 xfs: move the di_flags field to struct xfs_inode In preparation of removing the historic icinode struct, move the flags field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7821ea302dca72469c558e382d6e4ae09232b7a7 Author: Christoph Hellwig Date: Mon Mar 29 11:11:44 2021 -0700 xfs: move the di_forkoff field to struct xfs_inode In preparation of removing the historic icinode struct, move the forkoff field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ee7b83fd365e32beaa405d60b8c42f42ec5f42c2 Author: Christoph Hellwig Date: Mon Mar 29 11:11:43 2021 -0700 xfs: use a union for i_cowextsize and i_flushiter The i_cowextsize field is only used for v3 inodes, and the i_flushiter field is only used for v1/v2 inodes. Use a union to pack the inode a littler better after adding a few missing guards around their usage. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b231b1221b39bdf7ec4e45b05656bcba7d6a2153 Author: Christoph Hellwig Date: Mon Mar 29 11:11:43 2021 -0700 xfs: use XFS_B_TO_FSB in xfs_ioctl_setattr Clean up xfs_ioctl_setattr a bit by using XFS_B_TO_FSB. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4800887b457460a0a1edbf7d657be47d4d8758cd Author: Christoph Hellwig Date: Mon Mar 29 11:11:42 2021 -0700 xfs: cleanup xfs_fill_fsxattr Add a local xfs_mount variable, and use the XFS_FSB_TO_B helper. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 965e0a1ad273ba61a8040220ef8ec09c9d065875 Author: Christoph Hellwig Date: Mon Mar 29 11:11:42 2021 -0700 xfs: move the di_flushiter field to struct xfs_inode In preparation of removing the historic icinode struct, move the flushiter field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit b33ce57d3e61020328582ce6d7dbae1d694ac496 Author: Christoph Hellwig Date: Mon Mar 29 11:11:42 2021 -0700 xfs: move the di_cowextsize field to struct xfs_inode In preparation of removing the historic icinode struct, move the cowextsize field into the containing xfs_inode structure. Also switch to use the xfs_extlen_t instead of a uint32_t. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 031474c28a3a9a2772a715d1ec9770f9068ea5a4 Author: Christoph Hellwig Date: Mon Mar 29 11:11:41 2021 -0700 xfs: move the di_extsize field to struct xfs_inode In preparation of removing the historic icinode struct, move the extsize field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 6e73a545f91e128d8dd7da1769dca200225f5d82 Author: Christoph Hellwig Date: Mon Mar 29 11:11:40 2021 -0700 xfs: move the di_nblocks field to struct xfs_inode In preparation of removing the historic icinode struct, move the nblocks field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 13d2c10b05d8e67cb9b4c2d1d4a09a906148a72e Author: Christoph Hellwig Date: Mon Mar 29 11:11:40 2021 -0700 xfs: move the di_size field to struct xfs_inode In preparation of removing the historic icinode struct, move the on-disk size field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit ceaf603c7024d3c021803a3e90e893feda8d76e2 Author: Christoph Hellwig Date: Mon Mar 29 11:11:39 2021 -0700 xfs: move the di_projid field to struct xfs_inode In preparation of removing the historic icinode struct, move the projid field into the containing xfs_inode structure. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 7e2a8af528396d275962b33af9e5350da10c01f3 Author: Christoph Hellwig Date: Mon Mar 29 11:11:39 2021 -0700 xfs: don't clear the "dinode core" in xfs_inode_alloc The xfs_icdinode structure just contains a random mix of inode field, which are all read from the on-disk inode and mostly not looked at before reading the inode or initializing a new inode cluster. The only exceptions are the forkoff and blocks field, which are used in sanity checks for freshly allocated inodes. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 9b3beb028ff5bed99473021d1a7de8747665ac32 Author: Christoph Hellwig Date: Mon Mar 29 11:11:38 2021 -0700 xfs: remove the di_dmevmask and di_dmstate fields from struct xfs_icdinode The legacy DMAPI fields were never set by upstream Linux XFS, and have no way to be read using the kernel APIs. So instead of bloating the in-core inode for them just copy them from the on-disk inode into the log when logging the inode. The only caveat is that we need to make sure to zero the fields for newly read or deleted inodes, which is solved using a new flag in the inode. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 55f773380e922d3b975a7acb24331c76611cce30 Author: Christoph Hellwig Date: Mon Mar 29 11:11:38 2021 -0700 xfs: remove the unused xfs_icdinode_has_bigtime helper Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 582a73440bf5cafbb469025ce60e11cb401416e1 Author: Christoph Hellwig Date: Mon Mar 29 11:11:37 2021 -0700 xfs: handle crtime more carefully in xfs_bulkstat_one_int The crtime only exists for v5 inodes, so only copy it for those. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 4cb6f2e8c2c78c28941c56f49f2d9de44705b211 Author: Christoph Hellwig Date: Mon Mar 29 11:11:37 2021 -0700 xfs: consistently initialize di_flags2 Make sure di_flags2 is always initialized. We currently get this implicitly by clearing the dinode core on allocating the in-core inode, but that is about to go away. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit af9dcddef662e1437a63c2decb6e1e2efb7d81ea Author: Christoph Hellwig Date: Mon Mar 29 11:11:37 2021 -0700 xfs: split xfs_imap_to_bp Split looking up the dinode from xfs_imap_to_bp, which can be significantly simplified as a result. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e773f88029b179ea03855c22d5052e2e90362a81 Author: Chandan Babu R Date: Fri Mar 26 10:52:56 2021 -0700 xfs: scrub: Remove incorrect check executed on block format directories A directory with one directory block which in turns consists of two or more fs blocks is incorrectly flagged as corrupt by scrub since it assumes that "Block" format directories have a data fork single extent spanning the file offset range of [0, Dir block size - 1]. This commit fixes the bug by removing the incorrect check. Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 6e8bd39d7227747f13c891bc5a5fea00373d4bb9 Author: Chandan Babu R Date: Thu Mar 25 11:55:10 2021 -0700 xfs: Initialize xfs_alloc_arg->total correctly when allocating minlen extents xfs/538 can cause the following call trace to be printed when executing on a multi-block directory configuration, WARNING: CPU: 1 PID: 2578 at fs/xfs/libxfs/xfs_bmap.c:717 xfs_bmap_extents_to_btree+0x520/0x5d0 Call Trace: ? xfs_buf_rele+0x4f/0x450 xfs_bmap_add_extent_hole_real+0x747/0x960 xfs_bmapi_allocate+0x39a/0x440 xfs_bmapi_write+0x507/0x9e0 xfs_da_grow_inode_int+0x1cd/0x330 ? up+0x12/0x60 xfs_dir2_grow_inode+0x62/0x110 ? xfs_trans_log_inode+0x234/0x2d0 xfs_dir2_sf_to_block+0x103/0x940 ? xfs_dir2_sf_check+0x8c/0x210 ? xfs_da_compname+0x19/0x30 ? xfs_dir2_sf_lookup+0xd0/0x3d0 xfs_dir2_sf_addname+0x10d/0x910 xfs_dir_createname+0x1ad/0x210 xfs_create+0x404/0x620 xfs_generic_create+0x24c/0x320 path_openat+0xda6/0x1030 do_filp_open+0x88/0x130 ? kmem_cache_alloc+0x50/0x210 ? __cond_resched+0x16/0x40 ? kmem_cache_alloc+0x50/0x210 do_sys_openat2+0x97/0x150 __x64_sys_creat+0x49/0x70 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae This occurs because xfs_bmap_exact_minlen_extent_alloc() initializes xfs_alloc_arg->total to xfs_bmalloca->minlen. In the context of xfs_bmap_exact_minlen_extent_alloc(), xfs_bmalloca->minlen has a value of 1 and hence the space allocator could choose an AG which has less than xfs_bmalloca->total number of free blocks available. As the transaction proceeds, one of the future space allocation requests could fail due to non-availability of free blocks in the AG that was originally chosen. This commit fixes the bug by assigning xfs_alloc_arg->total to the value of xfs_bmalloca->total. Fixes: 301519674699 ("xfs: Introduce error injection to allocate only minlen size extents for files") Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 5147ef30f2cd128c9eedf7a697e8cb2ce2767989 Author: Chandan Babu R Date: Thu Mar 25 11:48:18 2021 -0700 xfs: Fix dax inode extent calculation when direct write is performed on an unwritten extent With dax enabled filesystems, a direct write operation into an existing unwritten extent results in xfs_iomap_write_direct() zero-ing and converting the extent into a normal extent before the actual data is copied from the userspace buffer. The inode extent count can increase by 2 if the extent range being written to maps to the middle of the existing unwritten extent range. Hence this commit uses XFS_IEXT_WRITE_UNWRITTEN_CNT as the extent count delta when such a write operation is being performed. Fixes: 727e1acd297c ("xfs: Check for extent overflow when trivally adding a new extent") Reported-by: Darrick J. Wong Signed-off-by: Chandan Babu R Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 872fff333fb1a100a54dfb7fd20fb418bb7e1ba5 Author: wengjianfeng Date: Wed Apr 7 11:16:38 2021 +0800 nfc/fdp: remove unnecessary assignment and label In function fdp_nci_patch_otp and fdp_nci_patch_ram,many goto out statements are used, and out label just return variable r. in some places,just jump to the out label, and in other places, assign a value to the variable r,then jump to the out label. It is unnecessary, we just use return sentences to replace goto sentences and delete out label. Signed-off-by: wengjianfeng Signed-off-by: David S. Miller commit d567fd6e82faa61756810b9b0dfd9d0da11e960e Author: Vadim Pasternak Date: Tue Apr 6 15:27:33 2021 +0300 mlxsw: core: Remove critical trip points from thermal zones Disable software thermal protection by removing critical trip points from all thermal zones. The software thermal protection is redundant given there are two layers of protection below it in firmware and hardware. The first layer is performed by firmware, the second, in case firmware was not able to perform protection, by hardware. The temperature threshold set for hardware protection is always higher than for firmware. Signed-off-by: Vadim Pasternak Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 017d6250ad719d3ddab9070446db1e9fd4ba4a65 Author: Voon Weifeng Date: Tue Apr 6 09:32:50 2021 +0800 stmmac: intel: Enable SERDES PHY rx clk for PSE EHL PSE SGMII mode requires to ungate the SERDES PHY rx clk for power up sequence and vice versa. Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit 56f15e2cb1f77fbcf9df38de7e5dcb4b37070196 Author: Jakub Kicinski Date: Tue Apr 6 17:23:59 2021 -0700 ethtool: document PHY tunable callbacks Add missing kdoc for phy tunable callbacks. Signed-off-by: Jakub Kicinski Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 956c7831fe9db52dba7a59a2ccb82a83c5cae9c4 Merge: 0b35e0deb5bee 07f8252fe0e3c Author: David S. Miller Date: Wed Apr 7 14:09:40 2021 -0700 Merge branch 'mptcp-next' Mat Martineau says: ==================== mptcp: Cleanup, a new test case, and header trimming Some more patches to include from the MPTCP tree: Patches 1-6 refactor an address-related data structure and reduce some duplicate code that handles IPv4 and IPv6 addresses. Patch 7 adds a test case for the MPTCP netlink interface, passing a specific ifindex to the kernel. Patch 8 drops extra header options from IPv4 address echo packets, improving consistency and testability between IPv4 and IPv6. ==================== Signed-off-by: David S. Miller commit 07f8252fe0e3c2b6320eeff18bdc5b7fb8845cb3 Author: Davide Caratti Date: Tue Apr 6 17:16:04 2021 -0700 mptcp: drop all sub-options except ADD_ADDR when the echo bit is set Current Linux carries echo-ed ADD_ADDR over pure TCP ACKs, so there is no need to add a DSS element that would fit only ADD_ADDR with IPv4 address. Drop the DSS from echo-ed ADD_ADDR, regardless of the IP version. Signed-off-by: Davide Caratti Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit c3eaa5f667cb60ea23c1bbc59e83c4f71de18e48 Author: Geliang Tang Date: Tue Apr 6 17:16:03 2021 -0700 selftests: mptcp: add the net device name testcase This patch added a new testcase for setting the net device name. In it, pass the net device name to pm_nl_ctl to set the ifindex field of struct mptcp_pm_addr_entry. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 761c124ed9698581e88d7babb9001401724435dd Author: Geliang Tang Date: Tue Apr 6 17:16:02 2021 -0700 mptcp: unify add_addr(6)_generate_hmac The length of the IPv4 address is 4 octets and IPv6 is 16. That's the only difference between add_addr_generate_hmac and add_addr6_generate_hmac. This patch dropped the duplicate code and unify them into one. Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 1b1a6ef597c7f662da847499d02ad519c1a8b1b3 Author: Geliang Tang Date: Tue Apr 6 17:16:01 2021 -0700 mptcp: drop MPTCP_ADDR_IPVERSION_4/6 Since the type of the address family in struct mptcp_options_received became sa_family_t, we should set AF_INET/AF_INET6 to it, instead of using MPTCP_ADDR_IPVERSION_4/6. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit f7dafee18538a3933f2cb9d4dcf8b98ff1276ffb Author: Geliang Tang Date: Tue Apr 6 17:16:00 2021 -0700 mptcp: use mptcp_addr_info in mptcp_options_received This patch added a new struct mptcp_addr_info member addr in struct mptcp_options_received, and dropped the original family, addr_id, addr, addr6 and port fields in it. Then we can pass the parameter mp_opt.addr directly to mptcp_pm_add_addr_received and mptcp_pm_add_addr_echoed. Since the port number became big-endian now, use htons to convert the incoming port number to it. Also use ntohs to convert it when passing it to add_addr_generate_hmac or printing it out. Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit fef6b7ecfbd465b7e27530e797c00b7384f78e44 Author: Geliang Tang Date: Tue Apr 6 17:15:59 2021 -0700 mptcp: drop OPTION_MPTCP_ADD_ADDR6 Since the family field was added in struct mptcp_out_options, no need to use OPTION_MPTCP_ADD_ADDR6 to identify the IPv6 address. Drop it. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 30f60bae80922582a16e80b070171a865fce58cd Author: Geliang Tang Date: Tue Apr 6 17:15:58 2021 -0700 mptcp: use mptcp_addr_info in mptcp_out_options This patch moved the mptcp_addr_info struct from protocol.h to mptcp.h, added a new struct mptcp_addr_info member addr in struct mptcp_out_options, and dropped the original addr, addr6, addr_id and port fields in it. Then we can use opts->addr to get the adding address from PM directly using mptcp_pm_add_addr_signal. Since the port number became big-endian now, use ntohs to convert it before sending it out with the ADD_ADDR suboption. Also convert it when passing it to add_addr_generate_hmac or printing it out. Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit daa83ab039546a906953f1821e493ddc980ed889 Author: Geliang Tang Date: Tue Apr 6 17:15:57 2021 -0700 mptcp: move flags and ifindex out of mptcp_addr_info This patch moved the flags and ifindex fields from struct mptcp_addr_info to struct mptcp_pm_addr_entry. Add the flags and ifindex values as two new parameters to __mptcp_subflow_connect. In mptcp_pm_create_subflow_or_signal_addr, pass the local address entry's flags and ifindex fields to __mptcp_subflow_connect. In mptcp_pm_nl_add_addr_received, just pass two zeros to it. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 540ad3f3da2542ec99235ac55e7cba8b11ce4b7b Author: Bart Van Assche Date: Tue Apr 6 13:08:20 2021 -0700 blk-zoned: Remove the definition of blk_zone_start() Commit e76239a3748c ("block: add a report_zones method") removed the last blk_zone_start() call. Hence also remove the definition of this function. Cc: Christoph Hellwig Cc: Damien Le Moal Signed-off-by: Bart Van Assche Reviewed-by: Himanshu Madhani Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406200820.15180-1-bvanassche@acm.org Signed-off-by: Jens Axboe commit c6dfc019c239c76c179ebbccbac27170ba1e3bb6 Author: Aryan Srivastava Date: Tue Dec 1 11:35:07 2020 +1300 ARM: dts: mvebu: Add device tree for ATL-x530 Board Add device tree file for x530 board. This has an Armada 385 SoC. Has NAND-flash for user storage and SPI for booting. Covers majority of x530 and GS980MX variants. Signed-off-by: Aryan Srivastava Reviewed-by: Chris Packham Reviewed-by: Andrew Lunn Signed-off-by: Gregory CLEMENT commit ccac12acc0c0d66b26ce7834e2dcf54ae159e63a Merge: 78d889705732b 14e13b1ce92ea Author: Mark Brown Date: Wed Apr 7 21:22:41 2021 +0100 Merge remote-tracking branch 'regmap/for-5.13' into regmap-next commit 78d889705732ba856feee4d7bfa74a12fe48c480 Merge: e49d033bddf5b e41a962f82e7a Author: Mark Brown Date: Wed Apr 7 21:22:39 2021 +0100 Merge remote-tracking branch 'regmap/for-5.12' into regmap-linus commit 8361c6da77b7d267707da9ff3b94458e018dd3da Merge: 9be701ec3493d fd4daab3b139a Author: Mark Brown Date: Wed Apr 7 21:07:29 2021 +0100 Merge series "Adds SPI support" from Jiri Prchal : Moved I2C stuff to separated file, shered thingk to header file. Added SPI in separeted file. Jiri Prchal (4): ASoC: codecs: tlv320aic3x: move model definitions ASoC: codecs: tlv320aic3x: rename probe function ASoC: codecs: tlv320aic3x: move I2C to separated file ASoC: codecs: tlv320aic3x: add SPI support sound/soc/codecs/Kconfig | 16 ++++- sound/soc/codecs/Makefile | 4 ++ sound/soc/codecs/tlv320aic3x-i2c.c | 70 +++++++++++++++++++ sound/soc/codecs/tlv320aic3x-spi.c | 76 ++++++++++++++++++++ sound/soc/codecs/tlv320aic3x.c | 108 ++++++++--------------------- sound/soc/codecs/tlv320aic3x.h | 12 ++++ 6 files changed, 204 insertions(+), 82 deletions(-) create mode 100644 sound/soc/codecs/tlv320aic3x-i2c.c create mode 100644 sound/soc/codecs/tlv320aic3x-spi.c -- 2.25.1 commit dda451f391eee5d68db3ca87fd8b2a42c8c2b507 Author: Yang Li Date: Wed Mar 31 16:00:24 2021 +0800 x86/cacheinfo: Remove unneeded dead-store initialization $ make CC=clang clang-analyzer (needs clang-tidy installed on the system too) on x86_64 defconfig triggers: arch/x86/kernel/cpu/cacheinfo.c:880:24: warning: Value stored to 'this_cpu_ci' \ during its initialization is never read [clang-analyzer-deadcode.DeadStores] struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu); ^ arch/x86/kernel/cpu/cacheinfo.c:880:24: note: Value stored to 'this_cpu_ci' \ during its initialization is never read So simply remove this unneeded dead-store initialization. As compilers will detect this unneeded assignment and optimize this anyway the resulting object code is identical before and after this change. No functional change. No change to object code. [ bp: Massage commit message. ] Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Borislav Petkov Reviewed-by: Nick Desaulniers Link: https://lkml.kernel.org/r/1617177624-24670-1-git-send-email-yang.lee@linux.alibaba.com commit e2b064fec8e49112f7dac779fcec12ded40728c2 Merge: 2ce5e1b010f4a 4d930c421e3b4 Author: Arnd Bergmann Date: Wed Apr 7 20:48:17 2021 +0200 Merge tag 'at91-dt-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/dt AT91 dt for 5.13: - two little fixes (typo, W=1) - a change in gpio button keycode for recent boards * tag 'at91-dt-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: dts: at91: sama5d2: add ETB and ETM unit name ARM: dts: at91: change the key code of the gpio key ARM: dts: at91: Fix a typo Link: https://lore.kernel.org/r/20210407114415.13180-1-nicolas.ferre@microchip.com Signed-off-by: Arnd Bergmann commit f3907773d60229afa8e6c0a3ee5085715192a9cb Author: Colin Ian King Date: Thu Mar 25 17:45:14 2021 +0000 mtd: cfi_cmdset_0002: remove redundant assignment to variable timeo The variable timeo 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. Signed-off-by: Colin Ian King Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210325174514.486272-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") commit 7e4404113686868858a34210c28ae122e967aa64 Author: Mauri Sandberg Date: Tue Mar 9 19:48:59 2021 +0200 mtd: cfi_cmdset_0002: Disable buffered writes for AMD chip 0x2201 Buffer writes do not work with AMD chip 0x2201. The chip in question is a AMD/Spansion/Cypress Semiconductor S29GL256N and datasheet [1] talks about writing buffers being possible. While waiting for a neater solution resort to writing word-sized chunks only. Without the patch kernel logs will be flooded with entries like below: jffs2_scan_eraseblock(): End of filesystem marker found at 0x0 jffs2_build_filesystem(): unlocking the mtd device... done. jffs2_build_filesystem(): erasing all blocks after the end marker... MTD do_write_buffer_wait(): software timeout, address:0x01ec000a. jffs2: Write clean marker to block at 0x01920000 failed: -5 MTD do_write_buffer_wait(): software timeout, address:0x01e2000a. jffs2: Write clean marker to block at 0x01880000 failed: -5 MTD do_write_buffer_wait(): software timeout, address:0x01e0000a. jffs2: Write clean marker to block at 0x01860000 failed: -5 MTD do_write_buffer_wait(): software timeout, address:0x01dc000a. jffs2: Write clean marker to block at 0x01820000 failed: -5 MTD do_write_buffer_wait(): software timeout, address:0x01da000a. jffs2: Write clean marker to block at 0x01800000 failed: -5 ... Tested on a Buffalo wzr-hp-g300nh running kernel 5.10.16. [1] https://www.cypress.com/file/219941/download or https://datasheetspdf.com/pdf-file/565708/SPANSION/S29GL256N/1 Signed-off-by: Mauri Sandberg Signed-off-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210309174859.362060-1-sandberg@mailfence.com commit dc8a4973fd6916c050898d803a8e1d7b8fc59f70 Author: Krishna Manikandan Date: Tue Apr 6 11:31:35 2021 +0530 drm/msm/disp/dpu1: add flags to indicate obsolete irqs Some irqs which are applicable for sdm845 target are no longer applicable for sc7180 and sc7280 targets. Add a flag to indicate the irqs which are obsolete for a particular target so that these irqs are skipped while checking for matching irq lookup index. Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1617688895-26275-4-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit 7e4526db30c28d1f89c5b168cd7c565fcb4108de Author: Krishna Manikandan Date: Tue Apr 6 11:31:34 2021 +0530 drm/msm/disp/dpu1: add vsync and underrun irqs for INTF_5 INTF_5 is used by EDP panel in SC7280 target. Add vsync and underrun irqs needed by INTF_5 to dpu irq map. Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1617688895-26275-3-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit a8eca8a1a524b96a49a8f7f172bfc9a8f4320e40 Author: Krishna Manikandan Date: Tue Apr 6 11:31:33 2021 +0530 drm/msm/disp/dpu1: increase the range of interrupts in dpu_irq_map Currently, each register in the dpu interrupt set is allowed to have a maximum of 32 interrupts. With the introduction of INTF_5_VSYNC and INTF_5_UNDERRUN irqs for EDP panel, the total number of interrupts under INTR_STATUS register in dpu_irq_map will exceed 32. Increase the range of each interrupt register to 64 to handle this. This patch has dependency on the below series: https://patchwork.kernel.org/project/linux-arm-msm/list/?series=461193 Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1617688895-26275-2-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit 7e6ee55320f09cef73163ac6a2ffaca2aa17334f Author: Krishna Manikandan Date: Tue Apr 6 10:39:52 2021 +0530 drm/msm/disp/dpu1: enable DATA_HCTL_EN for sc7280 target The reset value of INTF_CONFIG2 register is changed for SC7280 family. Changes are added to program this register correctly based on the target. DATA_HCTL_EN in INTF_CONFIG2 register allows data to be transferred at a different rate than video timing. When this is set, the number of data per line follows DISPLAY_DATA_HCTL register value. This change adds support to program these registers for sc7280 target. Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1617685792-14376-5-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit b3652e87c03c70d8e6e04a17afa475f6855169d1 Author: Krishna Manikandan Date: Tue Apr 6 10:39:51 2021 +0530 drm/msm/disp/dpu1: add support to program fetch active in ctl path A new register called CTL_FETCH_ACTIVE is introduced in SC7280 family which is used to inform the HW about the pipes which are active in the current ctl path. This change adds support to program this register based on the active pipes in the current composition. Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1617685792-14376-4-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit ed6154a136e40816301dc8228c46ea30f0f7bc76 Author: Krishna Manikandan Date: Tue Apr 6 10:39:50 2021 +0530 drm/msm/disp/dpu1: add intf offsets for SC7280 target Interface block offsets are different for SC7280 family when compared to existing targets. These offset values are used to access the interface irq registers. This change adds proper interface offsets for SC7280 target. Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1617685792-14376-3-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit 591e34a091d17df7afa3b455a7cfacf946a464d4 Author: Krishna Manikandan Date: Tue Apr 6 10:39:49 2021 +0530 drm/msm/disp/dpu1: add support for display for SC7280 target Add required display hw catalog changes for SC7280 target. Signed-off-by: Krishna Manikandan Link: https://lore.kernel.org/r/1617685792-14376-2-git-send-email-mkrishn@codeaurora.org Signed-off-by: Rob Clark commit 63f17ef834284d9a1fa72b548a86fee1ccd01a45 Author: Rob Clark Date: Mon Apr 5 10:45:31 2021 -0700 drm/msm: Support evicting GEM objects to swap Now that tracking is wired up for potentially evictable GEM objects, wire up shrinker and the remaining GEM bits for unpinning backing pages of inactive objects. Disabled by default for now, with an 'enable_eviction' module param to enable so that we can get some more testing on the range of generations (and iommu pairings) supported. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210405174532.1441497-9-robdclark@gmail.com Signed-off-by: Rob Clark commit 81d4d597d4faadb1d4eb6d464362f675b5775289 Author: Rob Clark Date: Mon Apr 5 10:45:30 2021 -0700 drm/msm: Small msm_gem_purge() fix Shoot down any mmap's *first* before put_pages(). Also add a WARN_ON that the object is locked (to make it clear that this doesn't race with msm_gem_fault()) and remove a redundant WARN_ON (since is_purgable() already covers that case). Fixes: 68209390f116 ("drm/msm: shrinker support") Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210405174532.1441497-8-robdclark@gmail.com Signed-off-by: Rob Clark commit 64fcbde772c72af81e96189d748a4bc8950b08d3 Author: Rob Clark Date: Mon Apr 5 10:45:29 2021 -0700 drm/msm: Track potentially evictable objects Objects that are potential for swapping out are (1) willneed (ie. if they are purgable/MADV_WONTNEED we can just free the pages without them having to land in swap), (2) not on an active list, (3) not dma-buf imported or exported, and (4) not vmap'd. This repurposes the purged list for objects that do not have backing pages (either because they have not been pinned for the first time yet, or in a later patch because they have been unpinned/evicted. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210405174532.1441497-7-robdclark@gmail.com Signed-off-by: Rob Clark commit f48f356330f7124671b28ddc93a28c492ef05b9f Author: Rob Clark Date: Mon Apr 5 10:45:28 2021 -0700 drm/msm: Add $debugfs/gem stats on resident objects Currently nearly everything, other than newly allocated objects which are not yet backed by pages, is pinned and resident in RAM. But it will be nice to have some stats on what is unpinned once that is supported. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210405174532.1441497-6-robdclark@gmail.com Signed-off-by: Rob Clark commit 20d0ae2f8c72e3603c50844c4f8487951ace456f Author: Rob Clark Date: Mon Apr 5 10:45:27 2021 -0700 drm/msm: Split iova purge and close Currently these always go together, either when we purge MADV_WONTNEED objects or when the object is freed. But for unpin, we want to be able to purge (unmap from iommu) the vma, while keeping the iova range allocated (so we can remap back to the same GPU virtual address when the object is re-pinned. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210405174532.1441497-5-robdclark@gmail.com Signed-off-by: Rob Clark commit b9a31d0deee4a1c2883b6c8dd4a8cfc549c7633d Author: Rob Clark Date: Mon Apr 5 10:45:26 2021 -0700 drm/msm: Clear msm_obj->sgt in put_pages() Currently this doesn't matter since we keep the pages pinned until the object is destroyed. But when we start unpinning pages to allow objects to be evicted to swap, it will. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210405174532.1441497-4-robdclark@gmail.com Signed-off-by: Rob Clark commit 6afb0750dba05cfce02eea9dcb4d76ce80a448cb Author: Rob Clark Date: Mon Apr 5 10:45:25 2021 -0700 drm/msm: Reorganize msm_gem_shrinker_scan() So we don't have to duplicate the boilerplate for eviction. This also lets us re-use the main scan loop for vmap shrinker. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210405174532.1441497-3-robdclark@gmail.com Signed-off-by: Rob Clark commit 90643a24a7bfbe99264f3339887d26c9c708bf9f Author: Rob Clark Date: Mon Apr 5 10:45:24 2021 -0700 drm/msm: ratelimit GEM related WARN_ON()s If you mess something up, you don't really need to see the same warn on splat 4000 times pumped out a slow debug UART port.. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210405174532.1441497-2-robdclark@gmail.com Signed-off-by: Rob Clark commit a670ff578f1fb855fedc7931fa5bbc06b567af22 Author: Dmitry Baryshkov Date: Thu Apr 1 05:05:33 2021 +0300 drm/msm/dpu: always use mdp device to scale bandwidth Currently DPU driver scales bandwidth and core clock for sc7180 only, while the rest of chips get static bandwidth votes. Make all chipsets scale bandwidth and clock per composition requirements like sc7180 does. Drop old voting path completely. Tested on RB3 (SDM845) and RB5 (SM8250). Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210401020533.3956787-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 4f2c98383fcceb45e04887a3d8a1058c9042f890 Author: Dmitry Baryshkov Date: Thu Apr 1 05:05:32 2021 +0300 drm/msm/dpu: fill missing details in hw catalog for sdm845 and sm8[12]50 Fill clk_inefficiency_factor, bw_inefficiency_factor and min_prefill_lines in hw catalog data for sdm845 and sm8[12]50. Efficiency factors are blindly copied from sc7180 data, while min_prefill_lines is based on downstream display driver. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210401020533.3956787-1-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 095eed898485312f86b7cb593da4f9cd5c43fdb0 Author: Dmitry Baryshkov Date: Thu Mar 18 13:54:35 2021 +0300 drm/msm/dpu: enable DPU_SSPP_QOS_8LVL for SM8250 SM8250 platform has a 8-Levels VIG QoS setting. This setting was missed due to bad interaction with b8dab65b5ac3 ("drm/msm/dpu: Move DPU_SSPP_QOS_8LVL bit to SDM845 and SC7180 masks"), which was applied in parallel. Fixes: d21fc5dfc3df ("drm/msm/dpu1: add support for qseed3lite used on sm8250") Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210318105435.2011222-1-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 36c5dde5fdf028daf005197a4dd08b196784bf9e Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:35 2021 +0300 drm/msm/dsi: stop passing src_pll_id to the phy_enable call Phy driver already knows the source PLL id basing on the set usecase and the current PLL id. Stop passing it to the phy_enable call. As a reminder, dsi manager will always use DSI 0 as a clock master in a slave mode, so PLL 0 is always a clocksource for DSI 0 and it is always a clocksource for DSI 1 too unless DSI 1 is used in the standalone mode. Signed-off-by: Dmitry Baryshkov Tested-by: Stephen Boyd # on sc7180 lazor Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210331105735.3690009-25-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 6e2ad9c3bfca3e43f0b66c85385f12bd254ef92d Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:34 2021 +0300 drm/msm/dsi: inline msm_dsi_phy_set_src_pll The src_truthtable config is not used for some of phys, which use other means of configuring the master/slave usecases. Inline this function with the goal of removing src_pll_id argument in the next commit. Signed-off-by: Dmitry Baryshkov Tested-by: Stephen Boyd # on sc7180 lazor Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210331105735.3690009-24-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 001d8dc33875593e85e54206f7dd91ecca1204a7 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:33 2021 +0300 drm/msm/dsi: remove temp data from global pll structure The 7nm, 10nm and 14nm drivers would store interim data used during VCO/PLL rate setting in the global dsi_pll_Nnm structure. Move this data structures to the onstack storage. While we are at it, drop unused/static 'config' data, unused config fields, etc. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-23-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 9f91f22aafcd63f05a9b6dcb4b7ff6e36a9c9eed Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:32 2021 +0300 drm/msm/dsi: remove duplicate fields from dsi_pll_Nnm instances Drop duplicate fields pdev and id from dsi_pll_Nnm instances. Reuse those fields from the provided msm_dsi_phy. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-22-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit b7cf8a54549fe976455c031e02b2f5b9de72c7f4 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:31 2021 +0300 drm/msm/dsi: move ioremaps to dsi_phy_driver_probe All PHY drivers would map dsi_pll area. Some PHY drivers would also map dsi_phy area again (a leftover from old PHY/PLL separation). Move all ioremaps to the common dsi_phy driver code and drop individual ioremapped areas from PHY drivers. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-21-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit e55b3fbbbbc89a0e3680de5d0982d5054fc48702 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:30 2021 +0300 drm/msm/dsi: drop PLL accessor functions Replace PLL accessor functions (pll_read/pll_write*) with the DSI PHY accessors, reducing duplication. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-20-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 007687c38a80cbfef866cd961a9f693a7262eaec Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:29 2021 +0300 drm/msm/dsi: drop msm_dsi_pll abstraction Drop the struct msm_dsi_pll abstraction, by including vco's clk_hw directly into struct msm_dsi_phy. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210331105735.3690009-19-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 2a831d9e38e2284cb5cba385a72d5ca46aa00cdb Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:28 2021 +0300 drm/msm/dsi: make save_state/restore_state callbacks accept msm_dsi_phy Make save_state/restore callbacks accept struct msm_dsi_phy rather than struct msm_dsi_pll. This moves them to struct msm_dsi_phy_ops, allowing us to drop struct msm_dsi_pll_ops. Signed-off-by: Dmitry Baryshkov Tested-by: Stephen Boyd # on sc7180 lazor Reviewed-by: Abhinav Kumar Link: https://lore.kernel.org/r/20210331105735.3690009-18-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 62d5325d457a719895d0fe76867b9d40cb1b2305 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:27 2021 +0300 drm/msi/dsi: inline msm_dsi_pll_helper_clk_prepare/unprepare 10nm and 7nm already do not use these helpers, as they handle setting slave DSI clocks after enabling VCO. Modify the rest of PHY drivers to remove unnecessary indirection and drop enable_seq/disable_seq PLL callbacks. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-17-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 89da81530d79d710a9dc2b94fc4bcaee793d8332 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:26 2021 +0300 drm/msm/dsi: simplify vco_delay handling in dsi_phy_28nm driver Instead of setting the variable and then using it just in the one place, determine vco_delay directly at the PLL configuration time. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-16-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 015cf329831d847793012b0a89e04de69e2b909e Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:25 2021 +0300 drm/msm/dsi: drop vco_delay setting from 7nm, 10nm, 14nm drivers These drivers do not use vco_delay variable, so drop it from all of them. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-15-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit aaadcbb4d70239b24b469ede7637c332820c12f0 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:24 2021 +0300 drm/msm/dsi: make save/restore_state phy-level functions Morph msm_dsi_pll_save/restore_state() into msm_dsi_phy_save/restore_state(), thus removing last bits of knowledge about msm_dsi_pll from dsi_manager. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-14-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit a7c13d4f597d31c67169c6774b83f5a478c18b19 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:23 2021 +0300 drm/msm/dsi: use devm_of_clk_add_hw_provider Use devm_of_clk_add_hw_provider() to register provided clocks. This allows dropping the remove function alltogether. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-13-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 613cbd1da3c9801c0ffb421d15d76b67afb3ca08 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:22 2021 +0300 drm/msm/dsi: use devm_clk_*register to registe DSI PHY clocks Use devres-enabled version of clock registration functions. This lets us remove dsi_pll destroy callbacks completely. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-12-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 5d13459650b3668edcd6d180787aac38d001c4ed Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:21 2021 +0300 drm/msm/dsi: push provided clocks handling into a generic code All MSM DSI PHYs provide two clocks: byte and pixel ones. Register/unregister provided clocks from the generic place, removing boilerplate code from all MSM DSI PHY drivers. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-11-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 95b814e4f6391ca6c04968e4f634eaceab4e459a Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:20 2021 +0300 drm/msm/dsi: remove msm_dsi_pll_set_usecase msm_dsi_pll_set_usecase() function is not used outside of individual DSI PHY drivers, so drop it in favour of calling the the respective set_usecase functions directly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-10-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 076437c9e360737c85d443bbf81d5ea02b3d182d Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:19 2021 +0300 drm/msm/dsi: move min/max PLL rate to phy config Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-9-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 80d2229bf0e7b169a1ab3adcaed9c4ce336f50b2 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:18 2021 +0300 drm/msm/dsi: drop global msm_dsi_phy_type enumaration With the current upstream driver the msm_dsi_phy_type enum does not make much sense: all DSI PHYs are probed using the dt bindings, the phy type is not passed between drivers. Use quirks in phy individual PHY drivers to differentiate minor harware differences and drop the enum. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-8-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 93cf7d6289f993ff1c1a6e6c4621e33b5f31ccec Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:17 2021 +0300 drm/msm/dsi: move all PLL callbacks into PHY config struct Move all PLL-related callbacks into struct msm_dsi_phy_cfg. This limits the amount of data in the struct msm_dsi_pll. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-7-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 6a58cfecaf6cf3e3292bff4338e5a9476b65eae1 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:16 2021 +0300 drm/msm/dsi: drop multiple pll enable_seq support The only PLL using multiple enable sequences is the 28nm PLL, which just does the single step in the loop. Push that support back into the PLL code. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-6-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit d6d1439ec43808447d25ea5c17012ca713ef7c4e Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:15 2021 +0300 drm/msm/dsi: fuse dsi_pll_* code into dsi_phy_* code Each phy version is tightly coupled with the corresponding PLL code, there is no need to keep them separate. Fuse source files together in order to simplify DSI code. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-5-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 266a4e58a1d20d511b1881baccb9f1ef9506a080 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:14 2021 +0300 drm/msm/dsi: replace PHY's init callback with configurable data DSI PHY init callback would either map dsi_phy_regulator or dsi_phy_lane depending on the PHY type. Replace those callbacks with configuration options governing mapping those regions. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Tested-by: Stephen Boyd # on sc7180 lazor Link: https://lore.kernel.org/r/20210331105735.3690009-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit f4b43ac0b0af1d115effd08133046a694ac33dc2 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:13 2021 +0300 clk: divider: add devm_clk_hw_register_divider Add devm_clk_hw_register_divider() - devres version of clk_hw_register_divider(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210331105735.3690009-3-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit b3084079c1779645222d5ea4e9da88d38026cae8 Author: Dmitry Baryshkov Date: Wed Mar 31 13:57:12 2021 +0300 clk: mux: provide devm_clk_hw_register_mux() Add devm_clk_hw_register_mux() - devres-managed version of clk_hw_register_mux(). Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210331105735.3690009-2-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit cb3fd74a03e8dcd6940f7a5739e531db3e1bcd7b Author: Abhinav Kumar Date: Fri Mar 5 11:17:19 2021 -0800 drm/msm/dp: delete unnecessary debugfs error handling Currently the error checking logic in the dp_debug module could pass zero to PTR_ERR and it causes the below kbot warnings: drivers/gpu/drm/msm/dp/dp_debug.c:378 dp_debug_init() warn: passing zero to 'PTR_ERR' drivers/gpu/drm/msm/dp/dp_debug.c:387 dp_debug_init() warn: passing zero to 'PTR_ERR' drivers/gpu/drm/msm/dp/dp_debug.c:396 dp_debug_init() warn: passing zero to 'PTR_ERR' drivers/gpu/drm/msm/dp/dp_debug.c:405 dp_debug_init() warn: passing zero to 'PTR_ERR' Debugfs functions are not supposed to be checked in the normal case so delete this code. Also it silences the above Smatch warnings that we're checking for NULL when these functions only return error pointers. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Abhinav Kumar Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1614971839-2686-3-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit 7d649cfe0314aad2ba18042885ab9de2f13ad809 Author: Abhinav Kumar Date: Fri Mar 5 11:17:18 2021 -0800 drm/msm/dp: Fix incorrect NULL check kbot warnings in DP driver Fix an incorrect NULL check reported by kbot in the MSM DP driver smatch warnings: drivers/gpu/drm/msm/dp/dp_hpd.c:37 dp_hpd_connect() error: we previously assumed 'hpd_priv->dp_cb' could be null (see line 37) Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Abhinav Kumar Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1614971839-2686-2-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit 86bf254549badbf754ace6b09f044fe18a959f28 Author: Abhinav Kumar Date: Fri Mar 5 11:17:17 2021 -0800 drm/msm/dp: Fix indentation kbot warnings in DP driver Fix a couple of indentation warnings reported by kbot across MSM DP driver: New smatch warnings: drivers/gpu/drm/msm/dp/dp_debug.c:229 dp_test_data_show() warn: inconsistent indenting drivers/gpu/drm/msm/dp/dp_power.c:203 dp_power_clk_enable() warn: inconsistent indenting Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Abhinav Kumar Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1614971839-2686-1-git-send-email-abhinavk@codeaurora.org Signed-off-by: Rob Clark commit 0340e8123faf058a8a9a3a8dbaa04b9c0018b7fa Author: AngeloGioacchino Del Regno Date: Sun Feb 28 13:43:26 2021 +0100 drm/msm/dsi: Uncomment core_mmss clock for MSM8996 The MSM8996 core_mmss clock was commented out due to some strange issues that others were experiencing. At least SONY Tone family is working perfectly fine with this clock declared and gets it up and running without any error. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210228124328.136397-1-konrad.dybcio@somainline.org Signed-off-by: Rob Clark commit 0938def7817ae66481026266c670365c27ee5096 Author: Bhaskar Chowdhury Date: Fri Feb 5 14:17:58 2021 +0530 drivers: gpu: drm: msn: disp: dpu1: Fixed couple of spellings in the file dpu_hw_top.h s/confguration/configuration/ s/Regsiters/Registers/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210205084758.354509-1-unixbhaskar@gmail.com Signed-off-by: Rob Clark commit 8c64a945a6148e84b63f5015b0eeedbc513b7eb0 Author: Bernard Zhao Date: Tue Feb 2 04:05:49 2021 -0800 gpu/drm/msm: remove redundant pr_err() when devm_kzalloc failed Line 1826 pr_err is redundant because memory alloc already prints an error when failed. Signed-off-by: Bernard Zhao Link: https://lore.kernel.org/r/20210202120552.14744-1-bernard@vivo.com Signed-off-by: Rob Clark commit 73743e72fed4aaec98fbe7dce749e1560b1bf758 Author: Kalyan Thota Date: Thu Feb 18 04:35:46 2021 -0800 drm/msm/disp/dpu1: turn off vblank irqs aggressively in dpu driver Set the flag vblank_disable_immediate = true to turn off vblank irqs immediately as soon as drm_vblank_put is requested so that there are no irqs triggered during idle state. This will reduce cpu wakeups and help in power saving. To enable vblank_disable_immediate flag the underlying KMS driver needs to support high precision vblank timestamping and also a reliable way of providing vblank counter which is incrementing at the leading edge of vblank. This patch also brings in changes to support vblank_disable_immediate requirement in dpu driver. Changes in v1: - Specify reason to add vblank timestamp support. (Rob). - Add changes to provide vblank counter from dpu driver. Changes in v2: - Fix warn stack reported by Rob Clark with v2 patch. Changes in v3: - Move back to HW frame counter (Rob). Changes in v4: - Frame count mismatch was causing a DRM WARN stack spew. DPU HW will increment the frame count at the end of the sync, where as vblank will be triggered at the fetch_start counter which is calculated as v_total - vfp. This is to start fetching early for panels with low vbp w.r.t hw latency lines. Add logic to detect the line count if it falls between vactive and v_total then return incremented frame count value. Signed-off-by: Kalyan Thota Link: https://lore.kernel.org/r/1613651746-12783-1-git-send-email-kalyan_t@codeaurora.org Signed-off-by: Rob Clark commit 3ab1c5cc3939b3322ebd27a44b8ee6a16eccc9f5 Author: Rob Clark Date: Wed Mar 24 18:23:53 2021 -0700 drm/msm: Add param for userspace to query suspend count Performance counts, and ALWAYS_ON counters used for capturing GPU timestamps, lose their state across suspend/resume cycles. Userspace tooling for performance monitoring needs to be aware of this. For example, after a suspend userspace needs to recalibrate it's offset between CPU and GPU time. Signed-off-by: Rob Clark Acked-by: Jordan Crouse Link: https://lore.kernel.org/r/20210325012358.1759770-3-robdclark@gmail.com Signed-off-by: Rob Clark commit f5b1a878435061f254bd1cd8c5cba306838d9236 Author: Akhil P Oommen Date: Mon Apr 5 19:17:13 2021 +0530 drm/msm: Select CONFIG_NVMEM The speedbin support requires nvmem driver api. So lets explicitly enable CONFIG_NVMEM to have this support. Signed-off-by: Akhil P Oommen Link: https://lore.kernel.org/r/1617630433-36506-2-git-send-email-akhilpo@codeaurora.org Signed-off-by: Rob Clark commit 2fc8a92e0a22c483e749232d4f13c77a92139aa7 Author: Akhil P Oommen Date: Mon Apr 5 19:17:12 2021 +0530 drm/msm/a6xx: Fix perfcounter oob timeout We were not programing the correct bit while clearing the perfcounter oob. So, clear it correctly using the new 'clear' bit. This fixes the below error: [drm:a6xx_gmu_set_oob] *ERROR* Timeout waiting for GMU OOB set PERFCOUNTER: 0x80000000 Signed-off-by: Akhil P Oommen Link: https://lore.kernel.org/r/1617630433-36506-1-git-send-email-akhilpo@codeaurora.org Signed-off-by: Rob Clark commit 0ba17e7a5548af3a943679c8b6c4582f9fc4a537 Author: Jonathan Marek Date: Mon Mar 29 15:00:50 2021 +0300 drm/msm: add compatibles for sm8150/sm8250 display The driver already has support for sm8150/sm8250, but the compatibles were never added. Also inverse the non-mdp4 condition in add_display_components() to avoid having to check every new compatible in the condition. Signed-off-by: Jonathan Marek Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210329120051.3401567-4-dmitry.baryshkov@linaro.org Signed-off-by: Rob Clark commit 8424084fbac04e7f45041f0a39b262aad24091d4 Author: Bjorn Andersson Date: Tue Mar 16 19:56:34 2021 -0700 drm/msm: Remove need for reiterating the compatibles After spending a non-negligible time trying to figure out why dpu_kms_init() would dereference a NULL dpu_kms->pdev, it turns out that in addition to adding the new compatible to the msm_drv of_match_table one also need to teach add_display_components() to register the child nodes - which includes the DPU platform_device. Replace the open coded test for compatibles with a check against the match data of the mdss device to save others this trouble in the future. Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210317025634.3987908-1-bjorn.andersson@linaro.org Signed-off-by: Rob Clark commit 0054eeb72ab63fd4007303c57748c79fcd285e7c Author: Rob Clark Date: Tue Apr 6 08:18:16 2021 -0700 drm/msm: Fix spelling "purgable" -> "purgeable" The previous patch fixes the user visible spelling. This one fixes the code. Oops. Signed-off-by: Rob Clark Link: https://lore.kernel.org/r/20210406151816.1515329-1-robdclark@gmail.com Signed-off-by: Rob Clark commit f1902c6b88292da76d85b8b1c51260f25aa41702 Author: Colin Ian King Date: Tue Apr 6 14:39:39 2021 +0100 drm/msm: Fix spelling mistake "Purgable" -> "Purgeable" There is a spelling mistake in debugfs gem stats. Fix it. Also re-align output to cater for the extra 1 character. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210406133939.425987-1-colin.king@canonical.com Signed-off-by: Rob Clark commit 25ed38b3ed26918b70c1392de7481809b5f5ba2d Author: Rob Clark Date: Fri Apr 2 14:12:26 2021 -0700 drm/msm: Drop mm_lock in scan loop lock_stat + mmm_donut[1] say that this reduces contention on mm_lock significantly (~350x lower waittime-max, and ~100x lower waittime-avg) [1] https://chromium.googlesource.com/chromiumos/platform/microbenchmarks/+/refs/heads/main/mmm_donut.py Signed-off-by: Rob Clark Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210402211226.875726-1-robdclark@gmail.com Signed-off-by: Rob Clark commit 528107c8e664a933b397a825f6e76c6d7dfa383b Author: Rob Clark Date: Wed Mar 31 18:27:21 2021 -0700 drm/msm: Improved debugfs gem stats The last patch lost the breakdown of active vs inactive GEM objects in $debugfs/gem. But we can add some better stats to summarize not just active vs inactive, but also purgable/purged to make up for that. Signed-off-by: Rob Clark Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210401012722.527712-5-robdclark@gmail.com Signed-off-by: Rob Clark commit 6ed0897cd800c38b92a33d335d9086c7b092eb15 Author: Rob Clark Date: Wed Mar 31 18:27:20 2021 -0700 drm/msm: Fix debugfs deadlock In normal cases the gem obj lock is acquired first before mm_lock. The exception is iterating the various object lists. In the shrinker path, deadlock is avoided by using msm_gem_trylock() and skipping over objects that cannot be locked. But for debugfs the straightforward thing is to split things out into a separate list of all objects protected by it's own lock. Fixes: d984457b31c4 ("drm/msm: Add priv->mm_lock to protect active/inactive lists") Signed-off-by: Rob Clark Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210401012722.527712-4-robdclark@gmail.com Signed-off-by: Rob Clark commit cc8a4d5a1bd84a37ff1827e2902c459e9b2d4e25 Author: Rob Clark Date: Wed Mar 31 18:27:19 2021 -0700 drm/msm: Avoid mutex in shrinker_count() When the system is under heavy memory pressure, we can end up with lots of concurrent calls into the shrinker. Keeping a running tab on what we can shrink avoids grabbing a lock in shrinker->count(), and avoids shrinker->scan() getting called when not profitable. Also, we can keep purged objects in their own list to avoid re-traversing them to help cut down time in the critical section further. Signed-off-by: Rob Clark Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210401012722.527712-3-robdclark@gmail.com Signed-off-by: Rob Clark commit bc90dc33c46c8b98843f33f40446b7fdb0ba8f1c Author: Rob Clark Date: Wed Mar 31 18:27:18 2021 -0700 drm/msm: Remove unused freed llist node Unused since commit c951a9b284b9 ("drm/msm: Remove msm_gem_free_work") Signed-off-by: Rob Clark Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210401012722.527712-2-robdclark@gmail.com Signed-off-by: Rob Clark commit 9ecccaf9771d3f3bb68ef69d34965b1aad874bd6 Merge: 1e28eed17697b 12aca1ce9ee33 Author: Rob Clark Date: Wed Apr 7 11:04:47 2021 -0700 Merge tag 'drm-msm-fixes-2021-04-02' into msm-next Pull in fixes from previous cycle commit 56ddc4cd4c8f9d65c0ac5544df4645376b327cbc Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:49 2021 +0200 docs: dt: update writing-schema.rst references Changeset b83db5b84900 ("docs: dt: Group DT docs into relevant sub-sections") renamed: Documentation/devicetree/writing-schema.rst to: Documentation/devicetree/bindings/writing-schema.rst. Update the cross-references accordingly. Fixes: b83db5b84900 ("docs: dt: Group DT docs into relevant sub-sections") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/7cfddf303f1508d26f90d87546d3812faebfc5ba.1617279356.git.mchehab+huawei@kernel.org Signed-off-by: Rob Herring commit 7a47f86bba748b31cd16e3acbf9fb8b1f4a49c6d Author: Mark Pearson Date: Tue Apr 6 19:32:03 2021 -0400 Add support for DYTC MMC_GET BIOS API. The BIOS team have added a new API that allows us to retrieve the current performance profile without having to disable/enable CQL mode. Adding the changes to use this API. Tested on P15 and X1C8 Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20210406233203.232860-1-markpearson@lenovo.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 8145476fc782541996282387d28ab99ffe7ff0ef Author: Maximilian Luz Date: Tue Apr 6 01:12:22 2021 +0200 platform/surface: aggregator_registry: Give devices time to set up when connecting Sometimes, the "base connected" event that we rely on to (re-)attach the device connected to the base is sent a bit too early. When this happens, some devices may not be completely ready yet. Specifically, the battery has been observed to report zero-values for things like full charge capacity, which, however, is only loaded once when the driver for that device probes. This can thus result in battery readings being unavailable. As we cannot easily and reliably discern between devices that are not ready yet and devices that are not connected (i.e. will never be ready), delay adding these devices. This should give them enough time to set up. The delay is set to 2.5 seconds, which should give us a good safety margin based on testing and still be fairly responsive for users. To achieve that delay switch to updating via a delayed work struct, which means that we can also get rid of some locking. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210405231222.358113-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 1ea602e4171b8c5967ab35f6e9113007abb14429 Author: Mario Limonciello Date: Thu Apr 1 11:22:06 2021 -0500 platform/x86: Adjust Dell drivers to a personal email address So that I can always be reached in the future if necessary, add a personal email address. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20210401162206.26901-4-mario.limonciello@dell.com Signed-off-by: Hans de Goede commit c28d4f4646b29037d3a680519b6df40702765a36 Author: Mario Limonciello Date: Thu Apr 1 11:22:05 2021 -0500 MAINTAINERS: Add missing section for alienware-wmi driver This driver is maintained by Dell, but it was missing in MAINTAINERS. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20210401162206.26901-3-mario.limonciello@dell.com Signed-off-by: Hans de Goede commit 1ab9bcbcc4d372deaf3a5304f5f715f42a5c4695 Author: Mario Limonciello Date: Thu Apr 1 11:22:04 2021 -0500 MAINTAINERS: Adjust Dell drivers to email alias A team of engineers will be helping to service these drivers in the future rather than just one person. Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20210401162206.26901-2-mario.limonciello@dell.com Signed-off-by: Hans de Goede commit 5c782817a981981917ec3c647cf521022ee07143 Author: Srinivas Pandruvada Date: Tue Mar 30 15:08:40 2021 -0700 platform/x86: ISST: Account for increased timeout in some cases In some cases when firmware is busy or updating, some mailbox commands still timeout on some newer CPUs. To fix this issue, change how we process timeout. With this change, replaced timeout from using simple count with real timeout in micro-seconds using ktime. When the command response takes more than average processing time, yield to other tasks. The worst case timeout is extended upto 1 milli-second. Signed-off-by: Srinivas Pandruvada Link: https://lore.kernel.org/r/20210330220840.3113959-1-srinivas.pandruvada@linux.intel.com Signed-off-by: Hans de Goede commit 61ce18ff01ec17de2b89bbab319e6974d3a3231c Author: Srinivas Pandruvada Date: Thu Mar 4 17:53:48 2021 -0800 tools/power/x86/intel-speed-select: v1.9 release This release adds following changes: - Support increased number of CPUs - Return error when mailbox commmand fails to enable core-power - Option to online all CPUs - Removes build date and time print Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 17de9a5654f577356f7384a5676e82e544bb2ca1 Author: Antonio Terceiro Date: Fri Mar 12 10:57:46 2021 -0300 tools/power/x86/intel-speed-select: Drop __DATE__ and __TIME__ macros These macros introduce nondeterminism in builds, and break reproducible builds. Signed-off-by: Antonio Terceiro Cc: Srinivas Pandruvada Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 0d3dfd75708117cedf0cea200e9c6fa266129fb5 Author: Srinivas Pandruvada Date: Mon Mar 29 10:24:41 2021 -0700 tools/power/x86/intel-speed-select: Add options to force online It is possible that users manually offlined CPUs via sysfs interface and then started this utility. In this case we will not be able to get package and die id of the those CPUs. So add an option to force online if required for some commands. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit b84733a1c52c2f93897a3cbbc1745c06250a4432 Author: Srinivas Pandruvada Date: Thu Mar 4 17:45:14 2021 -0800 tools/power/x86/intel-speed-select: Process mailbox read error for core-power Some older kernels don't support reading core-power status. In that case mailbox command fails. So, display core-power status as "unknown" instead of supported. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 2e70b710f36c80b6e78cf32a5c30b46dbb72213c Author: Srinivas Pandruvada Date: Thu Mar 4 17:31:49 2021 -0800 tools/power/x86/intel-speed-select: Increase string size The current string size to print cpulist can accommodate upto 80 logical CPUs per package. But this limit is not enough. So increase the string size. Also prevent buffer overflow, if the string size reaches limit. Signed-off-by: Srinivas Pandruvada Signed-off-by: Hans de Goede commit 5e3f5973c8dfd2b80268f1825ed2f2ddf81d3267 Author: Hans de Goede Date: Sun Mar 21 13:16:07 2021 +0100 platform/x86: dell-wmi-sysman: Make init_bios_attributes() ACPI object parsing more robust Make init_bios_attributes() ACPI object parsing more robust: 1. Always check that the type of the return ACPI object is package, rather then only checking this for instance_id == 0 2. Check that the package has the minimum amount of elements which will be consumed by the populate_foo_data() for the attr_type Note/TODO: The populate_foo_data() functions should also be made more robust. The should check the type of each of the elements matches the type which they expect and in case of populate_enum_data() obj->package.count should be passed to it as an argument and it should re-check this itself since it consume a variable number of elements. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321121607.35717-1-hdegoede@redhat.com commit f1fba08609627be90e9a5a89688e420b8b3c97b2 Author: Colin Ian King Date: Fri Mar 26 19:20:22 2021 +0000 platform/x86: panasonic-laptop: remove redundant assignment of variable result The variable result is being assigned 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 Link: https://lore.kernel.org/r/20210326192022.623001-1-colin.king@canonical.com Signed-off-by: Hans de Goede commit 4d7ddd8d30da80518f50e7e19b67e9ec5489ddba Author: Dan Carpenter Date: Fri Mar 26 15:28:48 2021 +0300 platform/surface: clean up a variable in surface_dtx_read() The "&client->ddev->lock" and "&ddev->lock" are the same thing. Let's use "&ddev->lock" consistently. Signed-off-by: Dan Carpenter Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/YF3TgCcpcCYl3a//@mwanda Signed-off-by: Hans de Goede commit dff935f006c33ab3b849d8b253df7e2cfc502a40 Author: Hans de Goede Date: Thu Mar 25 13:32:55 2021 +0100 platform/x86: intel-vbtn: Remove unused KEYMAP_LEN define Now that we have 2 separate input_dev-s for the buttons and the switches, this is no longer used, remove it. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210325123255.73103-1-hdegoede@redhat.com commit ce357fd34f94bb5aff5443987c1e4fd39b8aae37 Author: Luca Stefani Date: Tue Mar 23 22:01:26 2021 +0100 platform/x86: asus-wmi: Add param to turn fn-lock mode on by default * On recent ZenBooks the fn-lock is disabled by default on boot while running Windows. * Add a module param ( fnlock_default ) that allows changing the default at probe time Signed-off-by: Luca Stefani Link: https://lore.kernel.org/r/20210323210126.145286-1-luca.stefani.ge1@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3d904005f6869f37fcc7188f2a15872deecbb38a Author: Andrea.Ho Date: Fri Mar 19 03:44:27 2021 +0000 platform/x86: add support for Advantech software defined button Advantech sw_button is a ACPI event trigger button. With this driver, we can report KEY_PROG1 on the Advantech Tabletop Network Appliances products and it has been tested in FWA1112VC. Add the software define button support to report EV_REP key_event (KEY_PROG1) by pressing button that could be get on user interface and trigger the customized actions. Signed-off-by: Andrea.Ho Link: https://lore.kernel.org/r/20210319034427.23222-1-andrea.cs97g@nctu.edu.tw Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit e76e8b56fe1ab1e9d28e341fac614ddb1a82f8e5 Author: Mathieu Poirier Date: Wed Apr 7 10:00:07 2021 -0600 MAINTAINERS: Add CoreSight header files Adding CoreSight headers to the list of supported files so that maintainers can be notified when changes are submitted. Link: https://lore.kernel.org/r/20210326155431.2011889-1-mathieu.poirier@linaro.org Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210407160007.418053-5-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 023e0294e1ed6c497c405d86573be267691a09a8 Author: Qi Liu Date: Wed Apr 7 10:00:06 2021 -0600 coresight: core: Fix typo in coresight-core.c Fix the following checkpatch warning: WARNING: 'compoment' may be misspelled - perhaps 'component'? Link: https://lore.kernel.org/r/1616487086-50418-1-git-send-email-liuqi115@huawei.com Signed-off-by: Qi Liu Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210407160007.418053-4-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit d8844295184cbbba54f27d6c5c0b3475d2a96042 Author: Wei Yongjun Date: Wed Apr 7 10:00:05 2021 -0600 coresight: etm: perf: Make symbol 'format_attr_contextid' static The sparse tool complains as follows: drivers/hwtracing/coresight/coresight-etm-perf.c:61:25: warning: symbol 'format_attr_contextid' was not declared. Should it be static? This symbol is not used outside of coresight-etm-perf.c, so this commit marks it static. Link: https://lore.kernel.org/r/20210308123250.2417947-1-weiyongjun1@huawei.com Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210407160007.418053-3-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit ec58594972255165c03344d7e15fb1242f5d3c4e Author: Sai Prakash Ranjan Date: Wed Apr 7 10:00:04 2021 -0600 coresight: etm4x: Add ETM PID for Cortex-A78 Add ETM PID for Cortex-A78 to the list of supported ETMs. Link: https://lore.kernel.org/r/20210213112829.26834-1-saiprakash.ranjan@codeaurora.org Reviewed-by: Mike Leach Signed-off-by: Sai Prakash Ranjan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210407160007.418053-2-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman commit 060e3535adf5c961b01421b9fdaddab8dd43ba85 Author: Rafael J. Wysocki Date: Mon Mar 29 20:37:12 2021 +0200 cpuidle: menu: Take negative "sleep length" values into account Make the menu governor check the tick_nohz_get_next_hrtimer() return value so as to avoid dealing with negative "sleep length" values and make it use that value directly when the tick is stopped. While at it, rename local variable delta_next in menu_select() to delta_tick which better reflects its purpose. Signed-off-by: Rafael J. Wysocki commit 030adec9f68e30cbbc24c57296a141943177c148 Author: Rafael J. Wysocki Date: Mon Mar 29 20:21:43 2021 +0200 cpuidle: teo: Take negative "sleep length" values into account Modify the TEO governor to take possible negative return values of tick_nohz_get_next_hrtimer() into account by changing the data type of some variables used by it to s64 which allows it to carry out computations without potentially problematic data type conversions into u64. Also change the computations in teo_select() so that the negative values themselves are handled in a natural way to avoid adding extra negative value checks to that function. Signed-off-by: Rafael J. Wysocki commit d3c33be1f350e7fd2b04381b000f3f950bd1ba77 Author: Rafael J. Wysocki Date: Mon Mar 29 20:19:03 2021 +0200 cpuidle: teo: Adjust handling of very short idle times If the time till the next timer event is shorter than the target residency of the first idle state (state 0), the TEO governor does not update its metrics for any idle states, but arguably it should record a "hit" for idle state 0 in that case, so modify it to do that. Accordingly, also make it record an "early hit" for idle state 0 if the measured idle duration is less than its target residency, which allows one branch more to be dropped from teo_update(). Signed-off-by: Rafael J. Wysocki commit 2ab80d46fead0309d7f190d8023c8d64b2ffcbd5 Author: Rafael J. Wysocki Date: Mon Mar 29 20:15:19 2021 +0200 cpuidle: Use s64 as exit_latency_ns and target_residency_ns data type Subsequent changes will cause the exit_latency_ns and target_residency_ns fields in struct cpuidle_state to be used in computations in which data type conversions to u64 may turn a negative number close to zero into a verly large positive number leading to incorrect results. In preparation for that, change the data type of the fields mentioned above to s64, but ensure that they will not be negative themselves. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit 4c81cb7e64436a729cf20cdddaf18a9b4a638430 Author: Rafael J. Wysocki Date: Mon Mar 29 20:13:37 2021 +0200 tick/nohz: Improve tick_nohz_get_next_hrtimer() kerneldoc Make the tick_nohz_get_next_hrtimer() kerneldoc comment state clearly that the function may return negative numbers. Signed-off-by: Rafael J. Wysocki commit 33b688e3854d6ad76d0acbeebc601ce2ddb8513d Author: Pierre-Louis Bossart Date: Wed Mar 31 18:26:12 2021 -0500 PM: clk: remove kernel-doc warning Remove make W=1 warning: drivers/base/power/clock_ops.c:148: warning: expecting prototype for pm_clk_enable(). Prototype was for __pm_clk_enable() instead Signed-off-by: Pierre-Louis Bossart Signed-off-by: Rafael J. Wysocki commit beafe82b41deff86ab5d5bdc3acce7ae63c9b28b Author: Pierre-Louis Bossart Date: Wed Mar 31 18:26:11 2021 -0500 PM: wakeup: fix kernel-doc warnings and fix typos Remove make W=1 warnings and fit 'Itereates' typos drivers/base/power/wakeup.c:403: warning: wrong kernel-doc identifier on line: * device_wakeup_arm_wake_irqs(void) drivers/base/power/wakeup.c:419: warning: wrong kernel-doc identifier on line: * device_wakeup_disarm_wake_irqs(void) drivers/base/power/wakeup.c:537: warning: Function parameter or member 'enable' not described in 'device_set_wakeup_enable' drivers/base/power/wakeup.c:592: warning: expecting prototype for wakup_source_activate(). Prototype was for wakeup_source_activate() instead drivers/base/power/wakeup.c:697: warning: expecting prototype for wakup_source_deactivate(). Prototype was for wakeup_source_deactivate() instead drivers/base/power/wakeup.c:795: warning: Function parameter or member 't' not described in 'pm_wakeup_timer_fn' drivers/base/power/wakeup.c:795: warning: Excess function parameter 'data' description in 'pm_wakeup_timer_fn' drivers/base/power/wakeup.c:1027: warning: Function parameter or member 'set' not described in 'pm_wakep_autosleep_enabled' drivers/base/power/wakeup.c:1027: warning: Excess function parameter 'enabled' description in 'pm_wakep_autosleep_enabled' Signed-off-by: Pierre-Louis Bossart Signed-off-by: Rafael J. Wysocki commit 12c0632b25794ed4de46427811e71fee66f19f15 Author: Pierre-Louis Bossart Date: Wed Mar 31 18:26:10 2021 -0500 PM: runtime: remove kernel-doc warnings remove make W=1 warnings drivers/base/power/runtime.c:926: warning: Function parameter or member 'timer' not described in 'pm_suspend_timer_fn' drivers/base/power/runtime.c:926: warning: Excess function parameter 'data' description in 'pm_suspend_timer_fn' Signed-off-by: Pierre-Louis Bossart Signed-off-by: Rafael J. Wysocki commit e84dff1bf0eaccd0231ecf02a8f5c9830d7d34dc Author: Wan Jiabing Date: Wed Mar 24 15:29:11 2021 +0800 PM: core: Remove duplicate declaration from header file struct device is declared twice, so remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Rafael J. Wysocki commit c3fbd67b94b0420f33210a8a02fc4c23ec2ea13b Author: Bob Moore Date: Tue Apr 6 14:30:28 2021 -0700 ACPICA: Update version to 20210331 ACPICA commit eb423b7d5440472d0d2115cb81b52b1b7c56d95a Link: https://github.com/acpica/acpica/commit/eb423b7d Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 8e1fdd7f1655c538fb017d0493c80d02cbc8d8d4 Author: Shameer Kolothum Date: Tue Apr 6 14:30:27 2021 -0700 ACPICA: IORT: Updates for revision E.b ACPICA commit 8710a708faed728ea2672b8da842b2e9af1cf5bd IORT revision E.b (ARM DEN 0049E.b) contains a few additions like, -Added an identifier field in the node descriptors to aid table cross-referencing. -Introduced the Reserved Memory Range(RMR) node. This is used to describe memory ranges that are used by endpoints and require a unity mapping in SMMU. -Introduced a flag in the RC node to express support for PRI. -Added a flag in the RC node to declare support for PASID forward information. Please note that IORT Rev E and E.a have known issues and are not supported. Link: https://github.com/acpica/acpica/commit/8710a708 Signed-off-by: Shameer Kolothum Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit e563f6fc9ef4674c083b22d62ca4d93f0cfb1cce Author: Jean-Philippe Brucker Date: Tue Apr 6 14:30:26 2021 -0700 ACPICA: acpisrc: Add missing conversion for VIOT support ACPICA commit 856a96fdf4b51b2b8da17529df0255e6f51f1b5b struct acpi_viot_header is missing from identifier table, causing linuxize failures. Link: https://github.com/acpica/acpica/commit/856a96fd Signed-off-by: Jean-Philippe Brucker Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit f73b8619aa39580f5f1bcb0b3816a98a17c5e8c2 Author: Bob Moore Date: Tue Apr 6 14:30:25 2021 -0700 ACPICA: iASL: Decode subtable type field for VIOT For the table disassembler, decode the subtable type field to a descriptive string. ACPICA commit 2197e354fb5dcafaddd2016ffeb0620e5bc3d5e2 Link: https://github.com/acpica/acpica/commit/2197e354 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 519c809069cef7de5ced3e620412fa66c032436d Author: Bob Moore Date: Tue Apr 6 14:30:24 2021 -0700 ACPICA: iASL: Add support for CEDT table Also, update the CEDT template. ACPICA commit 1e6dded267b13c4aa0c3e16de0fa89d3b9c880e9 Link: https://github.com/acpica/acpica/commit/1e6dded2 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 9f40033734c7bc02f151e28975a59bdc2f332023 Author: Erik Kaneda Date: Tue Apr 6 14:30:23 2021 -0700 ACPICA: ACPI 6.4: add support for PHAT table ACPICA commit de805b6a355c01f3aff4044a4ba60e9845b7668c This table displays health information about the platform firmware. For full definition, see the ACPI specification. Link: https://github.com/acpica/acpica/commit/de805b6a Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit a2befbb2c3fbeccf4a04e9f0179cc28d5f5c1682 Author: Bob Moore Date: Tue Apr 6 14:30:22 2021 -0700 ACPICA: ACPI 6.4: add CSI2Bus resource template This commit the result of squashing the following: ACPICA commit 21a316fdaa46b3fb245a1920f3829cb05d6ced6e ACPICA commit f5506fc7dad08c2a25ef52cf836c2d67385a612c Link: https://github.com/acpica/acpica/commit/21a316fd Link: https://github.com/acpica/acpica/commit/f5506fc7 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit cca97d421a01731d3ee3c0ac10f356c877e08e84 Author: Bob Moore Date: Tue Apr 6 14:30:21 2021 -0700 ACPICA: ACPI 6.4: PMTT: add new fields/structures ACPICA commit 036290735ad8020f762c4d94bcbc0e84b2e307b6 Link: https://github.com/acpica/acpica/commit/03629073 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 7c5eab72f5a4dffec61f8c0cd99736178f95a50a Author: Ben Widawsky Date: Tue Apr 6 14:30:20 2021 -0700 ACPICA: CXL 2.0: CEDT: Add new CEDT table ACPICA commit 0b03aa8ebd7a5b2b9407893f123ee587af45926f This sets up all of the boilerplate without actually doing anything. Link: https://github.com/acpica/acpica/commit/0b03aa8e Signed-off-by: Ben Widawsky Signed-off-by: Ben Widawsky Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 582252034dd6b334c5f50140958362b19442fecd Author: Jean-Philippe Brucker Date: Tue Apr 6 14:30:19 2021 -0700 ACPICA: iASL: Add definitions for the VIOT table ACPICA commit fc4e33319c1ee08f20f5c44853dd8426643f6dfd Add definitions for the VIOT table and its subtables. Link: https://github.com/acpica/acpica/commit/fc4e3331 Signed-off-by: Jean-Philippe Brucker Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 14012d2fb1fea43077f71d33333ba3703a21fdd6 Author: Erik Kaneda Date: Tue Apr 6 14:30:18 2021 -0700 ACPICA: ACPI 6.4: add SDEV secure access components ACPICA commit 44ca5f4f9be24bf64524cdb1de46322509319056 This entails adding an optional subtable indicating secure access components as well as two different types of secure access components (ID-based or Memory). For definitons and uses, consult the ACPI specification. Link: https://github.com/acpica/acpica/commit/44ca5f4f Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 2dab2b68d25c9605ea30eb9dce9eefbfe3ec7d9e Author: Bob Moore Date: Tue Apr 6 14:30:17 2021 -0700 ACPICA: ACPI 6.4: Add new flags in SRAT ACPICA commit 44633fa72f1e4ede718733aec16e7fb7572042f8 Link: https://github.com/acpica/acpica/commit/44633fa7 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit f1489db63efb309b91539750875ee2ebe320873d Author: Bob Moore Date: Tue Apr 6 14:30:16 2021 -0700 ACPICA: ACPI 6.4: HMAT: add new fields/flags ACPICA commit 18a77ca6fc3edd26a24d8f32ae5c0ea66d84ccff Link: https://github.com/acpica/acpica/commit/18a77ca6 Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit cf16b05c607bd716a0a5726dc8d577a89fdc1777 Author: Bob Moore Date: Tue Apr 6 14:30:15 2021 -0700 ACPICA: ACPI 6.4: NFIT: add Location Cookie field Also, update struct size to reflect these changes in nfit core driver. ACPICA commit af60199a9a1de9e6844929fd4cc22334522ed195 Link: https://github.com/acpica/acpica/commit/af60199a Cc: Dan Williams Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit e527db8f39d4c71128b3ef5f6a4e433513f5246b Author: Colin Ian King Date: Tue Apr 6 14:30:14 2021 -0700 ACPICA: Tree-wide: fix various typos and spelling mistakes This commit squashes the following: ACPICA commit bc8939e2d902653e71bb1601b129a993c37fcfad ACPICA commit 2d9e5e98e23f2a569e5691e6bed183146e25798d ACPICA commit 937358156631ea7a0eef3569c213c82a031097d5 Fix more spelling issues found using the codespell checker and found without tools. Link: https://github.com/acpica/acpica/commit/bc8939e2 Link: https://github.com/acpica/acpica/commit/2d9e5e98 Link: https://github.com/acpica/acpica/commit/93735815 Signed-off-by: Colin Ian King Signed-off-by: Christophe JAILLET Signed-off-by: Bhaskar Chowdhury Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit 5e2e86c0b9970e6f70869e76a1c6417036fd3a7e Author: Erik Kaneda Date: Tue Apr 6 14:30:13 2021 -0700 ACPICA: ACPI 6.4: PPTT: add new version of subtable type 1 This commit squashes the following: ACPICA commit 475c5e89f8f701ccdfee6ca567e33c854ecd6c9e ACPICA commit 82cf78ac175a4b7d8842c5b786be24031c817cfd This new subtable is only valid for PPTT version 3. Elyes fixed a misspelled identifier in this commit. Link: https://github.com/acpica/acpica/commit/475c5e89 Link: https://github.com/acpica/acpica/commit/82cf78ac Signed-off-by: Elyes HAOUAS Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 71f79a3f0c752729b93ec5255476dce59bfae49a Author: Erik Kaneda Date: Tue Apr 6 14:30:12 2021 -0700 ACPICA: ACPI 6.4: PCCT: add support for subtable type 5 ACPICA commit 208d7e27ebc473feb4182cc8e58f3789c4efaca6 Link: https://github.com/acpica/acpica/commit/208d7e27 Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 9557cb8c5d8fbe835ade2775c95eb933344f8a27 Author: Erik Kaneda Date: Tue Apr 6 14:30:11 2021 -0700 ACPICA: ACPI 6.4: MADT: add Multiprocessor Wakeup Structure ACPICA commit b9eb6f3a19b816824d6f47a6bc86fd8ce690e04b Link: https://github.com/acpica/acpica/commit/b9eb6f3a Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 97f46be290adc8f827d5d1b2266b42421162c18a Author: Erik Kaneda Date: Tue Apr 6 14:30:10 2021 -0700 ACPICA: ACPI 6.4: add CXL ACPI device ID and _CBR object ACPICA commit 7f634ac53fe1e480c01ceff7532cd8dc6430f1b9 The ACPI device ID represents the CXL host bridge. _CBR objects gets the memory location of CXL Host Bridge Registers. Link: https://github.com/acpica/acpica/commit/7f634ac5 Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit e1dc932878ac66dab68557d4c06f7254a1a570e9 Author: Erik Kaneda Date: Tue Apr 6 14:30:09 2021 -0700 ACPICA: ACPI 6.4: add USB4 capabilities UUID ACPICA commit 619e6df02edbebe95b2765cdd5159f02607e45fc This change allows iASL to a list of know UUID's. iASL uses this list to point out any UUID's that are not publically known. Link: https://github.com/acpica/acpica/commit/619e6df0 Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 76d6338a82cf8285af140202d71b4444f2eab389 Author: Erik Kaneda Date: Tue Apr 6 14:30:08 2021 -0700 ACPICA: ACPI 6.4: Add new predefined objects _BPC, _BPS, and _BPT ACPICA commit 3cfef24ae2d98babbbfbe4ba612a2f5d9014d3ba The object definition for these can be found in the ACPI 6.4 specification. Link: https://github.com/acpica/acpica/commit/3cfef24a Signed-off-by: Erik Kaneda Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki commit 7ce7a4459add3858243f77054fc98c1527a827fd Author: Alexander Monakov Date: Tue Apr 6 14:30:07 2021 -0700 ACPICA: Add parsing for IVRS IVHD 40h and device entry F0h ACPICA commit eefb865355514048380d921de5efcf30027d6b02 IVHD type 40h uses the same field layout as type 11h, but adds support for a new device entry type F0h (ACPI HID device entry). The new device entry type has variable length: after fixed-length fields occupying 22 bytes, there's a field of length up to 255 (as given by the preceding field). Link: https://github.com/acpica/acpica/commit/eefb8653 Signed-off-by: Alexander Monakov Signed-off-by: Bob Moore Signed-off-by: Erik Kaneda Signed-off-by: Rafael J. Wysocki commit ff0e9ee3a6d40c8a1c6e19ea8620ef94816eb51c Author: Lee Jones Date: Fri Mar 26 14:34:56 2021 +0000 HID: hid-sensor-hub: Move 'hsdev' description to correct struct definition Fixes the following W=1 kernel build warning(s): drivers/hid/hid-sensor-hub.c:54: warning: Function parameter or member 'hsdev' not described in 'hid_sensor_hub_callbacks_list' Cc: Jiri Kosina Cc: Jonathan Cameron Cc: Srinivas Pandruvada Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-iio@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Jonathan Cameron Signed-off-by: Benjamin Tissoires commit 07b34ddd759b7b1580eee6fd754dec824a280f0d Author: Lee Jones Date: Fri Mar 26 14:34:55 2021 +0000 HID: hid-sensor-hub: Remove unused struct member 'quirks' Commit b0f847e16c1ea ("HID: hid-sensor-hub: Force logical minimum to 1 for power and report state") removed the last used quirk handled by this driver. Fixes the following W=1 kernel build warning(s): drivers/hid/hid-sensor-hub.c:39: warning: Function parameter or member 'quirks' not described in 'sensor_hub_data' Cc: Jiri Kosina Cc: Jonathan Cameron Cc: Srinivas Pandruvada Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-iio@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Jonathan Cameron Signed-off-by: Benjamin Tissoires commit 1784cd57e35f8cc5981cb1e632561e74956cd007 Author: Lee Jones Date: Fri Mar 26 14:34:54 2021 +0000 HID: wacom_sys: Demote kernel-doc abuse Fixes the following W=1 kernel build warning(s): drivers/hid/wacom_sys.c:1505: warning: Function parameter or member 'wacom' not described in 'wacom_led_next' drivers/hid/wacom_sys.c:1505: warning: Function parameter or member 'cur' not described in 'wacom_led_next' Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit dbf104fdd42e49310851fa258ce0493e69dd2221 Author: Lee Jones Date: Fri Mar 26 14:34:53 2021 +0000 HID: hid-sensor-custom: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/hid/hid-sensor-custom.c: In function ‘store_value’: drivers/hid/hid-sensor-custom.c:400:7: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Jiri Kosina Cc: Jonathan Cameron Cc: Srinivas Pandruvada Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Cc: linux-iio@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Jonathan Cameron Signed-off-by: Benjamin Tissoires commit 5abb54458242659552046e84ccd889577e2fd971 Author: Lee Jones Date: Fri Mar 26 14:34:52 2021 +0000 HID: hid-uclogic-params: Ensure function names are present and correct in kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/hid/hid-uclogic-params.c:33: warning: expecting prototype for Convert a pen in(). Prototype was for uclogic_params_pen_inrange_to_str() instead drivers/hid/hid-uclogic-params.c:519: warning: wrong kernel-doc identifier on line: drivers/hid/hid-uclogic-params.c:706: warning: expecting prototype for uclogic_params_init(). Prototype was for uclogic_params_huion_init() instead Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit a62ce117ac189abccffb81f66e32f1694d1271de Author: Lee Jones Date: Fri Mar 26 14:34:50 2021 +0000 HID: hid-uclogic-rdesc: Kernel-doc is for functions and structs Fixes the following W=1 kernel build warning(s): drivers/hid/hid-uclogic-rdesc.c:645: warning: wrong kernel-doc identifier on line: Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit 3f37fdcd313d2c9843aec01cef6512929a33a677 Author: Lee Jones Date: Fri Mar 26 14:34:49 2021 +0000 HID: hid-logitech-hidpp: Fix conformant kernel-doc header and demote abuses Fixes the following W=1 kernel build warning(s): drivers/hid/hid-logitech-hidpp.c:275: warning: Function parameter or member 'hidpp' not described in 'hidpp_send_message_sync' drivers/hid/hid-logitech-hidpp.c:275: warning: Function parameter or member 'message' not described in 'hidpp_send_message_sync' drivers/hid/hid-logitech-hidpp.c:275: warning: Function parameter or member 'response' not described in 'hidpp_send_message_sync' drivers/hid/hid-logitech-hidpp.c:275: warning: expecting prototype for and something else(). Prototype was for hidpp_send_message_sync() instead drivers/hid/hid-logitech-hidpp.c:427: warning: wrong kernel-doc identifier on line: drivers/hid/hid-logitech-hidpp.c:470: warning: Function parameter or member 'input_dev' not described in 'hidpp_scroll_counter_handle_scroll' drivers/hid/hid-logitech-hidpp.c:1894: warning: Function parameter or member 'hidpp' not described in 'hidpp_touchpad_fw_items_set' drivers/hid/hid-logitech-hidpp.c:1894: warning: Function parameter or member 'feature_index' not described in 'hidpp_touchpad_fw_items_set' drivers/hid/hid-logitech-hidpp.c:1894: warning: Function parameter or member 'items' not described in 'hidpp_touchpad_fw_items_set' drivers/hid/hid-logitech-hidpp.c:1894: warning: expecting prototype for send a set state command to the device by reading the current items(). Prototype was for hidpp_touchpad_fw_items_set() instead Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Henrik Rydberg Cc: Lopez Casado Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit ae71db0d4d68f39b16f970af21c9c695fea9f5c9 Author: Lee Jones Date: Fri Mar 26 14:34:48 2021 +0000 HID: hid-picolcd_core: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/hid/hid-picolcd_core.c: In function ‘picolcd_raw_event’: drivers/hid/hid-picolcd_core.c:332:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: "Bruno Prémont" Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: "L. Vinyard, Jr" Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit a3760cd75e330d994e3b4cd4a61e40b4aecf34b1 Author: Lee Jones Date: Fri Mar 26 14:34:47 2021 +0000 HID: hid-kye: Fix incorrect function name for kye_tablet_enable() Fixes the following W=1 kernel build warning(s): drivers/hid/hid-kye.c:666: warning: expecting prototype for Enable fully(). Prototype was for kye_tablet_enable() instead Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit cd2bb7b73e0bc395f01196e4b9c4b20f4a723750 Author: Lee Jones Date: Fri Mar 26 14:34:44 2021 +0000 HID: hid-core: Fix incorrect function name in header Fixes the following W=1 kernel build warning(s): drivers/hid/hid-core.c:2142: warning: expecting prototype for store_new_id(). Prototype was for new_id_store() instead Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Vojtech Pavlik Cc: Michael Haboustak Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit 8802d1546b79296afc3a3ae803c9dc869eb2ad52 Author: Lee Jones Date: Fri Mar 26 14:34:42 2021 +0000 HID: hid-alps: Correct struct misnaming Fixes the following W=1 kernel build warning(s): drivers/hid/hid-alps.c:113: warning: expecting prototype for struct u1_data. Prototype was for struct alps_dev instead Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Henrik Rydberg Cc: Masaki Ota Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit fbe352aa7bbd6160ab9c04eee87dac4f507d958b Author: Lee Jones Date: Fri Mar 26 14:34:41 2021 +0000 HID: usbhid: hid-pidff: Demote a couple kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/hid/usbhid/hid-pidff.c:512: warning: Function parameter or member 'dev' not described in 'pidff_playback' drivers/hid/usbhid/hid-pidff.c:512: warning: Function parameter or member 'effect_id' not described in 'pidff_playback' drivers/hid/usbhid/hid-pidff.c:512: warning: Function parameter or member 'value' not described in 'pidff_playback' drivers/hid/usbhid/hid-pidff.c:512: warning: expecting prototype for value times(). Prototype was for pidff_playback() instead drivers/hid/usbhid/hid-pidff.c:1005: warning: Function parameter or member 'pidff' not described in 'pidff_find_effects' drivers/hid/usbhid/hid-pidff.c:1005: warning: Function parameter or member 'dev' not described in 'pidff_find_effects' drivers/hid/usbhid/hid-pidff.c:1005: warning: expecting prototype for Find the implemented effect types(). Prototype was for pidff_find_effects() instead Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Anssi Hannula Cc: linux-usb@vger.kernel.org Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit 4cbf8aa75cf3ce860805e04d6fae0031caf75478 Author: Lee Jones Date: Fri Mar 26 14:34:39 2021 +0000 HID: usbhid: Repair a formatting issue in a struct description Fixes the following W=1 kernel build warning(s): drivers/hid/usbhid/usbkbd.c:66: warning: bad line: should be on Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: message to Cc: linux-usb@vger.kernel.org Cc: linux-input@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit 1a219e08ecd76a047b231f6e860c0a7d4dfb49b7 Author: Marc Zyngier Date: Tue Apr 6 14:10:33 2021 +0100 KVM: arm64: Mark the kvmarm ML as moderated for non-subscribers The kvmarm mailing list is moderated for non-subscriber, but that was never advertised. Fix this with the hope that people will eventually subscribe before posting, saving me the hassle of letting their post through eventually. Signed-off-by: Marc Zyngier commit 412c8fa8c3748cc0500b4c86a47dd28254f015f1 Author: Hyeonki Hong Date: Wed Apr 7 04:26:09 2021 +0000 arm64: dts: meson: add GPIO line names to ODROID N2/N2+ Add GPIO line-name identifiers to the ODROID N2/N2+ common dtsi. Signed-off-by: Hyeonki Hong Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210407042609.9736-4-christianshewitt@gmail.com commit cfa303d99e0692179d2bfbb3287a9176bc1cef1e Author: Hyeonki Hong Date: Wed Apr 7 04:26:08 2021 +0000 arm64: dts: meson: add saradc node to ODROID N2/N2+ Add the meson saradc node to the ODROID N2/N2+ common dtsi. Signed-off-by: Hyeonki Hong Signed-off-by: Christian Hewitt Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210407042609.9736-3-christianshewitt@gmail.com commit 7d9158bcb34adf5134a8704928722b6b0bac691d Author: Christian Hewitt Date: Wed Apr 7 04:26:07 2021 +0000 arm64: dts: meson: remove extra tab from ODROID N2/N2+ ext_mdio node Remove an extra tab from the ext_mdio node in the ODROID N2/N2+ common dtsi file. Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Reviewed-by: Martin Blumenstingl Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210407042609.9736-2-christianshewitt@gmail.com commit 580dca8143d215977811bd2ff881e1e4f6ff39f0 Author: Ming Lei Date: Tue Apr 6 11:19:33 2021 +0800 blk-mq: set default elevator as deadline in case of hctx shared tagset Yanhui found that write performance is degraded a lot after applying hctx shared tagset on one test machine with megaraid_sas. And turns out it is caused by none scheduler which becomes default elevator caused by hctx shared tagset patchset. Given more scsi HBAs will apply hctx shared tagset, and the similar performance exists for them too. So keep previous behavior by still using default mq-deadline for queues which apply hctx shared tagset, just like before. Fixes: 32bc15afed04 ("blk-mq: Facilitate a shared sbitmap per tagset") Reported-by: Yanhui Ma Cc: John Garry Cc: Hannes Reinecke Signed-off-by: Ming Lei Reviewed-by: Martin K. Petersen Reviewed-by: Bart Van Assche Reviewed-by: John Garry Link: https://lore.kernel.org/r/20210406031933.767228-1-ming.lei@redhat.com Signed-off-by: Jens Axboe commit 868ed7311cd81ef2fffa2cd36e72c44f226b0085 Author: Sowjanya Komatineni Date: Tue Apr 6 18:25:31 2021 -0700 ata: ahci_tegra: Add AHCI support for Tegra186 This patch adds support for AHCI-compliant Serial ATA controller on Tegra186 SoC. Tegra186 does not have sata-oob reset. Tegra186 SATA_NVOOB register filed COMMA_CNT position and width are different compared to Tegra210 and prior. So, this patch adds a flag has_sata_oob_rst and tegra_ahci_regs to SoC specific strcuture tegra_ahci_soc and updated their implementation accordingly. Signed-off-by: Sowjanya Komatineni Acked-by: Thierry Reding Link: https://lore.kernel.org/r/1617758731-12380-4-git-send-email-skomatineni@nvidia.com Signed-off-by: Jens Axboe commit d843419d295f4d1cc8c24a0c7725785168675b34 Author: Sowjanya Komatineni Date: Tue Apr 6 18:25:30 2021 -0700 dt-binding: ata: tegra: Add dt-binding documentation for Tegra186 This patch adds dt-bindings documentation for Tegra186 AHCI controller. Reviewed-by: Rob Herring Signed-off-by: Sowjanya Komatineni Acked-by: Thierry Reding Link: https://lore.kernel.org/r/1617758731-12380-3-git-send-email-skomatineni@nvidia.com Signed-off-by: Jens Axboe commit 8ff35bb23442feb184c66cfec2737eb9c41df8a1 Author: Sowjanya Komatineni Date: Tue Apr 6 18:25:29 2021 -0700 dt-bindings: ata: tegra: Convert binding documentation to YAML This patch converts text based dt-binding document to YAML based dt-binding document. Reviewed-by: Rob Herring Signed-off-by: Sowjanya Komatineni Acked-by: Thierry Reding Link: https://lore.kernel.org/r/1617758731-12380-2-git-send-email-skomatineni@nvidia.com Signed-off-by: Jens Axboe commit 1c4422f22605ec0f4455400c52a31898edcda425 Author: Bharat Kumar Gogada Date: Mon Feb 22 14:17:32 2021 +0530 PCI: xilinx-nwl: Add optional "dma-coherent" property Add optional dma-coherent property to support coherent PCIe DMA traffic. Link: https://lore.kernel.org/r/20210222084732.21521-2-bharat.kumar.gogada@xilinx.com Signed-off-by: Bharat Kumar Gogada Signed-off-by: Lorenzo Pieralisi commit 213e12205232886902507ba4e2af12d79b7cbbab Author: Bharat Kumar Gogada Date: Mon Feb 22 14:17:31 2021 +0530 PCI: xilinx-nwl: Enable coherent PCIe DMA traffic using CCI Add support for routing PCIe DMA traffic coherently when Cache Coherent Interconnect (CCI) is enabled in the system. The "dma-coherent" property is used to determine if CCI is enabled or not. Refer to https://developer.arm.com/documentation/ddi0470/k/preface for the CCI specification. Link: https://lore.kernel.org/r/20210222084732.21521-1-bharat.kumar.gogada@xilinx.com Signed-off-by: Bharat Kumar Gogada Signed-off-by: Lorenzo Pieralisi commit 0e6521f13c297de32906ad7f691905803b2b2880 Author: Tian Tao Date: Thu Apr 1 14:24:48 2021 +0800 spi: orion: Use device_get_match_data() helper Use the device_get_match_data() helper instead of open coding. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1617258288-1490-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Mark Brown commit 9a446cf97af70ee81ba177703b67ac4955a5edcc Author: Jay Fang Date: Wed Apr 7 10:31:00 2021 +0800 spi: hisi-kunpeng: Fix Woverflow warning on conversion Fix warning Woverflow on type conversion reported on x86_64: drivers/spi/spi-hisi-kunpeng.c:361:9: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744073709551600' to '4294967280' [-Woverflow] The registers are 32 bit, so fix by casting to u32. Fixes: c770d8631e18 ("spi: Add HiSilicon SPI Controller Driver for Kunpeng SoCs") Cc: Stephen Rothwell Reported-by: kernel test robot Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1617762660-54681-1-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 14e13b1ce92ea278fc0d7bb95b340b46cff624ab Author: Colin Ian King Date: Tue Apr 6 17:40:02 2021 +0100 regmap-irq: Fix dereference of a potentially null d->virt_buf The clean up of struct d can potentiallly index into a null array d->virt_buf causing errorenous pointer dereferencing issues on kfree calls. Fix this by adding a null check on d->virt_buf before attempting to traverse the array to kfree the objects. Addresses-Coverity: ("Dereference after null check") Fixes: 4c5014456305 ("regmap-irq: Introduce virtual regs to handle more config regs") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210406164002.430221-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 9be701ec3493d3348723a38f0c19702d710758ce Author: Jerome Brunet Date: Wed Apr 7 16:59:14 2021 +0200 ASoC: meson: axg-fifo: add NO_PERIOD_WAKEUP support On the AXG family, the fifo irq is not necessary for the HW to operate. It is just used to notify that a period has elapsed. If userpace does not care for these wakeups (such as pipewire), we are just wasting CPU cycles. Add support for NO_PERIOD_WAKEUP and disable irq when they are no needed. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210407145914.311479-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit fa74c223b6fd78a5314b4c61b9abdbed3c2185b4 Author: Krzysztof Kozlowski Date: Wed Apr 7 11:20:27 2021 +0200 ASoC: simple-card: fix possible uninitialized single_cpu local variable The 'single_cpu' local variable is assigned by asoc_simple_parse_dai() and later used in a asoc_simple_canonicalize_cpu() call, assuming the entire function did not exit on errors. However the first function returns 0 if passed device_node is NULL, thus leaving the variable uninitialized and reporting success. Addresses-Coverity: Uninitialized scalar variable Fixes: 8f7f298a3337 ("ASoC: simple-card-utils: separate asoc_simple_card_parse_dai()") Signed-off-by: Krzysztof Kozlowski Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20210407092027.60769-1-krzysztof.kozlowski@canonical.com Signed-off-by: Mark Brown commit af4b54127b2b8a69f0f50e54cf099f26b82c9244 Author: Ye Bin Date: Wed Apr 7 15:42:18 2021 +0800 ASoC: codecs: lpass-va-macro: constify static struct snd_soc_dai_ops The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot Signed-off-by: Ye Bin Link: https://lore.kernel.org/r/20210407074218.3051979-1-yebin10@huawei.com Signed-off-by: Mark Brown commit fd4daab3b139a24e71cae5de4f0ca715dbb6634a Author: Jiri Prchal Date: Tue Apr 6 16:24:39 2021 +0200 ASoC: codecs: tlv320aic3x: add SPI support Added SPI support. Signed-off-by: Jiri Prchal Link: https://lore.kernel.org/r/20210406142439.102396-5-jiri.prchal@aksignal.cz Signed-off-by: Mark Brown commit a96d2ba2d8248d5e8170f2f44f98d4a33329b08a Author: Jiri Prchal Date: Tue Apr 6 16:24:38 2021 +0200 ASoC: codecs: tlv320aic3x: move I2C to separated file Moved I2C related staff to separated source file. Signed-off-by: Jiri Prchal Link: https://lore.kernel.org/r/20210406142439.102396-4-jiri.prchal@aksignal.cz Signed-off-by: Mark Brown commit b015df6ac03ee81b259dcb2f1a6faf4cf04ace5a Author: Jiri Prchal Date: Tue Apr 6 16:24:37 2021 +0200 ASoC: codecs: tlv320aic3x: rename probe function Renamed function to have it free for generic probe. Signed-off-by: Jiri Prchal Link: https://lore.kernel.org/r/20210406142439.102396-3-jiri.prchal@aksignal.cz Signed-off-by: Mark Brown commit 73a4808892b83c8336c3d913d44b8de68d881369 Author: Jiri Prchal Date: Tue Apr 6 16:24:36 2021 +0200 ASoC: codecs: tlv320aic3x: move model definitions Model definitions moved to header file. Preparation for SPI and I2C separated files. Signed-off-by: Jiri Prchal Link: https://lore.kernel.org/r/20210406142439.102396-2-jiri.prchal@aksignal.cz Signed-off-by: Mark Brown commit 6f68accaa8641b70b698da659216f82f87537869 Author: Jerome Brunet Date: Wed Apr 7 16:57:14 2021 +0200 ASoC: meson: axg-frddr: set fifo depth according to the period When the period is small, using all the FRDDR fifo depth increases the latency of the playback because the following device won't start pulling data until the fifo reaches the depth set. We can adjust this depth so trim it down for small periods. Signed-off-by: Jerome Brunet Link: https://lore.kernel.org/r/20210407145714.311138-1-jbrunet@baylibre.com Signed-off-by: Mark Brown commit e9bb37ff35bb6faed53c5a2ae0329589a8b02939 Author: Lee Jones Date: Fri Mar 26 14:34:51 2021 +0000 HID: hid-thrustmaster: Demote a bunch of kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/hid/hid-thrustmaster.c:23: warning: Incorrect use of kernel-doc format: * These interrupts are used to prevent a nasty crash when initializing the drivers/hid/hid-thrustmaster.c:26: warning: cannot understand function prototype: 'const u8 setup_0[] = ' drivers/hid/hid-thrustmaster.c:49: warning: cannot understand function prototype: 'struct tm_wheel_info ' drivers/hid/hid-thrustmaster.c:62: warning: wrong kernel-doc identifier on line: drivers/hid/hid-thrustmaster.c:84: warning: cannot understand function prototype: 'struct __packed tm_wheel_response ' drivers/hid/hid-thrustmaster.c:143: warning: wrong kernel-doc identifier on line: drivers/hid/hid-thrustmaster.c:202: warning: Function parameter or member 'urb' not described in 'thrustmaster_model_handler' drivers/hid/hid-thrustmaster.c:202: warning: expecting prototype for Called by the USB subsystem when the wheel responses to our request(). Prototype was for thrustmaster_model_handler() instead drivers/hid/hid-thrustmaster.c:265: warning: wrong kernel-doc identifier on line: Cc: Jiri Kosina Cc: Benjamin Tissoires Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: Dario Pagani Cc: Kim Kuparinen Cc: linux-input@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Signed-off-by: Benjamin Tissoires commit 263d6287da1433aba11c5b4046388f2cdf49675c Author: Alexandru Elisei Date: Wed Apr 7 15:48:57 2021 +0100 KVM: arm64: Initialize VCPU mdcr_el2 before loading it When a VCPU is created, the kvm_vcpu struct is initialized to zero in kvm_vm_ioctl_create_vcpu(). On VHE systems, the first time vcpu.arch.mdcr_el2 is loaded on hardware is in vcpu_load(), before it is set to a sensible value in kvm_arm_setup_debug() later in the run loop. The result is that KVM executes for a short time with MDCR_EL2 set to zero. This has several unintended consequences: * Setting MDCR_EL2.HPMN to 0 is constrained unpredictable according to ARM DDI 0487G.a, page D13-3820. The behavior specified by the architecture in this case is for the PE to behave as if MDCR_EL2.HPMN is set to a value less than or equal to PMCR_EL0.N, which means that an unknown number of counters are now disabled by MDCR_EL2.HPME, which is zero. * The host configuration for the other debug features controlled by MDCR_EL2 is temporarily lost. This has been harmless so far, as Linux doesn't use the other fields, but that might change in the future. Let's avoid both issues by initializing the VCPU's mdcr_el2 field in kvm_vcpu_vcpu_first_run_init(), thus making sure that the MDCR_EL2 register has a consistent value after each vcpu_load(). Fixes: d5a21bcc2995 ("KVM: arm64: Move common VHE/non-VHE trap config in separate functions") Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210407144857.199746-3-alexandru.elisei@arm.com commit feb5dc3de03711d846f0b729cb12fc05cbe49ccb Author: Alexandru Elisei Date: Wed Apr 7 15:48:56 2021 +0100 Documentation: KVM: Document KVM_GUESTDBG_USE_HW control flag for arm64 Commit 21b6f32f9471 ("KVM: arm64: guest debug, define API headers") added the arm64 KVM_GUESTDBG_USE_HW flag for the KVM_SET_GUEST_DEBUG ioctl and commit 834bf88726f0 ("KVM: arm64: enable KVM_CAP_SET_GUEST_DEBUG") documented and implemented the flag functionality. Since its introduction, at no point was the flag known by any name other than KVM_GUESTDBG_USE_HW for the arm64 architecture, so refer to it as such in the documentation. CC: Paolo Bonzini Signed-off-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210407144857.199746-2-alexandru.elisei@arm.com commit 2ce5e1b010f4a043fef7ba26b51981dd165059ae Merge: 59206cf877be3 7d2636e9d6dd8 Author: Arnd Bergmann Date: Wed Apr 7 17:39:29 2021 +0200 Merge tag 'samsung-dt64-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM64 changes for v5.13 Two cleanups in DTS without expected impact. * tag 'samsung-dt64-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: arm64: dts: exynos: white-space cleanups arm64: dts: exynos: re-order Slim SSS clocks to match dtschema Link: https://lore.kernel.org/r/20210407065828.7213-2-krzysztof.kozlowski@canonical.com Signed-off-by: Arnd Bergmann commit 59206cf877be3a93dff0ea270bb1dd14f3010799 Merge: 36de77e35f3bc 7f4ebf3e4ce10 Author: Arnd Bergmann Date: Wed Apr 7 17:38:07 2021 +0200 Merge tag 'samsung-dt-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/dt Samsung DTS ARM changes for v5.13 1. Configure battery charger and front camera on GT-I9100 phone. 2. Fix in several boards the Maxim PMIC/MUIC/fuel gauge interrupt flags to match real type of interrupt coming from the device. 3. Correct DTS with dtschema. This brings back the commit adding input clock to CMU in Exynos4412 Odroid which was reverted some time ago due to unsupported deferred probes (now supported and tested). * tag 'samsung-dt-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Add front camera support to I9100 ARM: dts: exynos: white-space cleanups ARM: dts: exynos: replace deprecated NTC/Murata compatibles ARM: dts: exynos: add input clock to CMU in Exynos4412 Odroid ARM: dts: s5pv210: correct fuel gauge interrupt trigger level on Fascinate family ARM: dts: exynos: correct PMIC interrupt trigger level on Snow ARM: dts: exynos: correct PMIC interrupt trigger level on SMDK5250 ARM: dts: exynos: correct PMIC interrupt trigger level on P4 Note family ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid X/U3 family ARM: dts: exynos: correct PMIC interrupt trigger level on Midas family ARM: dts: exynos: correct MUIC interrupt trigger level on Midas family ARM: dts: exynos: correct fuel gauge interrupt trigger level on Midas family ARM: dts: exynos: correct fuel gauge interrupt trigger level on P4 Note family ARM: dts: exynos: correct fuel gauge interrupt trigger level on GT-I9100 ARM: dts: exynos: add charger supply for I9100 Link: https://lore.kernel.org/r/20210407065828.7213-1-krzysztof.kozlowski@canonical.com Signed-off-by: Arnd Bergmann commit 36de77e35f3bc0fed0f1999f9c5731513be89a45 Merge: aa1e345ade42b ee368a10d0dfb Author: Arnd Bergmann Date: Wed Apr 7 17:34:24 2021 +0200 Merge tag 'omap-for-v5.13/dt-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree changes for omaps for v5.13 Mostly configures addtional devices for various boards, and updates the gpio line names for beagle boards so userspace can optionally find the right lines: - Use unique gpio line names for am335x-pocketbeagle - Update omap3-echo led configuration and add ath6kl node - Fix indentation for am3 tscadc node - Prepare motorola-cpcap-mapphone for power supply dtbs_check_parsing - Use unique gpio line names for am335x-boneblack.dts * tag 'omap-for-v5.13/dt-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am335x-boneblack.dts: unique gpio-line-names ARM: dts: motorola-cpcap-mapphone: Prepare for dtbs_check parsing ARM: dts: am33xx-l4: fix tscadc@0 node indentation ARM: dts: omap3-echo: Add ath6kl node ARM: dts: omap3-echo: Update LED configuration ARM: dts: am335x-pocketbeagle: unique gpio-line-names Link: https://lore.kernel.org/r/pull-1617703816-65652@atomide.com-2 Signed-off-by: Arnd Bergmann commit 300bb1fe767183a1ca1dadf691409c53c4ecff4b Author: Jianyong Wu Date: Wed Dec 9 14:09:30 2020 +0800 ptp: arm/arm64: Enable ptp_kvm for arm/arm64 Currently, there is no mechanism to keep time sync between guest and host in arm/arm64 virtualization environment. Time in guest will drift compared with host after boot up as they may both use third party time sources to correct their time respectively. The time deviation will be in order of milliseconds. But in some scenarios,like in cloud environment, we ask for higher time precision. kvm ptp clock, which chooses the host clock source as a reference clock to sync time between guest and host, has been adopted by x86 which takes the time sync order from milliseconds to nanoseconds. This patch enables kvm ptp clock for arm/arm64 and improves clock sync precision significantly. Test result comparisons between with kvm ptp clock and without it in arm/arm64 are as follows. This test derived from the result of command 'chronyc sources'. we should take more care of the last sample column which shows the offset between the local clock and the source at the last measurement. no kvm ptp in guest: MS Name/IP address Stratum Poll Reach LastRx Last sample ======================================================================== ^* dns1.synet.edu.cn 2 6 377 13 +1040us[+1581us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 21 +1040us[+1581us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 29 +1040us[+1581us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 37 +1040us[+1581us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 45 +1040us[+1581us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 53 +1040us[+1581us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 61 +1040us[+1581us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 4 -130us[ +796us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 12 -130us[ +796us] +/- 21ms ^* dns1.synet.edu.cn 2 6 377 20 -130us[ +796us] +/- 21ms in host: MS Name/IP address Stratum Poll Reach LastRx Last sample ======================================================================== ^* 120.25.115.20 2 7 377 72 -470us[ -603us] +/- 18ms ^* 120.25.115.20 2 7 377 92 -470us[ -603us] +/- 18ms ^* 120.25.115.20 2 7 377 112 -470us[ -603us] +/- 18ms ^* 120.25.115.20 2 7 377 2 +872ns[-6808ns] +/- 17ms ^* 120.25.115.20 2 7 377 22 +872ns[-6808ns] +/- 17ms ^* 120.25.115.20 2 7 377 43 +872ns[-6808ns] +/- 17ms ^* 120.25.115.20 2 7 377 63 +872ns[-6808ns] +/- 17ms ^* 120.25.115.20 2 7 377 83 +872ns[-6808ns] +/- 17ms ^* 120.25.115.20 2 7 377 103 +872ns[-6808ns] +/- 17ms ^* 120.25.115.20 2 7 377 123 +872ns[-6808ns] +/- 17ms The dns1.synet.edu.cn is the network reference clock for guest and 120.25.115.20 is the network reference clock for host. we can't get the clock error between guest and host directly, but a roughly estimated value will be in order of hundreds of us to ms. with kvm ptp in guest: chrony has been disabled in host to remove the disturb by network clock. MS Name/IP address Stratum Poll Reach LastRx Last sample ======================================================================== * PHC0 0 3 377 8 -7ns[ +1ns] +/- 3ns * PHC0 0 3 377 8 +1ns[ +16ns] +/- 3ns * PHC0 0 3 377 6 -4ns[ -0ns] +/- 6ns * PHC0 0 3 377 6 -8ns[ -12ns] +/- 5ns * PHC0 0 3 377 5 +2ns[ +4ns] +/- 4ns * PHC0 0 3 377 13 +2ns[ +4ns] +/- 4ns * PHC0 0 3 377 12 -4ns[ -6ns] +/- 4ns * PHC0 0 3 377 11 -8ns[ -11ns] +/- 6ns * PHC0 0 3 377 10 -14ns[ -20ns] +/- 4ns * PHC0 0 3 377 8 +4ns[ +5ns] +/- 4ns The PHC0 is the ptp clock which choose the host clock as its source clock. So we can see that the clock difference between host and guest is in order of ns. Cc: Mark Rutland Acked-by: Richard Cochran Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-8-jianyong.wu@arm.com commit 3bf725699bf62494b3e179f1795f08c7d749f061 Author: Jianyong Wu Date: Wed Dec 9 14:09:29 2020 +0800 KVM: arm64: Add support for the KVM PTP service Implement the hypervisor side of the KVM PTP interface. The service offers wall time and cycle count from host to guest. The caller must specify whether they want the host's view of either the virtual or physical counter. Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-7-jianyong.wu@arm.com commit 100148d0fc7dcf8672fe0ac83f44dc5749b4da5c Author: Jianyong Wu Date: Wed Dec 9 14:09:28 2020 +0800 clocksource: Add clocksource id for arm arch counter Add clocksource id to the ARM generic counter so that it can be easily identified from callers such as ptp_kvm. Cc: Mark Rutland Reviewed-by: Andre Przywara Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-6-jianyong.wu@arm.com commit b2c67cbe9f447312f5cdd7c6641b463f2349aec0 Author: Thomas Gleixner Date: Wed Dec 9 14:09:27 2020 +0800 time: Add mechanism to recognize clocksource in time_get_snapshot System time snapshots are not conveying information about the current clocksource which was used, but callers like the PTP KVM guest implementation have the requirement to evaluate the clocksource type to select the appropriate mechanism. Introduce a clocksource id field in struct clocksource which is by default set to CSID_GENERIC (0). Clocksource implementations can set that field to a value which allows to identify the clocksource. Store the clocksource id of the current clocksource in the system_time_snapshot so callers can evaluate which clocksource was used to take the snapshot and act accordingly. Signed-off-by: Thomas Gleixner Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-5-jianyong.wu@arm.com commit a8cf291bdac5d415eadb55e79df1fca8c3f0dfef Author: Jianyong Wu Date: Wed Dec 9 14:09:26 2020 +0800 ptp: Reorganize ptp_kvm.c to make it arch-independent Currently, the ptp_kvm module contains a lot of x86-specific code. Let's move this code into a new arch-specific file in the same directory, and rename the arch-independent file to ptp_kvm_common.c. Acked-by: Richard Cochran Reviewed-by: Andre Przywara Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-4-jianyong.wu@arm.com commit aa1e345ade42ba90ab868750acab27a360998af1 Merge: 4b8cf90637f29 727d93ed3ba67 Author: Arnd Bergmann Date: Wed Apr 7 17:32:20 2021 +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.13 - new boards: MeCool KII & KIII, Minix NEO U9-H - used fixed index for MMC devices * tag 'amlogic-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic: arm64: dts: meson: add initial device-tree for MeCool KIII Pro arm64: dts: meson: add initial device-tree for MeCool KII Pro dt-bindings: arm: amlogic: add MeCool KII/KIII Pro bindings arm64: dts: amlogic: Assign a fixed index to mmc devices arm64: dts: meson: add initial device-tree for Minix NEO U9-H dt-bindings: arm: amlogic: add support for the Minix NEO U9-H Link: https://lore.kernel.org/r/7h5z10mjpp.fsf@baylibre.com Signed-off-by: Arnd Bergmann commit 4b8cf90637f295ff1cb1f4bdfde134dab1196296 Merge: a3c1086c17e44 112e5934ff3a7 Author: Arnd Bergmann Date: Wed Apr 7 17:28:11 2021 +0200 Merge tag 'ti-k3-dt-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux into arm/dt Devicetree changes for TI K3 platforms for v5.13 merge window: * New SoCs: - AM642 mean for industrial control, motor control, remote IO, IoT gateway etc. * New Boards: - AM65: Siemens SIMATIC IOT2050 advanced and basic boards - AM64: EVM and SK boards * New peripherals: - AM65: watchdog - AM65,J721E: ICSSG - J7200: OSPI, GPIO * Fixes: - AM65: pcie node fixup, ospi speed updates - J721e, J7200: MMC speed updates, ospi speed updates and compatibles fixups. * tag 'ti-k3-dt-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nmenon/linux: (39 commits) arm64: dts: ti: k3-am64-main: Fix ospi compatible arm64: dts: ti: k3-j7200-mcu: Fix ospi compatible arm64: dts: ti: k3-j721e-mcu: Fix ospi compatible arm64: dts: ti: k3-j7200: Add support for higher speed modes and update delay select values for MMCSD subsystems arm64: dts: ti: k3-j7200-common-proc-board: Disable unused gpio modules arm64: dts: ti: k3-j7200: Add gpio nodes arm64: dts: ti: k3-am642-evm/sk: Add IPC sub-mailbox nodes arm64: dts: ti: k3-am64-main: Add mailbox cluster nodes arm64: dts: ti: k3-am64-main: Add hwspinlock node arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage arm64: dts: ti: k3-am64: Add GPIO DT nodes arm64: dts: ti: k3-am64-evm/sk: Add OSPI flash DT node arm64: dts: ti: k3-am64-main: Add OSPI node arm64: dts: ti: k3-am64-main: Add ADC nodes arm64: dts: ti: k3-am642-evm: Add USB support arm64: dts: ti: k3-am64-main: Add DT node for USB subsystem arm64: dts: ti: Add support for Siemens IOT2050 boards dt-bindings: arm: ti: Add bindings for Siemens IOT2050 boards dt-bindings: Add Siemens vendor prefix arm64: dts: ti: k3-am642-evm: Add support for SPI EEPROM ... Link: https://lore.kernel.org/r/20210405155336.smohb7uzkperqwuz@reflex Signed-off-by: Arnd Bergmann commit 88d8cb7b5f2177dfec9f12377762534dd7c64005 Author: Johan Hovold Date: Wed Apr 7 12:23:34 2021 +0200 tty: synclink_gt: drop redundant tty-port initialisation The port close_delay and closing_wait parameters have already been by tty_port_init() so drop the redundant driver initialisation to the default values. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-17-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit a5c67f89300435f0fae222fef897a8e337c52927 Author: Johan Hovold Date: Wed Apr 7 12:23:33 2021 +0200 pcmcia: synclink_cs: drop redundant tty-port initialisation The port close_delay and closing_wait parameters have already been by tty_port_init() so drop the redundant driver initialisation to the default values. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-16-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit b91cfb2573aeb5ab426fc3c35bcfe9e0d2a7ecbc Author: Johan Hovold Date: Wed Apr 7 12:23:32 2021 +0200 tty: mxser: fix TIOCSSERIAL permission check Changing the port type and closing_wait parameter are privileged operations so make sure to return -EPERM if a regular user tries to change them. Note that the closing_wait parameter would not actually have been changed but the return value did not indicate that. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-15-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit be6cf583d24dfe87324dd2830d90fc056e0a6648 Author: Johan Hovold Date: Wed Apr 7 12:23:31 2021 +0200 tty: mxser: fix TIOCSSERIAL jiffies conversions The port close_delay and closing wait parameters set by TIOCSSERIAL are specified in jiffies, while the values returned by TIOCGSERIAL are specified in centiseconds. Add the missing conversions so that TIOCSSERIAL works as expected also when HZ is not 100. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-14-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit bf510acbea476b7cc19419c0830b0367e7ec3a57 Author: Johan Hovold Date: Wed Apr 7 12:23:30 2021 +0200 tty: moxa: fix TIOCSSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. A non-privileged user has only ever been able to set the since long deprecated ASYNC_SPD flags and trying to change any other *supported* feature should result in -EPERM being returned. Setting the current values for any supported features should return success. Fix the moxa implementation which was returning -EPERM also for a privileged user when trying to change certain unsupported parameters and instead return success consistently. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-13-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit dc8c8437658667be9b11ec25c4b5482ed2becdaa Author: Johan Hovold Date: Wed Apr 7 12:23:29 2021 +0200 tty: moxa: fix TIOCSSERIAL permission check Changing the port close delay or type are privileged operations so make sure to return -EPERM if a regular user tries to change them. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-12-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6e70b73ca5240c0059a1fbf8ccd4276d6cf71956 Author: Johan Hovold Date: Wed Apr 7 12:23:28 2021 +0200 tty: moxa: fix TIOCSSERIAL jiffies conversions The port close_delay parameter set by TIOCSSERIAL is specified in jiffies, while the value returned by TIOCGSERIAL is specified in centiseconds. Add the missing conversions so that TIOCGSERIAL works as expected also when HZ is not 100. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-11-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit c33a63e8dd915823e47a330f90f5a7ccf006f2ab Author: Johan Hovold Date: Wed Apr 7 12:23:27 2021 +0200 tty: amiserial: add missing TIOCSSERIAL jiffies conversions The tty-port close_delay and closing_wait parameters set by TIOCSSERIAL are specified in jiffies, while the values returned by TIOCGSERIAL are specified in centiseconds. Add the missing conversions so that TIOCSSERIAL works as expected also if this code is ever reused on a system where HZ is not 100. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-10-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 1d31a831cc04f5f942de3e7d91edaa52310d3c99 Author: Johan Hovold Date: Wed Apr 7 12:23:26 2021 +0200 tty: amiserial: fix TIOCSSERIAL permission check Changing the port closing_wait parameter is a privileged operation. Add the missing check to TIOCSSERIAL so that -EPERM is returned in case an unprivileged user tries to change the closing-wait setting. Cc: stable@vger.kernel.org Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-9-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit d38be702452137fa82a56ff7cc577d829add1637 Author: Johan Hovold Date: Wed Apr 7 12:23:25 2021 +0200 staging: greybus: uart: clean up TIOCGSERIAL TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Similarly, baud_base could be used to set the UART base clock when it could not be detected but might as well be left unset when it is not known. The type parameter could be used to set the UART type, but is better left unspecified (type unknown) when it isn't used. Note that some applications have historically expected TIOCGSERIAL to be implemented, but judging from the Debian sources, the port type not being PORT_UNKNOWN is only used to check for the existence of legacy serial ports (ttySn). Notably USB serial drivers like ftdi_sio have been using PORT_UNKNOWN for twenty years without any problems. Drop the bogus values provided by the greybus implementation. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-8-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 60c6b305c11b5fd167ce5e2ce42f3a9098c388f0 Author: Johan Hovold Date: Wed Apr 7 12:23:24 2021 +0200 staging: greybus: uart: fix unprivileged TIOCCSERIAL TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. A non-privileged user has only ever been able to set the since long deprecated ASYNC_SPD flags and trying to change any other *supported* feature should result in -EPERM being returned. Setting the current values for any supported features should return success. Fix the greybus implementation which instead indicated that the TIOCSSERIAL ioctl was not even implemented when a non-privileged user set the current values. Fixes: e68453ed28c5 ("greybus: uart-gb: now builds, more framework added") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-7-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit b71e571adaa58be4fd289abebc8997e05b4c6b40 Author: Johan Hovold Date: Wed Apr 7 12:23:23 2021 +0200 staging: greybus: uart: fix TIOCSSERIAL jiffies conversions The port close_delay and closing_wait parameters set by TIOCSSERIAL are specified in jiffies and not milliseconds. Add the missing conversions so that TIOCSSERIAL works as expected also when HZ is not 1000. Fixes: e68453ed28c5 ("greybus: uart-gb: now builds, more framework added") Cc: stable@vger.kernel.org # 4.9 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-6-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 5e84a66f3682af4f177bb24bb2ad5135c51f764a Author: Johan Hovold Date: Wed Apr 7 12:23:22 2021 +0200 staging: fwserial: fix TIOCGSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. The xmit_fifo_size parameter could be used to set the hardware transmit fifo size of a legacy UART when it could not be detected, but the interface is limited to eight bits and should be left unset when not used. Fix the fwserial implementation by dropping its custom interpretation of the unused xmit_fifo_size field, which was overflowed with the driver FIFO size. Also leave the type and flags fields unset as these cannot be changed. The close_delay and closing_wait parameters returned by TIOCGSERIAL are specified in centiseconds. The driver does not yet support changing closing_wait, but let's report back the default value actually used (30 seconds). Fixes: 7355ba3445f2 ("staging: fwserial: Add TTY-over-Firewire serial driver") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-5-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit a7eaaa9d1032e68669bb479496087ba8fc155ab6 Author: Johan Hovold Date: Wed Apr 7 12:23:21 2021 +0200 staging: fwserial: fix TIOCSSERIAL implementation TIOCSSERIAL is a horrid, underspecified, legacy interface which for most serial devices is only useful for setting the close_delay and closing_wait parameters. A non-privileged user has only ever been able to set the since long deprecated ASYNC_SPD flags and trying to change any other *supported* feature should result in -EPERM being returned. Setting the current values for any supported features should return success. Fix the fwserial implementation which was returning -EPERM also for a privileged user when trying to change certain unsupported parameters, and instead return success consistently. Fixes: 7355ba3445f2 ("staging: fwserial: Add TTY-over-Firewire serial driver") Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-4-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 2104eb283df66a482b60254299acbe3c68c03412 Author: Johan Hovold Date: Wed Apr 7 12:23:20 2021 +0200 staging: fwserial: fix TIOCSSERIAL permission check Changing the port close-delay parameter is a privileged operation so make sure to return -EPERM if a regular user tries to change it. Fixes: 7355ba3445f2 ("staging: fwserial: Add TTY-over-Firewire serial driver") Cc: stable@vger.kernel.org # 3.8 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-3-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7a3791afdbd5a951b09a7689bba856bd9f6c6a9f Author: Johan Hovold Date: Wed Apr 7 12:23:19 2021 +0200 staging: fwserial: fix TIOCSSERIAL jiffies conversions The port close_delay parameter set by TIOCSSERIAL is specified in jiffies, while the value returned by TIOCGSERIAL is specified in centiseconds. Add the missing conversions so that TIOCGSERIAL works as expected also when HZ is not 100. Fixes: 7355ba3445f2 ("staging: fwserial: Add TTY-over-Firewire serial driver") Cc: stable@vger.kernel.org # 3.8 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210407102334.32361-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 399d44a1b13d6e83a01fa249fc12e1b69ae8e735 Author: Guobin Huang Date: Tue Apr 6 19:56:03 2021 +0800 tty: n_gsm: use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Reviewed-by: Jiri Slaby Signed-off-by: Guobin Huang Link: https://lore.kernel.org/r/1617710163-48158-1-git-send-email-huangguobin4@huawei.com Signed-off-by: Greg Kroah-Hartman commit f9b9263a25dc3d2eaaa829e207434db6951ca7bc Author: Colin Ian King Date: Wed Apr 7 16:03:08 2021 +0100 staging: rtl8192u: Fix potential infinite loop The for-loop iterates with a u8 loop counter i and compares this with the loop upper limit of riv->ieee80211->LinkDetectInfo.SlotNum that is a u16 type. There is a potential infinite loop if SlotNum is larger than the u8 loop counter. Fix this by making the loop counter the same type as SlotNum. Addresses-Coverity: ("Infinite loop") Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210407150308.496623-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit a45759d2a47c0044e063ba246a47326ad2db4a10 Author: Fabio Aiuto Date: Wed Apr 7 15:49:43 2021 +0200 staging: rtl8723bs: remove unnecessary parentheses fix following post-commit checkpatch issue: CHECK: Unnecessary parentheses around 'padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X' 84: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335: + if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && + !(padapter->securitypriv.binstallGrpkey)) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a45ec5059ea315db6509989f320340c1816068c5.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit af6afdb63f17ebb4ec44def106d5c6c032c6e15d Author: Fabio Aiuto Date: Wed Apr 7 15:49:42 2021 +0200 staging: rtl8723bs: split long lines fix following post-commit checkpatch hooks: WARNING: line length of 110 exceeds 100 columns 266: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:623: + pmlmepriv->cur_network.join_res) || check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) -- WARNING: line length of 102 exceeds 100 columns 468: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5234: + if (tx_chk != _SUCCESS && pmlmeinfo->link_count++ == link_count_limit) -- WARNING: line length of 124 exceeds 100 columns 543: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:335: + if ((padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && !(padapter->securitypriv.binstallGrpkey)) -- WARNING: line length of 112 exceeds 100 columns 828: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1061: + if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_TX_STBC(pIE->data)) -- WARNING: line length of 113 exceeds 100 columns 836: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1067: + if (TEST_FLAG(phtpriv->ldpc_cap, LDPC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_LDPC_CAP(pIE->data)) -- WARNING: line length of 112 exceeds 100 columns 844: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1073: + if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_TX) && GET_HT_CAPABILITY_ELE_RX_STBC(pIE->data)) -- WARNING: line length of 125 exceeds 100 columns 883: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1282: + rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, WLAN_EID_HT_OPERATION, &len, bssid->IELength - _FIXED_IE_LENGTH_); -- WARNING: line length of 101 exceeds 100 columns 904: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1305: + if (bssid->Ssid.Ssid[0] != '\0' && bssid->Ssid.SsidLength != 0) /* not hidden ssid */ -- WARNING: line length of 129 exceeds 100 columns 953: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1345: + if (pairwise_cipher != cur_network->BcnInfo.pairwise_cipher || group_cipher != cur_network->BcnInfo.group_cipher) -- WARNING: line length of 113 exceeds 100 columns 1712: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2651: Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/814139162ef516bb07bb50876578b032573271ac.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e338f5f0a0c3e4f8d7c5c4669ca9928ae6e5ddb9 Author: Fabio Aiuto Date: Wed Apr 7 15:49:41 2021 +0200 staging: rtl8723bs: fix comparison in if condition fix following post-commit checkpatch issue: WARNING: Comparisons should place the constant on the right side of the test 1833: FILE: drivers/staging/rtl8723bs/os_dep/mlme_linux.c:151: + if (NULL == buff) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b32610045cad3c385b236266d7a10665ed202150.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit dd782523e8a51f65f9e76f5aeb98ea8269ef2cb3 Author: Fabio Aiuto Date: Wed Apr 7 15:49:40 2021 +0200 staging: rtl8723bs: remove unnecessary parentheses fix following post-commit checkpatch issue: CHECK: Unnecessary parentheses around 'prxattrib->bdecrypted' 125: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:365: + if ((prxattrib->bdecrypted) && (brpt_micerror)) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1453eec49833fc940e134fc14bc65d218ace0663.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e427bdd8e1e54a7eaa00a467dd32cbf737e75382 Author: Fabio Aiuto Date: Wed Apr 7 15:49:39 2021 +0200 staging: rtl8723bs: rewrite comparison to null fi following post-commit checkpatch issues: CHECK: Comparison to NULL could be written "!p" 290: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:978: + if (p == NULL) -- CHECK: Comparison to NULL could be written "!pmgntframe" 328: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2016: + if (pmgntframe == NULL) -- CHECK: Comparison to NULL could be written "!pmgntframe" 361: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2378: + if (pmgntframe == NULL) -- CHECK: Comparison to NULL could be written "!pmgntframe" 391: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3478: + if (pmgntframe == NULL) -- CHECK: Comparison to NULL could be written "!p" 427: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4071: + if (p == NULL) -- CHECK: Comparison to NULL could be written "!BIP_AAD" 781: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1690: + if (BIP_AAD == NULL) -- CHECK: Comparison to NULL could be written "!pwep" 1773: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3062: + if (pwep == NULL) -- CHECK: Comparison to NULL could be written "!pmlmepriv->wps_beacon_ie" 1784: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3510: + if (pmlmepriv->wps_beacon_ie == NULL) -- CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_resp_ie" 1795: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3544: + if (pmlmepriv->wps_probe_resp_ie == NULL) -- CHECK: Comparison to NULL could be written "!pmlmepriv->wps_assoc_resp_ie" 1807: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3574: + if (pmlmepriv->wps_assoc_resp_ie == NULL) -- CHECK: Comparison to NULL could be written "!pbuf" 1818: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3928: + if (pbuf == NULL) -- CHECK: Comparison to NULL could be written "!if1" 1944: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:392: + if (if1 == NULL) CHECK: Using comparison to false is error prone 402: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3890: + if (false == bxmitok) -- CHECK: Using comparison to true is error prone 671: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:365: + if ((prxattrib->bdecrypted == true) && (brpt_micerror == true)) -- CHECK: Using comparison to true is error prone 1051: FILE: drivers/staging/rtl8723bs/core/rtw_xmit.c:1174: + if (padapter->securitypriv.binstallBIPkey != true) -- CHECK: Using comparison to false is error prone 1632: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2194: + if (false == bMatched) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/572f96dcb6217fd3e6ea23c37b55b0ebb3231f14.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e6e7ad69d38dbcf4c89fb44069508eb1286f3a2c Author: Fabio Aiuto Date: Wed Apr 7 15:49:38 2021 +0200 staging: rtl8723bs: add spaces around operators fix the following post-commit checkpatch issues: CHECK: spaces preferred around that '|' (ctx:VxV) 187: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1659: + if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) -- CHECK: spaces preferred around that '|' (ctx:VxV) 373: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3023: + == (sta_bssrate[j]|IEEE80211_BASIC_RATE_MASK)) -- CHECK: spaces preferred around that '-' (ctx:VxV) 456: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4098: + if (len > (NDIS_802_11_LENGTH_RATES_EX-i)) -- CHECK: spaces preferred around that '+' (ctx:VxV) 770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590: + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) -- CHECK: spaces preferred around that '+' (ctx:VxV) 770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590: + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) -- CHECK: spaces preferred around that '-' (ctx:VxV) 770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590: + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) -- CHECK: spaces preferred around that '+' (ctx:VxV) 770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590: + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) -- CHECK: spaces preferred around that '+' (ctx:VxV) 770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590: + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) -- CHECK: spaces preferred around that '+' (ctx:VxV) 770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590: + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) -- CHECK: spaces preferred around that '-' (ctx:VxV) 770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590: + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) -- CHECK: spaces preferred around that '+' (ctx:VxV) 770: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:1590: + if (pframe[hdrlen+8+plen-8+i] != message[hdrlen+8+plen-8+i]) -- CHECK: spaces preferred around that '-' (ctx:VxV) 1001: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1849: + if (i > (NUM_STA-1)) -- CHECK: spaces preferred around that '&' (ctx:VxV) 1647: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:211: + if (mcs_rate&0x8000) /* MCS15 */ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/28885311d4351d4df4508a50765a9b92a2b8da77.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6206fdb4f30ba197ac215d303df555b446005802 Author: Fabio Aiuto Date: Wed Apr 7 15:49:37 2021 +0200 staging: rtl8723bs: remove unnecessary parentheses in if condition fix following post-commit hook checkpatch issue: CHECK: Unnecessary parentheses around pcmdpriv->cmd_queue.queue 85: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:422: + if (list_empty(&(pcmdpriv->cmd_queue.queue))) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3f5cf6b7b9aa5a0fa09b71278fdc361e9f113c41.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 709c8e49b51c3702417941ac5f45ae12e4e405ce Author: Fabio Aiuto Date: Wed Apr 7 15:49:36 2021 +0200 staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites remove unnecessary bracks on DBG_871X removal sites Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/35f5edf0f39b717b3de3ad7861cbaa5f4ba60576.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b4f27a06f6382b9d6f9f5cd8a6445b0af001a2a6 Author: Fabio Aiuto Date: Wed Apr 7 15:49:35 2021 +0200 staging: rtl8723bs: remove empty #ifdef blocks after DBG_871X removal remove #ifdef and blocks #if defined() blocks left empty after DBG_871X removal. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4e19eb1c71bc1d43d30c1b0a04851ab7ce528f36.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae31f4ed7e09fe2f8b01ce32091a57678849e2f8 Author: Fabio Aiuto Date: Wed Apr 7 15:49:34 2021 +0200 staging: rtl8723bs: remove empty tracing function dump_rx_packet remove tracing function dump_rx_packet after DBG_871X removal. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/281afbaecdb9614c91e648b3a6fc2738a176e57a.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3f85c670a264ef485edff65bb9fafc16c78e044a Author: Fabio Aiuto Date: Wed Apr 7 15:49:33 2021 +0200 staging: rtl8723bs: remove empty for cycles left by DBG_871X removal remove empty for cycles and unused counter variables to suppress compiler warnings. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/fe758f88ef6d6eaad9762d16d78dcfa876fcf654.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3dc682aed3a188d32eaa7e8a283b7295ea18fd8f Author: Fabio Aiuto Date: Wed Apr 7 15:49:32 2021 +0200 staging: rtl8723bs: put constant on the right side in if condition fix the following post-commit hook checkpatch warning: WARNING: Comparisons should place the constant on the right side of the test 683: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2204: + if (_SUCCESS != rtw_set_chplan_cmd(padapter, channel_plan_req, 1, 1)) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/41c98d13d5c74b1329ae125f097b780745cf8246.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 394ceaa2b3b27f67f143477086642087155a11b3 Author: Fabio Aiuto Date: Wed Apr 7 15:49:31 2021 +0200 drivers: rtl8723bs: rewrite comparison to null fix following post-commit hook checkpatch warnings: CHECK: Comparison to NULL could be written "!psta" 97: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:2115: + if (psta == NULL) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0c6d53c851d1b07eb0183108e0bad7b4f273f04b.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 21e161c3cea5ab3265b540ccb5c4671940306831 Author: Fabio Aiuto Date: Wed Apr 7 15:49:30 2021 +0200 staging: rtl8723bs: remove all if-else empty blocks left by DBG_871X removal remove all if-else empty {} blocks left by spatch application. removed unused variables and an unused static function definition after if-else blocks removal, to suppress compiler warnings. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/56055b20bc064d7ac1e8f14bd1ed42aba6b02c36.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5789f77492842878f63592a2066b7040d1ac0829 Author: Fabio Aiuto Date: Wed Apr 7 15:49:29 2021 +0200 staging: rtl8723bs: remove DBG_871X macro definitions remove DBG_781X macro definitions. Remove all of the DBG_871X logs as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/53632cddb1da639c84fa52c2818904b0e1298a6e.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 68e79909e1d84251ae1889cbad45672f5ba85d7e Author: Fabio Aiuto Date: Wed Apr 7 15:49:28 2021 +0200 staging: rtl8723bs: remove commented out DBG_871X logs remove all commented out DBG_871X logs unmatched by semantic patch. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/125e216e3bb5bc938e06b15dadfbbf51d9517dde.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4646da162d96214b614d73d964624be265895ccd Author: Fabio Aiuto Date: Wed Apr 7 15:49:27 2021 +0200 staging: rtl8723bs: remove DBG_871CX log unmatched by cocci Remove a DBG_871X log untouched by cocci, maybe due to the presence of a trailing \, for it is inside a macro definition. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/740bf0eeef550de36e772bdf7d051499627773e5.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 968b15adb0eaf988320da743524652fb3ce3dec4 Author: Fabio Aiuto Date: Wed Apr 7 15:49:26 2021 +0200 staging: rtl8723bs: remove all DBG_871X logs Remove all of the DBG_871X logs as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused. applied the following semantic patch script: @@ expression a, b, c, d, e, f, g, h, i, j, k; constant B, C, D, E; @@ ( - DBG_871X(a); | - DBG_871X(a, b); | - DBG_871X(a, B); | - DBG_871X(a, b, c); | - DBG_871X(a, B, c); | - DBG_871X(a, b, C); | - DBG_871X(a, B, C); | - DBG_871X(a, b, c, d); | - DBG_871X(a, B, c, d); | - DBG_871X(a, b, C, d); | - DBG_871X(a, b, c, D); | - DBG_871X(a, B, C, d); | - DBG_871X(a, B, c, D); | - DBG_871X(a, b, C, D); | - DBG_871X(a, B, C, D); | - DBG_871X(a, b, c, d, e); | - DBG_871X(a, B, c, d, e); | - DBG_871X(a, b, C, d, e); | - DBG_871X(a, b, c, D, e); | - DBG_871X(a, b, c, d, E); | - DBG_871X(a, B, C, d, e); | - DBG_871X(a, B, c, D, e); | - DBG_871X(a, B, c, d, E); | - DBG_871X(a, b, C, D, e); | - DBG_871X(a, b, C, d, E); | - DBG_871X(a, b, c, D, E); | - DBG_871X(a, B, C, D, e); | - DBG_871X(a, B, C, d, E); | - DBG_871X(a, B, c, D, E); | - DBG_871X(a, b, C, D, E); | - DBG_871X(a, B, C, D, E); | - DBG_871X(a, b, c, d, e, f); | - DBG_871X(a, b, c, d, e, f, g); | - DBG_871X(a, b, c, d, e, f, g, h); | - DBG_871X(a, b, c, d, e, f, g, h, i); | - DBG_871X(a, b, c, d, e, f, g, h, i, j); | - DBG_871X(a, b, c, d, e, f, g, h, i, j, k); ) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/89a39f551107ba73b44dd2422765cf8ce371501a.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 42c3243ff23d119331a8ace011e0c18b222a1138 Author: Fabio Aiuto Date: Wed Apr 7 15:49:25 2021 +0200 staging: rtl8723bs: remove DBG_871X log argument This patch prepares the application of the semantic patch aimed to remove all DBG_871X logs. One occurrence of the DBG_871X macro has one repeated argument, that's not even comma separated value with the previous one nor a format string parameter associated. In normal conditions this worked, for the macro is usually not expanded (the do nothing behaviour), but if I try to apply the sempantic patch to remove all macro occurrences, all macros call after that abnormal declaration are left untouched (not removed). Remove all of the DBG_871X logs as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3473925ae9ee5a3bcd0ab86613dbce80b6d3f33f.1617802415.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 07a696a886463a4bb098d8a90ca54356cb270c46 Author: Ian Abbott Date: Wed Apr 7 15:01:42 2021 +0100 staging: comedi: tests: Correct unittest_fptr The definition of the `unittest_fptr` function pointer type has the wrong function return type `void *` instead of `void`. The problem is hidden by a bunch of unnecessary type-casts. Fix the type definition and remove the type-casts. Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407140142.447250-6-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 228e55617c17e70a441b070eca457bf88ad3da96 Author: Ian Abbott Date: Wed Apr 7 15:01:41 2021 +0100 staging: comedi: tests: ni_routes_test: Lines should not end with a '(' Fix checkpatch.pl issues such as the following: CHECK: Lines should not end with a '(' + unittest( Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407140142.447250-5-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 2628ca5f8e5ef0ad21565c3895eb8cfa1acc59bc Author: Ian Abbott Date: Wed Apr 7 15:01:40 2021 +0100 staging: comedi: tests: ni_routes_test: Avoid CamelCase: Rename the `RVi` macro to `RVI` to avoid this checkpatch.pl issue: CHECK: #27: FILE: drivers/staging/comedi/drivers/tests/ni_routes_test.c:27: +#define RVi(table, src, dest) ((table)[(dest) * NI_NUM_NAMES + (src)]) Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407140142.447250-4-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 15b7a743901c9917d4357224a468554d4f848dac Author: Ian Abbott Date: Wed Apr 7 15:01:39 2021 +0100 staging: comedi: tests: ni_routes_test: Put complex values in parentheses Fix checkpatch.pl errors such as: ERROR: Macros with complex values should be enclosed in parentheses +#define I1(x1) \ + (int[]){ \ + x1, 0 \ + } Also, wrap that `x1` in parentheses. Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407140142.447250-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 6db58ed2b2d9bb1792eace4f9aa70e8bdd730ffc Author: Ian Abbott Date: Wed Apr 7 15:01:38 2021 +0100 staging: comedi: tests: ni_routes_test: Fix compilation error The `ni_routes_test` module is not currently selectable using the Kconfig files, but can be built by specifying `CONFIG_COMEDI_TESTS=m` on the "make" command line. It currently fails to compile due to an extra parameter added to the `ni_assign_device_routes` function by commit e3b7ce73c578 ("staging: comedi: ni_routes: Allow alternate board name for routes"). Fix it by supplying the value `NULL` for the added `alt_board_name` parameter (which specifies that there is no alternate board name). Fixes: e3b7ce73c578 ("staging: comedi: ni_routes: Allow alternate board name for routes") Cc: Spencer E. Olson Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210407140142.447250-2-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 204e4f4433c2ea941630254e3622f8a41e0ca42f Author: Colin Ian King Date: Wed Apr 7 12:13:01 2021 +0100 staging: comedi: drivers: Fix spelling mistake "nubmer" -> "number" There is a spelling mistake in a comment. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210407111301.486853-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit bfe1e634909e4e55e874ee84220fa5669099e450 Author: Fabio M. De Francesco Date: Wed Apr 7 12:04:10 2021 +0200 staging: rtl8723bs: hal: Remove camelcase Remove camelcase. Issue detected by checkpatch.pl. The symbols aren't used in other files, so this change doesn't break the driver's code. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210407100410.8058-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit fbb0ad422960cc2199c31d33f1095a39dfee5cfa Merge: 39b53e23532f5 cbc336c09b6d6 Author: Greg Kroah-Hartman Date: Wed Apr 7 16:52:40 2021 +0200 Merge tag 'phy-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy into char-misc-next Vinod writes: phy-for-5.13 - Updates: - Yaml conversion for mvebu-utmi binding, bcm-ns-usb2 and bcm-ns-usb3 bindings - Mediatek dsi and hdmi phy updates - TI j721e-wiz updates for AM64 - Cadence-torrent phy updates for SGMII/QSGMII - New support: - usb3-dp phy for Qualcomm SM8250 - UTMI phy for Armada CP110 - USB phy for Qualcomm SC7280 - Binding and driver for Sparx5 ethernet serdes * tag 'phy-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy: (75 commits) phy: fix resource_size.cocci warnings phy: Sparx5 Eth SerDes: Use direct register operations phy: hisilicon: Use the correct HiSilicon copyright phy: marvell: phy-mvebu-cp11i-utmi needs USB_COMMON phy: qcom-qmp: add support for sm8250-usb3-dp phy phy: qcom-qmp: rename common registers phy: qcom-qmp: move DP functions to callbacks dt-bindings: phy: qcom,qmp-usb3-dp: Add support for SM8250 dt-bindings: phy: qcom,qmp-usb3-dp-phy: move usb3 compatibles back to qcom,qmp-phy.yaml phy: ti: j721e-wiz: Configure 'p_standard_mode' only for DP/QSGMII dt-bindings: phy: fix dt_binding_check warning in mediatek, ufs-phy.yaml phy: zynqmp: Handle the clock enable/disable properly dt-bindings: phy: bcm-ns-usb3-phy: convert to yaml dt-bindings: phy: bcm-ns-usb2-phy: convert to yaml phy: microchip: PHY_SPARX5_SERDES should depend on ARCH_SPARX5 phy: cadence-torrent: Add delay for PIPE clock to be stable phy: cadence-torrent: Explicitly request exclusive reset control phy: cadence-torrent: Do not configure SERDES if it's already configured phy: cadence-torrent: Group reset APIs and clock APIs phy: ti: j721e-wiz: Do not configure wiz if its already configured ... commit 39b53e23532f5da13757d88eeb1290da864bfdf4 Merge: 177260a705a9c 14968dd36a507 Author: Greg Kroah-Hartman Date: Wed Apr 7 16:51:17 2021 +0200 Merge tag 'soundwire-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into char-misc-next Vinod writes: soundwire updates for 5.13-rc1 Updates for v5.13-rc1 are: Core: - Ability to add quirks for masters - static checker cleanup for bus code Drivers: - DMI quirks for Intel controllers - static checker cleanup for drivers - add auto enumeration support qcom controller * tag 'soundwire-5.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: (45 commits) soundwire: intel_init: test link->cdns soundwire: qcom: handle return correctly in qcom_swrm_transport_params soundwire: qcom: cleanup internal port config indexing soundwire: qcom: wait for fifo space to be available before read/write soundwire: qcom: add static port map support soundwire: qcom: update port map allocation bit mask soundwire: add static port mapping support soundwire: stream: fix memory leak in stream config error path soundwire: qcom: use signed variable for error return soundwire: qcom: wait for enumeration to be complete in probe soundwire: qcom: add auto enumeration support soundwire: export sdw_compare_devid, sdw_extract_slave_id and sdw_slave_add soundwire: qcom: add support to new interrupts soundwire: qcom: update register read/write routine soundwire: qcom: start the clock during initialization soundwire: qcom: set continue execution flag for ignored commands soundwire: qcom: add support to missing transport params dt-bindings: soundwire: qcom: clarify data port bus parameters soundwire: cadence: only prepare attached devices on clock stop soundwire: generic_allocation: fix confusion between group and packing ... commit 4cffb2df4260ed38c7ae4105f6913ad2d71a16ec Author: Eric Auger Date: Wed Apr 7 15:59:37 2021 +0200 KVM: selftests: vgic_init kvm selftests fixup Bring some improvements/rationalization over the first version of the vgic_init selftests: - ucall_init is moved in run_cpu() - vcpu_args_set is not called as not needed - whenever a helper is supposed to succeed, call the non "_" version - helpers do not return -errno, instead errno is checked by the caller - vm_gic struct is used whenever possible, as well as vm_gic_destroy - _kvm_create_device takes an addition fd parameter Signed-off-by: Eric Auger Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210407135937.533141-1-eric.auger@redhat.com commit 7cba4128c2c6e9c67a819c5946ed8066c7306418 Author: Thomas Bogendoerfer Date: Wed Apr 7 01:03:48 2021 +0200 MIPS: Fix new sparse warnings Commit 45deb5faeb9e ("MIPS: uaccess: Remove get_fs/set_fs call sites") caused a few new sparse warnings, fix them. Signed-off-by: Thomas Bogendoerfer commit 10ba2d17d2972926c60e01dace6d7a3f8d968c4f Author: Gavin Shan Date: Tue Mar 16 12:11:26 2021 +0800 KVM: arm64: Don't retrieve memory slot again in page fault handler We needn't retrieve the memory slot again in user_mem_abort() because the corresponding memory slot has been passed from the caller. This would save some CPU cycles. For example, the time used to write 1GB memory, which is backed by 2MB hugetlb pages and write-protected, is dropped by 6.8% from 928ms to 864ms. Signed-off-by: Gavin Shan Reviewed-by: Keqian Zhu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210316041126.81860-4-gshan@redhat.com commit c728fd4ce75e9c342ea96facc5a2fe5ddb976a67 Author: Gavin Shan Date: Tue Mar 16 12:11:25 2021 +0800 KVM: arm64: Use find_vma_intersection() find_vma_intersection() has been existing to search the intersected vma. This uses the function where it's applicable, to simplify the code. Signed-off-by: Gavin Shan Reviewed-by: Keqian Zhu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210316041126.81860-3-gshan@redhat.com commit eab62148478d339a37c7a6b37d34182ccf5056ad Author: Gavin Shan Date: Tue Mar 16 12:11:24 2021 +0800 KVM: arm64: Hide kvm_mmu_wp_memory_region() We needn't expose the function as it's only used by mmu.c since it was introduced by commit c64735554c0a ("KVM: arm: Add initial dirty page locking support"). Signed-off-by: Gavin Shan Reviewed-by: Keqian Zhu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210316041126.81860-2-gshan@redhat.com commit 8bc00c04d87ee151fb8fe18ed7e7af8c785843f2 Author: Vineeth Vijayan Date: Wed Mar 31 15:43:40 2021 +0200 s390/sclp: use LIST_HEAD for Initialization For static initialization of list_head variable, use LIST_HEAD instead of INIT_LIST_HEAD function. Suggested-by: Julian Wiedmann Signed-off-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 7dd8ed09430465d137330e0810a2a90e06770898 Author: Vineeth Vijayan Date: Tue Mar 30 20:46:57 2021 +0200 s390: use DEFINE_SPINLOCK for initialization For static initialization of spinlock_t variable, use DEFINE_SPINLOCK instead of explicitly calling spin_lock_init(). Signed-off-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit aa5acf48629933c12750fc24e8ded47624556b6f Merge: 26ea7ac92836b 61232cd6efca6 Author: Linus Walleij Date: Wed Apr 7 14:45:36 2021 +0200 Merge tag 'renesas-pinctrl-for-v5.13-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.13 (take two) - Add bias support for the R-Car M2-W and M2-N, and RZ/G1M and RZ/G1N SoCs, - Miscellaneous cleanups and improvements. commit ea4aeaa5c88906eb3ca3d7d3d17a45605d2dd0de Author: Mark-PK Tsai Date: Mon Mar 15 21:18:48 2021 +0800 irqchip/irq-mst: Support polarity configuration Support irq polarity configuration and save and restore the config when system suspend and resume. Signed-off-by: Mark-PK Tsai [maz: fixed irq_set_type callback] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210315131848.31840-1-mark-pk.tsai@mediatek.com commit fead4dd496631707549f414b4059afb86ea8fb80 Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:17 2021 +0200 irqchip: Add driver for WPCM450 interrupt controller The WPCM450 AIC ("Advanced Interrupt Controller") is the interrupt controller found in the Nuvoton WPCM450 SoC and other Winbond/Nuvoton SoCs. The list of registers if based on the AMI vendor kernel and the Nuvoton W90N745 datasheet. Although the hardware supports other interrupt modes, the driver only supports high-level interrupts at the moment, because other modes could not be tested so far. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210406120921.2484986-7-j.neuschaefer@gmx.net commit 7c18715546203a09f859dac2fe3ea8aceec5f235 Author: Jonathan Neuschäfer Date: Tue Apr 6 14:09:14 2021 +0200 dt-bindings: interrupt-controller: Add nuvoton, wpcm450-aic The WPCM450 AIC ("Advanced Interrupt Controller") is the interrupt controller found in the Nuvoton WPCM450 SoC and other Winbond/Nuvoton SoCs. Signed-off-by: Jonathan Neuschäfer Acked-by: Rob Herring Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210406120921.2484986-4-j.neuschaefer@gmx.net commit 5deaa1d7c49151988b0bf919eeea6ad5535a29a2 Author: Rajendra Nayak Date: Mon Mar 15 11:29:06 2021 +0530 dt-bindings: qcom,pdc: Add compatible for sc7280 Add the compatible string for sc7280 SoC from Qualcomm Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Acked-by: Rob Herring Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1615787946-26474-1-git-send-email-rnayak@codeaurora.org commit e12c455055e9abc7403ce532616c0124a9d85ee7 Author: Erwan Le Ray Date: Fri Mar 19 19:42:51 2021 +0100 irqchip/stm32: Add usart instances exti direct event support Add following usart instances exti direct event support (used for UART wake up). - exti 26 (USART1) is mapped to GIC 37 - exti 27 (USART2) is mapped to GIC 38 - exti 28 (USART3) is mapped to GIC 39 - exti 29 (USART6) is mapped to GIC 71 - exti 31 (UART5) is mapped to GIC 53 - exti 32 (UART7) is mapped to GIC 82 - exti 33 (UART8) is mapped to GIC 83 Signed-off-by: Erwan Le Ray Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319184253.5841-4-erwan.leray@foss.st.com commit 8e13d96670a4c050d4883e6743a9e9858e5cfe10 Author: Arnd Bergmann Date: Tue Mar 23 14:18:35 2021 +0100 irqchip/gic-v3: Fix OF_BAD_ADDR error handling When building with extra warnings enabled, clang points out a mistake in the error handling: drivers/irqchip/irq-gic-v3-mbi.c:306:21: error: result of comparison of constant 18446744073709551615 with expression of type 'phys_addr_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (mbi_phys_base == OF_BAD_ADDR) { Truncate the constant to the same type as the variable it gets compared to, to shut make the check work and void the warning. Fixes: 505287525c24 ("irqchip/gic-v3: Add support for Message Based Interrupts as an MSI controller") Signed-off-by: Arnd Bergmann Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210323131842.2773094-1-arnd@kernel.org commit e03b7c1bcbfad6f27b4682f638b98627c4e416ba Author: Jisheng Zhang Date: Tue Mar 30 02:09:11 2021 +0800 irqchip/sifive-plic: Mark two global variables __ro_after_init All of these two are never modified after init, so they can be __ro_after_init. Signed-off-by: Jisheng Zhang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210330020911.26423e9e@xhacker commit 64ec2ad3b84d43926e618bb515f2382c266535ee Author: Hao Fang Date: Tue Mar 30 14:46:20 2021 +0800 irqchip/hisi: Use the correct HiSilicon copyright s/Hisilicon/HiSilicon/ It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1617086780-8521-1-git-send-email-fanghao11@huawei.com commit bd781ae53fac31acea9dec594d62a1424952dd4c Author: Marc Zyngier Date: Fri Apr 2 18:09:49 2021 +0100 mips: netlogic: Use irq_domain_simple_ops for XLP PIC Use the generic irq_domain_simple_ops structure instead of a home-grown one. Acked-by: Thomas Bogendoerfer Signed-off-by: Marc Zyngier commit 4a35d6a03744ded782c9301f5f5d78ad68ce680f Author: Marc Zyngier Date: Wed Apr 7 13:17:10 2021 +0100 irqdomain: Get rid of irq_create_identity_mapping() The sole user of irq_create_identity_mapping() having been converted, get rid of the unused helper. Signed-off-by: Marc Zyngier commit a3c1086c17e44b571410c2594dc54c94779dc918 Author: Alexander Shiyan Date: Mon Apr 5 08:16:58 2021 +0300 ARM: dts: clps711x: Add an empty chosen node to top level DTSI Missing "chosen" node can cause issues when booting a kernel with a boot-loader that doesn't create a chosen node if this isn't present in the DTB since the decompressor relies on a pre-existing chosen node to be available to insert the command line and merge other ATAGS info. Signed-off-by: Alexander Shiyan Link: https://lore.kernel.org/r/20210405051658.26779-5-shc_work@mail.ru' Signed-off-by: Arnd Bergmann commit 15bf198197d1485bfd14888665bc3becc21ec582 Author: Alexander Shiyan Date: Mon Apr 5 08:16:57 2021 +0300 ARM: dts: clps711x: edb7211: Add unit-address to memory node The memory node requires a unit-address, add it. Signed-off-by: Alexander Shiyan Link: https://lore.kernel.org/r/20210405051658.26779-4-shc_work@mail.ru' Signed-off-by: Arnd Bergmann commit 94d1ca7c05ee3d34cbf398be6ac8e52a97d3f2ae Author: Alexander Shiyan Date: Mon Apr 5 08:16:56 2021 +0300 ARM: dts: clps711x: Fix serial port names Preferred node name for serial ports is "serial". Signed-off-by: Alexander Shiyan Link: https://lore.kernel.org/r/20210405051658.26779-3-shc_work@mail.ru' Signed-off-by: Arnd Bergmann commit 2bd86203acf3afba550e84defb86083bdde85714 Author: Alexander Shiyan Date: Mon Apr 5 08:16:55 2021 +0300 ARM: dts: clps711x: Add keypad node This adds missing keypad node to basic clps711x DT. Signed-off-by: Alexander Shiyan Link: https://lore.kernel.org/r/20210405051658.26779-2-shc_work@mail.ru' Signed-off-by: Arnd Bergmann commit 62d171bce2a6aea17c59909756e194d308029149 Author: Alexander Shiyan Date: Mon Apr 5 08:16:54 2021 +0300 ARM: dts: clps711x: Add SYSCON nodes where it is used This patch adds SYSCON descriptors to framebuffer, SPI, DAI and modem control GPIO nodes to further rework these drivers to remove the call to the syscon_regmap_lookup_by_compatible() function. Signed-off-by: Alexander Shiyan Link: https://lore.kernel.org/r/20210405051658.26779-1-shc_work@mail.ru' Signed-off-by: Arnd Bergmann commit 61bac46eed14ad73cd41c5b7075350fef78ca4be Merge: d1e3a9efb2afa e9269650db2f5 Author: Arnd Bergmann Date: Wed Apr 7 14:01:03 2021 +0200 Merge tag 'qcom-arm64-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into arm/dt Qualcomm ARM64 DT updates for 5.13 This extends the initial SM8350 description merged in v5.12 with CPUfreq, SMMU, UFS, RPMHPD, SPMI, USB and remoteproc support. It adds initial PMIC definitions for the 6 PMICs found on the MTP and it introduces the new SM8350 Hardware Development Kit (HDK). SC7180 is further polished, the DisplayPort portion of the QMP phy is defined and several new SKUs of the Trogdor devices are introduced. The new SC7280 platform is introduced, with RPMH, RPMHPD, RPMCC, SPMI, CPU idle, SMMU and watchdog defined. SDM845 gains the camera related nodes and some cleanups. For SM8250 it brings some cleanups and migrates SPI0 to use GPIO for chip select. * tag 'qcom-arm64-for-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: (79 commits) arm64: dts: qcom: qrb5165-rb5: switch into using GPIO for SPI0 CS arm64: dts: qcom: sm8250: add pinctrl for SPI using GPIO as a CS arm64: dts: qcom: sm8250: further split of spi pinctrl config arm64: dts: qcom: sm8250: split spi pinctrl config arm64: dts: qcom: sdm845-db845c: Enable ov8856 sensor and connect to ISP arm64: dts: qcom: sdm845-db845c: Configure regulators for camss node arm64: dts: qcom: sdm845: Add CAMSS ISP node arm64: dts: qcom: pm8150: Enable RTC arm64: dts: qcom: sm8350-mtp: Add PMICs arm64: dts: qcom: pmr735B: Add base dts file arm64: dts: qcom: pmr735a: Add base dts file arm64: dts: qcom: pm8350c: Add base dts file arm64: dts: qcom: pm8350b: Add base dts file arm64: dts: qcom: pm8350: Add base dts file arm64: dts: qcom: pmk8350: Add base dts file arm64: dts: qcom: sm8350: Add spmi node arm64: dts: qcom: db845c: fix correct powerdown pin for WSA881x dt-bindings: arm: qcom: Add SM8350 HDK arm64: dts: qcom: sc7180: Drop duplicate dp_hot_plug_det node in trogdor arm64: dts: qcom: sm8350: fix number of pins in 'gpio-ranges' ... Link: https://lore.kernel.org/r/20210404164914.712946-1-bjorn.andersson@linaro.org Signed-off-by: Arnd Bergmann commit d1e3a9efb2afabad584f385b3bd58ec27ebf490a Merge: 0d310a3791f68 99fa8ac5c0f1c Author: Arnd Bergmann Date: Wed Apr 7 13:59:50 2021 +0200 Merge tag 'mvebu-dt64-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu into arm/dt mvebu dt64 for 5.13 (part 1) Add DT for fan control on SolidRun Clearfog GT8k platform Add syscon compatible to NB clk node allowing improving cpufreq support on Armada 37xx Add support for UTMI PHY allowing removing kernel dependency from the boot loader for UBS port connected to this PHY (Armada 7K, 8K and CN91xx) * tag 'mvebu-dt64-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu: arm64: dts: marvell: enable CP110 UTMI PHY usage arm64: dts: marvell: add support for Marvell CP110 UTMI PHY arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node arm64: dts: marvell: clearfog-gt-8k: add cooling maps arm64: dts: marvell: clearfog-gt-8k: add pwm-fan Link: https://lore.kernel.org/r/874kgocs7t.fsf@BL-laptop Signed-off-by: Arnd Bergmann commit 0d310a3791f6823cf5dcfec5666c1b8cfe6b149b Merge: 85af259bcce7a d580e6f0ec3ab Author: Arnd Bergmann Date: Wed Apr 7 13:44:12 2021 +0200 Merge tag 'sunxi-dt-for-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into arm/dt Our usual bunch of patches to support the Allwinner SoCs, this time adding: - New secondary interrupt controller binding to support the wake-up - Use the RSB bus instead of I2C for the PMIC on the H6 - HDMI support for the BananaPi M2-Zero - New board: Topwise A721 * tag 'sunxi-dt-for-5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: ARM: dts: sun8i: h3: beelink-x2: Add power button arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out ARM: dts: sun4i: Add support for Topwise A721 tablet dt-bindings: arm: Add Topwise A721 arm64: dts: allwinner: Move wakeup-capable IRQs to r_intc arm64: dts: allwinner: Use the new r_intc binding ARM: dts: sunxi: Move wakeup-capable IRQs to r_intc ARM: dts: sunxi: h3/h5: Add r_intc node ARM: dts: sunxi: Use the new r_intc binding Link: https://lore.kernel.org/r/8a3e3271-bebe-4d27-a9e7-7b7a6311a38d.lettre@localhost Signed-off-by: Arnd Bergmann commit 85af259bcce7a4d6936da72fd84757502a2c5b5e Merge: 7d534c3a5e1f5 2b35ca2fe605f Author: Arnd Bergmann Date: Wed Apr 7 13:42:36 2021 +0200 Merge tag 'renesas-arm-dt-for-v5.13-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.13 (take two) - Video IN (VIN) and Camera (CSI-2) support for the R-Car M3-W+ SoC, - LED support for the Falcon development board, - Preparatory display pipeline support for the R-Car V3U SoC, - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v5.13-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: ulcb: Add cpu-supply property to a57_0 node arm64: dts: renesas: salvator-common: Add cpu-supply property to a57_0 node arm64: dts: renesas: r8a77950: Drop operating points above 1.5 GHz arm64: dts: renesas: r8a779a0: Fix PMU interrupt arm64: dts: renesas: r8a779a0: Add VSPD support arm64: dts: renesas: r8a779a0: Add FCPVD support arm64: dts: renesas: falcon-cpu: Add GP LEDs arm64: dts: renesas: r8a77961: Add VIN and CSI-2 device nodes ARM: dts: koelsch: Configure pull-up for SOFT_SW GPIO keys arm64: dts: renesas: falcon: Move AVB0 to main DTS arm64: dts: renesas: falcon: Move watchdog config to CPU board DTS arm64: dts: renesas: falcon: Move console config to CPU board DTS Link: https://lore.kernel.org/r/cover.1617359678.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 4d930c421e3b4f5bb3a9dd6b2eba2b15d458fcb5 Author: Nicolas Ferre Date: Fri Apr 2 19:01:39 2021 +0200 ARM: dts: at91: sama5d2: add ETB and ETM unit name Add unit address to the ETB and ETM nodes. It also allow us to get rid of the warnings: ../arch/arm/boot/dts/sama5d2.dtsi:43.6-57.4: Warning (unit_address_vs_reg): /etb: node has a reg or ranges property, but no unit name ../arch/arm/boot/dts/sama5d2.dtsi:59.6-73.4: Warning (unit_address_vs_reg): /etm: node has a reg or ranges property, but no unit name when we compile with W=1. Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20210402170139.140595-1-nicolas.ferre@microchip.com commit ca7a049ad1a72ec5f03d1330b53575237fcb727c Author: Ludovic Desroches Date: Fri Apr 2 15:02:27 2021 +0200 ARM: dts: at91: change the key code of the gpio key Having a button code and not a key code causes issues with libinput. udev won't set ID_INPUT_KEY. If it is forced, then it causes a bug within libinput. Signed-off-by: Ludovic Desroches Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20210402130227.21478-1-nicolas.ferre@microchip.com commit a48849e2358ecf1a347a03b33dc27b9b2f25f8fd Author: Vlastimil Babka Date: Thu Feb 25 17:46:39 2021 +0100 printk: clarify the documentation for plain pointer printing We have several modifiers for plain pointers (%p, %px and %pK) and now also the no_hash_pointers boot parameter. The documentation should help to choose which variant to use. Importantly, we should discourage %px in favor of %p (with the new boot parameter when debugging), and stress that %pK should be only used for procfs and similar files, not dmesg buffer. This patch clarifies the documentation in that regard. Signed-off-by: Vlastimil Babka Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210225164639.27212-1-vbabka@suse.cz commit 9de07a4e8d4cb269f9876b2ffa282b5ffd09e05b Author: John Chen Date: Tue Mar 30 19:33:19 2021 +0800 HID: input: map battery capacity (00850065) This is the capacity in percentage, relative to design capacity. Specifically, it is present in Apple Magic Mouse 2. In contrast, usage 00850064 is also the capacity in percentage, but is relative to full capacity. It is not mapped here because I don't have such device. Signed-off-by: John Chen Signed-off-by: Jiri Kosina commit c0dc5582812dfaf122a6eb188b0cd8e5ae4b0387 Author: John Chen Date: Tue Mar 30 19:33:18 2021 +0800 HID: magicmouse: fix reconnection of Magic Mouse 2 It is observed that the Magic Mouse 2 would not enter multi-touch mode unless the mouse is connected before loading the module. It seems to be a quirk specific to Magic Mouse 2 Retrying after 500ms fixes the problem for me. The delay can't be reduced much further --- 300ms didn't work for me. Retrying immediately after receiving an event didn't work either. Signed-off-by: John Chen Signed-off-by: Jiri Kosina commit 3dcc5f7b45e037b0c6e84e4f757d16c55535db28 Author: John Chen Date: Tue Mar 30 19:33:17 2021 +0800 HID: magicmouse: fix 3 button emulation of Mouse 2 It is observed that, with 3 button emulation, when middle button is clicked, either the left button or right button is clicked as well. It is caused by hidinput "correctly" acting on the event, oblivious to the 3 button emulation. As raw_event has taken care of everything, no further processing is needed. However, the only way to stop at raw_event is to return an error (negative) value. Therefore, the processing is stopped at event instead. [jkosina@suse.cz: fix comment style] Signed-off-by: John Chen Signed-off-by: Jiri Kosina commit 2b0c086cd6f40648df73c30ea785e5c7777948da Author: John Chen Date: Tue Mar 30 19:33:16 2021 +0800 HID: magicmouse: add Apple Magic Mouse 2 support Bluetooth device Vendor 004c (Apple) Device 0269 (Magic Mouse 2) Add support for Apple Magic Mouse 2, putting the device in multi-touch mode. Co-authored-by: Rohit Pidaparthi Co-authored-by: RicardoEPRodrigues Signed-off-by: John Chen Signed-off-by: Jiri Kosina commit eef56c3a0492e4c1bc2a081da8f402a26d882489 Author: Marc Zyngier Date: Fri Apr 2 15:58:21 2021 +0100 sh: intc: Drop the use of irq_create_identity_mapping() Instead of playing games with using irq_create_identity_mapping() and irq_domain_associate(), drop the use of the former and only use the latter, together with the allocation of the irq_desc as needed. It doesn't make the code less awful, but at least the intent is clearer. Tested-by: Geert Uytterhoeven Signed-off-by: Marc Zyngier commit c158c2afc99f9d1086f6d53b9c6c9813fcac1a10 Author: Hans de Goede Date: Sun Apr 4 10:04:32 2021 +0200 HID: lenovo: Add support for Thinkpad X1 Tablet Thin keyboard The Thinkpad X1 Tablet Thin keyboard's HID interface for the media-keys and other special functions, is quite similar to the Thinkpad 10 ultrabook keyboard's mouse/media-keys HID interface. The only difference is that it needs a bit different key mappings. Add support for the mute-LED and the non-standard media-keys on this keyboard by re-using the tp10_ultrabook_kbd code combined with a new lenovo_input_mapping_x1_tab_kbd() function. Co-authored-by: Alexander Kobel Tested-by: Alexander Kobel Signed-off-by: Alexander Kobel Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 2d0f1c071ab1ce2f75ac3e52b99775ce574f6416 Author: Hans de Goede Date: Sun Apr 4 10:04:31 2021 +0200 HID: lenovo: Rework how the tp10ubkbd code decides which USB interface to use Instead of looking for a hdev with a type of HID_TYPE_USBMOUSE find the interface for the mute/mic-mute/fn-lock LEDs by checking for the output-report which is used to set them. This is a preparation patch for adding support for the LEDs on the X1 tablet thin keyboard which uses the same output-report, but has a separate (third) USB interface for the touchpad/mouse functionality. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit e2da5ff435d64b59880648269c136484bea5c312 Author: Hans de Goede Date: Sun Apr 4 10:04:30 2021 +0200 HID: lenovo: Set default_triggers for the mute and micmute LEDs The mute and mic-mute LEDs should be automatically turned on/off based on the audio-card's mixer settings. Add the standardized default-trigger names for this, so that the alsa code can turn the LEDs on/off as appropriate (on supported audio cards). This brings the mute/mic-mute LED support inline with the thinkpad_acpi support for the same LEDs in keyboards directly connected to the laptop's embedded-controller. Reviewed-by: Marek Behún Acked-by: Pavel Machek Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 617103246cfd19af837e4cb614ba9f877c4f7779 Author: Hans de Goede Date: Sun Apr 4 10:04:29 2021 +0200 HID: lenovo: Map mic-mute button to KEY_F20 instead of KEY_MICMUTE Mapping the mic-mute button to KEY_MICMUTE is technically correct but KEY_MICMUTE translates to a scancode of 256 (248 + 8) under X, which does not fit in 8 bits, so it does not work. Because of this userspace is expecting KEY_F20 instead, theoretically KEY_MICMUTE should work under Wayland but even there it does not work, because the desktop-environment is listening only for KEY_F20 and not for KEY_MICMUTE. Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 8744eeec539aa760c41a64b3efbb77868b1d700a Author: Hans de Goede Date: Sun Apr 4 10:04:28 2021 +0200 HID: lenovo: Set LEDs max_brightness value The LEDs can only by turned on/off, so max_brightness should be set to 1. Without this the max_brightness sysfs-attribute will report 255 which is wrong. Reviewed-by: Marek Behún Acked-by: Pavel Machek Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 033c978680255a81c6284cb6ea4de20bd2bdbe5c Author: Hans de Goede Date: Sun Apr 4 10:04:27 2021 +0200 HID: lenovo: Remove lenovo_led_brightness_get() The led_classdev already contains a cached value of the last set brightness, the brightness_get callback is only meant for LED drivers which can read back the actual / current brightness from the hardware. Since lenovo_led_brightness_get() just returns the last set value it does not add any functionality, so we can just remove it. Reviewed-by: Marek Behún Acked-by: Pavel Machek Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 34348a8661e3cd67dcf6938f08c8bb77522301f7 Author: Hans de Goede Date: Sun Apr 4 10:04:26 2021 +0200 HID: lenovo: Check hid_get_drvdata() returns non NULL in lenovo_event() The HID lenovo probe function only attaches drvdata to one of the USB interfaces, but lenovo_event() will get called for all USB interfaces to which hid-lenovo is bound. This allows a malicious device to fake being a device handled by hid-lenovo, which generates events for which lenovo_event() has special handling (and thus dereferences hid_get_drvdata()) on another interface triggering a NULL pointer exception. Add a check for hid_get_drvdata() returning NULL, avoiding this possible NULL pointer exception. Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 658d04e6eb6be1601ae95d7bee92bbf4096cdc1e Author: Hans de Goede Date: Sun Apr 4 10:04:25 2021 +0200 HID: lenovo: Fix lenovo_led_set_tp10ubkbd() error handling Fix the following issues with lenovo_led_set_tp10ubkbd() error handling: 1. On success hid_hw_raw_request() returns the number of bytes sent. So we should check for (ret != 3) rather then for (ret != 0). 2. Actually propagate errors to the caller. 3. Since the LEDs are part of an USB keyboard-dock the mute LEDs can go away at any time. Don't log an error when ret == -ENODEV and set the LED_HW_PLUGGABLE flag to avoid errors getting logged when the USB gets disconnected. Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit bbf62645255f120bc2e7488c237e3f04da42ec70 Author: Hans de Goede Date: Sun Apr 4 10:04:24 2021 +0200 HID: lenovo: Use brightness_set_blocking callback for setting LEDs brightness The lenovo_led_brightness_set function may sleep, so we should have the the led_class_dev's brightness_set_blocking callback point to it, rather then the regular brightness_set callback. When toggled through sysfs this is not a problem, but the brightness_set callback may be called from atomic context when using LED-triggers. Fixes: bc04b37ea0ec ("HID: lenovo: Add ThinkPad 10 Ultrabook Keyboard support") Reviewed-by: Marek Behún Acked-by: Pavel Machek Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit ba3f92938f2c01623546d4570ecc19a8b7786fa7 Author: Hans de Goede Date: Sun Apr 4 09:52:52 2021 +0200 HID: elan: Remove elan_mute_led_get_brigtness() The led_classdev already contains a cached value of the last set brightness, the brightness_get callback is only meant for LED drivers which can read back the actual / current brightness from the hardware. Since elan_mute_led_get_brigtness() just returns the last set value it does not add any functionality, so we can just remove it. Reviewed-by: Marek Behún Acked-by: Pavel Machek Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 2601371e1082ca30577556d381afacc11a11157b Author: Hans de Goede Date: Sun Apr 4 09:52:51 2021 +0200 HID: elan: Set default_trigger for the mute LED The mute LED should be automatically turned on/off based on the audio-card's mixer settings. Add the standardized default-trigger name for this, so that the alsa code can turn the LED on/off as appropriate (on supported audio cards). Reviewed-by: Marek Behún Acked-by: Pavel Machek Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit efb618fba54d7df0414f395b6213a469c075f859 Author: Hans de Goede Date: Sun Apr 4 09:52:50 2021 +0200 HID: elan: Silence mute LED errors being logged when the device is unplugged Being integrated into an USB keyboard-dock the mute LED can go away at any time, leading to the following errors: [ 918.667671] elan 0003:04F3:0755.0002: Failed to set mute led brightness: -19 [ 918.667737] leds elan:red:mute: Setting an LED's brightness failed (-19) Fix this by making the following changes: 1. Don't log an error from elan_mute_led_set_brigtness() when ret == -ENODEV 2. Set the LED_HW_PLUGGABLE flag on the mute LED led_classdev While at it also make sure that elan_mute_led_set_brigtness() returns an error (-EIO) when ret != 3 but it is not an error (>= 0). Reviewed-by: Marek Behún Acked-by: Pavel Machek Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit e0bb4b73540495111ff2723e41cf5add2f031021 Author: Zenghui Yu Date: Wed Apr 7 16:44:48 2021 +0800 iommu/arm-smmu-v3: Remove the unused fields for PREFETCH_CONFIG command Per SMMUv3 spec, there is no Size and Addr field in the PREFETCH_CONFIG command and they're not used by the driver. Remove them. We can add them back if we're going to use PREFETCH_ADDR in the future. Signed-off-by: Zenghui Yu Link: https://lore.kernel.org/r/20210407084448.1838-1-yuzenghui@huawei.com Signed-off-by: Will Deacon commit 884c7094a272fb674423bd5a473caa3c714045fe Author: Takashi Iwai Date: Tue Apr 6 13:38:37 2021 +0200 ALSA: usb-audio: Drop implicit fb quirk entries dubbed for capture The implicit feedback quirk table contains the entries that also appear in the capture quirks, and those are all handled to be skipped. For the code simplicity, drop the duped entries in the playback quirk table, and check the match with the capture quirk table instead. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212519 Link: https://lore.kernel.org/r/20210406113837.32041-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 5fb45414ae03421255593fd5556aa2d1d82303aa Author: Takashi Iwai Date: Tue Apr 6 13:35:34 2021 +0200 ALSA: usb-audio: Add error checks for usb_driver_claim_interface() calls There are a few calls of usb_driver_claim_interface() but all of those miss the proper error checks, as reported by Coverity. This patch adds those missing checks. Along with it, replace the magic pointer with -1 with a constant USB_AUDIO_IFACE_UNUSED for better readability. Reported-by: coverity-bot Addresses-Coverity-ID: 1475943 ("Error handling issues") Addresses-Coverity-ID: 1475944 ("Error handling issues") Addresses-Coverity-ID: 1475945 ("Error handling issues") Fixes: b1ce7ba619d9 ("ALSA: usb-audio: claim autodetected PCM interfaces all at once") Fixes: e5779998bf8b ("ALSA: usb-audio: refactor code") Link: https://lore.kernel.org/r/202104051059.FB7F3016@keescook Link: https://lore.kernel.org/r/20210406113534.30455-1-tiwai@suse.de Signed-off-by: Takashi Iwai commit 8b74b6ab253866450c131e9134642efb40439c91 Author: Lu Baolu Date: Sat Mar 20 10:54:15 2021 +0800 iommu/vt-d: Avoid unnecessary cache flush in pasid entry teardown When a present pasid entry is disassembled, all kinds of pasid related caches need to be flushed. But when a pasid entry is not being used (PRESENT bit not set), we don't need to do this. Check the PRESENT bit in intel_pasid_tear_down_entry() and avoid flushing caches if it's not set. Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210320025415.641201-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit c0474a606ecb9326227b4d68059942f9db88a897 Author: Lu Baolu Date: Sat Mar 20 10:54:13 2021 +0800 iommu/vt-d: Invalidate PASID cache when root/context entry changed When the Intel IOMMU is operating in the scalable mode, some information from the root and context table may be used to tag entries in the PASID cache. Software should invalidate the PASID-cache when changing root or context table entries. Suggested-by: Ashok Raj Fixes: 7373a8cc38197 ("iommu/vt-d: Setup context and enable RID2PASID support") Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210320025415.641201-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit eea53c5816889ee8b64544fa2e9311a81184ff9c Author: Lu Baolu Date: Sat Mar 20 10:54:12 2021 +0800 iommu/vt-d: Remove WO permissions on second-level paging entries When the first level page table is used for IOVA translation, it only supports Read-Only and Read-Write permissions. The Write-Only permission is not supported as the PRESENT bit (implying Read permission) should always set. When using second level, we still give separate permissions that allows WriteOnly which seems inconsistent and awkward. We want to have consistent behavior. After moving to 1st level, we don't want things to work sometimes, and break if we use 2nd level for the same mappings. Hence remove this configuration. Suggested-by: Ashok Raj Fixes: b802d070a52a1 ("iommu/vt-d: Use iova over first level") Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210320025415.641201-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 03d205094af45bca4f8e0498c461a893aa3ec6d9 Author: Lu Baolu Date: Sat Mar 20 10:54:11 2021 +0800 iommu/vt-d: Report the right page fault address The Address field of the Page Request Descriptor only keeps bit [63:12] of the offending address. Convert it to a full address before reporting it to device drivers. Fixes: eb8d93ea3c1d3 ("iommu/vt-d: Report page request faults for guest SVA") Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210320025415.641201-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit c2f3f755f5c717f3621b33ef06d974b9cec4a104 Author: Greg Kroah-Hartman Date: Wed Apr 7 11:47:56 2021 +0200 Revert "driver core: platform: Make platform_get_irq_optional() optional" This reverts commit ed7027fdf4ec41ed6df6814956dc11860232a9d5 as it causes runtime issues: https://lore.kernel.org/r/20210406192514.GA34677@roeck-us.net Link: https://lore.kernel.org/r/20210406192514.GA34677@roeck-us.net Reported-by: Guenter Roeck Cc: Matthias Schiffer Cc: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman commit 34138a59b92c1a30649a18ec442d2e61f3bc34dd Author: Paweł Chmiel Date: Sat Oct 24 17:43:46 2020 +0200 clk: exynos7: Mark aclk_fsys1_200 as critical This clock must be always enabled to allow access to any registers in fsys1 CMU. Until proper solution based on runtime PM is applied (similar to what was done for Exynos5433), mark that clock as critical so it won't be disabled. It was observed on Samsung Galaxy S6 device (based on Exynos7420), where UFS module is probed before pmic used to power that device. In this case defer probe was happening and that clock was disabled by UFS driver, causing whole boot to hang on next CMU access. Fixes: 753195a749a6 ("clk: samsung: exynos7: Correct CMU_FSYS1 clocks names") Signed-off-by: Paweł Chmiel Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/linux-clk/20201024154346.9589-1-pawel.mikolaj.chmiel@gmail.com [s.nawrocki: Added comment in the code] Signed-off-by: Sylwester Nawrocki commit fc1b6620501f1a4b88f583549c63666180bea177 Author: Christoph Hellwig Date: Fri Apr 2 16:33:12 2021 +0200 iommu/amd: Move a few prototypes to include/linux/amd-iommu.h A few functions that were intentended for the perf events support are currently declared in arch/x86/events/amd/iommu.h, which mens they are not in scope for the actual function definition. Also amdkfd has started using a few of them using externs in a .c file. End that misery by moving the prototypes to the proper header. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210402143312.372386-5-hch@lst.de Signed-off-by: Joerg Roedel commit b29a1fc7595a868fc49ed3083a2766c3cab06c19 Author: Christoph Hellwig Date: Fri Apr 2 16:33:11 2021 +0200 iommu/amd: Remove a few unused exports Remove exports for functions that are only used in the AMD IOMMU driver itself, or the also always builtin perf events support. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210402143312.372386-4-hch@lst.de Signed-off-by: Joerg Roedel commit 42fa2bda18d2d666e184dbd0406ec8340b4f4b17 Author: Christoph Hellwig Date: Fri Apr 2 16:33:10 2021 +0200 iommu/amd: Remove the unused amd_iommu_get_v2_domain function Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210402143312.372386-3-hch@lst.de Signed-off-by: Joerg Roedel commit d151c85c52a314c6ecb91ab35b3f696a6778b509 Author: Christoph Hellwig Date: Fri Apr 2 16:33:09 2021 +0200 iommu/amd: Remove the unused device errata code The device errata mechism is entirely unused, so remove it. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210402143312.372386-2-hch@lst.de Signed-off-by: Joerg Roedel commit 11134390d742bd22e574d03280fe0ec8d3d4974e Author: Loic Poulain Date: Wed Apr 7 10:41:00 2021 +0200 bus: mhi: pci_generic: Add FIREHOSE channels When device enters flash programmer context (FP), it exposes firehose protocol through the EDL dedicated channels. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617784860-32439-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 7876a83ffe8c23c7049a63c747a7b96cafaf10a4 Author: Christoph Hellwig Date: Thu Apr 1 17:52:56 2021 +0200 iommu: remove iommu_domain_{get,set}_attr Remove the now unused iommu attr infrastructure. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210401155256.298656-21-hch@lst.de Signed-off-by: Joerg Roedel commit 4fc52b81e87be583efb834df5b58245cb9ddd3e7 Author: Christoph Hellwig Date: Thu Apr 1 17:52:55 2021 +0200 iommu: remove DOMAIN_ATTR_IO_PGTABLE_CFG Use an explicit set_pgtable_quirks method instead that just passes the actual quirk bitmask instead. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-20-hch@lst.de Signed-off-by: Joerg Roedel commit a250c23f15c21c556becd4986f453255e545807c Author: Robin Murphy Date: Thu Apr 1 17:52:54 2021 +0200 iommu: remove DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE Instead make the global iommu_dma_strict paramete in iommu.c canonical by exporting helpers to get and set it and use those directly in the drivers. This make sure that the iommu.strict parameter also works for the AMD and Intel IOMMU drivers on x86. As those default to lazy flushing a new IOMMU_CMD_LINE_STRICT is used to turn the value into a tristate to represent the default if not overriden by an explicit parameter. [ported on top of the other iommu_attr changes and added a few small missing bits] Signed-off-by: Robin Murphy . Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210401155256.298656-19-hch@lst.de Signed-off-by: Joerg Roedel commit 3189713a1b84ac02cce3217955ae68d0d67b15b7 Author: Christoph Hellwig Date: Thu Apr 1 17:52:53 2021 +0200 iommu: remove iommu_set_cmd_line_dma_api and iommu_cmd_line_dma_api Don't obsfucate the trivial bit flag check. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210401155256.298656-18-hch@lst.de Signed-off-by: Joerg Roedel commit 7e147547783a9035df816864b6a45ffbb254d700 Author: Christoph Hellwig Date: Thu Apr 1 17:52:52 2021 +0200 iommu: remove DOMAIN_ATTR_NESTING Use an explicit enable_nesting method instead. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-17-hch@lst.de Signed-off-by: Joerg Roedel commit bc9a05eef113e75cfa792fdf24dae011bc3d5294 Author: Christoph Hellwig Date: Thu Apr 1 17:52:51 2021 +0200 iommu: remove DOMAIN_ATTR_GEOMETRY The geometry information can be trivially queried from the iommu_domain struture. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-16-hch@lst.de Signed-off-by: Joerg Roedel commit 9fb5fad562fa0a41c84691714d99c23f54168a9e Author: Christoph Hellwig Date: Thu Apr 1 17:52:50 2021 +0200 iommu: remove DOMAIN_ATTR_PAGING DOMAIN_ATTR_PAGING is never used. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-15-hch@lst.de Signed-off-by: Joerg Roedel commit 57fa44be7fdb0d8803ecf11886d41b5002eae8f2 Author: Christoph Hellwig Date: Thu Apr 1 17:52:49 2021 +0200 iommu/fsl_pamu: hardcode the window address and size in pamu_config_ppaace The win_addr and win_size parameters are always set to 0 and 1 << 36 respectively, so just hard code them. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210401155256.298656-14-hch@lst.de Signed-off-by: Joerg Roedel commit 151f9414b88bf62cdc671892ca1409ddf05ae72f Author: Christoph Hellwig Date: Thu Apr 1 17:52:48 2021 +0200 iommu/fsl_pamu: remove the rpn and snoop_id arguments to pamu_config_ppaac These are always wired to fixed values, so don't bother passing them as arguments. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210401155256.298656-13-hch@lst.de Signed-off-by: Joerg Roedel commit fd78696ece54a83c8fc4f6ff1c959b7bcf25c410 Author: Christoph Hellwig Date: Thu Apr 1 17:52:47 2021 +0200 iommu/fsl_pamu: remove the snoop_id field The snoop_id is always set to ~(u32)0. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-12-hch@lst.de Signed-off-by: Joerg Roedel commit 7d61cb6ff0122a017ae907aed62478a4db9c5991 Author: Christoph Hellwig Date: Thu Apr 1 17:52:46 2021 +0200 iommu/fsl_pamu: enable the liodn when attaching a device Instead of a separate call to enable all devices from the list, just enable the liodn once the device is attached to the iommu domain. This also remove the DOMAIN_ATTR_FSL_PAMU_ENABLE iommu_attr. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-11-hch@lst.de Signed-off-by: Joerg Roedel commit 85e362ca462548092b744acbaed9472ab14706b0 Author: Christoph Hellwig Date: Thu Apr 1 17:52:45 2021 +0200 iommu/fsl_pamu: merge handle_attach_device into fsl_pamu_attach_device No good reason to split this functionality over two functions. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-10-hch@lst.de Signed-off-by: Joerg Roedel commit dae7747ae41ccdc92ad94d56b05793a3ee983e8a Author: Christoph Hellwig Date: Thu Apr 1 17:52:44 2021 +0200 iommu/fsl_pamu: merge pamu_set_liodn and map_liodn Merge the two fuctions that configure the ppaace into a single coherent function. I somehow doubt we need the two pamu_config_ppaace calls, but keep the existing behavior just to be on the safe side. Signed-off-by: Christoph Hellwig Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-9-hch@lst.de Signed-off-by: Joerg Roedel commit 4eeb96f6efac10e66fd10e718d2adeece3879121 Author: Christoph Hellwig Date: Thu Apr 1 17:52:43 2021 +0200 iommu/fsl_pamu: replace DOMAIN_ATTR_FSL_PAMU_STASH with a direct call Add a fsl_pamu_configure_l1_stash API that qman_portal can call directly instead of indirecting through the iommu attr API. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-8-hch@lst.de Signed-off-by: Joerg Roedel commit 376dfd2a2ff41596a6efc8ea56f8b0de172b04a6 Author: Christoph Hellwig Date: Thu Apr 1 17:52:42 2021 +0200 iommu/fsl_pamu: remove ->domain_window_enable The only thing that fsl_pamu_window_enable does for the current caller is to fill in the prot value in the only dma_window structure, and to propagate a few values from the iommu_domain_geometry struture into the dma_window. Remove the dma_window entirely, hardcode the prot value and otherwise use the iommu_domain_geometry structure instead. Remove the now unused ->domain_window_enable iommu method. Signed-off-by: Christoph Hellwig Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-7-hch@lst.de Signed-off-by: Joerg Roedel commit ba58d1216e2b2d2320b50591b767f50b13c623a8 Author: Christoph Hellwig Date: Thu Apr 1 17:52:41 2021 +0200 iommu/fsl_pamu: remove support for multiple windows The only domains allocated forces use of a single window. Remove all the code related to multiple window support, as well as the need for qman_portal to force a single window. Remove the now unused DOMAIN_ATTR_WINDOWS iommu_attr. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-6-hch@lst.de Signed-off-by: Joerg Roedel commit c8224508074e7d13fc31e8ca3d24e4f159983cb3 Author: Christoph Hellwig Date: Thu Apr 1 17:52:40 2021 +0200 iommu/fsl_pamu: merge iommu_alloc_dma_domain into fsl_pamu_domain_alloc Keep the functionality to allocate the domain together. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-5-hch@lst.de Signed-off-by: Joerg Roedel commit f7641bb71d26044403cf44f3f14fd6fd3d16eac3 Author: Christoph Hellwig Date: Thu Apr 1 17:52:39 2021 +0200 iommu/fsl_pamu: remove support for setting DOMAIN_ATTR_GEOMETRY The default geometry is the same as the one set by qman_port given that FSL_PAMU depends on having 64-bit physical and thus DMA addresses. Remove the support to update the geometry and remove the now pointless geom_size field. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-4-hch@lst.de Signed-off-by: Joerg Roedel commit 392825e0c76cf9aca33e5a3bf981cde2a2c87251 Author: Christoph Hellwig Date: Thu Apr 1 17:52:38 2021 +0200 iommu/fsl_pamu: remove fsl_pamu_get_domain_attr None of the values returned by this function are ever queried. Also remove the DOMAIN_ATTR_FSL_PAMUV1 enum value that is not otherwise used. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-3-hch@lst.de Signed-off-by: Joerg Roedel commit 47685cb202d1aff6f70a2bb91e8271392fefea84 Author: Christoph Hellwig Date: Thu Apr 1 17:52:37 2021 +0200 iommu: remove the unused domain_window_disable method domain_window_disable is wired up by fsl_pamu, but never actually called. Signed-off-by: Christoph Hellwig Acked-by: Will Deacon Acked-by: Li Yang Link: https://lore.kernel.org/r/20210401155256.298656-2-hch@lst.de Signed-off-by: Joerg Roedel commit cdf315f907d46a8cfb60bcc1cb4a73d730303196 Author: Jean-Philippe Brucker Date: Thu Apr 1 17:47:16 2021 +0200 iommu/arm-smmu-v3: Maintain a SID->device structure When handling faults from the event or PRI queue, we need to find the struct device associated with a SID. Add a rb_tree to keep track of SIDs. Acked-by: Jonathan Cameron Reviewed-by: Eric Auger Reviewed-by: Keqian Zhu Signed-off-by: Jean-Philippe Brucker Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210401154718.307519-8-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit fc36479db74e957c4696b605a32c4afaa15fa6cb Author: Jean-Philippe Brucker Date: Thu Apr 1 17:47:15 2021 +0200 iommu: Add a page fault handler Some systems allow devices to handle I/O Page Faults in the core mm. For example systems implementing the PCIe PRI extension or Arm SMMU stall model. Infrastructure for reporting these recoverable page faults was added to the IOMMU core by commit 0c830e6b3282 ("iommu: Introduce device fault report API"). Add a page fault handler for host SVA. IOMMU driver can now instantiate several fault workqueues and link them to IOPF-capable devices. Drivers can choose between a single global workqueue, one per IOMMU device, one per low-level fault queue, one per domain, etc. When it receives a fault event, most commonly in an IRQ handler, the IOMMU driver reports the fault using iommu_report_device_fault(), which calls the registered handler. The page fault handler then calls the mm fault handler, and reports either success or failure with iommu_page_response(). After the handler succeeds, the hardware retries the access. The iopf_param pointer could be embedded into iommu_fault_param. But putting iopf_param into the iommu_param structure allows us not to care about ordering between calls to iopf_queue_add_device() and iommu_register_device_fault_handler(). Tested-by: Lu Baolu Reviewed-by: Eric Auger Reviewed-by: Jacob Pan Reviewed-by: Jonathan Cameron Reviewed-by: Lu Baolu Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210401154718.307519-7-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 0860788df74085a5e14c1702610b2977fd9aac5e Author: Jean-Philippe Brucker Date: Thu Apr 1 17:47:14 2021 +0200 uacce: Enable IOMMU_DEV_FEAT_IOPF The IOPF (I/O Page Fault) feature is now enabled independently from the SVA feature, because some IOPF implementations are device-specific and do not require IOMMU support for PCIe PRI or Arm SMMU stall. Enable IOPF unconditionally when enabling SVA for now. In the future, if a device driver implementing a uacce interface doesn't need IOPF support, it will need to tell the uacce module, for example with a new flag. Acked-by: Zhangfei Gao Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210401154718.307519-6-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 9003351cb6bde752de774e6ec874109493413152 Author: Jean-Philippe Brucker Date: Thu Apr 1 17:47:13 2021 +0200 iommu/vt-d: Support IOMMU_DEV_FEAT_IOPF Allow drivers to query and enable IOMMU_DEV_FEAT_IOPF, which amounts to checking whether PRI is enabled. Reviewed-by: Lu Baolu Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210401154718.307519-5-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 34b48c704d194738eef0893aa06e412bdc8a972f Author: Jean-Philippe Brucker Date: Thu Apr 1 17:47:12 2021 +0200 iommu: Separate IOMMU_DEV_FEAT_IOPF from IOMMU_DEV_FEAT_SVA Some devices manage I/O Page Faults (IOPF) themselves instead of relying on PCIe PRI or Arm SMMU stall. Allow their drivers to enable SVA without mandating IOMMU-managed IOPF. The other device drivers now need to first enable IOMMU_DEV_FEAT_IOPF before enabling IOMMU_DEV_FEAT_SVA. Enabling IOMMU_DEV_FEAT_IOPF on its own doesn't have any effect visible to the device driver, it is used in combination with other features. Reviewed-by: Eric Auger Reviewed-by: Lu Baolu Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210401154718.307519-4-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 434b73e61cc65cdd26618af6fa4736c2ba1eb29b Author: Jean-Philippe Brucker Date: Thu Apr 1 17:47:11 2021 +0200 iommu/arm-smmu-v3: Use device properties for pasid-num-bits The pasid-num-bits property shouldn't need a dedicated fwspec field, it's a job for device properties. Add properties for IORT, and access the number of PASID bits using device_property_read_u32(). Suggested-by: Robin Murphy Acked-by: Jonathan Cameron Acked-by: Will Deacon Reviewed-by: Eric Auger Signed-off-by: Jean-Philippe Brucker Acked-by: Hanjun Guo Link: https://lore.kernel.org/r/20210401154718.307519-3-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 0d35309ab5e080095190965aa7cfc3ca8fb88af9 Author: Jean-Philippe Brucker Date: Thu Apr 1 17:47:10 2021 +0200 iommu: Fix comment for struct iommu_fwspec Commit 986d5ecc5699 ("iommu: Move fwspec->iommu_priv to struct dev_iommu") removed iommu_priv from fwspec and commit 5702ee24182f ("ACPI/IORT: Check ATS capability in root complex nodes") added @flags. Update the struct doc. Acked-by: Jonathan Cameron Acked-by: Will Deacon Signed-off-by: Jean-Philippe Brucker Link: https://lore.kernel.org/r/20210401154718.307519-2-jean-philippe@linaro.org Signed-off-by: Joerg Roedel commit 3e84f878b56b075b9a81de6e73da7b3dc88387d8 Author: Qi Liu Date: Thu Apr 1 19:19:16 2021 +0800 iommu/amd: Remove duplicate check of pasids Remove duplicate check of pasids in amd_iommu_domain_enable_v2(), as it has been guaranteed in amd_iommu_init_device(). Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1617275956-4467-1-git-send-email-liuqi115@huawei.com Signed-off-by: Joerg Roedel commit a56af062ae7cdc9759ed61d1d3d173f28c79510a Author: Chunyan Zhang Date: Wed Mar 31 11:16:45 2021 +0800 iommu/sprd: Fix parameter type warning The second parameter of clk_get_optional() is "const char *", so use NULL instead of integer 0 to fix a sparse warning like: ">> drivers/iommu/sprd-iommu.c:456:42: sparse: sparse: Using plain integer as NULL pointer" Also this patch changes to use the resource-managed variant of clk_get_optional(), then there's no need to add clk_put() which is missed in the current driver. Reported-by: kernel test robot Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20210331031645.1001913-1-zhang.lyra@gmail.com Signed-off-by: Joerg Roedel commit 6c00612d0cba10f7d0917cf1f73c945003ed4cd7 Author: Lu Baolu Date: Tue Mar 30 10:11:45 2021 +0800 iommu/vt-d: Report right snoop capability when using FL for IOVA The Intel VT-d driver checks wrong register to report snoop capablility when using first level page table for GPA to HPA translation. This might lead the IOMMU driver to say that it supports snooping control, but in reality, it does not. Fix this by always setting PASID-table-entry.PGSNP whenever a pasid entry is setting up for GPA to HPA translation so that the IOMMU driver could report snoop capability as long as it runs in the scalable mode. Fixes: b802d070a52a1 ("iommu/vt-d: Use iova over first level") Suggested-by: Rajesh Sankaran Suggested-by: Kevin Tian Suggested-by: Ashok Raj Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210330021145.13824-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 18d8c74ec5987a78bd1e9c1c629dfdd04a151a89 Author: Yong Wu Date: Fri Mar 26 11:23:37 2021 +0800 iommu/mediatek: Allow building as module The IOMMU in many SoC depends on the MM clocks and power-domain which are device_initcall normally, thus the subsys_init here is not helpful. This patch switches it to module_platform_driver which also allow the driver built as module. Correspondingly switch the config to tristate, and update the iommu_ops's owner. Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20210326032337.24578-2-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit 8de000cf0265eaa4f63aff9f2c7a3876d2dda9b6 Author: Yong Wu Date: Fri Mar 26 11:23:36 2021 +0800 iommu/mediatek-v1: Allow building as module This patch only adds support for building the IOMMU-v1 driver as module. Correspondingly switch the config to tristate and update the iommu_ops's owner to THIS_MODULE. Signed-off-by: Yong Wu Link: https://lore.kernel.org/r/20210326032337.24578-1-yong.wu@mediatek.com Signed-off-by: Joerg Roedel commit 6e1ea50a065ed1ff8a27cde3e1876ed7dfda97fd Author: John Garry Date: Thu Mar 25 20:30:01 2021 +0800 iommu: Stop exporting free_iova_fast() Function free_iova_fast() is only referenced by dma-iommu.c, which can only be in-built, so stop exporting it. This was missed in an earlier tidy-up patch. Signed-off-by: John Garry Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/1616675401-151997-5-git-send-email-john.garry@huawei.com Signed-off-by: Joerg Roedel commit 149448b353e2517ecc6eced7d9f46e9f3e08b89e Author: John Garry Date: Thu Mar 25 20:30:00 2021 +0800 iommu: Delete iommu_dma_free_cpu_cached_iovas() Function iommu_dma_free_cpu_cached_iovas() no longer has any caller, so delete it. With that, function free_cpu_cached_iovas() may be made static. Signed-off-by: John Garry Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/1616675401-151997-4-git-send-email-john.garry@huawei.com Signed-off-by: Joerg Roedel commit 363f266eeff6e22a09483dc922dccd7cd0b9fe9c Author: John Garry Date: Thu Mar 25 20:29:59 2021 +0800 iommu/vt-d: Remove IOVA domain rcache flushing for CPU offlining Now that the core code handles flushing per-IOVA domain CPU rcaches, remove the handling here. Reviewed-by: Lu Baolu Signed-off-by: John Garry Link: https://lore.kernel.org/r/1616675401-151997-3-git-send-email-john.garry@huawei.com Signed-off-by: Joerg Roedel commit f598a497bc7dfbec60270bca8b8408db3d23ac07 Author: John Garry Date: Thu Mar 25 20:29:58 2021 +0800 iova: Add CPU hotplug handler to flush rcaches Like the Intel IOMMU driver already does, flush the per-IOVA domain CPU rcache when a CPU goes offline - there's no point in keeping it. Reviewed-by: Robin Murphy Signed-off-by: John Garry Link: https://lore.kernel.org/r/1616675401-151997-2-git-send-email-john.garry@huawei.com Signed-off-by: Joerg Roedel commit b92ed9dc2b13d76eceaf73f13146e17842bb5fc6 Author: Martin Kaiser Date: Tue Apr 6 22:48:29 2021 +0200 staging: rtl8188eu: remove an obsolete comment This driver does not set URB_ZERO_PACKET. The rtl8188eu driver that's available from Realtek/Edimax has some commented-out code that sets zero packet. It was removed from this driver before it was imported. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 057a5a803860cc508bdd5449d5464b2ef2fb0f82 Author: Martin Kaiser Date: Tue Apr 6 22:48:28 2021 +0200 staging: rtl8188eu: clean up usb_write32 Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit cecaae74ea8981bacf4b65dae5cf0a0a14ab71db Author: Martin Kaiser Date: Tue Apr 6 22:48:27 2021 +0200 staging: rtl8188eu: clean up usb_write16 Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 4f178eeb0d77d787e57ac01f515bcf180d6d9ab3 Author: Martin Kaiser Date: Tue Apr 6 22:48:26 2021 +0200 staging: rtl8188eu: clean up usb_write8 Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit e8f44d356e6b6a83b907184852e8d4ce1384fd59 Author: Martin Kaiser Date: Tue Apr 6 22:48:25 2021 +0200 staging: rtl8188eu: clean up usb_read32 Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 00092615162f8ed8ca33cec36ddbd7804c4acbb5 Author: Martin Kaiser Date: Tue Apr 6 22:48:24 2021 +0200 staging: rtl8188eu: clean up usb_read16 Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit cc23e68fdf988162736ee0db9ed519ff8b630eba Author: Martin Kaiser Date: Tue Apr 6 22:48:23 2021 +0200 staging: rtl8188eu: clean up usb_read8 Remove unnecessary variable, summarize declaration and assignment. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 788fde03102781745190153642b7ba6e7aeb3649 Author: Martin Kaiser Date: Tue Apr 6 22:48:22 2021 +0200 staging: rtl8188eu: use actual request type as parameter At the moment, usbctrl_vendorreq's requesttype parameter must be set to 1 for reading and 0 for writing. It's then converted to the actual bmRequestType for the USB control request. We can simplify the code and avoid this conversion if the caller passes the actual bmRequestType. We already have defines for the read and write request types. Move them to usb_ops_linux.c, they're used only inside this file. Replace the numeric values with USB constants to make their meaning clearer. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-4-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 3d0be94f62fdee2278fec653bf6b952136a51516 Author: Martin Kaiser Date: Tue Apr 6 22:48:21 2021 +0200 staging: rtl8188eu: ctrl vendor req index is not used The index for rtl8188eu's vendor-specific control requests is not used. Remove the index parameter from usbctrl_vendorreq and pass index 0 to usb_control_msg. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-3-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit eeb4661560ffe0015a8651c23ebfc578bed6ee58 Author: Martin Kaiser Date: Tue Apr 6 22:48:20 2021 +0200 staging: rtl8188eu: ctrl vendor req value is always 0x05 The bRequest value for the vendor specific control requests sent by this driver is always 0x05. Replace the function parameter with a define. Use the same define as the rtlwifi driver. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-2-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 9d32836dbb1a18090fb5e6c4b0d0544447bea55d Author: Martin Kaiser Date: Tue Apr 6 22:48:19 2021 +0200 staging: rtl8188eu: remove unused efuse hal components struct hal_data_8188e contains some components related to efuses which are not used for rtl8188eu. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210406204829.18130-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 3431c3f660a39f6ced954548a59dba6541ce3eb1 Author: Xiang Chen Date: Thu Mar 25 11:38:24 2021 +0800 iommu: Fix a boundary issue to avoid performance drop After the change of patch ("iommu: Switch gather->end to the inclusive end"), the performace drops from 1600+K IOPS to 1200K in our kunpeng ARM64 platform. We find that the range [start1, end1) actually is joint from the range [end1, end2), but it is considered as disjoint after the change, so it needs more times of TLB sync, and spends more time on it. So fix the boundary issue to avoid performance drop. Fixes: 862c3715de8f ("iommu: Switch gather->end to the inclusive end") Signed-off-by: Xiang Chen Acked-by: Will Deacon Link: https://lore.kernel.org/r/1616643504-120688-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Joerg Roedel commit 52f8b696b7cdaeba932977ded59816113866e2ab Author: Vardhan H G Date: Tue Apr 6 23:17:49 2021 -0700 staging: rt8192u: change constants to be on right When comparing a constant with variable, it is recommeneded to have the constant on the right side of the test. This patch silences the following checkpatch.pl warning: "Comparisons should place the constant on the right side of the test" Signed-off-by: Vardhan H G Link: https://lore.kernel.org/r/20210407061749.13460-1-crazylonestar7@gmail.com Signed-off-by: Greg Kroah-Hartman commit b190d1433ac4a4e8d0f6582cadd983965ae4485b Author: Jiapeng Chong Date: Wed Apr 7 14:07:30 2021 +0800 staging: rtl8192u: remove unused variable Fix the following gcc warning: drivers/staging/rtl8192u/r8192U_core.c:3419:6: warning: variable ‘reset_status’ set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1617775650-42645-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 85adda6197f2c00ab1eea823e4eeb22aa4653ea0 Author: Jiapeng Chong Date: Wed Apr 7 11:52:38 2021 +0800 staging: rtl8192e: rtl8192E_dev: remove unused variable Fix the following gcc warning: drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:693:15: warning: variable ‘tmpRegC’ set but not used [-Wunused-but-set-variable]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1617767558-114050-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit f179515da9780c4cd37bee76c3cbb6f7364451d6 Author: Christophe JAILLET Date: Tue Apr 6 22:41:32 2021 +0200 staging: rtl8712: Use constants from Some constants defined in wifi.h are already defined in with some other (but similar) names. Be consistent and use the ones from . The conversions made are: _SSID_IE_ --> WLAN_EID_SSID _SUPPORTEDRATES_IE_ --> WLAN_EID_SUPP_RATES _DSSET_IE_ --> WLAN_EID_DS_PARAMS _IBSS_PARA_IE_ --> WLAN_EID_IBSS_PARAMS _ERPINFO_IE_ --> WLAN_EID_ERP_INFO _EXT_SUPPORTEDRATES_IE_ --> WLAN_EID_EXT_SUPP_RATES _HT_CAPABILITY_IE_ --> WLAN_EID_HT_CAPABILITY _HT_EXTRA_INFO_IE_ --> WLAN_EID_HT_OPERATION (not used) _HT_ADD_INFO_IE_ --> WLAN_EID_HT_OPERATION _VENDOR_SPECIFIC_IE_ --> WLAN_EID_VENDOR_SPECIFIC _RESERVED47_ --> (not used) Signed-off-by: Christophe JAILLET Link: https://lore.kernel.org/r/fe35fb45323adc3a30f31b7280cec7700fd325d8.1617741313.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit bc21df678b4d5dad74d15a841b2eb5c3e1e4bada Author: Zhansaya Bagdauletkyzy Date: Tue Apr 6 22:11:31 2021 +0600 staging: rtl8723bs: core: Move constants to the right of comparison Move constant variables to the right side of comparisons to increase consistency with Linux kernel code base. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/20210406161131.GA103324@zhans Signed-off-by: Greg Kroah-Hartman commit cd2c304266b8ffc27706480cde0f9392763e3af1 Author: Fabio M. De Francesco Date: Tue Apr 6 18:40:01 2021 +0200 staging: rtl8723bs: hal: Add spaces around operator in HalBtc8723b1Ant.h Added spaces around operators in file HalBtc8723b1Ant.h. Issue detected by checkpatch.pl. Spaces are preferred to improve readibility. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210406164001.13646-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2dc7daaa33d93fe5b18f5037ac053614e1bbf980 Author: Fabio M. De Francesco Date: Tue Apr 6 19:00:11 2021 +0200 staging: rtl8723bs: hal: Add spaces around operators in HalBtc8723b2Ant.c Added spaces around operators in file HalBtc8723b2Ant.c. Issue detected by checkpatch.pl. Spaces are preferred to improve readibility. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210406170011.20753-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit f26f85858d7fa6b5485e73b8fa5e07e782fd6669 Author: Fabio M. De Francesco Date: Tue Apr 6 20:14:28 2021 +0200 staging: rtl8723bs: hal: Add spaces around operators in hal_btcoex.c Added spaces around operators. Issue detected by checkpatch.pl. Spaces around operators are preferred to improve readibility. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210406181428.15097-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2466b0b27ca2ee99185c942f0049ff5e67572ec2 Author: Beatriz Martins de Carvalho Date: Tue Apr 6 16:58:15 2021 +0100 staging: rtl8723bs: core: reorganize characters so the lines are under 100 ch Cleans up warnings of "line over 100 characters" but avoiding more than 90 characters in file rtw_ap.c Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/20210406155815.90271-1-martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7948c501d668b4bdbc48173b68f6f9118a012bfc Author: Fabio M. De Francesco Date: Tue Apr 6 17:46:35 2021 +0200 staging: rtl8723bs: hal: Add spaces around operators Added spaces around operators in file HalBtc8723b1Ant.c. Issue detected by checkpatch.pl. Spaces are preferred to improve readibility. Signed-off-by: Fabio M. De Francesco Link: https://lore.kernel.org/r/20210406154635.23191-1-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman commit 442b81836d6fdde1cf7dc5fc437a5f770c84498b Author: Lu Baolu Date: Tue Mar 23 09:06:00 2021 +0800 iommu/vt-d: Make unnecessarily global functions static Make some functions static as they are only used inside pasid.c. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210323010600.678627-6-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1b169fdf427f9401bf9c8544cb9942580c06f8ef Author: Lu Baolu Date: Tue Mar 23 09:05:59 2021 +0800 iommu/vt-d: Remove unused function declarations Some functions have been removed. Remove the remaining function delarations. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210323010600.678627-5-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 757072abe1c0b67cb226936c709291889658a222 Author: Loic Poulain Date: Fri Mar 19 16:50:37 2021 +0100 bus: mhi: pci_generic: Implement PCI shutdown callback Deinit the device on shutdown to halt MHI/PCI operation on device side. This change fixes floating device state with some hosts that do not fully shutdown PCIe device when rebooting. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1616169037-7969-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 06905ea8319731036695cf1a4c53c12b0f9373cb Author: Lu Baolu Date: Tue Mar 23 09:05:58 2021 +0800 iommu/vt-d: Remove SVM_FLAG_PRIVATE_PASID The SVM_FLAG_PRIVATE_PASID has never been referenced in the tree, and there's no plan to have anything to use it. So cleanup it. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210323010600.678627-4-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 2e1a44c1c4acf209c0dd7bc04421d101b9e80d11 Author: Lu Baolu Date: Tue Mar 23 09:05:57 2021 +0800 iommu/vt-d: Remove svm_dev_ops The svm_dev_ops has never been referenced in the tree, and there's no plan to have anything to use it. Remove it to make the code neat. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210323010600.678627-3-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 117bfa8d5d4cb50556a59381d0f10fe762c1cd28 Author: Lu Baolu Date: Tue Mar 23 09:05:56 2021 +0800 iommu/vt-d: Remove unused dma map/unmap trace events With commit c588072bba6b5 ("iommu/vt-d: Convert intel iommu driver to the iommu ops"), the trace events for dma map/unmap have no users any more. Cleanup them to make the code neat. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210323010600.678627-2-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 1d421058c815d54113d9afdf6db3f995c788cf0d Author: Lu Baolu Date: Sat Mar 20 10:41:56 2021 +0800 iommu/vt-d: Don't set then clear private data in prq_event_thread() The VT-d specification (section 7.6) requires that the value in the Private Data field of a Page Group Response Descriptor must match the value in the Private Data field of the respective Page Request Descriptor. The private data field of a page group response descriptor is set then immediately cleared in prq_event_thread(). This breaks the rule defined by the VT-d specification. Fix it by moving clearing code up. Fixes: 5b438f4ba315d ("iommu/vt-d: Support page request in scalable mode") Cc: Jacob Pan Reviewed-by: Liu Yi L Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210320024156.640798-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 6470a8206a10cae1f18a3e5a95dde2b364a06e10 Merge: e91cafdf3c18b e09fe91353998 Author: Greg Kroah-Hartman Date: Wed Apr 7 10:08:28 2021 +0200 Merge tag 'iio-for-5.13b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: 2nd set of IIO features, cleanups etc for 5.13 Trying again as a wrong fixes tag managed to beat the checking script I was running. A few of these are fixes for major rework earlier in cycle. Bulk of patches are the ad7150 pre graduation cleanup, some link fixes in maintainers and set using the new IRQF_NO_AUTOEN flag. Note includes a merge of a tag from tip to get the IRQF_NO_AUTOEN support (one patch only from Barry Song) Staging graduation * adi,ad7150 CDC - A lot of precursor patches cleaning it up first. - Includes core support for timeout event ABI where after a time a adaptive threshold jumps to fix slow tracking problems. Cleanups and minor / late breaking fixes * core - Use sysfs_emit() and sysfs_emit_at() as appropriate - Fix a bug introduced in this cycle for iio_read_channel_processed_scale() - Fix handling of getfd ioctl as IIO_IOCTL_UNHANDLED is a valid ioctl number - Tidy up some pointless type conversion in string formatting and odd indentation. * dac - Use sysfs_emit() for powerdown attribute show() functions. * docs - Fix dead links due to txt to yaml binding conversions. * treewide - Use IRQF_NO_AUTOEN * various - Typo fixes in comments. * triggers/hr-timer-trigger - Fix an overflow handing issue. * ad,ad7923 - Device managed functions in probe() * ad,ad9467 - Fix kconfig dependency issue * adi,adis16201 - Fix a wrong axis assignment that stops the driver loading. * invensense,mpu6050 - Allow use as a standalone trigger (no channels enabled) - Drop unnecessary manual assignment of indio_dev->modes - Make device function in a basic way if no interrupt wired. - Sanity check scale writes. * semtech,sx9310 - Fix access to a variable length array in DT binding. - Sanity check input before writing debounce register. * st,stm32-dfsdm - Drop __func__ from dev_dbg() and pr_debug(). * yamaha,yas530 - Include asm/unaligned.h instead of be_byteshift.h - Fix an issue with return value on an error path. * tag 'iio-for-5.13b-take2' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (76 commits) iio: inv_mpu6050: Fully validate gyro and accel scale writes iio: sx9310: Fix write_.._debounce() iio: sx9310: Fix access to variable DT array iio: adc: Kconfig: make AD9467 depend on ADI_AXI_ADC symbol iio: magnetometer: yas530: Include right header iio: magnetometer: yas530: Fix return value on error path iio:cdc:ad7150: Fix use of uninitialized ret iio: hrtimer-trigger: Fix potential integer overflow in iio_hrtimer_store_sampling_frequency iio:adc: Fix trivial typo iio:adc:ad7476: Fix remove handling iio:adc:ad_sigma_delta: Use IRQF_NO_AUTOEN rather than request and disable iio:imu:adis: Use IRQF_NO_AUTOEN instead of irq request then disable iio:chemical:scd30: Use IRQF_NO_AUTOEN to avoid irq request then disable iio:adc:sun4i-gpadc: Use new IRQF_NO_AUTOEN flag instead of request then disable iio:adc:nau7802: Use IRQF_NO_AUTOEN instead of request then disable iio:adc:exynos-adc: Use new IRQF_NO_AUTOEN flag rather than separate irq_disable() iio:adc:ad7766: Use new IRQF_NO_AUTOEN to reduce boilerplate iio: buffer: use sysfs_attr_init() on allocated attrs iio: trigger: Fix strange (ladder-type) indentation iio: trigger: Replace explicit casting and wrong specifier with proper one ... commit 803766cbf85fb8edbf896729bbefc2d38dcf1e0a Author: Lu Baolu Date: Sat Mar 20 10:09:16 2021 +0800 iommu/vt-d: Fix lockdep splat in intel_pasid_get_entry() The pasid_lock is used to synchronize different threads from modifying a same pasid directory entry at the same time. It causes below lockdep splat. [ 83.296538] ======================================================== [ 83.296538] WARNING: possible irq lock inversion dependency detected [ 83.296539] 5.12.0-rc3+ #25 Tainted: G W [ 83.296539] -------------------------------------------------------- [ 83.296540] bash/780 just changed the state of lock: [ 83.296540] ffffffff82b29c98 (device_domain_lock){..-.}-{2:2}, at: iommu_flush_dev_iotlb.part.0+0x32/0x110 [ 83.296547] but this lock took another, SOFTIRQ-unsafe lock in the past: [ 83.296547] (pasid_lock){+.+.}-{2:2} [ 83.296548] and interrupts could create inverse lock ordering between them. [ 83.296549] other info that might help us debug this: [ 83.296549] Chain exists of: device_domain_lock --> &iommu->lock --> pasid_lock [ 83.296551] Possible interrupt unsafe locking scenario: [ 83.296551] CPU0 CPU1 [ 83.296552] ---- ---- [ 83.296552] lock(pasid_lock); [ 83.296553] local_irq_disable(); [ 83.296553] lock(device_domain_lock); [ 83.296554] lock(&iommu->lock); [ 83.296554] [ 83.296554] lock(device_domain_lock); [ 83.296555] *** DEADLOCK *** Fix it by replacing the pasid_lock with an atomic exchange operation. Reported-and-tested-by: Dave Jiang Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210320020916.640115-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit 32cbc7cb70b07041e82f897f96b3035358470b14 Author: Manivannan Sadhasivam Date: Mon Apr 5 10:39:12 2021 +0530 mtd: rawnand: qcom: Use dma_mapping_error() for error check dma_mapping_error() should be used for checking the error value of dma_map_resource() API. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210405050912.115591-1-manivannan.sadhasivam@linaro.org commit 076de75de1e53160e9b099f75872c1f9adf41a0b Author: Lv Yunlong Date: Fri Apr 2 23:09:05 2021 -0700 mtd: rawnand: gpmi: Fix a double free in gpmi_nand_init If the callee gpmi_alloc_dma_buffer() failed to alloc memory for this->raw_buffer, gpmi_free_dma_buffer() will be called to free this->auxiliary_virt. But this->auxiliary_virt is still a non-NULL and valid ptr. Then gpmi_alloc_dma_buffer() returns err and gpmi_free_dma_buffer() is called again to free this->auxiliary_virt in err_out. This causes a double free. As gpmi_free_dma_buffer() has already called in gpmi_alloc_dma_buffer's error path, so it should return err directly instead of releasing the dma buffer again. Fixes: 4d02423e9afe6 ("mtd: nand: gpmi: Fix gpmi_nand_init() error path") Signed-off-by: Lv Yunlong Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210403060905.5251-1-lyl2019@mail.ustc.edu.cn commit ab2c8d3ef9b828a1eb1a7d448185bf4242bb0afd Author: Manivannan Sadhasivam Date: Fri Apr 2 20:31:28 2021 +0530 mtd: rawnand: qcom: Add missing nand_cleanup() in error path Add missing nand_cleanup() in the alloc_bam_transaction() error path to cleanup the resources properly. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210402150128.29128-5-manivannan.sadhasivam@linaro.org commit 13b89768275d6ca9764bf91449e4cafe46ba706b Author: Manivannan Sadhasivam Date: Fri Apr 2 20:31:27 2021 +0530 mtd: rawnand: Add support for secure regions in NAND memory On a typical end product, a vendor may choose to secure some regions in the NAND memory which are supposed to stay intact between FW upgrades. The access to those regions will be blocked by a secure element like Trustzone. So the normal world software like Linux kernel should not touch these regions (including reading). The regions are declared using a NAND chip DT property, "secure-regions". So let's make use of this property in the raw NAND core and skip access to the secure regions present in a system. Signed-off-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210402150128.29128-4-manivannan.sadhasivam@linaro.org commit ee590106c331ad54df9da3052b5c52014b2edb0b Author: Manivannan Sadhasivam Date: Fri Apr 2 20:31:26 2021 +0530 dt-bindings: mtd: Add a property to declare secure regions in NAND chips On a typical end product, a vendor may choose to secure some regions in the NAND memory which are supposed to stay intact between FW upgrades. The access to those regions will be blocked by a secure element like Trustzone. So the normal world software like Linux kernel should not touch these regions (including reading). So let's add a property for declaring such secure regions so that the drivers can skip touching them. Reviewed-by: Rob Herring Signed-off-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210402150128.29128-3-manivannan.sadhasivam@linaro.org commit da386f7f233327ce763b0d2c2ae4b0626a3d9517 Author: Manivannan Sadhasivam Date: Fri Apr 2 20:31:25 2021 +0530 dt-bindings: mtd: Convert Qcom NANDc binding to YAML Convert Qcom NANDc devicetree binding to YAML. Signed-off-by: Manivannan Sadhasivam Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210402150128.29128-2-manivannan.sadhasivam@linaro.org commit c1c1d437b1f0a84de6b53416026f7ea1ef3df996 Author: Mauro Carvalho Chehab Date: Wed Apr 7 09:36:25 2021 +0200 MAINTAINERS: update ovti,ov2680.yaml reference The file name: Documentation/devicetree/bindings/media/i2c/ov2680.yaml should be, instead: Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml. Update its cross-reference accordingly. Fixes: 57226cd8c8bf ("media: dt-bindings: ov2680: convert bindings to yaml") Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit 48bca4835b94b062ce4bc14f596549763b11c763 Author: Mauro Carvalho Chehab Date: Wed Apr 7 09:36:41 2021 +0200 MAINTAINERS: update imi,rdacm2x-gmsl.yaml reference The file name: Documentation/devicetree/bindings/media/i2c/rdacm2x-gmsl.yaml should be, instead: Documentation/devicetree/bindings/media/i2c/imi,rdacm2x-gmsl.yaml. Update its cross-reference accordingly. Fixes: 34009bffc1c6 ("media: i2c: Add RDACM20 driver") Fixes: e9f817689789 ("media: dt-bindings: media: i2c: Add bindings for IMI RDACM2x") Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit e09fe9135399807b8397798a53160e055dc6c29f Author: Lars-Peter Clausen Date: Mon Apr 5 13:44:41 2021 +0200 iio: inv_mpu6050: Fully validate gyro and accel scale writes When setting the gyro or accelerometer scale the inv_mpu6050 driver ignores the integer part of the value. As a result e.g. all of 0.13309, 1.13309, 12345.13309, ... are accepted as a valid gyro scale and 0.13309 is the scale that gets set in all those cases. Make sure to check that the integer part of the scale value is 0 and reject it otherwise. Fixes: 09a642b78523 ("Invensense MPU6050 Device Driver.") Signed-off-by: Lars-Peter Clausen Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20210405114441.24167-1-lars@metafoo.de Cc: Signed-off-by: Jonathan Cameron commit fc948409ccc1e8afe8655cee77c686eedbfbee60 Author: Gwendal Grignou Date: Wed Mar 31 11:22:22 2021 -0700 iio: sx9310: Fix write_.._debounce() Check input to be sure it matches Semtech sx9310 specification and can fit into debounce register. Compare argument writen to thresh_.._period with read from same sysfs attribute: Before: Afer: write | read write | read -1 | 8 -1 fails: -EINVAL 0 | 8 0 | 0 1 | 0 1 | 0 2..15 | 2^log2(N) 2..15 | 2^log2(N) 16 | 0 >= 16 fails: -EINVAL Fixes: 1b6872015f0b ("iio: sx9310: Support setting debounce values") Signed-off-by: Gwendal Grignou Cc: stable@vger.kernel.org Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210331182222.219533-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 6f0078ae704d94b1a93e5f3d0a44cf3d8090fa91 Author: Gwendal Grignou Date: Fri Mar 26 11:46:02 2021 -0700 iio: sx9310: Fix access to variable DT array With the current code, we want to read 4 entries from DT array "semtech,combined-sensors". If there are less, we silently fail as of_property_read_u32_array() returns -EOVERFLOW. First count the number of entries and if between 1 and 4, collect the content of the array. Fixes: 5b19ca2c78a0 ("iio: sx9310: Set various settings from DT") Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210326184603.251683-2-gwendal@chromium.org Cc: Signed-off-by: Jonathan Cameron commit 194eafc9c1d49b53b59de9821fb63d423344cae3 Author: Alexandru Ardelean Date: Wed Mar 24 20:27:46 2021 +0200 iio: adc: Kconfig: make AD9467 depend on ADI_AXI_ADC symbol Because a dependency on HAS_IOMEM and OF was added for the ADI AXI ADC driver, this makes the AD9467 driver have some build/dependency issues when OF is disabled (typically on ACPI archs like x86). This is because the selection of the AD9467 enforces the ADI_AXI_ADC symbol which is blocked by the OF (and potentially HAS_IOMEM) being disabled. To fix this, we make the AD9467 driver depend on the ADI_AXI_ADC symbol. The AD9467 driver cannot operate on it's own. It requires the ADI AXI ADC driver to stream data (or some similar IIO interface). So, the fix here is to make the AD9467 symbol depend on the ADI_AXI_ADC symbol. At some point this could become it's own subgroup of high-speed ADCs. Fixes: be24c65e9fa24 ("iio: adc: adi-axi-adc: add proper Kconfig dependencies") Reported-by: Randy Dunlap Signed-off-by: Alexandru Ardelean Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210324182746.9337-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit bb354aeb364f9dee51e16edfdf6194ce4ba9237e Author: Linus Walleij Date: Mon Feb 15 16:30:32 2021 +0100 iio: magnetometer: yas530: Include right header To get access to the big endian byte order parsing helpers drivers need to include and nothing else. Reported-by: kernel test robot Suggested-by: Harvey Harrison Signed-off-by: Linus Walleij Cc: Link: https://lore.kernel.org/r/20210215153032.47962-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit e64837bf9e2c063d6b5bab51c0554a60270f636d Author: Linus Walleij Date: Mon Feb 15 16:30:23 2021 +0100 iio: magnetometer: yas530: Fix return value on error path There was a missed return variable assignment in the default errorpath of the switch statement in yas5xx_probe(). Fix it. Reported-by: kernel test robot Reported-by: Dan Carpenter Suggested-by: Andy Shevchenko Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210215153023.47899-1-linus.walleij@linaro.org Cc: Signed-off-by: Jonathan Cameron commit 032aec339c86b565b2eef5c677c59294ef1112b9 Author: Jonathan Cameron Date: Tue Apr 6 09:23:37 2021 +0100 iio:cdc:ad7150: Fix use of uninitialized ret This doesn't appear to generate a warning on all versions of GCC, but 0-day reported it and the report looks valid. Reported-by: kbuild test robot Signed-off-by: Jonathan Cameron commit c10f8109f78b4e3722003c923e6aeebc73a6134a Author: Gustavo A. R. Silva Date: Mon Mar 29 15:58:17 2021 -0500 iio: hrtimer-trigger: Fix potential integer overflow in iio_hrtimer_store_sampling_frequency Add suffix ULL to constant 1000 in order to avoid a potential integer overflow and give the compiler complete information about the proper arithmetic to use. Notice that this constant is being used in a context that expects an expression of type unsigned long long, but it's currently evaluated using 32-bit arithmetic. Addresses-Coverity-ID: 1503062 ("Unintentional integer overflow") Fixes: dafcf4ed8392 ("iio: hrtimer: Allow sub Hz granularity") Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210329205817.GA188755@embeddedor Signed-off-by: Jonathan Cameron commit 4d84487d963164bf661deff86eaca3d6a789e9cf Author: Jonathan Cameron Date: Thu Apr 1 16:08:10 2021 +0100 iio:adc: Fix trivial typo "an" should be "and". Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210401150810.227168-1-jic23@kernel.org commit 6baee4bd63f5fdf1716f88e95c21a683e94fe30d Author: Jonathan Cameron Date: Thu Apr 1 18:17:57 2021 +0100 iio:adc:ad7476: Fix remove handling This driver was in an odd half way state between devm based cleanup and manual cleanup (most of which was missing). I would guess something went wrong with a rebase or similar. Anyhow, this basically finishes the job as a precursor to improving the regulator handling. Signed-off-by: Jonathan Cameron Fixes: 4bb2b8f94ace3 ("iio: adc: ad7476: implement devm_add_action_or_reset") Cc: Michael Hennerich Reviewed-by: Alexandru Ardelean Cc: Link: https://lore.kernel.org/r/20210401171759.318140-2-jic23@kernel.org commit eaa17fa7d8da035541bb99fe91dcd4b77dd1f275 Author: Jonathan Cameron Date: Fri Apr 2 19:45:44 2021 +0100 iio:adc:ad_sigma_delta: Use IRQF_NO_AUTOEN rather than request and disable These devices are not able to mask the signal used as a data ready interrupt. As such they previously requested the irq then immediately disabled it. Now we can avoid the potential of a spurious interrupt by avoiding the irq being auto enabled in the first place. I'm not sure how this code could have been called with the irq already disabled, so I believe the conditional would always have been true and have removed it. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Cc: Alexandru Ardelean Reviewed-by: Andy Shevchenko Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210402184544.488862-8-jic23@kernel.org commit 30f6a542b7d39b1ba990a28a3891bc03691d8d41 Author: Jonathan Cameron Date: Fri Apr 2 19:45:43 2021 +0100 iio:imu:adis: Use IRQF_NO_AUTOEN instead of irq request then disable This is a bit involved as the adis library code already has some sanity checking of the flags of the requested irq that we need to ensure is happy to pass through the IRQF_NO_AUTOEN flag untouched. Using this flag avoids us autoenabling the irq in the adis16460 and adis16475 drivers which cover parts that don't have any means of masking the interrupt on the device end. Note, compile tested only! Signed-off-by: Jonathan Cameron Cc: Alexandru Ardelean Reviewed-by: Nuno Sa Reviewed-by: Barry Song Reviewed-by: Andy Shevchenko Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210402184544.488862-7-jic23@kernel.org commit dbb8f20d839b127a124ff222fd3dae27f0cb554e Author: Jonathan Cameron Date: Fri Apr 2 19:45:42 2021 +0100 iio:chemical:scd30: Use IRQF_NO_AUTOEN to avoid irq request then disable This new flag cleanly avoids the need for a dance where we request the interrupt only to immediately disabling it by ensuring it is not auto-enabled in the first place. Signed-off-by: Jonathan Cameron Cc: Tomasz Duszynski Reviewed-by: Barry Song Reviewed-by: Andy Shevchenko Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210402184544.488862-6-jic23@kernel.org commit ff2293ea9c17a85ca6da557a5c123b441efd46a3 Author: Jonathan Cameron Date: Fri Apr 2 19:45:41 2021 +0100 iio:adc:sun4i-gpadc: Use new IRQF_NO_AUTOEN flag instead of request then disable This new flag ensures a requested irq is not autoenabled, thus removing the need for the disable_irq() that follows and closing off any chance of spurious interrupts. Signed-off-by: Jonathan Cameron Cc: Maxime Ripard Reviewed-by: Barry Song Reviewed-by: Andy Shevchenko Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210402184544.488862-5-jic23@kernel.org commit aef3ef165972ca16e3b87ec024e6edfad642e230 Author: Jonathan Cameron Date: Fri Apr 2 19:45:40 2021 +0100 iio:adc:nau7802: Use IRQF_NO_AUTOEN instead of request then disable Whilst a race during interrupt enabling is probably not a problem, it is better to not enable the interrupt at all. The new IRQF_NO_AUTOEN flag allows us to do that. Signed-off-by: Jonathan Cameron Cc: Alexandre Belloni Reviewed-by: Barry Song Reviewed-by: Andy Shevchenko Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210402184544.488862-4-jic23@kernel.org commit 42004ceb3404b198379d59b0d31ea566b4912869 Author: Jonathan Cameron Date: Fri Apr 2 19:45:39 2021 +0100 iio:adc:exynos-adc: Use new IRQF_NO_AUTOEN flag rather than separate irq_disable() Disabling an irq before the driver has actually atempted to request it may work, but is definitely not as clean as just requesting it as normal but with the auto enable disabled. Signed-off-by: Jonathan Cameron Cc: Krzysztof Kozlowski Reviewed-by: Barry Song Reviewed-by: Krzysztof Kozlowski Reviewed-by: Andy Shevchenko Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210402184544.488862-3-jic23@kernel.org commit 0be49bdedcfd1e6afd838a4f34cc310b8bbb0c9a Author: Jonathan Cameron Date: Fri Apr 2 19:45:38 2021 +0100 iio:adc:ad7766: Use new IRQF_NO_AUTOEN to reduce boilerplate As iio_poll_trigger() is safe against spurious interrupts when the trigger is not enabled, this is not a fix despite looking like a race. It is nice to simplify the code however so the interrupt is never enabled in the first place. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Barry Song Reviewed-by: Andy Shevchenko Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210402184544.488862-2-jic23@kernel.org commit aefaee4ec899b6d562a50972ce3c0dd0b38d7d98 Merge: ca3e7d524cc82 cbe16f35bee68 Author: Jonathan Cameron Date: Mon Apr 5 15:23:00 2021 +0100 Merge tag 'irq-no-autoen-2021-03-25' into togreg Tag for the input subsystem to pick up Picked up for IIO to allow similar changes. commit ca3e7d524cc82fe198984327c49e5bc276e5a432 Author: Alexandru Ardelean Date: Fri Apr 2 20:42:26 2021 +0300 iio: buffer: use sysfs_attr_init() on allocated attrs When dynamically allocating sysfs attributes, it's a good idea to call sysfs_attr_init() on them to initialize lock_class_keys. This change does that. The lock_class_keys are set when the CONFIG_DEBUG_LOCK_ALLOC symbol is enabled. Which is [likely] one reason why I did not see this during development. I also am not able to see this even with CONFIG_DEBUG_LOCK_ALLOC enabled, so this may [likely] be reproduce-able on some system configurations. This was reported via: https://lore.kernel.org/linux-iio/CA+U=DsrsvGgXEF30-vXuXS_k=-mjSjiBwEEzwKb1hJVn1P98OA@mail.gmail.com/T/#u Fixes: 15097c7a1adc ("iio: buffer: wrap all buffer attributes into iio_dev_attr") Reported-by: Marek Szyprowski Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210402174226.630346-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit af3bac44b1c5f19ee02b4fb5ef957c6163934a71 Author: Andy Shevchenko Date: Fri Apr 2 20:49:11 2021 +0300 iio: trigger: Fix strange (ladder-type) indentation In some cases indentation looks a bit weird with starting from = sign and being in a ladder-type style. Unify it across the module. While at it, add blank line after definition block where it needed, Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210402174911.44408-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit ebb9493c07e1bb3d7a443b32954f7ddf7f971d57 Author: Andy Shevchenko Date: Fri Apr 2 20:49:10 2021 +0300 iio: trigger: Replace explicit casting and wrong specifier with proper one By unknown reason device name is set with an index casted from int to unsigned long while at the same time with "%ld" specifier. Both parts seems wrong to me, thus replace replace explicit casting and wrong specifier with proper one, i.e. "%d". Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210402174911.44408-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit bb142d4433e4c0294aa2727b576c72a2a4032c6e Author: Mugilraj Dhavachelvan Date: Thu Apr 1 21:13:43 2021 +0530 iio: adc: stm32-dfsdm: drop __func__ while using Dynamic debug Dropped __func__ while using dev_dbg() and pr_debug() If the function name is desired, it can be configured using dynamic debug. Signed-off-by: Mugilraj Dhavachelvan Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210401154343.41527-1-dmugil2000@gmail.com Signed-off-by: Jonathan Cameron commit 7604c2f9ea8c572399a788035dd151ee9327b82d Author: Jonathan Cameron Date: Thu Apr 1 15:54:10 2021 +0100 iio:adc: Drop false comment about lack of timestamp control The timestamp control has been a function implemented in the core of IIO for a long time, so this comment is incorrect and has clearly been cut and paste into all these drivers. The remainder of the comment added nothing and was confusing so dropped that as well. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Cc: Michael Hennerich Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210401145410.226917-1-jic23@kernel.org commit 8cc110478cab83d71f217a9aafec034ed63a5f8e Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:45 2021 +0200 dt-bindings:iio:dac: update microchip,mcp4725.yaml reference Changeset 6ced946a4bba ("dt-bindings:iio:dac:microchip,mcp4725 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/mcp4725.txt to: Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml. Update its cross-reference accordingly. Fixes: 6ced946a4bba ("dt-bindings:iio:dac:microchip,mcp4725 yaml conversion") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/82fb54974e8a22be15e64343260a6de39a18edda.1617279356.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit a909ba1ae988206c4ceffc7a08f4c7cd74f187d0 Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:41 2021 +0200 MAINTAINERS: update ti,dac7612.yaml reference Changeset 8b74e06b0f4d ("dt-bindings:iio:dac:ti,dac7612 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/ti,dac7612.txt to: Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml. Update its cross-reference accordingly. Fixes: 8b74e06b0f4d ("dt-bindings:iio:dac:ti,dac7612 yaml conversion") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/04039b6991838f0107a42ccb0d9774cb8873a61a.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 01ec483013a3af3a7c76e10b8b0d6d458c69d407 Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:39 2021 +0200 MAINTAINERS: update st,vl53l0x.yaml reference Changeset b4be8bd1c6a2 ("dt-bindings:iio:proximity:st,vl53l0x yaml conversion") renamed: Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt to: Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml. Update its cross-reference accordingly. Fixes: b4be8bd1c6a2 ("dt-bindings:iio:proximity:st,vl53l0x yaml conversion") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/c315ff7435bb4382b9c729a6242d098befb7796d.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 5f8bef56e150abf0d473e9563028d5321dd922ea Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:38 2021 +0200 MAINTAINERS: update st,lsm6dsx.yaml reference Changeset 7a2cf8e91390 ("dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt to: Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml. Update its cross-reference accordingly. Fixes: 7a2cf8e91390 ("dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/e058dc096c39933eb7647a86c57b3489906c89c3.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 1867eff87a4f9613422a62243d5c0ba5265e364e Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:37 2021 +0200 MAINTAINERS: update renesas,rcar-gyroadc.yaml reference Changeset 8c41245872e2 ("dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt to: Documentation/devicetree/bindings/iio/adc/renesas,rcar-gyroadc.yaml. Update its cross-reference accordingly. Fixes: 8c41245872e2 ("dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/aa999b76bb0b6c3ca4cb0c1a8679c22c91690429.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit f4bec27fad55d8b92d7e86260cb7f5114760877e Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:36 2021 +0200 MAINTAINERS: update pni,rm3100.yaml reference Changeset f383069be33e ("dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt to: Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.yaml. Update its cross-reference accordingly. Fixes: f383069be33e ("dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d9090dc18907b4c534bf12a47e47a96ed1d3b45a.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 63e6b02cf29808087d4576184ea091316a298e66 Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:35 2021 +0200 MAINTAINERS: update atmel,sama5d2-adc.yaml reference Changeset 58ff1b519753 ("dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt to: Documentation/devicetree/bindings/iio/adc/atmel,sama5d2-adc.yaml. Update its cross-reference accordingly. Fixes: 58ff1b519753 ("dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4574e4b7612f5fd683fddbcd7d7307d5e6d02988.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 40ee0e2a7d1149fc1fad36cb09c7a0699a841a18 Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:30 2021 +0200 MAINTAINERS: update voltage-divider.yaml reference Changeset 6f633bc91ac1 ("dt-bindings:iio:afe:voltage-divider: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/afe/voltage-divider.txt to: Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml. Update its cross-reference accordingly. Fixes: 6f633bc91ac1 ("dt-bindings:iio:afe:voltage-divider: txt to yaml conversion") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/5006767228ea6392a33e280612599ab5749db021.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 72744d4bafe66d8c405982482c71534c8898d96a Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:29 2021 +0200 MAINTAINERS: update current-sense-shunt.yaml reference Changeset ce66e52b6c16 ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt to: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml. Update its cross-reference accordingly. Fixes: ce66e52b6c16 ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/49371c37a988ffcae9188cbe4735e6eab920b2e0.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 8aa6681f30e496b67d674fa40fa3b03e89273014 Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:28 2021 +0200 MAINTAINERS: update current-sense-amplifier.yaml reference Changeset fbac26b9ad21 ("dt-bindings:iio:afe:current-sense-amplifier: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt to: Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.yaml. Update its cross-reference accordingly. Fixes: fbac26b9ad21 ("dt-bindings:iio:afe:current-sense-amplifier: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d0008b06f8ca65108eb1e7734ec6e3e32ec28172.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 0eb56a608e86eb5b92b180a38019b569c0032885 Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:27 2021 +0200 MAINTAINERS: update envelope-detector.yaml reference Changeset 66a6dcc20e63 ("dt-bindings:iio:adc:envelope-detector: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/adc/envelope-detector.txt to: Documentation/devicetree/bindings/iio/adc/envelope-detector.yaml. Update its cross-reference accordingly. Fixes: 66a6dcc20e63 ("dt-bindings:iio:adc:envelope-detector: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d4ccc625ccb89730c03204b7aae98fd94ea97fc2.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 959e9b93cf71c90f4f54dbeed22be0dd6d36e67e Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:26 2021 +0200 MAINTAINERS: update dpot-dac.yaml reference Changeset 06d2ff6fe11e ("dt-bindings:iio:dac:dpot-dac: yaml conversion.") renamed: Documentation/devicetree/bindings/iio/dac/dpot-dac.txt to: Documentation/devicetree/bindings/iio/dac/dpot-dac.yaml. Update its cross-reference accordingly. Fixes: 06d2ff6fe11e ("dt-bindings:iio:dac:dpot-dac: yaml conversion.") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/efda999adce3332dc1b5c20a998f3824c1cc1b0f.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 9122a6c32fcb5ac36e03709dbe7995333a365bec Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:25 2021 +0200 MAINTAINERS: update st,hts221.yaml reference Changeset 9a6ac3138258 ("dt-bindings:iio:humidity:st,hts221 yaml conversion.") renamed: Documentation/devicetree/bindings/iio/humidity/hts221.txt to: Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml. Update its cross-reference accordingly. Fixes: 9a6ac3138258 ("dt-bindings:iio:humidity:st,hts221 yaml conversion.") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a83cf29bbd27b26eb22e0046c41efebf488e7e4d.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 9ec8f413d706076cc6168760b649ecec3045931c Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:21 2021 +0200 MAINTAINERS: update adi,ad5758.yaml reference Changeset 1e6536ee349b ("dt-bindings:iio:dac:adi,ad5758 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/ad5758.txt to: Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml. Update its cross-reference accordingly. Fixes: 1e6536ee349b ("dt-bindings:iio:dac:adi,ad5758 yaml conversion") Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/ca35b929c098163cfda9682ce791572629b763e2.1617279355.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Cameron commit 646d67b5c582d69d3a73e89116a147abdbca28ed Author: Jonathan Cameron Date: Sun Mar 14 18:15:11 2021 +0000 iio:cdc:ad7150: Move driver out of staging. This capacitance to digital converter (CDC) driver is compliant with the IIO ABI. Note, not all features supported (e.g. window event modes) but the driver should be in a useful functional state. The cleanup was done against QEMU emulation of the device rather than actual hardware. Whilst this was a bit of an experiment, it made it easy to confirm that the driver remained in a consistent working state through the various refactors. If it worked in the first place, it should still be working after this cleanup. Given some IIO drivers require expensive hardware setups, (not particularly true with this one) the use of QEMU may provide a viable way forward for providing testing during code changes where previously we'd had to rely on sharp eyes and crossed fingers. Note, no explicit MAINTAINERS entry as it will be covered by the generic catch-alls for ADI and IIO drivers which are sufficient. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-25-jic23@kernel.org commit d403719eeb664a80e806c63a11274a237359f5b0 Author: Jonathan Cameron Date: Sun Mar 14 18:15:10 2021 +0000 dt-bindings:iio:cdc:adi,ad7150 binding doc Binding covering the ad7150, ad7151 and ad7156 capacitance to digital convertors. The only difference between these is how many channels they have (1 or 2) Whilst it is clearly necessary to provide power to the part, we don't need to know the voltage or anything so if it is always on, there should be no need to have it specified in the binding. Signed-off-by: Jonathan Cameron Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210314181511.531414-24-jic23@kernel.org commit cbdf6ccaec3944fe47d0bc98657635beaff5d755 Author: Jonathan Cameron Date: Sun Mar 14 18:15:09 2021 +0000 staging:iio:cdc:ad7150: Add copyright notice given substantial changes. It seems to me that the changes made to get this ready to move out of staging are substantial enough to warant a copyright notice addition. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-23-jic23@kernel.org commit 9b2571b02d9fadd184e0072c9f219c353687027b Author: Jonathan Cameron Date: Sun Mar 14 18:15:08 2021 +0000 iio:Documentation:ABI Add missing elements as used by the adi,ad7150 Main additions are around thresh_adaptive. This has been supported by the core of IIO for a long time, but no driver that uses it has previously graduated from staging, hence we are missing Docs. Otherwise, just new entries in existing lists. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-22-jic23@kernel.org commit 89f2d5b080bc28f9b2f4b9a9b8f4ab594b63cdf6 Author: Jonathan Cameron Date: Sun Mar 14 18:15:07 2021 +0000 staging:iio:cdc:ad7150: Add of_match_table Rather than using the fallback path in the i2c subsystem and hoping for no clashes across vendors, lets put in an explicit table for matching. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Reviewed-by: Barry Song Link: https://lore.kernel.org/r/20210314181511.531414-21-jic23@kernel.org commit a9f8afe16412bc388a81269387d28c7319cb2c9e Author: Jonathan Cameron Date: Sun Mar 14 18:15:06 2021 +0000 staging:iio:cdc:ad7150: Really basic regulator support. Given DT docs will include regulators, lets just turn them on and off with driver probe() and remove(). Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-20-jic23@kernel.org commit 18595e71c57a60dcc041fe6a280b05417bc38d54 Author: Jonathan Cameron Date: Sun Mar 14 18:15:05 2021 +0000 staging:iio:cdc:ad7150: Add scale and offset to info_mask_shared_by_type The datasheet provides these two values on the assumption they are applied to unshift raw value. Hence shift both the offset and scale by 4 to compensate. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-19-jic23@kernel.org commit f28334febda7f06b97dad2fa61a61831e03c88d1 Author: Jonathan Cameron Date: Sun Mar 14 18:15:04 2021 +0000 staging:iio:cdc:ad7150: Shift the _raw readings by 4 bits. Every other register related to raw value on the datasheet is described as correpsonding to the 12MSB of the actual data registers + the bottom 4 bits are 0. So lets treat this as what it actually is, which is a 12 bit value. Note that we will have to be a little careful to compensate for the offset and scale values. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-18-jic23@kernel.org commit a895ca4ad739e76164e337b6534974b401679392 Author: Jonathan Cameron Date: Sun Mar 14 18:15:03 2021 +0000 staging:iio:cdc:ad7150: Drop unnecessary block comments. These have a habit of not getting updated with driver reorganizations and don't add much info so drop them. Also fix a minor comment syntax issue. Signed-off-by: Jonathan Cameron Reviewed-by: Barry Song Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-17-jic23@kernel.org commit 88f0e098a0b74a24a9183abd96d15dafd3bcba8a Author: Jonathan Cameron Date: Sun Mar 14 18:15:02 2021 +0000 staging:iio:cdc:ad7150: Tidy up local variable positioning. Where there is no other basis on which to order declarations let us prefer reverse xmas tree. Also reduce scope where sensible. Signed-off-by: Jonathan Cameron Reviewed-by: Barry Song Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-16-jic23@kernel.org commit 69567d38613cead66315bbc73a53ee674c0be05d Author: Jonathan Cameron Date: Sun Mar 14 18:15:01 2021 +0000 staging:iio:cdc:ad7150: Reorganize headers. Whilst not important, it's nice to have the general headers in alphabetical order. Signed-off-by: Jonathan Cameron Reviewed-by: Barry Song Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-15-jic23@kernel.org commit ef71bd9c8564ba809dd74e156b7d4e4a0050c029 Author: Jonathan Cameron Date: Sun Mar 14 18:15:00 2021 +0000 staging:iio:cdc:ad7150: More consistent register and field naming Add _REG postfix to register addresses to avoid confusion with fields. Also add additional field defines and use throughout the driver in place of magic numbers. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-14-jic23@kernel.org commit 9623caea2cfeeff614ec9062dfe76a48ca4185f5 Author: Jonathan Cameron Date: Sun Mar 14 18:14:59 2021 +0000 staging:iio:cdc:ad7150: Rework interrupt handling. Note this doesn't support everything the chip can do as we ignore window mode for now (in window / out of window). * Given the chip doesn't have any way of disabling the threshold pins, use disable_irq() etc to mask them except when we actually want them enabled (previously events were always enabled). Note there are race conditions, but using the current state from the status register and disabling interrupts across changes in type of event should mean those races result in interrupts, but no events to userspace. * Correctly reflect that there is one threshold line per channel. * Only take notice of rising edge. If anyone wants the other edge then they should set the other threshold (they are available for rising and falling directions). This isn't perfect but it makes it a lot simpler. * If insufficient interrupts are specified in firnware, don't support events. * Adaptive events use the same pos/neg values of thrMD as non adaptive ones. Tested against qemu based emulation. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-13-jic23@kernel.org commit fea8f215012ea9ae0840bd94f9aa6105a1025c51 Author: Jonathan Cameron Date: Sun Mar 14 18:14:58 2021 +0000 staging:iio:cdc:ad7150: Change timeout units to seconds and use core support Now we have core support for timeouts related to adaptive events, let us use it. Note the units of that attribute are seconds, so we also need to scale the cycles value by the period of each sample. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-12-jic23@kernel.org commit 45b77828b01cdf2af655e4edbc63646fc7e07b48 Author: Jonathan Cameron Date: Sun Mar 14 18:14:57 2021 +0000 iio:event: Add timeout event info type For adaptive threshold events, the current value is compared with a (typically) low pass filtered version of the same signal that slowly tracks large scale changes. However, sometimes a step change can result in a large lag before the low pass filtered version begins to track the signal again. Timeouts can be used to made an instantaneous 'correction'. Documentation of this attribute is added in a later patch. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-11-jic23@kernel.org commit d5723c679bb81123f9c038392ba2d4aab928ba32 Author: Jonathan Cameron Date: Sun Mar 14 18:14:56 2021 +0000 staging:iio:cdc:ad7150: Add sampling_frequency support Device uses a fixed sampling frequency. Let us expose it to userspace. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-10-jic23@kernel.org commit f1be99299ef1224892433ba5c9628cdeb34d1758 Author: Jonathan Cameron Date: Sun Mar 14 18:14:55 2021 +0000 staging:iio:cdc:ad7150: Drop noisy print in probe Also * drop i2c_set_client_data() as now unused. * white space cleanups Signed-off-by: Jonathan Cameron Reviewed-by: Barry Song Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-9-jic23@kernel.org commit 5bfe0cac3f3bc2ced4e8c9f2c2dfe0030fe4bb4d Author: Jonathan Cameron Date: Sun Mar 14 18:14:54 2021 +0000 staging:iio:cdc:ad7150: Simplify event handling by only using rising direction. The event line is active high and not maskable within the device. It indicates current state directly. The device supports separate rising and falling thresholds so rather than trying to using each bound to detect in both directions just use IRQF_TRIGGER_RISING. If a user wants to detect the value falling back below the threshold, then set the falling threshold appropriately. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-8-jic23@kernel.org commit 67322b2b667847515a35e22c9a86fc8933274468 Author: Jonathan Cameron Date: Sun Mar 14 18:14:53 2021 +0000 staging:iio:cdc:ad7150: Handle variation in chan_spec across device and irq present or not The driver supports devices with different numbers of channels and also can function without provision of an IRQ (with reduced features), so this patch handles this cleanly by having multiple chan_spec arrays and iio_info structures to pick between depending on what we have. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-7-jic23@kernel.org commit f32df79d5c7c7fa547b6983c2537177a83beb21d Author: Jonathan Cameron Date: Sun Mar 14 18:14:52 2021 +0000 staging:iio:cdc:ad7150: Drop platform data support There are no mainline board files using this driver so lets drop the platform_data support in favour of devicetree and similar. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-6-jic23@kernel.org commit c13ab9457fbbe67dbc1b1296ede05cccb812b81e Author: Jonathan Cameron Date: Sun Mar 14 18:14:51 2021 +0000 staging:iio:cdc:ad7150: Timeout register covers both directions so both need updating The timeout is treated as one single value, but the datasheet describes it as two 4 bit values, one for each direction of event. As such change the driver to support the separate directions. Also add limit checking to ensure it fits within the 4 bits. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-5-jic23@kernel.org commit 0c4c4a868ab4af5886d070379b5964d1e0835c19 Author: Jonathan Cameron Date: Sun Mar 14 18:14:50 2021 +0000 staging:iio:cdc:ad7150: Refactor event parameter update Original code was ordered in a fairly unituitive fashion with the non adaptive threshold handling returning from the switch statement, whilst the adapative path did the actual writes outside the switch. Make it more readable by bringing everything within the switch statement cases and reducing scope of local variables as appropriate. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-4-jic23@kernel.org commit 1a17e7cbbffaac98ac62bf0fa5b6eb2f65fb5ade Author: Jonathan Cameron Date: Sun Mar 14 18:14:49 2021 +0000 staging:iio:cdc:ad7150: Remove magnitude adaptive events The devices support window detection, but that corresponds to being outside of a range defined by a lower an uppper bound rather than being related to magnitude as such. Hence drop this interface in the interests of making the driver ABI compliant. We may bring back support for the window mode at somepoint in the future but it will be in an ABI compliant fashion. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-3-jic23@kernel.org commit add538f4beb25c8334aa40cab6cfe066e836151f Author: Jonathan Cameron Date: Sun Mar 14 18:14:48 2021 +0000 staging:iio:cdc:ad7150: use swapped reads/writes for i2c rather than open coding Reduces boilerplate and chances of getting the error handling wrong. No functional change. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Reviewed-by: Barry Song Link: https://lore.kernel.org/r/20210314181511.531414-2-jic23@kernel.org commit a71654af0a2199503c02e996b386d335158e0818 Author: Lars-Peter Clausen Date: Thu Mar 25 14:10:46 2021 +0100 iio: inv_mpu6050: Make interrupt optional The inv_mpu6050 driver requires an interrupt for buffered capture. But non buffered reading for measurements works just fine without an interrupt connected. Make the interrupt optional to support this case. Signed-off-by: Lars-Peter Clausen Reviewed-by: Linus Walleij Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20210325131046.13383-2-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 0d41da0374278b00f428177502d7362f750c2bc9 Author: Lars-Peter Clausen Date: Thu Mar 25 14:10:45 2021 +0100 iio: inv_mpu6050: Remove superfluous indio_dev->modes assignment The inv_mpu6050 driver manually assigns the indio_dev->modes property. But this is not necessary since it will be setup in iio_trigger_buffer_setup(). Remove the manual assignment. Signed-off-by: Lars-Peter Clausen Acked-by: Linus Walleij Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20210325131046.13383-1-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 4c822244bf4a0fc7f0f5120dc4dae4e9aa815ea6 Author: Alexandru Ardelean Date: Mon Mar 22 10:41:35 2021 +0200 iio: buffer: return 0 for buffer getfd ioctl handler As Lars pointed out, we could either return the FD vs memcpy-ing it to the userspace data object. However, this comment exposed a bug. We should return 0 or negative from these ioctl() handlers. Because an ioctl() handler can also return IIO_IOCTL_UNHANDLED (which is positive 1), which means that the ioctl() handler doesn't support this ioctl number. Positive 1 could also be a valid FD number in some corner cases. The reason we did this is to be able to differentiate between an error code and an unsupported ioctl number; for unsupported ioctl numbers, the main loop should keep going. Maybe we should change this to a higher negative number, to avoid such cases when/if we add more ioctl() handlers. Cc: Lars-Peter Clausen Fixes: f73f7f4da5818 ("iio: buffer: add ioctl() to support opening extra buffers for IIO device") Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210322084135.17536-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit b3b64e2c1575da5f290e75e2a1d9cac307812222 Author: Linus Walleij Date: Tue Mar 23 13:27:05 2021 +0100 iio: Fix iio_read_channel_processed_scale() The code was checking if (ret) from the processed channel readout, not smart, we need to check if (ret < 0) as this will likely be something like IIO_VAL_INT. Fixes: 635ef601b238 ("iio: Provide iio_read_channel_processed_scale() API") Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210323122705.1326362-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 1539f71602edf09bb33666afddc5a781c42e768d Merge: fb457e02f0ec0 6c744983004eb Author: Dave Airlie Date: Wed Apr 7 17:32:05 2021 +1000 Merge tag 'drm-misc-next-2021-04-01' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.13: UAPI Changes: Cross-subsystem Changes: Core Changes: - mst: Improve topology logging - edid: Rework and improvements for displayid Driver Changes: - anx7625: Regulators support - bridge: Support for the Chipone ICN6211, Lontium LT8912B - lt9611: Fix 4k panels handling Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210401110552.2b3yetlgsjtlotcn@gilmour commit c7eb923c3caf4c6a183465cc012dc368b199a4b2 Author: Marc Kleine-Budde Date: Mon Mar 15 10:59:09 2021 +0100 can: mcp251xfd: mcp251xfd_regmap_crc_read(): work around broken CRC on TBC register MCP251XFD_REG_TBC is the time base counter register. It increments once per SYS clock tick, which is 20 or 40 MHz. Observation shows that if the lowest byte (which is transferred first on the SPI bus) of that register is 0x00 or 0x80 the calculated CRC doesn't always match the transferred one. To reproduce this problem let the driver read the TBC register in a high frequency. This can be done by attaching only the mcp251xfd CAN controller to a valid terminated CAN bus and send a single CAN frame. As there are no other CAN controller on the bus, the sent CAN frame is not ACKed and the mcp251xfd repeats it. If user space enables the bus error reporting, each of the NACK errors is reported with a time stamp (which is read from the TBC register) to user space. $ ip link set can0 down $ ip link set can0 up type can bitrate 500000 berr-reporting on $ cansend can0 4FF#ff.01.00.00.00.00.00.00 This leads to several error messages per second: | mcp251xfd spi0.0 can0: CRC read error at address 0x0010 (length=4, data=00 3a 86 da, CRC=0x7753) retrying. | mcp251xfd spi0.0 can0: CRC read error at address 0x0010 (length=4, data=80 01 b4 da, CRC=0x5830) retrying. | mcp251xfd spi0.0 can0: CRC read error at address 0x0010 (length=4, data=00 e9 23 db, CRC=0xa723) retrying. | mcp251xfd spi0.0 can0: CRC read error at address 0x0010 (length=4, data=00 8a 30 db, CRC=0x4a9c) retrying. | mcp251xfd spi0.0 can0: CRC read error at address 0x0010 (length=4, data=80 f3 43 db, CRC=0x66d2) retrying. If the highest bit in the lowest byte is flipped the transferred CRC matches the calculated one. We assume for now the CRC calculation in the chip works on wrong data and the transferred data is correct. This patch implements the following workaround: - If a CRC read error on the TBC register is detected and the lowest byte is 0x00 or 0x80, the highest bit of the lowest byte is flipped and the CRC is calculated again. - If the CRC now matches, the _original_ data is passed to the reader. For now we assume transferred data was OK. Link: https://lore.kernel.org/r/20210406110617.1865592-5-mkl@pengutronix.de Cc: Manivannan Sadhasivam Cc: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit ef7a8c3e75994f2bdaa27b481de39ea000119d11 Author: Marc Kleine-Budde Date: Mon Mar 15 08:59:15 2021 +0100 can: mcp251xfd: mcp251xfd_regmap_crc_read_one(): Factor out crc check into separate function This patch factors out the crc check into a separate function. This is preparation for the next patch. Link: https://lore.kernel.org/r/20210406110617.1865592-4-mkl@pengutronix.de Cc: Manivannan Sadhasivam Cc: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit 0084e298acfe643c68daf0a316bb27618ec2a852 Author: Marc Kleine-Budde Date: Sun Dec 13 17:25:15 2020 +0100 can: mcp251xfd: add BQL support This patch re-adds BQL support to the driver. Support for netdev_xmit_more() will be added in a separate patch series. Link: https://lore.kernel.org/r/20210406110617.1865592-3-mkl@pengutronix.de Cc: Manivannan Sadhasivam Cc: Thomas Kopp Signed-off-by: Marc Kleine-Budde commit 8dc987519ae97fd3b994871720ae5f089654b599 Author: Marc Kleine-Budde Date: Wed Jul 24 11:51:32 2019 +0200 can: c_can: remove unused enum BOSCH_C_CAN_PLATFORM This patch removes the unused enum BOSCH_C_CAN_PLATFORM. Link: https://lore.kernel.org/r/20210406110617.1865592-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 644022b1de9efc901494b8931c78700d49d35d3d Author: Marc Kleine-Budde Date: Thu Apr 1 10:37:31 2021 +0200 can: m_can: m_can_receive_skb(): add missing error handling to can_rx_offload_queue_sorted() call In commit 1be37d3b0414 ("can: m_can: fix periph RX path: use rx-offload to ensure skbs are sent from softirq context") the RX path for peripherals (i.e. SPI based m_can controllers) was converted to the rx-offload infrastructure. However, the error handling for can_rx_offload_queue_sorted() was forgotten. can_rx_offload_queue_sorted() will return with an error if the internal queue is full. This patch adds the missing error handling, by increasing the rx_fifo_errors. Fixes: 1be37d3b0414 ("can: m_can: fix periph RX path: use rx-offload to ensure skbs are sent from softirq context") Link: https://lore.kernel.org/r/20210401084515.1455013-1-mkl@pengutronix.de Reported-by: coverity-bot Addresses-Coverity-ID: 1503583 ("Error handling issues") Reviewed-by: Kees Cook Cc: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde commit c8129487441e11617fab9770d9f98d9ae8fc7b3a Author: Marc Kleine-Budde Date: Fri Apr 2 12:05:39 2021 +0200 can: skb: alloc_can{,fd}_skb(): set "cf" to NULL if skb allocation fails The handling of CAN bus errors typically consist of allocating a CAN error SKB using alloc_can_err_skb() followed by stats handling and filling the error details in the newly allocated CAN error SKB. Even if the allocation of the SKB fails the stats handling should not be skipped. The common pattern in CAN drivers is to allocate the skb and work on the struct can_frame pointer "cf", if it has been assigned by alloc_can_err_skb(). | skb = alloc_can_err_skb(priv->ndev, &cf); | | /* RX errors */ | if (bdiag1 & (MCP251XFD_REG_BDIAG1_DCRCERR | | MCP251XFD_REG_BDIAG1_NCRCERR)) { | netdev_dbg(priv->ndev, "CRC error\n"); | | stats->rx_errors++; | if (cf) | cf->data[3] |= CAN_ERR_PROT_LOC_CRC_SEQ; | } In case of an OOM alloc_can_err_skb() returns NULL, but doesn't set "cf" to NULL as well. For the above pattern to work the "cf" has to be initialized to NULL, which is easily forgotten. To solve this kind of problems, set "cf" to NULL if alloc_can_err_skb() returns NULL. Link: https://lore.kernel.org/r/20210402102245.1512583-1-mkl@pengutronix.de Suggested-by: Vincent MAILHOL Reviewed-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 6731fefd95671575ceaba8e1c60881d529537352 Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:18 2021 -0700 bus: mhi: Improve documentation on channel transfer setup APIs The mhi_prepare_for_transfer() and mhi_unprepare_from_transfer() APIs could use better explanation. Add details on what MHI does when these APIs are used. Signed-off-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617311778-1254-10-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 8aaa288f709e3df98717562fb3d817af1b2a1f9b Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:17 2021 -0700 bus: mhi: core: Remove __ prefix for MHI channel unprepare function The __mhi_unprepare_channel() API does not require the __ prefix. Get rid of it and make the internal function consistent with the other function names. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Hemant Kumar Link: https://lore.kernel.org/r/1617311778-1254-9-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 8e06e9fb990975a55b64c6e4c5b6b183962f849a Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:16 2021 -0700 bus: mhi: core: Check channel execution environment before issuing reset A client can attempt to unprepare certain channels for transfer even after the execution environment they are supposed to run in has changed. In the event that happens, the device need not be notified of the reset and the host can proceed with clean up for the channel context and memory allocated for it on the host as the device will no longer be able to respond to such a request. Signed-off-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617311778-1254-8-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 47705c08465931923e2f2b506986ca0bdf80380d Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:15 2021 -0700 bus: mhi: core: Clear configuration from channel context during reset When clearing up the channel context after client drivers are done using channels, the configuration is currently not being reset entirely. Ensure this is done to appropriately handle issues where clients unaware of the context state end up calling functions which expect a context. Signed-off-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617311778-1254-7-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 73b7aebcc8cbc2cddfb34be9840542807ad61044 Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:14 2021 -0700 bus: mhi: core: Hold device wake for channel update commands MHI host can fail early if device is in a bad state by attempting to assert device wake and holding the runtime PM vote before sending a channel update command instead of performing a wake toggle and waiting for a timeout if the send were to fail. This can help improve the design and enable shorter wait periods for device to respond as votes are already held. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617311778-1254-6-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit cde61bb0470df8cfb5d49ebe88e9802fb0f817f0 Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:13 2021 -0700 bus: mhi: core: Update debug messages to use client device Debug messages dealing with client devices use the generic MHI controller or parent device along with a channel number. It would be better to instead use the client device directly and enable better log messages for channel updates. Suggested-by: Manivannan Sadhasivam Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617311778-1254-5-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 3317dc6cea294566e56bddb1b6f2309e6facbfa3 Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:12 2021 -0700 bus: mhi: core: Improvements to the channel handling state machine Improve the channel handling state machine such that all commands go through a common function and a validation process to ensure that the state machine is not violated in any way and adheres to the MHI specification. Using this common function allows MHI to eliminate some unnecessary debug messages and code duplication. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617311778-1254-4-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 4e44ae3d6d9c2c2a6d9356dd279c925532d5cd8c Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:11 2021 -0700 bus: mhi: core: Clear context for stopped channels from remove() If a channel was explicitly stopped but not reset and a driver remove is issued, clean up the channel context such that it is reflected on the device. This move is useful if a client driver module is unloaded or a device crash occurs with the host having placed the channel in a stopped state. Signed-off-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617311778-1254-3-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 5a62e39b45b585726e0dcbf383bfc70dc9f07637 Author: Bhaumik Bhatt Date: Thu Apr 1 14:16:10 2021 -0700 bus: mhi: core: Allow sending the STOP channel command Add support to allow sending the STOP channel command. If a client driver would like to STOP a channel and have the device retain the channel context instead of issuing a RESET to it and clearing the context, this would provide support for it after the ability to send this command is exposed to clients. Signed-off-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617311778-1254-2-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 49d38ebb6faad9e2abc7ce91b35956f19652b51f Author: Bhaumik Bhatt Date: Fri Apr 2 14:33:19 2021 -0700 bus: mhi: pci_generic: Add SDX65 based modem support Add generic info for SDX65 based modems. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/1617399199-35172-1-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit eee87072e2fb9000b12c5e752ebd4a05882da2e4 Author: Bhaumik Bhatt Date: Thu Apr 1 14:41:49 2021 -0700 bus: mhi: core: Remove pre_init flag used for power purposes Some controllers can choose to skip preparation for power up. In that case, device context is initialized based on the pre_init flag not being set during mhi_prepare_for_power_up(). There is no reason MHI host driver should maintain and provide controllers with two separate paths for preparing MHI. Going forward, all controllers will be required to call the mhi_prepare_for_power_up() API followed by their choice of sync or async power up. This allows MHI host driver to get rid of the pre_init flag and sets up a common way for all controllers to use MHI. This also helps controllers fail early on during preparation phase in some failure cases. Signed-off-by: Bhaumik Bhatt Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617313309-24035-1-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 8f910c8c2a977476d96f3deab8080cd7b6a1cb11 Author: Loic Poulain Date: Tue Apr 6 11:11:55 2021 +0200 bus: mhi: pm: reduce PM state change verbosity Since M3 can be entered/exited quite a lot when used for runtime PM, keep the mhi suspend/resume transitions quiet. Signed-off-by: Loic Poulain Reviewed-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617700315-12492-2-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 4547a749be997eb12ea7edcf361ec2a5329f7aec Author: Loic Poulain Date: Tue Apr 6 11:11:54 2021 +0200 bus: mhi: core: Fix MHI runtime_pm behavior This change ensures that PM reference is always get during packet queueing and released either after queuing completion (RX) or once the buffer has been consumed (TX). This guarantees proper update for underlying MHI controller runtime status (e.g. last_busy timestamp) and prevents suspend to be triggered while TX packets are flying, or before we completed update of the RX ring. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617700315-12492-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 54e0b6c873dcbd02b9b479c893f6fba8fcbc6a9c Author: Gao Xiang Date: Wed Apr 7 12:39:18 2021 +0800 erofs: reserve physical_clusterbits[] Formal big pcluster design is actually more powerful / flexable than the previous thought whose pclustersize was fixed as power-of-2 blocks, which was obviously inefficient and space-wasting. Instead, pclustersize can now be set independently for each pcluster, so various pcluster sizes can also be used together in one file if mkfs wants (for example, according to data type and/or compression ratio). Let's get rid of previous physical_clusterbits[] setting (also notice that corresponding on-disk fields are still 0 for now). Therefore, head1/2 can be used for at most 2 different algorithms in one file and again pclustersize is now independent of these. Link: https://lore.kernel.org/r/20210407043927.10623-2-xiang@kernel.org Acked-by: Chao Yu Signed-off-by: Gao Xiang commit f94d6389f6a8abd04760dcd015d14961260a8000 Author: Chris Mi Date: Mon Sep 21 16:45:07 2020 +0800 net/mlx5e: TC, Add support to offload sample action The following diagram illustrates the hardware model for tc sample action: +---------------------+ + original flow table + +---------------------+ + original match + +---------------------+ | v +------------------------------------------------+ + Flow Sampler Object + +------------------------------------------------+ + sample ratio + +------------------------------------------------+ + sample table id | default table id + +------------------------------------------------+ | | v v +-----------------------------+ +----------------------------------------+ + sample table + + default table per + +-----------------------------+ +----------------------------------------+ + forward to management vport + + original match + +-----------------------------+ +----------------------------------------+ + other actions + +----------------------------------------+ The sample action is translated to a goto flow table object destination which samples packets according to the provided sample ratio. Sampled packets are duplicated. One copy is processed by a termination table, named the sample table, which sends the packet to the eswitch manager port (that will be processed by software). The second copy is processed by the default table which executes the subsequent actions. The default table is created per tuple as rules with different prios and chains may overlap. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit be9dc0047450f7d8c0462a6ef3f7c26bced16911 Author: Chris Mi Date: Tue Jan 26 11:15:46 2021 +0800 net/mlx5e: TC, Handle sampled packets Mark the sampled packets with a sample restore object. Send sampled packets using the psample api. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 7319a1cc3ca9f719e4ef1b1882f6fdb57d0719b8 Author: Chris Mi Date: Fri Jan 15 16:03:47 2021 +0800 net/mlx5e: TC, Refactor tc update skb function As a pre-step to process sampled packet in this function. Signed-off-by: Chris Mi Signed-off-by: Saeed Mahameed commit 36a3196256bf3310e5e7142b0e61787f7a201abd Author: Chris Mi Date: Tue Jan 26 11:08:28 2021 +0800 net/mlx5e: TC, Add sampler restore handle API Use common object pool to create an object ID to map sample parameters. Allocate a modify header action to write the object ID to reg_c0 lower 16 bits. Create a restore rule to pass the object ID to software. So software can identify sampled packets via the object ID and send it to userspace. Aggregate the modify header action, restore rule and object ID to a sample restore handle. Re-use identical sample restore handle for the same object ID. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 11ecd6c60b4ee6f5d5bcd91f5b87e50bad8f142a Author: Chris Mi Date: Mon Sep 21 13:25:54 2020 +0800 net/mlx5e: TC, Add sampler object API In order to offload sample action, HW introduces sampler object. The sampler object samples packets according to the provided sample ratio. Sampled packets are duplicated. One copy is processed by a termination table, named the sample table, which sends the packet up to software. The second copy is processed by the default table. Instantiate sampler object. Re-use identical sampler object for the same sample ratio, sample table and default table as a prestep for offloading tc sample actions. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 2a9ab10a5689a4612d441df1cc628c381dc75ed3 Author: Chris Mi Date: Fri Sep 18 17:46:57 2020 +0800 net/mlx5e: TC, Add sampler termination table API Sampled packets are sent to software using termination tables. There is only one rule in that table that is to forward sampled packets to the e-switch management vport. Create a sampler termination table and rule for each eswitch. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 41c2fd949803a5ff8acfed1d81c0bbd62d8f660d Author: Chris Mi Date: Mon Aug 31 13:28:35 2020 +0800 net/mlx5e: TC, Parse sample action Parse TC sample action and save sample parameters in flow attribute data structure. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit c935568271b5b25baea65ad623f146de72570cd7 Author: Chris Mi Date: Mon Aug 31 13:27:53 2020 +0800 net/mlx5: Instantiate separate mapping objects for FDB and NIC tables Currently, the u32 chain id is mapped to u16 value which is stored on the lower 16 bits of reg_c0 for FDB and reg_b for NIC tables. The mapping is internally maintained by the chains object. However, with the introduction of reg_c0 objects the fdb may store more than just the chain id on reg_c0. This is not relevant for NIC tables. Separate the chains mapping instantiation for FDB and NIC tables. Remove the mapping from the chains object. For FDB tables, create the mapping per eswitch. For NIC tables, create the mapping per tc table. Pass the corresponding mapping pointer when creating the chains object. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit a91d98a0a2b8e4c433b7341708f7d706e0cf1c8e Author: Chris Mi Date: Thu Sep 10 15:28:02 2020 +0800 net/mlx5: Map register values to restore objects Currently reg_c0 lower 16 bits and reg_b are used to store the chain id that missed in FDB and NIC tables accordingly. However, the registers' values may index a restore object, rather than a single u32 value. Different object types can be used to restore mutually exclusive contexts such as chain id and sample group id. Use the mapping object to associate an index with a restore object as a prestep for supporting additional restore types. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit c1904360dde8fb4f79bec4751c7540df10d57ec2 Author: Chris Mi Date: Fri Oct 9 11:06:33 2020 +0800 net/mlx5: E-switch, Set per vport table default group number Different per voprt table is created using a different per vport table namespace. Because we can't use variable to set the namespace member value. If max group number is 0 in the namespace, use the eswitch default max group number. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit c796bb7cd2307d5fb815e919b964bf2d65c95ec3 Author: Chris Mi Date: Mon Aug 31 13:23:25 2020 +0800 net/mlx5: E-switch, Generalize per vport table API Currently, per vport table was used only for port mirroring actions. However, sample action will also require a per vport table instance. Generalize the vport table API to work with multiple namespaces where each namespace manages its own vport table instance. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit 0a9e2307870bdb627421b4b0bbac04b1ab8e1688 Author: Chris Mi Date: Thu Jan 14 15:12:36 2021 +0800 net/mlx5: E-switch, Rename functions to follow naming convention. Public api starts with mlx5 and remove mlx5 for non-public api. Signed-off-by: Chris Mi Signed-off-by: Saeed Mahameed commit 4c7f40287aa5eb6ea8f3a6c3225ab5ebc6a45415 Author: Chris Mi Date: Mon Aug 31 13:22:20 2020 +0800 net/mlx5: E-switch, Move vport table functions to a new file Currently, the vport table functions are in common eswitch offload file. This file is too big. Move the vport table create, delete and lookup functions to a separate file. Put the file in esw directory. Pre-step for generalizing its functionality for serving both the mirroring and the sample features. Signed-off-by: Chris Mi Reviewed-by: Oz Shlomo Reviewed-by: Mark Bloch Signed-off-by: Saeed Mahameed commit e1cd92da0b33212de5a3da3e913767bd1666dc43 Author: Stephen Boyd Date: Tue Feb 23 13:45:38 2021 -0800 firmware: qcom_scm: Fix kernel-doc function names to match These functions were renamed but the kernel doc didn't follow along. Fix it. Cc: Elliot Berman Cc: Brian Masney Cc: Stephan Gerhold Cc: Jeffrey Hugo Cc: Douglas Anderson Fixes: 9a434cee773a ("firmware: qcom_scm: Dynamically support SMCCC and legacy conventions") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210223214539.1336155-6-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 87abf2ba3846d28e4b5f0e5f9cef873b4352a0a9 Author: Stephen Boyd Date: Tue Feb 23 13:45:37 2021 -0800 firmware: qcom_scm: Suppress sysfs bind attributes We don't want userspace ejecting this driver at runtime. Various other drivers call into this code because it provides the mechanism to communicate with the secure world on qcom SoCs. It should probe once and be present forever after that. Cc: Elliot Berman Cc: Brian Masney Cc: Stephan Gerhold Cc: Jeffrey Hugo Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210223214539.1336155-5-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 257f2935cbbf14b16912c635fcd8ff43345c953b Author: Stephen Boyd Date: Tue Feb 23 13:45:36 2021 -0800 firmware: qcom_scm: Workaround lack of "is available" call on SC7180 Some SC7180 firmwares don't implement the QCOM_SCM_INFO_IS_CALL_AVAIL API, so we can't probe the calling convention. We detect the legacy calling convention on these firmwares, because the availability call always fails and legacy is the fallback. This leads to problems where the rmtfs driver fails to probe, because it tries to assign memory with a bad calling convention, which then leads to modem failing to load and all networking, even wifi, to fail. Ouch! Let's force the calling convention to be what it always is on this SoC, i.e. arm64. Of course, the calling convention is not the same thing as implementing the QCOM_SCM_INFO_IS_CALL_AVAIL API. The absence of the "is this call available" API from the firmware means that any call to __qcom_scm_is_call_available() fails. This is OK for now though because none of the calls that are checked for existence are implemented on firmware running on sc7180. If such a call needs to be checked for existence in the future, we presume that firmware will implement this API and then things will "just work". Cc: Elliot Berman Cc: Brian Masney Cc: Stephan Gerhold Cc: Jeffrey Hugo Cc: Douglas Anderson Fixes: 9a434cee773a ("firmware: qcom_scm: Dynamically support SMCCC and legacy conventions") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210223214539.1336155-4-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit f6ea568f0ddcdfad52807110ed8983e610f0e03b Author: Stephen Boyd Date: Tue Feb 23 13:45:35 2021 -0800 firmware: qcom_scm: Reduce locking section for __get_convention() We shouldn't need to hold this spinlock here around the entire SCM call into the firmware and back. Instead, we should be able to query the firmware, potentially in parallel with other CPUs making the same convention detection firmware call, and then grab the lock to update the calling convention detected. The convention doesn't change at runtime so calling into firmware more than once is possibly wasteful but simpler. Besides, this is the slow path, not the fast path where we've already detected the convention used. More importantly, this allows us to add more logic here to workaround the case where the firmware call to check for availability isn't implemented in the firmware at all. In that case we can check the firmware node compatible string and force a calling convention. Note that we remove the 'has_queried' logic that is repeated twice. That could lead to the calling convention being printed multiple times to the kernel logs if the bool is true but __query_convention() is running on multiple CPUs. We also shorten the time where the lock is held, but we keep the lock held around the printk because it doesn't seem hugely important to drop it for that. Cc: Elliot Berman Cc: Brian Masney Cc: Stephan Gerhold Cc: Jeffrey Hugo Cc: Douglas Anderson Fixes: 9a434cee773a ("firmware: qcom_scm: Dynamically support SMCCC and legacy conventions") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210223214539.1336155-3-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 9d11af8b06a811c5c4878625f51ce109e2af4e80 Author: Stephen Boyd Date: Tue Feb 23 13:45:34 2021 -0800 firmware: qcom_scm: Make __qcom_scm_is_call_available() return bool Make __qcom_scm_is_call_available() return bool instead of int. The function has "is" in the name, so it should return a bool to indicate the truth of the call being available. Unfortunately, it can return a number < 0 which also looks "true", but not all callers expect that and thus they think a call is available when really the check to see if the call is available failed to figure it out. Reviewed-by: Bjorn Andersson Cc: Elliot Berman Cc: Brian Masney Cc: Stephan Gerhold Cc: Jeffrey Hugo Cc: Douglas Anderson Fixes: 0f206514749b ("scsi: firmware: qcom_scm: Add support for programming inline crypto keys") Fixes: 0434a4061471 ("firmware: qcom: scm: add support to restore secure config to qcm_scm-32") Fixes: b0a1614fb1f5 ("firmware: qcom: scm: add OCMEM lock/unlock interface") Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210223214539.1336155-2-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 0b35e0deb5bee7d4882356d6663522c1562a8321 Author: Jakub Kicinski Date: Tue Apr 6 15:59:31 2021 -0700 docs: ethtool: correct quotes Quotes to backticks. All commands use backticks since the names are constants. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 631a44ed2560672c27a149134a4d8cb963c07779 Author: Peng Zhang Date: Tue Apr 6 17:54:52 2021 +0200 nfp: flower: add support for packet-per-second policing Allow hardware offload of a policer action attached to a matchall filter which enforces a packets-per-second rate-limit. e.g. tc filter add dev tap1 parent ffff: u32 match \ u32 0 0 police pkts_rate 3000 pkts_burst 1000 Signed-off-by: Peng Zhang Signed-off-by: Baowen Zheng Signed-off-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 5106efe6ed985d8d0b5dc5230a2ab2212810ee03 Merge: a460513ed4b69 db3685b4046f8 Author: David S. Miller Date: Tue Apr 6 16:36:41 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following batch contains Netfilter/IPVS updates for your net-next tree: 1) Simplify log infrastructure modularity: Merge ipv4, ipv6, bridge, netdev and ARP families to nf_log_syslog.c. Add module softdeps. This fixes a rare deadlock condition that might occur when log module autoload is required. From Florian Westphal. 2) Moves part of netfilter related pernet data from struct net to net_generic() infrastructure. All of these users can be modules, so if they are not loaded there is no need to waste space. Size reduction is 7 cachelines on x86_64, also from Florian. 2) Update nftables audit support to report events once per table, to get it aligned with iptables. From Richard Guy Briggs. 3) Check for stale routes from the flowtable garbage collector path. This is fixing IPv6 which breaks due missing check for the dst_cookie. 4) Add a nfnl_fill_hdr() function to simplify netlink + nfnetlink headers setup. 5) Remove documentation on several statified functions. 6) Remove printk on netns creation for the FTP IPVS tracker, from Florian Westphal. 7) Remove unnecessary nf_tables_destroy_list_lock spinlock initialization, from Yang Yingliang. 7) Remove a duplicated forward declaration in ipset, from Wan Jiabing. ==================== Signed-off-by: David S. Miller commit a460513ed4b6994bfeb7bd86f72853140bc1ac12 Author: Andy Shevchenko Date: Tue Apr 6 13:22:51 2021 +0300 time64.h: Consolidated PSEC_PER_SEC definition We have currently three users of the PSEC_PER_SEC each of them defining it individually. Instead, move it to time64.h to be available for everyone. There is a new user coming with the same constant in use. It will also make its life easier. Signed-off-by: Andy Shevchenko Acked-by: Heiko Stuebner Signed-off-by: David S. Miller commit 3036ec035c4dc7e88439a61f5a714cc3988ab4cf Author: Andy Shevchenko Date: Tue Apr 6 13:13:06 2021 +0300 stmmac: intel: Drop duplicate ID in the list of PCI device IDs The PCI device IDs are defined with a prefix PCI_DEVICE_ID. There is no need to repeat the ID part at the end of each definition. Signed-off-by: Andy Shevchenko Reviewed-by: Wong Vee Khee Signed-off-by: David S. Miller commit be107538c5296fb888938ec3a32da21bb1733655 Author: Qiheng Lin Date: Tue Apr 6 11:18:13 2021 +0800 netdevsim: remove unneeded semicolon Eliminate the following coccicheck warning: drivers/net/netdevsim/fib.c:569:2-3: Unneeded semicolon Signed-off-by: Qiheng Lin Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3b2c32f96edc0a7602da1b17f5b5eed09e16ad37 Author: Qiheng Lin Date: Tue Apr 6 11:04:33 2021 +0800 net: ethernet: mtk_eth_soc: remove unneeded semicolon Eliminate the following coccicheck warning: drivers/net/ethernet/mediatek/mtk_ppe.c:270:2-3: Unneeded semicolon Signed-off-by: Qiheng Lin Signed-off-by: David S. Miller commit b58c4649d94eebb1257e0716e4e948dcaa4ae5b5 Author: wengjianfeng Date: Tue Apr 6 09:59:54 2021 +0800 nfc: s3fwrn5: remove unnecessary label In function s3fwrn5_nci_post_setup, the variable ret is assigned then goto out label, which just return ret, so we use return to replace it. Other goto sentences are similar, we use return sentences to replace goto sentences and delete out label. Signed-off-by: wengjianfeng Reviewed-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit b3feb439f28ed523e57096142e752d2ffd8ca962 Merge: e880f8b3a24a7 d42ebcbb63538 Author: David S. Miller Date: Tue Apr 6 16:22:37 2021 -0700 Merge branch 'usbnet-speed' Grant Grundler says: ==================== usbnet: speed reporting for devices without MDIO This series introduces support for USB network devices that report speed as a part of their protocol, not emulating an MII to be accessed over MDIO. v2: rebased on recent upstream changes v3: incorporated hints on naming and comments v4: fix misplaced hunks; reword some commit messages; add same change for cdc_ether v4-repost: added "net-next" to subject and Andrew Lunn's Reviewed-by I'm reposting Oliver Neukum's patch series with fix ups for "misplaced hunks" (landed in the wrong patches). Please fixup the "author" if "git am" fails to attribute the patches 1-3 (of 4) to Oliver. I've tested v4 series with "5.12-rc3+" kernel on Intel NUC6i5SYB and + Sabrent NT-S25G. Google Pixelbook Go (chromeos-4.4 kernel) + Alpha Network AUE2500C were connected directly to the NT-S25G to get 2.5Gbps link rate: Settings for enx002427880815: Supported ports: [ ] Supported link modes: Not reported Supported pause frame use: No Supports auto-negotiation: No Supported FEC modes: Not reported Advertised link modes: Not reported Advertised pause frame use: No Advertised auto-negotiation: No Advertised FEC modes: Not reported Speed: 2500Mb/s Duplex: Half Auto-negotiation: off Port: Twisted Pair PHYAD: 0 Transceiver: internal MDI-X: Unknown Current message level: 0x00000007 (7) drv probe link Link detected: yes "Duplex" is a lie since we get no information about it. I expect "Auto-Negotiation" is always true for cdc_ncm and cdc_ether devices and perhaps someone knows offhand how to have ethtool report "true" instead. But this is good step in the right direction. base-commit: 1c273e10bc0cc7efb933e0ca10e260cdfc9f0b8c ==================== Signed-off-by: David S. Miller commit d42ebcbb635386d759985c775b5728c2f93037d1 Author: Grant Grundler Date: Mon Apr 5 16:13:44 2021 -0700 net: cdc_ether: record speed in status method Until very recently, the usbnet framework only had support functions for devices which reported the link speed by explicitly querying the PHY over a MDIO interface. However, the cdc_ether devices send notifications when the link state or link speeds change and do not expose the PHY (or modem) directly. Support funtions (e.g. usbnet_get_link_ksettings_internal()) to directly query state recorded by the cdc_ether driver were added in a previous patch. Instead of cdc_ether spewing the link speed into the dmesg buffer, record the link speed encoded in these notifications and tell the usbnet framework to use the new functions to get link speed/state. User space can now get the most recent link speed/state using ethtool. v4: added to series since cdc_ether uses same notifications as cdc_ncm driver. Signed-off-by: Grant Grundler Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit eb47c274d8c44e1a1d7e44f9e82776e5adb5649b Author: Oliver Neukum Date: Mon Apr 5 16:13:43 2021 -0700 net: cdc_ncm: record speed in status method Until very recently, the usbnet framework only had support functions for devices which reported the link speed by explicitly querying the PHY over a MDIO interface. However, the cdc_ncm devices send notifications when the link state or link speeds change and do not expose the PHY (or modem) directly. Support funtions (e.g. usbnet_get_link_ksettings_internal()) to directly query state recorded by the cdc_ncm driver were added in a previous patch. So instead of cdc_ncm spewing the link speed into the dmesg buffer, record the link speed encoded in these notifications and tell the usbnet framework to use the new functions to get link speed/state. Link speed/state is now available via ethtool. This is especially useful given all current RTL8156 devices emit a connection/speed status notification every 32ms and this would fill the dmesg buffer. This implementation replaces the one recently submitted in de658a195ee23ca6aaffe197d1d2ea040beea0a2 : "net: usb: cdc_ncm: don't spew notifications" v2: rebased on upstream v3: changed variable names v4: rewrote commit message Signed-off-by: Oliver Neukum Tested-by: Roland Dreier Signed-off-by: Grant Grundler Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 956baa99571bbaf88f3e91190dfb498c685b0e21 Author: Oliver Neukum Date: Mon Apr 5 16:13:42 2021 -0700 usbnet: add method for reporting speed without MII The old method for reporting link speed assumed a driver uses the generic phy (mii) MDIO read/write functions. CDC devices don't expose the phy. Add a primitive internal version reporting back directly what the CDC notification/status operations recorded. v2: rebased on upstream v3: changed names and made clear which units are used v4: moved hunks to correct patch; rewrote commmit messages Signed-off-by: Oliver Neukum Tested-by: Roland Dreier Reviewed-by: Grant Grundler Tested-by: Grant Grundler Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 77651900cede54930cd8a039dcd4583bfa308807 Author: Oliver Neukum Date: Mon Apr 5 16:13:41 2021 -0700 usbnet: add _mii suffix to usbnet_set/get_link_ksettings The generic functions assumed devices provided an MDIO interface (accessed via older mii code, not phylib). This is true only for genuine ethernet. Devices with a higher level of abstraction or based on different technologies do not have MDIO. To support this case, first rename the existing functions with _mii suffix. v2: rebased on changed upstream v3: changed names to clearly say that this does NOT use phylib v4: moved hunks to correct patch; reworded commmit messages Signed-off-by : Oliver Neukum Tested-by: Roland Dreier Reviewed-by: Grant Grundler Tested-by: Grant Grundler Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit e880f8b3a24a73704731a7227ed5fee14bd90192 Author: Manoj Basapathi Date: Mon Apr 5 22:32:42 2021 +0530 tcp: Reset tcp connections in SYN-SENT state Userspace sends tcp connection (sock) destroy on network switch i.e switching the default network of the device between multiple networks(Cellular/Wifi/Ethernet). Kernel though doesn't send reset for the connections in SYN-SENT state and these connections continue to remain. Even as per RFC 793, there is no hard rule to not send RST on ABORT in this state. Modify tcp_abort and tcp_disconnect behavior to send RST for connections in syn-sent state to avoid lingering connections on network switch. Signed-off-by: Manoj Basapathi Signed-off-by: Sauvik Saha Signed-off-by: David S. Miller commit 4fb13790417a7bf726f3867a5d2b9723efde488b Author: Suzuki K Poulose Date: Mon Apr 5 17:43:07 2021 +0100 dts: bindings: Document device tree bindings for Arm TRBE Document the device tree bindings for Trace Buffer Extension (TRBE). Cc: Anshuman Khandual Cc: Mathieu Poirier Cc: Rob Herring Cc: devicetree@vger.kernel.org Reviewed-by: Rob Herring Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-21-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 4af432186122bb274b76e7ac549073122c41d2fb Author: Anshuman Khandual Date: Mon Apr 5 17:43:06 2021 +0100 Documentation: trace: Add documentation for TRBE Add documentation for the TRBE under trace/coresight. Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Anshuman Khandual [ Split from the TRBE driver patch ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-20-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit b20f34aec776f4c735cd3a899e9bc3333463848a Author: Anshuman Khandual Date: Mon Apr 5 17:43:05 2021 +0100 Documentation: coresight: trbe: Sysfs ABI description Add sysfs ABI documentation for the TRBE devices. Cc: Mathieu Poirier Cc: Mike Leach Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Signed-off-by: Anshuman Khandual [ Split from the TRBE driver patch ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-19-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 Author: Anshuman Khandual Date: Mon Apr 5 17:43:04 2021 +0100 coresight: sink: Add TRBE driver Trace Buffer Extension (TRBE) implements a trace buffer per CPU which is accessible via the system registers. The TRBE supports different addressing modes including CPU virtual address and buffer modes including the circular buffer mode. The TRBE buffer is addressed by a base pointer (TRBBASER_EL1), an write pointer (TRBPTR_EL1) and a limit pointer (TRBLIMITR_EL1). But the access to the trace buffer could be prohibited by a higher exception level (EL3 or EL2), indicated by TRBIDR_EL1.P. The TRBE can also generate a CPU private interrupt (PPI) on address translation errors and when the buffer is full. Overall implementation here is inspired from the Arm SPE driver. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Signed-off-by: Anshuman Khandual [ Mark the buffer truncated on WRAP event, error code cleanup ] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-18-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 2cd87a7b293dedbbaea3b6739f95d428a2d9890d Author: Anshuman Khandual Date: Mon Apr 5 17:43:03 2021 +0100 coresight: core: Add support for dedicated percpu sinks Add support for dedicated sinks that are bound to individual CPUs. (e.g, TRBE). To allow quicker access to the sink for a given CPU bound source, keep a percpu array of the sink devices. Also, add support for building a path to the CPU local sink from the ETM. This adds a new percpu sink type CORESIGHT_DEV_SUBTYPE_SINK_PERCPU_SYSMEM. This new sink type is exclusively available and can only work with percpu source type device CORESIGHT_DEV_SUBTYPE_SOURCE_PROC. This defines a percpu structure that accommodates a single coresight_device which can be used to store an initialized instance from a sink driver. As these sinks are exclusively linked and dependent on corresponding percpu sources devices, they should also be the default sink device during a perf session. Outwards device connections are scanned while establishing paths between a source and a sink device. But such connections are not present for certain percpu source and sink devices which are exclusively linked and dependent. Build the path directly and skip connection scanning for such devices. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Tested-by: Suzuki K Poulose Reviewed-by: Mike Leach Signed-off-by: Anshuman Khandual [Moved the set/get percpu sink APIs from TRBE patch to here Fixed build break on arm32] Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-17-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 549452b73e6bf7542cfb3b039915253ca444337a Author: Suzuki K Poulose Date: Mon Apr 5 17:43:02 2021 +0100 coresight: etm-perf: Handle stale output handles The context associated with an ETM for a given perf event includes : - handle -> the perf output handle for the AUX buffer. - the path for the trace components - the buffer config for the sink. The path and the buffer config are part of the "aux_priv" data (etm_event_data) setup by the setup_aux() callback, and made available via perf_get_aux(handle). Now with a sink supporting IRQ, the sink could "end" an output handle when the buffer reaches the programmed limit and would try to restart a handle. This could fail if there is not enough space left the AUX buffer (e.g, the userspace has not consumed the data). This leaves the "handle" disconnected from the "event" and also the "perf_get_aux()" cleared. This all happens within the sink driver, without the etm_perf driver being aware. Now when the event is actually stopped, etm_event_stop() will need to access the "event_data". But since the handle is not valid anymore, we loose the information to stop the "trace" path. So, we need a reliable way to access the etm_event_data even when the handle may not be active. This patch replaces the per_cpu handle array with a per_cpu context for the ETM, which tracks the "handle" as well as the "etm_event_data". The context notes the etm_event_data at etm_event_start() and clears it at etm_event_stop(). This makes sure that we don't access a stale "etm_event_data" as we are guaranteed that it is not freed by free_aux() as long as the event is active and tracing, also provides us with access to the critical information needed to wind up a session even in the absence of an active output_handle. This is not an issue for the legacy sinks as none of them supports an IRQ and is centrally handled by the etm-perf. Cc: Mathieu Poirier Cc: Anshuman Khandual Cc: Leo Yan Cc: Mike Leach Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-16-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit e7cc4f2303b0ce1ecb9d8d381a1763bfea15fea9 Author: Suzuki K Poulose Date: Mon Apr 5 17:43:01 2021 +0100 dts: bindings: Document device tree bindings for ETE Document the device tree bindings for Embedded Trace Extensions. ETE can be connected to legacy coresight components and thus could optionally contain a connection graph as described by the CoreSight bindings. Cc: devicetree@vger.kernel.org Cc: Mathieu Poirier Cc: Mike Leach Reviewed-by: Rob Herring Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-15-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 35e1c9163e025855f23a68f2470c471509e5d779 Author: Suzuki K Poulose Date: Mon Apr 5 17:43:00 2021 +0100 coresight: ete: Add support for ETE tracing Add ETE as one of the supported device types we support with ETM4x driver. The devices are named following the existing convention as ete. ETE mandates that the trace resource status register is programmed before the tracing is turned on. For the moment simply write to it indicating TraceActive. Cc: Mike Leach Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-14-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 3e666ad0f8c6648373d1841436903c6483d94820 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:59 2021 +0100 coresight: ete: Add support for ETE sysreg access Add support for handling the system registers for Embedded Trace Extensions (ETE). ETE shares most of the registers with ETMv4 except for some and also adds some new registers. Re-arrange the ETMv4x list to share the common definitions and add the ETE sysreg support. Cc: Mike Leach Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-13-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit bc2c689f0648898c498700e40e71f5170eed1532 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:58 2021 +0100 coresight: etm4x: Add support for PE OS lock ETE may not implement the OS lock and instead could rely on the PE OS Lock for the trace unit access. This is indicated by the TRCOLSR.OSM == 0b100. Add support for handling the PE OS lock Cc: Mike Leach Reviewed-by: mike.leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-12-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 2b921b671a8d29c2adb255a86409aad1e3267309 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:57 2021 +0100 coresight: Do not scan for graph if none is present If a graph node is not found for a given node, of_get_next_endpoint() will emit the following error message : OF: graph: no port node found in / If the given component doesn't have any explicit connections (e.g, ETE) we could simply ignore the graph parsing. As for any legacy component where this is mandatory, the device will not be usable as before this patch. Updating the DT bindings to Yaml and enabling the schema checks can detect such issues with the DT. Cc: Mike Leach Cc: Leo Yan Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-11-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 0e6c205175969a7ef5a7689844b0f889728d3be2 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:56 2021 +0100 coresight: etm-perf: Allow an event to use different sinks When a sink is not specified by the user, the etm perf driver finds a suitable sink automatically, based on the first ETM where this event could be scheduled. Then we allocate the sink buffer based on the selected sink. This is fine for a CPU bound event as the "sink" is always guaranteed to be reachable from the ETM (as this is the only ETM where the event is going to be scheduled). However, if we have a thread bound event, the event could be scheduled on any of the ETMs on the system. In this case, currently we automatically select a sink and exclude any ETMs that cannot reach the selected sink. This is problematic especially for 1x1 configurations. We end up in tracing the event only on the "first" ETM, as the default sink is local to the first ETM and unreachable from the rest. However, we could allow the other ETMs to trace if they all have a sink that is compatible with the "selected" sink and can use the sink buffer. This can be easily done by verifying that they are all driven by the same driver and matches the same subtype. Please note that at anytime there can be only one ETM tracing the event. Adding support for different types of sinks for a single event is complex and is not something that we expect on a sane configuration. Cc: Anshuman Khandual Reviewed-by: Mike Leach Tested-by: Linu Cherian Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-10-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 8b4811965f53251b89af8654291e965047367b25 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:55 2021 +0100 coresight: etm4x: Move ETM to prohibited region for disable If the CPU implements Arm v8.4 Trace filter controls (FEAT_TRF), move the ETM to trace prohibited region using TRFCR, while disabling. Cc: Mathieu Poirier Cc: Mike Leach Cc: Anshuman Khandual Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-9-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit a1319260bf62951e279ea228f682bf4b8834a3c2 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:54 2021 +0100 arm64: KVM: Enable access to TRBE support for host For a nvhe host, the EL2 must allow the EL1&0 translation regime for TraceBuffer (MDCR_EL2.E2TB == 0b11). This must be saved/restored over a trip to the guest. Also, before entering the guest, we must flush any trace data if the TRBE was enabled. And we must prohibit the generation of trace while we are in EL1 by clearing the TRFCR_EL1. For vhe, the EL2 must prevent the EL1 access to the Trace Buffer. The MDCR_EL2 bit definitions for TRBE are available here : https://developer.arm.com/documentation/ddi0601/2020-12/AArch64-Registers/ Cc: Will Deacon Cc: Catalin Marinas Cc: Marc Zyngier Cc: Mark Rutland Cc: Anshuman Khandual Signed-off-by: Suzuki K Poulose Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405164307.1720226-8-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit d2602bb4f5a450642b96d467e27e6d5d3ef7fa54 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:53 2021 +0100 KVM: arm64: Move SPE availability check to VCPU load At the moment, we check the availability of SPE on the given CPU (i.e, SPE is implemented and is allowed at the host) during every guest entry. This can be optimized a bit by moving the check to vcpu_load time and recording the availability of the feature on the current CPU via a new flag. This will also be useful for adding the TRBE support. Cc: Marc Zyngier Cc: Will Deacon Cc: Alexandru Elisei Cc: James Morse Signed-off-by: Suzuki K Poulose Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405164307.1720226-7-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit cc427cbb15375f1229e78908064cdff98138b8b1 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:52 2021 +0100 KVM: arm64: Handle access to TRFCR_EL1 Rather than falling to an "unhandled access", inject add an explicit "undefined access" for TRFCR_EL1 access from the guest. Cc: Marc Zyngier Cc: Will Deacon Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405164307.1720226-6-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 957dca3df624abcbf895f5081fc664693aa0b363 Author: Muhammad Usama Anjum Date: Tue Apr 6 00:49:04 2021 +0500 bpf, inode: Remove second initialization of the bpf_preload_lock bpf_preload_lock is already defined with DEFINE_MUTEX(). There is no need to initialize it again. Remove the extraneous initialization. Signed-off-by: Muhammad Usama Anjum Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210405194904.GA148013@LEGION commit 928dc406802dc4547b5ef84c3075fe144d4cbcf1 Author: Cong Wang Date: Fri Apr 2 22:27:15 2021 -0700 bpf, udp: Remove some pointless comments These comments in udp_bpf_update_proto() are copied from the original TCP code and apparently do not apply to UDP. Just remove them. Reported-by: Jakub Sitnicki Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210403052715.13854-1-xiyou.wangcong@gmail.com commit f65968ac191bd5f31091ff132191bf2ce3aed6c8 Author: Daniel Latypov Date: Tue Apr 6 10:29:01 2021 -0700 kunit: fix -Wunused-function warning for __kunit_fail_current_test When CONFIG_KUNIT is not enabled, __kunit_fail_current_test() an empty static function. But GCC complains about unused static functions, *unless* they're static inline. So add inline to make GCC happy. Fixes: 359a376081d4 ("kunit: support failure from dynamic analysis tools") Reported-by: Stephen Rothwell Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit f67743f9e03a67dbbf931d1787e6faf50766e521 Author: Marcel Holtmann Date: Tue Apr 6 21:55:52 2021 +0200 Bluetooth: Add support for reading AOSP vendor capabilities When drivers indicate support for AOSP vendor extension, initialize them and read its capabilities. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit ccdfc4ae4d41c30e1461f44ee0e4c415b88350f8 Author: Christophe Leroy Date: Sat Mar 6 18:09:31 2021 +0000 Revert "soc: fsl: qe: introduce qe_io{read,write}* wrappers" This reverts commit 6ac9b61786cc64ae5cbfb69413137656f72e8204. This commit was required because at that time, ioread/iowrite functions were sub-optimal on powerpc/32 compared to the architecture specific in_/out_ IO accessors. But there are now equivalent since commit 894fa235eb4c ("powerpc: inline iomap accessors"). Signed-off-by: Christophe Leroy Signed-off-by: Li Yang commit 18f0211c9a104b6f40ab92f644a95d7f3028515c Author: Christophe Leroy Date: Sat Mar 6 18:09:30 2021 +0000 tty: serial: ucc_uart: replace qe_io{read,write}* wrappers by generic io{read,write}* Commit 6ac9b61786cc ("soc: fsl: qe: introduce qe_io{read,write}* wrappers") added specific I/O accessors for qe because at that time ioread/iowrite functions were sub-optimal on powerpc/32 compared to the architecture specific in_/out_ IO accessors. But as ioread/iowrite accessors are now equivalent since commit 894fa235eb4c ("powerpc: inline iomap accessors"), use them in order to allow removal of the qe specific ones. Signed-off-by: Christophe Leroy Acked-by: Greg Kroah-Hartman Signed-off-by: Li Yang commit 010e32ab205bfee3a3e860d0366c1516c3e298f9 Author: Alain Volmat Date: Fri Mar 12 12:53:27 2021 +0100 i2c: stm32f7: avoid ifdef CONFIG_PM_SLEEP for pm callbacks Avoid CONFIG_PM preprocessor check for pm suspend/resume callbacks and identify the functions with __maybe_unused. Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 3f39f38ea91dc2603dcb7dc8a16ee3dbe10bd34b Author: Christophe Leroy Date: Sat Mar 6 18:09:29 2021 +0000 soc: fsl: qe: replace qe_io{read,write}* wrappers by generic io{read,write}* Commit 6ac9b61786cc ("soc: fsl: qe: introduce qe_io{read,write}* wrappers") added specific I/O accessors for qe because at that time ioread/iowrite functions were sub-optimal on powerpc/32 compared to the architecture specific in_/out_ IO accessors. But as ioread/iowrite accessors are now equivalent since commit 894fa235eb4c ("powerpc: inline iomap accessors"), use them in order to allow removal of the qe specific ones. Signed-off-by: Christophe Leroy Signed-off-by: Li Yang commit dc67dac617e3586ec2db49f3c4fde1d6ac7afe14 Author: Aditya Srivastava Date: Sun Mar 14 12:58:28 2021 +0530 soc: fsl: guts: fix comment syntax in file The opening comment mark '/**' is used for kernel-doc comments. There are certain comments in include/linux/fsl/guts.h which follows this syntax, but the content inside does not comply with kernel-doc. E.g., opening comment for "Freecale 85xx and 86xx Global Utilties register set" follows kernel-doc syntax(i.e., '/**'), but the content inside does not comply with any kernel-doc specification (function, struct, etc). This causes unwelcomed warning from kernel-doc: "warning: expecting prototype for Freecale 85xx and 86xx Global Utilties register set(). Prototype was for __FSL_GUTS_H__() instead" Replace all such comment occurrences with general comment format, i.e. '/*' to pervent kernel-doc from parsing these. Signed-off-by: Aditya Srivastava Reviewed-by: Randy Dunlap Signed-off-by: Li Yang commit 6031008780efaada18087eba7ec84fe149f124a9 Author: Krzysztof Kozlowski Date: Mon Apr 5 20:16:05 2021 +0200 ARM: exynos: correct kernel doc in platsmp Correct few kerneldoc issues, including W=1 compile warning: arch/arm/mach-exynos/platsmp.c:89: warning: expecting prototype for exynos_core_power_down(). Prototype was for exynos_cpu_power_down() instead Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210405181605.52612-1-krzysztof.kozlowski@canonical.com commit 9469f04bb9e69e437941c52f0802284e5d3fa4bc Author: Yang Li Date: Wed Feb 3 09:51:03 2021 +0800 soc: fsl: guts: remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/soc/fsl/guts.c:120:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Li Yang commit 7374a3e572fe90c89aa1fa78ced424822bcba663 Author: Zheng Yongjun Date: Wed Dec 23 22:14:59 2020 +0800 soc: fsl: qe: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Zheng Yongjun Signed-off-by: Li Yang commit f22c8d317a465c0040e5d1d334c72fe36a6ae9d9 Author: Zheng Yongjun Date: Wed Dec 16 21:08:13 2020 +0800 soc: fsl: qbman: Delete useless kfree code The parameter of kfree function is NULL, so kfree code is useless, delete it. Signed-off-by: Zheng Yongjun Signed-off-by: Li Yang commit 6a2a235aa6275ffd8db3ef9e0e86cb638b1187d1 Merge: 1e04ec14204de a536019d3e7d8 b392a19891702 Author: Alex Williamson Date: Tue Apr 6 12:01:51 2021 -0600 Merge branches 'v5.13/vfio/embed-vfio_device', 'v5.13/vfio/misc' and 'v5.13/vfio/nvlink' into v5.13/vfio/next Spelling fixes merged with file deletion. Conflicts: drivers/vfio/pci/vfio_pci_nvlink2.c Signed-off-by: Alex Williamson commit 1e04ec14204dec28131855d8dd160c3d55d12797 Author: Jason Gunthorpe Date: Tue Mar 30 09:53:08 2021 -0600 vfio: Remove device_data from the vfio bus driver API There are no longer any users, so it can go away. Everything is using container_of now. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Reviewed-by: Max Gurtovoy Signed-off-by: Jason Gunthorpe Message-Id: <14-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 07d47b4222d5d1cd933f01587dda00398d8daf40 Author: Jason Gunthorpe Date: Tue Mar 30 09:53:08 2021 -0600 vfio/pci: Replace uses of vfio_device_data() with container_of This tidies a few confused places that think they can have a refcount on the vfio_device but the device_data could be NULL, that isn't possible by design. Most of the change falls out when struct vfio_devices is updated to just store the struct vfio_pci_device itself. This wasn't possible before because there was no easy way to get from the 'struct vfio_pci_device' to the 'struct vfio_device' to put back the refcount. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <13-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 6df62c5b05f4ad6876815ea8b8775905a090224a Author: Jason Gunthorpe Date: Tue Mar 30 09:53:08 2021 -0600 vfio: Make vfio_device_ops pass a 'struct vfio_device *' instead of 'void *' This is the standard kernel pattern, the ops associated with a struct get the struct pointer in for typesafety. The expected design is to use container_of to cleanly go from the subsystem level type to the driver level type without having any type erasure in a void *. Reviewed-by: Dan Williams Reviewed-by: Christoph Hellwig Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <12-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 66873b5fa738ca02b5c075ca4a410b13d88e6e9a Author: Jason Gunthorpe Date: Tue Mar 30 09:53:07 2021 -0600 vfio/mdev: Make to_mdev_device() into a static inline The macro wrongly uses 'dev' as both the macro argument and the member name, which means it fails compilation if any caller uses a word other than 'dev' as the single argument. Fix this defect by making it into proper static inline, which is more clear and typesafe anyhow. Fixes: 99e3123e3d72 ("vfio-mdev: Make mdev_device private and abstract interfaces") Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <11-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 1ae1b20f6f2c67659c963e5fe58f9b4a47df9f12 Author: Jason Gunthorpe Date: Tue Mar 30 09:53:07 2021 -0600 vfio/mdev: Use vfio_init/register/unregister_group_dev mdev gets little benefit because it doesn't actually do anything, however it is the last user, so move the vfio_init/register/unregister_group_dev() code here for now. Reviewed-by: Christoph Hellwig Reviewed-by: Liu Yi L Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <10-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 6b018e203d5effc97961cd9477687fe09e2fe79f Author: Jason Gunthorpe Date: Tue Mar 30 09:53:07 2021 -0600 vfio/pci: Use vfio_init/register/unregister_group_dev pci already allocates a struct vfio_pci_device with exactly the same lifetime as vfio_device, switch to the new API and embed vfio_device in vfio_pci_device. Reviewed-by: Christoph Hellwig Reviewed-by: Liu Yi L Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Reviewed-by: Eric Auger Signed-off-by: Jason Gunthorpe Message-Id: <9-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 4aeec3984ddc853f7c65903bde472ffdef738bae Author: Jason Gunthorpe Date: Tue Mar 30 09:53:06 2021 -0600 vfio/pci: Re-order vfio_pci_probe() vfio_add_group_dev() must be called only after all of the private data in vdev is fully setup and ready, otherwise there could be races with user space instantiating a device file descriptor and starting to call ops. For instance vfio_pci_reflck_attach() sets vdev->reflck and vfio_pci_open(), called by fops open, unconditionally derefs it, which will crash if things get out of order. Fixes: cc20d7999000 ("vfio/pci: Introduce VF token") Fixes: e309df5b0c9e ("vfio/pci: Parallelize device open and release") Fixes: 6eb7018705de ("vfio-pci: Move idle devices to D3hot power state") Fixes: ecaa1f6a0154 ("vfio-pci: Add VGA arbiter client") Reviewed-by: Christoph Hellwig Reviewed-by: Max Gurtovoy Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Reviewed-by: Eric Auger Signed-off-by: Jason Gunthorpe Message-Id: <8-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 61e90817482871b614133c0f20feb1aba2faec86 Author: Jason Gunthorpe Date: Tue Mar 30 09:53:06 2021 -0600 vfio/pci: Move VGA and VF initialization to functions vfio_pci_probe() is quite complicated, with optional VF and VGA sub components. Move these into clear init/uninit functions and have a linear flow in probe/remove. This fixes a few little buglets: - vfio_pci_remove() is in the wrong order, vga_client_register() removes a notifier and is after kfree(vdev), but the notifier refers to vdev, so it can use after free in a race. - vga_client_register() can fail but was ignored Organize things so destruction order is the reverse of creation order. Fixes: ecaa1f6a0154 ("vfio-pci: Add VGA arbiter client") Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Max Gurtovoy Reviewed-by: Cornelia Huck Reviewed-by: Eric Auger Signed-off-by: Jason Gunthorpe Message-Id: <7-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 0ca78666fa06cf2a7d068a593428dc4039706e00 Author: Jason Gunthorpe Date: Tue Mar 30 09:53:06 2021 -0600 vfio/fsl-mc: Use vfio_init/register/unregister_group_dev fsl-mc already allocates a struct vfio_fsl_mc_device with exactly the same lifetime as vfio_device, switch to the new API and embed vfio_device in vfio_fsl_mc_device. While here remove the devm usage for the vdev, this code is clean and doesn't need devm. Reviewed-by: Christoph Hellwig Reviewed-by: Cornelia Huck Signed-off-by: Jason Gunthorpe Message-Id: <6-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 2b1fe162e584a88ec7f12a651a2a50f94dd8cfac Author: Jason Gunthorpe Date: Tue Mar 30 09:53:06 2021 -0600 vfio/fsl-mc: Re-order vfio_fsl_mc_probe() vfio_add_group_dev() must be called only after all of the private data in vdev is fully setup and ready, otherwise there could be races with user space instantiating a device file descriptor and starting to call ops. For instance vfio_fsl_mc_reflck_attach() sets vdev->reflck and vfio_fsl_mc_open(), called by fops open, unconditionally derefs it, which will crash if things get out of order. This driver started life with the right sequence, but two commits added stuff after vfio_add_group_dev(). Fixes: 2e0d29561f59 ("vfio/fsl-mc: Add irq infrastructure for fsl-mc devices") Fixes: f2ba7e8c947b ("vfio/fsl-mc: Added lock support in preparation for interrupt handling") Co-developed-by: Diana Craciun OSS Signed-off-by: Jason Gunthorpe Message-Id: <5-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit cb6164586814bbe41f55559ae5505d8373d6f781 Author: Jason Gunthorpe Date: Tue Mar 30 09:53:06 2021 -0600 vfio/platform: Use vfio_init/register/unregister_group_dev platform already allocates a struct vfio_platform_device with exactly the same lifetime as vfio_device, switch to the new API and embed vfio_device in vfio_platform_device. Reviewed-by: Christoph Hellwig Reviewed-by: Cornelia Huck Acked-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Jason Gunthorpe Message-Id: <4-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 0bfc6a4ea63c2adac71a824397ef48f28dbc5e47 Author: Jason Gunthorpe Date: Tue Mar 30 09:53:05 2021 -0600 vfio: Split creation of a vfio_device into init and register ops This makes the struct vfio_device part of the public interface so it can be used with container_of and so forth, as is typical for a Linux subystem. This is the first step to bring some type-safety to the vfio interface by allowing the replacement of 'void *' and 'struct device *' inputs with a simple and clear 'struct vfio_device *' For now the self-allocating vfio_add_group_dev() interface is kept so each user can be updated as a separate patch. The expected usage pattern is driver core probe() function: my_device = kzalloc(sizeof(*mydevice)); vfio_init_group_dev(&my_device->vdev, dev, ops, mydevice); /* other driver specific prep */ vfio_register_group_dev(&my_device->vdev); dev_set_drvdata(dev, my_device); driver core remove() function: my_device = dev_get_drvdata(dev); vfio_unregister_group_dev(&my_device->vdev); /* other driver specific tear down */ kfree(my_device); Allowing the driver to be able to use the drvdata and vfio_device to go to/from its own data. The pattern also makes it clear that vfio_register_group_dev() must be last in the sequence, as once it is called the core code can immediately start calling ops. The init/register gap is provided to allow for the driver to do setup before ops can be called and thus avoid races. Reviewed-by: Christoph Hellwig Reviewed-by: Liu Yi L Reviewed-by: Cornelia Huck Reviewed-by: Max Gurtovoy Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Signed-off-by: Jason Gunthorpe Message-Id: <3-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit 5e42c999445bd0ae86e35affeb3e7c473d74a893 Author: Jason Gunthorpe Date: Tue Mar 30 09:53:05 2021 -0600 vfio: Simplify the lifetime logic for vfio_device The vfio_device is using a 'sleep until all refs go to zero' pattern for its lifetime, but it is indirectly coded by repeatedly scanning the group list waiting for the device to be removed on its own. Switch this around to be a direct representation, use a refcount to count the number of places that are blocking destruction and sleep directly on a completion until that counter goes to zero. kfree the device after other accesses have been excluded in vfio_del_group_dev(). This is a fairly common Linux idiom. Due to this we can now remove kref_put_mutex(), which is very rarely used in the kernel. Here it is being used to prevent a zero ref device from being seen in the group list. Instead allow the zero ref device to continue to exist in the device_list and use refcount_inc_not_zero() to exclude it once refs go to zero. This patch is organized so the next patch will be able to alter the API to allow drivers to provide the kfree. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Cornelia Huck Reviewed-by: Eric Auger Signed-off-by: Jason Gunthorpe Message-Id: <2-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit e572bfb2b6a83b05acd30c03010e661b1967960f Author: Jason Gunthorpe Date: Tue Mar 30 09:53:05 2021 -0600 vfio: Remove extra put/gets around vfio_device->group The vfio_device->group value has a get obtained during vfio_add_group_dev() which gets moved from the stack to vfio_device->group in vfio_group_create_device(). The reference remains until we reach the end of vfio_del_group_dev() when it is put back. Thus anything that already has a kref on the vfio_device is guaranteed a valid group pointer. Remove all the extra reference traffic. It is tricky to see, but the get at the start of vfio_del_group_dev() is actually pairing with the put hidden inside vfio_device_put() a few lines below. A later patch merges vfio_group_create_device() into vfio_add_group_dev() which makes the ownership and error flow on the create side easier to follow. Reviewed-by: Christoph Hellwig Reviewed-by: Kevin Tian Reviewed-by: Max Gurtovoy Reviewed-by: Cornelia Huck Reviewed-by: Eric Auger Signed-off-by: Jason Gunthorpe Message-Id: <1-v3-225de1400dfc+4e074-vfio1_jgg@nvidia.com> Signed-off-by: Alex Williamson commit b392a198917020cac996fd207355211ecfcfad84 Author: Christoph Hellwig Date: Tue Mar 30 10:01:18 2021 -0600 vfio/pci: remove vfio_pci_nvlink2 This driver never had any open userspace (which for VFIO would include VM kernel drivers) that use it, and thus should never have been added by our normal userspace ABI rules. Signed-off-by: Christoph Hellwig Acked-by: Greg Kroah-Hartman Message-Id: <20210326061311.1497642-2-hch@lst.de> Signed-off-by: Alex Williamson commit a536019d3e7d85a901c5e6a2f2894c0aa0acaefa Author: Shenming Lu Date: Tue Apr 6 21:50:09 2021 +0800 vfio/type1: Remove the almost unused check in vfio_iommu_type1_unpin_pages The check i > npage at the end of vfio_iommu_type1_unpin_pages is unused unless npage < 0, but if npage < 0, this function will return npage, which should return -EINVAL instead. So let's just check the parameter npage at the start of the function. By the way, replace unpin_exit with break. Signed-off-by: Shenming Lu Message-Id: <20210406135009.1707-1-lushenming@huawei.com> Signed-off-by: Alex Williamson commit f5c858ec2b1d2a2656d78a5efe37cfcf568fce31 Author: Zhen Lei Date: Tue Mar 30 09:54:22 2021 -0600 vfio/platform: Fix spelling mistake "registe" -> "register" There is a spelling mistake in a comment, fix it. Signed-off-by: Zhen Lei Acked-by: Eric Auger Message-Id: <20210326083528.1329-5-thunder.leizhen@huawei.com> Signed-off-by: Alex Williamson commit d0915b32917c3afb390c0eca1a77fd656527d5dc Author: Zhen Lei Date: Tue Mar 30 09:54:21 2021 -0600 vfio/pci: fix a couple of spelling mistakes There are several spelling mistakes, as follows: thru ==> through presense ==> presence Signed-off-by: Zhen Lei Reviewed-by: Eric Auger Message-Id: <20210326083528.1329-4-thunder.leizhen@huawei.com> Signed-off-by: Alex Williamson commit d0a7541dd9998c3b911943fee3bb726d9c2d89c3 Author: Zhen Lei Date: Tue Mar 30 09:54:21 2021 -0600 vfio/mdev: Fix spelling mistake "interal" -> "internal" There is a spelling mistake in a comment, fix it. Signed-off-by: Zhen Lei Reviewed-by: Eric Auger Message-Id: <20210326083528.1329-3-thunder.leizhen@huawei.com> Signed-off-by: Alex Williamson commit 06d738c8ab56f3de68f785154b87dae1ec94c823 Author: Zhen Lei Date: Tue Mar 30 09:54:21 2021 -0600 vfio/type1: fix a couple of spelling mistakes There are several spelling mistakes, as follows: userpsace ==> userspace Accouting ==> Accounting exlude ==> exclude Signed-off-by: Zhen Lei Reviewed-by: Eric Auger Message-Id: <20210326083528.1329-2-thunder.leizhen@huawei.com> Signed-off-by: Alex Williamson commit bab2c1990b78b90d7e1cffbb05ccf1009a55f0d3 Author: Fred Gao Date: Tue Mar 30 09:54:21 2021 -0600 vfio/pci: Add support for opregion v2.1+ Before opregion version 2.0 VBT data is stored in opregion mailbox #4, but when VBT data exceeds 6KB size and cannot be within mailbox #4 then from opregion v2.0+, Extended VBT region, next to opregion is used to hold the VBT data, so the total size will be opregion size plus extended VBT region size. Since opregion v2.0 with physical host VBT address would not be practically available for end user and guest can not directly access host physical address, so it is not supported. Cc: Zhenyu Wang Signed-off-by: Swee Yee Fonn Signed-off-by: Fred Gao Message-Id: <20210325170953.24549-1-fred.gao@intel.com> Reviewed-by: Zhenyu Wang Signed-off-by: Alex Williamson commit 36f0be5a30bbe6f1783db459449f2d88c5cd1e34 Author: Zhou Wang Date: Tue Mar 30 09:54:21 2021 -0600 vfio/pci: Remove an unnecessary blank line in vfio_pci_enable This blank line is unnecessary, so remove it. Signed-off-by: Zhou Wang Message-Id: <1615808073-178604-1-git-send-email-wangzhou1@hisilicon.com> Signed-off-by: Alex Williamson commit fbc9d37161b7d7e0e5f838445bbeff721dc4fc8d Author: Bhaskar Chowdhury Date: Tue Mar 30 09:54:21 2021 -0600 vfio: pci: Spello fix in the file vfio_pci.c s/permision/permission/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Message-Id: <20210314052925.3560-1-unixbhaskar@gmail.com> Signed-off-by: Alex Williamson commit 7acc54ed6061c9219774d1897efa34c6304ffda8 Author: Sylwester Nawrocki Date: Fri Mar 26 18:20:40 2021 +0100 media: s5p-mfc: Fix kernel-doc entries in s5p_mfc_common.h Fixes scripts/kernel-doc warnings: s5p_mfc_common.h:343: warning: Function parameter or member 'fw_buf' not described in 's5p_mfc_dev' s5p_mfc_common.h:343: warning: Function parameter or member 'mem_size' not described in 's5p_mfc_dev' s5p_mfc_common.h:343: warning: Function parameter or member 'mem_base' not described in 's5p_mfc_dev' s5p_mfc_common.h:343: warning: Function parameter or member 'mem_bitmap' not described in 's5p_mfc_dev' s5p_mfc_common.h:343: warning: Function parameter or member 'mem_virt' not described in 's5p_mfc_dev' s5p_mfc_common.h:343: warning: Function parameter or member 'dma_base' not described in 's5p_mfc_dev' s5p_mfc_common.h:343: warning: Function parameter or member 'watchdog_timer' not described in 's5p_mfc_dev' s5p_mfc_common.h:343: warning: Function parameter or member 'fw_get_done' not described in 's5p_mfc_dev' s5p_mfc_common.h:343: warning: Function parameter or member 'risc_on' not described in 's5p_mfc_dev' s5p_mfc_common.h:714: warning: Function parameter or member 'src_bufs_cnt' not described in 's5p_mfc_ctx' s5p_mfc_common.h:714: warning: Function parameter or member 'dst_bufs_cnt' not described in 's5p_mfc_ctx' s5p_mfc_common.h:714: warning: Function parameter or member 'pb_count' not described in 's5p_mfc_ctx' s5p_mfc_common.h:714: warning: Function parameter or member 'force_frame_type' not described in 's5p_mfc_ctx' s5p_mfc_common.h:714: warning: Function parameter or member 'slice_mode' not described in 's5p_mfc_ctx' s5p_mfc_common.h:714: warning: Function parameter or member 'slice_size' not described in 's5p_mfc_ctx' s5p_mfc_common.h:714: warning: Function parameter or member 'frame_tag' not described in 's5p_mfc_ctx' s5p_mfc_common.h:714: warning: Function parameter or member 'scratch_buf_size' not described in 's5p_mfc_ctx' Reported-by: Hans verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 08874fdd52abbcda7ab793ca80dd63c5f62e9a29 Author: Sylwester Nawrocki Date: Fri Mar 26 18:17:25 2021 +0100 media: exynos4-is: Fix kernel-doc entries in fimc-is.h Fixes scripts/kernel-doc warnings: fimc-is.h:286: warning: Function parameter or member 'fw' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'memory' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'f_w' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'isp' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'sensor' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'setfile' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'ctrl_handler' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'irq' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'sensor_index' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'i2h_cmd' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'h2i_cmd' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'fd_header' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'config' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'config_index' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'is_p_region' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'is_dma_p_region' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'is_shared_region' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'af' not described in 'fimc_is' fimc-is.h:286: warning: Function parameter or member 'debugfs_entry' not described in 'fimc_is' The f_w field is unused so remove it. Reported-by: Hans Verkuil Signed-off-by: Sylwester Nawrocki Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b24bc3ab010970e976dc363d2ca0796516d0d763 Author: Hans Verkuil Date: Fri Mar 26 10:03:32 2021 +0100 media: adv7511-v4l2: correctly report EDIDs of 1 block If the EDID has an odd number of blocks (usually just 1, but the same problem occurs with 3 blocks), then VIDIOC_G_EDID reported 2 (or 4) blocks. Fix this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c730ff32b917c814c1d86343328f0518a94114c0 Author: Hans Verkuil Date: Thu Mar 25 11:39:37 2021 +0100 media: adv7604: support EDIDs up to 4 blocks While the adv7604/11/12 hardware supported EDIDs up to 4 blocks, the driver didn't. This patch adds support for this. It also improves support for EDIDs that do not have a Source Physical Address: in that case the spa location is set to the first byte of the second block, and the 'physical address' is just the two bytes at that location. This is per the suggestion in the adv76xx documentation for such EDIDs. Tested with an adv7604 and adv7612. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab commit 1cf233d89fcd0171d078d2479c0e73013c15c859 Author: Hans Verkuil Date: Wed Mar 24 08:56:42 2021 +0100 media: adv7604: fix HPD support for adv7611/12 For the adv7604 the hotplug detect pin is controlled through gpio pins from the SoC, but the adv7611 and adv7612 control the hotplug detect pin themselves. But the driver had no support for this, so the HPD was always high, even when changing the EDID. Add proper support for this to the driver. Tested with an adv7612. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab commit 34c79fe9e267250597a6ccec50d3b780c15c023d Merge: e5870bd0e40c7 74ed9e9bfb734 Author: Mark Brown Date: Tue Apr 6 18:33:13 2021 +0100 Merge series "kbl_da7219_max9357a machine changes for wov and MST" from vamshi.krishna.gopal@intel.com Vamshi Krishna Gopal : From: Vamshi Krishna Gopal Hi all, This patch series about creating dailink for Wake on voice functionality and also adding MST route changes. changes in v3: -Remove DP from widgets -Add MST support in other routing table for kbl_rt5663_max98927.c v2 is here: https://patchwork.kernel.org/project/alsa-devel/cover/20210325174325.31802-1-vamshi.krishna.gopal@intel.com/ v1 is here: https://patchwork.kernel.org/project/alsa-devel/cover/20210324175200.44922-1-vamshi.krishna.gopal@intel.com/ Mac Chiang (1): ASoc: Intel: board: add BE DAI link for WoV Vamshi Krishna Gopal (1): ASoC: Intel: kbl: Add MST route change to kbl machine drivers sound/soc/intel/boards/kbl_da7219_max98357a.c | 58 +++++++++++++++++-- sound/soc/intel/boards/kbl_da7219_max98927.c | 10 ++-- sound/soc/intel/boards/kbl_rt5663_max98927.c | 14 +++-- 3 files changed, 70 insertions(+), 12 deletions(-) -- 2.17.1 commit 54676d5f5630b79f7b00c7c43882a58c1815aaf9 Author: Daniel Almeida Date: Tue Mar 23 19:57:09 2021 +0100 media: rkvdec: Do not require all controls to be present in every request According to the v4l2 api, it is allowed to skip setting a control if its contents haven't changed for performance reasons: userspace should only update the controls that changed from last frame rather then updating them all. Still some ancient code that checks for mandatory controls has been left in this driver. Remove it. Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Daniel Almeida Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b3754e5d3da320af2bebb7a690002685c7f5c15c Author: Sean Christopherson Date: Fri Mar 19 20:23:09 2021 +1300 x86/sgx: Move provisioning device creation out of SGX driver And extract sgx_set_attribute() out of sgx_ioc_enclave_provision() and export it as symbol for KVM to use. The provisioning key is sensitive. The SGX driver only allows to create an enclave which can access the provisioning key when the enclave creator has permission to open /dev/sgx_provision. It should apply to a VM as well, as the provisioning key is platform-specific, thus an unrestricted VM can also potentially compromise the provisioning key. Move the provisioning device creation out of sgx_drv_init() to sgx_init() as a preparation for adding SGX virtualization support, so that even if the SGX driver is not enabled due to flexible launch control not being available, SGX virtualization can still be enabled, and use it to restrict a VM's capability of being able to access the provisioning key. [ bp: Massage commit message. ] Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Reviewed-by: Jarkko Sakkinen Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/0f4d044d621561f26d5f4ef73e8dc6cd18cc7e79.1616136308.git.kai.huang@intel.com commit d155030b1e7c0e448aab22a803f7a71ea2e117d7 Author: Sean Christopherson Date: Fri Mar 19 20:23:08 2021 +1300 x86/sgx: Add helpers to expose ECREATE and EINIT to KVM The host kernel must intercept ECREATE to impose policies on guests, and intercept EINIT to be able to write guest's virtual SGX_LEPUBKEYHASH MSR values to hardware before running guest's EINIT so it can run correctly according to hardware behavior. Provide wrappers around __ecreate() and __einit() to hide the ugliness of overloading the ENCLS return value to encode multiple error formats in a single int. KVM will trap-and-execute ECREATE and EINIT as part of SGX virtualization, and reflect ENCLS execution result to guest by setting up guest's GPRs, or on an exception, injecting the correct fault based on return value of __ecreate() and __einit(). Use host userspace addresses (provided by KVM based on guest physical address of ENCLS parameters) to execute ENCLS/EINIT when possible. Accesses to both EPC and memory originating from ENCLS are subject to segmentation and paging mechanisms. It's also possible to generate kernel mappings for ENCLS parameters by resolving PFN but using __uaccess_xx() is simpler. [ bp: Return early if the __user memory accesses fail, use cpu_feature_enabled(). ] Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/20e09daf559aa5e9e680a0b4b5fba940f1bad86e.1616136308.git.kai.huang@intel.com commit 885aae6860fae1eed38f5cc1ac09a40e4896a38c Author: Alexey Minnekhanov Date: Tue Apr 6 17:05:51 2021 +0300 ARM: dts: qcom: msm8974-klte: Add bluetooth support Broadcom BCM4354 is used on Samsung Galaxy S5 phone on BLSP2 UART8 bus. Signed-off-by: Alexey Minnekhanov Link: https://lore.kernel.org/r/20210406140551.3328241-2-alexeymin@postmarketos.org Signed-off-by: Bjorn Andersson commit 83bbdec03fad56c0fad7dab10c9124c2d2999526 Author: Alexey Minnekhanov Date: Tue Apr 6 17:05:50 2021 +0300 ARM: dts: qcom: msm8974: add blsp2_uart8 Add blsp2_uart8 node in order to support bluetooth on the Samsung Galaxy S5 phone. Signed-off-by: Alexey Minnekhanov Link: https://lore.kernel.org/r/20210406140551.3328241-1-alexeymin@postmarketos.org Signed-off-by: Bjorn Andersson commit 69baf1a2a41a87eb16dc98aa9ddbdadd8070e5b2 Author: Wan Jiabing Date: Tue Apr 6 18:51:02 2021 +0800 perf mem-events: Remove unnecessary 'struct mem_info' forward declaration 'struct mem_info' is defined at 22nd line. The declaration here is unnecessary. Remove it. Signed-off-by: Wan Jiabing Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Kan Liang Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kael_w@yeah.net Link: http://lore.kernel.org/lkml/20210406105104.675879-1-wanjiabing@vivo.com Signed-off-by: Arnaldo Carvalho de Melo commit c4e38b2a27a852ed1507163a9cc5b3a9d2a2da97 Author: Roy Pledge Date: Tue Nov 3 15:05:55 2020 -0500 soc: fsl: qbman: Ensure device cleanup is run for kexec Make sure that the QBMan device cleanup routines are executed when the device was previously initialized. This is needed for kexec since the device will keep it's state from the previous kernel that was executing. Signed-off-by: Roy Pledge Signed-off-by: Li Yang commit e5870bd0e40c749fd96a4e565497c789bee456bf Author: Steve Lee Date: Mon Apr 5 23:38:01 2021 +0900 ASoC: max98390: Add support for tx slot configuration. Update voltage/current tx slot configuration support. Signed-off-by: Steve Lee Link: https://lore.kernel.org/r/20210405143801.29770-1-steves.lee@maximintegrated.com Signed-off-by: Mark Brown commit a43508995a913893c5f303e56415d06432b15619 Author: Shengjiu Wang Date: Sat Apr 3 21:59:25 2021 +0800 ASoC: ak5558: Fix s/show/slow/ typo s/show/slow/ Fixes: 920884777480 ("ASoC: ak5558: Add support for AK5558 ADC driver") Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1617458365-23393-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 74ed9e9bfb7343b0a6710b651df66f3d68551110 Author: Mac Chiang Date: Mon Apr 5 18:18:35 2021 +0530 ASoc: Intel: board: add BE DAI link for WoV create dai link in kbl_da7219_max98357a driver for wake on voice functionality. changes picked from broonie's tree commit 0c7941a63a0f ("ASoC: Intel: Skylake: Use refcap device for mono recording") commit 2154be362c90 ("ASoc: Intel: boards: Add WOV as sink for nau88l25_ssm4567 machine") Signed-off-by: Mac Chiang Signed-off-by: Vamshi Krishna Gopal Tested-by: Kaiyen Chang Tested-by: luke yang Tested-by: Grace Kao Tested-by: Kaiyen Chang Reviewed-by: Cheng-Yi Chiang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210405124835.71247-3-vamshi.krishna.gopal@intel.com Signed-off-by: Mark Brown commit c7c19ec098b862a688291f5a1101f7de6e4b0a6c Author: Vamshi Krishna Gopal Date: Mon Apr 5 18:18:34 2021 +0530 ASoC: Intel: kbl: Add MST route change to kbl machine drivers To support MST hdmi audio, modify the current routes to be based on port in kbl_da7219_max98357a, kbl_da7219_max98927 & kbl_rt5663_max98927. Signed-off-by: Vamshi Krishna Gopal Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210405124835.71247-2-vamshi.krishna.gopal@intel.com Signed-off-by: Mark Brown commit 1ca1156cfd69530e6b7cb99943baf90c8bd871a5 Author: Annaliese McDermond Date: Wed Mar 31 18:21:38 2021 +0000 ASoC: tlv320aic32x4: Register clocks before registering component Clock registration must be performed before the component is registered. aic32x4_component_probe attempts to get all the clocks right off the bat. If the component is registered before the clocks there is a race condition where the clocks may not be registered by the time aic32x4_componet_probe actually runs. Fixes: d1c859d314d8 ("ASoC: codec: tlv3204: Increased maximum supported channels") Cc: stable@vger.kernel.org Signed-off-by: Annaliese McDermond Link: https://lore.kernel.org/r/0101017889850206-dcac4cce-8cc8-4a21-80e9-4e4bef44b981-000000@us-west-2.amazonses.com Signed-off-by: Mark Brown commit 29654ed8384e9dbaf4cfba689dbcb664a6ab4bb7 Author: Annaliese McDermond Date: Wed Mar 31 18:21:45 2021 +0000 ASoC: tlv320aic32x4: Increase maximum register in regmap AIC32X4_REFPOWERUP was added as a register, but the maximum register value in the regmap and regmap range was not correspondingly increased. This caused an error when this register was attempted to be written. Fixes: ec96690de82c ("ASoC: tlv320aic32x4: Enable fast charge") Cc: stable@vger.kernel.org Signed-off-by: Annaliese McDermond Link: https://lore.kernel.org/r/0101017889851cab-ce60cfdb-d88c-43d8-bbd2-7fbf34a0c912-000000@us-west-2.amazonses.com Signed-off-by: Mark Brown commit e72457fce9c339193b8da34967ca09e901cb3ed9 Author: Hans de Goede Date: Sun Apr 4 16:38:31 2021 +0200 platform/x86: intel-hid: Fix spurious wakeups caused by tablet-mode events during suspend Some devices send (duplicate) tablet-mode events when moved around even though the mode has not changed; and they do this even when suspended. Change the tablet-mode event handling when priv->wakeup_mode is set to update the switch state in case it changed and then return immediately (without calling pm_wakeup_hard_event()) to avoid spurious wakeups. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212537 Fixes: 537b0dd4729e ("platform/x86: intel-hid: Add support for SW_TABLET_MODE") Signed-off-by: Hans de Goede Reviewed-by: Elia Devito Link: https://lore.kernel.org/r/20210404143831.25173-1-hdegoede@redhat.com commit 9c282c29a3aee7d439ea871bd21a3e58bc37175e Author: Guobin Huang Date: Tue Apr 6 20:09:48 2021 +0800 drbd: use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Link: https://lore.kernel.org/r/1617710988-49205-1-git-send-email-huangguobin4@huawei.com Signed-off-by: Jens Axboe commit b60b270b3db617811e593db5d5920ed98e67ce49 Author: Christoph Hellwig Date: Tue Apr 6 08:18:39 2021 +0200 swim3: support highmem swim3 only uses the virtual address of a bio to stash it into the data transfer using virt_to_bus. But the ppc32 virt_to_bus just uses the physical address with an offset. Replace virt_to_bus with a local hack that performs the equivalent transformation and stop asking for block layer bounce buffering. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406061839.811588-1-hch@lst.de Signed-off-by: Jens Axboe commit 3d86739c6343fb9c45ba7c4171ff35f526a49b5f Author: Christoph Hellwig Date: Tue Apr 6 08:17:55 2021 +0200 floppy: always use the track buffer Always use the track buffer that is already used for addresses outside the 16MB address capability of the floppy controller. This allows to remove a lot of code that relies on kernel virtual addresses. With this gone there is just a single place left that looks at the bio, which can be converted to memcpy_{from,to}_page, thus removing the need for the extra block-layer bounce buffering for highmem pages. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406061755.811522-1-hch@lst.de Signed-off-by: Jens Axboe commit 4c6e5bc8c05f7d9a8da6da8d1811a7577f3f404b Author: Christoph Hellwig Date: Tue Apr 6 08:17:25 2021 +0200 swim: don't call blk_queue_bounce_limit m68k doesn't support highmem, so don't bother enabling the block layer bounce buffer code. Just for safety throw in a depend on !HIGHMEM. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406061725.811389-1-hch@lst.de Signed-off-by: Jens Axboe commit 1d2c82001a5f528d474dc29a7b1f35ff367f86db Author: Christoph Hellwig Date: Tue Apr 6 08:16:48 2021 +0200 gdrom: support highmem The gdrom driver only has a single reference to the virtual address of the bio data, and uses that only to get the physical address. Switch to deriving the physical address from the page directly and thus avoid bounce buffering highmem data. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210406061648.811275-1-hch@lst.de Signed-off-by: Jens Axboe commit 393bb12e00580aaa23356504eed38d8f5571153a Author: Christoph Hellwig Date: Wed Mar 31 09:30:01 2021 +0200 block: stop calling blk_queue_bounce for passthrough requests Instead of overloading the passthrough fast path with the deprecated block layer bounce buffering let the users that combine an old undermaintained driver with a highmem system pay the price by always falling back to copies in that case. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210331073001.46776-9-hch@lst.de Signed-off-by: Jens Axboe commit 9bb33f24abbd0fa2fadad01ec75438d7cc239189 Author: Christoph Hellwig Date: Wed Mar 31 09:30:00 2021 +0200 block: refactor the bounce buffering code Get rid of all the PFN arithmetics and just use an enum for the two remaining options, and use PageHighMem for the actual bounce decision. Add a fast path to entirely avoid the call for the common case of a queue not using the legacy bouncing code. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210331073001.46776-8-hch@lst.de Signed-off-by: Jens Axboe commit ce288e0535688cc3475a3c3d4d96624514c3550c Author: Christoph Hellwig Date: Wed Mar 31 09:29:59 2021 +0200 block: remove BLK_BOUNCE_ISA support Remove the BLK_BOUNCE_ISA support now that all users are gone. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210331073001.46776-7-hch@lst.de Signed-off-by: Jens Axboe commit aaff5ebaa2694f283b7d07fdd55fb287ffc4f1e9 Author: Christoph Hellwig Date: Wed Mar 31 09:29:58 2021 +0200 scsi: remove the unchecked_isa_dma flag Remove the unchecked_isa_dma now that all users are gone. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210331073001.46776-6-hch@lst.de Signed-off-by: Jens Axboe commit 9b4c8eaa68d0ce85be4ae06cbbd158c53f66fe4f Author: Christoph Hellwig Date: Wed Mar 31 09:29:57 2021 +0200 advansys: remove ISA support This is the last piece in the kernel requiring the block layer ISA bounce buffering, and it does not actually look used. So remove it to see if anyone screams, in which case we'll need to find a solution to fix it back up. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210331073001.46776-5-hch@lst.de Signed-off-by: Jens Axboe commit a5f7a122dc04d7000ed60f6f7df76aa5be8bd7cf Author: Christoph Hellwig Date: Wed Mar 31 09:29:56 2021 +0200 BusLogic: reject broken old firmware that requires ISA-style bounce buffering Warn on and don't support adapters that have a DMA bug that forces ISA-style bounce buffering. Signed-off-by: Christoph Hellwig Acked-by: Khalid Aziz Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210331073001.46776-4-hch@lst.de Signed-off-by: Jens Axboe commit 8cad3b66bff4ee7c7d52b9a663cb6a2c5f66a7f7 Author: Christoph Hellwig Date: Wed Mar 31 09:29:55 2021 +0200 Buslogic: remove ISA support The ISA support in Buslogic has been broken for a long time, as all the I/O path expects a struct device for DMA mapping that is derived from the PCI device, which would simply crash for ISA adapters. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Acked-by: Khalid Aziz Link: https://lore.kernel.org/r/20210331073001.46776-3-hch@lst.de Signed-off-by: Jens Axboe commit 2f2fef022c3e7a29680cb5cb45c460d0ae786d05 Author: Christoph Hellwig Date: Wed Mar 31 09:29:54 2021 +0200 aha1542: use a local bounce buffer To remove the last user of the unchecked_isa_dma flag and thus the block layer ISA bounce buffering switch this driver to use its own local bounce buffer. This has the effect of not needing the chain indirection and supporting and unlimited number of segments. It does however limit the transfer size for each command to something that can be reasonable allocated by dma_alloc_coherent like 8K. Signed-off-by: Christoph Hellwig Acked-by: Martin K. Petersen Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210331073001.46776-2-hch@lst.de Signed-off-by: Jens Axboe commit b73ac6808b0f7994a05ebc38571e2e9eaf98a0f4 Author: Guobin Huang Date: Tue Apr 6 20:08:18 2021 +0800 NFSD: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: Chuck Lever commit 7d33004d24dafeedb95b85a271a37aa33678ac0b Author: Maciej W. Rozycki Date: Sun Mar 21 20:55:32 2021 +0100 pata_legacy: Add `probe_mask' parameter like with ide-generic Carry the `probe_mask' parameter over from ide-generic to pata_legacy so that there is a way to prevent random poking at ISA port I/O locations in attempt to discover adapter option cards with libata like with the old IDE driver. By default all enabled locations are tried, however it may interfere with a different kind of hardware responding there. For example with a plain (E)ISA system the driver tries all the six possible locations: scsi host0: pata_legacy ata1: PATA max PIO4 cmd 0x1f0 ctl 0x3f6 irq 14 ata1.00: ATA-4: ST310211A, 3.54, max UDMA/100 ata1.00: 19541088 sectors, multi 16: LBA ata1.00: configured for PIO scsi 0:0:0:0: Direct-Access ATA ST310211A 3.54 PQ: 0 ANSI: 5 scsi 0:0:0:0: Attached scsi generic sg0 type 0 sd 0:0:0:0: [sda] 19541088 512-byte logical blocks: (10.0 GB/9.32 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sda3 sd 0:0:0:0: [sda] Attached SCSI disk scsi host1: pata_legacy ata2: PATA max PIO4 cmd 0x170 ctl 0x376 irq 15 scsi host1: pata_legacy ata3: PATA max PIO4 cmd 0x1e8 ctl 0x3ee irq 11 scsi host1: pata_legacy ata4: PATA max PIO4 cmd 0x168 ctl 0x36e irq 10 scsi host1: pata_legacy ata5: PATA max PIO4 cmd 0x1e0 ctl 0x3e6 irq 8 scsi host1: pata_legacy ata6: PATA max PIO4 cmd 0x160 ctl 0x366 irq 12 however giving the kernel "pata_legacy.probe_mask=21" makes it try every other location only: scsi host0: pata_legacy ata1: PATA max PIO4 cmd 0x1f0 ctl 0x3f6 irq 14 ata1.00: ATA-4: ST310211A, 3.54, max UDMA/100 ata1.00: 19541088 sectors, multi 16: LBA ata1.00: configured for PIO scsi 0:0:0:0: Direct-Access ATA ST310211A 3.54 PQ: 0 ANSI: 5 scsi 0:0:0:0: Attached scsi generic sg0 type 0 sd 0:0:0:0: [sda] 19541088 512-byte logical blocks: (10.0 GB/9.32 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00 sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA sda: sda1 sda2 sda3 sd 0:0:0:0: [sda] Attached SCSI disk scsi host1: pata_legacy ata2: PATA max PIO4 cmd 0x1e8 ctl 0x3ee irq 11 scsi host1: pata_legacy ata3: PATA max PIO4 cmd 0x1e0 ctl 0x3e6 irq 8 Signed-off-by: Maciej W. Rozycki Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/alpine.DEB.2.21.2103211800110.21463@angie.orcam.me.uk Signed-off-by: Jens Axboe commit 6ddcec9547f64f01186e76e29d67e193b52ac30f Author: Maciej W. Rozycki Date: Sun Mar 21 20:55:27 2021 +0100 pata_platform: Document `pio_mask' module parameter Add MODULE_PARM_DESC documentation and a kernel-parameters.txt entry. Signed-off-by: Maciej W. Rozycki Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/alpine.DEB.2.21.2103212023190.21463@angie.orcam.me.uk Signed-off-by: Jens Axboe commit 426e2c6a2c383c9b1f9c74b7815252da89b3b8ab Author: Maciej W. Rozycki Date: Sun Mar 21 20:55:22 2021 +0100 pata_legacy: Properly document module parameters Most pata_legacy module parameters lack MODULE_PARM_DESC documentation and none is described in kernel-parameters.txt. Also several comments are inaccurate or wrong. Add the missing documentation pieces then and reorder parameters into a consistent block. Remove inaccuracies as follows: - `all' affects primary and secondary port ranges only rather than all, - `probe_all' affects tertiary and further port ranges rather than all, - `ht6560b' is for HT 6560B rather than HT 6560A. Signed-off-by: Maciej W. Rozycki Reviewed-by: Christoph Hellwig Link: https://lore.kernel.org/r/alpine.DEB.2.21.2103211909560.21463@angie.orcam.me.uk Signed-off-by: Jens Axboe commit fa4b42b2a968dc137f15e3104a3ec669875dd669 Author: Piyush Mehta Date: Fri Mar 5 14:40:29 2021 +0530 ata: ahci: ceva: Updated code by using dev_err_probe() Updated code with already prepared dev_err_probe(). It reduces code size and simplifies EPROBE_DEFER handling. Also, unify message format for similar error cases. Signed-off-by: Piyush Mehta Acked-by: Michal Simek Link: https://lore.kernel.org/r/20210305091029.23378-1-piyush.mehta@xilinx.com Signed-off-by: Jens Axboe commit dee9f6ade389b71b8ef679454f6f4d00cd3075f1 Author: Jiapeng Chong Date: Tue Apr 6 11:46:59 2021 +0800 sunrpc: Remove unused function ip_map_lookup Fix the following clang warnings: net/sunrpc/svcauth_unix.c:306:30: warning: unused function 'ip_map_lookup' [-Wunused-function]. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Chuck Lever commit 39aa56db50b9ca5cad597e561b4b160b6cbbb65b Author: Nikolay Borisov Date: Thu Mar 11 10:17:13 2021 +0200 blk-mq: Always use blk_mq_is_sbitmap_shared Signed-off-by: Nikolay Borisov Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Reviewed-by: Himanshu Madhani Link: https://lore.kernel.org/r/20210311081713.2763171-1-nborisov@suse.com Signed-off-by: Jens Axboe commit 28af742875d7d2d8ae008701c60cd4b238f3e2b2 Author: Max Gurtovoy Date: Mon Apr 5 13:20:12 2021 +0000 block: add sysfs entry for virt boundary mask This entry will expose the bio vector alignment mask for a specific block device. Signed-off-by: Max Gurtovoy Reviewed-by: Ming Lei Reviewed-by: Martin K. Petersen Link: https://lore.kernel.org/r/20210405132012.12504-1-mgurtovoy@nvidia.com Signed-off-by: Jens Axboe commit a425711c6c9c85769915acebc216008053bf5db8 Author: Lee Jones Date: Fri Mar 12 10:55:30 2021 +0000 block: drbd: drbd_nl: Demote half-complete kernel-doc headers Fixes the following W=1 kernel build warning(s): from drivers/block/drbd/drbd_nl.c:24: drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_attach’: drivers/block/drbd/drbd_nl.c:1968:10: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion] drivers/block/drbd/drbd_nl.c:930: warning: Function parameter or member 'flags' not described in 'drbd_determine_dev_size' drivers/block/drbd/drbd_nl.c:930: warning: Function parameter or member 'rs' not described in 'drbd_determine_dev_size' drivers/block/drbd/drbd_nl.c:1148: warning: Function parameter or member 'dc' not described in 'drbd_check_al_size' Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-12-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 5fdbd5bc49b730eb08b3abe72655e9184d968b3e Author: Lee Jones Date: Fri Mar 12 10:55:29 2021 +0000 block: xen-blkfront: Demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/block/xen-blkfront.c:1960: warning: Function parameter or member 'dev' not described in 'blkfront_probe' drivers/block/xen-blkfront.c:1960: warning: Function parameter or member 'id' not described in 'blkfront_probe' drivers/block/xen-blkfront.c:1960: warning: expecting prototype for Allocate the basic(). Prototype was for blkfront_probe() instead drivers/block/xen-blkfront.c:2085: warning: Function parameter or member 'dev' not described in 'blkfront_resume' drivers/block/xen-blkfront.c:2085: warning: expecting prototype for or a backend(). Prototype was for blkfront_resume() instead drivers/block/xen-blkfront.c:2444: warning: wrong kernel-doc identifier on line: Cc: Konrad Rzeszutek Wilk Cc: "Roger Pau Monné" Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Jens Axboe Cc: xen-devel@lists.xenproject.org Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Acked-by: Roger Pau Monné Link: https://lore.kernel.org/r/20210312105530.2219008-11-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 6ec2a0f2bc07d42a40f6a23e0d0399e93667677d Author: Lee Jones Date: Fri Mar 12 10:55:28 2021 +0000 block: drbd: drbd_receiver: Demote less than half complete kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/block/drbd/drbd_receiver.c:1641: warning: Function parameter or member 'op' not described in 'drbd_submit_peer_request' drivers/block/drbd/drbd_receiver.c:1641: warning: Function parameter or member 'op_flags' not described in 'drbd_submit_peer_request' drivers/block/drbd/drbd_receiver.c:1641: warning: Function parameter or member 'fault_type' not described in 'drbd_submit_peer_request' Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-10-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 584164c8050c18a29eeb1287c47bcbbef12780a3 Author: Lee Jones Date: Fri Mar 12 10:55:27 2021 +0000 block: drbd: drbd_main: Fix a bunch of function documentation discrepancies Fixes the following W=1 kernel build warning(s): drivers/block/drbd/drbd_main.c:278: warning: Function parameter or member 'connection' not described in 'tl_clear' drivers/block/drbd/drbd_main.c:278: warning: Excess function parameter 'device' description in 'tl_clear' drivers/block/drbd/drbd_main.c:489: warning: Function parameter or member 'cpu_mask' not described in 'drbd_calc_cpu_mask' drivers/block/drbd/drbd_main.c:528: warning: Excess function parameter 'device' description in 'drbd_thread_current_set_cpu' drivers/block/drbd/drbd_main.c:549: warning: Function parameter or member 'connection' not described in 'drbd_header_size' drivers/block/drbd/drbd_main.c:1204: warning: Function parameter or member 'device' not described in 'send_bitmap_rle_or_plain' drivers/block/drbd/drbd_main.c:1204: warning: Function parameter or member 'c' not described in 'send_bitmap_rle_or_plain' drivers/block/drbd/drbd_main.c:1335: warning: Function parameter or member 'peer_device' not described in '_drbd_send_ack' drivers/block/drbd/drbd_main.c:1335: warning: Excess function parameter 'device' description in '_drbd_send_ack' drivers/block/drbd/drbd_main.c:1379: warning: Function parameter or member 'peer_device' not described in 'drbd_send_ack' drivers/block/drbd/drbd_main.c:1379: warning: Excess function parameter 'device' description in 'drbd_send_ack' drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'connection' not described in 'drbd_send_all' drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'sock' not described in 'drbd_send_all' drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'buffer' not described in 'drbd_send_all' drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'size' not described in 'drbd_send_all' drivers/block/drbd/drbd_main.c:1892: warning: Function parameter or member 'msg_flags' not described in 'drbd_send_all' drivers/block/drbd/drbd_main.c:3525: warning: Function parameter or member 'flags' not described in 'drbd_queue_bitmap_io' drivers/block/drbd/drbd_main.c:3563: warning: Function parameter or member 'flags' not described in 'drbd_bitmap_io' Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-9-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 1f1e87b4dc4598eac57a69868534b92d65e47e82 Author: Lee Jones Date: Fri Mar 12 10:55:26 2021 +0000 block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit Fixes the following W=1 kernel build warning(s): from drivers/block/drbd/drbd_nl.c:24: drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_set_role’: drivers/block/drbd/drbd_nl.c:793:11: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion] drivers/block/drbd/drbd_nl.c:795:11: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion] drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_attach’: drivers/block/drbd/drbd_nl.c:1965:10: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion] drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_connect’: drivers/block/drbd/drbd_nl.c:2690:10: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion] drivers/block/drbd/drbd_nl.c: In function ‘drbd_adm_disconnect’: drivers/block/drbd/drbd_nl.c:2803:11: warning: implicit conversion from ‘enum drbd_state_rv’ to ‘enum drbd_ret_code’ [-Wenum-conversion] Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-8-lee.jones@linaro.org Signed-off-by: Jens Axboe commit f58a0d184eeb4a4140e574aa57f0ece46d7001ad Author: Lee Jones Date: Fri Mar 12 10:55:25 2021 +0000 block: drbd: drbd_main: Remove duplicate field initialisation [P_RETRY_WRITE] is initialised more than once. Fixes the following W=1 kernel build warning(s): drivers/block/drbd/drbd_main.c: In function ‘cmdname’: drivers/block/drbd/drbd_main.c:3660:22: warning: initialized field overwritten [-Woverride-init] drivers/block/drbd/drbd_main.c:3660:22: note: (near initialization for ‘cmdnames[44]’) Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-7-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 9b48ff078754627a5e3e212b8c3c0e49a4b95f12 Author: Lee Jones Date: Fri Mar 12 10:55:24 2021 +0000 block: drbd: drbd_receiver: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/block/drbd/drbd_receiver.c:265: warning: Function parameter or member 'peer_device' not described in 'drbd_alloc_pages' drivers/block/drbd/drbd_receiver.c:265: warning: Excess function parameter 'device' description in 'drbd_alloc_pages' drivers/block/drbd/drbd_receiver.c:1362: warning: Function parameter or member 'connection' not described in 'drbd_may_finish_epoch' drivers/block/drbd/drbd_receiver.c:1362: warning: Excess function parameter 'device' description in 'drbd_may_finish_epoch' drivers/block/drbd/drbd_receiver.c:1451: warning: Function parameter or member 'resource' not described in 'drbd_bump_write_ordering' drivers/block/drbd/drbd_receiver.c:1451: warning: Function parameter or member 'bdev' not described in 'drbd_bump_write_ordering' drivers/block/drbd/drbd_receiver.c:1451: warning: Excess function parameter 'connection' description in 'drbd_bump_write_ordering' drivers/block/drbd/drbd_receiver.c:1643: warning: Function parameter or member 'op' not described in 'drbd_submit_peer_request' drivers/block/drbd/drbd_receiver.c:1643: warning: Function parameter or member 'op_flags' not described in 'drbd_submit_peer_request' drivers/block/drbd/drbd_receiver.c:1643: warning: Function parameter or member 'fault_type' not described in 'drbd_submit_peer_request' drivers/block/drbd/drbd_receiver.c:1643: warning: Excess function parameter 'rw' description in 'drbd_submit_peer_request' drivers/block/drbd/drbd_receiver.c:3055: warning: Function parameter or member 'peer_device' not described in 'drbd_asb_recover_0p' drivers/block/drbd/drbd_receiver.c:3138: warning: Function parameter or member 'peer_device' not described in 'drbd_asb_recover_1p' drivers/block/drbd/drbd_receiver.c:3195: warning: Function parameter or member 'peer_device' not described in 'drbd_asb_recover_2p' drivers/block/drbd/drbd_receiver.c:4684: warning: Function parameter or member 'peer_device' not described in 'receive_bitmap_plain' drivers/block/drbd/drbd_receiver.c:4684: warning: Function parameter or member 'size' not described in 'receive_bitmap_plain' drivers/block/drbd/drbd_receiver.c:4684: warning: Function parameter or member 'p' not described in 'receive_bitmap_plain' drivers/block/drbd/drbd_receiver.c:4684: warning: Function parameter or member 'c' not described in 'receive_bitmap_plain' drivers/block/drbd/drbd_receiver.c:4738: warning: Function parameter or member 'peer_device' not described in 'recv_bm_rle_bits' drivers/block/drbd/drbd_receiver.c:4738: warning: Function parameter or member 'p' not described in 'recv_bm_rle_bits' drivers/block/drbd/drbd_receiver.c:4738: warning: Function parameter or member 'c' not described in 'recv_bm_rle_bits' drivers/block/drbd/drbd_receiver.c:4738: warning: Function parameter or member 'len' not described in 'recv_bm_rle_bits' drivers/block/drbd/drbd_receiver.c:4807: warning: Function parameter or member 'peer_device' not described in 'decode_bitmap_c' drivers/block/drbd/drbd_receiver.c:4807: warning: Function parameter or member 'p' not described in 'decode_bitmap_c' drivers/block/drbd/drbd_receiver.c:4807: warning: Function parameter or member 'c' not described in 'decode_bitmap_c' drivers/block/drbd/drbd_receiver.c:4807: warning: Function parameter or member 'len' not described in 'decode_bitmap_c' Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-6-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 49ece311fdb922c5250edd0ab3d8c8992192a0f1 Author: Lee Jones Date: Fri Mar 12 10:55:23 2021 +0000 block: drbd: drbd_state: Fix some function documentation issues Fixes the following W=1 kernel build warning(s): drivers/block/drbd/drbd_state.c:913: warning: Function parameter or member 'connection' not described in 'is_valid_soft_transition' drivers/block/drbd/drbd_state.c:913: warning: Excess function parameter 'device' description in 'is_valid_soft_transition' drivers/block/drbd/drbd_state.c:1054: warning: Function parameter or member 'warn' not described in 'sanitize_state' drivers/block/drbd/drbd_state.c:1054: warning: Excess function parameter 'warn_sync_abort' description in 'sanitize_state' drivers/block/drbd/drbd_state.c:1703: warning: Function parameter or member 'state_change' not described in 'after_state_ch' Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-5-lee.jones@linaro.org Signed-off-by: Jens Axboe commit d0e0cb970eaeecc1b7020eb5cd747e8e2e742386 Author: Lee Jones Date: Fri Mar 12 10:55:22 2021 +0000 block: mtip32xx: mtip32xx: Mark debugging variable 'start' as __maybe_unused Fixes the following W=1 kernel build warning(s): drivers/block/mtip32xx/mtip32xx.c: In function ‘mtip_standby_immediate’: drivers/block/mtip32xx/mtip32xx.c:1216:16: warning: variable ‘start’ set but not used [-Wunused-but-set-variable] Cc: Jens Axboe Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-4-lee.jones@linaro.org Signed-off-by: Jens Axboe commit b8b8710354c4d6793bde8dabe8502802a0061158 Author: Lee Jones Date: Fri Mar 12 10:55:21 2021 +0000 block: drbd: drbd_interval: Demote some kernel-doc abuses and fix another header Fixes the following W=1 kernel build warning(s): drivers/block/drbd/drbd_interval.c:11: warning: Function parameter or member 'node' not described in 'interval_end' drivers/block/drbd/drbd_interval.c:26: warning: Function parameter or member 'root' not described in 'drbd_insert_interval' drivers/block/drbd/drbd_interval.c:26: warning: Function parameter or member 'this' not described in 'drbd_insert_interval' drivers/block/drbd/drbd_interval.c:70: warning: Function parameter or member 'root' not described in 'drbd_contains_interval' drivers/block/drbd/drbd_interval.c:96: warning: Function parameter or member 'root' not described in 'drbd_remove_interval' drivers/block/drbd/drbd_interval.c:96: warning: Function parameter or member 'this' not described in 'drbd_remove_interval' drivers/block/drbd/drbd_interval.c:113: warning: Function parameter or member 'root' not described in 'drbd_find_overlap' Cc: Philipp Reisner Cc: Lars Ellenberg Cc: Jens Axboe Cc: drbd-dev@lists.linbit.com Cc: linux-block@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210312105530.2219008-3-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 762d6bd27d57491bedbbf0464a27a43f387de788 Merge: 80755855f808c 8609c63fce58e Author: Jens Axboe Date: Tue Apr 6 09:17:22 2021 -0600 Merge tag 'nvme-5.13-2021-04-06' of git://git.infradead.org/nvme into for-5.13/drivers Pull NVMe updates from Christoph: "nvme updates for Linux 5.13 - fix handling of very large MDTS values (Bart Van Assche) - retrigger ANA log update if group descriptor isn't found (Hannes Reinecke) - fix locking contexts in nvme-tcp and nvmet-tcp (Sagi Grimberg) - return proper error code from discovery ctrl (Hou Pu) - verify the SGLS field in nvmet-tcp and nvmet-fc (Max Gurtovoy) - disallow passthru cmd from targeting a nsid != nsid of the block dev (Niklas Cassel) - do not allow model_number exceed 40 bytes in nvmet (Noam Gottlieb) - enable optional queue idle period tracking in nvmet-tcp (Mark Wunderlich) - various cleanups and optimizations (Chaitanya Kulkarni, Kanchan Joshi) - expose fast_io_fail_tmo in sysfs (Daniel Wagner) - implement non-MDTS command limits (Keith Busch) - reduce warnings for unhandled command effects (Keith Busch) - allocate storage for the SQE as part of the nvme_request (Keith Busch)" * tag 'nvme-5.13-2021-04-06' of git://git.infradead.org/nvme: (33 commits) nvme: fix handling of large MDTS values nvme: implement non-mdts command limits nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev nvme: retrigger ANA log update if group descriptor isn't found nvme: export fast_io_fail_tmo to sysfs nvme: remove superfluous else in nvme_ctrl_loss_tmo_store nvme: use sysfs_emit instead of sprintf nvme-fc: check sgl supported by target nvme-tcp: check sgl supported by target nvmet-tcp: enable optional queue idle period tracking nvmet-tcp: fix incorrect locking in state_change sk callback nvme-tcp: block BH in sk state_change sk callback nvmet: return proper error code from discovery ctrl nvme: warn of unhandled effects only once nvme: use driver pdu command for passthrough nvme-pci: allocate nvme_command within driver pdu nvmet: do not allow model_number exceed 40 bytes nvmet: remove unnecessary ctrl parameter nvmet-fc: update function documentation nvme-fc: fix the function documentation comment ... commit 7443ff06da45aa68d63dd8c9c173470ba971c56a Author: Dmitry Baryshkov Date: Thu Mar 18 23:14:05 2021 +0300 arm64: dts: sdm845-db845c: make firmware filenames follow linux-firmware Cange aDSP and cDSP firmware filenames to follow filenames merged into linux-firmware tree. Switch from split .mdt files to merged .mbn files. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210318201405.2244723-1-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit c35b8d5e757e0fd0144890b7b536f7b756f3a648 Author: Sahitya Tummala Date: Tue Apr 6 14:39:16 2021 +0530 f2fs: fix the periodic wakeups of discard thread Fix the unnecessary periodic wakeups of discard thread that happens under below two conditions - 1. When f2fs is heavily utilized over 80%, the current discard policy sets the max sleep timeout of discard thread as 50ms (DEF_MIN_DISCARD_ISSUE_TIME). But this is set even when there are no pending discard commands to be issued. 2. In the issue_discard_thread() path when there are no pending discard commands, it fails to reset the wait_ms to max timeout value. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 25ae837e61dee712b4b1df36602ebfe724b2a0b6 Author: Chao Yu Date: Fri Apr 2 17:22:23 2021 +0800 f2fs: fix to avoid accessing invalid fio in f2fs_allocate_data_block() Callers may pass fio parameter with NULL value to f2fs_allocate_data_block(), so we should make sure accessing fio's field after fio's validation check. Fixes: f608c38c59c6 ("f2fs: clean up parameter of f2fs_allocate_data_block()") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit a303b0ac920d807cb7da4f1cd85759fbe44fa654 Author: Chao Yu Date: Thu Apr 1 11:01:53 2021 +0800 f2fs: fix to avoid GC/mmap race with f2fs_truncate() It missed to hold i_gc_rwsem and i_map_sem around f2fs_truncate() in f2fs_file_write_iter() to avoid racing with background GC and mmap, fix it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4cd15d84ca3e9be4db121b067c9739268c5e9b91 Author: Geert Uytterhoeven Date: Tue Apr 6 11:32:26 2021 +0200 media: VIDEO_IMX8_JPEG should depend on ARCH_MXC and not default to m The i.MX8 QXP/QM integrated JPEG encoder/decoder is only present on Freescale/NXP i.MX8 QXP and QM SoCs. Hence add a dependency on ARCH_MXC, to prevent asking the user about this driver when configuring a kernel without i.MX8 support. Drop the "default m" (which means "default y" if CONFIG_MODULES is not enabled), as merely enabling CONFIG_COMPILE_TEST should not enable additional code. Fixes: 2db16c6ed72ce644 ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Signed-off-by: Geert Uytterhoeven Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 34ad0137e3e7411faec75a87e7cc413f61104fc1 Author: Wan Jiabing Date: Tue Apr 6 10:57:37 2021 +0200 media: em28xx/em28xx.h: Remove duplicate struct declaration struct em28xx is declared at 219th line. The declaration here is unnecessary. Remove it. Signed-off-by: Wan Jiabing Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dea377984f73a9f51d3e9c898ea15aa3acde282d Author: Wan Jiabing Date: Tue Apr 6 10:56:52 2021 +0200 media: cx231xx/cx231xx.h: Remove repeated struct declaration struct cx231xx is declared at 146th line. The declaration here is unnecessary. Remove it. Signed-off-by: Wan Jiabing Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6c0ed6d4b3211f135905e6f75475788b864234bd Author: Yang Yingliang Date: Fri Apr 2 11:32:55 2021 +0200 media: camss: csid: Remove redundant dev_err call in msm_csid_subdev_init() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6fe1152a1f6cd5fadb54b9823d46787bc2a34952 Author: Yang Yingliang Date: Thu Apr 1 12:35:00 2021 +0200 media: camss: csiphy: Remove redundant dev_err call in msm_csiphy_subdev_init() There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Robert Foss Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f274245b5777c7ade7015cd27250f053030bcc6e Author: Yang Yingliang Date: Thu Apr 1 12:30:15 2021 +0200 media: ti-vpe: sc: remove redundant dev_err call in sc_create() There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dd5467909a2e400198b6e821a2a08045d721cb8b Author: Yang Yingliang Date: Thu Apr 1 12:28:50 2021 +0200 media: ti-vpe: csc: remove redundant dev_err call in csc_create() There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d21ffd937a3fb91d87fbec62bb8d0422c536536a Author: Yang Yingliang Date: Thu Apr 1 12:26:07 2021 +0200 media: imx-pxp: remove redundant dev_err call in pxp_probe() There is an error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 92eda6b7dad6372cd35f13560cad980cf2f6485a Author: Hans Verkuil Date: Wed Mar 31 10:32:12 2021 +0200 media: cec/core: clarify rx-arb-lost usage message The rx-arb-lost error injection command only works with set to 'any'. Explicitly say so in the usage message. Also use [] to indicate that the argument is optional. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f65dd20d02ee372547863a4fee34f5fbe480511 Author: Fabio Estevam Date: Mon Mar 29 14:21:43 2021 +0200 media: imx-pxp: Remove unneeded of_match_ptr() i.MX is a DT-only platform, so of_match_ptr() can be safely removed. Remove the unneeded of_match_ptr(). Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e999db587312e5b798421d803495f41d1283d7d7 Author: Christophe JAILLET Date: Sun Mar 28 20:31:01 2021 +0200 media: tw68: 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 'tw68_risc_buffer()' (tw68-risc.c) GFP_KERNEL can be used because this function is only called from a vb2_ops buf_prepare function. The call chain is: tw68_video_qops.buf_prepare (tw68-video.c) --> tw68_buf_prepare (tw68-video.c) --> tw68_risc_buffer @@ @@ - 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c1dbcf62e1fd6a49c773dc25a715b2e02e27df80 Author: Christophe JAILLET Date: Sun Mar 28 19:02:18 2021 +0200 media: tw686x: 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 'tw686x_audio_dma_alloc()' (tw686x-audio.c) GFP_KERNEL can be used because it is only called from a probe function and no spinlock is taken in the between. The call chain is: tw686x_probe (tw686x-core.c) --> tw686x_audio_init (tw686x-audio.c) --> tw686x_audio_dma_alloc (tw686x-audio.c) When memory is allocated in 'tw686x_memcpy_dma_alloc()' and in 'tw686x_sg_dma_alloc()' (tw686x-video.c) GFP_KERNEL can be used because these functions are .alloc functions from a tw686x_dma_ops structure. @@ @@ - 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7a77379fe1d36b83009a9aee68031e22792c4091 Author: Christophe JAILLET Date: Sun Mar 28 10:08:19 2021 +0200 media: cx23885: 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 'cx23885_risc_buffer()' GFP_KERNEL can be used because this function is only called from a vb2_ops buf_prepare function. The call chain is: cx23885_video_qops.buf_prepare (cx23885-video.c) --> buffer_prepare (cx23885-video.c) --> cx23885_risc_buffer When memory is allocated in 'cx23885_risc_databuffer()' GFP_KERNEL can be used because this function is only called from a function that already uses GFP_KERNEL or from a vb2_ops buf_prepare function. The call chains are: snd_cx23885_hw_params (cx23885-alsa.c) --> use GFP_KERNEL --> cx23885_risc_databuffer cx23885_qops.buffer_prepare (cx23885-417.c) or dvb_qops.buffer_prepare (cx23885-dvb.c) --> cx23885_buf_prepare --> cx23885_risc_databuffer When memory is allocated in 'cx23885_risc_vbibuffer()' GFP_KERNEL can be used because this function is only called from a vb2_ops buf_prepare function. The call chains are: cx23885_vbi_qops.buffer_prepare (cx23885-vbi.c) --> cx23885_risc_vbibuffer @@ @@ - 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 985c73693fe5a0750d90d2a5d2d15a3019e37047 Author: Irui Wang Date: Thu Mar 25 13:26:25 2021 +0100 media: mtk-vcodec: Separating mtk encoder driver MTK H264 Encoder(VENC_SYS) and VP8 Encoder(VENC_LT_SYS) are two independent hardware instance. They have their owner interrupt, register mapping, and special clocks. This patch separates them into two devices. This is a preparing patch for adding device_link between the larbs and venc-device. It's mainly for fixing the problem: https://lkml.org/lkml/2019/9/3/316 Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dd0008beef0dda915a255691e8b3b0527efaf1d8 Author: Irui Wang Date: Thu Mar 25 13:26:23 2021 +0100 media: dt-bindings: media: mtk-vcodec: Separating mtk vcodec encoder node Updates binding document since the avc and vp8 hardware encoder in MT8173 are now separated. Separate "mediatek,mt8173-vcodec-enc" to "mediatek,mt8173-vcodec-enc-vp8" and "mediatek,mt8173-vcodec-enc". This patch is not a compatible change, but we must do this modifaction because MediaTek IOMMU add the device_link between the smi-larb device and venc_device, if the venc device call the pm_runtime_get_sync, the smi-larb's pm_runtime_get_sync also be called automatically. There is a bit of backward compatibility for avc encoder, the avc encoder device node still has compatible "mediatek,mt8173-vcodec-enc". Acked-by: Tiffany Lin Signed-off-by: Hsin-Yi Wang Signed-off-by: Maoguang Meng Signed-off-by: Irui Wang Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be7e8af98f3af729aa9f08b1053f9533a5cceb91 Author: Hans Verkuil Date: Sat Mar 27 12:27:40 2021 +0100 media: v4l2-ctrls.c: fix race condition in hdl->requests list When a request is re-inited it will release all control handler objects that are still in the request. It does that by unbinding and putting all those objects. When the object is unbound the obj->req pointer is set to NULL, and the object's unbind op is called. When the object it put the object's release op is called to free the memory. For a request object that contains a control handler that means that v4l2_ctrl_handler_free() is called in the release op. A control handler used in a request has a pointer to the main control handler that is created by the driver and contains the current state of all controls. If the device is unbound (due to rmmod or a forced unbind), then that main handler is freed, again by calling v4l2_ctrl_handler_free(), and any outstanding request objects that refer to that main handler have to be unbound and put as well. It does that by this test: if (!hdl->req_obj.req && !list_empty(&hdl->requests)) { I.e. the handler has no pointer to a request, so is the main handler, and one or more request objects refer to this main handler. However, this test is wrong since hdl->req_obj.req is actually NULL when re-initing a request (the object unbind will set req to NULL), and the only reason this seemingly worked is that the requests list is typically empty since the request's unbind op will remove the handler from the requests list. But if another thread is at the same time adding a new control to a request, then there is a race condition where one thread is removing a control handler object from the requests list and another thread is adding one. The result is that hdl->requests is no longer empty and the code thinks that a main handler is being freed instead of a control handler that is part of a request. There are two bugs here: first the test for hdl->req_obj.req: this should be hdl->req_obj.ops since only the main control handler will have a NULL pointer there. The second is that adding or deleting request objects from the requests list of the main handler isn't protected by taking the main handler's lock. Signed-off-by: Hans Verkuil Reported-by: John Cox Fixes: 6fa6f831f095 ("media: v4l2-ctrls: add core request support") Tested-by: John Cox Reported-by: John Cox Signed-off-by: Mauro Carvalho Chehab commit bb65e3d97e2f429f3cbedb13adf4edc7cc9cf91d Author: Hans Verkuil Date: Tue Aug 18 16:37:09 2020 +0200 media: vivid: add read-only int32 control This read-only int32 control is used to test read-only controls in combination with requests. It is set by the driver to the buffer sequence counter module 256. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 83af5738dc13b407d653d6b6fa725d459fa2ab46 Author: Stanimir Varbanov Date: Fri Apr 2 12:06:48 2021 +0200 media: venus: vdec: Fix decoder cmd STOP issue Fixes an issue when issuing a stop command to the controller, negating the following firmware error. "SFR message from FW: Exception: TID = Unknown IP = 0x3b7dc FA = 0x0 cause = 0x6" Signed-off-by: Stanimir Varbanov Signed-off-by: Bryan O'Donoghue Signed-off-by: Mauro Carvalho Chehab commit 1ad175952bbcafabd75b399e7fb656ac8ca5d7a5 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:47 2021 +0200 media: venus: helper: Decide work mode Decide work mode for encoder and decoder based on different use-cases. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit df67e358447564f204e7966eec35765e0a68d3fa Author: Dikshita Agarwal Date: Fri Apr 2 12:06:46 2021 +0200 media: venus: hfi: Increase plat_buf_v6 o/p buffer count. Presently, minimum buffer count for output buffers for h264 & hevc codec is kept as 8 which might not be sufficient for few use cases so increasing the value to 18. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit bc28936bbba9995b843d17de12f98f861e52cd58 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:45 2021 +0200 media: venus: helpers, hfi, vdec: Set actual plane constraints to FW Set actual plane alignments to FW with HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO to calculate correct buffer size. bod: Fixed fall-through error in pkt_session_set_property_6xx() switch Ensure setting format constraints on 6xx only Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit c934d9d4ca28d8f37f210e26dc88f3d34698114e Author: Dikshita Agarwal Date: Fri Apr 2 12:06:44 2021 +0200 media: venus: helpers: Add internal buffer list for v6 - Internal buffers required by v6 are different than v4, add new list of internal buffers for v6. - Differentiate encoder/decoder buffers for 6xx Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit ec7ad11740b3b5798c0bd11169170d9572c2e1a2 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:43 2021 +0200 media: venus: firmware: Do not toggle WRAPPER_A9SS_SW_RESET on 6xx Do not toggle the WRAPPER_A9SS_SW_RESET on 6xx. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 64afe82740b3644d491c60d50b23e56310fe4be5 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:42 2021 +0200 media: venus: pm: Toggle 6xx wrapper power in vcodec_control When in vcodec_control_v4() on the 4xx path we select between one of two vcodec cores to toggle power control bits. In 6xx there is only one core which offsets the relevant control registers to a slightly different address. This patch accounts for the address offset for 6xx silicon. Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 4b0b6e147dc98a5985a9060b612041023896ec2b Author: Dikshita Agarwal Date: Fri Apr 2 12:06:41 2021 +0200 media: venus: hfi: Add 6xx AXI halt logic This patch takes the downstream AXI halt routine and applies it when IS_V6() is true. bod: Converted to readl_poll_timeout() Removed poll timeout for LPI register, testing showed the value would always timeout and work, so the polling did nothing of value. Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit c22b1a29497c3919b86dc2c87292d24b5965e4a5 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:40 2021 +0200 media: venus: core,pm: Vote for min clk freq during venus boot Vote for min clk frequency for core clks during prepare and enable clocks at boot sequence. Without this the controller clock runs at very low value (9.6MHz) which is not sufficient to boot venus. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit dc0e058eef42f61effe9fd4f0fa4b0c793cc1f14 Author: Eric Auger Date: Mon Apr 5 18:39:41 2021 +0200 KVM: selftests: aarch64/vgic-v3 init sequence tests The tests exercise the VGIC_V3 device creation including the associated KVM_DEV_ARM_VGIC_GRP_ADDR group attributes: - KVM_VGIC_V3_ADDR_TYPE_DIST/REDIST - KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION Some other tests dedicate to KVM_DEV_ARM_VGIC_GRP_REDIST_REGS group and especially the GICR_TYPER read. The goal was to test the case recently fixed by commit 23bde34771f1 ("KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace"). The API under test can be found at Documentation/virt/kvm/devices/arm-vgic-v3.rst Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-10-eric.auger@redhat.com commit f24afa95bb2e401e9267c722ec109808a0537e60 Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:39 2021 +0200 media: venus: pm: Hook 6xx pm ops into 4xx pm ops At this time there is no need to differentiate between the two, we can reuse the 4xx pm ops callback structure for 6xx. Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 7ed9e0b3393c8720e8a48e98bc88e30112ccb1bc Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:38 2021 +0200 media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations In various places in the venus codebase we have if (IS_V4()) which takes the code down paths for 4xx silicon. This logic is broadly applicable to 6xx silicon also. In this patch we add IS_V6() to various IS_V4() decision locations. Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 28e9d4bce3be9b8fec6c854f87923db99c8fb874 Author: Eric Auger Date: Mon Apr 5 18:39:40 2021 +0200 KVM: arm64: vgic-v3: Expose GICR_TYPER.Last for userspace Commit 23bde34771f1 ("KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace") temporarily fixed a bug identified when attempting to access the GICR_TYPER register before the redistributor region setting, but dropped the support of the LAST bit. Emulating the GICR_TYPER.Last bit still makes sense for architecture compliance though. This patch restores its support (if the redistributor region was set) while keeping the code safe. We introduce a new helper, vgic_mmio_vcpu_rdist_is_last() which computes whether a redistributor is the highest one of a series of redistributor contributor pages. With this new implementation we do not need to have a uaccess read accessor anymore. Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-9-eric.auger@redhat.com commit e5a35635464bc5304674b84ea42615a3fd0bd949 Author: Eric Auger Date: Mon Apr 5 18:39:39 2021 +0200 kvm: arm64: vgic-v3: Introduce vgic_v3_free_redist_region() To improve the readability, we introduce the new vgic_v3_free_redist_region helper and also rename vgic_v3_insert_redist_region into vgic_v3_alloc_redist_region Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-8-eric.auger@redhat.com commit da3853097679022e14a2d125983f11a67fd2f96a Author: Eric Auger Date: Mon Apr 5 18:39:38 2021 +0200 KVM: arm64: Simplify argument passing to vgic_uaccess_[read|write] vgic_uaccess() takes a struct vgic_io_device argument, converts it to a struct kvm_io_device and passes it to the read/write accessor functions, which convert it back to a struct vgic_io_device. Avoid the indirection by passing the struct vgic_io_device argument directly to vgic_uaccess_{read,write}. Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-7-eric.auger@redhat.com commit 298c41b8fa1e02c5a35e2263d138583220ab6094 Author: Eric Auger Date: Mon Apr 5 18:39:37 2021 +0200 docs: kvm: devices/arm-vgic-v3: enhance KVM_DEV_ARM_VGIC_CTRL_INIT doc kvm_arch_vcpu_precreate() returns -EBUSY if the vgic is already initialized. So let's document that KVM_DEV_ARM_VGIC_CTRL_INIT must be called after all vcpu creations. Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-6-eric.auger@redhat.com commit 3a5211612764fa3948e5db5254734168e9e763de Author: Eric Auger Date: Mon Apr 5 18:39:36 2021 +0200 KVM: arm/arm64: vgic: Reset base address on kvm_vgic_dist_destroy() On vgic_dist_destroy(), the addresses are not reset. However for kvm selftest purpose this would allow to continue the test execution even after a failure when running KVM_RUN. So let's reset the base addresses. Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-5-eric.auger@redhat.com commit 8542a8f95a67ff6b76d6868ec0af58c464bdf041 Author: Eric Auger Date: Mon Apr 5 18:39:35 2021 +0200 KVM: arm64: vgic-v3: Fix error handling in vgic_v3_set_redist_base() vgic_v3_insert_redist_region() may succeed while vgic_register_all_redist_iodevs fails. For example this happens while adding a redistributor region overlapping a dist region. The failure only is detected on vgic_register_all_redist_iodevs when vgic_v3_check_base() gets called in vgic_register_redist_iodev(). In such a case, remove the newly added redistributor region and free it. Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-4-eric.auger@redhat.com commit 53b16dd6ba5cf64ed147ac3523ec34651d553cb0 Author: Eric Auger Date: Mon Apr 5 18:39:34 2021 +0200 KVM: arm64: Fix KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION read The doc says: "The characteristics of a specific redistributor region can be read by presetting the index field in the attr data. Only valid for KVM_DEV_TYPE_ARM_VGIC_V3" Unfortunately the existing code fails to read the input attr data. Fixes: 04c110932225 ("KVM: arm/arm64: Implement KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION") Cc: stable@vger.kernel.org#v4.17+ Signed-off-by: Eric Auger Reviewed-by: Alexandru Elisei Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-3-eric.auger@redhat.com commit d9b201e99c616001b4a51627820377b293479384 Author: Eric Auger Date: Mon Apr 5 18:39:33 2021 +0200 KVM: arm64: vgic-v3: Fix some error codes when setting RDIST base KVM_DEV_ARM_VGIC_GRP_ADDR group doc says we should return -EEXIST in case the base address of the redist is already set. We currently return -EINVAL. However we need to return -EINVAL in case a legacy REDIST address is attempted to be set while REDIST_REGIONS were set. This case is discriminated by looking at the count field. Signed-off-by: Eric Auger Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210405163941.510258-2-eric.auger@redhat.com commit e396e75fc2545f4136c464e97fcbbc9809fef279 Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:37 2021 +0200 media: venus: hfi: Read WRAPPER_TZ_CPU_STATUS_V6 on 6xx On 6xx we should read wrapper cpu status from the wrapper TZ register set. Co-developed-by: Jonathan Marek Signed-off-by: Jonathan Marek Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 24fcc0522d8764c46ed109fb35c76f02468a56c7 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:36 2021 +0200 media: venus: hfi: Add 6xx interrupt support This commit adds 6xx specific interrupt support, some register offsets and bitmasks differ from 4xx, which we account for in this commit. [bod: Added commit log. Moved register definition into commit] Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 255385ca433ce5ff621732f26a759211a27c8f85 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:35 2021 +0200 media: venus: hfi: Add a 6xx boot logic This patch adds a 6xx specific boot logic. The goal is to share as much code as possible between 3xx, 4xx and 6xx silicon. We need to do a different write to WRAPPER_INTR_MASK with an additional write to CPU_CS_H2XSOFTINTEN_V6 and CPU_CS_X2RPMh_V6. The other writes are the same for 6xx and non-6xx silicon albeit at different absolute relative locations to the base of the venus address space. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 3f9acde81d6ed87399d4ac5a4f2e6174b17b82be Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:34 2021 +0200 media: venus: core: Hook to V6 base registers when appropriate This commit points the IO base registers 6xx offsets when probing for 6xx hardware. Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit e6dd8c3adf433a5ba4911d06c94e30324150283d Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:33 2021 +0200 media: venus: core: Add an io base for AON regs 6xx silicon needs to access registers from a AON base address range. This commit defines the necessary variable for later use. Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 94e6ed2b2db30bd3e4a821518ebbe8dd6a1920c9 Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:32 2021 +0200 media: venus: core: Add an io base for TZ wrapper regs 6xx silicon needs to access registers from a wrapper trust-zone base address range. This commit defines the necessary variable for later use. Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit ff027906308fcda1661e05beac6abdcbe2b93f6d Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:31 2021 +0200 media: venus: core: Add differentiator IS_V6(core) This commit adds the macro helper IS_V6() which will be used to differentiate iris2/v6 silicon from previous versions. Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 7f6631295f46070ee5cdbe939136ce48cc617272 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:30 2021 +0200 media: venus: hfi: Define additional 6xx registers - Add X2 RPMh registers and definitions from the downstream example. - Add 6xx core power definitions - Add 6xx AON definitions - Add 6xx wrapper tz definitions - Add 6xx wrapper interrupt definitions - Add 6xx soft interrupt definitions - Define wrapper LPI register offsets Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 3c5e894dd30a7180039abc45348dfdad8c189fe7 Author: Dikshita Agarwal Date: Fri Apr 2 12:06:29 2021 +0200 media: venus: hfi: Define block offsets for V6 hardware This commit defines a range of new base addresses for already defined blocks. - CPU_BASE_V6 - CPU_CS_BASE_V6 - CPU_IC_BASE_V6 - WRAPPER_BASE_V6 The base addresses of the blocks are slightly different for 6xx but, aside from that are layout and bit compatible. New 6xx specific block addresses will be added in separate commits. Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit ff2a7013b3e6a3d34d2b5c7786b8a73093d25319 Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:28 2021 +0200 media: venus: hfi,pm,firmware: Convert to block relative addressing An upcoming silicon change places a number of existing blocks within the Venus at different relative offsets to the base address of IO region. In order to handle this difference this patch changes the address offsets of the registers to function as offsets relative to the relevant sub-block of registers within the IO region not the base address of the IO region. As a result of this change venus_readl() and venus_writel() are deleted. Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit b4053a2097ec2f8ea622e817ae5a46a83b23aefe Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:27 2021 +0200 media: venus: core: Add io base variables for each block New silicon means that the pre-determined offsets we have been using in this driver no longer hold. Existing blocks of registers can exist at different offsets relative to the IO base address. This commit adds a routine to assign the IO base hooks a subsequent commit will convert from absolute to relative addressing. Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 0aeabfa29a9cb5b0fa62b9edc530da0ed114034f Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:26 2021 +0200 media: venus: core: add sm8250 DT compatible and resource data Adds an sm8250 compatible binding to the venus core. Co-developed-by: Jonathan Marek Signed-off-by: Jonathan Marek Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 52b9e265d22bccc5843e167da76ab119874e2883 Author: Wang Wensheng Date: Tue Apr 6 12:17:59 2021 +0000 KVM: arm64: Fix error return code in init_hyp_mode() Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: eeeee7193df0 ("KVM: arm64: Bootstrap PSCI SMC handler in nVHE EL2") Reported-by: Hulk Robot Signed-off-by: Wang Wensheng Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210406121759.5407-1-wangwensheng4@huawei.com commit 3bca43585e2216611c766c2108ac476b7dd9e3a8 Author: Stanimir Varbanov Date: Fri Apr 2 12:06:25 2021 +0200 media: venus: core,pm: Add handling for resets The Venus driver has to control two reset signals related to gcc video_axi0 and videocc mvs0c for v6. Add it. Signed-off-by: Stanimir Varbanov Signed-off-by: Bryan O'Donoghue Signed-off-by: Mauro Carvalho Chehab commit daba0a10c585b3736142d8f7ff81590b1ec1da7e Author: Bryan O'Donoghue Date: Fri Apr 2 12:06:24 2021 +0200 media: venus: Update v6 buffer descriptors Currently hfi_platform_v6.c adds a bunch of capability parameters. Reviewing downstream we can see a number of these need to be updated. techpack/video/msm/vidc/msm_vidc_platform.c :: kona_capabilities[] Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 7f028bff8a8e55a783eeb12e50bb3f5f18804459 Author: Ilya Lipnitskiy Date: Sat Apr 3 19:11:26 2021 -0700 MIPS: ralink: rt288x: select MIPS_AUTO_PFN_OFFSET RT288X systems may have a non-zero ramstart causing problems with memory reservations and boot hangs, as well as messages like: Wasting 1048576 bytes for tracking 32768 unused pages Both are alleviated by selecting MIPS_AUTO_PFN_OFFSET for such platforms. Tested on a Belkin F5D8235 v1 RT2880 device. Link: https://lore.kernel.org/linux-mips/20180820233111.xww5232dxbuouf4n@pburton-laptop/ Signed-off-by: Ilya Lipnitskiy Cc: Mike Rapoport Signed-off-by: Thomas Bogendoerfer commit 5e65c52ec716af6e8f51dacdaeb4a4d872249af1 Author: Tiezhu Yang Date: Tue Apr 6 17:25:12 2021 +0800 MIPS: Loongson64: Use _CACHE_UNCACHED instead of _CACHE_UNCACHED_ACCELERATED Loongson64 processors have a writecombine issue that maybe failed to write back framebuffer used with ATI Radeon or AMD GPU at times, after commit 8a08e50cee66 ("drm: Permit video-buffers writecombine mapping for MIPS"), there exists some errors such as blurred screen and lockup, and so on. [ 60.958721] radeon 0000:03:00.0: ring 0 stalled for more than 10079msec [ 60.965315] radeon 0000:03:00.0: GPU lockup (current fence id 0x0000000000000112 last fence id 0x000000000000011d on ring 0) [ 60.976525] radeon 0000:03:00.0: ring 3 stalled for more than 10086msec [ 60.983156] radeon 0000:03:00.0: GPU lockup (current fence id 0x0000000000000374 last fence id 0x00000000000003a8 on ring 3) As discussed earlier [1], it might be better to disable writecombine on the CPU detection side because the root cause is unknown now. Actually, this patch is a temporary solution to just make it work well, it is not a proper and final solution, I hope someone will have a better solution to fix this issue in the future. [1] https://lore.kernel.org/patchwork/patch/1285542/ Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 04324f44cb69a03fdc8f2ee52386a4fdf6a0043b Author: Thomas Bogendoerfer Date: Thu Apr 1 14:56:37 2021 +0200 MIPS: Remove get_fs/set_fs All get_fs/set_fs calls in MIPS code are gone, so remove implementation of it. With the clear separation of user/kernel space access we no longer need the EVA special handling, so get rid of that, too. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Christoph Hellwig commit 1c29f6a0f0c6ed44863046b8a51c40d4df804dd9 Merge: 8cdddd182bd7b 2c25fabdd5f69 Author: Rafael J. Wysocki Date: Tue Apr 6 15:00:13 2021 +0200 Merge back 'acpi-processor' material for v5.13. commit 9172652d72f8e9a1f4d9f667dde0beec60bcde41 Author: Stanimir Varbanov Date: Thu Apr 23 10:09:21 2020 +0200 media: venus: venc: Add support for CLL and Mastering display controls Create CLL and Mastering display colour volume v4l2 controls for encoder, add handling of HDR10 PQ SEI packet payloads for v4. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 5f8beb7d1e1c504b476d157732e54414f138104e Author: Stanimir Varbanov Date: Tue Jan 19 16:08:59 2021 +0100 media: docs: Document CLL and Mastering display colorimetry controls Document Content Light Level and Mastering Display v4l2 colorimetry controls. Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1ad0de78e7944eef171340d9fa00f0a59458991c Author: Stanimir Varbanov Date: Tue Jan 19 16:06:42 2021 +0100 media: v4l: Add HDR10 static metadata controls Introduce Content light level and Mastering display colour volume Colorimetry compound controls with relevant payload structures and validation. Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4e4053a28f37ab45ee9d13b77b1b9f53923b87b3 Author: Stanimir Varbanov Date: Tue Jan 19 15:05:37 2021 +0100 media: docs: Document colorimetry class Add a document for ext control colorimetry class. Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f31b9ffd968bc07e78826814da01e164e0bf6485 Author: Stanimir Varbanov Date: Tue Jan 19 15:04:22 2021 +0100 media: v4l: Add new Colorimetry Class Add Colorimetry control class for colorimetry controls Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4ef6039fad8f910738f4be604b20bc397665a7ea Author: Stanimir Varbanov Date: Wed Jan 20 12:10:53 2021 +0100 media: venus: vdec: Add support for conceal control Adds support for decoder conceal color control. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit b52051a40908b3867fcab077d4afda47e1bd4c1b Author: Stanimir Varbanov Date: Wed Jan 20 12:09:48 2021 +0100 media: v4l2-ctrl: Add decoder conceal color control Add decoder v4l2 control to set conceal color. Signed-off-by: Stanimir Varbanov Reviewed-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 15447d18b1b877d9c6f979bd00088e470a4e0e9f Author: Stanimir Varbanov Date: Sat Mar 6 13:16:41 2021 +0100 media: venus: hfi_cmds: Support plane-actual-info property from v1 The property is supported from v1 and upwards. So move it to set_property_1x. Fixes: 01e869e78756 ("media: venus: venc: fix handlig of S_SELECTION and G_SELECTION") Cc: stable@vger.kernel.org # v5.12 Signed-off-by: Stanimir Varbanov Tested-by: Bryan O'Donoghue Signed-off-by: Mauro Carvalho Chehab commit 39a6b9185d305d236bff625509ee63801b50301b Author: Stanimir Varbanov Date: Sat Mar 6 13:13:46 2021 +0100 media: venus: venc_ctrls: Change default header mode It is observed that on Venus v1 the default header-mode is producing a bitstream which is not playble. Change the default header-mode to joined with 1st frame. Fixes: 002c22bd360e ("media: venus: venc: set inband mode property to FW.") Cc: stable@vger.kernel.org # v5.12 Signed-off-by: Stanimir Varbanov Tested-by: Bryan O'Donoghue Signed-off-by: Mauro Carvalho Chehab commit 3215887167af7db9af9fa23d61321ebfbd6ed6d3 Author: Stanimir Varbanov Date: Thu Feb 25 15:28:57 2021 +0100 media: venus: pm_helpers: Set opp clock name for v1 The rate of the core clock is set through devm_pm_opp_set_rate and to avoid errors from it we have to set the name of the clock via dev_pm_opp_set_clkname. Fixes: 9a538b83612c ("media: venus: core: Add support for opp tables/perf voting") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Stanimir Varbanov Tested-by: Bryan O'Donoghue Signed-off-by: Mauro Carvalho Chehab commit 9b5d8fd580caa898c6e1b8605c774f2517f786ab Author: Stanimir Varbanov Date: Sun Mar 7 12:17:27 2021 +0100 media: venus: hfi_parser: Check for instance after hfi platform get The inst function argument is != NULL only for Venus v1 and we did not migrate v1 to a hfi_platform abstraction yet. So check for instance != NULL only after hfi_platform_get returns no error. Fixes: e29929266be1 ("media: venus: Get codecs and capabilities from hfi platform") Cc: stable@vger.kernel.org # v5.12 Signed-off-by: Stanimir Varbanov Tested-by: Bryan O'Donoghue Signed-off-by: Mauro Carvalho Chehab commit 834124c596e2dddbbdba06620835710ccca32fd0 Author: Stanimir Varbanov Date: Sun Mar 7 12:16:03 2021 +0100 media: venus: hfi_parser: Don't initialize parser on v1 The Venus v1 behaves differently comparing with the other Venus version in respect to capability parsing and when they are send to the driver. So we don't need to initialize hfi parser for multiple invocations like what we do for > v1 Venus versions. Fixes: 10865c98986b ("media: venus: parser: Prepare parser for multiple invocations") Cc: stable@vger.kernel.org # v5.10+ Signed-off-by: Stanimir Varbanov Tested-by: Bryan O'Donoghue Signed-off-by: Mauro Carvalho Chehab commit f2fb3f02abe2e66fefcc045767dd7d16e5730a45 Author: Dikshita Agarwal Date: Wed Mar 24 10:54:32 2021 +0100 media: venus: venc: Add support for Long Term Reference (LTR) controls Add support for below LTR controls in encoder: - V4L2_CID_MPEG_VIDEO_LTR_COUNT - V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX - V4L2_CID_MPEG_VIDEO_USE_LTR_FRAMES Signed-off-by: Dikshita Agarwal Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit f15c54cf3f684cd1a65f6ebc55ee9ada533ec6ef Author: Dikshita Agarwal Date: Wed Mar 24 10:54:31 2021 +0100 media: v4l2-ctrl: add controls for long term reference. Long Term Reference (LTR) frames are the frames that are encoded sometime in the past and stored in the DPB buffer list to be used as reference to encode future frames. This change adds controls to enable this feature. Signed-off-by: Dikshita Agarwal Reviewed-by: Hans Verkuil Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit ddbcd0c58a6a53e2f1600b9de0ce6a20667c031c Author: Stanimir Varbanov Date: Wed Mar 24 15:59:17 2021 +0100 media: venus: core: Drop second v4l2 device unregister Wrong solution of rebase conflict leads to calling twice v4l2_device_unregister in .venus_remove. Delete the second one. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 2f3eb922cd5b72a58e5b7c8fe036f4be60be9397 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:45:04 2021 +0200 doc: update rcu_dereference.rst reference Changeset b00aedf978aa ("doc: Convert to rcu_dereference.txt to rcu_dereference.rst") renamed: Documentation/RCU/rcu_dereference.txt to: Documentation/RCU/rcu_dereference.rst. Update its cross-reference accordingly. Fixes: b00aedf978aa ("doc: Convert to rcu_dereference.txt to rcu_dereference.rst") Signed-off-by: Mauro Carvalho Chehab commit 6dd6954668035aa62b8c73d219d8c0adf6dc866a Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:45:03 2021 +0200 dt-bindings:iio:dac: update microchip,mcp4725.yaml reference Changeset 6ced946a4bba ("dt-bindings:iio:dac:microchip,mcp4725 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/mcp4725.txt to: Documentation/devicetree/bindings/iio/dac/microchip,mcp4725.yaml. Update its cross-reference accordingly. Fixes: 6ced946a4bba ("dt-bindings:iio:dac:microchip,mcp4725 yaml conversion") Signed-off-by: Mauro Carvalho Chehab commit 26bbc4fa69f09bb55f4395a4c2ba60a6daea3bc0 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:45:02 2021 +0200 MAINTAINERS: update ti,dac7612.yaml reference Changeset 8b74e06b0f4d ("dt-bindings:iio:dac:ti,dac7612 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/ti,dac7612.txt to: Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml. Update its cross-reference accordingly. Fixes: 8b74e06b0f4d ("dt-bindings:iio:dac:ti,dac7612 yaml conversion") Signed-off-by: Mauro Carvalho Chehab commit 38c8619d8ba53951c7f788c55c47e375a726639b Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:45:02 2021 +0200 MAINTAINERS: update snps,dw-axi-dmac.yaml reference Changeset 8c70fb7e0a0a ("dt-bindings: dma: Add YAML schemas for dw-axi-dmac") renamed: Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.txt to: Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml. Update its cross-reference accordingly. Fixes: 8c70fb7e0a0a ("dt-bindings: dma: Add YAML schemas for dw-axi-dmac") Signed-off-by: Mauro Carvalho Chehab commit 9f929d952a168c31643469db79f6b3943f6caec3 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:45:01 2021 +0200 MAINTAINERS: update st,vl53l0x.yaml reference Changeset b4be8bd1c6a2 ("dt-bindings:iio:proximity:st,vl53l0x yaml conversion") renamed: Documentation/devicetree/bindings/iio/proximity/vl53l0x.txt to: Documentation/devicetree/bindings/iio/proximity/st,vl53l0x.yaml. Update its cross-reference accordingly. Fixes: b4be8bd1c6a2 ("dt-bindings:iio:proximity:st,vl53l0x yaml conversion") Signed-off-by: Mauro Carvalho Chehab commit f11f69f60dcd7b0d1f84c09393305e99654df0e9 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:45:01 2021 +0200 MAINTAINERS: update st,lsm6dsx.yaml reference Changeset 7a2cf8e91390 ("dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt to: Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml. Update its cross-reference accordingly. Fixes: 7a2cf8e91390 ("dt-bindings:iio:imu:st,lsm6dsx: txt to yaml conversion") Signed-off-by: Mauro Carvalho Chehab commit d6a6a961e7e9cf5f72dc443c73169b04e7379d0a Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:45:00 2021 +0200 MAINTAINERS: update renesas,rcar-gyroadc.yaml reference Changeset 8c41245872e2 ("dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/adc/renesas,gyroadc.txt to: Documentation/devicetree/bindings/iio/adc/renesas,rcar-gyroadc.yaml. Update its cross-reference accordingly. Fixes: 8c41245872e2 ("dt-bindings:iio:adc:renesas,rcar-gyroadc: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab commit f846fdb74e3ce00c4ebddc9a02c1e4c944312083 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:59 2021 +0200 MAINTAINERS: update pni,rm3100.yaml reference Changeset f383069be33e ("dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.txt to: Documentation/devicetree/bindings/iio/magnetometer/pni,rm3100.yaml. Update its cross-reference accordingly. Fixes: f383069be33e ("dt-bindings:iio:magnetometer:pni,rm3100: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab commit d72f19bc7b29a793e98c2f3862cbfc78fa2b77d0 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:58 2021 +0200 MAINTAINERS: update atmel,sama5d2-adc.yaml reference Changeset 58ff1b519753 ("dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/adc/at91-sama5d2_adc.txt to: Documentation/devicetree/bindings/iio/adc/atmel,sama5d2-adc.yaml. Update its cross-reference accordingly. Fixes: 58ff1b519753 ("dt-bindings:iio:adc:atmel,sama5d2-adc: txt to yaml conversion") Signed-off-by: Mauro Carvalho Chehab commit 4de924421ae6edf937e5f4be35e613d4984a5cec Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:57 2021 +0200 MAINTAINERS: update mtk-sd.yaml reference Changeset c626695ecd8b ("dt-bindings: mmc: Convert mtk-sd to json-schema") renamed: Documentation/devicetree/bindings/mmc/mtk-sd.txt to: Documentation/devicetree/bindings/mmc/mtk-sd.yaml. Update its cross-reference accordingly. Fixes: c626695ecd8b ("dt-bindings: mmc: Convert mtk-sd to json-schema") Signed-off-by: Mauro Carvalho Chehab commit 1ee6047159e400ed389907cd1adb3dcae6fcd666 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:57 2021 +0200 MAINTAINERS: update invensense,mpu3050.yaml reference Changeset 749787477ae4 ("dt-bindings:iio:gyro:invensense,mpu3050: txt to yaml format conversion.") renamed: Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.txt to: Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.yaml. Update its cross-reference accordingly. Fixes: 749787477ae4 ("dt-bindings:iio:gyro:invensense,mpu3050: txt to yaml format conversion.") Signed-off-by: Mauro Carvalho Chehab commit 7a3344ae5f5c384938899d576536452fae64bdaa Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:56 2021 +0200 MAINTAINERS: update voltage-divider.yaml reference Changeset 6f633bc91ac1 ("dt-bindings:iio:afe:voltage-divider: txt to yaml conversion") renamed: Documentation/devicetree/bindings/iio/afe/voltage-divider.txt to: Documentation/devicetree/bindings/iio/afe/voltage-divider.yaml. Update its cross-reference accordingly. Fixes: 6f633bc91ac1 ("dt-bindings:iio:afe:voltage-divider: txt to yaml conversion") Signed-off-by: Mauro Carvalho Chehab commit 8c7e25ff2deafa385a0b899e913ee5d975ad5ec5 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:55 2021 +0200 MAINTAINERS: update current-sense-shunt.yaml reference Changeset ce66e52b6c16 ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt to: Documentation/devicetree/bindings/iio/afe/current-sense-shunt.yaml. Update its cross-reference accordingly. Fixes: ce66e52b6c16 ("dt-bindings:iio:afe:current-sense-shunt: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab commit a0f4d63b8a1d64f827bab0282c2406ac5bc90526 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:55 2021 +0200 MAINTAINERS: update current-sense-amplifier.yaml reference Changeset fbac26b9ad21 ("dt-bindings:iio:afe:current-sense-amplifier: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt to: Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.yaml. Update its cross-reference accordingly. Fixes: fbac26b9ad21 ("dt-bindings:iio:afe:current-sense-amplifier: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab commit cf26fc9b33ae366011b90319bc7bf4c2618780f6 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:54 2021 +0200 MAINTAINERS: update envelope-detector.yaml reference Changeset 66a6dcc20e63 ("dt-bindings:iio:adc:envelope-detector: txt to yaml conversion.") renamed: Documentation/devicetree/bindings/iio/adc/envelope-detector.txt to: Documentation/devicetree/bindings/iio/adc/envelope-detector.yaml. Update its cross-reference accordingly. Fixes: 66a6dcc20e63 ("dt-bindings:iio:adc:envelope-detector: txt to yaml conversion.") Signed-off-by: Mauro Carvalho Chehab commit 177d7a6b2037b3ae4ff55efbeed72e9bbc9f6d60 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:54 2021 +0200 MAINTAINERS: update dpot-dac.yaml reference Changeset 06d2ff6fe11e ("dt-bindings:iio:dac:dpot-dac: yaml conversion.") renamed: Documentation/devicetree/bindings/iio/dac/dpot-dac.txt to: Documentation/devicetree/bindings/iio/dac/dpot-dac.yaml. Update its cross-reference accordingly. Fixes: 06d2ff6fe11e ("dt-bindings:iio:dac:dpot-dac: yaml conversion.") Signed-off-by: Mauro Carvalho Chehab commit 5f58e37fe35eb785c6e3a51df8cde05a6d7c7ea0 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:53 2021 +0200 MAINTAINERS: update st,hts221.yaml reference Changeset 9a6ac3138258 ("dt-bindings:iio:humidity:st,hts221 yaml conversion.") renamed: Documentation/devicetree/bindings/iio/humidity/hts221.txt to: Documentation/devicetree/bindings/iio/humidity/st,hts221.yaml. Update its cross-reference accordingly. Fixes: 9a6ac3138258 ("dt-bindings:iio:humidity:st,hts221 yaml conversion.") Signed-off-by: Mauro Carvalho Chehab commit 238f60b48cbd4a115a14d9bce71702aed3fa4630 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:52 2021 +0200 MAINTAINERS: update fsl,dpaa2-console.yaml reference Changeset 616fde2dd60f ("dt-bindings: misc: convert fsl,dpaa2-console from txt to YAML") renamed: Documentation/devicetree/bindings/misc/fsl,dpaa2-console.txt to: Documentation/devicetree/bindings/misc/fsl,dpaa2-console.yaml. Update its cross-reference accordingly. Fixes: 616fde2dd60f ("dt-bindings: misc: convert fsl,dpaa2-console from txt to YAML") Signed-off-by: Mauro Carvalho Chehab commit 057297118b0dce5bee44cee6a02575014323ad04 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:52 2021 +0200 MAINTAINERS: update brcm,bcm-v3d.yaml reference Changeset cb18a7979a35 ("dt-bindings: gpu: Convert v3d to json-schema") renamed: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt to: Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.yaml. Update its cross-reference accordingly. Fixes: cb18a7979a35 ("dt-bindings: gpu: Convert v3d to json-schema") Signed-off-by: Mauro Carvalho Chehab commit 98b756276a605c4ce112c23dde94e06b83e48468 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:51 2021 +0200 MAINTAINERS: update ste,mcde.yaml reference Changeset 2abb0b994db5 ("dt-bindings: display: mcde: Convert to YAML schema") renamed: Documentation/devicetree/bindings/display/ste,mcde.txt to: Documentation/devicetree/bindings/display/ste,mcde.yaml. Update its cross-reference accordingly. Fixes: 2abb0b994db5 ("dt-bindings: display: mcde: Convert to YAML schema") Signed-off-by: Mauro Carvalho Chehab commit 473178adb55c3ec13e05a06de930519677fe4ca4 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:50 2021 +0200 MAINTAINERS: update adi,ad5758.yaml reference Changeset 1e6536ee349b ("dt-bindings:iio:dac:adi,ad5758 yaml conversion") renamed: Documentation/devicetree/bindings/iio/dac/ad5758.txt to: Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml. Update its cross-reference accordingly. Fixes: 1e6536ee349b ("dt-bindings:iio:dac:adi,ad5758 yaml conversion") Signed-off-by: Mauro Carvalho Chehab commit 036673a7231decf66d8d73dfcf0afd375de31f6e Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:48 2021 +0200 dt-bindings: i3c: update i3c.yaml references Changeset 5e4cdca887fd ("dt-bindings: i3c: Convert the bus description to yaml") renamed: Documentation/devicetree/bindings/i3c/i3c.txt to: Documentation/devicetree/bindings/i3c/i3c.yaml. Update the cross-references accordingly. Fixes: 5e4cdca887fd ("dt-bindings: i3c: Convert the bus description to yaml") Signed-off-by: Mauro Carvalho Chehab commit 0378027396a1115267d15f42fe55cee4c932f0e9 Author: Mauro Carvalho Chehab Date: Tue Apr 6 14:44:47 2021 +0200 dt-bindings: iommu: mediatek: update mediatek,iommu.yaml references Changeset bca28426805d ("dt-bindings: iommu: mediatek: Convert IOMMU to DT schema") renamed: Documentation/devicetree/bindings/iommu/mediatek,iommu.txt to: Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml. Update the cross-references accordingly. Fixes: bca28426805d ("dt-bindings: iommu: mediatek: Convert IOMMU to DT schema") Signed-off-by: Mauro Carvalho Chehab commit a806011141eb7e77828173e37426f6c4c4a9eddb Author: Sakari Ailus Date: Tue Mar 23 09:43:30 2021 +0100 media: staging: ipu3-imgu: No need for kernel-doc comments in driver struct This part is rather trivial so adding more comments isn't really helpful. Reported-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit c6f9d67e2ac625e331f6a7f5715d2f809ff0a922 Author: Krzysztof Kozlowski Date: Mon Oct 5 17:15:58 2020 +0200 media: i2c: imx258: add HDR control The IMX258 supports High Dynamic Range with 5 levels of low/high exposure ratio. Add a V4L2 control for HDR (WIDE_DYNAMIC_RANGE). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dd90caa0111e178b52b21e56364bc2244a3973b3 Author: Lad Prabhakar Date: Thu Mar 11 10:52:05 2021 +0100 media: i2c: imx219: Balance runtime PM use-count Move incrementing/decrementing runtime PM count to imx219_start_streaming()/imx219_stop_streaming() functions respectively. This fixes an issue of unbalanced runtime PM count in resume callback error path where streaming is stopped and runtime PM count is left unbalanced. Fixes: 1283b3b8f82b9 ("media: i2c: Add driver for Sony IMX219 sensor") Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 745d4612d2c853c00abadbf69799c8aee7f99c39 Author: Lad Prabhakar Date: Thu Mar 11 10:52:04 2021 +0100 media: i2c: imx219: Move out locking/unlocking of vflip and hflip controls from imx219_set_stream Move out locking/unlocking of vflip and hflip controls from imx219_set_stream() to the imx219_start_streaming()/ imx219_stop_streaming() respectively. This fixes an issue in resume callback error path where streaming is stopped and the controls are left in locked state. Fixes: 1283b3b8f82b9 ("media: i2c: Add driver for Sony IMX219 sensor") Reported-by: Pavel Machek Signed-off-by: Lad Prabhakar Reviewed-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 45deb5faeb9e02951361ceba5ffee721745661c3 Author: Thomas Bogendoerfer Date: Thu Apr 1 14:56:36 2021 +0200 MIPS: uaccess: Remove get_fs/set_fs call sites Use new helpers to access user/kernel for functions, which are used with user/kernel pointers. Instead of dealing with get_fs/set_fs select user/kernel access via parameter. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Christoph Hellwig commit 08ee3a009f49ac160cf8df0b65aa7dc299c811b2 Author: Thomas Bogendoerfer Date: Thu Apr 1 14:56:35 2021 +0200 MIPS: uaccess: Added __get/__put_kernel_nofault Added __get/__put_kernel_nofault as preparation for removing get/set_fs. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Christoph Hellwig commit 9a91dd501c2b98b6a1677affa514e30452b9c908 Author: Thomas Bogendoerfer Date: Thu Apr 1 14:56:34 2021 +0200 MIPS: kernel: Remove not needed set_fs calls flush_icache_range always does flush kernel address ranges, so no need to do the set_fs dance. Signed-off-by: Thomas Bogendoerfer Reviewed-by: Christoph Hellwig commit 15786f7b564eff32d8dae73d40d77dc4e3c7298f Author: Sakari Ailus Date: Fri Mar 5 17:42:34 2021 +0100 media: v4l: fwnode: Rename v4l2_async_register_subdev_sensor_common Rename v4l2_async_register_subdev_sensor_common as v4l2_async_register_subdev_sensor. This is a part of the effort to make the long names present in V4L2 fwnode and async frameworks shorter. Signed-off-by: Sakari Ailus Reviewed-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit 9e7fabbcb01a7e97c236d273e2017c1a35007a42 Author: Sakari Ailus Date: Fri Mar 5 16:59:22 2021 +0100 media: v4l: fwnode: Rename and make static V4L2 async notifier helper Rename v4l2_async_notifier_parse_fwnode_sensor_common() as v4l2_async_notifier_parse_fwnode_sensor() and make the function static, as it's not used by a driver and maybe never will. Signed-off-by: Sakari Ailus Reviewed-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit 4ebddb7c17c4549f04741c7faf8e4ced62391d20 Author: Sakari Ailus Date: Fri Mar 12 10:05:44 2021 +0100 media: entity: Add lockdep check to media graph walk It was always assumed that walking the media graph would require holding the media_device graph_mutex but this was not documented nor checked for. Add a lockdep check to graph walk init and iter, and document the need for acquiring the graph_mutex. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 5bf2c8b66e4eb47f16ce41b936be699d07256b76 Author: Sakari Ailus Date: Fri Mar 19 17:31:08 2021 +0100 media: omap4iss: Acquire graph mutex for graph traversal Acquire the graph_mutex for traversing the media graph. This seems to have been missing all the time. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ba689d93336161f195258ccf9333f0e51ce6e85f Author: Sakari Ailus Date: Fri Mar 12 11:43:08 2021 +0100 media: omap3isp: Acquire graph mutex for graph traversal Acquire the graph_mutex for traversing the media graph. This seems to have been missing all the time. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit dfad83cb7193effb6c853a5c7337ac2274a2e2fc Author: Florian Fainelli Date: Tue Mar 30 20:22:07 2021 -0700 MIPS: Add support for CONFIG_DEBUG_VIRTUAL Provide hooks to intercept bad usages of virt_to_phys() and __pa_symbol() throughout the kernel. To make this possible, we need to rename the current implement of virt_to_phys() into __virt_to_phys_nodebug() and wrap it around depending on CONFIG_DEBUG_VIRTUAL. A similar thing is needed for __pa_symbol() which is now aliased to __phys_addr_symbol() whose implementation is either the direct return of RELOC_HIDE or goes through the debug version. Signed-off-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit a1946caf02fcc1fa978de43ceb247c4614d16216 Author: Yang Li Date: Wed Mar 10 09:52:14 2021 +0100 media: i2c: remove unneeded variable 'ret' Fix the following coccicheck warning: ./drivers/media/i2c/ov8865.c:2527:5-8: Unneeded variable: "ret". Return "0" on line 2536 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit ad91849996f9dd79741a961fd03585a683b08356 Author: Ricardo Ribalda Date: Wed Mar 10 01:16:46 2021 +0100 media: staging/intel-ipu3: Fix set_fmt error handling If there in an error during a set_fmt, do not overwrite the previous sizes with the invalid config. Without this patch, v4l2-compliance ends up allocating 4GiB of RAM and causing the following OOPs [ 38.662975] ipu3-imgu 0000:00:05.0: swiotlb buffer is full (sz: 4096 bytes) [ 38.662980] DMA: Out of SW-IOMMU space for 4096 bytes at device 0000:00:05.0 [ 38.663010] general protection fault: 0000 [#1] PREEMPT SMP Cc: stable@vger.kernel.org Fixes: 6d5f26f2e045 ("media: staging/intel-ipu3-v4l: reduce kernel stack usage") Signed-off-by: Ricardo Ribalda Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 7120734f41b36daf615ae98c36033b0a379c303f Author: Hans Verkuil Date: Tue Mar 9 14:00:44 2021 +0100 media: i2c/ccs: fix kernel-doc header issues Fix these kernel-doc warnings: drivers/media/i2c/ccs/ccs-data.h:144: warning: expecting prototype for struct ccs_pdaf_pix_loc_block_desc. Prototype was for struct ccs_pdaf_pix_loc_pixel_desc instead drivers/media/i2c/ccs/ccs-quirk.h:51: warning: Function parameter or member 'post_streamoff' not described in 'ccs_quirk' drivers/media/i2c/ccs/ccs-quirk.h:51: warning: Function parameter or member 'flags' not described in 'ccs_quirk' Signed-off-by: Hans Verkuil Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 9a4619ef6cc1182ba02d9d465903d47a12bdc55a Author: Jia-Ju Bai Date: Fri Mar 5 04:19:42 2021 +0100 media: i2c: imx274: fix error return code of imx274_s_frame_interval() When __v4l2_ctrl_modify_range() fails, no error return code of imx274_s_frame_interval() is assigned. To fix this bug, ret is assigned with the return valye of __v4l2_ctrl_modify_range(), and then ret is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 666c1fc90cd82184624d4cc5d124c66025f89a47 Author: Álvaro Fernández Rojas Date: Sun Mar 14 17:43:51 2021 +0100 mips: bmips: bcm63268: populate device tree nodes - Rename periph_clk to periph_osc. - Rename clkctl to periph_clk. - Move syscon-reboot to subnode. - Add hsspi-osc clock. - Add watchdog. - Add HS SPI controller - Add NAND controller. - Add USBH PHY. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 7d9ade0f52a69a77d75070888e67ea3ec40581dc Author: Álvaro Fernández Rojas Date: Sun Mar 14 17:43:50 2021 +0100 mips: bmips: bcm6368: populate device tree nodes - Rename periph_clk to periph_osc. - Rename clkctl to periph_clk. - Move syscon-reboot to subnode. - Add watchdog controller. - Add SPI controller. - Add NAND controller. - Add USBH PHY controller. - Add RNG controller. - Add cfi-flash controller. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 277bb6e2273dce5fbe245fd6020e982931445928 Author: Álvaro Fernández Rojas Date: Sun Mar 14 17:43:49 2021 +0100 mips: bmips: bcm6362: populate device tree nodes - Rename periph_clk to periph_osc. - Rename clkctl to periph_clk. - Move syscon-reboot to subnode. - Add hsspi-osc clock. - Add watchdog. - Add SPI controller. - Add HS SPI controller. - Add NAND controller. - Add USBH PHY. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit add9562320101f7cc4f587bea190aad661132280 Author: Álvaro Fernández Rojas Date: Sun Mar 14 17:43:48 2021 +0100 mips: bmips: bcm6358: populate device tree nodes - Rename periph_clk to periph_osc. - Rename clkctl to periph_clk. - Move syscon-reboot to subnode. - Add watchdog. - Add SPI controller. - Add USBH PHY. - Add cfi-flash. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 7ea42936165c8d0dcbf77e5b4c3986481bfd8d97 Author: Álvaro Fernández Rojas Date: Sun Mar 14 17:43:47 2021 +0100 mips: bmips: bcm6328: populate device tree nodes - Rename periph_clk to periph_osc. - Rename clkctl to periph_clk. - Move syscon-reboot to subnode. - Add hsspi-osc clock. - Add watchdog. - Add HS SPI controller. - Add NAND controller. - Add USBH PHY. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit cde58b861a1d365568588adda59d42351c0c4ad3 Author: Álvaro Fernández Rojas Date: Sun Mar 14 17:43:46 2021 +0100 mips: bmips: fix syscon-reboot nodes Commit a23c4134955e added the clock controller nodes, incorrectly changing the syscon-reboot nodes addresses. Fixes: a23c4134955e ("MIPS: BMIPS: add clock controller nodes") Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit a7de6eac6f6f73d48d97a6c93032107775f4593b Author: Sakari Ailus Date: Mon Feb 15 08:55:12 2021 +0100 media: ipu3-cio2: Fix pixel-rate derived link frequency The driver uses v4l2_get_link_freq() helper to obtain the link frequency using the LINK_FREQ but also the PIXEL_RATE control. The divisor for the pixel rate derived link frequency was wrong, missing the bus uses double data rate. Fix this. Reported-by: Laurent Pinchart Fixes: 4b6c129e87a3 ("media: ipu3-cio2: Use v4l2_get_link_freq helper") Signed-off-by: Sakari Ailus Reviewed-by: Laurent Pinchart Reviewed-by: Bingbu Cao Signed-off-by: Mauro Carvalho Chehab commit 8c43126e8c9f0990fa75fb5219c03b20d5ead7b7 Author: Sakari Ailus Date: Tue Jan 5 15:21:11 2021 +0100 media: ccs: Fix sub-device function Fix sub-device function for the pixel array and the scaler. It seems that the pixel array had gotten assigned as SCALER whereas the scaler had CAM_SENSOR function. Fix this by setting the pixel array function to CAM_SENSOR and that of scaler to SCALER. Fixes: 9ec2ac9bd0f9 ("media: ccs: Give all subdevs a function") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit e34a717f9f3ae82127a865597487e69f068adfec Author: Laurent Pinchart Date: Mon Feb 8 00:56:10 2021 +0100 media: staging: ipu3: uapi: Add "WITH Linux-syscall-note" license All Linux headers licensed under the GPL-2.0 must include a "WITH Linux-syscall-note" extension in their SPDX license identifier, as enforced by the scripts/headers_install.sh script. Fix the Intel IPU3 UAPI header currently stored with the driver in staging. Signed-off-by: Laurent Pinchart Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 4fa5cc4701514b251e386635165405c6f1fe1661 Author: Tom Rix Date: Fri Nov 27 17:41:23 2020 +0100 media: s5k5baf: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit d3204955b74b031cc2b2ad0567ca0cfac18854fc Author: Yang Li Date: Wed Feb 3 03:22:01 2021 +0100 media: i2c: remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/media/i2c/ov02a10.c:703:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 8225b9e1c23fd259157297695baa0cf6e54deaca Author: Fabrizio Castro Date: Wed Oct 21 15:53:31 2020 +0200 media: dt-bindings: media: renesas,drif: Add r8a77965 support The r8a77965 (a.k.a. R-Car M3-N) device tree schema is compatible with the already documented R-Car Gen3 devices. Document r8a77965 support within renesas,drif.yaml. Signed-off-by: Fabrizio Castro Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Acked-by: Rob Herring Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit d85f4d81fe4f2c3afe3aecabde9ad463358aaec7 Author: Fabrizio Castro Date: Wed Oct 21 15:53:30 2020 +0200 media: dt-bindings: media: renesas,drif: Add r8a77990 support The r8a77990 (a.k.a. R-Car E3) device tree schema is compatible with R-Car H3 and M3-W schema. Document r8a77990 support within renesas,drif.yaml. Signed-off-by: Fabrizio Castro Reviewed-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Acked-by: Rob Herring Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 4ff1dfc373d76b59696e95ef98833e1f2a02c3e8 Author: Fabrizio Castro Date: Wed Oct 21 15:53:29 2020 +0200 media: dt-bindings: media: renesas,drif: Convert to json-schema Convert the Renesas DRIF bindings to DT schema and update MAINTAINERS accordingly. Signed-off-by: Fabrizio Castro Reviewed-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Reviewed-by: Rob Herring Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 852752ee33122fbdb8576989ca7a59330f58ace9 Author: Fabrizio Castro Date: Wed Oct 21 15:53:28 2020 +0200 media: MAINTAINERS: Update MAINTAINERS for Renesas DRIF driver Add Fabrizio castro and remove Ramesh Shanmugasundaram. Signed-off-by: Fabrizio Castro Reviewed-by: Ramesh Shanmugasundaram Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 4ca052b4ea621d0002a5e5feace51f60ad5e6b23 Author: Laurent Pinchart Date: Mon Mar 8 11:31:28 2021 +0100 media: uvcvideo: Support devices that report an OT as an entity source Some devices reference an output terminal as the source of extension units. This is incorrect, as output terminals only have an input pin, and thus can't be connected to any entity in the forward direction. The resulting topology would cause issues when registering the media controller graph. To avoid this problem, connect the extension unit to the source of the output terminal instead. While at it, and while no device has been reported to be affected by this issue, also handle forward scans where two output terminals would be connected together, and skip the terminals found through such an invalid connection. Reported-and-tested-by: John Nealy Signed-off-by: Laurent Pinchart Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab commit e91cafdf3c18b927e61eb4ee18e4865b8485f24f Author: Zhansaya Bagdauletkyzy Date: Tue Apr 6 17:43:46 2021 +0600 staging: rtl8712: Remove extra blank lines Remove extra blank lines after an open brace to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/f61f6d330bc3fa53d4d420754d1d461b6cfcb2de.1617708653.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0a7b3aee5c19ba0b295a37bc633ddf50fe0bccd Author: Zhansaya Bagdauletkyzy Date: Tue Apr 6 17:43:44 2021 +0600 staging: rtl8712: Rewrite NULL comparisons Replace NULL comparisons with boolean negation to be more consistent with the rest of the Linux kernel code base. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/74471865b399584d73a18696d2008006301dfd71.1617708653.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman commit a11fbe6bf1ae780d4e813b8afec37d1d37f2fa80 Author: Beatriz Martins de Carvalho Date: Tue Apr 6 11:51:24 2021 +0100 drivers: staging: rtl8712: align arguments with open parenthesis Clean up checks of "Alignment should match open parenthesis" in file mlme_osdep.h Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/20210406105124.78498-1-martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5e1e55bc78ee75ac8cbb55fbf3683162fcf62bb4 Author: Zhansaya Bagdauletkyzy Date: Tue Apr 6 14:45:27 2021 +0600 staging: rtl8712: Remove spaces after a cast Remove extra spaces after a cast to conform with Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/f8932bfa35eb7480b69a9c8296bb10fac5a28540.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman commit 431c052b6ee0b371be3b3f2bf61d972f5086b710 Author: Zhansaya Bagdauletkyzy Date: Tue Apr 6 14:45:25 2021 +0600 staging: rtl8712: remove extra blank lines Remove extra blank lines to conform with Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/0bf3df788ca46a59ebb990bf2e3effca7080fd1e.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7b2ede0bde67f0ecd41da0792242060f7a7bfe8b Author: Zhansaya Bagdauletkyzy Date: Tue Apr 6 14:45:24 2021 +0600 staging: rtl8712: match parentheses alignment Match next line with open parentheses by adding tabs/spaces to conform with Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/664f324330611a78e184a203ece38d4facc9d791.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman commit 59184278ee664396a34b0c808a8485aa034e5a39 Author: Zhansaya Bagdauletkyzy Date: Tue Apr 6 14:45:23 2021 +0600 staging: rtl8712: add spaces around operators Add spaces around operators to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/1fa63e851a6fa403798b95b64d9147c9b3b02c93.1617697237.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5fd0241d66d2d0e76fa2cd68b0e1c79f1bf2a21a Author: Deborah Brouwer Date: Mon Apr 5 19:32:20 2021 -0700 staging: rtl8712: add space before binary operator Add a space before the binary operator "|" to comply with kernel coding style. Identified by checkpatch. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/6db3ca92022376d162289174e201c79017b366db.1617674639.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit fe6ed4e02b8fdba905ba2774f576b7871f1c66c3 Author: Deborah Brouwer Date: Mon Apr 5 19:32:19 2021 -0700 staging: rtl8712: remove space after cast Remove the unnecessary space immediately after a cast. Identified by checkpatch: CHECK: No space is necessary after a cast. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/b1ba94644f5204505623ffc64614671aac30bbd8.1617674639.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit 483a0f6d9d5d7f37db84792cc9815c75a1c4e99a Author: Deborah Brouwer Date: Mon Apr 5 19:32:18 2021 -0700 staging: rtl8712: remove a blank line A duplicate blank line is removed so that only a single blank line separates two functions. Identified by checkpatch. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/81801604460c8cad8770cb2e1290e1587bf88075.1617674639.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit cc7790d14f2964e2a39dc028993fdaf671a7163b Author: Deborah Brouwer Date: Mon Apr 5 19:32:17 2021 -0700 staging: rtl8712: add period within a comment Add a period to separate repeated words in a comment. The period preserves the meaning of the comment while also stopping the checkpatch warning: WARNING: Possible repeated word: 'fw'. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/f9f48ac6e93e814c51a7ed370d0b2988d2e3a602.1617674639.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit 85c7bef4197eb96e88366cefaabfd01a0ddc7933 Author: Beatriz Martins de Carvalho Date: Mon Apr 5 18:29:20 2021 +0100 staging: rtl8723bs: core: align arguments with open parenthesis Cleans up checks of "Alignment should match open parenthesis" in file rtw_ap.c Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/00250c746ed850f6a73ff0ad4c1735cbd019b58f.1617641790.git.martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit b321be064426f9a2aae66e83a298a4ff3a032806 Author: Beatriz Martins de Carvalho Date: Mon Apr 5 18:29:18 2021 +0100 staging: rtl8723bs: core: Ending line with argument Cleans up checks of "Lines should not end with a '('" with argument present in next line in file rtw_ap.c Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/ce400adc5623b3bfbd520da4aa6bcc5867ad4dc8.1617641790.git.martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4f085fedea9b506da92609460910686561b56220 Author: Beatriz Martins de Carvalho Date: Mon Apr 5 18:29:17 2021 +0100 staging: rtl8723bs: core: Removed extra blank line Clean up check of "Blank lines aren't necessary before a close brace '}'" in rtw_ap.c Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/b2961b2d354722d063e05f92bef5df431b8e7898.1617641790.git.martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit cf447efc6cdf0e17d7f0d03fa2b58e7860396a9d Author: Phillip Potter Date: Tue Apr 6 11:56:07 2021 +0100 staging: rtl8723bs: remove unused variable from rtw_os_recv_indicate_pkt Remove unused 'ret' variable from rtw_os_recv_indicate_pkt function in drivers/staging/rtl8723bs/os_dep/recv_linux.c as nothing is actually done with it. A function return val is conditionally stored to it under certain circumstances, but nothing is done with it after. Fixes a warning from kernel test robot. Reported-by: kernel test robot Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210406105607.1689292-1-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 060f7875bd230df1a8f83a988faaee09d693e465 Author: Fabien Parent Date: Mon Apr 5 22:03:53 2021 +0200 soc: mediatek: mmsys: Add support for MT8167 SoC Add routing table for DSI on MT8167 SoC. The registers are mostly incompatible with the current defines, so new one for MT8167 are added. Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210405200354.2194930-2-fparent@baylibre.com Signed-off-by: Matthias Brugger commit e7be7853ab1b82d5b46fd14810995700a3bf3a05 Author: Fabien Parent Date: Mon Apr 5 22:03:52 2021 +0200 dt-bindings: mediatek: mmsys: add mt8167 binding Add binding documentation for MT8167 SoC. Signed-off-by: Fabien Parent Reviewed-by: Chun-Kuang Hu Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210405200354.2194930-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 801adee270ba39f633844a1e5aa99175a17f2af3 Author: David Villasana Jiménez Date: Mon Apr 5 15:59:06 2021 -0500 staging: kpc2000: pcie.h: Remove extra blank line Issue found by checkpatch.pl Signed-off-by: David Villasana Jiménez Link: https://lore.kernel.org/r/YGt6GhZHqB62Y038@fedora Signed-off-by: Greg Kroah-Hartman commit 49e07427c5cc79b209baaea96f0f1ac4d57e6e6f Author: Martin Kaiser Date: Mon Apr 5 18:48:55 2021 +0200 staging: rtl8723bs: remove unused dvobj_priv members InterfaceNumber und NumInterfaces in struct dvobj_priv are not used. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210405164855.30264-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit bcc84e52bcc5a9e76102b76b9d442a290a408574 Author: Fabio Aiuto Date: Mon Apr 5 18:49:57 2021 +0200 staging: rtl8723bs: remove commented code block remove commented 5G code block in hal/hal_com_phycfg.c which contained removed RT_TRACE log as reported in the driver's TODO file: - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. so just removed obsolete commented code. Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b930cfc476c97f2ae5c5b90c1314a6270d56a539.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 90179b3f7a8145a091655707026d11228f2660d7 Author: Fabio Aiuto Date: Mon Apr 5 18:49:56 2021 +0200 staging: rtl8723bs: remove empty for cycles remove for-cycles left empty after RT_TRACE deletion and unused index variables Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/09875f599705d8f50af3511fa6bfaa54b9446a86.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6212607eed24ce33310bbe5138db185d0efc9643 Author: Fabio Aiuto Date: Mon Apr 5 18:49:55 2021 +0200 staging: rtl8723bs: rewrite comparisons to null fix the following post-commit hook checkpatch issues: CHECK: Comparison to NULL could be written "!pwep" 147: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:442: + if (pwep == NULL) CHECK: Comparison to NULL could be written "!skb" 226: FILE: drivers/staging/rtl8723bs/os_dep/recv_linux.c:204: + if (skb == NULL) CHECK: Comparison to NULL could be written "!dvobj" 275: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:398: + if (dvobj == NULL) Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/92edc9da10838dd99f96a99121343f4ec11b5d90.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e153092677b9161c142580e9c0dd07cc64a7bc85 Author: Fabio Aiuto Date: Mon Apr 5 18:49:54 2021 +0200 staging: rtl8723bs: place constant on the right side of the test fix following post-hook checkpatch issue: WARNING: Comparisons should place the constant on the right side of the test 85: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:676: + if (_FAIL == ret) Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8a6967abaef8b2edad6dc829dd232a7f048899d2.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0b0029ed4d4c835710f5f5d5e56cb5205c2cead2 Author: Fabio Aiuto Date: Mon Apr 5 18:49:53 2021 +0200 staging: rtl8723bs: remove unnecessary bracks after RT_TRACE deletion Remove all unnecessary bracks in if blocks, after RT_TRACE macro deletion Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/19fda6f0a2b381399623f5a5def39b07be0d995f.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 54bb1f37594d053edfc47b61b1ce249b5343ce4d Author: Fabio Aiuto Date: Mon Apr 5 18:49:52 2021 +0200 staging: rtl8723bs: remove empty #ifdef blocks after RT_TRACE deletion Remove all empty #ifdef blocks left empty after RT_TRACE macro deletion. Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f054fa97ff8197bd9d0320a601428c132de95e1b.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a6f242ad1e2bbd9b24ed33a31203f1366a74fce9 Author: Fabio Aiuto Date: Mon Apr 5 18:49:51 2021 +0200 staging: rtl8723bs: remove empty if, else blocks after RT_TRACE deletion Remove all if, else if, else blocks left empty after RT_TRACE macro deletion. Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0ce82ac515ba5f6b6318e63d910ad61d7a61de35.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b5223939ff8205bb5988bd272f9e95d79a4dbccd Author: Fabio Aiuto Date: Mon Apr 5 18:49:50 2021 +0200 staging: rtl8723bs: remove RT_TRACE log definitions remove RT_TRACE log definitions. Remove all of the RT_TRACE logs in hal/ and os_dep/ file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/163c0f17c88dc8977103a0971c50f4769ad78173.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6544c672ee1d250cb55efb750b4cd529e97615f4 Author: Fabio Aiuto Date: Mon Apr 5 18:49:49 2021 +0200 staging: rtl8723bs: remove commented out RT_TRACE logs in hal/ and os_dep/ Remove all commented out TR_TRACE calls. Remove all of the RT_TRACE logs in hal/ and os_dep/ file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/85338f2b2cffb530efbd987064d146fc2be49c72.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c1314fe4d28f31498a49af4d34b1771dad5c85ae Author: Fabio Aiuto Date: Mon Apr 5 18:49:48 2021 +0200 staging: rtl8723bs: remove all RT_TRACE logs in hal/ and os_dep/ Remove all of the RT_TRACE logs in hal/ and os_dep/ files as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. This bulk remove has been done with the following semantic patch: @@ expression a, b, c; @@ - RT_TRACE(a, b, (c)); Suggested-by: Joe Perches Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f5c6f61461ad957ecd5998019ac1ee1215dde097.1617640221.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3293448632ff2ae8c7cde4c3475da96138e24ca7 Author: Laurent Pinchart Date: Sun Feb 21 22:11:50 2021 +0100 media: uvcvideo: Fix XU id print in forward scan An error message in the forward scan code incorrectly prints the ID of the source entity instead of the XU entity being scanned. Fix it. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 33f643817f1c96e40393babfaa8a834cdf62c8d7 Author: Laurent Pinchart Date: Fri Jan 8 01:05:19 2021 +0100 media: imx: imx7_mipi_csis: Ensure pads are connected The CSI-2 receiver requires both its sink pad and its source pad to be connected through enabled links in order to be started. Ensure this by setting the MEDIA_PAD_FL_MUST_CONNECT flag on both pads. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit a791960d2d7b503f03fa8774573dfa5cb1f0c8a9 Author: Laurent Pinchart Date: Fri Jan 8 01:05:19 2021 +0100 media: imx: imx7_mipi_csis: Don't take state->lock in .link_setup() The .link_setup() handler uses state->lock to protect the src_sd field. This is only used in mipi_csis_s_stream(), which can't race .link_setup() as the MC core prevents link setup when the pipeline is streaming. Drop the lock. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit 8f5586dc2d1829d16f602b3d3237b9415ca95cce Author: Laurent Pinchart Date: Fri Jan 8 01:05:19 2021 +0100 media: imx: imx7_mipi_csis: Runtime suspend in .s_stream() error path If the .s_stream() handler fails after calling pm_runtime_get_sync(), call pm_runtime_put() in the error path. While at it add a few blank lines to make the code more readable. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Mauro Carvalho Chehab commit 212d34e050a5022db1246691b84668d3afa63e6c Author: Laurent Pinchart Date: Mon Feb 15 05:27:25 2021 +0100 media: dt-bindings: media: nxp,imx7-mipi-csi2: Expand descriptions Expand the description of the binding itself and of individual properties to include additional information that may not be immediately appartent from reading the reference manual. Drop the last sentence of the phy-supply description that refers to the driver's implementation. While at it, fix the capitalization of MIPI CSI-2 in the title. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 2641b3e04e7c6f9d4aafe4f921a8579fbfacb5c1 Author: Laurent Pinchart Date: Mon Feb 15 05:27:24 2021 +0100 media: dt-bindings: media: nxp,imx7-mipi-csi2: Indent example with 4 spaces DT bindings examples are customarily indented with 4 spaces. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 53cc2643c1498779c86ee8e038273c2b2d9c8126 Author: Dan Carpenter Date: Fri Apr 2 14:42:50 2021 +0300 ALSA: control - off by one in store_mode() If count is 16 then this will put the NUL terminator one element beyond the end of the array. Fixes: cb17fe0045aa ("ALSA: control - add sysfs support to the LED trigger module") Signed-off-by: Dan Carpenter Reviewed-by: Jaroslav Kysela Link: https://lore.kernel.org/r/YGcDOtrimR46vr0k@mwanda Signed-off-by: Takashi Iwai commit e9fcb07704fcef6fa6d0333fd2b3a62442eaf45b Author: Mathias Nyman Date: Tue Apr 6 10:02:08 2021 +0300 xhci: prevent double-fetch of transfer and transfer event TRBs The same values are parsed several times from transfer and event TRBs by different functions in the same call path, all while processing one transfer event. As the TRBs are in DMA memory and can be accessed by the xHC host we want to avoid this to prevent double-fetch issues. To resolve this pass the already parsed values to the different functions in the path of parsing a transfer event Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210406070208.3406266-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 286fd02fd54b6acab65809549cf5fb3f2a886696 Author: Mathias Nyman Date: Tue Apr 6 10:02:07 2021 +0300 xhci: fix potential array out of bounds with several interrupters The Max Interrupters supported by the controller is given in a 10bit wide bitfield, but the driver uses a fixed 128 size array to index these interrupters. Klockwork reports a possible array out of bounds case which in theory is possible. In practice this hasn't been hit as a common number of Max Interrupters for new controllers is 8, not even close to 128. This needs to be fixed anyway Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210406070208.3406266-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 597899d2f7c5619c87185ee7953d004bd37fd0eb Author: Mathias Nyman Date: Tue Apr 6 10:02:06 2021 +0300 xhci: check control context is valid before dereferencing it. Don't dereference ctrl_ctx before checking it's valid. Issue reported by Klockwork Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210406070208.3406266-3-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 8a157d2ff104d2849c58226a1fd02365d7d60150 Author: Mathias Nyman Date: Tue Apr 6 10:02:05 2021 +0300 xhci: check port array allocation was successful before dereferencing it return if rhub->ports is null after rhub->ports = kcalloc_node() Klockwork reported issue Signed-off-by: Mathias Nyman Link: https://lore.kernel.org/r/20210406070208.3406266-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ad26cb984b260a4cdd7e20ed6b63e5f66b55a977 Author: Laurent Pinchart Date: Mon Feb 15 05:27:23 2021 +0100 media: dt-bindings: media: nxp,imx7-mipi-csi2: Drop fsl,csis-hs-settle property The fsl,csis-hs-settle property isn't used by the driver anymore. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 9345f3514932930b76114ea9f14e70016ce5e46a Author: Laurent Pinchart Date: Mon Feb 15 05:27:22 2021 +0100 media: dt-bindings: media: nxp,imx7-mipi-csi2: Drop the reset-names property The reset-names property is incorrect, as it references the reset of the MIPI D-PHY master, which is used by the DSI controller. Fixing the property name would create backward-compatibility issues. As the device has a single reset, we can instead drop reset-names completely, which also simplifies the binding. Fix the example accordingly to use the correct reset. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Acked-by: Rob Herring Signed-off-by: Mauro Carvalho Chehab commit 8ce85ada0a05e21a5386ba5c417c52ab00fcd0d1 Author: Sathish Narasimman Date: Mon Apr 5 20:00:41 2021 +0530 Bluetooth: LL privacy allow RPA allow RPA to add bd address to whitelist Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit abb638b311da86eba61c4b2be8eb13375a56b7be Author: Sathish Narasimman Date: Mon Apr 5 20:00:23 2021 +0530 Bluetooth: Handle own address type change with HCI_ENABLE_LL_PRIVACY own_address_type has to changed to 0x02 and 0x03 only when HCI_ENABLE_LL_PRIVACY flag is set. Signed-off-by: Sathish Narasimman Signed-off-by: Marcel Holtmann commit b6f1b79deabd32f89adbf24ef7b30f82d029808a Author: Daniel Winkler Date: Mon Apr 5 16:33:05 2021 -0700 Bluetooth: Do not set cur_adv_instance in adv param MGMT request We set hdev->cur_adv_instance in the adv param MGMT request to allow the callback to the hci param request to set the tx power to the correct instance. Now that the callbacks use the advertising handle from the hci request (as they should), this workaround is no longer necessary. Furthermore, this change resolves a race condition that is more prevalent when using the extended advertising MGMT calls - if hdev->cur_adv_instance is set in the params request, then when the data request is called, we believe our new instance is already active. This treats it as an update and immediately schedules the instance with the controller, which has a potential race with the software rotation adv update. By not setting hdev->cur_adv_instance too early, the new instance is queued as it should be, to be used when the rotation comes around again. This change is tested on harrison peak to confirm that it resolves the race condition on registration, and that there is no regression in single- and multi-advertising automated tests. Reviewed-by: Miao-chen Chou Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann commit 25e70886c20005ac7facbd997ff4c3526dcd0de3 Author: Daniel Winkler Date: Mon Apr 5 16:33:04 2021 -0700 Bluetooth: Use ext adv handle from requests in CCs Some extended advertising hci command complete events are still using hdev->cur_adv_instance to map the request to the correct advertisement handle. However, with extended advertising, "current instance" doesn't make sense as we can have multiple concurrent advertisements. This change switches these command complete handlers to use the advertising handle from the request/event, to ensure we will always use the correct advertising handle regardless of the state of hdev->cur_adv_instance. This change is tested on hatch and kefka chromebooks and run through single- and multi-advertising automated tests to confirm callbacks report tx power to the correct advertising handle, etc. Reviewed-by: Miao-chen Chou Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann commit 93917fd224fdaebd0864143468e358300d1ffe36 Author: Kai Ye Date: Tue Apr 6 14:26:24 2021 +0800 Bluetooth: use the correct print format for L2CAP debug statements Use the correct print format. Printing an unsigned int value should use %u instead of %d. For details, please read document: Documentation/core-api/printk-formats.rst Signed-off-by: Kai Ye Signed-off-by: Marcel Holtmann commit 443ec4bbc6116f6f492a7a1282bfd8422c862158 Author: Hans Verkuil Date: Thu Mar 25 08:48:21 2021 +0100 media: vivid: update EDID The EDID had a few mistakes as reported by edid-decode: Block 1, CTA-861 Extension Block: Video Data Block: For improved preferred timing interoperability, set 'Native detailed modes' to 1. Video Capability Data Block: S_PT is equal to S_IT and S_CE, so should be set to 0 instead. Fixed those. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0ae10a7dc8992ee682ff0b1752ff7c83d472eef1 Author: Muhammad Usama Anjum Date: Wed Mar 24 19:07:53 2021 +0100 media: em28xx: fix memory leak If some error occurs, URB buffers should also be freed. If they aren't freed with the dvb here, the em28xx_dvb_fini call doesn't frees the URB buffers as dvb is set to NULL. The function in which error occurs should do all the cleanup for the allocations it had done. Tested the patch with the reproducer provided by syzbot. This patch fixes the memleak. Reported-by: syzbot+889397c820fa56adf25d@syzkaller.appspotmail.com Signed-off-by: Muhammad Usama Anjum Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 73c9a3f3b3465be8b7c71ba736c2696290a43bf8 Author: Bhaskar Chowdhury Date: Wed Mar 24 15:17:43 2021 +0100 media: cx88: Fix a typo s/sillicon/silicon/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 45cdd2a08a9ea977b4dad56494c4bd7e5b417843 Author: Bhaskar Chowdhury Date: Wed Mar 24 14:21:00 2021 +0100 media: entity: A typo fix s/cariers/carriers/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9ca53286a3e9069dcf2818165d3a9e01f781c871 Author: Xiaofeng Cao Date: Wed Mar 24 04:29:06 2021 +0100 media: drivers/media/pci/bt8xx/bttv-cards: fix typos change 'vodeo' to 'video' change 'nevery' to 'never' change 'is' to 'it' change 'connevted' to 'connected' change 'swichers' to 'switchers' change 'strucure' to 'structure' change 'unblanced' to 'unbalanced' change 'fonctionality' to 'functionality' Signed-off-by: Xiaofeng Cao Acked-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6f4eaea21b1acc78367389d8f0bdb30e158a37d9 Author: Hans Verkuil Date: Tue Mar 23 17:12:42 2021 +0100 media: cobalt: fix initial EDID The EDID failed with two edid-decode warnings: Block 1, CTA-861 Extension Block: Video Data Block: VIC 16 is the preferred timing, overriding the first detailed timings. Is this intended? Video Capability Data Block: S_PT is equal to S_IT and S_CE, so should be set to 0 instead. In addition, the first DTD had a wrong vsync value (6 instead of 5). Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 154bee9b6e3927b0362a8754f27d6bb54d743343 Author: Hans Verkuil Date: Tue Mar 23 15:31:26 2021 +0100 media: s5p-mfc/s5p_mfc_common.h: fix kernel-doc warnings Trivial fixes for many kernel-doc warnings. Most of the comments before enums or struct can just be that: regular comments. So just change /** to /*. In one remaining case it was just a wrong construct: @mem_dev[] -> @mem_dev Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5dccfce4ef32efe8548d6bf81686a98529aecc3a Author: Colin Ian King Date: Tue Mar 23 15:24:21 2021 +0100 media: imx-jpeg: Pass the v4l2_jpeg_header header argument by reference Currently the header argument is being passed by value, so a copy of 256 byte structure on the stack is potentially occurring. Fix this by passing by reference to avoid any large stack copies. Addresses-Coverity: ("Big parameter passed by value") Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5cd255e72646f487f11e4ed2fb5af2e0a94ce221 Author: Ezequiel Garcia Date: Tue Mar 23 13:07:46 2021 +0100 media: hantro: fix kernel-doc warnings and style Add a description for enum values in hantro_enc_fmt, in order to fix these warnings: drivers/staging/media/hantro/hantro_hw.h:149: warning: Enum value 'RK3288_VPU_ENC_FMT_YUV420P' not described in enum 'hantro_enc_fmt' drivers/staging/media/hantro/hantro_hw.h:149: warning: Enum value 'RK3288_VPU_ENC_FMT_YUV420SP' not described in enum 'hantro_enc_fmt' drivers/staging/media/hantro/hantro_hw.h:149: warning: Enum value 'RK3288_VPU_ENC_FMT_YUYV422' not described in enum 'hantro_enc_fmt' drivers/staging/media/hantro/hantro_hw.h:149: warning: Enum value 'RK3288_VPU_ENC_FMT_UYVY422' not described in enum 'hantro_enc_fmt' While here, improve the kernel-doc style, adding an empty line before the fields of the structs. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d75b32853d4a89a8901991f294ff24b2f8fe1da5 Author: Wei Yongjun Date: Tue Mar 23 12:29:03 2021 +0100 media: imx-jpeg: Fix return value check in mxc_jpeg_attach_pm_domains() In case of error, the function device_link_add() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fb3b597abdcec889876669e5dea2a80ea0ddbdd0 Author: Wei Yongjun Date: Tue Mar 23 12:28:55 2021 +0100 media: imx-jpeg: Fix error return code in mxc_jpeg_probe() Fix to return negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 2db16c6ed72c ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b98fc6b6c0cc72ee8eda406a13967f91a135e834 Author: Dafna Hirschfeld Date: Tue Mar 23 10:22:11 2021 +0100 media: rkisp1: uapi: document which flags/structs relate to statistics config Modify the documentation to point out which flags and structs are used to configure the statistics. Signed-off-by: Dafna Hirschfeld Reviewed-by: Sebastian Fricke Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 033fc896617a5ba8277e62ffae0d79e016fa3359 Author: Colin Ian King Date: Tue Mar 23 10:21:41 2021 +0100 media: imx-jpeg: Fix spelling mistake "Canot" -> "Cannot" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 37157ffb4bb0ef71edb5aa28fca977d0ad05ea86 Author: Hans Verkuil Date: Tue Mar 23 10:15:08 2021 +0100 media: exynos4-is: fix kernel-doc warnings Fixes these kernel-doc warnings: drivers/media/platform/exynos4-is/fimc-isp.h:139: warning: Function parameter or member 've' not described in 'fimc_is_video' drivers/media/platform/exynos4-is/fimc-isp.h:139: warning: Function parameter or member 'buf_count' not described in 'fimc_is_video' drivers/media/platform/exynos4-is/fimc-isp.h:139: warning: Function parameter or member 'buf_mask' not described in 'fimc_is_video' drivers/media/platform/exynos4-is/fimc-isp.h:139: warning: Function parameter or member 'streaming' not described in 'fimc_is_video' drivers/media/platform/exynos4-is/fimc-isp.h:139: warning: Function parameter or member 'buffers' not described in 'fimc_is_video' drivers/media/platform/exynos4-is/fimc-isp.h:139: warning: Function parameter or member 'pixfmt' not described in 'fimc_is_video' drivers/media/platform/exynos4-is/fimc-isp.h:176: warning: Function parameter or member 'src_fmt' not described in 'fimc_isp' drivers/media/platform/exynos4-is/fimc-isp.h:176: warning: Function parameter or member 'sink_fmt' not described in 'fimc_isp' drivers/media/platform/exynos4-is/fimc-isp.h:176: warning: Function parameter or member 'subdev_lock' not described in 'fimc_isp' drivers/media/platform/exynos4-is/fimc-lite.h:178: warning: Function parameter or member 'events' not described in 'fimc_lite' drivers/media/platform/exynos4-is/fimc-lite.h:178: warning: Function parameter or member 'streaming' not described in 'fimc_lite' drivers/media/platform/exynos4-is/media-dev.h:143: warning: Function parameter or member 'wbclk' not described in 'fimc_md' drivers/media/platform/exynos4-is/media-dev.h:143: warning: Function parameter or member 'fimc_lite' not described in 'fimc_md' drivers/media/platform/exynos4-is/media-dev.h:143: warning: Function parameter or member 'clk_provider' not described in 'fimc_md' drivers/media/platform/exynos4-is/media-dev.h:143: warning: Function parameter or member 'subdev_notifier' not described in 'fimc_md' drivers/media/platform/exynos4-is/media-dev.h:143: warning: Function parameter or member 'pipelines' not described in 'fimc_md' drivers/media/platform/exynos4-is/media-dev.h:143: warning: Function parameter or member 'link_setup_graph' not described in 'fimc_md' drivers/media/platform/exynos4-is/fimc-core.h:261: warning: Function parameter or member 'alpha' not described in 'fimc_frame' drivers/media/platform/exynos4-is/fimc-core.h:321: warning: Function parameter or member 'streaming' not described in 'fimc_vid_cap' drivers/media/platform/exynos4-is/fimc-core.h:429: warning: Function parameter or member 'drv_data' not described in 'fimc_dev' drivers/media/platform/exynos4-is/fimc-core.h:495: warning: Function parameter or member 'in_order_1p' not described in 'fimc_ctx' drivers/media/platform/exynos4-is/fimc-core.h:673: warning: Function parameter or member 'vid_cap' not described in 'fimc_active_queue_add' drivers/media/platform/exynos4-is/fimc-core.h:685: warning: Function parameter or member 'vid_cap' not described in 'fimc_active_queue_pop' drivers/media/platform/exynos4-is/fimc-core.h:700: warning: Function parameter or member 'vid_cap' not described in 'fimc_pending_queue_add' drivers/media/platform/exynos4-is/fimc-core.h:711: warning: Function parameter or member 'vid_cap' not described in 'fimc_pending_queue_pop' drivers/media/platform/exynos4-is/fimc-reg.h:333: warning: Function parameter or member 'dev' not described in 'fimc_hw_set_dma_seq' Signed-off-by: Hans Verkuil Acked-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab commit 40839521be5922f25084bd061dac1881147b3718 Author: Hans Verkuil Date: Tue Mar 23 09:52:31 2021 +0100 media: exynos-gsc/gsc-core.h: fix kernel-doc warnings Fixes these kernel-doc warnings: drivers/media/platform/exynos-gsc/gsc-core.h:76: warning: Enum value 'GSC_MIXER' not described in enum 'gsc_datapath' drivers/media/platform/exynos-gsc/gsc-core.h:76: warning: Enum value 'GSC_FIMD' not described in enum 'gsc_datapath' drivers/media/platform/exynos-gsc/gsc-core.h:76: warning: Excess enum value 'GSC_LOCAL' description in 'gsc_datapath' drivers/media/platform/exynos-gsc/gsc-core.h:124: warning: Function parameter or member 'color' not described in 'gsc_fmt' drivers/media/platform/exynos-gsc/gsc-core.h:124: warning: Function parameter or member 'num_comp' not described in 'gsc_fmt' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'pix_max' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'pix_min' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'pix_align' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'in_buf_cnt' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'out_buf_cnt' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'sc_up_max' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'sc_down_max' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'poly_sc_down_max' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'pre_sc_down_max' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:297: warning: Function parameter or member 'local_sc_down' not described in 'gsc_variant' drivers/media/platform/exynos-gsc/gsc-core.h:310: warning: Function parameter or member 'clk_names' not described in 'gsc_driverdata' drivers/media/platform/exynos-gsc/gsc-core.h:310: warning: Function parameter or member 'num_clocks' not described in 'gsc_driverdata' drivers/media/platform/exynos-gsc/gsc-core.h:340: warning: Function parameter or member 'num_clocks' not described in 'gsc_dev' drivers/media/platform/exynos-gsc/gsc-core.h:340: warning: Function parameter or member 'v4l2_dev' not described in 'gsc_dev' drivers/media/platform/exynos-gsc/gsc-core.h:376: warning: Function parameter or member 'rotation' not described in 'gsc_ctx' drivers/media/platform/exynos-gsc/gsc-core.h:376: warning: Function parameter or member 'hflip' not described in 'gsc_ctx' drivers/media/platform/exynos-gsc/gsc-core.h:376: warning: Function parameter or member 'vflip' not described in 'gsc_ctx' drivers/media/platform/exynos-gsc/gsc-core.h:376: warning: Function parameter or member 'gsc_ctrls' not described in 'gsc_ctx' drivers/media/platform/exynos-gsc/gsc-core.h:376: warning: Function parameter or member 'out_colorspace' not described in 'gsc_ctx' Signed-off-by: Hans Verkuil Acked-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab commit 15e68e58296de6bcfb031f9f3741ec5b448173c9 Author: Hans Verkuil Date: Tue Mar 23 09:39:16 2021 +0100 media: s5p-jpeg/jpeg-core.h: fix kernel-doc warnings Fixes these warnings: drivers/media/platform/s5p-jpeg/jpeg-core.h:136: warning: Function parameter or member 'irq_ret' not described in 's5p_jpeg' drivers/media/platform/s5p-jpeg/jpeg-core.h:136: warning: Function parameter or member 'irq_status' not described in 's5p_jpeg' drivers/media/platform/s5p-jpeg/jpeg-core.h:168: warning: Function parameter or member 'memplanes' not described in 's5p_jpeg_fmt' drivers/media/platform/s5p-jpeg/jpeg-core.h:168: warning: Function parameter or member 'subsampling' not described in 's5p_jpeg_fmt' Signed-off-by: Hans Verkuil Acked-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab commit 6e77c678f2f4ef82113b674cb64a945b11cfba23 Author: Hans Verkuil Date: Tue Mar 23 09:26:10 2021 +0100 media: s3c-camif/camif-core.h: fix kernel-doc warnings Fixes these warnings: drivers/media/platform/s3c-camif/camif-core.h:156: warning: Function parameter or member 'pix_limits' not described in 's3c_camif_variant' drivers/media/platform/s3c-camif/camif-core.h:156: warning: Function parameter or member 'has_img_effect' not described in 's3c_camif_variant' drivers/media/platform/s3c-camif/camif-core.h:156: warning: Function parameter or member 'vp_offset' not described in 's3c_camif_variant' drivers/media/platform/s3c-camif/camif-core.h:232: warning: Function parameter or member 'vdev' not described in 'camif_vp' drivers/media/platform/s3c-camif/camif-core.h:232: warning: Function parameter or member 'vb_queue' not described in 'camif_vp' drivers/media/platform/s3c-camif/camif-core.h:232: warning: Function parameter or member 'offset' not described in 'camif_vp' drivers/media/platform/s3c-camif/camif-core.h:297: warning: Function parameter or member 'ctrl_test_pattern' not described in 'camif_dev' drivers/media/platform/s3c-camif/camif-core.h:297: warning: Function parameter or member 'ctrl_colorfx' not described in 'camif_dev' drivers/media/platform/s3c-camif/camif-core.h:297: warning: Function parameter or member 'ctrl_colorfx_cbcr' not described in 'camif_dev' drivers/media/platform/s3c-camif/camif-core.h:297: warning: Function parameter or member 'colorfx' not described in 'camif_dev' drivers/media/platform/s3c-camif/camif-core.h:297: warning: Function parameter or member 'colorfx_cb' not described in 'camif_dev' drivers/media/platform/s3c-camif/camif-core.h:297: warning: Function parameter or member 'colorfx_cr' not described in 'camif_dev' Signed-off-by: Hans Verkuil Acked-by: Krzysztof Kozlowski Signed-off-by: Mauro Carvalho Chehab commit 43cd53eb4a2ae62e4dedb11f516542f354b9e39f Author: Hans Verkuil Date: Tue Mar 23 08:49:13 2021 +0100 media: allegro-dvt/nal-h264.h: fix kernel-doc: hdr -> hrd Give typo in kernel-doc documentation: hdr -> hrd Fixes this warning: drivers/media/platform/allegro-dvt/nal-h264.h:33: warning: expecting prototype for struct nal_h264_hdr_parameters. Prototype was for struct nal_h264_hrd_parameters instead Signed-off-by: Hans Verkuil Reviewed-by: Michael Tretter Signed-off-by: Mauro Carvalho Chehab commit 771df39b85fd75ef31e645f5d4c5bb789f71a441 Author: Bhaskar Chowdhury Date: Mon Mar 22 03:24:31 2021 +0100 media: atomisp: fix a typo s/Sysytem/System/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 73916b6a0c714258f9c2619408a66c6696a761a7 Author: Kai Huang Date: Fri Mar 19 20:23:07 2021 +1300 x86/sgx: Add helper to update SGX_LEPUBKEYHASHn MSRs Add a helper to update SGX_LEPUBKEYHASHn MSRs. SGX virtualization also needs to update those MSRs based on guest's "virtual" SGX_LEPUBKEYHASHn before EINIT from guest. Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/dfb7cd39d4dd62ea27703b64afdd8bccb579f623.1616136308.git.kai.huang@intel.com commit a67136b458e5e63822b19c35794451122fe2bf3e Author: Sean Christopherson Date: Fri Mar 19 20:23:06 2021 +1300 x86/sgx: Add encls_faulted() helper Add a helper to extract the fault indicator from an encoded ENCLS return value. SGX virtualization will also need to detect ENCLS faults. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Jarkko Sakkinen Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/c1f955898110de2f669da536fc6cf62e003dff88.1616136308.git.kai.huang@intel.com commit 32ddda8e445df3de477db14d386fb3518042224a Author: Sean Christopherson Date: Fri Mar 19 20:23:05 2021 +1300 x86/sgx: Add SGX2 ENCLS leaf definitions (EAUG, EMODPR and EMODT) Define the ENCLS leafs that are available with SGX2, also referred to as Enclave Dynamic Memory Management (EDMM). The leafs will be used by KVM to conditionally expose SGX2 capabilities to guests. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Jarkko Sakkinen Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/5f0970c251ebcc6d5add132f0d750cc753b7060f.1616136308.git.kai.huang@intel.com commit 9c55c78a73ce6e62a1d46ba6e4f242c23c29b812 Author: Sean Christopherson Date: Fri Mar 19 20:23:04 2021 +1300 x86/sgx: Move ENCLS leaf definitions to sgx.h Move the ENCLS leaf definitions to sgx.h so that they can be used by KVM. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Jarkko Sakkinen Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/2e6cd7c5c1ced620cfcd292c3c6c382827fde6b2.1616136308.git.kai.huang@intel.com commit 8ca52cc38dc8fdcbdbd0c23eafb19db5e5f5c8d0 Author: Sean Christopherson Date: Fri Mar 19 20:23:03 2021 +1300 x86/sgx: Expose SGX architectural definitions to the kernel Expose SGX architectural structures, as KVM will use many of the architectural constants and structs to virtualize SGX. Name the new header file as asm/sgx.h, rather than asm/sgx_arch.h, to have single header to provide SGX facilities to share with other kernel componments. Also update MAINTAINERS to include asm/sgx.h. Signed-off-by: Sean Christopherson Co-developed-by: Kai Huang Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Jarkko Sakkinen Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/6bf47acd91ab4d709e66ad1692c7803e4c9063a0.1616136308.git.kai.huang@intel.com commit faa7d3e6f3b983a28bf0f88f82dcb1c162e61105 Author: Kai Huang Date: Fri Mar 19 20:23:02 2021 +1300 x86/sgx: Initialize virtual EPC driver even when SGX driver is disabled Modify sgx_init() to always try to initialize the virtual EPC driver, even if the SGX driver is disabled. The SGX driver might be disabled if SGX Launch Control is in locked mode, or not supported in the hardware at all. This allows (non-Linux) guests that support non-LC configurations to use SGX. [ bp: De-silli-fy the test. ] Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Reviewed-by: Sean Christopherson Acked-by: Jarkko Sakkinen Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/d35d17a02bbf8feef83a536cec8b43746d4ea557.1616136308.git.kai.huang@intel.com commit 332bfc7becf479de8a55864cc5ed0024baea28aa Author: Sean Christopherson Date: Fri Mar 19 20:22:58 2021 +1300 x86/cpu/intel: Allow SGX virtualization without Launch Control support The kernel will currently disable all SGX support if the hardware does not support launch control. Make it more permissive to allow SGX virtualization on systems without Launch Control support. This will allow KVM to expose SGX to guests that have less-strict requirements on the availability of flexible launch control. Improve error message to distinguish between three cases. There are two cases where SGX support is completely disabled: 1) SGX has been disabled completely by the BIOS 2) SGX LC is locked by the BIOS. Bare-metal support is disabled because of LC unavailability. SGX virtualization is unavailable (because of Kconfig). One where it is partially available: 3) SGX LC is locked by the BIOS. Bare-metal support is disabled because of LC unavailability. SGX virtualization is supported. Signed-off-by: Sean Christopherson Co-developed-by: Kai Huang Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Jarkko Sakkinen Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/b3329777076509b3b601550da288c8f3c406a865.1616136308.git.kai.huang@intel.com commit 540745ddbc70eabdc7dbd3fcc00fe4fb17cd59ba Author: Sean Christopherson Date: Fri Mar 19 20:22:21 2021 +1300 x86/sgx: Introduce virtual EPC for use by KVM guests Add a misc device /dev/sgx_vepc to allow userspace to allocate "raw" Enclave Page Cache (EPC) without an associated enclave. The intended and only known use case for raw EPC allocation is to expose EPC to a KVM guest, hence the 'vepc' moniker, virt.{c,h} files and X86_SGX_KVM Kconfig. The SGX driver uses the misc device /dev/sgx_enclave to support userspace in creating an enclave. Each file descriptor returned from opening /dev/sgx_enclave represents an enclave. Unlike the SGX driver, KVM doesn't control how the guest uses the EPC, therefore EPC allocated to a KVM guest is not associated with an enclave, and /dev/sgx_enclave is not suitable for allocating EPC for a KVM guest. Having separate device nodes for the SGX driver and KVM virtual EPC also allows separate permission control for running host SGX enclaves and KVM SGX guests. To use /dev/sgx_vepc to allocate a virtual EPC instance with particular size, the hypervisor opens /dev/sgx_vepc, and uses mmap() with the intended size to get an address range of virtual EPC. Then it may use the address range to create one KVM memory slot as virtual EPC for a guest. Implement the "raw" EPC allocation in the x86 core-SGX subsystem via /dev/sgx_vepc rather than in KVM. Doing so has two major advantages: - Does not require changes to KVM's uAPI, e.g. EPC gets handled as just another memory backend for guests. - EPC management is wholly contained in the SGX subsystem, e.g. SGX does not have to export any symbols, changes to reclaim flows don't need to be routed through KVM, SGX's dirty laundry doesn't have to get aired out for the world to see, and so on and so forth. The virtual EPC pages allocated to guests are currently not reclaimable. Reclaiming an EPC page used by enclave requires a special reclaim mechanism separate from normal page reclaim, and that mechanism is not supported for virutal EPC pages. Due to the complications of handling reclaim conflicts between guest and host, reclaiming virtual EPC pages is significantly more complex than basic support for SGX virtualization. [ bp: - Massage commit message and comments - use cpu_feature_enabled() - vertically align struct members init - massage Virtual EPC clarification text - move Kconfig prompt to Virtualization ] Signed-off-by: Sean Christopherson Co-developed-by: Kai Huang Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/0c38ced8c8e5a69872db4d6a1c0dabd01e07cad7.1616136308.git.kai.huang@intel.com commit 7accea0c95a1ce4cf1bbf622c42b00c27a2dd51d Author: Masahiro Yamada Date: Wed Mar 31 23:43:36 2021 +0900 m68k: fpsp040,ifpsp060: Remove meaningless EXTRA_LDFLAGS These two Makefiles contain only built-in objects (i.e. obj-y), which are collected by $(AR) into a thin-archive. EXTRA_LDFLAGS is meaningless because $(LD) is not used here. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210331144336.25628-2-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit 418db20a82a48b8aa08a8f0691125384e2cbc290 Author: Masahiro Yamada Date: Wed Mar 31 23:43:35 2021 +0900 m68k: fpsp040: Remove meaningless $(OS_OBJS) 'git grep OS_OBJS' hits only this line. $(OS_OBJS) is just empty. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210331144336.25628-1-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit 43262178c043032e7c42d00de44c818ba05f9967 Author: Finn Thain Date: Tue Mar 30 18:37:51 2021 +1100 m68k: mvme147,mvme16x: Don't wipe PCC timer config bits Don't clear the timer 1 configuration bits when clearing the interrupt flag and counter overflow. As Michael reported, "This results in no timer interrupts being delivered after the first. Initialization then hangs in calibrate_delay as the jiffies counter is not updated." On mvme16x, enable the timer after requesting the irq, consistent with mvme147. Cc: Michael Pavone Fixes: 7529b90d051e ("m68k: mvme147: Handle timer counter overflow") Fixes: 19999a8b8782 ("m68k: mvme16x: Handle timer counter overflow") Reported-and-tested-by: Michael Pavone Signed-off-by: Finn Thain Link: https://lore.kernel.org/r/4fdaa113db089b8fb607f7dd818479f8cdcc4547.1617089871.git.fthain@telegraphics.com.au Signed-off-by: Geert Uytterhoeven commit cbfa72b57747f8b87df16396d85e832c8bf03811 Author: Masahiro Yamada Date: Mon Mar 1 23:21:12 2021 +0900 m68k: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts m68k to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210301142112.342909-2-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit 8e4633daccf8706ef80f31e528dad69938460126 Author: Masahiro Yamada Date: Mon Mar 1 23:21:11 2021 +0900 m68k: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts m68k to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210301142112.342909-1-masahiroy@kernel.org Signed-off-by: Geert Uytterhoeven commit efdf262e11437f1bb6bcb35c16ac5c3c4cd07c67 Author: Geert Uytterhoeven Date: Mon Mar 1 10:33:46 2021 +0100 m68k: defconfig: Update defconfigs for v5.12-rc1 - Drop CONFIG_CRYPTO_RMD128=m (removed in commit b21b9a5e0aef025a ("crypto: rmd128 - remove RIPE-MD 128 hash algorithm")), - Drop CONFIG_CRYPTO_RMD256=m (removed in commit c15d4167f0b0465b ("crypto: rmd256 - remove RIPE-MD 256 hash algorithm")), - Drop CONFIG_CRYPTO_RMD320=m (removed in commit 93f64202926f606d ("crypto: rmd320 - remove RIPE-MD 320 hash algorithm")), - Drop CONFIG_CRYPTO_TGR192=m (removed in commit 87cd723f8978c59b ("crypto: tgr192 - remove Tiger 128/160/192 hash algorithms")), - Drop CONFIG_CRYPTO_SALSA20=m (removed in commit 663f63ee6d9cdc68 ("crypto: salsa20 - remove Salsa20 stream cipher algorithm")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210301093346.2679625-1-geert@linux-m68k.org commit b19df649adcba4f934a1438dbb21f5f1cb883608 Author: Angelo Dureghello Date: Sun Feb 28 20:08:28 2021 +0100 m68k: mm: Fix flatmem memory model setup Detected a broken boot on mcf54415, likely introduced from commit 4bfc848e0981 ("m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM") Fix ARCH_PFN_OFFSET to be a pfn. Signed-off-by: Angelo Dureghello Acked-by: Mike Rapoport Link: https://lore.kernel.org/r/20210228190828.392974-1-angelo@kernel-space.org Fixes: 4bfc848e0981fcd3 ("m68k/mm: enable use of generic memory_model.h for !DISCONTIGMEM") Signed-off-by: Geert Uytterhoeven commit 8609c63fce58e94d82f6b6bf29c7806062e2e867 Author: Bart Van Assche Date: Fri Apr 2 18:58:20 2021 +0200 nvme: fix handling of large MDTS values Instead of triggering an integer overflow and undefined behavior if MDTS is large, set max_hw_sectors to UINT_MAX. Signed-off-by: Bart Van Assche Reviewed-by: Keith Busch [hch: rebased to account for the new nvme_mps_to_sectors helper] Signed-off-by: Christoph Hellwig commit 5befc7c26e5a98cd49789fb1beb52c62bd472dba Author: Keith Busch Date: Wed Mar 24 16:18:05 2021 -0700 nvme: implement non-mdts command limits Commands that access LBA contents without a data transfer between the host historically have not had a spec defined upper limit. The driver set the queue constraints for such commands to the max data transfer size just to be safe, but this artificial constraint frequently limits devices below their capabilities. The NVMe Workgroup ratified TP4040 defines how a controller may advertise their non-MDTS limits. Use these if provided and default to the current constraints if not. Since the Dataset Management command limits are defined in logical blocks, but without a namespace to tell us the logical block size, the code defaults to the safe 512b size. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig commit c881a23fb6f7eb901155d25ba8dd1af0b8c7923b Author: Niklas Cassel Date: Fri Mar 26 19:48:00 2021 +0000 nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev When a passthru command targets a specific namespace, the ns parameter to nvme_user_cmd()/nvme_user_cmd64() is set. However, there is currently no validation that the nsid specified in the passthru command targets the namespace/nsid represented by the block device that the ioctl was performed on. Add a check that validates that the nsid in the passthru command matches that of the supplied namespace. Signed-off-by: Niklas Cassel Reviewed-by: Javier González Reviewed-by: Sagi Grimberg Reviewed-by: Kanchan Joshi Signed-off-by: Christoph Hellwig commit dd8f7fa908f66dd44abcd83cbb50410524b9f8ef Author: Hannes Reinecke Date: Sat Dec 5 16:29:01 2020 +0100 nvme: retrigger ANA log update if group descriptor isn't found If ANA is enabled but no ANA group descriptor is found when creating a new namespace the ANA log is most likely out of date, so trigger a re-read. The namespace will be tagged with the NS_ANA_PENDING flag to exclude it from path selection until the ANA log has been re-read. Fixes: 32acab3181c7 ("nvme: implement multipath access to nvme subsystems") Reported-by: Martin George Signed-off-by: Hannes Reinecke Reviewed-by: Keith Busch Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit cbc336c09b6d6dfb24d20c955599123308fa2fe2 Author: kernel test robot Date: Fri Mar 19 07:28:44 2021 +0800 phy: fix resource_size.cocci warnings drivers/phy/microchip/sparx5_serdes.c:2440:54-57: ERROR: Missing resource_size with iores Use resource_size function on resource object instead of explicit computation. Generated by: scripts/coccinelle/api/resource_size.cocci Fixes: 2ff8a1eeb5aa ("phy: Add Sparx5 ethernet serdes PHY driver") CC: Steen Hegelund Reported-by: kernel test robot Signed-off-by: kernel test robot Link: https://lore.kernel.org/r/20210318232844.GA65886@63b0c5462fda Signed-off-by: Vinod Koul commit 8595ffb52fa3a1dd8620f0029a0e22ee37efd17f Author: Steen Hegelund Date: Mon Mar 29 16:13:09 2021 +0200 phy: Sparx5 Eth SerDes: Use direct register operations Use direct register operations instead of a table of register information to lower the stack usage. Signed-off-by: Steen Hegelund Reported-by: kernel test robot Link: https://lore.kernel.org/r/20210329141309.612459-2-steen.hegelund@microchip.com Signed-off-by: Vinod Koul commit 646944853db763f449fc762fbd8e6ba056d77451 Author: Hao Fang Date: Thu Apr 1 20:02:17 2021 +0800 phy: hisilicon: Use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g. It should use capital S, according to the official website. Signed-off-by: Hao Fang Link: https://lore.kernel.org/r/1617278537-26102-1-git-send-email-fanghao11@huawei.com Signed-off-by: Vinod Koul commit 183bf0917e491e83881ccf6fb7d3df0aa843b756 Author: Randy Dunlap Date: Thu Apr 1 14:00:45 2021 -0700 phy: marvell: phy-mvebu-cp11i-utmi needs USB_COMMON When USB and USB_COMMON are not enabled, phy-mvebu-cp110-utmi suffers a build error due to a missing interface that is provided by CONFIG_USB_COMMON, so make the driver depend on USB_COMMON. ld: drivers/phy/marvell/phy-mvebu-cp110-utmi.o: in function `mvebu_cp110_utmi_phy_probe': phy-mvebu-cp110-utmi.c:(.text+0x152): undefined reference to `of_usb_get_dr_mode_by_phy' Signed-off-by: Randy Dunlap Cc: Kostya Porotchkin Cc: Kishon Vijay Abraham I Cc: Vinod Koul Cc: linux-phy@lists.infradead.org Link: https://lore.kernel.org/r/20210401210045.23525-1-rdunlap@infradead.org Signed-off-by: Vinod Koul commit 14968dd36a507866be0edfc2a05d48c997da5d99 Author: Bard Liao Date: Tue Apr 6 09:01:01 2021 +0800 soundwire: intel_init: test link->cdns intel_link_probe() could return error and dev_get_drvdata() will return null in such case. So we have to test link->cdns after link->cdns = dev_get_drvdata(&ldev->auxdev.dev); Otherwise, we will meet the "kernel NULL pointer dereference" error. Signed-off-by: Bard Liao Reviewed-by: Ranjani Sridharan Reviewed-by: Rander Wang Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210406010101.11442-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit e729e0fdc63d8f22cbce61159cee88c04e42b3e2 Author: Srinivas Kandagatla Date: Thu Apr 1 10:15:02 2021 +0100 soundwire: qcom: handle return correctly in qcom_swrm_transport_params Looks like return from reg_write is set but not checked. Fix this by adding error return path. Reported-by: coverity-bot Addresses-Coverity-ID: 1503591 ("UNUSED_VALUE") Fixes: 128eaf937adb ("soundwire: qcom: add support to missing transport params") Signed-off-by: Srinivas Kandagatla Reviewed-by: Kees Cook Link: https://lore.kernel.org/r/20210401091502.15825-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 9916c02ccd74e672b62dd1a9017ac2f237ebf512 Author: Srinivas Kandagatla Date: Thu Apr 1 10:24:54 2021 +0100 soundwire: qcom: cleanup internal port config indexing Internally used portconfig array for storing port bandwidth params starts from offset zero. However port zero is not really used and we also copy the bus parameters to offset zero. So basically we endup with a code which has to subtract 1 from port number to get to port parameters. This is bit confusing to the reader so, make this bit more obvious by only copying the parameters to offset 1 instead of zero. This will avoid doing -1 every time when we try to get port params. Similar thing has been recently done with din/dout_port_mask. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210401092454.21299-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit a661308c34de8cbd22165edf63dbd24ccb914981 Author: Srinivas Kandagatla Date: Thu Apr 1 10:00:58 2021 +0100 soundwire: qcom: wait for fifo space to be available before read/write If we write registers very fast we can endup in a situation where some of the writes will be dropped without any notice. So wait for the fifo space to be available before reading/writing the soundwire registers. Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210401090058.24041-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit eb5a909441a896fe9e230086363284a09c23e5df Author: Srinivas Kandagatla Date: Mon Mar 15 16:56:48 2021 +0000 soundwire: qcom: add static port map support SoundWire device ports are statically mapped to Controller ports during design. Add support to read these from SoundWire devices. This controller uses static port map info to setup bandwidth parameters for those ports. A generic port allocation is not possible in this cases! Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210315165650.13392-4-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 650dfdb894f0f2bc568a29ab91c704dca587458b Author: Srinivas Kandagatla Date: Mon Mar 15 16:56:47 2021 +0000 soundwire: qcom: update port map allocation bit mask currently the internal bitmask used for allocating ports starts with offset 0. This is bit confusing as data port numbers on Qualcomm controller are valid from 1 to 14. So adjust this bit mask accordingly, this will also help while adding static port map support. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210315165650.13392-3-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit f4022062e5417ab7228e95aec1a8687059a19db7 Author: Srinivas Kandagatla Date: Mon Mar 15 16:56:46 2021 +0000 soundwire: add static port mapping support Some of the SoundWire device ports are statically mapped to Controller ports during design, however there is no way to expose this information to the controller. Controllers like Qualcomm ones use this info to setup static bandwidth parameters for those ports. A generic port allocation is not possible in this cases! So this patch adds a new member m_port_map to struct sdw_slave to expose this static map. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210315165650.13392-2-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 48f17f96a81763c7c8bf5500460a359b9939359f Author: Rander Wang Date: Wed Mar 31 08:46:10 2021 +0800 soundwire: stream: fix memory leak in stream config error path When stream config is failed, master runtime will release all slave runtime in the slave_rt_list, but slave runtime is not added to the list at this time. This patch frees slave runtime in the config error path to fix the memory leak. Fixes: 89e590535f32 ("soundwire: Add support for SoundWire stream management") Signed-off-by: Rander Wang Reviewed-by: Keyon Jie Reviewed-by: Guennadi Liakhovetski Reviewed-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210331004610.12242-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 857a80bbd7321161f986588160d97815d1b1206a Author: Luo Jiaxing Date: Thu Mar 25 20:29:56 2021 +0800 scsi: libsas: Clean up whitespace checkpatch reported several whitespace errors. Fix them all. Link: https://lore.kernel.org/r/1616675396-6108-3-git-send-email-luojiaxing@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: Martin K. Petersen commit c03f2422b9f5918ba76c86ae69a02217ea791825 Author: Luo Jiaxing Date: Thu Mar 25 20:29:55 2021 +0800 scsi: libsas: Correctly indent statements in sas_to_ata_err() checkpatch reported an error in sas_to_ata_err(). switch and case statements are incorrectly indented. Link: https://lore.kernel.org/r/1616675396-6108-2-git-send-email-luojiaxing@huawei.com Signed-off-by: Luo Jiaxing Signed-off-by: Martin K. Petersen commit a1e9981ba528d002cdf323dc8d535bc919a981a0 Author: Tian Tao Date: Thu Apr 1 21:26:58 2021 +0800 scsi: qedf: Remove unused include of linux/version.h Remove unnecessary include of linux/version.h. Link: https://lore.kernel.org/r/1617283618-19346-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Tian Tao Signed-off-by: Zhiqi Song Signed-off-by: Martin K. Petersen commit c3b0d087763f983343f153f348ec535784c556b2 Author: Wan Jiabing Date: Thu Apr 1 14:35:34 2021 +0800 scsi: bfa: Remove unnecessary struct declarations struct bfa_fcs_s is declared twice. First is declared at line 50, remove the duplicate. struct bfa_fcs_fabric_s is defined at line 175, remove unnecessary declaration. Link: https://lore.kernel.org/r/20210401063535.992487-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Martin K. Petersen commit 1352eec8c0da71ee14b6b3bd46d49f8523f8e106 Author: Gustavo A. R. Silva Date: Wed Mar 31 17:43:38 2021 -0500 scsi: ufs: core: Fix out-of-bounds warnings in ufshcd_exec_raw_upiu_cmd() Fix the following out-of-bounds warnings by enclosing some structure members into new structure objects upiu_req and upiu_rsp: include/linux/fortify-string.h:20:29: warning: '__builtin_memcpy' offset [29, 48] from the object at 'treq' is out of the bounds of referenced subobject 'req_header' with type 'struct utp_upiu_header' at offset 16 [-Warray-bounds] include/linux/fortify-string.h:20:29: warning: '__builtin_memcpy' offset [61, 80] from the object at 'treq' is out of the bounds of referenced subobject 'rsp_header' with type 'struct utp_upiu_header' at offset 48 [-Warray-bounds] arch/m68k/include/asm/string.h:72:25: warning: '__builtin_memcpy' offset [29, 48] from the object at 'treq' is out of the bounds of referenced subobject 'req_header' with type 'struct utp_upiu_header' at offset 16 [-Warray-bounds] arch/m68k/include/asm/string.h:72:25: warning: '__builtin_memcpy' offset [61, 80] from the object at 'treq' is out of the bounds of referenced subobject 'rsp_header' with type 'struct utp_upiu_header' at offset 48 [-Warray-bounds] Refactor the code by making it more structured. The problem is that the original code is trying to copy data into a bunch of struct members adjacent to each other in a single call to memcpy(). Now that a new struct _upiu_req_ enclosing all those adjacent members is introduced, memcpy() doesn't overrun the length of &treq.req_header, because the address of the new struct object _upiu_req_ is used as the destination, instead. The same problem is present when memcpy() overruns the length of the source &treq.rsp_header; in this case the address of the new struct object _upiu_rsp_ is used, instead. Also, this helps with the ongoing efforts to enable -Warray-bounds and avoid confusing the compiler. Link: https://github.com/KSPP/linux/issues/109 Link: https://lore.kernel.org/lkml/60640558.lsAxiK6otPwTo9rv%25lkp@intel.com/ Link: https://lore.kernel.org/r/20210331224338.GA347171@embeddedor Reported-by: kernel test robot Reviewed-by: Avri Altman Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen Build-tested-by: kernel test robot commit aa6f2fccd7119c5579f9705c4f52f2eefa5e37d5 Author: Yang Yingliang Date: Tue Mar 30 20:59:11 2021 +0800 scsi: fnic: Remove unnecessary spin_lock_init() and INIT_LIST_HEAD() The spinlock and list head of fnic_list are initialized statically. It is unnecessary to initialize them. Link: https://lore.kernel.org/r/20210330125911.1050879-1-yangyingliang@huawei.com Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Martin K. Petersen commit 82ec0c290d1a731a2b33b8a713c5bc96b03fb2d3 Author: Bjorn Andersson Date: Thu Mar 11 16:33:17 2021 -0800 soc: qcom: wcnss_ctrl: Allow reading firmware-name from DT The WLAN NV firmware blob differs between platforms, and possibly devices, so add support in the wcnss_ctrl driver for reading the path of this file from DT in order to allow these files to live in a generic file system (or linux-firmware). The new property is optional and the code falls back to the old filename if the property isn't specified. Tested-by: Bryan O'Donoghue Tested-by: Aníbal Limón Link: https://lore.kernel.org/r/20210312003318.3273536-5-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 4dec8004de296952b4afc66b47f50cbf4f8421a9 Author: zhouchuangao Date: Tue Mar 30 05:46:01 2021 -0700 scsi: message: fusion: Use BUG_ON instead of if condition followed by BUG BUG_ON() uses unlikely in if() which can be optimized at compile time. Link: https://lore.kernel.org/r/1617108361-6870-1-git-send-email-zhouchuangao@vivo.com Signed-off-by: zhouchuangao Signed-off-by: Martin K. Petersen commit ac3f2784200d490558882c83c25a2d38270b02a2 Author: Bjorn Andersson Date: Thu Mar 11 16:33:16 2021 -0800 soc: qcom: wcnss_ctrl: Introduce local variable "dev" Introduce a local variable to carry the struct device *, to reduce the line lengths in the next patch. Tested-by: Aníbal Limón Link: https://lore.kernel.org/r/20210312003318.3273536-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit f553ba158109a4c5b2e0f704fe5b9316375a1a9a Author: Bjorn Andersson Date: Thu Mar 11 16:33:14 2021 -0800 dt-bindings: soc: qcom: wcnss: Add firmware-name property The WCNSS needs firmware which differs between platforms, and possibly boards. Add a new property "firmware-name" to allow the DT to specify the platform/board specific path to this firmware file. Acked-by: Rob Herring Tested-by: Aníbal Limón Link: https://lore.kernel.org/r/20210312003318.3273536-2-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 3c8604691d2acc7b7d4795d9695070de9eaa5828 Author: Sreekanth Reddy Date: Tue Mar 30 16:21:37 2021 +0530 scsi: mpt3sas: Block PCI config access from userspace during reset While diag reset is in progress there is short duration where all access to controller's PCI config space from the host needs to be blocked. This is due to a hardware limitation of the IOC controllers. Block all access to controller's config space from userland applications by calling pci_cfg_access_lock() while diag reset is in progress and unlocking it again after the controller comes back to ready state. Link: https://lore.kernel.org/r/20210330105137.20728-1-sreekanth.reddy@broadcom.com Cc: stable@vger.kernel.org #v5.4.108+ Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit c0629d70ca5570ab75e791e03e6fd11b9c754a6a Author: Sreekanth Reddy Date: Tue Mar 30 16:21:06 2021 +0530 scsi: mpt3sas: Fix endianness for ActiveCablePowerRequirement Covert ActiveCablePowerRequirement's value to target CPU endian before displaying it. Link: https://lore.kernel.org/r/20210330105106.20569-1-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 4c51f956965120b3441cdd39c358b87daba13e19 Author: Sreekanth Reddy Date: Tue Mar 30 16:20:04 2021 +0530 scsi: mpt3sas: Only one vSES is present even when IOC has multi vSES Whenever the driver is adding a vSES to virtual-phys list it is reinitializing the list head. Hence those vSES devices which were added previously are lost. Stop reinitializing the list every time a new vSES device is added. Link: https://lore.kernel.org/r/20210330105004.20413-1-sreekanth.reddy@broadcom.com Cc: stable@vger.kernel.org #v5.11.10+ Signed-off-by: Sreekanth Reddy Signed-off-by: Martin K. Petersen commit 0e5a6f27036e93110d3710d489fcc1408a674e62 Author: Sumit Semwal Date: Mon Apr 5 01:14:37 2021 +0530 arm64: dts: qcom: sdm845-xiaomi-beryllium: Add DSI and panel bits Enabling the Display panel for beryllium requires DSI labibb regulators and panel dts nodes to be added. It is also required to keep some of the regulators as always-on. Signed-off-by: Sumit Semwal Signed-off-by: Amit Pundir Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210404194437.537011-1-amit.pundir@linaro.org Signed-off-by: Bjorn Andersson commit 544cebe1895638a95ec0cd9e046e707a622592df Author: Sai Prakash Ranjan Date: Tue Mar 16 00:05:49 2021 +0530 arm64: dts: qcom: sc7280: Add Coresight support Add coresight components found on SC7280 SoC. Cc: Mathieu Poirier Cc: Suzuki K Poulose Cc: Mike Leach Cc: Leo Yan Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/de07324628f88900b72357f4ef7f0c7db7e3409d.1615832893.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 208979a8f9cb8ea2a453f043b4a91cf753a98e37 Author: Sai Prakash Ranjan Date: Tue Mar 16 00:05:48 2021 +0530 arm64: dts: qcom: sc7280: Add AOSS QMP node Add a DT node for the AOSS QMP on SC7280 SoC. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/12f013a09989dbc3075bfb204653dc02d54ae8a1.1615832893.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 2257fac94bc24d502fca8487517d4cf617f7041b Author: Sai Prakash Ranjan Date: Tue Mar 16 00:05:47 2021 +0530 arm64: dts: qcom: sc7280: Add IPCC for SC7280 SoC Add the IPCC DT node which is used to send and receive IPC signals with remoteprocs for SC7280 SoC. Cc: Manivannan Sadhasivam Cc: Jassi Brar Signed-off-by: Sai Prakash Ranjan Reviewed-by: Manivannan Sadhasivam Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/8374f407386209d2e7891763de3fa2450a14ad60.1615832893.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 0392968dbe099d343c676ea8fd1e878f1fd4682a Author: Sai Prakash Ranjan Date: Tue Mar 16 00:05:46 2021 +0530 arm64: dts: qcom: sc7280: Add device tree node for LLCC Add a DT node for Last level cache (aka. system cache) controller which provides control over the last level cache present on SC7280 SoC. Signed-off-by: Sai Prakash Ranjan Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/5bacaa8350e0d9553dccd623a15513590e795b47.1615832893.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 47498916afea14cee97d8ff137ad68ea67c15784 Author: Jami Kettunen Date: Tue Apr 6 04:07:07 2021 +0300 arm64: dts: qcom: Add support for OnePlus 5/5T Add device trees for OnePlus 5 (cheeseburger) and 5T (dumpling) MSM8998 SoC smartphones with initial support included for: - UFS internal storage - USB peripheral mode - Display - Touch - Bluetooth - Hall effect sensor - Power and volume buttons - Capacitive keypad button backlight (on cheeseburger) Signed-off-by: Jami Kettunen Link: https://lore.kernel.org/r/20210406010708.2376807-2-jamipkettunen@gmail.com Signed-off-by: Bjorn Andersson commit 03041cd25d9858649accab60395c613aa97b7d5b Author: Jami Kettunen Date: Tue Apr 6 04:07:08 2021 +0300 arm64: dts: qcom: msm8998: Disable MSS remoteproc by default This was already the case for ADSP and SLPI remoteprocs & doesn't affect existing boards where it has been re-enabled. Signed-off-by: Jami Kettunen Link: https://lore.kernel.org/r/20210406010708.2376807-3-jamipkettunen@gmail.com Signed-off-by: Bjorn Andersson commit 1b5ad814af5ed38fe66274c37800c093c8347994 Author: Konstantin Shelekhin Date: Mon Mar 22 23:09:38 2021 +0300 scsi: target: Make the virtual LUN 0 device Create the device for the virtual LUN 0 using the DUMMY flag. This change makes it possible to remove some special-casing in the INQUIRY code. Link: https://lore.kernel.org/r/20210322200938.53300-3-k.shelekhin@yadro.com Reviewed-by: Roman Bolshakov Reviewed-by: Mike Christie Signed-off-by: Konstantin Shelekhin Signed-off-by: Martin K. Petersen commit 0aecfa662e4312046ece56bb5666796412abe8cb Author: Konstantin Shelekhin Date: Mon Mar 22 23:09:37 2021 +0300 scsi: target: Add the DUMMY flag to rd_mcp This commit adds the DUMMY flag to the rd_mcp backend that forces a logical unit to report itself as not connected device of an unknown type. Essentially this allows users to create devices identical to the device for the virtual LUN 0, making it possible to explicitly create a LUN 0 device and configure its WWNs (e.g. vendor or product name). Link: https://lore.kernel.org/r/20210322200938.53300-2-k.shelekhin@yadro.com Reviewed-by: Roman Bolshakov Reviewed-by: Mike Christie Signed-off-by: Konstantin Shelekhin Signed-off-by: Martin K. Petersen commit bc3f2b42b70eb1b8576e753e7d0e117bbb674496 Author: Ewan D. Milne Date: Wed Mar 31 16:11:54 2021 -0400 scsi: scsi_dh_alua: Remove check for ASC 24h in alua_rtpg() Some arrays return ILLEGAL_REQUEST with ASC 00h if they don't support the RTPG extended header so remove the check for INVALID FIELD IN CDB. Link: https://lore.kernel.org/r/20210331201154.20348-1-emilne@redhat.com Reviewed-by: Hannes Reinecke Signed-off-by: Ewan D. Milne Signed-off-by: Martin K. Petersen commit 22ec513e705735e32d4b8263c23d20c779639c7e Author: John Pittman Date: Wed Mar 31 14:16:56 2021 -0400 scsi: scsi_dh_alua: Prevent duplicate pg info print in alua_rtpg() Due to the frequency that alua_rtpg() is called, the path group info print within can print the same info multiple times in the logs, subsequent prints adding no new information or value. To reproduce: # modprobe scsi_debug vpd_use_hostno=0 # systemctl start multipathd.service To fix, check stored values, only printing at alua attach/activate and if any of the values change. Link: https://lore.kernel.org/r/20210331181656.5046-1-jpittman@redhat.com Reviewed-by: David Jeffery Reviewed-by: Laurence Oberman Signed-off-by: John Pittman Signed-off-by: Martin K. Petersen commit d56030f882a71e41732b544f98e1735b66a25d35 Author: Don Brace Date: Thu Mar 11 14:17:54 2021 -0600 scsi: smartpqi: Update version to 2.1.8-045 Update version. Link: https://lore.kernel.org/r/161549387469.25025.12859568843576080076.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Gerry Morong Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Martin Wilck Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 75fbeacca3ad30835e903002dba98dd909b4dfff Author: Kevin Barnett Date: Thu Mar 11 14:17:48 2021 -0600 scsi: smartpqi: Add new PCI IDs Add support for newer hardware. Link: https://lore.kernel.org/r/161549386882.25025.2594251735886014958.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Acked-by: Martin Wilck Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 43e97ef482eea96698af5cde99c9d55bbefe225d Author: Kevin Barnett Date: Thu Mar 11 14:17:42 2021 -0600 scsi: smartpqi: Correct system hangs when resuming from hibernation Correct system hangs when resuming from hibernation after first successful hibernation/resume cycle. Rare condition involving OFA. Note: Suspend/resume is not supported on many platforms. It was originally intended for workstations. Link: https://lore.kernel.org/r/161549386295.25025.14555840632114761610.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit d0cba99fd7a3781a78f751cfd4f4e3ff4d0b1ea3 Author: Murthy Bhat Date: Thu Mar 11 14:17:37 2021 -0600 scsi: smartpqi: Update enclosure identifier in sysfs Update enclosure identifier field corresponding to physical devices in lsscsi/sysfs. During device add the SCSI devtype is filled in during slave_configure(). However, when pqi_scsi_update_device() runs (REGNEWD) the firmware returns zero for the SCSI devtype field, and valid devtype is overwritten by zero. Due to this, lsscsi output shows wrong values. Link: https://lore.kernel.org/r/161549385708.25025.17234953506918043750.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 18ff5f0877be9bf45079691939d2ff7af6e437ae Author: Kevin Barnett Date: Thu Mar 11 14:17:31 2021 -0600 scsi: smartpqi: Add additional logging for LUN resets LUN resets can take longer to complete. Adding in more driver logging helps show where the driver is in the reset process. Add a timeout in pqi_device_wait_for_pending_io() to cap how long the driver will wait for outstanding commands. Link: https://lore.kernel.org/r/161549385119.25025.10366493975709358647.stgit@brunhilda Reviewed-by: Mahesh Rajashekhara Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 55732a46d6c5289fb555bbdbff9c7222efd983c1 Author: Murthy Bhat Date: Thu Mar 11 14:17:25 2021 -0600 scsi: smartpqi: Update SAS initiator_port_protocols and target_port_protocols Export valid sas initiator_port_protocols and target_port_protocols to sysfs. Needed for lsscsi to show correct values. Link: https://lore.kernel.org/r/161549384532.25025.1469409935400845385.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Martin Wilck Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit ec504b23df9d33260602affc50389cf070707c9b Author: Murthy Bhat Date: Thu Mar 11 14:17:19 2021 -0600 scsi: smartpqi: Add phy ID support for the physical drives Display topology using PHY numbers. PHY (both local and remote) numbers corresponding to physical drives are read from BMIC_IDENTIFY_PHYSICAL_DEVICE. Link: https://lore.kernel.org/r/161549383947.25025.16977895345376485056.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Martin Wilck Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit a425625277a10dcb039ac05b90202d4f54f824ad Author: Kevin Barnett Date: Thu Mar 11 14:17:13 2021 -0600 scsi: smartpqi: Convert snprintf() to scnprintf() The entire Linux kernel has been slowly migrating from snprintf() to scnprintf(), so we are doing our part. This article explains the rationale for this change: https: //lwn.net/Articles/69419/ Link: https://lore.kernel.org/r/161549383357.25025.12363435617789964291.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Martin Wilck Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 3268b8a8cf77dbc1f84e9a328069144506636c87 Author: Kevin Barnett Date: Thu Mar 11 14:17:07 2021 -0600 scsi: smartpqi: Fix driver synchronization issues - Synchronize OFA and controller offline events. Prevent I/O during the above conditions. - Cleanup pqi_device_wait_for_pending_io() by checking the device->scsi_cmds_outstanding instead of walking the device's list of commands. - Stop failing all I/O for all devices. This was causing OS to retry them, delaying OFA. - Clean up cache flush. The controller is checked for offline status in lower level functions. Link: https://lore.kernel.org/r/161549382770.25025.789855864026860170.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 66f1c2b40270b759eb070990ebd5c8f94244360f Author: Kevin Barnett Date: Thu Mar 11 14:17:01 2021 -0600 scsi: smartpqi: Update device scan operations Change return type from EINPROGRESS to EBUSY to signal applications to retry a REGNEWD if the driver cannot process the REGNEWD. Events such as OFA, suspend, and shutdown return EINPROGRESS if a scan is currently running. This prevents applications from immediately retrying REGNEWD. Schedule a new REGNEWD if system low on memory. Link: https://lore.kernel.org/r/161549382157.25025.16054784597622125373.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 2790cd4d3f6ac5a761b0e3851fce2e75490b5051 Author: Kevin Barnett Date: Thu Mar 11 14:16:55 2021 -0600 scsi: smartpqi: Update OFA management OFA, Online Firmware Activation, allows users to update firmware without a reboot. - Change OFA setup to a worker thread - Delay soft resets - Add OFA event handler to allow FW to initiate OFA - Add in-memory allocation to OFA events - Update OFA buffer size calculations - Add ability to cancel OFA events - Update OFA quiesce/un-quiesce - Prevent Kernel crashes while issuing ioctl during OFA - Returned EBUSY for pass-through IOCTLs throughout all stages of OFA - Add mutex to prevent parallel OFA updates. Link: https://lore.kernel.org/r/161549381563.25025.2647205502550052197.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 5be9db069d3faac584bec6db6ca98e699abf199e Author: Kevin Barnett Date: Thu Mar 11 14:16:49 2021 -0600 scsi: smartpqi: Update RAID bypass handling Simplify AIO retry management by removing retry list and list management. Need to retry is already set in the response status. Also remove the bypass worker thread. Accelerated I/O requests bypass the RAID engine and go directly to either an HBA disk or to a physical component of a RAID volume. Link: https://lore.kernel.org/r/161549380976.25025.11776487034357231156.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 9fa8202336096d124a8433d67c6d1deb59b1a0d5 Author: Kevin Barnett Date: Thu Mar 11 14:16:44 2021 -0600 scsi: smartpqi: Update suspend/resume and shutdown For suspend/resume and shutdown prevent: Controller events, any new I/O requests, controller requests, REGNEWD, and reset operations. Wait for any pending completions from the controller to complete to avoid controller NMI events. Link: https://lore.kernel.org/r/161549380398.25025.12266769502766103580.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 37f3318199ce31122c389bafb092ee72a6123d9d Author: Kevin Barnett Date: Thu Mar 11 14:16:38 2021 -0600 scsi: smartpqi: Synchronize device resets with mutex Remove some flags used to check for device resets already in progress. Allow only 1 reset operation at a time for the host. Link: https://lore.kernel.org/r/161549379810.25025.10194117431886743795.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 4ccc354bac14b03e13c1d20131fe6d5a8e2c2c45 Author: Kevin Barnett Date: Thu Mar 11 14:16:32 2021 -0600 scsi: smartpqi: Update soft reset management for OFA Cleanup soft reset code for Online Firmware Activation (OFA). OFA allows controller firmware updates without a reboot. OFA updates require an on-line controller reset to activate the updated firmware. There were some missing actions for some of the reset cases. The controller is first set back to sis mode before returning to pqi mode. Check to ensure the controller is in sis mode. Release QRM memory (OFA buffer) on OFA error conditions. Clean up controller state which can cause a kernel panic upon reboot after an unsuccessful OFA. Link: https://lore.kernel.org/r/161549379215.25025.10654441314249183621.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 06b41e0d1800a33a54e23c6e7b98e7ecc6a9fd78 Author: Kevin Barnett Date: Thu Mar 11 14:16:26 2021 -0600 scsi: smartpqi: Update event handler Change the data types for event_id and additional_event_id. Link: https://lore.kernel.org/r/161549378628.25025.14338046567871170916.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 7a84a821f194bb1e509219c80efcbff2b4d47e45 Author: Kevin Barnett Date: Thu Mar 11 14:16:20 2021 -0600 scsi: smartpqi: Add support for wwid WWID has been added to Report Physical LUNs in newer controller firmware. The presence of this field is detected by a feature bit. Add detection of this new feature and store the WWID when set. Link: https://lore.kernel.org/r/161549378041.25025.3869709982357729841.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit ae0c189db4f1f763b3b1e9190bed06f81ad668fd Author: Kevin Barnett Date: Thu Mar 11 14:16:14 2021 -0600 scsi: smartpqi: Remove timeouts from internal cmds Remove timeouts for driver-initiated commands. Responses to internal requests can take longer than hard coded timeout values and the driver will still have an outstanding request that may complete in the future with no context. Link: https://lore.kernel.org/r/161549377451.25025.12306492868851801623.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 99a12b487f19618f7a857281a7a80930f7c503e3 Author: Kevin Barnett Date: Thu Mar 11 14:16:08 2021 -0600 scsi: smartpqi: Disable WRITE SAME for HBA NVMe disks Controller does not support SCSI WRITE SAME for NVMe drives in HBA mode Link: https://lore.kernel.org/r/161549376866.25025.5961694654342018260.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Martin Wilck Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 5be746d7d74b0f40128ac6f1d1ba30bc05770beb Author: Don Brace Date: Thu Mar 11 14:16:02 2021 -0600 scsi: smartpqi: Add host level stream detection enable Allow R5/R6 stream detection to be disabled/enabled using sysfs entry enable_stream_detection. Example usage: lsscsi [2:2:0:0] storage Adaptec 3258P-32i /e 0010 ^ | +---- NOTE: here host is host2 find /sys -name \*enable_stream\* /sys/devices/pci0000:36/0000:36:00.0/0000:37:00.0/0000:38:00.0/0000:39:00.0/host2/scsi_host/host2/enable_stream_detection /sys/devices/pci0000:5b/0000:5b:00.0/0000:5c:00.0/host3/scsi_host/host3/enable_stream_detection Current stream detection: cat /sys/devices/pci0000:36/0000:36:00.0/0000:37:00.0/0000:38:00.0/0000:39:00.0/host2/scsi_host/host2/enable_stream_detection 1 Turn off stream detection: echo 0 > /sys/devices/pci0000:36/0000:36:00.0/0000:37:00.0/0000:38:00.0/0000:39:00.0/host2/scsi_host/host2/enable_stream_detection Turn on stream detection: echo 1 > /sys/devices/pci0000:36/0000:36:00.0/0000:37:00.0/0000:38:00.0/0000:39:00.0/host2/scsi_host/host2/enable_stream_detection Link: https://lore.kernel.org/r/161549376281.25025.1132304698441513738.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Martin Wilck Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit c7ffedb3a774a835450a518566639254534e72c4 Author: Don Brace Date: Thu Mar 11 14:15:56 2021 -0600 scsi: smartpqi: Add stream detection Enhance performance by adding sequential stream detection for RAID5/RAID6 sequential write requests. Reduce stripe lock contention with full-stripe write operations. There is one common stripe lock for each RAID volume that can be set by either the RAID engine or the AIO engine. The AIO path has I/O request sizes well below the stripe size resulting in many Read-Modify-Write operations. Sending the request to the RAID engine allows for coalescing requests into full stripe operations resulting in reduced Read-Modify-Write operations. Link: https://lore.kernel.org/r/161549375693.25025.2962141451773219796.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 583891c9e509256a2b2902607c2e7a7c36beb0d3 Author: Kevin Barnett Date: Thu Mar 11 14:15:50 2021 -0600 scsi: smartpqi: Align code with oob driver Reduce differences between out-of-box driver and kernel.org driver. No functional changes. Link: https://lore.kernel.org/r/161549375094.25025.9268879575316758510.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 598bef8d79421117b49642ef2b7cb65a73e186c1 Author: Kevin Barnett Date: Thu Mar 11 14:15:45 2021 -0600 scsi: smartpqi: Add support for long firmware version Add support for new "long" firmware version which requires minor driver changes to expose. Link: https://lore.kernel.org/r/161549374508.25025.15467221395888158022.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit f6cc2a774aa7f5469f381b52804bb244d4f8f4d7 Author: Kevin Barnett Date: Thu Mar 11 14:15:39 2021 -0600 scsi: smartpqi: Add support for BMIC sense feature cmd and feature bits Determine support for supported features from BMIC sense feature command instead of config table. Enable features such as: RAID 1/5/6 write support, SATA wwid, and encryption. Link: https://lore.kernel.org/r/161549373914.25025.7999816178098103135.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Scott Benesh Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 7a012c23c7a7d9cdc7b6db0e8837f8a413dbe436 Author: Don Brace Date: Thu Mar 11 14:15:33 2021 -0600 scsi: smartpqi: Add support for RAID1 writes Add RAID1 write IU and implement RAID1 write support. Change brand names ADM/ADG to TRIPLE/RAID-6. Link: https://lore.kernel.org/r/161549373324.25025.2441592111049564780.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 6702d2c40f31b200d90614d1b0a841f14ba22ee0 Author: Don Brace Date: Thu Mar 11 14:15:27 2021 -0600 scsi: smartpqi: Add support for RAID5 and RAID6 writes Add in new IU definition and implement support for RAID5 and RAID6 writes. Link: https://lore.kernel.org/r/161549372734.25025.963261942897080281.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 1a22bc4bee22b15e933ef4c51a426b6f376d336a Author: Don Brace Date: Thu Mar 11 14:15:21 2021 -0600 scsi: smartpqi: Refactor scatterlist code Factor out code common to all scatter-gather list building to prepare for new AIO functionality. AIO (Accelerated I/O) requests go directly to disk No functional changes. Link: https://lore.kernel.org/r/161549372147.25025.9706613054649682229.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Martin Wilck Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 281a817f232e2f580665e8a45fce1a43899d3007 Author: Don Brace Date: Thu Mar 11 14:15:15 2021 -0600 scsi: smartpqi: Refactor aio submission code Refactor aio submission code: 1. Break up function pqi_raid_bypass_submit_scsi_cmd() into smaller functions. 2. Add common block (rmd - raid_map_data) to carry around into newly added functions. 3. Prepare for new AIO functionality. No functional changes. Link: https://lore.kernel.org/r/161549371553.25025.8840958689316611074.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Kevin Barnett Reviewed-by: Martin Wilck Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 2708a25643abaf24b7edb553afd09a1eb5d4081f Author: Kevin Barnett Date: Thu Mar 11 14:15:09 2021 -0600 scsi: smartpqi: Add support for new product ids Add support for newer hardware by adding in a product identifier. This identifier can then be used to check for the hardware generation. Link: https://lore.kernel.org/r/161549370966.25025.2968242206975557607.stgit@brunhilda Reviewed-by: Scott Benesh Reviewed-by: Mike McGowen Reviewed-by: Scott Teel Reviewed-by: Martin Wilck Signed-off-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit b622a601a13ae5974c5b0aeecb990c224b8db0d9 Author: Murthy Bhat Date: Thu Mar 11 14:15:03 2021 -0600 scsi: smartpqi: Correct request leakage during reset operations While failing queued I/Os in TMF path, there was a request leak and hence stale entries in request pool with ref count being non-zero. In shutdown path we have a BUG_ON to catch stuck I/O either in firmware or in the driver. The stale requests caused a system crash. The I/O request pool leakage also lead to a significant performance drop. Link: https://lore.kernel.org/r/161549370379.25025.12793264112620796062.stgit@brunhilda Reviewed-by: Scott Teel Reviewed-by: Scott Benesh Reviewed-by: Kevin Barnett Signed-off-by: Murthy Bhat Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit c6d3ee209b9e863c6251f72101511340451ca324 Author: Don Brace Date: Thu Mar 11 14:14:57 2021 -0600 scsi: smartpqi: Use host-wide tag space Correct SCSI midlayer sending more requests than exposed host queue depth causing firmware ASSERT and lockup issues by enabling host-wide tags. Note: This also results in better performance. Link: https://lore.kernel.org/r/161549369787.25025.8975999483518581619.stgit@brunhilda Suggested-by: Ming Lei Suggested-by: John Garry Reviewed-by: Scott Benesh Reviewed-by: Scott Teel Reviewed-by: Mike McGowen Reviewed-by: Kevin Barnett Signed-off-by: Don Brace Signed-off-by: Martin K. Petersen commit 556666bce111b2a758010c2a2a6bab7f3770f4de Merge: 4e2e619f3c9e3 9e67600ed6b85 Author: Martin K. Petersen Date: Mon Apr 5 22:57:29 2021 -0400 Merge branch '5.12/scsi-fixes' into 5.13/scsi-staging Pull 5.12/scsi-fixes into the 5.13 SCSI tree to provide a baseline for some UFS changes that would otherwise cause conflicts during the merge. Signed-off-by: Martin K. Petersen commit d556435156b7970b8ce61b355df558a5168927cc Author: Arnd Bergmann Date: Mon Mar 22 11:21:38 2021 +0100 jbd2: avoid -Wempty-body warnings Building with 'make W=1' shows a harmless -Wempty-body warning: fs/jbd2/recovery.c: In function 'fc_do_one_pass': fs/jbd2/recovery.c:267:75: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 267 | jbd_debug(3, "Fast commit replay failed, err = %d\n", err); | ^ Change the empty dprintk() macros to no_printk(), which avoids this warning and adds format string checking. Signed-off-by: Arnd Bergmann Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210322102152.95684-1-arnd@kernel.org Signed-off-by: Theodore Ts'o commit 1ae98e295fa2577fb5e492200c58d10230e00e99 Author: Daniel Rosenberg Date: Fri Mar 19 07:34:14 2021 +0000 ext4: optimize match for casefolded encrypted dirs Matching names with casefolded encrypting directories requires decrypting entries to confirm case since we are case preserving. We can avoid needing to decrypt if our hash values don't match. Signed-off-by: Daniel Rosenberg Link: https://lore.kernel.org/r/20210319073414.1381041-3-drosen@google.com Signed-off-by: Theodore Ts'o commit 471fbbea7ff7061b2d6474665cb5a2ceb4fd6500 Author: Daniel Rosenberg Date: Fri Mar 19 07:34:13 2021 +0000 ext4: handle casefolding with encryption This adds support for encryption with casefolding. Since the name on disk is case preserving, and also encrypted, we can no longer just recompute the hash on the fly. Additionally, to avoid leaking extra information from the hash of the unencrypted name, we use siphash via an fscrypt v2 policy. The hash is stored at the end of the directory entry for all entries inside of an encrypted and casefolded directory apart from those that deal with '.' and '..'. This way, the change is backwards compatible with existing ext4 filesystems. [ Changed to advertise this feature via the file: /sys/fs/ext4/features/encrypted_casefold -- TYT ] Signed-off-by: Daniel Rosenberg Reviewed-by: Andreas Dilger Link: https://lore.kernel.org/r/20210319073414.1381041-2-drosen@google.com Signed-off-by: Theodore Ts'o commit a78a51a851ed3edc83264a67e2ba77a34f27965f Author: Russ Weight Date: Mon Apr 5 16:52:59 2021 -0700 fpga: dfl: pci: add DID for D5005 PAC cards This patch adds the approved PCI Express Device IDs for the PF and VF for the card for D5005 PAC cards. Signed-off-by: Russ Weight Signed-off-by: Matthew Gerlach Signed-off-by: Moritz Fischer commit 727d93ed3ba67307a82c3ac5ebc7e335265e8b9e Author: Christian Hewitt Date: Fri Apr 2 06:45:21 2021 +0000 arm64: dts: meson: add initial device-tree for MeCool KIII Pro MeCool (Videostrong) KIII Pro is based on the Amlogic Q200 reference board with an S912 chip and the following specs: - 3GB DDR3 RAM - 16GB eMMC - 10/100/1000 Base-T Ethernet - BCM4335 Wireless (802.11 b/g/n/ac, BT 4.0) - DVB-C/T/T2/S/S2 (AVL6862TA demod + R912 tuner) - HDMI 2.0a video - S/PDIF optical output - CVBS/Analogue output - 4x USB 2.0 ports - IR receiver - 1x Power button (with integrated blue LED) - 1x Update/Reset button (underside) - 1x micro SD card slot Tested-by: Drazen Spio Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210402064521.30579-4-christianshewitt@gmail.com commit d5454e7ce24a28bd22beb2fc02f1571b5748dfbb Author: Christian Hewitt Date: Fri Apr 2 06:45:20 2021 +0000 arm64: dts: meson: add initial device-tree for MeCool KII Pro MeCool (Videostrong) KII Pro is based on the Amlogic P230 reference board with an S905D chip and the following specs: - 2GB DDR3 RAM - 16GB eMMC - 10/100 Base-T Ethernet - BCM4335 Wireless (802.11 b/g/n/ac, BT 4.0) - DVB-C/T/T2/S/S2 (AVL6862TA demod + R848 tuner) - HDMI 2.0a video - S/PDIF optical output - CVBS/Analogue output - 4x USB 2.0 ports - IR receiver - 1x Power button (with integrated blue LED) - 1x micro SD card slot Tested-by: Drazen Spio Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210402064521.30579-3-christianshewitt@gmail.com commit 0bbfea7c0469cbe0914c1800b70f607ed7638870 Author: Christian Hewitt Date: Fri Apr 2 06:45:19 2021 +0000 dt-bindings: arm: amlogic: add MeCool KII/KIII Pro bindings Add the board bindings for the MeCool (Videostrong Technology Co., Ltd) KII-Pro (S905D) and KIII-Pro (S912) devices. Signed-off-by: Christian Hewitt Acked-by: Rob Herring Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210402064521.30579-2-christianshewitt@gmail.com commit db3685b4046f8b629bbf73caa33751ce567ea8ff Author: Florian Westphal Date: Thu Apr 1 16:11:14 2021 +0200 net: remove obsolete members from struct net all have been moved to generic_net infra. On x86_64, this reduces struct net size from 70 to 63 cache lines (4480 to 4032 byte). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 1379940bf809ba643eb10950c932f72d0191aa43 Author: Florian Westphal Date: Thu Apr 1 16:11:13 2021 +0200 netfilter: conntrack: move ecache dwork to net_generic infra dwork struct is large (>128 byte) and not needed when conntrack module is not loaded. Place it in net_generic data instead. The struct net dwork member is now obsolete and will be removed in a followup patch. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7b5974709faf7628a036d3f0f14d4f403f536eac Author: Florian Westphal Date: Thu Apr 1 16:11:12 2021 +0200 netfilter: conntrack: move sysctl pointer to net_generic infra No need to keep this in struct net, place it in the net_generic data. The sysctl pointer is removed from struct net in a followup patch. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 1d610d4d31a8ed36d57f88108331edc7585570b7 Author: Florian Westphal Date: Thu Apr 1 16:11:11 2021 +0200 netfilter: x_tables: move known table lists to net_generic infra Will reduce struct net size by 208 bytes. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0854db2aaef3fcdd3498a9d299c60adea2aa3dc6 Author: Florian Westphal Date: Thu Apr 1 16:11:10 2021 +0200 netfilter: nf_tables: use net_generic infra for transaction data This moves all nf_tables pernet data from struct net to a net_generic extension, with the exception of the gencursor. The latter is used in the data path and also outside of the nf_tables core. All others are only used from the configuration plane. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 5b53951cfc85329d29df9d07b1e905f4563546a5 Author: Florian Westphal Date: Thu Apr 1 16:11:09 2021 +0200 netfilter: ebtables: use net_generic infra ebtables currently uses net->xt.tables[BRIDGE], but upcoming patch will move net->xt.tables away from struct net. To avoid exposing x_tables internals to ebtables, use a private list instead. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 7b1957b04956bfd8ea0280bf84a724e5cd0a7f44 Author: Florian Westphal Date: Thu Apr 1 16:11:08 2021 +0200 netfilter: nf_defrag_ipv4: use net_generic infra This allows followup patch to remove the defrag_ipv4 member from struct net. It also allows to auto-remove the hooks later on by adding a _disable() function. This will be done later in a follow patch series. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 8b0adbe3e38dbe5aae9edf6f5159ffdca7cfbdf1 Author: Florian Westphal Date: Thu Apr 1 16:11:07 2021 +0200 netfilter: nf_defrag_ipv6: use net_generic infra This allows followup patch to remove these members from struct net. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit ebfbe67568a734a449203097b02c4ab884257535 Author: Florian Westphal Date: Thu Apr 1 16:11:06 2021 +0200 netfilter: cttimeout: use net_generic infra reduce size of struct net and make this self-contained. The member in struct net is kept to minimize changes to struct net layout, it will be removed in a separate patch. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 1be05ea766d763c52b99edf258dfe8bd1d054697 Author: Florian Westphal Date: Thu Apr 1 16:11:05 2021 +0200 netfilter: nfnetlink: use net_generic infra No need to place it in struct net, nfnetlink is a module and usage doesn't occur in fastpath. Also remove rcu usage: Not a single reader of net->nfnl uses rcu accessors. When exit_batch callbacks are executed the net namespace is already dead so no calls to these functions are possible anymore (else we'd get NULL deref crash too). If the module is removed, then modules that call any of those functions have been removed too so no calls to nfnl functions are possible either. The nfnl and nfl_stash pointers in struct net are no longer used, they will be removed in a followup patch to minimize changes to struct net (causes rebuild for entire network stack). Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 237c609f8744a8d5415f40a7ee731957934b0eef Author: Florian Westphal Date: Thu Apr 1 16:11:04 2021 +0200 netfilter: nfnetlink: add and use nfnetlink_broadcast This removes the only reference of net->nfnl outside of the nfnetlink module. This allows to move net->nfnl to net_generic infra. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit cc0626c2aaed8e475efdd85fa374b497a7192e35 Author: Krzysztof Kozlowski Date: Mon Apr 5 20:15:48 2021 +0200 net: smsc911x: skip acpi_device_id table when !CONFIG_ACPI The driver can match via multiple methods. Its acpi_device_id table is referenced via ACPI_PTR() so it will be unused for !CONFIG_ACPI builds: drivers/net/ethernet/smsc/smsc911x.c:2652:36: warning: ‘smsc911x_acpi_match’ defined but not used [-Wunused-const-variable=] Signed-off-by: Krzysztof Kozlowski Signed-off-by: David S. Miller commit d392ecd1bc29ae15b0e284d5f732c2d36f244271 Author: Salil Mehta Date: Mon Apr 5 18:28:25 2021 +0100 net: hns3: Limiting the scope of vector_ring_chain variable Limiting the scope of the variable vector_ring_chain to the block where it is used. Fixes: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC") Signed-off-by: Salil Mehta Signed-off-by: David S. Miller commit eeb85a14ee3494febb85ccfbee0772eda0823b13 Author: Andrei Vagin Date: Mon Apr 5 00:12:23 2021 -0700 net: Allow to specify ifindex when device is moved to another namespace Currently, we can specify ifindex on link creation. This change allows to specify ifindex when a device is moved to another network namespace. Even now, a device ifindex can be changed if there is another device with the same ifindex in the target namespace. So this change doesn't introduce completely new behavior, it adds more control to the process. CRIU users want to restore containers with pre-created network devices. A user will provide network devices and instructions where they have to be restored, then CRIU will restore network namespaces and move devices into them. The problem is that devices have to be restored with the same indexes that they have before C/R. Cc: Alexander Mikhalitsyn Suggested-by: Christian Brauner Signed-off-by: Andrei Vagin Reviewed-by: Christian Brauner Signed-off-by: David S. Miller commit 40357058f859563149c976fe90728436d6795227 Author: Wolfram Sang Date: Wed Mar 31 09:51:41 2021 +0200 i2c: tegra-bpmp: make some functions void They return 0 always, so save some lines and code. Signed-off-by: Wolfram Sang Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Wolfram Sang commit 22e06b30f94c9b014dfba029d84395542e274885 Author: Wolfram Sang Date: Wed Mar 31 09:51:40 2021 +0200 i2c: tegra-bpmp: don't modify input variable in xlate_flags Since commit bc1c2048abbe ("i2c: bpmp-tegra: Ignore unknown I2C_M flags") we don't need to mask out flags and can keep the input variable as is to save quite some lines. Signed-off-by: Wolfram Sang Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Wolfram Sang commit fd6ddaa0f50a1d5235989262ef666713d2903678 Author: Andy Shevchenko Date: Wed Mar 31 13:46:22 2021 +0300 i2c: drivers: Use generic definitions for bus frequencies (part 2) Since we have generic definitions for bus frequencies, let's use them. Signed-off-by: Andy Shevchenko Acked-by: Khalil Blaiech Reviewed-by: Robert Foss Signed-off-by: Wolfram Sang commit 17631e8ca2d3421090e54b39d9a1402091019ba1 Author: Sanket Goswami Date: Wed Mar 31 19:37:30 2021 +0530 i2c: designware: Add driver support for AMD NAVI GPU The Latest AMD NAVI GPU card has an integrated Type-C controller and Designware I2C with PCI Interface. The PD controller for USB Type-C can be accessed over I2C. The client driver is part of the USB Type-C UCSI driver. Also, there exists a couple of notable IP limitations that are dealt as workarounds: - I2C transaction work on a polling mode as IP does not generate interrupt. - I2C read command sent twice to address the IP issues. - AMD NAVI GPU based products are already in the commercial market, hence some of the I2C parameters are statically programmed as they can not be part of the ACPI table. Reviewed-by: Shyam Sundar S K Co-developed-by: Nehal Bakulchandra Shah Signed-off-by: Nehal Bakulchandra Shah Signed-off-by: Sanket Goswami Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang commit 4a7695429eade517b07ea72f9ec366130e81a076 Author: Bence Csókás Date: Wed Mar 31 19:19:21 2021 +0000 i2c: cp2615: add i2c driver for Silicon Labs' CP2615 Digital Audio Bridge Create an i2c_adapter for CP2615's I2C master interface Signed-off-by: Bence Csókás [wsa: switched to '__packed', added some 'static' and an include] Signed-off-by: Wolfram Sang commit aca01415e076aa96cca0f801f4420ee5c10c660d Author: Bence Csókás Date: Wed Mar 31 19:19:20 2021 +0000 i2c: Add I2C_AQ_NO_REP_START adapter quirk This quirk signifies that the adapter cannot do a repeated START, it always issues a STOP condition after transfers. Suggested-by: Wolfram Sang Signed-off-by: Bence Csókás Signed-off-by: Wolfram Sang commit d3295869c40cb69a2c599000009b3fde43cec2ec Author: Zheng Yongjun Date: Mon Apr 5 18:54:35 2021 +0800 net: nfc: Fix spelling errors in net/nfc module These patches fix a series of spelling errors in net/nfc module. Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 85d091a794f883ea19b421c38e158558f9b24b60 Author: Wu XiangCheng Date: Sun Apr 4 22:23:15 2021 +0800 tipc: Fix a kernel-doc warning in name_table.c Fix kernel-doc warning: Documentation/networking/tipc:66: /home/sfr/next/next/net/tipc/name_table.c :558: WARNING: Unexpected indentation. Documentation/networking/tipc:66: /home/sfr/next/next/net/tipc/name_table.c :559: WARNING: Block quote ends without a blank line; unexpected unindent. Due to blank line missing. Fixes: 908148bc5046 ("tipc: refactor tipc_sendmsg() and tipc_lookup_anycast()") Reported-by: Stephen Rothwell Link: https://lore.kernel.org/netdev/20210318172255.63185609@canb.auug.org.au/ Signed-off-by: Wu XiangCheng Signed-off-by: David S. Miller commit 4b4b84468aa27d0a18be8cb727f246aa35a3406d Author: Taehee Yoo Date: Sun Apr 4 13:38:23 2021 +0000 mld: change lockdep annotation for ip6_sf_socklist and ipv6_mc_socklist struct ip6_sf_socklist and ipv6_mc_socklist are per-socket MLD data. These data are protected by rtnl lock, socket lock, and RCU. So, when these are used, it verifies whether rtnl lock is acquired or not. ip6_mc_msfget() is called by do_ipv6_getsockopt(). But caller doesn't acquire rtnl lock. So, when these data are used in the ip6_mc_msfget() lockdep warns about it. But accessing these is actually safe because socket lock was acquired by do_ipv6_getsockopt(). So, it changes lockdep annotation from rtnl lock to socket lock. (rtnl_dereference -> sock_dereference) Locking graph for mld data is like below: When writing mld data: do_ipv6_setsockopt() rtnl_lock lock_sock (mld functions) idev->mc_lock(if per-interface mld data is modified) When reading mld data: do_ipv6_getsockopt() lock_sock ip6_mc_msfget() Splat looks like: ============================= WARNING: suspicious RCU usage 5.12.0-rc4+ #503 Not tainted ----------------------------- net/ipv6/mcast.c:610 suspicious rcu_dereference_protected() usage! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 1 lock held by mcast-listener-/923: #0: ffff888007958a70 (sk_lock-AF_INET6){+.+.}-{0:0}, at: ipv6_get_msfilter+0xaf/0x190 stack backtrace: CPU: 1 PID: 923 Comm: mcast-listener- Not tainted 5.12.0-rc4+ #503 Call Trace: dump_stack+0xa4/0xe5 ip6_mc_msfget+0x553/0x6c0 ? ipv6_sock_mc_join_ssm+0x10/0x10 ? lockdep_hardirqs_on_prepare+0x3e0/0x3e0 ? mark_held_locks+0xb7/0x120 ? lockdep_hardirqs_on_prepare+0x27c/0x3e0 ? __local_bh_enable_ip+0xa5/0xf0 ? lock_sock_nested+0x82/0xf0 ipv6_get_msfilter+0xc3/0x190 ? compat_ipv6_get_msfilter+0x300/0x300 ? lock_downgrade+0x690/0x690 do_ipv6_getsockopt.isra.6.constprop.13+0x1809/0x29e0 ? do_ipv6_mcast_group_source+0x150/0x150 ? register_lock_class+0x1750/0x1750 ? kvm_sched_clock_read+0x14/0x30 ? sched_clock+0x5/0x10 ? sched_clock_cpu+0x18/0x170 ? find_held_lock+0x3a/0x1c0 ? lock_downgrade+0x690/0x690 ? ipv6_getsockopt+0xdb/0x1b0 ipv6_getsockopt+0xdb/0x1b0 [ ... ] Fixes: 88e2ca308094 ("mld: convert ifmcaddr6 to RCU") Reported-by: Eric Dumazet Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 7190e9d8e13164cdc38241095edcc392ed32f3ea Author: Christophe JAILLET Date: Sun Apr 4 14:42:57 2021 +0200 qede: Use 'skb_add_rx_frag()' instead of hand coding it Some lines of code can be merged into an equivalent 'skb_add_rx_frag()' call which is less verbose. Signed-off-by: Christophe JAILLET Acked-by: Manish Chopra Signed-off-by: David S. Miller commit 1ec3d02f9cdf2a4b89664145c7965aa46398d31e Author: Christophe JAILLET Date: Sun Apr 4 14:42:44 2021 +0200 qede: Remove a erroneous ++ in 'qede_rx_build_jumbo()' This ++ is confusing. It looks duplicated with the one already performed in 'skb_fill_page_desc()'. In fact, it is harmless. 'nr_frags' is written twice with the same value. Once, because of the nr_frags++, and once because of the 'nr_frags = i + 1' in 'skb_fill_page_desc()'. So axe this post-increment to avoid confusion. Signed-off-by: Christophe JAILLET Acked-by: Manish Chopra Signed-off-by: David S. Miller commit c438a801e0bb2a4db1d3183a9482af891577a281 Author: Christophe JAILLET Date: Sun Apr 4 11:45:11 2021 +0200 sfc: Use 'skb_add_rx_frag()' instead of hand coding it Some lines of code can be merged into an equivalent 'skb_add_rx_frag()' call which is less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit c3105f8485775943b2ccde09c7163510c161c965 Author: Christophe JAILLET Date: Sun Apr 4 10:54:37 2021 +0200 ibmvnic: Use 'skb_frag_address()' instead of hand coding it 'page_address(skb_frag_page()) + skb_frag_off()' can be replaced by an equivalent 'skb_frag_address()' which is less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 0282bc6ae86d84b035afac792b5d5ff67707cdd2 Author: Christophe JAILLET Date: Sun Apr 4 08:33:44 2021 +0200 net: ag71xx: Slightly simplify 'ag71xx_rx_packets()' There is no need to use 'list_for_each_entry_safe' here, as nothing is removed from the list in the 'for' loop. Use 'list_for_each_entry' instead, it is slightly less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit 514e1150da9cd8d7978d990a353636cf1a7a87c2 Author: Xie He Date: Fri Apr 2 02:30:00 2021 -0700 net: x25: Queue received packets in the drivers instead of per-CPU queues X.25 Layer 3 (the Packet Layer) expects layer 2 to provide a reliable datalink service such that no packets are reordered or dropped. And X.25 Layer 2 (the LAPB layer) is indeed designed to provide such service. However, this reliability is not preserved when a driver calls "netif_rx" to deliver the received packets to layer 3, because "netif_rx" will put the packets into per-CPU queues before they are delivered to layer 3. If there are multiple CPUs, the order of the packets may not be preserved. The per-CPU queues may also drop packets if there are too many. Therefore, we should not call "netif_rx" to let it queue the packets. Instead, we should use our own queue that won't reorder or drop packets. This patch changes all X.25 drivers to use their own queues instead of calling "netif_rx". The patch also documents this requirement in the "x25-iface" documentation. Cc: Martin Schiller Signed-off-by: Xie He Signed-off-by: David S. Miller commit 3f9b72f6a180cef8da4ef87ef54f0b7a545a5580 Author: Anshuman Khandual Date: Mon Apr 5 17:42:51 2021 +0100 arm64: Add TRBE definitions This adds TRBE related registers and corresponding feature macros. Cc: Mathieu Poirier Cc: Mike Leach Cc: Suzuki K Poulose Reviewed-by: Mike Leach Acked-by: Catalin Marinas Signed-off-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-5-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit be96826942e8f82acef9902058d1b5e3edb83990 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:50 2021 +0100 arm64: Add support for trace synchronization barrier tsb csync synchronizes the trace operation of instructions. The instruction is a nop when FEAT_TRF is not implemented. Cc: Mathieu Poirier Cc: Mike Leach Cc: Catalin Marinas Cc: Will Deacon Acked-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-4-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 7dde51767ca5339ed33109056d92fdca05d56d8d Author: Suzuki K Poulose Date: Mon Apr 5 17:42:49 2021 +0100 perf: aux: Add CoreSight PMU buffer formats CoreSight PMU supports aux-buffer for the ETM tracing. The trace generated by the ETM (associated with individual CPUs, like Intel PT) is captured by a separate IP (CoreSight TMC-ETR/ETF until now). The TMC-ETR applies formatting of the raw ETM trace data, as it can collect traces from multiple ETMs, with the TraceID to indicate the source of a given trace packet. Arm Trace Buffer Extension is new "sink" IP, attached to individual CPUs and thus do not provide additional formatting, like TMC-ETR. Additionally, a system could have both TRBE *and* TMC-ETR for the trace collection. e.g, TMC-ETR could be used as a single trace buffer to collect data from multiple ETMs to correlate the traces from different CPUs. It is possible to have a perf session where some events end up collecting the trace in TMC-ETR while the others in TRBE. Thus we need a way to identify the type of the trace for each AUX record. Define the trace formats exported by the CoreSight PMU. We don't define the flags following the "ETM" as this information is available to the user when issuing the session. What is missing is the additional formatting applied by the "sink" which is decided at the runtime and the user may not have a control on. So we define : - CORESIGHT format (indicates the Frame format) - RAW format (indicates the format of the source) The default value is CORESIGHT format for all the records (i,e == 0). Add the RAW format for others that use raw format. Cc: Peter Zijlstra Cc: Mike Leach Cc: Mathieu Poirier Cc: Leo Yan Cc: Anshuman Khandual Reviewed-by: Mike Leach Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-3-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 547b60988e631f74ed025cf1ec50cfc17f49fd13 Author: Suzuki K Poulose Date: Mon Apr 5 17:42:48 2021 +0100 perf: aux: Add flags for the buffer format Allocate a byte for advertising the PMU specific format type of the given AUX record. A PMU could end up providing hardware trace data in multiple format in a single session. e.g, The format of hardware buffer produced by CoreSight ETM PMU depends on the type of the "sink" device used for collection for an event (Traditional TMC-ETR/Bs with formatting or TRBEs without any formatting). # Boring story of why this is needed. Goto The_End_of_Story for skipping. CoreSight ETM trace allows instruction level tracing of Arm CPUs. The ETM generates the CPU excecution trace and pumps it into CoreSight AMBA Trace Bus and is collected by a different CoreSight component (traditionally CoreSight TMC-ETR /ETB/ETF), called "sink". Important to note that there is no guarantee that every CPU has a dedicated sink. Thus multiple ETMs could pump the trace data into the same "sink" and thus they apply additional formatting of the trace data for the user to decode it properly and attribute the trace data to the corresponding ETM. However, with the introduction of Arm Trace buffer Extensions (TRBE), we now have a dedicated per-CPU architected sink for collecting the trace. Since the TRBE is always per-CPU, it doesn't apply any formatting of the trace. The support for this driver is under review [1]. Now a system could have a per-cpu TRBE and one or more shared TMC-ETRs on the system. A user could choose a "specific" sink for a perf session (e.g, a TMC-ETR) or the driver could automatically select the nearest sink for a given ETM. It is possible that some ETMs could end up using TMC-ETR (e.g, if the TRBE is not usable on the CPU) while the others using TRBE in a single perf session. Thus we now have "formatted" trace collected from TMC-ETR and "unformatted" trace collected from TRBE. However, we don't get into a situation where a single event could end up using TMC-ETR & TRBE. i.e, any AUX buffer is guaranteed to be either RAW or FORMATTED, but not a mix of both. As for perf decoding, we need to know the type of the data in the individual AUX buffers, so that it can set up the "OpenCSD" (library for decoding CoreSight trace) decoder instance appropriately. Thus the perf.data file must conatin the hints for the tool to decode the data correctly. Since this is a runtime variable, and perf tool doesn't have a control on what sink gets used (in case of automatic sink selection), we need this information made available from the PMU driver for each AUX record. # The_End_of_Story Cc: Peter Ziljstra Cc: alexander.shishkin@linux.intel.com Cc: mingo@redhat.com Cc: will@kernel.org Cc: mark.rutland@arm.com Cc: mike.leach@linaro.org Cc: acme@kernel.org Cc: jolsa@redhat.com Cc: Mathieu Poirier Reviewed by: Mike Leach Acked-by: Peter Ziljstra Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20210405164307.1720226-2-suzuki.poulose@arm.com Signed-off-by: Mathieu Poirier commit 04722cec1436c732d39153ce6ae2ebf71ac3ade7 Author: Ricardo Rivera-Matos Date: Wed Feb 10 16:56:46 2021 -0600 power: supply: bq25980: Move props from battery node Currently POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT and POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE are exposed on the battery node and this is incorrect. This patch exposes both of them on the charger node rather than the battery node. Fixes: 5069185fc18e ("power: supply: bq25980: Add support for the BQ259xx family") Signed-off-by: Ricardo Rivera-Matos Signed-off-by: Sebastian Reichel commit 25dcca7fedcd4e31cb368ad846bfd738c0c6307c Author: gexueyuan Date: Wed Mar 31 11:10:56 2021 +0800 memory: pl353: fix mask of ECC page_size config register The mask for page size of ECC Configuration Register should be 0x3, according to the datasheet of PL353 smc. Fixes: fee10bd22678 ("memory: pl353: Add driver for arm pl353 static memory controller") Signed-off-by: gexueyuan Link: https://lore.kernel.org/r/20210331031056.5326-1-gexueyuan@gmail.com Signed-off-by: Krzysztof Kozlowski commit 1e1032b0c4afaed7739a6681ff6b4cb120b82994 Author: Hengqi Chen Date: Mon Apr 5 12:01:19 2021 +0800 libbpf: Fix KERNEL_VERSION macro Add missing ')' for KERNEL_VERSION macro. Signed-off-by: Hengqi Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210405040119.802188-1-hengqi.chen@gmail.com commit beab450d8ea93cdf4c6cb7714bdc31a9e0f34738 Author: Trond Myklebust Date: Fri Mar 26 16:23:39 2021 -0400 NFS: Fix fscache invalidation in nfs_set_cache_invalid() Ensure that we invalidate the fscache before we strip the NFS_INO_INVALID_DATA flag. Signed-off-by: Trond Myklebust commit b876d708316bf9b6b9678eb2beb289b93cfe6369 Author: Trond Myklebust Date: Wed Mar 24 15:32:21 2021 -0400 NFS: fix nfs_fetch_iversion() The change attribute is always set by all NFS client versions so get rid of the open-coded version. Fixes: 3cc55f4434b4 ("nfs: use change attribute for NFS re-exports") Signed-off-by: Trond Myklebust commit 98b5cee37389b899de044bc4aac56e6ff33dbd4d Author: Benjamin Coddington Date: Mon Mar 22 14:37:01 2021 -0400 SUNRPC: Ensure the transport backchannel association If the server sends CB_ calls on a connection that is not associated with the backchannel, refuse to process the call and shut down the connection. This avoids a NULL dereference crash in xprt_complete_bc_request(). There's not much more we can do in this situation unless we want to look into allowing all connections to be associated with the fore and back channel. Signed-off-by: Benjamin Coddington Signed-off-by: Trond Myklebust commit c9301cb35b59ad7d733a7332f3aefd4da1382468 Author: Eryu Guan Date: Tue Mar 23 10:57:13 2021 +0800 nfs: hornor timeo and retrans option when mounting NFSv3 Mounting NFSv3 uses default timeout parameters specified by underlying sunrpc transport, and mount options like 'timeo' and 'retrans', unlike NFSv4, are not honored. But sometimes we want to set non-default timeout value when mounting NFSv3, so pass 'timeo' and 'retrans' to nfs_mount() and fill the 'timeout' field of struct rpc_create_args before creating RPC connection. This is also consistent with NFSv4 behavior. Note that this only sets the timeout value of rpc connection to mountd, but the timeout of rpcbind connection should be set as well. A later patch will fix the rpcbind part. Signed-off-by: Eryu Guan Signed-off-by: Trond Myklebust commit 6b996476f364009e9be43e98f5bca11e5ec95b2d Author: Eryu Guan Date: Mon Mar 22 13:29:04 2021 +0800 sunrpc: honor rpc_task's timeout value in rpcb_create() Currently rpcbind client is created without setting rpc timeout (thus using the default value). But if the rpc_task already has a customized timeout in its tk_client field, it's also ignored. Let's use the same timeout setting in rpc_task->tk_client->cl_timeout for rpcbind connection. Signed-off-by: Eryu Guan Signed-off-by: Trond Myklebust commit 90ff57bf4df2825ace0f61befdc3f87c79838ec2 Author: Trond Myklebust Date: Tue Mar 30 09:01:50 2021 -0400 NFS: Fix up the support for CONFIG_NFS_DISABLE_UDP_SUPPORT Rather than removing the support in nfs_init_timeout_values(), we should just fix up the validation checks in the mount option parsers. Signed-off-by: Trond Myklebust commit c2508730d6bb62196783b3de28a09782c97d4365 Author: Bhaskar Chowdhury Date: Mon Mar 15 06:54:10 2021 +0530 nfs: Fix a typo in the file nfs42xattr.c s/attribues/attributes/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Trond Myklebust commit c09f11ef35955785f92369e25819bf0629df2e59 Author: Randy Dunlap Date: Mon Mar 1 16:19:30 2021 -0800 NFS: fs_context: validate UDP retrans to prevent shift out-of-bounds Fix shift out-of-bounds in xprt_calc_majortimeo(). This is caused by a garbage timeout (retrans) mount option being passed to nfs mount, in this case from syzkaller. If the protocol is XPRT_TRANSPORT_UDP, then 'retrans' is a shift value for a 64-bit long integer, so 'retrans' cannot be >= 64. If it is >= 64, fail the mount and return an error. Fixes: 9954bf92c0cd ("NFS: Move mount parameterisation bits into their own file") Reported-by: syzbot+ba2e91df8f74809417fa@syzkaller.appspotmail.com Reported-by: syzbot+f3a0fa110fd630ab56c8@syzkaller.appspotmail.com Signed-off-by: Randy Dunlap Cc: Trond Myklebust Cc: Anna Schumaker Cc: linux-nfs@vger.kernel.org Cc: David Howells Cc: Al Viro Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust commit f892c41c14e0fa3d78ce37de1d5c8161ed13bf08 Author: Trond Myklebust Date: Wed Mar 17 08:46:19 2021 -0400 NFS: Only change the cookie verifier if the directory page cache is empty The cached NFSv3/v4 readdir cookies are associated with a verifier, which is checked by the server on subsequent calls to readdir, and is only expected to change when the cookies (and hence also the page cache contents) are considered invalid. We therefore do have to store the verifier, but only when the page cache is empty. Fixes: b593c09f83a2 ("NFS: Improve handling of directory verifiers") Signed-off-by: Trond Myklebust commit 13884ff2bef01df37c450c6dd09122f92333dccc Author: Trond Myklebust Date: Tue Mar 16 07:57:40 2021 -0400 NFS: Fix handling of cookie verifier in uncached_readdir() If we're doing uncached readdir(), then the readdir cookie could be different from the one cached in the nfs_inode. We should therefore ensure that we save that one in the struct nfs_open_dir_context. Fixes: 35df59d3ef69 ("NFS: Reduce number of RPC calls when doing uncached readdir") Signed-off-by: Trond Myklebust commit ee3707ae2c1f1327ad5188836b7ab62ed2c93b28 Author: Nagendra S Tomar Date: Tue Mar 16 10:25:14 2021 +0000 nfs: Subsequent READDIR calls should carry non-zero cookieverifier If the loop in nfs_readdir_xdr_to_array() runs more than once, subsequent READDIR RPCs may wrongly carry a zero cookie verifier and non-zero cookie. Make sure subsequent calls to READDIR carry the cookie verifier returned by the first call. Signed-off-by: Nagendra S Tomar Fixes: b593c09f83a2 ("NFS: Improve handling of directory verifiers") Signed-off-by: Trond Myklebust commit 6453bcd0d8bd67fce9e0f566250caf864b5032f6 Author: Trond Myklebust Date: Thu Mar 4 20:29:50 2021 -0500 NFS: Fix up incorrect documentation Signed-off-by: Trond Myklebust commit d737e5d418706abf32f6de68c3e09958516d422f Author: Trond Myklebust Date: Tue Feb 9 16:04:15 2021 -0500 SUNRPC: Set TCP_CORK until the transmit queue is empty When we have multiple RPC requests queued up, it makes sense to set the TCP_CORK option while the transmit queue is non-empty. Signed-off-by: Trond Myklebust commit 86438186a7b372728c74055d441549e17915cddb Author: Trond Myklebust Date: Tue Feb 2 14:22:51 2021 -0500 NFSv4: Simplify nfs4_retry_setlk() Simplify the code that retries locks based on notification events. Signed-off-by: Trond Myklebust commit 5dc33592e95534dc8455ce3e9baaaf3dae0fff82 Author: Tetsuo Handa Date: Mon Apr 5 20:33:57 2021 +0900 lockdep: Allow tuning tracing capacity constants. Since syzkaller continues various test cases until the kernel crashes, syzkaller tends to examine more locking dependencies than normal systems. As a result, syzbot is reporting that the fuzz testing was terminated due to hitting upper limits lockdep can track [1] [2] [3]. Since analysis via /proc/lockdep* did not show any obvious culprit [4] [5], we have no choice but allow tuning tracing capacity constants. [1] https://syzkaller.appspot.com/bug?id=3d97ba93fb3566000c1c59691ea427370d33ea1b [2] https://syzkaller.appspot.com/bug?id=381cb436fe60dc03d7fd2a092b46d7f09542a72a [3] https://syzkaller.appspot.com/bug?id=a588183ac34c1437fc0785e8f220e88282e5a29f [4] https://lkml.kernel.org/r/4b8f7a57-fa20-47bd-48a0-ae35d860f233@i-love.sakura.ne.jp [5] https://lkml.kernel.org/r/1c351187-253b-2d49-acaf-4563c63ae7d2@i-love.sakura.ne.jp References: https://lkml.kernel.org/r/1595640639-9310-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Dmitry Vyukov commit 6e11b376fd74356e32d842be588e12dc9bf6e197 Author: Andy Shevchenko Date: Mon Mar 29 18:12:07 2021 +0300 media: ipu3-cio2: Switch to use SOFTWARE_NODE_REFERENCE() This is useful to assign software node reference with arguments in a common way. Switch to use SOFTWARE_NODE_REFERENCE() here. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210329151207.36619-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit e588fead04ec51ad9ede7010676de19dcaa50b71 Author: Andy Shevchenko Date: Mon Mar 29 18:12:06 2021 +0300 software node: Introduce SOFTWARE_NODE_REFERENCE() helper macro This is useful to assign software node reference with arguments in a common way. Moreover, we have already couple of users that may be converted. And by the fact, one of them is moved right here to use the helper. Tested-by: Daniel Scally Reviewed-by: Daniel Scally Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210329151207.36619-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4a32e384e899ad0cdf2d11560840220fcb6a3b3b Author: Andy Shevchenko Date: Mon Mar 29 18:12:05 2021 +0300 software node: Imply kobj_to_swnode() to be no-op Since we don't use structure field layout randomization the manual shuffling can affect some macros, in particular kobj_to_swnode(), which becomes a no-op when kobj member is the first one in the struct swnode. Bloat-o-meter statistics for swnode.o: add/remove: 0/0 grow/shrink: 2/10 up/down: 9/-100 (-91) Total: Before=7217, After=7126, chg -1.26% Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210329151207.36619-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 73c9342656fa610c2358ea7b867187104647f497 Author: Andy Shevchenko Date: Mon Mar 29 18:12:04 2021 +0300 software node: Deduplicate code in fwnode_create_software_node() Deduplicate conditional and assignment in fwnode_create_software_node(), i.e. parent is checked in two out of three cases and parent software node is assigned by to_swnode() call. Reviewed-by: Daniel Scally Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210329151207.36619-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 06ad93c328dcebdc13df5ec6dc8a5142f4a3f1da Author: Andy Shevchenko Date: Mon Mar 29 18:12:03 2021 +0300 software node: Introduce software_node_alloc()/software_node_free() Introduce software_node_alloc() and software_node_free() helpers. This will help with code readability and maintenance. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210329151207.36619-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3f6b6536a73fad0c2c82db1672fc500cc15ff551 Author: Andy Shevchenko Date: Mon Mar 29 18:12:02 2021 +0300 software node: Free resources explicitly when swnode_register() fails Currently we have a slightly twisted logic in swnode_register(). It frees resources that it doesn't allocate on error path and in once case it relies on the ->release() implementation. Untwist the logic by freeing resources explicitly when swnode_register() fails. Currently it happens only in fwnode_create_software_node(). Tested-by: Daniel Scally Reviewed-by: Daniel Scally Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210329151207.36619-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c8a9c285f136f0cc65ac8328cd1710b155ad3df8 Author: Rasmus Villemoes Date: Fri Mar 26 16:14:11 2021 +0100 debugfs: drop pointless nul-termination in debugfs_read_file_bool() simple_read_from_buffer() doesn't care about any bytes in the buffer beyond "available". Making the buffer nul-terminated is therefore completely pointless. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20210326151411.732220-1-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit 72a91f192da032b68519fafaecce03fd002d669a Author: Ahmad Fatoum Date: Tue Mar 23 16:37:13 2021 +0100 driver core: add helper for deferred probe reason setting We now have three places within the same file doing the same operation of freeing this pointer and setting it anew. A helper makes this arguably easier to read, so add one. Reviewed-by: Andy Shevchenko Reviewed-by: Andrzej Hajda Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20210323153714.25120-2-a.fatoum@pengutronix.de Signed-off-by: Greg Kroah-Hartman commit 177260a705a9c45efa55345881724208421f7f3e Author: Gustavo Pimentel Date: Mon Mar 29 13:17:48 2021 +0200 docs: ABI: Add sysfs documentation interface of dw-xdata-pcie driver This patch describes the sysfs interface implemented on the dw-xdata-pcie driver. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/438c4ca9f6cc9e1cb29a65c0d2cca9a3d3f181b1.1617016509.git.gustavo.pimentel@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 49917294ab29bc0d06177049955eceb3ee53c1c6 Author: Gustavo Pimentel Date: Mon Mar 29 13:17:47 2021 +0200 MAINTAINERS: Add Synopsys xData IP driver maintainer Add Synopsys xData IP driver maintainer. This driver aims to support Synopsys xData IP and is normally distributed along with Synopsys PCIe EndPoint IP as a PCIe traffic generator (depends of the use and licensing agreement). Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/c8fb9af0ba8c86c5cf8afbfc0eb07fc99a642270.1617016509.git.gustavo.pimentel@synopsys.com Signed-off-by: Greg Kroah-Hartman commit e1181b5bbc3c3b6a16a0a80a870279ad1dccfeea Author: Gustavo Pimentel Date: Mon Mar 29 13:17:46 2021 +0200 Documentation: misc-devices: Add Documentation for dw-xdata-pcie driver Add Documentation for dw-xdata-pcie driver. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/764b9bf744d7fe20c7a216019eef8ddf482c1bd7.1617016509.git.gustavo.pimentel@synopsys.com Signed-off-by: Greg Kroah-Hartman commit e8a30eef6ef6da4998fcdaaffaaf8d29777c5d7d Author: Gustavo Pimentel Date: Mon Mar 29 13:17:45 2021 +0200 misc: Add Synopsys DesignWare xData IP driver Add Synopsys DesignWare xData IP driver. This driver enables/disables the PCI traffic generator module pertain to the Synopsys DesignWare prototype. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/daa1efe23850e77d6807dc3f371728fc0b7548b8.1617016509.git.gustavo.pimentel@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 2509555070acb863920b3c89bb678e1a2c7d0c00 Merge: 25faa935f9e0b ee0975c3089e1 Author: Sebastian Reichel Date: Mon Apr 5 12:38:08 2021 +0200 Merge tag 'ib-mfd-power-v5.13' into psy-next Immutable branch between MFD and Power due for the v5.13 merge window. Signed-off-by: Sebastian Reichel commit 001c6bb6b62656e29e3b353242b5c955a1d94212 Author: Dom Cobley Date: Fri Apr 2 16:28:08 2021 +0200 staging: bcm2835-pcm: Allow up to 8 channels and 192kHz data rate The firmware driver can support this, so allow it to be selected Increase the buffer sizes to handle the higher data rates. Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Dom Cobley Signed-off-by: Stefan Wahren Link: https://lore.kernel.org/r/1617373688-8715-1-git-send-email-stefan.wahren@i2se.com Signed-off-by: Greg Kroah-Hartman commit b2192cfeba8481224da0a4ec3b4a7ccd80b1623b Author: Tetsuo Handa Date: Fri Apr 2 21:17:42 2021 +0900 misc: vmw_vmci: explicitly initialize vmci_datagram payload KMSAN complains that vmci_check_host_caps() left the payload part of check_msg uninitialized. ===================================================== BUG: KMSAN: uninit-value in kmsan_check_memory+0xd/0x10 CPU: 1 PID: 1 Comm: swapper/0 Tainted: G B 5.11.0-rc7+ #4 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/27/2020 Call Trace: dump_stack+0x21c/0x280 kmsan_report+0xfb/0x1e0 kmsan_internal_check_memory+0x202/0x520 kmsan_check_memory+0xd/0x10 iowrite8_rep+0x86/0x380 vmci_guest_probe_device+0xf0b/0x1e70 pci_device_probe+0xab3/0xe70 really_probe+0xd16/0x24d0 driver_probe_device+0x29d/0x3a0 device_driver_attach+0x25a/0x490 __driver_attach+0x78c/0x840 bus_for_each_dev+0x210/0x340 driver_attach+0x89/0xb0 bus_add_driver+0x677/0xc40 driver_register+0x485/0x8e0 __pci_register_driver+0x1ff/0x350 vmci_guest_init+0x3e/0x41 vmci_drv_init+0x1d6/0x43f do_one_initcall+0x39c/0x9a0 do_initcall_level+0x1d7/0x259 do_initcalls+0x127/0x1cb do_basic_setup+0x33/0x36 kernel_init_freeable+0x29a/0x3ed kernel_init+0x1f/0x840 ret_from_fork+0x1f/0x30 Uninit was created at: kmsan_internal_poison_shadow+0x5c/0xf0 kmsan_slab_alloc+0x8d/0xe0 kmem_cache_alloc+0x84f/0xe30 vmci_guest_probe_device+0xd11/0x1e70 pci_device_probe+0xab3/0xe70 really_probe+0xd16/0x24d0 driver_probe_device+0x29d/0x3a0 device_driver_attach+0x25a/0x490 __driver_attach+0x78c/0x840 bus_for_each_dev+0x210/0x340 driver_attach+0x89/0xb0 bus_add_driver+0x677/0xc40 driver_register+0x485/0x8e0 __pci_register_driver+0x1ff/0x350 vmci_guest_init+0x3e/0x41 vmci_drv_init+0x1d6/0x43f do_one_initcall+0x39c/0x9a0 do_initcall_level+0x1d7/0x259 do_initcalls+0x127/0x1cb do_basic_setup+0x33/0x36 kernel_init_freeable+0x29a/0x3ed kernel_init+0x1f/0x840 ret_from_fork+0x1f/0x30 Bytes 28-31 of 36 are uninitialized Memory access of size 36 starts at ffff8881675e5f00 ===================================================== Fixes: 1f166439917b69d3 ("VMCI: guest side driver implementation.") Cc: Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/20210402121742.3917-2-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit 376565b9717c30cd58ad33860fa42697615fa2e4 Author: Tetsuo Handa Date: Fri Apr 2 21:17:41 2021 +0900 misc: vmw_vmci: explicitly initialize vmci_notify_bm_set_msg struct KMSAN complains that the vmci_use_ppn64() == false path in vmci_dbell_register_notification_bitmap() left upper 32bits of bitmap_set_msg.bitmap_ppn64 member uninitialized. ===================================================== BUG: KMSAN: uninit-value in kmsan_check_memory+0xd/0x10 CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.11.0-rc7+ #4 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 02/27/2020 Call Trace: dump_stack+0x21c/0x280 kmsan_report+0xfb/0x1e0 kmsan_internal_check_memory+0x484/0x520 kmsan_check_memory+0xd/0x10 iowrite8_rep+0x86/0x380 vmci_send_datagram+0x150/0x280 vmci_dbell_register_notification_bitmap+0x133/0x1e0 vmci_guest_probe_device+0xcab/0x1e70 pci_device_probe+0xab3/0xe70 really_probe+0xd16/0x24d0 driver_probe_device+0x29d/0x3a0 device_driver_attach+0x25a/0x490 __driver_attach+0x78c/0x840 bus_for_each_dev+0x210/0x340 driver_attach+0x89/0xb0 bus_add_driver+0x677/0xc40 driver_register+0x485/0x8e0 __pci_register_driver+0x1ff/0x350 vmci_guest_init+0x3e/0x41 vmci_drv_init+0x1d6/0x43f do_one_initcall+0x39c/0x9a0 do_initcall_level+0x1d7/0x259 do_initcalls+0x127/0x1cb do_basic_setup+0x33/0x36 kernel_init_freeable+0x29a/0x3ed kernel_init+0x1f/0x840 ret_from_fork+0x1f/0x30 Local variable ----bitmap_set_msg@vmci_dbell_register_notification_bitmap created at: vmci_dbell_register_notification_bitmap+0x50/0x1e0 vmci_dbell_register_notification_bitmap+0x50/0x1e0 Bytes 28-31 of 32 are uninitialized Memory access of size 32 starts at ffff88810098f570 ===================================================== Fixes: 83e2ec765be03e8a ("VMCI: doorbell implementation.") Cc: Signed-off-by: Tetsuo Handa Link: https://lore.kernel.org/r/20210402121742.3917-1-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Greg Kroah-Hartman commit 9ebd42d8088f7a3cd2e3c1f571465d9c19dc87bb Author: Fabio Aiuto Date: Sun Apr 4 16:09:46 2021 +0200 staging: rtl8723bs: add spaces around operators in core/rtw_ieee80211.c fix post-commit hook checkpatch issues: CHECK: spaces preferred around that '+' (ctx:VxV) 161: FILE: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:648: + *wpa_len = in_ie[cnt+1]+2; ^ CHECK: spaces preferred around that '+' (ctx:VxV) 161: FILE: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:648: + *wpa_len = in_ie[cnt+1]+2; ^ CHECK: spaces preferred around that '+' (ctx:VxV) 162: FILE: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:649: + cnt += in_ie[cnt+1]+2; /* get next */ ^ CHECK: spaces preferred around that '+' (ctx:VxV) 162: FILE: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:649: + cnt += in_ie[cnt+1]+2; /* get next */ ^ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1b5ee3d974c336e20f034d5de449fc29967a6213.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4b85a20356ecccd069a9be5c488e9589acc07db4 Author: Fabio Aiuto Date: Sun Apr 4 16:09:45 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_ieee80211.c Remove all of the RT_TRACE logs in the core/rtw_ieee80211.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f9985fe00edc78b06682aaa9e1a4cb0bdcbbd384.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7ca5754301ef7a43405ded201c3bf17935593576 Author: Fabio Aiuto Date: Sun Apr 4 16:09:44 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_sta_mgt.c Remove all of the RT_TRACE logs in the core/rtw_sta_mgt.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/155cff4252d13a4eefe12a397e1623fb9ab46f15.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3cebd89515ea6bfe8ba585f9cbc11af0c2bd16f3 Author: Fabio Aiuto Date: Sun Apr 4 16:09:43 2021 +0200 staging: rtl8723bs: remove all RT_TRACE logs in core/rtw_wlan_util.c Remove all of the RT_TRACE logs in the core/rtw_wlan_util.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/406adfd834b55ea5694dfb3c33c36fe0754edbb3.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 433426f21b1b6924b3a1da3c4f89e5e6ccfd0222 Author: Fabio Aiuto Date: Sun Apr 4 16:09:42 2021 +0200 staging: rtl8723bs: place constant on the right side of the test in core/rtw_ioctl_set.c fix posst-commit hook checkpatch issues: WARNING: Comparisons should place the constant on the right side of the test 40: FILE: drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:71: + if (_SUCCESS != ret) WARNING: Comparisons should place the constant on the right side of the test 69: FILE: drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:122: + if (_SUCCESS != ret) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3c701cacd71a6bb0f59242fc3a987f72dabb93e2.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b4bb8a0c0e84238aabff880677cf89276b9ef2fc Author: Fabio Aiuto Date: Sun Apr 4 16:09:41 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_ioctl_set.c Remove all of the RT_TRACE logs in the core/rtw_ioctl_set.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/70a88973cd1475275a725522930dfb575739908b.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ffaedcecc0207755d08d28b40c479251c2b001ca Author: Fabio Aiuto Date: Sun Apr 4 16:09:40 2021 +0200 staging: rtl8723bs: remove commented RT_TRACE call in core/rtw_ioctl_set.c Remove commented RT_TRACE call in core/rtw_ioctl_set.c Remove all of the RT_TRACE logs in the core/rtw_ioctl_set.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/aae1227b56fb75c0b221a46b612aa4aeb6460feb.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0dfb2de7bd68e49a5003c73d50b8f285bbec89ee Author: Fabio Aiuto Date: Sun Apr 4 16:09:39 2021 +0200 staging: rtl8723bs: fix comparison in if condition in core/rtw_recv.c fix post-commit checkpatch issue: CHECK: Using comparison to false is error prone 27: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:381: + if (psecuritypriv-> bcheck_grpkey == false && and fix the same issue in second comparison to true inside the same if condition IS_MCAST(prxattrib->ra) == true ^^^^^^^ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4b363edbc2da36cb3c63edbcd43e3285754768c9.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4e7157733a27087388458e4ed6700b92e19bcd89 Author: Fabio Aiuto Date: Sun Apr 4 16:09:38 2021 +0200 staging: rtl8723bs: remove unnecessary parentheses in core/rtw_recv.c fix post-commit checkpatch issue: CHECK: Unnecessary parentheses around 'psecuritypriv->bcheck_grpkey == false' 24: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:381: + if ((psecuritypriv-> bcheck_grpkey == false) && + (IS_MCAST(prxattrib->ra) == true)) and fix same issue on second comparison (IS_MCAST(prxattrib->ra) == true) ^ ^ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/eab39c58913d799dc90efb8b234c2a7fdb61ba57.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1f96ef45f5c50fd2240884de321356bff37c142d Author: Fabio Aiuto Date: Sun Apr 4 16:09:37 2021 +0200 staging: rtl8723bs: split long line in core/rtw_recv.c fix post-commit hook checkpatch issue: WARNING: line length of 113 exceeds 100 columns 110: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:381: + if ((psecuritypriv->bcheck_grpkey == false) && (IS_MCAST(prxattrib->ra) == true)) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ac256752eddba7678e8305cb5e560969dec482de.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 052b7b909d19aee90b3474bf1499897c0a56141f Author: Fabio Aiuto Date: Sun Apr 4 16:09:36 2021 +0200 staging: rtl8723bs: added spaces around operator in core/rtw_recv.c fix post-commit hook checkpatch issue: CHECK: spaces preferred around that '+' (ctx:VxV) 60: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:359: + if (miccode[i] != *(pframemic+i)) ^ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6202df1b5383aa0a66810358495c2b1c9dd6c189.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 760a6677c9ad006b8f241c5b2ec874badf2dc8e3 Author: Fabio Aiuto Date: Sun Apr 4 16:09:35 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_recv.c Remove all of the RT_TRACE logs in the core/rtw_recv.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c4a5d7cc3a1e7c5a13622b277ee34042c34981bd.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit dfe138c98c1a2d69cd8a2b8f44bfd620b079d767 Author: Fabio Aiuto Date: Sun Apr 4 16:09:34 2021 +0200 staging: rtl8723bs: remove commented RT_TRACE calls in core/rtw_recv.c Remove commented RT_TRACE calls Remove all of the RT_TRACE logs in the core/rtw_recv.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6986ce9c7bb0e9560d9463281973e1858347a966.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0ac666f83c31389e433712171ff95937a8071eb6 Author: Fabio Aiuto Date: Sun Apr 4 16:09:33 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_mlme_ext.c Remove all of the RT_TRACE logs in the core/rtw_mlme_ext.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4f838d1ce3cd16fab8f05d1e0f80c2e7469701b8.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ecd20f1b1e2f42195ee226fb059b62eca255e7d0 Author: Fabio Aiuto Date: Sun Apr 4 16:09:32 2021 +0200 staging: rtl8723bs: tidy up some error handling in core/rtw_mlme.c the RT_TRACE() output is not useful so we want to delete it. In this case there is no cleanup for rtw_cleanbss_cmd() required or even possible. I've deleted the RT_TRACE() output and added a goto unlock to show that we can't continue if rtw_createbss_cmd() fails. Suggested-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6affc9dd905f7c94a93bbd0fa706bc9026103c2e.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a8f74a8261111e0e1e3faad7247a84fa5d0a95f7 Author: Fabio Aiuto Date: Sun Apr 4 16:09:31 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_mlme.c Remove all of the RT_TRACE logs in the core/rtw_mlme.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/19cc25a51af207e68a95e76ce384a3f7b7d2c408.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1f7e6f0a2e91a6406ae388af09d31dc8f441bc4c Author: Fabio Aiuto Date: Sun Apr 4 16:09:30 2021 +0200 staging: rtl8723bs: remove commented RT_TRACE calls in core/rtw_mlme.c Remove commented RT_TRACE calls in core/rtw_mlme.c Remove all of the RT_TRACE logs in the core/rtw_mlme.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/09862e8783366045a08fd97523595710a08df918.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b7fd07b6617fed9c415db4fd57679748b1d4cbdb Author: Fabio Aiuto Date: Sun Apr 4 16:09:29 2021 +0200 staging: rtl8723bs: remove unnecessary parentheses in if condition in core/rtw_cmd.c fix post-commit hook checkpatch issue: WARNING: Unnecessary parentheses 166: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2000: + if ((pcmd->res != H2C_SUCCESS)) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/04aa9d68d6d28d295001dde7cc14f33ef83f8046.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 61e0d09274ec9d146b8ed5a24bb9058edf69db34 Author: Fabio Aiuto Date: Sun Apr 4 16:09:28 2021 +0200 staging: rtl8723bs: fix null check conditions in core/rtw_cmd.c fix post-commit hook checkpatch issues: CHECK: Comparison to NULL could be written "!psta" 178: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2012: + if (psta == NULL) CHECK: Comparison to NULL could be written "!psta" 198: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2066: + if (psta == NULL) CHECK: Comparison to NULL could be written "!psta" 211: FILE: drivers/staging/rtl8723bs/core/rtw_cmd.c:2081: + if (psta == NULL) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/03e36e1710ea4dfd07c3753d9a8df5746e59bc18.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 13aefa65bc6a6364b90a98313b1b2bbea9911613 Author: Fabio Aiuto Date: Sun Apr 4 16:09:27 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_cmd.c Remove all of the RT_TRACE logs in the core/rtw_cmd.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. removed a variable, left unused after RT_TRACE removal Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/6480425f7b4211ff1fe0bad0e8062d63c4ed9af3.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2569996ddaa71481736e8b403f0b3d463c17c6d0 Author: Fabio Aiuto Date: Sun Apr 4 16:09:26 2021 +0200 staging: rtl8723bs: remove unnecessary parentheses in if-condition in core/rtw_pwrctrl.c fix following post-commit hook checkpatch issues: CHECK: Unnecessary parentheses around 'pwrpriv->rpwm == pslv' 26: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:269: + if ((pwrpriv->rpwm == pslv) || + ((pwrpriv->rpwm >= PS_STATE_S2) && (pslv >= PS_STATE_S2))) CHECK: Unnecessary parentheses around 'pwrpriv->rpwm >= PS_STATE_S2' 26: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:269: + if ((pwrpriv->rpwm == pslv) || + ((pwrpriv->rpwm >= PS_STATE_S2) && (pslv >= PS_STATE_S2))) CHECK: Unnecessary parentheses around 'pslv >= PS_STATE_S2' 26: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:269: + if ((pwrpriv->rpwm == pslv) || + ((pwrpriv->rpwm >= PS_STATE_S2) && (pslv >= PS_STATE_S2))) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/d4d1d256586cbdfc55157b0b384b28d53a61c2b8.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 26e8ad5cb666cb941ac305b559fce75940cad4e7 Author: Fabio Aiuto Date: Sun Apr 4 16:09:25 2021 +0200 staging: rtl8723bs: fix logical continuation issue in core/rtw_pwrctrl.c fix following post-commit hook checkpatch issue: CHECK: Logical continuations should be on the previous line 22: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:270: if ((pwrpriv->rpwm == pslv) + || ((pwrpriv->rpwm >= PS_STATE_S2) && (pslv >= PS_STATE_S2))) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ecbd557c645e280a801c34d235559d2d138ec67f.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1c7b5dff5de72c8be8fae8b7ac7ef3fbf389e73c Author: Fabio Aiuto Date: Sun Apr 4 16:09:24 2021 +0200 staging: rtl8723bs: remove all RT_TRACE logs in core/rtw_pwrctrl.c Remove all of the RT_TRACE logs in the core/rtw_pwrctrl.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a842ef8f93c920e52fed1b552968b679ca5e7be6.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e4e729449739650e756da146ec5113a2c0bdd008 Author: Fabio Aiuto Date: Sun Apr 4 16:09:23 2021 +0200 staging: rtl8723bs: fix error prone if conditions in core/rtw_eeprom.c fix the following post-commit hook checkpatch issues: CHECK: Using comparison to true is error prone 21: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:38: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 36: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:50: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 47: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:59: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 60: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:72: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 73: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:83: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 86: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:120: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 93: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:124: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 101: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:129: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 108: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:133: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 121: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:149: + if (padapter->bSurpriseRemoved == true) CHECK: Using comparison to true is error prone 130: FILE: drivers/staging/rtl8723bs/core/rtw_eeprom.c:155: + if (padapter->bSurpriseRemoved == true) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2ffcefe0b2c44cb5d392c4cd095da0f9b754cdc7.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 42c8cd68e5e08fd5ae7c00eb71625a82edb4cc71 Author: Fabio Aiuto Date: Sun Apr 4 16:09:22 2021 +0200 staging: rtl8723bs: remove all RT_TRACE logs in core/rtw_eeprom.c Remove all of the RT_TRACE logs in the core/rtw_eeprom.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e302fadf18a36d8521456858caff641c0f598731.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b365c02997e63ccb3f0beafe866cceedb84365ec Author: Fabio Aiuto Date: Sun Apr 4 16:09:21 2021 +0200 staging: rtl8723bs: fix spaces around operator issues in core/rtw_security.c fix the following post commit hook checkpatch issues: CHECK: spaces preferred around that '-' (ctx:VxV) 25: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:729: + if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || ^ CHECK: spaces preferred around that '-' (ctx:VxV) 25: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:729: + if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || ^ CHECK: spaces preferred around that '-' (ctx:VxV) 26: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:730: + crc[1] != payload[length-3] || crc[0] != payload[length-4]) ^ CHECK: spaces preferred around that '-' (ctx:VxV) 26: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:730: + crc[1] != payload[length-3] || crc[0] != payload[length-4]) ^ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9143a02ae6959d4deae6c22bdba42041bf6484a2.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0e1b6fe2813822117ddd287cf3c3d713a29c0af8 Author: Fabio Aiuto Date: Sun Apr 4 16:09:20 2021 +0200 staging: rtl8723bs: fix line exceed warning in core/rtw_security.c fix the following post-commit hook checkpatch issue: WARNING: line length of 149 exceeds 100 columns 61: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:729: + if (crc[3] != payload[length-1] || crc[2] != payload[length-2] || crc[1] != payload[length-3] || crc[0] != payload[length-4]) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/862862a3e309209e2508de0c9a1b5a02ce1312b2.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a46af2c860c92e7d1d25cdb1254be04e01c89e20 Author: Fabio Aiuto Date: Sun Apr 4 16:09:19 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_security.c Remove all of the RT_TRACE logs in the core/rtw_security.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/14207c2b7ea789e8b0f3bd37d2758e979eff997c.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4c266de05a26b10dd23a9fcae34502aa24364f54 Author: Fabio Aiuto Date: Sun Apr 4 16:09:18 2021 +0200 staging: rtl8723bs: fix condition in if statement in core/rtw_xmit.c fix post-commit hook checkpatch issue: CHECK: Using comparison to true is error prone 71: FILE: drivers/staging/rtl8723bs/core/rtw_xmit.c:565: + ((padapter->securitypriv.sw_encrypt == true) || (psecuritypriv->hw_decrypted == false))) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/45793b555f46312ea3c9cd285886dec22f3a1131.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ab1f66a80906089b5ca4eae9e50c45d761338d01 Author: Fabio Aiuto Date: Sun Apr 4 16:09:17 2021 +0200 staging: rtl8723bs: remove RT_TRACE logs in core/rtw_xmit.c Remove all of the RT_TRACE logs in the core/rtw_xmit.c file as they currently do nothing as they require the code to be modified by hand in order to be turned on. This obviously has not happened since the code was merged. Moreover it relies on an unneeded private log level tracing which overrides the in-kernel public one, so just remove them as they are unused. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c7e5ba68189e4e7ca923741d31908dda7850e45e.1617545239.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c1d0f8534fb53d1438c3ebcb05ab76c01361c839 Author: Xuezhi Zhang Date: Sat Apr 3 14:07:22 2021 +0000 staging: fbtft: convert sysfs snprintf to sysfs_emit Fix the following coccicheck warning: drivers/staging/fbtft//fbtft-sysfs.c:202:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang Link: https://lore.kernel.org/r/20210403140722.169623-1-llyz108@163.com Signed-off-by: Greg Kroah-Hartman commit 75c9fb830de72a4de81cc8ad06c635f3010a090e Author: David Villasana Jiménez Date: Sun Apr 4 17:24:43 2021 -0500 staging: iio: cdc: remove repeated word Fix checkpatch warning: WARNING: Possible repeated word: 'from' Signed-off-by: David Villasana Jiménez Link: https://lore.kernel.org/r/YGo8q4R5dqgtDMlg@fedora Signed-off-by: Greg Kroah-Hartman commit f52def0b5e6f61fbeaaa645a82253cc9e4eed1f6 Author: Deborah Brouwer Date: Sun Apr 4 15:23:49 2021 -0700 staging: rtl8192e: move const after static Move the const after static to conform with kernel preference for static const declaration style instead of static const. Identified by checkpatch: WARNING: Move const after static - use 'static const char'. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/20210404222349.7218-1-deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit c75afdaf2e5340822973b9cd4812addc60c97b11 Author: Zhansaya Bagdauletkyzy Date: Mon Apr 5 02:51:54 2021 +0600 staging: rtl8712: remove extra blank lines Remove extra blank lines to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/d56183614a04590bdf3a6280b7f23664a5bb394c.1617568354.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman commit 69c7ec3b2ba44041d51522675f9d342be441a76a Author: Zhansaya Bagdauletkyzy Date: Mon Apr 5 02:51:52 2021 +0600 staging: rtl8712: add blank lines after declarations Add blank lines after function/struct/union/enum declarations to adhere to Linux kernel coding style. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/ffe2ab70ef3cb73d3d6dd19d88804af7ecb568a2.1617568354.git.zhansayabagdaulet@gmail.com Signed-off-by: Greg Kroah-Hartman commit 25faa935f9e0bd5aba34a820defb982d43bb4a77 Author: Jiapeng Chong Date: Tue Feb 9 17:58:43 2021 +0800 power: supply: core: Use true and false for bool variable Fix the following coccicheck warning: ./include/linux/power_supply.h:507:9-10: WARNING: return of 0/1 in function 'power_supply_is_watt_property' with return type bool. ./include/linux/power_supply.h:479:9-10: WARNING: return of 0/1 in function 'power_supply_is_amp_property' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Sebastian Reichel commit d3361373bdda6e5448e7aa3985c2c684f185ff6f Author: Zhansaya Bagdauletkyzy Date: Sun Apr 4 17:10:55 2021 +0600 staging: sm750fb: Remove unnecessary blank line Remove unnecessary extra blank line to improve readability. Reported by checkpatch. Signed-off-by: Zhansaya Bagdauletkyzy Link: https://lore.kernel.org/r/20210404111055.GA22626@zhans Signed-off-by: Greg Kroah-Hartman commit 015a5273b6500ee307f67ad13ef6e5383182798e Author: Deborah Brouwer Date: Sat Apr 3 15:47:38 2021 -0700 staging: rtl8188eu: core: replace spaces with a tab To conform to Linux kernel coding style, a tab replaces the two spaces that were previously used to indent brackets. Identified by the checkpatch warning: WARNING: please, no spaces at the start of a line. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/20210403224738.28957-1-deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit b79f45e204644da544c60bd017461b584a4c0061 Author: Deborah Brouwer Date: Sat Apr 3 14:09:30 2021 -0700 staging: rtl8188eu: core: add comma within a comment Add a comma to separate repeated words in a comment. The comma preserves the meaning of the comment while also stopping the checkpatch warning: WARNING: Possible repeated word: 'very'. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/20210403210930.17781-1-deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit 570b7c0ea20c0156411394bc215114f7b1dc18ff Author: Roman Kiryanov Date: Fri Feb 5 18:31:18 2021 -0800 power: supply: goldfish: Remove the GOLDFISH dependency This will allow to use the BATTERY_GOLDFISH driver without enabling GOLDFISH. Signed-off-by: Roman Kiryanov Signed-off-by: Sebastian Reichel commit 158e800e0fde91014812f5cdfb92ce812e3a33b4 Author: Annaliese McDermond Date: Mon Mar 29 20:10:49 2021 +0000 sc16is7xx: Defer probe if device read fails A test was added to the probe function to ensure the device was actually connected and working before successfully completing a probe. If the device was actually there, but the I2C bus was not ready yet for whatever reason, the probe fails permanently. Change the probe so that we defer the probe on a regmap read failure so that we try the probe again when the dependent drivers are potentially loaded. This should not affect the case where the device truly isn't present because the probe will never successfully complete. Fixes: 2aa916e67db3 ("sc16is7xx: Read the LSR register for basic device presence check") Cc: stable@vger.kernel.org Signed-off-by: Annaliese McDermond Link: https://lore.kernel.org/r/010101787f9c3fd8-c1815c00-2d6b-4c85-a96a-a13e68597fda-000000@us-west-2.amazonses.com Signed-off-by: Greg Kroah-Hartman commit 3cd66593725a234662955baaf78d2ce5333de56d Author: Martin Devera Date: Sun Mar 28 17:43:06 2021 +0200 tty/serial: Add rx-tx-swap OF option to stm32-usart STM32 F7/H7 usarts supports RX & TX pin swapping. Add option to turn it on. Tested on STM32MP157. Acked-by: Fabrice Gasnier Signed-off-by: Martin Devera Link: https://lore.kernel.org/r/20210328154306.22674-2-devik@eaxlabs.cz Signed-off-by: Greg Kroah-Hartman commit 1b8dc3988dd204aef296047a02364b5ad823f1b4 Author: Martin Devera Date: Sun Mar 28 17:43:05 2021 +0200 dt-bindings: serial: Add rx-tx-swap to stm32-usart Add new rx-tx-swap property to allow for RX & TX pin swapping. Reviewed-by: Rob Herring Acked-by: Fabrice Gasnier Signed-off-by: Martin Devera Link: https://lore.kernel.org/r/20210328154306.22674-1-devik@eaxlabs.cz Signed-off-by: Greg Kroah-Hartman commit 52473b07401891fd963db44ca691ec9ec441546c Author: Marek Czerski Date: Wed Feb 3 22:49:00 2021 +0100 power: reset: ltc2952: make trigger delay configurable Make trigger delay configurable through device tree with trigger-delay-ms property. Trigger delay is the time to wait before starting shutdown sequence after trigger line assertion. Trigger delay must take into account the OFFT time configured with the capacitor connected to OFFT pin of the LTC2952 chip. Basically, the higher the capacitance connected to OFFT pin, the larger trigger delay must be. Signed-off-by: Marek Czerski Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit 816aacd541df8e93f0d2f438b584b6a9560a25c7 Author: Yang Li Date: Fri Jan 29 16:10:12 2021 +0800 power: supply: cpcap-charger: Simplify bool conversion Fix the following coccicheck warning: ./drivers/power/supply/cpcap-charger.c:416:31-36: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Sebastian Reichel commit 3784231b1e091857bd129fd9658a8b3cedbdcd58 Author: Alexander Gordeev Date: Mon Mar 29 18:32:55 2021 +0200 s390/mm: fix phys vs virt confusion in mark_kernel_pXd() functions family Due to historical reasons mark_kernel_pXd() functions misuse the notion of physical vs virtual addresses difference. Signed-off-by: Alexander Gordeev Signed-off-by: Heiko Carstens commit 0cc00c8d40500c4c8fe058dc014bdaf44a82f4f7 Author: Tony Krowiak Date: Thu Mar 25 08:46:40 2021 -0400 s390/vfio-ap: fix circular lockdep when setting/clearing crypto masks This patch fixes a lockdep splat introduced by commit f21916ec4826 ("s390/vfio-ap: clean up vfio_ap resources when KVM pointer invalidated"). The lockdep splat only occurs when starting a Secure Execution guest. Crypto virtualization (vfio_ap) is not yet supported for SE guests; however, in order to avoid this problem when support becomes available, this fix is being provided. The circular locking dependency was introduced when the setting of the masks in the guest's APCB was executed while holding the matrix_dev->lock. While the lock is definitely needed to protect the setting/unsetting of the matrix_mdev->kvm pointer, it is not necessarily critical for setting the masks; so, the matrix_dev->lock will be released while the masks are being set or cleared. Keep in mind, however, that another process that takes the matrix_dev->lock can get control while the masks in the guest's APCB are being set or cleared as a result of the driver being notified that the KVM pointer has been set or unset. This could result in invalid access to the matrix_mdev->kvm pointer by the intervening process. To avoid this scenario, two new fields are being added to the ap_matrix_mdev struct: struct ap_matrix_mdev { ... bool kvm_busy; wait_queue_head_t wait_for_kvm; ... }; The functions that handle notification that the KVM pointer value has been set or cleared will set the kvm_busy flag to true until they are done processing at which time they will set it to false and wake up the tasks on the matrix_mdev->wait_for_kvm wait queue. Functions that require access to matrix_mdev->kvm will sleep on the wait queue until they are awakened at which time they can safely access the matrix_mdev->kvm field. Fixes: f21916ec4826 ("s390/vfio-ap: clean up vfio_ap resources when KVM pointer invalidated") Cc: stable@vger.kernel.org Signed-off-by: Tony Krowiak Signed-off-by: Heiko Carstens commit f38033c8dbc3365da163fece752e903fab7fced3 Author: Wan Jiabing Date: Tue Mar 30 18:56:25 2021 +0800 s390/cio: remove duplicate struct ccw1 declaration struct ccw1 is declared twice. One has been declared at 21st line. Remove the duplicate. Signed-off-by: Wan Jiabing Acked-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 4e774d59e59956c45c02cfcc23f85a26be8d8bea Author: Shixin Liu Date: Mon Mar 29 17:40:19 2021 +0800 s390/cio: use DECLARE_WAIT_QUEUE_HEAD() for wait_queue wait_queue_head_t can be initialized automatically with DECLARE_WAIT_QUEUE_HEAD() rather than explicitly calling init_waitqueue_head(). Signed-off-by: Shixin Liu Acked-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 1034c96c5e28b6a27d058a0e00c968695fcf3bf0 Author: Shixin Liu Date: Mon Mar 29 17:40:18 2021 +0800 s390/cio: use DEFINE_SPINLOCK() for spinlock static spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Shixin Liu Acked-by: Vineeth Vijayan Signed-off-by: Heiko Carstens commit 408f2c9c15682fc21b645fdec1f726492e235c4b Author: Niklas Schnelle Date: Wed Feb 24 11:29:36 2021 +0100 s390/pci: expose UID uniqueness guarantee On s390 each PCI device has a user-defined ID (UID) exposed under /sys/bus/pci/devices//uid. This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the device configured in the hypervisor. To serve as a primary identifier the UID must be unique within the Linux instance, this is guaranteed by the platform if and only if the UID Uniqueness Checking flag is set within the CLP List PCI Functions response. While the UID has been exposed to userspace since commit ac4995b9d570 ("s390/pci: add some new arch specific pci attributes") whether or not the platform guarantees its uniqueness for the lifetime of the Linux instance while defined is not visible from userspace. Remedy this by exposing this as a per device attribute at /sys/bus/pci/devices//uid_is_unique Keeping this a per device attribute allows for maximum flexibility if we ever end up with some devices not having a UID or not enjoying the guaranteed uniqueness. Signed-off-by: Niklas Schnelle Reviewed-by: Viktor Mihajlovski Signed-off-by: Heiko Carstens commit 751faedf06e895a17e985a88ef5b6364ffd797ed Author: Carl Philipp Klemm Date: Sun Jan 17 22:48:53 2021 +0100 power: supply: cpcap-charger: Add usleep to cpcap charger to avoid usb plug bounce Adds 80000 us sleep when the usb cable is plugged in to hopefully avoid bouncing contacts. Upon pluging in the usb cable vbus will bounce for some time, causing cpcap to dissconnect charging due to detecting an undervoltage condition. This is a scope of vbus on xt894 while quickly inserting the usb cable with firm force, probed at the far side of the usb socket and vbus loaded with approx 1k: http://uvos.xyz/maserati/usbplug.jpg. As can clearly be seen, vbus is all over the place for the first 15 ms or so with a small blip at ~40 ms this causes the cpcap to trip up and disable charging again. The delay helps cpcap_usb_detect avoid the worst of this. It is, however, still not ideal as strong vibrations can cause the issue to reapear any time during charging. I have however not been able to cause the device to stop charging due to this in practice as it is hard to vibrate the device such that the vbus pins start bouncing again but cpcap_usb_detect is not called again due to a detected disconnect/reconnect event. Signed-off-by: Carl Philipp Klemm Tested-by: Tony Lindgren Signed-off-by: Sebastian Reichel commit 8a5a0cc13aa927eac7a9eb3ca82dfc1f82cfc28d Author: Carl Philipp Klemm Date: Sun Jan 17 22:47:45 2021 +0100 power: supply: cpcap-charger: fix small mistake in current to register conversion Signed-off-by: Carl Philipp Klemm Acked-by: Tony Lindgren Signed-off-by: Sebastian Reichel commit d46f3e3ed5276e756caf40f760d4902d15c12dcb Author: Saravana Kannan Date: Thu Apr 1 21:03:41 2021 -0700 driver core: Improve fw_devlink & deferred_probe_timeout interaction deferred_probe_timeout kernel commandline parameter allows probing of consumer devices if the supplier devices don't have any drivers. fw_devlink=on will indefintely block probe() calls on a device if all its suppliers haven't probed successfully. This completely skips calls to driver_deferred_probe_check_state() since that's only called when a .probe() function calls framework APIs. So fw_devlink=on breaks deferred_probe_timeout. deferred_probe_timeout in its current state also ignores a lot of information that's now available to the kernel. It assumes all suppliers that haven't probed when the timer expires (or when initcalls are done on a static kernel) will never probe and fails any calls to acquire resources from these unprobed suppliers. However, this assumption by deferred_probe_timeout isn't true under many conditions. For example: - If the consumer happens to be before the supplier in the deferred probe list. - If the supplier itself is waiting on its supplier to probe. This patch fixes both these issues by relaxing device links between devices only if the supplier doesn't have any driver that could match with (NOT bound to) the supplier device. This way, we only fail attempts to acquire resources from suppliers that truly don't have any driver vs suppliers that just happen to not have probed yet. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20210402040342.2944858-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit f70d436f000101876439ce25527a9939628c9518 Author: Heikki Krogerus Date: Thu Apr 1 13:58:43 2021 +0300 usb: typec: Declare the typec_class static This is only to make the handling of the class consistent with the two other susbsystems - the alt mode bus and the mux class. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210401105847.13026-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1e2ed7b222b83795152cbbb78d6465033b20b252 Author: Heikki Krogerus Date: Thu Apr 1 13:58:42 2021 +0300 usb: typec: Organize the private headers properly Adding a header file for each subsystem - the connector class, alt mode bus and the class for the muxes. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210401105847.13026-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 9594408763d439287742d5582842db6a476bbd71 Merge: 202680c7a9371 e49d033bddf5b Author: Greg Kroah-Hartman Date: Mon Apr 5 08:59:21 2021 +0200 Merge 5.12-rc6 into tty-next We need the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit e5c7bccc3775b49cd7006331826aa90cb76c1992 Merge: 507614ba25ffe e49d033bddf5b Author: Greg Kroah-Hartman Date: Mon Apr 5 08:57:44 2021 +0200 Merge 5.12-rc6 into staging-next We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit de800f290dfaa341f22acac22bc454ea2bbf8f71 Merge: bee1f89aad2a5 e49d033bddf5b Author: Greg Kroah-Hartman Date: Mon Apr 5 08:56:10 2021 +0200 Merge 5.12-rc6 into usb-next We want the USB fixes in here as well and it resolves a merge issue with xhci-mtk.c Signed-off-by: Greg Kroah-Hartman commit b20e82939034a79e9af50853d63163fe21f205a9 Merge: f7514a6630166 e49d033bddf5b Author: Greg Kroah-Hartman Date: Mon Apr 5 08:51:37 2021 +0200 Merge 5.12-rc6 into driver-core-next We need the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 422d2245136a2c49550dc83ca9735dd4d8ea71f7 Merge: b0077b4b085f6 e49d033bddf5b Author: Greg Kroah-Hartman Date: Mon Apr 5 08:43:50 2021 +0200 Merge 5.12-rc6 into char-misc-next We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 6a8eb99e130f3f7658de2776934374fe1c41279e Author: Max Filippov Date: Thu Feb 18 10:18:00 2021 -0800 xtensa: ISS: add GDBIO implementation to semihosting interface Add GDBIO implementation for the xtensa semihosting interface. It offers less functions than the simcall interface, so make some semihosting functions optional and return error when implementation is not available. Add Kconfig menu to select semihosting implementation and add simcall and GDBIO choices there. Signed-off-by: Max Filippov commit 54467c126b19230f4d722b67ed7ae5807ed8f5ce Author: Max Filippov Date: Thu Feb 18 09:12:28 2021 -0800 xtensa: ISS: split simcall implementation from semihosting interface Disconnect existing ISS simcall implementation from the semihosting interface to allow for alternative implementations selectable at configure time. Signed-off-by: Max Filippov commit 4671076c4d37a377be3863ba88f62083f1fe3281 Author: Bhaskar Chowdhury Date: Fri Mar 26 06:57:39 2021 +0530 xtensa: simcall.h: Change compitible to compatible s/compitible/compatible/ Signed-off-by: Bhaskar Chowdhury Message-Id: <20210326012739.18038-1-unixbhaskar@gmail.com> Signed-off-by: Max Filippov commit e1532777cae340517f64d13a83138f6b8ad9f8b9 Author: Bhaskar Chowdhury Date: Thu Mar 25 09:38:32 2021 +0530 xtensa: Couple of typo fixes s/contans/contains/ s/desination/destination/ Signed-off-by: Bhaskar Chowdhury Message-Id: <20210325040832.26018-1-unixbhaskar@gmail.com> Signed-off-by: Max Filippov commit f96c4ad6107ec3652c258864d4a2412aca51c923 Author: Max Filippov Date: Sun Mar 14 20:33:27 2021 -0700 xtensa: drop extraneous register load from initialize_mmu Commit a9f2fc628e3a ("xtensa: cleanup MMU setup and kernel layout macros") removed the use of a2 in the beginning of the initialize_mmu macro, but left the register load that is no longer used. Remove it as well. Signed-off-by: Max Filippov commit d4ff983e323870478f04054c1ba817b481eb1f19 Author: Max Filippov Date: Wed Feb 17 01:36:57 2021 -0800 xtensa: fix pgprot_noncached assumptions pgprot_noncached assumes that cache bypass attribute is represented as zero. This may not always be true. Fix pgprot_noncached definition by adding _PAGE_CA_BYPASS to the result. Signed-off-by: Max Filippov commit 4f22ca7e192ee313a83f8093ba5b5b2ca72d10e4 Author: Max Filippov Date: Tue Feb 16 22:39:41 2021 -0800 xtensa: simplify coherent_kvaddr logic Functions coherent_kvaddr, clear_page_alias and copy_page_alias use physical address 0 as a special value that means 'this page is in the KSEG mapping and its existing virtual address has the same color as the virtual address of its future mapping, so don't map it to the TLBTEMP_BASE area'. Simplify this logic and drop special handling of low memory pages/pages with coherent mapping and always use TLBTEMP_BASE area. Signed-off-by: Max Filippov commit 2da7559452504f8f8d9950708f293b636e483b21 Author: Masahiro Yamada Date: Tue Mar 2 00:36:56 2021 +0900 xtensa: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts xtensa to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada Message-Id: <20210301153656.363839-3-masahiroy@kernel.org> Signed-off-by: Max Filippov commit daf2618002356ee1bd2bd0231e251b3a1bffbb8f Author: Masahiro Yamada Date: Tue Mar 2 00:36:55 2021 +0900 xtensa: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts xtensa to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada Message-Id: <20210301153656.363839-2-masahiroy@kernel.org> Signed-off-by: Max Filippov commit 8d949ae25bd0c18038c51e291cb4053dff5f0297 Author: Masahiro Yamada Date: Tue Mar 2 00:36:54 2021 +0900 xtensa: stop filling syscall array with sys_ni_syscall arch/xtensa/kernel/syscalls/syscalltbl.sh fills missing syscall numbers with sys_ni_syscall. So, the generated arch/xtensa/include/generated/asm/syscall_table.h has no hole. Hence, the line: [0 ... __NR_syscalls - 1] = (syscall_t)&sys_ni_syscall, is meaningless. The number of generated __SYSCALL() macros is the same as __NR_syscalls (this is 442 as of v5.11). Hence, the array size, [__NR_syscalls] is unneeded. The designated initializer, '[nr] =', is also unneeded. This file does not need to know __NR_syscalls. Drop the unneeded include directive. Signed-off-by: Masahiro Yamada Message-Id: <20210301153656.363839-1-masahiroy@kernel.org> Signed-off-by: Max Filippov commit 7b6657843c6a227da08af8a8e94c3519bc0ae582 Author: Masahiro Yamada Date: Sat Mar 13 21:23:42 2021 +0900 xtensa: remove unneeded export in boot-elf/Makefile No one uses these as environment variables. Signed-off-by: Masahiro Yamada Message-Id: <20210313122342.69995-2-masahiroy@kernel.org> Signed-off-by: Max Filippov commit c425c546c0f149560c778595c1a20a88a444711f Author: Masahiro Yamada Date: Sat Mar 13 21:23:41 2021 +0900 xtensa: move CONFIG_CPU_*_ENDIAN defines to Kconfig Move the definition of CONFIG_CPU_*_ENDIAN to Kconfig, the best place for CONFIG options. I slightly simplified the test code. You can use the -P option to suppress linemarker generation. The grep command is unneeded. $ echo __XTENSA_EB__ | xtensa-linux-gcc -E - # 1 "" # 1 "" # 1 "" # 1 "" 1 $ echo __XTENSA_EB__ | xtensa-linux-gcc -E -P - 1 Signed-off-by: Masahiro Yamada Message-Id: <20210313122342.69995-1-masahiroy@kernel.org> Signed-off-by: Max Filippov commit 9aa44cd2c24e302df5da49193a7cc233a0f7ddf8 Author: Jiapeng Chong Date: Wed Mar 10 15:10:38 2021 +0800 xtensa: fix warning comparing pointer to 0 Fix the following coccicheck warning: ./arch/xtensa/kernel/pci.c:79:17-18: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Message-Id: <1615360238-22508-1-git-send-email-jiapeng.chong@linux.alibaba.com> Signed-off-by: Max Filippov commit 8a128bc32aba2a19feadc4973b3590db66440e4f Author: Colin Ian King Date: Thu Dec 17 17:24:27 2020 +0000 xtensa: fix spelling mistake in Kconfig "wont" -> "won't" There is a spelling mistake in the Kconfig help text. Fix it. Signed-off-by: Colin Ian King Message-Id: <20201217172427.58009-1-colin.king@canonical.com> Signed-off-by: Max Filippov commit dd3f4e4972f146a685930ccfed95e4e1d13d952a Author: Tejun Heo Date: Sun Apr 4 18:29:37 2021 -0400 cgroup: misc: mark dummy misc_cg_res_total_usage() static inline The dummy implementation was missing static inline triggering the following compile warning on llvm. In file included from arch/x86/kvm/svm/sev.c:17: >> include/linux/misc_cgroup.h:98:15: warning: no previous prototype for function 'misc_cg_res_total_usage' [-Wmissing-prototypes] unsigned long misc_cg_res_total_usage(enum misc_res_type type) ^ include/linux/misc_cgroup.h:98:1: note: declare 'static' if the function is not intended to be used outside of this translation unit unsigned long misc_cg_res_total_usage(enum misc_res_type type) ^ static 1 warning generated. Add it. Signed-off-by: Tejun Heo Reported-by: kernel test robot commit 054ef44ea3ef2883e0f63c9a54c91c07f321a0b4 Author: Jian Dong Date: Tue Mar 23 11:10:34 2021 +0800 clk: imx: Reference preceded by free When register failed, clk will be freed, it will generate dangling pointer problem in later reference. it should return directly. Signed-off-by: Jian Dong Signed-off-by: Abel Vesa commit 8304b15e132f1608973aca4527a8e12af41ddc0e Author: Richard Zhu Date: Mon Mar 15 16:17:48 2021 +0800 clk: imx8mq: Correct the pcie1 sels - The sys2_pll_50m should be one of the clock sels of PCIE_AUX clock. Change the sys2_pll_500m to sys2_pll_50m. - Correct one misspell of the imx8mq_pcie1_ctrl_sels definition, from "sys2_pll_250m" to "sys2_pll_333m". Signed-off-by: Richard Zhu Signed-off-by: Abel Vesa commit 1840518ae7de0e1eeb9075069cbe632fde16c88d Author: Richard Zhu Date: Mon Mar 15 16:17:47 2021 +0800 clk: imx8mp: Remove the none exist pcie clocks In the i.MX8MP PCIe design, the PCIe PHY REF clock comes from external OSC or internal system PLL. It is configured in the IOMUX_GPR14 register directly, and can't be contolled by CCM at all. Remove the PCIE PHY clock from clock driver to clean up codes. There is only one PCIe in i.MX8MP, remove the none exist second PCIe related clocks. Remove the none exsits clocks IDs together. Signed-off-by: Richard Zhu Reviewed-by: Jason Liu Signed-off-by: Abel Vesa commit 379c9a24cc239000b1dec53db02fe17a86947423 Author: Adam Ford Date: Sat Mar 13 06:28:17 2021 -0600 clk: imx: Fix reparenting of UARTs not associated with stdout Most if not all i.MX SoC's call a function which enables all UARTS. This is a problem for users who need to re-parent the clock source, because any attempt to change the parent results in an busy error due to the fact that the clocks have been enabled already. clk: failed to reparent uart1 to sys_pll1_80m: -16 Instead of pre-initializing all UARTS, scan the device tree to see which UART clocks are associated to stdout, and only enable those UART clocks if it's needed early. This will move initialization of the remaining clocks until after the parenting of the clocks. When the clocks are shutdown, this mechanism will also disable any clocks that were pre-initialized. Fixes: 9461f7b33d11c ("clk: fix CLK_SET_RATE_GATE with clock rate protection") Suggested-by: Aisheng Dong Signed-off-by: Adam Ford Reviewed-by: Abel Vesa Tested-by: Ahmad Fatoum Signed-off-by: Abel Vesa commit f66965b06b15a02c0c7da3e5424b029a094a4862 Author: Sujit Kautkar Date: Mon Mar 29 18:46:10 2021 -0700 arm64: dts: qcom: Move rmtfs memory region Move rmtfs memory region so that it does not overlap with system RAM (kernel data) when KAsan is enabled. This puts rmtfs right after mba_mem which is not supposed to increase beyond 0x94600000 Reviewed-by: Stephen Boyd Signed-off-by: Sujit Kautkar Link: https://lore.kernel.org/r/20210330014610.1451198-1-sujitka@chromium.org Signed-off-by: Bjorn Andersson commit f158e7a378f2b375c19cda6a1f35783b7c0615ad Author: Srinivasa Rao Mandadapu Date: Sun Mar 14 11:40:54 2021 +0530 arm64: dts: qcom: Add sound node for sc7180-trogdor-coachz This is a trgodor variant, required to have sound node variable for coachz specific platform. Tested-by: Douglas Anderson Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210314061054.19451-3-srivasam@codeaurora.org Signed-off-by: Bjorn Andersson commit 29bd62ee951b6ee8c0f20f924b80523cf4f179c0 Author: Ajit Pandey Date: Sun Mar 14 11:40:53 2021 +0530 arm64: dts: qcom: sc7180-trogdor: Add lpass dai link for I2S driver Add dai link for supporting lpass I2S driver, which is used for audio capture and playback. Add lpass-cpu node with pin controls and i2s primary and secondary dai-links. Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Srinivas Kandagatla Signed-off-by: Ajit Pandey Signed-off-by: V Sujith Kumar Reddy Signed-off-by: Srinivasa Rao Mandadapu Link: https://lore.kernel.org/r/20210314061054.19451-2-srivasam@codeaurora.org Signed-off-by: Bjorn Andersson commit 9b3153248fbac78fdaaa6e154dadb1f29fcbb81c Author: Dmitry Baryshkov Date: Wed Mar 31 18:16:14 2021 +0300 arm64: dts: qcom: use dp_phy to provide clocks to dispcc Plug dp_phy-provided clocks to display clock controller. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210331151614.3810197-8-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 5aa0d1becd5b3e010302ab1c703fe3357cc44f2e Author: Dmitry Baryshkov Date: Wed Mar 31 18:16:13 2021 +0300 arm64: dts: qcom: sm8250: switch usb1 qmp phy to USB3+DP mode USB1 QMP PHY is not just a USB3 PHY, but USB3+DP PHY. Change device tree nodes accordingly. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210331151614.3810197-7-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit fa245b3f06cd0d3f47799d3fddd1b124806bfa06 Author: Bryan O'Donoghue Date: Thu Apr 1 18:42:56 2021 +0100 arm64: dts: qcom: sm8250: Add venus DT node Add DT entries for the sm8250 venus encoder/decoder. Co-developed-by: Jonathan Marek Signed-off-by: Jonathan Marek Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210401174256.1810044-3-bryan.odonoghue@linaro.org Signed-off-by: Bjorn Andersson commit 5b9ec225d4ed222c411c7fbd9b6c781448aa8576 Author: jonathan@marek.ca Date: Thu Apr 1 18:42:55 2021 +0100 arm64: dts: qcom: sm8250: Add videocc DT node This commit adds the videocc DTS node for sm8250. Signed-off-by: Jonathan Marek Signed-off-by: Bryan O'Donoghue Tested-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210401174256.1810044-2-bryan.odonoghue@linaro.org Signed-off-by: Bjorn Andersson commit da6b24828d5734128b872dc5319e34d764449098 Author: Vinod Koul Date: Thu Apr 1 17:02:52 2021 +0530 arm64: dts: qcom: sm8350: Add interconnects Add interconnect nodes and add them for modem and cdsp nodes Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210401113252.3078466-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 24e3eb2e32c688c2c5f6b92bc899b22eea5d5f60 Author: Robert Foss Date: Thu Apr 1 12:15:36 2021 +0200 arm64: dts: qcom: sm8350: Add support for PRNG EE RNG (Random Number Generator) in SM8350 features PRNG EE (Execution Environment), hence add devicetree support for it. Reviewed-by: Vinod Koul Signed-off-by: Robert Foss Link: https://lore.kernel.org/r/20210401101536.1014560-1-robert.foss@linaro.org Signed-off-by: Bjorn Andersson commit 60eb631f5d6eb52fbb5ee257017fb622bc60915f Author: satya priya Date: Wed Mar 31 17:35:37 2021 +0530 arm64: dts: qcom: sc7280: Add RPMh regulators for sc7280-idp Add regulator devices for SC7280 as RPMh regulators. This ensures that consumers are able to modify the physical state of PMIC regulators. Reviewed-by: Matthias Kaehlcke Signed-off-by: satya priya Link: https://lore.kernel.org/r/1617192339-3760-4-git-send-email-skakit@codeaurora.org Signed-off-by: Bjorn Andersson commit 644e4d972d148628b6094258af913b6b38f4da81 Author: Dmitry Baryshkov Date: Sat Apr 3 02:39:44 2021 +0300 arm64: dts: qcom: sdm845: add required clocks on the gcc Specify input clocks to the SDM845's Global Clock Controller as required by the bindings. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210402233944.273275-4-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 7aef27f0b2a8a58c28578d3e0caf3f27e1a1c39c Author: Vipin Sharma Date: Mon Mar 29 21:42:06 2021 -0700 svm/sev: Register SEV and SEV-ES ASIDs to the misc controller Secure Encrypted Virtualization (SEV) and Secure Encrypted Virtualization - Encrypted State (SEV-ES) ASIDs are used to encrypt KVMs on AMD platform. These ASIDs are available in the limited quantities on a host. Register their capacity and usage to the misc controller for tracking via cgroups. Signed-off-by: Vipin Sharma Reviewed-by: David Rientjes Signed-off-by: Tejun Heo commit 25259fc914a1d06ba47263383612777a509281e9 Author: Vipin Sharma Date: Mon Mar 29 21:42:05 2021 -0700 cgroup: Miscellaneous cgroup documentation. Documentation of miscellaneous cgroup controller. This new controller is used to track and limit the usage of scalar resources. Signed-off-by: Vipin Sharma Reviewed-by: David Rientjes Signed-off-by: Tejun Heo commit a72232eabdfcfe365a05a3eb392288b78d25a5ca Author: Vipin Sharma Date: Mon Mar 29 21:42:04 2021 -0700 cgroup: Add misc cgroup controller The Miscellaneous cgroup provides the resource limiting and tracking mechanism for the scalar resources which cannot be abstracted like the other cgroup resources. Controller is enabled by the CONFIG_CGROUP_MISC config option. A resource can be added to the controller via enum misc_res_type{} in the include/linux/misc_cgroup.h file and the corresponding name via misc_res_name[] in the kernel/cgroup/misc.c file. Provider of the resource must set its capacity prior to using the resource by calling misc_cg_set_capacity(). Once a capacity is set then the resource usage can be updated using charge and uncharge APIs. All of the APIs to interact with misc controller are in include/linux/misc_cgroup.h. Miscellaneous controller provides 3 interface files. If two misc resources (res_a and res_b) are registered then: misc.capacity A read-only flat-keyed file shown only in the root cgroup. It shows miscellaneous scalar resources available on the platform along with their quantities:: $ cat misc.capacity res_a 50 res_b 10 misc.current A read-only flat-keyed file shown in the non-root cgroups. It shows the current usage of the resources in the cgroup and its children:: $ cat misc.current res_a 3 res_b 0 misc.max A read-write flat-keyed file shown in the non root cgroups. Allowed maximum usage of the resources in the cgroup and its children.:: $ cat misc.max res_a max res_b 4 Limit can be set by:: # echo res_a 1 > misc.max Limit can be set to max by:: # echo res_a max > misc.max Limits can be set more than the capacity value in the misc.capacity file. Signed-off-by: Vipin Sharma Reviewed-by: David Rientjes Signed-off-by: Tejun Heo commit 5fde3361ba57a9b4eb560dabf859176909d61004 Author: Krzysztof Kozlowski Date: Wed Mar 3 19:28:16 2021 +0100 ARM: dts: qcom: msm8974-samsung-klte: correct fuel gauge interrupt trigger level The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct. Fixes: da8d46992e67 ("ARM: dts: qcom: msm8974-klte: Add fuel gauge") Signed-off-by: Krzysztof Kozlowski Acked-By: Iskren Chernev Tested-By: Iskren Chernev Link: https://lore.kernel.org/r/20210303182816.137255-2-krzk@kernel.org Signed-off-by: Bjorn Andersson commit 9d816b423dab5b59beec5e39b97428feac599ba7 Author: Krzysztof Kozlowski Date: Wed Mar 3 19:28:15 2021 +0100 ARM: dts: qcom: msm8974-lge-nexus5: correct fuel gauge interrupt trigger level The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct. Fixes: 45dfa741df86 ("ARM: dts: qcom: msm8974-lge-nexus5: Add fuel gauge") Signed-off-by: Krzysztof Kozlowski Acked-by: Iskren Chernev Link: https://lore.kernel.org/r/20210303182816.137255-1-krzk@kernel.org Signed-off-by: Bjorn Andersson commit 73c9729f0fb5dffd853e2534432d78c9b173b713 Author: Luca Weiss Date: Sat Apr 3 12:59:03 2021 +0200 ARM: dts: qcom: msm8974-hammerhead: add mount matrix for IMU Configure the mount matrix to account for the sensor placement on the board. Signed-off-by: Luca Weiss Link: https://lore.kernel.org/r/20210403105902.1867344-1-luca@z3ntu.xyz Signed-off-by: Bjorn Andersson commit 38ad957b04c5c2c9effc6336365187dae1301051 Author: Krzysztof Kozlowski Date: Sun Mar 21 19:46:50 2021 +0100 firmware: stratix10-svc: build only on 64-bit ARM The Stratix10 service layer and RCU drivers are useful only on Stratix10, so on ARMv8. Compile testing the RCU driver on 32-bit ARM fails: drivers/firmware/stratix10-rsu.c: In function 'rsu_status_callback': include/linux/compiler_types.h:320:38: error: call to '__compiletime_assert_179' declared with attribute error: FIELD_GET: type of reg too small for mask _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ... drivers/firmware/stratix10-rsu.c:96:26: note: in expansion of macro 'FIELD_GET' priv->status.version = FIELD_GET(RSU_VERSION_MASK, Fixes: 4483397b0353 ("ARM: socfpga: drop ARCH_SOCFPGA") Signed-off-by: Krzysztof Kozlowski Reported-by: kernel test robot Acked-by: Richard Gong Signed-off-by: Dinh Nguyen --- v2: add Fixes tag commit 7d42e84eb99daf9b7feef37e8f2ea1eaf975346b Author: Christophe JAILLET Date: Sun Apr 4 09:11:03 2021 +0200 net: openvswitch: Use 'skb_push_rcsum()' instead of hand coding it 'skb_push()'/'skb_postpush_rcsum()' can be replaced by an equivalent 'skb_push_rcsum()' which is less verbose. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller commit cd77ce9303237191e64bde25bdd2ec277435068e Merge: 428e68e1a85a6 6783f0a21a3ce Author: David S. Miller Date: Sun Apr 4 01:41:08 2021 -0700 Merge tag 'mlx5-updates-2021-04-02' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-04-02 This series provides trivial updates and cleanup to mlx5 driver 1) Support for matching on ct_state inv and rel flag in connection tracking 2) Reject TC rules that redirect from a VF to itself 3) Parav provided some E-Switch cleanups that could be summarized to: 3.1) Packing and Reduce structure sizes 3.2) Dynamic allocation of rate limit tables and structures 4) Vu Makes the netdev arfs and vlan tables allocation dynamic. ==================== Signed-off-by: David S. Miller commit e71b75f73763d88665b3a19c5a4d52d559aa7732 Author: Leon Romanovsky Date: Sun Mar 14 14:42:56 2021 +0200 net/mlx5: Implement sriov_get_vf_total_msix/count() callbacks The mlx5 implementation executes a firmware command on the PF to change the configuration of the selected VF. Link: https://lore.kernel.org/linux-pci/20210314124256.70253-5-leon@kernel.org Acked-by: Bjorn Helgaas Signed-off-by: Leon Romanovsky commit 604774add516c6847745cb381d46907e229ab0bf Author: Leon Romanovsky Date: Sun Mar 14 14:42:55 2021 +0200 net/mlx5: Dynamically assign MSI-X vectors count The number of MSI-X vectors is a PCI property visible through lspci. The field is read-only and configured by the device. The mlx5 devices work in a static or dynamic assignment mode. Static assignment means that all newly created VFs have a preset number of MSI-X vectors determined by device configuration parameters. This can result in some VFs having too many or too few MSI-X vectors. Till now this has been the only means of fine-tuning the MSI-X vector count and it was acceptable for small numbers of VFs. With dynamic assignment the inefficiency of having a fixed number of MSI-X vectors can be avoided with each VF having exactly the required vectors. Userspace will provide this information while provisioning the VF for use, based on the intended use. For instance if being used with a VM, the MSI-X vector count might be matched to the CPU count of the VM. For compatibility mlx5 continues to start up with MSI-X vector assignment, but the kernel can now access a larger dynamic vector pool and assign more vectors to created VFs. Link: https://lore.kernel.org/linux-pci/20210314124256.70253-4-leon@kernel.org Acked-by: Bjorn Helgaas Signed-off-by: Leon Romanovsky commit 0b989c1e37053196676b2238f82195bd5a339d58 Author: Leon Romanovsky Date: Sun Mar 14 14:42:54 2021 +0200 net/mlx5: Add dynamic MSI-X capabilities bits These new fields declare the number of MSI-X vectors that is possible to allocate on the VF through PF configuration. Value must be in range defined by min_dynamic_vf_msix_table_size and max_dynamic_vf_msix_table_size. The driver should continue to query its MSI-X table through PCI configuration header. Link: https://lore.kernel.org/linux-pci/20210314124256.70253-3-leon@kernel.org Acked-by: Bjorn Helgaas Signed-off-by: Leon Romanovsky commit c3d5c2d96d69f2578d6fbf66e39cc2cf840d9812 Author: Leon Romanovsky Date: Sun Apr 4 10:22:18 2021 +0300 PCI/IOV: Add sysfs MSI-X vector assignment interface A typical cloud provider SR-IOV use case is to create many VFs for use by guest VMs. The VFs may not be assigned to a VM until a customer requests a VM of a certain size, e.g., number of CPUs. A VF may need MSI-X vectors proportional to the number of CPUs in the VM, but there is no standard way to change the number of MSI-X vectors supported by a VF. Some Mellanox ConnectX devices support dynamic assignment of MSI-X vectors to SR-IOV VFs. This can be done by the PF driver after VFs are enabled, and it can be done without affecting VFs that are already in use. The hardware supports a limited pool of MSI-X vectors that can be assigned to the PF or to individual VFs. This is device-specific behavior that requires support in the PF driver. Add a read-only "sriov_vf_total_msix" sysfs file for the PF and a writable "sriov_vf_msix_count" file for each VF. Management software may use these to learn how many MSI-X vectors are available and to dynamically assign them to VFs before the VFs are passed through to a VM. If the PF driver implements the ->sriov_get_vf_total_msix() callback, "sriov_vf_total_msix" contains the total number of MSI-X vectors available for distribution among VFs. If no driver is bound to the VF, writing "N" to "sriov_vf_msix_count" uses the PF driver ->sriov_set_msix_vec_count() callback to assign "N" MSI-X vectors to the VF. When a VF driver subsequently reads the MSI-X Message Control register, it will see the new Table Size "N". Link: https://lore.kernel.org/linux-pci/20210314124256.70253-2-leon@kernel.org Acked-by: Bjorn Helgaas Signed-off-by: Leon Romanovsky commit 428e68e1a85a64a8f601fb3a2b4d3e354d8cdc4a Merge: 8250666517920 8b278a5b69a22 Author: David S. Miller Date: Sat Apr 3 14:13:40 2021 -0700 Merge branch 'stmmac-xdp' Ong Boon Leong says: ==================== stmmac: Add XDP support This is the v4 patch series for adding XDP native support to stmmac. Changes in v4: 5/6: Move TX clean timer setup to the end of NAPI RX process and group it under stmmac_finalize_xdp_rx(). Also, fixed stmmac_xdp_xmit_back() returns STMMAC_XDP_CONSUMED if XDP buffer conversion to XDP frame fails. 6/6: Move xdp_do_flush(0 into stmmac_finalize_xdp_rx() and combine the XDP verdict of XDP TX and XDP REDIRECT together. I retested the patch series on the 'xdp2' and 'xdp_redirect' related to changes above and found the result to be satisfactory. History of previous patch series: v3: https://patchwork.kernel.org/project/netdevbpf/cover/20210331154135.8507-1-boon.leong.ong@intel.com/ v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=457757 v1: https://patchwork.kernel.org/project/netdevbpf/list/?series=457139 It will be great if community can help to test or review the v4 series and provide me any input if any. ==================== Signed-off-by: David S. Miller commit 8b278a5b69a2298055b99895ddc5b5f4ab430df5 Author: Ong Boon Leong Date: Thu Apr 1 10:11:17 2021 +0800 net: stmmac: Add support for XDP_REDIRECT action This patch adds the support of XDP_REDIRECT to another remote cpu for further action. It also implements ndo_xdp_xmit ops, enabling the driver to transmit packets forwarded to it by XDP program running on another interface. This patch has been tested using "xdp_redirect_cpu" for XDP_REDIRECT + drop testing. It also been tested with "xdp_redirect" sample app which can be used to exercise ndo_xdp_xmit ops. The burst traffics are generated using pktgen_sample03_burst_single_flow.sh in samples/pktgen directory. v4: Move xdp_do_flush() processing into stmmac_finalize_xdp_rx() and combined the XDP verdict of XDP TX and REDIRECT together. v3: Added 'nq->trans_start = jiffies' to avoid TX time-out as we are sharing TX queue between slow path and XDP. Thanks to Jakub Kicinski for point out. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit be8b38a722e68ffa069b7dfa887369c33d6ea886 Author: Ong Boon Leong Date: Thu Apr 1 10:11:16 2021 +0800 net: stmmac: Add support for XDP_TX action This patch adds support for XDP_TX action which enables XDP program to transmit back received frames. This patch has been tested with the "xdp2" app located in samples/bpf dir. The DUT receives burst traffic packet generated using pktgen script 'pktgen_sample03_burst_single_flow.sh'. v4: Moved stmmac_tx_timer_arm() to be done once at the end of NAPI RX. Fixed stmmac_xdp_xmit_back() to return STMMAC_XDP_CONSUMED if XDP buffer to frame conversion fails. Thanks to Jakub's input. v3: Added 'nq->trans_start = jiffies' to avoid TX time-out as we are sharing TX queue between slow path and XDP. Thanks to Jakub Kicinski for pointing out. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 5fabb01207a2d3439a6abe1d08640de9c942945f Author: Ong Boon Leong Date: Thu Apr 1 10:11:15 2021 +0800 net: stmmac: Add initial XDP support This patch adds the initial XDP support to stmmac driver. It supports XDP_PASS, XDP_DROP and XDP_ABORTED actions. Upcoming patches will add support for XDP_TX and XDP_REDIRECT. To support XDP headroom, this patch adds page_offset into RX buffer and change the dma_sync_single_for_device|cpu(). The DMA address used for RX operation are changed to take into page_offset too. As page_pool can handle dma_sync_single_for_device() on behalf of driver with PP_FLAG_DMA_SYNC_DEV flag, we skip doing that in stmmac driver. Current stmmac driver supports split header support (SPH) in RX but the flexibility of splitting header and payload at different position makes it very complex to be supported for XDP processing. In addition, jumbo frame is not supported in XDP to keep the initial codes simple. This patch has been tested with the sample app "xdp1" located in samples/bpf directory for both SKB and Native (XDP) mode. The burst traffic generated using pktgen_sample03_burst_single_flow.sh in samples/pktgen directory. Changes in v3: - factor in xdp header and tail adjustment done by XDP program. Thanks to Jakub Kicinski for pointing out the gap in v2. Changes in v2: - fix for "warning: variable 'len' set but not used" reported by lkp. Reported-by: kernel test robot Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit d96febedfde250735ac6ed50966ec5453feda355 Author: Ong Boon Leong Date: Thu Apr 1 10:11:14 2021 +0800 net: stmmac: arrange Tx tail pointer update to stmmac_flush_tx_descriptors This patch organizes TX tail pointer update into a new function called stmmac_flush_tx_descriptors() so that we can reuse it in stmmac_xmit(), stmmac_tso_xmit() and up-coming XDP implementation. Changes to v2: - Fix for warning: unused variable ‘desc_size’ https://patchwork.hopto.org/static/nipa/457321/12170149/build_32bit/stderr Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit d08d32d101938a26e692c7aee0d452fbeec9d3f3 Author: Ong Boon Leong Date: Thu Apr 1 10:11:13 2021 +0800 net: stmmac: make SPH enable/disable to be configurable SPH functionality splits header and payload according to split mode and offsef fields (SPLM and SPLOFST). It is beneficials for Linux network stack RX processing however it adds a lot of complexity in XDP processing. So, this patch makes the split-header (SPH) capability of the controller is stored in "priv->sph_cap" and the enabling/disabling of SPH is decided by "priv->sph". This is to prepare initial XDP enabling for stmmac to disable the use of SPH whenever XDP is enabled. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 8deec94c6040bb4a767f6e9456a0a44c7f2e713e Author: Ong Boon Leong Date: Thu Apr 1 10:11:12 2021 +0800 net: stmmac: set IRQ affinity hint for multi MSI vectors Certain platform likes Intel mGBE has independent hardware IRQ resources for TX and RX DMA operation. In preparation to support XDP TX, we add IRQ affinity hint to group both RX and TX queue of the same queue ID to the same CPU. Changes in v2: - IRQ affinity hint need to set to null before IRQ is released. Thanks to issue reported by Song, Yoong Siang. Reported-by: Song, Yoong Siang Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit bea906ee1624aeb34ea2c5acca84728de4185726 Author: Andreas Gruenbacher Date: Fri Apr 2 19:51:24 2021 +0200 gfs2: Silence possible null pointer dereference warning In gfs2_rbm_find, rs is always NULL when minext is NULL, so gfs2_reservation_check_and_update will never be called on a NULL minext. This isn't innediately obvious though, so also check for a NULL minext for better code readability. Reported-by: kernel test robot Signed-off-by: Andreas Gruenbacher commit 6d8da302aedf9ff32c1579cbf91705a78538cb9e Author: Andreas Gruenbacher Date: Thu Mar 25 18:48:49 2021 +0100 gfs2: Turn gfs2_meta_indirect_buffer into gfs2_meta_buffer Instead of only supporting GFS2_METATYPE_DI and GFS2_METATYPE_IN blocks, make the block type a parameter of gfs2_meta_indirect_buffer and rename the function to gfs2_meta_buffer. Signed-off-by: Andreas Gruenbacher commit 152f58c9af21abf913699e671b425fd38447b170 Author: Andreas Gruenbacher Date: Sat Mar 27 22:05:14 2021 +0100 gfs2: Replace gfs2_lblk_to_dblk with gfs2_get_extent We don't need two very similar functions for mapping logical blocks to physical blocks. Signed-off-by: Andreas Gruenbacher commit 9153dac13a6966b63183bac450d5cd39b07cc85c Author: Andreas Gruenbacher Date: Wed Mar 31 23:17:38 2021 +0200 gfs2: Turn gfs2_extent_map into gfs2_{get,alloc}_extent Convert gfs2_extent_map to iomap and split it into gfs2_get_extent and gfs2_alloc_extent. Instead of hardcoding the extent size, pass it in via the extlen parameter. Signed-off-by: Andreas Gruenbacher commit 54992257fe4bb9f76f66b3863492aa8cc5567790 Author: Andreas Gruenbacher Date: Sat Mar 27 21:56:40 2021 +0100 gfs2: Add new gfs2_iomap_get helper Rename the current gfs2_iomap_get and gfs2_iomap_alloc functions to __*. Add a new gfs2_iomap_get helper that doesn't expose struct metapath. Rename gfs2_iomap_get_alloc to gfs2_iomap_alloc. Use the new helpers where they make sense. Signed-off-by: Andreas Gruenbacher commit 0bf3e3273b922e50cae4bcc80476df19cea057fb Author: Andreas Gruenbacher Date: Wed Mar 24 10:50:50 2021 +0100 gfs2: Remove unused variable sb_format Signed-off-by: Andreas Gruenbacher commit 3ae3a7d62a68dfd3b7b6636d8ec1d36ff71de066 Author: Bob Peterson Date: Mon Mar 22 08:38:57 2021 -0400 gfs2: Fix dir.c function parameter descriptions This patch simply fixes a bunch of function parameter comments in dir.c that were reported by the kernel test robot. Reported-by: kernel test robot Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit f68effb308c738da35cb5e750bf49bb0bb569492 Author: Bob Peterson Date: Fri Mar 19 07:56:44 2021 -0400 gfs2: Eliminate gh parameter from go_xmote_bh func The only glock that uses go_xmote_bh glops function is the freeze glock which uses freeze_go_xmote_bh. It does not use its gh parameter, so this patch eliminates the unneeded parameter. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit e7dfab8287bf5c5db3aec0f98e1d06d97ca1b7c7 Author: Bob Peterson Date: Thu Mar 25 08:57:00 2021 -0400 gfs2: don't create empty buffers for NO_CREATE Before this patch, function gfs2_getbuf would create empty buffers when it was given the NO_CREATE directive from gfs2_journal_wipe. This is a waste of time: the buffer_head is only used by gfs2_remove_from_journal to determine if the buffer is pinned (which it won't be if it's newly created) and if there's an associated bd element (same story). This patch removes the useless buffer assignment. Signed-off-by: Bob Peterson Signed-off-by: Andreas Gruenbacher commit 8c56049fec6c3f6dd2388d9e90f4d669fb33ae0d Author: Pablo Neira Ayuso Date: Wed Mar 31 23:10:15 2021 +0200 netfilter: nftables: remove documentation on static functions Since 4f16d25c68ec ("netfilter: nftables: add nft_parse_register_load() and use it") and 345023b0db31 ("netfilter: nftables: add nft_parse_register_store() and use it"), the following functions are not exported symbols anymore: - nft_parse_register() - nft_validate_register_load() - nft_validate_register_store() Signed-off-by: Pablo Neira Ayuso commit dadf33c9f6b5f694e842d224a4d071f59ac665ee Author: Dan Carpenter Date: Fri Apr 2 14:45:44 2021 +0300 netfilter: nftables: fix a warning message in nf_tables_commit_audit_collect() The first argument of a WARN_ONCE() is a condition. This WARN_ONCE() will only print the table name, and is potentially problematic if the table name has a %s in it. Fixes: c520292f29b8 ("audit: log nftables configuration change events once per table") Signed-off-by: Dan Carpenter Reviewed-by: Paul Moore Signed-off-by: Pablo Neira Ayuso commit daf47a7c109a166c812b2d701d66aa8905c54ec1 Author: Florian Westphal Date: Tue Mar 30 08:42:32 2021 +0200 netfilter: ipvs: do not printk on netns creation This causes dmesg spew during normal operation, so remove this. Signed-off-by: Florian Westphal Acked-by: Julian Anastasov Reviewed-by: Simon Horman Signed-off-by: Pablo Neira Ayuso commit f73ea1eb4cce66376cc1dd94b4a083ffb9eeb123 Author: Martin KaFai Lau Date: Fri Apr 2 17:29:21 2021 -0700 bpf: selftests: Specify CONFIG_DYNAMIC_FTRACE in the testing config The tracing test and the recent kfunc call test require CONFIG_DYNAMIC_FTRACE. This patch adds it to the config file. Signed-off-by: Martin KaFai Lau Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210403002921.3419721-1-kafai@fb.com commit b0b3b2c78ec075cec4721986a95abbbac8c3da4f Author: Christophe Leroy Date: Tue Mar 23 15:47:59 2021 +0000 powerpc: Switch to relative jump labels Convert powerpc to relative jump labels. Before the patch, pseries_defconfig vmlinux.o has: 9074 __jump_table 0003f2a0 0000000000000000 0000000000000000 01321fa8 2**0 With the patch, the same config gets: 9074 __jump_table 0002a0e0 0000000000000000 0000000000000000 01321fb4 2**0 Size is 258720 without the patch, 172256 with the patch. That's a 33% size reduction. Largely copied from commit c296146c058c ("arm64/kernel: jump_label: Switch to relative references") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/828348da7868eda953ce023994404dfc49603b64.1616514473.git.christophe.leroy@csgroup.eu commit 40272035e1d0edcd515ad45be297c4cce044536d Author: Christophe Leroy Date: Mon Mar 22 16:37:53 2021 +0000 powerpc/bpf: Reallocate BPF registers to volatile registers when possible on PPC32 When the BPF routine doesn't call any function, the non volatile registers can be reallocated to volatile registers in order to avoid having to save them/restore on the stack. Before this patch, the test #359 ADD default X is: 0: 7c 64 1b 78 mr r4,r3 4: 38 60 00 00 li r3,0 8: 94 21 ff b0 stwu r1,-80(r1) c: 60 00 00 00 nop 10: 92 e1 00 2c stw r23,44(r1) 14: 93 01 00 30 stw r24,48(r1) 18: 93 21 00 34 stw r25,52(r1) 1c: 93 41 00 38 stw r26,56(r1) 20: 39 80 00 00 li r12,0 24: 39 60 00 00 li r11,0 28: 3b 40 00 00 li r26,0 2c: 3b 20 00 00 li r25,0 30: 7c 98 23 78 mr r24,r4 34: 7c 77 1b 78 mr r23,r3 38: 39 80 00 42 li r12,66 3c: 39 60 00 00 li r11,0 40: 7d 8c d2 14 add r12,r12,r26 44: 39 60 00 00 li r11,0 48: 7d 83 63 78 mr r3,r12 4c: 82 e1 00 2c lwz r23,44(r1) 50: 83 01 00 30 lwz r24,48(r1) 54: 83 21 00 34 lwz r25,52(r1) 58: 83 41 00 38 lwz r26,56(r1) 5c: 38 21 00 50 addi r1,r1,80 60: 4e 80 00 20 blr After this patch, the same test has become: 0: 7c 64 1b 78 mr r4,r3 4: 38 60 00 00 li r3,0 8: 94 21 ff b0 stwu r1,-80(r1) c: 60 00 00 00 nop 10: 39 80 00 00 li r12,0 14: 39 60 00 00 li r11,0 18: 39 00 00 00 li r8,0 1c: 38 e0 00 00 li r7,0 20: 7c 86 23 78 mr r6,r4 24: 7c 65 1b 78 mr r5,r3 28: 39 80 00 42 li r12,66 2c: 39 60 00 00 li r11,0 30: 7d 8c 42 14 add r12,r12,r8 34: 39 60 00 00 li r11,0 38: 7d 83 63 78 mr r3,r12 3c: 38 21 00 50 addi r1,r1,80 40: 4e 80 00 20 blr Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b94562d7d2bb21aec89de0c40bb3cd91054b65a2.1616430991.git.christophe.leroy@csgroup.eu commit 51c66ad849a703d9bbfd7704c941827aed0fd9fd Author: Christophe Leroy Date: Mon Mar 22 16:37:52 2021 +0000 powerpc/bpf: Implement extended BPF on PPC32 Implement Extended Berkeley Packet Filter on Powerpc 32 Test result with test_bpf module: test_bpf: Summary: 378 PASSED, 0 FAILED, [354/366 JIT'ed] Registers mapping: [BPF_REG_0] = r11-r12 /* function arguments */ [BPF_REG_1] = r3-r4 [BPF_REG_2] = r5-r6 [BPF_REG_3] = r7-r8 [BPF_REG_4] = r9-r10 [BPF_REG_5] = r21-r22 (Args 9 and 10 come in via the stack) /* non volatile registers */ [BPF_REG_6] = r23-r24 [BPF_REG_7] = r25-r26 [BPF_REG_8] = r27-r28 [BPF_REG_9] = r29-r30 /* frame pointer aka BPF_REG_10 */ [BPF_REG_FP] = r17-r18 /* eBPF jit internal registers */ [BPF_REG_AX] = r19-r20 [TMP_REG] = r31 As PPC32 doesn't have a redzone in the stack, a stack frame must always be set in order to host at least the tail count counter. The stack frame remains for tail calls, it is set by the first callee and freed by the last callee. r0 is used as temporary register as much as possible. It is referenced directly in the code in order to avoid misusing it, because some instructions interpret it as value 0 instead of register r0 (ex: addi, addis, stw, lwz, ...) The following operations are not implemented: case BPF_ALU64 | BPF_DIV | BPF_X: /* dst /= src */ case BPF_ALU64 | BPF_MOD | BPF_X: /* dst %= src */ case BPF_STX | BPF_XADD | BPF_DW: /* *(u64 *)(dst + off) += src */ The following operations are only implemented for power of two constants: case BPF_ALU64 | BPF_MOD | BPF_K: /* dst %= imm */ case BPF_ALU64 | BPF_DIV | BPF_K: /* dst /= imm */ Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/61d8b149176ddf99e7d5cef0b6dc1598583ca202.1616430991.git.christophe.leroy@csgroup.eu commit 355a8d26cd0416e7e764e4db766cf91e773a03e7 Author: Christophe Leroy Date: Mon Mar 22 16:37:51 2021 +0000 powerpc/asm: Add some opcodes in asm/ppc-opcode.h for PPC32 eBPF The following opcodes will be needed for the implementation of eBPF for PPC32. Add them in asm/ppc-opcode.h PPC_RAW_ADDE PPC_RAW_ADDZE PPC_RAW_ADDME PPC_RAW_MFLR PPC_RAW_ADDIC PPC_RAW_ADDIC_DOT PPC_RAW_SUBFC PPC_RAW_SUBFE PPC_RAW_SUBFIC PPC_RAW_SUBFZE PPC_RAW_ANDIS PPC_RAW_NOR Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f7bd573a368edd78006f8a5af508c726e7ce1ed2.1616430991.git.christophe.leroy@csgroup.eu commit c426810fcf9f96e3b43d16039e41ecb959f6dc29 Author: Christophe Leroy Date: Mon Mar 22 16:37:50 2021 +0000 powerpc/bpf: Change values of SEEN_ flags Because PPC32 will use more non volatile registers, move SEEN_ flags to positions 0-2 which corresponds to special registers. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/608faa1dc3ecfead649e15392abd07b00313d2ba.1616430991.git.christophe.leroy@csgroup.eu commit 4ea76e90a97d22f86adbb10044d29d919e620f2e Author: Christophe Leroy Date: Mon Mar 22 16:37:49 2021 +0000 powerpc/bpf: Move common functions into bpf_jit_comp.c Move into bpf_jit_comp.c the functions that will remain common to PPC64 and PPC32 when we add support of EBPF for PPC32. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2c339d77fb168ef12b213ccddfee3cb6c8ce8ae1.1616430991.git.christophe.leroy@csgroup.eu commit f1b1583d5faa86cb3dcb7b740594868debad7c30 Author: Christophe Leroy Date: Mon Mar 22 16:37:48 2021 +0000 powerpc/bpf: Move common helpers into bpf_jit.h Move functions bpf_flush_icache(), bpf_is_seen_register() and bpf_set_seen_register() in order to reuse them in future bpf_jit_comp32.c Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/28e8d5a75e64807d7e9d39a4b52658755e259f8c.1616430991.git.christophe.leroy@csgroup.eu commit ed573b57e77a7860fe4026e1700faa2f6938caf1 Author: Christophe Leroy Date: Mon Mar 22 16:37:47 2021 +0000 powerpc/bpf: Change register numbering for bpf_set/is_seen_register() Instead of using BPF register number as input in functions bpf_set_seen_register() and bpf_is_seen_register(), use CPU register number directly. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/0cd2506f598e7095ea43e62dca1f472de5474a0d.1616430991.git.christophe.leroy@csgroup.eu commit 6944caad78fc4de4ecd0364bbc9715b62b020965 Author: Christophe Leroy Date: Mon Mar 22 16:37:46 2021 +0000 powerpc/bpf: Remove classical BPF support for PPC32 At the time being, PPC32 has Classical BPF support. The test_bpf module exhibits some failure: test_bpf: #298 LD_IND byte frag jited:1 ret 202 != 66 FAIL (1 times) test_bpf: #299 LD_IND halfword frag jited:1 ret 51958 != 17220 FAIL (1 times) test_bpf: #301 LD_IND halfword mixed head/frag jited:1 ret 51958 != 1305 FAIL (1 times) test_bpf: #303 LD_ABS byte frag jited:1 ret 202 != 66 FAIL (1 times) test_bpf: #304 LD_ABS halfword frag jited:1 ret 51958 != 17220 FAIL (1 times) test_bpf: #306 LD_ABS halfword mixed head/frag jited:1 ret 51958 != 1305 FAIL (1 times) test_bpf: Summary: 371 PASSED, 7 FAILED, [119/366 JIT'ed] Fixing this is not worth the effort. Instead, remove support for classical BPF and prepare for adding Extended BPF support instead. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/fbc3e4fcc9c8f6131d6c705212530b2aa50149ee.1616430991.git.christophe.leroy@csgroup.eu commit c7393a71eb1abdda7e3a3ef798bae60de11540ec Author: Christophe Leroy Date: Fri Mar 19 11:07:00 2021 +0000 powerpc/signal32: Simplify logging in sigreturn() Same spirit as commit debf122c777f ("powerpc/signal32: Simplify logging in handle_rt_signal32()"), remove this intermediate 'addr' local var. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/638fa99530beb29f82f94370057d110e91272acc.1616151715.git.christophe.leroy@csgroup.eu commit 887f3ceb51cd34109ac17bfc98695162e299e657 Author: Christophe Leroy Date: Fri Mar 19 11:06:58 2021 +0000 powerpc/signal32: Convert do_setcontext[_tm]() to user access block Add unsafe_get_user_sigset() and transform PPC32 get_sigset_t() into an unsafe version unsafe_get_sigset_t(). Then convert do_setcontext() and do_setcontext_tm() to use user_read_access_begin/end. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9273ba664db769b8d9c7540ae91395e346e4945e.1616151715.git.christophe.leroy@csgroup.eu commit 627b72bee84d6652e0af26617e71ce2b3c18fcd5 Author: Christophe Leroy Date: Fri Mar 19 11:06:57 2021 +0000 powerpc/signal32: Convert restore_[tm]_user_regs() to user access block Convert restore_user_regs() and restore_tm_user_regs() to use user_access_read_begin/end blocks. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/181adf15a6f644efcd1aeafb355f3578ff1b6bc5.1616151715.git.christophe.leroy@csgroup.eu commit 036fc2cb1dc2245c2ea7d2f03c7af80417b6310c Author: Christophe Leroy Date: Fri Mar 19 11:06:56 2021 +0000 powerpc/signal32: Reorder user reads in restore_tm_user_regs() In restore_tm_user_regs(), regroup the reads from 'sr' and the ones from 'tm_sr' together in order to allow two block user accesses in following patch. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7c518b9a4c8e5ae9a3bfb647bc8b20bf820233af.1616151715.git.christophe.leroy@csgroup.eu commit 362471b3192e4184fff5fedee1ea20bdf637a0c8 Author: Christophe Leroy Date: Fri Mar 19 11:06:55 2021 +0000 powerpc/signal32: Perform access_ok() inside restore_user_regs() In preparation of using user_access_begin/end in restore_user_regs(), move the access_ok() inside the function. It makes no difference as the behaviour on a failed access_ok() is the same as on failed restore_user_regs(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c106eb2f37c3040f1fd38b40e50c670feb7cb835.1616151715.git.christophe.leroy@csgroup.eu commit ca9e1605cdd9473a0eb4d6da238d2524be12591a Author: Christophe Leroy Date: Fri Mar 19 11:06:54 2021 +0000 powerpc/signal32: Remove ifdefery in middle of if/else in sigreturn() In the same spirit as commit f1cf4f93de2f ("powerpc/signal32: Remove ifdefery in middle of if/else") MSR_TM_ACTIVE() is always defined and returns always 0 when CONFIG_PPC_TRANSACTIONAL_MEM is not selected, so the awful ifdefery in the middle of an if/else can be removed. Make 'msr_hi' a 'long long' to avoid build failure on PPC32 due to the 32 bits left shift. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a4b48b2f0be1ef13fc8e57452b7f8350da28d521.1616151715.git.christophe.leroy@csgroup.eu commit f918a81e209f24acb45cd935bcfb78d2c024f6a1 Author: Christophe Leroy Date: Fri Mar 19 11:06:53 2021 +0000 powerpc/signal32: Rename save_user_regs_unsafe() and save_general_regs_unsafe() Convention is to prefix functions with __unsafe_ instead of suffixing it with _unsafe. Rename save_user_regs_unsafe() and save_general_regs_unsafe() accordingly, that is respectively __unsafe_save_general_regs() and __unsafe_save_user_regs(). Suggested-by: Christopher M. Riedl Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8cef43607e5b35a7fd0829dec812d88beb570df2.1616151715.git.christophe.leroy@csgroup.eu commit 7c11f8893a76ac4e86c07f4b57371d5fa593627f Author: Christophe Leroy Date: Fri Mar 19 11:06:52 2021 +0000 powerpc/signal: Add unsafe_copy_ck{fpr/vsx}_from_user Add unsafe_copy_ckfpr_from_user() and unsafe_copy_ckvsx_from_user() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1040687aa27553d19f749f7fb48f0c07af98ee2d.1616151715.git.christophe.leroy@csgroup.eu commit c1cc1570bc8d94f288060f262f11be8f7672578c Author: Christophe Leroy Date: Fri Mar 19 11:06:51 2021 +0000 powerpc/uaccess: Also perform 64 bits copies in unsafe_copy_from_user() on ppc32 Similarly to commit 5cf773fc8f37 ("powerpc/uaccess: Also perform 64 bits copies in unsafe_copy_to_user() on ppc32") ppc32 has an efficiant 64 bits unsafe_get_user(), so also use it in order to unroll loops more. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/308e65d9237a14e8c0e3b22919fcf0b5e5592608.1616151715.git.christophe.leroy@csgroup.eu commit fb05121fd6a20f0830ff2a4420c51af6ca4ac6e7 Author: Christophe Leroy Date: Fri Mar 19 11:06:50 2021 +0000 signal: Add unsafe_get_compat_sigset() In the same way as commit 14026b94ccfe ("signal: Add unsafe_put_compat_sigset()"), this time add unsafe_get_compat_sigset() macro which is the 'unsafe' version of get_compat_sigset() For the bigendian, use unsafe_get_user() directly to avoid intermediate copy through the stack. For the littleendian, use a straight unsafe_copy_from_user(). This commit adds the generic fallback for unsafe_copy_from_user(). Architectures wanting to use unsafe_get_compat_sigset() have to make sure they have their own unsafe_copy_from_user(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b05bf434ee13c76bc9df5f02653a10db5e7b54e5.1616151715.git.christophe.leroy@csgroup.eu commit 5cd29b1fd3e8f2b45fe6d011588d832417defe31 Author: Christophe Leroy Date: Wed Mar 10 17:46:54 2021 +0000 powerpc/uaccess: Use asm goto for get_user when compiler supports it clang 11 and future GCC are supporting asm goto with outputs. Use it to implement get_user in order to get better generated code. Note that clang requires to set x in the default branch of __get_user_size_goto() otherwise is compliant about x not being initialised :puzzled: Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/403745b5aaa1b315bb4e8e46c1ba949e77eecec0.1615398265.git.christophe.leroy@csgroup.eu commit 035785ab2826beb43cfa65a2df37d60074915a4d Author: Christophe Leroy Date: Wed Mar 10 17:46:53 2021 +0000 powerpc/uaccess: Introduce __get_user_size_goto() We have got two places doing a goto based on the result of __get_user_size_allowed(). Refactor that into __get_user_size_goto(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/def8a39289e02653cfb1583b3b19837de9efed3a.1615398265.git.christophe.leroy@csgroup.eu commit e72fcdb26cde72985c418b39f72ecaa222e1f4d5 Author: Christophe Leroy Date: Wed Mar 10 17:46:52 2021 +0000 powerpc/uaccess: Refactor get/put_user() and __get/put_user() Make get_user() do the access_ok() check then call __get_user(). Make put_user() do the access_ok() check then call __put_user(). Then embed __get_user_size() and __put_user_size() in __get_user() and __put_user(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/eebc554f6a81f570c46ea3551000ff5b886e4faa.1615398265.git.christophe.leroy@csgroup.eu commit 17f8c0bc21bbb7d1fe729c7f656924a6ea72079b Author: Christophe Leroy Date: Wed Mar 10 17:46:51 2021 +0000 powerpc/uaccess: Rename __get/put_user_check/nocheck __get_user_check() becomes get_user() __put_user_check() becomes put_user() __get_user_nocheck() becomes __get_user() __put_user_nocheck() becomes __put_user() Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/41d7e45f4733f0e61e63824e4865b4e049db74d6.1615398265.git.christophe.leroy@csgroup.eu commit f904c22f2a9fb09fe705efdedbe4af9a30bdf633 Author: Christophe Leroy Date: Wed Mar 10 17:46:50 2021 +0000 powerpc/uaccess: Split out __get_user_nocheck() One part of __get_user_nocheck() is used for __get_user(), the other part for unsafe_get_user(). Move the part dedicated to unsafe_get_user() in it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/618fe2e0626b308a5a063d5baac827b968e85c32.1615398265.git.christophe.leroy@csgroup.eu commit 9975f852ce1bf041a1a81bf882e29ee7a3b78ca6 Author: Christophe Leroy Date: Wed Mar 10 17:46:49 2021 +0000 powerpc/uaccess: Remove calls to __get_user_bad() and __put_user_bad() __get_user_bad() and __put_user_bad() are functions that are declared but not defined, in order to make the link fail in case they are called. Nowadays, we have BUILD_BUG() and BUILD_BUG_ON() for that, and they have the advantage to break the build earlier as it breaks it at compile time instead of link time. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d7d839e994f49fae4ff7b70fac72bd951272436b.1615398265.git.christophe.leroy@csgroup.eu commit 028e15616857add3ba4951f989027675370b0e82 Author: Christophe Leroy Date: Wed Mar 10 17:46:48 2021 +0000 powerpc/uaccess: Remove __chk_user_ptr() in __get/put_user Commit d02f6b7dab82 ("powerpc/uaccess: Evaluate macro arguments once, before user access is allowed") changed the __chk_user_ptr() argument from the passed ptr pointer to the locally declared __gu_addr. But __gu_addr is locally defined as __user so the check is pointless. During kernel build __chk_user_ptr() voids and is only evaluated during sparse checks so it should have been armless to leave the original pointer check there. Nevertheless, this check is indeed redundant with the assignment above which casts the ptr pointer to the local __user __gu_addr. In case of mismatch, sparse will detect it there, so the __check_user_ptr() is not needed anywhere else than in access_ok(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/69f17d75046733b891ab2e668dbf464787cdf598.1615398265.git.christophe.leroy@csgroup.eu commit be15a165796598cd3929ca9aac56ba5ec69e41c1 Author: Christophe Leroy Date: Wed Mar 10 17:46:47 2021 +0000 powerpc/uaccess: Remove __unsafe_put_user_goto() __unsafe_put_user_goto() is just an intermediate layer to __put_user_size_goto() without added value other than doing the __user pointer type checking. Do the __user pointer type checking in __put_user_size_goto() and remove __unsafe_put_user_goto(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b6552149209aebd887a6977272b06a41256bdb9f.1615398265.git.christophe.leroy@csgroup.eu commit ed0d9c66f97c6865e87fa6e3631bbc3919a31ad6 Author: Christophe Leroy Date: Wed Mar 10 17:46:46 2021 +0000 powerpc/uaccess: Call might_fault() inconditionaly Commit 6bfd93c32a50 ("powerpc: Fix incorrect might_sleep in __get_user/__put_user on kernel addresses") added a check to not call might_sleep() on kernel addresses. This was to enable the use of __get_user() in the alignment exception handler for any address. Then commit 95156f0051cb ("lockdep, mm: fix might_fault() annotation") added a check of the address space in might_fault(), based on set_fs() logic. But this didn't solve the powerpc alignment exception case as it didn't call set_fs(KERNEL_DS). Nowadays, set_fs() is gone, previous patch fixed the alignment exception handler and __get_user/__put_user are not supposed to be used anymore to read kernel memory. Therefore the is_kernel_addr() check has become useless and can be removed. Signed-off-by: Christophe Leroy Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e0a980a4dc7a2551183dd5cb30f46eafdbee390c.1615398265.git.christophe.leroy@csgroup.eu commit 111631b5e9dae764754657aad00bd6cd1a805d0d Author: Christophe Leroy Date: Wed Mar 10 17:46:45 2021 +0000 powerpc/align: Don't use __get_user_instr() on kernel addresses In the old days, when we didn't have kernel userspace access protection and had set_fs(), it was wise to use __get_user() and friends to read kernel memory. Nowadays, get_user() is granting userspace access and is exclusively for userspace access. In alignment exception handler, use probe_kernel_read_inst() instead of __get_user_instr() for reading instructions in kernel. This will allow to remove the is_kernel_addr() check in __get/put_user() in a following patch. Signed-off-by: Christophe Leroy Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d9ecbce00178484e66ca7adec2ff210058037704.1615398265.git.christophe.leroy@csgroup.eu commit 35506a3e2d7c4d93cb564e23471a448cbd98f085 Author: Christophe Leroy Date: Wed Mar 10 17:46:44 2021 +0000 powerpc/uaccess: Move get_user_instr helpers in asm/inst.h Those helpers use get_user helpers but they don't participate in their implementation, so they do not belong to asm/uaccess.h Move them in asm/inst.h Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2c6e83581b4fa434aa7cf2fa7714c41e98f57007.1615398265.git.christophe.leroy@csgroup.eu commit bad956b8fe1a8b3b634d596ed2023ec30726cdf1 Author: Christophe Leroy Date: Wed Mar 10 17:46:43 2021 +0000 powerpc/uaccess: Remove __get/put_user_inatomic() Powerpc is the only architecture having _inatomic variants of __get_user() and __put_user() accessors. They were introduced by commit e68c825bb016 ("[POWERPC] Add inatomic versions of __get_user and __put_user"). Those variants expand to the _nosleep macros instead of expanding to the _nocheck macros. The only difference between the _nocheck and the _nosleep macros is the call to might_fault(). Since commit 662bbcb2747c ("mm, sched: Allow uaccess in atomic with pagefault_disable()"), __get/put_user() can be used in atomic parts of the code, therefore __get/put_user_inatomic() have become useless. Remove __get_user_inatomic() and __put_user_inatomic(). Signed-off-by: Christophe Leroy Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1e5c895669e8d54a7810b62dc61eb111f33c2c37.1615398265.git.christophe.leroy@csgroup.eu commit 3fa3db32956d74c0784171ae0334685502bb169a Author: Christophe Leroy Date: Fri Mar 12 13:25:11 2021 +0000 powerpc/align: Convert emulate_spe() to user_access_begin This patch converts emulate_spe() to using user_access_begin logic. Since commit 662bbcb2747c ("mm, sched: Allow uaccess in atomic with pagefault_disable()"), might_fault() doesn't fire when called from sections where pagefaults are disabled, which must be the case when using _inatomic variants of __get_user and __put_user. So the might_fault() in user_access_begin() is not a problem. There was a verification of user_mode() together with the access_ok(), but there is a second verification of user_mode() just after, that leads to immediate return. The access_ok() is now part of the user_access_begin which is called after that other user_mode() verification, so no need to check user_mode() again. Signed-off-by: Christophe Leroy Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c95a648fdf75992c9d88f3c73cc23e7537fcf2ad.1615555354.git.christophe.leroy@csgroup.eu commit 9bd68dc5d7463cb959bff9ac4b6c7e578171de35 Author: Christophe Leroy Date: Wed Mar 10 17:46:41 2021 +0000 powerpc/uaccess: Define ___get_user_instr() for ppc32 Define simple ___get_user_instr() for ppc32 instead of defining ppc32 versions of the three get_user_instr() helpers. Signed-off-by: Christophe Leroy Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e02f83ec74f26d76df2874f0ce4d5cc69c3469ae.1615398265.git.christophe.leroy@csgroup.eu commit 8cdf748d557f15ae6f9e0d4108cc3ea6e1ee4419 Author: Christophe Leroy Date: Wed Mar 10 17:46:40 2021 +0000 powerpc/uaccess: Remove __get_user_allowed() and unsafe_op_wrap() Those two macros have only one user which is unsafe_get_user(). Put everything in one place and remove them. Signed-off-by: Christophe Leroy Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/439179c5e54c18f2cb8bdf1eea13ea0ef6b98375.1615398265.git.christophe.leroy@csgroup.eu commit 7c09e605553a48f850c89ab2cb787ddff1da8b1c Merge: a38fd87484648 dcc354572d094 Author: Stephen Boyd Date: Sat Apr 3 00:01:06 2021 -0700 Merge tag 'sunxi-clk-for-5.13-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-allwinner Pull Allwinner clk driver updates from Maxime Ripard: "Our usual PR for the Allwinner SoCs, this time adding support for sigma-delta modulation on the V3s Audio PLL, and fixing a kernel doc header." * tag 'sunxi-clk-for-5.13-1' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux: clk: sunxi: Demote non-conformant kernel-doc headers clk: sunxi-ng: v3s: use sigma-delta modulation for audio-pll commit 3338fe50aa6df1fb8bb0ead5c2cb432f04bc9331 Merge: 60c325a7172d1 f2fb4fe62390b Author: Stephen Boyd Date: Fri Apr 2 23:59:04 2021 -0700 Merge tag 'renesas-clk-for-v5.13-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: - Spelling fixes - Zero init clk_init_data * tag 'renesas-clk-for-v5.13-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: Zero init clk_init_data clk: renesas: Couple of spelling fixes commit fe6adcce7e297fcb49f40c62df42334690c3f848 Author: Ruiqi Gong Date: Wed Mar 31 05:39:20 2021 -0400 erofs: Clean up spelling mistakes found in fs/erofs zmap.c: s/correspoinding/corresponding zdata.c: s/endding/ending Link: https://lore.kernel.org/r/20210331093920.31923-1-gongruiqi1@huawei.com Reported-by: Hulk Robot Signed-off-by: Ruiqi Gong Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang commit f07669df4c8df0b7134ae94be20a8b61bd157168 Author: Yang Yingliang Date: Fri Apr 2 09:26:34 2021 +0800 libbpf: Remove redundant semi-colon Remove redundant semi-colon in finalize_btf_ext(). Signed-off-by: Yang Yingliang Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210402012634.1965453-1-yangyingliang@huawei.com commit 6ac4c6f887f5a8efb6a6952798c09a2562022966 Author: Wan Jiabing Date: Thu Apr 1 15:20:37 2021 +0800 bpf: Remove repeated struct btf_type declaration struct btf_type is declared twice. One is declared at 35th line. The below one is not needed, hence remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210401072037.995849-1-wanjiabing@vivo.com commit 2daae89666ad253281bb3d6a027c00a702c02eff Author: Wan Jiabing Date: Thu Apr 1 14:46:37 2021 +0800 bpf, cgroup: Delete repeated struct bpf_prog declaration struct bpf_prog is declared twice. There is one declaration which is independent on the macro at 18th line. So the below one is not needed though. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210401064637.993327-1-wanjiabing@vivo.com commit 2ec9898e9c70b93a5741af3f6af6dbceca569a47 Author: He Fengqing Date: Wed Mar 31 07:51:35 2021 +0000 bpf: Remove unused parameter from ___bpf_prog_run 'stack' parameter is not used in ___bpf_prog_run() after f696b8f471ec ("bpf: split bpf core interpreter"), the base address have been set to FP reg. So consequently remove it. Signed-off-by: He Fengqing Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210331075135.3850782-1-hefengqing@huawei.com commit 007bdc12d4b466566784c1a39b9fb3985f875b3d Author: John Fastabend Date: Thu Apr 1 15:25:56 2021 -0700 bpf, selftests: test_maps generating unrecognized data section With a relatively recent clang master branch test_map skips a section, libbpf: elf: skipping unrecognized data section(5) .rodata.str1.1 the cause is some pointless strings from bpf_printks in the BPF program loaded during testing. After just removing the prints to fix above error Daniel points out the program is a bit pointless and could be simply the empty program returning SK_PASS. Here we do just that and return simply SK_PASS. This program is used with test_maps selftests to test insert/remove of a program into the sockmap and sockhash maps. Its not testing actual functionality of the TCP sockmap programs, these are tested from test_sockmap. So we shouldn't lose in test coverage and fix above warnings. This original test was added before test_sockmap existed and has been copied around ever since, clean it up now. Signed-off-by: John Fastabend Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/161731595664.74613.1603087410166945302.stgit@john-XPS-13-9370 commit 6783f0a21a3ce60e2ac9e56814afcbb01f98cc2e Author: Vu Pham Date: Fri Feb 26 21:17:12 2021 -0800 net/mlx5e: Dynamic alloc vlan table for netdev when needed Dynamic allocate vlan table in mlx5e_priv for EN netdev when needed. Don't allocate it for representor netdev. Signed-off-by: Vu Pham Signed-off-by: Saeed Mahameed commit f6755b80d693c585c87b56d1e3034528609d25c2 Author: Vu Pham Date: Fri Feb 26 15:51:12 2021 -0800 net/mlx5e: Dynamic alloc arfs table for netdev when needed Dynamic allocate arfs table in mlx5e_priv for EN netdev when needed. Don't allocate it for representor netdev. Signed-off-by: Vu Pham Signed-off-by: Saeed Mahameed commit bb5696570b0b670dbbb45ed57dc246020b4e2a06 Author: Ariel Levkovich Date: Thu Mar 11 20:37:21 2021 +0200 net/mlx5e: Reject tc rules which redirect from a VF to itself Since there are self loopback prevention mechanisms at the VF level, offloading such rules which redirect from a VF to itself in the eswitch will break the datapath since the packets will be dropped once they go back to the vport they came from. Therefore, offloading such rules will be rejected and left to be handled by SW. Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed commit 8802b8a44ef869d5985be817654373311212acfb Author: Roi Dayan Date: Mon Mar 15 13:31:40 2021 +0200 net/mlx5: Use ida_alloc_range() instead of ida_simple_alloc() ida_simple_alloc() and remove functions are deprecated. Related change: commit 3264ceec8f17 ("lib/idr.c: document that ida_simple_{get,remove}() are deprecated") Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 233dd7d6565e5f4a691e33306eda2d047e98a4bb Author: Parav Pandit Date: Wed Feb 3 15:32:50 2021 +0200 net/mlx5: E-Switch, move QoS specific fields to existing qos struct Function QoS related fields are already defined in qos related struct. min and max rate are left out to mlx5_vport_info struct. Move them to existing qos struct. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit b47e1056257cdeae9cbe55926c13a98519f950b1 Author: Parav Pandit Date: Wed Feb 3 06:59:32 2021 +0200 net/mlx5: E-Switch, cut down mlx5_vport_info structure size by 8 bytes Structure mlx5_vport_info consumes 40 bytes of space due to a hole in it. After packing it reduces to 32 bytes. Currently: pahole -C mlx5_vport_info drivers/net/ethernet/mellanox/mlx5/core/eswitch.o struct mlx5_vport_info { u8 mac[6]; /* 0 6 */ u16 vlan; /* 6 2 */ u8 qos; /* 8 1 */ /* XXX 7 bytes hole, try to pack */ u64 node_guid; /* 16 8 */ int link_state; /* 24 4 */ u32 min_rate; /* 28 4 */ u32 max_rate; /* 32 4 */ bool spoofchk; /* 36 1 */ bool trusted; /* 37 1 */ /* size: 40, cachelines: 1, members: 9 */ /* sum members: 31, holes: 1, sum holes: 7 */ /* padding: 2 */ /* last cacheline: 40 bytes */ }; After packing: $ pahole -C mlx5_vport_info drivers/net/ethernet/mellanox/mlx5/core/eswitch.o struct mlx5_vport_info { u8 mac[6]; /* 0 6 */ u16 vlan; /* 6 2 */ u64 node_guid; /* 8 8 */ int link_state; /* 16 4 */ u32 min_rate; /* 20 4 */ u32 max_rate; /* 24 4 */ u8 qos; /* 28 1 */ u8 spoofchk:1; /* 29: 0 1 */ u8 trusted:1; /* 29: 1 1 */ /* size: 32, cachelines: 1, members: 9 */ /* padding: 2 */ /* bit_padding: 6 bits */ /* last cacheline: 32 bytes */ }; Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 19779f28c96dfcc748fa079a2ffdec624feee5cd Author: Parav Pandit Date: Fri Feb 19 09:36:54 2021 +0200 net/mlx5: Pair mutex_destory with mutex_init for rate limit table Add missing mutex_destroy() to pair with mutex_init(). This should be done only when table is initialized, hence perform mutex_init() only when table is initialized. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 6b30b6d4d36c978e0ab0f22e85bf3c646732e98b Author: Parav Pandit Date: Fri Feb 19 12:06:54 2021 +0200 net/mlx5: Allocate rate limit table when rate is configured A device supports 128 rate limiters. A static table allocation consumes 8KB of memory even when rate is not configured. Instead, allocate the table when at least one rate is configured. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 97d85aba2543af790aaf7f4eb1c9f643a1718519 Author: Parav Pandit Date: Thu Feb 25 13:38:07 2021 +0200 net/mlx5: Use helper to increment, decrement rate entry refcount Rate limit entry refcount can be incremented uniformly when it is newly allocated or reused. So simplify the code to increment refcount at one place. Use decrement refcount helper in two routines. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 51ccc9f5f106caf293230e10dcd494a4e33cc68e Author: Parav Pandit Date: Fri Feb 19 09:29:56 2021 +0200 net/mlx5: Use helpers to allocate and free rl table entries User helper routines to allocate and free rate limit table entries. Subsequent patch extends use of these helpers to do allocation during rate entry allocation callback. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 16e74672a21b95ebc6fb42420d9a8b91b7e947b0 Author: Parav Pandit Date: Wed Feb 24 11:04:19 2021 +0200 net/mlx5: Do not hold mutex while reading table constants Table max_size, min and max rate are constants initialized while table is created. Reading it doesn't need to hold a table mutex. Hence, read them without holding table mutex. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 4c4c0a89abd5c08e91df9bcce4ebcb3433bbb9bf Author: Parav Pandit Date: Fri Feb 19 08:18:12 2021 +0200 net/mlx5: Pack mlx5_rl_entry structure mlx5_rl_entry structure is not properly packed as shown below. Due to this an array of size 9144 bytes allocated which is aligned to 16Kbytes. Hence, pack the structure and avoid the wastage. This offers 8Kbytes of saving per mlx5_core_dev struct. pahole -C mlx5_rl_entry drivers/net/ethernet/mellanox/mlx5/core/en_main.o Existing layout: struct mlx5_rl_entry { u8 rl_raw[48]; /* 0 48 */ u16 index; /* 48 2 */ /* XXX 6 bytes hole, try to pack */ u64 refcount; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u16 uid; /* 64 2 */ u8 dedicated:1; /* 66: 0 1 */ /* size: 72, cachelines: 2, members: 5 */ /* sum members: 60, holes: 1, sum holes: 6 */ /* sum bitfield members: 1 bits (0 bytes) */ /* padding: 5 */ /* bit_padding: 7 bits */ /* last cacheline: 8 bytes */ }; After alignment: struct mlx5_rl_entry { u8 rl_raw[48]; /* 0 48 */ u64 refcount; /* 48 8 */ u16 index; /* 56 2 */ u16 uid; /* 58 2 */ u8 dedicated:1; /* 60: 0 1 */ /* size: 64, cachelines: 1, members: 5 */ /* padding: 3 */ /* bit_padding: 7 bits */ }; Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit c6baac47d9e64d42f98ef745ed1f2925efc78440 Author: Parav Pandit Date: Tue Feb 9 09:44:27 2021 +0200 net/mlx5: Use unsigned int for free_count Fix the warning due to missing int. WARNING: Prefer 'unsigned int' to bare use of 'unsigned' + unsigned free_count; Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit e591605f801ecfa2202b2682bf7af96e1d3129df Author: Parav Pandit Date: Wed Feb 3 15:32:50 2021 +0200 net/mlx5: E-Switch, move QoS specific fields to existing qos struct Function QoS related fields are already defined in qos related struct. min and max rate are left out to mlx5_vport_info struct. Move them to existing qos struct. Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit cadb129ffdfecd2aada3b590cd3132060e665e33 Author: Parav Pandit Date: Wed Feb 3 06:59:32 2021 +0200 net/mlx5: E-Switch, cut down mlx5_vport_info structure size by 8 bytes Structure mlx5_vport_info consumes 40 bytes of space due to a hole in it. After packing it reduces to 32 bytes. Currently: pahole -C mlx5_vport_info drivers/net/ethernet/mellanox/mlx5/core/eswitch.o struct mlx5_vport_info { u8 mac[6]; /* 0 6 */ u16 vlan; /* 6 2 */ u8 qos; /* 8 1 */ /* XXX 7 bytes hole, try to pack */ u64 node_guid; /* 16 8 */ int link_state; /* 24 4 */ u32 min_rate; /* 28 4 */ u32 max_rate; /* 32 4 */ bool spoofchk; /* 36 1 */ bool trusted; /* 37 1 */ /* size: 40, cachelines: 1, members: 9 */ /* sum members: 31, holes: 1, sum holes: 7 */ /* padding: 2 */ /* last cacheline: 40 bytes */ }; After packing: $ pahole -C mlx5_vport_info drivers/net/ethernet/mellanox/mlx5/core/eswitch.o struct mlx5_vport_info { u8 mac[6]; /* 0 6 */ u16 vlan; /* 6 2 */ u64 node_guid; /* 8 8 */ int link_state; /* 16 4 */ u32 min_rate; /* 20 4 */ u32 max_rate; /* 24 4 */ u8 qos; /* 28 1 */ u8 spoofchk:1; /* 29: 0 1 */ u8 trusted:1; /* 29: 1 1 */ /* size: 32, cachelines: 1, members: 9 */ /* padding: 2 */ /* bit_padding: 6 bits */ /* last cacheline: 32 bytes */ }; Signed-off-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 116c76c51035ec49af0894e8e8ad71334f9ad7aa Author: Ariel Levkovich Date: Mon Mar 15 19:59:52 2021 +0200 net/mlx5: CT: Add support for matching on ct_state inv and rel flags Add support for matching on ct_state inv and rel flags. Currently the support is only for match on -inv and -rel. Matching on +inv and +rel will be rejected. Example: $ tc filter add dev ens1f0_0 ingress prio 1 chain 1 proto ip flower \ ct_state -est-rel+trk \ action mirred egress redirect dev ens1f0_1 $ tc filter add dev ens1f0_1 ingress prio 1 chain 1 proto ip flower \ ct_state +trk+est-inv \ action mirred egress redirect dev ens1f0_0 Signed-off-by: Ariel Levkovich Signed-off-by: Saeed Mahameed commit 87f1c20e2effd0a0b7e34b0b3bc06821425e1562 Author: Antonio Terceiro Date: Wed Feb 24 10:06:05 2021 -0300 Documentation: kselftest: fix path to test module files The top-level kselftest directory is not called kselftest, but selftests. Signed-off-by: Antonio Terceiro Cc: Shuah Khan Cc: Jonathan Corbet Signed-off-by: Shuah Khan commit 0975694befc06a235cfce5b40d20206c5d8c6593 Author: Qiheng Lin Date: Wed Mar 31 14:06:46 2021 +0800 Drivers: hv: vmbus: Remove unused linux/version.h header That file is not needed in hv.c. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Link: https://lore.kernel.org/r/20210331060646.2471-1-linqiheng@huawei.com Signed-off-by: Wei Liu commit 90b9bfa4707c85c02cc1b22b57bc8abc24a6a5f0 Author: Zheng Yongjun Date: Fri Mar 26 14:49:42 2021 +0800 x86/hyperv: remove unused linux/version.h header That header is not needed in hv_proc.c. Reported-by: Hulk Robot Signed-off-by: Yongjun Zheng Link: https://lore.kernel.org/r/20210326064942.3263776-1-zhengyongjun3@huawei.com Signed-off-by: Wei Liu commit 82506665179209e43d3c9d39ffa42f8c8ff968bd Author: Eric Dumazet Date: Fri Apr 2 11:10:37 2021 -0700 tcp: reorder tcp_congestion_ops for better cache locality Group all the often used fields in the first cache line, to reduce cache line misses. Signed-off-by: Eric Dumazet Acked-by: Stephen Hemminger Signed-off-by: David S. Miller commit 7f040aa322617acf1978b8de140f1bf9ff916617 Author: Eric Dumazet Date: Fri Apr 2 11:07:46 2021 -0700 net: reorganize fields in netns_mib Order fields to increase locality for most used protocols. udplite and icmp are moved at the end. Same for proc_net_devsnmp6 which is not used in fast path. This potentially saves one cache line miss for typical TCP/UDP over IPv4/IPv6. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ca4d4c34ae9aa5c3c0da76662c5e549d2fc0cc86 Author: Dan Carpenter Date: Fri Apr 2 14:44:42 2021 +0300 nfc: pn533: prevent potential memory corruption If the "type_a->nfcid_len" is too large then it would lead to memory corruption in pn533_target_found_type_a() when we do: memcpy(nfc_tgt->nfcid1, tgt_type_a->nfcid_data, nfc_tgt->nfcid1_len); Fixes: c3b1e1e8a76f ("NFC: Export NFCID1 from pn533") Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller commit 8577dd8a07cc2183e3790aa8f8da3d8c6a87803d Merge: 3e8db6365f233 8ed3cefc260e2 Author: David S. Miller Date: Fri Apr 2 14:25:47 2021 -0700 Merge branch 'dpaa2-rx-copybreak' Ioana Ciornei says: ==================== dpaa2-eth: add rx copybreak support DMA unmapping, allocating a new buffer and DMA mapping it back on the refill path is really not that efficient. Proper buffer recycling (page pool, flipping the page and using the other half) cannot be done for DPAA2 since it's not a ring based controller but it rather deals with multiple queues which all get their buffers from the same buffer pool on Rx. To circumvent these limitations, add support for Rx copybreak in dpaa2-eth. Below you can find a summary of the tests that were run to end up with the default rx copybreak value of 512. A bit about the setup - a LS2088A SoC, 8 x Cortex A72 @ 1.8GHz, IPfwd zero loss test @ 20Gbit/s throughput. I tested multiple frame sizes to get an idea where is the break even point. Here are 2 sets of results, (1) is the baseline and (2) is just allocating a new skb for all frames sizes received (as if the copybreak was even to the MTU). All numbers are in Mpps. 64 128 256 512 640 768 896 (1) 3.23 3.23 3.24 3.21 3.1 2.76 2.71 (2) 3.95 3.88 3.79 3.62 3.3 3.02 2.65 It seems that even for 512 bytes frame sizes it's comfortably better when allocating a new skb. After that, we see diminishing rewards or even worse. Changes in v2: - properly marked dpaa2_eth_copybreak as static ==================== Signed-off-by: David S. Miller commit 8ed3cefc260e2ef2107cbd9484e4025f60c37bb5 Author: Ioana Ciornei Date: Fri Apr 2 12:55:32 2021 +0300 dpaa2-eth: export the rx copybreak value as an ethtool tunable It's useful, especially for debugging purposes, to have the Rx copybreak value changeable at runtime. Export it as an ethtool tunable. Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 50f826999a80a100218b0cbf4f14057bc0edb3a3 Author: Ioana Ciornei Date: Fri Apr 2 12:55:31 2021 +0300 dpaa2-eth: add rx copybreak support DMA unmapping, allocating a new buffer and DMA mapping it back on the refill path is really not that efficient. Proper buffer recycling (page pool, flipping the page and using the other half) cannot be done for DPAA2 since it's not a ring based controller but it rather deals with multiple queues which all get their buffers from the same buffer pool on Rx. To circumvent these limitations, add support for Rx copybreak. For small sized packets instead of creating a skb around the buffer in which the frame was received, allocate a new sk buffer altogether, copy the contents of the frame and release the initial page back into the buffer pool. Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 28d137cc8c0bd2c9501b8eb0855b631289c7b4a3 Author: Ioana Ciornei Date: Fri Apr 2 12:55:30 2021 +0300 dpaa2-eth: rename dpaa2_eth_xdp_release_buf into dpaa2_eth_recycle_buf Rename the dpaa2_eth_xdp_release_buf function into dpaa2_eth_recycle_buf since in the next patches we'll be using the same recycle mechanism for the normal stack path beside for XDP_DROP. Also, rename the array which holds the buffers to be recycled so that it does not have any reference to XDP. Signed-off-by: Ioana Ciornei Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 400086d7c11327cfe1b1aa4487adceb41e82b4df Author: Milan Djurovic Date: Mon Mar 15 22:29:53 2021 -0700 ext4: remove unnecessary braces in fs/ext4/dir.c Removes braces to follow the coding style. Signed-off-by: Milan Djurovic Link: https://lore.kernel.org/r/20210316052953.67616-1-mdjurovic@zohomail.com Signed-off-by: Theodore Ts'o commit 3e8db6365f233a110815a4c34cae5d6ee74b1db8 Merge: f3f409a9b7f5b c2a55e8fd80f1 Author: David S. Miller Date: Fri Apr 2 14:21:51 2021 -0700 Merge branch 'mptcp-misc' Mat Martineau says: ==================== MPTCP: Miscellaneous changes Here is a collection of patches from the MPTCP tree: Patches 1 and 2 add some helpful MIB counters for connection information. Patch 3 cleans up some unnecessary checks. Patch 4 is a new feature, support for the MP_TCPRST option. This option is used when resetting one subflow within a MPTCP connection, and provides a reason code that the recipient can use when deciding how to adapt to the lost subflow. Patches 5-7 update the existing MPTCP selftests to improve timeout handling and to share better information when tests fail. ==================== Signed-off-by: David S. Miller commit c2a55e8fd80f1cd9a16a24a08f6df50fc20a65ed Author: Matthieu Baerts Date: Thu Apr 1 16:19:47 2021 -0700 selftests: mptcp: dump more info on mpjoin errors Very occasionally, MPTCP selftests fail. Yeah, I saw that at least once! Here we provide more details in case of errors with mptcp_join.sh script like it was done with mptcp_connect.sh, see commit 767389c8dd55 ("selftests: mptcp: dump more info on errors") Suggested-by: Paolo Abeni Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 76e5e27ca98748242ba7c1fc24f06c09002eee45 Author: Matthieu Baerts Date: Thu Apr 1 16:19:46 2021 -0700 selftests: mptcp: init nstat history Not to be impacted by packets sent between sub-tests. Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 5888a61cb4e00695075bbacfd86f3fa73af00413 Author: Matthieu Baerts Date: Thu Apr 1 16:19:45 2021 -0700 selftests: mptcp: launch mptcp_connect with timeout 'mptcp_connect' already has a timeout for poll() but in some cases, it is not enough. With "timeout" tool, we will force the command to fail if it doesn't finish on time. Thanks to that, the script will continue and display details about the current state before marking the test as failed. Displaying this state is very important to be able to understand the issue. Best to have our CI reporting the issue than just "the test hanged". Note that in mptcp_connect.sh, we were using a long timeout to validate the fact we cannot create a socket if a sysctl is set. We don't need this timeout. In diag.sh, we want to send signals to mptcp_connect instances that have been started in the netns. But we cannot send this signal to 'timeout' otherwise that will stop the timeout and messages telling us SIGUSR1 has been received will be printed. Instead of trying to find the right PID and storing them in an array, we can simply use the output of 'ip netns pids' which is all the PIDs we want to send signal to. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/160 Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit dc87efdb1a5cd46134a9d490480160e303bc6eef Author: Florian Westphal Date: Thu Apr 1 16:19:44 2021 -0700 mptcp: add mptcp reset option support The MPTCP reset option allows to carry a mptcp-specific error code that provides more information on the nature of a connection reset. Reset option data received gets stored in the subflow context so it can be sent to userspace via the 'subflow closed' netlink event. When a subflow is closed, the desired error code that should be sent to the peer is also placed in the subflow context structure. If a reset is sent before subflow establishment could complete, e.g. on HMAC failure during an MP_JOIN operation, the mptcp skb extension is used to store the reset information. Signed-off-by: Florian Westphal Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 781bf13d4f3b033002f7f6728ac0b0d1ebe8f176 Author: Paolo Abeni Date: Thu Apr 1 16:19:43 2021 -0700 mptcp: remove unneeded check on first subflow Currently we explicitly check for the first subflow being NULL in a couple of places, even if we don't need any special actions in such scenario. Just drop the unneeded checks, to avoid confusion. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 5695eb8891f9eb5317ca0c3af7a773468524022d Author: Paolo Abeni Date: Thu Apr 1 16:19:42 2021 -0700 mptcp: add active MPC mibs We are not currently tracking the active MPTCP connection attempts. Let's add the related counters. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit a16195e35cd013fc10023e79640bb1612e5d4457 Author: Paolo Abeni Date: Thu Apr 1 16:19:41 2021 -0700 mptcp: add mib for token creation fallback If the MPTCP protocol is unable to create a new token, the socket fallback to plain TCP, let's keep track of such events via a specific MIB. Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit f3f409a9b7f5bb3619d648b9b4ba3df4c7723da8 Merge: c2bcb4cf02112 afeefec677360 Author: David S. Miller Date: Fri Apr 2 14:18:33 2021 -0700 Merge branch 'ionic-ptp' Shannon Nelson says: ==================== ionic: add PTP and hw clock support This patchset adds support for accessing the DSC hardware clock and for offloading PTP timestamping. Tx packet timestamping happens through a separate Tx queue set up with expanded completion descriptors that can report the timestamp. Rx timestamping can happen either on all queues, or on a separate timestamping queue when specific filtering is requested. Again, the timestamps are reported with the expanded completion descriptors. The timestamping offload ability is advertised but not enabled until an OS service asks for it. At that time the driver's queues are reconfigured to use the different completion descriptors and the private processing queues as needed. Reading the raw clock value comes through a new pair of values in the device info registers in BAR0. These high and low values are interpreted with help from new clock mask, mult, and shift values in the device identity information. First we add the ability to detect new queue features, then the handling of the new descriptor sizes. After adding the new interface structures, we start adding the support code, saving the advertising to the stack for last. ==================== Signed-off-by: David S. Miller commit afeefec6773607552c450ad2eeb43f39173c2d5c Author: Shannon Nelson Date: Thu Apr 1 10:56:10 2021 -0700 ionic: advertise support for hardware timestamps Let the network stack know we've got support for timestamping the packets. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 196f56c07f91fb24d33c5026036d97d3d3154dd2 Author: Shannon Nelson Date: Thu Apr 1 10:56:09 2021 -0700 ionic: ethtool ptp stats Add the new hwstamp stats to our ethtool stats output. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit f8ba81da73fc56b693dc5d91c767c882618e0004 Author: Shannon Nelson Date: Thu Apr 1 10:56:08 2021 -0700 ionic: add ethtool support for PTP Add the get_ts_info() callback for ethtool support of timestamping information. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit a8771bfe05549f3068532c60e3682441ff8159fd Author: Shannon Nelson Date: Thu Apr 1 10:56:07 2021 -0700 ionic: add and enable tx and rx timestamp handling The Tx and Rx timestamped packets are handled through separate queues. Here we set them up, service them, and tear them down along with the normal Tx and Rx queues. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit f0790bcd36063f2850301982f167128139a51f62 Author: Shannon Nelson Date: Thu Apr 1 10:56:06 2021 -0700 ionic: set up hw timestamp queues We do hardware timestamping through a separate Tx queue, and optionally through a separate Rx queue. These queues are allocated, freed, and tracked separately from the basic queue arrays. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit ab470bbe7aba1f9cbed52965ccdc41652951f110 Author: Shannon Nelson Date: Thu Apr 1 10:56:05 2021 -0700 ionic: add rx filtering for hw timestamp steering Add handling of the new Rx packet classification filter type. This simple bit of classification allows for steering packets to a separate Rx queue for processing. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 61db421da31b6fb3767df46c9963e87f2a1d2418 Author: Shannon Nelson Date: Thu Apr 1 10:56:04 2021 -0700 ionic: link in the new hw timestamp code These are changes to compile and link the new code, but no new feature support is available or advertised yet. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit fee6efce565d1e1c45c31de8e05faed530d0a28c Author: Shannon Nelson Date: Thu Apr 1 10:56:03 2021 -0700 ionic: add hw timestamp support files This adds the file of code for supporting Tx and Rx hardware timestamps and the raw clock interface, but does not yet link it in for compiling or use. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 4f1704faa0131ab70a097145a6f144c00051e46a Author: Shannon Nelson Date: Thu Apr 1 10:56:02 2021 -0700 ionic: split adminq post and wait calls Split the wait part out of adminq_post_wait() into a separate function so that a caller can have finer grain control over the sequencing of operations and locking. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 3da258439e89d03515e5bc4ff021012f2ec87260 Author: Shannon Nelson Date: Thu Apr 1 10:56:01 2021 -0700 ionic: add hw timestamp structs to interface The interface for hardware timestamping includes a new FW request, device identity fields, Tx and Rx queue feature bits, a new Rx filter type, the beginnings of Rx packet classifications, and hardware timestamp registers. If the IONIC_ETH_HW_TIMESTAMP bit is shown in the ionic_lif_config features bit string, then we have support for the hw clock registers. If the IONIC_RXQ_F_HWSTAMP and IONIC_TXQ_F_HWSTAMP features are shown in the ionic_q_identity features, then the queues can support HW timestamps on packets. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 0ec9f6669a7dc3041a0d9619489de05ac0146e3b Author: Shannon Nelson Date: Thu Apr 1 10:56:00 2021 -0700 ionic: add handling of larger descriptors In preparating for hardware timestamping, we need to support large Tx and Rx completion descriptors. Here we add the new queue feature ids and handling for the completion descriptor sizes. We only are adding support for the Rx 2x sized completion descriptors in the general Rx queues for now as we will be using it for PTP Rx support, and we don't have an immediate use for the large descriptors in the general Tx queues yet; it will be used in a special Tx queues added in one of the next few patches. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 57a3a98d7c0ab17a264e30fdc166a0646f900b99 Author: Shannon Nelson Date: Thu Apr 1 10:55:59 2021 -0700 ionic: add new queue features to interface Add queue feature extensions to prepare for features that can be queue specific, in addition to the general queue features already defined. While we're here, change the existing feature ids from #defines to enum. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 99fa8ac5c0f1cf781194dbd04fcd162f4392a9b1 Author: Konstantin Porotchkin Date: Sun Mar 7 18:33:43 2021 +0200 arm64: dts: marvell: enable CP110 UTMI PHY usage Enable support for CP110 UTMI PHY in Armada SoC family platform device trees. Signed-off-by: Konstantin Porotchkin Signed-off-by: Gregory CLEMENT commit 69770919d22f385cf00152d5a8d621d1f3040cd6 Author: Konstantin Porotchkin Date: Sun Mar 7 18:33:41 2021 +0200 arm64: dts: marvell: add support for Marvell CP110 UTMI PHY Add support for Marvell CP110 UTMI PHY in a CP11x DTSI Signed-off-by: Konstantin Porotchkin Signed-off-by: Gregory CLEMENT commit 359a376081d4fadfb073e3ddeb6bd6dc94d98341 Author: Uriel Guajardo Date: Thu Mar 11 07:23:13 2021 -0800 kunit: support failure from dynamic analysis tools Add a kunit_fail_current_test() function to fail the currently running test, if any, with an error message. This is largely intended for dynamic analysis tools like UBSAN and for fakes. E.g. say I had a fake ops struct for testing and I wanted my `free` function to complain if it was called with an invalid argument, or caught a double-free. Most return void and have no normal means of signalling failure (e.g. super_operations, iommu_ops, etc.). Key points: * Always update current->kunit_test so anyone can use it. * commit 83c4e7a0363b ("KUnit: KASAN Integration") only updated it for CONFIG_KASAN=y * Create a new header so non-test code doesn't have to include all of (e.g. lib/ubsan.c) * Forward the file and line number to make it easier to track down failures * Declare the helper function for nice __printf() warnings about mismatched format strings even when KUnit is not enabled. Example output from kunit_fail_current_test("message"): [15:19:34] [FAILED] example_simple_test [15:19:34] # example_simple_test: initializing [15:19:34] # example_simple_test: lib/kunit/kunit-example-test.c:24: message [15:19:34] not ok 1 - example_simple_test Fixed minor check patch with checkpatch --fix option: Shuah Khan Signed-off-by: Daniel Latypov Signed-off-by: Uriel Guajardo Reviewed-by: Alan Maguire Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 9854781dba371dda22880fc6acac7688fb5e2bae Author: Daniel Latypov Date: Mon Feb 22 14:52:41 2021 -0800 kunit: tool: make --kunitconfig accept dirs, add lib/kunit fragment TL;DR $ ./tools/testing/kunit/kunit.py run --kunitconfig=lib/kunit Per suggestion from Ted [1], we can reduce the amount of typing by assuming a convention that these files are named '.kunitconfig'. In the case of [1], we now have $ ./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4 Also add in such a fragment for kunit itself so we can give that as an example more close to home (and thus less likely to be accidentally broken). [1] https://lore.kernel.org/linux-ext4/YCNF4yP1dB97zzwD@mit.edu/ Signed-off-by: Daniel Latypov Reviewed-by: David Gow Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit acd976253c0ce98e92c766bd720bb00e4c2facb6 Author: Daniel Latypov Date: Fri Apr 2 12:33:57 2021 -0700 kunit: make KUNIT_EXPECT_STREQ() quote values, don't print literals Before: > Expected str == "world", but > str == hello > "world" == world After: > Expected str == "world", but > str == "hello" Note: like the literal ellision for integers, this doesn't handle the case of KUNIT_EXPECT_STREQ(test, "hello", "world") since we don't expect it to realistically happen in checked in tests. (If you really wanted a test to fail, KUNIT_FAIL("msg") exists) In that case, you'd get: > Expected "hello" == "world", but Signed-off-by: Daniel Latypov Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 4808bf209efd586512e31590f19c1affbe56980e Author: Fenghua Yu Date: Wed Mar 17 02:22:55 2021 +0000 selftests/resctrl: Create .gitignore to include resctrl_tests Create .gitignore to hold the test file resctrl_tests generated after compiling. Suggested-by: Shuah Khan Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 1205b688c92558a04d8dd4cbc2b213e0fceba5db Author: Fenghua Yu Date: Wed Mar 17 02:22:54 2021 +0000 selftests/resctrl: Fix checking for < 0 for unsigned values Dan reported following static checker warnings tools/testing/selftests/resctrl/resctrl_val.c:545 measure_vals() warn: 'bw_imc' unsigned <= 0 tools/testing/selftests/resctrl/resctrl_val.c:549 measure_vals() warn: 'bw_resc_end' unsigned <= 0 These warnings are reported because 1. measure_vals() declares 'bw_imc' and 'bw_resc_end' as unsigned long variables 2. Return value of get_mem_bw_imc() and get_mem_bw_resctrl() are assigned to 'bw_imc' and 'bw_resc_end' respectively 3. The returned values are checked for <= 0 to see if the calls failed Checking for < 0 for an unsigned value doesn't make any sense. Fix this issue by changing the implementation of get_mem_bw_imc() and get_mem_bw_resctrl() such that they now accept reference to a variable and set the variable appropriately upon success and return 0, else return < 0 on error. Reported-by: Dan Carpenter Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit d81343b5eedf84be71a4313e8fd073d0c510afcf Author: Fenghua Yu Date: Wed Mar 17 02:22:53 2021 +0000 selftests/resctrl: Fix incorrect parsing of iMC counters iMC (Integrated Memory Controller) counters are usually at "/sys/bus/event_source/devices/" and are named as "uncore_imc_". num_of_imcs() function tries to count number of such iMC counters so that it could appropriately initialize required number of perf_attr structures that could be used to read these iMC counters. num_of_imcs() function assumes that all the directories under this path that start with "uncore_imc" are iMC counters. But, on some systems there could be directories named as "uncore_imc_free_running" which aren't iMC counters. Trying to read from such directories will result in "not found file" errors and MBM/MBA tests will fail. Hence, fix the logic in num_of_imcs() such that it looks at the first character after "uncore_imc_" to check if it's a numerical digit or not. If it's a digit then the directory represents an iMC counter, else, skip the directory. Reported-by: Reinette Chatre Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 4e5cb354c85eafe88709cefc2fdce4911fb6ac17 Author: Fenghua Yu Date: Wed Mar 17 02:22:52 2021 +0000 selftests/resctrl: Fix unmount resctrl FS umount_resctrlfs() directly attempts to unmount resctrl file system without checking if resctrl FS is already mounted or not. It returns 0 on success and on failure it prints an error message and returns an error status. Calling umount_resctrlfs() when resctrl FS isn't mounted will return an error status. There could be situations where-in the caller might not know if resctrl FS is already mounted or not and the caller might still want to unmount resctrl FS if it's already mounted (For example during teardown). To support above use cases, change umount_resctrlfs() such that it now first checks if resctrl FS is already mounted or not and unmounts resctrl FS only if it's already mounted. unmount resctrl FS upon exit. For example, running only mba test on a Broadwell (BDW) machine (MBA isn't supported on BDW CPU). This happens because validate_resctrl_feature_request() would mount resctrl FS to check if mba is enabled on the platform or not and finds that the H/W doesn't support mba and hence will return false to run_mba_test(). This in turn makes the main() function return without unmounting resctrl FS. Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit f1dd71982d1949a988cedbf4d9f2c726ee24344f Author: Fenghua Yu Date: Wed Mar 17 02:22:51 2021 +0000 selftests/resctrl: Skip the test if requested resctrl feature is not supported There could be two reasons why a resctrl feature might not be enabled on the platform 1. H/W might not support the feature 2. Even if the H/W supports it, the user might have disabled the feature through kernel command line arguments Hence, any resctrl unit test (like cmt, cat, mbm and mba) before starting the test will first check if the feature is enabled on the platform or not. If the feature isn't enabled, then the test returns with an error status. For example, if MBA isn't supported on a platform and if the user tries to run MBA, the output will look like this ok mounting resctrl to "/sys/fs/resctrl" not ok MBA: schemata change But, not supporting a feature isn't a test failure. So, instead of treating it as an error, use the SKIP directive of the TAP protocol. With the change, the output will look as below ok MBA # SKIP Hardware does not support MBA or MBA is disabled Suggested-by: Reinette Chatre Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit c9fb4e7cee1ebf38257c93f7f5c8915a1424611e Author: Fenghua Yu Date: Wed Mar 17 02:22:50 2021 +0000 selftests/resctrl: Modularize resctrl test suite main() function Resctrl test suite main() function does the following things 1. Parses command line arguments passed by user 2. Some setup checks 3. Logic that calls into each unit test 4. Print result and clean up after running each unit test Introduce wrapper functions for steps 3 and 4 to modularize the main() function. Adding these wrapper functions makes it easier to add any logic to each individual test. Please note that this is a preparatory patch for the next one and no functional changes are intended. Suggested-by: Reinette Chatre Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 09a67934625a5941737c566b48e4e574ac4d1d99 Author: Fenghua Yu Date: Wed Mar 17 02:22:49 2021 +0000 selftests/resctrl: Don't hard code value of "no_of_bits" variable Cache related tests (like CAT and CMT) depend on a variable called no_of_bits to run. no_of_bits defines the number of contiguous bits that should be set in the CBM mask and a user can pass a value for no_of_bits using -n command line argument. If a user hasn't passed any value, it defaults to 5 (randomly chosen value). Hard coding no_of_bits to 5 will make the cache tests fail to run on systems that support maximum cbm mask that is less than or equal to 5 bits. Hence, don't hard code no_of_bits value. If a user passes a value for "no_of_bits" using -n option, use it. Otherwise, no_of_bits is equal to half of the maximum number of bits in the cbm mask. Please note that CMT test is still hard coded to 5 bits. It will change in subsequent patches that change CMT test. Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 06bd03a57f8c2e3a8698a7ce7dead4ef18e00902 Author: Fenghua Yu Date: Wed Mar 17 02:22:48 2021 +0000 selftests/resctrl: Fix MBA/MBM results reporting format MBM unit test starts fill_buf (default built-in benchmark) in a new con_mon group (c1, m1) and records resctrl reported mbm values and iMC (Integrated Memory Controller) values every second. It does this for five seconds (randomly chosen value) in total. It then calculates average of resctrl_mbm values and imc_mbm values and if the difference is greater than 300 MB/sec (randomly chosen value), the test treats it as a failure. MBA unit test is similar to MBM but after every run it changes schemata. Checking for a difference of 300 MB/sec doesn't look very meaningful when the mbm values are changing over a wide range. For example, below are the values running MBA test on SKL with different allocations 1. With 10% as schemata both iMC and resctrl mbm_values are around 2000 MB/sec 2. With 100% as schemata both iMC and resctrl mbm_values are around 10000 MB/sec A 300 MB/sec difference between resctrl_mbm and imc_mbm values is acceptable at 100% schemata but it isn't acceptable at 10% schemata because that's a huge difference. So, fix this by checking for percentage difference instead of absolute difference i.e. check if the difference between resctrl_mbm value and imc_mbm value is within 5% (randomly chosen value) of imc_mbm value. If the difference is greater than 5% of imc_mbm value, treat it is a failure. Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit ee0415681eb661efa1eb2db7acc263f2c7df1e23 Author: Fenghua Yu Date: Wed Mar 17 02:22:47 2021 +0000 selftests/resctrl: Use resctrl/info for feature detection Resctrl test suite before running any unit test (like cmt, cat, mbm and mba) should first check if the feature is enabled (by kernel and not just supported by H/W) on the platform or not. validate_resctrl_feature_request() is supposed to do that. This function intends to grep for relevant flags in /proc/cpuinfo but there are several issues here 1. validate_resctrl_feature_request() calls fgrep() to get flags from /proc/cpuinfo. But, fgrep() can only return a string with maximum of 255 characters and hence the complete cpu flags are never returned. 2. The substring search logic is also busted. If strstr() finds requested resctrl feature in the cpu flags, it returns pointer to the first occurrence. But, the logic negates the return value of strstr() and hence validate_resctrl_feature_request() returns false if the feature is present in the cpu flags and returns true if the feature is not present. 3. validate_resctrl_feature_request() checks if a resctrl feature is reported in /proc/cpuinfo flags or not. Having a cpu flag means that the H/W supports the feature, but it doesn't mean that the kernel enabled it. A user could selectively enable only a subset of resctrl features using kernel command line arguments. Hence, /proc/cpuinfo isn't a reliable source to check if a feature is enabled or not. The 3rd issue being the major one and fixing it requires changing the way validate_resctrl_feature_request() works. Since, /proc/cpuinfo isn't the right place to check if a resctrl feature is enabled or not, a more appropriate place is /sys/fs/resctrl/info directory. Change validate_resctrl_feature_request() such that, 1. For cat, check if /sys/fs/resctrl/info/L3 directory is present or not 2. For mba, check if /sys/fs/resctrl/info/MB directory is present or not 3. For cmt, check if /sys/fs/resctrl/info/L3_MON directory is present and check if /sys/fs/resctrl/info/L3_MON/mon_features has llc_occupancy 4. For mbm, check if /sys/fs/resctrl/info/L3_MON directory is present and check if /sys/fs/resctrl/info/L3_MON/mon_features has mbm__bytes Please note that only L3_CAT, L3_CMT, MBA and MBM are supported. CDP and L2 variants can be added later. Reported-by: Reinette Chatre Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit a3611fbc6e58c147bdd409b356baf15ddf57271e Author: Fenghua Yu Date: Wed Mar 17 02:22:46 2021 +0000 selftests/resctrl: Check for resctrl mount point only if resctrl FS is supported check_resctrlfs_support() does the following 1. Checks if the platform supports resctrl file system or not by looking for resctrl in /proc/filesystems 2. Calls opendir() on default resctrl file system path (i.e. /sys/fs/resctrl) 3. Checks if resctrl file system is mounted or not by looking at /proc/mounts Steps 2 and 3 will fail if the platform does not support resctrl file system. So, there is no need to check for them if step 1 fails. Fix this by returning immediately if the platform does not support resctrl file system. Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit b67a7665a917e7305eaa573a474c859fe4c5949e Author: Fenghua Yu Date: Wed Mar 17 02:22:45 2021 +0000 selftests/resctrl: Add config dependencies Add the config file for test dependencies. Suggested-by: Shuah Khan Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit f29838e6fa131f4a323225457112fb869d15931b Author: Reinette Chatre Date: Wed Mar 17 02:22:44 2021 +0000 selftests/resctrl: Fix a printed message Add a missing newline to the printed help text to improve readability. Tested-by: Babu Moger Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 03216ed7bb4de8ce707eb4de23a08516a542770f Author: Fenghua Yu Date: Wed Mar 17 02:22:43 2021 +0000 selftests/resctrl: Share show_cache_info() by CAT and CMT tests show_cache_info() functions are defined separately in CAT and CMT tests. But the functions are same for the tests and unnecessary to be defined separately. Share the function by the tests. Suggested-by: Shuah Khan Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit ca2f4214f9671dfc08b6c5723188e03574203dc5 Author: Fenghua Yu Date: Wed Mar 17 02:22:42 2021 +0000 selftests/resctrl: Call kselftest APIs to log test results Call kselftest APIs instead of using printf() to log test results for cleaner code and better future extension. Suggested-by: Shuah Khan Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 2f320911d9fab38597d2a32d91b4f31165e0c9b4 Author: Fenghua Yu Date: Wed Mar 17 02:22:41 2021 +0000 selftests/resctrl: Rename CQM test as CMT test CMT (Cache Monitoring Technology) [1] is a H/W feature that reports cache occupancy of a process. resctrl selftest suite has a unit test to test CMT for LLC but the test is named as CQM (Cache Quality Monitoring). Furthermore, the unit test source file is named as cqm_test.c and several functions, variables, comments, preprocessors and statements widely use "cqm" as either suffix or prefix. This rampant misusage of CQM for CMT might confuse someone who is newly looking at resctrl selftests because this feature is named CMT in the Intel Software Developer's Manual. Hence, rename all the occurrences (unit test source file name, functions, variables, comments and preprocessors) of cqm with cmt. [1] Please see Intel SDM, Volume 3, chapter 17 and section 18 for more information on CMT: https://software.intel.com/content/www/us/en/develop/articles/intel-sdm.html Suggested-by: Reinette Chatre Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit d7af3d0d515cbdf63b6c3398a3c15ecb1bc2bd38 Author: Fenghua Yu Date: Wed Mar 17 02:22:40 2021 +0000 selftests/resctrl: Fix missing options "-n" and "-p" resctrl test suite accepts command line arguments (like -b, -t, -n and -p) as documented in the help. But passing -n and -p throws an invalid option error. This happens because -n and -p are missing in the list of characters that getopt() recognizes as valid arguments. Hence, they are treated as invalid options. Fix this by adding them to the list of characters that getopt() recognizes as valid arguments. Please note that the main() function already has the logic to deal with the values passed as part of these arguments and hence no changes are needed there. Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit f5f16ae4fae9d4d51aa365a0e1d84d368bef53ea Author: Reinette Chatre Date: Wed Mar 17 02:22:39 2021 +0000 selftests/resctrl: Ensure sibling CPU is not same as original CPU The resctrl tests can accept a CPU on which the tests are run and use default of CPU #1 if it is not provided. In the CAT test a "sibling CPU" is determined that is from the same package where another thread will be run. The current algorithm with which a "sibling CPU" is determined does not take the provided/default CPU into account and when that CPU is the first CPU in a package then the "sibling CPU" will be selected to be the same CPU since it starts by picking the first CPU from core_siblings_list. Fix the "sibling CPU" selection by taking the provided/default CPU into account and ensuring a sibling that is a different CPU is selected. Tested-by: Babu Moger Signed-off-by: Reinette Chatre Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 2428673638ea28fa93d2a38b1c3e8d70122b00ee Author: Fenghua Yu Date: Wed Mar 17 02:22:38 2021 +0000 selftests/resctrl: Clean up resctrl features check Checking resctrl features call strcmp() to compare feature strings (e.g. "mba", "cat" etc). The checkings are error prone and don't have good coding style. Define the constant strings in macros and call strncmp() to solve the potential issues. Suggested-by: Shuah Khan Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 896016d2ad051811ff9c9c087393adc063322fbc Author: Fenghua Yu Date: Wed Mar 17 02:22:37 2021 +0000 selftests/resctrl: Fix compilation issues for other global variables Reinette reported following compilation issue on Fedora 32, gcc version 10.1.1 /usr/bin/ld: resctrl_tests.o:/resctrl.h:65: multiple definition of `bm_pid'; cache.o:/resctrl.h:65: first defined here Other variables are ppid, tests_run, llc_occup_path, is_amd. Compiler isn't happy because these variables are defined globally in two .c files but are not declared as extern. To fix issues for the global variables, declare them as extern. Chang Log: - Split this patch from v4's patch 1 (Shuah). Reported-by: Reinette Chatre Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 8236c51d85a64643588505a6791e022cc8d84864 Author: Fenghua Yu Date: Wed Mar 17 02:22:36 2021 +0000 selftests/resctrl: Fix compilation issues for global variables Reinette reported following compilation issue on Fedora 32, gcc version 10.1.1 /usr/bin/ld: cqm_test.o:/cqm_test.c:22: multiple definition of `cache_size'; cat_test.o:/cat_test.c:23: first defined here The same issue is reported for long_mask, cbm_mask, count_of_bits etc variables as well. Compiler isn't happy because these variables are defined globally in two .c files namely cqm_test.c and cat_test.c and the compiler during compilation finds that the variable is already defined (multiple definition error). Taking a closer look at the usage of these variables reveals that these variables are used only locally in functions such as cqm_resctrl_val() (defined in cqm_test.c) and cat_perf_miss_val() (defined in cat_test.c). These variables are not shared between those functions. So, there is no need for these variables to be global. Hence, fix this issue by making them static variables. Reported-by: Reinette Chatre Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit a9d26a302dea29eb84f491b1340a57e56c631a71 Author: Fenghua Yu Date: Wed Mar 17 02:22:35 2021 +0000 selftests/resctrl: Enable gcc checks to detect buffer overflows David reported a buffer overflow error in the check_results() function of the cmt unit test and he suggested enabling _FORTIFY_SOURCE gcc compiler option to automatically detect any such errors. Feature Test Macros man page describes_FORTIFY_SOURCE as below "Defining this macro causes some lightweight checks to be performed to detect some buffer overflow errors when employing various string and memory manipulation functions (for example, memcpy, memset, stpcpy, strcpy, strncpy, strcat, strncat, sprintf, snprintf, vsprintf, vsnprintf, gets, and wide character variants thereof). For some functions, argument consistency is checked; for example, a check is made that open has been supplied with a mode argument when the specified flags include O_CREAT. Not all problems are detected, just some common cases. If _FORTIFY_SOURCE is set to 1, with compiler optimization level 1 (gcc -O1) and above, checks that shouldn't change the behavior of conforming programs are performed. With _FORTIFY_SOURCE set to 2, some more checking is added, but some conforming programs might fail. Some of the checks can be performed at compile time (via macros logic implemented in header files), and result in compiler warnings; other checks take place at run time, and result in a run-time error if the check fails. Use of this macro requires compiler support, available with gcc since version 4.0." Fix the buffer overflow error in the check_results() function of the cmt unit test and enable _FORTIFY_SOURCE gcc check to catch any future buffer overflow errors. Reported-by: David Binderman Suggested-by: David Binderman Tested-by: Babu Moger Signed-off-by: Fenghua Yu Signed-off-by: Shuah Khan commit 1d88358a89dbac9c7d4559548b9a44840456e6fb Author: Marek Behún Date: Thu Jan 14 13:40:23 2021 +0100 arm64: dts: marvell: armada-37xx: add syscon compatible to NB clk node Add "syscon" compatible to the North Bridge clocks node to allow the cpufreq driver to access these registers via syscon API. This is needed for a fix of cpufreq driver. Signed-off-by: Marek Behún Fixes: e8d66e7927b2 ("arm64: dts: marvell: armada-37xx: add nodes...") Cc: stable@vger.kernel.org Cc: Gregory CLEMENT Cc: Miquel Raynal Signed-off-by: Gregory CLEMENT commit 9c7d1f4bc071fb6a7bb764403ff509b12f64f157 Author: Russell King Date: Tue Mar 9 15:20:13 2021 +0000 arm64: dts: marvell: clearfog-gt-8k: add cooling maps Add cooling maps suitable for a Noctua NF-A4/10 fan attached to the heat sink. The fan will toggle between two speeds in operation which seems to be normal behaviour. More fine-grained steps may help to reduce this. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT commit 2d36399c24636d4f896d451228f5bebe1fccf040 Author: Russell King Date: Tue Mar 9 15:20:08 2021 +0000 arm64: dts: marvell: clearfog-gt-8k: add pwm-fan Add pwm-fan support for controlling the fan speed. Signed-off-by: Russell King Signed-off-by: Gregory CLEMENT commit aaa8c4e05e3295d5c62163ca25776c83541764ef Merge: be724fd5b60dd fb8fee9efdcf0 Author: Mark Brown Date: Fri Apr 2 20:29:01 2021 +0100 Merge series "Support ROHM BD71815 PMIC" from Matti Vaittinen : Patch series introducing support for ROHM BD71815 PMIC ROHM BD71815 is a power management IC used in some battery powered systems. It contains regulators, GPO(s), charger + coulomb counter, RTC and a clock gate. All regulators can be controlled via I2C. LDO4 can additionally be set to be enabled/disabled by a GPIO. LDO3 voltage could be selected from two voltages written into separate VSEL reisters using GPIO but this mode is not supported by driver. On top of that the PMIC has the typical HW state machine which is present also on many other ROHM PMICs. IC contains two GPOs - but one of the GPOs is marked as GND in data-sheet. Thus the driver by default only exposes one GPO. The second GPO can be enabled by special DT property. RTC is almost similar to what is on BD71828. For currently used features only the register address offset to RTC block differs. The charger driver is not included in this series. ROHM has a charger driver with some fuel-gauging logig written in but this is not included here. I am working on separating the logic from HW specific driver and supporting both BD71815 and BD71828 chargers in separate patch series. Changelog v5: Regulator: - Added regmap helper for regulator ramp-delay and taken it in use (patches 13, 14, 16 - they can be just dropped if ramp-delay helper is not a good idea. Patch 15 implements old-fashioned ramp-delay) GPIO: - styling changes to GPIO (Mostly suggested by Andy) - implemented init_valid_mask (but can't count on it yet) Changelog v4: - Sorted ROHM chip ID enum - Statcized DVS structures in regulator driver - Minor styling for regulator driver - rebased on v5.12-rc4 Changelog v3: - GPIO clean-up as suggested by Bartosz - MFD clean-up as suggested by Lee - clk-mode dt-binding handling in MFD driver corrected to reflect new property values. - Dropped already applied patches - Rebased on v5.12-rc2 Changelog v2: - Rebased on top of v5.11-rc3 - Added another "preliminary patch" which fixes HW-dvs voltage handling (patch 1) - split regulator patch to two. - changed dt-binding patch ordering. regulators: - staticized probe - removed some unnecessary defines - updated comments - split rohm-regulator patch adding SNVS and supporting simple linear mapping into two - one adding support for mapping, other adding SNVS. GPIO: - removed unnecessary headers - clarified dev/parent->dev usage - removed forgotten #define DEBUG dt-bindings: - changed patch order to meet ref-dependencies - added missing regulator nodes - changed string property for clk mode to tristated MFD: - header cleanups. CLK: - fixed commit message -- Matti Vaittinen (19): rtc: bd70528: Do not require parent data mfd: bd718x7: simplify by cleaning unnecessary device data dt_bindings: bd71828: Add clock output mode dt_bindings: regulator: Add ROHM BD71815 PMIC regulators dt_bindings: mfd: Add ROHM BD71815 PMIC mfd: Add ROHM BD71815 ID mfd: Sort ROHM chip ID list for better readability mfd: Support for ROHM BD71815 PMIC core gpio: support ROHM BD71815 GPOs regulator: helpers: Export helper voltage listing regulator: rohm-regulator: linear voltage support regulator: rohm-regulator: Support SNVS HW state. regulator: Add regmap helper for ramp-delay setting regulator: bd718x7, bd71828: Use ramp-delay helper regulator: Support ROHM BD71815 regulators regulator: bd71815: use ramp-delay helper clk: bd718x7: Add support for clk gate on ROHM BD71815 PMIC rtc: bd70528: Support RTC on ROHM BD71815 MAINTAINERS: Add ROHM BD71815AGW .../bindings/mfd/rohm,bd71815-pmic.yaml | 201 ++++++ .../bindings/mfd/rohm,bd71828-pmic.yaml | 6 + .../regulator/rohm,bd71815-regulator.yaml | 116 ++++ MAINTAINERS | 3 + drivers/clk/clk-bd718x7.c | 9 +- drivers/gpio/Kconfig | 10 + drivers/gpio/Makefile | 1 + drivers/gpio/gpio-bd71815.c | 193 ++++++ drivers/mfd/Kconfig | 15 +- drivers/mfd/rohm-bd71828.c | 486 +++++++++---- drivers/mfd/rohm-bd718x7.c | 43 +- drivers/regulator/Kconfig | 11 + drivers/regulator/Makefile | 1 + drivers/regulator/bd71815-regulator.c | 651 ++++++++++++++++++ drivers/regulator/bd71828-regulator.c | 51 +- drivers/regulator/bd718x7-regulator.c | 60 +- drivers/regulator/helpers.c | 101 ++- drivers/regulator/rohm-regulator.c | 23 +- drivers/rtc/Kconfig | 6 +- drivers/rtc/rtc-bd70528.c | 104 +-- include/linux/mfd/rohm-bd71815.h | 562 +++++++++++++++ include/linux/mfd/rohm-bd71828.h | 3 + include/linux/mfd/rohm-bd718x7.h | 13 - include/linux/mfd/rohm-generic.h | 15 +- include/linux/regulator/driver.h | 7 + 25 files changed, 2393 insertions(+), 298 deletions(-) create mode 100644 Documentation/devicetree/bindings/mfd/rohm,bd71815-pmic.yaml create mode 100644 Documentation/devicetree/bindings/regulator/rohm,bd71815-regulator.yaml create mode 100644 drivers/gpio/gpio-bd71815.c create mode 100644 drivers/regulator/bd71815-regulator.c create mode 100644 include/linux/mfd/rohm-bd71815.h base-commit: 0d02ec6b3136c73c09e7859f0d0e4e2c4c07b49b -- 2.25.4 -- Matti Vaittinen, Linux device drivers ROHM Semiconductors, Finland SWDC Kiviharjunlenkki 1E 90220 OULU FINLAND ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ Simon says - in Latin please. ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ Thanks to Simon Glass for the translation =] commit c2bcb4cf021121d7c162e44b7773281891e3abc2 Merge: bd78980be1a68 89d69c5d0fbca Author: David S. Miller Date: Fri Apr 2 11:03:07 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-04-01 The following pull-request contains BPF updates for your *net-next* tree. We've added 68 non-merge commits during the last 7 day(s) which contain a total of 70 files changed, 2944 insertions(+), 1139 deletions(-). The main changes are: 1) UDP support for sockmap, from Cong. 2) Verifier merge conflict resolution fix, from Daniel. 3) xsk selftests enhancements, from Maciej. 4) Unstable helpers aka kernel func calling, from Martin. 5) Batches ops for LPM map, from Pedro. 6) Fix race in bpf_get_local_storage, from Yonghong. ==================== Signed-off-by: David S. Miller commit 07cbd87b0416d7b6b8419b2a56bc63659de5d066 Author: Andy Shevchenko Date: Fri Apr 2 20:43:34 2021 +0300 ipmi_si: Join string literals back For easy grepping on debug purposes join string literals back in the messages. No functional change. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-11-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit 25f314db2eff4902668a80f4bade321cdc8aa902 Author: Andy Shevchenko Date: Fri Apr 2 20:43:33 2021 +0300 ipmi_si: Drop redundant check before calling put_device() put_device() is NULL aware, drop redundant check before calling it. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-10-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit d14ce8c7708766a75fcb0ceca69cabcadfad9e43 Author: Andy Shevchenko Date: Fri Apr 2 20:43:32 2021 +0300 ipmi_si: Use strstrip() to remove surrounding spaces Instead of home grown analogue, use strstrip() from the kernel library. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-9-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit 2dafddb8829fdc8969c2aad9fc6852419102d7fa Author: Andy Shevchenko Date: Fri Apr 2 20:43:31 2021 +0300 ipmi_si: Get rid of ->addr_source_cleanup() The ->addr_source_cleanup() callback is solely used by PCI driver and only for one purpose, i.e. to disable device. Get rid of ->addr_source_cleanup() by switching to PCI managed API. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-8-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit 59cdb2e7c849656a1509b8c20cab2be1743631b2 Author: Andy Shevchenko Date: Fri Apr 2 20:43:30 2021 +0300 ipmi_si: Reuse si_to_str[] array in ipmi_hardcode_init_one() Instead of making the comparison one by one, reuse si_to_str[] array in ipmi_hardcode_init_one() in conjunction with match_string() API. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-7-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit 649a7d46d0840fc44d181cc6b3e608b46c77a86d Author: Andy Shevchenko Date: Fri Apr 2 20:43:29 2021 +0300 ipmi_si: Introduce ipmi_panic_event_str[] array Instead of repeating twice the constant literals, introduce ipmi_panic_event_str[] array. It allows to simplify the code with help of match_string() API. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-6-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit bd7a33bfa1f1d0295058003899568570a7de0998 Author: Andy Shevchenko Date: Fri Apr 2 20:43:28 2021 +0300 ipmi_si: Use proper ACPI macros to check error code for failures Instead of direct comparison, use proper ACPI macros to check error code for failures. While at it, drop unneeded 'else' keyword. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-5-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit 96c4d0de912c6a7cfc8f7aae1aadff9467d7b996 Author: Andy Shevchenko Date: Fri Apr 2 20:43:27 2021 +0300 ipmi_si: Utilize temporary variable to hold device pointer Introduce a temporary variable to hold a device pointer. It can be utilized in the ->probe() and save a bit of LOCs. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-4-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit ea63a26e2b7105d3bef517d1ca893b9e666488a8 Author: Andy Shevchenko Date: Fri Apr 2 20:43:26 2021 +0300 ipmi_si: Remove bogus err_free label There is no more 'free' in the error path, so drop the label and return errors inline. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-3-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit 079dea006fb819c2f24f975da6627b161108083d Author: Andy Shevchenko Date: Fri Apr 2 20:43:25 2021 +0300 ipmi_si: Switch to use platform_get_mem_or_io() Switch to use new platform_get_mem_or_io() instead of home grown analogue. Note, we also introduce ipmi_set_addr_data_and_space() helper here. Signed-off-by: Andy Shevchenko Message-Id: <20210402174334.13466-2-andriy.shevchenko@linux.intel.com> Signed-off-by: Corey Minyard commit fb8fee9efdcf084d9e31ba14cc4734d97e5dd972 Author: Matti Vaittinen Date: Mon Mar 29 15:59:04 2021 +0300 regulator: Add regmap helper for ramp-delay setting Quite a few regulator ICs do support setting ramp-delay by writing a value matching the delay to a ramp-delay register. Provide a simple helper for table-based delay setting. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/f101f1db564cf32cb58719c77af0b00d7236bb89.1617020713.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit e3baacf54275647a018ee35bff3bc775a8a2a01a Author: Matti Vaittinen Date: Mon Mar 29 15:57:33 2021 +0300 regulator: helpers: Export helper voltage listing Some drivers need to translate voltage values to selectors prior regulator registration. Currently a regulator_desc based list_voltages helper is only exported for regulators using the linear_ranges. Export similar helper also for regulators using simple linear mapping. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/1200ef7a50c84327ada019b85f6527b4fc9b5ce1.1617020713.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown commit f9d2d86dc52118bc237ed081128df30faa4a5761 Author: Geert Uytterhoeven Date: Fri Apr 2 13:57:49 2021 +0200 dt-bindings: fpga: fpga-region: Convert to sugar syntax Using overlay sugar syntax makes the DTS files easier to read (and write). While at it, fix two build issues: - "/dts-v1/" and "/plugin/" must be separate statements. - Add a missing closing curly brace. Signed-off-by: Geert Uytterhoeven Signed-off-by: Moritz Fischer commit 09fbed636382867733c1713c9fe2fa2926dac537 Author: Daniel Wagner Date: Thu Apr 1 11:54:12 2021 +0200 nvme: export fast_io_fail_tmo to sysfs Commit 8c4dfea97f15 ("nvme-fabrics: reject I/O to offline device") introduced fast_io_fail_tmo but didn't export the value to sysfs. The value can be set during the 'nvme connect'. Export the timeout value to user space via sysfs to allow runtime configuration. Cc: Victor Gladkov Signed-off-by: Daniel Wagner Reviewed-by: Ewan D. Milne Reviewed-by: Sagi Grimberg Reviewed-by: Himanshu Madhani Signed-off-by: Christoph Hellwig commit 25a64e4e7ef6da605a86ec1bff18d2c3c6ed5329 Author: Daniel Wagner Date: Thu Apr 1 11:54:11 2021 +0200 nvme: remove superfluous else in nvme_ctrl_loss_tmo_store If there is an error we will leave the function early. So there is no need for an else. Remove it. Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit bff4bcf3cfc1595e0ef2aeb774b2403c88de1486 Author: Daniel Wagner Date: Thu Apr 1 11:54:10 2021 +0200 nvme: use sysfs_emit instead of sprintf sysfs_emit is the recommended API to use for formatting strings to be returned to user space. It is equivalent to scnprintf and aware of the PAGE_SIZE buffer size. Suggested-by: Chaitanya Kulkarni Signed-off-by: Daniel Wagner Signed-off-by: Christoph Hellwig commit 8df1bff57c7e5fc7747b9236561079907d8cf82e Author: Max Gurtovoy Date: Tue Mar 30 23:01:20 2021 +0000 nvme-fc: check sgl supported by target SGLs support is mandatory for NVMe/FC, make sure that the target is aligned to the specification. Signed-off-by: Max Gurtovoy Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 73ffcefcfca047e5c13a3f81d2cf22eff18732c1 Author: Max Gurtovoy Date: Tue Mar 30 23:01:19 2021 +0000 nvme-tcp: check sgl supported by target SGLs support is mandatory for NVMe/tcp, make sure that the target is aligned to the specification. Signed-off-by: Max Gurtovoy Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit d8e7b462f5b8b93920c6c6a191be887b32306e6b Author: Wunderlich, Mark Date: Wed Mar 31 21:38:30 2021 +0000 nvmet-tcp: enable optional queue idle period tracking Add 'idle_poll_period_usecs' option used by io_work() to support network devices enabled with advanced interrupt moderation supporting a relaxed interrupt model. It was discovered that such a NIC used on the target was unable to support initiator connection establishment, caused by the existing io_work() flow that immediately exits after a loop with no activity and does not re-queue itself. With this new option a queue is assigned a period of time that no activity must occur in order to become 'idle'. Until the queue is idle the work item is requeued. The new module option is defined as changeable making it flexible for testing purposes. The pre-existing legacy behavior is preserved when no module option for idle_poll_period_usecs is specified. Signed-off-by: Mark Wunderlich Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit b5332a9f3f3d884a1b646ce155e664cc558c1722 Author: Sagi Grimberg Date: Sun Mar 21 00:08:49 2021 -0700 nvmet-tcp: fix incorrect locking in state_change sk callback We are not changing anything in the TCP connection state so we should not take a write_lock but rather a read lock. This caused a deadlock when running nvmet-tcp and nvme-tcp on the same system, where state_change callbacks on the host and on the controller side have causal relationship and made lockdep report on this with blktests: ================================ WARNING: inconsistent lock state 5.12.0-rc3 #1 Tainted: G I -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-R} usage. nvme/1324 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff888363151000 (clock-AF_INET){++-?}-{2:2}, at: nvme_tcp_state_change+0x21/0x150 [nvme_tcp] {IN-SOFTIRQ-W} state was registered at: __lock_acquire+0x79b/0x18d0 lock_acquire+0x1ca/0x480 _raw_write_lock_bh+0x39/0x80 nvmet_tcp_state_change+0x21/0x170 [nvmet_tcp] tcp_fin+0x2a8/0x780 tcp_data_queue+0xf94/0x1f20 tcp_rcv_established+0x6ba/0x1f00 tcp_v4_do_rcv+0x502/0x760 tcp_v4_rcv+0x257e/0x3430 ip_protocol_deliver_rcu+0x69/0x6a0 ip_local_deliver_finish+0x1e2/0x2f0 ip_local_deliver+0x1a2/0x420 ip_rcv+0x4fb/0x6b0 __netif_receive_skb_one_core+0x162/0x1b0 process_backlog+0x1ff/0x770 __napi_poll.constprop.0+0xa9/0x5c0 net_rx_action+0x7b3/0xb30 __do_softirq+0x1f0/0x940 do_softirq+0xa1/0xd0 __local_bh_enable_ip+0xd8/0x100 ip_finish_output2+0x6b7/0x18a0 __ip_queue_xmit+0x706/0x1aa0 __tcp_transmit_skb+0x2068/0x2e20 tcp_write_xmit+0xc9e/0x2bb0 __tcp_push_pending_frames+0x92/0x310 inet_shutdown+0x158/0x300 __nvme_tcp_stop_queue+0x36/0x270 [nvme_tcp] nvme_tcp_stop_queue+0x87/0xb0 [nvme_tcp] nvme_tcp_teardown_admin_queue+0x69/0xe0 [nvme_tcp] nvme_do_delete_ctrl+0x100/0x10c [nvme_core] nvme_sysfs_delete.cold+0x8/0xd [nvme_core] kernfs_fop_write_iter+0x2c7/0x460 new_sync_write+0x36c/0x610 vfs_write+0x5c0/0x870 ksys_write+0xf9/0x1d0 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae irq event stamp: 10687 hardirqs last enabled at (10687): [] _raw_spin_unlock_irqrestore+0x2d/0x40 hardirqs last disabled at (10686): [] _raw_spin_lock_irqsave+0x68/0x90 softirqs last enabled at (10684): [] __do_softirq+0x608/0x940 softirqs last disabled at (10649): [] do_softirq+0xa1/0xd0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(clock-AF_INET); lock(clock-AF_INET); *** DEADLOCK *** 5 locks held by nvme/1324: #0: ffff8884a01fe470 (sb_writers#4){.+.+}-{0:0}, at: ksys_write+0xf9/0x1d0 #1: ffff8886e435c090 (&of->mutex){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x216/0x460 #2: ffff888104d90c38 (kn->active#255){++++}-{0:0}, at: kernfs_remove_self+0x22d/0x330 #3: ffff8884634538d0 (&queue->queue_lock){+.+.}-{3:3}, at: nvme_tcp_stop_queue+0x52/0xb0 [nvme_tcp] #4: ffff888363150d30 (sk_lock-AF_INET){+.+.}-{0:0}, at: inet_shutdown+0x59/0x300 stack backtrace: CPU: 26 PID: 1324 Comm: nvme Tainted: G I 5.12.0-rc3 #1 Hardware name: Dell Inc. PowerEdge R640/06NR82, BIOS 2.10.0 11/12/2020 Call Trace: dump_stack+0x93/0xc2 mark_lock_irq.cold+0x2c/0xb3 ? verify_lock_unused+0x390/0x390 ? stack_trace_consume_entry+0x160/0x160 ? lock_downgrade+0x100/0x100 ? save_trace+0x88/0x5e0 ? _raw_spin_unlock_irqrestore+0x2d/0x40 mark_lock+0x530/0x1470 ? mark_lock_irq+0x1d10/0x1d10 ? enqueue_timer+0x660/0x660 mark_usage+0x215/0x2a0 __lock_acquire+0x79b/0x18d0 ? tcp_schedule_loss_probe.part.0+0x38c/0x520 lock_acquire+0x1ca/0x480 ? nvme_tcp_state_change+0x21/0x150 [nvme_tcp] ? rcu_read_unlock+0x40/0x40 ? tcp_mtu_probe+0x1ae0/0x1ae0 ? kmalloc_reserve+0xa0/0xa0 ? sysfs_file_ops+0x170/0x170 _raw_read_lock+0x3d/0xa0 ? nvme_tcp_state_change+0x21/0x150 [nvme_tcp] nvme_tcp_state_change+0x21/0x150 [nvme_tcp] ? sysfs_file_ops+0x170/0x170 inet_shutdown+0x189/0x300 __nvme_tcp_stop_queue+0x36/0x270 [nvme_tcp] nvme_tcp_stop_queue+0x87/0xb0 [nvme_tcp] nvme_tcp_teardown_admin_queue+0x69/0xe0 [nvme_tcp] nvme_do_delete_ctrl+0x100/0x10c [nvme_core] nvme_sysfs_delete.cold+0x8/0xd [nvme_core] kernfs_fop_write_iter+0x2c7/0x460 new_sync_write+0x36c/0x610 ? new_sync_read+0x600/0x600 ? lock_acquire+0x1ca/0x480 ? rcu_read_unlock+0x40/0x40 ? lock_is_held_type+0x9a/0x110 vfs_write+0x5c0/0x870 ksys_write+0xf9/0x1d0 ? __ia32_sys_read+0xa0/0xa0 ? lockdep_hardirqs_on_prepare.part.0+0x198/0x340 ? syscall_enter_from_user_mode+0x27/0x70 do_syscall_64+0x33/0x40 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Reported-by: Yi Zhang Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 8b73b45d54a14588f86792869bfb23098ea254cb Author: Sagi Grimberg Date: Sun Mar 21 00:08:48 2021 -0700 nvme-tcp: block BH in sk state_change sk callback The TCP stack can run from process context for a long time so we should disable BH here. Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver") Signed-off-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 79695dcd9ad4463a82def7f42960e6d7baa76f0b Author: Hou Pu Date: Wed Mar 31 14:52:39 2021 +0800 nvmet: return proper error code from discovery ctrl Return NVME_SC_INVALID_FIELD from discovery controller like normal controller when executing identify or get log page command. Signed-off-by: Hou Pu Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit ed4a854b062b841ebc1aa576f27daf72d07150a5 Author: Keith Busch Date: Wed Mar 17 13:33:41 2021 -0700 nvme: warn of unhandled effects only once We don't need to repeatedly spam the kernel logs with the same warning about unhandled passthrough IO effects. Just one warning is sufficient to observe this condition occurs. Signed-off-by: Keith Busch Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit f4b9e6c90c572519041f4c5d9c4c3dd50aff42d4 Author: Keith Busch Date: Wed Mar 17 13:37:03 2021 -0700 nvme: use driver pdu command for passthrough All nvme transport drivers preallocate an nvme command for each request. Assume to use that command for nvme_setup_cmd() instead of requiring drivers pass a pointer to it. All nvme drivers must initialize the generic nvme_request 'cmd' to point to the transport's preallocated nvme_command. The generic nvme_request cmd pointer had previously been used only as a temporary copy for passthrough commands. Since it now points to the command that gets dispatched, passthrough commands must directly set it up prior to executing the request. Signed-off-by: Keith Busch Reviewed-by: Jens Axboe Reviewed-by: Himanshu Madhani Signed-off-by: Christoph Hellwig commit af7fae857ea22e9c2aef812e1321d9c5c206edde Author: Keith Busch Date: Wed Mar 17 13:37:02 2021 -0700 nvme-pci: allocate nvme_command within driver pdu Except for pci, all the nvme transport drivers allocate a command within the driver's pdu. Align pci with everyone else by allocating the nvme command within pci's pdu and replace the .queue_rq() stack variable with this. Signed-off-by: Keith Busch Reviewed-by: Jens Axboe Reviewed-by: Sagi Grimberg Reviewed-by: Chaitanya Kulkarni Reviewed-by: Himanshu Madhani Signed-off-by: Christoph Hellwig commit 48b4c010c85bbd319fbcae79b2d602857a2e9345 Author: Noam Gottlieb Date: Mon Mar 15 14:56:11 2021 +0000 nvmet: do not allow model_number exceed 40 bytes According to the NVM specifications, the model number size should be 40 bytes (bytes 63:24 of the Identify Controller data structure). Therefore, any attempt to store a value into model_number which exceeds 40 bytes should return an error. Reviewed-by: Max Gurtovoy Signed-off-by: Noam Gottlieb Signed-off-by: Christoph Hellwig commit de5878048e11f1ec44164ebb8994de132074367a Author: Chaitanya Kulkarni Date: Tue Mar 9 17:16:32 2021 -0800 nvmet: remove unnecessary ctrl parameter The function nvmet_ctrl_find_get() accepts out pointer to nvmet_ctrl structure. This function returns the same error value from two places that is :- NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR. Move this to the caller so we can change the return type to nvmet_ctrl. Now that we can changed the return type, instead of taking out pointer to the nvmet_ctrl structure remove that function parameter and return the valid nvmet_ctrl pointer on success and NULL on failure. Also, add and rename the goto labels for more readability with comments. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit b53d47418d98dbf5cd082e756a9e4e2a426492d7 Author: Chaitanya Kulkarni Date: Sun Feb 28 18:06:10 2021 -0800 nvmet-fc: update function documentation Add minimum description of the hosthandle parameter for nvmet_fc_rcv_ls_req() so that we can get rid of the following warning. drivers/nvme//target/fc.c:2009: warning: Function parameter or member 'hosthandle' not described in 'nvmet_fc_rcv_ls_req Signed-off-by: Chaitanya Kulkarni Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit 2afc4866c44e85e3413b294c982e51061fba505b Author: Chaitanya Kulkarni Date: Sun Feb 28 18:06:09 2021 -0800 nvme-fc: fix the function documentation comment The nvme_fc_rcv_ls_req() function has first argument as pointer to remoteport named portprt, but in the documentation comment that is name is used as remoteport. Fix that to get rid if the compilation warning. drivers/nvme//host/fc.c:1724: warning: Function parameter or member 'portptr' not described in 'nvme_fc_rcv_ls_req' drivers/nvme//host/fc.c:1724: warning: Excess function parameter 'remoteport' description in 'nvme_fc_rcv_ls_req' Signed-off-by: Chaitanya Kulkarni Reviewed-by: James Smart Signed-off-by: Christoph Hellwig commit f1c772d581843e3a14bbd62ef7e40b56fc307f27 Author: Chaitanya Kulkarni Date: Sun Feb 28 18:06:11 2021 -0800 nvme: add new line after variable declatation Add a new line in functions nvme_pr_preempt(), nvme_pr_clear(), and nvme_pr_release() after variable declaration which follows the rest of the code in the nvme/host/core.c. No functional change(s) in this patch. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit c03fd85de293a4f65fcb94a795bf4c12a432bb6c Author: Chaitanya Kulkarni Date: Sun Feb 28 18:06:08 2021 -0800 nvme: don't check nvme_req flags for new req nvme_clear_request() has a check for flag REQ_DONTPREP and it is called from nvme_init_request() and nvme_setuo_cmd(). The function nvme_init_request() is called from nvme_alloc_request() and nvme_alloc_request_qid(). From these two callers new request is allocated everytime. For newly allocated request RQF_DONTPREP is never set. Since after getting a tag, block layer sets the req->rq_flags == 0 and never sets the REQ_DONTPREP when returning the request :- nvme_alloc_request() blk_mq_alloc_request() blk_mq_rq_ctx_init() rq->rq_flags = 0 <---- nvme_alloc_request_qid() blk_mq_alloc_request_hctx() blk_mq_rq_ctx_init() rq->rq_flags = 0 <---- The block layer does set req->rq_flags but REQ_DONTPREP is not one of them and that is set by the driver. That means we can unconditinally set the REQ_DONTPREP value to the rq->rq_flags when nvme_init_request()->nvme_clear_request() is called from above two callers. Move the check for REQ_DONTPREP from nvme_clear_nvme_request() into nvme_setup_cmd(). This is needed since nvme_alloc_request() now gets called from fast path when NVMeOF target is configured with passthru backend to avoid unnecessary checks in the fast path. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 7a36604668b9b1f84126ef0342144ba5b07e518f Author: Chaitanya Kulkarni Date: Sun Feb 28 18:06:06 2021 -0800 nvme: mark nvme_setup_passsthru() inline Since nvmet_setup_passthru() function falls in fast path when called from the NVMeOF passthru backend, make it inline. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 44ef5611c2a56538c60211672f73e4ff7df913c7 Author: Chaitanya Kulkarni Date: Sun Feb 28 18:06:05 2021 -0800 nvme: split init identify into helper The function nvme_init_ctrl_finish() (formerly nvme_init_identify()) has grown over the period of time about ~200 lines given the size of nvme id ctrl data structure. Move the nvme_id_ctrl data structure related initilzation into helper nvme_init_identify() and call it from nvme_init_ctrl_finish(). When we move the code into nvme_init_identify() change the local variable i from int to unsigned int and remove the duplicate kfree() after nvme_mpath_init() and jump to the label out_free if nvme_mpath_ini() fails. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit f21c4769d0de00f4873792f8e6f2d1c04c8cd898 Author: Chaitanya Kulkarni Date: Sun Feb 28 18:06:04 2021 -0800 nvme: rename nvme_init_identify() This is a prep patch so that we can move the identify data structure related code initialization from nvme_init_identify() into a helper. Rename the function nvmet_init_identify() to nvmet_init_ctrl_finish(). Next patch will move the nvme_id_ctrl related initialization from newly renamed function nvme_init_ctrl_finish() into the nvme_init_identify() helper. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 18479ddb7fd5fd0994bd10a95618bf866713a11b Author: Kanchan Joshi Date: Tue Mar 9 00:48:04 2021 +0530 nvme: reduce checks for zero command effects For passthrough I/O commands, effects are usually to be zero. nvme_passthrough_end() does three checks in futility for this case. Bail out of function-call/checks. Signed-off-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 2bd643079ec1c44fac66838c27b993b78e8930a7 Author: Kanchan Joshi Date: Tue Mar 9 00:48:03 2021 +0530 nvme: use NVME_CTRL_CMIC_ANA macro Use the proper macro instead of hard-coded value. Signed-off-by: Kanchan Joshi Reviewed-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit 75b5f9edb5fd23dbed274f946a2b4a19bbaaa234 Author: Chaitanya Kulkarni Date: Wed Feb 24 17:56:42 2021 -0800 nvmet: replace white spaces with tabs Instead of the using the whitespaces use tab spacing in the nvmet_execute_identify_ns(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 7798df6fcf4457d151a693f5948f232b13bcb937 Author: Chaitanya Kulkarni Date: Wed Feb 24 17:56:40 2021 -0800 nvmet: remove an unnecessary function parameter to nvmet_check_ctrl_status In nvmet_check_ctrl_status() cmd can be derived from nvmet_req. Remove the local variable cmd in the nvmet_check_ctrl_status() and function parameter cmd for nvmet_check_ctrl_status(). Derive the cmd value from req parameter in the nvmet_check_ctrl_status(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit a56f14c26df8127815e35ae0272296aaa917a22e Author: Chaitanya Kulkarni Date: Wed Feb 24 17:56:38 2021 -0800 nvmet: update error log page in nvmet_alloc_ctrl() Instead of updating the error log page in the caller of the nvmet_alloc_ctrt() update the error log page in the nvmet_alloc_ctrl(). Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 76affbe6d608490c6c762428b6a0748c9b797a1e Author: Chaitanya Kulkarni Date: Wed Feb 24 17:56:37 2021 -0800 nvmet: remove a duplicate status assignment in nvmet_alloc_ctrl In the function nvmet_alloc_ctrl() we assign status value before we call nvmet_fine_get_subsys() to: status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR; After we successfully find the subsystem we again set the status value to: status = NVME_SC_CONNECT_INVALID_PARAM | NVME_SC_DNR; Remove the duplicate status assignment value. Signed-off-by: Chaitanya Kulkarni Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig commit 05fae499a944a6d7e2fbd60a7966d407bdb82967 Author: Chaitanya Kulkarni Date: Tue Feb 23 12:47:41 2021 -0800 nvme-pci: cleanup nvme_irq() Get rid of a local variable that is not needed and just return the status directly. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig commit e9c78c23359fad8c58fa5654efe7320c8128f4af Author: Chaitanya Kulkarni Date: Tue Feb 23 12:47:40 2021 -0800 nvme-pci: remove the barriers in nvme_irq() The barriers were added to the nvme_irq() in commit 3a7afd8ee42a ("nvme-pci: remove the CQ lock for interrupt driven queues") to prevent compiler from doing memory optimization for the variabes that were protected previously by spinlock in nvme_irq() at completion queue processing and with queue head check condition. The variable nvmeq->last_cq_head from those checks was removed in the commit f6c4d97b0d82 ("nvme/pci: Remove last_cq_head") that was not allwing poll queues from mistakenly triggering the spurious interrupt detection. Remove the barriers which were protecting the updates to the variables. Reported-by: Heiner Kallweit Signed-off-by: Chaitanya Kulkarni Reviewed-by: Heiner Kallweit Signed-off-by: Christoph Hellwig commit 6b3caab4ba9b2d290162e610810a946a33c65117 Author: Eric Whitney Date: Tue Feb 16 14:16:34 2021 -0500 ext4: delete some unused tracepoint definitions A number of tracepoint instances have been removed from ext4 by past patches but the definitions of those tracepoints have not. All instances of ext4_ext_in_cache and ext4_ext_put_in_cache were removed by commit 69eb33dc24dc ("ext4: remove single extent cache"). ext4_get_reserved_cluster_alloc was removed by commit b6bf9171ef5c ("ext4: reduce reserved cluster count by number of allocated clusters"). ext4_find_delalloc_range was removed by commit 7d1b1fbc95eb ("ext4: reimplement ext4_find_delay_alloc_range on extent status tree"). All instances of ext4_direct_IO_enter and ext4_direct_IO_exit were removed by commit 378f32bab371 ("ext4: introduce direct I/O write using iomap infrastructure"). Signed-off-by: Eric Whitney Link: https://lore.kernel.org/r/20210216191634.20957-1-enwlinux@gmail.com Signed-off-by: Theodore Ts'o commit 3042b1b45c4106feff063932d4fd481c5009dbe1 Author: Alexander Lochmann Date: Thu Feb 11 18:14:10 2021 +0100 Updated locking documentation for transaction_t Some members of transaction_t are allowed to be read without any lock being held if accessed from the correct context. We used LockDoc's findings to determine those members. Each member of them is marked with a short comment: "no lock needed for jbd2 thread". Signed-off-by: Alexander Lochmann Signed-off-by: Horst Schirmeier Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/20210211171410.17984-1-alexander.lochmann@tu-dortmund.de Signed-off-by: Theodore Ts'o commit d699ae4fc27496d01e8bc5ab2106bd79d1e7be92 Author: Alexander Lochmann Date: Thu Feb 11 10:51:55 2021 +0100 ext4: updated locking documentation for journal_t Some members of transaction_t are allowed to be read without any lock being held if consistency doesn't matter. Based on LockDoc's findings, we extended the locking documentation of those members. Each one of them is marked with a short comment: "no lock for quick racy checks". Signed-off-by: Alexander Lochmann Signed-off-by: Horst Schirmeier Reviewed-by: Jan Kara Link: https://lore.kernel.org/r/ad82c7a9-a624-4ed5-5ada-a6410c44c0b3@tu-dortmund.de Signed-off-by: Theodore Ts'o commit e992a51b1d14317f414d4b9935966dca96ac0b36 Author: Hans de Goede Date: Fri Apr 2 16:07:47 2021 +0200 ASoC: Intel: cht_bsw_rt5672: Set card.components string Set the card.components string using the new rt5670_components() helper which returns a components string based on the DMI quirks inside the rt5670 codec driver. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210402140747.174716-7-hdegoede@redhat.com Signed-off-by: Mark Brown commit 3d534537648bd7d7a82f2becc9ded99a4b228a6a Author: Hans de Goede Date: Fri Apr 2 16:07:46 2021 +0200 ASoC: rt5670: Add a rt5670_components() helper The rt5670 codec driver uses DMI quirks to configure the DMIC data-pins, which means that it knows which DMIC interface is used on a specific device. ATM we duplicate this DMI matching inside the UCM profiles to select the right DMIC interface. Add a rt5670_components() helper which the machine-driver can use to set the components string of the card so that UCM can get the info from the components string. This way we only need to add new DMI quirks in one place. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210402140747.174716-6-hdegoede@redhat.com Signed-off-by: Mark Brown commit 84cb0d5581b6a7bd5d96013f67e9f2eb0c7b4378 Author: Hans de Goede Date: Fri Apr 2 16:07:45 2021 +0200 ASoC: rt5670: Add a quirk for the Dell Venue 10 Pro 5055 Add a quirk with the jack-detect and dmic settings necessary to make jack-detect and the builtin mic work on Dell Venue 10 Pro 5055 tablets. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210402140747.174716-5-hdegoede@redhat.com Signed-off-by: Mark Brown commit c9b3c63392e578ea74411b29a720ace77ae9041f Author: Hans de Goede Date: Fri Apr 2 16:07:44 2021 +0200 ASoC: Intel: cht_bsw_rt5672: Add support for Bay Trail CR / SSP0 The rt5672 codec is used on some Bay Trail CR boards, on these SoCs SSP2 is not available and SSP0 should be used instead. At support for this. This has been tested on a Dell Venue 10 Pro 5055. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210402140747.174716-4-hdegoede@redhat.com Signed-off-by: Mark Brown commit 17d49b07a8bb3fdc630a44240c7d7e2a18e14b93 Author: Hans de Goede Date: Fri Apr 2 16:07:43 2021 +0200 ASoC: Intel: Baytrail: Add quirk for the Dell Venue 10 Pro 5055 tablet The Dell Venue 10 Pro 5055 tablet uses an ACPI HID of 10EC5640 while using a rt5672 codec (instead of a rt5640 codec). Add a quirk for this. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210402140747.174716-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit ebbb165d2c0c44ffbf480e209f745ed4b0d5560a Author: Hans de Goede Date: Fri Apr 2 16:07:42 2021 +0200 ASoC: Intel: Unify the thinkpad10 and aegex10 byt-match quirks There is no reason to have separate quirk-handlers / byt_machine_id-s for these. These are both cases of BYT devices with a 10EC5640 ACPI HID while using a rt5672 codec. The Dell Venue 10 Pro 5055 is another example of such a device, instead of adding a third byt_machine_id definition for this Dell model, make change the 2 existing cases into a generic BYT_RT5672 byt_machine_id in preparation for adding a quirk for the Dell Venue 10 Pro 5055. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210402140747.174716-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit f7514a6630166a7b566dee9b1af2e87e431959be Author: Saravana Kannan Date: Tue Mar 30 11:50:55 2021 -0700 of: property: fw_devlink: Add support for remote-endpoint remote-endpoint property seems to always come in pairs where two devices point to each other. So, we can't really tell from DT if there is a functional probe order dependency between these two devices. However, there can be other dependencies between two devices that point to each other with remote-endpoint. This non-remote-endpoint dependency combined with one of the remote-endpoint dependency can lead to a cyclic dependency[1]. To avoid this cyclic dependency from incorrectly blocking probes, fw_devlink needs to be made aware of remote-endpoint dependencies even though remote-endpoint dependencies by themselves won't affect probe ordering (because fw_devlink will see the cyclic dependency between remote-endpoint devices and ignore the dependencies that cause the cycle). Also, if a device ever needs to know if a non-probe-blocking remote-endpoint has finished probing, it can now use the sync_state() to figure it out. [1] - https://lore.kernel.org/lkml/CAGETcx9Snf23wrXqjDhJiTok9M3GcoVYDSyNYSMj9QnSRrA=cA@mail.gmail.com/#t Fixes: ea718c699055 ("Revert "Revert "driver core: Set fw_devlink=on by default""") Reported-by: Stephen Boyd Tested-by: Stephen Boyd Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20210330185056.1022008-1-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit ed7027fdf4ec41ed6df6814956dc11860232a9d5 Author: Andy Shevchenko Date: Wed Mar 31 17:45:26 2021 +0300 driver core: platform: Make platform_get_irq_optional() optional Currently the platform_get_irq_optional() returns an error code even if IRQ resource sumply has not been found. It prevents caller to be error code agnostic in their error handling. Now: ret = platform_get_irq_optional(...); if (ret != -ENXIO) return ret; // respect deferred probe if (ret > 0) ...we get an IRQ... After proposed change: ret = platform_get_irq_optional(...); if (ret < 0) return ret; if (ret > 0) ...we get an IRQ... Reported-by: Matthias Schiffer Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210331144526.19439-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 318c3e00f13c2f6e11202a22cc302ea8c70552ea Author: Andy Shevchenko Date: Thu Apr 1 20:10:42 2021 +0300 driver core: Replace printf() specifier and drop unneeded casting The size_t type has very well established specifier, i.e. "%zu", use it directly instead of casting to unsigned long with "%lu". Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210401171042.60612-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit d7aa44f5a1f86cb40659eef06035d8d92604b9d5 Author: Andy Shevchenko Date: Thu Apr 1 20:10:30 2021 +0300 driver core: Cast to (void *) with __force for __percpu pointer Sparse is not happy: drivers/base/devres.c:1230:9: warning: cast removes address space '__percpu' of expression Use __force attribute to make it happy. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210401171030.60527-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1768289b44bae847612751d418fc5c5e680b5e5c Author: Andy Shevchenko Date: Wed Mar 31 18:05:25 2021 +0300 driver core: platform: Declare early_platform_cleanup() prototype Compiler is not happy: CC drivers/base/platform.o drivers/base/platform.c:1557:20: warning: no previous prototype for ‘early_platform_cleanup’ [-Wmissing-prototypes] 1557 | void __weak __init early_platform_cleanup(void) { } | ^~~~~~~~~~~~~~~~~~~~~~ Declare early_platform_cleanup() prototype in the header to make everyone happy. Fixes: eecd37e105f0 ("drivers: Fix boot problem on SuperH") Cc: Guenter Roeck Reviewed-by: Guenter Roeck Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210331150525.59223-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit c99f4ebc685d6e8e504f09be4bb28789875ff3db Author: Andy Shevchenko Date: Wed Mar 31 17:59:36 2021 +0300 driver core: platform: Make clear error code used for missed IRQ We have few code paths where same error code is assigned and returned for missed IRQ. Unify that under single error path. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210331145937.35980-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a7f3d3d3600c8ed119eb0d2483de0062ce2e3707 Author: Heiner Kallweit Date: Fri Mar 26 22:03:05 2021 +0100 dma-mapping: add unlikely hint to error path in dma_mapping_error Zillions of drivers use the unlikely() hint when checking the result of dma_mapping_error(). This is an inline function anyway, so we can move the hint into the function and remove it from drivers over time. Signed-off-by: Heiner Kallweit Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig commit ca947482b0b30443e6da1f0f5ba7244e34a4f65a Author: Xiang Chen Date: Thu Mar 18 17:29:30 2021 +0800 dma-mapping: benchmark: Add support for multi-pages map/unmap Currently it only support one page map/unmap once a time for dma-map benchmark, but there are some other scenaries which need to support for multi-page map/unmap: for those multi-pages interfaces such as dma_alloc_coherent() and dma_map_sg(), the time spent on multi-pages map/unmap is not the time of a single page * npages (not linear) as it may use block description instead of page description when it is satified with the size such as 2M/1G, and also it can send a single TLB invalidation command to invalidate multi-pages instead of multi-times when RIL is enabled (which will short the time of unmap). So it is necessary to add support for multi-pages map/unmap. Add a parameter "-g" to support multi-pages map/unmap. Signed-off-by: Xiang Chen Acked-by: Barry Song Signed-off-by: Christoph Hellwig commit 42e4eefb089f12ea900062ecdcc7ca10c3423a05 Author: Hao Fang Date: Tue Mar 30 14:33:48 2021 +0800 dma-mapping: benchmark: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g. It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Acked-by: Barry Song Signed-off-by: Christoph Hellwig commit cc710790233eb5ca1dc2aeb3a1d1851343c1a1d4 Author: Pierre-Louis Bossart Date: Wed Mar 31 18:26:14 2021 -0500 devcoredump: fix kernel-doc warning remove make W=1 warnings drivers/base/devcoredump.c:208: warning: Function parameter or member 'data' not described in 'devcd_free_sgtable' drivers/base/devcoredump.c:208: warning: Excess function parameter 'table' description in 'devcd_free_sgtable' drivers/base/devcoredump.c:225: warning: expecting prototype for devcd_read_from_table(). Prototype was for devcd_read_from_sgtable() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210331232614.304591-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3c652132ce9052e626bf509932fcacfebed1ccb4 Author: Pierre-Louis Bossart Date: Wed Mar 31 18:26:13 2021 -0500 platform-msi: fix kernel-doc warnings remove make W=1 warnings drivers/base/platform-msi.c:336: warning: Function parameter or member 'is_tree' not described in '__platform_msi_create_device_domain' drivers/base/platform-msi.c:336: warning: expecting prototype for platform_msi_create_device_domain(). Prototype was for __platform_msi_create_device_domain() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210331232614.304591-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit f4651a7dd6f7133d9f1132c46e7005dfdaf10ae0 Author: Pierre-Louis Bossart Date: Wed Mar 31 18:26:09 2021 -0500 driver core: attribute_container: remove kernel-doc warnings Remove make W=1 warnings drivers/base/attribute_container.c:471: warning: Function parameter or member 'cont' not described in 'attribute_container_add_class_device_adapter' drivers/base/attribute_container.c:471: warning: Function parameter or member 'dev' not described in 'attribute_container_add_class_device_adapter' drivers/base/attribute_container.c:471: warning: Function parameter or member 'classdev' not described in 'attribute_container_add_class_device_adapter' Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210331232614.304591-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 37c52f74031bba97a3d27f4549f8bb048682e1c4 Author: Pierre-Louis Bossart Date: Wed Mar 31 18:26:08 2021 -0500 driver core: remove kernel-doc warnings remove make W=1 warning: drivers/base/core.c:1670: warning: Function parameter or member 'flags' not described in 'fw_devlink_create_devlink' drivers/base/core.c:1670: warning: Function parameter or member 'con' not described in 'fw_devlink_create_devlink' drivers/base/core.c:1670: warning: Function parameter or member 'sup_handle' not described in 'fw_devlink_create_devlink' drivers/base/core.c:1670: warning: Function parameter or member 'flags' not described in 'fw_devlink_create_devlink' drivers/base/core.c:1763: warning: Function parameter or member 'dev' not described in '__fw_devlink_link_to_consumers' drivers/base/core.c:1844: warning: Function parameter or member 'dev' not described in '__fw_devlink_link_to_suppliers' drivers/base/core.c:1844: warning: Function parameter or member 'fwnode' not described in '__fw_devlink_link_to_suppliers' Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210331232614.304591-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit b0077b4b085f636e5f8a1fd9cd6e568907471b24 Author: Evan Green Date: Thu Apr 1 14:04:36 2021 -0700 firmware: google: Enable s0ix logging by default Many moons ago, support was added to the SMI handlers to log s0ix entry and exit. Early iterations of firmware on Apollo Lake correctly returned "unsupported" for this new command they did not recognize, but unfortunately also contained a quirk where this command would cause them to power down rather than resume from s0ix. Fixes for this quirk were pushed out long ago, so all APL devices still in the field should have updated firmware. As such, we no longer need to have the s0ix_logging_enable be opt-in, where every new platform has to add this to their kernel commandline parameters. Change it to be on by default. In theory we could remove the parameter altogether: updated versions of Chrome OS containing a kernel with this change would also be coupled with firmware that behaves properly with these commands. Eventually we should probably do that. For now, convert this to an opt-out parameter so there's an emergency valve for people who are deliberately running old firmware, or as an escape hatch in case of unforeseen regressions. Signed-off-by: Evan Green Link: https://lore.kernel.org/r/20210401140430.1.Ie141e6044d9b0d5aba72cb08857fdb43660c54d3@changeid Signed-off-by: Greg Kroah-Hartman commit 38ab861493de18c672b101765751f5e6bb17ec0d Author: Andy Shevchenko Date: Tue Mar 30 22:33:25 2021 +0300 mux: gpio: Simplify code by using dev_err_probe() Use already prepared dev_err_probe() introduced by the commit a787e5400a1c ("driver core: add device probe log helper"). It simplifies EPROBE_DEFER handling. Acked-by: Peter Rosin Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210330193325.68362-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 7fef54e25541c49c99ba5787bfb45216c30df3e7 Author: Andy Shevchenko Date: Tue Mar 30 22:33:24 2021 +0300 mux: gpio: Make it OF independent Module doesn't use OF APIs anyhow, make it OF independent by replacing headers and dropping useless of_match_ptr() call. Acked-by: Peter Rosin Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210330193325.68362-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5c777233c90f80a75cbd79c1b2fd713453dd02ff Author: Andy Shevchenko Date: Tue Mar 30 22:33:23 2021 +0300 mux: gpio: Use bitmap API instead of direct assignment Assigning bitmaps like it's done in the driver might be error prone. Fix this by using bitmap API. Acked-by: Peter Rosin Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210330193325.68362-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5a1bea2a2572ce5eb4bdcf432a6929681ee381f2 Author: Rajendra Nayak Date: Tue Mar 30 12:12:41 2021 +0100 nvmem: qfprom: Add support for fuse blowing on sc7280 Handle the differences across LDO voltage needed for blowing fuses, and the blow timer value, identified using a minor version of 15 on sc7280. Signed-off-by: Rajendra Nayak Signed-off-by: Ravi Kumar Bokka Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-11-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit b1f20fd04577a24bef4616a67a61c6dfe1eedb6b Author: Rajendra Nayak Date: Tue Mar 30 12:12:40 2021 +0100 dt-bindings: nvmem: Add SoC compatible for sc7280 Document SoC compatible for sc7280 Acked-by: Rob Herring Signed-off-by: Rajendra Nayak Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-10-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit cc1bc56fdc76a55bb8fae9a145a2e60bf22fb129 Author: Srinivas Kandagatla Date: Tue Mar 30 12:12:39 2021 +0100 nvmem: rmem: fix undefined reference to memremap Fix below error reporte by kernel test robot rmem.c:(.text+0x14e): undefined reference to memremap s390x-linux-gnu-ld: rmem.c:(.text+0x1b6): undefined reference to memunmap Fixes: 5a3fa75a4d9c ("nvmem: Add driver to expose reserved memory as nvmem") Reported-by: kernel test robot Reviewed-by: Nicolas Saenz Julienne Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-9-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 55022fdeace8e432f008787ce03703bdcc9c3ca9 Author: Colin Ian King Date: Tue Mar 30 12:12:38 2021 +0100 nvmem: core: Fix unintentional sign extension issue The shifting of the u8 integer buf[3] by 24 bits to the left will be promoted to a 32 bit signed int and then sign-extended to a u64. In the event that the top bit of buf[3] is set then all then all the upper 32 bits of the u64 end up as also being set because of the sign-extension. Fix this by casting buf[i] to a u64 before the shift. Fixes: a28e824fb827 ("nvmem: core: Add functions to make number reading easy") Reviewed-by: Douglas Anderson Signed-off-by: Colin Ian King Signed-off-by: Srinivas Kandagatla Addresses-Coverity: ("Unintended sign extension") Link: https://lore.kernel.org/r/20210330111241.19401-8-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit a28e824fb8270eda43fd0f65c2a5fdf33f55c5eb Author: Douglas Anderson Date: Tue Mar 30 12:12:37 2021 +0100 nvmem: core: Add functions to make number reading easy Sometimes the clients of nvmem just want to get a number out of nvmem. They don't want to think about exactly how many bytes the nvmem cell took up. They just want the number. Let's make it easy. In general this concept is useful because nvmem space is precious and usually the fewest bits are allocated that will hold a given value on a given system. However, even though small numbers might be fine on one system that doesn't mean that logically the number couldn't be bigger. Imagine nvmem containing a max frequency for a component. On one system perhaps that fits in 16 bits. On another system it might fit in 32 bits. The code reading this number doesn't care--it just wants the number. We'll provide two functions: nvmem_cell_read_variable_le_u32() and nvmem_cell_read_variable_le_u64(). Comparing these to the existing functions like nvmem_cell_read_u32(): * These new functions have no problems if the value was stored in nvmem in fewer bytes. It's OK to use these function as long as the value stored will fit in 32-bits (or 64-bits). * These functions avoid problems that the earlier APIs had with bit offsets. For instance, you can't use nvmem_cell_read_u32() to read a value has nbits=32 and bit_offset=4 because the nvmem cell must be at least 5 bytes big to hold this value. The new API accounts for this and works fine. * These functions make it very explicit that they assume that the number was stored in little endian format. The old functions made this assumption whenever bit_offset was non-zero (see nvmem_shift_read_buffer_in_place()) but didn't whenever the bit_offset was zero. NOTE: it's assumed that we don't need an 8-bit or 16-bit version of this function. The 32-bit version of the function can be used to read 8-bit or 16-bit data. At the moment, I'm only adding the "unsigned" versions of these functions, but if it ends up being useful someone could add a "signed" version that did 2's complement sign extension. At the moment, I'm only adding the "little endian" versions of these functions. Adding the "big endian" version would require adding "big endian" support to nvmem_shift_read_buffer_in_place(). Signed-off-by: Douglas Anderson Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-7-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 3fef9ed0627af30753a2404b8bd59d92cdb4c0ce Author: Rafał Miłecki Date: Tue Mar 30 12:12:36 2021 +0100 nvmem: brcm_nvram: new driver exposing Broadcom's NVRAM This driver provides access to Broadcom's NVRAM. Signed-off-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-6-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5783bd1970b3046cd3b4493138155a5a22fde873 Author: Rafał Miłecki Date: Tue Mar 30 12:12:35 2021 +0100 dt-bindings: nvmem: add Broadcom's NVRAM Broadcom's NVRAM structure contains device data and can be accessed using I/O mapping. Reviewed-by: Rob Herring Signed-off-by: Rafał Miłecki Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-5-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 9ec4f4b0e9fd3ad4b9a38bddb75b516ea09f4628 Author: Ravi Kumar Bokka Date: Tue Mar 30 12:12:34 2021 +0100 drivers: nvmem: Fix voltage settings for QTI qfprom-efuse QFPROM controller hardware requires 1.8V min for fuse blowing. So, this change sets the voltage to 1.8V, required to blow the fuse for qfprom-efuse controller. To disable fuse blowing, we set the voltage to 0V since this may be a shared rail and may be able to run at a lower rate when we're not blowing fuses. Fixes: 93b4e49f8c86 ("nvmem: qfprom: Add fuse blowing support") Reported-by: Douglas Anderson Suggested-by: Douglas Anderson Reviewed-by: Douglas Anderson Signed-off-by: Ravi Kumar Bokka Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-4-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit e050f160d4832ce5227fb6ca934969cec0fc48be Author: Zheng Yongjun Date: Tue Mar 30 12:12:33 2021 +0100 nvmem: convert comma to semicolon Replace a comma between expression statements by a semicolon. Reviewed-by: Bjorn Andersson Signed-off-by: Zheng Yongjun Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-3-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 2a1405a14c3a741cc6a9154422b852fbafed6c9a Author: Ryan Wu Date: Tue Mar 30 12:12:32 2021 +0100 dt-bindings: nvmem: mediatek: add support for MediaTek mt8192 SoC This updates dt-binding documentation for MediaTek mt8192 Acked-by: Rob Herring Signed-off-by: Ryan Wu Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330111241.19401-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman commit 5751564085e70caf4a5fb31d75cbaeaa723a7511 Author: Shixin Liu Date: Mon Mar 29 17:40:15 2021 +0800 drivers: most: use LIST_HEAD() for list_head There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro. Signed-off-by: Shixin Liu Link: https://lore.kernel.org/r/20210329094015.66942-2-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit 2c4134e78203eb3a1506f9fc51012a3fda4068cb Author: Shixin Liu Date: Mon Mar 29 17:40:14 2021 +0800 drivers: most: use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Shixin Liu Link: https://lore.kernel.org/r/20210329094015.66942-1-liushixin2@huawei.com Signed-off-by: Greg Kroah-Hartman commit c23146e15e570e64b5d8d0ce3b7b82a0bc00ff8f Author: Brad Warrum Date: Tue Mar 30 16:22:38 2021 -0500 MAINTAINERS: Update entry for ibmvmc driver Steve Royer has moved on to a different project and has asked that Ritu and I take over maintainership of the IBM Power Virtual Management Channel Driver. Signed-off-by: Brad Warrum Acked-by: Steven Royer Link: https://lore.kernel.org/r/20210330212238.2747-1-bwarrum@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit 012ac583aa9b512707b39b5a9afb303089a222fe Author: Rasmus Villemoes Date: Fri Mar 26 16:22:54 2021 +0100 greybus: remove stray nul byte in apb_log_enable_read output Including a nul byte in the otherwise human-readable ascii output from this debugfs file is probably not intended. Acked-by: Alex Elder Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20210326152254.733066-1-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit cb4a2d5486b80cf23f11729cd5933f6e2b72a3c1 Author: Matt Hsiao Date: Mon Mar 29 10:53:52 2021 +0800 misc: hpilo: MAINTAINERS: add entry for hpilo The original maintainer left the company, add myself as the successor. Signed-off-by: Matt Hsiao Link: https://lore.kernel.org/r/20210329025352.21485-1-matt.hsiao@hpe.com Signed-off-by: Greg Kroah-Hartman commit 391e2415e9668a47d423c6c935a25340f02b0685 Author: YueHaibing Date: Wed Mar 31 20:17:06 2021 +0800 misc/pvpanic: Make some symbols static Fix sparse warnings: drivers/misc/pvpanic/pvpanic.c:28:18: warning: symbol 'pvpanic_list' was not declared. Should it be static? drivers/misc/pvpanic/pvpanic.c:29:12: warning: symbol 'pvpanic_lock' was not declared. Should it be static? Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210331121706.15268-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman commit 642fa28bb5ee2cf72e7d86b2fa9d06f2b04c9fb3 Author: Qiheng Lin Date: Tue Mar 30 09:36:59 2021 +0800 misc/pvpanic: fix return value check in pvpanic_pci_probe() In case of error, the function pci_iomap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Link: https://lore.kernel.org/r/20210330013659.916-1-linqiheng@huawei.com Signed-off-by: Greg Kroah-Hartman commit 202680c7a93713283207dedfbc4b550ad6836a43 Author: Xiaofei Tan Date: Fri Apr 2 16:26:30 2021 +0800 tty: pty: Add a blank line after declarations Add a blank line after declarations, reported by checkpatch.pl. Signed-off-by: Xiaofei Tan Link: https://lore.kernel.org/r/1617351990-5189-1-git-send-email-tanxiaofei@huawei.com Signed-off-by: Greg Kroah-Hartman commit b0b07762bfa41b292c45f78e0b37870e6c30bb27 Author: Zucheng Zheng Date: Thu Apr 1 15:49:19 2021 +0800 serial: 8250: Make symbol 'brcmuart_debugfs_root' static symbol 'brcmuart_debugfs_root' is not used outside of 8250_bcm7271.c, so this commit marks it static. Signed-off-by: Zucheng Zheng Link: https://lore.kernel.org/r/20210401074919.56573-1-zhengzucheng@huawei.com Signed-off-by: Greg Kroah-Hartman commit 64b1510642f845d90ad2aa35111582a4492e801b Author: Wei Yongjun Date: Mon Mar 29 14:06:59 2021 +0000 serial: 8250_bcm7271: Fix return value check in brcmuart_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: 41a469482de2 ("serial: 8250: Add new 8250-core based Broadcom STB driver") Reported-by: Hulk Robot Reviewed-by: Al Cooper Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210329140659.1832950-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit bee1f89aad2a51cd3339571bc8eadbb0dc88a683 Author: Chunfeng Yun Date: Wed Mar 31 17:05:53 2021 +0800 usb: xhci-mtk: support quirk to disable usb2 lpm The xHCI driver support usb2 HW LPM by default, here add support XHCI_HW_LPM_DISABLE quirk, then we can disable usb2 lpm when need it. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1617181553-3503-4-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 1f743c8749eacd906dd3ce402b7cd540bb69ad3e Author: Chunfeng Yun Date: Wed Mar 31 17:05:52 2021 +0800 usb: xhci-mtk: fix broken streams issue on 0.96 xHCI The MediaTek 0.96 xHCI controller on some platforms does not support bulk stream even HCCPARAMS says supporting, due to MaxPSASize is set a default value 1 by mistake, here use XHCI_BROKEN_STREAMS quirk to fix it. Fixes: 94a631d91ad3 ("usb: xhci-mtk: check hcc_params after adding primary hcd") Cc: stable Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1617181553-3503-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 967f6d162d9fa415cf140d3eef5576d566632292 Author: Chunfeng Yun Date: Wed Mar 31 17:05:51 2021 +0800 dt-bindings: usb: mtk-xhci: remove redefinitions of usb3-lpm-capable The property usb3-lpm-capable is defined in usb-xhci.yaml which is already referenced in this file, so no need 'description' and 'type' anymore. Acked-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1617181553-3503-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ba0058b7b8cd57bc8956b5f5820f543616ee7a01 Author: Chunfeng Yun Date: Wed Mar 31 17:05:50 2021 +0800 dt-bindings: usb: mtk-xhci: support property usb2-lpm-disable Add support common property usb2-lpm-disable Acked-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1617181553-3503-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f351f4b63dac127079bbd77da64b2a61c09d522d Author: Chunfeng Yun Date: Wed Mar 31 16:25:42 2021 +0800 usb: xhci-mtk: fix oops when unbind driver The oops happens when unbind driver through sysfs as following, because xhci_mtk_drop_ep() try to drop the endpoint of root hub which is not added by xhci_add_endpoint() and the virtual device is not allocated, in fact also needn't drop it, so should skip it. Call trace: xhci_mtk_drop_ep+0x1b8/0x298 usb_hcd_alloc_bandwidth+0x1d8/0x380 usb_disable_device_endpoints+0x8c/0xe0 usb_disable_device+0x128/0x168 usb_disconnect+0xbc/0x2c8 usb_remove_hcd+0xd8/0x210 xhci_mtk_remove+0x98/0x108 platform_remove+0x28/0x60 device_release_driver_internal+0x110/0x1e8 device_driver_detach+0x18/0x28 unbind_store+0xd4/0x108 drv_attr_store+0x24/0x38 Fixes: 14295a150050 ("usb: xhci-mtk: support to build xhci-mtk-hcd.ko") Reported-by: Eddie Hung Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1617179142-2681-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit d8fca036ef6d5c7e93157edeab614c8cd2758e90 Author: Chunfeng Yun Date: Wed Mar 31 16:25:41 2021 +0800 usb: xhci-mtk: fix wrong remainder of bandwidth budget The remainder of the last bandwidth bugdget is wrong, it's the value alloacted in last bugdget, not unused. Reported-by: Yaqii Wu Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1617179142-2681-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit fd6103cb67966ed783b3800110bdbd66edae26a4 Author: Wan Jiabing Date: Thu Apr 1 14:23:54 2021 +0800 perf evsel: Remove duplicate 'struct target' forward declaration 'struct target' is declared twice. One has been declared at 21st line. Remove the duplicate. Signed-off-by: Wan Jiabing Acked-by: Namhyung Kim Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Peter Zijlstra Cc: kael_w@yeah.net Link: http://lore.kernel.org/lkml/20210401062424.991737-1-wanjiabing@vivo.com Signed-off-by: Arnaldo Carvalho de Melo commit 2e3d055bf27d70204cae349335a62a4f9b7c165a Author: Yang Yingliang Date: Tue Mar 30 21:01:59 2021 +0800 USB: gadget: udc: fix wrong pointer passed to IS_ERR() and PTR_ERR() IS_ERR() and PTR_ERR() use wrong pointer, it should be udc->virt_addr, fix it. Fixes: 1b9f35adb0ff ("usb: gadget: udc: Add Synopsys UDC Platform driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210330130159.1051979-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit f85900067f33319ff888bf0130ac3466316cf7c5 Author: Tian Tao Date: Mon Mar 29 11:26:43 2021 +0800 usb: dwc2: delete duplicate word in the comment Delete the duplicate word "from" in comment. Signed-off-by: Tian Tao Signed-off-by: Zeng Tao Link: https://lore.kernel.org/r/1616988403-48755-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit d21446eafa3a5cb238fe9eb79f49932cdb417d40 Author: Tian Tao Date: Mon Mar 29 15:05:56 2021 +0800 usb: dwc2: add parenthess and space around * Just fix the following checkpatch error: ERROR: Macros with complex values should be enclosed in parentheses. Signed-off-by: Tian Tao Signed-off-by: Zeng Tao Link: https://lore.kernel.org/r/1617001556-61868-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Greg Kroah-Hartman commit bd4d607044b961cecbf8c4c2f3bb5da4fb156993 Author: Tao Ren Date: Tue Mar 30 21:58:31 2021 -0700 usb: gadget: aspeed: fix dma map failure Currently the virtual port_dev device is passed to DMA API, and this is wrong because the device passed to DMA API calls must be the actual hardware device performing the DMA. The patch replaces usb_gadget_map_request/usb_gadget_unmap_request APIs with usb_gadget_map_request_by_dev/usb_gadget_unmap_request_by_dev APIs so the DMA capable platform device can be passed to the DMA APIs. The patch fixes below backtrace detected on Facebook AST2500 OpenBMC platforms: [<80106550>] show_stack+0x20/0x24 [<80106868>] dump_stack+0x28/0x30 [<80823540>] __warn+0xfc/0x110 [<8011ac30>] warn_slowpath_fmt+0xb0/0xc0 [<8011ad44>] dma_map_page_attrs+0x24c/0x314 [<8016a27c>] usb_gadget_map_request_by_dev+0x100/0x1e4 [<805cedd8>] usb_gadget_map_request+0x1c/0x20 [<805cefbc>] ast_vhub_epn_queue+0xa0/0x1d8 [<7f02f710>] usb_ep_queue+0x48/0xc4 [<805cd3e8>] ecm_do_notify+0xf8/0x248 [<7f145920>] ecm_set_alt+0xc8/0x1d0 [<7f145c34>] composite_setup+0x680/0x1d30 [<7f00deb8>] ast_vhub_ep0_handle_setup+0xa4/0x1bc [<7f02ee94>] ast_vhub_dev_irq+0x58/0x84 [<7f0309e0>] ast_vhub_irq+0xb0/0x1c8 [<7f02e118>] __handle_irq_event_percpu+0x50/0x19c [<8015e5bc>] handle_irq_event_percpu+0x38/0x8c [<8015e758>] handle_irq_event+0x38/0x4c Fixes: 7ecca2a4080c ("usb/gadget: Add driver for Aspeed SoC virtual hub") Reviewed-by: Joel Stanley Signed-off-by: Tao Ren Link: https://lore.kernel.org/r/20210331045831.28700-1-rentao.bupt@gmail.com Signed-off-by: Greg Kroah-Hartman commit 04dd6e76b228891d29e49759e2351eb4a4303fc9 Author: Ray Chi Date: Sun Mar 28 02:17:42 2021 +0800 usb: dwc3: add cancelled reasons for dwc3 requests Currently, when dwc3 handles request cancelled, dwc3 just returns -ECONNRESET for all requests. It will cause USB function drivers can't know if the requests are cancelled by other reasons. This patch will replace DWC3_REQUEST_STATUS_CANCELLED with the reasons below. - DWC3_REQUEST_STATUS_DISCONNECTED - DWC3_REQUEST_STATUS_DEQUEUED - DWC3_REQUEST_STATUS_STALLED Reviewed-by: Thinh Nguyen Signed-off-by: Ray Chi Link: https://lore.kernel.org/r/20210327181742.1810969-1-raychi@google.com Signed-off-by: Greg Kroah-Hartman commit d1689cd3c0f449de92d9ec13707dfea1f96c3dbd Author: Zhen Lei Date: Mon Mar 29 15:27:14 2021 +0800 arm64: dts: imx8mp: Use the correct name for child node "snps, dwc3" After the node name of "snps,dwc3" has been corrected to start with "usb" in fsl,imx8mp-dwc3.yaml. Its name in dts should be modified accordingly. Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210329072714.2135-3-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 9ea6feb681daa22b99c0840d23b8ee53c394d164 Author: Zhen Lei Date: Mon Mar 29 15:27:13 2021 +0800 dt-bindings: usb: dwc3-imx8mp: Use the correct name for child node "snps, dwc3" File snps,dwc3.yaml describes the schema of Synopsys DesignWare USB3 Controller, it directly or indirectly contains "$ref: usb.yaml". So the node name of "snps,dwc3" must start with "usb". Otherwise, the following warning will be displayed: Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.example.dt.yaml: \ dwc3@38100000: $nodename:0: 'dwc3@38100000' does not match '^usb(@.*)?' From schema: Documentation/devicetree/bindings/usb/snps,dwc3.yaml In addition, replace "type: object" with "$ref: snps,dwc3.yaml#". Ensure that all properties of the child node comply with snps,dwc3.yaml. Acked-by: Rob Herring Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210329072714.2135-2-thunder.leizhen@huawei.com Signed-off-by: Greg Kroah-Hartman commit 048b14e1f28b72d8dde7af2808346de2c67fe230 Author: Aditya Srivastava Date: Mon Mar 29 19:33:18 2021 +0530 usb: dwc3: exynos: fix incorrect kernel-doc comment syntax The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/usb/dwc3/dwc3-exynos.c follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc: "warning: expecting prototype for dwc3(). Prototype was for DWC3_EXYNOS_MAX_CLOCKS() instead" Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Reviewed-by: Krzysztof Kozlowski Acked-by: Randy Dunlap Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210329140318.27742-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman commit 27088e00b623a9581bcd4e443a6f9380524edfce Author: Aditya Srivastava Date: Mon Mar 29 19:21:08 2021 +0530 usb: dwc3: fix incorrect kernel-doc comment syntax in files The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are certain files in drivers/usb/dwc3, which follow this syntax, but the content inside does not comply with kernel-doc. Such lines were probably not meant for kernel-doc parsing, but are parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc. E.g., presence of kernel-doc like comment in drivers/usb/dwc3/io.h at header causes this warnings by kernel-doc: "warning: expecting prototype for h(). Prototype was for __DRIVERS_USB_DWC3_IO_H() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Acked-by: Randy Dunlap Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210329135108.27128-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman commit c9714d65eac862071749ea964585ae933872c721 Author: Aditya Srivastava Date: Mon Mar 29 18:50:14 2021 +0530 usb: dwc3: st: fix incorrect kernel-doc comment syntax in file The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/usb/dwc3/dwc3-st.c follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc: "warning: expecting prototype for dwc3(). Prototype was for CLKRST_CTRL() instead" Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Acked-by: Randy Dunlap Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210329132014.24304-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman commit ed577c325b646464c4b51575073e4c678536f699 Author: Aditya Srivastava Date: Mon Mar 29 19:56:04 2021 +0530 usb: dwc3: imx8mp: fix incorrect kernel-doc comment syntax The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for drivers/usb/dwc3/dwc3-imx8mp.c follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc: "warning: expecting prototype for dwc3(). Prototype was for USB_WAKEUP_CTRL() instead" Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Reviewed-by: Fabio Estevam Acked-by: Randy Dunlap Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210329142604.28737-1-yashsri421@gmail.com Signed-off-by: Greg Kroah-Hartman commit 507614ba25ffedcc53f24ca6686c877ff1e2e694 Author: Mauro Carvalho Chehab Date: Thu Mar 25 19:05:37 2021 +0100 regulator: hi6421v600-regulator: move it from staging This driver is ready for mainstream. Move it out of staging. Signed-off-by: Mauro Carvalho Chehab Acked-by: Mark Brown Link: https://lore.kernel.org/r/815b79a4e93f133478d9a5b2dd429526dcfe1dde.1616695231.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit 45bca1886886ec82cc6bdc0f3ff6b574dd68dfbb Author: Mauro Carvalho Chehab Date: Thu Mar 25 19:05:34 2021 +0100 staging: hisilicon,hisi-spmi-controller.yaml cleanup schema Remove some properties already defined at SPMI bus, and place the type for the spmi-channel. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/4e4a80d3a1b84a354d3c40be374a1689ae6c0fb1.1616695231.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman commit a6463cc5e35e17b5e9d12d9d4d4433a187fe1f08 Author: Fabio Aiuto Date: Thu Apr 1 11:07:22 2021 +0200 staging: rtl8723bs: remove unused macro RT_PRINT_DATA remove unused macro declaration: RT_PRINT_DATA Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a7d11ff4f0c069fac8b66e9c50a846d004ee2a4a.1617267827.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d8365ba3ee53c6822f7ff90b96773fd8326949d8 Author: Fabio Aiuto Date: Thu Apr 1 11:07:21 2021 +0200 staging: rtl8723bs: use print_hex_dump_debug instead of private RT_PRINT_DATA replace private macro RT_PRINT_DATA with in-kernel helper print_hex_dump_debug Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2ef2c25c928b15f1c4357146efe193afab606d33.1617267827.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ff7e47409d428995bff7028f4a0e15ff893cb0ad Author: Deborah Brouwer Date: Wed Mar 31 15:42:31 2021 -0700 staging: rtl8723bs: core: remove empty comment Remove empty comment because it provides no information. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/2362c76457b94895f0b62b59889e80349bb69d8f.1617229359.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit c460c22211e0a59f01c03db0cbcc7628edfc0ccc Author: Deborah Brouwer Date: Wed Mar 31 15:42:30 2021 -0700 staging: rtl8723bs: core: add * to block comments Add * at the beginning of each line in block comments to conform to the Linux kernel coding style. Issue detected using checkpatch. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/bd143fff718849274b065a1c71f1aa7f6fc6f40f.1617229359.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6d72d5f601c251d5302a60730acf0f9f03229cb8 Author: Deborah Brouwer Date: Wed Mar 31 15:42:29 2021 -0700 staging: rtl8723bs: core: add comma within a comment Add a comma to separate repeated words in a comment. The comma preserves the meaning of the comment while also stopping the checkpatch warning: WARNING: Possible repeated word: 'very'. Signed-off-by: Deborah Brouwer Link: https://lore.kernel.org/r/2944d1a0e8769edb489bb336423625a61d314d05.1617229359.git.deborahbrouwer3563@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8bc5cbf5b65cac4fcdc11a38c5fd36db6884ebd0 Author: Martin Kaiser Date: Mon Mar 29 11:32:15 2021 +0200 staging: rtl8188eu: (trivial) remove a duplicate debug print Keep the one that shows the wakeup capability. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210329093215.16186-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 30310e0fa5a7d7a80450cb166405ed10e02a8141 Author: Martin Kaiser Date: Sun Mar 28 19:54:46 2021 +0200 staging: rtl8188eu: remove unused function parameter rtw_usb_if1_init does not use its struct usb_device_id parameter. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210328175446.28063-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 174c80b254a0fdc03d86c14fb70859fb26b7060f Author: Bhaskar Chowdhury Date: Thu Mar 18 15:22:37 2021 +0530 ARM: dts: at91: Fix a typo s/conlicts/conflicts/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20210318095237.28436-1-unixbhaskar@gmail.com commit f032e2cdf9003ed076c8866a2e7f5003eeabcff8 Author: Yang Yingliang Date: Thu Apr 1 18:36:45 2021 +0800 staging: greybus: camera: Switch to memdup_user_nul() Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Reviewed-by: Dan Carpenter Signed-off-by: Yang Yingliang Link: https://lore.kernel.org/r/20210401103645.1558813-1-yangyingliang@huawei.com Signed-off-by: Greg Kroah-Hartman commit 0778f04b0b36dcd51c1dfcaf77a326eacff73329 Author: Beatriz Martins de Carvalho Date: Thu Apr 1 10:07:54 2021 +0100 staging: greybus: arche-platform: Ending line with argument Remove checkpatch check "CHECK: Lines should not end with a '('" with argument present in next line. Signed-off-by: Beatriz Martins de Carvalho Link: https://lore.kernel.org/r/20210401090754.116522-1-martinsdecarvalhobeatriz@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3af26e2ad514dfbd2405e8f1b407ed2db6b87bc1 Author: Sebastian Reichel Date: Tue Mar 9 19:04:07 2021 +0100 power: supply: core: reduce loglevel for probe defer info Avoid logging probe defer information for default loglevel configurations. This is only required for debugging probe defer issues, which requires enabling debug messages for other subsystems. This dev_info() message predates having deferred devices information available in /sys/kernel/debug/devices_deferred, which is generally more useful. Signed-off-by: Sebastian Reichel commit 17948f589926719f77764f6e1293dbf855d092bd Author: Sebastian Reichel Date: Tue Mar 9 19:04:06 2021 +0100 power: supply: sbs-manager: update gpio include sbs-manager implements a GPIO chip, so include the proper gpio driver include instead of the legacy gpio.h. Signed-off-by: Sebastian Reichel commit 436ff8c9280faa670d2135a2bf2544b6c465d84a Author: Sebastian Reichel Date: Tue Mar 9 19:04:05 2021 +0100 power: supply: sbs-manager: use dev_err_probe Introduce usage of dev_err_probe in probe routine, which makes the code slightly more readable and removes some lines of code. It also removes PROBE_DEFER errors being logged by default. Signed-off-by: Sebastian Reichel commit 814ddbd9ec0b9344eb390711a115cf6f097f0044 Author: Sebastian Reichel Date: Tue Mar 9 19:04:04 2021 +0100 power: supply: sbs-manager: use managed i2c_mux_adapter Simplify code by using devm_add_action_or_reset to unregister the i2c_mux_adapter. Signed-off-by: Sebastian Reichel commit 310162f6dd6a93e22d21da059b63292767225d2d Author: Sebastian Reichel Date: Tue Mar 9 19:04:03 2021 +0100 power: supply: sbs-charger: drop unused gpio includes sbs-charger does not use any GPIOs, so no need to include gpio.h and of_gpio.h. Signed-off-by: Sebastian Reichel commit e319f4e25a7db549c0b05a273cb23ecc575be9c2 Author: Sebastian Reichel Date: Tue Mar 9 19:04:02 2021 +0100 power: supply: sbs-charger: use dev_err_probe Introduce usage of dev_err_probe in probe routine, which makes the code slightly more readable and removes some lines of code. It also removes PROBE_DEFER errors being logged by default. Signed-off-by: Sebastian Reichel commit 166767ab913dbf79129cf5f36b15b581513b501a Author: Sebastian Reichel Date: Tue Mar 9 19:04:01 2021 +0100 power: supply: sbs-battery: use dev_err_probe Introduce usage of dev_err_probe in probe routine, which makes the code slightly more readable and removes some lines of code. It also removes PROBE_DEFER errors being logged by default, which are common when the battery is waiting for the charger driver to be registered. This also cleans up a useless goto and instead returns directly. Signed-off-by: Sebastian Reichel commit 33ae8b03462e6cab130b505f97633feacf1743d0 Author: Milan Djurovic Date: Sat Mar 27 00:36:05 2021 -0700 power: supply: 88pm860x_battery: Remove unnecessary int for long long Change 'long long int' to 'long long' because the int is unnecessary, as suggested by checkpatch.pl. Signed-off-by: Milan Djurovic Signed-off-by: Sebastian Reichel commit 416682f27a23e3f19fde37abf5ce11d11abe79fd Author: Timon Baetz Date: Mon Mar 29 14:38:02 2021 +0000 power: supply: max8997_charger: Switch to new binding Get regulator from parent device's node and extcon by name. Signed-off-by: Timon Baetz Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 9f45275a3499229137d8c0ce0fe400d0729581a4 Author: Hao Fang Date: Tue Mar 30 14:38:05 2021 +0800 power: reset: hisi-reboot: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g. It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Acked-by: Haojian Zhuang Signed-off-by: Sebastian Reichel commit 657f1d86a38e4b5d13551948c02cc8fc6987e3a5 Merge: 57e45ea487750 08889894cc82b Author: Paolo Bonzini Date: Fri Apr 2 07:25:32 2021 -0400 Merge branch 'kvm-tdp-fix-rcu' into HEAD commit 57e45ea487750bdf0a4b4bfd36e250db86d63161 Merge: cb9b6a1b199b9 33a3164161fc8 Author: Paolo Bonzini Date: Fri Apr 2 07:24:54 2021 -0400 Merge branch 'kvm-tdp-fix-flushes' into HEAD commit bd3127733f2c1c666bbe105c5317d8ce98e088ee Author: Claudiu Beznea Date: Fri Apr 2 13:50:18 2021 +0300 power: reset: at91-reset: use devm_of_iomap Use devm_of_iomap() to map resources. This will avoid the necessity to track the mapped resources and free them on failure path or on remove. Reported-by: kernel test robot Reported-by: Dan Carpenter Suggested-by: Nicolas Ferre Signed-off-by: Claudiu Beznea Signed-off-by: Sebastian Reichel commit e4e4092938dd083f9256d180c41e7ea4bc1302d4 Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:48 2021 +0200 dt-bindings: power: update battery.yaml reference Changesets: 70c23e62d20c ("dt-bindings: power: supply: Fix remaining battery.txt links") and: 471dec8023d1 ("dt-bindings: power: Convert battery.txt to battery.yaml") renamed: Documentation/devicetree/bindings/power/supply/battery.txt to: Documentation/devicetree/bindings/power/supply/battery.yaml. Update its cross-reference accordingly. Fixes: 70c23e62d20c ("dt-bindings: power: supply: Fix remaining battery.txt links") Fixes: 471dec8023d1 ("dt-bindings: power: Convert battery.txt to battery.yaml") Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sebastian Reichel commit d9e903f8cc18fa051f4d6c99df2d401b14837746 Author: Mauro Carvalho Chehab Date: Thu Apr 1 14:17:32 2021 +0200 MAINTAINERS: update lego,ev3-battery.yaml reference Changeset 3004e581d92a ("dt-bindings: power: supply: lego-ev3-battery: Convert to DT schema format") renamed: Documentation/devicetree/bindings/power/supply/lego_ev3_battery.txt to: Documentation/devicetree/bindings/power/supply/lego,ev3-battery.yaml. Update its cross-reference accordingly. Fixes: 3004e581d92a ("dt-bindings: power: supply: lego-ev3-battery: Convert to DT schema format") Signed-off-by: Mauro Carvalho Chehab Reviewed-by: David Lechner Signed-off-by: Sebastian Reichel commit 9bc0bb50727c8ac69fbb33fb937431cf3518ff37 Author: Peter Zijlstra Date: Fri Mar 26 16:12:15 2021 +0100 objtool/x86: Rewrite retpoline thunk calls When the compiler emits: "CALL __x86_indirect_thunk_\reg" for an indirect call, have objtool rewrite it to: ALTERNATIVE "call __x86_indirect_thunk_\reg", "call *%reg", ALT_NOT(X86_FEATURE_RETPOLINE) Additionally, in order to not emit endless identical .altinst_replacement chunks, use a global symbol for them, see __x86_indirect_alt_*. This also avoids objtool from having to do code generation. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151300.320177914@infradead.org commit 50e7b4a1a1b264fc7df0698f2defb93cadf19a7b Author: Peter Zijlstra Date: Fri Mar 26 16:12:14 2021 +0100 objtool: Skip magical retpoline .altinstr_replacement When the .altinstr_replacement is a retpoline, skip the alternative. We already special case retpolines anyway. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151300.259429287@infradead.org commit 7bd2a600f3e9d27286bbf23c83d599e9cc7cf245 Author: Peter Zijlstra Date: Fri Mar 26 16:12:13 2021 +0100 objtool: Cache instruction relocs Track the reloc of instructions in the new instruction->reloc field to avoid having to look them up again later. ( Technically x86 instructions can have two relocations, but not jumps and calls, for which we're using this. ) Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151300.195441549@infradead.org commit 43d5430ad74ef5156353af7aec352426ec7a8e57 Author: Peter Zijlstra Date: Fri Mar 26 16:12:12 2021 +0100 objtool: Keep track of retpoline call sites Provide infrastructure for architectures to rewrite/augment compiler generated retpoline calls. Similar to what we do for static_call()s, keep track of the instructions that are retpoline calls. Use the same list_head, since a retpoline call cannot also be a static_call. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151300.130805730@infradead.org commit 2f2f7e47f0525cbaad5dd9675fd9d8aa8da12046 Author: Peter Zijlstra Date: Fri Mar 26 16:12:11 2021 +0100 objtool: Add elf_create_undef_symbol() Allow objtool to create undefined symbols; this allows creating relocations to symbols not currently in the symbol table. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151300.064743095@infradead.org commit 9a7827b7789c630c1efdb121daa42c6e77dce97f Author: Peter Zijlstra Date: Fri Mar 26 16:12:10 2021 +0100 objtool: Extract elf_symbol_add() Create a common helper to add symbols. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151300.003468981@infradead.org commit 417a4dc91e559f92404c2544f785b02ce75784c3 Author: Peter Zijlstra Date: Fri Mar 26 16:12:09 2021 +0100 objtool: Extract elf_strtab_concat() Create a common helper to append strings to a strtab. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151259.941474004@infradead.org commit d0c5c4cc73da0b05b0d9e5f833f2d859e1b45f8e Author: Peter Zijlstra Date: Fri Mar 26 16:12:08 2021 +0100 objtool: Create reloc sections implicitly Have elf_add_reloc() create the relocation section implicitly. Suggested-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151259.880174448@infradead.org commit ef47cc01cb4abcd760d8ac66b9361d6ade4d0846 Author: Peter Zijlstra Date: Fri Mar 26 16:12:07 2021 +0100 objtool: Add elf_create_reloc() helper We have 4 instances of adding a relocation. Create a common helper to avoid growing even more. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151259.817438847@infradead.org commit 3a647607b57ad8346e659ddd3b951ac292c83690 Author: Peter Zijlstra Date: Fri Mar 26 16:12:06 2021 +0100 objtool: Rework the elf_rebuild_reloc_section() logic Instead of manually calling elf_rebuild_reloc_section() on sections we've called elf_add_reloc() on, have elf_write() DTRT. This makes it easier to add random relocations in places without carefully tracking when we're done and need to flush what section. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151259.754213408@infradead.org commit a958c4fea768d2c378c89032ab41d38da2a24422 Author: Peter Zijlstra Date: Fri Mar 26 16:12:05 2021 +0100 objtool: Fix static_call list generation Currently, objtool generates tail call entries in add_jump_destination() but waits until validate_branch() to generate the regular call entries. Move these to add_call_destination() for consistency. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151259.691529901@infradead.org commit 530b4ddd9dd92b263081f5c7786d39a8129c8b2d Author: Peter Zijlstra Date: Fri Mar 26 16:12:04 2021 +0100 objtool: Handle per arch retpoline naming The __x86_indirect_ naming is obviously not generic. Shorten to allow matching some additional magic names later. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151259.630296706@infradead.org commit bcb1b6ff39da7e8a6a986eb08126fba2b5e13c32 Author: Peter Zijlstra Date: Fri Mar 26 16:12:03 2021 +0100 objtool: Correctly handle retpoline thunk calls Just like JMP handling, convert a direct CALL to a retpoline thunk into a retpoline safe indirect CALL. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Reviewed-by: Miroslav Benes Link: https://lkml.kernel.org/r/20210326151259.567568238@infradead.org commit 119251855f9adf9421cb5eb409933092141ab2c7 Author: Peter Zijlstra Date: Fri Mar 26 16:12:02 2021 +0100 x86/retpoline: Simplify retpolines Due to: c9c324dc22aa ("objtool: Support stack layout changes in alternatives") it is now possible to simplify the retpolines. Currently our retpolines consist of 2 symbols: - __x86_indirect_thunk_\reg: the compiler target - __x86_retpoline_\reg: the actual retpoline. Both are consecutive in code and aligned such that for any one register they both live in the same cacheline: 0000000000000000 <__x86_indirect_thunk_rax>: 0: ff e0 jmpq *%rax 2: 90 nop 3: 90 nop 4: 90 nop 0000000000000005 <__x86_retpoline_rax>: 5: e8 07 00 00 00 callq 11 <__x86_retpoline_rax+0xc> a: f3 90 pause c: 0f ae e8 lfence f: eb f9 jmp a <__x86_retpoline_rax+0x5> 11: 48 89 04 24 mov %rax,(%rsp) 15: c3 retq 16: 66 2e 0f 1f 84 00 00 00 00 00 nopw %cs:0x0(%rax,%rax,1) The thunk is an alternative_2, where one option is a JMP to the retpoline. This was done so that objtool didn't need to deal with alternatives with stack ops. But that problem has been solved, so now it is possible to fold the entire retpoline into the alternative to simplify and consolidate unused bytes: 0000000000000000 <__x86_indirect_thunk_rax>: 0: ff e0 jmpq *%rax 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 66 66 2e 0f 1f 84 00 00 00 00 00 data16 nopw %cs:0x0(%rax,%rax,1) 1c: 0f 1f 40 00 nopl 0x0(%rax) Notice that since the longest alternative sequence is now: 0: e8 07 00 00 00 callq c <.altinstr_replacement+0xc> 5: f3 90 pause 7: 0f ae e8 lfence a: eb f9 jmp 5 <.altinstr_replacement+0x5> c: 48 89 04 24 mov %rax,(%rsp) 10: c3 retq 17 bytes, we have 15 bytes NOP at the end of our 32 byte slot. (IOW, if we can shrink the retpoline by 1 byte we can pack it more densely). [ bp: Massage commit message. ] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20210326151259.506071949@infradead.org commit 23c1ad538f4f371bdb67d8a112314842d5db7e5a Author: Peter Zijlstra Date: Fri Mar 26 16:12:01 2021 +0100 x86/alternatives: Optimize optimize_nops() Currently, optimize_nops() scans to see if the alternative starts with NOPs. However, the emit pattern is: 141: \oldinstr 142: .skip (len-(142b-141b)), 0x90 That is, when 'oldinstr' is short, the tail is padded with NOPs. This case never gets optimized. Rewrite optimize_nops() to replace any trailing string of NOPs inside the alternative to larger NOPs. Also run it irrespective of patching, replacing NOPs in both the original and replaced code. A direct consequence is that 'padlen' becomes superfluous, so remove it. [ bp: - Adjust commit message - remove a stale comment about needing to pad - add a comment in optimize_nops() - exit early if the NOP verif. loop catches a mismatch - function should not not add NOPs in that case - fix the "optimized NOPs" offsets output ] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20210326151259.442992235@infradead.org commit b1f480bc0686e65d5413c035bd13af2ea4888784 Merge: e855e80d00153 a331f5fdd36db Author: Ingo Molnar Date: Fri Apr 2 12:34:19 2021 +0200 Merge branch 'x86/cpu' into WIP.x86/core, to merge the NOP changes & resolve a semantic conflict Conflict-merge this main commit in essence: a89dfde3dc3c: ("x86: Remove dynamic NOP selection") With this upstream commit: b90829704780: ("bpf: Use NOP_ATOMIC5 instead of emit_nops(&prog, 5) for BPF_TRAMP_F_CALL_ORIG") Semantic merge conflict: arch/x86/net/bpf_jit_comp.c - memcpy(prog, ideal_nops[NOP_ATOMIC5], X86_PATCH_SIZE); + memcpy(prog, x86_nops[5], X86_PATCH_SIZE); Signed-off-by: Ingo Molnar commit e855e80d001530ec0bbb1ee1ca6a16ac6bdf9acf Merge: f2ac256b9a8b7 a5e13c6df0e41 Author: Ingo Molnar Date: Fri Apr 2 12:33:16 2021 +0200 Merge tag 'v5.12-rc5' into WIP.x86/core, to pick up recent NOP related changes In particular we want to have this upstream commit: b90829704780: ("bpf: Use NOP_ATOMIC5 instead of emit_nops(&prog, 5) for BPF_TRAMP_F_CALL_ORIG") ... before merging in x86/cpu changes and the removal of the NOP optimizations, and applying PeterZ's !retpoline objtool series. Signed-off-by: Ingo Molnar commit c1de07884f2bafa11ad3780cf08b234c88c2cc9d Merge: 9e856a74bd02d 91b940526b846 Author: Georgi Djakov Date: Fri Apr 2 13:12:37 2021 +0300 Merge branch 'icc-sm8350' into icc-next This adds interconnect support for SM8350 SoC. * icc-sm8350 dt-bindings: interconnect: Add Qualcomm SM8350 DT bindings interconnect: qcom: Add SM8350 interconnect provider driver interconnect: qcom: sm8350: Use the correct ids interconnect: qcom: sm8350: Add missing link between nodes Link: https://lore.kernel.org/r/20210318094617.951212-1-vkoul@kernel.org Signed-off-by: Georgi Djakov commit 9e856a74bd02db82c57ad416dd50f91666178499 Merge: 173ef5f84b6d5 7014dfee4e833 Author: Georgi Djakov Date: Fri Apr 2 13:12:27 2021 +0300 Merge branch 'icc-sdm660' into icc-next This patch series adds the SDM660 interconnect provider driver in order to stop some timeouts and achieve some decent performance by avoiding to be NoC limited. It's also providing some power consumption improvement, but I have only measured that as less heat, which is quite important when working on thermally constrained devices like smartphones. Please note that this driver's yaml binding is referring to a MMCC clock, so this series does depend on the SDM660 MMCC driver that I have sent separately. The multimedia clock is required only for the Multimedia NoC (mnoc). This patch series has been tested against the following devices: - Sony Xperia XA2 Ultra (SDM630 Nile Discovery) - Sony Xperia 10 (SDM630 Ganges Kirin) - Sony Xperia 10 Plus (SDM636 Ganges Mermaid) * icc-sdm660 dt-bindings: interconnect: Add bindings for Qualcomm SDM660 NoC interconnect: qcom: Add SDM660 interconnect provider driver interconnect: qcom: sdm660: Fix kerneldoc warning Link: https://lore.kernel.org/r/20201017133718.31327-1-kholk11@gmail.com Signed-off-by: Georgi Djakov commit 91b940526b84601dfd26da410da6e4d60bda91a6 Author: Georgi Djakov Date: Fri Apr 2 13:09:07 2021 +0300 interconnect: qcom: sm8350: Add missing link between nodes There is a link between the GEM NoC and C NoC nodes, which is currently missing from the topology. Let's add it to allow consumers request paths that use this link. Reported-by: Alex Elder Tested-by: Alex Elder Link: https://lore.kernel.org/r/20210401094435.28937-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 7a3aad40c68a9968ff4e8067098422208f04d8ed Author: Georgi Djakov Date: Fri Apr 2 13:09:07 2021 +0300 interconnect: qcom: sm8350: Use the correct ids For creating an array with the members for each NoC, we should be using a local indexes, as otherwise unnecessary large arrays would be created. Using an incorrect indexes will also result error for the consumers when they try to find a valid path between the endpoints. Let's fix this and use the correct ids. Reported-by: Alex Elder Acked-by: Alex Elder Link: https://lore.kernel.org/r/20210401094334.28871-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 7014dfee4e83348d04c450c698ae29add6e9f58f Author: Georgi Djakov Date: Fri Apr 2 12:59:07 2021 +0300 interconnect: qcom: sdm660: Fix kerneldoc warning Fix the following warning: sdm660.c:191:warning: Function parameter or member 'regmap' not described in 'qcom_icc_provider' Link: https://lore.kernel.org/r/20210401094714.29075-1-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov commit 27e554a4fcd84e499bf0a82122b8c4c3f1de38b6 Author: mark-yw.chen Date: Mon Mar 29 01:18:33 2021 +0800 Bluetooth: btusb: Enable quirk boolean flag for Mediatek Chip. Adding support LE scatternet and WBS for Mediatek Chip Signed-off-by: mark-yw.chen Signed-off-by: Marcel Holtmann commit 0ae8ef674eb391d5a832967eb03cfe06904b31d0 Author: Luiz Augusto von Dentz Date: Mon Mar 29 10:27:04 2021 -0700 Bluetooth: SMP: Fix variable dereferenced before check 'conn' This fixes kbuild findings: smatch warnings: net/bluetooth/smp.c:1633 smp_user_confirm_reply() warn: variable dereferenced before check 'conn' (see line 1631) Signed-off-by: Luiz Augusto von Dentz Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Marcel Holtmann commit 06752d1678b49ac471f11950ebd6d29541828bba Author: Archie Pusaka Date: Thu Apr 1 11:11:33 2021 +0800 Bluetooth: Check inquiry status before sending one There is a possibility where HCI_INQUIRY flag is set but we still send HCI_OP_INQUIRY anyway. Such a case can be reproduced by connecting to an LE device while active scanning. When the device is discovered, we initiate a connection, stop LE Scan, and send Discovery MGMT with status disabled, but we don't cancel the inquiry. Signed-off-by: Archie Pusaka Reviewed-by: Sonny Sasaka Signed-off-by: Marcel Holtmann commit 149b3f13b4b11175c81105f32b048260e63fdc34 Author: Meng Yu Date: Thu Apr 1 14:50:39 2021 +0800 Bluetooth: Coding style fix 1. Add space when needed; 2. Block comments style fix; 3. Move open brace '{' following function definitions to the next line; 4. Remove unnecessary braces '{}' for single statement blocks. Signed-off-by: Meng Yu Signed-off-by: Marcel Holtmann commit 82a1242619d0db39ca710538fa2a53623a1022c8 Author: Meng Yu Date: Thu Apr 1 14:50:38 2021 +0800 Bluetooth: Remove 'return' in void function void function return statements are not generally useful. Signed-off-by: Meng Yu Signed-off-by: Marcel Holtmann commit cface0326a6c2ae5c8f47bd466f07624b3e348a7 Author: Alexander Antonov Date: Tue Mar 23 18:05:07 2021 +0300 perf/x86/intel/uncore: Enable IIO stacks to PMON mapping for multi-segment SKX IIO stacks to PMON mapping on Skylake servers is exposed through introduced early attributes /sys/devices/uncore_iio_/dieX, where dieX is a file which holds "Segment:Root Bus" for PCIe root port which can be monitored by that IIO PMON block. These sysfs attributes are disabled for multiple segment topologies except VMD domains which start at 0x10000. This patch removes the limitation and enables IIO stacks to PMON mapping for multi-segment Skylake servers by introducing segment-aware intel_uncore_topology structure and attributing the topology configuration to the segment in skx_iio_get_topology() function. Reported-by: kernel test robot Signed-off-by: Alexander Antonov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Kan Liang Reviewed-by: Andi Kleen Tested-by: Kyle Meyer Link: https://lkml.kernel.org/r/20210323150507.2013-1-alexander.antonov@linux.intel.com commit c4c55e362a521d763356b9e02bc9a4348c71a471 Author: Kan Liang Date: Wed Mar 17 10:59:37 2021 -0700 perf/x86/intel/uncore: Generic support for the MMIO type of uncore blocks The discovery table provides the generic uncore block information for the MMIO type of uncore blocks, which is good enough to provide basic uncore support. The box control field is composed of the BAR address and box control offset. When initializing the uncore blocks, perf should ioremap the address from the box control field. Implement the generic support for the MMIO type of uncore block. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1616003977-90612-6-git-send-email-kan.liang@linux.intel.com commit 42839ef4a20a4bda415974ff0e7d85ff540fffa4 Author: Kan Liang Date: Wed Mar 17 10:59:36 2021 -0700 perf/x86/intel/uncore: Generic support for the PCI type of uncore blocks The discovery table provides the generic uncore block information for the PCI type of uncore blocks, which is good enough to provide basic uncore support. The PCI BUS and DEVFN information can be retrieved from the box control field. Introduce the uncore_pci_pmus_register() to register all the PCICFG type of uncore blocks. The old PCI probe/remove way is dropped. The PCI BUS and DEVFN information are different among dies. Add box_ctls to store the box control field of each die. Add a new BUS notifier for the PCI type of uncore block to support the hotplug. If the device is "hot remove", the corresponding registered PMU has to be unregistered. Perf cannot locate the PMU by searching a const pci_device_id table, because the discovery tables don't provide such information. Introduce uncore_pci_find_dev_pmu_from_types() to search the whole uncore_pci_uncores for the PMU. Implement generic support for the PCI type of uncore block. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1616003977-90612-5-git-send-email-kan.liang@linux.intel.com commit 6477dc3934775f82a571fac469fd8c348e611095 Author: Kan Liang Date: Wed Mar 17 10:59:35 2021 -0700 perf/x86/intel/uncore: Rename uncore_notifier to uncore_pci_sub_notifier Perf will use a similar method to the PCI sub driver to register the PMUs for the PCI type of uncore blocks. The method requires a BUS notifier to support hotplug. The current BUS notifier cannot be reused, because it searches a const id_table for the corresponding registered PMU. The PCI type of uncore blocks in the discovery tables doesn't provide an id_table. Factor out uncore_bus_notify() and add the pointer of an id_table as a parameter. The uncore_bus_notify() will be reused in the following patch. The current BUS notifier is only used by the PCI sub driver. Its name is too generic. Rename it to uncore_pci_sub_notifier, which is specific for the PCI sub driver. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1616003977-90612-4-git-send-email-kan.liang@linux.intel.com commit d6c754130435ab786711bed75d04a2388a6b4da8 Author: Kan Liang Date: Wed Mar 17 10:59:34 2021 -0700 perf/x86/intel/uncore: Generic support for the MSR type of uncore blocks The discovery table provides the generic uncore block information for the MSR type of uncore blocks, e.g., the counter width, the number of counters, the location of control/counter registers, which is good enough to provide basic uncore support. It can be used as a fallback solution when the kernel doesn't support a platform. The name of the uncore box cannot be retrieved from the discovery table. uncore_type_&typeID_&boxID will be used as its name. Save the type ID and the box ID information in the struct intel_uncore_type. Factor out uncore_get_pmu_name() to handle different naming methods. Implement generic support for the MSR type of uncore block. Some advanced features, such as filters and constraints, cannot be retrieved from discovery tables. Features that rely on that information are not be supported here. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1616003977-90612-3-git-send-email-kan.liang@linux.intel.com commit edae1f06c2cda41edffc93de6aedc8ba8dc883c3 Author: Kan Liang Date: Wed Mar 17 10:59:33 2021 -0700 perf/x86/intel/uncore: Parse uncore discovery tables A self-describing mechanism for the uncore PerfMon hardware has been introduced with the latest Intel platforms. By reading through an MMIO page worth of information, perf can 'discover' all the standard uncore PerfMon registers in a machine. The discovery mechanism relies on BIOS's support. With a proper BIOS, a PCI device with the unique capability ID 0x23 can be found on each die. Perf can retrieve the information of all available uncore PerfMons from the device via MMIO. The information is composed of one global discovery table and several unit discovery tables. - The global discovery table includes global uncore information of the die, e.g., the address of the global control register, the offset of the global status register, the number of uncore units, the offset of unit discovery tables, etc. - The unit discovery table includes generic uncore unit information, e.g., the access type, the counter width, the address of counters, the address of the counter control, the unit ID, the unit type, etc. The unit is also called "box" in the code. Perf can provide basic uncore support based on this information with the following patches. To locate the PCI device with the discovery tables, check the generic PCI ID first. If it doesn't match, go through the entire PCI device tree and locate the device with the unique capability ID. The uncore information is similar among dies. To save parsing time and space, only completely parse and store the discovery tables on the first die and the first box of each die. The parsed information is stored in an RB tree structure, intel_uncore_discovery_type. The size of the stored discovery tables varies among platforms. It's around 4KB for a Sapphire Rapids server. If a BIOS doesn't support the 'discovery' mechanism, the uncore driver will exit with -ENODEV. There is nothing changed. Add a module parameter to disable the discovery feature. If a BIOS gets the discovery tables wrong, users can have an option to disable the feature. For the current patchset, the uncore driver will exit with -ENODEV. In the future, it may fall back to the hardcode uncore driver on a known platform. Signed-off-by: Kan Liang Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/1616003977-90612-2-git-send-email-kan.liang@linux.intel.com commit c1ce9d8081a9fca5fd1b2e48bcc20e5dc3387302 Author: Hao Fang Date: Tue Mar 30 14:51:40 2021 +0800 ARM: hisi: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/ It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Acked-by: Haojian Zhuang Signed-off-by: Wei Xu commit 059c5342812c448f21bed1881a75134320e9c8a2 Author: Longfang Liu Date: Sat Mar 27 18:28:30 2021 +0800 crypto: hisilicon/sec - Fixes AES algorithm mode parameter problem The input data of the ECB (AES) algorithm needs to be aligned with 16 bytes, and the input data of the XTS (AES) algorithm is at least 16 bytes. Otherwise the SEC hardware will go wrong. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 0ae869926fab00b95709518d72cca2d50a29eccd Author: Meng Yu Date: Sat Mar 27 17:56:16 2021 +0800 crypto: hisilicon/hpre - Add processing of src_data in 'CURVE25519' HPRE can only deal with src_data smaller than 'p' in 'CURVE25519' algorithm, but 'rfc7748' says: 'Implementations MUST accept non-canonical values and process them as if they had been reduced modulo the field prime' So we get its modulus to p, and then deal it with HPRE. Signed-off-by: Meng Yu Signed-off-by: Herbert Xu commit 9bb3fbbff3710dfebeed2f8cf9ee61c415722543 Author: Hui Tang Date: Sat Mar 27 16:32:45 2021 +0800 crypto: hisilicon/hpre - delete redundant '\n' It has newline already by sysfs, so delete redundant '\n' Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 09fd266f174144daf1be5033f32ccd096c765452 Author: Hui Tang Date: Sat Mar 27 16:32:08 2021 +0800 crypto: hisilicon/hpre - fix a typo and delete redundant blank line s/shoul/should/ Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 64e80c8f48a01cc5c727472f1e37324539bb6ff7 Author: Hui Tang Date: Sat Mar 27 16:29:44 2021 +0800 crypto: hisilicon/hpre - fix PASID setting on kunpeng 920 We must confirm the PASID is disabled before using no-sva mode. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 95c612b30898ca5fe7c76ef31d910e37ace6f34e Author: Yang Shen Date: Sat Mar 27 15:28:48 2021 +0800 crypto: hisilicon/zip - support new 'sqe' type in Kunpeng930 The Kunpeng930 changes some field meanings in 'sqe'. So add a new 'hisi_zip_sqe_ops' to describe the 'sqe' operations. Signed-off-by: Yang Shen Signed-off-by: Herbert Xu commit 2bcf36348ce50e650fe8e1db046029afc89ef098 Author: Yang Shen Date: Sat Mar 27 15:28:47 2021 +0800 crypto: hisilicon/zip - initialize operations about 'sqe' in 'acomp_alg.init' The operations about 'sqe' are different on some hardwares. Add a struct 'hisi_zip_sqe_ops' to describe the operations in a hardware. And choose the 'ops' in 'hisi_zip_acomp_init' according to the hardware. Signed-off-by: Yang Shen Signed-off-by: Herbert Xu commit d746881855ba167597d835de512150b6e6ea19ae Author: Yang Shen Date: Sat Mar 27 15:28:46 2021 +0800 crypto: hisilicon/zip - add comments for 'hisi_zip_sqe' Some fields of 'hisi_zip_sqe' are unused, and some fields have misc utilities. So add comments for used fields and make others unnamed. Signed-off-by: Yang Shen Signed-off-by: Herbert Xu commit 30a4240e06ea7eecbc5645916501112ef8532533 Author: Yang Shen Date: Sat Mar 27 15:28:45 2021 +0800 crypto: hisilicon/zip - adjust functions location This patch changes nothing about functions except location in order to make code logic clearly. This adjustment follows three principles: 1.The called functions are listed in order above the calling functions. 2.The paired functions are next to each other. 3.Logically similar functions are placed in the same area. Here, we use the callback of 'acomp_alg' as the basis for dividing areas. Signed-off-by: Yang Shen Signed-off-by: Herbert Xu commit 5c083eb3e9ca32c0ef257246dc979c8853ffcdb1 Author: Milan Djurovic Date: Fri Mar 26 11:35:11 2021 -0700 crypto: fcrypt - Remove 'do while(0)' loop for single statement macro Remove the 'do while(0)' loop in the macro, as it is not needed for single statement macros. Condense into one line. Signed-off-by: Milan Djurovic Signed-off-by: Herbert Xu commit c29da9700f8ce19175a37e6a79dbd49f98625bfd Author: Milan Djurovic Date: Fri Mar 26 11:13:59 2021 -0700 crypto: keywrap - Remove else after break statement Remove the else because the if statement has a break statement. Fix the checkpatch.pl warning. Signed-off-by: Milan Djurovic Signed-off-by: Herbert Xu commit 5377265f54dedc01db1eb4325f65c7a6a4035ec0 Author: Hao Fang Date: Fri Mar 26 16:42:39 2021 +0800 crypto: hisilicon - use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Signed-off-by: Herbert Xu commit 83dc1173d73f80cbce2fee4d308f51f87b2f26ae Author: Giovanni Cabiddu Date: Thu Mar 25 08:34:18 2021 +0000 crypto: qat - fix error path in adf_isr_resource_alloc() The function adf_isr_resource_alloc() is not unwinding correctly in case of error. This patch fixes the error paths and propagate the errors to the caller. Fixes: 7afa232e76ce ("crypto: qat - Intel(R) QAT DH895xcc accelerator") Signed-off-by: Giovanni Cabiddu Reviewed-by: Marco Chiappero Signed-off-by: Herbert Xu commit 8d195e7a8ada68928f2aedb2c18302a4518fe68e Author: Arnd Bergmann Date: Mon Mar 22 18:05:15 2021 +0100 crypto: poly1305 - fix poly1305_core_setkey() declaration gcc-11 points out a mismatch between the declaration and the definition of poly1305_core_setkey(): lib/crypto/poly1305-donna32.c:13:67: error: argument 2 of type ‘const u8[16]’ {aka ‘const unsigned char[16]’} with mismatched bound [-Werror=array-parameter=] 13 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 raw_key[16]) | ~~~~~~~~~^~~~~~~~~~~ In file included from lib/crypto/poly1305-donna32.c:11: include/crypto/internal/poly1305.h:21:68: note: previously declared as ‘const u8 *’ {aka ‘const unsigned char *’} 21 | void poly1305_core_setkey(struct poly1305_core_key *key, const u8 *raw_key); This is harmless in principle, as the calling conventions are the same, but the more specific prototype allows better type checking in the caller. Change the declaration to match the actual function definition. The poly1305_simd_init() is a bit suspicious here, as it previously had a 32-byte argument type, but looks like it needs to take the 16-byte POLY1305_BLOCK_SIZE array instead. Fixes: 1c08a104360f ("crypto: poly1305 - add new 32 and 64-bit generic versions") Signed-off-by: Arnd Bergmann Reviewed-by: Ard Biesheuvel Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit 1015f19b2151acff211cba9162c103d588d8faad Author: Tian Tao Date: Mon Mar 22 14:51:51 2021 +0800 hwrng: omap - Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit 118a4417e14348b2e46f5e467da8444ec4757a45 Author: Eric Biggers Date: Sun Mar 21 22:14:00 2021 -0700 random: remove dead code left over from blocking pool Remove some dead code that was left over following commit 90ea1c6436d2 ("random: remove the blocking pool"). Cc: linux-crypto@vger.kernel.org Cc: Andy Lutomirski Cc: Jann Horn Cc: Theodore Ts'o Reviewed-by: Andy Lutomirski Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit a181e0fdb2164268274453b5b291589edbb9b22d Author: Eric Biggers Date: Sun Mar 21 22:13:47 2021 -0700 random: initialize ChaCha20 constants with correct endianness On big endian CPUs, the ChaCha20-based CRNG is using the wrong endianness for the ChaCha20 constants. This doesn't matter cryptographically, but technically it means it's not ChaCha20 anymore. Fix it to always use the standard constants. Cc: linux-crypto@vger.kernel.org Cc: Andy Lutomirski Cc: Jann Horn Cc: Theodore Ts'o Acked-by: Ard Biesheuvel Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 30d0f6a956fc74bb2e948398daf3278c6b08c7e9 Author: Eric Biggers Date: Sun Mar 21 22:07:48 2021 -0700 crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS crypto_stats_get() is a no-op when the kernel is compiled without CONFIG_CRYPTO_STATS, so pairing it with crypto_alg_put() unconditionally (as crypto_rng_reset() does) is wrong. Fix this by moving the call to crypto_stats_get() to just before the actual algorithm operation which might need it. This makes it always paired with crypto_stats_rng_seed(). Fixes: eed74b3eba9e ("crypto: rng - Fix a refcounting bug in crypto_rng_reset()") Cc: stable@vger.kernel.org Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 2b35ca2fe605f85aa1a52c713571baf04a5f434a Author: Yusuke Goda Date: Fri Mar 26 11:50:09 2021 +0100 arm64: dts: renesas: ulcb: Add cpu-supply property to a57_0 node Add the cpu-supply property to the a57_0 node, so Dynamic Voltage and Frequency Scaling (DVFS) can change the CPU core voltage. Signed-off-by: Yusuke Goda Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210326105009.1574424-3-geert+renesas@glider.be commit 35e732d7990ddae3ca759c09498dd2c049511297 Author: Dien Pham Date: Fri Mar 26 11:50:08 2021 +0100 arm64: dts: renesas: salvator-common: Add cpu-supply property to a57_0 node Add the cpu-supply property to the a57_0 node, so Dynamic Voltage and Frequency Scaling (DVFS) can change the CPU core voltage. Signed-off-by: Dien Pham Signed-off-by: Takeshi Kihara Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210326105009.1574424-2-geert+renesas@glider.be commit 297214f064b4c4725055568fce5d7c27d60254c9 Author: Geert Uytterhoeven Date: Thu Mar 11 12:05:52 2021 +0100 arm64: dts: renesas: r8a77950: Drop operating points above 1.5 GHz The higher operating frequencies for the Cortex-A57 CPU cores, which were first documented in the R-Car Gen3 Hardware User's Manual revision 0.54, apply to R-Car H3 ES2.0 (r8a77951). Play it safe and restrict R-Car H3 ES1.x to 1.5 GHz, by removing the "turbo-mode" entries from the operating points table inherited from r8a77951.dtsi. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210311110552.3124180-1-geert+renesas@glider.be commit b206b82d1726f6f878891791069ab0aea2e31113 Author: Michael Walle Date: Mon Mar 22 00:51:40 2021 +0100 mtd: spi-nor: winbond: add OTP support to w25q32fw/jw With all the helper functions in place, add OTP support for the Winbond W25Q32JW and W25Q32FW. Both were tested on a LS1028A SoC with a NXP FSPI controller. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210321235140.8308-4-michael@walle.cc commit cad3193fe9d1f0af4d05ed86693f99984409b188 Author: Michael Walle Date: Mon Mar 22 00:51:39 2021 +0100 mtd: spi-nor: implement OTP support for Winbond and similar flashes Use the new OTP ops to implement OTP access on Winbond flashes. Most Winbond flashes provides up to four different OTP regions ("Security Registers"). Winbond devices use a special opcode to read and write to the OTP regions, just like the RDSFDP opcode. In fact, it seems that the (undocumented) first OTP area of the newer flashes is the actual SFDP table. On a side note, Winbond devices also allow erasing the OTP regions as long as the area isn't locked down. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210321235140.8308-3-michael@walle.cc commit 069089acf88b2216b667c1e5994e08b4d2e1ea12 Author: Michael Walle Date: Mon Mar 22 00:51:38 2021 +0100 mtd: spi-nor: add OTP support SPI flashes sometimes have a special OTP area, which can (and is) used to store immutable properties like board serial number or vendor assigned network hardware addresses. The MTD subsystem already supports accessing such areas and some (non SPI NOR) flashes already implement support for it. It differentiates between user and factory areas. User areas can be written by the user and factory ones are pre-programmed and locked down by the vendor, usually containing an "electrical serial number". This patch will only add support for the user areas. Lay the foundation and implement the MTD callbacks for the SPI NOR and add necessary parameters to the flash_info structure. If a flash supports OTP it can be added by the convenience macro OTP_INFO(). Sometimes there are individual regions, which might have individual offsets. Therefore, it is possible to specify the starting address of the first regions as well as the distance between two regions (e.g. Winbond devices uses this method). Additionally, the regions might be locked down. Once locked, no further write access is possible. For SPI NOR flashes the OTP area is accessed like the normal memory, e.g. by offset addressing; except that you either have to use special read/write commands (Winbond) or you have to enter (and exit) a specific OTP mode (Macronix, Micron). Thus we introduce four operations to which the MTD callbacks will be mapped: .read(), .write(), .lock() and .is_locked(). The read and the write ops will be given an address offset to operate on while the locking ops use regions because locking always affects a whole region. It is up to the flash driver to implement these ops. Signed-off-by: Michael Walle [ta: use div64_u64(), IS_ALIGNED, params->otp.org. unsigned int region, drop comment, add rlen local variable in spi_nor_mtd_otp_lock()] Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210321235140.8308-2-michael@walle.cc commit 4e2e619f3c9e3c49859f085995554a53e9fc0e02 Author: Gustavo A. R. Silva Date: Wed Mar 24 18:33:44 2021 -0500 scsi: message: mptlan: 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]. Refactor the code according to the use of a flexible-array member in struct _SGE_TRANSACTION32 instead of one-element array. Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warning: CC [M] drivers/message/fusion/mptlan.o drivers/message/fusion/mptlan.c: In function ‘mpt_lan_sdu_send’: drivers/message/fusion/mptlan.c:759:28: warning: array subscript 1 is above array bounds of ‘U32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 759 | pTrans->TransactionDetails[1] = cpu_to_le32((mac[2] << 24) | | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Link: https://lore.kernel.org/r/20210324233344.GA99059@embeddedor Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit ed46ccc7fe7612eb3763346dc0389d8206f071ef Author: Gustavo A. R. Silva Date: Wed Mar 24 18:00:36 2021 -0500 scsi: message: fusion: 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, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warning: drivers/message/fusion/mptbase.c: In function ‘mptbase_reply’: drivers/message/fusion/mptbase.c:7747:62: warning: array subscript 1 is above array bounds of ‘U32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 7747 | ioc->events[idx].data[ii] = le32_to_cpu(pEventReply->Data[ii]); ./include/uapi/linux/byteorder/little_endian.h:34:51: note: in definition of macro ‘__le32_to_cpu’ 34 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x)) | ^ drivers/message/fusion/mptbase.c:7747:33: note: in expansion of macro ‘le32_to_cpu’ 7747 | ioc->events[idx].data[ii] = le32_to_cpu(pEventReply->Data[ii]); | [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Link: https://lore.kernel.org/r/20210324230036.GA67851@embeddedor Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit 5b11c9d80bde81f6896cc85b23aeaa9502a704ed Author: Arnd Bergmann Date: Mon Mar 22 17:46:59 2021 +0100 scsi: fcoe: Fix mismatched fcoe_wwn_from_mac declaration An old cleanup changed the array size from MAX_ADDR_LEN to unspecified in the declaration, but now gcc-11 warns about this: drivers/scsi/fcoe/fcoe_ctlr.c:1972:37: error: argument 1 of type ‘unsigned char[32]’ with mismatched bound [-Werror=array-parameter=] 1972 | u64 fcoe_wwn_from_mac(unsigned char mac[MAX_ADDR_LEN], | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ In file included from /git/arm-soc/drivers/scsi/fcoe/fcoe_ctlr.c:33: include/scsi/libfcoe.h:252:37: note: previously declared as ‘unsigned char[]’ 252 | u64 fcoe_wwn_from_mac(unsigned char mac[], unsigned int, unsigned int); | ~~~~~~~~~~~~~~^~~~~ Change the type back to what the function definition uses. Link: https://lore.kernel.org/r/20210322164702.957810-1-arnd@kernel.org Fixes: fdd78027fd47 ("[SCSI] fcoe: cleans up libfcoe.h and adds fcoe.h for fcoe module") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit ada48ba70f6b98b7e93eea56770d6e6932734783 Author: Arnd Bergmann Date: Mon Mar 22 17:02:47 2021 +0100 scsi: lpfc: Fix gcc -Wstringop-overread warning gcc-11 warns about an strnlen with a length larger than the size of the passed buffer: drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_nvme_info_show': drivers/scsi/lpfc/lpfc_attr.c:518:25: error: 'strnlen' specified bound 4095 exceeds source size 24 [-Werror=stringop-overread] 518 | strnlen(LPFC_NVME_INFO_MORE_STR, PAGE_SIZE - 1) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In this case, the code is entirely valid, as the string is properly terminated, and the size argument is only there out of extra caution in case it exceeds a page. This cannot really happen here, so just simplify it to a sizeof(). Link: https://lore.kernel.org/r/20210322160253.4032422-10-arnd@kernel.org Fixes: afff0d2321ea ("scsi: lpfc: Add Buffer overflow check, when nvme_info larger than PAGE_SIZE") Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit ae3645d29d4e5f496206ee571d0c8361bd38e242 Author: Arnd Bergmann Date: Mon Mar 22 11:33:09 2021 +0100 scsi: mvsas: Avoid -Wempty-body warning Building with 'make W=1' shows a few harmless -Wempty-body warning for the mvsas driver: drivers/scsi/mvsas/mv_94xx.c: In function 'mvs_94xx_phy_reset': drivers/scsi/mvsas/mv_94xx.c:278:63: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 278 | mv_dprintk("phy hard reset failed.\n"); | ^ drivers/scsi/mvsas/mv_sas.c: In function 'mvs_task_prep': drivers/scsi/mvsas/mv_sas.c:723:57: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 723 | SAS_ADDR(dev->sas_addr)); | ^ Change the empty dprintk() macros to no_printk(), which avoids this warning and adds format string checking. Link: https://lore.kernel.org/r/20210322103316.620694-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 472c1cfb10f19ff7d2ea477f462fd52d0d2e126b Author: Arnd Bergmann Date: Mon Mar 22 11:25:44 2021 +0100 scsi: message: fusion: Avoid -Wempty-body warnings There are a couple of warnings in this driver when building with W=1: drivers/message/fusion/mptbase.c: In function 'PrimeIocFifos': drivers/message/fusion/mptbase.c:4608:65: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 4608 | "restoring 64 bit addressing\n", ioc->name)); | ^ drivers/message/fusion/mptbase.c:4633:65: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 4633 | "restoring 64 bit addressing\n", ioc->name)); The macros are slightly suboptimal since are not proper statements. Change both versions to the usual "do { ... } while (0)" style to make them more robust and avoid the warning. Link: https://lore.kernel.org/r/20210322102549.278661-2-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit 6c26379def094f9f5ae35caf90a58dc1a6bf80e1 Author: Arnd Bergmann Date: Mon Mar 22 11:25:43 2021 +0100 scsi: aic94xx: Avoid -Wempty-body warning Building with 'make W=1' shows a harmless -Wempty-body warning: drivers/scsi/aic94xx/aic94xx_init.c: In function 'asd_free_queues': drivers/scsi/aic94xx/aic94xx_init.c:858:62: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 858 | ASD_DPRINTK("Uh-oh! Pending is not empty!\n"); Change the empty ASD_DPRINTK() macro to no_printk(), which avoids this warning and adds format string checking. Link: https://lore.kernel.org/r/20210322102549.278661-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit b5d15199a26f6dce624b43c82764cdb3827e7c89 Author: Jaegeuk Kim Date: Thu Apr 1 17:25:20 2021 -0700 f2fs: set checkpoint_merge by default Once we introduced checkpoint_merge, we've seen some contention w/o the option. In order to avoid it, let's set it by default. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit bd78980be1a68d14524c51c4b4170782fada622b Author: Phillip Potter Date: Thu Apr 1 23:36:07 2021 +0100 net: usb: ax88179_178a: initialize local variables before use Use memset to initialize local array in drivers/net/usb/ax88179_178a.c, and also set a local u16 and u32 variable to 0. Fixes a KMSAN found uninit-value bug reported by syzbot at: https://syzkaller.appspot.com/bug?id=00371c73c72f72487c1d0bfe0cc9d00de339d5aa Reported-by: syzbot+4993e4a0e237f1b53747@syzkaller.appspotmail.com Signed-off-by: Phillip Potter Signed-off-by: David S. Miller commit 5a32fcdb1e686e90a2c5f2d095fb79aa2fb3f176 Author: Florian Fainelli Date: Thu Apr 1 09:42:33 2021 -0700 net: phy: broadcom: Add statistics for all Gigabit PHYs All Gigabit PHYs use the same register layout as far as fetching statistics goes. Fast Ethernet PHYs do not all support statistics, and the BCM54616S would require some switching between the coper and fiber modes to fetch the appropriate statistics which is not supported yet. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a7a80b17c750c0f4b2c15cc61be5ff7c1d29f8d6 Author: Otto Hollmann Date: Thu Apr 1 17:57:05 2021 +0200 net: document a side effect of ip_local_reserved_ports If there is overlapp between ip_local_port_range and ip_local_reserved_ports with a huge reserved block, it will affect probability of selecting ephemeral ports, see file net/ipv4/inet_hashtables.c:723 int __inet_hash_connect( ... for (i = 0; i < remaining; i += 2, port += 2) { if (unlikely(port >= high)) port -= remaining; if (inet_is_local_reserved_port(net, port)) continue; E.g. if there is reserved block of 10000 ports, two ports right after this block will be 5000 more likely selected than others. If this was intended, we can/should add note into documentation as proposed in this commit, otherwise we should think about different solution. One option could be mapping table of continuous port ranges. Second option could be letting user to modify step (port+=2) in above loop, e.g. using new sysctl parameter. Signed-off-by: Otto Hollmann Signed-off-by: David S. Miller commit e228c0de904c8c5eb732dafb49a8446c1794dc72 Author: Yang Yingliang Date: Thu Apr 1 22:20:15 2021 +0800 lan743x: remove redundant semi-colon Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit c8ad0cf37c0061043e52a992f6d5f4dc54dea8f1 Author: Lu Wei Date: Thu Apr 1 17:27:01 2021 +0800 net: hns: Fix some typos Fix some typos. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit ec7e48ca4bc765e5460ec118ff84de6260dac855 Author: Wan Jiabing Date: Thu Apr 1 16:40:29 2021 +0800 net: smc: Remove repeated struct declaration struct smc_clc_msg_local is declared twice. One is declared at 301st line. The blew one is not needed. Remove the duplicate. Signed-off-by: Wan Jiabing Acked-by: Karsten Graul Signed-off-by: David S. Miller commit 9fadafa46f4813b9e3d8f76d3525c83499a26d36 Author: Wan Jiabing Date: Thu Apr 1 15:08:22 2021 +0800 include: net: Remove repeated struct declaration struct ctl_table_header is declared twice. One is declared at 46th line. The blew one is not needed. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: David S. Miller commit 2237778d8c215fe7921da02d25fd32e964aa8ee5 Author: Wong Vee Khee Date: Thu Apr 1 14:06:28 2021 +0800 net: stmmac: remove unnecessary pci_enable_msi() call The commit d2a029bde37b ("stmmac: pci: add MSI support for Intel Quark X1000") introduced a pci_enable_msi() call in stmmac_pci.c. With the commit 58da0cfa6cf1 ("net: stmmac: create dwmac-intel.c to contain all Intel platform"), Intel Quark platform related codes have been moved to the newly created driver. Removing this unnecessary pci_enable_msi() call as there are no other devices that uses stmmac-pci and need MSI to be enabled. Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit 8accc467758efd3a03368f9fec633b04dde80895 Author: Wong Vee Khee Date: Thu Apr 1 14:02:50 2021 +0800 stmmac: intel: use managed PCI function on probe and resume Update dwmac-intel to use managed function, i.e. pcim_enable_device(). This will allow devres framework to call resource free function for us. Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit b7a320c3a1ecb20d24173b668288441dbb7fe7dd Author: Xu Jia Date: Thu Apr 1 11:22:23 2021 +0800 net: ipv6: Refactor in rt6_age_examine_exception The logic in rt6_age_examine_exception is confusing. The commit is to refactor the code. Signed-off-by: Xu Jia Signed-off-by: David S. Miller commit f20a46c3044c3f75232b3d0e2d09af9b25efaf45 Author: Hoang Le Date: Thu Apr 1 09:30:48 2021 +0700 tipc: fix unique bearer names sanity check When enabling a bearer by name, we don't sanity check its name with higher slot in bearer list. This may have the effect that the name of an already enabled bearer bypasses the check. To fix the above issue, we just perform an extra checking with all existing bearers. Fixes: cb30a63384bc9 ("tipc: refactor function tipc_enable_bearer()") Cc: stable@vger.kernel.org Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 247ca657e20460375bf3217073d6477440f48025 Merge: 040806343bb4e a07cc1786dab6 Author: David S. Miller Date: Thu Apr 1 15:41:08 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-03-31 This series contains updates to ice driver only. Benita adds support for XPS. Ani moves netdev registration to the end of probe to prevent use before the interface is ready and moves up an error check to possibly avoid an unneeded call. He also consolidates the VSI state and flag fields to a single field. Dan changes the segment where package information is pulled. Paul S ensures correct ITR values are set when increasing ring size. Paul G rewords a link misconfiguration message as this could be expected. Bruce removes setting an unnecessary AQ flag and corrects a memory allocation call. Also fixes checkpatch issues for 'COMPLEX_MACRO'. Qi aligns PTYPE bitmap naming by adding 'ptype' prefix to the bitmaps missing it. Brett removes limiting Rx queue mapping to RSS size as there is not a dependency on this. He also refactors RSS configuration by introducing individual functions for LUT and key configuration and by passing a structure containing pertinent information instead of individual arguments. Tony corrects a comment block to follow netdev style. ==================== Signed-off-by: David S. Miller commit b75d8f38bcc9599af42635530c00268c71911f11 Author: Richard Guy Briggs Date: Thu Apr 1 15:10:27 2021 -0400 audit: drop /proc/PID/loginuid documentation Format field Drop the "Format:" field from the /proc/PID/loginuid documentation and integrate the information into the Description field since it is not recognized by the "./scripts/get_abi.pl validate" command which causes a warning. Documentation/ABI/README describes the valid fields. Reported-by: Mauro Carvalho Chehab Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 4578be130a6470d85ff05b13b75a00e6224eeeeb Author: Keith Busch Date: Thu Apr 1 09:06:29 2021 -0700 overflow: Correct check_shl_overflow() comment A 'false' return means the value was safely set, so the comment should say 'true' for when it is not considered safe. Cc: Jason Gunthorpe Signed-off-by: Keith Busch Signed-off-by: Kees Cook Fixes: 0c66847793d1 ("overflow.h: Add arithmetic shift helper") Link: https://lore.kernel.org/r/20210401160629.1941787-1-kbusch@kernel.org commit ceaaa12904df07d07ea8975abbf04c4d60e46956 Author: Steven Rostedt (VMware) Date: Thu Apr 1 16:40:32 2021 -0400 ftrace: Simplify the calculation of page number for ftrace_page->records some more Commit b40c6eabfcd40 ("ftrace: Simplify the calculation of page number for ftrace_page->records") simplified the calculation of the number of pages needed for each page group without having any empty pages, but it can be simplified even further. Link: https://lore.kernel.org/lkml/CAHk-=wjt9b7kxQ2J=aDNKbR1QBMB3Hiqb_hYcZbKsxGRSEb+gQ@mail.gmail.com/ Suggested-by: Linus Torvalds Signed-off-by: Steven Rostedt (VMware) commit db42523b4f3e83ff86b53cdda219a9767c8b047f Author: Linus Torvalds Date: Thu Apr 1 16:14:17 2021 -0400 ftrace: Store the order of pages allocated in ftrace_page Instead of saving the size of the records field of the ftrace_page, store the order it uses to allocate the pages, as that is what is needed to know in order to free the pages. This simplifies the code. Link: https://lore.kernel.org/lkml/CAHk-=whyMxheOqXAORt9a7JK9gc9eHTgCJ55Pgs4p=X3RrQubQ@mail.gmail.com/ Signed-off-by: Linus Torvalds [ change log written by Steven Rostedt ] Signed-off-by: Steven Rostedt (VMware) commit 630bc9784b637eac9266d7133cb8698c5507ae7d Merge: 03c623535fbd7 4136c4443efce Author: Arnd Bergmann Date: Thu Apr 1 22:52:09 2021 +0200 Merge tag 'at91-defconfig-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/defconfig AT91 defconfig for 5.13: - aligment with recent kernel for sama5_defconfig - move of 2 options to built-in - addition of useful modules for validation and CI - addition of Hantro G1 VPU from staging * tag 'at91-defconfig-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: configs: at91: Modernize UBI defconfig part ARM: configs: at91: Add USB Video webcam class ARM: configs: at91: Add mtd tests as modules ARM: configs: at91: sama5: Add audio MIKROE PROTO board ARM: configs: at91: sama5: Enable LAN78XX as module ARM: configs: at91: sama5: PIOBU as built-in ARM: configs: at91: sama5: MCP16502 regulator as built-in ARM: configs: at91: sama5: enable the Hantro G1 engine ARM: configs: at91: sama5: update with savedefconfig Link: https://lore.kernel.org/r/20210401162207.29299-1-nicolas.ferre@microchip.com Signed-off-by: Arnd Bergmann commit 2726bf3ff2520dba61fafc90a055640f7ad54e05 Author: Florian Fainelli Date: Mon Mar 22 18:53:49 2021 -0700 swiotlb: Make SWIOTLB_NO_FORCE perform no allocation When SWIOTLB_NO_FORCE is used, there should really be no allocations of default_nslabs to occur since we are not going to use those slabs. If a platform was somehow setting swiotlb_no_force and a later call to swiotlb_init() was to be made we would still be proceeding with allocating the default SWIOTLB size (64MB), whereas if swiotlb=noforce was set on the kernel command line we would have only allocated 2KB. This would be inconsistent and the point of initializing default_nslabs to 1, was intended to allocate the minimum amount of memory possible, so simply remove that minimal allocation period. Signed-off-by: Florian Fainelli Reviewed-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 03c623535fbd7313f854f944b1e22f364e7b4c98 Merge: 797e1491b8df1 f6dc45610879f Author: Arnd Bergmann Date: Thu Apr 1 22:45:15 2021 +0200 Merge tag 'v5.12-next-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/defconfig Enable option to boot MediaTek based chromebook (mt8173 and mt8183) with defconfig * tag 'v5.12-next-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm64: defconfig: Enable options to support panel display for Mediatek Chromebooks arm64: defconfig: Allow mt8173-based boards to boot from usb Signed-off-by: Arnd Bergmann commit 797e1491b8df16eb666ec12f7a49515f12515c37 Author: Mark Brown Date: Thu Apr 1 11:28:58 2021 +0100 ARM: configs: Remove REGULATOR_USERSPACE_CONSUMER The userspace consumer is a development tool, not intended for producton systems and so should not be present in defconfigs especially not those for specific machines so is not a good fit for defconfig, remove it from those defconfigs where it is enabled. No system in mainline actually instantiates one. Signed-off-by: Mark Brown Acked-by: Daniel Mack Link: https://lore.kernel.org/r/20210401102858.4095-1-broonie@kernel.org' Signed-off-by: Arnd Bergmann commit bbbd7b0120849d0d8022a5a211d3f1171ecf43cb Merge: 1288974df7526 94c586e5941a4 Author: Arnd Bergmann Date: Thu Apr 1 22:40:07 2021 +0200 Merge tag 'imx-defconfig-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/defconfig i.MX defconfig change for 5.13: It includes a number of arm64 defconfig update for i.MX8 devices support. The following ones might deserve some notes. - Although Hantro decoder driver are sitting in staging, people already find it's quite useful on i.MX8M devices. - i.MX PCIe driver has no option for module build. - REALTEK_PHY becomes a built-in driver, because it's used on quite some i.MX8 reference boards where people want to boot via NFS. * tag 'imx-defconfig-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: configs: enable FlexTimer alarm timer arm64: configs: Select REALTEK_PHY as built-in arm64: configs: Enable PCIe support for imx8mq boards arm64: defconfig: Enable the Hantro decoder arm64: defconfig: add imx8qm pinctrl support arm64: defconfig: Enable wm8960 audio driver. arm64: defconfig: Enable asoc simple mux arm64: defconfig: Enable devfreq support for i.MX8MQ Link: https://lore.kernel.org/r/20210331041019.31345-6-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 1288974df752635fd6276466daf1924dee6c8e25 Merge: 907d6d3e41f96 40f90f4763e26 Author: Arnd Bergmann Date: Thu Apr 1 22:39:19 2021 +0200 Merge tag 'arm64_defconfig_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/defconfig ARM64 defconfig for v5.13 - Add support for Intel N5X SoCFPGA - Add support for Intel Keem SoC - Add support for Designware SPI driver * tag 'arm64_defconfig_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: defconfig: enable Intel's eASIC N5X SoCFPGA and Keem Bay SoC Link: https://lore.kernel.org/r/20210330110430.558182-3-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 907d6d3e41f960a083dc927350b3b531c43c1ce1 Author: Linus Walleij Date: Tue Mar 2 00:20:50 2021 +0100 ARM: configs: ux500: Update for new drivers Some new driver support for the Ux500 devices landed in v5.12-rc1 so update the defconfig to use them: - TM2 touchkey, used on the Golden and Janice. - SPI GPIO, used for the Janice display control. - NTC thermistor, used for the HREF temperature sensors. - V4L2 flash control that gives support for LED torch to userspaces such as Phosh. - The LEDs Flash class and RT8515 Flash/torch LED driver used in all the Samsung mobiles. - FSA9480 extcon, used by Janice. - BMC150 accelerometer, used by Janice. - IIO rescaler, used for thermistors and ALS on Janice. - MPU3050 gyroscope driver used by Janice. - Yamaha YAS530 magnetometer driver used by Janice. Signed-off-by: Linus Walleij Cc: Stephan Gerhold Link: https://lore.kernel.org/r/20210301232050.1457397-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit 6f35f62958ea395fa8cbd2a28f713ccac8d9b5bd Merge: 4f9c62d1f79c4 41dbf4a146a06 Author: Arnd Bergmann Date: Thu Apr 1 22:34:41 2021 +0200 Merge tag 'at91-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into arm/soc AT91 soc for 5.13: - Fixing a W=1 warning * tag 'at91-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: ARM: at91: pm: Move prototypes to mutually included header Link: https://lore.kernel.org/r/20210401174544.32193-1-nicolas.ferre@microchip.com Signed-off-by: Arnd Bergmann commit 4f9c62d1f79c42674e8ba0c4592a438c21fcbf23 Merge: 3e26eccd40f9d f21a468832f43 Author: Arnd Bergmann Date: Thu Apr 1 22:33:32 2021 +0200 Merge tag 'imx-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/soc i.MX SoC update for 5.13: - A couple of typo fixes on help text and comment. * tag 'imx-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx: Kconfig: Fix typo in help ARM: mach-imx: Fix a spelling in the file pm-imx5.c Link: https://lore.kernel.org/r/20210331041019.31345-2-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 3e26eccd40f9d4ff43fbd05edaccb96abfab04e8 Merge: 758c5408ea3d6 4adcf4c28f6dc Author: Arnd Bergmann Date: Thu Apr 1 22:31:16 2021 +0200 Merge tag 'omap-for-v5.13/genpd-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/soc Drop legacy data for dra7 and omap4/5 for genpd support for v5.13 Similar to what we have already done for am3 and 4, we can now boot dra7, omap4, and omap5 with devicetree data and genpd without legacy SoC specific built-in data. Let's drop the legacy data for these SoCs, and the related "ti,hwmods" custom devicetree property. As with these changes we now expect to have complete devicetree data, let's also warn in the case if an old devicetree data is noticed. And with the warning provided, there should not be any need to delay dropping the legacy data as it just unnecessarily complicates things. The main reasons for dropping the legacy data is to avoid the burden of maintaining a mixed boot process where both legacy built-in data and devicetree data are needed. And we can now use standard reset driver, genpd, and simple-pm-bus features. These patches are based on the related devicetree changes to add the missing interconnect target module configuration for these SoCs. * tag 'omap-for-v5.13/genpd-cleanup-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (87 commits) bus: ti-sysc: Warn about old dtb for dra7 and omap4/5 ARM: OMAP2+: Stop building legacy code for dra7 and omap4/5 ARM: OMAP2+: Drop legacy platform data for omap5 hwmod ARM: OMAP2+: Drop legacy platform data for omap5 l3 ARM: OMAP2+: Drop legacy platform data for omap5 l4_cfg ARM: OMAP2+: Drop legacy platform data for omap5 l4_per ARM: OMAP2+: Drop legacy platform data for omap5 l4_wkup ARM: OMAP2+: Drop legacy platform data for omap5 sata ARM: OMAP2+: Drop legacy platform data for omap5 mpu ARM: OMAP2+: Drop legacy platform data for omap5 emif ARM: OMAP2+: Drop legacy platform data for omap5 dmm ARM: dts: Configure simple-pm-bus for omap5 l3 ARM: dts: Configure simple-pm-bus for omap5 l4_cfg ARM: dts: Configure simple-pm-bus for omap5 l4_per ARM: dts: Configure simple-pm-bus for omap5 l4_wkup ARM: dts: Move omap5 l3-noc to a separate node ARM: dts: Move omap5 mmio-sram out of l3 interconnect ARM: dts: Configure interconnect target module for omap5 sata ARM: dts: Configure interconnect target module for omap5 gpmc ARM: dts: Configure interconnect target module for omap5 mpu ... Link: https://lore.kernel.org/r/pull-1617004205-537424@atomide.com-3 Signed-off-by: Arnd Bergmann commit 758c5408ea3d6d730ee388ad8354c4fe94685d4c Author: Ben Dooks Date: Tue Mar 23 09:32:03 2021 +0100 ARM: ux500: make ux500_cpu_die static The ux500_cpu_die function is not exported so make it static to avoid the following warning: arch/arm/mach-ux500/platsmp.c:89:6: warning: symbol 'ux500_cpu_die' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210323083203.1646842-1-linus.walleij@linaro.org' Signed-off-by: Arnd Bergmann commit ba87f2009edb69fa81d344c55bcee518b0707c98 Merge: 3e7f2f2980e82 4483397b03536 Author: Arnd Bergmann Date: Thu Apr 1 22:20:08 2021 +0200 Merge tag 'socfpga_update_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/drivers SoCFPGA updates for v5.13 - Patches from Krzysztof Kozlowski the cleans up and consolidate support for SoCFPGA platforms - Rename ARCH_SOCFPGA into ARCH_INTEL_SOCFPGA - Consolidate ARCH_STRATIX10 into ARCH_INTEL_SOCFPGA - Consolidate ARCH_AGILEX into ARCH_INTEL_SOCFPGA - Consolidate ARCH_N5X into ARCH_INTEL_SOCFPGA * tag 'socfpga_update_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: socfpga: drop ARCH_SOCFPGA reset: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs i2c: altera: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs fpga: altera: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs dmaengine: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs clk: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs (and compile test) clk: socfpga: allow compile testing of Stratix 10 / Agilex clocks arm64: socfpga: merge Agilex and N5X into ARCH_INTEL_SOCFPGA EDAC: altera: merge ARCH_SOCFPGA and ARCH_STRATIX10 clk: socfpga: merge ARCH_SOCFPGA and ARCH_STRATIX10 clk: socfpga: build together Stratix 10, Agilex and N5X clock drivers net: stmmac: merge ARCH_SOCFPGA and ARCH_STRATIX10 mfd: altera: merge ARCH_SOCFPGA and ARCH_STRATIX10 ARM: socfpga: introduce common ARCH_INTEL_SOCFPGA clk: socfpga: allow building N5X clocks with ARCH_N5X Link: https://lore.kernel.org/r/20210330110430.558182-1-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit 3e7f2f2980e82eb20ce73691d65d696c6994ad4c Merge: 66f3431a87339 60d93f64a851d Author: Arnd Bergmann Date: Thu Apr 1 22:17:12 2021 +0200 Merge tag 'v5.12-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/drivers - add MT8183 support to mutex driver MMSYS: - use per SoC array to describe the possible routing - add support for MT8183 Power management domains: - fix the case of a domain fails to get added - add names for each power domain to make debugging easier PMIC wrapper: - add support for PMIC wrapper with integrated arbiter - add support for MT8192/MT6873 * tag 'v5.12-next-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: soc: mediatek: pm-domains: Add a power domain names for mt8167 soc: mediatek: pm-domains: Add a power domain names for mt8192 soc: mediatek: pm-domains: Add a power domain names for mt8183 soc: mediatek: pm-domains: Add a meaningful power domain name soc: mediatek: Make symbol 'mtk_mutex_driver' static soc: mediatek: mmsys: Add mt8183 mmsys routing table soc: mediatek: pwrap: add pwrap driver for MT6873/8192 SoCs dt-bindings: mediatek: add compatible for MT6873/8192 pwrap soc: mediatek: pwrap: add arbiter capability soc: mediatek: pwrap: use BIT() macro soc: mediatek: pm-domains: Fix missing error code in scpsys_add_subdomain() soc: mediatek: mmsys: Use an array for setting the routing registers soc: mediatek: mmsys: Create struct mtk_mmsys to store context data soc: mediatek: add mtk mutex support for MT8183 Link: https://lore.kernel.org/r/c47d4bdd-9e05-c0de-bacb-3a262fed936d@gmail.com Signed-off-by: Arnd Bergmann commit 7d534c3a5e1f52022c889ed10c413c54ac2a4d0f Merge: 8028548ba1628 a7dceafed43a4 Author: Arnd Bergmann Date: Thu Apr 1 22:05:57 2021 +0200 Merge tag 'v5.12-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt - add trivial bindings for MT8195 - fix dtbs_check warnings - add pinmux for build-in Wifi on MT7622 evaluation borad MT8183: - fix USB wakeup register - add regulator for EVB board - add registers to mailbox consumers - add thermal zone and trip points for CPU cooling - Add new boards: * ASUS Chromebook Flip CM3 * ASUS Chromebook Detachable CM3 * Acer Chromebook Spin 311 * Lenovo 10e Chromebook Tablet MT8173: - fix PHY property in DSI - fix power-domain for PMIC wrapper Pumkin: - add MT8516 based board - add MT8183 based board - fix reset pin for MT8167 and MT8516 based boards * tag 'v5.12-next-dts64' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: (29 commits) arm64: dts: mediatek: fix reset GPIO level on pumpkin arm64: dts: mt8183: add mt8183 pumpkin board dt-bindings: arm64: dts: mediatek: Add mt8183-pumpkin board arm64: dts: mt8183: Add kukui kodama board arm64: dts: mt8183: Add kukui kakadu board dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-kodama dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-kakadu dt-bindings: arm64: dts: mediatek: Add mt8516-pumpkin board arm64: dts: mt7622: add ePA/eLNA pinmux for built-in WiFi dt-bindings: nvmem: mediatek: add support for MediaTek mt8192 SoC arm64: dts: mt8173: fix wrong power-domain phandle of pmic arm64: dts: mt8183: Configure CPU cooling arm64: dts: mt8183: add thermal zone node arm64: dts: mt8183: Add gce client reg for display subcomponents arm64: dts: mediatek: mt8183: fix dtbs_check warning arm64: dts: mediatek: mt7622: harmonize node names and compatibles arm64: dts: mediatek: mt8516: harmonize node names and compatibles arm64: dts: mediatek: mt2712: harmonize node names arm64: dts: mediatek: mt8173: fix dtbs_check warning arm64: dts: mt8173: fix property typo of 'phys' in dsi node ... Link: https://lore.kernel.org/r/d1121630-5778-0955-fac7-f921174defe7@gmail.com Signed-off-by: Arnd Bergmann commit 8028548ba16284166987d8969e0c5bec36a0228d Merge: 520f30feb864e 562f818deaf06 Author: Arnd Bergmann Date: Thu Apr 1 22:04:55 2021 +0200 Merge tag 'v5.12-next-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux into arm/dt - fix dtbs_check warnings - enable SMP for mt6589 * tag 'v5.12-next-dts32' of git://git.kernel.org/pub/scm/linux/kernel/git/matthias.bgg/linux: arm: mediatek: dts: activate SMP for mt6589 arm: dts: mt2701: harmonize node names and compatibles arm: dts: mt7623: harmonize node names and compatibles arm: dts: mt7629: harmonize node names and compatibles Link: https://lore.kernel.org/r/be262120-6cd9-87a7-ccc3-f5c403cff66b@gmail.com Signed-off-by: Arnd Bergmann commit 520f30feb864e9baaf7bed677892b478ffd10232 Merge: 815bacb522c5d 405fa9e9d8664 Author: Arnd Bergmann Date: Thu Apr 1 22:02:59 2021 +0200 Merge tag 'tegra-for-5.13-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt arm64: tegra: Device tree fixes for v5.12-rc6 This contains a couple of device tree fixes for the v5.12 release cycle. These are needed for proper audio support on Jetson AGX Xavier, to boot the Jetson Xavier NX from an SD card and to be able to suspend/resume the Jetson TX2. * tag 'tegra-for-5.13-arm64-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Move clocks from RT5658 endpoint to device node arm64: tegra: Fix mmc0 alias for Jetson Xavier NX arm64: tegra: Set fw_devlink=on for Jetson TX2 arm64: tegra: Add unit-address for ACONNECT on Tegra186 Link: https://lore.kernel.org/r/20210401172622.3352990-5-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 815bacb522c5d5e833dad5be349c80de9afdf1df Merge: ece61ed98bdab 3a6c267dd7b88 Author: Arnd Bergmann Date: Thu Apr 1 22:01:53 2021 +0200 Merge tag 'tegra-for-5.13-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt ARM: tegra: Device tree changes for v5.13-rc1 This contains a couple of improvements and fixes for various 32-bit Tegra-based boards. * tag 'tegra-for-5.13-arm-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: acer-a500: Add atmel,wakeup-method property ARM: tegra: Specify tps65911 as wakeup source ARM: tegra: Specify memory suspend OPP in device-tree ARM: tegra: Specify CPU suspend OPP in device-tree ARM: tegra: ouya: Specify all CPU cores as cooling devices ARM: tegra: nexus7: Specify all CPU cores as cooling devices ARM: tegra: acer-a500: Rename avdd to vdda of touchscreen node ARM: tegra: acer-a500: Specify all CPU cores as cooling devices ARM: tegra: acer-a500: Reduce thermal throttling hysteresis to 0.2C ARM: tegra: acer-a500: Enable core voltage scaling ARM: tegra: paz00: Enable full voltage scaling ranges for CPU and Core domains ARM: tegra: cardhu: Support CPU thermal throttling ARM: tegra: cardhu: Support CPU frequency and voltage scaling on all board variants ARM: tegra: ventana: Support CPU thermal throttling ARM: tegra: ventana: Support CPU and Core voltage scaling Link: https://lore.kernel.org/r/20210401172622.3352990-4-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit ece61ed98bdab5c5ee28777cd5cb3113fe71bacf Merge: 24eab7796e6f1 d1e24c4625073 Author: Arnd Bergmann Date: Thu Apr 1 22:01:10 2021 +0200 Merge tag 'tegra-for-5.13-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/dt dt-bindings: Changes for v5.13-rc1 One single changes that adds the nvidia,pmc property to the XUSB pad controller binding, which will subsequently be used to implement USB sleepwalk functionality. * tag 'tegra-for-5.13-dt-bindings' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: dt-bindings: phy: tegra-xusb: Add nvidia,pmc prop Link: https://lore.kernel.org/r/20210401172622.3352990-1-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 693978527c17e6234918f40b157c740f5632c102 Author: Rafael J. Wysocki Date: Thu Mar 25 19:57:51 2021 +0100 PCI/ACPI: Fix acpi_pci_set_power_state() debug message If PCI_D3cold is passed to acpi_pci_set_power_state() as the second argument and there is no ACPI D3cold support for the given device, the debug message will state that the device power state has been changed to D3cold, while in fact it will be D3hot, because acpi_device_set_power() falls back to D3hot automatically if D3cold is not supported without returning an error. To address this issue, modify the debug message to print the current power state of the target PCI device's ACPI companion instead of printing the target power state, which may not reflect the real final power state of the device. Link: https://lore.kernel.org/r/4319486.LvFx2qVVIh@kreacher Signed-off-by: Rafael J. Wysocki Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 24eab7796e6f15ea26e3f2a4883e0fa01494819c Merge: 03a807f4ee1e6 6ed9269265e10 Author: Arnd Bergmann Date: Thu Apr 1 21:47:19 2021 +0200 Merge tag 'stm32-dt-for-v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32 into arm/dt STM32 DT updates for v5.13, round 1 Highlights: ---------- MCU part: -Add stm32h750 SoC support. It is based on stm32h743 and embeds crypto IPs and 2 ADC. -Add new art-pi board based on stm32h750. This board embeds: -8MB QSPI flash. -16MB SPI flash. -32MB SDRAM. -AP6212 combo (wifi/bt/fm). MPU part: -Use dedicated PTP clock for Ethernet controller on stm32mp151. -Enable i2c analog filter on stm32mp151. -DH: -Update GPIO names. -Enable crc1 & crryp1 on DHSOM. -Engicam: add new boards support: -MicroGEA SOM which embeds STM32MP157aac, 512 MB Nand Flash I2S. -MicroGEA STM32MP1 Microdev 2.0 which embeds MicroGEA SOM, Ethernet up to 100 Mbps, USB typeA, microSD, UMTS LTE, Wifi/BT LVDS panel connector. -MicroGEA STM32MP1 MicroDev 2.0 7" which embeds a MicroGEA STM32MP1 MicroDev 2.0 plus 7" Open Frame panel solution (7" AUO B101AW03 LVDS panel and EDT DT5526 Touch) -i.Core STM32MP1 EDIMM SoM based on STM32MP157A. -C.TOUCH 2.0 n EDIMM compliant general purpose Carrier board with capacitive touch interface support based on i.Core STM32MP1 EDIMM SoM. It embeds ETH 10/100, wifi/bt, CAN, USB TypeA/OTG, LVDS pannel connector. -EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board based on i.Core STM32MP1 EDIMM SoM. IT embeds LCD 7" C.Touch, wifi/bt,2*LVDS FHD, 3*USB2, 1*USB3 ... * tag 'stm32-dt-for-v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/atorgue/stm32: (26 commits) ARM: dts: stm32: Add PTP clock to Ethernet controller ARM: dts: stm32: Enable crc1 and cryp1 where applicable on DHSOM ARM: dts: stm32: Update GPIO line names on PicoITX ARM: dts: stm32: Update GPIO line names on DRC02 ARM: dts: stm32: Fill GPIO line names on AV96 ARM: dts: stm32: Fill GPIO line names on DHCOM SoM dt-bindings: serial: stm32: Use 'type: object' instead of false for 'additionalProperties' ARM: stm32: Add a new SoC - STM32H750 ARM: dts: stm32: add support for art-pi board based on stm32h750xbh6 ARM: dts: stm32: fix i2c node typo in stm32h743 ARM: dts: stm32: add new instances for stm32h743 MCU ARM: dts: stm32: introduce stm32h7-pinctrl.dtsi to support stm32h750 dt-bindings: arm: stm32: Add compatible strings for ART-PI board Documentation: arm: stm32: Add stm32h750 value line doc ARM: dts: stm32: enable the analog filter for all I2C nodes in stm32mp151 ARM: dts: stm32: Add Engicam i.Core STM32MP1 EDIMM2.2 Starter Kit dt-bindings: arm: stm32: Add Engicam i.Core STM32MP1 EDIMM2.2 Starter Kit ARM: dts: stm32: Add Engicam i.Core STM32MP1 C.TOUCH 2.0 ARM: dts: stm32: Add Engicam i.Core STM32MP1 SoM dt-bindings: arm: stm32: Add Engicam i.Core STM32MP1 C.TOUCH 2.0 ... Link: https://lore.kernel.org/r/48784f53-943b-0baf-d4a0-fcb7d3849b00@foss.st.com Signed-off-by: Arnd Bergmann commit 03a807f4ee1e629419461cc4d9935bbbafa7d157 Merge: 45f174d8a13cd fa99edd84feac Author: Arnd Bergmann Date: Thu Apr 1 21:43:51 2021 +0200 Merge tag 'ux500-dts-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik into arm/dt Ux500 DTS changes for the v5.13 kernel cycle: - Fix up the WLAN on Janice - Fix the touchscreen on TVK R2 - Push down definitions to the UIBs instead of trying to share too much. - Bump the AUX1 voltage on the AB8500 so the touchscreen will work. - Define the CTTYSP touchscreen on the TVK R3. * tag 'ux500-dts-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik: ARM: dts: ux500: Add Cypress CTTYSP touch to TVK UIB ARM: dts: ux500: Bump AUX1 voltage ARM: dts: ux500: Clarify UIB version per board ARM: dts: ux500: Totally separate TVK R2 and R3 ARM: dts: ux500: Push TC35893 defines to each UIB ARM: dts: ux500: Fix up TVK R3 sensors ARM: dts: ux500: Push sensors to TVK R2 board ARM: dts: ux500: Move Synaptics to right include ARM: dts: ux500: Fix touchscreen on TVK R2 ARM: dts: ux500: Fix BT+WLAN on Janice Link: https://lore.kernel.org/r/CACRpkdanRQ6A85d=7vgpzbg-m3-yFcpQ4fuzrxZu3RJ0DrA2bQ@mail.gmail.com Signed-off-by: Arnd Bergmann commit 45f174d8a13cd877034189628f6b00bf30c832c6 Merge: d2adc561c9bfc d9df28ba587f6 Author: Arnd Bergmann Date: Thu Apr 1 21:42:56 2021 +0200 Merge tag 'juno-updates-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/dt ARMv8 Juno updates for v5.13 Couple of changes to describe PCI dma-ranges correctly which was previously removed and to enable the PCIe and DMA SMMU. * tag 'juno-updates-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux: arm64: dts: juno: Enable more SMMUs arm64: dts: juno: Describe PCI dma-ranges Link: https://lore.kernel.org/r/20210331100410.cenuhvpqoumvsk52@bogus Signed-off-by: Arnd Bergmann commit d2adc561c9bfc72468cb50d15080459757ff5f2e Merge: 4f662ba2be220 51c8eaa1b73e3 Author: Arnd Bergmann Date: Thu Apr 1 21:41:48 2021 +0200 Merge tag 'imx-dt64-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX arm64 device tree update for 5.13: - A series from Dong Aisheng to update i.MX8Q device trees for adopting SS (SubSystems) based bindings. - New board support: Kontron pitx-imx8m, Engicam i.Core MX8M Mini. - A series from Adrien Grassein to add various peripheral support for imx8mm-nitrogen-r2 board. - A series from Guido Günther to update librem5-devkit device tree. - A number of patches from Michael Walle to add Root Complex Event Collector interrupt, update MTD partitions and add rtc0 alias for ls1028a-kontron-sl28 board. - Add EQOS MAC support for phyBOARD-Pollux-i.MX8MP. - Add 2x2 SFP+ cage support for clearfog-itx boards. - Small and random update for various boards. * tag 'imx-dt64-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (55 commits) arm64: dts: fsl-ls1028a-kontron-sl28: add rtc0 alias arm64: dts: ls1028a: move rtc alias to individual boards arm64: dts: fsl-ls1028a-kontron-sl28: combine unused partitions arm64: dts: fsl-ls1028a-kontron-sl28: move MTD partitions arm64: dts: imx8mp-evk: Improve the Ethernet PHY description arm64: dts: imx8mq-librem5-r3: Mark buck3 as always on arm64: dts: imx8mq-librem5: Hog the correct gpio arm64: dts: lx2160a-clearfog-itx: add SFP support arm64: dts: imx8mp-phyboard-pollux-rdk: Change debug UART arm64: dts: imx8mn: Reorder flexspi clock-names entry arm64: dts: imx8mm: Reorder flexspi clock-names entry arm64: dts: ls1028a: set up the real link speed for ENETC port 2 arm64: dts: imx8mm-nitrogen-r2: add ecspi2 support arm64: dts: imx: add imx8qm mek support arm64: dts: imx: add imx8qm common dts file arm64: dts: imx8qm: add dma ss support arm64: dts: imx8: split adma ss into dma and audio ss arm64: dts: imx8qm: add conn ss support arm64: dts: imx8qm: add lsio ss support arm64: dts: imx8: switch to new lpcg clock binding ... Link: https://lore.kernel.org/r/20210331041019.31345-5-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 4f662ba2be220044bb965f36826723c8f1e14eec Merge: 2771bc0dbaad4 45b78dd39f04f Author: Arnd Bergmann Date: Thu Apr 1 21:37:35 2021 +0200 Merge tag 'imx-dt-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX device tree change for 5.13: - New board support: i.MX7D based reMarkable2. - Clean up imx6ql-pfla02 hog group by moving pins into corresponded client groups. - Add Netronix embedded controller for imx50-kobo-aura. - A series from Sebastian Reichel to improve GE Bx50v3 device trees. - Support I2C bus recovery for imx6qdl-wandboard by adding SCL/SDA GPIOs. - Remove unnecessary #address-cells/#size-cells from imx6qdl-gw boards. - Various small and random device tree update. * tag 'imx-dt-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: (21 commits) ARM: dts: imx6: pbab01: Set USB OTG port to peripheral ARM: dts: imx6: pfla02: Fix USB vbus enable pinmuxing ARM: imx7d-remarkable2: Initial device tree for reMarkable2 ARM: dts: imx7d-mba7: Remove unsupported PCI properties ARM: dts: imx6qdl-gw*: Remove unnecessary #address-cells/#size-cells ARM: dts: imx6dl-plybas: Fix gpio-keys W=1 warnings ARM: dts: imx: bx50v3: Define GPIO line names ARM: dts: imx: bx50v3: i2c GPIOs are open drain ARM: dts: imx6q-ba16: improve PHY information ARM: dts: imx6q-ba16: add USB OTG VBUS enable GPIO ARM: dts: ls1021a: mark crypto engine dma coherent ARM: dts: colibri-imx6ull: Change drive strength for usdhc2 ARM: dts: imx6ql-pfla02: Move "hog" pins into corresponded pin groups ARM: dts: imx6qdl-phytec-pbab01: Select synchronous mode for AUDMUX ARM: dts: imx6qdl-ts7970: Drop redundant "fsl,mode" option ARM: dts: imx53-qsb: Describe the esdhc1 card detect pin ARM: dts: ls1021a: Harmonize DWC USB3 DT nodes name ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery ARM: dts: imx: Mark IIM as syscon on i.MX51/i.MX53 ARM: dts: imx6sl-tolino-shine2hd: Add Netronix embedded controller ... Link: https://lore.kernel.org/r/20210331041019.31345-4-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 2771bc0dbaad48238b0fc3ae73d1c5215b5e018b Merge: 3b73ea6c8069a 6634b2d252acc Author: Arnd Bergmann Date: Thu Apr 1 21:36:44 2021 +0200 Merge tag 'imx-bindgins-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/dt i.MX bindings update for 5.13: - Add vendor prefix for reMarkable. - Add compatible for reMarkable 2 e-Ink tablet, Kontron pITX-imx8m board, Engicam i.Core MX8M Mini devices. - Add compatbile 'fsl,imx8qm-mu' for i.MX mailbox bindings. - One correction on example clock-names in imx8qxp-lpcg bindings. * tag 'imx-bindgins-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: dt-bindings: arm: fsl: Add the reMarkable 2 e-Ink tablet dt-bindings: Add vendor prefix for reMarkable dt-bindings: mailbox: mu: add imx8qm support dt-bindings: arm: fsl: add imx8qm boards compatible string dt-bindings: arm: fsl: add Kontron pITX-imx8m board dt-bindings: arm: fsl: Add Engicam i.Core MX8M Mini EDIMM2.2 Starter Kit dt-bindings: arm: fsl: Add Engicam i.Core MX8M Mini C.TOUCH 2.0 dt-bindings: clock: imx8qxp-lpcg: correct the example clock-names Link: https://lore.kernel.org/r/20210331041019.31345-3-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit 3b73ea6c8069a616be468d00c7ba6148bf82dad9 Merge: 498adc8623c23 9f01f5cdb5483 Author: Arnd Bergmann Date: Thu Apr 1 21:35:38 2021 +0200 Merge tag 'arm-soc/for-5.13/devicetre-arm64' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM64-based SoCs Device Tree changes for 5.13, please pull the following: - Rafal continues to add support for the 4908 SoCs and describes the USB PHY, firmware flash partitions and Ethernet switch and Ethernet controller. He also adds support for the TP-Link Archer C2300 V1 router and upates the Netgear R8000P and Asus GT-AC5300 routers network ports description. * tag 'arm-soc/for-5.13/devicetre-arm64' of https://github.com/Broadcom/stblinux: arm64: dts: broadcom: bcm4908: add Ethernet MAC addr arm64: dts: broadcom: bcm4908: add Ethernet TX irq arm64: dts: broadcom: bcm4908: set Asus GT-AC5300 port 7 PHY mode arm64: dts: broadcom: bcm4908: add TP-Link Archer C2300 V1 dt-bindings: arm: bcm: document TP-Link Archer C2300 binding arm64: dts: broadcom: bcm4908: fix switch parent node name arm64: dts: broadcom: bcm4908: describe firmware partitions arm64: dts: broadcom: bcm4908: add remaining Netgear R8000P LEDs arm64: dts: broadcom: bcm4908: describe Netgear R8000P switch arm64: dts: broadcom: bcm4908: describe Ethernet controller arm64: dts: broadcom: bcm4908: describe USB PHY Link: https://lore.kernel.org/r/20210330184006.1451315-2-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 498adc8623c237d9f87f4a0582393e0d69504bae Merge: 61de0971ea913 dcb56d61d5a8a Author: Arnd Bergmann Date: Thu Apr 1 21:34:48 2021 +0200 Merge tag 'arm-soc/for-5.13/devicetree' of https://github.com/Broadcom/stblinux into arm/dt This pull request contains Broadcom ARM-based SoCs Device Tree changes for 5.13, please pull the following: - Rafal fixes YAML warnings for the memory nodes of BCM5301X nodes and adds support for the NVMEM NVRAM node on Linksys and Luxul WLAN routers. He also fixes up the partitions for the Linksys EA9400 to use the newly introduced parser compatible and sets the power LED to its default state. * tag 'arm-soc/for-5.13/devicetree' of https://github.com/Broadcom/stblinux: ARM: dts: BCM5301X: Set Linksys EA9500 power LED ARM: dts: BCM5301X: Fix Linksys EA9500 partitions ARM: dts: BCM5301X: Describe NVMEM NVRAM on Linksys & Luxul routers ARM: dts: BCM5301X: fix "reg" formatting in /memory node Link: https://lore.kernel.org/r/20210330184006.1451315-1-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit 61de0971ea913d262225dff5621018d590e67025 Merge: e49936d215472 0501418e4439d Author: Arnd Bergmann Date: Thu Apr 1 21:33:43 2021 +0200 Merge tag 'socfpga_dts_update_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into arm/dt SoCFPGA DTS updates for v5.13 - Patches from Krzysztof Kozlowski that fixes dtc warnings and dtbs_check warnings - Adjust the "cnds,read-delay" value for the Agilex devkit to 2 * tag 'socfpga_dts_update_for_v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: arm64: dts: intel: adjust qpsi read-delay property arm64: dts: intel: socfpga_agilex_socdk_nand: align LED node names with dtschema arm64: dts: intel: socfpga_agilex: align node names with dtschema arm64: dts: intel: socfpga_agilex: use defined for GIC interrupts arm64: dts: intel: socfpga_agilex: move usbphy out of soc node arm64: dts: intel: socfpga_agilex: remove default status=okay arm64: dts: intel: socfpga_agilex: move timer out of soc node arm64: dts: intel: socfpga_agilex: move clocks out of soc node arm64: dts: intel: socfpga: override clocks by label Link: https://lore.kernel.org/r/20210330110430.558182-2-dinguyen@kernel.org Signed-off-by: Arnd Bergmann commit e49936d2154724213b5ec8a8aae89b2c2ebc3af1 Merge: f374f25aab6f1 083516ad540a1 Author: Arnd Bergmann Date: Thu Apr 1 21:26:02 2021 +0200 Merge tag 'omap-for-v5.13/dts-genpd-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/dt Devicetree changes for omaps for genpd support for v5.13 In order to move omap4/5 and dra7 to probe with devicetree data and genpd, we need to add the missing interconnect target module configuration for the drivers that do not still have it. This is similar to what we have already done earlier for am3 and 4 earlier. These patches are very much similar for all the three SoCs here. The dra7 changes were already available for v5.12 merge window, but were considered too late to add for v5.12. The patches for omap4 and 5 follow the same pattern, except for PCIe that is available only on dra7. We do the changes one driver at a time, and still keep the legacy property for "ti,hwmods" mostly around, except for cases when already not needed. We will be dropping the custom property and related legacy data in a follow-up series. * tag 'omap-for-v5.13/dts-genpd-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (53 commits) ARM: dts: Configure simple-pm-bus for omap5 l3 ARM: dts: Configure simple-pm-bus for omap5 l4_cfg ARM: dts: Configure simple-pm-bus for omap5 l4_per ARM: dts: Configure simple-pm-bus for omap5 l4_wkup ARM: dts: Move omap5 l3-noc to a separate node ARM: dts: Move omap5 mmio-sram out of l3 interconnect ARM: dts: Configure interconnect target module for omap5 sata ARM: dts: Configure interconnect target module for omap5 gpmc ARM: dts: Configure interconnect target module for omap5 mpu ARM: dts: Configure interconnect target module for omap5 emif ARM: dts: Configure interconnect target module for omap5 dmm ARM: dts: Prepare for simple-pm-bus for omap4 l3 ARM: dts: Configure simple-pm-bus for omap4 l4_cfg ARM: dts: Configure simple-pm-bus for omap4 l4_per ARM: dts: Configure simple-pm-bus for omap4 l4_wkup ARM: dts: Move omap4 l3-noc to a separate node ARM: dts: Move omap4 mmio-sram out of l3 interconnect ARM: dts: Configure interconnect target module for omap4 mpu ARM: dts: Configure interconnect target module for omap4 debugss ARM: dts: Configure interconnect target module for omap4 emif ... Link: https://lore.kernel.org/r/pull-1617004205-537424@atomide.com-2 Signed-off-by: Arnd Bergmann commit 66f3431a87339f332a2ca674e9fbca48a6014f89 Merge: 16320d7fe7d6c 366d7c643a8a9 Author: Arnd Bergmann Date: Thu Apr 1 21:20:14 2021 +0200 Merge tag 'tegra-for-5.13-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers soc/tegra: Changes for v5.13-rc1 Contains a couple of fixes to the PMC power domain implementation and exports a regmap from PMC needed to implement USB sleepwalk support. * tag 'tegra-for-5.13-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: soc/tegra: pmc: Print out domain name when reset fails to acquire soc/tegra: pmc: Ensure that clock rates aren't too high soc/tegra: pmc: Fix completion of power-gate toggling soc/tegra: pmc: Fix imbalanced clock disabling in error code path soc/tegra: regulators: Fix locking up when voltage-spread is out of range soc/tegra: pmc: Provide USB sleepwalk register map Link: https://lore.kernel.org/r/20210401172622.3352990-3-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 704d68f5f2df46f7195a62bc21014e71a7f67a99 Author: Yixian Liu Date: Sat Mar 27 18:25:38 2021 +0800 RDMA/hns: Reorganize doorbell update interfaces for all queues The doorbell update interfaces are very similar for different queues, such as SQ, RQ, SRQ, CQ and EQ. So reorganize these code and also fix some inappropriate naming. Link: https://lore.kernel.org/r/1616840738-7866-3-git-send-email-liweihang@huawei.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit cf8cd4ccb269dbd57c3792799d0e5251547d6734 Author: Yixian Liu Date: Sat Mar 27 18:25:37 2021 +0800 RDMA/hns: Support configuring doorbell mode of RQ and CQ HIP08 supports both normal and record doorbell mode for RQ and CQ, SQ record doorbell for userspace is also supported by the software for flushing CQE process. As now the capability of HIP08 are exposed to the user and are configurable, the support of normal doorbell should be added back. Note that, if switching to normal doorbell, the kernel will report "flush cqe is unsupported" if modify qp to error status as the flush is based on record doorbell. Link: https://lore.kernel.org/r/1616840738-7866-2-git-send-email-liweihang@huawei.com Signed-off-by: Yixian Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 16320d7fe7d6ca19c57523bb5a9b085942842159 Merge: 62c93360ec5a1 0c7ea2b1c8507 Author: Arnd Bergmann Date: Thu Apr 1 21:14:01 2021 +0200 Merge tag 'tegra-for-5.13-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into arm/drivers clk: tegra: Changes for v5.13-rc1 This adds PLLE HW sequencer support which is necessary for USB sleepwalk functionality. * tag 'tegra-for-5.13-clk' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: clk: tegra: Don't enable PLLE HW sequencer at init clk: tegra: Add PLLE HW power sequencer control Link: https://lore.kernel.org/r/20210401172622.3352990-2-thierry.reding@gmail.com Signed-off-by: Arnd Bergmann commit 8115f974456218e589c681bdf6e4fb854726fc1e Author: Xi Wang Date: Sat Mar 27 11:21:34 2021 +0800 RDMA/hns: Simplify command fields for HEM base address configuration Use hr_reg_write() instead of roce_set_field() to simplify codes about configuring HEM BA. Link: https://lore.kernel.org/r/1616815294-13434-6-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit c6f0411b960d0b5af35c78cf47cc8019bee00656 Author: Xi Wang Date: Sat Mar 27 11:21:33 2021 +0800 RDMA/hns: Reorganize process of setting HEM Encapsulate configuring GMV base address and other type of HEM table into two separate functions to make process of setting HEM clearer. Link: https://lore.kernel.org/r/1616815294-13434-5-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit ee82e68850a43a080e64497ec6940d23f8c6df66 Author: Xi Wang Date: Sat Mar 27 11:21:32 2021 +0800 RDMA/hns: Refactor reset state checking flow The 'HNS_ROCE_OPC_QUERY_MB_ST' command will response the mailbox complete status and hardware busy flag, and the complete status is only valid when the busy flag is 0, so it's better to query these two fields at a time rather than separately. Link: https://lore.kernel.org/r/1616815294-13434-4-git-send-email-liweihang@huawei.com Signed-off-by: Xi Wang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d102a6e3748474074d0610bc144979a20e328c3e Author: Yixing Liu Date: Sat Mar 27 11:21:31 2021 +0800 RDMA/hns: Reorganize hns_roce_create_cq() Encapsulate two subprocesses into functions. Link: https://lore.kernel.org/r/1616815294-13434-3-git-send-email-liweihang@huawei.com Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 4940b0ab458adc9446291a50b61f5e7607f0082b Author: Weihang Li Date: Sat Mar 27 11:21:30 2021 +0800 RDMA/hns: Refactor hns_roce_v2_poll_one() Encapsulate the process of obtaining the current QP and filling WC as functions, also merge some duplicate code. Link: https://lore.kernel.org/r/1616815294-13434-2-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit d907294b27d074c4d9813509bfee982ca70db33d Author: Weihang Li Date: Mon Mar 29 16:46:24 2021 +0800 MAINTAINERS: remove Xavier as maintainer of HISILICON ROCE DRIVER Wei Hu(Xavier) has left Hisilicon and his email address is invalid now. I'd be glad to add him back with another address if he wants to continue maintain this module. Link: https://lore.kernel.org/r/1617007584-39842-1-git-send-email-liweihang@huawei.com Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 62c93360ec5a135061624eb095986799942efcbd Merge: e9396d6b3864d f63af5f3b8e2c Author: Arnd Bergmann Date: Thu Apr 1 21:08:43 2021 +0200 Merge tag 'imx-drivers-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers i.MX drivers change for 5.13: - Update SCU power domain driver to keep console domain power on. - Add missing ADC1 power domain to SCU power domain driver. - Update comments for single global power domain in SCU power domain driver. - Add i.MX51/i.MX53 unique id support to i.MX SoC driver. * tag 'imx-drivers-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware: imx: scu-pd: add missed ADC1 pd firmware: imx: scu-pd: Update comments for single global power domain firmware: imx: scu-pd: do not power off console domain soc: imx: add i.MX51/i.MX53 unique id support Link: https://lore.kernel.org/r/20210331041019.31345-1-shawnguo@kernel.org Signed-off-by: Arnd Bergmann commit e9396d6b3864d235c57733ccb4902834eb8313a8 Merge: d6358a687891d be6d99420306b Author: Arnd Bergmann Date: Thu Apr 1 21:07:46 2021 +0200 Merge tag 'arm-soc/for-5.13/drivers' of https://github.com/Broadcom/stblinux into arm/drivers This pull request contains Broadcom ARM/ARM64/MIPS based SoCs drivers changes for 5.13, please pull the following: - Rafal updates the Broadcom PMB binding to support BCM63138 and updates the code to support resetting the 63138 SATA controller * tag 'arm-soc/for-5.13/drivers' of https://github.com/Broadcom/stblinux: soc: bcm: bcm-pmb: add BCM63138 SATA support dt-bindings: power: bcm-pmb: add BCM63138 binding Link: https://lore.kernel.org/r/20210330184006.1451315-3-f.fainelli@gmail.com Signed-off-by: Arnd Bergmann commit d6358a687891dacbe7d88541a83f61bdccb4f7b8 Merge: 1d79dca631e8e c650b8dc7a791 Author: Arnd Bergmann Date: Thu Apr 1 21:01:18 2021 +0200 Merge tag 'optee-memref-size-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers OP-TEE skip check of returned memref size * tag 'optee-memref-size-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: do not check memref size on return from Secure World Link: https://lore.kernel.org/r/20210330110037.GA1166563@jade Signed-off-by: Arnd Bergmann commit 1d79dca631e8e7fe886f44f49b1e0a16e1ac1dfc Merge: 7da68c64bc903 d995d3d025bbd Author: Arnd Bergmann Date: Thu Apr 1 20:59:59 2021 +0200 Merge tag 'omap-for-v5.13/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into arm/drivers Driver changes for omaps for genpd support for v5.13 In order to move omap4/5 and dra7 to probe with devicetree data and genpd, we need to patch the related drivers to prepare. These are mostly ti-sysc interconnect target module driver changes and soc init changes. However, there are minor changes to other drivers too. There are changes for pci-dra7xx probe, omap-prm idle configuration, and a omap5 clock change: - ti-sysc needs iorange check improved when the interconnect target module has no control registers listed - ti-sysc needs to probe l4_wkup and l4_cfg interconnects first to avoid issues with missing resources and unnecessary deferred probe - ti-sysc debug option can now detect more devices - ti-sysc now warns if an old incomplete devicetree data is found as we now rely on it being complete for am3 and 4 - soc init code needs to check for prcm and prm nodes for omap4/5 and dra7 - omap-prm driver needs to enable autoidle retention support for omap4 - omap5 clocks are missing gpmc and ocmc clock registers - pci-dra7xx now needs to use builtin_platform_driver instead of using builtin_platform_driver_probe for deferred probe to work There are also few minor non-urgent fixes: - soc init code pdata_quirks_init_clocks should be static - ti-sysc has few unneeded semiconon typos - ti-sysc can use kzalloc instead of kcalloc for a single element * tag 'omap-for-v5.13/ti-sysc-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: bus: ti-sysc: Use kzalloc for allocating only one thing bus: ti-sysc: remove unneeded semicolon ARM: OMAP2+: Make symbol 'pdata_quirks_init_clocks' static PCI: pci-dra7xx: Prepare for deferred probe with module_platform_driver clk: ti: omap5: Add missing gpmc and ocmc clkctrl soc: ti: omap-prm: Allow hardware supported retention when idle ARM: OMAP2+: Init both prm and prcm nodes early for clocks bus: ti-sysc: Check for old incomplete dtb bus: ti-sysc: Detect more modules for debugging bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first bus: ti-sysc: Fix initializing module_pa for modules without sysc register ARM: dts: Fix moving mmc devices with aliases for omap4 & 5 ARM: dts: Drop duplicate sha2md5_fck to fix clk_disable race soc: ti: omap-prm: Fix occasional abort on reset deassert for dra7 iva bus: ti-sysc: Fix warning on unbind if reset is not deasserted ARM: OMAP2+: Fix smartreflex init regression after dropping legacy data soc: ti: omap-prm: Fix reboot issue with invalid pcie reset map for dra7 ARM: dts: am33xx: add aliases for mmc interfaces bus: omap_l3_noc: mark l3 irqs as IRQF_NO_THREAD Link: https://lore.kernel.org/r/pull-1617004205-537424@atomide.com Signed-off-by: Arnd Bergmann commit 0633e23771e0ac84b5e8b3c20e0b4640e29d720b Author: Jack Wang Date: Thu Mar 25 16:33:05 2021 +0100 RDMA/rtrs-clt: Cap max_io_size Max io size is limited by both remote buffer size and the max fr pages per mr. Link: https://lore.kernel.org/r/20210325153308.1214057-20-gi-oh.kim@ionos.com Signed-off-by: Jack Wang Reviewed-by: Md Haris Iqbal Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 11b74cbf8ea50f781dde4fd2a6003c86ce19285a Author: Jack Wang Date: Thu Mar 25 16:33:03 2021 +0100 RDMA/rtrs: Cleanup unused 's' variable in __alloc_sess Link: https://lore.kernel.org/r/20210325153308.1214057-18-gi-oh.kim@ionos.com Signed-off-by: Jack Wang Signed-off-by: Gioh Kim Signed-off-by: Jason Gunthorpe commit 88e2f1056452383a36387fd088889b4b4c70c706 Author: Gioh Kim Date: Thu Mar 25 16:33:02 2021 +0100 RDMA/rtrs-srv: Report temporary sessname for error message Before receiving the session name, the error message cannot include any information about which connection generates the error. This patch stores the addresses of source and target in the sessname field to show which generates the error. That field will be over-written when receiving the session name from client. Link: https://lore.kernel.org/r/20210325153308.1214057-17-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 7da68c64bc9037da7e470bfd219a2b5b7e7c5af1 Merge: 56a6867beecf0 79caa362eab65 Author: Arnd Bergmann Date: Thu Apr 1 20:56:49 2021 +0200 Merge tag 'rpi-poe-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nsaenz/linux-rpi into arm/drivers Raspberry Pi driver updates for v5.13: - Fix-up all RPi firmware drivers so as for unbind to happen in an orderly fashion - Support for RPi's PoE hat PWM bus * tag 'rpi-poe-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nsaenz/linux-rpi: pwm: Add Raspberry Pi Firmware based PWM bus dt-bindings: pwm: Add binding for RPi firmware PWM bus input: raspberrypi-ts: Release firmware handle when not needed staging: vchiq: Release firmware handle on unbind soc: bcm: raspberrypi-power: Release firmware handle on unbind reset: raspberrypi: Release firmware handle on unbind gpio: raspberrypi-exp: Release firmware handle on unbind clk: bcm: rpi: Release firmware handle on unbind firmware: raspberrypi: Introduce devm_rpi_firmware_get() firmware: raspberrypi: Keep count of all consumers Link: https://lore.kernel.org/r/20210322174232.29549-1-nsaenz@kernel.org Signed-off-by: Arnd Bergmann commit 8e86499e6c1159afd496c1385f38350cf5701f9d Author: Gioh Kim Date: Thu Mar 25 16:32:59 2021 +0100 RDMA/rtrs: New function converting rtrs_addr to string There is common code converting addresses of source machine and destination machine to a string. We already have a struct rtrs_addr to store two addresses. This patch introduces a new function that converts two addresses into one string with struct rtrs_addr. Link: https://lore.kernel.org/r/20210325153308.1214057-14-gi-oh.kim@ionos.com Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit be724fd5b60dd083c8e39a4a2652e5017d2f7a20 Author: satya priya Date: Wed Mar 31 17:35:39 2021 +0530 regulator: Add compatibles for PM7325/PMR735A Add PM7325/PMR735A compatibles for Qualcomm SC7280 platform. Signed-off-by: satya priya Acked-by: Rob Herring Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1617192339-3760-6-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown commit 7255f98d08c73f0bcf1397d3060fdb776d7aa147 Author: satya priya Date: Wed Mar 31 17:35:38 2021 +0530 regulator: Convert RPMh regulator bindings to YAML Convert RPMh regulator bindings from .txt to .yaml format. Signed-off-by: satya priya Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1617192339-3760-5-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown commit c4e5aa3dbee56bde70dfa03debc49bf9494fb3d9 Author: satya priya Date: Wed Mar 31 17:35:36 2021 +0530 regulator: qcom-rpmh: Add PM7325/PMR735A regulator support Add support for PM7325/PMR735A regulators. This ensures that consumers are able to modify the physical state of PMIC regulators. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1617192339-3760-3-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown commit 9405b4f7fa78b55fc83e5b5258f00e651aed5734 Author: satya priya Date: Wed Mar 31 17:35:35 2021 +0530 regulator: qcom-rpmh: Add pmic5_ftsmps520 buck Add pmic5_ftsmps520 buck as this is required for PM7325 and PMR735A PMICs. Signed-off-by: satya priya Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1617192339-3760-2-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown commit 57dae8baa6388af4a1e9a58cb29f9c08375a09fa Author: Guoqing Jiang Date: Thu Mar 25 16:32:56 2021 +0100 RDMA/rtrs: Cleanup the code in rtrs_srv_rdma_cm_handler Let these cases share the same path since all of them need to close session. Link: https://lore.kernel.org/r/20210325153308.1214057-11-gi-oh.kim@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 4cd5261df989a49e52c0e1aa989dc6b21ca947f3 Author: Guoqing Jiang Date: Thu Mar 25 16:32:55 2021 +0100 RDMA/rtrs: Remove sessname and sess_kobj from rtrs_attrs The two members are not used in the code, so remove them. Link: https://lore.kernel.org/r/20210325153308.1214057-10-gi-oh.kim@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 4a58ac5440ce998e80f360f9d957688912cdf03b Author: Guoqing Jiang Date: Thu Mar 25 16:32:54 2021 +0100 RDMA/rtrs: Kill the put label in rtrs_srv_create_once_sysfs_root_folders We can remove the label after move put_device to the right place. Link: https://lore.kernel.org/r/20210325153308.1214057-9-gi-oh.kim@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 44930991f2f27e201c5790de8084927d487c2a27 Author: Guoqing Jiang Date: Thu Mar 25 16:32:53 2021 +0100 RDMA/rtrs-clt: Remove redundant code from rtrs_clt_read_req There is no need to dereference 's' from 'sess', since we have "sess = to_clt_sess(s)" before. And we can deference 'dev' from 's' earlier. Link: https://lore.kernel.org/r/20210325153308.1214057-8-gi-oh.kim@ionos.com Signed-off-by: Guoqing Jiang Reviewed-by: Danil Kipnis Signed-off-by: Gioh Kim Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 0adb3ad609f71193cec782fc4a2b7dcfb1b042ee Author: Danil Kipnis Date: Thu Mar 25 16:32:47 2021 +0100 MAINTAINERS: Change maintainer for rtrs module Danil will step down, Haris will take over. Also update to email address to ionos.com, cloud.ionos.com will still work for sometime. Link: https://lore.kernel.org/r/20210325153308.1214057-2-gi-oh.kim@ionos.com Signed-off-by: Danil Kipnis Acked-by: Md Haris Iqbal Signed-off-by: Jack Wang Signed-off-by: Jason Gunthorpe commit 628166c37c16250612da926c010fe6c84d086ac1 Author: Mac Chiang Date: Thu Apr 1 22:00:13 2021 +0800 ASoC: Intel: Boards: cml_da7219_max98390: add capture stream for echo reference enable speaker capture dai link for feedback path Signed-off-by: Mac Chiang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/1617285613-29457-1-git-send-email-mac.chiang@intel.com Signed-off-by: Mark Brown commit dbb3e9db8267dd8979b39bb15d70887ad0699e2c Author: YueHaibing Date: Thu Apr 1 10:10:28 2021 +0800 RDMA/uverbs: Fix -Wunused-function warning make W=1 warns this: In file included from drivers/infiniband/sw/rdmavt/mmap.c:51:0: ./include/rdma/uverbs_ioctl.h:937:1: warning: ‘_uverbs_get_const_unsigned’ defined but not used [-Wunused-function] _uverbs_get_const_unsigned(u64 *to, ^~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/rdma/uverbs_ioctl.h:930:1: warning: ‘_uverbs_get_const_signed’ defined but not used [-Wunused-function] _uverbs_get_const_signed(s64 *to, const struct uverbs_attr_bundle *attrs_bundle, ^~~~~~~~~~~~~~~~~~~~~~~~ Make these functions inline to fix this warnings. Fixes: 2904bb37b35d ("IB/core: Split uverbs_get_const/default to consider target type") Link: https://lore.kernel.org/r/20210401021028.25720-1-yuehaibing@huawei.com Signed-off-by: YueHaibing Signed-off-by: Jason Gunthorpe commit f91696f2f05326d9837b4088118c938e805be942 Author: Yangyang Li Date: Thu Mar 25 21:33:56 2021 +0800 RDMA/hns: Support congestion control type selection according to the FW The type of congestion control algorithm includes DCQCN, LDCP, HC3 and DIP. The driver will select one of them according to the firmware when querying PF capabilities, and then set the related configuration fields into QPC. Link: https://lore.kernel.org/r/1616679236-7795-3-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit e079d87d1d9a5c27415bf5b71245566ae434372f Author: Wei Xu Date: Thu Mar 25 21:33:55 2021 +0800 RDMA/hns: Support query information of functions from FW Add a new type of command to query mac id of functions from the firmware, it is used to select the template of congestion algorithm. More info will be supported in the future. Link: https://lore.kernel.org/r/1616679236-7795-2-git-send-email-liweihang@huawei.com Signed-off-by: Wei Xu Signed-off-by: Shengming Shu Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit f3ef7202ef7c705d640d1aeec3b286a641ac9186 Author: Yordan Karadzhov (VMware) Date: Mon Mar 29 16:03:31 2021 +0300 tracing: Remove unused argument from "ring_buffer_time_stamp() The "cpu" parameter is not being used by the function. Link: https://lkml.kernel.org/r/20210329130331.199402-1-y.karadz@gmail.com Signed-off-by: Yordan Karadzhov (VMware) Signed-off-by: Steven Rostedt (VMware) commit 1decdb335c366fc0a1bae0db55c138c613cc9a1f Author: Wan Jiabing Date: Tue Mar 30 11:40:55 2021 +0800 tracing: Remove duplicate struct declaration in trace_events.h struct trace_array is declared twice. One has been declared at forward declaration. Remove the duplicate. Link: https://lkml.kernel.org/r/20210330034056.2266969-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Steven Rostedt (VMware) commit 22d5755a852dca9895c263c24dae836dd14ae947 Merge: 70193038a6ec9 9deb193af69d3 Author: Steven Rostedt (VMware) Date: Thu Apr 1 14:16:37 2021 -0400 Merge branch 'trace/ftrace/urgent' into HEAD Needed to merge trace/ftrace/urgent to get: Commit 59300b36f85 ("ftrace: Check if pages were allocated before calling free_pages()") To clean up the code that is affected by it as well. commit d8d5cbc619e86b8f2167ae40d029a9d07e97b303 Author: Dmitry Osipenko Date: Wed Mar 31 02:04:43 2021 +0300 dt-bindings: memory: tegra20: mc: Convert to schema Convert Tegra20 Memory Controller binding to schema. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210330230445.26619-5-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 21e4e0d114d7f4341935cce3b0c2a93d9a0925b7 Author: Dmitry Osipenko Date: Wed Mar 31 02:04:42 2021 +0300 dt-bindings: memory: tegra124: emc: Replace core regulator with power domain Power domain fits much better than a voltage regulator in regards to a proper hardware description and from a software perspective as well. Hence replace the core regulator with the power domain. Note that this doesn't affect any existing DTBs because we haven't started to use the regulator yet, and thus, it's okay to change it. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210330230445.26619-4-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7885db0ce77426df8bc82bb71d295263772afc3e Author: Dmitry Osipenko Date: Wed Mar 31 02:04:41 2021 +0300 dt-bindings: memory: tegra30: emc: Replace core regulator with power domain Power domain fits much better than a voltage regulator in regards to a proper hardware description and from a software perspective as well. Hence replace the core regulator with the power domain. Note that this doesn't affect any existing DTBs because we haven't started to use the regulator yet, and thus, it's okay to change it. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210330230445.26619-3-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 4be3973c001ee627d220037d2be67a8e39cecc66 Author: Dmitry Osipenko Date: Wed Mar 31 02:04:40 2021 +0300 dt-bindings: memory: tegra20: emc: Replace core regulator with power domain Power domain fits much better than a voltage regulator in regards to a proper hardware description and from a software perspective as well. Hence replace the core regulator with the power domain. Note that this doesn't affect any existing DTBs because we haven't started to use the regulator yet, and thus, it's okay to change it. Signed-off-by: Dmitry Osipenko Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210330230445.26619-2-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit f012ade8aa07fc6e12af73dbfeea683b017598b5 Author: Dmitry Osipenko Date: Wed Mar 31 02:04:45 2021 +0300 memory: tegra: Print out info-level once per driver probe Probing of EMC drivers may be deferred and in this case we get duplicated info messages during kernel boot. Use dev_info_once() helper to silence the duplicated messages. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210330230445.26619-7-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 289471984f1c226c9e0e50d31d0db6b3678e6f5a Author: Dmitry Osipenko Date: Wed Mar 24 00:04:46 2021 +0300 memory: tegra20: Protect debug code with a lock Simultaneous accesses to MC_STAT h/w shouldn't be allowed since one collection process stomps on another. There is no good reason for polling stats in parallel in practice, nevertheless let's add a protection lock, just for consistency. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210323210446.24867-2-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit 7ebb09db5b265701b70a4c8980513825dbc57584 Author: Dmitry Osipenko Date: Wed Mar 24 00:04:45 2021 +0300 memory: tegra20: Correct comment to MC_STAT registers writes The code was changed multiple times and the comment to MC_STAT registers writes became slightly outdated. The MC_STAT programming now isn't hardcoded to the "bandwidth" mode, let's clarify this in the comment. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210323210446.24867-1-digetx@gmail.com Signed-off-by: Krzysztof Kozlowski commit fbd31f5aa60259bfa836dccb35159a7e17a60314 Author: Dmitry Osipenko Date: Fri Mar 19 16:09:33 2021 +0300 memory: tegra20: Add debug statistics Add debug statistics collection support. The statistics is available via debugfs in '/sys/kernel/debug/mc/stats', it shows percent of memory controller utilization for each memory client. This information is intended to help with debugging of memory performance issues, it already was proven to be useful by helping to improve memory bandwidth management of the display driver. Signed-off-by: Dmitry Osipenko Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210319130933.23261-1-digetx@gmail.com commit e47faa54c3a30af87b0b441b3fc0960dba17c9a2 Author: Yang Li Date: Thu Feb 25 17:05:58 2021 +0800 memory: tegra: replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Fix the following coccicheck warning: drivers/memory/tegra/tegra124-emc.c:1207:0-23: WARNING: tegra_emc_debug_min_rate_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1614243958-55847-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Krzysztof Kozlowski commit b11a188aef6d19fe3ca505831d9c627ef683476f Author: Qiheng Lin Date: Wed Mar 31 17:32:44 2021 +0800 memory: fsl-corenet-cf: Remove redundant dev_err call in ccf_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Qiheng Lin Link: https://lore.kernel.org/r/20210331093244.3238-1-linqiheng@huawei.com Signed-off-by: Krzysztof Kozlowski commit 89d69c5d0fbcabd8656459bc8b1a476d6f1efee4 Merge: e27bfefb21f28 8d7cb74f2ccb5 Author: Alexei Starovoitov Date: Thu Apr 1 10:56:15 2021 -0700 Merge branch 'sockmap: introduce BPF_SK_SKB_VERDICT and support UDP' Cong Wang says: ==================== From: Cong Wang We have thousands of services connected to a daemon on every host via AF_UNIX dgram sockets, after they are moved into VM, we have to add a proxy to forward these communications from VM to host, because rewriting thousands of them is not practical. This proxy uses an AF_UNIX socket connected to services and a UDP socket to connect to the host. It is inefficient because data is copied between kernel space and user space twice, and we can not use splice() which only supports TCP. Therefore, we want to use sockmap to do the splicing without going to user-space at all (after the initial setup). Currently sockmap only fully supports TCP, UDP is partially supported as it is only allowed to add into sockmap. This patchset, as the second part of the original large patchset, extends sockmap with: 1) cross-protocol support with BPF_SK_SKB_VERDICT; 2) full UDP support. On the high level, ->read_sock() is required for each protocol to support sockmap redirection, and in order to do sock proto update, a new ops ->psock_update_sk_prot() is introduced, which is also required. And the BPF ->recvmsg() is also needed to replace the original ->recvmsg() to retrieve skmsg. To make life easier, we have to get rid of lock_sock() in sk_psock_handle_skb(), otherwise we would have to implement ->sendmsg_locked() on top of ->sendmsg(), which is ugly. Please see each patch for more details. To see the big picture, the original patchset is available here: https://github.com/congwang/linux/tree/sockmap this patchset is also available: https://github.com/congwang/linux/tree/sockmap2 --- v8: get rid of 'offset' in udp_read_sock() add checks for skb_verdict/stream_verdict conflict add two cleanup patches for sock_map_link() add a new test case v7: use work_mutex to protect psock->work return err in udp_read_sock() add patch 6/13 clean up test case v6: get rid of sk_psock_zap_ingress() add rcu work patch v5: use INDIRECT_CALL_2() for function pointers use ingress_lock to fix a race condition found by Jacub rename two helper functions v4: get rid of lock_sock() in sk_psock_handle_skb() get rid of udp_sendmsg_locked() remove an empty line update cover letter v3: export tcp/udp_update_proto() rename sk->sk_prot->psock_update_sk_prot() improve changelogs v2: separate from the original large patchset rebase to the latest bpf-next split UDP test case move inet_csk_has_ulp() check to tcp_bpf.c clean up udp_read_sock() ==================== Signed-off-by: Alexei Starovoitov commit 8d7cb74f2ccb5486ab8c631a8fcdc7621bbbc42c Author: Cong Wang Date: Tue Mar 30 19:32:37 2021 -0700 selftests/bpf: Add a test case for loading BPF_SK_SKB_VERDICT This adds a test case to ensure BPF_SK_SKB_VERDICT and BPF_SK_STREAM_VERDICT will never be attached at the same time. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210331023237.41094-17-xiyou.wangcong@gmail.com commit d6378af615275435ce6e390a538c980ac19b6659 Author: Cong Wang Date: Tue Mar 30 19:32:36 2021 -0700 selftests/bpf: Add a test case for udp sockmap Add a test case to ensure redirection between two UDP sockets work. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210331023237.41094-16-xiyou.wangcong@gmail.com commit 122e6c79efe1c25816118aca9cfabe54e99c2432 Author: Cong Wang Date: Tue Mar 30 19:32:35 2021 -0700 sock_map: Update sock type checks for UDP Now UDP supports sockmap and redirection, we can safely update the sock type checks for it accordingly. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-15-xiyou.wangcong@gmail.com commit 1f5be6b3b063767202f815d5571f7d03729f1282 Author: Cong Wang Date: Tue Mar 30 19:32:34 2021 -0700 udp: Implement udp_bpf_recvmsg() for sockmap We have to implement udp_bpf_recvmsg() to replace the ->recvmsg() to retrieve skmsg from ingress_msg. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-14-xiyou.wangcong@gmail.com commit 2bc793e3272a13e337416c057cb81c5396ad91d1 Author: Cong Wang Date: Tue Mar 30 19:32:33 2021 -0700 skmsg: Extract __tcp_bpf_recvmsg() and tcp_bpf_wait_data() Although these two functions are only used by TCP, they are not specific to TCP at all, both operate on skmsg and ingress_msg, so fit in net/core/skmsg.c very well. And we will need them for non-TCP, so rename and move them to skmsg.c and export them to modules. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210331023237.41094-13-xiyou.wangcong@gmail.com commit d7f571188ecf25c244789b883c878ec7c64b5b08 Author: Cong Wang Date: Tue Mar 30 19:32:32 2021 -0700 udp: Implement ->read_sock() for sockmap This is similar to tcp_read_sock(), except we do not need to worry about connections, we just need to retrieve skb from UDP receive queue. Note, the return value of ->read_sock() is unused in sk_psock_verdict_data_ready(), and UDP still does not support splice() due to lack of ->splice_read(), so users can not reach udp_read_sock() directly. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-12-xiyou.wangcong@gmail.com commit 8a59f9d1e3d4340659fdfee8879dc09a6f2546e1 Author: Cong Wang Date: Tue Mar 30 19:32:31 2021 -0700 sock: Introduce sk->sk_prot->psock_update_sk_prot() Currently sockmap calls into each protocol to update the struct proto and replace it. This certainly won't work when the protocol is implemented as a module, for example, AF_UNIX. Introduce a new ops sk->sk_prot->psock_update_sk_prot(), so each protocol can implement its own way to replace the struct proto. This also helps get rid of symbol dependencies on CONFIG_INET. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210331023237.41094-11-xiyou.wangcong@gmail.com commit a7ba4558e69a3c2ae4ca521f015832ef44799538 Author: Cong Wang Date: Tue Mar 30 19:32:30 2021 -0700 sock_map: Introduce BPF_SK_SKB_VERDICT Reusing BPF_SK_SKB_STREAM_VERDICT is possible but its name is confusing and more importantly we still want to distinguish them from user-space. So we can just reuse the stream verdict code but introduce a new type of eBPF program, skb_verdict. Users are not allowed to attach stream_verdict and skb_verdict programs to the same map. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-10-xiyou.wangcong@gmail.com commit b017055255d620b365299c3824610e0098414664 Author: Cong Wang Date: Tue Mar 30 19:32:29 2021 -0700 sock_map: Kill sock_map_link_no_progs() Now we can fold sock_map_link_no_progs() into sock_map_link() and get rid of sock_map_link_no_progs(). Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210331023237.41094-9-xiyou.wangcong@gmail.com commit 2004fdbd8a2b56757691717639f86d0eea3ab5b4 Author: Cong Wang Date: Tue Mar 30 19:32:28 2021 -0700 sock_map: Simplify sock_map_link() a bit sock_map_link() passes down map progs, but it is confusing to see both map progs and psock progs. Make the map progs more obvious by retrieving it directly with sock_map_progs() inside sock_map_link(). Now it is aligned with sock_map_link_no_progs() too. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-8-xiyou.wangcong@gmail.com commit 190179f65ba8bc18dc1d38435b7932505ca5544f Author: Cong Wang Date: Tue Mar 30 19:32:27 2021 -0700 skmsg: Use GFP_KERNEL in sk_psock_create_ingress_msg() This function is only called in process context. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-7-xiyou.wangcong@gmail.com commit 7786dfc41a74e0567557b5c4a28fc8482f5f5691 Author: Cong Wang Date: Tue Mar 30 19:32:26 2021 -0700 skmsg: Use rcu work for destroying psock The RCU callback sk_psock_destroy() only queues work psock->gc, so we can just switch to rcu work to simplify the code. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-6-xiyou.wangcong@gmail.com commit 799aa7f98d53e0f541fa6b4dc9aa47b4ff2178e3 Author: Cong Wang Date: Tue Mar 30 19:32:25 2021 -0700 skmsg: Avoid lock_sock() in sk_psock_backlog() We do not have to lock the sock to avoid losing sk_socket, instead we can purge all the ingress queues when we close the socket. Sending or receiving packets after orphaning socket makes no sense. We do purge these queues when psock refcnt reaches zero but here we want to purge them explicitly in sock_map_close(). There are also some nasty race conditions on testing bit SK_PSOCK_TX_ENABLED and queuing/canceling the psock work, we can expand psock->ingress_lock a bit to protect them too. As noticed by John, we still have to lock the psock->work, because the same work item could be running concurrently on different CPU's. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-5-xiyou.wangcong@gmail.com commit 0739cd28f2645e814586c7536ba5da9825cb8029 Author: Cong Wang Date: Tue Mar 30 19:32:24 2021 -0700 net: Introduce skb_send_sock() for sock_map We only have skb_send_sock_locked() which requires callers to use lock_sock(). Introduce a variant skb_send_sock() which locks on its own, callers do not need to lock it any more. This will save us from adding a ->sendmsg_locked for each protocol. To reuse the code, pass function pointers to __skb_send_sock() and build skb_send_sock() and skb_send_sock_locked() on top. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Reviewed-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210331023237.41094-4-xiyou.wangcong@gmail.com commit b01fd6e802b6d0a635176f943315670b679d8d7b Author: Cong Wang Date: Tue Mar 30 19:32:23 2021 -0700 skmsg: Introduce a spinlock to protect ingress_msg Currently we rely on lock_sock to protect ingress_msg, it is too big for this, we can actually just use a spinlock to protect this list like protecting other skb queues. __tcp_bpf_recvmsg() is still special because of peeking, it still has to use lock_sock. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-3-xiyou.wangcong@gmail.com commit 37f0e514db660f03f8982b8f4fbbd4b2740abe7d Author: Cong Wang Date: Tue Mar 30 19:32:22 2021 -0700 skmsg: Lock ingress_skb when purging Currently we purge the ingress_skb queue only when psock refcnt goes down to 0, so locking the queue is not necessary, but in order to be called during ->close, we have to lock it here. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: Jakub Sitnicki Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210331023237.41094-2-xiyou.wangcong@gmail.com commit 194f64a3cad3ab9e381e996a13089de3215d1887 Author: Håkon Bugge Date: Mon Mar 22 14:35:32 2021 +0100 RDMA/core: Fix corrupted SL on passive side On RoCE systems, a CM REQ contains a Primary Hop Limit > 1 and Primary Subnet Local is zero. In cm_req_handler(), the cm_process_routed_req() function is called. Since the Primary Subnet Local value is zero in the request, and since this is RoCE (Primary Local LID is permissive), the following statement will be executed: IBA_SET(CM_REQ_PRIMARY_SL, req_msg, wc->sl); This corrupts SL in req_msg if it was different from zero. In other words, a request to setup a connection using an SL != zero, will not be honored, and a connection using SL zero will be created instead. Fixed by not calling cm_process_routed_req() on RoCE systems, the cm_process_route_req() is only for IB anyhow. Fixes: 3971c9f6dbf2 ("IB/cm: Add interim support for routed paths") Link: https://lore.kernel.org/r/1616420132-31005-1-git-send-email-haakon.bugge@oracle.com Signed-off-by: Håkon Bugge Signed-off-by: Jason Gunthorpe commit 19f5027e0394d2f3e1766200b6bbde660f0b7848 Author: Uwe Kleine-König Date: Fri Mar 26 10:06:41 2021 +0100 ARM: s3c: Use pwm_get() in favour of pwm_request() in RX1950 pwm_request() is deprecated because (among others) it depends on a global numbering of PWM devices. So register a pwm_lookup to pick the right PWM device (identified by provider and its local id) and use pwm_get(). Before this patch the PWM #1 was used. This is provided by the samsung-pwm device which is the only PWM provider on this machine. The local offset is 1, see also commit c107fe904a10 ("ARM: S3C24XX: Use PWM lookup table for mach-rx1950") with a similar conversion for PWM #0. As a follow up specify the period only once and symmetrically use pwm_put() instead of pwm_free() to drop the reference. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210326090641.122436-1-u.kleine-koenig@pengutronix.de Signed-off-by: Krzysztof Kozlowski commit 167b400217121338a2beb78e09e2c77bd95491f5 Author: Ville Syrjälä Date: Thu Feb 18 18:03:05 2021 +0200 drm/vblank: Do not store a new vblank timestamp in drm_vblank_restore() drm_vblank_restore() exists because certain power saving states can clobber the hardware frame counter. The way it does this is by guesstimating how many frames were missed purely based on the difference between the last stored timestamp vs. a newly sampled timestamp. If we should call this function before a full frame has elapsed since we sampled the last timestamp we would end up with a possibly slightly different timestamp value for the same frame. Currently we will happily overwrite the already stored timestamp for the frame with the new value. This could cause userspace to observe two different timestamps for the same frame (and the timestamp could even go backwards depending on how much error we introduce when correcting the timestamp based on the scanout position). To avoid that let's not update the stored timestamp at all, and instead we just fix up the last recorded hw vblank counter value such that the already stored timestamp/seq number will match. Thus the next time a vblank irq happens it will calculate the correct diff between the current and stored hw vblank counter values. Sidenote: Another possible idea that came to mind would be to do this correction only if the power really was removed since the last time we sampled the hw frame counter. But to do that we would need a robust way to detect when it has occurred. Some possibilities could involve some kind of hardare power well transition counter, or potentially we could store a magic value in a scratch register that lives in the same power well. But I'm not sure either of those exist, so would need an actual investigation to find out. All of that is very hardware specific of course, so would have to be done in the driver code. Cc: Dhinakaran Pandiyan Cc: Rodrigo Vivi Cc: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210218160305.16711-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 19a9a0efe6391c296cba50df3797f0b167facc96 Author: Ville Syrjälä Date: Fri Jun 7 19:26:09 2019 +0300 drm: Refuse to create zero width/height cmdline modes If the user specifies zero width/height cmdline mode i915 will blow up as the fbdev path will bypass the regular fb sanity check that would otherwise have refused to create a framebuffer with zero width/height. The reason I thought to try this is so that I can force a specific depth for fbdev without actually having to hardcode the mode on the kernel cmdline. Eg. if I pass video=0x0-8 I will get an 8bpp framebuffer at my monitor's native resolution. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20190607162611.23514-2-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter commit 2c2e21e78a945b174629944281997bbcb839e6bb Author: Qi Liu Date: Thu Apr 1 19:16:41 2021 +0800 arm64: perf: Remove redundant initialization in perf_event.c The initialization of value in function armv8pmu_read_hw_counter() and armv8pmu_read_counter() seem redundant, as they are soon updated. So, We can remove them. Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1617275801-1980-1-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 8d3a1cb32124eaeb3f2efe4889de214d3b658d8d Author: Bryan O'Donoghue Date: Mon Feb 15 16:02:54 2021 +0000 dt-bindings: media: venus: Add sm8250 dt schema Add a schema description for the venus video encoder/decoder on the sm8250. Signed-off-by: Bryan O'Donoghue Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210215160254.1572615-3-bryan.odonoghue@linaro.org commit 52cad756b777e82fabe05c728cc62b63b3c61fd3 Author: Zhen Lei Date: Mon Mar 29 16:14:35 2021 +0800 ASoC: intel, keembay-i2s: Fix a dt_binding_check warning The property "dmas" contains two items: DMA "TX" and "RX" channel, Therefore, its value also needs to be written in two parts. Otherwise, below YAML check warning is reported: Documentation/devicetree/bindings/sound/intel,keembay-i2s.example.dt.yaml:\ i2s@20140000: dmas: [[4294967295, 29, 4294967295, 33]] is too short Signed-off-by: Zhen Lei Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210329081435.2200-1-thunder.leizhen@huawei.com Signed-off-by: Mark Brown commit 56a6867beecf06b81348b79be19afd12b1f9ae2f Merge: 10f765d68ba21 7ccdcaace8081 Author: Arnd Bergmann Date: Thu Apr 1 11:51:40 2021 +0200 Merge tag 'optee-tracepoints-fix-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/fixes Fixes build error for recently added OP-TEE tracepoints * tag 'optee-tracepoints-fix-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: fix build error caused by recent optee tracepoints feature Link: https://lore.kernel.org/r/20210330082208.GA965793@jade Signed-off-by: Arnd Bergmann commit 62066d3164467167fc27b2383f67d097e39bf176 Author: Julian Braha Date: Mon Feb 22 16:55:02 2021 -0500 drivers: gpu: drm: bridge: fix kconfig dependency on DRM_KMS_HELPER When DRM_TOSHIBA_TC358762 is enabled and DRM_KMS_HELPER is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for DRM_PANEL_BRIDGE Depends on [n]: HAS_IOMEM [=y] && DRM_BRIDGE [=y] && DRM_KMS_HELPER [=n] Selected by [y]: - DRM_TOSHIBA_TC358762 [=y] && HAS_IOMEM [=y] && DRM [=y] && DRM_BRIDGE [=y] && OF [=y] This is because DRM_TOSHIBA_TC358762 selects DRM_PANEL_BRIDGE, without depending on or selecting DRM_KMS_HELPER, despite that config option depending on DRM_KMS_HELPER. Signed-off-by: Julian Braha Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210222215502.24487-1-julianbraha@gmail.com commit 2e477391522354e763aa62ee3e281c1ad9e8eb1b Author: Dafna Hirschfeld Date: Tue Mar 30 13:09:02 2021 +0200 drm/mediatek: Don't support hdmi connector creation commit f01195148967 ("drm/mediatek: mtk_dpi: Create connector for bridges") broke the display support for elm device since mtk_dpi calls drm_bridge_attach with the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR while mtk_hdmi does not yet support this flag. Fix this by accepting DRM_BRIDGE_ATTACH_NO_CONNECTOR in bridge attachment. Implement the drm_bridge_funcs .detect() and .get_edid() operations, and call drm_bridge_hpd_notify() to report HPD. This provides the necessary API to support disabling connector creation. In addition, the field 'conn' is removed from the mtk_hdmi struct since mtk_hdmi don't create a connector. It is replaced with a pointer 'curr_conn' that points to the current connector which can be access through the global state. This patch is inspired by a similar patch for bridge/synopsys/dw-hdmi.c: commit ec971aaa6775 ("drm: bridge: dw-hdmi: Make connector creation optional") But with the difference that in mtk-hdmi only the option of not creating a connector is supported. Fixes: f01195148967 ("drm/mediatek: mtk_dpi: Create connector for bridges") Signed-off-by: Dafna Hirschfeld Reviewed-by: Laurent Pinchart Signed-off-by: Chun-Kuang Hu commit 053d231f369ca05cd563ca9738b5a4c73908e697 Author: Dafna Hirschfeld Date: Tue Mar 30 13:09:01 2021 +0200 drm/mediatek: Switch the hdmi bridge ops to the atomic versions The bridge operation '.enable' and the audio cb '.get_eld' access hdmi->conn. In the future we will want to support the flag DRM_BRIDGE_ATTACH_NO_CONNECTOR and then we will not have direct access to the connector. The atomic version '.atomic_enable' allows accessing the current connector from the state. This patch switches the bridge to the atomic version to prepare access to the connector in later patches. Signed-off-by: Dafna Hirschfeld Reviewed-by: Laurent Pinchart Signed-off-by: Chun-Kuang Hu commit 112e5934ff3a7505e583365213a27f990922b76b Author: Pratyush Yadav Date: Fri Mar 26 18:30:33 2021 +0530 arm64: dts: ti: k3-am64-main: Fix ospi compatible The TI specific compatible should be followed by the generic "cdns,qspi-nor" compatible. Signed-off-by: Pratyush Yadav Reviewed-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210326130034.15231-4-p.yadav@ti.com commit 0e941f496a8bdc47d34199c17f81b09b0dbe14ae Author: Pratyush Yadav Date: Fri Mar 26 18:30:32 2021 +0530 arm64: dts: ti: k3-j7200-mcu: Fix ospi compatible The TI specific compatible should be followed by the generic "cdns,qspi-nor" compatible. Signed-off-by: Pratyush Yadav Reviewed-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210326130034.15231-3-p.yadav@ti.com commit f1b6f6e7f595ed66ba5f5d628df3d259218d584b Author: Pratyush Yadav Date: Fri Mar 26 18:30:31 2021 +0530 arm64: dts: ti: k3-j721e-mcu: Fix ospi compatible The TI specific compatible should be followed by the generic "cdns,qspi-nor" compatible. Signed-off-by: Pratyush Yadav Reviewed-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Link: https://lore.kernel.org/r/20210326130034.15231-2-p.yadav@ti.com commit e739b12042b6b079a397a3c234f96c09d1de0b40 Author: Olga Kornievskaia Date: Tue Mar 30 15:03:59 2021 -0400 NFSv4.2: fix copy stateid copying for the async copy This patch fixes Dan Carpenter's report that the static checker found a problem where memcpy() was copying into too small of a buffer. Reported-by: Dan Carpenter Fixes: e0639dc5805a ("NFSD introduce async copy feature") Signed-off-by: Olga Kornievskaia Signed-off-by: Chuck Lever Reviewed-by: Dai Ngo commit a1c3be890440a1769ed6f822376a3e3ab0d42994 Author: Carsten Haitzler Date: Thu Feb 4 13:11:02 2021 +0000 drm/komeda: Fix bit check to import to value of proper type Another issue found by KASAN. The bit finding is buried inside the dp_for_each_set_bit() macro (that passes on to for_each_set_bit() that calls the bit stuff. These bit functions want an unsigned long pointer as input and just dumbly casting leads to out-of-bounds accesses. This fixes that. Signed-off-by: Carsten Haitzler Reviewed-by: Steven Price Reviewed-by: James Qian Wang Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/20210204131102.68658-1-carsten.haitzler@foss.arm.com commit 6f6ab533590cefb7317d38d3dc734c566f7d2646 Author: Tian Tao Date: Tue Mar 30 09:25:18 2021 +0800 drm/komeda: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/gpu/drm/arm/display/komeda/komeda_dev.c:97:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/arm/display/komeda/komeda_dev.c:88:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/arm/display/komeda/komeda_dev.c:65:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Reviewed-by: James Qian Wang Signed-off-by: Liviu Dudau Link: https://patchwork.freedesktop.org/patch/msgid/1617067518-31091-1-git-send-email-tiantao6@hisilicon.com commit d6644a1c2e17febf261fd692bb32271e5779bbd2 Author: Wan Jiabing Date: Thu Apr 1 14:59:04 2021 +0800 spi: Remove repeated struct declaration struct spi_transfer is declared twice. One is declared at 24th line. The blew one is not needed though. Remove the duplicate. Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210401065904.994121-1-wanjiabing@vivo.com Signed-off-by: Mark Brown commit ebf721fbbb6e077864783c8d0146021815bb1f24 Author: Bhaskar Chowdhury Date: Mon Mar 22 12:22:38 2021 +0530 ASoC: Intel: Fix a typo s/struture/structure/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210322065238.151920-1-unixbhaskar@gmail.com Signed-off-by: Mark Brown commit f374f25aab6f10ba5e442d8f81dd94d960276cb5 Author: Daniel Palmer Date: Mon Mar 1 21:35:42 2021 +0900 ARM: mstar: Add mpll to base dtsi All of the currently known MStar/SigmaStar ARMv7 SoCs have at least one MPLL and it seems to always be at the same place so add it to the base dtsi. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20210301123542.2800643-4-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit a93cf651df08c370e622c3aea456bc729b352437 Author: Daniel Palmer Date: Mon Mar 1 21:35:41 2021 +0900 ARM: mstar: Add the external clocks to the base dsti All of the currently known MStar/SigmaStar ARMv7 SoCs have an "xtal" clock input that is usually 24MHz and an "RTC xtal" that is usually 32KHz. The xtal input has to be connected to something so it's enabled by default. The MSC313 and MSC313E do not bring the RTC clock input out to the pins so it's impossible to connect it. The SSC8336 does bring the input out to the pins but it's not always actually connected to something. The RTC node needs to always be present because in the future the nodes for the clock muxes will refer to it even if it's not usable. The RTC node is disabled by default and should be enabled at the board level if the RTC input is wired up. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20210301123542.2800643-3-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit de73b5a97bba1538f065e1e90d8eeac399db7510 Author: Daniel Palmer Date: Mon Mar 1 21:35:40 2021 +0900 ARM: mstar: Select MSTAR_MSC313_MPLL All of the ARCH_MSTARV7 chips have an MPLL as the source for peripheral clocks so select MSTAR_MSC313_MPLL. Signed-off-by: Daniel Palmer Link: https://lore.kernel.org/r/20210301123542.2800643-2-daniel@0x0f.com' Signed-off-by: Arnd Bergmann commit 6ed9269265e10669d62280a869652dbe26f43ecb Author: Kurt Kanzenbach Date: Tue Mar 16 09:06:44 2021 +0100 ARM: dts: stm32: Add PTP clock to Ethernet controller Add the PTP clock to the Ethernet controller. Otherwise, the driver uses the main clock to derive the PTP frequency which is not necessarily the correct one. Tested with linuxptp on Olimex STMP1-OLinuXino-LIME2. Signed-off-by: Kurt Kanzenbach Signed-off-by: Alexandre Torgue commit a7dceafed43a4a610d340da3703653cca2c50c1d Author: Fabien Parent Date: Tue Feb 23 23:18:26 2021 +0100 arm64: dts: mediatek: fix reset GPIO level on pumpkin The tca6416 chip is active low. Fix the reset-gpios value. Fixes: e2a8fa1e0faa ("arm64: dts: mediatek: fix tca6416 reset GPIOs in pumpkin") Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210223221826.2063911-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 60d93f64a851d276b23b7ef68ddc638258485d32 Author: Enric Balletbo i Serra Date: Thu Feb 25 18:50:00 2021 +0100 soc: mediatek: pm-domains: Add a power domain names for mt8167 Add the power domains names for the mt8167 SoC. Fixes: 207f13b419a6 ("soc: mediatek: pm-domains: Add support for mt8167") Signed-off-by: Enric Balletbo i Serra Reviewed-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210225175000.824661-4-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 3edc01bc53c639b1c98f57e7f1c026aae6a25a62 Author: Enric Balletbo i Serra Date: Thu Feb 25 18:49:59 2021 +0100 soc: mediatek: pm-domains: Add a power domain names for mt8192 Add the power domains names for the mt8192 SoC. Fixes: a49d5e7a89d6 ("soc: mediatek: pm-domains: Add support for mt8192") Signed-off-by: Enric Balletbo i Serra Reviewed-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210225175000.824661-3-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit e57b8112258ed46dff23b49d6e400f54a8dbf1c3 Author: Enric Balletbo i Serra Date: Thu Feb 25 18:49:58 2021 +0100 soc: mediatek: pm-domains: Add a power domain names for mt8183 Add the power domains names for the mt8183 SoC. This removes the debugfs errors like the following: debugfs: Directory 'power-domain' with parent 'pm_genpd' already present! Fixes: eb9fa767fbe1 ("soc: mediatek: pm-domains: Add support for mt8183") Signed-off-by: Enric Balletbo i Serra Reviewed-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210225175000.824661-2-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 022b02b4505ecea5eda02b18683531e49f7d8eb7 Author: Enric Balletbo i Serra Date: Thu Feb 25 18:49:57 2021 +0100 soc: mediatek: pm-domains: Add a meaningful power domain name Add the power domains names to the power domain struct so we have meaningful name for every power domain. This also removes the following debugfs error message. [ 2.242068] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present! [ 2.249949] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present! [ 2.257784] debugfs: Directory 'power-domain' with parent 'pm_genpd' already present! ... Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains") Signed-off-by: Enric Balletbo i Serra Reviewed-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210225175000.824661-1-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 19b6403f1e2a6ceda39dade45c9c3f2ad59617d8 Author: Fabien Parent Date: Wed Feb 17 21:59:44 2021 +0100 arm64: dts: mt8183: add mt8183 pumpkin board The MT8183 Pumpkin board is manufactured by OLogic and includes a MediaTek MT8183 SoC with 2GB of RAM. The board provides the following IOs: * 2 USB Type-A ports * Ethernet * Serial UART over micro-USB port * 1 USB Type-C dual role port * 1 USB Type-C power only port * 1 Jack for audio * RPI compatible header * MT7668 wiresless chip with Wi-Fi AC and BT 5 * Micro-HDMI port * 2 connectors for CSI cameras * 1 connector for DSI display * 1 JTAG port Signed-off-by: Fabien Parent Link: https://lore.kernel.org/r/20210217205945.830006-2-fparent@baylibre.com Signed-off-by: Matthias Brugger commit ea69876c7b0ad08397999c8a83fc81e424351b73 Author: Fabien Parent Date: Wed Feb 17 21:59:43 2021 +0100 dt-bindings: arm64: dts: mediatek: Add mt8183-pumpkin board Add binding documentation for the MT8183 Pumpkin board. Signed-off-by: Fabien Parent Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210217205945.830006-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 1305a42b1081389d3a10e2639eafa7594ad65e66 Author: Marek Vasut Date: Thu Mar 25 22:45:33 2021 +0100 ARM: dts: stm32: Enable crc1 and cryp1 where applicable on DHSOM Enable the CRC accelerator on all STM32MP15xx DHSOM based systems and CRYP accelerator on all STM32MP15x[CF] DHSOM based systems. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit b23ab27b9a1c4720f628fb12fe4cd767e3266c4c Author: Wei Yongjun Date: Wed Feb 10 07:56:56 2021 +0000 soc: mediatek: Make symbol 'mtk_mutex_driver' static The sparse tool complains as follows: drivers/soc/mediatek/mtk-mutex.c:464:24: warning: symbol 'mtk_mutex_driver' was not declared. Should it be static? This symbol is not used outside of mtk-mutex.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/20210210075656.1096251-1-weiyongjun1@huawei.com Signed-off-by: Matthias Brugger commit e667450802e4ee46ba6a00c212f7841293204662 Merge: c770d8631e181 e54338004c032 Author: Mark Brown Date: Thu Apr 1 10:25:17 2021 +0100 Merge series "Convert Cadence QSPI bindings to yaml" from Pratyush Yadav : Hi, This series picks up Ramuthevar's effort on converting the Cadence QSPI bindings to yaml [0]. During the conversion process, I discovered that some TI device tree files were not using the compatible correctly. Those are fixed in patches 1-3. [0] https://patchwork.kernel.org/project/spi-devel-general/patch/20201116031003.19062-6-vadivel.muruganx.ramuthevar@linux.intel.com/ Pratyush Yadav (3): arm64: dts: ti: k3-j721e-mcu: Fix ospi compatible arm64: dts: ti: k3-j7200-mcu: Fix ospi compatible arm64: dts: ti: k3-am64-main: Fix ospi compatible Ramuthevar Vadivel Murugan (1): dt-bindings: spi: Convert cadence-quadspi.txt to cadence-quadspi.yaml .../bindings/spi/cadence-quadspi.txt | 68 --------- .../bindings/spi/cdns,qspi-nor.yaml | 143 ++++++++++++++++++ arch/arm64/boot/dts/ti/k3-am64-main.dtsi | 2 +- .../boot/dts/ti/k3-j7200-mcu-wakeup.dtsi | 2 +- .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi | 4 +- 5 files changed, 147 insertions(+), 72 deletions(-) delete mode 100644 Documentation/devicetree/bindings/spi/cadence-quadspi.txt create mode 100644 Documentation/devicetree/bindings/spi/cdns,qspi-nor.yaml -- 2.30.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit df421a3a6f00c6b377759bbf0747fe42a9021d89 Merge: 75c324d5ab14c 945b0b58c5d7c Author: Mark Brown Date: Thu Apr 1 10:25:14 2021 +0100 Merge series "ASoC: remove cppchecks warnings on lm49453 and da732x" from Pierre-Louis Bossart : There are the last two patches in the cleanups, this time I am not sure what the code does and what the proper fix might be. Feedback welcome. Pierre-Louis Bossart (2): ASoC: lm49453: fix useless assignment before return ASoC: da732x: simplify code sound/soc/codecs/da732x.c | 17 ++++++----------- sound/soc/codecs/da732x.h | 12 ++++-------- sound/soc/codecs/lm49453.c | 2 -- 3 files changed, 10 insertions(+), 21 deletions(-) -- 2.25.1 commit 75c324d5ab14c70670985c49ac59393c90077a56 Merge: 73935e931c945 f1321c9766b2c Author: Mark Brown Date: Thu Apr 1 10:25:13 2021 +0100 Merge series "ASoC: dt-bindings: Rework audio-graph-port schema" from Rob Herring : This series refactors the audio-graph-port.yaml schema moving the 'port' node out of the schema and updating to use graph.yaml schema. This allows users to define what each 'port' node is like other graph binding users. v2: - Rebase on ASoC tree Rob Cc: alsa-devel@alsa-project.org Cc: linux-tegra@vger.kernel.org Cc: Jonathan Hunter Cc: Kuninori Morimoto Cc: Liam Girdwood Cc: Lubomir Rintel Cc: Mark Brown Cc: Masahiro Yamada Cc: Sameer Pujar Cc: Thierry Reding Rob Herring (3): ASoC: dt-bindings: Move port/ports properties out of audio-graph-port.yaml ASoC: dt-bindings: Use OF graph schema ASoC: dt-bindings: socionext: Use audio-graph-port schema .../bindings/sound/audio-graph-port.yaml | 104 ++++++++---------- .../bindings/sound/marvell,mmp-sspa.yaml | 6 +- .../bindings/sound/nvidia,tegra186-dspk.yaml | 11 +- .../sound/nvidia,tegra210-admaif.yaml | 11 +- .../bindings/sound/nvidia,tegra210-ahub.yaml | 11 +- .../bindings/sound/nvidia,tegra210-dmic.yaml | 11 +- .../bindings/sound/nvidia,tegra210-i2s.yaml | 11 +- .../bindings/sound/renesas,rsnd.yaml | 5 +- .../sound/socionext,uniphier-aio.yaml | 8 +- .../sound/socionext,uniphier-evea.yaml | 8 +- 10 files changed, 89 insertions(+), 97 deletions(-) -- 2.27.0 commit 73935e931c945b019bde312a99f1b43a0a783fca Merge: 9c0da2935eba3 5fa7553dcd83c Author: Mark Brown Date: Thu Apr 1 10:25:12 2021 +0100 Merge series "ASoC: soc-core: tidyup error handling for rtd" from Kuninori Morimoto : Hi Mark These are small clanup patches for soc-core. [1/2] patch adds missing explanation, and [2/2] patch fixup error handling of rtd. Kuninori Morimoto (2): ASoC: soc-core: add comment for rtd freeing ASoC: soc-core: use device_unregister() if rtd allocation failed sound/soc/soc-core.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) -- 2.25.1 commit 9c0da2935eba3dc48ed19c8ca30e838a68b93ff3 Merge: bb0f78e59777d b4d09a01666fd Author: Mark Brown Date: Thu Apr 1 10:25:11 2021 +0100 Merge series "ASoC: remove cppcheck warnings for multiple SOCs" from Pierre-Louis Bossart : Trivial cleanups to make cppcheck less verbose. There should be no functionality change, except for the 'sti_uniperif' patch where an error check was added. Pierre-Louis Bossart (17): ASoC: amd: renoir: acp3x-pdm-dma: remove unnecessary assignments ASoC: atmel: fix shadowed variable ASoC: atmel: atmel-i2s: remove useless initialization ASoC: bcm: cygnus_ssp: remove useless initialization ASoC: meson: axg-tdmin: remove useless assignment ASoC: meson: axg-tdmout: remove useless assignment ASoC: pxa: remove useless assignment ASoC: sti: sti_uniperif: add missing error check ASoC: sti: uniperif: align function prototypes ASoC: stm: stm32_adfsdm: fix snprintf format string ASoC: sunxi: sun8i-codec: clarify expression ASoC: tegra: tegra20_das: clarify expression ASoC: tegra: tegra20_das: align function prototypes ASoC: ti: omap-abe-twl6040: remove useless assignment ASoC: ti: omap-mcsp: remove duplicate test ASoC: ux500: mop500: rename shadowing variable ASoC: ux500: mop500: align function prototype sound/soc/amd/renoir/acp3x-pdm-dma.c | 2 -- sound/soc/atmel/atmel-classd.c | 6 +++--- sound/soc/atmel/atmel-i2s.c | 2 +- sound/soc/bcm/cygnus-ssp.c | 2 +- sound/soc/meson/axg-tdmin.c | 2 +- sound/soc/meson/axg-tdmout.c | 2 +- sound/soc/pxa/mmp-pcm.c | 2 +- sound/soc/sti/sti_uniperif.c | 2 ++ sound/soc/sti/uniperif.h | 4 ++-- sound/soc/stm/stm32_adfsdm.c | 2 +- sound/soc/sunxi/sun8i-codec.c | 2 +- sound/soc/tegra/tegra20_das.c | 8 ++++---- sound/soc/tegra/tegra20_das.h | 6 +++--- sound/soc/ti/omap-abe-twl6040.c | 2 +- sound/soc/ti/omap-mcbsp.c | 3 +-- sound/soc/ux500/mop500.c | 6 +++--- sound/soc/ux500/mop500_ab8500.h | 2 +- 17 files changed, 27 insertions(+), 28 deletions(-) -- 2.25.1 commit cb9b6a1b199b9a4f409d4b8fd70434c80f5389c2 Merge: 4a98623d5d901 3c346c0c60ab0 Author: Paolo Bonzini Date: Wed Mar 31 07:35:52 2021 -0400 Merge branch 'kvm-fix-svm-races' into HEAD commit aec0fae62e47050019474936248a311a0ab08705 Author: Andrew Scull Date: Thu Mar 18 14:33:11 2021 +0000 KVM: arm64: Log source when panicking from nVHE hyp To aid with debugging, add details of the source of a panic from nVHE hyp. This is done by having nVHE hyp exit to nvhe_hyp_panic_handler() rather than directly to panic(). The handler will then add the extra details for debugging before panicking the kernel. If the panic was due to a BUG(), look up the metadata to log the file and line, if available, otherwise log an address that can be looked up in vmlinux. The hyp offset is also logged to allow other hyp VAs to be converted, similar to how the kernel offset is logged during a panic. __hyp_panic_string is now inlined since it no longer needs to be referenced as a symbol and the message is free to diverge between VHE and nVHE. The following is an example of the logs generated by a BUG in nVHE hyp. [ 46.754840] kvm [307]: nVHE hyp BUG at: arch/arm64/kvm/hyp/nvhe/switch.c:242! [ 46.755357] kvm [307]: Hyp Offset: 0xfffea6c58e1e0000 [ 46.755824] Kernel panic - not syncing: HYP panic: [ 46.755824] PS:400003c9 PC:0000d93a82c705ac ESR:f2000800 [ 46.755824] FAR:0000000080080000 HPFAR:0000000000800800 PAR:0000000000000000 [ 46.755824] VCPU:0000d93a880d0000 [ 46.756960] CPU: 3 PID: 307 Comm: kvm-vcpu-0 Not tainted 5.12.0-rc3-00005-gc572b99cf65b-dirty #133 [ 46.757459] Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 [ 46.758366] Call trace: [ 46.758601] dump_backtrace+0x0/0x1b0 [ 46.758856] show_stack+0x18/0x70 [ 46.759057] dump_stack+0xd0/0x12c [ 46.759236] panic+0x16c/0x334 [ 46.759426] arm64_kernel_unmapped_at_el0+0x0/0x30 [ 46.759661] kvm_arch_vcpu_ioctl_run+0x134/0x750 [ 46.759936] kvm_vcpu_ioctl+0x2f0/0x970 [ 46.760156] __arm64_sys_ioctl+0xa8/0xec [ 46.760379] el0_svc_common.constprop.0+0x60/0x120 [ 46.760627] do_el0_svc+0x24/0x90 [ 46.760766] el0_svc+0x2c/0x54 [ 46.760915] el0_sync_handler+0x1a4/0x1b0 [ 46.761146] el0_sync+0x170/0x180 [ 46.761889] SMP: stopping secondary CPUs [ 46.762786] Kernel Offset: 0x3e1cd2820000 from 0xffff800010000000 [ 46.763142] PHYS_OFFSET: 0xffffa9f680000000 [ 46.763359] CPU features: 0x00240022,61806008 [ 46.763651] Memory Limit: none [ 46.813867] ---[ end Kernel panic - not syncing: HYP panic: [ 46.813867] PS:400003c9 PC:0000d93a82c705ac ESR:f2000800 [ 46.813867] FAR:0000000080080000 HPFAR:0000000000800800 PAR:0000000000000000 [ 46.813867] VCPU:0000d93a880d0000 ]--- Signed-off-by: Andrew Scull Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210318143311.839894-6-ascull@google.com commit f79e616f27ab6cd74deb0995a8eead3d1c9d65af Author: Andrew Scull Date: Thu Mar 18 14:33:10 2021 +0000 KVM: arm64: Use BUG and BUG_ON in nVHE hyp hyp_panic() reports the address of the panic by using ELR_EL2, but this isn't a useful address when hyp_panic() is called directly. Replace such direct calls with BUG() and BUG_ON() which use BRK to trigger an exception that then goes to hyp_panic() with the correct address. Also remove the hyp_panic() declaration from the header file to avoid accidental misuse. Signed-off-by: Andrew Scull Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210318143311.839894-5-ascull@google.com commit 5b8be5d875a996776708ba174fcd08c8bcd721a5 Author: Andrew Scull Date: Thu Mar 18 14:33:09 2021 +0000 bug: Assign values once in bug_get_file_line() Set bug_get_file_line()'s output parameter values directly rather than first nullifying them and then conditionally setting new values. Signed-off-by: Andrew Scull Cc: Peter Zijlstra Cc: "Steven Rostedt (VMware)" Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210318143311.839894-4-ascull@google.com commit 26dbc7e299c7ebbb6a95e2c620b21b5280b37c57 Author: Andrew Scull Date: Thu Mar 18 14:33:08 2021 +0000 bug: Factor out a getter for a bug's file line There is some non-trivial config-based logic to get the file name and line number associated with a bug. Factor this out to a getter that can be resused. Signed-off-by: Andrew Scull Cc: Peter Zijlstra Cc: "Steven Rostedt (VMware)" Reviewed-by: Steven Rostedt (VMware) Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210318143311.839894-3-ascull@google.com commit 3ad1a6cb0abc63d036fc866bd7c2c5983516dec5 Author: Andrew Scull Date: Thu Mar 18 14:33:07 2021 +0000 bug: Remove redundant condition check in report_bug report_bug() will return early if it cannot find a bug corresponding to the provided address. The subsequent test for the bug will always be true so remove it. Fixes: 1b4cfe3c0a30d ("lib/bug.c: exclude non-BUG/WARN exceptions from report_bug()") Signed-off-by: Andrew Scull Cc: Peter Zijlstra Cc: "Steven Rostedt (VMware)" Reviewed-by: Steven Rostedt (VMware) Acked-by: Will Deacon Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210318143311.839894-2-ascull@google.com commit 6c744983004ebc66756e582294672f8b991288d5 Author: Hsin-Yi Wang Date: Thu Apr 1 13:32:02 2021 +0800 drm/bridge: anx7625: disable regulators when power off When suspending the driver, anx7625_power_standby() will be called to turn off reset-gpios and enable-gpios. However, power supplies are not disabled. To save power, the driver can get the power supply regulators and turn off them in anx7625_power_standby(). Signed-off-by: Hsin-Yi Wang Reviewed-by: Robert Foss Reviewed-by: Xin Ji Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210401053202.159302-2-hsinyi@chromium.org commit 2f240cdb23e9cde551d99c77f4e60062188d8d81 Author: Hsin-Yi Wang Date: Thu Apr 1 13:32:01 2021 +0800 dt-bindings: drm/bridge: anx7625: Add power supplies anx7625 requires 3 power supply regulators. Signed-off-by: Hsin-Yi Wang Reviewed-by: Rob Herring Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210401053202.159302-1-hsinyi@chromium.org commit 1678320e74d32054942182b19b1e9b42aaba8b29 Merge: 5b1ed7df01335 62327ebbdf009 Author: Takashi Iwai Date: Thu Apr 1 10:04:31 2021 +0200 Merge branch 'topic/mute-led' into for-next Pull mute-LED helper fixes from Jaroslav. Signed-off-by: Takashi Iwai commit 5fec21e74bfc1db764fdab013162d839cc889290 Author: Johan Hovold Date: Tue Mar 30 16:38:20 2021 +0200 USB: serial: xr: claim both interfaces Use the new multi-interface support in USB serial core to properly claim also the control interface during probe. This prevents having another driver claim the control interface and makes core allocate resources also for the interrupt endpoint (currently unused). Switch to probing only Communication Class interfaces and use the Union functional descriptor to determine the corresponding data interface. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 62327ebbdf0097cda25579522424b350c65422a4 Author: Jaroslav Kysela Date: Wed Mar 31 20:07:25 2021 +0200 ALSA: control led - improve the set_led_id() parser It may be possible that the string pointer does not move when parsing. Add a code which detects this state and simply break the parser loop in this case. Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210331180725.663623-1-perex@perex.cz Signed-off-by: Takashi Iwai commit 5de03c99691d5b0b6253fda1d1d3bbc8239aadb8 Author: Johan Hovold Date: Tue Mar 30 16:38:19 2021 +0200 USB: serial: add support for multi-interface functions A single USB function can be implemented using a group of interfaces and this is for example commonly used for Communication Class devices. Add support for multi-interface functions to USB serial core and export an interface that allows drivers to claim a second sibling interface. The interface could easily be extended to allow claiming further interfaces if ever needed. When a driver claims a sibling interface in probe(), core allocates resources for any bulk in, bulk out, interrupt in and interrupt out endpoints found also on the sibling interface. Disconnect is implemented so that unbinding either interface will release the other interface while disconnect() is called precisely once. Similarly, suspend() is called when the first sibling interface is suspended and resume() is called when the last sibling interface is resumed by USB core. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit b3431093ad05c5242d87fcf94bddc7a84a2134f5 Author: Johan Hovold Date: Tue Mar 30 16:38:18 2021 +0200 USB: serial: refactor endpoint classification Refactor endpoint classification and replace the build-time endpoint-array sanity checks with runtime checks in preparation for handling endpoints from a sibling interface. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 016c20506d5c30151196ab28c694ab10bc3604e6 Author: Jaroslav Kysela Date: Wed Mar 31 20:07:02 2021 +0200 ALSA: control - add the missing prev_lops2 initialization As static analysis reported, the prev_lops2 should contain the previous lops2 pointer in snd_ctl_disconnect_layer(). Link: https://lore.kernel.org/alsa-devel/96e9bd5c-c8db-0db8-b393-fbf4a047dc80@canonical.com/ Fixes: 3f0638a0333b ("ALSA: control - add layer registration routines") Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210331180702.663489-1-perex@perex.cz Signed-off-by: Takashi Iwai commit 7d96c4a5ecfb0f709facb5bc41df8c7dc191a8a5 Author: Marek Vasut Date: Mon Mar 29 21:36:14 2021 +0200 ARM: dts: stm32: Update GPIO line names on PicoITX Use more specific custom GPIO line names which denote exactly where the GPIO came from, i.e. the base board. Also, update the new blank GPIO line names set up by stm32mp15xx-dhcom-som.dtsi back to their original values. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 1ab841fbab09bbc721d61a8688bd70db58643f8d Author: Marek Vasut Date: Mon Mar 29 21:36:13 2021 +0200 ARM: dts: stm32: Update GPIO line names on DRC02 Use more specific custom GPIO line names which denote exactly where the GPIO came from, i.e. the base board. Also, update the new blank GPIO line names set up by stm32mp15xx-dhcom-som.dtsi back to their original values. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit d73d4e3cab9f779a7c72c3a5476c2b7c8221d6ae Author: Marek Vasut Date: Mon Mar 29 21:36:12 2021 +0200 ARM: dts: stm32: Fill GPIO line names on AV96 Fill in the custom GPIO line names used by DH. Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit c967b44249d7f1372e499abb58bbafc8dee15c00 Author: Marek Vasut Date: Mon Mar 29 21:36:11 2021 +0200 ARM: dts: stm32: Fill GPIO line names on DHCOM SoM Fill in the custom GPIO line names used by DH on the DHCOM SoM. The GPIO line names are in accordance to DHCOM Design Guide R04 available at [1], section 3.9 GPIO. [1] https://wiki.dh-electronics.com/images/5/52/DOC_DHCOM-Design-Guide_R04_2018-06-28.pdf Signed-off-by: Marek Vasut Cc: Alexandre Torgue Cc: Patrice Chotard Cc: Patrick Delaunay Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Signed-off-by: Alexandre Torgue commit 53366a9f917a8601dcad0fd9768d5956cd2f99a6 Author: Johan Hovold Date: Tue Mar 30 16:38:17 2021 +0200 USB: serial: drop unused suspending flag The suspending flag was added back in 2009 but no users ever followed. Remove it. Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit ea7ada4de2f7406150dd35ecd0302842587a464e Author: Johan Hovold Date: Tue Mar 30 16:37:16 2021 +0200 USB: serial: xr: fix CSIZE handling The XR21V141X does not have a 5- or 6-bit mode, but the current implementation failed to properly restore the old setting when CS5 or CS6 was requested. Instead an invalid request would be sent to the device. Fixes: c2d405aa86b4 ("USB: serial: add MaxLinear/Exar USB to Serial driver") Reviewed-by: Manivannan Sadhasivam Cc: stable@vger.kernel.org # 5.12 Signed-off-by: Johan Hovold commit 6c2ec6adb2971072cfe06d1e9dd699e31772ba08 Author: dillon min Date: Wed Mar 31 16:28:45 2021 +0800 dt-bindings: serial: stm32: Use 'type: object' instead of false for 'additionalProperties' To use additional properties 'bluetooth' on serial, need replace false with 'type: object' for 'additionalProperties' to make it as a node, else will run into dtbs_check warnings. 'arch/arm/boot/dts/stm32h750i-art-pi.dt.yaml: serial@40004800: 'bluetooth' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: af1c2d81695b ("dt-bindings: serial: Convert STM32 UART to json-schema") Reported-by: kernel test robot Tested-by: Valentin Caron Signed-off-by: dillon min Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1616757302-7889-8-git-send-email-dillon.minfei@gmail.com Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit 40ddb5376972a5a3ad6ae63239113cc27007b259 Author: dillon min Date: Wed Mar 31 16:28:44 2021 +0800 ARM: stm32: Add a new SoC - STM32H750 The STM32H750 is a Cortex-M7 MCU running at 480MHz and containing 128KBytes internal flash, 1MiB SRAM. Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit 315e2811f58b807e6e76b7385e3d7b970f4562d2 Author: Colin Ian King Date: Sat Mar 27 23:27:44 2021 +0000 USB: serial: iuu_phoenix: remove redundant variable 'error' The variable error is initialized to 0 and is set to 1 this value is never read as it is on an immediate return path. The only read of error is to check it is 0 and this check is always true at that point of the code. The variable is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Johan Hovold commit 2aaa41eea3dc3fb3086146cfe73febfc6d1af71a Author: dillon min Date: Wed Mar 31 16:28:43 2021 +0800 ARM: dts: stm32: add support for art-pi board based on stm32h750xbh6 This patchset has following changes: - introduce stm32h750.dtsi to support stm32h750 value line - add pin groups for usart3/uart4/spi1/sdmmc2 - add stm32h750i-art-pi.dtb (arch/arm/boot/dts/Makefile) - add stm32h750-art-pi.dts to support art-pi board art-pi board component: - 8MiB qspi flash - 16MiB spi flash - 32MiB sdram - ap6212 wifi&bt&fm the detail board information can be found at: https://art-pi.gitee.io/website/ Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit 978783f90ab71f830207b7e9b49ab819cfd89dd4 Author: Alexandre Torgue Date: Thu Apr 1 09:46:08 2021 +0200 ARM: dts: stm32: fix i2c node typo in stm32h743 Replace upper case by lower case in i2c nodes name. Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit 4e1593391fa38c0a8ec0f314f37ec5543475bf9d Author: Alexandre Torgue Date: Thu Apr 1 09:37:31 2021 +0200 ARM: dts: stm32: add new instances for stm32h743 MCU Some instances are missing in current support of stm32h743 MCU. This commit adds usart3/uart4 and sdmmc2 support. Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit d3f715e63f2d6ff98fd4426015847f3442b8805f Author: dillon min Date: Wed Mar 31 16:28:42 2021 +0800 ARM: dts: stm32: introduce stm32h7-pinctrl.dtsi to support stm32h750 This patch is intend to add support stm32h750 value line, just add stm32h7-pinctrl.dtsi for extending, with following changes: - rename stm32h743-pinctrl.dtsi to stm32h7-pinctrl.dtsi - move 'pin-controller' from stm32h7-pinctrl.dtsi to stm32h743.dtsi, to fix make dtbs_check warrnings arch/arm/boot/dts/stm32h750i-art-pi.dt.yaml: soc: 'i2c@40005C00', 'i2c@58001C00' do not match any of the regexes: '@(0|[1-9a-f][0-9a-f]*)$', '^[^@]+$', 'pinctrl-[0-9]+' Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit e54338004c032b0bb556c7a56db8688454b6587e Author: Ramuthevar Vadivel Murugan Date: Fri Mar 26 18:30:34 2021 +0530 spi: Convert cadence-quadspi.txt to cadence-quadspi.yaml There is no way as of now to have a parent or bus defining properties for child nodes. For now, avoid it in the example to silence warnings on dt_schema_check. We can figure out how to deal with actual dts files later. [p.yadav@ti.com: Fix how compatible is defined, make reset optional, fix minor typos, remove subnode properties in example, update commit message.] Signed-off-by: Ramuthevar Vadivel Murugan Signed-off-by: Pratyush Yadav Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210326130034.15231-5-p.yadav@ti.com Signed-off-by: Mark Brown commit b26b48749b18eedb079866c94c4ea99e6a9ef52c Author: Vinod Koul Date: Wed Mar 31 21:25:20 2021 +0530 soundwire: qcom: use signed variable for error return We get warning of using a unsigned variable being compared to less than zero. The comparison is correct as it checks for errors from previous call to qcom_swrm_get_alert_slave_dev_num(), so we should use a signed variable here. While at it, drop the superfluous initialization as well drivers/soundwire/qcom.c: qcom_swrm_irq_handler() warn: impossible condition '(devnum < 0) => (0-255 < 0)' Reported-by: kernel test robot Signed-off-by: Vinod Koul Reviewed-by: Pierre-Louis Bossart Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210331155520.2987823-1-vkoul@kernel.org Signed-off-by: Vinod Koul commit 5d219a70d4fa700b433ad7e26339391b71de4975 Author: dillon min Date: Wed Mar 31 16:28:41 2021 +0800 dt-bindings: arm: stm32: Add compatible strings for ART-PI board Art-pi based on stm32h750xbh6, with following resources: -8MiB QSPI flash -16MiB SPI flash -32MiB SDRAM -AP6212 wifi, bt, fm detail information can be found at: https://art-pi.gitee.io/website/ Signed-off-by: dillon min Acked-by: Rob Herring Signed-off-by: Alexandre Torgue commit 69ca48e6cc1710746356e8170736286f7e9a3dfc Author: dillon min Date: Wed Mar 31 16:28:40 2021 +0800 Documentation: arm: stm32: Add stm32h750 value line doc This patchset add support for soc stm32h750, stm32h750 has mirror different from stm32h743 item stm32h743 stm32h750 flash size: 2MiB 128KiB adc: none 3 crypto-hash: none aes/hamc/des/tdes/md5/sha detail information can be found at: https://www.st.com/en/microcontrollers-microprocessors/stm32h750-value-line.html Signed-off-by: dillon min Signed-off-by: Alexandre Torgue commit 040806343bb4ef6365166eae666ced8a91b95321 Author: Carlos Llamas Date: Thu Apr 1 00:40:20 2021 +0000 selftests/net: so_txtime multi-host support SO_TXTIME hardware offload requires testing across devices, either between machines or separate network namespaces. Split up SO_TXTIME test into tx and rx modes, so traffic can be sent from one process to another. Create a veth-pair on different namespaces and bind each process to an end point via [-S]ource and [-D]estination parameters. Optional start [-t]ime parameter can be passed to synchronize the test across the hosts (with synchorinzed clocks). Signed-off-by: Carlos Llamas Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 917e2e6c57980e2255c5eb8ddd77ed670ae49752 Author: Frank Wunderlich Date: Wed Mar 31 15:34:37 2021 +0200 net: mediatek: add flow offload for mt7623 mt7623 uses offload version 2 too tested on Bananapi-R2 Signed-off-by: Frank Wunderlich Signed-off-by: David S. Miller commit b494ba5a3cf822fa99fb941cd1c293da21f4f927 Author: Voon Weifeng Date: Thu Apr 1 00:18:25 2021 +0800 net: stmmac: enable MTL ECC Error Address Status Over-ride by default Turn on the MEEAO field of MTL_ECC_Control_Register by default. As the MTL ECC Error Address Status Over-ride(MEEAO) is set by default, the following error address fields will hold the last valid address where the error is detected. Signed-off-by: Voon Weifeng Signed-off-by: Tan Tee Min Co-developed-by: Wong Vee Khee Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit 77890db10ef04cae55fb858cbb861414f33039a3 Merge: 0d7a7b2014b1a 9d2b68cc108db Author: David S. Miller Date: Wed Mar 31 14:57:44 2021 -0700 Merge branch 'nxp-enetc-xdp' Vladimir Oltean says: ==================== XDP for NXP ENETC This series adds support to the enetc driver for the basic XDP primitives. The ENETC is a network controller found inside the NXP LS1028A SoC, which is a dual-core Cortex A72 device for industrial networking, with the CPUs clocked at up to 1.3 GHz. On this platform, there are 4 ENETC ports and a 6-port embedded DSA switch, in a topology that looks like this: +-------------------------------------------------------------------------+ | +--------+ 1 Gbps (typically disabled) | | ENETC PCI | ENETC |--------------------------+ | | Root Complex | port 3 |-----------------------+ | | | Integrated +--------+ | | | | Endpoint | | | | +--------+ 2.5 Gbps | | | | | ENETC |--------------+ | | | | | port 2 |-----------+ | | | | | +--------+ | | | | | | | | | | | | +------------------------------------------------+ | | | Felix | | Felix | | | | Switch | port 4 | | port 5 | | | | +--------+ +--------+ | | | | | +--------+ +--------+ | +--------+ +--------+ +--------+ +--------+ | | | ENETC | | ENETC | | | Felix | | Felix | | Felix | | Felix | | | | port 0 | | port 1 | | | port 0 | | port 1 | | port 2 | | port 3 | | +-------------------------------------------------------------------------+ | | | | | | v v v v v v Up to Up to Up to 4x 2.5Gbps 2.5Gbps 1Gbps The ENETC ports 2 and 3 can act as DSA masters for the embedded switch. Because 4 out of the 6 externally-facing ports of the SoC are switch ports, the most interesting use case for XDP on this device is in fact XDP_TX on the 2.5Gbps DSA master. Nonetheless, the results presented below are for IPv4 forwarding between ENETC port 0 (eno0) and port 1 (eno1) both configured for 1Gbps. There are two streams of IPv4/UDP datagrams with a frame length of 64 octets delivered at 100% port load to eno0 and to eno1. eno0 has a flow steering rule to process the traffic on RX ring 0 (CPU 0), and eno1 has a flow steering rule towards RX ring 1 (CPU 1). For the IPFWD test, standard IP routing was enabled in the netns. For the XDP_DROP test, the samples/bpf/xdp1 program was attached to both eno0 and to eno1. For the XDP_TX test, the samples/bpf/xdp2 program was attached to both eno0 and to eno1. For the XDP_REDIRECT test, the samples/bpf/xdp_redirect program was attached once to the input of eno0/output of eno1, and twice to the input of eno1/output of eno0. Finally, the preliminary results are as follows: | IPFWD | XDP_TX | XDP_REDIRECT | XDP_DROP --------+-------+--------+------------------------- fps | 761 | 2535 | 1735 | 2783 Gbps | 0.51 | 1.71 | 1.17 | n/a There is a strange phenomenon in my testing sistem where it appears that one CPU is processing more than the other. I have not investigated this too much. Also, the code might not be very well optimized (for example dma_sync_for_device is called with the full ENETC_RXB_DMA_SIZE_XDP). Design wise, the ENETC is a PCI device with BD rings, so it uses the MEM_TYPE_PAGE_SHARED memory model, as can typically be seen in Intel devices. The strategy was to build upon the existing model that the driver uses, and not change it too much. So you will see things like a separate NAPI poll function for XDP. I have only tested with PAGE_SIZE=4096, and since we split pages in half, it means that MTU-sized frames are scatter/gather (the XDP headroom + skb_shared_info only leaves us 1476 bytes of data per buffer). This is sub-optimal, but I would rather keep it this way and help speed up Lorenzo's series for S/G support through testing, rather than change the enetc driver to use some other memory model like page_pool. My code is already structured for S/G, and that works fine for XDP_DROP and XDP_TX, just not for XDP_REDIRECT, even between two enetc ports. So the S/G XDP_REDIRECT is stubbed out (the frames are dropped), but obviously I would like to remove that limitation soon. Please note that I am rather new to this kind of stuff, I am more of a control path person, so I would appreciate feedback. Enough talking, on to the patches. ==================== Signed-off-by: David S. Miller commit 9d2b68cc108db2fdb35022ed2d88cfb305c441a6 Author: Vladimir Oltean Date: Wed Mar 31 23:08:57 2021 +0300 net: enetc: add support for XDP_REDIRECT The driver implementation of the XDP_REDIRECT action reuses parts from XDP_TX, most notably the enetc_xdp_tx function which transmits an array of TX software BDs. Only this time, the buffers don't have DMA mappings, we need to create them. When a BPF program reaches the XDP_REDIRECT verdict for a frame, we can employ the same buffer reuse strategy as for the normal processing path and for XDP_PASS: we can flip to the other page half and seed that to the RX ring. Note that scatter/gather support is there, but disabled due to lack of multi-buffer support in XDP (which is added by this series): https://patchwork.kernel.org/project/netdevbpf/cover/cover.1616179034.git.lorenzo@kernel.org/ Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d6a2829e82cff9e5ec10b8ee293488b57399ed01 Author: Vladimir Oltean Date: Wed Mar 31 23:08:56 2021 +0300 net: enetc: increase RX ring default size As explained in the XDP_TX patch, when receiving a burst of frames with the XDP_TX verdict, there is a momentary dip in the number of available RX buffers. The system will eventually recover as TX completions will start kicking in and refilling our RX BD ring again. But until that happens, we need to survive with as few out-of-buffer discards as possible. This increases the memory footprint of the driver in order to avoid discards at 2.5Gbps line rate 64B packet sizes, the maximum speed available for testing on 1 port on NXP LS1028A. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7ed2bc80074ed4ed30e0cab323305bde851f7a87 Author: Vladimir Oltean Date: Wed Mar 31 23:08:55 2021 +0300 net: enetc: add support for XDP_TX For reflecting packets back into the interface they came from, we create an array of TX software BDs derived from the RX software BDs. Therefore, we need to extend the TX software BD structure to contain most of the stuff that's already present in the RX software BD structure, for reasons that will become evident in a moment. For a frame with the XDP_TX verdict, we don't reuse any buffer right away as we do for XDP_DROP (the same page half) or XDP_PASS (the other page half, same as the skb code path). Because the buffer transfers ownership from the RX ring to the TX ring, reusing any page half right away is very dangerous. So what we can do is we can recycle the same page half as soon as TX is complete. The code path is: enetc_poll -> enetc_clean_rx_ring_xdp -> enetc_xdp_tx -> enetc_refill_rx_ring (time passes, another MSI interrupt is raised) enetc_poll -> enetc_clean_tx_ring -> enetc_recycle_xdp_tx_buff But that creates a problem, because there is a potentially large time window between enetc_xdp_tx and enetc_recycle_xdp_tx_buff, period in which we'll have less and less RX buffers. Basically, when the ship starts sinking, the knee-jerk reaction is to let enetc_refill_rx_ring do what it does for the standard skb code path (refill every 16 consumed buffers), but that turns out to be very inefficient. The problem is that we have no rx_swbd->page at our disposal from the enetc_reuse_page path, so enetc_refill_rx_ring would have to call enetc_new_page for every buffer that we refill (if we choose to refill at this early stage). Very inefficient, it only makes the problem worse, because page allocation is an expensive process, and CPU time is exactly what we're lacking. Additionally, there is an even bigger problem: if we let enetc_refill_rx_ring top up the ring's buffers again from the RX path, remember that the buffers sent to transmission haven't disappeared anywhere. They will be eventually sent, and processed in enetc_clean_tx_ring, and an attempt will be made to recycle them. But surprise, the RX ring is already full of new buffers, because we were premature in deciding that we should refill. So not only we took the expensive decision of allocating new pages, but now we must throw away perfectly good and reusable buffers. So what we do is we implement an elastic refill mechanism, which keeps track of the number of in-flight XDP_TX buffer descriptors. We top up the RX ring only up to the total ring capacity minus the number of BDs that are in flight (because we know that those BDs will return to us eventually). The enetc driver manages 1 RX ring per CPU, and the default TX ring management is the same. So we do XDP_TX towards the TX ring of the same index, because it is affined to the same CPU. This will probably not produce great results when we have a tc-taprio/tc-mqprio qdisc on the interface, because in that case, the number of TX rings might be greater, but I didn't add any checks for that yet (mostly because I didn't know what checks to add). It should also be noted that we need to change the DMA mapping direction for RX buffers, since they may now be reflected into the TX ring of the same device. We choose to use DMA_BIDIRECTIONAL instead of unmapping and remapping as DMA_TO_DEVICE, because performance is better this way. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d1b15102dd16adc17fd5e4db8a485e6459f98906 Author: Vladimir Oltean Date: Wed Mar 31 23:08:54 2021 +0300 net: enetc: add support for XDP_DROP and XDP_PASS For the RX ring, enetc uses an allocation scheme based on pages split into two buffers, which is already very efficient in terms of preventing reallocations / maximizing reuse, so I see no reason why I would change that. +--------+--------+--------+--------+--------+--------+--------+ | | | | | | | | | half B | half B | half B | half B | half B | half B | half B | | | | | | | | | +--------+--------+--------+--------+--------+--------+--------+ | | | | | | | | | half A | half A | half A | half A | half A | half A | half A | RX ring | | | | | | | | +--------+--------+--------+--------+--------+--------+--------+ ^ ^ | | next_to_clean next_to_alloc next_to_use +--------+--------+--------+--------+--------+ | | | | | | | half B | half B | half B | half B | half B | | | | | | | +--------+--------+--------+--------+--------+--------+--------+ | | | | | | | | | half B | half B | half A | half A | half A | half A | half A | RX ring | | | | | | | | +--------+--------+--------+--------+--------+--------+--------+ | | | ^ ^ | half A | half A | | | | | | next_to_clean next_to_use +--------+--------+ ^ | next_to_alloc then when enetc_refill_rx_ring is called, whose purpose is to advance next_to_use, it sees that it can take buffers up to next_to_alloc, and it says "oh, hey, rx_swbd->page isn't NULL, I don't need to allocate one!". The only problem is that for default PAGE_SIZE values of 4096, buffer sizes are 2048 bytes. While this is enough for normal skb allocations at an MTU of 1500 bytes, for XDP it isn't, because the XDP headroom is 256 bytes, and including skb_shared_info and alignment, we end up being able to make use of only 1472 bytes, which is insufficient for the default MTU. To solve that problem, we implement scatter/gather processing in the driver, because we would really like to keep the existing allocation scheme. A packet of 1500 bytes is received in a buffer of 1472 bytes and another one of 28 bytes. Because the headroom required by XDP is different (and much larger) than the one required by the network stack, whenever a BPF program is added or deleted on the port, we drain the existing RX buffers and seed new ones with the required headroom. We also keep the required headroom in rx_ring->buffer_offset. The simplest way to implement XDP_PASS, where an skb must be created, is to create an xdp_buff based on the next_to_clean RX BDs, but not clear those BDs from the RX ring yet, just keep the original index at which the BDs for this frame started. Then, if the verdict is XDP_PASS, instead of converting the xdb_buff to an skb, we replay a call to enetc_build_skb (just as in the normal enetc_clean_rx_ring case), starting from the original BD index. We would also like to be minimally invasive to the regular RX data path, and not check whether there is a BPF program attached to the ring on every packet. So we create a separate RX ring processing function for XDP. Because we only install/remove the BPF program while the interface is down, we forgo the rcu_read_lock() in enetc_clean_rx_ring, since there shouldn't be any circumstance in which we are processing packets and there is a potentially freed BPF program attached to the RX ring. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 65d0cbb414cee012ceee9991d09f5e7c30b49fcc Author: Vladimir Oltean Date: Wed Mar 31 23:08:53 2021 +0300 net: enetc: move up enetc_reuse_page and enetc_page_reusable For XDP_TX, we need to call enetc_reuse_page from enetc_clean_tx_ring, so we need to avoid a forward declaration. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 1ee8d6f3bebbdaa7692732c91685b27ae4c612be Author: Vladimir Oltean Date: Wed Mar 31 23:08:52 2021 +0300 net: enetc: clean the TX software BD on the TX confirmation path With the future introduction of some new fields into enetc_tx_swbd such as is_xdp_tx, is_xdp_redirect etc, we need not only to set these bits to true from the XDP_TX/XDP_REDIRECT code path, but also to false from the old code paths. This is because TX software buffer descriptors are kept in a ring that is shadow of the hardware TX ring, so these structures keep getting reused, and there is always the possibility that when a software BD is reused (after we ran a full circle through the TX ring), the old user of the tx_swbd had set is_xdp_tx = true, and now we are sending a regular skb, which would need to set is_xdp_tx = false. To be minimally invasive to the old code paths, let's just scrub the software TX BD in the TX confirmation path (enetc_clean_tx_ring), once we know that nobody uses this software TX BD (tx_ring->next_to_clean hasn't yet been updated, and the TX paths check enetc_bd_unused which tells them if there's any more space in the TX ring for a new enqueue). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d504498d2eb3bfcbef4ddf3f51eb9f1391c8149f Author: Vladimir Oltean Date: Wed Mar 31 23:08:51 2021 +0300 net: enetc: add a dedicated is_eof bit in the TX software BD In the transmit path, if we have a scatter/gather frame, it is put into multiple software buffer descriptors, the last of which has the skb pointer populated (which is necessary for rearming the TX MSI vector and for collecting the two-step TX timestamp from the TX confirmation path). At the moment, this is sufficient, but with XDP_TX, we'll need to service TX software buffer descriptors that don't have an skb pointer, however they might be final nonetheless. So add a dedicated bit for final software BDs that we populate and check explicitly. Also, we keep looking just for an skb when doing TX timestamping, because we don't want/need that for XDP. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit a800abd3ecb9acc55821f7ac9bba6c956b36a595 Author: Vladimir Oltean Date: Wed Mar 31 23:08:50 2021 +0300 net: enetc: move skb creation into enetc_build_skb We need to build an skb from two code paths now: from the plain RX data path and from the XDP data path when the verdict is XDP_PASS. Create a new enetc_build_skb function which contains the essential steps for building an skb based on the first and last positions of buffer descriptors within the RX ring. We also squash the enetc_process_skb function into enetc_build_skb, because what that function did wasn't very meaningful on its own. The "rx_frm_cnt++" instruction has been moved around napi_gro_receive for cosmetic reasons, to be in the same spot as rx_byte_cnt++, which itself must be before napi_gro_receive, because that's when we lose ownership of the skb. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2fa423f5f0c6891effd4d5c8bdb91d418001da11 Author: Vladimir Oltean Date: Wed Mar 31 23:08:49 2021 +0300 net: enetc: consume the error RX buffer descriptors in a dedicated function We can and should check the RX BD errors before starting to build the skb. The only apparent reason why things are done in this backwards order is to spare one call to enetc_rxbd_next. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 0d7a7b2014b1a499a0fe24c9f3063d7856b5aaaf Author: Eric Dumazet Date: Wed Mar 31 14:38:11 2021 -0700 ipv6: remove extra dev_hold() for fallback tunnels My previous commits added a dev_hold() in tunnels ndo_init(), but forgot to remove it from special functions setting up fallback tunnels. Fallback tunnels do call their respective ndo_init() This leads to various reports like : unregister_netdevice: waiting for ip6gre0 to become free. Usage count = 2 Fixes: 48bb5697269a ("ip6_tunnel: sit: proper dev_{hold|put} in ndo_[un]init methods") Fixes: 6289a98f0817 ("sit: proper dev_{hold|put} in ndo_[un]init methods") Fixes: 40cb881b5aaa ("ip6_vti: proper dev_{hold|put} in ndo_[un]init methods") Fixes: 7f700334be9a ("ip6_gre: proper dev_{hold|put} in ndo_[un]init methods") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit ac1db7acea67777be1ba86e36e058c479eab6508 Author: Yang Yingliang Date: Wed Mar 31 16:36:02 2021 +0800 net/tipc: fix missing destroy_workqueue() on error in tipc_crypto_start() Add the missing destroy_workqueue() before return from tipc_crypto_start() in the error handling case. Fixes: 1ef6f7c9390f ("tipc: add automatic session key exchange") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit ab1b4f0a836f437d44f97cb8a6f444e4c5176cef Merge: 30b8817f5f7a6 0dd39d952f75a Author: David S. Miller Date: Wed Mar 31 14:48:20 2021 -0700 Merge branch 'inet-shrink-netns' Eric Dumazet says: ==================== inet: shrink netns_ipv{4|6} This patch series work on reducing footprint of netns_ipv4 and netns_ipv6. Some sysctls are converted to bytes, and some fields are moves to reduce number of holes and paddings. ==================== Signed-off-by: David S. Miller commit 0dd39d952f75a678b2ebcac8bd60f449f303c755 Author: Eric Dumazet Date: Wed Mar 31 10:52:13 2021 -0700 ipv6: move ip6_dst_ops first in netns_ipv6 ip6_dst_ops have cache line alignement. Moving it at beginning of netns_ipv6 removes a 48 byte hole, and shrinks netns_ipv6 from 12 to 11 cache lines. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit a6175633a2af0eae07127311563d2a75096c111a Author: Eric Dumazet Date: Wed Mar 31 10:52:12 2021 -0700 ipv6: convert elligible sysctls to u8 Convert most sysctls that can fit in a byte. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 1c3289c931740f235b29be5182e5f2dfb004593d Author: Eric Dumazet Date: Wed Mar 31 10:52:11 2021 -0700 tcp: convert tcp_comp_sack_nr sysctl to u8 tcp_comp_sack_nr max value was already 255. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7d4b37ebb934aa32a54666fe9153d127c33ff89a Author: Eric Dumazet Date: Wed Mar 31 10:52:10 2021 -0700 ipv4: convert igmp_link_local_mcast_reports sysctl to u8 This sysctl is a bool, can use less storage. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit be205fe6ec4ffd6875f69e61205163fb686a5c74 Author: Eric Dumazet Date: Wed Mar 31 10:52:09 2021 -0700 ipv4: convert fib_multipath_{use_neigh|hash_policy} sysctls to u8 Make room for better packing of netns_ipv4 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit cd04bd022258f4aa6e8392c8133dbbf31da0f12f Author: Eric Dumazet Date: Wed Mar 31 10:52:08 2021 -0700 ipv4: convert udp_l3mdev_accept sysctl to u8 Reduce footprint of sysctls. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit b2908fac5b7b23c03fa1d3e1055ad95ba305c871 Author: Eric Dumazet Date: Wed Mar 31 10:52:07 2021 -0700 ipv4: convert fib_notify_on_flag_change sysctl to u8 Reduce footprint of sysctls. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 490f33c4e70431d0a4d01666a6525fdd43299cde Author: Eric Dumazet Date: Wed Mar 31 10:52:06 2021 -0700 inet: shrink netns_ipv4 by another cache line By shuffling around some fields to remove 8 bytes of hole, we can save one cache line. pahole result before/after the patch : /* size: 768, cachelines: 12, members: 139 */ /* sum members: 673, holes: 11, sum holes: 39 */ /* padding: 56 */ /* paddings: 2, sum paddings: 7 */ /* forced alignments: 1 */ -> /* size: 704, cachelines: 11, members: 139 */ /* sum members: 673, holes: 10, sum holes: 31 */ /* paddings: 2, sum paddings: 7 */ /* forced alignments: 1 */ Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 1caf8d39c58f3f63193d02928c8dce3fa07cee52 Author: Eric Dumazet Date: Wed Mar 31 10:52:05 2021 -0700 inet: shrink inet_timewait_death_row by 48 bytes struct inet_timewait_death_row uses two cache lines, because we want tw_count to use a full cache line to avoid false sharing. Rework its definition and placement in netns_ipv4 so that: 1) We add 60 bytes of padding after tw_count to avoid false sharing, knowing that tcp_death_row will have ____cacheline_aligned_in_smp attribute. 2) We do not risk padding before tcp_death_row, because we move it at the beginning of netns_ipv4, even if new fields are added later. 3) We do not waste 48 bytes of padding after it. Note that I have not changed dccp. pahole result for struct netns_ipv4 before/after the patch : /* size: 832, cachelines: 13, members: 139 */ /* sum members: 721, holes: 12, sum holes: 95 */ /* padding: 16 */ /* paddings: 2, sum paddings: 55 */ -> /* size: 768, cachelines: 12, members: 139 */ /* sum members: 673, holes: 11, sum holes: 39 */ /* padding: 56 */ /* paddings: 2, sum paddings: 7 */ /* forced alignments: 1 */ Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit ab547c4fb39fe145b39e3013633258a5ff475d88 Author: Alexander Stein Date: Wed Feb 3 20:28:24 2021 +0100 arm64: dts: amlogic: Assign a fixed index to mmc devices Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in environments where UUIDs are not practical. Use newly introduced aliases for mmcblk devices from [1]. [1] https://patchwork.kernel.org/patch/11747669/ Commit message taken from commit 0011c6d18277 ("arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.") The unconventional order (B, C, A) is due to the fact that sd_emmc_a is (according to the comments) only used for SDIO. AFAICS all boards either have both sd_emmc_b and sd_emmc_c or only one of them enabled. So the alias order should match the previous non-async order for all of them. Signed-off-by: Alexander Stein Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210203192824.854491-1-alexander.stein@mailbox.org commit 30b8817f5f7a66151b7b772cb9a216706494aa2e Merge: 3cbf7530a163d 44d043b53d386 Author: David S. Miller Date: Wed Mar 31 14:34:09 2021 -0700 Merge branch 'net-coding-style' Weihang Li says: ==================== net: fix some coding style issues Do some cleanups according to the coding style of kernel, including wrong print type, redundant and missing spaces and so on. ==================== Signed-off-by: David S. Miller commit 44d043b53d3867523960f79c6a909c976e15f3f7 Author: Yangyang Li Date: Wed Mar 31 16:18:34 2021 +0800 net: lpc_eth: fix format warnings of block comments Fix the following format warning: 1. Block comments use * on subsequent lines 2. Block comments use a trailing */ on a separate line Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit 142c1d2ed96604ec09bbc4076d2a8d09271850d3 Author: Yixing Liu Date: Wed Mar 31 16:18:33 2021 +0800 net: toshiba: fix the trailing format of some block comments Use a trailling */ on a separate line for block comments. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit 1f78ff4ff7089b8265278d0bbf937fd8e5958dcf Author: Yixing Liu Date: Wed Mar 31 16:18:32 2021 +0800 net: ocelot: fix a trailling format issue with block comments Use a tralling */ on a separate line for block comments. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit 3f6ebcffaf673490ec95024a8d6e67b890cc53e2 Author: Yixing Liu Date: Wed Mar 31 16:18:31 2021 +0800 net: amd: correct some format issues There should be a blank line after declarations. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit ca3fc0aa08370260a1180ac4366cf58fbefc841c Author: Yixing Liu Date: Wed Mar 31 16:18:30 2021 +0800 net: amd8111e: fix inappropriate spaces Delete unncecessary spaces and add some reasonable spaces according to the coding-style of kernel. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit e355fa6a3f405d3a3a1d86f2e2e332fb3d4e05d8 Author: Yixing Liu Date: Wed Mar 31 16:18:29 2021 +0800 net: ena: remove extra words from comments Remove the redundant "for" from the commment. Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit b788ff0a7d7dc04da4c938d56cbe96c7fa261983 Author: Yixing Liu Date: Wed Mar 31 16:18:28 2021 +0800 net: ena: fix inaccurate print type Use "%u" to replace "hu%". Signed-off-by: Yixing Liu Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit 3cbf7530a163d048a6376cd22fecb9cdcb23b192 Author: Matthew Wilcox (Oracle) Date: Wed Mar 31 05:36:42 2021 +0100 qrtr: Convert qrtr_ports from IDR to XArray The XArray interface is easier for this driver to use. Also fixes a bug reported by the improper use of GFP_ATOMIC. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Manivannan Sadhasivam Signed-off-by: David S. Miller commit 53f7c5e1406110b9b8da4b7e2c66023a16bb8714 Author: Wan Jiabing Date: Wed Mar 31 10:35:53 2021 +0800 net: ethernet: stmicro: Remove duplicate struct declaration struct stmmac_safety_stats is declared twice. One has been declared at 29th line. Remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: David S. Miller commit a07cc1786dab69b896af226cf58163237837ee72 Author: Tony Nguyen Date: Tue Mar 2 10:15:43 2021 -0800 ice: Correct comment block style The following is reported by checkpatch, correct it. ----------------------------------------------- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h ----------------------------------------------- WARNING:NETWORKING_BLOCK_COMMENT_STYLE: networking block comments don't use an empty /* line, use /* Comment... FILE: drivers/net/ethernet/intel/ice/ice_adminq_cmd.h:1428: +/* + * Send to PF command (indirect 0x0801) ID is only used by PF Signed-off-by: Tony Nguyen Tested-by: Tony Brelinski commit 0c3e94c247938b63218e661fcd1a935edb0db215 Author: Bruce Allan Date: Tue Mar 2 10:15:42 2021 -0800 ice: cleanup style issues A few style issues reported by checkpatch have snuck into the code; resolve the style issues. COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses Signed-off-by: Bruce Allan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit e97fb1aea9056299d013aa30783d6a995136a2c8 Author: Anirudh Venkataramanan Date: Tue Mar 2 10:15:37 2021 -0800 ice: Consolidate VSI state and flags struct ice_vsi has two fields, state and flags which seem to be serving the same purpose. Consolidate them into one field 'state'. enum ice_state is used to represent state information of the PF. While some of these enum values can be use to represent VSI state, it makes more sense to represent VSI state with its own enum. So derive a new enum ice_vsi_state from ice_vsi_flags and ice_state and use it. Also rename enum ice_state to ice_pf_state for clarity. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit b66a972abb6b4a2fe8e0444ba2a2d3718c79d5ad Author: Brett Creeley Date: Tue Mar 2 10:15:36 2021 -0800 ice: Refactor ice_set/get_rss into LUT and key specific functions Currently ice_set/get_rss are used to set/get the RSS LUT and/or RSS key. However nearly everywhere these functions are called only the LUT or key are set/get. Also, making this change reduces how many things ice_set/get_rss are doing. Fix this by adding ice_set/get_rss_lut and ice_set/get_rss_key functions. Also, consolidate all calls for setting/getting the RSS LUT and RSS Key to use ice_set/get_rss_lut() and ice_set/get_rss_key(). Signed-off-by: Brett Creeley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit e3c53928a3b2b3ec983955a838547aa7344822be Author: Brett Creeley Date: Tue Mar 2 10:15:35 2021 -0800 ice: Refactor get/set RSS LUT to use struct parameter Update ice_aq_get_rss_lut() and ice_aq_set_rss_lut() to take a new structure ice_aq_get_set_rss_params instead of passing individual parameters. This is done for 2 reasons: 1. Reduce the number of parameters passed to the functions. 2. Reduce the amount of change required if the arguments ever need to be updated in the future. Also, reduce duplicate code that was checking for an invalid vsi_handle and lut parameter by moving the checks to the lower level __ice_aq_get_set_rss_lut(). Signed-off-by: Brett Creeley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 8134d5ff9788d3e7f63f963a211927a60ce462d6 Author: Brett Creeley Date: Tue Mar 2 10:15:33 2021 -0800 ice: Change ice_vsi_setup_q_map() to not depend on RSS Currently, ice_vsi_setup_q_map() depends on the VSI's rss_size. However, the Rx Queue Mapping section of the VSI context has no dependency on RSS. Instead, limit the maximum number of Rx queues per TC based on the Rx Queue mapping section of the VSI context, which currently allows for up to 256 Rx queues per TC. Signed-off-by: Brett Creeley Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 94a936981a3eae3f1e9d1bf02c32d3f559a7aa95 Author: Qi Zhang Date: Tue Mar 2 10:12:11 2021 -0800 ice: rename ptype bitmap Align all ptype bitmap to follow ice_ptypes_xxx prefix. Signed-off-by: Qi Zhang Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 36ac7911fae7575b8cebf9326a23901cba28c015 Author: Bruce Allan Date: Tue Mar 2 10:12:10 2021 -0800 ice: correct memory allocation call Use *malloc() instead of *calloc() when allocating only a single object as opposed to an array of objects. Signed-off-by: Bruce Allan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 805f980bfe0e7d07cd4cd5d1183722f0355c0f4a Author: Anirudh Venkataramanan Date: Tue Mar 2 10:12:09 2021 -0800 ice: Check for bail out condition early Check for bail out condition before calling ice_aq_sff_eeprom Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 800c1443cbe1bd17f11e3580744894c3ee1a5c8e Author: Bruce Allan Date: Tue Mar 2 10:12:08 2021 -0800 ice: remove unnecessary duplicated AQ command flag setting Commit a012dca9f7a2 ("ice: add ethtool -m support for reading i2c eeprom modules") unnecessarily added the ICE_AQ_FLAG_BUF flag to the descriptor when sending the indirect Read/Write SFF EEPROM AQ command. The flag is already added later in the code flow for all indirect AQ commands, i.e. commands that provide an additional data buffer. Signed-off-by: Bruce Allan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 5c57145a49bd93b72878ef9b4a1d798753b9faff Author: Paul Greenwalt Date: Tue Mar 2 10:12:07 2021 -0800 ice: change link misconfiguration message Change link misconfiguration message since the configuration could be intended by the user. Signed-off-by: Paul Greenwalt Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 2ec5638559c13b923250eccf495d2a033fccb3e7 Author: Paul M Stillwell Jr Date: Tue Mar 2 10:12:05 2021 -0800 ice: handle increasing Tx or Rx ring sizes There is an issue when the Tx or Rx ring size increases using 'ethtool -L ...' where the new rings don't get the correct ITR values because when we rebuild the VSI we don't know that some of the rings may be new. Fix this by looking at the original number of rings and determining if the rings in ice_vsi_rebuild_set_coalesce() were not present in the original rings received in ice_vsi_rebuild_get_coalesce(). Also change the code to return an error if we can't allocate memory for the coalesce data in ice_vsi_rebuild(). Signed-off-by: Paul M Stillwell Jr Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit a05983c3d024d173af0a80dc7197a21f64d52df6 Author: Dan Nowlin Date: Tue Mar 2 10:12:04 2021 -0800 ice: Update to use package info from ice segment There are two package versions in the package binary. Today, these two version numbers are the same. However, in the future that may change. Update code to use the package info from the ice segment metadata section, which is the package information that is actually downloaded to the firmware during the download package process. Signed-off-by: Dan Nowlin Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 1e23f076b25424508d4576fba176888944b9b2b0 Author: Anirudh Venkataramanan Date: Tue Mar 2 10:12:03 2021 -0800 ice: Delay netdev registration Once a netdev is registered, the corresponding network interface can be immediately used by userspace utilities (like say NetworkManager). This can be problematic if the driver technically isn't fully up yet. Move netdev registration to the end of probe, as by this time the driver data structures and device will be initialized as expected. However, delaying netdev registration causes a failure in the aRFS flow where netdev->reg_state == NETREG_REGISTERED condition is checked. It's not clear why this check was added to begin with, so remove it. Local testing didn't indicate any issues with this change. The state bit check in ice_open was put in as a stop-gap measure to prevent a premature interface up operation. This is no longer needed, so remove it. Signed-off-by: Anirudh Venkataramanan Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 634da4c118434cf8a0c5eabce9eb58502ef1521c Author: Benita Bose Date: Tue Mar 2 10:12:02 2021 -0800 ice: Add Support for XPS Enable and configure XPS. The driver code implemented sets up the Transmit Packet Steering Map, which in turn will be used by the kernel in queue selection during Tx. Signed-off-by: Benita Bose Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 48bb5697269a7cbe5194dbb044dc38c517e34c58 Author: Eric Dumazet Date: Mon Mar 29 23:45:51 2021 -0700 ip6_tunnel: sit: proper dev_{hold|put} in ndo_[un]init methods Same reasons than for the previous commits : 6289a98f0817 ("sit: proper dev_{hold|put} in ndo_[un]init methods") 40cb881b5aaa ("ip6_vti: proper dev_{hold|put} in ndo_[un]init methods") 7f700334be9a ("ip6_gre: proper dev_{hold|put} in ndo_[un]init methods") After adopting CONFIG_PCPU_DEV_REFCNT=n option, syzbot was able to trigger a warning [1] Issue here is that: - all dev_put() should be paired with a corresponding prior dev_hold(). - A driver doing a dev_put() in its ndo_uninit() MUST also do a dev_hold() in its ndo_init(), only when ndo_init() is returning 0. Otherwise, register_netdevice() would call ndo_uninit() in its error path and release a refcount too soon. [1] WARNING: CPU: 1 PID: 21059 at lib/refcount.c:31 refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31 Modules linked in: CPU: 1 PID: 21059 Comm: syz-executor.4 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31 Code: 1d 6a 5a e8 09 31 ff 89 de e8 8d 1a ab fd 84 db 75 e0 e8 d4 13 ab fd 48 c7 c7 a0 e1 c1 89 c6 05 4a 5a e8 09 01 e8 2e 36 fb 04 <0f> 0b eb c4 e8 b8 13 ab fd 0f b6 1d 39 5a e8 09 31 ff 89 de e8 58 RSP: 0018:ffffc900025aefe8 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000040000 RSI: ffffffff815c51f5 RDI: fffff520004b5def RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815bdf8e R11: 0000000000000000 R12: ffff888023488568 R13: ffff8880254e9000 R14: 00000000dfd82cfd R15: ffff88802ee2d7c0 FS: 00007f13bc590700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f0943e74000 CR3: 0000000025273000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_dec include/linux/refcount.h:344 [inline] refcount_dec include/linux/refcount.h:359 [inline] dev_put include/linux/netdevice.h:4135 [inline] ip6_tnl_dev_uninit+0x370/0x3d0 net/ipv6/ip6_tunnel.c:387 register_netdevice+0xadf/0x1500 net/core/dev.c:10308 ip6_tnl_create2+0x1b5/0x400 net/ipv6/ip6_tunnel.c:263 ip6_tnl_newlink+0x312/0x580 net/ipv6/ip6_tunnel.c:2052 __rtnl_newlink+0x1062/0x1710 net/core/rtnetlink.c:3443 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Fixes: 919067cc845f ("net: add CONFIG_PCPU_DEV_REFCNT") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit e3f685aa738c8914ba273834f4bd1e2774579026 Merge: 28110056f2d07 1da07e5db3564 Author: David S. Miller Date: Wed Mar 31 14:15:23 2021 -0700 Merge branch 'ethtool-fec-netlink' Jakub Kicinski says: ==================== ethtool: support FEC configuration over netlink This series adds support for the equivalents of ETHTOOL_GFECPARAM and ETHTOOL_SFECPARAM over netlink. As a reminder - this is an API which allows user to query current FEC mode, as well as set FEC manually if autoneg is disabled. It does not configure anything if autoneg is enabled (that said few/no drivers currently reject .set_fecparam calls while autoneg is disabled, hopefully FW will just ignore the settings). The existing functionality is mostly preserved in the new API. The ioctl interface uses a set of flags, and link modes to tell user which modes are supported. Here is how the flags translate to the new interface (skipping descriptions for actual FEC modes): ioctl flag | description | new API ================================================================ ETHTOOL_FEC_OFF | disabled (supported) | \ ETHTOOL_FEC_RS | | ` link mode bitset ETHTOOL_FEC_BASER | | / .._A_FEC_MODES ETHTOOL_FEC_LLRS | | / ETHTOOL_FEC_AUTO | pick based on cable | bool .._A_FEC_AUTO ETHTOOL_FEC_NONE | not supported | no bit, no AUTO reported Since link modes are already depended on (although somewhat implicitly) for expressing supported modes - the new interface uses them for the manual configuration, as well as uses link mode bit number to communicate the active mode. Use of link modes allows us to define any number of FEC modes we want, and reuse the strset we already have defined. Separating AUTO as its own attribute is the biggest changed compared to the ioctl. It means drivers can no longer report AUTO as the active FEC mode because there is no link mode for AUTO. active_fec == AUTO makes little sense in the first place IMHO, active_fec should be the actual mode, so hopefully this is fine. The other minor departure is that None is no longer explicitly expressed in the API. But drivers are reasonable in handling of this somewhat pointless bit, so I'm not expecting any issues there. One extension which could be considered would be moving active FEC to ETHTOOL_MSG_LINKMODE_*, but then why not move all of FEC into link modes? I don't know where to draw the line. netdevsim support and a simple self test are included. Next step is adding stats similar to the ones added for pause. ==================== Signed-off-by: David S. Miller , commit 1da07e5db3564789eb598bc772ea50b547194691 Author: Jakub Kicinski Date: Mon Mar 29 20:59:54 2021 -0700 selftests: ethtool: add a netdevsim FEC test Test FEC settings, iterate over configs. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 0d7f76dc11e6df6b883f625c8343aa8fa1f6874b Author: Jakub Kicinski Date: Mon Mar 29 20:59:53 2021 -0700 netdevsim: add FEC settings support Add support for ethtool FEC and some ethtool error injection. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 1e5d1f69d9fb8ea0679f9e85915e8e7fdacfbe7a Author: Jakub Kicinski Date: Mon Mar 29 20:59:52 2021 -0700 ethtool: support FEC settings over netlink Add FEC API to netlink. This is not a 1-to-1 conversion. FEC settings already depend on link modes to tell user which modes are supported. Take this further an use link modes for manual configuration. Old struct ethtool_fecparam is still used to talk to the drivers, so we need to translate back and forth. We can revisit the internal API if number of FEC encodings starts to grow. Enforce only one active FEC bit (by using a bit position rather than another mask). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit fb457e02f0ec09162734d7a0add1b0e39280c8d1 Merge: 2f835b5dd8f7f a4e5eed2c6a68 Author: Dave Airlie Date: Thu Apr 1 06:38:14 2021 +1000 Merge tag 'exynos-drm-next-for-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next One cleanup - Based on the patch[1], clean up the use of request_irq function series. [1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next-history.git/commit/?id=cbe16f35bee6880becca6f20d2ebf6b457148552 Signed-off-by: Dave Airlie From: Inki Dae Link: https://patchwork.freedesktop.org/patch/msgid/1617092998-23645-1-git-send-email-inki.dae@samsung.com commit 19c28b1374fb1073a9ec873a6c10bf5f16b10b9d Author: Pablo Neira Ayuso Date: Tue Mar 30 16:58:37 2021 +0200 netfilter: add helper function to set up the nfnetlink header and use it This patch adds a helper function to set up the netlink and nfnetlink headers. Update existing codebase to use it. Signed-off-by: Pablo Neira Ayuso commit 802b805162a1b7d8391c40ac8a878e9e63287aff Author: Pablo Neira Ayuso Date: Wed Mar 31 00:18:02 2021 +0200 netfilter: nftables: add helper function to set the base sequence number This patch adds a helper function to calculate the base sequence number field that is stored in the nfnetlink header. Use the helper function whenever possible. Signed-off-by: Pablo Neira Ayuso commit 7726c9ce71b047924ee55fe87b5cc10a8714d120 Author: Yang Yingliang Date: Mon Mar 29 21:55:41 2021 +0800 netfilter: nftables: remove unnecessary spin_lock_init() The spinlock nf_tables_destroy_list_lock is initialized statically. It is unnecessary to initialize by spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Pablo Neira Ayuso commit 8b9229d15877ec77775633f058d14145f6eb98fa Author: Pablo Neira Ayuso Date: Sun Mar 28 23:08:55 2021 +0200 netfilter: flowtable: dst_check() from garbage collector path Move dst_check() to the garbage collector path. Stale routes trigger the flow entry teardown state which makes affected flows go back to the classic forwarding path to re-evaluate flow offloading. IPv6 requires the dst cookie to work, store it in the flow_tuple, otherwise dst_check() always fails. Fixes: e5075c0badaa ("netfilter: flowtable: call dst_check() to fall back to classic forwarding") Signed-off-by: Pablo Neira Ayuso commit 5c701e71961af0ec8227ea615f1646dbe98aea1a Author: Wan Jiabing Date: Sat Mar 27 10:54:47 2021 +0800 netfilter: ipset: Remove duplicate declaration struct ip_set is declared twice. One is declared at 79th line, so remove the duplicate. Signed-off-by: Wan Jiabing Acked-by: Jozsef Kadlecsik Signed-off-by: Pablo Neira Ayuso commit c520292f29b8047285bcfbc2322fa2a9bf02521a Author: Richard Guy Briggs Date: Fri Mar 26 13:38:59 2021 -0400 audit: log nftables configuration change events once per table Reduce logging of nftables events to a level similar to iptables. Restore the table field to list the table, adding the generation. Indicate the op as the most significant operation in the event. A couple of sample events: type=PROCTITLE msg=audit(2021-03-18 09:30:49.801:143) : proctitle=/usr/bin/python3 -s /usr/sbin/firewalld --nofork --nopid type=SYSCALL msg=audit(2021-03-18 09:30:49.801:143) : arch=x86_64 syscall=sendmsg success=yes exit=172 a0=0x6 a1=0x7ffdcfcbe650 a2=0x0 a3=0x7ffdcfcbd52c items=0 ppid=1 pid=367 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=roo t sgid=root fsgid=root tty=(none) ses=unset comm=firewalld exe=/usr/bin/python3.9 subj=system_u:system_r:firewalld_t:s0 key=(null) type=NETFILTER_CFG msg=audit(2021-03-18 09:30:49.801:143) : table=firewalld:2 family=ipv6 entries=1 op=nft_register_table pid=367 subj=system_u:system_r:firewalld_t:s0 comm=firewalld type=NETFILTER_CFG msg=audit(2021-03-18 09:30:49.801:143) : table=firewalld:2 family=ipv4 entries=1 op=nft_register_table pid=367 subj=system_u:system_r:firewalld_t:s0 comm=firewalld type=NETFILTER_CFG msg=audit(2021-03-18 09:30:49.801:143) : table=firewalld:2 family=inet entries=1 op=nft_register_table pid=367 subj=system_u:system_r:firewalld_t:s0 comm=firewalld type=PROCTITLE msg=audit(2021-03-18 09:30:49.839:144) : proctitle=/usr/bin/python3 -s /usr/sbin/firewalld --nofork --nopid type=SYSCALL msg=audit(2021-03-18 09:30:49.839:144) : arch=x86_64 syscall=sendmsg success=yes exit=22792 a0=0x6 a1=0x7ffdcfcbe650 a2=0x0 a3=0x7ffdcfcbd52c items=0 ppid=1 pid=367 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=r oot sgid=root fsgid=root tty=(none) ses=unset comm=firewalld exe=/usr/bin/python3.9 subj=system_u:system_r:firewalld_t:s0 key=(null) type=NETFILTER_CFG msg=audit(2021-03-18 09:30:49.839:144) : table=firewalld:3 family=ipv6 entries=30 op=nft_register_chain pid=367 subj=system_u:system_r:firewalld_t:s0 comm=firewalld type=NETFILTER_CFG msg=audit(2021-03-18 09:30:49.839:144) : table=firewalld:3 family=ipv4 entries=30 op=nft_register_chain pid=367 subj=system_u:system_r:firewalld_t:s0 comm=firewalld type=NETFILTER_CFG msg=audit(2021-03-18 09:30:49.839:144) : table=firewalld:3 family=inet entries=165 op=nft_register_chain pid=367 subj=system_u:system_r:firewalld_t:s0 comm=firewalld The issue was originally documented in https://github.com/linux-audit/audit-kernel/issues/124 Signed-off-by: Richard Guy Briggs Acked-by: Paul Moore Signed-off-by: Pablo Neira Ayuso commit cefa31a9d46112c0706c218ea549bccf298a0068 Author: Florian Westphal Date: Thu Mar 25 18:25:12 2021 +0100 netfilter: nft_log: perform module load from nf_tables modprobe calls from the nf_logger_find_get() API causes deadlock in very special cases because they occur with the nf_tables transaction mutex held. In the specific case of nf_log, deadlock is via: A nf_tables -> transaction mutex -> nft_log -> modprobe -> nf_log_syslog \ -> pernet_ops rwsem -> wait for C B netlink event -> rtnl_mutex -> nf_tables transaction mutex -> wait for A C close() -> ip6mr_sk_done -> rtnl_mutex -> wait for B Earlier patch added NFLOG/xt_LOG module softdeps to avoid the need to load the backend module during a transaction. For nft_log we would have to add a softdep for both nfnetlink_log or nf_log_syslog, since we do not know in advance which of the two backends are going to be configured. This defers the modprobe op until after the transaction mutex is released. Tested-by: Phil Sutter Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit a38b5b56d6f4678a04c3c1943000953593391bf6 Author: Florian Westphal Date: Thu Mar 25 18:25:11 2021 +0100 netfilter: nf_log: add module softdeps xt_LOG has no direct dependency on the syslog-based logger, it relies on the nf_log core to probe the requested backend. Now that all syslog-based loggers reside in the same module, we can just add a soft dependency on nf_log_syslog and let modprobe take care of it. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit e465cccd0b9de113a81280bd52ee717bf5e3d1a2 Author: Florian Westphal Date: Thu Mar 25 18:25:10 2021 +0100 netfilter: nf_log_common: merge with nf_log_syslog Remove nf_log_common. Now that all per-af modules have been merged there is no longer a need to provide a helper module. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 77ccee96a67422ac05fc47327cac4e4287fd0d8a Author: Florian Westphal Date: Thu Mar 25 18:25:09 2021 +0100 netfilter: nf_log_bridge: merge with nf_log_syslog Provide bridge log support from nf_log_syslog. After the merge there is no need to load the "real packet loggers", all of them now reside in the same module. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit 0e5e0a5553768757be7b02f0135077b2ef1b4907 Author: Ismael Luceno Date: Wed Mar 31 18:35:41 2021 +0200 docs: reporting-issues: Remove reference to oldnoconfig Replace it with olddefconfig. oldnoconfig didn't do what the document suggests (it aliased to olddefconfig), and isn't available since 4.19. Ref: 04c459d20448 ("kconfig: remove oldnoconfig target") Ref: 312ee68752fa ("kconfig: announce removal of oldnoconfig if used") Signed-off-by: Ismael Luceno Link: https://lore.kernel.org/r/20210331163541.28356-1-ismael@iodev.co.uk Signed-off-by: Jonathan Corbet commit c5c1c700e2ea06f27ef3174387b412151ae0b395 Author: Wang Qing Date: Mon Mar 15 17:49:03 2021 +0800 doc: admin-guide: remove explanation of "watchdog/%u" "watchdog/%u" threads has be replaced by cpu_stop_work, which will mislead the reader. Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1615801744-31548-1-git-send-email-wangqing@vivo.com Signed-off-by: Jonathan Corbet commit 2f835b5dd8f7fc1e58d73fc2cd2ec33c2b054036 Merge: fe8a057839fc4 e1a5e6a8c48bf Author: Dave Airlie Date: Thu Apr 1 06:24:05 2021 +1000 Merge tag 'topic/i915-gem-next-2021-03-26' of ssh://git.freedesktop.org/git/drm/drm into drm-next special i915-gem-next pull as requested - Conversion to dma_resv_locking, obj->mm.lock is gone (Maarten, with help from Thomas Hellström) - watchdog (Tvrtko, one patch to cancel individual request from Chris) - legacy ioctl cleanup (Jason+Ashutosh) - i915-gem TODO and RFC process doc (me) - i915_ prefix for vma_lookup (Liam Howlett) just because I spotted it and put it in here too Signed-off-by: Dave Airlie From: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/YF24MHoOSjpKFEXA@phenom.ffwll.local commit 8be594b22adfbc1132bc12c76215160a67931e0c Author: Randy Dunlap Date: Wed Mar 17 19:52:26 2021 -0700 Documentation: filesystems api-summary: add namespace.c Add fs/namespace.c to the filesystems api-summary docbook. Signed-off-by: Randy Dunlap Cc: Alexander Viro Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210318025227.4162-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 1f287bc4e2d073455bc21ed168ee3f67a75178b6 Author: Randy Dunlap Date: Wed Mar 17 19:52:25 2021 -0700 fs/namespace: correct/improve kernel-doc notation Fix kernel-doc warnings in fs/namespace.c: ./fs/namespace.c:1379: warning: Function parameter or member 'm' not described in 'may_umount_tree' ./fs/namespace.c:1379: warning: Excess function parameter 'mnt' description in 'may_umount_tree' ./fs/namespace.c:1950: warning: Function parameter or member 'path' not described in 'clone_private_mount' Also convert path_is_mountpoint() comments to kernel-doc. Signed-off-by: Randy Dunlap Allegedly-acked-by: Al Viro Link: https://lore.kernel.org/r/20210318025227.4162-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit c0a744dcaa29e9537e8607ae9c965ad936124a4d Author: Gustavo A. R. Silva Date: Tue Mar 23 17:48:58 2021 -0500 UAPI: nfsfh.h: 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]. Use an anonymous union with a couple of anonymous structs in order to keep userspace unchanged: $ pahole -C nfs_fhbase_new fs/nfsd/nfsfh.o struct nfs_fhbase_new { union { struct { __u8 fb_version_aux; /* 0 1 */ __u8 fb_auth_type_aux; /* 1 1 */ __u8 fb_fsid_type_aux; /* 2 1 */ __u8 fb_fileid_type_aux; /* 3 1 */ __u32 fb_auth[1]; /* 4 4 */ }; /* 0 8 */ struct { __u8 fb_version; /* 0 1 */ __u8 fb_auth_type; /* 1 1 */ __u8 fb_fsid_type; /* 2 1 */ __u8 fb_fileid_type; /* 3 1 */ __u32 fb_auth_flex[0]; /* 4 0 */ }; /* 0 4 */ }; /* 0 8 */ /* size: 8, cachelines: 1, members: 1 */ /* last cacheline: 8 bytes */ }; Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warnings: fs/nfsd/nfsfh.c: In function ‘nfsd_set_fh_dentry’: fs/nfsd/nfsfh.c:191:41: warning: array subscript 1 is above array bounds of ‘__u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 191 | ntohl((__force __be32)fh->fh_fsid[1]))); | ~~~~~~~~~~~^~~ ./include/linux/kdev_t.h:12:46: note: in definition of macro ‘MKDEV’ 12 | #define MKDEV(ma,mi) (((ma) << MINORBITS) | (mi)) | ^~ ./include/uapi/linux/byteorder/little_endian.h:40:26: note: in expansion of macro ‘__swab32’ 40 | #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x)) | ^~~~~~~~ ./include/linux/byteorder/generic.h:136:21: note: in expansion of macro ‘__be32_to_cpu’ 136 | #define ___ntohl(x) __be32_to_cpu(x) | ^~~~~~~~~~~~~ ./include/linux/byteorder/generic.h:140:18: note: in expansion of macro ‘___ntohl’ 140 | #define ntohl(x) ___ntohl(x) | ^~~~~~~~ fs/nfsd/nfsfh.c:191:8: note: in expansion of macro ‘ntohl’ 191 | ntohl((__force __be32)fh->fh_fsid[1]))); | ^~~~~ fs/nfsd/nfsfh.c:192:32: warning: array subscript 2 is above array bounds of ‘__u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 192 | fh->fh_fsid[1] = fh->fh_fsid[2]; | ~~~~~~~~~~~^~~ fs/nfsd/nfsfh.c:192:15: warning: array subscript 1 is above array bounds of ‘__u32[1]’ {aka ‘unsigned int[1]’} [-Warray-bounds] 192 | fh->fh_fsid[1] = fh->fh_fsid[2]; | ~~~~~~~~~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Chuck Lever commit e3eded5e81c4df60006e94614ec645da089e35e7 Author: Chuck Lever Date: Mon Mar 1 10:44:49 2021 -0500 svcrdma: Clean up dto_q critical section in svc_rdma_recvfrom() This, to me, seems less cluttered and less redundant. I was hoping it could help reduce lock contention on the dto_q lock by reducing the size of the critical section, but alas, the only improvement is readability. Signed-off-by: Chuck Lever commit 5533c4f4b996b7fc36d16b5e0807ebbc08c93af4 Author: Chuck Lever Date: Wed Jan 13 09:31:50 2021 -0500 svcrdma: Remove svc_rdma_recv_ctxt::rc_pages and ::rc_arg These fields are no longer used. The size of struct svc_rdma_recv_ctxt is now less than 300 bytes on x86_64, down from 2440 bytes. Signed-off-by: Chuck Lever commit 9af723be863904c746a6a6bf4f3686087b16b9ff Author: Chuck Lever Date: Wed Dec 30 12:43:34 2020 -0500 svcrdma: Remove sc_read_complete_q Now that svc_rdma_recvfrom() waits for Read completion, sc_read_complete_q is no longer used. Signed-off-by: Chuck Lever commit 7d81ee8722d69f753c88e7d594790fa10a384f1a Author: Chuck Lever Date: Tue Dec 22 13:22:20 2020 -0500 svcrdma: Single-stage RDMA Read Currently the generic RPC server layer calls svc_rdma_recvfrom() twice to retrieve an RPC message that uses Read chunks. I'm not exactly sure why this design was chosen originally. Instead, let's wait for the Read chunk completion inline in the first call to svc_rdma_recvfrom(). The goal is to eliminate some page allocator churn. rdma_read_complete() replaces pages in the second svc_rqst by calling put_page() repeatedly while the upper layer waits for the request to be constructed, which adds unnecessary NFS WRITE round- trip latency. Signed-off-by: Chuck Lever Reviewed-by: Tom Talpey commit 2ae7bb570e5d8b2da4b281fe7fae5c3de411f287 Author: Mauro Carvalho Chehab Date: Thu Mar 25 11:38:27 2021 +0100 scripts: get_abi: ignore code blocks for cross-references The script should not generate cross-references inside literal blocks. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a590f994f8a5742db333bde69e88241a080e4fe0.1616668017.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit c27c2e34412f8ca36ed1d8beb248d132aaf0016a Author: Mauro Carvalho Chehab Date: Thu Mar 25 11:38:26 2021 +0100 scripts: get_abi.pl: parse description line per line Change the description parsing logic in rst mode in order to parse it line per line. The end result is the same, but doing line per line allows to add some code to escape literal blocks when seeking for cross-references. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/d33cfa2e59ecf8f28d4ed7de7402468cf2168921.1616668017.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 87ec9ea1fc27a6475ef09cf221c42943fa418f47 Author: Mauro Carvalho Chehab Date: Thu Mar 25 11:38:25 2021 +0100 scripts: get_abi.pl: extend xref match to other types Currently, there are "What:" symbols for more than just /sys. Extend the regex to also cover configfs, /proc /dev and /kvd symbols. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/a1c7e2b2c37ed6e111dfc8641deb37ed96375a63.1616668017.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 50ebf8f4933ec27f0dc8c3b46c72894b14de0018 Author: Mauro Carvalho Chehab Date: Thu Mar 25 11:38:24 2021 +0100 get_abi.pl: fix xref boundaries There are some issues with the regex that seeks for What: cross references: basically, it is mis-identifying the start and the end boundaries of the regex, which causes :ref: to be inseerted for the wrong symbols at the wrong places. Fix it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/79a14d2518499b76931b5f29c50979987108152d.1616668017.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit d3e6b2235e46a34f3d6b08283d1a817aeff0c757 Author: Mauro Carvalho Chehab Date: Thu Mar 25 11:38:23 2021 +0100 get_abi.pl: seek for all occurrences for Documentation/ABI Instead of retrieving just one match at most, ensure that the entire description will be parsed. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/17019b73e106d1b1b353b8880ed189bad3604c13.1616668017.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit b0f9580a88803472d7c05d89365902a64f076df4 Author: Mauro Carvalho Chehab Date: Thu Mar 25 11:38:22 2021 +0100 scripts: get_abi.pl: better handle escape chars on what: The parser for the symbols defined on What: doesn't cover all chars that need to be scaped, like '{' and '}'. Change the logic to be more generic, and ensure that the same regex will be used on both What: and when parsing the cross-references. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/29cb56def89b508fe605bcd2ba74a4376cc08e35.1616668017.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 2bb5baf9d22764fff6baca4c3ad93055848bbf03 Author: Alex Shi Date: Fri Mar 26 16:49:31 2021 +0800 Docs/zh_CN: update Alex Shi new email address I am leaving Alibaba, udpate the old email address to new one. Signed-off-by: Alex Shi Cc: Harry Wei Cc: Alex Shi Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1616748571-52058-2-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Jonathan Corbet commit 5225df1872447a9110b18529e341caedeb08a1cf Author: Alex Shi Date: Fri Mar 26 16:49:30 2021 +0800 mailmap: update email address for Alex Shi Add my kernel.org address for old email address. Signed-off-by: Alex Shi Cc: Andrew Morton Cc: Jonathan Corbet Cc: Kees Cook Cc: Leon Romanovsky Cc: Thomas Bogendoerfer Cc: Alexander Lobakin Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/1616748571-52058-1-git-send-email-alex.shi@linux.alibaba.com Signed-off-by: Jonathan Corbet commit f8b427772a0e9bd20cfd9029f7824b39fef44c70 Author: He Ying Date: Fri Mar 26 06:08:53 2021 -0400 docs: powerpc: Fix misspellings and grammar errors Reported-by: Hulk Robot Signed-off-by: He Ying Acked-by: Michael Ellerman Link: https://lore.kernel.org/r/20210326100853.173586-1-heying24@huawei.com Signed-off-by: Jonathan Corbet commit abb9c078853d0c84f749d272f618a64fb3a27215 Author: Mark O'Donovan Date: Sun Mar 28 16:28:37 2021 +0100 Documentation: Add leading slash to some paths Change multiple sys/xyz to /sys/xyz Signed-off-by: Mark O'Donovan Link: https://lore.kernel.org/r/20210328152837.73347-1-shiftee@posteo.net Signed-off-by: Jonathan Corbet commit 58c539453b71684a1fe4dfe524dbda6e05355afd Author: Thorsten Leemhuis Date: Tue Mar 30 16:13:07 2021 +0200 docs: reporting-issues: reduce quoting and assorted fixes A pile of small fixes: - don't quote terms like vanilla, mainline, and stable, unless in they occur in places where readers new to the kernel might see them for the first time - make people rule out that vendor patches are interfering if they face a regression in a stable or longterm kernel they saw in a vendor kernel for the first time - s/bugs/issues/ in a selected spots - exchange two headlines that got mixed up somehow - add a few links to some of the steps in the guide - Greg mentioned sending reports to the stable mailing list is sufficient, so remove the "CC stable maintainers" bits - fix a few typos and mistakes in the text, with a few very small improvements along the way Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/07bca15d8465b8e234537feb8841dd2ff20243bc.1617113469.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 4d2f46a8cdb135f4eb2e427d3165abcb028e7cbe Author: Thorsten Leemhuis Date: Tue Mar 30 16:13:06 2021 +0200 docs: reporting-issues.rst: reshuffle and improve TLDR Make the TLDR a bit shorter while improving it at the same time by going straight to the aspects readers are more interested it. The change makes the process especially more straight-forward for people that hit a regression in a stable or longterm kernel. Due to the changes the TLDR now also matches the step by step guide better. Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/762ccd7735315d2fdaa79612fccc1f474881118b.1617113469.git.linux@leemhuis.info [ jc: fixed transposed _` as noted by Thorsten ] Signed-off-by: Jonathan Corbet commit b6cbd9167d442389614c079b7a8816d952114b90 Author: Tudor Ambarus Date: Mon Mar 22 09:51:31 2021 +0200 mtd: spi-nor: swp: Improve code around spi_nor_check_lock_status_sr() - bool return value for spi_nor_check_lock_status_sr(), gets rid of the return 1, - introduce temporary variables for better readability. Suggested-by: Joe Perches Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Reviewed-by: Michael Walle Link: https://lore.kernel.org/r/20210322075131.45093-3-tudor.ambarus@microchip.com commit c4c795105f2924c80752c30ffd3c7029a8e0ef28 Author: Tudor Ambarus Date: Mon Mar 22 09:51:30 2021 +0200 mtd: spi-nor: Move Software Write Protection logic out of the core It makes the core file a bit smaller and provides better separation between the Software Write Protection features and the core logic. All the next generic software write protection features (e.g. Individual Block Protection) will reside in swp.c. Signed-off-by: Tudor Ambarus Reviewed-by: Michael Walle Acked-by: Pratyush Yadav Link: https://lore.kernel.org/r/20210322075131.45093-2-tudor.ambarus@microchip.com commit d8d13934ccecbe141d198e0aa01a313fcdf01172 Author: Thorsten Leemhuis Date: Tue Mar 30 16:13:05 2021 +0200 MAINTAINERS: add entry for Documentation/admin-guide/reporting-issues.rst Thorsten will keep an eye on the new document about reporting issues (aka bugs). Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/c8d55ec74d104b90fdb9c155bca3b407e8480fb3.1617113469.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit d2ce285378b09287b9d5e9353ef4f0867a10ac5e Author: Thorsten Leemhuis Date: Tue Mar 30 16:13:04 2021 +0200 docs: make reporting-issues.rst official and delete reporting-bugs.rst Remove the WIP and two FIXME notes in the text to make it official, as it's now considered fully ready for consumption. To make sure this step is okay for people the intent of this change and the latest version of the text were posted to ksummit-discuss; nobody complained, thus lets move ahead. Add a footer to point out people can contact Thorsten directly in case they find something to improve in the text. Dear reporting-bugs.rst, I'm sorry to tell you, but that makes you fully obsolete and we thus have to let you go now. Thank you very much for your service, you in one form or another have been around for a long time. I'm sure over the years you got read a lot and helped quite a few people. But it's time to retire now. Rest in peace. Signed-off-by: Thorsten Leemhuis Reviewed-by: Greg Kroah-Hartman CC: Harry Wei CC: Alex Shi CC: Federico Vaga CC: Greg KH Link: https://lore.kernel.org/r/49c674c2d304d87e6259063580fda05267e8c348.1617113469.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit d4b61e17e2e49c7146e7b96e17aef0b42c3ba90a Author: Masahiro Yamada Date: Tue Mar 2 23:18:22 2021 +0900 docs: Remove make headers_check from checklist in translations Commit 1a63f9cce7b7 ("docs: Remove make headers_check from checklist") fixed only the English version. Let's fix the translated variants too. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210302141822.504773-1-masahiroy@kernel.org Signed-off-by: Jonathan Corbet commit e27bfefb21f28d5295432f042b5d9d7871100c35 Author: Stanislav Fomichev Date: Mon Mar 29 15:31:43 2021 -0700 tools/resolve_btfids: Fix warnings * make eprintf static, used only in main.c * initialize ret in eprintf * remove unused *tmp v3: * remove another err (Song Liu) v2: * remove unused 'int err = -1' Signed-off-by: Stanislav Fomichev Signed-off-by: Andrii Nakryiko Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210329223143.3659983-1-sdf@google.com commit 79d056976485baaa6225ff2331b83084051c98a8 Author: Bhaumik Bhatt Date: Wed Mar 31 11:34:25 2021 -0700 bus: mhi: core: Move to polling method to wait for MHI ready In certain devices, it is likely that there is no incoming MHI interrupt for a transition to MHI READY state. One such example is the move from Pass Through to an SBL or AMSS execution environment. In order to facilitate faster bootup times as there is no need to wait until timeout_ms completes, MHI host can poll every 25 milliseconds to check if device has entered MHI READY until a maximum timeout of twice the timeout_ms is reached. Signed-off-by: Bhaumik Bhatt Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617215665-19593-3-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 1a42aef2588052c4e3f7df241b947425641f05c9 Author: Bhaumik Bhatt Date: Wed Mar 31 11:34:24 2021 -0700 bus: mhi: core: Introduce internal register poll helper function Introduce helper function to allow MHI core driver to poll for a value in a register field. This helps reach a common path to read and poll register values along with a retry time interval. Signed-off-by: Bhaumik Bhatt Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617215665-19593-2-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit b1f27f688f716956e0b1c75d947a8bf22ed82ddc Author: Kamal Heib Date: Wed Mar 31 13:20:43 2021 +0300 RDMA/rxe: Remove rxe_dma_device declaration The function isn't implemented - delete the declaration. Fixes: a9d2e9ae953f ("RDMA/siw,rxe: Make emulated devices virtual in the device tree") Link: https://lore.kernel.org/r/20210331102043.691950-1-kamalheib1@gmail.com Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe commit 2e919a32ae1150208251129480370fd44a624a55 Author: Tang Yizhou Date: Wed Mar 31 10:01:05 2021 +0800 RDMA/iw_cxgb4: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Link: https://lore.kernel.org/r/20210331020105.4858-1-tangyizhou@huawei.com Reported-by: Hulk Robot Signed-off-by: Tang Yizhou Signed-off-by: Jason Gunthorpe commit 0a0b5f4b43671f8f128eb438edacee0a1d113385 Author: Heiner Kallweit Date: Tue Mar 30 12:43:18 2021 -0500 ARM: iop32x: disable N2100 PCI parity reporting On the N2100, instead of just marking the r8169 chips as having broken_parity_status, disable parity error reporting for them entirely. This was the only relevant place that set broken_parity_status, so we no longer need to check for it in the r8169 error interrupt handler. [bhelgaas: squash into one patch, commit log] Link: https://lore.kernel.org/r/20210330174318.1289680-4-helgaas@kernel.org Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit d06a113fec57b2c012b94241af4a1bc5656458a2 Author: Heiner Kallweit Date: Tue Mar 30 12:43:17 2021 -0500 IB/mthca: Disable parity reporting For Mellanox Tavor devices, we previously set dev->broken_parity_status, which does not change the device's behavior; it merely prevents the EDAC PCI error reporting from warning about Master Data Parity Error, Signaled System Error, or Detected Parity Error for this device. Instead, disable Parity Error Response so the device doesn't report parity errors in the first place. [bhelgaas: split out pci_disable_parity(), commit log, keep quirk static] Link: https://lore.kernel.org/r/20210330174318.1289680-3-helgaas@kernel.org Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 1fd3dde5e270ad08f1406f921c9a2cda154fcea9 Author: Bjorn Helgaas Date: Tue Mar 30 12:43:16 2021 -0500 PCI: Add pci_disable_parity() Add pci_disable_parity() to disable reporting of parity errors for a device by clearing PCI_COMMAND_PARITY. The device will still set PCI_STATUS_DETECTED_PARITY when it detects a parity error or receives a Poisoned TLP, but it will not set PCI_STATUS_PARITY, which means it will not assert PERR# (conventional PCI) or report Poisoned TLPs (PCIe). Based-on: https://lore.kernel.org/linux-arm-kernel/d375987c-ea4f-dd98-4ef8-99b2fbfe7c33@gmail.com/ Based-on-patch-by: Heiner Kallweit Link: https://lore.kernel.org/r/20210330174318.1289680-2-helgaas@kernel.org Signed-off-by: Bjorn Helgaas commit 9d843e8fafc7c0b15d8f511d146c0c3d7c816634 Author: Mukesh Ojha Date: Tue Mar 23 00:12:17 2021 +0530 pstore: Add mem_type property DT parsing support There could be a scenario where we define some region in normal memory and use them store to logs which is later retrieved by bootloader during warm reset. In this scenario, we wanted to treat this memory as normal cacheable memory instead of default behaviour which is an overhead. Making it cacheable could improve performance. This commit gives control to change mem_type from Device tree, and also documents the value for normal memory. Signed-off-by: Mukesh Ojha Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/1616438537-13719-1-git-send-email-mojha@codeaurora.org commit c770d8631e1810d8f1ce21b18ad5dd67eeb39e5c Author: Jay Fang Date: Sat Mar 27 17:10:00 2021 +0800 spi: Add HiSilicon SPI Controller Driver for Kunpeng SoCs This driver supports SPI Controller for HiSilicon Kunpeng SoCs. This driver supports SPI operations using FIFO mode of transfer. DMA is not supported, and we just use IRQ mode for operation completion notification. Only ACPI firmware is supported. Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616836200-45827-1-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit bb0f78e59777d55e0065d16d070b5d43ae80b769 Author: Bhaskar Chowdhury Date: Tue Mar 23 02:31:05 2021 +0530 ASoC: Intel: Fix a typo s/defintions/definitions/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210322210105.1575758-1-unixbhaskar@gmail.com Signed-off-by: Mark Brown commit b4d09a01666fdcab8866f44b72f79e106f14a48d Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:27 2021 -0500 ASoC: ux500: mop500: align function prototype cppcheck warning: sound/soc/ux500/mop500_ab8500.c:360:60: style:inconclusive: Function 'mop500_ab8500_machine_init' argument 1 names different: declaration 'runtime' definition 'rtd'. [funcArgNamesDifferent] int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd) ^ sound/soc/ux500/mop500_ab8500.h:16:60: note: Function 'mop500_ab8500_machine_init' argument 1 names different: declaration 'runtime' definition 'rtd'. int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *runtime); ^ sound/soc/ux500/mop500_ab8500.c:360:60: note: Function 'mop500_ab8500_machine_init' argument 1 names different: declaration 'runtime' definition 'rtd'. int mop500_ab8500_machine_init(struct snd_soc_pcm_runtime *rtd) ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5b920abeea03302e561b036181a6a5be4e53a584 Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:26 2021 -0500 ASoC: ux500: mop500: rename shadowing variable cppcheck warning: sound/soc/ux500/mop500.c:143:23: style: Local variable 'mop500_card' shadows outer variable [shadowVariable] struct snd_soc_card *mop500_card = platform_get_drvdata(pdev); ^ sound/soc/ux500/mop500.c:54:28: note: Shadowed declaration static struct snd_soc_card mop500_card = { ^ sound/soc/ux500/mop500.c:143:23: note: Shadow variable struct snd_soc_card *mop500_card = platform_get_drvdata(pdev); ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3d37b27fffb311c521d61144e57ea4d40e31ab9b Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:25 2021 -0500 ASoC: ti: omap-mcsp: remove duplicate test cppcheck warning: sound/soc/ti/omap-mcbsp.c:379:11: style: The if condition is the same as the previous if condition [duplicateCondition] if (mcbsp->irq) { ^ sound/soc/ti/omap-mcbsp.c:376:11: note: First condition if (mcbsp->irq) ^ sound/soc/ti/omap-mcbsp.c:379:11: note: Second condition if (mcbsp->irq) { ^ Keeping two separate tests was probably intentional for clarity, but since this generates warnings we might as well make cppcheck happy so that we have fewer warnings. Signed-off-by: Pierre-Louis Bossart Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210326215927.936377-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 248d4dc9c3b8ced2cb274581d1c306e7ec617aec Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:24 2021 -0500 ASoC: ti: omap-abe-twl6040: remove useless assignment cppcheck warning: sound/soc/ti/omap-abe-twl6040.c:173:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Peter Ujfalusi Link: https://lore.kernel.org/r/20210326215927.936377-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 53567ebce407639e3657b5c232bd60970a66f82c Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:23 2021 -0500 ASoC: tegra: tegra20_das: align function prototypes cppcheck warnings: sound/soc/tegra/tegra20_das.c:35:40: style:inconclusive: Function 'tegra20_das_connect_dap_to_dac' argument 1 names different: declaration 'dap_id' definition 'dap'. [funcArgNamesDifferent] int tegra20_das_connect_dap_to_dac(int dap, int dac) ^ sound/soc/tegra/tegra20_das.h:98:47: note: Function 'tegra20_das_connect_dap_to_dac' argument 1 names different: declaration 'dap_id' definition 'dap'. extern int tegra20_das_connect_dap_to_dac(int dap_id, int dac_sel); ^ sound/soc/tegra/tegra20_das.c:35:40: note: Function 'tegra20_das_connect_dap_to_dac' argument 1 names different: declaration 'dap_id' definition 'dap'. int tegra20_das_connect_dap_to_dac(int dap, int dac) ^ sound/soc/tegra/tegra20_das.c:35:49: style:inconclusive: Function 'tegra20_das_connect_dap_to_dac' argument 2 names different: declaration 'dac_sel' definition 'dac'. [funcArgNamesDifferent] int tegra20_das_connect_dap_to_dac(int dap, int dac) ^ sound/soc/tegra/tegra20_das.h:98:59: note: Function 'tegra20_das_connect_dap_to_dac' argument 2 names different: declaration 'dac_sel' definition 'dac'. extern int tegra20_das_connect_dap_to_dac(int dap_id, int dac_sel); ^ sound/soc/tegra/tegra20_das.c:35:49: note: Function 'tegra20_das_connect_dap_to_dac' argument 2 names different: declaration 'dac_sel' definition 'dac'. int tegra20_das_connect_dap_to_dac(int dap, int dac) ^ sound/soc/tegra/tegra20_das.c:53:40: style:inconclusive: Function 'tegra20_das_connect_dap_to_dap' argument 1 names different: declaration 'dap_id' definition 'dap'. [funcArgNamesDifferent] int tegra20_das_connect_dap_to_dap(int dap, int otherdap, int master, ^ sound/soc/tegra/tegra20_das.h:108:47: note: Function 'tegra20_das_connect_dap_to_dap' argument 1 names different: declaration 'dap_id' definition 'dap'. extern int tegra20_das_connect_dap_to_dap(int dap_id, int other_dap_sel, ^ sound/soc/tegra/tegra20_das.c:53:40: note: Function 'tegra20_das_connect_dap_to_dap' argument 1 names different: declaration 'dap_id' definition 'dap'. int tegra20_das_connect_dap_to_dap(int dap, int otherdap, int master, ^ sound/soc/tegra/tegra20_das.c:53:49: style:inconclusive: Function 'tegra20_das_connect_dap_to_dap' argument 2 names different: declaration 'other_dap_sel' definition 'otherdap'. [funcArgNamesDifferent] int tegra20_das_connect_dap_to_dap(int dap, int otherdap, int master, ^ sound/soc/tegra/tegra20_das.h:108:59: note: Function 'tegra20_das_connect_dap_to_dap' argument 2 names different: declaration 'other_dap_sel' definition 'otherdap'. extern int tegra20_das_connect_dap_to_dap(int dap_id, int other_dap_sel, ^ sound/soc/tegra/tegra20_das.c:53:49: note: Function 'tegra20_das_connect_dap_to_dap' argument 2 names different: declaration 'other_dap_sel' definition 'otherdap'. int tegra20_das_connect_dap_to_dap(int dap, int otherdap, int master, ^ sound/soc/tegra/tegra20_das.c:75:40: style:inconclusive: Function 'tegra20_das_connect_dac_to_dap' argument 1 names different: declaration 'dac_id' definition 'dac'. [funcArgNamesDifferent] int tegra20_das_connect_dac_to_dap(int dac, int dap) ^ sound/soc/tegra/tegra20_das.h:118:47: note: Function 'tegra20_das_connect_dac_to_dap' argument 1 names different: declaration 'dac_id' definition 'dac'. extern int tegra20_das_connect_dac_to_dap(int dac_id, int dap_sel); ^ sound/soc/tegra/tegra20_das.c:75:40: note: Function 'tegra20_das_connect_dac_to_dap' argument 1 names different: declaration 'dac_id' definition 'dac'. int tegra20_das_connect_dac_to_dap(int dac, int dap) ^ sound/soc/tegra/tegra20_das.c:75:49: style:inconclusive: Function 'tegra20_das_connect_dac_to_dap' argument 2 names different: declaration 'dap_sel' definition 'dap'. [funcArgNamesDifferent] int tegra20_das_connect_dac_to_dap(int dac, int dap) ^ sound/soc/tegra/tegra20_das.h:118:59: note: Function 'tegra20_das_connect_dac_to_dap' argument 2 names different: declaration 'dap_sel' definition 'dap'. extern int tegra20_das_connect_dac_to_dap(int dac_id, int dap_sel); ^ sound/soc/tegra/tegra20_das.c:75:49: note: Function 'tegra20_das_connect_dac_to_dap' argument 2 names different: declaration 'dap_sel' definition 'dap'. int tegra20_das_connect_dac_to_dap(int dac, int dap) ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20210326215927.936377-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1bc6d7a90b01e30123578761f5e70548ad894445 Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:22 2021 -0500 ASoC: tegra: tegra20_das: clarify expression cppcheck warning: sound/soc/tegra/tegra20_das.c:64:60: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] reg = otherdap << TEGRA20_DAS_DAP_CTRL_SEL_DAP_CTRL_SEL_P | ^ sound/soc/tegra/tegra20_das.c:65:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] !!sdata2rx << TEGRA20_DAS_DAP_CTRL_SEL_DAP_SDATA2_TX_RX_P | ^ sound/soc/tegra/tegra20_das.c:66:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] !!sdata1rx << TEGRA20_DAS_DAP_CTRL_SEL_DAP_SDATA1_TX_RX_P | ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Thierry Reding Link: https://lore.kernel.org/r/20210326215927.936377-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 54f78aebe803b12e06d49988be88d87823ca16ab Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:21 2021 -0500 ASoC: sunxi: sun8i-codec: clarify expression cppcheck warning: sound/soc/sunxi/sun8i-codec.c:488:28: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] return sample_rate % 4000 ? 22579200 : 24576000; ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Maxime Ripard Link: https://lore.kernel.org/r/20210326215927.936377-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 11033e51b31696fd7949f1abb558cba171ecf0f5 Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:20 2021 -0500 ASoC: stm: stm32_adfsdm: fix snprintf format string cppcheck warning: sound/soc/stm/stm32_adfsdm.c:120:2: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] snprintf(str_freq, sizeof(str_freq), "%d\n", freq); ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 00a820086ddd8c6f3eeeca3a034d234cebf084ba Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:19 2021 -0500 ASoC: sti: uniperif: align function prototypes cppcheck warning: sound/soc/sti/uniperif_player.c:1049:24: style:inconclusive: Function 'uni_player_init' argument 2 names different: declaration 'uni_player' definition 'player'. [funcArgNamesDifferent] struct uniperif *player) ^ sound/soc/sti/uniperif.h:1375:24: note: Function 'uni_player_init' argument 2 names different: declaration 'uni_player' definition 'player'. struct uniperif *uni_player); ^ sound/soc/sti/uniperif_player.c:1049:24: note: Function 'uni_player_init' argument 2 names different: declaration 'uni_player' definition 'player'. struct uniperif *player) ^ sound/soc/sti/uniperif_reader.c:411:24: style:inconclusive: Function 'uni_reader_init' argument 2 names different: declaration 'uni_reader' definition 'reader'. [funcArgNamesDifferent] struct uniperif *reader) ^ sound/soc/sti/uniperif.h:1380:24: note: Function 'uni_reader_init' argument 2 names different: declaration 'uni_reader' definition 'reader'. struct uniperif *uni_reader); ^ sound/soc/sti/uniperif_reader.c:411:24: note: Function 'uni_reader_init' argument 2 names different: declaration 'uni_reader' definition 'reader'. struct uniperif *reader) ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210326215927.936377-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bf2a6b44d5e56a12dde6438a2d092475e54d1923 Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:18 2021 -0500 ASoC: sti: sti_uniperif: add missing error check cppcheck warning: sound/soc/sti/sti_uniperif.c:490:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = devm_snd_soc_register_component(&pdev->dev, ^ sound/soc/sti/sti_uniperif.c:486:6: note: ret is assigned ret = sti_uniperiph_cpu_dai_of(node, priv); ^ sound/soc/sti/sti_uniperif.c:490:6: note: ret is overwritten ret = devm_snd_soc_register_component(&pdev->dev, ^ sti_uniperiph_cpu_dai_of() can return -EINVAL which seems like a good-enough reason to bail. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210326215927.936377-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 00a25480cca4a094765084964c753c8f28e0f6fd Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:17 2021 -0500 ASoC: pxa: remove useless assignment cppcheck warning: sound/soc/pxa/mmp-pcm.c:207:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0, stream; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 18efddee4f0a8820a4ba0215655bbafd479025bf Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:16 2021 -0500 ASoC: meson: axg-tdmout: remove useless assignment cppcheck complains about potential null pointer dereference but it's rather an unnecessary assignment to NULL before walking through a list. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 84d0493f67b856e5909c18e15b7ce78391565057 Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:15 2021 -0500 ASoC: meson: axg-tdmin: remove useless assignment cppcheck complains about potential null pointer dereference but it's rather an unnecessary assignment to NULL before walking through a list. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ce36242046f272c7656f7b4c91ff7b4387f514b0 Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:14 2021 -0500 ASoC: bcm: cygnus_ssp: remove useless initialization Cppcheck warning: sound/soc/bcm/cygnus-ssp.c:1364:6: style: Redundant initialization for 'err'. The initialized value is overwritten before it is read. [redundantInitialization] err = devm_snd_soc_register_component(dev, &cygnus_ssp_component, ^ sound/soc/bcm/cygnus-ssp.c:1313:10: note: err is initialized int err = -EINVAL; ^ sound/soc/bcm/cygnus-ssp.c:1364:6: note: err is overwritten err = devm_snd_soc_register_component(dev, &cygnus_ssp_component, ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6692dc07fa113939fc2c15d58dc3b27e28fc767c Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:13 2021 -0500 ASoC: atmel: atmel-i2s: remove useless initialization Cppcheck complains: sound/soc/atmel/atmel-i2s.c:628:6: style: Redundant initialization for 'err'. The initialized value is overwritten before it is read. [redundantInitialization] err = devm_request_irq(&pdev->dev, irq, atmel_i2s_interrupt, 0, ^ sound/soc/atmel/atmel-i2s.c:598:10: note: err is initialized int err = -ENXIO; ^ sound/soc/atmel/atmel-i2s.c:628:6: note: err is overwritten err = devm_request_irq(&pdev->dev, irq, atmel_i2s_interrupt, 0, ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210326215927.936377-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 86f3c05534bed54342ef6912b9da1d75f6b8d902 Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:12 2021 -0500 ASoC: atmel: fix shadowed variable Fix cppcheck warning: sound/soc/atmel/atmel-classd.c:51:14: style: Local variable 'pwm_type' shadows outer variable [shadowVariable] const char *pwm_type; ^ sound/soc/atmel/atmel-classd.c:226:27: note: Shadowed declaration static const char * const pwm_type[] = { ^ sound/soc/atmel/atmel-classd.c:51:14: note: Shadow variable const char *pwm_type; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210326215927.936377-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2711a2d993036f26837e459ffb7b0d45c36b92a2 Author: Pierre-Louis Bossart Date: Fri Mar 26 16:59:11 2021 -0500 ASoC: amd: renoir: acp3x-pdm-dma: remove unnecessary assignments cppcheck warning: sound/soc/amd/renoir/acp3x-pdm-dma.c:132:17: style: Variable 'pdm_dma_enable' is assigned a value that is never used. [unreadVariable] pdm_dma_enable = 0x00; ^ sound/soc/amd/renoir/acp3x-pdm-dma.c:156:18: style: Variable 'pdm_dma_enable' is assigned a value that is never used. [unreadVariable] pdm_dma_enable = 0x00; ^ indeed those values are never used because the timeout is reset. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326215927.936377-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5fa7553dcd83c576c589fd3e617dc599e4fe15dc Author: Kuninori Morimoto Date: Tue Mar 30 14:26:38 2021 +0900 ASoC: soc-core: use device_unregister() if rtd allocation failed Because soc_free_pcm_runtime(rtd) checks rtd pointer and freeing rtd->xxx, it doesn't work correctly in case of rtd allocation failed. We need to use device_unregister(dev) in such case. This patch fixup it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r1jxxldd.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f1b3ee789f4b7a41ad93ff42d4efbae607622ae7 Author: Kuninori Morimoto Date: Tue Mar 30 14:26:28 2021 +0900 ASoC: soc-core: add comment for rtd freeing We don't need to mind freeing for rtd, because it was created from devm_kzalloc(dev, xxx) which is rtd->dev. This means, if rtd->dev was freed, rtd will be also freed automatically. soc_new_pcm_runtime(...) { ... rtd = devm_kzalloc(dev, ...); rtd->dev = dev; ... } This explanation was missing at soc_free_pcm_runtime() comment. This patch indicates it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sg4dxldn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f1321c9766b2c9e79de268225e291dead0a8f969 Author: Rob Herring Date: Wed Mar 31 09:27:48 2021 -0500 ASoC: dt-bindings: socionext: Use audio-graph-port schema Convert the Socionext audio schemas to use audio-graph-port.yaml schema for 'port' nodes. The number and numbering of port nodes should be documented, but is not. Leave a FIXME here so others don't copy. Cc: Masahiro Yamada Cc: Liam Girdwood Cc: Mark Brown Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210331142748.2163272-4-robh@kernel.org Signed-off-by: Mark Brown commit ec1c8302178a946986bb7b52ac7bb9ccdcdf7d92 Author: Rob Herring Date: Wed Mar 31 09:27:47 2021 -0500 ASoC: dt-bindings: Use OF graph schema Now that we have an OF graph schema, let's use it for the audio-graph-port schema. Cc: Liam Girdwood Cc: Mark Brown Cc: Kuninori Morimoto Cc: alsa-devel@alsa-project.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210331142748.2163272-3-robh@kernel.org Signed-off-by: Mark Brown commit 9c1e0439ada9973ec99cc1e0887eb84fd26444b8 Author: Rob Herring Date: Wed Mar 31 09:27:46 2021 -0500 ASoC: dt-bindings: Move port/ports properties out of audio-graph-port.yaml Users of the audio-graph-port schema need to define how many ports and what each port is, so they need to define 'ports' and/or 'port' anyways. Let's drop 'ports' and 'port' from the schema and adjust users to reference audio-graph-port.yaml from a port property. Cc: Liam Girdwood Cc: Mark Brown Cc: Thierry Reding Cc: Jonathan Hunter Cc: Kuninori Morimoto Cc: Lubomir Rintel Cc: Sameer Pujar Cc: alsa-devel@alsa-project.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210331142748.2163272-2-robh@kernel.org Signed-off-by: Mark Brown commit 945b0b58c5d7c6640f9aad2096e4675bc7f5371c Author: Pierre-Louis Bossart Date: Fri Mar 26 17:16:19 2021 -0500 ASoC: da732x: simplify code cppcheck reports a false positive: sound/soc/codecs/da732x.c:1161:25: warning: Either the condition 'indiv<0' is redundant or there is division by zero at line 1161. [zerodivcond] fref = (da732x->sysclk / indiv); ^ sound/soc/codecs/da732x.c:1158:12: note: Assuming that condition 'indiv<0' is not redundant if (indiv < 0) ^ sound/soc/codecs/da732x.c:1161:25: note: Division by zero fref = (da732x->sysclk / indiv); ^ The code is awfully convoluted/confusing and can be simplified with a single variable and the BIT macro. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326221619.949961-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 458c23c509f66c5950da7e5496ea952ad15128f7 Author: Pierre-Louis Bossart Date: Fri Mar 26 17:16:18 2021 -0500 ASoC: lm49453: fix useless assignment before return Cppcheck warning: sound/soc/codecs/lm49453.c:1210:11: style: Variable 'pll_clk' is assigned a value that is never used. [unreadVariable] pll_clk = BIT(4); ^ FIXME: What is the correct fix? /* fll clk slection */ pll_clk = BIT(4); return 0; is the assignment redundant or the 'return 0' a mistake? Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210326221619.949961-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ad858508fd6ac58258dd25fd2063a6f6e10426f7 Merge: 326b0037fd6b5 a135dfb5de150 Author: Mark Brown Date: Wed Mar 31 17:16:14 2021 +0100 Merge tag 'mute-led-rework' of https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound into asoc-5.13 ALSA: control - add generic LED API This patchset tries to resolve the diversity in the audio LED control among the ALSA drivers. A new control layer registration is introduced which allows to run additional operations on top of the elementary ALSA sound controls. A new control access group (three bits in the access flags) was introduced to carry the LED group information for the sound controls. The low-level sound drivers can just mark those controls using this access group. This information is not exported to the user space, but user space can manage the LED sound control associations through sysfs (last patch) per Mark's request. It makes things fully configurable in the kernel and user space (UCM). The actual state ('route') evaluation is really easy (the minimal value check for all channels / controls / cards). If there's more complicated logic for a given hardware, the card driver may eventually export a new read-only sound control for the LED group and do the logic itself. The new LED trigger control code is completely separated and possibly optional (there's no symbol dependency). The full code separation allows eventually to move this LED trigger control to the user space in future. Actually it replaces the already present functionality in the kernel space (HDA drivers) and allows a quick adoption for the recent hardware (ASoC codecs including SoundWire). snd_ctl_led 24576 0 The sound driver implementation is really easy: 1) call snd_ctl_led_request() when control LED layer should be automatically activated / it calls module_request("snd-ctl-led") on demand / 2) mark all related kcontrols with SNDRV_CTL_ELEM_ACCESS_SPK_LED or SNDRV_CTL_ELEM_ACCESS_MIC_LED Link: https://lore.kernel.org/r/20210317172945.842280-1-perex@perex.cz Signed-off-by: Takashi Iwai commit f2ac256b9a8b7e79847efcd82bd10fd876369b9f Merge: 52fa82c21f64e 054ac8ad5ebe4 Author: Borislav Petkov Date: Wed Mar 31 18:04:19 2021 +0200 Merge 'x86/alternatives' Pick up dependent changes. Signed-off-by: Borislav Petkov commit aff188feb5e1f67a61808f547c4dc0e150ee8278 Author: Dmitry Baryshkov Date: Wed Mar 31 18:16:12 2021 +0300 phy: qcom-qmp: add support for sm8250-usb3-dp phy Add support for QMP V4 Combo USB3+DP PHY (for SM8250 platform). Signed-off-by: Dmitry Baryshkov Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210331151614.3810197-6-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 5c3939174fe4d186604e0e78e9711b883e9cc858 Author: Dmitry Baryshkov Date: Wed Mar 31 18:16:11 2021 +0300 phy: qcom-qmp: rename common registers A plenty of DP PHY registers are common between V3 and V4. To simplify V4 code, rename all common registers. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210331151614.3810197-5-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 5f0d28f20eebf8eff887ecd231178b659764c676 Author: Dmitry Baryshkov Date: Wed Mar 31 18:16:10 2021 +0300 phy: qcom-qmp: move DP functions to callbacks In preparation to adding support for V4 DP PHY move DP functions to callbacks at struct qmp_phy_cfg. Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210331151614.3810197-4-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 87899d9a66f3165ec70e8a386ba06f67ad148ca2 Author: Dmitry Baryshkov Date: Wed Mar 31 18:16:09 2021 +0300 dt-bindings: phy: qcom,qmp-usb3-dp: Add support for SM8250 Add compatible for SM8250 in QMP USB3 DP PHY bindings. Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210331151614.3810197-3-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit 94c34600b6173a2b9dd7d9694a42d86fb8768e62 Author: Dmitry Baryshkov Date: Wed Mar 31 18:16:08 2021 +0300 dt-bindings: phy: qcom,qmp-usb3-dp-phy: move usb3 compatibles back to qcom,qmp-phy.yaml The commit 724fabf5df13 ("dt-bindings: phy: qcom,qmp-usb3-dp: Add DP phy information") has support for DP part of USB3+DP combo PHYs. However this change is not backwards compatible, placing additional requirements onto qcom,sc7180-qmp-usb3-phy and qcom,sdm845-qmp-usb3-phy device nodes (to include separate DP part, etc). However the aforementioned nodes do not inclue DP part, they strictly follow the schema defined in the qcom,qmp-phy.yaml file. Move those compatibles, leaving qcom,qmp-usb3-dp-phy.yaml to describe only real "combo" USB3+DP device nodes. Fixes: 724fabf5df13 ("dt-bindings: phy: qcom,qmp-usb3-dp: Add DP phy information") Cc: Stephen Boyd Cc: Sandeep Maheswaram Signed-off-by: Dmitry Baryshkov Acked-by: Rob Herring Reviewed-by: Stephen Boyd Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210331151614.3810197-2-dmitry.baryshkov@linaro.org Signed-off-by: Vinod Koul commit be1ee45d51384161681ecf21085a42d316ae25f7 Author: Yi Zhuang Date: Wed Mar 31 17:34:14 2021 +0800 f2fs: Fix a hungtask problem in atomic write In the cache writing process, if it is an atomic file, increase the page count of F2FS_WB_CP_DATA, otherwise increase the page count of F2FS_WB_DATA. When you step into the hook branch due to insufficient memory in f2fs_write_begin, f2fs_drop_inmem_pages_all will be called to traverse all atomic inodes and clear the FI_ATOMIC_FILE mark of all atomic files. In f2fs_drop_inmem_pages,first acquire the inmem_lock , revoke all the inmem_pages, and then clear the FI_ATOMIC_FILE mark. Before this mark is cleared, other threads may hold inmem_lock to add inmem_pages to the inode that has just been emptied inmem_pages, and increase the page count of F2FS_WB_CP_DATA. When the IO returns, it is found that the FI_ATOMIC_FILE flag is cleared by f2fs_drop_inmem_pages_all, and f2fs_is_atomic_file returns false,which causes the page count of F2FS_WB_DATA to be decremented. The page count of F2FS_WB_CP_DATA cannot be cleared. Finally, hungtask is triggered in f2fs_wait_on_all_pages because get_pages will never return zero. process A: process B: f2fs_drop_inmem_pages_all ->f2fs_drop_inmem_pages of inode#1 ->mutex_lock(&fi->inmem_lock) ->__revoke_inmem_pages of inode#1 f2fs_ioc_commit_atomic_write ->mutex_unlock(&fi->inmem_lock) ->f2fs_commit_inmem_pages of inode#1 ->mutex_lock(&fi->inmem_lock) ->__f2fs_commit_inmem_pages ->f2fs_do_write_data_page ->f2fs_outplace_write_data ->do_write_page ->f2fs_submit_page_write ->inc_page_count(sbi, F2FS_WB_CP_DATA ) ->mutex_unlock(&fi->inmem_lock) ->spin_lock(&sbi->inode_lock[ATOMIC_FILE]); ->clear_inode_flag(inode, FI_ATOMIC_FILE) ->spin_unlock(&sbi->inode_lock[ATOMIC_FILE]) f2fs_write_end_io ->dec_page_count(sbi, F2FS_WB_DATA ); We can fix the problem by putting the action of clearing the FI_ATOMIC_FILE mark into the inmem_lock lock. This operation can ensure that no one will submit the inmem pages before the FI_ATOMIC_FILE mark is cleared, so that there will be no atomic writes waiting for writeback. Fixes: 57864ae5ce3a ("f2fs: limit # of inmemory pages") Signed-off-by: Yi Zhuang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7b6f846785f41d57917e36851c120cfbe87f0809 Author: Thierry Reding Date: Fri Mar 26 15:51:39 2021 +0100 drm/tegra: Support sector layout on Tegra194 Tegra194 has a special physical address bit that enables some memory swizzling logic to support different sector layouts. Support the bit that selects the sector layout which is passed in the framebuffer modifier. Signed-off-by: Thierry Reding commit 05d1adfe2a8b5c6a794a9927d1991a00c5d68f1d Author: Thierry Reding Date: Fri Mar 26 15:51:38 2021 +0100 drm/tegra: Count number of display controllers at runtime In order to be able to attach planes to all possible display controllers the exact number of CRTCs must be known. Keep track of the number of the display controllers that register during initialization. Signed-off-by: Thierry Reding commit 476e93205ff61a6507bcba28f4f01269b65ebb38 Author: Thierry Reding Date: Fri Mar 26 15:51:36 2021 +0100 drm/tegra: gem: Add a clarifying comment Clarify when a fixed IOV address can be used and when a buffer has to be mapped before the IOVA can be used. Signed-off-by: Thierry Reding commit 4def888d4158ee8977995664bb55fa50894645d2 Author: Thierry Reding Date: Fri Mar 26 15:51:35 2021 +0100 drm/tegra: fb: Add diagnostics for framebuffer modifiers Add a debug message to let the user know when a framebuffer modifier is not supported. Signed-off-by: Thierry Reding commit d5ec699db5bb15f981f1632d058ffe857d649765 Author: Thierry Reding Date: Fri Mar 26 15:51:34 2021 +0100 drm/tegra: dc: Implement hardware cursor on Tegra186 and later The hardware cursor on Tegra186 differs slightly from the implementation on older SoC generations. In particular the new implementation relies on software for clipping the cursor against the screen. Fortunately, atomic KMS already computes clipped coordinates for (cursor) planes, so this is trivial to implement. The format supported by the hardware cursor is also slightly different. v2: use more drm_rect helpers (Dmitry) Signed-off-by: Thierry Reding Reviewed-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 042c0bd76d7b053ea6bc47e4db471d5cfc7f19c5 Author: Thierry Reding Date: Fri Mar 26 15:51:33 2021 +0100 drm/tegra: dc: Parameterize maximum resolution Tegra186 and later support a higher maximum resolution than earlier chips, so make sure to reflect that in the mode configuration. Signed-off-by: Thierry Reding commit 86044e749be77a3544990027244abb20ddb3caf0 Author: Thierry Reding Date: Fri Mar 26 15:51:32 2021 +0100 drm/tegra: dc: Inherit DMA mask Inherit the DMA mask from host1x (on Tegra210 and earlier) or the display hub (on Tegra186 and later). This is necessary in order to properly map buffers without SMMU support and use the maximum IOVA space available with SMMU support. Signed-off-by: Thierry Reding commit 933deb8c7b8e3f83e3dbd0b08e3cad51350d44c4 Author: Thierry Reding Date: Fri Mar 26 15:51:37 2021 +0100 gpu: host1x: Add early init and late exit callbacks These callbacks can be used by client drivers to run code during early init and during late exit. Early init callbacks are run prior to the regular init callbacks while late exit callbacks run after the regular exit callbacks. Signed-off-by: Thierry Reding commit d3555eb7f8c01b9c16d400af9533555757a2c264 Author: Jon Hunter Date: Mon Mar 29 16:38:36 2021 +0300 gpu: host1x: Fix Tegra194 syncpt interrupt threshold Syncpoint interrupts are not working as expected on Tegra194. The problem is that the syncpoint interrupt threshold being used is the global interrupt threshold and not the virtual interrupt threshold. Fix this by using the virtual interrupt threshold which aligns with downstream. Signed-off-by: Jon Hunter Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 5a8d95d20c406c673258edd4c2bd308c22304657 Author: Mikko Perttunen Date: Mon Mar 29 16:38:35 2021 +0300 gpu: host1x: Assign intr waiter inside lock Move the assignment of the ref out-pointer in host1x_intr_add_action to happen within the spinlock. With the current arrangement, it is possible for the waiter to complete before the assignment has happened, which breaks horribly if the waiter completion callback tries to use the reference. In practice, there is currently no situation where this issue can manifest -- it was first noticed with the upcoming DMA fence implementation patches. As such this doesn't need to be backported. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit f5ba33fb9690566c382624637125827b5512e766 Author: Mikko Perttunen Date: Mon Mar 29 16:38:34 2021 +0300 gpu: host1x: Reserve VBLANK syncpoints at initialization On T20-T148 chips, the bootloader can set up a boot splash screen with DC configured to increment syncpoint 26/27 at VBLANK. Because of this we shouldn't allow these syncpoints to be allocated until DC has been reset and will no longer increment them in the background. As such, on these chips, reserve those two syncpoints at initialization, and only mark them free once the DC driver has indicated it's safe to do so. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit aded42ada6eacfa11d349b158e993f66e4741aa7 Author: Mikko Perttunen Date: Mon Mar 29 16:38:33 2021 +0300 gpu: host1x: Reset max value when freeing a syncpoint With job recovery becoming optional, syncpoints may have a mismatch between their value and max value when freed. As such, when freeing, set the max value to the current value of the syncpoint so that it is in a sane state for the next user. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 2aed4f5ab04af922a7cf1b616701845c9ed2473f Author: Mikko Perttunen Date: Mon Mar 29 16:38:32 2021 +0300 gpu: host1x: Cleanup and refcounting for syncpoints Add reference counting for allocated syncpoints to allow keeping them allocated while jobs are referencing them. Additionally, clean up various places using syncpoint IDs to use host1x_syncpt pointers instead. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 36a813839cdee99c87e17a2d52a009b5517d54a9 Author: Kishon Vijay Abraham I Date: Wed Mar 31 18:44:17 2021 +0530 phy: ti: j721e-wiz: Configure 'p_standard_mode' only for DP/QSGMII Configure 'p_standard_mode' only for DP/QSGMII as for other modes it's not used as per the programming sequence. Add "continue" in the else to prevent random value from being written to p_standard_mode. Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210331131417.15596-1-kishon@ti.com Signed-off-by: Vinod Koul commit 326b0037fd6b5fc5640f3d37c80b62e2b3329017 Merge: e896ec3908702 39af7f7a03d00 Author: Mark Brown Date: Wed Mar 31 15:53:49 2021 +0100 Merge series "ASoC: simple-card: cleanup and prepare for Multi CPU/Codec support" from Kuninori Morimoto : Hi Mark I want to add new audio-graph-card2 driver which can support not only DPCM, but also Multi-CPU/Codec, and Codec2Codec. And it is also supporting user customization. But before supporting such driver, we need to cleanup existing simple-card / audio-graph, because these and new driver are sharing code. This patch-set are cleanup and prepare for Multi-CPU/Codec support. Kuninori Morimoto (6): ASoC: simple-card-utils.c: remove old comment ASoC: simple-card-utils: alloc dai_link information for CPU/Codec/Platform ASoC: audio-graph: count DAI / link numbers as in order ASoC: audio-graph: cleanup graph_for_each_link() ASoC: simple-card: count DAI / link numbers as in order ASoC: simple-card: cleanup graph_for_each_link() include/sound/simple_card_utils.h | 7 +- sound/soc/generic/audio-graph-card.c | 112 +++++++++++++------------ sound/soc/generic/simple-card-utils.c | 20 +++-- sound/soc/generic/simple-card.c | 115 +++++++++++++++----------- 4 files changed, 143 insertions(+), 111 deletions(-) -- 2.25.1 commit 234e6d2c18f5b080cde874483c4c361f3ae7cffe Author: Xingui Yang Date: Fri Mar 12 18:24:36 2021 +0800 ata: ahci: Disable SXS for Hisilicon Kunpeng920 On Hisilicon Kunpeng920, ESP is set to 1 by default for all ports of SATA controller. In some scenarios, some ports are not external SATA ports, and it cause disks connected to these ports to be identified as removable disks. So disable the SXS capability on the software side to prevent users from mistakenly considering non-removable disks as removable disks and performing related operations. Signed-off-by: Xingui Yang Signed-off-by: Luo Jiaxing Reviewed-by: John Garry Link: https://lore.kernel.org/r/1615544676-61926-1-git-send-email-luojiaxing@huawei.com Signed-off-by: Jens Axboe commit 52fa82c21f64e900a72437269a5cc9e0034b424e Author: Peter Zijlstra Date: Fri Mar 26 16:12:00 2021 +0100 x86: Add insn_decode_kernel() Add a helper to decode kernel instructions; there's no point in endlessly repeating those last two arguments. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210326151259.379242587@infradead.org commit 70f5e4a6017b8d45a110ebbb4a56799e9a90102f Author: Marc Zyngier Date: Wed Mar 31 14:16:20 2021 +0100 KVM: arm64: Elect Alexandru as a replacement for Julien as a reviewer Julien's bandwidth for KVM reviewing has been pretty low lately, and Alexandru has accepted to step in and help with the reviewing. Many thanks to both! Cc: Julien Thierry Cc: Alexandru Elisei Signed-off-by: Marc Zyngier Acked-by: Alexandru Elisei Link: https://lore.kernel.org/r/20210331131620.4005931-1-maz@kernel.org commit 77e06b300161d41d65950be9c77a785c142b381d Author: David Brazdil Date: Wed Mar 31 13:30:48 2021 +0000 KVM: arm64: Support PREL/PLT relocs in EL2 code gen-hyprel tool parses object files of the EL2 portion of KVM and generates runtime relocation data. While only filtering for R_AARCH64_ABS64 relocations in the input object files, it has an allow-list of relocation types that are used for relative addressing. Other, unexpected, relocation types are rejected and cause the build to fail. This allow-list did not include the position-relative relocation types R_AARCH64_PREL64/32/16 and the recently introduced _PLT32. While not seen used by toolchains in the wild, add them to the allow-list for completeness. Fixes: 8c49b5d43d4c ("KVM: arm64: Generate hyp relocation data") Cc: Reported-by: Will Deacon Signed-off-by: David Brazdil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210331133048.63311-1-dbrazdil@google.com commit 81f1f8f1e1489c0bf051d5241ec10da07869b911 Author: Imre Deak Date: Tue Mar 30 18:01:18 2021 +0300 drm/i915: Fix docbook header for __intel_runtime_pm_get_if_active() Fix the Documentation/gpu/i915:22: /drivers/gpu/drm/i915/intel_runtime_pm.c:423: WARNING: Inline strong start-string without end-string. warning from the htmldocs build. Fixes: 9d58aa46291d ("drm/i915: Fix the GT fence revocation runtime PM logic") Reported-by: Stephen Rothwell Cc: Chris Wilson Signed-off-by: Imre Deak Acked-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210330150118.1105079-1-imre.deak@intel.com commit 3406ac5347dbf64ab9f7b137ed25a18493f5ea2d Author: Martin Liška Date: Tue Mar 30 20:33:55 2021 +0200 perf annotate: Add --demangle and --demangle-kernel 'perf annotate' supports --symbol but it's impossible to filter a C++ symbol. With --no-demangle one can filter easily by mangled function name. Signed-off-by: Martin Liška Link: http://lore.kernel.org/lkml/c3c7e959-9f7f-18e2-e795-f604275cbac3@suse.cz Signed-off-by: Arnaldo Carvalho de Melo commit d57cd79db1a3c147b63fb0c64ccd26855eb8f86e Author: Seiya Wang Date: Fri Mar 19 10:34:26 2021 +0800 dt-bindings: phy: fix dt_binding_check warning in mediatek, ufs-phy.yaml This commit fixes the warning messages of make dt_binding_check from newly added mediatek,mt8195-ufsphy in mediatek,ufs-phy.yaml Signed-off-by: Seiya Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319023427.16711-9-seiya.wang@mediatek.com Signed-off-by: Vinod Koul commit 67097754afc90a5def9d54c599d0862fe992f5a0 Author: Manish Narani Date: Wed Mar 24 17:48:45 2021 +0530 phy: zynqmp: Handle the clock enable/disable properly The current driver is not handling the clock enable/disable operations properly. The clocks need to be handled correctly by enabling or disabling at appropriate places. This patch adds code to handle the same. Signed-off-by: Manish Narani Reviewed-by: Laurent Pinchart Acked-by: Michal Simek Link: https://lore.kernel.org/r/1616588325-95602-1-git-send-email-manish.narani@xilinx.com Signed-off-by: Vinod Koul commit 8bb2dbf1e14d05e92a23e03bcbd1c27f7ee937f7 Author: Linus Walleij Date: Tue Mar 30 18:49:07 2021 +0200 spi: pl022: Convert to use GPIO descriptors This converts the PL022 driver to use GPIO descriptors instead of the old global GPIO numberspace. Since the driver handles messages on its own it needs to manage the GPIO descriptor directly. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210330164907.2346010-3-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 77f983a9df421fa00ca6a2f494dc79f8afca75a2 Author: Linus Walleij Date: Tue Mar 30 18:49:06 2021 +0200 spi: pl022: Use GPIOs looked up by the core The SPI core looks up GPIO lines from the device tree, so let's stop trying to do that on our own and rely on the core to do this for us. In addition to the GPIO line we also need to keep track of the chip select index separately, as the native chip select needs this index. The driver was reusing the same GPIO array for native chip select indices, so keep this in a separate state variable instead. The facility to pass in custom GPIO lines from the platform data can go, because even if we do have out-of-tree code that want to use platform data, they can soon pass in GPIOs using machine GPIO descriptor tables which will be available after the next step when we convert the driver to using GPIO descriptors. The implicit inclusion of is made explicit as we no longer need to include . Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210330164907.2346010-2-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 4179e576b56d82e5ce007b9f548efb90605e2713 Author: Linus Walleij Date: Tue Mar 30 18:49:05 2021 +0200 spi: pl022: Drop custom per-chip cs_control Drop the custom cs_control() assigned through platform data, we have no in-tree users and the only out-of-tree use I have ever seen of this facility is to pull GPIO lines, which is something the driver can already do for us. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210330164907.2346010-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit 394409aafd017adfcffd075595cb01cc456a9327 Author: Guru Das Srinagesh Date: Wed Mar 24 12:28:54 2021 -0700 regmap-irq: Add driver callback to configure virtual regs Enable drivers to configure and modify "virtual" registers, which are non-standard registers that further configure irq type on some devices. Since they are non-standard, enable drivers to configure them according to their particular idiosyncrasies by specifying an optional callback function while registering with the framework. Signed-off-by: Guru Das Srinagesh Link: https://lore.kernel.org/r/07e058cdec2297d15c95c825aa0263064d962d5a.1616613838.git.gurus@codeaurora.org Signed-off-by: Mark Brown commit 4c5014456305482412b35a081ca0fb4fefd69764 Author: Guru Das Srinagesh Date: Wed Mar 24 12:28:53 2021 -0700 regmap-irq: Introduce virtual regs to handle more config regs Add "virtual" registers support to handle any irq configuration registers in addition to the ones the framework currently supports (status, mask, unmask, wake, type and ack). These are non-standard registers that further configure irq type on some devices, so enable the framework to add a variable number of them. Signed-off-by: Guru Das Srinagesh Link: https://lore.kernel.org/r/a1787067004b0e11cb960319082764397469215a.1616613838.git.gurus@codeaurora.org Signed-off-by: Mark Brown commit e896ec390870287dcc92f3b46d80da88f3b4b1f8 Author: Jack Yu Date: Wed Mar 31 15:10:46 2021 +0800 ASoC: rt1019: add address-cells and size-cells information Add address-cells and size-cells information to fix warnings for rt1019.yaml. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20210331071046.12526-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 868d5c6340d878f44acf73c92923995b896b6454 Author: Thierry Reding Date: Tue Mar 30 20:06:57 2021 +0200 ASoC: tegra: Set driver name explicitly The SoC sound core will generate a driver name by normalizing the card name. However, most of the time that name does not tell anything about the driver and is therefore useless for this purpose. Make the driver name more useful by setting it explicitly during card initialization. Signed-off-by: Thierry Reding Link: https://lore.kernel.org/r/20210330180657.1867971-1-thierry.reding@gmail.com Signed-off-by: Mark Brown commit 50cbf945566b7cdb186c80c389bdfe22850d8d29 Author: Bhaskar Chowdhury Date: Mon Mar 22 12:19:09 2021 +0530 ASoC: Intel: Fix a typo s/struture/structure/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210322064909.4189290-1-unixbhaskar@gmail.com Signed-off-by: Mark Brown commit 8d246806d510c1bf7da9aab0473dc0f9c9f99308 Author: Shengjiu Wang Date: Wed Mar 31 15:44:46 2021 +0800 ASoC: dt-bindings: ak5558: Add compatible string for ak5552 Add compatible string "asahi-kasei,ak5552" for ak5552 Signed-off-by: Shengjiu Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1617176686-25528-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit d8c5c82e4e5b641404c65bfc6cdf57b5d0a6c836 Author: Viorel Suman Date: Wed Mar 31 15:44:45 2021 +0800 ASoC: ak5558: Add support for ak5552 AK5552 is a 32-bit 2ch ADC and has the same register map as AK5558. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1617176686-25528-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 875c40eadf6ac6644c0f71842a4f30dd9968d281 Author: Hans de Goede Date: Thu Mar 25 23:10:54 2021 +0100 ASoC: Intel: bytcr_rt5640: Add quirk for the Chuwi Hi8 tablet The Chuwi Hi8 tablet is using an analog mic on IN1 and has its jack-detect connected to JD2_IN4N, instead of using the default IN3 for its internal mic and JD1_IN4P for jack-detect. It also only has 1 speaker. Add a quirk applying the correct settings for this configuration. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210325221054.22714-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 2970134b927834e9249659a70aac48e62dff804a Author: Adrian Hunter Date: Wed Mar 31 11:17:52 2021 +0300 mmc: sdhci-pci: Fix initialization of some SD cards for Intel BYT-based controllers Bus power may control card power, but the full reset done by SDHCI at initialization still may not reset the power, whereas a direct write to SDHCI_POWER_CONTROL can. That might be needed to initialize correctly, if the card was left powered on previously. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210331081752.23621-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 47805532eb65946fc14068c6d55ba0a6bedbd693 Author: Hao Fang Date: Tue Mar 30 14:40:48 2021 +0800 mmc: dw_mmc-k3: use the correct HiSilicon copyright s/Hisilicon/HiSilicon/g. It should use capital S, according to https://www.hisilicon.com/en/terms-of-use. Signed-off-by: Hao Fang Acked-by: Zhangfei Gao Link: https://lore.kernel.org/r/1617086448-51054-1-git-send-email-fanghao11@huawei.com Signed-off-by: Ulf Hansson commit 26ea7ac92836ba616f75a1ab57e64ffc21da7758 Author: Linus Walleij Date: Wed Mar 31 14:45:05 2021 +0200 pinctrl: bcm63xx: Fix dependencies Add depends on OF so we don't get weird build errors on randconfig. Also order selects the same as the other drivers for pure aestetic reasons. Reported-by: Randy Dunlap Cc: Álvaro Fernández Rojas Signed-off-by: Linus Walleij commit 39af7f7a03d007e5590f0b852b3f2fed9e703d0f Author: Kuninori Morimoto Date: Fri Mar 26 12:26:40 2021 +0900 ASoC: simple-card: cleanup graph_for_each_link() simple-card checks DT links 2 times. 1st is for counting DAIs / links to allocating memory, 2nd is for detecting DAIs. To detecting DAIs as CPU-dummy -> dummy-Codec order when DPCM case, it uses loops 2 times. Because of this kind of complex background, it needs to use local varuable for it, and each call-back functions need to care about it. Now, 1st and 2nd DT link check are using same order, thus we can share same code. This patch do it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/875z1e1tov.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit a6e8798061bf0f33caea6fd47b0cb367309e34d0 Author: Kuninori Morimoto Date: Fri Mar 26 12:26:33 2021 +0900 ASoC: simple-card: count DAI / link numbers as in order simple-card checks DT links 2 times. 1st is for counting DAIs / links to allocating memory, 2nd is for detecting DAIs. To detecting DAIs as CPU-dummy -> dummy-Codec order when DPCM case, it uses loops 2 times at 2nd DT link check. But it doesn't do it at 1st DT link check. for (li.cpu = 1; li.cpu >= 0; li.cpu--) { /* * Detect all CPU first, and Detect all Codec 2n * * In Normal sound case, all DAIs are detected * as "CPU-Codec". * * In DPCM sound case, * all CPUs are detected as "CPU-dummy", and * all Codecs are detected as "dummy-Codec". * To avoid random sub-device numbering, * detect "dummy-Codec" in last; */ ret = simple_for_each_link(...); ... } To prepare supporting multi-CPU/Codec, and code cleanup, this patch use same loop for 1st DT link check, too. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/877dlu1tp2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e9cbcf23a28b41a310a13d0b1b67501948b255fb Author: Kuninori Morimoto Date: Fri Mar 26 12:26:20 2021 +0900 ASoC: audio-graph: cleanup graph_for_each_link() audio-graph checks DT links 2 times. 1st is for counting DAIs / links to allocating memory, 2nd is for detecting DAIs. To detecting DAIs as CPU-dummy -> dummy-Codec order when DPCM case, it uses loops 2 times. Because of this kind of complex background, it needs to use local varuable for it, and each call-back functions need to care about it. Now, 1st and 2nd DT link check are using same order, thus we can share same code. This patch do it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878s6a1tpf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 674b9438e2d4c44f45af2a38521767c06c46eacb Author: Kuninori Morimoto Date: Fri Mar 26 12:26:11 2021 +0900 ASoC: audio-graph: count DAI / link numbers as in order audio-graph checks DT links 2 times. 1st is for counting DAIs / links to allocating memory, 2nd is for detecting DAIs. To detecting DAIs as CPU-dummy -> dummy-Codec order when DPCM case, it uses loops 2 times at 2nd DT link check. But it doesn't do it at 1st DT link check. for (li.cpu = 1; li.cpu >= 0; li.cpu--) { /* * Detect all CPU first, and Detect all Codec 2n * * In Normal sound case, all DAIs are detected * as "CPU-Codec". * * In DPCM sound case, * all CPUs are detected as "CPU-dummy", and * all Codecs are detected as "dummy-Codec". * To avoid random sub-device numbering, * detect "dummy-Codec" in last; */ ret = graph_for_each_link(...); ... } To prepare supporting multi-CPU/Codec, and code cleanup, this patch use same loop for 1st DT link check, too. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6qq1tpp.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 050c7950fd706fec229af9f30e8ce254cea9b675 Author: Kuninori Morimoto Date: Fri Mar 26 12:26:06 2021 +0900 ASoC: simple-card-utils: alloc dai_link information for CPU/Codec/Platform simple-card / audio-graph are assuming single CPU/Codec/Platform on dai_link. Because of it, it is difficult to support Multi-CPU/Codec. This patch allocs CPU/Codec/Platform dai_link imformation instead of using existing props information. It can update to multi-CPU/Codec, but is still assuming single-CPU/Codec for now. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blb61tpv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 89503d736e3631bda906c627d1092dc8e76ddfd9 Author: Kuninori Morimoto Date: Fri Mar 26 12:25:57 2021 +0900 ASoC: simple-card-utils.c: remove old comment commit adb76b5b9c474 ("ASoC: soc-core: remove legacy style dai_link") removed snd_soc_init_multicodec(). The comment on asoc_simple_init_priv() is no longer needed. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87czvm1tq2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 339be1a8e9af736e5e08924cd8da52d21621fe3d Author: Jani Nikula Date: Mon Mar 29 16:37:22 2021 +0300 drm/displayid: rename displayid_hdr to displayid_header Avoid any confusion with High Dynamic Range. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ce083bd2789c7e22a91710726162287db88e3f6c.1617024940.git.jani.nikula@intel.com commit f72b1437e9f80abac4d7bf922b83fa5f75941516 Author: Jani Nikula Date: Mon Mar 29 16:37:21 2021 +0300 drm/displayid: allow data blocks with 0 payload length The DisplayID specifications explicitly call out 0 as a valid payload length for data blocks. The mere presence of a data block, or the information coded in the block specific data (bits 7:3 in offset 1), may be enough to convey the necessary information. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/d562dff99ba7c92accb654a99b433bed471e8507.1617024940.git.jani.nikula@intel.com commit bfd4e1929b5a37dba838c82484e6d8260585ce9d Author: Jani Nikula Date: Mon Mar 29 16:37:20 2021 +0300 drm/edid: use the new displayid iterator for tile info Neatly reduce displayid boilerplate in code. Remove excessive debug logging while at it, no other functional changes. The old displayid iterator becomes unused; remove it as well as make drm_find_displayid_extension() static. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/fa4b5c790b5bdd82063545a6f209f8e9d78a63a7.1617024940.git.jani.nikula@intel.com commit 1ba63caf223d9eaed854f978d9fed860259d02e3 Author: Jani Nikula Date: Mon Mar 29 16:37:19 2021 +0300 drm/edid: use the new displayid iterator for finding CEA extension Neatly reduce displayid boilerplate in code. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/e50f876cecbfee369da887ad19350eee0d89b87f.1617024940.git.jani.nikula@intel.com commit 5ef88dc58ea32a695008c77ad03df862172f40c7 Author: Jani Nikula Date: Mon Mar 29 16:37:18 2021 +0300 drm/edid: use the new displayid iterator for detailed modes Neatly reduce displayid boilerplate in code. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f6c69c545c553c4a616887540660a4b8aecf0f7f.1617024940.git.jani.nikula@intel.com commit 1a24c364e48414c6bd16f867c115cb3f4ad1aecc Author: Jani Nikula Date: Mon Mar 29 16:37:17 2021 +0300 drm/displayid: add new displayid section/block iterators Iterating DisplayID blocks across sections (in EDID extensions) is unnecessarily complicated for the caller. Implement DisplayID iterators to go through all blocks in all sections. Usage example: const struct displayid_block *block; struct displayid_iter iter; displayid_iter_edid_begin(edid, &iter); displayid_iter_for_each(block, &iter) { /* operate on block */ } displayid_iter_end(&iter); When DisplayID is stored in EDID extensions, the DisplayID sections map to extensions as described in VESA DisplayID v1.3 Appendix B: DisplayID as an EDID Extension. This is implemented here. When DisplayID is stored in its dedicated DDC device 0xA4, according to VESA E-DDC v1.3, different rules apply for the structure. This is not implemented here, as we don't currently use it, but the idea is you'd have a different call for beginning the iteration, for example simply: displayid_iter_begin(displayid, &iter); instead of displayid_iter_edid_begin(), and everything else would be hidden away in the iterator functions. v2: - sizeof(struct displayid_block) -> sizeof(*block) (Ville) - remove __ prefix from displayid_iter_block Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/da3dead1752ab16c061f7bd248ac1a4268f7fefb.1617024940.git.jani.nikula@intel.com commit 4cc4f09eaa06178bfa8a5b2c753cefb56e1048c8 Author: Jani Nikula Date: Mon Mar 29 16:37:16 2021 +0300 drm/displayid: add separate drm_displayid.c We'll be adding more DisplayID specific functions going forward, so start off by splitting out a few functions to a separate file. We don't bother with exporting the functions; at least for now they should be needed solely within drm.ko. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/07942d5011891b8e8f77245c78b34f4af97a9315.1617024940.git.jani.nikula@intel.com commit 43d16d847eba1469b5579b6515413b4caa07885c Author: Jani Nikula Date: Mon Mar 29 16:37:15 2021 +0300 drm/edid: make a number of functions, parameters and variables const If there's no need to change it, it should be const. There's more to be done, but start off with changes that make follow-up work easier. No functional changes. Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/41722f92ef81cd6adf65f936fcc5301418e1f94b.1617024940.git.jani.nikula@intel.com commit 1978d88cdc8eb0986d36cac0e9541220fa71d87d Author: Álvaro Fernández Rojas Date: Tue Mar 30 12:32:25 2021 +0200 pinctrl: bcm: bcm6362: fix warning The current implementation of bcm6362_set_gpio() produces the following warning on x86_64: drivers/pinctrl/bcm/pinctrl-bcm6362.c: In function 'bcm6362_set_gpio': drivers/pinctrl/bcm/pinctrl-bcm6362.c:503:8: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] 503 | (uint32_t) desc->drv_data, 0); | ^ Modify the code to make it similar to bcm63268_set_gpio() in order to fix the warning. Fixes: 705791e23ecd ("pinctrl: add a pincontrol driver for BCM6362") Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210330103225.3949-1-noltari@gmail.com Reviewed-by: Andy Shevchenko Signed-off-by: Linus Walleij commit 1ff1270fca33c582b53b51dc2903f21ae7e1f4bc Author: Hsin-Yi Wang Date: Tue Mar 30 19:04:23 2021 +0800 soc: mediatek: mmsys: Add mt8183 mmsys routing table mt8183 has different routing registers than mt8173. Signed-off-by: Hsin-Yi Wang Tested-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210330110423.3542163-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit fdcbe17c6090acdeb766c0383ce101fdf64177e1 Author: Boris Brezillon Date: Wed Feb 3 12:07:17 2021 +0100 drm/mediatek: Add missing MODULE_DEVICE_TABLE() This patch adds the missing MODULE_DEVICE_TABLE definitions on different Mediatek drivers which generates correct modalias for automatic loading when these drivers are compiled as an external module. Signed-off-by: Boris Brezillon Signed-off-by: Enric Balletbo i Serra Reviewed-by: Hsin-Yi Wang Signed-off-by: Chun-Kuang Hu commit b29854ec3b9ca6512a783e2153465f27a777a654 Author: Anshuman Gupta Date: Wed Mar 24 17:00:12 2021 +0530 drm/hdcp: DP HDCP2.2 errata LC_Send_L_Prime=16 Fix LC_Send_L_Prime message timeout to 16 as documented in DP HDCP 2.2 errata page 3. https://www.digital-cp.com/sites/default/files/HDCP%202_2_DisplayPort_Errata_v3_0.pdf Cc: Ramalingam C Reviewed-by: Ankit Nautiyal Signed-off-by: Anshuman Gupta Acked-by: Maxime Ripard Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210324113012.7564-3-anshuman.gupta@intel.com commit 989cf9a93892409cf8e84c30c0faaa522ac83807 Author: Anshuman Gupta Date: Wed Mar 24 17:00:11 2021 +0530 drm/i915/hdcp: Add DP HDCP2.2 timeout to read entire msg As documented in HDCP 2.2 DP Errata spec transmitter should abort the authentication protocol in case transmitter has not received the entire {AKE_Send_Cert, AKE_Send_H_prime, AKE_Send_Paring_Info} msg within {110,7,5} miliseconds. Adding above msg timeout values and aborting the HDCP authentication in case it timedout to read entire msg. https://www.digital-cp.com/sites/default/files/HDCP%202_2_DisplayPort_Errata_v3_0.pdf v2: - Removed redundant variable msg_can_timedout. [Ankit] Cc: Ramalingam C Signed-off-by: Anshuman Gupta Reviewed-by: Ankit Nautiyal Acked-by: Maxime Ripard Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210324113012.7564-2-anshuman.gupta@intel.com commit 19e60d6e88a63df70091574b3dfe85945d2fd70f Author: Bhaumik Bhatt Date: Mon Mar 29 18:28:24 2021 -0700 bus: mhi: core: Improve state strings for debug messages As of now abbreviations are being used for many state and execution environment strings. Improve and expand those such that debug messages are clear. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/1617067704-28850-8-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit e72919cebd19618b7341e69034b4d9f7120ff4de Author: Bhaumik Bhatt Date: Mon Mar 29 18:28:23 2021 -0700 bus: mhi: core: Wait for MHI READY state in most scenarios When moving from SYS_ERROR transition to a different execution environment, MHI host relies on the BHI register read to spawn the next image download or wait for READY -> M0 states. The device can at times move the execution environment to mission mode when a pass through is expected, which can result in a stall. Initiate a wait for MHI READY and write M0 such that the device can proceed with state change event updates for any new execution environment being entered. This allows us to remove conditionals in handling firmware load for PBL modes and keeps the execution environment out of the picture as it can change at any time. Signed-off-by: Bhaumik Bhatt Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617067704-28850-7-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit d20e82d4d0167925191f57ccff8b6c406c06176f Author: Bhaumik Bhatt Date: Mon Mar 29 18:28:22 2021 -0700 bus: mhi: core: Identify Flash Programmer as a mission mode use case MHI power up can go through an EDL to Flash Programmer path when the device has a blank NAND. In those cases, mhi_sync_power_up() can timeout waiting for a mission mode execution environment. Allow a successful power up instead by identifying Flash Programmer as a valid mission mode execution environment with a purpose to flash the device image contents. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/1617067704-28850-6-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 66ac7985b2af310aaca14869d6e43b0290e98c07 Author: Carl Yin Date: Mon Mar 29 18:28:21 2021 -0700 bus: mhi: core: Add support for Flash Programmer execution environment MHI WWAN modems support downloading firmware to NAND or eMMC using Firehose protocol with process as follows: 1. Modem boots up, enters AMSS execution environment and the device later enters EDL (Emergency Download) mode through any mechanism host can use such as a diag command. 2. Modem enters SYS_ERROR, MHI host handles SYS_ERROR transition. 3. EDL image for device to enter 'Flash Programmer' execution environment is then flashed via BHI interface from host. 4. Modem enters MHI READY -> M0 and sends the Flash Programmer execution environment change to host. 5. Following that, EDL/FIREHOSE channels (34, 35) are made available from the host. 6. User space tool for downloading firmware image to modem over the EDL channels using Firehose protocol. Link to USB flashing tool: https://git.linaro.org/landing-teams/working/qualcomm/qdl.git/ Make the necessary changes to allow for this sequence to occur and allow using the Flash Programmer execution environment. Signed-off-by: Carl Yin Co-developed-by: Bhaumik Bhatt Signed-off-by: Bhaumik Bhatt Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617067704-28850-5-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 5e15fdc302d1aed8ec8df65ef655242a2ac24e91 Author: Rafał Miłecki Date: Mon Mar 29 18:50:56 2021 +0200 dt-bindings: phy: bcm-ns-usb3-phy: convert to yaml 1. Change syntax from txt to yaml 2. Drop "Driver for" from the title 3. Drop "reg = <0x0>;" from example (noticed by dt_binding_check) 4. Specify license Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210329165056.31647-1-zajec5@gmail.com Signed-off-by: Vinod Koul commit 3f3ec9b692a391f0e4fa0b6aab6d3c28935d610e Author: Rafał Miłecki Date: Mon Mar 29 18:50:41 2021 +0200 dt-bindings: phy: bcm-ns-usb2-phy: convert to yaml 1. Convert from txt to yaml 2. Drop "Driver for" from the title 3. Document "#phy-cells" 4. Fix example node name (noticed by dt_binding_check) 5. Add #include to example (noticed by dt_binding_check) 6. Specify license Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210329165041.31574-1-zajec5@gmail.com Signed-off-by: Vinod Koul commit ad416db9fabe43b53a80deb4444d2a2e246b1cf1 Author: Bhaumik Bhatt Date: Mon Mar 29 18:28:20 2021 -0700 bus: mhi: core: Handle EDL mode entry appropriately Device entering EDL or Emergency Download Mode will be in a SYS_ERROR MHI state. This requires MHI host to proceed with the EDL image download over BHI before device can enter an MHI READY state and proceed with further bootup. Allow this to be handled by relying on the execution environment check after SYS_ERROR processing to determine whether to wait for an MHI READY or download the EDL image over BHI after moving MHI PM state to Power on Reset internally. This way handling is contained well within the MHI core driver and helps pave the way for Flash Programmer execution environment functionality. Signed-off-by: Bhaumik Bhatt Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1617067704-28850-4-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 4f214496ac7421b027a41d067e7753ee0bc5ad6c Author: Bhaumik Bhatt Date: Mon Mar 29 18:28:19 2021 -0700 bus: mhi: core: Wait for ready after an EDL firmware download Currently, the firmware load handler returns after the EDL image is downloaded. Wait for an MHI READY transition instead as the specification expects so as to proceed with further bootup such as device entering Flash Programmer execution environment. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/1617067704-28850-3-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 418bec695696abd1b4d5abca85f143ead2ffedac Author: Bhaumik Bhatt Date: Mon Mar 29 18:28:18 2021 -0700 bus: mhi: core: Rely on accurate method to determine EDL mode Relying on the current execution environment to determine if EDL image was downloaded should not be done as the execution environment can change at this point in error cases and we may misread it. Instead, MHI can rely on the local 'fw_name' variable as a safer alternative. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/1617067704-28850-2-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit a113ef0a5e2eb3015da2e6dee0656d78e66fd691 Author: Geert Uytterhoeven Date: Wed Mar 31 10:19:37 2021 +0200 phy: microchip: PHY_SPARX5_SERDES should depend on ARCH_SPARX5 The Microchip Sparx5 SerDes PHY is present only Microchip Sparx5 SoCs. Hence add a dependency on ARCH_SPARX5, to prevent asking the user about this driver when configuring a kernel without support for Sparx5 SoCs. Fixes: 2ff8a1eeb5aa8bb4 ("phy: Add Sparx5 ethernet serdes PHY driver") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210331081937.367408-1-geert+renesas@glider.be Signed-off-by: Vinod Koul commit b20da3c6b9dd0787e3eec996de806829e1bcaad1 Author: Kishon Vijay Abraham I Date: Tue Mar 30 16:31:38 2021 +0530 phy: cadence-torrent: Add delay for PIPE clock to be stable The Torrent spec specifies delay of 660.5us after phy_reset is asserted by the controller. To be on the safe side provide a delay of 5ms to 10ms in ->phy_on() callback where the SERDES is already configured in bootloader. Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210330110138.24356-6-kishon@ti.com Signed-off-by: Vinod Koul commit e0611d6d9639b79bd2605a9eb2e5cae28edc3e85 Author: Kishon Vijay Abraham I Date: Tue Mar 30 16:31:37 2021 +0530 phy: cadence-torrent: Explicitly request exclusive reset control No functional change. Since the reset controls obtained in Torrent is exclusively used by the Torrent device, use exclusive reset control request API calls. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210330110138.24356-5-kishon@ti.com Signed-off-by: Vinod Koul commit b69d39f6841965559afbc3ecb0e3a8366c8999e8 Author: Kishon Vijay Abraham I Date: Tue Mar 30 16:31:36 2021 +0530 phy: cadence-torrent: Do not configure SERDES if it's already configured Do not configure torrent SERDES if it's already configured. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210330110138.24356-4-kishon@ti.com Signed-off-by: Vinod Koul commit d44b4bf49e0bc8f6195630eb9b397abb5bc162a8 Author: Kishon Vijay Abraham I Date: Tue Mar 30 16:31:35 2021 +0530 phy: cadence-torrent: Group reset APIs and clock APIs No functional change intended. Group reset APIs and clock APIs in preparation for adding support to skip configuration if the SERDES is already configured by bootloader. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210330110138.24356-3-kishon@ti.com Signed-off-by: Vinod Koul commit 725c7b8d300f8f26163435628b41a4c0a014dd24 Author: Faiz Abbas Date: Tue Mar 30 16:31:34 2021 +0530 phy: ti: j721e-wiz: Do not configure wiz if its already configured Serdes lanes might be shared between multiple cores in some usecases and its not possible to lock PLLs for both the lanes independently by the two cores. This requires a bootloader to configure both the lanes at early boot time. To handle this case, skip all configuration if any of the lanes has already been enabled. Signed-off-by: Faiz Abbas Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210330110138.24356-2-kishon@ti.com Signed-off-by: Vinod Koul commit 1436ec309e6251b372b757bfacf88f5954b8f3fd Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:28 2021 +0530 phy: cadence: Sierra: Enable pll_cmnlc and pll_cmnlc1 clocks Get pll_cmnlc and pll_cmnlc1 optional clocks and enable them. This will enable REFRCV/1 in case the pll_cmnlc/1 takes input from REFRCV/1 respectively. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210319124128.13308-14-kishon@ti.com Signed-off-by: Vinod Koul commit 28081b72859f0fa3d5b56cfd84b2f5ba578765d2 Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:27 2021 +0530 phy: cadence: Sierra: Model PLL_CMNLC and PLL_CMNLC1 as clocks (mux clocks) Sierra has two PLLs, PLL_CMNLC and PLL_CMNLC1 and each of these PLLs has two inputs, plllc_refclk (input from pll0_refclk) and refrcv (input from pll1_refclk). Model PLL_CMNLC and PLL_CMNLC1 as clocks so that it's possible to select one of these two inputs from device tree. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210319124128.13308-13-kishon@ti.com Signed-off-by: Vinod Koul commit db7a346405dc71be0c4ad7f39dd7978d4d20dee0 Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:26 2021 +0530 dt-bindings: phy: phy-cadence-sierra: Add binding to model Sierra as clock provider Add #clock-cells binding to model Sierra as clock provider and include clock IDs for PLL_CMNLC and PLL_CMNLC1. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210319124128.13308-12-kishon@ti.com Signed-off-by: Vinod Koul commit 29c2d02adbc817e91f078ace1c625c34928bf73a Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:25 2021 +0530 phy: cadence: Sierra: Add missing clk_disable_unprepare() in .remove callback commit 44d30d622821 ("phy: cadence: Add driver for Sierra PHY") enabled the clock in probe and failed to disable in remove callback. Add missing clk_disable_unprepare() in cdns_sierra_phy_remove(). Fixes: 44d30d622821 ("phy: cadence: Add driver for Sierra PHY") Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210319124128.13308-11-kishon@ti.com Signed-off-by: Vinod Koul commit a0c30cd783b9dfb319ab2d88bb02434b4a815f79 Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:24 2021 +0530 phy: cadence: Sierra: Add array of input clocks in "struct cdns_sierra_phy" Instead of having separate structure members for each input clock, add an array for the input clocks within "struct cdns_sierra_phy". This is in preparation for adding more input clocks required for supporting additional clock combination. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210319124128.13308-10-kishon@ti.com Signed-off-by: Vinod Koul commit fd7abc3c5b8769e22a3759b0ea1893e18aa2caff Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:23 2021 +0530 phy: cadence-torrent: Use a common header file for Cadence SERDES No functional change. In order to have a single header file for all Cadence SERDES move phy-cadence-torrent.h to phy-cadence.h. This is in preparation for adding Cadence Sierra SERDES specific macros. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319124128.13308-9-kishon@ti.com Signed-off-by: Vinod Koul commit 15b0b82d51a39334da37b718bd014f4460117326 Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:22 2021 +0530 phy: cadence: Sierra: Explicitly request exclusive reset control No functional change. Since the reset controls obtained in Sierra is exclusively used by the Sierra device, use exclusive reset control request API calls. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20210319124128.13308-8-kishon@ti.com Signed-off-by: Vinod Koul commit 1d5f40e021f3c047119d2745ae542700871a0833 Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:21 2021 +0530 phy: cadence: Sierra: Move all reset_control_get*() to a separate function No functional change. Group devm_reset_control_get() and devm_reset_control_get_optional() to a separate function. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20210319124128.13308-7-kishon@ti.com Signed-off-by: Vinod Koul commit 7e016cbc526dd3b25837a2f628801d02cbc801dd Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:20 2021 +0530 phy: cadence: Sierra: Move all clk_get_*() to a separate function No functional change. Group all devm_clk_get_optional() to a separate function. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210319124128.13308-6-kishon@ti.com Signed-off-by: Vinod Koul commit 3fb9545657f7cac262eb5f08712dbc8ebdba5096 Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:19 2021 +0530 phy: ti: j721e-wiz: Get PHY properties only for "phy" or "link" subnode "serdes" node (child node of WIZ) can have sub-nodes for representing links or it can have sub-nodes for representing the various clocks within the serdes. Instead of trying to read "reg" from every child node used for assigning "lane_phy_type", read only if the child node's name is "phy" or "link" subnode. Ideally all PHY dt nodes should have node name as "phy", however existing devicetree used "link" as subnode. So in order to maintain old DT compatibility get PHY properties for "phy" or "link" subnode. Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210319124128.13308-5-kishon@ti.com Signed-off-by: Vinod Koul commit 03ada5a37c3a98396026c98015d18337c88b09b3 Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:18 2021 +0530 phy: cadence: Sierra: Create PHY only for "phy" or "link" sub-nodes Cadence Sierra PHY driver registers PHY using devm_phy_create() for all sub-nodes of Sierra device tree node. However Sierra device tree node can have sub-nodes for the various clocks in addtion to the PHY. Use devm_phy_create() only for nodes with name "phy" (or "link" for old device tree) which represent the actual PHY. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210319124128.13308-4-kishon@ti.com Signed-off-by: Vinod Koul commit f7eb147d306ad2efae6837e20d2944f03be42eb4 Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:17 2021 +0530 phy: ti: j721e-wiz: Invoke wiz_init() before of_platform_device_create() Invoke wiz_init() before configuring anything else in Sierra/Torrent (invoked as part of of_platform_device_create()). wiz_init() resets the SERDES device and any configuration done in the probe() of Sierra/Torrent will be lost. In order to prevent SERDES configuration from getting reset, invoke wiz_init() immediately before invoking of_platform_device_create(). Fixes: 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC") Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Cc: # v5.10 Link: https://lore.kernel.org/r/20210319124128.13308-3-kishon@ti.com Signed-off-by: Vinod Koul commit 5b4f5757f83be34d1428a1ffbb68d4a1966e9aae Author: Kishon Vijay Abraham I Date: Fri Mar 19 18:11:16 2021 +0530 phy: cadence: Sierra: Fix PHY power_on sequence Commit 44d30d622821d ("phy: cadence: Add driver for Sierra PHY") de-asserts PHY_RESET even before the configurations are loaded in phy_init(). However PHY_RESET should be de-asserted only after all the configurations has been initialized, instead of de-asserting in probe. Fix it here. Fixes: 44d30d622821d ("phy: cadence: Add driver for Sierra PHY") Signed-off-by: Kishon Vijay Abraham I Cc: # v5.4+ Reviewed-by: Philipp Zabel Link: https://lore.kernel.org/r/20210319124128.13308-2-kishon@ti.com Signed-off-by: Vinod Koul commit 782b76d7abdf02b12c46ed6f1e9bf715569027f7 Author: Ira Weiny Date: Sun Mar 28 23:54:02 2021 -0700 fs/ext2: Replace kmap() with kmap_local_page() The k[un]map() calls in ext2_[get|put]_page() are localized to a single thread. kmap_local_page() is more efficient. Replace the kmap/kunmap calls with kmap_local_page()/kunmap_local(). kunmap_local() requires the mapping address so return that address from ext2_get_page() to be used in ext2_put_page(). This works well because many of the callers need the address anyway so it is not bad to return it along with the page. In addition, kmap_local_page()/kunmap_local() require strict nesting rules to be followed. Document the new nesting requirements of ext2_get_page() and ext2_put_page() as well as the relationship between ext2_get_page(), ext2_find_entry(), and ext2_dotdot(). Adjust one ext2_put_page() call site in ext2_rename() to ensure the new nesting requirements are met. Finally, adjust code style for checkpatch. To: Jan Kara Link: https://lore.kernel.org/r/20210329065402.3297092-3-ira.weiny@intel.com Signed-off-by: Ira Weiny Signed-off-by: Jan Kara commit e2ebb1230455985df6aa45835a451a5404eddd8d Author: Ira Weiny Date: Sun Mar 28 23:54:01 2021 -0700 ext2: Match up ext2_put_page() with ext2_dotdot() and ext2_find_entry() ext2_dotdot() and ext2_find_entry() both require ext2_put_page() to be called after successful return. For some of the calls this corresponding put was hidden in ext2_set_link and ext2_delete_entry(). Match up ext2_put_page() with ext2_dotdot() and ext2_find_entry() in the functions which call them. This makes the code easier to follow regarding the get/put of the page. Clean up comments to match new behavior. To: Jan Kara Link: https://lore.kernel.org/r/20210329065402.3297092-2-ira.weiny@intel.com Signed-off-by: Ira Weiny Signed-off-by: Jan Kara commit ff33d889567eeb744fc427d2a660115217251cc1 Author: Hsin-Yi Wang Date: Wed Mar 31 17:13:27 2021 +0800 arm64: dts: mt8183: Add kukui kodama board kodama is also known as Lenovo 10e Chromebook Tablet. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210331091327.1198529-4-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit d1eaf77f2c6624d4c1e87e50705d195b452f7fb9 Author: Nicolas Boichat Date: Wed Mar 31 17:13:26 2021 +0800 arm64: dts: mt8183: Add kukui kakadu board Kakadu is also known as ASUS Chromebook Detachable CM3. Signed-off-by: Nicolas Boichat Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210331091327.1198529-3-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit d47c1199ca623ba654d277f1b603433f6bef0317 Author: Hsin-Yi Wang Date: Wed Mar 31 17:13:25 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-kodama Kodama is also known as Lenovo 10e Chromebook Tablet. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210331091327.1198529-2-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 58c9e32352b36533dae26fe89824099ace61aa5f Author: Hsin-Yi Wang Date: Wed Mar 31 17:13:24 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-kakadu Kakadu is also known as ASUS Chromebook Detachable CM3. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210331091327.1198529-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit f6dc45610879f88b1c37c07c8342f6764bcd55f4 Author: Enric Balletbo i Serra Date: Wed Mar 31 11:06:58 2021 +0200 arm64: defconfig: Enable options to support panel display for Mediatek Chromebooks There are some Mediatek based Chromebooks supported in the kernel. Enable the required config options to have the panel display working on both devices. This was tested on the ACER Chromebook R13 (MT8173) and the Lenovo Ideapad Duet (MT8183), but should also enable display support for similar devices. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210331090659.4169966-2-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit fbbe38309d563cece4258cca46cfc472920626b6 Author: Enric Balletbo i Serra Date: Wed Mar 31 11:06:57 2021 +0200 arm64: defconfig: Allow mt8173-based boards to boot from usb Enable the option necessary to boot mt8173-based boards to boot from usb devices, like its phy and the regulators needed to have proper support. Signed-off-by: Enric Balletbo i Serra Reviewed-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210331090659.4169966-1-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit a9f8696d4be5228de9d1d4f0e9f027b64d77dab6 Author: Xiaofei Tan Date: Wed Mar 31 17:44:39 2021 +0800 arm64: sve: Provide sve_cond_update_zcr_vq fallback when !ARM64_SVE Compilation fails when KVM is selected and ARM64_SVE isn't. The root cause is that sve_cond_update_zcr_vq is not defined when ARM64_SVE is not selected. Fix it by adding an empty definition when CONFIG_ARM64_SVE=n. Signed-off-by: Xiaofei Tan [maz: simplified commit message, fleshed out dummy #define] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1617183879-48748-1-git-send-email-tanxiaofei@huawei.com commit 04b6603d13be541df73634a18218f34a37820285 Author: Ankit Nautiyal Date: Tue Mar 23 16:54:22 2021 +0530 drm/i915/display: Configure HDMI2.1 Pcon for FRL only if Src-Ctl mode is available Add the check if source control mode is supported by the PCON, before starting configuring PCON for FRL training, as per spec VESA DP2.0-HDMI2.1 PCON Draft-1 Sec-7. v2: Added spec details for the change. (Uma) Signed-off-by: Ankit Nautiyal Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210323112422.1211-3-ankit.k.nautiyal@intel.com commit d4707d79fae08c8996a1ba45965a491045a22dda Author: Dejin Zheng Date: Sun Mar 28 22:41:18 2021 +0800 PCI: xgene: Fix cfg resource mapping In commit e2dcd20b1645 a change was made to use devm_platform_ioremap_resource_byname() to simplify code and remove the res variable; this was wrong since the res variable is still needed and as an outcome the port->cfg_addr gets an erroneous address. Revert the change going back to original behaviour. Link: https://lore.kernel.org/r/20210328144118.305074-1-zhengdejin5@gmail.com Fixes: e2dcd20b1645a ("PCI: controller: Convert to devm_platform_ioremap_resource_byname()") Reported-by: dann.frazier@canonical.com Tested-by: dann frazier Signed-off-by: Dejin Zheng Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org # v5.9+ commit 68a8c645b2538c1cbecf62de916d4f92f03978fb Author: Ankit Nautiyal Date: Tue Mar 23 16:54:21 2021 +0530 drm/dp_helper: Define options for FRL training for HDMI2.1 PCON Currently the FRL training mode (Concurrent, Sequential) and training type (Normal, Extended) are not defined properly and are passed as bool values in drm_helpers for pcon configuration for FRL training. This patch: -Add register masks for Sequential and Normal FRL training options. -Fixes the drm_helpers for FRL Training configuration to use the appropriate masks. -Modifies the calls to the above drm_helpers in i915/intel_dp as per the above change. v2: Re-used the register masks for these options, instead of enum. (Ville) Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Acked-by: Maxime Ripard Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210323112422.1211-2-ankit.k.nautiyal@intel.com commit 923961a7ff2e94d3d824d9ea7047178a5a123245 Author: Will Deacon Date: Wed Dec 9 14:09:25 2020 +0800 KVM: arm64: Advertise KVM UID to guests via SMCCC We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-3-jianyong.wu@arm.com commit 6e085e0ac9cf16298b5fefe0b1893f98ef765812 Author: Will Deacon Date: Wed Dec 9 14:09:24 2020 +0800 arm/arm64: Probe for the presence of KVM hypervisor Although the SMCCC specification provides some limited functionality for describing the presence of hypervisor and firmware services, this is generally applicable only to functions designated as "Arm Architecture Service Functions" and no portable discovery mechanism is provided for standard hypervisor services, despite having a designated range of function identifiers reserved by the specification. In an attempt to avoid the need for additional firmware changes every time a new function is added, introduce a UID to identify the service provider as being compatible with KVM. Once this has been established, additional services can be discovered via a feature bitmap. Reviewed-by: Steven Price Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu [maz: move code to its own file, plug it into PSCI] Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20201209060932.212364-2-jianyong.wu@arm.com commit b1306fef1f48c0af1d659c18c53cf275fdcc94be Author: Xu Jia Date: Wed Mar 31 15:36:19 2021 +0800 KVM: arm64: Make symbol '_kvm_host_prot_finalize' static The sparse tool complains as follows: arch/arm64/kvm/arm.c:1900:6: warning: symbol '_kvm_host_prot_finalize' was not declared. Should it be static? This symbol is not used outside of arm.c, so this commit marks it static. Reported-by: Hulk Robot Signed-off-by: Xu Jia Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1617176179-31931-1-git-send-email-xujia39@huawei.com commit c126f7c3b8c41f5ca146e52e70ae927e3be30060 Author: Dmitry Osipenko Date: Mon Mar 29 22:55:30 2021 +0300 i2c: Make i2c_recover_bus() to return -EBUSY if bus recovery unimplemented The i2c_recover_bus() returns -EOPNOTSUPP if bus recovery isn't wired up by the bus driver, which the case for Tegra I2C driver for example. This error code is then propagated to I2C client and might be confusing, thus make i2c_recover_bus() to return -EBUSY instead. Suggested-by: Wolfram Sang Signed-off-by: Dmitry Osipenko Signed-off-by: Wolfram Sang commit 8f66edb25c4e10f8380c88f4c097158ff611fd10 Author: Tian Tao Date: Thu Mar 25 20:04:32 2021 +0800 i2c: stm32f7: Remove useless error message Fix the following coccicheck report: drivers/i2c/busses/i2c-stm32f7.c:2032:3-10 : platform_get_irq : line 2032 is redundant because platform_get_irq() already prints an error Remove dev_err() messages after platform_get_irq() failures. Signed-off-by: Tian Tao Signed-off-by: Zihao Tang Reviewed-by: Alain Volmat Signed-off-by: Wolfram Sang commit 1a0e240d09413ac6c90ce6247afdfc424c84103f Author: Thierry Reding Date: Tue Mar 23 16:57:13 2021 +0100 i2c: tegra-bpmp: Implement better error handling Inspect a message's return value upon successful IVC transaction to determine if the I2C transaction on the BPMP side was successful. Heavily based on work by Timo Alho . Signed-off-by: Thierry Reding Signed-off-by: Wolfram Sang commit 206fa766ca2151d728a0894bdb03688d48564aa0 Author: Aditya Srivastava Date: Wed Mar 31 02:23:30 2021 +0530 ARM: OMAP1: fix incorrect kernel-doc comment syntax in file The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for arch/arm/mach-omap1/timer.c follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc: "warning: expecting prototype for OMAP1 Dual(). Prototype was for OMAP1610_GPTIMER1_BASE() instead" Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Aaro Koskinen Acked-by: Randy Dunlap Signed-off-by: Tony Lindgren commit 7c4a0b3e5cb092ebedd95d31bd8cb93bd0f86b1d Author: Aditya Srivastava Date: Wed Mar 31 02:29:08 2021 +0530 ARM: OMAP2+: fix incorrect kernel-doc comment syntax in file The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. The header for arch/arm/mach-omap2/omap_twl.c follows this syntax, but the content inside does not comply with kernel-doc. This line was probably not meant for kernel-doc parsing, but is parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warning from kernel-doc: "warning: wrong kernel-doc identifier on line: * OMAP and TWL PMIC specific initializations." Provide a simple fix by replacing this occurrence with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Signed-off-by: Tony Lindgren commit 235e384526e44e902087fd5012e6ac6e8877f1d1 Author: Lifu Chen Date: Sat Mar 27 17:52:27 2021 +0800 ARM: OMAP2+: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Lifu Chen Signed-off-by: Tony Lindgren commit ee368a10d0dfb27bbff36361ea2166f864028a8b Author: Drew Fustini Date: Wed Mar 24 15:22:02 2021 -0700 ARM: dts: am335x-boneblack.dts: unique gpio-line-names Based on linux-gpio discussion [1], it is best practice to make the gpio-line-names unique. Generic names like "[ethernet]" are replaced with the name of the unique signal on the AM3358 SoC ball corresponding to the gpio line. "[NC]" is also renamed to the standard "NC" name to represent "not connected". [1] https://lore.kernel.org/linux-gpio/20201216195357.GA2583366@x1/ Signed-off-by: Drew Fustini Signed-off-by: Tony Lindgren commit 937c49d10b4dc8e81ed1a24ffab8d70bba138af1 Author: Aneesh Kumar K.V Date: Thu Mar 18 09:18:55 2021 +0530 powerpc/mm: Revert "powerpc/mm: Remove DEBUG_VM_PGTABLE support on powerpc" This reverts commit 675bceb097e6 ("powerpc/mm: Remove DEBUG_VM_PGTABLE support on powerpc") All the related issues are fixed as of commit: f14312e1ed1e ("mm/debug_vm_pgtable: avoid doing memory allocation with pgtable_t mapped.") Hence re-enable it. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210318034855.74513-1-aneesh.kumar@linux.ibm.com commit a3fc712c5b37aec802438fe0de095d7f6f3827a3 Author: Cui GaoSheng Date: Tue Mar 30 23:07:24 2021 -0400 seccomp: Fix "cacheable" typo in comments Do a trivial typo fix: s/cachable/cacheable/ Reported-by: Hulk Robot Signed-off-by: Cui GaoSheng Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210331030724.84419-1-cuigaosheng1@huawei.com commit 64bdc0244054f7d4bb621c8b4455e292f4e421bc Author: Kenta.Tada@sony.com Date: Sun Mar 21 15:52:19 2021 +0000 seccomp: Fix CONFIG tests for Seccomp_filters Strictly speaking, seccomp filters are only used when CONFIG_SECCOMP_FILTER. This patch fixes the condition to enable "Seccomp_filters" in /proc/$pid/status. Signed-off-by: Kenta Tada Fixes: c818c03b661c ("seccomp: Report number of loaded filters in /proc/$pid/status") Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/OSBPR01MB26772D245E2CF4F26B76A989F5669@OSBPR01MB2677.jpnprd01.prod.outlook.com commit 63f8af0fc34197a276674fa0d4d865aeff1f0172 Author: KP Singh Date: Tue Mar 23 01:47:52 2021 +0000 selftests/bpf: Add an option for a debug shell in vmtest.sh The newly introduced -s command line option starts an interactive shell. If a command is specified, the shell is started after the command finishes executing. It's useful to have a shell especially when debugging failing tests or developing new tests. Since the user may terminate the VM forcefully, an extra "sync" is added after the execution of the command to persist any logs from the command into the log file. Signed-off-by: KP Singh Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210323014752.3198283-1-kpsingh@kernel.org commit 23738e74472f9c5f3a05a68724a2ccfba97d283d Author: Chao Yu Date: Wed Mar 31 11:16:32 2021 +0800 f2fs: fix to restrict mount condition on readonly block device When we mount an unclean f2fs image in a readonly block device, let's make mount() succeed only when there is no recoverable data in that image, otherwise after mount(), file fsyned won't be recovered as user expected. Fixes: 938a184265d7 ("f2fs: give a warning only for readonly partition") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 11d92156f7a862091009d7655d19c1e7de37fc7a Author: Michael Ellerman Date: Tue Mar 16 12:09:38 2021 +1100 powerpc/pseries: Only register vio drivers if vio bus exists The vio bus is a fake bus, which we use on pseries LPARs (guests) to discover devices provided by the hypervisor. There's no need or sense in creating the vio bus on bare metal systems. Which is why commit 4336b9337824 ("powerpc/pseries: Make vio and ibmebus initcalls pseries specific") made the initialisation of the vio bus only happen in LPARs. However as a result of that commit we now see errors at boot on bare metal systems: Driver 'hvc_console' was unable to register with bus_type 'vio' because the bus was not initialized. Driver 'tpm_ibmvtpm' was unable to register with bus_type 'vio' because the bus was not initialized. This happens because those drivers are built-in, and are calling vio_register_driver(). It in turn calls driver_register() with a reference to vio_bus_type, but we haven't registered vio_bus_type with the driver core. Fix it by also guarding vio_register_driver() with a check to see if we are on pseries. Fixes: 4336b9337824 ("powerpc/pseries: Make vio and ibmebus initcalls pseries specific") Reported-by: Paul Menzel Signed-off-by: Michael Ellerman Tested-by: Paul Menzel Reviewed-by: Tyrel Datwyler Link: https://lore.kernel.org/r/20210316010938.525657-1-mpe@ellerman.id.au commit abbe1eff907f38d82de8a94000f15b56f6a0204b Author: Stephen Boyd Date: Tue Mar 30 19:27:02 2021 -0700 clk: socfpga: Fix code formatting This function's parameters are oddly formatted. Looks like a newline was missed or something. Fix it. Cc: Dinh Nguyen Link: https://lore.kernel.org/r/20210331023119.3294893-1-sboyd@kernel.org Signed-off-by: Stephen Boyd commit ba7e258425acd8587b62196e3f00f62c0f7625d0 Author: Dinh Nguyen Date: Tue Mar 2 15:41:51 2021 -0600 clk: socfpga: Convert to s10/agilex/n5x to use clk_hw As recommended by Stephen Boyd, convert the Agilex/Stratix10/n5x clock driver to use the clk_hw registration method. Suggested-by: Stephen Boyd Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20210302214151.1333447-3-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit 8c489216c3e103a24856fd676fc5f51619c2e052 Author: Dinh Nguyen Date: Tue Mar 2 15:41:50 2021 -0600 clk: socfpga: arria10: convert to use clk_hw As recommended by Stephen Boyd, convert the Arria10 clock driver to use the clk_hw registration method. Suggested-by: Stephen Boyd Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20210302214151.1333447-2-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit 2c2b9c6067170de2a63e7e3d9f5bb205b870de7c Author: Dinh Nguyen Date: Tue Mar 2 15:41:49 2021 -0600 clk: socfpga: use clk_hw_register for a5/c5 As recommended by Stephen Boyd, convert the cyclone5/arria5 clock driver to use the clk_hw registration method. Suggested-by: Stephen Boyd Signed-off-by: Dinh Nguyen Link: https://lore.kernel.org/r/20210302214151.1333447-1-dinguyen@kernel.org Signed-off-by: Stephen Boyd commit b30d0040f06159de97ad9c0b1536f47250719d7d Author: Sergey Shtylyov Date: Mon Mar 15 23:15:06 2021 +0300 ata: libahci_platform: fix IRQ check Iff platform_get_irq() returns 0, ahci_platform_init_host() would return 0 early (as if the call was successful). Override IRQ0 with -EINVAL instead as the 'libata' regards 0 as "no IRQ" (thus polling) anyway... Fixes: c034640a32f8 ("ata: libahci: properly propagate return value of platform_get_irq()") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/4448c8cc-331f-2915-0e17-38ea34e251c8@omprussia.ru Signed-off-by: Jens Axboe commit e6471a65fdd5efbb8dd2732dd0f063f960685ceb Author: Sergey Shtylyov Date: Sun Mar 28 00:13:49 2021 +0300 sata_mv: add IRQ checks The function mv_platform_probe() neglects to check the results of the calls to platform_get_irq() and irq_of_parse_and_map() and blithely passes them to ata_host_activate() -- while the latter only checks for IRQ0 (treating it as a polling mode indicattion) and passes the negative values to devm_request_irq() causing it to fail as it takes unsigned values for the IRQ #... Add to mv_platform_probe() the proper IRQ checks to pass the positive IRQ #s to ata_host_activate(), propagate upstream the negative error codes, and override the IRQ0 with -EINVAL (as we don't want the polling mode). Fixes: f351b2d638c3 ("sata_mv: Support SoC controllers") Signed-off-by: Sergey Shtylyov Link: https://lore.kernel.org/r/51436f00-27a1-e20b-c21b-0e817e0a7c86@omprussia.ru Signed-off-by: Jens Axboe commit ff237990277ff3a94ba4848c991bef24fd175cc0 Author: Lee Jones Date: Thu Mar 18 08:51:50 2021 +0000 ata: pata_acpi: Fix some incorrect function param descriptions Fixes the following W=1 kernel build warning(s): drivers/ata/pata_acpi.c:38: warning: Function parameter or member 'link' not described in 'pacpi_pre_reset' drivers/ata/pata_acpi.c:38: warning: Excess function parameter 'ap' description in 'pacpi_pre_reset' drivers/ata/pata_acpi.c:74: warning: Function parameter or member 'ap' not described in 'pacpi_discover_modes' drivers/ata/pata_acpi.c:74: warning: Excess function parameter 'mask' description in 'pacpi_discover_modes' drivers/ata/pata_acpi.c:239: warning: Function parameter or member 'id' not described in 'pacpi_init_one' drivers/ata/pata_acpi.c:239: warning: Excess function parameter 'ent' description in 'pacpi_init_one' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-16-lee.jones@linaro.org Signed-off-by: Jens Axboe commit c86a2a28bde8b173664893da47137cdbe3d5b14f Author: Lee Jones Date: Thu Mar 18 08:51:49 2021 +0000 ata: libata-acpi: Fix function name and provide description for 'prev_gtf' Fixes the following W=1 kernel build warning(s): drivers/ata/libata-acpi.c:493: warning: expecting prototype for ata_acpi_gtm_xfermode(). Prototype was for ata_acpi_gtm_xfermask() instead drivers/ata/libata-acpi.c:648: warning: Function parameter or member 'prev_gtf' not described in 'ata_acpi_run_tf' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-15-lee.jones@linaro.org Signed-off-by: Jens Axboe commit c172b359d71156a41fe036f1aa8f9560938fd9bf Author: Lee Jones Date: Thu Mar 18 08:51:48 2021 +0000 ata: sata_mv: Fix misnaming of 'mv_bmdma_stop()' Fixes the following W=1 kernel build warning(s): drivers/ata/sata_mv.c:1929: warning: expecting prototype for mv_bmdma_stop(). Prototype was for mv_bmdma_stop_ap() instead Cc: Jens Axboe Cc: Mark Lord Cc: ALWAYS copy Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-14-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 1cade50f5092a09001b33209cd81426122f0af19 Author: Lee Jones Date: Thu Mar 18 08:51:47 2021 +0000 ata: pata_cs5530: Fix misspelling of 'cs5530_init_one()'s 'pdev' param Fixes the following W=1 kernel build warning(s): drivers/ata/pata_cs5530.c:283: warning: Function parameter or member 'pdev' not described in 'cs5530_init_one' drivers/ata/pata_cs5530.c:283: warning: Excess function parameter 'dev' description in 'cs5530_init_one' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-13-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 145f74fa6254e4da4a33c9f22e1c804dd426fc8b Author: Lee Jones Date: Thu Mar 18 08:51:46 2021 +0000 ata: pata_legacy: Repair a couple kernel-doc problems Fixes the following W=1 kernel build warning(s): drivers/ata/pata_legacy.c:606: warning: expecting prototype for opt82c465mv_qc_issue(). Prototype was for opti82c46x_qc_issue() instead drivers/ata/pata_legacy.c:933: warning: Function parameter or member 'probe' not described in 'legacy_init_one' drivers/ata/pata_legacy.c:933: warning: Excess function parameter 'pl' description in 'legacy_init_one' drivers/ata/pata_legacy.c:1024: warning: Function parameter or member 'primary' not described in 'legacy_check_special_cases' drivers/ata/pata_legacy.c:1024: warning: Function parameter or member 'secondary' not described in 'legacy_check_special_cases' drivers/ata/pata_legacy.c:1024: warning: Excess function parameter 'master' description in 'legacy_check_special_cases' drivers/ata/pata_legacy.c:1024: warning: Excess function parameter 'master' description in 'legacy_check_special_cases' Cc: Jens Axboe Cc: Colten Edwards Cc: Samuel Thibault Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-12-lee.jones@linaro.org Signed-off-by: Jens Axboe commit b7ab575f80f6168dea1bfd13e5aec537a869a53b Author: Lee Jones Date: Thu Mar 18 08:51:45 2021 +0000 ata: ata_generic: Fix misspelling of 'ata_generic_init_one()' Fixes the following W=1 kernel build warning(s): drivers/ata/ata_generic.c:164: warning: expecting prototype for ata_generic_init(). Prototype was for ata_generic_init_one() instead Cc: Jens Axboe Cc: Andre Hedrick Cc: Hat Inc Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-11-lee.jones@linaro.org Signed-off-by: Jens Axboe commit dee1d6f3c70d5b3894c113b1d11d5e7eb0394efb Author: Lee Jones Date: Thu Mar 18 08:51:44 2021 +0000 ata: pata_opti: Fix spelling issue of 'val' in 'opti_write_reg()' Fixes the following W=1 kernel build warning(s): drivers/ata/pata_opti.c:82: warning: Function parameter or member 'val' not described in 'opti_write_reg' drivers/ata/pata_opti.c:82: warning: Excess function parameter 'value' description in 'opti_write_reg' Cc: Jens Axboe Cc: Jaromir Koutek Cc: Jan Harkes Cc: Mark Lord Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-10-lee.jones@linaro.org Signed-off-by: Jens Axboe commit d29b031d43fbd46ce683572909427f1588f6f2ce Author: Lee Jones Date: Thu Mar 18 08:51:43 2021 +0000 ata: pata_sl82c105: Fix potential doc-rot Fixes the following W=1 kernel build warning(s): drivers/ata/pata_sl82c105.c:191: warning: expecting prototype for sl82c105_bmdma_end(). Prototype was for sl82c105_bmdma_stop() instead Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-9-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 05f4226ac537cc5fb43bc6f24c2dca54302300ae Author: Lee Jones Date: Thu Mar 18 08:51:42 2021 +0000 ata: pata_piccolo: 'ata_tosh_init()' is misnamed in its header Fixes the following W=1 kernel build warning(s): drivers/ata/pata_piccolo.c:87: warning: expecting prototype for ata_tosh_init(). Prototype was for ata_tosh_init_one() instead Cc: Jens Axboe Cc: Andre Hedrick Cc: Hat Inc Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-8-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 87eac27c920477059f766acea1c4390934738d11 Author: Lee Jones Date: Thu Mar 18 08:51:41 2021 +0000 ata: pata_via: Fix a kernel-doc formatting issue Fixes the following W=1 kernel build warning(s): drivers/ata/pata_via.c:675: warning: Function parameter or member 'pdev' not described in 'via_reinit_one' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-7-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 39ac4018c85bd5435ff3b47cc602dbdf87be54ac Author: Lee Jones Date: Thu Mar 18 08:51:40 2021 +0000 ata: pata_it821x: Fix possible doc-rotted function names Fixes the following W=1 kernel build warning(s): drivers/ata/pata_it821x.c:346: warning: expecting prototype for it821x_passthru_dma_start(). Prototype was for it821x_passthru_bmdma_start() instead drivers/ata/pata_it821x.c:369: warning: expecting prototype for it821x_passthru_dma_stop(). Prototype was for it821x_passthru_bmdma_stop() instead Cc: Jens Axboe Cc: Alan Cox Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-6-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 2ee628f3cf2584927ab30c585bfa268247486731 Author: Lee Jones Date: Thu Mar 18 08:51:39 2021 +0000 ata: pata_triflex: Repair some misnamed functions and fix some param descriptions Fixes the following W=1 kernel build warning(s): drivers/ata/pata_triflex.c:143: warning: expecting prototype for triflex_dma_start(). Prototype was for triflex_bmdma_start() instead drivers/ata/pata_triflex.c:159: warning: Function parameter or member 'qc' not described in 'triflex_bmdma_stop' drivers/ata/pata_triflex.c:159: warning: expecting prototype for triflex_dma_stop(). Prototype was for triflex_bmdma_stop() instead Cc: Jens Axboe Cc: Alan Cox Cc: Torben Mathiasen Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-5-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 8927c41e3118e0d00ea88c1a0a7ffa360ec3bf8e Author: Lee Jones Date: Thu Mar 18 08:51:38 2021 +0000 ata: pata_sis: Remove superfluous param description and supply another Fixes the following W=1 kernel build warning(s): drivers/ata/pata_sis.c:124: warning: Excess function parameter 'deadline' description in 'sis_133_cable_detect' drivers/ata/pata_sis.c:529: warning: Function parameter or member 'mask' not described in 'sis_133_mode_filter' Cc: Jens Axboe Cc: Andre Hedrick Cc: Lionel Bouton Cc: Vojtech Pavlik Cc: "L.C. Chang" Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-4-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 91c50d8a1f9a28b3725154bc0046d8ac4bf11796 Author: Lee Jones Date: Thu Mar 18 08:51:37 2021 +0000 ata: pata_sil680: Add some missing function parameter docs Fixes the following W=1 kernel build warning(s): drivers/ata/pata_sil680.c:68: warning: Function parameter or member 'adev' not described in 'sil680_seldev' drivers/ata/pata_sil680.c:254: warning: Function parameter or member 'try_mmio' not described in 'sil680_init_chip' Cc: Jens Axboe Cc: Andre Hedrick Cc: Red Hat Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-3-lee.jones@linaro.org Signed-off-by: Jens Axboe commit ffa137cb8d17902a44bd473d1ff56485dbb19b7c Author: Lee Jones Date: Thu Mar 18 08:51:36 2021 +0000 ata: pata_pdc202xx_old: Fix some incorrectly named functions Fixes the following W=1 kernel build warning(s): drivers/ata/pata_pdc202xx_old.c:127: warning: expecting prototype for pdc202xx_configure_dmamode(). Prototype was for pdc202xx_set_dmamode() instead drivers/ata/pata_pdc202xx_old.c:228: warning: expecting prototype for pdc2026x_bmdma_end(). Prototype was for pdc2026x_bmdma_stop() instead Cc: Jens Axboe Cc: Alan Cox Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210318085150.3131936-2-lee.jones@linaro.org Signed-off-by: Jens Axboe commit 5911d2d1d1a38b26585383478bd71d9254e48bdf Author: Chao Yu Date: Sat Mar 27 17:57:06 2021 +0800 f2fs: introduce gc_merge mount option In this patch, we will add two new mount options: "gc_merge" and "nogc_merge", when background_gc is on, "gc_merge" option can be set to let background GC thread to handle foreground GC requests, it can eliminate the sluggish issue caused by slow foreground GC operation when GC is triggered from a process with limited I/O and CPU resources. Original idea is from Xiang. Signed-off-by: Gao Xiang Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 28110056f2d07a576ca045a38f80de051b13582a Author: Eric Lin Date: Wed Mar 31 09:04:17 2021 +0800 net: ethernet: Fix typo of 'network' in comment Signed-off-by: Eric Lin Reported-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 7866f265b824589f2cf45fce8bf82d152557bd7c Author: Ido Schimmel Date: Tue Mar 30 09:58:41 2021 +0300 mlxsw: spectrum_router: Only perform atomic nexthop bucket replacement when requested When cleared, the 'force' parameter in nexthop bucket replacement notifications indicates that a driver should try to perform an atomic replacement. Meaning, only update the contents of the bucket if it is inactive. Since mlxsw only queries buckets' activity once every second, there is no point in trying an atomic replacement if the idle timer interval is smaller than 1 second. Currently, mlxsw ignores the original value of 'force' and will always try an atomic replacement if the idle timer is not smaller than 1 second. Fix this by taking the original value of 'force' into account and never promoting a non-atomic replacement to an atomic one. Fixes: 617a77f044ed ("mlxsw: spectrum_router: Add nexthop bucket replacement support") Reported-by: Colin Ian King Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 65550f03e98b4dd9f5050ee8c463f30cae95ae90 Merge: b8128656a5edd 5e287fe761495 Author: David S. Miller Date: Tue Mar 30 17:42:23 2021 -0700 Merge branch 'mptcp-subflow-disconnected' Mat Martineau says: ==================== MPTCP: Allow initial subflow to be disconnected An MPTCP connection is aggregated from multiple TCP subflows, and can involve multiple IP addresses on either peer. The addresses used in the initial subflow connection are assigned address id 0 on each side of the link. More addresses can be added and shared with the peer using address IDs of 1 or larger. MPTCP in Linux shares non-zero address IDs across all MPTCP connections in a net namespace, which allows userspace to manage subflow connections across a number of sockets. However, this makes the address with id 0 a special case, since the IP address associated with id 0 is potentially different for each socket. This patch set allows the initial subflow to be disconnected when userspace specifies an address to remove using both id 0 and an IP address, or when the peer sends an RM_ADDR for id 0. Patches 1 and 3 implement the change for requests from the peer and userspace, respectively. Patch 2 consolidates some code for disconnecting subflows. Patches 4-6 update the self tests to cover removal of subflows using address id 0. ==================== Signed-off-by: David S. Miller commit 5e287fe761495eb669b5e2543919bd5124edecf1 Author: Geliang Tang Date: Tue Mar 30 17:08:56 2021 -0700 selftests: mptcp: remove id 0 address testcases This patch added the testcases for removing the id 0 subflow and the id 0 address. In do_transfer, use the removing addresses number '9' for deleting the id 0 address. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit 2d121c9a882a93d5b229fc13deb10036a1b35967 Author: Geliang Tang Date: Tue Mar 30 17:08:55 2021 -0700 selftests: mptcp: add addr argument for del_addr For the id 0 address, different MPTCP connections could be using different IP addresses for id 0. This patch added an extra argument IP address for del_addr when using id 0. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit 6254ad408820ca84283798c8fdbda3b01259a9a8 Author: Matthieu Baerts Date: Tue Mar 30 17:08:54 2021 -0700 selftests: mptcp: avoid calling pm_nl_ctl with bad IDs IDs are supposed to be between 0 and 255. In pm_nl_ctl, for both the 'add' and 'get' instruction, the ID is casted in a u_int8_t. So if we give 256, we will delete ID 0. Obviously, the goal is not to delete this ID by giving 256. We could modify pm_nl_ctl and stop if the ID is negative or higher than 255 but probably better not to increase the number of lines for such things in this tool which is only used in selftests. Instead, we use it within the limits. This modification also means that we will no longer add a new ID for the 2nd entry. That's why we removed an expected entry from the dump and introduced with commit dc8eb10e95a8 ("selftests: mptcp: add testcases for setting the address ID"). So now we delete ID 9 like before and we add entries for IDs 10 to 255 that are deleted just after. Note that this could be seen as a fix but it was not really an issue so far: we were simply playing with ID 0/1 once again. With the following commit ("selftests: mptcp: add addr argument for del_addr"), it will be different because ID 0 is going to required an address. We don't want errors when trying to delete ID 0 without the address argument. Acked-and-tested-by: Geliang Tang Signed-off-by: Matthieu Baerts Signed-off-by: David S. Miller commit 740d798e8767d8a449902b1a1bbc70facfce19b5 Author: Geliang Tang Date: Tue Mar 30 17:08:53 2021 -0700 mptcp: remove id 0 address This patch added a new function mptcp_nl_remove_id_zero_address to remove the id 0 address. In this function, traverse all the existing msk sockets to find the msk matched the input IP address. Then fill the removing list with id 0, and pass it to mptcp_pm_remove_addr and mptcp_pm_remove_subflow. Suggested-by: Paolo Abeni Suggested-by: Matthieu Baerts Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit 9f12e97bf16cb4032ae199537e5a1500dfafee90 Author: Geliang Tang Date: Tue Mar 30 17:08:52 2021 -0700 mptcp: unify RM_ADDR and RM_SUBFLOW receiving There are some duplicate code in mptcp_pm_nl_rm_addr_received and mptcp_pm_nl_rm_subflow_received. This patch unifies them into a new function named mptcp_pm_nl_rm_addr_or_subflow. In it, use the input parameter rm_type to identify it's now removing an address or a subflow. Suggested-by: Paolo Abeni Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit 774c8a8dcb3cba72e37394dbc7803fe575e1292c Author: Geliang Tang Date: Tue Mar 30 17:08:51 2021 -0700 mptcp: remove all subflows involving id 0 address There's only one subflow involving the non-zero id address, but there may be multi subflows involving the id 0 address. Here's an example: local_id=0, remote_id=0 local_id=1, remote_id=0 local_id=0, remote_id=1 If the removing address id is 0, all the subflows involving the id 0 address need to be removed. In mptcp_pm_nl_rm_addr_received/mptcp_pm_nl_rm_subflow_received, the "break" prevents the iteration to the next subflow, so this patch dropped them. Reviewed-by: Mat Martineau Signed-off-by: Geliang Tang Signed-off-by: David S. Miller commit b8128656a5edd23a91542c9da849cd878a54148d Author: Eric Dumazet Date: Tue Mar 30 14:06:13 2021 -0700 net: fix icmp_echo_enable_probe sysctl sysctl_icmp_echo_enable_probe is an u8. ipv4_net_table entry should use .maxlen = sizeof(u8). .proc_handler = proc_dou8vec_minmax, Fixes: f1b8fa9fa586 ("net: add sysctl for enabling RFC 8335 PROBE messages") Signed-off-by: Eric Dumazet Cc: Andreas Roeseler Signed-off-by: David S. Miller commit 3c7a83fa427daf08c46a9af41be3cd3267832fe6 Merge: 578c97b0b243c aa620993b1e58 Author: David S. Miller Date: Tue Mar 30 17:37:13 2021 -0700 Merge branch 'ionic-cleanups' Shannon Nelson says: ==================== ionic: code cleanup for heartbeat, dma error counts, sizeof, stats These patches are a few more bits of code cleanup found in testing and review: count all our dma error instances, make better use of sizeof, fix a race in our device heartbeat check, and clean up code formatting in the ethtool stats collection. ==================== Signed-off-by: David S. Miller commit aa620993b1e58e19a556bc3a7f0e15ac08bf2e46 Author: Shannon Nelson Date: Tue Mar 30 12:52:10 2021 -0700 ionic: pull per-q stats work out of queue loops Abstract out the per-queue data collection work into separate functions from the per-queue loops in the stats reporting, similar to what Alex did for the data label strings in commit acebe5b6107c ("ionic: Update driver to use ethtool_sprintf") Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit b2b9a8d7ed134ae72e5ef8d0003d054af8e5e2bf Author: Shannon Nelson Date: Tue Mar 30 12:52:09 2021 -0700 ionic: avoid races in ionic_heartbeat_check Rework the heartbeat checks to be sure that we're getting an atomic operation. Through testing we found occasions where a separate thread could clash with this check and cause erroneous heartbeat check results. Signed-off-by: Allen Hubbe Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 230efff47adbea8274810b593a9caf8e46c2c1f7 Author: Shannon Nelson Date: Tue Mar 30 12:52:08 2021 -0700 ionic: fix sizeof usage Use the actual pointer that we care about as the subject of the sizeof, rather than a struct name. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 0f4e7f4e77b2078955f3cf78f0b818a0d2b898e1 Author: Shannon Nelson Date: Tue Mar 30 12:52:07 2021 -0700 ionic: count dma errors Increment our dma-error counter in a couple of spots that were missed before. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 578c97b0b243c7450b78464c1f34d2590f996734 Merge: e48792a9ec789 bc96781a89599 Author: David S. Miller Date: Tue Mar 30 17:18:26 2021 -0700 Merge branch 'dpaa2-switch-STP' Ioana Ciornei says: ==================== dpaa2-switch: add STP support This patch set adds support for STP to the dpaa2-switch. First of all, it fixes a bug which was determined by the improper usage of bridge BR_STATE_* values directly in the MC ABI. The next patches deal with creating an ACL table per port and trapping the STP frames to the control interface by adding an entry into each table. The last patch configures proper learning state depending on the STP state. ==================== Signed-off-by: David S. Miller commit bc96781a895996c66f1d20411202f24000bfbab8 Author: Ioana Ciornei Date: Tue Mar 30 17:54:19 2021 +0300 dpaa2-switch: setup learning state on STP state change Depending on what STP state a port is in, the learning on that port should be enabled or disabled. When the STP state is DISABLED, BLOCKING or LISTENING no learning should be happening irrespective of what the bridge previously requested. The learning state is changed to be the one setup by the bridge when the STP state is LEARNING or FORWARDING. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 1a64ed129cce958921bebbde0842d9a0ba0205ba Author: Ioana Ciornei Date: Tue Mar 30 17:54:18 2021 +0300 dpaa2-switch: trap STP frames to the CPU Add an ACL entry in each port's ACL table to redirect any frame that has the destination MAC address equal to the STP dmac to the control interface. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 62734c7405b749a760c88c3e33d250c9efde263e Author: Ioana Ciornei Date: Tue Mar 30 17:54:17 2021 +0300 dpaa2-switch: keep track of the current learning state per port Keep track of the current learning state per port so that we can reference it in the next patches when setting up a STP state. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 90f07102352945efcd75ade6e9293bfe0306b3fe Author: Ioana Ciornei Date: Tue Mar 30 17:54:16 2021 +0300 dpaa2-switch: create and assign an ACL table per port In order to trap frames to the CPU, the DPAA2 switch uses the ACL table. At probe time, create an ACL table for each switch port so that in the next patches we can use this to trap STP frames and redirect them to the control interface. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 6aa6791d1a0fa9cf371287d2134f95a936da408a Author: Ioana Ciornei Date: Tue Mar 30 17:54:15 2021 +0300 dpaa2-switch: fix the translation between the bridge and dpsw STP states The numerical values used for STP states are different between the bridge and the MC ABI therefore, the direct usage of the BR_STATE_* macros directly in the structures passed to the firmware is incorrect. Create a separate function that translates between the bridge STP states and the enum that holds the STP state as seen by the Management Complex. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit e48792a9ec7898444fec6577611a6205e36dfdb9 Author: Vlad Buslov Date: Tue Mar 30 13:41:10 2021 +0300 tc-testing: add simple action change test Use act_simple to verify that action created with 'tc actions change' command exists after command returns. The goal is to verify internal action API reference counting to ensure that the case when netlink message has NLM_F_REPLACE flag set but action with specified index doesn't exist is handled correctly. Signed-off-by: Vlad Buslov Signed-off-by: David S. Miller commit df82e9c6dd8426577bf02392928c51c8e7ed30e1 Merge: dc5fa2073f639 a062260a9d5fc Author: David S. Miller Date: Tue Mar 30 17:06:50 2021 -0700 Merge branch 'udp-gro-L4' Paolo Abeni says: ==================== udp: GRO L4 improvements This series improves the UDP L4 - either 'forward' or 'frag_list' - co-existence with UDP tunnel GRO, allowing the first to take place correctly even for encapsulated UDP traffic. The first for patches are mostly bugfixes, addressing some GRO edge-cases when both tunnels and L4 are present, enabled and in use. The next 3 patches avoid unneeded segmentation when UDP GRO traffic traverses in the receive path UDP tunnels. Finally, some self-tests are included, covering the relevant GRO scenarios. Even if most patches are actually bugfixes, this series is targeting net-next, as overall it makes available a new feature. v2 -> v3: - no code changes, more verbose commit messages and comment in patch 1/8 v1 -> v2: - restrict post segmentation csum fixup to the only the relevant pkts - use individual 'accept_gso_type' fields instead of whole gso bitmask (Willem) - use only ipv6 addesses from test range in self-tests (Willem) - hopefully clarified most individual patches commit messages ==================== Signed-off-by: David S. Miller commit a062260a9d5fce22977744ed6dab64b7b1508ab3 Author: Paolo Abeni Date: Tue Mar 30 12:28:56 2021 +0200 selftests: net: add UDP GRO forwarding self-tests Create a bunch of virtual topologies and verify that NETIF_F_GRO_FRAGLIST or NETIF_F_GRO_UDP_FWD-enabled devices aggregate the ingress packets as expected. Additionally check that the aggregate packets are segmented correctly when landing on a socket Also test SKB_GSO_FRAGLIST and SKB_GSO_UDP_L4 aggregation on top of UDP tunnel (vxlan) v1 -> v2: - hopefully clarify the commit message - moved the overlay network ipv6 range into the 'documentation' reserved range (Willem) Signed-off-by: Paolo Abeni Acked-by: Willem de Bruijn Signed-off-by: David S. Miller commit b03ef676ba6dc53c728e936a1709d4bf35362184 Author: Paolo Abeni Date: Tue Mar 30 12:28:55 2021 +0200 bareudp: allow UDP L4 GRO passthrou Similar to the previous commit, let even geneve passthrou the L4 GRO packets Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 61630c4f052b197191d1d8f3a749d204a5cbdeae Author: Paolo Abeni Date: Tue Mar 30 12:28:54 2021 +0200 geneve: allow UDP L4 GRO passthrou Similar to the previous commit, let even geneve passthrou the L4 GRO packets Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit d18931a92a0b5feddd8a39d097b90ae2867db02f Author: Paolo Abeni Date: Tue Mar 30 12:28:53 2021 +0200 vxlan: allow L4 GRO passthrough When passing up an UDP GSO packet with L4 aggregation, there is no need to segment it at the vxlan level. We can propagate the packet untouched and let it be segmented later, if needed. Introduce an helper to allow let the UDP socket to accept any L4 aggregation and use it in the vxlan driver. v1 -> v2: - updated to use the newly introduced UDP socket 'accept*' fields Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit 78352f73dc5047f3f744764cc45912498c52f3c9 Author: Paolo Abeni Date: Tue Mar 30 12:28:52 2021 +0200 udp: never accept GSO_FRAGLIST packets Currently the UDP protocol delivers GSO_FRAGLIST packets to the sockets without the expected segmentation. This change addresses the issue introducing and maintaining a couple of new fields to explicitly accept SKB_GSO_UDP_L4 or GSO_FRAGLIST packets. Additionally updates udp_unexpected_gso() accordingly. UDP sockets enabling UDP_GRO stil keep accept_udp_fraglist zeroed. v1 -> v2: - use 2 bits instead of a whole GSO bitmask (Willem) Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.") Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit e0e3070a9bc9bb3d3e00b37da872ed5b0adbd077 Author: Paolo Abeni Date: Tue Mar 30 12:28:51 2021 +0200 udp: properly complete L4 GRO over UDP tunnel packet After the previous patch, the stack can do L4 UDP aggregation on top of a UDP tunnel. In such scenario, udp{4,6}_gro_complete will be called twice. This function will enter its is_flist branch immediately, even though that is only correct on the second call, as GSO_FRAGLIST is only relevant for the inner packet. Instead, we need to try first UDP tunnel-based aggregation, if the GRO packet requires that. This patch changes udp{4,6}_gro_complete to skip the frag list processing when while encap_mark == 1, identifying processing of the outer tunnel header. Additionally, clears the field in udp_gro_complete() so that we can enter the frag list path on the next round, for the inner header. v1 -> v2: - hopefully clarified the commit message Reviewed-by: Willem de Bruijn Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 18f25dc399901426dff61e676ba603ff52c666f7 Author: Paolo Abeni Date: Tue Mar 30 12:28:50 2021 +0200 udp: skip L4 aggregation for UDP tunnel packets If NETIF_F_GRO_FRAGLIST or NETIF_F_GRO_UDP_FWD are enabled, and there are UDP tunnels available in the system, udp_gro_receive() could end-up doing L4 aggregation (either SKB_GSO_UDP_L4 or SKB_GSO_FRAGLIST) at the outer UDP tunnel level for packets effectively carrying and UDP tunnel header. That could cause inner protocol corruption. If e.g. the relevant packets carry a vxlan header, different vxlan ids will be ignored/ aggregated to the same GSO packet. Inner headers will be ignored, too, so that e.g. TCP over vxlan push packets will be held in the GRO engine till the next flush, etc. Just skip the SKB_GSO_UDP_L4 and SKB_GSO_FRAGLIST code path if the current packet could land in a UDP tunnel, and let udp_gro_receive() do GRO via udp_sk(sk)->gro_receive. The check implemented in this patch is broader than what is strictly needed, as the existing UDP tunnel could be e.g. configured on top of a different device: we could end-up skipping GRO at-all for some packets. Anyhow, that is a very thin corner case and covering it will add quite a bit of complexity. v1 -> v2: - hopefully clarify the commit message Fixes: 9fd1ff5d2ac7 ("udp: Support UDP fraglist GRO/GSO.") Fixes: 36707061d6ba ("udp: allow forwarding of plain (non-fraglisted) UDP GRO packets") Reviewed-by: Willem de Bruijn Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller commit 000ac44da7d0adfc5e62e6c019246a4afeeffd04 Author: Paolo Abeni Date: Tue Mar 30 12:28:49 2021 +0200 udp: fixup csum for GSO receive slow path When UDP packets generated locally by a socket with UDP_SEGMENT traverse the following path: UDP tunnel(xmit) -> veth (segmentation) -> veth (gro) -> UDP tunnel (rx) -> UDP socket (no UDP_GRO) ip_summed will be set to CHECKSUM_PARTIAL at creation time and such checksum mode will be preserved in the above path up to the UDP tunnel receive code where we have: __iptunnel_pull_header() -> skb_pull_rcsum() -> skb_postpull_rcsum() -> __skb_postpull_rcsum() The latter will convert the skb to CHECKSUM_NONE. The UDP GSO packet will be later segmented as part of the rx socket receive operation, and will present a CHECKSUM_NONE after segmentation. Additionally the segmented packets UDP CB still refers to the original GSO packet len. Overall that causes unexpected/wrong csum validation errors later in the UDP receive path. We could possibly address the issue with some additional checks and csum mangling in the UDP tunnel code. Since the issue affects only this UDP receive slow path, let's set a suitable csum status there. Note that SKB_GSO_UDP_L4 or SKB_GSO_FRAGLIST packets lacking an UDP encapsulation present a valid checksum when landing to udp_queue_rcv_skb(), as the UDP checksum has been validated by the GRO engine. v2 -> v3: - even more verbose commit message and comments v1 -> v2: - restrict the csum update to the packets strictly needing them - hopefully clarify the commit message and code comments Signed-off-by: Paolo Abeni Reviewed-by: Willem de Bruijn Signed-off-by: David S. Miller commit dc5fa2073f63965faad232af0adf9b7e50b5f340 Author: Jiapeng Chong Date: Tue Mar 30 17:51:30 2021 +0800 ppp: deflate: Remove useless call "zlib_inflateEnd" Fix the following whitescan warning: Calling "zlib_inflateEnd(&state->strm)" is only useful for its return value, which is ignored. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 8e51a6371088703a5376a8e28849a8dd8e9620ae Merge: cf5b15ab191f6 497abc87cf996 Author: David S. Miller Date: Tue Mar 30 16:56:40 2021 -0700 Merge branch 'net-repeated-words' Huazhong Tan says: ==================== net: remove repeated words This patch-set removes some repeated words in comments. ==================== Signed-off-by: David S. Miller commit 497abc87cf9969601f4213d9db0e2f90eb044088 Author: Peng Li Date: Tue Mar 30 15:27:56 2021 +0800 net: ipa: remove repeated words Remove repeated words "that" and "the". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Acked-by: Alex Elder Signed-off-by: David S. Miller commit fec76125baf7390e1ad1354e32ee6b2f986cd01c Author: Peng Li Date: Tue Mar 30 15:27:55 2021 +0800 net: phy: remove repeated word Remove repeated word "to". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 252b5d373564c37e35c982bdfa473ebe0dd5f30e Author: Peng Li Date: Tue Mar 30 15:27:54 2021 +0800 net: bonding: remove repeated word Remove repeated word "that". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 059ff70c8cabe0b9d170033ae82bc052aeaac059 Author: Peng Li Date: Tue Mar 30 15:27:53 2021 +0800 net: i40e: remove repeated words Remove repeated words "to" and "try". Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit cf5b15ab191f699504bfd39cb559e559423ab9f5 Merge: cda1893e9f7c1 b9aa074b896b8 Author: David S. Miller Date: Tue Mar 30 16:54:50 2021 -0700 Merge branch 'obsdolete-todo' Wang Qing says: ==================== Clean up obsolete TODO files It is mentioned in the official documents of the Linux Foundation and WIKI that you can participate in its development according to the TODO files of each module. But the TODO files here has not been updated for 15 years, and the function development described in the file have been implemented or abandoned. Its existence will mislead developers seeking to view outdated information. ==================== Signed-off-by: David S. Miller commit b9aa074b896b8d33269d085f360cd614c36e52d2 Author: Wang Qing Date: Tue Mar 30 15:02:49 2021 +0800 net/decnet: Delete obsolete TODO file The TODO file here has not been updated from 2005, and the function development described in the file have been implemented or abandoned. Its existence will mislead developers seeking to view outdated information. Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit 8d9e5bbf5c68c25ab2d93e910a258ec7193df1e2 Author: Wang Qing Date: Tue Mar 30 15:02:48 2021 +0800 net/ax25: Delete obsolete TODO file The TODO file here has not been updated for 13 years, and the function development described in the file have been implemented or abandoned. Its existence will mislead developers seeking to view outdated information. Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit ab36ba4f3a81c5562cabab9988c6aa8ef65a5543 Author: Wang Qing Date: Tue Mar 30 15:02:47 2021 +0800 fs/jffs2: Delete obsolete TODO file The TODO file here has not been updated for 14 years, and the function development described in the file have been implemented or abandoned. Its existence will mislead developers seeking to view outdated information. Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit 22612b4e60397c038ef91ed06e741f1063d6a56a Author: Wang Qing Date: Tue Mar 30 15:02:46 2021 +0800 fs/befs: Delete obsolete TODO file The TODO file here has not been updated from 2005, and the function development described in the file have been implemented or abandoned. Its existence will mislead developers seeking to view outdated information. Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit ef843f261b881aaf5a8e4fa90815a97b37dab1f2 Author: Wang Qing Date: Tue Mar 30 15:02:45 2021 +0800 scsi/aacraid: Delete obsolete TODO file The TODO file here has not been updated from 2.6.12 for more than 15 years. Its existence will mislead developers seeking to view outdated information. Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit 0f1b2a4912b270395d4f61bfcc1ff8d4903dde4a Author: Wang Qing Date: Tue Mar 30 15:02:44 2021 +0800 mips/sgi-ip27: Delete obsolete TODO file The TODO file here has not been updated for 15 years, and the function development described in the file have been implemented or abandoned. Its existence will mislead developers seeking to view outdated information. Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit 7f13e0be3694744292a4b75d56fd43055a30f59f Author: Wan Jiabing Date: Fri Mar 26 19:33:46 2021 +0800 RDMA/iser: struct iscsi_iser_task is declared twice struct iscsi_iser_task has been declared at 201st line. Remove the duplicate. Link: https://lore.kernel.org/r/20210326113347.903976-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Jason Gunthorpe commit de2a2461958baf3b41d74a154d4bf08a6e710ab1 Author: Ruiqi Gong Date: Tue Mar 30 08:29:12 2021 -0400 RDMA/hns: Fix a spelling mistake in hns_roce_hw_v1.c s/caculating/calculating Link: https://lore.kernel.org/r/20210330122912.19989-1-gongruiqi1@huawei.com Reported-by: Hulk Robot Signed-off-by: Ruiqi Gong Signed-off-by: Jason Gunthorpe commit 1510618e45cb9fb77aede5544f8309b64f8b7400 Author: Florian Westphal Date: Thu Mar 25 18:25:08 2021 +0100 netfilter: nf_log_netdev: merge with nf_log_syslog Provide netdev family support from the nf_log_syslog module. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f5466caab9a8d2f363d2e0730a99f5916df892f5 Author: Florian Westphal Date: Thu Mar 25 18:25:07 2021 +0100 netfilter: nf_log_ipv6: merge with nf_log_syslog This removes the nf_log_ipv6 module, the functionality is now provided by nf_log_syslog. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f11d61e7957d9dd54c4d87bb59da83fa949c15cb Author: Florian Westphal Date: Thu Mar 25 18:25:06 2021 +0100 netfilter: nf_log_arp: merge with nf_log_syslog similar to previous change: nf_log_syslog now covers ARP logging as well, the old nf_log_arp module is removed. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit db3187ae21bb0cff44430a7510cf2d2b23e41cd8 Author: Florian Westphal Date: Thu Mar 25 18:25:05 2021 +0100 netfilter: nf_log_ipv4: rename to nf_log_syslog Netfilter has multiple log modules: nf_log_arp nf_log_bridge nf_log_ipv4 nf_log_ipv6 nf_log_netdev nfnetlink_log nf_log_common With the exception of nfnetlink_log (packet is sent to userspace for dissection/logging), all of them log to the kernel ringbuffer. This is the first part of a series to merge all modules except nfnetlink_log into a single module: nf_log_syslog. This allows to reduce code. After the series, only two log modules remain: nfnetlink_log and nf_log_syslog. The latter provides the same functionality as the old per-af log modules. This renames nf_log_ipv4 to nf_log_syslog. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso commit f8b139e2f24112f4e21f1eb02c7fc7600fea4b8d Author: Yang Yingliang Date: Tue Mar 30 21:06:32 2021 +0800 fs: 9p: fix v9fs_file_open writeback fid error check IS_ERR() and PTR_ERR() use wrong pointer, it should be writeback_fid, fix it. Link: http://lkml.kernel.org/r/20210330130632.1054357-1-yangyingliang@huawei.com Fixes: 5bfe97d7382b ("9p: Fix writeback fid incorrectly being attached to dentry") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang [Dominique: adjusted commit summary] Signed-off-by: Dominique Martinet commit 0dae52282a5eede01339480f7273a545ca4447c2 Author: Rikard Falkeborn Date: Fri Jan 8 23:46:50 2021 +0100 9p: Constify static struct v9fs_attr_group The only usage of v9fs_attr_group is to pass its address to sysfs_create_group() and sysfs_create_group(), both which takes pointers to const struct attribute_group. Make it const to allow the compiler to put it in read-only memory. Link: http://lkml.kernel.org/r/20210108224650.25872-1-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Signed-off-by: Dominique Martinet commit 26c0cf2a603d4ebf00d8c1baf714763fca31dba4 Author: Heiner Kallweit Date: Wed Feb 3 09:48:03 2021 +0100 PCI/VPD: Remove sysfs accessor size checking dead code Since 104daa71b396 ("PCI: Determine actual VPD size on first access") attribute size is set to 0 (unlimited). Remove the dead code that checks for "bin_attr->size > 0". Link: https://lore.kernel.org/r/267eae86-f8a6-6792-a7f8-2c4fd51beedc@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 235fc0e36d35270e1ff426f26bbea6154b8863a5 Author: Colin Ian King Date: Fri Mar 26 19:43:48 2021 +0000 bpf: Remove redundant assignment of variable id The variable id is being assigned a value that is never read, the assignment is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210326194348.623782-1-colin.king@canonical.com commit a7bf66ff3d945db9dd2079265ce9cc5c374cecc3 Author: Heiner Kallweit Date: Thu Dec 17 21:59:03 2020 +0100 PCI/VPD: Remove obsolete Broadcom NIC quirk quirk_brcm_570x_limit_vpd() was added in 2008 [0] when we didn't have the logic to determine VPD size based on checking for the VPD end tag. Now that we do have this logic [1] and don't read beyond the end tag, this quirk can be removed. [0] 99cb233d60cb ("PCI: Limit VPD read/write lengths for Broadcom 5706, 5708, 5709 rev.") [1] 104daa71b396 ("PCI: Determine actual VPD size on first access") Link: https://lore.kernel.org/r/daa6acdf-5027-62c8-e3fb-125411b018f5@gmail.com Signed-off-by: Heiner Kallweit Signed-off-by: Bjorn Helgaas commit cda1893e9f7c1d78e391dbb6ef1798cd32354113 Author: Yang Yingliang Date: Tue Mar 30 20:55:39 2021 +0800 net: mhi: remove pointless conditional before kfree_skb() It already has null pointer check in kfree_skb(), remove pointless pointer check before kfree_skb(). Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 1c137d4777b5b66c64854ba469ab0650ff0dc5bd Author: Wong Vee Khee Date: Tue Mar 30 10:46:53 2021 +0800 stmmac: intel: add cross time-stamping freq difference adjustment Cross time-stamping mechanism used in certain instance of Intel mGbE may run at different clock frequency in comparison to the clock frequency used by processor, so we introduce cross T/S frequency adjustment to ensure TSC calculation is correct when processor got the cross time-stamps. Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit 913d55037616659c04763e756f948fcbaef0bbee Author: He Fengqing Date: Tue Mar 30 02:48:43 2021 +0000 bpf: Remove unused bpf_load_pointer Remove unused bpf_load_pointer function in filter.h. The last user of it has been removed with 24dea04767e6 ("bpf, x32: remove ld_abs/ld_ind"). Signed-off-by: He Fengqing Signed-off-by: Daniel Borkmann Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210330024843.3479844-1-hefengqing@huawei.com commit 5979415d00d42fd66d4227a34a6fa528003ae88a Author: Shixin Liu Date: Tue Mar 30 10:24:15 2021 +0800 mISDN: Use LIST_HEAD() for list_head There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro. Signed-off-by: Shixin Liu Signed-off-by: David S. Miller commit 77053fb7b428099bfdc2ec81a923587a2692d84b Author: Shixin Liu Date: Tue Mar 30 10:24:14 2021 +0800 mISDN: Use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Changelog: From v1: 1. fix the mistake reported by kernel test robot. Signed-off-by: Shixin Liu Signed-off-by: David S. Miller commit 212ee4b52f10aeedc335979c2d81c6ef0c1fce99 Merge: fdb5cc6ab3b6a d329ea5bd8845 Author: David S. Miller Date: Tue Mar 30 13:29:39 2021 -0700 Merge branch 'rfc8335-probe' Andreas Roeseler says: ==================== add support for RFC 8335 PROBE The popular utility ping has several severe limitations, such as the inability to query specific interfaces on a node and requiring bidirectional connectivity between the probing and probed interfaces. RFC 8335 attempts to solve these limitations by creating the new utility PROBE which is a specialized ICMP message that makes use of the ICMP Extension Structure outlined in RFC 4884. This patchset adds definitions for the ICMP Extended Echo Request and Reply (PROBE) types for both IPV4 and IPV6, adds a sysctl to enable responses to PROBE messages, expands the list of supported ICMP messages to accommodate PROBE types, adds ipv6_dev_find into ipv6_stubs, and adds functionality to respond to PROBE requests. Changes: v1 -> v2: - Add AFI definitions - Switch to functions such as dev_get_by_name and ip_dev_find to lookup net devices v2 -> v3: Suggested by Willem de Bruijn - Add verification of incoming messages before looking up netdev - Add prefix for PROBE specific defined variables - Use proc_dointvec_minmax with zero and one for sysctl - Create struct icmp_ext_echo_iio for parsing incoming packets Reported-by: kernel test robot Reported-by: Dan Carpenter - Include net/addrconf.h library for ipv6_dev_find v3 -> v4: - Use in_addr instead of __be32 for storing IPV4 addresses - Use IFNAMSIZ to statically allocate space for name in icmp_ext_echo_iio Suggested by Willem de Bruijn - Use skb_header_pointer to verify fields in incoming message - Add check to ensure that extobj_hdr.length is valid - Check to ensure object payload is padded with ASCII NULL characters when probing by name, as specified by RFC 8335 - Statically allocate buff using IFNAMSIZ - Add rcu blocking around ipv6_dev_find - Use __in_dev_get_rcu to access IPV4 addresses of identified net_device - Remove check for ICMPV6 PROBE types v4 -> v5: - Statically allocate buff to size IFNAMSIZ on declaration - Remove goto probe in favor of single branch - Remove strict check for incoming PROBE request padding to nearest 32-bit boundary Reported-by: kernel test robot v5 -> v6: - Add documentation for icmp_echo_enable_probe sysctl - Remove RCU locking around ipv6_dev_find() - Assign iio based on ctype ==================== Signed-off-by: David S. Miller commit d329ea5bd8845f0b196bf41b18b6173340d6e0e4 Author: Andreas Roeseler Date: Mon Mar 29 18:45:51 2021 -0700 icmp: add response to RFC 8335 PROBE messages Modify the icmp_rcv function to check PROBE messages and call icmp_echo if a PROBE request is detected. Modify the existing icmp_echo function to respond ot both ping and PROBE requests. This was tested using a custom modification to the iputils package and wireshark. It supports IPV4 probing by name, ifindex, and probing by both IPV4 and IPV6 addresses. It currently does not support responding to probes off the proxy node (see RFC 8335 Section 2). The modification to the iputils package is still in development and can be found here: https://github.com/Juniper-Clinic-2020/iputils.git. It supports full sending functionality of PROBE requests, but currently does not parse the response messages, which is why Wireshark is required to verify the sent and recieved PROBE messages. The modification adds the ``-e'' flag to the command which allows the user to specify the interface identifier to query the probed host. An example usage would be <./ping -4 -e 1 [destination]> to send a PROBE request of ifindex 1 to the destination node. Signed-off-by: Andreas Roeseler Signed-off-by: David S. Miller commit 504a40113cc4f329dd75bbf6e4b060603224d814 Author: Andreas Roeseler Date: Mon Mar 29 18:45:43 2021 -0700 ipv6: add ipv6_dev_find to stubs Add ipv6_dev_find to ipv6_stub to allow lookup of net_devices by IPV6 address in net/ipv4/icmp.c. Signed-off-by: Andreas Roeseler Signed-off-by: David S. Miller commit 08baf54f01f5b5f06fe242cfc236629c76969cd4 Author: Andreas Roeseler Date: Mon Mar 29 18:45:36 2021 -0700 net: add support for sending RFC 8335 PROBE messages Modify the ping_supported function to support PROBE message types. This allows tools such as the ping command in the iputils package to be modified to send PROBE requests through the existing framework for sending ping requests. Signed-off-by: Andreas Roeseler Signed-off-by: David S. Miller commit f1b8fa9fa5865c58c093cde6d782104c22df9088 Author: Andreas Roeseler Date: Mon Mar 29 18:45:29 2021 -0700 net: add sysctl for enabling RFC 8335 PROBE messages Section 8 of RFC 8335 specifies potential security concerns of responding to PROBE requests, and states that nodes that support PROBE functionality MUST be able to enable/disable responses and that responses MUST be disabled by default Signed-off-by: Andreas Roeseler Signed-off-by: David S. Miller commit 750f4fc2a12f6632b5aa04526bf57fa06bfe8467 Author: Andreas Roeseler Date: Mon Mar 29 18:45:21 2021 -0700 ICMPV6: add support for RFC 8335 PROBE Add definitions for the ICMPV6 type of Extended Echo Request and Extended Echo Reply, as defined by sections 2 and 3 of RFC 8335. Signed-off-by: Andreas Roeseler Signed-off-by: David S. Miller commit 2b246b2569cd2ac6ff700d0dce56b8bae29b1842 Author: Andreas Roeseler Date: Mon Mar 29 18:45:15 2021 -0700 icmp: add support for RFC 8335 PROBE Add definitions for PROBE ICMP types and codes. Add AFI definitions for IP and IPV6 as specified by IANA Add a struct to represent the additional header when probing by IP address (ctype == 3) for use in parsing incoming PROBE messages Add a struct to represent the entire Interface Identification Object (IIO) section of an incoming PROBE packet Signed-off-by: Andreas Roeseler Signed-off-by: David S. Miller commit fdb5cc6ab3b6a1c0122d3644a63ef9dc7a610d35 Author: Andre Edich Date: Mon Mar 29 11:45:36 2021 +0200 net: phy: lan87xx: fix access to wrong register of LAN87xx The function lan87xx_config_aneg_ext was introduced to configure LAN95xxA but as well writes to undocumented register of LAN87xx. This fix prevents that access. The function lan87xx_config_aneg_ext gets more suitable for the new behavior name. Reported-by: Måns Rullgård Fixes: 05b35e7eb9a1 ("smsc95xx: add phylib support") Signed-off-by: Andre Edich Signed-off-by: David S. Miller commit 364e282c4fe7e24a5f32cd6e93e1056c6a6e3d31 Author: Bob Pearson Date: Thu Mar 25 16:24:26 2021 -0500 RDMA/rxe: Split MEM into MR and MW In the original rxe implementation it was intended to use a common object to represent MRs and MWs but they are different enough to separate these into two objects. This allows replacing the mem name with mr for MRs which is more consistent with the style for the other objects and less likely to be confusing. This is a long patch that mostly changes mem to mr where it makes sense and adds a new rxe_mw struct. Link: https://lore.kernel.org/r/20210325212425.2792-1-rpearson@hpe.com Signed-off-by: Bob Pearson Acked-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe commit 9c0ee085c49c11381dcbd609ea85e902eab88a92 Merge: 402a66edb9f3e 132f2d45fb230 Author: David S. Miller Date: Tue Mar 30 13:04:28 2021 -0700 Merge tag 'linux-can-next-for-5.13-20210330' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2021-03-30 this is a pull request of 39 patches for net-next/master. The first two patches update the MAINTAINERS file. One is by me and removes Dan Murphy from the from m_can and tcan4x5x. The other one is by Pankaj Sharma and updates the maintainership of the m-can mmio driver. The next three patches are by me and update the CAN echo skb handling. Vincent Mailhol provides 5 patches where Transmitter Delay Compensation is added CAN bittiming calculation is cleaned up. The next patch is by me and adds a missing HAS_IOMEM to the grcan driver. Michal Simek's patch for the xilinx driver add dev_err_probe() support. Arnd Bergmann's patch for the ucan driver fixes a compiler warning. Stephane Grosjean provides 3 patches for the peak USB drivers, which add ethtool set_phys_id and CAN one-shot mode. Xulin Sun's patch removes a not needed return check in the m-can driver. Torin Cooper-Bennun provides 3 patches for the m-can driver that add rx-offload support to ensure that skbs are sent from softirq context. Wan Jiabing's patch for the tcan4x5x driver removes a duplicate include. The next 6 patches are by me and target the mcp251xfd driver. They add devcoredump support, simplify the UINC handling, and add HW timestamp support. The remaining 12 patches target the c_can driver. The first 6 are by me and do generic checkpatch related cleanup work. Dario Binacchi's patches bring some cleanups and increase the number of usable message objects from 16 to 64. ==================== Signed-off-by: David S. Miller commit 7410c2d0f419d992680855811718925e6f966c63 Author: Gal Pressman Date: Mon Mar 29 15:01:28 2021 +0300 RDMA/efa: Use strscpy instead of strlcpy The strlcpy function doesn't limit the source length, use the preferred strscpy function instead. Link: https://lore.kernel.org/r/20210329120131.18793-1-galpress@amazon.com Reviewed-by: Firas JahJah Reviewed-by: Yossi Leybovich Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 402a66edb9f3e38330859f14bd090ca745059257 Merge: d0922bf798179 885b8cfb161ed Author: David S. Miller Date: Tue Mar 30 12:59:25 2021 -0700 Merge tag 'mlx5-updates-2021-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-03-29 Coexistence of CQE compression and HW PTP time-stamp: From Aya this series improves mlx5 netdev driver to allow both mlx5 CQE compression (RX descriptor compression, that saves on PCI transaction) and HW time-stamp PTP to co-exists. Prior to this series both features were mutually exclusive due to the nature of CQE compression which reduces the size of RX descriptor for the price of trimming some data, such as the time-stamp. In order to allow CQE compression when PTP time stamping is enabled, We enable it on the regular performance critical RX queues which will service all the data path traffic that is not PTP. PTP traffic will be re-directed to dedicated RX queues on which we will not enable CQE compression and thus keep the time-stamp intact. Having both features is critical for systems with low PCI BW, e.g. Multi-Host. The series will be adding: 1) Infrastructure to create a dedicated RX queue to service the PTP traffic 2) Flow steering plumbing to capture PTP traffic both UDP packets with destination port 319 and L2 packets with ethertype 0x88F7 3) Steer PTP traffic to the dedicated RX queue. 4) The feature will be enabled when PTP is being configured via the already existing PTP IOCTL when CQE compression is active, otherwise no change to the driver flow. ==================== Signed-off-by: David S. Miller commit 35796c1d343871fa75a6e6b0f4584182cbeae6ac Author: Sven Eckelmann Date: Tue Mar 30 21:15:26 2021 +0200 batman-adv: Fix misspelled "wont" checkpatch started to complain about the mispelling of: CHECK: 'wont' may be misspelled - perhaps 'won't'? #459: FILE: ./net/batman-adv/bat_iv_ogm.c:459: + * - the resulting packet wont be bigger than Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 3f2ec77c954c6707a7caab1be35afe0ccf57135e Author: Kuogee Hsieh Date: Tue Mar 16 10:12:41 2021 -0700 phy: qcom-qmp: add hbr3_hbr2 voltage and premphasis swing table Add hbr3_hbr2 voltage and premphasis swing table to support HBR3 link rate. Signed-off-by: Kuogee Hsieh Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1615914761-12300-1-git-send-email-khsieh@codeaurora.org Fixes: 52e013d0bffa ("phy: qcom-qmp: Add support for DP in USB3+DP combo phy") Signed-off-by: Vinod Koul commit 446c200ee3e8f6faf189ef6f25a0f5bb294afae4 Author: Wei Yongjun Date: Fri Mar 5 03:49:33 2021 +0000 phy: ingenic: Fix a typo in ingenic_usb_phy_probe() Fix the return value check typo which testing the wrong variable in ingenic_usb_phy_probe(). Fixes: 31de313dfdcf ("PHY: Ingenic: Add USB PHY driver using generic PHY framework.") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20210305034933.3240914-1-weiyongjun1@huawei.com Signed-off-by: Vinod Koul commit b976c987511e34a2e9b23545de912a121a9eded5 Author: Wei Yongjun Date: Fri Mar 5 03:49:31 2021 +0000 phy: ralink: phy-mt7621-pci: fix return value check in mt7621_pci_phy_probe() Fix the return value check which testing the wrong variable in mt7621_pci_phy_probe(). Fixes: d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210305034931.3237558-1-weiyongjun1@huawei.com Signed-off-by: Vinod Koul commit 6cb17707aad869de163d7bf42c253caf501be4e2 Author: Geert Uytterhoeven Date: Mon Feb 8 16:02:52 2021 +0100 phy: marvell: ARMADA375_USBCLUSTER_PHY should not default to y, unconditionally Merely enabling CONFIG_COMPILE_TEST should not enable additional code. To fix this, restrict the automatic enabling of ARMADA375_USBCLUSTER_PHY to MACH_ARMADA_375, and ask the user in case of compile-testing. Fixes: eee47538ec1f2619 ("phy: add support for USB cluster on the Armada 375 SoC") Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210208150252.424706-1-geert+renesas@glider.be Signed-off-by: Vinod Koul commit f26fde369c3d59e5711ff35a08c244888db137bb Author: Yang Li Date: Thu Feb 25 17:17:54 2021 +0800 phy: ti: j721e-wiz: add missing call to of_node_put() In one of the error paths of the for_each_child_of_node() loop in of_property_read_u32, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/phy/ti/phy-j721e-wiz.c:786:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 795. Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1614244674-66556-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Vinod Koul commit 982313c38f2f3793b6435ff50997ae96a2274f5a Author: Sergio Paracuellos Date: Tue Mar 2 11:54:12 2021 +0100 phy: ralink: phy-mt7621-pci: fix XTAL bitmask When this was rewriten to get mainlined and start to use 'linux/bitfield.h' headers, XTAL_MASK was wrong. It must mask three bits but only two were used. Hence properly fix it to make things work. Fixes: d87da32372a0 ("phy: ralink: Add PHY driver for MT7621 PCIe PHY") Signed-off-by: Sergio Paracuellos Link: https://lore.kernel.org/r/20210302105412.16221-1-sergio.paracuellos@gmail.com Signed-off-by: Vinod Koul commit ed9e07f815cd66405895781dd29033c1a7b47b8a Author: Swapnil Jakhade Date: Thu Mar 4 07:08:16 2021 +0100 phy: cadence-torrent: Update PCIe + USB config for correct PLL1 clock Update PCIe + USB register sequences for correct PLL1 clock configuration. Also, update sequences for other USB configurations with dependent changes. Signed-off-by: Swapnil Jakhade Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/1614838096-32291-5-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 70901a7d64cb018df452b1a2880aba7f4416f508 Author: Kishon Vijay Abraham I Date: Thu Mar 4 07:08:15 2021 +0100 phy: cadence-torrent: Update SGMII/QSGMII configuration specific to TI Update SGMII/QSGMII configuration specific to TI. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1614838096-32291-4-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 488209909be38faf17398bfa243426e3eaff9ea6 Author: Kishon Vijay Abraham I Date: Thu Mar 4 07:08:14 2021 +0100 phy: ti: j721e-wiz: Add support for configuring QSGMII Configure MAC clock dividers required for QSGMII to be functional. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Swapnil Jakhade Link: https://lore.kernel.org/r/1614838096-32291-3-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit e25c9dbcfc17bfe4fb0b72cdb6926db708f1ed6b Author: Swapnil Jakhade Date: Thu Mar 4 07:08:13 2021 +0100 phy: cadence-torrent: Update PCIe + QSGMII config for correct PLL1 clock For PCIe + QSGMII configuration where QSGMII was using PLL1 and was expecting 10GHz clock, configuration was giving 8GHz clock. Update register sequences to get correct PLL1 configuration. Also, update single link PCIe and single link SGMII/QSGMII configurations with related changes. Signed-off-by: Swapnil Jakhade Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/1614838096-32291-2-git-send-email-sjakhade@cadence.com Signed-off-by: Vinod Koul commit 2cca0228f3641e68ac2433a8e75b130d907ce78a Author: Kishon Vijay Abraham I Date: Wed Mar 10 17:38:40 2021 +0530 phy: cadence-torrent: Add support to drive refclk out cmn_refclk_

lines in Torrent SERDES is used for connecting external reference clock. cmn_refclk_

can also be configured to output the reference clock. Model this derived reference clock as a "clock" so that platforms like AM642 EVM can enable it. This is used by PCIe to use the same refclk both in local SERDES and remote device. Add support here to drive refclk out. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Swapnil Jakhade Link: https://lore.kernel.org/r/20210310120840.16447-7-kishon@ti.com Signed-off-by: Vinod Koul commit 9e405f87b69b1c84bb960da76af1d1aa5c52e5f4 Author: Kishon Vijay Abraham I Date: Wed Mar 10 17:38:39 2021 +0530 phy: ti: j721e-wiz: Enable reference clock output in cmn_refclk_

cmn_refclk_

lines in Torrent SERDES is used for connecting external reference clock. cmn_refclk_

can also be configured to output the reference clock. In order to drive the refclk out from the SERDES (Cadence Torrent), PHY_EN_REFCLK should be set in SERDES_RST of WIZ. Model PHY_EN_REFCLK as a clock, so that platforms like AM642 EVM can enable it. Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210310120840.16447-6-kishon@ti.com Signed-off-by: Vinod Koul commit 040cbe7687316e265199ce892d3f7c24c041aaec Author: Kishon Vijay Abraham I Date: Wed Mar 10 17:38:38 2021 +0530 phy: ti: j721e-wiz: Model the internal clocks without device tree input commit 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC") modeled the internal clocks depending on the subnodes that are populated in device tree. However recent discussions in the mailing list [1] suggested to just add #clock cells in the parent DT node and model the clocks within the driver. Model the mux clocks without device tree input for AM64x SoC. Don't remove the earlier design since DT nodes for J7200 and J721e are already upstreamed. [1] -> http://lore.kernel.org/r/20210108025943.GA1790601@robh.at.kernel.org Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210310120840.16447-5-kishon@ti.com Signed-off-by: Vinod Koul commit 6ecac2f8ff1abbae464d6ce451ee07d49cdb2982 Author: Kishon Vijay Abraham I Date: Wed Mar 10 17:38:37 2021 +0530 phy: ti: j721e-wiz: Configure full rate divider for AM64 The frequency of the txmclk between PCIe and SERDES has changed to 250MHz from 500MHz. Configure full rate divider for AM64 accordingly. Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210310120840.16447-4-kishon@ti.com Signed-off-by: Vinod Koul commit 7e52a39f1942b771213678c56002ce90a2f126d2 Author: Kishon Vijay Abraham I Date: Wed Mar 10 17:38:36 2021 +0530 phy: ti: j721e-wiz: Delete "clk_div_sel" clk provider during cleanup commit 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC") modeled both MUX clocks and DIVIDER clocks in wiz. However during cleanup, it removed only the MUX clock provider. Remove the DIVIDER clock provider here. Fixes: 091876cc355d ("phy: ti: j721e-wiz: Add support for WIZ module present in TI J721E SoC") Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210310120840.16447-3-kishon@ti.com Signed-off-by: Vinod Koul commit 549cb1ae3e56e71ccd2547c3c40ff2556af8ce49 Author: Kishon Vijay Abraham I Date: Wed Mar 10 17:38:35 2021 +0530 phy: ti: j721e-wiz: Remove "regmap_field" from wiz_clk_{mux|div}_sel Both "struct wiz_clk_div_sel" and "struct wiz_clk_mux_sel" are static data that is common for all wiz instances. Including "struct regmap_field" for each of the wiz instances can yield undesirable results. Move "struct regmap_field" out of "struct wiz_clk_div_sel" and "struct wiz_clk_mux_sel" and make them point to constant data. So far no issues are observed since both these structures are not accessed outside the probe. Signed-off-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210310120840.16447-2-kishon@ti.com Signed-off-by: Vinod Koul commit b8900c539eabaa091cc6aff70f56a25aa78739bf Author: Konstantin Porotchkin Date: Sun Mar 7 18:33:40 2021 +0200 devicetree/bindings: add support for CP110 UTMI PHY Add DTS binding for Marvell CP110 UTMI PHY Signed-off-by: Konstantin Porotchkin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210307163343.25684-4-kostap@marvell.com Signed-off-by: Vinod Koul commit 6569d83863888bfae31edf33297465f783189681 Author: Konstantin Porotchkin Date: Sun Mar 7 18:33:39 2021 +0200 dt-bindings: phy: convert phy-mvebu-utmi to YAML schema The new file name is marvell,armada-3700-utmi-phy.yaml Signed-off-by: Konstantin Porotchkin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210307163343.25684-3-kostap@marvell.com Signed-off-by: Vinod Koul commit 2fc989f74b8dac8a560b7c5e384c4f02b5cfd4b2 Author: Konstantin Porotchkin Date: Sun Mar 7 18:33:38 2021 +0200 drivers: phy: add support for Armada CP110 UTMI PHY Add support for Marvell CP110 UTMI PHY driver allowing the USB2 port configuration independently from the boot loader setup. The CP110/CP115 dies have 2 UTMI PHYs that could be connected to two USB host controllers or to single USB device controller. Since there is only one USB device controller on die, only one of the UTMI PHYs could work in USB device mode. The CONFIG_PHY_MVEBU_CP110_UTMI should be enabled for usage of this driver. Signed-off-by: Konstantin Porotchkin Link: https://lore.kernel.org/r/20210307163343.25684-2-kostap@marvell.com Signed-off-by: Vinod Koul commit f63b42cbc86e12f7d960d1fdaaf93b4373c06c65 Author: Mikko Perttunen Date: Mon Mar 29 16:38:31 2021 +0300 gpu: host1x: Use HW-equivalent syncpoint expiration check Make syncpoint expiration checks always use the same logic used by the hardware. This ensures that there are no race conditions that could occur because of the hardware triggering a syncpoint interrupt and then the driver disagreeing. One situation where this could occur is if a job incremented a syncpoint too many times -- then the hardware would trigger an interrupt, but the driver would assume that a syncpoint value greater than the syncpoint's max value is in the future, and not clean up the job. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit ecfb888ade427e2da437b48cafd8fc824e80c909 Author: Mikko Perttunen Date: Mon Mar 29 16:38:30 2021 +0300 gpu: host1x: Remove cancelled waiters immediately Before this patch, cancelled waiters would only be cleaned up once their threshold value was reached. Make host1x_intr_put_ref process the cancellation immediately to fix this. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 49a5fb1679952a76861bd2580f785e33e3de712c Author: Mikko Perttunen Date: Mon Mar 29 16:38:29 2021 +0300 gpu: host1x: Show number of pending waiters in debugfs Show the number of pending waiters in the debugfs status file. This is useful for testing to verify that waiters do not leak or accumulate incorrectly. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 86cec7ece3e62517e2bc0fd796a8a8da4193e7e5 Author: Mikko Perttunen Date: Mon Mar 29 16:38:28 2021 +0300 gpu: host1x: Allow syncpoints without associated client Syncpoints don't need to be associated with any client, so remove the property, and expose host1x_syncpt_alloc. This will allow allocating syncpoints without prior knowledge of the engine that it will be used with. Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding commit 01990be33389d59f6b5c7dce0e8580263df1aa0c Merge: 51c3b916a4d7e ac097aecfef0b Author: Thierry Reding Date: Tue Mar 30 19:53:03 2021 +0200 Merge branch 'drm/tegra/fixes' into drm/tegra/for-next commit 06dd96738d618391ae58e1b28f1ba49fef214c95 Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:19 2021 +0100 soundwire: qcom: wait for enumeration to be complete in probe Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210330144719.13284-10-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit a6e6581942caa0fab059634459c4c349fd7e4cc2 Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:18 2021 +0100 soundwire: qcom: add auto enumeration support Qualcomm SoundWire controller supports Auto Enumeration of the devices within the IP. This patch enables support for this feature. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210330144719.13284-9-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 01ad444e3be719f8ad13f136a9b0d301806183c8 Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:17 2021 +0100 soundwire: export sdw_compare_devid, sdw_extract_slave_id and sdw_slave_add Exporting these three functions makes sense as it can be used by other controllers like Qualcomm during auto-enumeration! Reported-by: kernel test robot Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210330144719.13284-8-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit c7d49c76d1d5f5a41f637c18ce3b756351c7fdf9 Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:16 2021 +0100 soundwire: qcom: add support to new interrupts Add support to new interrupts which includes reporting some of the error interrupts and adding support to SLAVE pending interrupt! This patch also changes the interrupt handler behaviour on handling any pending interrupts by checking it before returning out of irq handler. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210330144719.13284-7-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit ddea6cf7b619ec4b9a630d0073c4fc64d0ac2b9c Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:15 2021 +0100 soundwire: qcom: update register read/write routine In the existing code every soundwire register read and register write are kinda blocked. Each of these are using a special command id that generates interrupt after it successfully finishes. This is really overhead, limiting and not really necessary unless we are doing something special. We can simply read/write the fifo that should also give exactly what we need! This will also allow to read/write registers in interrupt context, which was not possible with the special command approach. With previous approach number of interrupts generated after enumeration are around 130: $ cat /proc/interrupts | grep soundwire 21: 130 0 0 0 0 0 0 0 GICv3 234 Edge soundwire after this patch they are just 3 interrupts $ cat /proc/interrupts | grep soundwire 21: 3 0 0 0 0 0 0 0 GICv3 234 Edge soundwire This has significantly not only reduced interrupting CPU during enumeration but also during streaming! Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210330144719.13284-6-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit a866a049024c789f6d6c35aefab3ae9837a2fa73 Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:14 2021 +0100 soundwire: qcom: start the clock during initialization Start the clock during initialization, doing this explicitly will add more clarity when we are adding clock stop feature. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210330144719.13284-5-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 542d3491cdd7975161efe964691f2a1b3bba950f Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:13 2021 +0100 soundwire: qcom: set continue execution flag for ignored commands version 1.5.1 and higher IPs of this controller required to set continue execution on ignored command flag. This patch sets this flag. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210330144719.13284-4-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 128eaf937adb87afc8a14124d3eba1f7a179af0b Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:12 2021 +0100 soundwire: qcom: add support to missing transport params Some of the transport parameters derived from device tree are not fully parsed by the driver. This patch adds support to parse those missing parameters. Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210330144719.13284-3-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit 377785cc7c5d1dafadb1ae43c6d79ff934620f67 Author: Srinivas Kandagatla Date: Tue Mar 30 15:47:11 2021 +0100 dt-bindings: soundwire: qcom: clarify data port bus parameters Some of the parameters for data ports are not applicable or not implemented in IP. So mark them as invalid/not applicable in DT so that controller is aware of this. Add comment to these bindings to provide more clarity on the values! Signed-off-by: Srinivas Kandagatla Acked-by: Rob Herring Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210330144719.13284-2-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit c6e939c63c80c26460b25cf1150ebe8396e8adcf Author: Arnd Bergmann Date: Mon Mar 22 12:55:55 2021 +0100 platform/chrome: cros_ec_typec: fix clang -Wformat warning Clang warns about using the %h format modifier to truncate an integer: drivers/platform/chrome/cros_ec_typec.c:1031:3: error: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Werror,-Wformat] typec->pd_ctrl_ver); ^~~~~~~~~~~~~~~~~~ include/linux/dev_printk.h:131:47: note: expanded from macro 'dev_dbg' dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \ ~~~ ^~~~~~~~~~~ Use an explicit bit mask to limit the number to its lower eight bits instead. Fixes: ad7c0510c99e ("platform/chrome: cros_ec_typec: Update port info from EC") Signed-off-by: Arnd Bergmann Reviewed-by: Guenter Roeck Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210322115602.4003221-1-arnd@kernel.org commit 639ff208cb37c5a3f0198e62d04962b677d25c9c Author: Prashant Malani Date: Thu Mar 18 18:51:03 2021 -0700 platform/chrome: cros_ec_typec: Check for device within remove function In a couple of call sites, we use the same pattern of checking for a partner or cable device before attempting to remove it. Simplify this by moving those checks into the remove functions. Cc: Benson Leung Signed-off-by: Prashant Malani Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210319015103.3751672-1-pmalani@chromium.org commit dbc334fb411f2e87ca0e812dc7ba13464aa89504 Author: Yang Li Date: Sun Feb 7 17:08:38 2021 +0800 platform/chrome: wilco_ec: convert stream-like files from nonseekable_open -> stream_open Eliminate the following coccicheck warning: ./drivers/platform/chrome/wilco_ec/telemetry.c:259:1-17: WARNING: telem_fops: .read() and .write() have stream semantic; safe to change nonseekable_open -> stream_open. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/1612688918-63132-1-git-send-email-yang.lee@linux.alibaba.com commit 2976706f3408da99c0d44190a160c5e075c2ec73 Merge: 05d817031ff96 ae6b6a17800f3 Author: Alexei Starovoitov Date: Tue Mar 30 09:24:40 2021 -0700 Merge branch 'AF_XDP selftests improvements & bpf_link' Maciej Fijalkowski says: ==================== Changes since v4 (all in patch 6): - do not close potentially invalid bpf_link fd (Toke) - fix misspelling in label (Toke) - mask out XDP_FLAGS_UPDATE_IF_NOEXIST and XDP_FLAGS_REPLACE explicitly when creating bpf_link (Toke) Changes since v3: - do not unload netlink-based XDP prog when updating map elem failed and current socket was not the creator of XDP resources (Toke) - pull out code paths based on prog_id value within __xsk_setup_xdp_prog so that teardown in case of error at any point is more clear Changes since v2: - fix c&p failure in veth's get_channels implementation (Magnus) - provide a backward compatibilty if bpf_link is not supported (Andrii) - check for a link type while looking up existing bpf_links (Andrii) Changes since v1: - selftests improvements and test case for bpf_link persistence itself - do not unload netlink-based prog when --force flag is set (John) - simplify return semantics in xsk_link_lookup (John) v4: https://lore.kernel.org/bpf/20210326230938.49998-1-maciej.fijalkowski@intel.com/ v3: https://lore.kernel.org/bpf/20210322205816.65159-1-maciej.fijalkowski@intel.com/ v2: https://lore.kernel.org/bpf/20210311152910.56760-1-maciej.fijalkowski@intel.com/ v1: https://lore.kernel.org/bpf/20210215154638.4627-1-maciej.fijalkowski@intel.com/ -------------------------------------------------- This set is another approach towards addressing the below issue: // load xdp prog and xskmap and add entry to xskmap at idx 10 $ sudo ./xdpsock -i ens801f0 -t -q 10 // add entry to xskmap at idx 11 $ sudo ./xdpsock -i ens801f0 -t -q 11 terminate one of the processes and another one is unable to work due to the fact that the XDP prog was unloaded from interface. Previous attempt was, to put it mildly, a bit broken, as there was no synchronization between updates to additional map, as Bjorn pointed out. See https://lore.kernel.org/netdev/20190603131907.13395-5-maciej.fijalkowski@intel.com/ In the meantime bpf_link was introduced and it seems that it can address the issue of refcounting the XDP prog on interface. Although the bpf_link is the meat of the set, selftests improvements are a bigger part of it. Overall, we've been able to reduce the complexity of xsk selftests by removing a bunch of synchronization resources and simplifying logic and structs. Last but not least, for multiqueue veth working with AF-XDP, ethtool's get_channels API needs to be implemented, so it's also included in that set. Note also that in order to make it work, a commit from bpf tree: veth: store queue_mapping independently of XDP prog presence https://lore.kernel.org/bpf/20210303152903.11172-1-maciej.fijalkowski@intel.com/ is needed. Thanks, Maciej Björn Töpel (3): selftests: xsk: remove thread attribute selftests: xsk: Remove mutex and condition variable selftests: xsk: Remove unused defines ==================== Signed-off-by: Alexei Starovoitov commit ae6b6a17800f34dd5215286b44a4e99a0a1cf862 Author: Björn Töpel Date: Tue Mar 30 00:43:16 2021 +0200 selftests: xsk: Remove unused defines Remove two unused defines. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-18-maciej.fijalkowski@intel.com commit 96539f1c5efb0022b94412e8623722aad23dee6b Author: Björn Töpel Date: Tue Mar 30 00:43:15 2021 +0200 selftests: xsk: Remove mutex and condition variable The usage of the condition variable is broken, and overkill. Replace it with a pthread barrier. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-17-maciej.fijalkowski@intel.com commit 7651910257c8fb1ec76b50bef0330fcf739105c7 Author: Björn Töpel Date: Tue Mar 30 00:43:14 2021 +0200 selftests: xsk: Remove thread attribute There is really no reason to have a non-default thread stack size. Remove that. Signed-off-by: Björn Töpel Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-16-maciej.fijalkowski@intel.com commit 27e1ca2525de264901b5c2d9d0c4403c3fe8608c Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:13 2021 +0200 selftests: xsk: Implement bpf_link test Introduce a test that is supposed to verify the persistence of BPF resources based on underlying bpf_link usage. Test will: 1) create and bind two sockets on queue ids 0 and 1 2) run a traffic on queue ids 0 3) remove xsk sockets from queue 0 on both veth interfaces 4) run a traffic on queues ids 1 Running traffic successfully on qids 1 means that BPF resources were not removed on step 3). In order to make it work, change the command that creates veth pair to have the 4 queue pairs by default. Introduce the arrays of xsks and umems to ifobject struct but keep a pointers to single entities, so rest of the logic around Rx/Tx can be kept as-is. For umem handling, double the size of mmapped space and split that between the two sockets. Rename also bidi_pass to a variable 'second_step' of a boolean type as it's now used also for the test that is introduced here and it doesn't have anything in common with bi-directional testing. Drop opt_queue command line argument as it wasn't working before anyway. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-15-maciej.fijalkowski@intel.com commit 34829eec3b698219a5cbc09a174b2a7407b3b4c1 Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:12 2021 +0200 veth: Implement ethtool's get_channels() callback Libbpf's xsk part calls get_channels() API to retrieve the queue count of the underlying driver so that XSKMAP is sized accordingly. Implement that in veth so multi queue scenarios can work properly. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-14-maciej.fijalkowski@intel.com commit 0464b1ed07677f869005bde3fade1580b48de67e Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:11 2021 +0200 selftests: xsk: Remove sync_mutex_tx and atomic var Although thread_common_ops() are called in both Tx and Rx threads, testapp_validate() will not spawn Tx thread until Rx thread signals that it has finished its initialization via condition variable. Therefore, locking in thread_common_ops is not needed and furthermore Tx thread does not have to spin on atomic variable. Note that this simplification wouldn't be possible if there would still be a common worker thread. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-13-maciej.fijalkowski@intel.com commit 9445f8c765838edf84dd0d3910ff309bdab8f95f Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:10 2021 +0200 selftests: xsk: Refactor teardown/bidi test cases and testapp_validate Currently, there is a testapp_sockets() that acts like a wrapper around testapp_validate() and it is called for bidi and teardown test types. Other test types call testapp_validate() directly. Split testapp_sockets() onto two separate functions so a bunch of bidi specific logic can be moved there and out of testapp_validate() itself. Introduce function pointer to ifobject struct which will be used for assigning the Rx/Tx function that is assigned to worker thread. Let's also have a global ifobject Rx/Tx pointers so it's easier to swap the vectors on a second run of a bi-directional test. Thread creation now is easey to follow. switching_notify variable is useless, info about vector switch can be printed based on bidi_pass state. Last but not least, init/destroy synchronization variables only once, not per each test. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-12-maciej.fijalkowski@intel.com commit 99f9bcb65705dda07288b759c569d30d8a4f297c Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:09 2021 +0200 selftests: xsk: Remove Tx synchronization resources Tx thread needs to be started after the Rx side is fully initialized so that packets are not xmitted until xsk Rx socket is ready to be used. It can be observed that atomic variable spinning_tx is not checked from Rx side in any way, so thread_common_ops can be modified to only address the spinning_rx. This means that spinning_tx can be removed altogheter. signal_tx_condition is never utilized, so simply remove it. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-11-maciej.fijalkowski@intel.com commit 9866bcd6635c264aaf3de1d89e44773a269048eb Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:08 2021 +0200 selftests: xsk: Split worker thread Let's a have a separate Tx/Rx worker threads instead of a one common thread packed with Tx/Rx specific checks. Move mmap for umem buffer space and a switch_namespace() call to thread_common_ops. This also allows for a bunch of simplifactions that are the subject of the next commits. The final result will be a code base that is much easier to follow. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-10-maciej.fijalkowski@intel.com commit ef9280789773c974b45f809d58b47b481f2cf9f5 Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:07 2021 +0200 selftests: xsk: Remove thread for netns switch Currently, there is a dedicated thread for following remote ns operations: - grabbing the ifindex of the interface moved to remote netns - removing xdp prog from that interface With bpf_link usage in place, this can be simply omitted, so remove mentioned thread, as BPF resources will be managed by bpf_link itself, so there's no further need for creating the thread that will switch to remote netns and do the cleanup. Keep most of the logic for switching the ns, though, but make switch_namespace() return the fd so that it will be possible to close it at the process termination time. Get rid of logic around making sure that it's possible to switch ns in validate_interfaces(). Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-9-maciej.fijalkowski@intel.com commit c9d27c9e8dc7ccced65007a4d5d3640cad42adfc Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:06 2021 +0200 samples: bpf: Do not unload prog within xdpsock With the introduction of bpf_link in xsk's libbpf part, there's no further need for explicit unload of prog on xdpsock's termination. When process dies, the bpf_link's refcount will be decremented and resources will be unloaded/freed under the hood in case when there are no more active users. While at it, don't dump stats on error path. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-8-maciej.fijalkowski@intel.com commit 10397994d30f2de51bfd9321ed9ddb789464f572 Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:05 2021 +0200 libbpf: xsk: Use bpf_link Currently, if there are multiple xdpsock instances running on a single interface and in case one of the instances is terminated, the rest of them are left in an inoperable state due to the fact of unloaded XDP prog from interface. Consider the scenario below: // load xdp prog and xskmap and add entry to xskmap at idx 10 $ sudo ./xdpsock -i ens801f0 -t -q 10 // add entry to xskmap at idx 11 $ sudo ./xdpsock -i ens801f0 -t -q 11 terminate one of the processes and another one is unable to work due to the fact that the XDP prog was unloaded from interface. To address that, step away from setting bpf prog in favour of bpf_link. This means that refcounting of BPF resources will be done automatically by bpf_link itself. Provide backward compatibility by checking if underlying system is bpf_link capable. Do this by looking up/creating bpf_link on loopback device. If it failed in any way, stick with netlink-based XDP prog. therwise, use bpf_link-based logic. When setting up BPF resources during xsk socket creation, check whether bpf_link for a given ifindex already exists via set of calls to bpf_link_get_next_id -> bpf_link_get_fd_by_id -> bpf_obj_get_info_by_fd and comparing the ifindexes from bpf_link and xsk socket. For case where resources exist but they are not AF_XDP related, bail out and ask user to remove existing prog and then retry. Lastly, do a bit of refactoring within __xsk_setup_xdp_prog and pull out existing code branches based on prog_id value onto separate functions that are responsible for resource initialization if prog_id was 0 and for lookup existing resources for non-zero prog_id as that implies that XDP program is present on the underlying net device. This in turn makes it easier to follow, especially the teardown part of both branches. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-7-maciej.fijalkowski@intel.com commit aa2d61c154f9387883664e3873bc0700419640a3 Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:04 2021 +0200 selftests: xsk: Simplify frame traversal in dumping thread Store offsets to each layer in a separate variables rather than compute them every single time. Signed-off-by: Björn Töpel Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-6-maciej.fijalkowski@intel.com commit 965d2cb0f675e5f60af441c9bd430c284d66179d Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:03 2021 +0200 selftests: xsk: Remove inline keyword from source file Follow the kernel coding style guidelines and let compiler do the decision about inlining. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-5-maciej.fijalkowski@intel.com commit 7519c387e69d367075bf493de8a9ea427c9d2a1b Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:02 2021 +0200 selftests: xsk: Remove unused function Probably it was ported from xdpsock but is not used anywhere. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-4-maciej.fijalkowski@intel.com commit e623bfdef713ddda1b9f57d1759df3a1cd97255a Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:01 2021 +0200 selftests: xsk: Remove struct ifaceconfigobj ifaceconfigobj is not really useful, it is possible to keep the functionality and simplify the code. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-3-maciej.fijalkowski@intel.com commit 9f33df73a929ed91dddad036f518d690b3094eda Author: Maciej Fijalkowski Date: Tue Mar 30 00:43:00 2021 +0200 selftests: xsk: Don't call worker_pkt_dump() for stats test For TEST_TYPE_STATS, worker_pkt_validate() that places frames onto pkt_buf is not called. Therefore, when dump mode is set, don't call worker_pkt_dump() for mentioned test type, so that it won't crash on pkt_buf() access. Signed-off-by: Maciej Fijalkowski Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329224316.17793-2-maciej.fijalkowski@intel.com commit 52ab55dfe32357d5889eef2969a03dd662aa2b7d Author: Dongdong Liu Date: Tue Mar 30 21:43:19 2021 +0800 dt-bindings: PCI: hisi: Delete the obsolete HiSilicon PCIe file The hisilicon-pcie.txt file is no longer useful since commit c2fa6cf76d20 (PCI: dwc: hisi: Remove non-ECAM HiSilicon hip05/hip06 driver), so delete it and remove related code in MAINTAINERS file. Suggested-by: Zhou Wang Link: https://lore.kernel.org/r/1617111799-109749-1-git-send-email-liudongdong3@huawei.com Signed-off-by: Dongdong Liu Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński commit 8b01a0d0b5c1327296b37a13c37ca7ab31841577 Author: Rob Herring Date: Fri Mar 26 13:50:03 2021 -0600 ASoC: dt-bindings: nvidia, tegra210-ahub: Add missing child nodes The nvidia,tegra210-ahub binding is missing schema for child nodes. This results in warnings if 'additionalProperties: false' is set (or when the tools implement 'unevaluatedProperties' support). Add the child nodes and reference their schema if one exists. Cc: Liam Girdwood Cc: Mark Brown Cc: Thierry Reding Cc: Jonathan Hunter Cc: Sameer Pujar Cc: alsa-devel@alsa-project.org Cc: linux-tegra@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Thierry Reding Acked-by: Sameer Pujar Link: https://lore.kernel.org/r/20210326195003.3756394-1-robh@kernel.org Signed-off-by: Mark Brown commit 292c5ed168597df85f53cb03ec3e831b18969b62 Author: Fabian Hemmer Date: Fri Feb 26 02:52:23 2021 -0500 perf tools: Preserve identifier id in OCaml demangler Some OCaml developers reported that this bit of information is sometimes useful for disambiguating functions for which the OCaml compiler assigns the same name, e.g. nested or inlined functions. Signed-off-by: Fabian Hemmer Link: http://lore.kernel.org/lkml/20210226075223.p3s5oz4jbxwnqjtv@nyu Signed-off-by: Arnaldo Carvalho de Melo commit 5b1ed7df01335ecf686edf490948054078d5766d Merge: abc21649b3e5c a135dfb5de150 Author: Takashi Iwai Date: Tue Mar 30 17:42:40 2021 +0200 Merge tag 'tags/mute-led-rework' into for-next ALSA: control - add generic LED API This patchset tries to resolve the diversity in the audio LED control among the ALSA drivers. A new control layer registration is introduced which allows to run additional operations on top of the elementary ALSA sound controls. A new control access group (three bits in the access flags) was introduced to carry the LED group information for the sound controls. The low-level sound drivers can just mark those controls using this access group. This information is not exported to the user space, but user space can manage the LED sound control associations through sysfs (last patch) per Mark's request. It makes things fully configurable in the kernel and user space (UCM). The actual state ('route') evaluation is really easy (the minimal value check for all channels / controls / cards). If there's more complicated logic for a given hardware, the card driver may eventually export a new read-only sound control for the LED group and do the logic itself. The new LED trigger control code is completely separated and possibly optional (there's no symbol dependency). The full code separation allows eventually to move this LED trigger control to the user space in future. Actually it replaces the already present functionality in the kernel space (HDA drivers) and allows a quick adoption for the recent hardware (ASoC codecs including SoundWire). snd_ctl_led 24576 0 The sound driver implementation is really easy: 1) call snd_ctl_led_request() when control LED layer should be automatically activated / it calls module_request("snd-ctl-led") on demand / 2) mark all related kcontrols with SNDRV_CTL_ELEM_ACCESS_SPK_LED or SNDRV_CTL_ELEM_ACCESS_MIC_LED Link: https://lore.kernel.org/r/20210317172945.842280-1-perex@perex.cz Signed-off-by: Takashi Iwai commit d4f9dddd21f39395c62ea12d3d91239637d4805f Author: Cristian Marussi Date: Tue Mar 16 12:49:03 2021 +0000 firmware: arm_scmi: Add dynamic scmi devices creation Having added the support for SCMI protocols as modules in order to let vendors extend the SCMI core with their own additions it seems odd to then force SCMI drivers built on top to use a static device table to declare their devices since this way any new SCMI drivers addition would need the core SCMI device table to be updated too. Remove the static core device table and let SCMI drivers to simply declare which device/protocol pair they need at initialization time: the core will then take care to generate such devices dynamically during platform initialization or at module loading time, as long as the requested underlying protocol is defined in the devicetree. Link: https://lore.kernel.org/r/20210316124903.35011-39-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit f5800e0bf6f9b7ff7dfa4db8b0681bd062eb16a4 Author: Cristian Marussi Date: Tue Mar 16 12:49:02 2021 +0000 firmware: arm_scmi: Add protocol modularization support Extend SCMI protocols accounting mechanism to address possible module usage and add the support to possibly define new protocols as loadable modules. Keep the standard protocols built into the SCMI core. Link: https://lore.kernel.org/r/20210316124903.35011-38-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit aa1fd3e4cb976248651c319bb0ef929345958cf4 Author: Cristian Marussi Date: Tue Mar 16 12:49:01 2021 +0000 firmware: arm_scmi: Rename non devres notify_ops Rename non devres managed notify_ops to use a naming pattern which exposes the performed action verb as last token. No functional change. Link: https://lore.kernel.org/r/20210316124903.35011-37-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit a02d7c93c1f3cc892b69b50069ae757c92c03b0d Author: Cristian Marussi Date: Tue Mar 16 12:49:00 2021 +0000 firmware: arm_scmi: Make notify_priv really private Notification private data is currently accessible via handle->notify_priv, this data was indeed meant to be private to the notification core support and not to be accessible by SCMI drivers. Make it private hiding it inside instance descriptor struct scmi_info and accessible only via dedicated helpers. Link: https://lore.kernel.org/r/20210316124903.35011-36-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 3cb8c95f4b3055691db500ae7ab545074a771808 Author: Cristian Marussi Date: Tue Mar 16 12:48:59 2021 +0000 firmware: arm_scmi: Cleanup events registration transient code Remove all the events registration code used to ease the transition to the new interface based on protocol handles. Link: https://lore.kernel.org/r/20210316124903.35011-35-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 9162afa2ae990603f2ae91fae64b9cb55435972b Author: Cristian Marussi Date: Tue Mar 16 12:48:58 2021 +0000 firmware: arm_scmi: Cleanup unused core transfer helper wrappers Remove unused core scmi_xfer wrappers now that we have migrated all protocols to the new interface based on protocol handles. Link: https://lore.kernel.org/r/20210316124903.35011-34-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 51fe1b154e2fe798b280ca199cb3f26f340c5dfd Author: Cristian Marussi Date: Tue Mar 16 12:48:57 2021 +0000 firmware: arm_scmi: Cleanup legacy protocol init code Now that all protocols and drivers have been ported to the new interface based on protocol handles and get/put operations, remove all the legacy transient initialization code. Link: https://lore.kernel.org/r/20210316124903.35011-33-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit f0e73cee26dd3edd0158dba33956f63596273ab9 Author: Cristian Marussi Date: Tue Mar 16 12:48:56 2021 +0000 firmware: arm_scmi: Make references to handle const Now that all the protocol private variable data have been moved out of struct scmi_handle, mark all of its references as const. Link: https://lore.kernel.org/r/20210316124903.35011-32-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit c3ed5e953ef0cdd599e70558e2b26696f1fbe77d Author: Cristian Marussi Date: Tue Mar 16 12:48:55 2021 +0000 firmware: arm_scmi: Remove legacy scmi_voltage_ops protocol interface Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/20210316124903.35011-31-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 59046d157d52daf53d66387162b1ebdf6269b10f Author: Cristian Marussi Date: Tue Mar 16 12:48:54 2021 +0000 regulator: scmi: Port driver to the new scmi_voltage_proto_ops interface Port the scmi regulator driver to the new SCMI voltage interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/20210316124903.35011-30-cristian.marussi@arm.com Cc: Mark Brown Tested-by: Florian Fainelli Acked-by: Mark Brown Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit fe4894d968f4333f3d425221f03add8666881d72 Author: Cristian Marussi Date: Tue Mar 16 12:48:53 2021 +0000 firmware: arm_scmi: Port voltage protocol to new protocols interface Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->voltage_ops still around to ease transition. Remove handle->voltage_priv now unused. Link: https://lore.kernel.org/r/20210316124903.35011-29-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit b46d852718c1ba725e0a8b06bd0a039f85465838 Author: Cristian Marussi Date: Tue Mar 16 12:48:52 2021 +0000 firmware: arm_scmi: Port systempower protocol to new protocols interface Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations. Remove handle->system_priv now unused. Link: https://lore.kernel.org/r/20210316124903.35011-28-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit f3690d9729105963661d06c8cfd752ff1fa2499c Author: Cristian Marussi Date: Tue Mar 16 12:48:51 2021 +0000 firmware: arm_scmi: Remove legacy scmi_sensor_ops protocol interface Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/20210316124903.35011-27-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 25cbdd4609c084921858abed832d0c80a9ea1857 Author: Cristian Marussi Date: Tue Mar 16 12:48:50 2021 +0000 iio/scmi: Port driver to the new scmi_sensor_proto_ops interface Port the scmi iio driver to the new SCMI sensor interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/20210316124903.35011-26-cristian.marussi@arm.com Link: https://lore.kernel.org/r/20210330134711.1962-1-cristian.marussi@arm.com Acked-by: Jyoti Bhayana Acked-by: Jonathan Cameron Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 987bae41e94b77a745bd28fabc748a11bdbcbebd Author: Cristian Marussi Date: Tue Mar 16 12:48:49 2021 +0000 hwmon: (scmi) port driver to the new scmi_sensor_proto_ops interface Port the scmi hwmon driver to the new SCMI sensor interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/20210316124903.35011-25-cristian.marussi@arm.com Cc: Guenter Roeck Cc: Jean Delvare Tested-by: Florian Fainelli Acked-by: Guenter Roeck Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 9694a7f623593425a1559bb7a82bee91dfdd843b Author: Cristian Marussi Date: Tue Mar 16 12:48:48 2021 +0000 firmware: arm_scmi: Port sensor protocol to new protocols interface Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->sensor_ops still around to ease transition. Remove handle->sensor_priv now unused. Link: https://lore.kernel.org/r/20210316124903.35011-24-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 497ef0cbc6d166cef129b180dd292eec744a04fb Author: Cristian Marussi Date: Tue Mar 16 12:48:47 2021 +0000 firmware: arm_scmi: Remove legacy scmi_reset_ops protocol interface Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/20210316124903.35011-23-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 35cc2630627d2863892decf5a81b68b05bbeda5f Author: Cristian Marussi Date: Tue Mar 16 12:48:46 2021 +0000 reset: reset-scmi: Port driver to the new scmi_reset_proto_ops interface Port the scmi reset driver to the new SCMI reset interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/20210316124903.35011-22-cristian.marussi@arm.com Cc: Philipp Zabel Tested-by: Florian Fainelli Acked-by: Philipp Zabel Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 7e029344223824dbf21e759bf9c0d08f633edb16 Author: Cristian Marussi Date: Tue Mar 16 12:48:45 2021 +0000 firmware: arm_scmi: Port reset protocol to new protocols interface Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->reset_ops still around to ease transition. Remove handle->reset_priv now unused. Link: https://lore.kernel.org/r/20210316124903.35011-21-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 137e68659e90b242049bfd1fab2700bbcf476140 Author: Cristian Marussi Date: Tue Mar 16 12:48:44 2021 +0000 firmware: arm_scmi: Remove legacy scmi_clk_ops protocol interface Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/20210316124903.35011-20-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit beb076bb181b0135ee582d1bc18dfe924270da48 Author: Cristian Marussi Date: Tue Mar 16 12:48:43 2021 +0000 clk: scmi: Port driver to the new scmi_clk_proto_ops interface Port the scmi clock driver to the new SCMI clock interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/20210316124903.35011-19-cristian.marussi@arm.com Link: https://lore.kernel.org/r/20210326132844.33360-1-cristian.marussi@arm.com Cc: Michael Turquette Cc: Stephen Boyd Reviewed-by: Stephen Boyd Acked-by: Stephen Boyd Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 05d817031ff9686a8206039b19e37616cf9e1d44 Author: Andrii Nakryiko Date: Fri Mar 26 21:25:02 2021 -0700 libbpf: Fix memory leak when emitting final btf_ext Free temporary allocated memory used to construct finalized .BTF.ext data. Found by Coverity static analysis on libbpf's Github repo. Fixes: 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210327042502.969745-1-andrii@kernel.org commit b83fd195c228bdb7b45f3933919296fa6511fcf5 Merge: 7aae231ac93b9 2ba4badca9977 Author: Alexei Starovoitov Date: Tue Mar 30 07:31:01 2021 -0700 Merge branch 'bpf: Update doc about calling kernel function' Martin KaFai says: ==================== This set updates the document about the bpf program calling kernel function. In particular, updates are regarding to the clang requirement in selftests and kfunc-call not an ABI. ==================== Signed-off-by: Alexei Starovoitov commit 2ba4badca9977b64c966b0177920daadbd5501fe Author: Martin KaFai Lau Date: Mon Mar 29 22:41:56 2021 -0700 bpf: selftests: Update clang requirement in README.rst for testing kfunc call This patch updates the README.rst to specify the clang requirement to compile the bpf selftests that call kernel function. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210330054156.2933804-1-kafai@fb.com commit 5bdca94ff30d99168c3c09394da664c3c37c6834 Author: Martin KaFai Lau Date: Mon Mar 29 22:41:50 2021 -0700 bpf: Update bpf_design_QA.rst to clarify the kfunc call is not ABI This patch updates bpf_design_QA.rst to clarify that the kernel function callable by bpf program is not an ABI. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210330054150.2933542-1-kafai@fb.com commit 6cc7e5a9c6b02507b9be5a99b51e970afa91c85f Author: Xiang Chen Date: Tue Mar 30 20:58:26 2021 +0800 iommu/arm-smmu-v3: Add a check to avoid invalid iotlb sync It may send a invalid tlb sync for smmuv3 if iotlb_gather is not valid (iotlb_gather->pgsize = 0). So add a check to avoid invalid iotlb sync for it. Signed-off-by: Xiang Chen Link: https://lore.kernel.org/r/1617109106-121844-1-git-send-email-chenxiang66@hisilicon.com Signed-off-by: Will Deacon commit a135dfb5de1501327895729b4f513370d2555b4d Author: Jaroslav Kysela Date: Wed Mar 17 18:29:45 2021 +0100 ALSA: led control - add sysfs kcontrol LED marking layer We need to manage the kcontrol entries association for the LED trigger from the user space. This patch adds a layer to the sysfs tree like: /sys/devices/virtual/sound/ctl-led/mic + card0 | + attach | + detach | ... + card1 + attach ... Operations: attach and detach - amixer style ID is accepted and easy strings for numid and simple names reset - reset all associated kcontrol entries list - list associated kcontrol entries (numid values only) Additional symlinks: /sys/devices/virtual/sound/ctl-led/mic/card0/card -> /sys/class/sound/card0 /sys/class/sound/card0/controlC0/led-mic -> /sys/devices/virtual/sound/ctl-led/mic/card0 Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210317172945.842280-7-perex@perex.cz Signed-off-by: Takashi Iwai commit cb17fe0045aaa74d1ce12c0ad0058a62a1ce0401 Author: Jaroslav Kysela Date: Wed Mar 17 18:29:44 2021 +0100 ALSA: control - add sysfs support to the LED trigger module Create SYSFS/devices/virtual/sound/ctl-led tree (with SYSFS/class/sound/ctl-led symlink). speaker/ +-- mode +-- brightness mic/ +-- mode +-- brightness Copy the idea from the HDA driver and allow to set the audio LEDs based on the various modes: - follow mute - follow moute (inverted to follow mute) - off - on Also, the actual LED state is exposed. Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210317172945.842280-6-perex@perex.cz Signed-off-by: Takashi Iwai commit e65bf99718b538c2f34e9444dfe1087789b58f94 Author: Jaroslav Kysela Date: Wed Mar 17 18:29:43 2021 +0100 ALSA: HDA - remove the custom implementation for the audio LED trigger With the new snd-ctl-led module, we have a generic way to trigger audio LEDs based on the sound control changes. Remove the custom implementation from the HDA driver. Move the LED initialization before snd_hda_gen_parse_auto_config() call in all drivers to create marked controls there. Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210317172945.842280-5-perex@perex.cz Signed-off-by: Takashi Iwai commit acebb5597ff182e52a225400a459052a70dae706 Author: Bhaskar Chowdhury Date: Sun Mar 28 10:09:32 2021 +0530 kernel/printk.c: Fixed mundane typos s/sempahore/semaphore/ s/exacly/exactly/ s/unregistred/unregistered/ s/interation/iteration/ Signed-off-by: Bhaskar Chowdhury Reviewed-by: Petr Mladek [pmladek@suse.com: Removed 4th hunk. The string has already been removed in the meantime.] Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210328043932.8310-1-unixbhaskar@gmail.com commit 22d8de62f11b287b279f1d4473a78c7d5e53e7bc Author: Jaroslav Kysela Date: Wed Mar 17 18:29:42 2021 +0100 ALSA: control - add generic LED trigger module as the new control layer The recent laptops have usually two LEDs assigned to reflect the speaker and microphone mute state. This implementation adds a tiny layer on top of the control API which calculates the state for those LEDs using the driver callbacks. Two new access flags are introduced to describe the controls which affects the audio path settings (an easy code change for drivers). The LED resource can be shared with multiple sound cards with this code. The user space controls may be added to the state chain on demand, too. This code should replace the LED code in the HDA driver and add a possibility to easy extend the other drivers (ASoC codecs etc.). Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210317172945.842280-4-perex@perex.cz Signed-off-by: Takashi Iwai commit 3f0638a0333bfdd0549985aa620f2ab69737af47 Author: Jaroslav Kysela Date: Wed Mar 17 18:29:41 2021 +0100 ALSA: control - add layer registration routines The layer registration allows to handle an extra functionality on top of the control API. It can be used for the audio LED control for example. Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210317172945.842280-3-perex@perex.cz Signed-off-by: Takashi Iwai commit 1fa4445f9adf19a3028ce0e8f375bac75214fc10 Author: Jaroslav Kysela Date: Wed Mar 17 18:29:40 2021 +0100 ALSA: control - introduce snd_ctl_notify_one() helper This helper is required for the following generic LED mute patch. The helper also simplifies some other functions. Signed-off-by: Jaroslav Kysela Link: https://lore.kernel.org/r/20210317172945.842280-2-perex@perex.cz Signed-off-by: Takashi Iwai commit 28e1745b9fa23f71f465f6b65f966a1ef65af517 Author: Rasmus Villemoes Date: Tue Mar 23 15:42:01 2021 +0100 printk: rename vprintk_func to vprintk The printk code is already hard enough to understand. Remove an unnecessary indirection by renaming vprintk_func to vprintk (adding the asmlinkage annotation), and removing the vprintk definition from printk.c. That way, printk is implemented in terms of vprintk as one would expect, and there's no "vprintk_func, what's that? Some function pointer that gets set where?" The declaration of vprintk in linux/printk.h already has the __printf(1,0) attribute, there's no point repeating that with the definition - it's for diagnostics in callers. linux/printk.h already contains a static inline {return 0;} definition of vprintk when !CONFIG_PRINTK. Since the corresponding stub definition of vprintk_func was not marked "static inline", any translation unit including internal.h would get a definition of vprintk_func - it just so happens that for !CONFIG_PRINTK, there is precisely one such TU, namely printk.c. Had there been more, it would be a link error; now it's just a silly waste of a few bytes of .text, which one must assume are rather precious to anyone disabling PRINTK. $ objdump -dr kernel/printk/printk.o 00000330 : 330: 31 c0 xor %eax,%eax 332: c3 ret 333: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi 33a: 8d b6 00 00 00 00 lea 0x0(%esi),%esi Signed-off-by: Rasmus Villemoes Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210323144201.486050-1-linux@rasmusvillemoes.dk commit 173ef5f84b6d57b221215275346cf5b39ca5a425 Author: Vinod Koul Date: Sun Mar 28 22:46:18 2021 +0530 MAINTAINERS: icc: add interconnect tree MAINTAINERS entry for ICC is missing the tree details, so add it. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210328171618.2759956-1-vkoul@kernel.org Signed-off-by: Georgi Djakov commit f681c11bae9acde257a3c48e6b07a0d4dc50e98d Author: Wang Qing Date: Tue Mar 30 15:02:44 2021 +0800 mips/sgi-ip27: Delete obsolete TODO file The TODO file here has not been updated for 15 years, and the function development described in the file have been implemented or abandoned. Its existence will mislead developers seeking to view outdated information. Signed-off-by: Wang Qing Signed-off-by: Thomas Bogendoerfer commit abc21649b3e5c34b143bf86f0c78e33d5815e250 Author: Jia Zhou Date: Tue Mar 30 13:19:23 2021 +0200 ALSA: core: remove redundant spin_lock pair in snd_card_disconnect modification in commit 2a3f7221acdd ("ALSA: core: Fix card races between register and disconnect") resulting in this problem. Fixes: 2a3f7221acdd ("ALSA: core: Fix card races between register and disconnect") Signed-off-by: Jia Zhou Signed-off-by: Yi Wang Link: https://lore.kernel.org/r/1616989007-34429-1-git-send-email-wang.yi59@zte.com.cn Signed-off-by: Takashi Iwai commit 96fadf7e8ff49fdb74754801228942b67c3eeebd Author: Dmitry Baryshkov Date: Sat Mar 27 12:28:57 2021 +0300 ASoC: q6afe-clocks: fix reprobing of the driver Q6afe-clocks driver can get reprobed. For example if the APR services are restarted after the firmware crash. However currently Q6afe-clocks driver will oops because hw.init will get cleared during first _probe call. Rewrite the driver to fill the clock data at runtime rather than using big static array of clocks. Signed-off-by: Dmitry Baryshkov Reviewed-by: Srinivas Kandagatla Reviewed-by: Stephen Boyd Fixes: 520a1c396d19 ("ASoC: q6afe-clocks: add q6afe clock controller") Link: https://lore.kernel.org/r/20210327092857.3073879-1-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown commit c7721e94279887f9dd8f4be303f2054bb5477c9e Author: Mac Chiang Date: Fri Mar 26 19:21:29 2021 +0800 ASoC: Intel: add max98390 echo reference support load new topology file with speaker capture pipeline. Signed-off-by: Mac Chiang Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/1616757689-22014-1-git-send-email-mac.chiang@intel.com Signed-off-by: Mark Brown commit f556de6087f0d19825ffcdddc4816f83ddfd35e3 Author: Colin Ian King Date: Tue Mar 30 09:47:10 2021 +0100 ASoC: mediatek: mt6359: Fix spelling mistake "reate" -> "create" There is a spelling mistake in a dev_err error message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210330084710.997731-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 883ccef355b910398b99dfaf96d40557479a7e9b Author: Bartosz Golaszewski Date: Mon Mar 1 15:26:59 2021 +0100 genirq/irq_sim: Shrink devm_irq_domain_create_sim() The custom devres structure manages only a single pointer which can can be achieved by using devm_add_action_or_reset() as well which makes the code simpler. [ tglx: Fixed return value handling - found by smatch ] Signed-off-by: Bartosz Golaszewski Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210301142659.8971-1-brgl@bgdev.pl commit 0501418e4439d4ba2644b9d9a52287002fbc7553 Author: Dinh Nguyen Date: Tue Mar 23 10:55:15 2021 -0500 arm64: dts: intel: adjust qpsi read-delay property The "cnds,read-delay" value needs to be 2 for the Agilex devkit. Signed-off-by: Dinh Nguyen commit 4a3b394f78e1a70f6d0c0ebb4a0ab78013d6c304 Author: Krzysztof Kozlowski Date: Mon Mar 8 18:09:45 2021 +0100 arm64: dts: intel: socfpga_agilex_socdk_nand: align LED node names with dtschema Align the LED node names with dtschema to silence dtbs_check warnings like: leds: 'hps0', 'hps1', 'hps2' do not match any of the regexes: '(^led-[0-9a-f]$|led)', 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit ae68efe92dd50e5f2885a6ba41ce09e0281c601f Author: Krzysztof Kozlowski Date: Mon Mar 8 18:09:43 2021 +0100 arm64: dts: intel: socfpga_agilex: align node names with dtschema Align the NAND, GIC and UART node names with dtschema to silence dtbs_check warnings like: arch/arm64/boot/dts/intel/socfpga_agilex_socdk.dt.yaml: intc@fffc1000: $nodename:0: 'intc@fffc1000' does not match '^interrupt-controller(@[0-9a-f,]+)*$' arch/arm64/boot/dts/intel/socfpga_agilex_socdk.dt.yaml: serial0@ffc02000: $nodename:0: 'serial0@ffc02000' does not match '^serial(@[0-9a-f,]+)*$' Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit f10ffbf5f6bd15d29b5b16464c8f12b4edde8339 Author: Krzysztof Kozlowski Date: Mon Mar 8 18:09:42 2021 +0100 arm64: dts: intel: socfpga_agilex: use defined for GIC interrupts Use human-readable defines for GIC interrupt type and flag, instead of hard-coding the numbers. It makes review easier. No functional change. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 9e4744277a8d3185ac2bfd4998990593fefc99cd Author: Krzysztof Kozlowski Date: Mon Mar 8 18:09:41 2021 +0100 arm64: dts: intel: socfpga_agilex: move usbphy out of soc node The usual usb-nop-xceiv USB phy node should be under root node, to fix dtc warning: arch/arm64/boot/dts/intel/socfpga_agilex.dtsi:472.21-476.5: Warning (simple_bus_reg): /soc/usbphy@0: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit cce24712582092b8b9c71add8d437f807cf45aab Author: Krzysztof Kozlowski Date: Mon Mar 8 18:09:40 2021 +0100 arm64: dts: intel: socfpga_agilex: remove default status=okay New nodes are okay by default. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 9f1f6273ced392f5ef1ef2129958c30832c1a0da Author: Krzysztof Kozlowski Date: Mon Mar 8 18:09:39 2021 +0100 arm64: dts: intel: socfpga_agilex: move timer out of soc node The ARM architected timer is part of ARM CPU design therefore by convention it should not be inside the soc node. This also fixes dtc warning like: arch/arm64/boot/dts/intel/socfpga_agilex.dtsi:410.9-416.5: Warning (simple_bus_reg): /soc/timer: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit d2e59308427090e42012a292204d35442953c9e5 Author: Krzysztof Kozlowski Date: Mon Mar 8 18:09:38 2021 +0100 arm64: dts: intel: socfpga_agilex: move clocks out of soc node The clocks are usually not part of the SoC but provided on the board (external oscillators). Moving them out of soc node fixes dtc warning: arch/arm64/boot/dts/intel/socfpga_agilex.dtsi:111.10-137.5: Warning (simple_bus_reg): /soc/clocks: missing or empty reg/ranges property Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 15e26f6914e44a079fcc6b020624eacf3ebff7eb Author: Krzysztof Kozlowski Date: Mon Mar 8 18:09:37 2021 +0100 arm64: dts: intel: socfpga: override clocks by label Using full paths to extend or override a device tree node is error prone. If there was a typo error, a new node will be created instead of extending the existing node. This will lead to run-time errors that could be hard to detect. A mistyped label on the other hand, will cause a dtc compile error (during build time). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 25e8b9eb096d057bd5c8095d6a95c16091331e82 Author: Shawn Guo Date: Fri Mar 26 19:02:14 2021 +0800 mmc: sdhci-esdhc-imx: separate 100/200 MHz pinctrl states check As indicated by function esdhc_change_pinstate(), SDR50 and DDR50 require pins_100mhz, while SDR104 and HS400 require pins_200mhz. Some system design may support SDR50 and DDR50 with 100mhz pin state only (without 200mhz one). Currently the combined 100/200 MHz pinctrl state check prevents such system from running SDR50 and DDR50. Separate the check to support such system design. Signed-off-by: Shawn Guo Reviewed-by: Haibo Chen Link: https://lore.kernel.org/r/20210326110214.28416-1-shawnguo@kernel.org Signed-off-by: Ulf Hansson commit f0bdf98fab058efe7bf49732f70a0f26d1143154 Author: Al Cooper Date: Thu Mar 25 15:28:34 2021 -0400 mmc: sdhci-brcmstb: Remove CQE quirk Remove the CQHCI_QUIRK_SHORT_TXFR_DESC_SZ quirk because the latest chips have this fixed and earlier chips have other CQE problems that prevent the feature from being enabled. Signed-off-by: Al Cooper Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20210325192834.42955-1-alcooperx@gmail.com Signed-off-by: Ulf Hansson commit e20ac6c54a93335b56a6d057aa5da27183f573fa Author: Robin Murphy Date: Fri Mar 26 16:02:42 2021 +0000 perf/arm_pmu_platform: Clean up with dev_printk Nearly all of the messages we can log from the platform device code relate to the specific PMU device and the properties we're parsing from its DT node. In some cases we use %pOF to point at where something was wrong, but even that is inconsistent. Let's convert these logs to the appropriate dev_printk variants, so that every issue specific to the device and/or its DT description is clearly and instantly attributable, particularly if there is more than one PMU node present in the DT. The local refactoring in a couple of functions invites some extra cleanup in the process - the init_fn matching can be streamlined, and the PMU registration failure message moved to the appropriate place and log level. CC: Tian Tao Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/10a4aacdf071d0c03d061c408a5899e5b32cc0a6.1616774562.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit e338cb6bef254821a8c095018fd27254d74bfd6a Author: Robin Murphy Date: Fri Mar 26 16:02:41 2021 +0000 perf/arm_pmu_platform: Fix error handling If we're aborting after failing to register the PMU device, we probably don't want to leak the IRQs that we've claimed. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/53031a607fc8412a60024bfb3bb8cd7141f998f5.1616774562.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit 11fa1dc8020a2a9e0c59998920092d4df3fb7308 Author: Robin Murphy Date: Fri Mar 26 16:02:40 2021 +0000 perf/arm_pmu_platform: Use dev_err_probe() for IRQ errors By virtue of using platform_irq_get_optional() under the covers, platform_irq_count() needs the target interrupt controller to be available and may return -EPROBE_DEFER if it isn't. Let's use dev_err_probe() to avoid a spurious error log (and help debug any deferral issues) in that case. Reported-by: Paul Menzel Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/073d5e0d3ed1f040592cb47ca6fe3759f40cc7d1.1616774562.git.robin.murphy@arm.com Signed-off-by: Will Deacon commit b88f5e9792cc320a511697dcba8890d032ee3ed3 Author: Qi Liu Date: Mon Mar 29 20:32:01 2021 +0800 docs: perf: Address some html build warnings Fix following html build warnings: Documentation/admin-guide/perf/hisi-pmu.rst:61: WARNING: Unexpected indentation. Documentation/admin-guide/perf/hisi-pmu.rst:62: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/admin-guide/perf/hisi-pmu.rst:69: WARNING: Unexpected indentation. Documentation/admin-guide/perf/hisi-pmu.rst:70: WARNING: Block quote ends without a blank line; unexpected unindent. Documentation/admin-guide/perf/hisi-pmu.rst:83: WARNING: Unexpected indentation. Fixes: 9b86b1b41e0f ("docs: perf: Add new description on HiSilicon uncore PMU v2") Reported-by: Stephen Rothwell Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1617021121-31450-1-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 9161385d53e251ea8c3ee1f3785db1de4a4ef792 Author: Hsin-Hsiung Wang Date: Fri Mar 12 23:34:45 2021 +0800 soc: mediatek: pwrap: add pwrap driver for MT6873/8192 SoCs MT6873/8192 are highly integrated SoCs and use PMIC_MT6359 for power management. This patch adds pwrap master driver to access PMIC_MT6359. Signed-off-by: Hsin-Hsiung Wang Link: https://lore.kernel.org/r/1615563286-22126-5-git-send-email-hsin-hsiung.wang@mediatek.com Signed-off-by: Matthias Brugger commit 4bcadf8d553593aae4c7daf7db7d6c65dd453167 Author: Hsin-Hsiung Wang Date: Fri Mar 12 23:34:44 2021 +0800 dt-bindings: mediatek: add compatible for MT6873/8192 pwrap This adds dt-binding documentation of pwrap for Mediatek MT6873/8192 SoCs Platform. Signed-off-by: Hsin-Hsiung Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/1615563286-22126-4-git-send-email-hsin-hsiung.wang@mediatek.com Signed-off-by: Matthias Brugger commit 9d498d0b4043e08273ff6eb6bd2d2e50fec26134 Author: Hsin-Hsiung Wang Date: Fri Mar 12 23:34:43 2021 +0800 soc: mediatek: pwrap: add arbiter capability Add arbiter capability for pwrap driver. The arbiter capability uses new design to judge the priority and latency for multi-channel. The design with arbiter support cannot change the watchdog timer. This patch is preparing for adding mt6873/8192 pwrap support. Signed-off-by: Hsin-Hsiung Wang Link: https://lore.kernel.org/r/1615563286-22126-3-git-send-email-hsin-hsiung.wang@mediatek.com Signed-off-by: Matthias Brugger commit d337ed031dfb8bc7d483b25c9052dca98fc9931d Author: Hsin-Hsiung Wang Date: Fri Mar 12 23:34:42 2021 +0800 soc: mediatek: pwrap: use BIT() macro Use a better BIT() marco for the bit definition. No functional changes, cleanup only. Signed-off-by: Hsin-Hsiung Wang Reviewed-by: Nicolas Boichat Link: https://lore.kernel.org/r/1615563286-22126-2-git-send-email-hsin-hsiung.wang@mediatek.com Signed-off-by: Matthias Brugger commit 562f818deaf0601f224999cc39b6c97fbb2adc57 Author: Boris Lysov Date: Sun Mar 14 02:37:35 2021 +0300 arm: mediatek: dts: activate SMP for mt6589 This simple patch activates SMP for mt6589 by adding the missing "enable-method" property. After applying this patch kernel log indicates all cores are brought up: [ 0.070122] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.071652] Setting up static identity map for 0x80100000 - 0x80100054 [ 0.072711] rcu: Hierarchical SRCU implementation. [ 0.073853] smp: Bringing up secondary CPUs ... [ 0.133675] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.193675] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.253675] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.253818] smp: Brought up 1 node, 4 CPUs [ 0.256930] SMP: Total of 4 processors activated (7982.28 BogoMIPS). [ 0.257855] CPU: All CPU(s) started in SVC mode. Before this change CPU cores 1-3 didn't start and the following lines were in kernel log: [ 0.070126] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.071640] Setting up static identity map for 0x80100000 - 0x80100054 [ 0.072706] rcu: Hierarchical SRCU implementation. [ 0.073850] smp: Bringing up secondary CPUs ... [ 0.076052] smp: Brought up 1 node, 1 CPU [ 0.076678] SMP: Total of 1 processors activated (2000.48 BogoMIPS). [ 0.077603] CPU: All CPU(s) started in SVC mode. Signed-off-by: Boris Lysov Link: https://lore.kernel.org/r/20210314023735.052d2d35@pc Signed-off-by: Matthias Brugger commit b92861799a591e561bb0677d8455119c7e7e348c Author: Fabien Parent Date: Tue Feb 23 23:36:13 2021 +0100 dt-bindings: arm64: dts: mediatek: Add mt8516-pumpkin board Add binding documentation for the MT8516 Pumpkin board. Signed-off-by: Fabien Parent Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210223223613.2085827-1-fparent@baylibre.com Signed-off-by: Matthias Brugger commit 9950588a45241b0efcfc312ab0e414260ceca709 Author: Enric Balletbo i Serra Date: Wed Mar 3 10:10:54 2021 +0100 soc: mediatek: pm-domains: Fix missing error code in scpsys_add_subdomain() Adding one power domain in scpsys_add_subdomain is missing to assign an error code when it fails. Fix that assigning an error code to 'ret', this also fixes the follwowing smatch warning. drivers/soc/mediatek/mtk-pm-domains.c:492 scpsys_add_subdomain() warn: missing error code 'ret' Fixes: dd65030295e2 ("soc: mediatek: pm-domains: Don't print an error if child domain is deferred") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210303091054.796975-1-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 0da34906a9daadc1c3dacbaed051e5e0188939c3 Author: Ryder Lee Date: Tue Mar 30 01:24:48 2021 +0800 arm64: dts: mt7622: add ePA/eLNA pinmux for built-in WiFi This just illustrates one of possible combinations. User should setup the corresponding pins according to the onboard RF data that stores in eeprom. Signed-off-by: Ryder Lee Link: https://lore.kernel.org/r/641c5e40f54e7c9c8eaa6be398d7169445b6fede.1617006498.git.ryder.lee@mediatek.com Signed-off-by: Matthias Brugger commit bac53336ca816624581a3de5f2c0991343ae5341 Author: Jisheng Zhang Date: Wed Mar 24 15:50:13 2021 +0800 mmc: sdhci: replace mmc->parent with mmc_dev() for consistency As pointed out by Ulf, "both "mmc->parent" and mmc_dev(mmc) are being used in the entire c-file". Convert all the mmc->parent usage in all sdhci host driver to mmc_dev() for consistency. Suggested-by: Ulf Hansson Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20210324155013.1e5faa3c@xhacker.debian Signed-off-by: Ulf Hansson commit 57ac3084f598d238ae829d595bfc20afaf0feb38 Author: Jisheng Zhang Date: Wed Mar 24 15:47:21 2021 +0800 mmc: sdhci-of-dwcmshc: set MMC_CAP_WAIT_WHILE_BUSY The host supports HW busy detection of the device busy signaling over dat0 line. Set MMC_CAP_wAIT_WHILE_BUSY host capability. Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20210324154703.69f97fde@xhacker.debian Signed-off-by: Ulf Hansson commit 34884c4f6483b9d9f14973cd0c9c06404fe6e13d Author: Wei Yongjun Date: Tue Mar 23 11:29:56 2021 +0000 mmc: sdhci-of-dwcmshc: fix error return code in dwcmshc_probe() Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: c2c4da37837e ("mmc: sdhci-of-dwcmshc: add rockchip platform support") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210323112956.1016884-1-weiyongjun1@huawei.com Signed-off-by: Ulf Hansson commit eb81ed518079eaf8aca1053ffba54c56271b9f35 Author: Liming Sun Date: Mon Mar 22 18:46:51 2021 -0400 mmc: sdhci-of-dwcmshc: add ACPI support for BlueField-3 SoC This commit adds ACPI support in the sdhci-of-dwcmshc driver for BlueField-3 SoC. It has changes to only use the clock hierarchy for Deviec Tree since the clk is not supported by ACPI. Instead, ACPI can define 'clock-frequency' which is parsed by existing sdhci_get_property(). This clock value will be returned in function dwcmshc_get_max_clock(). Signed-off-by: Liming Sun Reviewed-by: Khalil Blaiech Link: https://lore.kernel.org/r/1616453211-275165-1-git-send-email-limings@nvidia.com Signed-off-by: Ulf Hansson commit ee629112be8b4eff71d4d3d108a28bc7dc877e13 Author: Adrian Hunter Date: Mon Mar 22 07:53:56 2021 +0200 mmc: sdhci-pci: Add PCI IDs for Intel LKF Add PCI IDs for Intel LKF eMMC and SD card host controllers. Signed-off-by: Adrian Hunter Link: https://lore.kernel.org/r/20210322055356.24923-1-adrian.hunter@intel.com Signed-off-by: Ulf Hansson commit 6e5c951b4c3a0bd9aa5838ecec98f3c795c83ff1 Author: Wolfram Sang Date: Tue Mar 16 09:57:17 2021 +0100 mmc: tmio: always flag retune when resetting and a card is present After reset, we manually flagged retune in runtime resume, but missed it in the workqueue. To fix that and avoid the problem in the future, let's flag retune in the reset handler directly whenever a card is present. Reported-by: Takeshi Saito Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210316085717.7276-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 0a446288aa9f28ab00a31b8b51fdb005953f9f99 Author: Takeshi Saito Date: Tue Mar 16 09:57:16 2021 +0100 mmc: tmio: restore bus width when resetting Resetting the IP core will lose the bus width information and not all code paths recover it. So, make sure the latest bus width gets restored in the reset routine. For that, tmio_mmc_set_bus_width() is moved, but not modified. Signed-off-by: Takeshi Saito [wsa: reworded commit message] Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210316085717.7276-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 6b0e0fce4074c1fd6d7d56face140ce67110b3b2 Author: Bean Huo Date: Fri Mar 19 13:13:56 2021 +0100 mmc: cavium: Use '"%s...", __func__' to print function name Use preferred way '"%s...", __func__' to print function name. Signed-off-by: Bean Huo Link: https://lore.kernel.org/r/20210319121357.255176-2-huobean@gmail.com Signed-off-by: Ulf Hansson commit 955047f3c35a3116416ffbddcaeeb6499afaf43b Author: James Young Date: Thu Mar 18 12:40:27 2021 +0000 mmc: sdhci-acpi: Add device ID for the AMDI0041 variant of the AMD eMMC controller. This variant is present on a Lenovo IdeaPad Slim 1, which uses an AMD Dali/Athlon Silver 3050e. The Windows AMD SD Host Controller driver also lists this as a valid device ID. Adding this device ID makes the internal eMMC storage on the Lenovo accessible. Consequently this makes Linux installable and usable on it as well. Signed-off-by: James Young Link: https://lore.kernel.org/r/20210318124025.3002861-1-james@pocketfluff.org Signed-off-by: Ulf Hansson commit eb9cb7227e5c4ca81d988ada577a6d5c054ee111 Author: Seiya Wang Date: Fri Mar 19 10:34:23 2021 +0800 dt-bindings: mmc: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of mmc for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20210319023427.16711-6-seiya.wang@mediatek.com Signed-off-by: Ulf Hansson commit b4d86f37eacb724690d0d300576b82806bc743d5 Author: Wolfram Sang Date: Wed Mar 17 10:16:22 2021 +0100 mmc: renesas_sdhi: do hard reset if possible All recent SDHI instances can be reset via the reset controller. If one is found, use it instead of the open coded reset. This is to get a future-proof sane reset state. Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210317091622.31890-4-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 0e5870145840e91fc33cd4eca6e228b009d86705 Author: Wolfram Sang Date: Wed Mar 17 10:16:21 2021 +0100 mmc: renesas_sdhi: break SCC reset into own function renesas_sdhi_reset used to mainly reset the SCC but is now doing more and even more will be added. So, factor out SCC reset to have a clear distinction when we want to reset either SCC or SDHI+SCC. Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210317091622.31890-3-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit ab0cdefec052825303c05687d9416bafc867fe3d Author: Wolfram Sang Date: Wed Mar 17 10:16:20 2021 +0100 mmc: tmio: abort DMA before reset We will soon allow resetting the whole IP core via a reset controller. For this case, DMA must be terminated before the actual reset. For the other cases, it is probably better, too. Reviewed-by: Niklas Söderlund Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210317091622.31890-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 08f3dff799d43bd2ec9d5e05c819ae3f253fe5cd Author: Shawn Lin Date: Tue Mar 16 15:18:22 2021 +0800 mmc: sdhci-of-dwcmshc: add rockchip platform support sdhci based synopsys MMC IP is also used on some rockchip platforms, so add a basic support here. Signed-off-by: Shawn Lin Link: https://lore.kernel.org/r/1615879102-45919-3-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Ulf Hansson commit dd12261e7fd9a3c7f6ddf76152764861ad4f0e12 Author: Shawn Lin Date: Tue Mar 16 15:18:21 2021 +0800 dt-bindings: mmc: sdhci-of-dwcmhsc: Add rockchip support This patch adds rockchip support in sdhci-of-dwcmhsc.yaml Signed-off-by: Shawn Lin Link: https://lore.kernel.org/r/1615879102-45919-2-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Ulf Hansson commit 169162ca4781480ea5bb67b0610f3efbecaf3e66 Author: Shawn Lin Date: Tue Mar 16 15:18:20 2021 +0800 dt-bindings: mmc: sdhci-of-dwcmhsc: Convert to yaml file This patch converts sdhci-of-dwcmshc.txt to sdhci-of-dwcmshc.yaml Signed-off-by: Shawn Lin Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1615879102-45919-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Ulf Hansson commit 91b3d2e5b7af086d74c15c0b62dcb5073ce8055d Author: Fabio Estevam Date: Sun Mar 14 20:08:24 2021 -0300 mmc: sdhci-esdhc-imx: Use device_get_match_data() The retrieval of driver data can be a bit simplified by using device_get_match_data(), so switch to it. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210314230824.148969-2-festevam@gmail.com Signed-off-by: Ulf Hansson commit ebe9572fd28c0336bb98e5856b03344660c25a5e Author: Fabio Estevam Date: Sun Mar 14 20:08:23 2021 -0300 mmc: sdhci-esdhc-imx: Remove non-DT stub i.MX has been converted to a devicetree only platform, so remove the non-DT stub for sdhci_esdhc_imx_probe_dt(). Also, make the driver depend on OF now. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210314230824.148969-1-festevam@gmail.com Signed-off-by: Ulf Hansson commit 9a8a369bd0b0c172b880f3393bb0322de98dc97c Author: Joey Pabalan Date: Sat Mar 13 12:37:40 2021 -0500 memstick: Remove useless else branch Remove else branch on line 334 of memstick.c, after the return of the previous branch. Found by checkpatch. Signed-off-by: Joey Pabalan Link: https://lore.kernel.org/r/20210313173740.GA580681@joeylaptop Signed-off-by: Ulf Hansson commit 17a17bf50612e6048a9975450cf1bd30f93815b5 Author: Ulf Hansson Date: Wed Mar 10 16:29:00 2021 +0100 mmc: core: Fix hanging on I/O during system suspend for removable cards The mmc core uses a PM notifier to temporarily during system suspend, turn off the card detection mechanism for removal/insertion of (e)MMC/SD/SDIO cards. Additionally, the notifier may be used to remove an SDIO card entirely, if a corresponding SDIO functional driver don't have the system suspend/resume callbacks assigned. This behaviour has been around for a very long time. However, a recent bug report tells us there are problems with this approach. More precisely, when receiving the PM_SUSPEND_PREPARE notification, we may end up hanging on I/O to be completed, thus also preventing the system from getting suspended. In the end what happens, is that the cancel_delayed_work_sync() in mmc_pm_notify() ends up waiting for mmc_rescan() to complete - and since mmc_rescan() wants to claim the host, it needs to wait for the I/O to be completed first. Typically, this problem is triggered in Android, if there is ongoing I/O while the user decides to suspend, resume and then suspend the system again. This due to that after the resume, an mmc_rescan() work gets punted to the workqueue, which job is to verify that the card remains inserted after the system has resumed. To fix this problem, userspace needs to become frozen to suspend the I/O, prior to turning off the card detection mechanism. Therefore, let's drop the PM notifiers for mmc subsystem altogether and rely on the card detection to be turned off/on as a part of the system_freezable_wq, that we are already using. Moreover, to allow and SDIO card to be removed during system suspend, let's manage this from a ->prepare() callback, assigned at the mmc_host_class level. In this way, we can use the parent device (the mmc_host_class device), to remove the card device that is the child, in the device_prepare() phase. Reported-by: Kiwoong Kim Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Ulf Hansson Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210310152900.149380-1-ulf.hansson@linaro.org Reviewed-by: Kiwoong Kim commit 18bbda900ffa7770b93daa1bc1ce3be39e643101 Author: Jisheng Zhang Date: Thu Mar 11 17:41:57 2021 +0800 mmc: sdio: fix a typo in the comment of SDIO_SD_REV_3_00 I believe "Spev" is typo, should be "Spec". Signed-off-by: Jisheng Zhang Link: https://lore.kernel.org/r/20210311174157.561dada9@xhacker.debian Signed-off-by: Ulf Hansson commit d2f025b08e9eb5e8e96c65c2b5dc01318801059a Author: Jisheng Zhang Date: Thu Mar 11 17:40:46 2021 +0800 mmc: sdhci: Use "mmc" directly rather than "host->mmc" Clean up the code to use the "mmc" directly instead of "host->mmc". If the code sits in hot code path, this clean up also brings trvial performance improvement. Take the sdhci_post_req() for example: before the patch: ... 8d0: a9be7bfd stp x29, x30, [sp, #-32]! 8d4: 910003fd mov x29, sp 8d8: f9000bf3 str x19, [sp, #16] 8dc: f9400833 ldr x19, [x1, #16] 8e0: b9404261 ldr w1, [x19, #64] 8e4: 34000161 cbz w1, 910 8e8: f9424400 ldr x0, [x0, #1160] 8ec: d2800004 mov x4, #0x0 // #0 8f0: b9401a61 ldr w1, [x19, #24] 8f4: b9403262 ldr w2, [x19, #48] 8f8: f9400000 ldr x0, [x0] 8fc: f278003f tst x1, #0x100 900: f9401e61 ldr x1, [x19, #56] 904: 1a9f17e3 cset w3, eq // eq = none 908: 11000463 add w3, w3, #0x1 90c: 94000000 bl 0 ... After the patch: ... 8d0: a9be7bfd stp x29, x30, [sp, #-32]! 8d4: 910003fd mov x29, sp 8d8: f9000bf3 str x19, [sp, #16] 8dc: f9400833 ldr x19, [x1, #16] 8e0: b9404261 ldr w1, [x19, #64] 8e4: 34000141 cbz w1, 90c 8e8: b9401a61 ldr w1, [x19, #24] 8ec: d2800004 mov x4, #0x0 // #0 8f0: b9403262 ldr w2, [x19, #48] 8f4: f9400000 ldr x0, [x0] 8f8: f278003f tst x1, #0x100 8fc: f9401e61 ldr x1, [x19, #56] 900: 1a9f17e3 cset w3, eq // eq = none 904: 11000463 add w3, w3, #0x1 908: 94000000 bl 0 ... We saved one ldr instruction: "ldr x0, [x0, #1160]" Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20210311174046.597d1951@xhacker.debian Signed-off-by: Ulf Hansson commit ba8734dfbe87b9dd68c9d525c0a3a52e8da42167 Author: Jisheng Zhang Date: Thu Mar 11 18:14:32 2021 +0800 mmc: sdhci-pci: Avoid comma separated statements Use semicolons. Signed-off-by: Jisheng Zhang Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/20210311181432.6385cd2b@xhacker.debian Signed-off-by: Ulf Hansson commit 3a75283a6b12e60c902f5ca84b8a27010024ce69 Author: Yang Li Date: Tue Mar 9 14:47:58 2021 +0800 mmc: via-sdmmc: remove unneeded variable 'ret' Fix the following coccicheck warning: ./drivers/mmc/host/via-sdmmc.c:1274:5-8: Unneeded variable: "ret". Return "0" on line 1295 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1615272478-52458-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Ulf Hansson commit baf6fe4036421ca9ebf5087c117ffe5bdb5dc436 Author: Philipp Zabel Date: Fri Mar 5 10:07:24 2021 +0100 mmc: dw_mmc: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20210305090724.18832-1-p.zabel@pengutronix.de Signed-off-by: Ulf Hansson commit 95211a98e3b202479d81026ceeae58529bbc4d02 Author: Philipp Zabel Date: Fri Mar 5 10:08:27 2021 +0100 mmc: sdhci-st: simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to return errors from devm_reset_control_get_optional and to call reset_control_(de)assert unconditionally. Signed-off-by: Philipp Zabel Link: https://lore.kernel.org/r/20210305090827.19124-1-p.zabel@pengutronix.de Signed-off-by: Ulf Hansson commit 8c87dab92f90c4c8f45d7ac302da878e269d3695 Author: Jia-Ju Bai Date: Thu Mar 4 18:14:45 2021 -0800 memstick: core: Assign error code of mspro_block_resume() When mspro_block_init_card() fails, no error return code of mspro_block_resume() is assigned/propagated. Let's fix this. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210305021445.3435-1-baijiaju1990@gmail.com Signed-off-by: Ulf Hansson commit 407a1c570f9248886be21a396c0ea7f7f5e7b3cc Author: Luca Porzio Date: Mon Feb 15 01:32:18 2021 +0100 mmc: core: Remove mq->use_cqe from the struct mmc_queue The host->cqe_enabled is already containing the needed information about whether the CQE is enabled or not, hence there is no need to keep another copy of it around. Signed-off-by: Luca Porzio Signed-off-by: Zhan Liu Link: https://lore.kernel.org/r/20210215003217.GA12240@lupo-laptop Signed-off-by: Ulf Hansson commit 6f1d3247662acef35ef6882528028b4b470baab4 Author: Ulf Hansson Date: Wed Mar 3 13:20:49 2021 +0100 mmc: block: Fix error path in mmc_blk_probe() Returning zero to indicate success, when we actually have failed to probe is wrong. As a matter of fact, it leads to that mmc_blk_remove() gets called at a card removal and then triggers "NULL pointer dereference" splats. This is because mmc_blk_remove() relies on data structures and pointers to be setup from mmc_blk_probe(), of course. There have been no errors reported about this, which is most likely because mmc_blk_probe() never fails like this. Nevertheless, let's fix the code by propagating the error codes correctly and prevent us from leaking memory by calling also destroy_workqueue() in the error path. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20210303122049.151986-4-ulf.hansson@linaro.org Signed-off-by: Ulf Hansson commit ce999ed15e23cbe3d6310e10dffdd585674a393d Author: Ulf Hansson Date: Wed Mar 3 13:20:48 2021 +0100 mmc: block: Simplify logging during probe about added partitions To simplify the code, move the logging into the common mmc_blk_alloc_req() and drop the rather useless information about the partition type/id. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20210303122049.151986-3-ulf.hansson@linaro.org Signed-off-by: Ulf Hansson commit 1d848c28874e9bf12460dc085ec116d062de8e68 Author: Ulf Hansson Date: Wed Mar 3 13:20:47 2021 +0100 mmc: block: Drop use of unlikely() in mmc_blk_probe() mmc_blk_probe() isn't a hotpath, which makes it's questionable to use unlikely(). Therefore let's simply drop it. Signed-off-by: Ulf Hansson Link: https://lore.kernel.org/r/20210303122049.151986-2-ulf.hansson@linaro.org Signed-off-by: Ulf Hansson commit 9f12cac1bb88e3296990e760d867a98308d6b0ac Author: Wolfram Sang Date: Thu Mar 4 10:29:03 2021 +0100 mmc: renesas_sdhi: use custom mask for TMIO_MASK_ALL Populate the new member for custom mask values to make sure this value is applied whenever needed. Also, rename the define holding the value because this is not only about initialization anymore. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210304092903.8534-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 21e35e898aa9ef7781632959db8613a5380f2eae Author: Pradeep P V K Date: Wed Mar 3 14:02:11 2021 +0530 mmc: sdhci: Check for reset prior to DMA address unmap For data read commands, SDHC may initiate data transfers even before it completely process the command response. In case command itself fails, driver un-maps the memory associated with data transfer but this memory can still be accessed by SDHC for the already initiated data transfer. This scenario can lead to un-mapped memory access error. To avoid this scenario, reset SDHC (when command fails) prior to un-mapping memory. Resetting SDHC ensures that all in-flight data transfers are either aborted or completed. So we don't run into this scenario. Swap the reset, un-map steps sequence in sdhci_request_done(). Suggested-by: Veerabhadrarao Badiganti Signed-off-by: Pradeep P V K Acked-by: Adrian Hunter Link: https://lore.kernel.org/r/1614760331-43499-1-git-send-email-pragalla@qti.qualcomm.com Cc: stable@vger.kernel.org # v4.9+ Signed-off-by: Ulf Hansson commit d599005afde8dd86b819d353fd77568c35295337 Author: Dinghao Liu Date: Fri Feb 26 16:41:46 2021 +0800 mmc: sdhci-pci-o2micro: Add missing checks in sdhci_pci_o2_probe It's odd to adopt different error handling on failure of pci_read_config_dword(). Check the return value and terminate execution flow on failure of all pci_read_config_dword() calls in this function. Signed-off-by: Dinghao Liu Link: https://lore.kernel.org/r/20210226084146.29095-1-dinghao.liu@zju.edu.cn Signed-off-by: Ulf Hansson commit f46b54cc72bd71d1b2e620bfa00a95837078261f Author: Renius Chen Date: Thu Feb 25 19:13:07 2021 +0800 mmc: sdhci-pci-gli: Enable short circuit protection mechanism of GL9755 Short circuit protection mechanism of GL9755 is disabled by HW default setting. Enable short circuit protection to prevent GL9755 from being damaged by short circuit or over current. Signed-off-by: Renius Chen Link: https://lore.kernel.org/r/20210225111307.62975-1-reniuschengl@gmail.com Signed-off-by: Ulf Hansson commit f410ee0aa2df050a9505f5c261953e9b18e21206 Author: Peng Fan Date: Thu Feb 25 11:10:04 2021 +0800 mmc: sdhci-esdhc-imx: validate pinctrl before use it When imx_data->pinctrl is not a valid pointer, pinctrl_lookup_state will trigger kernel panic. When we boot Dual OS on Jailhouse hypervisor, we let the 1st Linux to configure pinmux ready for the 2nd OS, so the 2nd OS not have pinctrl settings. Similar to this commit b62eee9f804e ("mmc: sdhci-esdhc-imx: no fail when no pinctrl available"). Reviewed-by: Bough Chen Reviewed-by: Alice Guo Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1614222604-27066-6-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson commit d1840f28e12752fc40c087e0a7e168492f021f8f Author: Peng Fan Date: Thu Feb 25 11:10:03 2021 +0800 dt-bindings: mmc: fsl-imx-esdhc: add clock bindings Add clock bindings for fsl-imx-esdhc yaml Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1614222604-27066-5-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson commit f2bdda2ac5ad2d0a025bc2c82c3c0cdc7c1d60fe Author: Peng Fan Date: Thu Feb 25 11:10:00 2021 +0800 dt-bindings: mmc: fsl-imx-esdhc: add pinctrl bindings Add pinctrl bindings for fsl-imx-esdhc yaml Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1614222604-27066-2-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Ulf Hansson commit 0d856c4c68c639f96cb12c26aaeb906353b9a76e Author: Wolfram Sang Date: Tue Feb 23 11:08:29 2021 +0100 mmc: tmio: support custom irq masks SDHI Gen2+ has a different value for TMIO_MASK_ALL, so add a member to support that. If the member is not used, the previous default value is applied. Signed-off-by: Wolfram Sang Reviewed-by: Yoshihiro Shimoda Tested-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210223100830.25125-2-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit 917a5336f2c27928be270226ab374ed0cbf3805d Author: Seunghui Lee Date: Mon Feb 22 17:31:56 2021 +0900 mmc: core: Set read only for SD cards with permanent write protect bit Some of SD cards sets permanent write protection bit in their CSD register, due to lifespan or internal problem. To avoid unnecessary I/O write operations, let's parse the bits in the CSD during initialization and mark the card as read only for this case. Signed-off-by: Seunghui Lee Link: https://lore.kernel.org/r/20210222083156.19158-1-sh043.lee@samsung.com Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit e29c84857e2d51aa017ce04284b962742fb97d9e Author: Christophe JAILLET Date: Sat Feb 20 15:29:53 2021 +0100 mmc: uniphier-sd: Fix a resource leak in the remove function A 'tmio_mmc_host_free()' call is missing in the remove function, in order to balance a 'tmio_mmc_host_alloc()' call in the probe. This is done in the error handling path of the probe, but not in the remove function. Add the missing call. Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver") Signed-off-by: Christophe JAILLET Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210220142953.918608-1-christophe.jaillet@wanadoo.fr Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit b03aec1c1f337dfdae44cdb0645ecac34208ae0a Author: Christophe JAILLET Date: Sat Feb 20 15:29:35 2021 +0100 mmc: uniphier-sd: Fix an error handling path in uniphier_sd_probe() A 'uniphier_sd_clk_enable()' call should be balanced by a corresponding 'uniphier_sd_clk_disable()' call. This is done in the remove function, but not in the error handling path of the probe. Add the missing call. Fixes: 3fd784f745dd ("mmc: uniphier-sd: add UniPhier SD/eMMC controller driver") Signed-off-by: Christophe JAILLET Reviewed-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210220142935.918554-1-christophe.jaillet@wanadoo.fr Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit c29b84d6d5577edea7c6a6e6052eb048f963963c Author: Wolfram Sang Date: Thu Feb 18 12:02:24 2021 +0100 mmc: tmio: remove workaround for NON_REMOVABLE RPM handling has been improved twice since this comment, and also SCC handling has been improved a lot. All the testing we did (Geert's and Niklas' and Wolfram's board farms) with the workaround removed did not lead to problems, so it is time to get rid of it to the best of our knowledge. Signed-off-by: Wolfram Sang Tested-by: Geert Uytterhoeven Tested-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210218110224.6910-1-wsa+renesas@sang-engineering.com Signed-off-by: Ulf Hansson commit b53f0bee7e7ef83ab9496e267a639c2d954c9548 Author: Yue Hu Date: Mon Feb 15 09:51:16 2021 +0800 mmc: core: Reduce code duplication to mmc_spi_send_{csd|cid} mmc_spi_send_{csd|cid} have similar function body. Let's remove the duplicated part to simplify the code, just add opcode to distinguish them in changed mmc_spi_send_cxd(). Signed-off-by: Yue Hu Link: https://lore.kernel.org/r/20210215015116.1355-1-zbestahu@gmail.com Signed-off-by: Ulf Hansson commit 6bfe4f749e098b441eec19c0a789415a7cf35065 Author: Ulf Hansson Date: Wed Feb 3 19:42:29 2021 +0100 mmc: dw_mmc: Drop redundant call to ->card_event callback The ->card_event callback isn't being used by any of the dw_mmc variants. It's likely a leftover from an earlier change, hence let's just drop the redundant call to it. Signed-off-by: Ulf Hansson Reviewed-by: Jaehoon Chung commit e9ce2ce17da626d930812199568bd426b2832f57 Author: Ulf Hansson Date: Fri Feb 12 14:16:10 2021 +0100 mmc: core: Drop reference counting of the bus_ops When the mmc_rescan work is enabled for execution (host->rescan_disable), it's the only instance per mmc host that is allowed to set/clear the host->bus_ops pointer. Besides the mmc_rescan work, there are a couple of scenarios when the host->bus_ops pointer may be accessed. Typically, those can be described as as below: *) Upper mmc driver layers (like the mmc block device driver or an SDIO functional driver) needs to execute a host->bus_ops callback. This can be considered as safe without having to use some special locking mechanism, because they operate on top of the struct mmc_card. As long as there is a card to operate upon, the mmc core guarantees that there is a host->bus_ops assigned as well. Note that, upper layer mmc drivers are of course responsible to clean up from themselves from their ->remove() callbacks, otherwise things would fall apart anyways. **) Via the mmc host instance, we may need to force a removal of an inserted mmc card. This happens when a mmc host driver gets unbind, for example. In this case, we protect the host->bus_ops pointer from concurrent accesses, by disabling the mmc_rescan work upfront (host->rescan_disable). See mmc_stop_host() for example. This said, it seems like the reference counting of the host->bus_ops pointer at some point have become superfluous. As this is an old mechanism of the mmc core, it a bit difficult to digest the history of when that could have happened. However, let's drop the reference counting to avoid unnecessary code-paths and lockings. Cc: Pierre Ossman Cc: Russell King Signed-off-by: Ulf Hansson Reviewed-by: Adrian Hunter Link: https://lore.kernel.org/r/20210212131610.236843-1-ulf.hansson@linaro.org commit fefdd3c91e0a7b3cbb3f25925d93a57c45cb0f31 Author: Ulf Hansson Date: Fri Feb 12 14:15:32 2021 +0100 mmc: core: Drop superfluous validations in mmc_hw|sw_reset() The mmc_hw|sw_reset() APIs are designed to be called solely from upper layers, which means drivers that operates on top of the struct mmc_card, like the mmc block device driver and an SDIO functional driver. Additionally, as long as the struct mmc_host has a valid pointer to a struct mmc_card, the corresponding host->bus_ops pointer stays valid and assigned. For these reasons, let's drop the superfluous reference counting and the redundant validations in mmc_hw|sw_reset(). Signed-off-by: Ulf Hansson Reviewed-by: Adrian Hunter Link: https://lore.kernel.org/r/20210212131532.236775-1-ulf.hansson@linaro.org commit 147186f531ae49c18b7a9091a2c40e83b3d95649 Author: DooHyun Hwang Date: Wed Feb 10 13:59:36 2021 +0900 mmc: core: Do a power cycle when the CMD11 fails A CMD11 is sent to the SD/SDIO card to start the voltage switch procedure into 1.8V I/O. According to the SD spec a power cycle is needed of the card, if it turns out that the CMD11 fails. Let's fix this, to allow a retry of the initialization without the voltage switch, to succeed. Note that, whether it makes sense to also retry with the voltage switch after the power cycle is a bit more difficult to know. At this point, we treat it like the CMD11 isn't supported and therefore we skip it when retrying. Signed-off-by: DooHyun Hwang Link: https://lore.kernel.org/r/20210210045936.7809-1-dh0421.hwang@samsung.com Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson commit fa99edd84feacc3c5609fbc51744c37d33a2c65a Author: Linus Walleij Date: Tue Mar 23 10:32:59 2021 +0100 ARM: dts: ux500: Add Cypress CTTYSP touch to TVK UIB The TVK1281618 R3 UIB has a Cypress CTTYSP touchscreen. Add it to the device tree file. Signed-off-by: Linus Walleij commit f9bf6cb2464b8fc43c5673ba8015125e8e3a4d8c Author: Linus Walleij Date: Mon Mar 29 23:57:51 2021 +0200 ARM: dts: ux500: Bump AUX1 voltage The voltage default on the AB8500 VAUX1 regulator is way too low and does not correspond to the setting in the vendor tree. This should be 2.8-3.3 V not 2.5-2.9 V or things like the HREFP520 touchscreen will not work. Signed-off-by: Linus Walleij commit 68f638a432dff4ed3e053cde2bd23ed36b4c057c Author: He Ying Date: Tue Mar 30 04:58:17 2021 -0400 docs: arm64: Fix a grammar error depending -> depending on Reported-by: Hulk Robot Signed-off-by: He Ying Link: https://lore.kernel.org/r/20210330085817.86185-1-heying24@huawei.com Signed-off-by: Catalin Marinas commit 132f2d45fb2302a582aef617ea766f3fa52a084c Author: Dario Binacchi Date: Tue Mar 2 22:54:35 2021 +0100 can: c_can: add support to 64 message objects D_CAN controller supports 16, 32, 64 or 128 message objects, comparing to 32 on C_CAN. AM335x/AM437x Sitara processors and DRA7 SOC all instantiate a D_CAN controller with 64 message objects, as described in the "DCAN features" subsection of the CAN chapter of their technical reference manuals. The driver policy has been kept unchanged, and as in the previous version, the first half of the message objects is used for reception and the second for transmission. The I/O load is increased only in the case of 64 message objects, keeping it unchanged in the case of 32. Two 32-bit read accesses are in fact required, which however remained at 16-bit for configurations with 32 message objects. Link: https://lore.kernel.org/r/20210302215435.18286-7-dariobin@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde commit 13831ce69c775fb8186275fdeb91fa6daff2196c Author: Dario Binacchi Date: Tue Mar 2 22:54:34 2021 +0100 can: c_can: prepare to up the message objects number As pointed by commit c0a9f4d396c9 ("can: c_can: Reduce register access") the "driver casts the 16 message objects in stone, which is completely braindead as contemporary hardware has up to 128 message objects". The patch prepares the module to extend the number of message objects beyond the 32 currently managed. This was achieved by transforming the constants used to manage RX/TX messages into variables without changing the driver policy. Reported-by: kernel test robot Link: https://lore.kernel.org/r/20210302215435.18286-6-dariobin@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde commit fcbded019855136a3d99d74ef8b44e8f87120fb2 Author: Dario Binacchi Date: Tue Mar 2 22:54:33 2021 +0100 can: c_can: use 32-bit write to set arbitration register The arbitration register is already set up with 32-bit writes in the other parts of the code except for this point. Link: https://lore.kernel.org/r/20210302215435.18286-5-dariobin@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde commit eddf67115040b9e875e8a153816df89f66b4c5b6 Author: Dario Binacchi Date: Tue Mar 2 22:54:32 2021 +0100 can: c_can: add a comment about IF_RX interface's use After reading the commit 640916db2bf7 ("can: c_can: Make it SMP safe") it may sound strange to see the IF_RX interface used by the can_inval_tx_object function. A comment was added to avoid any misunderstanding. Link: https://lore.kernel.org/r/20210302215435.18286-4-dariobin@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde commit c8a6b44388cb60a3851520902e286c202fc5c725 Author: Dario Binacchi Date: Tue Mar 2 22:54:31 2021 +0100 can: c_can: fix indentation Commit 524369e2391f ("can: c_can: remove obsolete STRICT_FRAME_ORDERING Kconfig option") left behind wrong indentation, fix it. Link: https://lore.kernel.org/r/20210302215435.18286-3-dariobin@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde commit f65735c203d5af0c32f0c89d6a431900fb8b83e2 Author: Dario Binacchi Date: Tue Mar 2 22:54:30 2021 +0100 can: c_can: remove unused code Commit 9d23a9818cb1 ("can: c_can: Remove unused inline function") left behind C_CAN_MSG_OBJ_TX_LAST constant. Commit fa39b54ccf28 ("can: c_can: Get rid of pointless interrupts") left behind C_CAN_MSG_RX_LOW_LAST and C_CAN_MSG_OBJ_RX_SPLIT constants. The removed code also made a comment useless and misleading. Link: https://lore.kernel.org/r/20210302215435.18286-2-dariobin@libero.it Signed-off-by: Dario Binacchi Signed-off-by: Marc Kleine-Budde commit dd477500c70b9e721bcf612bce1ddf5752a2de2b Author: Marc Kleine-Budde Date: Thu Mar 4 15:23:19 2021 +0100 can: c_can: fix remaining checkpatch warnings This patch fixes the remaining checkpatch warnings in the driver. Link: https://lore.kernel.org/r/20210304154240.2747987-7-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 995380f3fbfbce3d700293f375aae0a1ddad3266 Author: Marc Kleine-Budde Date: Thu Mar 4 15:21:36 2021 +0100 can: c_can: replace double assignments by two single ones This patch replaces the double assignments by two single ones, to make checkpatch happy. Link: https://lore.kernel.org/r/20210304154240.2747987-6-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 0c1b0138d641316bba1871e127fc1c7ef0e029e3 Author: Marc Kleine-Budde Date: Thu Mar 4 15:20:31 2021 +0100 can: c_can: fix print formating string This patch fixes the print format string in the driver, so that it stays in a single line. Link: https://lore.kernel.org/r/20210304154240.2747987-5-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 2de0ea97ade0d087699af329ecd212b2967bcf58 Author: Marc Kleine-Budde Date: Thu Mar 4 15:16:14 2021 +0100 can: c_can: fix indention This patch fixes the indention in the driver. Link: https://lore.kernel.org/r/20210304154240.2747987-4-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit beb7e88a2650ae7bb8ec6e4b73d2de816893d68e Author: Marc Kleine-Budde Date: Thu Mar 4 15:16:14 2021 +0100 can: c_can: remove unnecessary blank lines and add suggested ones This patch removes unnecessary blank lines and add suggested ones, so that checkpatch doesn't complain anymore. Link: https://lore.kernel.org/r/20210304154240.2747987-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 172f6d3a031b5ecb22e7dd8c4462f4eeabde3d63 Author: Marc Kleine-Budde Date: Thu Mar 4 15:16:14 2021 +0100 can: c_can: convert block comments to network style comments This patch converts all block comments to network subsystem style block comments. Link: https://lore.kernel.org/r/20210304154240.2747987-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 5f02a49c6605fbd85c00acd19a10e149bba5c162 Author: Marc Kleine-Budde Date: Tue Mar 2 15:58:18 2021 +0100 can: mcp251xfd: add HW timestamp to RX, TX and error CAN frames This patch uses the previously added mcp251xfd_skb_set_timestamp() function to convert the timestamp done by the CAN controller into a proper skb hw timestamp. Link: https://lore.kernel.org/r/20210304161209.2754463-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit efd8d98dfb900f96370cc7722ccb7959e58557c7 Author: Marc Kleine-Budde Date: Tue Mar 2 15:58:18 2021 +0100 can: mcp251xfd: add HW timestamp infrastructure This patch add the HW timestamping infrastructure. The mcp251xfd has a free running timer of 32 bit width, running at max 40MHz, which wraps around every 107 seconds. The current timestamp is latched into RX and TEF objects automatically be the CAN controller. This patch sets up a cyclecounter, timecounter and delayed worker infrastructure (which runs every 45 seconds) to convert the timer into a proper 64 bit based ns timestamp. Link: https://lore.kernel.org/r/20210304160328.2752293-6-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit dc09e7e37152d1d18511cd590980d3982a3a0daa Author: Marc Kleine-Budde Date: Wed Mar 3 11:43:41 2021 +0100 can: mcp251xfd: mcp251xfd_get_timestamp(): move to mcp251xfd.h This is a preparation patch, it moves the mcp251xfd_get_timestamp() function into the mcp251xfd.h file. Link: https://lore.kernel.org/r/20210304160328.2752293-5-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit ae2e9940112064ca21a807f543822a1eea2731d6 Author: Marc Kleine-Budde Date: Tue Mar 2 16:46:52 2021 +0100 can: mcp251xfd: move netdevice.h to mcp251xfd.h The netdevice.h header is needed in mcp251xfd.h, so that it can be included without further headers. Link: https://lore.kernel.org/r/20210304160328.2752293-4-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit eb94b74ccda607f3c0e441d793ff9f90fc3b09ea Author: Marc Kleine-Budde Date: Sun Feb 14 00:25:45 2021 +0100 can: mcp251xfd: simplify UINC handling In the patches: | 1f652bb6bae7 can: mcp25xxfd: rx-path: reduce number of SPI core requests to set UINC bit | 68c0c1c7f966 can: mcp251xfd: tef-path: reduce number of SPI core requests to set UINC bit the setting of the UINC bit in the TEF and RX FIFO was batched into a single SPI message consisting of several transfers. All transfers but the last need to have the cs_change set to 1. In the original patches the array of prepared transfers is send from the beginning with the length depending on the number of read TEF/RX objects. The cs_change of the last transfer is temporarily set to 0 during send. This patch removes the modification of cs_change by preparing the last transfer with cs_change to 0 and all other to 1. When sending the SPI message the driver now starts with an offset into the array, so that it always ends on the last entry in the array, which has the cs_change set to 0. Link: https://lore.kernel.org/r/20210304160328.2752293-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit e0ab3dd5f98fcca95a8290578833552e496fabaf Author: Marc Kleine-Budde Date: Wed Dec 23 16:50:25 2020 +0100 can: mcp251xfd: add dev coredump support For easier debugging this patch adds dev coredump support to the driver. A dev coredump is generated in case the chip fails to start or an error in the interrupt handler is detected. The dev coredump consists of all chip registers and chip memory, as well as the driver's internal state of the TEF-, RX- and TX-FIFOs, it can be analyzed with the mcp251xfd-dump tool of the can-utils: https://github.com/linux-can/can-utils/tree/master/mcp251xfd Link: https://lore.kernel.org/r/20210304160328.2752293-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 6c23fe67e8dc825ef2fd34d1dac12fc970140a8b Author: Wan Jiabing Date: Tue Mar 23 10:10:25 2021 +0800 can: tcan4x5x: remove duplicate include of regmap.h linux/regmap.h has been included at line 13, so remove the duplicate one at line 14. Fixes: 67def4ef8bb9 ("can: tcan4x5x: move regmap code into seperate file") Link: https://lore.kernel.org/r/20210323021026.140460-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Marc Kleine-Budde commit 1be37d3b0414e3db47f6fcba6c16286bbae0cb65 Author: Torin Cooper-Bennun Date: Mon Mar 8 10:24:28 2021 +0000 can: m_can: fix periph RX path: use rx-offload to ensure skbs are sent from softirq context For peripheral devices, m_can sent skbs directly from a threaded irq instead of from a softirq context, breaking the tcan4x5x peripheral driver completely. This patch transitions the driver to use the rx-offload helper for peripherals, ensuring the skbs are sent from the correct context, with h/w timestamping to ensure correct ordering. Link: https://lore.kernel.org/r/20210308102427.63916-4-torin@maxiluxsystems.com Signed-off-by: Torin Cooper-Bennun [mkl: m_can_class_register(): update error handling] Signed-off-by: Marc Kleine-Budde commit df06fd678260bca919ea894281ec54ce10e45ce6 Author: Torin Cooper-Bennun Date: Mon Mar 8 10:24:27 2021 +0000 can: m_can: m_can_chip_config(): enable and configure internal timestamps This is a prerequisite for transitioning the m_can driver to rx-offload, which works best with TX and RX timestamps. The timestamps provided by M_CAN are 16-bit, timed according to the nominal bit timing, and may be prescaled by a multiplier up to 16. We choose the highest prescalar so that the timestamp wraps every 2^20 bit times, or 209 ms at a bus speed of 5 Mbit/s. Timestamps will have a precision of 16 bit times. Link: https://lore.kernel.org/r/20210308102427.63916-3-torin@maxiluxsystems.com Signed-off-by: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde commit 17447f08202d7599a61bc218343b8e7da0a23fa6 Author: Torin Cooper-Bennun Date: Mon Mar 8 10:24:26 2021 +0000 can: m_can: add infrastructure for internal timestamps Add infrastucture to allow internal timestamps from the M_CAN to be configured and retrieved. Link: https://lore.kernel.org/r/20210308102427.63916-2-torin@maxiluxsystems.com Signed-off-by: Torin Cooper-Bennun Signed-off-by: Marc Kleine-Budde commit 8fa12201b6521a8752a2474229a81b0aa09c2b93 Author: Xulin Sun Date: Fri Feb 5 15:25:59 2021 +0800 can: m_can: m_can_class_allocate_dev(): remove impossible error return judgment If the CAN net device has been successfully allocated, its private data structure is impossible to be empty, remove this redundant error return judgment. Link: https://lore.kernel.org/r/20210205072559.13241-2-xulin.sun@windriver.com Signed-off-by: Xulin Sun Signed-off-by: Marc Kleine-Budde commit 58b29aa9d47128ec6ee8fd731b0f137a82f0b9ea Author: Stephane Grosjean Date: Tue Mar 9 09:21:28 2021 +0100 can: peak_usb: add support of ONE_SHOT mode This patch adds "ONE-SHOT" mode support to the following CAN-USB PEAK-System GmbH interfaces: - PCAN-USB X6 - PCAN-USB FD - PCAN-USB Pro FD - PCAN-Chip USB - PCAN-USB Pro Signed-off-by: Stephane Grosjean [mkl: split into two patches] Signed-off-by: Marc Kleine-Budde commit a7e8511ffda6a81ba6b49c22d0ed296caeff438c Author: Stephane Grosjean Date: Tue Mar 9 09:21:26 2021 +0100 can: peak_usb: add support of ethtool set_phys_id() This patch makes it possible to specifically flash the LED of a CAN port of the CAN-USB interfaces of PEAK-System. Link: https://lore.kernel.org/r/20210309122141.3276927-1-mkl@pengutronix.de Signed-off-by: Stephane Grosjean [mkl: use common prefix PCAN_ for defines] Signed-off-by: Marc Kleine-Budde commit cfe2a4ca1e0691c3e1f899e04e883c3d584e89fd Author: Stephane Grosjean Date: Tue Mar 9 09:21:28 2021 +0100 can: peak_usb: pcan_usb_pro_encode_msg(): use macros for flags instead of plain integers This patch replaces the plain integers used for flags in pcan_usb_pro_encode_msg() by macros which are already defined. Link: https://lore.kernel.org/r/20210309082128.23125-4-s.grosjean@peak-system.com Signed-off-by: Stephane Grosjean [mkl: split into two patches] Signed-off-by: Marc Kleine-Budde commit 27868a8fc1d0ba7abeac3e24b1a723c21c76581b Author: Arnd Bergmann Date: Thu Feb 4 17:26:13 2021 +0100 can: ucan: fix alignment constraints struct ucan_message_in contains member with 4-byte alignment but is itself marked as unaligned, which triggers a warning: drivers/net/can/usb/ucan.c:249:1: warning: alignment 1 of 'struct ucan_message_in' is less than 4 [-Wpacked-not-aligned] Mark the outer structure to have the same alignment as the inner one. Link: https://lore.kernel.org/r/20210204162625.3099392-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Marc Kleine-Budde commit a3497afbe9268cf64e431e9808916f1318d26b3d Author: Michal Simek Date: Thu Feb 4 13:42:48 2021 +0100 can: xilinx_can: Simplify code by using dev_err_probe() Use already prepared dev_err_probe() introduced by commit a787e5400a1c ("driver core: add device probe log helper"). It simplifies EPROBE_DEFER handling. Also unify message format for similar error cases. Link: https://lore.kernel.org/r/91af0945ed7397b08f1af0c829450620bd92b804.1612442564.git.michal.simek@xilinx.com Signed-off-by: Michal Simek Signed-off-by: Marc Kleine-Budde commit 51894cbae49e8c8dba01ee9f7f5030d1f81f4fa9 Author: Marc Kleine-Budde Date: Sat Feb 13 12:48:28 2021 +0100 can: grcan: add missing Kconfig dependency to HAS_IOMEM On ARCHs without IOMEM support the grcan driver fails to link due to missing iomem functionality. This patch adds the missing Kconfig dependency to HAS_IOMEM. Link: https://lore.kernel.org/r/20210309140424.3331010-1-mkl@pengutronix.de Reported-by: kernel test robot Signed-off-by: Marc Kleine-Budde commit 1d7750760b70ba8b0e641146eee1b3a343d1b292 Author: Vincent Mailhol Date: Sat Mar 6 14:40:40 2021 +0900 can: bittiming: add CAN_KBPS, CAN_MBPS and CAN_MHZ macros Add three macro to simplify the readability of big bit timing numbers: - CAN_KBPS: kilobits per second (one thousand) - CAN_MBPS: megabits per second (one million) - CAN_MHZ: megahertz per second (one million) Example: u32 bitrate_max = 8 * CAN_MBPS; struct can_clock clock = {.freq = 80 * CAN_MHZ}; instead of: u32 bitrate_max = 8000000; struct can_clock clock = {.freq = 80000000}; Apply the new macro to driver/net/can/dev/bittiming.c. Link: https://lore.kernel.org/r/20210306054040.76483-1-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit c25cc7993243fdc00ab7e608e3764819538015ab Author: Vincent Mailhol Date: Wed Feb 24 09:20:08 2021 +0900 can: bittiming: add calculation for CAN FD Transmitter Delay Compensation (TDC) The logic for the tdco calculation is to just reuse the normal sample point: tdco = sp. Because the sample point is expressed in tenth of percent and the tdco is expressed in time quanta, a conversion is needed. At the end, ssp = tdcv + tdco = tdcv + sp. Another popular method is to set tdco to the middle of the bit: tdc->tdco = can_bit_time(dbt) / 2 During benchmark tests, we could not find a clear advantages for one of the two methods. The tdco calculation is triggered each time the data_bittiming is changed so that users relying on automated calculation can use the netlink interface the exact same way without need of new parameters. For example, a command such as: ip link set canX type can bitrate 500000 dbitrate 4000000 fd on would trigger the calculation. The user using CONFIG_CAN_CALC_BITTIMING who does not want automated calculation needs to manually set tdco to zero. For example with: ip link set canX type can tdco 0 bitrate 500000 dbitrate 4000000 fd on (if the tdco parameter is provided in a previous command, it will be overwritten). If tdcv is set to zero (default), it is automatically calculated by the transiver for each frame. As such, there is no code in the kernel to calculate it. tdcf has no automated calculation functions because we could not figure out a formula for this parameter. Link: https://lore.kernel.org/r/20210224002008.4158-6-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit cfd98c838cbea6d084830d841f06ebaf0bea36de Author: Vincent Mailhol Date: Wed Feb 24 09:20:06 2021 +0900 can: netlink: move '=' operators back to previous line (checkpatch fix) Fix the warning triggered by having an '=' at the beginning of the line by moving it back to the previous line. Also replace all indentations with a single space so that future entries can be more easily added. Extract of ./scripts/checkpatch.pl -f drivers/net/can/dev/netlink.c: CHECK: Assignment operator '=' should be on the previous line + [IFLA_CAN_BITTIMING_CONST] + = { .len = sizeof(struct can_bittiming_const) }, CHECK: Assignment operator '=' should be on the previous line + [IFLA_CAN_DATA_BITTIMING] + = { .len = sizeof(struct can_bittiming) }, CHECK: Assignment operator '=' should be on the previous line + [IFLA_CAN_DATA_BITTIMING_CONST] + = { .len = sizeof(struct can_bittiming_const) }, Link: https://lore.kernel.org/r/20210224002008.4158-4-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 4c9258dd26fdb3bacb35e767fa55c9a03a78a08e Author: Vincent Mailhol Date: Wed Feb 24 09:20:05 2021 +0900 can: dev: reorder struct can_priv members for better packing Save eight bytes of holes on x86-64 architectures by reordering struct can_priv members. Before: $ pahole -C can_priv drivers/net/can/dev/dev.o struct can_priv { struct net_device * dev; /* 0 8 */ struct can_device_stats can_stats; /* 8 24 */ struct can_bittiming bittiming; /* 32 32 */ /* --- cacheline 1 boundary (64 bytes) --- */ struct can_bittiming data_bittiming; /* 64 32 */ const struct can_bittiming_const * bittiming_const; /* 96 8 */ const struct can_bittiming_const * data_bittiming_const; /* 104 8 */ struct can_tdc tdc; /* 112 12 */ /* XXX 4 bytes hole, try to pack */ /* --- cacheline 2 boundary (128 bytes) --- */ const struct can_tdc_const * tdc_const; /* 128 8 */ const u16 * termination_const; /* 136 8 */ unsigned int termination_const_cnt; /* 144 4 */ u16 termination; /* 148 2 */ /* XXX 2 bytes hole, try to pack */ const u32 * bitrate_const; /* 152 8 */ unsigned int bitrate_const_cnt; /* 160 4 */ /* XXX 4 bytes hole, try to pack */ const u32 * data_bitrate_const; /* 168 8 */ unsigned int data_bitrate_const_cnt; /* 176 4 */ u32 bitrate_max; /* 180 4 */ struct can_clock clock; /* 184 4 */ enum can_state state; /* 188 4 */ /* --- cacheline 3 boundary (192 bytes) --- */ u32 ctrlmode; /* 192 4 */ u32 ctrlmode_supported; /* 196 4 */ u32 ctrlmode_static; /* 200 4 */ int restart_ms; /* 204 4 */ struct delayed_work restart_work; /* 208 168 */ /* XXX last struct has 4 bytes of padding */ /* --- cacheline 5 boundary (320 bytes) was 56 bytes ago --- */ int (*do_set_bittiming)(struct net_device *); /* 376 8 */ /* --- cacheline 6 boundary (384 bytes) --- */ int (*do_set_data_bittiming)(struct net_device *); /* 384 8 */ int (*do_set_mode)(struct net_device *, enum can_mode); /* 392 8 */ int (*do_set_termination)(struct net_device *, u16); /* 400 8 */ int (*do_get_state)(const struct net_device *, enum can_state *); /* 408 8 */ int (*do_get_berr_counter)(const struct net_device *, struct can_berr_counter *); /* 416 8 */ unsigned int echo_skb_max; /* 424 4 */ /* XXX 4 bytes hole, try to pack */ struct sk_buff * * echo_skb; /* 432 8 */ /* size: 440, cachelines: 7, members: 31 */ /* sum members: 426, holes: 4, sum holes: 14 */ /* paddings: 1, sum paddings: 4 */ /* last cacheline: 56 bytes */ }; After: $ pahole -C can_priv drivers/net/can/dev/dev.o struct can_priv { struct net_device * dev; /* 0 8 */ struct can_device_stats can_stats; /* 8 24 */ const struct can_bittiming_const * bittiming_const; /* 32 8 */ const struct can_bittiming_const * data_bittiming_const; /* 40 8 */ struct can_bittiming bittiming; /* 48 32 */ /* --- cacheline 1 boundary (64 bytes) was 16 bytes ago --- */ struct can_bittiming data_bittiming; /* 80 32 */ const struct can_tdc_const * tdc_const; /* 112 8 */ struct can_tdc tdc; /* 120 12 */ /* --- cacheline 2 boundary (128 bytes) was 4 bytes ago --- */ unsigned int bitrate_const_cnt; /* 132 4 */ const u32 * bitrate_const; /* 136 8 */ const u32 * data_bitrate_const; /* 144 8 */ unsigned int data_bitrate_const_cnt; /* 152 4 */ u32 bitrate_max; /* 156 4 */ struct can_clock clock; /* 160 4 */ unsigned int termination_const_cnt; /* 164 4 */ const u16 * termination_const; /* 168 8 */ u16 termination; /* 176 2 */ /* XXX 2 bytes hole, try to pack */ enum can_state state; /* 180 4 */ u32 ctrlmode; /* 184 4 */ u32 ctrlmode_supported; /* 188 4 */ /* --- cacheline 3 boundary (192 bytes) --- */ u32 ctrlmode_static; /* 192 4 */ int restart_ms; /* 196 4 */ struct delayed_work restart_work; /* 200 168 */ /* XXX last struct has 4 bytes of padding */ /* --- cacheline 5 boundary (320 bytes) was 48 bytes ago --- */ int (*do_set_bittiming)(struct net_device *); /* 368 8 */ int (*do_set_data_bittiming)(struct net_device *); /* 376 8 */ /* --- cacheline 6 boundary (384 bytes) --- */ int (*do_set_mode)(struct net_device *, enum can_mode); /* 384 8 */ int (*do_set_termination)(struct net_device *, u16); /* 392 8 */ int (*do_get_state)(const struct net_device *, enum can_state *); /* 400 8 */ int (*do_get_berr_counter)(const struct net_device *, struct can_berr_counter *); /* 408 8 */ unsigned int echo_skb_max; /* 416 4 */ /* XXX 4 bytes hole, try to pack */ struct sk_buff * * echo_skb; /* 424 8 */ /* size: 432, cachelines: 7, members: 31 */ /* sum members: 426, holes: 2, sum holes: 6 */ /* paddings: 1, sum paddings: 4 */ /* last cacheline: 48 bytes */ }; Link: https://lore.kernel.org/r/20210224002008.4158-3-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit 289ea9e4ae595545e736a63ccaadba65f880e9a4 Author: Vincent Mailhol Date: Wed Feb 24 09:20:04 2021 +0900 can: add new CAN FD bittiming parameters: Transmitter Delay Compensation (TDC) At high bit rates, the propagation delay from the TX pin to the RX pin of the transceiver causes measurement errors: the sample point on the RX pin might occur on the previous bit. This issue is addressed in ISO 11898-1 section 11.3.3 "Transmitter delay compensation" (TDC). This patch adds two new structures: can_tdc and can_tdc_const in order to implement this TDC. The structures are then added to can_priv. A controller supports TDC if an only if can_priv::tdc_const is not NULL. TDC is active if and only if: - fd flag is on - can_priv::tdc.tdco is not zero. It is the driver responsibility to check those two conditions are met. No new controller modes are introduced (i.e. no CAN_CTRL_MODE_TDC) in order not to be redundant with above logic. The names of the parameters are chosen to match existing CAN controllers specification. References: - Bosch C_CAN FD8: https://www.bosch-semiconductors.com/media/ip_modules/pdf_2/c_can_fd8/users_manual_c_can_fd8_r210_1.pdf - Microchip CAN FD Controller Module: http://ww1.microchip.com/downloads/en/DeviceDoc/MCP251XXFD-CAN-FD-Controller-Module-Family-Reference-Manual-20005678B.pdf - SAM E701/S70/V70/V71 Family: https://www.mouser.com/datasheet/2/268/60001527A-1284321.pdf Link: https://lore.kernel.org/r/20210224002008.4158-2-mailhol.vincent@wanadoo.fr Signed-off-by: Vincent Mailhol Signed-off-by: Marc Kleine-Budde commit f318482a1c57315d0efccd2861f153f55c2117c6 Author: Marc Kleine-Budde Date: Fri Mar 19 15:21:32 2021 +0100 can: dev: can_free_echo_skb(): extend to return can frame length In order to implement byte queue limits (bql) in CAN drivers, the length of the CAN frame needs to be passed into the networking stack even if the transmission failed for some reason. To avoid to calculate this length twice, extend can_free_echo_skb() to return that value. Convert all users of this function, too. This patch is the natural extension of commit: | 9420e1d495e2 ("can: dev: can_get_echo_skb(): extend to return can | frame length") Link: https://lore.kernel.org/r/20210319142700.305648-3-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 4168d079aa41498639b2c64b4583375bcdf360d9 Author: Marc Kleine-Budde Date: Fri Mar 19 15:08:13 2021 +0100 can: dev: can_free_echo_skb(): don't crash the kernel if can_priv::echo_skb is accessed out of bounds A out of bounds access to "struct can_priv::echo_skb" leads to a kernel crash. Better print a sensible warning message instead and try to recover. This patch is similar to: | e7a6994d043a ("can: dev: __can_get_echo_skb(): Don't crash the kernel | if can_priv::echo_skb is accessed out of bounds") Link: https://lore.kernel.org/r/20210319142700.305648-2-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 440147639ac79f699a4eb9811d0bc39d3cc815f4 Author: CK Hu Date: Wed Mar 17 19:17:10 2021 +0100 soc: mediatek: mmsys: Use an array for setting the routing registers Actually, setting the registers for routing, use multiple 'if-else' for different routes, but this code would be more and more complicated while we support more and more SoCs. Change that and use a table per SoC so the code will be more portable and clear. Signed-off-by: CK Hu Signed-off-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210317181711.795245-3-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit ce15e7faa2fc5494abe72e1ce6f7698a7834e986 Author: CK Hu Date: Wed Mar 17 19:17:09 2021 +0100 soc: mediatek: mmsys: Create struct mtk_mmsys to store context data Apart from the driver data, in order to extend the driver to support more and more SoCs, we will need to store other configuration data. So, create a mtk_mmsys struct to encapsulate all that information. Signed-off-by: CK Hu Signed-off-by: Enric Balletbo i Serra Reviewed-by: Chun-Kuang Hu Link: https://lore.kernel.org/r/20210317181711.795245-2-enric.balletbo@collabora.com Signed-off-by: Matthias Brugger commit 58ef9356260c291a4321e07ff507f31a1d8212af Author: Pierre-Louis Bossart Date: Tue Mar 23 09:37:07 2021 +0800 soundwire: cadence: only prepare attached devices on clock stop We sometimes see COMMAND_IGNORED responses during the clock stop sequence. It turns out we already have information if devices are present on a link, so we should only prepare those when they are attached. In addition, even when COMMAND_IGNORED are received, we should still proceed with the clock stop. The device will not be prepared but that's not a problem. The only case where the clock stop will fail is if the Cadence IP reports an error (including a timeout), or if the devices throw a COMMAND_FAILED response. BugLink: https://github.com/thesofproject/linux/issues/2621 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/20210323013707.21455-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 8f29bb83586ea993e98b258e1fdb657367dd3c25 Author: Pierre-Louis Bossart Date: Tue Mar 23 13:07:01 2021 +0800 soundwire: generic_allocation: fix confusion between group and packing The existing code makes no sense, we multiply a channel number by zero (SDW_BLK_GRP_CNT_1), and the result is used to configure the block packing mode. Sampling grouping and channel packing are two separate concepts in SoundWire. In addition, the bandwidth allocation allocates a vertical slice for each stream, which makes the use of the PER_CHANNEL packing mode irrelevant. Let's use the proper definition for block packing mode (PER_PORT). This change has no functional impact though since the net result is the same configuration of the DPN_BlockCtrl3 register, when implemented. Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210323050701.23760-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 886ce97a36a05e7a9c9d5d894e72d31f50146f5d Author: Pierre-Louis Bossart Date: Tue Mar 23 13:07:00 2021 +0800 soundwire: add definition for DPn BlockPackingMode For some reason we don't have an enum for this concept. Add definitions following Table 102 of the SoundWire 1.2 specification. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210323050701.23760-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit c650b8dc7a7910eb25af0aac1720f778b29e679d Author: Jerome Forissier Date: Mon Mar 22 11:40:37 2021 +0100 tee: optee: do not check memref size on return from Secure World When Secure World returns, it may have changed the size attribute of the memory references passed as [in/out] parameters. The GlobalPlatform TEE Internal Core API specification does not restrict the values that this size can take. In particular, Secure World may increase the value to be larger than the size of the input buffer to indicate that it needs more. Therefore, the size check in optee_from_msg_param() is incorrect and needs to be removed. This fixes a number of failed test cases in the GlobalPlatform TEE Initial Configuratiom Test Suite v2_0_0_0-2017_06_09 when OP-TEE is compiled without dynamic shared memory support (CFG_CORE_DYN_SHM=n). Reviewed-by: Sumit Garg Suggested-by: Jens Wiklander Signed-off-by: Jerome Forissier Signed-off-by: Jens Wiklander commit f2674c0c748811e21b2c15b62951b2e21812ed01 Author: Ryan Wu Date: Mon Feb 1 11:59:45 2021 +0800 dt-bindings: nvmem: mediatek: add support for MediaTek mt8192 SoC This updates dt-binding documentation for MediaTek mt8192 Signed-off-by: Ryan Wu Acked-by: Rob Herring Link: https://lore.kernel.org/r/1612151986-19820-2-git-send-email-Yz.Wu@mediatek.com Signed-off-by: Matthias Brugger commit 45b78dd39f04f6198f8e2e9fe9d155a5e8326aab Author: Stefan Riedmueller Date: Mon Mar 29 15:01:02 2021 +0200 ARM: dts: imx6: pbab01: Set USB OTG port to peripheral Due to a hardware bug preventing the correct detection if the ID pin the USB OTG port cannot be used in otg mode. It can either be set to host or peripheral. Set it to peripheral so vbus is disabled by default. Signed-off-by: Stefan Riedmueller Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit a255af65df6de5fc28e79a488d385cbbffb904bf Author: Stefan Riedmueller Date: Mon Mar 29 15:01:01 2021 +0200 ARM: dts: imx6: pfla02: Fix USB vbus enable pinmuxing The pinmuxing for the enable pin of the usbh1 node is wrong. It needs to be muxed as GPIO. While at it, move the pinctrl to the vbus regulator since it is actually the regulator enable pin. Signed-off-by: Stefan Riedmueller Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit f2fb4fe62390b293bc6edc04cc7002940c441359 Author: Geert Uytterhoeven Date: Fri Mar 26 11:54:34 2021 +0100 clk: renesas: Zero init clk_init_data As clk_core_populate_parent_map() checks clk_init_data.num_parents first, and checks clk_init_data.parent_names[] before clk_init_data.parent_data[] and clk_init_data.parent_hws[], leaving the latter uninitialized doesn't do harm for now. However, it is better to play it safe, and initialize all clk_init_data structures to zeroes, to avoid any current and future members containing uninitialized data. Remove a few explicit zero initializers, which are now superfluous. Signed-off-by: Geert Uytterhoeven Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210326105434.1574796-1-geert+renesas@glider.be commit 66ff89946e6a71e48acaecfd5190038922b8e96a Author: kernel test robot Date: Thu Mar 25 23:49:56 2021 +0800 HID: fix memdup.cocci warnings drivers/hid/hid-thrustmaster.c:300:27-34: WARNING opportunity for kmemdup Use kmemdup rather than duplicating its implementation Generated by: scripts/coccinelle/api/memdup.cocci Fixes: c49c33637802 ("HID: support for initialization of some Thrustmaster wheels") CC: Dario Pagani Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Jiri Kosina commit 8df1947c71ee53c7e21c96c83796dd8cf06ae77c Author: Miroslav Benes Date: Mon Mar 29 15:28:15 2021 +0200 livepatch: Replace the fake signal sending with TIF_NOTIFY_SIGNAL infrastructure Livepatch sends a fake signal to all remaining blocking tasks of a running transition after a set period of time. It uses TIF_SIGPENDING flag for the purpose. Commit 12db8b690010 ("entry: Add support for TIF_NOTIFY_SIGNAL") added a generic infrastructure to achieve the same. Replace our bespoke solution with the generic one. Reviewed-by: Jens Axboe Reviewed-by: Petr Mladek Acked-by: Joe Lawrence Signed-off-by: Miroslav Benes Signed-off-by: Jiri Kosina commit 7ccdcaace80810175bd20b2ece856b42edd43991 Author: Jisheng Zhang Date: Thu Mar 25 12:06:01 2021 +0800 tee: optee: fix build error caused by recent optee tracepoints feature If build kernel without "O=dir", below error will be seen: In file included from drivers/tee/optee/optee_trace.h:67, from drivers/tee/optee/call.c:18: ./include/trace/define_trace.h:95:42: fatal error: ./optee_trace.h: No such file or directory 95 | #include TRACE_INCLUDE(TRACE_INCLUDE_FILE) | ^ compilation terminated. Fix it by adding below line to Makefile: CFLAGS_call.o := -I$(src) Tested with and without "O=dir", both can build successfully. Fixes: 0101947dbcc3 ("tee: optee: add invoke_fn tracepoints") Tested-by: Heiko Thiery Tested-by: Guenter Roeck Reported-by: Guenter Roeck Suggested-by: Steven Rostedt Signed-off-by: Jisheng Zhang Signed-off-by: Jens Wiklander commit 7119d7864bc5a02e1ec31497a16666ffafcc2465 Author: Marc Kleine-Budde Date: Wed Feb 10 08:42:04 2021 +0100 can: dev: always create TX echo skb So far the creation of the TX echo skb was optional and can be controlled by the local sender of a CAN frame. It turns out that the TX echo CAN skb can be piggybacked to carry information in the driver from the TX- to the TX-complete handler. Several drivers already use the return value of can_get_echo_skb() (which is the length of the data field in the CAN frame) for their number of transferred bytes statistics. The statistics are not working if CAN echo skbs are disabled. Another use case is to calculate and set the CAN frame length on the wire, which is needed for BQL support in both the TX and TX-completion handler. For now in can_put_echo_skb(), which is called from the TX handler, the skb carrying the CAN frame is discarded if no TX echo is requested, leading to the above illustrated problems. This patch changes the can_put_echo_skb() function, so that the echo skb is always generated. If the sender requests no echo, the echo skb is consumed in __can_get_echo_skb() without being passed into the RX handler of the networking stack, but the CAN data length and CAN frame length information is properly returned. Link: https://lore.kernel.org/r/20210309211904.3348700-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit ba23dc6dcab5da1d421a8811f7ed0bc40a4efabb Author: Pankaj Sharma Date: Thu Mar 18 16:56:34 2021 +0530 MAINTAINERS: Update MCAN MMIO device driver maintainer Update Chandrasekar Ramakrishnan as maintainer for mcan mmio device driver as I will be moving to a different role. Signed-off-by: Pankaj Sharma Signed-off-by: Marc Kleine-Budde commit 8560b0e7633b97be53a7209fb1ca3efeaae7aa88 Author: Marc Kleine-Budde Date: Sun Feb 28 09:38:35 2021 +0100 MAINTAINERS: remove Dan Murphy from m_can and tcan4x5x Dan Murphy's email address at ti.com doesn't work anymore, mails bounce with: | 550 Invalid recipient (#5.1.1) For now remove all CAN related entries of Dan from the Maintainers file. Link: https://lore.kernel.org/r/20210228094218.40015-1-mkl@pengutronix.de Signed-off-by: Marc Kleine-Budde commit 35a927f2848bd79586c6374ebb99e4207f3b0c7f Author: Maximilian Luz Date: Wed Mar 10 23:53:29 2021 +0100 HID: surface-hid: Add support for legacy keyboard interface Add support for the legacy keyboard (KBD/TC=0x08) HID transport layer of the Surface System Aggregator Module (SSAM) to the Surface HID driver. On Surface Laptops 1 and 2, this interface is used to connect the integrated keyboard. Note that this subsystem interface essentially provides a limited HID transport layer. In contrast to the generic HID interface (TC=0x15) used on newer Surface models, this interface only allows (as far as we know) for a single device to be connected and is otherwise severely limited in terms of support for feature- and output-reports. Specifically, only caps-lock-LED output-reports and a single read-only feature-report are supported. Signed-off-by: Maximilian Luz Signed-off-by: Jiri Kosina commit b05ff1002a5c19f2fd511c6eada6f475ff701841 Author: Maximilian Luz Date: Wed Mar 10 23:53:28 2021 +0100 HID: Add support for Surface Aggregator Module HID transport Add a HID transport driver to support integrated HID devices on newer Microsoft Surface models (specifically 7th-generation, i.e. Surface Laptop 3, Surface Book 3, and later). On those models, the internal keyboard and touchpad (as well as some other HID devices with currently unknown function) are connected via the generic HID subsystem (TC=0x15) of the Surface System Aggregator Module (SSAM). This subsystem provides a generic HID transport layer, support for which is implemented by this driver. Co-developed-by: Blaž Hrastnik Signed-off-by: Blaž Hrastnik Signed-off-by: Maximilian Luz Signed-off-by: Jiri Kosina commit a6ad93e37e76ec43c9cee6a91dd783fb854c2ff1 Merge: 69aea9d284366 aebf0a11a8c1f Author: Jiri Kosina Date: Tue Mar 30 09:17:09 2021 +0200 Merge tag 'platform-drivers-x86-surface-aggregator-v5.13-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 into for-5.13/surface-system-aggregator-intergration Pull immutable integration branch from Hans de Goede to have a stable base for SSAM (Surface System Aggregator Module) HID transport subsystem merge. ===== Signed tag for the immutable platform-surface-aggregator-registry branch for merging into other sub-systems. Note this is based on v5.12-rc2. ===== commit f03690f4f6992225d05dbd1171212e5be5a370dd Author: Srinivas Kandagatla Date: Tue Mar 9 10:48:16 2021 +0000 soundwire: bus: Fix device found flag correctly found flag is used to indicate SoundWire devices that are both enumerated on the bus and available in the device list. However this flag is not reset correctly after one iteration, This could miss some of the devices that are enumerated on the bus but not in device list. So reset this correctly to fix this issue! Fixes: d52d7a1be02c ("soundwire: Add Slave status handling helpers") Signed-off-by: Srinivas Kandagatla Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210309104816.20350-1-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul commit b76f3fba016ce5f73cd3dbcfdf87e2ab48ec90d9 Author: Pierre-Louis Bossart Date: Mon Mar 1 11:47:14 2021 -0600 soundwire: cadence_master: fix kernel-doc v5.12-rc1 flags new warnings with make W=1, fix missing or broken function descriptors. drivers/soundwire/cadence_master.c:914: warning: expecting prototype for To update slave status in a work since we will need to handle(). Prototype was for cdns_update_slave_status_work() instead drivers/soundwire/cadence_master.c:976: warning: expecting prototype for sdw_cdns_enable_slave_interrupt(). Prototype was for cdns_enable_slave_interrupts() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210301174714.117172-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul commit 53e0a30438c49874082bc9906d41606f7dbb256a Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:22 2021 +0800 soundwire: stream: remove useless bus initializations There is no need to assign a pointer to NULL if it's only used in a loop and assigned within that loop. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-12-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 5920a29d1db50c9b8bae8514999fe6c69665a7d2 Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:21 2021 +0800 soundwire: stream: remove useless initialization Cppcheck complains about possible null pointer dereferences, but it's more like there are unnecessary initializations before walking through a list. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-11-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a5943e4fb14e36df980f1814e2bd5ed3e4de4e87 Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:20 2021 +0800 soundwire: qcom: check of_property_read status Cppcheck complains: drivers/soundwire/qcom.c:773:6: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] ret = of_property_read_u8_array(np, "qcom,ports-block-pack-mode", ^ The return value is checked for all other cases, not sure why it was missed here. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-10-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 3f9c59ef8f7682d2a0572053034648b16d72df7f Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:19 2021 +0800 soundwire: intel: remove useless readl Cppcheck complains: drivers/soundwire/intel.c:564:15: style: Variable 'link_control' is assigned a value that is never used. [unreadVariable] link_control = intel_readl(shim, SDW_SHIM_LCTL); This looks like a leftover from a previous version, remove. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-9-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6ae435bd8c57519ea956d9efafbfdb4546472a9f Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:18 2021 +0800 soundwire: generic_bandwidth_allocation: remove useless init Cppcheck complains about two possible null pointer dereferences, but it's more like there are unnecessary initializations before walking through a list. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-8-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 1429cc2655255fb593df4fa85cfb89d3a977e058 Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:17 2021 +0800 soundwire: bus: remove useless initialization Cppcheck complains about a possible null pointer dereference, but it's more like there is an unnecessary initialization before walking through a list. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Rander Wang Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit b500127e3835fb2663af050008c74f62432ddb90 Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:16 2021 +0800 soundwire: bus: uniquify dev_err() for SCP_INT access We have multiple cases where we read/write SCP_INT registers, but the same error message in all cases. Add a distinct error message for each case to help debug. Reported-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit af7254b4b19f3ff9650a1419f329eea1a811d306 Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:15 2021 +0800 soundwire: bus: demote clock stop prepare log to dev_dbg() There is no real reason to provide this information except for debug sessions, hence dev_dbg() is a better fit. Reported-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a5759f193fa3dbc7c256dd8675e41e6ca4f6abf6 Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:14 2021 +0800 soundwire: bus: use consistent tests for return values We use different styles to check the return values of IO related routines. The majority of the cases use 'if (ret < 0)', align the remaining cases for consistency. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 665cf215bc4cadfbf79c43b2aebe0fc818789aa2 Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:13 2021 +0800 soundwire: bus: test read status In the existing code we may read a negative error value but still mask it and write it back. Make sure all reads are tested and errors not propagated further. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Reviewed-by: Guennadi Liakhovetski Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 0196b52b83dd7e925879ac969f1dcd543b9ea774 Author: Pierre-Louis Bossart Date: Tue Mar 2 17:11:12 2021 +0800 soundwire: bus: use correct driver name in error messages None of the existing codec drivers set the sdw_driver.name, but instead set sdw_driver.driver.name. This leads to error messages such as [ 23.935355] rt700 sdw:2:25d:700:0: Probe of (null) failed: -19 We could remove this sdw_driver.name if it doesn't have any purpose. This patch only suggests using the proper indirection. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Reviewed-by: Kai Vehmanen Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20210302091122.13952-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 7d0bc44bd0ea163a251d4aa778d1b6fcf6174d22 Author: Carlos de Paula Date: Tue Mar 16 13:02:43 2021 -0300 kbuild: buildtar: add riscv support Make 'make tar-pkg' and 'tarbz2-pkg' work on riscv. Signed-off-by: Carlos de Paula Signed-off-by: Palmer Dabbelt commit 2da073c19641bb6820c3591d3d865120263f14e8 Author: Alexandre Ghiti Date: Sat Mar 13 03:45:05 2021 -0500 riscv: Cleanup KASAN_VMALLOC support When KASAN vmalloc region is populated, there is no userspace process and the page table in use is swapper_pg_dir, so there is no need to read SATP. Then we can use the same scheme used by kasan_populate_p*d functions to go through the page table, which harmonizes the code. In addition, make use of set_pgd that goes through all unused page table levels, contrary to p*d_populate functions, which makes this function work whatever the number of page table levels. Signed-off-by: Alexandre Ghiti Reviewed-by: Palmer Dabbelt Signed-off-by: Palmer Dabbelt commit f35bb4b8d10a8ce356f0fff634fa885926f8d439 Author: Anup Patel Date: Mon Mar 15 16:34:59 2021 +0530 RISC-V: Don't print SBI version for all detected extensions The sbi_init() already prints SBI version before detecting various SBI extensions so we don't need to print SBI version for all detected SBI extensions. Signed-off-by: Anup Patel Reviewed-by: Atish Patra Signed-off-by: Palmer Dabbelt commit 885b8cfb161ed3d8f41e7b37e14d35bd8d3aaf6b Author: Aya Levin Date: Wed Jan 13 09:54:22 2021 +0200 net/mlx5e: Update ethtool setting of CQE compression Remove restriction blocking configuration of CQE compression when PTP rx filter is set. Instead turn on indication for RX PTP, and try to reopen the channels. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 960fbfe222a490622cfb3949061b20f83ef46fb0 Author: Aya Levin Date: Wed Jan 20 16:59:27 2021 +0200 net/mlx5e: Allow coexistence of CQE compression and HW TS PTP Update setting HW time-stamp to allow coexistence with CQE compression. Turn on RX PTP indication and try to reopen the channels. On success, coexistence with CQE compression is enabled. Otherwise, fall-back to turning off CQE compression. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e5fe49465d463ca6c029869e42e9ba5e895cce02 Author: Aya Levin Date: Tue Feb 16 12:32:48 2021 +0200 net/mlx5e: Add PTP Flow Steering support When opening PTP channel with MLX5E_PTP_STATE_RX set, add the corresponding flow steering rules. Capture UDP packets with destination port 319 and L2 packets with ethertype 0x88F7 and steer them into the RQ of the PTP channel. Add API that manages the flow steering rules to be used in the following patches via safe_reopen_channels mechanism. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 0f575c20bf0686caf3d82d6c626c2e1e4a4c36e6 Author: Aya Levin Date: Sun Jan 17 08:58:04 2021 +0200 net/mlx5e: Introduce Flow Steering ANY API Add a new FS API which captures the ANY traffic from the traffic classifier into a dedicated FS table. The table consists of a group matching the ethertype and a must-be-last group which contains a default rule redirecting the unmatched packets back to the RSS logic. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 1c80bd6843881fbef7d198981ea0decc184954fd Author: Aya Levin Date: Thu Jan 14 17:26:35 2021 +0200 net/mlx5e: Introduce Flow Steering UDP API Add a new FS API which captures the UDP traffic from the traffic classifier into a dedicated FS table. This API handles both UDP over IPv4 and IPv6 in the same manner. The tables (one for UDPv4 and another for UDPv6) consist of a group matching the UDP destination port and a must-be-last group which contains a default rule redirecting the unmatched packets back to the RSS logic. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit c809cf665e28449ba7fec93089718bc8751a52cc Author: Aya Levin Date: Thu Jan 21 09:32:52 2021 +0200 net/mlx5e: Cleanup Flow Steering level Flow Steering levels are used to determine the order between the tables. As of today, each one of these tables follows the TTC table, and hijacks its traffic, and cannot be combined together for now. Putting them in the same layer better reflects the situation. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b8fb10939ff43be7599df3a264474c180ba7234c Author: Aya Levin Date: Tue Jan 12 18:50:03 2021 +0200 net/mlx5e: Add PTP RQ to RX reporter When present, add the PTP RQ to the RX reporter. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 19cfa36b18d8dc76d72f74b5209875e31641e219 Author: Aya Levin Date: Tue Jan 12 17:26:02 2021 +0200 net/mlx5e: Refactor RX reporter diagnostics Break RX diagnostics function into smaller helpers. This enables easier enhancement in the next patch in the set. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 3adb60b6a3ed9f233daa632d35cec79fe4781372 Author: Aya Levin Date: Thu Feb 25 19:55:20 2021 +0200 net:mlx5e: Add PTP-TIR and PTP-RQT Add PTP-TIR and initiate its RQT to allow PTP-RQ to integrate into the safe-reopen flow on configuration change. Add rx_ptp_support flag on a profile and turn it on for ETH driver. With this flag set, create a redirect-RQT for PTP-RQ. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a28359e922c681a23c01e4858175d9e98c5ff88a Author: Aya Levin Date: Sun Mar 7 15:55:04 2021 +0200 net/mlx5e: Add PTP-RX statistics Like PTP-TX, once the PTP-RX is opened, corresponding statistics appear. Add indication that PTP-RX was ever opened: rx_ptp_opened. If any of the PTP RX or TX were opened, display the PTP channel's statistics. Signed-off-by: Aya Levin Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a099da8ffcf6d4f6d41719bd41878ff529ab6b55 Author: Aya Levin Date: Sun Mar 7 15:47:37 2021 +0200 net/mlx5e: Add RQ to PTP channel Enhance PTP channel to allow PTP without disabling CQE compression. Add RQ, TIR and PTP_RX_STATE to PTP channel. When this bit is set, PTP channel manages its RQ, and PTP traffic is directed to the PTP-RQ which is not affected by compression. Signed-off-by: Aya Levin Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 24c22dd0918bd136b7bea0f3a521ccf355fb432b Author: Aya Levin Date: Mon Jan 11 16:45:21 2021 +0200 net/mlx5e: Add states to PTP channel Add PTP TX state to PTP channel, which indicates the corresponding SQ is available. Further patches in the set extend PTP channel to include RQ. The PTP channel state will be used for separation and coexistence of RX and TX PTP. Enhance conditions to verify the TX PTP state is set. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 8058dfa05ab765153f20020fc4ea3b296e391a00 Author: Lukas Bulwahn Date: Sat Mar 27 07:56:42 2021 +0100 soc: qcom: address kernel-doc warnings The command: find ./include/linux/soc/qcom/ | xargs ./scripts/kernel-doc -none reports: ./include/linux/soc/qcom/qmi.h:26: warning: cannot understand function prototype: 'struct qmi_header ' ./include/linux/soc/qcom/qmi.h:101: warning: cannot understand function prototype: 'struct qmi_response_type_v01 ' ./include/linux/soc/qcom/irq.h:19: warning: expecting prototype for QCOM specific IRQ domain flags that distinguishes the handling of wakeup(). Prototype was for IRQ_DOMAIN_FLAG_QCOM_PDC_WAKEUP() instead ./include/linux/soc/qcom/apr.h:126: warning: Function parameter or member '__apr_driver' not described in 'module_apr_driver' ./include/linux/soc/qcom/apr.h:126: warning: Excess function parameter '__aprbus_driver' description in 'module_apr_driver' ./include/linux/soc/qcom/llcc-qcom.h:43: warning: cannot understand function prototype: 'struct llcc_slice_desc ' ./include/linux/soc/qcom/llcc-qcom.h:60: warning: cannot understand function prototype: 'struct llcc_edac_reg_data ' ./include/linux/soc/qcom/llcc-qcom.h:86: warning: cannot understand function prototype: 'struct llcc_drv_data ' Address all those warnings by: - prefixing kernel-doc descriptions for structs with the keyword 'struct', - turning a kernel-doc comment that does not follow the kernel-doc syntax into a normal comment, and - correcting a parameter name in a kernel-doc comment. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20210327065642.11969-3-lukas.bulwahn@gmail.com Signed-off-by: Bjorn Andersson commit 99d52c872d34b9d75fccab1782474cde45426708 Author: Lukas Bulwahn Date: Sat Mar 27 07:56:41 2021 +0100 MAINTAINERS: add another entry for ARM/QUALCOMM SUPPORT The files in ./include/linux/soc/qcom/ are headers to the corresponding files in ./drivers/soc/qcom/, which are assigned to ARM/QUALCOMM SUPPORT. Possibly, the file pattern include/linux/*/qcom* intended to match this directory and its containing files, but unfortunately, it does not. Hence, add a file entry for this directory to ARM/QUALCOMM SUPPORT. Signed-off-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20210327065642.11969-2-lukas.bulwahn@gmail.com Signed-off-by: Bjorn Andersson commit 20f9d94e680fb976eb0d7ed253bf791ef3bfc4c9 Author: Robert Foss Date: Wed Mar 24 13:43:10 2021 +0100 arm64: dts: qcom: sm8350: Add thermal zones and throttling support sm8350 has 29 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: Robert Foss Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20210324124308.1265626-2-robert.foss@linaro.org Signed-off-by: Bjorn Andersson commit 81bee6953b581cf35f9a2cd7944dc220630df441 Author: Caleb Connolly Date: Sun Mar 21 17:46:26 2021 +0000 arm64: dts: qcom: sm8150: add i2c nodes Tested on the OnePlus 7 Pro (including DMA). Signed-off-by: Caleb Connolly Reviewed-by: Vinod Koul Reviewed-by: Bhupesh Sharma Link: https://lore.kernel.org/r/20210321174522.123036-3-caleb@connolly.tech Signed-off-by: Bjorn Andersson commit 9cf3ebd16eae7957d15e1c08944054fe9035ca8b Author: Caleb Connolly Date: Sun Mar 21 17:46:21 2021 +0000 arm64: dts: qcom: sm8150: add other QUP nodes and iommus Add the first and third qupv3 nodes used to hook up peripherals on some devices, as well as the iommus properties for all of them. Signed-off-by: Caleb Connolly Link: https://lore.kernel.org/r/20210321174522.123036-2-caleb@connolly.tech Signed-off-by: Bjorn Andersson commit e27f3c88e2500556b2f1f0ed134a2a4834f88ba3 Author: Shixin Liu Date: Sat Mar 27 15:31:57 2021 +0800 scsi: myrs: Make symbols DAC960_{GEM/BA/LP}_privdata static This symbol is not used outside of myrs.c, so we can mark it static. Link: https://lore.kernel.org/r/20210327073157.1786772-1-liushixin2@huawei.com Signed-off-by: Shixin Liu Signed-off-by: Martin K. Petersen commit 182ad87c95e7fded2134e5aae170b7074bd778c6 Author: Shixin Liu Date: Sat Mar 27 15:31:56 2021 +0800 scsi: myrb: Make symbols DAC960_{LA/PG/PD/P}_privdata static This symbol is not used outside of myrb.c, so we can mark it static. Link: https://lore.kernel.org/r/20210327073156.1786722-1-liushixin2@huawei.com Signed-off-by: Shixin Liu Signed-off-by: Martin K. Petersen commit ce0b6e38877258a5a8f2f583b53957d4a778da36 Author: ganjisheng Date: Fri Mar 26 11:04:12 2021 +0800 scsi: advansys: Fix spelling of 'is' s/isi/is/ Link: https://lore.kernel.org/r/20210326030412.1656-1-qiumibaozi_1@163.com Signed-off-by: ganjisheng Signed-off-by: Martin K. Petersen commit 92b4c52c43e1309368bc858a56b4e5d6db159d99 Author: Colin Ian King Date: Thu Mar 25 17:07:31 2021 +0000 scsi: a100u2w: Remove unused variable biosaddr The variable biosaddr is being assigned a value that is never read, the variable is redundant and can be safely removed. Link: https://lore.kernel.org/r/20210325170731.484651-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit 6bfe9855daa3e952faca691dbb2895c523c81b36 Author: Wan Jiabing Date: Thu Mar 25 14:46:31 2021 +0800 scsi: core: scsi_host_cmd_pool is declared twice struct scsi_host_cmd_pool has already been declared. Remove the duplicate. Link: https://lore.kernel.org/r/20210325064632.855002-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Martin K. Petersen commit 888771a9d04ff7bf96e5ecad37969002c88a95d7 Author: Jonathan Marek Date: Mon Mar 29 15:00:48 2021 +0300 arm64: dts: qcom: sm8250: fix display nodes Apply these fixes to the newly added sm8250 display ndoes - Remove "notused" interconnect (which apparently was blindly copied from my old patches) - Use dispcc node example from dt-bindings, removing clocks which aren't documented or used by the driver and fixing the region size. Fixes: 7c1dffd471b1 ("arm64: dts: qcom: sm8250.dtsi: add display system nodes") Signed-off-by: Jonathan Marek [DB: compatibility changes split into separate patch] Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210329120051.3401567-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit 8dc60252968178a132898ea2e1dc7a8e9a05e635 Author: Colin Ian King Date: Sat Mar 27 23:06:50 2021 +0000 scsi: qedi: Remove redundant assignment to variable err Variable err is assigned -ENOMEM followed by an error return path via label err_udev that does not access the variable and returns with the -ENOMEM error return code. The assignment to err is redundant and can be removed. Link: https://lore.kernel.org/r/20210327230650.25803-1-colin.king@canonical.com Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King Signed-off-by: Martin K. Petersen commit fe515ac827689d6f71d967c8e300a59cfeded42b Author: Wan Jiabing Date: Sat Mar 27 11:08:50 2021 +0800 scsi: core: Remove duplicate declarations struct request and struct request_queue are declared twice. Remove the duplicate declarations. Link: https://lore.kernel.org/r/20210327030850.918018-1-wanjiabing@vivo.com Signed-off-by: Wan Jiabing Signed-off-by: Martin K. Petersen commit eee8910fe0b502740e5dbb167e130dae791d3d13 Author: dudengke Date: Fri Mar 26 14:09:02 2021 +0800 scsi: core: Fix comment typo s/remoed/removed/ Link: https://lore.kernel.org/r/20210326060902.1851811-1-pinganddu90@gmail.com Signed-off-by: dudengke Signed-off-by: Martin K. Petersen commit ac6ad7c2a862d682bb584a4bc904d89fa7721af8 Author: Pan Bian Date: Thu Jan 21 03:49:07 2021 -0800 bus: qcom: Put child node before return Put child node before return to fix potential reference count leak. Generally, the reference count of child is incremented and decremented automatically in the macro for_each_available_child_of_node() and should be decremented manually if the loop is broken in loop body. Reviewed-by: Linus Walleij Fixes: 335a12754808 ("bus: qcom: add EBI2 driver") Signed-off-by: Pan Bian Link: https://lore.kernel.org/r/20210121114907.109267-1-bianpan2016@163.com Signed-off-by: Bjorn Andersson commit d2478dd256915fd0a971a1daba23cb9cadde1132 Author: Lee Duncan Date: Tue Mar 23 10:27:56 2021 -0700 scsi: fnic: Remove bogus ratelimit messages Commit b43abcbbd5b1 ("scsi: fnic: Ratelimit printks to avoid flooding when vlan is not set by the switch.i") added printk_ratelimit() in front of a couple of debug-mode messages to reduce logging overrun when debugging the driver. The code: > if (printk_ratelimit()) > FNIC_FCS_DBG(KERN_DEBUG, fnic->lport->host, > "Start VLAN Discovery\n"); ends up calling printk_ratelimit() quite often, triggering many kernel messages about callbacks being supressed. The fix is to decompose FNIC_FCS_DBG(), then change the order of checks so that printk_ratelimit() is only called if driver debugging is enabled. Link: https://lore.kernel.org/r/20210323172756.5743-1-lduncan@suse.com Reviewed-by: Laurence Oberman Signed-off-by: Lee Duncan Signed-off-by: Martin K. Petersen commit 10d91a15f26e76aec9e6fed31df7e8065f40770f Author: Nilesh Javali Date: Mon Mar 29 01:52:29 2021 -0700 scsi: qla2xxx: Update version to 10.02.00.106-k Link: https://lore.kernel.org/r/20210329085229.4367-13-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 022a2d211ce0eb410a2f4d0d0903a5ddf7687b55 Author: Quinn Tran Date: Mon Mar 29 01:52:28 2021 -0700 scsi: qla2xxx: Do logout even if fabric scan retries got exhausted Perform logout of all remote ports so that all I/Os with driver are requeued with midlayer for retry. Link: https://lore.kernel.org/r/20210329085229.4367-12-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 1cbcc531d01f813e6a93cefdc7476f858ff2b301 Author: Quinn Tran Date: Mon Mar 29 01:52:27 2021 -0700 scsi: qla2xxx: Update default AER debug mask Use PCIe AER debug mask as default. Link: https://lore.kernel.org/r/20210329085229.4367-11-njavali@marvell.com Tested-by: Laurence Oberman Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit daafc8d33ff62009e52225106f1a6c20fe1b6ccd Author: Quinn Tran Date: Mon Mar 29 01:52:26 2021 -0700 scsi: qla2xxx: Fix mailbox recovery during PCIe error For the mailbox thread that encounters a PCIe error, pause that thread until PCIe link reset/recovery has completed to prevent the thread from possibly unmapping any type of DMA resource that might be in progress. Link: https://lore.kernel.org/r/20210329085229.4367-10-njavali@marvell.com Tested-by: Laurence Oberman Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit f7a0ed479e66ab177801301a1a72c37775c40450 Author: Quinn Tran Date: Mon Mar 29 01:52:25 2021 -0700 scsi: qla2xxx: Fix crash in PCIe error handling BUG: unable to handle kernel NULL pointer dereference at (null) IP: qla2x00_abort_isp+0x21/0x6b0 [qla2xxx] PGD 0 P4D 0 Oops: 0000 [#1] SMP PTI CPU: 0 PID: 1715 Comm: kworker/0:2 Tainted: GOE 4.12.14-122.37-default #1 SLE12-SP5 Hardware name: HPE Superdome Flex/Superdome Flex, BIOS Bundle:3.30.100 SFW:IP147.007.004.017.000.2009211957 09/21/2020 Workqueue: events aer_recover_work_func task: ffff9e399c14ca80 task.stack: ffffc1c58e4ac000 RIP: 0010:qla2x00_abort_isp+0x21/0x6b0 [qla2xxx] RSP: 0018:ffffc1c58e4afd50 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff9e419cdef480 RCX: 0000000000000000 RDX: ffff9e399c14ca80 RSI: 0000000000000246 RDI: ffff9e419bbc27b8 RBP: ffff9e419bbc27b8 R08: 0000000000000004 R09: 00000000a0440000 R10: 0000000000000000 R11: ffff9e399416d1a0 R12: ffff9e419cdef000 R13: ffff9e3a7cfae800 R14: ffff9e3a7cfae800 R15: 00000000000000c0 FS: 0000000000000000(0000) GS:ffff9e39a0000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 00000006cd00a005 CR4: 00000000007606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: qla2xxx_pci_slot_reset+0x141/0x160 [qla2xxx] report_slot_reset+0x41/0x80 ? merge_result.part.4+0x30/0x30 pci_walk_bus+0x70/0x90 pcie_do_recovery+0x1db/0x2e0 aer_recover_work_func+0xc2/0xf0 process_one_work+0x14c/0x390 Disable board_disable logic where driver resources are freed while OS is in the process of recovering the adapter. Link: https://lore.kernel.org/r/20210329085229.4367-9-njavali@marvell.com Tested-by: Laurence Oberman Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 610d027b1e6372ffe3e85e8e095a562e920fd5cd Author: Quinn Tran Date: Mon Mar 29 01:52:24 2021 -0700 scsi: qla2xxx: Fix RISC RESET completion polling After RISC RESET, the poll time for completion is too short. Fix the completion polling time. Link: https://lore.kernel.org/r/20210329085229.4367-8-njavali@marvell.com Tested-by: Laurence Oberman Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 6641df81ab799f28a5d564f860233dd26cca0d93 Author: Arun Easi Date: Mon Mar 29 01:52:23 2021 -0700 scsi: qla2xxx: Fix crash in qla2xxx_mqueuecommand() RIP: 0010:kmem_cache_free+0xfa/0x1b0 Call Trace: qla2xxx_mqueuecommand+0x2b5/0x2c0 [qla2xxx] scsi_queue_rq+0x5e2/0xa40 __blk_mq_try_issue_directly+0x128/0x1d0 blk_mq_request_issue_directly+0x4e/0xb0 Fix incorrect call to free srb in qla2xxx_mqueuecommand(), as srb is now allocated by upper layers. This fixes smatch warning of srb unintended free. Link: https://lore.kernel.org/r/20210329085229.4367-7-njavali@marvell.com Fixes: af2a0c51b120 ("scsi: qla2xxx: Fix SRB leak on switch command timeout") Cc: stable@vger.kernel.org # 5.5 Reported-by: Laurence Oberman Reported-by: Dan Carpenter Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 2ce35c0821afc2acd5ee1c3f60d149f8b2520ce8 Author: Quinn Tran Date: Mon Mar 29 01:52:22 2021 -0700 scsi: qla2xxx: Fix use after free in bsg On bsg command completion, bsg_job_done() was called while qla driver continued to access the bsg_job buffer. bsg_job_done() would free up resources that ended up being reused by other task while the driver continued to access the buffers. As a result, driver was reading garbage data. localhost kernel: BUG: KASAN: use-after-free in sg_next+0x64/0x80 localhost kernel: Read of size 8 at addr ffff8883228a3330 by task swapper/26/0 localhost kernel: localhost kernel: CPU: 26 PID: 0 Comm: swapper/26 Kdump: loaded Tainted: G OE --------- - - 4.18.0-193.el8.x86_64+debug #1 localhost kernel: Hardware name: HP ProLiant DL360 Gen9/ProLiant DL360 Gen9, BIOS P89 08/12/2016 localhost kernel: Call Trace: localhost kernel: localhost kernel: dump_stack+0x9a/0xf0 localhost kernel: print_address_description.cold.3+0x9/0x23b localhost kernel: kasan_report.cold.4+0x65/0x95 localhost kernel: debug_dma_unmap_sg.part.12+0x10d/0x2d0 localhost kernel: qla2x00_bsg_sp_free+0xaf6/0x1010 [qla2xxx] Link: https://lore.kernel.org/r/20210329085229.4367-6-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Quinn Tran Signed-off-by: Saurav Kashyap Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 5777fef788a59f5ac9ab6661988a95a045fc0574 Author: Quinn Tran Date: Mon Mar 29 01:52:21 2021 -0700 scsi: qla2xxx: Consolidate zio threshold setting for both FCP & NVMe Consolidate zio threshold setting for both FCP & NVMe to prevent one protocol from clobbering the setting of the other protocol. Link: https://lore.kernel.org/r/20210329085229.4367-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 c358a3d92b32be89ea1c44fe75721448c0a0fec1 Author: Quinn Tran Date: Mon Mar 29 01:52:20 2021 -0700 scsi: qla2xxx: Fix stuck session Session was stuck due to explicit logout to target timing out. The target was in an unresponsive state. This timeout induced an error to the GNL command from moving forward. Link: https://lore.kernel.org/r/20210329085229.4367-4-njavali@marvell.com Tested-by: Laurence Oberman Signed-off-by: Quinn Tran Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit a63f4c45414951ad4fbaeb5b744e37ffd137b689 Author: Arun Easi Date: Mon Mar 29 01:52:19 2021 -0700 scsi: qla2xxx: Add H:C:T info in the log message for fc ports The host:channel:scsi_target_id information is helpful in matching an FC port with a SCSI device, so add it. For initiator FC ports, a -1 would be displayed for "target" part. Link: https://lore.kernel.org/r/20210329085229.4367-3-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit bcafad6c2d520df42c86f28357d639deac15bad7 Author: Arun Easi Date: Mon Mar 29 01:52:18 2021 -0700 scsi: qla2xxx: Fix IOPS drop seen in some adapters Removing the response queue processing in the send path is showing IOPS drop. Add back the process_response_queue() call in the send path. Link: https://lore.kernel.org/r/20210329085229.4367-2-njavali@marvell.com Reviewed-by: Himanshu Madhani Signed-off-by: Arun Easi Signed-off-by: Nilesh Javali Signed-off-by: Martin K. Petersen commit 7aae231ac93b9d9c45487dcafd844fa756069f3b Author: Martin KaFai Lau Date: Mon Mar 29 15:13:57 2021 -0700 bpf: tcp: Limit calling some tcp cc functions to CONFIG_DYNAMIC_FTRACE pahole currently only generates the btf_id for external function and ftrace-able function. Some functions in the bpf_tcp_ca_kfunc_ids are static (e.g. cubictcp_init). Thus, unless CONFIG_DYNAMIC_FTRACE is set, btf_ids for those functions will not be generated and the compilation fails during resolve_btfids. This patch limits those functions to CONFIG_DYNAMIC_FTRACE. I will address the pahole generation in a followup and then remove the CONFIG_DYNAMIC_FTRACE limitation. Fixes: e78aea8b2170 ("bpf: tcp: Put some tcp cong functions in allowlist for bpf-tcp-cc") Reported-by: Cong Wang Reported-by: Lorenz Bauer Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329221357.834438-1-kafai@fb.com commit d0922bf7981799fd86e248de330fb4152399d6c2 Author: Haiyang Zhang Date: Mon Mar 29 16:21:35 2021 -0700 hv_netvsc: Add error handling while switching data path Add error handling in case of failure to send switching data path message to the host. Reported-by: Shachar Raindel Signed-off-by: Haiyang Zhang Signed-off-by: David S. Miller commit d24f511b04b8b159b705ec32a3b8782667d1b06a Author: Eric Dumazet Date: Mon Mar 29 10:40:49 2021 -0700 tcp: fix tcp_min_tso_segs sysctl tcp_min_tso_segs is now stored in u8, so max value is 255. 255 limit is enforced by proc_dou8vec_minmax(). We can therefore remove the gso_max_segs variable. Fixes: 47996b489bdc ("tcp: convert elligible sysctls to u8") Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 6289a98f0817a4a457750d6345e754838eae9439 Author: Eric Dumazet Date: Mon Mar 29 12:25:22 2021 -0700 sit: proper dev_{hold|put} in ndo_[un]init methods After adopting CONFIG_PCPU_DEV_REFCNT=n option, syzbot was able to trigger a warning [1] Issue here is that: - all dev_put() should be paired with a corresponding prior dev_hold(). - A driver doing a dev_put() in its ndo_uninit() MUST also do a dev_hold() in its ndo_init(), only when ndo_init() is returning 0. Otherwise, register_netdevice() would call ndo_uninit() in its error path and release a refcount too soon. Fixes: 919067cc845f ("net: add CONFIG_PCPU_DEV_REFCNT") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 40cb881b5aaa0b69a7d93dec8440d5c62dae299f Author: Eric Dumazet Date: Mon Mar 29 12:12:54 2021 -0700 ip6_vti: proper dev_{hold|put} in ndo_[un]init methods After adopting CONFIG_PCPU_DEV_REFCNT=n option, syzbot was able to trigger a warning [1] Issue here is that: - all dev_put() should be paired with a corresponding prior dev_hold(). - A driver doing a dev_put() in its ndo_uninit() MUST also do a dev_hold() in its ndo_init(), only when ndo_init() is returning 0. Otherwise, register_netdevice() would call ndo_uninit() in its error path and release a refcount too soon. Therefore, we need to move dev_hold() call from vti6_tnl_create2() to vti6_dev_init_gen() [1] WARNING: CPU: 0 PID: 15951 at lib/refcount.c:31 refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31 Modules linked in: CPU: 0 PID: 15951 Comm: syz-executor.3 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31 Code: 1d 6a 5a e8 09 31 ff 89 de e8 8d 1a ab fd 84 db 75 e0 e8 d4 13 ab fd 48 c7 c7 a0 e1 c1 89 c6 05 4a 5a e8 09 01 e8 2e 36 fb 04 <0f> 0b eb c4 e8 b8 13 ab fd 0f b6 1d 39 5a e8 09 31 ff 89 de e8 58 RSP: 0018:ffffc90001eaef28 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000040000 RSI: ffffffff815c51f5 RDI: fffff520003d5dd7 RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815bdf8e R11: 0000000000000000 R12: ffff88801bb1c568 R13: ffff88801f69e800 R14: 00000000ffffffff R15: ffff888050889d40 FS: 00007fc79314e700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f1c1ff47108 CR3: 0000000020fd5000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_dec include/linux/refcount.h:344 [inline] refcount_dec include/linux/refcount.h:359 [inline] dev_put include/linux/netdevice.h:4135 [inline] vti6_dev_uninit+0x31a/0x360 net/ipv6/ip6_vti.c:297 register_netdevice+0xadf/0x1500 net/core/dev.c:10308 vti6_tnl_create2+0x1b5/0x400 net/ipv6/ip6_vti.c:190 vti6_newlink+0x9d/0xd0 net/ipv6/ip6_vti.c:1020 __rtnl_newlink+0x1062/0x1710 net/core/rtnetlink.c:3443 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x331/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmmsg+0x195/0x470 net/socket.c:2490 __do_sys_sendmmsg net/socket.c:2519 [inline] __se_sys_sendmmsg net/socket.c:2516 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2516 Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 7f700334be9aeb91d5d86ef9ad2d901b9b453e9b Author: Eric Dumazet Date: Mon Mar 29 11:39:51 2021 -0700 ip6_gre: proper dev_{hold|put} in ndo_[un]init methods After adopting CONFIG_PCPU_DEV_REFCNT=n option, syzbot was able to trigger a warning [1] Issue here is that: - all dev_put() should be paired with a corresponding dev_hold(), and vice versa. - A driver doing a dev_put() in its ndo_uninit() MUST also do a dev_hold() in its ndo_init(), only when ndo_init() is returning 0. Otherwise, register_netdevice() would call ndo_uninit() in its error path and release a refcount too soon. ip6_gre for example (among others problematic drivers) has to use dev_hold() in ip6gre_tunnel_init_common() instead of from ip6gre_newlink_common(), covering both ip6gre_tunnel_init() and ip6gre_tap_init()/ Note that ip6gre_tunnel_init_common() is not called from ip6erspan_tap_init() thus we also need to add a dev_hold() there, as ip6erspan_tunnel_uninit() does call dev_put() [1] refcount_t: decrement hit 0; leaking memory. WARNING: CPU: 0 PID: 8422 at lib/refcount.c:31 refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31 Modules linked in: CPU: 1 PID: 8422 Comm: syz-executor854 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:refcount_warn_saturate+0xbf/0x1e0 lib/refcount.c:31 Code: 1d 6a 5a e8 09 31 ff 89 de e8 8d 1a ab fd 84 db 75 e0 e8 d4 13 ab fd 48 c7 c7 a0 e1 c1 89 c6 05 4a 5a e8 09 01 e8 2e 36 fb 04 <0f> 0b eb c4 e8 b8 13 ab fd 0f b6 1d 39 5a e8 09 31 ff 89 de e8 58 RSP: 0018:ffffc900018befd0 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88801ef19c40 RSI: ffffffff815c51f5 RDI: fffff52000317dec RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: ffffffff815bdf8e R11: 0000000000000000 R12: ffff888018cf4568 R13: ffff888018cf4c00 R14: ffff8880228f2000 R15: ffffffff8d659b80 FS: 00000000014eb300(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055d7bf2b3138 CR3: 0000000014933000 CR4: 00000000001506f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: __refcount_dec include/linux/refcount.h:344 [inline] refcount_dec include/linux/refcount.h:359 [inline] dev_put include/linux/netdevice.h:4135 [inline] ip6gre_tunnel_uninit+0x3d7/0x440 net/ipv6/ip6_gre.c:420 register_netdevice+0xadf/0x1500 net/core/dev.c:10308 ip6gre_newlink_common.constprop.0+0x158/0x410 net/ipv6/ip6_gre.c:1984 ip6gre_newlink+0x275/0x7a0 net/ipv6/ip6_gre.c:2017 __rtnl_newlink+0x1062/0x1710 net/core/rtnetlink.c:3443 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3491 rtnetlink_rcv_msg+0x44e/0xad0 net/core/rtnetlink.c:5553 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 Fixes: 919067cc845f ("net: add CONFIG_PCPU_DEV_REFCNT") Signed-off-by: Eric Dumazet Reported-by: syzbot Signed-off-by: David S. Miller commit 02fdc14d9bf15d2a2b6aab1f3fd247fe2d70cf1b Author: Jon Maloy Date: Mon Mar 29 13:17:31 2021 -0400 tipc: fix htmldoc and smatch warnings We fix a warning from the htmldoc tool and an indentation error reported by smatch. There are no functional changes in this commit. Signed-off-by: Jon Maloy Signed-off-by: David S. Miller commit 3ca3f39cb9a2b0133ef3e1801daa2a15d8453285 Merge: 3af562a37b7f1 4ff3203610928 Author: David S. Miller Date: Mon Mar 29 16:27:54 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2021-03-29 This series contains updates to igc driver only. Andre Guedes says: Add XDP support for the igc driver. The approach implemented by this series follows the same approach implemented in other Intel drivers as much as possible for the sake of consistency. The series is organized in two parts. In the first part, i.e. patches from 1 to 4, igc_main.c and igc_ptp.c code is refactored in preparation for landing the XDP support, which is introduced in the second part (patches from 5 to 8). As far as code organization is concerned, XDP-related helpers are defined in a new file, igc_xdp.c, and are called by igc_main.c. The features added by this series have been tested with the samples provided in samples/bpf/: xdp1, xdp2, xdp_redirect_cpu, and xdp_redirect_map. Upcoming series will add support of UMEM and zero-copy features from AF_XDP. ==================== Signed-off-by: David S. Miller commit 3af562a37b7f1a5dbeb50a00ace280ba2d984762 Author: Loic Poulain Date: Mon Mar 29 17:39:32 2021 +0200 net: mhi: Allow decoupled MTU/MRU MBIM protocol makes the mhi network interface asymmetric, ingress data received from MHI is MBIM protocol, possibly containing multiple aggregated IP packets, while egress data received from network stack is IP protocol. This changes allows a 'protocol' to specify its own MRU, that when specified is used to allocate MHI RX buffers (skb). For MBIM, Set the default MTU to 1500, which is the usual network MTU for WWAN IP packets, and MRU to 3.5K (for allocation efficiency), allowing skb to fit in an usual 4K page (including padding, skb_shared_info, ...). Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit d9f0713c9217fdd31077f890c2e15232ad2f0772 Author: Loic Poulain Date: Mon Mar 29 17:39:31 2021 +0200 net: mhi: Add support for non-linear MBIM skb processing Currently, if skb is non-linear, due to MHI skb chaining, it is linearized in MBIM RX handler prior MBIM decoding, causing extra allocation and copy that can be as large as the maximum MBIM frame size (32K). This change introduces MBIM decoding for non-linear skb, allowing to process 'large' non-linear MBIM packets without skb linearization. The IP packets are simply extracted from the MBIM frame using the skb_copy_bits helper. Signed-off-by: Loic Poulain Signed-off-by: David S. Miller commit 24ad92c841c9fa548dc944821721944405ef7963 Author: Colin Ian King Date: Mon Mar 29 12:23:54 2021 +0100 ieee802154: hwsim: remove redundant initialization of 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 Signed-off-by: David S. Miller commit 3e58e839150db0857dfcb3a0bb3d4af4c6ac1abf Author: Aditya Srivastava Date: Mon Mar 29 14:59:45 2021 +0530 scripts: kernel-doc: add warning for comment not following kernel-doc syntax Currently, kernel-doc start parsing the comment as a kernel-doc comment if it starts with '/**', but does not take into account if the content inside the comment too, adheres with the expected format. This results in unexpected and unclear warnings for the user. E.g., running scripts/kernel-doc -none mm/memcontrol.c emits: "mm/memcontrol.c:961: warning: expecting prototype for do not fallback to current(). Prototype was for get_mem_cgroup_from_current() instead" Here kernel-doc parses the corresponding comment as a kernel-doc comment and expects prototype for it in the next lines, and as a result causing this warning. Provide a clearer warning message to the users regarding the same, if the content inside the comment does not follow the kernel-doc expected format. Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210329092945.13152-1-yashsri421@gmail.com Signed-off-by: Jonathan Corbet commit 762bee3e3e9f42cafdb3ead64b7aee37f9b7369f Merge: 22667a63fe3e5 d28039fccf948 Author: Linus Walleij Date: Tue Mar 30 00:55:49 2021 +0200 Merge branch 'ib-bcm63xx' into devel commit 22667a63fe3e5fbda7b02ac51d769ad906a385b2 Merge: 05bc941403d66 5b613df3f499e Author: Linus Walleij Date: Tue Mar 30 00:55:27 2021 +0200 Merge tag 'intel-pinctrl-v5.13-1' of gitolite.kernel.org:pub/scm/linux/kernel/git/pinctrl/intel into devel intel-pinctrl for v5.13-1 * Don't disable disabled IRQs in the handler * Fix the base calculation for groups defined by size The following is an automated git shortlog grouped by driver: intel: - No need to disable IRQs in the handler - Show the GPIO base calculation explicitly commit 05bc941403d6695f063022531ae2acae9f79b362 Author: Wan Jiabing Date: Tue Mar 23 09:37:27 2021 +0800 drivers: pinctrl: Remove duplicate include of io.h linux/io.h has been included at line 6, so remove the duplicate include at line 18. Signed-off-by: Wan Jiabing Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20210323013727.135571-1-wanjiabing@vivo.com Signed-off-by: Linus Walleij commit 9a98bc2cf08a095367449b3548c3d9ad4ad2cd20 Author: Thomas Gleixner Date: Thu Mar 18 20:26:48 2021 +0100 x86/vector: Add a sanity check to prevent IRQ2 allocations To prevent another incidental removal of the IRQ2 ignore logic in the IO/APIC code going unnoticed add a sanity check. Add some commentry at the other place which ignores IRQ2 while at it. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210318192819.795280387@linutronix.de commit 87f2c6716f6408b9992d7f2247d1fcc190de2c92 Author: Petr Machata Date: Mon Mar 29 17:57:31 2021 +0200 Documentation: net: Document resilient next-hop groups Add a document describing the principles behind resilient next-hop groups, and some notes about how to configure and offload them. Suggested-by: David Ahern Signed-off-by: Petr Machata Reviewed-by: David Ahern Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 177cb7876dced42e7ab8736e108afd1fe8dc03ea Author: Yang Yingliang Date: Mon Mar 29 20:44:27 2021 +0800 net: mdio: Correct function name mdio45_links_ok() in comment Fix the following make W=1 kernel build warning: drivers/net/mdio.c:95: warning: expecting prototype for mdio_link_ok(). Prototype was for mdio45_links_ok() instead Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit acf61b3d84ccb325924a1ae320403f82858dba0f Author: Yang Yingliang Date: Mon Mar 29 20:42:57 2021 +0800 net: bonding: Correct function name bond_change_active_slave() in comment Fix the following make W=1 kernel build warning: drivers/net/bonding/bond_main.c:982: warning: expecting prototype for change_active_interface(). Prototype was for bond_change_active_slave() instead Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 4db0964a75a2835c7e4a5051cf99e0e63f9775f9 Author: Yang Yingliang Date: Mon Mar 29 20:40:46 2021 +0800 net: phy: Correct function name mdiobus_register_board_info() in comment Fix the following make W=1 kernel build warning: drivers/net/phy/mdio-boardinfo.c:63: warning: expecting prototype for mdio_register_board_info(). Prototype was for mdiobus_register_board_info() instead Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit cbc6a2d0aeab67c863030c4572cfeca9cdaf36ee Merge: 32e67c0aea904 7ede22e658329 Author: David S. Miller Date: Mon Mar 29 13:37:26 2021 -0700 Merge branch 'mlxsw-sampling-fixes' Ido Schimmel says: ==================== mlxsw: Two sampling fixes This patchset fixes two bugs in recent sampling submissions. The first fix, in patch #3, prevents matchall rules with sample action to be added in front of flower rules on egress. Patches #1-#2 are preparations meant at avoiding similar bugs in the future. Patch #4 is a selftest. The second fix, in patch #5, prevents sampling from being enabled on a port if already enabled. Patch #6 is a selftest. ==================== Signed-off-by: David S. Miller commit 7ede22e6583290c832306e23414cc2c1e336c4b7 Author: Ido Schimmel Date: Mon Mar 29 13:09:48 2021 +0300 selftests: mlxsw: Test vetoing of double sampling Test that two sampling rules cannot be configured on the same port with the same trigger. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 17b96a5cbe3d0c743c49776e90d892844c226a56 Author: Ido Schimmel Date: Mon Mar 29 13:09:47 2021 +0300 mlxsw: spectrum: Veto sampling if already enabled on port The per-port sampling triggers (i.e., ingress / egress) cannot be enabled twice. Meaning, the below configuration will not result in packets being sampled twice: # tc filter add dev swp1 ingress matchall skip_sw action sample rate 100 group 1 # tc filter add dev swp1 ingress matchall skip_sw action sample rate 100 group 1 Therefore, reject such configurations. Fixes: 90f53c53ec4a ("mlxsw: spectrum: Start using sampling triggers hash table") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit c3572a0b731fc0de13afef300f1f5afb929e4d4c Author: Ido Schimmel Date: Mon Mar 29 13:09:46 2021 +0300 selftests: mlxsw: Test matchall failure with protocol match The driver can only offload matchall rules that do not match on a protocol. Test that matchall rules that match on a protocol are vetoed. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit b24303048a6b23d27c4c12b9843265c0eef80ffd Author: Ido Schimmel Date: Mon Mar 29 13:09:45 2021 +0300 mlxsw: spectrum_matchall: Perform priority checks earlier Perform the priority check earlier in the function instead of repeating it for every action. This fixes a bug that allowed matchall rules with sample action to be added in front of flower rules on egress. Fixes: 54d0e963f683 ("mlxsw: spectrum_matchall: Add support for egress sampling") Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 50401f292434d5fb99f3f0c9b861f8a84c151ecc Author: Ido Schimmel Date: Mon Mar 29 13:09:44 2021 +0300 mlxsw: spectrum_matchall: Convert if statements to a switch statement Previous patch moved the protocol check out of the action check, so these if statements can now be converted to a switch statement. Perform the conversion. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 4947e7309a31fdab1078b477b98b4cb1a28f80d8 Author: Ido Schimmel Date: Mon Mar 29 13:09:43 2021 +0300 mlxsw: spectrum_matchall: Perform protocol check earlier Perform the protocol check earlier in the function instead of repeating it for every action. Example: # tc filter add dev swp1 ingress proto ip matchall skip_sw action sample group 1 rate 100 Error: matchall rules only supported with 'all' protocol. We have an error talking to the kernel Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 32e67c0aea904225fc77bf6edb27d033bec564fb Merge: 0bc7f8d54a9fa 9568387c9f519 Author: David S. Miller Date: Mon Mar 29 13:23:59 2021 -0700 Merge branch 'marvell-cleanups' Weihang Li says: ==================== net: marvell: fix some coding style Do some cleanups according to the coding style of kernel. ==================== Signed-off-by: David S. Miller commit 9568387c9f5193257414bc213c6022dcdeacee09 Author: Yangyang Li Date: Mon Mar 29 16:01:12 2021 +0800 net: marvell: Fix an alignment problem Use tab instead of space to align the code. Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit 9abcaa96ce6d7ba2c54d2c6093ecffd53d46bbb2 Author: Yangyang Li Date: Mon Mar 29 16:01:11 2021 +0800 net: marvell: Delete extra spaces Just delete three extra spaces. Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit df4a17a98d7f08569b3d2d1e666041f083452aa3 Author: Yangyang Li Date: Mon Mar 29 16:01:10 2021 +0800 net: marvell: Fix the trailing format of some block comments Use a trailing */ on a separate line for block comments. Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit b52f6425481ce7963b86ef1a171b28f422ffbea1 Author: Yangyang Li Date: Mon Mar 29 16:01:09 2021 +0800 net: marvell: Delete duplicate word in comments Delete duplicate word in two comments. Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Signed-off-by: David S. Miller commit 0bc7f8d54a9facebed58349d196450b4dd5de4b5 Merge: a180be79db4a7 97b9e5c131f16 Author: David S. Miller Date: Mon Mar 29 13:21:01 2021 -0700 Merge branch 'hns3-misc' Huazhong Tan says: ==================== net: hns3: misc updates for -next This series include some updates for the HNS3 ethernet driver. flow director configuration"). ==================== Signed-off-by: David S. Miller commit 97b9e5c131f16e2e487139ba596f9e6df927ae87 Author: Yunsheng Lin Date: Mon Mar 29 11:57:53 2021 +0800 net: hns3: add stats logging when skb padding fails skb_put_padto() may fails because of memory failure, sw_err_cnt is already used to log memory failure in hns3_skb_linearize(), so use it to log the memory failure for skb_put_padto() too. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 33a8f7649913e4aeda34bc1294302688112c9c56 Author: Guojia Liao Date: Mon Mar 29 11:57:52 2021 +0800 net: hns3: expand the tc config command The device HNAE3_DEVICE_VERSION_V3 supports up to 1280 queues and qsets for one function, so the bitwidth of tc_offset, meaning the tqps index, needs to expand from 10 bits to 11 bits. The device HNAE3_DEVICE_VERSION_V3 supports up to 512 queues on one TC. The tc_size, meaning the exponent with base 2 of queues supported on TC, which needs to expand from 3 bits to 4 bits. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 811c0830eb4ca8811ed80fe40378f622b9844835 Author: Yunsheng Lin Date: Mon Mar 29 11:57:51 2021 +0800 net: hns3: add tx send size handling for tso skb The actual size on wire for tso skb should be (gso_segs - 1) * hdr + skb->len instead of skb->len, which can be seen by user using 'ethtool -S ethX' cmd, and 'Byte Queue Limit' also use the send size stat to do the queue limiting, so add send_bytes in the desc_cb to record the actual send size for a skb. And send_bytes is only for tx desc_cb and page_offset is only for rx desc, so reuse the same space for both of them. Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d5d5e0193ee8f88efbbc7f1471087255657bc19a Author: Yunsheng Lin Date: Mon Mar 29 11:57:50 2021 +0800 net: hns3: add handling for xmit skb with recursive fraglist Currently hns3 driver only handle the xmit skb with one level of fraglist skb, add handling for multi level by calling hns3_tx_bd_num() recursively when calculating bd num and calling hns3_fill_skb_to_desc() recursively when filling tx desc. When the skb has a fraglist level of 24, the skb is simply dropped and stats.max_recursion_level is added to record the error. Move the stat handling from hns3_nic_net_xmit() to hns3_nic_maybe_stop_tx() in order to handle different error stat and add the 'max_recursion_level' and 'hw_limitation' stat. Note that the max recursive level as 24 is chose according to below: commit 48a1df65334b ("skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow"). And that we are not able to find a testcase to verify the recursive fraglist case, so Fixes tag is not provided. Reported-by: Barry Song Signed-off-by: Yunsheng Lin Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 8fa865510069aa1364f50761d38418dec4c163df Author: Yufeng Mo Date: Mon Mar 29 11:57:49 2021 +0800 net: hns3: optimize the process of queue reset Currently, the queue reset process needs to be performed one by one, which is inefficient. However, the queue reset of the same function is always performed at the same time. Therefore, according to the UM, command HCLGE_OPC_CFG_RST_TRIGGER can be used to reset all queues of the same function at a time, in order to optimize the queue reset process. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5be36fb7855442e0299cf483d40457315a84cdf1 Author: Jian Shen Date: Mon Mar 29 11:57:48 2021 +0800 net: hns3: remove the rss_size limitation by vector num Currently, if user hasn't change channel number, the rss_size is limited to be no more than the vector number, in order to keep one vector only being mapped to one queue. But the queue number of each tc can be different, and one vector also can be mapped by multiple queues. So remove this limitation. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit a2ee6fd28a190588e142ad8ea9d40069cd3c9f98 Author: Guangbin Huang Date: Mon Mar 29 11:57:47 2021 +0800 net: hns3: remediate a potential overflow risk of bd_num_list The array size of bd_num_list is a fixed value, it may have potential overflow risk when array size of hclge_dfx_bd_offset_list is greater than that fixed value. So modify bd_num_list as a pointer and allocate memory for it according to array size of hclge_dfx_bd_offset_list. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 64ff58fa3bfcf26bc893ea425a0553b561ca5298 Author: Jian Shen Date: Mon Mar 29 11:57:46 2021 +0800 net: hns3: fix use-after-free issue for hclge_add_fd_entry_common() When new rule state is TO_ADD or ACTIVE, and there is already a rule with same location in the fd_rule_list, the new rule will be freed after modifying the old rule. It may cause user-after-free issue when access rule again in hclge_add_fd_entry_common(). Fixes: fc4243b8de8b ("net: hns3: refactor flow director configuration") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 989f7178b06666ec23ada614b2047c21d85b2a0a Author: Jian Shen Date: Mon Mar 29 11:57:45 2021 +0800 net: hns3: fix missing rule state assignment Currently, when adding flow director rule, it missed to set rule state. Which may cause the rule state in software is unconsistent with hardware. Fixes: fc4243b8de8b ("net: hns3: refactor flow director configuration") Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit a180be79db4a7eeab575b76b0838087932953caf Author: Guobin Huang Date: Mon Mar 29 09:54:05 2021 +0800 net: mscc: ocelot: remove redundant dev_err call in vsc9959_mdio_bus_alloc() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: David S. Miller commit 3d0dbd546345689aba8c4a00b486abc51622e920 Author: Guobin Huang Date: Mon Mar 29 09:49:32 2021 +0800 net: stmmac: remove redundant dev_err call in qcom_ethqos_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: David S. Miller commit a956b21596f300506d20dd9d2a2a039772193a8f Author: Guobin Huang Date: Mon Mar 29 09:45:13 2021 +0800 net: axienet: Remove redundant dev_err call in axienet_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: David S. Miller commit 6be836818872329b5c8daa58ea2ac33945850cfe Author: Guobin Huang Date: Mon Mar 29 09:38:32 2021 +0800 net: mdio: Remove redundant dev_err call in mdio_mux_iproc_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: David S. Miller commit 25926cd856bea1e25f87f35c6fd935b4161b869b Author: Imre Deak Date: Thu Mar 25 23:48:07 2021 +0200 drm/i915/selftest: Add remap/rotate vma subtests when dst_stride!=width/height Add selftests to test the POT stride padding functionality added in the previous patch. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-25-imre.deak@intel.com commit a4606d4595fd1cb662e4f7a63ac0c04396a0f124 Author: Imre Deak Date: Thu Mar 25 23:48:06 2021 +0200 drm/i915: Add support for FBs requiring a POT stride alignment An upcoming platform has a restriction that the FB stride must be power-of-two aligned. To support framebuffer layouts that are not in this layout add a logic that pads the tile rows to the POT aligned size. The HW won't read the padding PTEs, so these don't have to point to an allocated address, or even have their valid flag set. So use a NULL PTE instead for instance the scratch page, which is simple and keeps the SG table compact. v2: - Simplify plane_view_dst_stride(). (Ville) - Pass pitch_tiles as unsigned int. v3: - Drop unintentional s/plane_state->rotation/plane_config->rotation/ change. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-24-imre.deak@intel.com commit 6d80f4308605e1b572777dc19f0297657ec0c206 Author: Imre Deak Date: Thu Mar 25 23:48:05 2021 +0200 drm/i915: s/stride/src_stride/ in the intel_remapped_plane_info struct An upcoming patch adds a new dst_stride field to the intel_remapped_plane_info struct, so for clarity rename the current stride field to src_stride. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-23-imre.deak@intel.com commit b05787aeed320f872bda8d7f0f0a2c7b1593c7e1 Author: Imre Deak Date: Thu Mar 25 23:48:04 2021 +0200 drm/i915/selftest: Unify use of intel_remapped_plane_info in igt_vma_rotate_remap() Always use the modified copy of the intel_remapped_plane_info variables. An upcoming patch updates the dst_stride field in these copies after which we can't use the original versions. v2: Init view in igt_vma_rotate_remap() when declaring it. (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-22-imre.deak@intel.com commit 1b6b032aa46f6c0749555dd67f6e576504018252 Author: Imre Deak Date: Thu Mar 25 23:48:03 2021 +0200 drm/i915: Shrink the size of intel_remapped_plane_info struct Save some place in the GTT VMAs by using a u16 instead of unsigned int to store the view dimensions. The maximum FB stride is 256kB which is 4096 tiles in the worst case (yf-tiles), the maximum FB height is 16k pixels, which is 16384 tiles in the worst case (linear 4x1 tiled FB). v2: - Fix worst case tile height formula in commit log. (Ville) - Add an assign_chk_ovf helper to simplify the related assignments. v3: - Enclose params of the assign_chk_ovf macro in parentheses. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-21-imre.deak@intel.com commit 23c87dc6777c25fb91aaf5fff265afa594d268ec Author: Imre Deak Date: Thu Mar 25 23:48:02 2021 +0200 drm/i915/intel_fb: Factor out calc_plane_remap_info() Factor out to a new function the logic to calculate the FB remapping parameters both during creating the FB and when flipping to it. v2: - Keep stride next to offset calculation. (Ville) - Enclose check_array_bounds macro arguments in parentheses. v3: - Rebase on top of the struct intel_fb_view refactoring. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-20-imre.deak@intel.com commit ee456a4ca5adef31ffd86c0386d7ac7b367d6533 Author: Imre Deak Date: Thu Mar 25 23:48:01 2021 +0200 drm/i915: Simplify copying the FB view state to the plane state Instead of copying separately the GTT remapped and color plane view info from the FB to the plane state, do this by copying the whole intel_fb_view struct. For this we make sure the FB view state is fully inited (that is also including the view type) already during FB creation, so this init is not required during atomic check time. This also means the we don't need to reset the unused color plane info during atomic check, as these are already reset during FB creation. I noticed that initial FBs will only work atm if they are page aligned (which BIOS most probably always ensures), but add a comment to sanitize this part once. Also we won't disable the plane if get_initial_plane_config() failed for some reason (for instance due to unsupported rotation), add a TODO: comment for this too. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-19-imre.deak@intel.com commit 67cfab66139b60939ad3dac2da6619f4998fd192 Author: Imre Deak Date: Thu Mar 25 23:48:00 2021 +0200 drm/i915: Store the normal view FB pitch in FB's intel_fb_view Instead of special casing getting the pitch for the normal view, store it during FB creation to the FB normal view struct and retrieve it from there during atomic check, as it's done for the rotated view. A follow-up patch does the same for a new FB remapped view. Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-18-imre.deak@intel.com commit 61169987c4d99d071af976ad5923fa990bc2d44e Author: Imre Deak Date: Sun Mar 28 00:09:10 2021 +0200 drm/i915: Unify the FB and plane state view information into one struct To allow the simplification of FB/plane view computation in the follow-up patches, unify the corresponding state in the intel_framebuffer and intel_plane_state structs into a new intel_fb_view struct. This adds some overhead to intel_framebuffer as the rotated view will have now space for 4 color planes instead of the required 2 and it'll also contain the unused offset for each color_plane info. Imo this is an acceptable trade-off to get a simplified way of the remap computation. Use the new intel_fb_view struct for the FB normal view as well, so (in the follow-up patches) we can remove the special casing for normal view calculation wrt. the calculation of remapped/rotated views. This also adds an overhead to the intel_framebuffer struct, as the gtt remap info and per-color plane offset/pitch is not required for the normal view, but imo this is an acceptable trade-off as above. The per-color plane pitch filed will be used by a follow-up patch, so we can retrieve the pitch for each view in the same way. No functional changes in this patch. v2: - Make the patch have _no functional change_. (fix skl_check_nv12_aux_surface() and skl_check_main_surface()). - s/i915_color_plane_view::pitch/stride/ (Ville) 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/20210325214808.2071517-17-imre.deak@intel.com commit 5d32bcd0a74c791c7049817d42dd3645d6c63faf Author: Imre Deak Date: Thu Mar 25 23:47:58 2021 +0200 drm/i915/intel_fb: Factor out calc_plane_normal_size() Factor out to a new function the logic to calculate an FB plane's normal-view size. Instead of using intel_remapped_plane_info, which is related only to remapping, add a helper to get the tile pitch and rows for an FB plane, so these helpers can be used both by the normal size calculation and the remapping code. Also add a new fb_plane_view_dims struct in which we can pass around the view (either FB plane or plane source) and tile dimensions conveniently to functions calculating further view parameters. v2: - Add back the +1 tile adjustment for x!=0 in calc_plane_normal_size(). (Ville) - s/pages/tiles/ in calc_plane_normal_size(). (Ville) - Add a helper for the plane view width calculation. (Ville) - Return tiles as unsigned int from calc_plane_normal_size(). Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-16-imre.deak@intel.com commit 435b3e7ed708715b048ec5d08edcec4876e3eb57 Author: Imre Deak Date: Thu Mar 25 23:47:57 2021 +0200 drm/i915/intel_fb: Factor out calc_plane_aligned_offset() Factor out to a new function the logic to convert the FB plane x/y values to a tile size based offset and new x/y relative to this offset. This makes intel_fill_fb_info() and intel_plane_remap_gtt() somewhat more readable. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-15-imre.deak@intel.com commit d3c5e10b6059581b7d526f4d7cfe625f834b080c Author: Imre Deak Date: Thu Mar 25 23:47:56 2021 +0200 drm/i915/intel_fb: Factor out convert_plane_offset_to_xy() Factor out to a new function the logic to convert the FB plane offset to x/y and check the validity of x/y, with the goal to make intel_fill_fb_info() more readable. v2: Use &fb->base instead of a drm_fb alias. (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-14-imre.deak@intel.com commit 90df088469d531ca56772d8a8e93c06a1b71763f Author: Imre Deak Date: Thu Mar 25 23:47:55 2021 +0200 drm/i915/intel_fb: s/dev_priv/i915/ Rename dev_priv to i915 in the intel_fb.[ch] files. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-13-imre.deak@intel.com commit bb7f311b206bafdeafe936c33e3a1c2f6ae7d4c0 Author: Imre Deak Date: Thu Mar 25 23:47:54 2021 +0200 drm/i915/intel_fb: Unexport intel_fb_check_stride() After the previous patch we can unexport intel_fb_check_stride(), which isn't needed by intel_display.c. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-12-imre.deak@intel.com commit 3cee6269385cf91a588fdb531293cdf8a8b4ac53 Author: Imre Deak Date: Thu Mar 25 23:47:53 2021 +0200 drm/i915/intel_fb: Pull FB plane functions from intel_display.c Move the FB plane specific functions from intel_display.c to intel_fb.c. There's more functions like this, but I leave moving those as well for a follow up, and for now moving only the ones needed by the end of this patchset (adding support for padding tile-rows in an FB GGTT view). Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-11-imre.deak@intel.com commit d7bdd1c8a97ccc5230c2b44a258c6ecfb25eeca2 Author: Imre Deak Date: Thu Mar 25 23:47:52 2021 +0200 drm/i915/intel_fb: Pull FB plane functions from intel_sprite.c Move the FB plane specific function from intel_sprite.c to intel_fb.c Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-10-imre.deak@intel.com commit 3e5e0a75fa58a181f638b51103d50b9bcdbfb8c6 Author: Imre Deak Date: Thu Mar 25 23:47:51 2021 +0200 drm/i915/intel_fb: Pull is_surface_linear() from intel_display.c/skl_universal_plane.c Move is_surface_linear() to intel_fb.c and export it from here, also removing the duplicate definitions of it. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-9-imre.deak@intel.com commit 5e4eb4e6e74937f43856df56bd60405e77574881 Author: Imre Deak Date: Thu Mar 25 23:47:50 2021 +0200 drm/i915/intel_fb: Pull FB plane functions from skl_universal_plane.c Move the FB plane related functions from skl_universal_plane.c to intel_fb.c. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-8-imre.deak@intel.com commit f837a61fb3abc66b827eb9a009b37ca4b7641c3a Author: Imre Deak Date: Thu Mar 25 23:47:49 2021 +0200 drm/i915/intel_fb: Pull FB plane functions from intel_display_types.h Start collecting all the FB plane related functions into a new intel_fb.c file. v2: Drop display/ part of header includes. (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-7-imre.deak@intel.com commit 54c2921f7e9eeb7bb17e7174fb83c833503277f5 Author: Imre Deak Date: Thu Mar 25 23:47:48 2021 +0200 drm/i915/selftest: Make sure to init i915_ggtt_view in igt_vma_rotate_remap() This probably doesn't cause an issue, since the code checks the view type dependent size of the views before comparing them, but let's follow the practice to bzero the whole struct when initializing it. v2: Use {} instead of { } struct intializer. (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-6-imre.deak@intel.com commit 8a949222ea822ed1eb3f995006a2531cbee15e4d Author: Imre Deak Date: Thu Mar 25 23:47:47 2021 +0200 drm/i915: Make sure i915_ggtt_view is inited when creating an FB This probably doesn't cause an issue, since the code checks the view type dependent size of the views before comparing them, but let's follow the practice to bzero the whole struct when initializing it. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-5-imre.deak@intel.com commit 911e03327d4482c4c1f41164bfed9634c8ee598a Author: Imre Deak Date: Thu Mar 25 23:47:46 2021 +0200 drm/i915/selftest: Fix debug message in igt_vma_remapped_gtt() The expected/found values were swapped in a debug message, fix this up. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-4-imre.deak@intel.com commit 69e331b44c9c45510f45f8a99c467eaa158f455d Author: Imre Deak Date: Thu Mar 25 23:47:45 2021 +0200 drm/i915/selftest: Fix error handling in igt_vma_remapped_gtt() An inner scope version of err shadows the variable in the outer scope, and err doesn't get set after a failure, fix these. Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-3-imre.deak@intel.com commit cc41b0fddb8c2e790255981d140a5297a283be2a Author: Imre Deak Date: Thu Mar 25 23:47:44 2021 +0200 drm/i915: Fix rotation setup during plane HW readout The HW plane state is cleared and inited after we store the rotation to it, so store it instead to the uapi state to match what we do with all other plane state until intel_plane_copy_uapi_to_hw_state() is called. Rotation for initial FBs is not supported atm, but let's still fix the plane state setup here. While at it remove the redundant intel_state->uapi.src/dst init, which will be done in intel_plane_copy_uapi_to_hw_state(). v2: Remove redundant intel_state->uapi.src/dst init. (Ville) Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-2-imre.deak@intel.com commit 8cef45e2d37e65403a5d169d7be91928705e5a4e Author: Wan Jiabing Date: Fri Mar 26 09:25:17 2021 +0800 drm/i915: Remove repeated declaration struct drm_i915_private, struct intel_crtc_state and struct intel_crtc is declared twice. Remove the duplicate. Reviewed-by: José Roberto de Souza Signed-off-by: Wan Jiabing Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210326012527.875026-1-wanjiabing@vivo.com commit 3de72d6a282271f82000fe163296d95f8db05632 Merge: c943a586f6e49 eef07b9e0925e Author: Mark Brown Date: Mon Mar 29 20:30:51 2021 +0100 Merge series "Add mediatek MT6359 ASoC accdet jack driver" from Argus Lin : All of 3-pole and 4-pole jack are supported. change since v2: - fixs missing blank at Kconfig. - fixs comment format and spelling mistake. - changes private structure mt6359_accdet to mt6359-accdet.h and uses this data as function parameter. - removes compatible string declaration. - uses regmap_read_poll_timeout as polling timer. - simplify jack detection and key detection report function. - adds mt6359_accdet_enable_jack_detect for sound card jack initialization. change since v1: - adds mt6359 accdet binding document - adds mt6359 accdet driver *** BLURB HERE *** Argus Lin (2): dt-bindings: mediatek: mt6359: add ASoC mt6359 ASoC accdet jack document ASoC: mediatek: mt6359: add MT6359 accdet jack driver .../bindings/sound/mt6359-accdet.yaml | 164 ++ sound/soc/codecs/Kconfig | 8 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/mt6359-accdet.c | 1080 ++++++++++ sound/soc/codecs/mt6359-accdet.h | 128 ++ sound/soc/codecs/mt6359.h | 1864 ++++++++++++++++- 6 files changed, 3139 insertions(+), 107 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/mt6359-accdet.yaml create mode 100644 sound/soc/codecs/mt6359-accdet.c create mode 100644 sound/soc/codecs/mt6359-accdet.h -- 2.18.0 commit 60c325a7172d13041b160d088630c6fa286490a7 Merge: a38fd87484648 0eedab655ec18 Author: Stephen Boyd Date: Mon Mar 29 12:14:46 2021 -0700 Merge tag 'renesas-clk-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into clk-renesas Pull Renesas clk driver updates from Geert Uytterhoeven: - Add DAB hardware accelerator clocks on R-Car E3 and M3-N - Add timer (TMU) clocks on R-Car H3 ES1.0 - Add Timer (TMU & CMT) and thermal sensor (TSC) clocks on R-Car V3U * tag 'renesas-clk-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers: clk: renesas: r8a779a0: Add CMT clocks clk: renesas: r8a7795: Add TMU clocks clk: renesas: r8a779a0: Add TSC clock clk: renesas: r8a779a0: Add TMU clocks clk: renesas: r8a77965: Add DAB clock clk: renesas: r8a77990: Add DAB clock commit 31e46db02ac1351c84e56a18606d17fc1b8390dd Author: Lee Jones Date: Mon Mar 29 16:24:35 2021 +0100 of: base: Fix spelling issue with function param 'prop' Fixes the following W=1 kernel build warning(s): drivers/of/base.c:1781: warning: Function parameter or member 'prop' not described in '__of_add_property' drivers/of/base.c:1781: warning: Excess function parameter 'prob' description in '__of_add_property' drivers/of/base.c:1804: warning: Function parameter or member 'prop' not described in 'of_add_property' drivers/of/base.c:1804: warning: Excess function parameter 'prob' description in 'of_add_property' drivers/of/base.c:1855: warning: Function parameter or member 'prop' not described in 'of_remove_property' drivers/of/base.c:1855: warning: Excess function parameter 'prob' description in 'of_remove_property' Cc: Rob Herring Cc: Frank Rowand Cc: "David S. Miller" Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20210329152435.900225-1-lee.jones@linaro.org Signed-off-by: Rob Herring commit 9f01f5cdb548352418b34ce77db02a560fe2913b Author: Rafał Miłecki Date: Mon Mar 29 17:45:14 2021 +0200 arm64: dts: broadcom: bcm4908: add Ethernet MAC addr On most BCM4908 devices MAC address can be read from the bootloader binary section containing device settings. Use NVMEM to describe that. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit dcb56d61d5a8acca0a357cc603397bc0272ce4cb Author: Rafał Miłecki Date: Mon Mar 29 10:04:09 2021 +0200 ARM: dts: BCM5301X: Set Linksys EA9500 power LED Set Linux default trigger to default on, just like it's normally done for power LEDs. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 1d3352aeed164ef73f05cf80ca001f11d2f3312d Author: Rafał Miłecki Date: Mon Mar 29 07:54:30 2021 +0200 ARM: dts: BCM5301X: Fix Linksys EA9500 partitions Partitions are basically fixed indeed but firmware ones don't have hardcoded function ("firmware" vs "failsafe"). Actual function depends on bootloader configuration. Use a proper binding for that. While at it fix numbers formatting to avoid: arch/arm/boot/dts/bcm47094-linksys-panamera.dt.yaml: partitions: 'partition@1F00000' does not match any of the regexes: '^partition@[0-9a-f]+$', 'pinctrl-[0-9]+' From schema: Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 2fd8db2dd05d895961c7c7b9fa02d72f385560e4 Author: Yang Yingliang Date: Sat Mar 27 16:37:04 2021 +0800 fs: dlm: fix missing unlock on error in accept_from_sock() Add the missing unlock before return from accept_from_sock() in the error handling case. Fixes: 6cde210a9758 ("fs: dlm: add helper for init connection") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David Teigland commit 37f368d8d09d2190e64cdb1cd73d56e3ad50c3df Author: Colin Ian King Date: Sun Mar 28 22:46:47 2021 +0100 lan743x: remove redundant intializations of pointers adapter and phydev The pointers adapter and phydev are being initialized with values that are never read and are 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 4db2b9af3ee92e6c51c6a9a5dc2748e4bc1800f9 Author: Chunfeng Yun Date: Thu Mar 18 14:18:48 2021 +0800 arm64: dts: mt8173: fix wrong power-domain phandle of pmic Due to power domain controller is added, the power domain's phanle is also changed from 'scpsys' to 'spm', but forget to modify pmic node's Fixes: 8b6562644df9 ("arm64: dts: mediatek: Add mt8173 power domain controller") Signed-off-by: Chunfeng Yun Reviewed-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/1616048328-13579-1-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit fccf4261b82ef9c8dea348ad51e7fba8b1127409 Author: Matthias Kaehlcke Date: Mon Mar 29 19:10:37 2021 +0200 arm64: dts: mt8183: Configure CPU cooling Add two passive trip points at 68°C and 80°C for the CPU temperature. Signed-off-by: Matthias Kaehlcke Signed-off-by: Michael Kao Tested-by: Hsin-Yi Wang Signed-off-by: Matthias Brugger commit b325ce39785b1408040d90365a6ab1aa36e94f87 Author: michael.kao Date: Tue Mar 16 15:01:42 2021 +0800 arm64: dts: mt8183: add thermal zone node Add thermal zone node to Mediatek MT8183 dts file. Evaluate the thermal zone every 500ms while not cooling and every 100ms when passive cooling is performed. Signed-off-by: Matthias Kaehlcke Tested-by: Hsin-Yi Wang Signed-off-by: Michael Kao Signed-off-by: Matthias Brugger commit 67f6f52af4566192a9b087986b3ddcc33e817d72 Author: Ville Syrjälä Date: Thu Mar 25 02:44:15 2021 +0200 drm/i915: Stop adding planes to the commit needlessly The dbuf bandwidth calculations don't need the planes to be added to the state. Each plane's data rate has already been precalculated and stored in the crtc state, and that with the dbuf slice usage for each plane is all the dbuf bandwidth code needs to figure out what the minimum cdclk is. What we're trying to do here is make sure each plane recalculates its minimum cdclk (ie. plane->min_cdclk()) on those platforms where the number of active planes affects the result of said calculation. Nothing to do with any dbuf cdclk requirements. Not sure if we had stuff in slightly different order or what, but at least in the current scheme this is not necessary. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325004415.17432-2-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 413c601e8fd0e4adab67e0775dd84e63be6d803e Author: Linus Walleij Date: Sun Mar 28 14:15:30 2021 +0200 spi: pl022: User more sensible defaults When using the device tree, which must be considered normal these days, in order to get some kind of normal functionality out of the PL022 users have to actively go into the device tree and edit the SPI clients like this: spi { compatible = "arm,pl022"; num-cs = <1>; cs-gpios = <&gpio 0 GPIO_ACTIVE_LOW>; foo@0 { compatible = "foo"; reg = <0>; pl022,interface = <0>; pl022,com-mode = <0>; }; }; Otherwise the PL022 will come up as a client (slave) and using polling mode. This is quite unintuitive and many users will get their device trees wrong. Alter the defaults such that we come up in host mode (master) and use interrupt mode. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210328121530.1983081-1-linus.walleij@linaro.org Signed-off-by: Mark Brown commit c943a586f6e49998b323afbd7f788afabf6ed89b Author: Jaska Uimonen Date: Fri Mar 26 18:51:50 2021 +0200 ASoC: SOF: match SSP config with pcm hw params This patch adds a function to find a match between pcm hw params and SSP DAI config. Config is matched against sample rate and if match is found current config is set. If match isn't found last matched config is left as current i.e. current config is not touched. Functionality for SSP DAIs with 1 config remains the same as before. Signed-off-by: Jaska Uimonen Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210326165150.255533-3-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit e12be9fbfb91173b3aa358466ce0474823be2695 Author: Jaska Uimonen Date: Fri Mar 26 18:51:49 2021 +0200 ASoC: SOF: Intel: HDA: add hw params callback for SSP DAIs Currently SSP DAIs don't have hw params callback function as there wasn't anything to setup after initial topology loading. After enabling multiple DAI configs the current config can be sent in the callback. This patch changes the way SSP config ipc is sent to the dsp. Before it was only sent once in topology loading, but now it will be additionally sent always when stream is opened. Mechanism is similar as with HDA DAIs. Signed-off-by: Jaska Uimonen Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210326165150.255533-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit c1c03888f1e89e669aa6da0c9a491f02fd6a999e Author: Jaska Uimonen Date: Fri Mar 26 18:51:48 2021 +0200 ASoC: SOF: parse multiple SSP DAI and hw configs ASoC parses multiple hw_configs defined in topology. However currently in SOF only the first config is used and others are discarded. First change SOF driver to parse and save possible multiple configs in ssp case. Also save the default config value provided by ASoC. Functionality with only one defined config stays the same. Signed-off-by: Jaska Uimonen Reviewed-by: Ranjani Sridharan Reviewed-by: Pierre-Louis Bossart Reviewed-by: Guennadi Liakhovetski Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210326165150.255533-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 502e5321d89214a34a7b8bda697fc98d14b51cae Author: Shengjiu Wang Date: Mon Mar 29 11:34:28 2021 +0800 ASoC: fsl_rpmsg: initialise pointers to NULL This fixes the following sparse warnings: sound/soc/fsl/fsl_rpmsg.c:45:45: sparse: sparse: Using plain integer as NULL pointer sound/soc/fsl/fsl_rpmsg.c:45:56: sparse: sparse: Using plain integer as NULL pointer Fixes: b73d9e6225e8 ("ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg") Signed-off-by: Shengjiu Wang Reported-by: kernel test robot Link: https://lore.kernel.org/r/1616988868-971-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit d463cead11ace05c81de31a0fb9c2507c5c1d0a2 Author: Vijendar Mukunda Date: Fri Mar 26 22:14:31 2021 +0530 ASoC: amd: fix acpi dependency kernel warning Fix ACPI dependency kernel warning produced by powerpc allyesconfig. sound/soc/amd/acp-da7219-max98357a.c:684:28: warning: 'cz_rt5682_card' defined but not used [-Wunused-variable] sound/soc/amd/acp-da7219-max98357a.c:671:28: warning: 'cz_card' defined but not used [-Wunused-variable] Reported-by: Stephen Rothwell Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1616777074-5151-2-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 23f23db29ac996a824dce2b3a800c7a002f1c480 Author: Vijendar Mukunda Date: Fri Mar 26 22:14:30 2021 +0530 ASoC: amd: update spdx license for acp machine driver update SPDX license for acp machine driver. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1616777074-5151-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 0803a5cb5b7cf369c3e2af4108ee44d0b6e1c197 Author: YueHaibing Date: Mon Mar 29 23:05:24 2021 +0800 ASoC: dwc: Fix -Wmissing-prototypes warnings while CONFIG_SND_DESIGNWARE_PCM is not set, building with W=1 shows this: sound/soc/dwc/local.h:127:6: warning: no previous prototype for ‘dw_pcm_push_tx’ [-Wmissing-prototypes] void dw_pcm_push_tx(struct dw_i2s_dev *dev) { } ^~~~~~~~~~~~~~ sound/soc/dwc/local.h:128:6: warning: no previous prototype for ‘dw_pcm_pop_rx’ [-Wmissing-prototypes] void dw_pcm_pop_rx(struct dw_i2s_dev *dev) { } ^~~~~~~~~~~~~ sound/soc/dwc/local.h:129:5: warning: no previous prototype for ‘dw_pcm_register’ [-Wmissing-prototypes] int dw_pcm_register(struct platform_device *pdev) ^~~~~~~~~~~~~~~ Change these to inline functions to fix the warnings. Signed-off-by: YueHaibing Link: https://lore.kernel.org/r/20210329150524.18184-1-yuehaibing@huawei.com Signed-off-by: Mark Brown commit 4ff3203610928cac82d5627ce803559e78d61b91 Author: Andre Guedes Date: Tue Mar 9 23:13:22 2021 -0800 igc: Add support for XDP_REDIRECT action Add support for the XDP_REDIRECT action which enables XDP programs to redirect packets arriving at I225 NIC. It also implements the ndo_xdp_xmit ops, enabling the igc driver to transmit packets forwarded to it by xdp programs running on other interfaces. The patch tweaks the driver's page counting and recycling scheme as described in the following two commits and implemented by other Intel drivers in order to properly support XDP_REDIRECT action: commit 8ce29c679a6e ("i40e: tweak page counting for XDP_REDIRECT") commit 75aab4e10ae6 ("i40e: avoid premature Rx buffer reuse") This patch has been tested with the sample apps "xdp_redirect_cpu" and "xdp_redirect_map" located in samples/bpf/. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 73f1071c1d2952b8c93cd6cd99744768c59ec840 Author: Andre Guedes Date: Tue Mar 9 23:13:21 2021 -0800 igc: Add support for XDP_TX action Add support for XDP_TX action which enables XDP programs to transmit back receiving frames. I225 controller has only 4 Tx hardware queues. Since XDP programs may not even issue an XDP_TX action, this patch doesn't reserve dedicated queues just for XDP like other Intel drivers do. Instead, the queues are shared between the network stack and XDP. The netdev queue lock is used to ensure mutual exclusion. Since frames can now be transmitted via XDP_TX, the igc_tx_buffer structure is modified so we are able to save a reference to the xdp frame for later clean up once the packet is transmitted. The tx_buffer is mapped to either a skb or a xdpf so we use a union to save the skb or xdpf pointer and have a bit in tx_flags to indicate which field to use. This patch has been tested with the sample app "xdp2" located in samples/bpf/ dir. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 26575105d6ed8e2a8e43bd008fc7d98b75b90d5c Author: Andre Guedes Date: Tue Mar 9 23:13:20 2021 -0800 igc: Add initial XDP support Add the initial XDP support to the igc driver. For now, only XDP_PASS, XDP_DROP, XDP_ABORTED actions are supported. Upcoming patches will add support for the remaining XDP actions. XDP configuration helpers are defined in a new file, igc_xdp.c. These helpers are utilized in igc_main.c to implement the ndo_bpf callback. XDP-related code that belongs to the driver's hot path is landed in igc_main.c. By default, the driver uses Rx buffers with 2 KB size. When XDP is enabled, it uses larger buffers so we have enough space to accommodate the headroom and tailroom required by XDP infrastructure. Also, the driver doesn't support XDP functionality with frames that span over multiple buffers so jumbo frames are not allowed for now. The approach implemented follows the approach implemented in other Intel drivers as much as possible for the sake of consistency across the drivers. Quick comment regarding igc_build_skb(): this patch doesn't touch it because the function is never called. It seems its support is incomplete/in progress. The function was added by commit 0507ef8a0372b ("igc: Add transmit and receive fastpath and interrupt handlers") but ring_uses_build_skb() always return False since the IGC_RING_FLAG_RX_ BUILD_SKB_ENABLED isn't set anywhere in the driver code. This patch has been tested with the sample app "xdp1" located in samples/bpf/ dir. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 368166ec7600ba83587cfcb31d817cf6479cf006 Author: Chun-Kuang Hu Date: Sat Mar 13 17:22:17 2021 +0800 drm/mediatek: crtc: Make config-updating atomic While updating config, the irq would occur and get the partial config, so use variable config_updating to make updating atomic. Signed-off-by: Chun-Kuang Hu commit 1bf33f71f9813688bf5ca5a4db0743bb4a4dd563 Author: Andre Guedes Date: Tue Mar 9 23:13:19 2021 -0800 igc: Add set/clear large buffer helpers While commit 13b5b7fd6a4a ("igc: Add support for Tx/Rx rings") introduced code to handle larger packet buffers, it missed the set/clear helpers which enable/disable that feature. Introduce the missing helpers which will be use in the next patch. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit e1ed4f92a6256ec11445de51c2b5a7d89289f8d1 Author: Andre Guedes Date: Tue Mar 9 23:13:18 2021 -0800 igc: Refactor Rx timestamp handling Refactor the Rx timestamp handling in preparation to land XDP support. Rx timestamps are put in the Rx buffer by hardware, before the packet data. When creating the xdp buffer, we will need to check the Rx descriptor to determine if the buffer contains timestamp information and consider the offset when setting xdp.data. The Rx descriptor check is already done in igc_construct_skb(). To avoid code duplication, this patch moves the timestamp handling to igc_clean_rx_irq() so both skb and xdp paths can reuse it. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit a39f5e530559e0e39ab26b28ce5fa9550fd3ec5b Author: Andre Guedes Date: Tue Mar 9 23:13:17 2021 -0800 igc: Introduce igc_get_rx_frame_truesize() helper The RX frame truesize calculation is scattered throughout the RX code. This patch creates the helper function igc_get_rx_frame_truesize() and uses it where applicable. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 613cf199fd10a610d46dd6b3a6eb3b14fe2b1104 Author: Andre Guedes Date: Tue Mar 9 23:13:16 2021 -0800 igc: Introduce igc_rx_buffer_flip() helper The igc driver implements the same page recycling scheme from other Intel drivers which reuses the page by flipping the buffer. The code to handle buffer flips is duplicated in many locations so introduce the igc_rx_buffer_flip() helper and use it where applicable. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 2f019ebd5330c38e3c28fc8d35cc0bce6f4ddfe4 Author: Andre Guedes Date: Tue Mar 9 23:13:15 2021 -0800 igc: Remove unused argument from igc_tx_cmd_type() The 'skb' argument from igc_tx_cmd_type() is not used so remove it. Signed-off-by: Andre Guedes Signed-off-by: Vedang Patel Signed-off-by: Jithu Joseph Reviewed-by: Maciej Fijalkowski Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit e488b1023a4a4eab15b905871cf8e81f00336ed7 Author: Paul Cercueil Date: Sat Mar 27 11:57:42 2021 +0000 drm/ingenic: Register devm action to cleanup encoders Since the encoders have been devm-allocated, they will be freed way before drm_mode_config_cleanup() is called. To avoid use-after-free conditions, we then must ensure that drm_encoder_cleanup() is called before the encoders are freed. v2: Use the new __drmm_simple_encoder_alloc() function v3: Use the new drmm_plain_simple_encoder_alloc() macro v4: Use drmm_plain_encoder_alloc() macro Fixes: c369cb27c267 ("drm/ingenic: Support multiple panels/bridges") Cc: # 5.8+ Signed-off-by: Paul Cercueil Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210327115742.18986-4-paul@crapouillou.net commit c7b04342b41d314433494fd56cd378fa544a630f Author: Paul Cercueil Date: Sat Mar 27 11:57:41 2021 +0000 drm/encoder: Add macro drmm_plain_encoder_alloc() This performs the same operation as drmm_encoder_alloc(), but only allocates and returns a struct drm_encoder instance. v4: Rename macro drmm_plain_encoder_alloc() and move to . Since it's not "simple" anymore it will now take funcs/name arguments as well. Signed-off-by: Paul Cercueil Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210327115742.18986-3-paul@crapouillou.net commit 4d906839d321c2efbf3fed4bc31ffd9ff55b75c0 Author: Paul Cercueil Date: Sat Mar 27 11:57:40 2021 +0000 drm: bridge/panel: Cleanup connector on bridge detach If we don't call drm_connector_cleanup() manually in panel_bridge_detach(), the connector will be cleaned up with the other DRM objects in the call to drm_mode_config_cleanup(). However, since our drm_connector is devm-allocated, by the time drm_mode_config_cleanup() will be called, our connector will be long gone. Therefore, the connector must be cleaned up when the bridge is detached to avoid use-after-free conditions. v2: Cleanup connector only if it was created v3: Add FIXME v4: (Use connector->dev) directly in if() block Fixes: 13dfc0540a57 ("drm/bridge: Refactor out the panel wrapper from the lvds-encoder bridge.") Cc: # 4.12+ Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Signed-off-by: Paul Cercueil Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210327115742.18986-2-paul@crapouillou.net commit b7a8f50a1437164607f73831075c06120aa1f3b3 Author: Hsin-Yi Wang Date: Wed Mar 24 15:08:42 2021 +0800 arm64: dts: mt8183: Add gce client reg for display subcomponents Add mediatek,gce-client-reg for mmsys, ccorr, aal, gamma, dither. Fixes: 91f9c963ce79 ("arm64: dts: mt8183: Add display nodes for MT8183") Signed-off-by: Hsin-Yi Wang Tested-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210324070842.1037233-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 31ec9c2746467a372b009940ce7b722055daaf6a Author: Ryder Lee Date: Thu Nov 5 04:58:33 2020 +0800 PCI: mediatek: Configure FC and FTS for functions other than 0 "PCI_FUNC(port->slot << 3)" is always 0, so previously mtk_pcie_startup_port() only configured FC credits and FTs for function 0. Compute "func" correctly so we also configure functions other than 0. This affects MT2701 and MT7623. Link: https://lore.kernel.org/r/c529dbfc066f4bda9b87edbdbf771f207e69b84e.1604510053.git.ryder.lee@mediatek.com Signed-off-by: Ryder Lee Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński commit d4c7c28806616809e3baa0b7cd8c665516b2726d Author: Niklas Söderlund Date: Thu Feb 11 14:43:18 2021 +0100 timekeeping: Allow runtime PM from change_clocksource() The struct clocksource callbacks enable() and disable() are described as a way to allow clock sources to enter a power save mode. See commit 4614e6adafa2 ("clocksource: add enable() and disable() callbacks") But using runtime PM from these callbacks triggers a cyclic lockdep warning when switching clock source using change_clocksource(). # echo e60f0000.timer > /sys/devices/system/clocksource/clocksource0/current_clocksource ====================================================== WARNING: possible circular locking dependency detected ------------------------------------------------------ migration/0/11 is trying to acquire lock: ffff0000403ed220 (&dev->power.lock){-...}-{2:2}, at: __pm_runtime_resume+0x40/0x74 but task is already holding lock: ffff8000113c8f88 (tk_core.seq.seqcount){----}-{0:0}, at: multi_cpu_stop+0xa4/0x190 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (tk_core.seq.seqcount){----}-{0:0}: ktime_get+0x28/0xa0 hrtimer_start_range_ns+0x210/0x2dc generic_sched_clock_init+0x70/0x88 sched_clock_init+0x40/0x64 start_kernel+0x494/0x524 -> #1 (hrtimer_bases.lock){-.-.}-{2:2}: hrtimer_start_range_ns+0x68/0x2dc rpm_suspend+0x308/0x5dc rpm_idle+0xc4/0x2a4 pm_runtime_work+0x98/0xc0 process_one_work+0x294/0x6f0 worker_thread+0x70/0x45c kthread+0x154/0x160 ret_from_fork+0x10/0x20 -> #0 (&dev->power.lock){-...}-{2:2}: _raw_spin_lock_irqsave+0x7c/0xc4 __pm_runtime_resume+0x40/0x74 sh_cmt_start+0x1c4/0x260 sh_cmt_clocksource_enable+0x28/0x50 change_clocksource+0x9c/0x160 multi_cpu_stop+0xa4/0x190 cpu_stopper_thread+0x90/0x154 smpboot_thread_fn+0x244/0x270 kthread+0x154/0x160 ret_from_fork+0x10/0x20 other info that might help us debug this: Chain exists of: &dev->power.lock --> hrtimer_bases.lock --> tk_core.seq.seqcount Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(tk_core.seq.seqcount); lock(hrtimer_bases.lock); lock(tk_core.seq.seqcount); lock(&dev->power.lock); *** DEADLOCK *** 2 locks held by migration/0/11: #0: ffff8000113c9278 (timekeeper_lock){-.-.}-{2:2}, at: change_clocksource+0x2c/0x160 #1: ffff8000113c8f88 (tk_core.seq.seqcount){----}-{0:0}, at: multi_cpu_stop+0xa4/0x190 Rework change_clocksource() so it enables the new clocksource and disables the old clocksource outside of the timekeeper_lock and seqcount write held region. There is no requirement that these callbacks are invoked from the lock held region. Signed-off-by: Niklas Söderlund Signed-off-by: Thomas Gleixner Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/20210211134318.323910-1-niklas.soderlund+renesas@ragnatech.se commit a51a327f3bcdcb1a37ed9325ad07e1456cd4d426 Author: Thomas Gleixner Date: Fri Mar 26 16:29:44 2021 +0100 locking/rtmutex: Clean up signal handling in __rt_mutex_slowlock() The signal handling in __rt_mutex_slowlock() is open coded. Use signal_pending_state() instead. Aside of the cleanup this also prepares for the RT lock substituions which require support for TASK_KILLABLE. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153944.533811987@linutronix.de commit c2c360ed7f28fd6b7eb7e39e70af2d2ae405f466 Author: Thomas Gleixner Date: Fri Mar 26 16:29:43 2021 +0100 locking/rtmutex: Restrict the trylock WARN_ON() to debug The warning as written is expensive and not really required for a production kernel. Make it depend on rt mutex debugging and use !in_task() for the condition which generates far better code and gives the same answer. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153944.436565064@linutronix.de commit 82cd5b1039e26b1b1254886464991e34de439ac5 Author: Thomas Gleixner Date: Fri Mar 26 16:29:42 2021 +0100 locking/rtmutex: Fix misleading comment in rt_mutex_postunlock() Preemption is disabled in mark_wakeup_next_waiter(,) not in rt_mutex_slowunlock(). Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153944.341734608@linutronix.de commit 70c80103aafdeae99126694bc1cd54de016bc258 Author: Thomas Gleixner Date: Fri Mar 26 16:29:41 2021 +0100 locking/rtmutex: Consolidate the fast/slowpath invocation The indirection via a function pointer (which is at least optimized into a tail call by the compiler) is making the code hard to read. Clean it up and move the futex related trylock functions down to the futex section. Move the wake_q wakeup into rt_mutex_slowunlock(). No point in handing it to the caller. The futex code uses a different function. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153944.247927548@linutronix.de commit d7a2edb890c0bfe467140c0cd79fe7cf65249376 Author: Thomas Gleixner Date: Fri Mar 26 16:29:40 2021 +0100 locking/rtmutex: Make text section and inlining consistent rtmutex is half __sched and the other half is not. If the compiler decides to not inline larger static functions then part of the code ends up in the regular text section. There are also quite some performance related small helpers which are either static or plain inline. Force inline those which make sense and mark the rest __sched. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153944.152977820@linutronix.de commit f41dcc18698e660668a33cde8ab965e0298ac341 Author: Thomas Gleixner Date: Fri Mar 26 16:29:39 2021 +0100 locking/rtmutex: Move debug functions as inlines into common header There is no value in having two header files providing just empty stubs and a C file which implements trivial debug functions which can just be inlined. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153944.052454464@linutronix.de commit f5a98866e506a816f6a855df1e7ed41e1891ec66 Author: Thomas Gleixner Date: Fri Mar 26 16:29:38 2021 +0100 locking/rtmutex: Decrapify __rt_mutex_init() The conditional debug handling is just another layer of obfuscation. Split the function so rt_mutex_init_proxy_locked() can invoke the inner init and __rt_mutex_init() gets the full treatment. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.955697588@linutronix.de commit 37350e3b2655eb0fce4e0e6ce8ce631c781136fe Author: Thomas Gleixner Date: Fri Mar 26 16:29:37 2021 +0100 locking/rtmutex: Remove pointless CONFIG_RT_MUTEXES=n stubs None of these functions are used when CONFIG_RT_MUTEXES=n. Remove the gunk. Remove pointless comments and clean up the coding style mess while at it. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.863379182@linutronix.de commit f7efc4799f8114ba85b68584f83293f435009de4 Author: Thomas Gleixner Date: Fri Mar 26 16:29:36 2021 +0100 locking/rtmutex: Inline chainwalk depth check There is no point for this wrapper at all. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.754254046@linutronix.de commit fae37feee096bd3c85f6453713131a471404c6f5 Author: Thomas Gleixner Date: Fri Mar 26 16:29:35 2021 +0100 locking/rtmutex: Move rt_mutex_debug_task_free() to rtmutex.c Prepare for removing the header maze. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.646359691@linutronix.de commit 8188d74e68174b11ff7c4a635ffc8fd31eacc6b9 Author: Thomas Gleixner Date: Fri Mar 26 16:29:34 2021 +0100 locking/rtmutex: Remove empty and unused debug stubs No users or useless and therefore just ballast. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.549192485@linutronix.de commit 199cacd1a625cfc499d624b98b10dc763062f7dd Author: Sebastian Andrzej Siewior Date: Fri Mar 26 16:29:33 2021 +0100 locking/rtmutex: Consolidate rt_mutex_init() rt_mutex_init() only initializes lockdep if CONFIG_DEBUG_RT_MUTEXES is enabled, which is fine because all lockdep variants select it, but there is no reason to do so. Move the function outside of the CONFIG_DEBUG_RT_MUTEXES block which removes #ifdeffery. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.437405350@linutronix.de commit 6d41c675a5394057f6fb1dc97cc0a0e360f2c2f8 Author: Sebastian Andrzej Siewior Date: Fri Mar 26 16:29:32 2021 +0100 locking/rtmutex: Remove output from deadlock detector The rtmutex specific deadlock detector predates lockdep coverage of rtmutex and since commit f5694788ad8da ("rt_mutex: Add lockdep annotations") it contains a lot of redundant functionality: - lockdep will detect an potential deadlock before rtmutex-debug has a chance to do so - the deadlock debugging is restricted to rtmutexes which are not associated to futexes and have an active waiter, which is covered by lockdep already Remove the redundant functionality and move actual deadlock WARN() into the deadlock code path. The latter needs a seperate cleanup. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.320398604@linutronix.de commit 2d445c3e4a8216cfa9703998124c13250cc13e5e Author: Sebastian Andrzej Siewior Date: Fri Mar 26 16:29:31 2021 +0100 locking/rtmutex: Remove rtmutex deadlock tester leftovers The following debug members of 'struct rtmutex' are unused: - save_state: No users - file,line: Printed if ::name is NULL. This is only used for non-futex locks so ::name is never NULL - magic: Assigned to NULL by rt_mutex_destroy(), no further usage Remove them along with unused inline and macro leftovers related to the long gone deadlock tester. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.195064296@linutronix.de commit c15380b72d7ae821ee090ba5a56fc6310828dbda Author: Sebastian Andrzej Siewior Date: Fri Mar 26 16:29:30 2021 +0100 locking/rtmutex: Remove rt_mutex_timed_lock() rt_mutex_timed_lock() has no callers since: c051b21f71d1f ("rtmutex: Confine deadlock logic to futex") Remove it. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210326153943.061103415@linutronix.de commit feecb81732d8f271440d907beb082425e109f877 Merge: bd9a5fc2edb0b a5e13c6df0e41 Author: Ingo Molnar Date: Mon Mar 29 15:56:48 2021 +0200 Merge tag 'v5.12-rc5' into locking/core, to pick up fixes Signed-off-by: Ingo Molnar commit 617ab489aaff0dbd6ee1530fc207300950359a32 Author: Chunfeng Yun Date: Tue Mar 16 17:22:32 2021 +0800 arm: dts: mt2701: harmonize node names and compatibles This is used to fix dtbs_check warning Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-13-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit d0ec64bd6766bb73eb2d2dc1c78614595d23639d Author: Chunfeng Yun Date: Tue Mar 16 17:22:31 2021 +0800 arm: dts: mt7623: harmonize node names and compatibles This is used to fix dtbs_check warning Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-12-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit 28acbc773c33064ed4a1bf4bcd3fab3b37e4f1d0 Author: Chunfeng Yun Date: Tue Mar 16 17:22:30 2021 +0800 arm: dts: mt7629: harmonize node names and compatibles This is used to fix dtbs_check warning Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-11-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit d1c9c70a88232104aa8686e3cb7742e5260a3062 Author: Chunfeng Yun Date: Tue Mar 16 17:22:29 2021 +0800 arm64: dts: mediatek: mt8183: fix dtbs_check warning Harmonize node names, compatibles and properties. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-10-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit 6029cae696c8344f3fcfe9f0f76f736bc415af03 Author: Chunfeng Yun Date: Tue Mar 16 17:22:28 2021 +0800 arm64: dts: mediatek: mt7622: harmonize node names and compatibles This is used to fix dtbs_check warning Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-9-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit 86c5ed12cf729abda5a9166cc32abd0a7208cd1f Author: Chunfeng Yun Date: Tue Mar 16 17:22:27 2021 +0800 arm64: dts: mediatek: mt8516: harmonize node names and compatibles This is used to fix dtbs_check warning: harmonize node names and compatibles; add property "usb-role-switch" for connector dependence. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-8-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit 357c5f717ea4e35c11eb1f0e948e2ea2662d1ce0 Author: Chunfeng Yun Date: Tue Mar 16 17:22:26 2021 +0800 arm64: dts: mediatek: mt2712: harmonize node names This is used to fix dtbs_check warning. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-7-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit c61872d5cc44510c1b4dd3955d7d34d96a4d3e8a Author: Chunfeng Yun Date: Tue Mar 16 17:22:25 2021 +0800 arm64: dts: mediatek: mt8173: fix dtbs_check warning Harmonize nodes names, compatibles and remove unused property. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-6-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit e4e5d030bd779fb8321d3b8bd65406fbe0827037 Author: Chunfeng Yun Date: Tue Mar 16 17:22:24 2021 +0800 arm64: dts: mt8173: fix property typo of 'phys' in dsi node Use 'phys' instead of 'phy'. Fixes: 81ad4dbaf7af ("arm64: dts: mt8173: Add display subsystem related nodes") Signed-off-by: Chunfeng Yun Reviewed-by: Chun-Kuang Hu Cc: stable Link: https://lore.kernel.org/r/20210316092232.9806-5-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit b0a752d43b1566451332bcb5b52b9694dfe7896c Merge: 50fa3a531e8e4 a5e13c6df0e41 Author: Arnaldo Carvalho de Melo Date: Mon Mar 29 10:39:10 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up fixes sent via perf/urgent and in the BPF tools/ directories. Signed-off-by: Arnaldo Carvalho de Melo commit 80755855f808c27c7154937667436f30e47bc820 Author: Shixin Liu Date: Mon Mar 29 17:53:49 2021 +0800 mtip32xx: use LIST_HEAD() for list_head There's no need to declare a list and then init it manually, just use the LIST_HEAD() macro. Signed-off-by: Shixin Liu Link: https://lore.kernel.org/r/20210329095349.4170870-2-liushixin2@huawei.com Signed-off-by: Jens Axboe commit acf8aec3501cac6fd67e2653267ed61a22617c37 Author: Shixin Liu Date: Mon Mar 29 17:53:48 2021 +0800 mtip32xx: use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: Shixin Liu Link: https://lore.kernel.org/r/20210329095349.4170870-1-liushixin2@huawei.com Signed-off-by: Jens Axboe commit 0f00b82e5413571ed225ddbccad6882d7ea60bc7 Author: Christoph Hellwig Date: Mon Mar 8 08:45:50 2021 +0100 block: remove the revalidate_disk method No implementations left. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210308074550.422714-4-hch@lst.de Signed-off-by: Jens Axboe commit 4bae7afdd789baedbc0b82a4b9ef51501dd7d4fe Author: Christoph Hellwig Date: Mon Mar 8 08:45:48 2021 +0100 paride/pd: remove ->revalidate_disk ->revalidate_disk is only called during add_disk for pd, but at that point the driver has already set the capacity to the one returned from Identify a little earlier, so this additional update is entirely superflous. Signed-off-by: Christoph Hellwig Link: https://lore.kernel.org/r/20210308074550.422714-2-hch@lst.de Signed-off-by: Jens Axboe commit 3e55bb6f2ac0bbd7ab8e5bde7b4f8b574afe2c52 Author: Lucas Stankus Date: Sun Mar 28 18:46:46 2021 -0300 iio: adc: ad7923: register device with devm_iio_device_register Registers the device using the devm variant. This is the final step of converting the ad7923 to only use devm routines, meaning that the ad7923_remove() function is no longer needed to release resources on device detach. Signed-off-by: Lucas Stankus Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/b0146465d52f4e259f5f95c83c71e72f065093da.1616966903.git.lucas.p.stankus@gmail.com Signed-off-by: Jonathan Cameron commit 5644dc0a75674df197241b481f1dbfb874739b5a Author: Jani Nikula Date: Fri Mar 26 15:21:38 2021 +0200 drm/i915: rename i915_rev_steppings->intel_step_info Matter of taste. Match the prefix for everything else related to steppings. No functional changes. Reviewed-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/d3ba7c448e596fd2425a29bcc7ea8493505a30f9.1616764798.git.jani.nikula@intel.com commit 26475ca95889fc307301edc2ba977ee26a4d5d7a Author: Jani Nikula Date: Fri Mar 26 15:21:37 2021 +0200 drm/i915: rename disp_stepping->display_step and gt_stepping->gt_step Matter of taste. Step matches the enums. Reviewed-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/1724c8bde0e0f596240437d72ace60b9c34ae9db.1616764798.git.jani.nikula@intel.com commit cd0fcf5af791315b912d0ec70604dc74026abd24 Author: Jani Nikula Date: Fri Mar 26 15:21:36 2021 +0200 drm/i915: rename DISP_STEPPING->DISPLAY_STEP and GT_STEPPING->GT_STEP Matter of taste. STEP matches the enums. Reviewed-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/cf2dccd1c9c7fdcf5de08ea10a9265292b45d8c7.1616764798.git.jani.nikula@intel.com commit 34b7e27b88e546174638d6ec919d378012f731f2 Author: Jani Nikula Date: Fri Mar 26 15:21:35 2021 +0200 drm/i915: switch TGL and ADL to the new stepping scheme This changes the way revids not present in the array are handled: - For gaps in the array, the next present revid is used. - For revids beyond the array, the new STEP_FUTURE is used instead of the last revid in the array. In both cases, we'll get debug logging of what's going on. v2: Rename stepping->step Reviewed-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/756fe3d75b1e91ef812fc1fd3f70337e9c571d91.1616764798.git.jani.nikula@intel.com commit ef47b7ab1faa6d32af351690e0bf664f6c6721b8 Author: Jani Nikula Date: Fri Mar 26 15:21:34 2021 +0200 drm/i915: switch KBL to the new stepping scheme Add new symbolic names for revision ids, and convert KBL revids to use them via the new stepping check macros. This also fixes theoretical out of bounds access to kbl_revids array. v3: upgrade dbg to warn on unknown revid (José) v2: Rename stepping->step Reviewed-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/79b6c48211c6b214165391d350d556bad748f747.1616764798.git.jani.nikula@intel.com commit 439c8dccb6a7f74bf6b3721fa509ab202c66f899 Author: Jani Nikula Date: Fri Mar 26 15:21:33 2021 +0200 drm/i915: add new helpers for accessing stepping info Add new runtime info field for stepping. Add new helpers for accessing them. As we'll be switching platforms over to the new scheme incrementally, check for non-initialized steppings. In case a platform does not have separate display and gt steppings, it's okay to use a common shorthand. However, in this case the display stepping must not be initialized, and gt stepping is the single point of truth. v3: Remove IS_STEP() (José) v2: Rename stepping->step Reviewed-by: José Roberto de Souza Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/bb4275733fa390ea3dbf6f62794d55b616665230.1616764798.git.jani.nikula@intel.com commit 7eb186bbe9f30e17cfdadf18ed012aefcbb70d6e Author: Jani Nikula Date: Fri Mar 26 15:21:32 2021 +0200 drm/i915: split out stepping info to a new file gt/intel_workarounds.c is decidedly the wrong place for handling stepping info. Add new intel_step.[ch] for the data, and move the stepping arrays there. No functional changes. v2: Rename stepping->step Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/f69baf82819a8a35815fca25a520de5c38a7e1b5.1616764798.git.jani.nikula@intel.com commit 13225a5c7b1c3680068722b53d85b51722b09b80 Author: Seiya Wang Date: Fri Mar 19 10:34:25 2021 +0800 dt-bindings: arm: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation for the Mediatek MT8195 reference board. Signed-off-by: Seiya Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319023427.16711-8-seiya.wang@mediatek.com Signed-off-by: Matthias Brugger commit 8c7713c00488bf3ac067db3e9a203e8d1ef3613b Author: Seiya Wang Date: Fri Mar 19 10:34:21 2021 +0800 dt-bindings: serial: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of uart for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20210319023427.16711-4-seiya.wang@mediatek.com Signed-off-by: Matthias Brugger commit ac75c32e821b7f4fbfbe44b502c1d86498809301 Author: Seiya Wang Date: Fri Mar 19 10:34:20 2021 +0800 dt-bindings: timer: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of timer for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319023427.16711-3-seiya.wang@mediatek.com Signed-off-by: Matthias Brugger commit 124d64392de21db356a30051bb2f9d167a111f06 Author: Hsin-Yi Wang Date: Fri Mar 19 11:52:45 2021 +0800 arm64: dts: mt8183: Add kukui-jacuzzi-juniper board Juniper is known as Acer Chromebook Spin 311 (CP311-3H). Signed-off-by: Hsin-Yi Wang Tested-by: Ricardo Cañuelo Link: https://lore.kernel.org/r/20210319035245.2751911-4-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit cabc71b08eb597c53e6c6a988027df4b5a6903de Author: Hsin-Yi Wang Date: Fri Mar 19 11:52:44 2021 +0800 arm64: dts: mt8183: Add kukui-jacuzzi-damu board Damu is known as ASUS Chromebook Flip CM3. Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210319035245.2751911-3-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit c60dd29e2d11ee99fbfd27804e2d696de409c82f Author: Hsin-Yi Wang Date: Fri Mar 19 11:52:43 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-juniper mt8183-kukui-jacuzzi-juniper board also known as Acer Chromebook Spin 311, using mediatek mt8183 SoC. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319035245.2751911-2-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit 02e744a11a014db4666aea5488a5754e332b84c4 Author: Hsin-Yi Wang Date: Fri Mar 19 11:52:42 2021 +0800 dt-bindings: arm64: dts: mediatek: Add mt8183-kukui-jacuzzi-damu mt8183-kukui-jacuzzi-damu board also known as ASUS Chromebook Flip CM3, using mediatek mt8183 SoC. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319035245.2751911-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit a4e5eed2c6a689ef2b6ad8d7ae86665c69039379 Author: Tian Tao Date: Mon Mar 15 19:49:37 2021 +0800 drm/exynos: move to use request_irq by IRQF_NO_AUTOEN flag After this patch cbe16f35bee68 genirq: Add IRQF_NO_AUTOEN for request_irq/nmi() is merged. request_irq() after setting IRQ_NOAUTOEN as below irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can be replaced by request_irq() with IRQF_NO_AUTOEN flag. v2: Fix the problem of using wrong flags Signed-off-by: Tian Tao Signed-off-by: Inki Dae commit 99e5730dd2b11fedc890bbc9c803f69aad24e3ca Merge: fe8a057839fc4 cbe16f35bee68 Author: Inki Dae Date: Mon Mar 29 20:35:13 2021 +0900 Merge tag 'irq-no-autoen-2021-03-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into exynos-drm-next Tag for the input subsystem to pick up commit acc3042d62cb92c3776767f09f665511c903ef2d Author: Lecopzer Chen Date: Wed Mar 24 12:05:22 2021 +0800 arm64: Kconfig: select KASAN_VMALLOC if KANSAN_GENERIC is enabled Before this patch, someone who wants to use VMAP_STACK when KASAN_GENERIC enabled must explicitly select KASAN_VMALLOC. >From Will's suggestion [1]: > I would _really_ like to move to VMAP stack unconditionally, and > that would effectively force KASAN_VMALLOC to be set if KASAN is in use Because VMAP_STACK now depends on either HW_TAGS or KASAN_VMALLOC if KASAN enabled, in order to make VMAP_STACK selected unconditionally, we bind KANSAN_GENERIC and KASAN_VMALLOC together. Note that SW_TAGS supports neither VMAP_STACK nor KASAN_VMALLOC now, so this is the first step to make VMAP_STACK selected unconditionally. Bind KANSAN_GENERIC and KASAN_VMALLOC together is supposed to cost more memory at runtime, thus the alternative is using SW_TAGS KASAN instead. [1]: https://lore.kernel.org/lkml/20210204150100.GE20815@willie-the-truck/ Suggested-by: Will Deacon Signed-off-by: Lecopzer Chen Link: https://lore.kernel.org/r/20210324040522.15548-6-lecopzer.chen@mediatek.com Signed-off-by: Catalin Marinas commit 31d02e7ab00873befd2cfb6e44581490d947c38b Author: Lecopzer Chen Date: Wed Mar 24 12:05:21 2021 +0800 arm64: kaslr: support randomized module area with KASAN_VMALLOC After KASAN_VMALLOC works in arm64, we can randomize module region into vmalloc area now. Test: VMALLOC area ffffffc010000000 fffffffdf0000000 before the patch: module_alloc_base/end ffffffc008b80000 ffffffc010000000 after the patch: module_alloc_base/end ffffffdcf4bed000 ffffffc010000000 And the function that insmod some modules is fine. Suggested-by: Ard Biesheuvel Signed-off-by: Lecopzer Chen Link: https://lore.kernel.org/r/20210324040522.15548-5-lecopzer.chen@mediatek.com Signed-off-by: Catalin Marinas commit 71b613fc0c69080262f4ebe810c3d909d7ff8132 Author: Lecopzer Chen Date: Wed Mar 24 12:05:20 2021 +0800 arm64: Kconfig: support CONFIG_KASAN_VMALLOC We can backed shadow memory in vmalloc area after vmalloc area isn't populated at kasan_init(), thus make KASAN_VMALLOC selectable. Signed-off-by: Lecopzer Chen Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Tested-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210324040522.15548-4-lecopzer.chen@mediatek.com Signed-off-by: Catalin Marinas commit 7d7b88ff5f8fd79a72baacc521407a3101f0ffae Author: Lecopzer Chen Date: Wed Mar 24 12:05:19 2021 +0800 arm64: kasan: abstract _text and _end to KERNEL_START/END Arm64 provides defined macro for KERNEL_START and KERNEL_END, thus replace them by the abstration instead of using _text and _end. Signed-off-by: Lecopzer Chen Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Tested-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210324040522.15548-3-lecopzer.chen@mediatek.com Signed-off-by: Catalin Marinas commit 9a0732efa77418fc85b1bdc5ddee619e62f59545 Author: Lecopzer Chen Date: Wed Mar 24 12:05:18 2021 +0800 arm64: kasan: don't populate vmalloc area for CONFIG_KASAN_VMALLOC Linux support KAsan for VMALLOC since commit 3c5c3cfb9ef4da9 ("kasan: support backing vmalloc space with real shadow memory") Like how the MODULES_VADDR does now, just not to early populate the VMALLOC_START between VMALLOC_END. Before: MODULE_VADDR: no mapping, no zero shadow at init VMALLOC_VADDR: backed with zero shadow at init After: MODULE_VADDR: no mapping, no zero shadow at init VMALLOC_VADDR: no mapping, no zero shadow at init Thus the mapping will get allocated on demand by the core function of KASAN_VMALLOC. ----------- vmalloc_shadow_start | | | | | | <= non-mapping | | | | |-----------| |///////////|<- kimage shadow with page table mapping. |-----------| | | | | <= non-mapping | | ------------- vmalloc_shadow_end |00000000000| |00000000000| <= Zero shadow |00000000000| ------------- KASAN_SHADOW_END Signed-off-by: Lecopzer Chen Acked-by: Andrey Konovalov Tested-by: Andrey Konovalov Tested-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210324040522.15548-2-lecopzer.chen@mediatek.com [catalin.marinas@arm.com: add a build check on VMALLOC_START != MODULES_END] Signed-off-by: Catalin Marinas commit d3cbc7f82caa9bebe058c7e2947405af39eb7ea6 Author: Chunfeng Yun Date: Tue Mar 23 15:02:55 2021 +0800 arm64: dts: mt8183: update wakeup register offset Use wakeup control register offset exactly, and update revision number Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-13-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Matthias Brugger commit 075dff3367efff3c11467401d809e684dd63016e Author: Lucas Stankus Date: Sun Mar 28 18:46:26 2021 -0300 iio: adc: ad7923: use device-managed function for triggered buffer Converts the iio_triggered_buffer_setup() call to its device-managed counterpart. With this, the error handling routine in the ad7923_probe() function becomes unnecessary as well as the iio_triggered_buffer_cleanup() call. Signed-off-by: Lucas Stankus Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/fe46a45caaa788f333d78367968272de728f4a6e.1616966903.git.lucas.p.stankus@gmail.com Signed-off-by: Jonathan Cameron commit 44fc4de9bd61ca2c7f5215df5321457af3bece24 Author: Lucas Stankus Date: Sun Mar 28 18:46:04 2021 -0300 iio: adc: ad7923: use devm_add_action_or_reset for regulator disable Adds a device-managed action to handle disabling the driver's regulator on device detach. This slightly simplifies deinitialization and enables further conversion of the driver to device-managed routines without breaking the init order. Signed-off-by: Lucas Stankus Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/49a7c0436ca1186313dbccf3d810d0cf38cb5b37.1616966903.git.lucas.p.stankus@gmail.com Signed-off-by: Jonathan Cameron commit 33121347fb1c359bd6e3e680b9f2c6ced5734a81 Author: Jessica Yu Date: Tue Mar 23 13:15:41 2021 +0100 module: treat exit sections the same as init sections when !CONFIG_MODULE_UNLOAD Dynamic code patching (alternatives, jump_label and static_call) can have sites in __exit code, even it __exit is never executed. Therefore __exit must be present at runtime, at least for as long as __init code is. Additionally, for jump_label and static_call, the __exit sites must also identify as within_module_init(), such that the infrastructure is aware to never touch them after module init -- alternatives are only ran once at init and hence don't have this particular constraint. By making __exit identify as __init for MODULE_UNLOAD, the above is satisfied. So, when !CONFIG_MODULE_UNLOAD, the section ordering should look like the following, with the .exit sections moved to the init region of the module. Core section allocation order: .text .rodata __ksymtab_gpl __ksymtab_strings .note.* sections .bss .data .gnu.linkonce.this_module Init section allocation order: .init.text .exit.text .symtab .strtab [jeyu: thanks to Peter Zijlstra for most of changelog] Link: https://lore.kernel.org/lkml/YFiuphGw0RKehWsQ@gunter/ Link: https://lore.kernel.org/r/20210323142756.11443-1-jeyu@kernel.org Acked-by: Peter Zijlstra (Intel) Signed-off-by: Jessica Yu commit abfdfd144357e6f555db234f6a64498423a4322a Author: Bhaskar Chowdhury Date: Tue Mar 23 06:52:15 2021 +0530 iio: dac: Rudimentary typo fix s/concurent/concurrent/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210323012215.451075-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Cameron commit d28039fccf948a407de69106465caa465b1dcf32 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:23 2021 +0100 pinctrl: add a pincontrol driver for BCM6318 Add a pincontrol driver for BCM6318. BCM6318 allows muxing most GPIOs to different functions. BCM6318 is similar to BCM6328 with the addition of a pad register, and the GPIO meaning of the mux register changes based on the GPIO number. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210324081923.20379-23-noltari@gmail.com Signed-off-by: Linus Walleij commit b6d46b9454742a25f9d923be072869e40b2ecebb Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:22 2021 +0100 dt-bindings: add BCM6318 GPIO sysctl binding documentation Add binding documentation for the GPIO sysctl found in BCM6318 SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-22-noltari@gmail.com Signed-off-by: Linus Walleij commit b2f215141b985d5d39ed16fe7e2089d5aa162302 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:21 2021 +0100 dt-bindings: add BCM6318 pincontroller binding documentation Add binding documentation for the pincontrol core found in BCM6318 SoCs. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-21-noltari@gmail.com Signed-off-by: Linus Walleij commit 155cca1b0794a8f541e7eaa45be70df0a49964f3 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:20 2021 +0100 pinctrl: add a pincontrol driver for BCM63268 Add a pincontrol driver for BCM63268. BCM63268 allows muxing GPIOs to different functions. Depending on the mux, these are either single pin configurations or whole pin groups. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210324081923.20379-20-noltari@gmail.com Signed-off-by: Linus Walleij commit ff8324355d7ae2e4ebbd304de27bb5fa75e20c6a Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:19 2021 +0100 dt-bindings: add BCM63268 GPIO sysctl binding documentation Add binding documentation for the GPIO sysctl found in BCM63268 SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-19-noltari@gmail.com Signed-off-by: Linus Walleij commit 9b3303413379af8bed307cd465fe7aa1bc3569ea Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:18 2021 +0100 dt-bindings: add BCM63268 pincontroller binding documentation Add binding documentation for the pincontrol core found in the BCM63268 family SoCs. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-18-noltari@gmail.com Signed-off-by: Linus Walleij commit 50554accf7a79980cd04481e8903073bdb706daf Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:17 2021 +0100 pinctrl: add a pincontrol driver for BCM6368 Add a pincontrol driver for BCM6368. BCM6368 allows muxing the first 32 GPIOs onto alternative functions. Not all are documented. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210324081923.20379-17-noltari@gmail.com Signed-off-by: Linus Walleij commit fd22635f222f44dcb4dd6382d97de13144edad2b Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:16 2021 +0100 dt-bindings: add BCM6368 GPIO sysctl binding documentation Add binding documentation for the GPIO sysctl found in BCM6368 SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-16-noltari@gmail.com Signed-off-by: Linus Walleij commit 9fbf8303796c89ecab026eb3dbadae7f98c49922 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:15 2021 +0100 dt-bindings: add BCM6368 pincontroller binding documentation Add binding documentation for the pincontrol core found in BCM6368 SoCs. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-15-noltari@gmail.com Signed-off-by: Linus Walleij commit 705791e23ecd93d6c2697234fdf0c22b499c0a5b Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:14 2021 +0100 pinctrl: add a pincontrol driver for BCM6362 Add a pincotrol driver for BCM6362. BCM6362 allows muxing individual GPIO pins to the LED controller, to be available by the integrated wifi, or other functions. It also supports overlay groups, of which only NAND is documented. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210324081923.20379-14-noltari@gmail.com Signed-off-by: Linus Walleij commit 7ca989eafbd6ce1c216a775556c4893baab1959b Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:13 2021 +0100 dt-bindings: add BCM6362 GPIO sysctl binding documentation Add binding documentation for the GPIO sysctl found in BCM6362 SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-13-noltari@gmail.com Signed-off-by: Linus Walleij commit 6e4b5e1fc77513359989112e002e08553d0d8d5c Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:12 2021 +0100 dt-bindings: add BCM6362 pincontroller binding documentation Add binding documentation for the pincontrol core found in BCM6362 SoCs. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-12-noltari@gmail.com Signed-off-by: Linus Walleij commit 9494b16976e1ae3afc643abf638a25f2ce4c3f2b Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:11 2021 +0100 pinctrl: add a pincontrol driver for BCM6358 Add a pincotrol driver for BCM6358. BCM6358 allow overlaying different functions onto the GPIO pins. It does not support configuring individual pins but only whole groups. These groups may overlap, and still require the directions to be set correctly in the GPIO register. In addition the functions register controls other, not directly mux related functions. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210324081923.20379-11-noltari@gmail.com Signed-off-by: Linus Walleij commit cfb1b98bc8d5ffd813428cb03c63b54cf63dd785 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:10 2021 +0100 dt-bindings: add BCM6358 GPIO sysctl binding documentation Add binding documentation for the GPIO sysctl found in BCM6358 SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-10-noltari@gmail.com Signed-off-by: Linus Walleij commit 6d591614bfe881bb7664c9bebb6a48231c059411 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:09 2021 +0100 dt-bindings: add BCM6358 pincontroller binding documentation Add binding documentation for the pincontrol core found in BCM6358 SoCs. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-9-noltari@gmail.com Signed-off-by: Linus Walleij commit 9bf34ac5ab5805f0a798d40423c05596b7a0cee6 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:08 2021 +0100 pinctrl: add a pincontrol driver for BCM6328 Add a pincontrol driver for BCM6328. BCM6328 supports muxing 32 pins as GPIOs, as LEDs for the integrated LED controller, or various other functions. Its pincontrol mux registers also control other aspects, like switching the second USB port between host and device mode. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210324081923.20379-8-noltari@gmail.com Signed-off-by: Linus Walleij commit 7f9dfaa2afb6bc3481e531c405b05acf6091af29 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:07 2021 +0100 dt-bindings: add BCM6328 GPIO sysctl binding documentation Add binding documentation for the GPIO sysctl found in BCM6328 SoCs. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-7-noltari@gmail.com Signed-off-by: Linus Walleij commit 44dbcd8eb08a0febbb46ac7b9331f28a320bdf9a Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:06 2021 +0100 dt-bindings: add BCM6328 pincontroller binding documentation Add binding documentation for the pincontrol core found in BCM6328 SoCs. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-6-noltari@gmail.com Signed-off-by: Linus Walleij commit 132f95016db0a0a0659e99b471a7d3fd0c60f961 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:05 2021 +0100 pinctrl: bcm: add bcm63xx base code Add a helper for registering BCM63XX pin controllers. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210324081923.20379-5-noltari@gmail.com Signed-off-by: Linus Walleij commit fb9da17bd26552f48cda4f2f658379e7f5860691 Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:04 2021 +0100 dt-bindings: improve BCM6345 GPIO binding documentation Convert existing BCM6345 GPIO binding documentation to YAML and add binding documentation for the GPIO controller found in BCM6318, BCM6328, BCM6358, BCM6362, BCM6368 and BCM63268 SoCs. Co-developed-by: Jonas Gorski Signed-off-by: Jonas Gorski Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210324081923.20379-4-noltari@gmail.com Signed-off-by: Linus Walleij commit d46bf9ec4596654f36245e3b14765bcb422be6ad Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:03 2021 +0100 gpio: regmap: set gpio_chip of_node This is needed for properly registering GPIO regmap as a child of a regmap pin controller. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Michael Walle Reviewed-by: Andy Shevchenko Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20210324081923.20379-3-noltari@gmail.com Signed-off-by: Linus Walleij commit 9c7d24693d864f90b27aad5d15fbfe226c02898b Author: Álvaro Fernández Rojas Date: Wed Mar 24 09:19:02 2021 +0100 gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP The current code doesn't check if GPIOLIB_IRQCHIP is enabled, which results in a compilation error when trying to build gpio-regmap if CONFIG_GPIOLIB_IRQCHIP isn't enabled. Fixes: 6a45b0e2589f ("gpiolib: Introduce gpiochip_irqchip_add_domain()") Suggested-by: Michael Walle Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Linus Walleij Reviewed-by: Michael Walle Acked-by: Bartosz Golaszewski Link: https://lore.kernel.org/r/20210324081923.20379-2-noltari@gmail.com Signed-off-by: Linus Walleij commit 454c219f5d8452eff87b701735ae1224f4410356 Author: Linus Walleij Date: Mon Mar 22 14:24:08 2021 +0100 iio: imu: inv_mpu6050: Use as standalone trigger It may happen that the MPU6050 is the only hardware trigger available on your system such as this: > lsiio Device 003: hscdtd008a Device 001: mpu6050 Device 002: gp2ap002 Device 000: ab8500-gpadc Trigger 000: mpu6050-dev1 And when you want to use it to read periodically from your magnetometer like this: > iio_generic_buffer -a -c 100 -n hscdtd008a -t mpu6050-dev1 Then the following happens: [ 209.951334] Internal error: Oops: 5 [#1] SMP ARM (...) [ 209.981969] Hardware name: ST-Ericsson Ux5x0 platform (Device Tree Support) [ 209.988925] PC is at inv_scan_query_mpu6050+0x8/0xb8 [ 209.993914] LR is at inv_mpu6050_set_enable+0x40/0x194 This is because since we are not using any channels from the same device, the indio_dev->active_scan_mask is NULL. Just checking for that and bailing out is however not enough: we have to enable some kind of FIFO for the readout to work. So enable the temperature as a dummy FIFO and all works fine. Not suitable for backporting to stable. It is an odd corner case and does not represent a regression. Fixes: 09a642b78523 ("Invensense MPU6050 Device Driver.") Cc: Jean-Baptiste Maneyrol Signed-off-by: Linus Walleij Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20210322132408.1003443-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 4e102429f3dc62dce546f6107e34a4284634196d Author: Jonathan Cameron Date: Sun Mar 21 18:29:56 2021 +0000 iio:accel:adis16201: Fix wrong axis assignment that prevents loading Whilst running some basic tests as part of writing up the dt-bindings for this driver (to follow), it became clear it doesn't actually load currently. iio iio:device1: tried to double register : in_incli_x_index adis16201 spi0.0: Failed to create buffer sysfs interfaces adis16201: probe of spi0.0 failed with error -16 Looks like a cut and paste / update bug. Fixes tag obviously not accurate but we don't want to bother carry thing back to before the driver moved out of staging. Fixes: 591298e54cea ("Staging: iio: accel: adis16201: Move adis16201 driver out of staging") Signed-off-by: Jonathan Cameron Cc: Cc: Himanshu Jha Cc: Nuno Sá Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210321182956.844652-1-jic23@kernel.org commit f46ac009780cb5ab2a0c85884fcc5f5bba7ee08e Author: Lars-Peter Clausen Date: Sat Mar 20 08:14:05 2021 +0100 iio: dac: Convert powerdown read callbacks to sysfs_emit() Update DAC drivers powerdown attribute show callback to use the new sysfs_emit() function. sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in sanity checks. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210320071405.9347-5-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 6b92ba0a3057787b52555cd81a661e9499f644f3 Author: Lars-Peter Clausen Date: Sat Mar 20 08:14:04 2021 +0100 iio: __iio_format_value(): Convert to sysfs_emit_at() sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in sanity checks. Convert __iio_format_value() and related functions to use this new interface. This conversion involves changing the signature of __iio_format_value() so that it similar to sysfs_emit_at() and takes the buffers start address and an offset where to write within the buffer. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210320071405.9347-4-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 0207483b22d0df9af94b7b5c63f7ff6a49925fce Author: Lars-Peter Clausen Date: Sat Mar 20 08:14:03 2021 +0100 iio: iio_enum_available_read(): Convert to sysfs_emit_at() sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in sanity checks. Convert the iio_enum_available_read() function to use sysfs_emit_at() instead of scnprintf(). The conversion is straight forward, the only difference is that sysfs_emit_at() takes the buffers start address and an offset as parameters and already knows about the buffer's size limit. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210320071405.9347-3-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 83ca56b663cf3116c4a5535b4eb6eccb82113828 Author: Lars-Peter Clausen Date: Sat Mar 20 08:14:02 2021 +0100 iio: core: Use sysfs_emit() (trivial bits) sysfs_emit() is preferred over raw s*printf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in sanity checks. This patch converts the places in the iio core that follow the pattern of return s*printf(...) to return sysfs_emit(...) Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210320071405.9347-2-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 7b2d92a3c8e5e8a7ef2710a928a1011bcebc2b91 Author: Guoqing Chi Date: Mon Mar 22 09:30:24 2021 +0800 iio:imu:mpu6050: Modify matricies to matrices The plural of "matrix" is "matrices". Signed-off-by: Guoqing Chi Acked-by: Randy Dunlap Acked-by: Jean-Baptiste Maneyrol Link: https://lore.kernel.org/r/20210322013024.1849-1-chi962464zy@163.com Signed-off-by: Jonathan Cameron commit 14373711dd54be8a84e2f4f624bc58787f80cfbd Author: Gao Xiang Date: Mon Mar 29 18:00:12 2021 +0800 erofs: add on-disk compression configurations Add a bitmap for available compression algorithms and a variable-sized on-disk table for compression options in preparation for upcoming big pcluster and LZMA algorithm, which follows the end of super block. To parse the compression options, the bitmap is scanned one by one. For each available algorithm, there is data followed by 2-byte `length' correspondingly (it's enough for most cases, or entire fs blocks should be used.) With such available algorithm bitmap, kernel itself can also refuse to mount such filesystem if any unsupported compression algorithm exists. Note that COMPR_CFGS feature will be enabled with BIG_PCLUSTER. Link: https://lore.kernel.org/r/20210329100012.12980-1-hsiangkao@aol.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit a52ef778ff28d0782172e4e0b99aeda7bd97dd21 Author: Chen Lifu Date: Mon Mar 29 11:43:43 2021 +0800 arm64: smp: Add missing prototype for some smp.c functions In commit eb631bb5bf5b ("arm64: Support arch_irq_work_raise() via self IPIs") a new function "arch_irq_work_raise" was added without a prototype. In commit d914d4d49745 ("arm64: Implement panic_smp_self_stop()") a new function "panic_smp_self_stop" was added without a prototype. We get the following warnings on W=1: arch/arm64/kernel/smp.c:842:6: warning: no previous prototype for ‘arch_irq_work_raise’ [-Wmissing-prototypes] arch/arm64/kernel/smp.c:862:6: warning: no previous prototype for ‘panic_smp_self_stop’ [-Wmissing-prototypes] Fix the warnings by: 1. Adding the prototype for 'arch_irq_work_raise' in irq_work.h 2. Adding the prototype for 'panic_smp_self_stop' in smp.h Signed-off-by: Chen Lifu Link: https://lore.kernel.org/r/20210329034343.183974-1-chenlifu@huawei.com Signed-off-by: Catalin Marinas commit 4136c4443efce6f028eca74885870ac649981da1 Author: Nicolas Ferre Date: Fri Mar 26 19:37:04 2021 +0100 ARM: configs: at91: Modernize UBI defconfig part UBI_GLUEBI is not so common and UBI_FASTMAP is used for several years. Make them part of a modernization of UBI defconfig options. Signed-off-by: Nicolas Ferre commit 48a22e1bdfbc59876f468fead502a5c27fe1289b Author: Nicolas Ferre Date: Thu Mar 9 14:07:39 2017 +0100 ARM: configs: at91: Add USB Video webcam class USB webcams are used during validation process, add them as modules. Signed-off-by: Nicolas Ferre commit 529ab9039a52d8d1366973ab3bbc28eb27365c86 Author: Nicolas Ferre Date: Thu Sep 28 18:02:54 2017 +0200 ARM: configs: at91: Add mtd tests as modules Add MTD tests as they are used in CI and for validation plan. Signed-off-by: Nicolas Ferre commit 78529d0252093bbd0e52d560e1767497f00673ae Author: Codrin Ciubotariu Date: Fri Mar 26 17:32:39 2021 +0100 ARM: configs: at91: sama5: Add audio MIKROE PROTO board Add this board as a module as it's useful for testing audio on multiple AT91 boards. Signed-off-by: Codrin Ciubotariu [nicolas.ferre@microchip.com: adap to newer kernel] Signed-off-by: Nicolas Ferre commit c016d98eb43bb90e0ef59e1b5a273794277a1a98 Author: Razvan Stefanescu Date: Thu May 2 10:52:53 2019 +0300 ARM: configs: at91: sama5: Enable LAN78XX as module Include this driver as the USB-Ethernet chip is present on SAMA5D2-ICP board. Signed-off-by: Razvan Stefanescu [nicolas.ferre@microchip.com: update commit subject and message] Signed-off-by: Nicolas Ferre commit 3133badba54c6c92ad628a1671b5e6dc6cdd060d Author: Razvan Stefanescu Date: Fri Mar 26 17:03:24 2021 +0100 ARM: configs: at91: sama5: PIOBU as built-in Include as built-in as it's used by multiple boards. Signed-off-by: Razvan Stefanescu [nicolas.ferre@microchip.com: adap to newer kernel] Signed-off-by: Nicolas Ferre commit 759835d5aa1e9d839a2ab657528c33b44820eabd Author: Nicolas Ferre Date: Fri Mar 26 16:39:29 2021 +0100 ARM: configs: at91: sama5: MCP16502 regulator as built-in This regulator is needed by several SoC or external peripherals on different boards, providing required power rails. Make it built-in to match usual use-cases. Signed-off-by: Nicolas Ferre commit a0e6830c95b79c865b4195e4f0a14672c6023ce5 Author: Emil Velikov Date: Thu Mar 11 15:40:55 2021 +0000 ARM: configs: at91: sama5: enable the Hantro G1 engine The SoC features a Hantro G1 compatible engine. Enable it by default, so people can make use of it. Keep it a module, as suggested by Nicolas Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Emil Velikov Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20210311154055.3496076-11-emil.l.velikov@gmail.com commit 7e53ba4e13c287bdb04bb99771bddafa72067dc3 Author: Emil Velikov Date: Thu Mar 11 15:40:54 2021 +0000 ARM: configs: at91: sama5: update with savedefconfig While enabling an extra config, I've noticed that savedefconfig produced a notable delta. Split out the no-op changes for clarity sake. Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Emil Velikov Signed-off-by: Nicolas Ferre Link: https://lore.kernel.org/r/20210311154055.3496076-10-emil.l.velikov@gmail.com commit 19f0e8cddf0f136112acaaf02dab2cee35b56439 Author: Qing Zhang Date: Mon Mar 29 15:15:58 2021 +0800 MIPS: Loongson64: enable CONFIG_USB_SERIAL_PL2303 When using the Loongson-3A4000 machine for serial port debugging, there is no /dev/ttyUSB* output, which makes the serial port unavailable, For convenience, we open this configuration. zhangqing@loongson-pc:~$ cat /sys/firmware/lefi/boardinfo Board Info Manufacturer : THTF Board Name : THTF-LS3A4000-7A1000-ML4A Family : LOONGSON3 BIOS Info Vendor : ZD tech Version : ZD tech-V2.1.1 ROM Size : 4 KB Release Date : 2020-06-29 zhangqing@loongson-pc:~$ lsusb Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse Bus 005 Device 002: ID 0c45:760b Microdia USB Keyboard Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Signed-off-by: Qing Zhang Signed-off-by: Thomas Bogendoerfer commit dc92d0df51dc61de88bf6f4884a17bf73d5c6326 Author: Ilya Lipnitskiy Date: Sat Mar 27 19:39:43 2021 -0700 crypto: mips: add poly1305-core.S to .gitignore poly1305-core.S is an auto-generated file, so it should be ignored. Fixes: a11d055e7a64 ("crypto: mips/poly1305 - incorporate OpenSSL/CRYPTOGAMS optimized implementation") Signed-off-by: Ilya Lipnitskiy Cc: Ard Biesheuvel Signed-off-by: Thomas Bogendoerfer commit 139c949f7f0ac0dd1c0da132675be80e6d76c65d Author: Chuanhong Guo Date: Fri Mar 26 22:38:40 2021 -0700 MIPS: ralink: mt7621: add memory detection support mt7621 has the following memory map: 0x0-0x1c000000: lower 448m memory 0x1c000000-0x2000000: peripheral registers 0x20000000-0x2400000: higher 64m memory detect_memory_region in arch/mips/kernel/setup.c only adds the first memory region and isn't suitable for 512m memory detection because it may accidentally read the memory area for peripheral registers. This commit adds memory detection capability for mt7621: 1. Add the highmem area when 512m is detected. 2. Guard memcmp from accessing peripheral registers: This only happens when a user decided to change kernel load address to 256m or higher address. Since this is a quite unusual case, we just skip 512m testing and return 256m as memory size. Signed-off-by: Chuanhong Guo [Minor commit message reword, make mt7621_memory_detect static] Signed-off-by: Ilya Lipnitskiy Signed-off-by: Thomas Bogendoerfer commit 8eb6eb4882f2eb3ed516484bdde7db359785b6df Author: Ilya Lipnitskiy Date: Fri Mar 26 22:38:39 2021 -0700 MIPS: ralink: annotate prom_soc_init() with __init prom_soc_init is only called from prom_init in arch/mips/ralink/prom.c, which is already annotated with __init, so annotate prom_soc_init with __init too. Signed-off-by: Ilya Lipnitskiy Signed-off-by: Thomas Bogendoerfer commit f766b28a5edfd86600e55360cc4bf29c71cca2eb Author: Julian Braha Date: Fri Mar 26 01:34:56 2021 -0400 arch: mips: fix unmet dependency for MTD_COMPLEX_MAPPINGS When CAVIUM_OCTEON_SOC is enabled, and MTD is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for MTD_COMPLEX_MAPPINGS Depends on [n]: MTD [=n] && HAS_IOMEM [=y] Selected by [y]: - CAVIUM_OCTEON_SOC [=y] && This is because CAVIUM_OCTEON_SOC selects MTD_COMPLEX_MAPPINGS, without selecting or depending on MTD, despite MTD_COMPLEX_MAPPINGS depending on MTD. Signed-off-by: Julian Braha Signed-off-by: Thomas Bogendoerfer commit e87f69a5187d9414c3c2dae9539649e3823ee32c Author: Julian Braha Date: Fri Mar 26 01:20:33 2021 -0400 arch: mips: fix unmet dependency for DEBUG_INFO When SB1XXX_CORELIS is enabled, COMPILE_TEST is disabled, and DEBUG_KERNEL is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for DEBUG_INFO Depends on [n]: DEBUG_KERNEL [=n] && !COMPILE_TEST [=n] Selected by [y]: - SB1XXX_CORELIS [=y] && SIBYTE_SB1xxx_SOC [=y] && !COMPILE_TEST [=n] This is because SB1XXX_CORELIS selects DEBUG_INFO without selecting or depending on DEBUG_KERNEL, despite DEBUG_INFO depending on DEBUG_KERNEL. Signed-off-by: Julian Braha Signed-off-by: Thomas Bogendoerfer commit 66633abd0642f1e89d26e15f36fb13d3a1c535ff Author: Tiezhu Yang Date: Thu Mar 25 20:50:01 2021 +0800 MIPS/bpf: Enable bpf_probe_read{, str}() on MIPS again After commit 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work"), bpf_probe_read{, str}() functions were no longer available on MIPS, so there exist some errors when running bpf program: root@linux:/home/loongson/bcc# python examples/tracing/task_switch.py bpf: Failed to load program: Invalid argument [...] 11: (85) call bpf_probe_read#4 unknown func bpf_probe_read#4 [...] Exception: Failed to load BPF program count_sched: Invalid argument ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE should be restricted to archs with non-overlapping address ranges, but they can overlap in EVA mode on MIPS, so select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE if !EVA in arch/mips/Kconfig, otherwise the bpf old helper bpf_probe_read() will not be available. This is similar with the commit d195b1d1d119 ("powerpc/bpf: Enable bpf_probe_read{, str}() on powerpc again"). Fixes: 0ebeea8ca8a4 ("bpf: Restrict bpf_probe_read{, str}() only to archs where they work") Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit 14c9e23369f1ac1d6f176a43053077f7b11c005f Author: Alain Volmat Date: Fri Feb 5 09:51:43 2021 +0100 ARM: dts: stm32: enable the analog filter for all I2C nodes in stm32mp151 Enable the analog filter for all I2C nodes of the stm32mp151. Signed-off-by: Alain Volmat Signed-off-by: Alexandre Torgue commit 680dcede2762668e7fd9a8d4280453b7f260b680 Author: Christian König Date: Wed Mar 24 13:50:56 2021 +0100 drm/ttm: switch back to static allocation limits for now The shrinker based approach still has some flaws. Especially that we need temporary pages to free up the pages allocated to the driver is problematic in a shrinker. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324134845.2338-1-christian.koenig@amd.com commit 887281c7519d6e291be5353449d1e1bc00aa63af Author: Cristian Marussi Date: Tue Mar 16 12:48:42 2021 +0000 firmware: arm_scmi: Port clock protocol to new protocols interface Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->clk_ops still around to ease transition. Remove handle->clock_priv now unused. Link: https://lore.kernel.org/r/20210316124903.35011-18-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 0f84576a62c4b42ae7110f1c27bbb51183f232fb Author: Cristian Marussi Date: Tue Mar 16 12:48:41 2021 +0000 firmware: arm_scmi: Remove legacy scmi_power_ops protocol interface Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/20210316124903.35011-17-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 26f19496a9764c0cd73f4f90c669210a59c09be9 Author: Cristian Marussi Date: Tue Mar 16 12:48:40 2021 +0000 firmware: arm_scmi: Port genpd driver to the new scmi_power_proto_ops interface Port the scmi genpd driver to the new SCMI power interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/20210316124903.35011-16-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 9bc8069c85678e9a61584b58951b7c5fcdd5d357 Author: Cristian Marussi Date: Tue Mar 16 12:48:39 2021 +0000 firmware: arm_scmi: Port power protocol to new protocols interface Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->power_ops still around to ease transition. Remove handle->power_priv now unused. Link: https://lore.kernel.org/r/20210316124903.35011-15-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit f58315a49ce98007870e1206ca5d79fee09cf36e Author: Cristian Marussi Date: Tue Mar 16 12:48:38 2021 +0000 firmware: arm_scmi: Remove legacy scmi_perf_ops protocol interface Now that all the SCMI driver users have been migrated to the new interface remove the legacy interface and all the transient code. Link: https://lore.kernel.org/r/20210316124903.35011-14-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit eb1d35c6e3fc71ae6ec1c8c3f433af8a56d46781 Author: Cristian Marussi Date: Tue Mar 16 12:48:37 2021 +0000 cpufreq: scmi: Port driver to the new scmi_perf_proto_ops interface Port driver to the new SCMI perf interface based on protocol handles and common devm_get_ops(). Link: https://lore.kernel.org/r/20210316124903.35011-13-cristian.marussi@arm.com Cc: Rafael J. Wysocki Cc: Viresh Kumar Tested-by: Florian Fainelli Acked-by: Viresh Kumar Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 1fec5e6b5233a08ebf43011703b8baf9c9856862 Author: Cristian Marussi Date: Tue Mar 16 12:48:36 2021 +0000 firmware: arm_scmi: Port perf protocol to new protocols interface Convert internals of protocol implementation to use protocol handles and expose a new protocol operations interface for SCMI driver using the new get/put common operations, while keeping the old handle->perf_ops still around to ease transition. Remove handle->perf_priv now unused. Link: https://lore.kernel.org/r/20210316124903.35011-12-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 8d3581c2526fcc6716d6bd13e4a5c0badd36a034 Author: Cristian Marussi Date: Tue Mar 16 12:48:35 2021 +0000 firmware: arm_scmi: Port base protocol to new interface Port the SCMI base protocol to new protocol handles based interface. Link: https://lore.kernel.org/r/20210316124903.35011-11-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 3d5d6e84ea0e9cf985b1d0d8d359fe693f2466e4 Author: Cristian Marussi Date: Tue Mar 16 12:48:34 2021 +0000 firmware: arm_scmi: Add helper to access protocol revision/version Add an helper to access from a protocol handle, the SCMI version data which is exposed on sysfs. Such helper will be needed by SCMI base protocol initialization once it will be moved to new protocol handles scheme. Link: https://lore.kernel.org/r/20210316124903.35011-10-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit a4a20b0975dc7b137e5de4b73f23579fccd57cf9 Author: Cristian Marussi Date: Tue Mar 16 12:48:33 2021 +0000 firmware: arm_scmi: Add new protocol handle core transfer ops Add new core SCMI transfer operations based on protocol handles to enable protocols to builds and send their own protocol specific messages. Keep old original scmi_xfer_ operations interface as wrappers around the new interface in order to let coexist old and new interfaces to ease protocol by protocol migration. In order to support such migration the above wrappers and some additional transient code is also introduced in this commit. It will be later removed as a whole once the full migration of protocols and SCMI drivers will have been completed. Link: https://lore.kernel.org/r/20210316124903.35011-9-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit b9f7fd907c38a38aea6869c91e38a7d745825442 Author: Cristian Marussi Date: Tue Mar 16 12:48:32 2021 +0000 firmware: arm_scmi: Convert events registration to protocol handles Convert all refactored events registration routines to use protocol handles. In order to maintain bisectability and to allow protocols and drivers to be later ported to the new protocol handle interface one by one, introduce here also some transient code that will be removed later in order to ease such transition. Link: https://lore.kernel.org/r/20210316124903.35011-8-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 533c7095b1ff9271a32e5a4b45b2d35f1432ea04 Author: Cristian Marussi Date: Tue Mar 16 12:48:31 2021 +0000 firmware: arm_scmi: Refactor events registration Add a new refactored protocol events registration helper and invoke it from the centralized initialization process triggered by get_ops() and friends. Also add a `get_num_sources` as a new optional callback amongst protocol events operations. Finally remove events registration call-sites from within the legacy protocol init routines. Link: https://lore.kernel.org/r/20210316124903.35011-7-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 5ad3d1cf7d34c00aa5b425d93373b5c0044aa0a9 Author: Cristian Marussi Date: Tue Mar 16 12:48:30 2021 +0000 firmware: arm_scmi: Introduce new devres notification ops Expose to the SCMI drivers a new alternative devres managed notifications API based on protocol handles. All drivers still keep using the old API, no functional change. Link: https://lore.kernel.org/r/20210316124903.35011-6-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 3dd2c81475564e604fd5b0a21813b9c2f2950fa3 Author: Cristian Marussi Date: Tue Mar 16 12:48:29 2021 +0000 firmware: arm_scmi: Make notifications aware of protocols users Account for any active registered notifier against the proper related protocol, do not consider pending event handlers, only active handlers will concur to protocol usage accounting. Link: https://lore.kernel.org/r/20210316124903.35011-5-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 23934efe3748f6d9d8ac0760178a5ef1ed8320f4 Author: Cristian Marussi Date: Tue Mar 16 12:48:28 2021 +0000 firmware: arm_scmi: Introduce devres get/put protocols operations Expose to the SCMI drivers a new devres managed common protocols API based on generic get/put methods and protocol handles. All drivers still keep using the old API, no functional change. Link: https://lore.kernel.org/r/20210316124903.35011-4-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit bbbf6db5a0b56199702bb225132831bced2eee41 Author: Yoshihiro Shimoda Date: Thu Mar 25 13:19:49 2021 +0900 arm64: dts: renesas: r8a779a0: Fix PMU interrupt Should use PPI No.7 for the PMU. Otherwise, the perf command didn't show any information. Fixes: 834c310f5418 ("arm64: dts: renesas: Add Renesas R8A779A0 SoC support") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/20210325041949.925777-1-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 7c4721276611800681f14e1e54dea01ddcc6c429 Author: Kieran Bingham Date: Mon Mar 22 17:29:19 2021 +0000 arm64: dts: renesas: r8a779a0: Add VSPD support Provide VSPD support on the R-Car V3U SoC. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20210322172919.1154686-3-kieran.bingham+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven commit e91bb1464df74fc068bd8d26c5177bdedcf7c2d5 Author: Kieran Bingham Date: Mon Mar 22 17:29:18 2021 +0000 arm64: dts: renesas: r8a779a0: Add FCPVD support Provide FCPVD support for the R-Car V3U SoC. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart Link: https://lore.kernel.org/r/20210322172919.1154686-2-kieran.bingham+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven commit 9d68a386644402be31c9d002655492b5a17c8979 Author: Kieran Bingham Date: Mon Mar 22 17:20:13 2021 +0000 arm64: dts: renesas: falcon-cpu: Add GP LEDs Three general purpose LEDs are provided on the Falcon CPU board. Connect GP_LED1, GP_LED2, and GP_LED3 to the gpio-leds frameworks as indicator LEDs. These LEDs are arranged in a block of four LEDs on the board itself, but the fourth LED is as yet unidentified. Signed-off-by: Kieran Bingham Link: https://lore.kernel.org/r/20210322172013.1152121-1-kieran.bingham+renesas@ideasonboard.com Signed-off-by: Geert Uytterhoeven commit d7b6cc563a600762597ff608f487f90dc8b66f16 Author: Cristian Marussi Date: Tue Mar 16 12:48:27 2021 +0000 firmware: arm_scmi: Introduce protocol handle definitions Add basic protocol handles definitions and private data helpers. A protocol handle identifies a protocol instance initialized against a specific handle, it embeds all the references to the core SCMI transfer methods that will be needed by a protocol implementation to build and send its own protocol specific messages using common core methods. As such, in the interface, a protocol handle will be passed down from the core to the protocol specific initialization callback at init time. Anyways, at this point only definitions are introduced, all protocols initialization code and SCMI drivers probing is still based on the old interface, so no functional change. Link: https://lore.kernel.org/r/20210316124903.35011-3-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit 48dc16e2e52ca386d97435f257ef8a754becb0b8 Author: Cristian Marussi Date: Tue Mar 16 12:48:26 2021 +0000 firmware: arm_scmi: Extend protocol registration interfaces Extend common protocol registration routines and provide some new generic protocols get/put helpers that can track protocols usage and automatically perform the proper initialization and de-initialization on demand when required. Convert all standard protocols to use this new registration scheme while keeping them all still using the usual initialization logic bound to SCMI devices probing. Link: https://lore.kernel.org/r/20210316124903.35011-2-cristian.marussi@arm.com Tested-by: Florian Fainelli Signed-off-by: Cristian Marussi Signed-off-by: Sudeep Holla commit fe8a057839fc49dbf23ff92ad3a7f906b932b585 Merge: 2cbcb78c9ee55 c7941422cff96 Author: Dave Airlie Date: Mon Mar 29 12:42:55 2021 +1000 Merge tag 'drm-next-20210322' of git://linuxtv.org/pinchartl/media into drm-next Conversion of misc display DT bindings to YAML Signed-off-by: Dave Airlie From: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/YFgOFL/yMUkyxqK3@pendragon.ideasonboard.com commit 46249cded18ac0c4ffb7b177219510a133a51c00 Author: Gao Xiang Date: Mon Mar 29 09:23:07 2021 +0800 erofs: introduce on-disk lz4 fs configurations Introduce z_erofs_lz4_cfgs to store all lz4 configurations. Currently it's only max_distance, but will be used for new features later. Link: https://lore.kernel.org/r/20210329012308.28743-4-hsiangkao@aol.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 5d50538fc567c6f3692dec1825fb38c5a0884d93 Author: Huang Jianan Date: Mon Mar 29 09:23:06 2021 +0800 erofs: support adjust lz4 history window size lz4 uses LZ4_DISTANCE_MAX to record history preservation. When using rolling decompression, a block with a higher compression ratio will cause a larger memory allocation (up to 64k). It may cause a large resource burden in extreme cases on devices with small memory and a large number of concurrent IOs. So appropriately reducing this value can improve performance. Decreasing this value will reduce the compression ratio (except when input_size Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao [ Gao Xiang: introduce struct erofs_sb_lz4_info for configurations. ] Signed-off-by: Gao Xiang commit de06a6a375414be03ce5b1054f2d836591923a1d Author: Gao Xiang Date: Mon Mar 29 09:23:05 2021 +0800 erofs: introduce erofs_sb_has_xxx() helpers Introduce erofs_sb_has_xxx() to make long checks short, especially for later big pcluster & LZMA features. Link: https://lore.kernel.org/r/20210329012308.28743-2-hsiangkao@aol.com Reviewed-by: Chao Yu Signed-off-by: Gao Xiang commit 69931cc387cca289e0415c79ce5389119670066d Author: dingsenjie Date: Fri Mar 26 19:53:56 2021 +0800 powerpc/powernv: Remove unneeded variable: "rc" Remove unneeded variable: "rc". Signed-off-by: dingsenjie Reviewed-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210326115356.12444-1-dingsenjie@163.com commit 4fe529449d85e78972fa327999961ecc83a0b6db Author: Chen Huang Date: Sat Mar 27 09:49:00 2021 +0000 powerpc: Fix HAVE_HARDLOCKUP_DETECTOR_ARCH build configuration When compiling the powerpc with the SMP disabled, it shows the issue: arch/powerpc/kernel/watchdog.c: In function ‘watchdog_smp_panic’: arch/powerpc/kernel/watchdog.c:177:4: error: implicit declaration of function ‘smp_send_nmi_ipi’; did you mean ‘smp_send_stop’? [-Werror=implicit-function-declaration] 177 | smp_send_nmi_ipi(c, wd_lockup_ipi, 1000000); | ^~~~~~~~~~~~~~~~ | smp_send_stop cc1: all warnings being treated as errors make[2]: *** [scripts/Makefile.build:273: arch/powerpc/kernel/watchdog.o] Error 1 make[1]: *** [scripts/Makefile.build:534: arch/powerpc/kernel] Error 2 make: *** [Makefile:1980: arch/powerpc] Error 2 make: *** Waiting for unfinished jobs.... We found that powerpc used ipi to implement hardlockup watchdog, so the HAVE_HARDLOCKUP_DETECTOR_ARCH should depend on the SMP. Fixes: 2104180a5369 ("powerpc/64s: implement arch-specific hardlockup watchdog") Reported-by: Hulk Robot Signed-off-by: Chen Huang Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210327094900.938555-1-chenhuang5@huawei.com commit d19b3ad02c2d1a9a697b7059e32fa2d97a420b15 Author: Daniel Henrique Barboza Date: Tue Mar 23 17:50:56 2021 -0300 powerpc/pseries/hotplug-cpu: Show 'last online CPU' error in dlpar_cpu_offline() One of the reasons that dlpar_cpu_offline can fail is when attempting to offline the last online CPU of the kernel. This can be observed in a pseries QEMU guest that has hotplugged CPUs. If the user offlines all other CPUs of the guest, and a hotplugged CPU is now the last online CPU, trying to reclaim it will fail. The current error message in this situation returns rc with -EBUSY and a generic explanation, e.g.: pseries-hotplug-cpu: Failed to offline CPU PowerPC,POWER9, rc: -16 EBUSY can be caused by other conditions, such as cpu_hotplug_disable being true. Throwing a more specific error message for this case, instead of just "Failed to offline CPU", makes it clearer that the error is in fact a known error situation instead of other generic/unknown cause. This patch adds a 'last online' check in dlpar_cpu_offline() to catch the 'last online CPU' offline error, eturning a more informative error message: pseries-hotplug-cpu: Unable to remove last online CPU PowerPC,POWER9 Signed-off-by: Daniel Henrique Barboza Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210323205056.52768-2-danielhb413@gmail.com commit dfc4ae3372182a168146745def03d877f31fcf2f Author: Randy Dunlap Date: Thu Mar 25 13:08:20 2021 -0700 selftests/powerpc: unmark non-kernel-doc comments Drop the 'beginning of kernel-doc' notation markers (/**) in places that are not in kernel-doc format. Signed-off-by: Randy Dunlap Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210325200820.16594-1-rdunlap@infradead.org commit e23ecdf9fd87c547a3ac55bcebaf7df28df2fab0 Author: Bhaskar Chowdhury Date: Mon Mar 22 08:03:07 2021 +0530 cxl: Fix couple of spellings s/filesytem/filesystem/ s/symantics/semantics/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210322023307.168754-1-unixbhaskar@gmail.com commit 48cf12d88969bd4238b8769767eb476970319d93 Author: Christophe Leroy Date: Fri Mar 19 06:34:43 2021 +0000 powerpc/irq: Inline call_do_irq() and call_do_softirq() call_do_irq() and call_do_softirq() are simple enough to be worth inlining. Inlining them avoids an mflr/mtlr pair plus a save/reload on stack. This is inspired from S390 arch. Several other arches do more or less the same. The way sparc arch does seems odd thought. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210320122227.345427-1-mpe@ellerman.id.au commit d2313da4ff56bd631a3afe7a17992ed5bd0e04a6 Author: He Ying Date: Tue Mar 16 00:11:48 2021 -0400 powerpc/setup_64: Fix sparse warnings Sparse warns: warning: symbol 'rfi_flush' was not declared. warning: symbol 'entry_flush' was not declared. warning: symbol 'uaccess_flush' was not declared. Define 'entry_flush' and 'uaccess_flush' as static because they are not referenced outside the file. Include asm/security_features.h in which 'rfi_flush' is declared. Reported-by: Hulk Robot Signed-off-by: He Ying Reviewed-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316041148.29694-1-heying24@huawei.com commit a329ddd472fa2af0c19a73b8658898ae7fd658ad Author: Christophe Leroy Date: Thu Mar 18 17:25:07 2021 +0000 powerpc/embedded6xx: Remove CONFIG_MV64X60 Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") moved the last selector of CONFIG_MV64X60. As it is not a user selectable config, it can be removed. Signed-off-by: Christophe Leroy Acked-by: Wolfram Sang # for I2C Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/19e57d16692dcd1ca67ba880d7273a57fab416aa.1616085654.git.christophe.leroy@csgroup.eu commit bbbe563f8490958861777d98871e16960163ea1b Author: kernel test robot Date: Fri Mar 19 07:44:41 2021 +0800 powerpc/iommu/debug: fix ifnullfree.cocci warnings arch/powerpc/kernel/iommu.c:76:2-16: WARNING: NULL check before some freeing functions is not needed. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci Fixes: 691602aab9c3 ("powerpc/iommu/debug: Add debugfs entries for IOMMU tables") Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210318234441.GA63469@f8e20a472e81 commit a2308836880bf1501ff9373c611dc2970247d42b Author: Christophe Leroy Date: Tue Mar 16 07:57:16 2021 +0000 powerpc: Fix arch_stack_walk() to have running function as first entry It seems like other architectures, namely x86 and arm64 and riscv at least, include the running function as top entry when saving stack trace with save_stack_trace_regs(). Functionnalities like KFENCE expect it. Do the same on powerpc, it allows KFENCE and other users to properly identify the faulting function as depicted below. Before the patch KFENCE was identifying finish_task_switch.isra as the faulting function. [ 14.937370] ================================================================== [ 14.948692] BUG: KFENCE: invalid read in test_invalid_access+0x54/0x108 [ 14.948692] [ 14.956814] Invalid read at 0xdf98800a: [ 14.960664] test_invalid_access+0x54/0x108 [ 14.964876] finish_task_switch.isra.0+0x54/0x23c [ 14.969606] kunit_try_run_case+0x5c/0xd0 [ 14.973658] kunit_generic_run_threadfn_adapter+0x24/0x30 [ 14.979079] kthread+0x15c/0x174 [ 14.982342] ret_from_kernel_thread+0x14/0x1c [ 14.986731] [ 14.988236] CPU: 0 PID: 111 Comm: kunit_try_catch Tainted: G B 5.12.0-rc1-01537-g95f6e2088d7e-dirty #4682 [ 14.999795] NIP: c016ec2c LR: c02f517c CTR: c016ebd8 [ 15.004851] REGS: e2449d90 TRAP: 0301 Tainted: G B (5.12.0-rc1-01537-g95f6e2088d7e-dirty) [ 15.015274] MSR: 00009032 CR: 22000004 XER: 00000000 [ 15.022043] DAR: df98800a DSISR: 20000000 [ 15.022043] GPR00: c02f517c e2449e50 c1142080 e100dd24 c084b13c 00000008 c084b32b c016ebd8 [ 15.022043] GPR08: c0850000 df988000 c0d10000 e2449eb0 22000288 [ 15.040581] NIP [c016ec2c] test_invalid_access+0x54/0x108 [ 15.046010] LR [c02f517c] kunit_try_run_case+0x5c/0xd0 [ 15.051181] Call Trace: [ 15.053637] [e2449e50] [c005a68c] finish_task_switch.isra.0+0x54/0x23c (unreliable) [ 15.061338] [e2449eb0] [c02f517c] kunit_try_run_case+0x5c/0xd0 [ 15.067215] [e2449ed0] [c02f648c] kunit_generic_run_threadfn_adapter+0x24/0x30 [ 15.074472] [e2449ef0] [c004e7b0] kthread+0x15c/0x174 [ 15.079571] [e2449f30] [c001317c] ret_from_kernel_thread+0x14/0x1c [ 15.085798] Instruction dump: [ 15.088784] 8129d608 38e7ebd8 81020280 911f004c 39000000 995f0024 907f0028 90ff001c [ 15.096613] 3949000a 915f0020 3d40c0d1 3d00c085 <8929000a> 3908adb0 812a4b98 3d40c02f [ 15.104612] ================================================================== Fixes: 35de3b1aa168 ("powerpc: Implement save_stack_trace_regs() to enable kprobe stack tracing") Signed-off-by: Christophe Leroy Acked-by: Marco Elver Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/21324f9e2f21d1640c8397b4d1d857a9355a2283.1615881400.git.christophe.leroy@csgroup.eu commit a1cdef04f22dd5ad9e1ccf5d05a549c697b7f52d Author: Christophe Leroy Date: Tue Mar 16 07:57:15 2021 +0000 powerpc: Convert stacktrace to generic ARCH_STACKWALK This patch converts powerpc stacktrace to the generic ARCH_STACKWALK implemented by commit 214d8ca6ee85 ("stacktrace: Provide common infrastructure") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/73b36bbb101299760b95ecd2cd3a46554bea8bf9.1615881400.git.christophe.leroy@csgroup.eu commit 826a307b0a11e605b4be0b2727550b510c4a88cd Author: Christophe Leroy Date: Tue Mar 16 07:57:14 2021 +0000 powerpc: Rename 'tsk' parameter into 'task' To better match generic code, rename 'tsk' to 'task' in some stacktrace functions in preparation of following patch which converts powerpc to generic ARCH_STACKWALK. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/117f0200e11961af6c0fdf85c98373e5dcf96a47.1615881400.git.christophe.leroy@csgroup.eu commit accdd093f260bc8c8a8f580ee48e49ad5c5f91b2 Author: Christophe Leroy Date: Tue Mar 16 07:57:13 2021 +0000 powerpc: Activate HAVE_RELIABLE_STACKTRACE for all CONFIG_HAVE_RELIABLE_STACKTRACE is applicable to all, no reason to limit it to book3s/64le Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/955248c6423cb068c5965923121ba31d4dd2fdde.1615881400.git.christophe.leroy@csgroup.eu commit 8b8adeb3007f67076141f547f0b2f62b299a383c Author: Aneesh Kumar K.V Date: Thu Mar 18 09:18:29 2021 +0530 powerpc/book3s64/kuap: Move Kconfig varriables to BOOK3S_64 With below two commits: commit c91435d95c49 ("powerpc/book3s64/hash/kuep: Enable KUEP on hash") commit b2ff33a10c8b ("powerpc/book3s64/hash/kuap: Enable kuap on hash") the kernel now supports kuap/kuep with hash translation. Hence select the Kconfig even when radix is disabled. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210318034829.72255-1-aneesh.kumar@linux.ibm.com commit 89f7d2927ae16ea470d29234447763826e40c6cf Author: Bhaskar Chowdhury Date: Wed Mar 17 14:34:13 2021 +0530 powerpc/kernel: Trivial typo fix in kgdb.c s/procesing/processing/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210317090413.120891-1-unixbhaskar@gmail.com commit 1479e3d3b7559133b0a107772b5841e9c2cad450 Author: Nicholas Piggin Date: Tue Mar 16 20:52:05 2021 +1000 powerpc/64s: Fix hash fault to use TRAP accessor Hash faults use the trap vector to decide whether this is an instruction or data fault. This should use the TRAP accessor rather than open access regs->trap. This won't cause a problem at the moment because 64s only uses trap flags for system call interrupts (the norestart flag), but that could change if any other trap flags get used in future. Fixes: a4922f5442e7e ("powerpc/64s: move the hash fault handling logic to C") Suggested-by: Christophe Leroy Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210316105205.407767-1-npiggin@gmail.com commit 98c26a72751ecb2ed247cdfd6cb2385f37195707 Author: Christophe Leroy Date: Mon Mar 15 14:52:51 2021 +0000 powerpc/mm: Remove unneeded #ifdef CONFIG_PPC_MEM_KEYS In fault.c, #ifdef CONFIG_PPC_MEM_KEYS is not needed because all functions are always defined, and arch_vma_access_permitted() always returns true when CONFIG_PPC_MEM_KEYS is not defined so access_pkey_error() will return false so bad_access_pkey() will never be called. Include linux/pkeys.h to get a definition of vma_pkeys() for bad_access_pkey(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8038392f38d81f2ad169347efac29146f553b238.1615819955.git.christophe.leroy@csgroup.eu commit b77878052a142737522e0e3c2a621c988a4cd7cd Author: Michael Ellerman Date: Sun Mar 14 20:33:41 2021 +1100 powerpc/fsl-pci: Fix section mismatch warning Section mismatch in reference from the function .fsl_add_bridge() to the function .init.text:.setup_pci_cmd() fsl_add_bridge() is not __init, and can't be, and is the only caller of setup_pci_cmd(). Fix it by making setup_pci_cmd() non-init. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210314093341.132986-1-mpe@ellerman.id.au commit 55c2f5574a013d2dbf1012a2ad93cb8d947279a7 Author: Michael Ellerman Date: Sun Mar 14 20:33:33 2021 +1100 powerpc: Fix section mismatch warning in smp_setup_pacas() Section mismatch in reference from the function .smp_setup_pacas() to the function .init.text:.allocate_paca() The only caller of smp_setup_pacas() is setup_arch() which is __init, so mark smp_setup_pacas() __init. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210314093333.132657-1-mpe@ellerman.id.au commit c2a2a5d0270c641ce030aee247569afc1a0efbe5 Author: Michael Ellerman Date: Sun Mar 14 20:33:20 2021 +1100 powerpc/64s: Fold update_current_thread_[i]amr() into their only callers lkp reported warnings in some configuration due to update_current_thread_amr() being unused: arch/powerpc/mm/book3s64/pkeys.c:284:20: error: unused function 'update_current_thread_amr' static inline void update_current_thread_amr(u64 value) Which is because it's only use is inside an ifdef. We could move it inside the ifdef, but it's a single line function and only has one caller, so just fold it in. Similarly update_current_thread_iamr() is small and only called once, so fold it in also. Fixes: 48a8ab4eeb82 ("powerpc/book3s64/pkeys: Don't update SPRN_AMR when in kernel mode.") Reported-by: kernel test robot Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210314093320.132331-1-mpe@ellerman.id.au commit 7a7685acd2129e2e5d433636120b4c5038c03e51 Author: Michael Ellerman Date: Sun Mar 14 20:33:00 2021 +1100 powerpc/eeh: Fix build failure with CONFIG_PROC_FS=n The build fails with CONFIG_PROC_FS=n: arch/powerpc/kernel/eeh.c:1571:12: error: ‘proc_eeh_show’ defined but not used 1571 | static int proc_eeh_show(struct seq_file *m, void *v) Wrap proc_eeh_show() in an ifdef to avoid it. Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210314093300.131998-1-mpe@ellerman.id.au commit 7a0fdc19f2415683f403abee7bb87085d0c624ad Author: Jiapeng Chong Date: Mon Mar 15 15:35:24 2021 +0800 powerpc/pci: fix warning comparing pointer to 0 Fix the following coccicheck warning: ./arch/powerpc/platforms/maple/pci.c:37:16-17: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1615793724-97015-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 9214cf0f48cac3c6aa86f34e14969b5eccb72fad Author: Yang Li Date: Mon Mar 15 15:24:56 2021 +0800 powerpc/xive: use true and false for bool variable fixed the following coccicheck: ./arch/powerpc/sysdev/xive/spapr.c:552:8-9: WARNING: return of 0/1 in function 'xive_spapr_match' with return type bool Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1615793096-83758-1-git-send-email-yang.lee@linux.alibaba.com commit 6eeca7a11379e9dd05493bbdba57515b36a2e3cf Author: Christophe Leroy Date: Mon Mar 15 11:01:26 2021 +0000 powerpc/asm-offsets: GPR14 is not needed either Commit aac6a91fea93 ("powerpc/asm: Remove unused symbols in asm-offsets.c") removed GPR15 to GPR31 but kept GPR14, probably because it pops up in a couple of comments when doing a grep. However, it was never used either, so remove it as well. Fixes: aac6a91fea93 ("powerpc/asm: Remove unused symbols in asm-offsets.c") Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/9881c68fbca004f9ea18fc9473f630e11ccd6417.1615806071.git.christophe.leroy@csgroup.eu commit e448e1e774dc0ca307c17e961daf7ede2e635c57 Author: Christophe Leroy Date: Mon Mar 15 12:00:09 2021 +0000 powerpc/math: Fix missing __user qualifier for get_user() and other sparse warnings Sparse reports the following problems: arch/powerpc/math-emu/math.c:228:21: warning: Using plain integer as NULL pointer arch/powerpc/math-emu/math.c:228:31: warning: Using plain integer as NULL pointer arch/powerpc/math-emu/math.c:228:41: warning: Using plain integer as NULL pointer arch/powerpc/math-emu/math.c:228:51: warning: Using plain integer as NULL pointer arch/powerpc/math-emu/math.c:237:13: warning: incorrect type in initializer (different address spaces) arch/powerpc/math-emu/math.c:237:13: expected unsigned int [noderef] __user *_gu_addr arch/powerpc/math-emu/math.c:237:13: got unsigned int [usertype] * arch/powerpc/math-emu/math.c:226:1: warning: symbol 'do_mathemu' was not declared. Should it be static? Add missing __user qualifier when casting pointer used in get_user() Use NULL instead of 0 to initialise opX local variables. Add a prototype for do_mathemu() (Added in processor.h like sparc) Reported-by: kernel test robot Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e4d1aae7604d89c98a52dfd8ce8443462e595670.1615809591.git.christophe.leroy@csgroup.eu commit 7a7d744ffe87ae10ab98004d1a6ca1f691af58e1 Author: Bhaskar Chowdhury Date: Fri Mar 12 16:55:37 2021 +0530 powerpc/mm/book3s64: Fix a typo in mmu_context.c s/detalis/details/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210312112537.4585-1-unixbhaskar@gmail.com commit f239873fcd953557ba9a9781d10ca95c0594e2b3 Author: Bhaskar Chowdhury Date: Mon Mar 15 03:34:36 2021 +0530 powerpc/64e: Trivial spelling fixes throughout head_fsl_booke.S Trivial spelling fixes throughout the file. Signed-off-by: Bhaskar Chowdhury Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210314220436.3417083-1-unixbhaskar@gmail.com commit 802b5560393423166e436c7914b565f3cda9e6b9 Author: Christophe Leroy Date: Wed Mar 10 12:43:12 2021 +0000 powerpc/Makefile: Remove workaround for gcc versions below 4.9 Commit 6ec4476ac825 ("Raise gcc version requirement to 4.9") made it impossible to build with gcc 4.8 and under. Remove related workaround. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/a1e552006b8c51f23edd2f6cabdd9a986c631146.1615380184.git.christophe.leroy@csgroup.eu commit c16728835eec45fa82f4744a52940717ac828f6d Author: Christophe Leroy Date: Fri Mar 12 12:50:51 2021 +0000 powerpc/32: Manage KUAP in C Move all KUAP management in C. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/199365ddb58d579daf724815f2d0acb91cc49d19.1615552867.git.christophe.leroy@csgroup.eu commit 0b45359aa2df7b761817a9664cfb53ea3070c390 Author: Christophe Leroy Date: Fri Mar 12 12:50:50 2021 +0000 powerpc/8xx: Create C version of kuap save/restore/check helpers In preparation of porting PPC32 to C syscall entry/exit, create C version of kuap_save_and_lock() and kuap_user_restore() and kuap_kernel_restore() and kuap_assert_locked() and kuap_get_and_assert_locked() on 8xx. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/156a7c4b669d26785391422a5581a1d919544c9a.1615552867.git.christophe.leroy@csgroup.eu commit 21eb58ae4fce559d4e025df042db2bc0bb100f93 Author: Christophe Leroy Date: Fri Mar 12 12:50:49 2021 +0000 powerpc/32s: Create C version of kuap save/restore/check helpers In preparation of porting PPC32 to C syscall entry/exit, create C version of kuap_save_and_lock() and kuap_user_restore() and kuap_kernel_restore() and kuap_assert_locked() and kuap_get_and_assert_locked() on book3s/32. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2be8fb729da4a0f9863b25e1b9d547174fcd5056.1615552867.git.christophe.leroy@csgroup.eu commit ad2d2344771dabc5f0f14d85d5e7d2ddc613f385 Author: Christophe Leroy Date: Fri Mar 12 12:50:48 2021 +0000 powerpc/64s: Make kuap_check_amr() and kuap_get_and_check_amr() generic In preparation of porting powerpc32 to C syscall entry/exit, rename kuap_check_amr() and kuap_get_and_check_amr() as kuap_assert_locked() and kuap_get_and_assert_locked(), and move in the generic asm/kup.h the stub for when CONFIG_PPC_KUAP is not selected. Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f82614d9b17b83abd739aa18fc08811815d0c2e3.1615552867.git.christophe.leroy@csgroup.eu commit b5efec00b671c5d7e9cb9e73a1d4925dd6ce8dcd Author: Christophe Leroy Date: Fri Mar 12 12:50:47 2021 +0000 powerpc/32s: Move KUEP locking/unlocking in C This can be done in C, do it. Unrolling the loop gains approx. 15% performance. From now on, prepare_transfer_to_handler() is only for interrupts from kernel. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4eadd873927e9a73c3d1dfe2f9497353465514cf.1615552867.git.christophe.leroy@csgroup.eu commit a2b3e09ae41c71d27d9b8da9baf31e0d9a97b864 Author: Christophe Leroy Date: Fri Mar 12 12:50:46 2021 +0000 powerpc/32: Only use prepare_transfer_to_handler function on book3s/32 and e500 Only book3s/32 and e500 have significative work to do in prepare_transfer_to_handler. Other 32 bit have nothing to do at all. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/b5e29ca0e557c11340415a13fe8b107189d315e1.1615552867.git.christophe.leroy@csgroup.eu commit a5d33be0512b4565808a3aed05567cb56c0e6ad0 Author: Christophe Leroy Date: Fri Mar 12 12:50:45 2021 +0000 powerpc/32: Return directly from power_save_ppc32_restore() transfer_to_handler_cont: is now just a blr. Directly perform blr in power_save_ppc32_restore(). Also remove useless setting of r11 in e500 version of power_save_ppc32_restore(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e337506e08a4df95b11d2290104b92f0dcdb5548.1615552867.git.christophe.leroy@csgroup.eu commit 16db54369df614bf386aa31a6730c5bdb1bf4ffd Author: Christophe Leroy Date: Fri Mar 12 12:50:44 2021 +0000 powerpc/32: Save remaining registers in exception prolog Save non volatile registers, XER, CTR, MSR and NIP in exception prolog. Also assign proper value to r2 and r3 there. For now, recalculate thread pointer in prepare_transfer_to_handler. It will disappear once KUAP is ported to C. And remove the comment which is now completely wrong. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/56f0cde9dd0362edf2ddba4d887552013eee7329.1615552867.git.christophe.leroy@csgroup.eu commit a305597850c96e2f2d349533cf3b514fa4b7b9f8 Author: Christophe Leroy Date: Fri Mar 12 12:50:43 2021 +0000 powerpc/32: Refactor saving of volatile registers in exception prologs Exception prologs all do the same at the end: - Save trapno in stack - Mark stack with exception marker - Save r0 - Save r3 to r8 Refactor that into a COMMON_EXCEPTION_PROLOG_END macro. At the same time use r1 instead of r11. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/e1c45d2e895e0693c42d2a6840df1105a148efea.1615552867.git.christophe.leroy@csgroup.eu commit acc142b6230eb2d9cec9b9e3baac1bc074df8ba3 Author: Christophe Leroy Date: Fri Mar 12 12:50:42 2021 +0000 powerpc/32: Remove the xfer parameter in EXCEPTION() macro The xfer parameter is not used anymore, remove it. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/17c7d68bd18f7d2f1ab24a1a20d9ed33bbcda741.1615552867.git.christophe.leroy@csgroup.eu commit 4c0104a83fc3990a76a01a2f4e504251fa9814c4 Author: Christophe Leroy Date: Fri Mar 12 12:50:41 2021 +0000 powerpc/32: Dismantle EXC_XFER_STD/LITE/TEMPLATE In order to get more control in exception prolog, dismantle all non standard exception macros, finishing with EXC_XFER_STD and EXC_XFER_LITE and EXC_XFER_TEMPLATE. Also remove transfer_to_handler_full and ret_from_except and ret_from_except_full as they are not used anymore. Last parameter of EXCEPTION() is now ignored, will be removed in a later patch to avoid too much churn. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ca5795d04a220586b7037dbbbe6951dfa9e768eb.1615552867.git.christophe.leroy@csgroup.eu commit 8f6ff5bd9b73a7912356f378adfb85e9a4e7ce65 Author: Christophe Leroy Date: Fri Mar 12 12:50:40 2021 +0000 powerpc/32: Only restore non volatile registers when required Until now, non volatile registers were restored everytime they were saved, ie using EXC_XFER_STD meant saving and restoring them while EXC_XFER_LITE meant neither saving not restoring them. Now that they are always saved, EXC_XFER_STD means to restore them and EXC_XFER_LITE means to not restore them. Most of the users of EXC_XFER_STD only need to retrieve the non volatile registers. For them there is no need to restore the non volatile registers as they have not been modified. Only very few exceptions require non volatile registers restore. Opencode the few places which require saving of non volatile registers. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d1cb12d8023cc6afc1f07150565571373c04945c.1615552867.git.christophe.leroy@csgroup.eu commit bce4c26a4e324cb096a3768cdc3aad4e2552c3d0 Author: Christophe Leroy Date: Fri Mar 12 12:50:39 2021 +0000 powerpc/32: Add a prepare_transfer_to_handler macro for exception prologs In order to increase flexibility, add a macro that will for now call transfer_to_handler. As transfer_to_handler doesn't do the actual transfer anymore, also name it prepare_transfer_to_handler. The following patches will progressively remove the use of transfer_to_handler label. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7f757c52518ab1d7b27ad5113b10f860e803f467.1615552867.git.christophe.leroy@csgroup.eu commit 719e7e212c7e637a795f130dbdd5db6c291e463f Author: Christophe Leroy Date: Fri Mar 12 12:50:38 2021 +0000 powerpc/32: Save trap number on stack in exception prolog Saving the trap number into the stack goes into the exception prolog, as EXC_XFER_xxx will soon disappear. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2ac7a0c9cde2ec2b23cd79e3a54cfedd816a91ae.1615552867.git.christophe.leroy@csgroup.eu commit af6f2ce84b2f666762f75f085a7e5d6514743a84 Author: Christophe Leroy Date: Fri Mar 12 12:50:37 2021 +0000 powerpc/32: Call bad_page_fault() from do_page_fault() Now that non volatile registers are saved at all time, no need to split bad_page_fault() out of do_page_fault(). Remove handle_page_fault() and use do_page_fault() directly. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cfb95be8863204cc2bf45a22ea44dd1d0dc16b7f.1615552867.git.christophe.leroy@csgroup.eu commit e72915560b15f58c2ffe08144d9a7163daa18db4 Author: Christophe Leroy Date: Fri Mar 12 12:50:36 2021 +0000 powerpc/32: Set regs parameter in r3 in transfer_to_handler All exception handlers take regs as first parameter. Instead of setting r3 just before each call to a handler, set it in transfer_to_handler. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/f994a379bb895a2cbd518cb82460ad3f3d3ccdf5.1615552867.git.christophe.leroy@csgroup.eu commit db297c3b07af7856fb7c666fbc9792d8e37556be Author: Christophe Leroy Date: Fri Mar 12 12:50:35 2021 +0000 powerpc/32: Don't save thread.regs on interrupt entry Since commit 06d67d54741a ("powerpc: make process.c suitable for both 32-bit and 64-bit"), thread.regs is set on task creation, no need to set it again and again at each interrupt entry as it never change. Suggested-by: Nicholas Piggin Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20d52c627303d63e461797df13e6890fc04017d0.1615552867.git.christophe.leroy@csgroup.eu commit b96bae3ae2cb6337c0a1ad160f4cbb0666e5e38b Author: Christophe Leroy Date: Fri Mar 12 12:50:34 2021 +0000 powerpc/32: Replace ASM exception exit by C exception exit from ppc64 This patch replaces the PPC32 ASM exception exit by C exception exit. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/48f8bae91da899d8e73fc0d75c9af66cc97b4d5b.1615552867.git.christophe.leroy@csgroup.eu commit e9f99704aafcdbd90ba20b81db2dae8526d8b8e5 Author: Christophe Leroy Date: Fri Mar 12 12:50:33 2021 +0000 powerpc/32: Always save non volatile registers on exception entry In preparation of handling exception entry and exit in C, in order to simplify the handling, always save non volatile registers when entering an exception. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3ce8ced87a4f1467fa36fcc50763d53b45e466c1.1615552867.git.christophe.leroy@csgroup.eu commit 0f2793e33db2e2f062968f2ca789b6826972b05b Author: Christophe Leroy Date: Fri Mar 12 12:50:32 2021 +0000 powerpc/32: Perform normal function call in exception entry Now that the MMU is re-enabled before calling the transfer function, we don't need anymore that hack with the address of the handler and the return function sitting just after the 'bl' to the transfer fonction, that function is retrieving via a read relative to 'lr'. Do a regular call to the transfer function, then to the handler, then branch to the return function. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/73c00f3361ca280ef8fd7814c291bd1f5b6e2081.1615552867.git.christophe.leroy@csgroup.eu commit 32d2ca0e969a3620f71dff166a95ebf3f735b72e Author: Christophe Leroy Date: Fri Mar 12 12:50:31 2021 +0000 powerpc/32: Refactor booke critical registers saving Refactor booke critical registers saving into a few macros and move it into the exception prolog directly. Keep the dedicated transfert_to_handler entry point for the moment allthough they are empty. They will be removed in a later patch to reduce churn. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/269171496f1f5f22afa621695bded22976c9d48d.1615552867.git.christophe.leroy@csgroup.eu commit 8f844c06f460687b028c675c3fa68f8e735aeb8c Author: Christophe Leroy Date: Fri Mar 12 12:50:30 2021 +0000 powerpc/32: Provide a name to exception prolog continuation in virtual mode Now that the prolog continuation is separated in .text, give it a name and mark it _ASM_NOKPROBE_SYMBOL. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d96374218815a6627e1e922ab2aba994050fb87a.1615552867.git.christophe.leroy@csgroup.eu commit dc13b889b586f499cc87eb2b0b7e901778b3b5cf Author: Christophe Leroy Date: Fri Mar 12 12:50:29 2021 +0000 powerpc/32: Move exception prolog code into .text once MMU is back on The space in the head section is rather constrained by the fact that exception vectors are spread every 0x100 bytes and sometimes we need to have "out of line" code because it doesn't fit. Now that we are enabling MMU early in the prolog, take that opportunity to jump somewhere else in the .text section where we don't have any space constraint. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/38b31ca4bc782a4985bc7952a675404d7ff27c24.1615552867.git.christophe.leroy@csgroup.eu commit 7bf1d7e1abab0d9f47ebce144deadb4409d0d631 Author: Christophe Leroy Date: Fri Mar 12 12:50:28 2021 +0000 powerpc/32: Use START_EXCEPTION() as much as possible Everywhere where it is possible, use START_EXCEPTION(). This will help for proper exception init in future patches. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d47c1cc242bbbef8658327503726abdaef9b63ef.1615552867.git.christophe.leroy@csgroup.eu commit 5b5e5bc53def654c2dc437dd327f7a47c48d81d3 Author: Christophe Leroy Date: Fri Mar 12 12:50:27 2021 +0000 powerpc/32: Add vmap_stack_overflow label inside the macro For consistency, add in the macro the label used by exception prolog to branch to stack overflow processing. While at it, enclose the macro in #ifdef CONFIG_VMAP_STACK on the 8xx as already done on book3s/32. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/cf80056f5b946572ad98aea9d915dd25b23beda6.1615552867.git.christophe.leroy@csgroup.eu commit a4719f5bb6d7dc220bffdc1b9f5ce5eaa5543581 Author: Christophe Leroy Date: Fri Mar 12 12:50:25 2021 +0000 powerpc/32: Statically initialise first emergency context The check of the emergency context initialisation in vmap_stack_overflow is buggy for the SMP case, as it compares r1 with 0 while in the SMP case r1 is offseted by the CPU id. Instead of fixing it, just perform static initialisation of the first emergency context. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4a67ba422be75713286dca0c86ee0d3df2eb6dfa.1615552867.git.christophe.leroy@csgroup.eu commit 9b6150fb8942d92e0991b9a4b02fa2e6f6b03238 Author: Christophe Leroy Date: Fri Mar 12 12:50:24 2021 +0000 powerpc/32: Enable instruction translation at the same time as data translation On 40x and 8xx, kernel text is pinned. On book3s/32, kernel text is mapped by BATs. Enable instruction translation at the same time as data translation, it makes things simpler. In syscall handler, MSR_RI can also be set at the same time because srr0/srr1 are already saved and r1 is set properly. On booke, translation is always on, so at the end all PPC32 have translation on early. Just update msr. Also update comment in power_save_ppc32_restore(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/5269c7e5f5d2117358af3a89744d75a116be27b0.1615552867.git.christophe.leroy@csgroup.eu commit 5b1c9a0d7f3bcac591767fa1aad1323564673b26 Author: Christophe Leroy Date: Fri Mar 12 12:50:23 2021 +0000 powerpc/32: Tag DAR in EXCEPTION_PROLOG_2 for the 8xx 8xx requires to tag the DAR with a magic value in order to fixup DAR on faults generated by 'dcbX', as the 8xx forgets to update the DAR for those faults. Do the tagging as early as possible, that is before enabling MMU. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/853a2e28ca7c5fc85617037030f99fe6070c9536.1615552867.git.christophe.leroy@csgroup.eu commit 7aa8dd67f15731f659390018b5c9fd95f5975b3d Author: Christophe Leroy Date: Fri Mar 12 12:50:22 2021 +0000 powerpc/32: Always enable data translation in exception prolog If the code can use a stack in vm area, it can also use a stack in linear space. Simplify code by removing old non VMAP stack code on PPC32. That means the data translation is now re-enabled early in exception prolog in all cases, not only when using VMAP stacks. While we are touching EXCEPTION_PROLOG macros, remove the unused for_rtas parameter in EXCEPTION_PROLOG_1. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/7cd6440c60a7e8f4f035b245c57720f51e225aae.1615552866.git.christophe.leroy@csgroup.eu commit 5747230645562921b5bc19f6409f7af08fe17c6d Author: Christophe Leroy Date: Fri Mar 12 12:50:21 2021 +0000 powerpc/32: Remove ksp_limit ksp_limit is there to help detect stack overflows. That is specific to ppc32 as it was removed from ppc64 in commit cbc9565ee826 ("powerpc: Remove ksp_limit on ppc64"). There are other means for detecting stack overflows. As ppc64 has proven to not need it, ppc32 should be able to do without it too. Lets remove it and simplify exception handling. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d789c3385b22e07bedc997613c0d26074cb513e7.1615552866.git.christophe.leroy@csgroup.eu commit e464d92b292cc61f8f0791cf87d3646204bbb208 Author: Christophe Leroy Date: Fri Mar 12 12:50:20 2021 +0000 powerpc/32: Use fast instruction to set MSR RI in exception prolog on 8xx 8xx has registers SPRN_NRI, SPRN_EID and SPRN_EIE for changing MSR EE and RI. Use SPRN_EID in exception prolog to set RI. On an 8xx, it reduces the null_syscall test by 3 cycles. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/65f6bda827c2a2abce71ea7e07543e791163da33.1615552866.git.christophe.leroy@csgroup.eu commit 79f4bb17f18162dd95d6aeb6dc3b7da54d6139aa Author: Christophe Leroy Date: Fri Mar 12 12:50:19 2021 +0000 powerpc/32: Handle bookE debugging in C in exception entry The handling of SPRN_DBCR0 and other registers can easily be done in C instead of ASM. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6d6b2497115890b90cfa72a2b3ab1da5f78123c2.1615552866.git.christophe.leroy@csgroup.eu commit f93d866e14b746112fb29d69197dd83075bbd28c Author: Christophe Leroy Date: Fri Mar 12 12:50:18 2021 +0000 powerpc/32: Entry cpu time accounting in C There is no need for this to be in asm, use the new interrupt entry wrapper. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/daca4c3e05cdfe54d237162a0718b3aaca897662.1615552866.git.christophe.leroy@csgroup.eu commit be39e10506830a2e654fb799a48025999f89a6ff Author: Christophe Leroy Date: Fri Mar 12 12:50:17 2021 +0000 powerpc/32: Reconcile interrupts in C There is no need for this to be in asm anymore, use the new interrupt entry wrapper. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/602e1ec47e15ca540f7edb9cf6feb6c249911bd6.1615552866.git.christophe.leroy@csgroup.eu commit 0512aadd750acf72b8906973c34e7092642d4323 Author: Christophe Leroy Date: Fri Mar 12 12:50:16 2021 +0000 powerpc/40x: Prepare normal exception handler for enabling MMU early Ensure normal exception handler are able to manage stuff with MMU enabled. For that we use CONFIG_VMAP_STACK related code allthough there is no intention to really activate CONFIG_VMAP_STACK on powerpc 40x for the moment. 40x uses SPRN_DEAR instead of SPRN_DAR and SPRN_ESR instead of SPRN_DSISR. Take it into account in common macros. 40x MSR value doesn't fit on 15 bits, use LOAD_REG_IMMEDIATE() in common macros that will be used also with 40x. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/01963af2b83037bca270d7bf1336ffcf35da8282.1615552866.git.christophe.leroy@csgroup.eu commit 0fc1e93481f67a49f67c9168b71842eeb0998b25 Author: Christophe Leroy Date: Fri Mar 12 12:50:15 2021 +0000 powerpc/40x: Prepare for enabling MMU in critical exception prolog In order the enable MMU early in exception prolog, implement CONFIG_VMAP_STACK principles in critical exception prolog. There is no intention to use CONFIG_VMAP_STACK on 40x, but related code will be used to enable MMU early in exception in a later patch. Also address (critirq_ctx - PAGE_OFFSET) directly instead of using tophys() in order to win one instruction. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3fd75ee54c48307119acdbf66cfea966c1463bbd.1615552866.git.christophe.leroy@csgroup.eu commit 26c468860c32022ffe9caf16691764b77fb8eead Author: Christophe Leroy Date: Fri Mar 12 12:50:14 2021 +0000 powerpc/40x: Reorder a few instructions in critical exception prolog In order to ease preparation for CONFIG_VMAP_STACK, reorder a few instruction, especially save r1 into stack frame earlier. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/c895ecf958c86d1736bdd2ff6f36626b55f35fd2.1615552866.git.christophe.leroy@csgroup.eu commit fcd4b43c36c69aa41e79a511edbb06c7020a6061 Author: Christophe Leroy Date: Fri Mar 12 12:50:13 2021 +0000 powerpc/40x: Save SRR0/SRR1 and r10/r11 earlier in critical exception In order to be able to switch MMU on in exception prolog, save SRR0 and SRR1 earlier. Also save r10 and r11 into stack earlier to better match with the normal exception prolog. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/79a93f253d72dc97ac968c9c62b5066960b688ed.1615552866.git.christophe.leroy@csgroup.eu commit 9d3c18a11a930afe65d33527300a42e0872c744d Author: Christophe Leroy Date: Fri Mar 12 12:50:12 2021 +0000 powerpc/40x: Change CRITICAL_EXCEPTION_PROLOG macro to a gas macro Change CRITICAL_EXCEPTION_PROLOG macro to a gas macro to remove the ugly ; and \ on each line. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/73291fb9dc9ec58182c27a40dfc3db204e3f4024.1615552866.git.christophe.leroy@csgroup.eu commit 52ae92cc290f0506eef9ad5466bb453ce4a9e80e Author: Christophe Leroy Date: Fri Mar 12 12:50:11 2021 +0000 powerpc/40x: Don't use SPRN_SPRG_SCRATCH0/1 in TLB miss handlers SPRN_SPRG_SCRATCH5 is used to save SPRN_PID. SPRN_SPRG_SCRATCH6 is already available. SPRN_PID is only 8 bits. We have r12 that contains CR. We only need to preserve CR0, so we have space available in r12 to save PID. Keep PID in r12 and free up SPRN_SPRG_SCRATCH5. Then In TLB miss handlers, instead of using SPRN_SPRG_SCRATCH0 and SPRN_SPRG_SCRATCH1, use SPRN_SPRG_SCRATCH5 and SPRN_SPRG_SCRATCH6 to avoid future conflicts with normal exception prologs. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4cdaa85d38e14d594ba902424060ec55babf2c42.1615552866.git.christophe.leroy@csgroup.eu commit a58cbed68315111c663f35603a42547f72acd6f8 Author: Christophe Leroy Date: Fri Mar 12 12:50:10 2021 +0000 powerpc/traps: Declare unrecoverable_exception() as __noreturn unrecoverable_exception() is never expected to return, most callers have an infiniteloop in case it returns. Ensure it really never returns by terminating it with a BUG(), and declare it __no_return. It always GCC to really simplify functions calling it. In the exemple below, it avoids the stack frame in the likely fast path and avoids code duplication for the exit. With this patch: 00000348 : 348: 81 43 00 84 lwz r10,132(r3) 34c: 71 48 00 02 andi. r8,r10,2 350: 41 82 00 2c beq 37c 354: 71 4a 40 00 andi. r10,r10,16384 358: 40 82 00 20 bne 378 35c: 80 62 00 70 lwz r3,112(r2) 360: 74 63 00 01 andis. r3,r3,1 364: 40 82 00 28 bne 38c 368: 7d 40 00 a6 mfmsr r10 36c: 7c 11 13 a6 mtspr 81,r0 370: 7c 12 13 a6 mtspr 82,r0 374: 4e 80 00 20 blr 378: 48 00 00 00 b 378 37c: 94 21 ff f0 stwu r1,-16(r1) 380: 7c 08 02 a6 mflr r0 384: 90 01 00 14 stw r0,20(r1) 388: 48 00 00 01 bl 388 388: R_PPC_REL24 unrecoverable_exception 38c: 38 e2 00 70 addi r7,r2,112 390: 3d 00 00 01 lis r8,1 394: 7c c0 38 28 lwarx r6,0,r7 398: 7c c6 40 78 andc r6,r6,r8 39c: 7c c0 39 2d stwcx. r6,0,r7 3a0: 40 a2 ff f4 bne 394 3a4: 38 60 00 01 li r3,1 3a8: 4b ff ff c0 b 368 Without this patch: 00000348 : 348: 94 21 ff f0 stwu r1,-16(r1) 34c: 93 e1 00 0c stw r31,12(r1) 350: 7c 7f 1b 78 mr r31,r3 354: 81 23 00 84 lwz r9,132(r3) 358: 71 2a 00 02 andi. r10,r9,2 35c: 41 82 00 34 beq 390 360: 71 29 40 00 andi. r9,r9,16384 364: 40 82 00 28 bne 38c 368: 80 62 00 70 lwz r3,112(r2) 36c: 74 63 00 01 andis. r3,r3,1 370: 40 82 00 3c bne 3ac 374: 7d 20 00 a6 mfmsr r9 378: 7c 11 13 a6 mtspr 81,r0 37c: 7c 12 13 a6 mtspr 82,r0 380: 83 e1 00 0c lwz r31,12(r1) 384: 38 21 00 10 addi r1,r1,16 388: 4e 80 00 20 blr 38c: 48 00 00 00 b 38c 390: 7c 08 02 a6 mflr r0 394: 90 01 00 14 stw r0,20(r1) 398: 48 00 00 01 bl 398 398: R_PPC_REL24 unrecoverable_exception 39c: 80 01 00 14 lwz r0,20(r1) 3a0: 81 3f 00 84 lwz r9,132(r31) 3a4: 7c 08 03 a6 mtlr r0 3a8: 4b ff ff b8 b 360 3ac: 39 02 00 70 addi r8,r2,112 3b0: 3d 40 00 01 lis r10,1 3b4: 7c e0 40 28 lwarx r7,0,r8 3b8: 7c e7 50 78 andc r7,r7,r10 3bc: 7c e0 41 2d stwcx. r7,0,r8 3c0: 40 a2 ff f4 bne 3b4 3c4: 38 60 00 01 li r3,1 3c8: 4b ff ff ac b 374 Signed-off-by: Christophe Leroy Reviewed-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1e883e9d93fdb256853d1434c8ad77c257349b2d.1615552866.git.christophe.leroy@csgroup.eu commit 24a806d849c0b0c1d0cd6a6b93ba4ae4c0ec9f08 Author: Gao Xiang Date: Mon Mar 29 08:36:14 2021 +0800 erofs: add unsupported inode i_format check If any unknown i_format fields are set (may be of some new incompat inode features), mark such inode as unsupported. Just in case of any new incompat i_format fields added in the future. Link: https://lore.kernel.org/r/20210329003614.6583-1-hsiangkao@aol.com Fixes: 431339ba9042 ("staging: erofs: add inode operations") Cc: # 4.19+ Signed-off-by: Gao Xiang commit 8137824eddd2e790c61c70c20d70a087faca95fa Author: Yue Hu Date: Thu Mar 25 15:10:08 2021 +0800 erofs: don't use erofs_map_blocks() any more Currently, erofs_map_blocks() will be called only from erofs_{bmap, read_raw_page} which are all for uncompressed files. So, the compression branch in erofs_map_blocks() is pointless. Let's remove it and use erofs_map_blocks_flatmode() directly. Also update related comments. Link: https://lore.kernel.org/r/20210325071008.573-1-zbestahu@gmail.com Reviewed-by: Chao Yu Signed-off-by: Yue Hu Signed-off-by: Gao Xiang commit 0b964600d3aae56ff9d5bdd710a79f39a44c572c Author: Gao Xiang Date: Mon Mar 22 02:32:27 2021 +0800 erofs: complete a missing case for inplace I/O Add a missing case which could cause unnecessary page allocation but not directly use inplace I/O instead, which increases runtime extra memory footprint. The detail is, considering an online file-backed page, the right half of the page is chosen to be cached (e.g. the end page of a readahead request) and some of its data doesn't exist in managed cache, so the pcluster will be definitely kept in the submission chain. (IOWs, it cannot be decompressed without I/O, e.g., due to the bypass queue). Currently, DELAYEDALLOC/TRYALLOC cases can be downgraded as NOINPLACE, and stop online pages from inplace I/O. After this patch, unneeded page allocations won't be observed in pickup_page_for_submission() then. Link: https://lore.kernel.org/r/20210321183227.5182-1-hsiangkao@aol.com Signed-off-by: Gao Xiang commit 30048cdac4b92f39ee50e2a1344f5899f8e70cb6 Author: Huang Jianan Date: Wed Mar 17 11:54:48 2021 +0800 erofs: use sync decompression for atomic contexts only Sync decompression was introduced to get rid of additional kworker scheduling overhead. But there is no such overhead in non-atomic contexts. Therefore, it should be better to turn off sync decompression to avoid the current thread waiting in z_erofs_runqueue. Link: https://lore.kernel.org/r/20210317035448.13921-3-huangjianan@oppo.com Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao Signed-off-by: Gao Xiang commit 648f2de053a882c87c05f0060f47d3b11841fdbe Author: Huang Jianan Date: Wed Mar 17 11:54:47 2021 +0800 erofs: use workqueue decompression for atomic contexts only z_erofs_decompressqueue_endio may not be executed in the atomic context, for example, when dm-verity is turned on. In this scenario, data can be decompressed directly to get rid of additional kworker scheduling overhead. Link: https://lore.kernel.org/r/20210317035448.13921-2-huangjianan@oppo.com Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao Signed-off-by: Gao Xiang commit b4892fa3e7fd69e78a82356de45b90758589cafc Author: Huang Jianan Date: Tue Mar 16 11:15:14 2021 +0800 erofs: avoid memory allocation failure during rolling decompression Currently, err would be treated as io error. Therefore, it'd be better to ensure memory allocation during rolling decompression to avoid such io error. In the long term, we might consider adding another !Uptodate case for such case. Link: https://lore.kernel.org/r/20210316031515.90954-1-huangjianan@oppo.com Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao Signed-off-by: Gao Xiang commit 51c8eaa1b73e39d4f36a2a55ba5c68404b53fa78 Author: Michael Walle Date: Tue Mar 23 16:07:57 2021 +0100 arm64: dts: fsl-ls1028a-kontron-sl28: add rtc0 alias For completeness, add the rtc0 alias. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit c75dc98b58dbfc023cab5b862e26ab8753c0d94d Author: Michael Walle Date: Tue Mar 23 16:07:56 2021 +0100 arm64: dts: ls1028a: move rtc alias to individual boards The aliases are board-specific and shouldn't be included in the common SoC dtsi. Move them over to the boards. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 2d9f69bc5a5a75579b410beb0dc3d313be762c9f Author: Laurent Dufour Date: Wed Mar 10 18:44:05 2021 +0100 cxl: don't manipulate the mm.mm_users field directly It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Signed-off-by: Laurent Dufour Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210310174405.51044-1-ldufour@linux.ibm.com commit d943bc742a6aabc578b6b62a713ceedf8bf16623 Author: Ravi Bangoria Date: Thu Mar 11 14:45:38 2021 +0530 powerpc/uprobes: Validation for prefixed instruction As per ISA 3.1, prefixed instruction should not cross 64-byte boundary. So don't allow Uprobe on such prefixed instruction. There are two ways probed instruction is changed in mapped pages. First, when Uprobe is activated, it searches for all the relevant pages and replace instruction in them. In this case, if that probe is on the 64-byte unaligned prefixed instruction, error out directly. Second, when Uprobe is already active and user maps a relevant page via mmap(), instruction is replaced via mmap() code path. But because Uprobe is invalid, entire mmap() operation can not be stopped. In this case just print an error and continue. Signed-off-by: Ravi Bangoria Acked-by: Naveen N. Rao Acked-by: Sandipan Das Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210311091538.368590-1-ravi.bangoria@linux.ibm.com commit d3ccc9781560af051554017c702631560bdc0811 Author: Christopher M. Riedl Date: Fri Feb 26 19:12:59 2021 -0600 powerpc/signal: Use __get_user() to copy sigset_t Usually sigset_t is exactly 8B which is a "trivial" size and does not warrant using __copy_from_user(). Use __get_user() directly in anticipation of future work to remove the trivial size optimizations from __copy_from_user(). The ppc32 implementation of get_sigset_t() previously called copy_from_user() which, unlike __copy_from_user(), calls access_ok(). Replacing this w/ __get_user() (no access_ok()) is fine here since both callsites in signal_32.c are preceded by an earlier access_ok(). Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-11-cmr@codefail.de commit 0f92433b8f9f76608528101e7a81cd3bfd00e236 Author: Daniel Axtens Date: Fri Feb 26 19:12:58 2021 -0600 powerpc/signal64: Rewrite rt_sigreturn() to minimise uaccess switches Add uaccess blocks and use the 'unsafe' versions of functions doing user access where possible to reduce the number of times uaccess has to be opened/closed. Co-developed-by: Christopher M. Riedl Signed-off-by: Daniel Axtens Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-10-cmr@codefail.de commit 96d7a4e06fab9fbc4f67c563af65b073902f3e61 Author: Daniel Axtens Date: Fri Feb 26 19:12:57 2021 -0600 powerpc/signal64: Rewrite handle_rt_signal64() to minimise uaccess switches Add uaccess blocks and use the 'unsafe' versions of functions doing user access where possible to reduce the number of times uaccess has to be opened/closed. There is no 'unsafe' version of copy_siginfo_to_user, so move it slightly to allow for a "longer" uaccess block. Co-developed-by: Christopher M. Riedl Signed-off-by: Daniel Axtens Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-9-cmr@codefail.de commit b3535535922d63c97c20eeea3637346a1534bc71 Author: Michael Walle Date: Thu Mar 18 18:18:56 2021 +0100 arm64: dts: fsl-ls1028a-kontron-sl28: combine unused partitions The failsafe partitions for the DP firmware and for AT-F are unused. If AT-F will ever be supported in the failsafe mode, then it will be a FIT image. Thus fold the unused partitions into the failsafe bootloader one to have enough storage if the bootloader image will grow. While at it, remove the reserved partition. It served no purpose other than having no hole in the map. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit aa4943300e185eb6da27016f2294862aca6895a6 Author: Michael Walle Date: Thu Mar 18 18:18:55 2021 +0100 arm64: dts: fsl-ls1028a-kontron-sl28: move MTD partitions Move the MTD partitions to the partitions subnode. This is the new way to specify the partitions, see Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit 798a1807ab13a38e21c6fecd8d22a513d6786e2d Author: Fabio Estevam Date: Thu Mar 18 08:13:30 2021 -0300 arm64: dts: imx8mp-evk: Improve the Ethernet PHY description According to the datasheet RTL8211, it must be asserted low for at least 10ms and at least 72ms "for internal circuits settling time" before accessing the PHY registers. Add properties to describe such requirements. Reported-by: Joakim Zhang Signed-off-by: Fabio Estevam Tested-by: Joakim Zhang Signed-off-by: Shawn Guo commit a362b0cc94d476b097ba0ff466958c1d4e27e219 Author: Sebastian Krzyszkowiak Date: Mon Mar 15 09:35:30 2021 +0100 arm64: dts: imx8mq-librem5-r3: Mark buck3 as always on Commit 99e71c029213 ("arm64: dts: imx8mq-librem5: Don't mark buck3 as always on") removed always-on marking from GPU regulator, which is great for power saving - however it introduces additional i2c0 traffic which can be deadly for devices from the Dogwood batch. To workaround the i2c0 shutdown issue on Dogwood, this commit marks buck3 as always-on again - but only for Dogwood (r3). Signed-off-by: Sebastian Krzyszkowiak Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 7fffadcf7218f17deed66b57dbbc37487f442964 Author: Guido Günther Date: Mon Mar 15 09:35:29 2021 +0100 arm64: dts: imx8mq-librem5: Hog the correct gpio There was an additional alias in the specifier it hogged line 27 instead of line 1. Signed-off-by: Guido Günther Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 312a46148513d8567d013c3474e64543aeea5950 Author: Russell King Date: Tue Mar 9 16:36:58 2021 +0000 arm64: dts: lx2160a-clearfog-itx: add SFP support Add 2x2 SFP+ cage support for clearfog-itx boards. Signed-off-by: Russell King Signed-off-by: Shawn Guo commit 846f752866bd366749fcc341f38af5e65628d18b Author: Teresa Remmet Date: Thu Mar 11 07:14:46 2021 +0100 arm64: dts: imx8mp-phyboard-pollux-rdk: Change debug UART With the first redesign the debug UART had changed from UART2 to UART1. As the first hardware revision is considered as alpha and will not be supported in future. The old setup will not be preserved. Signed-off-by: Teresa Remmet Signed-off-by: Shawn Guo commit f29fa74453160ba67661a12f70c56be2672c9ccb Author: Kuldeep Singh Date: Tue Mar 9 16:44:25 2021 +0530 arm64: dts: imx8mn: Reorder flexspi clock-names entry Reorder flexspi clock-names entry to make it compliant with bindings. Signed-off-by: Kuldeep Singh Signed-off-by: Shawn Guo commit 9eaf9984221b18612da5a6404a7d54e02c1bcc32 Author: Kuldeep Singh Date: Tue Mar 9 16:44:24 2021 +0530 arm64: dts: imx8mm: Reorder flexspi clock-names entry Reorder flexspi clock-names entry to make it compliant with bindings. Signed-off-by: Kuldeep Singh Signed-off-by: Shawn Guo commit 2c832fe41a8d79d40bba8c5b7147ba47a1d15615 Author: Vladimir Oltean Date: Mon Mar 8 15:08:34 2021 +0200 arm64: dts: ls1028a: set up the real link speed for ENETC port 2 In NXP LS1028A there is a MAC-to-MAC internal link between enetc_port2 and mscc_felix_port4. This link operates at 2.5Gbps and is described as such for the mscc_felix_port4 node. The reason for the discrepancy is a limitation in the PHY library support for fixed-link nodes. Due to the fact that the PHY library registers a software PHY which emulates the clause 22 register map, the drivers/net/phy/fixed_phy.c driver only supports speeds up to 1Gbps. The mscc_felix_port4 node is probed by DSA, which does not use the PHY library directly, but phylink, and phylink has a different representation for fixed-link nodes, one that does not have the limitation of not being able to represent speeds > 1Gbps. Since the enetc driver was converted to phylink too as of commit 71b77a7a27a3 ("enetc: Migrate to PHYLINK and PCS_LYNX"), the limitation has been practically lifted there too, and we can describe the real link speed in the device tree now. Signed-off-by: Vladimir Oltean Signed-off-by: Shawn Guo commit 4eac5e728b9d753611817bd30c14881aa950a318 Author: Adrien Grassein Date: Mon Mar 8 13:55:18 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: add ecspi2 support Add the description for ecspi2 support. Signed-off-by: Adrien Grassein Reviewed-by: Krzysztof Kozlowski Reviewed-by: Fabio Estevam Reviewed-by: Marco Felsch Signed-off-by: Shawn Guo commit 307fd14d4b14c8cfda5870e1af3962f7b58e59d7 Author: Dong Aisheng Date: Mon Mar 8 11:14:30 2021 +0800 arm64: dts: imx: add imx8qm mek support The i.MX8QuadMax is a Dual (2x) Cortex-A72 and Quad (4x) Cortex-A53 proccessor with powerful graphic and multimedia features. This patch adds i.MX8QuadMax MEK board support. Note that MX8QM needs a special workaround for TLB flush due to a SoC errata, otherwise there may be random crash if enable both clusters of A72 and A53. As the errata workaround is still not in mainline, so we disable A72 cluster first for MX8QM MEK. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit f2180be18a63c7a75af6f89e3abe6ada43d1b326 Author: Dong Aisheng Date: Mon Mar 8 11:14:29 2021 +0800 arm64: dts: imx: add imx8qm common dts file The i.MX8QuadMax is a Dual (2x) Cortex-A72 and Quad (4x) Cortex-A53 proccessor with powerful graphic and multimedia features. It uses the same architecture as MX8QXP, so many SS can be reused. This patch adds i.MX8QuadMax SoC dtsi file. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 3ccc3515ba251f11009cde6b4883a599ecef6863 Author: Dong Aisheng Date: Mon Mar 8 11:14:28 2021 +0800 arm64: dts: imx8qm: add dma ss support The DMA SS of MX8QM is mostly the same as the DMA part in MX8QXP ADMA SS while it has one more instance for each of LPUART, ADC and LPI2C. And unlike MX8QXP that flexcan clocks are shared between multiple CAN instances, MX8QM has separate flexcan clock slice. So we reuse the most part of common imx8-ss-dma.dtsi and add new things based on it. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 35f4e9d7530f691a5595d107c69def63b0274391 Author: Dong Aisheng Date: Mon Mar 8 11:14:27 2021 +0800 arm64: dts: imx8: split adma ss into dma and audio ss amda ss is consisted of dma and audio ss in qxp which are also used in qm. Let's split them into two ss for better code reuse. Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 3a3e72f1ed3a2d957ab076b12c814ace4c291133 Author: Dong Aisheng Date: Mon Mar 8 11:14:26 2021 +0800 arm64: dts: imx8qm: add conn ss support The CONN SS of MX8QM is mostly the same as MX8QXP except it has one more USB HSIC module support. So we can fully reuse the exist CONN SS dtsi. Add -ss-conn.dtsi with compatible string updated according to imx8-ss-conn.dtsi. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit d486c5b60eb97090850f309ace11b71fb04dbd13 Author: Dong Aisheng Date: Mon Mar 8 11:14:25 2021 +0800 arm64: dts: imx8qm: add lsio ss support The LSIO SS of MX8QM is exactly the same as MX8QXP. So we can fully reuse the exist LSIO SS dtsi. Add -ss-lsio.dtsi with compatible string updated according to imx8-ss-lsio.dtsi. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 16c4ea7501b197b5da02f23c0d9df194fe0692e2 Author: Dong Aisheng Date: Mon Mar 8 11:14:24 2021 +0800 arm64: dts: imx8: switch to new lpcg clock binding switch to new lpcg clock binding Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 26de33a1e273ea2b66c5470a4434754d6386d2e2 Author: Dong Aisheng Date: Mon Mar 8 11:14:23 2021 +0800 arm64: dts: imx8: switch to two cell scu clock binding switch to two cell scu clock binding Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit e783b6bc8992d7bcb6d63f1f8323d6cc4248bfd3 Author: Dong Aisheng Date: Mon Mar 8 11:14:22 2021 +0800 arm64: dts: imx8: add adma lpcg clocks Add adma lpcg clocks Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 9de8a226758b8813d6e789fbf70af7329c1a2613 Author: Dong Aisheng Date: Mon Mar 8 11:14:21 2021 +0800 arm64: dts: imx8: add conn lpcg clocks Add conn lpcg clocks Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 438ae46b8e8635fe12af8d7e0b94a6fa155892a5 Author: Dong Aisheng Date: Mon Mar 8 11:14:20 2021 +0800 arm64: dts: imx8: add lsio lpcg clocks Add lsio lpcg clocks Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 0dcd27bda232a5232ddf0750e876d4065d9aa1f8 Author: Dong Aisheng Date: Mon Mar 8 11:14:19 2021 +0800 arm64: dts: imx8qxp: orginize dts in subsystems MX8 SoC is comprised of a few HW subsystems while some of them can be reused in the different SoCs. So let's re-orginize them into subsystems in device tree as well for the possible reuse of the common part. Note, as there's still no devices of hsio subsys, so removed it first instead of creating a subsys headfile with no devices. They will be added back when new devices added. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit b1484229a5adcf64f8ce133ff9b6f197af647af4 Author: Dong Aisheng Date: Mon Mar 8 11:14:18 2021 +0800 arm64: dts: imx8qxp: move scu pd node before scu clock node SCU clock depends on SCU Power domain. Moving scu pd node before scu clock can save a hundred of defer probes of all system devices which depends on power domain and clocks. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit c75c6d584092752b543d457d38c082ea421968ac Author: Dong Aisheng Date: Mon Mar 8 11:14:17 2021 +0800 arm64: dts: imx8qxp: add fallback compatible string for scu pd According to binding doc, add the fallback compatible string for scu pd. Cc: Rob Herring Cc: Mark Rutland Cc: devicetree@vger.kernel.org Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 36133cb5db3c59f29ba05a53ac3f76b730309377 Author: Peng Fan Date: Sun Mar 7 18:30:03 2021 +0800 arm64: dts: imx8mp: add wdog2/3 nodes There is wdog[2,3] in i.MX8MP, so add them. Signed-off-by: Peng Fan Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 5dbadc848259bbe83c2ef3522f4ef78d6d9132b8 Author: Heiko Thiery Date: Wed Mar 3 22:10:05 2021 +0100 arm64: dts: fsl: add support for Kontron pitx-imx8m board The Kontron pitx-imx8m board is based on an i.MX8MQ soc. Signed-off-by: Heiko Thiery Reviewed-by: Krzysztof Kozlowski Reviewed-by: Michael Walle Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 193323e1009437c0885240e75ca71f7963e4a006 Author: Christopher M. Riedl Date: Fri Feb 26 19:12:56 2021 -0600 powerpc/signal64: Replace restore_sigcontext() w/ unsafe_restore_sigcontext() Previously restore_sigcontext() performed a costly KUAP switch on every uaccess operation. These repeated uaccess switches cause a significant drop in signal handling performance. Rewrite restore_sigcontext() to assume that a userspace read access window is open by replacing all uaccess functions with their 'unsafe' versions. Modify the callers to first open, call unsafe_restore_sigcontext(), and then close the uaccess window. Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-8-cmr@codefail.de commit 7bb081c8f043ab166f8c6f26fca744821217dad7 Author: Christopher M. Riedl Date: Fri Feb 26 19:12:55 2021 -0600 powerpc/signal64: Replace setup_sigcontext() w/ unsafe_setup_sigcontext() Previously setup_sigcontext() performed a costly KUAP switch on every uaccess operation. These repeated uaccess switches cause a significant drop in signal handling performance. Rewrite setup_sigcontext() to assume that a userspace write access window is open by replacing all uaccess functions with their 'unsafe' versions. Modify the callers to first open, call unsafe_setup_sigcontext() and then close the uaccess window. Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-7-cmr@codefail.de commit 2d19630e20fe5fbd5813f73fd5b1c81ddec61369 Author: Christopher M. Riedl Date: Fri Feb 26 19:12:54 2021 -0600 powerpc/signal64: Remove TM ifdefery in middle of if/else block Both rt_sigreturn() and handle_rt_signal_64() contain TM-related ifdefs which break-up an if/else block. Provide stubs for the ifdef-guarded TM functions and remove the need for an ifdef in rt_sigreturn(). Rework the remaining TM ifdef in handle_rt_signal64() similar to commit f1cf4f93de2f ("powerpc/signal32: Remove ifdefery in middle of if/else"). Unlike in the commit for ppc32, the ifdef can't be removed entirely since uc_transact in sigframe depends on CONFIG_PPC_TRANSACTIONAL_MEM. Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-6-cmr@codefail.de commit 1a130b67c682be9842f188f593c2080786de4204 Author: Christopher M. Riedl Date: Fri Feb 26 19:12:53 2021 -0600 powerpc: Reference parameter in MSR_TM_ACTIVE() macro Unlike the other MSR_TM_* macros, MSR_TM_ACTIVE does not reference or use its parameter unless CONFIG_PPC_TRANSACTIONAL_MEM is defined. This causes an 'unused variable' compile warning unless the variable is also guarded with CONFIG_PPC_TRANSACTIONAL_MEM. Reference but do nothing with the argument in the macro to avoid a potential compile warning. Signed-off-by: Christopher M. Riedl Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-5-cmr@codefail.de commit c6c9645e37483444ec5182373455b2f22e4b1535 Author: Christopher M. Riedl Date: Fri Feb 26 19:12:52 2021 -0600 powerpc/signal64: Remove non-inline calls from setup_sigcontext() The majority of setup_sigcontext() can be refactored to execute in an "unsafe" context assuming an open uaccess window except for some non-inline function calls. Move these out into a separate prepare_setup_sigcontext() function which must be called first and before opening up a uaccess window. Non-inline function calls should be avoided during a uaccess window for a few reasons: - KUAP should be enabled for as much kernel code as possible. Opening a uaccess window disables KUAP which means any code executed during this time contributes to a potential attack surface. - Non-inline functions default to traceable which means they are instrumented for ftrace. This adds more code which could run with KUAP disabled. - Powerpc does not currently support the objtool UACCESS checks. All code running with uaccess must be audited manually which means: less code -> less work -> fewer problems (in theory). A follow-up commit converts setup_sigcontext() to be "unsafe". Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-4-cmr@codefail.de commit 609355dfc88e2921bfcbd879300d482a9a33378e Author: Christopher M. Riedl Date: Fri Feb 26 19:12:51 2021 -0600 powerpc/signal: Add unsafe_copy_{vsx, fpr}_from_user() Reuse the "safe" implementation from signal.c but call unsafe_get_user() directly in a loop to avoid the intermediate copy into a local buffer. Signed-off-by: Christopher M. Riedl Reviewed-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-3-cmr@codefail.de commit 9466c1799fa2acb68e505a264dcdf53779101ac6 Author: Christopher M. Riedl Date: Fri Feb 26 19:12:50 2021 -0600 powerpc/uaccess: Add unsafe_copy_from_user() Use the same approach as unsafe_copy_to_user() but instead call unsafe_get_user() in a loop. Signed-off-by: Christopher M. Riedl Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210227011259.11992-2-cmr@codefail.de commit deb9b13eb2571fbde164ae012c77985fd14f2f02 Author: Davidlohr Bueso Date: Mon Mar 8 17:59:50 2021 -0800 powerpc/qspinlock: Use generic smp_cond_load_relaxed 49a7d46a06c3 (powerpc: Implement smp_cond_load_relaxed()) added busy-waiting pausing with a preferred SMT priority pattern, lowering the priority (reducing decode cycles) during the whole loop slowpath. However, data shows that while this pattern works well with simple spinlocks, queued spinlocks benefit more being kept in medium priority, with a cpu_relax() instead, being a low+medium combo on powerpc. Data is from three benchmarks on a Power9: 9008-22L 64 CPUs with 2 sockets and 8 threads per core. 1. locktorture. This is data for the lowest and most artificial/pathological level, with increasing thread counts pounding on the lock. Metrics are total ops/minute. Despite some small hits in the 4-8 range, scenarios are either neutral or favorable to this patch. +=========+==========+==========+=======+ | # tasks | vanilla | dirty | %diff | +=========+==========+==========+=======+ | 2 | 46718565 | 48751350 | 4.35 | +---------+----------+----------+-------+ | 4 | 51740198 | 50369082 | -2.65 | +---------+----------+----------+-------+ | 8 | 63756510 | 62568821 | -1.86 | +---------+----------+----------+-------+ | 16 | 67824531 | 70966546 | 4.63 | +---------+----------+----------+-------+ | 32 | 53843519 | 61155508 | 13.58 | +---------+----------+----------+-------+ | 64 | 53005778 | 53104412 | 0.18 | +---------+----------+----------+-------+ | 128 | 53331980 | 54606910 | 2.39 | +=========+==========+==========+=======+ 2. sockperf (tcp throughput) Here a client will do one-way throughput tests to a localhost server, with increasing message sizes, dealing with the sk_lock. This patch shows to put the performance of the qspinlock back to par with that of the simple lock: simple-spinlock vanilla dirty Hmean 14 73.50 ( 0.00%) 54.44 * -25.93%* 73.45 * -0.07%* Hmean 100 654.47 ( 0.00%) 385.61 * -41.08%* 771.43 * 17.87%* Hmean 300 2719.39 ( 0.00%) 2181.67 * -19.77%* 2666.50 * -1.94%* Hmean 500 4400.59 ( 0.00%) 3390.77 * -22.95%* 4322.14 * -1.78%* Hmean 850 6726.21 ( 0.00%) 5264.03 * -21.74%* 6863.12 * 2.04%* 3. dbench (tmpfs) Configured to run with up to ncpusx8 clients, it shows both latency and throughput metrics. For the latency, with the exception of the 64 case, there is really nothing to go by: vanilla dirty Amean latency-1 1.67 ( 0.00%) 1.67 * 0.09%* Amean latency-2 2.15 ( 0.00%) 2.08 * 3.36%* Amean latency-4 2.50 ( 0.00%) 2.56 * -2.27%* Amean latency-8 2.49 ( 0.00%) 2.48 * 0.31%* Amean latency-16 2.69 ( 0.00%) 2.72 * -1.37%* Amean latency-32 2.96 ( 0.00%) 3.04 * -2.60%* Amean latency-64 7.78 ( 0.00%) 8.17 * -5.07%* Amean latency-512 186.91 ( 0.00%) 186.41 * 0.27%* For the dbench4 Throughput (misleading but traditional) there's a small but rather constant improvement: vanilla dirty Hmean 1 849.13 ( 0.00%) 851.51 * 0.28%* Hmean 2 1664.03 ( 0.00%) 1663.94 * -0.01%* Hmean 4 3073.70 ( 0.00%) 3104.29 * 1.00%* Hmean 8 5624.02 ( 0.00%) 5694.16 * 1.25%* Hmean 16 9169.49 ( 0.00%) 9324.43 * 1.69%* Hmean 32 11969.37 ( 0.00%) 12127.09 * 1.32%* Hmean 64 15021.12 ( 0.00%) 15243.14 * 1.48%* Hmean 512 14891.27 ( 0.00%) 15162.11 * 1.82%* Measuring the dbench4 Per-VFS Operation latency, shows some very minor differences within the noise level, around the 0-1% ranges. Fixes: 49a7d46a06c3 ("powerpc: Implement smp_cond_load_relaxed()") Acked-by: Nicholas Piggin Signed-off-by: Davidlohr Bueso Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210318204702.71417-1-dave@stgolabs.net commit c11d56b3761c77f50368b4828cc5d9f5f343148d Author: Alistair Francis Date: Mon Mar 22 09:09:27 2021 -0400 ARM: imx7d-remarkable2: Initial device tree for reMarkable2 The reMarkable2 (https://remarkable.com) is an e-ink tablet based on the imx7d SoC. This commit is based on the DTS provide by reMarkable but ported to the latest kernel (instead of 4.14). I have removed references to non-upstream devices and have changed the UART so that the console can be accessed without having to open up the device via the OTG pogo pins. Currently the kernel boots, but there is no support for the display. WiFi is untested (no display or UART RX makes it hard to test), but should work with the current upstream driver. As it's untested it's not included in this commit. Signed-off-by: Alistair Francis Signed-off-by: Shawn Guo commit 6634b2d252accd3fcdc94a5e0a1319009363892e Author: Alistair Francis Date: Mon Mar 22 09:09:26 2021 -0400 dt-bindings: arm: fsl: Add the reMarkable 2 e-Ink tablet Signed-off-by: Alistair Francis Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 974bdace1aeca78ffe4d6741d33bde4330d49f7f Author: Alistair Francis Date: Mon Mar 22 09:09:25 2021 -0400 dt-bindings: Add vendor prefix for reMarkable reMarkable AS produces eInk tablets Signed-off-by: Alistair Francis Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 94c586e5941a472fd114815f0eed2f2bb6b83a11 Author: Michael Walle Date: Sat Mar 20 19:34:36 2021 +0100 arm64: configs: enable FlexTimer alarm timer This driver is used on Layerscape SoCs to wake up the system from standby. It works in conjunction with the RCPM driver. The latter is only available as a builtin. Signed-off-by: Michael Walle Signed-off-by: Shawn Guo commit f63af5f3b8e2cba1b0b19b5cc4aa00d152f84599 Author: Frank Li Date: Fri Mar 19 16:23:52 2021 -0500 firmware: imx: scu-pd: add missed ADC1 pd ADC1 is not defined in pd driver on 8QM. Signed-off-by: Frank Li Reviewed-by: Dong Aisheng Reviewed-by: Peng Fan Signed-off-by: Shawn Guo commit 21cfd2db9f51c0454d44a103ff12398c2236d3a8 Author: Martin KaFai Lau Date: Sun Mar 28 17:32:13 2021 -0700 bpf: tcp: Fix an error in the bpf_tcp_ca_kfunc_ids list There is a typo in the bbr function, s/even/event/. This patch fixes it. Fixes: e78aea8b2170 ("bpf: tcp: Put some tcp cong functions in allowlist for bpf-tcp-cc") Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210329003213.2274210-1-kafai@fb.com commit fef1869fb8b665f04c2c7084444fc172a4e633d9 Merge: 9d0365448b5b9 4ea29143ebe6c Author: David S. Miller Date: Sun Mar 28 18:12:03 2021 -0700 Merge branch 'ipa-next' Alex Elder says: ==================== net: ipa: a few last bits This series incorporates a few last things that didn't fit neatly with patches I've posted recently. The first patch eliminates all remaining kernel-doc warnings. There's still room for kernel-doc improvement, but at least what's there will no longer produce warnings. The next moves the definition of the value to store in the backward compatibility register (when present) into platform data files. The third removes two endpoint definitions that do not need to be defined. The next two switch the naming convention used for configuration data files to be based on the IPA version rather than the specific platform. I was skeptical about this at first (i.e., I thought a platform might have quirks separate from the IPA version). But I'm now convinced the IPA version is enough to define the details of the hardware block. If any exceptions to this are found, we can treat those differently. Note: these two patches produce warnings from checkpatch.pl about updating MAINTAINERS: these can be ignored. The sixth removes unnecessary checks for alignment of DMA memory allocations, based comments from David Laight. And the last removes a symbol representing the size of a table entry, using sizeof(__le64) in its place. ==================== Signed-off-by: David S. Miller commit 4ea29143ebe6c453f5fddc80ffe4ed046f44aa3a Author: Alex Elder Date: Sun Mar 28 12:31:11 2021 -0500 net: ipa: kill IPA_TABLE_ENTRY_SIZE Entries in an IPA route or filter table are 64-bit little-endian addresses, each of which refers to a routing or filtering rule. The format of these table slots are fixed, but IPA_TABLE_ENTRY_SIZE is used to define their size. This symbol doesn't really add value, and I think it unnecessarily obscures what a table entry *is*. So get rid of IPA_TABLE_ENTRY_SIZE, and just use sizeof(__le64) in its place throughout the code. Update the comments in "ipa_table.c" to provide a little better explanation of these table slots. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 19aaf72c0c7a26ab7ffc655a6d84da6a379f899b Author: Alex Elder Date: Sun Mar 28 12:31:10 2021 -0500 net: ipa: DMA addresses are nicely aligned A recent patch avoided doing 64-bit modulo operations by checking the alignment of some DMA allocations using only the lower 32 bits of the address. David Laight pointed out (after the fix was committed) that DMA allocations might already satisfy the alignment requirements. And he was right. Remove the alignment checks that occur after DMA allocation requests, and update comments to explain why the constraint is satisfied. The only place IPA_TABLE_ALIGN was used was to check the alignment; it is therefore no longer needed, so get rid of it. Add comments where GSI_RING_ELEMENT_SIZE and the tre_count and event_count channel data fields are defined to make explicit they are required to be powers of 2. Revise a comment in gsi_trans_pool_init_dma(), taking into account that dma_alloc_coherent() guarantees its result is aligned to a page size (or order thereof). Don't bother printing an error if a DMA allocation fails. Suggested-by: David Laight Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 782d767a2d0fb08bc4d5d26f789769a84b88400b Author: Alex Elder Date: Sun Mar 28 12:31:09 2021 -0500 net: ipa: use version based configuration for SC7180 Rename the SC7180 configuration data file so that its name is derived from its IPA version. Update a few other references to the code that talk about the SC7180 rather than just IPA v4.2. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fc566dab45f9eab9b07c971daedd0843e688e777 Author: Alex Elder Date: Sun Mar 28 12:31:08 2021 -0500 net: ipa: switch to version based configuration Rename the SDM845 configuration data file so that its name is derived from its IPA version. I am not aware of any special IPA behavior or handling that would be based on a specific SoC (as opposed to a specific version of the IPA it contains). Update a few other references to the code that talk about the SDM845 rather than just IPA v3.5.1. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d21d1f33b190f7c18e83899dfbc5a48ab173ef15 Author: Alex Elder Date: Sun Mar 28 12:31:07 2021 -0500 net: ipa: don't define endpoints unnecessarily We don't typically need much information about modem endpoints. Normally we need to specify information about modem endpoints in configuration data in only two cases: - When a modem TX endpoint supports filtering - When another endpoint's configuration refers to it For the first case, the AP initializes the filter table, and must know how many endpoints (AP and modem) support filtering. An example of the second case is the AP->modem TX endpoint, which defines the modem<-AP RX endpoint as its status endpoint. There is one exception to this, and it's due to a hardware quirk. For IPA v4.2 (only) there is a problem related to allocating GSI channels. And to work around this, the AP allocates *all* GSI channels at startup time--including those used by the modem. Get rid of the configuration information for two endpoints not required for the SDM845. SC7180 runs IPA v4.2, so we can't eliminate any modem endpoint definitions there. Two more minor changes: - Reorder the members defined for the ipa_endpoint_name enumerated type to match the order used in configuration data files when defining endpoints. - Add a new name, IPA_ENDPOINT_MODEM_DL_NLO_TX, which can be used for IPA v4.5+. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e695bed28a5da539144676d979f76c111f9f1020 Author: Alex Elder Date: Sun Mar 28 12:31:06 2021 -0500 net: ipa: store BCR register values in config data The backward compatibility register value is a platform-specific property that is not stored in the platform data. Create a data field where this can be represented, and get rid ipa_reg_bcr_val(). This register is not present starting with IPA v4.5. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 862d3f2c9bd100198fb1b0f7e7e155541b98e2bf Author: Alex Elder Date: Sun Mar 28 12:31:05 2021 -0500 net: ipa: fix all kernel-doc warnings Fix all warnings produced when running: scripts/kernel-doc -none drivers/net/ipa/*.[ch] Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 9d0365448b5b954bba1b551ade5b273d629446bb Author: Guobin Huang Date: Sat Mar 27 18:37:54 2021 +0800 net: moxa: remove redundant dev_err call in moxart_mac_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: David S. Miller commit d759c1bd2696c8d72d0f824eb32eadac6eb210c8 Author: Guobin Huang Date: Sat Mar 27 18:31:51 2021 +0800 net: lantiq: Remove redundant dev_err call in xrx200_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: David S. Miller commit 656151aaa623c20bbfcbd5b4e43acbea8d23410f Author: Guobin Huang Date: Sat Mar 27 18:07:18 2021 +0800 net: dsa: hellcreek: Remove redundant dev_err call in hellcreek_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: David S. Miller commit 8e99ca3fdb31051372b9e8f3a563e59147e0ee10 Author: Guobin Huang Date: Sat Mar 27 17:56:18 2021 +0800 mt76: mt7615: remove redundant dev_err call in mt7622_wmac_probe() There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Reported-by: Hulk Robot Signed-off-by: Guobin Huang Signed-off-by: David S. Miller commit 8d93a4f9ccfdeba2c6a2b6d1e070e4974734fe8c Author: Junlin Yang Date: Sat Mar 27 17:56:17 2021 +0800 mt76: Convert to DEFINE_SHOW_ATTRIBUTE Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Junlin Yang Signed-off-by: David S. Miller commit 6937d8c71f69b680fd6ccc7b439581a9216d9899 Author: Fabio Estevam Date: Thu Mar 18 08:13:29 2021 -0300 arm64: configs: Select REALTEK_PHY as built-in On the i.MX8MP EVK board there is a RTL8211 EThernet PHY and a typical use case is to boot via NFS. In this case the Ethernet PHY driver needs to be built-in, so select the driver as built-in by default. Reported-by: Joakim Zhang Signed-off-by: Fabio Estevam Tested-by: Joakim Zhang Signed-off-by: Shawn Guo commit 30f347ae7cc1178c431f968a89d4b4a375bc0d39 Author: Yang Yingliang Date: Sat Mar 27 17:33:22 2021 +0800 net: stmmac: fix missing unlock on error in stmmac_suspend() Add the missing unlock before return from stmmac_suspend() in the error handling case. Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 7c6b0892b0c5009d5eb8715070a18862f18d7df5 Author: Ulf Hansson Date: Wed Mar 17 10:31:17 2021 +0100 firmware: imx: scu-pd: Update comments for single global power domain Since the introduction of the PM domain support for the scu-pd, the genpd framework has been continuously improved. More preciously, using a single global power domain can quite easily be deployed for imx platforms. To avoid confusions, let's therefore make an update to the comments about the missing pieces. Signed-off-by: Ulf Hansson Signed-off-by: Shawn Guo commit 284fda1eff8a8b27d2cafd7dc8fb423d13720f21 Author: kernel test robot Date: Sat Mar 27 10:29:32 2021 +0100 sit: use min Opportunity for min() Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Reviewed-by: David Ahern Signed-off-by: David S. Miller commit b6908cf795e9687d6323834cf5c6c67a52f64464 Author: Xiongfeng Wang Date: Sat Mar 27 16:15:56 2021 +0800 NFC: digital: Correct function name in the kerneldoc comments Fix the following W=1 kernel build warning(s): net/nfc/digital_core.c:473: warning: expecting prototype for start_poll operation(). Prototype was for digital_start_poll() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller commit f7b88985a1ae71d302596c2f65c6e22eea207fc8 Author: Xiongfeng Wang Date: Sat Mar 27 16:15:55 2021 +0800 ip6_tunnel:: Correct function name parse_tvl_tnl_enc_lim() in the kerneldoc comments Fix the following W=1 kernel build warning(s): net/ipv6/ip6_tunnel.c:401: warning: expecting prototype for parse_tvl_tnl_enc_lim(). Prototype was for ip6_tnl_parse_tlv_enc_lim() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 03ff7371cba41903b9f53617a44093051ead3fe7 Author: Xiongfeng Wang Date: Sat Mar 27 16:15:54 2021 +0800 net: 9p: Correct function names in the kerneldoc comments Fix the following W=1 kernel build warning(s): net/9p/client.c:133: warning: expecting prototype for parse_options(). Prototype was for parse_opts() instead net/9p/client.c:269: warning: expecting prototype for p9_req_alloc(). Prototype was for p9_tag_alloc() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller commit 54e625e3bd1dd59f6d0b95730fa9be2604aceb1c Author: Xiongfeng Wang Date: Sat Mar 27 16:15:53 2021 +0800 9p/trans_fd: Correct function name p9_mux_destroy() in the kerneldoc Fix the following W=1 kernel build warning(s): net/9p/trans_fd.c:881: warning: expecting prototype for p9_mux_destroy(). Prototype was for p9_conn_destroy() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller commit 8bf94a92505e6e9d46a76230b4900238685aa2ae Author: Xiongfeng Wang Date: Sat Mar 27 16:15:52 2021 +0800 net: 9p: Correct function name errstr2errno() in the kerneldoc comments Fix the following W=1 kernel build warning(s): net/9p/error.c:207: warning: expecting prototype for errstr2errno(). Prototype was for p9_errstr2errno() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller commit bb2882bc6c54672b4c57a2108a18ec3acc7c878c Author: Xiongfeng Wang Date: Sat Mar 27 16:15:51 2021 +0800 net: core: Correct function name netevent_unregister_notifier() in the kerneldoc Fix the following W=1 kernel build warning(s): net/core/netevent.c:45: warning: expecting prototype for netevent_unregister_notifier(). Prototype was for unregister_netevent_notifier() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller commit af825087433fb94a431edf387c1265463fce3bd1 Author: Xiongfeng Wang Date: Sat Mar 27 16:15:50 2021 +0800 net: core: Correct function name dev_uc_flush() in the kerneldoc Fix the following W=1 kernel build warning(s): net/core/dev_addr_lists.c:732: warning: expecting prototype for dev_uc_flush(). Prototype was for dev_uc_init() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller commit 3ba937fb95e877f73b33c5b482f303dd9a8bf4fa Author: Xiongfeng Wang Date: Sat Mar 27 16:15:49 2021 +0800 netlabel: Correct function name netlbl_mgmt_add() in the kerneldoc comments Fix the following W=1 kernel build warning(s): net/netlabel/netlabel_mgmt.c:78: warning: expecting prototype for netlbl_mgmt_add(). Prototype was for netlbl_mgmt_add_common() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Signed-off-by: David S. Miller commit 37569287cba1246a5057de32ac42d6c8941c714b Author: Xiongfeng Wang Date: Sat Mar 27 16:15:48 2021 +0800 l3mdev: Correct function names in the kerneldoc comments Fix the following W=1 kernel build warning(s): net/l3mdev/l3mdev.c:111: warning: expecting prototype for l3mdev_master_ifindex(). Prototype was for l3mdev_master_ifindex_rcu() instead net/l3mdev/l3mdev.c:145: warning: expecting prototype for l3mdev_master_upper_ifindex_by_index(). Prototype was for l3mdev_master_upper_ifindex_by_index_rcu() instead Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 4732315ca9fe9f9f9327d6e4b0a2140446e9c48c Author: Ilya Lipnitskiy Date: Fri Mar 26 23:07:52 2021 -0700 net: dsa: mt7530: clean up core and TRGMII clock setup Three minor changes: - When disabling PLL, there is no need to call core_write_mmd_indirect directly, use the core_write wrapper instead like the rest of the code in the function does. This change helps with consistency and readability. Move the comment to the definition of core_read_mmd_indirect where it belongs. - Disable both core and TRGMII Tx clocks prior to reconfiguring. Previously, only the core clock was disabled, but not TRGMII Tx clock. So disable both, then configure them, then re-enable both, for consistency. - The core clock enable bit (REG_GSWCK_EN) is written redundantly three times. Simplify the code and only write the register only once at the end of clock reconfiguration to enable both core and TRGMII Tx clocks. Tested on Ubiquiti ER-X running the GMAC0 and MT7530 in TRGMII mode. Signed-off-by: Ilya Lipnitskiy Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 54422bd436e084e6c74aff6026c1767f1570ab26 Author: Liu Jian Date: Sat Mar 27 12:33:39 2021 +0800 net: hns3: no return statement in hclge_clear_arfs_rules drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c: In function 'hclge_clear_arfs_rules': drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c:7173:1: error: no return statement in function returning non-void [-Werror=return-type] 7173 | } | ^ cc1: some warnings being treated as errors make[6]: *** [scripts/Makefile.build:273: drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.o] Error 1 make[5]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon/hns3/hns3pf] Error 2 make[4]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon/hns3] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [scripts/Makefile.build:534: drivers/net/ethernet/hisilicon] Error 2 make[2]: *** [scripts/Makefile.build:534: drivers/net/ethernet] Error 2 make[1]: *** [scripts/Makefile.build:534: drivers/net] Error 2 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1980: drivers] Error 2 Reported-by: Hulk Robot Signed-off-by: Liu Jian Signed-off-by: David S. Miller commit de1d1ee3e3e9f028623e7beb4c090a2b68572f10 Author: Petr Machata Date: Fri Mar 26 14:20:22 2021 +0100 nexthop: Rename artifacts related to legacy multipath nexthop groups After resilient next-hop groups have been added recently, there are two types of multipath next-hop groups: the legacy "mpath", and the new "resilient". Calling the legacy next-hop group type "mpath" is unfortunate, because that describes the fact that a packet could be forwarded in one of several paths, which is also true for the resilient next-hop groups. Therefore, to make the naming clearer, rename various artifacts to reflect the assumptions made. Therefore as of this patch: - The flag for multipath groups is nh_grp_entry::is_multipath. This includes the legacy and resilient groups, as well as any future group types that behave as multipath groups. Functions that assume this have "mpath" in the name. - The flag for legacy multipath groups is nh_grp_entry::hash_threshold. Functions that assume this have "hthr" in the name. - The flag for resilient groups is nh_grp_entry::resilient. Functions that assume this have "res" in the name. Besides the above, struct nh_grp_entry::mpath was renamed to ::hthr as well. UAPI artifacts were obviously left intact. Suggested-by: David Ahern Signed-off-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 9195f06b2d0fd0d1cc1552970d890c21f6b9492f Author: Lu Wei Date: Sat Mar 27 10:27:24 2021 +0800 net: vsock: Fix a typo Modify "occured" to "occurred" in net/vmw_vsock/af_vsock.c. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 21c00a186fac6e035eef5e6751f1e2d2609f969c Author: Lu Wei Date: Sat Mar 27 10:27:23 2021 +0800 net: sctp: Fix some typos Modify "unkown" to "unknown" in net/sctp/sm_make_chunk.c and Modify "orginal" to "original" in net/sctp/socket.c. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit ebf893958c131f75c4cfa77e43e8efd67628bd31 Author: Lu Wei Date: Sat Mar 27 10:27:22 2021 +0800 net: rds: Fix a typo Modify "beween" to "between" in net/rds/send.c. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 214037a146ffb796d3f4b012e818360d2bb29f6b Author: Colin Ian King Date: Fri Mar 26 19:28:47 2021 +0000 drivers: net: smc91x: remove redundant initialization of pointer gpio The pointer gpio 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 72642f4127c3b560516127408e8f9b92a56e486e Merge: a7fd0e6d758f0 53b61f29367df Author: David S. Miller Date: Sun Mar 28 17:48:28 2021 -0700 Merge branch 'selftests-packets-per-second' Simon Horman says: ==================== selftest: add tests for packet per second Add self tests for the recently added packet per second rate limiting feature of the TC policer action[1]. The forwarding selftest (patch 2/2) depends on iproute2 support for packet per second rate limiting, which has been posted separately[2] [1] [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing https://lore.kernel.org/netdev/20210312140831.23346-1-simon.horman@netronome.com/ [2] [PATCH iproute2-next] police: add support for packet-per-second rate limiting https://lore.kernel.org/netdev/20210326125018.32091-1-simon.horman@netronome.com/ ==================== Signed-off-by: David S. Miller commit 53b61f29367df398243b7298ad1e5793c289a493 Author: Baowen Zheng Date: Fri Mar 26 14:09:38 2021 +0100 selftests: forwarding: Add tc-police tests for packets per second Test tc-police action for packets per second. The test is mainly in scenarios Rx policing and Tx policing. The test passes with veth pairs ports. Signed-off-by: Baowen Zheng Signed-off-by: Simon Horman Signed-off-by: David S. Miller commit c127ffa23e41e6cb2251d5c30e54d60777034caa Author: Baowen Zheng Date: Fri Mar 26 14:09:37 2021 +0100 selftests: tc-testing: add action police selftest for packets per second Add selftest cases in action police for packets per second. These tests depend on corresponding iproute2 command support. Signed-off-by: Baowen Zheng Signed-off-by: Simon Horman Reviewed-by: Jamal Hadi Salim Signed-off-by: David S. Miller commit a7fd0e6d758f0f29268438287ecf7873c069a3ae Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:54 2021 +0530 xfrm_user.c: Added a punctuation s/wouldnt/wouldn\'t/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit aa8ef1b9abd413d5c062d16e3d6b2fb418f9091c Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:53 2021 +0530 xfrm_policy.c : Mundane typo fix s/sucessful/successful/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit fb373c8455af40faf72d7b8c7f53ed302bd554d9 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:52 2021 +0530 sm_statefuns.c: Mundane spello fixes s/simulataneous/simultaneous/ ....in three dirrent places. s/tempory/temporary/ s/interpeter/interpreter/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit f2e3093172b9726f3e16a47d5d83ce2edf4060f0 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:51 2021 +0530 reg.c: Fix a spello s/ingoring/ignoring/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit 0184235ec6d1decb56740d9c99fdd0035b1d4c9d Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:50 2021 +0530 node.c: A typo fix s/synching/syncing/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit bcae6d5faf3fe4746b9e96a8a3d6918cc05dc252 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:49 2021 +0530 netfilter: nf_conntrack_acct.c: A typo fix s/Accouting/Accounting/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit f60d94f0d7b42dd1caed258ff23b93e038bde745 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:48 2021 +0530 netfilter: ipvs: A spello fix s/registerd/registered/ Signed-off-by: Bhaskar Chowdhury Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 195a8ec4033b4124f6864892e71dcef24ba74a5a Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:47 2021 +0530 ncsi: internal.h: Fix a spello s/Firware/Firmware/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit 55320b82d634b15a6ac6c5cdbbde1ced2cbfa06d Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:46 2021 +0530 mptcp: subflow.c: Fix a typo s/concerened/concerned/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit b18dacab6bc4a31b08b134a23d67f9fb2dd5a844 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:45 2021 +0530 mac80211: cfg.c: A typo fix s/assocaited/associated/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit 61f8406010843584eaf04d195fbd707f654cfb89 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:44 2021 +0530 llc: llc_core.c: COuple of typo fixes s/searchs/searches/ ....two different places. Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit 71a2fae50895b32cd600c0c4eff5df9c9c9933da Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:43 2021 +0530 kcm: kcmsock.c: Couple of typo fixes s/synchonization/synchronization/ s/aready/already/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit bf05d48dbda80d864dbdb46c6641954df3bf45d3 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:42 2021 +0530 iucv: af_iucv.c: Couple of typo fixes s/unitialized/uninitialized/ s/notifcations/notifications/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit 89e8347f0ff4b8bfe23e174e6661902582754394 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:41 2021 +0530 ipv6: route.c: A spello fix s/notfication/notification/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit 912b519afc8f13743b473910504e8bfb9eb7de77 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:40 2021 +0530 ipv6: addrconf.c: Fix a typo s/Identifers/Identifiers/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit e5ca43e82d91212e24686fafca118f25cf985bfb Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:39 2021 +0530 ipv4: tcp_lp.c: Couple of typo fixes s/resrved/reserved/ s/within/within/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit a66e04ce0e01ec8be981a583ae200ac1f0dbd736 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:38 2021 +0530 ipv4: ip_output.c: Couple of typo fixes s/readibility/readability/ s/insufficent/insufficient/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit e919ee389c18c04c2eb9d4b0fdbc9b52545cce37 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:37 2021 +0530 bearer.h: Spellos fixed s/initalized/initialized/ ...three different places Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit 8406d38fde5c3a2d3182b30f9a3b457aa79949e4 Author: Bhaskar Chowdhury Date: Sat Mar 27 04:42:36 2021 +0530 af_x25.c: Fix a spello s/facilties/facilities/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit ebca17707e38f2050b188d837bd4646b29a1b0c2 Author: Fenghua Yu Date: Mon Mar 22 13:53:25 2021 +0000 Documentation/admin-guide: Change doc for split_lock_detect parameter Since #DB for bus lock detect changes the split_lock_detect parameter, update the documentation for the changes. Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210322135325.682257-4-fenghua.yu@intel.com commit ebb1064e7c2e90b56e4d40ab154ef9796060a1c3 Author: Fenghua Yu Date: Mon Mar 22 13:53:24 2021 +0000 x86/traps: Handle #DB for bus lock Bus locks degrade performance for the whole system, not just for the CPU that requested the bus lock. Two CPU features "#AC for split lock" and "#DB for bus lock" provide hooks so that the operating system may choose one of several mitigation strategies. #AC for split lock is already implemented. Add code to use the #DB for bus lock feature to cover additional situations with new options to mitigate. split_lock_detect= #AC for split lock #DB for bus lock off Do nothing Do nothing warn Kernel OOPs Warn once per task and Warn once per task and and continues to run. disable future checking When both features are supported, warn in #AC fatal Kernel OOPs Send SIGBUS to user. Send SIGBUS to user When both features are supported, fatal in #AC ratelimit:N Do nothing Limit bus lock rate to N per second in the current non-root user. Default option is "warn". Hardware only generates #DB for bus lock detect when CPL>0 to avoid nested #DB from multiple bus locks while the first #DB is being handled. So no need to handle #DB for bus lock detected in the kernel. #DB for bus lock is enabled by bus lock detection bit 2 in DEBUGCTL MSR while #AC for split lock is enabled by split lock detection bit 29 in TEST_CTRL MSR. Both breakpoint and bus lock in the same instruction can trigger one #DB. The bus lock is handled before the breakpoint in the #DB handler. Delivery of #DB for bus lock in userspace clears DR6[11], which is set by the #DB handler right after reading DR6. Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20210322135325.682257-3-fenghua.yu@intel.com commit f21d4d3b97a8603567e5d4250bd75e8ebbd520af Author: Fenghua Yu Date: Mon Mar 22 13:53:23 2021 +0000 x86/cpufeatures: Enumerate #DB for bus lock detection A bus lock is acquired through either a split locked access to writeback (WB) memory or any locked access to non-WB memory. This is typically >1000 cycles slower than an atomic operation within a cache line. It also disrupts performance on other cores. Some CPUs have the ability to notify the kernel by a #DB trap after a user instruction acquires a bus lock and is executed. This allows the kernel to enforce user application throttling or mitigation. Both breakpoint and bus lock can trigger the #DB trap in the same instruction and the ordering of handling them is the kernel #DB handler's choice. The CPU feature flag to be shown in /proc/cpuinfo will be "bus_lock_detect". Signed-off-by: Fenghua Yu Signed-off-by: Thomas Gleixner Reviewed-by: Tony Luck Link: https://lore.kernel.org/r/20210322135325.682257-2-fenghua.yu@intel.com commit 1591584e2e762edecefde403c44d9c26c9ff72c9 Author: Lai Jiangshan Date: Tue Jan 26 01:34:29 2021 +0800 x86/process/64: Move cpu_current_top_of_stack out of TSS cpu_current_top_of_stack is currently stored in TSS.sp1. TSS is exposed through the cpu_entry_area which is visible with user CR3 when PTI is enabled and active. This makes it a coveted fruit for attackers. An attacker can fetch the kernel stack top from it and continue next steps of actions based on the kernel stack. But it is actualy not necessary to be stored in the TSS. It is only accessed after the entry code switched to kernel CR3 and kernel GS_BASE which means it can be in any regular percpu variable. The reason why it is in TSS is historical (pre PTI) because TSS is also used as scratch space in SYSCALL_64 and therefore cache hot. A syscall also needs the per CPU variable current_task and eventually __preempt_count, so placing cpu_current_top_of_stack next to them makes it likely that they end up in the same cache line which should avoid performance regressions. This is not enforced as the compiler is free to place these variables, so these entry relevant variables should move into a data structure to make this enforceable. The seccomp_benchmark doesn't show any performance loss in the "getpid native" test result. Actually, the result changes from 93ns before to 92ns with this change when KPTI is disabled. The test is very stable and although the test doesn't show a higher degree of precision it gives enough confidence that moving cpu_current_top_of_stack does not cause a regression. [ tglx: Removed unneeded export. Massaged changelog ] Signed-off-by: Lai Jiangshan Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210125173444.22696-2-jiangshanlai@gmail.com commit bd9a5fc2edb0bdcb0756298daa31ddd6a02f0634 Author: Davidlohr Bueso Date: Fri Jan 22 09:11:01 2021 -0800 MAINTAINERS: Add myself as futex reviewer I'm volunteering to help review some of the pain. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210122171101.15991-1-dave@stgolabs.net commit 0b4a285e2c65c2c9449c6eccb87298e385213e7b Author: Alexey Makhalov Date: Mon Jan 4 16:47:52 2021 -0800 x86/vmware: Avoid TSC recalibration when frequency is known When the TSC frequency is known because it is retrieved from the hypervisor, skip TSC refined calibration by setting X86_FEATURE_TSC_KNOWN_FREQ. Signed-off-by: Alexey Makhalov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210105004752.131069-1-amakhalov@vmware.com commit 7e32a09fdcb38d97f148f72bf78a3b49e8d1612d Author: Atul Gopinathan Date: Sun Mar 28 17:35:15 2021 +0530 bpf: tcp: Remove comma which is causing build error Currently, building the bpf-next source with the CONFIG_BPF_SYSCALL enabled is causing a compilation error: "net/ipv4/bpf_tcp_ca.c:209:28: error: expected identifier or '(' before ',' token" Fix this by removing an unnecessary comma. Fixes: e78aea8b2170 ("bpf: tcp: Put some tcp cong functions in allowlist for bpf-tcp-cc") Reported-by: syzbot+0b74d8ec3bf0cc4e4209@syzkaller.appspotmail.com Signed-off-by: Atul Gopinathan Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210328120515.113895-1-atulgopinathan@gmail.com commit 652d40b2f8bec14957295f999e3d329c3b53390f Author: Niklas Schnelle Date: Wed Mar 24 11:21:21 2021 +0100 s390/pci: fix DMA cleanup on hard deconfigure In commit dee60c0dbc83 ("s390/pci: add zpci_event_hard_deconfigured()") we added a zdev_enabled() check to what was previously an uncoditional call to zpci_disable_device(). There are two problems with that. Firstly zpci_had_deconfigured() is only called on event 0x0304 for which the device is always already disabled by the platform so it is always false. Secondly zpci_disable_device() not only disables the device but also calls zpci_dma_exit_device() which is thus not called and we leak the DMA tables. Fix this by calling zpci_disable_device() unconditionally to perform Linux side cleanup including the freeing of DMA tables. Fixes: dee60c0dbc83 ("s390/pci: add zpci_event_hard_deconfigured()") Reviewed-by: Matthew Rosato Acked-by: Pierre Morel Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 263df6e485445aff8f6189c1913b916b8c7f4f1d Author: Heiko Carstens Date: Mon Mar 22 13:44:47 2021 +0100 s390/spinlock: remove align attribute from arch_spinlock_t No need to add an align attribute for an integer. The alignment is correct anyway. Signed-off-by: Heiko Carstens commit 7f4ebf3e4ce10a1ed8ff2aee5d75568dc3522b2f Author: Timon Baetz Date: Sat Mar 27 20:09:01 2021 +0000 ARM: dts: exynos: Add front camera support to I9100 Add node for Samsung S5K5BAF CMOS image sensor and enable the associated MIPI CSI-2 receiver node. Signed-off-by: Timon Baetz Link: https://lore.kernel.org/r/20210327200851.777327-1-timon.baetz@protonmail.com [krzk: put csis_1 node in alphabetical order] Signed-off-by: Krzysztof Kozlowski commit bd9c9fe2ad04546940f4a9979d679e62cae6aa51 Author: Stefan Riedmueller Date: Thu Mar 25 11:23:37 2021 +0100 mtd: rawnand: bbt: Skip bad blocks when searching for the BBT in NAND The blocks containing the bad block table can become bad as well. So make sure to skip any blocks that are marked bad when searching for the bad block table. Otherwise in very rare cases where two BBT blocks wear out it might happen that an obsolete BBT is used instead of a newer available version. Signed-off-by: Stefan Riedmueller Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210325102337.481172-1-s.riedmueller@phytec.de commit 28f0be44b263ca4b59ea63c801db3830e65fbe99 Author: Wan Jiabing Date: Tue Mar 23 11:17:37 2021 +0800 include: linux: mtd: Remove duplicate include of nand.h linux/mtd/nand.h has been included at line 17. So we remove the duplicate one at line 21. Signed-off-by: Wan Jiabing Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210323031737.259365-1-wanjiabing@vivo.com commit 7134a2d026d942210b4d26d6059c9d979ca7866e Author: Rafał Miłecki Date: Fri Mar 12 14:49:19 2021 +0100 mtd: parsers: ofpart: support Linksys Northstar partitions This allows extending ofpart parser with support for Linksys Northstar devices. That support uses recently added quirks mechanism. Signed-off-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210312134919.7767-2-zajec5@gmail.com commit 2fa7294175c76e1ec568aa75c1891fd908728c8d Author: Rafał Miłecki Date: Fri Mar 12 14:49:18 2021 +0100 dt-bindings: mtd: add binding for Linksys Northstar partitions Linksys on Broadcom Northstar devices uses fixed flash layout with multiple firmware partitions. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210312134919.7767-1-zajec5@gmail.com commit ac42c46f983e4a9003a7bb91ad44a23ab7b8f534 Author: Ansuel Smith Date: Fri Mar 12 07:28:21 2021 +0100 dt-bindings: mtd: Document use of nvmem-cells compatible Document nvmem-cells compatible used to treat mtd partitions as a nvmem provider. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210312062830.20548-3-ansuelsmth@gmail.com commit 52981a0fa9f7d68641e0e6bb584054c6d9eb2056 Author: Ansuel Smith Date: Fri Mar 12 07:28:20 2021 +0100 dt-bindings: nvmem: drop $nodename restriction Drop $nodename restriction as now mtd partition can also be used as nvmem provider. Signed-off-by: Ansuel Smith Reviewed-by: Rob Herring Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210312062830.20548-2-ansuelsmth@gmail.com commit 658c4448bbbf02a143abf1b89d09a3337ebd3ba6 Author: Ansuel Smith Date: Fri Mar 12 07:28:19 2021 +0100 mtd: core: add nvmem-cells compatible to parse mtd as nvmem cells Partitions that contains the nvmem-cells compatible will register their direct subonodes as nvmem cells and the node will be treated as a nvmem provider. Signed-off-by: Ansuel Smith Tested-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210312062830.20548-1-ansuelsmth@gmail.com commit e3c1f1c92d6ede3cfa09d6a103d3d1c1ef645e35 Author: Michael Walle Date: Wed Mar 3 21:18:19 2021 +0100 mtd: add OTP (one-time-programmable) erase ioctl This may sound like a contradiction but some SPI-NOR flashes really support erasing their OTP region until it is finally locked. Having the possibility to erase an OTP region might come in handy during development. The ioctl argument follows the OTPLOCK style. Signed-off-by: Michael Walle Acked-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210303201819.2752-1-michael@walle.cc commit 5cd6fa6de5e903a9500d858fffbc72c574d4513b Author: Mark Rutland Date: Fri Mar 26 18:01:37 2021 +0000 arm64: setup: name `tcr` register In __cpu_setup we conditionally manipulate the TCR_EL1 value in x10 after previously using x10 as a scratch register for unrelated temporary variables. To make this a bit clearer, let's move the TCR_EL1 value into a named register `tcr`. To simplify the register allocation, this is placed in the highest available caller-saved scratch register, tcr. Following the example of `mair`, we initialise the register with the default value prior to any feature discovery, and write it to MAIR_EL1 after all feature discovery is complete, which allows us to simplify the featuere discovery code. The existing `mte_tcr` register is no longer needed, and is replaced by the use of x10 as a temporary, matching the rest of the MTE feature discovery assembly in __cpu_setup. As x20 is no longer used, the function is now AAPCS compliant, as we've generally aimed for in our assembly functions. There should be no functional change as as a result of this patch. Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Will Deacon Link: https://lore.kernel.org/r/20210326180137.43119-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 776e49af6000ef95301d0d3f834543bda43cb7fb Author: Mark Rutland Date: Fri Mar 26 18:01:36 2021 +0000 arm64: setup: name `mair` register In __cpu_setup we conditionally manipulate the MAIR_EL1 value in x5 before later reusing x5 as a scratch register for unrelated temporary variables. To make this a bit clearer, let's move the MAIR_EL1 value into a named register `mair`. To simplify the register allocation, this is placed in the highest available caller-saved scratch register, x17. As it is no longer clobbered by other usage, we can write the value to MAIR_EL1 at the end of the function as we do for TCR_EL1 rather than part-way though feature discovery. There should be no functional change as as a result of this patch. Signed-off-by: Mark Rutland Cc: Marc Zyngier Cc: Will Deacon Link: https://lore.kernel.org/r/20210326180137.43119-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 1e97743fd180981bef5f01402342bb54bf1c6366 Author: Michael Walle Date: Wed Mar 3 16:57:35 2021 +0100 mtd: require write permissions for locking and badblock ioctls MEMLOCK, MEMUNLOCK and OTPLOCK modify protection bits. Thus require write permission. Depending on the hardware MEMLOCK might even be write-once, e.g. for SPI-NOR flashes with their WP# tied to GND. OTPLOCK is always write-once. MEMSETBADBLOCK modifies the bad block table. Fixes: f7e6b19bc764 ("mtd: properly check all write ioctls for permissions") Signed-off-by: Michael Walle Reviewed-by: Greg Kroah-Hartman Acked-by: Rafał Miłecki Acked-by: Richard Weinberger Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210303155735.25887-1-michael@walle.cc commit 25fefc88c71f47db0466570335e3f75f10952e7a Author: Alexander Lobakin Date: Tue Mar 23 17:37:19 2021 +0000 mtd: spinand: core: add missing MODULE_DEVICE_TABLE() The module misses MODULE_DEVICE_TABLE() for both SPI and OF ID tables and thus never autoloads on ID matches. Add the missing declarations. Present since day-0 of spinand framework introduction. Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs") Cc: stable@vger.kernel.org # 4.19+ Signed-off-by: Alexander Lobakin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210323173714.317884-1-alobakin@pm.me commit 5c8a620ab22b05eae7e480cb83ff599047b8aff4 Author: Zou Wei Date: Tue Mar 23 13:11:37 2021 +0000 mtd: rawnand: rockchip: Use flexible-array member instead of zero-length array Suppresses the following coccinelle warning: drivers/mtd/nand/raw/rockchip-nand-controller.c:162:4-8: WARNING use flexible-array member instead Signed-off-by: Zou Wei Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210323131137.45552-1-zou_wei@huawei.com commit 33cebf701e98dd12b01d39d1c644387b27c1a627 Author: Kai Stuhlemmer (ebee Engineering) Date: Mon Mar 22 17:07:14 2021 +0200 mtd: rawnand: atmel: Update ecc_stats.corrected counter Update MTD ECC statistics with the number of corrected bits. Fixes: f88fc122cc34 ("mtd: nand: Cleanup/rework the atmel_nand driver") Cc: stable@vger.kernel.org Signed-off-by: Kai Stuhlemmer (ebee Engineering) Signed-off-by: Tudor Ambarus Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210322150714.101585-1-tudor.ambarus@microchip.com commit 1200c7f834ae7060c61f098db305ef2b92181226 Author: Fabio Estevam Date: Mon Mar 15 21:00:42 2021 -0300 mtd: rawnand: mxc: Remove unneeded of_match_ptr() i.MX is a DT-only platform, so of_match_ptr() can be safely removed. Remove the unneeded of_match_ptr(). Signed-off-by: Fabio Estevam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210316000042.200392-1-festevam@gmail.com commit 4682dd19a6686dccf1871479d12dd1a4a3df0b70 Author: Tian Tao Date: Mon Mar 15 09:08:15 2021 +0800 mtd: rawnand: r852: replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1615770495-31939-1-git-send-email-tiantao6@hisilicon.com commit 7a534c5e4159f9bbac9f3c146dc78e163d8858c2 Author: Zhang Yunkai Date: Sat Mar 13 02:57:02 2021 -0800 mtd: rawnand: remove duplicate include in rawnand.h 'linux/mtd/nand.h' included in 'rawnand.h' is duplicated. It is also included in the 17th line. Signed-off-by: Zhang Yunkai Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210313105702.365878-1-zhang.yunkai@zte.com.cn commit 22ca05b82d3e3abc2b116a11ee41b6b692b95530 Author: Kamal Dasu Date: Thu Mar 11 12:09:09 2021 -0500 mtd: rawnand: brcmnand: move to polling in pio mode on oops write This change makes sure that Broadcom NAND driver moves to interrupt polling on the first brcmnand_write() call. Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210311170909.9031-2-kdasu.kdev@gmail.com commit a071912636cc3420f54e2a6312c1625ac763cf03 Author: Kamal Dasu Date: Thu Mar 11 12:09:08 2021 -0500 mtd: rawnand: brcmnand: read/write oob during EDU transfer Added support to read/write oob during EDU transfers. Signed-off-by: Kamal Dasu Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210311170909.9031-1-kdasu.kdev@gmail.com commit b07f3499661c61f03478c99ff3fcb2381ddb9e38 Author: Mark Brown Date: Fri Mar 19 17:40:22 2021 +0000 arm64: stacktrace: Move start_backtrace() out of the header Currently start_backtrace() is a static inline function in the header. Since it really shouldn't be sufficiently performance critical that we actually need to have it inlined move it into a C file, this will save anyone else scratching their head about why it is defined in the header. As far as I can see it's only there because it was factored out of the various callers. Signed-off-by: Mark Brown Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210319174022.33051-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit d72260cc7879c72c186900e7c153007a6137ed8e Author: Xu Yilun Date: Mon Mar 8 09:59:36 2021 +0800 Documentation: fpga: dfl: Add description for DFL UIO support This patch adds description for UIO support for dfl devices on DFL bus. Reviewed-by: Tom Rix Reviewed-by: Wu Hao Signed-off-by: Xu Yilun Link: https://lore.kernel.org/r/1615168776-8553-3-git-send-email-yilun.xu@intel.com Signed-off-by: Greg Kroah-Hartman commit bbfb54e7b3e484943f8c00c58a0d6549e9078640 Author: Xu Yilun Date: Mon Mar 8 09:59:35 2021 +0800 uio: uio_dfl: add userspace i/o driver for DFL bus This patch supports the DFL drivers be written in userspace. This is realized by exposing the userspace I/O device interfaces. The driver now only binds the ether group feature, which has no irq. So the irq support is not implemented yet. Reviewed-by: Tom Rix Signed-off-by: Xu Yilun Link: https://lore.kernel.org/r/1615168776-8553-2-git-send-email-yilun.xu@intel.com Signed-off-by: Greg Kroah-Hartman commit db3a4f0abefd7be96089fcd74029c259df3bed76 Author: Mihai Carabas Date: Wed Mar 24 16:49:16 2021 +0200 misc/pvpanic: add PCI driver Add support for pvpanic PCI device added in qemu [1]. At probe time, obtain the address where to read/write pvpanic events and pass it to the generic handling code. Will follow the same logic as pvpanic MMIO device driver. At remove time, unmap base address and disable PCI device. [1] https://github.com/qemu/qemu/commit/9df52f58e76e904fb141b10318362d718f470db2 Signed-off-by: Mihai Carabas Link: https://lore.kernel.org/r/1616597356-20696-4-git-send-email-mihai.carabas@oracle.com Signed-off-by: Greg Kroah-Hartman commit b3c0f8774668fd30a3efb2d0afc1a6527dacb858 Author: Mihai Carabas Date: Wed Mar 24 16:49:15 2021 +0200 misc/pvpanic: probe multiple instances Create the mecahism that allows multiple pvpanic instances to call pvpanic_probe and receive panic events. A global list will retain all the mapped addresses where to write panic events. Signed-off-by: Mihai Carabas Link: https://lore.kernel.org/r/1616597356-20696-3-git-send-email-mihai.carabas@oracle.com Signed-off-by: Greg Kroah-Hartman commit 6861d27cf590d20a95b5d0724ac3768583b62947 Author: Mihai Carabas Date: Wed Mar 24 16:49:14 2021 +0200 misc/pvpanic: split-up generic and platform dependent code Split-up generic and platform dependent code in order to be able to re-use generic event handling code in pvpanic PCI device driver in the next patches. The code from pvpanic.c was split in two new files: - pvpanic.c: generic code that handles pvpanic events - pvpanic-mmio.c: platform/bus dependent code Signed-off-by: Mihai Carabas Link: https://lore.kernel.org/r/1616597356-20696-2-git-send-email-mihai.carabas@oracle.com Signed-off-by: Greg Kroah-Hartman commit d225ef6fda7ce9ff7d28764bd1cceea2d0215e8b Author: Jia-Ju Bai Date: Tue Mar 23 19:34:05 2021 -0700 base: dd: fix error return code of driver_sysfs_add() When device_create_file() fails and returns a non-zero value, no error return code of driver_sysfs_add() is assigned. To fix this bug, ret is assigned with the return value of device_create_file(), and then ret is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210324023405.12465-1-baijiaju1990@gmail.com Signed-off-by: Greg Kroah-Hartman commit e611f8cd8717c8fe7d4229997e6cd029a1465253 Author: Yogesh Lal Date: Wed Mar 24 16:31:38 2021 +0530 driver core: Use unbound workqueue for deferred probes Deferred probe usually runs only on pinned kworkers, which might take longer time if a device contains multiple sub-devices. One such case is of sound card on mobile devices, where we have good number of mixers and controls per mixer. We observed boot up improvement - deferred probes take ~600ms when bound to little core kworker and ~200ms when deferred probe is queued on unbound wq. This is due to scheduler moving the worker running deferred probe work to big CPUs. Without this change, we see the worker is running on LITTLE CPU due to affinity. Since kworker runs deferred probe of several devices, the locality may not be important. Also, init thread executing driver initcalls, can potentially migrate as it has cpu affinity set to all cpus.In addition to this, async probes use unbounded workqueue. So, using unbounded wq for deferred probes looks to be similar to these w.r.t. scheduling behavior. Signed-off-by: Yogesh Lal Link: https://lore.kernel.org/r/1616583698-6398-1-git-send-email-ylal@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 6880149e5a78962a055720981d37e5069f296ef7 Author: Xu Jia Date: Wed Mar 24 15:20:31 2021 +0800 applicom: fix some err codes returned by ac_ioctl When cmd > 6 or copy_to_user() fail, The variable 'ret' would not be returned back. Fix the 'ret' set but not used. Reviewed-by: Arnd Bergmann Signed-off-by: Xu Jia Link: https://lore.kernel.org/r/20210324072031.941791-1-xujia39@huawei.com Signed-off-by: Greg Kroah-Hartman commit 40635128fee8c762b4b3e8ab805a15f01d60b859 Author: Bhaskar Chowdhury Date: Fri Mar 26 14:44:43 2021 +0530 scripts/spdxcheck.py: Fix a typo s/Initilize/Initialize/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210326091443.26525-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit f20b2c2a07f88c9a7532578674a60e501a07b839 Author: Kai Ye Date: Fri Mar 26 17:09:07 2021 +0800 uacce: delete unneeded variable initialization delete unneeded variable initialization. Signed-off-by: Kai Ye Link: https://lore.kernel.org/r/1616749747-3882-1-git-send-email-yekai13@huawei.com Signed-off-by: Greg Kroah-Hartman commit 1114ab22e417427d8dced25be02c15f479de8d41 Author: Daniel Thompson Date: Thu Mar 25 09:48:07 2021 +0000 kgdbts: Switch to do_sys_openat2() for breakpoint testing Currently kgdbts can get stuck waiting for do_sys_open() to be called in some of the current tests. This is because C compilers often automatically inline this function, which is a very thin wrapper around do_sys_openat2(), into some of its callers. gcc-10 does this on (at least) both x86 and arm64. We can fix the test suite by placing the breakpoints on do_sys_openat2() instead since that isn't (currently) inlined. However do_sys_openat2() is a static function so we cannot simply use an addressof. Since we are testing debug machinery it is acceptable to use kallsyms to lookup a suitable address because this is more or less what kdb does in the same circumstances. Re-implement lookup_addr() to be based on kallsyms rather than function pointers. Signed-off-by: Daniel Thompson Link: https://lore.kernel.org/r/20210325094807.3546702-1-daniel.thompson@linaro.org Signed-off-by: Greg Kroah-Hartman commit dbdc671d5c855f05125e3a002b819978ac2190b9 Author: Bhaskar Chowdhury Date: Thu Mar 25 07:25:13 2021 +0530 misc: genwqe: Rudimentary typo fixes s/requsted/requested/ s/equests/requests/ s/occured/occurred/ s/conditon/condition/ s/emtpy/empty/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210325015513.9373-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit d0e874705ef9ec028f0de6f65e3781c6b10d3fa1 Author: Zou Wei Date: Wed Mar 24 08:48:23 2021 +0000 misc: sgi-xp: xp_main: make some symbols static The sparse tool complains as follows: drivers/misc/sgi-xp/xp_main.c:24:22: warning: symbol 'xp_dbg_name' was not declared. Should it be static? drivers/misc/sgi-xp/xp_main.c:28:15: warning: symbol 'xp_dbg_subname' was not declared. Should it be static? These symbols are not used outside of xp_main.c, so this commit marks them static. Reported-by: Hulk Robot Signed-off-by: Zou Wei Link: https://lore.kernel.org/r/20210324084823.7393-1-zou_wei@huawei.com Signed-off-by: Greg Kroah-Hartman commit 305271ab4f54f9ae7b9080473d1699c9511ae235 Author: Fabio Aiuto Date: Sat Mar 27 15:24:19 2021 +0100 staging: rtl8723bs: remove unused macros in include/drv_types.c remove declarations of unused macros Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b405202e5bace2098dd7c787297f700cc1c030e0.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c84b189cd284c57e13ae2b5239ba6b7291515809 Author: Fabio Aiuto Date: Sat Mar 27 15:24:18 2021 +0100 staging: rtl8723bs: include macro in a do - while loop in core/rtw_security.c fix the following checkpatch warning: ERROR: Macros with multiple statements should be enclosed in a do - while loop 2014: FILE: drivers/staging/rtl8723bs/core/rtw_security.c:2014: +#define ROUND(i, d, s) \ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0f176b08b7a49d6649ff9d5468bd912e58c1db06.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 777f9d9ba5c5e4db5d56bc525c015d7d411a9569 Author: Fabio Aiuto Date: Sat Mar 27 15:24:17 2021 +0100 staging: rtl8723bs: remove unused fields in struct security_priv remove unused fields in struct security_priv Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b7ff4cda1cd4cd4e73120f8526ff53a745bcffa8.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit f87d0b34c535e32372a920889c1debac1323679e Author: Fabio Aiuto Date: Sat Mar 27 15:24:16 2021 +0100 staging: rtl8723bs: remove macros updating unused fields in struct security_priv remove macros updating statistic fields in struct security_priv Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/00c13a16f0034884a916855a7b7d782d6d05d4c1.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e88231febb48f1b151596f597c61aba01863fb0f Author: Fabio Aiuto Date: Sat Mar 27 15:24:15 2021 +0100 staging: rtl8723bs: put parentheses on macros with complex values in include/wifi.h fix the following checkpatch warnings: ERROR: Macros with complex values should be enclosed in parentheses 114: FILE: drivers/staging/rtl8723bs/include/wifi.h:114: +#define SetToDs(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 122: FILE: drivers/staging/rtl8723bs/include/wifi.h:122: +#define SetFrDs(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 132: FILE: drivers/staging/rtl8723bs/include/wifi.h:132: +#define SetMFrag(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 137: FILE: drivers/staging/rtl8723bs/include/wifi.h:137: +#define ClearMFrag(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 145: FILE: drivers/staging/rtl8723bs/include/wifi.h:145: +#define ClearRetry(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 148: FILE: drivers/staging/rtl8723bs/include/wifi.h:148: +#define SetPwrMgt(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 153: FILE: drivers/staging/rtl8723bs/include/wifi.h:153: +#define ClearPwrMgt(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 156: FILE: drivers/staging/rtl8723bs/include/wifi.h:156: +#define SetMData(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 161: FILE: drivers/staging/rtl8723bs/include/wifi.h:161: +#define ClearMData(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 164: FILE: drivers/staging/rtl8723bs/include/wifi.h:164: +#define SetPrivacy(pbuf) \ -- ERROR: Macros with complex values should be enclosed in parentheses 220: FILE: drivers/staging/rtl8723bs/include/wifi.h:220: +#define SetDuration(pbuf, dur) \ -- ERROR: Macros with complex values should be enclosed in parentheses 224: FILE: drivers/staging/rtl8723bs/include/wifi.h:224: +#define SetPriority(pbuf, tid) \ -- ERROR: Macros with complex values should be enclosed in parentheses 229: FILE: drivers/staging/rtl8723bs/include/wifi.h:229: +#define SetEOSP(pbuf, eosp) \ -- ERROR: Macros with complex values should be enclosed in parentheses 232: FILE: drivers/staging/rtl8723bs/include/wifi.h:232: +#define SetAckpolicy(pbuf, ack) \ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/99d3e605501c1792035e7403d6da86243e6b48cb.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 78a626383e4f3bcec60fd2d1919b3f04c4d76eea Author: Fabio Aiuto Date: Sat Mar 27 15:24:14 2021 +0100 staging: rtl8723bs: remove unused macros in include/wifi.h remove declarations of unused macros in include/wifi.h Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1192085c7e891f801751f3adb7884083a2999483.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7bb2db0dcbe394a69dfbc106caec4df8a0bcd5f5 Author: Fabio Aiuto Date: Sat Mar 27 15:24:13 2021 +0100 staging: rtl8723bs: add spaces around operator in include/rtw_pwrctrl.h fix post-commit hook checkpatch warning: add a space around that '*' Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/d0695bf94766ee68aba70daaa1cdefff64c38b62.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d904eac99187a544c991555a3048e785c2c503c9 Author: Fabio Aiuto Date: Sat Mar 27 15:24:12 2021 +0100 staging: rtl8723bs: put parentheses on macros with complex values in include/rtw_pwrctrl.h fix the following checkpatch warnings: ERROR: Macros with complex values should be enclosed in parentheses 92: FILE: drivers/staging/rtl8723bs/include/rtw_pwrctrl.h:92: +#define LPS_DELAY_TIME 1*HZ /* 1 sec */ -- ERROR: Macros with complex values should be enclosed in parentheses 244: FILE: drivers/staging/rtl8723bs/include/rtw_pwrctrl.h:244: +#define rtw_ips_mode_req(pwrctl, ips_mode) \ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b3b7cf5ae7b0c1c07a629b618fd86a7b89331b33.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d88c117c334e04957f5d783b2e4b2adf8810a60f Author: Fabio Aiuto Date: Sat Mar 27 15:24:11 2021 +0100 staging: rtl8723bs: remove commented code line in os_dep/ioctl_linux.c remove commented code line using obsolete definitions Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ed9cab77a9a7dc1bcae4b6a42e16108e7833ac4b.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9cbc7a2fb93b39c7b14042b19001b19a5f4c5226 Author: Fabio Aiuto Date: Sat Mar 27 15:24:10 2021 +0100 staging: rtl8723bs: remove unused field in rereg_nd_name_data struct remove unused field old_ips_mode in struct rereg_nd_name_data Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e47b4092f12c4930b7185ecdd59b1d0611dd09e7.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ca876454f767879aa1528b5d4aa348c24d7fcf8e Author: Fabio Aiuto Date: Sat Mar 27 15:24:09 2021 +0100 staging: rtl8723bs: remove unused macro in include/rtw_pwrctrl.h remove unused macro reading field ips_mode_req of struct pwrctrl_priv Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/39805614be82f1fd90ee460ffedb8a7beb99dce9.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9ae4632668b4812ac315ffbbee554e8898768230 Author: Fabio Aiuto Date: Sat Mar 27 15:24:07 2021 +0100 staging: rtl8723bs: remove unused macros in include/hal_phy.h remove declarations of unused macros in include/hal_phy.h Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a001f2b2b8fb0ffa73ffe2e79f45a4a8e92cdf2a.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b7f2b6f5ad4c8503d510964a43638c6abfc74dd2 Author: Fabio Aiuto Date: Sat Mar 27 15:24:06 2021 +0100 staging: rtl8723bs: add spaces around operators in include/hal_data.h add spaces around operators in a macro Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4186cc811caa92fe0625d06b3803e73f424059a6.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a6bf763d127320208d8b65cdeb4dfb62c618fd98 Author: Fabio Aiuto Date: Sat Mar 27 15:24:05 2021 +0100 staging: rtl8723bs: put parentheses on macros with complex values in include/hal_data.h fix the following checkpatch warning: ERROR: Macros with complex values should be enclosed in parentheses 49: FILE: drivers/staging/rtl8723bs/include/hal_data.h:49: +#define CHANNEL_MAX_NUMBER 14+24+21 /* 14 is the max channel number */ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/22c4bc695d3600fcaec18949c7521fa38aa4f4a0.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e69934a1428b6bf4380fcc563a0e9773490baa2d Author: Fabio Aiuto Date: Sat Mar 27 15:24:04 2021 +0100 staging: rtl8723bs: remove unused macros in include/hal_data.h remove declarations of unused macros in include/hal_data.h Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/5ad16f41ae356e09156a0f3018eef9cffd3c59a7.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a77a6c77b83485d8d6755b358df9561f3e78829a Author: Fabio Aiuto Date: Sat Mar 27 15:24:03 2021 +0100 staging: rtl8723bs: remove unused macros in include/hal_com_reg.h remove declarations of unused macros in include/hal_com_reg.h Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4a5f1016f46ded3fe9b96a85aff3a5a320e29ab9.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 73b797d57f07dba386bd7458a1ae36576a73aede Author: Fabio Aiuto Date: Sat Mar 27 15:24:02 2021 +0100 staging: rtl8723bs: added spaces around operators in a macro in include/hal_com.h added spaces around operators in macro expression Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20e455aef3b24a46dafe32a8bb46804f284e3c1e.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1a1a0e6eaa87a8e7736274fd2fd24ffd0bd76fae Author: Fabio Aiuto Date: Sat Mar 27 15:24:01 2021 +0100 staging: rtl8723bs: put parentheses on macro with complex values in include/hal_com.h fix the following checkpatch warning: ERROR: Macros with complex values should be enclosed in parentheses 187: FILE: drivers/staging/rtl8723bs/include/hal_com.h:187: +#define PageNum_128(_Len) (u32)(((_Len)>>7) + ((_Len)&0x7F ? 1:0)) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3d187b860c3a104b00e97543390b2bbe3f2caa24.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit a9c6a84991c90f87177007c7f0e1c45638bcc0a8 Author: Fabio Aiuto Date: Sat Mar 27 15:24:00 2021 +0100 staging: rtl8723bs: remove unused macros in include/hal_com.h remove declarations of unused macros in include/hal_com.h Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/3914fc4c7182988c92b794357c7a3e4ef3b484d6.1616854134.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7a151e9c0a74ff18b2aad16ae6ec931e40c1f148 Author: Marco Cesati Date: Fri Mar 26 18:41:45 2021 +0100 Staging: rtl8723bs: remove useless macros Remove two 'no-op' macros, as well as two related unreferenced macros, in the staging/rtl8723bs driver. Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210326174145.19427-2-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit f632c6142779f3a85a7ab2d7d7890ad20db39494 Author: Marco Cesati Date: Fri Mar 26 18:41:44 2021 +0100 Staging: rtl8723bs: remove obsolete comments Remove some orphan comments in the staging/rtl8723bs driver Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210326174145.19427-1-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2e2b93ac2e97a1b2308d38d4ea4bf715f491fcd8 Author: Fabio Aiuto Date: Fri Mar 26 19:06:32 2021 +0100 staging: rtl8723bs: fix broken indentation fix indentation broken by patch removing conditional code blocks checked by unused CONFIG_INTERRUPT_BASED_TXBCN family defines Fixes: 65f183001f6e (staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_INTERRUPT_BASED_TXBCN*) Reported-by: Dan Carpenter Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210326180632.1859-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit babb5b8e2b912d47b6d7d7b20d877cbcdd280458 Author: Edmundo Carmona Antoranz Date: Fri Mar 26 18:17:33 2021 -0600 staging: rtl8723bs: hal: remove unused variable in HalBtc8723b1Ant.c Variable btRssiState in halbtc8723b1ant_ActionWifiConnectedBtAclBusy() is set but never read. Removing it. Removing this warning: drivers/staging/rtl8723bs/hal/HalBtc8723b1Ant.c:2093:5: warning: variable ‘btRssiState’ set but not used [-Wunused-but-set-variable] Signed-off-by: Edmundo Carmona Antoranz Link: https://lore.kernel.org/r/20210327001736.180881-3-eantoranz@gmail.com Signed-off-by: Greg Kroah-Hartman commit e3f480cf4ba65bb929798ffcfad37bd37d57c6eb Author: Edmundo Carmona Antoranz Date: Fri Mar 26 18:17:34 2021 -0600 staging: rtl8723bs: sdio_ops: removing unused variable Inside sd_int_dpc(), variable report is set but it's never read. Getting rid of it. Removing this warning: drivers/staging/rtl8723bs/hal/sdio_ops.c:946:30: warning: variable ‘report’ set but not used [-Wunused-but-set-variable] Signed-off-by: Edmundo Carmona Antoranz Link: https://lore.kernel.org/r/20210327001736.180881-4-eantoranz@gmail.com Signed-off-by: Greg Kroah-Hartman commit 211b4d42b70f1c1660feaa968dac0efc2a96ac4d Author: Pavel Skripkin Date: Sun Mar 28 00:44:43 2021 +0300 tty: fix memory leak in vc_deallocate syzbot reported memory leak in tty/vt. The problem was in VT_DISALLOCATE ioctl cmd. After allocating unimap with PIO_UNIMAP it wasn't freed via VT_DISALLOCATE, but vc_cons[currcons].d was zeroed. Reported-by: syzbot+bcc922b19ccc64240b42@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Cc: stable Link: https://lore.kernel.org/r/20210327214443.21548-1-paskripkin@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9f299d3264c67a892af87337dbaa0bdd20830c0c Author: dillon min Date: Fri Mar 26 19:15:02 2021 +0800 dt-bindings: serial: stm32: Use 'type: object' instead of false for 'additionalProperties' To use additional properties 'bluetooth' on serial, need replace false with 'type: object' for 'additionalProperties' to make it as a node, else will run into dtbs_check warnings. 'arch/arm/boot/dts/stm32h750i-art-pi.dt.yaml: serial@40004800: 'bluetooth' does not match any of the regexes: 'pinctrl-[0-9]+' Fixes: af1c2d81695b ("dt-bindings: serial: Convert STM32 UART to json-schema") Reported-by: kernel test robot Tested-by: Valentin Caron Signed-off-by: dillon min Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1616757302-7889-8-git-send-email-dillon.minfei@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8465df70e49c05f537607f81814c560ef37c8ca2 Author: Jonathan Neuschäfer Date: Sat Mar 20 19:16:05 2021 +0100 serial: 8250_of: Add nuvoton,wpcm450-uart Add a compatible string for the UART inside the Nuvoton WPCM450 SoC. It works the same as the UART in NPCM750. Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20210320181610.680870-10-j.neuschaefer@gmx.net Signed-off-by: Greg Kroah-Hartman commit 3ece873e180877228c9e0912eb243cfbd9bcc71d Author: Jonathan Neuschäfer Date: Sat Mar 20 19:16:00 2021 +0100 dt-bindings: serial: 8250: Add nuvoton,wpcm450-uart Add a compatible string for the UART inside the Nuvoton WPCM450 SoC. Acked-by: Rob Herring Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20210320181610.680870-5-j.neuschaefer@gmx.net Signed-off-by: Greg Kroah-Hartman commit e5242861ec6a0bce25b4cd10af0fc8a508fd067d Author: Christophe JAILLET Date: Sat Mar 27 08:38:53 2021 +0100 usb: gadget: s3c: Fix the error handling path in 's3c2410_udc_probe()' Some 'clk_prepare_enable()' and 'clk_get()' must be undone in the error handling path of the probe function, as already done in the remove function. Fixes: 3fc154b6b813 ("USB Gadget driver for Samsung s3c2410 ARM SoC") Signed-off-by: Christophe JAILLET Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/2bee52e4ce968f48b4c32545cf8f3b2ab825ba82.1616830026.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit 42067ccd9eb2077979ac3ce8b7b95c694bd09e14 Author: Christophe JAILLET Date: Sat Mar 27 08:36:50 2021 +0100 usb: gadget: s3c: Fix incorrect resources releasing Since commit 188db4435ac6 ("usb: gadget: s3c: use platform resources"), 'request_mem_region()' and 'ioremap()' are no more used, so they don't need to be undone in the error handling path of the probe and in the remove function. Remove these calls and the unneeded 'rsrc_start' and 'rsrc_len' global variables. Fixes: 188db4435ac6 ("usb: gadget: s3c: use platform resources") Signed-off-by: Christophe JAILLET Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/b317638464f188159bd8eea44427dd359e480625.1616830026.git.christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman commit d00be779cc5016a1f4cc414e25fc45a9df40ffaf Author: Thinh Nguyen Date: Sat Mar 27 17:54:01 2021 -0700 usb: dwc3: Create helper function getting MDWIDTH Different controller IPs check different HW parameters for MDWIDTH. To help with maintainability, create a helper function to consolidate the logic in a single place. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/456329d36e8c188df5c234f3282595b630bf1470.1616892233.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 487adc545bcef07d38b2918a7216a993c06b7dc9 Author: Rob Herring Date: Sat Mar 27 15:28:16 2021 -0500 dt-bindings: usb: usb-nop-xceiv: Convert to DT schema Convert the usb-nop-xceiv binding to DT schema. Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210327202816.545282-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit cc27bb4e7f8be9cf41e7801feda853a1381b4449 Author: Rob Herring Date: Sat Mar 27 14:14:48 2021 -0500 dt-bindings: usb: mediatek,mtu3: Use graph schema Users of the DT graph binding now should reference it for their 'port' schemas, so add it for Mediatek MTU3 binding. Cc: Chunfeng Yun Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210327191448.410795-1-robh@kernel.org Signed-off-by: Greg Kroah-Hartman commit 016381f3c13671e934428da30e782c13d94aa5bd Author: Chunfeng Yun Date: Tue Mar 23 15:02:55 2021 +0800 arm64: dts: mt8183: update wakeup register offset Use wakeup control register offset exactly, and update revision number Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-13-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit cec96bc53a87955c5ff76f1220bd5a3b198f6d82 Author: Chunfeng Yun Date: Tue Mar 23 15:02:51 2021 +0800 usb: xhci-mtk: remove MODULE_ALIAS Since the driver only supports the devices created by the OF core, seems no need MODULE_ALIAS() anymore. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-9-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 6144ef35ab11cab6037d575bacd09bd6c9253a52 Author: Chunfeng Yun Date: Tue Mar 23 15:02:50 2021 +0800 usb: xhci-mtk: drop CONFIG_OF The driver can match only the devices created by the OF core via the DT table, so the table should be always used. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-8-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 275af512425cfa54850efc2d7d5b98dc00693af4 Author: Chunfeng Yun Date: Tue Mar 23 15:02:45 2021 +0800 dt-bindings: usb: mtu3: support wakeup for mt8183 and mt8192 These two HW of wakeup don't follow MediaTek internal IPM rule, and both use a specific way, like as early revision of mt8173. Due to the index 2 already used by many DTS, it's better to keep it unchanged for backward compatibility, treat specific ones without following IPM rule as revision 1.x, meanwhile reserve 3~99 for later revision that following the IPM rule. Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1616482975-17841-3-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 52445887492ce9a4633f1548f85d6d75cef6437a Author: Chunfeng Yun Date: Tue Mar 23 15:02:44 2021 +0800 dt-bindings: usb: mtk-xhci: add support wakeup for mt8183 and mt8192 These two HW of wakeup don't follow MediaTek internal IPM rule, both use a specific way, like as early revision of mt8173. Due to the index 2 already used by many DTS, it's better to keep it unchanged for backward compatibility, treat specific ones without following IPM rule as revision 1.x, meanwhile reserve 3~99 for later revisions with following the IPM rule. Signed-off-by: Chunfeng Yun Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/1616482975-17841-2-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 38833cbda2c2bd2a0968e038248dda31af51d841 Author: Anant Thazhemadam Date: Sat Mar 27 04:02:51 2021 +0530 usb: misc: usbsevseg: update to use usb_control_msg_send() The newer usb_control_msg_{send|recv}() API ensures that a short read is treated as an error, data can be used off the stack, and raw usb pipes need not be created in the calling functions. For this reason, instances of usb_control_msg() have been replaced with usb_control_msg_send() appropriately. Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20210326223251.753952-4-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman commit ced6a0ba266effb0b31c7207f4348df9e906c789 Author: Anant Thazhemadam Date: Sat Mar 27 04:02:50 2021 +0530 usb: misc: ezusb: update to use usb_control_msg_send() The newer usb_control_msg_{send|recv}() API ensures that a short read is treated as an error, data can be used off the stack, and raw usb pipes need not be created in the calling functions. For this reason, the instance of usb_control_msg() has been replaced with usb_control_msg_send() appropriately. Reviewed-by: Johan Hovold Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20210326223251.753952-3-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman commit f5ffdd3b7554158ec5be6ab28a48751d1d87d0cc Author: Anant Thazhemadam Date: Sat Mar 27 04:02:49 2021 +0530 usb: misc: ehset: update to use the usb_control_msg_{send|recv}() API The newer usb_control_msg_{send|recv}() API ensures that a short read is treated as an error, data can be used off the stack, and raw usb pipes need not be created in the calling functions. For this reason, instances of usb_control_msg() have been replaced with usb_control_msg_{recv|send}() appropriately. Now, we also test for a short device descriptor (which USB core should already have fetched if you get to probe this driver), but which wasn't verified again here before. Reviewed-by: Peter Chen Reviewed-by: Johan Hovold Signed-off-by: Anant Thazhemadam Link: https://lore.kernel.org/r/20210326223251.753952-2-anant.thazhemadam@gmail.com Signed-off-by: Greg Kroah-Hartman commit c21161e40ee94486f7db701f9b4d3f9c25763e8c Author: Ray Chi Date: Sun Mar 28 02:28:09 2021 +0800 power: supply: Fix build error when CONFIG_POWER_SUPPLY is not enabled. The build error happens when CONFIG_POWER_SUPPLY is not enabled. h8300-linux-ld: drivers/usb/dwc3/gadget.o: in function `.L59': >> gadget.c:(.text+0x655): undefined reference to `power_supply_set_property' Fixes: 99288de36020 ("usb: dwc3: add an alternate path in vbus_draw callback") Reported-by: kernel test robot Signed-off-by: Ray Chi Link: https://lore.kernel.org/r/20210327182809.1814480-3-raychi@google.com Signed-off-by: Greg Kroah-Hartman commit 8a5b5c3c1634f9d7a96ea3b38f3d75333c887bf6 Author: Ray Chi Date: Sun Mar 28 02:28:08 2021 +0800 usb: dwc3: gadget: modify the scale in vbus_draw callback Currently, vbus_draw callback used wrong scale for power_supply. The unit of power supply should be uA. Therefore, this patch will fix this problem. Fixes: 99288de36020 ("usb: dwc3: add an alternate path in vbus_draw callback") Reported-by: Sebastian Reichel Signed-off-by: Ray Chi Link: https://lore.kernel.org/r/20210327182809.1814480-2-raychi@google.com Signed-off-by: Greg Kroah-Hartman commit 73e7f1732e800a88cafab31d75548c6fcfdd8c47 Author: Fabio Estevam Date: Sat Mar 27 21:38:56 2021 -0700 Input: imx_keypad - convert to a DT-only driver i.MX has been converted to a DT-only platform, so make the adjustments to the driver to convert it to a DT-only driver. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210327194307.541248-1-festevam@gmail.com Signed-off-by: Dmitry Torokhov commit a0d8d552783b3fec78c775a57fa7e2b87e16e6ca Author: Al Viro Date: Sat Mar 27 19:36:31 2021 -0400 whack-a-mole: kill strlen_user() (again) Signed-off-by: Al Viro commit aa89ee98b8b4d36cff793814efbc7ae31b2ea085 Author: Rob Herring Date: Thu Mar 25 10:47:13 2021 -0600 docs: dt: Add DT API documentation The kernel-doc for the DT APIs are not included in the documentation build. Add them. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210325164713.1296407-9-robh@kernel.org commit 8c8239c2c1fb82f171cb22a707f3bb88a2f22109 Author: Rob Herring Date: Thu Mar 25 10:47:12 2021 -0600 of: Add missing 'Return' section in kerneldoc comments Many of the DT kerneldoc comments are lacking a 'Return' section. Let's add the section in cases we have a description of return values. There's still some cases where the return values are not documented. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210325164713.1296407-8-robh@kernel.org commit 62f026f082e4d762a47b43ea693b38f025122332 Author: Rob Herring Date: Fri Mar 26 13:26:06 2021 -0600 of: Fix kerneldoc output formatting The indentation of the kerneldoc comments affects the output formatting. Leading tabs in particular don't work, sections need to be indented under the section header, and several code blocks are reformatted. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210326192606.3702739-1-robh@kernel.org commit b83db5b8490073dfd27f4fd478b478f34e51bb36 Author: Rob Herring Date: Thu Mar 25 10:47:10 2021 -0600 docs: dt: Group DT docs into relevant sub-sections The DT docs are currently all just lumped together in the doc build. Let's organize the documents by kernel specifics, overlays and bindings. As writing-schema.rst is about bindings, let's move it to the bindings directory. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210325164713.1296407-6-robh@kernel.org commit 7248213cf45d623a189830f5e69a5daf3b848690 Author: Rob Herring Date: Thu Mar 25 10:47:09 2021 -0600 docs: dt: Make 'Devicetree' wording more consistent There's a variety of ways 'Devicetree' has been written. This is most evident in the documentation build contents where we have 'Device Tree', 'DeviceTree', etc. The DT spec has somewhat standardized on 'Devicetree', so let's use that. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210325164713.1296407-5-robh@kernel.org commit 9be21f7358125d7c862bb34915dc0ad2446ffd78 Author: Rob Herring Date: Thu Mar 25 10:47:08 2021 -0600 docs: dt: writing-schema: Include the example schema in the doc build The example-schema.yaml file serves as documentation, so let's include it from writing-schema.rst. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210325164713.1296407-4-robh@kernel.org commit 0d45f83351b1f31b2e2fb9e359664b9f7f89c846 Author: Rob Herring Date: Thu Mar 25 10:47:07 2021 -0600 docs: dt: writing-schema: Remove spurious indentation 'allOf' and 'properties' have a leading space which causes them to be indented in the doc output. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210325164713.1296407-3-robh@kernel.org commit b3e2589be34f68e54ffcad9ee3022349aab5fd38 Author: Rob Herring Date: Thu Mar 25 10:47:06 2021 -0600 dt-bindings: Fix reference in submitting-patches.rst to the DT ABI doc submitting-patches.rst has a stale reference to ABI.txt. Fix this with a proper rSt link. Cc: Frank Rowand Cc: Mauro Carvalho Chehab Signed-off-by: Rob Herring Reviewed-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/20210325164713.1296407-2-robh@kernel.org commit b368d9e7c9e1a201f9d0898318c4faef3e91c78e Author: Julius Werner Date: Tue Mar 23 18:04:05 2021 -0700 dt-bindings: ddr: Add optional manufacturer and revision ID to LPDDR3 On some platforms, DDR parts are multi-sourced and the exact part number used is not know to either kernel or firmware at build time. Firmware can read identifying information from DDR mode registers at boot time but needs a way to communicate this information to kernel and/or userspace. This patch adds optional properties for this information to the existing "jedec,lpddr3" device tree binding to be used for that purpose. Signed-off-by: Julius Werner Link: https://lore.kernel.org/r/20210324010405.1917577-1-jwerner@chromium.org Signed-off-by: Rob Herring commit d26a56674497dd12a0ac378203cf058b7a984124 Author: Vinod Koul Date: Thu Mar 18 15:16:17 2021 +0530 interconnect: qcom: Add SM8350 interconnect provider driver Add driver for the Qualcomm interconnect buses found in SM8350 based platforms. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. Generated from downstream interconnect driver written by David Dai Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210318094617.951212-3-vkoul@kernel.org Signed-off-by: Georgi Djakov commit c009ffe661f68236deb37c91fa1c1c82e9ecdd9c Author: Vinod Koul Date: Thu Mar 18 15:16:16 2021 +0530 dt-bindings: interconnect: Add Qualcomm SM8350 DT bindings The Qualcomm SM8350 platform has several bus fabrics that could be controlled and tuned dynamically according to the bandwidth demand. Signed-off-by: Vinod Koul Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210318094617.951212-2-vkoul@kernel.org Signed-off-by: Georgi Djakov commit fddbf4b6dc9970d7c20fb6ed9a595131444ff026 Merge: 36e7985160782 7bd1590d4eba1 Author: Alexei Starovoitov Date: Fri Mar 26 20:29:06 2021 -0700 Merge branch 'bpf: Support calling kernel function' Martin KaFai says: ==================== This series adds support to allow bpf program calling kernel function. The use case included in this set is to allow bpf-tcp-cc to directly call some tcp-cc helper functions (e.g. "tcp_cong_avoid_ai()"). Those functions have already been used by some kernel tcp-cc implementations. This set will also allow the bpf-tcp-cc program to directly call the kernel tcp-cc implementation, For example, a bpf_dctcp may only want to implement its own dctcp_cwnd_event() and reuse other dctcp_*() directly from the kernel tcp_dctcp.c instead of reimplementing (or copy-and-pasting) them. The tcp-cc kernel functions mentioned above will be white listed for the struct_ops bpf-tcp-cc programs to use in a later patch. The white listed functions are not bounded to a fixed ABI contract. Those functions have already been used by the existing kernel tcp-cc. If any of them has changed, both in-tree and out-of-tree kernel tcp-cc implementations have to be changed. The same goes for the struct_ops bpf-tcp-cc programs which have to be adjusted accordingly. Please see individual patch for details. v2: - Patch 2 in v1 is removed. No need to support extern func in kernel. Changed libbpf to adjust the .ksyms datasec for extern func in patch 11. (Andrii) - Name change: btf_check_func_arg_match() and btf_check_subprog_arg_match() in patch 2. (Andrii) - Always set unreliable on any error in patch 2 since it does not matter. (Andrii) - s/kern_func/kfunc/ and s/descriptor/desc/ in this set. (Andrii) - Remove some unnecessary changes in disasm.h and disasm.c in patch 3. In particular, no need to change the function signature in bpf_insn_revmap_call_t. Also, removed the changes in print_bpf_insn(). - Fixed an issue in check_kfunc_call() when the calling kernel function returns a pointer in patch 3. Added a selftest. - Adjusted the verifier selftests due to the changes in the verifier log in patch 3. - Fixed a comparison issue in kfunc_desc_cmp_by_imm() in patch 3. (Andrii) - Name change: is_ldimm64_insn(), new helper: is_call_insn() in patch 10 (Andrii) - Move btf_func_linkage() from btf.h to libbpf.c in patch 11. (Andrii) - Fixed the linker error when CONFIG_BPF_SYSCALL is not defined. Moved the check_kfunc_call from filter.c to test_run.c in patch 14. (kernel test robot) ==================== Signed-off-by: Alexei Starovoitov commit 7bd1590d4eba1583f6ee85e8cfe556505f761e19 Author: Martin KaFai Lau Date: Wed Mar 24 18:52:52 2021 -0700 bpf: selftests: Add kfunc_call test This patch adds a few kernel function bpf_kfunc_call_test*() for the selftest's test_run purpose. They will be allowed for tc_cls prog. The selftest calling the kernel function bpf_kfunc_call_test*() is also added in this patch. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210325015252.1551395-1-kafai@fb.com commit 78e60bbbe8e8f614b6a453d8a780d9e6f77749a8 Author: Martin KaFai Lau Date: Wed Mar 24 18:52:46 2021 -0700 bpf: selftests: Bpf_cubic and bpf_dctcp calling kernel functions This patch removes the bpf implementation of tcp_slow_start() and tcp_cong_avoid_ai(). Instead, it directly uses the kernel implementation. It also replaces the bpf_cubic_undo_cwnd implementation by directly calling tcp_reno_undo_cwnd(). bpf_dctcp also directly calls tcp_reno_cong_avoid() instead. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210325015246.1551062-1-kafai@fb.com commit 39cd9e0f6783fd2dd2b0e95500e34575b3707ed8 Author: Martin KaFai Lau Date: Wed Mar 24 18:52:40 2021 -0700 bpf: selftests: Rename bictcp to bpf_cubic As a similar chanage in the kernel, this patch gives the proper name to the bpf cubic. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210325015240.1550074-1-kafai@fb.com commit 5bd022ec01f060f30672cc6383b8b04e75a4310d Author: Martin KaFai Lau Date: Wed Mar 24 18:52:34 2021 -0700 libbpf: Support extern kernel function This patch is to make libbpf able to handle the following extern kernel function declaration and do the needed relocations before loading the bpf program to the kernel. extern int foo(struct sock *) __attribute__((section(".ksyms"))) In the collect extern phase, needed changes is made to bpf_object__collect_externs() and find_extern_btf_id() to collect extern function in ".ksyms" section. The func in the BTF datasec also needs to be replaced by an int var. The idea is similar to the existing handling in extern var. In case the BTF may not have a var, a dummy ksym var is added at the beginning of bpf_object__collect_externs() if there is func under ksyms datasec. It will also change the func linkage from extern to global which the kernel can support. It also assigns a param name if it does not have one. In the collect relo phase, it will record the kernel function call as RELO_EXTERN_FUNC. bpf_object__resolve_ksym_func_btf_id() is added to find the func btf_id of the running kernel. During actual relocation, it will patch the BPF_CALL instruction with src_reg = BPF_PSEUDO_FUNC_CALL and insn->imm set to the running kernel func's btf_id. The required LLVM patch: https://reviews.llvm.org/D93563 Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210325015234.1548923-1-kafai@fb.com commit aa0b8d43e9537d371cbd3f272d3403f2b15201af Author: Martin KaFai Lau Date: Wed Mar 24 18:52:27 2021 -0700 libbpf: Record extern sym relocation first This patch records the extern sym relocs first before recording subprog relocs. The later patch will have relocs for extern kernel function call which is also using BPF_JMP | BPF_CALL. It will be easier to handle the extern symbols first in the later patch. is_call_insn() helper is added. The existing is_ldimm64() helper is renamed to is_ldimm64_insn() for consistency. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210325015227.1548623-1-kafai@fb.com commit 0c091e5c2d37696589a3e0131a809b5499899995 Author: Martin KaFai Lau Date: Wed Mar 24 18:52:21 2021 -0700 libbpf: Rename RELO_EXTERN to RELO_EXTERN_VAR This patch renames RELO_EXTERN to RELO_EXTERN_VAR. It is to avoid the confusion with a later patch adding RELO_EXTERN_FUNC. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210325015221.1547722-1-kafai@fb.com commit 774e132e83d0f10a7ebbfe7db1debdaed6013f83 Author: Martin KaFai Lau Date: Wed Mar 24 18:52:14 2021 -0700 libbpf: Refactor codes for finding btf id of a kernel symbol This patch refactors code, that finds kernel btf_id by kind and symbol name, to a new function find_ksym_btf_id(). It also adds a new helper __btf_kind_str() to return a string by the numeric kind value. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210325015214.1547069-1-kafai@fb.com commit 933d1aa32409ef4209c8065ee4ede68236659cd2 Author: Martin KaFai Lau Date: Wed Mar 24 18:52:07 2021 -0700 libbpf: Refactor bpf_object__resolve_ksyms_btf_id This patch refactors most of the logic from bpf_object__resolve_ksyms_btf_id() into a new function bpf_object__resolve_ksym_var_btf_id(). It is to get ready for a later patch adding bpf_object__resolve_ksym_func_btf_id() which resolves a kernel function to the running kernel btf_id. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210325015207.1546749-1-kafai@fb.com commit e78aea8b2170be1b88c96a4d138422986a737336 Author: Martin KaFai Lau Date: Wed Mar 24 18:52:01 2021 -0700 bpf: tcp: Put some tcp cong functions in allowlist for bpf-tcp-cc This patch puts some tcp cong helper functions, tcp_slow_start() and tcp_cong_avoid_ai(), into the allowlist for the bpf-tcp-cc program. A few tcp cc implementation functions are also put into the allowlist. A potential use case is the bpf-tcp-cc implementation may only want to override a subset of a tcp_congestion_ops. For others, the bpf-tcp-cc can directly call the kernel counter parts instead of re-implementing (or copy-and-pasting) them to the bpf program. They will only be available to the bpf-tcp-cc typed program. The allowlist functions are not bounded to a fixed ABI contract. When any of them has changed, the bpf-tcp-cc program has to be changed like any in-tree/out-of-tree kernel tcp-cc implementations do also. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210325015201.1546345-1-kafai@fb.com commit d22f6ad18709e93622b6115ec9a5e42ed96b5d82 Author: Martin KaFai Lau Date: Wed Mar 24 18:51:55 2021 -0700 tcp: Rename bictcp function prefix to cubictcp The cubic functions in tcp_cubic.c are using the bictcp prefix as in tcp_bic.c. This patch gives it the proper name cubictcp because the later patch will allow the bpf prog to directly call the cubictcp implementation. Renaming them will avoid the name collision when trying to find the intended one to call during bpf prog load time. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210325015155.1545532-1-kafai@fb.com commit 797b84f727bce9c64ea2c85899c1ba283df54c16 Author: Martin KaFai Lau Date: Wed Mar 24 18:51:49 2021 -0700 bpf: Support kernel function call in x86-32 This patch adds kernel function call support to the x86-32 bpf jit. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210325015149.1545267-1-kafai@fb.com commit e6ac2450d6dee3121cd8bbf2907b78a68a8a353d Author: Martin KaFai Lau Date: Wed Mar 24 18:51:42 2021 -0700 bpf: Support bpf program calling kernel function This patch adds support to BPF verifier to allow bpf program calling kernel function directly. The use case included in this set is to allow bpf-tcp-cc to directly call some tcp-cc helper functions (e.g. "tcp_cong_avoid_ai()"). Those functions have already been used by some kernel tcp-cc implementations. This set will also allow the bpf-tcp-cc program to directly call the kernel tcp-cc implementation, For example, a bpf_dctcp may only want to implement its own dctcp_cwnd_event() and reuse other dctcp_*() directly from the kernel tcp_dctcp.c instead of reimplementing (or copy-and-pasting) them. The tcp-cc kernel functions mentioned above will be white listed for the struct_ops bpf-tcp-cc programs to use in a later patch. The white listed functions are not bounded to a fixed ABI contract. Those functions have already been used by the existing kernel tcp-cc. If any of them has changed, both in-tree and out-of-tree kernel tcp-cc implementations have to be changed. The same goes for the struct_ops bpf-tcp-cc programs which have to be adjusted accordingly. This patch is to make the required changes in the bpf verifier. First change is in btf.c, it adds a case in "btf_check_func_arg_match()". When the passed in "btf->kernel_btf == true", it means matching the verifier regs' states with a kernel function. This will handle the PTR_TO_BTF_ID reg. It also maps PTR_TO_SOCK_COMMON, PTR_TO_SOCKET, and PTR_TO_TCP_SOCK to its kernel's btf_id. In the later libbpf patch, the insn calling a kernel function will look like: insn->code == (BPF_JMP | BPF_CALL) insn->src_reg == BPF_PSEUDO_KFUNC_CALL /* <- new in this patch */ insn->imm == func_btf_id /* btf_id of the running kernel */ [ For the future calling function-in-kernel-module support, an array of module btf_fds can be passed at the load time and insn->off can be used to index into this array. ] At the early stage of verifier, the verifier will collect all kernel function calls into "struct bpf_kfunc_desc". Those descriptors are stored in "prog->aux->kfunc_tab" and will be available to the JIT. Since this "add" operation is similar to the current "add_subprog()" and looking for the same insn->code, they are done together in the new "add_subprog_and_kfunc()". In the "do_check()" stage, the new "check_kfunc_call()" is added to verify the kernel function call instruction: 1. Ensure the kernel function can be used by a particular BPF_PROG_TYPE. A new bpf_verifier_ops "check_kfunc_call" is added to do that. The bpf-tcp-cc struct_ops program will implement this function in a later patch. 2. Call "btf_check_kfunc_args_match()" to ensure the regs can be used as the args of a kernel function. 3. Mark the regs' type, subreg_def, and zext_dst. At the later do_misc_fixups() stage, the new fixup_kfunc_call() will replace the insn->imm with the function address (relative to __bpf_call_base). If needed, the jit can find the btf_func_model by calling the new bpf_jit_find_kfunc_model(prog, insn). With the imm set to the function address, "bpftool prog dump xlated" will be able to display the kernel function calls the same way as it displays other bpf helper calls. gpl_compatible program is required to call kernel function. This feature currently requires JIT. The verifier selftests are adjusted because of the changes in the verbose log in add_subprog_and_kfunc(). Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210325015142.1544736-1-kafai@fb.com commit 34747c4120418143097d4343312a0ca96c986d86 Author: Martin KaFai Lau Date: Wed Mar 24 18:51:36 2021 -0700 bpf: Refactor btf_check_func_arg_match This patch moved the subprog specific logic from btf_check_func_arg_match() to the new btf_check_subprog_arg_match(). The core logic is left in btf_check_func_arg_match() which will be reused later to check the kernel function call. The "if (!btf_type_is_ptr(t))" is checked first to improve the indentation which will be useful for a later patch. Some of the "btf_kind_str[]" usages is replaced with the shortcut "btf_type_str(t)". Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210325015136.1544504-1-kafai@fb.com commit e16301fbe1837c9594f9c1957c28fd1bb18fbd15 Author: Martin KaFai Lau Date: Wed Mar 24 18:51:30 2021 -0700 bpf: Simplify freeing logic in linfo and jited_linfo This patch simplifies the linfo freeing logic by combining "bpf_prog_free_jited_linfo()" and "bpf_prog_free_unused_jited_linfo()" into the new "bpf_prog_jit_attempt_done()". It is a prep work for the kernel function call support. In a later patch, freeing the kernel function call descriptors will also be done in the "bpf_prog_jit_attempt_done()". "bpf_prog_free_linfo()" is removed since it is only called by "__bpf_prog_put_noref()". The kvfree() are directly called instead. It also takes this chance to s/kcalloc/kvcalloc/ for the jited_linfo allocation. Signed-off-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210325015130.1544323-1-kafai@fb.com commit 8e3bcdeec7e5a9c2001fbe2a6192cda8aa9886f4 Author: Linus Walleij Date: Fri Mar 26 22:22:25 2021 +0100 ARM: dts: ux500: Clarify UIB version per board Make it clear which UIB is used with each board in comments and model text. Signed-off-by: Linus Walleij commit 396e4dd89d30893785ed4fb7442d3c316b4534cf Author: Linus Walleij Date: Sat Mar 27 00:18:05 2021 +0100 ARM: dts: ux500: Totally separate TVK R2 and R3 There is no point in sharing any definitions between the R2 and R3 versions of the TVK1281618 UIB. The proximity sensor collides with the touchscreen etc, it is less confusing to get rid of the overarching TVK1281618 UIB file and just use one for each. Signed-off-by: Linus Walleij commit c9334538bfe07446b07011e1e8395a729fe25388 Author: Linus Walleij Date: Fri Mar 26 22:20:35 2021 +0100 ARM: dts: ux500: Push TC35893 defines to each UIB The TC35893 is connected to different GPIOs in different UIBs so just bite the bullet and push this info down into respective UIB so we can avoid confusion when reading the DTS files. Signed-off-by: Linus Walleij commit e379b40cc0f179403ce0b82b7e539f635a568da5 Author: Sergey Shtylyov Date: Thu Mar 25 23:51:10 2021 +0300 pata_ipx4xx_cf: fix IRQ check The driver's probe() method is written as if platform_get_irq() returns 0 on error, while actually it returns a negative error code (with all the other values considered valid IRQs). Rewrite the driver's IRQ checking code to pass the positive IRQ #s to ata_host_activate(), propagate errors upstream, and treat IRQ0 as error, returning -EINVAL, as the libata code treats 0 as an indication that polling should be used anyway... Fixes: 0df0d0a0ea9f ("[libata] ARM: add ixp4xx PATA driver") Signed-off-by: Sergey Shtylyov Signed-off-by: Jens Axboe commit c7e8f404d56b99c80990b19a402c3f640d74be05 Author: Sergey Shtylyov Date: Thu Mar 25 23:50:24 2021 +0300 pata_arasan_cf: fix IRQ check The driver's probe() method is written as if platform_get_irq() returns 0 on error, while actually it returns a negative error code (with all the other values considered valid IRQs). Rewrite the driver's IRQ checking code to pass the positive IRQ #s to ata_host_activate(), propagate upstream -EPROBE_DEFER, and set up the driver to polling mode on (negative) errors and IRQ0 (libata treats IRQ #0 as a polling mode anyway)... Fixes: a480167b23ef ("pata_arasan_cf: Adding support for arasan compact flash host controller") Signed-off-by: Sergey Shtylyov Acked-by: Viresh Kumar Signed-off-by: Jens Axboe commit 9437499086c24abf298bc3c3a053faedfc19bab1 Author: Aswath Govindraju Date: Fri Mar 26 12:11:20 2021 +0530 arm64: dts: ti: k3-j7200: Add support for higher speed modes and update delay select values for MMCSD subsystems The following speed modes are now supported in J7200 SoC, - HS200 and HS400 modes at 1.8 V card voltage, in MMCSD0 subsystem [1]. - UHS-I speed modes in MMCSD1 subsystem [1]. Add support for UHS-I modes by adding voltage regulator device tree nodes and corresponding pinmux details, to power cycle and voltage switch cards. Set respective tags in sdhci0 and remove no-1-8-v tag from sdhci1 device tree nodes. Also update the delay values for various speed modes supported, based on the revised january 2021 J7200 datasheet[2]. [1] - section 12.3.6.1.1 MMCSD Features, in https://www.ti.com/lit/ug/spruiu1a/spruiu1a.pdf, (SPRUIU1A – JULY 2020 – REVISED JANUARY 2021) [2] - https://www.ti.com/lit/ds/symlink/dra821u.pdf, (SPRSP57B – APRIL 2020 – REVISED JANUARY 2021) Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210326064120.31919-4-a-govindraju@ti.com commit f4cc7daf460b285d3b318496654dab01472df8e4 Author: Faiz Abbas Date: Fri Mar 26 12:11:19 2021 +0530 arm64: dts: ti: k3-j7200-common-proc-board: Disable unused gpio modules There are 6 gpio instances inside SoC with 2 groups as show below: Group one: wkup_gpio0, wkup_gpio1 Group two: main_gpio0, main_gpio2, main_gpio4, main_gpio6 Only one instance from each group can be used at a time. So use main_gpio0 and wkup_gpio0 in current linux context and disable the rest of the nodes. Signed-off-by: Faiz Abbas Signed-off-by: Sekhar Nori Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20210326064120.31919-3-a-govindraju@ti.com commit e0b2e6af39ea94a6fdba53571e6711df49b6ee8d Author: Faiz Abbas Date: Fri Mar 26 12:11:18 2021 +0530 arm64: dts: ti: k3-j7200: Add gpio nodes There are 4 instances of gpio modules in main domain: gpio0, gpio2, gpio4 and gpio6 Groups are created to provide protection between different processor virtual worlds. Each of these modules I/O pins are muxed within the group. Exactly one module can be selected to control the corresponding pin by selecting it in the pad mux configuration registers. This group in main domain pins out 69 lines (5 banks). Add DT modes for each module instance in the main domain. Similar to the gpio groups in main domain, there is one gpio group in wakeup domain with 2 module instances in it. The gpio group pins out 72 pins (6 banks) of the first 85 gpio lines. Add DT nodes for each module instance in the wakeup domain. Signed-off-by: Faiz Abbas Signed-off-by: Sekhar Nori Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20210326064120.31919-2-a-govindraju@ti.com commit a1281601f88e924a2e8c7572065d3e9fecf3c3fb Author: Liu Jian Date: Fri Mar 26 20:31:38 2021 +0800 farsync: use DEFINE_SPINLOCK() for spinlock spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Reported-by: Hulk Robot Signed-off-by: Liu Jian Signed-off-by: David S. Miller commit c3c97fd0ca6a7c2d566b2092010ed9e7ffcd4bb1 Merge: bc556d3edd0d3 72e6afe6b4b3a Author: David S. Miller Date: Fri Mar 26 15:24:14 2021 -0700 Merge branch 'llc-kdoc' Yang Yingliang says: ==================== net: llc: Correct some function names in header Fix some make W=1 kernel build warnings in net/llc/ ==================== Signed-off-by: David S. Miller commit 72e6afe6b4b3aee69b2dae1ac8b32efc503b48ab Author: Yang Yingliang Date: Fri Mar 26 18:13:50 2021 +0800 net: llc: Correct function name llc_pdu_set_pf_bit() in header Fix the following make W=1 kernel build warning: net/llc/llc_pdu.c:36: warning: expecting prototype for pdu_set_pf_bit(). Prototype was for llc_pdu_set_pf_bit() instead Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 8114f099d93729642f70fe4fc40f159e208acfc4 Author: Yang Yingliang Date: Fri Mar 26 18:13:49 2021 +0800 net: llc: Correct function name llc_sap_action_unitdata_ind() in header Fix the following make W=1 kernel build warning: net/llc/llc_s_ac.c:38: warning: expecting prototype for llc_sap_action_unit_data_ind(). Prototype was for llc_sap_action_unitdata_ind() instead Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit 26440a63a1ac59e76bbe727dde8f89b7efef3e18 Author: Yang Yingliang Date: Fri Mar 26 18:13:48 2021 +0800 net: llc: Correct some function names in header Fix the following make W=1 kernel build warning: net/llc/llc_c_ev.c:622: warning: expecting prototype for conn_ev_qlfy_last_frame_eq_1(). Prototype was for llc_conn_ev_qlfy_last_frame_eq_1() instead net/llc/llc_c_ev.c:636: warning: expecting prototype for conn_ev_qlfy_last_frame_eq_0(). Prototype was for llc_conn_ev_qlfy_last_frame_eq_0() instead Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: David S. Miller commit bc556d3edd0d3062b22fb5ce4d192650c4ddc2a6 Author: Hoang Le Date: Fri Mar 26 16:14:14 2021 +0700 tipc: fix kernel-doc warnings Fix kernel-doc warning introduced in commit b83e214b2e04 ("tipc: add extack messages for bearer/media failure"): net/tipc/bearer.c:248: warning: Function parameter or member 'extack' not described in 'tipc_enable_bearer' Fixes: b83e214b2e04 ("tipc: add extack messages for bearer/media failure") Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 63c173ff7aa3b58b1f5cd4227f53455a78cea627 Author: Mohammad Athari Bin Ismail Date: Fri Mar 26 17:10:46 2021 +0800 net: stmmac: Fix kernel panic due to NULL pointer dereference of fpe_cfg In this patch, "net: stmmac: support FPE link partner hand-shaking procedure", priv->plat->fpe_cfg wouldn`t be "devm_kzalloc"ed if dma_cap->frpsel is 0 (Flexible Rx Parser is not supported in SoC) in tc_init(). So, fpe_cfg will be remain as NULL and accessing it will cause kernel panic. To fix this, move the "devm_kzalloc"ing of priv->plat->fpe_cfg before dma_cap->frpsel checking in tc_init(). Additionally, checking of priv->dma_cap.fpesel is added before calling stmmac_fpe_link_state_handle() as only FPE supported SoC is allowed to call the function. Below is the kernel panic dump reported by Marek Szyprowski : meson8b-dwmac ff3f0000.ethernet eth0: PHY [0.0:00] driver [RTL8211F Gigabit Ethernet] (irq=35) meson8b-dwmac ff3f0000.ethernet eth0: No Safety Features support found meson8b-dwmac ff3f0000.ethernet eth0: PTP not supported by HW meson8b-dwmac ff3f0000.ethernet eth0: configuring for phy/rgmii link mode Unable to handle kernel NULL pointer dereference at virtual address 0000000000000001 Mem abort info: ... user pgtable: 4k pages, 48-bit VAs, pgdp=00000000044eb000 [0000000000000001] pgd=0000000000000000, p4d=0000000000000000 Internal error: Oops: 96000004 [#1] PREEMPT SMP Modules linked in: dw_hdmi_i2s_audio dw_hdmi_cec meson_gxl realtek meson_gxbb_wdt snd_soc_meson_axg_sound_card dwmac_generic axg_audio meson_dw_hdmi crct10dif_ce snd_soc_meson_card_utils snd_soc_meson_axg_tdmout panfrost rc_odroid gpu_sched reset_meson_audio_arb meson_ir snd_soc_meson_g12a_tohdmitx snd_soc_meson_axg_frddr sclk_div clk_phase snd_soc_meson_codec_glue dwmac_meson8b snd_soc_meson_axg_fifo stmmac_platform meson_rng meson_drm stmmac rtc_meson_vrtc rng_core meson_canvas pwm_meson dw_hdmi mdio_mux_meson_g12a pcs_xpcs snd_soc_meson_axg_tdm_interface snd_soc_meson_axg_tdm_formatter nvmem_meson_efuse display_connector CPU: 1 PID: 7 Comm: kworker/u8:0 Not tainted 5.12.0-rc4-next-20210325+ Hardware name: Hardkernel ODROID-C4 (DT) Workqueue: events_power_efficient phylink_resolve pstate: 20400009 (nzCv daif +PAN -UAO -TCO BTYPE=--) pc : stmmac_mac_link_up+0x14c/0x348 [stmmac] lr : stmmac_mac_link_up+0x284/0x348 [stmmac] ... Call trace: stmmac_mac_link_up+0x14c/0x348 [stmmac] phylink_resolve+0x104/0x420 process_one_work+0x2a8/0x718 worker_thread+0x48/0x460 kthread+0x134/0x160 ret_from_fork+0x10/0x18 Code: b971ba60 350007c0 f958c260 f9402000 (39400401) ---[ end trace 0c9deb6c510228aa ]--- Fixes: 5a5586112b92 ("net: stmmac: support FPE link partner hand-shaking procedure") Reported-by: Marek Szyprowski Signed-off-by: Mohammad Athari Bin Ismail Tested-by: Marek Szyprowski Signed-off-by: David S. Miller commit aeab5cfbc8c79c33f367f65c0566c9a33a50cd30 Author: Xu Jia Date: Fri Mar 26 10:40:46 2021 +0800 net: ethernet: remove duplicated include Remove duplicated include from mtk_ppe_offload.c. Reported-by: Hulk Robot Signed-off-by: Xu Jia Signed-off-by: David S. Miller commit 4e6d698f86a49681fd5e8e3639da3dbe451333bb Merge: 32bc7a2cca4d7 b11bfb9a19f9d Author: David S. Miller Date: Fri Mar 26 15:17:17 2021 -0700 Merge branch 'axienet-clock-additions' Robert Hancock says: ==================== axienet clock additions Add support to the axienet driver for controlling all of the clocks that the logic core may utilize. Changed since v3: -Added Acked-by to patch 1 -Now applies to net-next tree after earlier patches merged in - code unchanged from v3 Changed since v2: -Additional clock description clarification Changed since v1: -Clarified clock usages in documentation and code comments ==================== Signed-off-by: David S. Miller commit b11bfb9a19f9d790eea10cbd338b6b7f086c6dca Author: Robert Hancock Date: Thu Mar 25 18:04:38 2021 -0600 net: axienet: Enable more clocks This driver was only enabling the first clock on the device, regardless of its name. However, this controller logic can have multiple clocks which should all be enabled. Add support for enabling additional clocks. The clock names used are matching those used in the Xilinx version of this driver as well as the Xilinx device tree generator, except for mgt_clk which is not present there. For backward compatibility, if no named clocks are present, the first clock present is used for determining the MDIO bus clock divider. Reviewed-by: Radhey Shyam Pandey Signed-off-by: Robert Hancock Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit a0e55dcd2fa9198fae0e9e088a65d36897748760 Author: Robert Hancock Date: Thu Mar 25 18:04:37 2021 -0600 dt-bindings: net: xilinx_axienet: Document additional clocks Update DT bindings to describe all of the clocks that the axienet driver will now be able to make use of. Acked-by: Rob Herring Signed-off-by: Robert Hancock Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 32bc7a2cca4d748e434702378ec1c728a2387e04 Merge: 6e27514334904 63ed8de4be81b Author: David S. Miller Date: Fri Mar 26 15:14:57 2021 -0700 Merge branch 'mld-sleepable' Taehee Yoo says: ==================== mld: change context from atomic to sleepable This patchset changes the context of MLD module. Before this patchset, MLD functions are atomic context so it couldn't use sleepable functions and flags. There are several reasons why MLD functions are under atomic context. 1. It uses timer API. Timer expiration functions are executed in the atomic context. 2. atomic locks MLD functions use rwlock and spinlock to protect their own resources. So, in order to switch context, this patchset converts resources to use RCU and removes atomic locks and timer API. 1. The first patch convert from the timer API to delayed work. Timer API is used for delaying some works. MLD protocol has a delay mechanism, which is used for replying to a query. If a listener receives a query from a router, it should send a response after some delay. But because of timer expire function is executed in the atomic context, this patch convert from timer API to the delayed work. 2. The fourth patch deletes inet6_dev->mc_lock. The mc_lock has protected inet6_dev->mc_tomb pointer. But this pointer is already protected by RTNL and it isn't be used by datapath. So, it isn't be needed and because of this, many atomic context critical sections are deleted. 3. The fifth patch convert ip6_sf_socklist to RCU. ip6_sf_socklist has been protected by ipv6_mc_socklist->sflock(rwlock). But this is already protected by RTNL So if it is converted to use RCU in order to be used in the datapath, the sflock is no more needed. So, its control path context can be switched to sleepable. 4. The sixth patch convert ip6_sf_list to RCU. The reason for this patch is the same as the previous patch. 5. The seventh patch convert ifmcaddr6 to RCU. The reason for this patch is the same as the previous patch. 6. Add new workqueues for processing query/report event. By this patch, query and report events are processed by workqueue So context is sleepable, not atomic. While this logic, it acquires RTNL. 7. Add new mc_lock. The purpose of this lock is to protect per-interface mld data. Per-interface mld data is usually used by query/report event handler. So, query/report event workers need only this lock instead of RTNL. Therefore, it could reduce bottleneck. Changelog: v2 -> v3: 1. Do not use msecs_to_jiffies(). (by Cong Wang) 2. Do not add unnecessary rtnl_lock() and rtnl_unlock(). (by Cong Wang) 3. Fix sparse warnings because of rcu annotation. (by kernel test robot) - Remove some rcu_assign_pointer(), which was used for non-rcu pointer. - Add union for rcu pointer. - Use rcu API in mld_clear_zeros(). - Remove remained rcu_read_unlock(). - Use rcu API for tomb resources. 4. withdraw prevopus 2nd and 3rd patch. - "separate two flags from ifmcaddr6->mca_flags" - "add a new delayed_work, mc_delrec_work" 5. Add 6th and 7th patch. v1 -> v2: 1. Withdraw unnecessary refactoring patches. (by Cong Wang, Eric Dumazet, David Ahern) a) convert from array to list. b) function rename. 2. Separate big one patch into small several patches. 3. Do not rename 'ifmcaddr6->mca_lock'. In the v1 patch, this variable was changed to 'ifmcaddr6->mca_work_lock'. But this is actually not needed. 4. Do not use atomic_t for 'ifmcaddr6->mca_sfcount' and 'ipv6_mc_socklist'->sf_count'. 5. Do not add mld_check_leave_group() function. 6. Do not add ip6_mc_del_src_bulk() function. 7. Do not add ip6_mc_add_src_bulk() function. 8. Do not use rcu_read_lock() in the qeth_l3_add_mcast_rtnl(). (by Julian Wiedmann) ==================== Signed-off-by: David S. Miller commit 63ed8de4be81b699ca727e9f8e3344bd487806d7 Author: Taehee Yoo Date: Thu Mar 25 16:16:57 2021 +0000 mld: add mc_lock for protecting per-interface mld data The purpose of this lock is to avoid a bottleneck in the query/report event handler logic. By previous patches, almost all mld data is protected by RTNL. So, the query and report event handler, which is data path logic acquires RTNL too. Therefore if a lot of query and report events are received, it uses RTNL for a long time. So it makes the control-plane bottleneck because of using RTNL. In order to avoid this bottleneck, mc_lock is added. mc_lock protect only per-interface mld data and per-interface mld data is used in the query/report event handler logic. So, no longer rtnl_lock is needed in the query/report event handler logic. Therefore bottleneck will be disappeared by mc_lock. Suggested-by: Cong Wang Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit f185de28d9ae6c978135993769352e523ee8df06 Author: Taehee Yoo Date: Thu Mar 25 16:16:56 2021 +0000 mld: add new workqueues for process mld events When query/report packets are received, mld module processes them. But they are processed under BH context so it couldn't use sleepable functions. So, in order to switch context, the two workqueues are added which processes query and report event. In the struct inet6_dev, mc_{query | report}_queue are added so it is per-interface queue. And mc_{query | report}_work are workqueue structure. When the query or report event is received, skb is queued to proper queue and worker function is scheduled immediately. Workqueues and queues are protected by spinlock, which is mc_{query | report}_lock, and worker functions are protected by RTNL. Suggested-by: Cong Wang Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 88e2ca3080947fe22eb520c1f8231e79a105d011 Author: Taehee Yoo Date: Thu Mar 25 16:16:55 2021 +0000 mld: convert ifmcaddr6 to RCU The ifmcaddr6 has been protected by inet6_dev->lock(rwlock) so that the critical section is atomic context. In order to switch this context, changing locking is needed. The ifmcaddr6 actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to sleepable. Suggested-by: Cong Wang Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 4b200e398953c237c86d32bf26d4cb2a96556a6f Author: Taehee Yoo Date: Thu Mar 25 16:16:54 2021 +0000 mld: convert ip6_sf_list to RCU The ip6_sf_list has been protected by mca_lock(spin_lock) so that the critical section is atomic context. In order to switch this context, changing locking is needed. The ip6_sf_list actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to sleepable. But It doesn't remove mca_lock yet because ifmcaddr6 isn't converted to RCU yet. So, It's not fully converted to the sleepable context. Suggested-by: Cong Wang Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 882ba1f73c06831f2a21044ebd8864c485ac04f2 Author: Taehee Yoo Date: Thu Mar 25 16:16:53 2021 +0000 mld: convert ipv6_mc_socklist->sflist to RCU The sflist has been protected by rwlock so that the critical section is atomic context. In order to switch this context, changing locking is needed. The sflist actually already protected by RTNL So if it's converted to use RCU, its control path context can be switched to sleepable. Suggested-by: Cong Wang Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit cf2ce339b401bc53ee131f0ce38bae32a949925e Author: Taehee Yoo Date: Thu Mar 25 16:16:52 2021 +0000 mld: get rid of inet6_dev->mc_lock The purpose of mc_lock is to protect inet6_dev->mc_tomb. But mc_tomb is already protected by RTNL and all functions, which manipulate mc_tomb are called under RTNL. So, mc_lock is not needed. Furthermore, it is spinlock so the critical section is atomic. In order to reduce atomic context, it should be removed. Suggested-by: Cong Wang Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 2d9a93b4902be6a5504b5941dd15e9cd776aadca Author: Taehee Yoo Date: Thu Mar 25 16:16:51 2021 +0000 mld: convert from timer to delayed work mcast.c has several timers for delaying works. Timer's expire handler is working under atomic context so it can't use sleepable things such as GFP_KERNEL, mutex, etc. In order to use sleepable APIs, it converts from timers to delayed work. But there are some critical sections, which is used by both process and BH context. So that it still uses spin_lock_bh() and rwlock. Suggested-by: Cong Wang Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller commit 6e2751433490465ad9d82ea751149586ed9d637b Merge: f59798b8f683e d04feecaf1543 Author: David S. Miller Date: Fri Mar 26 15:09:45 2021 -0700 Merge branch 'ethtool-kdoc-touchups' Jakub Kicinski says: ==================== ethtool: fec: ioctl kdoc touch ups A few touch ups from v1 review. ==================== Signed-off-by: David S. Miller commit d04feecaf1543e538e856166e494daebe808d1fe Author: Jakub Kicinski Date: Fri Mar 26 13:22:23 2021 -0700 ethtool: document the enum values not defines kdoc does not have good support for documenting defines, and we can't abuse the enum documentation because it generates warnings. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit cf2cc0bf4fde7b9db68d605bbe26457aea3685a0 Author: Jakub Kicinski Date: Fri Mar 26 13:22:22 2021 -0700 ethtool: fec: fix FEC_NONE check Dan points out we need to use the mask not the bit (which is 0). Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 42ce127d9864 ("ethtool: fec: sanitize ethtool_fecparam->fec") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit ad1cd7856d870e5861ef80fbf3e4b0d68bb82a69 Author: Jakub Kicinski Date: Fri Mar 26 13:22:21 2021 -0700 ethtool: fec: add note about reuse of reserved struct ethtool_fecparam::reserved can't be used in SET, because ethtool user space doesn't zero-initialize the structure. Make this clear. Suggested-by: Andrew Lunn Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit f59798b8f683ec16e724d0a0a43c75cfa4822ec1 Merge: 6cb502a3684ea ef360019db404 Author: David S. Miller Date: Fri Mar 26 15:05:15 2021 -0700 Merge branch 'mptcp-cleanups' Mat Martineau says: ==================== MPTCP: Cleanup and address advertisement fixes This patch series contains cleanup and fixes we have been testing in the MPTCP tree. MPTCP uses TCP option headers to advertise additional address information after an initial connection is established. The main fixes here deal with making those advertisements more reliable and improving the way subflows are created after an advertisement is received. Patches 1, 2, 4, 10, and 12 are for various cleanup or refactoring. Patch 3 skips an extra connection attempt if there's already a subflow connection for the newly received advertisement. Patches 5, 6, and 7 make sure that the next address is advertised when there are multiple addresses to share, the advertisement has been retried, and the peer has not echoed the advertisement. Self tests are updated. Patches 8 and 9 fix a problem similar to 5/6/7, but covers a case where the failure was due to a subflow connection not completing. Patches 11 and 13 send a bare ack to revoke an advertisement rather than waiting for other activity to trigger a packet send. This mirrors the way acks are sent for new advertisements. Self test is included. ==================== Signed-off-by: David S. Miller commit ef360019db4043d53d631aec1e630bd6e6ce54f4 Author: Geliang Tang Date: Fri Mar 26 11:26:42 2021 -0700 selftests: mptcp: signal addresses testcases This patch adds testcases for signalling multi valid and invalid addresses for both signal_address_tests and remove_tests. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit b46a023810939c2839250711282bb66946666d27 Author: Geliang Tang Date: Fri Mar 26 11:26:41 2021 -0700 mptcp: rename mptcp_pm_nl_add_addr_send_ack Since mptcp_pm_nl_add_addr_send_ack is now used for both ADD_ADDR and RM_ADDR cases, rename it to mptcp_pm_nl_addr_send_ack. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 8dd5efb1f91b09975295bd162441fe4a23edb3e2 Author: Geliang Tang Date: Fri Mar 26 11:26:40 2021 -0700 mptcp: send ack for rm_addr This patch changes the sending ACK conditions for the ADD_ADDR, send an ACK packet for RM_ADDR too. In mptcp_pm_remove_addr, invoke mptcp_pm_nl_add_addr_send_ack to send the ACK packet. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit b65d95adb802b41a501b75ee4646f4a49fc66eb4 Author: Geliang Tang Date: Fri Mar 26 11:26:39 2021 -0700 mptcp: drop useless addr_signal clear msk->pm.addr_signal is cleared in mptcp_pm_add_addr_signal, no need to clear it in mptcp_pm_nl_add_addr_send_ack again. Drop it. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 557963c383e8209b14de91bf2a0301a41b94d8c4 Author: Geliang Tang Date: Fri Mar 26 11:26:38 2021 -0700 mptcp: move to next addr when subflow creation fail When an invalid address was announced, the subflow couldn't be created for this address. Therefore mptcp_pm_nl_subflow_established couldn't be invoked. Then the next addresses in the local address list didn't have a chance to be announced. This patch invokes the new function mptcp_pm_add_addr_echoed when the address is echoed. In it, use mptcp_lookup_anno_list_by_saddr to check whether this address is in the anno_list. If it is, PM schedules the status MPTCP_PM_SUBFLOW_ESTABLISHED to invoke mptcp_pm_create_subflow_or_signal_addr to deal with the next address in the local address list. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d88c476f4a7dd69a2588470f6c4f8b663efa16c6 Author: Geliang Tang Date: Fri Mar 26 11:26:37 2021 -0700 mptcp: export lookup_anno_list_by_saddr This patch exported the static function lookup_anno_list_by_saddr, and renamed it to mptcp_lookup_anno_list_by_saddr. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 8da6229b9524d9a4ea91ed1308f7e45bfe0b2799 Author: Geliang Tang Date: Fri Mar 26 11:26:36 2021 -0700 selftests: mptcp: timeout testcases for multi addresses This patch added the timeout testcases for multi addresses, valid and invalid. These testcases need to transmit 8 ADD_ADDRs, so add a new speed level 'least' to set 10 to mptcp_connect to slow down the transmitting process. The original speed level 'slow' still uses 50. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 2e580a63b5c214a89bcc3e243ee2058691cee001 Author: Geliang Tang Date: Fri Mar 26 11:26:35 2021 -0700 selftests: mptcp: add cfg_do_w for cfg_remove In some testcases, we need to slow down the transmitting process. This patch added a new argument named cfg_do_w for cfg_remove to allow the caller to pass an argument to cfg_remove. In do_rnd_write, use this cfg_do_w to control the transmitting speed. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 348d5c1dec60f5f50869a8e40315a66006897732 Author: Geliang Tang Date: Fri Mar 26 11:26:34 2021 -0700 mptcp: move to next addr when timeout This patch called mptcp_pm_subflow_established to move to the next address when an ADD_ADDR has been retransmitted the maximum number of times. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 62535200be178fe9360420557cfbcb94c1b93694 Author: Geliang Tang Date: Fri Mar 26 11:26:33 2021 -0700 mptcp: drop unused subflow in mptcp_pm_subflow_established This patch drops the unused parameter subflow in mptcp_pm_subflow_established(). Fixes: 926bdeab5535 ("mptcp: Implement path manager interface commands") Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d84ad04941c3e30dec193d4c39fce07a4c513cb4 Author: Geliang Tang Date: Fri Mar 26 11:26:32 2021 -0700 mptcp: skip connecting the connected address This patch added a new helper named lookup_subflow_by_daddr to find whether the destination address is in the msk's conn_list. In mptcp_pm_nl_add_addr_received, use lookup_subflow_by_daddr to check whether the announced address is already connected. If it is, skip connecting this address and send out the echo. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit f7efc7771eac1d149c8981a6d203bce6f1c49210 Author: Geliang Tang Date: Fri Mar 26 11:26:31 2021 -0700 mptcp: drop argument port from mptcp_pm_announce_addr Drop the redundant argument 'port' from mptcp_pm_announce_addr, use the port field of another argument 'addr' instead. Fixes: 0f5c9e3f079f ("mptcp: add port parameter for mptcp_pm_announce_addr") Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 2d6f5a2b5720cd3fdbaa21d8f5a6a192257b2a3c Author: Paolo Abeni Date: Fri Mar 26 11:26:30 2021 -0700 mptcp: clean-up the rtx path After the previous patch we can easily avoid invoking the workqueue to perform the retransmission, if the msk socket lock is held at rtx timer expiration. This also simplifies the relevant code. Co-developed-by: Matthieu Baerts Signed-off-by: Matthieu Baerts Signed-off-by: Paolo Abeni Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6cb502a3684ea55ee76c5b070450b3caa4151565 Merge: 4d656b706db36 3219953bedc56 Author: David S. Miller Date: Fri Mar 26 15:02:39 2021 -0700 Merge branch 'ipa-resource' Alex Elder says: ==================== net: ipa: rework resource programming This series reworks the way IPA resources are defined and programmed. It is a little long--and I apologize for that--but I think the patches are best taken together as a single unit. The IPA hardware operates with a set of distinct "resources." Each hardware instance has a fixed number of each resource type available. Available resources are divided into smaller pools, with each pool shared by endpoints in a "resource group." Each endpoint is thus assigned to a resource group that determines which pools supply resources the IPA hardware uses to handle the endpoint's processing. The exact set of resources used can differ for each version of IPA. Except for IPA v3.0 and v3.1, there are 5 source and 2 destination resource types, but there's no reason to assume this won't change. The number of resource groups used *does* typically change based on the hardware version. For example, some versions target reduced functionality and support fewer resource groups. With that as background... The net result of this series is to improve the flexibility with which IPA resources and resource groups are defined, permitting each version of IPA to define its own set of resources and groups. Along the way it isolates the resource-related code, and fixes a few bugs related to resource handling. The first patch moves resource-related code to a new C file (and header). It generates a checkpatch warning about updating MAINTAINERS, which can be ignored. The second patch fixes a bug, but the bug does not affect SDM845 or SC7180. The third patch defines an enumerated type whose members provide symbolic names for resource groups. The fourth defines some resource limits for SDM845 that were not previously being programmed. That platform "works" without this, but to be correct, these limits should really be programmed. The fifth patch uses a single enumerated type to define both source and destination resource type IDs, and the sixth uses those IDs to index the resource limit arrays. The seventh moves the definition of that enumerated type into the platform data files, allowing each platform to define its own set of resource types. The eighth and ninth are fairly trivial changes. One replaces two "max" symbols having the same value with a single symbol. And the other replaces two distinct but otherwise identical structure types with a single common one. The 10th is a small preparatory patch for the 11th, passing a different argument to a function that programs resource values. The 11th allows the actual number of source and destination resource groups for a platform to be specified in its configuration data. That way the number is based on the actual number of groups defined. This removes the need for a sort of clunky pair of functions that defined that information previously. Finally, the last patch just increases the number of resource groups that can be defined to 8. ==================== Signed-off-by: David S. Miller commit 3219953bedc563ef988fa423f8ac67a441f69b4b Author: Alex Elder Date: Fri Mar 26 10:11:22 2021 -0500 net: ipa: support more than 6 resource groups IPA versions 3.0 and 3.1 support up to 8 resource groups. There is some interest in supporting these older versions of the hardware, so update the resource configuration code to program resource limits for these groups if specified. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 4fd704b3608a4c89260ea33895a694bc5385e00f Author: Alex Elder Date: Fri Mar 26 10:11:21 2021 -0500 net: ipa: record number of groups in data The arrays of source and destination resource limits defined in configuration data are of a fixed size--which is the maximum number of resource groups supported for any platform. Most platforms will use fewer than that many groups. Add new members to the ipa_rsrc_group_id enumerated type to define the number of source and destination resource groups are defined for the platform. (This type is defined for each platform in its data file.) Add a new field to the resource configuration data that indicates how many of the source and destination resource groups are actually used for the platform, and initialize it with the count value. This allows us to determine the number of groups defined for the platform without exposing the ipa_rsrc_group_id enumerated type. As a result, we no longer need ipa_resource_group_src_count() and ipa_resource_group_dst_count(), because each platform now defines its supported number of resource groups. So get rid of those two functions. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 93c03729c548ea30b8bb38f2ab51008f11babe2a Author: Alex Elder Date: Fri Mar 26 10:11:20 2021 -0500 net: ipa: pass data for source and dest resource config Pass the resource data pointer to ipa_resource_config_src() and ipa_resource_config_dst() to be used for configuring resource limits. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 7336ce1a7ae70335b895901f4b1893c7f40b6be5 Author: Alex Elder Date: Fri Mar 26 10:11:19 2021 -0500 net: ipa: combine source and destation resource types The ipa_resource_src and ipa_resource_dst structures are identical in form, so just replace them with a single structure. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d9d1cddf8b98e9752bbe528b7085d3a5d155fb2d Author: Alex Elder Date: Fri Mar 26 10:11:18 2021 -0500 net: ipa: combine source and destination group limits Replace IPA_RESOURCE_GROUP_SRC_MAX and IPA_RESOURCE_GROUP_DST_MAX with a single symbol, IPA_RESOURCE_GROUP_MAX. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit cf9a10bd7c49ab59ef476711e8c8467ce738b6d9 Author: Alex Elder Date: Fri Mar 26 10:11:17 2021 -0500 net: ipa: move ipa_resource_type definition Most platforms have the same set of source and destination resource types. But some older platforms have some additional ones, and it's possible different resources will be used in the future. Move the definition of the ipa_resource_type enumerated type so it is defined for each platform in its configuration data file. This permits each to have a distinct set of resources. Shorten the data files slightly, by putting the min and max limit values on the same line. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 4bcfb35e7af9413a4715ec2c74f51e20043c70e2 Author: Alex Elder Date: Fri Mar 26 10:11:16 2021 -0500 net: ipa: index resource limits with type Remove the type field from the ipa_resource_src and ipa_resource_dst structures, and instead use that value as the index into the arrays of source and destination resources. Change ipa_resource_config_src() and ipa_resource_config_dst() so the resource type is passed in as an argument. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit fd2b7bc3211342e003d00625973318613e0aa2fe Author: Alex Elder Date: Fri Mar 26 10:11:15 2021 -0500 net: ipa: combine resource type definitions Combine the ipa_resource_type_src and ipa_resource_type_dst enumerated types into a single enumerated type, ipa_resource_type. Assign value 0 to the first element for the source and destination types, so their numeric values are preserved. Add some additional commentary where these are defined, stating explicitly that code assumes the first source and first destination member must have numeric value 0. Fix the kerneldoc comments for the ipa_gsi_endpoint_data structure. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 9ab7e72882668c5223c55581bdcd44fdf5e9d882 Author: Alex Elder Date: Fri Mar 26 10:11:14 2021 -0500 net: ipa: add some missing resource limits Currently, the SDM845 configuration data defines resource limits for the first two resource groups (for both source and destination resource types). The hardware supports additional resource groups, and we should program the resource limits for those groups as well. Even the "unused" destination resource group (number 2) should have non-zero limits programmed in some cases, to ensure correct operation. Add these missing resource group limit definitions to the SDM845 configuration data. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 47f71d6e677cfa2853203ea77c0a47c23fea92c0 Author: Alex Elder Date: Fri Mar 26 10:11:13 2021 -0500 net: ipa: identify resource groups Define a new ipa_resource_group_id enumerated type, whose members have numeric values that match the resource group number used when programming the hardware. Each platform supports a different number of source and destination resource groups, so define the type separately for each platform in its configuration data file. Use these new symbolic values when specifying the resource group an endpoint is associated with. And use them to index the limits arrays for source and destination resources, making it clearer how these values are used. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit a749c6c03762f71ba4d04ead60b4f5df9ca2bf5e Author: Alex Elder Date: Fri Mar 26 10:11:12 2021 -0500 net: ipa: fix bug in resource group limit programming If the number of resource groups supported by the hardware is less than a certain number, we return early in ipa_resource_config_src() and ipa_resource_config_dst() (to avoid programming resource limits for non-existent groups). Unfortunately, these checks are off by one. Fix this problem in the four places it occurs. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit ee3e6beaa015ff1526440bf31f1782b6daa772da Author: Alex Elder Date: Fri Mar 26 10:11:11 2021 -0500 net: ipa: introduce ipa_resource.c Separate the IPA resource-related code into a new source file, "ipa_resource.c", and matching header file "ipa_resource.h". Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 4d656b706db3609618e863ee81d9f3944bc2f8e7 Merge: 026412ecac5d8 b1261897b0902 Author: David S. Miller Date: Fri Mar 26 14:58:44 2021 -0700 Merge branch 'hns3-cleanups' Huazhong Tan says: ==================== net: hns3: add some cleanups This series includes some cleanups for the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit b1261897b0902d870c483fb006a9443723a3d58b Author: Guojia Liao Date: Fri Mar 26 09:36:28 2021 +0800 net: hns3: split out hclge_tm_vport_tc_info_update() hclge_tm_vport_tc_info_update() is bloated, so split it into separate functions for readability and maintainability. Signed-off-by: Guojia Liao Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 74d439b74ad3e05780d4cf3ab047345b443f7e67 Author: Yufeng Mo Date: Fri Mar 26 09:36:27 2021 +0800 net: hns3: split function hclge_reset_rebuild() hclge_reset_rebuild() is a bit too long. So add a new function hclge_update_reset_level() to improve readability. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f7be24f00702cf07d025c79ab30a15f7d7db5cac Author: Huazhong Tan Date: Fri Mar 26 09:36:26 2021 +0800 net: hns3: fix some typos in hclge_main.c s/sucessful/successful/ s/serivce/service/ and remove a redundant new. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit a1e144d7dc3c55aa4d451e3a23cd8f34cd65ee01 Author: Huazhong Tan Date: Fri Mar 26 09:36:25 2021 +0800 net: hns3: fix prototype warning Correct a report warning in hns3_ethtool.c Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 1e49432b91d671fd690a6a99fcc082ae44b79faf Author: Huazhong Tan Date: Fri Mar 26 09:36:24 2021 +0800 net: hns3: remove unused parameter from hclge_dbg_dump_loopback() Parameter cm_buf is never used, so remove it. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 567d1dd3e4bc204e424553ccf2e1d47b0f5d03a8 Author: Peng Li Date: Fri Mar 26 09:36:23 2021 +0800 net: hns3: remove unused parameter from hclge_set_vf_vlan_common() Parameter vf in hclge_set_vf_vlan_common() is unused now, so remove it. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit d914971df022e7abdb5f8fdfd901a655c9786c05 Author: Jiaran Zhang Date: Fri Mar 26 09:36:22 2021 +0800 net: hns3: remove redundant query in hclge_config_tm_hw_err_int() According to the HW manual, the query operation is unnecessary when the TM QCN error event is enabled, so remove it. Signed-off-by: Jiaran Zhang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit c0127115ee2329dd57a65dceb139ec7cc39f48c7 Author: Peng Li Date: Fri Mar 26 09:36:21 2021 +0800 net: hns3: remove redundant blank lines Remove some redundant blank lines. Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 43f8b9333d86d4e3a42e55a6e41c78c249ac0216 Author: Jian Shen Date: Fri Mar 26 09:36:20 2021 +0800 net: hns3: remove unused code of vmdq Vmdq is not supported yet, the num_vmdq_vport is always 0, it's a bit confusing when using the num_vport, so remove these unused codes of vmdq. Reported-by: Dan Carpenter Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 231d3dbdda192e3b3c7b79f4c3b0616f6c7f31b7 Author: Sean Christopherson Date: Fri Mar 19 20:22:20 2021 +1300 x86/sgx: Add SGX_CHILD_PRESENT hardware error code SGX driver can accurately track how enclave pages are used. This enables SECS to be specifically targeted and EREMOVE'd only after all child pages have been EREMOVE'd. This ensures that SGX driver will never encounter SGX_CHILD_PRESENT in normal operation. Virtual EPC is different. The host does not track how EPC pages are used by the guest, so it cannot guarantee EREMOVE success. It might, for instance, encounter a SECS with a non-zero child count. Add a definition of SGX_CHILD_PRESENT. It will be used exclusively by the SGX virtualization driver to handle recoverable EREMOVE errors when saniziting EPC pages after they are freed. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/050b198e882afde7e6eba8e6a0d4da39161dbb5a.1616136308.git.kai.huang@intel.com commit b0c7459be0670fabe080e30906ba9fe62df5e02c Author: Kai Huang Date: Thu Mar 25 22:30:57 2021 +1300 x86/sgx: Wipe out EREMOVE from sgx_free_epc_page() EREMOVE takes a page and removes any association between that page and an enclave. It must be run on a page before it can be added into another enclave. Currently, EREMOVE is run as part of pages being freed into the SGX page allocator. It is not expected to fail, as it would indicate a use-after-free of EPC pages. Rather than add the page back to the pool of available EPC pages, the kernel intentionally leaks the page to avoid additional errors in the future. However, KVM does not track how guest pages are used, which means that SGX virtualization use of EREMOVE might fail. Specifically, it is legitimate that EREMOVE returns SGX_CHILD_PRESENT for EPC assigned to KVM guest, because KVM/kernel doesn't track SECS pages. To allow SGX/KVM to introduce a more permissive EREMOVE helper and to let the SGX virtualization code use the allocator directly, break out the EREMOVE call from the SGX page allocator. Rename the original sgx_free_epc_page() to sgx_encl_free_epc_page(), indicating that it is used to free an EPC page assigned to a host enclave. Replace sgx_free_epc_page() with sgx_encl_free_epc_page() in all call sites so there's no functional change. At the same time, improve the error message when EREMOVE fails, and add documentation to explain to the user what that failure means and to suggest to the user what to do when this bug happens in the case it happens. [ bp: Massage commit message, fix typos and sanitize text, simplify. ] Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Reviewed-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/20210325093057.122834-1-kai.huang@intel.com commit 026412ecac5d8e9112d19d463761611fbb207bca Merge: 794d9b25817a8 31a91220a27d4 Author: David S. Miller Date: Fri Mar 26 14:50:34 2021 -0700 Merge tag 'mlx5-updates-2021-03-24' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-03-24 mlx5e netdev driver updates: 1) Some cleanups from Colin, Tariq and Saeed. 2) Aya made some trivial refactoring to cleanup and generalize PTP and RQ (Receive Queue) creation and management. Mostly code decoupling and reducing dependencies between the different RX objects in the netdev driver. This is a preparation series for upcoming PTP special RQ creation which will allow coexistence of CQE compression (important performance feature, especially in Multihost systems) and HW TS PTP. ==================== Signed-off-by: David S. Miller commit e55f2ffc4dc1052bd1ad4c0d3a51e6f1459c0659 Author: Eryk Brol Date: Thu Mar 25 14:06:14 2021 -0400 drm/mst: Enhance MST topology logging [why] MST topology print was missing fec logging and pdt printed as an int wasn't clear. vcpi and payload info was printed as an arbitrary series of ints which requires user to know the ordering of the prints, making the logs difficult to use. [how] -add fec logging -add pdt parsing into strings -format vcpi and payload info into tables with headings -clean up topology prints Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Signed-off-by: Eryk Brol Link: https://patchwork.freedesktop.org/patch/msgid/20210325180614.37060-1-eryk.brol@amd.com commit d58cf00dcedb9882ba6e933443371444d8a23b77 Author: Marcel Holtmann Date: Wed Mar 24 15:10:59 2021 +0100 Bluetooth: Increment management interface revision Increment the mgmt revision due to recent changes. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit 3d34a71ff8f8f95abd757c4fac70f07091b13314 Author: Marcel Holtmann Date: Wed Mar 24 15:10:56 2021 +0100 Bluetooth: Move the advertisement monitor events to correct list The list of trusted events should contain the advertisement monitor events and not the untrusted one, so move entries to the correct list. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit 02431b6cdb753e099df32a337f083c9502ceb0a0 Author: Marcel Holtmann Date: Wed Mar 24 15:10:55 2021 +0100 Bluetooth: Add missing entries for PHY configuration commands The list of supported mgmt commands for PHY configuration is missing, so just add them. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit 21dd118f8de318df2bebfcd44a722168bb705be7 Author: Marcel Holtmann Date: Sun Mar 14 14:56:08 2021 +0100 Bluetooth: Fix wrong opcode error for read advertising features The read advertising features error handling returns false the opcode for the set advertising command. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit 353cac0e108f0484b101fd8cc6c2c0c5d9100ca6 Author: Marcel Holtmann Date: Sun Mar 14 14:49:38 2021 +0100 Bluetooth: Fix mgmt status for LL Privacy experimental feature The return error when trying to change the setting when a controller is powered up, shall be MGMT_STATUS_REJECTED. However instead now the error MGMT_STATUS_NOT_POWERED is used which is exactly the opposite. Signed-off-by: Marcel Holtmann Signed-off-by: Luiz Augusto von Dentz commit 8657375165bc9de4d1387d94895f2e100db697e5 Author: Rob Herring Date: Wed Mar 24 14:22:53 2021 -0600 dt-bindings: media: video-interfaces: Drop the example The example in video-interfaces.yaml uses a bunch of undocumented bindings which will cause warnings when undocumented compatible checks are enabled. The example could be fixed to use documented bindings, but doing so would just duplicate other examples. So let's just remove the example. Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Cc: Laurent Pinchart Cc: linux-media@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20210324202253.3576798-1-robh@kernel.org Signed-off-by: Rob Herring commit 212209cff89fe497bc47abcd017aa95e4e8a5196 Author: Jonathan Corbet Date: Fri Mar 26 13:16:35 2021 -0600 docs: kernel-doc: properly recognize parameter lines with colons The previous attempt to properly handle literal blocks broke parsing of parameter lines containing colons; fix it by tweaking the regex to specifically exclude the "::" pattern while accepting lines containing colons in general. Add a little documentation to the regex while in the neighborhood. Reported-by: Stephen Rothwell Fixes: 8d295fbad687 ("kernel-doc: better handle '::' sequences") Signed-off-by: Jonathan Corbet commit db7b93e38106e58ac2ea24eaaea7ed760a319120 Author: Mikulas Patocka Date: Tue Mar 23 10:59:45 2021 -0400 dm integrity: add the "reset_recalculate" feature flag Add a new flag "reset_recalculate" that will restart recalculating from the beginning of the device. It can be used if we want to change the hash function. Example: dmsetup remove_all rmmod brd set -e modprobe brd rd_size=1048576 dmsetup create in --table '0 2000000 integrity /dev/ram0 0 16 J 2 internal_hash:sha256 recalculate' sleep 10 dmsetup status dmsetup remove in dmsetup create in --table '0 2000000 integrity /dev/ram0 0 16 J 2 internal_hash:sha3-256 reset_recalculate' Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit ece2577388334dd5e8d59cb46895f9573bc4b808 Author: Jiapeng Chong Date: Fri Mar 19 16:19:30 2021 +0800 dm persistent data: remove unused return from exit_shadow_spine() Fix the following coccicheck warnings: ./drivers/md/persistent-data/dm-btree-spine.c:188:5-6: Unneeded variable: "r". Return "0" on line 194. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Mike Snitzer commit 63508e38c1081c96abb315df1fd1acb77befa42f Author: Xu Wang Date: Fri Mar 19 08:16:28 2021 +0000 dm cache: remove needless request_queue NULL pointer checks Since commit ff9ea323816d ("block, bdi: an active gendisk always has a request_queue associated with it") the request_queue pointer returned from bdev_get_queue() shall never be NULL. Signed-off-by: Xu Wang Signed-off-by: Mike Snitzer commit 695902bb2e17baf10a5a312ef048b71f738ddbe8 Author: Xu Wang Date: Fri Mar 19 08:11:13 2021 +0000 dm thin: remove needless request_queue NULL pointer check Since commit ff9ea323816d ("block, bdi: an active gendisk always has a request_queue associated with it") the request_queue pointer returned from bdev_get_queue() shall never be NULL. Signed-off-by: Xu Wang Signed-off-by: Mike Snitzer commit e30de3a803448c65433d49847f5db23a221c3ee1 Author: Christoph Hellwig Date: Thu Mar 18 07:36:08 2021 +0100 dm: unexport dm_{get,put}_table_device These are only used by DM core, DM target modules should only use dm_{get,put}_device. Signed-off-by: Christoph Hellwig Signed-off-by: Mike Snitzer commit 1c72e02306b34e65ce1cd53d50b9190a19581086 Author: Bhaskar Chowdhury Date: Fri Mar 19 06:47:50 2021 +0530 dm ebs: fix a few typos s/retrievd/retrieved/ s/misalignement/misalignment/ s/funtion/function/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Mike Snitzer commit c909085bb319c97b7eccbce4dcbd47a32016e0f7 Author: Mikulas Patocka Date: Thu Mar 11 13:27:29 2021 -0500 dm ioctl: filter the returned values according to name or uuid prefix If we set non-empty param->name or param->uuid on the DM_LIST_DEVICES_CMD ioctl, the set values are considered filter prefixes. The ioctl will only return entries with matching name or uuid prefix. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 8b638081bd4520f63db1defc660666ec5f65bc15 Author: Mikulas Patocka Date: Fri Mar 12 09:07:30 2021 -0500 dm ioctl: return UUID in DM_LIST_DEVICES_CMD result When LVM needs to find a device with a particular UUID it needs to ask for UUID for each device. This patch returns UUID directly in the list of devices, so that LVM doesn't have to query all the devices with an ioctl. The UUID is returned if the flag DM_UUID_FLAG is set in the parameters. Returning UUID is done in backward-compatible way. There's one unused 32-bit word value after the event number. This patch sets the bit DM_NAME_LIST_FLAG_HAS_UUID if UUID is present and DM_NAME_LIST_FLAG_DOESNT_HAVE_UUID if it isn't (if none of these bits is set, then we have an old kernel that doesn't support returning UUIDs). The UUID is stored after this word. The 'next' value is updated to point after the UUID, so that old version of libdevmapper will skip the UUID without attempting to interpret it. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit b82096afc8afdc55408efb54ede2ec55c1f3f8c8 Author: Mikulas Patocka Date: Wed Mar 10 05:18:03 2021 -0500 dm ioctl: replace device hash with red-black tree For high numbers of DM devices the 64-entry hash table has non-trivial overhead. Fix this by replacing the hash table with a red-black tree. Reported-by: Zdenek Kabelac Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit 219a9b5e738b75a6a5e9effe1d72f60037a2f131 Author: JeongHyeon Lee Date: Thu Mar 11 21:10:51 2021 +0900 dm verity: allow only one error handling mode If more than one one handling mode is requested during DM verity table load, the last requested mode will be used. Change this to impose more strict checking so that the table load will fail if more than one error handling mode is requested. Signed-off-by: JeongHyeon Lee Signed-off-by: Mike Snitzer commit 8615cb65bd638ba5f9ebe71115cc5956eb1713d0 Author: Mikulas Patocka Date: Mon Mar 1 04:58:43 2021 -0500 dm: remove useless loop in __split_and_process_bio Remove useless "while" loop. If the condition ci.sector_count && !error is true, we go to a branch that ends with "break". If this condition is false, the "while" loop will not be executed again. So, the loop can't be executed more than once. Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer commit c40819f267f76e69418d3bc9fbb57962a6845673 Author: Julia Lawall Date: Wed Feb 10 21:06:15 2021 +0100 dm writecache: fix flexible_array.cocci warnings Zero-length and one-element arrays are deprecated, see Documentation/process/deprecated.rst Flexible-array members should be used instead. Generated by: scripts/coccinelle/misc/flexible_array.cocci CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Signed-off-by: Mike Snitzer commit ad89b66cbad18ca146cbc75f64706d4ca6635973 Author: Christoph Hellwig Date: Fri Mar 26 10:55:40 2021 -0700 iomap: improve the warnings from iomap_swapfile_activate Print the path name of the swapfile that failed to active to ease debugging the problem and to avoid a scare if xfstests hits these cases. Also reword one warning a bit, as the error is not about a file being on multiple devices, but one that has at least an extent outside the main device known to the VFS and swap code. Signed-off-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit e27453adcadd7be50b796c72e0078e5d7057303f Author: Geert Uytterhoeven Date: Fri Mar 26 13:08:33 2021 +0100 clk: Drop double "if" in clk_core_determine_round_nolock() comment The comments for clk_core_determine_round_nolock() contain a double "if": one at the end of a line, followed by another one at the beginning of the next line. Drop the former. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210326120833.1578153-1-geert+renesas@glider.be Signed-off-by: Stephen Boyd commit ea2c679edc4120354ff15818f78ad64921534c03 Author: Colin Ian King Date: Mon Mar 15 12:33:03 2021 +0000 selftests/timers: Fix spelling mistake "clocksourc" -> "clocksource" There is a spelling mistake in a comment. Fix it. Signed-off-by: Colin Ian King Acked-by: John Stultz Signed-off-by: Shuah Khan commit cb4969e6f9f5ee12521aec764fa3d4bbd91bc797 Author: Ilya Leoshkevich Date: Wed Mar 3 01:44:20 2021 +0100 selftests: fix prepending $(OUTPUT) to $(TEST_PROGS) Currently the following command produces an error message: linux# make kselftest TARGETS=bpf O=/mnt/linux-build # selftests: bpf: test_libbpf.sh # ./test_libbpf.sh: line 23: ./test_libbpf_open: No such file or directory # test_libbpf: failed at file test_l4lb.o # selftests: test_libbpf [FAILED] The error message might not affect the return code of make, therefore one needs to grep make output in order to detect it. This is not the only instance of the same underlying problem; any test with more than one element in $(TEST_PROGS) fails the same way. Another example: linux# make O=/mnt/linux-build TARGETS=splice kselftest [...] # ./short_splice_read.sh: 15: ./splice_read: not found # FAIL: /sys/module/test_module/sections/.init.text 2 not ok 2 selftests: splice: short_splice_read.sh # exit=1 The current logic prepends $(OUTPUT) only to the first member of $(TEST_PROGS). After that, run_one() does cd `dirname $TEST` For all tests except the first one, `dirname $TEST` is ., which means they cannot access the files generated in $(OUTPUT). Fix by using $(addprefix) to prepend $(OUTPUT)/ to each member of $(TEST_PROGS). Fixes: 1a940687e424 ("selftests: lib.mk: copy test scripts and test files for make O=dir run") Signed-off-by: Ilya Leoshkevich Signed-off-by: Shuah Khan commit 823d13e12b6cbaef2f6e5d63c648643e7bc094dd Author: Chao Yu Date: Fri Mar 26 09:46:22 2021 +0800 f2fs: fix to cover __allocate_new_section() with curseg_lock In order to avoid race with f2fs_do_replace_block(). Fixes: f5a53edcf01e ("f2fs: support aligned pinned file") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 753a8ed0ae9c196a7d09a17aae1e354cabd1233d Author: Wang Xiaojun Date: Thu Mar 25 10:19:20 2021 -0400 f2fs: fix wrong alloc_type in f2fs_do_replace_block If the alloc_type of the original curseg is LFS, when we change_curseg and then do recover curseg, the alloc_type becomes SSR. Signed-off-by: Wang Xiaojun Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit e8bf1f522aee3b3e1e7658e8f224dca1d88c3338 Author: Chao Yu Date: Fri Mar 26 22:41:43 2021 +0800 f2fs: delete empty compress.h Commit 75e91c888989 ("f2fs: compress: fix compression chksum") wrongly introduced empty compress.h, delete it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2c718feead3533647a061501122457a16a355736 Author: Ruiqi Gong Date: Thu Mar 25 02:38:11 2021 -0400 f2fs: fix a typo in inode.c Do a trivial typo fix. s/runing/running Reported-by: Hulk Robot Signed-off-by: Ruiqi Gong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit d6d2b491a82e1e411a6766fbfb87c697d8701554 Author: Sahitya Tummala Date: Tue Mar 16 14:59:18 2021 +0530 f2fs: allow to change discard policy based on cached discard cmds With the default DPOLICY_BG discard thread is ioaware, which prevents the discard thread from issuing the discard commands. On low RAM setups, it is observed that these discard commands in the cache are consuming high memory. This patch aims to relax the memory pressure on the system due to f2fs pending discard cmds by changing the policy to DPOLICY_FORCE based on the nm_i->ram_thresh configured. Signed-off-by: Sahitya Tummala Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 61461fc921b756ae16e64243f72af2bfc2e620db Author: Chao Yu Date: Wed Mar 24 11:18:28 2021 +0800 f2fs: fix to avoid touching checkpointed data in get_victim() In CP disabling mode, there are two issues when using LFS or SSR | AT_SSR mode to select victim: 1. LFS is set to find source section during GC, the victim should have no checkpointed data, since after GC, section could not be set free for reuse. Previously, we only check valid chpt blocks in current segment rather than section, fix it. 2. SSR | AT_SSR are set to find target segment for writes which can be fully filled by checkpointed and newly written blocks, we should never select such segment, otherwise it can cause panic or data corruption during allocation, potential case is described as below: a) target segment has 'n' (n < 512) ckpt valid blocks b) GC migrates 'n' valid blocks to other segment (segment is still in dirty list) c) GC migrates '512 - n' blocks to target segment (segment has 'n' cp_vblocks and '512 - n' vblocks) d) If GC selects target segment via {AT,}SSR allocator, however there is no free space in targe segment. Fixes: 4354994f097d ("f2fs: checkpoint disabling") Fixes: 093749e296e2 ("f2fs: support age threshold based garbage collection") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 41dbf4a146a06443d1cbf39e238f02fa1ca9d626 Author: Lee Jones Date: Wed Mar 3 12:41:49 2021 +0000 ARM: at91: pm: Move prototypes to mutually included header Both the caller and the supplier's source file should have access to the include file containing the prototypes. Fixes the following W=1 kernel build warning(s): drivers/pinctrl/pinctrl-at91.c:1637:6: warning: no previous prototype for ‘at91_pinctrl_gpio_suspend’ [-Wmissing-prototypes] 1637 | void at91_pinctrl_gpio_suspend(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/pinctrl/pinctrl-at91.c:1661:6: warning: no previous prototype for ‘at91_pinctrl_gpio_resume’ [-Wmissing-prototypes] 1661 | void at91_pinctrl_gpio_resume(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ Cc: Russell King Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Signed-off-by: Lee Jones Acked-by: Linus Walleij Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210303124149.3149511-1-lee.jones@linaro.org commit adb76a520d068a54ee5ca82e756cf8e5a47363a4 Author: Lv Yunlong Date: Mon Mar 22 09:13:25 2021 -0700 IB/isert: Fix a use after free in isert_connect_request The device is got by isert_device_get() with refcount is 1, and is assigned to isert_conn by isert_conn->device = device. When isert_create_qp() failed, device will be freed with isert_device_put(). Later, the device is used in isert_free_login_buf(isert_conn) by the isert_conn->device->ib_device statement. Free the device in the correct order. Fixes: ae9ea9ed38c9 ("iser-target: Split some logic in isert_connect_request to routines") Link: https://lore.kernel.org/r/20210322161325.7491-1-lyl2019@mail.ustc.edu.cn Signed-off-by: Lv Yunlong Acked-by: Sagi Grimberg Reviewed-by: Leon Romanovsky Reviewed-by: Max Gurtovoy Signed-off-by: Jason Gunthorpe commit aa43665aeeb3db66ad732d168b5d6450eb4c60db Author: Bhaskar Chowdhury Date: Mon Mar 22 12:13:22 2021 +0530 RDMA: Fix a typo s/struture/structure/ Link: https://lore.kernel.org/r/20210322064322.3933985-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Jason Gunthorpe commit 58442f0db3f89b7e77113295c72ac0672f74f92a Author: Christian König Date: Thu Mar 25 16:06:57 2021 +0100 drm/ttm: fix invalid NULL deref The BO might be NULL in this function, use the bdev directly. Signed-off-by: Christian König Reported-by: Colin Ian King Reviewed-by: Colin Ian King Fixes: a1f091f8ef2b ("drm/ttm: switch to per device LRU lock") Link: https://patchwork.freedesktop.org/patch/msgid/20210325152740.82633-1-christian.koenig@amd.com commit 36e7985160782bc683001afe09e33a288435def0 Author: Andrii Nakryiko Date: Thu Mar 25 21:30:36 2021 -0700 libbpf: Preserve empty DATASEC BTFs during static linking Ensure that BPF static linker preserves all DATASEC BTF types, even if some of them might not have any variable information at all. This may happen if the compiler promotes local initialized variable contents into .rodata section and there are no global or static functions in the program. For example, $ cat t.c struct t { char a; char b; char c; }; void bar(struct t*); void find() { struct t tmp = {1, 2, 3}; bar(&tmp); } $ clang -target bpf -O2 -g -S t.c .long 104 # BTF_KIND_DATASEC(id = 8) .long 251658240 # 0xf000000 .long 0 .ascii ".rodata" # string offset=104 $ clang -target bpf -O2 -g -c t.c $ readelf -S t.o | grep data [ 4] .rodata PROGBITS 0000000000000000 00000090 Fixes: 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support") Reported-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210326043036.3081011-1-andrii@kernel.org commit fcb8d0d7587e0f2b7439d6c14a380fd17a450f96 Author: Wan Jiabing Date: Thu Mar 25 15:06:02 2021 +0800 bpf: struct sock is declared twice in bpf_sk_storage header struct sock has been declared twice, therefore remove the duplicate. Signed-off-by: Wan Jiabing Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210325070602.858024-1-wanjiabing@vivo.com commit 6613bc2301ba291a1c5a90e1dc24cf3edf223c03 Author: Shradha Todi Date: Wed Mar 24 15:46:09 2021 +0530 PCI: endpoint: Fix NULL pointer dereference for ->get_features() get_features ops of pci_epc_ops may return NULL, causing NULL pointer dereference in pci_epf_test_alloc_space function. Let us add a check for pci_epc_feature pointer in pci_epf_test_bind before we access it to avoid any such NULL pointer dereference and return -ENOTSUPP in case pci_epc_feature is not found. When the patch is not applied and EPC features is not implemented in the platform driver, we see the following dump due to kernel NULL pointer dereference. Call trace: pci_epf_test_bind+0xf4/0x388 pci_epf_bind+0x3c/0x80 pci_epc_epf_link+0xa8/0xcc configfs_symlink+0x1a4/0x48c vfs_symlink+0x104/0x184 do_symlinkat+0x80/0xd4 __arm64_sys_symlinkat+0x1c/0x24 el0_svc_common.constprop.3+0xb8/0x170 el0_svc_handler+0x70/0x88 el0_svc+0x8/0x640 Code: d2800581 b9403ab9 f9404ebb 8b394f60 (f9400400) ---[ end trace a438e3c5a24f9df0 ]--- Link: https://lore.kernel.org/r/20210324101609.79278-1-shradha.t@samsung.com Fixes: 2c04c5b8eef79 ("PCI: pci-epf-test: Use pci_epc_get_features() to get EPC features") Signed-off-by: Sriram Dash Signed-off-by: Shradha Todi Signed-off-by: Lorenzo Pieralisi Reviewed-by: Pankaj Dubey Reviewed-by: Kishon Vijay Abraham I commit 4ae6573e699e32164a7a4ceb165ec771000db544 Author: Bhaskar Chowdhury Date: Mon Mar 22 11:59:23 2021 +0530 IB/hfi1: Fix a typo s/struture/structure/ And add the missing colon for kdoc Link: https://lore.kernel.org/r/20210322062923.3306167-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Signed-off-by: Jason Gunthorpe commit 016b26af13ca7b8df993897e989e5848aae9726e Author: Yangyang Li Date: Fri Mar 19 17:55:49 2021 +0800 RDMA/core: Correct misspellings of two words in comments Correct the following spelling errors: 1. shold -> should 2. uncontext -> ucontext Link: https://lore.kernel.org/r/1616147749-49106-1-git-send-email-liweihang@huawei.com Signed-off-by: Yangyang Li Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e5dc370bd9d6ea1c692c83f2b64a4204c0fa48fb Author: Shay Drory Date: Thu Mar 18 15:52:59 2021 +0200 RDMA/mlx5: Set ODP caps only if device profile support ODP Currently, ODP caps are set during the init stage of mlx5_ib_dev, regardless of whether the device profile supports ODP or not. There is no point in setting ODP caps if the device profile doesn't support ODP. Hence, move setting the ODP caps to the odp_init stage. Link: https://lore.kernel.org/r/20210318135259.681264-1-leon@kernel.org Reviewed-by: Maor Gottlieb Signed-off-by: Shay Drory Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2cbcb78c9ee5520c8d836c7ff57d1b60ebe8e9b7 Merge: 06debd6e1b280 8c44390d8872e Author: Daniel Vetter Date: Fri Mar 26 15:52:01 2021 +0100 Merge tag 'amd-drm-next-5.13-2021-03-23' of https://gitlab.freedesktop.org/agd5f/linux into drm-next amd-drm-next-5.13-2021-03-23: amdgpu: - Debugfs cleanup - Various cleanups and spelling fixes - Flexible array cleanups - Initial AMD Freesync HDMI - Display fixes - 10bpc dithering improvements - Display ASSR support - Clean up and unify powerplay and swsmu interfaces - Vangogh fixes - Add SMU gfx busy queues for RV/PCO - PCIE DPM fixes - S0ix fixes - GPU metrics data fixes - DCN secure display support - Backlight type override - Add initial support for Aldebaran - RAS fixes - Prime fixes for A+A systems - Reset fixes - Initial resource cursor support - Drop legacy IO BAR requirements - Various power fixes amdkfd: - MMU notifier fixes - APU fixes radeon: - Debugfs cleanups - Flexible array cleanups UAPI: - amdgpu: Add a new INFO ioctl interface to query video capabilities rather than hardcoding them in userspace. This allows us to provide fine grained asic capabilities (e.g., if a particular part is bandwidth limited, we can limit the capabilities). Proposed userspace: https://gitlab.freedesktop.org/leoliu/drm/-/commits/info_video_caps https://gitlab.freedesktop.org/leoliu/mesa/-/commits/info_video_caps - amdkfd: bump the driver version. There was a problem with reporting some RAS features on older versions of the driver. Proposed userspace: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/commit/7cdd63475c36bb9f49bb960f90f9a8cdb7e80a21 Danvet: A bunch of conflicts all over, but it seems to compile ... I did put the call to dc_allow_idle_optimizations() on a single line since it looked a bit too jarring to be left alone. Signed-off-by: Daniel Vetter From: Alex Deucher Link: https://patchwork.freedesktop.org/patch/msgid/20210324040147.1990338-1-alexander.deucher@amd.com commit c73700806d4e430d182c2be069d230076818a99a Author: Maor Gottlieb Date: Thu Mar 18 15:51:23 2021 +0200 RDMA/mlx5: Fix drop packet rule in egress table Initial drop action support missed that drop action can be added to egress flow tables as well. Add the missing support. This requires making sure that dest_type isn't set to PORT which in turn exposes a possibility of passing dst while indicating number of dsts as zero. Explicitly check for number of dsts and pass the appropriate pointer. Fixes: f29de9eee782 ("RDMA/mlx5: Add support for drop action in DV steering") Link: https://lore.kernel.org/r/20210318135123.680759-1-leon@kernel.org Reviewed-by: Mark Bloch Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 49695e95ceea08913e7355c9914a25ddffc504ba Author: Patrisious Haddad Date: Thu Mar 18 13:05:02 2021 +0200 RDMA/uverbs: Refactor rdma_counter_set_auto_mode and __counter_set_mode Success is returned in the following flows: * New mode is the same as the current one. * Switched to new mode and there are no bound counters yet. Link: https://lore.kernel.org/r/20210318110502.673676-1-leon@kernel.org Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ecdc996baf291b903342cc704f4086a88c361967 Author: Matti Vaittinen Date: Wed Mar 24 11:21:34 2021 +0200 power: supply: axp20x_usb_power: fix work-queue init The commit 6d0c5de2fd84 ("power: supply: Clean-up few drivers by using managed work init") Re-introduced wrong order of initializing work-queue and requesting the IRQs which was originally fixed by the commit b5e8642ed95f ("power: supply: axp20x_usb_power: Init work before enabling IRQs") In addition this caused the work queue to be initialized twice. Fix it again. Fixes: 6d0c5de2fd84 ("power: supply: Clean-up few drivers by using managed work init") Signed-off-by: Matti Vaittinen Reported-by: Chen-Yu Tsai Acked-by: Sebastian Reichel Link: https://lore.kernel.org/r/a774ca25010b7c932c07f22ce8a548466705c023.1616574973.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit 30e2ae943c260036ea494b601343f6ed5ce7bc60 Author: Adrien Grassein Date: Fri Mar 26 13:19:55 2021 +0100 drm/bridge: Introduce LT8912B DSI to HDMI bridge Lontium LT8912B is a DSI to HDMI bridge. Reported-by: kernel test robot Signed-off-by: Adrien Grassein Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210326121955.1266230-3-adrien.grassein@gmail.com commit 3aa6031deefa9a2c056af2182af02d3dc5df1067 Author: Adrien Grassein Date: Fri Mar 26 13:19:54 2021 +0100 dt-bindings: display: bridge: Add documentation for LT8912B Lontium LT8912B is a DSI to HDMI bridge. Signed-off-by: Adrien Grassein Reviewed-by: Rob Herring Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210326121955.1266230-2-adrien.grassein@gmail.com commit 41a469482de257ea8db43cf74b6311bd055de030 Author: Al Cooper Date: Thu Mar 25 14:52:56 2021 -0400 serial: 8250: Add new 8250-core based Broadcom STB driver Add a UART driver for the new Broadcom 8250 based STB UART. The new UART is backward compatible with the standard 8250, but has some additional features. The new features include a high accuracy baud rate clock system and DMA support. The driver will use the new optional BAUD MUX clock to select the best one of the four master clocks (81MHz, 108MHz, 64MHz and 48MHz) to feed the baud rate selection logic for any requested baud rate. This allows for more accurate BAUD rates when high speed baud rates are selected. The driver will use the new UART DMA hardware if the UART DMA registers are specified in Device Tree "reg" property. The driver also sets the UPSTAT_AUTOCTS flag when hardware flow control is enabled. This flag is needed for UARTs that don't assert a CTS changed interrupt when CTS changes and AFE (Hardware Flow Control) is enabled. The driver also contains a workaround for a bug in the Synopsis 8250 core. The problem is that at high baud rates, the RX partial FIFO timeout interrupt can occur but there is no RX data (DR not set in the LSR register). In this case the driver will not read the Receive Buffer Register, which clears the interrupt, and the system will get continuous UART interrupts until the next RX character arrives. The fix originally suggested by Synopsis was to read the Receive Buffer Register and discard the character when the DR bit in the LSR was not set, to clear the interrupt. The problem was that occasionally a character would arrive just after the DR bit check and a valid character would be discarded. The fix that was added will clear receive interrupts to stop the interrupt, deassert RTS to insure that no new data can arrive, wait for 1.5 character times for the sender to react to RTS and then check for data and either do a dummy read or a valid read. Debugfs error counters were also added and were used to help create test software that would cause the error condition. The counters can be found at: /sys/kernel/debug/bcm7271-uart//stats This also includes a few fixes for build warnings reported by the kernel test robot. Reported-by: kernel test robot Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20210325185256.16156-3-alcooperx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 88a499cd70d4f205092b2ac6bc66354c1b30464c Author: Al Cooper Date: Thu Mar 25 14:52:55 2021 -0400 dt-bindings: Add support for the Broadcom UART driver Add DT bindings for the Broadcom 8250 based UART driver. This UART is based on an 8250 but adds additional functionality. The additional features include the ability to use DMA for transfers and a baud rate clock system that is more accurate at high baud rates. This UART is backward compatible with the standard 8250 UART. Reviewed-by: Rob Herring Signed-off-by: Al Cooper Link: https://lore.kernel.org/r/20210325185256.16156-2-alcooperx@gmail.com Signed-off-by: Greg Kroah-Hartman commit a5bf1a101a19dbb38be7ffebe2650449e344c892 Author: Julian Braha Date: Fri Mar 26 01:45:33 2021 -0400 drivers: staging: netlogic: fix unmet dependency for PHYLIB When NETLOGIC_XLR_NET is enabled, and NETDEVICES is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for PHYLIB Depends on [n]: NETDEVICES [=n] Selected by [y]: - NETLOGIC_XLR_NET [=y] && STAGING [=y] && CPU_XLR [=y] This is because NETLOGIC_XLR_NET selects PHYLIB without selecting or depending on NETDEVICES, despite PHYLIB depending on NETDEVICES. Signed-off-by: Julian Braha Link: https://lore.kernel.org/r/20210326054533.48751-1-julianbraha@gmail.com Signed-off-by: Greg Kroah-Hartman commit 61d6809f9c8d9d9f2279d739e684e4969f65154a Author: Fabio Aiuto Date: Wed Mar 24 16:50:36 2021 +0100 staging: rtl8723bs: remove assignment in condition in os_dep/ioctl_linux.c fix the following checkpatch warning: ERROR: do not use assignment in if condition 2607: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2607: + if (0 != (ret = rtw_change_ifname(padapter, new_ifname))) -- ERROR: do not use assignment in if condition 4239: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:4239: + if (!(ext = vmalloc(len))) -- ERROR: do not use assignment in if condition 4253: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:4253: + if (!(ext_dbg = vmalloc(len))) { Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/98b58790ae7c791d091b301bccf67a70c41ec599.1616600897.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c8ad167ebe65440e2c7f1b3a1e8905c54693c514 Author: Fabio Aiuto Date: Wed Mar 24 16:50:35 2021 +0100 staging: rtl8723bs: remove assignment in condition in os_dep/ioctl_cfg80211.c fix the following checkpatch warning: ERROR: do not use assignment in if condition 1440: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1440: + if ((wps_ie = rtw_get_wps_ie(buf, len, NULL, &wps_ielen))) -- ERROR: do not use assignment in if condition 2465: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2465: + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) -- ERROR: do not use assignment in if condition 2937: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2937: + if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL) { -- ERROR: do not use assignment in if condition 3335: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:3335: + if (!(ndev = wdev_to_ndev(wdev))) Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/cc687c2ff614da3e110addd1c5cd610e3356cbd7.1616600897.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d9af224564013853ef5c530684ce53cd90a9e091 Author: Fabio Aiuto Date: Wed Mar 24 16:50:34 2021 +0100 staging: rtl8723bs: remove assignment in condition in core/rtw_ieee80211.c fix the following checkpatch warning: ERROR: do not use assignment in if condition 1118: FILE: drivers/staging/rtl8723bs/core/rtw_ieee80211.c:1118: + if ((addr = of_get_property(np, "local-mac-address", &len)) && Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8e784a7e1407924724c97398af8e5aeb23460612.1616600897.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4cf346e506ce051a39dc26aca9be6c7f7e0241bb Author: Marco Cesati Date: Wed Mar 24 13:44:56 2021 +0100 Staging: rtl8723bs: remove named enums in HalBtc8723b2Ant.h Remove the following unnecessary enum names in hal/HalBtc8723b2Ant.h: enum bt_info_src_8723b_2ant enum bt_8723b_2ant_bt_status enum bt_8723b_2ant_coex_algo Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-34-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7f5771470dc86b3b34a6508a9487e0f3767abb67 Author: Marco Cesati Date: Wed Mar 24 13:44:55 2021 +0100 Staging: rtl8723bs: remove named enums in odm.h Remove the following unnecessary enum names or definitions in hal/odm.h: enum ODM_Ability_E [definition] enum odm_ability_e [name] enum odm_interface_e [name] enum odm_ic_type_e [name] enum odm_cut_version_e [name] enum odm_fab_e [name] enum odm_rf_path_e [definition] enum odm_rf_type_e [name] enum odm_mac_phy_mode_e [definition] enum odm_bt_coexist_e [definition] enum odm_operation_mode_e [definition] enum odm_wireless_mode_e [name] enum odm_band_type_e [name] enum odm_sec_chnl_offset_e [definition] enum odm_security_e [definition] enum odm_bw_e [name] enum odm_board_type_e [definition] enum ODM_Package_TYPE_E [definition] enum odm_cca_path_e [definition] enum fat_state_e [definition] enum ant_div_type_e [name] enum rt_status [definition] enum dm_1r_cca_e [name] enum dm_rf_e [name] enum dm_swas_e [definition] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-33-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0f5f939ace2299f0cfb9292d88bb21a3b4234ddf Author: Marco Cesati Date: Wed Mar 24 13:44:54 2021 +0100 Staging: rtl8723bs: remove named enums in HalPhyRf.h Remove the following unnecessary enum definition in hal/HalPhyRf.h: enum spur_cal_method Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-32-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9d8b1d20e89dc17daf534b6f193e1e5af069a727 Author: Marco Cesati Date: Wed Mar 24 13:44:53 2021 +0100 Staging: rtl8723bs: remove named enums in odm_DIG.h Remove the following unnecessary enum definitions in hal/odm_DIG.h: enum dm_dig_op_e enum ODM_Pause_CCKPD_TYPE Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-31-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 773d5be7907f51c219b677423e46eb69737556c9 Author: Marco Cesati Date: Wed Mar 24 13:44:52 2021 +0100 Staging: rtl8723bs: remove named enums in odm_types.h Remove the following unnecessary enum definition in hal/odm_types.h: enum rt_spinlock_type Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-30-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit e6b8ccce5a0d935145e986989bc05ceead0593b7 Author: Marco Cesati Date: Wed Mar 24 13:44:51 2021 +0100 Staging: rtl8723bs: remove named enums in HalBtc8723b1Ant.h Remove the following unnecessary enum names in hal/HalBtc8723b1Ant.h: enum bt_info_src_8723b_1ant enum bt_8723b_1ant_bt_status enum bt_8723b_1ant_wifi_status enum bt_8723b_1ant_coex_algo Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-29-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit cd9b6a6f9545ca15be4aef399f35c2fc392d8a10 Author: Marco Cesati Date: Wed Mar 24 13:44:50 2021 +0100 Staging: rtl8723bs: remove named enums in HalBtcOutSrc.h Remove the following unnecessary enum names or definitions in hal/HalBtcOutSrc.h: enum btc_powersave_type [name] enum btc_bt_reg_type [name] enum btc_chip_type [name] enum btc_msg_type [name] enum btc_dbg_opcode [definition] enum btc_rssi_state [name] enum btc_wifi_role [definition] enum btc_wifi_bw_mode [name] enum btc_wifi_traffic_dir [name] enum btc_wifi_pnp [name] enum bt_wifi_coex_state [definition] enum btc_get_type [name] enum btc_set_type [name] enum btc_dbg_disp_type [name] enum btc_notify_type_ips [name] enum btc_notify_type_lps [name] enum btc_notify_type_scan [name] enum btc_notify_type_associate [name] enum btc_notify_type_media_status [name] enum btc_notify_type_special_packet [name] enum btc_notify_type_stack_operation [definition] enum btc_antenna_pos [name] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-28-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 50e9413e56442d69c64a3dfb40cb0506e9670ec7 Author: Marco Cesati Date: Wed Mar 24 13:44:49 2021 +0100 Staging: rtl8723bs: remove named enums in odm_interface.h Remove the following unnecessary enum definition in hal/odm_interface.h: enum odm_h2c_cmd Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-27-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit eba66f41fb2a2630f0ac9d1c9d9a13f0d48afe4a Author: Marco Cesati Date: Wed Mar 24 13:44:48 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_efuse.h Remove the following unnecessary enum name in include/rtw_efuse.h: enum _efuse_def_type Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-26-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit efab7dda7e2b55fba4f6dc1bf80d11d1f03dc81c Author: Marco Cesati Date: Wed Mar 24 13:44:47 2021 +0100 Staging: rtl8723bs: remove named enums in ieee80211.h Remove the following unnecessary enum names or definitions in include/ieee80211.h: enum rateid_idx [name] enum ratr_table_mode [definition] enum eap_type [definition] enum mgn_rate [name] enum ieee80211_state [definition] enum rtw_ieee80211_category [name] enum _public_action [name] enum rtw_ieee80211_back_parties [definition] enum rtw_ieee80211_vht_actioncode [definition] enum secondary_ch_offset [definition] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-25-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5f1c94a050e9fc15e6bbad1d4ff98e6dcc6ca9fc Author: Marco Cesati Date: Wed Mar 24 13:44:46 2021 +0100 Staging: rtl8723bs: remove named enums in hal_com_phycfg.h Remove the following unnecessary enum names in include/hal_com_phycfg.h: enum rf_tx_num enum _regulation_txpwr_lmt Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-24-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 977f51c28cec84e63a552cd199e287a6a28228d5 Author: Marco Cesati Date: Wed Mar 24 13:44:45 2021 +0100 Staging: rtl8723bs: remove named enums in HalPwrSeqCmd.h Remove the following unnecessary enum name in include/HalPwrSeqCmd.h: enum pwrseq_cmd_delay_unit Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-23-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5e8aa5d018603558e2d33b7c8806690df23cf781 Author: Marco Cesati Date: Wed Mar 24 13:44:44 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_rf.h Remove the following unnecessary enum names or definitions in include/rtw_rf.h: enum capability [name] enum _reg_preamble_mode [name] enum _rtl8712_rf_mimo_config_ [definition] enum rf90_radio_path [definition] enum vht_data_sc [name] enum protection_mode [definition] enum rt_rf_type_definition [name] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-22-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5429b11fa08597a3a771a70b652300d5a744aad1 Author: Marco Cesati Date: Wed Mar 24 13:44:43 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_xmit.h Remove the following unnecessary enum definition in include/rtw_xmit.h: enum txdesc_sc Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-21-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 65724245ce25543d77e9c9de7c296b4ab906f9e0 Author: Marco Cesati Date: Wed Mar 24 13:44:42 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_mlme_ext.h Remove the following unnecessary enum names or definitions in include/rtw_mlme_ext.h: enum rt_channel_domain [name] enum rt_channel_domain_2g [name] enum rt_channel_domain_5g [name] enum Associated_AP [definition] enum ht_iot_peer_e [name] enum scan_state [name] enum rtw_c2h_event [name] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-20-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit ecebe41e51f2775e3d51368929afa5b81fae6616 Author: Marco Cesati Date: Wed Mar 24 13:44:41 2021 +0100 Staging: rtl8723bs: remove named enums in hal_phy.h Remove the following unnecessary enum names or definitions in include/hal_phy.h: enum rf_type [name] enum antenna_path [definition] enum rf_content [definition] enum BaseBand_Config_Type [definition] enum hw_block [definition] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-19-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9c2c652f06c405165590da1c104c9858557859a1 Author: Marco Cesati Date: Wed Mar 24 13:44:40 2021 +0100 Staging: rtl8723bs: remove named enums in rtl8723b_hal.h Remove the following unnecessary enum names in include/rtl8723b_hal.h: enum c2h_evt enum package_type_e Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-18-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9666bfa5684cf078c6489fba5743c373ad87e8a9 Author: Marco Cesati Date: Wed Mar 24 13:44:39 2021 +0100 Staging: rtl8723bs: remove named enums in wifi.h Remove the following unnecessary enum names or definitions in include/wifi.h: enum wifi_frame_type [name] enum wifi_frame_subtype [name] enum wifi_reg_domain [definition] enum p2p_proto_wk_id [definition] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-17-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 38936ed5d1991c9e07522f6537d885da97d983d1 Author: Marco Cesati Date: Wed Mar 24 13:44:38 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_wifi_regd.h Remove the following unnecessary enum definition in include/rtw_wifi_regd.h: enum country_code_type_t Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-16-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit c0c79e9f6db23e5cc95d9fb7e7d18fa901dc904f Author: Marco Cesati Date: Wed Mar 24 13:44:37 2021 +0100 Staging: rtl8723bs: remove named enums in hal_com_h2c.h Remove the following unnecessary enum definition in include/hal_com_h2c.h: enum h2c_cmd Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-15-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit dd210c1dd38cffd7952797ee6b8a5986a111e93d Author: Marco Cesati Date: Wed Mar 24 13:44:36 2021 +0100 Staging: rtl8723bs: remove named enums in rtl8723b_cmd.h Remove the following unnecessary enum name in include/rtl8723b_cmd.h: enum h2c_cmd_8723B Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-14-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2148216174a2f56e85d28bf5b14a6c9a83cafad4 Author: Marco Cesati Date: Wed Mar 24 13:44:35 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_pwrctrl.h Remove the following unnecessary enum names in include/rtw_pwrctrl.h: enum Power_Mgnt enum _PS_BBRegBackup_ Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-13-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 67a1a97d64d2298b6c37f970a41b339d8b13bd82 Author: Marco Cesati Date: Wed Mar 24 13:44:34 2021 +0100 Staging: rtl8723bs: remove named enums in hal_intf.h Remove the following unnecessary enum names or definitions in include/hal_intf.h: enum rtl871x_hci_type [name] enum hw_variables [name] enum rt_eeprom_type [definition] enum wowlan_subcode [definition] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-12-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0cf217a447561ba1fe578ae369f9e2decb0f1b8d Author: Marco Cesati Date: Wed Mar 24 13:44:33 2021 +0100 Staging: rtl8723bs: remove named enums in osdep_service.h Remove the following unnecessary enum definitions in include/osdep_service.h: enum mstat_f enum mstat_status Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-11-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 348516fa39bbfbd1b08a707fa7ce8c597511a44c Author: Marco Cesati Date: Wed Mar 24 13:44:32 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_mp.h Remove the following unnecessary enum definitions in include/rtw_mp.h: enum mp_mode enum mpt_rate_index enum power_mode enum ofdm_tx_mode enum encry_ctrl_state enum mpt_txpwr_def Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-10-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7e9f6dcc03956259b9ff357761b1e6e836ddfb19 Author: Marco Cesati Date: Wed Mar 24 13:44:31 2021 +0100 Staging: rtl8723bs: remove named enums in wlan_bssdef.h Remove the following unnecessary enum names or definitions in include/wlan_bssdef.h: enum ndis_802_11_wep_status [name] enum ndis_802_11_reload_defaults [definition] enum vrtl_carrier_sense [name] enum vcs_type [name] enum uapsd_max_sp [name] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-9-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 56b89735f3792c6520bfacadd6c57efe963f59e8 Author: Marco Cesati Date: Wed Mar 24 13:44:30 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_ht.h Remove the following unnecessary enum names in include/rtw_ht.h: enum aggre_size_e enum rt_ht_inf0_capbility enum rt_ht_inf1_capbility Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-8-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 145d91b778d454b7aa4579a47c11cd2b83e9085c Author: Marco Cesati Date: Wed Mar 24 13:44:29 2021 +0100 Staging: rtl8723bs: remove named enums in drv_types.h Remove the following unnecessary enum names or definitions in include/drv_types.h: enum _nic_version [definition] enum _iface_type [name] enum adapter_type [definition] enum driver_state [name] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-7-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 555665d98e97050955d709a7cf72ae59368e564f Author: Marco Cesati Date: Wed Mar 24 13:44:28 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_recv.h Remove the following unnecessary enum name in include/rtw_recv.h: enum rx_packet_type Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-6-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc3e6754b17c3e592e2a1e22972bc847f70fe074 Author: Marco Cesati Date: Wed Mar 24 13:44:27 2021 +0100 Staging: rtl8723bs: remove named enums in hal_com.h Remove the following unnecessary enum definition in include/hal_com.h: enum firmware_source Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-5-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 463cc86e1c7b385a3a866b0882aeae0e2e8ac3a5 Author: Marco Cesati Date: Wed Mar 24 13:44:26 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_eeprom.h Remove the following unnecessary enum name include/rtw_eeprom.h: enum rt_customer_id Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-4-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit d5e7c6b387bd3631f2d3762833ed4e9a44f6e7ac Author: Marco Cesati Date: Wed Mar 24 13:44:25 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_cmd.h Remove the following unnecessary enum names in include/rtw_cmd.h: enum rtw_drvextra_cmd_id enum lps_ctrl_type enum rfintfs enum rtw_h2c_cmd Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-3-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit cc8c7cca30209a88fff06f8e044304524550ef3c Author: Marco Cesati Date: Wed Mar 24 13:44:24 2021 +0100 Staging: rtl8723bs: remove named enums in rtw_mlme.h Remove the following unnecessary enum names or definitions in include/rtw_mlme.h: enum dot11AuthAlgrthmNum [name] enum _band [name] enum DriverInterface [definition] enum scan_result_type [definition] Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210324124456.25221-2-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5005ac4d2f21acf58e0b532ee73d0a7d0da2818a Author: Bruno Raoult Date: Fri Mar 26 10:48:35 2021 +0100 r8192U_wx.c: style: avoid multiple blank lines fix checkpatch.pl check: CHECK: Please don't use multiple blank lines in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult Link: https://lore.kernel.org/r/2c1f2c668d299ce1895ce97dc7fb9a67d3723e63.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8d8b93ee3521bdc7cdf0761e007eea4916fceabf Author: Bruno Raoult Date: Fri Mar 26 10:48:34 2021 +0100 r8192U_wx.c: style: Unnecessary parentheses fix checkpatch.pl check: CHECK: Unnecessary parentheses around expr in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult Link: https://lore.kernel.org/r/f42993e183e1127dcc9fce3f0ed42dd6d795c647.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman commit b95dd839d7e47a34acb886fb5cb09cd250a2a4af Author: Bruno Raoult Date: Fri Mar 26 10:48:33 2021 +0100 r8192U_wx.c: style: braces all arms of statement fix checkpatch.pl check: CHECK: braces {} should be used on all arms of this statement in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult Link: https://lore.kernel.org/r/adbbb5243dca7998a31a786eef277bd85068c63a.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c98c5e93bca929db2a6b39c2fa2bcd61595e1f8 Author: Bruno Raoult Date: Fri Mar 26 10:48:32 2021 +0100 r8192U_wx.c: style: spaces preferred around operators fix checkpatch.pl check: CHECK: spaces required around that in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult Link: https://lore.kernel.org/r/e7298c14538ad7a58720585d019a70f637e0cdb1.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman commit 619ee818faf7b98bb8fbe6b13bb232e8185d4665 Author: Bruno Raoult Date: Fri Mar 26 10:48:31 2021 +0100 r8192U_wx.c: style: alignment with open parenthesis fix checkpatch.pl check: CHECK: Alignment should match open parenthesis in drivers/staging/rtl8192u/r8192U_wx.c Signed-off-by: Bruno Raoult Link: https://lore.kernel.org/r/34f4134241f49d1694cbfb9c2185e3ef54284680.1616748922.git.braoult@gmail.com Signed-off-by: Greg Kroah-Hartman commit d70fb897113d885a8b457ac2bcbb7802b46770b3 Author: Swen Kalski Date: Thu Mar 25 14:35:20 2021 +0100 Staging: comedi: remove unnecessary else statement Removal of an unnecessary else in statging/comedi/comedi_buf.c Add an early Return and removed the unleashed the else condition for better readability int staging/comedi drivers. Signed-off-by: Swen Kalski Link: https://lore.kernel.org/r/20210325133520.GA594125@m17r3en Signed-off-by: Greg Kroah-Hartman commit 6f08cc6c2fdd3e87098afb8cb86ed31ab6597eff Author: Wan Jiabing Date: Thu Mar 25 16:00:46 2021 +0800 drivers: staging: rtl8712: _adapter is declared twice struct _adapter has been declared at 23rd line. Remove the duplicate. Reviewed-by: Dan Carpenter Signed-off-by: Wan Jiabing Link: https://lore.kernel.org/r/20210325080050.861273-1-wanjiabing@vivo.com Signed-off-by: Greg Kroah-Hartman commit 0933e51a0b3ce66eb2cf21b0dda265655fa43f53 Author: Colin Ian King Date: Wed Mar 24 15:21:35 2021 +0000 staging: rtl8188eu: Fix null pointer dereference on free_netdev call An unregister_netdev call checks if pnetdev is null, hence a later call to free_netdev can potentially be passing a null pointer, causing a null pointer dereference. Avoid this by adding a null pointer check on pnetdev before calling free_netdev. Fixes: 1665c8fdffbb ("staging: rtl8188eu: use netdev routines for private data") Reviewed-by: Martin Kaiser Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210324152135.254152-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit d8827ae8e22badd339e1b6225c03a1e417765a3d Author: Coiby Xu Date: Wed Mar 24 09:00:01 2021 +0800 staging: qlge: deal with the case that devlink_health_reporter_create fails devlink_health_reporter_create may fail. In that case, do the cleanup work. Reported-by: Dan Carpenter Signed-off-by: Coiby Xu Link: https://lore.kernel.org/r/20210324010002.109846-1-coxu@redhat.com Signed-off-by: Greg Kroah-Hartman commit 2d93018fe67d42c44d65a898da2a6a5a0209b9ee Author: Randy Dunlap Date: Tue Mar 23 15:19:05 2021 -0700 gpiolib: some edits of kernel docs for clarity Fix a few typos and some punctuation. Also, change CONFIG_OF to CONFIG_OF_GPIO in one comment. Signed-off-by: Randy Dunlap Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Reviewed-by: Linus Walleij [Bartosz: tweaked the commit message] Signed-off-by: Bartosz Golaszewski commit b0922c0732c10eabab7ef15c420b0ae6cf540564 Author: Randy Dunlap Date: Thu Mar 25 10:55:36 2021 -0700 tools: gpio-utils: fix various kernel-doc warnings Fix several problems in kernel-doc notation in gpio-utils.c. gpio-utils.c:37: warning: Incorrect use of kernel-doc format: * gpiotools_request_line() - request gpio lines in a gpiochip gpio-utils.c:61: warning: expecting prototype for doc(). Prototype was for gpiotools_request_line() instead gpio-utils.c:265: warning: Excess function parameter 'value' description in 'gpiotools_sets' gpio-utils.c:1: warning: 'gpiotools_request_lines' not found Signed-off-by: Randy Dunlap Cc: Bartosz Golaszewski Cc: Linus Walleij Cc: linux-gpio@vger.kernel.org Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 4a5c9da4ec29bc2a4fff00c2c36ce38826123d68 Author: Linus Walleij Date: Fri Mar 26 09:15:35 2021 +0100 gpio: Mention GPIO MUX in docs There is now a GPIO multiplexer, so mention this in the document about drivers using GPIO as backend. Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 81dd500b1c8612a42979ee3ea788d2d9f19aa9f9 Author: Andy Shevchenko Date: Mon Mar 15 18:59:40 2021 +0200 gpio: mockup: Adjust documentation to the code First of all one of the parameter missed 'mockup' in its name, Second, the semantics of the integer pairs depends on the sign of the base (the first value in the pair). Update documentation to reflect the real code behaviour. Fixes: 2fd1abe99e5f ("Documentation: gpio: add documentation for gpio-mockup") Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit e5391a02bce2422fa57a520dfaaf2693ec7f9546 Author: Andy Shevchenko Date: Mon Mar 15 20:51:41 2021 +0200 gpio: mockup: Drop duplicate NULL check in gpio_mockup_unregister_pdevs() Since platform_device_unregister() is NULL-aware, we don't need to duplicate this check. Remove it and fold the rest of the code. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski commit 266315fb7cbed86f628f3fb4bb89a90943b66718 Author: Andy Shevchenko Date: Tue Mar 9 11:37:36 2021 +0200 gpiolib: Fold conditionals into a simple ternary operator It's quite spread code to initialize IRQ domain options. Let's fold it into a simple oneliner. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 5c63a9dbab55be3c0df512c9d8efe80a44cd2ce8 Author: Andy Shevchenko Date: Tue Mar 9 11:37:35 2021 +0200 gpiolib: Reuse device's fwnode to create IRQ domain When IRQ domain is created for an ACPI case, the name of it becomes unknown-%d since for now it utilizes of_node member only and doesn't consider fwnode case. Convert IRQ domain creation code to utilize fwnode instead. Before/After the change on Intel Galileo Gen 2 with two GPIO (IRQ) controllers: unknown-1 ==> \_SB.PCI0.GIP0.GPO unknown-2 ==> \_SB.NIO3 Due to the nature of this change we may also deduplicate the WARN():s because in either case (DT or ACPI) the fwnode will be set correctly and %pfw is an equivalent to what the current code prints as a prefix. Signed-off-by: Andy Shevchenko Reviewed-by: Rafael J. Wysocki Signed-off-by: Bartosz Golaszewski commit 515321acb56e1360bce4c9d60c498ec126a669dc Author: Andy Shevchenko Date: Tue Mar 9 11:37:34 2021 +0200 gpiolib: Introduce acpi_gpio_dev_init() and call it from core In the ACPI case we may use the firmware node in the similar way as it's done for OF case. We may use that fwnode for other purposes in the future. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 1df62542e0161e828615d7ec233e68c18902b0dc Author: Andy Shevchenko Date: Tue Mar 9 11:37:33 2021 +0200 gpiolib: Move of_node operations to gpiolib-of and correct fwnode use The initial value of the OF node based on presence of parent, but at the same time this operation somehow appeared separately from others that handle the OF case. On the other hand there is no need to assign dev->fwnode in the OF case if code properly retrieves fwnode, i.e. via dev_fwnode() helper. Amend gpiolib.c and gpiolib-of.c code in order to group OF operations. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 944f4b0af9ca0d203ebc0d1426218af372d2d995 Author: Andy Shevchenko Date: Tue Mar 9 11:37:32 2021 +0200 gpiolib: Unify the checks on fwnode type We have (historically) different approaches how we identify the type of a given fwnode. Let's standardize them across the library code. Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 67196fea0fcef92b25608882f62f3985bc59f1fe Author: Andy Shevchenko Date: Tue Mar 9 11:37:31 2021 +0200 irqdomain: Introduce irq_domain_create_simple() API Linus Walleij pointed out that ird_domain_add_simple() gained additional functionality and can't be anymore replaced with a simple conditional. In preparation to upgrade GPIO library to use fwnode, introduce irq_domain_create_simple() API which is functional equivalent to the existing irq_domain_add_simple(), but takes a pointer to the struct fwnode_handle as a parameter. While at it, amend documentation to mention irq_domain_create_*() functions where it makes sense. Signed-off-by: Andy Shevchenko Acked-by: Marc Zyngier Signed-off-by: Bartosz Golaszewski commit 3fd19d4b565dafd690a262fa95d25927bc797e42 Author: Jonathan Neuschäfer Date: Wed Mar 3 21:34:43 2021 +0100 docs: driver-api: gpio: consumer: Mark another line of code as such Make it so that this #include line is rendered in monospace, like other code blocks. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Linus Walleij Signed-off-by: Bartosz Golaszewski commit 24327c478b2fc17a01b21a4721f35f22a51fe12b Author: Chunfeng Yun Date: Tue Mar 23 15:02:54 2021 +0800 usb: mtu3: drop CONFIG_OF The driver can match only the devices created by the OF core via the DT table, so the table should be always used. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-12-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit a099d36884365748d68d77d0873e3e91f507ed12 Author: Chunfeng Yun Date: Tue Mar 23 15:02:53 2021 +0800 usb: mtu3: add support ip-sleep wakeup for MT8192 Add add support ip-sleep wakeup for MT8192, it's a specific revision, not following IPM rule. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit b1a344589eeaa52be43fba1bde20d483e01018ff Author: Chunfeng Yun Date: Tue Mar 23 15:02:52 2021 +0800 usb: mtu3: support ip-sleep wakeup for MT8183 Add support ip-sleep wakeup for MT8183, it's similar to MT8173, and it's also a specific one, but not following IPM rule. Due to the index 2 already used by many DTS, it's better to keep it unchanged for backward compatibility, treat specific ones without following IPM rule as revision 1.x, meanwhile reserve 3~10 for later revision that follows the IPM rule. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-10-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 331c505894e4da9b29ec7d7fa7c945e69823faee Author: Chunfeng Yun Date: Tue Mar 23 15:02:49 2021 +0800 usb: xhci-mtk: add support ip-sleep wakeup for mT8192 Add support ip-sleep wakeup for mT8192, it's a specific revision, and not following IPM rule. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-7-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit c03b4ccb9481c3664e83249bc673559f057667ab Author: Chunfeng Yun Date: Tue Mar 23 15:02:48 2021 +0800 usb: xhci-mtk: support ip-sleep wakeup for MT8183 Add support ip-sleep wakeup for MT8183, it's similar to MT8173, and it's also a specific one, but not following IPM rule. Due to the index 2 already used by many DTS, it's better to keep it unchanged for backward compatibility, treat specific ones without following IPM rule as revision 1.x, meanwhile reserve 3~10 for later revision that follows the IPM rule. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/1616482975-17841-6-git-send-email-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit d31b63f194d21220bfb557ed4ffbcef830185eca Author: Andy Shevchenko Date: Thu Mar 25 15:55:08 2021 +0200 usb: gadget: pch_udc: Convert Intel Quark quirk to use driver data Unify quirks, in particular one for Intel Quark, to use driver data and accompanying infrastructure. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210325135508.70350-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit dfc03e0bae868f0bf20f82fd19a43c2d6b38c4af Author: Andy Shevchenko Date: Thu Mar 25 15:55:07 2021 +0200 usb: gadget: pch_udc: Use PCI sub IDs instead of DMI We don't need DMI to identify Intel Minnowboard (v1) since it has properly set PCI sub IDs. So, drop unneeded DMI level of identification. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210325135508.70350-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit cc62ff3e6ae69f365842cd6840ed1bee90fa08d8 Author: Andy Shevchenko Date: Thu Mar 25 15:55:06 2021 +0200 usb: gadget: pch_udc: Remove CONFIG_PM_SLEEP ifdefery Use __maybe_unused for the suspend()/resume() hooks and get rid of the CONFIG_PM_SLEEP ifdefery to improve the code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210325135508.70350-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit de620c3b5999e9584cb55841fc65d305fa6b9c7b Author: Andy Shevchenko Date: Thu Mar 25 15:55:05 2021 +0200 usb: gadget: pch_udc: switch over to usb_gadget_map/unmap_request() We have generic implementations for a reason, let's use them. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210325135508.70350-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 75bb93be0027123b5db6cbcce89eb62f0f6b3c5b Author: Fabian Vogt Date: Wed Mar 24 15:11:15 2021 +0100 fotg210-udc: Complete OUT requests on short packets A short packet indicates the end of a transfer and marks the request as complete. Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver") Signed-off-by: Fabian Vogt Link: https://lore.kernel.org/r/20210324141115.9384-8-fabian@ritter-vogt.de Signed-off-by: Greg Kroah-Hartman commit 3e7c2510bdfe89a9ec223dd7acd6bfc8bb1cbeb6 Author: Fabian Vogt Date: Wed Mar 24 15:11:14 2021 +0100 fotg210-udc: Don't DMA more than the buffer can take Before this, it wrote as much as available into the buffer, even if it didn't fit. Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver") Signed-off-by: Fabian Vogt Link: https://lore.kernel.org/r/20210324141115.9384-7-fabian@ritter-vogt.de Signed-off-by: Greg Kroah-Hartman commit fe8f103ab3e0eef5b6863da6f02b928af38e7c2d Author: Fabian Vogt Date: Wed Mar 24 15:11:13 2021 +0100 fotg210-udc: Call usb_gadget_udc_reset Notify the UDC core that a bus reset occurred. Signed-off-by: Fabian Vogt Link: https://lore.kernel.org/r/20210324141115.9384-6-fabian@ritter-vogt.de Signed-off-by: Greg Kroah-Hartman commit 9aee3a23d6455200702f3a57e731fa11e8408667 Author: Fabian Vogt Date: Wed Mar 24 15:11:12 2021 +0100 fotg210-udc: Mask GRP2 interrupts we don't handle Currently it leaves unhandled interrupts unmasked, but those are never acked. In the case of a "device idle" interrupt, this leads to an effectively frozen system until plugging it in. Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver") Signed-off-by: Fabian Vogt Link: https://lore.kernel.org/r/20210324141115.9384-5-fabian@ritter-vogt.de Signed-off-by: Greg Kroah-Hartman commit c7f755b243494d6043aadcd9a2989cb157958b95 Author: Fabian Vogt Date: Wed Mar 24 15:11:11 2021 +0100 fotg210-udc: Remove a dubious condition leading to fotg210_done When the EP0 IN request was not completed but less than a packet sent, it would complete the request successfully. That doesn't make sense and can't really happen as fotg210_start_dma always sends min(length, maxpkt) bytes. Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver") Signed-off-by: Fabian Vogt Link: https://lore.kernel.org/r/20210324141115.9384-4-fabian@ritter-vogt.de Signed-off-by: Greg Kroah-Hartman commit 078ba935651e149c92c41161e0322e3372cc2705 Author: Fabian Vogt Date: Wed Mar 24 15:11:10 2021 +0100 fotg210-udc: Fix EP0 IN requests bigger than two packets For a 134 Byte packet, it sends the first two 64 Byte packets just fine, but then notice that less than a packet is remaining and call fotg210_done without actually sending the rest. Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver") Signed-off-by: Fabian Vogt Link: https://lore.kernel.org/r/20210324141115.9384-3-fabian@ritter-vogt.de Signed-off-by: Greg Kroah-Hartman commit 755915fc28edfc608fa89a163014acb2f31c1e19 Author: Fabian Vogt Date: Wed Mar 24 15:11:09 2021 +0100 fotg210-udc: Fix DMA on EP0 for length > max packet size For a 75 Byte request, it would send the first 64 separately, then detect that the remaining 11 Byte fit into a single DMA, but due to this bug set the length to the original 75 Bytes. This leads to a DMA failure (which is ignored...) and the request completes without the remaining bytes having been sent. Fixes: b84a8dee23fd ("usb: gadget: add Faraday fotg210_udc driver") Signed-off-by: Fabian Vogt Link: https://lore.kernel.org/r/20210324141115.9384-2-fabian@ritter-vogt.de Signed-off-by: Greg Kroah-Hartman commit 12c30bb016a819893387b0b5c97d12bc21dfbf97 Author: Sandeep Maheswaram Date: Wed Mar 17 16:31:39 2021 +0530 dt-bindings: usb: qcom,dwc3: Add bindings for SC7280 Add the compatible string for sc7280 SoC from Qualcomm. Signed-off-by: Sandeep Maheswaram Acked-by: Rob Herring Reviewed-by: Stephen Boyd Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/1615978901-4202-2-git-send-email-sanm@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 6845485f9ed0157d6689321155ec7d168c6bfbd7 Author: Selvin Xavier Date: Wed Mar 17 01:15:42 2021 -0700 RDMA/bnxt_re: Move device to error state upon device crash When the L2 driver detects a device crash or device undergone reset, it invokes a stop callback to recover from error. The current RoCE driver doesn't recover the device. So move the device to error state and dispatch fatal events to all qps Release the MSIx vectors to avoid a crash when L2 driver disables the MSIx. Also, check for the device state to avoid posting further commands to the HW. Link: https://lore.kernel.org/r/1615968942-30970-1-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Naresh Kumar PBS Signed-off-by: Devesh Sharma Signed-off-by: Selvin Xavier Signed-off-by: Jason Gunthorpe commit 3fc63d0724bbac83352456e073c113b24115576f Author: Thinh Nguyen Date: Wed Mar 24 18:53:26 2021 -0700 usb: dwc3: trace: Print register read and write offset Currently dwc3 only prints the virtual address of a register when doing register read/write. However, these hashed addresses are difficult to read. Also, since we use %p, we may get some useless (___ptrval___) prints if the address is not randomized enough. Let's include the register offset to help read the register read and write tracepoints. Acked-by: Felipe Balbi Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/cb38aa7dec109a8965691b53039a8b317d026189.1616636706.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 601144568ce09f0ca47834ce6cb535cd1cb70b55 Author: Wei Yongjun Date: Wed Mar 24 14:42:53 2021 +0000 usb: typec: tcpci_maxim: Make symbol 'max_tcpci_tcpci_write_table' static The sparse tool complains as follows: drivers/usb/typec/tcpm/tcpci_maxim.c:55:34: warning: symbol 'max_tcpci_tcpci_write_table' was not declared. Should it be static? This symbol is not used outside of tcpci_maxim.c, so this commit marks it static. Reported-by: Hulk Robot Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210324144253.1011234-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit a58977b2f831e931b3f9268e3051c875ec00f800 Author: Hongren Zheng (Zenithal) Date: Wed Mar 24 15:56:27 2021 +0800 usbip: tools: add usage of device mode in usbip_list.c The option '-d/--device' was implemented in 'usbip list' but not shown in usage. Hence this commit adds this option to usage. Acked-by: Shuah Khan Signed-off-by: Hongren Zheng Link: https://lore.kernel.org/r/YFrwq75Uyef3c9gz@Sun Signed-off-by: Greg Kroah-Hartman commit b737eecd4a8a62c7e479b2c7d2d1a1319343c72b Author: Hongren Zheng (Zenithal) Date: Wed Mar 24 14:35:52 2021 +0800 usbip: tools: add options and examples in man page related to device mode The commit e0546fd8b748 ("usbip: tools: Start using VUDC backend in usbip tools") implemented device mode for user space tools, however the corresponding options are not documented in man page. This commit documents the options and provides examples on device mode. Also the command `usbip port` is documented. Acked-by: Shuah Khan Signed-off-by: Hongren Zheng Link: https://lore.kernel.org/r/YFrdyKKx1nx8bktm@Sun Signed-off-by: Greg Kroah-Hartman commit dfbe56bf48663ae383aba0eb756ba3615a3e9feb Author: Randy Dunlap Date: Thu Mar 25 10:47:24 2021 -0700 tools: usbip: list.h: fix kernel-doc for list_del() In list.h, the kernel-doc for list_del() should be immediately preceding the implementation and not separated from it by another function implementation. Eliminates this kernel-doc error: list.h:1: warning: 'list_del' not found Cc: Greg Kroah-Hartman Cc: Valentina Manea Cc: Shuah Khan Cc: Shuah Khan Cc: linux-usb@vger.kernel.org Acked-by: Shuah Khan Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/r/20210325174724.14447-1-rdunlap@infradead.org Signed-off-by: Greg Kroah-Hartman commit 2665a13a3e9ef3d08b9ac4b48328ddfba9126987 Author: Bhaskar Chowdhury Date: Thu Mar 25 10:40:23 2021 +0530 usb: typec: Fix a typo s/Acknowlege/Acknowledge/ Reviewed-by: Heikki Krogerus Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210325051023.27914-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3a6c267dd7b8822eb722835b503c5a438cbd3700 Author: Dmitry Osipenko Date: Tue Mar 2 13:21:58 2021 +0300 ARM: tegra: acer-a500: Add atmel,wakeup-method property Acer A500 uses Atmel Maxtouch 1386 touchscreen controller. This controller has WAKE line which could be connected to I2C clock lane, dedicated GPIO or fixed to HIGH level. Controller wakes up from a deep sleep when WAKE line is asserted low. Acer A500 has WAKE line connected to I2C clock and Linux device driver doesn't work property without knowing what wakeup method is used by h/w. Add atmel,wakeup-method property to the touchscreen node. Signed-off-by: Dmitry Osipenko [treding@nvidia.com: use literal to avoid dependency on header file] Signed-off-by: Thierry Reding commit 1fb7f8973f51ca1a7ffe61a2c779ed15f57f3d82 Author: Mark Bloch Date: Mon Mar 1 09:04:20 2021 +0200 RDMA: Support more than 255 rdma ports Current code uses many different types when dealing with a port of a RDMA device: u8, unsigned int and u32. Switch to u32 to clean up the logic. This allows us to make (at least) the core view consistent and use the same type. Unfortunately not all places can be converted. Many uverbs functions expect port to be u8 so keep those places in order not to break UAPIs. HW/Spec defined values must also not be changed. With the switch to u32 we now can support devices with more than 255 ports. U32_MAX is reserved to make control logic a bit easier to deal with. As a device with U32_MAX ports probably isn't going to happen any time soon this seems like a non issue. When a device with more than 255 ports is created uverbs will report the RDMA device as having 255 ports as this is the max currently supported. The verbs interface is not changed yet because the IBTA spec limits the port size in too many places to be u8 and all applications that relies in verbs won't be able to cope with this change. At this stage, we are extending the interfaces that are using vendor channel solely Once the limitation is lifted mlx5 in switchdev mode will be able to have thousands of SFs created by the device. As the only instance of an RDMA device that reports more than 255 ports will be a representor device and it exposes itself as a RAW Ethernet only device CM/MAD/IPoIB and other ULPs aren't effected by this change and their sysfs/interfaces that are exposes to userspace can remain unchanged. While here cleanup some alignment issues and remove unneeded sanity checks (mainly in rdmavt), Link: https://lore.kernel.org/r/20210301070420.439400-1-leon@kernel.org Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 66f60522138c2e0d8a3518edd4979df11a2d7525 Author: Davidlohr Bueso Date: Mon Mar 8 17:59:49 2021 -0800 powerpc/spinlock: Unserialize spin_is_locked c6f5d02b6a0f (locking/spinlocks/arm64: Remove smp_mb() from arch_spin_is_locked()) made it pretty official that the call semantics do not imply any sort of barriers, and any user that gets creative must explicitly do any serialization. This creativity, however, is nowadays pretty limited: 1. spin_unlock_wait() has been removed from the kernel in favor of a lock/unlock combo. Furthermore, queued spinlocks have now for a number of years no longer relied on _Q_LOCKED_VAL for the call, but any non-zero value to indicate a locked state. There were cases where the delayed locked store could lead to breaking mutual exclusion with crossed locking; such as with sysv ipc and netfilter being the most extreme. 2. The auditing Andrea did in verified that remaining spin_is_locked() no longer rely on such semantics. Most callers just use it to assert a lock is taken, in a debug nature. The only user that gets cute is NOLOCK qdisc, as of: 96009c7d500e (sched: replace __QDISC_STATE_RUNNING bit with a spin lock) ... which ironically went in the next day after c6f5d02b6a0f. This change replaces test_bit() with spin_is_locked() to know whether to take the busylock heuristic to reduce contention on the main qdisc lock. So any races against spin_is_locked() for archs that use LL/SC for spin_lock() will be benign and not break any mutual exclusion; furthermore, both the seqlock and busylock have the same scope. Signed-off-by: Davidlohr Bueso Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210309015950.27688-3-dave@stgolabs.net commit 2bf3604c415c9d75311141b8eb6ac8780ef74420 Author: Davidlohr Bueso Date: Mon Mar 8 17:59:48 2021 -0800 powerpc/spinlock: Define smp_mb__after_spinlock only once Instead of both queued and simple spinlocks doing it. Move it into the arch's spinlock.h. Signed-off-by: Davidlohr Bueso Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210309015950.27688-2-dave@stgolabs.net commit 93c043e393af7fa218c928d8c62396ba28f1bb84 Author: Christophe Leroy Date: Wed Mar 10 17:57:07 2021 +0000 powerpc/ptrace: Convert gpr32_set_common() to user access block Use user access block in gpr32_set_common() instead of repetitive __get_user() which imply repetitive KUAP open/close. To get it clean, force inlining of the small set of tiny functions called inside the block. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/bdcb8652c3bb4ab5b8b3bfd08147434be8fc04c9.1615398498.git.christophe.leroy@csgroup.eu commit 870779f40e99c795ddfafa0dfc43318e51f15127 Author: Christophe Leroy Date: Wed Mar 10 17:57:06 2021 +0000 powerpc/futex: Switch to user_access block Use user_access_begin() instead of the access_ok/allow_access sequence. This brings the missing might_fault() check. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/6cd202cdc4f939d47822e4ddd3c0856210431a58.1615398498.git.christophe.leroy@csgroup.eu commit 164dc6ce368fa23b0aae0e5d12883fff9bf80458 Author: Christophe Leroy Date: Wed Mar 10 17:57:05 2021 +0000 powerpc/net: Switch csum_and_copy_{to/from}_user to user_access block Use user_access_begin() instead of the might_sleep/access_ok/allow_access sequence. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2dee286d2d6dc9a27d99e31ac564bad4fae2cb49.1615398498.git.christophe.leroy@csgroup.eu commit e63ceebdad82f85e48b018abfc6af4ed6958179e Author: Christophe Leroy Date: Wed Mar 10 17:57:04 2021 +0000 powerpc/lib: Don't use __put_user_asm_goto() outside of uaccess.h __put_user_asm_goto() is internal to uaccess.h Use __put_kernel_nofault() instead. The generated code is identical. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/3e32c4f0361933909368b68f5ee569e5de661c1b.1615398498.git.christophe.leroy@csgroup.eu commit fd69d544b0e785b11699675154bdfe01a04538cd Author: Christophe Leroy Date: Wed Mar 10 17:57:03 2021 +0000 powerpc/syscalls: Use sys_old_select() in ppc_select() Instead of opencodying the copy of parameters, use the generic sys_old_select(). Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/4de983ad254739da1fe6e9f273baf387b7043ae0.1615398498.git.christophe.leroy@csgroup.eu commit 4b8cda58812c1e1bf79d37f2ddff3cf03b7025da Author: Christophe Leroy Date: Wed Mar 10 17:57:02 2021 +0000 powerpc/uaccess: Move copy_mc_xxx() functions down copy_mc_xxx() functions are in the middle of raw_copy functions. For clarity, move them out of the raw_copy functions block. They are using access_ok, so they need to be after the general functions in order to eventually allow the inclusion of asm-generic/uaccess.h in some future. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/2cdecb6e5a2fcee6c158d18dd254b71ec0e0da4d.1615398498.git.christophe.leroy@csgroup.eu commit 7472199a6eda6a79f9e3b126f52f67f9ce3e1f77 Author: Christophe Leroy Date: Wed Mar 10 17:57:01 2021 +0000 powerpc/uaccess: Swap clear_user() and __clear_user() It is clear_user() which is expected to call __clear_user(), not the reverse. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/d8ec01fb22f33d87321451d5e5f01cb56dacaa39.1615398498.git.christophe.leroy@csgroup.eu commit c6adc835c68b713360f918d21372c2f34fc228e2 Author: Christophe Leroy Date: Wed Mar 10 17:57:00 2021 +0000 powerpc/uaccess: Also perform 64 bits copies in unsafe_copy_to_user() on ppc32 ppc32 has an efficiant 64 bits __put_user(), so also use it in order to unroll loops more. Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/ccc08a16eea682d6fa4acc957ffe34003a8f0844.1615398498.git.christophe.leroy@csgroup.eu commit 6ce56e1ac380eaa088d3f4c01446e15e195bd541 Author: Laurent Dufour Date: Fri Mar 5 13:55:54 2021 +0100 powerpc/pseries: export LPAR security flavor in lparcfg This is helpful to read the security flavor from inside the LPAR. In /sys/kernel/debug/powerpc/security_features it can be seen if mitigations are on or off but not the level set through the ASMI menu. Furthermore, reporting it through /proc/powerpc/lparcfg allows an easy processing by the lparstat command [1]. Export it like this in /proc/powerpc/lparcfg: $ grep security_flavor /proc/powerpc/lparcfg security_flavor=1 Value follows what is documented on the IBM support page [2]: 0 Speculative execution fully enabled 1 Speculative execution controls to mitigate user-to-kernel attacks 2 Speculative execution controls to mitigate user-to-kernel and user-to-user side-channel attacks [1] https://groups.google.com/g/powerpc-utils-devel/c/NaKXvdyl_UI/m/wa2stpIDAQAJ [2] https://www.ibm.com/support/pages/node/715841 Signed-off-by: Laurent Dufour Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210305125554.5165-1-ldufour@linux.ibm.com commit 366d7c643a8a9db652341e314b33d3fc80595e6c Author: Dmitry Osipenko Date: Tue Mar 2 15:25:01 2021 +0300 soc/tegra: pmc: Print out domain name when reset fails to acquire Print out domain name when reset fails to acquire for debugging purposes and to make formatting of GENPD errors consistent in the driver. Tested-by: Peter Geis # Ouya T30 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 66ee50c6e23432efded0c34ea71428f97cac808a Author: Dmitry Osipenko Date: Tue Mar 2 15:25:00 2021 +0300 soc/tegra: pmc: Ensure that clock rates aren't too high Switch all clocks of a power domain to a safe rate which is suitable for all possible voltages in order to ensure that hardware constraints aren't violated when power domain state toggles. Tested-by: Peter Geis # Ouya T30 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit c45e66a6b9f40f2e95bc6d97fbf3daa1ebe88c6b Author: Dmitry Osipenko Date: Tue Mar 2 15:24:59 2021 +0300 soc/tegra: pmc: Fix completion of power-gate toggling The SW-initiated power gate toggling is dropped by PMC if there is contention with a HW-initiated toggling, i.e. when one of CPU cores is gated by cpuidle driver. Software should retry the toggling after 10 microseconds on Tegra20/30 SoCs, hence add the retrying. On Tegra114+ the toggling method was changed in hardware, the TOGGLE_START bit indicates whether PMC is busy or could accept the command to toggle, hence handle that bit properly. The problem pops up after enabling dynamic power gating of 3D hardware, where 3D power domain fails to turn on/off "randomly". The programming sequence and quirks are documented in TRMs, but PMC driver obliviously re-used the Tegra20 logic for Tegra30+, which strikes back now. The 10 microseconds and other timeouts aren't documented in TRM, they are taken from downstream kernel. Link: https://nv-tegra.nvidia.com/gitweb/?p=linux-2.6.git;a=commit;h=311dd1c318b70e93bcefec15456a10ff2b9eb0ff Link: https://nv-tegra.nvidia.com/gitweb/?p=linux-3.10.git;a=commit;h=7f36693c47cb23730a6b2822e0975be65fb0c51d Tested-by: Peter Geis # Ouya T30 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 19221e3083020bd9537624caa0ee0145ed92ba36 Author: Dmitry Osipenko Date: Tue Mar 2 15:24:58 2021 +0300 soc/tegra: pmc: Fix imbalanced clock disabling in error code path The tegra_powergate_power_up() has a typo in the error code path where it will try to disable clocks twice, fix it. In practice that error never happens, so this is a minor correction. Tested-by: Peter Geis # Ouya T30 Tested-by: Nicolas Chauvet # PAZ00 T20 and TK1 T124 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit ef85bb582c41524e9e68dfdbde48e519dac4ab3d Author: Dmitry Osipenko Date: Tue Mar 2 16:18:00 2021 +0300 soc/tegra: regulators: Fix locking up when voltage-spread is out of range Fix voltage coupler lockup which happens when voltage-spread is out of range due to a bug in the code. The max-spread requirement shall be accounted when CPU regulator doesn't have consumers. This problem is observed on Tegra30 Ouya game console once system-wide DVFS is enabled in a device-tree. Fixes: 783807436f36 ("soc/tegra: regulators: Add regulators coupler for Tegra30") Cc: stable@vger.kernel.org Reported-by: Peter Geis Tested-by: Peter Geis # Ouya T30 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 9d5e7c3e36ebae838c3427ed943e14f976715bbb Author: JC Kuo Date: Wed Jan 20 15:34:07 2021 +0800 soc/tegra: pmc: Provide USB sleepwalk register map This commit implements a register map which grants USB (UTMI and HSIC) sleepwalk registers access to USB PHY drivers. The USB sleepwalk logic is in PMC hardware block but USB PHY drivers have the best knowledge of proper programming sequence. Signed-off-by: JC Kuo Acked-by: Thierry Reding Signed-off-by: Thierry Reding commit 50fa3a531e8e4b58550171fb159d0aa578c6b52d Author: Athira Rajeev Date: Mon Mar 22 10:57:27 2021 -0400 perf sort: Display sort dimension p_stage_cyc only on supported archs The sort dimension "p_stage_cyc" is used to represent pipeline stage cycle information. Presently, this is used only in powerpc. For unsupported platforms, we don't want to display it in the perf report output columns. Hence add check in sort_dimension__add() and skip the sort key incase it is not applicable for the particular arch. Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Acked-by: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/1616425047-1666-6-git-send-email-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 06e5ca746c07380dfe0e4c3e10c34a6daa69eae6 Author: Athira Rajeev Date: Mon Mar 22 10:57:26 2021 -0400 perf tools: Support pipeline stage cycles for powerpc The pipeline stage cycles details can be recorded on powerpc from the contents of Performance Monitor Unit (PMU) registers. On ISA v3.1 platform, sampling registers exposes the cycles spent in different pipeline stages. Patch adds perf tools support to present two of the cycle counter information along with memory latency (weight). Re-use the field 'ins_lat' for storing the first pipeline stage cycle. This is stored in 'var2_w' field of 'perf_sample_weight'. Add a new field 'p_stage_cyc' to store the second pipeline stage cycle which is stored in 'var3_w' field of perf_sample_weight. Add new sort function 'Pipeline Stage Cycle' and include this in default_mem_sort_order[]. This new sort function may be used to denote some other pipeline stage in another architecture. So add this to list of sort entries that can have dynamic header string. Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Acked-by: Jiri Olsa Cc: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/1616425047-1666-5-git-send-email-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit ff0bd0a33f257cc01c0b777c1423205e49049777 Author: Athira Rajeev Date: Mon Mar 22 10:57:25 2021 -0400 perf powerpc: Add support for PERF_SAMPLE_WEIGHT_STRUCT Add arch specific arch_evsel__set_sample_weight() to set the new sample type for powerpc. Add arch specific arch_perf_parse_sample_weight() to store the sample->weight values depending on the sample type applied. if the new sample type (PERF_SAMPLE_WEIGHT_STRUCT) is applied, store only the lower 32 bits to sample->weight. If sample type is 'PERF_SAMPLE_WEIGHT', store the full 64-bit to sample->weight. Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Acked-by: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/1616425047-1666-4-git-send-email-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 0a606822c4863b2398925e6ff3329d64c4c52bb8 Author: Athira Rajeev Date: Mon Mar 22 10:57:24 2021 -0400 perf sort: Add dynamic headers for perf report columns Currently the header string for different columns in perf report is fixed. Some fields of perf sample could have different meaning for different architectures than the meaning conveyed by the header string. An example is the new field 'var2_w' of perf_sample_weight structure. This is presently captured as 'Local INSTR Latency' in perf mem report. But this could be used to denote a different latency cycle in another architecture. Introduce a weak function arch_perf_header_entry() to set the arch specific header string for the fields which can contain dynamic header. If the architecture do not have this function, fall back to the default header string value. Signed-off-by: Athira Rajeev Reviewed-by: Madhavan Srinivasan Acked-by: Jiri Olsa Cc: Kajol Jain Cc: Kan Liang Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Ravi Bangoria Link: https://lore.kernel.org/r/1616425047-1666-3-git-send-email-atrajeev@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 9c15db92a8e56bcde0f58064ac1adc28c0579b51 Merge: d010995736cb5 1b33dfa5d5f16 Author: Greg Kroah-Hartman Date: Fri Mar 26 12:09:47 2021 +0100 Merge tag 'iio-for-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next Jonathan writes: 1st set of IIO/counter device support, features and cleanup in the 5.13 cycle Big set in here from Alexandru Ardelean enabling multiple buffer support. This includes providing a new directory per buffer that combines what was previously in buffer/ and scan_elements/. Old interfaces still in place for compatiblity. Note immuatable branch for scmi patches to allow for some significant rework going on in that subsystem. Merge required updating to reflect some changes in IIO. Late rebase to fix some wrong fixes tags due to some earlier rebases made necessary by messing up the immutable branch. IIO New Device Support * adi,ad5686 - Add info to support AD5673R and AD5677R * bosch,bmi088 - New driver supporting this accelerometer + gyroscope * cros_ec_mkbp - New driver for this proximity sensor that exposes a 'front' sensor. Very simple switch like device, but driver allows it to share interface with more sophisticated proximity sensors. * iio_scmi - New driver to support ARM SCMI protocol to expose underlying accelerometers and gyroscopes via this firmware interface. * st,st_magn - Add ID for IISMDC magnetometer. * ti,ads131e0 - New driver supporting ads131e04, ads131e06 and ads131e08 24 bit ADCs Counter New Device Support * IRQ or GPIO based counter - New driver for a conceptually simple counter that uses interrupts to perform the count. Features * core - Dual buffer supprt including: Various helpers to centralize handling of bufferer related elements. Document existing and new IOCTLs Register the IIO chrdev only if it can actually be used for anything. Rework attribute group creation in the core (lots of patches) Merge buffer/ and scan_elements/ entries into one list + maintain backwards compatible set. Introduce the internal logic and IOCTL to allow multiple buffers + access to an anon FD per buffer to actually read from it. Tidy up tools/iio/iio_generic_buffer and switch to new interfaces. Update ABI docs. A few follow up fixes, unsuprising as this was a huge bit of rework. - Move common case setting of trig->parent to the core. - Provide an iio_read_channel_processed_scale() to avoid loss of precision from iio_read_channel_processed() then applying integer scale. Use it in ntc_thermistor driver in hwmon. - Allow drivers to specify labels from elsewhere than DT. Use it for bmc150 and kxcjk-1013 labels related to position on 2 in one tablets. - Document label usage for proximity and accelerometer sensors. - Some local variable renames for consistency tools - Add -a parameter to iio_event_monitor to allow autoenabling of events. * acpi_als - Add trigger support for devices that don't support notification method. * adi,ad7124 - Allow more than 8 channels. This is a complex little device, but is capable of supporting up to 16 channels if the share certain configuration settings. * hrtimer-trigger - Support sampling frequency below 1Hz. * mediatek,mt8195-auxadc - Add compatible to binding docs (always also includes mt8173) * st,stm32-adc - Enable timetamps when not using DMA. * vishay,vcnl3020 - Sampling frequency control. Cleanup and minor fixes: * treewide - Use some getter and setter functions instead of opencoding. - Set of fixes for pointless casts in various drivers. - Avoid wrong kernel-doc marking on comment blocks. - Fix various other minor kernel-doc issues shown by W=1 * core - Use a signed temporary for IIO_VAL_FRACTIONAL_LOG2 to avoid odd casts. - Fix IIO_VAL_FRACTIONAL_LOG2 for values between -1.0 and 0.0 - Add unit tests for iio_format_value() * docs - Fix formatting/typos in iio_configfs.rst and buffers.rst - Add documentation of index in buffers.rst - Fix scan element description - Avoid some issues with HTML generation from ABI docs by moving duplicated defintions to more generic files. - Drop reference to long dead mailing list. * 104-quad - Remove left over deprecated IIO counter ABI. * adi,adi-axi-adc - Fix wrong bit of docs. * adi,ad5791 - Typos * adi,ad9834 - Switch to device managed functions in probe. * adi,adis* - Add and use helpers for locking to reduced duplication. * adi,adis16480 - Fix calculation of sampling frequency when using pulse per second input. * adi,adis16475 - Calculate the IMU scaled internal sampling rate and runtime depending on sysfs based configuration rather than getting from DT. Drop now unnecessary property from DT bindings doc. * cros_ec - Fix result of a series of recent changes that means extended buffer attributes turn up in the wrong place. Too complex to revert the various patches unfortunately so this is a bit messy. * fsl,mma3452 - Indentation cleanup. * hid-sensors - Size of storage needs to increase for some parts when using quaternions. - Move the get sensistivity attribute to hid-sensors-common to reduce duplication. Enable it for more device types. - Correctly handle relative sensitivity if reported that way including documenting the new ABI. * maxim,max517 - Use device managed functions in probe. * mediatek,mt6360-adc - Use asm/unaligned.h instead of directly including unaligned/be_byteshift.h * novuton,npcm-adc - Local lock instead of missusing mlock. * semtech,sx9500 - Typos * st,sensor - typo fix * st,spear-adc - Local lock instead of missusing mlock. * st,stm32-adc - Long standing HAS_IOMEM dependency fix. * st,stm32-counter - Remove left over deprecated IIO counter ABI. * ti,palmas-adc - Local lock instead of missusing mlock. * ti,tmp007 - Switch to device managed functions in probe. Other * MAINTAINERS - Move Peter Meerwald-Stadler to Credits at his request * tag 'iio-for-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: (119 commits) iio: acpi_als: Add trigger support iio: acpi_als: Add local variable dev in probe iio: acpi_als: Add timestamp channel iio: adc: ad7292: Modify the bool initialization assignment iio: cros: unify hw fifo attributes without API changes iio: kfifo: add devm_iio_triggered_buffer_setup_ext variant iio: event_monitor: Enable events before monitoring dt-bindings: iio: adc: Add compatible for Mediatek MT8195 iio:magnetometer: Add Support for ST IIS2MDC dt-bindings: iio: st,st-sensors add IIS2MDC. staging: iio: ad9832: kernel-doc fixes iio:dac:max517.c: Use devm_iio_device_register() iio:cros_ec_sensors: Fix a wrong function name in kernel doc. iio: buffer: kfifo_buf: kernel-doc, typo in function name. iio: accel: sca3000: kernel-doc fixes. Missing - and wrong function names. iio: adc: adi-axi-adc: Drop false marking for kernel-doc iio: adc: cpcap-adc: kernel-doc fix - that should be _ in structure name iio: dac: ad5504: fix wrong part number in kernel-doc structure name. iio: dac: ad5770r: kernel-doc fix case of letter R wrong in structure name iio: adc: ti-adc084s021: kernel-doc fixes, missing function names ... commit ee84c58b5884f67b0a587e31d9378ff9ead7bf5a Author: Dafna Hirschfeld Date: Fri Mar 26 11:32:15 2021 +0100 drm: Fix 3 typos in the inline doc Fix the following typos: 1. When mentioning a list of functions, the function drm_atomic_helper_disable_plane is mentioned twice. 2. drop the word 'afterwards': s/afterwards after that/after that/' 3. drop extra 'the': s/but do not the support the full/but do not support the full/ Signed-off-by: Dafna Hirschfeld Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20210326103216.7918-1-dafna.hirschfeld@collabora.com commit 58d746c119dfa28e72fc35aacaf3d2a3ac625cd0 Author: Nathan Chancellor Date: Thu Mar 25 17:04:35 2021 -0700 efi/libstub: Add $(CLANG_FLAGS) to x86 flags When cross compiling x86 on an ARM machine with clang, there are several errors along the lines of: arch/x86/include/asm/page_64.h:52:7: error: invalid output constraint '=D' in asm This happens because the x86 flags in the EFI stub are not derived from KBUILD_CFLAGS like the other architectures are and the clang flags that set the target architecture ('--target=') and the path to the GNU cross tools ('--prefix=') are not present, meaning that the host architecture is targeted. These flags are available as $(CLANG_FLAGS) from the main Makefile so add them to the cflags for x86 so that cross compiling works as expected. Signed-off-by: Nathan Chancellor Signed-off-by: Borislav Petkov Acked-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20210326000435.4785-4-nathan@kernel.org commit d5cbd80e302dfea59726c44c56ab7957f822409f Author: Nathan Chancellor Date: Thu Mar 25 17:04:34 2021 -0700 x86/boot: Add $(CLANG_FLAGS) to compressed KBUILD_CFLAGS When cross compiling x86 on an ARM machine with clang, there are several errors along the lines of: arch/x86/include/asm/string_64.h:27:10: error: invalid output constraint '=&c' in asm This happens because the compressed boot Makefile reassigns KBUILD_CFLAGS and drops the clang flags that set the target architecture ('--target=') and the path to the GNU cross tools ('--prefix='), meaning that the host architecture is targeted. These flags are available as $(CLANG_FLAGS) from the main Makefile so add them to the compressed boot folder's KBUILD_CFLAGS so that cross compiling works as expected. Signed-off-by: Nathan Chancellor Signed-off-by: Borislav Petkov Acked-by: Ard Biesheuvel Link: https://lkml.kernel.org/r/20210326000435.4785-3-nathan@kernel.org commit 8abe7fc26ad8f28bfdf78adbed56acd1fa93f82d Author: John Millikin Date: Thu Mar 25 17:04:33 2021 -0700 x86/build: Propagate $(CLANG_FLAGS) to $(REALMODE_FLAGS) When cross-compiling with Clang, the `$(CLANG_FLAGS)' variable contains additional flags needed to build C and assembly sources for the target platform. Normally this variable is automatically included in `$(KBUILD_CFLAGS)' via the top-level Makefile. The x86 real-mode makefile builds `$(REALMODE_CFLAGS)' from a plain assignment and therefore drops the Clang flags. This causes Clang to not recognize x86-specific assembler directives:   arch/x86/realmode/rm/header.S:36:1: error: unknown directive   .type real_mode_header STT_OBJECT ; .size real_mode_header, .-real_mode_header   ^ Explicit propagation of `$(CLANG_FLAGS)' to `$(REALMODE_CFLAGS)', which is inherited by real-mode make rules, fixes cross-compilation with Clang for x86 targets. Relevant flags: * `--target' sets the target architecture when cross-compiling. This   flag must be set for both compilation and assembly (`KBUILD_AFLAGS')   to support architecture-specific assembler directives. * `-no-integrated-as' tells clang to assemble with GNU Assembler   instead of its built-in LLVM assembler. This flag is set by default   unless `LLVM_IAS=1' is set, because the LLVM assembler can't yet   parse certain GNU extensions. Signed-off-by: John Millikin Signed-off-by: Nathan Chancellor Signed-off-by: Borislav Petkov Acked-by: Ard Biesheuvel Tested-by: Sedat Dilek Link: https://lkml.kernel.org/r/20210326000435.4785-2-nathan@kernel.org commit 1b33dfa5d5f165782a1cb18ba1350a42d5d7a579 Merge: 24b84444eb6f8 f774117c96f94 Author: Jonathan Cameron Date: Fri Mar 26 10:03:41 2021 +0000 Merge remote-tracking branch 'local/ib-iio-scmi-5.12-rc2-take3' into togreg Updated to use devm_iio_kfifo_buffer_setup() in place of now removed devm_iio_kfifo_allocate() Take3 branch because first 2 versions including wrong version of patch. commit aeceecd40d94ed3c00bfe1cfe59dd1bfac2fc6fe Author: Linus Walleij Date: Fri Mar 26 10:19:11 2021 +0100 ARM: dts: ux500: Fix up TVK R3 sensors The TVK1281618 R3 sensors are different from the R2 board, some incorrectness is fixed and some new sensors added, we also rename the nodes appropriately with accelerometer@ etc. Signed-off-by: Linus Walleij commit 8d67f4f62c91842f622c0fc165a65959e9d90f49 Author: Linus Walleij Date: Fri Mar 26 10:17:26 2021 +0100 ARM: dts: ux500: Push sensors to TVK R2 board These sensors are particular to the TVK UIB R2 board and will conflict with the R3 board, so push them down to the actual UIB include DTSI. Rename the nodes appropriately to accelerometer@ etc in the process. Signed-off-by: Linus Walleij commit b428648f60ead796c9d8bb653b44bbbafbf16797 Author: Linus Walleij Date: Mon Mar 22 22:33:14 2021 +0100 ARM: dts: ux500: Move Synaptics to right include The Synaptics RMI4 touchscreen is a property of the TVK1281618 R2 UIB, so move it into that file instead of the main TVK1281618 main include so we can define another touchscreen for the R3 UIB. Signed-off-by: Linus Walleij commit 2c276eaba3ccf8faad9728f37d57eaa2f19388d9 Author: Linus Walleij Date: Sun Mar 21 02:25:49 2021 +0100 ARM: dts: ux500: Fix touchscreen on TVK R2 The touchscreen is mounted with flipped x/y on the R2 version of TVK1281618. Push this setting to that DTS file only. The function nodes were named wrong so the OF properties didn not "take". Fix the node names from "rmi-fnn" to "rmi4-nn" so this also work. Signed-off-by: Linus Walleij commit 2a5b057032a39e56817b2fd55c5c0d0cc246a979 Author: Linus Walleij Date: Sat Mar 20 02:10:35 2021 +0100 ARM: dts: ux500: Fix BT+WLAN on Janice GPIO215 has a rail named WLAN_RST_N but it is actually connected to the pin WLAN_REG_ON on the BCM4330 chip, so this should be the WLAN regulator GPIO rather than GPIO222. The misunderstanding comes from the erroneous naming of the rail on the schematic. GPIO222 is indeed connected to the rail BT_VREG_EN and the pin BT_REG_ON, and can be handled by the driver as usual. This corrects misunderstandings and makes Janice's WLAN and BT setup look like that of Golden and Skomer. Add explicit BCM4330 compatible to the WLAN chip. Cc: Stephan Gerhold Signed-off-by: Linus Walleij Reviewed-by: Stephan Gerhold commit 18107f8a2df6bf1c6cac8d0713f757f866d5af51 Author: Vladimir Murzin Date: Fri Mar 12 17:38:10 2021 +0000 arm64: Support execute-only permissions with Enhanced PAN Enhanced Privileged Access Never (EPAN) allows Privileged Access Never to be used with Execute-only mappings. Absence of such support was a reason for 24cecc377463 ("arm64: Revert support for execute-only user mappings"). Thus now it can be revisited and re-enabled. Cc: Kees Cook Signed-off-by: Vladimir Murzin Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210312173811.58284-2-vladimir.murzin@arm.com Signed-off-by: Catalin Marinas commit 10cb823bbacd2626cca8d89a7dba175c3ae5cf07 Author: Aditya Srivastava Date: Sun Mar 21 18:00:07 2021 +0530 crypto: nx - fix incorrect kernel-doc comment syntax in files The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are certain files in drivers/crypto/nx, which follow this syntax, but the content inside does not comply with kernel-doc. Such lines were probably not meant for kernel-doc parsing, but are parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc. E.g., presence of kernel-doc like comment in the header lines for drivers/crypto/nx/nx-sha256.c at header causes these warnings: "warning: Function parameter or member 'tfm' not described in 'nx_crypto_ctx_sha256_init'" "warning: expecting prototype for SHA(). Prototype was for nx_crypto_ctx_sha256_init() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Signed-off-by: Herbert Xu commit ce668da5f11e3aeed49843980b70529aa61f4275 Author: Aditya Srivastava Date: Sun Mar 21 17:39:12 2021 +0530 crypto: ux500 - fix incorrect kernel-doc comment syntax The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are certain files in drivers/crypto/ux500, which follow this syntax, but the content inside does not comply with kernel-doc. Such lines were probably not meant for kernel-doc parsing, but are parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc. E.g., presence of kernel-doc like comment in the header lines for drivers/crypto/ux500/cryp/cryp.h at header causes this warning: "warning: expecting prototype for ST(). Prototype was for _CRYP_H_() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Signed-off-by: Herbert Xu commit 73f04d3d800f3c8058bb00447e3e1c4cdc85a2b0 Author: Aditya Srivastava Date: Sun Mar 21 17:38:32 2021 +0530 crypto: amcc - fix incorrect kernel-doc comment syntax in files The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are certain files in drivers/crypto/amcc, which follow this syntax, but the content inside does not comply with kernel-doc. Such lines were probably not meant for kernel-doc parsing, but are parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc. E.g., presence of kernel-doc like comment in drivers/crypto/amcc/crypto4xx_alg.c at header, and some other lines, causes these warnings by kernel-doc: "warning: expecting prototype for AMCC SoC PPC4xx Crypto Driver(). Prototype was for set_dynamic_sa_command_0() instead" "warning: Function parameter or member 'dir' not described in 'set_dynamic_sa_command_0'" etc.. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Signed-off-by: Herbert Xu commit dbb153c02bacecfbc695738bf7fec4becd46bc39 Author: Aditya Srivastava Date: Sun Mar 21 01:55:25 2021 +0530 crypto: vmx - fix incorrect kernel-doc comment syntax in files The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are certain files in drivers/crypto/vmx, which follow this syntax, but the content inside does not comply with kernel-doc. Such lines were probably not meant for kernel-doc parsing, but are parsed due to the presence of kernel-doc like comment syntax(i.e, '/**'), which causes unexpected warnings from kernel-doc. E.g., presence of kernel-doc like comment in the header line for drivers/crypto/vmx/vmx.c causes this warning by kernel-doc: "warning: expecting prototype for Routines supporting VMX instructions on the Power 8(). Prototype was for p8_init() instead" Similarly for other files too. Provide a simple fix by replacing such occurrences with general comment format, i.e. '/*', to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Reviewed-by: Daniel Axtens Signed-off-by: Herbert Xu commit 8bbecfb402f76b6977a6c5661ad3cfb0051a9776 Author: Weili Qian Date: Sat Mar 20 19:27:46 2021 +0800 crypto: hisilicon/qm - add queue isolation support for Kunpeng930 Kunpeng930 supports doorbell isolation to ensure that each queue has an independent doorbell address space. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 6250383a2083e8f66635d441977f74e0ee4e52f7 Author: Weili Qian Date: Sat Mar 20 19:27:45 2021 +0800 crypto: hisilicon/qm - set the number of queues for function Kunpeng930 supports queue doorbell isolation. When doorbell isolation is enabled, it supports to obtain the maximum number of queues of one function from hardware register. Otherwise, the 'max_qp_num' is the total number of queues. When assigning queues to VF, it is necessary to ensure that the number of VF queues does not exceed 'max_qp_num'. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit c4392b46ee95be9815e682a1c8cb0aa2f92f07e2 Author: Weili Qian Date: Sat Mar 20 19:27:44 2021 +0800 crypto: hisilicon/qm - move 'CURRENT_QM' code to qm.c Since the code related to 'CURRENT_QM' debugfs is exactly same in sec/hpre/zip driver, move 'CURRENT_QM' to qm.c to reduce duplicate code. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 45bb26d946cd89c08e6b8410a76b9bf3614c9d78 Author: Weili Qian Date: Sat Mar 20 19:27:43 2021 +0800 crypto: hisilicon/qm - set the total number of queues Move the configuration of the total number of queues 'ctrl_qp_num' from sec2/hpre/zip to qm.c. And get the total number of queues from the hardware register for Kunpeng930. Signed-off-by: Weili Qian Signed-off-by: Herbert Xu commit 7d15697983c720c4405ce47b30520d0c7dd47487 Author: Hui Tang Date: Fri Mar 19 18:45:39 2021 +0800 crypto: hisilicon/hpre - fix Kconfig hpre select 'CRYPTO_ECDH' and 'CRYPTO_CURVE25519'. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 670fefb9240950fe9e3e4740039a7e13e5910470 Author: Hui Tang Date: Fri Mar 19 18:45:27 2021 +0800 crypto: hisilicon/hpre - fix "hpre_ctx_init" resource leak When calling "hpre_ctx_set" fails, stop and put qp, otherwise will leak qp resource. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit a9214b0b6ed245b0c5239e0576b7de509815c2a0 Author: Hui Tang Date: Fri Mar 19 18:45:05 2021 +0800 crypto: hisilicon - fix the check on dma address System may be able to get physical address of zero if not reserved by firmware. The dma address obtained by 'dma_alloc_coherent' is valid, since already checking cpu va before, so do not check again. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit ed48466d3ff94fac09ca5c521a24501eb5908277 Author: Hui Tang Date: Fri Mar 19 18:44:19 2021 +0800 crypto: hisilicon/hpre - optimise 'hpre_algs_register' error path There is redundant code especially when registing new algorithms in the future. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit bbe6c4ba518d82974aab3361a445d60c0785d0cc Author: Hui Tang Date: Fri Mar 19 18:44:18 2021 +0800 crypto: hisilicon/hpre - delete wrap of 'CONFIG_CRYPTO_DH' 'CRYPTO_DH' has selected in 'Kconfig', so delete 'CONFIG_CRYPTO_DH'. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 0193b32f565e14ef07ced5d6bf8986490ec8e0f1 Author: Meng Yu Date: Fri Mar 19 17:13:34 2021 +0800 crypto: ecc - Correct an error in the comments Remove repeated word 'bit' in comments. Signed-off-by: Meng Yu Signed-off-by: Herbert Xu commit 8609f5cfdc872fc3a462efa6a3eca5cb1e2f6446 Author: Tong Zhang Date: Thu Mar 18 23:40:00 2021 -0400 crypto: qat - ADF_STATUS_PF_RUNNING should be set after adf_dev_init ADF_STATUS_PF_RUNNING is (only) used and checked by adf_vf2pf_shutdown() before calling adf_iov_putmsg()->mutex_lock(vf2pf_lock), however the vf2pf_lock is initialized in adf_dev_init(), which can fail and when it fail, the vf2pf_lock is either not initialized or destroyed, a subsequent use of vf2pf_lock will cause issue. To fix this issue, only set this flag if adf_dev_init() returns 0. [ 7.178404] BUG: KASAN: user-memory-access in __mutex_lock.isra.0+0x1ac/0x7c0 [ 7.180345] Call Trace: [ 7.182576] mutex_lock+0xc9/0xd0 [ 7.183257] adf_iov_putmsg+0x118/0x1a0 [intel_qat] [ 7.183541] adf_vf2pf_shutdown+0x4d/0x7b [intel_qat] [ 7.183834] adf_dev_shutdown+0x172/0x2b0 [intel_qat] [ 7.184127] adf_probe+0x5e9/0x600 [qat_dh895xccvf] Signed-off-by: Tong Zhang Reviewed-by: Andy Shevchenko Fixes: 25c6ffb249f6 ("crypto: qat - check if PF is running") Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit b66accaab3791e15ac99c92f236d0d3a6d5bd64e Author: Tong Zhang Date: Thu Mar 18 23:39:59 2021 -0400 crypto: qat - don't release uninitialized resources adf_vf_isr_resource_alloc() is not unwinding correctly when error happens and it want to release uninitialized resources. To fix this, only release initialized resources. [ 1.792845] Trying to free already-free IRQ 11 [ 1.793091] WARNING: CPU: 0 PID: 182 at kernel/irq/manage.c:1821 free_irq+0x202/0x380 [ 1.801340] Call Trace: [ 1.801477] adf_vf_isr_resource_free+0x32/0xb0 [intel_qat] [ 1.801785] adf_vf_isr_resource_alloc+0x14d/0x150 [intel_qat] [ 1.802105] adf_dev_init+0xba/0x140 [intel_qat] Signed-off-by: Tong Zhang Reviewed-by: Andy Shevchenko Fixes: dd0f368398ea ("crypto: qat - Add qat dh895xcc VF driver") Acked-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 5b0ef7990e299fccc2003f019e9a26ade32b3269 Author: Lee Jones Date: Thu Mar 18 12:44:22 2021 +0000 crypto: nitrox - Demote non-compliant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/crypto/cavium/nitrox/nitrox_isr.c:17: warning: expecting prototype for One vector for each type of ring(). Prototype was for NR_RING_VECTORS() instead drivers/crypto/cavium/nitrox/nitrox_isr.c:224: warning: Function parameter or member 'irq' not described in 'nps_core_int_isr' drivers/crypto/cavium/nitrox/nitrox_isr.c:224: warning: Function parameter or member 'data' not described in 'nps_core_int_isr' Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit d007bac1fbd6e36ad7019f30805ccee897327fd1 Author: Lee Jones Date: Thu Mar 18 12:44:21 2021 +0000 crypto: nx - Repair some kernel-doc problems Fixes the following W=1 kernel build warning(s): drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'tfm' not described in 'cbc_aes_nx_set_key' drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'in_key' not described in 'cbc_aes_nx_set_key' drivers/crypto/nx/nx-aes-cbc.c:24: warning: Function parameter or member 'key_len' not described in 'cbc_aes_nx_set_key' drivers/crypto/nx/nx-aes-cbc.c:24: warning: expecting prototype for Nest Accelerators driver(). Prototype was for cbc_aes_nx_set_key() instead drivers/crypto/nx/nx_debugfs.c:34: warning: Function parameter or member 'drv' not described in 'nx_debugfs_init' drivers/crypto/nx/nx_debugfs.c:34: warning: expecting prototype for Nest Accelerators driver(). Prototype was for nx_debugfs_init() instead drivers/crypto/nx/nx.c:31: warning: Incorrect use of kernel-doc format: * nx_hcall_sync - make an H_COP_OP hcall for the passed in op structure drivers/crypto/nx/nx.c:43: warning: Function parameter or member 'nx_ctx' not described in 'nx_hcall_sync' drivers/crypto/nx/nx.c:43: warning: Function parameter or member 'op' not described in 'nx_hcall_sync' drivers/crypto/nx/nx.c:43: warning: Function parameter or member 'may_sleep' not described in 'nx_hcall_sync' drivers/crypto/nx/nx.c:43: warning: expecting prototype for Nest Accelerators driver(). Prototype was for nx_hcall_sync() instead drivers/crypto/nx/nx.c:209: warning: Function parameter or member 'nbytes' not described in 'trim_sg_list' Cc: "Breno Leitão" Cc: Nayna Jain Cc: Paulo Flabiano Smorigo Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Herbert Xu Cc: "David S. Miller" Cc: Kent Yoder Cc: linux-crypto@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit 32c2e6dd7c6080568a614c7e285571ff6abb1d97 Author: Lee Jones Date: Thu Mar 18 12:44:20 2021 +0000 crypto: vmx - Source headers are not good kernel-doc candidates Fixes the following W=1 kernel build warning(s): drivers/crypto/vmx/vmx.c:23: warning: expecting prototype for Routines supporting VMX instructions on the Power 8(). Prototype was for p8_init() instead Cc: "Breno Leitão" Cc: Nayna Jain Cc: Paulo Flabiano Smorigo Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Herbert Xu Cc: "David S. Miller" Cc: Henrique Cerri Cc: linux-crypto@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit 0beb2b6046ce487e33438526e87ff92910ad67b3 Author: Lee Jones Date: Thu Mar 18 12:44:19 2021 +0000 crypto: caam - Provide the name of the function and provide missing descriptions Fixes the following W=1 kernel build warning(s): drivers/crypto/caam/caampkc.c:199: warning: expecting prototype for from a given scatterlist(). Prototype was for caam_rsa_count_leading_zeros() instead drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 'xts_key_fallback' not described in 'caam_ctx' drivers/crypto/caam/caamalg_qi2.c:87: warning: Function parameter or member 'fallback' not described in 'caam_ctx' Cc: "Horia Geantă" Cc: Aymen Sghaier Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu commit 71057841feaa6c1b5a80959013e588b2cdf9aef1 Author: Lee Jones Date: Thu Mar 18 12:44:18 2021 +0000 crypto: atmel-ecc - Struct headers need to start with keyword 'struct' Fixes the following W=1 kernel build warning(s): drivers/crypto/atmel-ecc.c:41: warning: cannot understand function prototype: 'struct atmel_ecdh_ctx ' Cc: Tudor Ambarus Cc: Herbert Xu Cc: "David S. Miller" Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: linux-crypto@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Reviewed-by: Tudor Ambarus Signed-off-by: Herbert Xu commit e2dcca6a27073862658f1caf3174b570fc7e92c3 Author: Lee Jones Date: Thu Mar 18 12:44:17 2021 +0000 crypto: keembay - Fix incorrectly named functions/structs Fixes the following W=1 kernel build warning(s): drivers/crypto/keembay/ocs-hcu.c:107: warning: expecting prototype for struct ocs_hcu_dma_list. Prototype was for struct ocs_hcu_dma_entry instead drivers/crypto/keembay/ocs-hcu.c:127: warning: expecting prototype for struct ocs_dma_list. Prototype was for struct ocs_hcu_dma_list instead drivers/crypto/keembay/ocs-hcu.c:610: warning: expecting prototype for ocs_hcu_digest(). Prototype was for ocs_hcu_hash_update() instead drivers/crypto/keembay/ocs-hcu.c:648: warning: expecting prototype for ocs_hcu_hash_final(). Prototype was for ocs_hcu_hash_finup() instead Cc: Daniele Alessandrelli Cc: Declan Murphy Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Daniele Alessandrelli Signed-off-by: Herbert Xu commit 0368853ede1d65a7d393345714edcf14ec66e5e0 Author: Lee Jones Date: Thu Mar 18 12:44:16 2021 +0000 crypto: ux500/hash - Fix worthy kernel-doc headers and remove others The ones remove here not only fail to conform to kernel-doc, but also provide no value, so let's remove them completely in this case. Fixes the following W=1 kernel build warning(s): drivers/crypto/ux500/hash/hash_core.c:368: warning: Function parameter or member 'ctx' not described in 'hash_get_device_data' drivers/crypto/ux500/hash/hash_core.c:368: warning: Excess function parameter 'hash_ctx' description in 'hash_get_device_data' drivers/crypto/ux500/hash/hash_core.c:551: warning: expecting prototype for hash_init(). Prototype was for ux500_hash_init() instead drivers/crypto/ux500/hash/hash_core.c:592: warning: Function parameter or member 'length' not described in 'hash_processblock' drivers/crypto/ux500/hash/hash_core.c:1302: warning: expecting prototype for hash_update(). Prototype was for ahash_update() instead drivers/crypto/ux500/hash/hash_core.c:1322: warning: expecting prototype for hash_final(). Prototype was for ahash_final() instead drivers/crypto/ux500/hash/hash_core.c:1622: warning: Function parameter or member 'device_data' not described in 'ahash_algs_register_all' drivers/crypto/ux500/hash/hash_core.c:1622: warning: expecting prototype for hash_algs_register_all(). Prototype was for ahash_algs_register_all() instead drivers/crypto/ux500/hash/hash_core.c:1647: warning: Function parameter or member 'device_data' not described in 'ahash_algs_unregister_all' drivers/crypto/ux500/hash/hash_core.c:1647: warning: expecting prototype for hash_algs_unregister_all(). Prototype was for ahash_algs_unregister_all() instead drivers/crypto/ux500/cryp/cryp.c:19: warning: Incorrect use of kernel-doc format: * cryp_wait_until_done - wait until the device logic is not busy drivers/crypto/ux500/cryp/cryp.c:22: warning: Function parameter or member 'device_data' not described in 'cryp_wait_until_done' drivers/crypto/ux500/cryp/cryp.c:22: warning: expecting prototype for ST(). Prototype was for cryp_wait_until_done() instead drivers/crypto/ux500/cryp/cryp.c:292: warning: Function parameter or member 'cryp_mode' not described in 'cryp_save_device_context' drivers/crypto/ux500/cryp/cryp_irq.c:21: warning: Function parameter or member 'device_data' not described in 'cryp_enable_irq_src' drivers/crypto/ux500/cryp/cryp_irq.c:21: warning: Function parameter or member 'irq_src' not described in 'cryp_enable_irq_src' drivers/crypto/ux500/cryp/cryp_irq.c:21: warning: expecting prototype for ST(). Prototype was for cryp_enable_irq_src() instead drivers/crypto/ux500/cryp/cryp_core.c:42: warning: expecting prototype for ST(). Prototype was for CRYP_MAX_KEY_SIZE() instead drivers/crypto/ux500/cryp/cryp_core.c:91: warning: Function parameter or member 'key' not described in 'cryp_ctx' drivers/crypto/ux500/cryp/cryp_core.c:91: warning: Function parameter or member 'session_id' not described in 'cryp_ctx' Cc: Herbert Xu Cc: "David S. Miller" Cc: Shujuan Chen Cc: Joakim Bech Cc: Berne Hebark Cc: Niklas Hernaeus Cc: Jonas Linde Cc: Andreas Westin Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit 29e5b87804e15a47514f94792dad60468dfa9115 Author: Lee Jones Date: Thu Mar 18 12:44:15 2021 +0000 crypto: chelsio - Fix some kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/crypto/chelsio/chcr_core.c:2: warning: wrong kernel-doc identifier on line: drivers/crypto/chelsio/chcr_algo.c:806: warning: Function parameter or member 'wrparam' not described in 'create_cipher_wr' drivers/crypto/chelsio/chcr_algo.c:806: warning: Excess function parameter 'req' description in 'create_cipher_wr' drivers/crypto/chelsio/chcr_algo.c:806: warning: Excess function parameter 'ctx' description in 'create_cipher_wr' drivers/crypto/chelsio/chcr_algo.c:806: warning: Excess function parameter 'qid' description in 'create_cipher_wr' drivers/crypto/chelsio/chcr_algo.c:806: warning: Excess function parameter 'op_type' description in 'create_cipher_wr' drivers/crypto/chelsio/chcr_algo.c:1566: warning: Function parameter or member 'req' not described in 'create_hash_wr' drivers/crypto/chelsio/chcr_algo.c:1566: warning: Function parameter or member 'param' not described in 'create_hash_wr' Cc: Ayush Sawal Cc: Vinay Kumar Yadav Cc: Rohit Maheshwari Cc: Herbert Xu Cc: "David S. Miller" Cc: Manoj Malviya Cc: Atul Gupta Cc: Jitendra Lulla Cc: M R Gowda Cc: Harsh Jain Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit 85a557cbec712da98eecc01d6c54af0b857aaf33 Author: Lee Jones Date: Thu Mar 18 12:44:14 2021 +0000 crypto: bcm - Fix a whole host of kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/crypto/bcm/util.c:136: warning: Function parameter or member 'from_nents' not described in 'spu_msg_sg_add' drivers/crypto/bcm/util.c:136: warning: Function parameter or member 'length' not described in 'spu_msg_sg_add' drivers/crypto/bcm/spu.c:464: warning: Excess function parameter 'Return' description in 'spum_gcm_ccm_pad_len' drivers/crypto/bcm/spu.c:524: warning: Function parameter or member 'iv_len' not described in 'spum_aead_ivlen' drivers/crypto/bcm/spu.c:524: warning: expecting prototype for spu_aead_ivlen(). Prototype was for spum_aead_ivlen() instead drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'alg_digest_size' not described in 'spum_digest_size' drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'alg' not described in 'spum_digest_size' drivers/crypto/bcm/spu.c:556: warning: Function parameter or member 'htype' not described in 'spum_digest_size' drivers/crypto/bcm/spu.c:583: warning: bad line: drivers/crypto/bcm/spu.c:927: warning: Function parameter or member 'is_inbound' not described in 'spum_cipher_req_finish' drivers/crypto/bcm/spu.c:927: warning: Excess function parameter 'isInbound' description in 'spum_cipher_req_finish' drivers/crypto/bcm/spu2.c:557: warning: Function parameter or member 'fmd' not described in 'spu2_fmd_init' drivers/crypto/bcm/spu2.c:557: warning: Function parameter or member 'spu2_type' not described in 'spu2_fmd_init' drivers/crypto/bcm/spu2.c:557: warning: Excess function parameter 'spu2_cipher_type' description in 'spu2_fmd_init' drivers/crypto/bcm/spu2.c:615: warning: Function parameter or member 'auth_first' not described in 'spu2_fmd_ctrl0_write' drivers/crypto/bcm/spu2.c:615: warning: Excess function parameter 'authFirst' description in 'spu2_fmd_ctrl0_write' drivers/crypto/bcm/spu2.c:666: warning: Function parameter or member 'is_inbound' not described in 'spu2_fmd_ctrl1_write' drivers/crypto/bcm/spu2.c:803: warning: expecting prototype for spu_payload_length(). Prototype was for spu2_payload_length() instead drivers/crypto/bcm/spu2.c:825: warning: Function parameter or member 'is_hash' not described in 'spu2_response_hdr_len' drivers/crypto/bcm/spu2.c:825: warning: expecting prototype for spu_response_hdr_len(). Prototype was for spu2_response_hdr_len() instead drivers/crypto/bcm/spu2.c:843: warning: expecting prototype for spu_hash_pad_len(). Prototype was for spu2_hash_pad_len() instead drivers/crypto/bcm/spu2.c:855: warning: Function parameter or member 'cipher_mode' not described in 'spu2_gcm_ccm_pad_len' drivers/crypto/bcm/spu2.c:855: warning: Function parameter or member 'data_size' not described in 'spu2_gcm_ccm_pad_len' drivers/crypto/bcm/spu2.c:855: warning: expecting prototype for spu2_gcm_ccm_padlen(). Prototype was for spu2_gcm_ccm_pad_len() instead drivers/crypto/bcm/spu2.c:872: warning: expecting prototype for spu_assoc_resp_len(). Prototype was for spu2_assoc_resp_len() instead drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'alg_digest_size' not described in 'spu2_digest_size' drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'alg' not described in 'spu2_digest_size' drivers/crypto/bcm/spu2.c:919: warning: Function parameter or member 'htype' not described in 'spu2_digest_size' drivers/crypto/bcm/spu2.c:945: warning: expecting prototype for spu_create_request(). Prototype was for spu2_create_request() instead drivers/crypto/bcm/spu2.c:1122: warning: expecting prototype for spu_cipher_req_init(). Prototype was for spu2_cipher_req_init() instead drivers/crypto/bcm/spu2.c:1182: warning: Function parameter or member 'is_inbound' not described in 'spu2_cipher_req_finish' drivers/crypto/bcm/spu2.c:1182: warning: expecting prototype for spu_cipher_req_finish(). Prototype was for spu2_cipher_req_finish() instead drivers/crypto/bcm/spu2.c:1243: warning: expecting prototype for spu_request_pad(). Prototype was for spu2_request_pad() instead drivers/crypto/bcm/spu2.c:1321: warning: expecting prototype for spu_status_process(). Prototype was for spu2_status_process() instead drivers/crypto/bcm/cipher.c:1048: warning: Function parameter or member 'req' not described in 'spu_aead_rx_sg_create' drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'cipher' not described in 'rfc4543_gcm_esp_setkey' drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'key' not described in 'rfc4543_gcm_esp_setkey' drivers/crypto/bcm/cipher.c:2966: warning: Function parameter or member 'keylen' not described in 'rfc4543_gcm_esp_setkey' Cc: Herbert Xu Cc: "David S. Miller" Cc: Rob Rice Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit 45394566b0428e518b59b99745593625d924116d Author: Lee Jones Date: Thu Mar 18 12:44:13 2021 +0000 crypto: hisilicon/sec - Supply missing description for 'sec_queue_empty()'s 'queue' param Fixes the following W=1 kernel build warning(s): drivers/crypto/hisilicon/sec/sec_drv.c:843: warning: Function parameter or member 'queue' not described in 'sec_queue_empty' Cc: Herbert Xu Cc: "David S. Miller" Cc: Zaibo Xu Cc: Jonathan Cameron Cc: linux-crypto@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Herbert Xu commit 27fb85783f0dcf40a7fd67a5ff37f01537aa577f Author: Bhaskar Chowdhury Date: Wed Mar 17 14:44:45 2021 +0530 crypto: inside-secure - Minor typo fix in the file safexcel.c s/procesing/processing/ Signed-off-by: Bhaskar Chowdhury Acked-by: Antoine Tenart Acked-by: Randy Dunlap Signed-off-by: Herbert Xu commit 36c25011c27e065e2a7067f4b31878d57695e161 Author: Milan Djurovic Date: Tue Mar 16 18:44:03 2021 -0700 crypto: jitterentropy - Put constants on the right side of the expression This patch fixes the following checkpatch.pl warnings: crypto/jitterentropy.c:600: WARNING: Comparisons should place the constant on the right side of the test crypto/jitterentropy.c:681: WARNING: Comparisons should place the constant on the right side of the test crypto/jitterentropy.c:772: WARNING: Comparisons should place the constant on the right side of the test crypto/jitterentropy.c:829: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Milan Djurovic Reviewed-by: Stephan Mueller Signed-off-by: Herbert Xu commit 91253022821def2a986f6d14762cbacde625b73c Author: Zihao Tang Date: Tue Mar 16 20:34:12 2021 +0800 hwrng: core - convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/char/hw_random/core.c:399:8-16: WARNING: use scnprintf or sprintf. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Signed-off-by: Herbert Xu commit 884b93c510250269fbf73d8333eb69f214c42c0b Author: Xiang Chen Date: Tue Mar 16 09:55:26 2021 +0800 crypto: allwinner - Fix the parameter of dma_unmap_sg() For function dma_unmap_sg(), the parameter should be number of elements in the scatterlist prior to the mapping, not after the mapping. So fix this usage. Signed-off-by: Xiang Chen Acked-by: Corentin LABBE Tested-by: Corentin LABBE Signed-off-by: Herbert Xu commit ade18fb4dfae66b93dfdcae93d6df8e59e569c83 Author: Xiang Chen Date: Tue Mar 16 09:55:25 2021 +0800 crypto: ux500 - Fix the parameter of dma_unmap_sg() For function dma_unmap_sg(), the parameter should be number of elements in the scatterlist prior to the mapping, not after the mapping. So fix this usage. Signed-off-by: Xiang Chen Signed-off-by: Herbert Xu commit c114ecd3a1a3d1e766d0e82ce7a930dfd0d2bce5 Author: Xiang Chen Date: Tue Mar 16 09:55:24 2021 +0800 crypto: cavium - Fix the parameter of dma_unmap_sg() For function dma_unmap_sg(), the parameter should be number of elements in the scatterlist prior to the mapping, not after the mapping. So fix this usage. Signed-off-by: Xiang Chen Signed-off-by: Herbert Xu commit 5595d0dc1d33b36843166644bb33d94c0e34942e Author: Xiang Chen Date: Tue Mar 16 09:55:23 2021 +0800 crypto: amlogic - Fix the parameter of dma_unmap_sg() For function dma_unmap_sg(), the parameter should be number of elements in the scatterlist prior to the mapping, not after the mapping. So fix this usage. Signed-off-by: Xiang Chen Signed-off-by: Herbert Xu commit 00aa6e65aa04e500a11a2c91e92a11c37b9e234d Author: Rijo Thomas Date: Mon Mar 15 13:55:29 2021 +0530 crypto: ccp - fix command queuing to TEE ring buffer Multiple threads or clients can submit a command to the TEE ring buffer. This patch helps to synchronize command submission to the ring. One thread shall write a command to a TEE ring buffer entry only if: - Trusted OS has notified that the TEE command for the given entry has been processed and driver has copied the TEE response into client buffer. - The command entry is empty and can be written into. After a command has been written to the TEE ring buffer, the global wptr (mutex protected) shall be incremented for use by next client. If PSP became unresponsive while processing TEE request from a client, then further command submission to queue will be disabled. Fixes: 33960acccfbd (crypto: ccp - add TEE support for Raven Ridge) Reviewed-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu commit 4a5eed1734933bcab8f70b60cc0912867d15423d Author: Rijo Thomas Date: Mon Mar 15 13:55:28 2021 +0530 crypto: ccp - reduce tee command status polling interval from 5ms to 1ms The PSP TEE device driver polls the command status variable every 5ms to check for command completion. Reduce this time to 1ms so that there is an improvement in driver response time to clients which submit TEE commands. Reviewed-by: Devaraj Rangasamy Signed-off-by: Rijo Thomas Signed-off-by: Herbert Xu commit e656459b575068c2bbd27f9cd21da78d344b777e Author: Tian Tao Date: Mon Mar 15 14:12:04 2021 +0800 hwrng: intel - Fix included header from 'asm This commit fixes the checkpatch warning: WARNING: Use #include instead of 34: FILE: drivers/char/hw_random/intel-rng.c:34: Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit 3877869d13a043a2dbab0d034e5eac3b21f4994d Merge: befb1ddaece17 2a8e615436de4 Author: Herbert Xu Date: Fri Mar 26 19:55:55 2021 +1100 Merge branch 'ecc' This pulls in the NIST P384/256/192 x509 changes. commit 2a8e615436de4cd59a7b0af43590ede899906bdf Author: Saulo Alessandre Date: Tue Mar 16 17:07:39 2021 -0400 x509: Add OID for NIST P384 and extend parser for it Prepare the x509 parser to accept NIST P384 certificates and add the OID for ansip384r1, which is the identifier for NIST P384. Summary of changes: * crypto/asymmetric_keys/x509_cert_parser.c - prepare x509 parser to load NIST P384 * include/linux/oid_registry.h - add OID_ansip384r1 Signed-off-by: Saulo Alessandre Tested-by: Stefan Berger Signed-off-by: Herbert Xu commit 947d70597236dd5ae65c1f68c8eabfb962ee5a6b Author: Stefan Berger Date: Tue Mar 16 17:07:38 2021 -0400 ima: Support EC keys for signature verification Add support for IMA signature verification for EC keys. Since SHA type of hashes can be used by RSA and ECDSA signature schemes we need to look at the key and derive from the key which signature scheme to use. Since this can be applied to all types of keys, we change the selection of the encoding type to be driven by the key's signature scheme rather than by the hash type. Cc: Dmitry Kasatkin Cc: linux-integrity@vger.kernel.org Cc: David Howells Cc: keyrings@vger.kernel.org Signed-off-by: Stefan Berger Reviewed-by: Vitaly Chikunov Reviewed-by: Tianjia Zhang Acked-by: Mimi Zohar Signed-off-by: Herbert Xu commit 299f561a66939debba70e6d7c67aa01ed32613d9 Author: Stefan Berger Date: Tue Mar 16 17:07:37 2021 -0400 x509: Add support for parsing x509 certs with ECDSA keys Add support for parsing of x509 certificates that contain ECDSA keys, such as NIST P256, that have been signed by a CA using any of the current SHA hash algorithms. Cc: David Howells Cc: keyrings@vger.kernel.org Signed-off-by: Stefan Berger Signed-off-by: Herbert Xu commit d1a303e8616c5ba1260722bb9068bbc0d1704847 Author: Stefan Berger Date: Tue Mar 16 17:07:36 2021 -0400 x509: Detect sm2 keys by their parameters OID Detect whether a key is an sm2 type of key by its OID in the parameters array rather than assuming that everything under OID_id_ecPublicKey is sm2, which is not the case. Cc: David Howells Cc: keyrings@vger.kernel.org Signed-off-by: Stefan Berger Reviewed-by: Tianjia Zhang Tested-by: Tianjia Zhang Signed-off-by: Herbert Xu commit c12d448ba939cafc5fe04ae93bc3f4c27b5d213c Author: Saulo Alessandre Date: Tue Mar 16 17:07:35 2021 -0400 crypto: ecdsa - Register NIST P384 and extend test suite Register NIST P384 as an akcipher and extend the testmgr with NIST P384-specific test vectors. Summary of changes: * crypto/ecdsa.c - add ecdsa_nist_p384_init_tfm - register and unregister P384 tfm * crypto/testmgr.c - add test vector for P384 on vector of tests * crypto/testmgr.h - add test vector params for P384(sha1, sha224, sha256, sha384 and sha512) Signed-off-by: Saulo Alessandre Tested-by: Stefan Berger Acked-by: Jarkko Sakkinen Signed-off-by: Herbert Xu commit 149ca1611d92411b812756475cf471a081dcadad Author: Saulo Alessandre Date: Tue Mar 16 17:07:34 2021 -0400 crypto: ecc - Add math to support fast NIST P384 Add the math needed for NIST P384 and adapt certain functions' parameters so that the ecc_curve is passed to vli_mmod_fast. This allows to identify the curve by its name prefix and the appropriate function for fast mmod calculation can be used. Summary of changes: * crypto/ecc.c - add vli_mmod_fast_384 - change some routines to pass ecc_curve forward until vli_mmod_fast * crypto/ecc.h - add ECC_CURVE_NIST_P384_DIGITS - change ECC_MAX_DIGITS to P384 size Signed-off-by: Saulo Alessandre Tested-by: Stefan Berger Signed-off-by: Herbert Xu commit 703c748d5f2c4f6d2b494405130d61b8275189cf Author: Saulo Alessandre Date: Tue Mar 16 17:07:33 2021 -0400 crypto: ecc - Add NIST P384 curve parameters Add the parameters for the NIST P384 curve and define a new curve ID for it. Make the curve available in ecc_get_curve. Summary of changes: * crypto/ecc_curve_defs.h - add nist_p384 params * include/crypto/ecdh.h - add ECC_CURVE_NIST_P384 * crypto/ecc.c - change ecc_get_curve to accept nist_p384 Signed-off-by: Saulo Alessandre Tested-by: Stefan Berger Acked-by: Jarkko Sakkinen Signed-off-by: Herbert Xu commit 4e6602916bc692ee31ac5b8bd8195fb078556844 Author: Stefan Berger Date: Tue Mar 16 17:07:32 2021 -0400 crypto: ecdsa - Add support for ECDSA signature verification Add support for parsing the parameters of a NIST P256 or NIST P192 key. Enable signature verification using these keys. The new module is enabled with CONFIG_ECDSA: Elliptic Curve Digital Signature Algorithm (NIST P192, P256 etc.) is A NIST cryptographic standard algorithm. Only signature verification is implemented. Cc: Herbert Xu Cc: "David S. Miller" Cc: linux-crypto@vger.kernel.org Signed-off-by: Stefan Berger Signed-off-by: Herbert Xu commit 7547738d28dd572d40e0e1c1f854c80e3cb41bec Author: Stefan Berger Date: Tue Mar 16 17:07:31 2021 -0400 oid_registry: Add OIDs for ECDSA with SHA224/256/384/512 Add OIDs for ECDSA with SHA224/256/384/512. Signed-off-by: Stefan Berger Acked-by: Jarkko Sakkinen Signed-off-by: Herbert Xu commit d9dfac5419d08e5f0048b53effd5b64de5801882 Author: ChiYuan Huang Date: Fri Mar 26 14:13:08 2021 +0800 leds: rt4505: Add support for Richtek RT4505 flash LED controller Add support for RT4505 flash LED controller. It can support up to 1.5A flash current with hardware timeout and low input voltage protection. Signed-off-by: ChiYuan Huang Acked-by: Jacek Anaszewski Signed-off-by: Pavel Machek commit c889136004eb3dc9c7e29f599d068273e5950669 Author: ChiYuan Huang Date: Fri Mar 26 14:13:07 2021 +0800 leds: rt4505: Add DT binding document for Richtek RT4505 Add DT binding document for Richtek RT4505 flash LED controller. Signed-off-by: ChiYuan Huang Reviewed-by: Rob Herring Signed-off-by: Pavel Machek commit e1a5e6a8c48bf99ea374fb3e535661cfe226bca4 Author: Daniel Vetter Date: Thu Mar 25 23:58:59 2021 +0100 drm/doc: Add RFC section Motivated by the pre-review process for i915 gem/gt features, but probably useful in general for complex stuff. v2: Add reminder to not forget userspace projects in the discussion (Simon, Jason) v3: Actually put this into a folder, so we have it all (.rst files and headers for kerneldoc) contained somewhere separate (Jason) Cc: Simon Ser Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Jason Ekstrand Cc: Dave Airlie Acked-by: Jason Ekstrand Acked-by: Simon Ser Acked-by: Rodrigo Vivi Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210325225859.1684116-1-daniel.vetter@ffwll.ch commit 6ab61ad5c1d8253f42fccb701fd8dc1279879ee6 Author: Daniel Vetter Date: Wed Mar 24 22:10:40 2021 +0100 drm/i915: add gem/gt TODO We've discussed a bit how to get the gem/gt team better integrated and collaborate more with the wider community and agreed to the following: - all gem/gt patches are reviewed on dri-devel for now. That's overkill, but in the past there was definitely too little of that. - i915-gem folks are encouraged to cross review core patches from other teams - big features (especially uapi changes) need to be discussed in an rfc patch that documents the interface and big picture design, before we get lost in the details of the code - Also a rough TODO (can be refined as we go ofc) to get gem/gt back on track, like we've e.g. done with DAL/DC to get that in shape. v2: - add dma_fence annotations (Dave) - tasklet helpers (Jani on irc) There was also a discussion about moving these into gitlab issues, or gitlab issues as additional discussion place at least. For now it's just the TODO file Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Jason Ekstrand Cc: Dave Airlie Acked-by: Dave Airlie Acked-by: Rodrigo Vivi Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324211041.1354941-1-daniel.vetter@ffwll.ch commit 583770e84a44c4e4ea206546ea07cc534fcd6d58 Author: Bhaskar Chowdhury Date: Fri Mar 26 12:12:11 2021 +0530 ALSA: pcm: Fix couple of typos s/unconditonally/unconditionally/ s/succesful/successful/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210326064211.6509-1-unixbhaskar@gmail.com Signed-off-by: Takashi Iwai commit 44609fc01f280d6b4067262ecbb00e3128d718ae Author: Kai-Heng Feng Date: Fri Mar 26 00:59:13 2021 +0800 ALSA: usb-audio: Check connector value on resume Rear Mic on Lenovo P620 cannot record after S3, despite that there's no error and the other two functions of the USB audio, Line In and Line Out, work just fine. The mic starts to work again after running userspace app like "alsactl store". Following the lead, the evidence shows that as soon as connector status is queried, the mic can work again. So also check connector value on resume to "wake up" the USB audio to make it functional. This can be device specific, however I think this generic approach may benefit more than one device. Now the resume callback checks connector, and a new callback, reset_resume, to also restore switches and volumes. Suggested-by: Takashi Iwai Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20210325165918.22593-2-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 69644fca2716699cc6896aff51d37b1e886c94d2 Author: Kai-Heng Feng Date: Fri Mar 26 00:59:12 2021 +0800 ALSA: usb-audio: Carve out connector value checking into a helper This is preparation for next patch, no functional change intended. Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20210325165918.22593-1-kai.heng.feng@canonical.com Signed-off-by: Takashi Iwai commit 309f81e81d07186ddb26c52232d31842f64c996d Author: Wan Jiabing Date: Thu Mar 25 19:10:24 2021 +0800 drm/omap: Remove duplicate declaration struct dss_device has been declared. Remove the duplicate. And sort these forward declarations alphabetically. Signed-off-by: Wan Jiabing Reviewed-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20210325111028.864628-1-wanjiabing@vivo.com commit 0cafc8d88e6df446751669ec15adc9b807af4501 Author: Yang Li Date: Tue Mar 23 17:34:53 2021 +0800 drm/omap: dsi: Add missing IRQF_ONESHOT fixed the following coccicheck: ./drivers/gpu/drm/omapdrm/dss/dsi.c:4329:7-27: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Sebastian Reichel Fixes: 4c1b935fea54 ("drm/omap: dsi: move TE GPIO handling into core") Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/1616492093-68237-1-git-send-email-yang.lee@linux.alibaba.com commit 417fc6123b4a60c60b770e756cc3e001d764e480 Author: Arnd Bergmann Date: Mon Mar 22 17:41:57 2021 +0100 drm/omap: fix misleading indentation in pixinc() An old patch added a 'return' statement after each BUG() in this driver, which was necessary at the time, but has become redundant after the BUG() definition was updated to handle this properly. gcc-11 now warns about one such instance, where the 'return' statement was incorrectly indented: drivers/gpu/drm/omapdrm/dss/dispc.c: In function ‘pixinc’: drivers/gpu/drm/omapdrm/dss/dispc.c:2093:9: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation] 2093 | else | ^~~~ drivers/gpu/drm/omapdrm/dss/dispc.c:2095:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’ 2095 | return 0; | ^~~~~~ Address this by removing the return again and changing the BUG() to be unconditional to make this more intuitive. Fixes: c6eee968d40d ("OMAPDSS: remove compiler warnings when CONFIG_BUG=n") Signed-off-by: Arnd Bergmann Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20210322164203.827324-1-arnd@kernel.org commit b0c407ec503b8e97bbffd65cc4bed39e008c192f Author: Lu Wei Date: Wed Mar 24 16:31:47 2021 +0800 bpf: Remove unused headers The header is useless in sampleip_kern.c and trace_event_kern.c, remove it. Signed-off-by: Lu Wei Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210324083147.149278-1-luwei32@huawei.com commit 31a91220a27d49b138af3b67d9252494ef810a18 Author: Colin Ian King Date: Mon Mar 15 12:30:04 2021 +0000 net/mlx5: Fix spelling mistakes in mlx5_core_info message There are two spelling mistakes in a mlx5_core_info message. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Saeed Mahameed commit e569cbd729245972cf9ef8469c3cb502892e5724 Author: Aya Levin Date: Sun Jan 17 15:25:27 2021 +0200 net/mlx5e: Cleanup PTP Reduce scope of mlx5e_ptp_params, move to its c file. Remove unneeded variables from mlx5e_ptp_open and state bitmap from PTP channel. In addition, remove channel index from PTP channel since it is set to a hard coded value, use define instead. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit b0d35de441ab8cdb9f2f38976144e652cf0ee837 Author: Aya Levin Date: Sun Mar 7 15:41:27 2021 +0200 net/mlx5e: Generalize PTP implementation Following patches in the set add support for RX PTP. Rename PTP prefix from %s/port_ptp/ptp/g to include RX PTP too. In addition rename indication (used in statistics context) that PTP-SQ was opened: %s/port_ptp_opened/tx_ptp_opened/g. This will simplify adding indication that PTP-RQ was opened. Signed-off-by: Aya Levin Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 42212d997155c24a51fde5dcba9e9de166e2221f Author: Aya Levin Date: Thu Feb 25 17:46:25 2021 +0200 net/mlx5e: Generalize direct-TIRs and direct-RQTs API Add input parameter indicating the size of direct-TIRs/direct-RQTs array to be created/destroyed. This allows next patches in the patch-set to handle a single direct-TIR pointing to a direct-RQT with a single entry. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e078e8df4224d1c422081192e9a6d3db85fa1634 Author: Aya Levin Date: Mon Feb 8 20:56:02 2021 +0200 net/mlx5e: Generalize close RQ Allow different flavours of RQ to use the same close flow. Add validity checks to support different RQ types which not necessarily initialize all the RQ's functionality. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit a8dd7ac12fc3f6d37758e8c1e650600d71554a21 Author: Aya Levin Date: Mon Feb 8 18:25:56 2021 +0200 net/mlx5e: Generalize RQ activation Support RQ activation for RQs without an ICOSQ in the main flow, like existing trap-RQ and like PTP-RQ that will be introduced in the coming patches in the patchset. With this patch, remove the wrapper in traps to deactivate the trap-RQ. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 869c5f9262476aba305082c0a2365847838b2d57 Author: Aya Levin Date: Sun Mar 7 15:29:53 2021 +0200 net/mlx5e: Generalize open RQ Unify RQ creation for different RQ types. For each RQ type add a separate open helper which initializes the RQ specific values and trigger a call for generic open RQ function. Avoid passing the mlx5e_channel pointer to the generic open RQ as a container, since the RQ may reside under a different type of channel. Signed-off-by: Aya Levin Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 183532b77ddcb90002ff49713f5af08725f71b4c Author: Aya Levin Date: Wed Mar 3 12:07:01 2021 +0200 net/mlx5: Add helper to set time-stamp translator on a queue Translation method on the time-stamp is set by the capabilities. Avoid code duplication by using a helper to set ptp_cyc2time callback on a queue. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit ea886000a8acc4744bdbacd6f01e1a67b52da04f Author: Aya Levin Date: Mon Feb 8 16:00:36 2021 +0200 net/mlx5e: Allow creating mpwqe info without channel Change the signature of mlx5e_rq_alloc_mpwqe_info from receiving channel pointer to receive the NUMA node. This allows creating mpwqe_info in context of different channels types. Signed-off-by: Aya Levin Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 895649201845508895be99b82f9c2b9282019516 Author: Tariq Toukan Date: Wed Mar 10 14:46:59 2021 +0200 net/mlx5e: Restrict usage of mlx5e_priv in params logic functions Do not use generic struct mlx5e_priv as a parameter to param functions, as it is too generic. All calculations of the channel's param should be mainly based on struct mlx5_core_dev and struct mlx5e_params. Additional info can be explicitly passed. Signed-off-by: Tariq Toukan Signed-off-by: Aya Levin Reviewed-by: Maxim Mikityanskiy Signed-off-by: Saeed Mahameed commit b3a131c2a1602e0aa3fc6b0fdee519a997a9ca0e Author: Tariq Toukan Date: Sun Mar 7 15:58:20 2021 +0200 net/mlx5e: Move params logic into its dedicated file Take params logic out of en_main.c, into the dedicated params.c. Some functions are now hidden and become static. No functional change here. Signed-off-by: Tariq Toukan Reviewed-by: Maxim Mikityanskiy Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit 6debae2a9d1179e54abd9f45afe39ed196ffc225 Author: Tariq Toukan Date: Sun Mar 7 15:13:23 2021 +0200 net/mlx5e: Pass q_counter indentifier as parameter to rq_param builders Pass q_counter idintifier, instead of reading it from mlx5e_priv parameter. This is a step towards removing the mlx5e_priv parameter from all params function and logic in the next patches of the series. Signed-off-by: Tariq Toukan Reviewed-by: Aya Levin Signed-off-by: Saeed Mahameed commit 6def6e47e24f53a9b1f1666fd36c37088c066cec Author: Saeed Mahameed Date: Mon Mar 15 11:27:01 2021 -0700 net/mlx5e: alloc the correct size for indirection_rqt The cited patch allocated the wrong size for the indirection_rqt table, fix that. Fixes: 2119bda642c4 ("net/mlx5e: allocate 'indirection_rqt' buffer dynamically") CC: Arnd Bergmann Signed-off-by: Saeed Mahameed commit 155f556d64b1a48710f01305e14bb860734ed1e3 Author: Rafael David Tinoco Date: Tue Mar 23 01:09:52 2021 -0300 libbpf: Add bpf object kern_version attribute setter Unfortunately some distros don't have their kernel version defined accurately in due to different long term support reasons. It is important to have a way to override the bpf kern_version attribute during runtime: some old kernels might still check for kern_version attribute during bpf_prog_load(). Signed-off-by: Rafael David Tinoco Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210323040952.2118241-1-rafaeldtinoco@ubuntu.com commit 592485bcb56750333f13dc671c4ad69319c80bfa Author: Bhaskar Chowdhury Date: Wed Mar 17 15:38:40 2021 +0530 devicetree: bindings: clock: Minor typo fix in the file armada3700-tbg-clock.txt s/provde/provide/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210317100840.2449462-1-unixbhaskar@gmail.com Signed-off-by: Rob Herring commit 3ac3f314c325d76deefa34925e11ad52df77cdc3 Merge: cff908463d91a e9bd8cbd970be Author: Alexei Starovoitov Date: Thu Mar 25 18:51:08 2021 -0700 Merge branch 'add support for batched ops in LPM trie' Pedro Tammela says: ==================== The patch itself is straightforward thanks to the infrastructure that is already in-place. The tests follows the other '*_map_batch_ops' tests with minor tweaks. v1 -> v2: Fixes for checkpatch warnings ==================== Signed-off-by: Alexei Starovoitov commit e9bd8cbd970bedd3cca8ee334c76ab90feb78760 Author: Pedro Tammela Date: Mon Mar 22 23:50:54 2021 -0300 bpf: selftests: Add tests for batched ops in LPM trie maps Uses the already existing infrastructure for testing batched ops. The testing code is essentially the same, with minor tweaks for this use case. Suggested-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210323025058.315763-3-pctammela@gmail.com commit f56387c534cc54d2578b962692e574e3edd8c3f6 Author: Pedro Tammela Date: Mon Mar 22 23:50:53 2021 -0300 bpf: Add support for batched ops in LPM trie maps Suggested-by: Jamal Hadi Salim Signed-off-by: Pedro Tammela Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210323025058.315763-2-pctammela@gmail.com commit cff908463d91a6b2fb8c8ab6c41d9c308c29fd42 Author: KP Singh Date: Mon Mar 22 17:07:20 2021 +0000 selftests/bpf: Better error messages for ima_setup.sh failures The current implementation uses the CHECK_FAIL macro which does not provide useful error messages when the script fails. Use the CHECK macro instead and provide more descriptive messages to aid debugging. Signed-off-by: KP Singh Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210322170720.2926715-1-kpsingh@kernel.org commit b910eaaaa4b89976ef02e5d6448f3f73dc671d91 Author: Yonghong Song Date: Mon Mar 22 22:51:46 2021 -0700 bpf: Fix NULL pointer dereference in bpf_get_local_storage() helper Jiri Olsa reported a bug ([1]) in kernel where cgroup local storage pointer may be NULL in bpf_get_local_storage() helper. There are two issues uncovered by this bug: (1). kprobe or tracepoint prog incorrectly sets cgroup local storage before prog run, (2). due to change from preempt_disable to migrate_disable, preemption is possible and percpu storage might be overwritten by other tasks. This issue (1) is fixed in [2]. This patch tried to address issue (2). The following shows how things can go wrong: task 1: bpf_cgroup_storage_set() for percpu local storage preemption happens task 2: bpf_cgroup_storage_set() for percpu local storage preemption happens task 1: run bpf program task 1 will effectively use the percpu local storage setting by task 2 which will be either NULL or incorrect ones. Instead of just one common local storage per cpu, this patch fixed the issue by permitting 8 local storages per cpu and each local storage is identified by a task_struct pointer. This way, we allow at most 8 nested preemption between bpf_cgroup_storage_set() and bpf_cgroup_storage_unset(). The percpu local storage slot is released (calling bpf_cgroup_storage_unset()) by the same task after bpf program finished running. bpf_test_run() is also fixed to use the new bpf_cgroup_storage_set() interface. The patch is tested on top of [2] with reproducer in [1]. Without this patch, kernel will emit error in 2-3 minutes. With this patch, after one hour, still no error. [1] https://lore.kernel.org/bpf/CAKH8qBuXCfUz=w8L+Fj74OaUpbosO29niYwTki7e3Ag044_aww@mail.gmail.com/T [2] https://lore.kernel.org/bpf/20210309185028.3763817-1-yhs@fb.com Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Roman Gushchin Link: https://lore.kernel.org/bpf/20210323055146.3334476-1-yhs@fb.com commit 93fe86281259cffe99e84aa945d71497cb7a727f Author: Ville Syrjälä Date: Thu Mar 25 02:44:14 2021 +0200 drm/i915: Fix transposed arguments to skl_plane_wm_level() Accidentally transposed the arguments to skl_plane_wm_level() which is causing us to mistakenly think that the plane watermarks have/have not changed when the opposite may be true. Swap the arguments so this actually works. The other uses of this look OK. Cc: Stanislav Lisovskiy Fixes: 2871b2fde449 ("drm/i915: Fix TGL+ plane SAGV watermark programming") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210325004415.17432-1-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 88f2cfc5fa90326edb569b4a81bb38ed4dcd3108 Author: Chao Yu Date: Wed Mar 24 11:24:33 2021 +0800 f2fs: fix to update last i_size if fallocate partially succeeds In the case of expanding pinned file, map.m_lblk and map.m_len will update in each round of section allocation, so in error path, last i_size will be calculated with wrong m_lblk and m_len, fix it. Fixes: f5a53edcf01e ("f2fs: support aligned pinned file") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3fd9735908287cdcd7dd04912e8ba7d749313f13 Author: Chao Yu Date: Wed Mar 17 17:56:04 2021 +0800 f2fs: fix error path of f2fs_remount() In error path of f2fs_remount(), it missed to restart/stop kernel thread or enable/disable checkpoint, then mount option status may not be consistent with real condition of filesystem, so let's reorder remount flow a bit as below and do recovery correctly in error path: 1) handle gc thread 2) handle ckpt thread 3) handle flush thread 4) handle checkpoint disabling Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f3e367d4fe2bcccb51d64cb974f73153d23adf15 Author: qiulaibin Date: Tue Mar 23 19:41:30 2021 +0800 f2fs: fix wrong comment of nat_tree_lock Do trivial comment fix of nat_tree_lock. Signed-off-by: qiulaibin Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit b862676e371715456c9dade7990c8004996d0d9e Author: Chao Yu Date: Mon Mar 22 19:47:30 2021 +0800 f2fs: fix to avoid out-of-bounds memory access butt3rflyh4ck reported a bug found by syzkaller fuzzer with custom modifications in 5.12.0-rc3+ [1]: dump_stack+0xfa/0x151 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x82/0x32c mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 f2fs_test_bit fs/f2fs/f2fs.h:2572 [inline] current_nat_addr fs/f2fs/node.h:213 [inline] get_next_nat_page fs/f2fs/node.c:123 [inline] __flush_nat_entry_set fs/f2fs/node.c:2888 [inline] f2fs_flush_nat_entries+0x258e/0x2960 fs/f2fs/node.c:2991 f2fs_write_checkpoint+0x1372/0x6a70 fs/f2fs/checkpoint.c:1640 f2fs_issue_checkpoint+0x149/0x410 fs/f2fs/checkpoint.c:1807 f2fs_sync_fs+0x20f/0x420 fs/f2fs/super.c:1454 __sync_filesystem fs/sync.c:39 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x1b5/0x260 fs/sync.c:48 generic_shutdown_super+0x70/0x370 fs/super.c:448 kill_block_super+0x97/0xf0 fs/super.c:1394 The root cause is, if nat entry in checkpoint journal area is corrupted, e.g. nid of journalled nat entry exceeds max nid value, during checkpoint, once it tries to flush nat journal to NAT area, get_next_nat_page() may access out-of-bounds memory on nat_bitmap due to it uses wrong nid value as bitmap offset. [1] https://lore.kernel.org/lkml/CAFcO6XOMWdr8pObek6eN6-fs58KG9doRFadgJj-FnF-1x43s2g@mail.gmail.com/T/#u Reported-and-tested-by: butt3rflyh4ck Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3f7070b05052f997d571a51e750583b9dea726f8 Author: Chao Yu Date: Wed Mar 17 17:56:03 2021 +0800 f2fs: don't start checkpoint thread in readonly mountpoint In readonly mountpoint, there should be no write IOs include checkpoint IO, so that it's not needed to create kernel checkpoint thread. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ac2d750b2043cbe10d42ac974e07b9876cddfff8 Author: Weichao Guo Date: Wed Mar 17 17:27:23 2021 +0800 f2fs: do not use AT_SSR mode in FG_GC & high urgent BG_GC AT_SSR mode is introduced by age threshold based GC for better hot/cold data seperation and avoiding free segment cost. However, LFS write mode is preferred in the scenario of foreground or high urgent GC, which should be finished ASAP. Let's only use AT_SSR in background GC and not high urgent GC modes. Signed-off-by: Weichao Guo Signed-off-by: Huang Jianan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 5ac443e26a096429065349c640538101012ce40d Author: Daeho Jeong Date: Mon Mar 15 17:12:33 2021 +0900 f2fs: add sysfs nodes to get runtime compression stat I've added new sysfs nodes to show runtime compression stat since mount. compr_written_block - show the block count written after compression compr_saved_block - show the saved block count with compression compr_new_inode - show the count of inode newly enabled for compression Signed-off-by: Daeho Jeong Signed-off-by: Jaegeuk Kim commit 0bb2045ce5ce67b0428301c117ec960b3f705a44 Author: Chengguang Xu Date: Tue Mar 9 13:21:18 2021 +0800 f2fs: fix to use per-inode maxbytes in f2fs_fiemap F2FS inode may have different max size, so change to use per-inode maxbytes. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 794d9b25817a813f1d2fb8e133ba6d2f53920853 Author: Pablo Neira Ayuso Date: Thu Mar 25 22:10:16 2021 +0100 docs: nf_flowtable: fix compilation and warnings ... cannot be used in block quote, it breaks compilation, remove it. Fix warnings due to missing blank line such as: net-next/Documentation/networking/nf_flowtable.rst:142: WARNING: Block quote ends without a blank line; unexpected unindent. Fixes: 143490cde566 ("docs: nf_flowtable: update documentation with enhancements") Reported-by: Stephen Rothwell Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 9874b620914bbf4e69a5539b4a23bfd045961187 Merge: d54e1348d8ef1 4ecc1baf362c5 Author: David S. Miller Date: Thu Mar 25 17:39:33 2021 -0700 Merge branch 'sysctl-less-storage' Eric Dumazet says: ==================== net: use less storage for most sysctl This patch series adds a new sysctl type, to allow using u8 instead of "int" or "long int" types. Then we convert mosts sysctls found in struct netns_ipv4 to shrink it by three cache lines. ==================== Signed-off-by: David S. Miller commit 4ecc1baf362c5df2dcabe242511e38ee28486545 Author: Eric Dumazet Date: Thu Mar 25 11:08:17 2021 -0700 tcp: convert elligible sysctls to u8 Many tcp sysctls are either bools or small ints that can fit into u8. Reducing space taken by sysctls can save few cache line misses when sending/receiving data while cpu caches are empty, for example after cpu idle period. This is hard to measure with typical network performance tests, but after this patch, struct netns_ipv4 has shrunk by three cache lines. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 2932bcda070d9a02548e57119b1ada8f018c40b5 Author: Eric Dumazet Date: Thu Mar 25 11:08:16 2021 -0700 inet: convert tcp_early_demux and udp_early_demux to u8 For these sysctls, their dedicated helpers have to use proc_dou8vec_minmax(). Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 1c69dedc8fa7c9684d48dc89994b4e0aceeae588 Author: Eric Dumazet Date: Thu Mar 25 11:08:15 2021 -0700 ipv4: convert ip_forward_update_priority sysctl to u8 This sysctl uses ip_fwd_update_priority() helper, so the conversion needs to change it. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 4b6bbf17d4e1939afa72821879fc033d725e9491 Author: Eric Dumazet Date: Thu Mar 25 11:08:14 2021 -0700 ipv4: shrink netns_ipv4 with sysctl conversions These sysctls that can fit in one byte instead of one int are converted to save space and thus reduce cache line misses. - icmp_echo_ignore_all, icmp_echo_ignore_broadcasts, - icmp_ignore_bogus_error_responses, icmp_errors_use_inbound_ifaddr - tcp_ecn, tcp_ecn_fallback - ip_default_ttl, ip_no_pmtu_disc, ip_fwd_use_pmtu - ip_nonlocal_bind, ip_autobind_reuse - ip_dynaddr, ip_early_demux, raw_l3mdev_accept - nexthop_compat_mode, fwmark_reflect Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit cb9444130662c6c13022579c861098f212db2562 Author: Eric Dumazet Date: Thu Mar 25 11:08:13 2021 -0700 sysctl: add proc_dou8vec_minmax() Networking has many sysctls that could fit in one u8. This patch adds proc_dou8vec_minmax() for this purpose. Note that the .extra1 and .extra2 fields are pointing to integers, because it makes conversions easier. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit d54e1348d8ef19d5b2cd555e22ffc356f755d66e Merge: 6c996e19949b3 6ccf12ae111e4 Author: David S. Miller Date: Thu Mar 25 17:37:30 2021 -0700 Merge branch 'stmmac-multivector-msi' Voon Weifeng says: ==================== net: stmmac: enable multi-vector MSI This patchset adds support for multi MSI interrupts in addition to current single common interrupt implementation. Each MSI interrupt is tied to a newly introduce interrupt service routine(ISR). Hence, each interrupt will only go through the corresponding ISR. In order to increase the efficiency, enabling multi MSI interrupt will automatically select the interrupt mode configuration INTM=1. When INTM=1, the TX/RX transfer complete signal will only asserted on corresponding sbd_perch_tx_intr_o[] or sbd_perch_rx_intr_o[] without asserting signal on the common sbd_intr_o. Hence, for each TX/RX interrupts, only the corresponding ISR will be triggered. Every vendor might have different MSI vector assignment. So, this patchset only includes multi-vector MSI assignment for Intel platform. Changes: v1 -> v2 patch 2/5 -Remove defensive check for invalid dev pointer ==================== Signed-off-by: David S. Miller commit 6ccf12ae111e49324b439410066e8cc359aeee6d Author: Wong, Vee Khee Date: Fri Mar 26 01:39:16 2021 +0800 net: stmmac: use interrupt mode INTM=1 for multi-MSI For interrupt mode INTM=0, TX/RX transfer complete will trigger signal not only on sbd_perch_[tx|rx]_intr_o (Transmit/Receive Per Channel) but also on the sbd_intr_o (Common). As for multi-MSI implementation, setting interrupt mode INTM=1 is more efficient as each TX intr and RX intr (TI/RI) will be handled by TX/RX ISR without the need of calling the common MAC ISR. Updated the TX/RX NORMAL interrupts status checking process as the NIS status bit is not asserted for any RI/TI events for INTM=1. Signed-off-by: Wong, Vee Khee Co-developed-by: Voon Weifeng Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit b42446b9b37ba444ba12d89dd9d45c2b68768f24 Author: Ong Boon Leong Date: Fri Mar 26 01:39:15 2021 +0800 stmmac: intel: add support for multi-vector msi and msi-x Intel mgbe controller supports multi-vector interrupts: msi_rx_vec 0,2,4,6,8,10,12,14 msi_tx_vec 1,3,5,7,9,11,13,15 msi_sfty_ue_vec 26 msi_sfty_ce_vec 27 msi_lpi_vec 28 msi_mac_vec 29 During probe(), the driver will starts with request allocation for multi-vector interrupts. If it fails, then it will automatically fallback to request allocation for single interrupts. Signed-off-by: Ong Boon Leong Co-developed-by: Voon Weifeng Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit 8532f613bc78b6e0e32b486e720848d3f5569287 Author: Ong Boon Leong Date: Fri Mar 26 01:39:14 2021 +0800 net: stmmac: introduce MSI Interrupt routines for mac, safety, RX & TX Now we introduce MSI interrupt service routines and hook these routines up if stmmac_open() sees valid irq line being requested:- stmmac_mac_interrupt() :- MAC (dev->irq), WOL (wol_irq), LPI (lpi_irq) stmmac_safety_interrupt() :- Safety Feat Correctible Error (sfty_ce_irq) & Uncorrectible Error (sfty_ue_irq) stmmac_msi_intr_rx() :- For all RX MSI irq (rx_irq) stmmac_msi_intr_tx() :- For all TX MSI irq (tx_irq) Each of IRQs will have its unique name so that we can differentiate them easily under /proc/interrupts. Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit 29e6573c61aaa71010e711e6c3249c56a2e61b46 Author: Ong Boon Leong Date: Fri Mar 26 01:39:13 2021 +0800 net: stmmac: make stmmac_interrupt() function more friendly to MSI Refactor stmmac_interrupt() by introducing stmmac_common_interrupt() so that we prepare the ISR operation to be friendly to MSI later. Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit 7e1c520c0d2028e24cf86df811d41dc4205dc5d4 Author: Ong Boon Leong Date: Fri Mar 26 01:39:12 2021 +0800 net: stmmac: introduce DMA interrupt status masking per traffic direction In preparation to make stmmac support multi-vector MSI, we introduce the interrupt status masking according to RX, TX or RXTX. Default to use RXTX inside stmmac_dma_interrupt(), so there is no run-time logic difference now. Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng Signed-off-by: David S. Miller commit 6c996e19949b34d7edebed4f6b0511145c036404 Author: Dmitry Vyukov Date: Thu Mar 25 15:52:45 2021 +0100 net: change netdev_unregister_timeout_secs min value to 1 netdev_unregister_timeout_secs=0 can lead to printing the "waiting for dev to become free" message every jiffy. This is too frequent and unnecessary. Set the min value to 1 second. Also fix the merge issue introduced by "net: make unregister netdev warning timeout configurable": it changed "refcnt != 1" to "refcnt". Signed-off-by: Dmitry Vyukov Suggested-by: Eric Dumazet Fixes: 5aa3afe107d9 ("net: make unregister netdev warning timeout configurable") Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller commit b01483a81a2c18b109d79598bdf781954b2f24ce Merge: ae8f5867d5908 2ad6f03b59332 Author: David S. Miller Date: Thu Mar 25 17:22:30 2021 -0700 Merge branch 'ipa-reg-versions' Alex Elder says: ==================== net: ipa: update registers for other versions This series updates IPA and GSI register definitions to permit more versions of IPA hardware to be supported. Most of the updates are informational, updating comments to indicate which IPA versions support each register and field. But some registers are new and others are deprecated. In a few cases register fields are laid out differently, and in these cases the changes are a little more substantive. I won't claim the result is 100% correct, but it's close, and should allow all IPA versions 3.x through 4.x to be supported by the driver. ==================== Signed-off-by: David S. Miller commit 2ad6f03b59332cd875d20c52ab18bb6a927a3213 Author: Alex Elder Date: Thu Mar 25 09:44:37 2021 -0500 net: ipa: expand GSI channel types IPA v4.5 (GSI v2.5) supports a larger set of channel protocols, and adds an additional field to hold the most-significant bits of the protocol identifier on a channel. Add an inline function that encodes the protocol (including the extra bits for newer versions of IPA), and define some additional protocols. At this point we still use only GPI protocol. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 42839f9585a00b53691bc56e6a238029f1466959 Author: Alex Elder Date: Thu Mar 25 09:44:36 2021 -0500 net: ipa: update GSI ring size registers Each GSI channel has a CNTXT_1 register that encodes the size of its ring buffer. The size of the field that records that is increased starting at IPA v4.9. Replace the use of a fixed-size field mask with a new inline function that encodes that size value. Similarly, the size of GSI event rings can be larger starting with IPA v4.9, so create a function to encode that as well. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 4f57b2fa0744f2fffd61936facd258897834aad5 Author: Alex Elder Date: Thu Mar 25 09:44:35 2021 -0500 net: ipa: GSI register cleanup The main purpose of this is to extend these GSI register definitions to support additional IPA versions. This patch makes some minor updates to "gsi_reg.h": - Define a DB_IN_BYTES field in the channel QOS register - Add some comments clarifying when certain fields are valid - Add the definition of GSI_CH_DB_STOP channel command - Add a couple of blank lines - Move one comment and indent another - Delete two unused register definitions at the end. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e666aa978a55d352b76bfa1f9f19c19ef9261467 Author: Alex Elder Date: Thu Mar 25 09:44:34 2021 -0500 net: ipa: support IPA interrupt addresses for IPA v4.7 Starting with IPA v4.7, registers related to IPA interrupts are located at a fixed offset 0x1000 above than the addresses used for earlier versions. Define and use functions to provide the offset to use for these registers based on IPA version. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit cc5199ed50f2939743185fac94f1bcb47200684a Author: Alex Elder Date: Thu Mar 25 09:44:33 2021 -0500 net: ipa: update component config register IPA version 4.9 and later use a different layout of some fields found in the COMP_CFG register. Define arbitration_lock_disable_encoded(), and use it to encode a value into the ATOMIC_FETCHER_ARB_LOCK_DIS field based on the IPA version. And define full_flush_rsc_closure_en_encoded() to encode a value into the FULL_FLUSH_WAIT_RSC_CLOSE_EN field based on the IPA version. The values of these fields are neither modified nor extracted by current code, but this patch makes this possible for all supported versions. Fix a mistaken comment above ipa_hardware_config_comp() intended to describe the purpose for the register. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit b8ecdaaaf328cf2914da99217368dc847fb9e968 Author: Alex Elder Date: Thu Mar 25 09:44:32 2021 -0500 net: ipa: update IPA register comments Add and update IPA register definitions. Extend these definitions to incorporate a fairly small number of new symbols (register offsets and fields) to support IPA v3.0, v3.1, v3.5, v4.0, v4.1, v4.7, 4.9, and v4.11, and have the comments reflect when they are valid. None of the added symbols require changes elsewhere in the code. Update rsrc_grp_encoded() to support these other IPA versions. Add kerneldoc comments for the IPA IRQ numbers and sequencer type. Fix a few spots where the version check should be less restrictive (missed by an earlier patch). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit a46410d5e4975d701d526397156fa0815747dc2f Author: Andrii Nakryiko Date: Wed Mar 24 10:29:41 2021 -0700 libbpf: Constify few bpf_program getters bpf_program__get_type() and bpf_program__get_expected_attach_type() shouldn't modify given bpf_program, so mark input parameter as const struct bpf_program. This eliminates unnecessary compilation warnings or explicit casts in user programs. Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210324172941.2609884-1-andrii@kernel.org commit 5d9034938720a15fa0f62db3e195c0c473c72c1b Author: Ricardo Ribalda Date: Thu Mar 18 21:22:22 2021 +0100 bpf: Fix typo 'accesible' into 'accessible' Trivial fix. Signed-off-by: Ricardo Ribalda Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210318202223.164873-8-ribalda@chromium.org commit ae8f5867d59086670ef61e0cbeabde927d4e13a0 Author: Qiheng Lin Date: Thu Mar 25 17:31:51 2021 +0800 net: ethernet: mtk_eth_soc: remove unused variable 'count' GCC reports the following warning with W=1: drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c:80:9: warning: variable 'count' set but not used [-Wunused-but-set-variable] 80 | int i, count; | ^~~~~ This variable is not used in function , this commit remove it to fix the warning. Reported-by: Hulk Robot Signed-off-by: Qiheng Lin Signed-off-by: David S. Miller commit 96ef692841e0d7c0ce4c7160c674f57ff83f3b4c Author: Heiner Kallweit Date: Thu Mar 25 10:31:39 2021 +0100 r8169: remove rtl_hw_start_8168c_3 We can simply use rtl_hw_start_8168c_2() also for chip version 21. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit 866f1577ba69bde2b9f36c300f603596c7d84a62 Author: Qinglang Miao Date: Thu Mar 25 17:19:54 2021 +0800 net: dsa: b53: spi: add missing MODULE_DEVICE_TABLE This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 7d644b0c3a5009a1a1b998c8039933bbe8e40ed3 Merge: cbd801b3b0716 f67435b555dfd Author: David S. Miller Date: Thu Mar 25 17:07:58 2021 -0700 Merge branch 'gve-cleanups' Daode Huang says: ==================== net: gve: make cleanup for gve This patch set replace deprecated strlcpy by strscpy, remove repeat word "allowed" in gve driver. for more details, please refer to each patch. ==================== Signed-off-by: David S. Miller commit f67435b555dfde67c830047fdfa1f4b91fbeaa56 Author: Daode Huang Date: Thu Mar 25 15:56:32 2021 +0800 net: gve: remove duplicated allowed fix the WARNING of Possible repeated word: 'allowed' Signed-off-by: Daode Huang Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit c32773c96131fd5a106993efa0078fbde435b2f6 Author: Daode Huang Date: Thu Mar 25 15:56:31 2021 +0800 net: gve: convert strlcpy to strscpy Usage of strlcpy in linux kernel has been recently deprecated[1], so convert gve driver to strscpy [1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL =V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Daode Huang Reviewed-by: Catherine Sullivan Signed-off-by: David S. Miller commit cbd801b3b0716c374e050a8366bb43d71d62b6ec Author: Lu Wei Date: Thu Mar 25 14:38:25 2021 +0800 net: ipv4: Fix some typos Modify "accomodate" to "accommodate" in net/ipv4/esp4.c. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 952a67f6f6a80ea5b2dae7f433ffc3cd55f8f8b3 Author: Lu Wei Date: Thu Mar 25 14:38:24 2021 +0800 net: dsa: Fix a typo in tag_rtl4_a.c Modify "Apparantly" to "Apparently" in net/dsa/tag_rtl4_a.c.. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit e51443d54b4e6a2793c55d82fd04b79fbc8ba4d5 Author: Lu Wei Date: Thu Mar 25 14:38:23 2021 +0800 net: decnet: Fix a typo in dn_nsp_in.c Modify "erronous" to "erroneous" in net/decnet/dn_nsp_in.c. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 897b9fae7a8ac1de2372a15234c944831c83ec26 Author: Lu Wei Date: Thu Mar 25 14:38:22 2021 +0800 net: core: Fix a typo in dev_addr_lists.c Modify "funciton" to "function" in net/core/dev_addr_lists.c. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 3f9143f10c3d5055093b18fd3eaa8fc6d1b460f5 Author: Lu Wei Date: Thu Mar 25 14:38:21 2021 +0800 net: ceph: Fix a typo in osdmap.c Modify "inital" to "initial" in net/ceph/osdmap.c. Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 01dc080be6b8318c3a6d3df3486f8d919f5b89a0 Author: Wan Jiabing Date: Thu Mar 25 14:35:55 2021 +0800 drivers: net: ethernet: struct sk_buff is declared duplicately struct sk_buff has been declared. Remove the duplicate. Signed-off-by: Wan Jiabing Reviewed-by: Simon Horman Signed-off-by: David S. Miller commit 54d4e9f5c4d7b3ae639b985ea9fc470469cc17ff Author: Tvrtko Ursulin Date: Wed Mar 24 12:13:35 2021 +0000 drm/i915: Allow configuring default request expiry via modparam Module parameter is added (request_timeout_ms) to allow configuring the default request/fence expiry. Default value is inherited from CONFIG_DRM_I915_REQUEST_TIMEOUT. Signed-off-by: Tvrtko Ursulin Cc: Daniel Vetter Acked-by: Daniel Vetter Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-8-tvrtko.ursulin@linux.intel.com commit e8dbb566b338cc25f78278378dfcc21bfa8d62a0 Author: Tvrtko Ursulin Date: Wed Mar 24 12:13:34 2021 +0000 drm/i915: Fail too long user submissions by default A new Kconfig option CONFIG_DRM_I915_REQUEST_TIMEOUT is added, defaulting to 20s, and this timeout is applied to all users contexts using the previously added watchdog facility. Result of this is that any user submission will simply fail after this timeout, either causing a reset (for non-preemptable), or incomplete results. This can have an effect that workloads which used to work fine will suddenly start failing. Even workloads comprised of short batches but in long dependency chains can be terminated. And because of lack of agreement on usefulness and safety of fence error propagation this partial execution can be invisible to userspace even if it is "listening" to returned fence status. Another interaction is with hangcheck where care needs to be taken timeout is not set lower or close to three times the heartbeat interval. Otherwise a hang in any application can cause complete termination of all submissions from unrelated clients. Any users modifying the per engine heartbeat intervals therefore need to be aware of this potential denial of service to avoid inadvertently enabling it. Given all this I am personally not convinced the scheme is a good idea. Intuitively it feels object importers would be better positioned to enforce the time they are willing to wait for something to complete. v2: * Improved commit message and Kconfig text. * Pull in some helper code from patch which got dropped. v3: * Bump timeout to 20s to see if it helps Tigerlake. Signed-off-by: Tvrtko Ursulin Cc: Daniel Vetter Acked-by: Matthew Auld Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-7-tvrtko.ursulin@linux.intel.com commit ba8be0d49caf3d47038c9c8b8a9953adce3db006 Author: Zheng Yongjun Date: Thu Mar 25 11:29:32 2021 +0800 net: bcmgenet: remove unused including Remove including that don't need it. Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 9b4d0598ee940df33ea6cbbba8c80e951223131b Author: Tvrtko Ursulin Date: Wed Mar 24 12:13:33 2021 +0000 drm/i915: Request watchdog infrastructure Prepares the plumbing for setting request/fence expiration time. All code is put in place but is never activated due yet missing ability to actually configure the timer. Outline of the basic operation: A timer is started when request is ready for execution. If the request completes (retires) before the timer fires, timer is cancelled and nothing further happens. If the timer fires request is added to a lockless list and worker queued. Purpose of this is twofold: a) It allows request cancellation from a more friendly context and b) coalesces multiple expirations into a single event of consuming the list. Worker locklessly consumes the list of expired requests and cancels them all using previous added i915_request_cancel(). Associated timeout value is stored in rq->context.watchdog.timeout_us. v2: * Log expiration. v3: * Include more information about user timeline in the log message. v4: * Remove obsolete comment and fix formatting. (Matt) Signed-off-by: Tvrtko Ursulin Cc: Daniel Vetter Reviewed-by: Matthew Auld Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-6-tvrtko.ursulin@linux.intel.com commit 711550a0b97e2e4ed2f1da484cf33e9dd1a963fb Author: Zheng Yongjun Date: Thu Mar 25 11:29:28 2021 +0800 qede: remove unused including Remove including that don't need it. Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun Signed-off-by: David S. Miller commit 90a79a91dcc0e8b1986a2ad9b00cf3b281fb09f0 Author: Tvrtko Ursulin Date: Wed Mar 24 12:13:32 2021 +0000 drm/i915: Handle async cancellation in sentinel assert With the watchdog cancelling requests asynchronously to preempt-to-busy we need to relax one assert making it apply only to requests not in error. v2: * Check against the correct request! v3: * Simplify the check to avoid the question of when to sample the fence error vs sentinel bit. Signed-off-by: Tvrtko Ursulin Reviewed-by: Matthew Auld Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-5-tvrtko.ursulin@linux.intel.com commit f1dcffcc8abe3088da876d9eae481c3e31e2014d Author: Lu Wei Date: Thu Mar 25 11:01:55 2021 +0800 net: Fix a misspell in socket.c s/addres/address Reported-by: Hulk Robot Signed-off-by: Lu Wei Signed-off-by: David S. Miller commit 8f922e4227585d43ea3622be64d441b8b92ec62d Author: Tvrtko Ursulin Date: Wed Mar 24 12:13:31 2021 +0000 drm/i915: Restrict sentinel requests further Disallow sentinel requests follow previous sentinels to make request cancellation work better when faced with a chain of requests which have all been marked as in error. Because in cases where we end up with a stream of cancelled requests we want to turn off request coalescing so they each will get individually skipped by the execlists_schedule_in (which is called per ELSP port, not per request). Signed-off-by: Tvrtko Ursulin Reviewed-by: Matthew Auld [danvet: Fix typo in the commit message that Matthew spotted.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-4-tvrtko.ursulin@linux.intel.com commit a9bada338b6806c660e4fb20ab742d0d83a3ceac Author: Zheng Yongjun Date: Thu Mar 25 10:51:08 2021 +0800 net: usb: lan78xx: remove unused including Remove including that don't need it. Reported-by: Hulk Robot Signed-off-by: Zheng Yongjun Acked-by: Woojung Huh Signed-off-by: David S. Miller commit 38b237eab2bc7feac87a4c9d870368e935a0091b Author: Chris Wilson Date: Wed Mar 24 12:13:30 2021 +0000 drm/i915: Individual request cancellation Currently, we cancel outstanding requests within a context when the context is closed. We may also want to cancel individual requests using the same graceful preemption mechanism. v2 (Tvrtko): * Cancel waiters carefully considering no timeline lock and RCU. * Fixed selftests. v3 (Tvrtko): * Remove error propagation to waiters for now. v4 (Tvrtko): * Rebase for extracted i915_request_active_engine. (Matt) Signed-off-by: Chris Wilson Signed-off-by: Tvrtko Ursulin Reviewed-by: Matthew Auld [danvet: Resolve conflict because intel_engine_flush_scheduler is still called intel_engine_flush_submission] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-3-tvrtko.ursulin@linux.intel.com commit b83e214b2e04204f1fc674574362061492c37245 Author: Hoang Le Date: Thu Mar 25 08:56:41 2021 +0700 tipc: add extack messages for bearer/media failure Add extack error messages for -EINVAL errors when enabling bearer, getting/setting properties for a media/bearer Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 7dbc19da5daf45cb16f3bff900b69d44c512c333 Author: Tvrtko Ursulin Date: Wed Mar 24 12:13:29 2021 +0000 drm/i915: Extract active lookup engine to a helper Move active engine lookup to exported i915_request_active_engine. Signed-off-by: Tvrtko Ursulin Reviewed-by: Matthew Auld [danvet: Slight rebase, engine->sched.lock is still called engine->active.lock.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-2-tvrtko.ursulin@linux.intel.com commit 25dfa65f814951a33072bcbae795989d817858da Author: Anthony Iliopoulos Date: Thu Mar 25 11:47:05 2021 -0700 xfs: fix xfs_trans slab cache name Removal of kmem_zone_init wrappers accidentally changed a slab cache name from "xfs_trans" to "xf_trans". Fix this so that userspace consumers of /proc/slabinfo and /sys/kernel/slab can find it again. Fixes: b1231760e443 ("xfs: Remove slab init wrappers") Signed-off-by: Anthony Iliopoulos Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 2b92faed551173f065ee2a8cf087dc76cf40303b Author: Gao Xiang Date: Tue Mar 23 19:05:39 2021 -0700 xfs: add error injection for per-AG resv failure per-AG resv failure after fixing up freespace is hard to test in an effective way, so directly add an error injection path to observe such error handling path works as expected. Signed-off-by: Gao Xiang Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit fb2fc172018599a6564aab4ac0dce79bf94bd6bc Author: Gao Xiang Date: Tue Mar 23 19:05:39 2021 -0700 xfs: support shrinking unused space in the last AG As the first step of shrinking, this attempts to enable shrinking unused space in the last allocation group by fixing up freespace btree, agi, agf and adjusting super block and use a helper xfs_ag_shrink_space() to fixup the last AG. This can be all done in one transaction for now, so I think no additional protection is needed. Reviewed-by: Darrick J. Wong Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit 46141dc891f7d28cc5cac473ad1a54a312c021c1 Author: Gao Xiang Date: Tue Mar 23 19:05:38 2021 -0700 xfs: introduce xfs_ag_shrink_space() This patch introduces a helper to shrink unused space in the last AG by fixing up the freespace btree. Also make sure that the per-AG reservation works under the new AG size. If such per-AG reservation or extent allocation fails, roll the transaction so the new transaction could cancel without any side effects. Reviewed-by: Darrick J. Wong Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit c789c83c7ef8f98f9f6f0864ce6a58dc4c4012d1 Author: Gao Xiang Date: Tue Mar 23 19:05:38 2021 -0700 xfs: hoist out xfs_resizefs_init_new_ags() Move out related logic for initializing new added AGs to a new helper in preparation for shrinking. No logic changes. Reviewed-by: Darrick J. Wong Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit 014695c0a78ea3054aa2105ba23cc107c3c27c74 Author: Gao Xiang Date: Tue Mar 23 19:05:37 2021 -0700 xfs: update lazy sb counters immediately for resizefs sb_fdblocks will be updated lazily if lazysbcount is enabled, therefore when shrinking the filesystem sb_fdblocks could be larger than sb_dblocks and xfs_validate_sb_write() would fail. Even for growfs case, it'd be better to update lazy sb counters immediately to reflect the real sb counters. Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Gao Xiang Signed-off-by: Darrick J. Wong commit f9dd7ba4308cd95c57f284253c5fb99623d7b715 Author: Bhaskar Chowdhury Date: Tue Mar 23 16:59:30 2021 -0700 xfs: Fix a typo s/strutures/structures/ Signed-off-by: Bhaskar Chowdhury Reviewed-by: Pavel Reichl Acked-by: Randy Dunlap Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 0145225e353eb5db9cb89e2ab1baf9a55da7a492 Author: Bhaskar Chowdhury Date: Tue Mar 23 16:59:30 2021 -0700 xfs: Rudimentary spelling fix s/sytemcall/syscall/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit bd24a4f5f7fd9720c3484821729027cad0816dbb Author: Bhaskar Chowdhury Date: Tue Mar 23 16:59:30 2021 -0700 xfs: Rudimentary typo fixes s/filesytem/filesystem/ s/instrumention/instrumentation/ Signed-off-by: Bhaskar Chowdhury Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 5825bea05265d2938c4c20a1c0f8b7d7ab59523d Author: Dave Chinner Date: Mon Mar 22 09:52:06 2021 -0700 xfs: __percpu_counter_compare() inode count debug too expensive - 21.92% __xfs_trans_commit - 21.62% xfs_log_commit_cil - 11.69% xfs_trans_unreserve_and_mod_sb - 11.58% __percpu_counter_compare - 11.45% __percpu_counter_sum - 10.29% _raw_spin_lock_irqsave - 10.28% do_raw_spin_lock __pv_queued_spin_lock_slowpath We debated just getting rid of it last time this came up and there was no real objection to removing it. Now it's the biggest scalability limitation for debug kernels even on smallish machines, so let's just get rid of it. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 1fea323ff00526dcc04fbb4ee6e7d04e4e2ab0e1 Author: Dave Chinner Date: Mon Mar 22 09:52:05 2021 -0700 xfs: reduce debug overhead of dir leaf/node checks On debug kernels, we call xfs_dir3_leaf_check_int() multiple times on every directory modification. The robust hash ordering checks it does on every entry in the leaf on every call results in a massive CPU overhead which slows down debug kernels by a large amount. We use xfs_dir3_leaf_check_int() for the verifiers as well, so we can't just gut the function to reduce overhead. What we can do, however, is reduce the work it does when it is called from the debug interfaces, just leaving the high level checks in place and leaving the robust validation to the verifiers. This means the debug checks will catch gross errors, but subtle bugs might not be caught until a verifier is run. It is easy enough to restore the existing debug behaviour if the developer needs it (just change a call parameter in the debug code), but overwise the overhead makes testing large directory block sizes on debug kernels very slow. Profile at an unlink rate of ~80k file/s on a 64k block size filesystem before the patch: 40.30% [kernel] [k] xfs_dir3_leaf_check_int 10.98% [kernel] [k] __xfs_dir3_data_check 8.10% [kernel] [k] xfs_verify_dir_ino 4.42% [kernel] [k] memcpy 2.22% [kernel] [k] xfs_dir2_data_get_ftype 1.52% [kernel] [k] do_raw_spin_lock Profile after, at an unlink rate of ~125k files/s (+50% improvement) has largely dropped the leaf verification debug overhead out of the profile. 16.53% [kernel] [k] __xfs_dir3_data_check 12.53% [kernel] [k] xfs_verify_dir_ino 7.97% [kernel] [k] memcpy 3.36% [kernel] [k] xfs_dir2_data_get_ftype 2.86% [kernel] [k] __pv_queued_spin_lock_slowpath Create shows a similar change in profile and a +25% improvement in performance. Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit 39d3c0b5968b5421922e2fc939b6d6158df8ac1c Author: Dave Chinner Date: Mon Mar 22 09:52:05 2021 -0700 xfs: No need for inode number error injection in __xfs_dir3_data_check We call xfs_dir_ino_validate() for every dir entry in a directory when doing validity checking of the directory. It calls xfs_verify_dir_ino() then emits a corruption report if bad or does error injection if good. It is extremely costly: 43.27% [kernel] [k] xfs_dir3_leaf_check_int 10.28% [kernel] [k] __xfs_dir3_data_check 6.61% [kernel] [k] xfs_verify_dir_ino 4.16% [kernel] [k] xfs_errortag_test 4.00% [kernel] [k] memcpy 3.48% [kernel] [k] xfs_dir_ino_validate 7% of the cpu usage in this directory traversal workload is xfs_dir_ino_validate() doing absolutely nothing. We don't need error injection to simulate a bad inode numbers in the directory structure because we can do that by fuzzing the structure on disk. And we don't need a corruption report, because the __xfs_dir3_data_check() will emit one if the inode number is bad. So just call xfs_verify_dir_ino() directly here, and get rid of all this unnecessary overhead: 40.30% [kernel] [k] xfs_dir3_leaf_check_int 10.98% [kernel] [k] __xfs_dir3_data_check 8.10% [kernel] [k] xfs_verify_dir_ino 4.42% [kernel] [k] memcpy 2.22% [kernel] [k] xfs_dir2_data_get_ftype 1.52% [kernel] [k] do_raw_spin_lock Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit ec08c14ba28ce073b3f63c8edbee0f3c38e1b6a1 Author: Dave Chinner Date: Mon Mar 22 09:52:05 2021 -0700 xfs: type verification is expensive From a concurrent rm -rf workload: 41.04% [kernel] [k] xfs_dir3_leaf_check_int 9.85% [kernel] [k] __xfs_dir3_data_check 5.60% [kernel] [k] xfs_verify_ino 5.32% [kernel] [k] xfs_agino_range 4.21% [kernel] [k] memcpy 3.06% [kernel] [k] xfs_errortag_test 2.57% [kernel] [k] xfs_dir_ino_validate 1.66% [kernel] [k] xfs_dir2_data_get_ftype 1.17% [kernel] [k] do_raw_spin_lock 1.11% [kernel] [k] xfs_verify_dir_ino 0.84% [kernel] [k] __raw_callee_save___pv_queued_spin_unlock 0.83% [kernel] [k] xfs_buf_find 0.64% [kernel] [k] xfs_log_commit_cil THere's an awful lot of overhead in just range checking inode numbers in that, but each inode number check is not a lot of code. The total is a bit over 14.5% of the CPU time is spent validating inode numbers. The problem is that they deeply nested global scope functions so the overhead here is all in function call marshalling. text data bss dec hex filename 2077 0 0 2077 81d fs/xfs/libxfs/xfs_types.o.orig 2197 0 0 2197 895 fs/xfs/libxfs/xfs_types.o There's a small increase in binary size by inlining all the local nested calls in the verifier functions, but the same workload now profiles as: 40.69% [kernel] [k] xfs_dir3_leaf_check_int 10.52% [kernel] [k] __xfs_dir3_data_check 6.68% [kernel] [k] xfs_verify_dir_ino 4.22% [kernel] [k] xfs_errortag_test 4.15% [kernel] [k] memcpy 3.53% [kernel] [k] xfs_dir_ino_validate 1.87% [kernel] [k] xfs_dir2_data_get_ftype 1.37% [kernel] [k] do_raw_spin_lock 0.98% [kernel] [k] xfs_buf_find 0.94% [kernel] [k] __raw_callee_save___pv_queued_spin_unlock 0.73% [kernel] [k] xfs_log_commit_cil Now we only spend just over 10% of the time validing inode numbers for the same workload. Hence a few "inline" keyworks is good enough to reduce the validation overhead by 30%... Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 929f8b0deb8365122826135b36ddae55b12b4852 Author: Dave Chinner Date: Mon Mar 22 09:52:04 2021 -0700 xfs: optimise xfs_buf_item_size/format for contiguous regions We process the buf_log_item bitmap one set bit at a time with xfs_next_bit() so we can detect if a region crosses a memcpy discontinuity in the buffer data address. This has massive overhead on large buffers (e.g. 64k directory blocks) because we do a lot of unnecessary checks and xfs_buf_offset() calls. For example, 16-way concurrent create workload on debug kernel running CPU bound has this at the top of the profile at ~120k create/s on 64kb directory block size: 20.66% [kernel] [k] xfs_dir3_leaf_check_int 7.10% [kernel] [k] memcpy 6.22% [kernel] [k] xfs_next_bit 3.55% [kernel] [k] xfs_buf_offset 3.53% [kernel] [k] xfs_buf_item_format 3.34% [kernel] [k] __pv_queued_spin_lock_slowpath 3.04% [kernel] [k] do_raw_spin_lock 2.84% [kernel] [k] xfs_buf_item_size_segment.isra.0 2.31% [kernel] [k] __raw_callee_save___pv_queued_spin_unlock 1.36% [kernel] [k] xfs_log_commit_cil (debug checks hurt large blocks) The only buffers with discontinuities in the data address are unmapped buffers, and they are only used for inode cluster buffers and only for logging unlinked pointers. IOWs, it is -rare- that we even need to detect a discontinuity in the buffer item formatting code. Optimise all this by using xfs_contig_bits() to find the size of the contiguous regions, then test for a discontiunity inside it. If we find one, do the slow "bit at a time" method we do now. If we don't, then just copy the entire contiguous range in one go. Profile now looks like: 25.26% [kernel] [k] xfs_dir3_leaf_check_int 9.25% [kernel] [k] memcpy 5.01% [kernel] [k] __pv_queued_spin_lock_slowpath 2.84% [kernel] [k] do_raw_spin_lock 2.22% [kernel] [k] __raw_callee_save___pv_queued_spin_unlock 1.88% [kernel] [k] xfs_buf_find 1.53% [kernel] [k] memmove 1.47% [kernel] [k] xfs_log_commit_cil .... 0.34% [kernel] [k] xfs_buf_item_format .... 0.21% [kernel] [k] xfs_buf_offset .... 0.16% [kernel] [k] xfs_contig_bits .... 0.13% [kernel] [k] xfs_buf_item_size_segment.isra.0 So the bit scanning over for the dirty region tracking for the buffer log items is basically gone. Debug overhead hurts even more now... Perf comparison dir block creates unlink size (kb) time rate time Original 4 4m08s 220k 5m13s Original 64 7m21s 115k 13m25s Patched 4 3m59s 230k 5m03s Patched 64 6m23s 143k 12m33s Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit c81ea11e033221a94182e1d0fee303def944303a Author: Dave Chinner Date: Mon Mar 22 09:52:04 2021 -0700 xfs: xfs_buf_item_size_segment() needs to pass segment offset Otherwise it doesn't correctly calculate the number of vectors in a logged buffer that has a contiguous map that gets split into multiple regions because the range spans discontigous memory. Probably never been hit in practice - we don't log contiguous ranges on unmapped buffers (inode clusters). Signed-off-by: Dave Chinner Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong commit accc661bf99a47b93ecb5fe0ed3fefd5d8b505ef Author: Dave Chinner Date: Mon Mar 22 09:52:03 2021 -0700 xfs: reduce buffer log item shadow allocations When we modify btrees repeatedly, we regularly increase the size of the logged region by a single chunk at a time (per transaction commit). This results in the CIL formatting code having to reallocate the log vector buffer every time the buffer dirty region grows. Hence over a typical 4kB btree buffer, we might grow the log vector 4096/128 = 32x over a short period where we repeatedly add or remove records to/from the buffer over a series of running transaction. This means we are doing 32 memory allocations and frees over this time during a performance critical path in the journal. The amount of space tracked in the CIL for the object is calculated during the ->iop_format() call for the buffer log item, but the buffer memory allocated for it is calculated by the ->iop_size() call. The size callout determines the size of the buffer, the format call determines the space used in the buffer. Hence we can oversize the buffer space required in the size calculation without impacting the amount of space used and accounted to the CIL for the changes being logged. This allows us to reduce the number of allocations by rounding up the buffer size to allow for future growth. This can safe a substantial amount of CPU time in this path: - 46.52% 2.02% [kernel] [k] xfs_log_commit_cil - 44.49% xfs_log_commit_cil - 30.78% _raw_spin_lock - 30.75% do_raw_spin_lock 30.27% __pv_queued_spin_lock_slowpath (oh, ouch!) .... - 1.05% kmem_alloc_large - 1.02% kmem_alloc 0.94% __kmalloc This overhead here us what this patch is aimed at. After: - 0.76% kmem_alloc_large - 0.75% kmem_alloc 0.70% __kmalloc The size of 512 bytes is based on the bitmap chunk size being 128 bytes and that random directory entry updates almost never require more than 3-4 128 byte regions to be logged in the directory block. The other observation is for per-ag btrees. When we are inserting into a new btree block, we'll pack it from the front. Hence the first few records land in the first 128 bytes so we log only 128 bytes, the next 8-16 records land in the second region so now we log 256 bytes. And so on. If we are doing random updates, it will only allocate every 4 random 128 byte regions that are dirtied instead of every single one. Any larger than 512 bytes and I noticed an increase in memory footprint in my scalability workloads. Any less than this and I didn't really see any significant benefit to CPU usage. Signed-off-by: Dave Chinner Reviewed-by: Chandan Babu R Reviewed-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Christoph Hellwig Signed-off-by: Darrick J. Wong Reviewed-by: Gao Xiang commit e6a688c3323840f3e388ba28fd2db86675b79917 Author: Dave Chinner Date: Mon Mar 22 09:52:03 2021 -0700 xfs: initialise attr fork on inode create When we allocate a new inode, we often need to add an attribute to the inode as part of the create. This can happen as a result of needing to add default ACLs or security labels before the inode is made visible to userspace. This is highly inefficient right now. We do the create transaction to allocate the inode, then we do an "add attr fork" transaction to modify the just created empty inode to set the inode fork offset to allow attributes to be stored, then we go and do the attribute creation. This means 3 transactions instead of 1 to allocate an inode, and this greatly increases the load on the CIL commit code, resulting in excessive contention on the CIL spin locks and performance degradation: 18.99% [kernel] [k] __pv_queued_spin_lock_slowpath 3.57% [kernel] [k] do_raw_spin_lock 2.51% [kernel] [k] __raw_callee_save___pv_queued_spin_unlock 2.48% [kernel] [k] memcpy 2.34% [kernel] [k] xfs_log_commit_cil The typical profile resulting from running fsmark on a selinux enabled filesytem is adds this overhead to the create path: - 15.30% xfs_init_security - 15.23% security_inode_init_security - 13.05% xfs_initxattrs - 12.94% xfs_attr_set - 6.75% xfs_bmap_add_attrfork - 5.51% xfs_trans_commit - 5.48% __xfs_trans_commit - 5.35% xfs_log_commit_cil - 3.86% _raw_spin_lock - do_raw_spin_lock __pv_queued_spin_lock_slowpath - 0.70% xfs_trans_alloc 0.52% xfs_trans_reserve - 5.41% xfs_attr_set_args - 5.39% xfs_attr_set_shortform.constprop.0 - 4.46% xfs_trans_commit - 4.46% __xfs_trans_commit - 4.33% xfs_log_commit_cil - 2.74% _raw_spin_lock - do_raw_spin_lock __pv_queued_spin_lock_slowpath 0.60% xfs_inode_item_format 0.90% xfs_attr_try_sf_addname - 1.99% selinux_inode_init_security - 1.02% security_sid_to_context_force - 1.00% security_sid_to_context_core - 0.92% sidtab_entry_to_string - 0.90% sidtab_sid2str_get 0.59% sidtab_sid2str_put.part.0 - 0.82% selinux_determine_inode_label - 0.77% security_transition_sid 0.70% security_compute_sid.part.0 And fsmark creation rate performance drops by ~25%. The key point to note here is that half the additional overhead comes from adding the attribute fork to the newly created inode. That's crazy, considering we can do this same thing at inode create time with a couple of lines of code and no extra overhead. So, if we know we are going to add an attribute immediately after creating the inode, let's just initialise the attribute fork inside the create transaction and chop that whole chunk of code out of the create fast path. This completely removes the performance drop caused by enabling SELinux, and the profile looks like: - 8.99% xfs_init_security - 9.00% security_inode_init_security - 6.43% xfs_initxattrs - 6.37% xfs_attr_set - 5.45% xfs_attr_set_args - 5.42% xfs_attr_set_shortform.constprop.0 - 4.51% xfs_trans_commit - 4.54% __xfs_trans_commit - 4.59% xfs_log_commit_cil - 2.67% _raw_spin_lock - 3.28% do_raw_spin_lock 3.08% __pv_queued_spin_lock_slowpath 0.66% xfs_inode_item_format - 0.90% xfs_attr_try_sf_addname - 0.60% xfs_trans_alloc - 2.35% selinux_inode_init_security - 1.25% security_sid_to_context_force - 1.21% security_sid_to_context_core - 1.19% sidtab_entry_to_string - 1.20% sidtab_sid2str_get - 0.86% sidtab_sid2str_put.part.0 - 0.62% _raw_spin_lock_irqsave - 0.77% do_raw_spin_lock __pv_queued_spin_lock_slowpath - 0.84% selinux_determine_inode_label - 0.83% security_transition_sid 0.86% security_compute_sid.part.0 Which indicates the XFS overhead of creating the selinux xattr has been halved. This doesn't fix the CIL lock contention problem, just means it's not a limiting factor for this workload. Lock contention in the security subsystems is going to be an issue soon, though... Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig [djwong: fix compilation error when CONFIG_SECURITY=n] Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Reviewed-by: Gao Xiang commit b2c2974b8cdf1eb3ef90ff845eb27b19e2187b7e Author: Gao Xiang Date: Mon Mar 22 09:52:02 2021 -0700 xfs: ensure xfs_errortag_random_default matches XFS_ERRTAG_MAX Add the BUILD_BUG_ON to xfs_errortag_add() in order to make sure that the length of xfs_errortag_random_default matches XFS_ERRTAG_MAX when building. Signed-off-by: Gao Xiang Reviewed-by: Christoph Hellwig Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong commit 92cf7d36384b99d5a57bf4422904a3c16dc4527a Author: Pavel Reichl Date: Mon Mar 22 09:52:02 2021 -0700 xfs: Skip repetitive warnings about mount options Skip the warnings about mount option being deprecated if we are remounting and deprecated option state is not changing. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211605 Fix-suggested-by: Eric Sandeen Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit 0f98b4ece18da9d8287bb4cc4e8f78b8760ea0d0 Author: Pavel Reichl Date: Mon Mar 22 09:52:01 2021 -0700 xfs: rename variable mp to parsing_mp Rename mp variable to parsisng_mp so it is easy to distinguish between current mount point handle and handle for mount point which mount options are being parsed. Suggested-by: Eric Sandeen Signed-off-by: Pavel Reichl Reviewed-by: Darrick J. Wong Reviewed-by: Carlos Maiolino Signed-off-by: Darrick J. Wong commit 3fef46fc43ca12a0006d6683c8ac114628ad53a1 Author: Darrick J. Wong Date: Mon Mar 22 09:51:55 2021 -0700 xfs: rename the blockgc workqueue Since we're about to start using the blockgc workqueue to dispose of inactivated inodes, strip the "block" prefix from the name; now it's merely the general garbage collection (gc) workqueue. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 383e32b0d0db464dc53052a97bf7f9ee3a1937cc Author: Darrick J. Wong Date: Mon Mar 22 09:51:54 2021 -0700 xfs: prevent metadata files from being inactivated Files containing metadata (quota records, rt bitmap and summary info) are fully managed by the filesystem, which means that all resource cleanup must be explicit, not automatic. This means that they should never be subjected automatic to post-eof truncation, nor should they be freed automatically even if the link count drops to zero. In other words, xfs_inactive() should leave these files alone. Add the necessary predicate functions to make this happen. This adds a second layer of prevention for the kinds of fs corruption that was fixed by commit f4c32e87de7d. If we ever decide to support removing metadata files, we should make all those metadata updates explicit. Rearrange the order of #includes to fix compiler errors, since xfs_mount.h is supposed to be included before xfs_inode.h Followup-to: f4c32e87de7d ("xfs: fix realtime bitmap/summary file truncation when growing rt volume") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 973975b72a36ee86c8c59057f06fcde03478ff4f Author: Darrick J. Wong Date: Mon Mar 22 09:51:54 2021 -0700 xfs: validate ag btree levels using the precomputed values Use the AG btree height limits that we precomputed into the xfs_mount to validate the AG headers instead of using XFS_BTREE_MAXLEVELS. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit f53acface7a9765ba03b491485bcc53d72810aeb Author: Darrick J. Wong Date: Mon Mar 22 09:51:53 2021 -0700 xfs: remove return value from xchk_ag_btcur_init Functions called by this function cannot fail, so get rid of the return and error checking. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit de9d2a78add1a4c9508be96bad7e29d899e0ff0f Author: Darrick J. Wong Date: Mon Mar 22 09:51:53 2021 -0700 xfs: set the scrub AG number in xchk_ag_read_headers Since xchk_ag_read_headers initializes fields in struct xchk_ag, we might as well set the AG number and save the callers the trouble. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 9de4b514494a3b49fa708186c0dc4611f1fe549c Author: Darrick J. Wong Date: Mon Mar 22 09:51:52 2021 -0700 xfs: mark a data structure sick if there are cross-referencing errors If scrub observes cross-referencing errors while scanning a data structure, mark the data structure sick. There's /something/ inconsistent, even if we can't really tell what it is. Fixes: 4860a05d2475 ("xfs: scrub/repair should update filesystem metadata health") Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 7716ee54cb88e1b76e6a9b61416e286b8150f61d Author: Darrick J. Wong Date: Mon Mar 22 09:51:52 2021 -0700 xfs: bail out of scrub immediately if scan incomplete If a scrubber cannot complete its check and signals an incomplete check, we must bail out immediately without updating health status, trying a repair, etc. because our scan is incomplete and we therefore do not know much more. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 05237032fdec14a7f393259620d522e9c9a92685 Author: Darrick J. Wong Date: Mon Mar 22 09:51:52 2021 -0700 xfs: fix dquot scrub loop cancellation When xchk_quota_item figures out that it needs to terminate the scrub operation, it needs to return some error code to abort the loop, but instead it returns zero and the loop keeps running. Fix this by making it use ECANCELED, and fix the other loop bailout condition check at the bottom too. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 1aa26707ebd65e1260f4a912cae1fb4c37cc4ebd Author: Darrick J. Wong Date: Mon Mar 22 09:51:51 2021 -0700 xfs: fix uninitialized variables in xrep_calc_ag_resblks If we can't read the AGF header, we never actually set a value for freelen and usedlen. These two variables are used to make the worst case estimate of btree size, so it's safe to set them to the AG size as a fallback. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig commit 50dad399caa1bd8ba14cf2c72ab9b25112bc0430 Merge: 241949e488f38 6dbf94b264e62 Author: David S. Miller Date: Thu Mar 25 16:46:53 2021 -0700 Merge branch 'ethtool-FEC' Jakub Kicinski says: ==================== ethtool: clarify the ethtool FEC interface Our FEC configuration interface is one of the more confusing. It also lacks any error checking in the core. This certainly shows in the varying implementations across the drivers. Improve the documentation and add most basic checks. Sadly, it's probably too late now to try to enforce much more uniformity. Any thoughts & suggestions welcome. Next step is to add netlink for FEC, then stats. ==================== Signed-off-by: David S. Miller commit 6dbf94b264e62641d521975d0eddbeef36bacf3c Author: Jakub Kicinski Date: Wed Mar 24 18:12:00 2021 -0700 ethtool: clarify the ethtool FEC interface The definition of the FEC driver interface is quite unclear. Improve the documentation. This is based on current driver and user space code, as well as the discussions about the interface: RFC v1 (24 Oct 2016): https://lore.kernel.org/netdev/1477363849-36517-1-git-send-email-vidya@cumulusnetworks.com/ - this version has the autoneg field - no active_fec field - none vs off confusion is already present RFC v2 (10 Feb 2017): https://lore.kernel.org/netdev/1486727004-11316-1-git-send-email-vidya@cumulusnetworks.com/ - autoneg removed - active_fec added v1 (10 Feb 2017): https://lore.kernel.org/netdev/1486751311-42019-1-git-send-email-vidya@cumulusnetworks.com/ - no changes in the code v1 (24 Jun 2017): https://lore.kernel.org/netdev/1498331985-8525-1-git-send-email-roopa@cumulusnetworks.com/ - include in tree user v2 (27 Jul 2017): https://lore.kernel.org/netdev/1501199248-24695-1-git-send-email-roopa@cumulusnetworks.com/ Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 42ce127d98641f2cb19cd499b5b3beb472c7eff1 Author: Jakub Kicinski Date: Wed Mar 24 18:11:59 2021 -0700 ethtool: fec: sanitize ethtool_fecparam->fec Reject NONE on set, this mode means device does not support FEC so it's a little out of place in the set interface. This should be safe to do - user space ethtool does not allow the use of NONE on set. A few drivers treat it the same as OFF, but none use it instead of OFF. Similarly reject an empty FEC mask. The common user space tool will not send such requests and most drivers correctly reject it already. Signed-off-by: Jakub Kicinski Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: David S. Miller commit d3b37fc805d9ef697451730ebdfc7e35e6c2ace8 Author: Jakub Kicinski Date: Wed Mar 24 18:11:58 2021 -0700 ethtool: fec: sanitize ethtool_fecparam->active_fec struct ethtool_fecparam::active_fec is a GET-only field, all in-tree drivers correctly ignore it on SET. Clear the field on SET to avoid any confusion. Again, we can't reject non-zero now since ethtool user space does not zero-init the param correctly. Signed-off-by: Jakub Kicinski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 240e114411e74d2ee8121643e0c67717eb7c6982 Author: Jakub Kicinski Date: Wed Mar 24 18:11:57 2021 -0700 ethtool: fec: sanitize ethtool_fecparam->reserved struct ethtool_fecparam::reserved is never looked at by the core. Make sure it's actually 0. Unfortunately we can't return an error because old ethtool doesn't zero-initialize the structure for SET. On GET we can be more verbose, there are no in tree (ab)users. Fix up the kdoc on the structure. Remove the mention of FEC bypass. Seems like a niche thing to configure in the first place. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 408386817a9d32c88c9ac528749e9999d0e3f6a1 Author: Jakub Kicinski Date: Wed Mar 24 18:11:56 2021 -0700 ethtool: fec: remove long structure description Digging through the mailing list archive @autoneg was part of the first version of the RFC, this left over comment was pointed out twice in review but wasn't removed. The sentence is an exact copy-paste from pauseparam. Signed-off-by: Jakub Kicinski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit ed3038158e7b58dcf966cb7ec4ae98d152a5b794 Author: Jakub Kicinski Date: Wed Mar 24 18:11:55 2021 -0700 ethtool: fec: fix typo in kdoc s/porte/the port/ Signed-off-by: Jakub Kicinski Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 80847a71b270b172814dc7562f3eb59507fca61e Author: Daniel Borkmann Date: Fri Mar 26 00:41:34 2021 +0100 bpf: Undo ptr_to_map_key alu sanitation for now Remove PTR_TO_MAP_KEY for the time being from being sanitized on pointer ALU through sanitize_ptr_alu() mainly for 3 reasons: 1) It's currently unused and not available from unprivileged. However that by itself is not yet a strong reason to drop the code. 2) Commit 69c087ba6225 ("bpf: Add bpf_for_each_map_elem() helper") implemented the sanitation not fully correct in that unlike stack or map_value pointer it doesn't probe whether the access to the map key /after/ the simulated ALU operation is still in bounds. This means that the generated mask can truncate the offset in the non-speculative domain whereas it should only truncate in the speculative domain. The verifier should instead reject such program as we do for other types. 3) Given the recent fixes from f232326f6966 ("bpf: Prohibit alu ops for pointer types not defining ptr_limit"), 10d2bb2e6b1d ("bpf: Fix off-by-one for area size in creating mask to left"), b5871dca250c ("bpf: Simplify alu_limit masking for pointer arithmetic") as well as 1b1597e64e1a ("bpf: Add sanity check for upper ptr_limit") the code changed quite a bit and the merge in efd13b71a3fa broke the PTR_TO_MAP_KEY case due to an incorrect merge conflict. Remove the relevant pieces for the time being and we can rework the PTR_TO_MAP_KEY case once everything settles. Fixes: efd13b71a3fa ("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net") Fixes: 69c087ba6225 ("bpf: Add bpf_for_each_map_elem() helper") Signed-off-by: Daniel Borkmann commit 241949e488f38a192f2359dbb21d80e08173eb60 Merge: efd13b71a3fa3 e2c69f3a5b4ed Author: David S. Miller Date: Thu Mar 25 16:30:46 2021 -0700 Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-03-24 The following pull-request contains BPF updates for your *net-next* tree. We've added 37 non-merge commits during the last 15 day(s) which contain a total of 65 files changed, 3200 insertions(+), 738 deletions(-). The main changes are: 1) Static linking of multiple BPF ELF files, from Andrii. 2) Move drop error path to devmap for XDP_REDIRECT, from Lorenzo. 3) Spelling fixes from various folks. ==================== Signed-off-by: David S. Miller commit efd13b71a3fa31413f8d15342e01d44b60b0a432 Merge: 84c7f6c33f42a 002322402dafd Author: David S. Miller Date: Thu Mar 25 15:31:22 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net Signed-off-by: David S. Miller commit bfcf3d48dd02e95808a4693f2a49163f40fa5e74 Author: Nikolai Kostrigin Date: Tue Mar 23 12:18:55 2021 -0700 Input: elan_i2c - fix a typo in parameter name s/max_baseliune/max_baseline/ Signed-off-by: Nikolai Kostrigin Link: https://lore.kernel.org/r/20210311114146.1977616-1-nickel@altlinux.org Signed-off-by: Dmitry Torokhov commit bcd9730a04a1f18d873adb3907f2b4830b88ee9a Author: Barry Song Date: Thu Mar 25 14:43:18 2021 -0700 Input: move to use request_irq by IRQF_NO_AUTOEN flag disable_irq() after request_irq() still has a time gap in which interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will disable IRQ auto-enable because of requesting. On the other hand, request_irq() after setting IRQ_NOAUTOEN as below irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); can also be replaced by request_irq() with IRQF_NO_AUTOEN flag. Signed-off-by: Barry Song Link: https://lore.kernel.org/r/20210302224916.13980-3-song.bao.hua@hisilicon.com Signed-off-by: Dmitry Torokhov commit 800c120ef4e3abb45d67a36d3e5532eb051efc3c Author: Randy Dunlap Date: Thu Mar 25 13:13:33 2021 -0700 tools/turbostat: Unmark non-kernel-doc comment Do not mark a comment as kernel-doc notation when it is not meant to be in kernel-doc notation. Signed-off-by: Randy Dunlap Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210325201333.16792-1-rdunlap@infradead.org commit 34a6ae672645a89f760960a11ce80125cc4d361f Author: Pavel Machek Date: Thu Mar 25 11:39:29 2021 +0100 leds: Kconfig: LEDS_CLASS is usually selected. People should really say Y to the LEDS_CLASS prompt. Signed-off-by: Pavel Machek commit be6d99420306bb6b0abfff7a814564a614690db6 Author: Rafał Miłecki Date: Thu Jan 14 18:53:39 2021 +0100 soc: bcm: bcm-pmb: add BCM63138 SATA support BCM63138 has SATA controller that needs to be powered up using PMB. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 42eb2fa14ac0c6253d2cf7003409933a7e52aac1 Author: Rafał Miłecki Date: Thu Jan 14 18:53:38 2021 +0100 dt-bindings: power: bcm-pmb: add BCM63138 binding PMB can be also found on bcm63xx chipsets. It uses difference device addresses so a new binding is required. Signed-off-by: Rafał Miłecki Acked-by: Rob Herring Signed-off-by: Florian Fainelli commit a872b8e94be0db73f6d28f3906b3918d77700d38 Author: Rafał Miłecki Date: Wed Mar 10 22:04:46 2021 +0100 ARM: dts: BCM5301X: Describe NVMEM NVRAM on Linksys & Luxul routers Provide access to NVRAM which contains device environment variables. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 43986f38818278bb71a7fef6de689637bb734afe Author: Rafał Miłecki Date: Tue Mar 9 13:55:00 2021 +0100 ARM: dts: BCM5301X: fix "reg" formatting in /memory node This fixes warnings/errors like: arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml: /: memory@0:reg:0: [0, 134217728, 2281701376, 402653184] is too long From schema: /lib/python3.6/site-packages/dtschema/schemas/reg.yaml Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 70193038a6ec9bbf10990a126432b0cbf56aa339 Author: Qiujun Huang Date: Thu Mar 25 16:19:10 2021 +0000 tracing: Update create_system_filter() kernel-doc comment commit f306cc82a93d ("tracing: Update event filters for multibuffer") added the parameter @tr for create_system_filter(). commit bb9ef1cb7d86 ("tracing: Change apply_subsystem_event_filter() paths to check file->system == dir") changed the parameter from @system to @dir. Link: https://lkml.kernel.org/r/20210325161911.123452-1-hqjagain@gmail.com Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit 30c3d39f7f78f3b232f6a6f6357a545cbe23cc16 Author: Qiujun Huang Date: Thu Mar 25 16:37:52 2021 +0000 tracing: A minor cleanup for create_system_filter() The first two parameters should be reduced to one, as @tr is simply @dir->tr. Link: https://lkml.kernel.org/r/20210324205642.65e03248@oasis.local.home Link: https://lkml.kernel.org/r/20210325163752.128407-1-hqjagain@gmail.com Suggested-by: Steven Rostedt (VMware) Signed-off-by: Qiujun Huang Signed-off-by: Steven Rostedt (VMware) commit f8d62edfe2563fc86d12b80b07407dc095cdf0d2 Merge: 14d97622448ac 7abfabaf5f805 Author: Jens Axboe Date: Thu Mar 25 13:18:30 2021 -0600 Merge branch 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into for-5.13/drivers Pull MD updates from Song: "The major changes are: 1. Performance improvement for raid10 discard requests, from Xiao Ni. 2. Fix missing information of /proc/mdstat, from Jan Glauber." * 'md-next' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md: md: Fix missing unused status line of /proc/mdstat md/raid10: improve discard request for far layout md/raid10: improve raid10 discard request md/raid10: pull the code that wait for blocked dev into one function md/raid10: extend r10bio devs to raid disks md: add md_submit_discard_bio() for submitting discard bio commit 24b84444eb6f8d6a5090f6fdf172cacfa43f89e9 Author: Gwendal Grignou Date: Wed Mar 17 00:40:12 2021 -0700 iio: acpi_als: Add trigger support As some firmware does not notify on illuminance changes, add a trigger to be able to query light via software (sysfs-trigger or hrtrigger). Add a hardware trigger set as the default trigger to maintain backward compatibility. Check iio_info reports the sensor as buffer capable: iio:device0: acpi-als (buffer capable) To test, check we can get data on demand on an Intel based chromebook: IIO_DEV="iio:device0" echo 1 > iio_sysfs_trigger/add_trigger cat trigger2/name > ${IIO_DEV}/trigger/current_trigger for i in ${IIO_DEV}/scan_elements/*_en ${IIO_DEV}/buffer/enable ; do echo 1 > $i done od -x /dev/${IIO_DEV} & echo 1 > trigger2/trigger_now Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210317074012.2336454-4-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit ddaf14dab78c915b52f6c359b3f00ef3b97bccf6 Author: Gwendal Grignou Date: Wed Mar 17 00:40:11 2021 -0700 iio: acpi_als: Add local variable dev in probe Use dev = &device->dev in probe routine for clarity. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210317074012.2336454-3-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit dbd7e992a55dd5c9b3e0771b2c417187c5de059e Author: Gwendal Grignou Date: Wed Mar 17 00:40:10 2021 -0700 iio: acpi_als: Add timestamp channel Add timestamp channel in list of channel, to allow retrieving timestamps when events are produced. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210317074012.2336454-2-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 707182b4ff3e644393f785aba36b6edfcc316b16 Author: Guoqing Chi Date: Fri Mar 19 14:27:06 2021 +0800 iio: adc: ad7292: Modify the bool initialization assignment A bool initializer is best assigned to false rather than 0. Signed-off-by: Guoqing Chi Reviewed-by: Marcelo Schmitt Link: https://lore.kernel.org/r/20210319062706.5135-1-chi962464zy@163.com Signed-off-by: Jonathan Cameron commit 80346b2b55fcbb042acd0b90120004da8738101f Author: Gwendal Grignou Date: Thu Mar 18 11:48:57 2021 -0700 iio: cros: unify hw fifo attributes without API changes Commit 2e2366c2d141 ("iio: cros_ec: unify hw fifo attributes into the core file") should be reverted as it set buffer extended attributes at the wrong place. However, to revert it will requires to revert more commits: commit 165aea80e2e2 ("iio: cros_ec: use devm_iio_triggered_buffer_setup_ext()") commit 21232b4456ba ("iio: buffer: remove iio_buffer_set_attrs() helper")). and we would still have conflict with more recent development. commit ee708e6baacd ("iio: buffer: introduce support for attaching more IIO buffers") Instead, this commit reverts the first 2 commits without re-adding iio_buffer_set_attrs() and set the buffer extended attributes at the right place: 1. Instead of adding has_fw_fifo, deduct it from the configuration: - EC must support FIFO (EC_FEATURE_MOTION_SENSE_FIFO) set. - sensors send data a regular interval (accelerometer, gyro, magnetomer, barometer, light sensor). - "Legacy accelerometer" is only present on EC without FIFO, so we don't need to set buffer attributes. 2. devm_iio_triggered_buffer_setup_ext() does not need to be called when EC does not support FIFO, as there is no FIFO to manage. 3. Use devm_iio_triggered_buffer_setup_ext() when EC has a FIFO to specify the buffer extended attributes. Fixes: 2e2366c2d141 ("iio: cros_ec: unify hw fifo attributes into the core file") Fixes: 165aea80e2e2 ("iio: cros_ec: use devm_iio_triggered_buffer_setup_ext()") Signed-off-by: Gwendal Grignou Reviewed-by: Alexandru Ardelean Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210318184857.2679181-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 0a21526bc1d41456f1b320cce35c9c66238fb1c9 Author: Alexandru Ardelean Date: Thu Mar 11 11:10:42 2021 +0200 iio: kfifo: add devm_iio_triggered_buffer_setup_ext variant This is similar to the {devm_}iio_triggered_buffer_setup_ext variants added via commit 5164c7889857 ("iio: triggered-buffer: add {devm_}iio_triggered_buffer_setup_ext variants"). These can be used to pass extra buffer attributes to the buffer object. This is a bit of temporary mechanism (hopefully) so that drivers that want to allocate a kfifo buffer with extra buffer attributes, don't need to include 'buffer_impl.h' directly. This can also become an API function (in it's own right, unfortunately), but it may be a little less bad vs drivers having to include 'buffer_impl.h'. So, far the drivers that want to pass buffer attributes, all have to do with some HW FIFO attributes, so there may be a chance of unifying them into IIO core somehow (as some standard API). But, until that happens, we just need to let them register their HW FIFO attributes directly (without having to let them include 'buffer_impl.h' directly). Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210311091042.22417-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit e1d392dc8875556d8a742d4be38ab452516428eb Author: Linus Walleij Date: Fri Mar 19 14:53:01 2021 +0100 iio: event_monitor: Enable events before monitoring After some painful sessions with a driver that register an enable/disable sysfs knob (gp2ap002) and manually going in and enabling the event before monitoring it: cd /sys/bus/iio/devices/iio\:device2/events # ls in_proximity_thresh_either_en # echo 1 > in_proximity_thresh_either_en I realized that it's better if the iio_event_monitor is smart enough to enable all events by itself and disable them after use, if passed the -a flag familiar from the iio_generic_buffer tool. Auto-enabling events depend on the hardware being able to handle all events at the same time which isn't necessarily the case, so a command line option is required for this. Cc: Bastien Nocera Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210319135301.542911-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 346e19ec04e07789d1fc9982d6adc016582620cd Author: Seiya Wang Date: Fri Mar 19 10:34:24 2021 +0800 dt-bindings: iio: adc: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of auxadc for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20210319023427.16711-7-seiya.wang@mediatek.com Signed-off-by: Jonathan Cameron commit c71cfe5576d1f6e2d53b5fb9b74438eadf097b05 Author: LI Qingwu Date: Wed Mar 17 06:39:02 2021 +0000 iio:magnetometer: Add Support for ST IIS2MDC Add support for ST magnetometer IIS2MDC, an I2C/SPI interface 3-axis magnetometer. The patch was tested on the instrument with IIS2MDC via I2C interface. Signed-off-by: LI Qingwu Link: https://lore.kernel.org/r/20210317063902.19300-3-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron commit ac62f90c9636c5b7004f6696a9e8c0d109509898 Author: LI Qingwu Date: Wed Mar 17 06:39:01 2021 +0000 dt-bindings: iio: st,st-sensors add IIS2MDC. Add support for ST magnetometer IIS2MDC, an I2C/SPI interface 3-axis magnetometer sensor. The patch was tested on the instrument with IIS2MDC via I2C interface. Acked-by: Rob Herring Signed-off-by: LI Qingwu Link: https://lore.kernel.org/r/20210317063902.19300-2-Qing-wu.Li@leica-geosystems.com.cn Signed-off-by: Jonathan Cameron commit e5b64caaad768f78668d0d8563b4f98c0f4d4b6a Author: Mugilraj Dhavachelvan Date: Mon Mar 15 19:07:11 2021 +0530 staging: iio: ad9832: kernel-doc fixes Fixes a W=1 warning. -Added ``:`` to lock parameter in 'ad9832_state' description. -It's a reference comment so removed /** Signed-off-by: Mugilraj Dhavachelvan Link: https://lore.kernel.org/r/20210315133711.26860-1-dmugil2000@gmail.com Signed-off-by: Jonathan Cameron commit 2662e81745fc00cafcbbb532018013607cae84e0 Author: Mugilraj Dhavachelvan Date: Sun Mar 14 23:27:09 2021 +0530 iio:dac:max517.c: Use devm_iio_device_register() Use devm_iio_device_register() to avoid remove function and drop explicit call to iio_device_unregister(). Signed-off-by: Mugilraj Dhavachelvan Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210314175709.34301-1-dmugil2000@gmail.com Signed-off-by: Jonathan Cameron commit 85ece364065eb068439ca3fe4f11d096575d3074 Author: Jonathan Cameron Date: Sat Mar 13 14:53:41 2021 +0000 iio:cros_ec_sensors: Fix a wrong function name in kernel doc. cros_ec_sensors_read_data_unsafe() had wrong function name in kernel-doc This shows up with W=1 builds. No fixes tag because I don't want to waste time on this being backported. Signed-off-by: Jonathan Cameron Cc: Guenter Roeck Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Enric Balletbo i Serra Acked-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210313145341.116088-1-jic23@kernel.org commit 831aaea663acecddfc1b2d0851f6d0d36248c0f4 Author: Jonathan Cameron Date: Sun Mar 14 16:46:55 2021 +0000 iio: buffer: kfifo_buf: kernel-doc, typo in function name. Should have been _kfifo_ and was _fifo_ Signed-off-by: Jonathan Cameron Acked-by: Alexandru Ardelean Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210314164655.408461-9-jic23@kernel.org commit d7f1c0c313580d8243031978117f9b9fe0b3ddab Author: Jonathan Cameron Date: Sun Mar 14 16:46:54 2021 +0000 iio: accel: sca3000: kernel-doc fixes. Missing - and wrong function names. All extremely obvious so nothing to add to patch title. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210314164655.408461-8-jic23@kernel.org commit 63abed2a1ee8270c369db8111da2ad59f43bf9d4 Author: Jonathan Cameron Date: Sun Mar 14 16:46:53 2021 +0000 iio: adc: adi-axi-adc: Drop false marking for kernel-doc This comment block isn't in kernel-doc format so drop the /** marking. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Reviewed-by: Lars-Peter Clausen Cc: Nuno Sá Link: https://lore.kernel.org/r/20210314164655.408461-7-jic23@kernel.org commit a80aeec0878edb6ac931609a1b67b958499f8313 Author: Jonathan Cameron Date: Sun Mar 14 16:46:52 2021 +0000 iio: adc: cpcap-adc: kernel-doc fix - that should be _ in structure name Fixes a W=1 warning. Signed-off-by: Jonathan Cameron Reviewed-by: Tony Lindgren Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210314164655.408461-6-jic23@kernel.org commit 92e212e597ac5118dd31108b7ca5871f04005b24 Author: Jonathan Cameron Date: Sun Mar 14 16:46:51 2021 +0000 iio: dac: ad5504: fix wrong part number in kernel-doc structure name. Probably a bit of cut and paste where someone forgot to change the part number. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210314164655.408461-5-jic23@kernel.org commit e0549f34328f7f9b8058cfb6a9e779c5fcd3d6dc Author: Jonathan Cameron Date: Sun Mar 14 16:46:50 2021 +0000 iio: dac: ad5770r: kernel-doc fix case of letter R wrong in structure name Nothing useful to add beyond this causing a warning with W=1 Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen Acked-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314164655.408461-4-jic23@kernel.org commit b863ff94197f3118a18ceade7854bbaa53e0fc58 Author: Jonathan Cameron Date: Sun Mar 14 16:46:49 2021 +0000 iio: adc: ti-adc084s021: kernel-doc fixes, missing function names The documentation in this driver was nearly kernel-doc and was marked as such. Unfortunately the format was wrong and function names were missing. This patch puts them in with minor edits to keep the resulting line short. Signed-off-by: Jonathan Cameron Reviewed-by: Lars-Peter Clausen Cc: Gwendal Grignou Cc: Mårten Lindahl Link: https://lore.kernel.org/r/20210314164655.408461-3-jic23@kernel.org commit 44f14695bd936043de25313cfeb1c863a1060ad7 Author: Jonathan Cameron Date: Sun Mar 14 16:46:48 2021 +0000 iio: pressure: zpa2326: kernel-doc fixes Two comment blocks had wrong naming for function/structures that they referred to. Results in warnings when doing a W=1 build. Signed-off-by: Jonathan Cameron Reviewed-by: Alexandru Ardelean Reviewed-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210314164655.408461-2-jic23@kernel.org commit a55ebd47f21f6f0472766fb52c973849e31d1466 Author: Oleksij Rempel Date: Mon Mar 1 09:04:01 2021 +0100 counter: add IRQ or GPIO based counter Add simple IRQ or GPIO base counter. This device is used to measure rotation speed of some agricultural devices, so no high frequency on the counter pin is expected. The maximal measurement frequency depends on the CPU and system load. On the idle iMX6S I was able to measure up to 20kHz without count drops. Signed-off-by: Oleksij Rempel Reviewed-by: Ahmad Fatoum Reviewed-by: William Breathitt Gray Link: https://lore.kernel.org/r/20210301080401.22190-3-o.rempel@pengutronix.de Signed-off-by: Jonathan Cameron commit 0b8061c340b643e01da431dd60c75a41bb1d31ec Author: Oleksij Rempel Date: Mon Mar 1 09:04:00 2021 +0100 dt-bindings: counter: add interrupt-counter binding Add binding for the interrupt counter node Signed-off-by: Oleksij Rempel Reviewed-by: Linus Walleij Acked-by: William Breathitt Gray Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210301080401.22190-2-o.rempel@pengutronix.de Signed-off-by: Jonathan Cameron commit b627e3b5f73b8decc3ebfe46d93b23ecf6f143ab Author: Alexandru Ardelean Date: Wed Mar 10 11:51:31 2021 +0200 staging: iio: ad9834: convert to device-managed functions in probe This change converts the driver to use device-managed functions in the probe function. For the clock and regulator disable, some devm_add_action_or_reset() calls are required, and then devm_iio_device_register() function can be used register the IIO device. The final aim here would be for IIO to export only the device-managed functions of it's API. That's a long way to go and this a small step in that direction. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210310095131.47476-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit 70da64153123460a10f3cb53fa9edca3a0ec2727 Author: Alexandru Ardelean Date: Wed Mar 10 11:38:00 2021 +0200 iio: temperature: tmp007: use device-managed functions in probe This change converts the driver to use device-managed functions in the probe function. The power-down call is handled now via a devm_add_action_or_reset() hook, and then devm_iio_device_register() can be used to register the IIO device. The final aim here would be for IIO to export only the device-managed functions of it's API. That's a long way to go and this a small step in that direction. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210310093800.45822-1-aardelean@deviqon.com Signed-off-by: Jonathan Cameron commit 218bc53dc70022ac31381b43c82f4097a95b8605 Author: Alexandru Ardelean Date: Sun Mar 7 20:54:44 2021 +0200 iio: buffer: fix use-after-free for attached_buffers array Thanks to Lars for finding this. The free of the 'attached_buffers' array should be done as late as possible. This change moves it to iio_buffers_put(), which looks like the best place for it, since it takes place right before the IIO device data is free'd. The free of this array will be handled by calling iio_device_free(). The iio_buffers_put() function is renamed to iio_device_detach_buffers() since the role of this function changes a bit. It looks like this issue was ocurring on the error path of iio_buffers_alloc_sysfs_and_mask() and in iio_buffers_free_sysfs_and_mask() Added a comment in the doc-header of iio_device_attach_buffer() to mention how this will be free'd in case anyone is reading the code and becoming confused about it. Fixes: ee708e6baacd ("iio: buffer: introduce support for attaching more IIO buffers") Reported-by: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210307185444.32924-1-ardeleanalex@gmail.com Signed-off-by: Jonathan Cameron commit 4f2d9cced4c1ccda7ca0c888892954361c8a397e Author: Linus Walleij Date: Mon Mar 8 11:02:19 2021 +0100 hwmon: (ntc_thermistor): try reading processed Before trying the custom method of reading the sensor as raw and then converting, we want to use iio_read_channel_processed_scale() which first tries to see if the ADC can provide a processed value directly, else reads raw and applies scaling inside of IIO using the scale attributes of the ADC. We need to multiply the scaled value with 1000 to get to microvolts from millivolts which is what processed IIO channels returns. Keep the code that assumes 12bit ADC around as a fallback. This gives correct readings on the AB8500 thermistor inputs used in the Ux500 HREFP520 platform for reading battery and board temperature. Cc: Peter Rosin Cc: Chris Lesiak Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Link: https://lore.kernel.org/linux-iio/20201224011607.1059534-1-linus.walleij@linaro.org/ Signed-off-by: Linus Walleij Tested-by: Chris Lesiak Acked-by: Guenter Roeck Link: https://lore.kernel.org/r/20210308100219.2732156-2-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 635ef601b2387c3215252c9931786524d122c0e7 Author: Linus Walleij Date: Mon Mar 8 11:02:18 2021 +0100 iio: Provide iio_read_channel_processed_scale() API Since the old iio_read_channel_processed() would lose precision if we fall back to reading raw and scaling, we introduce a new API that will pass in a scale factor when reading a processed channel: iio_read_channel_processed_scale(). Refactor iio_read_channel_processed() as a special case with scale factor 1. Cc: Peter Rosin Cc: Chris Lesiak Cc: Jonathan Cameron Cc: linux-iio@vger.kernel.org Link: https://lore.kernel.org/linux-iio/20201224011607.1059534-1-linus.walleij@linaro.org/ Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210308100219.2732156-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 86073fa2b538847f4a623c040f66d1ec96e0643a Author: Gwendal Grignou Date: Tue Mar 9 11:36:20 2021 -0800 iio: xilinx-xadc: Remove code to set trigger parent iio_trigger_set_drvdata() sets the trigger device parent to first argument of viio_trigger_alloc(), no need to do it again in the driver code. In xadc_alloc_trigger, given dev is indio_dev->dev.parent, and we call devm_iio_trigger_alloc wit dev as argument, we do not have to set data->trig->dev.parent to indio_dev->dev.parent anymore. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210309193620.2176163-9-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 86e52a25f38cc47f24000671a9581c7b7e94749e Author: Gwendal Grignou Date: Tue Mar 9 11:36:19 2021 -0800 iio: as3935: Remove code to set trigger parent iio_trigger_set_drvdata() sets the trigger device parent to first argument of viio_trigger_alloc(), no need to do it again in the driver code. Given we call devm_iio_trigger_alloc() and devm_iio_device_alloc() with dev as parent, we do not have to set data->trig->dev.parent to indio_dev->dev.parent anymore. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Reviewed-by: Matt Ranostay Link: https://lore.kernel.org/r/20210309193620.2176163-8-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit e3c9b034e7d6280eef20d753d4a9c33abb200cf6 Author: Gwendal Grignou Date: Tue Mar 9 11:36:18 2021 -0800 iio: chemical: atlas: Remove code to set trigger parent iio_trigger_set_drvdata() sets the trigger device parent to first argument of viio_trigger_alloc(), no need to do it again in the driver code. Given we call devm_iio_trigger_alloc() and devm_iio_device_alloc() with &client->dev as parent, we do not have to set data->trig->dev.parent to indio_dev->dev.parent anymore. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Reviewed-by: Matt Ranostay Link: https://lore.kernel.org/r/20210309193620.2176163-7-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 4d031666560da23dfae3892335551b2405ee92e1 Author: Gwendal Grignou Date: Tue Mar 9 11:36:17 2021 -0800 iio: lmp91000: Remove code to set trigger parent iio_trigger_set_drvdata() sets the trigger device parent to first argument of viio_trigger_alloc(), no need to do it again in the driver code. Given data->dev is dev, and we call devm_iio_trigger_alloc with dev instead of data->dev, we do not have to set data->trig->dev.parent to dev anymore. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Reviewed-by: Matt Ranostay Link: https://lore.kernel.org/r/20210309193620.2176163-6-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit cd214139471a2b2135b4fbc2a7f9355a5df68f86 Author: Gwendal Grignou Date: Tue Mar 9 11:36:16 2021 -0800 iio: gp2ap020a00f: Remove code to set trigger parent iio_trigger_set_drvdata() sets the trigger device parent to first argument of viio_trigger_alloc(), no need to do it again in the driver code. Given data->client is client, and we call devm_iio_trigger_alloc() with &client->dev, we do not have to set data->trig->dev.parent to &data->client->dev anymore. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210309193620.2176163-5-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 5c68f05305874dd2c755fa911e93a8819dde42e2 Author: Gwendal Grignou Date: Tue Mar 9 11:36:15 2021 -0800 iio: adis_trigger: Remove code to set trigger parent iio_trigger_set_drvdata() sets the trigger device parent to first argument of viio_trigger_alloc(), no need to do it again in the driver code. Remove adis_trigger_setup() to match other drivers where setting the trigger is usually done in the probe() routine. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Reviewed-by: Nuno Sa Link: https://lore.kernel.org/r/20210309193620.2176163-4-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 8a2252201656a147a9d7b1892028cef15869032e Author: Gwendal Grignou Date: Tue Mar 9 11:36:14 2021 -0800 iio: fix devm_iio_trigger_alloc with parent.cocci Use cocci semantic patch: @@ expression trigger, P; @@ trigger = devm_iio_trigger_alloc(P, ...); ... - trigger->dev.parent = P; To remove trigger->dev.parent, since it is set by default. Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210309193620.2176163-3-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 995071d36bb9804b644265450142fcb91c427ee8 Author: Gwendal Grignou Date: Tue Mar 9 11:36:13 2021 -0800 iio: set default trig->dev.parent When allocated with [devm_]iio_trigger_alloc(), set trig device parent to the device the trigger is allocated for by default. It can always be reassigned in the probe routine. Change iio_trigger_alloc() API to add the device pointer to be coherent with devm_iio_trigger_alloc, using similar interface to iio_device_alloc(). Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210309193620.2176163-2-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 7b8d045e497a04dd88546da51f34fa3b102778d2 Author: Alexandru Tachici Date: Thu Mar 11 11:11:54 2021 +0200 iio: adc: ad7124: allow more than 8 channels Currently AD7124-8 driver cannot use more than 8 IIO channels because it was assigning the channel configurations bijectively to channels specified in the device-tree. This is not possible to do when using more than 8 channels as AD7124-8 has only 8 configuration registers. To allow the user to use all channels at once the driver will keep in memory configurations for all channels but will program only 8 of them at a time on the device. If multiple channels have the same configuration, only one configuration register will be used. If there are more configurations than available registers only the last 8 used configurations will be allowed to exist on the device in a LRU fashion. Signed-off-by: Alexandru Tachici Reported-by: kernel test robot Link: https://lore.kernel.org/r/20210311091154.47785-2-alexandru.tachici@analog.com Signed-off-by: Jonathan Cameron commit 941f66765a32e9a1985b0815102423cf63fc343e Author: Andy Shevchenko Date: Fri Mar 12 15:49:03 2021 +0200 iio: light: gp2ap002: Drop unneeded explicit casting The unnecessary explicit casting is being used. Drop it for good. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210312134903.4296-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 9e301ea77ddfc3e8607fa21ebcd61397c828ab0a Author: Andy Shevchenko Date: Fri Mar 12 15:47:43 2021 +0200 iio: imu: st_lsm6dsx: Drop unneeded explicit castings In a few places the unnecessary explicit castings are being used. Drop them for good. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210312134743.4055-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 897cd10a962c0c4bacd88885e41610a776877384 Author: Andy Shevchenko Date: Fri Mar 12 15:45:38 2021 +0200 iio: imu: fxos8700: Drop unneeded explicit castings In a few places the unnecessary explicit castings are being used. Drop them for good. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210312134538.3759-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit d612eb13ba9f407d38c9f040e5691abcee763dfe Author: Andy Shevchenko Date: Fri Mar 12 15:43:49 2021 +0200 iio: chemical: bmp680: Drop unneeded explicit castings In few places the unnecessary explicit castings are being used. Drop them for good. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210312134349.3472-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron commit 7792225b7b671800d1c9b562ace8e167a3d0e2e7 Author: Stephen Boyd Date: Wed Feb 10 18:46:01 2021 -0800 iio: proximity: Add a ChromeOS EC MKBP proximity driver Add support for a ChromeOS EC proximity driver that exposes a "front" proximity sensor via the IIO subsystem. The EC decides when front proximity is near and sets an MKBP switch 'EC_MKBP_FRONT_PROXIMITY' to notify the kernel of proximity. Similarly, when proximity detects something far away it sets the switch bit to 0. For now this driver exposes a single sensor, but it could be expanded in the future via more MKBP bits if desired. Cc: Dmitry Torokhov Cc: Benson Leung Cc: Guenter Roeck Cc: Douglas Anderson Cc: Gwendal Grignou Reviewed-by: Enric Balletbo i Serra Signed-off-by: Stephen Boyd Reviewed-by: Gwendal Grignou Link: https://lore.kernel.org/r/20210211024601.1963379-4-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit 19ad93bc82e7d0ea7b02ada623cddfeab20c9046 Author: Stephen Boyd Date: Wed Feb 10 18:46:00 2021 -0800 dt-bindings: iio: Add cros ec proximity yaml doc Some cros ECs support a front proximity MKBP event via 'EC_MKBP_FRONT_PROXIMITY'. Add a DT binding to document this feature via a node that is a child of the main cros_ec device node. Devices that have this ability will describe this in firmware. Cc: Dmitry Torokhov Cc: Benson Leung Cc: Guenter Roeck Cc: Douglas Anderson Cc: Gwendal Grignou Cc: Reviewed-by: Rob Herring Cc: Enric Balletbo i Serra Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210211024601.1963379-3-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit 374be283ad429bf703d9036b799331dda793aeb7 Author: Stephen Boyd Date: Wed Feb 10 18:45:59 2021 -0800 platform/chrome: cros_ec: Add SW_FRONT_PROXIMITY MKBP define Some cros ECs support a front proximity MKBP event via 'EC_MKBP_FRONT_PROXIMITY'. Add this define so it can be used in a future patch. Cc: Dmitry Torokhov Cc: Benson Leung Cc: Guenter Roeck Cc: Douglas Anderson Cc: Gwendal Grignou Acked-by: Enric Balletbo i Serra Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20210211024601.1963379-2-swboyd@chromium.org Signed-off-by: Jonathan Cameron commit b9d453a53d5e3a47790675bc972de99bd163052e Author: Gwendal Grignou Date: Tue Mar 9 15:43:14 2021 -0800 iio: Remove kernel-doc keyword in file header comment Remove kernel-doc keyword from function header comment. It fixes issues spotted by scripts/kernel-doc like: drivers/iio/.c:3: info: Scanning doc for function drivers/iio/.c:X: warning: expecting prototype for . Prototype was for () instead To reproduce the errors: scripts/kernel-doc -v -none $(find drivers/iio/ -name \*.c \ -exec head -2 {} \+ | grep -B2 -e '\*\*' | grep '==' | cut -d ' ' -f 2) After, confirm these errors are gone with: scripts/kernel-doc -v -none $(git show --name-only | grep -e "^driver") Signed-off-by: Gwendal Grignou Link: https://lore.kernel.org/r/20210309234314.2208256-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit bbc1308de79368879580635ded6df51d232845ef Author: Alexandru Ardelean Date: Sat Mar 6 18:28:34 2021 +0200 iio: kfifo: mask flags without zero-check in devm_iio_kfifo_buffer_setup() As pointed by Lars, this doesn't require a zero-check. Also, while looking at this a little closer at it (again), the masking can be done later, as there is a zero-check for 'mode_flags' anyway, which returns -EINVAL. And we only need the 'mode_flags' later in the logic. This change is more of a tweak. Fixes: e36db6a06937 ("iio: kfifo: add devm_iio_kfifo_buffer_setup() helper") Cc: Lars-Peter Clausen Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210306162834.7339-1-ardeleanalex@gmail.com Signed-off-by: Jonathan Cameron commit dafcf4ed8392476099c9e95642d2daa6e61ee1b6 Author: Gwendal Grignou Date: Thu Feb 25 17:47:33 2021 -0800 iio: hrtimer: Allow sub Hz granularity Allow setting frequency below 1Hz or sub 1Hz precision. Useful for slow sensors like ALS. Test frequency is set properly: modprobe iio-trig-hrtimer && \ mkdir /sys/kernel/config/iio/triggers/hrtimer/t1 && \ cd /sys/bus/iio/devices/triggerX ; for i in 1 .1 .01 .001 ; do echo $i > sampling_frequency cat sampling_frequency done Signed-off-by: Gwendal Grignou Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210226014733.2108544-1-gwendal@chromium.org Signed-off-by: Jonathan Cameron commit 7b3589f49b824e718c319dbd31535c608a410a55 Author: Baruch Siach Date: Tue Feb 23 14:12:23 2021 +0200 staging: iio: remove mention of defunct list The ADI device-drivers-devel list no longer exists. Cc: Mike Frysinger Signed-off-by: Baruch Siach Link: https://lore.kernel.org/r/69b3e45e7666a1dd74a83df0b84ef8a63bf090ea.1614082343.git.baruch@tkos.co.il Signed-off-by: Jonathan Cameron commit 9013b1d970455d50154e8dec31b7c0e3040f01c3 Author: Sean Nyekjaer Date: Mon Mar 1 09:00:28 2021 +0100 iio: accel: mma8452: fix indentation Improve readability by fixing indentation. Signed-off-by: Sean Nyekjaer Link: https://lore.kernel.org/r/20210301080029.1974797-1-sean@geanix.com Signed-off-by: Jonathan Cameron commit 6a878e70e88b53c015cae1a3898c17db4b4cb199 Author: Ivan Mikhaylov Date: Thu Feb 25 23:14:44 2021 +0300 iio: proximity: vcnl3020: add proximity rate Add the proximity rate optional option and handling of it for vishay vcnl3020. Signed-off-by: Ivan Mikhaylov Link: https://lore.kernel.org/r/20210225201444.12983-2-i.mikhaylov@yadro.com Signed-off-by: Jonathan Cameron commit 08dfc6f8aa5d443c81347f6ea876d833f5aedcf6 Author: Sergiu Cuciurean Date: Mon Sep 28 16:13:31 2020 +0300 iio: adc: npcm_adc: Replace indio_dev->mlock with own device lock As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state structure. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Mircea Caprioru Link: https://lore.kernel.org/r/20200928131333.36646-3-mircea.caprioru@analog.com Signed-off-by: Jonathan Cameron commit 3a27d11fbf58e7b29930376b0b869882c780dd5b Author: Sergiu Cuciurean Date: Mon Sep 28 16:13:30 2020 +0300 iio: adc: palmas_gpadc: Replace indio_dev->mlock with own device lock As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state structure. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Mircea Caprioru Link: https://lore.kernel.org/r/20200928131333.36646-2-mircea.caprioru@analog.com Signed-off-by: Jonathan Cameron commit 31e2d42a86201d32c345bebd4d324b8d8424f4c2 Author: Sergiu Cuciurean Date: Mon Sep 28 16:13:29 2020 +0300 iio: adc: spear_adc: Replace indio_dev->mlock with own device lock As part of the general cleanup of indio_dev->mlock, this change replaces it with a local lock on the device's state structure. This is part of a bigger cleanup. Link: https://lore.kernel.org/linux-iio/CA+U=Dsoo6YABe5ODLp+eFNPGFDjk5ZeQEceGkqjxXcVEhLWubw@mail.gmail.com/ Signed-off-by: Sergiu Cuciurean Signed-off-by: Mircea Caprioru Link: https://lore.kernel.org/r/20200928131333.36646-1-mircea.caprioru@analog.com Signed-off-by: Jonathan Cameron commit 2a94469f736c264a2647abbb9a1862c3fe4d9f66 Author: Jonathan Cameron Date: Sun Jan 17 15:38:15 2021 +0000 iio:ABI docs: Combine the two instances of docs for sensor_sensitivity This control on the gain of a measurement used for time of flight sensing is standard but the expected values for different enviroments may not be. As we cannot have the same ABI element documented in two files, add a generic version to sysfs-bus-iio-proximity and a note on the expected value vs measuring environment for the as3935. Fixes $ scripts/get_abi.pl validate Warning: /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-distance-srf08:0 ./Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935:8 Cc: Matt Ranostay Reported-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Reviewed-by: Matt Ranostay Link: https://lore.kernel.org/r/20210117153816.696693-7-jic23@kernel.org Signed-off-by: Jonathan Cameron commit 4abbaf29dfd8336334c1791ae0e96095ae1cf438 Author: Jonathan Cameron Date: Sun Jan 17 15:38:14 2021 +0000 iio:ABI docs: Combine sysfs-bus-iio-humidity-hdc2010/hdc100x into one file These contain only one entry for out_current_heater_raw (_available). Document this in a new sysfs-bus-iio-humidity file, and make it a little more generic by allowing for non 0/1 values. Fixes $ scripts/get_abi.pl validate Warning: /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc2010:0 ./Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x:0 Warning: /sys/bus/iio/devices/iio:deviceX/out_current_heater_raw_available is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc2010:1 ./Documentation/ABI/testing/sysfs-bus-iio-humidity-hdc100x:1 Cc: Eugene Zaikonnikov Cc: Matt Ranostay Reported-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Cameron Reviewed-by: Matt Ranostay Link: https://lore.kernel.org/r/20210117153816.696693-6-jic23@kernel.org commit 8d295fbad687a61eaa0cf14958c284a3ddbf2173 Author: Mauro Carvalho Chehab Date: Thu Mar 25 19:14:25 2021 +0100 kernel-doc: better handle '::' sequences Right now, if one of the following headers end with a '::', the kernel-doc script will do the wrong thing: description|context|returns?|notes?|examples? The real issue is with examples, as people could try to write something like: example:: /* Some C code */ and this won't be properly evaluated. So, improve the regex to not catch '\w+::' regex for the above identifiers. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/2cf44cf1fa42588632735d4fbc8e84304bdc235f.1616696051.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 73cdf82a3dcdc4f50081041ec07e6c47e44692c0 Merge: 5acac83bf2e42 cbe16f35bee68 Author: Dmitry Torokhov Date: Thu Mar 25 11:47:05 2021 -0700 Merge tag 'irq-no-autoen-2021-03-25' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next Sync up with the tip tree to pick up IRQF_NO_AUTOEN. commit 5acac83bf2e42f51ab9fd315d657798754bf0bb8 Merge: 84c36ab7a6dde 0d02ec6b3136c Author: Dmitry Torokhov Date: Thu Mar 25 11:46:10 2021 -0700 Merge tag 'v5.12-rc4' into next Sync up with the mainline to bring in newest APIs. commit 4b9d49d1ec8dcf9851a132e510c1fd176a6561d1 Author: Thorsten Leemhuis Date: Fri Mar 19 20:27:49 2021 +0100 docs: reporting-issues.rst: improved process esp. for stable regressions Provide a shorter and easier process for users that deal with regressions in stable and longterm kernels, as those should be reported quickly. To realize this in the least-confusing way and without having steps multiple times in different places, split the 'search for existing reports' into two. That has the additinal benefit that users will search for them quickly when going through the step by step guide and thus will save them trouble if the find reports. Signed-off-by: Thorsten Leemhuis CC: Randy Dunlap Link: https://lore.kernel.org/r/d934c15e536bceeff5c40a126930ddf803548e08.1616181657.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 9bc4430db5b5e13539b51edd3cc049ac200140a3 Author: Thorsten Leemhuis Date: Fri Mar 19 20:27:48 2021 +0100 docs: reporting-issues.rst: duplicate sections for reviewing purposes This duplicates two section to make the diff in the next patch a bit easier to gasp for humans. Straight copy, no content changes. Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/ef85edc8466f035eb243dd6629429ad4fd0565d8.1616181657.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 4f08d7ab90b53335e63c00b6c2c3000084540184 Author: Thorsten Leemhuis Date: Fri Mar 19 20:27:47 2021 +0100 docs: reporting-issues.rst: reorder some steps Reorder some steps where the order in which the readers perform them is not crucial. This is a preparation for a later change that would make the text much more complex otherwise. Content just moved, not changed at all in the process. Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/8dfc58efde25a05ccf9bf85929826c4b1b9e09c5.1616181657.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 2dfa9eb0ff9548010c9506bf12327b5b3f9c0b7a Author: Thorsten Leemhuis Date: Fri Mar 19 20:27:46 2021 +0100 docs: reporting-issues.rst: tone down 'test vanilla mainline' a little Tell users that reporting bugs with vendor kernels which are only slightly patched can be okay in some situations, but point out there's a risk in doing so. Adjust some related sections to make them compatible and a bit clearer. At the same time make them less daunting: we want users to report bugs, even if they can't test vanilla mainline kernel. Signed-off-by: Thorsten Leemhuis CC: Randy Dunlap Link: https://lore.kernel.org/r/652ee20eb36228f5d7ca842299faa4cb472feedb.1616181657.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 613f969117c241a7d9867cfeca2ee1e0b60edffb Author: Thorsten Leemhuis Date: Fri Mar 19 20:27:45 2021 +0100 docs: reporting-issues.rst: fix small typos and style issues Fix a typo and change "head over" to "scroll down", as suggested by Jon when reviewing another patch that used the phrase the same way. Signed-off-by: Thorsten Leemhuis Link: https://lore.kernel.org/r/fb845d2f1db6138337203bbfac419c04b5f28053.1616181657.git.linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 84c36ab7a6ddeab213c979d22b6372f71d738862 Author: Linus Walleij Date: Mon Mar 22 20:25:26 2021 -0700 Input: cyttsp - verbose error on soft reset The first thing the Cypress driver does when starting up is to try a soft reset. This is the first point where the driver SPI/I2C communication can fail, so put out some nice debug text: cyttsp-spi spi2.0: failed to send soft reset Instead of just: cyttsp-spi: probe of spi2.0 failed with error -5 This is more helpful. Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210322221349.1116666-1-linus.walleij@linaro.org Signed-off-by: Dmitry Torokhov commit 55f2645c92bda7281adb81a806cd0a014ca9702e Author: Jeff LaBundy Date: Mon Mar 22 20:16:40 2021 -0700 dt-bindings: input: iqs5xx: Convert to YAML This patch converts the legacy text-based binding document to YAML format. Extraneous details and touchscreen properties that weren't actually supported have been dropped. The reset GPIO has since been made optional in the driver; this is now reflected here as well. Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210323021006.367-2-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit 9d41359caca7cdc6d3011ba4e485e89d40505e81 Author: Jeff LaBundy Date: Mon Mar 22 20:15:32 2021 -0700 Input: iqs5xx - make reset GPIO optional The device's hardware reset pin is only required if the platform must be able to update the device's firmware. As such, demote the reset GPIO to optional in support of devices that ship with pre-programmed firmware and don't route the reset pin back to the SoC. In that case, the 'fw_file' attribute is hidden because there is no way to open the bootloader. The logic is extended to the case in which the device does not advertise bootloader support in the first place. Last but not least, remove the hardware reset performed at probe because there is no reason to reset the device manually. A power on reset function already ensures a clean reset at start-up. Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210323021006.367-1-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit f1d2809de97adc422967b6de59f0f6199769eb93 Author: Jeff LaBundy Date: Mon Mar 22 16:43:58 2021 -0700 Input: Add support for Azoteq IQS626A This patch adds support for the Azoteq IQS626A capacitive touch controller. Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210301234928.4298-5-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit a8f1f0dc865cd52e71bf083fb3414d35724d9b48 Author: Jeff LaBundy Date: Mon Mar 22 16:43:12 2021 -0700 dt-bindings: input: Add bindings for Azoteq IQS626A This patch adds device tree bindings for the Azoteq IQS626A capacitive touch controller. Signed-off-by: Jeff LaBundy Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210301234928.4298-4-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit 51e01fc04f1285b0e515a5262fc58682565d859c Author: Jeff LaBundy Date: Mon Mar 22 16:43:00 2021 -0700 Input: touchscreen - broaden use-cases described in comments Now that the helper functions have been moved to drivers/input/ so that all input devices may use them, the introductory comments can be updated to remove any implication that the helper functions are solely limited to touchscreens. This patch also scrubs any remaining use of 'DT' since there isn't any actual dependency on OF. A minor spelling error is resolved as well ('setups' -> 'sets up'). Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210301234928.4298-3-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit e28b5c8d0aaee116a0dd42c602fd667f8ffe2629 Author: Jeff LaBundy Date: Mon Mar 22 16:42:25 2021 -0700 Input: touchscreen - move helper functions to core Some devices outside of drivers/input/touchscreen/ can still make use of the touchscreen helper functions. Therefore, it was agreed in [1] to move them outside of drivers/input/touchscreen/ so that other devices can call them without INPUT_TOUCHSCREEN being set. As part of this change, 'of' is dropped from the filename because the helpers no longer actually use OF. No changes are made to the file contents whatsoever. Based on the feedback in [2], the corresponding binding documents (touchscreen.yaml and touchscreen.txt) are left in their original locations. [1] https://patchwork.kernel.org/patch/11924029/ [2] https://patchwork.kernel.org/patch/12042037/ Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210301234928.4298-2-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit c75cf86201e37c2dd6b8077ed6de2776471f5be5 Author: Dmitry Torokhov Date: Mon Mar 22 14:55:28 2021 -0700 Input: wacom_i2c - switch to using managed resources This simplifies error unwinding path and allows us to get rid of remove() method. Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20210321220043.318239-2-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit b6621f72cc88ef5ed8341bea8104a0f5a72d07a2 Author: Dmitry Torokhov Date: Mon Mar 22 14:55:05 2021 -0700 Input: wacom_i2c - do not force interrupt trigger Instead of forcing interrupt trigger to "level low" rely on the platform to set it up according to how it is wired on the given board. Reviewed-by: Alistair Francis Link: https://lore.kernel.org/r/20210321220043.318239-1-dmitry.torokhov@gmail.com Signed-off-by: Dmitry Torokhov commit 95a6d961401d7e7e4cdd15c5c454b335d71dd0b5 Author: Jeff LaBundy Date: Sun Mar 21 21:04:17 2021 -0700 Input: iqs5xx - close bootloader using hardware reset The bootloader can be closed using the 'execute' command (0x02) or hardware reset. Rather than using the former option for successful firmware update procedures and reserving the latter for recovering the device upon failure, simply use hardware reset for all cases. The post-bootloader initialization delay increases marginally when triggered by a hardware reset, so increase the wait time to ensure the device does not subsequently fail to respond. As part of this change, refactor the return path to avoid an extra assignment and to make the logic a bit smaller. Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210313191236.4366-6-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit e7d8e88aec888d4053f4b2be573ab63a39313f83 Author: Jeff LaBundy Date: Sun Mar 21 21:03:16 2021 -0700 Input: iqs5xx - remove superfluous revision validation The vendor-assigned firmware project number is restricted to the generic project number (15); however the vendor may assign other project numbers to specific applications and customers. These custom project numbers may be based on forwards-compatible firmware revision 1.x. However, the driver unnecessarily rejects anything older than firmware revision 2.0. To support other applications, remove these unnecessarily strict checks and enter the bootloader only for truly incompatible A000 devices. Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210313191236.4366-5-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit 509c0083132bdca505a17140bc98a8365bf4e6ca Author: Jeff LaBundy Date: Sun Mar 21 21:02:11 2021 -0700 Input: iqs5xx - expose firmware revision to user space Add the read-only 'fw_info' attribute which reports information about the device's firmware in the following format: a.b.c.d:e.f Where: a = Product number (e.g. 40 for IQS550) b = Project number (e.g. 15) c = Firmware revision (major) d = Firmware revision (minor) e = Customer-assigned exported file version (major) f = Customer-assigned exported file version (minor) As part of the corresponding rework to uses of 'bl_status', the IQS5XX_BL_STATUS_RESET definition is dropped with 0 used in its place instead. Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210313191236.4366-4-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit 40c3efdc0b77d3f5298c9ce4fcb029da30f887e5 Author: Jeff LaBundy Date: Sun Mar 21 21:01:35 2021 -0700 Input: iqs5xx - optimize axis definition and validation Set the maximum ABS_MT_PRESSURE value and use the existing U16_MAX definition instead of a magic number to validate ABS_MT_POSITION_X and ABS_MT_POSITION_Y. Also use input_set_abs_params() rather than input_abs_set_max() to avoid having to call input_set_capability() separately. Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210313191236.4366-3-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit 0cdd2e906cf321e9a736b94d22e6603f6f515ee8 Author: Jeff LaBundy Date: Sun Mar 21 21:00:24 2021 -0700 Input: iqs5xx - update vendor's URL Replace 'http' with 'https' and correct the spelling of the nearby word 'datasheet'. Signed-off-by: Jeff LaBundy Link: https://lore.kernel.org/r/20210313191236.4366-2-jeff@labundy.com Signed-off-by: Dmitry Torokhov commit 4c976acb47bd4262ebf469698d26e1b8f4a338b4 Author: Bhaskar Chowdhury Date: Sun Mar 21 20:31:36 2021 -0700 Input: silead - fix a typo s/subsytem/subsystem/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210322022030.3857089-1-unixbhaskar@gmail.com Signed-off-by: Dmitry Torokhov commit c9efb0ba281e88e2faec6ad919be509b6ab8ead6 Author: Paul Cercueil Date: Sun Mar 21 16:09:29 2021 -0700 Input: gpio-keys - use hrtimer for software debounce, if possible We want to be able to report the input event as soon as the debounce delay elapsed. However, the current code does not really ensure that, as it uses the jiffies-based schedule_delayed_work() API. With a small enough HZ value (HZ <= 100), this results in some input events being lost, when a key is quickly pressed then released (on a human's time scale). Switching to hrtimers fixes this issue, and will work even on extremely low HZ values (tested at HZ=24). This is however only possible if reading the GPIO is possible without sleeping. If this condition is not met, the previous approach of using a jiffies-based timer is taken. Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20210307222240.380583-3-paul@crapouillou.net Signed-off-by: Dmitry Torokhov commit 019002f20cb5b9f78d39360aff244265d035e08a Author: Paul Cercueil Date: Sun Mar 21 16:06:34 2021 -0700 Input: gpio-keys - use hrtimer for release timer Dealing with input, timing is important; if the button should be released in one millisecond, then it should be done in one millisecond and not a hundred milliseconds. Therefore, the standard timer API is not really suitable for this task. Convert the gpio-keys driver to use a hrtimer instead of the standard timer to address this issue. Note that by using a hard IRQ for the hrtimer callback, we can get rid of the spin_lock_irqsave() and spin_unlock_irqrestore(). Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20210307222240.380583-2-paul@crapouillou.net Signed-off-by: Dmitry Torokhov commit 36a8fc6fa230eb936385884391cac80420cd0e6f Author: Paul Cercueil Date: Sun Mar 21 16:06:23 2021 -0700 Input: gpio-keys - remove extra call to input_sync The input_sync() function is already called after the loop in gpio_keys_report_state(), so it does not need to be called after each iteration within gpio_keys_gpio_report_event(). Signed-off-by: Paul Cercueil Link: https://lore.kernel.org/r/20210307222240.380583-1-paul@crapouillou.net Signed-off-by: Dmitry Torokhov commit 6484e7581732d2785fc754f598f26fd4239b03c6 Author: Heikki Krogerus Date: Sun Mar 21 16:01:14 2021 -0700 Input: rotary-encoder - update docs according to the latest API changes The old device property API is about to be removed, so explaing how to use complete software nodes instead. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210304090948.27014-1-heikki.krogerus@linux.intel.com Signed-off-by: Dmitry Torokhov commit 5b0e6fd8c505ec8a01e0ea5d78f2b707c91cf2c4 Author: Krzysztof Kozlowski Date: Sun Mar 21 15:44:44 2021 -0700 dt-bindings: input: atmel,maxtouch: add wakeup-source The touchscreen can be a wake up source and it's being used in DTS: arch/arm/boot/dts/exynos5250-spring.dt.yaml: trackpad@4b: 'wakeup-source' does not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210212163806.69996-1-krzk@kernel.org Signed-off-by: Dmitry Torokhov commit 8f50743feedd9a4d322322ef1d91426401e98e10 Author: Uwe Kleine-König Date: Sun Mar 21 15:24:12 2021 -0700 Input: max8997 - simplify open coding of a division using up to 64 divisions The for loop is just a complicate way to express a division. Replace it by the actual division which is both simpler to understand for a human and more efficient for a CPU to calculate. Signed-off-by: Uwe Kleine-König Link: https://lore.kernel.org/r/20210316212233.50765-1-uwe@kleine-koenig.org Signed-off-by: Dmitry Torokhov commit 4f30ba1cce36d413c46097c1f3f96891c662a6d6 Author: Linus Walleij Date: Thu Mar 25 15:13:04 2021 +0100 arm64: barrier: Remove spec_bar() macro The spec_bar() macro was introduced in commit bd4fb6d270bc ("arm64: Add support for SB barrier and patch in over DSB; ISB sequences") as a way for C to insert a speculation barrier and was then used in one single place: set_fs(). Later on commit 3d2403fd10a1 ("arm64: uaccess: remove set_fs()") deleted set_fs() altogether and as noted in the commit on the new path the regular sb() assembly macro will be used. Delete the remnant. Cc: Mark Rutland Signed-off-by: Linus Walleij Acked-by: Mark Rutland Link: https://lore.kernel.org/r/20210325141304.1607595-1-linus.walleij@linaro.org Signed-off-by: Catalin Marinas commit 33282cc7cf3debac63eb7bc33f04922ec4da9297 Author: Wu XiangCheng Date: Thu Mar 18 15:20:48 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/init.rst Add translation zh_CN/admin-guide/init.rst, and link it to zh_CN/admin-guide/index.rst while clean its todo entry. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/cd2fd8d0ea2ad50afc6bd2abe15eba73b6c7940c.1616050069.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit e54882ff38c5a68fe95781286a799eb755c6d2ca Author: Wu XiangCheng Date: Thu Mar 18 15:20:29 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/tainted-kernels.rst Add translation zh_CN/admin-guide/tainted-kernels.rst, and link it to zh_CN/admin-guide/index.rst while clean its todo entry. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/189f2403ad168dafb4d5e50847c235064a2acaad.1616050069.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 2d153571003b22f35caa90305801d04af4703e72 Author: Wu XiangCheng Date: Thu Mar 18 15:20:11 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/security-bugs.rst Add translation zh_CN/admin-guide/security-bugs.rst, and link it to zh_CN/admin-guide/index.rst while clean its todo entry. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/f4210d304fa3f0b2a6e9eb798f63bf2e267231a0.1616050069.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit b1b381e2c0d6d45ee4407af72c031c7184b72deb Author: Wu XiangCheng Date: Thu Mar 18 15:19:58 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/bug-hunting.rst Add translation zh_CN/admin-guide/bug-hunting.rst, and link it to zh_CN/admin-guide/index.rst while clean its todo entry. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/dad9f26205e9cae7254ed21c796688851ca5ebfd.1616050069.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 84dc0c20e89849c24907d682b842d90a40add779 Author: Wu XiangCheng Date: Thu Mar 18 15:19:39 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/bug-bisect.rst Add translation zh_CN/admin-guide/bug-bisect.rst, and link it to zh_CN/admin-guide/index.rst while clean its todo entry. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/b9106f76fdc8e20ce4fcd43aec499f00df411610.1616050069.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit d5d444d0ea860a9b58741b78c3e8be9585ccd83f Author: Wu XiangCheng Date: Thu Mar 18 15:19:17 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/reporting-issues Add translation zh_CN/admin-guide/reporting-issues.rst, and link it to zh_CN/admin-guide/index.rst. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/13d126d5a210988728c76398436c62f1fb25fb0c.1616050069.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 1ccc4a39cc5cd6852576cfbc5d8f1d2b3ae7b800 Author: Bhaskar Chowdhury Date: Fri Mar 19 07:28:48 2021 +0530 docs: filesystems: Fix a mundane typo s/provisoned/provisioned/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Acked-by: OGAWA Hirofumi Link: https://lore.kernel.org/r/20210319015848.19515-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit ee4b4c9f9492e750f7d2142b8bf4f169fea1f5a5 Author: Dan Carpenter Date: Fri Mar 19 17:46:01 2021 +0300 Documentation: megaraid: fix spelling "consistend" => "consistent" Change the spelling from "consistend" to "consistent". Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YFS5KV7ejNoZmt6H@mwanda Signed-off-by: Jonathan Corbet commit 1e528e9ea21467c680e2d235add841f088b3a1c7 Author: Bhaskar Chowdhury Date: Mon Mar 22 11:52:37 2021 +0530 docs: powerpc: Fix a typo s/struture/structure/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210322062237.2971314-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 3337c3a1524bf2387ea1fbb0b8338e75530682c3 Author: Dwaipayan Ray Date: Mon Mar 22 13:51:39 2021 +0530 docs: document all error message types in checkpatch All the error message types now have a verbose description. Also there are two new groups of message types: - Macros, Attributes and Symbols - Functions and Variables Rearrange the message types to fit these new groups as needed. Signed-off-by: Dwaipayan Ray Reviewed-by: Lukas Bulwahn Link: https://lore.kernel.org/r/20210322082139.33822-1-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet commit 3501c960dfda9153c7d3d26921f14bcb107ccb73 Author: Wu XiangCheng Date: Tue Mar 23 17:16:52 2021 +0800 docs/zh_CN: Add translations in zh_CN/kernel-hacking/ Add new translations * Documentation/translations/zh_CN/kernel-hacking/index.rst * Documentation/translations/zh_CN/kernel-hacking/hacking.rst And link them to zh_CN/index.rst. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210323091651.GA23904@mipc Signed-off-by: Jonathan Corbet commit c3fa459b69bc55c10efb53160c5b933648477209 Author: SeongJae Park Date: Mon Mar 8 08:57:01 2021 +0100 docs/kokr: make sections on bug reporting match practice Translate this commit to Korean: cf6d6fc27936 ("docs: process/howto.rst: make sections on bug reporting match practice") Signed-off-by: SeongJae Park Link: https://lore.kernel.org/r/20210308075701.23411-1-sj38.park@gmail.com Signed-off-by: Jonathan Corbet commit 2379d15a7c303421689ab2a853553ec460fbb2c5 Author: Bryan Brattlof Date: Tue Mar 23 14:55:59 2021 +0000 Documentation: gpio: chip should be plural Signed-off-by: Bryan Brattlof Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210323145509.139393-1-hello@bryanbrattlof.com Signed-off-by: Jonathan Corbet commit eef07b9e0925e16457ab9444b56a7f93b541aee3 Author: Argus Lin Date: Wed Mar 10 21:33:06 2021 +0800 ASoC: mediatek: mt6359: add MT6359 accdet jack driver MT6359 audio codec supports jack detection feature, adds MT6359 accdet driver to support jack plugged detection and key detection. Signed-off-by: Argus Lin Link: https://lore.kernel.org/r/1615383186-18500-3-git-send-email-argus.lin@mediatek.com Signed-off-by: Mark Brown commit e61c589587c772c5f672b22683c3e0b38be20702 Author: Argus Lin Date: Wed Mar 10 21:33:05 2021 +0800 ASoC: mt6359: add ASoC mt6359 ASoC accdet jack document This patch adds MediaTek MT6359 ASoC accdet jack document. Signed-off-by: Argus Lin Link: https://lore.kernel.org/r/1615383186-18500-2-git-send-email-argus.lin@mediatek.com Signed-off-by: Mark Brown commit 399bfc8b2918b94a9a1d7b3b1fc9b706b1b81190 Author: Bhaskar Chowdhury Date: Wed Mar 24 13:30:46 2021 +0530 docs: rbtree.rst: Fix a typo s/maintanence/maintenance/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210324080046.20709-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 85c0ed12f72f1f39df76aefcfe3184c62cf47c3c Merge: 3ed4c84cc7ac5 2801a62dfad46 Author: Mark Brown Date: Thu Mar 25 17:32:02 2021 +0000 Merge series "enable flexspi support on imx8mp" from Heiko Schocher : add compatible entry in nxp_fspi driver for imx8mp @Shawn: If this series is accepted, can you apply the DTS patches from series v2? http://lists.infradead.org/pipermail/linux-arm-kernel/2021-March/643292.html http://lists.infradead.org/pipermail/linux-arm-kernel/2021-March/643293.html Changes in v4: rebased against: git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next a43e89624baea ("Merge remote-tracking branch 'spi/for-5.13' into spi-next") Changes in v3: - seperate spi changes from series: http://lists.infradead.org/pipermail/linux-arm-kernel/2021-March/643289.html into own series as Kuldeep suggested and rebased against git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next 144c79ef33536 ("Merge tag 'perf-tools-fixes-for-v5.12-2020-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux") - no changes, rebased against git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next 144c79ef33536 Merge tag 'perf-tools-fixes-for-v5.12-2020-03-07' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux Changes in v2: - work in comments from Marco add own compatible entry for imx8mp Heiko Schocher (2): spi: fspi: enable fspi driver for on imx8mp dt-bindings: spi: add compatible entry for imx8mp in FlexSPI controller Documentation/devicetree/bindings/spi/spi-nxp-fspi.txt | 1 + drivers/spi/spi-nxp-fspi.c | 1 + 2 files changed, 2 insertions(+) -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel commit e49bcf4f5579828d4d77e5fcc9cb799db69d1f85 Merge: b9af3fb7759d8 39f8405c3e502 Author: Mark Brown Date: Thu Mar 25 17:32:00 2021 +0000 Merge series "Add audio driver base on rpmsg on i.MX platform" from Shengjiu Wang : On Asymmetric multiprocessor, there is Cortex-A core and Cortex-M core, Linux is running on A core, RTOS is running on M core. The audio hardware device can be controlled by Cortex-M device, So audio playback/capture can be handled by M core. Rpmsg is the interface for sending and receiving msg to and from M core, that we can create a virtual sound on Cortex-A core side. A core will tell the Cortex-M core sound format/rate/channel, where is the data buffer, what is the period size, when to start, when to stop and when suspend or resume happen, each of this behavior there is defined rpmsg command. Especially we designed the low power audio case, that is to allocate a large buffer and fill the data, then Cortex-A core can go to sleep mode, Cortex-M core continue to play the sound, when the buffer is consumed, Cortex-M core will trigger the Cortex-A core to wakeup to fill data. changes in v5: - remove unneeded property in binding doc and driver - update binding doc according to Rob's comments. - Fix link issue reported by kernel test robot changes in v4: - remove the sound card node, merge the property to cpu dai node according to Rob's comments. - sound card device will be registered by cpu dai driver. - Fix do_div issue reported by kernel test robot changes in v3: - add local refcount for clk enablement in hw_params() - update the document according Rob's comments changes in v2: - update codes and comments according to Mark's comments Shengjiu Wang (6): ASoC: soc-component: Add snd_soc_pcm_component_ack ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg audio device ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg .../devicetree/bindings/sound/fsl,rpmsg.yaml | 108 +++ include/sound/soc-component.h | 3 + sound/soc/fsl/Kconfig | 30 + sound/soc/fsl/Makefile | 6 + sound/soc/fsl/fsl_rpmsg.c | 279 ++++++ sound/soc/fsl/fsl_rpmsg.h | 35 + sound/soc/fsl/imx-audio-rpmsg.c | 140 +++ sound/soc/fsl/imx-pcm-rpmsg.c | 918 ++++++++++++++++++ sound/soc/fsl/imx-pcm-rpmsg.h | 512 ++++++++++ sound/soc/fsl/imx-rpmsg.c | 150 +++ sound/soc/soc-component.c | 14 + sound/soc/soc-pcm.c | 2 + 12 files changed, 2197 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml create mode 100644 sound/soc/fsl/fsl_rpmsg.c create mode 100644 sound/soc/fsl/fsl_rpmsg.h create mode 100644 sound/soc/fsl/imx-audio-rpmsg.c create mode 100644 sound/soc/fsl/imx-pcm-rpmsg.c create mode 100644 sound/soc/fsl/imx-pcm-rpmsg.h create mode 100644 sound/soc/fsl/imx-rpmsg.c -- 2.27.0 commit b9af3fb7759d891eb7895f8d6ad737905c6806b2 Merge: 99067c07e8d87 d908b922c7179 Author: Mark Brown Date: Thu Mar 25 17:31:59 2021 +0000 Merge series "ASoC: soc.h: small cleanups" from Kuninori Morimoto : Hi Mark These are small cleanups for soc.h Kuninori Morimoto (3): ASoC: soc.h: add asoc_link_to_cpu/codec/platform() macro ASoC: soc.h: fixup return timing for snd_soc_fixup_dai_links_platform_name() ASoC: soc.h: return error if multi platform at snd_soc_fixup_dai_links_platform_name() include/sound/soc.h | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) -- 2.25.1 Thank you for your help !! Best regards --- Kuninori Morimoto commit 655c447c97d7fe462e6cd9e15809037be028bc70 Author: Zhen Lei Date: Wed Mar 24 16:16:03 2021 +0800 iommu/arm-smmu-v3: add bit field SFM into GERROR_ERR_MASK In arm_smmu_gerror_handler(), the value of the SMMU_GERROR register is filtered by GERROR_ERR_MASK. However, the GERROR_ERR_MASK does not contain the SFM bit. As a result, the subsequent error processing is not performed when only the SFM error occurs. Fixes: 48ec83bcbcf5 ("iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices") Reported-by: Rui Zhu Signed-off-by: Zhen Lei Link: https://lore.kernel.org/r/20210324081603.1074-1-thunder.leizhen@huawei.com Signed-off-by: Will Deacon commit 6e457914935a3161eeb74e319abf9fd511aa1e4d Author: Sebastian Andrzej Siewior Date: Tue Mar 23 10:22:21 2021 +0100 drm/i915: Use tasklet_unlock_spin_wait() in __tasklet_disable_sync_once() The i915 driver has its own tasklet interface which was overseen in the tasklet rework. __tasklet_disable_sync_once() is a wrapper around tasklet_unlock_wait(). tasklet_unlock_wait() might sleep, but the i915 wrappers invokes it from non-preemtible contexts with bottom halves disabled. Use tasklet_unlock_spin_wait() instead which can be invoked from non-preemptible contexts. Fixes: da044747401fc ("tasklets: Replace spin wait in tasklet_unlock_wait()") Reported-by: kernel test robot Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210323092221.awq7g5b2muzypjw3@flow commit 7dd847523ed527cc8e90ca670675ea63d6239f64 Author: Suman Anna Date: Mon Mar 22 13:54:30 2021 -0500 arm64: dts: ti: k3-am642-evm/sk: Add IPC sub-mailbox nodes Add the sub-mailbox nodes that are used to communicate between MPU and various remote processors present in the AM64x SoCs for the AM642 EVM and AM642 SK boards. These include the R5F remote processors in the two dual-R5F clusters (MAIN_R5FSS0 & MAIN_R5FSS1) in the MAIN domain; and a M4 processor in the MCU safety island. These sub-mailbox nodes utilize the System Mailbox clusters 2, 4 and 6. The remaining clusters 3, 5 and 7 are currently not used, and so are disabled. Clusters 0 and 1 were never added to the dts file as they do not support interrupts towards the A53 core. The sub-mailbox nodes added match the hard-coded mailbox configuration used within the TI RTOS IPC software packages. The R5F processor sub-systems are assumed to be running in Split mode, so a sub-mailbox node is used by each of the R5F cores. Only the sub-mailbox node for the first R5F core in each cluster is used in case of a Single-CPU mode for that R5F cluster. NOTE: The cluster nodes only have the Mailbox IP interrupt outputs that are routed to the GIC_SPI. The sub-mailbox nodes' irq-id are indexing into the listed interrupts, with the usr-id using the actual interrupt output line number from the Mailbox IP. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Gowtham Tammana Link: https://lore.kernel.org/r/20210322185430.957-4-s-anna@ti.com commit ef1525761477c18b6b8fd420abb712e38492b480 Author: Suman Anna Date: Mon Mar 22 13:54:29 2021 -0500 arm64: dts: ti: k3-am64-main: Add mailbox cluster nodes The AM64 MAIN domain contains a Mailbox IP instance with multiple clusters, and is a variant of the IP on current AM65x and J721E SoCs. The AM64x SoC has only 8 clusters with no interrupts routed to the A53 core on the first 2 clusters. The interrupt outputs from the IP do not go through any Interrupt Routers and are hard-wired to each processor, with only couple of interrupts from each cluster reaching the A53 core. Add all the Mailbox clusters that generate interrupts towards the A53 core as their own nodes under the cbass_main node instead of creating an almost empty parent node for the Mailbox IP and the clusters as its child nodes. All these nodes are enabled by default in the base dtsi file, but any cluster that does not define any child sub-mailbox nodes should be disabled in the corresponding board dts files. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Gowtham Tammana Link: https://lore.kernel.org/r/20210322185430.957-3-s-anna@ti.com commit 8248d5b3249c8a361c6906e73513769064854252 Author: Suman Anna Date: Mon Mar 22 13:54:28 2021 -0500 arm64: dts: ti: k3-am64-main: Add hwspinlock node The AM64x SoC contains a HwSpinlock IP instance that is a minor variant of the IP on existing TI K3 SoCs such as AM65x, J721E or J7200 SoCs. Add the DT node for this on AM64x SoCs. The node is present within the MAIN domain, and is added as a child node under the cbass_main node. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Gowtham Tammana Link: https://lore.kernel.org/r/20210322185430.957-2-s-anna@ti.com commit 430a67f9d6169a7b3e328bceb2ef9542e4153c7c Author: Paolo Valente Date: Thu Mar 4 18:46:27 2021 +0100 block, bfq: merge bursts of newly-created queues Many throughput-sensitive workloads are made of several parallel I/O flows, with all flows generated by the same application, or more generically by the same task (e.g., system boot). The most counterproductive action with these workloads is plugging I/O dispatch when one of the bfq_queues associated with these flows remains temporarily empty. To avoid this plugging, BFQ has been using a burst-handling mechanism for years now. This mechanism has proven effective for throughput, and not detrimental for service guarantees. This commit pushes this mechanism a little bit further, basing on the following two facts. First, all the I/O flows of a the same application or task contribute to the execution/completion of that common application or task. So the performance figures that matter are total throughput of the flows and task-wide I/O latency. In particular, these flows do not need to be protected from each other, in terms of individual bandwidth or latency. Second, the above fact holds regardless of the number of flows. Putting these two facts together, this commits merges stably the bfq_queues associated with these I/O flows, i.e., with the processes that generate these IO/ flows, regardless of how many the involved processes are. To decide whether a set of bfq_queues is actually associated with the I/O flows of a common application or task, and to merge these queues stably, this commit operates as follows: given a bfq_queue, say Q2, currently being created, and the last bfq_queue, say Q1, created before Q2, Q2 is merged stably with Q1 if - very little time has elapsed since when Q1 was created - Q2 has the same ioprio as Q1 - Q2 belongs to the same group as Q1 Merging bfq_queues also reduces scheduling overhead. A fio test with ten random readers on /dev/nullb shows a throughput boost of 40%, with a quadcore. Since BFQ's execution time amounts to ~50% of the total per-request processing time, the above throughput boost implies that BFQ's overhead is reduced by more than 50%. Tested-by: Jan Kara Signed-off-by: Paolo Valente Tested-by: Oleksandr Natalenko Link: https://lore.kernel.org/r/20210304174627.161-7-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 85686d0dc1946bd9903efb1c130d634f963e4843 Author: Paolo Valente Date: Thu Mar 4 18:46:26 2021 +0100 block, bfq: keep shared queues out of the waker mechanism Shared queues are likely to receive I/O at a high rate. This may deceptively let them be considered as wakers of other queues. But a false waker will unjustly steal bandwidth to its supposedly woken queue. So considering also shared queues in the waking mechanism may cause more control troubles than throughput benefits. This commit keeps shared queues out of the waker-detection mechanism. Tested-by: Jan Kara Signed-off-by: Paolo Valente Tested-by: Oleksandr Natalenko Link: https://lore.kernel.org/r/20210304174627.161-6-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 8c544770092a3d7532d01903b75721e537d87001 Author: Paolo Valente Date: Thu Mar 4 18:46:25 2021 +0100 block, bfq: fix weight-raising resume with !low_latency When the io_latency heuristic is off, bfq_queues must not start to be weight-raised. Unfortunately, by mistake, this may happen when the state of a previously weight-raised bfq_queue is resumed after a queue split. This commit fixes this error. Tested-by: Jan Kara Signed-off-by: Paolo Valente Tested-by: Oleksandr Natalenko Link: https://lore.kernel.org/r/20210304174627.161-5-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 8ef3fc3a043cd4b3dfdb260f02be5f65cc31445d Author: Paolo Valente Date: Thu Mar 4 18:46:24 2021 +0100 block, bfq: make shared queues inherit wakers Consider a bfq_queue bfqq that is about to be merged with another bfq_queue new_bfqq. The processes associated with bfqq are cooperators of the processes associated with new_bfqq. So, if bfqq has a waker, then it is reasonable (and beneficial for throughput) to assume that all these processes will be happy to let bfqq's waker freely inject I/O when they have no I/O. So this commit makes new_bfqq inherit bfqq's waker. Tested-by: Jan Kara Signed-off-by: Paolo Valente Tested-by: Oleksandr Natalenko Link: https://lore.kernel.org/r/20210304174627.161-4-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 7cc4ffc55564df4349050bcbf46fbdf3f35aef52 Author: Paolo Valente Date: Thu Mar 4 18:46:23 2021 +0100 block, bfq: put reqs of waker and woken in dispatch list Consider a new I/O request that arrives for a bfq_queue bfqq. If, when this happens, the only active bfq_queues are bfqq and either its waker bfq_queue or one of its woken bfq_queues, then there is no point in queueing this new I/O request in bfqq for service. In fact, the in-service queue and bfqq agree on serving this new I/O request as soon as possible. So this commit puts this new I/O request directly into the dispatch list. Tested-by: Jan Kara Acked-by: Jan Kara Signed-off-by: Paolo Valente Tested-by: Oleksandr Natalenko Link: https://lore.kernel.org/r/20210304174627.161-3-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 2ec5a5c48373d4bc2f0699f86507a65bf0b9df35 Author: Paolo Valente Date: Thu Mar 4 18:46:22 2021 +0100 block, bfq: always inject I/O of queues blocked by wakers Suppose that I/O dispatch is plugged, to wait for new I/O for the in-service bfq-queue, say bfqq. Suppose then that there is a further bfq_queue woken by bfqq, and that this woken queue has pending I/O. A woken queue does not steal bandwidth from bfqq, because it remains soon without I/O if bfqq is not served. So there is virtually no risk of loss of bandwidth for bfqq if this woken queue has I/O dispatched while bfqq is waiting for new I/O. In contrast, this extra I/O injection boosts throughput. This commit performs this extra injection. Tested-by: Jan Kara Signed-off-by: Paolo Valente Tested-by: Oleksandr Natalenko Link: https://lore.kernel.org/r/20210304174627.161-2-paolo.valente@linaro.org Signed-off-by: Jens Axboe commit 9cf1adc6d34f8bb12333afe189a2999131877ea3 Author: Bhaskar Chowdhury Date: Sat Mar 20 04:22:22 2021 +0530 blk-mq: Sentence reconstruct for better readability Sentence reconstruction for better readability. Signed-off-by: Bhaskar Chowdhury Signed-off-by: Jens Axboe commit ce517f18944e3f8d08484cfdee425277fc2c4df6 Author: Jagan Teki Date: Mon Mar 22 16:03:27 2021 +0530 drm: bridge: Add Chipone ICN6211 MIPI-DSI to RGB bridge ICN6211 is MIPI-DSI to RGB Converter bridge from Chipone. It has a flexible configuration of MIPI DSI signal input and produce RGB565, RGB666, RGB888 output format. Add bridge driver for it. Signed-off-by: Jagan Teki Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210322103328.66442-2-jagan@amarulasolutions.com commit a42e37db23b88120aea9fa31f9c0952accb39296 Author: Jagan Teki Date: Mon Mar 22 16:03:26 2021 +0530 dt-bindings: display: bridge: Add Chipone ICN6211 bindings ICN6211 is MIPI-DSI to RGB Converter bridge from Chipone. It has a flexible configuration of MIPI DSI signal input and produces RGB565, RGB666, RGB888 output format. Add dt-bingings for it. Signed-off-by: Jagan Teki Reviewed-by: Robert Foss Reviewed-by: Rob Herring Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210322103328.66442-1-jagan@amarulasolutions.com commit b8921dccf3b25798409d35155b5d127085de72c2 Author: Sean Christopherson Date: Fri Mar 19 20:22:18 2021 +1300 x86/cpufeatures: Add SGX1 and SGX2 sub-features Add SGX1 and SGX2 feature flags, via CPUID.0x12.0x0.EAX, as scattered features, since adding a new leaf for only two bits would be wasteful. As part of virtualizing SGX, KVM will expose the SGX CPUID leafs to its guest, and to do so correctly needs to query hardware and kernel support for SGX1 and SGX2. Suppress both SGX1 and SGX2 from /proc/cpuinfo. SGX1 basically means SGX, and for SGX2 there is no concrete use case of using it in /proc/cpuinfo. Signed-off-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/d787827dbfca6b3210ac3e432e3ac1202727e786.1616136308.git.kai.huang@intel.com commit e9a15a40e857fc6ccfbb05fec7b184e9003057df Author: Kai Huang Date: Fri Mar 19 20:22:17 2021 +1300 x86/cpufeatures: Make SGX_LC feature bit depend on SGX bit Move SGX_LC feature bit to CPUID dependency table to make clearing all SGX feature bits easier. Also remove clear_sgx_caps() since it is just a wrapper of setup_clear_cpu_cap(X86_FEATURE_SGX) now. Suggested-by: Sean Christopherson Signed-off-by: Kai Huang Signed-off-by: Borislav Petkov Reviewed-by: Sean Christopherson Acked-by: Dave Hansen Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/5d4220fd0a39f52af024d3fa166231c1d498dd10.1616136308.git.kai.huang@intel.com commit fffa69aa6b1c89853cd00dea969e4754633596d7 Author: Jiapeng Chong Date: Sun Feb 7 17:10:00 2021 +0800 drm: bridge: convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/gpu/drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use scnprintf or sprintf. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Robert Foss Signed-off-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/1612689000-64577-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 7dfe553affd0d003c7535b7ba60d09193471ea9d Author: Masahiro Yamada Date: Mon Mar 1 22:15:26 2021 +0900 x86/syscalls: Fix -Wmissing-prototypes warnings from COND_SYSCALL() Building kernel/sys_ni.c with W=1 emits tons of -Wmissing-prototypes warnings: $ make W=1 kernel/sys_ni.o [ snip ] CC kernel/sys_ni.o ./arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__ia32_sys_io_setup' [-Wmissing-prototypes] ... The problem is in __COND_SYSCALL(), the __SYS_STUB0() and __SYS_STUBx() macros defined a few lines above already have forward declarations. Let's do likewise for __COND_SYSCALL() to fix the warnings. Signed-off-by: Masahiro Yamada Signed-off-by: Ingo Molnar Tested-by: Mickaël Salaün Link: https://lore.kernel.org/r/20210301131533.64671-2-masahiroy@kernel.org commit d1a97648ae028a44536927c87837c45ada7141c9 Author: Robert Foss Date: Thu Dec 17 15:09:33 2020 +0100 drm/bridge: lt9611: Fix handling of 4k panels 4k requires two dsi pipes, so don't report MODE_OK when only a single pipe is configured. But rather report MODE_PANEL to signal that requirements of the panel are not being met. Reported-by: Peter Collingbourne Suggested-by: Peter Collingbourne Signed-off-by: Robert Foss Tested-by: John Stultz Tested-by: Anibal Limon Tested-by: Peter Collingbourne Reviewed-by: Bjorn Andersson Acked-by: Vinod Koul Link: https://patchwork.freedesktop.org/patch/msgid/20201217140933.1133969-1-robert.foss@linaro.org commit 5153ceb9e622f4e27de461404edc73324da70f8c Author: Bhaskar Chowdhury Date: Thu Mar 25 10:05:44 2021 +0530 Bluetooth: L2CAP: Rudimentary typo fixes s/minium/minimum/ s/procdure/procedure/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Marcel Holtmann commit 1f4ec585e6618ad75d5a82e58482ea2c5b4b7167 Author: Lokendra Singh Date: Tue Mar 23 11:59:04 2021 -0700 Bluetooth: btintel: Skip reading firmware file version while in bootloader mode This skips parsing the firmware version information from the firmware file while controller is in bootloader mode. As in bootloader mode, we are supposed to patch unconditionally. Signed-off-by: Lokendra Singh Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit 88981354730ce118a76aa030d19fd1308cd2007b Author: Lokendra Singh Date: Tue Mar 23 11:59:03 2021 -0700 Bluetooth: btintel: Collect tlv based active firmware build info in FW mode In Operational firmware mode, 'Minimum FW version' TLV ID is not available. So, we cannot fetch already running firmware info for comparison against another build. However, It can be collected using a combination of other TLV ID's information. Signed-off-by: Lokendra Singh Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit 7de3a42cdc701f4fb09bb4906d69f4014db4af09 Author: Lokendra Singh Date: Tue Mar 23 11:59:02 2021 -0700 Bluetooth: btintel: Reorganized bootloader mode tlv checks in intel_version_tlv parsing This moves limited_cce and sbe_type checks under bootloader during tlv parsing as operational firmware don't have access to these values. Any attempt to read such values in operational firmware will only fetch garbage data. Signed-off-by: Lokendra Singh Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit 604b3cf87fd217ac7d7aeaa94b0bebdf139a8c88 Author: Luiz Augusto von Dentz Date: Tue Mar 23 11:59:01 2021 -0700 Bluetooth: btusb: Consolidate code for waiting firmware to boot This moves duplicated code for waiting firmware download completion to a function that can be reused. Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit 21e31c6501d9c24dae8869628ccc80b36f2a3d01 Author: Luiz Augusto von Dentz Date: Tue Mar 23 11:59:00 2021 -0700 Bluetooth: btusb: Consolidate code for waiting firmware download This moves duplicated code for waiting firmware download completion to a function that can be reused. Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit d68903da4e220d1e6b7c6ecdb853c36144c6acc9 Author: Luiz Augusto von Dentz Date: Tue Mar 23 11:58:59 2021 -0700 Bluetooth: btintel: Consolidate intel_version parsing This moves version checks of intel_version() to btintel_version_info(). Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit 0a460d8fe2db6887169a19b048ea0c90f8bdc3b7 Author: Luiz Augusto von Dentz Date: Tue Mar 23 11:58:58 2021 -0700 Bluetooth: btintel: Consolidate intel_version_tlv parsing This moves version checks of intel_version_tlv() to btintel_version_info_tlv(). Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit 9b16bfbf411664697817385096ce59df453e1fb6 Author: Luiz Augusto von Dentz Date: Tue Mar 23 11:58:57 2021 -0700 Bluetooth: btintel: Move operational checks after version check In order to allow new firmware to load, it first needs to check if the firmware version on file matches the one loaded if it doesn't, then it needs to revert to bootloader mode in order to load the new firmware. Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit ac0565462e330a2b762ca5849a4140b29d725786 Author: Luiz Augusto von Dentz Date: Tue Mar 23 11:58:56 2021 -0700 Bluetooth: btintel: Check firmware version before download This checks the firmware build number, week and year against the repective loaded version. If details are a match, skip the download process. Signed-off-by: Luiz Augusto von Dentz Tested-by: Tedd Ho-Jeong An Signed-off-by: Marcel Holtmann commit a9aa2bb18ecbb8dd04a18d48e40d60e24ba9663d Author: Sai Prakash Ranjan Date: Mon Mar 15 11:32:24 2021 +0530 dt-bindings: arm-smmu: Add compatible for SC7280 SoC Add the SoC specific compatible for SC7280 implementing arm,mmu-500. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Acked-by: Rob Herring Link: https://lore.kernel.org/r/1615788144-29508-1-git-send-email-rnayak@codeaurora.org Signed-off-by: Will Deacon commit 1d282019f3a9f1ff0de00d78736993cfc20ea973 Author: Robert Foss Date: Thu Mar 25 15:51:54 2021 +0100 MAINTAINERS: Update Maintainers of DRM Bridge Drivers Add myself as co-maintainer of DRM Bridge Drivers. Repository commit access has already been granted. https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/338 Signed-off-by: Robert Foss Acked-by: Neil Armstrong Acked-by: Maxime Ripard Acked-by: Laurent Pinchart Acked-by: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Andrzej Hajda Cc: Jernej Škrabec Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210325145154.1433060-1-robert.foss@linaro.org commit 9eda0155e6f134728f3a686101ba3b840051aba3 Author: Dafna Hirschfeld Date: Thu Mar 25 14:07:28 2021 +0100 MAINTAINERS: Add linux-mediatek ML for drm Mediatek drivers Add the linux-mediatek mailing list to drm Mediatek drivers Signed-off-by: Dafna Hirschfeld Signed-off-by: Chun-Kuang Hu commit 22d483b99863202e3631ff66fa0f3c2302c0f96f Author: Christian Brauner Date: Thu Mar 25 09:37:43 2021 +0100 fanotify_user: use upper_32_bits() to verify mask I don't see an obvious reason why the upper 32 bit check needs to be open-coded this way. Switch to upper_32_bits() which is more idiomatic and should conceptually be the same check. Cc: Amir Goldstein Cc: Jan Kara Link: https://lore.kernel.org/r/20210325083742.2334933-1-brauner@kernel.org Signed-off-by: Christian Brauner Signed-off-by: Jan Kara commit bd256fda92efe97b692dc72e246d35fa724d42d8 Author: Chaitanya Kulkarni Date: Sun Feb 7 11:04:23 2021 -0800 ext4: use memcpy_to_page() in pagecache_write() Signed-off-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210207190425.38107-7-chaitanya.kulkarni@wdc.com Signed-off-by: Theodore Ts'o commit 4d93874b9e9ce582fd4401334c88eaf93b6dff43 Author: Chaitanya Kulkarni Date: Sun Feb 7 11:04:22 2021 -0800 ext4: use memcpy_from_page() in pagecache_read() Signed-off-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20210207190425.38107-6-chaitanya.kulkarni@wdc.com Signed-off-by: Theodore Ts'o commit 32e9a0d5ffaffe035f99188602d328665c43f38f Author: Masahiro Yamada Date: Mon Mar 1 15:29:03 2021 +0100 ARM: 9067/1: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts ARM to use scripts/syscallhdr.sh, and also collects OABI/OEBI syscalls into unistd-eabi.h/unistd-oabi.h, removing unistd-common.h. Signed-off-by: Masahiro Yamada Signed-off-by: Russell King commit 0047eb9f0905f797df6dd33b8bcbff9c6b116eda Author: Masahiro Yamada Date: Mon Mar 1 15:28:34 2021 +0100 ARM: 9068/1: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts ARM to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada Acked-by: Linus Walleij Signed-off-by: Russell King commit 3ed4c84cc7ac59dd383f1d77f7b04148ede2548d Author: Eddie James Date: Wed Mar 24 17:05:16 2021 -0500 spi: fsi: Remove multiple sequenced ops for restricted chips Updated restricted chips have trouble processing multiple sequenced operations. So remove the capability to sequence multiple operations and reduce the maximum transfer size to 8 bytes. Signed-off-by: Eddie James Reviewed-by: Joel Stanley Link: https://lore.kernel.org/r/20210324220516.41192-1-eajames@linux.ibm.com Signed-off-by: Mark Brown commit 2801a62dfad46ff228d00126ce8592594c1d0613 Author: Heiko Schocher Date: Tue Mar 16 08:59:28 2021 +0100 dt-bindings: spi: add compatible entry for imx8mp in FlexSPI controller add compatible entry "nxp,imx8mp-fspi" in NXP FlexSPI controller Signed-off-by: Heiko Schocher Link: https://lore.kernel.org/r/20210316075928.1763460-3-hs@denx.de Signed-off-by: Mark Brown commit 0467a97367d4767d284ad46ba0e6413b621256a0 Author: Heiko Schocher Date: Tue Mar 16 08:59:27 2021 +0100 spi: fspi: enable fspi driver for on imx8mp add compatible entry in nxp_fspi driver for imx8mp. Signed-off-by: Heiko Schocher Link: https://lore.kernel.org/r/20210316075928.1763460-2-hs@denx.de Signed-off-by: Mark Brown commit 99067c07e8d877035f6249d194a317c78b7d052d Author: Shengjiu Wang Date: Wed Mar 3 11:07:42 2021 +0800 ASoC: wm8960: Remove bitclk relax condition in wm8960_configure_sysclk The call sequence in wm8960_configure_clocking is ret = wm8960_configure_sysclk(); if (ret >= 0) goto configure_clock; .... ret = wm8960_configure_pll(); configure_clock: ... wm8960_configure_sysclk is called before wm8960_configure_pll, as there is bitclk relax on both functions, so wm8960_configure_sysclk always return success, then wm8960_configure_pll() never be called. With this case: aplay -Dhw:0,0 -d 5 -r 48000 -f S24_LE -c 2 audio48k24b2c.wav the required bitclk is 48000 * 24 * 2 = 2304000, bitclk got from wm8960_configure_sysclk is 3072000, but if go to wm8960_configure_pll. it can get correct bitclk 2304000. So bitclk relax condition should be removed in wm8960_configure_sysclk, then wm8960_configure_pll can be called, and there is also bitclk relax function in wm8960_configure_pll. Fixes: 3c01b9ee2ab9 ("ASoC: codec: wm8960: Relax bit clock computation") Signed-off-by: Shengjiu Wang Signed-off-by: Daniel Baluta Acked-by: Charles Keepax Link: https://lore.kernel.org/r/1614740862-30196-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit df8077c6fe64fe98c1b1c1f9ecf84afc773e726f Author: Shengjiu Wang Date: Wed Mar 17 21:05:03 2021 +0800 ASoC: bindings: fsl-asoc-card: add compatible string for WM8958 codec The WM8958 codec is used on i.MX7D val board. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615986303-27959-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit efd0b1660829a987354cea6a446179c7ac7cd0e6 Author: Shengjiu Wang Date: Wed Mar 17 21:05:02 2021 +0800 ASoC: fsl-asoc-card: Add support for WM8958 codec WM8958 codec is used on some i.MX based platform. So add it support in this generic driver. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615986303-27959-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 7a0d884986f3693aca8a2dc4e1b31d35c508542e Author: Ryan Lee Date: Wed Mar 24 20:35:55 2021 -0700 ASoC: max98373: Added controls for autorestart config 3 new controls are added. "OVC Autorestart Switch" : controls whether or not the speaker amplifier automatically re-enables after an overcurrent fault condition. "THERM Autorestart Switch" : controls whether or not the device automatically resumes playback when the die temperature recovers from thermal shutdown. "CMON Autorestart Switch" : controls whether or not the device automatically resumes playback when the clock returns after stopping. Above Auto Restart functions are enabled by default. Signed-off-by: Ryan Lee Link: https://lore.kernel.org/r/20210325033555.29377-3-ryans.lee@maximintegrated.com Signed-off-by: Mark Brown commit 9f44673b7af2e776b55b1d15b3a35d8e8eb51331 Author: Jack Yu Date: Mon Mar 22 13:50:53 2021 +0800 ASoC: rt1015: Add bclk detection and dc detection Add bclk detection and dc detection before playback. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20210322055053.31797-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 200d925e236f1a839bd52680f13649b23f727d51 Author: Tian Tao Date: Mon Mar 22 11:57:56 2021 +0800 spi: imx: Use of_device_get_match_data() helper Use the of_device_get_match_data() helper instead of open coding. Signed-off-by: Tian Tao Link: https://lore.kernel.org/r/1616385476-53327-1-git-send-email-tiantao6@hisilicon.com Signed-off-by: Mark Brown commit d908b922c71791568384336ccc3d12a8cbcd1777 Author: Kuninori Morimoto Date: Mon Mar 22 11:48:54 2021 +0900 ASoC: soc.h: return error if multi platform at snd_soc_fixup_dai_links_platform_name() snd_soc_fixup_dai_links_platform_name() is assuming it is single platform. return error if multi platforms. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/871rc7aoo9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4a50724eb0ba96b849f4a0c8da28b2b796859f9e Author: Kuninori Morimoto Date: Mon Mar 22 11:48:40 2021 +0900 ASoC: soc.h: fixup return timing for snd_soc_fixup_dai_links_platform_name() Current snd_soc_fixup_dai_links_platform_name() creates name first (A), and checks setup target pointer (B), and set it (C). We should check target pointer first IMO. This patch exchange the order to (B) -> (A) -> (C). int snd_soc_fixup_dai_links_platform_name(...) { ... /* set platform name for each dailink */ for_each_card_prelinks(card, i, dai_link) { (A) name = devm_kstrdup(...); if (!name) return -ENOMEM; (B) if (!dai_link->platforms) return -EINVAL; /* only single platform is supported for now */ (C) dai_link->platforms->name = name; } return 0; } Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/8735wnaoon.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 4da40cb9955c63c3aca02be267faea4abbd2c649 Author: Kuninori Morimoto Date: Mon Mar 22 11:48:15 2021 +0900 ASoC: soc.h: add asoc_link_to_cpu/codec/platform() macro We shouldn't use dai_link->cpus/codecs/platforms directly, because these are array now to supporting multi CPU/Codec/Platform. This patch adds asoc_link_to_xxx() macro for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/874kh3aopc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 39f8405c3e502e7b9d0533fa0b0bfe715b3e89c1 Author: Shengjiu Wang Date: Fri Mar 12 10:38:45 2021 +0800 ASoC: imx-rpmsg: Add machine driver for audio base on rpmsg The platform device is not registered by device tree or cpu dai driver, it is registered by the rpmsg channel, So add a dedicated machine driver to handle this case. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615516725-4975-7-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 3c00eceb2a5391ed1ca6703b71cad35ab8cd4352 Author: Shengjiu Wang Date: Fri Mar 12 10:38:44 2021 +0800 ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg Platform driver based on rpmsg is the interface for sending and receiving rpmsg to and from M core. It will tell the Cortex-M core sound format/rate/channel, where is the data buffer, where is the period size, when to start, when to stop and when suspend or resume happen, each this behavior there is defined rpmsg command. Especially we designed the low power audio case, that is to allocate a large buffer and fill the data, then Cortex-A core can go to sleep mode, Cortex-M core continue to play the sound, when the buffer is consumed, Cortex-M core will trigger the Cortex-A core to wake up. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615516725-4975-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 1935050de0b6c6c961e9de51d5b5d05642f861f1 Author: Shengjiu Wang Date: Fri Mar 12 10:38:43 2021 +0800 ASoC: imx-audio-rpmsg: Add rpmsg_driver for audio channel This driver is used to accept the message from rpmsg audio channel, and if this driver is probed, it will help to register the platform driver, the platform driver will use this audio channel to send and receive messages to and from Cortex-M core. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615516725-4975-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 49c6bf62498344fa8f8af2314231f3eb37e0e150 Author: Shengjiu Wang Date: Fri Mar 12 10:38:42 2021 +0800 ASoC: dt-bindings: fsl_rpmsg: Add binding doc for rpmsg audio device fsl_rpmsg is a virtual audio device. Mapping to real hardware devices are SAI, DMA controlled by Cortex M core. What we see from Linux side is a device which provides audio service by rpmsg channel. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615516725-4975-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit b73d9e6225e86492f6a901223a34ecfa7b55c178 Author: Shengjiu Wang Date: Fri Mar 12 10:38:41 2021 +0800 ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg This is a cpu dai driver for rpmsg audio use case, which is mainly used for getting the user's configuration from devicetree and configure the clocks which is used by Cortex-M core. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615516725-4975-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 8bdfc0455e3a59e2c1207a56be22e910fae0e0d5 Author: Shengjiu Wang Date: Fri Mar 12 10:38:40 2021 +0800 ASoC: soc-component: Add snd_soc_pcm_component_ack Add snd_soc_pcm_component_ack back, which can be used to get an updated buffer pointer in the platform driver. On Asymmetric multiprocessor, this pointer can be sent to Cortex-M core for audio processing. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615516725-4975-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 9b86b1b41e0f48b5b25918e07aeceb00e13d1ce2 Author: Shaokun Zhang Date: Mon Mar 8 14:50:37 2021 +0800 docs: perf: Add new description on HiSilicon uncore PMU v2 Some news functions are added on HiSilicon uncore PMUs. Document them to provide guidance on how to use them. Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Reviewed-by: John Garry Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-10-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit a0ab25cd82eeb68bfa19a4d93a097521af5011b8 Author: Shaokun Zhang Date: Mon Mar 8 14:50:36 2021 +0800 drivers/perf: hisi: Add support for HiSilicon PA PMU driver On HiSilicon Hip09 platform, there is a PA (Protocol Adapter) module on each chip SICL (Super I/O Cluster) which incorporates three Hydra interface and facilitates the cache coherency between the dies on the chip. While PA uncore PMU model is the same as other Hip09 PMU modules and many PMU events are supported. Let's support the PMU driver using the HiSilicon uncore PMU framework. PA PMU supports the following filter functions: * tracetag_en: allows user to count events according to tt_req or tt_core set in L3C PMU. It's the same as other PMUs. * srcid_cmd & srcid_msk: allows user to filter statistics that come from specific CCL/ICL by configuration source ID. * tgtid_cmd & tgtid_msk: it is the similar function to srcid_cmd & srcid_msk. Both are used to check where the data comes from or go to. Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Reviewed-by: John Garry Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-9-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 3bf30882c3c7b6e376d9d6d04082c9aa2d2ac30a Author: Shaokun Zhang Date: Mon Mar 8 14:50:35 2021 +0800 drivers/perf: hisi: Add support for HiSilicon SLLC PMU driver HiSilicon's Hip09 is comprised by multi-dies that can be connected by SLLC module (Skyros Link Layer Controller), its has separate PMU registers which the driver can program it freely and interrupt is supported to handle counter overflow. Let's support its driver under the framework of HiSilicon uncore PMU driver. SLLC PMU supports the following filter functions: * tracetag_en: allows user to count data according to tt_req or tt_core set in L3C PMU. * srcid_cmd & srcid_msk: allows user to filter statistics that come from specific CCL/ICL by configuration source ID. * tgtid_hi & tgtid_lo: it also supports event statistics that these operations will go to the CCL/ICL by configuration target ID or target ID range. It's the same as source ID with 11-bit width in the SoC. More introduction is added in documentation: Documentation/admin-guide/perf/hisi-pmu.rst Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Reviewed-by: John Garry Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-8-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit cce03e702c9f26a43b16c51bf03029911feab692 Author: Shaokun Zhang Date: Mon Mar 8 14:50:34 2021 +0800 drivers/perf: hisi: Update DDRC PMU for programmable counter DDRC PMU's events are useful for performance profiling, but the events are limited and counter is fixed. On HiSilicon Hip09 platform, PMU counters are the programmable and more events are supported. Let's add the DDRC PMU v2 driver. Bandwidth events are exposed directly in driver and some more events will listed in JSON file later. Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Reviewed-by: John Garry Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-7-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 932f6a99f9b0c6b7039a5e2ce961009a8dc8c07c Author: Shaokun Zhang Date: Mon Mar 8 14:50:33 2021 +0800 drivers/perf: hisi: Add new functions for HHA PMU On HiSilicon Hip09 platform, some new functions are also supported on HHA PMU. * tracetag_en: it is the abbreviation of tracetag enable and allows user to count events according to tt_req or tt_core set in L3C PMU. * datasrc_skt: it is the abbreviation of data source from another socket and it is used in the multi-chips. It's the same as L3C PMU. * srcid_cmd & srcid_msk: pair of the fields are used to filter statistics that come from the specific CCL/ICL by the configuration. These are the abbreviation of source ID command and mask. The source ID is 11-bit and detailed descriptions are documented in Documentation/admin-guide/perf/hisi-pmu.rst. Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Reviewed-by: John Garry Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-6-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 486a7f46b966a825484808d4edf53bbe02698fb3 Author: Shaokun Zhang Date: Mon Mar 8 14:50:32 2021 +0800 drivers/perf: hisi: Add new functions for L3C PMU On HiSilicon Hip09 platform, some new functions are enhanced on L3C PMU: * tt_req: it is the abbreviation of tracetag request and allows user to count only read/write/atomic operations. tt_req is 3-bit and details are listed in the hisi-pmu document. $# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_req=0x4/ sleep 5 * tt_core: it is the abbreviation of tracetag core and allows user to filter by core/thread within the cluster, it is a 8-bit bitmap that each bit represents the corresponding core/thread in this L3C. $# perf stat -a -e hisi_sccl3_l3c0/config=0x02,tt_core=0xf/ sleep 5 * datasrc_cfg: it is the abbreviation of data source configuration and allows user to check where the data comes from, such as: from local DDR, cross-die DDR or cross-socket DDR. Its is 5-bit and represents different data source in the SoC. $# perf stat -a -e hisi_sccl3_l3c0/dat_access,datasrc_cfg=0xe/ sleep 5 * datasrc_skt: it is the abbreviation of data source from another socket and is used in the multi-chips, if user wants to check the cross-socket datat source, it shall be added in perf command. Only one bit is used to control this. $# perf stat -a -e hisi_sccl3_l3c0/dat_access,datasrc_cfg=0x10,datasrc_skt=1/ sleep 5 Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Reviewed-by: John Garry Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-5-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 3da582df575c3b2910e09e0445c27c3ebc8096e5 Author: Shaokun Zhang Date: Mon Mar 8 14:50:31 2021 +0800 drivers/perf: hisi: Add PMU version for uncore PMU drivers. For HiSilicon uncore PMU, more versions are supported and some variables shall be added suffix to distinguish the version which are prepared for the new drivers. Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Acked-by: Mark Rutland Reviewed-by: John Garry Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-4-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit baff06c315a146a6943b4fcabb4fe4fa36167413 Author: Shaokun Zhang Date: Mon Mar 8 14:50:30 2021 +0800 drivers/perf: hisi: Refactor code for more uncore PMUs On HiSilicon uncore PMU drivers, interrupt handling function and interrupt registration function are very similar in differents PMU modules. Let's refactor the frame. Two new callbacks are added for the HW accessors: * hisi_uncore_ops::get_int_status returns a bitmap of events which have overflowed and raised an interrupt * hisi_uncore_ops::clear_int_status clears the overflow status for a specific event These callback functions are used by a common IRQ handler, hisi_uncore_pmu_isr(). One more function hisi_uncore_pmu_init_irq() is added to replace each PMU initialization IRQ interface and simplify the code. Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Reviewed-by: John Garry Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-3-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 4e4cb8ca48bd68c00df67c10ff867016abb7391f Author: Shaokun Zhang Date: Mon Mar 8 14:50:29 2021 +0800 drivers/perf: hisi: Remove unnecessary check of counter index The sanity check for counter index has been done in the function hisi_uncore_pmu_get_event_idx, so remove the redundant interface hisi_uncore_pmu_counter_valid() and sanity check. Cc: Mark Rutland Cc: Will Deacon Cc: John Garry Cc: Jonathan Cameron Co-developed-by: Qi Liu Signed-off-by: Qi Liu Signed-off-by: Shaokun Zhang Link: https://lore.kernel.org/r/1615186237-22263-2-git-send-email-zhangshaokun@hisilicon.com Signed-off-by: Will Deacon commit 174744136dcb6d441efdaaffd214f91a352bf6c7 Author: Qi Liu Date: Mon Feb 8 21:04:58 2021 +0800 drivers/perf: Simplify the SMMUv3 PMU event attributes For each PMU event, there is a SMMU_EVENT_ATTR(xx, XX) and &smmu_event_attr_xx.attr.attr. Let's redefine the SMMU_EVENT_ATTR to simplify the smmu_pmu_events. Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1612789498-12957-1-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 463a7d5a9e6fd3f3b592e09c936d2d07ee0b65b9 Author: Wan Jiabing Date: Tue Mar 23 13:01:39 2021 +0800 perf daemon: Remove duplicate includes sys/stat.h has been included at line 23, so remove the duplicate one at line 27. linux/string.h has been included at line 7, so remove the duplicate one at line 9. time.h has been included at line 14, so remove the duplicate one at line 28. Signed-off-by: Wan Jiabing Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kael_w@yeah.net Link: http://lore.kernel.org/lkml/20210323050139.287461-1-wanjiabing@vivo.com Signed-off-by: Arnaldo Carvalho de Melo commit 9eef29d8c31bdb8d6254b99e3dc741c75832fd6b Author: Mark Rutland Date: Tue Mar 23 18:12:01 2021 +0000 arm64: entry: remove test_irqs_unmasked macro We haven't needed the test_irqs_unmasked macro since commit: 105fc3352077bba5 ("arm64: entry: move el1 irq/nmi logic to C") ... and as we convert more of the entry logic to C it is decreasingly likely we'll need it in future, so let's remove the unused macro. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: James Morse Cc: Marc Zyngier Cc: Will Deacon Acked-by: Marc Zyngier Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210323181201.18889-1-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit fb62d67586afc046f3783d819985c737f6b0b666 Author: Qi Liu Date: Fri Mar 19 18:04:33 2021 +0800 drivers/perf: convert sysfs sprintf family to sysfs_emit sprintf does not know the PAGE_SIZE maximum of the temporary buffer used for sysfs content and it's possible to overrun the buffer length. Use sysfs_emit() function to ensures that no overrun is done. Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1616148273-16374-4-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 9ec9f9cf8660d549c77e719d2ce11647a03063b9 Author: Qi Liu Date: Fri Mar 19 18:04:32 2021 +0800 drivers/perf: convert sysfs scnprintf family to sysfs_emit_at() and sysfs_emit() Use the generic sysfs_emit_at() and sysfs_emit() function to take place of scnprintf() Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1616148273-16374-3-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 700a9cf0527ca2d7d3e4980fef2deb4883432ab6 Author: Zihao Tang Date: Fri Mar 19 18:04:31 2021 +0800 drivers/perf: convert sysfs snprintf family to sysfs_emit Fix the following coccicheck warning: ./drivers/perf/hisilicon/hisi_uncore_pmu.c:128:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/fsl_imx8_ddr_perf.c:173:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm_spe_pmu.c:129:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm_smmu_pmu.c:563:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm_dsu_pmu.c:149:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm_dsu_pmu.c:139:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm-cmn.c:563:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm-cmn.c:351:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm-ccn.c:224:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm-cci.c:708:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm-cci.c:699:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm-cci.c:528:8-16: WARNING: use scnprintf or sprintf. ./drivers/perf/arm-cci.c:309:8-16: WARNING: use scnprintf or sprintf. Signed-off-by: Zihao Tang Signed-off-by: Qi Liu Link: https://lore.kernel.org/r/1616148273-16374-2-git-send-email-liuqi115@huawei.com Signed-off-by: Will Deacon commit 5b613df3f499e305f3aecd58090a71ec0d92930d Author: Andy Shevchenko Date: Thu Mar 4 12:54:32 2021 +0200 pinctrl: intel: No need to disable IRQs in the handler In IRQ handler interrupts are already disabled, hence no need to repeat it. Even in the threaded case, which is disabled here, it is not a problem because IRQ framework serializes descriptor handling. Remove disabling IRQ part in the handler. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg commit 2304d14db6595bea5292bece06c4c625b12d8f89 Author: Wei Yongjun Date: Wed Mar 24 14:45:02 2021 +0000 x86/kprobes: Move 'inline' to the beginning of the kprobe_is_ss() declaration Address this GCC warning: arch/x86/kernel/kprobes/core.c:940:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration] 940 | static int nokprobe_inline kprobe_is_ss(struct kprobe_ctlblk *kcb) | ^~~~~~ [ mingo: Tidied up the changelog. ] Fixes: 6256e668b7af: ("x86/kprobes: Use int3 instead of debug trap for single-step") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Ingo Molnar Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20210324144502.1154883-1-weiyongjun1@huawei.com commit 405e07010d375d2123ec9d2e22197490eb698f74 Author: Wan Jiabing Date: Thu Mar 25 12:39:34 2021 +0800 perf tools: Remove duplicate struct forward declarations 'struct evlist' has been declared at 10th line. 'struct comm' has been declared at 15th line. Remove the duplicates Signed-off-by: Wan Jiabing Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Kajol Jain Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: kael_w@yeah.net Link: http://lore.kernel.org/lkml/20210325043947.846093-1-wanjiabing@vivo.com Signed-off-by: Arnaldo Carvalho de Melo commit b4142fc4d52d051d4d8df1fb6c569e5b445d369e Author: Dmitry Vyukov Date: Sat Mar 20 14:28:40 2021 +0100 drm/vkms: fix misuse of WARN_ON vkms_vblank_simulate() uses WARN_ON for timing-dependent condition (timer overrun). This is a mis-use of WARN_ON, WARN_ON must be used to denote kernel bugs. Use pr_warn() instead. Signed-off-by: Dmitry Vyukov Reported-by: syzbot+4fc21a003c8332eb0bdd@syzkaller.appspotmail.com Cc: Rodrigo Siqueira Cc: Melissa Wen Cc: Haneen Mohammed Cc: Daniel Vetter Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Acked-by: Melissa Wen Signed-off-by: Melissa Wen Link: https://patchwork.freedesktop.org/patch/msgid/20210320132840.1315853-1-dvyukov@google.com commit 8af856d18bfbe89676ade38caa2a5d06f75f211d Author: Shaokun Zhang Date: Wed Mar 24 13:40:40 2021 +0800 locking/mutex: Remove repeated declaration Commit 0cd39f4600ed ("locking/seqlock, headers: Untangle the spaghetti monster") introduces 'struct ww_acquire_ctx' again, remove the repeated declaration and move the pre-declarations to the top. Signed-off-by: Shaokun Zhang Signed-off-by: Ingo Molnar Acked-by: Waiman Long Link: https://lore.kernel.org/r/1616564440-61318-1-git-send-email-zhangshaokun@hisilicon.com commit 7c4199375ae347449fbde43cc8bf174ae6383d8e Author: Marc Zyngier Date: Mon Mar 22 13:32:34 2021 +0000 KVM: arm64: Drop the CPU_FTR_REG_HYP_COPY infrastructure Now that the read_ctr macro has been specialised for nVHE, the whole CPU_FTR_REG_HYP_COPY infrastrcture looks completely overengineered. Simplify it by populating the two u64 quantities (MMFR0 and 1) that the hypervisor need. Reviewed-by: Quentin Perret Signed-off-by: Marc Zyngier commit 755db23420a1ce4b740186543432983e9bbe713e Author: Marc Zyngier Date: Mon Mar 22 12:09:51 2021 +0000 KVM: arm64: Generate final CTR_EL0 value when running in Protected mode In protected mode, late CPUs are not allowed to boot (enforced by the PSCI relay). We can thus specialise the read_ctr macro to always return a pre-computed, sanitised value. Special care is taken to prevent the use of this custome version outside of the protected mode. Reviewed-by: Quentin Perret Signed-off-by: Marc Zyngier commit 0a2b65c03e9b47493e1442bf9c84badc60d9bffb Author: Barry Song Date: Thu Mar 25 15:31:40 2021 +1300 sched/topology: Remove redundant cpumask_and() in init_overlap_sched_group() mask is built in build_balance_mask() by for_each_cpu(i, sg_span), so it must be a subset of sched_group_span(sg). So the cpumask_and() call is redundant - remove it. [ mingo: Adjusted the changelog a bit. ] Signed-off-by: Barry Song Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Link: https://lore.kernel.org/r/20210325023140.23456-1-song.bao.hua@hisilicon.com commit c4681f3f1cfcfde0c95ff72f0bdb43f9ffd7f00e Author: Rasmus Villemoes Date: Thu Mar 25 01:45:15 2021 +0100 sched/core: Use -EINVAL in sched_dynamic_mode() -1 is -EPERM which is a somewhat odd error to return from sched_dynamic_write(). No other callers care about which negative value is used. Signed-off-by: Rasmus Villemoes Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210325004515.531631-2-linux@rasmusvillemoes.dk commit 7e1b2eb74928b2478fd0630ce6c664334b480d00 Author: Rasmus Villemoes Date: Thu Mar 25 01:45:14 2021 +0100 sched/core: Stop using magic values in sched_dynamic_mode() Use the enum names which are also what is used in the switch() in sched_dynamic_update(). Signed-off-by: Rasmus Villemoes Signed-off-by: Ingo Molnar Acked-by: Peter Zijlstra Link: https://lore.kernel.org/r/20210325004515.531631-1-linux@rasmusvillemoes.dk commit a7ed7150f351177e46409cca15874101f95370cb Author: Rahul Tanwar Date: Thu Mar 25 11:35:10 2021 +0100 leds: lgm: Improve Kconfig help Remove unnecessary Kconfig symbol LEDS_BLINK Improve Kconfig help text to make it more useful. Signed-off-by: Rahul Tanwar Signed-off-by: Pavel Machek commit 2f706e0e5e263c0d204e37ea496cbb0e98aac2d2 Author: Masami Hiramatsu Date: Thu Mar 25 19:08:43 2021 +0900 x86/kprobes: Fix to identify indirect jmp and others using range case Fix can_boost() to identify indirect jmp and others using range case correctly. Since the condition in switch statement is opcode & 0xf0, it can not evaluate to 0xff case. This should be under the 0xf0 case. However, there is no reason to use the conbinations of the bit-masked condition and lower bit checking. Use range case to clean up the switch statement too. Fixes: 6256e668b7 ("x86/kprobes: Use int3 instead of debug trap for single-step") Reported-by: Colin Ian King Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/161666692308.1120877.4675552834049546493.stgit@devnote2 commit 6dd3b8c9f58816a1354be39559f630cd1bd12159 Author: Masami Hiramatsu Date: Thu Mar 25 19:08:31 2021 +0900 x86/kprobes: Fix to check non boostable prefixes correctly There are 2 bugs in the can_boost() function because of using x86 insn decoder. Since the insn->opcode never has a prefix byte, it can not find CS override prefix in it. And the insn->attr is the attribute of the opcode, thus inat_is_address_size_prefix( insn->attr) always returns false. Fix those by checking each prefix bytes with for_each_insn_prefix loop and getting the correct attribute for each prefix byte. Also, this removes unlikely, because this is a slow path. Fixes: a8d11cd0714f ("kprobes/x86: Consolidate insn decoder users for copying code") Signed-off-by: Masami Hiramatsu Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/161666691162.1120877.2808435205294352583.stgit@devnote2 commit 8252ca87c7a2111502ee13994956f8c309faad7f Author: louis.wang Date: Wed Feb 24 13:25:53 2021 +0100 ARM: 9066/1: ftrace: pause/unpause function graph tracer in cpu_suspend() Enabling function_graph tracer on ARM causes kernel panic, because the function graph tracer updates the "return address" of a function in order to insert a trace callback on function exit, it saves the function's original return address in a return trace stack, but cpu_suspend() may not return through the normal return path. cpu_suspend() will resume directly via the cpu_resume path, but the return trace stack has been set-up by the subfunctions of cpu_suspend(), which makes the "return address" inconsistent with cpu_suspend(). This patch refers to Commit de818bd4522c40ea02a81b387d2fa86f989c9623 ("arm64: kernel: pause/unpause function graph tracer in cpu_suspend()"), fixes the issue by pausing/resuming the function graph tracer on the thread executing cpu_suspend(), so that the function graph tracer state is kept consistent across functions that enter power down states and never return by effectively disabling graph tracer while they are executing. Signed-off-by: louis.wang Signed-off-by: Russell King commit a506bd5756290821a4314f502b4bafc2afcf5260 Author: Zhen Lei Date: Thu Feb 18 03:00:05 2021 +0100 ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook The commit 1879445dfa7b ("perf/core: Set event's default ::overflow_handler()") set a default event->overflow_handler in perf_event_alloc(), and replace the check event->overflow_handler with is_default_overflow_handler(), but one is missing. Currently, the bp->overflow_handler can not be NULL. As a result, enable_single_step() is always not invoked. Comments from Zhen Lei: https://patchwork.kernel.org/project/linux-arm-kernel/patch/20210207105934.2001-1-thunder.leizhen@huawei.com/ Fixes: 1879445dfa7b ("perf/core: Set event's default ::overflow_handler()") Signed-off-by: Zhen Lei Cc: Wang Nan Acked-by: Will Deacon Signed-off-by: Russell King commit 7c182ebab9f338d07571c7f86d4d64c385ad1b9c Author: Nick Desaulniers Date: Tue Feb 16 20:16:13 2021 +0100 ARM: 9062/1: kprobes: rewrite test-arm.c in UAL Clang's integrated assembler only accepts UAL syntax, rewrite the instructions that were changed by RVCTv2.1. The document "Assembly language changes after RVCTv2.1" was very helpful. .syntax unified directive is added, since -masm-syntax-unified is unreliable for older but supported versions of GCC. See also: commit fe09d9c641f2 ("ARM: 8852/1: uaccess: use unified assembler language syntax") Link: https://developer.arm.com/documentation/dui0473/c/writing-arm-assembly-language/assembly-language-changes-after-rvctv2-1 Link: https://github.com/ClangBuiltLinux/linux/issues/1271 Reported-by: Arnd Bergmann Acked-by: Ard Biesheuvel Reviewed-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Signed-off-by: Russell King commit e9d54be9ad5ee2eed3056d8901ac4b3b115d95a5 Author: Nick Desaulniers Date: Tue Feb 16 20:14:46 2021 +0100 ARM: 9061/1: kprobes: fix UNPREDICTABLE warnings GNU as warns twice for this file: Warning: using r15 results in unpredictable behaviour via the Arm ARM: K1.1.1 Overview of the constraints on Armv7 UNPREDICTABLE behaviors The term UNPREDICTABLE describes a number of cases where the architecture has a feature that software must not use. Ard notes: These are selftests that aim to ensure that kprobe never attempts to replace the opcodes in question with a probe, but they are not actually executed, or expected to occur in real code. Link: https://github.com/ClangBuiltLinux/linux/issues/1271 Link: https://reviews.llvm.org/D95586 Reported-by: kernelci.org bot Suggested-by: Peter Smith Suggested-by: Renato Golin Suggested-by: David Spickett Acked-by: Ard Biesheuvel Signed-off-by: Nick Desaulniers Signed-off-by: Russell King commit 509d36a941a3466b78d4377913623d210b162458 Author: Huang Pei Date: Wed Mar 24 11:24:51 2021 +0800 MIPS: loongson64: fix bug when PAGE_SIZE > 16KB When page size larger than 16KB, arguments "vaddr + size(16KB)" in "ioremap_page_range(vaddr, vaddr + size,...)" called by "add_legacy_isa_io" is not page-aligned. As loongson64 needs at least page size 16KB to get rid of cache alias, and "vaddr" is 64KB-aligned, and 64KB is largest page size supported, rounding "size" up to PAGE_SIZE is enough for all page size supported. Fixes: 6d0068ad15e4 ("MIPS: Loongson64: Process ISA Node in DeviceTree") Signed-off-by: Huang Pei Acked-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 84a0124a9d715d844675c8cfbe5bbc9147121f73 Author: Krzysztof Kozlowski Date: Wed Mar 17 12:26:44 2021 +0100 MIPS: ralink: define stubs for clk_set_parent to fix compile testing The Ralink MIPS platform does not use Common Clock Framework and does not define certain clock operations leading to compile test failures: /usr/bin/mips-linux-gnu-ld: drivers/usb/phy/phy-tegra-usb.o: in function `tegra_usb_phy_init': phy-tegra-usb.c:(.text+0x1dd4): undefined reference to `clk_get_parent' Reported-by: kernel test robot Signed-off-by: Krzysztof Kozlowski Acked-by: John Crispin Reviewed-by: Dmitry Osipenko Signed-off-by: Thomas Bogendoerfer commit 3953ec08df35c0f8e2bbbe6bcf21ec775dab5410 Author: Qing Zhang Date: Mon Mar 15 15:50:04 2021 +0800 MIPS: Loongson64: Add a Loongson-2K1000 default config file Add default config for Loongson-2K1000. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang Tested-by: Ming Wang Signed-off-by: Thomas Bogendoerfer commit f4dee5d8e1fa98f2d8aa3c28b31a8b2da61fae75 Author: Qing Zhang Date: Mon Mar 15 15:50:03 2021 +0800 dt-bindings: interrupt-controller: Add Loongson-2K1000 LIOINTC Add liointc-2.0 properties support, so update the maxItems and condition description. Signed-off-by: Qing Zhang Tested-by: Ming Wang Reviewed-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit b2c4c3969fd7d79caf05f1ebfcaa330e020ecc36 Author: Qing Zhang Date: Mon Mar 15 15:50:02 2021 +0800 irqchip/loongson-liointc: irqchip add 2.0 version Add IO interrupt controller support for Loongson-2K1000, different from the Loongson-3A series is that Loongson-2K1000 has 64 interrupt sources, 0-31 correspond to the device tree liointc0 device node, and the other correspond to liointc1 node. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang Tested-by: Ming Wang Acked-by: Marc Zyngier Signed-off-by: Thomas Bogendoerfer commit 44151ea08978cea536fa9e7b95efca336994048d Author: Qing Zhang Date: Mon Mar 15 15:50:01 2021 +0800 MIPS: Loongson64: Add Loongson-2K1000 early_printk_port Distinguish between Loongson-3A series CPU and Loongson-2K1000 CPU UART0. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang Tested-by: Ming Wang Signed-off-by: Thomas Bogendoerfer commit 95b56e884a50c8e935b4e9f8b289251cc913795e Author: Qing Zhang Date: Mon Mar 15 15:50:00 2021 +0800 MIPS: Loongson64: Add support for the Loongson-2K1000 to get cpu_clock_freq Get the fixed-clock from the CPU0 node of the device tree. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang Tested-by: Ming Wang Signed-off-by: Thomas Bogendoerfer commit 8e2fe0ecfb96d7b1baa9720e36305515c3079e8c Author: Qing Zhang Date: Mon Mar 15 15:49:59 2021 +0800 MIPS: Loongson64: Distinguish firmware dependencies DTB/LEFI Add DTB boot support, only support Loongson-2K1000 processor for now, determine whether to use the built-in DTB or the DTB from the firmware by checking the range of CKSEG0 and XKPHYS. loongson_fw_interface will be used in the future. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang Tested-by: Ming Wang Signed-off-by: Thomas Bogendoerfer commit b1a792601f264df7172a728f1a83a05b6b399dfb Author: Qing Zhang Date: Mon Mar 15 15:49:58 2021 +0800 MIPS: Loongson64: DeviceTree for Loongson-2K1000 Add DeviceTree files for Loongson-2K1000 processor, currently only supports single-core boot. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang Tested-by: Ming Wang Signed-off-by: Thomas Bogendoerfer commit febb4ee23a412f42fdd6d0fdef692bb9c5e1fad3 Author: Geert Uytterhoeven Date: Tue Mar 16 14:40:59 2021 +0100 pinctrl: PINCTRL_ROCKCHIP should depend on ARCH_ROCKCHIP The Rockchip GPIO and pin control modules are only present on Rockchip SoCs. Hence add a dependency on ARCH_ROCKCHIP, to prevent asking the user about this driver when configuring a kernel without Rockchip platform support. Note that before, the PINCTRL_ROCKCHIP symbol was not visible, and automatically selected when needed. By making it tristate and user-selectable, it became visible for everyone. Fixes: be786ac5a6c4bf4e ("pinctrl: rockchip: make driver be tristate module") Signed-off-by: Geert Uytterhoeven Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210316134059.2377081-1-geert+renesas@glider.be Signed-off-by: Linus Walleij commit 42a46434e9b18b35d2e57433cdbeff3233ca9765 Author: Zhiyong Tao Date: Sun Mar 21 11:31:50 2021 +0800 pinctrl: add lock in mtk_rmw function. When multiple threads operate on the same register resource which include multiple pin, It will make the register resource wrong to control. So we add lock to avoid the case. Signed-off-by: Zhiyong Tao Link: https://lore.kernel.org/r/20210321033150.15380-2-zhiyong.tao@mediatek.com Signed-off-by: Linus Walleij commit 1517dad8e7129c5e28bd7b536c560f0f0bff87a4 Merge: bd85125ea8851 f7adcca27edf0 Author: Linus Walleij Date: Thu Mar 25 10:10:21 2021 +0100 Merge tag 'renesas-pinctrl-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel pinctrl: renesas: Updates for v5.13 - Add pin groups for the green and high8 subsets of the Video IN (VIN) pins on R-Car H3 ES2.0+, R-Car M3-W/M3-W+, R-Car M3-N, and R-Car E3. commit a8bb0e872bfb962de4653ce8f8723c0e1f712ce3 Author: Yangtao Li Date: Sun Mar 14 19:34:08 2021 +0300 memory: samsung: exynos5422-dmc: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Krzysztof Kozlowski Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 633b0616cfe085679471a4c0fae02e8c3a1a9866 Author: Ira Weiny Date: Wed Mar 24 11:22:46 2021 -0700 x86/sgx: Remove unnecessary kmap() from sgx_ioc_enclave_init() kmap() is inefficient and is being replaced by kmap_local_page(), if possible. There is no readily apparent reason why initp_page needs to be allocated and kmap'ed() except that 'sigstruct' needs to be page-aligned and 'token' 512 byte-aligned. Rather than change it to kmap_local_page(), use kmalloc() instead because kmalloc() can give this alignment when allocating PAGE_SIZE bytes. Remove the alloc_page()/kmap() and replace with kmalloc(PAGE_SIZE, ...) to get a page aligned kernel address. In addition, add a comment to document the alignment requirements so that others don't attempt to 'fix' this again. [ bp: Massage commit message. ] Signed-off-by: Ira Weiny Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210324182246.2484875-1-ira.weiny@intel.com commit 6ad2dd6c14d3989b44cdc17f1e7258bf613dd070 Author: Arnd Bergmann Date: Mon Mar 22 12:56:49 2021 +0100 ipv6: fix clang Wformat warning When building with 'make W=1', clang warns about a mismatched format string: net/ipv6/ah6.c:710:4: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] aalg_desc->uinfo.auth.icv_fullbits/8); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:375:34: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ net/ipv6/esp6.c:1153:5: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] aalg_desc->uinfo.auth.icv_fullbits / 8); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/printk.h:375:34: note: expanded from macro 'pr_info' printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__) ~~~ ^~~~~~~~~~~ Here, the result of dividing a 16-bit number by a 32-bit number produces a 32-bit result, which is printed as a 16-bit integer. Change the %hu format to the normal %u, which has the same effect but avoids the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Steffen Klassert commit bd85125ea88513f637a62a72e8949c579c5c0a87 Author: Hanna Hawa Date: Fri Mar 19 17:21:33 2021 +0200 pinctrl: pinctrl-single: fix pcs_pin_dbg_show() when bits_per_mux is not zero A System Error (SError, followed by kernel panic) was detected when trying to print the supported pins in a pinctrl device which supports multiple pins per register. This change fixes the pcs_pin_dbg_show() in pinctrl-single driver when bits_per_mux is not zero. In addition move offset calculation and pin offset in register to common function. Fixes: 4e7e8017a80e ("pinctrl: pinctrl-single: enhance to configure multiple pins of different modules") Signed-off-by: Hanna Hawa Reviewed-by: Andy Shevchenko Reviewed-by: Tony Lindgren Reviewed-by: Drew Fustini Link: https://lore.kernel.org/r/20210319152133.28705-4-hhhawa@amazon.com Signed-off-by: Linus Walleij commit 8fa2ea202b13b6da81e26c399ff1d87488398453 Author: Hanna Hawa Date: Fri Mar 19 17:21:32 2021 +0200 pinctrl: pinctrl-single: remove unused parameter Remove unused parameter 'pin_pos' from pcs_add_pin(). Signed-off-by: Hanna Hawa Reviewed-by: Tony Lindgren Reviewed-by: Drew Fustini Link: https://lore.kernel.org/r/20210319152133.28705-3-hhhawa@amazon.com Signed-off-by: Linus Walleij commit 81cc4c37adddf379df16b6590e5ad4fc13948b48 Author: Hanna Hawa Date: Fri Mar 19 17:21:31 2021 +0200 pinctrl: pinctrl-single: remove unused variable Remove unused parameter 'num_pins_in_register' from pcs_allocate_pin_table(). Reported-by: kernel test robot Signed-off-by: Hanna Hawa Reviewed-by: Tony Lindgren Reviewed-by: Drew Fustini Link: https://lore.kernel.org/r/20210319152133.28705-2-hhhawa@amazon.com Signed-off-by: Linus Walleij commit 0d811cda22abeeeb8d3412ac17b687764f4b4c9f Author: Zhang Yunkai Date: Fri Mar 19 04:36:12 2021 -0700 phy: qualcomm: remove duplicate argument 'HSUSB_CTRL_DPSEHV_CLAMP' in 'val' is duplicated. Signed-off-by: Zhang Yunkai Link: https://lore.kernel.org/r/20210319113612.494623-1-zhang.yunkai@zte.com.cn Signed-off-by: Vinod Koul commit c115c5680d09e9e37477937755da9f0423c5e9c9 Author: Bhaskar Chowdhury Date: Sun Mar 21 02:10:55 2021 +0530 phy: intel: Fix a typo s/subsytem/subsystem/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210320204055.26107-1-unixbhaskar@gmail.com Signed-off-by: Vinod Koul commit 6a7d15b850f802ca9b67011a80cb2f6ea96c830b Author: Sandeep Maheswaram Date: Wed Mar 17 16:31:40 2021 +0530 dt-bindings: phy: qcom,usb-snps-femto-v2: Add bindings for SC7280 Add the compatible string for sc7280 SoC from Qualcomm Signed-off-by: Sandeep Maheswaram Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1615978901-4202-3-git-send-email-sanm@codeaurora.org Signed-off-by: Vinod Koul commit e839fbed26e8b8713803b8ac73da92fd2b0c7594 Author: Kai Vehmanen Date: Wed Mar 24 19:23:37 2021 +0200 ALSA: hda/hdmi: fix max DP-MST dev_num for Intel TGL+ platforms Increase the device select range to 4 on platforms supporting 4 concurrent displays. This fixes a problem in scenario where total of 4 displays are active, and 3 of these are audio capable DP receivers and connected to a DP-MST hub. Due to incorrect range for device select, audio could not be played to the 3rd monitor in DP-MST hub. BugLink: https://github.com/thesofproject/linux/issues/2798 Signed-off-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210324172337.51730-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai commit 5c977c69c8b2be793b3f5a11a97addabdea47f8b Author: Chunfeng Yun Date: Tue Mar 16 17:22:23 2021 +0800 dt-bindings: phy: mediatek: tphy: change patternProperties The phy may be named as pcie-phy when the T-PHY only supports PCIe mode, it's also the similar case for SATA, named as sata-phy. Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-4-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 9dbccfef1dde12279bbe71eaaf25ac13024f5a28 Author: Chunfeng Yun Date: Tue Mar 16 17:22:22 2021 +0800 dt-bindings: phy: mediatek: hdmi-phy: modify compatible items mt7623-hdmi-tx is compatible to mt2701-hdmi-tx, and the compatible "mediatek,mt7623-hdmi-tx" is not supported in driver, in fact uses "mediatek,mt2701-hdmi-tx" instead on MT7623, so changes the compatible items to make dependence clear. Cc: Chun-Kuang Hu Cc: Philipp Zabel Acked-by: Chun-Kuang Hu Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-3-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit 66b87358440ea50ec9d9d47d70c7c0af81fd62bf Author: Chunfeng Yun Date: Tue Mar 16 17:22:21 2021 +0800 dt-bindings: phy: mediatek: dsi-phy: modify compatible dependence mt7623-mipi-tx is compatible to mt2701-mipi-tx, and use "mediatek,mt2701-mipi-tx" instead on MT7623, so modify the compatible items to make dependence clear. Cc: Chun-Kuang Hu Cc: Philipp Zabel Acked-by: Chun-Kuang Hu Reviewed-by: Rob Herring Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210316092232.9806-2-chunfeng.yun@mediatek.com Signed-off-by: Vinod Koul commit c3135d28a1e099bcc12c2c2a2a154275f49ce86b Author: Quanyang Wang Date: Thu Mar 25 14:42:08 2021 +0800 cpufreq: dt: dev_pm_opp_of_cpumask_add_table() may return -EPROBE_DEFER The function dev_pm_opp_of_cpumask_add_table() may return -EPROBE_DEFER, which needs to be propagated to the caller to try probing the driver later on. Signed-off-by: Quanyang Wang [ Viresh: Massage changelog/subject, improve code. ] Signed-off-by: Viresh Kumar commit 15e68d09458f1b417f3129674b89ff91a1070f15 Author: Masahiro Yamada Date: Sun Mar 14 04:48:29 2021 +0900 kconfig: move conf_rewrite_mod_or_yes() to conf.c This function is only used in conf.c. Signed-off-by: Masahiro Yamada commit 9a3c3bc820be102f8bb1ca0e9700633d5b3aeb1f Author: Masahiro Yamada Date: Sun Mar 14 04:48:28 2021 +0900 kconfig: remove assignment for Kconfig file Pass av[optind] to conf_parse() directly. Signed-off-by: Masahiro Yamada commit ee4c6f00dcee1bffcb06ffa274251c1467d3efaa Author: Masahiro Yamada Date: Sun Mar 14 04:48:27 2021 +0900 kconfig: add help messages for --help (-h) and --silent (-s) Add missing options and make the help message more readable. Signed-off-by: Masahiro Yamada commit bafc479132160a5fa66efa1748c995e699655803 Author: Masahiro Yamada Date: Sun Mar 14 04:48:26 2021 +0900 kconfig: add long options --help and --silent They are long options for -h and -s, respectively. Signed-off-by: Masahiro Yamada commit ed562c53104fbe097f012bec5a30196334e52d78 Author: Masahiro Yamada Date: Sun Mar 14 04:48:25 2021 +0900 kconfig: refactor option parse code The current option parse code is clumsy. The 's' option is separately handled in an if-conditional due to the following code: input_mode = (enum input_mode)opt; If 's' is moved to the switch statement, the invalid value 's' would be assigned to the input_mode. Another potential problem is that we are mixing 'enum input_mode' and ASCII characters. They could overwrap if we add more input modes. To separate them out, set the flag field of long options to a pointer of input_mode_opt. For mode select options, getopt_long() returns 0, which never causes overwrap with ASCII characters that represent short options. Signed-off-by: Masahiro Yamada commit 89145649b0d0d51e90a85de23ca881c97d3a71a4 Author: Masahiro Yamada Date: Sun Mar 14 04:48:24 2021 +0900 kconfig: split randconfig setup code into set_randconfig_seed() This code is too big to be placed in the switch statement. Move the code into a new helper function. I slightly refactor the code without changing the behavior. Signed-off-by: Masahiro Yamada commit c2255ece2be2454dff0b549e2ceb234bfe798181 Author: Arnd Bergmann Date: Tue Mar 23 13:54:23 2021 +0100 scsi: pm8001: Avoid -Wrestrict warning On some configurations, gcc warns about overlapping source and destination arguments to snprintf: drivers/scsi/pm8001/pm8001_init.c: In function 'pm8001_request_msix': drivers/scsi/pm8001/pm8001_init.c:977:3: error: 'snprintf' argument 4 may overlap destination object 'pm8001_ha' [-Werror=restrict] 977 | snprintf(drvname, len, "%s-%d", pm8001_ha->name, i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/scsi/pm8001/pm8001_init.c:962:56: note: destination object referenced by 'restrict'-qualified argument 1 was declared here 962 | static u32 pm8001_request_msix(struct pm8001_hba_info *pm8001_ha) | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ I first assumed this was a gcc bug, as that should not happen, but a reduced test case makes it clear that this happens when the loop counter is not bounded by the array size. Help the compiler out by adding an explicit limit here to make the code slightly more robust and avoid the warning. Link: https://godbolt.org/z/6T1qPM Link: https://lore.kernel.org/r/20210323125458.1825564-1-arnd@kernel.org Acked-by: Jack Wang Signed-off-by: Arnd Bergmann Signed-off-by: Martin K. Petersen commit f1891f9bbc46f83099cbd0911b81b7225258ac03 Author: Bhaskar Chowdhury Date: Wed Mar 24 12:18:29 2021 +0530 scsi: lpfc: Fix a typo s/conditons/conditions/ Link: https://lore.kernel.org/r/20210324064829.32092-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit 835b8c16a0e32403b9e07d2b5ea2fa69cefbab6a Author: Bhaskar Chowdhury Date: Wed Mar 24 11:43:18 2021 +0530 scsi: esp_scsi: Trivial typo fixes s/conditon/condition/ s/pecularity/peculiarity/ Link: https://lore.kernel.org/r/20210324061318.5744-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit 9991ca001b9c12e5beb22d00157c766ebb131b5f Author: Bhaskar Chowdhury Date: Tue Mar 23 02:28:21 2021 +0530 scsi: bfa: Fix a typo in two places s/defintions/definitions/ ....two different places. Link: https://lore.kernel.org/r/20210322205821.1449844-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit 89bbf550eafccd120eb9c6c962f6eeda3b8a254c Author: wengjianfeng Date: Mon Mar 22 15:56:45 2021 +0800 scsi: lpfc: Fix a typo Change 'lenth' to 'length'. Link: https://lore.kernel.org/r/20210322075645.25636-1-samirweng1979@163.com Acked-by: Randy Dunlap Signed-off-by: wengjianfeng Signed-off-by: Martin K. Petersen commit ae98ddf05fdb92d5ce6d890911b8ee6f5075678b Author: Bhaskar Chowdhury Date: Mon Mar 22 12:17:24 2021 +0530 scsi: scsi_dh: Fix a typo s/infrastruture/infrastructure/ [mkp: combined .c and .h patches] Link: https://lore.kernel.org/r/20210322064724.4108343-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen frog commit 5fae809faec6708a86abcbefc8a820de41e43bea Author: Bhaskar Chowdhury Date: Mon Mar 22 12:05:30 2021 +0530 scsi: bnx2fc: Fix a typo s/struture/structure/ Link: https://lore.kernel.org/r/20210322063530.3588282-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit 206a3afa9482a85e386b8c9e9961489e12027149 Author: Bhaskar Chowdhury Date: Mon Mar 22 08:51:45 2021 +0530 scsi: mpt3sas: Fix a typo s/encloure/enclosure/ Link: https://lore.kernel.org/r/20210322032145.2242520-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit a89562e31f01457c4a9529d6271ce21995784aa8 Author: Bhaskar Chowdhury Date: Fri Mar 19 14:53:11 2021 +0530 scsi: csiostor: Fix a typo s/boudaries/boundaries/ Link: https://lore.kernel.org/r/20210319092311.31776-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit 0873045f63c474db5c9f816a01fb1a7f64ea21b2 Author: Yue Hu Date: Fri Mar 19 15:09:16 2021 +0800 scsi: ufs: Remove unnecessary NULL checks in ufshcd_find_max_sup_active_icc_level() vcc/vccq/vccq2 have already been NULL checked at this point in ufshcd_find_max_sup_active_icc_level(). Link: https://lore.kernel.org/r/20210319070916.2254-1-zbestahu@gmail.com Signed-off-by: Yue Hu Signed-off-by: Martin K. Petersen commit 1630e752fb8340b188c45eed4fe52a9f2a918e27 Author: Jiapeng Chong Date: Tue Mar 16 15:48:50 2021 +0800 scsi: bfa: Fix warning comparing pointer to 0 Fix the following coccicheck warning: ./drivers/scsi/bfa/bfad_bsg.c:3412:29-30: WARNING comparing pointer to 0. Link: https://lore.kernel.org/r/1615880930-120780-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 3070c72155c5bba86c02f0a8a7493b0c16a9bfdd Author: Jiapeng Chong Date: Mon Mar 15 11:49:19 2021 +0800 scsi: qla1280: Fix warning comparing pointer to 0 Fix the following coccicheck warning: ./drivers/scsi/qla1280.c:3057:37-38: WARNING comparing pointer to 0. Link: https://lore.kernel.org/r/1615780159-94708-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 0d556a21a9dae9ec4e2373825da653447e4eb79c Author: Wang Qing Date: Fri Mar 12 10:18:53 2021 +0800 scsi: ibmvscsi: Remove unnecessary cast Fix the following coccicheck warning: WARNING: casting value returned by memory allocation function is useless. Link: https://lore.kernel.org/r/1615515534-1250-1-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing Signed-off-by: Martin K. Petersen commit 3ba9f38ed43de60ca93afd2aaf3d27572e0352eb Author: Wang Qing Date: Fri Mar 12 10:18:19 2021 +0800 scsi: fnic: Remove unnecessary cast Fix the following coccicheck warning: WARNING: casting value returned by memory allocation function is useless. Link: https://lore.kernel.org/r/1615515500-946-1-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing Signed-off-by: Martin K. Petersen commit 690209d5ebefc8a2f05b8edb1af7769f1bf15440 Author: Wang Qing Date: Fri Mar 12 10:18:03 2021 +0800 scsi: message: fusion: Remove unnecessary cast Fix the following coccicheck warning: WARNING: casting value returned by memory allocation function is useless. Link: https://lore.kernel.org/r/1615515483-777-1-git-send-email-wangqing@vivo.com Signed-off-by: Wang Qing Signed-off-by: Martin K. Petersen commit dfd35e1d5934ca5fb6a8f30cdaa24d919c23d7a3 Author: Yue Hu Date: Thu Mar 11 12:28:33 2021 +0800 scsi: ufs: ufs-exynos: Remove pwr_max from parameter list of exynos_ufs_post_pwr_mode() pwr_max is unused, remove it. Link: https://lore.kernel.org/r/20210311042833.1381-1-zbestahu@gmail.com Signed-off-by: Yue Hu Signed-off-by: Martin K. Petersen commit 7a0c0e6ce130f506449549c5c5fe7902cf83a200 Author: Yue Hu Date: Thu Mar 11 12:02:10 2021 +0800 scsi: ufs: core: Correct status type in ufshcd_vops_pwr_change_notify() The status parameter's type should be enum ufs_notify_change_status. Link: https://lore.kernel.org/r/20210311040210.1315-1-zbestahu@gmail.com Signed-off-by: Yue Hu Signed-off-by: Martin K. Petersen commit adb253433dc8bc8dd569ee03b233fed21afc1dc7 Author: Rasmus Villemoes Date: Wed Mar 10 23:16:02 2021 +0100 scsi: bnx2i: Make bnx2i_process_iscsi_error() simpler and more robust Instead of strcpy'ing into a stack buffer, just let additional_notice point to a string literal living in .rodata. This is better in a few ways: - Smaller .text - instead of gcc compiling the strcpys as a bunch of immediate stores (effectively encoding the string literal in the instruction stream), we only pay the price of storing the literal in .rodata. - Faster, because there's no string copying. - Smaller stack usage (with my compiler, 72 bytes instead of 176 for the sole caller, bnx2i_indicate_kcqe) Moreover, it's currently possible for additional_notice[] to get used uninitialized, so some random stack garbage would be passed to printk() - in the worst case without any '\0' anywhere in those 64 bytes. That could be fixed by initializing additional_notice[0], but the same is achieved here by initializing the new pointer variable to "". Also give the message pointer a similar treatment - there's no point making temporary copies on the stack of those two strings. Link: https://lore.kernel.org/r/20210310221602.2494422-1-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Signed-off-by: Martin K. Petersen commit be20b96b63197eb2e87ffa8973fadb194a16ee80 Author: Jiapeng Chong Date: Wed Mar 10 12:16:11 2021 +0800 scsi: mac53c94: Fix warning comparing pointer to 0 Fix the following coccicheck warning: ./drivers/scsi/mac53c94.c:470:29-30: WARNING comparing pointer to 0. ./drivers/scsi/mac53c94.c:349:12-13: WARNING comparing pointer to 0. Link: https://lore.kernel.org/r/1615349771-81106-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 973c920811bc60e1e824be0ec355a9b0a7a3d4d5 Author: Jiapeng Chong Date: Tue Mar 9 11:39:13 2021 +0800 scsi: dc395x: Use bitwise instead of arithmetic operator for flags Fix the following coccicheck warnings: ./drivers/scsi/dc395x.c:2921:28-29: WARNING: sum of probable bitmasks, consider |. Link: https://lore.kernel.org/r/1615261153-32647-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit e5406d8ad4a1659f4d4d1b39fe203855c4eaef2d Author: Bart Van Assche Date: Sat Mar 20 16:23:59 2021 -0700 scsi: qla2xxx: Check kzalloc() return value Instead of crashing if kzalloc() fails, make qla2x00_get_host_stats() return -ENOMEM. Link: https://lore.kernel.org/r/20210320232359.941-8-bvanassche@acm.org Fixes: dbf1f53cfd23 ("scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port") Cc: Himanshu Madhani Cc: Saurav Kashyap Cc: Nilesh Javali Cc: Quinn Tran Cc: Mike Christie Cc: Daniel Wagner Cc: Lee Duncan Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Acked-by: Saurav Kashyap Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a2b2cc660822cae08c351c7f6b452bfd1330a4f7 Author: Bart Van Assche Date: Sat Mar 20 16:23:58 2021 -0700 scsi: qla2xxx: Always check the return value of qla24xx_get_isp_stats() This patch fixes the following Coverity warning: CID 361199 (#1 of 1): Unchecked return value (CHECKED_RETURN) 3. check_return: Calling qla24xx_get_isp_stats without checking return value (as is done elsewhere 4 out of 5 times). Link: https://lore.kernel.org/r/20210320232359.941-7-bvanassche@acm.org Cc: Quinn Tran Cc: Mike Christie Cc: Himanshu Madhani Cc: Daniel Wagner Cc: Lee Duncan Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit a20821e3f4719458a888af634c10c286365ecd6f Author: Bart Van Assche Date: Sat Mar 20 16:23:57 2021 -0700 scsi: qla2xxx: Simplify qla8044_minidump_process_control() This patch fixes the following Coverity complaint: CID 177490 (#1 of 1): Unused value (UNUSED_VALUE) assigned_value: Assigning value from opcode & 0xffffff7fU to opcode here, but that stored value is overwritten before it can be used. Link: https://lore.kernel.org/r/20210320232359.941-6-bvanassche@acm.org Cc: Quinn Tran Cc: Mike Christie Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Reviewed-by: Lee Duncan Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 17603237f789cfb135fd8e01a7edca27a46a6f6e Author: Bart Van Assche Date: Sat Mar 20 16:23:56 2021 -0700 scsi: qla2xxx: Suppress Coverity complaints about dseg_r* Change dseq_rq and dseg_rsp from scalar structure members into single-element arrays such that Coverity does not complain about the (*cur_dsd)++ statement in append_dsd64(). Link: https://lore.kernel.org/r/20210320232359.941-5-bvanassche@acm.org Cc: Quinn Tran Cc: Mike Christie Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Reviewed-by: Lee Duncan Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 37ce4f3531d4a38f3f598fab45d80be5b46aee3c Author: Bart Van Assche Date: Sat Mar 20 16:23:55 2021 -0700 scsi: qla2xxx: Fix endianness annotations Fix all recently introduced endianness annotation issues. Link: https://lore.kernel.org/r/20210320232359.941-4-bvanassche@acm.org Cc: Quinn Tran Cc: Mike Christie Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Reviewed-by: Lee Duncan Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 634b9774d335020e2cd55950a6c1242e7e3bd1e7 Author: Bart Van Assche Date: Sat Mar 20 16:23:54 2021 -0700 scsi: qla2xxx: Constify struct qla_tgt_func_tmpl Since the target function pointers are not modified at runtime, declare the data structure with the target function pointers const. Link: https://lore.kernel.org/r/20210320232359.941-3-bvanassche@acm.org Cc: Quinn Tran Cc: Mike Christie Reviewed-by: Daniel Wagner Reviewed-by: Himanshu Madhani Reviewed-by: Lee Duncan Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit 4613bdcc122e9e60e0763c5851337470d25d7e40 Author: Bhaskar Chowdhury Date: Wed Mar 17 15:24:01 2021 +0530 kernel: trace: Mundane typo fixes in the file trace_events_filter.c s/callin/calling/ Link: https://lkml.kernel.org/r/20210317095401.1854544-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury [ Other fixes already done by Ingo Molnar ] Signed-off-by: Steven Rostedt (VMware) commit 84c7f6c33f42a12eb036ebf0f0e3670799304120 Author: Arnd Bergmann Date: Wed Mar 24 14:07:22 2021 +0100 hinic: avoid gcc -Wrestrict warning With extra warnings enabled, gcc complains that snprintf should not take the same buffer as source and destination: drivers/net/ethernet/huawei/hinic/hinic_ethtool.c: In function 'hinic_set_settings_to_hw': drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:480:9: error: 'snprintf' argument 4 overlaps destination object 'set_link_str' [-Werror=restrict] 480 | err = snprintf(set_link_str, SET_LINK_STR_MAX_LEN, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 481 | "%sspeed %d ", set_link_str, speed); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/ethernet/huawei/hinic/hinic_ethtool.c:464:7: note: destination object referenced by 'restrict'-qualified argument 1 was declared here 464 | char set_link_str[SET_LINK_STR_MAX_LEN] = {0}; Rewrite this to avoid the nested sprintf and instead use separate buffers, which is simpler. Cc: Rasmus Villemoes Signed-off-by: Arnd Bergmann Reviewed-by: Rasmus Villemoes Signed-off-by: David S. Miller commit 5a5586112b929546e16029261a987c9197bfdfa2 Author: Ong Boon Leong Date: Wed Mar 24 17:07:42 2021 +0800 net: stmmac: support FPE link partner hand-shaking procedure In order to discover whether remote station supports frame preemption, local station sends verify mPacket and expects response mPacket in return from the remote station. So, we add the functions to send and handle event when verify mPacket and response mPacket are exchanged between the networked stations. The mechanism to handle different FPE states between local and remote station (link partner) is implemented using workqueue which starts a task each time there is some sign of verify & response mPacket exchange as check in FPE IRQ event. The task retries couple of times to try to spot the states that both stations are ready to enter FPE ON. This allows different end points to enable FPE at different time and verify-response mPacket can happen asynchronously. Ultimately, the task will only turn FPE ON when local station have both exchange response in both directions. Thanks to Voon Weifeng for implementing the core functions for detecting FPE events and send mPacket and phylink related change. Signed-off-by: Ong Boon Leong Co-developed-by: Voon Weifeng Signed-off-by: Voon Weifeng Co-developed-by: Tan Tee Min Signed-off-by: Tan Tee Min Co-developed-by: Mohammad Athari Bin Ismail Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: David S. Miller commit da1da87fa7fcf55871635f3f545c3b2932019213 Author: Wang Hai Date: Wed Mar 24 14:22:24 2021 +0800 6lowpan: Fix some typos in nhc_udp.c s/Orignal/Original/ s/infered/inferred/ Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 0e4161d0eda56e3e05456fdc2c346eab0a6e4aa8 Author: Wang Hai Date: Wed Mar 24 14:19:31 2021 +0800 net/packet: Fix a typo in af_packet.c s/sequencially/sequentially/ Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 72a0f6d0529296d4c8c0fd2fb1c7f1e2d247a39e Author: Wang Hai Date: Wed Mar 24 14:16:22 2021 +0800 net/tls: Fix a typo in tls_device.c s/beggining/beginning/ Reported-by: Hulk Robot Signed-off-by: Wang Hai Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit d280a2c2b740ed6d90827004625e605c0a06a696 Author: Zhichao Cai Date: Wed Mar 24 10:30:47 2021 +0800 Simplify the code by using module_platform_driver macro for ftmac100 Signed-off-by: Zhichao Cai Signed-off-by: David S. Miller commit 398a4087872a44921d0ede2afef53a3c9f779ab6 Author: Johan Jonker Date: Fri Dec 18 13:05:34 2020 +0100 ARM: dts: rockchip: remove clock-names property from watchdog node in rv1108.dtsi A test with the command below gives this error: /arch/arm/boot/dts/rv1108-evb.dt.yaml: watchdog@10360000: clock-names:0: 'tclk' was expected Comment from the dw_wdt.c file: Try to request the watchdog dedicated timer clock source. It must be supplied if asynchronous mode is enabled. Otherwise fallback to the common timer/bus clocks configuration, in which the very first found clock supply both timer and APB signals. Like in the other Rockchip watchdog nodes the property "clock-names" is not needed, so remove it. make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201218120534.13788-8-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 9ceb98f1ed19bc68129aa0db9da5adb4a40c0f1c Author: Johan Jonker Date: Fri Dec 18 13:05:29 2020 +0100 ARM: dts: rockchip: add new watchdog compatible to rk322x.dtsi The watchdog compatible strings are suppose to be SoC orientated. In the more recently added Rockchip rk322x.dtsi file only the fallback string "snps,dw-wdt" is used, so add the new compatible string: "rockchip,rk3228-wdt", "snps,dw-wdt" make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201218120534.13788-3-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 610e4c7215ddfa5c1bb52764717674ea8adb64f9 Author: Johan Jonker Date: Fri Dec 18 13:05:28 2020 +0100 ARM: dts: rockchip: add new watchdog compatible to rv1108.dtsi The watchdog compatible strings are suppose to be SoC orientated. In the more recently added Rockchip rv1108.dtsi file only the fallback string "snps,dw-wdt" is used, so add the new compatible string: "rockchip,rv1108-wdt", "snps,dw-wdt" make ARCH=arm dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201218120534.13788-2-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 6b5c50863b3e6837f856a137fe6880ed4662335b Author: Johan Jonker Date: Fri Dec 18 13:05:33 2020 +0100 arm64: dts: rockchip: add new watchdog compatible to rk3399.dtsi The watchdog compatible strings are suppose to be SoC orientated. In the more recently added Rockchip rk3399.dtsi file only the fallback string "snps,dw-wdt" is used, so add the new compatible string: "rockchip,rk3399-wdt", "snps,dw-wdt" make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201218120534.13788-7-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 2499448c920fc9648350d4f21e1fbd00ccd108ee Author: Johan Jonker Date: Fri Dec 18 13:05:32 2020 +0100 arm64: dts: rockchip: add new watchdog compatible to rk3328.dtsi The watchdog compatible strings are suppose to be SoC orientated. In the more recently added Rockchip rk3328.dtsi file only the fallback string "snps,dw-wdt" is used, so add the new compatible string: "rockchip,rk3328-wdt", "snps,dw-wdt" make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201218120534.13788-6-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 58ead0c605e8a5f4139ed4dfffcdddac72e2eb31 Author: Johan Jonker Date: Fri Dec 18 13:05:31 2020 +0100 arm64: dts: rockchip: add new watchdog compatible to rk3308.dtsi The watchdog compatible strings are suppose to be SoC orientated. In the more recently added Rockchip rk3308.dtsi file only the fallback string "snps,dw-wdt" is used, so add the new compatible string: "rockchip,rk3308-wdt", "snps,dw-wdt" make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201218120534.13788-5-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit d16c7082cff5e198f2435f08e2254e40f3058c75 Author: Johan Jonker Date: Fri Dec 18 13:05:30 2020 +0100 arm64: dts: rockchip: add new watchdog compatible to px30.dtsi The watchdog compatible strings are suppose to be SoC orientated. In the more recently added Rockchip px30.dtsi file only the fallback string "snps,dw-wdt" is used, so add the new compatible string: "rockchip,px30-wdt", "snps,dw-wdt" make ARCH=arm64 dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/watchdog/snps,dw-wdt.yaml Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20201218120534.13788-4-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit ab6ad3dbddaf09f7df2d830766a2fb68d6ad669f Merge: c71c39b344f7e 565cfb9e64dac 686fe1bf6bcce 0d3dd2c8eadb7 e02691b7ef51c 7ac3fdf099bf7 8126c57f00cea a434dd10cd843 0a27fff30a5e5 114e4a4b4884c Author: Paul E. McKenney Date: Wed Mar 24 17:20:18 2021 -0700 Merge branches 'bitmaprange.2021.03.08a', 'fixes.2021.03.15a', 'kvfree_rcu.2021.03.08a', 'mmdumpobj.2021.03.08a', 'nocb.2021.03.15a', 'poll.2021.03.24a', 'rt.2021.03.08a', 'tasks.2021.03.08a', 'torture.2021.03.08a' and 'torturescript.2021.03.22a' into HEAD bitmaprange.2021.03.08a: Allow 3-N for bitmap ranges. fixes.2021.03.15a: Miscellaneous fixes. kvfree_rcu.2021.03.08a: kvfree_rcu() updates. mmdumpobj.2021.03.08a: mem_dump_obj() updates. nocb.2021.03.15a: RCU NOCB CPU updates, including limited deoffloading. poll.2021.03.24a: Polling grace-period interfaces for RCU. rt.2021.03.08a: Realtime-related RCU changes. tasks.2021.03.08a: Tasks-RCU updates. torture.2021.03.08a: Torture-test updates. torturescript.2021.03.22a: Torture-test scripting updates. commit 7ac3fdf099bf784794eb944e0ba5bb69867ca06d Author: Paul E. McKenney Date: Thu Feb 25 20:56:10 2021 -0800 rcutorture: Test start_poll_synchronize_rcu() and poll_state_synchronize_rcu() This commit causes rcutorture to test the new start_poll_synchronize_rcu() and poll_state_synchronize_rcu() functions. Because of the difficulty of determining the nature of a synchronous RCU grace (expedited or not), the test that insisted that poll_state_synchronize_rcu() detect an intervening synchronize_rcu() had to be dropped. Signed-off-by: Paul E. McKenney commit 0909fc2b2c41aae50a18a36ac2858d156f521871 Author: Paul E. McKenney Date: Thu Feb 25 17:36:06 2021 -0800 rcu: Provide polling interfaces for Tiny RCU grace periods There is a need for a non-blocking polling interface for RCU grace periods, so this commit supplies start_poll_synchronize_rcu() and poll_state_synchronize_rcu() for this purpose. Note that the existing get_state_synchronize_rcu() may be used if future grace periods are inevitable (perhaps due to a later call_rcu() invocation). The new start_poll_synchronize_rcu() is to be used if future grace periods might not otherwise happen. Finally, poll_state_synchronize_rcu() provides a lockless check for a grace period having elapsed since the corresponding call to either of the get_state_synchronize_rcu() or start_poll_synchronize_rcu(). As with get_state_synchronize_rcu(), the return value from either get_state_synchronize_rcu() or start_poll_synchronize_rcu() is passed in to a later call to either poll_state_synchronize_rcu() or the existing (might_sleep) cond_synchronize_rcu(). [ paulmck: Revert cond_synchronize_rcu() to might_sleep() per Frederic Weisbecker feedback. ] Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 69cdfb530f7b8b094e49555454869afc8140b1bb Merge: d1c5688087a09 810a2e1f10739 Author: David S. Miller Date: Wed Mar 24 16:52:48 2021 -0700 Merge branch 'ipa-versions-and-registers' Alex Elder says: ==================== net: ipa: versions and registers Version 2 of this series adds kernel-doc descriptions for all members of the ipa_version enumerated type in patch 2. The original description of the series is below. -Alex This series is sort of a mix of things, generally related to updating IPA versions and register definitions. The first patch fixes some version-related tests throughout the code so the conditions are valid for IPA versions other than the two that are currently supported. Support for additional versions is forthcoming, and this is a preparatory step. The second patch adds to the set of defined IPA versions, to include all versions between 3.0 and 4.11. The next defines an endpoint initialization register that was previously not being configured. We now initialize that register (so that NAT is explicitly disabled) on all AP endpoints. The fourth adds support for an extra bit in a field in a register, which is present starting at IPA v4.5. The last two are sort of standalone. One just moves a function definition and makes it private. The other increases the number of GSI channels and events supported by the driver, sufficient for IPA v4.5. ==================== Signed-off-by: David S. Miller commit 810a2e1f1073983eebcdf3d4e98d6183db863c6f Author: Alex Elder Date: Wed Mar 24 08:15:28 2021 -0500 net: ipa: increase channels and events Increase the maximum number of channels and event rings supported by the driver, to allow the maximum available on the SDX55. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 1910494ee32cb43e295f9bf471bdc1d28ada99f7 Author: Alex Elder Date: Wed Mar 24 08:15:27 2021 -0500 net: ipa: move ipa_aggr_granularity_val() We only use ipa_aggr_granularity_val() inside "ipa_main.c", so it doesn't really need to be defined in a header file. It makes some sense to be grouped with the register definitions, but it is unlike the other inline functions now defined in "ipa_reg.h". So move it into "ipa_main.c" where it's used. TIMER_FREQUENCY is used only by that function, so move that definition as well. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e6e49e435512c8bcf104e594d3cc34b8f3818492 Author: Alex Elder Date: Wed Mar 24 08:15:26 2021 -0500 net: ipa: limit local processing context address Not all of the bits of the LOCAL_PKT_PROC_CNTXT register are valid. Until IPA v4.5, there are 17 valid bits (though the bottom three must be zero). Starting with IPA v4.5, 18 bits are valid. Introduce proc_cntxt_base_addr_encoded() to encode the base address for use in the register using only the valid bits. Shorten the name of the register (omit "_BASE") to avoid the need to wrap the line in the one place it's used. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 647a05f3ae98ba98b87dc1177a54d205fbaa1b66 Author: Alex Elder Date: Wed Mar 24 08:15:25 2021 -0500 net: ipa: define the ENDP_INIT_NAT register Define the ENDP_INIT_NAT register for setting up the NAT configuration for an endpoint. We aren't using NAT at this time, so explicitly set the type to BYPASS for all endpoints. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit eb09457c9d33b6d270fea099840cda0bb38d4e26 Author: Alex Elder Date: Wed Mar 24 08:15:24 2021 -0500 net: ipa: update version definitions Add IPA version definitions for all IPA v3.x and v4.x. Fix the GSI version associated with IPA version 4.1. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d7f3087b396d8aa4b4751b61fa8cbab82113bd59 Author: Alex Elder Date: Wed Mar 24 08:15:23 2021 -0500 net: ipa: reduce IPA version assumptions Modify conditional tests throughout the IPA code so they do not assume that IPA v3.5.1 is the oldest version supported. Also remove assumptions that IPA v4.5 is the newest version of IPA supported. Augment versions in comments with "+", to be clearer that the comment applies to a version and subsequent versions. (E.g., "present for IPA v4.2+" instead of just "present for v4.2".) Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit d1c5688087a0904606a77ae4803f13777f8dd7d5 Author: Eric Dumazet Date: Wed Mar 24 15:01:38 2021 -0700 tcp_metrics: tcpm_hash_bucket is strictly local After commit 098a697b497e ("tcp_metrics: Use a single hash table for all network namespaces."), tcpm_hash_bucket is local to net/ipv4/tcp_metrics.c Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba Author: Eric Dumazet Date: Wed Mar 24 14:53:37 2021 -0700 inet: use bigger hash table for IP ID generation In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") I used a very small hash table that could be abused by patient attackers to reveal sensitive information. Switch to a dynamic sizing, depending on RAM size. Typical big hosts will now use 128x more storage (2 MB) to get a similar increase in security and reduction of hash collisions. As a bonus, use of alloc_large_system_hash() spreads allocated memory among all NUMA nodes. Fixes: 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") Reported-by: Amit Klein Signed-off-by: Eric Dumazet Cc: Willy Tarreau Signed-off-by: David S. Miller commit eb9da2c1b60390802c48354f7d5c644c26a9e56f Merge: 3c85a8b81cc89 ffd3e9b07b9ee Author: David S. Miller Date: Wed Mar 24 16:34:58 2021 -0700 Merge branch 'mlxsw-resilient-nh-groups' Ido Schimmel says: ==================== mlxsw: Add support for resilient nexthop groups This patchset adds support for resilient nexthop groups in mlxsw. As far as the hardware is concerned, resilient groups are the same as regular groups. The differences lie in how mlxsw manages the individual adjacency entries (nexthop buckets) that make up the group. The first difference is that unlike regular groups the driver needs to periodically update the kernel about activity of nexthop buckets so that the kernel will not treat the buckets as idle, given traffic is offloaded from the CPU to the ASIC. This is similar to what mlxsw is already doing with respect to neighbour entries. The update interval is set to 1 second to allow for short idle timers. The second difference is that nexthop buckets that correspond to an unresolved neighbour must be programmed to the device, as the size of the group must remain fixed. This is achieved by programming such entries with trap action, in order to trigger neighbour resolution by the kernel. The third difference is atomic replacement of individual nexthop buckets. While the driver periodically updates the kernel about activity of nexthop buckets, it is possible for a bucket to become active just before the kernel decides to replace it with a different nexthop. To avoid such situations and connections being reset, the driver instructs the device to only replace an adjacency entry if it is inactive. Failures are propagated back to the nexthop code. Patchset overview: Patches #1-#7 gradually add support for resilient nexthop groups Patch #8 finally enables such groups to be programmed to the device Patches #9-#10 add mlxsw-specific selftests ==================== Signed-off-by: David S. Miller commit ffd3e9b07b9ee3242fa5f5bc76385b6a0e69437d Author: Ido Schimmel Date: Wed Mar 24 22:14:24 2021 +0200 selftests: mlxsw: Add resilient nexthop groups configuration tests Test that unsupported resilient nexthop group configurations are rejected and that offload / trap indication is correctly set on nexthop buckets in a resilient group. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 861584724c44e63bfb684090c70ade660dae6c69 Author: Ido Schimmel Date: Wed Mar 24 22:14:23 2021 +0200 selftests: mlxsw: Test unresolved neigh trap with resilient nexthop groups The number of nexthop buckets in a resilient nexthop group never changes, so when the gateway address of a nexthop cannot be resolved, the nexthop buckets are programmed to trap packets to the CPU in order to trigger resolution. For example: # ip nexthop add id 1 via 198.51.100.1 dev swp3 # ip nexthop add id 10 group 1 type resilient buckets 32 # ip nexthop bucket get id 10 index 0 id 10 index 0 idle_time 1.44 nhid 1 trap Where 198.51.100.1 is a made-up IP. Test that in this case packets are indeed trapped to the CPU via the unresolved neigh trap. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 03490a8239156933366f5595250fe3dc5d0e18aa Author: Ido Schimmel Date: Wed Mar 24 22:14:22 2021 +0200 mlxsw: spectrum_router: Enable resilient nexthop groups to be programmed Now that mlxsw supports resilient nexthop groups, allow them to be programmed after validating that their configuration conforms to the device's limitations (e.g., number of buckets is within predefined range). Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit debd2b3bf5735ec935f53f01834df6dbec35c8d3 Author: Ido Schimmel Date: Wed Mar 24 22:14:21 2021 +0200 mlxsw: spectrum_router: Periodically update activity of nexthop buckets The kernel periodically checks the idle time of nexthop buckets to determine if they are idle and can be re-populated with a new nexthop. When the resilient nexthop group is offloaded to hardware, the kernel will not see activity on nexthop buckets unless it is reported from hardware. Therefore, periodically (every 1 second) query the hardware for activity of adjacency entries used as part of a resilient nexthop group and report it to the nexthop code. The activity is only queried if resilient nexthop groups are in use. The delayed work is canceled otherwise. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 75d495b02982f5fa7eeb3fec9d9616bb7ab958bd Author: Ido Schimmel Date: Wed Mar 24 22:14:20 2021 +0200 mlxsw: reg: Add Router Adjacency Table Activity Dump Register The RATRAD register is used to dump and optionally clear activity bits of router adjacency table entries. Will be used by the next patch to query and clear the activity of nexthop buckets in a resilient nexthop group. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit d7761cb30374d5fcd45dd91ec015b9e7f7d5a120 Author: Ido Schimmel Date: Wed Mar 24 22:14:19 2021 +0200 mlxsw: spectrum_router: Update hardware flags on nexthop buckets So far, mlxsw only updated hardware flags ('offload' / 'trap') on nexthop objects. For resilient nexthop groups, these flags need to be updated on individual nexthop buckets as well. Update these flags whenever updating the flags of the encapsulating nexthop object and whenever a nexthop bucket is replaced. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 617a77f044ed7a92bb0c01c939d816f870947d5a Author: Ido Schimmel Date: Wed Mar 24 22:14:18 2021 +0200 mlxsw: spectrum_router: Add nexthop bucket replacement support Replace a single nexthop bucket upon receiving a 'NEXTHOP_EVENT_BUCKET_REPLACE' notification. When the 'force' parameter is not set, instruct the device to only overwrite an adjacency entry if its activity is cleared, so as not to break existing flows using the adjacency entry. The device does not provide feedback if the replacement was successful in this case, so the contents of the adjacency entry after the replacement are compared with the replacement request. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 197fdfd107e30a59e96691273b0b175cbf2471b8 Author: Ido Schimmel Date: Wed Mar 24 22:14:17 2021 +0200 mlxsw: spectrum_router: Pass payload pointer to nexthop update function Have the caller pass a pointer to the payload of the RATR register to the function updating a single nexthop / adjacency entry. In a subsequent patch, this will allow the caller to make sure replacement was successful by querying the state of the adjacency entry after replacement and comparing with the initial request. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 62b67ff33bee9e1adf408ed3c708fdf3c69b15be Author: Ido Schimmel Date: Wed Mar 24 22:14:16 2021 +0200 mlxsw: spectrum_router: Add ability to overwrite adjacency entry only when inactive Allow the driver to instruct the device to only overwrite an adjacency entry if its activity is cleared. Currently, adjacency entry is always overwritten, regardless of activity. This will be used by subsequent patches to prevent replacement of active nexthop buckets. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit c6fc65f48072c9c6144ea2d145c011317bd03441 Author: Ido Schimmel Date: Wed Mar 24 22:14:15 2021 +0200 mlxsw: spectrum_router: Add support for resilient nexthop groups Parse the configuration of resilient nexthop groups to existing mlxsw data structures. Unlike non-resilient groups, nexthops without a valid MAC or router interface (RIF) are programmed with a trap action instead of not being programmed at all. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 3c85a8b81cc89c712c4f44cb1a4d5547e472fb1f Author: Cooper Lees Date: Tue Mar 23 20:47:38 2021 -0700 Add Open Routing Protocol ID to `rtnetlink.h` - The Open Routing (Open/R) network protocol netlink handler uses ID 99 - Will also add to `/etc/iproute2/rt_protos` once this is accepted - For more information: https://github.com/facebook/openr Signed-off-by: From: Cooper Lees Signed-off-by: David S. Miller commit 3f994c25868729fb63a4eef42a7040e563eff365 Merge: b5cf28f7a890f ecd77d494ec99 Author: Mark Brown Date: Wed Mar 24 23:29:33 2021 +0000 Merge series "MFD/extcon/ASoC: Rework arizona codec jack-detect support" from Hans de Goede : Hi All, Here is v4 of my series to rework the arizona codec jack-detect support to use the snd_soc_jack helpers instead of direct extcon reporting. As discussed before here is a resend rebased on 5.12-rc2, making sure that all patches this depends on are in place. Lee, can you pick-up patches 1-6 through the MFD tree and then send a pull-req to Mark so that Mark can merge the Asoc parts throught the ASoC tree ? Patches 2-6 touch drivers/extcon, these all have an Ack from Chanwoo Choi for merging these through the MFD tree. Here is some more generic info on this series from the previous cover-letter: This is done by reworking the extcon driver into an arizona-jackdet library and then modifying the codec drivers to use that directly, replacing the old separate extcon child-devices and extcon-driver. This brings the arizona-codec jack-detect handling inline with how all other ASoC codec driver do this. This was developed and tested on a Lenovo Yoga Tablet 1051L with a WM5102 codec. This was also tested by Charles Keepax, one of the Cirrus Codec folks. Regards, Hans Hans de Goede (13): mfd: arizona: Drop arizona-extcon cells extcon: arizona: Fix some issues when HPDET IRQ fires after the jack has been unplugged extcon: arizona: Fix various races on driver unbind extcon: arizona: Fix flags parameter to the gpiod_get("wlf,micd-pol") call extcon: arizona: Always use pm_runtime_get_sync() when we need the device to be awake ASoC/extcon: arizona: Move arizona jack code to sound/soc/codecs/arizona-jack.c ASoC: arizona-jack: Move jack-detect variables to struct arizona_priv ASoC: arizona-jack: Use arizona->dev for runtime-pm ASoC: arizona-jack: convert into a helper library for codec drivers ASoC: arizona-jack: Use snd_soc_jack to report jack events ASoC: arizona-jack: Cleanup logging ASoC: arizona: Make the wm5102, wm5110, wm8997 and wm8998 drivers use the new jack library ASoC: Intel: bytcr_wm5102: Add jack detect support MAINTAINERS | 3 +- drivers/extcon/Kconfig | 8 - drivers/extcon/Makefile | 1 - drivers/mfd/arizona-core.c | 20 - sound/soc/codecs/Makefile | 2 +- .../soc/codecs/arizona-jack.c | 577 +++++++----------- sound/soc/codecs/arizona.h | 44 ++ sound/soc/codecs/wm5102.c | 12 +- sound/soc/codecs/wm5110.c | 12 +- sound/soc/codecs/wm8997.c | 14 +- sound/soc/codecs/wm8998.c | 9 + sound/soc/intel/boards/bytcr_wm5102.c | 28 +- 12 files changed, 325 insertions(+), 405 deletions(-) rename drivers/extcon/extcon-arizona.c => sound/soc/codecs/arizona-jack.c (76%) -- 2.30.1 commit 7abfabaf5f805f5171d133ce6af9b65ab766e76a Author: Jan Glauber Date: Wed Mar 17 15:04:39 2021 +0100 md: Fix missing unused status line of /proc/mdstat Reading /proc/mdstat with a read buffer size that would not fit the unused status line in the first read will skip this line from the output. So 'dd if=/proc/mdstat bs=64 2>/dev/null' will not print something like: unused devices: Don't return NULL immediately in start() for v=2 but call show() once to print the status line also for multiple reads. Cc: stable@vger.kernel.org Fixes: 1f4aace60b0e ("fs/seq_file.c: simplify seq_file iteration code and interface") Signed-off-by: Jan Glauber Signed-off-by: Song Liu commit 254c271da0712ea8914f187588e0f81f7678ee2f Author: Xiao Ni Date: Thu Feb 4 15:50:47 2021 +0800 md/raid10: improve discard request for far layout For far layout, the discard region is not continuous on disks. So it needs far copies r10bio to cover all regions. It needs a way to know all r10bios have finish or not. Similar with raid10_sync_request, only the first r10bio master_bio records the discard bio. Other r10bios master_bio record the first r10bio. The first r10bio can finish after other r10bios finish and then return the discard bio. Tested-by: Adrian Huang Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit d30588b2731fb01e1616cf16c3fe79a1443e29aa Author: Xiao Ni Date: Thu Feb 4 15:50:46 2021 +0800 md/raid10: improve raid10 discard request Now the discard request is split by chunk size. So it takes a long time to finish mkfs on disks which support discard function. This patch improve handling raid10 discard request. It uses the similar way with patch 29efc390b (md/md0: optimize raid0 discard handling). But it's a little complex than raid0. Because raid10 has different layout. If raid10 is offset layout and the discard request is smaller than stripe size. There are some holes when we submit discard bio to underlayer disks. For example: five disks (disk1 - disk5) D01 D02 D03 D04 D05 D05 D01 D02 D03 D04 D06 D07 D08 D09 D10 D10 D06 D07 D08 D09 The discard bio just wants to discard from D03 to D10. For disk3, there is a hole between D03 and D08. For disk4, there is a hole between D04 and D09. D03 is a chunk, raid10_write_request can handle one chunk perfectly. So the part that is not aligned with stripe size is still handled by raid10_write_request. If reshape is running when discard bio comes and the discard bio spans the reshape position, raid10_write_request is responsible to handle this discard bio. I did a test with this patch set. Without patch: time mkfs.xfs /dev/md0 real4m39.775s user0m0.000s sys0m0.298s With patch: time mkfs.xfs /dev/md0 real0m0.105s user0m0.000s sys0m0.007s nvme3n1 259:1 0 477G 0 disk └─nvme3n1p1 259:10 0 50G 0 part nvme4n1 259:2 0 477G 0 disk └─nvme4n1p1 259:11 0 50G 0 part nvme5n1 259:6 0 477G 0 disk └─nvme5n1p1 259:12 0 50G 0 part nvme2n1 259:9 0 477G 0 disk └─nvme2n1p1 259:15 0 50G 0 part nvme0n1 259:13 0 477G 0 disk └─nvme0n1p1 259:14 0 50G 0 part Reviewed-by: Coly Li Reviewed-by: Guoqing Jiang Tested-by: Adrian Huang Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit f2e7e269a7525317752d472bb48a549780e87d22 Author: Xiao Ni Date: Thu Feb 4 15:50:45 2021 +0800 md/raid10: pull the code that wait for blocked dev into one function The following patch will reuse these logics, so pull the same codes into one function. Tested-by: Adrian Huang Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit c2968285925adb97b9aa4ede94c1f1ab61ce0925 Author: Xiao Ni Date: Thu Feb 4 15:50:44 2021 +0800 md/raid10: extend r10bio devs to raid disks Now it allocs r10bio->devs[conf->copies]. Discard bio needs to submit to all member disks and it needs to use r10bio. So extend to r10bio->devs[geo.raid_disks]. Reviewed-by: Coly Li Tested-by: Adrian Huang Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit cf78408f937a67f59f5e90ee8e6cadeed7c128a8 Author: Xiao Ni Date: Thu Feb 4 15:50:43 2021 +0800 md: add md_submit_discard_bio() for submitting discard bio Move these logic from raid0.c to md.c, so that we can also use it in raid10.c. Reviewed-by: Coly Li Reviewed-by: Guoqing Jiang Tested-by: Adrian Huang Signed-off-by: Xiao Ni Signed-off-by: Song Liu commit e366a39208e58ef460b9539e235413dc2b10bc75 Author: Vladimir Oltean Date: Wed Mar 24 17:44:55 2021 +0200 net: enetc: don't depend on system endianness in enetc_set_mac_ht_flt When enetc runs out of exact match entries for unicast address filtering, it switches to an approach based on hash tables, where multiple MAC addresses might end up in the same bucket. However, the enetc_set_mac_ht_flt function currently depends on the system endianness, because it interprets the 64-bit hash value as an array of two u32 elements. Modify this to use lower_32_bits and upper_32_bits. Tested by forcing enetc to go into hash table mode by creating two macvlan upper interfaces: ip link add link eno0 address 00:01:02:03:00:00 eno0.0 type macvlan && ip link set eno0.0 up ip link add link eno0 address 00:01:02:03:00:01 eno0.1 type macvlan && ip link set eno0.1 up and verified that the same bit values are written to the registers before and after: enetc_sync_mac_filters: addr 00:00:80:00:40:10 exact match 0 enetc_sync_mac_filters: addr 00:00:00:00:80:00 exact match 0 enetc_set_mac_ht_flt: hash 0x80008000000000 UMHFR0 0x0 UMHFR1 0x800080 Signed-off-by: Vladimir Oltean Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit 110eccdb2469b9b54e509db1b3ea12a0626b7967 Author: Vladimir Oltean Date: Wed Mar 24 17:44:54 2021 +0200 net: enetc: don't depend on system endianness in enetc_set_vlan_ht_filter ENETC has a 64-entry hash table for VLAN RX filtering per Station Interface, which is accessed through two 32-bit registers: VHFR0 holding the low portion, and VHFR1 holding the high portion. The enetc_set_vlan_ht_filter function looks at the pf->vlan_ht_filter bitmap, which is fundamentally an unsigned long variable, and casts it to a u32 array of two elements. It puts the first u32 element into VHFR0 and the second u32 element into VHFR1. It is easy to imagine that this will not work on big endian systems (although, yes, we have bigger problems, because currently enetc assumes that the CPU endianness is equal to the controller endianness, aka little endian - but let's assume that we could add a cpu_to_le32 in enetc_wd_reg and a le32_to_cpu in enetc_rd_reg). Let's use lower_32_bits and upper_32_bits which are designed to work regardless of endianness. Tested that both the old and the new method produce the same results: $ ethtool -K eth1 rx-vlan-filter on $ ip link add link eth1 name eth1.100 type vlan id 100 enetc_set_vlan_ht_filter: method 1: si_idx 0 VHFR0 0x0 VHFR1 0x20 enetc_set_vlan_ht_filter: method 2: si_idx 0 VHFR0 0x0 VHFR1 0x20 $ ip link add link eth1 name eth1.101 type vlan id 101 enetc_set_vlan_ht_filter: method 1: si_idx 0 VHFR0 0x0 VHFR1 0x30 enetc_set_vlan_ht_filter: method 2: si_idx 0 VHFR0 0x0 VHFR1 0x30 $ ip link add link eth1 name eth1.34 type vlan id 34 enetc_set_vlan_ht_filter: method 1: si_idx 0 VHFR0 0x0 VHFR1 0x34 enetc_set_vlan_ht_filter: method 2: si_idx 0 VHFR0 0x0 VHFR1 0x34 $ ip link add link eth1 name eth1.1024 type vlan id 1024 enetc_set_vlan_ht_filter: method 1: si_idx 0 VHFR0 0x1 VHFR1 0x34 enetc_set_vlan_ht_filter: method 2: si_idx 0 VHFR0 0x1 VHFR1 0x34 Signed-off-by: Vladimir Oltean Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller commit 20fd4f421cf4c21ab37a8bf31db50c69f1b49355 Author: Wei Yongjun Date: Wed Mar 24 14:42:20 2021 +0000 netdevsim: switch to memdup_user_nul() Use memdup_user_nul() helper instead of open-coding to simplify the code. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit c3dde0ee7163856bf295fdbc09205b61581a7f92 Author: Sai Kalyaan Palla Date: Tue Mar 23 23:14:19 2021 +0530 net: decnet: Fixed multiple Coding Style issues Made changes to coding style as suggested by checkpatch.pl changes are of the type: space required before the open parenthesis '(' space required after that ',' Signed-off-by: Sai Kalyaan Palla Signed-off-by: David S. Miller commit 8a5c14877a48224334166f133b25c6581d657d4a Merge: 4adec7f81df8e d137c70d0e7a3 Author: David S. Miller Date: Wed Mar 24 15:20:08 2021 -0700 Merge branch 'phy-c45-loopback' Wong Vee Khee says: ==================== Add support for Clause-45 PHY Loopback This patch series add support for Clause-45 PHY loopback. It involves adding a generic API in the PHY framework, which can be accessed by all C45 PHY drivers using the .set_loopback callback. Also, enable PHY loopback for the Marvell 88x3310/88x2110 driver. ==================== Signed-off-by: David S. Miller commit d137c70d0e7a3db91ed0c674acb561c115911100 Author: Wong Vee Khee Date: Wed Mar 24 00:46:41 2021 +0800 net: phy: marvell10g: Add PHY loopback support Add support for PHY loopback for Marvell 88x2110 and Marvell 88x3310. This allow user to perform PHY loopback test using ethtool selftest. Signed-off-by: Wong Vee Khee Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0ef25ed104ac17fa0586fbb076f24a5e8940b966 Author: Wong Vee Khee Date: Wed Mar 24 00:46:40 2021 +0800 net: phy: add genphy_c45_loopback Add generic code to enable C45 PHY loopback into the common phy-c45.c file. This will allow C45 PHY drivers aceess this by setting .set_loopback. Suggested-by: Heiner Kallweit Signed-off-by: Wong Vee Khee Reviewed-by: Heiner Kallweit Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 4adec7f81df8e4fbf55f9d5ca98afa39f15b050f Author: Arnd Bergmann Date: Tue Mar 23 14:03:32 2021 +0100 rhashtable: avoid -Wrestrict warning on overlapping sprintf output sprintf() is declared with a restrict keyword to not allow input and output to point to the same buffer: lib/test_rhashtable.c: In function 'print_ht': lib/test_rhashtable.c:504:4: error: 'sprintf' argument 3 overlaps destination object 'buff' [-Werror=restrict] 504 | sprintf(buff, "%s\nbucket[%d] -> ", buff, i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/test_rhashtable.c:489:7: note: destination object referenced by 'restrict'-qualified argument 1 was declared here 489 | char buff[512] = ""; | ^~~~ Rework this function to remember the last offset instead to avoid the warning. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller commit b7fbc88692e60a4955ac54af0bcf7f2162761339 Author: Arnd Bergmann Date: Tue Mar 23 13:53:29 2021 +0100 octeontx2: fix -Wnonnull warning When compile testing this driver on a platform on which probe() is known to fail at compile time, gcc warns about the cgx_lmactype_string[] array being uninitialized: In function 'strncpy', inlined from 'link_status_user_format' at /git/arm-soc/drivers/net/ethernet/marvell/octeontx2/af/cgx.c:838:2, inlined from 'cgx_link_change_handler' at /git/arm-soc/drivers/net/ethernet/marvell/octeontx2/af/cgx.c:853:2: include/linux/fortify-string.h:27:30: error: argument 2 null where non-null expected [-Werror=nonnull] 27 | #define __underlying_strncpy __builtin_strncpy Address this by turning the runtime initialization into a fixed array, which should also produce better code. Signed-off-by: Arnd Bergmann Acked-by: Sunil Goutham Signed-off-by: David S. Miller commit 341f67e424e572bfc034daa534c6fa667533e6a4 Author: Tan Tee Min Date: Tue Mar 23 19:07:34 2021 +0800 net: stmmac: Add hardware supported cross-timestamp Cross timestamping is supported on Integrated Ethernet Controller in Intel SoC such as EHL and TGL with Always Running Timer. The hardware cross-timestamp result is made available to applications through the PTP_SYS_OFFSET_PRECISE ioctl which calls stmmac_getcrosststamp(). Device time is stored in the MAC Auxiliary register. The 64-bit System time (ART timestamp) is stored in registers that are only addressable by using MDIO space. Signed-off-by: Tan Tee Min Co-developed-by: Wong Vee Khee Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit bef32aa8e412b2495503134a3c02139151b3ebfc Author: Bhaskar Chowdhury Date: Wed Mar 24 13:22:04 2021 +0530 sfc-falcon: Fix a typo s/maintaning/maintaining/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 536e11f96b03ab6e382e8d13e57506c8d2944fb3 Author: Bhaskar Chowdhury Date: Wed Mar 24 13:16:37 2021 +0530 net: sched: Mundane typo fixes s/procdure/procedure/ s/maintanance/maintenance/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit b6c6680b8b3a08040822ef7227a723714d4451e9 Author: Bhaskar Chowdhury Date: Tue Mar 23 15:13:27 2021 +0530 octeontx2-af: Few mundane typos fixed s/preceeds/precedes/ .....two different places s/rsponse/response/ s/cetain/certain/ s/precison/precision/ Fix a sentence construction as per suggestion. Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 82e5d8cc768b0c7b03c551a9ab1f8f3f68d5f83f Author: Arnd Bergmann Date: Mon Mar 22 17:02:41 2021 +0100 security: commoncap: fix -Wstringop-overread warning gcc-11 introdces a harmless warning for cap_inode_getsecurity: security/commoncap.c: In function ‘cap_inode_getsecurity’: security/commoncap.c:440:33: error: ‘memcpy’ reading 16 bytes from a region of size 0 [-Werror=stringop-overread] 440 | memcpy(&nscap->data, &cap->data, sizeof(__le32) * 2 * VFS_CAP_U32); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The problem here is that tmpbuf is initialized to NULL, so gcc assumes it is not accessible unless it gets set by vfs_getxattr_alloc(). This is a legitimate warning as far as I can tell, but the code is correct since it correctly handles the error when that function fails. Add a separate NULL check to tell gcc about it as well. Signed-off-by: Arnd Bergmann Acked-by: Christian Brauner Signed-off-by: James Morris commit 3889ba70102ed8c609e42c1d3563c8c041ce0511 Author: Mark Rutland Date: Mon Mar 15 11:56:29 2021 +0000 arm64: irq: allow FIQs to be handled On contemporary platforms we don't use FIQ, and treat any stray FIQ as a fatal event. However, some platforms have an interrupt controller wired to FIQ, and need to handle FIQ as part of regular operation. So that we can support both cases dynamically, this patch updates the FIQ exception handling code to operate the same way as the IRQ handling code, with its own handle_arch_fiq handler. Where a root FIQ handler is not registered, an unexpected FIQ exception will trigger the default FIQ handler, which will panic() as today. Where a root FIQ handler is registered, handling of the FIQ is deferred to that handler. As el0_fiq_invalid_compat is supplanted by el0_fiq, the former is removed. For !CONFIG_COMPAT builds we never expect to take an exception from AArch32 EL0, so we keep the common el0_fiq_invalid handler. Signed-off-by: Mark Rutland Tested-by: Hector Martin Cc: James Morse Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Will Deacon Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210315115629.57191-7-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit f0098155d337cab638cf18e37a3e9257d653d481 Author: Hector Martin Date: Mon Mar 15 11:56:28 2021 +0000 arm64: Always keep DAIF.[IF] in sync Apple SoCs (A11 and newer) have some interrupt sources hardwired to the FIQ line. We implement support for this by simply treating IRQs and FIQs the same way in the interrupt vectors. To support these systems, the FIQ mask bit needs to be kept in sync with the IRQ mask bit, so both kinds of exceptions are masked together. No other platforms should be delivering FIQ exceptions right now, and we already unmask FIQ in normal process context, so this should not have an effect on other systems - if spurious FIQs were arriving, they would already panic the kernel. Signed-off-by: Hector Martin Signed-off-by: Mark Rutland Tested-by: Hector Martin Cc: James Morse Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Will Deacon Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210315115629.57191-6-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 9eb563cdabe1d583c262042d5d44cc256f644543 Author: Marc Zyngier Date: Mon Mar 15 11:56:27 2021 +0000 arm64: entry: factor irq triage logic into macros In subsequent patches we'll allow an FIQ handler to be registered, and FIQ exceptions will need to be triaged very similarly to IRQ exceptions. So that we can reuse the existing logic, this patch factors the IRQ triage logic out into macros that can be reused for FIQ. The macros are named to follow the elX_foo_handler scheme used by the C exception handlers. For consistency with other top-level exception handlers, the kernel_entry/kernel_exit logic is not moved into the macros. As FIQ will use a different C handler, this handler name is provided as an argument to the macros. There should be no functional change as a result of this patch. Signed-off-by: Marc Zyngier [Mark: rework macros, commit message, rebase before DAIF rework] Signed-off-by: Mark Rutland Tested-by: Hector Martin Cc: James Morse Cc: Thomas Gleixner Cc: Will Deacon Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210315115629.57191-5-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 8ff443cebffab22544b77a1f9fb3651a49bde300 Author: Mark Rutland Date: Mon Mar 15 11:56:26 2021 +0000 arm64: irq: rework root IRQ handler registration If we accidentally unmask IRQs before we've registered a root IRQ handler, handle_arch_irq will be NULL, and the IRQ exception handler will branch to a bogus address. To make this easier to debug, this patch initialises handle_arch_irq to a default handler which will panic(), making such problems easier to debug. When we add support for FIQ handlers, we can follow the same approach. When we add support for a root FIQ handler, it's possible to have root IRQ handler without an root FIQ handler, and in theory the inverse is also possible. To permit this, and to keep the IRQ/FIQ registration logic similar, this patch removes the panic in the absence of a root IRQ controller. Instead, set_handle_irq() logs when a handler is registered, which is sufficient for debug purposes. Signed-off-by: Mark Rutland Tested-by: Hector Martin Cc: James Morse Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Will Deacon Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210315115629.57191-4-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit 338a743640e98d26baf4a1450473ddcfe0a0c025 Author: Marc Zyngier Date: Mon Mar 15 11:56:25 2021 +0000 arm64: don't use GENERIC_IRQ_MULTI_HANDLER In subsequent patches we want to allow irqchip drivers to register as FIQ handlers, with a set_handle_fiq() function. To keep the IRQ/FIQ paths similar, we want arm64 to provide both set_handle_irq() and set_handle_fiq(), rather than using GENERIC_IRQ_MULTI_HANDLER for the former. This patch adds an arm64-specific implementation of set_handle_irq(). There should be no functional change as a result of this patch. Signed-off-by: Marc Zyngier [Mark: use a single handler pointer] Signed-off-by: Mark Rutland Tested-by: Hector Martin Cc: James Morse Cc: Thomas Gleixner Cc: Will Deacon Link: https://lore.kernel.org/r/20210315115629.57191-3-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit b0b8b689d78c9666a991e1cc87c3dad4c261007f Author: Marc Zyngier Date: Mon Mar 15 11:56:24 2021 +0000 genirq: Allow architectures to override set_handle_irq() fallback Some architectures want to provide the generic set_handle_irq() API, but for structural reasons need to provide their own implementation. For example, arm64 needs to do this to provide uniform set_handle_irq() and set_handle_fiq() registration functions. Make this possible by allowing architectures to provide their own implementation of set_handle_irq when CONFIG_GENERIC_IRQ_MULTI_HANDLER is not selected. Signed-off-by: Marc Zyngier [Mark: expand commit message] Signed-off-by: Mark Rutland Tested-by: Hector Martin Cc: James Morse Cc: Thomas Gleixner Cc: Will Deacon Link: https://lore.kernel.org/r/20210315115629.57191-2-mark.rutland@arm.com Signed-off-by: Catalin Marinas commit c4d74f0f978ed5ceee62cd3f6708081042e582a1 Author: kernel test robot Date: Mon Mar 22 19:21:39 2021 +0100 of: overlay: fix for_each_child.cocci warnings Function "for_each_child_of_node" should have of_node_put() before goto. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Fixes: 82c2d81361ec ("coccinelle: iterators: Add for_each_child.cocci script") CC: Sumera Priyadarsini Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Reviewed-by: Frank Rowand Tested-by: Frank Rowand Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2103221918450.2918@hadrien Signed-off-by: Rob Herring commit 709e8c99208e64c450e04347e8ac5be57d4d4a4d Author: Bhaskar Chowdhury Date: Sun Mar 21 00:55:53 2021 +0530 dt-bindings: msm: Couple of spelling fixes s/Subsytem/Subsystem/ s/contoller/controller/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210320192553.29922-1-unixbhaskar@gmail.com Signed-off-by: Rob Herring commit 9d5376872162dc70c16ae8379dba0266f35883f9 Author: Jay Fang Date: Wed Mar 24 14:16:42 2021 +0800 spi: pl022: Fix trailing whitespace Fix checkpatch error: ERROR: trailing whitespace #1198: FILE: spi-pl022.c:1198: Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-12-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 02621799966babf50d1d1dc523e834366904b55d Author: Jay Fang Date: Wed Mar 24 14:16:41 2021 +0800 spi: rockchip: Fix code indent should use tabs where possible Fix checkpatch errors: ERROR: code indent should use tabs where possible #484: FILE: spi-rockchip.c:484: +^I | CR0_BHT_8BIT << CR0_BHT_OFFSET$ ERROR: code indent should use tabs where possible #485: FILE: spi-rockchip.c:485: +^I | CR0_SSD_ONE << CR0_SSD_OFFSET$ ERROR: code indent should use tabs where possible #486: FILE: spi-rockchip.c:486: +^I | CR0_EM_BIG << CR0_EM_OFFSET;$ Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-11-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 6ca6ad908e965b1b01c31618971a1de7b6307a21 Author: Jay Fang Date: Wed Mar 24 14:16:40 2021 +0800 spi: spi-mem: Fix code indent should use tabs where possible Fix checkpatch errors: ERROR: code indent should use tabs where possible #624: FILE: spi-mem.c:624: ERROR: code indent should use tabs where possible #626: FILE: spi-mem.c:626: ERROR: code indent should use tabs where possible #627: FILE: spi-mem.c:627: Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-10-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 45793de7bf89fbd0fd1e2db9dda4e58a9c1395ee Author: Jay Fang Date: Wed Mar 24 14:16:39 2021 +0800 spi: jcore: Fix trailing statements should be on next line Fix checkpatch error: ERROR: trailing statements should be on next line #85: FILE: spi-jcore.c:85: + if (speed == hw->speed_hz) return; Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-9-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit f96c19fab393db16a2db78183ca8f584ee1b716a Author: Jay Fang Date: Wed Mar 24 14:16:38 2021 +0800 spi: spi-bitbang: Fix open brace following function definitions go on the next line Fix checkpatch errors: ERROR: open brace '{' following function definitions go on the next line #54: FILE: spi-bitbang.c:54: ERROR: open brace '{' following function definitions go on the next line #82: FILE: spi-bitbang.c:82: ERROR: open brace '{' following function definitions go on the next line #110: FILE: spi-bitbang.c:110: Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-8-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 211f8a0a39cd7dcd9c14744053ea681a0e7eb36d Author: Jay Fang Date: Wed Mar 24 14:16:37 2021 +0800 spi: dln2: Fix open brace following function definitions go on the next line Fix checkpatch error: ERROR: open brace '{' following function definitions go on the next line #545: FILE: spi-dln2.c:545: +static int dln2_spi_rdwr(struct dln2_spi *dln2, const u8 *tx_data, + u8 *rx_data, u16 data_len, u8 attr) { Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-7-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 99b3a36204564cb689cd862794043e1b8f5863b1 Author: Jay Fang Date: Wed Mar 24 14:16:36 2021 +0800 spi: spi-mtk-nor: Fix checkpatch spacing error Fix checkpatch error: ERROR: space required before the open parenthesis '(' #295: FILE: spi-mtk-nor.c:295: + switch(op->data.dir) { Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-6-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit f2edb98e806d0bf7947e5da352d69f4fbb063b04 Author: Jay Fang Date: Wed Mar 24 14:16:35 2021 +0800 spi: omap-100k: Fix checkpatch spacing errors Fix checkpatch errors: ERROR: space prohibited before that ',' (ctx:WxW) #113: FILE: spi-omap-100k.c:113: + writew(data , spi100k->base + SPI_TX_MSB); ^ ERROR: space prohibited before that ',' (ctx:WxW) #249: FILE: spi-omap-100k.c:249: + writew(0x3e , spi100k->base + SPI_SETUP1); ^ ERROR: space prohibited before that ',' (ctx:WxW) #250: FILE: spi-omap-100k.c:250: + writew(0x00 , spi100k->base + SPI_STATUS); ^ ERROR: space prohibited before that ',' (ctx:WxW) #251: FILE: spi-omap-100k.c:251: + writew(0x3e , spi100k->base + SPI_CTRL); ^ Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-5-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit c07caca3cea90332e410ba3e53bc264ae1f2c9c9 Author: Jay Fang Date: Wed Mar 24 14:16:34 2021 +0800 spi: pxa2xx: Fix checkpatch spacing errors Fix checkpatch errors: ERROR: space prohibited before that ',' (ctx:WxW) #255: FILE: spi-pxa2xx-pci.c:255: + ssp->clk = clk_register_fixed_rate(&dev->dev, buf , NULL, 0, ^ ERROR: "foo* bar" should be "foo *bar" #621: FILE: spi-pxa2xx.c:621: +static void int_error_stop(struct driver_data *drv_data, const char* msg) Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-4-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit e13a870ffaa60f459892eb4600a286b4db7da5ad Author: Jay Fang Date: Wed Mar 24 14:16:33 2021 +0800 spi: sprd: Fix checkpatch spacing error Fix checkpatch error: ERROR: space prohibited before that close parenthesis ')' #213: FILE: spi-sprd-adi.c:213: + rd_addr = (val & RD_ADDR_MASK ) >> RD_ADDR_SHIFT; Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-3-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit c9831087356b7ae02dfb22b3121117c48aa9e95b Author: Jay Fang Date: Wed Mar 24 14:16:32 2021 +0800 spi: spi-topcliff-pch: Fix checkpatch spacing error Fix checkpatch error: ERROR: space prohibited before that '++' (ctx:WxB) #1204: FILE: spi-topcliff-pch.c:1204: + for (i = 0; i < cnt; i ++) { ^ Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1616566602-13894-2-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit f56f2b953bccabb9bd283a734c7e35a1bb1c1ff8 Author: Jian Dong Date: Wed Mar 24 11:11:14 2021 +0800 regulator: mt6360: remove redundant error print fixes coccicheck warning: drivers/regulator/mt6360-regulator.c:384:3-10: line 384 is redundant because platform_get_irq() already prints an error in fact it is not platform_get_irq but platform_get_irq_byname print error Signed-off-by: Jian Dong Link: https://lore.kernel.org/r/1616555474-158789-1-git-send-email-dj0227@163.com Signed-off-by: Mark Brown commit ecd77d494ec995fb07102b408954c94f38374084 Author: Hans de Goede Date: Sun Mar 7 16:18:07 2021 +0100 ASoC: Intel: bytcr_wm5102: Add jack detect support Add jack detect support by creating a jack and calling snd_soc_component_set_jack to register the created jack with the codec. Reviewed-by: Andy Shevchenko Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307151807.35201-14-hdegoede@redhat.com Signed-off-by: Mark Brown commit 37dbabf14ff65510fa5aeecc1707ca390e608e00 Author: Hans de Goede Date: Sun Mar 7 16:18:06 2021 +0100 ASoC: arizona: Make the wm5102, wm5110, wm8997 and wm8998 drivers use the new jack library Make all arizona codec drivers for which drivers/mfd/arizona-core.c used to instantiate a "arizona-extcon" child-device use the new arizona-jack.c library for jack-detection. This has been tested on a Lenovo Yoga Tablet 2 1051L with a WM5102 codec. Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307151807.35201-13-hdegoede@redhat.com Signed-off-by: Mark Brown commit 69c58eb61e9b649096a0ab8cbc3c6f8521efd303 Author: Hans de Goede Date: Sun Mar 7 16:18:05 2021 +0100 ASoC: arizona-jack: Cleanup logging Cleanup the use of dev_foo functions used for logging: 1. Many of these are unnecessarily split over multiple lines 2. Use dev_err_probe() in cases where we might get a -EPROBE_DEFER return value Suggested-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307151807.35201-12-hdegoede@redhat.com Signed-off-by: Mark Brown commit 236b7285e95af5cb5a8b63283e573f433fb9b305 Author: Hans de Goede Date: Sun Mar 7 16:18:04 2021 +0100 ASoC: arizona-jack: Use snd_soc_jack to report jack events Use the snd_soc_jack code to report jack events, instead of using extcon for reporting the cable-type + an input_dev for reporting the button presses. The snd_soc_jack code will report the cable-type through both input_dev events and through ALSA controls and the button-presses through input_dev events. Note that this means that when the codec drivers are moved over to use the new arizona-jack.c library code instead of having a separate MFD extcon cell with the extcon-arizona.c driver, we will no longer report extcon events to userspace for cable-type changes. This should not be a problem since "standard" Linux distro userspace does not (and has never) used the extcon class interface for this. Android does have support for the extcon class interface, but that was introduced in the same release as support for input_dev cable-type events, so this should not be a problem for Android either. Note this also reduces ARIZONA_MAX_MICD_RANGE from 8 to 6, this is ok to do since this info is always provided through pdata (or defaults) and cannot be overridden from devicetree. All in-kernel users of the pdata (and the fallback defaults) define 6 or less buttons/ranges. Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307151807.35201-11-hdegoede@redhat.com Signed-off-by: Mark Brown commit ffcc84b9e814c8654e15e08816d0078d521a2724 Author: Hans de Goede Date: Sun Mar 7 16:18:03 2021 +0100 ASoC: arizona-jack: convert into a helper library for codec drivers Convert the arizona extcon driver into a helper library for direct use from the arizona codec-drivers, rather then being bound to a separate MFD cell. Note the probe (and remove) sequence is split into 2 parts: 1. The arizona_jack_codec_dev_probe() function inits a bunch of jack-detect specific variables in struct arizona_priv and tries to get a number of resources where getting them may fail with -EPROBE_DEFER. 2. Then once the machine driver has create a snd_sock_jack through snd_soc_card_jack_new() it calls snd_soc_component_set_jack() on the codec component, which will call the new arizona_jack_set_jack(), which sets up jack-detection and requests the IRQs. This split is necessary, because the IRQ handlers need access to the arizona->dapm pointer and the snd_sock_jack which are not available when the codec-driver's probe function runs. Note this requires that machine-drivers for codecs which are converted to use the new helper functions from arizona-jack.c are modified to create a snd_soc_jack through snd_soc_card_jack_new() and register this jack with the codec through snd_soc_component_set_jack(). Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307151807.35201-10-hdegoede@redhat.com Signed-off-by: Mark Brown commit 688c8461a425623ca6f679e6ba8965719a98def5 Author: Hans de Goede Date: Sun Mar 7 16:18:02 2021 +0100 ASoC: arizona-jack: Use arizona->dev for runtime-pm Drivers for MFD child-devices such as the arizona codec drivers and the arizona-extcon driver can choose to either make runtime_pm_get/_put calls on their own child-device, which will then be propagated to their parent; or they can make them directly on their MFD parent-device. The arizona-extcon code was using runtime_pm_get/_put calls on its own child-device where as the codec drivers are using runtime_pm_get/_put calls on their parent. The arizona-extcon MFD cell/child-device has been removed and this commit is part of refactoring the arizona-extcon code into a library to be used directly from the codec drivers. Specifically this commit moves the code over to make runtime_pm_get/_put calls on the parent device (on arizona->dev) bringing the code inline with how the codec drivers do this. Note this also removes the pm_runtime_enable/_disable calls as pm_runtime support has already been enabled on the parent-device by the arizona MFD driver. This is part of a patch series converting the arizona extcon driver into a helper library for letting the arizona codec-drivers directly report jack state through the standard sound/soc/soc-jack.c functions. Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307151807.35201-9-hdegoede@redhat.com Signed-off-by: Mark Brown commit bcda8cc4b868782c1a39d722d24f7d2598978389 Author: Hans de Goede Date: Sun Mar 7 16:18:01 2021 +0100 ASoC: arizona-jack: Move jack-detect variables to struct arizona_priv Move all the jack-detect variables from struct arizona_extcon_info to struct arizona_priv. This is part of a patch series converting the arizona extcon driver into a helper library for letting the arizona codec-drivers directly report jack state through the standard sound/soc/soc-jack.c functions. Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307151807.35201-8-hdegoede@redhat.com Signed-off-by: Mark Brown commit b5cf28f7a890f3554ca15a43edbbb86dd1b9663c Author: Shengjiu Wang Date: Wed Mar 24 17:58:48 2021 +0800 ASoC: fsl_micfil: Don't use devm_regmap_init_mmio_clk When there is power domain bind with ipg_clk clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang Reviewed-by: Viorel Suman Link: https://lore.kernel.org/r/1616579928-22428-7-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 3feaba79d8f701a774815483aa0e7f4edb15c880 Author: Shengjiu Wang Date: Wed Mar 24 17:58:47 2021 +0800 ASoC: fsl_audmix: Don't use devm_regmap_init_mmio_clk When there is power domain bind with ipg clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1616579928-22428-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 069b24f22eb9dba2e0886b40ea3feaa98e3f4f9b Author: Shengjiu Wang Date: Wed Mar 24 17:58:46 2021 +0800 ASoC: fsl_easrc: Don't use devm_regmap_init_mmio_clk When there is power domain bind with mem clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1616579928-22428-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit cab04ab5900fea6655f2a49d1f94c37200b63a59 Author: Shengjiu Wang Date: Wed Mar 24 17:58:45 2021 +0800 ASoC: fsl_asrc: Don't use devm_regmap_init_mmio_clk When there is power domain bind with mem clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1616579928-22428-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit c2562572467a74fd637d2d22fb773b052512528c Author: Shengjiu Wang Date: Wed Mar 24 17:58:44 2021 +0800 ASoC: fsl_spdif: Don't use devm_regmap_init_mmio_clk When there is power domain bind with core clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1616579928-22428-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 203773e39347922b3923df6094324d430664466e Author: Shengjiu Wang Date: Wed Mar 24 17:58:43 2021 +0800 ASoC: fsl_esai: Don't use devm_regmap_init_mmio_clk When there is power domain bind with bus clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk,but explicitly enable clock when it is used. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1616579928-22428-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 4b837ad53be2ab100dfaa99dc73a9443a8a2392d Merge: ad248f7761eb9 143490cde5669 Author: David S. Miller Date: Wed Mar 24 12:48:40 2021 -0700 Merge branch 'netfilter-flowtable' Pablo Neira Ayuso says: ==================== netfilter: flowtable enhancements [ This is v2 that includes documentation enhancements, including existing limitations. This is a rebase on top on net-next. ] The following patchset augments the Netfilter flowtable fastpath to support for network topologies that combine IP forwarding, bridge, classic VLAN devices, bridge VLAN filtering, DSA and PPPoE. This includes support for the flowtable software and hardware datapaths. The following pictures provides an example scenario: fast path! .------------------------. / \ | IP forwarding | | / \ \/ | br0 wan ..... eth0 . / \ host C -> veth1 veth2 . switch/router . . eth0 host A The bridge master device 'br0' has an IP address and a DHCP server is also assumed to be running to provide connectivity to host A which reaches the Internet through 'br0' as default gateway. Then, packet enters the IP forwarding path and Netfilter is used to NAT the packets before they leave through the wan device. The general idea is to accelerate forwarding by building a fast path that takes packets from the ingress path of the bridge port and place them in the egress path of the wan device (and vice versa). Hence, skipping the classic bridge and IP stack paths. ** Patch from #1 to #6 add the infrastructure which describes the list of netdevice hops to reach a given destination MAC address in the local network topology. Patch #1 adds dev_fill_forward_path() and .ndo_fill_forward_path() to netdev_ops. Patch #2 adds .ndo_fill_forward_path for vlan devices, which provides the next device hop via vlan->real_dev, the vlan ID and the protocol. Patch #3 adds .ndo_fill_forward_path for bridge devices, which allows to make lookups to the FDB to locate the next device hop (bridge port) in the forwarding path. Patch #4 extends bridge .ndo_fill_forward_path to support for bridge VLAN filtering. Patch #5 adds .ndo_fill_forward_path for PPPoE devices. Patch #6 adds .ndo_fill_forward_path for DSA. Patches from #7 to #14 update the flowtable software datapath: Patch #7 adds the transmit path type field to the flow tuple. Two transmit paths are supported so far: the neighbour and the xfrm transmit paths. Patch #8 and #9 update the flowtable datapath to use dev_fill_forward_path() to obtain the real ingress/egress device for the flowtable datapath. This adds the new ethernet xmit direct path to the flowtable. Patch #10 adds native flowtable VLAN support (up to 2 VLAN tags) through dev_fill_forward_path(). The flowtable stores the VLAN id and protocol in the flow tuple. Patch #11 adds native flowtable bridge VLAN filter support through dev_fill_forward_path(). Patch #12 adds native flowtable bridge PPPoE through dev_fill_forward_path(). Patch #13 adds DSA support through dev_fill_forward_path(). Patch #14 extends flowtable selftests to cover for flowtable software datapath enhancements. ** Patches from #15 to #20 update the flowtable hardware offload datapath: Patch #15 extends the flowtable hardware offload to support for the direct ethernet xmit path. This also includes VLAN support. Patch #16 stores the egress real device in the flow tuple. The software flowtable datapath uses dev_hard_header() to transmit packets, hence it might refer to VLAN/DSA/PPPoE software device, not the real ethernet device. Patch #17 deals with switchdev PVID hardware offload to skip it on egress. Patch #18 adds FLOW_ACTION_PPPOE_PUSH to the flow_offload action API. Patch #19 extends the flowtable hardware offload to support for PPPoE Patch #20 adds TC_SETUP_FT support for DSA. ** Patches from #20 to #23: Felix Fietkau adds a new driver which support hardware offload for the mtk PPE engine through the existing flow offload API which supports for the flowtable enhancements coming in this batch. Patch #24 extends the documentation and describe existing limitations. Please, apply, thanks. ==================== Signed-off-by: David S. Miller commit 143490cde5669e0151dff466a7c2cf70e2884fb7 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:55 2021 +0100 docs: nf_flowtable: update documentation with enhancements This patch updates the flowtable documentation to describe recent enhancements: - Offload action is available after the first packets go through the classic forwarding path. - IPv4 and IPv6 are supported. Only TCP and UDP layer 4 are supported at this stage. - Tuple has been augmented to track VLAN id and PPPoE session id. - Bridge and IP forwarding integration, including bridge VLAN filtering support. - Hardware offload support. - Describe the [OFFLOAD] and [HW_OFFLOAD] tags in the conntrack table listing. - Replace 'flow offload' by 'flow add' in example rulesets (preferred syntax). - Describe existing cache limitations. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 502e84e2382d92654a2ecbc52cdbdb5a11cdcec7 Author: Felix Fietkau Date: Wed Mar 24 02:30:54 2021 +0100 net: ethernet: mtk_eth_soc: add flow offloading support This adds support for offloading IPv4 routed flows, including SNAT/DNAT, one VLAN, PPPoE and DSA. Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit ba37b7caf1ed2395cc84d8f823ff933975f1f789 Author: Felix Fietkau Date: Wed Mar 24 02:30:53 2021 +0100 net: ethernet: mtk_eth_soc: add support for initializing the PPE The PPE (packet processing engine) is used to offload NAT/routed or even bridged flows. This patch brings up the PPE and uses it to get a packet hash. It also contains some functionality that will be used to bring up flow offloading. Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit d5c53da2b4a57f0d0e51d8220c46e5f5935fe9f3 Author: Felix Fietkau Date: Wed Mar 24 02:30:52 2021 +0100 net: ethernet: mtk_eth_soc: fix parsing packets in GDM When using DSA, set the special tag in GDM ingress control to allow the MAC to parse packets properly earlier. This affects rx DMA source port reporting. Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 3fb24a43c97573cc10194e5733098fe03b3ae825 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:51 2021 +0100 dsa: slave: add support for TC_SETUP_FT The dsa infrastructure provides a well-defined hierarchy of devices, pass up the call to set up the flow block to the master device. From the software dataplane, the netfilter infrastructure uses the dsa slave devices to refer to the input and output device for the given skbuff. Similarly, the flowtable definition in the ruleset refers to the dsa slave port devices. This patch adds the glue code to call ndo_setup_tc with TC_SETUP_FT with the master device via the dsa slave devices. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 17e52c0aaad7fa7867fa07a5e2666bc8b032ae80 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:50 2021 +0100 netfilter: flowtable: support for FLOW_ACTION_PPPOE_PUSH Add a PPPoE push action if layer 2 protocol is ETH_P_PPP_SES to add PPPoE flowtable hardware offload support. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 563ae557dd4eebb11472a1c264d40bfc08470395 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:49 2021 +0100 net: flow_offload: add FLOW_ACTION_PPPOE_PUSH Add an action to represent the PPPoE hardware offload support that includes the session ID. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 26267bf9bb57d504c785d8659adc8e02b6629c95 Author: Felix Fietkau Date: Wed Mar 24 02:30:48 2021 +0100 netfilter: flowtable: bridge vlan hardware offload and switchdev The switch might have already added the VLAN tag through PVID hardware offload. Keep this extra VLAN in the flowtable but skip it on egress. Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 73f97025a972cd1506e8b1986264b2fb8833df7c Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:47 2021 +0100 netfilter: nft_flow_offload: use direct xmit if hardware offload is enabled If there is a forward path to reach an ethernet device and hardware offload is enabled, then use the direct xmit path. Moreover, store the real device in the direct xmit path info since software datapath uses dev_hard_header() to push the layer encapsulation headers while hardware offload refers to the real device. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit eeff3000f2401fde872f21b0ce2f298dcc89e5c5 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:46 2021 +0100 netfilter: flowtable: add offload support for xmit path types When the flow tuple xmit_type is set to FLOW_OFFLOAD_XMIT_DIRECT, the dst_cache pointer is not valid, and the h_source/h_dest/ifidx out fields need to be used. This patch also adds the FLOW_ACTION_VLAN_PUSH action to pass the VLAN tag to the driver. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 79d4071ea4c49260286cf75dc669a0ed354d1c4e Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:45 2021 +0100 selftests: netfilter: flowtable bridge and vlan support This patch adds two new tests to cover bridge and vlan support: - Add a bridge device to the Router1 (nsr1) container and attach the veth0 device to the bridge. Set the IP address to the bridge device to exercise the bridge forwarding path. - Add vlan encapsulation between to the bridge device in the Router1 and one of the sender containers (ns1). Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit a11e7973cf918e3e212b7cb0ba8b3cccb9ed82b6 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:44 2021 +0100 netfilter: flowtable: add dsa support Replace the master ethernet device by the dsa slave port. Packets coming in from the software ingress path use the dsa slave port as input device. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 72efd585f7144a047f7da63864284764596ccad9 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:43 2021 +0100 netfilter: flowtable: add pppoe support Add the PPPoE protocol and session id to the flow tuple using the encap fields to uniquely identify flows from the receive path. For the transmit path, dev_hard_header() on the vlan device push the headers. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit e990cef6516daa4e1e236433579e333f74fd38cb Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:42 2021 +0100 netfilter: flowtable: add bridge vlan filtering support Add the vlan tag based when PVID is set on. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 4cd91f7c290f64fe430867ddbae10bff34657b6a Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:41 2021 +0100 netfilter: flowtable: add vlan support Add the vlan id and protocol to the flow tuple to uniquely identify flows from the receive path. For the transmit path, dev_hard_header() on the vlan device push the headers. This patch includes support for two vlan headers (QinQ) from the ingress path. Add a generic encap field to the flowtable entry which stores the protocol and the tag id. This allows to reuse these fields in the PPPoE support coming in a later patch. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 7a27f6ab41356ecba47ec2bec6d635704c169779 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:40 2021 +0100 netfilter: flowtable: use dev_fill_forward_path() to obtain egress device The egress device in the tuple is obtained from route. Use dev_fill_forward_path() instead to provide the real egress device for this flow whenever this is available. The new FLOW_OFFLOAD_XMIT_DIRECT type uses dev_queue_xmit() to transmit ethernet frames. Cache the source and destination hardware address to use dev_queue_xmit() to transfer packets. The FLOW_OFFLOAD_XMIT_DIRECT replaces FLOW_OFFLOAD_XMIT_NEIGH if dev_fill_forward_path() finds a direct transmit path. In case of topology updates, if peer is moved to different bridge port, the connection will time out, reconnect will result in a new entry with the correct path. Snooping fdb updates would allow for cleaning up stale flowtable entries. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit c63a7cc4d795c004b70cb935e8ba77d9e764f0ba Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:39 2021 +0100 netfilter: flowtable: use dev_fill_forward_path() to obtain ingress device Obtain the ingress device in the tuple from the route in the reply direction. Use dev_fill_forward_path() instead to get the real ingress device for this flow. Fall back to use the ingress device that the IP forwarding route provides if: - dev_fill_forward_path() finds no real ingress device. - the ingress device that is obtained is not part of the flowtable devices. - this route has a xfrm policy. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 5139c0c007250c01c61337d584db4072c4786bf6 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:38 2021 +0100 netfilter: flowtable: add xmit path types Add the xmit_type field that defines the two supported xmit paths in the flowtable data plane, which are the neighbour and the xfrm xmit paths. This patch prepares for new flowtable xmit path types to come. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit 0994d492a1b78dff96671ccf6ad8294cc2bd909e Author: Felix Fietkau Date: Wed Mar 24 02:30:37 2021 +0100 net: dsa: resolve forwarding path for dsa slave ports Add .ndo_fill_forward_path for dsa slave port devices Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit f6efc675c9dd8d93f826b79ae7e33e03301db609 Author: Felix Fietkau Date: Wed Mar 24 02:30:36 2021 +0100 net: ppp: resolve forwarding path for bridge pppoe devices Pass on the PPPoE session ID, destination hardware address and the real device. Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit bcf2766b1377421b7c9259865b25c1b62a7fa686 Author: Felix Fietkau Date: Wed Mar 24 02:30:35 2021 +0100 net: bridge: resolve forwarding path for VLAN tag actions in bridge devices Depending on the VLAN settings of the bridge and the port, the bridge can either add or remove a tag. When vlan filtering is enabled, the fdb lookup also needs to know the VLAN tag/proto for the destination address To provide this, keep track of the stack of VLAN tags for the path in the lookup context Signed-off-by: Felix Fietkau Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit ec9d16bab615ceda8ac22a7b4d2c7601bbe172cb Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:34 2021 +0100 net: bridge: resolve forwarding path for bridge devices Add .ndo_fill_forward_path for bridge devices. Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit e4417d6950b06fe6c520e937b337daff093220ff Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:33 2021 +0100 net: 8021q: resolve forwarding path for vlan devices Add .ndo_fill_forward_path for vlan devices. For instance, assuming the following topology: IP forwarding / \ eth0.100 eth0 | eth0 . . . ethX ab:cd:ef:ab:cd:ef For packets going through IP forwarding to eth0.100 whose destination MAC address is ab:cd:ef:ab:cd:ef, dev_fill_forward_path() provides the following path: eth0.100 -> eth0 Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit ddb94eafab8b597b05904c8277194ea2d6357fa9 Author: Pablo Neira Ayuso Date: Wed Mar 24 02:30:32 2021 +0100 net: resolve forwarding path from virtual netdevice and HW destination address This patch adds dev_fill_forward_path() which resolves the path to reach the real netdevice from the IP forwarding side. This function takes as input the netdevice and the destination hardware address and it walks down the devices calling .ndo_fill_forward_path() for each device until the real device is found. For instance, assuming the following topology: IP forwarding / \ br0 eth0 / \ eth1 eth2 . . . ethX ab:cd:ef:ab:cd:ef where eth1 and eth2 are bridge ports and eth0 provides WAN connectivity. ethX is the interface in another box which is connected to the eth1 bridge port. For packets going through IP forwarding to br0 whose destination MAC address is ab:cd:ef:ab:cd:ef, dev_fill_forward_path() provides the following path: br0 -> eth1 .ndo_fill_forward_path for br0 looks up at the FDB for the bridge port from the destination MAC address to get the bridge port eth1. This information allows to create a fast path that bypasses the classic bridge and IP forwarding paths, so packets go directly from the bridge port eth1 to eth0 (wan interface) and vice versa. fast path .------------------------. / \ | IP forwarding | | / \ \/ | br0 eth0 . / \ -> eth1 eth2 . . . ethX ab:cd:ef:ab:cd:ef Signed-off-by: Pablo Neira Ayuso Signed-off-by: David S. Miller commit ad248f7761eb9a3ff9ba2a8c93b548600185a938 Author: Colin Ian King Date: Wed Mar 24 15:09:50 2021 +0000 net: bridge: Fix missing return assignment from br_vlan_replay_one call The call to br_vlan_replay_one is returning an error return value but this is not being assigned to err and the following check on err is currently always false because err was initialized to zero. Fix this by assigning err. Addresses-Coverity: ("'Constant' variable guards dead code") Fixes: 22f67cdfae6a ("net: bridge: add helper to replay VLANs installed on port") Signed-off-by: Colin Ian King Reviewed-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit bb11d9ac9d465cd18d3dc3ac09bb4b9ab9ddf3bd Merge: 45b85e47cdd79 5b7c0c32c9049 Author: David S. Miller Date: Wed Mar 24 12:14:08 2021 -0700 Merge branch 'bridge-mrp-next' Horatiu Vultur says: ==================== bridge: mrp: Disable roles before deleting The first patch in this series make sures that the driver is notified that the role is disabled before the MRP instance is deleted. The second patch uses this so it can simplify the driver. ==================== Signed-off-by: David S. Miller commit 5b7c0c32c90494f5aaf13f417cff5dc204575597 Author: Horatiu Vultur Date: Tue Mar 23 09:33:47 2021 +0100 net: ocelot: Simplify MRP deletion Now that the driver will always be notified that the role is deleted before the ring is deleted, then we don't need to duplicate the logic of cleaning the resources also in the delete function. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit b3cb91b97c04e29feee8888ad08426d8904be63f Author: Horatiu Vultur Date: Tue Mar 23 09:33:46 2021 +0100 bridge: mrp: Disable roles before deleting the MRP instance When an MRP instance was created, the driver was notified that the instance is created and then in a different callback about role of the instance. But when the instance was deleted the driver was notified only that the MRP instance is deleted and not also that the role is disabled. This patch make sure that the driver is notified that the role is changed to disabled before the MRP instance is deleted to have similar callbacks with the creating of the instance. In this way it would simplify the logic in the drivers. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 45b85e47cdd79740b858593f040431f66bf0f032 Merge: 5aa3afe107d90 7f8bcd915724f Author: David S. Miller Date: Wed Mar 24 12:07:22 2021 -0700 Merge branch 'hns-cleanups' Huazhong Tan says: ==================== net: hns: add some cleanups This series includes some cleanups for the HNS ethernet driver. ==================== Signed-off-by: David S. Miller commit 7f8bcd915724f9485475b515c554b840278526bc Author: Yonglong Liu Date: Tue Mar 23 15:41:09 2021 +0800 net: hns: remove redundant variable initialization There are some variables in HNS driver will not being referenced before assigned, so there is no need to init them. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 4a4ec57c0656ad4063775db11ace6d498171364a Author: Yonglong Liu Date: Tue Mar 23 15:41:08 2021 +0800 net: hns: remove unnecessary !! operation in hns_mac_config_sds_loopback_acpi() The !! operation of variable en in hns_mac_config_sds_loopback_acpi() is redundant, so remove it. Signed-off-by: Yonglong Liu Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit dcc683b81fc466c82830369738cab649a37ef3c2 Author: Huazhong Tan Date: Tue Mar 23 15:41:07 2021 +0800 net: hns: remove unused HNS_LED_PC_REG HNS_LED_PC_REG is not used and can be removed. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit cf7fc356676847c0ef29b3bafd620d8cecfed345 Author: Huazhong Tan Date: Tue Mar 23 15:41:06 2021 +0800 net: hns: remove unused NIC_LB_TEST_RX_PKG_ERR NIC_LB_TEST_RX_PKG_ERR is not used and can be removed. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 484da1f4f7c3f7f53f1833dad2aa00110cf97e5b Author: Huazhong Tan Date: Tue Mar 23 15:41:05 2021 +0800 net: hns: remove unused config_half_duplex() Since config_half_duplex() in struct mac_driver is unused, so remove it. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5bc72849240d9774039b8900f3fe9482fed536a0 Author: Huazhong Tan Date: Tue Mar 23 15:41:04 2021 +0800 net: hns: remove unused set_rx_ignore_pause_frames() Since set_rx_ignore_pause_frames() in struct mac_driver is unused, so remove it. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 72b06363f12479e11e547484a5220017c6124c31 Author: Huazhong Tan Date: Tue Mar 23 15:41:03 2021 +0800 net: hns: remove unused set_autoneg() Since set_autoneg() in struct hnae_ae_ops is unused, so remove it. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit e7eae3ad191e0239d837e9824bc327d613e60e64 Author: Huazhong Tan Date: Tue Mar 23 15:41:02 2021 +0800 net: hns: remove unused get_autoneg() Since get_autoneg() in struct hnae_ae_ops is unused, so remove it. Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 2da21daa7d93817fa82f703c29adfcb5eed7f77d Author: Chris Wilson Date: Fri Feb 5 17:43:57 2021 +0000 drm/i915/gt: Always flush the submission queue on checking for idle We check for idle during debug prints and other debugging actions. Simplify the flow by not touching execlists state. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210205174358.28465-1-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 985458d706bd86c16234bfc155535da2a64a9dde Author: Chris Wilson Date: Fri Feb 5 11:29:12 2021 +0000 drm/i915/selftest: Synchronise with the GPU timestamp Wait for the GPU to wake up from the semaphore before measuring the time, so that we coordinate the sampling on both the CPU and GPU for more accurate comparisons. v2: Switch to local_irq_disable() as once suggested by Mika. Reported-by: Bruce Chang Signed-off-by: Chris Wilson Cc: CQ Tang Reviewed-by: Bruce Chang Link: https://patchwork.freedesktop.org/patch/msgid/20210205112912.22978-1-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit dc4304001230557e30cf5eae52b4d7caa6473855 Author: Matthew Auld Date: Fri Feb 5 10:20:26 2021 +0000 drm/i915: give stolen system memory its own class In some future patches we will need to also support a stolen region carved from device local memory, on platforms like DG1. To handle this we can simply describe each in terms of its own memory class. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210205102026.806699-2-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 8ec8ad0f2f8e3e17e6a1f73ca18901097a90e6c4 Author: Matthew Auld Date: Fri Feb 5 10:20:25 2021 +0000 drm/i915: cleanup the region class/instance encoding Get rid of the strange REGION_MAP encoding stuff and just use an explicit class/instance pair for each region. This better matches our future uAPI where all queryable regions are identified with a u16 class and u16 instance. v2: fix whitespace Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210205102026.806699-1-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 2827ce6e543086deb24a46ddedc5a8a072275670 Author: Chris Wilson Date: Thu Feb 4 21:13:03 2021 +0000 drm/i915/gt: Double check heartbeat timeout before resetting Check that we have actually passed the heartbeat interval since last checking the request before resetting the device. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2780 Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20210204211303.21347-2-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 10c5585b5172921c9e4ccbae57637205abd5bda1 Author: Chris Wilson Date: Thu Feb 4 21:13:02 2021 +0000 drm/i915/selftests: Restore previous heartbeat interval Use the defaults we store on the engine when resetting the heartbeat as we may have had to adjust it from the config value during initialisation. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20210204211303.21347-1-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit e762bdf582af5b4c9af654553b3c5efc84c7ff65 Author: Matthew Auld Date: Wed Feb 3 17:12:31 2021 +0000 drm/i915/gtt/dg1: add PTE_LM plumbing for GGTT For the PTEs we get an LM bit, to signal whether the page resides in SMEM or LMEM. Based on a patch from Michel Thierry. BSpec: 45015 Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Signed-off-by: Daniele Ceraolo Spurio Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210203171231.551338-3-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 11724eea0d57c5bf82bf1d0082819d407f1c886e Author: Matthew Auld Date: Wed Feb 3 17:12:30 2021 +0000 drm/i915/gtt/dg1: add PTE_LM plumbing for ppGTT For the PTEs we get an LM bit, to signal whether the page resides in SMEM or LMEM. BSpec: 45040 v2: just use gen8_pte_encode for dg1 Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Venkata Sandeep Dhanalakota Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210203171231.551338-2-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit c538d54e49d8890e9df987c35919ea6a5f963dc9 Author: Zbigniew Kempczyński Date: Wed Feb 3 17:12:29 2021 +0000 drm/i915: Distinction of memory regions In preparation for Xe HP multi-tile architecture with multiple memory regions, we need to be able differentiate multiple instances of device local-memory. Note that the region name is just to give it a human friendly identifier, instead of using class/instance which also uniquely identifies the region. So far the region name is only for our own internal debugging in the kernel(like in the selftests), or debugfs which prints the list of regions, including the regions name. v2: add commentary for our current region name use Signed-off-by: Zbigniew Kempczyński Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210203171231.551338-1-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 1b07d6e9214ce7e55d91ea0510b7cac0decd8ed9 Author: Krzysztof Kozlowski Date: Mon Mar 15 13:44:23 2021 +0100 dt-bindings: add vendor prefix for AESOP Add vendor prefix for AESOP Embedded Forum (http://www.aesop.or.kr). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210315124423.115039-3-krzysztof.kozlowski@canonical.com Signed-off-by: Rob Herring commit 2837b34b20100973b3a64e1c68c729efb0ebe938 Author: Krzysztof Kozlowski Date: Mon Mar 15 13:44:22 2021 +0100 dt-bindings: add vendor prefix for YIC System Co., Ltd Add vendor prefix for YIC System Co., Ltd (http://www.yicsystem.com). Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210315124423.115039-2-krzysztof.kozlowski@canonical.com Signed-off-by: Rob Herring commit d2ea49e95afe9571381f328351963da2372cb91c Author: Krzysztof Kozlowski Date: Mon Mar 15 13:44:21 2021 +0100 dt-bindings: add vendor prefix for Siliconfile Technologies lnc. Add vendor prefix for Siliconfile Technologies lnc. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210315124423.115039-1-krzysztof.kozlowski@canonical.com Signed-off-by: Rob Herring commit 2601ab54987f310683fd6cfbf8178c76e03c2426 Author: Linus Walleij Date: Mon Mar 15 11:59:11 2021 +0100 dt-bindings: Convert the BCM4329 bindings to YAML and extend This converts the BCM4329 family bindings to YAML schema, and extends and fixes the bindings like this: - Name the bindings after the first chip (BCM4329) since wildcards like 43xx are nowadays frowned upon by the DT binding reviewers. We call this the "BCM4329 family" - Add compatible strings for all the variants that seem to exist in the wild. (Derived from firmware listings.) - Support specific-to-generic compatible strings (as already in use in DTS files). - Add required reg property (SDIO function number) - Add reset-gpios property (some systems wire this to a GPIO line). - I have only listed Arend as maintainer for now, volunteers can be added. Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Chi-hsien Lin Cc: Wright Feng Cc: Chung-hsien Hsu Cc: Julian Calaby Cc: brcm80211-dev-list.pdl@broadcom.com Cc: SHA-cyfmac-dev-list@infineon.com Cc: linux-mmc@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Ulf Hansson Link: https://lore.kernel.org/r/20210315105911.138553-1-linus.walleij@linaro.org Signed-off-by: Rob Herring commit c9a995e5a768c10a2d09d1fe196c69e7736ed9c3 Author: Chris Wilson Date: Mon Feb 1 16:42:22 2021 +0000 drm/i915/gt: Retire unexpected starting state error dumping We have not seen an occurrence of the false restart state recenty, and if we did see such an event from inside engine-reset, it would deadlock on trying to suspend the tasklet to read the register state (from inside the tasklet). Instead, we inspect the context state before submission which will alert us to any issues prior to execution on HW. Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Tvrtko Ursulin Cc: Andi Shyti Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20210201164222.14455-1-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 8bb92516da076968411c65100ea9d11c9440b783 Author: Chris Wilson Date: Mon Feb 1 10:04:48 2021 +0000 drm/i915/selftests: Use a single copy of the mocs table Instead of copying the whole table to each category (mocs, l3cc), use a single table with a pointer to it if the category is enabled. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20210201100448.9802-1-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit c10e4a7960f3032b0313c4b684e0b4025b4c138d Author: Chris Wilson Date: Mon Feb 1 08:56:22 2021 +0000 drm/i915: Protect against request freeing during cancellation on wedging As soon as we mark a request as completed, it may be retired. So when cancelling a request and marking it complete, make sure we first keep a reference to the request. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20210201085715.27435-4-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit d712f4ce25d3935d6e124a84f7f8d640ab0da611 Author: Michel Thierry Date: Wed Jan 27 13:14:17 2021 +0000 drm/i915: allocate cmd ring in lmem Prefer allocating the cmd ring from LMEM on dgfx. Signed-off-by: Michel Thierry Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210127131417.393872-8-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 772d5bdf2ba7ce390b685c0a5934cf524854ecbc Author: Matthew Auld Date: Wed Jan 27 13:14:16 2021 +0000 drm/i915: move engine scratch to LMEM Prefer allocating the engine scratch from LMEM on dgfx. v2: flatten the chain Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210127131417.393872-7-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit ba485bc8edf1a29eaea8343102c0824f45d8252b Author: Matthew Auld Date: Wed Jan 27 13:14:15 2021 +0000 drm/i915: allocate context from LMEM Prefer allocating the context from LMEM on dgfx. Based on a patch from Michel Thierry. v2: flatten the chain Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210127131417.393872-6-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 7c5cc941330df5a1868da6c8fb3710d804c11bc8 Author: Imre Deak Date: Wed Jan 27 13:14:14 2021 +0000 drm/i915/dg1: Reserve first 1MB of local memory On DG1 A0/B0 steppings the first 1MB of local memory must be reserved. One reason for this is that the 0xA0000-0xB0000 range is not accessible by the display, probably since this region is redirected to another memory location for legacy VGA compatibility. BSpec: 50586 Testcase: igt/kms_big_fb/linear-64bpp-rotate-0 v2: - Reserve the memory on B0 as well. v3: replace DRM_DEBUG/DRM_ERROR with drm_dbg/drm_err v4: fix the insanity Signed-off-by: Imre Deak Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210127131417.393872-5-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit adeca641bcb64f9e4fd477c0d1fe482f18934e90 Author: Abdiel Janulgue Date: Wed Jan 27 13:14:13 2021 +0000 drm/i915: introduce mem->reserved In the following patch we need to reserve regions unaccessible to the driver during initialization, so add mem->reserved for collecting such regions. v2: turn into an actual intel_memory_region_reserve api Cc: Imre Deak Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210127131417.393872-4-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 7f2aa5b3014a5f294b968283695b48acf6dbe883 Author: CQ Tang Date: Wed Jan 27 13:14:12 2021 +0000 drm/i915: reserve stolen for LMEM region The lmem region needs to remove the stolen part, which should just be a case of snipping it off the end. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210127131417.393872-3-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit a50ca39fbd018889dc48f9bf17ca924546645dbc Author: Matthew Auld Date: Wed Jan 27 13:14:11 2021 +0000 drm/i915: setup the LMEM region Hook up the LMEM region. Addresses will start from zero, and for CPU access we get LMEM_BAR which is just a 1:1 mapping of said region. Based on a patch from Michel Thierry. v2 by Jani: - use intel_uncore_read/intel_uncore_write - remove trailing blank line v3: s/drm_info/drm_dbg for info which in non-pertinent for the user Cc: Lucas De Marchi Cc: Joonas Lahtinen Cc: Rodrigo Vivi Signed-off-by: Matthew Auld Signed-off-by: Lucas De Marchi Signed-off-by: Jani Nikula Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210127131417.393872-2-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 2dfcc7f4e91ff853beab44ce62eeb1163a220e2f Author: Matthew Auld Date: Wed Jan 27 13:14:10 2021 +0000 drm/i915: make local-memory probing a GT operation Device local memory is very much a GT thing, therefore it should be the responsibility of the GT to setup the device local memory region. Suggested-by: Tvrtko Ursulin Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210127131417.393872-1-matthew.auld@intel.com [danvet: Rebase conflict.] Signed-off-by: Daniel Vetter commit 2913fa4d7d4236f92a0a90810e9f239fe2781131 Author: Emil Renner Berthing Date: Tue Jan 26 16:01:55 2021 +0100 drm/i915/gt: use new tasklet API for execution list This converts the driver to use the new tasklet API introduced in commit 12cc923f1ccc ("tasklet: Introduce new initialization API") v2: Fix up selftests/execlists. Signed-off-by: Emil Renner Berthing Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210126150155.1617-1-kernel@esmil.dk Signed-off-by: Daniel Vetter commit a29a22917d4cf14ad4e7a8c4c503629d5a771f06 Author: Matthew Auld Date: Tue Jan 26 10:30:19 2021 +0000 drm/i915/buddy: document the unused header bits The largest possible order is (63-PAGE_SHIFT), given that our min chunk size is PAGE_SIZE. With that we should only need at most 6 bits to represent all possible orders, giving us back 4 bits for other potential uses. Include a simple selftest to verify this. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210126103019.177622-1-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit b3f0c15a8ef16ce402a2a51f98b43b485c2e0c6d Author: Chris Wilson Date: Mon Jan 25 14:00:57 2021 +0000 drm/i915/gt: Move the defer_request waiter active assertion In defer_request() we start with the request we just unsubmitted (that should be the active request on the gpu) and then defer all of its waiters. No waiter should be ahead of the active request, so none should be marked as active. That assert failed. Of particular note this machine was undergoing persistent GPU resets due to underlying HW issues, so that may be a clue. A request is also marked as active when it is retired, regardless of current queue status, and so this assertion failure may be a result of the queue being completed by the reset and then subsequently processed by the tasklet. We can filter out retired requests here by doing the assertion check after the is-ready check (active is a subset of being ready). Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2978 Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210125140136.10494-2-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 310528114f7860dbf71ad7766b19c74e30e2b9be Author: Chris Wilson Date: Mon Jan 25 14:00:56 2021 +0000 drm/i915/selftests: Check for engine-reset errors in the middle of workarounds As we reset the engine between verifying the workarounds remain intact, report an engine reset failure. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20210125140136.10494-1-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit ae2fb480f32f657d896d78b6214c2efebfa61993 Author: Matthew Auld Date: Fri Jan 22 18:15:14 2021 +0000 drm/i915/gem: consolidate 2big error checking for object sizes Throw it into a simple helper, and throw a warning if we encounter an object which has been initialised with an object size that exceeds our limit of INT_MAX pages. Suggested-by: Chris Wilson Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210122181514.541436-2-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit f63f452ea6846867b7e775dcc0542b94fb9b1369 Author: Matthew Auld Date: Fri Jan 22 18:15:13 2021 +0000 drm/i915/gem: don't trust the dma_buf->size At least for the time being, we need to limit our object sizes such that the number of pages can fit within a 32b signed int. It looks like we should also apply the same restriction to any imported dma-buf. Signed-off-by: Matthew Auld Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210122181514.541436-1-matthew.auld@intel.com Signed-off-by: Daniel Vetter commit 041b7f07628969e2c266565d7ecf5b6e44979027 Author: Chris Wilson Date: Fri Jan 22 19:29:13 2021 +0000 drm/i915/gt: Replace 'return' with a fall-through Checkpatch worries that the 'return' before an else clause might be redundant. In this case, it is avoiding hitting the MISSING_CASE() warning. Let us appease checkpatch by falling through to the end of the function, which typically means that we then clean up the unused wa_list. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-10-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 32ce590bdd34f7603ca8e2b490c9227aa52fb5a6 Author: Chris Wilson Date: Fri Jan 22 19:29:12 2021 +0000 drm/i915/gt: Add a space before '(' Checkpatch noticed a while(0) and complains about the lack of space. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-9-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 70b0f07770ea7b2949b47b6b8d22c0ad8d533d96 Author: Chris Wilson Date: Fri Jan 22 19:29:11 2021 +0000 drm/i915/gt: Replace unnecessary ',' with '; ' Checkpatch spotted a couple of commas where we can use the more common ';', and so not worry about the subtle implications of sequence points. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-8-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 512114178eb970d2759bb0ba90f5e5feda75283d Author: Chris Wilson Date: Fri Jan 22 19:29:10 2021 +0000 drm/i915/gt: Insert spaces into GEN3_L3LOG_SIZE/4 Checkpatch wants spaces, let's give it some spaces. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-7-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit cbdeab13ad1a2da2189820cae5b8737b8bb941bf Author: Chris Wilson Date: Fri Jan 22 19:29:09 2021 +0000 drm/i915/gt: Wrap macro arg in () Checkpatch noticed that ppgtt->pd should have been (ppgtt)->pd to avoid issues with macros. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-6-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit ec450576f8f92f0eda9457d26fa61fd14a7fcee1 Author: Chris Wilson Date: Fri Jan 22 19:29:08 2021 +0000 drm/i915/gt: Remove a bonus newline Trailing newlines before closing the function are best forgotten, or else checkpatch moans. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-5-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 7898843c44221cd058884b2071211260a71d9770 Author: Chris Wilson Date: Fri Jan 22 19:29:07 2021 +0000 drm/i915/gt: Fixup misaligned function parameters Remember to align parameters to the '(', thanks checkpatch Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-4-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 1ca9b8da0fdc04f75bd601b3dc986ee69a68f400 Author: Chris Wilson Date: Fri Jan 22 19:29:06 2021 +0000 drm/i915/gt: Remove repeated words from comments Checkpatch spotted a few repeated words in the comment, genuine mistakes. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-3-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 2f8aa3b80eb45411c8174acdb6802b71c29f8841 Author: Chris Wilson Date: Fri Jan 22 19:29:05 2021 +0000 drm/i915/gt: Add some missing blank lines after declaration Trivial checkpatch cleanup. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-2-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 24f90d66887e904cd0ae47173d29ce6ad3f894dd Author: Chris Wilson Date: Fri Jan 22 19:29:04 2021 +0000 drm/i915/gt: SPDX cleanup Clean up the SPDX licence declarations to comply with checkpatch. Signed-off-by: Chris Wilson Reviewed-by: Michal Wajdeczko Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-1-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 56afa701514a9043a58533b43e16016662800178 Author: Tvrtko Ursulin Date: Thu Jan 21 16:19:36 2021 +0000 drm/i915: Decrease number of subplatform bits Commit 6ce1c33d6c36 ("drm/i915: Kill INTEL_SUBPLATFORM_AML") removed the only platform which used bit 2 so could also decrease the INTEL_SUBPLATFORM_BITS definition. This is not a fixes material but still lets make it precise. v2: * Fix assert in intel_device_info_subplatform_init by introducing INTEL_SUBPLATFORM_MASK. (Chris) * Update intel_subplatform(). Signed-off-by: Tvrtko Ursulin References: 6ce1c33d6c36 ("drm/i915: Kill INTEL_SUBPLATFORM_AML") Cc: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210121161936.746591-2-tvrtko.ursulin@linux.intel.com Signed-off-by: Daniel Vetter commit 536f77b1caa0c50b90b762cc79cf01c447fbd785 Author: Chris Wilson Date: Thu Jan 21 15:49:50 2021 +0000 drm/i915/gt: Call stop_ring() from ring resume, again For reasons I cannot explain, except to say this is Sandybridge after all, call stop_ring() again dring ring resume in order to prevent mysterious hard hangs. Testcase: igt/i915_selftest/hangcheck # snb Signed-off-by: Chris Wilson Cc: Mika Kuoppala Acked-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20210121154950.19898-3-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit eb5c10cbbc2fc6c743108a3a94c3edfde4059002 Author: Chris Wilson Date: Wed Jan 20 12:14:39 2021 +0000 drm/i915: Remove I915_USER_PRIORITY_SHIFT As we do not have any internal priority levels, the priority can be set directed from the user values. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20210120121439.17600-2-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 2867ff6ceb25ea09456ea233007a1e3fdeebd644 Author: Chris Wilson Date: Wed Jan 20 12:14:38 2021 +0000 drm/i915: Strip out internal priorities Since we are not using any internal priority levels, and in the next few patches will introduce a new index for which the optimisation is not so lear cut, discard the small table within the priolist. Signed-off-by: Chris Wilson Reviewed-by: Andi Shyti Link: https://patchwork.freedesktop.org/patch/msgid/20210120121439.17600-1-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter commit 989634fb49ad070671b5a4714d178d238f493868 Author: Kai Vehmanen Date: Wed Mar 24 14:37:25 2021 +0200 drm/i915/audio: set HDA link parameters in driver Update logic to program AUD_FREQ_CNTRL register based on new guidance. Earlier this register was configured by BIOS and driver discovered the value at init. This is no longer recommended and instead driver should set the values based on the hardware revision. Add the recommended values for all supported hardware. This change applies for all GEN12+ hardware. For TGL, some special case handling is needed to not break existing systems. Extend the debug print to also include values of the register as written by BIOS. This can help debug rare cases where BIOS has configured the link settings to incorrect values. Bspec: 49279 Signed-off-by: Kai Vehmanen Reviewed-by: Uma Shankar Signed-off-by: Uma Shankar Link: https://patchwork.freedesktop.org/patch/msgid/20210324123725.4170214-1-kai.vehmanen@linux.intel.com commit 9a8d3cda8daf54b1f8e67ccb360876379b7e7895 Author: Russ Weight Date: Tue Mar 23 15:46:50 2021 -0700 fpga: dfl: afu: harden port enable logic Port enable is not complete until ACK = 0. Change __afu_port_enable() to guarantee that the enable process is complete by polling for ACK == 0. Signed-off-by: Russ Weight Reviewed-by: Tom Rix Reviewed-by: Matthew Gerlach Acked-by: Wu Hao Signed-off-by: Moritz Fischer commit eecf77e097d27d26fe289d172b2e98433a8989f4 Author: Al Viro Date: Wed Mar 24 14:14:27 2021 -0400 autofs: should_expire() argument is guaranteed to be positive Signed-off-by: Al Viro commit 8082d50f4817ff6a7e08f4b7e9b18e5f8bfa290d Author: Shenming Lu Date: Mon Mar 22 14:01:58 2021 +0800 KVM: arm64: GICv4.1: Give a chance to save VLPI state Before GICv4.1, we don't have direct access to the VLPI state. So we simply let it fail early when encountering any VLPI in saving. But now we don't have to return -EACCES directly if on GICv4.1. Let’s change the hard code and give a chance to save the VLPI state (and preserve the UAPI). Signed-off-by: Shenming Lu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210322060158.1584-7-lushenming@huawei.com commit 12df7429213abbfa9632ab7db94f629ec309a58b Author: Zenghui Yu Date: Mon Mar 22 14:01:57 2021 +0800 KVM: arm64: GICv4.1: Restore VLPI pending state to physical side When setting the forwarding path of a VLPI (switch to the HW mode), we can also transfer the pending state from irq->pending_latch to VPT (especially in migration, the pending states of VLPIs are restored into kvm’s vgic first). And we currently send "INT+VSYNC" to trigger a VLPI to pending. Signed-off-by: Zenghui Yu Signed-off-by: Shenming Lu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210322060158.1584-6-lushenming@huawei.com commit f66b7b151e00427168409f8c1857970e926b1e27 Author: Shenming Lu Date: Mon Mar 22 14:01:56 2021 +0800 KVM: arm64: GICv4.1: Try to save VLPI state in save_pending_tables After pausing all vCPUs and devices capable of interrupting, in order to save the states of all interrupts, besides flushing the states in kvm’s vgic, we also try to flush the states of VLPIs in the virtual pending tables into guest RAM, but we need to have GICv4.1 and safely unmap the vPEs first. As for the saving of VSGIs, which needs the vPEs to be mapped and might conflict with the saving of VLPIs, but since we will map the vPEs back at the end of save_pending_tables and both savings require the kvm->lock to be held (thus only happen serially), it will work fine. Signed-off-by: Shenming Lu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210322060158.1584-5-lushenming@huawei.com commit 80317fe4a65375fae668672a1398a0fb73eb9023 Author: Shenming Lu Date: Mon Mar 22 14:01:55 2021 +0800 KVM: arm64: GICv4.1: Add function to get VLPI state With GICv4.1 and the vPE unmapped, which indicates the invalidation of any VPT caches associated with the vPE, we can get the VLPI state by peeking at the VPT. So we add a function for this. Signed-off-by: Shenming Lu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210322060158.1584-4-lushenming@huawei.com commit c21bc068cdbe5613d3319ae171c3f2eb9f321352 Author: Shenming Lu Date: Mon Mar 22 14:01:54 2021 +0800 irqchip/gic-v3-its: Drop the setting of PTZ altogether GICv4.1 gives a way to get the VLPI state, which needs to map the vPE first, and after the state read, we may remap the vPE back while the VPT is not empty. So we can't assume that the VPT is empty at the first map. Besides, the optimization of PTZ is probably limited since the HW should be fairly efficient to parse the empty VPT. Let's drop the setting of PTZ altogether. Signed-off-by: Shenming Lu Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210322060158.1584-3-lushenming@huawei.com commit 64b2f34f38cb999597570e09e04aa6e4c3fed07e Author: Al Viro Date: Wed Mar 24 14:11:29 2021 -0400 apparmor:match_mn() - constify devpath argument Signed-off-by: Al Viro commit 301beaf19739cb6e640ed44e630e7da993f0ecc8 Author: Marc Zyngier Date: Mon Mar 22 14:01:53 2021 +0800 irqchip/gic-v3-its: Add a cache invalidation right after vPE unmapping In order to be able to manipulate the VPT once a vPE has been unmapped, perform the required CMO to invalidate the CPU view of the VPT. Signed-off-by: Marc Zyngier Signed-off-by: Shenming Lu Link: https://lore.kernel.org/r/20210322060158.1584-2-lushenming@huawei.com commit e424aa5f547d2510f8ea1199e7b4ed8ef2d9439d Author: Darrick J. Wong Date: Mon Mar 22 09:51:50 2021 -0700 xfs: drop freeze protection when running GETFSMAP A recent log refactoring patchset from Brian Foster relaxed fsfreeze behavior with regards to the buffer cache -- now freeze only waits for pending buffer IO to finish, and does not try to drain the buffer cache LRU. As a result, fsfreeze should no longer stall indefinitely while fsmap runs. Drop the sb_start_write calls around fsmap invocations. While we're cleaning things, add a comment to the xfs_trans_alloc_empty call explaining why we're running around with empty transactions. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig commit 5b0a78ec0b5738046ab170e67cc28491cbee3f3f Author: Maarten Lankhorst Date: Tue Mar 23 16:50:52 2021 +0100 drm/i915: Move gt_revoke() slightly We get a lockdep splat when the reset mutex is held, because it can be taken from fence_wait. This conflicts with the mmu notifier we have, because we recurse between reset mutex and mmap lock -> mmu notifier. Remove this recursion by calling revoke_mmaps before taking the lock. The reset code still needs fixing, as taking mmap locks during reset is not allowed. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström [danvet: Add FIXME.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-64-maarten.lankhorst@linux.intel.com commit f227197bdf91a58903753ff18f5d0ad8f170e4b5 Author: Johan Jonker Date: Tue Feb 9 20:23:50 2021 +0100 arm64: dts: rockchip: enable dwc3 usb for A95X Z2 Enable dwc3 usb for A95X Z2. Signed-off-by: Johan Jonker Link: https://lore.kernel.org/r/20210209192350.7130-8-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 44dd5e2106dc2fd01697b539085818d1d1c58df0 Author: Cameron Nemo Date: Tue Feb 9 20:23:49 2021 +0100 arm64: dts: rockchip: add rk3328 dwc3 usb controller node RK3328 SoCs have one USB 3.0 OTG controller which uses DWC_USB3 core's general architecture. It can act as static xHCI host controller, static device controller, USB 3.0/2.0 OTG basing on ID of USB3.0 PHY. Signed-off-by: William Wu Signed-off-by: Cameron Nemo Signed-off-by: Johan Jonker Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210209192350.7130-7-jbx6244@gmail.com Signed-off-by: Heiko Stuebner commit 6e554abd07002405fd9175284a10729e2f54be43 Author: Will Deacon Date: Thu Mar 18 17:07:38 2021 +0000 arm64: compat: Poison the compat sigpage Commit 9c698bff66ab ("ARM: ensure the signal page contains defined contents") poisoned the unused portions of the signal page for 32-bit Arm. Implement the same poisoning for the compat signal page on arm64 rather than using __GFP_ZERO. Signed-off-by: Will Deacon Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210318170738.7756-6-will@kernel.org Signed-off-by: Catalin Marinas commit 77ec462536a13d4b428a1eead725c4818a49f0b1 Author: Will Deacon Date: Thu Mar 18 17:07:37 2021 +0000 arm64: vdso: Avoid ISB after reading from cntvct_el0 We can avoid the expensive ISB instruction after reading the counter in the vDSO gettime functions by creating a fake address hazard against a dummy stack read, just like we do inside the kernel. Signed-off-by: Will Deacon Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210318170738.7756-5-will@kernel.org Signed-off-by: Catalin Marinas commit 7adbf10e29c2323f5eb6d6bdd13050c70900b993 Author: Will Deacon Date: Thu Mar 18 17:07:36 2021 +0000 arm64: compat: Allow signal page to be remapped For compatability with 32-bit Arm, allow the compat signal page to be remapped via mremap(). Signed-off-by: Will Deacon Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210318170738.7756-4-will@kernel.org Signed-off-by: Catalin Marinas commit e9be47eab1cdaf0a2a3c0af96a6a4be1cf9a95c1 Author: Will Deacon Date: Thu Mar 18 17:07:35 2021 +0000 arm64: vdso: Remove redundant calls to flush_dcache_page() flush_dcache_page() ensures that the 'PG_dcache_clean' flag for its 'page' argument is clear so that cache maintenance will be performed if the page is mapped into userspace with execute permissions. Newly allocated pages have this flag clear, so there is no need to call flush_dcache_page() for the compat vdso or signal pages. Remove the redundant calls. Signed-off-by: Will Deacon Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210318170738.7756-3-will@kernel.org Signed-off-by: Catalin Marinas commit 7cd6ca1d7902260b54528054d729f2a3b27e5a00 Author: Will Deacon Date: Thu Mar 18 17:07:34 2021 +0000 arm64: vdso: Use GFP_KERNEL for allocating compat vdso and signal pages There's no need to allocate the compat vDSO and signal pages using GFP_ATOMIC allocations, so use GFP_KERNEL instead. Signed-off-by: Will Deacon Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20210318170738.7756-2-will@kernel.org Signed-off-by: Catalin Marinas commit fd995a3cc432da2d18c28c2731f41da9b751897b Author: Maarten Lankhorst Date: Tue Mar 23 16:50:51 2021 +0100 drm/i915: Keep userpointer bindings if seqcount is unchanged, v2. Instead of force unbinding and rebinding every time, we try to check if our notifier seqcount is still correct when pages are bound. This way we only rebind userptr when we need to, and prevent stalls. Changes since v1: - Missing mutex_unlock, reported by kbuild. Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Thomas Hellström Signed-off-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-63-maarten.lankhorst@linux.intel.com commit cf41a8f1dc1e471a378a1a0c46d72e2fbe7598d6 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:50 2021 +0100 drm/i915: Finally remove obj->mm.lock. With all callers and selftests fixed to use ww locking, we can now finally remove this lock. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-62-maarten.lankhorst@linux.intel.com commit 480ae79537b28f30ef6e07b7de69a9ae2599daa7 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:49 2021 +0100 drm/i915/selftests: Prepare gtt tests for obj->mm.lock removal We need to lock the global gtt dma_resv, use i915_vm_lock_objects to handle this correctly. Add ww handling for this where required. Add the object lock around unpin/put pages, and use the unlocked versions of pin_pages and pin_map where required. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-61-maarten.lankhorst@linux.intel.com commit b91e1b11f9fc54ae723e4f75a3d1b40d027cdbd8 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:48 2021 +0100 drm/i915/selftests: Prepare cs engine tests for obj->mm.lock removal Same as other tests, use pin_map_unlocked. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-60-maarten.lankhorst@linux.intel.com commit e70a27d7612596d6e8bade18a1094a3213cd012e Author: Maarten Lankhorst Date: Tue Mar 23 16:50:47 2021 +0100 drm/i915/selftests: Prepare memory region tests for obj->mm.lock removal Use the unlocked variants for pin_map and pin_pages, and add lock around unpinning/putting pages. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-59-maarten.lankhorst@linux.intel.com commit aa8b70be896e114168c0d5084633193959a1b195 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:46 2021 +0100 drm/i915/selftests: Prepare i915_request tests for obj->mm.lock removal Straightforward conversion by using unlocked versions. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-58-maarten.lankhorst@linux.intel.com commit 1060974c87846f6e68db47f87e5e4b8c140aa828 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:45 2021 +0100 drm/i915/selftests: Prepare timeline tests for obj->mm.lock removal We can no longer call intel_timeline_pin with a null argument, so add a ww loop that locks the backing object. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-57-maarten.lankhorst@linux.intel.com commit 9aa6de99e1ba189000f655d55686a1b57ecfac68 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:44 2021 +0100 drm/i915/selftests: Prepare ring submission for obj->mm.lock removal Use unlocked versions when the ww lock is not held. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-56-maarten.lankhorst@linux.intel.com commit e20e9b1503e5298bf960e98a32b58522db6b19dd Author: Maarten Lankhorst Date: Tue Mar 23 16:50:43 2021 +0100 drm/i915/selftests: Prepare mocs tests for obj->mm.lock removal Use pin_map_unlocked when we're not holding locks. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-55-maarten.lankhorst@linux.intel.com commit e09e903a6e89369c796ee3f3c9b6265c5fd2b95b Author: Maarten Lankhorst Date: Tue Mar 23 16:50:42 2021 +0100 drm/i915/selftests: Prepare execlists and lrc selftests for obj->mm.lock removal Convert normal functions to unlocked versions where needed. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-54-maarten.lankhorst@linux.intel.com commit 17b7ab92bec3a203a0c1e6a653ac5005aa34fcca Author: Maarten Lankhorst Date: Tue Mar 23 16:50:41 2021 +0100 drm/i915/selftests: Prepare hangcheck for obj->mm.lock removal Convert a few calls to use the unlocked versions. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-53-maarten.lankhorst@linux.intel.com commit d3ad29567d4e0b0002fd2b6fa598b9f4d88a5856 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:40 2021 +0100 drm/i915/selftests: Prepare context selftest for obj->mm.lock removal Only needs to convert a single call to the unlocked version. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-52-maarten.lankhorst@linux.intel.com commit af10e5a58c1b95687dbfd1fb50aef0755e372cdd Author: Maarten Lankhorst Date: Tue Mar 23 16:50:39 2021 +0100 drm/i915/selftests: Prepare igt_gem_utils for obj->mm.lock removal igt_emit_store_dw needs to use the unlocked version, as it's not holding a lock. This fixes igt_gpu_fill_dw() which is used by some other selftests. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-51-maarten.lankhorst@linux.intel.com commit fa7371c3d8dd67c39593c3ae2f16a82438ef790c Author: Maarten Lankhorst Date: Tue Mar 23 16:50:38 2021 +0100 drm/i915/selftests: Prepare object blit tests for obj->mm.lock removal. Use some unlocked versions where we're not holding the ww lock. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-50-maarten.lankhorst@linux.intel.com commit 30272919e5dbe4ed42f498c3d6b26e1925640a3b Author: Maarten Lankhorst Date: Tue Mar 23 16:50:37 2021 +0100 drm/i915/selftests: Prepare object tests for obj->mm.lock removal. Convert a single pin_pages call to use the unlocked version. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-49-maarten.lankhorst@linux.intel.com commit 6f791ffe00badc898bf3454f7d0a0d9f6e3ff7f9 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:36 2021 +0100 drm/i915/selftests: Prepare mman testcases for obj->mm.lock removal. Ensure we hold the lock around put_pages, and use the unlocked wrappers for pinning pages and mappings. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-48-maarten.lankhorst@linux.intel.com commit 1832f886ba73919a7f98bbeff3265e4202f8ec72 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:35 2021 +0100 drm/i915/selftests: Prepare execbuf tests for obj->mm.lock removal. Also quite simple, a single call needs to use the unlocked version. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-47-maarten.lankhorst@linux.intel.com commit e37298441a1f164e8d5185cea08982811c4e475c Author: Maarten Lankhorst Date: Tue Mar 23 16:50:34 2021 +0100 drm/i915/selftests: Prepare dma-buf tests for obj->mm.lock removal. Use pin_pages_unlocked() where we don't have a lock. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-46-maarten.lankhorst@linux.intel.com commit c2d0e9de5106bca07cb5ac1858e8aacf871d6dc1 Author: Maarten Lankhorst Date: Thu Jan 28 17:25:53 2021 +0100 drm/i915/selftests: Prepare context tests for obj->mm.lock removal. Straightforward conversion, just convert a bunch of calls to unlocked versions. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210128162612.927917-45-maarten.lankhorst@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-45-maarten.lankhorst@linux.intel.com commit 5521458d1c1aee5acb788b7829f00f7ce1063252 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:32 2021 +0100 drm/i915/selftests: Prepare coherency tests for obj->mm.lock removal. Straightforward conversion, just convert a bunch of calls to unlocked versions. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-44-maarten.lankhorst@linux.intel.com commit 86f2f8dfbf27b547ba276f0719f2f9497e4127b3 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:31 2021 +0100 drm/i915/selftests: Prepare client blit for obj->mm.lock removal. Straightforward conversion, just convert a bunch of calls to unlocked versions. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-43-maarten.lankhorst@linux.intel.com commit 6c12ada055759d90906973f8f171e23ff33f89cf Author: Maarten Lankhorst Date: Tue Mar 23 16:50:30 2021 +0100 drm/i915/selftests: Prepare huge_pages testcases for obj->mm.lock removal. Straightforward conversion, just convert a bunch of calls to unlocked versions. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-42-maarten.lankhorst@linux.intel.com commit e2c69f3a5b4edfbcade2c38862c1839fc371c5d5 Author: Arnd Bergmann Date: Mon Mar 22 22:51:51 2021 +0100 bpf: Avoid old-style declaration warnings gcc -Wextra wants type modifiers in the normal order: kernel/bpf/bpf_lsm.c:70:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] 70 | const static struct bpf_func_proto bpf_bprm_opts_set_proto = { | ^~~~~ kernel/bpf/bpf_lsm.c:91:1: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] 91 | const static struct bpf_func_proto bpf_ima_inode_hash_proto = { | ^~~~~ Fixes: 3f6719c7b62f ("bpf: Add bpf_bprm_opts_set helper") Fixes: 27672f0d280a ("bpf: Add a BPF helper for getting the IMA hash of an inode") Signed-off-by: Arnd Bergmann Signed-off-by: Alexei Starovoitov Acked-by: KP Singh Link: https://lore.kernel.org/bpf/20210322215201.1097281-1-arnd@kernel.org commit c28c2b851a223cf1b9b3ac48b8b8e3ef11bbb365 Author: Sebastian Reichel Date: Wed Mar 17 14:48:27 2021 +0100 ARM: dts: motorola-cpcap-mapphone: Prepare for dtbs_check parsing '<&gpio1 parameters &gpio2 parameters>' and '<&gpio1 parameters>, <&gpio2 parameters>' result in the same DTB, but second format has better source code readability. Also 'dtbs_check' currently uses this format to determine the amount of items specified, so using this syntax is needed to successfully verify the devicetree source against a DT schema format. Cc: linux-omap@vger.kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Tony Lindgren commit f5a1acab32481cf209065354bd6391458f472aa6 Author: Dario Binacchi Date: Sun Mar 14 16:16:28 2021 +0100 ARM: dts: am33xx-l4: fix tscadc@0 node indentation Fix the broken indentation of tscadc@0 node. Signed-off-by: Dario Binacchi Signed-off-by: Tony Lindgren commit 2082852fd72f9748cbaaa896825e827049932c69 Author: André Hentschel Date: Sat Jan 30 13:25:14 2021 +0100 ARM: dts: omap3-echo: Add ath6kl node Add ath6kl node. Signed-off-by: André Hentschel Signed-off-by: Tony Lindgren commit 9f98835bb0e57c526ca1598640df9311f73b7277 Author: André Hentschel Date: Sat Jan 30 13:25:13 2021 +0100 ARM: dts: omap3-echo: Update LED configuration Update LED configuration. Signed-off-by: André Hentschel Signed-off-by: Tony Lindgren commit 908e6543661015f06217477494df077d2445c9d8 Author: Drew Fustini Date: Tue Jan 26 16:03:03 2021 -0800 ARM: dts: am335x-pocketbeagle: unique gpio-line-names Based on linux-gpio discussion [1], it is best practice to make the gpio-line-names unique. Generic names like "[ethernet]" are replaced with the name of the unique signal on the AM3358 SoC ball corresponding to the gpio line. "[NC]" is also renamed to the standard "NC" name to represent "not connected". [1] https://lore.kernel.org/linux-gpio/20201216195357.GA2583366@x1/ Reviewed-by: Linus Walleij Reviewed-by: Bartosz Golaszewski Signed-off-by: Drew Fustini Signed-off-by: Tony Lindgren commit 26ad4f8b7352a91cf0d757d48c61f9ceee9a33db Author: Maarten Lankhorst Date: Tue Mar 23 16:50:29 2021 +0100 drm/i915: Use a single page table lock for each gtt. We may create page table objects on the fly, but we may need to wait with the ww lock held. Instead of waiting on a freed obj lock, ensure we have the same lock for each object to keep -EDEADLK working. This ensures that i915_vma_pin_ww can lock the page tables when required. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-41-maarten.lankhorst@linux.intel.com commit 988d4ff6e3c2220d13d8dde22a98945b64fd7977 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:28 2021 +0100 drm/i915: Fix ww locking in shmem_create_from_object Quick fix, just use the unlocked version. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-40-maarten.lankhorst@linux.intel.com commit 1d5ab1caa0c398334263a0e43733726167c1ee53 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:27 2021 +0100 drm/i915: Add missing ww lock in intel_dsb_prepare. Because of the long lifetime of the mapping, we cannot wrap this in a simple limited ww lock. Just use the unlocked version of pin_map, because we'll likely release the mapping a lot later, in a different thread. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-39-maarten.lankhorst@linux.intel.com commit e944e3cf5803389ec049b1e78ae39425b4983be7 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:26 2021 +0100 drm/i915: Add ww locking to dma-buf ops, v2. vmap is using pin_pages, but needs to use ww locking, add pin_pages_unlocked to correctly lock the mapping. Also add ww locking to begin/end cpu access. Changes since v1: - Fix i915_gem_map_dma_buf by using pin_pages_unlocked(). Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-38-maarten.lankhorst@linux.intel.com commit c858ffa177163cdca38e86b21a4db6e2aef439bd Author: Maarten Lankhorst Date: Tue Mar 23 16:50:25 2021 +0100 drm/i915: Lock ww in ucode objects correctly In the ucode functions, the calls are done before userspace runs, when debugging using debugfs, or when creating semi-permanent mappings; we can safely use the unlocked versions that does the ww dance for us. Because there is no pin_pages_unlocked yet, add it as convenience function. This removes possible lockdep splats about missing resv lock for ucode. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-37-maarten.lankhorst@linux.intel.com commit ef4985bac521f750d1ddc4da6428b381df1d99c0 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:24 2021 +0100 drm/i915: Increase ww locking for perf. We need to lock a few more objects, some temporarily, add ww lock where needed. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-36-maarten.lankhorst@linux.intel.com commit 52665fe7fc20e0c2888416715bb028e398fe3a79 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:23 2021 +0100 drm/i915: Add ww locking around vm_access() i915_gem_object_pin_map potentially needs a ww context, so ensure we have one we can revoke. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-35-maarten.lankhorst@linux.intel.com commit c05258889ed4900440de1e283df1d16f91adb3d8 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:22 2021 +0100 drm/i915: Add igt_spinner_pin() to allow for ww locking around spinner. By default, we assume that it's called inside igt_create_request to keep existing selftests working, but allow for manual pinning when passing a ww context. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-34-maarten.lankhorst@linux.intel.com commit a3258dbd87f1f6372b3aa5730c5fd7ef1479740f Author: Thomas Hellström Date: Tue Mar 23 16:50:21 2021 +0100 drm/i915: Prepare for obj->mm.lock removal, v2. Stolen objects need to lock, and we may call put_pages when refcount drops to 0, ensure all calls are handled correctly. Changes since v1: - Rebase on top of upstream changes. Idea-from: Thomas Hellström Signed-off-by: Thomas Hellström Signed-off-by: Maarten Lankhorst Reviewed-by: Matthew Auld Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-33-maarten.lankhorst@linux.intel.com commit 74827b539cc86219613ac066b72687ea2c691dc8 Author: Maarten Lankhorst Date: Thu Jan 28 17:25:40 2021 +0100 drm/i915: Fix workarounds selftest, part 1 pin_map needs the ww lock, so ensure we pin both before submission. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström [danvet: Again pick older version just to side-step conflicts.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210128162612.927917-32-maarten.lankhorst@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-32-maarten.lankhorst@linux.intel.com commit f1ac8a0292605e094533c02106d1d2f6a97028a3 Author: Maarten Lankhorst Date: Thu Jan 28 17:25:39 2021 +0100 drm/i915: Fix pread/pwrite to work with new locking rules. We are removing obj->mm.lock, and need to take the reservation lock before we can pin pages. Move the pinning pages into the helper, and merge gtt pwrite/pread preparation and cleanup paths. The fence lock is also removed; it will conflict with fence annotations, because of memory allocations done when pagefaulting inside copy_*_user. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström [danvet: Pick the older version to avoid the conflicts] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210128162612.927917-31-maarten.lankhorst@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-31-maarten.lankhorst@linux.intel.com commit c93987753ae8057e61a3902e71362613f7256600 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:18 2021 +0100 drm/i915: Defer pin calls in buffer pool until first use by caller. We need to take the obj lock to pin pages, so wait until the callers have done so, before making the object unshrinkable. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-30-maarten.lankhorst@linux.intel.com commit ec701249aa59a34a95ba3adb3f98de028483459f Author: Maarten Lankhorst Date: Thu Jan 28 17:25:37 2021 +0100 drm/i915: Take obj lock around set_domain ioctl We need to lock the object to move it to the correct domain, add the missing lock. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström [danvet: Pick version from an older patch series.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210128162612.927917-29-maarten.lankhorst@linux.intel.com Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-29-maarten.lankhorst@linux.intel.com commit b51ed60e6088a8b7d214c5bb45e8ca31bbb2544a Author: Maarten Lankhorst Date: Tue Mar 23 16:50:16 2021 +0100 drm/i915: Make __engine_unpark() compatible with ww locking. Take the ww lock around engine_unpark. Because of the many many places where rpm is used, I chose the safest option and used a trylock to opportunistically take this lock for __engine_unpark. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-28-maarten.lankhorst@linux.intel.com commit 5ace5e9618e9acf46217ab0fa97f34afce2f21a6 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:15 2021 +0100 drm/i915: Make lrc_init_wa_ctx compatible with ww locking, v3. Make creation separate from pinning, in order to take the lock only once, and pin the mapping with the lock held. Changes since v1: - Rebase on top of upstream changes. Changes since v2: - Fully clear wa_ctx on error. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-27-maarten.lankhorst@linux.intel.com commit 7d1c2618eac590d948eb33b9807d913ddb6e105f Author: Maarten Lankhorst Date: Tue Mar 23 16:50:14 2021 +0100 drm/i915: Take reservation lock around i915_vma_pin. We previously complained when ww == NULL. This function is now only used in selftests to pin an object, and ww locking is now fixed. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström [danvet: Resolve conflict because we don't have a set-domain refactor, see https://lore.kernel.org/intel-gfx/20210203090205.25818-8-chris@chris-wilson.co.uk/ The really worrying thing here is that the above patch had a change in arguments for i915_gem_object_set_to_gtt_domain(), without any explanation. I decided to just faithfully apply Maarten's change but not the argument change which was in Maarten's context diff.] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-26-maarten.lankhorst@linux.intel.com commit 2a66596838592a69c3c463d06c19bee51ed15a3d Author: Maarten Lankhorst Date: Tue Mar 23 16:50:13 2021 +0100 drm/i915: Move pinning to inside engine_wa_list_verify() This should be done as part of the ww loop, in order to remove a i915_vma_pin that needs ww held. Now only i915_ggtt_pin() callers remaining. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-25-maarten.lankhorst@linux.intel.com commit 9fa1f4785f2a54286ccb8a850cda5661f0a3aaf9 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:12 2021 +0100 drm/i915: Add object locking to vm_fault_cpu Take a simple lock so we hold ww around (un)pin_pages as needed. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-24-maarten.lankhorst@linux.intel.com commit 1b321026e21387108f1bf9719d38222ef9d017d3 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:11 2021 +0100 drm/i915: Pass ww ctx to intel_pin_to_display_plane Instead of multiple lockings, lock the object once, and perform the ww dance around attach_phys and pin_pages. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-23-maarten.lankhorst@linux.intel.com commit d4fa4e70acdf383891c79d7aa4c9995b17c2b7b0 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:10 2021 +0100 drm/i915: Rework clflush to work correctly without obj->mm.lock. Pin in the caller, not in the work itself. This should also work better for dma-fence annotations. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-22-maarten.lankhorst@linux.intel.com commit fe83ce1e0040b669c019e3c6d0b684e835282e97 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:09 2021 +0100 drm/i915: Handle ww locking in init_status_page Try to pin to ggtt first, and use a full ww loop to handle eviction correctly. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-21-maarten.lankhorst@linux.intel.com commit 83472bb06063effe59f50d2f0f175d27714f51fc Author: Maarten Lankhorst Date: Tue Mar 23 16:50:08 2021 +0100 drm/i915: Make ring submission compatible with obj->mm.lock removal, v2. We map the initial context during first pin. This allows us to remove pin_map from state allocation, which saves us a few retry loops. We won't need this until first pin anyway. intel_ring_submission_setup() is also reworked slightly to do all pinning in a single ww loop. Changes since v1: - Handle -EDEADLK backoff in intel_ring_submission_setup() better. - Handle smatch errors reported by Dan and testbot. Signed-off-by: Maarten Lankhorst Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-20-maarten.lankhorst@linux.intel.com commit 9c01524d4f58a21915bee8a4e40e4d3dd6570dc5 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:07 2021 +0100 drm/i915: Populate logical context during first pin. This allows us to remove pin_map from state allocation, which saves us a few retry loops. We won't need this until first pin, anyway. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström [danvet: Resolve context conflict because we don't have the i915_scheduler.c extraction from the below patches set: https://lore.kernel.org/intel-gfx/20210203165259.13087-6-chris@chris-wilson.co.uk/] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-19-maarten.lankhorst@linux.intel.com commit abd2f577177e5b1922a8d4ddd9c1f3dc080f0d17 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:06 2021 +0100 drm/i915: Flatten obj->mm.lock With userptr fixed, there is no need for all separate lockdep classes now, and we can remove all lockdep tricks used. A trylock in the shrinker is all we need now to flatten the locking hierarchy. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström [danvet: Resolve conflict because we don't have the patch from Chris to rebrand i915_gem_shrinker_taints_mutex to fs_reclaim_taints_mutex. It's not a bad idea, but if we do it, it should be moved to the right header. See https://lore.kernel.org/intel-gfx/20210202154318.19246-1-chris@chris-wilson.co.uk/] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-18-maarten.lankhorst@linux.intel.com commit ed29c2691188cf7ea2a46d40b891836c2bd1a4f5 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:05 2021 +0100 drm/i915: Fix userptr so we do not have to worry about obj->mm.lock, v7. Instead of doing what we do currently, which will never work with PROVE_LOCKING, do the same as AMD does, and something similar to relocation slowpath. When all locks are dropped, we acquire the pages for pinning. When the locks are taken, we transfer those pages in .get_pages() to the bo. As a final check before installing the fences, we ensure that the mmu notifier was not called; if it is, we return -EAGAIN to userspace to signal it has to start over. Changes since v1: - Unbinding is done in submit_init only. submit_begin() removed. - MMU_NOTFIER -> MMU_NOTIFIER Changes since v2: - Make i915->mm.notifier a spinlock. Changes since v3: - Add WARN_ON if there are any page references left, should have been 0. - Return 0 on success in submit_init(), bug from spinlock conversion. - Release pvec outside of notifier_lock (Thomas). Changes since v4: - Mention why we're clearing eb->[i + 1].vma in the code. (Thomas) - Actually check all invalidations in eb_move_to_gpu. (Thomas) - Do not wait when process is exiting to fix gem_ctx_persistence.userptr. Changes since v5: - Clarify why check on PF_EXITING is (temporarily) required. Changes since v6: - Ensure userptr validity is checked in set_domain through a special path. Signed-off-by: Maarten Lankhorst Acked-by: Dave Airlie [danvet: s/kfree/kvfree/ in i915_gem_object_userptr_drop_ref in the previous review round, but which got lost. The other open questions around page refcount are imo better discussed in a separate series, with amdgpu folks involved]. Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-17-maarten.lankhorst@linux.intel.com commit 20ee27bd84a8357c080f0c882495ab5d95e0fad5 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:04 2021 +0100 drm/i915: Make compilation of userptr code depend on MMU_NOTIFIER. Now that unsynchronized mappings are removed, the only time userptr works is when the MMU notifier is enabled. Put all of the userptr code behind a mmu notifier ifdef. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-16-maarten.lankhorst@linux.intel.com commit c6bcc0c2fdfdc3eba0d1d9250521fde2a7a31931 Author: Maarten Lankhorst Date: Tue Mar 23 16:50:03 2021 +0100 drm/i915: Reject UNSYNCHRONIZED for userptr, v2. We should not allow this any more, as it will break with the new userptr implementation, it could still be made to work, but there's no point in doing so. Inspection of the beignet opencl driver shows that it's only used when normal userptr is not available, which means for new kernels you will need CONFIG_I915_USERPTR. Signed-off-by: Maarten Lankhorst Acked-by: Dave Airlie Reviewed-by: Thomas Hellström Acked-by: Jason Ekstrand Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-15-maarten.lankhorst@linux.intel.com commit 02b64a4a0cb14e414b0be3b7261edc4fabfc0e2c Author: Maarten Lankhorst Date: Tue Mar 23 16:50:02 2021 +0100 drm/i915: Reject more ioctls for userptr, v2. There are a couple of ioctl's related to tiling and cache placement, that make no sense for userptr, reject those: - i915_gem_set_tiling_ioctl() Tiling should always be linear for userptr. Changing placement will fail with -ENXIO. - i915_gem_set_caching_ioctl() Userptr memory should always be cached. Changing caching mode will fail with -ENXIO. - i915_gem_set_domain_ioctl() Still temporarily allowed to work as intended, it's used to check userptr validity. With the reworked userptr code, it will keep working for this usecase. This plus the previous changes have been tested against beignet by using its own unit tests, and intel-video-compute by using piglit's opencl tests. Changes since v1: - set_domain was apparently used in iris for checking userptr validity, keep it working as intended. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Acked-by: Jason Ekstrand Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-14-maarten.lankhorst@linux.intel.com commit ae4e55b894dd0ce8c12bbd03d81889c27d95f17f Author: Maarten Lankhorst Date: Tue Mar 23 16:50:01 2021 +0100 drm/i915: No longer allow exporting userptr through dma-buf It doesn't make sense to export a memory address, we will prevent allowing access this way to different address spaces when we rework userptr handling, so best to explicitly disable it. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Acked-by: Jason Ekstrand Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-13-maarten.lankhorst@linux.intel.com commit ae30af84edb5b7cc95485922e43afd909a892e1b Author: Maarten Lankhorst Date: Tue Mar 23 16:50:00 2021 +0100 drm/i915: Disable userptr pread/pwrite support. Userptr should not need the kernel for a userspace memcpy, userspace needs to call memcpy directly. Specifically, disable i915_gem_pwrite_ioctl() and i915_gem_pread_ioctl(). Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Acked-by: Jason Ekstrand Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-12-maarten.lankhorst@linux.intel.com commit d4ceb1d6e732b11d7226ff6d51adf2418bb1f60f Author: Arnd Bergmann Date: Mon Mar 22 17:27:45 2021 +0100 audit: avoid -Wempty-body warning gcc warns about an empty statement when audit_remove_mark is defined to nothing: kernel/auditfilter.c: In function 'audit_data_to_entry': kernel/auditfilter.c:609:51: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 609 | audit_remove_mark(entry->rule.exe); /* that's the template one */ | ^ Change the macros to use the usual "do { } while (0)" instead, and change a few more that were (void)0, for consistency. Signed-off-by: Arnd Bergmann Acked-by: Richard Guy Briggs Signed-off-by: Paul Moore commit a1f091f8ef2b680a5184db065527612247cb4cae Author: Christian König Date: Tue Oct 6 17:26:42 2020 +0200 drm/ttm: switch to per device LRU lock Instead of having a global lock for potentially less contention. Signed-off-by: Christian König Tested-by: Nirmoy Das Reviewed-by: Huang Rui Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/424010/ commit f9e2a03e110ad0c78e69201f59d18dc1c487efac Author: Christian König Date: Tue Oct 6 16:30:09 2020 +0200 drm/ttm: remove swap LRU v3 Instead evict round robin from each devices SYSTEM and TT domain. v2: reorder num_pages access reported by Dan's script v3: fix rebase fallout, num_pages should be 32bit Signed-off-by: Christian König Tested-by: Nirmoy Das Reviewed-by: Huang Rui Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/424009/ commit ebd59851c796c221daf0d3b594fb2533f87161cf Author: Christian König Date: Tue Oct 6 13:35:32 2020 +0200 drm/ttm: move swapout logic around v3 Move the iteration of the global lru into the new function ttm_global_swapout() and use that instead in drivers. v2: consistently return int v3: fix build fail Signed-off-by: Christian König Tested-by: Nirmoy Das Reviewed-by: Huang Rui Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/424008/ commit 314bcbf09f147cfb069bc22207215b6b0b7da510 Author: Mark Brown Date: Tue Mar 9 19:37:31 2021 +0000 kselftest: arm64: Add BTI tests Add some tests that verify that BTI functions correctly for static binaries built with and without BTI support, verifying that SIGILL is generated when expected and is not generated in other situations. Since BTI support is still being rolled out in distributions these tests are built entirely free standing, no libc support is used at all so none of the standard helper functions for kselftest can be used and we open code everything. This also means we aren't testing the kernel support for the dynamic linker, though the test program can be readily adapted for that once it becomes something that we can reliably build and run. These tests were originally written by Dave Martin, I've adapted them for kselftest, mainly around the build system and the output format. Signed-off-by: Mark Brown Cc: Dave Martin Link: https://lore.kernel.org/r/20210309193731.57247-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit 75347add03e0fa60ecf2f79e41ec2152b8504593 Author: Andre Przywara Date: Fri Mar 19 16:53:34 2021 +0000 kselftest/arm64: mte: Report filename on failing temp file creation The MTE selftests create temporary files in /dev/shm, for later mmap-ing them. When there is no tmpfs mounted on /dev/shm, or /dev/shm does not exist in the first place (on minimal filesystems), the error message is not giving good hints: # FAIL: Unable to open temporary file # FAIL: memory allocation not ok 17 Check initial tags with private mapping, ... Add a perror() call, that gives both the filename and the actual error reason, so that users get a chance of correcting that. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-12-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit b4e1fa2290691fda4392ac479115ee3b04a7534c Author: Andre Przywara Date: Fri Mar 19 16:53:33 2021 +0000 kselftest/arm64: mte: Fix clang warning if (!prctl(...) == 0) is not only cumbersome to read, it also upsets clang and triggers a warning: ------------ mte_common_util.c:287:6: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] .... Fix that by just comparing against "not 0" instead. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-11-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit 9466ecac84a462fc91d192f0f9be0afd8e4f19f9 Author: Andre Przywara Date: Fri Mar 19 16:53:32 2021 +0000 kselftest/arm64: mte: Makefile: Fix clang compilation When clang finds a header file on the command line, it wants to precompile that, which would end up in a separate output file. Specifying -o on that same command line collides with that effort, so the compiler complains: clang: error: cannot specify -o when generating multiple output files Since we are not really after a precompiled header, just drop the header file from the command line, by removing it from the list of source files in the Makefile. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-10-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit 8bbb58a3c6b9f12b2217b8ae08e70a6d2f556f73 Author: Andre Przywara Date: Fri Mar 19 16:53:31 2021 +0000 kselftest/arm64: mte: Output warning about failing compiler At the moment we check the compiler's ability to compile MTE enabled code, but guard all the Makefile rules by it. As a consequence a broken or not capable compiler just doesn't do anything, and make happily returns without any error message, but with no programs created. Since the MTE feature is only supported by recent aarch64 compilers (not all stable distro compilers support it), having an explicit message seems like a good idea. To not break building multiple targets, we let make proceed without errors. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-9-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit 5238c2cd5a2e0dc846d1b900553211e832952b8d Author: Andre Przywara Date: Fri Mar 19 16:53:30 2021 +0000 kselftest/arm64: mte: Use cross-compiler if specified At the moment we either need to provide CC explicitly, or use a native machine to get the ARM64 MTE selftest compiled. It seems useful to use the same (cross-)compiler as we use for the kernel, so copy the recipe we use in the pauth selftest. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-8-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit 592432862cc4019075a7196d9961562c49507d6f Author: Andre Przywara Date: Fri Mar 19 16:53:29 2021 +0000 kselftest/arm64: mte: Fix MTE feature detection To check whether the CPU and kernel support the MTE features we want to test, we use an (emulated) CPU ID register read. However we only check against a very particular feature version (0b0010), even though the ARM ARM promises ID register features to be backwards compatible. While this could be fixed by using ">=" instead of "==", we should actually use the explicit HWCAP2_MTE hardware capability, exposed by the kernel via the ELF auxiliary vectors. That moves this responsibility to the kernel, and fixes running the tests on machines with FEAT_MTE3 capability. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-7-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit d302a702530b4025fbb14f20e637badce28bc741 Author: Andre Przywara Date: Fri Mar 19 16:53:28 2021 +0000 kselftest/arm64: mte: common: Fix write() warnings Out of the box Ubuntu's 20.04 compiler warns about missing return value checks for write() (sys)calls. Make GCC happy by checking whether we actually managed to write out our buffer. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-6-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit 46cb11b17c7a917e0eb5c7aa87a7bc6cda455a5e Author: Andre Przywara Date: Fri Mar 19 16:53:27 2021 +0000 kselftest/arm64: mte: user_mem: Fix write() warning Out of the box Ubuntu's 20.04 compiler warns about missing return value checks for write() (sys)calls. Make GCC happy by checking whether we actually managed to write "val". Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-5-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit 4514d991d99211f225d83b7e640285f29f0755d0 Author: Rafael J. Wysocki Date: Tue Mar 16 16:51:40 2021 +0100 PCI: PM: Do not read power state in pci_enable_device_flags() It should not be necessary to update the current_state field of struct pci_dev in pci_enable_device_flags() before calling do_pci_enable_device() for the device, because none of the code between that point and the pci_set_power_state() call in do_pci_enable_device() invoked later depends on it. Moreover, doing that is actively harmful in some cases. For example, if the given PCI device depends on an ACPI power resource whose _STA method initially returns 0 ("off"), but the config space of the PCI device is accessible and the power state retrieved from the PCI_PM_CTRL register is D0, the current_state field in the struct pci_dev representing that device will get out of sync with the power.state of its ACPI companion object and that will lead to power management issues going forward. To avoid such issues it is better to leave the current_state value as is until it is changed to PCI_D0 by do_pci_enable_device() as appropriate. However, the power state of the device is not changed to PCI_D0 if it is already enabled when pci_enable_device_flags() gets called for it, so update its current_state in that case, but use pci_update_current_state() covering platform PM too for that. Link: https://lore.kernel.org/lkml/20210314000439.3138941-1-luzmaximilian@gmail.com/ Reported-by: Maximilian Luz Tested-by: Maximilian Luz Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg commit b007744d8f2d4c954840d57864b595451807d5d8 Author: Dmitry Osipenko Date: Tue Mar 2 15:10:03 2021 +0300 ARM: tegra: Specify tps65911 as wakeup source Specify TPS65911 as wakeup source on Tegra devices in order to allow its RTC to wake up system from suspend by default instead of requiring wakeup to be enabled manually via sysfs. Tested-by: Peter Geis # Ouya T30 Tested-by: Matt Merhar # Ouya T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 3b18164c5ecdb82ecf9c24cb95358109ce22733b Author: Dmitry Osipenko Date: Tue Mar 2 15:10:02 2021 +0300 ARM: tegra: Specify memory suspend OPP in device-tree Specify memory suspend OPP in a device-tree, just for consistency. Now memory will always suspend on the same frequency. Tested-by: Peter Geis # Ouya T30 Tested-by: Matt Merhar # Ouya T30 Tested-by: Dmitry Osipenko # A500 T20 and Nexus7 T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 1f0ca058654d792cf6461f52971b2254e1819695 Author: Dmitry Osipenko Date: Tue Mar 2 15:10:01 2021 +0300 ARM: tegra: Specify CPU suspend OPP in device-tree Specify CPU suspend OPP in a device-tree, just for consistency. Now CPU will always suspend on the same frequency. Tested-by: Peter Geis # Ouya T30 Tested-by: Nicolas Chauvet # PAZ00 T20 Tested-by: Matt Merhar # Ouya T30 Tested-by: Dmitry Osipenko # A500 T20 and Nexus7 T30 Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit f8693f78f4fd3936d777fc6cd6e1653aae083007 Author: Dmitry Osipenko Date: Tue Mar 2 15:10:00 2021 +0300 ARM: tegra: ouya: Specify all CPU cores as cooling devices If CPU0 is unplugged the cooling device can not rebind to CPU1. And if CPU0 is plugged in again, the cooling device may fail to initialize. If the CPUs are mapped with the physical CPU0 to Linux numbering CPU1, the cooling device mapping will fail. Hence specify all CPU cores as a cooling devices in the device-tree. Tested-by: Peter Geis Tested-by: Matt Merhar Suggested-by: Daniel Lezcano Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e7c54567cac3bd96acd726f4421385ec25cac85d Author: Dmitry Osipenko Date: Tue Mar 2 15:09:59 2021 +0300 ARM: tegra: nexus7: Specify all CPU cores as cooling devices If CPU0 is unplugged the cooling device can not rebind to CPU1. And if CPU0 is plugged in again, the cooling device may fail to initialize. If the CPUs are mapped with the physical CPU0 to Linux numbering CPU1, the cooling device mapping will fail. Hence specify all CPU cores as a cooling devices in the device-tree. Suggested-by: Daniel Lezcano Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit b27b9689e1f3278919c6183c565d837d0aef6fc1 Author: Dmitry Osipenko Date: Tue Mar 2 15:09:58 2021 +0300 ARM: tegra: acer-a500: Rename avdd to vdda of touchscreen node Rename avdd supply to vdda of the touchscreen node. The old supply name was incorrect. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 2a8ec2fceaabc9c65b9ce3eeebe4aecba2b4712a Author: Dmitry Osipenko Date: Tue Mar 2 15:09:57 2021 +0300 ARM: tegra: acer-a500: Specify all CPU cores as cooling devices If CPU0 is unplugged the cooling device can not rebind to CPU1. And if CPU0 is plugged in again, the cooling device may fail to initialize. If the CPUs are mapped with the physical CPU0 to Linux numbering CPU1, the cooling device mapping will fail. Hence specify all CPU cores as a cooling devices in the device-tree. Suggested-by: Daniel Lezcano Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit ecd021396efa2fda66d546c406d21b1ce6832206 Author: Dmitry Osipenko Date: Tue Mar 2 15:09:56 2021 +0300 ARM: tegra: acer-a500: Reduce thermal throttling hysteresis to 0.2C The 2C hysteresis is a bit too high, although CPU never gets hot on A500. Nevertheless, let's reduce thermal throttling hysteresis to 0.2C, which is a much more reasonable value. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 30e243fc17a0e7f206f465c6c42bc6613c8b1288 Author: Dmitry Osipenko Date: Tue Mar 2 15:09:55 2021 +0300 ARM: tegra: acer-a500: Enable core voltage scaling Allow lower core voltages on Acer A500. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit d3cd0c3c49a08e21dcb06da3d2ad8c2e64f543aa Author: Dmitry Osipenko Date: Tue Mar 2 15:09:54 2021 +0300 ARM: tegra: paz00: Enable full voltage scaling ranges for CPU and Core domains Enable full voltage scaling ranges for CPU and Core power domains. Tested-by: Nicolas Chauvet Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 107f2c6995b6e5fb4b3138145b9a40d81f843c42 Author: Dmitry Osipenko Date: Tue Mar 2 15:09:53 2021 +0300 ARM: tegra: cardhu: Support CPU thermal throttling Enable CPU thermal throttling on Tegra30 Cardhu board. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit ed34855b81799c561500228a9281de84fb5ecf4f Author: Dmitry Osipenko Date: Tue Mar 2 15:09:52 2021 +0300 ARM: tegra: cardhu: Support CPU frequency and voltage scaling on all board variants Enable CPU frequency and voltage scaling on all Tegra30 Cardhu board variants. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 3744c7d88c00eb59e9543a1bcc23faf67af7bbaf Author: Dmitry Osipenko Date: Tue Mar 2 15:09:51 2021 +0300 ARM: tegra: ventana: Support CPU thermal throttling Enable CPU thermal throttling on Tegra20 Ventana board. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit 84fa3962d5ff8cd23e85bea242cb32f27d879608 Author: Bhaskar Chowdhury Date: Mon Mar 22 18:35:33 2021 +0530 s390/crc32-vx: couple of typo fixes s/defintions/definitions/ s/intermedate/intermediate/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210322130533.3805976-1-unixbhaskar@gmail.com Signed-off-by: Heiko Carstens commit df2e400e07ad53a582ee934ce8384479d5ddf48b Author: Janosch Frank Date: Tue Mar 23 10:09:50 2021 +0000 s390/uv: fix prot virt host indication compilation prot_virt_host is only available if CONFIG_KVM is enabled. So lets use a variable initialized to zero and overwrite it when that config option is set with prot_virt_host. Signed-off-by: Janosch Frank Fixes: 37564ed834ac ("s390/uv: add prot virt guest/host indication files") Reported-by: kernel test robot Signed-off-by: Heiko Carstens commit 82d3d45995c3068fd22252fa92b68bd0174fd0f8 Author: Dmitry Osipenko Date: Tue Mar 2 15:09:50 2021 +0300 ARM: tegra: ventana: Support CPU and Core voltage scaling Support CPU and Core voltage scaling on Tegra20 Ventana board. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding commit e0542cac435ba4bfb3b31da7d28f0df19703bf47 Author: Tiezhu Yang Date: Mon Mar 15 11:56:32 2021 +0800 MAINTAINERS: Add Mailing list and Web-page for PERFORMANCE EVENTS SUBSYSTEM Add entry "L: linux-perf-users@vger.kernel.org" to archive the related mail on https://lore.kernel.org/linux-perf-users/, add entry "W: https://perf.wiki.kernel.org/" so that newbies could get some useful materials. Signed-off-by: Tiezhu Yang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1615780592-21838-1-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit 0f7ff383937b24a3db72234a37e8b724acda8ad3 Author: Jin Yao Date: Fri Mar 19 15:01:56 2021 +0800 perf test: Add CSV summary test The patch "perf stat: Align CSV output for summary mode" aligned CSV output and added "summary" to the first column of summary lines. Now we check if the "summary" string is added to the CSV output. If we set '--no-csv-summary' option, the "summary" string would not be added, also check with this case. Committer testing: $ perf test csv 84: perf stat csv summary test : Ok $ Signed-off-by: Jin Yao Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Andi Kleen Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210319070156.20394-2-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 0bdad97801af5913101179a5de3f54b0eb88deea Author: Jin Yao Date: Fri Mar 19 15:01:55 2021 +0800 perf stat: Align CSV output for summary mode The 'perf stat' subcommand supports the request for a summary of the interval counter readings. But the summary lines break the CSV output so it's hard for scripts to parse the result. Before: # perf stat -x, -I1000 --interval-count 1 --summary 1.001323097,8013.48,msec,cpu-clock,8013483384,100.00,8.013,CPUs utilized 1.001323097,270,,context-switches,8013513297,100.00,0.034,K/sec 1.001323097,13,,cpu-migrations,8013530032,100.00,0.002,K/sec 1.001323097,184,,page-faults,8013546992,100.00,0.023,K/sec 1.001323097,20574191,,cycles,8013551506,100.00,0.003,GHz 1.001323097,10562267,,instructions,8013564958,100.00,0.51,insn per cycle 1.001323097,2019244,,branches,8013575673,100.00,0.252,M/sec 1.001323097,106152,,branch-misses,8013585776,100.00,5.26,of all branches 8013.48,msec,cpu-clock,8013483384,100.00,7.984,CPUs utilized 270,,context-switches,8013513297,100.00,0.034,K/sec 13,,cpu-migrations,8013530032,100.00,0.002,K/sec 184,,page-faults,8013546992,100.00,0.023,K/sec 20574191,,cycles,8013551506,100.00,0.003,GHz 10562267,,instructions,8013564958,100.00,0.51,insn per cycle 2019244,,branches,8013575673,100.00,0.252,M/sec 106152,,branch-misses,8013585776,100.00,5.26,of all branches The summary line loses the timestamp column, which breaks the CSV output. We add a column at the original 'timestamp' position and it just says 'summary' for the summary line. After: # perf stat -x, -I1000 --interval-count 1 --summary 1.001196053,8012.72,msec,cpu-clock,8012722903,100.00,8.013,CPUs utilized 1.001196053,218,,context-switches,8012753271,100.00,0.027,K/sec 1.001196053,9,,cpu-migrations,8012769767,100.00,0.001,K/sec 1.001196053,0,,page-faults,8012786257,100.00,0.000,K/sec 1.001196053,15004518,,cycles,8012790637,100.00,0.002,GHz 1.001196053,7954691,,instructions,8012804027,100.00,0.53,insn per cycle 1.001196053,1590259,,branches,8012814766,100.00,0.198,M/sec 1.001196053,82601,,branch-misses,8012824365,100.00,5.19,of all branches summary,8012.72,msec,cpu-clock,8012722903,100.00,7.986,CPUs utilized summary,218,,context-switches,8012753271,100.00,0.027,K/sec summary,9,,cpu-migrations,8012769767,100.00,0.001,K/sec summary,0,,page-faults,8012786257,100.00,0.000,K/sec summary,15004518,,cycles,8012790637,100.00,0.002,GHz summary,7954691,,instructions,8012804027,100.00,0.53,insn per cycle summary,1590259,,branches,8012814766,100.00,0.198,M/sec summary,82601,,branch-misses,8012824365,100.00,5.19,of all branches Now it's easy for script to analyse the summary lines. Of course, we also consider not to break possible existing scripts which can continue to use the broken CSV format by using a new '--no-csv-summary.' option. # perf stat -x, -I1000 --interval-count 1 --summary --no-csv-summary 1.001213261,8012.67,msec,cpu-clock,8012672327,100.00,8.013,CPUs utilized 1.001213261,197,,context-switches,8012703742,100.00,24.586,/sec 1.001213261,9,,cpu-migrations,8012720902,100.00,1.123,/sec 1.001213261,644,,page-faults,8012738266,100.00,80.373,/sec 1.001213261,18350698,,cycles,8012744109,100.00,0.002,GHz 1.001213261,12745021,,instructions,8012759001,100.00,0.69,insn per cycle 1.001213261,2458033,,branches,8012770864,100.00,306.768,K/sec 1.001213261,102107,,branch-misses,8012781751,100.00,4.15,of all branches 8012.67,msec,cpu-clock,8012672327,100.00,7.985,CPUs utilized 197,,context-switches,8012703742,100.00,24.586,/sec 9,,cpu-migrations,8012720902,100.00,1.123,/sec 644,,page-faults,8012738266,100.00,80.373,/sec 18350698,,cycles,8012744109,100.00,0.002,GHz 12745021,,instructions,8012759001,100.00,0.69,insn per cycle 2458033,,branches,8012770864,100.00,306.768,K/sec 102107,,branch-misses,8012781751,100.00,4.15,of all branches This option can be enabled in perf config by setting the variable 'stat.no-csv-summary'. # perf config stat.no-csv-summary=true # perf config -l stat.no-csv-summary=true # perf stat -x, -I1000 --interval-count 1 --summary 1.001330198,8013.28,msec,cpu-clock,8013279201,100.00,8.013,CPUs utilized 1.001330198,205,,context-switches,8013308394,100.00,25.583,/sec 1.001330198,10,,cpu-migrations,8013324681,100.00,1.248,/sec 1.001330198,0,,page-faults,8013340926,100.00,0.000,/sec 1.001330198,8027742,,cycles,8013344503,100.00,0.001,GHz 1.001330198,2871717,,instructions,8013356501,100.00,0.36,insn per cycle 1.001330198,553564,,branches,8013366204,100.00,69.081,K/sec 1.001330198,54021,,branch-misses,8013375952,100.00,9.76,of all branches 8013.28,msec,cpu-clock,8013279201,100.00,7.985,CPUs utilized 205,,context-switches,8013308394,100.00,25.583,/sec 10,,cpu-migrations,8013324681,100.00,1.248,/sec 0,,page-faults,8013340926,100.00,0.000,/sec 8027742,,cycles,8013344503,100.00,0.001,GHz 2871717,,instructions,8013356501,100.00,0.36,insn per cycle 553564,,branches,8013366204,100.00,69.081,K/sec 54021,,branch-misses,8013375952,100.00,9.76,of all branches Signed-off-by: Jin Yao Acked-by: Andi Kleen Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: Alexander Shishkin Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210319070156.20394-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit d1e24c46250731204dbf61b5191e4dcf2c2d9391 Author: JC Kuo Date: Wed Jan 20 15:34:09 2021 +0800 dt-bindings: phy: tegra-xusb: Add nvidia,pmc prop This commit describes the "nvidia,pmc" property for Tegra210 tegra-xusb PHY driver. It is a phandle and specifier referring to the Tegra210 pmc@7000e400 node. Signed-off-by: JC Kuo Acked-by: Rob Herring Acked-by: Thierry Reding Signed-off-by: Thierry Reding commit 0c7ea2b1c850756140fef03bed0fbaf0957f120a Author: JC Kuo Date: Wed Jan 20 15:34:02 2021 +0800 clk: tegra: Don't enable PLLE HW sequencer at init PLLE hardware power sequencer references PEX/SATA UPHY PLL hardware power sequencers' output to enable/disable PLLE. PLLE hardware power sequencer has to be enabled only after PEX/SATA UPHY PLL's sequencers are enabled. Signed-off-by: JC Kuo Acked-by: Thierry Reding Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit 54443ef6f5d10d9c6bb17f1dbeea7eb8d5c9a839 Author: JC Kuo Date: Wed Jan 20 15:34:01 2021 +0800 clk: tegra: Add PLLE HW power sequencer control PLLE has a hardware power sequencer logic which is a state machine that can power on/off PLLE without any software intervention. The sequencer has two inputs, one from XUSB UPHY PLL and the other from SATA UPHY PLL. PLLE provides reference clock to XUSB and SATA UPHY PLLs. When both of the downstream PLLs are powered-off, PLLE hardware power sequencer will automatically power off PLLE for power saving. XUSB and SATA UPHY PLLs also have their own hardware power sequencer logic. XUSB UPHY PLL is shared between XUSB SuperSpeed ports and PCIE controllers. The XUSB UPHY PLL hardware power sequencer has inputs from XUSB and PCIE. When all of the XUSB SuperSpeed ports and PCIE controllers are in low power state, XUSB UPHY PLL hardware power sequencer automatically power off PLL and flags idle to PLLE hardware power sequencer. Similar applies to SATA UPHY PLL. PLLE hardware power sequencer has to be enabled after both downstream sequencers are enabled. This commit adds two helper functions: 1. tegra210_plle_hw_sequence_start() for XUSB PADCTL driver to enable PLLE hardware sequencer at proper time. 2. tegra210_plle_hw_sequence_is_enabled() for XUSB PADCTL driver to check whether PLLE hardware sequencer has been enabled or not. Signed-off-by: JC Kuo Acked-by: Thierry Reding Acked-by: Stephen Boyd Signed-off-by: Thierry Reding commit 14d97622448acbea0348be62f62e25d9a361e16b Author: Davidlohr Bueso Date: Tue Mar 23 12:07:10 2021 -0700 drivers/block: remove the umem driver This removes the driver on the premise that it has been unused for a long time. This is a better approach compared to changing untestable code nobody cares about in the first place. Similarly, the umem.com website now shows a mere Godaddy parking add. Acked-by: NeilBrown Suggested-by: Christoph Hellwig Signed-off-by: Davidlohr Bueso Signed-off-by: Jens Axboe commit f66116f7b2138b584b9fa4ddeedb4bcc670f1942 Author: Arnd Bergmann Date: Tue Mar 23 22:57:26 2021 +0100 rsxx: remove extraneous 'const' qualifier The returned string from rsxx_card_state_to_str is 'const', but the other qualifier doesn't change anything here except causing a warning with 'clang -Wextra': drivers/block/rsxx/core.c:393:21: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers] static const char * const rsxx_card_state_to_str(unsigned int state) Fixes: f37912039eb0 ("block: IBM RamSan 70/80 trivial changes.") Reviewed-by: Nick Desaulniers Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210323215753.281668-1-arnd@kernel.org Signed-off-by: Jens Axboe commit 0db1f107f83f19d56ef23965cfd0cfac8c0f66b3 Author: Yang Li Date: Mon Mar 15 15:05:41 2021 +0800 ARM: OMAP2+: use true and false for bool variable fixed the following coccicheck: ./arch/arm/mach-omap2/powerdomain.c:1205:9-10: WARNING: return of 0/1 in function 'pwrdm_can_ever_lose_context' with return type bool Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Tony Lindgren commit f6a7ea04ad2044e8f05b55f3bdd3133f468f60d1 Author: Adam Ford Date: Sun Feb 7 06:46:32 2021 -0600 ARM: omap2plus_defconfig: Add AT25 EEPROM module The Torpedo development kit has an at25 SPI EEPROM on the baseboard. Enable it as a module in the omap2plus defconfig. Signed-off-by: Adam Ford Signed-off-by: Tony Lindgren commit d995d3d025bbd2d89abf12418f20d19bc0cb0130 Author: Zheng Yongjun Date: Tue Dec 29 21:51:47 2020 +0800 bus: ti-sysc: Use kzalloc for allocating only one thing Use kzalloc rather than kcalloc(1,...) The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ @@ - kcalloc(1, + kzalloc( ...) // Signed-off-by: Zheng Yongjun Signed-off-by: Tony Lindgren commit b556f76a0a4ff30f15f0c90a0d83daa4abb6ae3f Author: Ivan Jelincic Date: Wed Feb 3 12:34:25 2021 +0100 ARM: omap2plus_defconfig: Enable Netfilter components as modules Enable the majority of the Netfilter components as loadable modules in the omap2plus_defconfig file. Signed-off-by: Ivan Jelincic Cc: Tony Lindgren Signed-off-by: parazyd Signed-off-by: Tony Lindgren commit a3dfe1c08b519fd87281452c4edb81ccd18b7a12 Author: Ivan Jelincic Date: Wed Feb 3 12:34:26 2021 +0100 ARM: omap2plus_defconfig: Update for dropped simple-pm-bus Update omap2plus_defconfig for dropped SIMPLE_PM_BUS. Signed-off-by: Ivan Jelincic Signed-off-by: parazyd [tony@atomide.com: don't drop CONFIG_MICREL_PHY, it's needed] Signed-off-by: Tony Lindgren commit 6dc2a774cb4fdb524b7eb0b8db74198a1b4815ea Author: Sunil Muthuswamy Date: Tue Mar 23 18:47:16 2021 +0000 x86/Hyper-V: Support for free page reporting Linux has support for free page reporting now (36e66c554b5c) for virtualized environment. On Hyper-V when virtually backed VMs are configured, Hyper-V will advertise cold memory discard capability, when supported. This patch adds the support to hook into the free page reporting infrastructure and leverage the Hyper-V cold memory discard hint hypercall to report/free these pages back to the host. Signed-off-by: Sunil Muthuswamy Tested-by: Matheus Castello Reviewed-by: Michael Kelley Tested-by: Nathan Chancellor Link: https://lore.kernel.org/r/SN4PR2101MB0880121FA4E2FEC67F35C1DCC0649@SN4PR2101MB0880.namprd21.prod.outlook.com Signed-off-by: Wei Liu commit c3c83055bdf9730e6acf379800c63bcb40b41530 Author: Yang Li Date: Thu Feb 25 16:54:50 2021 +0800 ARM: OMAP2+: add missing call to of_node_put() In one of the error paths of the for_each_child_of_node() loop, add missing call to of_node_put(). Fix the following coccicheck warning: ./arch/arm/mach-omap2/omap_hwmod.c:2132:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 2140. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Tony Lindgren commit 1b60280834683dddf4975bbf9662a74f123ba770 Author: Xu Yihang Date: Tue Mar 23 10:50:13 2021 +0800 x86/hyperv: Fix unused variable 'hi' warning in hv_apic_read Fixes the following W=1 kernel build warning(s): arch/x86/hyperv/hv_apic.c:58:15: warning: variable ‘hi’ set but not used [-Wunused-but-set-variable] Compiled with CONFIG_HYPERV enabled: make allmodconfig ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- make W=1 arch/x86/hyperv/hv_apic.o ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu- HV_X64_MSR_EOI occupies bit 31:0 and HV_X64_MSR_TPR occupies bit 7:0, which means the higher 32 bits are not really used. Cast the variable hi to void to silence this warning. Reported-by: Hulk Robot Signed-off-by: Xu Yihang Link: https://lore.kernel.org/r/20210323025013.191533-1-xuyihang@huawei.com Signed-off-by: Wei Liu commit 13c4d4626a4b205e496eb65d6316a3dcb89a7d62 Author: Xu Yihang Date: Tue Mar 23 10:43:02 2021 +0800 x86/hyperv: Fix unused variable 'msr_val' warning in hv_qlock_wait Fixes the following W=1 kernel build warning(s): arch/x86/hyperv/hv_spinlock.c:28:16: warning: variable ‘msr_val’ set but not used [-Wunused-but-set-variable] unsigned long msr_val; As Hypervisor Top-Level Functional Specification states in chapter 7.5 Virtual Processor Idle Sleep State, "A partition which possesses the AccessGuestIdleMsr privilege (refer to section 4.2.2) may trigger entry into the virtual processor idle sleep state through a read to the hypervisor-defined MSR HV_X64_MSR_GUEST_IDLE". That means only a read of the MSR is necessary. The returned value msr_val is not used. Cast it to void to silence this warning. Reference: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs Reported-by: Hulk Robot Signed-off-by: Xu Yihang Link: https://lore.kernel.org/r/20210323024302.174434-1-xuyihang@huawei.com Signed-off-by: Wei Liu commit 52fbb5aabb5cf621627dff10783f4fd2a4828aef Author: Yang Li Date: Tue Feb 2 15:00:05 2021 +0800 bus: ti-sysc: remove unneeded semicolon Eliminate the following coccicheck warning: ./drivers/bus/ti-sysc.c:1595:2-3: Unneeded semicolon ./drivers/bus/ti-sysc.c:2833:3-4: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Tony Lindgren commit 02e9821b2b91ffea4d7fd53d341dc354c0ef0f8c Author: Jiapeng Chong Date: Tue Feb 2 11:43:31 2021 +0800 ARM: OMAP2+: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Fix the following coccicheck warning: ./arch/arm/mach-omap2/pm-debug.c:171:0-23: WARNING: pwrdm_suspend_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Tony Lindgren commit 6bbdc3db76ccc6d9ff1c3d6ad36c8ae5bd67ee1f Author: Bhaskar Chowdhury Date: Mon Mar 22 05:01:08 2021 +0530 hv: hyperv.h: a few mundane typo fixes s/sructure/structure/ s/extention/extension/ s/offerred/offered/ s/adversley/adversely/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210321233108.3885240-1-unixbhaskar@gmail.com Signed-off-by: Wei Liu commit 7990ccafaa37dc6d8bb095d4d7cd997e8903fd10 Author: Li Huafei Date: Wed Mar 3 11:28:24 2021 +0800 ima: Fix the error code for restoring the PCR value In ima_restore_measurement_list(), hdr[HDR_PCR].data is pointing to a buffer of type u8, which contains the dumped 32-bit pcr value. Currently, only the least significant byte is used to restore the pcr value. We should convert hdr[HDR_PCR].data to a pointer of type u32 before fetching the value to restore the correct pcr value. Fixes: 47fdee60b47f ("ima: use ima_parse_buf() to parse measurements headers") Signed-off-by: Li Huafei Reviewed-by: Roberto Sassu Signed-off-by: Mimi Zohar commit bfaae47db3c0989c0ca82a1d59ca3088860b1845 Author: Maarten Lankhorst Date: Tue Mar 23 16:49:59 2021 +0100 drm/i915: make lockdep slightly happier about execbuf. As soon as we install fences, we should stop allocating memory in order to prevent any potential deadlocks. This is required later on, when we start adding support for dma-fence annotations. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-11-maarten.lankhorst@linux.intel.com commit a85fffe3032d9918c78e3a71821a6133707ae42d Author: Maarten Lankhorst Date: Tue Mar 23 16:49:58 2021 +0100 drm/i915: Convert i915_gem_object_attach_phys() to ww locking, v2. Simple adding of i915_gem_object_lock, we may start to pass ww to get_pages() in the future, but that won't be the case here; We override shmem's get_pages() handling by calling i915_gem_object_get_pages_phys(), no ww is needed. Changes since v1: - Call shmem put pages directly, the callback would go down the phys free path. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-10-maarten.lankhorst@linux.intel.com commit a61170975718d56a8aa8d53c1e11e8b4e70b42f3 Author: Maarten Lankhorst Date: Tue Mar 23 16:49:57 2021 +0100 drm/i915: Rework struct phys attachment handling Instead of creating a separate object type, we make changes to the shmem type, to clear struct page backing. This will allow us to ensure we never run into a race when we exchange obj->ops with other function pointers. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-9-maarten.lankhorst@linux.intel.com commit c471748dc742c207a5461be924538c286d66be3e Author: Maarten Lankhorst Date: Tue Mar 23 16:49:56 2021 +0100 drm/i915: Move HAS_STRUCT_PAGE to obj->flags We want to remove the changing of ops structure for attaching phys pages, so we need to kill off HAS_STRUCT_PAGE from ops->flags, and put it in the bo. This will remove a potential race of dereferencing the wrong obj->ops without ww mutex held. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström [danvet: apply with wiggle] Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-8-maarten.lankhorst@linux.intel.com commit aaee716e4acacdd0c7747a34c23817b9d50c1a97 Author: Maarten Lankhorst Date: Tue Mar 23 16:49:55 2021 +0100 drm/i915: Add gem object locking to madvise. Doesn't need the full ww lock, only checking if pages are bound. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström #irc Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-7-maarten.lankhorst@linux.intel.com commit 1eef0de18fc712be7d7cce032e9e2b074ee2e02f Author: Maarten Lankhorst Date: Tue Mar 23 16:49:54 2021 +0100 drm/i915: Ensure we hold the object mutex in pin correctly. Currently we have a lot of places where we hold the gem object lock, but haven't yet been converted to the ww dance. Complain loudly about those places. i915_vma_pin shouldn't have the obj lock held, so we can do a ww dance, while i915_vma_pin_ww should. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström #irc Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-6-maarten.lankhorst@linux.intel.com commit 237647f4dde94dc17324973a2428b01ed5afa545 Author: Maarten Lankhorst Date: Tue Mar 23 16:49:53 2021 +0100 drm/i915: Add missing -EDEADLK handling to execbuf pinning, v2. i915_vma_pin may fail with -EDEADLK when we start locking page tables, so ensure we handle this correctly. Changes since v1: - Drop -EDEADLK todo, this commit handles it. - Change eb_pin_vma from sort-of-bool + -EDEADLK to a proper int. (Matt) Cc: Matthew Brost Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-5-maarten.lankhorst@linux.intel.com commit 0edbb9ba1bfe70b38850d4a712e83487525f0640 Author: Maarten Lankhorst Date: Tue Mar 23 16:49:52 2021 +0100 drm/i915: Move cmd parser pinning to execbuffer We need to get rid of allocations in the cmd parser, because it needs to be called from a signaling context, first move all pinning to execbuf, where we already hold all locks. Allocate jump_whitelist in the execbuffer, and add annotations around intel_engine_cmd_parser(), to ensure we only call the command parser without allocating any memory, or taking any locks we're not supposed to. Because i915_gem_object_get_page() may also allocate memory, add a path to i915_gem_object_get_sg() that prevents memory allocations, and walk the sg list manually. It should be similarly fast. This has the added benefit of being able to catch all memory allocation errors before the point of no return, and return -ENOMEM safely to the execbuf submitter. Signed-off-by: Maarten Lankhorst Acked-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-4-maarten.lankhorst@linux.intel.com commit 2c8ab3339e398bbbcb0980933e266b93bedaae52 Author: Maarten Lankhorst Date: Tue Mar 23 16:49:51 2021 +0100 drm/i915: Pin timeline map after first timeline pin, v4. We're starting to require the reservation lock for pinning, so wait until we have that. Update the selftests to handle this correctly, and ensure pin is called in live_hwsp_rollover_user() and mock_hwsp_freelist(). Changes since v1: - Fix NULL + XX arithmatic, use casts. (kbuild) Changes since v2: - Clear entire cacheline when pinning. Changes since v3: - CACHELINE_BYTES -> TIMELINE_SEQNO_BYTES. (jekstrand) Signed-off-by: Maarten Lankhorst Reported-by: kernel test robot Reviewed-by: Thomas Hellström Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-3-maarten.lankhorst@linux.intel.com commit 12ca695d2c1ed26b2dcbb528b42813bd0f216cfc Author: Maarten Lankhorst Date: Tue Mar 23 16:49:50 2021 +0100 drm/i915: Do not share hwsp across contexts any more, v8. Instead of sharing pages with breadcrumbs, give each timeline a single page. This allows unrelated timelines not to share locks any more during command submission. As an additional benefit, seqno wraparound no longer requires i915_vma_pin, which means we no longer need to worry about a potential -EDEADLK at a point where we are ready to submit. Changes since v1: - Fix erroneous i915_vma_acquire that should be a i915_vma_release (ickle). - Extra check for completion in intel_read_hwsp(). Changes since v2: - Fix inconsistent indent in hwsp_alloc() (kbuild) - memset entire cacheline to 0. Changes since v3: - Do same in intel_timeline_reset_seqno(), and clflush for good measure. Changes since v4: - Use refcounting on timeline, instead of relying on i915_active. - Fix waiting on kernel requests. Changes since v5: - Bump amount of slots to maximum (256), for best wraparounds. - Add hwsp_offset to i915_request to fix potential wraparound hang. - Ensure timeline wrap test works with the changes. - Assign hwsp in intel_timeline_read_hwsp() within the rcu lock to fix a hang. Changes since v6: - Rename i915_request_active_offset to i915_request_active_seqno(), and elaborate the function. (tvrtko) Changes since v7: - Move hunk to where it belongs. (jekstrand) - Replace CACHELINE_BYTES with TIMELINE_SEQNO_BYTES. (jekstrand) Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström #v1 Reported-by: kernel test robot Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-2-maarten.lankhorst@linux.intel.com commit aa4e133184eac7fdba7df4ac3bdce8711cbc42b6 Author: Wei Yongjun Date: Thu Mar 18 13:56:49 2021 +0000 ARM: OMAP2+: Make symbol 'pdata_quirks_init_clocks' static The sparse tool complains as follows: arch/arm/mach-omap2/pdata-quirks.c:578:1: warning: symbol 'pdata_quirks_init_clocks' was not declared. Should it be static? This symbol is not used outside of pdata-quirks.c, so this commit marks it static. Fixes: a15de032a72d ("ARM: OMAP2+: Init both prm and prcm nodes early for clocks") Reported-by: Hulk Robot Reported-by: kernel test robot Signed-off-by: Wei Yongjun Signed-off-by: Tony Lindgren commit 976677b5958ef7f9973ea8ba952a96b7243f2c13 Author: Dario Binacchi Date: Mon Mar 22 22:33:37 2021 +0100 drm/tilcdc: fix pixel clock setting warning message The warning message did not printed the LCD pixel clock rate but the LCD clock divisor input rate. As a consequence, the required and real pixel clock rates are now passed to the tilcdc_pclk_diff(). Signed-off-by: Dario Binacchi Reviewed-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20210322213337.26667-4-dariobin@libero.it commit fd1d9e2d4382674f421bab003f9a64cc27b003f4 Author: Dario Binacchi Date: Mon Mar 22 22:33:36 2021 +0100 drm/tilcdc: fix LCD pixel clock setting The tilcdc_pclk_diff() compares the requested pixel clock rate to the real one, so passing it clk_rate instead of clk_rate / clkdiv caused it to fail even if the clk_rate was properly set. Adding the real_pclk_rate variable makes the code more readable. Signed-off-by: Dario Binacchi Reviewed-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20210322213337.26667-3-dariobin@libero.it commit e17d1364dc3956e39980d12a3d8591bba4076f47 Author: Dario Binacchi Date: Mon Mar 22 22:33:35 2021 +0100 drm/tilcdc: rename req_rate to pclk_rate The req_rate name is a little misleading, so let's rename to pclk_rate (pixel clock rate). Signed-off-by: Dario Binacchi Reviewed-by: Jyri Sarha Reviewed-by: Tomi Valkeinen Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20210322213337.26667-2-dariobin@libero.it commit da588d48004a39cdaaa5f778ffc0debae0548541 Author: Yang Li Date: Wed Mar 3 17:04:27 2021 +0800 drm/tilcdc: panel: fix platform_no_drv_owner.cocci warnings ./drivers/gpu/drm/tilcdc/tilcdc_panel.c:402:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/1614762267-98454-1-git-send-email-yang.lee@linux.alibaba.com commit 547be6a479fd19fe1071d2cf76ed574fbff13481 Author: Liam Howlett Date: Tue Mar 23 13:42:21 2021 +0000 i915_vma: Rename vma_lookup to i915_vma_lookup Use i915 prefix to avoid name collision with future vma_lookup() in mm. Signed-off-by: Liam R. Howlett Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210323134208.3077275-1-Liam.Howlett@Oracle.com commit f33dece70e11ce82a09cb1ea2d7c32347b82c67e Author: Tianjia Zhang Date: Sun Mar 14 19:16:21 2021 +0800 selftests/sgx: Use getauxval() to simplify test code Use the library function getauxval() instead of a custom function to get the base address of the vDSO. [ bp: Massage commit message. ] Signed-off-by: Tianjia Zhang Signed-off-by: Borislav Petkov Reviewed-by: Jarkko Sakkinen Acked-by: Shuah Khan Link: https://lkml.kernel.org/r/20210314111621.68428-1-tianjia.zhang@linux.alibaba.com commit 05c4e2721d7af0df7bc1378a23712a0fd16947b5 Author: Huang Pei Date: Tue Mar 23 10:34:02 2021 +0800 MIPS: fix local_irq_{disable,enable} in asmmacro.h commit ba9196d2e005 ("MIPS: Make DIEI support as a config option") use CPU_HAS_DIEI to indicate whether di/ei is implemented correctly, without this patch, "local_irq_disable" from entry.S in 3A1000 (with buggy di/ei) lose protection of commit e97c5b609880 ("MIPS: Make irqflags.h functions preempt-safe for non-mipsr2 cpus") Fixes: ba9196d2e005 ("MIPS: Make DIEI support as a config option") Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit dbb397ccc6bbb061da7346d2c5a0d080d5d58a7f Author: Bhaskar Chowdhury Date: Sun Mar 21 13:28:13 2021 +0530 clk: renesas: Couple of spelling fixes s/suposed/supposed/ s/concurent/concurrent/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210321075813.9471-1-unixbhaskar@gmail.com Signed-off-by: Geert Uytterhoeven commit 61232cd6efca6e4d2705993850d014343ba604c4 Author: Geert Uytterhoeven Date: Wed Mar 3 14:26:19 2021 +0100 pinctrl: renesas: r8a7791: Add bias pinconf support Implement support for pull-up (most pins) and pull-down (ASEBRK#/ACK) handling for R-Car M2-W and M2-N, and RZ/G1M and RZ/G1N SoCs, using the common R-Car bias handling. Note that on RZ/G1 SoCs, the "ASEBRK#/ACK" pin is called "ACK", but the code doesn't handle that naming difference. Hence users should use the R-Car naming in DTS files. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210303132619.3938128-7-geert+renesas@glider.be commit 1d3928a3e69cd6ec0ea837d3eeccb2ff604b5072 Author: Geert Uytterhoeven Date: Wed Mar 3 14:26:18 2021 +0100 pinctrl: renesas: Add support for R-Car SoCs with pull-down only pins Currently, the common R-Car bias handling supports pin controllers with either: 1. Separate pin Pull-Enable (PUEN) and pin Pull-Up/Down control (PUD) registers, for controlling both pin pull-up and pin pull-down, 2. A single pin Pull-Up control register (PUPR), for controlling pin pull-up. Add support for a variant of #2, where some bits in the single pin Pull-Up control register (PUPR) control pin pull-down instead of pin pull-up. This is the case for the "ASEBRK#/ACK" pin on R-Car M2-W, M2-N, and E2, and the "ACK" pin on RZ/G1M, RZ/G1N, RZ/G1E, and RZ/G1C. To describe such a register, SoC-specific drivers need to provide two instances of pinmux_bias_reg: a first one with the puen field filled in, listing pins with pull-up functionality, and a second one with the pud field filled in, listing pins with pull-down functionality. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210303132619.3938128-6-geert+renesas@glider.be commit 93d6c7d676d2640e223f6b3fac11c76173655a44 Author: Geert Uytterhoeven Date: Wed Mar 3 14:26:17 2021 +0100 pinctrl: renesas: Add PORT_GP_CFG_7 macros Add PORT_GP_CFG_7() and PORT_GP_7() helper macros, to be used by the r8a7791 subdriver. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210303132619.3938128-5-geert+renesas@glider.be commit ec0794a122db146ac58984afd198062d0349b92a Author: Geert Uytterhoeven Date: Wed Mar 3 14:26:16 2021 +0100 pinctrl: renesas: Factor out common R-Mobile bias handling The pin control sub-drivers for SH/R-Mobile SoCs contain almost identical bias handling. The only SoC-specific part is the mapping from pin numbers to PORTnCR registers. Reduce code duplication by factoring out the bias handling to the common pinctrl.c code. Use a callback to handle the pin/register mapping. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210303132619.3938128-4-geert+renesas@glider.be commit 4b6e6c19895b923b1ebfb5312902e905e2a1f91a Author: Geert Uytterhoeven Date: Wed Mar 3 14:26:15 2021 +0100 pinctrl: renesas: Move R-Car bias helpers to sh_pfc.h The Renesas Pin Function Controller driver uses two header files: - sh_pfc.h, for use by both core code and SoC-specific drivers, - core.h, for internal use by the core code only. Hence move the R-Car bias helper declarations from core.h to sh_pfc.h, and drop the inclusion of core.h from SoC-specific drivers that no longer need it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210303132619.3938128-3-geert+renesas@glider.be commit b82fd2df17afc53580e8aeaee243dde4b23b9e79 Author: Geert Uytterhoeven Date: Wed Mar 3 14:26:14 2021 +0100 pinctrl: renesas: Make sh_pfc_pin_to_bias_reg() static Now all R-Car pin control drivers have been converted to the common R-Car bias handling, sh_pfc_pin_to_bias_reg() is only called from a single place. Move it from core.c to pinctrl.c, make it static, and rename it to rcar_pin_to_bias_reg(), as it is specific to R-Car SoCs. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210303132619.3938128-2-geert+renesas@glider.be commit 2132ce5d1af81dc0387cb4c483391532fa4fe457 Author: Maciej W. Rozycki Date: Sun Mar 21 20:55:46 2021 +0100 MIPS: SiByte: Enable pata_platform with SWARM defconfig Enable support for the onboard PATA PIO mode3 interface, which is one of the boot devices supported by the CFE firmware with the Broadcom SWARM board. Include disk, CD-ROM and generic storage drivers. Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit d11f6aa9457129ce7385802f2e73bc9c33cfefba Author: Maciej W. Rozycki Date: Sun Mar 21 20:55:41 2021 +0100 MIPS: SiByte: Regenerate stale SWARM defconfig Options have been removed and reordered since the last update, so regenerate the template so as not to interfere with actual changes. Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit bddeecc959b5cdecdf24df626185eeabf53dffa6 Author: Christoph Hellwig Date: Thu Mar 18 05:57:04 2021 +0100 MIPS: disable CONFIG_IDE in malta*_defconfig Various malta defconfigs enable CONFIG_IDE for the tc86c001 ide driver, hich is a Toshiba plug in card that does not make much sense to use on bigsur platforms. For all other ATA cards libata support is already enabled. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer commit c7b22b504404c27c2496892161e5c6d43ddaab10 Author: Niklas Söderlund Date: Fri Mar 12 14:10:20 2021 +0100 arm64: dts: renesas: r8a77961: Add VIN and CSI-2 device nodes Add device nodes for VIN and CSI-2 to R-Car M3-W+ r8a77961 device tree. Signed-off-by: Niklas Söderlund Tested-by: LUU HOAI Link: https://lore.kernel.org/r/20210312131020.1747344-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 960533c1a8a24f068bd5364ab0f8ec28dec8c254 Author: Christoph Hellwig Date: Thu Mar 18 05:57:03 2021 +0100 MIPS: disable CONFIG_IDE in bigsur_defconfig bigsur_defconfig enables CONFIG_IDE for the tc86c001 ide driver, which is a Toshiba plug in card that does not make much sense to use on bigsur platforms. For all other ATA cards libata support is already enabled. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer commit d8b4a27bfbf51cf021400157d3bd1b32cda1934d Author: Christoph Hellwig Date: Thu Mar 18 05:57:02 2021 +0100 MIPS: disable CONFIG_IDE in rbtx49xx_defconfig rbtx49xx_defconfig enables CONFIG_IDE for the tx4938 and tx4939 ide drivers, but those aren't actually used by the last known remaining user: https://lore.kernel.org/lkml/20210107.101729.1936921832901251107.anemo@mba.ocn.ne.jp/ Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer commit d459164cddb9757eecdc49185ab7c485a11e83a1 Author: Christoph Hellwig Date: Thu Mar 18 05:57:01 2021 +0100 MIPS: switch workpad_defconfig from legacy IDE to libata Use libata instead of the deprecated legacy ide driver in workpad_defconfig. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer commit c7ec6877bf153dcc1e33f062378f7b96f92f61a2 Author: Christoph Hellwig Date: Thu Mar 18 05:57:00 2021 +0100 MIPS: disable CONFIG_IDE in sb1250_swarm_defconfig sb1250_swarm_defconfig enables CONFIG_IDE but no actual host controller driver, so just drop CONFIG_IDE, CONFIG_BLK_DEV_IDECD and CONFIG_BLK_DEV_IDETAPE as they are useless. Signed-off-by: Christoph Hellwig Acked-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit 3287a7a8feda71da74776fcc5d2565863d3aee06 Author: Geert Uytterhoeven Date: Wed Mar 3 14:29:41 2021 +0100 ARM: dts: koelsch: Configure pull-up for SOFT_SW GPIO keys The GPIO pins connected to the 4 Software Switches ("SOFT_SW", SW2) do not have external pull-up resistors, but rely on internal pull-ups being enabled. Fortunately this is satisfied by the initial state of these pins. Make this explicit by enabling bias-pull-up, to remove the dependency on initial state and/or boot loader configuration. Signed-off-by: Geert Uytterhoeven Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210303132941.3938516-1-geert+renesas@glider.be commit c3171e94cc1cdcc3229565244112e869f052b8d9 Author: Claudio Imbrenda Date: Mon Mar 22 15:05:59 2021 +0100 KVM: s390: VSIE: fix MVPG handling for prefixing and MSO Prefixing needs to be applied to the guest real address to translate it into a guest absolute address. The value of MSO needs to be added to a guest-absolute address in order to obtain the host-virtual. Fixes: bdf7509bbefa ("s390/kvm: VSIE: correctly handle MVPG when in VSIE") Reported-by: Janosch Frank Signed-off-by: Claudio Imbrenda Reviewed-by: David Hildenbrand Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210322140559.500716-3-imbrenda@linux.ibm.com [borntraeger@de.ibm.com simplify mso] Signed-off-by: Christian Borntraeger commit c5d1f6b531e68888cbe6718b3f77a60115d58b9c Author: Claudio Imbrenda Date: Mon Mar 22 15:05:58 2021 +0100 KVM: s390: split kvm_s390_real_to_abs A new function _kvm_s390_real_to_abs will apply prefixing to a real address with a given prefix value. The old kvm_s390_real_to_abs becomes now a wrapper around the new function. This is needed to avoid code duplication in vSIE. Signed-off-by: Claudio Imbrenda Reviewed-by: David Hildenbrand Reviewed-by: Thomas Huth Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210322140559.500716-2-imbrenda@linux.ibm.com Signed-off-by: Christian Borntraeger commit bdf7509bbefa20855d5f6bacdc5b62a8489477c9 Author: Claudio Imbrenda Date: Mon Feb 1 21:54:13 2021 +0100 KVM: s390: VSIE: correctly handle MVPG when in VSIE Correctly handle the MVPG instruction when issued by a VSIE guest. Fixes: a3508fbe9dc6d ("KVM: s390: vsie: initial support for nested virtualization") Cc: stable@vger.kernel.org # f85f1baaa189: KVM: s390: split kvm_s390_logical_to_effective Signed-off-by: Claudio Imbrenda Acked-by: Janosch Frank Reviewed-by: David Hildenbrand Acked-by: Christian Borntraeger Link: https://lore.kernel.org/r/20210302174443.514363-4-imbrenda@linux.ibm.com [borntraeger@de.ibm.com: apply fixup from Claudio] Signed-off-by: Christian Borntraeger commit 8455033cd6a86b070186ea73f75344d9e0bdffd8 Author: Bhaskar Chowdhury Date: Fri Mar 19 10:45:14 2021 +0530 MIPS: PCI: Fix a typo s/packt/packet/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Thomas Bogendoerfer commit daffdec40d62fd29cd9fb1bbc3b104969daa43e8 Author: Bhaskar Chowdhury Date: Tue Mar 16 10:03:34 2021 +0530 mips: asm: octeon: A typo fix in the file cvmx-address.h s/techically/technically/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Thomas Bogendoerfer commit d580e6f0ec3ab42e81f3825ef4438836ead88c5f Author: Jernej Skrabec Date: Tue Mar 23 21:43:41 2021 +0100 ARM: dts: sun8i: h3: beelink-x2: Add power button Beelink X2 has power button. Add node for it. Signed-off-by: Jernej Skrabec Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210323204341.28825-1-jernej.skrabec@siol.net commit 5ac14bac08ae827b619f21bcceaaac3b8c497e31 Author: Claudio Imbrenda Date: Mon Feb 1 17:26:54 2021 +0100 KVM: s390: extend kvm_s390_shadow_fault to return entry pointer Extend kvm_s390_shadow_fault to return the pointer to the valid leaf DAT table entry, or to the invalid entry. Also return some flags in the lower bits of the address: PEI_DAT_PROT: indicates that DAT protection applies because of the protection bit in the segment (or, if EDAT, region) tables. PEI_NOT_PTE: indicates that the address of the DAT table entry returned does not refer to a PTE, but to a segment or region table. Signed-off-by: Claudio Imbrenda Cc: stable@vger.kernel.org Reviewed-by: Janosch Frank Reviewed-by: David Hildenbrand Reviewed-by: Christian Borntraeger Link: https://lore.kernel.org/r/20210302174443.514363-3-imbrenda@linux.ibm.com [borntraeger@de.ibm.com: fold in a fix from Claudio] Signed-off-by: Christian Borntraeger commit 2818c20871e6b9cec806ba546faf90ae3a079e22 Author: Maxime Ripard Date: Fri Mar 19 16:29:20 2021 +0100 drm/rockchip: Remove unused variable Commit 977697e20b3d ("drm/atomic: Pass the full state to planes atomic disable and update") added the old_state variable instead of what used to be a parameter, but it also removed the sole user of that variable in the vop_plane_atomic_update function leading to an usused variable. Remove it. Fixes: 977697e20b3d ("drm/atomic: Pass the full state to planes atomic disable and update") Reported-by: Stephen Rothwell Signed-off-by: Maxime Ripard Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210319152920.262035-1-maxime@cerno.tech commit 0f90d320b4f191ad15604495e06a1636027c96ad Author: Meng Yu Date: Wed Mar 24 10:03:25 2021 +0800 Bluetooth: Remove trailing semicolon in macros Macros should not use a trailing semicolon. Signed-off-by: Meng Yu Signed-off-by: Marcel Holtmann commit 95e04eb04c68b8a9f71ff09abea1ed617a67a0a2 Author: Qiang Ma Date: Tue Mar 9 15:20:59 2021 +0800 char: lp: remove redundant space around (inside) parenthesized expressions These two lines of code don't meet the linux kernel style, and use a space after these keywords: if, switch, case, for, do, while. Do not add spaces around (inside) parenthesized expressions. So remove the redundant space. Signed-off-by: Qiang Ma Link: https://lore.kernel.org/r/20210309072059.22107-1-maqianga@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 6b3bc8286529a78fa9befa329900f847ae02cc0c Author: Andy Shevchenko Date: Thu Mar 18 15:03:21 2021 +0200 pps: clients: gpio: Rearrange optional stuff in pps_gpio_setup() Rearrange optional stuff in pps_gpio_setup() so it will go after mandatory one and with reduced indentation. This will increase readability of the sources. Acked-by: Rodolfo Giometti Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210318130321.24227-7-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 162a5deac67450310ce5a6f37882acda010eddda Author: Andy Shevchenko Date: Thu Mar 18 15:03:20 2021 +0200 pps: clients: gpio: Use struct device pointer directly In most parts of the code the platform device is not used. Use struct device pointer directly to reduce code size and increase readability. Acked-by: Rodolfo Giometti Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210318130321.24227-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 28d032510e6338b93db485e4b514d7bb996b9d33 Author: Andy Shevchenko Date: Thu Mar 18 15:03:19 2021 +0200 pps: clients: gpio: Make use of device properties Device property API allows to gather device resources from different sources, such as ACPI. Convert the drivers to unleash the power of device property API. Acked-by: Rodolfo Giometti Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210318130321.24227-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ee89646619ba07d054348c0240da4b953cd1e72f Author: Andy Shevchenko Date: Thu Mar 18 15:03:18 2021 +0200 pps: clients: gpio: Get rid of legacy platform data Platform data is a legacy interface to supply device properties to the driver. In this case we even don't have in-kernel users for it. Just remove it for good. Acked-by: Rodolfo Giometti Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210318130321.24227-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fde046a8c490e296aacbb628748664fa54b6bdde Author: Andy Shevchenko Date: Thu Mar 18 15:03:17 2021 +0200 pps: clients: gpio: Remove redundant condition in ->remove() The timer along with GPIO API are NULL-aware, there is no need to test against existing GPIO echo line. Acked-by: Rodolfo Giometti Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210318130321.24227-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 1a8fc4f7e21ce786f8ebdf26d631e6f359ff9dfd Author: Andy Shevchenko Date: Thu Mar 18 15:03:16 2021 +0200 pps: clients: gpio: Use dev_err_probe() to avoid log noise When GPIO APIs return -EPROBE_DEFER there is no need to print the message, especially taking into consideration that it may repeat several times. Use dev_err_probe() to avoid log noise in such cases. Acked-by: Rodolfo Giometti Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210318130321.24227-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit a4780db3ad13b5381e0512b4507857390efea963 Author: Andy Shevchenko Date: Thu Mar 18 15:03:15 2021 +0200 pps: clients: gpio: Bail out on error when requesting GPIO echo line When requesting optional GPIO echo line, bail out on error, so user will know that something wrong with the existing property. Acked-by: Rodolfo Giometti Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210318130321.24227-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit ae28c1be1e54f2eda1c8b4469c4652e8a24056ed Author: Marco Ballesio Date: Mon Mar 15 18:16:30 2021 -0700 binder: BINDER_GET_FROZEN_INFO ioctl User space needs to know if binder transactions occurred to frozen processes. Introduce a new BINDER_GET_FROZEN ioctl and keep track of transactions occurring to frozen proceses. Signed-off-by: Marco Ballesio Signed-off-by: Li Li Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20210316011630.1121213-4-dualli@chromium.org Signed-off-by: Greg Kroah-Hartman commit 95c16f9d9cf9db090ae16179f1f721284a6f3aef Author: Marco Ballesio Date: Mon Mar 15 18:16:29 2021 -0700 binder: use EINTR for interrupted wait for work when interrupted by a signal, binder_wait_for_work currently returns -ERESTARTSYS. This error code isn't propagated to user space, but a way to handle interruption due to signals must be provided to code using this API. Replace this instance of -ERESTARTSYS with -EINTR, which is propagated to user space. binder_wait_for_work Signed-off-by: Marco Ballesio Signed-off-by: Li Li Test: built, booted, interrupted a worker thread within Acked-by: Todd Kjos Link: https://lore.kernel.org/r/20210316011630.1121213-3-dualli@chromium.org Signed-off-by: Greg Kroah-Hartman commit 432ff1e91694e4c55a5bf6bc0574f4c254970232 Author: Marco Ballesio Date: Mon Mar 15 18:16:28 2021 -0700 binder: BINDER_FREEZE ioctl Frozen tasks can't process binder transactions, so a way is required to inform transmitting ends of communication failures due to the frozen state of their receiving counterparts. Additionally, races are possible between transitions to frozen state and binder transactions enqueued to a specific process. Implement BINDER_FREEZE ioctl for user space to inform the binder driver about the intention to freeze or unfreeze a process. When the ioctl is called, block the caller until any pending binder transactions toward the target process are flushed. Return an error to transactions to processes marked as frozen. Co-developed-by: Todd Kjos Acked-by: Todd Kjos Signed-off-by: Marco Ballesio Signed-off-by: Todd Kjos Signed-off-by: Li Li Link: https://lore.kernel.org/r/20210316011630.1121213-2-dualli@chromium.org Signed-off-by: Greg Kroah-Hartman commit 7b7d2261aa8dce949c08d58ed1d02e54a0fbbab5 Author: Gleb Fotengauer-Malinovskiy Date: Tue Mar 2 18:33:46 2021 +0300 vmci_host: print unexpanded names of ioctl requests in debug messages __stringify macro function expands its arguments, but in this messages we expect to see ioctl request name instead of it's _IOC macro expansion. $ cat stringify.c #include #include #define __stringify_1(x) #x #define __stringify(x) __stringify_1(x) #define VMCI_DO_IOCTL(ioctl_name) \ char *name = __stringify(IOCTL_VMCI_ ## ioctl_name); int main() { VMCI_DO_IOCTL(INIT_CONTEXT) printf("%s\n", name); } $ cc stringify.c $ ./a.out (((0U) << (((0+8)+8)+14)) | (((7)) << (0+8)) | (((0xa0)) << 0) | ((0) << ((0+8)+8))) Signed-off-by: Gleb Fotengauer-Malinovskiy Link: https://lore.kernel.org/r/20210302153346.300416-1-glebfm@altlinux.org Signed-off-by: Greg Kroah-Hartman commit ac41ae0b12c83229f2b1102c4ed9ad96bf8de946 Author: Yang Li Date: Tue Mar 16 16:57:21 2021 +0800 misc/sgi-xp: use NULL instead of using plain integer as pointer This fixes the following sparse warnings: drivers/misc/sgi-xp/xpc_main.c:210:23: warning: Using plain integer as NULL pointer Reported-by: Abaci Robot Reviewed-by: Steve Wahl Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1615885041-68750-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit d8da00e1a73e9577538242fb5a89c560c497369c Author: Bhaskar Chowdhury Date: Fri Mar 19 10:55:54 2021 +0530 w1: slaves: Typo fixes s/mesured/measured/ .......twice Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210319052554.966-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0ebbaeee3d78a68d3413bdaeb707e527c5d4dbe Author: dongjian Date: Tue Mar 16 14:59:47 2021 +0800 w1: Use kobj_to_dev()[RESEND] Use kobj_to_dev() instead of open-coding it Signed-off-by: dongjian Link: https://lore.kernel.org/r/1615877987-32163-1-git-send-email-dj0227@163.com Signed-off-by: Greg Kroah-Hartman commit 199c4d0efe7d9e5ed0036efeeb8ddb862dafe09a Author: Dan Carpenter Date: Tue Mar 9 19:06:52 2021 +0300 w1: w1_therm: use clamp() in int_to_short() It's slightly cleaner to use the clamp() macro instead of open coding this. Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YEedHNwqEH8fvjkD@mwanda Signed-off-by: Greg Kroah-Hartman commit f6d706dd9baaa1d7857ce5b03af491718a95e9bf Author: Yang Li Date: Wed Mar 10 17:00:34 2021 +0800 char/mwave: turn tp3780I_Cleanup() into void function This function always return '0' and no callers use the return value. So make it a void function. This eliminates the following coccicheck warning: ./drivers/char/mwave/tp3780i.c:182:5-11: Unneeded variable: "retval". Return "0" on line 187 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1615366834-20545-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 1c15b334ca34dd22a19e1c595908fc860523be64 Author: Shuo Liu Date: Thu Mar 11 09:52:06 2021 +0800 virt: acrn: Fix document of acrn_msi_inject() This fixes below build warning with extra build checks. $ make W=1 ../drivers/virt/acrn/vm.c:105: warning: expecting prototype for acrn_inject_msi(). Prototype was for acrn_msi_inject() instead Fixes: c7cf8d27244f ("virt: acrn: Introduce interrupt injection interfaces") Signed-off-by: Shuo Liu Link: https://lore.kernel.org/r/20210311015206.19715-1-shuo.a.liu@intel.com Signed-off-by: Greg Kroah-Hartman commit 615d2ef05a97be05c12cbb50f5fce0b8e094d66c Author: Laurent Dufour Date: Wed Mar 10 18:44:05 2021 +0100 cxl: don't manipulate the mm.mm_users field directly It is better to rely on the API provided by the MM layer instead of directly manipulating the mm_users field. Acked-by: Frederic Barrat Acked-by: Andrew Donnellan Signed-off-by: Laurent Dufour Link: https://lore.kernel.org/r/20210310174405.51044-1-ldufour@linux.ibm.com Signed-off-by: Greg Kroah-Hartman commit 0ea43c23d4904d6a6e6b2b12a9da12b33ee0da1b Author: Bhaskar Chowdhury Date: Mon Mar 22 08:03:07 2021 +0530 cxl: Fix couple of spellings s/filesytem/filesystem/ s/symantics/semantics/ Acked-by: Randy Dunlap Acked-by: Andrew Donnellan Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210322023307.168754-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2278f0c385d88a3898d0e977d6e80e5d3d3d6020 Author: Hans de Goede Date: Wed Feb 17 11:25:01 2021 +0100 misc: lis3lv02d: Do not log an error when kmalloc fails Logging an error when kmalloc fails is not necessary (and in general should be avoided) because the malloc failure will already complain loudly itself. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210217102501.31758-3-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit bb6886bf1e2bf49627a1c4ac5e615cfe518c827f Author: Hans de Goede Date: Wed Feb 17 11:25:00 2021 +0100 misc: lis3lv02d: Change lis3lv02d_init_device() return value for unknown sensors to -ENODEV Modern HP laptops do not necessarily actually contain a lis3lv02d sensor, yet they still define a HPQ6007 device in there ACPI tables. This leads to the following messages being logged in dmesg: [ 17.376342] hp_accel: laptop model unknown, using default axes configuration [ 17.399766] lis3lv02d: unknown sensor type 0x0 [ 17.399804] hp_accel: probe of HPQ6007:00 failed with error -22 The third message is unnecessary and does not provide any useful info, change the return value for unknown sensors to -ENODEV. This is the proper return value to indicate that the driver will not be handling the device and it silences the pr_warn printing the third message. Signed-off-by: Hans de Goede BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=199715 Link: https://lore.kernel.org/r/20210217102501.31758-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 3641762c1c9c7cfd84a7061a0a73054f09b412e3 Author: Hans de Goede Date: Wed Feb 17 11:24:59 2021 +0100 misc: lis3lv02d: Fix false-positive WARN on various HP models Before this commit lis3lv02d_get_pwron_wait() had a WARN_ONCE() to catch a potential divide by 0. WARN macros should only be used to catch internal kernel bugs and that is not the case here. We have been receiving a lot of bug reports about kernel backtraces caused by this WARN. The div value being checked comes from the lis3->odrs[] array. Which is sized to be a power-of-2 matching the number of bits in lis3->odr_mask. The only lis3 model where this array is not entirely filled with non zero values. IOW the only model where we can hit the div == 0 check is the 3dc ("8 bits 3DC sensor") model: int lis3_3dc_rates[16] = {0, 1, 10, 25, 50, 100, 200, 400, 1600, 5000}; Note the 0 value at index 0, according to the datasheet an odr index of 0 means "Power-down mode". HP typically uses a lis3 accelerometer for HDD fall protection. What I believe is happening here is that on newer HP devices, which only contain a SDD, the BIOS is leaving the lis3 device powered-down since it is not used for HDD fall protection. Note that the lis3_3dc_rates array initializer only specifies 10 values, which matches the datasheet. So it also contains 6 zero values at the end. Replace the WARN with a normal check, which treats an odr index of 0 as power-down and uses a normal dev_err() to report the error in case odr index point past the initialized part of the array. Fixes: 1510dd5954be ("lis3lv02d: avoid divide by zero due to unchecked") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=785814 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1817027 BugLink: https://bugs.centos.org/view.php?id=10720 Link: https://lore.kernel.org/r/20210217102501.31758-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman commit 25651f2df7833c5554f51652007862a405aac830 Author: Geert Uytterhoeven Date: Mon Mar 22 15:17:48 2021 +0100 uapi: map_to_7segment: Remove licence boilerplate Remove the license boilerplate (containing an obsolete address), because we now have the SPDX header. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210322141748.1062733-1-geert@linux-m68k.org Signed-off-by: Greg Kroah-Hartman commit 40cc3a80bb42587db1e6ae21d6f3090582d33e89 Author: Arnd Bergmann Date: Mon Mar 22 17:43:03 2021 +0100 kgdb: fix gcc-11 warning on indentation gcc-11 starts warning about misleading indentation inside of macros: drivers/misc/kgdbts.c: In function ‘kgdbts_break_test’: drivers/misc/kgdbts.c:103:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 103 | if (verbose > 1) \ | ^~ drivers/misc/kgdbts.c:200:9: note: in expansion of macro ‘v2printk’ 200 | v2printk("kgdbts: breakpoint complete\n"); | ^~~~~~~~ drivers/misc/kgdbts.c:105:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 105 | touch_nmi_watchdog(); \ | ^~~~~~~~~~~~~~~~~~ The code looks correct to me, so just reindent it for readability. Fixes: e8d31c204e36 ("kgdb: add kgdb internal test suite") Acked-by: Daniel Thompson Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210322164308.827846-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 30a2ac9a8bb5fce15e617038bee8f26e5d090667 Author: Nava kishore Manne Date: Thu Feb 11 10:41:48 2021 +0530 fpga: Add support for Xilinx DFX AXI Shutdown manager This patch adds support for Xilinx Dynamic Function eXchange(DFX) AXI shutdown manager IP. It can be used to safely handling the AXI traffic on a Reconfigurable Partition when it is undergoing dynamic reconfiguration and there by preventing system deadlock that may occur if AXI transactions are interrupted during reconfiguration. PR-Decoupler and AXI shutdown manager are completely different IPs. But both the IP registers are compatible and also both belong to the same sub-system (fpga-bridge).So using same driver for both IP's. Signed-off-by: Nava kishore Manne Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 8058182fa4402361f25cd701bb90276fba331127 Author: Nava kishore Manne Date: Thu Feb 11 10:41:47 2021 +0530 dt-bindings: fpga: Add compatible value for Xilinx DFX AXI shutdown manager This patch Adds compatible value for Xilinx Dynamic Function eXchnage(DFX) AXI Shutdown manager IP. Signed-off-by: Nava kishore Manne Reviewed-by: Tom Rix Reviewed-by: Rob Herring Signed-off-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit b5c6ecfd471ead372a158c7ca9167e4dcc2a1deb Author: Michal Simek Date: Thu Feb 4 14:36:11 2021 +0100 fpga: xilinx-pr-decoupler: Simplify code by using dev_err_probe() Use already prepared dev_err_probe() introduced by commit a787e5400a1c ("driver core: add device probe log helper"). It simplifies EPROBE_DEFER handling. Signed-off-by: Michal Simek Signed-off-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit ce453ee6df018a8522373faae56e6032045a9606 Author: Luca Ceresoli Date: Thu Feb 4 13:13:13 2021 +0100 fpga: fpga-mgr: xilinx-spi: fix error messages on -EPROBE_DEFER The current code produces an error message on devm_gpiod_get() errors even when the error is -EPROBE_DEFER, which should be silent. This has been observed producing a significant amount of messages like: xlnx-slave-spi spi1.1: Failed to get PROGRAM_B gpio: -517 Fix and simplify code by using the dev_err_probe() helper function. Signed-off-by: Luca Ceresoli Fixes: dd2784c01d93 ("fpga manager: xilinx-spi: check INIT_B pin during write_init") Fixes: 061c97d13f1a ("fpga manager: Add Xilinx slave serial SPI driver") Signed-off-by: Moritz Fischer Signed-off-by: Greg Kroah-Hartman commit 9d58aa46291d4d696bb1eac3436d3118f7bf2573 Author: Imre Deak Date: Mon Mar 22 22:28:17 2021 +0200 drm/i915: Fix the GT fence revocation runtime PM logic To optimize some task deferring it until runtime resume unless someone holds a runtime PM reference (because in this case the task can be done w/o the overhead of runtime resume), we have to use the runtime PM get-if-active logic: If the runtime PM usage count is 0 (and so get-if-in-use would return false) the runtime suspend handler is not necessarily called yet (it could be just pending), so the device is not necessarily powered down, and so the runtime resume handler is not guaranteed to be called. The fence revocation depends on the above deferral, so add a get-if-active helper and use it during fence revocation. v2: - Add code comment explaining the fence reg programming deferral logic to i915_vma_revoke_fence(). (Chris) - Add Cc: stable and Fixes: tags. (Chris) - Fix the function docbook comment. Cc: Chris Wilson Cc: # v4.12+ Fixes: 181df2d458f3 ("drm/i915: Take rpm wakelock for releasing the fence on unbind") Reviewed-by: Chris Wilson Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210322204223.919936-1-imre.deak@intel.com commit 8c44390d8872ebf3a28558b59a0074df39b3da8f Author: Felix Kuehling Date: Tue Mar 9 15:03:28 2021 -0500 drm/amdkfd: Bump KFD API version Indicate the availability reliable SRAM EDC state in the new bit in the device properties. Proposed userspace changes: https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/commit/7cdd63475c36bb9f49bb960f90f9a8cdb7e80a21 Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit b16256874a91628006af1c68544b044546e7878a Author: Felix Kuehling Date: Thu Mar 18 12:02:48 2021 -0400 drm/amdgpu: Mark Aldebaran HW support as experimental The HW is not in production yet. Driver support is still in development. Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit e5c04edfcde373b093d2a07322873b3ce1c5b88e Author: Christian König Date: Thu Mar 18 14:04:06 2021 +0100 drm/amdgpu: revert "reserve backup pages for bad page retirment" As noted during the review this approach doesn't make sense at all. We should not apply any limitation on the VRAM applications can use inside the kernel. If an application or end user wants to reserve a certain amount of VRAM for bad pages handling we should do this in the upper layer. This reverts commit f89b881c81d9a6481fc17b46b351ca38f5dd6f3a. Signed-off-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6b44b667e24cf89603ebdaa31b939c034d425162 Author: Christian König Date: Wed Mar 17 14:42:30 2021 +0100 drm/amdgpu: revert "use the new cursor in the VM code" We are seeing VM page faults with this. Revert the change until the bugs are fixed. This reverts commit 94ae8dc55790de8979b58428672c8e0b97ee0dae. Signed-off-by: Christian König Reviewed-by: Guchun Chen Signed-off-by: Alex Deucher commit c645e4b80c97adae029e655eccd26644b958f4b6 Author: Alex Deucher Date: Thu Mar 18 22:15:06 2021 -0400 drm/amdgpu/display: properly guard dc_dsc_stream_bandwidth_in_kbps Move the function protoype to the right header and guard the call with CONFIG_DRM_AMD_DC_DCN as DSC is only available with DCN. Fixes: 8c2f14c36f47ce ("drm/amd/display: Add changes for dsc bpp in 16ths and unify bw calculations") Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher Cc: Dillon Varone Cc: Stephen Rothwell commit 7a78e2bc861b180f3115240c92b184d378368ef7 Author: Jiapeng Chong Date: Thu Mar 18 10:36:52 2021 +0800 drm/amd/display: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dwb_cm.c:220:65-70: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 74ef3bac13bcb875d705d7e2417b1f4378baf513 Author: Jiapeng Chong Date: Tue Mar 16 16:08:49 2021 +0800 drm/amd/display: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:721:65-70: WARNING: conversion to bool not needed here. ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c:1139:67-72: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 79fcd446e7e182c52c2c808c76f8de3eb6714349 Author: xinhui pan Date: Wed Mar 17 17:33:02 2021 +0800 drm/amdgpu: Fix memory leak drm_gem_object_put() should be paired with drm_gem_object_lookup(). All gem objs are saved in fb->base.obj[]. Need put the old first before assign a new obj. Trigger VRAM leak by running command below $ service gdm restart Signed-off-by: xinhui pan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 0303e1b77c4db2fd11e9005836f1baaa0ffacb7b Author: Chen Li Date: Wed Mar 17 22:48:29 2021 +0800 radeon: use kvcalloc for relocs and chunks kvmalloc_array + __GFP_ZERO is the same with kvcalloc. As for p->chunks, it will be used in: ``` if (ib_chunk->kdata) memcpy(parser->ib.ptr, ib_chunk->kdata, ib_chunk->length_dw * 4); ``` If chunks doesn't zero out with __GFP_ZERO, it may point to somewhere else, e.g., ``` Unable to handle kernel paging request at virtual address 0000000000010000 ... pc is at memcpy+0x84/0x250 ra is at radeon_cs_ioctl+0x368/0xb90 [radeon] ``` after allocating chunks with __GFP_KERNEL/kvcalloc, this bug is fixed. Fixes: 3fcb4f01deed ("drm/radeon: Use kvmalloc for CS chunks") Reviewed-by: Christian König Signed-off-by: Chen Li Signed-off-by: Alex Deucher commit 2d28b70ec321d87327ef616664f6d409e4eccd49 Author: Alex Deucher Date: Mon Mar 15 17:05:23 2021 -0400 drm/amdgpu: drop extraneous hw_status update We set the same variable a few lines above. Drop the duplicate setting. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit d1fa15680913ca1334fc2e8de6aa8e74fcfb78c6 Author: Wayne Lin Date: Wed Mar 10 23:40:01 2021 +0800 drm/amd/display: Support vertical interrupt 0 for all dcn ASIC [Why] When CONFIG_DRM_AMD_SECURE_DISPLAY is enabled, it will try to register vertical interrupt 0 for specific task. Currently, only dcn10 have defined relevant info for vertical interrupt 0. If we enable CONFIG_DRM_AMD_SECURE_DISPLAY for other dcn ASIC, will get DC_IRQ_SOURCE_INVALID while calling dc_interrupt_to_irq_source() and cause pointer errors. [How] Add support of vertical interrupt 0 for all dcn ASIC. v2: squash in build fix (Alex) Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 660d540640c0043b06e12fd59c85cea67925ac49 Author: Wayne Lin Date: Wed Mar 10 13:53:24 2021 +0800 drm/amd/display: Fix vertical interrupt 0 registering issue [Why] Find out that when we are registering vertical interrupt0, we get DC_IRQ_SOURCE_INVALID when call dc_interrupt_to_irq_source for DCN_1_0__SRCID__OTG6_VERTICAL_INTERRUPT0_CONTROL. After analyzing, it's due to the defined value for DCN_1_0__SRCID__OTG6_VERTICAL_INTERRUPT0_CONTROL is not (DCN_1_0__SRCID__OTG5_VERTICAL_INTERRUPT0_CONTROL + 1). It's not incremental sequence. [How] Use an array to record all vertical interrupt0 SRCID. While registering interrupt, use an incremental index to visit the array to get the right SRCID to register. Also add error handling to avoid potential pointer problem. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 2d78b8d66904b428b446c0ce7115c57fa06dd16b Author: Evan Quan Date: Wed Mar 10 15:31:43 2021 +0800 drm/amd/pm: correct the gpu metrics version For V1_0 and V1_1, they come with different size. Misuse may cause out of memory access. Signed-off-by: Evan Quan Reviewed-by: Kevin Wang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit a85ba00538cd4bb0655aaf57fe3ebf8cc21f4fea Author: Nikola Cornij Date: Mon Mar 15 19:51:37 2021 -0400 drm/amdgpu/display: re-enable freesync video patches Since this is a "revert of a revert", the end effect is that freesync video is back to its original state, the way it was before the first revert. Signed-off-by: Nikola Cornij Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit 63f3067d8f8c7a5ee4124d5833e52ae6a3a5a902 Author: shaoyunl Date: Mon Mar 15 11:39:28 2021 -0400 drm/amd/pm: Use BACO reset arg 0 on XGMI configuration With arg 1 BACO reset, it will try to reload the SMU FW after reset. This might failed if driver already in a pending reset status during probe period. Arg 0 reset will bring asic back to a clean state and driver will re-init everythign including SMU FW Signed-off-by: shaoyunl Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 050743da315231c329272cb1004c1eabc1e2e715 Author: shaoyunl Date: Mon Mar 15 11:36:14 2021 -0400 drm/amdgpu: Keep pending_reset valid during smu reset the ASIC SMU internal might need to check this pending_reset setting to decide the reset method Signed-off-by: shaoyunl Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2d02893ffcf8442e0b2eece6c58bd91583339fca Author: shaoyunl Date: Thu Mar 11 11:18:08 2021 -0500 drm/amdgpu: Enable light SBR in XGMI+passthrough configuration This is to fix the case where it only enable the light SMU on normal device init. This feature actually need to be enabled after ASIC been reset as well. Signed-off-by: shaoyunl Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 51ba691206e35464fd7ec33dd519d141c80b5dff Author: Qingqing Zhuo Date: Tue Mar 9 15:10:24 2021 -0500 drm/amd/display: Fix potential memory leak [Why] vblank_workqueue is never released. [How] Free it upon dm finish. Tested-by: Daniel Wheeler Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 1c5ea40c2ad28f32a8d3784b81b22ec8c4729abe Author: Yao Wang1 Date: Tue Mar 9 17:51:58 2021 +0800 drm/amd/display: add a func to disable accelerated mode [Why] When driver disabled, we driver force the YCbCr420 to RGB, which means some register will be changed, such as RDPCS_PHY_DP_MPLLB_TX_CLK_DIV changed from 1 to 0 When driver re-enabled, OS will Set Mode YCbCr420 again, which means the register RDPCS_PHY_DP_MPLLB_TX_CLK_DIV should to be 1 again, but dmub fw can’t update the register to 1 due to the mpll is not off [How] Adds an interface to disable accelerated mode bit, which allows DM to decide to call during driver disable/unload scenarios. Tested-by: Daniel Wheeler Signed-off-by: Yao Wang1 Reviewed-by: Anthony Koo Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 443dfba02483872384354bc0e62c656e3f82b6a9 Author: Dmytro Laktyushkin Date: Wed Feb 17 11:32:10 2021 -0500 drm/amd/display: fix dcn3+ bw validation soc param update sequence SOC needs to be updated to the WM set A values before validation happens. Tested-by: Daniel Wheeler Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 8ee0fea4baf90e43efe2275de208a7809f9985bc Author: Dmytro Laktyushkin Date: Thu Mar 4 11:04:26 2021 -0500 drm/amd/display: fix dml prefetch validation Incorrect variable used, missing initialization during validation. Tested-by: Daniel Wheeler Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 5cf0a610e8b54052d59fc848f36abcdcd1abe861 Author: Aric Cyr Date: Mon Mar 8 13:10:50 2021 -0500 drm/amd/display: 3.2.127 This DC patchset brings improvements in multiple areas. In summary, we highlight: * Add debug out when viewport too small * use max lb for latency hiding * System black screen hangs on driver load * Fix UBSAN warning for not a valid value for type '_Bool' * Fix for outbox1 ring buffer typecasting issue * Bypass sink detect when there are no eDPs connected * Increase precision for bpp in DSC calculations * Add changes for dsc bpp in 16ths and unify bw calculations * Correct algorithm for reversed gamma * Remove MPC gamut remap logic for DCN30 * Fix typo for helpers function name * Fix secure display lock problems * Fix no previous prototype warning * Separate caps for maximum RGB and YUV plane counts * Add debugfs to control DMUB trace buffer events * [FW Promotion] Release 0.0.56 * DCHUB underflow counter increasing in some scenarios * fix dml prefetch validation * fix dcn3+ bw validation soc param update sequence * add a func to disable accelerated mode * Fix potential memory leak Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 4710430a779e6077d81218ac768787545bff8c49 Author: Aric Cyr Date: Mon Mar 8 15:43:34 2021 -0500 drm/amd/display: DCHUB underflow counter increasing in some scenarios [Why] When unplugging a display, the underflow counter can be seen to increase because PSTATE switch is allowed even when some planes are not blanked. [How] Check that all planes are not active instead of all streams before allowing PSTATE change. Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 592a631883fdaa3ead08e59961dd16b11cfd6740 Author: Anthony Koo Date: Mon Mar 8 11:52:42 2021 -0500 drm/amd/display: [FW Promotion] Release 0.0.56 More updates to the comments to better describe the function of different cmds and parameters in the dmub interface. Tested-by: Daniel Wheeler Signed-off-by: Anthony Koo Reviewed-by: Aric Cyr Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 46a83eba276cd3aecea6d7f1045bcf8cb1b83820 Author: Leo (Hanghong) Ma Date: Tue Feb 23 13:10:19 2021 -0500 drm/amd/display: Add debugfs to control DMUB trace buffer events [Why] We want to have a debugfs interface to enable or disable DMCUB trace buffer events. [How] Add debugfs interface to enable or disable trace buffer events. Tested-by: Daniel Wheeler Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Harry Wentland Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit ae0305708e932981e738abaa13fc4a9470627237 Author: Atufa Khan Date: Thu Feb 25 16:18:35 2021 -0500 drm/amd/display: Separate caps for maximum RGB and YUV plane counts Not all ASICs have same plane capabilities so need to split them out for proper support handling. Tested-by: Daniel Wheeler Signed-off-by: Atufa Khan Reviewed-by: Aric Cyr Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit e69231c4451ae07f3cf9c62ae7a5bd6a0ba12bd0 Author: Wayne Lin Date: Mon Mar 8 10:01:31 2021 +0800 drm/amd/display: Fix no previous prototype warning [Why] Received compiling warning: All warnings (new ones prefixed by >>): >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:5574:5: warning: no previous prototype for 'amdgpu_dm_crtc_late_register' [-Wmissing-prototypes] 5574 | int amdgpu_dm_crtc_late_register(struct drm_crtc *crtc) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'dm_update_mst_vcpi_slots_for_dsc': drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:6405:46: warning: variable 'old_con_state' set but not used [-Wunused-but-set-variable] 6405 | struct drm_connector_state *new_con_state, *old_con_state; | ^~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_commit_cursors': drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8006:44: warning: variable 'new_plane_state' set but not used [-Wunused-but-set-variable] 8006 | struct drm_plane_state *old_plane_state, *new_plane_state; | ^~~~~~~~~~~~~~~ vim +/amdgpu_dm_crtc_late_register +5574 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c 5572 5573 #ifdef CONFIG_DRM_AMD_SECURE_DISPLAY > 5574 int amdgpu_dm_crtc_late_register(struct drm_crtc *crtc) 5575 { 5576 crtc_debugfs_init(crtc); 5577 5578 return 0; 5579 } 5580 #endif 5581 [How] Fix it with declaration as "static" Tested-by: Daniel Wheeler Reported-by: kernel test robot Signed-off-by: Wayne Lin Reviewed-by: Rodrigo Siqueira Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit cd95ef0097ca1c88c31aaa278d58a5ab45605e74 Author: Wayne Lin Date: Sat Mar 6 18:37:33 2021 +0800 drm/amd/display: Fix secure display lock problems [Why] Find out few locks problems while doing secure display. They are following few parts: 1. crc_rd_work_lock in amdgpu_dm_crtc_handle_crc_window_irq() should also use spin_lock_irqsave instead of spin_lock_irq. 2. In crc_win_update_set(), crc_rd_work_lock should be grabbed after obtaining lock event_lock. Otherwise, will cause deadlock by conflicting the lock order in amdgpu_dm_crtc_handle_crc_window_irq() 3. flush_work() in crc_win_update_set() is no need and will cause deadlock since amdgpu_dm_crtc_notify_ta_to_read() also tries to grab lock crc_rd_work_lock. [How] Fix above problems. Tested-by: Daniel Wheeler Signed-off-by: Wayne Lin Reviewed-by: Solomon Chiu Signed-off-by: Alex Deucher commit 4870bd88136481f77c5b93da0423888870f3add5 Author: Leo (Hanghong) Ma Date: Wed Mar 3 14:12:52 2021 -0500 drm/amd/display: Fix typo for helpers function name [why] Word "helper" was misspelled as "helpes" in dm_helpes_dmub_outbox0_interrupt_control function. [how] Fix the spelling. Tested-by: Daniel Wheeler Signed-off-by: Leo (Hanghong) Ma Reviewed-by: Yongqiang Sun Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 90d1a626e6db6192660348ef5f8676212278d8bf Author: Dillon Varone Date: Thu Mar 4 17:39:10 2021 -0500 drm/amd/display: Remove MPC gamut remap logic for DCN30 [Why?] Should only reroute gamut remap to mpc unless 3D LUT is not used and all planes are using the same src->dest. [How?] Remove DCN30 specific logic for rerouting gamut remap to mpc. Tested-by: Daniel Wheeler Signed-off-by: Dillon Varone Reviewed-by: Krunoslav Kovac Acked-by: Aric Cyr Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit ef08f9c2aac95e896c3159f3005058e9ae3d40e4 Author: Calvin Hou Date: Tue Mar 2 10:48:26 2021 -0500 drm/amd/display: Correct algorithm for reversed gamma [Why] DCN30 needs to correctly program reversed gamma curve, which DCN20 already has. Also needs to fix a bug that 252-255 values are clipped. [How] Apply two fixes into DCN30. Tested-by: Daniel Wheeler Signed-off-by: Calvin Hou Reviewed-by: Jun Lei Reviewed-by: Krunoslav Kovac Acked-by: Solomon Chiu Acked-by: Vladimir Stempen Signed-off-by: Alex Deucher commit 8c2f14c36f47ce60e7c021ce8901006524f6f40e Author: Dillon Varone Date: Wed Mar 3 20:50:57 2021 -0500 drm/amd/display: Add changes for dsc bpp in 16ths and unify bw calculations [Why?] Some code still expected bpp to be used in whole bits, not 16ths. dsc.c uses redundant function now found in dc to calculate stream bandwidth from timing. [How?] Fix code to work with 16ths instead of whole bits for dsc bpp. Refactor get_dsc_bandwidth to accept inputs in 16ths of a bit. Use dc function to calculate bandwidth from timing, and make dsc bw calculation a part of dsc.c. Tested-by: Daniel Wheeler Signed-off-by: Dillon Varone Reviewed-by: Wenjing Liu Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 86ca3cbe5c9ca8e7d47424c98fc7b49b34b67d96 Author: Jun Lei Date: Wed Dec 16 12:56:38 2020 -0500 drm/amd/display: Increase precision for bpp in DSC calculations [Why?] Many DSC variables and related functions use whole bits for bpp. [How?] Change variables and related functions to use 16ths of a bit for bpp. Tested-by: Daniel Wheeler Signed-off-by: Dillon Varone Signed-off-by: Jun Lei Reviewed-by: Wenjing Liu Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit b0942618fd12aa59e7ebee700a5242f02f9e55f9 Author: Jake Wang Date: Tue Mar 2 17:55:36 2021 -0500 drm/amd/display: Bypass sink detect when there are no eDPs connected [How & Why] Check DC config to determine if there are any eDPs connected. If there are no eDPs connected, bypass sink detect when querying eDP presence. Tested-by: Daniel Wheeler Signed-off-by: Jake Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 45150cd27ceb8f5e86122a85620df68a89011560 Author: Meenakshikumar Somasundaram Date: Wed Mar 3 18:31:03 2021 -0500 drm/amd/display: Fix for outbox1 ring buffer typecasting issue [WHY] Compiler warning "pointer to integer of different size" reported on outbox1 ring buffer address typecasting. Reported-by: kernel test robot [HOW] Fixed the issue by typecasting with character pointer. Tested-by: Daniel Wheeler Signed-off-by: Meenakshikumar Somasundaram Reviewed-by: Jun Lei Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 6a30a92997eee49554f72b462dce90abe54a496f Author: Anson Jacob Date: Tue Mar 2 16:16:36 2021 -0500 drm/amd/display: Fix UBSAN warning for not a valid value for type '_Bool' [Why] dc_cursor_position do not initialise position.translate_by_source when crtc or plane->state->fb is NULL. UBSAN caught this error in dce110_set_cursor_position, as the value was garbage. [How] Initialise dc_cursor_position structure elements to 0 in handle_cursor_update before calling get_cursor_position. Tested-by: Daniel Wheeler Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1471 Reported-by: Lyude Paul Signed-off-by: Anson Jacob Reviewed-by: Aurabindo Jayamohanan Pillai Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit b8720ed0b87d32c269b41146718253fed7cf3c59 Author: Aric Cyr Date: Tue Mar 2 16:33:12 2021 -0500 drm/amd/display: System black screen hangs on driver load This reverts commit dbc43d5fdf48e4e558338fcaef8c9d19521d1c2e as it causes crash on driver load in some scenarios. Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Reviewed-by: Martin Leung Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 9d335e17646c41d2781ee583b1512fc11e5d59aa Author: Dmytro Laktyushkin Date: Mon Dec 7 16:23:41 2020 -0500 drm/amd/display: use max lb for latency hiding Enable max memory lb config to improve stutter efficiency and latency hiding. Also increase max number of lb lines to be used by dml since experiments have shown that there isnt a hard max beyond what fits in lb. Tested-by: Daniel Wheeler Signed-off-by: Dmytro Laktyushkin Reviewed-by: Eric Bernstein Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 4abdb72bd8576bcf9c0b9f4213c97f28e75d37a5 Author: Nikola Cornij Date: Fri Feb 26 20:28:49 2021 -0500 drm/amd/display: Add debug out when viewport too small [why] It helps debugging display setup issues Tested-by: Daniel Wheeler Signed-off-by: Nikola Cornij Reviewed-by: Nicholas Kazlauskas Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 1f053689fb0e6202d868139a68c50269a29f500b Author: Aric Cyr Date: Mon Mar 1 12:03:52 2021 -0500 drm/amd/display: 3.2.126.1 Bumping DC version for DMU FW fix Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Acked-by: Solomon Chiu Signed-off-by: Alex Deucher commit 0979d43259e13846d86ba17e451e17fec185d240 Author: Kenneth Feng Date: Tue Mar 16 10:28:00 2021 +0800 drm/amd/pm: fix workload mismatch on vega10 Workload number mapped to the correct one. This issue is only on vega10. Signed-off-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit ec1e80f0d72822e9bcca5dd694dd08e4b43e0c87 Author: Feifei Xu Date: Fri Mar 12 16:27:47 2021 +0800 drm/amdgpu: Use dev_info if VFCT table not valid Some ASICs do not have GOP driver to copy vbios image into VFCT table. And it will go to next check. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e99d2eaafd8e3b90b2ef5bf9ff453ba31dc6b312 Author: Alex Deucher Date: Mon Mar 15 11:14:40 2021 -0400 drm/amdgpu: drop legacy IO bar support It was leftover from radeon where it was required for some specific old hardware. It hasn't been required for ages and the driver already falls back to MMIO when legacy IO is not available. Legacy IO also seems to be problematic on on some thunderbolt devices. Drop it. Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: Nicholas Johnson commit 5a613586c8e350fc33b0c8961fb166d1ff70c67e Author: Jiapeng Chong Date: Mon Mar 15 16:22:02 2021 +0800 drm/amd/display: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_mpc.c:358:69-74: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit e5527d8ce28bf24b827016637a5239ce08f9df0a Author: Bhaskar Chowdhury Date: Mon Mar 15 08:51:36 2021 +0530 drm/amd/pm: Mundane typo fixes in the file amdgpu_pm.c s/"an minimum"/"a minimum"/ s/"an maxmum"/"a maximum"/ Reviewed-by: Huang Rui Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Alex Deucher commit 140b93ebbffcc34672bd8162f874a7d1c8e771a2 Author: Colin Ian King Date: Thu Mar 11 16:34:17 2021 +0000 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 078025afed2c1ae7ef9d70b1c6e6976573d68be2 Author: Colin Ian King Date: Fri Mar 12 10:08:42 2021 +0000 drm/amd/pm: Fix spelling mistake "disble" -> "disable" There is a spelling mistake in an assert message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 6e58941cff74aac49659abc8b27740c0457c2397 Author: Eric Huang Date: Fri Mar 12 12:43:32 2021 -0500 drm/amd/pm: add a new sysfs entry for default power limit Driver doesn't keep the default bootup power limit and expose it to user. As requested we add it in driver. Signed-off-by: Eric Huang Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 616cf23b6cf40ad6f03ffbddfa1b6c4eb68d8ae1 Author: Victor Lu Date: Thu Mar 11 13:00:20 2021 -0500 drm/amd/display: Free local data after use Fixes the following memory leak in dc_link_construct(): unreferenced object 0xffffa03e81471400 (size 1024): comm "amd_module_load", pid 2486, jiffies 4294946026 (age 10.544s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<000000000bdf5c4a>] kmem_cache_alloc_trace+0x30a/0x4a0 [<00000000e7c59f0e>] link_create+0xce/0xac0 [amdgpu] [<000000002fb6c072>] dc_create+0x370/0x720 [amdgpu] [<000000000094d1f3>] amdgpu_dm_init+0x18e/0x17a0 [amdgpu] [<00000000bec048fd>] dm_hw_init+0x12/0x20 [amdgpu] [<00000000a2bb7cf6>] amdgpu_device_init+0x1463/0x1e60 [amdgpu] [<0000000032d3bb13>] amdgpu_driver_load_kms+0x5b/0x330 [amdgpu] [<00000000a27834f9>] amdgpu_pci_probe+0x192/0x280 [amdgpu] [<00000000fec7d291>] local_pci_probe+0x47/0xa0 [<0000000055dbbfa7>] pci_device_probe+0xe3/0x180 [<00000000815da970>] really_probe+0x1c4/0x4e0 [<00000000b4b6974b>] driver_probe_device+0x62/0x150 [<000000000f9ecc61>] device_driver_attach+0x58/0x60 [<000000000f65c843>] __driver_attach+0xd6/0x150 [<000000002f5e3683>] bus_for_each_dev+0x6a/0xc0 [<00000000a1cfc897>] driver_attach+0x1e/0x20 Fixes: 3a00c04212d1cf ("drm/amd/display/dc/core/dc_link: Move some local data from the stack to the heap") Signed-off-by: Victor Lu Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit d423f5514d043be8d03f69b7e9318d7f8d039520 Author: Christian König Date: Fri Mar 12 14:00:33 2021 +0100 drm/amdgpu: nuke the ih reentrant lock Interrupts on are non-reentrant on linux. This is just an ancient leftover from radeon where irq processing was kicked of from different places. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Signed-off-by: Alex Deucher commit 7816e4a98ce3bc7c562807240b4f14171e177420 Author: Felix Kuehling Date: Wed Mar 10 21:42:01 2021 -0500 drm/amdkfd: Fix recursive lock warnings memalloc_nofs_save/restore are no longer sufficient to prevent recursive lock warnings when holding locks that can be taken in MMU notifiers. Use memalloc_noreclaim_save/restore instead. Fixes: f920e413ff9c ("mm: track mmu notifiers in fs_reclaim_acquire/release") Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 970fd19764349081d8fcb1ce816f7c75907b9d54 Author: Stanley.Yang Date: Wed Mar 10 19:10:11 2021 +0800 drm/amdgpu: fix send ras disable cmd when asic not support ras cause: It is necessary to send ras disable command to ras-ta during gfx block ras later init, because the ras capability is disable read from vbios for vega20 gaming, but the ras context is released during ras init process, this will cause send ras disable command to ras-to failed. how: Delay releasing ras context, the ras context will be released after gfx block later init done. Changed from V1: move release_ras_context into ras_resume Changed from V2: check BIT(UMC) is more reasonable before access eeprom table Signed-off-by: Stanley.Yang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0e4c0ae59d7e6a9ba64c5341f84df9e8b70a6d0b Author: charles sun Date: Sun Mar 14 19:19:10 2021 +0800 drm/amdgpu/display: drop dcn301_calculate_wm_and_dl for now [why] the dcn301_calculate_wm_and_dl() calculation exposed a issue - switch to dcn30 version for now. still need to follow up with dcn301 watermark updates version. v2: squash in warning fix Signed-off-by: Charles Sun Reviewed-by: Nikola Cornij Acked-by: Charles Sun Signed-off-by: Alex Deucher commit 97e272928e62fad34396dd2e25158bacecb2b7eb Author: Hawking Zhang Date: Fri Mar 12 22:25:07 2021 +0800 drm/amdgpu: update ecc query support for arcturus arcturus and sienna_cichlid share the same version of umc_info interface (umc_info v33). arcturus uses umc_config to indicate ECC capability, while sienna_cichlid uses umc_config1 to indicate ECC capability. driver needs to check either umc_config or umc_config1 to decide ECC capability for ASICs that use umc_info v33 interface. Signed-off-by: Hawking Zhang Reviewed-by: Frank Min Signed-off-by: Alex Deucher commit 94ae8dc55790de8979b58428672c8e0b97ee0dae Author: Christian König Date: Wed Feb 17 19:31:39 2021 +0100 drm/amdgpu: use the new cursor in the VM code Separate the drm_mm_node walking from the actual handling. Signed-off-by: Christian König Acked-by: Oak Zeng Tested-by: Nirmoy Das Reviewed-by: Arunpravin Signed-off-by: Alex Deucher commit 2f44172bdca7f52a3c52f5b89378e8da47909352 Author: Christian König Date: Wed Feb 17 19:43:34 2021 +0100 drm/amdgpu: use the new cursor in amdgpu_ttm_bo_eviction_valuable Separate the drm_mm_node walking from the actual handling. Signed-off-by: Christian König Acked-by: Oak Zeng Tested-by: Nirmoy Das Reviewed-by: Arunpravin Signed-off-by: Alex Deucher commit 755eadf662881ef41bcf221d179336781c7a73dd Author: Christian König Date: Wed Feb 17 14:48:07 2021 +0100 drm/amdgpu: use new cursor in amdgpu_mem_visible Separate the drm_mm_node walking from the actual handling. Signed-off-by: Christian König Acked-by: Oak Zeng Tested-by: Nirmoy Das Reviewed-by: Arunpravin Signed-off-by: Alex Deucher commit 498ad8ec2ff025faa94a872068c6167a9b4c3d2b Author: Christian König Date: Wed Feb 17 14:33:54 2021 +0100 drm/amdgpu: use the new cursor in amdgpu_ttm_access_memory Separate the drm_mm_node walking from the actual handling. Signed-off-by: Christian König Acked-by: Oak Zeng Tested-by: Nirmoy Das Reviewed-by: Arunpravin Signed-off-by: Alex Deucher commit 10ebcd953dfa34cc3a5744cd359db85bc94a0162 Author: Christian König Date: Wed Feb 17 13:50:49 2021 +0100 drm/amdgpu: use new cursor in amdgpu_ttm_io_mem_pfn Separate the drm_mm_node walking from the actual handling. Signed-off-by: Christian König Acked-by: Oak Zeng Tested-by: Nirmoy Das Reviewed-by: Arunpravin Signed-off-by: Alex Deucher commit 596ee296849c40ccdae69ab7d62dfa0686dd8a9a Author: Christian König Date: Wed Feb 17 13:20:27 2021 +0100 drm/amdgpu: use the new cursor in amdgpu_fill_buffer Separate the drm_mm_node walking from the actual handling. Signed-off-by: Christian König Acked-by: Oak Zeng Tested-by: Nirmoy Das Reviewed-by: Arunpravin Signed-off-by: Alex Deucher commit be956c575e8b205c4c31e119bb9624a9226b6210 Author: Christian König Date: Wed Feb 17 12:37:53 2021 +0100 drm/amdgpu: use the new cursor in amdgpu_ttm_copy_mem_to_mem Separate the drm_mm_node walking from the actual handling. Signed-off-by: Christian König Acked-by: Oak Zeng Tested-by: Nirmoy Das Reviewed-by: Arunpravin Signed-off-by: Alex Deucher commit ee18f40ea1816bc7d3516119dbc29fc53dee5f70 Author: Christian König Date: Wed Feb 17 12:36:15 2021 +0100 drm/amdgpu: new resource cursor (v2) Allows to walk over the drm_mm nodes in a TTM resource object. v2: squash in fix from Felix Signed-off-by: Christian König Acked-by: Oak Zeng Tested-by: Nirmoy Das Reviewed-by: Arunpravin Signed-off-by: Alex Deucher commit 37c49ded05537ffc53edda4e5192ff3b74f2de07 Author: Lijo Lazar Date: Wed Mar 10 18:36:18 2021 +0800 drm/amdgpu: Free PDB0 bo before bo_fini Cleanup pdb0 bo before bo_fini gets called Signed-off-by: Lijo Lazar Reviewed-by: Christian König Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit b69d5c7e95023d370056d95e4bcddecaf4b78eda Author: Hawking Zhang Date: Tue Mar 9 19:36:19 2021 +0800 drm/amdgpu: support query ecc cap for SIENNA_CICHLID driver needs to query umc_info_v3_3 for ecc capability in sienna_cichlid Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit f1a8801c198c9e0368c54c4723ccbff13bb73211 Author: Hawking Zhang Date: Tue Mar 9 18:47:49 2021 +0800 drm/amdgpu: update umc_info v3_3 structure for ECC new member introduced in umc_info v3_3 to indicate ECC capability Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 64f171581a1a71ecb31512fde79b790f26b9b4bf Author: Oak Zeng Date: Wed Mar 10 21:23:54 2021 -0600 drm/amdgpu: fix a few compiler warnings 1. make function mmhub_v1_7_setup_vm_pt_regs static 2. indent a if statement Signed-off-by: Oak Zeng Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit f10083703c4ebcdad67143124c8bafa46013c04c Author: Oak Zeng Date: Wed Mar 10 13:09:42 2021 -0600 drm/amdgpu: fix compile error on architecture s390 (v2) ioremap_cache is not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot. v2: squash in non-x86 fix Signed-off-by: Oak Zeng Reported-by: Kernel test robot Reviewed-by: Christian Konig Signed-off-by: Alex Deucher commit 6dffd9dce94f1b68d68a4c073a95cc6a634df4a3 Author: Harish Kasiviswanathan Date: Tue Mar 9 11:41:09 2021 -0500 Revert "drm/amdgpu: During compute disable GFXOFF for Sienna_Cichlid" This reverts commit 73bf5cad2696fe3a21f70101821405db839ea18e. Fixed in newer firmware Signed-off-by: Harish Kasiviswanathan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 1e87068570a2cc4db5f95a881686add71729e769 Author: Felix Kuehling Date: Mon Mar 8 22:15:42 2021 -0500 drm/amdkfd: fix build error with AMD_IOMMU_V2=m Using 'imply AMD_IOMMU_V2' does not guarantee that the driver can link against the exported functions. If the GPU driver is built-in but the IOMMU driver is a loadable module, the kfd_iommu.c file is indeed built but does not work: x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_bind_process_to_device': kfd_iommu.c:(.text+0x516): undefined reference to `amd_iommu_bind_pasid' x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_unbind_process': kfd_iommu.c:(.text+0x691): undefined reference to `amd_iommu_unbind_pasid' x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_suspend': kfd_iommu.c:(.text+0x966): undefined reference to `amd_iommu_set_invalidate_ctx_cb' x86_64-linux-ld: kfd_iommu.c:(.text+0x97f): undefined reference to `amd_iommu_set_invalid_ppr_cb' x86_64-linux-ld: kfd_iommu.c:(.text+0x9a4): undefined reference to `amd_iommu_free_device' x86_64-linux-ld: drivers/gpu/drm/amd/amdkfd/kfd_iommu.o: in function `kfd_iommu_resume': kfd_iommu.c:(.text+0xa9a): undefined reference to `amd_iommu_init_device' x86_64-linux-ld: kfd_iommu.c:(.text+0xadc): undefined reference to `amd_iommu_set_invalidate_ctx_cb' x86_64-linux-ld: kfd_iommu.c:(.text+0xaff): undefined reference to `amd_iommu_set_invalid_ppr_cb' x86_64-linux-ld: kfd_iommu.c:(.text+0xc72): undefined reference to `amd_iommu_bind_pasid' x86_64-linux-ld: kfd_iommu.c:(.text+0xe08): undefined reference to `amd_iommu_set_invalidate_ctx_cb' x86_64-linux-ld: kfd_iommu.c:(.text+0xe26): undefined reference to `amd_iommu_set_invalid_ppr_cb' x86_64-linux-ld: kfd_iommu.c:(.text+0xe42): undefined reference to `amd_iommu_free_device' Use IS_REACHABLE to only build IOMMU-V2 support if the amd_iommu symbols are reachable by the amdkfd driver. Output a warning if they are not, because that may not be what the user was expecting. Fixes: 64d1c3a43a6f ("drm/amdkfd: Centralize IOMMUv2 code and make it conditional") Reported-by: Arnd Bergmann Signed-off-by: Felix Kuehling Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8b75c9b45b1ac43d0e21513678fa32417db86d81 Author: Sebastian Andrzej Siewior Date: Tue Feb 9 13:44:39 2021 +0100 drm/amdgpu: Replace in_task() in gfx_v8_0_parse_sq_irq() gfx_v8_0_parse_sq_irq() is using in_task() to distinguish if it is invoked from a workqueue worker or directly from the interrupt handler. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. gfx_v8_0_parse_sq_irq() is invoked directly either from a worker or from the interrupt service routine. The worker is only bypassed if the worker is already busy. Add an argument `from_wq' to gfx_v8_0_parse_sq_irq() which is true if invoked from the worker. Reviewed-by: Christian König Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Alex Deucher commit dc1794f0713ea9d9de925cd53298662660bc296e Author: Sebastian Andrzej Siewior Date: Tue Feb 9 13:44:38 2021 +0100 drm/amdgpu: Remove in_interrupt() usage in gfx_v9_0_kiq_read_clock() gfx_v9_0_get_gpu_clock_counter() acquires a mutex_t lock and is the only caller of gfx_v9_0_kiq_read_clock(). If it safe to acquire a mutex_t then gfx_v9_0_get_gpu_clock_counter() is always invoked from preemptible context. Remove in_interrupt() because it superfluous as it will always return false. Reviewed-by: Christian König Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Alex Deucher commit 58df0d7143ea4c8443bcb0fbf60aeca030a48008 Author: Sebastian Andrzej Siewior Date: Tue Feb 9 13:44:37 2021 +0100 drm/amdgpu: Replace in_interrupt() usage in gmc_v*_process_interrupt() The usage of in_interrupt() in gmc_v*_process_interrupt() is intended to use a different code path if invoked from the interrupt handler vs invoked from the workqueue. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. gmc_v*_process_interrupt() is invoked via the ->process() callback from amdgpu_ih_process() which in turn is invoked either from amdgpu_irq_handler() (the interrupt handler) or from amdgpu_irq_handle_*() which is a workqueue. amdgpu_irq::ih is always processed from the interrupt handler, the other three struct amdgpu_ih_ring members are processed from a workqueue. Replace the in_interrupt() check with a comparison against adev->irq.ih. A similar check is already done to check if the ih pointer is from ih_soft. Reviewed-by: Christian König Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Alex Deucher commit 751f43e75d63103cec3b6be4d451b6a3e569e87b Author: Colin Ian King Date: Thu Mar 11 09:28:30 2021 +0000 drm/amdgpu: Fix spelling mistake "disabed" -> "disabled" There is a spelling mistake in a drm debug message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 9a9ec6c32caf1e7db32f5d83602a40b345981be1 Author: Alex Deucher Date: Wed Mar 10 12:08:42 2021 -0500 drm/amdgpu/smu8: return an error rather than 50% if busy query fails For consistency with SMU10. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 60d06906cdcdd2127ffd7e6b770ba8ff9d91a5e1 Author: Alex Deucher Date: Tue Mar 9 11:29:54 2021 -0500 drm/amdgpu/powerplay/smu10: add support for gpu busy query (v2) Was added in newer versions of the firmware. Add support for it. v2: return an error in SMU error, drop needless break. Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 1a31474cdb48257bad3edb174a261a27192c2107 Author: Kenneth Feng Date: Thu Mar 11 12:19:57 2021 +0800 drm/amd/pm: workaround for audio noise issue On some Intel platforms, audio noise can be detected due to high pcie speed switch latency. This patch leaverages ppfeaturemask to fix to the highest pcie speed then disable pcie switching. v2: coding style fix Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 1c7b0adae8ea408cb49311e4d315f55d7929eb58 Author: Jinzhou Su Date: Tue Mar 9 10:52:14 2021 +0800 drm/amdgpu: update secure display TA header update secure display TA header file. Signed-off-by: Jinzhou Su Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 99d1da6774e11881be5416846f09ed5057ebae42 Author: Feifei Xu Date: Wed Mar 10 22:04:32 2021 +0800 drm/amdgpu:disable XGMI TA unload for A+A aldebaran In gpu reset, XGMI TA unload will cause gpu hang. Skip it on A+A aldebaran. Signed-off-by: Feifei Xu Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit ac41c396fe09eb3130af7acd67d89e9f790a0434 Author: Anson Jacob Date: Wed Mar 10 10:24:20 2021 -0500 drm/amd/display: remove duplicate include in amdgpu_dm.c 'drm/drm_hdcp.h' included in 'amdgpu_dm.c' is duplicated. Reported-by: Zhang Yunkai Signed-off-by: Anson Jacob Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit fd0161a570507cffb700d06fa357f94fdf3202d7 Author: Anson Jacob Date: Wed Mar 10 10:20:42 2021 -0500 Revert "drm/amd/display: remove duplicate include in amdgpu_dm.c" This reverts commit 51713e4e540b1adb49d4024323e43abb39a89577. The duplicate from #79 should be removed instead. Signed-off-by: Anson Jacob Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 3ae3a4ad831f98f6d0ab6b8fc0689be5c6f72406 Author: shaoyunl Date: Wed Mar 10 12:51:39 2021 -0500 drm/amdgpu: Enable light SBR for SMU on passthrough and XGMI configuration SMU introduce the new interface to enable light Secondary Bus Reset mode, driver enable it on passthrough + XGMI configuration Signed-off-by: shaoyunl Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 0e92159640f3708070d87dba79617dc7e7b63c1d Author: shaoyunl Date: Wed Mar 10 12:03:37 2021 -0500 drm/amd/pm: Add LightSBR SMU MSG support This new MSG provide the interface for driver to enable/disable the Light Secondary Bus Reset support from SMU. When enabled, SMU will only do minimum NBIO response to the SBR request and leave the real HW reset to be handled by driver later. When disabled (default state),SMU will pass the request to PSP for a HW reset Signed-off-by: shaoyunl Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit e5086659d0fdfa6729758fefcc6522f5f44cbe1b Author: shaoyunl Date: Tue Mar 9 20:02:42 2021 -0500 drm/amdgpu: skip read eeprom for device that pending on XGMI reset Read eeprom through SMU doesn't works stable on XGMI reset during test. skip it for now Signed-off-by: shaoyunl Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 1c11fac563781df3382a86730e1d6d6fbd50931c Author: Qingqing Zhuo Date: Wed Mar 10 12:15:29 2021 -0500 drm/amd/display: Remove unused defines [Why] CONFIG_DRM_AMD_DC_DCN3_0 has been folded into CONFIG_DRM_AMD_DC_DCN and is not needed. [How] Drop CONFIG_DRM_AMD_DC_DCN3_0. Signed-off-by: Qingqing Zhuo Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e3e984ee437a251e36fae1bdd0a1f283ead7f20f Author: Alex Deucher Date: Tue Mar 9 22:58:47 2021 -0500 drm/amdgpu: fix S0ix handling when the CONFIG_AMD_PMC=m Need to check the module variant as well. Acked-by: Prike Liang Signed-off-by: Alex Deucher commit 8b1c715fc8c1240ccc00d0376626f0ebac074ffc Author: Christian König Date: Mon Mar 8 19:15:42 2021 +0100 drm/radeon: keep __user during cast Silence static checker warning. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 12bfc0156e0f0cfffdca9b0957b7c6e4a82eae51 Author: Christian König Date: Mon Mar 8 19:22:13 2021 +0100 drm/radeon: fix AGP dependency When AGP is compiled as module radeon must be compiled as module as well. Signed-off-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit b503138e49ebe68d2874e3c14237e14ce37b1bf5 Author: Christian König Date: Mon Mar 8 19:35:14 2021 +0100 drm/radeon: also init GEM funcs in radeon_gem_prime_import_sg_table Otherwise we will run into a NULL ptr deref. Signed-off-by: Christian König Bug: https://bugzilla.kernel.org/show_bug.cgi?id=212137 Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0b4e90632d9308f4923530e227b6e46578d2e80b Author: Evan Quan Date: Fri Mar 5 14:21:26 2021 +0800 drm/amd/pm: correct the watermark settings for Polaris The "/ 10" should be applied to the right-hand operand instead of the left-hand one. Signed-off-by: Evan Quan Noticed-by: Georgios Toptsidis Reviewed-by: Feifei Xu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c8941550aa66b2a90f4b32c45d59e8571e33336e Author: shaoyunl Date: Tue Mar 9 10:30:15 2021 -0500 drm/amdgpu : Fix asic reset regression issue introduce by 8f211fe8ac7c4f This recent change introduce SDMA interrupt info printing with irq->process function. These functions do not require a set function to enable/disable the irq Signed-off-by: shaoyunl Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit be6523e3a90833ce53942476db4921debe0bf395 Author: Kenneth Feng Date: Tue Mar 9 21:10:16 2021 +0800 drm/amd/pm: bug fix for pcie dpm Currently the pcie dpm has two problems. 1. Only the high dpm level speed/width can be overrided if the requested values are out of the pcie capability. 2. The high dpm level is always overrided though sometimes it's not necesarry. Signed-off-by: Kenneth Feng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3f1d1eb2a2561383c84b4400352e721876c565e4 Author: Jonathan Kim Date: Tue Feb 23 15:10:33 2021 -0500 drm/amdgpu: add ih waiter on process until checkpoint Add IH function to allow caller to wait until ring entries are processed until the checkpoint write pointer. This will be primarily used by HMM to drain pending page fault interrupts before memory unmap to prevent HMM from handling stale interrupts. Suggested-by: Christian König Signed-off-by: Jonathan Kim Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 0dd795323405680f68cc16a471d19bc3369cc519 Author: Zhan Liu Date: Mon Mar 8 20:20:44 2021 -0500 drm/amdgpu/display: Implement functions to let DC allocate GPU memory [Why] DC needs to communicate with PM FW through GPU memory. In order to do so we need to be able to allocate memory from within DC. [How] Call amdgpu_bo_create_kernel to allocate GPU memory and use a list in amdgpu_display_manager to track our allocations so we can clean them up later. Signed-off-by: Harry Wentland Signed-off-by: Zhan Liu Reviewed-by: Charlene Liu Acked-by: Zhan Liu Signed-off-by: Alex Deucher commit 89551f2387f5bc3c7b8ea0696b467529f6c86f53 Author: Zhan Liu Date: Mon Mar 8 20:28:22 2021 -0500 drm/amdgpu/display: Use wm_table.entries for dcn301 calculate_wm [Why] For DGPU Navi, the wm_table.nv_entries are used. These entires are not populated for DCN301 Vangogh APU, but instead wm_table.entries are. [How] Use DCN21 Renoir style wm calculations. Signed-off-by: Leo Li Signed-off-by: Zhan Liu Reviewed-by: Dmytro Laktyushkin Acked-by: Zhan Liu Signed-off-by: Alex Deucher commit e5e6666db5c7d771e9cd9e574ff01838c063f7d8 Author: Nirmoy Das Date: Mon Mar 8 15:22:22 2021 +0100 drm/amdgpu: fb BO should be ttm_bo_type_device FB BO should not be ttm_bo_type_kernel type and amdgpufb_create_pinned_object() pins the FB BO anyway. Signed-off-by: Nirmoy Das Acked-by: Christian König Signed-off-by: Alex Deucher commit e3c1b0712fdb039d9139ac0910be9a658c9cb65e Author: shaoyunl Date: Tue Feb 16 12:50:42 2021 -0500 drm/amdgpu: Reset the devices in the XGMI hive duirng probe In passthrough configuration, hypervisior will trigger the SBR(Secondary bus reset) to the devices without sync to each other. This could cause device hang since for XGMI configuration, all the devices within the hive need to be reset at a limit time slot. This serial of patches try to solve this issue by co-operate with new SMU which will only do minimum house keeping to response the SBR request but don't do the real reset job and leave it to driver. Driver need to do the whole sw init and minimum HW init to bring up the SMU and trigger the reset(possibly BACO) on all the ASICs at the same time Signed-off-by: shaoyunl Acked-by: Andrey Grodzovsky andrey.grodzovsky@amd.com Signed-off-by: Alex Deucher commit 655ce9cb13b5967558d81dd644868473ecfb5ee4 Author: shaoyunl Date: Thu Mar 4 21:58:29 2021 -0500 drm/amdgpu: Add reset_list for device list used for reset The gmc.xgmi.head list originally is designed for device list in the XGMI hive. Mix use it for reset purpose will prevent the reset function to adjust XGMI device list which is required in next change Signed-off-by: shaoyunl Reviewed-by: Andrey Grodzovsky andrey.grodzovsky@amd.com Signed-off-by: Alex Deucher commit a330b52a9e59167a77e42844fd66a1610051811e Author: shaoyunl Date: Tue Feb 16 11:27:04 2021 -0500 drm/amdgpu: Init the cp MQD if it's not be initialized before The MQD might not be initialized duirng first init period if the device need to be reset druing probe. Driver need to proper init them in gpu recovery period Signed-off-by: shaoyunl Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 8e2712e71bfc975c1cf6cd72c94914533cf704f2 Author: shaoyunl Date: Tue Feb 16 10:57:17 2021 -0500 drm/amdgpu: Add kfd init_complete flag to check from amdgpu side amdgpu driver may be in reset state during init which will not initialize the kfd, driver need to initialize the KFD after reset by check the flag Signed-off-by: shaoyunl Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 90cbac0e995dd92f7bcf82f74aa50250bf194a4a Author: Christophe Leroy Date: Thu Mar 4 14:35:09 2021 +0000 powerpc: Enable KFENCE for PPC32 Add architecture specific implementation details for KFENCE and enable KFENCE for the ppc32 architecture. In particular, this implements the required interface in . KFENCE requires that attributes for pages from its memory pool can individually be set. Therefore, force the Read/Write linear map to be mapped at page granularity. Signed-off-by: Christophe Leroy Acked-by: Marco Elver Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/8dfe1bd2abde26337c1d8c1ad0acfcc82185e0d5.1614868445.git.christophe.leroy@csgroup.eu commit 0b71b37241784c309bea6bd6a9d2027943c4ab94 Author: Denis Efremov Date: Fri Mar 5 14:28:07 2021 +0300 powerpc/ptrace: Remove duplicate check from pt_regs_check() "offsetof(struct pt_regs, msr) == offsetof(struct user_pt_regs, msr)" checked in pt_regs_check() twice in a row. Remove the second check. Signed-off-by: Denis Efremov Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210305112807.26299-1-efremov@linux.com commit 13b8219bd00d953cad60431cb47db96eb835c71d Author: Lee Jones Date: Wed Mar 3 12:46:03 2021 +0000 powerpc/pseries: Move hvc_vio_init_early() prototype to shared location Fixes the following W=1 kernel build warning(s): drivers/tty/hvc/hvc_vio.c:385:13: warning: no previous prototype for ‘hvc_vio_init_early’ 385 | void __init hvc_vio_init_early(void) | ^~~~~~~~~~~~~~~~~~ Signed-off-by: Lee Jones Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210303124603.3150175-1-lee.jones@linaro.org commit 1a029e0edbc5890f76b642222d9899c093212fe6 Author: Zhang Yunkai Date: Wed Mar 3 19:13:18 2021 -0800 powerpc: Fix misspellings in tlbflush.h The comment marking the end of the include guard is wrong, fix it up. Signed-off-by: Zhang Yunkai [mpe: Rewrite commit message] Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210304031318.188447-1-zhang.yunkai@zte.com.cn commit 1a0e4550fb12d51cd76e2b9439f45977473b022f Author: Zhang Yunkai Date: Wed Mar 3 20:49:43 2021 -0800 powerpc: Remove duplicate includes asm/tm.h included in traps.c is duplicated. It is also included on the 62nd line. asm/udbg.h included in setup-common.c is duplicated. It is also included on the 61st line. asm/bug.h included in arch/powerpc/include/asm/book3s/64/mmu-hash.h is duplicated. It is also included on the 12th line. asm/tlbflush.h included in arch/powerpc/include/asm/pgtable.h is duplicated. It is also included on the 11th line. asm/page.h included in arch/powerpc/include/asm/thread_info.h is duplicated. It is also included on the 13th line. Signed-off-by: Zhang Yunkai [mpe: Squash together from multiple commits] Signed-off-by: Michael Ellerman commit 1ef1dd9c7ed27b080445e1576e8a05957e0e4dfc Author: Nathan Chancellor Date: Tue Mar 2 13:08:29 2021 -0700 powerpc/prom: Mark identical_pvr_fixup as __init If identical_pvr_fixup() is not inlined, there are two modpost warnings: WARNING: modpost: vmlinux.o(.text+0x54e8): Section mismatch in reference from the function identical_pvr_fixup() to the function .init.text:of_get_flat_dt_prop() The function identical_pvr_fixup() references the function __init of_get_flat_dt_prop(). This is often because identical_pvr_fixup lacks a __init annotation or the annotation of of_get_flat_dt_prop is wrong. WARNING: modpost: vmlinux.o(.text+0x551c): Section mismatch in reference from the function identical_pvr_fixup() to the function .init.text:identify_cpu() The function identical_pvr_fixup() references the function __init identify_cpu(). This is often because identical_pvr_fixup lacks a __init annotation or the annotation of identify_cpu is wrong. identical_pvr_fixup() calls two functions marked as __init and is only called by a function marked as __init so it should be marked as __init as well. At the same time, remove the inline keywork as it is not necessary to inline this function. The compiler is still free to do so if it feels it is worthwhile since commit 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely"). Fixes: 14b3d926a22b ("[POWERPC] 4xx: update 440EP(x)/440GR(x) identical PVR issue workaround") Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1316 Link: https://lore.kernel.org/r/20210302200829.2680663-1-nathan@kernel.org commit fbced1546eaaab57a32e56c974ea8acf10c6abd8 Author: Nathan Chancellor Date: Tue Mar 2 12:50:14 2021 -0700 powerpc/fadump: Mark fadump_calculate_reserve_size as __init If fadump_calculate_reserve_size() is not inlined, there is a modpost warning: WARNING: modpost: vmlinux.o(.text+0x5196c): Section mismatch in reference from the function fadump_calculate_reserve_size() to the function .init.text:parse_crashkernel() The function fadump_calculate_reserve_size() references the function __init parse_crashkernel(). This is often because fadump_calculate_reserve_size lacks a __init annotation or the annotation of parse_crashkernel is wrong. fadump_calculate_reserve_size() calls parse_crashkernel(), which is marked as __init and fadump_calculate_reserve_size() is called from within fadump_reserve_mem(), which is also marked as __init. Mark fadump_calculate_reserve_size() as __init to fix the section mismatch. Additionally, remove the inline keyword as it is not necessary to inline this function; the compiler is still free to do so if it feels it is worthwhile since commit 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely"). Fixes: 11550dc0a00b ("powerpc/fadump: reuse crashkernel parameter for fadump memory reservation") Signed-off-by: Nathan Chancellor Signed-off-by: Michael Ellerman Link: https://github.com/ClangBuiltLinux/linux/issues/1300 Link: https://lore.kernel.org/r/20210302195013.2626335-1-nathan@kernel.org commit 3a72c94ebfb1f171eba0715998010678a09ec796 Author: Russell Currey Date: Tue Feb 23 17:02:27 2021 +1000 selftests/powerpc: Fix L1D flushing tests for Power10 The rfi_flush and entry_flush selftests work by using the PM_LD_MISS_L1 perf event to count L1D misses. The value of this event has changed over time: - Power7 uses 0x400f0 - Power8 and Power9 use both 0x400f0 and 0x3e054 - Power10 uses only 0x3e054 Rather than relying on raw values, configure perf to count L1D read misses in the most explicit way available. This fixes the selftests to work on systems without 0x400f0 as PM_LD_MISS_L1, and should change no behaviour for systems that the tests already worked on. The only potential downside is that referring to a specific perf event requires PMU support implemented in the kernel for that platform. Signed-off-by: Russell Currey Acked-by: Daniel Axtens Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210223070227.2916871-1-ruscur@russell.cc commit 5c4a4802b9ac8c1acdf2250fad3f8f2d6254f9c7 Author: Bhaskar Chowdhury Date: Wed Feb 24 13:25:47 2021 +0530 powerpc: Fix spelling of "droping" to "dropping" in traps.c s/droping/dropping/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210224075547.763063-1-unixbhaskar@gmail.com commit 4f46d57cab3b3410411b395a6fa12a07947cb14a Author: Jiapeng Chong Date: Wed Feb 24 15:29:21 2021 +0800 powerpc: remove unneeded semicolon Fix the following coccicheck warnings: ./arch/powerpc/kernel/prom_init.c:2986:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/1614151761-53721-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 9634afa67bfd933b231405d05dda37ffa169f32c Author: Geert Uytterhoeven Date: Tue Feb 23 10:53:45 2021 +0100 powerpc/chrp: Make hydra_init() static Commit 407d418f2fd4c20a ("powerpc/chrp: Move PHB discovery") moved the sole call to hydra_init() to the source file where it is defined, so it can be made static. Signed-off-by: Geert Uytterhoeven Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210223095345.2139416-1-geert@linux-m68k.org commit 9be77e11dade414d2fa63750aa5c754fac49d619 Author: Sebastian Andrzej Siewior Date: Fri Feb 19 17:56:48 2021 +0100 powerpc/mm: Move the linear_mapping_mutex to the ifdef where it is used The mutex linear_mapping_mutex is defined at the of the file while its only two user are within the CONFIG_MEMORY_HOTPLUG block. A compile without CONFIG_MEMORY_HOTPLUG set fails on PREEMPT_RT because its mutex implementation is smart enough to realize that it is unused. Move the definition of linear_mapping_mutex to ifdef block where it is used. Fixes: 1f73ad3e8d755 ("powerpc/mm: print warning in arch_remove_linear_mapping()") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20210219165648.2505482-1-bigeasy@linutronix.de commit 03597b47d69cf5ea88828f34e42d5eb0c17e23fd Author: Kevin Wang Date: Tue Mar 9 18:28:59 2021 +0800 Revert "drm/amdgpu: add psp RAP L0 check support" This reverts commit d86fd724e59af96ae5ab6630f4f07a076e9b80cd. Disable PSP RAP L0 self test until to RAP feature ready. Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f258907fdd835e1aed6d666b00cdd0f186676b7c Author: Mark Yacoub Date: Mon Mar 8 16:36:22 2021 -0500 drm/amdgpu: Verify bo size can fit framebuffer size on init. To initialize the framebuffer, call drm_gem_fb_init_with_funcs which verifies that the BO size can fit the FB size by calculating the minimum expected size of each plane. The bug was caught using igt-gpu-tools test: kms_addfb_basic.too-high and kms_addfb_basic.bo-too-small Tested on ChromeOS Zork by turning on the display and running a YT video. === Changes from v1 === 1. Added new line under declarations. 2. Use C style comment. Cc: Alex Deucher Cc: "Christian König" Cc: Sean Paul Signed-off-by: Mark Yacoub Signed-off-by: Alex Deucher commit c153401672449983bbc038e9ceb471baf54ed195 Author: Zhang Yunkai Date: Sat Mar 6 03:05:25 2021 -0800 drm/amd/display: remove duplicate include in dcn21 and gpio 'dce110_resource.h' included in 'dcn21_resource.c' is duplicated. 'hw_gpio.h' included in 'hw_factory_dce110.c' is duplicated. Signed-off-by: Zhang Yunkai Signed-off-by: Alex Deucher commit 51713e4e540b1adb49d4024323e43abb39a89577 Author: Zhang Yunkai Date: Sat Mar 6 02:47:20 2021 -0800 drm/amd/display: remove duplicate include in amdgpu_dm.c 'drm/drm_hdcp.h' included in 'amdgpu_dm.c' is duplicated. It is also included in the 79th line. Signed-off-by: Zhang Yunkai Signed-off-by: Alex Deucher commit 692bd2a02e2dfe128e8451f9bc1806ab87d0b1d5 Author: Jia-Ju Bai Date: Thu Mar 4 19:54:28 2021 -0800 drm/amdgpu/swsmu: fix error return code of smu_v11_0_set_allowed_mask() When bitmap_empty() or feature->feature_num triggers an error, no error return code of smu_v11_0_set_allowed_mask() is assigned. To fix this bug, ret is assigned with -EINVAL as error return code. Reviewed-by: Evan Quan Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: Alex Deucher commit 554ba183b135ef09250b61a202d88512b5bbd03a Author: Joshua Aberback Date: Fri Feb 26 19:44:24 2021 -0500 drm/amd/display: Align cursor cache address to 2KB [Why] The registers for the address of the cursor are aligned to 2KB, so all cursor surfaces also need to be aligned to 2KB. Currently, the provided cursor cache surface is not aligned, so we need a workaround until alignment is enforced by the surface provider. [How] - round up surface address to nearest multiple of 2048 - current policy is to provide a much bigger cache size than necessary,so this operation is safe Tested-by: Daniel Wheeler Signed-off-by: Joshua Aberback Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit c54a6fe4376927e9fd7e1beb6ca754bfbfb88738 Author: Sung Lee Date: Fri Feb 26 13:20:43 2021 -0500 drm/amd/display: Revert dram_clock_change_latency for DCN2.1 [WHY & HOW] Using values provided by DF for latency may cause hangs in multi display configurations. Revert change to previous value. Tested-by: Daniel Wheeler Signed-off-by: Sung Lee Reviewed-by: Haonan Wang Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 04841b934cc75c4e4bc52c12a017414311cbbc26 Author: Aric Cyr Date: Mon Mar 1 09:10:45 2021 -0500 drm/amd/display: 3.2.126 DC version 3.2.126 brings improvements in multiple areas. In summary, we highlight: - DMUB fixes - Firmware relase 0.0.55 - Expanded dmub_cmd documentation - Enhancements in DCN30 Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 06ddcee49a35981835e04910bef462a09f108984 Author: Jake Wang Date: Tue Feb 23 17:46:55 2021 -0500 drm/amd/display: Added multi instance support for panel control [Why] Panel control always programs instance 0. With multi eDP we need to support multiple instances. [How] Use link index to set different instances for panel control. Refactored LVTMA control to support multiple instances. Tested-by: Daniel Wheeler Signed-off-by: Jake Wang Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 1a595f28ea8db980b118711a276e47d60bcc08ae Author: Anthony Koo Date: Fri Feb 26 18:15:55 2021 -0500 drm/amd/display: [FW Promotion] Release 0.0.55 Add comments to better describe the function of different cmds and parameters in the dmub interface Tested-by: Daniel Wheeler Signed-off-by: Anthony Koo Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 6804287bd1421f290065081db4b1a93c2fd2c591 Author: Yongqiang Sun Date: Fri Feb 26 11:07:37 2021 -0500 drm/amd/display: Fixed read/write pointer issue for get dmub trace [Why] Driver get wrap around dmub trace data due to read pointer being increased incorrectly when there are multiple interrupt queues with very short interval [How] Check read/write pointer before copying data from ring buffer Tested-by: Daniel Wheeler Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 61a74712c8302eaacd86b55f4ea7e3c7d9ea27f8 Author: Qingqing Zhuo Date: Tue Feb 23 23:05:20 2021 -0500 drm/amd/display: Fix warning [Why] - Wrong scope for ifdef - Missing struct description [How] Move ifdef and add comment Tested-by: Daniel Wheeler Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 3c934f454dae53c56a983226516acb014244a8d0 Author: Yongqiang Sun Date: Tue Feb 23 15:16:44 2021 -0500 drm/amd/display: Read all the trace entry if it is not empty [Why] If interval of two interrupt from dmub outbox0 is too short, some event might be skipped [How] Compare read pointer and write pointer until all the event entry is processed Tested-by: Daniel Wheeler Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 0c66824be8f459f3f7010bb90c236d3142006e37 Author: Qingqing Zhuo Date: Fri Feb 19 17:17:50 2021 -0500 drm/amd/display: Enable pflip interrupt upon pipe enable [Why] pflip interrupt would not be enabled promptly if a pipe is disabled and re-enabled, causing flip_done timeout error during DP compliance tests [How] Enable pflip interrupt upon pipe enablement Tested-by: Daniel Wheeler Signed-off-by: Qingqing Zhuo Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit d829303c5b7249d1fe1d74b86d28289ce1b34a50 Author: Yongqiang Sun Date: Tue Feb 23 09:57:21 2021 -0500 drm/amd/display: Fix dmub trace event not update issue [Why & How] Reference to read pointer which is incorrect. Change to reference to write pointer. Tested-by: Daniel Wheeler Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit 6b66208f0ce031c52afc13d80613e9218c8fe7d3 Author: Yongqiang Sun Date: Mon Feb 22 12:30:18 2021 -0500 drm/amd/display: Move define from internal header to dmub_cmd.h [Why & How] Fix linux compile error Tested-by: Daniel Wheeler Signed-off-by: Yongqiang Sun Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit b12f60ac4960a0d5ecf72f4661b39ba4647275c9 Author: Martin Leung Date: Mon Feb 22 13:46:43 2021 -0500 drm/amd/display: Fix typo when retrieving dppclk from UEFI config [why] In some boot configurations we need to retrieve the currently UEFI-set dppclk, but there was a typo in the calculation [how] Fix typo to make dpp_clk calculate off dpp_clk divider instead of disp_clk Tested-by: Daniel Wheeler Signed-off-by: Martin Leung Reviewed-by: Sung Lee Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit d3cf9fa6baced06fce3cfb100258c0dcb9fb1305 Author: Martin Leung Date: Fri Feb 19 17:40:09 2021 -0500 drm/amd/display: Skip powerstate DC hw access if virtual dal [Why] On baco-enabled systems running virtual dal, can get set power state when hw is not initialized [How] Skip DC hw part of setPowerState when hw not available Tested-by: Daniel Wheeler Signed-off-by: Martin Leung Reviewed-by: Aric Cyr Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit ffe5650af0a140c0b3bf16f0d196c356fc849b3e Author: Dillon Varone Date: Fri Feb 19 18:15:30 2021 -0500 drm/amd/display: Enabled pipe harvesting in dcn30 [Why & How] Ported logic from dcn21 for reading in pipe fusing to dcn30. Supported configurations are 1 and 6 pipes. Invalid fusing will revert to 1 pipe being enabled. Tested-by: Daniel Wheeler Signed-off-by: Dillon Varone Reviewed-by: Jun Lei Acked-by: Eryk Brol Signed-off-by: Alex Deucher commit f78313fae91c33bf0d0622f5bebe5f72cbbd9d88 Author: Lijo Lazar Date: Tue Mar 2 16:28:43 2021 +0800 drm/amdgpu: Check if FB BAR is enabled for ROM read Some configurations don't have FB BAR enabled. Avoid reading ROM image from FB BAR region in such cases. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit a364782f490d4a1e36be8e26083c774dbb2bafde Author: Lijo Lazar Date: Mon Mar 8 14:16:32 2021 +0800 drm/amd/pm: Remove min/max overload of pp_dpm_sclk To maintain consistency with legacy usage, remove min/max clock overload of pp_dpm_sclk node. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 775f11aa17b14b97229642a87b95a1916d99a961 Author: Lijo Lazar Date: Mon Mar 8 13:57:17 2021 +0800 drm/amd/pm: Enable pp_od_clk_voltage node on aldebaran Use pp_od_clk_voltage node to enable performance determinism and GFX clock min/max range for aldebaran. This is to avoid overload of pp_dpm_sclk and maintain consistency in user lib interfaces. Ex: To enable perf determinism at 900MHz max gfx clock 1) echo perf_determinism > /sys/bus/pci/devices/.../power_dpm_force_performance_level 2) echo s 1 900 > /sys/bus/pci/devices/.../pp_od_clk_voltage 3) echo c > /sys/bus/pci/devices/.../pp_od_clk_voltage Ex: To enable min 500MHz/max 900MHz gfx clocks 1) echo manual > "/sys/bus/pci/devices/.../power_dpm_force_performance_level" 2) echo s 0 500 > "/sys/bus/pci/devices/.../pp_od_clk_voltage" 3) echo s 1 900 > "/sys/bus/pci/devices/.../pp_od_clk_voltage” 4) echo c > "/sys/bus/pci/devices/.../pp_od_clk_voltage” Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e36ccf9a96aab1e3a7cb2ed36935eaea83b64710 Author: Shashank Sharma Date: Sat Feb 13 22:07:24 2021 +0530 drm/amdgpu: Set GTT_USWC flag to enable freesync v2 This patch sets 'AMDGPU_GEM_CREATE_CPU_GTT_USWC' as input parameter flag, during object creation of an imported DMA buffer. In absence of this flag: 1. Function amdgpu_display_supported_domains() doesn't add AMDGPU_GEM_DOMAIN_GTT as supported domain. 2. Due to which, Function amdgpu_display_user_framebuffer_create() refuses to create framebuffer for imported DMA buffers. 3. Due to which, AddFB() IOCTL fails. 4. Due to which, amdgpu_present_check_flip() check fails in DDX 5. Due to which DDX driver doesn't allow flips (goes to blitting) 6. Due to which setting Freesync/VRR property fails for PRIME buffers. So, this patch finally enables Freesync with PRIME buffer offloading. v2 (chk): instead of just checking the flag we copy it over if the exporter is an amdgpu device as well. Signed-off-by: Shashank Sharma Signed-off-by: Christian König Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 0b46bc3a9d17ddc98d0cb7cb78e9b9b77e9162a3 Author: Shashank Sharma Date: Sat Feb 13 22:07:25 2021 +0530 drm/amdgpu: clean-up unused variable Variable 'bp' seems to be unused residue from previous logic, and is not required anymore. Cc: Koenig Christian Cc: Deucher Alexander Signed-off-by: Shashank Sharma Reviewed-by: Christian König Signed-off-by: Alex Deucher commit c0ea73a4ad439253a26ad9fdcea3f4eb7b49fba8 Author: Aurabindo Pillai Date: Sat Mar 6 20:59:14 2021 -0500 Revert freesync video patches temporarily This temporarily reverts freesync video patches since it causes regression with eDP displays. This patch is a squashed revert of the following patches: 6f59f229f8ed ("drm/amd/display: Skip modeset for front porch change") d10cd527f5e5 ("drm/amd/display: Add freesync video modes based on preferred modes") 0eb1af2e8205 ("drm/amd/display: Add module parameter for freesync video mode") Signed-off-by: Aurabindo Pillai Reviewed-by: Anson Jacob Signed-off-by: Alex Deucher commit 50e2fc36e72d4ad672032ebf646cecb48656efe0 Author: Anson Jacob Date: Wed Mar 3 12:33:15 2021 -0500 drm/amdkfd: Fix UBSAN shift-out-of-bounds warning If get_num_sdma_queues or get_num_xgmi_sdma_queues is 0, we end up doing a shift operation where the number of bits shifted equals number of bits in the operand. This behaviour is undefined. Set num_sdma_queues or num_xgmi_sdma_queues to ULLONG_MAX, if the count is >= number of bits in the operand. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1472 Reported-by: Lyude Paul Signed-off-by: Anson Jacob Reviewed-by: Alex Deucher Reviewed-by: Felix Kuehling Tested-by: Lyude Paul Signed-off-by: Alex Deucher commit 47bfa5f60fbfd7a1c5b4d5ba8c1ab45bc9c81bc8 Author: Oak Zeng Date: Mon Mar 1 17:36:19 2021 -0600 drm/amdgpu: Increase PSP runtime TMR region size Aldebaran uses more than 4M runtime TMR. The current hard coded 4M TMR is not big enough for Aldebaran. Increase it to 8M. v2: Only do 8M size for ALDEBARAN (Hawking) Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c3c9e0faf46bde786ef34ed47ef66d70a29b1f4b Author: Eric Huang Date: Wed May 13 14:29:59 2020 -0400 drm/amdkfd: apply uncached flag for aldebaran The flag is only applied on fine-grained memory. Signed-off-by: Eric Huang Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit 2e2f197f4c994cf60ccd43a55b202bd0c5d679ba Author: Eric Huang Date: Sat Feb 27 17:46:44 2021 -0500 drm/amdgpu: set snoop bit in pde/pte entries for A+A Page tables in vram mapping to cpu is changed from uncached to cached in A+A, the snoop bit in VM_CONTEXTx_PAGE_TABLE_BASE_ADDR/ PDE0s/PDE1s/PDE2s/PTE.TFs has to be set so gpuvm walker snoop page table data out of CPU cache. Signed-off-by: Eric Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 06bfc045d54cd7cb769aab5af45f6022c2ce77a7 Author: Eric Huang Date: Sat Feb 27 16:51:19 2021 -0500 drm/amdgpu: set CPU mapping of vram as cached for A+A mode New A+A HW supports cached vram mapped to cpu. Signed-off-by: Eric Huang Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 761d86d37f86ebba77e59fa59ccef4dc2f38674f Author: Dennis Li Date: Thu Feb 4 13:32:05 2021 +0800 drm/amdgpu: harvest edc status when connected to host via xGMI When connected to a host via xGMI, system fatal errors may trigger warm reset, driver has no change to query edc status before reset. Therefore in this case, driver should harvest previous error loging registers during boot, instead of only resetting them. v2: 1. IP's ras_manager object is created when its ras feature is enabled, so change to query edc status after amdgpu_ras_late_init called 2. change to enable watchdog timer after finishing gfx edc init Signed-off-by: Dennis Li Reivewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 63dbb0db3af0a053f6f29a1b530ec74223977773 Author: Felix Kuehling Date: Thu Feb 11 16:02:05 2021 -0500 drm/amdgpu: Make noretry the default on Aldebaran This is needed for best machine learning performance. XNACK can still be enabled per-process if needed. Signed-off-by: Felix Kuehling Reviewed-by: Alex Deucher Reviewed-by: Philip Yang Tested-by: Alex Sierra Signed-off-by: Alex Deucher commit 4464820dc7edd2bb7e94d800889133379734c32c Author: Harish Kasiviswanathan Date: Tue Feb 23 12:42:18 2021 -0500 drm/amdgpu: update default timeout of Aldebaran SQ watchdog Signed-off-by: Harish Kasiviswanathan Reivewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit bea9cd3f8de535ccdb25fd29b0404038f6d63701 Author: Kenneth Feng Date: Fri Mar 5 16:41:45 2021 -0500 drm/amd/pm: add new data in metrics table Export new data in the metrics table for gfx and memory utilization counter, and each hbm temperature as well. v2: change the metrics table version to v1.1 v3: fix the coding style v4: rebase against latest kernel Signed-off-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit d86fd724e59af96ae5ab6630f4f07a076e9b80cd Author: Kevin Wang Date: Mon Feb 8 11:00:03 2021 +0800 drm/amdgpu: add psp RAP L0 check support add PSP RAP L0 check when RAP TA is loaded. Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2fb3c5d0d16192c926dbad5363867b31c8b8b2f8 Author: Kevin Wang Date: Sun Feb 7 21:09:59 2021 +0800 drm/amdgpu: change psp_rap_invoke() function return value RAP TA is an optional firmware. if it doesn’t exist, the driver should bypass psp_rap_invoke() function. 1. bypass psp_rap_invoke() when RAP TA is not loaded. 2. add new parameter (status) to query RAP TA status. (the status value is different with psp_ta_invoke(), 3. fix the 'rap_status' MThread critical problem. (used without lock) Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 250491665531f0c926c0dc542feccf3e6045de8a Author: Kevin Wang Date: Fri Feb 5 19:52:24 2021 +0800 drm/amd/pm: add aldebaran serial number support add aldebaran serial number support. (serial number from metrics table) Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 6dce50b1aae0777ea1f1b631e390fe9ca68b4aeb Author: Felix Kuehling Date: Tue Feb 9 21:26:14 2021 -0500 drm/amdgpu: Let KFD use more VMIDs on Aldebaran 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: Alex Deucher Signed-off-by: Alex Deucher commit 88f8575bca5fc70ba8608cfc49811f9b4d1eb6f9 Author: Dennis Li Date: Fri Mar 5 16:30:54 2021 -0500 drm/amdgpu: enable watchdog feature for SQ of aldebaran SQ's watchdog timer monitors forward progress, a mask of which waves caused the watchdog timeout is recorded into ras status registers and then trigger a system fatal error event. v2: 1. change *query_timeout_status to *query_sq_timeout_status. 2. move query_sq_timeout_status into amdgpu_ras_do_recovery. 3. add module parameters to enable/disable fatal error event and modify the watchdog timer. v3: 1. remove unused parameters of *enable_watchdog_timer Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4abc2567f0ebf1c7113430e25ee960408f5ebcb1 Author: Dennis Li Date: Wed Jan 27 14:36:15 2021 +0800 drm/amdgpu: refine ras codes for GC utc of aldebaran The bank number of both VML2 and ATCL2 are changed to 8, so refine related codes to avoid defining long name arrays. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 22616eb5c9b29fca2361d5bd8339efafddee7809 Author: Dennis Li Date: Tue Jan 26 10:50:41 2021 +0800 drm/amdgpu: add ras support for gfx of aldebaran add edc counter/status reset and query functions for gfx block of aldebaran. v2: change to clear edc counter explicitly aldebaran hardware will not clear edc counter after driver reading them, so driver should clear them explicitly. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5217811e74d3b9b6d830476ab8419bbe3d42596e Author: Kevin Wang Date: Fri Jan 15 14:51:07 2021 +0800 drm/amdgpu: add gc powerbrake support (v2) add GC power brake feature support for Aldebaran. v2: squash in fixes (Alex) Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit b3ecf36bf695b8b65c887ae18d70db71bd748249 Author: Hawking Zhang Date: Thu Nov 12 16:55:05 2020 +0800 drm/amdgpu: update TCP_CHAN_STEER_1 golden value for aldebaran The golden setting was changed recently. update to the latest one Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 9f55d7edb7081ba53bfbebf082ff3319522d4f50 Author: Hawking Zhang Date: Wed Nov 11 20:07:18 2020 +0800 drm/amdgpu: add common gc golden settings for aldebaran golden settings that should be applied Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 264aef8b3bb317b06e22fc07dec3aa90a9bab8be Author: Hawking Zhang Date: Mon Oct 19 20:54:25 2020 +0800 drm/amdgpu: apply gc v9_4_2 golden settings for aldebaran Those registers should be programmed as one-time initialization Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 16171a25d833be9c0957b759687cbda4b1ebc7db Author: Jonathan Kim Date: Fri Aug 21 15:02:49 2020 +0800 drm/amdgpu: restore aldebaran save ttmp and trap config on init (v2) Initialization of TRAP_DATA0/1 is still required for the debugger to detect new waves on Aldebaran. Also, per-vmid global trap enablement may be required outside of debugger scope so move to init phase. v2: just add the gfx 9.4.2 changes (Alex) Signed-off-by: Jonathan Kim Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 5073506c7eff55b9599ba9d5b52bf45b86a5df4f Author: Jonathan Kim Date: Sat Sep 5 23:32:59 2020 +0800 drm/amdkfd: add aldebaran kfd2kgd callbacks to kfd device (v2) Create dedicated Aldebaran kfd2kgd callbacks to prepare for new per-vmid register instructions for debug trap setting functions and sending host traps. v2: rebase (Alex) Signed-off-by: Jonathan Kim Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit 51a0f459f15fca1e1443de8d92431846872ee5cb Author: Oak Zeng Date: Tue Jul 7 18:29:37 2020 -0500 drm/amdkfd: Check HIQ's MQD for queue preemption status MEC firmware can silently fail the queue preemption request without time out. In this case, HIQ's MQD's queue_doorbell_id will be set. Check this field to see whether last queue preemption was successful or not. Signed-off-by: Oak Zeng Suggested-by: Jay Cornwall Acked-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6d909c5da0166d62ffc656990fe1fff9ae66b37f Author: Oak Zeng Date: Mon Jun 22 19:27:45 2020 -0500 drm/amdkfd: Add kernel parameter to stop queue eviction on vm fault This is to keep wavefront context for debug purpose Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 2f669734f383fe4c458e6ffcfa5de5a296660715 Author: Hawking Zhang Date: Mon Apr 13 15:49:27 2020 +0800 drm/amdgpu: allow use psp to load firmware (v2) Match existing asics. v2: rebase (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 65ec7c08c17141a7798418e48dd614ca8fe429f1 Author: Lijo Lazar Date: Thu Feb 4 18:51:32 2021 +0800 drm/amd/pm: Enable user min/max gfxclk on aldebaran Aldebaran has fine grained DPM for GFXCLK. Instead of a discrete level, user can specify a min/max range of GFXCLK for any profiling/tuning purpose.This option is available only in manual performance level mode. Select "manual" as power_dpm_force_performance_level and specify the min/max range using pp_dpm_sclk sysfs node. User cannot specify a min/max range outside of the default min/max range of the ASIC. If specified outside the range, values will be bound by the default min/max range. Ex: To use gfxclk min = 600MHz and max = 900MHz echo manual > /sys/bus/pci/devices/.../power_dpm_force_performance_level echo min 600 max 900 > /sys/bus/pci/devices/.../pp_dpm_sclk Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2bb8ac85683d9cb9702721d0df8cbf803d114901 Author: Kevin Wang Date: Thu Feb 4 17:53:25 2021 +0800 drm/amd/pm: remove aldebaran serial number support the following message is not supported. PPSMC_MSG_ReadSerialNumTop32 PPSMC_MSG_ReadSerialNumBottom32 Signed-off-by: Kevin Wang Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit ec8631e01143e593c4f28d3d2d8a11073ce38b7f Author: Alex Sierra Date: Wed Feb 3 19:02:20 2021 -0600 drm/amdgpu: use pd addr based on gart level page table With a recent gart page table re-construction, the gart page table is now 2-level for some ASICs: PDB0->PTB. In the case of 2-level gart page table, the page_table_base of vmid0 should point to PDB0 instead of PTB. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit be0478e7b02a3f045be3f466d14a311145ba141f Author: Oak Zeng Date: Wed Feb 3 11:09:02 2021 -0600 drm/amdgpu: Fix the comment in amdgpu_gmc.h More accurate words are used to address a code review feedback Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 79194dacb26a1b31c6d3259144c371795612ce75 Author: Oak Zeng Date: Fri Jan 22 21:51:39 2021 -0600 drm/amdgpu: Fix GART page table s-bit For the new 2-level GART table, the last PDE0 points to PTB. Since PTB is in vram and right now we are runing under s=0 mode (vram is treated as FB carveout), so the s bit of this PDE0 should be set to 0. Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit f4ec3e5039e58b85aab486af6a9c3e5d60cf8be0 Author: Alex Sierra Date: Tue Feb 2 12:24:30 2021 -0600 drm/amdgpu: update mmhub client ids for Aldebaran update mmhub client id table for Aldebaran. Signed-off-by: Alex Sierra Signed-off-by: Alex Deucher commit abe5ee57c515ce5feceab1bd09a9f19a58c70cb0 Author: Dennis Li Date: Mon Feb 1 16:18:31 2021 +0800 drm/amdgpu: enable sram initialization for aldebaran Aldebaran can share the same initializing shader code witn arcturus. Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 2f055097daef498da57552f422f49de50a1573e6 Author: Oak Zeng Date: Tue Jan 26 13:51:36 2021 -0600 drm/amdgpu: workaround the TMR MC address issue (v2) With the 2-level gart page table, vram is squeezed into gart aperture and FB aperture is disabled. Therefore all VRAM virtual addresses are in the GART aperture. However currently PSP requires TMR addresses in FB aperture. So we need some design change at PSP FW level to support this 2-level gart table driver change. Right now this PSP FW support doesn't exist. To workaround this issue temporarily, FB aperture is added back and the gart aperture address is converted back to FB aperture for this PSP TMR address. Will revert it after we get a fix from PSP FW. v2: squash in tmr fix for other asics (Kevin) Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 0c19cab5557202ba301190dc4772996daec537aa Author: Oak Zeng Date: Thu Sep 17 23:12:56 2020 -0500 drm/amdgpu: HW setup of 2-level vmid0 page table Set up HW for 2-level vmid0 page table: 1. Set up PAGE_TABLE_START/END registers. Currently only plan to do 2-level page table for ALDEBARAN, so only gfxhub1.0 and mmhub1.7 is changed. 2. Set page table base register. For 2-level page table, the page table base should point to PDB0. 3. Disable AGP and FB aperture as they are not used. Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 522510a677953bbb37916b2090a604beb0fd063b Author: Oak Zeng Date: Thu Sep 17 23:04:29 2020 -0500 drm/amdgpu: Set up vmid0 PDB0 If use gart for FB translation, allocate and fill PDB0. Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit a2902c09c51db02eeffd77485c1340fdf4536af5 Author: Oak Zeng Date: Thu Sep 17 22:53:54 2020 -0500 drm/amdgpu: Add function to allocate and fill PDB0 Add functions to allocate PDB0, map it for CPU access, and fill it. Those functions are only used for 2-level vmid0 page table construction Signed-off-by: Oak Zeng Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 7b454b3a34335381cb660864eb1e11077847c5db Author: Oak Zeng Date: Thu Sep 17 20:32:56 2020 -0500 drm/amdgpu: Use different gart table parameters for 2-level gart table If use gart for FB translation, we will squeeze vram into sysvm aperture. This requires 2 level gart table. Add page table depth and page table block size parameters to gmc. This is prepare work to 2-level gart table construction Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit f527f310bb6aa966454dbbf1b1ce79d34aeb8621 Author: Oak Zeng Date: Tue Sep 15 21:08:50 2020 -0500 drm/amdgpu: Placement of gart and vram in sysvm aperture If use GART for FB translation, place both vram and gart to sysvm aperture. AGP aperture is not set up in this case because it is not used Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 6e93ef8b6884172a36728d0a3018b406541f34af Author: Oak Zeng Date: Tue Sep 15 14:47:30 2020 -0500 drm/amdgpu: Modify comments of vram_start/end Modify the comment to reflect the fact that, if use GART for vram address translation for vmid0, [vram_start, vram_end] will be placed inside SYSVM aperture, together with GART. Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit f1dc12ca56b25a37559e82c294be1250ed5858e4 Author: Oak Zeng Date: Fri Oct 2 20:03:11 2020 -0500 drm/amdgpu: Moved gart_size calculation to mc_init functions In amdgpu_gmc_gart_location function, gart_size is adjusted by a smu_prv_buffer_size. This logic shouldn't belong to this function. Move the logic to the mc_init functions Signed-off-by: Oak Zeng Reviewed-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 1f928f51593ca07e2b125ca862fcff687e9e498b Author: Oak Zeng Date: Sat Jan 23 11:34:45 2021 -0600 drm/amdgpu: Use physical translation mode to access page table On A+A platform, CPU write page directory and page table in cached mode. So it is necessary for page table walker to snoop CPU cache. This setting is necessary for page walker to snoop page directory and page table data out of CPU cache. Signed-off-by: Oak Zeng Acked-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 35d5f224a5593028ecbc784d7c6cb0c77fb3aac3 Author: Oak Zeng Date: Fri Jan 22 13:00:06 2021 -0600 drm/amdgpu: Don't reserve vram as WC for A+A On A+A platform, vram can be mapped as WB. Not necessarily to always map vram as WC on such platform. Calling function arch_io_reserve_memtype_wc will mark the whole vram region as WC. So don't call it for A+A platform. Signed-off-by: Oak Zeng Suggested-by: Alex Deucher Acked-by: Christian Konig Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit debd629a633670527c78f33ab4774899795fc01e Author: Lijo Lazar Date: Fri Jan 29 16:24:05 2021 +0800 drm/amd/pm: Correct msg status check for powerlimit Status 0 indicates success, fix the check before using PPTable limit Signed-off-by: Lijo Lazar Reviewed-by: Evan Quan Reviewed-by: Kevin Wang ` Signed-off-by: Alex Deucher commit 6be6424684cb464be65d47cd4158e811f0d75368 Author: Lijo Lazar Date: Fri Mar 5 16:02:49 2021 -0500 drm/amd/pm: Enable performance determinism on aldebaran Performance Determinism is a new mode in Aldebaran where PMFW tries to maintain sustained performance level. It can be enabled on a per-die basis on aldebaran. To guarantee that it remains within the power cap, a max GFX frequency needs to be specified in this mode. A new power_dpm_force_performance_level, "perf_determinism", is defined to enable this mode in amdgpu. The max frequency (in MHz) can be specified through pp_dpm_sclk. The mode will be disabled once any other performance level is chosen. Ex: To enable perf determinism at 900Mhz max gfx clock echo perf_determinism > /sys/bus/pci/devices/.../power_dpm_force_performance_level echo max 900 > /sys/bus/pci/devices/.../pp_dpm_sclk Signed-off-by: Lijo Lazar Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 26256ca8a6e773e65e7e237ff972b1b0b7a557e0 Author: Lijo Lazar Date: Thu Jan 28 18:53:27 2021 +0800 drm/amd/pm: Add DCBTC support for aldebaran On aldebaran DCBTC should be run after enabling DPM. DCBTC won't be run if support is not enabled in PPTable. Without PPTable support the message is dummy and will return success always. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d6f19a9949417db7264521b536fc86c7a68e23b1 Author: Lijo Lazar Date: Thu Jan 28 18:20:06 2021 +0800 drm/amd/pm: Fix power limit query on aldebaran Aldebaran doesn't have AC/DC power limits. Separate the implementation from SMU13. Max power limit is queried from PPTable. Signed-off-by: Lijo Lazar Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 4ac5617c4b7d0f0a8f879997f8ceaa14636d7554 Author: Jonathan Kim Date: Wed Jan 27 15:24:59 2021 -0500 drm/amdgpu: mask the xgmi number of hops reported from psp to kfd The psp supplies the link type in the upper 2 bits of the psp xgmi node information num_hops field. With a new link type, Aldebaran has these bits set to a non-zero value (1 = xGMI3) so the KFD topology will report the incorrect IO link weights without proper masking. The actual number of hops is located in the 3 least significant bits of this field so mask if off accordingly before passing it to the KFD. Signed-off-by: Jonathan Kim Reviewed-by: Amber Lin Signed-off-by: Alex Deucher commit 9a9c59a8f4f4478d5951eb0bded1d17b936aad6e Author: Alex Sierra Date: Fri Jan 15 17:03:18 2021 -0600 drm/amdgpu: enable 48-bit IH timestamp counter By default this timestamp is 32 bit counter. It gets overflowed in around 10 minutes. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b672cb1eee59efe6ca5bb2a2ce90060a22860558 Author: Philip Yang Date: Tue Sep 22 13:09:33 2020 -0400 drm/amdgpu: enable retry fault wptr overflow If xnack is on, VM retry fault interrupt send to IH ring1, and ring1 will be full quickly. IH cannot receive other interrupts, this causes deadlock if migrating buffer using sdma and waiting for sdma done while handling retry fault. Remove VMC from IH storm client, enable ring1 write pointer overflow, then IH will drop retry fault interrupts and be able to receive other interrupts while driver is handling retry fault. IH ring1 write pointer doesn't writeback to memory by IH, and ring1 write pointer recorded by self-irq is not updated, so always read the latest ring1 write pointer from register. Signed-off-by: Philip Yang Signed-off-by: Felix Kuehling Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit df23d1bbd12f35f0076648cb5294523f51cd7e01 Author: Oak Zeng Date: Mon Jan 18 14:55:34 2021 -0600 drm/amdgpu: Use free system memory size for kfd memory accounting With the current kfd memory accounting scheme, kfd applications can use up to 15/16 of total system memory. For system which has small total system memory size it leaves small system memory for OS. For example, if the system has totally 16GB of system memory, this scheme leave OS and non-kfd applications only 1GB of system memory. In many cases, this leads to OOM killer. This patch changed the KFD system memory accounting scheme. 15/16 of free system memory when kfd driver load. This deduct the system memory that OS already use. Signed-off-by: Oak Zeng Suggested-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit b335f289fe0cdf509eb38014c838cec4c6d3d04b Author: Hawking Zhang Date: Wed Jan 20 19:49:05 2021 +0800 drm/amdgpu: apply new pmfw loading sequence to arcturus and onwards Arcturus and onwards products should follow the same sequence that have pmfw loading ahead of tmr setup Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 6d9059217a018d6f5bfc4e725cc97288b61dd8be Author: Lijo Lazar Date: Mon Jan 18 22:44:16 2021 +0800 drm/amdgpu: Fix aldebaran MMHUB CG/LS logic Aldebaran MMHUB CG/LS logic is controlled by VBIOS. Enable the state change logic only if driver is used for control. Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 8cf3dccb0726482cdda6b1ae687b571e84519fb7 Author: Lijo Lazar Date: Sat Jan 16 13:57:55 2021 +0800 drm/amdgpu: Enable CP idle interrupts v1: The interrupts need to be enabled to move to DS clocks. v2: Don't enable GFX IDLE interrupts if there are no GFX rings. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8a6b6b667cc2b394a94198e85e6c7f920445b589 Author: Lijo Lazar Date: Tue Jan 12 19:21:04 2021 +0800 drm/amdgpu/pm: Remove redundant generic message index Remove SMU_MSG_GfxDriverReset generic index. Always use SMU_MSG_GfxDeviceDriverReset as the generic index for reset. Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit ced7e082d5643e1fa106b97becbde0a3c6c591bf Author: Lijo Lazar Date: Tue Jan 12 19:19:52 2021 +0800 drm/amdgpu/pm: Fix reset message mapping on aldebaran Use the correct mapping for mode-reset messages on aldebaran Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 701db6756ca938b860afb12e0d854f8fc557d98b Author: Lijo Lazar Date: Mon Jan 11 13:51:52 2021 +0800 drm/amdgpu/pm: Remove unsupported MP1 messages from aldebaran PrepareMp1Reset and SoftReset messages are not supported on aldebaran. Signed-off-by: Lijo Lazar Reviewed-by: Feifei Xu Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 48a6379a23005772e3d02e887e4d40300324d366 Author: Lijo Lazar Date: Fri Mar 5 15:58:04 2021 -0500 drm/amdgpu: Add clock gating support for aldebaran Aldebaran clock gating support for GFX,SDMA,IH blocks VCN/JPEG blocks are excluded in this patch, to be enabled later Signed-off-by: Lijo Lazar Acked-by: Feifei Xu Signed-off-by: Alex Deucher commit e844cd994489f7b5b8c13ad26da000d58ec463df Author: Alex Deucher Date: Tue Jan 5 16:21:31 2021 -0500 drm/amdgpu: add mmhub client ids for aldebaran Add the mmhub client id table for aldebaran. Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 557da413d638254c79de9a8032e4422e7ac72359 Author: James Zhu Date: Thu Dec 17 16:18:14 2020 -0500 drm/amdgpu: enable dpg indirect sram mode on aldebaran Enable dpg indirect sram mode on aldebaran. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit bd937973ebfeefb975d89f9f54c13b82cf6f42f8 Author: James Zhu Date: Thu Dec 17 16:14:08 2020 -0500 drm/amdgpu: enable vcn dpg mode on aldebaran Enable vcn dpg mode on aldebaran Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit fdb1fdef2df48a740477791ac465b57cd3a0d71a Author: James Zhu Date: Thu Dec 17 16:12:08 2020 -0500 drm/amdgpu: enable vcn and jpeg on aldebaran Enable vcn and jpeg 2.6 on aldebaran. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit bd7228abb3b4c07fd898a620dfca2d072a8a89c4 Author: Lijo Lazar Date: Tue Dec 22 21:43:49 2020 +0800 drm/amdgpu: Enable swsmu block on aldebaran Enable smu13 block on aldebaran Signed-off-by: Lijo Lazar Signed-off-by: Alex Deucher commit 842811369f51f01b40488e24a73ed4c6b8560c5f Author: Hawking Zhang Date: Thu Dec 31 12:50:56 2020 +0800 drm/amdgpu: switch to cached noretry setting for aldebaran global noretry setting now is cached to gmc.noretry Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit ad6cc94a6b59b276eb50553a2a511c91bef45a97 Author: Laurent Morichetti Date: Tue Dec 22 11:42:46 2020 -0800 drm/amdkfd: Fix saving the ACC vgprs for Aldebaran get_num_acc_vgprs does not set status.scc if the number of acc vgprs is 0, so use an and instruction to set the condition code. The Aldebaran handler binary was not based on the latest version of the sources, so this update to the binary is the minimal change only adding two instructions to set the condition code. A newer version of the handler should be generated and tested in another commit. Signed-off-by: Laurent Morichetti Signed-off-by: Alex Deucher commit 73ab8efc7fdf683f7415c010990d9a1a16fae464 Author: Lijo Lazar Date: Wed Dec 9 21:06:16 2020 +0800 drm/amd/pm: Set no fan control flag as needed. For GPUs that don't support fan control, set the no fan control flag so that they don't appear in hwmon sensors. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d02692ae0d538598e9ef970dabfd29620055b18b Author: Hawking Zhang Date: Tue Dec 22 15:55:35 2020 +0800 drm/amdgpu: bypass hdp read cache invalidation for aldebaran (v2) hdp read cache is removed in aldebaran. don't issue an mmio write or write data packet to hardware. v2: rebase Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit b7daed1b62a4966af836a011e0f75c45f1728b09 Author: Amber Lin Date: Mon Dec 14 15:21:23 2020 -0500 drm/amdgpu: Aldebaran doesn't use semaphore Simplify all Aldebaran DIDs into one ASIC type. Signed-off-by: Amber Lin Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 07744e906917063f1b2a4095fc753d382d1a0d27 Author: Alex Sierra Date: Mon Dec 14 18:15:42 2020 -0600 drm/amdgpu: UTLC1 RB SDMA timeout on Aldebaran [Why] This causes infinite retries on the UTCL1 RB, preventing higher priority RB such as paging RB. [How] Set to one the SDMAx_UTLC1_TIMEOUT registers for all SDMAs. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 8081f8faca84a4c70c5421cd8048ed6d747eddfc Author: Feifei Xu Date: Wed Dec 16 12:41:27 2020 +0800 drm/amdpgu: add ATOM_DGPU_VRAM_TYPE_HBM2E vram type 0x61 is assigned to HBM2E in atom_dgpu_vram_type. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 44b3253a4bc8463d3e7c84f232dfaeab5de65daa Author: Hawking Zhang Date: Mon Nov 16 16:15:30 2020 +0800 drm/amdgpu: retire aldebaran gpu_info firmware driver should use the gfx_info atomfirmware interface Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 7159a36e119485c8c573776babc0a7a542f51d71 Author: Hawking Zhang Date: Fri Nov 13 14:35:39 2020 +0800 drm/amdgpu: query aldebaran gfx_config through atomfirmware i/f For ASICs that don't support ip discovery feature, query gfx configuration through atomfirmware interface, rather than gpu_info firmware. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit acdd5b72c52d9167f6fc763249a637acc43f47b9 Author: Lijo Lazar Date: Sat Nov 28 18:09:55 2020 +0800 drm/amd/pm: Remove CPU virtual address notification in aldebaran PPSMC_MSG_SetSystemVirtualDramAddrHigh/Low messages are not handled by PMFW in aldebaran Signed-off-by: Lijo Lazar Reviewed-by: Kenneth Feng Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit f1adbe0367914e64065a5f00b04f555ae138f4ae Author: Lijo Lazar Date: Sat Nov 28 17:31:08 2020 +0800 drm/amd/pm: Add support to override pptable id for aldebaran Temporarily force to use BU PPTable defined in VBIOS. Add support to override PPTable defined by module parameter.Add FW reported version to kernel log. Signed-off-by: Lijo Lazar Reviewed-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 8738a82b37d32a816eb5874a65e218e7ef2a777a Author: Lijo Lazar Date: Sat Nov 28 17:06:54 2020 +0800 drm/amd/amdgpu: Add smu_pptable module parameter Temporarily add smu_pptable module parameter for aldebaran.This is used to force soft PPTable use overriding any VBIOS PPTable. Signed-off-by: Lijo Lazar Reviewed-by: Kenneth Feng Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit b1138d5ec0e12af11fd0daac5153ec6c17c18f9d Author: Lijo Lazar Date: Sat Nov 28 16:38:56 2020 +0800 drm/amd/pm: Add atom_smc_dpm_info_v4_10 for aldebaran Add atom_smc_dpm_info_v4_10 that defines board parameters for aldebaran Signed-off-by: Lijo Lazar Reviewed-by: Kenneth Feng Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit be566196be3c424dbf9eb893888a8e91c12a627b Author: Oak Zeng Date: Sat Nov 21 21:13:19 2020 -0600 drm/amdgpu: Don't do FB resize under A+A config Disable PCIe BAR resizing on A+A config. It's not needed because we won't use the PCIe BAR, but it breaks the PCI BAR configuration with the current SBIOS. Error message of FB BAR resize failure under A+A: [ 154.913731] [drm:amdgpu_device_resize_fb_bar [amdgpu]] *ERROR* Problem resizing BAR0 (-22). Signed-off-by: Oak Zeng Reviewed-by: Amber Lin Reviewed-by: Felix Kuehling Reviewed-by: Christian Koenig Tested-by: Amber Lin Signed-off-by: Alex Deucher commit 9d0af8b4def0de6b734ec8db08e96da0458facb6 Author: Oak Zeng Date: Fri Nov 20 22:18:10 2020 -0600 drm/amdgpu: pre-map device buffer as cached for A+A config For A+A configuration, device memory is supposed to be mapped as cachable from CPU side. For kernel pre-map gpu device memory using ioremap_cache Signed-off-by: Oak Zeng Reviewed-by: Christian Koenig Tested-by: Amber Lin Signed-off-by: Alex Deucher commit e5a83213507257ffbcddcea127d4a201fa38536a Author: Feifei Xu Date: Tue Dec 8 23:51:40 2020 +0800 drm/amdgpu: update atom_firmware_info_v3_4 (v2) v1: Added some pspbl parameters v2: fix fallthrough issue Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Reviewed-by: Kevin Wang Reviewed-by: Lazar Lijo Signed-off-by: Alex Deucher commit 3d01361ce8fa1efe7a13583b304dff60805e1a6e Author: Feifei Xu Date: Thu Nov 26 19:04:51 2020 +0800 drm/amd/pm:add aldebaran support for getting bootup values for SMU config. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit d477c5aaece1ea187907005e2f2b4b118f486c2a Author: Hawking Zhang Date: Tue Nov 24 05:23:36 2020 +0800 drm/amdgpu: disallow use semaphore on aldebaran shall revisit the change later Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher commit 10c71e6cc9c9369a9fb8fcfe3e7f9463e2f751bb Author: Hawking Zhang Date: Tue Dec 1 00:20:35 2020 +0800 drm/amdgpu: switch to vega20 ih block for aldebaran replace vega10 ih block with vega20 ih block for aldebaran. Signed-off-by: Hawking Zhang Acked-by: Christian König Acked-by: Felix Kuehling Reviewed-by: Dennis Li Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit eed4bbd388f169c551cc8989ec4379bf55b0ab9b Author: Hawking Zhang Date: Tue Dec 1 23:50:51 2020 +0800 drm/amdgpu: correct IH_CHICKEN programming for aldebaran For aldebaran, psp firmware won't program IH_CHICKEN. it now depends on driver to program it properly so either bus address or gpu virtual address is just working for ih ring. Signed-off-by: Hawking Zhang Acked-by: Christian König Acked-by: Felix Kuehling Reviewed-by: Dennis Li Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit b45589b8377fcfeb792ce669cd12d9c40854aca6 Author: Hawking Zhang Date: Thu Nov 19 16:44:55 2020 +0800 drm/amdgpu: add mmhub error status query callback for aldebaran The callback will be invoked to query mmea error status when needed. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 27ad2ca66701063ef9987b347b010ca33d0be9a3 Author: Hawking Zhang Date: Thu Nov 19 16:40:16 2020 +0800 drm/amdgpu: add mmhub ras error reset callback for aldebaran The callback will be invoked to reset mmhub ras error counters when needed. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit cbb84e7aab1c7737c2d63c7a5cd7296de999a430 Author: Hawking Zhang Date: Thu Nov 19 16:35:51 2020 +0800 drm/amdgpu: add mmhub ras error query callback for aldebaran The callback will be invoked to harvest all kinds of mmhub ras error Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit f5f0e4a0d52f7562d27ba3051abdef2bb19bdf7c Author: Hawking Zhang Date: Thu Nov 19 00:25:09 2020 +0800 drm/amdgpu: add sdma ras error reset callback for aldebaran The callback will be invoked to reset sdma ras error counters when needed. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit b2459840cf570328b5512ba264ae7a9ade83b504 Author: Hawking Zhang Date: Wed Nov 18 23:55:11 2020 +0800 drm/amdgpu: add sdma ras error query callback for aldebaran The callback will be invoked to harvest all kinds of sdma ras error Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit 2fdb91a25e8b17148894be27142fcf0c03f96e7d Author: Hawking Zhang Date: Wed Nov 18 21:14:59 2020 +0800 drm/amdgpu: add sdma v4_4 ras function sdma ras function is the main structure to support sdma ras on aldebaran. the patch initializes late_init late_fini callbacks. Signed-off-by: Hawking Zhang Reviewed-by: Dennis Li Signed-off-by: Alex Deucher commit a6d9d6ab84022a3127244d81e14fcdf58a960453 Author: Hawking Zhang Date: Wed Nov 18 18:28:08 2020 +0800 drm/amdgpu: apply sdma golden settings for aldebaran perform one-time initialization for sdma registers Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 3de60d961cec972afabe9208f51731659201a000 Author: Hawking Zhang Date: Tue Nov 17 15:51:29 2020 +0800 drm/amdgpu: use physical_node_id to calculate aper_base Similar as xgmi connected gpu nodes, physical_node_id * segment_size should be used to calculate the offset of aper_base. The asic type check is redundant. once physical_node_id and segment_size are initialized, it should be count on. Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 063a1e83413996063790cfa4d17690a4b86eaa8e Author: Hawking Zhang Date: Mon Nov 16 16:00:59 2020 +0800 drm/amdgpu: skip gds ras workaround for aldebaran there won't be any gds useage in either kernel or pm4 anymore for aldebaran. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 18c3d45a9ae9789067f928b935d027f32f728ef2 Author: Hawking Zhang Date: Mon Nov 16 15:54:36 2020 +0800 drm/amdgpu: init gds for aldebaran aldebaran removed gds internal memory for atomic usage. it only supports gws opcode in kernel like barrier, semaphore.etc. there won't be usage of gds in either kernel or pm4 packet. max_wave_id should also be marked as deprecated for aldebaran. Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit 147d082d386289a8bc66d1c906e4ae5c785d9d59 Author: Feifei Xu Date: Mon Nov 30 18:57:19 2020 +0800 drm/amdgpu: correct vram_info for HBM2E correct atom_vram_info_header_v2_6 and its vram_module. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit f31c4a11b4692122fa385790e95a0d355cfc4475 Author: Hawking Zhang Date: Fri Nov 13 18:03:07 2020 +0800 drm/amdgpu: support get_vram_info atomfirmware i/f for aldebaran Query vram_type, channel_num, channel_width information through atomfirmware i/f Signed-off-by: Hawking Zhang Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher commit ea9097d921d4f848cc6f80a9846635a0f5d5a98f Author: Feifei Xu Date: Thu Nov 19 20:04:37 2020 +0800 drm/amdgpu:return true for mode1_reset_support on aldebaran Will remove once validation finished. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 5c03e5843e6bd1e6f2271a54c9b30524ba78bb8f Author: Feifei Xu Date: Thu Nov 19 18:12:26 2020 +0800 drm/amdgpu:add smu mode1/2 support for aldebaran Use MSG_GfxDriverReset for mode reset and retire MSG_Mode1Reset. Centralize soc15_asic_mode1_reset() and nv_asic_mode1_reset()functions. Add mode2_reset_is_support() for smu->ppt_funcs. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4c2e5f513e950038c594df04ae2cc511fa854ccb Author: Feifei Xu Date: Thu Nov 12 14:24:51 2020 +0800 drm/amdgpu: Add DID for aldebaran Add 0x7408,0x740C,0x740F in pciidlist. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 0d2c1855d5f64122044c202ca64deaec0222d0b1 Author: John Clements Date: Wed Nov 18 14:25:40 2020 +0800 drm/amdgpu: added support for register list loading (v2) call host to psp cmd to load reg list v2: update to latest interface (Alex) Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit b2aa382ae7e0ff51893be6ede53c8967bb5b72e8 Author: John Clements Date: Wed Nov 18 14:24:52 2020 +0800 drm/amdgpu: added register list driver ctx (v2) updated psp bin parsing and load register list v2: update to latest interface (Alex) Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit d74decc412041504191837bb4760c61c4fa26884 Author: John Clements Date: Wed Nov 18 14:24:12 2020 +0800 drm/amdgpu: updated host to psp mailbox cmd (v2) added host to psp cmd for register list v2: update to new interface (Alex) Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 115ba9a9fdd2b7c0b2169647c06f03821dc966e5 Author: Hawking Zhang Date: Tue Dec 8 00:46:18 2020 +0800 drm/amdgpu: declare smuio v13_0 callbacks as static fix -Wmissing-protoypes warning Signed-off-by: Hawking Zhang Reviewed-by: Likun Gao Signed-off-by: Alex Deucher commit 4f668d3d318c62afdb2ec3b2c2b0e602fd83b38c Author: Hawking Zhang Date: Thu Nov 12 10:34:58 2020 +0800 drm/amdgpu: initialize external rev_id for aldebaran add exteranal rev_id for aldebaran Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit e747ca0a4e9ca0bf59dbe46eefb6d7192785bb59 Author: Kevin Wang Date: Wed Sep 9 13:56:44 2020 +0800 drm/amdgpu: declare sdma firmware binary file for aldebaran declare sdma firmware binary file for aldebaran Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit c05d1c401572ac63d704183b19db2ce746961412 Author: Kevin Wang Date: Wed Oct 21 00:09:36 2020 +0800 drm/amd/swsmu: add aldebaran smu13 ip support (v3) Add initial swSMU support. v1: add smu13 ip support for aldebaran asic (Kevin/Kenneth) v2: switch to thm/mp v13_0 ip headers (Hawking) v3: squash in updates (Alex) Signed-off-by: Kevin Wang Signed-off-by: Kenneth Feng Reviewed-by: Kenneth Feng Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher commit 465c437aac49c7d435c4447a15249f4d5623530c Author: Kevin Wang Date: Thu Aug 20 10:05:25 2020 +0800 drm/amd/swsmu: add aldebaran smu driver if header (v2) add aldebaran smu13 driver if header v2: squash in updates Signed-off-by: Kevin Wang Signed-off-by: Kenneth Feng Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit cf7821a84a4c6c54e62b142c0da64b2189736c52 Author: Hawking Zhang Date: Fri Aug 21 22:12:50 2020 +0800 drm/amdgpu: comments out vcn/jpeg ip blocks for aldebaran vcn fw front door loading is not functional. comments out vcn/jpeg ip blocks so people can load amdgpu driver without specify ip_mask module parameter. Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Reviewed-by: James Zhu Signed-off-by: Alex Deucher commit fbaa30d87fd8e5515adc4c5d502dc4aebbbd7670 Author: Hawking Zhang Date: Fri Aug 21 22:09:06 2020 +0800 drm/amdgpu: initialize ta firmware for aldebaran only xgmi ta is supported at this stage Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 5be50a8fd80f559a7ddd4b41bc6626b0b53333fb Author: Kevin Wang Date: Tue Sep 8 16:45:59 2020 +0800 drm/amdgpu: switch to use reg distance member for mmhub v1_7 switch to use register distance member for mmhub v1_7 instead of hardcode Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4da999cdfc8d4fd4f948e024e6d0dbbd469a9fdb Author: Oak Zeng Date: Tue Aug 11 15:02:38 2020 -0500 drm/amdgpu: Clean up mmhub functions for aldebaran Add more function pointers to amdgpu_mmhub_funcs. ASIC specific implementation of most mmhub functions are called from a general function pointer, instead of calling different function for different ASIC. V2: Split patch into upstreamable and aldebaran Signed-off-by: Oak Zeng Reviewed-by: Alex Deucher Reviewed-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit f8db121e471713c8b8ad56cde409abf2ef9a27bb Author: James Zhu Date: Mon Jul 6 09:55:24 2020 -0400 drm/amdgpu/jpeg: enable JPEG on aldebaran enable JPEG on aldebaran Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 9f386fd3aaecd77f6857c46739019520495d2557 Author: James Zhu Date: Mon Jul 6 09:54:12 2020 -0400 drm/amdgpu/vcn: enable VCN on aldebaran Enable VCN on aldebaran Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 7ce293570c7598d2c9aedbd20589b89bc611466f Author: James Zhu Date: Mon Jul 6 09:52:10 2020 -0400 drm/amdgpu/nbio: add aldebaran support Aldebaran has a new mmBIF_MMSCH1_DOORBELL_RANGE setting. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit eb28f02b1eebbc222dfffd47b47a25a8bdad9571 Author: Hawking Zhang Date: Wed Feb 24 16:38:22 2021 -0500 drm/amdgpu: skip MEC2_JT initialization for aldebaran MEC2_JT is not supported Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 98291d6d8c2f5864b7dfc1950ece4a7563597f13 Author: Eric Huang Date: Tue May 12 15:25:38 2020 -0400 drm/amdkfd: add new flag for uncached GPU mapping The macro is for memory mapped by GPU as uncached. Signed-off-by: Eric Huang Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit 72b4db0f58ccfc4cb9489708ab1bcb32adc42679 Author: Eric Huang Date: Tue May 5 14:56:05 2020 -0400 drm/amdgpu: new cache coherence change for Aldebaran To support new cache coherence HW on A+A platform mainly in KFD. Signed-off-by: Eric Huang Reviewed-by: Oak Zeng Signed-off-by: Alex Deucher commit ff6885ac475fae7167f92b52e4028f927ab50182 Author: James Zhu Date: Thu Jun 4 13:06:29 2020 -0400 drm/amdgpu/jpeg2.6: Add jpeg2.6 support Aldebaran is using jpeg2.6, and the main change is jpeg2.6 using AMDGPU_MMHUB_0, and jpeg2.5 using AMDGPU_MMHUB_1. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 7ffe72385ac5b6235db1fa51ede1a216d69ffc59 Author: Yong Zhao Date: Tue May 26 21:38:53 2020 -0400 drm/amdgpu: Fix an omission when adding Aldebaran support Aldebaran should be the same as Arcturus in the PTE SNOOPED bit handling. Signed-off-by: Yong Zhao Signed-off-by: Alex Deucher commit 56237c6aef9f7d0b122108878485529812daa899 Author: Oak Zeng Date: Wed May 20 11:00:58 2020 -0500 drm/amdgpu: Fix IH client ID naming table Client ID 26 is reserved. Add it to the table. Signed-off-by: Oak Zeng Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit eb53aa398121fe9b47e44655c87dc277c976766d Author: James Zhu Date: Wed Jun 3 09:41:18 2020 -0400 drm/amdgpu/vcn2.6: Add vcn2.6 support Aldebaran is using vcn2.6, and the main change is vcn2.6 using AMDGPU_MMHUB_0, and vcn2.5 using AMDGPU_MMHUB_1 Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 86d848b16d4cddc0f685ba3d145d962ca97a8363 Author: James Zhu Date: Wed Jun 3 09:17:18 2020 -0400 drm/amdgpu: add Aldebaran to the VCN family including firmware support etc. Signed-off-by: James Zhu Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit d34184e3e3ad11603cc3103a467f1fdd71ee2915 Author: Rajneesh Bhardwaj Date: Tue Apr 21 18:00:07 2020 -0400 drm/amdkfd: expose host gpu link via sysfs (v2) Currently host-gpu io link is always reported as PCIe however, on some A+A systems, there could be one xgmi link available. This change exposes xgmi link via sysfs when it is present. v2: fix includes (Alex) Reviewed-by: Oak Zeng Reviewed-by: Hawking Zhang Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit 3cbb3a9749a31a6e8549650df3d16a050acab3ca Author: Rajneesh Bhardwaj Date: Thu Apr 30 02:34:57 2020 -0400 drm/amdgpu: support get xgmi information for Aldebaran Aldebaran uses registers defined in header gc_9_4_2 but much of the xgmi related functionality can be obtained by reusing the exisitng definition from gfxhub_v1_1_get_xgmi_info. While adding support for Aldebaran, also refactored code to better handle the new scenario. Signed-off-by: Rajneesh Bhardwaj Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 31691b8d1be4383f42d49de1f1393818470dcadc Author: Rajneesh Bhardwaj Date: Wed Oct 21 14:12:11 2020 +0800 drm/amdgpu: define address map for host xgmi link (v3) This applies to AMD Accelerated Processing Platforms that support host gpu interconnect throguh a special link (xgmi). Aldebaran systems will support this special feature for utilizing the benefits of host-gpu cache coherence. This change outlines the basic framework for mapping the GPU VRAM (HBM) to system address space making it accesible to the host but managed by the amdgpu driver since this region is marked as reserved memory in host address space by the underlying system firmware. v2: switch to smuio callback function to check the type of host-gpu interface (Hawking) v3: use hub callbacks rather than direct function calls (Alex) Reviewed-by: Oak Zeng Reviewed-by: Hawking Zhang Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher commit efce10005be4023e23ed51fe1c2e8380d5fe62d4 Author: Rajneesh Bhardwaj Date: Sun Apr 5 14:43:24 2020 -0400 drm/amdgpu: enable xgmi support for Aldebaran Like its predecessors Aldebran also supports advanced high bandwidth GPU-GPU communication interface known as xgmi. This enables the basic xgmi support while refactoring the code slightly. Detection of xgmi link between host cpu and gpu will be introduced in a different patch. Reviewed-by: Oak Zeng Reviewed-by: Christian König Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit 7914a0cd17ecef152abff399a76cdc3b1cde8d2e Author: Hawking Zhang Date: Fri Oct 16 23:05:51 2020 +0800 drm/amdgpu: initialize smuio callbacks for aldebaran initialize smuio v13_0 callbacks for aldebaran Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 2e8c66d6bbb2458ff17ed1ab88866e586ef4fec2 Author: Hawking Zhang Date: Fri Oct 23 21:46:20 2020 +0800 drm/amdgpu: implement smuio v13_0 callbacks Aldebaran will use smuio v13_0 callbacks Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 26f70889e112a367b99e36a30b952bae818ca0b3 Author: Hawking Zhang Date: Tue Dec 8 20:57:22 2020 +0800 drm/amdgpu: add new smuio callbacks for aldebaran is_host_gpu_xgmi_supported is used to query gpu and cpu/host link type. get_die_id is used to query die ids. Signed-off-by: Hawking Zhang Reviewed-by: Alex Deucher Reviewed-by: John Clements Signed-off-by: Alex Deucher commit 9fbd96a136f209656766714d4e043e3ad0becdd1 Author: Hawking Zhang Date: Sun Apr 26 22:43:15 2020 +0800 drm/amdgpu: enable psp v13 ip block for aldebaran Add psp v13 ip block to soc ip init list for aldebaran Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit efec10c1eb3d9d8e9c3ce1b5d9f73a6d2922d631 Author: Hawking Zhang Date: Tue May 26 15:21:43 2020 +0800 drm/amdgpu: bypass gc_9_x_common golden settings ALDEBARAN doesn't need these golden settings. Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 1b15bac7bfdae2d77c631144066e32b3df3d778c Author: Hawking Zhang Date: Mon May 25 16:20:35 2020 +0800 drm/amdgpu: detect sriov capability for aldebaran SRIOV pf/vf function identifier regsiter in aldebaran is the same as the one in arcturus Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 428ad99e9ccd0410b106910ede61ace700bb0fe5 Author: Hawking Zhang Date: Mon May 25 15:27:18 2020 +0800 drm/amdgpu: load pmfw prior to other non-psp fw for aldebaran PMFW should be loaded before any operation that may toggling DF-Cstate. otherwsie, tOS has no choice but to locally toggle DF Cstate (i.e. disable DF-Cstate even it already enabled by VBIOS) Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit f8a98f1645cdb4037364c8b1ec98c1e4cfd4f2f5 Author: Hawking Zhang Date: Mon May 25 15:08:38 2020 +0800 drm/amdgpu: fix incorrect EP_STRAP reg offset for aldebaran mmRCC_DEV0_EPF0_STRAP0 offset in aldebaran is changed from arcturus Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit ee8210832551787b767ef57dfbf8333fc2dcb439 Author: Hawking Zhang Date: Mon Apr 13 15:07:54 2020 +0800 drm/amdgpu: init psp v13 ip function Initialze psp ip function for aldebaran Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 48375542b0b17dfe8f58c872f8601378bb635f34 Author: Hawking Zhang Date: Sun Apr 26 22:37:56 2020 +0800 drm/amdgpu: add psp v13 ring support Add callback functions for psp_v13 ring Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit f117535590210280fdcd6e4e7979e26796868447 Author: Hawking Zhang Date: Mon Apr 13 11:11:41 2020 +0800 drm/amdgpu: add tOS loading support for psp v13 Add callback function to support trusted os loading for psp v13 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit ea6eaf558326487584fabf6f133ed0652017f342 Author: Hawking Zhang Date: Mon Apr 13 11:08:35 2020 +0800 drm/amdgpu: add sys_drv loading support for psp v13 Add callback function to support sys_drv firmware loading for psp v13 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 133d888da9e1562d24987b0498767d780662f7c5 Author: Hawking Zhang Date: Fri Oct 16 15:50:16 2020 +0800 drm/amdgpu: add kdb loading support for psp v13 Add callback function to support key database firmware loading for psp v13 Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 742d3c61acb2c2bdeb2af9bd5c2d7a498bd9294c Author: Hawking Zhang Date: Sun Apr 26 22:24:20 2020 +0800 drm/amdgpu: init sos microcode for psp v13 Initialize sos microcode for aldebaran Signed-off-by: Hawking Zhang Reviewed-by: Le Ma Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit be14729a3362e36dc6cd23af9f840720caf26fc9 Author: Yong Zhao Date: Fri Aug 21 14:01:18 2020 +0800 drm/amdgpu: Print the IH client ID name when vm fault happens This gives more information and improves productivity. Signed-off-by: Yong Zhao Signed-off-by: Alex Deucher commit 5aa3afe107d9099fc0dea2acf82c3e3c8f0f20e2 Author: Dmitry Vyukov Date: Tue Mar 23 07:49:23 2021 +0100 net: make unregister netdev warning timeout configurable netdev_wait_allrefs() issues a warning if refcount does not drop to 0 after 10 seconds. While 10 second wait generally should not happen under normal workload in normal environment, it seems to fire falsely very often during fuzzing and/or in qemu emulation (~10x slower). At least it's not possible to understand if it's really a false positive or not. Automated testing generally bumps all timeouts to very high values to avoid flake failures. Add net.core.netdev_unregister_timeout_secs sysctl to make the timeout configurable for automated testing systems. Lowering the timeout may also be useful for e.g. manual bisection. The default value matches the current behavior. Signed-off-by: Dmitry Vyukov Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=211877 Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller commit 4c94fe88cde4bb5c8e1baa01106c4e6db1c75738 Author: Wan Jiabing Date: Tue Mar 23 10:05:48 2021 +0800 net: ethernet: Remove duplicate include of vhca_event.h vhca_event.h has been included at line 4, so remove the duplicate one at line 8. Signed-off-by: Wan Jiabing Signed-off-by: David S. Miller commit ea6c8635d5d51da633bfc333011d4aaeb60d3142 Author: Wan Jiabing Date: Tue Mar 23 10:00:12 2021 +0800 net: ethernet: indir_table.h is included twice indir_table.h has been included at line 41, so remove the duplicate one at line 43. Signed-off-by: Wan Jiabing Signed-off-by: David S. Miller commit 437c78f976f5b39fc4b2a1c65903a229f55912dd Author: Alex Elder Date: Mon Mar 22 20:05:05 2021 -0500 net: ipa: avoid 64-bit modulus It is possible for a 32 bit x86 build to use a 64 bit DMA address. There are two remaining spots where the IPA driver does a modulo operation to check alignment of a DMA address, and under certain conditions this can lead to a build error on i386 (at least). The alignment checks we're doing are for power-of-2 values, and this means the lower 32 bits of the DMA address can be used. This ensures both operands to the modulo operator are 32 bits wide. Reported-by: Randy Dunlap Signed-off-by: Alex Elder Acked-by: Randy Dunlap # build-tested Signed-off-by: David S. Miller commit ed97143e00982e1cab3544977f33b94a6de2e6fa Merge: c692a0be82bb2 67831a08a7788 Author: David S. Miller Date: Tue Mar 23 17:13:04 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-03-23 This series contains updates to ice, fm10k, i40e, iavf, ixgbe, ixgbevf, igb, e1000e, and e1000 drivers. Tony fixes prototype warnings for mismatched header for ice driver. Sasha fixes prototype warnings for mismatched header for igc and e1000e driver. Jesse fixes prototype warnings for mismatched header for the remaining Intel drivers: fm10k, i40e, iavf, igb, ixgbe, and ixgbevf. Gustavo A. R. Silva explicitly adds a break instead of falling through in preparation of -Wimplicit-fallthrough for Clang to ice, fm10k, ixgbe, igb, ixgbevf, and e1000 drivers, ==================== Signed-off-by: David S. Miller commit 2b5a4562edd0bc3ec56a99e14acd6c0f00808b93 Author: Matt Roper Date: Mon Mar 22 16:38:40 2021 -0700 drm/i915/display: Simplify GLK display version tests GLK has always been a bit of a special case since it reports INTEL_GEN() as 9, but has version 10 display IP. Now we can properly represent the display version as 10 and simplify the display generation tests throughout the display code. Aside from manually adding the version to the glk_info structure, the rest of this patch is generated with a Coccinelle semantic patch. Note that we also need to switch any code that matches gen10 today but *not* GLK to be CNL-specific: @@ expression dev_priv; @@ - DISPLAY_VER(dev_priv) > 9 + DISPLAY_VER(dev_priv) >= 10 @@ expression dev_priv, E; @@ ( - DISPLAY_VER(dev_priv) >= 10 && E + (DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv)) && E | - DISPLAY_VER(dev_priv) >= 10 + DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv) | - IS_DISPLAY_RANGE(dev_priv, 10, E) + IS_DISPLAY_RANGE(dev_priv, 11, E) || IS_CANNONLAKE(dev_priv) ) @@ expression dev_priv, E, E2; @@ ( - (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) + IS_DISPLAY_VER(dev_priv, 10) | - E || IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv) + E || IS_DISPLAY_VER(dev_priv, 10) | - (IS_GEMINILAKE(dev_priv) || IS_CANNONLAKE(dev_priv)) + IS_DISPLAY_VER(dev_priv, 10) | - IS_GEMINILAKE(dev_priv) || E || IS_CANNONLAKE(dev_priv) + E || IS_DISPLAY_VER(dev_priv, 10) | - E || IS_GEMINILAKE(dev_priv) || E2 || IS_CANNONLAKE(dev_priv) + E || E2 || IS_DISPLAY_VER(dev_priv, 10) | - (IS_DISPLAY_VER(dev_priv, 10) || IS_GEMINILAKE(dev_priv)) + IS_DISPLAY_VER(dev_priv, 10) | - (IS_GEMINILAKE(dev_priv) || IS_DISPLAY_VER(dev_priv, 10)) + IS_DISPLAY_VER(dev_priv, 10) ) @@ expression dev_priv; @@ - (IS_DISPLAY_VER(dev_priv, 9) && !IS_GEMINILAKE(dev_priv)) + IS_DISPLAY_VER(dev_priv, 9) @@ expression dev_priv; @@ ( - !(DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10)) + DISPLAY_VER(dev_priv) < 10 | - (DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10)) + DISPLAY_VER(dev_priv) >= 10 ) @@ expression dev_priv, E; @@ - E || DISPLAY_VER(dev_priv) >= 11 || IS_DISPLAY_VER(dev_priv, 10) + E || DISPLAY_VER(dev_priv) >= 10 @@ expression dev_priv, E; @@ - (IS_DISPLAY_RANGE(dev_priv, 11, E) || IS_DISPLAY_VER(dev_priv, 10)) + IS_DISPLAY_RANGE(dev_priv, 10, E) @@ expression dev_priv; @@ ( - DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv) || IS_GEN9_LP(dev_priv) + DISPLAY_VER(dev_priv) >= 10 || IS_GEN9_LP(dev_priv) | - IS_GEN9_LP(dev_priv) || DISPLAY_VER(dev_priv) >= 11 || IS_CANNONLAKE(dev_priv) + IS_GEN9_LP(dev_priv) || DISPLAY_VER(dev_priv) >= 10 ) @@ expression dev_priv, E; @@ - !(DISPLAY_VER(dev_priv) >= E) + DISPLAY_VER(dev_priv) < E v2: - Convert gen10 conditions that don't include GLK into CNL conditions. (Ville) v3: - Rework coccinelle rules so that "ver>=10" turns into "ver>=11||is_cnl." (Ville) v3.1: - Manually re-add the ".display.version = 10" to glk_info after regenerating patch via Coccinelle. v4: - Also apply cocci rules to intel_pm.c and i915_irq.c! (CI) Cc: Ville Syrjälä Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210322233840.4056851-1-matthew.d.roper@intel.com commit 373abf1a17c0fa74491feb66692d1c76f6eb6b16 Author: Matt Roper Date: Fri Mar 19 21:42:44 2021 -0700 drm/i915: Convert INTEL_GEN() to DISPLAY_VER() as appropriate in i915_irq.c Convert the display-specific usage of INTEL_GEN, while leaving the non-display usage as-is for now. In the near-future we'll probably want to think about moving display interrupt handling to its own file under the display/ directory. v2: - Use new IS_DISPLAY_VER() macro. Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210320044245.3920043-6-matthew.d.roper@intel.com commit 7dadd28688eca3d42a7087091438fc83dd3f08cd Author: Matt Roper Date: Fri Mar 19 21:42:43 2021 -0700 drm/i915: Convert INTEL_GEN() to DISPLAY_VER() as appropriate in intel_pm.c Although most of the code in this file is display-related (watermarks), there's some functions that are not (e.g., clock gating). Thus we need to do the conversions to DISPLAY_VER() manually here rather than using Coccinelle. In the near-future we'll probably want to think about moving watermark logic out of intel_pm.c and into watermark-specific files under the display/ directory. v2: - Use new IS_DISPLAY_VER macro where appropriate. Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210320044245.3920043-5-matthew.d.roper@intel.com commit 005e95377249cb65133bf698926d0ab7876dddc3 Author: Matt Roper Date: Fri Mar 19 21:42:42 2021 -0700 drm/i915/display: Eliminate most usage of INTEL_GEN() Use Coccinelle to convert most of the usage of INTEL_GEN() and IS_GEN() in the display code to use DISPLAY_VER() comparisons instead. The following semantic patch was used: @@ expression dev_priv, E; @@ - INTEL_GEN(dev_priv) == E + IS_DISPLAY_VER(dev_priv, E) @@ expression dev_priv; @@ - INTEL_GEN(dev_priv) + DISPLAY_VER(dev_priv) @@ expression dev_priv; expression E; @@ - IS_GEN(dev_priv, E) + IS_DISPLAY_VER(dev_priv, E) @@ expression dev_priv; expression from, until; @@ - IS_GEN_RANGE(dev_priv, from, until) + IS_DISPLAY_RANGE(dev_priv, from, until) There are still some display-related uses of INTEL_GEN() in intel_pm.c (watermark code) and i915_irq.c. Those will be updated separately. v2: - Use new IS_DISPLAY_RANGE and IS_DISPLAY_VER helpers. (Jani) Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210320044245.3920043-4-matthew.d.roper@intel.com commit 01eb15c9165e4169c8637703b025371586d27fbb Author: Matt Roper Date: Fri Mar 19 21:42:41 2021 -0700 drm/i915: Add DISPLAY_VER() and related macros Although we've long referred to platforms by a single "GEN" number, the hardware teams have recommended that we stop doing this since the various component IP blocks are going to start using independent number schemes with varying cadence. To support this, hardware platforms a bit down the road are going to start providing MMIO registers that the driver can read to obtain the "graphics version," "media version," and "display version" without needing to do a PCI ID -> platform -> version translation. Although our current platforms don't yet expose these registers (and the next couple we release probably won't have them yet either), the hardware teams would still like to see us move to this independent numbering scheme now in preparation. For i915 that means we should try to eliminate all usage of INTEL_GEN() throughout our code and instead replace it with separate GRAPHICS_VER(), MEDIA_VER(), and DISPLAY_VER() constructs in the code. For old platforms, these will all usually give the same value for each IP block (aside from a few special cases like GLK which we can no more accurately represent as graphics=9 + display=10), but future platforms will have more flexibility to bump IP version numbers independently. The upcoming ADL-P platform will have a display version of 13 and a graphics version of 12, so let's just the first step of breaking out DISPLAY_VER(), but leaving the rest of INTEL_GEN() untouched for now. For now we'll automatically derive the display version from the platform's INTEL_GEN() value except in cases where an alternative display version is explicitly provided in the device info structure. We also add some helper macros IS_DISPLAY_VER(i915, ver) and IS_DISPLAY_RANGE(i915, from, until) that match the behavior of the existing gen-based macros. However unlike IS_GEN(), we will implement those macros with direct comparisons rather than trying to maintain a mask to help compiler optimization. In practice the optimization winds up not being used in very many places (since the vast majority of our platform checks are of the form "gen >= x") so there is pretty minimal size reduction in the final driver binary[1]. We're also likely going to need to extend these version numbers to non-integer major.minor values at some point in the future, so the mask approach won't work at all once we get to platforms like that. [1] The results before/after the next patch in this series, which switches our code over to the new display macros: $ size i915.ko.{orig,new} text data bss dec hex filename 2940291 102944 5384 3048619 2e84ab i915.ko.orig 2940723 102956 5384 3049063 2e8667 i915.ko.new v2: - Move version into device info's display sub-struct. (Jani) - Add extra parentheses to macros. (Jani) - Note the lack of genmask optimization in the display-based macros and give size data. (Lucas) Cc: Jani Nikula Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210320044245.3920043-3-matthew.d.roper@intel.com commit d47d29a622b605b8811617162ae5cc886f9123de Author: Matt Roper Date: Fri Mar 19 21:42:40 2021 -0700 drm/i915/display: Convert gen5/gen6 tests to IS_IRONLAKE/IS_SANDYBRIDGE ILK is the only platform that we consider "gen5" and SNB is the only platform we consider "gen6." Add an IS_SANDYBRIDGE() macro and then replace numeric platform tests for these two generations with direct platform tests with the following Coccinelle semantic patch: @@ expression dev_priv; @@ - IS_GEN(dev_priv, 5) + IS_IRONLAKE(dev_priv) @@ expression dev_priv; @@ - IS_GEN(dev_priv, 6) + IS_SANDYBRIDGE(dev_priv) @@ expression dev_priv; @@ - IS_GEN_RANGE(dev_priv, 5, 6) + IS_IRONLAKE(dev_priv) || IS_SANDYBRIDGE(dev_priv) This will simplify our upcoming patches which eliminate INTEL_GEN() usage in the display code. v2: - Reverse ilk/snb order for IS_GEN_RANGE conversion. (Ville) - Rebase + regenerate from semantic patch Signed-off-by: Matt Roper Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210320044245.3920043-2-matthew.d.roper@intel.com commit 2ffdc2c34421561c12f843e497dd7ce898478c0f Author: Borislav Petkov Date: Sat Mar 13 17:13:29 2021 +0100 x86/mce/inject: Add IPID for injection too Add an injection file in order to specify the IPID too when injecting an error. One use case example is using the machinery to decode MCEs collected from other machines. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210314201806.12798-1-bp@alien8.de commit f89c0a87b4066fbb0dc6f8039b211bd79a9ab663 Merge: dfb81e3b5f47a a908a716696ee Author: Mark Brown Date: Tue Mar 23 22:13:35 2021 +0000 Merge tag 'ib-mfd-extcon-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into asoc-5.13 Immutable branch between MFD and Extcon due for the v5.13 merge window commit c692a0be82bb26b0d13ea98e7003cd01e448189b Merge: 65d2dbb300197 e4bd44e89dcf3 Author: David S. Miller Date: Tue Mar 23 14:49:06 2021 -0700 Merge branch 'bridge-dsa-sandwiched-LAG' Vladimir Oltean says: ==================== Better support for sandwiched LAGs with bridge and DSA Changes in v4: - Added missing EXPORT_SYMBOL_GPL - Using READ_ONCE(fdb->dst) - Split patches into (a) adding the bridge helpers (b) making DSA use them - br_mdb_replay went back to the v1 approach where it allocated memory in atomic context - Created a br_switchdev_mdb_populate which reduces some of the code duplication - Fixed the error message in dsa_port_clear_brport_flags - Replaced "dsa_port_vlan_filtering(dp, br, extack)" with "dsa_port_vlan_filtering(dp, br_vlan_enabled(br), extack)" (duh) - Added review tags (sorry if I missed any) The objective of this series is to make LAG uppers on top of switchdev ports work regardless of which order we link interfaces to their masters (first make the port join the LAG, then the LAG join the bridge, or the other way around). There was a design decision to be made in patches 2-4 on whether we should adopt the "push" model (which attempts to solve the problem centrally, in the bridge layer) where the driver just calls: switchdev_bridge_port_offloaded(brport_dev, &atomic_notifier_block, &blocking_notifier_block, extack); and the bridge just replays the entire collection of switchdev port attributes and objects that it has, in some predefined order and with some predefined error handling logic; or the "pull" model (which attempts to solve the problem by giving the driver the rope to hang itself), where the driver, apart from calling: switchdev_bridge_port_offloaded(brport_dev, extack); has the task of "dumpster diving" (as Tobias puts it) through the bridge attributes and objects by itself, by calling: - br_vlan_replay - br_fdb_replay - br_mdb_replay - br_vlan_enabled - br_port_flag_is_set - br_port_get_stp_state - br_multicast_router - br_get_ageing_time (not necessarily all of them, and not necessarily in this order, and with driver-defined error handling). Even though I'm not in love myself with the "pull" model, I chose it because there is a fundamental trick with replaying switchdev events like this: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 <- this will replay the objects once for the bond0 bridge port, and the swp0 switchdev port will process them ip link set swp1 master bond0 <- this will replay the objects again for the bond0 bridge port, and the swp1 switchdev port will see them, but swp0 will see them for the second time now Basically I believe that it is implementation defined whether the driver wants to error out on switchdev objects seen twice on a port, and the bridge should not enforce a certain model for that. For example, for FDB entries added to a bonding interface, the underling switchdev driver might have an abstraction for just that: an FDB entry pointing towards a logical (as opposed to physical) port. So when the second port joins the bridge, it doesn't realy need to replay FDB entries, since there is already at least one hardware port which has been receiving those events, and the FDB entries don't need to be added a second time to the same logical port. In the other corner, we have the drivers that handle switchdev port attributes on a LAG as individual switchdev port attributes on physical ports (example: VLAN filtering). In fact, the switchdev_handle_port_attr_set helper facilitates this: it is a fan-out from a single orig_dev towards multiple lowers that pass the check_cb(). But that's the point: switchdev_handle_port_attr_set is just a helper which the driver _opts_ to use. The bridge can't enforce the "push" model, because that would assume that all drivers handle port attributes in the same way, which is probably false. For this reason, I preferred to go with the "pull" mode for this patch set. Just to see how bad it is for other switchdev drivers to copy-paste this logic, I added the pull support to ocelot too, and I think it's pretty manageable. ==================== Signed-off-by: David S. Miller commit e4bd44e89dcf37345e4851c5e775cb5abf38ab62 Author: Vladimir Oltean Date: Tue Mar 23 01:51:52 2021 +0200 net: ocelot: replay switchdev events when joining bridge The premise of this change is that the switchdev port attributes and objects offloaded by ocelot might have been missed when we are joining an already existing bridge port, such as a bonding interface. The patch pulls these switchdev attributes and objects from the bridge, on behalf of the 'bridge port' net device which might be either the ocelot switch interface, or the bonding upper interface. The ocelot_net.c belongs strictly to the switchdev ocelot driver, while ocelot.c is part of a library shared with the DSA felix driver. The ocelot_port_bridge_leave function (part of the common library) used to call ocelot_port_vlan_filtering(false), something which is not necessary for DSA, since the framework deals with that already there. So we move this function to ocelot_switchdev_unsync, which is specific to the switchdev driver. The code movement described above makes ocelot_port_bridge_leave no longer return an error code, so we change its type from int to void. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 81ef35e7619a04b902ca457d60594f956154b9f2 Author: Vladimir Oltean Date: Tue Mar 23 01:51:51 2021 +0200 net: ocelot: call ocelot_netdevice_bridge_join when joining a bridged LAG Similar to the DSA situation, ocelot supports LAG offload but treats this scenario improperly: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 We do the same thing as we do there, which is to simulate a 'bridge join' on 'lag join', if we detect that the bonding upper has a bridge upper. Again, same as DSA, ocelot supports software fallback for LAG, and in that case, we should avoid calling ocelot_netdevice_changeupper. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 010e269f91be8fc1436c753bfbbd9ce561151e71 Author: Vladimir Oltean Date: Tue Mar 23 01:51:50 2021 +0200 net: dsa: sync up switchdev objects and port attributes when joining the bridge If we join an already-created bridge port, such as a bond master interface, then we can miss the initial switchdev notifications emitted by the bridge for this port, while it wasn't offloaded by anybody. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5961d6a12c13df834343e56e37672169fe88756b Author: Vladimir Oltean Date: Tue Mar 23 01:51:49 2021 +0200 net: dsa: inherit the actual bridge port flags at join time DSA currently assumes that the bridge port starts off with this constellation of bridge port flags: - learning on - unicast flooding on - multicast flooding on - broadcast flooding on just by virtue of code copy-pasta from the bridge layer (new_nbp). This was a simple enough strategy thus far, because the 'bridge join' moment always coincided with the 'bridge port creation' moment. But with sandwiched interfaces, such as: br0 | bond0 | swp0 it may happen that the user has had time to change the bridge port flags of bond0 before enslaving swp0 to it. In that case, swp0 will falsely assume that the bridge port flags are those determined by new_nbp, when in fact this can happen: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 ip link set bond0 type bridge_slave learning off ip link set swp0 master br0 Now swp0 has learning enabled, bond0 has learning disabled. Not nice. Fix this by "dumpster diving" through the actual bridge port flags with br_port_flag_is_set, at bridge join time. We use this opportunity to split dsa_port_change_brport_flags into two distinct functions called dsa_port_inherit_brport_flags and dsa_port_clear_brport_flags, now that the implementation for the two cases is no longer similar. This patch also creates two functions called dsa_port_switchdev_sync and dsa_port_switchdev_unsync which collect what we have so far, even if that's asymmetrical. More is going to be added in the next patch. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2afc526ab342899445fb929af610285e0bbc69a9 Author: Vladimir Oltean Date: Tue Mar 23 01:51:48 2021 +0200 net: dsa: pass extack to dsa_port_{bridge,lag}_join This is a pretty noisy change that was broken out of the larger change for replaying switchdev attributes and objects at bridge join time, which is when these extack objects are actually used. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 185c9a760a61b034abb01a2dac8174b7da6e7ce4 Author: Vladimir Oltean Date: Tue Mar 23 01:51:47 2021 +0200 net: dsa: call dsa_port_bridge_join when joining a LAG that is already in a bridge DSA can properly detect and offload this sequence of operations: ip link add br0 type bridge ip link add bond0 type bond ip link set swp0 master bond0 ip link set bond0 master br0 But not this one: ip link add br0 type bridge ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 Actually the second one is more complicated, due to the elapsed time between the enslavement of bond0 and the offloading of it via swp0, a lot of things could have happened to the bond0 bridge port in terms of switchdev objects (host MDBs, VLANs, altered STP state etc). So this is a bit of a can of worms, and making sure that the DSA port's state is in sync with this already existing bridge port is handled in the next patches. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 22f67cdfae6aaa7e841ced17207391fb368c8e9e Author: Vladimir Oltean Date: Tue Mar 23 01:51:46 2021 +0200 net: bridge: add helper to replay VLANs installed on port Currently this simple setup with DSA: ip link add br0 type bridge vlan_filtering 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 will not work because the bridge has created the PVID in br_add_if -> nbp_vlan_init, and it has notified switchdev of the existence of VLAN 1, but that was too early, since swp0 was not yet a lower of bond0, so it had no reason to act upon that notification. We need a helper in the bridge to replay the switchdev VLAN objects that were notified since the bridge port creation, because some of them may have been missed. As opposed to the br_mdb_replay function, the vg->vlan_list write side protection is offered by the rtnl_mutex which is sleepable, so we don't need to queue up the objects in atomic context, we can replay them right away. Signed-off-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 04846f903b53b32d29453e865646309db29f255a Author: Vladimir Oltean Date: Tue Mar 23 01:51:45 2021 +0200 net: bridge: add helper to replay port and local fdb entries When a switchdev port starts offloading a LAG that is already in a bridge and has an FDB entry pointing to it: ip link set bond0 master br0 bridge fdb add dev bond0 00:01:02:03:04:05 master static ip link set swp0 master bond0 the switchdev driver will have no idea that this FDB entry is there, because it missed the switchdev event emitted at its creation. Ido Schimmel pointed this out during a discussion about challenges with switchdev offloading of stacked interfaces between the physical port and the bridge, and recommended to just catch that condition and deny the CHANGEUPPER event: https://lore.kernel.org/netdev/20210210105949.GB287766@shredder.lan/ But in fact, we might need to deal with the hard thing anyway, which is to replay all FDB addresses relevant to this port, because it isn't just static FDB entries, but also local addresses (ones that are not forwarded but terminated by the bridge). There, we can't just say 'oh yeah, there was an upper already so I'm not joining that'. So, similar to the logic for replaying MDB entries, add a function that must be called by individual switchdev drivers and replays local FDB entries as well as ones pointing towards a bridge port. This time, we use the atomic switchdev notifier block, since that's what FDB entries expect for some reason. Reported-by: Ido Schimmel Signed-off-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 4f2673b3a2b6246729a1ff13b8945a040839dbd3 Author: Vladimir Oltean Date: Tue Mar 23 01:51:44 2021 +0200 net: bridge: add helper to replay port and host-joined mdb entries I have a system with DSA ports, and udhcpcd is configured to bring interfaces up as soon as they are created. I create a bridge as follows: ip link add br0 type bridge As soon as I create the bridge and udhcpcd brings it up, I also have avahi which automatically starts sending IPv6 packets to advertise some local services, and because of that, the br0 bridge joins the following IPv6 groups due to the code path detailed below: 33:33:ff:6d:c1:9c vid 0 33:33:00:00:00:6a vid 0 33:33:00:00:00:fb vid 0 br_dev_xmit -> br_multicast_rcv -> br_ip6_multicast_add_group -> __br_multicast_add_group -> br_multicast_host_join -> br_mdb_notify This is all fine, but inside br_mdb_notify we have br_mdb_switchdev_host hooked up, and switchdev will attempt to offload the host joined groups to an empty list of ports. Of course nobody offloads them. Then when we add a port to br0: ip link set swp0 master br0 the bridge doesn't replay the host-joined MDB entries from br_add_if, and eventually the host joined addresses expire, and a switchdev notification for deleting it is emitted, but surprise, the original addition was already completely missed. The strategy to address this problem is to replay the MDB entries (both the port ones and the host joined ones) when the new port joins the bridge, similar to what vxlan_fdb_replay does (in that case, its FDB can be populated and only then attached to a bridge that you offload). However there are 2 possibilities: the addresses can be 'pushed' by the bridge into the port, or the port can 'pull' them from the bridge. Considering that in the general case, the new port can be really late to the party, and there may have been many other switchdev ports that already received the initial notification, we would like to avoid delivering duplicate events to them, since they might misbehave. And currently, the bridge calls the entire switchdev notifier chain, whereas for replaying it should just call the notifier block of the new guy. But the bridge doesn't know what is the new guy's notifier block, it just knows where the switchdev notifier chain is. So for simplification, we make this a driver-initiated pull for now, and the notifier block is passed as an argument. To emulate the calling context for mdb objects (deferred and put on the blocking notifier chain), we must iterate under RCU protection through the bridge's mdb entries, queue them, and only call them once we're out of the RCU read-side critical section. There was some opportunity for reuse between br_mdb_switchdev_host_port, br_mdb_notify and the newly added br_mdb_queue_one in how the switchdev mdb object is created, so a helper was created. Suggested-by: Ido Schimmel Signed-off-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit f1d42ea10056b9050d1c5b8e19995f66c30aeded Author: Vladimir Oltean Date: Tue Mar 23 01:51:43 2021 +0200 net: bridge: add helper to retrieve the current ageing time The SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME attribute is only emitted from: sysfs/ioctl/netlink -> br_set_ageing_time -> __set_ageing_time therefore not at bridge port creation time, so: (a) switchdev drivers have to hardcode the initial value for the address ageing time, because they didn't get any notification (b) that hardcoded value can be out of sync, if the user changes the ageing time before enslaving the port to the bridge We need a helper in the bridge, such that switchdev drivers can query the current value of the bridge ageing time when they start offloading it. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Tobias Waldekranz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit c0e715bbd50e57319f76d0b757dc282893f2d476 Author: Vladimir Oltean Date: Tue Mar 23 01:51:42 2021 +0200 net: bridge: add helper for retrieving the current bridge port STP state It may happen that we have the following topology with DSA or any other switchdev driver with LAG offload: ip link add br0 type bridge stp_state 1 ip link add bond0 type bond ip link set bond0 master br0 ip link set swp0 master bond0 ip link set swp1 master bond0 STP decides that it should put bond0 into the BLOCKING state, and that's that. The ports that are actively listening for the switchdev port attributes emitted for the bond0 bridge port (because they are offloading it) and have the honor of seeing that switchdev port attribute can react to it, so we can program swp0 and swp1 into the BLOCKING state. But if then we do: ip link set swp2 master bond0 then as far as the bridge is concerned, nothing has changed: it still has one bridge port. But this new bridge port will not see any STP state change notification and will remain FORWARDING, which is how the standalone code leaves it in. We need a function in the bridge driver which retrieves the current STP state, such that drivers can synchronize to it when they may have missed switchdev events. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Tobias Waldekranz Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit ad1ce1ab061e7d1044bac4cd97b47089f0215ae6 Author: Lee Jones Date: Thu Mar 18 10:40:36 2021 +0000 of: of_reserved_mem: Demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/of/of_reserved_mem.c:53: warning: Function parameter or member 'node' not described in 'fdt_reserved_mem_save_node' drivers/of/of_reserved_mem.c:53: warning: Function parameter or member 'uname' not described in 'fdt_reserved_mem_save_node' drivers/of/of_reserved_mem.c:53: warning: Function parameter or member 'base' not described in 'fdt_reserved_mem_save_node' drivers/of/of_reserved_mem.c:53: warning: Function parameter or member 'size' not described in 'fdt_reserved_mem_save_node' drivers/of/of_reserved_mem.c:76: warning: Function parameter or member 'node' not described in '__reserved_mem_alloc_size' drivers/of/of_reserved_mem.c:76: warning: Function parameter or member 'uname' not described in '__reserved_mem_alloc_size' drivers/of/of_reserved_mem.c:76: warning: Function parameter or member 'res_base' not described in '__reserved_mem_alloc_size' drivers/of/of_reserved_mem.c:76: warning: Function parameter or member 'res_size' not described in '__reserved_mem_alloc_size' drivers/of/of_reserved_mem.c:171: warning: Function parameter or member 'rmem' not described in '__reserved_mem_init_node' Cc: Rob Herring Cc: Frank Rowand Cc: Marek Szyprowski Cc: Josh Cartwright Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-11-lee.jones@linaro.org commit f957d5b78a0dd95920644682e995992277773efb Author: Lee Jones Date: Thu Mar 18 10:40:35 2021 +0000 of: overlay: Fix function name disparity Fixes the following W=1 kernel build warning(s): drivers/of/overlay.c:147: warning: expecting prototype for of_overlay_notifier_register(). Prototype was for of_overlay_notifier_unregister() instead Cc: Pantelis Antoniou Cc: Frank Rowand Cc: Rob Herring Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-10-lee.jones@linaro.org commit 1a7d706d8e2825993e2d82b4b0a3843912ba6bfe Author: Lee Jones Date: Thu Mar 18 10:40:34 2021 +0000 of: of_net: Provide function name and param description Fixes the following W=1 kernel build warning(s): drivers/of/of_net.c:104: warning: Function parameter or member 'np' not described in 'of_get_mac_address' drivers/of/of_net.c:104: warning: expecting prototype for mac(). Prototype was for of_get_mac_address() instead Cc: Andrew Lunn Cc: Heiner Kallweit Cc: Russell King Cc: Rob Herring Cc: Frank Rowand Cc: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Andrew Lunn Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-9-lee.jones@linaro.org commit a300dc865b777756d3c0e7631db9aea7beb60f52 Author: Lee Jones Date: Thu Mar 18 10:40:33 2021 +0000 of: fdt: Demote kernel-doc abuses and fix function naming Fixes the following W=1 kernel build warning(s): drivers/of/fdt.c:478: warning: Function parameter or member 'node' not described in '__reserved_mem_reserve_reg' drivers/of/fdt.c:478: warning: Function parameter or member 'uname' not described in '__reserved_mem_reserve_reg' drivers/of/fdt.c:525: warning: Function parameter or member 'node' not described in '__reserved_mem_check_root' drivers/of/fdt.c:547: warning: Function parameter or member 'node' not described in '__fdt_scan_reserved_mem' drivers/of/fdt.c:547: warning: Function parameter or member 'uname' not described in '__fdt_scan_reserved_mem' drivers/of/fdt.c:547: warning: Function parameter or member 'depth' not described in '__fdt_scan_reserved_mem' drivers/of/fdt.c:547: warning: Function parameter or member 'data' not described in '__fdt_scan_reserved_mem' drivers/of/fdt.c:547: warning: expecting prototype for fdt_scan_reserved_mem(). Prototype was for __fdt_scan_reserved_mem() instead drivers/of/fdt.c:663: warning: Function parameter or member 'parent' not described in 'of_scan_flat_dt_subnodes' drivers/of/fdt.c:708: warning: Function parameter or member 'node' not described in 'of_get_flat_dt_prop' drivers/of/fdt.c:708: warning: Function parameter or member 'name' not described in 'of_get_flat_dt_prop' drivers/of/fdt.c:708: warning: Function parameter or member 'size' not described in 'of_get_flat_dt_prop' drivers/of/fdt.c:758: warning: Function parameter or member 'node' not described in 'of_flat_dt_match' drivers/of/fdt.c:758: warning: Function parameter or member 'compat' not described in 'of_flat_dt_match' drivers/of/fdt.c:778: warning: Function parameter or member 'node' not described in 'of_get_flat_dt_phandle' drivers/of/fdt.c:778: warning: expecting prototype for of_get_flat_dt_prop(). Prototype was for of_get_flat_dt_phandle() instead drivers/of/fdt.c:955: warning: Function parameter or member 'node' not described in 'early_init_dt_scan_root' drivers/of/fdt.c:955: warning: Function parameter or member 'uname' not described in 'early_init_dt_scan_root' drivers/of/fdt.c:955: warning: Function parameter or member 'depth' not described in 'early_init_dt_scan_root' drivers/of/fdt.c:955: warning: Function parameter or member 'data' not described in 'early_init_dt_scan_root' drivers/of/fdt.c:991: warning: Function parameter or member 'node' not described in 'early_init_dt_scan_memory' drivers/of/fdt.c:991: warning: Function parameter or member 'uname' not described in 'early_init_dt_scan_memory' drivers/of/fdt.c:991: warning: Function parameter or member 'depth' not described in 'early_init_dt_scan_memory' drivers/of/fdt.c:991: warning: Function parameter or member 'data' not described in 'early_init_dt_scan_memory' Cc: Rob Herring Cc: Frank Rowand Cc: benh@kernel.crashing.org Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-8-lee.jones@linaro.org commit 45f2933b81ccb6a08261df8504f4470da30697f8 Author: Lee Jones Date: Thu Mar 18 10:40:32 2021 +0000 of: address: Provide descriptions for 'of_address_to_resource's params Fixes the following W=1 kernel build warning(s): drivers/of/address.c:868: warning: Function parameter or member 'dev' not described in 'of_address_to_resource' drivers/of/address.c:868: warning: Function parameter or member 'index' not described in 'of_address_to_resource' drivers/of/address.c:868: warning: Function parameter or member 'r' not described in 'of_address_to_resource' Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-7-lee.jones@linaro.org commit 3915fed9236566d364fecce863fcc922134615b7 Author: Lee Jones Date: Thu Mar 18 10:40:31 2021 +0000 of: property: Provide missing member description and remove excess param Fixes the following W=1 kernel build warning(s): drivers/of/property.c:1239: warning: Function parameter or member 'optional' not described in 'supplier_bindings' drivers/of/property.c:1366: warning: Excess function parameter 'dev' description in 'of_link_property' Cc: Rob Herring Cc: Frank Rowand Cc: "David S. Miller" Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-6-lee.jones@linaro.org commit 3637d49e11219512920aca8b8ccd0994be33fa8b Author: Lee Jones Date: Thu Mar 18 10:40:30 2021 +0000 of: base: Fix some formatting issues and provide missing descriptions Fixes the following W=1 kernel build warning(s): drivers/of/base.c:315: warning: Function parameter or member 'cpun' not described in '__of_find_n_match_cpu_property' drivers/of/base.c:315: warning: Function parameter or member 'prop_name' not described in '__of_find_n_match_cpu_property' drivers/of/base.c:315: warning: Function parameter or member 'cpu' not described in '__of_find_n_match_cpu_property' drivers/of/base.c:315: warning: Function parameter or member 'thread' not described in '__of_find_n_match_cpu_property' drivers/of/base.c:315: warning: expecting prototype for property holds the physical id of the(). Prototype was for __of_find_n_match_cpu_property() instead drivers/of/base.c:1139: warning: Function parameter or member 'match' not described in 'of_find_matching_node_and_match' drivers/of/base.c:1779: warning: Function parameter or member 'np' not described in '__of_add_property' drivers/of/base.c:1779: warning: Function parameter or member 'prop' not described in '__of_add_property' drivers/of/base.c:1800: warning: Function parameter or member 'np' not described in 'of_add_property' drivers/of/base.c:1800: warning: Function parameter or member 'prop' not described in 'of_add_property' drivers/of/base.c:1849: warning: Function parameter or member 'np' not described in 'of_remove_property' drivers/of/base.c:1849: warning: Function parameter or member 'prop' not described in 'of_remove_property' drivers/of/base.c:2137: warning: Function parameter or member 'dn' not described in 'of_console_check' drivers/of/base.c:2137: warning: Function parameter or member 'name' not described in 'of_console_check' drivers/of/base.c:2137: warning: Function parameter or member 'index' not described in 'of_console_check' Cc: Rob Herring Cc: Frank Rowand Cc: "David S. Miller" Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-5-lee.jones@linaro.org commit f3896a7eb7451d70de515c28849a62409f356fdb Author: Lee Jones Date: Thu Mar 18 10:40:29 2021 +0000 of: platform: Demote kernel-doc abuse Fixes the following W=1 kernel build warning(s): drivers/of/platform.c:298: warning: Function parameter or member 'lookup' not described in 'of_dev_lookup' drivers/of/platform.c:298: warning: Function parameter or member 'np' not described in 'of_dev_lookup' Cc: Rob Herring Cc: Frank Rowand Cc: Kees Cook Cc: Anton Vorontsov Cc: Colin Cross Cc: Tony Luck Cc: benh@kernel.crashing.org Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-4-lee.jones@linaro.org commit 3cb025d935d2a1039e7f6c040aa1438caa32fe1d Author: Lee Jones Date: Thu Mar 18 10:40:28 2021 +0000 of: dynamic: Fix incorrect parameter name and provide missing descriptions Fixes the following W=1 kernel build warning(s): drivers/of/dynamic.c:234: warning: Function parameter or member 'np' not described in 'of_attach_node' drivers/of/dynamic.c:286: warning: Function parameter or member 'np' not described in 'of_detach_node' drivers/of/dynamic.c:326: warning: Function parameter or member 'kobj' not described in 'of_node_release' drivers/of/dynamic.c:326: warning: Excess function parameter 'kref' description in 'of_node_release' Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-3-lee.jones@linaro.org commit cb61e9dbeee9b3c9dea1a4db7d873db345deb8c0 Author: Lee Jones Date: Thu Mar 18 10:40:27 2021 +0000 of: device: Fix function name in header and provide missing descriptions Fixes the following W=1 kernel build warning(s): drivers/of/device.c:72: warning: expecting prototype for of_dma_configure(). Prototype was for of_dma_configure_id() instead drivers/of/device.c:263: warning: Function parameter or member 'dev' not described in 'of_device_modalias' drivers/of/device.c:263: warning: Function parameter or member 'str' not described in 'of_device_modalias' drivers/of/device.c:263: warning: Function parameter or member 'len' not described in 'of_device_modalias' drivers/of/device.c:280: warning: Function parameter or member 'dev' not described in 'of_device_uevent' drivers/of/device.c:280: warning: Function parameter or member 'env' not described in 'of_device_uevent' Cc: Rob Herring Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210318104036.3175910-2-lee.jones@linaro.org commit c6055550529d9c22228210e52a36a00ccb333c17 Author: Shubhrajyoti Datta Date: Mon Mar 8 20:36:03 2021 +0530 dt-bindings: i2c: xiic: Fix a typo Trivial fix. Correct a typo. Fixes: f86ca4147976 ("dt-bindings: i2c: xiic: Migrate i2c-xiic documentation to YAML") Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1615215963-1042-1-git-send-email-shubhrajyoti.datta@xilinx.com Signed-off-by: Rob Herring commit c21563482962738502cee8d39cbbe94acc54d04e Author: Rob Herring Date: Tue Mar 16 13:48:58 2021 -0600 dt-bindings: Drop type references on common properties Users of common properties shouldn't have a type definition as the common schemas already have one. Drop all the unnecessary type references in the tree. A meta-schema update to catch these is pending. Cc: Maxime Ripard Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: Bjorn Andersson Cc: Krzysztof Kozlowski Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Ohad Ben-Cohen Cc: Cheng-Yi Chiang Cc: Benson Leung Cc: Zhang Rui Cc: Daniel Lezcano Cc: Stefan Wahren Cc: Masahiro Yamada Cc: Odelu Kukatla Cc: linux-gpio@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-can@vger.kernel.org Cc: netdev@vger.kernel.org Cc: linux-remoteproc@vger.kernel.org Cc: alsa-devel@alsa-project.org Cc: linux-usb@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Dmity Baryshkov Acked-by: Mark Brown Acked-by: Suman Anna Acked-by: Greg Kroah-Hartman Acked-by: Marc Kleine-Budde Reviewed-by: Srinivas Kandagatla Acked-by: Maxime Ripard Reviewed-by: Nicolas Saenz Julienne Link: https://lore.kernel.org/r/20210316194858.3527845-1-robh@kernel.org commit 28ffe8bf90896105799990572c7fd22365226321 Author: Rob Herring Date: Tue Mar 16 13:49:18 2021 -0600 dt-bindings: Clean-up undocumented compatible strings Adding checks for undocumented compatible strings reveals a bunch of warnings in the DT binding examples. Fix the cases which are typos, just a mismatch between the schema and the example, or aren't documented at all. In a couple of cases, fixing the compatible revealed some schema errors which are fixed. There's a bunch of others remaining after this which have bindings, but those aren't converted to schema yet. Cc: Thierry Reding Cc: Sam Ravnborg Cc: Pavel Machek Cc: linux-clk@vger.kernel.org Cc: dmaengine@vger.kernel.org Cc: linux-i3c@lists.infradead.org Cc: linux-iio@vger.kernel.org Cc: linux-leds@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-spi@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Mark Brown Acked-by: Stephen Boyd Acked-by: Greg Kroah-Hartman Acked-by: Kishon Vijay Abraham I Acked-by: Sebastian Reichel Acked-by: Maxime Ripard Acked-by: Vinod Koul Acked-by: Alexandre Belloni Acked-by: Alain Volmat Acked-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210316194918.3528417-1-robh@kernel.org commit 962e62128feb60df633de93f58e84c9390da060d Author: Rob Herring Date: Tue Mar 16 13:51:11 2021 -0600 dt-bindings: nvmem: use base meta-schema for consumer schema Common consumer schemas need to use the base.yaml meta-schema because they need to define different constraints (e.g. the type) from what users of the common schema need to define (e.g. how many entries). Cc: Srinivas Kandagatla Signed-off-by: Rob Herring Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210316195111.3531755-1-robh@kernel.org commit 383f05515ba51a9d684183bb065a8a92e50ee3f5 Author: Rob Herring Date: Tue Mar 16 13:49:39 2021 -0600 dt-bindings: trivial-devices: Allow 'spi-max-frequency' property Trivial SPI devices can also specify 'spi-max-frequency' properties, so allow it in the trivial devices schema. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210316194939.3529018-1-robh@kernel.org commit 65aa1ed5a608a2c653c0c8a834b916591d168c85 Author: Rob Herring Date: Tue Mar 16 13:48:24 2021 -0600 dt-bindings: More cleanup of standard unit properties Properties with standard unit suffixes already have a type and don't need type references. Fix a few more cases which have gotten added. Cc: Bjorn Andersson Cc: Zhang Rui Cc: Daniel Lezcano Cc: Linus Walleij Cc: Kevin Tsai Cc: linux-iio@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linux-pm@vger.kernel.org Signed-off-by: Rob Herring Acked-by: Dmity Baryshkov Acked-by: Mark Brown Reviewed-by: Luca Ceresoli Acked-by: Sebastian Reichel Acked-by: Jonathan Cameron Acked-by: Dmitry Torokhov Link: https://lore.kernel.org/r/20210316194824.3526913-1-robh@kernel.org commit 3b2dccc6747f8466a28ef95e54e6acfdcf5a5eb9 Author: Viresh Kumar Date: Wed Mar 10 11:05:33 2021 +0530 of: unittest: Statically apply overlays using fdtoverlay Now that fdtoverlay is part of the kernel build, start using it to test the unitest overlays we have by applying them statically. Create two new base files static_base_1.dts and static_base_2.dts which includes other .dtsi files. Some unittest overlays deliberately contain errors that unittest checks for. These overlays will cause fdtoverlay to fail, and are thus not included for static builds. Signed-off-by: Viresh Kumar Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/da6b4e6429aae2e7832a8be2ba2da473d449895b.1615354376.git.viresh.kumar@linaro.org commit d92e2443221018a09535666ada3975d888b8ccfd Author: Viresh Kumar Date: Wed Mar 10 11:05:32 2021 +0530 of: unittest: Create overlay_common.dtsi and testcases_common.dtsi In order to build-test the same unit-test files using fdtoverlay tool, move the device nodes from the existing overlay_base.dts and testcases_common.dts files to .dtsi counterparts. The .dts files now include the new .dtsi files, resulting in exactly the same behavior as earlier. The .dtsi files can now be reused for compile time tests using fdtoverlay (will be done by a later commit). This is required because the base files passed to fdtoverlay tool shouldn't be overlays themselves (i.e. shouldn't have the /plugin/; tag). Note that this commit also moves "testcase-device2" node to testcases.dts from tests-interrupts.dtsi, as this node has a deliberate error in it and is only relevant for runtime testing done with unittest.c. Signed-off-by: Viresh Kumar Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/c3354a042ba34a03fd563061cbaa7fc96cb2d71a.1615354376.git.viresh.kumar@linaro.org commit 15d16d6dadf6947ac7f9a686c615995c5a426ce2 Author: Rob Herring Date: Wed Mar 10 11:05:30 2021 +0530 kbuild: Add generic rule to apply fdtoverlay Add a generic rule to apply fdtoverlay in Makefile.lib, so every platform doesn't need to carry the complex rule. This also automatically adds "DTC_FLAGS_foo_base += -@" for all base files. The platform's Makefile only needs to have this now: foo-dtbs := foo_base.dtb foo_overlay1.dtbo foo_overlay2.dtbo dtb-y := foo.dtb We don't want to run schema checks on foo.dtb (as foo.dts doesn't exist) and the Makefile is updated accordingly. Acked-by: Masahiro Yamada Signed-off-by: Rob Herring Co-developed-by: Viresh Kumar Signed-off-by: Viresh Kumar Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20920b0df6b067aca4040459a9677d7d1d6d766a.1615354376.git.viresh.kumar@linaro.org commit 9ca29e41508e97bec2f45c7f9b79108107d6b3d5 Author: Viresh Kumar Date: Wed Mar 10 11:05:29 2021 +0530 kbuild: Simplify builds with CONFIG_OF_ALL_DTBS We update 'always-y' based on CONFIG_OF_ALL_DTBS three times. It would be far more straight forward if we rather update dtb-y to include all .dtb files if CONFIG_OF_ALL_DTBS is enabled. Acked-by: Masahiro Yamada Signed-off-by: Viresh Kumar Reviewed-by: Frank Rowand Tested-by: Frank Rowand Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/7fe7e5ef6ed75450ddf6c224b8adb53059e504e2.1615354376.git.viresh.kumar@linaro.org commit 3b2e006220dfe5c59ff2fe243aaf01d038c12ccf Author: Rob Herring Date: Thu Mar 11 16:40:42 2021 -0700 dt-bindings: media: Convert video-mux to DT schema Now that we have the graph schema, convert the video-mux binding to DT schema. Cc: Sakari Ailus Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Sakari Ailus Link: https://lore.kernel.org/r/20210311234042.1588310-1-robh@kernel.org commit 8d69f62fddf6c1a8c7745120c4d6aab9322b001a Author: Johannes Hahn Date: Wed Mar 17 08:52:27 2021 +0100 rtc: rx6110: add ACPI bindings to I2C This allows the RX6110 driver to be automatically assigned to the right device on the I2C bus. Signed-off-by: Johannes Hahn Co-developed-by: Claudius Heine Signed-off-by: Claudius Heine Reviewed-by: Andy Shevchenko Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210317075228.683184-1-ch@denx.de commit 65d2dbb300197839eafc4171cfeb57a14c452724 Author: Xie He Date: Sun Mar 21 02:39:35 2021 -0700 net: lapb: Make "lapb_t1timer_running" able to detect an already running timer Problem: The "lapb_t1timer_running" function in "lapb_timer.c" is used in only one place: in the "lapb_kick" function in "lapb_out.c". "lapb_kick" calls "lapb_t1timer_running" to check if the timer is already pending, and if it is not, schedule it to run. However, if the timer has already fired and is running, and is waiting to get the "lapb->lock" lock, "lapb_t1timer_running" will not detect this, and "lapb_kick" will then schedule a new timer. The old timer will then abort when it sees a new timer pending. I think this is not right. The purpose of "lapb_kick" should be ensuring that the actual work of the timer function is scheduled to be done. If the timer function is already running but waiting for the lock, "lapb_kick" should not abort and reschedule it. Changes made: I added a new field "t1timer_running" in "struct lapb_cb" for "lapb_t1timer_running" to use. "t1timer_running" will accurately reflect whether the actual work of the timer is pending. If the timer has fired but is still waiting for the lock, "t1timer_running" will still correctly reflect whether the actual work is waiting to be done. The old "t1timer_stop" field, whose only responsibility is to ask a timer (that is already running but waiting for the lock) to abort, is no longer needed, because the new "t1timer_running" field can fully take over its responsibility. Therefore "t1timer_stop" is deleted. "t1timer_running" is not simply a negation of the old "t1timer_stop". At the end of the timer function, if it does not reschedule itself, "t1timer_running" is set to false to indicate that the timer is stopped. For consistency of the code, I also added "t2timer_running" and deleted "t2timer_stop". Signed-off-by: Xie He Signed-off-by: David S. Miller commit e43d5c7c3c3459b428431754672052503c5db9c8 Author: Rob Herring Date: Thu Mar 11 16:40:56 2021 -0700 dt-bindings: i3c: Fix silvaco,i3c-master-v1 compatible string The example for the Silvaco I3C master doesn't match the schema's compatible string. Fix it. Cc: Miquel Raynal Cc: Conor Culhane Cc: Alexandre Belloni Cc: linux-i3c@lists.infradead.org Signed-off-by: Rob Herring Reviewed-by: Miquel Raynal Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210311234056.1588751-1-robh@kernel.org commit 2c0cb9f56020d2ea006589434d5eb4e702110124 Author: Song Liu Date: Tue Mar 23 17:42:47 2021 -0300 perf test: Add a shell test for 'perf stat --bpf-counters' new option Add a test to compare the output of perf-stat with and without option --bpf-counters. If the difference is more than 10%, the test is considered as failed. Committer testing: # perf test bpf-counters 86: perf stat --bpf-counters test : Ok # perf test -v bpf-counters 86: perf stat --bpf-counters test : --- start --- test child forked, pid 2433339 test child finished with 0 ---- end ---- perf stat --bpf-counters test: Ok # Signed-off-by: Song Liu Requested-by: Arnaldo Carvalho de Melo Tested-by: Arnaldo Carvalho de Melo Acked-by: Namhyung Kim Cc: Jiri Olsa Link: http://lore.kernel.org/lkml/EC00E37D-8587-4662-8E30-7AD5F874FA84@fb.com Signed-off-by: Arnaldo Carvalho de Melo commit 435b46ef1d9fd904089199da16a21ade0701537f Author: Song Liu Date: Tue Mar 16 14:18:36 2021 -0700 perf stat: Measure 't0' and 'ref_time' after enable_counters() Take measurements of 't0' and 'ref_time' after enable_counters(), so that they only measure the time consumed when the counters are enabled. Signed-off-by: Song Liu Acked-by: Andi Kleen Acked-by: Jiri Olsa Acked-by: Namhyung Kim Cc: kernel-team@fb.com Link: http://lore.kernel.org/lkml/20210316211837.910506-3-songliubraving@fb.com Signed-off-by: Arnaldo Carvalho de Melo commit 5fc087ff96fdb4447f9f7e1d8a90c05196cf5ad8 Author: Sven Eckelmann Date: Tue Mar 23 21:52:28 2021 +0100 batman-adv: Drop unused header preempt.h The commit b1de0f01b011 ("batman-adv: Use netif_rx_any_context().") removed the last user for a function declaration from linux/preempt.h. The include should therefore be cleaned up. Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 549750babea10621143eaec2eb58a15537a0a434 Author: Linus Lüssing Date: Tue Mar 23 21:30:07 2021 +0100 batman-adv: Fix order of kernel doc in batadv_priv During the inlining process of kerneldoc in commit 8b84cc4fb556 ("batman-adv: Use inline kernel-doc for enum/struct"), some comments were placed at the wrong struct members. Fixing this by reordering the comments. Signed-off-by: Linus Lüssing Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 7fac83aaf2eecc9e7e7b72da694c49bb4ce7fdfc Author: Song Liu Date: Tue Mar 16 14:18:35 2021 -0700 perf stat: Introduce 'bperf' to share hardware PMCs with BPF The perf tool uses performance monitoring counters (PMCs) to monitor system performance. The PMCs are limited hardware resources. For example, Intel CPUs have 3x fixed PMCs and 4x programmable PMCs per cpu. Modern data center systems use these PMCs in many different ways: system level monitoring, (maybe nested) container level monitoring, per process monitoring, profiling (in sample mode), etc. In some cases, there are more active perf_events than available hardware PMCs. To allow all perf_events to have a chance to run, it is necessary to do expensive time multiplexing of events. On the other hand, many monitoring tools count the common metrics (cycles, instructions). It is a waste to have multiple tools create multiple perf_events of "cycles" and occupy multiple PMCs. bperf tries to reduce such wastes by allowing multiple perf_events of "cycles" or "instructions" (at different scopes) to share PMUs. Instead of having each perf-stat session to read its own perf_events, bperf uses BPF programs to read the perf_events and aggregate readings to BPF maps. Then, the perf-stat session(s) reads the values from these BPF maps. Please refer to the comment before the definition of bperf_ops for the description of bperf architecture. bperf is off by default. To enable it, pass --bpf-counters option to perf-stat. bperf uses a BPF hashmap to share information about BPF programs and maps used by bperf. This map is pinned to bpffs. The default path is /sys/fs/bpf/perf_attr_map. The user could change the path with option --bpf-attr-map. Committer testing: # dmesg|grep "Performance Events" -A5 [ 0.225277] Performance Events: Fam17h+ core perfctr, AMD PMU driver. [ 0.225280] ... version: 0 [ 0.225280] ... bit width: 48 [ 0.225281] ... generic registers: 6 [ 0.225281] ... value mask: 0000ffffffffffff [ 0.225281] ... max period: 00007fffffffffff # # for a in $(seq 6) ; do perf stat -a -e cycles,instructions sleep 100000 & done [1] 2436231 [2] 2436232 [3] 2436233 [4] 2436234 [5] 2436235 [6] 2436236 # perf stat -a -e cycles,instructions sleep 0.1 Performance counter stats for 'system wide': 310,326,987 cycles (41.87%) 236,143,290 instructions # 0.76 insn per cycle (41.87%) 0.100800885 seconds time elapsed # We can see that the counters were enabled for this workload 41.87% of the time. Now with --bpf-counters: # for a in $(seq 32) ; do perf stat --bpf-counters -a -e cycles,instructions sleep 100000 & done [1] 2436514 [2] 2436515 [3] 2436516 [4] 2436517 [5] 2436518 [6] 2436519 [7] 2436520 [8] 2436521 [9] 2436522 [10] 2436523 [11] 2436524 [12] 2436525 [13] 2436526 [14] 2436527 [15] 2436528 [16] 2436529 [17] 2436530 [18] 2436531 [19] 2436532 [20] 2436533 [21] 2436534 [22] 2436535 [23] 2436536 [24] 2436537 [25] 2436538 [26] 2436539 [27] 2436540 [28] 2436541 [29] 2436542 [30] 2436543 [31] 2436544 [32] 2436545 # # ls -la /sys/fs/bpf/perf_attr_map -rw-------. 1 root root 0 Mar 23 14:53 /sys/fs/bpf/perf_attr_map # bpftool map | grep bperf | wc -l 64 # # bpftool map | tail 1265: percpu_array name accum_readings flags 0x0 key 4B value 24B max_entries 1 memlock 4096B 1266: hash name filter flags 0x0 key 4B value 4B max_entries 1 memlock 4096B 1267: array name bperf_fo.bss flags 0x400 key 4B value 8B max_entries 1 memlock 4096B btf_id 996 pids perf(2436545) 1268: percpu_array name accum_readings flags 0x0 key 4B value 24B max_entries 1 memlock 4096B 1269: hash name filter flags 0x0 key 4B value 4B max_entries 1 memlock 4096B 1270: array name bperf_fo.bss flags 0x400 key 4B value 8B max_entries 1 memlock 4096B btf_id 997 pids perf(2436541) 1285: array name pid_iter.rodata flags 0x480 key 4B value 4B max_entries 1 memlock 4096B btf_id 1017 frozen pids bpftool(2437504) 1286: array flags 0x0 key 4B value 32B max_entries 1 memlock 4096B # # bpftool map dump id 1268 | tail value (CPU 21): 8f f3 bc ca 00 00 00 00 80 fd 2a d1 4d 00 00 00 80 fd 2a d1 4d 00 00 00 value (CPU 22): 7e d5 64 4d 00 00 00 00 a4 8a 2e ee 4d 00 00 00 a4 8a 2e ee 4d 00 00 00 value (CPU 23): a7 78 3e 06 01 00 00 00 b2 34 94 f6 4d 00 00 00 b2 34 94 f6 4d 00 00 00 Found 1 element # bpftool map dump id 1268 | tail value (CPU 21): c6 8b d9 ca 00 00 00 00 20 c6 fc 83 4e 00 00 00 20 c6 fc 83 4e 00 00 00 value (CPU 22): 9c b4 d2 4d 00 00 00 00 3e 0c df 89 4e 00 00 00 3e 0c df 89 4e 00 00 00 value (CPU 23): 18 43 66 06 01 00 00 00 5b 69 ed 83 4e 00 00 00 5b 69 ed 83 4e 00 00 00 Found 1 element # bpftool map dump id 1268 | tail value (CPU 21): f2 6e db ca 00 00 00 00 92 67 4c ba 4e 00 00 00 92 67 4c ba 4e 00 00 00 value (CPU 22): dc 8e e1 4d 00 00 00 00 d9 32 7a c5 4e 00 00 00 d9 32 7a c5 4e 00 00 00 value (CPU 23): bd 2b 73 06 01 00 00 00 7c 73 87 bf 4e 00 00 00 7c 73 87 bf 4e 00 00 00 Found 1 element # # perf stat --bpf-counters -a -e cycles,instructions sleep 0.1 Performance counter stats for 'system wide': 119,410,122 cycles 152,105,479 instructions # 1.27 insn per cycle 0.101395093 seconds time elapsed # See? We had the counters enabled all the time. Signed-off-by: Song Liu Reviewed-by: Jiri Olsa Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Cc: kernel-team@fb.com Link: http://lore.kernel.org/lkml/20210316211837.910506-2-songliubraving@fb.com Signed-off-by: Arnaldo Carvalho de Melo commit 4d39c89f0b94bf4a6e1ccf42702e7d80d210a5fd Author: Ingo Molnar Date: Tue Mar 23 17:09:15 2021 +0100 perf tools: Fix various typos in comments Fix ~124 single-word typos and a few spelling errors in the perf tooling code, accumulated over the years. Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210321113734.GA248990@gmail.com Link: http://lore.kernel.org/lkml/20210323160915.GA61903@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 36974daf53888e5eac986517b5ffac5bdd47b74d Author: David E. Box Date: Fri Mar 19 13:18:44 2021 -0700 platform/x86: intel_pmc_core: Ignore GBE LTR on Tiger Lake platforms Due to a HW limitation, the Latency Tolerance Reporting (LTR) value programmed in the Tiger Lake GBE controller is not large enough to allow the platform to enter Package C10, which in turn prevents the platform from achieving its low power target during suspend-to-idle. Ignore the GBE LTR value on Tiger Lake. LTR ignore functionality is currently performed solely by a debugfs write call. Split out the LTR code into its own function that can be called by both the debugfs writer and by this work around. Signed-off-by: David E. Box Reviewed-by: Sasha Neftin Cc: intel-wired-lan@lists.osuosl.org Reviewed-by: Rajneesh Bhardwaj Link: https://lore.kernel.org/r/20210319201844.3305399-2-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit a01be40c6313d3bb6e121820847c6650c358be88 Author: David E. Box Date: Fri Mar 19 13:18:43 2021 -0700 platform/x86: intel_pmc_core: Update Kconfig The intel_pmc_core driver is mostly used as a debugging driver for Intel platforms that support SLPS0 (S0ix). But the driver may also be used to communicate actions to the PMC in order to ensure transition to SLPS0 on some systems and architectures. As such the driver should be built on all platforms it supports. Indicate this in the Kconfig. Also update the list of supported features. Signed-off-by: David E. Box Suggested-by: Mario Limonciello Link: https://lore.kernel.org/r/20210319201844.3305399-1-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 49702bace77db951d9f23c37f7d6647e5b008848 Author: Esteve Varela Colominas Date: Sun Mar 21 19:35:13 2021 +0100 platform/x86: thinkpad_acpi: Correct minor typo Signed-off-by: Esteve Varela Colominas Link: https://lore.kernel.org/r/20210321183512.14551-1-esteve.varela@gmail.com Signed-off-by: Hans de Goede commit e4899ff6a9120ca5dfa82035d51d4d118260be6e Author: kernel test robot Date: Fri Mar 19 13:19:19 2021 +0800 platform/surface: fix semicolon.cocci warnings drivers/platform/surface/surface_dtx.c:651:2-3: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 1d609992832e ("platform/surface: Add DTX driver") CC: Maximilian Luz Reported-by: kernel test robot Signed-off-by: kernel test robot Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20210319051919.GA39801@ae4f36e4f012 Signed-off-by: Hans de Goede commit 70505a71d845a3ee5e011577fc5d9ac82e5c052a Author: kernel test robot Date: Wed Mar 17 13:00:26 2021 +0100 platform/x86: asus-laptop: fix kobj_to_dev.cocci warnings Use kobj_to_dev() instead of container_of() Generated by: scripts/coccinelle/api/kobj_to_dev.cocci CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2103171258010.2981@hadrien Signed-off-by: Hans de Goede commit 04cdaf6d8f52e5a7589cb5463b27b23dd5d0de74 Author: Bhaskar Chowdhury Date: Wed Mar 17 15:26:50 2021 +0530 platform/mellanox: Typo fix in the file mlxbf-bootctl.c s/progamming/programming/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210317095650.2036419-1-unixbhaskar@gmail.com Signed-off-by: Hans de Goede commit 3b329cfec7522b5685a0fed11c5f2f95cab04fa3 Author: Bhaskar Chowdhury Date: Wed Mar 17 14:13:43 2021 +0530 platform/x86: Typo fix in the file classmate-laptop.c s/derefence/dereference/ Signed-off-by: Bhaskar Chowdhury Acked-by: Thadeu Lima de Souza Cascardo Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210317084343.3788084-1-unixbhaskar@gmail.com Signed-off-by: Hans de Goede commit d4dc4bf28263f25e0907072ce163dd454c6aa51a Author: David E. Box Date: Tue Mar 16 19:44:55 2021 -0700 platform/x86: intel_pmt_crashlog: Fix incorrect macros Fixes off-by-one bugs in the macro assignments for the crashlog control bits. Was initially tested on emulation but bug revealed after testing on silicon. Fixes: 5ef9998c96b0 ("platform/x86: Intel PMT Crashlog capability driver") Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20210317024455.3071477-2-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 501bb68a66cfc0bc2a2458483400cb49daca974f Author: David E. Box Date: Tue Mar 16 19:44:54 2021 -0700 platform/x86: intel_pmt_class: Initial resource to 0 Initialize the struct resource in intel_pmt_dev_register to zero to avoid a fault should the char *name field be non-zero. Signed-off-by: David E. Box Link: https://lore.kernel.org/r/20210317024455.3071477-1-david.e.box@linux.intel.com Signed-off-by: Hans de Goede commit 847d19a451465304f54d69b5be97baecc86c3617 Author: Lang Cheng Date: Tue Mar 16 16:09:21 2021 +0800 RDMA/hns: Support to query firmware version Implement the ops named get_dev_fw_str to support ib_get_device_fw_str(). Link: https://lore.kernel.org/r/1615882161-53827-1-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ad50294d4d6b573654cddf09a689592414b28b45 Author: Shay Drory Date: Sun Mar 14 14:54:18 2021 +0200 RDMA/mlx5: Create ODP EQ only when ODP MR is created There is no need to create the ODP EQ if the user doesn't use ODP MRs. Hence, create it only when the first ODP MR is created. This EQ will be destroyed only when the device is unloaded. This will decrease the number of EQs created per device. for example: If we creates 1K devices (SF/VF/etc'), than we will decrease the num of EQs by 1K. Link: https://lore.kernel.org/r/20210314125418.179716-1-leon@kernel.org Signed-off-by: Shay Drory Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 8a02d99876362f35bc918097440445de18e3c47c Author: Rafael J. Wysocki Date: Tue Mar 16 16:54:03 2021 +0100 ACPI: CPPC: Add emtpy stubs of functions for CONFIG_ACPI_CPPC_LIB unset For convenience, add empty stubs of library functions defined in cppc_acpi.c for the CONFIG_ACPI_CPPC_LIB unset case. Because one of them needs to return CPUFREQ_ETERNAL, include linux/cpufreq.h into the CPPC library header file and drop the direct inclusion of it from cppc_acpi.c. Signed-off-by: Rafael J. Wysocki Tested-by: Chen Yu commit de5bcf404acee6218f8f49c9d6dc1f6031a62fa6 Author: Rafael J. Wysocki Date: Tue Mar 16 16:52:43 2021 +0100 cpufreq: intel_pstate: Clean up frequency computations Notice that some computations related to frequency in intel_pstate can be simplified if (a) intel_pstate_get_hwp_max() updates the relevant members of struct cpudata by itself and (b) the "turbo disabled" check is moved from it to its callers, so modify the code accordingly and while at it rename intel_pstate_get_hwp_max() to intel_pstate_get_hwp_cap() which better reflects its purpose and provide a simplified variat of it, __intel_pstate_get_hwp_cap(), suitable for the initialization path. No intentional functional impact. Signed-off-by: Rafael J. Wysocki Tested-by: Chen Yu commit 7e4fdeafa61f2b653fcf9678f09935e55756aed2 Author: Rafael J. Wysocki Date: Thu Mar 18 19:28:28 2021 +0100 ACPI: power: Turn off unused power resources unconditionally According to the ACPI specification (section 7.2.2 in ACPI 6.4), the OS may evaluate the _OFF method of a power resource that is "off" already [1], and in particular that can be done in the case of unused power resources. Accordingly, modify acpi_turn_off_unused_power_resources() to evaluate the _OFF method for each of the unused power resources unconditionally which may help to work around BIOS issues where the return value of _STA for a power resource does not reflect the actual state of the power resource [2]. Link: https://uefi.org/specs/ACPI/6.4/07_Power_and_Performance_Mgmt/declaring-a-power-resource-object.html#off # [1] Link: https://lore.kernel.org/lkml/20210314000439.3138941-1-luzmaximilian@gmail.com/ # [2] Tested-by: Wendy Wang Signed-off-by: Rafael J. Wysocki commit 67831a08a778818350cd4cd6d27dcd989b0321e7 Author: Gustavo A. R. Silva Date: Fri Mar 5 03:51:11 2021 -0600 e1000: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Tony Nguyen commit d8f0c306985eef4893106e24b9a68dbe8561e3b7 Author: Gustavo A. R. Silva Date: Fri Mar 5 03:46:42 2021 -0600 ixgbevf: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Tony Nguyen commit 52c406989a51bffcaf4f685dd44714835c3ca57b Author: Gustavo A. R. Silva Date: Fri Mar 5 03:05:11 2021 -0600 igb: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Tony Nguyen commit 27e40255e5aca08220893f3a7441741042af072d Author: Gustavo A. R. Silva Date: Fri Mar 5 03:00:00 2021 -0600 ixgbe: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Tony Nguyen commit f83a0d0adac606ef3a6f5ecb6e40b7afeb227a75 Author: Gustavo A. R. Silva Date: Fri Mar 5 02:57:33 2021 -0600 fm10k: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Tony Nguyen commit 9ded647a5141e1d4152a3b263fe6eab047766567 Author: Gustavo A. R. Silva Date: Fri Mar 5 02:52:57 2021 -0600 ice: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Tested-by: Tony Brelinski Signed-off-by: Tony Nguyen commit 262de08f64e34bf1731e0e6296a9fc1e493e8b54 Author: Jesse Brandeburg Date: Thu Mar 18 16:18:52 2021 -0700 intel: clean up mismatched header comments A bunch of header comments were showing warnings when compiling with W=1. Fix them all at once. This changes only comments. Signed-off-by: Jesse Brandeburg Signed-off-by: Tony Nguyen commit 39da2cac42d4a4b44c04575ad444ad128e1a2c6b Author: Sasha Neftin Date: Sun Mar 14 15:59:20 2021 +0200 e1000e: Fix prototype warning Correct report warnings in ich8lan.c, netdev.c phy.c and ptp.c files Signed-off-by: Sasha Neftin Signed-off-by: Tony Nguyen commit c4cdb4efa20c8d4f6ceb3d2f57904048494911a4 Author: Sasha Neftin Date: Sun Mar 7 10:44:27 2021 +0200 igc: Fix prototype warning Correct report warnings in igc_i225.c Signed-off-by: Sasha Neftin Acked-by: Paul Menzel Signed-off-by: Tony Nguyen commit ef860480ea18a8bf0b4d8144c9071e5454d380f2 Author: Tony Nguyen Date: Tue Mar 2 10:15:45 2021 -0800 ice: Fix prototype warnings Correct reported warnings for "warning: expecting prototype for ... Prototype was for ... instead" Signed-off-by: Tony Nguyen Tested-by: Tony Brelinski commit b3bdf89c026021194b1c09e772e6ac3d043409e5 Author: Lyude Paul Date: Fri Feb 19 16:53:09 2021 -0500 drm/bridge/analogix/dp_core: Unregister DP AUX channel on error in analogix_dp_probe() Just another drive-by fix I noticed while going through the tree to cleanup DP aux adapter registration - make sure we unregister the DP AUX dev if analogix_dp_probe() fails. Signed-off-by: Lyude Paul Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-14-lyude@redhat.com commit c42712c6e9bea042ea9696713024af7417f5ce18 Author: Lyude Paul Date: Fri Feb 19 16:53:08 2021 -0500 drm/bridge/analogix/anx6345: Cleanup on errors in anx6345_bridge_attach() Another drive-by fix I found when fixing DP AUX adapter across the kernel tree - make sure we don't leak resources (and by proxy-AUX adapters) on failures in anx6345_bridge_attach() by unrolling on errors. Signed-off-by: Lyude Paul Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-13-lyude@redhat.com commit acf5ff297ec60ae4205927fcc860325e638e42ac Author: Lyude Paul Date: Fri Feb 19 16:53:07 2021 -0500 drm/bridge/analogix/anx6345: Don't link encoder until after connector registration Another case of linking an encoder to a connector after the connector's been registered. The proper place to do this is before connector registration, so let's fix that. Signed-off-by: Lyude Paul Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-12-lyude@redhat.com commit ba5070ec16aeb673822309f9614fa36cca30259c Author: Lyude Paul Date: Fri Feb 19 16:53:06 2021 -0500 drm/bridge/analogix/anx6345: Add missing drm_dp_aux_unregister() call Another driver I found that seems to forget to unregister it's DP AUX device. Let's fix this by adding anx6345_bridge_detach(). Signed-off-by: Lyude Paul Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-11-lyude@redhat.com commit 212ee8db84600f7b279b8645c62a112bff310995 Author: Lyude Paul Date: Fri Feb 19 16:53:05 2021 -0500 drm/bridge/analogix/anx78xx: Cleanup on error in anx78xx_bridge_attach() Just another issue I noticed while correcting usages of drm_dp_aux_init()/drm_dp_aux_register() around the tree. If any of the steps in anx78xx_bridge_attach() fail, we end up leaking resources. So, let's fix that (and fix leaking a DP AUX adapter in the process) by unrolling on errors. Signed-off-by: Lyude Paul Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-10-lyude@redhat.com commit 9962849d0871f5e53d0e3b3d84561f8f2847fbf4 Author: Lyude Paul Date: Fri Feb 19 16:53:04 2021 -0500 drm/bridge/analogix/anx78xx: Setup encoder before registering connector Since encoder mappings for connectors are exposed to userspace, we should be attaching the encoder before exposing the connector to userspace. Just a drive-by fix for an issue I noticed while fixing up usages of drm_dp_aux_init()/drm_dp_aux_register() across the tree. Signed-off-by: Lyude Paul Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-9-lyude@redhat.com commit 885373db8cd50f201387bd841806a8bc73a543fe Author: Lyude Paul Date: Fri Feb 19 16:53:03 2021 -0500 drm/bridge/analogix/anx78xx: Add missing drm_dp_aux_unregister() call Surprisingly, this bridge actually registers it's AUX adapter at the correct time already. Nice job! However, it does forget to actually unregister the AUX adapter, so let's add a bridge function to handle that. Signed-off-by: Lyude Paul Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-8-lyude@redhat.com commit 617126187530324e5024e4eb9a070218c4b60e93 Author: Lyude Paul Date: Fri Feb 19 16:53:02 2021 -0500 drm/bridge/ti-sn65dsi86: (Un)register aux device on bridge attach/detach Since we're about to add a back-pointer to drm_dev in drm_dp_aux, let's move the AUX adapter registration to the first point where we know which DRM device we'll be working with - when the drm_bridge is attached. Likewise, we unregister the AUX adapter on bridge detachment by adding a ti_sn_bridge_detach() callback. Signed-off-by: Lyude Paul Reviewed-by: Laurent Pinchart Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-7-lyude@redhat.com commit 85ddbe2c4ac16e050d0d432b200ac8039d5ff2ac Author: Lyude Paul Date: Fri Feb 19 16:53:00 2021 -0500 drm/bridge/tc358767: Don't register DP AUX channel until bridge is attached Since this is a bridge, we don't start out with a respective DRM device. Likewise this means we don't have a connector, which also means that we should be following drm_dp_aux_register()'s documentation advice and not call drm_dp_aux_register() until we have a matching connector. Instead, call drm_dp_aux_init() in tc_probe() and wait until tc_bridge_attach() to register our AUX channel. We also add tc_bridge_detach() to handle unregistering the AUX adapter once the bridge has been disconnected. Signed-off-by: Lyude Paul Reviewed-by: Robert Foss Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-5-lyude@redhat.com commit f2cc020d7876de7583feb52ec939a32419cf9468 Author: Ingo Molnar Date: Tue Mar 23 18:49:35 2021 +0100 tracing: Fix various typos in comments Fix ~59 single-word typos in the tracing code comments, and fix the grammar in a handful of places. Link: https://lore.kernel.org/r/20210322224546.GA1981273@gmail.com Link: https://lkml.kernel.org/r/20210323174935.GA4176821@gmail.com Reviewed-by: Randy Dunlap Signed-off-by: Ingo Molnar Signed-off-by: Steven Rostedt (VMware) commit 4b9ee772eaa82188b0eb8e05bdd1707c2a992004 Author: Rafael J. Wysocki Date: Thu Mar 18 19:25:12 2021 +0100 ACPI: scan: Turn off unused power resources during initialization It is reported that on certain platforms there are power resources that are not associated with any devices physically present in the platform. Those power resources are expected to be turned off by the OS in accordance with the ACPI specification (section 7.3 of ACPI 6.4) which currently is not done by Linux and that may lead to obscure issues. For instance, leaving those power resources in the "on" state may prevent the platform from reaching the lowest power state in suspend-to-idle which leads to excessive power draw. For this reason, turn all of the unused ACPI power resources off at the end of the initial namespace scan for devices in analogy with resume from suspend-to-RAM. Link: https://uefi.org/specs/ACPI/6.4/07_Power_and_Performance_Mgmt/device-power-management-objects.html Reported-by: David Box Tested-by: Wendy Wang Signed-off-by: Rafael J. Wysocki commit 40f90f4763e26cc4eb04b37766b7fd3f5952b516 Author: Krzysztof Kozlowski Date: Mon Mar 8 18:48:24 2021 +0100 arm64: defconfig: enable Intel's eASIC N5X SoCFPGA and Keem Bay SoC Enable in defconfig two Intel ARM64 architectures: the eASIC N5X SoCFPGA and Keem Bay SoC. This allows compile coverage when building default config. For the N5X (and Agilex) enable also DesignWare SPI controller in MMIO. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit e1175f02291141bbd924fc578299305fcde35855 Author: Chao Yu Date: Fri Mar 5 17:56:01 2021 +0800 f2fs: fix to align to section for fallocate() on pinned file Now, fallocate() on a pinned file only allocates blocks which aligns to segment rather than section, so GC may try to migrate pinned file's block, and after several times of failure, pinned file's block could be migrated to other place, however user won't be aware of such condition, and then old obsolete block address may be readed/written incorrectly. To avoid such condition, let's try to allocate pinned file's blocks with section alignment. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit f38dc82b56a83be8a18e395ff5568e46621db749 Merge: a38fd87484648 c8aebc1346522 Author: Arnd Bergmann Date: Tue Mar 23 18:22:41 2021 +0100 Merge tag 'renesas-arm-dt-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/dt Renesas ARM DT updates for v5.13 - OV7725 camera support for the iWave RainboW Qseven board (G21D), and its camera expansion board, - Add mmc aliases to fix /dev/mmcblkN order, - HDMI Display support for the R-Car Starter Kit Pro with R-Car M3-W+, - Support for running upstream kernels on the RZA2MEVB board, using the SDRAM present on the sub-board, - I2C EEPROM support for the Falcon development board, - Timer, thermal sensor, and CAN support for the R-Car V3U SoC. - Miscellaneous fixes and improvements. * tag 'renesas-arm-dt-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: arm64: dts: renesas: r8a77980: Fix vin4-7 endpoint binding arm64: dts: renesas: r8a77961: Add CAN nodes arm64: dts: renesas: r8a779a0: Add CMT support arm64: dts: renesas: r8a779a0: Add thermal support arm64: dts: renesas: r8a779a0: Add TMU support arm64: dts: renesas: falcon: Add Ethernet sub-board arm64: dts: renesas: falcon: Add CSI/DSI sub-board arm64: dts: renesas: falcon: Add I2C EEPROM nodes ARM: dts: rza2mevb: Upstream Linux requires SDRAM arm64: dts: renesas: Consolidate Salvator-X(S) HDMI0 handling arm64: dts: renesas: Add mmc aliases into board dts files arm64: dts: renesas: r8a77961-ulcb: add HDMI Display support ARM: dts: renesas: Add mmc aliases into R-Car Gen2 board dts files arm64: dts: renesas: Group tuples in pin control properties arm64: dts: renesas: Group tuples in playback and capture properties ARM: dts: renesas: Group tuples in pin control properties ARM: dts: renesas: Group tuples in playback and capture properties ARM: dts: renesas: Group tuples in APMU cpus properties ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes Link: https://lore.kernel.org/r/20210319085146.2709844-3-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit b61ecafafe9cbe8e99206bb7ef638d8e8340515d Merge: a38fd87484648 c5929afafbafb Author: Arnd Bergmann Date: Tue Mar 23 18:21:32 2021 +0100 Merge tag 'renesas-arm-defconfig-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/defconfig Renesas ARM defconfig updates for v5.13 - Refresh shmobile_defconfig for v5.12-rc2. * tag 'renesas-arm-defconfig-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: shmobile: defconfig: Refresh for v5.12-rc2 Link: https://lore.kernel.org/r/20210319085146.2709844-2-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 1527b09bc80018f02fe0b6d14e97c95f93596221 Author: Leilk Liu Date: Mon Mar 22 13:52:44 2021 +0800 spi: mediatek: add mt8195 spi slave support this patch adds mt8195 spi slave compatible support. Signed-off-by: Leilk Liu Link: https://lore.kernel.org/r/20210322055244.30179-5-leilk.liu@mediatek.com Signed-off-by: Mark Brown commit d666a833b0b9f5b8e08ecdc002a4cf5d34932b7a Author: Leilk Liu Date: Mon Mar 22 13:52:43 2021 +0800 spi: mediatek: add mtk_spi_compatible support this patch adds max_fifo_size and must_rx compat support. Signed-off-by: Leilk Liu Link: https://lore.kernel.org/r/20210322055244.30179-4-leilk.liu@mediatek.com Signed-off-by: Mark Brown commit f42698a8dc589dc7cc8e36641e86e6a9b3b32f9b Author: Leilk Liu Date: Mon Mar 22 13:52:42 2021 +0800 spi: update spi slave bindings for MT8195 SoC Add a DT binding documentation for the MT8195 soc. Signed-off-by: Leilk Liu Link: https://lore.kernel.org/r/20210322055244.30179-3-leilk.liu@mediatek.com Signed-off-by: Mark Brown commit 08b020d3e9a87fb6d94b02782c42c001a4e084f4 Author: Leilk Liu Date: Mon Mar 22 13:52:41 2021 +0800 spi: update spi master bindings for MT8195 SoC Add a DT binding documentation for the MT8195 soc. Signed-off-by: leilk.liu Link: https://lore.kernel.org/r/20210322055244.30179-2-leilk.liu@mediatek.com Signed-off-by: Mark Brown commit dfb81e3b5f47aa0ea5e4832eeb720bc22f07d0c1 Author: Kai Vehmanen Date: Mon Mar 22 16:38:30 2021 +0200 ASoC: SOF: Intel: hda: drop display power on/off in D0i3 flows Controller needs to ensure display power is enabled only for HDA controller reset. Drop the display power-up/down calls from D0i3 entry/exit paths. This was previously not possible as codec drivers could not resume the links, and instead controller kept the reference to display power. The state of display power had be maintained in the D0i3 entry/exit code. With commit 87fc20e4a0cb ("ASoC: SOF: Intel: hda: use hdac_ext fine-grained link management"), this is no longer needed and the code can be cleaned up. Signed-off-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Keyon Jie Link: https://lore.kernel.org/r/20210322143830.3880293-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 10f765d68ba218fc0125b0193a058c82cc3b481d Merge: 9a752ebe6bca6 1d9ffbc6b1855 Author: Arnd Bergmann Date: Tue Mar 23 18:16:40 2021 +0100 Merge tag 'renesas-drivers-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers Renesas driver updates for v5.13 - Prepare rmobile-sysc for fw_devlink=on, - A minor cleanup. * tag 'renesas-drivers-for-v5.13-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: rmobile-sysc: Mark fwnode when PM domain is added soc: renesas: rmobile-sysc: Remove unneeded platform includes Link: https://lore.kernel.org/r/20210319085146.2709844-4-geert+renesas@glider.be Signed-off-by: Arnd Bergmann commit 9a752ebe6bca61150f3eeee22a8d7b4516c8d350 Merge: a38fd87484648 0101947dbcc32 Author: Arnd Bergmann Date: Tue Mar 23 18:13:00 2021 +0100 Merge tag 'optee-tracepoints-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee into arm/drivers Add tracepoints around calls to secure world * tag 'optee-tracepoints-for-v5.13' of git://git.linaro.org/people/jens.wiklander/linux-tee: tee: optee: add invoke_fn tracepoints Link: https://lore.kernel.org/r/20210315113733.GA1944243@jade Signed-off-by: Arnd Bergmann commit 31c88729a7ad2b9871e6a73e491ec7223880d633 Author: Andre Przywara Date: Fri Mar 19 16:53:26 2021 +0000 kselftest/arm64: mte: ksm_options: Fix fscanf warning Out of the box Ubuntu's 20.04 compiler warns about missing return value checks for fscanf() calls. Make GCC happy by checking whether we actually parsed one integer. Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-4-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit e5decefd884da1c2c6ea18fca17b80b189afcc43 Author: Andre Przywara Date: Fri Mar 19 16:53:25 2021 +0000 kselftest/arm64: mte: Fix pthread linking The GCC manual suggests to use -pthread, when linking with the PThread library, also to add this switch to both the compilation and linking stages. Do as the manual says, to fix compilation with Ubuntu's 20.04 toolchain, which was getting -lpthread too early on the command line: ------------ /usr/bin/ld: /tmp/cc5zbo2A.o: in function `execute_test': tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c:86: undefined reference to `pthread_create' /usr/bin/ld: tools/testing/selftests/arm64/mte/check_gcr_el1_cswitch.c:90: undefined reference to `pthread_join' ------------ Signed-off-by: Andre Przywara Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-3-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit 4a423645bc2690376a7a94b4bb7b2f74bc6206ff Author: Andre Przywara Date: Fri Mar 19 16:53:24 2021 +0000 kselftest/arm64: mte: Fix compilation with native compiler The mte selftest Makefile contains a check for GCC, to add the memtag -march flag to the compiler options. This check fails if the compiler is not explicitly specified, so reverts to the standard "cc", in which case --version doesn't mention the "gcc" string we match against: $ cc --version | head -n 1 cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 This will not add the -march switch to the command line, so compilation fails: mte_helper.S: Assembler messages: mte_helper.S:25: Error: selected processor does not support `irg x0,x0,xzr' mte_helper.S:38: Error: selected processor does not support `gmi x1,x0,xzr' ... Actually clang accepts the same -march option as well, so we can just drop this check and add this unconditionally to the command line, to avoid any future issues with this check altogether (gcc actually prints basename(argv[0]) when called with --version). Signed-off-by: Andre Przywara Reviewed-by: Nick Desaulniers Reviewed-by: Mark Brown Link: https://lore.kernel.org/r/20210319165334.29213-2-andre.przywara@arm.com Signed-off-by: Catalin Marinas commit 2907f851f64a2f1ec5d75e60740e0819a660c5c0 Author: Michal Simek Date: Mon Nov 9 11:59:41 2020 +0100 xsysace: Remove SYSACE driver Sysace IP is no longer used on Xilinx PowerPC 405/440 and Microblaze systems. The driver is not regularly tested and very likely not working for quite a long time that's why remove it. Signed-off-by: Michal Simek Signed-off-by: Jens Axboe commit 5054241a7915c04dbe9988095a1ecc9084f8af16 Author: Zhang Yunkai Date: Sat Mar 6 13:11:04 2021 +0100 media: atomisp: remove duplicate include in sh_css 'ia_css_isys.h' included in 'sh_css.c' is duplicated. It is also included in the 30th line. Link: https://lore.kernel.org/linux-media/20210306121104.218696-1-zhang.yunkai@zte.com.cn Signed-off-by: Zhang Yunkai Signed-off-by: Mauro Carvalho Chehab commit 4c674481dcf9974834b96622fa4b079c176f36f9 Author: Mike Rapoport Date: Tue Mar 2 12:04:06 2021 +0200 x86/setup: Merge several reservations of start of memory Currently, the first several pages are reserved both to avoid leaking their contents on systems with L1TF and to avoid corrupting BIOS memory. Merge the two memory reservations. Signed-off-by: Mike Rapoport Signed-off-by: Borislav Petkov Reviewed-by: David Hildenbrand Acked-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210302100406.22059-3-rppt@kernel.org commit a799c2bd29d19c565f37fa038b31a0a1d44d0e4d Author: Mike Rapoport Date: Tue Mar 2 12:04:05 2021 +0200 x86/setup: Consolidate early memory reservations The early reservations of memory areas used by the firmware, bootloader, kernel text and data are spread over setup_arch(). Moreover, some of them happen *after* memblock allocations, e.g trim_platform_memory_ranges() and trim_low_memory_range() are called after reserve_real_mode() that allocates memory. There was no corruption of these memory regions because memblock always allocates memory either from the end of memory (in top-down mode) or above the kernel image (in bottom-up mode). However, the bottom up mode is going to be updated to span the entire memory [1] to avoid limitations caused by KASLR. Consolidate early memory reservations in a dedicated function to improve robustness against future changes. Having the early reservations in one place also makes it clearer what memory must be reserved before memblock allocations are allowed. Signed-off-by: Mike Rapoport Signed-off-by: Borislav Petkov Reviewed-by: Baoquan He Acked-by: Borislav Petkov Acked-by: David Hildenbrand Link: [1] https://lore.kernel.org/lkml/20201217201214.3414100-2-guro@fb.com Link: https://lkml.kernel.org/r/20210302100406.22059-2-rppt@kernel.org commit 2f9f21cdcd71d0c523676f551ea5c4f78d8e6f61 Author: Lucas Stankus Date: Fri Mar 12 16:11:26 2021 -0300 kunit: Match parenthesis alignment to improve code readability Tidy up code by fixing the following checkpatch warnings: CHECK: Alignment should match open parenthesis CHECK: Lines should not end with a '(' Signed-off-by: Lucas Stankus Reviewed-by: Brendan Higgins Signed-off-by: Shuah Khan commit 4483397b03536506535d611b0cb28a81a69e8edf Author: Krzysztof Kozlowski Date: Thu Mar 11 16:27:44 2021 +0100 ARM: socfpga: drop ARCH_SOCFPGA Simplify 32-bit and 64-bit Intel SoCFPGA Kconfig options by having only one for both of them. After conversion of all drivers to use the new ARCH_INTEL_SOCFPGA, the remaining ARM option can be removed. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 225c13f0b7b69bec79520717e7ebb6e035457dbb Author: Krzysztof Kozlowski Date: Thu Mar 11 16:27:41 2021 +0100 reset: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs ARCH_SOCFPGA is being renamed to ARCH_INTEL_SOCFPGA so adjust the 32-bit ARM drivers to rely on new symbol. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 823829dc18b1ffabeb1c2cbd66a2a07980f1fad6 Author: Krzysztof Kozlowski Date: Thu Mar 11 16:27:38 2021 +0100 i2c: altera: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs ARCH_SOCFPGA is being renamed to ARCH_INTEL_SOCFPGA so adjust the 32-bit ARM drivers to rely on new symbol. The side effect is that the I2C_ALTERA will now be available for both 32-bit and 64-bit Intel SoCFPGA, even though it is used only for 32-bit. Acked-by: Wolfram Sang Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 3a1fef70ff875ec58dca7002e219943afd7d240c Author: Krzysztof Kozlowski Date: Thu Mar 11 16:27:35 2021 +0100 fpga: altera: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs ARCH_SOCFPGA is being renamed to ARCH_INTEL_SOCFPGA so adjust the 32-bit ARM drivers to rely on new symbol. Acked-by: Moritz Fischer Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 5c03887268082c1dd89034e1a9143bbec5fecae0 Author: Krzysztof Kozlowski Date: Thu Mar 11 16:27:31 2021 +0100 dmaengine: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs ARCH_SOCFPGA is being renamed to ARCH_INTEL_SOCFPGA so adjust the 32-bit ARM drivers to rely on new symbol. Acked-By: Vinod Koul Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 552418658acd6302e971c7137cb7d3108e464829 Author: Krzysztof Kozlowski Date: Thu Mar 11 16:27:15 2021 +0100 clk: socfpga: use ARCH_INTEL_SOCFPGA also for 32-bit ARM SoCs (and compile test) ARCH_SOCFPGA is being renamed to ARCH_INTEL_SOCFPGA so adjust the 32-bit ARM drivers to rely on new symbol. There is little point to share clock controller drivers between 32-bit and 64-bit platforms because there will not be a generic image for both of them. Therefore add a new Kconfig entry for building 32-bit clock driverss, similar to one for 64-bit. This allows enabling compile testing. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit cdb1e8b4f4c2e515bfe3fd4d9d49bb9a5fc3806f Author: Krzysztof Kozlowski Date: Thu Mar 11 16:27:07 2021 +0100 clk: socfpga: allow compile testing of Stratix 10 / Agilex clocks The Stratix 10 / Agilex / N5X clocks do not use anything other than OF or COMMON_CLK so they should be compile testable on most of the platforms. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 4a9a1a5602d82c079325bf37466af0b67d6c0b9e Author: Krzysztof Kozlowski Date: Thu Mar 11 16:25:38 2021 +0100 arm64: socfpga: merge Agilex and N5X into ARCH_INTEL_SOCFPGA Agilex, N5X and Stratix 10 share all quite similar arm64 hard cores and SoC-part. Up to a point that N5X uses the same DTSI as Agilex. From the Linux kernel point of view these are flavors of the same architecture so there is no need for three top-level arm64 architectures. Simplify this by merging all three architectures into ARCH_INTEL_SOCFPGA and dropping the other ARCH* arm64 Kconfig entries. The side effect is that the INTEL_STRATIX10_SERVICE will now be available for both 32-bit and 64-bit Intel SoCFPGA, even though it is used only for 64-bit. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 098da961d8b8c279d34a8f7cd26ff0317f718df6 Author: Krzysztof Kozlowski Date: Thu Mar 11 16:25:37 2021 +0100 EDAC: altera: merge ARCH_SOCFPGA and ARCH_STRATIX10 Simplify 32-bit and 64-bit Intel SoCFPGA Kconfig options by having only one for both of them. This the common practice for other platforms. Additionally, the ARCH_SOCFPGA is too generic as SoCFPGA designs come from multiple vendors. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 2011431b97ce06483d497cc41cc921d3924bd5f7 Author: Krzysztof Kozlowski Date: Thu Mar 11 16:25:36 2021 +0100 clk: socfpga: merge ARCH_SOCFPGA and ARCH_STRATIX10 Simplify 32-bit and 64-bit Intel SoCFPGA Kconfig options by having only one for both of them. This the common practice for other platforms. Additionally, the ARCH_SOCFPGA is too generic as SoCFPGA designs come from multiple vendors. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit a01be32fccbb8cc0f6a3a155cf6bb5f528a4e20c Author: Krzysztof Kozlowski Date: Thu Mar 11 16:25:35 2021 +0100 clk: socfpga: build together Stratix 10, Agilex and N5X clock drivers On a multiplatform kernel there is little benefit in splitting each clock driver per platform because space savings are minimal. Such split also complicates the code, especially after adding compile testing. Build all arm64 Intel SoCFPGA clocks together with one entry in Makefile. This also removed duplicated line in the Makefile (selecting common part of clocks per platform). Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 3409fb0987dc0e3199c13e4de6ad678cdbeae007 Author: Krzysztof Kozlowski Date: Thu Mar 11 16:25:34 2021 +0100 net: stmmac: merge ARCH_SOCFPGA and ARCH_STRATIX10 Simplify 32-bit and 64-bit Intel SoCFPGA Kconfig options by having only one for both of them. This the common practice for other platforms. Additionally, the ARCH_SOCFPGA is too generic as SoCFPGA designs come from multiple vendors. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit cd5f39070ae131e8955b96e66d93aaf71db88e6f Author: Krzysztof Kozlowski Date: Thu Mar 11 16:25:33 2021 +0100 mfd: altera: merge ARCH_SOCFPGA and ARCH_STRATIX10 Simplify 32-bit and 64-bit Intel SoCFPGA Kconfig options by having only one for both of them. This the common practice for other platforms. Additionally, the ARCH_SOCFPGA is too generic as SoCFPGA designs come from multiple vendors. The side effect is that the MFD_ALTERA_A10SR will now be available for both 32-bit and 64-bit Intel SoCFPGA, even though it is used only for 32-bit. Acked-by: Lee Jones Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 910499e13387fdd025a8113f2d9fc0207eae4848 Author: Krzysztof Kozlowski Date: Thu Mar 11 16:25:32 2021 +0100 ARM: socfpga: introduce common ARCH_INTEL_SOCFPGA Simplify 32-bit and 64-bit Intel SoCFPGA Kconfig options by having only one for both of them. This the common practice for other platforms. Additionally, the ARCH_SOCFPGA is too generic as SoCFPGA designs come from multiple vendors. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 3b218baa744b0c7161d1784414e0a9db6bc9bf6b Author: Krzysztof Kozlowski Date: Thu Mar 11 16:25:31 2021 +0100 clk: socfpga: allow building N5X clocks with ARCH_N5X The Intel's eASIC N5X (ARCH_N5X) architecture shares a lot with Agilex (ARCH_AGILEX) so it uses the same socfpga_agilex.dtsi, with minor changes. Also the clock drivers are the same. However the clock drivers won't be build without ARCH_AGILEX. One could assume that ARCH_N5X simply depends on ARCH_AGILEX but this was not modeled in Kconfig. In current stage the ARCH_N5X is simply unbootable. Add a separate Kconfig entry for clocks used by both ARCH_N5X and ARCH_AGILEX so the necessary objects will be built if either of them is selected. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Dinh Nguyen commit 97b34809ec240d82c82af97626c2071a4062e0e6 Author: Arnd Bergmann Date: Fri Feb 26 15:05:02 2021 +0100 media: staging: atomisp: reduce kernel stack usage The atomisp_set_fmt() function has multiple copies of the large v4l2_format structure on its stack, resulting in a warning about excessive stack usage in some rare randconfig builds. drivers/staging/media/atomisp/pci/atomisp_cmd.c:5600:5: error: stack frame size of 1084 bytes in function 'atomisp_set_fmt' [-Werror,-Wframe-larger-than=] Of this structure, only three members in the 'fmt.pix' member are used, so simplify it by using the smaller v4l2_pix_format structure directly. This reduces the stack usage to 612 bytes, and it could be reduced further by only storing the three members that are used. Link: https://lore.kernel.org/linux-media/20210226140524.3478346-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Reviewed-by: Andy Shevchenko Signed-off-by: Mauro Carvalho Chehab commit 21ad53f206a95eda09a7b3780fb2f0b30ded314a Author: Nikolay Kyx Date: Sun Feb 21 20:53:08 2021 +0100 media: staging: media: omap4iss: code style - avoid macro argument precedence issues This patch fixes the following checkpatch.pl check: CHECK: Macro argument 'i' may be better as '(i)' to avoid precedence issues in file iss_regs.h Link: https://lore.kernel.org/linux-media/20210221195308.1451-1-knv418@gmail.com Signed-off-by: Nikolay Kyx Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 049d3db625a652e23488db88b6104de4d5b62f16 Author: Andy Shevchenko Date: Tue Mar 23 17:36:26 2021 +0200 usb: gadget: pch_udc: Provide a GPIO line used on Intel Minnowboard (v1) Intel Minnowboard (v1) uses SCH GPIO line SUS7 (i.e. 12) for VBUS sense. Provide a DMI based quirk to have it's being used. Fixes: e20849a8c883 ("usb: gadget: pch_udc: Convert to use GPIO descriptors") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210323153626.54908-7-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 971d080212be4ce2b91047d25a657f46d3e39635 Author: Andy Shevchenko Date: Tue Mar 23 17:36:25 2021 +0200 usb: gadget: pch_udc: Initialize device pointer before use During conversion to use GPIO descriptors the device pointer, which is applied to devm_gpiod_get(), is not yet initialized. Move initialization in the ->probe() in order to have it set before use. Fixes: e20849a8c883 ("usb: gadget: pch_udc: Convert to use GPIO descriptors") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210323153626.54908-6-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 50a318cc9b54a36f00beadf77e578a50f3620477 Author: Andy Shevchenko Date: Tue Mar 23 17:36:24 2021 +0200 usb: gadget: pch_udc: Revert d3cb25a12138 completely The commit d3cb25a12138 ("usb: gadget: udc: fix spin_lock in pch_udc") obviously was not thought through and had made the situation even worse than it was before. Two changes after almost reverted it. but a few leftovers have been left as it. With this revert d3cb25a12138 completely. While at it, narrow down the scope of unlocked section to prevent potential race when prot_stall is assigned. Fixes: d3cb25a12138 ("usb: gadget: udc: fix spin_lock in pch_udc") Fixes: 9903b6bedd38 ("usb: gadget: pch-udc: fix lock") Fixes: 1d23d16a88e6 ("usb: gadget: pch_udc: reorder spin_[un]lock to avoid deadlock") Cc: Iago Abal Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210323153626.54908-5-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 5af196df27c9a1173685148b368a9167b5a65d93 Author: Andy Shevchenko Date: Tue Mar 23 17:36:23 2021 +0200 usb: gadget: pch_udc: Move pch_udc_init() to satisfy kernel doc Kernel doc and the content described by it shouldn't be torn apart. Otherwise validator is not happy: .../pch_udc.c:573: warning: expecting prototype for pch_udc_reconnect(). Prototype was for pch_udc_init() instead Fixes: 1c575d2d2e3f ("usb: gadget: pch_udc: Fix usb/gadget/pch_udc: Fix ether gadget connect/disconnect issue") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210323153626.54908-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 4a28d77e359009b846951b06f7c0d8eec8dce298 Author: Andy Shevchenko Date: Tue Mar 23 17:36:22 2021 +0200 usb: gadget: pch_udc: Check for DMA mapping error DMA mapping might fail, we have to check it with dma_mapping_error(). Otherwise DMA-API is not happy: DMA-API: pch_udc 0000:02:02.4: device driver failed to check map error[device address=0x00000000027ee678] [size=64 bytes] [mapped as single] Fixes: abab0c67c061 ("usb: pch_udc: Fixed issue which does not work with g_serial") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210323153626.54908-3-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit fbdbbe6d3ee502b3bdeb4f255196bb45003614be Author: Andy Shevchenko Date: Tue Mar 23 17:36:21 2021 +0200 usb: gadget: pch_udc: Check if driver is present before calling ->setup() Since we have a separate routine for VBUS sense, the interrupt may occur before gadget driver is present. Hence, ->setup() call may oops the kernel: [ 55.245843] BUG: kernel NULL pointer dereference, address: 00000010 ... [ 55.245843] EIP: pch_udc_isr.cold+0x162/0x33f ... [ 55.245843] [ 55.245843] ? pch_udc_svc_data_out+0x160/0x160 Check if driver is present before calling ->setup(). Fixes: f646cf94520e ("USB device driver of Topcliff PCH") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210323153626.54908-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 91356fed6afd1c83bf0d3df1fc336d54e38f0458 Author: Andy Shevchenko Date: Tue Mar 23 17:36:20 2021 +0200 usb: gadget: pch_udc: Replace cpu_to_le32() by lower_32_bits() Either way ~0 will be in the correct byte order, hence replace cpu_to_le32() by lower_32_bits(). Moreover, it makes sparse happy, otherwise it complains: .../pch_udc.c:1813:27: warning: incorrect type in assignment (different base types) .../pch_udc.c:1813:27: expected unsigned int [usertype] dataptr .../pch_udc.c:1813:27: got restricted __le32 [usertype] Fixes: f646cf94520e ("USB device driver of Topcliff PCH") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210323153626.54908-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 325c3b9a0b5c25471e85c048609f7177e91c9934 Author: Thinh Nguyen Date: Wed Mar 10 19:43:34 2021 -0800 usb: xhci: Remove unused function Now that we replaced the xhci_create_usb3_bos_desc() function. We can remove it along with the static usb_bos_descriptor structure. Acked-by: Mathias Nyman Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/ce0acbbd0bd3c3c3a08e6418ab3bdb431a44bbfd.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit eb02aaf21f29ea8706ab3ebdb41cb33a090b3bfc Author: Thinh Nguyen Date: Wed Mar 10 19:43:28 2021 -0800 usb: xhci: Rewrite xhci_create_usb3_bos_desc() The current xhci_create_usb3_bos_desc() uses a static bos u8 array and various magic numbers and offsets making it difficult to extend support for USB 3.2. Let's rewrite this entire function to support dual-lane in USB 3.2. The hub driver matches the port speed ID from the extended port status to the SSID of the sublink speed attributes to detect if the device supports SuperSpeed Plus. Currently we don't provide the default gen1x2 and gen2x2 sublink speed capability descriptor for USB 3.2 roothub. The USB stack depends on this to detect and match the correct speed. In addition, if the xHCI host provides Protocol Speed ID (PSI) capability, then make sure to convert Protocol Speed ID Mantissa and Exponent (PSIM & PSIE) to lane speed for gen1x2 and gen2x2. Acked-by: Mathias Nyman Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/19cd09b03f96346996270579fd27d38b8a6844aa.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 64364bc912c01b33bba6c22e3ccb849bfca96398 Author: Thinh Nguyen Date: Wed Mar 10 19:43:21 2021 -0800 usb: xhci: Fix port minor revision Some hosts incorrectly use sub-minor version for minor version (i.e. 0x02 instead of 0x20 for bcdUSB 0x320 and 0x01 for bcdUSB 0x310). Currently the xHCI driver works around this by just checking for minor revision > 0x01 for USB 3.1 everywhere. With the addition of USB 3.2, checking this gets a bit cumbersome. Since there is no USB release with bcdUSB 0x301 to 0x309, we can assume that sub-minor version 01 to 09 is incorrect. Let's try to fix this and use the minor revision that matches with the USB/xHCI spec to help with the version checking within the driver. Acked-by: Mathias Nyman Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/ed330e95a19dc367819c5b4d78bf7a541c35aa0a.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit cd8d66cfae4989ed4b99c98b0c24d0eecba7005f Author: Thinh Nguyen Date: Wed Mar 10 19:43:15 2021 -0800 usb: xhci: Init root hub SSP rate Initialize USB 3.x root hub SuperSpeed Plus rate. Acked-by: Mathias Nyman Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/f1698a96d5f9dfaefb857b95e5db6135ae0c9e93.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit ee06162d98c399eb4ffc03d7b1141469177bee5a Author: Nikolay Kyx Date: Sun Feb 21 09:12:36 2021 +0100 media: staging: media: ipu3: code style fix - missing a blank line after declarations This patch fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations in file ipu3-css-fw.h Link: https://lore.kernel.org/linux-media/20210221081236.9758-2-knv418@gmail.com Signed-off-by: Nikolay Kyx Signed-off-by: Mauro Carvalho Chehab commit 671779f665d9cfd2a1e45cad02e936bfa647d40b Author: karthik alapati Date: Sat Feb 20 15:16:27 2021 +0100 media: staging: media/atomisp: don't compile unused code currently the functions defined in ibuf_ctrl_rmgr.c file are only used by isys_init.c when CONFIG_VIDEO_ATOMISP_ISP2401 is selected so dont't compile it when not needed, also fixes some sparse warnings Link: https://lore.kernel.org/linux-media/YDEZu3oniT/vUMMY@karthik-strix-linux.karthek.com Signed-off-by: karthik alapati Signed-off-by: Mauro Carvalho Chehab commit 040b86483c63ef426ce0d6c0cd9f8352d3c2fdad Author: Jiri Slaby Date: Fri Feb 19 11:12:16 2021 +0100 media: atomisp: do not free kmalloc memory by vfree fw_minibuffer[i].buffer is allocated by kmalloc in sh_css_load_blob_info and by vmalloc in setup_binary. So use kvfree to decide which of those allocators to use for freeing. Also remove the useless cast. Link: https://lore.kernel.org/linux-media/20210219101216.28406-1-jslaby@suse.cz Signed-off-by: Jiri Slaby Signed-off-by: Mauro Carvalho Chehab commit 3aeaf509380990271f8b0e7babfa978a3f43f67c Author: Daniel Golle Date: Thu Feb 18 18:18:36 2021 +0000 power: reset: replace curly brackets in Makefile Normal parentheses should be used when referring to config variables in Makefile. Replace the accidentally introduced curly brackets by regular parentheses. Fixes: a7f79f99541ef ("power: reset: add driver for LinkStation power off") Acked-by: Daniel González Cabanelas Signed-off-by: Daniel Golle Signed-off-by: Sebastian Reichel commit c99e755a4a4c165cad6effb39faffd0f3377c02d Author: Dmitry Baryshkov Date: Mon Jan 25 02:28:26 2021 +0300 PCI: Release OF node in pci_scan_device()'s error path In pci_scan_device(), if pci_setup_device() fails for any reason, the code will not release device's of_node by calling pci_release_of_node(). Fix that by calling the release function. Fixes: 98d9f30c820d ("pci/of: Match PCI devices to OF nodes dynamically") Link: https://lore.kernel.org/r/20210124232826.1879-1-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov Signed-off-by: Bjorn Helgaas Reviewed-by: Leon Romanovsky commit 6256e668b7af9d81472e03c6a171630c08f8858a Author: Masami Hiramatsu Date: Wed Mar 3 00:25:46 2021 +0900 x86/kprobes: Use int3 instead of debug trap for single-step Use int3 instead of debug trap exception for single-stepping the probed instructions. Some instructions which change the ip registers or modify IF flags are emulated because those are not able to be single-stepped by int3 or may allow the interrupt while single-stepping. This actually changes the kprobes behavior. - kprobes can not probe following instructions; int3, iret, far jmp/call which get absolute address as immediate, indirect far jmp/call, indirect near jmp/call with addressing by memory (register-based indirect jmp/call are OK), and vmcall/vmlaunch/vmresume/vmxoff. - If the kprobe post_handler doesn't set before registering, it may not be called in some case even if you set it afterwards. (IOW, kprobe booster is enabled at registration, user can not change it) But both are rare issue, unsupported instructions will not be used in the kernel (or rarely used), and post_handlers are rarely used (I don't see it except for the test code). Suggested-by: Andy Lutomirski Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/161469874601.49483.11985325887166921076.stgit@devnote2 commit a194acd316f93f3435a64de3b37dca2b5a77b338 Author: Masami Hiramatsu Date: Wed Mar 3 00:25:34 2021 +0900 x86/kprobes: Identify far indirect JMP correctly Since Grp5 far indirect JMP is FF "mod 101 r/m", it should be (modrm & 0x38) == 0x28, and near indirect JMP is also 0x38 == 0x20. So we can mask modrm with 0x30 and check 0x20. This is actually what the original code does, it also doesn't care the last bit. So the result code is same. Thus, I think this is just a cosmetic cleanup. Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/161469873475.49483.13257083019966335137.stgit@devnote2 commit d60ad3d46f1d04a282c56159f1deb675c12733fd Author: Masami Hiramatsu Date: Wed Mar 3 00:25:24 2021 +0900 x86/kprobes: Retrieve correct opcode for group instruction Since the opcodes start from 0xff are group5 instruction group which is not 2 bytes opcode but the extended opcode determined by the MOD/RM byte. The commit abd82e533d88 ("x86/kprobes: Do not decode opcode in resume_execution()") used insn->opcode.bytes[1], but that is not correct. We have to refer the insn->modrm.bytes[1] instead. Fixes: abd82e533d88 ("x86/kprobes: Do not decode opcode in resume_execution()") Signed-off-by: Masami Hiramatsu Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/161469872400.49483.18214724458034233166.stgit@devnote2 commit c29fb5f65072b784717ca16d6f136461d2ee04c4 Author: Meng Yu Date: Tue Mar 23 14:22:56 2021 +0800 Bluetooth: Remove trailing semicolon in macros remove trailing semicolon in macros and coding style fix. Signed-off-by: Meng Yu Signed-off-by: Marcel Holtmann commit 3af70b39fa2d415dc86c370e5b24ddb9fdacbd6f Author: Archie Pusaka Date: Tue Mar 23 16:32:20 2021 +0800 Bluetooth: check for zapped sk before connecting There is a possibility of receiving a zapped sock on l2cap_sock_connect(). This could lead to interesting crashes, one such case is tearing down an already tore l2cap_sock as is happened with this call trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0xc4/0x118 lib/dump_stack.c:56 register_lock_class kernel/locking/lockdep.c:792 [inline] register_lock_class+0x239/0x6f6 kernel/locking/lockdep.c:742 __lock_acquire+0x209/0x1e27 kernel/locking/lockdep.c:3105 lock_acquire+0x29c/0x2fb kernel/locking/lockdep.c:3599 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:137 [inline] _raw_spin_lock_bh+0x38/0x47 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:307 [inline] lock_sock_nested+0x44/0xfa net/core/sock.c:2518 l2cap_sock_teardown_cb+0x88/0x2fb net/bluetooth/l2cap_sock.c:1345 l2cap_chan_del+0xa3/0x383 net/bluetooth/l2cap_core.c:598 l2cap_chan_close+0x537/0x5dd net/bluetooth/l2cap_core.c:756 l2cap_chan_timeout+0x104/0x17e net/bluetooth/l2cap_core.c:429 process_one_work+0x7e3/0xcb0 kernel/workqueue.c:2064 worker_thread+0x5a5/0x773 kernel/workqueue.c:2196 kthread+0x291/0x2a6 kernel/kthread.c:211 ret_from_fork+0x4e/0x80 arch/x86/entry/entry_64.S:604 Signed-off-by: Archie Pusaka Reported-by: syzbot+abfc0f5e668d4099af73@syzkaller.appspotmail.com Reviewed-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Guenter Roeck Signed-off-by: Marcel Holtmann commit acb4decc1e900468d51b33c5f1ee445278e716a7 Author: Aubrey Li Date: Wed Feb 24 16:15:49 2021 +0800 sched/fair: Reduce long-tail newly idle balance cost A long-tail load balance cost is observed on the newly idle path, this is caused by a race window between the first nr_running check of the busiest runqueue and its nr_running recheck in detach_tasks. Before the busiest runqueue is locked, the tasks on the busiest runqueue could be pulled by other CPUs and nr_running of the busiest runqueu becomes 1 or even 0 if the running task becomes idle, this causes detach_tasks breaks with LBF_ALL_PINNED flag set, and triggers load_balance redo at the same sched_domain level. In order to find the new busiest sched_group and CPU, load balance will recompute and update the various load statistics, which eventually leads to the long-tail load balance cost. This patch clears LBF_ALL_PINNED flag for this race condition, and hence reduces the long-tail cost of newly idle balance. Signed-off-by: Aubrey Li Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/1614154549-116078-1-git-send-email-aubrey.li@intel.com commit c8987ae5af793a73e2c0d6ce804d8ff454ea377c Author: Barry Song Date: Sun Mar 21 11:14:32 2021 +1300 sched/fair: Optimize test_idle_cores() for !SMT update_idle_core() is only done for the case of sched_smt_present. but test_idle_cores() is done for all machines even those without SMT. This can contribute to up 8%+ hackbench performance loss on a machine like kunpeng 920 which has no SMT. This patch removes the redundant test_idle_cores() for !SMT machines. Hackbench is ran with -g {2..14}, for each g it is ran 10 times to get an average. $ numactl -N 0 hackbench -p -T -l 20000 -g $1 The below is the result of hackbench w/ and w/o this patch: g= 2 4 6 8 10 12 14 w/o: 1.8151 3.8499 5.5142 7.2491 9.0340 10.7345 12.0929 w/ : 1.8428 3.7436 5.4501 6.9522 8.2882 9.9535 11.3367 +4.1% +8.3% +7.3% +6.3% Signed-off-by: Barry Song Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Vincent Guittot Acked-by: Mel Gorman Link: https://lkml.kernel.org/r/20210320221432.924-1-song.bao.hua@hisilicon.com commit df77430639c9cf73559bac0f25084518bf9a812d Author: Shakeel Butt Date: Sun Mar 21 13:51:56 2021 -0700 psi: Reduce calls to sched_clock() in psi We noticed that the cost of psi increases with the increase in the levels of the cgroups. Particularly the cost of cpu_clock() sticks out as the kernel calls it multiple times as it traverses up the cgroup tree. This patch reduces the calls to cpu_clock(). Performed perf bench on Intel Broadwell with 3 levels of cgroup. Before the patch: $ perf bench sched all # Running sched/messaging benchmark... # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.747 [sec] # Running sched/pipe benchmark... # Executed 1000000 pipe operations between two processes Total time: 3.516 [sec] 3.516689 usecs/op 284358 ops/sec After the patch: $ perf bench sched all # Running sched/messaging benchmark... # 20 sender and receiver processes per group # 10 groups == 400 processes run Total time: 0.640 [sec] # Running sched/pipe benchmark... # Executed 1000000 pipe operations between two processes Total time: 3.329 [sec] 3.329820 usecs/op 300316 ops/sec Signed-off-by: Shakeel Butt Signed-off-by: Peter Zijlstra (Intel) Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20210321205156.4186483-1-shakeelb@google.com commit 2a2f80ff63bc36a874ed569bcaef932a8fe43514 Author: Valentin Schneider Date: Thu Dec 10 16:38:29 2020 +0000 stop_machine: Add caller debug info to queue_stop_cpus_work Most callsites were covered by commit a8b62fd08505 ("stop_machine: Add function and caller debug info") but this skipped queue_stop_cpus_work(). Add caller debug info to it. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20201210163830.21514-2-valentin.schneider@arm.com commit 423432072d163acf0089bf2821d98404539d7d4c Author: kernel test robot Date: Mon Mar 8 15:09:51 2021 +0800 USB: gadget: f_fs: fix memdup_user.cocci warnings drivers/usb/gadget/function/f_fs.c:3829:8-15: WARNING opportunity for memdup_user Use memdup_user rather than duplicating its implementation This is a little bit restricted to reduce false positives Generated by: scripts/coccinelle/api/memdup_user.cocci Fixes: 8704fd73bf56 ("USB: gadget: f_fs: remove likely/unlikely") Reported-by: kernel test robot Signed-off-by: kernel test robot Link: https://lore.kernel.org/r/20210308070951.GA83949@8a16bdd473dc Signed-off-by: Greg Kroah-Hartman commit a7d30f3f41cf40aad1c4557fa180fe320d5b7c74 Author: Matti Vaittinen Date: Tue Mar 23 15:58:28 2021 +0200 watchdog: retu_wdt: Clean-up by using managed work init Few drivers implement remove call-back only for ensuring a delayed work gets cancelled prior driver removal. Clean-up these by switching to use devm_delayed_work_autocancel() instead. This change is compile-tested only. All testing is appreciated. Acked-by: Guenter Roeck Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/be299515fbee2c311162ca99ea0dbee933044b56.1616506559.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit b6688015151857ed3f61fa2344c4b220bc9dc4d7 Author: Matti Vaittinen Date: Tue Mar 23 15:58:11 2021 +0200 regulator: qcom_spmi-regulator: Clean-up by using managed work init Few drivers implement remove call-back only for ensuring a delayed work gets cancelled prior driver removal. Clean-up these by switching to use devm_delayed_work_autocancel() instead. Additionally, this helps avoiding mixing devm and manual resource management and cleans up a (theoretical?) bug where devm managed over-current IRQ might schedule a new work item after wq was cleaned at remove(). This change is compile-tested only. All testing is appreciated. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/3bd35bb43257f4bf5b99f75d207ed5e1e08d1d38.1616506559.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit 6d0c5de2fd84a0ad07f0cecea24def3987675192 Author: Matti Vaittinen Date: Tue Mar 23 15:57:56 2021 +0200 power: supply: Clean-up few drivers by using managed work init Few drivers implement remove call-back only for ensuring a delayed work gets cancelled prior driver removal. Clean-up these by switching to use devm_delayed_work_autocancel() instead. This change is compile-tested only. All testing is appreciated. Acked-by: Sebastian Reichel Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/e5b1b0380cdd1aa066c9ac6d7a8b1a86ba1ddbbe.1616506559.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit b82a7b018b93d282d0f1a41a854ca3d071e02759 Author: Matti Vaittinen Date: Tue Mar 23 15:57:41 2021 +0200 platform/x86: gpd pocket fan: Clean-up by using managed work init Few drivers implement remove call-back only for ensuring a delayed work gets cancelled prior driver removal. Clean-up these by switching to use devm_delayed_work_autocancel() instead. This change is compile-tested only. All testing is appreciated. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/aa25a6781ba016772b045cd6e630da8c559a665d.1616506559.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit 96dc2b31abd0ed8a2a59a6672d4f16e4718d3701 Author: Matti Vaittinen Date: Tue Mar 23 15:57:25 2021 +0200 hwmon: raspberry-pi: Clean-up few drivers by using managed work init Few drivers implement remove call-back only for ensuring a delayed work gets cancelled prior driver removal. Clean-up these by switching to use devm_delayed_work_autocancel() instead. This change is compile-tested only. All testing is appreciated. Acked-by: Guenter Roeck Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/4830f52d46278ea1c92ad7252f6050540346d8b7.1616506559.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit f94a5becabf43e17490aded8bddc5f924b00338b Author: Matti Vaittinen Date: Tue Mar 23 15:57:08 2021 +0200 extconn: Clean-up few drivers by using managed work init Few drivers implement remove call-back only for ensuring a delayed work gets cancelled prior driver removal. Clean-up these by switching to use devm_delayed_work_autocancel() instead. Additionally, this helps avoiding mixing devm and manual resource management and cleans up a (theoretical?) bug from extconn-palmas.c and extcon-qcom-spmi-misc.c where (devm managed)IRQ might schedule new work item after wq was cleaned at remove(). This change is compile-tested only. All testing is appreciated. Reviewed-by: Hans de Goede Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/b1030eddbf0069f2d39e951be1d8e40d6413aeeb.1616506559.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit 2077ca682169afb212d8a887c70057a660290df9 Author: Matti Vaittinen Date: Tue Mar 23 15:56:44 2021 +0200 MAINTAINERS: Add entry for devm helpers Devm helper header containing small inline helpers was added. Hans promised to maintain it. Add Hans as maintainer and myself as designated reviewer. Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/eec1797734e3d080662aa732c565ed4a3c261799.1616506559.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit 0341ce5443949588e93581b49b934cdde2befbf8 Author: Matti Vaittinen Date: Tue Mar 23 15:56:17 2021 +0200 workqueue: Add resource managed version of delayed work init A few drivers which need a delayed work-queue must cancel work at driver detach. Some of those implement remove() solely for this purpose. Help drivers to avoid unnecessary remove and error-branch implementation by adding managed verision of delayed work initialization. This will also help drivers to avoid mixing manual and devm based unwinding when other resources are handled by devm. Reviewed-by: Hans de Goede Signed-off-by: Matti Vaittinen Link: https://lore.kernel.org/r/51769ea4668198deb798fe47fcfb5f5288d61586.1616506559.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Greg Kroah-Hartman commit d010995736cb581de55e99268d66937085b45ea0 Author: Fabio Aiuto Date: Tue Mar 23 13:56:36 2021 +0100 staging: rtl8723bs: remove blank line os_dep/os_intfs.c remove blank line Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ae5671883e9a869aced3eece40b587c51e15d520.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 838c96a29a80fad08c1d7dbe01fbc68d6b995314 Author: Fabio Aiuto Date: Tue Mar 23 13:56:35 2021 +0100 staging: rtl8723bs: remove unnecessary extern in os_dep/sdio_intf.c remove unnecessary extern. The function is defined static in os_dep/os_intfs.c and used only once in the same file Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/f3a7b2c00221aa09ed782fb30ce55936f443a12d.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c6fbbb17e5ea3760185afbc8d92ae7daba106682 Author: Fabio Aiuto Date: Tue Mar 23 13:56:34 2021 +0100 staging: rtl8723bs: remove undefined function prototype in of os_dep/sdio_intf.c fix the following checkpatch issue: WARNING: externs should be avoided in .c files 486: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:486: +extern int pm_netdev_close(struct net_device *pnetdev, u8 bnormal); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/06d61465fd33b6cf6d9428ac983e55f50afd448b.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d5e5f6d36932f23df845127945802e7f673c016d Author: Fabio Aiuto Date: Tue Mar 23 13:56:33 2021 +0100 staging: rtl8723bs: move function prototypes out of os_dep/int_fs.c fix the following checkpatch issues: WARNING: externs should be avoided in .c files 196: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:196: +int _netdev_open(struct net_device *pnetdev); -- WARNING: externs should be avoided in .c files 197: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:197: +int netdev_open(struct net_device *pnetdev); moved function prototype in include/osdep_intf.h removed function prototype and made a static removed unnecessary extern declaration in os_dep/ioctl_cfg80211.c Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/4604b856b9c20f1141e19894f46934cb860eebd4.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit f6df723d1ab5ff99d0f8ea9e3c50d253b5233fce Author: Fabio Aiuto Date: Tue Mar 23 13:56:32 2021 +0100 staging: rtl8723bs: remove function prototypes in hal/odm.c fix the following checkpatch issues: WARNING: externs should be avoided in .c files 285: FILE: drivers/staging/rtl8723bs/hal/odm.c:285: +void odm_CommonInfoSelfInit(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 287: FILE: drivers/staging/rtl8723bs/hal/odm.c:287: +void odm_CommonInfoSelfUpdate(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 289: FILE: drivers/staging/rtl8723bs/hal/odm.c:289: +void odm_CmnInfoInit_Debug(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 291: FILE: drivers/staging/rtl8723bs/hal/odm.c:291: +void odm_BasicDbgMessage(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 305: FILE: drivers/staging/rtl8723bs/hal/odm.c:305: +void odm_RefreshRateAdaptiveMaskCE(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 309: FILE: drivers/staging/rtl8723bs/hal/odm.c:309: +void odm_RSSIMonitorInit(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 311: FILE: drivers/staging/rtl8723bs/hal/odm.c:311: +void odm_RSSIMonitorCheckCE(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 313: FILE: drivers/staging/rtl8723bs/hal/odm.c:313: +void odm_RSSIMonitorCheck(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 315: FILE: drivers/staging/rtl8723bs/hal/odm.c:315: +void odm_SwAntDetectInit(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 317: FILE: drivers/staging/rtl8723bs/hal/odm.c:317: +void odm_SwAntDivChkAntSwitchCallback(void *FunctionContext); -- WARNING: externs should be avoided in .c files 321: FILE: drivers/staging/rtl8723bs/hal/odm.c:321: +void odm_GlobalAdapterCheck(void); -- WARNING: externs should be avoided in .c files 323: FILE: drivers/staging/rtl8723bs/hal/odm.c:323: +void odm_RefreshRateAdaptiveMask(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 325: FILE: drivers/staging/rtl8723bs/hal/odm.c:325: +void ODM_TXPowerTrackingCheck(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 327: FILE: drivers/staging/rtl8723bs/hal/odm.c:327: +void odm_RateAdaptiveMaskInit(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 330: FILE: drivers/staging/rtl8723bs/hal/odm.c:330: +void odm_TXPowerTrackingInit(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 338: FILE: drivers/staging/rtl8723bs/hal/odm.c:338: +void odm_InitHybridAntDiv(struct dm_odm_t *pDM_Odm); -- WARNING: externs should be avoided in .c files 340: FILE: drivers/staging/rtl8723bs/hal/odm.c:340: +bool odm_StaDefAntSel( -- WARNING: externs should be avoided in .c files 349: FILE: drivers/staging/rtl8723bs/hal/odm.c:349: +void odm_SetRxIdleAnt(struct dm_odm_t *pDM_Odm, u8 Ant, bool bDualPath); -- WARNING: externs should be avoided in .c files 353: FILE: drivers/staging/rtl8723bs/hal/odm.c:353: +void odm_HwAntDiv(struct dm_odm_t *pDM_Odm); removed function prototypes and made staics where needed in hal/odm.c moved function definition in file to let the compiler work Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9a92a2f29c2c9fb3c386a3c1d0d25f628845c563.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0e377e489079753686f427fe0e1f5fd3054b4a23 Author: Fabio Aiuto Date: Tue Mar 23 13:56:31 2021 +0100 staging: rtl8723bs: delete extern declarations in core/rtw_wlan_util.c fix the following checkpatch issues: WARNING: externs should be avoided in .c files 28: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:28: +extern unsigned char RTW_WPA_OUI[]; -- WARNING: externs should be avoided in .c files 29: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:29: +extern unsigned char WPA_TKIP_CIPHER[4]; Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0fa08b70af86b2ee88564179a22d908a643bed1f.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7a246f17dd3f52c46fa1caaeadb7ebb75664fb5f Author: Fabio Aiuto Date: Tue Mar 23 13:56:30 2021 +0100 staging: rtl8723bs: removed function prototypes and made statics in core/rtw_recv.c fix the following checkpatch issue: WARNING: externs should be avoided in .c files 1190: FILE: drivers/staging/rtl8723bs/core/rtw_recv.c:1190: +signed int validate_recv_mgnt_frame(struct adapter *padapter, union recv_frame *precv_frame); removed function prototypes and made statics moved two static function definitions before their usage to make code compile Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e40951ad0d3ba103b1551e8f2e54c7bc45563346.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 938d4e0305f9288c0abd3d6903547c0f1b5eba53 Author: Fabio Aiuto Date: Tue Mar 23 13:56:29 2021 +0100 staging: rtl8723bs: moved function prototype out of core/rtw_ioctl_set.c and core/rtw_mlme.c fix the following checkpatch issues: WARNING: externs should be avoided in .c files 40: FILE: drivers/staging/rtl8723bs/core/rtw_ioctl_set.c:40: +u8 rtw_do_join(struct adapter *padapter); WARNING: externs should be avoided in .c files 15: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:15: +extern u8 rtw_do_join(struct adapter *padapter); moved function prototype in include/rtw_ioctl_set.h Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/da654adf1295123adca07e3e5809e256dd4def69.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 644651d2da089858601595bf41b3688578846e2f Author: Fabio Aiuto Date: Tue Mar 23 13:56:28 2021 +0100 staging: rtl8723bs: removed function prototypes in core/rtw_efuse.c fix the following checkpatch issues: WARNING: externs should be avoided in .c files 35: FILE: drivers/staging/rtl8723bs/core/rtw_efuse.c:35: +bool removed two function prototypes in core/rtw_efuse.c and made definition static Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e9137945e66eccae8f2ae3eabe720ea648262eca.1616503354.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2e7a5b3e22368b65583d1b717e267de0a5906c32 Author: Dan Carpenter Date: Tue Mar 23 16:19:06 2021 +0300 thunderbolt: Unlock on error path in tb_domain_add() We accidentally deleted this unlock on the error path. Undelete it. Fixes: 7f0a34d7900b ("thunderbolt: Decrease control channel timeout for software connection manager") Signed-off-by: Dan Carpenter Signed-off-by: Mika Westerberg commit 53f95c55349e75b73f69ce36b0ae2a83b3f28fde Author: Arnd Bergmann Date: Mon Mar 22 12:42:51 2021 +0100 devcoredump: avoid -Wempty-body warnings Cleaning out the last -Wempty-body warnings found some interesting cases with empty macros, along with harmless warnings like this one: drivers/base/devcoredump.c: In function 'dev_coredumpm': drivers/base/devcoredump.c:297:56: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 297 | /* nothing - symlink will be missing */; | ^ drivers/base/devcoredump.c:301:56: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 301 | /* nothing - symlink will be missing */; | ^ Randy tried addressing this one before, and there were multiple other ideas in that thread. Add a runtime warning and code comment here. Link: https://lore.kernel.org/lkml/20200418184111.13401-8-rdunlap@infradead.org/ Cc: Randy Dunlap Cc: Matthew Wilcox Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210322114258.3420937-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 7f2fac70b729d68a34e5eba8d1fb68eb69b05169 Author: Andy Shevchenko Date: Fri Feb 12 18:25:39 2021 +0200 device property: Add test cases for fwnode_property_count_*() APIs Add test cases for fwnode_property_count_*() APIs. While at it, modify the arrays of integers to be size of non-power-of-2 for better test coverage and decreasing stack usage. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210212162539.86850-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 0b8bf06f67191e6a3184802a690d3f521c6d7e78 Author: Andy Shevchenko Date: Mon Mar 8 12:36:44 2021 +0200 device property: Sync descriptions of swnode array and group APIs After a few updates against swnode APIs the kernel documentation, i.e. for swnode group registration and unregistration deviates from the one for swnode array. In general, the same rules are applied to both. Hence, synchronize descriptions of swnode array and group APIs Reviewed-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210308103644.81960-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 6579c8d97ad7fc5671ee60234f3b8388abee5f77 Author: Tudor Ambarus Date: Wed Feb 10 13:44:35 2021 +0200 clk: Mark fwnodes when their clock provider is added This is a follow-up for: commit 3c9ea42802a1 ("clk: Mark fwnodes when their clock provider is added/removed") The above commit updated the deprecated of_clk_add_provider(), but missed to update the preferred of_clk_add_hw_provider(). Update it now. Signed-off-by: Tudor Ambarus Acked-by: Stephen Boyd Reviewed-by: Saravana Kannan Link: https://lore.kernel.org/r/20210210114435.122242-2-tudor.ambarus@microchip.com Signed-off-by: Greg Kroah-Hartman commit ea718c699055c8566eb64432388a04974c43b2ea Author: Saravana Kannan Date: Tue Mar 2 13:11:32 2021 -0800 Revert "Revert "driver core: Set fw_devlink=on by default"" This reverts commit 3e4c982f1ce75faf5314477b8da296d2d00919df. Since all reported issues due to fw_devlink=on should be addressed by this series, revert the revert. fw_devlink=on Take II. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20210302211133.2244281-4-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit b6f617df4fa936c1ab1831c2b23563f6c1add6c4 Author: Saravana Kannan Date: Tue Mar 2 13:11:31 2021 -0800 driver core: Update device link status properly for device_bind_driver() Device link status was not getting updated correctly when device_bind_driver() is called on a device. This causes a warning[1]. Fix this by updating device links that can be updated and dropping device links that can't be updated to a sensible state. [1] - https://lore.kernel.org/lkml/56f7d032-ba5a-a8c7-23de-2969d98c527e@nvidia.com/ Tested-by: Jon Hunter Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20210302211133.2244281-3-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit f2db85b64f0af1410ccb8ebcc9d7fa38e99feee9 Author: Saravana Kannan Date: Tue Mar 2 13:11:30 2021 -0800 driver core: Avoid pointless deferred probe attempts There's no point in adding a device to the deferred probe list if we know for sure that it doesn't have a matching driver. So, check if a device can match with a driver before adding it to the deferred probe list. Signed-off-by: Saravana Kannan Link: https://lore.kernel.org/r/20210302211133.2244281-2-saravanak@google.com Signed-off-by: Greg Kroah-Hartman commit 01085e24ff0ae775e7407a6e40c2156a724ae884 Author: Rasmus Villemoes Date: Fri Mar 12 11:30:27 2021 +0100 devtmpfs: actually reclaim some init memory Currently gcc seems to inline devtmpfs_setup() into devtmpfsd(), so its memory footprint isn't reclaimed as intended. Mark it noinline to make sure it gets put in .init.text. While here, setup_done can also be put in .init.data: After complete() releases the internal spinlock, the completion object is never touched again by that thread, and the waiting thread doesn't proceed until it observes ->done while holding that spinlock. This is now the same pattern as for kthreadd_done in init/main.c: complete() is done in a __ref function, while the corresponding wait_for_completion() is in an __init function. Reviewed-by: Christoph Hellwig Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20210312103027.2701413-2-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit 38f087de8947700d3b06d3d1594490e0f611c5d1 Author: Rasmus Villemoes Date: Fri Mar 12 11:30:26 2021 +0100 devtmpfs: fix placement of complete() call Calling complete() from within the __init function is wrong - theoretically, the init process could proceed all the way to freeing the init mem before the devtmpfsd thread gets to execute the return instruction in devtmpfs_setup(). In practice, it seems to be harmless as gcc inlines devtmpfs_setup() into devtmpfsd(). So the calls of the __init functions init_chdir() etc. actually happen from devtmpfs_setup(), but the __ref on that one silences modpost (it's all right, because those calls happen before the complete()). But it does make the __init annotation of the setup function moot, which we'll fix in a subsequent patch. Fixes: bcbacc4909f1 ("devtmpfs: refactor devtmpfsd()") Reviewed-by: Christoph Hellwig Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20210312103027.2701413-1-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit 6b72cf128282a4c2191fc2278ba5010c85b51fb6 Author: Colin Ian King Date: Thu Feb 18 20:28:37 2021 +0000 drivers/base/cpu: remove redundant assignment of 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. Clean this up by initializing retval to -ENOMEM and remove the assignment to retval on the !dev failure path. Kudos to Rafael for the improved fix suggestion. Reviewed-by: Rafael J. Wysocki Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210218202837.516231-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 2c137388d685e11cf621b56bf06c4f3a1a8ff7be Author: Jiapeng Chong Date: Thu Feb 18 17:12:09 2021 +0800 firmware_loader: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./tools/testing/selftests/firmware/fw_namespace.c:98:54-59: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/1613639529-41139-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 37ad56aa82be0b524c0912ab571b70a343927265 Author: Bhaskar Chowdhury Date: Tue Mar 23 18:12:06 2021 +0530 power: supply: max17042: Trivial spelling fixes Few trivial spelling fixes. Signed-off-by: Bhaskar Chowdhury Signed-off-by: Sebastian Reichel commit f2b6ebf61e8fcd0b1f03a084d39742b1f6113ac4 Author: Jia-Ju Bai Date: Tue Mar 23 05:36:48 2021 -0700 usb: gadget: legacy: fix error return code of msg_bind() When usb_otg_descriptor_alloc() returns NULL to usb_desc, no error return code of msg_bind() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210323123648.3997-1-baijiaju1990@gmail.com Signed-off-by: Greg Kroah-Hartman commit d07247ff2515d7d2db60e6492cd4662d87bf7bf2 Author: Thinh Nguyen Date: Wed Mar 10 19:43:07 2021 -0800 usb: core: sysfs: Check for SSP rate in speed attr Check for usb_device->ssp_rate to output the signaling rate for genXxY. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/80a3214592b30da6ca95bb87984f2a9779de0b14.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 2d0e82c905b8d802031665eb9dd3b9acddac7580 Author: Thinh Nguyen Date: Wed Mar 10 19:43:01 2021 -0800 usb: core: hub: Print speed name based on ssp rate Check for usb_device->ssp_rate to print the SuperSpeed Plus signaling rate generation and lane count. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/df0986bbe92251c104dd92e3c796df7c4f2674ce.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit a59918cb6193b58e6293f58a094466504393f9c4 Author: Thinh Nguyen Date: Wed Mar 10 19:42:53 2021 -0800 usb: core: hub: Remove port_speed_is_ssp() The get_port_ssp_rate() can replace port_speed_is_ssp(). If the port speed is detected to be in gen2x1, gen1x2, or gen2x2, then the port is operating at SuperSpeed Plus. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/dfd61ae637597bad502d2420b4dbd3774fc76aab.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 0299809be415567366b66f248eed93848b8dc9f3 Author: Thinh Nguyen Date: Wed Mar 10 19:42:44 2021 -0800 usb: core: Track SuperSpeed Plus GenXxY Introduce ssp_rate field to usb_device structure to capture the connected SuperSpeed Plus signaling rate generation and lane count with the corresponding usb_ssp_rate enum. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/b7805d121e5ae4ad5ae144bd860b6ac04ee47436.1615432770.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 71ca43f30df9c642970f9dc9b2d6f463f4967e7b Author: Wesley Cheng Date: Fri Mar 19 02:31:25 2021 -0700 usb: dwc3: gadget: Ignore EP queue requests during bus reset The current dwc3_gadget_reset_interrupt() will stop any active transfers, but only addresses blocking of EP queuing for while we are coming from a disconnected scenario, i.e. after receiving the disconnect event. If the host decides to issue a bus reset on the device, the connected parameter will still be set to true, allowing for EP queuing to continue while we are disabling the functions. To avoid this, set the connected flag to false until the stop active transfers is complete. Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1616146285-19149-3-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 02fa4b980245087a04ea34ae7541ebdc56a5daa4 Author: Wesley Cheng Date: Fri Mar 19 02:31:24 2021 -0700 usb: dwc3: gadget: Avoid continuing preparing TRBs during teardown Add checks similar to dwc3_gadget_ep_queue() before kicking off transfers after getting an endpoint completion event. Since cleaning up completed requests will momentarily unlock dwc->lock, there is a chance for a sequence like pullup disable to be executed. This can lead to preparing a TRB, which will be removed by the pullup disable routine. Signed-off-by: Wesley Cheng Link: https://lore.kernel.org/r/1616146285-19149-2-git-send-email-wcheng@codeaurora.org Signed-off-by: Greg Kroah-Hartman commit 5e7121723d5b8280c9f37e04d9b5c20beae33c12 Author: Johan Hovold Date: Mon Mar 22 12:11:40 2021 +0100 USB: xhci: drop workaround for forced irq threading Force-threaded interrupt handlers used to run with interrupts enabled, something which could lead to deadlocks in case a threaded handler shared a lock with code running in hard interrupt context (e.g. timer callbacks) and did not explicitly disable interrupts. Since commit 81e2073c175b ("genirq: Disable interrupts for force threaded handlers") interrupt handlers always run with interrupts disabled on non-RT so that drivers no longer need to do handle forced threading ("threadirqs"). Drop the now obsolete workaround added by commit 63aea0dbab90 ("USB: xhci: fix lock-inversion problem"). Cc: Alan Stern Cc: Bart Van Assche Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Peter Zijlstra Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210322111140.32056-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 6fcf11295eb2b63ce5974b78bd07d419e79d58ec Author: Rasmus Villemoes Date: Tue Mar 23 09:16:07 2021 +0100 USB: gadget: legacy: remove left-over __ref annotations These were added in commit 780cc0f370 ("usb: gadget: add '__ref' for rndis_config_register() and cdc_config_register()") to silence modpost, but they didn't fix the real problem - that was fixed later by removing wrong __init annotations in commit c94e289f195e ("usb: gadget: remove incorrect __init/__exit annotations"). It really never makes sense for a function to be marked __ref unless it (1) has some conditional that chooses whether to call an __init function (or access __initdata) or not and (2) has a comment explaining why the __ref is there and why it is safe. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20210323081607.405904-1-linux@rasmusvillemoes.dk Signed-off-by: Greg Kroah-Hartman commit d23922fcac48e57f3bf00b1dc4c9c0f5b4f6fe59 Author: Ruslan Bilovol Date: Mon Mar 1 15:05:36 2021 +0200 usb: gadget: u_audio: convert to strscpy Usage of strlcpy in Linux Kernel has been recently deprecated [1], convert driver to strscpy [1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Ruslan Bilovol Link: https://lore.kernel.org/r/1614603943-11668-2-git-send-email-ruslan.bilovol@gmail.com Signed-off-by: Greg Kroah-Hartman commit f735e8366af3513a2a252084f1d0d3370502fe92 Author: Sebastian Reichel Date: Wed Mar 17 14:49:04 2021 +0100 dt-bindings: power: supply: Drop power_supply.txt The file has been replaced by power-supply.yaml and all links have been updated to the new file. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 70c23e62d20c7e05fdc0ebdea60a9f9e4ff4d205 Author: Sebastian Reichel Date: Wed Mar 17 14:49:03 2021 +0100 dt-bindings: power: supply: Fix remaining battery.txt links Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 3ef11821dec24a5b18265abc3fd67534208fb35c Author: Sebastian Reichel Date: Wed Mar 17 14:49:02 2021 +0100 dt-bindings: power: supply: sbs-battery: Fix dtbs_check Existing in-tree users make use of '"ti,bq20z45", "sbs,sbs-battery"', so add it to the list of known compatible strings. Also add missing support for the generic 'power-supplies' property by importing power-supply.yaml and setting unevaluatedProperties instead of additionalProperties. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit eb917497734c4438d0a2013050f8141454cd656f Author: Sebastian Reichel Date: Wed Mar 17 14:49:01 2021 +0100 dt-bindings: power: supply: ab8500: Convert to DT schema format Convert the binding to DT schema format. Note: The battery node does not have a compatible value and needs to be described from the binding file for the PMIC. That has not yet been converted, so I kept the information in plaintext for now. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit ee662741966e5ca844edd8b191152caadbf2e308 Author: Sebastian Reichel Date: Wed Mar 17 14:49:00 2021 +0100 dt-bindings: power: supply: olpc-battery: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 95b00152cb8e5f39aa476eb3feaaeee44abd85f8 Author: Sebastian Reichel Date: Wed Mar 17 14:48:59 2021 +0100 dt-bindings: power: supply: rt9455: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit d913a03bc19d3e03b7d674f4a2fb3b467c26d3e2 Author: Sebastian Reichel Date: Wed Mar 17 14:48:58 2021 +0100 dt-bindings: power: supply: ltc294x: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 97f03280e0e64aefaba66571ee65d5953315cb28 Author: Sebastian Reichel Date: Wed Mar 17 14:48:57 2021 +0100 dt-bindings: power: supply: lt3651: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit c44242f0d08aaedb18448d78223c8f8a21e0640e Author: Sebastian Reichel Date: Wed Mar 17 14:48:56 2021 +0100 dt-bindings: power: supply: lp8727: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 59604ba756334377deca54bc0526da739bfc0c51 Author: Sebastian Reichel Date: Wed Mar 17 14:48:55 2021 +0100 dt-bindings: power: supply: da9150: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit a3388d750c7d6f0c6280932a5a360afb69be6921 Author: Sebastian Reichel Date: Wed Mar 17 14:48:54 2021 +0100 dt-bindings: power: supply: axp20x: Convert to DT schema format Convert the binding to DT schema format. Cc: Chen-Yu Tsai Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit ee123ad9780b772dedd37aec18e77ae41a69d321 Author: Sebastian Reichel Date: Wed Mar 17 14:48:53 2021 +0100 dt-bindings: power: supply: act8945a: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 6c463222a21dabb51ed5ad7653e605ead5749d64 Author: Sebastian Reichel Date: Wed Mar 17 14:48:52 2021 +0100 dt-bindings: power: supply: pm8941-coincell: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 1a4d86b4c9783c92a0029dcaf7d3d2ff902e1609 Author: Sebastian Reichel Date: Wed Mar 17 14:48:51 2021 +0100 dt-bindings: power: supply: pm8941-charger: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit f444be12455d945a0e44eacf27200f4f7c982bbc Author: Sebastian Reichel Date: Wed Mar 17 14:48:50 2021 +0100 dt-bindings: power: supply: ucs1002: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 402a3cb34ecbccea260267ef458bac41c4c27905 Author: Sebastian Reichel Date: Wed Mar 17 14:48:49 2021 +0100 dt-bindings: power: supply: max8903: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit eb3b616ee1b90072c6f81ed7c75f048fae398a12 Author: Sebastian Reichel Date: Wed Mar 17 14:48:48 2021 +0100 dt-bindings: power: supply: max17042: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit aad19ec18e9ad1f28c490be100091b11295ba300 Author: Sebastian Reichel Date: Wed Mar 17 14:48:47 2021 +0100 dt-bindings: power: supply: max14656: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit ab1a76df6d8312d00aba7d5e6bfb818bbda4b92a Author: Sebastian Reichel Date: Wed Mar 17 14:48:46 2021 +0100 dt-bindings: power: supply: max17040: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 3004e581d92a1898747fdb4a689fa23c9022b30d Author: Sebastian Reichel Date: Wed Mar 17 14:48:45 2021 +0100 dt-bindings: power: supply: lego-ev3-battery: Convert to DT schema format Convert the binding to DT schema format. Cc: David Lechner Signed-off-by: Sebastian Reichel Reviewed-by: David Lechner Reviewed-by: Rob Herring commit 254cb1e0d78cfa2c189171cacb88fc85d915bc84 Author: Ruslan Bilovol Date: Mon Mar 1 13:49:35 2021 +0200 usb: gadget: f_uac1: disable IN/OUT ep if unused User can configure f_uac1 function via p_chmask/c_chmask whether uac1 shall support playback and/or capture, but it has only effect on the created ALSA device, but not on the USB descriptor. This patch adds playback/capture descriptors dependent on that parameter. It is similar to the same conversion done earlier for f_uac2 Signed-off-by: Ruslan Bilovol Link: https://lore.kernel.org/r/1614599375-8803-6-git-send-email-ruslan.bilovol@gmail.com Signed-off-by: Greg Kroah-Hartman commit a59c68a6a3d1b18e2494f526eb19893a34fa6ec6 Author: Ruslan Bilovol Date: Mon Mar 1 13:49:34 2021 +0200 usb: gadget: f_uac1: validate input parameters Currently user can configure UAC1 function with parameters that violate UAC1 spec or are not supported by UAC1 gadget implementation. This can lead to incorrect behavior if such gadget is connected to the host - like enumeration failure or other issues depending on host's UAC1 driver implementation, bringing user to a long hours of debugging the issue. Instead of silently accept these parameters, throw an error if they are not valid. Signed-off-by: Ruslan Bilovol Link: https://lore.kernel.org/r/1614599375-8803-5-git-send-email-ruslan.bilovol@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3713d5ceb04d5ab6a5e2b86dfca49170053f3a5e Author: Ruslan Bilovol Date: Mon Mar 1 13:49:33 2021 +0200 usb: gadget: f_uac2: validate input parameters Currently user can configure UAC2 function with parameters that violate UAC2 spec or are not supported by UAC2 gadget implementation. This can lead to incorrect behavior if such gadget is connected to the host - like enumeration failure or other issues depending on host's UAC2 driver implementation, bringing user to a long hours of debugging the issue. Instead of silently accept these parameters, throw an error if they are not valid. Signed-off-by: Ruslan Bilovol Link: https://lore.kernel.org/r/1614599375-8803-4-git-send-email-ruslan.bilovol@gmail.com Signed-off-by: Greg Kroah-Hartman commit df89b2850a60af2f4cf86f766ce6a16459055baf Author: Sebastian Reichel Date: Wed Mar 17 14:48:44 2021 +0100 dt-bindings: power: supply: n900-battery: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Rejected-by: Pali Rohár Reviewed-by: Rob Herring commit bb56712abab423881808cdbac92db742b806bc9a Author: Sebastian Reichel Date: Wed Mar 17 14:48:43 2021 +0100 dt-bindings: power: supply: twl4030: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 0e2d1823a6910f514b16fd5429059869f922ee09 Author: Sebastian Reichel Date: Wed Mar 17 14:48:42 2021 +0100 dt-bindings: power: supply: tps65217: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 4ac8f03056a9a613f300a748440873771c414174 Author: Sebastian Reichel Date: Wed Mar 17 14:48:41 2021 +0100 dt-bindings: power: supply: tps65090: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit dc721203c5f25e93b3255979b43eea2564680926 Author: Sebastian Reichel Date: Wed Mar 17 14:48:40 2021 +0100 dt-bindings: power: supply: sc2731-charger: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 89919370c5c5bd9c97cea04b492c262d756b1af6 Author: Sebastian Reichel Date: Wed Mar 17 14:48:39 2021 +0100 dt-bindings: power: supply: sc27xx-fg: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 2f06fcbdac210cb785854ca87ec378d05dc11237 Author: Sebastian Reichel Date: Wed Mar 17 14:48:38 2021 +0100 dt-bindings: power: supply: ds2760: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit f5bf381a1028bb17f4722b29d75c855af69a5ba4 Author: Sebastian Reichel Date: Wed Mar 17 14:48:37 2021 +0100 dt-bindings: power: supply: sbs-manager: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 90f6c44d7ef4ae8eb3b11b4ca7eac316145d4e7b Author: Sebastian Reichel Date: Wed Mar 17 14:48:36 2021 +0100 dt-bindings: power: supply: sbs-charger: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 437e6b6c8f2d6e5447cc4739cb545be20905b560 Author: Sebastian Reichel Date: Wed Mar 17 14:48:35 2021 +0100 dt-bindings: power: supply: isp1704: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 464a74887167651c747b07cf087f39e5fdf9fc0c Author: Sebastian Reichel Date: Wed Mar 17 14:48:34 2021 +0100 dt-bindings: power: supply: bq24735: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 9c05cfaf3fd51b63a90f1afd001187462d583f5c Author: Sebastian Reichel Date: Wed Mar 17 14:48:33 2021 +0100 dt-bindings: power: supply: bq2415x: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit e7c243175996e7ea45fad96922809f8eff18c6bd Author: Sebastian Reichel Date: Wed Mar 17 14:48:32 2021 +0100 dt-bindings: power: supply: bq24190: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 102d4a0b690391826656e09bc7598c7ba7e57526 Author: Sebastian Reichel Date: Wed Mar 17 14:48:31 2021 +0100 dt-bindings: power: supply: bq24257: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit 648d383253c7305f2f26967e95f6474449e13c97 Author: Sebastian Reichel Date: Wed Mar 17 14:48:30 2021 +0100 dt-bindings: power: supply: bq25890: Convert to DT schema format Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel Reviewed-by: Rob Herring commit ce49e42822002541d2288ae2a65d7d520f2687b6 Author: Sebastian Reichel Date: Wed Mar 17 14:48:29 2021 +0100 dt-bindings: power: supply: cpcap-charger: Convert to DT schema format Convert the binding to DT schema format. I also added the missing bits used by the only in-tree user and implemented in the driver. Signed-off-by: Sebastian Reichel Reviewed-by: Tony Lindgren Reviewed-by: Rob Herring commit 3c5be04549721fc3dafea0156edcaf6a31951fa2 Author: Sebastian Reichel Date: Wed Mar 17 14:48:28 2021 +0100 dt-bindings: power: supply: cpcap-battery: Convert to DT schema format Convert the binding to DT schema format. I also added the missing bits used by the only in-tree user and implemented in the driver. Signed-off-by: Sebastian Reichel Reviewed-by: Tony Lindgren Reviewed-by: Rob Herring commit c021e02357703b959e20c458d64b6d4e0d5b8012 Author: Jia-Ju Bai Date: Sun Mar 7 00:45:45 2021 -0800 usb: gadget: legacy: fix error return code of multi_bind() When usb_otg_descriptor_alloc() returns NULL to usb_desc, no error return code of multi_bind() is assigned. To fix this bug, status is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210307084545.21775-1-baijiaju1990@gmail.com Signed-off-by: Greg Kroah-Hartman commit f8cb3d556be31d2f41f54a7d7623930b05c9b340 Author: Pawel Laszczak Date: Wed Mar 10 11:52:16 2021 +0100 usb: f_uac2: adds support for SS and SSP Patch adds support of SS and SSP speed. Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210310105216.38202-1-pawell@gli-login.cadence.com Signed-off-by: Greg Kroah-Hartman commit fb9b31e4ea2f55fc3acee29f30c7c65460df8996 Author: Dmitry Osipenko Date: Sun Mar 14 23:39:27 2021 +0300 usb: chipidea: tegra: Silence deferred probe error Silence deferred probe error caused by the PHY driver which is probed later than the ChipIdea driver. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314203927.2572-1-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 55b74ce7d2ce0b0058f3e08cab185a0afacfe39e Author: Dean Anderson Date: Wed Mar 17 15:41:09 2021 -0700 usb: gadget/function/f_fs string table fix for multiple languages Fixes bug with the handling of more than one language in the string table in f_fs.c. str_count was not reset for subsequent language codes. str_count-- "rolls under" and processes u32 max strings on the processing of the second language entry. The existing bug can be reproduced by adding a second language table to the structure "strings" in tools/usb/ffs-test.c. Signed-off-by: Dean Anderson Link: https://lore.kernel.org/r/20210317224109.21534-1-dean@sensoray.com Cc: stable Signed-off-by: Greg Kroah-Hartman commit 84770f028fabab4cb66188d583ed12652f30576b Author: Manish Narani Date: Wed Mar 17 12:22:29 2021 +0530 usb: dwc3: Add driver for Xilinx platforms Add a new driver for supporting Xilinx platforms. This driver is used for some sequence of operations required for Xilinx USB controllers. This driver is also used to choose between PIPE clock coming from SerDes and the Suspend Clock. Before the controller is out of reset, the clock selection should be changed to PIPE clock in order to make the USB controller work. There is a register added in Xilinx USB controller register space for the same. Signed-off-by: Manish Narani Link: https://lore.kernel.org/r/1615963949-75320-3-git-send-email-manish.narani@xilinx.com Signed-off-by: Greg Kroah-Hartman commit caef9f0716b4b24daea36f8af74d6b1698221051 Author: Manish Narani Date: Wed Mar 17 12:22:28 2021 +0530 dt-bindings: usb: dwc3-xilinx: Add documentation for Versal DWC3 Controller Add documentation for Versal DWC3 controller. Add required property 'reg' for the same. Also add optional properties for snps,dwc3. Reviewed-by: Rob Herring Signed-off-by: Manish Narani Link: https://lore.kernel.org/r/1615963949-75320-2-git-send-email-manish.narani@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 3af32605289e9f508cc40ff1046e15ac6c80d2fa Author: Jia-Ju Bai Date: Sun Mar 7 01:00:30 2021 -0800 usb: renesas_usbhs: fix error return code of usbhsf_pkt_handler() When __usbhsf_pkt_get() returns NULL to pkt, no error return code of usbhsf_pkt_handler() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210307090030.22369-1-baijiaju1990@gmail.com Signed-off-by: Greg Kroah-Hartman commit 835bc48380820d16102feb23819d456765efb692 Author: Tian Tao Date: Mon Mar 22 09:19:38 2021 +0800 drm/sysfs: Convert sysfs sprintf/snprintf family to sysfs_emit Fix the following coccicheck warning: drivers/gpu/drm/drm_sysfs.c:172:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/drm_sysfs.c:185:8-16: WARNING: use scnprintf or sprintf drivers/gpu/drm/drm_sysfs.c:159:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Tian Tao Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1616375978-12151-1-git-send-email-tiantao6@hisilicon.com commit 0c59f678fcfc6dd53ba493915794636a230bc4cc Author: Thinh Nguyen Date: Thu Mar 11 16:58:50 2021 -0800 usb: dwc3: gadget: Remove invalid low-speed setting None of the DWC_usb3x IPs (and all their versions) supports low-speed setting in device mode. In the early days, our "Early Adopter Edition" DWC_usb3 databook shows that the controller may be configured to operate in low-speed, but it was revised on release. Let's remove this invalid speed setting to avoid any confusion. Signed-off-by: Thinh Nguyen Link: https://lore.kernel.org/r/258b1c7fbb966454f4c4c2c1367508998498fc30.1615509438.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman commit 575b1ac410a2da1b76c9662dbeb8e500d061fbf2 Author: Shubhankar Kuranagatti Date: Fri Mar 12 00:39:01 2021 +0530 drivers: usb: host: fotg210-hcd.c: Fix alignment of comment The * has been aligned on each line for block comment. Signed-off-by: Shubhankar Kuranagatti Link: https://lore.kernel.org/r/20210311190901.gaw7m7ndib3uzakm@kewl-virtual-machine Signed-off-by: Greg Kroah-Hartman commit 4e6e85100256937ccb60a67405db5112a33d8741 Author: Shubhankar Kuranagatti Date: Fri Mar 12 00:30:58 2021 +0530 drivers: usb: host: fotg210-hcd.c: Fix indentation error A space was given after tab key. The extra space has been removed. This is done to maintain uniformity in the code. Signed-off-by: Shubhankar Kuranagatti Link: https://lore.kernel.org/r/20210311190058.yudmivcbok56itay@kewl-virtual-machine Signed-off-by: Greg Kroah-Hartman commit aaadc6aea6935e2f36c57056ff756fba0bbc4975 Author: Johan Hovold Date: Thu Mar 18 16:54:06 2021 +0100 USB: core: rename usb_driver_claim_interface() data parameter It's been almost twenty years since the interface "private data" pointer was removed in favour of using the driver-data pointer of struct device. Let's rename the driver-data parameter of usb_driver_claim_interface() so that it better reflects how it's used. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210318155406.22399-2-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit a2a28c25c25a0d35517e16c37e2586de1879242c Author: Johan Hovold Date: Thu Mar 18 16:54:05 2021 +0100 USB: core: drop outdated interface-binding comment It's been almost twenty years since USB drivers returned a data pointer from their probe routines in order to bind to an interface. Time to update the documentation for usb_driver_claim_interface(). Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210318155406.22399-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8460f6003a1d2633737b89c4f69d6f4c0c7c65a3 Author: Arnd Bergmann Date: Mon Mar 22 17:42:26 2021 +0100 usb: sl811-hcd: improve misleading indentation gcc-11 now warns about a confusingly indented code block: drivers/usb/host/sl811-hcd.c: In function ‘sl811h_hub_control’: drivers/usb/host/sl811-hcd.c:1291:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 1291 | if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ | ^~ drivers/usb/host/sl811-hcd.c:1295:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 1295 | break; Rewrite this to use a single if() block with the __is_defined() macro. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210322164244.827589-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 8219ab4c9a09bc746614daaf5240fec82e7fe0e7 Author: Johan Hovold Date: Mon Mar 22 12:12:49 2021 +0100 USB: ehci: drop workaround for forced irq threading Force-threaded interrupt handlers used to run with interrupts enabled, something which could lead to deadlocks in case a threaded handler shared a lock with code running in hard interrupt context (e.g. timer callbacks) and did not explicitly disable interrupts. Since commit 81e2073c175b ("genirq: Disable interrupts for force threaded handlers") interrupt handlers always run with interrupts disabled on non-RT so that drivers no longer need to do handle forced threading ("threadirqs"). Drop the now obsolete workaround added by commit a1227f3c1030 ("usb: ehci: fix deadlock when threadirqs option is used"). Cc: Stanislaw Gruszka Cc: Alan Stern Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Peter Zijlstra Acked-by: Alan Stern Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210322111249.32141-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 0b9828763aeafa5e527b9d98b8789bdb34937fbc Author: Dmitry Osipenko Date: Sat Mar 20 18:19:15 2021 +0300 usb: host: ehci-tegra: Select USB_GADGET Kconfig option Select USB_GADGET Kconfig option in order to fix build failure which happens because ChipIdea driver has a build dependency on both USB_GADGET and USB_EHCI_HCD, while USB_EHCI_TEGRA force-selects the ChipIdea driver without taking into account the tristate USB_GADGET dependency. It's not possible to do anything about the cyclic dependency of the Kconfig options, but USB_EHCI_TEGRA is now a deprecated option that isn't used by defconfigs and USB_GADGET is wanted on Tegra by default, hence it's okay to have a bit clunky workaround for it. Fixes: c3590c7656fb ("usb: host: ehci-tegra: Remove the driver") Reported-by: kernel test robot Acked-by: Alan Stern Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210320151915.7566-2-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit d50229cee69b826815b8e816e4954b594fec4e3c Author: Dmitry Osipenko Date: Sat Mar 20 18:19:14 2021 +0300 ARM: multi_v7_defconfig: Stop using deprecated USB_EHCI_TEGRA The USB_EHCI_TEGRA option is deprecated now and replaced by USB_CHIPIDEA_TEGRA. Replace USB_EHCI_TEGRA with USB_CHIPIDEA_TEGRA in multi_v7_defconfig. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210320151915.7566-1-digetx@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4da57dbbffdfa7fe4e2b70b047fc5ff95ff25a3d Author: Álvaro Fernández Rojas Date: Tue Feb 23 18:44:55 2021 +0100 usb: host: ehci-platform: add spurious_oc DT support Over-current reporting isn't supported on some platforms such as bcm63xx. These devices will incorrectly report over-current if this flag isn't properly activated. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210223174455.1378-4-noltari@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81d23855553aefdc952e8a5eb79c8c352148557e Author: Álvaro Fernández Rojas Date: Tue Feb 23 18:44:54 2021 +0100 dt-bindings: usb: generic-ehci: document spurious-oc flag Over-current reporting isn't supported on some platforms such as bcm63xx. These devices will incorrectly report over-current if this flag isn't properly activated. Acked-by: Rob Herring Signed-off-by: Álvaro Fernández Rojas Acked-by: Alan Stern Link: https://lore.kernel.org/r/20210223174455.1378-3-noltari@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2d5ba37461013253d2ff0a3641b727fd32ea97a9 Author: Florian Fainelli Date: Tue Feb 23 18:44:53 2021 +0100 usb: ehci: add spurious flag to disable overcurrent checking This patch adds an ignore_oc flag which can be set by EHCI controller not supporting or wanting to disable overcurrent checking. The EHCI platform data in include/linux/usb/ehci_pdriver.h is also augmented to take advantage of this new flag. Signed-off-by: Florian Fainelli Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210223174455.1378-2-noltari@gmail.com Signed-off-by: Greg Kroah-Hartman commit 729979e16451233b34f3082bd16b93c354252c50 Author: Chunfeng Yun Date: Mon Mar 8 13:37:34 2021 +0800 dt-bindings: usb: fix yamllint check warning Fix warning: "missing starting space in comment" Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/20210308053745.25697-1-chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f8028fd96f918aeada08fa5e2df1ed80961c7d26 Author: Bhaskar Chowdhury Date: Tue Mar 23 14:53:00 2021 +0530 staging: rtl8723bs: Trivial typo fix s/netowrk/network/ ..and an extra space has removed from the sentence. Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210323092300.1740913-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 49e0efdce791256fef94c3940aea77a0a6b0622e Author: Kishon Vijay Abraham I Date: Mon Mar 8 12:05:50 2021 +0530 PCI: j721e: Add support to provide refclk to PCIe connector Add support to provide refclk to PCIe connector. Link: https://lore.kernel.org/r/20210308063550.6227-5-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi commit 6b7d5394c21d0f0a98a9a9ecc11c8e0f264e9e4b Author: Kishon Vijay Abraham I Date: Mon Mar 8 12:05:49 2021 +0530 dt-bindings: PCI: ti,j721e: Add endpoint mode dt-bindings for TI's AM64 SoC Add endpoint mode dt-bindings for TI's AM64 SoC. This is the same IP used in J7200, however AM64 is a non-coherent architecture. Link: https://lore.kernel.org/r/20210308063550.6227-4-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 3201f355e9a92114d440f05c0c4410173ef7042c Author: Kishon Vijay Abraham I Date: Mon Mar 8 12:05:48 2021 +0530 dt-bindings: PCI: ti,j721e: Add host mode dt-bindings for TI's AM64 SoC Add host mode dt-bindings for TI's AM64 SoC. This is the same IP used in J7200, however AM64 is a non-coherent architecture. Link: https://lore.kernel.org/r/20210308063550.6227-3-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit f9875d1a3630de80240a40c180f0871bee40298a Author: Kishon Vijay Abraham I Date: Mon Mar 8 12:05:47 2021 +0530 dt-bindings: PCI: ti,j721e: Add binding to represent refclk to the connector Add binding to represent refclk to the PCIe connector. Link: https://lore.kernel.org/r/20210308063550.6227-2-kishon@ti.com Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Rob Herring commit 021a90fe60ea08262ad01f9c9d0514d63462b4a7 Author: Geert Uytterhoeven Date: Mon Feb 8 15:23:01 2021 +0100 PCI: mobiveil: Improve PCIE_LAYERSCAPE_GEN4 dependencies - Drop the dependency on PCI, as this is implied by the dependency on PCI_MSI_IRQ_DOMAIN, - Drop the dependencies on OF and ARM64, as the driver compiles fine without OF and/or on other architectures, - The Freescale Layerscape PCIe Gen4 controller is present only on Freescale Layerscape SoCs. Hence depend on ARCH_LAYERSCAPE, to prevent asking the user about this driver when configuring a kernel without Freescale Layerscape support, unless compile-testing. Link: https://lore.kernel.org/r/20210208142301.413582-1-geert+renesas@glider.be Signed-off-by: Geert Uytterhoeven Signed-off-by: Lorenzo Pieralisi commit 5706d02871240fdba7ddd6ab1cc31672fc95a90f Author: Jani Nikula Date: Fri Mar 19 13:53:33 2021 +0200 drm/i915/dsc: fix DSS CTL register usage for ICL DSI transcoders Use the correct DSS CTL registers for ICL DSI transcoders. As a side effect, this also brings back the sanity check for trying to use pipe DSC registers on pipe A on ICL. Fixes: 8a029c113b17 ("drm/i915/dp: Modify VDSC helpers to configure DSC for Bigjoiner slave") References: http://lore.kernel.org/r/87eegxq2lq.fsf@intel.com Cc: Manasi Navare Cc: Animesh Manna Cc: Vandita Kulkarni Cc: # v5.11+ Reviewed-by: Manasi Navare Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210319115333.8330-1-jani.nikula@intel.com commit 92cb01c74ef13ca01e1af836236b140634967b82 Author: Christian Brauner Date: Mon Mar 1 13:45:19 2021 +0100 fs: update kernel-doc for vfs_rename() Commit 9fe61450972d ("namei: introduce struct renamedata") introduces a new struct for vfs_rename() and makes the vfs_rename() kernel-doc argument description out of sync. Move the description of arguments for vfs_rename() to a new kernel-doc for the struct renamedata to make these descriptions checkable against the actual implementation. Link: https://lore.kernel.org/r/20210204180059.28360-3-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Acked-by: Christian Brauner Signed-off-by: Christian Brauner commit 39015399a849843ff8f840b68d16c6ff7c58e0f0 Author: Lukas Bulwahn Date: Thu Feb 4 18:00:55 2021 +0000 fs: turn some comments into kernel-doc While reviewing ./include/linux/fs.h, I noticed that three comments can actually be turned into kernel-doc comments. This allows to check the consistency between the descriptions and the functions' signatures in case they may change in the future. A quick validation with the consistency check: ./scripts/kernel-doc -none include/linux/fs.h currently reports no issues in this file. Link: https://lore.kernel.org/r/20210204180059.28360-2-lukas.bulwahn@gmail.com Signed-off-by: Lukas Bulwahn Acked-by: Christian Brauner Signed-off-by: Christian Brauner commit 6961fed420146297467efe4bc022458818839a1a Author: Randy Dunlap Date: Mon Feb 15 20:29:29 2021 -0800 xattr: fix kernel-doc for mnt_userns and vfs xattr helpers Fix kernel-doc warnings in xattr.c: ../fs/xattr.c:257: warning: Function parameter or member 'mnt_userns' not described in '__vfs_setxattr_locked' ../fs/xattr.c:485: warning: Function parameter or member 'mnt_userns' not described in '__vfs_removexattr_locked' and fix one function whose kernel-doc was not in the correct format. Link: https://lore.kernel.org/r/20210216042929.8931-4-rdunlap@infradead.org Fixes: 71bc356f93a1 ("commoncap: handle idmapped mounts") Fixes: b1ab7e4b2a88 ("VFS: Factor out part of vfs_setxattr so it can be called from the SELinux hook for inode_setsecctx.") Signed-off-by: Randy Dunlap Cc: David Howells Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Cc: Christian Brauner Cc: David P. Quigley Cc: James Morris Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner Signed-off-by: Christian Brauner commit 2111c3c0124f7432fe908c036a50abe8733dbf38 Author: Randy Dunlap Date: Mon Feb 15 20:29:28 2021 -0800 namei: fix kernel-doc for struct renamedata and more Fix kernel-doc warnings in namei.c: ../fs/namei.c:1149: warning: Excess function parameter 'dir_mode' description in 'may_create_in_sticky' ../fs/namei.c:1149: warning: Excess function parameter 'dir_uid' description in 'may_create_in_sticky' ../fs/namei.c:3396: warning: Function parameter or member 'open_flag' not described in 'vfs_tmpfile' ../fs/namei.c:3396: warning: Excess function parameter 'open_flags' description in 'vfs_tmpfile' ../fs/namei.c:4460: warning: Function parameter or member 'rd' not described in 'vfs_rename' ../fs/namei.c:4460: warning: Excess function parameter 'old_mnt_userns' description in 'vfs_rename' ../fs/namei.c:4460: warning: Excess function parameter 'old_dir' description in 'vfs_rename' ../fs/namei.c:4460: warning: Excess function parameter 'old_dentry' description in 'vfs_rename' ../fs/namei.c:4460: warning: Excess function parameter 'new_mnt_userns' description in 'vfs_rename' ../fs/namei.c:4460: warning: Excess function parameter 'new_dir' description in 'vfs_rename' ../fs/namei.c:4460: warning: Excess function parameter 'new_dentry' description in 'vfs_rename' ../fs/namei.c:4460: warning: Excess function parameter 'delegated_inode' description in 'vfs_rename' ../fs/namei.c:4460: warning: Excess function parameter 'flags' description in 'vfs_rename' Link: https://lore.kernel.org/r/20210216042929.8931-3-rdunlap@infradead.org Fixes: 9fe61450972d ("namei: introduce struct renamedata") Signed-off-by: Randy Dunlap Cc: David Howells Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Cc: Christian Brauner Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner Signed-off-by: Christian Brauner commit 59347d9982411d6f4cef831dbbc7a338c5f9119d Author: Randy Dunlap Date: Mon Feb 15 20:29:27 2021 -0800 libfs: fix kernel-doc for mnt_userns Fix kernel-doc warning in libfs.c. ../fs/libfs.c:498: warning: Function parameter or member 'mnt_userns' not described in 'simple_setattr' Link: https://lore.kernel.org/r/20210216042929.8931-2-rdunlap@infradead.org/ Fixes: 549c7297717c ("fs: make helpers idmap mount aware") Signed-off-by: Randy Dunlap Cc: David Howells Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Cc: Christian Brauner Reviewed-by: Christoph Hellwig Acked-by: Christian Brauner Signed-off-by: Christian Brauner commit db998553cf11dd697485ac6142adbb35d21fff10 Author: Christian Brauner Date: Sat Mar 20 13:26:24 2021 +0100 fs: introduce two inode i_{u,g}id initialization helpers Give filesystem two little helpers that do the right thing when initializing the i_uid and i_gid fields on idmapped and non-idmapped mounts. Filesystems shouldn't have to be concerned with too many details. Link: https://lore.kernel.org/r/20210320122623.599086-5-christian.brauner@ubuntu.com Inspired-by: Vivek Goyal Cc: Christoph Hellwig Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 8e5389132ab429604c1a2459b52f0c849a71cc61 Author: Christian Brauner Date: Sat Mar 20 13:26:23 2021 +0100 fs: introduce fsuidgid_has_mapping() helper Don't open-code the checks and instead move them into a clean little helper we can call. This also reduces the risk that if we ever change something we forget to change all locations. Link: https://lore.kernel.org/r/20210320122623.599086-4-christian.brauner@ubuntu.com Inspired-by: Vivek Goyal Cc: Christoph Hellwig Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit a65e58e791a1690da8de731c8391816a22f5555c Author: Christian Brauner Date: Sat Mar 20 13:26:22 2021 +0100 fs: document and rename fsid helpers Vivek pointed out that the fs{g,u}id_into_mnt() naming scheme can be misleading as it could be understood as implying they do the exact same thing as i_{g,u}id_into_mnt(). The original motivation for this naming scheme was to signal to callers that the helpers will always take care to map the k{g,u}id such that the ownership is expressed in terms of the mnt_users. Get rid of the confusion by renaming those helpers to something more sensible. Al suggested mapped_fs{g,u}id() which seems a really good fit. Usually filesystems don't need to bother with these helpers directly only in some cases where they allocate objects that carry {g,u}ids which are either filesystem specific (e.g. xfs quota objects) or don't have a clean set of helpers as inodes have. Link: https://lore.kernel.org/r/20210320122623.599086-3-christian.brauner@ubuntu.com Inspired-by: Vivek Goyal Cc: Christoph Hellwig Cc: Darrick J. Wong Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 1bd66c1a32ca8e5148eaba2675321637e89a49af Author: Christian Brauner Date: Sat Mar 20 13:26:21 2021 +0100 fs: document mapping helpers Document new helpers we introduced this cycle. Link: https://lore.kernel.org/r/20210320122623.599086-2-christian.brauner@ubuntu.com Cc: Al Viro Cc: linux-fsdevel@vger.kernel.org Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Signed-off-by: Christian Brauner commit 2942df675128b156b0bc8571e2cb2d006fc26e84 Author: Greg Kroah-Hartman Date: Tue Feb 16 15:24:00 2021 +0100 driver core: dd: remove deferred_devices variable No need to save the debugfs dentry for the "devices_deferred" debugfs file (gotta love the juxtaposition), if we need to remove it we can look it up from debugfs itself. Cc: "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20210216142400.3759099-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c654cea59dbc352fceafddd44893f3523fdcc08e Author: Greg Kroah-Hartman Date: Tue Feb 16 15:23:59 2021 +0100 driver core: component: remove dentry pointer in "struct master" There is no need to keep around a pointer to a dentry when all it is used for is to remove the debugfs file when tearing things down. As the name is simple, have debugfs look up the dentry when removing things, keeping the logic much simpler. Cc: "Rafael J. Wysocki" Cc: linux-kernel@vger.kernel.org Reviewed-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20210216142400.3759099-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit bbf44abeeabfe05a124535e6c3a9fd7d682d42bf Author: Dave Jiang Date: Thu Feb 11 13:21:29 2021 -0700 driver core: auxiliary bus: Remove unneeded module bits Remove module bits in the auxiliary bus code since the auxiliary bus cannot be built as a module and the relevant code is not needed. Cc: Dave Ertman Suggested-by: Greg Kroah-Hartman Signed-off-by: Dave Jiang Link: https://lore.kernel.org/r/161307488980.1896017.15627190714413338196.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Greg Kroah-Hartman commit 5dd5f9347a927c169205f7385e5cf4e18c41e21a Author: Bhaskar Chowdhury Date: Sun Mar 21 01:42:40 2021 +0530 driver core: Trivial typo fix s/subsytem/subsystem/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210320201240.23745-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 04758386757c1ef339b18d996976911be61d5efb Author: Arnd Bergmann Date: Mon Mar 22 17:41:28 2021 +0100 backlight: journada720: Fix Wmisleading-indentation warning With gcc-11, we get a warning about code that looks correct but badly indented: drivers/video/backlight/jornada720_bl.c: In function ‘jornada_bl_update_status’: drivers/video/backlight/jornada720_bl.c:66:11: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation] 66 | } else /* turn on backlight */ | ^~~~ Change the formatting according to our normal conventions. Fixes: 13a7b5dc0d17 ("backlight: Adds HP Jornada 700 series backlight driver") Signed-off-by: Arnd Bergmann Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 5eb622eec92c224c9e51ce9bf0e99a04c875f8bf Author: Kiran Gunda Date: Thu Mar 18 18:09:40 2021 +0530 backlight: qcom-wled: Correct the sync_toggle sequence As per the current implementation, after FSC (Full Scale Current) and brightness update the sync bits are set-then-cleared. But, the FSC and brightness sync takes place when the sync bits are set (e.g. on a rising edge). So the hardware team recommends a clear-then-set approach in order to guarantee such a transition regardless of the previous register state. Signed-off-by: Kiran Gunda Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 22fce66c19caab5a86b085d147a0e77aaf0ca638 Author: Bhaskar Chowdhury Date: Sun Mar 14 11:57:16 2021 +0530 tty: vt: Mundane typo fix in the file vt.c s/spurrious/spurious/ s/worse/worst/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210314062716.28539-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit c6a419afe324dda15b8a7e05597c4a31d0b8fc17 Author: Andy Shevchenko Date: Wed Mar 3 10:32:29 2021 +0200 vt: keyboard, Fix typo in the doc for vt_get_shift_state() Kernel documentation validator is not happy: .../keyboard.c:2195: warning: expecting prototype for vt_get_shiftstate(). Prototype was for vt_get_shift_state() instead This is due to typo, fix it here. Reviewed-by: Jiri Slaby Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210303083229.75784-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 214df75d5662c989eb309f95072d763ddd2508c6 Author: Seiya Wang Date: Fri Mar 19 10:34:21 2021 +0800 dt-bindings: serial: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of uart for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20210319023427.16711-4-seiya.wang@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 9baedb7baeda68494bc96005612de0ca8d360a5d Author: Johan Hovold Date: Mon Mar 22 12:10:36 2021 +0100 serial: imx: drop workaround for forced irq threading Force-threaded interrupt handlers used to run with interrupts enabled, something which could lead to deadlocks in case a threaded handler shared a lock with code running in hard interrupt context (e.g. timer callbacks) and did not explicitly disable interrupts. This was specifically the case for serial drivers that take the port lock in their console write path as printk can be called from hard interrupt context also with forced threading ("threadirqs"). Since commit 81e2073c175b ("genirq: Disable interrupts for force threaded handlers") interrupt handlers always run with interrupts disabled on non-RT so that drivers no longer need to do handle this. Drop the now obsolete workaround added by commit 33f16855dcb9 ("tty: serial: imx: fix potential deadlock"). Cc: Sam Nobs Cc: Uwe Kleine-König Cc: Thomas Gleixner Cc: Sebastian Andrzej Siewior Cc: Peter Zijlstra Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210322111036.31966-1-johan@kernel.org Signed-off-by: Greg Kroah-Hartman commit 166633c85c21fbe0baec40c898ca5a4f6eee0a08 Author: kernel test robot Date: Mon Mar 22 18:44:34 2021 +0100 drm/gud: Remove unneeded semicolon drivers/gpu/drm/gud/gud_connector.c:658:2-3: Unneeded semicolon drivers/gpu/drm/gud/gud_connector.c:186:2-3: Unneeded semicolon drivers/gpu/drm/gud/gud_drv.c:511:3-4: Unneeded semicolon drivers/gpu/drm/gud/gud_pipe.c:127:4-5: Unneeded semicolon Remove unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Fixes: 40e1a70b4aed ("drm: Add GUD USB Display driver") Reported-by: kernel test robot Signed-off-by: kernel test robot [fix subject and squash 3 per file patches] Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210322174434.58849-2-noralf@tronnes.org commit b91fbdc1df15befb3e51b9795b15d71fa4298602 Author: kernel test robot Date: Mon Mar 22 18:44:33 2021 +0100 drm/gud: fix sizeof use drivers/gpu/drm/gud/gud_connector.c:710:37-43: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Fixes: 40e1a70b4aed ("drm: Add GUD USB Display driver") Reported-by: kernel test robot Signed-off-by: kernel test robot [fix subject] Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210322174434.58849-1-noralf@tronnes.org commit df5d151ee6a034cb4ebf1c7a88be2c46c828e20a Author: Wei Yongjun Date: Mon Mar 22 12:26:01 2021 +0000 serial: pch_uart: fix build error with !CONFIG_DEBUG_FS Fix the build error with CONFIG_DEBUG_FS is not set: drivers/tty/serial/pch_uart.c: In function 'pch_uart_init_port': drivers/tty/serial/pch_uart.c:1815:9: error: 'port_regs_ops' undeclared (first use in this function) 1815 | &port_regs_ops); | ^~~~~~~~~~~~~ This commit get rid of the CONFIG_PM_SLEEP ifdefery to fix the build error. Fixes: 1f8a51ee3242 ("tty: serial: pch_uart.c: remove debugfs dentry pointer") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210322122601.2980258-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 1657ca6e28fa781ab3a8e1fa0223688f5e1edb43 Author: Erwan Le Ray Date: Fri Mar 19 19:42:53 2021 +0100 ARM: dts: stm32: Add wakeup management on stm32mp15x UART nodes Add EXTI lines to the following UART nodes which are used for wakeup from CStop. - EXTI line 26 to USART1 - EXTI line 27 to USART2 - EXTI line 28 to USART3 - EXTI line 29 to USART6 - EXTI line 30 to UART4 - EXTI line 31 to UART5 - EXTI line 32 to UART7 - EXTI line 33 to UART8 Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210319184253.5841-6-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 3d530017bef1de7f7773eb9d3c65fbce924894a2 Author: Alexandre Torgue Date: Fri Mar 19 19:42:52 2021 +0100 serial: stm32: update wakeup IRQ management The wakeup specific IRQ management is no more needed to wake up the stm32 plaform. A relationship has been established between the EXTI and the EVENT IRQ, just need to declare the EXTI interrupt instead of the UART event IRQ. Signed-off-by: Alexandre Torgue Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210319184253.5841-5-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 986e9f6038575d447393d393dc2022a91488110a Author: Erwan Le Ray Date: Fri Mar 19 19:42:51 2021 +0100 irqchip/stm32: add usart instances exti direct event support Add following usart instances exti direct event support (used for UART wake up). - exti 26 (USART1) is mapped to GIC 37 - exti 27 (USART2) is mapped to GIC 38 - exti 28 (USART3) is mapped to GIC 39 - exti 29 (USART6) is mapped to GIC 71 - exti 31 (UART5) is mapped to GIC 53 - exti 32 (UART7) is mapped to GIC 82 - exti 33 (UART8) is mapped to GIC 83 Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210319184253.5841-4-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit c0f3332cb5f2e370c041594fa1ff59db4ee68925 Author: Erwan Le Ray Date: Fri Mar 19 19:42:50 2021 +0100 serial: stm32: clean wakeup handling in serial_suspend Remove useless call to stm32_usart_serial_en_wakeup() routine in suspend callback. When called with "false" argument, this routine is clearing UESM and WUFIE bits if usart is not wakeup source. Those bits are already cleared in set_termios(), and then in serial_resume() callback when usart is wakeup source. Signed-off-by: Alexandre Torgue Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210319184253.5841-3-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 1631eeeaf084acdc29ca0370db8ea436692f71f5 Author: Erwan Le Ray Date: Fri Mar 19 19:42:49 2021 +0100 serial: stm32: rework wakeup management Rework wakeup management by activating uart as wakeup source when usart device OR its tty virtual device parent is wakeup source. This patch aim to avoid potential misalignment between serial and tty wakeup flags. Signed-off-by: Patrice Chotard Signed-off-by: Alexandre Torgue Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210319184253.5841-2-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 0ae798fd96f8c28850e09d22d3f0d455071ed8eb Author: Stephen Kitt Date: Mon Feb 15 18:08:37 2021 +0100 vgacon: drop unused vga_init_done Commit 973c096f6a85 ("vgacon: remove software scrollback support") removed all uses of vga_init_done, so let's get rid of it entirely. Signed-off-by: Stephen Kitt Link: https://lore.kernel.org/r/20210215170837.1599706-1-steve@sk2.org Signed-off-by: Greg Kroah-Hartman commit 77124a427749fc0ed63c818d02f18dbf3a9fcd11 Author: Wang Qing Date: Wed Mar 10 11:07:02 2021 +0800 drivers: tty: serial: sh-sci: fix spelling typo of 'wheter' wheter -> whether Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1615345622-2015-1-git-send-email-wangqing@vivo.com Signed-off-by: Greg Kroah-Hartman commit 8ba0f967ff6e312da80054b9a91743734814ea79 Author: kernel test robot Date: Tue Mar 9 15:17:26 2021 +0100 tty: max310x: fix flexible_array.cocci warnings Zero-length and one-element arrays are deprecated, see Documentation/process/deprecated.rst Flexible-array members should be used instead. Generated by: scripts/coccinelle/misc/flexible_array.cocci Fixes: 10d8b34a42171 ("serial: max310x: Driver rework") CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2103091516020.2892@hadrien Signed-off-by: Greg Kroah-Hartman commit b9edc6823d18751a0070f915da097705074a30f0 Author: Wang Qing Date: Sat Mar 13 15:48:26 2021 +0800 tty: serial: 8250: delete redundant printing of return value platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: Wang Qing Link: https://lore.kernel.org/r/1615621707-2330-1-git-send-email-wangqing@vivo.com Signed-off-by: Greg Kroah-Hartman commit c69b11f3a6d1d205ad4da620baa93fe594aaed7f Author: Krzysztof Kozlowski Date: Mon Mar 15 19:12:12 2021 +0100 tty: serial: samsung_tty: remove spinlock flags in interrupt handlers Since interrupt handler is called with disabled local interrupts, there is no need to use the spinlock primitives disabling interrupts as well. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Johan Hovold Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210315181212.113217-1-krzysztof.kozlowski@canonical.com Signed-off-by: Greg Kroah-Hartman commit 5255cdc306a9b11d900bfc4b366c26c28ea08a02 Author: Bhaskar Chowdhury Date: Tue Mar 23 01:46:48 2021 +0530 staging: rtl8723bs: Mundane typo fixes s/stoping/stopping/ s/arragement/arrangement/ s/eralier/earlier/ Plus one extra word in the sentence "the" removed. Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210322201648.137317-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 13b41b5783068d01c259940975a2ab393b5acec5 Author: Christian Gromm Date: Tue Feb 9 11:13:47 2021 +0100 drivers: most: add ALSA sound driver This patch moves the ALSA sound driver out of the staging area and adds it to the stable part of the MOST driver. Modifications to the Makefiles and Kconfigs are done accordingly to not break the build. Signed-off-by: Christian Gromm Link: https://lore.kernel.org/r/1612865627-29950-1-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman commit 184fc42a73b7420cd86ba478202e69926ec6acfd Author: Tong Zhang Date: Wed Feb 10 04:38:30 2021 +0100 media: atomisp: auto-select VIDEO_V4L2_SUBDEV_API VIDEO_ATOMISP depends on VIDEO_V4L2_SUBDEV_API, if VIDEO_V4L2_SUBDEV_API is not selected, it will cause compilation error drivers/staging/media/atomisp/pci/atomisp_cmd.c:6079:42: error: ‘struct v4l2_subdev_fh’ has no member named ‘pad’ atomisp_subdev_set_ffmt (&asd->subdev, fh.pad, V4L2_SUBDEV_FORMAT_ACTIVE, add auto select VIDEO_V4L2_SUBDEV_API if VIDEO_ATOMISP is selected Link: https://lore.kernel.org/linux-media/20210210033830.961086-1-ztong0001@gmail.com Signed-off-by: Tong Zhang Signed-off-by: Mauro Carvalho Chehab commit ac68fb7f124b7a23ea8ac3c7fd2eae00330d031f Author: Yang Li Date: Thu Jan 21 10:11:52 2021 +0100 media: atomisp: remove redundant NULL check Fix below warnings reported by coccicheck: ./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4269:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/staging/media/atomisp/pci/atomisp_cmd.c:4626:2-8: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/linux-media/1611220312-89384-3-git-send-email-abaci-bugfix@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Mauro Carvalho Chehab commit 58fba0b16cb31114cd78104ed1f8b0a3d6c7790a Author: Yang Li Date: Thu Jan 21 09:28:51 2021 +0100 media: atomisp: remove redundant NULL check Fix below warnings reported by coccicheck: ./drivers/staging/media/atomisp/pci/sh_css_params.c:1575:2-8: WARNING: NULL check before some freeing functions is not needed. ./drivers/staging/media/atomisp/pci/sh_css_params.c:3006:2-8: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/linux-media/1611217731-56866-1-git-send-email-abaci-bugfix@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Robert Foss Signed-off-by: Mauro Carvalho Chehab commit 760dba07bcf6f1a382778d03d090a8fb200405bc Author: Arnd Bergmann Date: Fri Jan 8 09:23:28 2021 +0100 media: atomisp: fix Wvisiblity warning Some randconfig builds include ia_css_firmware.h without first including linux/device.h: In file included from atomisp/pci/mmu/sh_mmu_mrfld.c:23: In file included from atomisp/pci/atomisp_compat.h:22: In file included from atomisp/pci/atomisp_compat_css20.h:24: In file included from atomisp/pci/ia_css.h:28: In file included from atomisp/pci/ia_css_control.h:25: drivers/staging/media/atomisp//pci/ia_css_firmware.h:52:29: error: declaration of 'struct device' will not be visible outside of this function [-Werror,-Wvisibility] Add a forward declaration to avoid the warning. Link: https://lore.kernel.org/linux-media/20210108082337.2305938-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Mauro Carvalho Chehab commit 31e1652faa9e5b39adad6eeae342f24866215281 Author: Filip Kolev Date: Wed Jan 6 19:11:05 2021 +0100 media: atomisp: ov2722: remove unnecessary debug print checkpatch.pl emits the following warning: WARNING: Prefer using '"%s...", __func__' to using 'ov2722_remove', this function's name, in a string + dev_dbg(&client->dev, "ov2722_remove...\n"); This is just a "trace" call and therefore should be removed entirely; ftrace should be used instead. Link: https://lore.kernel.org/linux-media/20210106181158.2270-1-fil.kolev@gmail.com Signed-off-by: Filip Kolev Signed-off-by: Mauro Carvalho Chehab commit c277077bab0d1057c065bc65a1c72885dc566c4b Author: Nicolas Stuardo Diaz Date: Tue Dec 22 04:05:23 2020 +0100 media: media/siano: Fix transmission parameters reporting for ISDB-T The currently used functions for converting the transmission mode and guard interval from the internal values to the DVBv5 API values do not return correct values for ISDB broadcasts: - The raw (debugfs) transmission mode is an integer whose values can be 1, 2 or 3, that corresponds to 2K, 4K and 8K FFT modes respectively. However sms_to_mode() expects values 2, 4 or 8. - Guard interval, as defined by smscoreapi.h returns "1 divided by value" instead of 0, 1, 2, and 3 as defined in sms_to_guard_interval_table(). This commit implements ISDB-T specific methods for converting the internal values for the aforementioned parameters to the DVBv5 API values. It also adds support for reporting FEC and time interleaving values for each one of the layers. [mchehab: fix two coding style whitespace warnings] Link: https://lore.kernel.org/linux-media/20201222030522.28774-1-nicolasstuardodiaz@gmail.com Signed-off-by: Nicolas Stuardo Diaz Signed-off-by: Mauro Carvalho Chehab commit f993b298319acb61dab95382ad99e9cbe8a80ef9 Author: Mauro Carvalho Chehab Date: Tue Mar 23 08:08:56 2021 +0100 media: camera-sensor.rst: fix c:function build warning The :c:function: tag evaluation depends on Sphinx version 2 or 3. Use a syntax that should work with both versions. Link: https://lore.kernel.org/linux-media/e4214991b7d59c0d7aa4e6e48833dc1809c47d47.1616484262.git.mchehab+huawei@kernel.org Fixes: c0e3bcb25390 ("media: camera-sensor.rst: fix a doc build warning") Signed-off-by: Mauro Carvalho Chehab commit e6cb15b500658ef5e39c1e9170d7e521904752b7 Author: Pierre-Louis Bossart Date: Tue Mar 23 08:58:55 2021 +0800 soundwire: qcom: add missing \n in dev_err() We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... 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/20210323005855.20890-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6122d3be2e9aa496434345dbe86c8ebe8084007d Author: Pierre-Louis Bossart Date: Tue Mar 23 08:58:54 2021 +0800 soundwire: stream: add missing \n in dev_err() We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... 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/20210323005855.20890-5-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 7dbdcd611066879d1065e71351d72d6a30fd3402 Author: Pierre-Louis Bossart Date: Tue Mar 23 08:58:53 2021 +0800 soundwire: cadence: add missing \n in dev_err() We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... 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/20210323005855.20890-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 0eb7c387e625f012fd951ff7530d51c46605e07b Author: Pierre-Louis Bossart Date: Tue Mar 23 08:58:52 2021 +0800 soundwire: bandwidth_allocation: add missing \n in dev_err() We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... 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/20210323005855.20890-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 4e3ea93e1399e808852b33753e0caf394b869ba3 Author: Pierre-Louis Bossart Date: Tue Mar 23 08:58:51 2021 +0800 soundwire: intel: add missing \n in dev_err() We fixed a lot of warnings in 2019 but the magic of copy-paste keeps adding new ones... 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/20210323005855.20890-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 78b226d48106fc91628f941c66545f05273269df Author: Andrii Nakryiko Date: Fri Mar 19 13:59:08 2021 -0700 libbpf: Skip BTF fixup if object file has no BTF Skip BTF fixup step when input object file is missing BTF altogether. Fixes: 8fd27bf69b86 ("libbpf: Add BPF static linker BTF and BTF.ext support") Reported-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Tested-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20210319205909.1748642-3-andrii@kernel.org commit 1ab568e92bf8f6a359c977869dc546a23a6b5f13 Author: Kurt Kanzenbach Date: Mon Mar 22 19:51:13 2021 +0100 net: dsa: hellcreek: Report switch name and ID Report the driver name, ASIC ID and the switch name via devlink. This is a useful information for user space tooling. Signed-off-by: Kurt Kanzenbach Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 783cf673b05ebf290317f583ee7eb6967ed9c964 Author: Weihang Li Date: Mon Mar 22 10:44:29 2021 +0800 RDMA/hns: Fix memory corruption when allocating XRCDN It's incorrect to cast the type of pointer to xrcdn from (u32 *) to (unsigned long *), then pass it into hns_roce_bitmap_alloc(), this will lead to a memory corruption. Fixes: 32548870d438 ("RDMA/hns: Add support for XRC on HIP09") Link: https://lore.kernel.org/r/1616381069-51759-1-git-send-email-liweihang@huawei.com Reported-by: Dan Carpenter Signed-off-by: Weihang Li Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e1ce4de68054847326f1f220e163b881736cce69 Author: Bhaskar Chowdhury Date: Mon Mar 22 07:57:51 2021 +0530 IB/hns: Fix mispelling of subsystem s/wubsytem/subsystem/ Link: https://lore.kernel.org/r/20210322022751.4137205-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 50feda23152ed574c0a197116b23ef6786201bee Author: Bhaskar Chowdhury Date: Thu Mar 18 15:34:53 2021 +0530 RDMA/include: Mundane typo fixes throughout the file s/proviee/provide/ s/undelying/underlying/ s/quesiton/question/ s/drivr/driver/ Link: https://lore.kernel.org/r/20210318100453.9759-1-unixbhaskar@gmail.com Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Jason Gunthorpe commit 9a255a0635fedda1499635f1c324347b9600ce70 Merge: add2d73631070 0ce7cf4127f14 Author: David S. Miller Date: Mon Mar 22 17:07:30 2021 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following batch contains Netfilter updates for net-next: 1) Split flowtable workqueues per events, from Oz Shlomo. 2) fall-through warnings for clang, from Gustavo A. R. Silva 3) Remove unused declaration in conntrack, from YueHaibing. 4) Consolidate skb_try_make_writable() in flowtable datapath, simplify some of the existing codebase. 5) Call dst_check() to fall back to static classic forwarding path. 6) Update table flags from commit phase. ==================== Signed-off-by: David S. Miller commit add2d73631070c951b0de81a01d1463a15cfbd47 Author: Eric Dumazet Date: Mon Mar 22 11:21:45 2021 -0700 net: set initial device refcount to 1 When adding CONFIG_PCPU_DEV_REFCNT, I forgot that the initial net device refcount was 0. When CONFIG_PCPU_DEV_REFCNT is not set, this means the first dev_hold() triggers an illegal refcount operation (addition on 0) refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 1 at lib/refcount.c:25 refcount_warn_saturate+0x128/0x1a4 Fix is to change initial (and final) refcount to be 1. Also add a missing kerneldoc piece, as reported by Stephen Rothwell. Fixes: 919067cc845f ("net: add CONFIG_PCPU_DEV_REFCNT") Signed-off-by: Eric Dumazet Reported-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: David S. Miller commit 0ca99c84df6b589b4673460c48ac4064181098cc Merge: 3adffc762d5fa b175dfd7e691b Author: David S. Miller Date: Mon Mar 22 16:37:45 2021 -0700 Merge branch 'dpaa2-switch-offload-port-flags' Ioana Ciornei says: ==================== dpaa2-switch: offload bridge port flags to device Add support for offloading bridge port flags to the switch. With this patch set, the learning, broadcast flooding and unknown ucast/mcast flooding states will be user configurable. Apart from that, the last patch is a small fix that configures the offload_fwd_mark if the switch port is under a bridge or not. ==================== Signed-off-by: David S. Miller commit b175dfd7e691ba264d190f23197cc29d0ba8bc67 Author: Ioana Ciornei Date: Mon Mar 22 22:58:59 2021 +0200 dpaa2-switch: mark skbs with offload_fwd_mark If a switch port is under a bridge, the offload_fwd_mark should be setup before sending the skb towards the stack so that the bridge does not try to flood the packet on the other switch ports. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 6253d5e39ce2bba13c601274768c481846526a80 Author: Ioana Ciornei Date: Mon Mar 22 22:58:58 2021 +0200 dpaa2-switch: add support for configuring per port unknown flooding Add support for configuring per port unknown flooding by accepting both BR_FLOOD and BR_MCAST_FLOOD as offloadable bridge port flags. The DPAA2 switch does not support at the moment configuration of unknown multicast flooding independently of unknown unicast flooding, therefore check that both BR_FLOOD and BR_MCAST_FLOOD have the same state. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit b54eb093f5ce784ca00170d4512c47cdc755397e Author: Ioana Ciornei Date: Mon Mar 22 22:58:57 2021 +0200 dpaa2-switch: add support for configuring per port broadcast flooding The BR_BCAST_FLOOD bridge port flag is now accepted by the driver and a change in its state will determine a reconfiguration of the broadcast egress flooding list on the FDB associated with the port. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 1e7cbabfdb12aa944ae0cb03871f8b55ede1341a Author: Ioana Ciornei Date: Mon Mar 22 22:58:56 2021 +0200 dpaa2-switch: add support for configuring learning state per port Add support for configuring the learning state of a switch port. When the user requests the HW learning to be disabled, a fast-age procedure on that specific port is run so that previously learnt addresses do not linger. At device probe as well as on a bridge leave action, the ports are configured with HW learning disabled since they are basically a standalone port. At the same time, at bridge join we inherit the bridge port BR_LEARNING flag state and configure it on the switch port. There were already some MC firmware ABI functions for changing the learning state, but those were per FDB (bridging domain) and not per port so we need to adjust those to use the new MC fw command which is per port. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit f054e3e217e40ed343a0cea8c68cc053d40f81bd Author: Ioana Ciornei Date: Mon Mar 22 22:58:55 2021 +0200 dpaa2-switch: refactor the egress flooding domain setup Extract the code that determines the list of egress flood interfaces for a specific flood type into a new function - dpaa2_switch_fdb_get_flood_cfg(). This will help us to not duplicate code when the broadcast and unknown ucast/mcast flooding domains will be individually configurable. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit c7e856c85981722013cbdfa8f5324c2ad8c803f4 Author: Ioana Ciornei Date: Mon Mar 22 22:58:54 2021 +0200 dpaa2-switch: move the dpaa2_switch_fdb_set_egress_flood function In order to avoid a forward declaration in the next patches, move the dpaa2_switch_fdb_set_egress_flood() function to the top of the file. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 3adffc762d5fa8f7d0087819839305a6fba68ced Merge: 853b0df95285d ee83d82407e49 Author: David S. Miller Date: Mon Mar 22 16:33:39 2021 -0700 Merge branch 'lantiq-xrx300-xrx330' Aleksander Jan Bajkowski says: ==================== net: dsa: lantiq: add support for xRX300 and xRX330 Changed since v3: * fixed last compilation warning Changed since v2: * fixed compilation warnings * removed example bindings for xrx330 * patches has been refactored due to upstream changes Changed since v1: * gswip_mii_mask_cfg() can now change port 3 on xRX330 * changed alowed modes on port 0 and 5 for xRX300 and xRX330 * moved common part of phylink validation into gswip_phylink_set_capab() * verify the compatible string against the hardware ==================== Signed-off-by: David S. Miller commit ee83d82407e490ece848b13a4d86600e1e3269a5 Author: Aleksander Jan Bajkowski Date: Mon Mar 22 21:37:17 2021 +0100 dt-bindings: net: dsa: lantiq: add xRx300 and xRX330 switch bindings Add compatible string for xRX300 and xRX330 SoCs. Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: David S. Miller commit 204c7614738ee4b3fe6269950d367212e790498c Author: Aleksander Jan Bajkowski Date: Mon Mar 22 21:37:16 2021 +0100 net: dsa: lantiq: verify compatible strings against hardware Verify compatible string against hardware. Signed-off-by: Aleksander Jan Bajkowski Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller commit a09d042b086202735c4ed64573cdd79933020001 Author: Aleksander Jan Bajkowski Date: Mon Mar 22 21:37:15 2021 +0100 net: dsa: lantiq: allow to use all GPHYs on xRX300 and xRX330 This patch allows to use all PHYs on GRX300 and GRX330. The ARX300 has 3 and the GRX330 has 4 integrated PHYs connected to different ports compared to VRX200. Each integrated PHY can work as single Gigabit Ethernet PHY (GMII) or as double Fast Ethernet PHY (MII). Allowed port configurations: xRX200: GMAC0: RGMII, MII, REVMII or RMII port GMAC1: RGMII, MII, REVMII or RMII port GMAC2: GPHY0 (GMII) GMAC3: GPHY0 (MII) GMAC4: GPHY1 (GMII) GMAC5: GPHY1 (MII) or RGMII port xRX300: GMAC0: RGMII port GMAC1: GPHY2 (GMII) GMAC2: GPHY0 (GMII) GMAC3: GPHY0 (MII) GMAC4: GPHY1 (GMII) GMAC5: GPHY1 (MII) or RGMII port xRX330: GMAC0: RGMII, GMII or RMII port GMAC1: GPHY2 (GMII) GMAC2: GPHY0 (GMII) GMAC3: GPHY0 (MII) or GPHY3 (GMII) GMAC4: GPHY1 (GMII) GMAC5: GPHY1 (MII), RGMII or RMII port Tested on D-Link DWR966 (xRX330) with OpenWRT. Signed-off-by: Aleksander Jan Bajkowski Acked-by: Hauke Mehrtens Signed-off-by: David S. Miller commit 853b0df95285d790b3b5eb4790f257b6f1a609e1 Merge: ec8136cdcb153 a6379db818a85 Author: David S. Miller Date: Mon Mar 22 16:29:40 2021 -0700 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 100GbE Intel Wired LAN Driver Updates 2021-03-22 This series contains updates to ice and iavf drivers. Haiyue Wang says: The Intel E810 Series supports a programmable pipeline for a domain specific protocols classification, for example GTP by Dynamic Device Personalization (DDP) profile. The E810 PF has introduced flex-bytes support by ethtool user-def option allowing for packet deeper matching based on an offset and value for DDP usage. For making VF also benefit from this flexible protocol classification, some new virtchnl messages are defined and handled by PF, so VF can query this new flow director capability, and use ethtool with extending the user-def option to configure Rx flow classification. The new user-def 0xAAAABBBBCCCCDDDD: BBBB is the 2 byte pattern while AAAA corresponds to its offset in the packet. Similarly DDDD is the 2 byte pattern with CCCC being the corresponding offset. The offset ranges from 0x0 to 0x1F7 (up to 504 bytes into the packet). The offset starts from the beginning of the packet. This feature can be used to allow customers to set flow director rules for protocols headers that are beyond standard ones supported by ethtool (e.g. PFCP or GTP-U). Like for matching GTP-U's TEID value 0x10203040: ethtool -N ens787f0v0 flow-type udp4 dst-port 2152 \ user-def 0x002e102000303040 action 13 ==================== Signed-off-by: David S. Miller commit e14cfb3bdd0f82147d09e9f46bedda6302f28ee1 Author: Arnd Bergmann Date: Mon Mar 22 17:02:39 2021 +0100 x86/boot/compressed: Avoid gcc-11 -Wstringop-overread warning GCC gets confused by the comparison of a pointer to an integer literal, with the assumption that this is an offset from a NULL pointer and that dereferencing it is invalid: In file included from arch/x86/boot/compressed/misc.c:18: In function ‘parse_elf’, inlined from ‘extract_kernel’ at arch/x86/boot/compressed/misc.c:442:2: arch/x86/boot/compressed/../string.h:15:23: error: ‘__builtin_memcpy’ reading 64 bytes from a region of size 0 [-Werror=stringop-overread] 15 | #define memcpy(d,s,l) __builtin_memcpy(d,s,l) | ^~~~~~~~~~~~~~~~~~~~~~~ arch/x86/boot/compressed/misc.c:283:9: note: in expansion of macro ‘memcpy’ 283 | memcpy(&ehdr, output, sizeof(ehdr)); | ^~~~~~ I could not find any good workaround for this, but as this is only a warning for a failure during early boot, removing the line entirely works around the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Cc: Linus Torvalds Cc: Martin Sebor Link: https://lore.kernel.org/r/20210322160253.4032422-2-arnd@kernel.org commit cdc34cb8f25d3125d30868376b8eae6fe690119b Author: Arnd Bergmann Date: Mon Mar 22 17:02:40 2021 +0100 x86/boot/tboot: Avoid Wstringop-overread-warning gcc-11 warns about using string operations on pointers that are defined at compile time as offsets from a NULL pointer. Unfortunately that also happens on the result of fix_to_virt(), which is a compile-time constant for a constant input: arch/x86/kernel/tboot.c: In function 'tboot_probe': arch/x86/kernel/tboot.c:70:13: error: '__builtin_memcmp_eq' specified bound 16 exceeds source size 0 [-Werror=stringop-overread] 70 | if (memcmp(&tboot_uuid, &tboot->uuid, sizeof(tboot->uuid))) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I hope this can get addressed in gcc-11 before the release. As a workaround, split up the tboot_probe() function in two halves to separate the pointer generation from the usage. This is a bit ugly, and hopefully gcc understands that the code is actually correct before it learns to peek into the noinline function. Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Cc: Linus Torvalds Cc: Martin Sebor Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578 Link: https://lore.kernel.org/r/20210322160253.4032422-3-arnd@kernel.org commit 279d56abc67ed7568168cb31bf1c7d735efc89a7 Author: Arnd Bergmann Date: Mon Mar 22 22:48:19 2021 +0100 x86/fpu/math-emu: Fix function cast warning Building with 'make W=1', gcc points out that casting between incompatible function types can be dangerous: arch/x86/math-emu/fpu_trig.c:1638:60: error: cast between incompatible function types from ‘int (*)(FPU_REG *, u_char)’ {aka ‘int (*)(struct fpu__reg *, unsigned char)’} to ‘void (*)(FPU_REG *, u_char)’ {aka ‘void (*)(struct fpu__reg *, unsigned char)’} [-Werror=cast-function-type] 1638 | fprem, fyl2xp1, fsqrt_, fsincos, frndint_, fscale, (FUNC_ST0) fsin, fcos | ^ This one seems harmless, but it is easy enough to work around it by adding an intermediate function that adjusts the return type. Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210322214824.974323-1-arnd@kernel.org commit bf9a40ae8d722f281a2721779595d6df1c33a0bf Author: Peilin Ye Date: Fri Dec 11 09:30:39 2020 +0100 media: dvbdev: Fix memory leak in dvb_media_device_free() dvb_media_device_free() is leaking memory. Free `dvbdev->adapter->conn` before setting it to NULL, as documented in include/media/media-device.h: "The media_entity instance itself must be freed explicitly by the driver if required." Link: https://syzkaller.appspot.com/bug?id=9bbe4b842c98f0ed05c5eed77a226e9de33bf298 Link: https://lore.kernel.org/linux-media/20201211083039.521617-1-yepeilin.cs@gmail.com Cc: stable@vger.kernel.org Fixes: 0230d60e4661 ("[media] dvbdev: Add RF connector if needed") Reported-by: syzbot+7f09440acc069a0d38ac@syzkaller.appspotmail.com Signed-off-by: Peilin Ye Signed-off-by: Mauro Carvalho Chehab commit 23817e5c4bb8ac28cd6bbf463d07fb3120a08660 Author: Xu Wang Date: Fri Dec 25 09:45:24 2020 +0100 media: atomisp: Remove redundant NULL check ./drivers/staging/media/atomisp/pci/isp/kernels/sdis/sdis_1.0/ia_css_sdis.host.c:390:2-8: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/linux-media/20201225084524.64839-1-vulab@iscas.ac.cn Signed-off-by: Xu Wang Signed-off-by: Mauro Carvalho Chehab commit c63ef1429ac05b2447b9f8773b60c3317e6b81e3 Author: Xu Wang Date: Fri Dec 25 09:38:18 2020 +0100 media: atomisp: Remove redundant NULL check Fix warnings reported by coccicheck: ./drivers/staging/media/atomisp/pci/runtime/isp_param/src/isp_param.c:159:4-10: WARNING: NULL check before some freeing functions is not needed. Link: https://lore.kernel.org/linux-media/20201225083818.64588-1-vulab@iscas.ac.cn Signed-off-by: Xu Wang Signed-off-by: Mauro Carvalho Chehab commit c606970d4250dfb95869a563975c08bab148137a Author: Aditya Srivastava Date: Mon Dec 14 14:27:16 2020 +0100 media: atomisp: replace boolean comparison of values with bool variables There are certain expressions in a condition in atomisp, where a boolean variable is compared with true/false in forms such as (foo == true) or (false != bar), which does not comply with the coding style rule by checkpatch.pl (CHK: BOOL_COMPARISON), according to which the boolean variables should be themselves used in the condition, rather than comparing with true or false. E.g. In drivers/staging/media/atomisp/pci/atomisp_compat_css20.c: if (asd->stream_prepared == false) { Can be replaced with: if (!asd->stream_prepared) { Replace such expressions with boolean variables appropriately. Link: https://lore.kernel.org/linux-media/20201214132716.28157-1-yashsri421@gmail.com Signed-off-by: Aditya Srivastava Signed-off-by: Mauro Carvalho Chehab commit ba11bbf303fafb33989e95473e409f6ab412b18d Author: Dan Carpenter Date: Mon Dec 14 12:53:31 2020 +0100 media: atomisp: Fix use after free in atomisp_alloc_css_stat_bufs() The "s3a_buf" is freed along with all the other items on the "asd->s3a_stats" list. It leads to a double free and a use after free. Link: https://lore.kernel.org/linux-media/X9dSO3RGf7r0pq2k@mwanda Fixes: ad85094b293e ("Revert "media: staging: atomisp: Remove driver"") Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab commit 4bf07f6562a01a488877e05267808da7147f44a5 Author: Ingo Molnar Date: Mon Mar 22 22:39:03 2021 +0100 timekeeping, clocksource: Fix various typos in comments Fix ~56 single-word typos in timekeeping & clocksource code comments. Signed-off-by: Ingo Molnar Cc: Thomas Gleixner Cc: John Stultz Cc: Stephen Boyd Cc: Daniel Lezcano Cc: linux-kernel@vger.kernel.org commit b700fc3a63f16d6e130433fdcbe3f5f223c7662c Author: Steven Rostedt (VMware) Date: Mon Mar 22 17:47:37 2021 -0400 scripts/recordmcount.pl: Make vim and emacs indent the same By default, emacs indents Perl files with 4 spaces, but will use tabs where 8 spaces are used. Add a vim command of softtabstop=4, to make vim behave the same. This should remove the issue of developers using vim having causing different indentation. "John (Warthog9) Hawley" Signed-off-by: Steven Rostedt (VMware) commit 2cf3af7aa6df0e173f2bff57b73427bb05b30ba0 Author: Steven Rostedt (VMware) Date: Mon Mar 22 17:45:22 2021 -0400 scripts/recordmcount.pl: Make indent spacing consistent Emacs by default will have perl files have 4 space indents, where 8 spaces are represented with a single tab. There are some places in recordmcount.pl that has 8 spaces where a tab should be used. Replace them to make the file consistent. No functional changes. Cc: "John (Warthog9) Hawley" Signed-off-by: Steven Rostedt (VMware) commit 7189b3c11903667808029ec9766a6e96de5012a5 Author: Otavio Pontes Date: Fri Mar 19 09:55:15 2021 -0700 x86/microcode: Check for offline CPUs before requesting new microcode Currently, the late microcode loading mechanism checks whether any CPUs are offlined, and, in such a case, aborts the load attempt. However, this must be done before the kernel caches new microcode from the filesystem. Otherwise, when offlined CPUs are onlined later, those cores are going to be updated through the CPU hotplug notifier callback with the new microcode, while CPUs previously onine will continue to run with the older microcode. For example: Turn off one core (2 threads): echo 0 > /sys/devices/system/cpu/cpu3/online echo 0 > /sys/devices/system/cpu/cpu1/online Install the ucode fails because a primary SMT thread is offline: cp intel-ucode/06-8e-09 /lib/firmware/intel-ucode/ echo 1 > /sys/devices/system/cpu/microcode/reload bash: echo: write error: Invalid argument Turn the core back on echo 1 > /sys/devices/system/cpu/cpu3/online echo 1 > /sys/devices/system/cpu/cpu1/online cat /proc/cpuinfo |grep microcode microcode : 0x30 microcode : 0xde microcode : 0x30 microcode : 0xde The rationale for why the update is aborted when at least one primary thread is offline is because even if that thread is soft-offlined and idle, it will still have to participate in broadcasted MCE's synchronization dance or enter SMM, and in both examples it will execute instructions so it better have the same microcode revision as the other cores. [ bp: Heavily edit and extend commit message with the reasoning behind all this. ] Fixes: 30ec26da9967 ("x86/microcode: Do not upload microcode if CPUs are offline") Signed-off-by: Otavio Pontes Signed-off-by: Borislav Petkov Reviewed-by: Tony Luck Acked-by: Ashok Raj Link: https://lkml.kernel.org/r/20210319165515.9240-2-otavio.pontes@intel.com commit ec8136cdcb1531b12c0b896fcc1a930035495c1d Merge: 0353b4a96b7a9 ea037b236a058 Author: David S. Miller Date: Mon Mar 22 13:45:46 2021 -0700 Merge branch 'mlxsw-resil-nexthop-groups-prep' Ido Schimmel says: ==================== mlxsw: Preparations for resilient nexthop groups This patchset contains preparations for resilient nexthop groups support in mlxsw. A follow-up patchset will add support and selftests. Most of the patches are trivial and small to make review easier. Patchset overview: Patch #1 removes RTNL assertion in nexthop notifier block since it is not needed. The assertion will trigger when mlxsw starts processing notifications related to resilient groups as not all are emitted with RTNL held. Patches #2-#9 gradually add support for nexthops with trap action. Up until now mlxsw did not program nexthops whose neighbour entry was not resolved. This will not work with resilient groups as their size is fixed and the nexthop mapped to each bucket is determined by the nexthop code. Therefore, nexthops whose neighbour entry is not resolved will be programmed to trap packets to the CPU in order to trigger neighbour resolution. Patch #10 is a non-functional change to allow for code reuse between regular nexthop groups and resilient ones. Patch #11 avoids unnecessary neighbour updates in hardware. See the commit message for a detailed explanation. Patches #12-#14 add support for additional nexthop group sizes that are supported by Spectrum-{2,3} ASICs. ==================== Signed-off-by: David S. Miller commit ea037b236a05822fba43b98ca68e91859e03bb64 Author: Ido Schimmel Date: Mon Mar 22 17:58:55 2021 +0200 mlxsw: spectrum_router: Add Spectrum-{2, 3} adjacency group size ranges Spectrum-{2,3} support different adjacency group size ranges compared to Spectrum-1. Add an array describing these ranges and change the common code to use the array which was set during the per-ASIC initialization. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 164fa130dd1671797c4249195bc7f5447a34a9c2 Author: Ido Schimmel Date: Mon Mar 22 17:58:54 2021 +0200 mlxsw: spectrum_router: Encode adjacency group size ranges in an array The device supports a fixed set of adjacency group sizes. Encode these sizes in an array, so that the next patch will be able to split it between Spectrum-1 and Spectrum-{2,3}, which support different size ranges. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit d354fdd923e7a3dc2f5c34cfcfb0401bd8c56ea8 Author: Ido Schimmel Date: Mon Mar 22 17:58:53 2021 +0200 mlxsw: spectrum_router: Create per-ASIC router operations There are several differences in the router module between Spectrum-1 and Spectrum-{2,3}. Currently, this is only apparent in the router interface (RIF) operations that are split between these ASICs. A subsequent patch is going to introduce another difference between these ASICs. Create per-ASIC router operations that will encapsulate all these differences. For now, these operations are only used to set the per-ASIC RIF operations in 'mlxsw_sp->router->rif_ops_arr'. Note that this fields was unused since commit 1f5b23033937 ("mlxsw: spectrum: Set RIF ops per ASIC type"). Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit c1efd50002c00cbe51014ddf357d55162cd7d6d8 Author: Ido Schimmel Date: Mon Mar 22 17:58:52 2021 +0200 mlxsw: spectrum_router: Avoid unnecessary neighbour updates Avoid updating neighbour and adjacency entries in hardware when the neighbour is already connected and its MAC address did not change. This can happen, for example, when neighbour transitions between valid states such as 'NUD_REACHABLE' and 'NUD_DELAY'. This is especially important for resilient hashing as these updates will result in adjacency entries being marked as active. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 40f5429fce693bfb79dd9ec78d60576f17f13c76 Author: Ido Schimmel Date: Mon Mar 22 17:58:51 2021 +0200 mlxsw: spectrum_router: Break nexthop group entry validation to a separate function The validation of a nexthop group entry is also necessary for resilient nexthop groups, so break the validation to a separate function to allow for code reuse in subsequent patches. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 29017c643476daf57495c2ccd1a5fdc8dc5186ea Author: Ido Schimmel Date: Mon Mar 22 17:58:50 2021 +0200 mlxsw: spectrum_router: Encapsulate nexthop update in a function Encapsulate this functionality in a separate function, so that it could be invoked by follow-up patches, when replacing a nexthop bucket that is part of a resilient nexthop group. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 424603ccdd5eb00725f9080d7e8c018039816d17 Author: Ido Schimmel Date: Mon Mar 22 17:58:49 2021 +0200 mlxsw: spectrum_router: Rename nexthop update function to reflect its type mlxsw_sp_nexthop_update() is used to update the configuration of Ethernet-type nexthops, as opposed to mlxsw_sp_nexthop_ipip_update(), which is used to update IPinIP-type nexthops. Rename the function to mlxsw_sp_nexthop_eth_update(), so that it is consistent with mlxsw_sp_nexthop_ipip_update(). It will allow us to introduce mlxsw_sp_nexthop_update() in a follow-up patch, which calls either of above mentioned function based on the nexthop's type. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit fc199d7c08c837095083e4c77678d9de1546945c Author: Ido Schimmel Date: Mon Mar 22 17:58:48 2021 +0200 mlxsw: spectrum_router: Add nexthop trap action support Currently, nexthops are programmed with either forward or discard action (for blackhole nexthops). Nexthops that do not have a valid MAC address (neighbour) or router interface (RIF) are simply not written to the adjacency table. In resilient nexthop groups, the size of the group must remain fixed and the kernel is in complete control of the layout of the adjacency table. A nexthop without a valid MAC or RIF will therefore be written with a trap action, to trigger neighbour resolution. Allow such nexthops to be programmed to the adjacency table to enable above mentioned use case. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 1be2361e3ca715cd9315c3c4ebede8cdcfcbf7d5 Author: Ido Schimmel Date: Mon Mar 22 17:58:47 2021 +0200 mlxsw: spectrum_router: Prepare for nexthops with trap action Nexthops that need to be programmed with a trap action might not have a valid router interface (RIF) associated with them. Therefore, use the loopback RIF created during initialization to program them to the device. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 031d5c16065606efc387aa6865690037c13cefc4 Author: Ido Schimmel Date: Mon Mar 22 17:58:46 2021 +0200 mlxsw: spectrum_router: Introduce nexthop action field Currently, the action associated with the nexthop is assumed to be 'forward' unless the 'discard' bit is set. Instead, simplify this by introducing a dedicated field to represent the action of the nexthop. This will allow us to more easily introduce more actions, such as trap. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 248136fa251abfbd862194175977afd57ab5e760 Author: Ido Schimmel Date: Mon Mar 22 17:58:45 2021 +0200 mlxsw: spectrum_router: Adjust comments on nexthop fields The comments assume that nexthops are simple Ethernet nexthops that are programmed to forward packets to the associated neighbour. This is no longer the case, as both IPinIP and blackhole nexthops are now supported. Adjust the comments to reflect these changes. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit c6a5011bec0962cfddcce48065e29c65e9a6ec18 Author: Ido Schimmel Date: Mon Mar 22 17:58:44 2021 +0200 mlxsw: spectrum_router: Only provide MAC address for valid nexthops The helper returns the MAC address associated with the nexthop. It is only valid when the nexthop forwards packets and when it is an Ethernet nexthop. Reflect this in the checks the helper is performing. This is not an issue because the sole caller of the function only invokes it for such nexthops. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 26df5acc275b8b5fb14de1301feed6697f2433cf Author: Ido Schimmel Date: Mon Mar 22 17:58:43 2021 +0200 mlxsw: spectrum_router: Consolidate nexthop helpers The helper mlxsw_sp_nexthop_offload() is actually interested in finding out if the nexthop is both written to the adjacency table and forwarding packets (as opposed to discarding them). Rename it to mlxsw_sp_nexthop_is_forward() and remove mlxsw_sp_nexthop_is_discard(). Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 08c99b92d76c5bb0208cf89cafd502bdb3b2c98c Author: Ido Schimmel Date: Mon Mar 22 17:58:42 2021 +0200 mlxsw: spectrum_router: Remove RTNL assertion Remove the RTNL assertion in the nexthop notifier block. The assertion is not needed given RTNL is never assumed to be taken. This is a preparation for future patches where mlxsw will start handling nexthop events that are not always sent with RTNL held. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: David S. Miller commit 396a66aa1172ef2b78c21651f59b40b87b2e5e1e Author: Arnd Bergmann Date: Mon Mar 22 17:45:36 2021 +0100 x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes gcc-11 warns about mismatched prototypes here: arch/x86/lib/msr-smp.c:255:51: error: argument 2 of type ‘u32 *’ {aka ‘unsigned int *’} declared as a pointer [-Werror=array-parameter=] 255 | int rdmsr_safe_regs_on_cpu(unsigned int cpu, u32 *regs) | ~~~~~^~~~ arch/x86/include/asm/msr.h:347:50: note: previously declared as an array ‘u32[8]’ {aka ‘unsigned int[8]’} GCC is right here - fix up the types. [ mingo: Twiddled the changelog. ] Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210322164541.912261-1-arnd@kernel.org commit 0353b4a96b7a9f60fe20d1b3ebd4931a4085f91c Author: Nikolay Aleksandrov Date: Mon Mar 22 17:45:27 2021 +0200 net: bridge: when suppression is enabled exclude RARP packets Recently we had an interop issue where RARP packets got suppressed with bridge neigh suppression enabled, but the check in the code was meant to suppress GARP. Exclude RARP packets from it which would allow some VMWare setups to work, to quote the report: "Those RARP packets usually get generated by vMware to notify physical switches when vMotion occurs. vMware may use random sip/tip or just use sip=tip=0. So the RARP packet sometimes get properly flooded by the vtep and other times get dropped by the logic" Reported-by: Amer Abdalamer Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 7f08ec6e04269ce53b664761c9108b44ed2f54ab Author: Antoine Tenart Date: Mon Mar 22 16:43:29 2021 +0100 net-sysfs: remove possible sleep from an RCU read-side critical section xps_queue_show is mostly made of an RCU read-side critical section and calls bitmap_zalloc with GFP_KERNEL in the middle of it. That is not allowed as this call may sleep and such behaviours aren't allowed in RCU read-side critical sections. Fix this by using GFP_NOWAIT instead. Fixes: 5478fcd0f483 ("net: embed nr_ids in the xps maps") Reported-by: kernel test robot Suggested-by: Matthew Wilcox Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 7ec05a6035480f3a5934b2b31222620b2e906163 Author: Wei Yongjun Date: Mon Mar 22 12:23:59 2021 +0000 net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP Get rid of the CONFIG_PM_SLEEP ifdefery to fix the build error and use __maybe_unused for the suspend()/resume() hooks to avoid build warning: drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:21: error: 'stmmac_runtime_suspend' undeclared here (not in a function); did you mean 'stmmac_suspend'? 769 | SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL) | ^~~~~~~~~~~~~~~~~~~~~~ ./include/linux/pm.h:342:21: note: in definition of macro 'SET_RUNTIME_PM_OPS' 342 | .runtime_suspend = suspend_fn, \ | ^~~~~~~~~~ drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:45: error: 'stmmac_runtime_resume' undeclared here (not in a function) 769 | SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL) | ^~~~~~~~~~~~~~~~~~~~~ ./include/linux/pm.h:343:20: note: in definition of macro 'SET_RUNTIME_PM_OPS' 343 | .runtime_resume = resume_fn, \ | ^~~~~~~~~ Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit aa785f93fcb4e8c66f5d3de88cd7626774f13c1d Author: Bhaskar Chowdhury Date: Mon Mar 22 17:51:55 2021 +0530 net: l2tp: Fix a typo s/verifed/verified/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 13e8c216d2ed0bf99b6e8ae4d1edd1f17d6b6448 Author: Arnd Bergmann Date: Mon Mar 22 13:14:47 2021 +0100 misdn: avoid -Wempty-body warning gcc warns about a pointless condition: drivers/isdn/hardware/mISDN/hfcmulti.c: In function 'hfcmulti_interrupt': drivers/isdn/hardware/mISDN/hfcmulti.c:2752:17: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 2752 | ; /* external IRQ */ As the check has no effect, just remove it. Suggested-by: Leon Romanovsky Signed-off-by: Arnd Bergmann Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller commit 744b8376632208137fe4acc9967b93e2970732a3 Author: Vladimir Oltean Date: Mon Mar 22 13:31:48 2021 +0200 net: move the ptype_all and ptype_base declarations to include/linux/netdevice.h ptype_all and ptype_base are declared in net/core/dev.c as non-static, because they are used by net-procfs.c too. However, a "make W=1" build complains that there was no previous declaration of ptype_all and ptype_base in a header file, so this way of declaring things constitutes a violation of coding style. Let's move the extern declarations of ptype_all and ptype_base to the linux/netdevice.h file, which is included by net-procfs.c too. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5da9ace3405f40d8d93c1b519696f47bc4402318 Author: Vladimir Oltean Date: Mon Mar 22 13:30:19 2021 +0200 net: make xps_needed and xps_rxqs_needed static Since their introduction in commit 04157469b7b8 ("net: Use static_key for XPS maps"), xps_needed and xps_rxqs_needed were never used outside net/core/dev.c, so I don't really understand why they were exported as symbols in the first place. This is needed in order to silence a "make W=1" warning about these static keys not being declared as static variables, but not having a previous declaration in a header file nonetheless. Cc: Amritha Nambiar Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f5fcca89f59c84a917e6d470258a12eb3244875e Author: Vladimir Oltean Date: Mon Mar 22 12:38:19 2021 +0200 net: bridge: declare br_vlan_tunnel_lookup argument tunnel_id as __be64 The only caller of br_vlan_tunnel_lookup, br_handle_ingress_vlan_tunnel, extracts the tunnel_id from struct ip_tunnel_info::struct ip_tunnel_key:: tun_id which is a __be64 value. The exact endianness does not seem to matter, because the tunnel id is just used as a lookup key for the VLAN group's tunnel hash table, and the value is not interpreted directly per se. Moreover, rhashtable_lookup_fast treats the key argument as a const void *. Therefore, there is no functional change associated with this patch, just one to silence "make W=1" builds. Signed-off-by: Vladimir Oltean Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit c3c3791ce31eb7b4fa140df20985285516ef99f2 Author: Jiapeng Chong Date: Mon Mar 22 17:53:14 2021 +0800 cxgb4: Remove redundant NULL check Fix the following coccicheck warnings: ./drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c:3540:2-8: WARNING: NULL check before some freeing functions is not needed. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: David S. Miller commit 3de43dc98615b15516ec65591ebe28ceb7d8d921 Author: Vladimir Oltean Date: Mon Mar 22 11:30:09 2021 +0200 net: dsa: mv88e6xxx: fix up kerneldoc some more Commit 0b5294483c35 ("net: dsa: mv88e6xxx: scratch: Fixup kerneldoc") has addressed some but not all kerneldoc warnings for the Global 2 Scratch register accessors. Namely, we have some mismatches between the function names in the kerneldoc and the ones in the actual code. Let's adjust the comments so that they match the functions they're sitting next to. Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit c2fbd3c542b455d4292c4406bea017c820cf68f3 Merge: 3e0144ad558d0 861aae786f2f7 Author: David S. Miller Date: Mon Mar 22 13:07:28 2021 -0700 Merge branch 'bnxt_en-Error-recovery-improvements' Michael Chan says: ==================== bnxt_en: Error recovery improvements. This series contains some improvements for error recovery. The main changes are: 1. Keep better track of the health register mappings with the "status_reliable" flag. 2. Don't wait for firmware responses if firmware is not healthy. 3. Better retry logic of the first firmware message. 4. Set the proper flag early to let the RDMA driver know that firmware reset has been detected. ==================== Signed-off-by: David S. Miller commit 861aae786f2f7e1cab7926f7bb7783cb893e7edb Author: Michael Chan Date: Mon Mar 22 03:08:45 2021 -0400 bnxt_en: Enhance retry of the first message to the firmware. Two enhancements: 1. Read the health status first before sending the first HWRM_VER_GET message to firmware instead of the other way around. This guarantees we got the accurate health status before we attempt to send the message. 2. We currently only retry sending the first HWRM_VER_GET message to the firmware if the firmware is in the process of booting. If the firmware is in error state and is doing core dump for example, the driver should also retry if the health register has the RECOVERING flag set. This flag indicates the firmware will undergo recovery soon. Modify the retry logic to retry for this case as well. Reviewed-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit bae8a00379f4c1327c8e38a768083460b5ad5b12 Author: Vasundhara Volam Date: Mon Mar 22 03:08:44 2021 -0400 bnxt_en: Remove the read of BNXT_FW_RESET_INPROG_REG after firmware reset. Once the chip goes through reset, the register mapping may be lost and any read of the mapped health registers may return garbage value until the registers are mapped again in the init path. Reading BNXT_FW_RESET_INPROG_REG after firmware reset will likely return garbage value due to the above reason. Reading this register is for information purpose only so remove it. Reviewed-by: Edwin Peer Signed-off-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 2924ad95cb51673ed3544cf371cafc66e2c76cc8 Author: Michael Chan Date: Mon Mar 22 03:08:43 2021 -0400 bnxt_en: Set BNXT_STATE_FW_RESET_DET flag earlier for the RDMA driver. During ifup, if the driver detects that firmware has gone through a reset, it will go through a re-probe sequence. If the RDMA driver is loaded, the re-probe sequence includes calling the RDMA driver to stop. We need to set the BNXT_STATE_FW_RESET_DET flag earlier so that it is visible to the RDMA driver. The RDMA driver's stop sequence is different if firmware has gone through a reset. Reviewed-by: Pavan Chebbi Reviewed-by: P B S Naresh Kumar Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 15a7deb895497e4c9496b98367e4a0671add03f1 Author: Scott Branden Date: Mon Mar 22 03:08:42 2021 -0400 bnxt_en: check return value of bnxt_hwrm_func_resc_qcaps Check return value of call to bnxt_hwrm_func_resc_qcaps in bnxt_hwrm_if_change and return failure on error. Reviewed-by: Edwin Peer Signed-off-by: Scott Branden Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit a2f3835cc68a2222d0ab97862187ed98e65fe682 Author: Edwin Peer Date: Mon Mar 22 03:08:41 2021 -0400 bnxt_en: don't fake firmware response success when PCI is disabled The original intent here is to allow commands during reset to succeed without error when the device is disabled, to ensure that cleanup completes normally during NIC close, where firmware is not necessarily expected to respond. The problem with faking success during reset's PCI disablement is that unrelated ULP commands will also see inadvertent success during reset when failure would otherwise be appropriate. It is better to return a different error result such that reset related code can detect this unique condition and ignore as appropriate. Note, the pci_disable_device() when firmware is fatally wounded in bnxt_fw_reset_close() does not need to be addressed, as subsequent commands are already expected to fail due to the BNXT_NO_FW_ACCESS() check in bnxt_hwrm_do_send_msg(). Reviewed-by: Scott Branden Signed-off-by: Edwin Peer Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 80a9641f09f890a27a57e8ad30472553e0f769a6 Author: Pavan Chebbi Date: Mon Mar 22 03:08:40 2021 -0400 bnxt_en: Improve wait for firmware commands completion In situations where FW has crashed, the bnxt_hwrm_do_send_msg() call will have to wait until timeout for each firmware message. This generally takes about half a second for each firmware message. If we try to unload the driver n this state, the unload sequence will take a long time to complete. Improve this by checking the health register if it is available and abort the wait for the firmware response if the register shows that firmware is not healthy. The very first message HWRM_VER_GET is excluded from this check because that message is used to poll for firmware to come out of reset during error recovery. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 43a440c4007b28c473afba966e8410459db4975f Author: Michael Chan Date: Mon Mar 22 03:08:39 2021 -0400 bnxt_en: Improve the status_reliable flag in bp->fw_health. In order to read the firmware health status, we first need to determine the register location and then the register may need to be mapped. There are 2 code paths to do this. The first one is done early as a best effort attempt by the function bnxt_try_map_fw_health_reg(). The second one is done later in the function bnxt_map_fw_health_regs() after establishing communications with the firmware. We currently only set fw_health->status_reliable if we can successfully set up the health register in the first code path. Improve the scheme by setting the fw_health->status_reliable flag if either (or both) code paths can successfully set up the health register. This flag is relied upon during run-time when we need to check the health status. So this will make it work better. During ifdown, if the health register is mapped, we need to invalidate the health register mapping because a potential fw reset will reset the mapping. Similarly, we need to do the same after firmware reset during recovery. We'll remap it during ifup. Reviewed-by: Edwin Peer Reviewed-by: Vasundhara Volam Signed-off-by: Michael Chan Signed-off-by: David S. Miller commit 3e0144ad558d0eb168d498097df383d23c4958cc Merge: 405a129f59384 67b0e1428e2f5 Author: David S. Miller Date: Mon Mar 22 13:04:18 2021 -0700 Merge branch 'hns3-flow-director' Huazhong Tan says: ==================== net: hns3: refactor and new features for flow director This patchset refactor some functions and add some new features for flow director. patch 1~3: refactor large functions patch 4, 7: add traffic class and user-def field support for ethtool patch 5: refactor flow director configuration patch 6: clean up for hns3_del_all_fd_entries() change log: V1->V2: modifies patch 5 as Jakub suggested, keep configuring ethtool/tc flower rules synchronously while aRFS asynchronously. changes the usecnt of user-def rule checking in patch 7. removes previous patches 8 and 9 from this series, since there are issues that need further discussion. ==================== Signed-off-by: David S. Miller commit 67b0e1428e2f592c0fc2c7f682a5a049158782b8 Author: Jian Shen Date: Mon Mar 22 11:52:02 2021 +0800 net: hns3: add support for user-def data of flow director For DEVICE_VERSION_V3, the hardware supports to match specified data in the specified offset of packet payload. Each layer can have one offset, and can't be masked when configure flow director rule by ethtool command. The layer is selected based on the flow-type, ether for L2, ip4/ipv6 for L3, and tcp4/tcp6/udp4/udp6 for L4. For example, tcp4/tcp6/udp4/udp6 rules share the same user-def offset, but each rule can have its own user-def value. For the user-def field of ethtool -N/U command is 64 bits long. The bit 0~15 is used for user-def value, and bit 32~47 for user-def offset in HNS3 driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f07203b0180f62791371cb50fb1afacd826250fc Author: Jian Shen Date: Mon Mar 22 11:52:01 2021 +0800 net: hns3: refine for hns3_del_all_fd_entries() For only PF driver can configure flow director rule, it's better to call hclge_del_all_fd_entries() directly in hclge layer, rather than call hns3_del_all_fd_entries() in hns3 layer. Then the ae_algo->ops.del_all_fd_entries can be removed. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit fc4243b8de8b4e7170f07f2660dcab3f8ecda0e9 Author: Jian Shen Date: Mon Mar 22 11:52:00 2021 +0800 net: hns3: refactor flow director configuration Currently, the flow director rule of aRFS is configured in the IO path. It's time-consuming. So move out the configuration, and configure it asynchronously. And keep ethtool and tc flower rule using synchronous way, otherwise the application maybe unable to know the rule is installed or pending. Add a state member for each flow director rule to indicate the rule state. There are 4 states: TO_ADD: the rule is waiting to add to hardware TO_DEL: the rule is waiting to remove from hardware DELETED: the rule has been removed from hardware. It's a middle state, used to remove the rule node in the fd_rule_list. ACTIVE: the rule is already added in hardware For asynchronous way, when receive a new request to add or delete flow director rule by aRFS, update the rule list, then request to schedule the service task to finish the configuration. For synchronous way, when receive a new request to add or delete flow director rule by ethtool or tc flower, configure hardware directly, then update the rule list if success. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit ae4811913f576d3a891e2ca8a3ad11746f644c69 Author: Jian Shen Date: Mon Mar 22 11:51:59 2021 +0800 net: hns3: add support for traffic class tuple support for flow director by ethtool The hardware supports to parse and match the traffic class field of IPv6 packet for flow director, uses the same tuple as ip tos. So removes the limitation of configure 'tclass' by driver. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit fb72699dfef8706abe203ec8c8fc69a023c161ce Author: Jian Shen Date: Mon Mar 22 11:51:58 2021 +0800 net: hns3: refactor for function hclge_fd_convert_tuple Currently, there are too many branches for hclge_fd_convert_tuple(). And it may be more when add new tuples. Refactor it by sorting the tuples according to their length. So it only needs several KEY_OPT now, and being flexible to add new tuples. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 74b755d1dbf1c4ff6f0cc4513e573eb15c0e7dfc Author: Jian Shen Date: Mon Mar 22 11:51:57 2021 +0800 net: hns3: refactor out hclge_fd_get_tuple() The process of function hclge_fd_get_tuple() is complex and prolix. To make it more readable, extract the process of each flow-type tuple to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 5f2b1238b33c38478ddc55536b65277b30f5d456 Author: Jian Shen Date: Mon Mar 22 11:51:56 2021 +0800 net: hns3: refactor out hclge_add_fd_entry() The process of function hclge_add_fd_entry() is complex and prolix. To make it more readable, extract the process of fs->ring_cookie to a single function. Signed-off-by: Jian Shen Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 405a129f59384c474343d6261a2e0a75650d29a8 Author: Bhaskar Chowdhury Date: Mon Mar 22 08:25:16 2021 +0530 linux/qed: Mundane spelling fixes throughout the file s/unrequired/"not required"/ s/consme/consume/ .....two different places s/accros/across/ Signed-off-by: Bhaskar Chowdhury Acked-by: Igor Russkikh Signed-off-by: David S. Miller commit f44773058ce2363ab4a48cc21e849116103bfae2 Author: Bhaskar Chowdhury Date: Mon Mar 22 07:47:08 2021 +0530 openvswitch: Fix a typo s/subsytem/subsystem/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 0853f5ab35e63ff0a75eadb67455ba11412c4374 Author: Bhaskar Chowdhury Date: Mon Mar 22 06:24:30 2021 +0530 NFC: Fix a typo s/packaet/packet/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 5e8302821527acd9de8a149dcbf80f50eb2b90e2 Merge: abee13f53e889 b31f51832acfa Author: David S. Miller Date: Mon Mar 22 12:56:21 2021 -0700 Merge branch 'actions-semi-ethernet-mac' Cristian Ciocaltea says: ==================== Add support for Actions Semi Owl Ethernet MAC This patch series adds support for the Ethernet MAC found on the Actions Semi Owl family of SoCs. For the moment I have only tested the driver on RoseapplePi SBC, which is based on the S500 SoC variant. It might work on S900 as well, but I cannot tell for sure since the S900 datasheet I currently have doesn't provide any information regarding the MAC registers - so I couldn't check the compatibility with S500. Similar story for S700: the datasheet I own is incomplete, but it seems the MAC is advertised with Gigabit capabilities. For that reason most probably we need to extend the current implementation in order to support this SoC variant as well. Please note that for testing the driver it is also necessary to update the S500 clock subsystem: https://lore.kernel.org/lkml/cover.1615221459.git.cristian.ciocaltea@gmail.com/ The DTS changes for the S500 SBCs will be provided separately. Thanks, Cristi Changes in v3: - Dropped the 'debug' module parameter and passed the default NETIF_MSG flags to netif_msg_init(), according to David's review - Removed the owl_emac_generate_mac_addr() function and the related OWL_EMAC_GEN_ADDR_SYS_SN config option until a portable solution to get the system serial number is found - when building on arm64 the following error is thrown (as reported by Rob's kernel bot): '[...]/owl-emac.c:9:10: fatal error: asm/system_info.h: No such file or directory' - Rebased patchset on v5.12-rc4 Changes in v2: * According to Philipp's review - Requested exclusive control over serial line via devm_reset_control_get_exclusive() - Optimized error handling by using dev_err_probe() * According to Andrew's review - Dropped the inline keywords - Applied Reverse Christmas Tree format to local variable declarations - Renamed owl_emac_phy_config() to owl_emac_update_link_state() - Documented the purpose of the special descriptor used in the context of owl_emac_setup_frame_xmit() - Updated comment inside owl_emac_mdio_clock_enable() regarding the MDC clock divider setup - Indicated MAC support for symmetric pause via phy_set_sym_pause() in owl_emac_phy_init() - Changed the MAC addr generation algorithm in owl_emac_generate_mac_addr() by setting the locally administered bit in byte 0 and replacing bytes 1 & 2 with additional entries from enc_sn - Moved devm_add_action_or_reset() before clk_set_rate() in owl_emac_probe() * Other - Added SMII interface support: updated owl_emac_core_sw_reset(), added owl_emac_clk_set_rate(), updated description in the YAML binding - Changed OWL_EMAC_TX_TIMEOUT from 0.05*HZ to 2*HZ ==================== Signed-off-by: David S. Miller commit b31f51832acfaf76f5cdfb1381802fbde3309c69 Author: Cristian Ciocaltea Date: Mon Mar 22 01:29:45 2021 +0200 MAINTAINERS: Add entries for Actions Semi Owl Ethernet MAC Add entries for Actions Semi Owl Ethernet MAC binding and driver. Signed-off-by: Cristian Ciocaltea Signed-off-by: David S. Miller commit de6e0b198239857943db395377dc1d2ddd6c05df Author: Cristian Ciocaltea Date: Mon Mar 22 01:29:44 2021 +0200 net: ethernet: actions: Add Actions Semi Owl Ethernet MAC driver Add new driver for the Ethernet MAC used on the Actions Semi Owl family of SoCs. Currently this has been tested only on the Actions Semi S500 SoC variant. Signed-off-by: Cristian Ciocaltea Signed-off-by: David S. Miller commit fd42327f31bbe72e445b400bb35df1e803ae4aaf Author: Cristian Ciocaltea Date: Mon Mar 22 01:29:43 2021 +0200 dt-bindings: net: Add Actions Semi Owl Ethernet MAC binding Add devicetree binding for the Ethernet MAC present on the Actions Semi Owl family of SoCs. For the moment advertise only the support for the Actions Semi S500 SoC variant. Signed-off-by: Cristian Ciocaltea Signed-off-by: David S. Miller commit abee13f53e889024401de913ff46a6997a866b0c Author: Vladimir Oltean Date: Sun Mar 21 23:05:49 2021 +0200 net/sched: cls_flower: use nla_get_be32 for TCA_FLOWER_KEY_FLAGS The existing code is functionally correct: iproute2 parses the ip_flags argument for tc-flower and really packs it as big endian into the TCA_FLOWER_KEY_FLAGS netlink attribute. But there is a problem in the fact that W=1 builds complain: net/sched/cls_flower.c:1047:15: warning: cast to restricted __be32 This is because we should use the dedicated helper for obtaining a __be32 pointer to the netlink attribute, not a u32 one. This ensures type correctness for be32_to_cpu. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6215afcb9a7e35cef334dc0ae7f998cc72c8465f Author: Vladimir Oltean Date: Sun Mar 21 23:05:48 2021 +0200 net/sched: cls_flower: use ntohs for struct flow_dissector_key_ports A make W=1 build complains that: net/sched/cls_flower.c:214:20: warning: cast from restricted __be16 net/sched/cls_flower.c:214:20: warning: incorrect type in argument 1 (different base types) net/sched/cls_flower.c:214:20: expected unsigned short [usertype] val net/sched/cls_flower.c:214:20: got restricted __be16 [usertype] dst This is because we use htons on struct flow_dissector_key_ports members src and dst, which are defined as __be16, so they are already in network byte order, not host. The byte swap function for the other direction should have been used. Because htons and ntohs do the same thing (either both swap, or none does), this change has no functional effect except to silence the warnings. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f57bac3c33e761fdd78fef159fdc677056c706d0 Author: Vincent Mailhol Date: Sun Mar 21 22:48:49 2021 +0900 netdev: add netdev_queue_set_dql_min_limit() Add a function to set the dynamic queue limit minimum value. Some specific drivers might have legitimate reasons to configure dql.min_limit to a given value. Typically, this is the case when the PDU of the protocol is smaller than the packet size to used to carry those frames to the device. Concrete example: a CAN (Control Area Network) device with an USB 2.0 interface. The PDU of classical CAN protocol are roughly 16 bytes but the USB packet size (which is used to carry the CAN frames to the device) might be up to 512 bytes. Wen small traffic burst occurs, BQL algorithm is not able to immediately adjust and this would result in having to send many small USB packets (i.e packet of 16 bytes for each CAN frame). Filling up the USB packet with CAN frames is relatively fast (small latency issue) but the gain of not having to send several small USB packets is huge (big throughput increase). In this case, forcing dql.min_limit to a given value that would allow to stuff the USB packet is always a win. This function is to be used by network drivers which are able to prove through a rationale and through empirical tests on several environment (with other applications, heavy context switching, virtualization...), that they constantly reach better performances with a specific predefined dql.min_limit value with no noticeable latency impact. Signed-off-by: Vincent Mailhol Signed-off-by: David S. Miller commit 1fb057dcde11b355fc9acde95cee3b2caa5dafb0 Author: Paul Moore Date: Fri Feb 19 15:04:58 2021 -0500 smack: differentiate between subjective and objective task credentials With the split of the security_task_getsecid() into subjective and objective variants it's time to update Smack to ensure it is using the correct task creds. Acked-by: Casey Schaufler Reviewed-by: Richard Guy Briggs Reviewed-by: John Johansen Signed-off-by: Paul Moore commit eb1231f73c4d7dc26db55e08c070e6526eaf7ee5 Author: Paul Moore Date: Thu Feb 18 15:13:40 2021 -0500 selinux: clarify task subjective and objective credentials SELinux has a function, task_sid(), which returns the task's objective credentials, but unfortunately is used in a few places where the subjective task credentials should be used. Most notably in the new security_task_getsecid_subj() LSM hook. This patch fixes this and attempts to make things more obvious by introducing a new function, task_sid_subj(), and renaming the existing task_sid() function to task_sid_obj(). This patch also adds an interesting function in task_sid_binder(). The task_sid_binder() function has a comment which hopefully describes it's reason for being, but it basically boils down to the simple fact that we can't safely access another task's subjective credentials so in the case of binder we need to stick with the objective credentials regardless. Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 4ebd7651bfc8992ba05b355a8036cb7fd0e8d7de Author: Paul Moore Date: Fri Feb 19 14:26:21 2021 -0500 lsm: separate security_task_getsecid() into subjective and objective variants Of the three LSMs that implement the security_task_getsecid() LSM hook, all three LSMs provide the task's objective security credentials. This turns out to be unfortunate as most of the hook's callers seem to expect the task's subjective credentials, although a small handful of callers do correctly expect the objective credentials. This patch is the first step towards fixing the problem: it splits the existing security_task_getsecid() hook into two variants, one for the subjective creds, one for the objective creds. void security_task_getsecid_subj(struct task_struct *p, u32 *secid); void security_task_getsecid_obj(struct task_struct *p, u32 *secid); While this patch does fix all of the callers to use the correct variant, in order to keep this patch focused on the callers and to ease review, the LSMs continue to use the same implementation for both hooks. The net effect is that this patch should not change the behavior of the kernel in any way, it will be up to the latter LSM specific patches in this series to change the hook implementations and return the correct credentials. Acked-by: Mimi Zohar (IMA) Acked-by: Casey Schaufler Reviewed-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 227d72063fccb2d19b30fb4197fba478514f7d83 Author: Alexander Lobakin Date: Fri Mar 19 15:46:30 2021 +0000 dsa: simplify Kconfig symbols and dependencies 1. Remove CONFIG_HAVE_NET_DSA. CONFIG_HAVE_NET_DSA is a legacy leftover from the times when drivers should have selected CONFIG_NET_DSA manually. Currently, all drivers has explicit 'depends on NET_DSA', so this is no more needed. 2. CONFIG_HAVE_NET_DSA dependencies became CONFIG_NET_DSA's ones. - dropped !S390 dependency which was introduced to be sure NET_DSA can select CONFIG_PHYLIB. DSA migrated to Phylink almost 3 years ago and the PHY library itself doesn't depend on !S390 since commit 870a2b5e4fcd ("phylib: remove !S390 dependeny from Kconfig"); - INET dependency is kept to be sure we can select NET_SWITCHDEV; - NETDEVICES dependency is kept to be sure we can select PHYLINK. 3. DSA drivers menu now depends on NET_DSA. Instead on 'depends on NET_DSA' on every single driver, the entire menu now depends on it. This eliminates a lot of duplicated lines from Kconfig with no loss (when CONFIG_NET_DSA=m, drivers also can be only m or n). This also has a nice side effect that there's no more empty menu on configurations without DSA. 4. Kbuild will now descend into 'drivers/net/dsa' only when CONFIG_NET_DSA is y or m. This is safe since no objects inside this folder can be built without DSA core, as well as when CONFIG_NET_DSA=m, no objects can be built-in. Signed-off-by: Alexander Lobakin Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit f873b28f260e6f6ea98eb46f6c42d581379c91b1 Author: Mimi Zohar Date: Fri Mar 19 11:14:25 2021 -0400 ima: without an IMA policy loaded, return quickly Unless an IMA policy is loaded, don't bother checking for an appraise policy rule. Return immediately. Signed-off-by: Mimi Zohar commit ec1ade6a0448e3bfb07bb905aca1bc18836220c7 Author: Olga Kornievskaia Date: Fri Feb 19 17:22:33 2021 -0500 nfs: account for selinux security context when deciding to share superblock Keep track of whether or not there were LSM security context options passed during mount (ie creation of the superblock). Then, while deciding if the superblock can be shared for the new mount, check if the newly passed in LSM security context options are compatible with the existing superblock's ones by calling security_sb_mnt_opts_compat(). Previously, with selinux enabled, NFS wasn't able to do the following 2mounts: mount -o vers=4.2,sec=sys,context=system_u:object_r:root_t:s0 :/ /mnt mount -o vers=4.2,sec=sys,context=system_u:object_r:swapfile_t:s0 :/scratch /scratch 2nd mount would fail with "mount.nfs: an incorrect mount option was specified" and var log messages would have: "SElinux: mount invalid. Same superblock, different security settings for.." Signed-off-by: Olga Kornievskaia [PM: tweak subject line] Signed-off-by: Paul Moore commit 8c6d76a3144154773339be5e29c8bf42586dc3d1 Author: Olga Kornievskaia Date: Fri Feb 19 17:22:32 2021 -0500 nfs: remove unneeded null check in nfs_fill_super() In nfs_fill_super() passed in nfs_fs_context can never be NULL. Signed-off-by: Olga Kornievskaia [PM: tweak subject line] Signed-off-by: Paul Moore commit 69c4a42d72eb9b41e1c6e4bc9ab7f3650bf35f62 Author: Olga Kornievskaia Date: Fri Feb 26 22:37:55 2021 -0500 lsm,selinux: add new hook to compare new mount to an existing mount Add a new hook that takes an existing super block and a new mount with new options and determines if new options confict with an existing mount or not. A filesystem can use this new hook to determine if it can share the an existing superblock with a new superblock for the new mount. Signed-off-by: Olga Kornievskaia Acked-by: Anna Schumaker [PM: tweak the subject line, fix tab/space problems] Signed-off-by: Paul Moore commit a6379db818a850d1c1012cffe160cfc14d64cb40 Author: Haiyue Wang Date: Tue Mar 9 11:08:15 2021 +0800 iavf: Enable flex-bytes support Flex-bytes allows for packet matching based on an offset and value. This is supported via the ethtool user-def option. The user-def 0xAAAABBBBCCCCDDDD: BBBB is the 2 byte pattern while AAAA corresponds to its offset in the packet. Similarly DDDD is the 2 byte pattern with CCCC being the corresponding offset. The offset ranges from 0x0 to 0x1F7 (up to 504 bytes into the packet). The offset starts from the beginning of the packet. This feature can be used to allow customers to set flow director rules for protocols headers that are beyond standard ones supported by ethtool (e.g. PFCP or GTP-U). Like for matching GTP-U's TEID value 0x10203040: ethtool -N ens787f0v0 flow-type udp4 dst-port 2152 \ user-def 0x002e102000303040 action 13 Signed-off-by: Haiyue Wang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit a6ccffaa8da32b6077e37e7d254d519bc071433a Author: Haiyue Wang Date: Tue Mar 9 11:08:14 2021 +0800 iavf: Support Ethernet Type Flow Director filters Support the addition and deletion of Ethernet filters. Supported fields are: proto Supported flow-types are: ether Example usage: ethtool -N ens787f0v0 flow-type ether proto 0x8863 action 6 ethtool -N ens787f0v0 flow-type ether proto 0x8864 action 7 Signed-off-by: Haiyue Wang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit e90cbc257a6f3f9cc2b257acab561b197c708bab Author: Haiyue Wang Date: Tue Mar 9 11:08:13 2021 +0800 iavf: Support IPv6 Flow Director filters Support the addition and deletion of IPv6 filters. Supported fields are: src-ip, dst-ip, src-port, dst-port and l4proto Supported flow-types are: tcp6, udp6, sctp6, ip6, ah6, esp6 Example usage: ethtool -N ens787f0v0 flow-type tcp6 src-ip 2001::2 \ dst-ip CDCD:910A:2222:5498:8475:1111:3900:2020 \ tclass 1 src-port 22 dst-port 23 action 7 L2TPv3 over IP with 'Session ID' 17: ethtool -N ens787f0v0 flow-type ip6 l4proto 115 l4data 17 action 7 Signed-off-by: Haiyue Wang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 527691bf0682d7ddcca77fc17dabd2fa090572ff Author: Haiyue Wang Date: Tue Mar 9 11:08:12 2021 +0800 iavf: Support IPv4 Flow Director filters Support the addition and deletion of IPv4 filters. Supported fields are: src-ip, dst-ip, src-port, dst-port and l4proto Supported flow-types are: tcp4, udp4, sctp4, ip4, ah4, esp4 Example usage: ethtool -N ens787f0v0 flow-type tcp4 src-ip 192.168.0.20 \ dst-ip 192.168.0.21 tos 4 src-port 22 dst-port 23 action 8 L2TPv3 over IP with 'Session ID' 17: ethtool -N ens787f0v0 flow-type ip4 l4proto 115 l4data 17 action 3 Signed-off-by: Haiyue Wang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 0dbfbabb840d711d7ea1627d88afd0520f374a90 Author: Haiyue Wang Date: Tue Mar 9 11:08:11 2021 +0800 iavf: Add framework to enable ethtool ntuple filters Enable ethtool ntuple filter support on the VF driver using the virtchnl interface to the PF driver and the Flow director functionality in the hardware. Signed-off-by: Haiyue Wang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit d6218317e2eff8b3762f437da582ea970cde576e Author: Qi Zhang Date: Tue Mar 9 11:08:10 2021 +0800 ice: Check FDIR program status for AVF Enable returning FDIR completion status by checking the ctrl_vsi Rx queue descriptor value. To enable returning FDIR completion status from ctrl_vsi Rx queue, COMP_Queue and COMP_Report of FDIR filter programming descriptor needs to be properly configured. After program request sent to ctrl_vsi Tx queue, ctrl_vsi Rx queue interrupt will be triggered and completion status will be returned. Driver will first issue request in ice_vc_fdir_add_fltr(), then pass FDIR context to the background task in interrupt service routine ice_vc_fdir_irq_handler() and finally deal with them in ice_flush_fdir_ctx(). ice_flush_fdir_ctx() will check the descriptor's value, fdir context, and then send back virtual channel message to VF by calling ice_vc_add_fdir_fltr_post(). An additional timer will be setup in case of hardware interrupt timeout. Signed-off-by: Yahui Cao Signed-off-by: Brett Creeley Signed-off-by: Jesse Brandeburg Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 213528fed2f609a0d67f59337145057f63c5bb0b Author: Qi Zhang Date: Tue Mar 9 11:08:09 2021 +0800 ice: Add more FDIR filter type for AVF FDIR for AVF can forward - L2TPV3 packets by matching session id. - IPSEC ESP packets by matching security parameter index. - IPSEC AH packets by matching security parameter index. - NAT_T ESP packets by matching security parameter index. - Any PFCP session packets(s field is 1). Signed-off-by: Yahui Cao Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit ef9e4cc589cafd5c775d4501815e1ebc3110cdb6 Author: Qi Zhang Date: Tue Mar 9 11:08:08 2021 +0800 ice: Add GTPU FDIR filter for AVF Add new FDIR filter type to forward GTPU packets by matching TEID or QFI. The filter is only enabled when COMMS DDP package is downloaded. Signed-off-by: Yahui Cao Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 21606584f1bb4c76aeb5a113e0e8a72681a270e4 Author: Qi Zhang Date: Tue Mar 9 11:08:07 2021 +0800 ice: Add non-IP Layer2 protocol FDIR filter for AVF Add new filter type that allow forward non-IP Ethernet packets base on its ethertype. The filter is only enabled when COMMS DDP package is loaded. Signed-off-by: Yahui Cao Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 346bf25043976fe106cd4f739fc67765ac292a3a Author: Qi Zhang Date: Tue Mar 9 11:08:06 2021 +0800 ice: Add new actions support for VF FDIR Add two new actions support for VF FDIR: A passthrough action does not specify the destination queue, but just allow the packet go to next pipeline stage, a typical use cases is combined with a software mark (FDID) action. Allow specify a 2^n continuous queues as the destination of a FDIR rule. Packet distribution is based on current RSS configure. Signed-off-by: Yahui Cao Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 0ce332fd62f625dd0e269d7d9aef65b019c95a77 Author: Qi Zhang Date: Tue Mar 9 11:08:05 2021 +0800 ice: Add FDIR pattern action parser for VF Add basic FDIR flow list and pattern / action parse functions for VF. Signed-off-by: Yahui Cao Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 1f7ea1cd6a3748427512ccc9582e18cd9efea966 Author: Qi Zhang Date: Tue Mar 9 11:08:04 2021 +0800 ice: Enable FDIR Configure for AVF The virtual channel is going to be extended to support FDIR and RSS configure from AVF. New data structures and OP codes will be added, the patch enable the FDIR part. To support above advanced AVF feature, we need to figure out what kind of data structure should be passed from VF to PF to describe an FDIR rule or RSS config rule. The common part of the requirement is we need a data structure to represent the input set selection of a rule's hash key. An input set selection is a group of fields be selected from one or more network protocol layers that could be identified as a specific flow. For example, select dst IP address from an IPv4 header combined with dst port from the TCP header as the input set for an IPv4/TCP flow. The patch adds a new data structure virtchnl_proto_hdrs to abstract a network protocol headers group which is composed of layers of network protocol header(virtchnl_proto_hdr). A protocol header contains a 32 bits mask (field_selector) to describe which fields are selected as input sets, as well as a header type (enum virtchnl_proto_hdr_type). Each bit is mapped to a field in enum virtchnl_proto_hdr_field guided by its header type. +------------+-----------+------------------------------+ | | Proto Hdr | Header Type A | | | +------------------------------+ | | | BIT 31 | ... | BIT 1 | BIT 0 | | |-----------+------------------------------+ |Proto Hdrs | Proto Hdr | Header Type B | | | +------------------------------+ | | | BIT 31 | ... | BIT 1 | BIT 0 | | |-----------+------------------------------+ | | Proto Hdr | Header Type C | | | +------------------------------+ | | | BIT 31 | ... | BIT 1 | BIT 0 | | |-----------+------------------------------+ | | .... | +-------------------------------------------------------+ All fields in enum virtchnl_proto_hdr_fields are grouped with header type and the value of the first field of a header type is always 32 aligned. enum proto_hdr_type { header_type_A = 0; header_type_B = 1; .... } enum proto_hdr_field { /* header type A */ header_A_field_0 = 0, header_A_field_1 = 1, header_A_field_2 = 2, header_A_field_3 = 3, /* header type B */ header_B_field_0 = 32, // = header_type_B << 5 header_B_field_0 = 33, header_B_field_0 = 34 header_B_field_0 = 35, .... }; So we have: proto_hdr_type = proto_hdr_field / 32 bit offset = proto_hdr_field % 32 To simply the protocol header's operations, couple help macros are added. For example, to select src IP and dst port as input set for an IPv4/UDP flow. we have: struct virtchnl_proto_hdr hdr[2]; VIRTCHNL_SET_PROTO_HDR_TYPE(&hdr[0], IPV4) VIRTCHNL_ADD_PROTO_HDR_FIELD(&hdr[0], IPV4, SRC) VIRTCHNL_SET_PROTO_HDR_TYPE(&hdr[1], UDP) VIRTCHNL_ADD_PROTO_HDR_FIELD(&hdr[1], UDP, DST) The byte array is used to store the protocol header of a training package. The byte array must be network order. The patch added virtual channel support for iAVF FDIR add/validate/delete filter. iAVF FDIR is Flow Director for Intel Adaptive Virtual Function which can direct Ethernet packets to the queues of the Network Interface Card. Add/delete command is adding or deleting one rule for each virtual channel message, while validate command is just verifying if this rule is valid without any other operations. To add or delete one rule, driver needs to config TCAM and Profile, build training packets which contains the input set value, and send the training packets through FDIR Tx queue. In addition, driver needs to manage the software context to avoid adding duplicated rules, deleting non-existent rule, input set conflicts and other invalid cases. NOTE: Supported pattern/actions and their parse functions are not be included in this patch, they will be added in a separate one. Signed-off-by: Jeff Guo Signed-off-by: Yahui Cao Signed-off-by: Simei Su Signed-off-by: Beilei Xing Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit da62c5ff9dcdac67204d6647f3cd43ad931a59f4 Author: Qi Zhang Date: Tue Mar 9 11:08:03 2021 +0800 ice: Add support for per VF ctrl VSI enabling We are going to enable FDIR configure for AVF through virtual channel. The first step is to add helper functions to support control VSI setup. A control VSI will be allocated for a VF when AVF creates its first FDIR rule through ice_vf_ctrl_vsi_setup(). The patch will also allocate FDIR rule space for VF's control VSI. If a VF asks for flow director rules, then those should come entirely from the best effort pool and not from the guaranteed pool. The patch allow a VF VSI to have only space in the best effort rules. Signed-off-by: Xiaoyun Li Signed-off-by: Yahui Cao Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 7012dfd1afc335f5e972a1c38b43c01d4b8a4309 Author: Qi Zhang Date: Tue Mar 9 11:08:02 2021 +0800 ice: Enhanced IPv4 and IPv6 flow filter Separate IPv4 and IPv6 ptype bit mask table into 2 tables: with or without L4 protocols. When a flow filter without any l4 type is specified, the ICE_FLOW_SEG_HDR_IPV_OTHER flag can be used to describe if user want to create a IP rule target for all IP packet or just IP packet without l4 header. Signed-off-by: Dan Nowlin Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit cbad5db88aaf42ca3855c5c485fb5a900caaadc5 Author: Qi Zhang Date: Tue Mar 9 11:08:01 2021 +0800 ice: Support to separate GTP-U uplink and downlink To apply different input set for GTP-U packet with or without extend header as well as GTP-U uplink and downlink, we need to add TCAM mask matching capability. This allows comprehending different PTYPE attributes by examining flags from the parser. Using this method, different profiles can be used by examining flag values from the parser. Signed-off-by: Dan Nowlin Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 0577313e53887493232206f1afe2a6584fa5e585 Author: Qi Zhang Date: Tue Mar 9 11:08:00 2021 +0800 ice: Add more advanced protocol support in flow filter Add more protocol support in flow filter, these include PPPoE, L2TPv3, GTP, PFCP, ESP and AH. Signed-off-by: Ting Xu Signed-off-by: Yahui Cao Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit b199dddbd399536d5470e10e6bfd7d0e1b5fb71a Author: Qi Zhang Date: Tue Mar 9 11:07:59 2021 +0800 ice: Support non word aligned input set field To support FDIR input set with protocol field like DSCP, TTL, PROT, etc. which is not word aligned, we need to enable field vector masking. Signed-off-by: Dan Nowlin Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 390bd141808d5019506f0f53a777c3b9cb7c5c62 Author: Qi Zhang Date: Tue Mar 9 11:07:58 2021 +0800 ice: Add more basic protocol support for flow filter Add more protocol and field support for flow filter include: ETH, VLAN, ICMP, ARP and TCP flag. Signed-off-by: Kevin Scott Signed-off-by: Qi Zhang Tested-by: Chen Bo Signed-off-by: Tony Nguyen commit 10739e2a5e83ecac6a7d2422369c5fe8a1a72b04 Author: Wesley Sheng Date: Thu Dec 31 11:25:39 2020 +0800 PCI: tegra: Fix typo for PCIe endpoint mode in Tegra194 In config PCIE_TEGRA194_EP the mode incorrectly is referred to as host mode. Fix it. Link: https://lore.kernel.org/r/20201231032539.22322-1-wesley.sheng@amd.com Signed-off-by: Wesley Sheng Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński Acked-by: Vidya Sagar commit b5d9209d50838474fc1b2901d0e11bba59906428 Author: Wei Yongjun Date: Mon Mar 8 13:56:19 2021 +0000 PCI: brcmstb: Fix error return code in brcm_pcie_probe() Fix to return negative error code -ENODEV from the unsupported revision error handling case instead of 0, as done elsewhere in this function. Link: https://lore.kernel.org/r/20210308135619.19133-1-weiyongjun1@huawei.com Fixes: 0cdfaceb9889 ("PCI: brcmstb: support BCM4908 with external PERST# signal controller") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński Acked-by: Florian Fainelli commit 4d6e9cdff7fbb6bef3e5559596fab3eeffaf95ca Author: Kiran Gunda Date: Thu Mar 18 18:09:39 2021 +0530 backlight: qcom-wled: Fix FSC update issue for WLED5 Currently, for WLED5, the FSC (Full scale current) setting is not updated properly due to driver toggling the wrong register after an FSC update. On WLED5 we should only toggle the MOD_SYNC bit after a brightness update. For an FSC update we need to toggle the SYNC bits instead. Fix it by adopting the common wled3_sync_toggle() for WLED5 and introducing new code to the brightness update path to compensate. Signed-off-by: Kiran Gunda Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit 1b7996a528b3f81bb8dac6d29a957db1d33546d3 Author: Krzysztof Wilczyński Date: Thu Mar 11 03:37:45 2021 +0000 PCI: layerscape: Correct syntax by changing comma to semicolon Replace command with a semicolon to correct syntax and to prevent potential unspecified behaviour and/or unintended side effects. Related: https://lore.kernel.org/linux-pci/20201216131944.14990-1-zhengyongjun3@huawei.com/ Co-authored-by: Zheng Yongjun Link: https://lore.kernel.org/r/20210311033745.1547044-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi Acked-by: Roy Zang commit 82011c80b3ec0e05940a2ee2c76c1df9fd2b1ce8 Author: Chuck Lever Date: Tue Jan 5 10:15:09 2021 -0500 SUNRPC: Move svc_xprt_received() call sites Currently, XPT_BUSY is not cleared until xpo_recvfrom returns. That effectively blocks the receipt and handling of the next RPC message until the current one has been taken off the transport. This strict ordering is a requirement for socket transports. For our kernel RPC/RDMA transport implementation, however, dequeuing an ingress message is nothing more than a list_del(). The transport can safely be marked un-busy as soon as that is done. To keep the changes simpler, this patch just moves the svc_xprt_received() call site from svc_handle_xprt() into the transports, so that the actual optimization can be done in a subsequent patch. Signed-off-by: Chuck Lever commit 7dcfbd86adc45f6d6b37278efd22530cf80ab474 Author: Chuck Lever Date: Fri Jan 29 13:04:04 2021 -0500 SUNRPC: Export svc_xprt_received() Prepare svc_xprt_received() to be called from transport code instead of from generic RPC server code. Signed-off-by: Chuck Lever commit cc93ce9529a63bd67e1a64682b288db0092b34b6 Author: Chuck Lever Date: Mon Feb 1 15:16:57 2021 -0500 svcrdma: Retain the page backing rq_res.head[0].iov_base svc_rdma_sendto() now waits for the NIC hardware to finish with the pages backing rq_res. We still have to release the page array in some cases, but now it's always safe to immediately re-use the page backing rq_res's head buffer. Signed-off-by: Chuck Lever commit 579900670ac770a547ff607a60c02c56a7d27bd7 Author: Chuck Lever Date: Thu Jan 28 16:47:56 2021 -0500 svcrdma: Remove unused sc_pages field Clean up. This significantly reduces the size of struct svc_rdma_send_ctxt. Signed-off-by: Chuck Lever commit 2a1e4f21d84184f7ff5768ee3d3d0c30b1135867 Author: Chuck Lever Date: Wed Jan 13 13:57:18 2021 -0500 svcrdma: Normalize Send page handling Currently svc_rdma_sendto() migrates xdr_buf pages into a separate page list and NULLs out a bunch of entries in rq_pages while the pages are under I/O. The Send completion handler then frees those pages later. Instead, let's wait for the Send completion, then handle page releasing in the nfsd thread. I'd like to avoid the cost of 250+ put_page() calls in the Send completion handler, which is single- threaded. Signed-off-by: Chuck Lever commit e844d307d46cfa7e09cdb671941bfd5f1be86773 Author: Chuck Lever Date: Sat Feb 20 18:53:40 2021 -0500 svcrdma: Add a "deferred close" helper Refactor a bit of commonly used logic so that every site that wants a close deferred to an nfsd thread does all the right things (set_bit(XPT_CLOSE) then enqueue). Also, once XPT_CLOSE is set on a transport, it is never cleared. If XPT_CLOSE is already set, then the close is already being handled and the enqueue can be skipped. Signed-off-by: Chuck Lever commit c558d47596867ff1082fd7475b63670f63f7f5cf Author: Chuck Lever Date: Thu Mar 11 18:32:30 2021 -0500 svcrdma: Maintain a Receive water mark Post more Receives when the number of pending Receives drops below a water mark. The batch mechanism is disabled if the underlying device cannot support a reasonably-sized Receive Queue. Signed-off-by: Chuck Lever commit 7b748c30cc046056a24c459de415844a856ea54b Author: Chuck Lever Date: Thu Mar 11 16:15:22 2021 -0500 svcrdma: Use svc_rdma_refresh_recvs() in wc_receive Replace svc_rdma_post_recv() with the new batch receive mechanism. For the moment it is posting just a single Receive WR at a time, so no change in behavior is expected. Since svc_rdma_wc_receive() was the last call site for svc_rdma_post_recv(), it is removed. Signed-off-by: Chuck Lever commit 77f0a2aa5cdde0524eab745f7a117706d3e3014f Author: Chuck Lever Date: Thu Mar 11 13:54:34 2021 -0500 svcrdma: Add a batch Receive posting mechanism Introduce a server-side mechanism similar to commit e340c2d6ef2a ("xprtrdma: Reduce the doorbell rate (Receive)") to post Receive WRs in batch. Its first consumer is svc_rdma_post_recvs(), which posts the initial set of Receive WRs. Signed-off-by: Chuck Lever commit 8ff0278d106753a553d6cb2cf49a8888425b8187 Author: Arnd Bergmann Date: Mon Mar 22 17:46:30 2021 +0100 Bluetooth: fix set_ecdh_privkey() prototype gcc-11 points out that the declaration does not match the definition: net/bluetooth/ecdh_helper.c:122:55: error: argument 2 of type ‘const u8[32]’ {aka ‘const unsigned char[32]’} with mismatched bound [-Werror=array-parameter=] 122 | int set_ecdh_privkey(struct crypto_kpp *tfm, const u8 private_key[32]) | ~~~~~~~~~^~~~~~~~~~~~~~~ In file included from net/bluetooth/ecdh_helper.c:23: net/bluetooth/ecdh_helper.h:28:56: note: previously declared as ‘const u8 *’ {aka ‘const unsigned char *’} 28 | int set_ecdh_privkey(struct crypto_kpp *tfm, const u8 *private_key); | ~~~~~~~~~~^~~~~~~~~~~ Change the declaration to contain the size of the array, rather than just a pointer. Signed-off-by: Arnd Bergmann Signed-off-by: Marcel Holtmann commit 3881a5a77683a04de2f399d61700e374699a7b67 Author: Philipp Gerlesberger Date: Mon Dec 14 12:03:57 2020 +0100 media: atomisp: Write function decleration in one line CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' WARNING:LEADING_SPACE: please, no spaces at the start of a line Avoid these errors by writing the function decleration in one line. Link: https://lore.kernel.org/linux-media/20201214110358.7102-12-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit fc42aa47bfdef6a0a6593de9364db354b5891d2c Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:54 2020 +0100 media: atomisp: Fix BLOCK_COMMENT_STYLE Block comments should align the * on each line Link: https://lore.kernel.org/linux-media/20201214110156.6152-11-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit 26557ebc1d6d26f8770f04de0a734d577df07ab6 Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:53 2020 +0100 media: atomisp: Fix PARENTHESIS_ALIGNMENT You can sum up the two lines, because the maximum line length of 100 columns is not exceeded. Link: https://lore.kernel.org/linux-media/20201214110156.6152-10-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit 2a35625b84aa76a7457ba20ce7b38fea4fca60f1 Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:52 2020 +0100 media: atomisp: Delete braces WARNING:BRACES: braces {} are not necessary for single statement blocks Link: https://lore.kernel.org/linux-media/20201214110156.6152-9-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit 31e6736628cf015260ae26743c50c4ef3f0f02cb Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:51 2020 +0100 media: atomisp: Fix funciton decleration Write return_type, function_name and parameters in one line because lines should not end with a '(' [OPEN_ENDED_LINE] Write open brace ’{’ on the next line to fix OPEN_BRACE Error Link: https://lore.kernel.org/linux-media/20201214110156.6152-8-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit 1e52b54b588ec502692bc1a7510fa1652aaf7759 Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:49 2020 +0100 media: atomisp: Fix overlong line Line length of 105 exceeds 100 columns. Link: https://lore.kernel.org/linux-media/20201214110156.6152-6-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit 6cef8028ce8631e88d8167977cef87fd5bade991 Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:48 2020 +0100 media: atomisp: Fix OPEN_ENDED_LINE Lines should not end with a '(' Link: https://lore.kernel.org/linux-media/20201214110156.6152-5-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit 673d128afd34715f71b6acf0965f6650a2d8443b Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:47 2020 +0100 media: atomisp: Fix EMBEDDED_FUNCTION_NAME warning Use the automatically defined __func__ macro instead of the function name, so it stays correct when the function is renamed. Link: https://lore.kernel.org/linux-media/20201214110156.6152-4-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit d0f749f6d21c8616d470cc3b2b11c1a2e508794a Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:46 2020 +0100 media: atomisp: Fix Block Comments Block comments should use * on subsequent lines and should use a trailing */ on a separate line. Link: https://lore.kernel.org/linux-media/20201214110156.6152-3-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit 8776682ce31cf08fac7bfa3427bf496a44dc8722 Author: Philipp Gerlesberger Date: Mon Dec 14 12:01:45 2020 +0100 media: atomisp: Convert comments to C99 initializers The struct initalizers have been changed as recommended on https://kernelnewbies.org/KernelJanitors/Todo Also remove all the false, 0, and NULL members. Link: https://lore.kernel.org/linux-media/20201214110156.6152-2-Philipp.Gerlesberger@fau.de Co-developed-by: Andrey Khlopkov Signed-off-by: Andrey Khlopkov Signed-off-by: Philipp Gerlesberger Signed-off-by: Mauro Carvalho Chehab commit 79caa362eab6569297210eda375d6ea358a81161 Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:44 2021 +0100 pwm: Add Raspberry Pi Firmware based PWM bus Adds support to control the PWM bus available in official Raspberry Pi PoE HAT. Only RPi's co-processor has access to it, so commands have to be sent through RPi's firmware mailbox interface. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Uwe Kleine-König Acked-by: Thierry Reding commit a953e68ef2df657d8b65e16370e5808ec5819f23 Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:42 2021 +0100 dt-bindings: pwm: Add binding for RPi firmware PWM bus The PWM bus controlling the fan in RPi's official PoE hat can only be controlled by the board's co-processor. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring commit 3b8ddff780b7d12e99ae39177f84b9003097777a Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:41 2021 +0100 input: raspberrypi-ts: Release firmware handle when not needed There is no use for the firmware interface after getting the touch buffer address, so release it. Signed-off-by: Nicolas Saenz Julienne Acked-by: Dmitry Torokhov Reviewed-by: Florian Fainelli commit d6139dec046c15049940b91a0b82047421f138ff Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:40 2021 +0100 staging: vchiq: Release firmware handle on unbind Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Reviewed-by: Greg Kroah-Hartman commit 78add6cba796c17f2a42a111f7f4572012cb7970 Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:39 2021 +0100 soc: bcm: raspberrypi-power: Release firmware handle on unbind Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli commit 9419f7f41a7d27a558426397f3f6f1be2193e008 Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:38 2021 +0100 reset: raspberrypi: Release firmware handle on unbind Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli commit 0e3333b29cad8b8906a7bc6af61f7e0df8cfd3b5 Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:37 2021 +0100 gpio: raspberrypi-exp: Release firmware handle on unbind Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Acked-by: Bartosz Golaszewski commit 3c4084f95a29db0fb50eac4f887d02aff52304a0 Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:36 2021 +0100 clk: bcm: rpi: Release firmware handle on unbind Use devm_rpi_firmware_get() so as to make sure we release RPi's firmware interface when unbinding the device. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Acked-by: Stephen Boyd drivers/clk/bcm/clk-raspberrypi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f663204c9a1f8d6fcc590667d9d7a9f44e064644 Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:35 2021 +0100 firmware: raspberrypi: Introduce devm_rpi_firmware_get() It'll simplify the firmware handling for most consumers. Suggested-by: Bartosz Golaszewski Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Reviewed-by: Bartosz Golaszewski commit 1e7c57355a3bc617fc220234889e49fe722a6305 Author: Nicolas Saenz Julienne Date: Mon Jan 18 13:32:34 2021 +0100 firmware: raspberrypi: Keep count of all consumers When unbinding the firmware device we need to make sure it has no consumers left. Otherwise we'd leave them with a firmware handle pointing at freed memory. Keep a reference count of all consumers and introduce rpi_firmware_put() which will permit automatically decrease the reference count upon unbinding consumer drivers. Suggested-by: Uwe Kleine-König Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Florian Fainelli Reviewed-by: Stephen Boyd Reviewed-by: Bartosz Golaszewski commit c1f1d76c1944525acae0a47f9d499fbaa1acdf41 Author: Ding Xiang Date: Tue Nov 17 09:10:58 2020 +0100 media: atomisp: remove redundant NULL check of "params" The check result of (!A || (A && B)) is equivalent to (!A || B), so remove redundant NULL check of "params" Link: https://lore.kernel.org/linux-media/20201117081058.673291-1-dingxiang@cmss.chinamobile.com Signed-off-by: Ding Xiang Signed-off-by: Mauro Carvalho Chehab commit a53ff69f7560513acffec2641bb6df682829eba9 Author: Krzysztof Kozlowski Date: Tue Mar 16 08:56:25 2021 +0100 media: atomisp: do not select COMMON_CLK to fix builds COMMON_CLK is a user-selectable option with its own dependencies. The most important dependency is !HAVE_LEGACY_CLK. User-selectable drivers should not select COMMON_CLK because they will create a dependency cycle and build failures. Link: https://lore.kernel.org/linux-media/20210316075625.10382-1-krzysztof.kozlowski@canonical.com Signed-off-by: Krzysztof Kozlowski Reviewed-by: Stephen Boyd Signed-off-by: Mauro Carvalho Chehab commit 5d986a0e85af1c99ef936d51879ab30976cb641b Author: Kaixu Xia Date: Sat Nov 14 14:55:50 2020 +0100 media: atomisp: make atomisp_css_continuous_set_num_raw_frames() void The return value of atomisp_css_continuous_set_num_raw_frames() function is always 0, so there's no reason for a return value. In addition, the __enable_continuous_mode() checked the return value for possible error which is unnecessary. Convert atomisp_css_continuous_set_num_raw_frames() to a void function. Link: https://lore.kernel.org/linux-media/1605362150-11401-1-git-send-email-kaixuxia@tencent.com Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Mauro Carvalho Chehab commit 1907345078b8279aec9a4663572bee6819a11bf9 Author: Kaixu Xia Date: Sat Nov 14 14:19:36 2020 +0100 media: atomisp: make atomisp_css_stop() void The return value of atomisp_css_stop() function is always 0 and there are no callers check the return value, so there's no reason for a return value. Convert atomisp_css_stop() to a void function. Link: https://lore.kernel.org/linux-media/1605359976-11254-1-git-send-email-kaixuxia@tencent.com Reported-by: Tosk Robot Signed-off-by: Kaixu Xia Signed-off-by: Mauro Carvalho Chehab commit 3aa059ae8beb0a3d4a06216c7cf6f0f720707136 Author: Alex Dewar Date: Sat Oct 17 16:28:02 2020 +0200 media: staging: media: atomisp: Remove unnecessary if statement The bodies of the if and else sections are the same, so just remove the check. Link: https://lore.kernel.org/linux-media/20201017142810.26967-2-alex.dewar90@gmail.com Signed-off-by: Alex Dewar Signed-off-by: Mauro Carvalho Chehab commit 32abe91502d0ab30c9b3e11414e7d3300274e36b Author: Alex Dewar Date: Sat Oct 17 16:28:00 2020 +0200 media: staging: media: atomisp: Remove unused function The function ia_css_mipi_frame_specify() is not called from anywhere and the comment above its declaration states that it should be removed when there are no more users. So remove it. Link: https://lore.kernel.org/linux-media/20201017142810.26967-1-alex.dewar90@gmail.com Signed-off-by: Alex Dewar Signed-off-by: Mauro Carvalho Chehab commit 9baa3d64e8e2373ddd11c346439e5dfccb2cbb0d Author: Colin Ian King Date: Wed Oct 7 14:16:28 2020 +0200 media: m88rs6000t: avoid potential out-of-bounds reads on arrays There a 3 array for-loops that don't check the upper bounds of the index into arrays and this may lead to potential out-of-bounds reads. Fix this by adding array size upper bounds checks to be full safe. Addresses-Coverity: ("Out-of-bounds read") Link: https://lore.kernel.org/linux-media/20201007121628.20676-1-colin.king@canonical.com Fixes: 333829110f1d ("[media] m88rs6000t: add new dvb-s/s2 tuner for integrated chip M88RS6000") Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab commit dfe59c78f4cc1924031e1be3120feb3f126da8ed Author: Leonid Kushnir Date: Tue Oct 6 22:29:03 2020 +0200 media: staging: atomisp: Corrected error handling in function This patch fixes check of a result of 'power_up()' function call in function 'gc0310_s_power()' to do "error handling" instead of "success handling" as Dan Carpenter noted in his comment on the previous patch. Lines 'return gc0310_init(sd)' and 'return ret' are swapped, and direct value of 'ret' is checked in IF statement now. Link: https://lore.kernel.org/linux-media/20201006202903.GA8346@linux Signed-off-by: Leonid Kushnir Signed-off-by: Mauro Carvalho Chehab commit 4658e1dbc358b754fac3268aa903d268e41b35df Author: Leonid Kushnir Date: Tue Oct 6 10:17:21 2020 +0200 media: staging: atomisp: Removed else branch in function This patch fixes the checkpatch.pl warning : WARNING: else is not generally useful after a break or return Expressions under 'else' branch in function 'gc0310_s_power' are executed whenever the exppression in 'if' is False. Otherwise, return from function occurs. Therefore, there is no need in 'else', and it has been removed. Link: https://lore.kernel.org/linux-media/20201006081721.GA35979@linux Signed-off-by: Leonid Kushnir Signed-off-by: Mauro Carvalho Chehab commit 3a7c578f391839d60d32d08a31af04e6cc489564 Author: Leonid Kushnir Date: Mon Oct 5 11:41:07 2020 +0200 media: staging: atomisp: Fixed allignment to match open parenthesis Moved the parameters of the function '__gc0310_write_reg_is_consecutive' to the right under open parenthesis to fix warning message from checkpatch.pl: 'CHECK: Alignment should match open parenthesis'. Link: https://lore.kernel.org/linux-media/20201005094107.GA44033@linux Signed-off-by: Leonid Kushnir Signed-off-by: Mauro Carvalho Chehab commit 16a5dcf7fbc2f5cd10c1e6264262bfa3832fb7d5 Author: Souptick Joarder Date: Sun Sep 27 17:08:04 2020 +0200 media: atomisp: Fixed error handling path Inside alloc_user_pages() based on flag value either pin_user_pages() or get_user_pages_fast() will be called. However, these API might fail. But free_user_pages() called in error handling path doesn't bother about return value and will try to unpin bo->pgnr pages, which is incorrect. Fix this by passing the page_nr to free_user_pages(). If page_nr > 0 pages will be unpinned based on bo->mem_type. This will also take care of non error handling path. allocation") Link: https://lore.kernel.org/linux-media/1601219284-13275-1-git-send-email-jrdr.linux@gmail.com Fixes: 14a638ab96c5 ("media: atomisp: use pin_user_pages() for memory Signed-off-by: Souptick Joarder Cc: John Hubbard Cc: Ira Weiny Reviewed-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab commit 491a0b208b15978c2bde9eb1a6b77a5e0eb55ad0 Author: Gary Yao Date: Sat Sep 26 22:50:58 2020 +0200 media: staging: media: atomisp: clean up block comment style issues Clean up block comment style issues to follow kernel coding style and clear checkpatch warnings. WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Link: https://lore.kernel.org/linux-media/20200926205103.189041-1-gary@apache.org Signed-off-by: Gary Yao Signed-off-by: Mauro Carvalho Chehab commit 519648bed470441eac680314724ee4128f422a92 Author: Necip Fazil Yildiran Date: Tue Sep 22 15:22:22 2020 +0200 media: mantis: remove orphan mantis_core.c There is no Makefile rule to have drivers/media/pci/mantis/mantis_core.o in build since the code overhaul with commit b3b961448f70 ("V4L/DVB (13795): [Mantis/Hopper] Code overhaul, add Hopper devices into the PCI ID list"). It looks like drivers/media/pci/mantis/mantis_core.c is a leftover. Remove the orphan code. Link: https://lore.kernel.org/linux-media/20200922132221.2051769-1-fazilyildiran@gmail.com Fixes: b3b961448f70 ("V4L/DVB (13795): [Mantis/Hopper] Code overhaul, add Hopper devices into the PCI ID list"). Signed-off-by: Necip Fazil Yildiran Signed-off-by: Mauro Carvalho Chehab commit d7bcb5b15041f20eb7e002df533b83a7467715dd Author: Alex Dewar Date: Mon Sep 21 23:53:53 2020 +0200 media: staging: media: atomisp: Remove unhelpful info message We don't really need to know that the LED pin reset successfully. Link: https://lore.kernel.org/linux-media/20200921215359.45003-3-alex.dewar90@gmail.com Signed-off-by: Alex Dewar Signed-off-by: Mauro Carvalho Chehab commit 967db696b03705bc09e496e9c010c916a3165e03 Author: Mauro Carvalho Chehab Date: Mon Mar 22 17:21:07 2021 +0100 atomisp: remove a now unused var A previous cleanup patch removed the usage of the ret var. So, drop it. Link: https://lore.kernel.org/linux-media/a03a4a3e9aad2b8154018c323cf7766266990724.1616430113.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab commit 2e774b36997926d120f5ce0b977d8dc1956a5454 Author: Christophe JAILLET Date: Sun Sep 13 16:57:16 2020 +0200 media: mantis: 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 'mantis_alloc_buffers()' (mantis_dma.c) GFP_KERNEL can be used because it is called from 'mantis_dma_init()' which is only called from probe functions 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) Link: https://lore.kernel.org/linux-media/20200913145716.361507-1-christophe.jaillet@wanadoo.fr Signed-off-by: Christophe JAILLET Signed-off-by: Mauro Carvalho Chehab commit c0e3bcb253907b018883e400ff0282ef82e1e069 Author: Mauro Carvalho Chehab Date: Wed Sep 9 15:07:11 2020 +0200 media: camera-sensor.rst: fix a doc build warning Documentation/driver-api/media/camera-sensor.rst:123: WARNING: Inline literal start-string without end-string. There's a missing blank line over there. Link: https://lore.kernel.org/linux-media/c326774ad841b905c3b2925e5f8f509d29fb4c6f.1599656828.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab commit f07d34d141e08d8de46ca1c5ef2cb73988d7339c Author: Alex Dewar Date: Thu Sep 3 20:31:34 2020 +0200 media: staging: media: atomisp: Don't abort on error in module exit path The function lm3554_remove() checks for the return code for lm3554_gpio_uninit() even though this is on the exit path and exits the function, leaving the variable flash unfreed. Print a warning instead and free flash unconditionally. Link: https://lore.kernel.org/linux-media/20200903183145.720727-1-alex.dewar90@gmail.com Signed-off-by: Alex Dewar Signed-off-by: Mauro Carvalho Chehab commit d4a3fa6652e3f617bd4cfe3fef99f25a84ffa2ca Author: Daniel W. S. Almeida Date: Thu Sep 3 15:13:09 2020 +0200 media: dvb-frontends: lgdt3306a.c: remove dead code Fix the following coccinelle report: drivers/media/dvb-frontends/lgdt3306a.c:718:5-8: Unneeded variable: "ret". Return "0" on line 744 Code was enclosed with #if 0 and thus this variable was not needed. Remove that function altogether. The lgdt3306a_spectral_inversion function was dropped completely since the function doesn't do anything. A comment was left at its calling site to let others know that spectral_inversion defaults already set for VSB and QAM Found using - Coccinelle (http://coccinelle.lip6.fr) Link: https://lore.kernel.org/linux-media/20200903131311.442255-1-dwlsalmeida@gmail.com Signed-off-by: Daniel W. S. Almeida Signed-off-by: Mauro Carvalho Chehab commit 6045b01dd0e3cd3759eafe7f290ed04c957500b1 Author: Colin Ian King Date: Wed Sep 2 18:58:52 2020 +0200 media: [next] staging: media: atomisp: fix memory leak of object flash In the case where the call to lm3554_platform_data_func returns an error there is a memory leak on the error return path of object flash. Fix this by adding an error return path that will free flash and rename labels fail2 to fail3 and fail1 to fail2. Link: https://lore.kernel.org/linux-media/20200902165852.201155-1-colin.king@canonical.com Fixes: 9289cdf39992 ("staging: media: atomisp: Convert to GPIO descriptors") Signed-off-by: Colin Ian King Signed-off-by: Mauro Carvalho Chehab commit f7bff017741d98567265ed6a6449311a51810fb6 Author: Dan Carpenter Date: Mon Mar 22 18:06:49 2021 +0300 staging: qlge: fix an error code in probe() If alloc_etherdev_mq() fails then return -ENOMEM instead of success. The "err = 0;" triggers an unused assignment now so remove that as well. Fixes: 953b94009377 ("staging: qlge: Initialize devlink health dump framework") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/YFiyicHI189PXrha@mwanda Signed-off-by: Greg Kroah-Hartman commit ac3d71e0cbf52064c127f7a7d0e1091637a2c24b Author: Fabio Aiuto Date: Mon Mar 22 15:31:39 2021 +0100 staging: rtl8723bs: delete extern declarations in core/rtw_ap.c delete extern declaration in .c file (RTW_WPA_OUI) and fix the following checkpatch issues: WARNING: externs should be avoided in .c files 14: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:14: +extern unsigned char WMM_OUI[]; -- WARNING: externs should be avoided in .c files 15: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:15: +extern unsigned char WPS_OUI[]; -- WARNING: externs should be avoided in .c files 16: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:16: +extern unsigned char P2P_OUI[]; Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e48480113c7ffc5128d867787bb3f73b3eb505ae.1616422773.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 804173dc7c4dea7eac335d183d2c8e50e96a3d69 Author: Marco Cesati Date: Mon Mar 22 14:37:17 2021 +0100 Staging: rtl8723bs: remove useless structs in odm.h Remove the following unreferenced struct's in hal/odm.h: struct odm_sta_info_t struct odm_ra_info_t Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-20-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4ad11db48f1aa202fe0d2882be713f0dd05f3355 Author: Marco Cesati Date: Mon Mar 22 14:37:16 2021 +0100 Staging: rtl8723bs: remove useless structs in odm_HWConfig.h Remove the following unreferenced struct in hal/odm_HWConfig.h: struct phy_status_rpt_8812_t Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-19-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a4bc0fa9ec51008bb494943ec98b4ad836e3a216 Author: Marco Cesati Date: Mon Mar 22 14:37:15 2021 +0100 Staging: rtl8723bs: remove useless structs in ieee80211.h Remove the following unreferenced struct's in include/ieee80211.h: struct ieee_ibss_seq struct ieee80211_rx_stats struct ieee80211_frag_entry struct ieee80211_stats struct ieee80211_softmac_stats struct ieee80211_security struct ieee80211_header_data Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-18-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 68c81e9b3f8110a39d276101a1f7f6087b1a535d Author: Marco Cesati Date: Mon Mar 22 14:37:14 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_xmit.h Remove the following unreferenced struct in include/rtw_xmit.h: struct agg_pkt_info Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-17-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a3d64cc2073ad978ab02a924661a4f06faf7484b Author: Marco Cesati Date: Mon Mar 22 14:37:13 2021 +0100 Staging: rtl8723bs: remove useless structs in hal_phy.h Remove the following unreferenced struct in include/hal_phy.h: struct r_antenna_select_ofdm Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-16-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 576822d7c1d814a0a4c0ddd086d9eada44b81808 Author: Marco Cesati Date: Mon Mar 22 14:37:12 2021 +0100 Staging: rtl8723bs: remove useless structs in wifi.h Remove the following unreferenced struct in include/wifi.h: struct rtw_ieee80211_bar Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-15-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 997a9f9e9b98bfcbaeef3e0f3b1e1d3bcbc125c3 Author: Marco Cesati Date: Mon Mar 22 14:37:11 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_io.h Remove the following unreferenced struct's in include/rtw_io.h: struct reg_protocol_rd struct reg_protocol_wt Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-14-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 829f646cee1c67bd75567d220f2649d16dd666dc Author: Marco Cesati Date: Mon Mar 22 14:37:10 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_wifi_regd.h Remove the following unreferenced struct in include/rtw_wifi_regd.h: struct country_code_to_enum_rd Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-13-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit cb22eb37e50b7834d9acf6166d8cff9ebd74af81 Author: Marco Cesati Date: Mon Mar 22 14:37:09 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_security.h Remove the following unreferenced struct in include/rtw_security.h: struct sha256_state Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-12-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit b13efb7df4d50dc4993795160bd1f34258a5af94 Author: Marco Cesati Date: Mon Mar 22 14:37:08 2021 +0100 Staging: rtl8723bs: remove useless structs in rtl8723b_recv.h Remove the following unreferenced struct in include/rtl8723b_recv.h: struct phystatus_8723b Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-11-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3673da6f1d43df2ab588ea691e6144ff98b9f3b3 Author: Marco Cesati Date: Mon Mar 22 14:37:07 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_event.h Remove the following unreferenced struct's in include/rtw_event.h: struct addba_event struct c2hevent_queue Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-10-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7d391dced4028464b06290cd4f47e442b3cb7659 Author: Marco Cesati Date: Mon Mar 22 14:37:06 2021 +0100 Staging: rtl8723bs: remove useless structs in hal_intf.h Remove the following unreferenced struct in include/hal_intf.h: struct wowlan_ioctl_param Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-9-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 86ce9840bf744eb3f2d4a046854314ae555dfbe3 Author: Marco Cesati Date: Mon Mar 22 14:37:05 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_mp.h Remove the following unreferenced struct's in include/rtw_mp.h: struct iocmd_struct struct rf_reg_param struct bb_reg_param Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-8-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7bb865886f81abb3c718feb9024d355fa7ff45b4 Author: Marco Cesati Date: Mon Mar 22 14:37:04 2021 +0100 Staging: rtl8723bs: remove useless structs in wlan_bssdef.h Remove the following unreferenced struct's in include/wlan_bssdef.h: struct ndis_802_11_association_information struct ndis_802_11_key struct ndis_802_11_remove_key Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-7-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit cc6205b2b168d3eae9dd2f581803d5690920f2dc Author: Marco Cesati Date: Mon Mar 22 14:37:03 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_ioctl_set.h Remove the following unreferenced struct in include/rtw_ioctl_set.h: struct BSSIDInfo Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-6-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit e49472543847c80a4ae665bc2405621ed914f28d Author: Marco Cesati Date: Mon Mar 22 14:37:02 2021 +0100 Staging: rtl8723bs: remove useless structs in drv_types.h Remove the following unreferenced struct in include/drv_types.h: struct specific_device_id Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-5-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 65d8ec9416b44ae29aa797938c206fc41dd7763b Author: Marco Cesati Date: Mon Mar 22 14:37:01 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_recv.h Remove the following unreferenced struct in include/rtw_recv.h: struct smooth_rssi_data Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-4-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1250fce7ea7330ef2c56e24d2fef6c7f48b4f5b1 Author: Marco Cesati Date: Mon Mar 22 14:37:00 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_cmd.h Remove the following unreferenced struct's in include/rtw_cmd.h: struct P2P_PS_Offload_t struct P2P_PS_CTWPeriod_t struct usb_suspend_parm struct getbasicrate_rsp struct getdatarate_rsp struct readBB_parm struct readBB_rsp struct readTSSI_parm struct readTSSI_rsp struct writeBB_parm struct readRF_parm struct readRF_rsp struct writeRF_parm struct getrfintfs_parm struct settxagctbl_parm struct gettxagctbl_parm struct gettxagctbl_rsp struct setagcctrl_parm struct setssup_parm struct getssup_parm struct getssup_rsp struct setssdlevel_parm struct getssdlevel_parm struct getssdlevel_rsp struct setssulevel_parm struct getssulevel_parm struct getssulevel_rsp struct setratable_parm struct getratable_parm struct getratable_rsp struct gettxretrycnt_parm struct gettxretrycnt_rsp struct getrxretrycnt_parm struct getrxretrycnt_rsp struct getbcnokcnt_parm struct getbcnokcnt_rsp struct getbcnerrcnt_parm struct getbcnerrcnt_rsp struct getcurtxpwrlevel_parm struct getcurtxpwrlevel_rsp struct setprobereqextraie_parm struct setassocreqextraie_parm struct setproberspextraie_parm struct setassocrspextraie_parm Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-3-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8dd726e10dd164eaccd8f243486065820c7097bc Author: Marco Cesati Date: Mon Mar 22 14:36:59 2021 +0100 Staging: rtl8723bs: remove useless structs in rtw_mlme.h Remove the following unreferenced struct's in include/rtw_mlme.h: struct cfg80211_wifidirect_info struct tdls_info struct tdls_txmgmt Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210322133717.17797-2-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 946e2f007fc23a1f759a401db2beb7d49e143843 Author: Arnd Bergmann Date: Mon Mar 22 11:35:40 2021 +0100 staging/nvec:: avoid Wempty-body warning This driver has a few disabled diagnostics, which can probably just get removed, or might still be helpful: drivers/staging/nvec/nvec_ps2.c: In function 'nvec_ps2_notifier': drivers/staging/nvec/nvec_ps2.c:94:77: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 94 | NVEC_PHD("unhandled mouse event: ", msg, msg[1] + 2); Changing the empty macro to the usual 'do {} while (0)' at least shuts up the compiler warnings. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210322103545.704121-2-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit 3eb631e321c74de84b23466701d708dfa7556c6e Author: Arnd Bergmann Date: Mon Mar 22 11:35:39 2021 +0100 staging/rtl8192u: avoid Wempty-body warning This driver has a few disabled diagnostics, which can probably just get removed, or might still be helpful: drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl8192_set_rxconf': drivers/staging/rtl8192u/r8192U_core.c:767:45: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 767 | DMESG("NIC in promisc mode"); | ^ drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl819xusb_rx_command_packet': drivers/staging/rtl8192u/r8192U_core.c:883:80: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 883 | DMESG("rxcommandpackethandle819xusb: It is a command packet\n"); | ^ Changing the empty macro to no_printk() to shut up the compiler warnings and add format string checking. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210322103545.704121-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman commit be8597239379f0f53c9710dd6ab551bbf535bec6 Author: Tetsuo Handa Date: Mon Mar 22 07:52:07 2021 +0900 Bluetooth: initialize skb_queue_head at l2cap_chan_create() syzbot is hitting "INFO: trying to register non-static key." message [1], for "struct l2cap_chan"->tx_q.lock spinlock is not yet initialized when l2cap_chan_del() is called due to e.g. timeout. Since "struct l2cap_chan"->lock mutex is initialized at l2cap_chan_create() immediately after "struct l2cap_chan" is allocated using kzalloc(), let's as well initialize "struct l2cap_chan"->{tx_q,srej_q}.lock spinlocks there. [1] https://syzkaller.appspot.com/bug?extid=fadfba6a911f6bf71842 Reported-and-tested-by: syzbot Signed-off-by: Tetsuo Handa Signed-off-by: Marcel Holtmann commit 1665c8fdffbb8a6d606ce7eb3e2c98f1b49e2fd3 Author: Martin Kaiser Date: Sun Mar 21 17:20:09 2021 +0100 staging: rtl8188eu: use netdev routines for private data This driver implements its own routines to allocate, access and free the private data of its net_device. Use the functionality from the networking core instead. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20210321162009.15447-1-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman commit 9e1c785f13e0ed11ad0dade9b63fb6012df81b71 Author: Tong Zhang Date: Thu Mar 18 23:47:52 2021 -0400 staging: comedi: das800: fix request_irq() warn request_irq() won't accept a name which contains slash so we need to replace it with something else -- otherwise it will throw a warning and the entry in /proc/irq/ will not be created. Since the .name might be used by userspace and we don't want to break userspace, so we are changing the parameters passed to request_irq() Suggested-by: Ian Abbott Reviewed-by: Ian Abbott Signed-off-by: Tong Zhang Link: https://lore.kernel.org/r/20210319034753.435811-1-ztong0001@gmail.com Signed-off-by: Greg Kroah-Hartman commit 07528783c7da0b711385f0033a836453b5ec0c9c Author: Bhaskar Chowdhury Date: Mon Mar 22 06:30:51 2021 +0530 Bluetooth: hci_qca: Mundane typo fix s/packat/packet/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Marcel Holtmann commit 5c4c8c9544099bb9043a10a5318130a943e32fc3 Author: Archie Pusaka Date: Mon Mar 22 14:03:11 2021 +0800 Bluetooth: verify AMP hci_chan before amp_destroy hci_chan can be created in 2 places: hci_loglink_complete_evt() if it is an AMP hci_chan, or l2cap_conn_add() otherwise. In theory, Only AMP hci_chan should be removed by a call to hci_disconn_loglink_complete_evt(). However, the controller might mess up, call that function, and destroy an hci_chan which is not initiated by hci_loglink_complete_evt(). This patch adds a verification that the destroyed hci_chan must have been init'd by hci_loglink_complete_evt(). Example crash call trace: Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0xe3/0x144 lib/dump_stack.c:118 print_address_description+0x67/0x22a mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report+0x251/0x28f mm/kasan/report.c:396 hci_send_acl+0x3b/0x56e net/bluetooth/hci_core.c:4072 l2cap_send_cmd+0x5af/0x5c2 net/bluetooth/l2cap_core.c:877 l2cap_send_move_chan_cfm_icid+0x8e/0xb1 net/bluetooth/l2cap_core.c:4661 l2cap_move_fail net/bluetooth/l2cap_core.c:5146 [inline] l2cap_move_channel_rsp net/bluetooth/l2cap_core.c:5185 [inline] l2cap_bredr_sig_cmd net/bluetooth/l2cap_core.c:5464 [inline] l2cap_sig_channel net/bluetooth/l2cap_core.c:5799 [inline] l2cap_recv_frame+0x1d12/0x51aa net/bluetooth/l2cap_core.c:7023 l2cap_recv_acldata+0x2ea/0x693 net/bluetooth/l2cap_core.c:7596 hci_acldata_packet net/bluetooth/hci_core.c:4606 [inline] hci_rx_work+0x2bd/0x45e net/bluetooth/hci_core.c:4796 process_one_work+0x6f8/0xb50 kernel/workqueue.c:2175 worker_thread+0x4fc/0x670 kernel/workqueue.c:2321 kthread+0x2f0/0x304 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:415 Allocated by task 38: set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0x8d/0x9a mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x102/0x129 mm/slub.c:2787 kmalloc include/linux/slab.h:515 [inline] kzalloc include/linux/slab.h:709 [inline] hci_chan_create+0x86/0x26d net/bluetooth/hci_conn.c:1674 l2cap_conn_add.part.0+0x1c/0x814 net/bluetooth/l2cap_core.c:7062 l2cap_conn_add net/bluetooth/l2cap_core.c:7059 [inline] l2cap_connect_cfm+0x134/0x852 net/bluetooth/l2cap_core.c:7381 hci_connect_cfm+0x9d/0x122 include/net/bluetooth/hci_core.h:1404 hci_remote_ext_features_evt net/bluetooth/hci_event.c:4161 [inline] hci_event_packet+0x463f/0x72fa net/bluetooth/hci_event.c:5981 hci_rx_work+0x197/0x45e net/bluetooth/hci_core.c:4791 process_one_work+0x6f8/0xb50 kernel/workqueue.c:2175 worker_thread+0x4fc/0x670 kernel/workqueue.c:2321 kthread+0x2f0/0x304 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:415 Freed by task 1732: set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free mm/kasan/kasan.c:521 [inline] __kasan_slab_free+0x106/0x128 mm/kasan/kasan.c:493 slab_free_hook mm/slub.c:1409 [inline] slab_free_freelist_hook+0xaa/0xf6 mm/slub.c:1436 slab_free mm/slub.c:3009 [inline] kfree+0x182/0x21e mm/slub.c:3972 hci_disconn_loglink_complete_evt net/bluetooth/hci_event.c:4891 [inline] hci_event_packet+0x6a1c/0x72fa net/bluetooth/hci_event.c:6050 hci_rx_work+0x197/0x45e net/bluetooth/hci_core.c:4791 process_one_work+0x6f8/0xb50 kernel/workqueue.c:2175 worker_thread+0x4fc/0x670 kernel/workqueue.c:2321 kthread+0x2f0/0x304 kernel/kthread.c:253 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:415 The buggy address belongs to the object at ffff8881d7af9180 which belongs to the cache kmalloc-128 of size 128 The buggy address is located 24 bytes inside of 128-byte region [ffff8881d7af9180, ffff8881d7af9200) The buggy address belongs to the page: page:ffffea00075ebe40 count:1 mapcount:0 mapping:ffff8881da403200 index:0x0 flags: 0x8000000000000200(slab) raw: 8000000000000200 dead000000000100 dead000000000200 ffff8881da403200 raw: 0000000000000000 0000000080150015 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881d7af9080: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff8881d7af9100: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8881d7af9180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881d7af9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881d7af9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc Signed-off-by: Archie Pusaka Reported-by: syzbot+98228e7407314d2d4ba2@syzkaller.appspotmail.com Reviewed-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Marcel Holtmann commit 3a9d54b1947ecea8eea9a902c0b7eb58a98add8a Author: Archie Pusaka Date: Mon Mar 22 14:02:15 2021 +0800 Bluetooth: Set CONF_NOT_COMPLETE as l2cap_chan default Currently l2cap_chan_set_defaults() reset chan->conf_state to zero. However, there is a flag CONF_NOT_COMPLETE which is set when creating the l2cap_chan. It is suggested that the flag should be cleared when l2cap_chan is ready, but when l2cap_chan_set_defaults() is called, l2cap_chan is not yet ready. Therefore, we must set this flag as the default. Example crash call trace: __dump_stack lib/dump_stack.c:15 [inline] dump_stack+0xc4/0x118 lib/dump_stack.c:56 panic+0x1c6/0x38b kernel/panic.c:117 __warn+0x170/0x1b9 kernel/panic.c:471 warn_slowpath_fmt+0xc7/0xf8 kernel/panic.c:494 debug_print_object+0x175/0x193 lib/debugobjects.c:260 debug_object_assert_init+0x171/0x1bf lib/debugobjects.c:614 debug_timer_assert_init kernel/time/timer.c:629 [inline] debug_assert_init kernel/time/timer.c:677 [inline] del_timer+0x7c/0x179 kernel/time/timer.c:1034 try_to_grab_pending+0x81/0x2e5 kernel/workqueue.c:1230 cancel_delayed_work+0x7c/0x1c4 kernel/workqueue.c:2929 l2cap_clear_timer+0x1e/0x41 include/net/bluetooth/l2cap.h:834 l2cap_chan_del+0x2d8/0x37e net/bluetooth/l2cap_core.c:640 l2cap_chan_close+0x532/0x5d8 net/bluetooth/l2cap_core.c:756 l2cap_sock_shutdown+0x806/0x969 net/bluetooth/l2cap_sock.c:1174 l2cap_sock_release+0x64/0x14d net/bluetooth/l2cap_sock.c:1217 __sock_release+0xda/0x217 net/socket.c:580 sock_close+0x1b/0x1f net/socket.c:1039 __fput+0x322/0x55c fs/file_table.c:208 ____fput+0x17/0x19 fs/file_table.c:244 task_work_run+0x19b/0x1d3 kernel/task_work.c:115 exit_task_work include/linux/task_work.h:21 [inline] do_exit+0xe4c/0x204a kernel/exit.c:766 do_group_exit+0x291/0x291 kernel/exit.c:891 get_signal+0x749/0x1093 kernel/signal.c:2396 do_signal+0xa5/0xcdb arch/x86/kernel/signal.c:737 exit_to_usermode_loop arch/x86/entry/common.c:243 [inline] prepare_exit_to_usermode+0xed/0x235 arch/x86/entry/common.c:277 syscall_return_slowpath+0x3a7/0x3b3 arch/x86/entry/common.c:348 int_ret_from_sys_call+0x25/0xa3 Signed-off-by: Archie Pusaka Reported-by: syzbot+338f014a98367a08a114@syzkaller.appspotmail.com Reviewed-by: Alain Michaud Reviewed-by: Abhishek Pandit-Subedi Reviewed-by: Guenter Roeck Signed-off-by: Marcel Holtmann commit 97bc7ffa1b1e9a8672e0a8e9a96680b0c3717427 Author: Ville Syrjälä Date: Fri Mar 5 17:36:05 2021 +0200 drm/i915: Fix enabled_planes bitmask The enabled_planes bitmask was supposed to track logically enabled planes (ie. fb!=NULL and crtc!=NULL), but instead we end up putting even disabled planes into the bitmask since intel_plane_atomic_check_with_state() only takes the early exit if the plane was disabled and stays disabled. I think I misread the early said codepath to exit whenever the plane is logically disabled, which is not true. So let's fix this up properly and set the bit only when the plane actually is logically enabled. Cc: Manasi Navare Fixes: ee42ec19ca2e ("drm/i915: Track logically enabled planes for hw state") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-2-ville.syrjala@linux.intel.com Reviewed-by: Manasi Navare commit d5a4d5413dd833b3ceba395ba77f00470a3ffbe8 Author: Aswath Govindraju Date: Fri Mar 19 10:49:50 2021 +0530 arm64: dts: ti: k3-am642: reserve gpio in mcu domain for firmware usage The gpio0 subsystem present in MCU domain might be used by firmware and is not pinned out in evm/sk. Therefore, reserve it for MCU firmware. Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210319051950.17549-3-a-govindraju@ti.com commit 01a91e01b8fddaeb37b953a5e39eafbdf2d4b061 Author: Aswath Govindraju Date: Fri Mar 19 10:49:49 2021 +0530 arm64: dts: ti: k3-am64: Add GPIO DT nodes Add device tree nodes for GPIO modules and interrupt controller in main and mcu domains. Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210319051950.17549-2-a-govindraju@ti.com commit 548ad8ee68c034300b714b297fe18b16a8a4f797 Author: Mauro Carvalho Chehab Date: Mon Mar 22 16:33:57 2021 +0100 media: dvb_frontend: warn if frontend driver has API issues the kAPI for a frontend can use 3 different tuning methods: 1. The hardware tracks internally frequency shifts via its own internal zigzag logic; 2. The hardware has a custom zigzag method, implemented via fe search() ops; 3. The hardware doesn't have any internal zigzag logic. So, the Kernel needs to implement it. Drivers that use the in-kernel software zigzag are required to provide some parameters for the zigzag code to work. Failing to do that will just make the Kernel to tune several times to the very same frequency, delaying the tuning time for no good reason. This is actually a kAPI violation (and an uAPI one, as the frequency shift is exported to the uAPI). Emit a warning on such case, as the driver needs to be fixed. Link: https://lore.kernel.org/linux-media/6d5941e3ba77439bbc401207cd87d9b8748d5cb8.1616427172.git.mchehab+huawei@kernel.org Signed-off-by: Mauro Carvalho Chehab commit 90432e600619cbd3f38ec817374a5db0caf1d600 Author: Mikulas Patocka Date: Mon Mar 22 10:05:05 2021 -0400 buffer: a small optimization in grow_buffers This patch replaces a loop with a "tzcnt" instruction. Signed-off-by: Mikulas Patocka Signed-off-by: Al Viro commit 114e4a4b4884c14ebd35874cbe3e1ca0d38efa5d Author: Paul E. McKenney Date: Sat Feb 27 20:55:57 2021 -0800 torture: Fix kvm.sh --datestamp regex check Some versions of grep are happy to interpret a nonsensically placed "-" within a "[]" pattern as a dash, while others give an error message. This commit therefore places the "-" at the end of the expression where it was supposed to be in the first place. Signed-off-by: Paul E. McKenney commit a1ab2e89f36d678512a50cbebf6afc4201f41a31 Author: Paul E. McKenney Date: Tue Feb 23 14:33:03 2021 -0800 torture: Consolidate qemu-cmd duration editing into kvm-transform.sh Currently, kvm-again.sh updates the duration in the "seconds=" comment in the qemu-cmd file, but kvm-transform.sh updates the duration in the actual qemu command arguments. This is an accident waiting to happen. This commit therefore consolidates these updates into kvm-transform.sh. Signed-off-by: Paul E. McKenney commit 03edf700db335b9375c18310d59d0a0ab6c850df Author: Paul E. McKenney Date: Tue Feb 23 13:12:41 2021 -0800 torture: Print proper vmlinux path for kvm-again.sh runs The kvm-again.sh script does not copy over the vmlinux files due to their large size. This means that a gdb run must use the vmlinux file from the original "res" directory. This commit therefore finds that directory and prints it out so that the user can copy and pasted the gdb command just as for the initial run. Signed-off-by: Paul E. McKenney commit a5dbe2524f553a1283b3364ff91e96bfb618ceab Author: Paul E. McKenney Date: Tue Feb 23 12:07:39 2021 -0800 torture: Make TORTURE_TRUST_MAKE available in kvm-again.sh environment Because the TORTURE_TRUST_MAKE environment variable is not recorded, kvm-again.sh runs can result in the parse-build.sh script emitting false-positive "BUG: TREE03 no build" messages. These messages are intended to complain about any lack of compiler invocations when the --trust-make flag is not given to kvm.sh. However, when this flag is given to kvm.sh (and thus when TORTURE_TRUST_MAKE=y), lack of compiler invocations is expected behavior when rebuilding from identical source code. This commit therefore makes kvm-test-1-run.sh record the value of the TORTURE_TRUST_MAKE environment variable as an additional comment in the qemu-cmd file, and also makes kvm-again.sh reconstitute that variable from that comment. Signed-off-by: Paul E. McKenney commit 018629e909ffcabfc657388094371f20ba90649f Author: Paul E. McKenney Date: Mon Feb 22 14:58:41 2021 -0800 torture: Make kvm-transform.sh update jitter commands When rerunning an old run using kvm-again.sh, the jitter commands will re-use the original "res" directory. This works, but is clearly an accident waiting to happen. And this accident will happen with remote runs, where the original directory lives on some other system. This commit therefore updates the qemu-cmd commands to use the new res directory created for this specific run. Signed-off-by: Paul E. McKenney commit 00505165cf4484dffc488259d59689845ba77939 Author: Paul E. McKenney Date: Mon Feb 22 14:12:58 2021 -0800 torture: Add --duration argument to kvm-again.sh This commit adds a --duration argument to kvm-again.sh to allow the user to override the --duration specified for the original kvm.sh run. Signed-off-by: Paul E. McKenney commit 7cf86c0b6279d9d12bb697e58c7e8b2184a8f3db Author: Paul E. McKenney Date: Fri Feb 19 17:49:58 2021 -0800 torture: Add kvm-again.sh to rerun a previous torture-test This commit adds a kvm-again.sh script that, given the results directory of a torture-test run, re-runs that test. This means that the kernels need not be rebuilt, but it also is a step towards running torture tests on remote systems. This commit also adds a kvm-test-1-run-batch.sh script that runs one batch out of the torture test. The idea is to copy a results directory tree to remote systems, then use kvm-test-1-run-batch.sh to run batches on these systems. Signed-off-by: Paul E. McKenney commit d6100d764cc47100ecabdc704bde5ad0448c87cd Author: Paul E. McKenney Date: Wed Feb 17 14:40:03 2021 -0800 torture: Create a "batches" file for build reuse This commit creates a "batches" file in the res/$ds directory, where $ds is the datestamp. This file contains the batches and the number of CPUs, for example: 1 TREE03 16 1 SRCU-P 8 2 TREE07 16 2 TREE01 8 3 TREE02 8 3 TREE04 8 3 TREE05 8 4 SRCU-N 4 4 TRACE01 4 4 TRACE02 4 4 RUDE01 2 4 RUDE01.2 2 4 TASKS01 2 4 TASKS03 2 4 SRCU-t 1 4 SRCU-u 1 4 TASKS02 1 4 TINY01 1 5 TINY02 1 5 TREE09 1 The first column is the batch number, the second the scenario number (possibly suffixed by a repetition number, as in "RUDE01.2"), and the third is the number of CPUs required by that scenario. The last line shows the number of CPUs expected by this batch file, which allows the run to be re-batched if a different number of CPUs is available. Signed-off-by: Paul E. McKenney commit 7ef0d5a33c81cfb1993f2947c361784b1b02adc8 Author: Paul E. McKenney Date: Wed Feb 17 14:04:01 2021 -0800 torture: De-capitalize TORTURE_SUITE Although it might be unlikely that someone would name a scenario "TORTURE_SUITE", they are within their rights to do so. This script therefore renames the "TORTURE_SUITE" file in the top-level date-stamped directory within "res" to "torture_suite" to avoid this name collision. Signed-off-by: Paul E. McKenney commit e633e63aa907feff98c654c1919101f3d53ebd5b Author: Paul E. McKenney Date: Wed Feb 17 07:15:41 2021 -0800 torture: Make upper-case-only no-dot no-slash scenario names official This commit enforces the defacto restriction on scenario names, which is that they contain neither "/", ".", nor lowercase alphabetic characters. This restriction avoids collisions between scenario names and the torture scripting's files and directories. Signed-off-by: Paul E. McKenney commit 00a447fabb5252d01035e78ae7f2943e5b4fff64 Author: Paul E. McKenney Date: Sat Feb 20 10:13:52 2021 -0800 torture: Rename SRCU-t and SRCU-u to avoid lowercase characters The convention that scenario names are all uppercase has two exceptions, SRCU-t and SRCU-u. This commit therefore renames them to SRCU-T and SRCU-U, respectively, to bring them in line with this convention. This in turn permits tighter argument checking in the torture-test scripting. Signed-off-by: Paul E. McKenney commit 996a042e0a0684b7a666b9d745784623a3531b27 Author: Paul E. McKenney Date: Tue Feb 16 20:17:44 2021 -0800 torture: Remove no-mpstat error message The cpus2use.sh script complains if the mpstat command is not available, and instead uses all available CPUs. Unfortunately, this complaint goes to stdout, where it confuses invokers who expect a single number. This commit removes this error message in order to avoid this confusion. The tendency of late has been to give rcutorture a full system, so this should not cause issues. Signed-off-by: Paul E. McKenney commit cb1fa863a00ba0e8faf69d2ebb960b75129bccd6 Author: Paul E. McKenney Date: Tue Feb 16 16:55:04 2021 -0800 torture: Record kvm-test-1-run.sh and kvm-test-1-run-qemu.sh PIDs This commit records the process IDs of the kvm-test-1-run.sh and kvm-test-1-run-qemu.sh scripts to ease monitoring of remotely running instances of these scripts. Signed-off-by: Paul E. McKenney commit 7831b391fbf86d19ae92e2984a9274b1d2b4eb06 Author: Paul E. McKenney Date: Tue Feb 16 15:32:23 2021 -0800 torture: Record jitter start/stop commands Distributed runs of rcutorture will need to start and stop jittering on the remote hosts, which means that the commands must be communicated to those hosts. The commit therefore causes kvm.sh to place these commands in new TORTURE_JITTER_START and TORTURE_JITTER_STOP environment variables to communicate them to the scripts that will set this up. In addition, this commit causes kvm-test-1-run.sh to append these commands to each generated qemu-cmd file, which allows any remotely executing script to extract the needed commands from this file. Signed-off-by: Paul E. McKenney commit d53f52d6fc220ba2074338ce6a91f837c7a7cba0 Author: Paul E. McKenney Date: Fri Feb 12 14:00:05 2021 -0800 torture: Extract kvm-test-1-run-qemu.sh from kvm-test-1-run.sh Currently, kvm-test-1-run.sh both builds and runs an rcutorture kernel, which is inconvenient when it is necessary to re-run an old run or to carry out a run on a remote system. This commit therefore extracts the portion of kvm-test-1-run.sh that invoke qemu to actually run rcutorture and places it in kvm-test-1-run-qemu.sh. Signed-off-by: Paul E. McKenney commit cc45716e07a41233b7c0b2183b0a3e60b85192e0 Author: Paul E. McKenney Date: Thu Feb 11 16:19:29 2021 -0800 torture: Record TORTURE_KCONFIG_GDB_ARG in qemu-cmd When re-running old rcutorture builds, if the original run involved gdb, the re-run also needs to do so. This commit therefore records the TORTURE_KCONFIG_GDB_ARG environment variable into the qemu-cmd file so that the re-run can access it. Signed-off-by: Paul E. McKenney commit 040accb3cd4ac4a8d151413f569b7ba6d918a19c Author: Paul E. McKenney Date: Thu Feb 11 12:37:46 2021 -0800 torture: Abstract jitter.sh start/stop into scripts This commit creates jitterstart.sh and jitterstop.sh scripts that handle the starting and stopping of the jitter.sh scripts. These must be sourced using the bash "." command to allow the generated script to wait on the backgrounded jitter.sh scripts. Signed-off-by: Paul E. McKenney commit 7abb18bd7567480e34f46d3512369ec49499064e Author: Paul E. McKenney Date: Thu Feb 25 16:10:38 2021 -0800 rcu: Provide polling interfaces for Tree RCU grace periods There is a need for a non-blocking polling interface for RCU grace periods, so this commit supplies start_poll_synchronize_rcu() and poll_state_synchronize_rcu() for this purpose. Note that the existing get_state_synchronize_rcu() may be used if future grace periods are inevitable (perhaps due to a later call_rcu() invocation). The new start_poll_synchronize_rcu() is to be used if future grace periods might not otherwise happen. Finally, poll_state_synchronize_rcu() provides a lockless check for a grace period having elapsed since the corresponding call to either of the get_state_synchronize_rcu() or start_poll_synchronize_rcu(). As with get_state_synchronize_rcu(), the return value from either get_state_synchronize_rcu() or start_poll_synchronize_rcu() is passed in to a later call to either poll_state_synchronize_rcu() or the existing (might_sleep) cond_synchronize_rcu(). [ paulmck: Remove redundant smp_mb() per Frederic Weisbecker feedback. ] [ Update poll_state_synchronize_rcu() docbook per Frederic Weisbecker feedback. ] Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit ee0975c3089e1c3357ccc3ada7a94a95b61e708c Author: Linus Walleij Date: Fri Mar 12 09:36:04 2021 +0100 mfd/power: ab8500: Push data to power supply code There is a slew of defines, structs and enums and even a function call only relevant for the charging code that still lives in . Push it down to the "ab8500-bm.h" header in the power supply subsystem where it is actually used. Signed-off-by: Linus Walleij Acked-by: Sebastian Reichel Signed-off-by: Lee Jones commit a65aa0ce23bd3bc29c9f3a6a90fe032e1dbd8f34 Author: Linus Walleij Date: Fri Mar 12 09:36:03 2021 +0100 mfd/power: ab8500: Push algorithm to power supply code The charging algorithm header is only used locally in the power supply subsystem so push this down into drivers/power/supply and rename from the confusing "ux500_chargalg.h" to "ab8500-chargalg.h" for clarity: it is only used with the AB8500. This is another remnant of non-DT code needing to pass data from boardfiles, which we don't do anymore. Signed-off-by: Linus Walleij Acked-by: Sebastian Reichel Signed-off-by: Lee Jones commit 417c0fc24dd4dbd60d94fa8deb36bf1176930e06 Author: Linus Walleij Date: Fri Mar 12 09:36:02 2021 +0100 mfd/power: ab8500: Push data to power supply code The global definition of platform data for the battery management code has no utility after the OF conversion, move the to be a local file in drivers/power/supply and stop defining the platform data in drivers/power/supply/ab8500_bmdata.c and broadcast to the kernel only to have it assigned as platform data to the MFD cells and then picked back into the same subsystem that defined it in the first place. This kills off a layer of indirection. Signed-off-by: Linus Walleij Acked-by: Sebastian Reichel Signed-off-by: Lee Jones commit 53207aa1a73e3e52b14c432b04d342c2b3af2e1c Author: Linus Walleij Date: Fri Mar 12 09:36:01 2021 +0100 power: ab8500: Require device tree The core AB8500 driver and the whole platform is completely dependent on being probed from device tree so remove the non-DT probe paths. Signed-off-by: Linus Walleij Acked-by: Sebastian Reichel Signed-off-by: Lee Jones commit 8d4a554d9cb196e928f16263d5c12fa400076c34 Author: Mauro Carvalho Chehab Date: Mon Mar 22 15:53:46 2021 +0100 media: dvb_frontend: don't call dvb_frontend_get_stepsize() twice Avoid calling the function twice, as it was just called at the previous line. Signed-off-by: Mauro Carvalho Chehab commit d6af27c3a6b6aa85acc8ef510c82ff1ae35dca58 Author: Mauro Carvalho Chehab Date: Wed Jun 17 20:52:13 2020 +0200 media: dvb_frontend: move algo-specific settings to a function As we're planning to call this code from somewhere else, let's first move it to its own function. Link: https://lore.kernel.org/linux-media/daa69edd80e7fcf979062273f3067cb7b5573d52.1592419750.git.mchehab+huawei@kernel.org Reviewed-by: Marc Gonzalez Signed-off-by: Mauro Carvalho Chehab commit 3d0b2a3a87ce5ae85de46c4241afd52ab8b566fe Author: Kishon Vijay Abraham I Date: Wed Mar 17 18:45:18 2021 +0530 PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c Both TI's AM65x (K3) and TI's K2 PCIe driver are implemented in pci-keystone. However Only K2 PCIe driver should use it's own pci_ops for configuration space accesses. But commit 10a797c6e54a ("PCI: dwc: keystone: Use pci_ops for config space accessors") used custom pci_ops for both AM65x and K2. This breaks configuration space access for AM65x platform. Fix it here. Link: https://lore.kernel.org/r/20210317131518.11040-1-kishon@ti.com Fixes: 10a797c6e54a ("PCI: dwc: keystone: Use pci_ops for config space accessors") Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński Cc: # v5.10 commit 4b79ec9a553de3a438631dfe6cb18fdfcaee2098 Author: Linus Walleij Date: Sun Mar 21 12:43:40 2021 +0100 dt-bindings: backlight: Add Kinetic KTD259 bindings The KTD259 is just a newer version of the KTD253 and works all the same. Signed-off-by: Linus Walleij Acked-by: Daniel Thompson Signed-off-by: Lee Jones commit 693091d99e7b7f5aa994745e719c69a731173db8 Author: Linus Walleij Date: Sun Mar 21 12:43:41 2021 +0100 backlight: ktd253: Support KTD259 The KTD259 works just like KTD253 so add this compatible to the driver. Signed-off-by: Linus Walleij Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones commit cdfd4c689e2a52c313b35ddfc1852ff274f91acb Author: Obeida Shamoun Date: Sun Mar 14 11:11:10 2021 +0100 backlight: qcom-wled: Use sink_addr for sync toggle WLED3_SINK_REG_SYNC is, as the name implies, a sink register offset. Therefore, use the sink address as base instead of the ctrl address. This fixes the sync toggle on wled4, which can be observed by the fact that adjusting brightness now works. It has no effect on wled3 because sink and ctrl base addresses are the same. This allows adjusting the brightness without having to disable then reenable the module. Signed-off-by: Obeida Shamoun Signed-off-by: Konrad Dybcio Signed-off-by: Marijn Suijten Reviewed-by: Daniel Thompson Acked-by: Kiran Gunda Signed-off-by: Lee Jones commit b7e23e54a9c7e9fc4aa177bfc3c73a29325614ad Author: Ricardo Ribalda Date: Thu Mar 18 21:22:23 2021 +0100 pm-graph: Fix typo "accesible" Trivial fix. Signed-off-by: Ricardo Ribalda Signed-off-by: Rafael J. Wysocki commit 6e7628c8c3c1af74ea31e8da85b641a50fe3a86c Author: Krzysztof Wilczyński Date: Wed Mar 10 13:19:13 2021 +0000 PCI: microchip: 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/pcie-microchip-host.c:1027:2-9: line 1027 is redundant because platform_get_irq() already prints an error Related commit caecb05c8000 ("PCI: Remove dev_err() when handing an error from platform_get_irq()"). Link: https://lore.kernel.org/r/20210310131913.2802385-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Lorenzo Pieralisi commit 2c61f32124b0c8868ac8579bb626ea579f2e08bb Author: Wei Yongjun Date: Mon Mar 8 09:48:42 2021 +0000 PCI: microchip: Make some symbols static The sparse tool complains as follows: drivers/pci/controller/pcie-microchip-host.c:304:18: warning: symbol 'pcie_event_to_event' was not declared. Should it be static? drivers/pci/controller/pcie-microchip-host.c:310:18: warning: symbol 'sec_error_to_event' was not declared. Should it be static? drivers/pci/controller/pcie-microchip-host.c:317:18: warning: symbol 'ded_error_to_event' was not declared. Should it be static? drivers/pci/controller/pcie-microchip-host.c:324:18: warning: symbol 'local_status_to_event' was not declared. Should it be static? Those symbols are not used outside of pcie-microchip-host.c, so this commit marks them static. Link: https://lore.kernel.org/r/20210308094842.3588847-1-weiyongjun1@huawei.com Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński commit c6b7ed8f946fe03b45d2cf3d2b5452d831e6f237 Author: Chuck Lever Date: Thu Mar 11 13:49:25 2021 -0500 svcrdma: Remove stale comment for svc_rdma_wc_receive() xprt pinning was removed in commit 365e9992b90f ("svcrdma: Remove transport reference counting"), but this comment was not updated to reflect that change. Signed-off-by: Chuck Lever commit 270f25edcc164ab045c94a1bb645080f26a81ce2 Author: Chuck Lever Date: Mon Mar 1 13:34:38 2021 -0500 svcrdma: Provide an explanatory comment in CMA event handler Clean up: explain why svc_xprt_enqueue() is invoked in the event handler even though no xpt_flags bits are toggled here. Signed-off-by: Chuck Lever commit 072db263e1dd2efa29bfc2ae84b88042502c5d54 Author: Chuck Lever Date: Sat Feb 20 19:11:55 2021 -0500 svcrdma: RPCDBG_FACILITY is no longer used Signed-off-by: Chuck Lever commit 472d155a0631bd1a09b5c0c275a254e65605d683 Author: NeilBrown Date: Sat Mar 20 09:38:04 2021 +1100 nfsd: report client confirmation status in "info" file mountd can now monitor clients appearing and disappearing in /proc/fs/nfsd/clients, and will log these events, in liu of the logging of mount/unmount events for NFSv3. Currently it cannot distinguish between unconfirmed clients (which might be transient and totally uninteresting) and confirmed clients. So add a "status: " line which reports either "confirmed" or "unconfirmed", and use fsnotify to report that the info file has been modified. This requires a bit of infrastructure to keep the dentry for the "info" file. There is no need to take a counted reference as the dentry must remain around until the client is removed. Signed-off-by: NeilBrown Signed-off-by: Chuck Lever commit e7a833e9cc6c3b58fe94f049d2b40943cba07086 Author: J. Bruce Fields Date: Thu Mar 18 20:03:22 2021 -0400 nfsd: don't ignore high bits of copy count Note size_t is 32-bit on a 32-bit architecture, but cp_count is defined by the protocol to be 64 bit, so we could be turning a large copy into a 0-length copy here. Reported-by: Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 792a5112aa90e59c048b601c6382fe3498d75db7 Author: J. Bruce Fields Date: Thu Mar 18 20:03:23 2021 -0400 nfsd: COPY with length 0 should copy to end of file >From https://tools.ietf.org/html/rfc7862#page-65 A count of 0 (zero) requests that all bytes from ca_src_offset through EOF be copied to the destination. Reported-by: Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 34a624931b8c12b435b5009edc5897e4630107bc Author: Ricardo Ribalda Date: Thu Mar 18 21:22:21 2021 +0100 nfsd: Fix typo "accesible" Trivial fix. Cc: linux-nfs@vger.kernel.org Signed-off-by: Ricardo Ribalda Signed-off-by: Chuck Lever commit c6c7f2a84da459bcc3714044e74a9cb66de31039 Author: Trond Myklebust Date: Sat Mar 13 16:08:47 2021 -0500 nfsd: Ensure knfsd shuts down when the "nfsd" pseudofs is unmounted In order to ensure that knfsd threads don't linger once the nfsd pseudofs is unmounted (e.g. when the container is killed) we let nfsd_umount() shut down those threads and wait for them to exit. This also should ensure that we don't need to do a kernel mount of the pseudofs, since the thread lifetime is now limited by the lifetime of the filesystem. Signed-off-by: Trond Myklebust Signed-off-by: Chuck Lever commit f988a7b71d1e66e63f79cd59c763875347943a7a Author: Paul Menzel Date: Fri Mar 12 22:03:00 2021 +0100 nfsd: Log client tracking type log message as info instead of warning `printk()`, by default, uses the log level warning, which leaves the user reading NFSD: Using UMH upcall client tracking operations. wondering what to do about it (`dmesg --level=warn`). Several client tracking methods are tried, and expected to fail. That’s why a message is printed only on success. It might be interesting for users to know the chosen method, so use info-level instead of debug-level. Cc: linux-nfs@vger.kernel.org Signed-off-by: Paul Menzel Signed-off-by: Chuck Lever commit 7f7e7a4006f74b031718055a0751c70c2e3d5e7e Author: J. Bruce Fields Date: Tue Mar 2 10:46:23 2021 -0500 nfsd: helper for laundromat expiry calculations We do this same logic repeatedly, and it's easy to get the sense of the comparison wrong. Signed-off-by: J. Bruce Fields Signed-off-by: Chuck Lever commit 219a170502b3d597c52eeec088aee8fbf7b90da5 Author: Chuck Lever Date: Fri Mar 5 14:22:32 2021 -0500 NFSD: Clean up NFSDDBG_FACILITY macro These are no longer needed because there are no dprintk() call sites in these files. Signed-off-by: Chuck Lever commit 6019ce0742ca55d3e45279a19b07d1542747a098 Author: Chuck Lever Date: Fri Mar 5 13:57:40 2021 -0500 NFSD: Add a tracepoint to record directory entry encoding Enable watching the progress of directory encoding to capture the timing of any issues with reading or encoding a directory. The new tracepoint captures dirent encoding for all NFS versions. For example, here's what a few NFSv4 directory entries might look like: nfsd-989 [002] 468.596265: nfsd_dirent: fh_hash=0x5d162594 ino=2 name=. nfsd-989 [002] 468.596267: nfsd_dirent: fh_hash=0x5d162594 ino=1 name=.. nfsd-989 [002] 468.596299: nfsd_dirent: fh_hash=0x5d162594 ino=3827 name=zlib.c nfsd-989 [002] 468.596325: nfsd_dirent: fh_hash=0x5d162594 ino=3811 name=xdiff nfsd-989 [002] 468.596351: nfsd_dirent: fh_hash=0x5d162594 ino=3810 name=xdiff-interface.h nfsd-989 [002] 468.596377: nfsd_dirent: fh_hash=0x5d162594 ino=3809 name=xdiff-interface.c Signed-off-by: Chuck Lever commit 1416f435303d81070c6bcf5a4a9b4ed0f7a9f013 Author: Chuck Lever Date: Sun Nov 15 15:09:16 2020 -0500 NFSD: Clean up after updating NFSv3 ACL encoders Signed-off-by: Chuck Lever commit 15e432bf0cfd1e6aebfa9ffd4e0cc2ff4f3ae2db Author: Chuck Lever Date: Wed Nov 18 16:21:24 2020 -0500 NFSD: Update the NFSv3 SETACL result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 20798dfe249a01ad1b12eec7dbc572db5003244a Author: Chuck Lever Date: Wed Nov 18 16:11:42 2020 -0500 NFSD: Update the NFSv3 GETACL result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 83d0b84572775a29f800de67a1b9b642a5376bc3 Author: Chuck Lever Date: Sun Nov 15 14:31:42 2020 -0500 NFSD: Clean up after updating NFSv2 ACL encoders Signed-off-by: Chuck Lever commit 07f5c2963c04b11603e9667f89bb430c132e9cc1 Author: Chuck Lever Date: Wed Nov 18 14:52:09 2020 -0500 NFSD: Update the NFSv2 ACL ACCESS result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 8d2009a10b3abaa12a39deb4876b215714993fe8 Author: Chuck Lever Date: Wed Nov 18 14:49:57 2020 -0500 NFSD: Update the NFSv2 ACL GETATTR result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 778f068fa0c0846b650ebdb8795fd51b5badc332 Author: Chuck Lever Date: Wed Nov 18 14:47:56 2020 -0500 NFSD: Update the NFSv2 SETACL result encoder to use struct xdr_stream The SETACL result encoder is exactly the same as the NFSv2 attrstatres decoder. Signed-off-by: Chuck Lever commit f8cba47344f794b54373189bec23195b51020faf Author: Chuck Lever Date: Wed Nov 18 14:38:47 2020 -0500 NFSD: Update the NFSv2 GETACL result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 8edc0648880a151026fe625fa1b76772b5766f68 Author: Chuck Lever Date: Wed Nov 18 14:55:05 2020 -0500 NFSD: Add an xdr_stream-based encoder for NFSv2/3 ACLs Signed-off-by: Chuck Lever commit 8a2cf9f5709cc20a1114a7d22655928314fc86f8 Author: Chuck Lever Date: Sun Nov 15 14:30:13 2020 -0500 NFSD: Remove unused NFSv2 directory entry encoders Clean up. Signed-off-by: Chuck Lever commit f5dcccd647da513a89f3b6ca392b0c1eb050b9fc Author: Chuck Lever Date: Sat Nov 14 13:45:35 2020 -0500 NFSD: Update the NFSv2 READDIR entry encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 94c8f8c682a6497af7ea71351b18f637c6337d42 Author: Chuck Lever Date: Fri Oct 23 16:49:01 2020 -0400 NFSD: Update the NFSv2 READDIR result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 8141d6a2bb6c655ff0c0b81ced80d9025f03e926 Author: Chuck Lever Date: Fri Nov 13 16:57:44 2020 -0500 NFSD: Count bytes instead of pages in the NFSv2 READDIR encoder Clean up: Counting the bytes used by each returned directory entry seems less brittle to me than trying to measure consumed pages after the fact. Signed-off-by: Chuck Lever commit d52532002ffa217ad3fa4c3ba86c95203d21dd21 Author: Chuck Lever Date: Fri Nov 13 16:53:17 2020 -0500 NFSD: Add a helper that encodes NFSv3 directory offset cookies Refactor: Add helper function similar to nfs3svc_encode_cookie3(). Signed-off-by: Chuck Lever commit bf15229f2ced4f14946eef958336f764e30f8efb Author: Chuck Lever Date: Fri Oct 23 19:01:38 2020 -0400 NFSD: Update the NFSv2 STATFS result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit a6f8d9dc9e44b51303d9abde4643460137d19b28 Author: Chuck Lever Date: Fri Oct 23 16:40:11 2020 -0400 NFSD: Update the NFSv2 READ result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit d9014b0f8fae11f22a3d356553844e06ddcdce4a Author: Chuck Lever Date: Fri Oct 23 15:41:09 2020 -0400 NFSD: Update the NFSv2 READLINK result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit e3b4ef221ac57c08341c97a10c8a81c041f76716 Author: Chuck Lever Date: Fri Oct 23 16:44:16 2020 -0400 NFSD: Update the NFSv2 diropres encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 92b54a4fa4224e6116eb0d87a39dd05af23fcdfa Author: Chuck Lever Date: Fri Oct 23 15:28:59 2020 -0400 NFSD: Update the NFSv2 attrstat encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit a887eaed2a964754334cd3f8c5fe87e413e68fef Author: Chuck Lever Date: Fri Oct 23 11:08:02 2020 -0400 NFSD: Update the NFSv2 stat encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 76ed0dd96eeb2771b21bf5dcbd88326ef89ee0ed Author: Chuck Lever Date: Fri Jan 15 09:28:44 2021 -0500 NFSD: Reduce svc_rqst::rq_pages churn during READDIR operations During NFSv2 and NFSv3 READDIR/PLUS operations, NFSD advances rq_next_page to the full size of the client-requested buffer, then releases all those pages at the end of the request. The next request to use that nfsd thread has to refill the pages. NFSD does this even when the dirlist in the reply is small. With NFSv3 clients that send READDIR operations with large buffer sizes, that can be 256 put_page/alloc_page pairs per READDIR request, even though those pages often remain unused. We can save some work by not releasing dirlist buffer pages that were not used to form the READDIR Reply. I've left the NFSv2 code alone since there are never more than three pages involved in an NFSv2 READDIR Reply. Eventually we should nail down why these pages need to be released at all in order to avoid allocating and releasing pages unnecessarily. Signed-off-by: Chuck Lever commit 1411934627f9fe31a36ac8c43179ce9b63edce5c Author: Chuck Lever Date: Fri Nov 13 11:27:13 2020 -0500 NFSD: Remove unused NFSv3 directory entry encoders Clean up. Signed-off-by: Chuck Lever commit 7f87fc2d34d475225e78b7f5c4eabb121f4282b2 Author: Chuck Lever Date: Thu Oct 22 19:46:58 2020 -0400 NFSD: Update NFSv3 READDIR entry encoders to use struct xdr_stream The benefit of the xdr_stream helpers is that they transparently handle encoding an XDR data item that crosses page boundaries. Most of the open-coded logic to do that here can be eliminated. A sub-buffer and sub-stream are set up as a sink buffer for the directory entry encoder. As an entry is encoded, it is added to the end of the content in this buffer/stream. The total length of the directory list is tracked in the buffer's @len field. When it comes time to encode the Reply, the sub-buffer is merged into rq_res's page array at the correct place using xdr_write_pages(). Signed-off-by: Chuck Lever commit e4ccfe3014de435984939a3d84b7f241d3b57b0d Author: Chuck Lever Date: Thu Oct 22 19:31:48 2020 -0400 NFSD: Update the NFSv3 READDIR3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit a1409e2de4f11034c8eb30775cc3e37039a4ef13 Author: Chuck Lever Date: Mon Nov 9 13:13:21 2020 -0500 NFSD: Count bytes instead of pages in the NFSv3 READDIR encoder Clean up: Counting the bytes used by each returned directory entry seems less brittle to me than trying to measure consumed pages after the fact. Signed-off-by: Chuck Lever commit a161e6c76aeba835e475a2f27dbbe5c37e565e94 Author: Chuck Lever Date: Tue Nov 10 09:57:14 2020 -0500 NFSD: Add a helper that encodes NFSv3 directory offset cookies Refactor: De-duplicate identical code that handles encoding of directory offset cookies across page boundaries. Signed-off-by: Chuck Lever commit 5ef2826c761079e27904c85034df34e601b82d94 Author: Chuck Lever Date: Thu Oct 22 15:35:46 2020 -0400 NFSD: Update the NFSv3 COMMIT3res encoder to use struct xdr_stream As an additional clean up, encode_wcc_data() is removed because it is now no longer used. Signed-off-by: Chuck Lever commit ded04a587f6ceaaba3caefad4021f2212b46c9ff Author: Chuck Lever Date: Fri Nov 6 13:15:09 2020 -0500 NFSD: Update the NFSv3 PATHCONF3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 0a139d1b7f327010acc36e8162936d3108c7addb Author: Chuck Lever Date: Thu Oct 22 13:42:13 2020 -0400 NFSD: Update the NFSv3 FSINFO3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 8b7044984fd6eeadf72285e3617116bd15e9e676 Author: Chuck Lever Date: Fri Nov 6 13:08:45 2020 -0500 NFSD: Update the NFSv3 FSSTAT3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 4d74380a446f75eebb2171687d9b8baf0025bdf1 Author: Chuck Lever Date: Thu Oct 22 15:08:29 2020 -0400 NFSD: Update the NFSv3 LINK3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 89d79e9672dfa6d0cc416699c16f2d312da58ff2 Author: Chuck Lever Date: Thu Oct 22 15:33:05 2020 -0400 NFSD: Update the NFSv3 RENAMEv3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 78315b36781d259dcbdc102ff22c3f2f25712223 Author: Chuck Lever Date: Thu Oct 22 15:27:23 2020 -0400 NFSD: Update the NFSv3 CREATE family of encoders to use struct xdr_stream Signed-off-by: Chuck Lever commit ecb7a085ac15a8844ebf12fca6ae51ce71ac9b3b Author: Chuck Lever Date: Thu Oct 22 15:26:31 2020 -0400 NFSD: Update the NFSv3 WRITE3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit cc9bcdad7773c295375e66c892c7ac00524706f2 Author: Chuck Lever Date: Thu Oct 22 15:23:50 2020 -0400 NFSD: Update the NFSv3 READ3res encode to use struct xdr_stream Signed-off-by: Chuck Lever commit 9a9c8923b3efd593d0e6a405efef9d58c6e6804b Author: Chuck Lever Date: Thu Oct 22 15:18:40 2020 -0400 NFSD: Update the NFSv3 READLINK3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 70f8e839859a994e324e1d18889f8319bbd5bff9 Author: Chuck Lever Date: Thu Oct 22 15:12:38 2020 -0400 NFSD: Update the NFSv3 wccstat result encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 5cf353354af1a385f29dec4609a1532d32c83a25 Author: Chuck Lever Date: Thu Oct 22 14:46:58 2020 -0400 NFSD: Update the NFSv3 LOOKUP3res encoder to use struct xdr_stream Also, clean up: Rename the encoder function to match the name of the result structure in RFC 1813, consistent with other encoder function names in nfs3xdr.c. "diropres" is an NFSv2 thingie. Signed-off-by: Chuck Lever commit 907c38227fb57f5c537491ca76dd0b9636029393 Author: Chuck Lever Date: Thu Oct 22 13:56:58 2020 -0400 NFSD: Update the NFSv3 ACCESS3res encoder to use struct xdr_stream Signed-off-by: Chuck Lever commit 2c42f804d30f6a8d86665eca84071b316821ea08 Author: Chuck Lever Date: Wed Oct 21 11:58:41 2020 -0400 NFSD: Update the GETATTR3res encoder to use struct xdr_stream As an additional clean up, some renaming is done to more closely reflect the data type and variable names used in the NFSv3 XDR definition provided in RFC 1813. "attrstat" is an NFSv2 thingie. Signed-off-by: Chuck Lever commit bddfdbcddbe267519cd36aeb115fdf8620980111 Author: Chuck Lever Date: Tue Oct 27 15:53:42 2020 -0400 NFSD: Extract the svcxdr_init_encode() helper NFSD initializes an encode xdr_stream only after the RPC layer has already inserted the RPC Reply header. Thus it behaves differently than xdr_init_encode does, which assumes the passed-in xdr_buf is entirely devoid of content. nfs4proc.c has this server-side stream initialization helper, but it is visible only to the NFSv4 code. Move this helper to a place that can be accessed by NFSv2 and NFSv3 server XDR functions. Signed-off-by: Chuck Lever commit 1e83130f01b04c16579ed5a5e03d729bcffc4c5d Author: Pali Rohár Date: Wed Mar 3 15:22:02 2021 +0100 PCI: iproc: Fix return value of iproc_msi_irq_domain_alloc() IRQ domain alloc function should return zero on success. Non-zero value indicates failure. Link: https://lore.kernel.org/r/20210303142202.25780-1-pali@kernel.org Fixes: fc54bae28818 ("PCI: iproc: Allow allocation of multiple MSIs") Signed-off-by: Pali Rohár Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński Acked-by: Ray Jui Acked-by: Marc Zyngier commit bd3689a64ecdb92a8f24fef1365635b7ed6b90dc Author: Xiaofeng Cao Date: Thu Mar 11 19:57:35 2021 +0800 power: supply: max1721x: Correct spelling Change 'stanalone' to 'standalone' Change 'mesaurement' to 'measurement' Change 'nonvilatile' to 'nonvolatile' Change 'unical' to 'unique' Change 'unaccesable' to 'unaccessible' Change 'correcpondent' to 'correspond' Signed-off-by: Xiaofeng Cao Signed-off-by: Sebastian Reichel commit ee81ee84f8739e584c9ccf113ba3c796187b7080 Author: Jon Derrick Date: Wed Feb 10 09:13:15 2021 -0700 PCI: vmd: Disable MSI-X remapping when possible VMD will retransmit child device MSI-X using its own MSI-X table and requester-id. This limits the number of MSI-X available to the whole child device domain to the number of VMD MSI-X interrupts. Some VMD devices have a mode where this remapping can be disabled, allowing child device interrupts to bypass processing with the VMD MSI-X domain interrupt handler and going straight the child device interrupt handler, allowing for better performance and scaling. The requester-id still gets changed to the VMD endpoint's requester-id, and the interrupt remapping handlers have been updated to properly set IRTE for child device interrupts to the VMD endpoint's context. Some VMD platforms have existing production BIOS which rely on MSI-X remapping and won't explicitly program the MSI-X remapping bit. This re-enables MSI-X remapping on unload. Link: https://lore.kernel.org/r/20210210161315.316097-3-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński Acked-by: Joerg Roedel commit 9b4a824b889e1cc5e0430b80e40cfe9838c5b5f0 Author: Jon Derrick Date: Wed Feb 10 09:13:14 2021 -0700 iommu/vt-d: Use Real PCI DMA device for IRTE VMD retransmits child device MSI-X with the VMD endpoint's requester-id. In order to support direct interrupt remapping of VMD child devices, ensure that the IRTE is programmed with the VMD endpoint's requester-id using pci_real_dma_dev(). Link: https://lore.kernel.org/r/20210210161315.316097-2-jonathan.derrick@intel.com Signed-off-by: Jon Derrick Signed-off-by: Lorenzo Pieralisi Acked-by: Lu Baolu Acked-by: Joerg Roedel commit c77b26e327dc09a53417dba87637824260389bf5 Author: dongjian Date: Tue Mar 16 14:54:12 2021 +0800 power: supply: ds2781: use kobj_to_dev() Use kobj_to_dev() instead of open-coding it Signed-off-by: dongjian Signed-off-by: Sebastian Reichel commit 458025f6c16188a9f28219578448fac24b2cd487 Author: Arnd Bergmann Date: Mon Mar 22 11:53:00 2021 +0100 vgaarb: avoid -Wempty-body warnings Building with W=1 shows a few warnings for an empty macro: drivers/gpu/drm/qxl/qxl_drv.c: In function 'qxl_pci_probe': drivers/gpu/drm/qxl/qxl_drv.c:131:50: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 131 | vga_put(pdev, VGA_RSRC_LEGACY_IO); | ^ drivers/gpu/drm/qxl/qxl_drv.c: In function 'qxl_pci_remove': drivers/gpu/drm/qxl/qxl_drv.c:159:50: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 159 | vga_put(pdev, VGA_RSRC_LEGACY_IO); Change this to an inline function to make it more robust and avoid the warning. Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210322105307.1291840-2-arnd@kernel.org commit 84c41184cfa35232d7abbf087915fcbcb86e6a17 Author: Arnd Bergmann Date: Mon Mar 22 11:52:59 2021 +0100 fbdev: omapfb: avoid -Wempty-body warning Building with 'make W=1' shows a few harmless warnings: drivers/video/fbdev/omap2/omapfb/omapfb-main.c: In function 'omapfb_calc_addr': drivers/video/fbdev/omap2/omapfb/omapfb-main.c:823:56: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 823 | var->xoffset, var->yoffset, offset); | ^ drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c: In function 'omapfb_ioctl': drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:911:45: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 911 | DBG("ioctl failed: %d\n", r); Avoid these by using no_printk(), which adds format string checking as well. Signed-off-by: Arnd Bergmann Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210322105307.1291840-1-arnd@kernel.org commit 31ba6fadc3ba55dce727f0213b30c87fc085a360 Author: Bhaskar Chowdhury Date: Fri Mar 19 11:22:30 2021 +0530 power: supply: charger-manager: Fix a typo s/systme/system/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Sebastian Reichel commit 091d0a3a485fa432dc9386e0e9caea491eb6de52 Author: dongjian Date: Mon Mar 22 19:42:27 2021 +0800 power: reset: remove unneeded semicolon Fixes coccicheck warning: drivers/power/reset/vexpress-poweroff.c:136:2-3: Unneeded semicolon Signed-off-by: dongjian Signed-off-by: Sebastian Reichel commit 2469b836fa835c67648acad17d62bc805236a6ea Author: dongjian Date: Mon Mar 22 19:21:33 2021 +0800 power: supply: Use IRQF_ONESHOT Fixes coccicheck error: drivers/power/supply/pm2301_charger.c:1089:7-27: ERROR: drivers/power/supply/lp8788-charger.c:502:8-28: ERROR: drivers/power/supply/tps65217_charger.c:239:8-33: ERROR: drivers/power/supply/tps65090-charger.c:303:8-33: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: dongjian Signed-off-by: Sebastian Reichel commit d895ce703098fe4939b081026d77afccddec44df Author: Rikard Falkeborn Date: Sun Feb 7 23:16:04 2021 +0100 PCI: tegra: Constify static structs The only usage of them is to assign their address to the 'ops' field in the pcie_port and the dw_pcie_ep structs, both which are pointers to const. Make them const to allow the compiler to put them in read-only memory. Link: https://lore.kernel.org/r/20210207221604.48910-1-rikard.falkeborn@gmail.com Signed-off-by: Rikard Falkeborn Signed-off-by: Lorenzo Pieralisi Reviewed-by: Krzysztof Wilczyński commit bf939446c357242b3306e88c5f48976940d29679 Author: Keyon Jie Date: Fri Mar 19 14:49:50 2021 +0200 ASoC: intel: sof_rt5682: use the topology mclk We should use the topology configured mclk if it existed, which can make sure we are aligned with the FW side about the mclk usage. Signed-off-by: Keyon Jie Reviewed-by: Guennadi Liakhovetski Reviewed-by: Daniel Baluta Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210319124950.3853994-2-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit b951b51e2ca4d37dc9781e14d8a49d2f2b7e715b Author: Keyon Jie Date: Fri Mar 19 14:49:49 2021 +0200 ASoC: SOF: add a helper to get topology configured mclk Add helper sof_dai_ssp_mclk to get the topology configured MCLK from a pcm_runtime, return 0 if it is not available, and error if the dai type is not SSP at the moment. Export the helper for external use, e.g. from machine drivers. Signed-off-by: Keyon Jie Reviewed-by: Guennadi Liakhovetski Reviewed-by: Daniel Baluta Signed-off-by: Kai Vehmanen Link: https://lore.kernel.org/r/20210319124950.3853994-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 2277e7e36b4b8c27eb8d2fb33a20440bc800c2d7 Author: Shengjiu Wang Date: Fri Mar 19 16:06:43 2021 +0800 ASoC: fsl_sai: Don't use devm_regmap_init_mmio_clk When there is power domain bind with bus clock, The call flow: devm_regmap_init_mmio_clk - clk_prepare() - clk_pm_runtime_get() cause the power domain of clock always be enabled after regmap_init(). which impact the power consumption. So use devm_regmap_init_mmio instead of devm_regmap_init_mmio_clk, then explicitly enable clock when using by pm_runtime_get(), if CONFIG_PM=n, then fsl_sai_runtime_resume will be explicitly called. Signed-off-by: Shengjiu Wang Signed-off-by: Viorel Suman Link: https://lore.kernel.org/r/1616141203-13344-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 7e71b48f9e27e437ca523432ea285c2585a539dc Author: Vijendar Mukunda Date: Fri Mar 19 07:10:42 2021 +0530 ASoC: amd: Add support for RT5682 codec in machine driver Add support for RT5682 codec in machine driver. Signed-off-by: Vijendar Mukunda Link: https://lore.kernel.org/r/1616118056-5506-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown commit 871159515cd1c9a5cde1132870ecb9a99d6d76a8 Author: Gal Pressman Date: Sun Mar 14 16:34:27 2021 +0200 RDMA/cma: Remove unused leftovers in cma code Commit ee1c60b1bff8 ("IB/SA: Modify SA to implicitly cache Class Port info") removed the class_port_info_context struct usage, remove a couple of leftovers. Link: https://lore.kernel.org/r/20210314143427.76101-1-galpress@amazon.com Signed-off-by: Gal Pressman Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit fdb68dd30e92c5a2e0897f644b58b6d3616db44a Author: Leon Romanovsky Date: Sun Mar 14 15:39:08 2021 +0200 RDMA: Delete not-used static inline functions Perform mass deletion of static inline functions that are not used. Link: https://lore.kernel.org/r/20210314133908.291945-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit ae360f41b1263887ada64d9a708e12c1f52f91b9 Author: Leon Romanovsky Date: Sun Mar 14 15:39:07 2021 +0200 RDMA: Fix kernel-doc compilation warnings This patch fixes bunch of kernel-doc compilation warnings like below: drivers/infiniband/hw/i40iw/i40iw_cm.c:4372: warning: expecting prototype for i40iw_ifdown_notify(). Prototype was for i40iw_if_notify() instead Link: https://lore.kernel.org/r/20210314133908.291945-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit b5486430bb0fbb4f2bd1e06bd85921395ba357a6 Author: Leon Romanovsky Date: Sun Mar 14 10:22:50 2021 +0200 RDMA/mlx5: Add missing returned error check of mlx5_ib_dereg_mr Fix the following smatch error: drivers/infiniband/hw/mlx5/mr.c:1950 mlx5_ib_dereg_mr() error: uninitialized symbol 'rc'. Fixes: e6fb246ccafb ("RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr()") Link: https://lore.kernel.org/r/20210314082250.10143-1-leon@kernel.org Reported-by: kernel test robot Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit bb877bebae0f38048e844aad9ed93127a5eecc5c Author: Bard Liao Date: Tue Mar 2 16:27:20 2021 +0800 soundwire: intel: add master quirks for bus clash and parity Now that we have declarations and bus support, add quirks for Intel platforms. Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210302082720.12322-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6b8caa6f9d3a428022d41913bf9660325599dac1 Author: Bard Liao Date: Tue Mar 2 16:27:19 2021 +0800 soundwire: bus: handle master quirks for bus clash and parity Add optional interrupt status read/clear if the master quirks are set. In the case of the parity, the master quirk is only applied if the Slave doesn't already have a parity-related quirk. Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210302082720.12322-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 5bb643c39b97c440b2981c69f05596c7ea868b73 Author: Bard Liao Date: Tue Mar 2 16:27:18 2021 +0800 soundwire: add master quirks for bus clash and parity Currently quirks are only allowed for Slave devices. This patch describes the need for two quirks at the Master level. a) bus clash The SoundWire specification allows a Slave device to report a bus clash with the in-band interrupt mechanism when it detects a conflict while driving a bitSlot it owns. This can be a symptom of an electrical conflict or a programming error, and it's vital to detect reliably. Unfortunately, on some platforms, bus clashes are randomly reported by Slave devices after a bus reset, with an interrupt status set even before the bus clash interrupt is enabled. These initial spurious interrupts are not relevant and should optionally be filtered out, while leaving the interrupt mechanism enabled to detect 'true' issues. This patch suggests the addition of a Master level quirk to discard such interrupts. The quirk should in theory have been added at the Slave level, but since the problem was detected with different generations of Slave devices it's hard to point to a specific IP. The problem might also be board-dependent and hence dealing with a Master quirk is simpler. b) parity Additional tests on a new platform with the Maxim 98373 amplifier showed a rare case where the parity interrupt is also thrown on startup, at the same time as bus clashes. This issue only seems to happen infrequently and was only observed during suspend-resume stress tests while audio is streaming. We could make the problem go away by adding a Slave-level quirk, but there is no evidence that the issue is actually a Slave problem: the parity is provided by the Master, which could also set an invalid parity in corner cases. BugLink: https://github.com/thesofproject/linux/issues/2578 BugLink: https://github.com/thesofproject/linux/issues/2533 Co-developed-by: Pierre-Louis Bossart Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210302082720.12322-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit bb5d418076f8c6cea8adaeffc0bbcd2032c814f0 Author: Christophe JAILLET Date: Sun Mar 21 08:58:11 2021 +0100 media: cx25821: 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 'cx25821_riscmem_alloc()' GFP_KERNEL can be used because either this flag is already used in the call chain, or it is called from a 'buf_prepare' function. The call chains are: vb2_ops.buf_prepare (in cx25821-video.c) cx25821_buffer_prepare (in cx25821-video.c) cx25821_risc_buffer cx25821_riscmem_alloc snd_cx25821_hw_params (in cx25821-alsa.c) <-- use GFP_KERNEL cx25821_risc_databuffer_audio cx25821_riscmem_alloc @@ @@ - 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1ef5b9b81810d2ad1753a0d83209f68bac91b6d6 Author: Antti Keränen Date: Mon Mar 15 14:58:54 2021 +0100 media: v4l2-mc: fix a warning message The message erroneously told that the pad wasn't found from a tuner when in reality it wasn't found from a decoder. Signed-off-by: Antti Keränen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c2357dd9cbafc8ed37156e32c24884cfa8380b2f Author: Fabio Estevam Date: Sat Mar 20 13:21:52 2021 +0100 media: rkvdec: Remove of_match_ptr() When building with CONFIG_OF not set, the following clang build warning is seen: >> drivers/staging/media/rkvdec/rkvdec.c:967:34: warning: unused variable 'of_rkvdec_match' [-Wunused-const-variable] Fix the warning by removing the unnecessary of_match_ptr(). Reported-by: kernel test robot Fixes: cd33c830448b ("media: rkvdec: Add the rkvdec driver") Signed-off-by: Fabio Estevam Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 54b74981c86c2af49d39cafaec414c86a49e4164 Author: Hans Verkuil Date: Fri Mar 19 17:57:59 2021 +0100 media: adv7604: writing a one-block EDID failed The adv7604 refused to accept an one-block EDID, it required two blocks. Fix this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit abe1338c5e7e944f1015f42e82b4a19aedcc47cb Author: Hans Verkuil Date: Thu Mar 18 15:27:46 2021 +0100 media: buffer.rst: fix incorrect :c:type :c:type:`struct v4l2_requestbuffers` should be struct :c:type:`v4l2_requestbuffers`. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a611be7589b41a79a425d9bdf5102b725a6d1cfc Author: Hans Verkuil Date: Thu Mar 18 10:03:06 2021 +0100 media: vidioc-g-ext-ctrls.rst: reformat tables and clarify which vs ctrl_class The VIDIOC_G/S/TRY_EXT_CTRLS documentation has large explanatory texts for some of the fields in a table. This makes it hard to read. Move those text to a new cell spanning the whole width of the table, similar to what was done for struct v4l2_pix_format. This makes it much more readable. Also move the 'ctrl_class' description to below the 'which' description and just mention that it is deprecated and that 'which' should be used instead. Finally remove 'note::' for the V4L2_CTRL_WHICH_DEF_VAL description. It doesn't have to be marked as a note, it's just a simple paragraph. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 79f382b9a9d84cd099b79cf92aa9f73d0aa64481 Author: zuoqilin Date: Wed Mar 17 04:08:04 2021 +0100 media: media/pci/pt1: Assign value when defining variables When defining variables and assigning values can be done at the same time. Signed-off-by: zuoqilin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1a77d4fd3b1e232d556939f67206865c802e7ec5 Author: Fabio Estevam Date: Tue Mar 16 17:50:39 2021 +0100 media: coda: Remove unneeded of_match_ptr() The coda driver only runs on i.MX, which is a DT-only platform, so remove the unneeded of_match_ptr(). Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9cc25c4bea9e78e5f2d96977adede00a7dafb320 Author: Ricardo Ribalda Date: Tue Mar 9 21:51:08 2021 +0100 media: videobuf2: Exit promptly if size = 0 Exit as soon as possible if a driver wants to allocate a buffer of size 0, and print a warning to help fixing the issue. Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be3ae00ff9a737c26d7d280caeffc8c7899abe92 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:51:05 2021 +0800 soundwire: Intel: add DMI quirk for Dell SKU 0A3E We've been handling ACPI issues on early versions of the product with a local ACPI initrd override but now that we have the possibility of a kernel quirk let's get rid of the initrd override. This helps make sure that the kernel will support all versions of the BIOS, with or without updates. Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210302075105.11515-4-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit f6594cdfec4cde57484812271696fb9f40d125b7 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:51:04 2021 +0800 soundwire: Intel: introduce DMI quirks for HP Spectre x360 Convertible HP Spectre x360 Convertible devices expose invalid _ADR fields in the DSDT, which prevents codec drivers from probing. A possible solution is to override the DSDT, but that's just too painful for users. This patch suggests a simple DMI-based quirk to remap the existing invalid ADR information into valid ones. BugLink: https://github.com/thesofproject/linux/issues/2700 Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210302075105.11515-3-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit 6558b667a7297418b8951ba54da68d551035ecc5 Author: Vinod Koul Date: Tue Mar 2 15:51:03 2021 +0800 soundwire: add override addr ops Platform firmware may have incorrect _ADR values causing the driver probes to fail. Add the override_ops, which when configured will allow for quirks based on DMI etc to override the addr values. Co-developed-by: Bard Liao Signed-off-by: Bard Liao Signed-off-by: Vinod Koul Reviewed-by: Rander Wang Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210302075105.11515-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul commit a9e3863d0006ddad14e6b5745cb1a04e9801885f Author: Stanimir Varbanov Date: Tue Mar 2 23:42:06 2021 +0100 media: v4l2-ctrls: Fix h264 hierarchical coding type menu ctrl Add a name of the menu and fill control type. Signed-off-by: Stanimir Varbanov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fe1fd84287f6d13877f2c1620a3adf90b310e9cf Author: Wolfram Sang Date: Tue Jan 19 10:39:08 2021 +0100 media: i2c: adv7842: remove open coded version of SMBus block write The version here is identical to the one in the I2C core, so use the latter version directly. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0f02beec61875e93a436dff17d01fc4a6f5765a4 Author: Hans Verkuil Date: Thu Mar 11 11:20:22 2021 +0100 media: mtk-vpu/mtk_vpu.h: fix kernel-doc warnings A top-level documentation block was missing 'DOC:'. Fix typos in vpu_wdt_reg_handler() and vpu_mapping_dm_addr(). Signed-off-by: Hans Verkuil Cc: Irui Wang Cc: Andrew-CT Chen Signed-off-by: Mauro Carvalho Chehab commit f56ac19565a3e9672e209f92680090f4d492ea58 Author: Hans Verkuil Date: Thu Mar 11 11:20:21 2021 +0100 media: mtk-vcodec: fix kernel-doc warnings mtk_vcodec_drv.h: It's '@var:', not '@var - '. In two places 'struct' was used instead of 'enum'. vdec_drv_if.h: It's '@var:', not '@var :'. In one place 'struct' was used instead of 'enum'. venc_ipi_msg.h: It's '@data:', not '@data[8]:', i.e. arrays do not include the size in kernel-doc. It's '@var:', not 'var:'. Signed-off-by: Hans Verkuil Cc: Alexandre Courbot Cc: Tiffany Lin Signed-off-by: Mauro Carvalho Chehab commit 85486243e1f4b43394e450d3f011d994c6ce2f46 Author: Hans Verkuil Date: Thu Mar 11 11:20:20 2021 +0100 media: mtk-mdp: fix kernel-doc warnings mtk_mdp_comp.h: MTK_MDP_COMP_TYPE_MAX was undocumented, but it is also unused, so just remove it. mtk_mdp_core.h: add missing '*' inside comment blocks, add a missing : after '@ctrls' and add a missing struct keyword. Signed-off-by: Hans Verkuil Cc: Eizan Miyamoto Signed-off-by: Mauro Carvalho Chehab commit 6987322cad1ad48b846db3d173f662254aaf5a2e Author: Hans Verkuil Date: Thu Mar 11 11:20:19 2021 +0100 media: mtk-jpeg/mtk_jpeg_core.h: fix kernel-doc warnings Add missing 'struct' keywords and fix typos in two struct member names. Signed-off-by: Hans Verkuil Cc: Xia Jiang Signed-off-by: Mauro Carvalho Chehab commit 7c45affd0c72770a63b2e85477d86a709c90122b Author: Hans Verkuil Date: Thu Mar 11 11:20:18 2021 +0100 media: staging: media: meson: vdec: fix kernel-doc warning One comment used /** instead of /*, so it caused kernel-doc warnings. Just turn it into a regular comment. Signed-off-by: Hans Verkuil Cc: Neil Armstrong Signed-off-by: Mauro Carvalho Chehab commit 328085e1dc17ae57a59ec74c854ff0933a24d34c Author: Hans Verkuil Date: Thu Mar 11 11:20:17 2021 +0100 media: staging: media: ipu3: add missing kernel-doc 'struct' keywords Two structs where missing the kernel-doc 'struct' keyword in their kernel-doc documentation. Signed-off-by: Hans Verkuil Cc: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab commit 75e2ddb181271d067412cdb7aa87a55736adb246 Author: Hans Verkuil Date: Thu Mar 11 11:20:16 2021 +0100 media: staging: media: hantro: fix kernel-doc formatting - @h264_dec was not documented, add that trivial change - it is not possible to document a global variable in kernel-doc, change to use 'DOC:' instead - fix mismatched struct name (hantro_vp8d_hw_ctx -> hantro_vp8_dec_hw_ctx) Signed-off-by: Hans Verkuil Reviewed-by: Ezequiel Garcia Signed-off-by: Mauro Carvalho Chehab commit 7a9d4140e76772ad78051ea1d50f03432f54a84e Author: Hans Verkuil Date: Thu Mar 11 11:20:15 2021 +0100 media: vsp1/vsp1_drm.h: add missing 'struct' kernel-doc keyword The kernel-doc documentation for two structs was missing the 'struct' keyword. Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit 528b38ed7b6d3b2c3e3c7f74b7d18c9590b410cf Author: Hans Verkuil Date: Thu Mar 11 11:20:14 2021 +0100 media: media/platform/sti: fix kernel-doc formatting bdisp/bdisp-filter.h: coef: -> @coef: (missing @) c8sectpfe/c8sectpfe-debugfs.h: /** -> /* (wasn't a kernel-doc comment) sti/hva/hva.h: @v4l2: -> @vbuf: (wrong name) Signed-off-by: Hans Verkuil Cc: Jean-Christophe Trotin Signed-off-by: Mauro Carvalho Chehab commit 091263973d4a43d298a2a8e0c302405ee536fd36 Author: Hans Verkuil Date: Thu Mar 11 11:20:13 2021 +0100 media: rcar-vin/rcar-vin.h: fix kernel-doc formatting Fix formatting of two enums and one struct. Signed-off-by: Hans Verkuil Reviewed-by: Niklas Söderlund Signed-off-by: Mauro Carvalho Chehab commit 7bc69c9693ed2dd78048c183408b0bc8c144264b Author: Hans Verkuil Date: Thu Mar 11 11:20:12 2021 +0100 media: ti-vpe/cal.h: fix kernel-doc formatting Fix inline struct member documentation, was missing the '@memb:' prefix. Signed-off-by: Hans Verkuil Reviewed-by: Tomi Valkeinen Signed-off-by: Mauro Carvalho Chehab commit 89e078b510bd7c4daf0c255ef8360fd0554e92aa Author: Hans Verkuil Date: Thu Mar 11 11:20:11 2021 +0100 media: s5p-jpeg: fix kernel-doc warnings - added missing 'struct' kernel-doc keywords - add missing '*' in kernel-doc comment blocks Signed-off-by: Hans Verkuil Cc: Marek Szyprowski Signed-off-by: Mauro Carvalho Chehab commit 0ae4ff019ccd60057a3d12dd0c987b3863b77e27 Author: Hans Verkuil Date: Thu Mar 11 11:20:10 2021 +0100 media: exynos-gsc/exynos4-is: add missing 'struct' to kerneldoc Fix kernel-doc warnings due to missing 'struct' keyword. Signed-off-by: Hans Verkuil Cc: Marek Szyprowski Signed-off-by: Mauro Carvalho Chehab commit 0cb92ed0b34d715e9eb592af2dc9281993527f67 Author: Hans Verkuil Date: Tue Mar 9 15:35:46 2021 +0100 media: tegra-video/csi.h: fix kernel-doc mistake Fixes this kernel-doc warning: drivers/staging/media/tegra-video/csi.h:152: warning: Function parameter or member 'csi_chans' not described in 'tegra_csi' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c894e95fe67bd145d6dcafda56a2aa2e10112c7e Author: Hans Verkuil Date: Tue Mar 9 14:03:36 2021 +0100 media: media/usb: fix kernel-doc header issues Fix the following kernel-doc warnings: drivers/media/usb/dvb-usb-v2/dvb_usb.h:109: warning: cannot understand function prototype: 'struct dvb_usb_driver_info ' drivers/media/usb/dvb-usb-v2/dvb_usb.h:126: warning: cannot understand function prototype: 'struct dvb_usb_rc ' drivers/media/usb/dvb-usb-v2/dvb_usb.h:143: warning: cannot understand function prototype: 'struct usb_data_stream_properties ' drivers/media/usb/dvb-usb-v2/dvb_usb.h:170: warning: expecting prototype for properties of dvb usb device adapter(). Prototype was for MAX_NO_OF_FE_PER_ADAP() instead drivers/media/usb/dvb-usb-v2/dvb_usb.h:221: error: Cannot parse struct or union! drivers/media/usb/dvb-usb-v2/dvb_usb.h:277: warning: expecting prototype for generic object of an usb stream(). Prototype was for MAX_NO_URBS_FOR_DATA_STREAM() instead drivers/media/usb/dvb-usb-v2/dvb_usb.h:319: warning: cannot understand function prototype: 'struct dvb_usb_adapter ' drivers/media/usb/dvb-usb-v2/dvb_usb.h:363: warning: cannot understand function prototype: 'struct dvb_usb_device ' drivers/media/usb/dvb-usb/dvb-usb.h:104: warning: cannot understand function prototype: 'struct usb_data_stream_properties ' drivers/media/usb/dvb-usb/dvb-usb.h:163: warning: expecting prototype for struct dvb_usb_adapter_properties. Prototype was for struct dvb_usb_adapter_fe_properties instead drivers/media/usb/dvb-usb/dvb-usb.h:205: warning: cannot understand function prototype: 'struct dvb_rc ' drivers/media/usb/dvb-usb/dvb-usb.h:227: warning: Enum value 'DVB_RC_LEGACY' not described in enum 'dvb_usb_mode' drivers/media/usb/dvb-usb/dvb-usb.h:227: warning: Enum value 'DVB_RC_CORE' not described in enum 'dvb_usb_mode' drivers/media/usb/dvb-usb/dvb-usb.h:271: error: Cannot parse struct or union! drivers/media/usb/dvb-usb/dvb-usb.h:325: error: Cannot parse struct or union! drivers/media/usb/dvb-usb/dvb-usb.h:385: warning: expecting prototype for struct dvb_usb_adapter. Prototype was for struct dvb_usb_fe_adapter instead drivers/media/usb/dvb-usb/dvb-usb.h:476: warning: Function parameter or member 'num_adapters_initialized' not described in 'dvb_usb_device' drivers/media/usb/dvb-usb/dvb-usb.h:476: warning: Function parameter or member 'adapter' not described in 'dvb_usb_device' drivers/media/usb/dvb-usb/dvb-usb.h:476: warning: Function parameter or member 'rc_phys' not described in 'dvb_usb_device' drivers/media/usb/em28xx/em28xx.h:377: warning: cannot understand function prototype: 'enum em28xx_amux ' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b4a9d65972b4a7384d1aae20aaa55ad2856c97e1 Author: Robert Foss Date: Tue Mar 16 18:19:28 2021 +0100 media: dt-bindings: media: Remove qcom,camss documentation This documentation has been incorporated in dtschema dt-bindings for the devices supported by CAMSS and is no longer helpful. Signed-off-by: Robert Foss Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 750cfee8b150312752d2922d5590a254fa2d8332 Author: Robert Foss Date: Tue Mar 16 18:19:27 2021 +0100 media: MAINTAINERS: Change CAMSS documentation to use dtschema bindings Due to the complexity of describing multiple hardware generations in one document, switch to using separate dt-bindings. Signed-off-by: Robert Foss Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d1d5ce26016521573ffb9f522066bd1efeb46a81 Author: Robert Foss Date: Tue Mar 16 18:19:26 2021 +0100 media: dt-bindings: media: camss: Add qcom,sdm845-camss binding Add bindings for qcom,sdm845-camss in order to support the camera subsystem for SDM845. Signed-off-by: Robert Foss Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6761996a8c4d72bda053e18c548b0c392a189110 Author: Robert Foss Date: Tue Mar 16 18:19:25 2021 +0100 media: dt-bindings: media: camss: Add qcom,sdm660-camss binding Add bindings for qcom,sdm660-camss in order to support the camera subsystem on SDM630/660 and SDA variants. Signed-off-by: Robert Foss Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6be3837fee69d6dfb65e1db1957f08bba103fdea Author: Robert Foss Date: Tue Mar 16 18:19:24 2021 +0100 media: dt-bindings: media: camss: Add qcom,msm8996-camss binding Add bindings for qcom,msm8996-camss in order to support the camera subsystem on MSM8996. Signed-off-by: Robert Foss Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 307600fa8b446bab59331463658de6c855fbbb8a Author: Robert Foss Date: Tue Mar 16 18:19:23 2021 +0100 media: dt-bindings: media: camss: Add qcom,msm8916-camss binding Add bindings for qcom,msm8916-camss in order to support the camera subsystem on MSM8916. Signed-off-by: Robert Foss Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9666cec380d60808eb86d3be4caf84faeebe3081 Author: Uwe Kleine-König Date: Mon Dec 7 14:45:56 2020 +0100 pwm: Drop function pwmchip_add_with_polarity() pwmchip_add() only calls pwmchip_add_with_polarity() and nothing else. All other users of pwmchip_add_with_polarity() are gone. So drop pwmchip_add_with_polarity() and move the code instead to pwmchip_add(). The initial assignment to pwm->state.polarity is dropped. In every correct usage of the PWM API this value is overwritten later anyhow. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 705245679372b8aee67924a69dc0bb49e111380a Author: Robert Foss Date: Tue Mar 16 18:19:22 2021 +0100 media: camss: Enable SDM845 Enable support for SDM845 based Titan 170 ISPs. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f6f8af672038b34d71e16ce9b30c59cc987db2b Author: Robert Foss Date: Tue Mar 16 18:19:21 2021 +0100 media: camss: Refactor VFE power domain toggling For Titan ISPs clocks fail to re-enable during vfe_get() after any vfe has been halted and its corresponding power domain power has been detached. Since all of the clocks depend on all of the PDs, per VFE PD detaching is no option for Gen2 HW. In order to not have regressions on for Gen1 HW, refactor the power domain management into hardware version specific code paths. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f8b67195e4839c02151f255a5c93c250b6df968 Author: Robert Foss Date: Tue Mar 16 18:19:20 2021 +0100 media: camss: Add support for CSIPHY hardware version Titan 170 Add register definitions for version 170 of the Titan architecture and implement support for the CSIPHY subdevice. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eebe6d00e9bf1216fb381b64146e1b7e50d90b3f Author: Robert Foss Date: Tue Mar 16 18:19:19 2021 +0100 media: camss: Add support for CSID hardware version Titan 170 Add register definitions for version 170 of the Titan architecture and implement support for the CSID subdevice. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 76005817fa954310a8af2bd0644404baee34a03f Author: Robert Foss Date: Tue Mar 16 18:19:18 2021 +0100 media: camss: Refactor CSID HW version support In order to support Qualcomm ISP hardware architectures that diverge from older architectures, the CSID subdevice drivers needs to be refactored to better abstract the different ISP hardware architectures. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 940ba1f5e18d4411c4e87ef902dc811a10d341d0 Author: Arnd Bergmann Date: Mon Mar 22 11:31:10 2021 +0100 ALSA: core: avoid -Wempty-body warnings Building with 'make W=1' shows some warnings about empty function-style macros: sound/core/pcm_memory.c: In function 'preallocate_pages': sound/core/pcm_memory.c:236:49: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 236 | preallocate_info_init(substream); sound/core/seq_device.c: In function 'snd_seq_device_dev_register': sound/core/seq_device.c:163:41: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 163 | queue_autoload_drivers(); Change them to empty inline functions, which are more robust here. Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210322103128.547199-1-arnd@kernel.org Signed-off-by: Takashi Iwai commit e19b14b1873dff2a653ae726904fbd47d4525359 Author: Robert Foss Date: Tue Mar 16 18:19:17 2021 +0100 media: camss: Add missing format identifiers The CSI-2 spec defines format identifier for Data Type (DT), and how the Decode Format (DF) & Encode Format (EF) are implemented. The spec does however not define the DF, EF or Plain Format (PF) identifiers, as those are vendor specific. Plain formats describe the size of the pixels written by the RDI units to memory. PLAIN8 for example has the size 8 bits, and PLAIN32 32 bits. The appropriate Plain Format is determined by the Decode Format used. The smallest Plain Format that is able to contain a pixel of the used Decode Format is the appropriate one to use. As the vendor specific identifiers differ between hardware generations, split them out into separate headers. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7319cdf189bb643c6d56e5898ef89ad7c3ef6c31 Author: Robert Foss Date: Tue Mar 16 18:19:16 2021 +0100 media: camss: Add support for VFE hardware version Titan 170 Add register definitions for version 170 of the Titan architecture and implement support for the RDI output mode. The RDI mode as opposed to the PIX output mode for the VFE unit does not support any ISP functionality. This means essentially only supporting dumping the output of the whatever the CSI decoder receives from the sensor. For example will a sensor outputting YUV pixel format frames, only allow the VFE to dump those frames as they are received by the ISP to memory through the RDI interface. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d2b6f15bc18ac8fbce25398290774c21f5b2cd44 Author: Takashi Sakamoto Date: Sun Mar 21 12:28:31 2021 +0900 ALSA: bebob: enable to deliver MIDI messages for multiple ports Current implementation of bebob driver doesn't correctly handle the case that the device has multiple MIDI ports. The cause is the number of MIDI conformant data channels is passed to AM824 data block processing layer. This commit fixes the bug. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210321032831.340278-4-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 5c6ea94f2b7c5ce4c012ac8c23fd35588f69c4c7 Author: Takashi Sakamoto Date: Sun Mar 21 12:28:30 2021 +0900 ALSA: bebob: detect the number of available MIDI ports Current implementation counts the number of input/output plugs for MIDI type and uses the count as the number of physical MIDI ports. However, the number of channels of the port represents the count. This commit fixes the bug by additional vendor-specific AVC command extension. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210321032831.340278-3-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit 633b388f85c5c1861793c522b9a1a6db7fd06445 Author: Robert Foss Date: Tue Mar 16 18:19:15 2021 +0100 media: camss: Refactor VFE HW version support In order to support Qualcomm ISP hardware architectures that diverge from older architectures, the VFE subdevice driver needs to be refactored to better abstract the different ISP architectures. Gen1 represents the CAMSS ISP architecture. The ISP architecture developed after CAMSS, Titan, will be referred to as Gen2. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit caa271510687f3ce3eed3a120cd2a6f71bc49223 Author: Takashi Sakamoto Date: Sun Mar 21 12:28:29 2021 +0900 ALSA: bebob: code refactoring for stream format detection ALSA bebob driver scans supported formats of packet for each direction when probing the target device. Some helper functions are used for the scanning, however its implementation is not necessarily irredundant. This commit refactors the helper functions to remove redundant codes. Signed-off-by: Takashi Sakamoto Link: https://lore.kernel.org/r/20210321032831.340278-2-o-takashi@sakamocchi.jp Signed-off-by: Takashi Iwai commit f57a741874bb6995089020e97a1dcdf9b165dcbe Author: Tong Zhang Date: Sun Mar 21 11:38:40 2021 -0400 ALSA: rme9652: don't disable if not enabled rme9652 wants to disable a not enabled pci device, which makes kernel throw a warning. Make sure the device is enabled before calling disable. [ 1.751595] snd_rme9652 0000:00:03.0: disabling already-disabled device [ 1.751605] WARNING: CPU: 0 PID: 174 at drivers/pci/pci.c:2146 pci_disable_device+0x91/0xb0 [ 1.759968] Call Trace: [ 1.760145] snd_rme9652_card_free+0x76/0xa0 [snd_rme9652] [ 1.760434] release_card_device+0x4b/0x80 [snd] [ 1.760679] device_release+0x3b/0xa0 [ 1.760874] kobject_put+0x94/0x1b0 [ 1.761059] put_device+0x13/0x20 [ 1.761235] snd_card_free+0x61/0x90 [snd] [ 1.761454] snd_rme9652_probe+0x3be/0x700 [snd_rme9652] Suggested-by: Takashi Iwai Signed-off-by: Tong Zhang Link: https://lore.kernel.org/r/20210321153840.378226-4-ztong0001@gmail.com Signed-off-by: Takashi Iwai commit 790f5719b85e12e10c41753b864e74249585ed08 Author: Tong Zhang Date: Sun Mar 21 11:38:39 2021 -0400 ALSA: hdspm: don't disable if not enabled hdspm wants to disable a not enabled pci device, which makes kernel throw a warning. Make sure the device is enabled before calling disable. [ 1.786391] snd_hdspm 0000:00:03.0: disabling already-disabled device [ 1.786400] WARNING: CPU: 0 PID: 182 at drivers/pci/pci.c:2146 pci_disable_device+0x91/0xb0 [ 1.795181] Call Trace: [ 1.795320] snd_hdspm_card_free+0x58/0xa0 [snd_hdspm] [ 1.795595] release_card_device+0x4b/0x80 [snd] [ 1.795860] device_release+0x3b/0xa0 [ 1.796072] kobject_put+0x94/0x1b0 [ 1.796260] put_device+0x13/0x20 [ 1.796438] snd_card_free+0x61/0x90 [snd] [ 1.796659] snd_hdspm_probe+0x97b/0x1440 [snd_hdspm] Suggested-by: Takashi Iwai Signed-off-by: Tong Zhang Link: https://lore.kernel.org/r/20210321153840.378226-3-ztong0001@gmail.com Signed-off-by: Takashi Iwai commit 507cdb9adba006a7798c358456426e1aea3d9c4f Author: Tong Zhang Date: Sun Mar 21 11:38:38 2021 -0400 ALSA: hdsp: don't disable if not enabled hdsp wants to disable a not enabled pci device, which makes kernel throw a warning. Make sure the device is enabled before calling disable. [ 1.758292] snd_hdsp 0000:00:03.0: disabling already-disabled device [ 1.758327] WARNING: CPU: 0 PID: 180 at drivers/pci/pci.c:2146 pci_disable_device+0x91/0xb0 [ 1.766985] Call Trace: [ 1.767121] snd_hdsp_card_free+0x94/0xf0 [snd_hdsp] [ 1.767388] release_card_device+0x4b/0x80 [snd] [ 1.767639] device_release+0x3b/0xa0 [ 1.767838] kobject_put+0x94/0x1b0 [ 1.768027] put_device+0x13/0x20 [ 1.768207] snd_card_free+0x61/0x90 [snd] [ 1.768430] snd_hdsp_probe+0x524/0x5e0 [snd_hdsp] Suggested-by: Takashi Iwai Signed-off-by: Tong Zhang Link: https://lore.kernel.org/r/20210321153840.378226-2-ztong0001@gmail.com Signed-off-by: Takashi Iwai commit 9d95baf9fcf8aa606c8cee8ac613c7aca32769de Author: Robert Foss Date: Tue Mar 16 18:19:14 2021 +0100 media: camss: Make ISPIF subdevice optional This driver supports multiple architecture versions of the Qualcomm ISP. The CAMSS architecure which this driver is name after, and with the introduction of this series, the Titan architecture. The ISPIF is an IP-block that is only present in the CAMSS generation of the architecture. In order to support the Titan generation, make the ISPIF an optional subdevice. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 965ebe39c953a8248a45413c25833621529da03c Author: Uwe Kleine-König Date: Mon Dec 7 14:45:55 2020 +0100 pwm: atmel-hlcdc: Use pwmchip_add() instead of pwmchip_add_with_polarity() The only side effect of this change is that pwm->state.polarity is initialized to PWM_POLARITY_NORMAL instead of PWM_POLARITY_INVERSED. However all other members of pwm->state are uninitialized and consumers are expected to provide the right polarity (either by setting it explicitly or by using a helper like pwm_init_state() that overwrites .polarity anyhow with a value independent of the initial value). Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit fc423f29f718a963a2775edba8ac258e762ea989 Author: Uwe Kleine-König Date: Mon Dec 7 14:45:54 2020 +0100 pwm: bcm-kona: Use pwmchip_add() instead of pwmchip_add_with_polarity() The only side effect of this change is that pwm->state.polarity is initialized to PWM_POLARITY_NORMAL instead of PWM_POLARITY_INVERSED. However all other members of pwm->state are uninitialized and consumers are expected to provide the right polarity (either by setting it explicitly or by using a helper like pwm_init_state() that overwrites .polarity anyhow with a value independent of the initial value). The eventual goal is to remove pwmchip_add_with_polarity() and so simplify the data flow in the PWM core. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 96387cffeb7230e7523c5c13d90838191e89fcff Author: Robert Foss Date: Tue Mar 16 18:19:13 2021 +0100 media: camss: Add CAMSS_845 camss version Add enum representing the SDM845 SOC, which incorporates version 170 of the Titan architecture ISP. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c3177cb018a8bb1e6ed21ec3339c137892cfc99b Author: Robert Foss Date: Tue Mar 16 18:19:12 2021 +0100 media: camss: Replace trace_printk() with dev_dbg() trace_printk() should not be used in production code, since extra memory is used for special buffers whenever trace_puts() is used. Replace it with dev_dbg() which provides all of the desired debugging functionality. Signed-off-by: Robert Foss Suggested-by: Nicolas Boichat Reviewed-by: Nicolas Boichat Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ad46e1a8d851614b2a53796b19f1e194b0e1790a Author: Robert Foss Date: Tue Mar 16 18:19:11 2021 +0100 media: camss: Fix vfe_isr comment typo Comment refers to ISPIF, but this is incorrect. Only the VFE interrupts are handled by this function. Signed-off-by: Robert Foss Reviewed-by: Bjorn Andersson Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d8bdc3e456b6d4baf99bee87dfd28020e8250367 Author: Robert Foss Date: Tue Mar 16 18:19:10 2021 +0100 media: camss: Fix vfe_isr_comp_done() documentation Function name in comment is wrong, and was changed to be the same as the actual function name. The comment was changed to kerneldoc format. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9f0f6107e07289c99f599d4e4ad9c62dec4abfd6 Author: Uwe Kleine-König Date: Fri Mar 12 10:00:58 2021 +0100 pwm: cros-ec: Refuse requests with unsupported polarity The driver only supports normal polarity and so should refuse requests for inversed polarity. Signed-off-by: Uwe Kleine-König Acked-by: Enric Balletbo i Serra Signed-off-by: Thierry Reding commit 09081c9ba6c22bd63b6ce681e60d71a95acbc115 Author: Uwe Kleine-König Date: Fri Mar 12 09:59:16 2021 +0100 pwm: sprd: Refuse requests with unsupported polarity The driver only supports normal polarity and so should refuse requests for inversed polarity. Signed-off-by: Uwe Kleine-König Acked-by: Chunyan Zhang Signed-off-by: Thierry Reding commit c77e99f434c29d79505bd740cfead9648dfe0795 Author: Uwe Kleine-König Date: Mon Mar 8 10:51:50 2021 +0100 pwm: atmel-tcb: Only free resources after pwm_chip_remove() returned Otherwise the PWM stops working before the PWM core and its consumers are aware the device is going away. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 30882cf130078e6ba7d84d6d56e056b8b5e705d5 Author: Uwe Kleine-König Date: Mon Mar 8 10:50:12 2021 +0100 pwm: atmel-tcb: Implement .apply callback This is just pushing down the core's compat code down into the driver using the legacy callback nearly unchanged. The call to .enable() was just dropped from .config() because .apply() calls it unconditionally. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 30bcc51037256d4b38f222fc41fe832945cdeb56 Author: Xiaofeng Cao Date: Thu Mar 11 08:20:44 2021 +0100 media: radio-si476x: rectify spelling and grammar Change 'inaccesable' to 'inaccessible' Change 'detrmine' to 'determine' Delete 'in' grammatically Signed-off-by: Xiaofeng Cao Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3f5b610b45a36049392883f3754c616ad11b7c7e Author: Fabio Estevam Date: Mon Mar 15 20:44:46 2021 +0100 media: camera-mx3: Remove unused header file The imx3 camera driver has been removed a long time ago, so get rid of this unused header file. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 60250052a1a6e3d605d736fea240226a42e4b3ee Author: Fabio Estevam Date: Mon Mar 15 20:44:45 2021 +0100 media: camera-mx2: Remove unused header file The imx27/imx25 camera driver has been removed a long time ago, so get rid of this unused header file. Signed-off-by: Fabio Estevam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4b19f9716ad89af51f07f9b611aabfd5fd80c625 Author: Bhaskar Chowdhury Date: Mon Mar 15 02:39:58 2021 +0100 media: pci: saa7164: Rudimentary spelling fixes in the file saa7164-types.h s/structues/structures/ s/decies/decides/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8d1f2c37fc92348fc97efc7c43e2112fc054293b Author: Hans Verkuil Date: Sat Mar 13 13:51:19 2021 +0100 media: ext-ctrls-codec.rst: fix typos The _FRAME_SKIP_ enums were missing the _VIDEO prefix. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ea1611ba3a544b34f89ffa3d1e833caab30a3f09 Author: Hans Verkuil Date: Fri Mar 12 09:49:55 2021 +0100 media: v4l2-ctrls.c: initialize flags field of p_fwht_params The V4L2_CID_STATELESS_FWHT_PARAMS compound control was missing a proper initialization of the flags field, so after loading the vicodec module for the first time, running v4l2-compliance for the stateless decoder would fail on this control because the initial control value was considered invalid by the vicodec driver. Initializing the flags field to sane values fixes this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eaaea4681984c79d2b2b160387b297477f0c1aab Author: Hans Verkuil Date: Thu Mar 11 15:46:40 2021 +0100 media: gspca/sq905.c: fix uninitialized variable act_len can be uninitialized if usb_bulk_msg() returns an error. Set it to 0 to avoid a KMSAN error. Signed-off-by: Hans Verkuil Reported-by: syzbot+a4e309017a5f3a24c7b3@syzkaller.appspotmail.com Signed-off-by: Mauro Carvalho Chehab commit 48e15418e41e4f32bb96dd8af1ae4a89ae13157b Author: Hans Verkuil Date: Thu Mar 11 14:07:10 2021 +0100 media: v4l2-ioctl.c: fix timestamp format The timestamp uses microseconds, not nanoseconds, so use %06ld instead of %09ld. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d58cb0ee51ef58acc80f984407979fd5926da9e5 Author: Uwe Kleine-König Date: Mon Mar 1 19:23:07 2021 +0100 pwm: Return -EINVAL for old-style drivers without .set_polarity callback Since commit 2b1c1a5d5148 ("pwm: Use -EINVAL for unsupported polarity") all drivers implementing the apply callback are unified to return -EINVAL if an unsupported polarity is requested. Do the same in the compat code for old-style drivers. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit 05e48d894a33b183af1340302fa8159d8554cdf9 Author: Vasanth Date: Wed Mar 10 10:51:55 2021 +0530 drivers: hv: Fix EXPORT_SYMBOL and tab spaces issue 1.Fixed EXPORT_SYMBOL should be follow immediately function/variable. 2.Fixed code tab spaces issue. Signed-off-by: Vasanth M Link: https://lore.kernel.org/r/20210310052155.39460-1-vasanth3g@gmail.com Signed-off-by: Wei Liu commit bea7515df5a21a749d86cbf84f6d3a0ddb9f3a1c Author: Hans Verkuil Date: Thu Mar 11 14:05:38 2021 +0100 media: v4l2-dev.c: show which events are requested by poll() This helps debugging poll problems. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c10a3718d9555fafe9325d63b11ff76daed69c03 Author: Hans Verkuil Date: Thu Mar 11 12:20:18 2021 +0100 media: media/usb/gspca/w996Xcf.c: /** -> /* The copyright text is just a comment, not kernel-doc documentation. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0c85c54bf7faeb80c6b76901ed77d93acef0207d Author: Andrea Parri (Microsoft) Date: Mon Mar 1 20:13:48 2021 +0100 Drivers: hv: vmbus: Drop error message when 'No request id available' Running out of request IDs on a channel essentially produces the same effect as running out of space in the ring buffer, in that -EAGAIN is returned. The error message in hv_ringbuffer_write() should either be dropped (since we don't output a message when the ring buffer is full) or be made conditional/debug-only. Suggested-by: Michael Kelley Signed-off-by: Andrea Parri (Microsoft) Fixes: e8b7db38449ac ("Drivers: hv: vmbus: Add vmbus_requestor data structure for VMBus hardening") Link: https://lore.kernel.org/r/20210301191348.196485-1-parri.andrea@gmail.com Signed-off-by: Wei Liu commit c451ee146d449bbe39835fc3d9007b7f06332415 Author: Liu Ying Date: Thu Mar 11 06:53:47 2021 +0100 media: docs: Fix data organization of MEDIA_BUS_FMT_RGB101010_1X30 The media bus bit width of MEDIA_BUS_FMT_RGB101010_1X30 is 30. So, 'Bit31' and 'Bit30' cells for the 'MEDIA_BUS_FMT_RGB101010_1X30' row should be spaces instead of '0's. Fixes: 54f38fcae536 ("media: docs: move uAPI book to userspace-api/media") Signed-off-by: Liu Ying Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c759b2970c561e3b56aa030deb13db104262adfe Author: Daniel Niv Date: Thu Mar 11 03:53:00 2021 +0100 media: media/saa7164: fix saa7164_encoder_register() memory leak bugs Add a fix for the memory leak bugs that can occur when the saa7164_encoder_register() function fails. The function allocates memory without explicitly freeing it when errors occur. Add a better error handling that deallocate the unused buffers before the function exits during a fail. Signed-off-by: Daniel Niv Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f9a8ee8c8bcd118e800d88772c6457381db45224 Author: Uwe Kleine-König Date: Mon Mar 1 19:57:19 2021 +0100 pwm: Always allocate PWM chip base ID dynamically Since commit 5e5da1e9fbee ("pwm: ab8500: Explicitly allocate pwm chip base dynamically") all drivers use dynamic ID allocation explicitly. New drivers are supposed to do the same, so remove support for driver specified base IDs and drop all assignments in the low-level drivers. Signed-off-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit aa966274d62957c67126c28433e5a5e188516d3c Author: Xiaofeng Cao Date: Wed Mar 10 15:58:16 2021 +0100 media: Correct 'so' In Kconfig it should be 'to' In c8sectpfe-core.c it should be 'do' Signed-off-by: Xiaofeng Cao Acked-by: Randy Dunlap Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f65fcee30863ac85203f3dafd5a816e55aa245c Author: Ricardo Ribalda Date: Wed Mar 10 11:46:39 2021 +0100 media: videobuf2: Explicitly state max size of planes The plane size needs to be PAGE_ALIGNED, so it is not possible to have sizes bigger than MAX_INT - PAGE_SIZE. We already check for overflows when that happen: if (size < vb->planes[plane].length) goto free; But it is good to explicitly state our max allowed value, in order to align with the driver expectations. Signed-off-by: Ricardo Ribalda Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5a43c201c9d05a65f1997877ba45ec41ee91b8b5 Author: Fabio Estevam Date: Wed Mar 3 23:42:42 2021 -0300 pwm: imx-tpm: Use a single line for error message There is no need to split the dev_err() call in three lines. Use a single line to improve readability. Signed-off-by: Fabio Estevam Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding commit acf3402d83636ef4fb81aa35593f1c1fd7f05738 Author: Uwe Kleine-König Date: Mon Mar 1 19:45:37 2021 +0100 pwm: ab8500: Implement .apply instead of .config, .enable and .disable To eventually get rid of all legacy drivers convert this driver to the modern world implementing .apply(). Signed-off-by: Uwe Kleine-König Reviewed-by: Linus Walleij Signed-off-by: Thierry Reding commit ca0d2fb790eb26fc53d851007ed1ead6c048be11 Author: Uwe Kleine-König Date: Thu Jan 14 21:48:04 2021 +0100 pwm: bcm2835: Improve period and duty cycle calculation With an input clk rate bigger than 2000000000, scaler would have been zero which then would have resulted in a division by zero. Also the originally implemented algorithm divided by the result of a division. This nearly always looses precision. Consider a requested period of 1000000 ns. With an input clock frequency of 32786885 Hz the hardware was configured with an actual period of 983869.007 ns (PERIOD = 32258) while the hardware can provide 1000003.508 ns (PERIOD = 32787). And note if the input clock frequency was 32786886 Hz instead, the hardware was configured to 1016656.477 ns (PERIOD = 33333) while the optimal setting results in 1000003.477 ns (PERIOD = 32787). This patch implements proper range checking and only divides once for the calculation of period (and similar for duty_cycle). Signed-off-by: Uwe Kleine-König Reviewed-by: Lino Sanfilippo Tested-by: Lino Sanfilippo Signed-off-by: Thierry Reding commit 5671d9718faf8c8520228c2acb91f3c0cc64192b Author: Bhaskar Chowdhury Date: Mon Mar 22 11:55:00 2021 +0530 s390/kernel: fix a typo s/struture/structure/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210322062500.3109603-1-unixbhaskar@gmail.com Signed-off-by: Heiko Carstens commit 396c100472dd63bb1a5389d9dfb25a94943c41c9 Author: Julian Wiedmann Date: Sat Jan 30 14:56:20 2021 +0100 s390/qdio: let driver manage the QAOB We are spending way too much effort on qdio-internal bookkeeping for QAOB management & caching, and it's still not robust. Once qdio's TX path has detached the QAOB from a PENDING buffer, we lost all track of it until it shows up in a CQ notification again. So if the device is torn down before that notification arrives, we leak the QAOB. Just have the driver take care of it, and simply pass down a QAOB if they want a TX with async-completion capability. For a buffer in PENDING state that requires the QAOB for final completion, qeth can now also try to recycle the buffer's QAOB rather than unconditionally freeing it. This also eliminates the qdio_outbuf_state array, which was only needed to transfer the aob->user1 tag from the driver to the qdio layer. Signed-off-by: Julian Wiedmann Acked-by: Benjamin Block Signed-off-by: Heiko Carstens commit 95b3a8b4014d82e79dc3ad03a1f8d6ee5f56b29d Author: Niklas Schnelle Date: Tue Jan 26 13:58:28 2021 +0100 s390/pci: move zpci_remove_device() to bus code The zpci_remove_device() function removes the device from the PCI common code core which is an operation dealing primarily with the zbus and PCI bus code. With that and to match an upcoming refactoring of the symmetric scanning part move it to the bus code. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 2631f6b6f22ca613238a416a09e3d2771def6f88 Author: Niklas Schnelle Date: Tue Nov 3 10:41:20 2020 +0100 s390/pci: unify de-/configure for slots and events A zPCI event with PEC 0x0301 for an existing zPCI device goes through the same actions as enable_slot(). Similarly a zPCI event with PEC 0x0303 does the same steps as disable_slot(). We can thus unify both actions as zpci_configure_device() respectively zpci_deconfigure_device(). Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit a4f17cc726712a52122ad38540bc3ff3a052d1a4 Author: Vineeth Vijayan Date: Sun Feb 7 20:40:58 2021 +0100 s390/cio: add CRW inject functionality This patch introduces the mechanism to inject artificial events to the CIO layer. One of the main-event type which triggers the CommonIO operations are Channel Report events. When a malfunction or other condition affecting channel-subsystem operation is recognized, a Channel Report Word (consisting of one or more CRWs) describing the condition is made pending for retrieval and analysis by the program. The CRW contains information concerning the identity and state of a facility following the detection of the malfunction or other condition. The patch introduces two debugfs interfaces which can be used to inject 'artificial' events from the userspace. It is intended to provide an easy means to increase the test coverage for CIO code. And this functionality can be enabled via a new configuration option CONFIG_CIO_INJECT. The newly introduces debugfs interfaces can be used as mentioned below to generate different fake-events. To use the crw_inject, first we should enable it by using enable_inject interface. i.e echo 1 > /sys/kernel/debug/s390/cio/enable_inject After the first step, user can simulate CRW as follows: echo \ > /sys/kernel/debug/s390/cio/crw_inject Example: A permanent error ERC on CHPID 0x60 would look like this: echo 0 0 0 4 0 6 0x60 > /sys/kernel/debug/s390/cio/crw_inject and an initialized ERC on the same CHPID: echo 0 0 0 4 0 2 0x60 > /sys/kernel/debug/s390/cio/crw_inject Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit 64a715ab4e91593465f62c8d9584dcc0279e5145 Author: Vineeth Vijayan Date: Thu Feb 4 07:03:00 2021 +0100 s390/cio: introduce CIO debugfs directory This patch introduces an s390 Common I/O layer debugfs directory that is intended to provide access to debugging-related CIO functions and data. The directory is created as /sys/kernel/debug/s390/cio Signed-off-by: Vineeth Vijayan Reviewed-by: Peter Oberparleiter Signed-off-by: Heiko Carstens commit dee60c0dbc837ddca8abcb868e53ca3e9d11ea4c Author: Niklas Schnelle Date: Wed Sep 16 10:52:35 2020 +0200 s390/pci: add zpci_event_hard_deconfigured() Extract the handling of PEC 0x0304 into a function and make sure we only attempt to disable the function if it is enabled. Also check for errors returned by zpci_disable_device() and leave the function alone if there are any. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit a9045c2210448473a321a8bf266541e5644aaae2 Author: Niklas Schnelle Date: Fri Mar 5 14:32:02 2021 +0100 s390/pci: deconfigure device on release When zpci_release_device() is called on a zPCI function that is still configured it would not be deconfigured. Until now this hasn't caused any problems because zpci_zdev_put() is only ever called for devices in Standby or Reserved. Fix it by adding sclp_pci_deconfigure() to the switch when in Configured state. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit f6576a1b4896b984dce0e8393efeba68cc2b96c8 Author: Niklas Schnelle Date: Tue Mar 2 14:55:21 2021 +0100 s390/pci: refactor zpci function states The current zdev->state mixes the configuration states supported by CLP with an additional Online state which is used inconsistently to include enabled zPCI functions which are not yet visible to the common PCI subsytem. In preparation for a clean separation between architected configuration states and fine grained function states remove the Online function state. Where we previously checked for Online it is more accurate to check if the function is enabled to avoid an edge case where a disabled device was still treated as Online. This also simplifies checks whether a function is configured as this is now directly reflected by its function state. Reviewed-by: Matthew Rosato Signed-off-by: Niklas Schnelle Signed-off-by: Heiko Carstens commit 98ce70b76942626fc36c1a972fe1c5a303ac716d Author: Peter Oberparleiter Date: Tue Mar 2 17:28:12 2021 +0100 s390/sclp: increase sclp console line length Kernel and console/TTY messages written to the SCLP line mode console are wrapped at 80 characters per line by the associated SCLP driver. This makes long lines of output difficult to read, and requires editing of wrapped lines copied from the output device. Neither the firmware interface used to access the SCLP console, nor the HMC "Operating System Messages" web interface that displays these messages require such a length limit. Also other operating systems such as z/VM do not impose similar limits on messages they emit to the same console device. This patch therefore increases the limit to 320 characters per line to make SCLP line mode console output more readable. As a result 99% of lines written during a typical boot will not be wrapped, compared to about 50% wrapped lines at 80 characters per line. Another positive side-effect of this change is that the HMC console interface is able to keep more messages in its history buffer due to fewer line-breaks being generated. In a worst case scenario this means that a 4k console buffer is emitted with the last ~400 bytes empty (320 text + 78 headers). This is more than offset by the fact that each line that is not truncated saves 78 header bytes in the buffer. As a result the actual number of emitted buffers should be about the same as with the 80 character limit. This patch also removes the differentiation between line lengths of SCLP line mode output on z/VM and non-z/VM systems. While the z/VM hypervisor adds a prefix in front of each line ('xx: ' where xx is the number of the CPU issuing the message), adjusting Linux line lengths did not significantly increase readability of console output, and makes even less of a difference with longer lines. Signed-off-by: Peter Oberparleiter Tested-by: Niklas Schnelle Acked-by: Heiko Carstens Signed-off-by: Heiko Carstens commit 37564ed834aca26993b77b9b2a0119ec1ba6e00c Author: Janosch Frank Date: Tue Feb 9 09:33:12 2021 -0500 s390/uv: add prot virt guest/host indication files Let's export the prot_virt_guest and prot_virt_host variables into the UV sysfs firmware interface to make them easily consumable by administrators. prot_virt_host being 1 indicates that we did the UV initialization (opt-in) prot_virt_guest being 1 indicates that the UV indicates the share and unshare ultravisor calls which is an indication that we are running as a protected guest. Signed-off-by: Janosch Frank Acked-by: Christian Borntraeger Signed-off-by: Heiko Carstens commit be157db0a3d863d9d5439bcab0a0afbf173e94f8 Author: Mirela Rabulea Date: Thu Mar 11 01:28:54 2021 +0100 media: Add maintainer for IMX jpeg v4l2 driver The driver is located in drivers/media/platform/imx-jpeg, and it applies to the JPEG decoder from i.MX QXP and QM. Signed-off-by: Mirela Rabulea Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2db16c6ed72ce644d5639b3ed15e5817442db4ba Author: Mirela Rabulea Date: Thu Mar 11 09:53:17 2021 +0100 media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder V4L2 driver for the JPEG encoder/decoder from i.MX8QXP/i.MX8QM application processors. The multi-planar buffers API is used. Baseline and extended sequential jpeg decoding is supported. Progressive jpeg decoding is not supported by the IP. Supports encode and decode of various formats: YUV444, YUV422, YUV420, RGB, ARGB, Gray YUV420 is the only multi-planar format supported. Minimum resolution is 64 x 64, maximum 8192 x 8192. The alignment requirements for the resolution depend on the format, multiple of 16 resolutions should work for all formats. v4l2-compliance tests are passing, including the streaming tests, "v4l2-compliance -s" [hverkuil: fix kernel-doc typos] Signed-off-by: Mirela Rabulea Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 819f3ea51d476dec23e11586a70f47972d61c00a Author: Mirela Rabulea Date: Thu Mar 11 01:28:51 2021 +0100 media: Avoid parsing quantization and huffman tables These are optional in struct v4l2_jpeg_header, so skip DHT/DQT segment parsing if huffman_tables/quantization_tables were not requested by user, to save time. However, do count them (num_dht/num_dqt). Signed-off-by: Mirela Rabulea Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ccbea178db47bf4a111ee97c0d77678818563a93 Author: Mirela Rabulea Date: Thu Mar 11 01:28:50 2021 +0100 media: Quit parsing stream if doesn't start with SOI In the case we get an invalid stream, such as from v4l2-compliance streaming test, jpeg_next_marker will end up parsing the entire stream. The standard describes the high level syntax of a jpeg as starting with SOI, ending with EOI, so return error if the very first 2 bytes are not SOI. Signed-off-by: Mirela Rabulea Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b8035f7988a82cbbabf1009b9f3234ff2431f8a4 Author: Mirela Rabulea Date: Thu Mar 11 01:28:49 2021 +0100 media: Add parsing for APP14 data segment in jpeg helpers According to Rec. ITU-T T.872 (06/2012) 6.5.3 APP14 segment is for color encoding, it contains a transform flag, which may have values of 0, 1 and 2 and are interpreted as follows: 0 - CMYK for images that are encoded with four components - RGB for images that are encoded with three components 1 - An image encoded with three components using YCbCr colour encoding. 2 - An image encoded with four components using YCCK colour encoding. This is used in imx-jpeg decoder, to distinguish between YUV444 and RGB24. Signed-off-by: Mirela Rabulea Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b16ed1e660085dc9e6c8425e9c584055484f4665 Author: Mirela Rabulea Date: Thu Mar 11 01:28:48 2021 +0100 media: dt-bindings: Add bindings for i.MX8QXP/QM JPEG driver Add bindings documentation for i.MX8QXP/QM JPEG decoder & encoder driver. Signed-off-by: Mirela Rabulea Reviewed-by: Rob Herring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0376a51fbe5e11a59d6a5c55e57cc201da06dbe0 Author: Mirela Rabulea Date: Thu Mar 11 01:28:47 2021 +0100 media: v4l: Add packed YUV444 24bpp pixel format The added format is V4L2_PIX_FMT_YUV24, this is a packed YUV 4:4:4 format, with 8 bits for each component, 24 bits per sample. This format is used by the i.MX 8QuadMax and i.MX 8DualXPlus/8QuadXPlus JPEG encoder/decoder. Signed-off-by: Mirela Rabulea Reviewed-by: Paul Kocialkowski Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7432376a3f57f2fd99e08437070c5f831315e5aa Author: Hans Verkuil Date: Wed Mar 10 09:21:32 2021 +0100 media: cec/core/cec-notifier: use IS_REACHABLE(CONFIG_I2C) If CONFIG_I2C=m and CONFIG_CEC_CORE=y then of_find_i2c_device_by_node() is not reachable. So use IS_REACHABLE instead of IS_ENABLED. Signed-off-by: Hans Verkuil Fixes: a62943c145c1 ("media: cec-notifier: also search for HDMI devices on I2C") Reported-by: kernel test robot Signed-off-by: Mauro Carvalho Chehab commit f20596943a32d99d449384ea8cc3b3ce61e3d4ec Author: Hans Verkuil Date: Tue Mar 9 13:28:11 2021 +0100 media: media tuner headers: fix kernel-doc warnings Fix the following kernel-doc warnings: drivers/media/tuners/it913x.h:28: warning: Function parameter or member 'fe' not described in 'it913x_platform_data' drivers/media/tuners/tda827x.h:34: warning: wrong kernel-doc identifier on line: * Attach a tda827x tuner to the supplied frontend structure. drivers/media/tuners/qt1010.h:20: warning: wrong kernel-doc identifier on line: * Attach a qt1010 tuner to the supplied frontend structure. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c214e6dd5c9b4073151759502de374c2748cad64 Author: Hans Verkuil Date: Tue Mar 9 13:22:37 2021 +0100 media: vpbe_osd.h/uvcvideo.h includes: fix trivial kernel-doc warnings Fix these kernel-doc warnings: include/media/davinci/vpbe_osd.h:77: warning: Enum value 'PIXFMT_YCBCRI' not described in enum 'osd_pix_format' include/media/davinci/vpbe_osd.h:77: warning: Enum value 'PIXFMT_YCRCBI' not described in enum 'osd_pix_format' include/media/davinci/vpbe_osd.h:77: warning: Excess enum value 'PIXFMT_YCrCbI' description in 'osd_pix_format' include/media/davinci/vpbe_osd.h:77: warning: Excess enum value 'PIXFMT_YCbCrI' description in 'osd_pix_format' include/media/davinci/vpbe_osd.h:232: warning: expecting prototype for enum davinci_cursor_v_width. Prototype was for enum osd_cursor_v_width instead include/uapi/linux/uvcvideo.h:98: warning: Function parameter or member 'ns' not described in 'uvc_meta_buf' include/uapi/linux/uvcvideo.h:98: warning: Function parameter or member 'sof' not described in 'uvc_meta_buf' include/uapi/linux/uvcvideo.h:98: warning: Function parameter or member 'length' not described in 'uvc_meta_buf' include/uapi/linux/uvcvideo.h:98: warning: Function parameter or member 'flags' not described in 'uvc_meta_buf' include/uapi/linux/uvcvideo.h:98: warning: Function parameter or member 'buf' not described in 'uvc_meta_buf' Signed-off-by: Hans Verkuil Reviewed-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab commit a68a90b2ecd392a98a351e927a55ba037d0f51bb Author: Hans Verkuil Date: Tue Mar 9 13:17:10 2021 +0100 media: media/i2c: fix kerneldoc issues for media i2c headers This fixes these kernel-doc warnings: include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI1A' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI1B' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI1C' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI2A' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI2B' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI2C' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI3A' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI3B' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI3C' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_CVBS_VI4A' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI2A_VI1A' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI2B_VI1B' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI2C_VI1C' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI2A_VI3A' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI2B_VI3B' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI2C_VI3C' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI4A_VI1A' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI4A_VI1B' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI4A_VI1C' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI4A_VI3A' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI4A_VI3B' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_SVIDEO_VI4A_VI3C' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:70: warning: Enum value 'INPUT_INVALID' not described in enum 'tvp514x_input' include/media/i2c/tvp514x.h:82: warning: Enum value 'OUTPUT_10BIT_422_EMBEDDED_SYNC' not described in enum 'tvp514x_output' include/media/i2c/tvp514x.h:82: warning: Enum value 'OUTPUT_20BIT_422_SEPERATE_SYNC' not described in enum 'tvp514x_output' include/media/i2c/tvp514x.h:82: warning: Enum value 'OUTPUT_10BIT_422_SEPERATE_SYNC' not described in enum 'tvp514x_output' include/media/i2c/tvp514x.h:82: warning: Enum value 'OUTPUT_INVALID' not described in enum 'tvp514x_output' include/media/i2c/adv7343.h:38: warning: cannot understand function prototype: 'struct adv7343_power_mode ' include/media/i2c/s5k4ecgx.h:31: warning: expecting prototype for struct ss5k4ecgx_platform_data. Prototype was for struct s5k4ecgx_platform_data instead include/media/i2c/mt9t112.h:21: warning: cannot understand function prototype: 'struct mt9t112_platform_data ' include/media/i2c/noon010pc30.h:13: warning: Cannot understand * @clk_rate: the clock frequency in Hz include/media/i2c/s5k6aa.h:45: warning: Function parameter or member 'bus_type' not described in 's5k6aa_platform_data' include/media/i2c/tw9910.h:19: warning: cannot understand function prototype: 'enum tw9910_mpout_pin ' include/media/i2c/tw9910.h:36: warning: cannot understand function prototype: 'struct tw9910_video_info ' include/media/i2c/ov772x.h:53: warning: cannot understand function prototype: 'struct ov772x_camera_info ' include/media/i2c/s5c73m3.h:53: warning: Function parameter or member 'bus_type' not described in 's5c73m3_platform_data' drivers/media/i2c/ccs/ccs-quirk.h:50: warning: Function parameter or member 'post_streamoff' not described in 'ccs_quirk' drivers/media/i2c/ccs/ccs-quirk.h:50: warning: Function parameter or member 'flags' not described in 'ccs_quirk' drivers/media/i2c/ccs/ccs-data.h:144: warning: expecting prototype for struct ccs_pdaf_pix_loc_block_desc. Prototype was for struct ccs_pdaf_pix_loc_pixel_desc instead drivers/media/i2c/tvp514x_regs.h:272: warning: Function parameter or member 'token' not described in 'tvp514x_reg' drivers/media/i2c/tvp514x_regs.h:272: warning: Function parameter or member 'reg' not described in 'tvp514x_reg' drivers/media/i2c/tvp514x_regs.h:272: warning: Function parameter or member 'val' not described in 'tvp514x_reg' drivers/media/i2c/m5mols/m5mols.h:69: warning: Function parameter or member 'brightness' not described in 'm5mols_exif' drivers/media/i2c/m5mols/m5mols.h:147: error: Cannot parse struct or union! drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_AIN0' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_AIN1' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_AIN2' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_AIN3' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_AIN4' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_AIN5' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_AIN6' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_AIN7' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_HDMI' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_TTL' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_TXA' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_TXB' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:65: warning: Enum value 'ADV748X_PORT_MAX' not described in enum 'adv748x_ports' drivers/media/i2c/adv748x/adv748x.h:199: warning: Function parameter or member 'i2c_clients' not described in 'adv748x_state' drivers/media/i2c/adv748x/adv748x.h:199: warning: Function parameter or member 'regmap' not described in 'adv748x_state' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c2d6a60dc4657f6aeb19241e41d8e831ef259620 Author: Hans Verkuil Date: Tue Mar 9 13:15:36 2021 +0100 media: media/pci: fix kerneldoc issues in two headers This fixes these kerneldoc warnings: drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'v4l2_dev' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'snd_card' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'name' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'type' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'dma_mode' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'pci_dev' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'mmio' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'dma_ops' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'video_channels' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'audio_channels' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'audio_rate' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'period_size' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'audio_enabled' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'dma_delay_timer' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'pending_dma_en' not described in 'tw686x_dev' drivers/media/pci/tw686x/tw686x.h:143: warning: Function parameter or member 'pending_dma_cmd' not described in 'tw686x_dev' drivers/media/pci/sta2x11/sta2x11_vip.h:25: warning: Function parameter or member 'i2c_id' not described in 'vip_config' drivers/media/pci/sta2x11/sta2x11_vip.h:25: warning: Function parameter or member 'i2c_addr' not described in 'vip_config' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f12b81e47f48940a6ec82ff308a7d97cd2307442 Author: Hans Verkuil Date: Tue Mar 9 12:48:20 2021 +0100 media: core headers: fix kernel-doc warnings This patch fixes the following kernel-doc warnings: include/uapi/linux/videodev2.h:996: warning: Function parameter or member 'm' not described in 'v4l2_plane' include/uapi/linux/videodev2.h:996: warning: Function parameter or member 'reserved' not described in 'v4l2_plane' include/uapi/linux/videodev2.h:1057: warning: Function parameter or member 'm' not described in 'v4l2_buffer' include/uapi/linux/videodev2.h:1057: warning: Function parameter or member 'reserved2' not described in 'v4l2_buffer' include/uapi/linux/videodev2.h:1057: warning: Function parameter or member 'reserved' not described in 'v4l2_buffer' include/uapi/linux/videodev2.h:1068: warning: Function parameter or member 'tv' not described in 'v4l2_timeval_to_ns' include/uapi/linux/videodev2.h:1068: warning: Excess function parameter 'ts' description in 'v4l2_timeval_to_ns' include/uapi/linux/videodev2.h:1138: warning: Function parameter or member 'reserved' not described in 'v4l2_exportbuffer' include/uapi/linux/videodev2.h:2237: warning: Function parameter or member 'reserved' not described in 'v4l2_plane_pix_format' include/uapi/linux/videodev2.h:2270: warning: Function parameter or member 'hsv_enc' not described in 'v4l2_pix_format_mplane' include/uapi/linux/videodev2.h:2270: warning: Function parameter or member 'reserved' not described in 'v4l2_pix_format_mplane' include/uapi/linux/videodev2.h:2281: warning: Function parameter or member 'reserved' not described in 'v4l2_sdr_format' include/uapi/linux/videodev2.h:2315: warning: Function parameter or member 'fmt' not described in 'v4l2_format' include/uapi/linux/v4l2-subdev.h:53: warning: Function parameter or member 'reserved' not described in 'v4l2_subdev_format' include/uapi/linux/v4l2-subdev.h:66: warning: Function parameter or member 'reserved' not described in 'v4l2_subdev_crop' include/uapi/linux/v4l2-subdev.h:89: warning: Function parameter or member 'reserved' not described in 'v4l2_subdev_mbus_code_enum' include/uapi/linux/v4l2-subdev.h:108: warning: Function parameter or member 'min_width' not described in 'v4l2_subdev_frame_size_enum' include/uapi/linux/v4l2-subdev.h:108: warning: Function parameter or member 'max_width' not described in 'v4l2_subdev_frame_size_enum' include/uapi/linux/v4l2-subdev.h:108: warning: Function parameter or member 'min_height' not described in 'v4l2_subdev_frame_size_enum' include/uapi/linux/v4l2-subdev.h:108: warning: Function parameter or member 'max_height' not described in 'v4l2_subdev_frame_size_enum' include/uapi/linux/v4l2-subdev.h:108: warning: Function parameter or member 'reserved' not described in 'v4l2_subdev_frame_size_enum' include/uapi/linux/v4l2-subdev.h:119: warning: Function parameter or member 'reserved' not described in 'v4l2_subdev_frame_interval' include/uapi/linux/v4l2-subdev.h:140: warning: Function parameter or member 'reserved' not described in 'v4l2_subdev_frame_interval_enum' include/uapi/linux/cec.h:406: warning: Function parameter or member 'raw' not described in 'cec_connector_info' include/uapi/linux/cec.h:470: warning: Function parameter or member 'flags' not described in 'cec_event' include/media/v4l2-h264.h:82: warning: Function parameter or member 'reflist' not described in 'v4l2_h264_build_p_ref_list' include/media/v4l2-h264.h:82: warning: expecting prototype for v4l2_h264_build_b_ref_lists(). Prototype was for v4l2_h264_build_p_ref_list() instead include/media/cec.h:50: warning: Function parameter or member 'lock' not described in 'cec_devnode' include/media/v4l2-jpeg.h:122: warning: Function parameter or member 'num_dht' not described in 'v4l2_jpeg_header' include/media/v4l2-jpeg.h:122: warning: Function parameter or member 'num_dqt' not described in 'v4l2_jpeg_header' Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f550eca585df11e2bcd4908ffcb7ed82797deb96 Author: Hans Verkuil Date: Tue Mar 9 08:43:33 2021 +0100 media: ext-ctrls-codec.rst: clarify V4L2_CID_MPEG_VIDEO_BITRATE The documentation for V4L2_CID_MPEG_VIDEO_BITRATE was missing the word 'Average': this is the average video bitrate. The V4L2_CID_MPEG_VIDEO_BITRATE_PEAK documentation *does* refer to V4L2_CID_MPEG_VIDEO_BITRATE as the average video bitrate. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e61f9ea271933d987ab895c689fa37744f6fc27f Author: Wei Yongjun Date: Mon Mar 8 13:28:02 2021 +0100 media: m88ds3103: fix return value check in m88ds3103_probe() In case of error, the function i2c_new_dummy_device() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: e6089feca460 ("media: m88ds3103: Add support for ds3103b demod") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b9302fa7ed979e84b454e4ca92192cf485a4ed41 Author: Jia-Ju Bai Date: Sat Mar 6 15:30:28 2021 +0100 media: tuners: fix error return code of hybrid_tuner_request_state() When kzalloc() fails and state is NULL, no error return code is assigned. To fix this bug, __ret is assigned with -ENOMEM in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f3d384e36630e2a552d874e422835606d9cf230a Author: Jia-Ju Bai Date: Sat Mar 6 15:15:28 2021 +0100 media: platform: sunxi: sun6i-csi: fix error return code of sun6i_video_start_streaming() When sun6i_video_remote_subdev() returns NULL to subdev, no error return code of sun6i_video_start_streaming() is assigned. To fix this bug, ret is assigned with -EINVAL in this case. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Fixes: 5cc7522d8965 ("media: sun6i: Add support for Allwinner CSI V3s") Acked-by: Chen-Yu Tsai Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 41c991bd234982fb2a4e4ecfae68db711a6e3b31 Author: Julia Lawall Date: Sat Mar 6 14:42:25 2021 +0100 media: flexcop-usb: delete unneeded return No need for a return after a break; Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1b0b433fd1b26c9cd914aad81dc1b343a1141bc4 Author: Zhang Yunkai Date: Sat Mar 6 12:32:55 2021 +0100 media: vidtv: remove duplicate include in vidtv_psi 'string.h' included in 'vidtv_psi.c' is duplicated. Signed-off-by: Zhang Yunkai Acked-by: Daniel Almeida Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 95667791eb6e21a7f6c9ec4b633a8bf480a7675d Author: Jia-Ju Bai Date: Fri Mar 5 10:48:19 2021 +0100 media: platform: xilinx: fix error return code of xvip_graph_init() When the list of xdev->notifier.asd_list is empty, no error return code of xvip_graph_init() is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Reviewed-by: Michal Simek Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 38e89e790fe27f131d7310f9020d577bf9d2527f Author: Laurent Pinchart Date: Thu Mar 4 14:45:21 2021 +0100 media: ti-vpe: cal: Implement media controller centric API The CAL driver is video node centric, it controls the whole device through the video device nodes. This limits the possible use cases as it can't support sources that are more complex than a single subdev. To support more complex hardware pipelines, implement support for the media controller centric API. The exposed API can be selected through a module parameter. Signed-off-by: Laurent Pinchart Signed-off-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b83209176d6892ea2e086d0f1d45fdd1cf5f8569 Author: Tomi Valkeinen Date: Thu Mar 4 14:45:20 2021 +0100 media: ti-vpe: cal: fix subdev mbus_code enumeration The cal_ctx_v4l2_init_formats() function does not handle error values correctly when calling enum_mbus_code in subdevs, causing an infinite loop if the subdev's enum_mbus_code returns some other error than EINVAL. Fix the error handling. Signed-off-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f9426edd5668ddc9bcc199721bf693efdfa92f0e Author: Tomi Valkeinen Date: Thu Mar 4 14:45:19 2021 +0100 media: ti-vpe: cal: remove unneeded assignment v4l2_fill_pix_format() already copies mbus_fmt.field, so no need to do it again. Signed-off-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit da24442796b20c614cc8e583c2c89a293921d52a Author: Yang Li Date: Fri Feb 26 02:28:40 2021 +0100 media: exynos4-is: add missing call to of_node_put() In one of the error paths of the for_each_child_of_node() loop in fimc_md_parse_one_endpoint, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/media/platform/exynos4-is/media-dev.c:489:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 492. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1a28dce222a6ece725689ad58c0cf4a1b48894f4 Author: Hans Verkuil Date: Tue Feb 2 15:49:23 2021 +0100 media: vim2m: initialize the media device earlier Before the video device node is registered, the v4l2_dev.mdev pointer must be set in order to correctly associate the video device with the media device. Move the initialization of the media device up. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6a7d7c342cbd2ead32af36d3cfad51eb0a66d37 Author: Ezequiel Garcia Date: Sat Mar 6 20:07:49 2021 +0100 media: uapi: vp8: Fix kernel-doc warnings Fix following warnings: ./scripts/kernel-doc --none include/uapi/linux/v4l2-controls.h include/uapi/linux/v4l2-controls.h:1727: warning: bad line: include/uapi/linux/v4l2-controls.h:1853: warning: expecting prototype for struct v4l2_vp8_frame. Prototype was for struct v4l2_ctrl_vp8_frame instead include/uapi/linux/v4l2-controls.h:1853: warning: Function parameter or member 'segment' not described in 'v4l2_ctrl_vp8_frame' include/uapi/linux/v4l2-controls.h:1853: warning: Function parameter or member 'entropy' not described in 'v4l2_ctrl_vp8_frame' include/uapi/linux/v4l2-controls.h:1853: warning: Function parameter or member 'coder_state' not described in 'v4l2_ctrl_vp8_frame' Reported-by: Mauro Carvalho Chehab Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 363240ce1c08875815d28276f0a793bcaedb1ee9 Author: Ezequiel Garcia Date: Thu Mar 4 15:07:55 2021 +0100 media: uapi: move VP8 stateless controls out of staging Until now, the VP8 V4L2 API was not exported as a public API, and only defined in a private media header (media/vp8-ctrls.h). The reason for this was a concern about the API not complete and ready to support VP8 decoding hardware accelerators. After reviewing the VP8 specification in detail, and now that the API is able to support Cedrus and Hantro G1, we can consider this ready. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0c86b4bdac7eb3a6c17aa5225a7bc708047bac6a Author: Ezequiel Garcia Date: Thu Mar 4 15:07:54 2021 +0100 media: vp8: Rename V4L2 VP8 specific macro to V4L2_VP8_ Before we move the VP8 controls to a stable public header, rename this macro so it's clearly V4L2-specific. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 45c79296d736ec30ed80ddd32e2f19da220691b1 Author: Ezequiel Garcia Date: Thu Mar 4 15:07:53 2021 +0100 media: controls: Log VP8 stateless control in .std_log Simply print the type of the control. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e74b504a87c110071376438564a6f7a351a215bf Author: Ezequiel Garcia Date: Thu Mar 4 15:07:52 2021 +0100 media: uapi: Move the VP8 stateless control type out of staging Move the VP8 stateless control types out of staging, and re-number it to avoid any confusion. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1fb03333eb926e315f9850098b5a3361832f07cb Author: Ezequiel Garcia Date: Thu Mar 4 15:07:51 2021 +0100 media: uapi: Move parsed VP8 pixel format out of staging Since we are ready to stabilize the VP8 stateless API, move the parsed VP8 pixel format. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dacd59454449cbce47539a1abed266c659e8ebab Author: Ezequiel Garcia Date: Thu Mar 4 15:07:50 2021 +0100 media: uapi: vp8: Add proper kernel-doc documentation In preparation for making the interface public, document all the structures. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 643a236e46d43ec8d7b4d9b35affa48b98c65df0 Author: Ezequiel Garcia Date: Thu Mar 4 15:07:49 2021 +0100 media: uapi: vp8: Rename v4l2_vp8_loopfilter to v4l2_vp8_loop_filter Rename to struct v4l2_vp8_loop_filter, which is closer to the VP8 syntax. This change is only cosmetics, but since this API is exposed to userspace, it's worth the trouble to get it consistent. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d04c114e806f93135e3584bb7016aefa414322fb Author: Ezequiel Garcia Date: Thu Mar 4 15:07:48 2021 +0100 media: uapi: vp8: Remove "header" from symbol names and macros It doesn't seem to add any clarity to have a "header" suffix in controls, struct names and flags. Since this just makes names too long without any benefit, just drop it. Signed-off-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 18a6262b05f7c87a42de22d426e20402d163637f Author: Stanimir Varbanov Date: Tue Jan 26 09:42:52 2021 +0100 media: venus: core: Parse firmware-name DT property On production devices the firmware could be located on different places, this path could be provided by special firmware-name DT property. Here we check for existence of such DT property and if it exist take the firmware path from there. Otherwise, if the property is missing we fallback to the predefined path from driver resource structure. Signed-off-by: Stanimir Varbanov Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Bjorn Andersson Signed-off-by: Mauro Carvalho Chehab commit f765f45f29107fd51fc705f952542677e038758e Author: Stephen Boyd Date: Tue Feb 2 20:47:52 2021 +0100 media: venus: Include io.h for memremap() This file uses memremap() now, so we should include io.h instead of relying on any sort of implicit include elsewhere. Cc: Dikshita Agarwal Fixes: 0ca0ca980505 ("media: venus: core: add support to dump FW region") Signed-off-by: Stephen Boyd Reviewed-by: Fritz Koenig Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 08b1cf474b7f72750adebe0f0a35f8e9a3eb75f6 Author: Bryan O'Donoghue Date: Fri Feb 5 19:11:49 2021 +0100 media: venus: core, venc, vdec: Fix probe dependency error Commit aaaa93eda64b ("media] media: venus: venc: add video encoder files") is the last in a series of three commits to add core.c vdec.c and venc.c adding core, encoder and decoder. The encoder and decoder check for core drvdata as set and return -EPROBE_DEFER if it has not been set, however both the encoder and decoder rely on core.v4l2_dev as valid. core.v4l2_dev will not be valid until v4l2_device_register() has completed in core.c's probe(). Normally this is never seen however, Dmitry reported the following backtrace when compiling drivers and firmware directly into a kernel image. [ 5.259968] Hardware name: Qualcomm Technologies, Inc. Robotics RB5 (DT) [ 5.269850] sd 0:0:0:3: [sdd] Optimal transfer size 524288 bytes [ 5.275505] Workqueue: events deferred_probe_work_func [ 5.275513] pstate: 60400005 (nZCv daif +PAN -UAO -TCO BTYPE=--) [ 5.441211] usb 2-1: new SuperSpeedPlus Gen 2 USB device number 2 using xhci-hcd [ 5.442486] pc : refcount_warn_saturate+0x140/0x148 [ 5.493756] hub 2-1:1.0: USB hub found [ 5.496266] lr : refcount_warn_saturate+0x140/0x148 [ 5.500982] hub 2-1:1.0: 4 ports detected [ 5.503440] sp : ffff80001067b730 [ 5.503442] x29: ffff80001067b730 [ 5.592660] usb 1-1: new high-speed USB device number 2 using xhci-hcd [ 5.598478] x28: ffff6c6bc1c379b8 [ 5.598480] x27: ffffa5c673852960 x26: ffffa5c673852000 [ 5.598484] x25: ffff6c6bc1c37800 x24: 0000000000000001 [ 5.810652] x23: 0000000000000000 x22: ffffa5c673bc7118 [ 5.813777] hub 1-1:1.0: USB hub found [ 5.816108] x21: ffffa5c674440000 x20: 0000000000000001 [ 5.820846] hub 1-1:1.0: 4 ports detected [ 5.825415] x19: ffffa5c6744f4000 x18: ffffffffffffffff [ 5.825418] x17: 0000000000000000 x16: 0000000000000000 [ 5.825421] x15: 00000a4810c193ba x14: 0000000000000000 [ 5.825424] x13: 00000000000002b8 x12: 000000000000f20a [ 5.825427] x11: 000000000000f20a x10: 0000000000000038 [ 5.845447] usb 2-1.1: new SuperSpeed Gen 1 USB device number 3 using xhci-hcd [ 5.845904] [ 5.845905] x9 : 0000000000000000 x8 : ffff6c6d36fae780 [ 5.871208] x7 : ffff6c6d36faf240 x6 : 0000000000000000 [ 5.876664] x5 : 0000000000000004 x4 : 0000000000000085 [ 5.882121] x3 : 0000000000000119 x2 : ffffa5c6741ef478 [ 5.887578] x1 : 3acbb3926faf5f00 x0 : 0000000000000000 [ 5.893036] Call trace: [ 5.895551] refcount_warn_saturate+0x140/0x148 [ 5.900202] __video_register_device+0x64c/0xd10 [ 5.904944] venc_probe+0xc4/0x148 [ 5.908444] platform_probe+0x68/0xe0 [ 5.912210] really_probe+0x118/0x3e0 [ 5.915977] driver_probe_device+0x5c/0xc0 [ 5.920187] __device_attach_driver+0x98/0xb8 [ 5.924661] bus_for_each_drv+0x68/0xd0 [ 5.928604] __device_attach+0xec/0x148 [ 5.932547] device_initial_probe+0x14/0x20 [ 5.936845] bus_probe_device+0x9c/0xa8 [ 5.940788] device_add+0x3e8/0x7c8 [ 5.944376] of_device_add+0x4c/0x60 [ 5.948056] of_platform_device_create_pdata+0xbc/0x140 [ 5.953425] of_platform_bus_create+0x17c/0x3c0 [ 5.958078] of_platform_populate+0x80/0x110 [ 5.962463] venus_probe+0x2ec/0x4d8 [ 5.966143] platform_probe+0x68/0xe0 [ 5.969907] really_probe+0x118/0x3e0 [ 5.973674] driver_probe_device+0x5c/0xc0 [ 5.977882] __device_attach_driver+0x98/0xb8 [ 5.982356] bus_for_each_drv+0x68/0xd0 [ 5.986298] __device_attach+0xec/0x148 [ 5.990242] device_initial_probe+0x14/0x20 [ 5.994539] bus_probe_device+0x9c/0xa8 [ 5.998481] deferred_probe_work_func+0x74/0xb0 [ 6.003132] process_one_work+0x1e8/0x360 [ 6.007254] worker_thread+0x208/0x478 [ 6.011106] kthread+0x150/0x158 [ 6.014431] ret_from_fork+0x10/0x30 [ 6.018111] ---[ end trace f074246b1ecdb466 ]--- This patch fixes by - Only setting drvdata after v4l2_device_register() completes - Moving v4l2_device_register() so that suspend/reume in core::probe() stays as-is - Changes pm_ops->core_function() to take struct venus_core not struct device - Minimal rework of v4l2_device_*register in probe/remove Reported-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit bbcee72c2f7ad889be7513d5e700165c3cb30e60 Author: Bhaskar Chowdhury Date: Fri Mar 19 10:23:23 2021 +0530 microblaze: Fix a typo s/storign/storing/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210319045323.21241-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Michal Simek commit 5a465c5391a856a0c1e9554964d660676c35d1b2 Author: Christophe JAILLET Date: Thu Jan 28 21:22:34 2021 +0100 media: venus: core: Fix some resource leaks in the error path of 'venus_probe()' If an error occurs after a successful 'of_icc_get()' call, it must be undone. Use 'devm_of_icc_get()' instead of 'of_icc_get()' to avoid the leak. Update the remove function accordingly and axe the now unneeded 'icc_put()' calls. Fixes: 32f0a6ddc8c9 ("media: venus: Use on-chip interconnect API") Signed-off-by: Christophe JAILLET Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 431c8ae4519dba5ffec5b9a4c6bca90f3e591bb8 Author: Geert Uytterhoeven Date: Tue Mar 16 16:47:05 2021 +0100 arm64: dts: renesas: falcon: Move AVB0 to main DTS The Ethernet PHY for the first AVB instance is located on the Falcon BreakOut board. Hence move its description from the DTS file that describes the CPU board to the main Falcon DTS file. Fixes: e8ac55a5e70a9522 ("arm64: dts: renesas: falcon: Add Ethernet-AVB0 support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210316154705.2433528-4-geert+renesas@glider.be commit 0fc129ba374b57578873fb88e86006e126674a43 Author: Geert Uytterhoeven Date: Tue Mar 16 16:47:04 2021 +0100 arm64: dts: renesas: falcon: Move watchdog config to CPU board DTS The 32 kHz oscillator driving the R-Car V3U watchdog is located on the Falcon CPU board. Hence move the watchdog configuration from the main Falcon DTS file to the DTS file that describes the CPU board. Fixes: d207dc500bbcf8c6 ("arm64: dts: renesas: falcon: Enable watchdog timer") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210316154705.2433528-3-geert+renesas@glider.be commit e86ff34cc44a49aeae2af74444560b17a0a96c78 Author: Geert Uytterhoeven Date: Tue Mar 16 16:47:03 2021 +0100 arm64: dts: renesas: falcon: Move console config to CPU board DTS The serial console is located on the Falcon CPU board. Hence move serial console configuration from the main Falcon DTS file to the DTS file that describes the CPU board. Fixes: 63070d7c2270e8de ("arm64: dts: renesas: Add Renesas Falcon boards support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210316154705.2433528-2-geert+renesas@glider.be commit 08c06797627935d48621359eb95ab8a69d70d5c5 Author: Stanimir Varbanov Date: Tue Nov 24 01:40:12 2020 +0100 media: venus: venc: Add support for AUD NALU control Add support for Access Unit Delimiter control into encoder. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit f2bf1bcb191b15c0ac135af2651ebed6c017bcb0 Author: Stanimir Varbanov Date: Tue Nov 24 01:01:37 2020 +0100 media: v4l2-ctrls: Add control for AUD generation Add a control to enable inserting of AUD NALU into encoded bitstream. Reviewed-by: Hans Verkuil Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 644bcc0315f2b1c438132c46f78221cd6a6f67f3 Author: Stanimir Varbanov Date: Mon Nov 9 18:35:41 2020 +0100 media: docs: Deprecate mfc display delay controls Deprecate mfc private display delay and display enable controls for new clients and use the standard controls instead. Acked-by: Hans Verkuil Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit c3042bff918a25c0cb3120d6da18a9d8b00da617 Author: Stanimir Varbanov Date: Mon Nov 9 18:35:40 2020 +0100 media: s5p-mfc: Use display delay and display enable std controls Use the standard display_delay and display_delay_enable controls, the legacy private MFC controls are kept for backward compatibility. Acked-by: Marek Szyprowski Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 8ec0b7b0b5981c58704194af17a2a981e164900f Author: Stanimir Varbanov Date: Mon Nov 9 18:35:39 2020 +0100 media: venus: vdec: Add support for display delay and delay enable controls Add support for display delay and display delay enable std controls. With this we implement decoder decode output order (decode vs display). Once firmware implement few new features the controls will be used for other use-cases. Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit 9f3d1056ea54170bfcc678ca69f802492cc69f93 Author: Stanimir Varbanov Date: Mon Nov 9 18:35:38 2020 +0100 media: v4l2-ctrl: Make display delay and display enable std controls Make display delay and display delay enable MFC controls standard v4l controls. This will allow reuse of the controls for other decoder drivers. Also the new proposed controls are now codec agnostic because they could be used for any codec. Acked-by: Hans Verkuil Signed-off-by: Stanimir Varbanov Signed-off-by: Mauro Carvalho Chehab commit f85142af36415cdd5be59eb4b00a231c8b6dcb49 Merge: e00943e916782 0d02ec6b3136c Author: Greg Kroah-Hartman Date: Mon Mar 22 08:58:02 2021 +0100 Merge 5.12-rc4 into usb-next We need the usb/thunderbolt fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 86ee6729c9b41797442f51768a676696560ecd88 Author: Mauro Carvalho Chehab Date: Wed Sep 18 10:59:44 2019 -0300 media: add a subsystem profile documentation Document the basic policies of the media subsystem profile. Signed-off-by: Mauro Carvalho Chehab commit c7f57fd6b7f0a889b0f847611c9075c37dd31810 Merge: 21ae24cce84f3 0d02ec6b3136c Author: Greg Kroah-Hartman Date: Mon Mar 22 08:55:27 2021 +0100 Merge v5.12-rc4 into staging-next We want the staging/iio fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit db792e9adbf85ffc9d6b0b060ac3c8e3148c8992 Author: Tianling Shen Date: Fri Mar 19 13:16:27 2021 +0800 rockchip: rk3399: Add support for FriendlyARM NanoPi R4S This adds support for the NanoPi R4S from FriendlyArm. Rockchip RK3399 SoC 1GB DDR3 or 4GB LPDDR4 RAM Gigabit Ethernet (WAN) Gigabit Ethernet (PCIe) (LAN) USB 3.0 Port x 2 MicroSD slot Reset button WAN - LAN - SYS LED Co-developed-by: Jensen Huang Signed-off-by: Jensen Huang [minor adjustments] Co-developed-by: Marty Jones Signed-off-by: Marty Jones [further adjustments, fixed format issues] Signed-off-by: Tianling Shen Link: https://lore.kernel.org/r/20210319051627.814-2-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 1003888415e83e15ddb63d1d96189b4f2c5f1d48 Author: Tianling Shen Date: Fri Mar 19 13:16:26 2021 +0800 dt-bindings: Add doc for FriendlyARM NanoPi R4S Add devicetree binding documentation for the FriendlyARM NanoPi R4S. Signed-off-by: Tianling Shen Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210319051627.814-1-cnsztl@gmail.com Signed-off-by: Heiko Stuebner commit 3a913fa535c185d017625b352a32d1643d1f489e Author: Anshuman Gupta Date: Fri Mar 19 15:32:08 2021 +0530 drm/i915/hdcp: return correct error code hdcp2_enable_stream_encryption shouldn't get called in case of any port authentication or encryption error, though hdcp2_enable_stream_encryption checks for link encryption before enabling stream encryption and returns error but this return error code won't be correct in case of any error due to port authentication and encryption. Cc: Ramalingam C Reviewed-by: Ankit Nautiyal Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210319100208.5886-4-anshuman.gupta@intel.com commit 8b06f6d8b4d98d2d379effa20d36fe097e179ccf Author: Anshuman Gupta Date: Fri Mar 19 15:32:07 2021 +0530 drm/i915/hdcp: link hdcp2 recovery on link enc stopped When stream encryption enabling fails due to Link encryption status has stopped, prepare HDCP2 for recovery by disabling port authentication and encryption such that it can re-attempt port authentication and encryption. Cc: Ramalingam C Reviewed-by: Ankit Nautiyal Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210319100208.5886-3-anshuman.gupta@intel.com commit ee912b55650c8eaed43f533155027f62a1d831aa Author: Anshuman Gupta Date: Fri Mar 19 15:32:06 2021 +0530 drm/i915/hdcp: HDCP2.2 MST Link failure recovery DP MST Link Check performed only for the connector involved with HDCP port authentication and encryption, for other connector it simply returns link check with true and update the uevent. Therefore in case of HDCP 2.2 link failure, disable HDCP encryption and de-authenticate the port so next time it can enable port authentication and encryption. Cc: Ramalingam C Reviewed-by: Ankit Nautiyal Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210319100208.5886-2-anshuman.gupta@intel.com commit 50e945cbaa9ae188efc6a1a593f10874df89a4bb Author: Anshuman Gupta Date: Fri Mar 19 14:47:32 2021 +0530 drm/i915/hdcp: mst streams type1 capability check It requires to check streams type1 capability in mst topology by checking Rxinfo instead connector HDCP2.x capability in order to enforce type0 stream encryption in a mix of HDCP {1.x,2.x} mst topology. Rxcaps always shows HDCP 2.x capability of immediate downstream connector. Let's use Rxinfo HDCP1_DEVICE_DOWNSTREAM bit to detect a HDCP {1.x,2.x} mix mst topology. Cc: Sean Paul Cc: Ramalingam C Signed-off-by: Anshuman Gupta Reviewed-by: Ankit Nautiyal Link: https://patchwork.freedesktop.org/patch/msgid/20210319091732.17547-1-anshuman.gupta@intel.com commit 2b53d1bd13e1c2b20e5f3e55788e2c09bc2197e5 Author: Tom Saeger Date: Fri Mar 12 19:50:06 2021 -0700 cpufreq: cppc: simplify default delay_us setting Simplify case when setting default in cppc_cpufreq_get_transition_delay_us. Signed-off-by: Tom Saeger Signed-off-by: Viresh Kumar commit 15aa70a32bd03ccf2e65dcff929aff91f4e47ce8 Author: Bhaskar Chowdhury Date: Sat Mar 13 09:19:51 2021 +0530 cpufreq: Rudimentary typos fix in the file s5pv210-cpufreq.c Trivial spelling fixes throughout the file. Signed-off-by: Bhaskar Chowdhury Reviewed-by: Tom Saeger Reviewed-by: Randy Dunlap [ Viresh: Capitalize two words. ] Signed-off-by: Viresh Kumar commit 4c38f2df71c8e33c0b64865992d693f5022eeaad Author: Viresh Kumar Date: Tue Jun 23 15:49:40 2020 +0530 cpufreq: CPPC: Add support for frequency invariance The Frequency Invariance Engine (FIE) is providing a frequency scaling correction factor that helps achieve more accurate load-tracking. Normally, this scaling factor can be obtained directly with the help of the cpufreq drivers as they know the exact frequency the hardware is running at. But that isn't the case for CPPC cpufreq driver. Another way of obtaining that is using the arch specific counter support, which is already present in kernel, but that hardware is optional for platforms. This patch updates the CPPC driver to register itself with the topology core to provide its own implementation (cppc_scale_freq_tick()) of topology_scale_freq_tick() which gets called by the scheduler on every tick. Note that the arch specific counters have higher priority than CPPC counters, if available, though the CPPC driver doesn't need to have any special handling for that. On an invocation of cppc_scale_freq_tick(), we schedule an irq work (since we reach here from hard-irq context), which then schedules a normal work item and cppc_scale_freq_workfn() updates the per_cpu arch_freq_scale variable based on the counter updates since the last tick. To allow platforms to disable this CPPC counter-based frequency invariance support, this is all done under CONFIG_ACPI_CPPC_CPUFREQ_FIE, which is enabled by default. This also exports sched_setattr_nocheck() as the CPPC driver can be built as a module. Cc: linux-acpi@vger.kernel.org Reviewed-by: Ionela Voinescu Tested-by: Ionela Voinescu Tested-by: Vincent Guittot Acked-by: Rafael J. Wysocki Signed-off-by: Viresh Kumar commit a359f757965aafd0f58570de95dc6bc06cf12a9c Author: Ingo Molnar Date: Mon Mar 22 04:21:30 2021 +0100 irq: Fix typos in comments Fix ~36 single-word typos in the IRQ, irqchip and irqdomain code comments. Signed-off-by: Ingo Molnar Cc: Thomas Gleixner Cc: Marc Zyngier Cc: Borislav Petkov Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit c7941422cff96874fc76c9b127eaf0be5dc7d7af Author: Laurent Pinchart Date: Sun Apr 5 03:47:03 2020 +0300 dt-bindings: display: bridge: Remove deprecated dw_hdmi.txt dw_hdmi.txt has been replaced with synopsys,dw-hdmi.yaml, and all references to the old file have been converted. Remove it. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring commit a485a5fd827e15691b7ae2cf9a9ca674ad7f5e27 Author: Laurent Pinchart Date: Sat Apr 4 21:50:39 2020 +0300 dt-bindings: display: sun8i-a83t-dw-hdmi: Reference dw-hdmi YAML schema Replace the reference to the DWC HDMI text DT binding with a reference to the YAML equivalent. Signed-off-by: Laurent Pinchart Acked-by: Rob Herring Acked-by: Chen-Yu Tsai commit 7d5a683ba44d5fcd942e51551a244f9bef746972 Author: Laurent Pinchart Date: Sat Apr 4 21:50:39 2020 +0300 dt-bindings: display: rockchip: dw-hdmi: Convert binding to YAML Convert the Rockchip HDMI TX text binding to YAML. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring commit b935c3a2e07bcf71dea52ba370fd57e69490d915 Author: Laurent Pinchart Date: Sat Apr 4 21:50:39 2020 +0300 dt-bindings: display: imx: hdmi: Convert binding to YAML Convert the i.MX6 HDMI TX text binding to YAML. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring Acked-by: Philipp Zabel commit 391ce40de526e2e5c5d276d893390cfe1c4e8e92 Author: Laurent Pinchart Date: Sat Apr 4 21:50:39 2020 +0300 dt-bindings: display: bridge: renesas,dw-hdmi: Convert binding to YAML Convert the Renesas R-Car DWC HDMI TX text binding to YAML. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring commit 7f9321ff456cd038796b1521cb152552d6d9445e Author: Laurent Pinchart Date: Sat Apr 4 21:50:39 2020 +0300 dt-bindings: display: bridge: Add YAML schema for Synopsys DW-HDMI Add a .yaml schema containing the common properties for the Synopsys DesignWare HDMI TX controller. This isn't a full device tree binding specification, but is meant to be referenced by platform-specific bindings for the IP core. Signed-off-by: Laurent Pinchart Reviewed-by: Philipp Zabel Reviewed-by: Rob Herring commit 99d66127fad25ebbc5562a4c45d10333f54cecb4 Author: Laurent Pinchart Date: Fri May 15 03:25:28 2020 +0300 dt-bindings: display: renesas,du: Convert binding to YAML Convert the Renesas R-Car DU text binding to YAML. Signed-off-by: Laurent Pinchart Reviewed-by: Rob Herring commit 97258ce902d1e1c396a4d7c38f6ae7085adb73c5 Author: Ingo Molnar Date: Mon Mar 22 03:55:50 2021 +0100 entry: Fix typos in comments Fix 3 single-word typos in the generic syscall entry code. Signed-off-by: Ingo Molnar Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit e2db7592be8e83df47519116621411e1056b21c7 Author: Ingo Molnar Date: Mon Mar 22 02:35:05 2021 +0100 locking: Fix typos in comments Fix ~16 single-word typos in locking code comments. Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Paul E. McKenney Cc: Will Deacon Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit 3b03706fa621ce31a3e9ef6307020fde4e6aae16 Author: Ingo Molnar Date: Thu Mar 18 13:38:50 2021 +0100 sched: Fix various typos Fix ~42 single-word typos in scheduler code comments. We have accumulated a few fun ones over the years. :-) Signed-off-by: Ingo Molnar Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Juri Lelli Cc: Vincent Guittot Cc: Dietmar Eggemann Cc: Steven Rostedt Cc: Ben Segall Cc: Mel Gorman Cc: linux-kernel@vger.kernel.org commit 163b099146b85d1b05bd2eaa045acbeee25c29e4 Author: Ingo Molnar Date: Sun Mar 21 22:28:53 2021 +0100 x86: Fix various typos in comments, take #2 Fix another ~42 single-word typos in arch/x86/ code comments, missed a few in the first pass, in particular in .S files. Signed-off-by: Ingo Molnar Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Paolo Bonzini Cc: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org commit c681df88dcb12b1efd7e4efcfe498c5e9c31ce02 Author: Ingo Molnar Date: Sun Mar 21 23:32:33 2021 +0100 x86: Remove unusual Unicode characters from comments We've accumulated a few unusual Unicode characters in arch/x86/ over the years, substitute them with their proper ASCII equivalents. A few of them were a whitespace equivalent: ' ' - the use was harmless. Signed-off-by: Ingo Molnar Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: linux-kernel@vger.kernel.org commit ca8778c45e401067cefe2abbfb8b547c30d45908 Merge: 21d6a7dcbfba5 2c41fab1c60b0 Author: Ingo Molnar Date: Sun Mar 21 22:16:08 2021 +0100 Merge branch 'linus' into x86/cleanups, to resolve conflict Conflicts: arch/x86/kernel/kprobes/ftrace.c Signed-off-by: Ingo Molnar commit 4eed7f5a8334a179f40b2c78c1ead572b9dd04a0 Author: LI Qingwu Date: Fri Mar 19 11:02:36 2021 +0000 power: supply: bq27xxx: Add support for BQ78Z100 Add support for TI BQ78Z100, I2C interface gas gauge. It provides a fully integrated safety protection and authentication for 1 to 2-series cell Li-Ion and Li-Polymer battery packs. The patch was tested with BQ78Z100 equipment. CASE I: Discharging: POWER_SUPPLY_NAME=bq78z100-0 POWER_SUPPLY_STATUS=Discharging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_VOLTAGE_NOW=3386000 POWER_SUPPLY_CURRENT_NOW=-5000 POWER_SUPPLY_CAPACITY=27 POWER_SUPPLY_CAPACITY_LEVEL=Normal POWER_SUPPLY_TEMP=269 POWER_SUPPLY_TIME_TO_EMPTY_NOW=1249920 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CHARGE_FULL=6494000 POWER_SUPPLY_CHARGE_NOW=1736000 POWER_SUPPLY_CHARGE_FULL_DESIGN=6000000 POWER_SUPPLY_CYCLE_COUNT=1 POWER_SUPPLY_POWER_AVG=-20000 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_MANUFACTURER=Texas Instruments CASE II : No discharging current: POWER_SUPPLY_NAME=bq78z100-0 POWER_SUPPLY_STATUS=Not charging POWER_SUPPLY_PRESENT=1 POWER_SUPPLY_VOLTAGE_NOW=3386000 POWER_SUPPLY_CURRENT_NOW=0 POWER_SUPPLY_CAPACITY=27 POWER_SUPPLY_CAPACITY_LEVEL=Normal POWER_SUPPLY_TEMP=270 POWER_SUPPLY_TECHNOLOGY=Li-ion POWER_SUPPLY_CHARGE_FULL=6494000 POWER_SUPPLY_CHARGE_NOW=1734000 POWER_SUPPLY_CHARGE_FULL_DESIGN=6000000 POWER_SUPPLY_CYCLE_COUNT=1 POWER_SUPPLY_POWER_AVG=0 POWER_SUPPLY_HEALTH=Good POWER_SUPPLY_MANUFACTURER=Texas Instruments Signed-off-by: LI Qingwu Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit 83ee0681993dfe68868683bdc02042ec025ac38f Author: LI Qingwu Date: Fri Mar 19 11:02:35 2021 +0000 dt-bindings: power: bq27xxx: add bq78z100 Add bindings for TI BQ78Z100. An I2C interface gas gauge. It provides a fully integrated safety protection and authentication for 1 to 2-series cell Li-Ion and Li-Polymer battery packs. Signed-off-by: LI Qingwu Acked-by: Rob Herring Signed-off-by: Sebastian Reichel commit 46f86be0fc6900a13bc27138a72cb7188ef6b4be Author: Heiko Stuebner Date: Tue Feb 9 11:34:08 2021 +0100 arm64: dts: rockchip: add phandle to timer0 on rk3368 While the kernel doesn't care s0 much right now, bootloaders like u-boot need to refine the node on their side, so to make life easier for everyone add the timer0 phandle for timer0. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210209103408.2302218-1-heiko@sntech.de Signed-off-by: Heiko Stuebner commit 7c7f041309f73b05d21980f88f29305255e126ee Author: Thomas Schneider Date: Wed Mar 10 13:28:21 2021 +0100 arm64: dts: rockchip: add infrared receiver node to rockpro64 This adds the RockPro64’s infrared receiver to its dtsi. The configuration is almost the same as on rk3328-rock64, except for the GPIO pins, and thus adapted from there. Signed-off-by: Thomas Schneider Link: https://lore.kernel.org/r/20210310122821.126408-1-qsx@chaotikum.eu Signed-off-by: Heiko Stuebner commit b417764daa2d7e1325fe926144ffcb4b2bbd8d25 Author: Heiko Stuebner Date: Thu Feb 25 14:33:22 2021 +0100 arm64: dts: rockchip: drop separate opp table on rk3399-puma We're using OPPs with a range now, so the fact that the cpu regulator on puma can't provide the needed 5mV steps requested in the minimal voltage values can be handled automatically by the opp framework. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210225133322.3420724-3-heiko@sntech.de Signed-off-by: Heiko Stuebner commit 6d5989a36e60614e12949c6c2dac368b380bf2ca Author: Heiko Stuebner Date: Thu Feb 25 14:33:21 2021 +0100 arm64: dts: rockchip: used range'd gpu opps on rk3399 Similar to the cpu opps, also use opps with a range on the gpu. (min, preferred, max). The voltage just needs to be higher than the minimum and this allows the regulator more freedom if it can't provide the exact voltage specified, but just say 5mV higher, as can be seen on rk3399-puma which fails to scale panfrost voltages nearly completely. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210225133322.3420724-2-heiko@sntech.de Signed-off-by: Heiko Stuebner commit 6daae8ff20b8e9d67c282ba37c63e1a7ee3c2206 Author: Heiko Stuebner Date: Thu Feb 25 14:33:20 2021 +0100 arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel The vendor-kernel did increase the minimum voltage for some low frequency opps to 825mV citing stability reasons. So do that in mainline as well and also use the ranged notation the vendor-kernel switched to, to give a bit more flexibility for different regulator setups. Signed-off-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210225133322.3420724-1-heiko@sntech.de Signed-off-by: Heiko Stuebner commit f43e351c963021812ffc61a15155d72e8773eee6 Author: Maciej Matuszczyk Date: Thu Feb 25 08:19:44 2021 +0000 arm64: dts: rockchip: Add gpu opp nodes to px30 dtsi This matches the values in the vendor kernel. Signed-off-by: Maciej Matuszczyk [added tiny commit description] Link: https://lore.kernel.org/r/20210225081943.127714-1-maccraft123mc@gmail.com Signed-off-by: Heiko Stuebner commit 3feb52a2b8d97989823f1aa9cfff281b8475ff4e Author: Nitin Joshi Date: Wed Mar 17 11:46:36 2021 +0900 platform/x86: thinkpad_acpi: sysfs interface to get wwan antenna type On some newer Thinkpads we need to set SAR value based on antenna type. This patch provides a sysfs interface that userspace can use to get antenna type and set corresponding SAR value, as is required for FCC certification. Reviewed-by: Mark Pearson Signed-off-by: Nitin Joshi Link: https://lore.kernel.org/r/20210317024636.356175-1-njoshi1@lenovo.com Signed-off-by: Hans de Goede commit 2728f39dfc720983e2b69f0f1f0c403aaa7c346f Author: Hans de Goede Date: Sun Mar 21 17:35:13 2021 +0100 platform/x86: intel-vbtn: Stop reporting SW_DOCK events Stop reporting SW_DOCK events because this breaks suspend-on-lid-close. SW_DOCK should only be reported for docking stations, but all the DSDTs in my DSDT collection which use the intel-vbtn code, always seem to use this for 2-in-1s / convertibles and set SW_DOCK=1 when in laptop-mode (in tandem with setting SW_TABLET_MODE=0). This causes userspace to think the laptop is docked to a port-replicator and to disable suspend-on-lid-close, which is undesirable. Map the dock events to KEY_IGNORE to avoid this broken SW_DOCK reporting. Note this may theoretically cause us to stop reporting SW_DOCK on some device where the 0xCA and 0xCB intel-vbtn events are actually used for reporting docking to a classic docking-station / port-replicator but I'm not aware of any such devices. Also the most important thing is that we only report SW_DOCK when it reliably reports being docked to a classic docking-station without any false positives, which clearly is not the case here. If there is a chance of reporting false positives then it is better to not report SW_DOCK at all. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321163513.72328-1-hdegoede@redhat.com commit 42f38dcccfb3c235f25f5b0b5a99436ccfcd0737 Author: Hans de Goede Date: Sun Mar 21 12:59:01 2021 +0100 platform/x86: dell-wmi-sysman: Cleanup create_attributes_level_sysfs_files() Cleanup create_attributes_level_sysfs_files(): 1. There is no need to call sysfs_remove_file() on error, sysman_init() will already call release_attributes_data() on failure which already does this. 2. There is no need for the pr_debug() calls sysfs_create_file() should never fail and if it does it will already complain about the problem itself. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321115901.35072-8-hdegoede@redhat.com commit 9b95665a83ec555f441f5681daa58f75828d0255 Author: Hans de Goede Date: Sun Mar 21 12:59:00 2021 +0100 platform/x86: dell-wmi-sysman: Make sysman_init() return -ENODEV of the interfaces are not found When either the attributes or the password interface is not found, then unregister the 2 wmi drivers again and return -ENODEV from sysman_init(). Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Reported-by: Alexander Naumann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321115901.35072-7-hdegoede@redhat.com commit eaa1dcc79694674494620ee62098b937ef758df8 Author: Hans de Goede Date: Sun Mar 21 12:58:59 2021 +0100 platform/x86: dell-wmi-sysman: Cleanup sysman_init() error-exit handling Cleanup sysman_init() error-exit handling: 1. There is no need for the fail_reset_bios and fail_authentication_kset eror-exit cases, these can be handled by release_attributes_data() 2. Rename all the labels from fail_what_failed, to err_what_to_cleanup this is the usual way to name these and avoids the need to rename them when extra steps are added. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321115901.35072-6-hdegoede@redhat.com commit f4c4e9ad1523a32a78f5caf68f1b346a30035481 Author: Hans de Goede Date: Sun Mar 21 12:58:58 2021 +0100 platform/x86: dell-wmi-sysman: Fix release_attributes_data() getting called twice on init_bios_attributes() failure All calls of init_bios_attributes() will result in a goto fail_create_group if they fail, which calls release_attributes_data(). So there is no need to call release_attributes_data() from init_bios_attributes() on failure itself. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321115901.35072-5-hdegoede@redhat.com commit cb1e50f2f0a26fd4a4b1bdf669f5814fa414577a Author: Hans de Goede Date: Sun Mar 21 12:58:57 2021 +0100 platform/x86: dell-wmi-sysman: Make it safe to call exit_foo_attributes() multiple times During some of the error-exit paths it is possible that release_attributes_data() will get called multiple times, which results in exit_foo_attributes() getting called multiple times. Make it safe to call exit_foo_attributes() multiple times, avoiding double-free()s in this case. Note that release_attributes_data() really should only be called once during error-exit paths. This will be fixed in a separate patch and it is good to have the exit_foo_attributes() functions modified this way regardless. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321115901.35072-4-hdegoede@redhat.com commit ececdb8983762d08ed726c1e5308d2f77db9ffd1 Author: Hans de Goede Date: Sun Mar 21 12:58:56 2021 +0100 platform/x86: dell-wmi-sysman: Fix possible NULL pointer deref on exit It is possible for release_attributes_data() to get called when the main_dir_kset has not been created yet, move the removal of the bios-reset sysfs attr to under a if (main_dir_kset) check to avoid a NULL pointer deref. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Reported-by: Alexander Naumann Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321115901.35072-3-hdegoede@redhat.com commit bdda39673fdef32631448dcb75df79aed9643b31 Author: Hans de Goede Date: Sun Mar 21 12:58:55 2021 +0100 platform/x86: dell-wmi-sysman: Fix crash caused by calling kset_unregister twice On some system the WMI GUIDs used by dell-wmi-sysman are present but there are no enum type attributes, this causes init_bios_attributes() to return -ENODEV, after which sysman_init() does a "goto fail_create_group" and then calls release_attributes_data(). release_attributes_data() calls kset_unregister(wmi_priv.main_dir_kset); but before this commit it was missing a "wmi_priv.main_dir_kset = NULL;" statement; and after calling release_attributes_data() the sysman_init() error handling does this: if (wmi_priv.main_dir_kset) { kset_unregister(wmi_priv.main_dir_kset); wmi_priv.main_dir_kset = NULL; } Which causes a second kset_unregister(wmi_priv.main_dir_kset), leading to a double-free, which causes a crash. Add the missing "wmi_priv.main_dir_kset = NULL;" statement to release_attributes_data() to fix this double-free crash. Fixes: e8a60aa7404b ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems") Cc: Divya Bharathi Cc: Mario Limonciello Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321115901.35072-2-hdegoede@redhat.com commit e157c95f589409d32e6e245f6f185069a8c29cbd Author: Hans de Goede Date: Sun Mar 21 12:31:08 2021 +0100 platform/x86: thinkpad_acpi: Disable DYTC CQL mode around switching to balanced mode Testing has shown that setting /sys/firmware/acpi/platform_profile to "balanced" when /sys/bus/platform/devices/thinkpad_acpi/dytc_lapmode reports 1, causes dytc_lapmode to get reset to 0 and then it becomes stuck at 0 for aprox. 30 minutes even if the laptop is used on a lap. Disabling CQL (when enabled) before issuing the DYTC_CMD_RESET to get back to balanced mode and re-enabling it afterwards again, like the code already does when switching to low-power / performance mode fixes this. Fixes: c3bfcd4c6762 ("platform/x86: thinkpad_acpi: Add platform profile support") Tested-by: Mark Pearson Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210321113108.7069-1-hdegoede@redhat.com commit 12dde4d11e6d9c61f89496d358505ec3197a67f9 Author: Esteve Varela Colominas Date: Mon Mar 15 20:58:24 2021 +0100 platform/x86: thinkpad_acpi: Allow the FnLock LED to change state On many recent ThinkPad laptops, there's a new LED next to the ESC key, that indicates the FnLock status. When the Fn+ESC combo is pressed, FnLock is toggled, which causes the Media Key functionality to change, making it so that the media keys either perform their media key function, or function as an F-key by default. The Fn key can be used the access the alternate function at any time. With the current linux kernel, the LED doens't change state if you press the Fn+ESC key combo. However, the media key functionality *does* change. This is annoying, since the LED will stay on if it was on during bootup, and it makes it hard to keep track what the current state of the FnLock is. This patch calls an ACPI function, that gets the current media key state, when the Fn+ESC key combo is pressed. Through testing it was discovered that this function causes the LED to update correctly to reflect the current state when this function is called. The relevant ACPI calls are the following: \_SB_.PCI0.LPC0.EC0_.HKEY.GMKS: Get media key state, returns 0x603 if the FnLock mode is enabled, and 0x602 if it's disabled. \_SB_.PCI0.LPC0.EC0_.HKEY.SMKS: Set media key state, sending a 1 will enable FnLock mode, and a 0 will disable it. Relevant discussion: https://bugzilla.kernel.org/show_bug.cgi?id=207841 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1881015 Signed-off-by: Esteve Varela Colominas Link: https://lore.kernel.org/r/20210315195823.23212-1-esteve.varela@gmail.com Signed-off-by: Hans de Goede commit 2be7828c9fefc8cd205d1948faac48da8ce6c2ef Author: Al Viro Date: Mon Mar 8 10:16:16 2021 -0500 get rid of autofs_getpath() allow wq->name.name to point not at the beginning of the object containing the string, with wq->offset telling how far into it we are. Then we can bloody well just use dentry_path_raw() instead of autofs_getpath() - the only real difference is that dentry_path_raw() puts the result into the end of buffer and returns where it starts. Signed-off-by: Al Viro commit a2bbe66493ee380eb25e080e7fcdd1278a847f7e Author: Al Viro Date: Sun Jul 7 09:57:53 2019 -0400 constify dentry argument of dentry_path()/dentry_path_raw() Signed-off-by: Al Viro commit 21ae24cce84f3384a00f9ba4df26eab19bee666c Author: Bhaskar Chowdhury Date: Sun Mar 21 10:06:29 2021 +0530 staging: vchiq: Typo fixes s/sepecific/specific/ s/comonent/component/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210321043629.585758-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 40f29839d8bef5aecaa772afa8e5f2ff8434b49f Author: Heiko Stuebner Date: Mon Mar 15 12:25:02 2021 +0100 clk: rockchip: drop MODULE_ALIAS from rk3399 clock controller As suggested by Stephen during the rk3568 clock review, the MOUDLE_ALIAS doesn't serve any meaningful purpose, so drop it from the rk3399 as well. Suggested-by: Stephen Boyd Signed-off-by: Heiko Stuebner Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210315112502.343699-2-heiko@sntech.de commit e8c51b90f22031bf3f24d1f06d23bafac250bb62 Author: Heiko Stuebner Date: Mon Mar 15 12:25:01 2021 +0100 clk: rockchip: drop parenthesis from ARM || COMPILE_TEST depends As suggested by Stephen in the series adding the rk3568 clock controller the depends works just as well without the parenthesis around the depends. So to make everything look the same, drop them from existing entries too. Suggested-by: Stephen Boyd Signed-off-by: Heiko Stuebner Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210315112502.343699-1-heiko@sntech.de commit cf911d89c4c5e225a2a2cfadf1364838154b2202 Author: Elaine Zhang Date: Mon Mar 15 16:56:08 2021 +0800 clk: rockchip: add clock controller for rk3568 Add the clock tree definition for the new rk3568 SoC. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210315085608.16010-5-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit a3561e77cf3ca0937227ba13744d84fc46e5eb4b Author: Elaine Zhang Date: Mon Mar 15 16:56:07 2021 +0800 clk: rockchip: support more core div setting Use arrays to support more core independent div settings. A55 supports each core to work at different frequencies, and each core has an independent divider control. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210315085608.16010-4-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit 0cd74eec54a3ec34416bab6cc640a88230472078 Author: Elaine Zhang Date: Mon Mar 15 16:56:05 2021 +0800 dt-binding: clock: Document rockchip, rk3568-cru bindings Document the device tree bindings of the rockchip Rk3568 SoC clock driver in Documentation/devicetree/bindings/clock/rockchip,rk3568-cru.yaml. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Reviewed-by: Rob Herring Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210315085608.16010-2-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit 0865517926660309b796bd9bd5ba6671704733bc Author: Elaine Zhang Date: Mon Mar 15 16:56:06 2021 +0800 clk: rockchip: add dt-binding header for rk3568 Add the dt-bindings header for the rk3568, that gets shared between the clock controller and the clock references in the dts. Add softreset ID for rk3568. Signed-off-by: Elaine Zhang Reviewed-by: Kever Yang Reviewed-by: Rob Herring Acked-by: Stephen Boyd Link: https://lore.kernel.org/r/20210315085608.16010-3-zhangqing@rock-chips.com Signed-off-by: Heiko Stuebner commit 8b488ef295f206885dbe48de09346059df620dfa Author: Dmitry Osipenko Date: Sat Mar 20 19:23:44 2021 -0700 Input: atmel_mxt_ts - support wakeup methods According to datasheets, chips like mXT1386 have a WAKE line, it is used to wake the chip up from deep sleep mode before communicating with it via the I2C-compatible interface. If the WAKE line is connected to a GPIO line, the line must be asserted 25 ms before the host attempts to communicate with the controller. If the WAKE line is connected to the SCL pin, the controller will send a NACK on the first attempt to address it, the host must then retry 25 ms later. Implement the wake-up methods in the driver. Touchscreen now works properly on devices like Acer A500 tablet, fixing problems like this: atmel_mxt_ts 0-004c: __mxt_read_reg: i2c transfer failed (-121) atmel_mxt_ts 0-004c: mxt_bootloader_read: i2c recv failed (-121) atmel_mxt_ts 0-004c: Trying alternate bootloader address atmel_mxt_ts 0-004c: mxt_bootloader_read: i2c recv failed (-121) atmel_mxt_ts: probe of 0-004c failed with error -121 Reviewed-by: Linus Walleij Signed-off-by: Jiada Wang Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210302102158.10533-3-digetx@gmail.com Signed-off-by: Dmitry Torokhov commit ae4c86a024f634d5523e048a68635ae62765fcc4 Author: Dmitry Osipenko Date: Sat Mar 20 19:19:58 2021 -0700 dt-bindings: input: atmel_mxt_ts: Document atmel,wakeup-method and WAKE line GPIO Some Atmel touchscreen controllers have a WAKE line that needs to be asserted low in order to wake up controller from a deep sleep. Document the wakeup methods and the new GPIO properties. Reviewed-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210302102158.10533-2-digetx@gmail.com Signed-off-by: Dmitry Torokhov commit 4895bfe91199e19fd6bc9b43307cf4adb0409746 Author: edison.jiang Date: Fri Mar 19 20:56:00 2021 -0700 Input: lpc32xx_ts - convert to use BIT() There is error from cppcheck tool. "Shifting signed 32-bit value by 31 bits is undefined behaviour errors" Signed-off-by: edison.jiang Link: https://lore.kernel.org/r/20210316153150.1207-1-jzp0409@163.com Signed-off-by: Dmitry Torokhov commit a1e6f641e3075fa83403c699e64623ae272080e2 Author: Vladimir Oltean Date: Sun Mar 21 01:04:45 2021 +0200 Revert "net: dsa: sja1105: Clear VLAN filtering offload netdev feature" This reverts commit e9bf96943b408e6c99dd13fb01cb907335787c61. The topic of the reverted patch is the support for switches with global VLAN filtering, added by commit 061f6a505ac3 ("net: dsa: Add ndo_vlan_rx_{add, kill}_vid implementation"). Be there a switch with 4 ports swp0 -> swp3, and the following setup: ip link add br0 type bridge vlan_filtering 1 ip link set swp0 master br0 ip link set swp1 master br0 What would happen with VLAN-tagged traffic received on standalone ports swp2 and swp3? Well, it would get dropped, were it not for the .ndo_vlan_rx_add_vid and .ndo_vlan_rx_kill_vid implementations (called from vlan_vid_add and vlan_vid_del respectively). Basically, for DSA switches where VLAN filtering is a global attribute, we enforce the standalone ports to have 'rx-vlan-filter: off [fixed]' in their ethtool features, which lets the user know that all VLAN-tagged packets that are not explicitly added in the RX filtering list are dropped. As for the sja1105 driver, at the time of the reverted patch, it was operating in a pretty handicapped mode when it had ports under a bridge with vlan_filtering=1. Specifically, it was unable to terminate traffic through the CPU port (for further explanation see "Traffic support" in Documentation/networking/dsa/sja1105.rst). However, since then, the sja1105 driver has made considerable progress, and that limitation is no longer as severe now. Specifically, since commit 2cafa72e516f ("net: dsa: sja1105: add a new best_effort_vlan_filtering devlink parameter"), the driver is able to perform CPU termination even when some ports are under bridges with vlan_filtering=1. Then, since commit 8841f6e63f2c ("net: dsa: sja1105: make devlink property best_effort_vlan_filtering true by default"), this even became the default operating mode. So we can now take advantage of the logic in the DSA core. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit dc4aa50b13f1d33fdd813b56bb414714268025ad Author: Heiner Kallweit Date: Sat Mar 20 23:14:28 2021 +0100 r8169: add support for ethtool get_ringparam Add support for the ethtool get_ringparam operation. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit e0e7af0d275c0149bf6bb69f037ed51b1539684c Merge: b29648ad5b2ad b259cc2a036fc Author: David S. Miller Date: Sat Mar 20 18:56:18 2021 -0700 Merge branch 'ipa-cfg-data-updates' Alex Elder says: ==================== net: ipa: more configuration data updates This series starts with two patches that should have been included in an earlier series. With these in place, QSB settings are programmed from information found in the data files rather than being embedded in code. Support is then added for reprenting another QSB property (supported for IPA v4.0+). The third patch updates the definition of the sequencer type used for an endpoint. Previously a set of 2-byte symbols with fairly long names defined the sequencer type, but now those are broken into 1-byte halves whose names are a little more informative. The fourth patch moves the sequencer type definition so it only applies to TX endpoints (they aren't valid for RX endpoints). And the last makes some minor documentation updates. ==================== Signed-off-by: David S. Miller commit b259cc2a036fc5cead5e838aa8e0c660299c4eef Author: Alex Elder Date: Sat Mar 20 10:57:07 2021 -0500 net: ipa: update some comments in "ipa_data.h" Fix/expand some comments in "ipa_data.h". Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 1690d8a75d873bf3c45ddce319f4902956d84bb0 Author: Alex Elder Date: Sat Mar 20 10:57:06 2021 -0500 net: ipa: sequencer type is for TX endpoints only We only program the sequencer type for TX endpoints. So move the definition of the sequencer type fields into the TX-specific portion of the endpoint configuration data. There's no need to maintain this in the IPA structure; we can extract it from the configuration data it points to in the one spot it's needed. We previously specified the sequencer type for RX endpoints with INVALID values. These are no longer needed, so get rid of them. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8ee5df6598ff3c04f3842c87fa326d7cdbec9dd2 Author: Alex Elder Date: Sat Mar 20 10:57:05 2021 -0500 net: ipa: split sequencer type in two An IPA endpoint has a sequencer that must be configured based on how the endpoint is to be used. Currently the IPA code programs the sequencer type by splitting a value into four 4-bit nibbles. Doing that doesn't really add much value, and regardless, a better way of splitting the sequencer type is into two halves--the lower byte describing how normal packet processing is handled, and the next byte describing information about processing replicas. So split the sequencer type into two sub-parts: the sequencer type and the replication sequencer type. Define the values supported for the "main" sequencer type, and define the values supported for the replication part separately. In addition, the sequencer type names are quite verbose, encoding what the type includes, but also what it *excludes*. Rename the sequencer types in a way that mainly describes the number of passes that a packet takes through the IPA processing pipeline, and how many of those passes end by supplying the processed packet to the microprocessor. The result expands the supported types beyond what is required for now, but simplifies the way these are defined. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit b9aa0805ed31ed95c720f1a0bb606de2988b3ef5 Author: Alex Elder Date: Sat Mar 20 10:57:04 2021 -0500 net: ipa: implement MAX_READS_BEATS QSB data Starting with IPA v4.0, a limit is placed on the number of bytes outstanding in a transaction, to reduce latency. The limit is imposed only if this value is non-zero. We don't use a non-zero value for SC7180, but newer versions of IPA do. Prepare for that by allowing a programmed value to be specified in the platform configuration data. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8a81efac9417b7e4b2d3e19442f22dcf727944d5 Author: Alex Elder Date: Sat Mar 20 10:57:03 2021 -0500 net: ipa: use configuration data for QSB settings Use the QSB configuration data in ipa_hardware_config_qsb(), rather than determining in code what values to use based on IPA version. Pass configuration data to ipa_hardware_config() so it can be passed to ipa_hardware_config_qsb(). Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit b29648ad5b2ade03edd3f4364b5616b07d74abe4 Author: Sai Kalyaan Palla Date: Sat Mar 20 11:45:12 2021 +0530 net: decnet: Fixed multiple coding style issues Made changes to coding style as suggested by checkpatch.pl changes are of the type: open brace '{' following struct go on the same line do not use assignment in if condition Signed-off-by: Sai Kalyaan Palla Signed-off-by: David S. Miller commit 9d786beb6fe5cf8fcc1ce5336a89401eaa444fb6 Author: Al Viro Date: Fri Jan 29 18:03:26 2021 -0500 ecryptfs: ecryptfs_dentry_info->crypt_stat is never used ... and never had anything non-NULL stored into it. Signed-off-by: Al Viro commit 483bc7e82ccfc11a785a719f4e971db16ffa29ff Author: Al Viro Date: Fri Jan 29 18:00:59 2021 -0500 ecryptfs: get rid of unused accessors Signed-off-by: Al Viro commit b2648d512eb2a8188cf3cf5ac75c129be2d33121 Author: Al Viro Date: Fri Jan 29 17:35:43 2021 -0500 ecryptfs: saner API for lock_parent() Switch all users of lock_parent() to the approach used by ->unlink() and ->rmdir() - instead of playing with dget_parent() of underlying dentry of child, * start with ecryptfs dentry of child. * find underlying dentries for that dentry and its parent (which is stable, since the parent directory in upper layer is held at least shared). No need to pin them, they are already pinned by ecryptfs dentries. * lock the inode of undelying directory of parent * check if it's the parent of underlying dentry of child. ->d_parent of underlying dentry of child might be unstable. However, result of its comparison with underlying dentry of parent *is* stable now. Turn that into replacement of lock_parent(), convert the existing callers of lock_parent() to that, along with ecryptfs_unlink() and ecryptfs_rmdir(). Callers need only the underlying dentry of child and inode of underlying dentry of parent, so lock_parent() passes those to the caller now. Note that underlying directory is locked in any case, success or failure. That approach does not need a primitive for unlocking - we hadn't grabbed any dentry references, so all we need is to unlock the underlying directory inode. Signed-off-by: Al Viro commit 18507b8f63101949f4a931fc904c37ea10407f7c Author: Greg Kroah-Hartman Date: Thu Mar 18 10:33:15 2021 +0100 staging: wimax: delete from the tree. As stated in f54ec58fee83 ("wimax: move out to staging"), the wimax code is dead with no known users. It has stayed in staging for 5 months, with no one willing to take up the codebase for maintance and support, so let's just remove it entirely for now. If someone comes along and wants to revive it, a simple revert of this patch is a good place to start. Cc: Jakub Kicinski Cc: Arnd Bergmann Cc: Johannes Berg Cc: Randy Dunlap Cc: "David S. Miller" Cc: "Gustavo A. R. Silva" Cc: Wang Hai Cc: Lee Jones Cc: Colin Ian King Cc: Anirudh Rayabharam Cc: Kumar Kartikeya Dwivedi Cc: Hemansh Agnihotri Cc: Ayush Cc: Xin Tan Cc: Xiyu Yang Cc: Shannon Nelson Link: https://lore.kernel.org/r/20210318093315.694404-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 6da2f76058a95bf9b9bd9c7c47a054a15de391c0 Author: Paul McQuade Date: Fri Mar 19 14:42:06 2021 +0000 staging: rtl8188eu: Removed Unnecessary logging fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace Signed-off-by: Paul McQuade Link: https://lore.kernel.org/r/20210319144206.23439-1-paulmcquad@gmail.com Signed-off-by: Greg Kroah-Hartman commit 105949497a559adfd36d3e583eda3b2cd8bbd6d1 Author: Lee Gibson Date: Fri Mar 19 08:58:36 2021 +0000 staging: rtl8712: Fix a possible NULL pointer dereference in function r8712_joinbss_event_callback GCC 10 analyzer reports a warning: dereference of NULL The function r8712_find_network can return NULL and is usually checked but no check is present is this case. Fix by adding the check. Signed-off-by: Lee Gibson Link: https://lore.kernel.org/r/20210319085836.8259-1-leegib@gmail.com Signed-off-by: Greg Kroah-Hartman commit 62a19328c4b5753ed087672c1415828748a59d97 Author: Fabio Aiuto Date: Thu Mar 18 16:26:10 2021 +0100 staging: rtl8723bs: remove unnecessary logging in os_dep/wifi_regd.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 153: FILE: drivers/staging/rtl8723bs/os_dep/wifi_regd.c:153: + DBG_8192C("%s\n", __func__); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-16-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0e9cd946307cfea75e7c4a3c82ab58e77d0d8a6f Author: Fabio Aiuto Date: Thu Mar 18 16:26:09 2021 +0100 staging: rtl8723bs: remove unnecessary logging in os_dep/os_intfs.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 977: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:977: + DBG_871X("===> %s.........\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1030: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1030: + DBG_871X("====> %s...\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1127: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1127: + DBG_871X("===> %s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1177: FILE: drivers/staging/rtl8723bs/os_dep/os_intfs.c:1177: + DBG_871X("<=== %s\n", __func__); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-15-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit eab7271608603a5087871bf515f7b4a35131cd0d Author: Fabio Aiuto Date: Thu Mar 18 16:26:08 2021 +0100 staging: rtl8723bs: remove unnecessary logging in os_dep/ioctl_linux.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1207: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1207: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1507: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1507: + DBG_871X("=>%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 3390: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3390: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 3687: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:3687: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 4143: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:4143: + /* DBG_871X("%s\n", __func__); */ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-14-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 353673e0c012172e72cc95322efe604583e7ff7e Author: Fabio Aiuto Date: Thu Mar 18 16:26:06 2021 +0100 staging: rtl8723bs: remove unnecessary logging in hal/rtl8723b_hal_init.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1685: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1685: +/* DBG_8192C("%s\n", __func__); */ -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1722: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1722: +/* DBG_8192C("%s\n", __func__); */ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-12-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0798fb1388d65c19cc55aa0a85b6a42798d929f9 Author: Fabio Aiuto Date: Thu Mar 18 16:26:04 2021 +0100 staging: rtl8723bs: remove unnecessary logging in hal/odm_debug.h fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 134: FILE: drivers/staging/rtl8723bs/hal/odm_debug.h:134: +#define ODM_dbg_enter() { DbgPrint("==> %s\n", __func__); } -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 135: FILE: drivers/staging/rtl8723bs/hal/odm_debug.h:135: +#define ODM_dbg_exit() { DbgPrint("<== %s\n", __func__); } and removed containing unused macros Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-10-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5eff6c3c388f1bcf3cbf19918f5a3378548bf199 Author: Fabio Aiuto Date: Thu Mar 18 16:26:03 2021 +0100 staging: rtl8723bs: remove unnecessary logging in hal/odm.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1109: FILE: drivers/staging/rtl8723bs/hal/odm.c:1109: + /* printk("==> %s\n", __func__); */ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-9-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit c173bf140684977e440efc12733c91af5abb6371 Author: Fabio Aiuto Date: Thu Mar 18 16:26:02 2021 +0100 staging: rtl8723bs: remove unnecessary logging in hal/hal_com_phycfg.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 201: FILE: drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:201: + /* DBG_871X("===>%s\n", __func__); */ -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 265: FILE: drivers/staging/rtl8723bs/hal/hal_com_phycfg.c:265: + /* DBG_871X("<===%s\n", __func__); */ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-8-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4956e4d0822f8347fd549c2a6a2fd4eca33d8454 Author: Fabio Aiuto Date: Thu Mar 18 16:26:01 2021 +0100 staging: rtl8723bs: remove unnecessary logging in hal/HalBtcOutSrc.h fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 126: FILE: drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h:126: + DbgPrint("%s(): ", __func__);\ and remove the whole unused containing macro BTC_PRINT_F Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-7-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit df2d8943535b124f08a321e56c80bc24bcee4b3b Author: Fabio Aiuto Date: Thu Mar 18 16:26:00 2021 +0100 staging: rtl8723bs: remove unnecessary logging in core/rtw_wlan_util.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1140: FILE: drivers/staging/rtl8723bs/core/rtw_wlan_util.c:1140: + DBG_871X("%s\n", __func__); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-6-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9a884db84d20cfbf46211656e72081fae69bdf7a Author: Fabio Aiuto Date: Thu Mar 18 16:25:59 2021 +0100 staging: rtl8723bs: remove unnecessary logging in core/rtw_pwrctrl.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 185: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:185: + DBG_871X("==>%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 606: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:606: + DBG_871X("%s.....\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 753: FILE: drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:753: + /* DBG_871X("%s\n", __func__); */ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-5-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81ff14a398a88b04335d4b1aae7c64e3438b7762 Author: Fabio Aiuto Date: Thu Mar 18 16:25:58 2021 +0100 staging: rtl8723bs: remove unnecessary logging in core/rtw_mlme_ext.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 987: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:987: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1115: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1115: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1547: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1547: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1760: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1760: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1813: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:1813: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 2340: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2340: + /* DBG_871X("%s\n", __func__); */ -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 2499: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2499: + /* DBG_871X("%s\n", __func__); */ -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 2948: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2948: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 2969: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:2969: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 3445: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3445: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 3677: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3677: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 3915: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:3915: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 4599: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:4599: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 5355: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5355: + DBG_871X("=>%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 5366: FILE: drivers/staging/rtl8723bs/core/rtw_mlme_ext.c:5366: + DBG_871X("%s\n", __func__); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-4-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9a945e18de3b567fe055bbbcf62852080a5a6475 Author: Fabio Aiuto Date: Thu Mar 18 16:25:57 2021 +0100 staging: rtl8723bs: remove unnecessary logging in core/rtw_mlme.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1134: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1134: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1223: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1223: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1528: FILE: drivers/staging/rtl8723bs/core/rtw_mlme.c:1528: + DBG_871X("%s\n", __func__); Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-3-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4faef7d225a43be03ece49277db929dd04179088 Author: Fabio Aiuto Date: Thu Mar 18 16:25:56 2021 +0100 staging: rtl8723bs: remove unnecessary logging in core/rtw_ap.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 66: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:66: + /* DBG_871X("%s\n", __func__); */ -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 559: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:559: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 716: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:716: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 770: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:770: + /* DBG_871X("%s\n", __func__); */ -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1476: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1476: + /* DBG_871X("%s\n", __func__); */ -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1531: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1531: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1557: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1557: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1564: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1564: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1609: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1609: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1614: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1614: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1619: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1619: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1624: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1624: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1629: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1629: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1647: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1647: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1716: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1716: + DBG_871X("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1740: FILE: drivers/staging/rtl8723bs/core/rtw_ap.c:1740: + /* DBG_871X("%s\n", __func__); */ Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210318152610.16758-2-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6be7952f18e9fbc0ced5f6fa6745c63971215e84 Author: Fabio Aiuto Date: Fri Mar 19 11:09:23 2021 +0100 staging: rtl8723bs: remove unnecessary logging in os_dep/ioctl_cfg80211.c fix the following checkpatch.pl issues: WARNING: Unnecessary ftrace-like logging - prefer using ftrace 239: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:239: + /* DBG_8192C("%s\n", __func__); */ -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 569: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:569: + DBG_8192C("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 854: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854: + DBG_8192C("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1408: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1408: + DBG_8192C("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 1645: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1645: + DBG_8192C("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 2222: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2222: + DBG_8192C("%s\n", __func__); -- WARNING: Unnecessary ftrace-like logging - prefer using ftrace 2230: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2230: + DBG_8192C("%s\n", __func__); Changes in v2: removed empty #ifdef block Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210319100923.4314-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2e747fef26a5a44de52605be65e12a4b3b205304 Author: Bhaskar Chowdhury Date: Sat Mar 20 01:04:14 2021 +0530 staging: rtl8188eu: Fix couple of typos s/pasive/passive/ s/varable/variable/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210319193414.10393-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit a331f5fdd36dba1ffb0239a4dfaaf1df91ff1aab Author: Tony Luck Date: Fri Mar 19 10:39:19 2021 -0700 x86/mce: Add Xeon Sapphire Rapids to list of CPUs that support PPIN New CPU model, same MSRs to control and read the inventory number. Signed-off-by: Tony Luck Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210319173919.291428-1-tony.luck@intel.com commit 38eaef2dca4ec8dfb9ea84d9dde0f76da5c8caaa Author: Rex-BC Chen Date: Thu Mar 18 13:40:56 2021 +0800 drm/mediatek: dpi: Add config for mt8192 Add dpi config setting and compatible for MT8192. Signed-off-by: Rex-BC Chen Signed-off-by: Jitao Shi Signed-off-by: Chun-Kuang Hu commit 44b07120291c4b7a6722ccb7149f6b9d938cf5a2 Author: Rex-BC Chen Date: Thu Mar 18 13:40:55 2021 +0800 drm/mediatek: dpi: Add check for max clock rate in mode_valid Add per-platform max clock rate check in mtk_dpi_bridge_mode_valid. Signed-off-by: Pi-Hsun Shih Signed-off-by: Rex-BC Chen Signed-off-by: Jitao Shi Signed-off-by: Chun-Kuang Hu commit bfae2779fe4b92421fbe1b2008bfd6b9fada823e Author: Johan Hovold Date: Fri Mar 19 20:35:58 2021 -0700 Input: ims-pcu - drop redundant driver-data assignment The driver data for the data interface has already been set by usb_driver_claim_interface() so drop the subsequent redundant assignment. Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20210318155525.22496-1-johan@kernel.org Signed-off-by: Dmitry Torokhov commit 9ef05281e5d01dffdf75a4ae5c1aee7cbd7aaa73 Author: Jianlin Lv Date: Thu Mar 18 10:48:51 2021 +0800 bpf: Remove insn_buf[] declaration in inner block Two insn_buf[16] variables are declared in the function which acts on function scope and block scope respectively. The statement in the inner block is redundant, so remove it. Signed-off-by: Jianlin Lv Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210318024851.49693-1-Jianlin.Lv@arm.com commit c93a5e20c3c2dabef8ea360a3d3f18c6f68233ab Author: Vitaly Kuznetsov Date: Fri Mar 19 12:18:23 2021 +0100 genirq/matrix: Prevent allocation counter corruption When irq_matrix_free() is called for an unallocated vector the managed_allocated and total_allocated counters get out of sync with the real state of the matrix. Later, when the last interrupt is freed, these counters will underflow resulting in UINTMAX because the counters are unsigned. While this is certainly a problem of the calling code, this can be catched in the allocator by checking the allocation bit for the to be freed vector which simplifies debugging. An example of the problem described above: https://lore.kernel.org/lkml/20210318192819.636943062@linutronix.de/ Add the missing sanity check and emit a warning when it triggers. Suggested-by: Thomas Gleixner Signed-off-by: Vitaly Kuznetsov Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210319111823.1105248-1-vkuznets@redhat.com commit d773b7957e4fd7b732a163df0e59d31ad4237302 Merge: 919067cc845f3 f2d75b1785320 Author: David S. Miller Date: Fri Mar 19 14:24:58 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2021-03-19 This series contains updates to igc and e1000e drivers. Sasha removes unused defines in igc driver. Jiapeng Zhong changes bool assignments from 0/1 to false/true for igc. Wei Yongjun marks e1000e_pm_prepare() as __maybe_unused to resolve a defined but not used warning under certain configurations. ==================== Signed-off-by: David S. Miller commit ea24b19562fe5f72c78319dbb347b701818956d9 Author: KP Singh Date: Fri Mar 19 19:21:17 2021 +0000 libbpf: Add explicit padding to btf_dump_emit_type_decl_opts Similar to https://lore.kernel.org/bpf/20210313210920.1959628-2-andrii@kernel.org/ When DECLARE_LIBBPF_OPTS is used with inline field initialization, e.g: DECLARE_LIBBPF_OPTS(btf_dump_emit_type_decl_opts, opts, .field_name = var_ident, .indent_level = 2, .strip_mods = strip_mods, ); and compiled in debug mode, the compiler generates code which leaves the padding uninitialized and triggers errors within libbpf APIs which require strict zero initialization of OPTS structs. Adding anonymous padding field fixes the issue. Fixes: 9f81654eebe8 ("libbpf: Expose BTF-to-C type declaration emitting API") Suggested-by: Andrii Nakryiko Signed-off-by: KP Singh Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210319192117.2310658-1-kpsingh@kernel.org commit f2d75b178532087c15b2a86ec79e443177611b7a Author: Wei Yongjun Date: Wed Mar 17 14:52:34 2021 +0000 e1000e: Mark e1000e_pm_prepare() as __maybe_unused The function e1000e_pm_prepare() may have no callers depending on configuration, so it must be marked __maybe_unused to avoid harmless warning: drivers/net/ethernet/intel/e1000e/netdev.c:6926:12: warning: 'e1000e_pm_prepare' defined but not used [-Wunused-function] 6926 | static int e1000e_pm_prepare(struct device *dev) | ^~~~~~~~~~~~~~~~~ Fixes: ccf8b940e5fd ("e1000e: Leverage direct_complete to speed up s2ram") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Tony Nguyen commit 501f23092ddb2e071a3464db6744e92c22535c6e Author: Jiapeng Zhong Date: Wed Jan 20 14:22:58 2021 +0800 igc: Assign boolean values to a bool variable Fix the following coccicheck warnings: ./drivers/net/ethernet/intel/igc/igc_main.c:4961:2-14: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4955:2-14: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4933:1-13: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4592:1-24: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4438:2-25: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4396:2-25: WARNING: Assignment of 0/1 to bool variable. ./drivers/net/ethernet/intel/igc/igc_main.c:4018:2-25: WARNING: Assignment of 0/1 to bool variable. Reported-by: Abaci Robot Signed-off-by: Jiapeng Zhong Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit a5d86bd969ea8501cb2e551d3ec8321867bce126 Author: Sasha Neftin Date: Sun Feb 14 09:17:49 2021 +0200 igc: Remove unused MII_CR_LOOPBACK MII_CR_LOOPBACK masks not in use in i225 device and can be removed. Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 1fa81e259b49479fc54658a6e6c3ff629e35777a Author: Sasha Neftin Date: Sun Jan 17 10:16:45 2021 +0200 igc: Remove unused MII_CR_SPEED Force PHY speed not supported for i225 devices. MII_CR_SPEED masks not in use in i225 device and can be removed. Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 919067cc845f323a80b6fe987b64238bd82d309e Author: Eric Dumazet Date: Fri Mar 19 10:39:33 2021 -0700 net: add CONFIG_PCPU_DEV_REFCNT I was working on a syzbot issue, claiming one device could not be dismantled because its refcount was -1 unregister_netdevice: waiting for sit0 to become free. Usage count = -1 It would be nice if syzbot could trigger a warning at the time this reference count became negative. This patch adds CONFIG_PCPU_DEV_REFCNT options which defaults to per cpu variables (as before this patch) on SMP builds. v2: free_dev label in alloc_netdev_mqs() is moved to avoid a compiler warning (-Wunused-label), as reported by kernel test robot Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller commit 942f0c6e28edc627658732b9f225a602cbaa8f8e Merge: 96a2be5139367 37537fa8e9737 Author: David S. Miller Date: Fri Mar 19 13:35:54 2021 -0700 Merge branch 'ipa-update-config-data' Alex Elder says: ==================== net: ipa: update configuration data Each IPA version has a "data" file defining how various things are configured. This series gathers a few updates to this information: - The first patch makes all configuration data constant - The second fixes an incorrect (but seemingly harmless) value - The third simplifies things a bit by using implicit zero initialization for memory regions that are empty - The fourth adds definitions for memory regions that exist but are not yet used - The fifth use configuration data rather than conditional code to set some bus parameters ==================== commit 37537fa8e97379afa68959094242b1601407e205 Author: Alex Elder Date: Fri Mar 19 10:24:22 2021 -0500 net: ipa: define QSB limits in configuration data Define the maximum number of reads and writes to configure for the QSB masters used for IPA in configuration data. We don't use these values yet; the next commit takes care of that. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 2ef88644e5d4a81c21d18532529195012e14566f Author: Alex Elder Date: Fri Mar 19 10:24:21 2021 -0500 net: ipa: define some new memory regions There are several memory regions that are defined starting with IPA v4.0, but which were not used for the SC7180 SoC (IPA v4.2). Even though they're not used (yet), define them so they are ready to be used for SoCs when they become supported. There are two QUOTA statistics memory regions, one for the modem and one for the AP. Define distinct names for these regions, and get rid of the definition of IPA_MEM_STATS_QUOTA. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 8f692169b13843532a9eae5ad7de692223c85b7f Author: Alex Elder Date: Fri Mar 19 10:24:20 2021 -0500 net: ipa: don't define empty memory regions The AP_HEADER memory region for both the SDM845 and SC7180 SoCs has zero size, and has no canaries. Defining an offset for such a zero-length region is not meaningful, so it's better not to define it at all. The size of this region is used in the code, but its value will still be zero because the memory regions are defined in statically initialized memory. For the SC7180, the STATS_DROP memory region has a zero size and no canaries as well. These regions are the only place where a zero-sized region is defined despite having no canaries. Remove them. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 22e3b314302c004bb216ed742e912e866b6d31a6 Author: Alex Elder Date: Fri Mar 19 10:24:19 2021 -0500 net: ipa: fix canary count for SC7180 UC_INFO region There should be no canary values written before the beginning of the UC_INFO memory region. This was correct for SDM845, but somehow was committed with the wrong value for SC7180. This bug seems to cause no harm, so we'll just correct it without back-porting. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e4a9f45b0be5904b7f21b2da29b9f596f80fe95b Author: Alex Elder Date: Fri Mar 19 10:24:18 2021 -0500 net: ipa: make all configuration data constant All of the platform configuration data should be constant, but that isn't the case for the memory regions, interconnects, and clocks. Fix this. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit a4e39b999a584a3f6e5098eec06b7d37d492eeb1 Author: Sasha Neftin Date: Mon Jan 11 07:17:53 2021 +0200 igc: Remove unused MII_CR_RESET MII_CR_RESET mask not in use in i225 device and can be removed Signed-off-by: Sasha Neftin Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 96a2be51393675c85563595c87a4be96f304a1b3 Merge: c54f042dcc1b2 36d021d1049f2 Author: David S. Miller Date: Fri Mar 19 12:17:31 2021 -0700 Merge branch 'mscc-VSC8584-fixes' Bjarni Jonasson says: ==================== Fixes applied to VCS8584 family Three different fixes applied to VSC8584 family: 1. LCPLL reset 2. Serdes calibration 3. Coma mode disabled The same fixes has already been applied to VSC8514 and most of the functionality can be reused for the VSC8584. v1 -> v2: Preserved reversed christmas tree ==================== Signed-off-by: David S. Miller commit 36d021d1049f252c2bc1e20123b4cce9e9dc60af Author: Bjarni Jonasson Date: Fri Mar 19 14:29:05 2021 +0100 net: phy: mscc: coma mode disabled for VSC8584 This patch releases coma mode for VSC8584 as done for VSC8514 in commit ca0d7fd0a58d ("net: phy: mscc: coma mode disabled for VSC8514") Fixes: a5afc1678044a ("net: phy: mscc: add support for VSC8584 PHY.") Signed-off-by: Bjarni Jonasson Signed-off-by: David S. Miller commit 23d12335752fc08877d64719a679723d7e0a3962 Author: Bjarni Jonasson Date: Fri Mar 19 14:29:04 2021 +0100 net: phy: mscc: improved serdes calibration applied to VSC8584 Introduced 'FOJI' serdes calibration in commit 85e97f0b984e ("net: phy: mscc: improved serdes calibration applied to VSC8514") Now including the VSC8584 family. Fixes: a5afc1678044a ("net: phy: mscc: add support for VSC8584 PHY.") Signed-off-by: Bjarni Jonasson Signed-off-by: David S. Miller commit df4771783d6447b9c260bbb2692af15c4046c15b Author: Bjarni Jonasson Date: Fri Mar 19 14:29:03 2021 +0100 net: phy: mscc: Applying LCPLL reset to VSC8584 Introduced LCPLL reset in commit d15e08d9fb82 ("net: phy: mscc: adding LCPLL reset to VSC8514"). Now applying this reset to the VSC8584 phy familiy. Fixes: a5afc1678044a ("net: phy: mscc: add support for VSC8584 PHY.") Signed-off-by: Bjarni Jonasson Signed-off-by: David S. Miller commit c54f042dcc1b258ad15d2be0f0b3ba371f758329 Author: Vladimir Oltean Date: Fri Mar 19 12:08:06 2021 +0200 net: enetc: teardown CBDR during PF/VF unbind Michael reports that after the blamed patch, unbinding a VF would cause these transactions to remain pending, and trigger some warnings with the DMA API debug: $ echo 1 > /sys/bus/pci/devices/0000\:00\:00.0/sriov_numvfs pci 0000:00:01.0: [1957:ef00] type 00 class 0x020001 fsl_enetc_vf 0000:00:01.0: Adding to iommu group 19 fsl_enetc_vf 0000:00:01.0: enabling device (0000 -> 0002) fsl_enetc_vf 0000:00:01.0 eno0vf0: renamed from eth0 $ echo 0 > /sys/bus/pci/devices/0000\:00\:00.0/sriov_numvfs DMA-API: pci 0000:00:01.0: device driver has pending DMA allocations while released from device [count=1] One of leaked entries details: [size=2048 bytes] [mapped with DMA_BIDIRECTIONAL] [mapped as coherent] WARNING: CPU: 0 PID: 2547 at kernel/dma/debug.c:853 dma_debug_device_change+0x174/0x1c8 (...) Call trace: dma_debug_device_change+0x174/0x1c8 blocking_notifier_call_chain+0x74/0xa8 device_release_driver_internal+0x18c/0x1f0 device_release_driver+0x20/0x30 pci_stop_bus_device+0x8c/0xe8 pci_stop_and_remove_bus_device+0x20/0x38 pci_iov_remove_virtfn+0xb8/0x128 sriov_disable+0x3c/0x110 pci_disable_sriov+0x24/0x30 enetc_sriov_configure+0x4c/0x108 sriov_numvfs_store+0x11c/0x198 (...) DMA-API: Mapped at: dma_entry_alloc+0xa4/0x130 debug_dma_alloc_coherent+0xbc/0x138 dma_alloc_attrs+0xa4/0x108 enetc_setup_cbdr+0x4c/0x1d0 enetc_vf_probe+0x11c/0x250 pci 0000:00:01.0: Removing from iommu group 19 This happens because stupid me moved enetc_teardown_cbdr outside of enetc_free_si_resources, but did not bother to keep calling enetc_teardown_cbdr from all the places where enetc_free_si_resources was called. In particular, now it is no longer called from the main unbind function, just from the probe error path. Fixes: 4b47c0b81ffd ("net: enetc: don't initialize unused ports from a separate code path") Reported-by: Michael Walle Signed-off-by: Vladimir Oltean Tested-by: Michael Walle Signed-off-by: David S. Miller commit 745740ac56b8e468bbfa83d6fa7015177cc21a91 Author: Colin Ian King Date: Fri Mar 19 09:54:53 2021 +0000 octeontx2-pf: Fix spelling mistake "ratelimitter" -> "ratelimiter" There is a spelling mistake in an error message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 140960564d6376fe6b702574a64434a7bc8f085c Author: Wei Yongjun Date: Fri Mar 19 09:41:03 2021 +0000 octeontx2-pf: Fix missing spin_lock_init() in otx2_tc_add_flow() The driver allocates the spinlock but not initialize it. Use spin_lock_init() on it to initialize it correctly. Fixes: d8ce30e0cf76 ("octeontx2-pf: add tc flower stats handler for hw offloads") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller commit b498ee3f7613f5ed1deac40451486274fc93fe30 Author: Heiner Kallweit Date: Fri Mar 19 09:58:36 2021 +0100 r8169: use lower_32_bits/upper_32_bits macros Use the lower_32_bits/upper_32_bits macros to simplify the code. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller commit fc72d4773c6b2ed860e69c646c9f3b9b9e38ad45 Author: David S. Miller Date: Fri Mar 19 12:02:54 2021 -0700 hinic: Remove unused variable. drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c: In function ‘mgmt_recv_msg_handler’: drivers/net/ethernet/huawei/hinic/hinic_hw_mgmt.c:443:18: warning: unused variable ‘pdev’ [-Wunused-variable] 443 | struct pci_dev *pdev = pf_to_mgmt->hwif->pdev; | ^~~~ Signed-off-by: David S. Miller commit 3674d0539ffa05e3a5faa8ad8e2b1a2d17e21ef1 Merge: a9d6df642dc83 79d65cab7f853 Author: David S. Miller Date: Fri Mar 19 11:53:17 2021 -0700 Merge branch 'hinic-cleanups' Daode Huang says: ==================== net: hinic; make some cleanup for hinic This set try to remove the unnecessary output message, add a blank line, remove the dupliate word and change the deprecated strlcp functions in hinic driver, for details, please refer to each patch. ==================== Signed-off-by: David S. Miller commit 79d65cab7f8535d7e19a16651aa45ea674cf4069 Author: Daode Huang Date: Fri Mar 19 14:36:25 2021 +0800 net: hinic: convert strlcpy to strscpy Usage of strlcpy in linux kernel has been recently deprecated[1], so convert hinic driver to strscpy [1] https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL =V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Daode Huang Signed-off-by: David S. Miller commit e2f84fd17557ab3b0e8a2fcc98bc5133ee89a495 Author: Daode Huang Date: Fri Mar 19 14:36:24 2021 +0800 net: hinic: remove the repeat word "the" in comment. There is a duplicate "the" in the comment, so delete it. Signed-off-by: Daode Huang Signed-off-by: David S. Miller commit 44401b677a52d6e425e6e948dd6e65c720dc66c6 Author: Daode Huang Date: Fri Mar 19 14:36:23 2021 +0800 net: hinic: add a blank line after declarations There should be a blank line after declarations, so just add it. Signed-off-by: Daode Huang Signed-off-by: David S. Miller commit c199fdb8abf558e330e3d13244b7c4593956329b Author: Daode Huang Date: Fri Mar 19 14:36:22 2021 +0800 net: hinic: Remove unnecessary 'out of memory' message This patch removes unnecessary out of memory message in hinic driver, fixes the following checkpatch.pl warning: "WARNING: Possible unnecessary 'out of memory' message" Signed-off-by: Daode Huang Signed-off-by: David S. Miller commit 59511cfd08f32d0e9d363ffa0fdaaa75afdc52b1 Author: Ard Biesheuvel Date: Wed Mar 10 11:49:42 2021 +0100 arm64: mm: use XN table mapping attributes for user/kernel mappings As the kernel and user space page tables are strictly mutually exclusive when it comes to executable permissions, we can set the UXN table attribute on all table entries that are created while creating kernel mappings in the swapper page tables, and the PXN table attribute on all table entries that are created while creating user space mappings in user space page tables. While at it, get rid of a redundant comment. Reviewed-by: Anshuman Khandual Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210310104942.174584-4-ardb@kernel.org Signed-off-by: Catalin Marinas commit 87143f404f338dbf0b51374ea48ab05e598af564 Author: Ard Biesheuvel Date: Wed Mar 10 11:49:41 2021 +0100 arm64: mm: use XN table mapping attributes for the linear region The way the arm64 kernel virtual address space is constructed guarantees that swapper PGD entries are never shared between the linear region on the one hand, and the vmalloc region on the other, which is where all kernel text, module text and BPF text mappings reside. This means that mappings in the linear region (which never require executable permissions) never share any table entries at any level with mappings that do require executable permissions, and so we can set the table-level PXN attributes for all table entries that are created while setting up mappings in the linear region. Since swapper's PGD level page table is mapped r/o itself, this adds another layer of robustness to the way the kernel manages its own page tables. While at it, set the UXN attribute as well for all kernel mappings created at boot. Acked-by: Mark Rutland Signed-off-by: Ard Biesheuvel Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/20210310104942.174584-3-ardb@kernel.org Signed-off-by: Catalin Marinas commit dfe74f550810cf7480d8759956d850ce40512f7a Author: Jiri Kosina Date: Fri Mar 19 19:49:18 2021 +0100 HID: thrustmaster: introduce proper USB dependency HID_THRUSTMASTER now requires USB_HID support. Reflect that dependency in Kconfig. Fixes: c49c33637802a2c ("HID: support for initialization of some Thrustmaster wheels") Reported-by: kernel test robot Signed-off-by: Jiri Kosina commit c1fd78a77704318de34ba4b780cd99a5ef96d162 Author: Ard Biesheuvel Date: Wed Mar 10 11:49:40 2021 +0100 arm64: mm: add missing P4D definitions and use them consistently Even though level 0, 1 and 2 descriptors share the same attribute encodings, let's be a bit more consistent about using the right one at the right level. So add new macros for level 0/P4D definitions, and clean up some inconsistencies involving these macros. Acked-by: Mark Rutland Reviewed-by: Anshuman Khandual Signed-off-by: Ard Biesheuvel Link: https://lore.kernel.org/r/20210310104942.174584-2-ardb@kernel.org Signed-off-by: Catalin Marinas commit a9d6df642dc8301ee7c3f414ec08548d5c4078ff Author: Sieng Piaw Liew Date: Fri Mar 19 12:13:22 2021 +0800 atl1c: use napi_alloc_skb Using napi_alloc_skb in NAPI context avoids enable/disable IRQs, which increases iperf3 result by a few Mbps. Since napi_alloc_skb() uses NET_IP_ALIGN, convert other alloc methods to the same padding. Tested on Intel Core2 and AMD K10 platforms. Signed-off-by: Sieng Piaw Liew Signed-off-by: David S. Miller commit e75a2e02ec998a808dcd19885275f5444b146d44 Author: Sieng Piaw Liew Date: Fri Mar 19 11:59:22 2021 +0800 atl1c: switch to napi_gro_receive Changing to napi_gro_receive() improves efficiency significantly. Tested on Intel Core2-based motherboards and iperf3. Signed-off-by: Sieng Piaw Liew Signed-off-by: David S. Miller commit 5b6b827413e8a86b1f83c3a199fe639c0e292295 Author: Michael Walle Date: Thu Mar 18 20:44:31 2021 +0100 net: phy: at803x: remove at803x_aneg_done() Here is what Vladimir says about it: at803x_aneg_done() keeps the aneg reporting as "not done" even when the copper-side link was reported as up, but the in-band autoneg has not finished. That was the _intended_ behavior when that code was introduced, and Heiner have said about it [1]: | That's not nice from the PHY: | It signals "link up", and if the system asks the PHY for link details, | then it sheepishly says "well, link is *almost* up". If the specification of phy_aneg_done behavior does not include in-band autoneg (and it doesn't), then this piece of code does not belong here. The fact that we can no longer trigger this code from phylib is yet another reason why it fails at its intended (and wrong) purpose and should be removed. Removing the SGMII link check, would just keep the call to genphy_aneg_done(), which is also the fallback. Thus we can just remove at803x_aneg_done() altogether. [1] https://lore.kernel.org/netdev/fdf0074a-2572-5914-6f3e-77202cbf96de@gmail.com/ Suggested-by: Vladimir Oltean Signed-off-by: Michael Walle Reviewed-by: Heiner Kallweit Signed-off-by: David S. Miller commit 497cc00224cfaff89282ec8bfdfb8b797415f72a Author: Kurt Kanzenbach Date: Thu Mar 18 08:34:55 2021 +0100 taprio: Handle short intervals and large packets When using short intervals e.g. below one millisecond, large packets won't be transmitted at all. The software implementations checks whether the packet can be fit into the remaining interval. Therefore, it takes the packet length and the transmission speed into account. That is correct. However, for large packets it may be that the transmission time exceeds the interval resulting in no packet transmission. The same situation works fine with hardware offloading applied. The problem has been observed with the following schedule and iperf3: |tc qdisc replace dev lan1 parent root handle 100 taprio \ | num_tc 8 \ | map 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 \ | queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ | base-time $base \ | sched-entry S 0x40 500000 \ | sched-entry S 0xbf 500000 \ | clockid CLOCK_TAI \ | flags 0x00 [...] |root@tsn:~# iperf3 -c 192.168.2.105 |Connecting to host 192.168.2.105, port 5201 |[ 5] local 192.168.2.121 port 52610 connected to 192.168.2.105 port 5201 |[ ID] Interval Transfer Bitrate Retr Cwnd |[ 5] 0.00-1.00 sec 45.2 KBytes 370 Kbits/sec 0 1.41 KBytes |[ 5] 1.00-2.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes After debugging, it seems that the packet length stored in the SKB is about 7000-8000 bytes. Using a 100 Mbit/s link the transmission time is about 600us which larger than the interval of 500us. Therefore, segment the SKB into smaller chunks if the packet is too big. This yields similar results than the hardware offload: |root@tsn:~# iperf3 -c 192.168.2.105 |Connecting to host 192.168.2.105, port 5201 |- - - - - - - - - - - - - - - - - - - - - - - - - |[ ID] Interval Transfer Bitrate Retr |[ 5] 0.00-10.00 sec 48.9 MBytes 41.0 Mbits/sec 0 sender |[ 5] 0.00-10.02 sec 48.7 MBytes 40.7 Mbits/sec receiver Furthermore, the segmentation can be skipped for the full offload case, as the driver or the hardware is expected to handle this. Signed-off-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit 4284f7acb78bfb0e0c26a2b78e2b2c3d68fccd6f Author: Dave Hansen Date: Thu Mar 18 12:43:01 2021 -0700 selftests/sgx: Improve error detection and messages The SGX device file (/dev/sgx_enclave) is unusual in that it requires execute permissions. It has to be both "chmod +x" *and* be on a filesystem without 'noexec'. In the future, udev and systemd should get updates to set up systems automatically. But, for now, nobody's systems do this automatically, and everybody gets error messages like this when running ./test_sgx: 0x0000000000000000 0x0000000000002000 0x03 0x0000000000002000 0x0000000000001000 0x05 0x0000000000003000 0x0000000000003000 0x03 mmap() failed, errno=1. That isn't very user friendly, even for forgetful kernel developers. Further, the test case is rather haphazard about its use of fprintf() versus perror(). Improve the error messages. Use perror() where possible. Lastly, do some sanity checks on opening and mmap()ing the device file so that we can get a decent error message out to the user. Now, if your user doesn't have permission, you'll get the following: $ ls -l /dev/sgx_enclave crw------- 1 root root 10, 126 Mar 18 11:29 /dev/sgx_enclave $ ./test_sgx Unable to open /dev/sgx_enclave: Permission denied If you then 'chown dave:dave /dev/sgx_enclave' (or whatever), but you leave execute permissions off, you'll get: $ ls -l /dev/sgx_enclave crw------- 1 dave dave 10, 126 Mar 18 11:29 /dev/sgx_enclave $ ./test_sgx no execute permissions on device file If you fix that with "chmod ug+x /dev/sgx" but you leave /dev as noexec, you'll get this: $ mount | grep "/dev .*noexec" udev on /dev type devtmpfs (rw,nosuid,noexec,...) $ ./test_sgx ERROR: mmap for exec: Operation not permitted mmap() succeeded for PROT_READ, but failed for PROT_EXEC check that user has execute permissions on /dev/sgx_enclave and that /dev does not have noexec set: 'mount | grep "/dev .*noexec"' That can be fixed with: mount -o remount,noexec /devESC Hopefully, the combination of better error messages and the search engines indexing this message will help people fix their systems until we do this properly. [ bp: Improve error messages more. ] Signed-off-by: Dave Hansen Signed-off-by: Ingo Molnar Signed-off-by: Borislav Petkov Reviewed-by: Jarkko Sakkinen Link: https://lore.kernel.org/r/20210318194301.11D9A984@viggo.jf.intel.com commit 901ddbb9ecf5425183ea0c09d10c2fd7868dce54 Author: Jarkko Sakkinen Date: Thu Mar 18 01:53:31 2021 +0200 x86/sgx: Add a basic NUMA allocation scheme to sgx_alloc_epc_page() Background ========== SGX enclave memory is enumerated by the processor in contiguous physical ranges called Enclave Page Cache (EPC) sections. Currently, there is a free list per section, but allocations simply target the lowest-numbered sections. This is functional, but has no NUMA awareness. Fortunately, EPC sections are covered by entries in the ACPI SRAT table. These entries allow each EPC section to be associated with a NUMA node, just like normal RAM. Solution ======== Implement a NUMA-aware enclave page allocator. Mirror the buddy allocator and maintain a list of enclave pages for each NUMA node. Attempt to allocate enclave memory first from local nodes, then fall back to other nodes. Note that the fallback is not as sophisticated as the buddy allocator and is itself not aware of NUMA distances. When a node's free list is empty, it searches for the next-highest node with enclave pages (and will wrap if necessary). This could be improved in the future. Other ===== NUMA_KEEP_MEMINFO dependency is required for phys_to_target_node(). [ Kai Huang: Do not return NULL from __sgx_alloc_epc_page() because callers do not expect that and that leads to a NULL ptr deref. ] [ dhansen: Fix an uninitialized 'nid' variable in __sgx_alloc_epc_page() as Reported-by: kernel test robot to avoid any potential allocations from the wrong NUMA node or even premature allocation failures. ] Signed-off-by: Jarkko Sakkinen Signed-off-by: Kai Huang Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lore.kernel.org/lkml/158188326978.894464.217282995221175417.stgit@dwillia2-desk3.amr.corp.intel.com/ Link: https://lkml.kernel.org/r/20210319040602.178558-1-kai.huang@intel.com Link: https://lkml.kernel.org/r/20210318214933.29341-1-dave.hansen@intel.com Link: https://lkml.kernel.org/r/20210317235332.362001-2-jarkko.sakkinen@intel.com commit 2bbd9b0f2b4ec0afa80b52b1a68bd3bc80618275 Author: Bhaskar Chowdhury Date: Wed Mar 17 16:16:58 2021 +0530 kernel: debug: Ordinary typo fixes in the file gdbstub.c s/overwitten/overwritten/ s/procesing/processing/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210317104658.4053473-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Daniel Thompson commit e4f291b3f7bb1855318e1009de65585a72d595ad Author: Sumit Garg Date: Wed Feb 24 12:38:27 2021 +0530 kdb: Simplify kdb commands registration Simplify kdb commands registration via using linked list instead of static array for commands storage. Signed-off-by: Sumit Garg Link: https://lore.kernel.org/r/20210224070827.408771-1-sumit.garg@linaro.org Reviewed-by: Douglas Anderson [daniel.thompson@linaro.org: Removed a bunch of .cmd_minline = 0 initializers] Signed-off-by: Daniel Thompson commit 935ab8509ccb277c536c9fad96b1a90d3bed98fc Author: Tom Saeger Date: Fri Mar 12 18:55:35 2021 -0700 ACPI: fix various typos in comments Fix trivial ACPI driver comment typos. s/notifcations/notifications/ s/Ajust/Adjust/ s/preform/perform/ s/atrributes/attributes/ s/Souce/Source/ s/Evalutes/Evaluates/ s/Evalutes/Evaluates/ s/specifiy/specify/ s/promixity/proximity/ s/presuambly/presumably/ s/Evalute/Evaluate/ s/specificed/specified/ s/rountine/routine/ s/previosuly/previously/ Change comment referencing pcc_send_cmd to send_pcc_cmd. Signed-off-by: Tom Saeger Reviewed-by: Randy Dunlap Signed-off-by: Rafael J. Wysocki commit 46b37c6e4b072d1440e82558aadd5b678627fec6 Author: Heikki Krogerus Date: Thu Mar 11 11:25:21 2021 +0300 MAINTAINERS: Add entry for the software nodes Making Andy and myself (Heikki) the designated reviewers of the thing. The software node mailing list shall be linux-acpi@vger.kernel.org for now. Signed-off-by: Heikki Krogerus Acked-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki commit d027fdc4fa30a409e7425219d0d089e4e4ebdc4d Author: Sumit Garg Date: Wed Feb 24 12:46:53 2021 +0530 kdb: Remove redundant function definitions/prototypes Cleanup kdb code to get rid of unused function definitions/prototypes. Signed-off-by: Sumit Garg Link: https://lore.kernel.org/r/20210224071653.409150-1-sumit.garg@linaro.org Reviewed-by: Douglas Anderson Signed-off-by: Daniel Thompson commit 053ffdd1641e0cb6840c6fab7a0ad8e001ea93b5 Author: Ville Syrjälä Date: Thu Mar 18 18:10:15 2021 +0200 drm/i915: Give g4x_{dp,hdmi}.c g4x_ namespace s/intel_/g4x_/ for the externally visible g4x_{dp,hdmi}.c functions. Acked-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-8-ville.syrjala@linux.intel.com commit 3722e4ecefb38a62a98a798653685078de475e75 Merge: e6d8af6687fa7 60adbd8fbf486 Author: Mark Brown Date: Fri Mar 19 16:31:39 2021 +0000 Merge series "ASoC: tidyup error message timing" from Kuninori Morimoto : Hi Mark Indicating error message when failed case is very useful for debuging. In many case, it uses below style. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. I know many people have many opinion, but if function() indicates error message, we can get same and detail information without forgot, and it is better. This patch-set tidyup to do it. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } Kuninori Morimoto (14): ASoC: soc-pcm: indicate error message at soc_pcm_open() ASoC: soc-pcm: indicate error message at soc_pcm_hw_params() ASoC: soc-pcm: indicate error message at soc_pcm_prepare() ASoC: soc-pcm: indicate error message at dpcm_path_get() ASoC: soc-pcm: indicate error message at dpcm_be_dai_trigger() ASoC: soc-pcm: indicate error message at dpcm_apply_symmetry() ASoC: soc-pcm: indicate error message at dpcm_run_update_startup/shutdown() ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_startup() ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_hw_params() ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_prepare() ASoC: soc-pcm: don't indicate error message for soc_pcm_hw_free() ASoC: soc-pcm: don't indicate error message for dpcm_be_dai_hw_free() ASoC: don't indicate error message for snd_soc_[pcm_]dai_xxx() ASoC: don't indicate error message for snd_soc_[pcm_]component_xxx() include/sound/soc-dpcm.h | 2 +- sound/soc/soc-compress.c | 9 +- sound/soc/soc-core.c | 22 +---- sound/soc/soc-dapm.c | 24 ++--- sound/soc/soc-pcm.c | 197 +++++++++++++++++++-------------------- 5 files changed, 108 insertions(+), 146 deletions(-) -- 2.25.1 commit 33e9e541733e653ca82e3756aeb99c393b13bcb0 Author: Ville Syrjälä Date: Thu Mar 18 18:10:14 2021 +0200 drm/i915: Introduce g4x_hdmi.c Extract the g4x+ HDMI low level code to its own file, leaving intel_hdmi.c to deal with higher level issues. The infoframe support I decided to leave in intel_hdmi.c since I think we need to move that as a whole to its own file. It is after all used also for DP SDPs, so no longer HDMI specific. Acked-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-7-ville.syrjala@linux.intel.com commit 917c28991f4114b712dc8523b4414ee51a642f4d Author: Ville Syrjälä Date: Thu Mar 18 18:10:13 2021 +0200 drm/i915: Introduce g4x_dp.c Move the g4x+ DP code into a new file. This will leave mostly platform agnostic code in intel_dp.c. Well, the misplaced phy test stuff pretty much ruins that, but let's squint real hard for now. v2: Add comment exlaining which platforms are covered (Daniel) Leave intel_dp_unused_lane_mask() be since it is pretty generic Acked-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-6-ville.syrjala@linux.intel.com commit 764f6729f24706dcdc415233043dc21464ec7a3d Author: Ville Syrjälä Date: Thu Mar 18 18:10:12 2021 +0200 drm/i915: Split intel_ddi_encoder_reset() from intel_dp_encoder_reset() Most of intel_dp_encoder_reset() is for pre-ddi platforms. Make a clean split. Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-5-ville.syrjala@linux.intel.com commit b2ef066198ee0ec2397dc70870cc8f0526adaccc Author: Ville Syrjälä Date: Thu Mar 18 18:10:11 2021 +0200 drm/i915: Relocate intel_dp_program_link_training_pattern() intel_dp_program_link_training_pattern() clearly belongs in intel_dp_link_training.c. Make it so. Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-4-ville.syrjala@linux.intel.com commit 6721af21bdfc91d11dc1a376e8ae6e226ae5648f Author: Ville Syrjälä Date: Thu Mar 18 18:10:10 2021 +0200 drm/i915: Remove dead signal level debugs If we ever get here with bogus signal levels we've messed up somewhere earlier. Just use MISSING_CASE(). Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-3-ville.syrjala@linux.intel.com commit 4b672eb7c98387147d7fa9b8f376795cf43e1969 Author: Ville Syrjälä Date: Thu Mar 18 18:10:09 2021 +0200 drm/i915: Remove dead TPS3->TPS2 fallback code If we ever get here with TPS3 then intel_dp_training_pattern() is just broken. Replace the careful fallback with just MISSING_CASE(). Reviewed-by: Daniel Vetter Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-2-ville.syrjala@linux.intel.com commit 4c56f573bd941dcdcbbcd58d91489e994715eb47 Author: Sergei Trofimovich Date: Sat Mar 13 10:42:14 2021 +0000 ia64: fix format string for ia64-acpi-cpu-freq Fix warning with %lx / s64 mismatch: CC [M] drivers/cpufreq/ia64-acpi-cpufreq.o drivers/cpufreq/ia64-acpi-cpufreq.c: In function 'processor_get_pstate': warning: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 's64' {aka 'long long int'} [-Wformat=] Signed-off-by: Sergei Trofimovich Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit f4b4bdf29ace71475b18aae9377402a534f09a72 Author: Amadeusz Sławiński Date: Thu Mar 18 17:06:18 2021 +0100 ALSA: hda: Revert "ALSA: hda: Allow setting preallocation again for x86" This reverts commit f8e4ae10de43 ("ALSA: hda: Allow setting preallocation again for x86"). The reverted commit itself is a revert of c31427d0d21e ("ALSA: hda: No preallocation on x86 platforms"). It was needed because HDA allowed very big allocations, up to 1GB per stream. However as previous commit in this series changes maximum allowed allocation per stream to 4MB, we can safely revert it back. On systems where there are a lot of FrontEnds, when CONFIG_SND_HDA_PREALLOC_SIZE != 0 ALSA core allocates memory for each FE, which may cause out of memory problems due to per card limit. Force config to 0 on X86, so memory will be allocated on as needed basis. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=201251#c322 Suggested-by: Takashi Iwai Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20210318160618.2504068-4-amadeuszx.slawinski@linux.intel.com Signed-off-by: Takashi Iwai commit 12b2b508300d08206674bfb3f53bb84f69cf2555 Author: Amadeusz Sławiński Date: Thu Mar 18 17:06:17 2021 +0100 ALSA: hda: Change AZX_MAX_BUF_SIZE from 1GB to 4MB When SND_HDA_PREALLOC_SIZE is set to 0, applications can request as much memory as there is allowed. With value of AZX_MAX_BUF_SIZE it is 1GB per stream, which is not realistic use case. Change it 4MB. Bug: https://bugzilla.kernel.org/show_bug.cgi?id=201251#c322 Suggested-by: Takashi Iwai Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20210318160618.2504068-3-amadeuszx.slawinski@linux.intel.com Signed-off-by: Takashi Iwai commit dc85fc9d05d23591ddfde400c817413765611ec7 Author: Amadeusz Sławiński Date: Thu Mar 18 17:06:16 2021 +0100 ALSA: pcm: Add debug print on memory allocation failure Add debug prints after calls of do_alloc_pages. One simplification would be to move print into do_alloc_pages, however it would cause spam in logs, as preallocate_pcm_pages loops over do_alloc_pages trying lower values in case of failures. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński Link: https://lore.kernel.org/r/20210318160618.2504068-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Takashi Iwai commit 922e5ddef973f2a8a155b41f3bb9d3269c79017a Author: Daniel Lezcano Date: Wed Mar 17 19:23:49 2021 +0100 MAINTAINERS: Add DTPM subsystem maintainer The DTPM framework is a new framework allowing to do power limitation on devices by using different techniques. Those will be added, improved and complexified. The framework falls under the power management umbrella, it is more traffic to handle for Rafael. Add myself as the maintainer of the DTPM so I can help by taking care of the changes for this framework. Signed-off-by: Daniel Lezcano Signed-off-by: Rafael J. Wysocki commit ef6e01af398acff63eb33c58e72839e50a3e1c4b Author: Thara Gopinath Date: Fri Mar 19 11:37:11 2021 -0400 MAINTAINERS: Add co-maintainer for Qualcomm tsens thermal drivers Add myself as the maintainer for Qualcomm tsens drivers so that I can help Daniel by taking care of/reviewing changes to these drivers. Signed-off-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210319153711.2836652-1-thara.gopinath@linaro.org commit c244297acbe51f1db5764966c02cdbd69927f218 Author: Yafang Shao Date: Fri Mar 19 18:12:46 2021 +0800 vsprintf: dump full information of page flags in pGp Currently the pGp only shows the names of page flags, rather than the full information including section, node, zone, last cpupid and kasan tag. While it is not easy to parse these information manually because there're so many flavors. Let's interpret them in pGp as well. To be compitable with the existed format of pGp, the new introduced ones also use '|' as the separator, then the user tools parsing pGp won't need to make change, suggested by Matthew. The new information is tracked onto the end of the existed one. On example of the output in mm/slub.c as follows, - Before the patch, [ 6343.396602] Slab 0x000000004382e02b objects=33 used=3 fp=0x000000009ae06ffc flags=0x17ffffc0010200(slab|head) - After the patch, [ 8448.272530] Slab 0x0000000090797883 objects=33 used=3 fp=0x00000000790f1c26 flags=0x17ffffc0010200(slab|head|node=0|zone=2|lastcpupid=0x1fffff) The documentation and test cases are also updated. The output of the test cases as follows, [68599.816764] test_printf: loaded. [68599.819068] test_printf: all 388 tests passed [68599.830367] test_printf: unloaded. [lkp@intel.com: reported issues in the prev version in test_printf.c] Signed-off-by: Yafang Shao Cc: David Hildenbrand Cc: Joe Perches Cc: Miaohe Lin Cc: Vlastimil Babka Cc: Andy Shevchenko Cc: Matthew Wilcox Cc: Petr Mladek Cc: kernel test robot Reviewed-by: Sergey Senozhatsky Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210319101246.73513-4-laoar.shao@gmail.com commit 96b94abc12e6ec648f770776522de20c073c6eca Author: Yafang Shao Date: Fri Mar 19 18:12:45 2021 +0800 mm, slub: don't combine pr_err with INFO It is strange to combine "pr_err" with "INFO", so let's remove the prefix completely. This patch is motivated by David's comment[1]. - before the patch [ 8846.517809] INFO: Slab 0x00000000f42a2c60 objects=33 used=3 fp=0x0000000060d32ca8 flags=0x17ffffc0010200(slab|head) - after the patch [ 6343.396602] Slab 0x000000004382e02b objects=33 used=3 fp=0x000000009ae06ffc flags=0x17ffffc0010200(slab|head) [1] https://lore.kernel.org/linux-mm/b9c0f2b6-e9b0-0c36-ebdd-2bc684c5a762@redhat.com/#t Suggested-by: Vlastimil Babka Signed-off-by: Yafang Shao Acked-by: Vlastimil Babka Reviewed-by: Miaohe Lin Reviewed-by: Andy Shevchenko Reviewed-by: David Hildenbrand Acked-by: David Rientjes Cc: Matthew Wilcox Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210319101246.73513-3-laoar.shao@gmail.com commit 4a8ef190c16f724a0bc23ef71bda44b8aef4afaa Author: Yafang Shao Date: Fri Mar 19 18:12:44 2021 +0800 mm, slub: use pGp to print page flags As pGp has been already introduced in printk, we'd better use it to make the output human readable. Before this change, the output is, [ 6155.716018] INFO: Slab 0x000000004027dd4f objects=33 used=3 fp=0x000000008cd1579c flags=0x17ffffc0010200 While after this change, the output is, [ 8846.517809] INFO: Slab 0x00000000f42a2c60 objects=33 used=3 fp=0x0000000060d32ca8 flags=0x17ffffc0010200(slab|head) Signed-off-by: Yafang Shao Reviewed-by: David Hildenbrand Reviewed-by: Vlastimil Babka Acked-by: David Rientjes Acked-by: Christoph Lameter Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Miaohe Lin Reviewed-by: Andy Shevchenko Reviewed-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210319101246.73513-2-laoar.shao@gmail.com commit 8f214d435607ac67648f5df54d3f8148073fbe13 Author: Yang Li Date: Wed Mar 17 16:27:32 2021 +0800 drm/gma500: use NULL instead of using plain integer as pointer This fixes the following sparse warnings: drivers/gpu/drm/gma500/psb_drv.c:303:56: warning: Using plain integer as NULL pointer Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/1615969652-80225-1-git-send-email-yang.lee@linux.alibaba.com commit 2076b7bdc5290141cea809c8462b769836bd2757 Author: Dan Carpenter Date: Thu Mar 18 13:39:34 2021 +0300 HID: ft260: fix an error message in ft260_i2c_write_read() The "len" variable is uninitialize. Fixes: 6a82582d9fa4 ("HID: ft260: add usb hid to i2c host bridge driver") Signed-off-by: Dan Carpenter Signed-off-by: Jiri Kosina commit c49c33637802a2c6957a78119eb8be3b055dd9e9 Author: Dario Pagani Date: Sun Jan 31 10:00:45 2021 +0100 HID: support for initialization of some Thrustmaster wheels Add support for proper initialization of some Thrustmaster wheels that appear like a "Thrustmaster FFB Wheel" (044f:b65d) to the host. When the device is connected a special usb request is sent, this request makes the wheel disconnect and reappear to the host as the "real wheel". For example: a T150 will re-appear as 044f:b677 and a T300 as 044f:b66e [jkosina@suse.cz: renamed driver to hid-thrustmaster] Link: https://github.com/scarburato/hid-tminit Signed-off-by: Dario Pagani Co-developed-by: Kim Kuparinen Signed-off-by: Kim Kuparinen Signed-off-by: Jiri Kosina commit 84fcfbdadbfdd86c9a43a52703203e05fe7efd92 Author: Wang Qing Date: Fri Mar 12 10:19:12 2021 +0800 dma-mapping: remove a pointless empty line in dma_alloc_coherent Signed-off-by: Wang Qing Signed-off-by: Christoph Hellwig commit 20e1dbf2bbe2431072571000ed31dfef09359c08 Author: Ricardo Ribalda Date: Sat Mar 13 00:55:20 2021 +0100 media: uvcvideo: Use dma_alloc_noncontiguous API On architectures where there is no coherent caching such as ARM use the dma_alloc_noncontiguous API and handle manually the cache flushing using dma_sync_sgtable(). If the architechture has coherent cache, the API falls back to alloc_dma_pages, so we can remove the coherent caching code-path from the driver, making it simpler. With this patch on the affected architectures we can measure up to 20x performance improvement in uvc_video_copy_data_work(). Eg: aarch64 with an external usb camera NON_CONTIGUOUS frames: 999 packets: 999 empty: 0 (0 %) errors: 0 invalid: 0 pts: 0 early, 0 initial, 999 ok scr: 0 count ok, 0 diff ok sof: 2048 <= sof <= 0, freq 0.000 kHz bytes 67034480 : duration 33303 FPS: 29.99 URB: 523446/4993 uS/qty: 104.836 avg 132.532 std 13.230 min 831.094 max (uS) header: 76564/4993 uS/qty: 15.334 avg 15.229 std 3.438 min 186.875 max (uS) latency: 468945/4992 uS/qty: 93.939 avg 132.577 std 9.531 min 824.010 max (uS) decode: 54161/4993 uS/qty: 10.847 avg 6.313 std 1.614 min 111.458 max (uS) raw decode speed: 9.931 Gbits/s raw URB handling speed: 1.025 Gbits/s throughput: 16.102 Mbits/s URB decode CPU usage 0.162600 % COHERENT frames: 999 packets: 999 empty: 0 (0 %) errors: 0 invalid: 0 pts: 0 early, 0 initial, 999 ok scr: 0 count ok, 0 diff ok sof: 2048 <= sof <= 0, freq 0.000 kHz bytes 54683536 : duration 33302 FPS: 29.99 URB: 1478135/4000 uS/qty: 369.533 avg 390.357 std 22.968 min 3337.865 max (uS) header: 79761/4000 uS/qty: 19.940 avg 18.495 std 1.875 min 336.719 max (uS) latency: 281077/4000 uS/qty: 70.269 avg 83.102 std 5.104 min 735.000 max (uS) decode: 1197057/4000 uS/qty: 299.264 avg 318.080 std 1.615 min 2806.667 max (uS) raw decode speed: 365.470 Mbits/s raw URB handling speed: 295.986 Mbits/s throughput: 13.136 Mbits/s URB decode CPU usage 3.594500 % In non-affected architectures we see no significant impact. Eg: x86 with an external usb camera NON_CONTIGUOUS frames: 999 packets: 999 empty: 0 (0 %) errors: 0 invalid: 0 pts: 0 early, 0 initial, 999 ok scr: 0 count ok, 0 diff ok sof: 2048 <= sof <= 0, freq 0.000 kHz bytes 70179056 : duration 33301 FPS: 29.99 URB: 288901/4897 uS/qty: 58.995 avg 26.022 std 4.319 min 253.853 max (uS) header: 54792/4897 uS/qty: 11.189 avg 6.218 std 0.620 min 61.750 max (uS) latency: 236602/4897 uS/qty: 48.315 avg 24.244 std 1.764 min 240.924 max (uS) decode: 52298/4897 uS/qty: 10.679 avg 8.299 std 1.638 min 108.861 max (uS) raw decode speed: 10.796 Gbits/s raw URB handling speed: 1.949 Gbits/s throughput: 16.859 Mbits/s URB decode CPU usage 0.157000 % COHERENT frames: 999 packets: 999 empty: 0 (0 %) errors: 0 invalid: 0 pts: 0 early, 0 initial, 999 ok scr: 0 count ok, 0 diff ok sof: 2048 <= sof <= 0, freq 0.000 kHz bytes 71818320 : duration 33301 FPS: 29.99 URB: 321021/5000 uS/qty: 64.204 avg 23.001 std 10.430 min 268.837 max (uS) header: 54308/5000 uS/qty: 10.861 avg 5.104 std 0.778 min 54.736 max (uS) latency: 268799/5000 uS/qty: 53.759 avg 21.827 std 6.095 min 255.153 max (uS) decode: 52222/5000 uS/qty: 10.444 avg 7.137 std 1.874 min 71.103 max (uS) raw decode speed: 11.048 Gbits/s raw URB handling speed: 1.789 Gbits/s throughput: 17.253 Mbits/s URB decode CPU usage 0.156800 % Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Reviewed-by: Tomasz Figa Signed-off-by: Christoph Hellwig commit 799de1baaf3509a54ff713efb768020f8defd709 Author: Joerg Roedel Date: Wed Mar 3 15:17:14 2021 +0100 x86/sev-es: Optimize __sev_es_ist_enter() for better readability Reorganize the code and improve the comments to make the function more readable and easier to understand. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210303141716.29223-4-joro@8bytes.org commit 0bb868e1e3c16827c1b63589b1b0f016ba00140d Author: Colin Ian King Date: Fri Mar 19 09:57:50 2021 +0000 iommu/unisoc: Fix spelling mistake "sixe" -> "size" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210319095750.5624-1-colin.king@canonical.com Signed-off-by: Joerg Roedel commit 21d6a7dcbfba5e7b31f4e9d555a9be362578bfc3 Author: Jiapeng Chong Date: Tue Mar 9 17:59:23 2021 +0800 x86/kaslr: Return boolean values from a function returning bool Fix the following coccicheck warnings: ./arch/x86/boot/compressed/kaslr.c:642:10-11: WARNING: return of 0/1 in function 'process_mem_region' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1615283963-67277-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 79c6246ae8793448c05da86a4c82298eed8549b0 Author: Alain Volmat Date: Thu Mar 18 08:24:50 2021 +0100 spi: stm32: Fix use-after-free on unbind stm32_spi_remove() accesses the driver's private data after calling spi_unregister_master() even though that function releases the last reference on the spi_master and thereby frees the private data. Fix by switching over to the new devm_spi_alloc_master() helper which keeps the private data accessible until the driver has unbound. Fixes: 8d559a64f00b ("spi: stm32: drop devres version of spi_register_master") Reported-by: Lukas Wunner Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1616052290-10887-1-git-send-email-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit e6d8af6687fa7730885d5c8d8f62e75e8dff29f0 Author: Wei Yongjun Date: Fri Mar 19 09:41:02 2021 +0000 ASoC: rt1019: make symbol 'rt1019_i2c_driver' static The sparse tool complains as follows: sound/soc/codecs/rt1019.c:927:19: warning: symbol 'rt1019_i2c_driver' was not declared. Should it be static? This symbol is not used outside of rt1019.c, so this commit marks it static. Fixes: 7ec79d3850d0 ("ASoC: rt1019: add rt1019 amplifier driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210319094102.4185096-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit 60adbd8fbf486214f4ae1946e61df69c3867e20b Author: Kuninori Morimoto Date: Mon Mar 15 09:58:41 2021 +0900 ASoC: don't indicate error message for snd_soc_[pcm_]component_xxx() All snd_soc_component_xxx() and snd_soc_pcm_component_xxx() itself indicate error message if failed. Its caller doesn't need to indicate duplicated error message. This patch removes it. All snd_soc_component_xxx() indicate error message if failed. Its caller doesn't need to indicate duplicated error message. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/878s6puta6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 62462e018220895267450155b188f5804f54c202 Author: Kuninori Morimoto Date: Mon Mar 15 09:58:37 2021 +0900 ASoC: don't indicate error message for snd_soc_[pcm_]dai_xxx() All snd_soc_dai_xxx() and snd_soc_pcm_dai_xxx() itself indicate error message if failed. Its caller doesn't need to indicate duplicated error message. This patch removes it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6r5utaa.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f52366e6831ecb2da133b6ecfc7c69266086660c Author: Kuninori Morimoto Date: Mon Mar 15 09:58:32 2021 +0900 ASoC: soc-pcm: don't indicate error message for dpcm_be_dai_hw_free() dpcm_be_dai_hw_free() never fail, error message is not needed. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blblutaf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e20c9c4f96d79aa48eb3649c57f1f2784f92b838 Author: Kuninori Morimoto Date: Mon Mar 15 09:58:28 2021 +0900 ASoC: soc-pcm: don't indicate error message for soc_pcm_hw_free() soc_pcm_hw_free() never fail, error message is not needed. We can't use void function for it, because it is used part of struct snd_pcm_ops :: hw_free. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87czw1utaj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 273db971cf833d62c9e2d9381d190e14b1cd3641 Author: Kuninori Morimoto Date: Mon Mar 15 09:58:22 2021 +0900 ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_prepare() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } This patch follow above style at dpcm_fe/be_dai_prepare() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eeghutap.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 33b6b94f55ec60517ce71ca2bc9c03a6d337c805 Author: Kuninori Morimoto Date: Mon Mar 15 09:58:18 2021 +0900 ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_hw_params() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } This patch follow above style at dpcm_fe/be_dai_hw_params() Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ft0xutat.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 06aaeb874256a10fe5b84f511da3c65f548a43b9 Author: Kuninori Morimoto Date: Mon Mar 15 09:58:13 2021 +0900 ASoC: soc-pcm: indicate error message at dpcm_fe/be_dai_startup() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } This patch follow above style at dpcm_fe/be_dai_startup(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7ldutay.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 81c82a9edbddc4cd97e4d974dfd7f2689ee63474 Author: Kuninori Morimoto Date: Mon Mar 15 09:58:08 2021 +0900 ASoC: soc-pcm: indicate error message at dpcm_run_update_startup/shutdown() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } This patch also do below to dpcm_run_update_startup() 1) remove duplicated ret = -EINVAL 2) remove blank line do below to dpcm_run_update_shutdown() 1) remove unused ret Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87im5tutb3.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit bbd2bac8d6ca00ee0b032d3c03100328131425ac Author: Kuninori Morimoto Date: Mon Mar 15 09:58:02 2021 +0900 ASoC: soc-pcm: indicate error message at dpcm_apply_symmetry() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } This patch follow above style at dpcm_apply_symmetry(...) Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0q9utb9.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit db3aa39c91068424407f71d23b028493eac994a1 Author: Kuninori Morimoto Date: Mon Mar 15 09:57:57 2021 +0900 ASoC: soc-pcm: indicate error message at dpcm_be_dai_trigger() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } Now, dpcm_be_dai_trigger() user uses it like below. err = dpcm_be_dai_trigger(...); if (err < 0) dev_err(..., "ASoC: trigger FE failed %d\n", err); But we can get more detail information if dpcm_be_dai_trigger() itself had dev_err(). And above error message is confusable, failed is *BE*, not *FE*. This patch indicates error message at dpcm_be_dai_trigger(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfaputbe.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit d479f00b795ac62b24ef90f4ec421e65c3178ca7 Author: Kuninori Morimoto Date: Mon Mar 15 09:57:52 2021 +0900 ASoC: soc-pcm: indicate error message at dpcm_path_get() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } Now, many place uses dpcm_path_get() like below ret = dpcm_path_get(...); if (ret < 0) goto error; (A) else if (ret == 0) dev_dbg(...) But here, (A) part can be indicated at dpcm_path_get() not caller. It is simple and readable code. This patch do it. Small detail behaviors will be exchanged by this patch. 1) indicates debug info (= path numbers) if path > 0 case only (It was *always* indicated). 2) soc_dpcm_fe_runtime_update() is indicating error message for paths < 0 case, but it is already done at dpcm_path_get(). Thus just remove it. but dev_dbg() vs dev_warn() is exchanged. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mtv5utbj.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit dab7eeb4045cce074e083be1f3092d7390d6cfb2 Author: Kuninori Morimoto Date: Mon Mar 15 09:57:48 2021 +0900 ASoC: soc-pcm: indicate error message at soc_pcm_prepare() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } This patch follow above style at soc_pcm_prepare(). By this patch, dpcm_fe/be_dai_prepare(...) temporary lacks FE/BE error info, but it will reborn soon. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8flutbn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit cb11f79b4af65005584880eb408f9748c32661d0 Author: Kuninori Morimoto Date: Mon Mar 15 09:57:42 2021 +0900 ASoC: soc-pcm: indicate error message at soc_pcm_hw_params() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } This patch follow above style at soc_pcm_hw_params(). By this patch, dpcm_fe/be_dai_hw_params(...) temporary lacks FE/BE error info, but it will reborn soon. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pn01utbt.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e4b044f4582366de10b8b28614c24ac4ff22b299 Author: Kuninori Morimoto Date: Mon Mar 15 09:57:37 2021 +0900 ASoC: soc-pcm: indicate error message at soc_pcm_open() Indicating error message when failed case is very useful for debuging. In many case, its style is like below. int function(...) { ... return ret; } int caller(...) { ... ret = function(...); if (ret < 0) dev_err(...) ... } This is not so bad, but in this style *each caller* needs to indicate duplicate same error message, and some caller is forgetting to do it. And caller can't indicate detail function() error information. If function() indicates error message, we can get same and detail information without forgot. int function(...) { ... if (ret < 0) dev_err(...) return ret; } int caller(...) { ... ret = function(...); ... } This patch follow above style at soc_pcm_open(). By this patch, dpcm_fe/be_dai_startup(...) temporary lacks FE/BE error info, but it will reborn soon. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r1khutby.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 90134ac9cabb69972d0a509bf08e108a73442184 Author: Quentin Perret Date: Fri Mar 19 10:01:46 2021 +0000 KVM: arm64: Protect the .hyp sections from the host When KVM runs in nVHE protected mode, use the host stage 2 to unmap the hypervisor sections by marking them as owned by the hypervisor itself. The long-term goal is to ensure the EL2 code can remain robust regardless of the host's state, so this starts by making sure the host cannot e.g. write to the .hyp sections directly. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-39-qperret@google.com commit 9589a38cdfeba0889590e6ef4627b439034d456c Author: Quentin Perret Date: Fri Mar 19 10:01:45 2021 +0000 KVM: arm64: Disable PMU support in protected mode The host currently writes directly in EL2 per-CPU data sections from the PMU code when running in nVHE. In preparation for unmapping the EL2 sections from the host stage 2, disable PMU support in protected mode as we currently do not have a use-case for it. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-38-qperret@google.com commit b83042f0f143a5e9e899924987b542b2ac766e53 Author: Quentin Perret Date: Fri Mar 19 10:01:44 2021 +0000 KVM: arm64: Page-align the .hyp sections We will soon unmap the .hyp sections from the host stage 2 in Protected nVHE mode, which obviously works with at least page granularity, so make sure to align them correctly. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-37-qperret@google.com commit 1025c8c0c6accfcbdc8f52ca1940160f65cd87d6 Author: Quentin Perret Date: Fri Mar 19 10:01:43 2021 +0000 KVM: arm64: Wrap the host with a stage 2 When KVM runs in protected nVHE mode, make use of a stage 2 page-table to give the hypervisor some control over the host memory accesses. The host stage 2 is created lazily using large block mappings if possible, and will default to page mappings in absence of a better solution. >From this point on, memory accesses from the host to protected memory regions (e.g. not 'owned' by the host) are fatal and lead to hyp_panic(). Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-36-qperret@google.com commit def1aaf9e0bc6987bb4b417aac37226e994a1a74 Author: Quentin Perret Date: Fri Mar 19 10:01:42 2021 +0000 KVM: arm64: Provide sanitized mmfr* registers at EL2 We will need to read sanitized values of mmfr{0,1}_el1 at EL2 soon, so add them to the list of copied variables. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-35-qperret@google.com commit 8942a237c771b65f8bc1232536e4b4b829c7701f Author: Quentin Perret Date: Fri Mar 19 10:01:41 2021 +0000 KVM: arm64: Introduce KVM_PGTABLE_S2_IDMAP stage 2 flag Introduce a new stage 2 configuration flag to specify that all mappings in a given page-table will be identity-mapped, as will be the case for the host. This allows to introduce sanity checks in the map path and to avoid programming errors. Suggested-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-34-qperret@google.com commit bc224df155c466178128a2950af16cba37b6f218 Author: Quentin Perret Date: Fri Mar 19 10:01:40 2021 +0000 KVM: arm64: Introduce KVM_PGTABLE_S2_NOFWB stage 2 flag In order to further configure stage 2 page-tables, pass flags to the init function using a new enum. The first of these flags allows to disable FWB even if the hardware supports it as we will need to do so for the host stage 2. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-33-qperret@google.com commit 2fcb3a59401d2d12b5337b62c799eeb22cf40a2c Author: Quentin Perret Date: Fri Mar 19 10:01:39 2021 +0000 KVM: arm64: Add kvm_pgtable_stage2_find_range() Since the host stage 2 will be identity mapped, and since it will own most of memory, it would preferable for performance to try and use large block mappings whenever that is possible. To ease this, introduce a new helper in the KVM page-table code which allows to search for large ranges of available IPA space. This will be used in the host memory abort path to greedily idmap large portion of the PA space. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-32-qperret@google.com commit 3fab82347ffb36c8b7b38dabc8e79276eeb1a81c Author: Quentin Perret Date: Fri Mar 19 10:01:38 2021 +0000 KVM: arm64: Refactor the *_map_set_prot_attr() helpers In order to ease their re-use in other code paths, refactor the *_map_set_prot_attr() helpers to not depend on a map_data struct. No functional change intended. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-31-qperret@google.com commit 807923e04a0f5c6c34dc2eb52ae544cb0e4e4e66 Author: Quentin Perret Date: Fri Mar 19 10:01:37 2021 +0000 KVM: arm64: Use page-table to track page ownership As the host stage 2 will be identity mapped, all the .hyp memory regions and/or memory pages donated to protected guestis will have to marked invalid in the host stage 2 page-table. At the same time, the hypervisor will need a way to track the ownership of each physical page to ensure memory sharing or donation between entities (host, guests, hypervisor) is legal. In order to enable this tracking at EL2, let's use the host stage 2 page-table itself. The idea is to use the top bits of invalid mappings to store the unique identifier of the page owner. The page-table owner (the host) gets identifier 0 such that, at boot time, it owns the entire IPA space as the pgd starts zeroed. Provide kvm_pgtable_stage2_set_owner() which allows to modify the ownership of pages in the host stage 2. It re-uses most of the map() logic, but ends up creating invalid mappings instead. This impacts how we do refcount as we now need to count invalid mappings when they are used for ownership tracking. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-30-qperret@google.com commit f60ca2f9321a71ee3d2a7bd620c1827b82ce05f2 Author: Quentin Perret Date: Fri Mar 19 10:01:36 2021 +0000 KVM: arm64: Always zero invalid PTEs kvm_set_invalid_pte() currently only clears bit 0 from a PTE because stage2_map_walk_table_post() needs to be able to follow the anchor. In preparation for re-using bits 63-01 from invalid PTEs, make sure to zero it entirely by ensuring to cache the anchor's child upfront. Acked-by: Will Deacon Suggested-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-29-qperret@google.com commit a14307f5310c737744641ff8da7a8d491c3c85cd Author: Quentin Perret Date: Fri Mar 19 10:01:35 2021 +0000 KVM: arm64: Sort the hypervisor memblocks We will soon need to check if a Physical Address belongs to a memblock at EL2, so make sure to sort them so this can be done efficiently. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-28-qperret@google.com commit 04e5de03093f669ccc233e56b7838bfa7a7af6e1 Author: Quentin Perret Date: Fri Mar 19 10:01:34 2021 +0000 KVM: arm64: Reserve memory for host stage 2 Extend the memory pool allocated for the hypervisor to include enough pages to map all of memory at page granularity for the host stage 2. While at it, also reserve some memory for device mappings. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-27-qperret@google.com commit e37f37a0e780f23210b2a5cb314dab39fea7086a Author: Quentin Perret Date: Fri Mar 19 10:01:33 2021 +0000 KVM: arm64: Make memcache anonymous in pgtable allocator The current stage2 page-table allocator uses a memcache to get pre-allocated pages when it needs any. To allow re-using this code at EL2 which uses a concept of memory pools, make the memcache argument of kvm_pgtable_stage2_map() anonymous, and let the mm_ops zalloc_page() callbacks use it the way they need to. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-26-qperret@google.com commit 159b859beed76836a2c7cfa6303c312a40bb9dc7 Author: Quentin Perret Date: Fri Mar 19 10:01:32 2021 +0000 KVM: arm64: Refactor __populate_fault_info() Refactor __populate_fault_info() to introduce __get_fault_info() which will be used once the host is wrapped in a stage 2. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-25-qperret@google.com commit 6ec7e56d3265f6e7673d0788bfa3a76820c9bdfe Author: Quentin Perret Date: Fri Mar 19 10:01:31 2021 +0000 KVM: arm64: Refactor __load_guest_stage2() Refactor __load_guest_stage2() to introduce __load_stage2() which will be re-used when loading the host stage 2. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-24-qperret@google.com commit bcb25a2b86b4b96385ffbcc54d51c400793b7393 Author: Quentin Perret Date: Fri Mar 19 10:01:30 2021 +0000 KVM: arm64: Refactor kvm_arm_setup_stage2() In order to re-use some of the stage 2 setup code at EL2, factor parts of kvm_arm_setup_stage2() out into separate functions. No functional change intended. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-23-qperret@google.com commit 734864c177bca5148adfe7a96744993d61513430 Author: Quentin Perret Date: Fri Mar 19 10:01:29 2021 +0000 KVM: arm64: Set host stage 2 using kvm_nvhe_init_params Move the registers relevant to host stage 2 enablement to kvm_nvhe_init_params to prepare the ground for enabling it in later patches. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-22-qperret@google.com commit cfb1a98de7a9aa51931ff5b336fc5c3c201d01cc Author: Quentin Perret Date: Fri Mar 19 10:01:28 2021 +0000 KVM: arm64: Use kvm_arch in kvm_s2_mmu In order to make use of the stage 2 pgtable code for the host stage 2, change kvm_s2_mmu to use a kvm_arch pointer in lieu of the kvm pointer, as the host will have the former but not the latter. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-21-qperret@google.com commit 834cd93deb75f3a43420e479f133dd02fba95aa6 Author: Quentin Perret Date: Fri Mar 19 10:01:27 2021 +0000 KVM: arm64: Use kvm_arch for stage 2 pgtable In order to make use of the stage 2 pgtable code for the host stage 2, use struct kvm_arch in lieu of struct kvm as the host will have the former but not the latter. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-20-qperret@google.com commit bfa79a805454f768b8d76ab683659d9e219a037a Author: Quentin Perret Date: Fri Mar 19 10:01:26 2021 +0000 KVM: arm64: Elevate hypervisor mappings creation at EL2 Previous commits have introduced infrastructure to enable the EL2 code to manage its own stage 1 mappings. However, this was preliminary work, and none of it is currently in use. Put all of this together by elevating the mapping creation at EL2 when memory protection is enabled. In this case, the host kernel running at EL1 still creates _temporary_ EL2 mappings, only used while initializing the hypervisor, but frees them right after. As such, all calls to create_hyp_mappings() after kvm init has finished turn into hypercalls, as the host now has no 'legal' way to modify the hypevisor page tables directly. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-19-qperret@google.com commit f320bc742bc23c1d43567712fe2814bf04b19ebc Author: Quentin Perret Date: Fri Mar 19 10:01:25 2021 +0000 KVM: arm64: Prepare the creation of s1 mappings at EL2 When memory protection is enabled, the EL2 code needs the ability to create and manage its own page-table. To do so, introduce a new set of hypercalls to bootstrap a memory management system at EL2. This leads to the following boot flow in nVHE Protected mode: 1. the host allocates memory for the hypervisor very early on, using the memblock API; 2. the host creates a set of stage 1 page-table for EL2, installs the EL2 vectors, and issues the __pkvm_init hypercall; 3. during __pkvm_init, the hypervisor re-creates its stage 1 page-table and stores it in the memory pool provided by the host; 4. the hypervisor then extends its stage 1 mappings to include a vmemmap in the EL2 VA space, hence allowing to use the buddy allocator introduced in a previous patch; 5. the hypervisor jumps back in the idmap page, switches from the host-provided page-table to the new one, and wraps up its initialization by enabling the new allocator, before returning to the host. 6. the host can free the now unused page-table created for EL2, and will now need to issue hypercalls to make changes to the EL2 stage 1 mappings instead of modifying them directly. Note that for the sake of simplifying the review, this patch focuses on the hypervisor side of things. In other words, this only implements the new hypercalls, but does not make use of them from the host yet. The host-side changes will follow in a subsequent patch. Credits to Will for __pkvm_init_switch_pgd. Acked-by: Will Deacon Co-authored-by: Will Deacon Signed-off-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-18-qperret@google.com commit 8f4de66e247b805e1b3d1c15367ee0ef4cbb6003 Author: Quentin Perret Date: Fri Mar 19 10:01:24 2021 +0000 arm64: asm: Provide set_sctlr_el2 macro We will soon need to turn the EL2 stage 1 MMU on and off in nVHE protected mode, so refactor the set_sctlr_el1 macro to make it usable for that purpose. Acked-by: Will Deacon Suggested-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-17-qperret@google.com commit bc1d2892e9aa6dcf6cd83adbd3616051cbd4c429 Author: Quentin Perret Date: Fri Mar 19 10:01:23 2021 +0000 KVM: arm64: Factor out vector address calculation In order to re-map the guest vectors at EL2 when pKVM is enabled, refactor __kvm_vector_slot2idx() and kvm_init_vector_slot() to move all the address calculation logic in a static inline function. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-16-qperret@google.com commit d460df12926825a3926da91f054f9f11f88bb33e Author: Quentin Perret Date: Fri Mar 19 10:01:22 2021 +0000 KVM: arm64: Provide __flush_dcache_area at EL2 We will need to do cache maintenance at EL2 soon, so compile a copy of __flush_dcache_area at EL2, and provide a copy of arm64_ftr_reg_ctrel0 as it is needed by the read_ctr macro. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-15-qperret@google.com commit 7a440cc78392c3caf805ef0afc7ead031e4d0830 Author: Quentin Perret Date: Fri Mar 19 10:01:21 2021 +0000 KVM: arm64: Enable access to sanitized CPU features at EL2 Introduce the infrastructure in KVM enabling to copy CPU feature registers into EL2-owned data-structures, to allow reading sanitised values directly at EL2 in nVHE. Given that only a subset of these features are being read by the hypervisor, the ones that need to be copied are to be listed under together with the name of the nVHE variable that will hold the copy. This introduces only the infrastructure enabling this copy. The first users will follow shortly. Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-14-qperret@google.com commit 8e17c66249e9ea08b44879c7af0315e70a83316c Author: Quentin Perret Date: Fri Mar 19 10:01:20 2021 +0000 KVM: arm64: Introduce a Hyp buddy page allocator When memory protection is enabled, the hyp code will require a basic form of memory management in order to allocate and free memory pages at EL2. This is needed for various use-cases, including the creation of hyp mappings or the allocation of stage 2 page tables. To address these use-case, introduce a simple memory allocator in the hyp code. The allocator is designed as a conventional 'buddy allocator', working with a page granularity. It allows to allocate and free physically contiguous pages from memory 'pools', with a guaranteed order alignment in the PA space. Each page in a memory pool is associated with a struct hyp_page which holds the page's metadata, including its refcount, as well as its current order, hence mimicking the kernel's buddy system in the GFP infrastructure. The hyp_page metadata are made accessible through a hyp_vmemmap, following the concept of SPARSE_VMEMMAP in the kernel. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-13-qperret@google.com commit 40d9e41e525c13d07bc72d49968926f4502e5b33 Author: Quentin Perret Date: Fri Mar 19 10:01:19 2021 +0000 KVM: arm64: Stub CONFIG_DEBUG_LIST at Hyp In order to use the kernel list library at EL2, introduce stubs for the CONFIG_DEBUG_LIST out-of-lines calls. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-12-qperret@google.com commit e759604087231c672f91564cc805336e70d333a0 Author: Quentin Perret Date: Fri Mar 19 10:01:18 2021 +0000 KVM: arm64: Introduce an early Hyp page allocator With nVHE, the host currently creates all stage 1 hypervisor mappings at EL1 during boot, installs them at EL2, and extends them as required (e.g. when creating a new VM). But in a world where the host is no longer trusted, it cannot have full control over the code mapped in the hypervisor. In preparation for enabling the hypervisor to create its own stage 1 mappings during boot, introduce an early page allocator, with minimal functionality. This allocator is designed to be used only during early bootstrap of the hyp code when memory protection is enabled, which will then switch to using a full-fledged page allocator after init. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-11-qperret@google.com commit fa21472a316af8ad7af3114049db89678444c7ed Author: Quentin Perret Date: Fri Mar 19 10:01:17 2021 +0000 KVM: arm64: Allow using kvm_nvhe_sym() in hyp code In order to allow the usage of code shared by the host and the hyp in static inline library functions, allow the usage of kvm_nvhe_sym() at EL2 by defaulting to the raw symbol name. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-10-qperret@google.com commit 40a50853d37af3fd2e98b769e1a79839ad16b107 Author: Quentin Perret Date: Fri Mar 19 10:01:16 2021 +0000 KVM: arm64: Make kvm_call_hyp() a function call at Hyp kvm_call_hyp() has some logic to issue a function call or a hypercall depending on the EL at which the kernel is running. However, all the code compiled under __KVM_NVHE_HYPERVISOR__ is guaranteed to only run at EL2 which allows us to simplify. Add ifdefery to kvm_host.h to simplify kvm_call_hyp() in .hyp.text. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-9-qperret@google.com commit 380e18ade4a51334e8806160e6f0fdfaca0b4428 Author: Quentin Perret Date: Fri Mar 19 10:01:15 2021 +0000 KVM: arm64: Introduce a BSS section for use at Hyp Currently, the hyp code cannot make full use of a bss, as the kernel section is mapped read-only. While this mapping could simply be changed to read-write, it would intermingle even more the hyp and kernel state than they currently are. Instead, introduce a __hyp_bss section, that uses reserved pages, and create the appropriate RW hyp mappings during KVM init. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-8-qperret@google.com commit 7aef0cbcdcd0995efde9957b3eda9f31a219613d Author: Quentin Perret Date: Fri Mar 19 10:01:14 2021 +0000 KVM: arm64: Factor memory allocation out of pgtable.c In preparation for enabling the creation of page-tables at EL2, factor all memory allocation out of the page-table code, hence making it re-usable with any compatible memory allocator. No functional changes intended. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-7-qperret@google.com commit cc706a63894fdcc25d226378898921e1ab7dd64e Author: Quentin Perret Date: Fri Mar 19 10:01:13 2021 +0000 KVM: arm64: Avoid free_page() in page-table allocator Currently, the KVM page-table allocator uses a mix of put_page() and free_page() calls depending on the context even though page-allocation is always achieved using variants of __get_free_page(). Make the code consistent by using put_page() throughout, and reduce the memory management API surface used by the page-table code. This will ease factoring out page-allocation from pgtable.c, which is a pre-requisite to creating page-tables at EL2. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-6-qperret@google.com commit 9cc7758145fd24b17cff0734b7cfd80de30be052 Author: Quentin Perret Date: Fri Mar 19 10:01:12 2021 +0000 KVM: arm64: Initialize kvm_nvhe_init_params early Move the initialization of kvm_nvhe_init_params in a dedicated function that is run early, and only once during KVM init, rather than every time the KVM vectors are set and reset. This also opens the opportunity for the hypervisor to change the init structs during boot, hence simplifying the replacement of host-provided page-table by the one the hypervisor will create for itself. Acked-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-5-qperret@google.com commit 67c2d326332ee28079348e43cf4f17bbfe63b260 Author: Will Deacon Date: Fri Mar 19 10:01:11 2021 +0000 arm64: kvm: Add standalone ticket spinlock implementation for use at hyp We will soon need to synchronise multiple CPUs in the hyp text at EL2. The qspinlock-based locking used by the host is overkill for this purpose and relies on the kernel's "percpu" implementation for the MCS nodes. Implement a simple ticket locking scheme based heavily on the code removed by commit c11090474d70 ("arm64: locking: Replace ticket lock implementation with qspinlock"). Signed-off-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-4-qperret@google.com commit 7b4a7b5e6fefd15f708f959dd43e188444e252ec Author: Will Deacon Date: Fri Mar 19 10:01:10 2021 +0000 KVM: arm64: Link position-independent string routines into .hyp.text Pull clear_page(), copy_page(), memcpy() and memset() into the nVHE hyp code and ensure that we always execute the '__pi_' entry point on the offchance that it changes in future. [ qperret: Commit title nits and added linker script alias ] Signed-off-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-3-qperret@google.com commit 8d9902055c57548bb342dc3ca78caa21e9643024 Author: Will Deacon Date: Fri Mar 19 10:01:09 2021 +0000 arm64: lib: Annotate {clear, copy}_page() as position-independent clear_page() and copy_page() are suitable for use outside of the kernel address space, so annotate them as position-independent code. Signed-off-by: Will Deacon Signed-off-by: Quentin Perret Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20210319100146.1149909-2-qperret@google.com commit a1baa01f7691972964320349a9bb010386fe0dab Merge: 5b08709313718 1e28eed17697b Author: Marc Zyngier Date: Fri Mar 19 12:01:04 2021 +0000 Merge tag 'v5.12-rc3' into kvm-arm64/host-stage2 Linux 5.12-rc3 Signed-off-by: Marc Zyngier # gpg: Signature made Sun 14 Mar 2021 21:41:02 GMT # gpg: using RSA key ABAF11C65A2970B130ABE3C479BE3E4300411886 # gpg: issuer "torvalds@linux-foundation.org" # gpg: Can't check signature: No public key commit 8c52cca04f97a4c09ec2f0bd8fe6d0cdf49834e4 Author: Waiman Long Date: Thu Mar 18 13:28:14 2021 -0400 locking/locktorture: Fix incorrect use of ww_acquire_ctx in ww_mutex test The ww_acquire_ctx structure for ww_mutex needs to persist for a complete lock/unlock cycle. In the ww_mutex test in locktorture, however, both ww_acquire_init() and ww_acquire_fini() are called within the lock function only. This causes a lockdep splat of "WARNING: Nested lock was not taken" when lockdep is enabled in the kernel. To fix this problem, we need to move the ww_acquire_fini() after the ww_mutex_unlock() in torture_ww_mutex_unlock(). This is done by allocating a global array of ww_acquire_ctx structures. Each locking thread is associated with its own ww_acquire_ctx via the unique thread id it has so that both the lock and unlock functions can access the same ww_acquire_ctx structure. Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210318172814.4400-6-longman@redhat.com commit aa3a5f31877e5dc131cc286ce707413d441c8375 Author: Waiman Long Date: Thu Mar 18 13:28:13 2021 -0400 locking/locktorture: Pass thread id to lock/unlock functions To allow the lock and unlock functions in locktorture to access per-thread information, we need to pass some hint on how to locate those information. One way to do this is to pass in a unique thread id which can then be used to access a global array for thread specific information. Change the lock and unlock method to add a thread id parameter which can be determined by the offset of the lwsp/lrsp pointer from the global lwsa/lrsa array. There is no other functional change in this patch. Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210318172814.4400-5-longman@redhat.com commit 5261ced47f8e89173c3b015f6152a05f11a418c3 Author: Waiman Long Date: Thu Mar 18 13:28:12 2021 -0400 locking/ww_mutex: Remove DEFINE_WW_MUTEX() macro The current DEFINE_WW_MUTEX() macro fails to properly set up the lockdep key of the ww_mutexes causing potential circular locking dependency splat. Though it is possible to add more macro magic to make it work, but the result is rather ugly. Since locktorture was the only user of DEFINE_WW_MUTEX() and the previous commit has just removed its use. It is easier to just remove the macro to force future users of ww_mutexes to use ww_mutex_init() for initialization. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210318172814.4400-4-longman@redhat.com commit 2ea55bbba23e9d36996299664d618393c8602646 Author: Waiman Long Date: Thu Mar 18 13:28:11 2021 -0400 locking/locktorture: Fix false positive circular locking splat in ww_mutex test In order to avoid false positive circular locking lockdep splat when runnng the ww_mutex torture test, we need to make sure that the ww_mutexes have the same lock class as the acquire_ctx. This means the ww_mutexes must have the same lockdep key as the acquire_ctx. Unfortunately the current DEFINE_WW_MUTEX() macro fails to do that. As a result, we add an init method for the ww_mutex test to do explicit ww_mutex_init()'s of the ww_mutexes to avoid the false positive warning. Suggested-by: Peter Zijlstra Signed-off-by: Waiman Long Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210318172814.4400-3-longman@redhat.com commit 01438749e36bfe53ea25c91568019be775a9782e Merge: 4faf62b1ef1a9 bee645788e07e Author: Ingo Molnar Date: Fri Mar 19 12:10:49 2021 +0100 Merge branch 'locking/urgent' into locking/core, to pick up dependent commits We are applying further, lower-prio fixes on top of two ww_mutex fixes in locking/urgent. Signed-off-by: Ingo Molnar commit befb1ddaece17e346550b6f2bb494ba58d67af43 Author: Wang Qing Date: Sat Mar 13 15:47:42 2021 +0800 hwrng: cctrng - delete redundant printing of return value platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: Wang Qing Signed-off-by: Herbert Xu commit 8d759bec84b1028860287e45cd625bc294a7e16b Author: Longfang Liu Date: Sat Mar 13 15:28:25 2021 +0800 crypto: hisilicon/sec - fixes some driver coding style cleanup static check errors for SEC Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit a44dce504bce620daff97a3e77650b7b579e8753 Author: Longfang Liu Date: Sat Mar 13 15:28:24 2021 +0800 crypto: hisilicon/sec - fixes some coding style 1.delete the original complex method of obtaining the current device and replace it with the initialized device pointer. 2.fixes some coding style Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 4b7aef0230418345be1fb77abbb1592801869901 Author: Longfang Liu Date: Sat Mar 13 15:28:23 2021 +0800 crypto: hisilicon/sec - fixes a printing error When the log is output here, the device has not been initialized yet. Signed-off-by: Longfang Liu Signed-off-by: Herbert Xu commit 682689a56e3b01c64ff6fab7884d94b02be2ab1c Author: Tian Tao Date: Sat Mar 13 09:47:38 2021 +0800 hwrng: ba431 - use devm_platform_ioremap_resource() to simplify Use devm_platform_ioremap_resource() to simplify the code. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit f50281df94d76d40e8afa2433f39c7b4b8bd6868 Author: Tian Tao Date: Sat Mar 13 09:42:35 2021 +0800 hwrng: cctrng - use devm_platform_ioremap_resource() to simplify Use devm_platform_ioremap_resource() to simplify the code. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit e0ba808db7bae1837249c19fe24cc95364a4d483 Author: Ard Biesheuvel Date: Wed Mar 10 11:14:21 2021 +0100 crypto: arm/chacha-scalar - switch to common rev_l macro Drop the local definition of a byte swapping macro and use the common one instead. Signed-off-by: Ard Biesheuvel Reviewed-by: Nicolas Pitre Reviewed-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit d5adb9d1f7f8ccabbfa105e148d1465dfebd8cd2 Author: Ard Biesheuvel Date: Wed Mar 10 11:14:20 2021 +0100 crypto: arm/aes-scalar - switch to common rev_l/mov_l macros The scalar AES implementation has some locally defined macros which reimplement things that are now available in macros defined in assembler.h. So let's switch to those. Signed-off-by: Ard Biesheuvel Reviewed-by: Nicolas Pitre Reviewed-by: Geert Uytterhoeven Reviewed-by: Linus Walleij Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit d2f2516a3882c0c6463e33c9b112b39bd483f821 Author: Eric Biggers Date: Tue Mar 9 23:27:26 2021 -0800 crypto: arm/blake2s - fix for big endian The new ARM BLAKE2s code doesn't work correctly (fails the self-tests) in big endian kernel builds because it doesn't swap the endianness of the message words when loading them. Fix this. Fixes: 5172d322d34c ("crypto: arm/blake2s - add ARM scalar optimized BLAKE2s") Signed-off-by: Eric Biggers Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 0914999744e5f233d4690aab97b09c780f9c2cb0 Author: Herbert Xu Date: Mon Mar 8 16:41:32 2021 +1100 crypto: aegis128 - Move simd prototypes into aegis.h This patch fixes missing prototype warnings in crypto/aegis128-neon.c. Fixes: a4397635afea ("crypto: aegis128 - provide a SIMD...") Reported-by: kernel test robot Signed-off-by: Herbert Xu Acked-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 1663ad4936e0679443a315fe342f99636a2420dd Author: Imre Deak Date: Wed Mar 17 20:49:01 2021 +0200 drm/i915: Disable LTTPR support when the LTTPR rev < 1.4 By the specification the 0xF0000 - 0xF02FF range is only valid if the LTTPR revision at 0xF0000 is at least 1.4. Disable the LTTPR support otherwise. Fixes: 7b2a4ab8b0ef ("drm/i915: Switch to LTTPR transparent mode link training") Cc: # v5.11 Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210317184901.4029798-4-imre.deak@intel.com commit 264613b406eb0d74cd9ca582c717c5e2c5a975ea Author: Imre Deak Date: Wed Mar 17 21:01:49 2021 +0200 drm/i915: Disable LTTPR support when the DPCD rev < 1.4 By the specification the 0xF0000-0xF02FF range is only valid when the DPCD revision is 1.4 or higher. Disable LTTPR support if this isn't so. Trying to detect LTTPRs returned corrupted values for the above DPCD range at least on a Skylake host with an LG 43UD79-B monitor with a DPCD revision 1.2 connected. v2: Add the actual version check. v3: Fix s/DRPX/DPRX/ typo. Fixes: 7b2a4ab8b0ef ("drm/i915: Switch to LTTPR transparent mode link training") Cc: # v5.11 Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210317190149.4032966-1-imre.deak@intel.com commit 984982f3ef7b240cd24c2feb2762d81d9d8da3c2 Author: Imre Deak Date: Wed Mar 17 20:48:59 2021 +0200 drm/i915/ilk-glk: Fix link training on links with LTTPRs The spec requires to use at least 3.2ms for the AUX timeout period if there are LT-tunable PHY Repeaters on the link (2.11.2). An upcoming spec update makes this more specific, by requiring a 3.2ms minimum timeout period for the LTTPR detection reading the 0xF0000-0xF0007 range (3.6.5.1). Accordingly disable LTTPR detection until GLK, where the maximum timeout we can set is only 1.6ms. Link training in the non-transparent mode is known to fail at least on some SKL systems with a WD19 dock on the link, which exposes an LTTPR (see the References below). While this could have different reasons besides the too short AUX timeout used, not detecting LTTPRs (and so not using the non-transparent LT mode) fixes link training on these systems. While at it add a code comment about the platform specific maximum timeout values. v2: Add a comment about the g4x maximum timeout as well. (Ville) Reported-by: Takashi Iwai Reported-and-tested-by: Santiago Zarate Reported-and-tested-by: Bodo Graumann References: https://gitlab.freedesktop.org/drm/intel/-/issues/3166 Fixes: b30edfd8d0b4 ("drm/i915: Switch to LTTPR non-transparent mode link training") Cc: # v5.11 Cc: Takashi Iwai Cc: Ville Syrjälä Signed-off-by: Imre Deak Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210317184901.4029798-2-imre.deak@intel.com commit 7d2636e9d6dd884ae2ec6127f29963d4da0dfe6e Author: Krzysztof Kozlowski Date: Mon Mar 15 13:43:13 2021 +0100 arm64: dts: exynos: white-space cleanups Fixup white-space issue: WARNING: please, no spaces at the start of a line Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210315124313.114842-3-krzysztof.kozlowski@canonical.com commit 4a4f3a07a5c419ee8e527ff2c9a35eae93c3d04e Author: Krzysztof Kozlowski Date: Mon Mar 15 13:43:12 2021 +0100 ARM: dts: exynos: white-space cleanups Fixups some white-space issues. Checkpatch reported: WARNING: Block comments should align the * on each line WARNING: please, no spaces at the start of a line ERROR: code indent should use tabs where possible Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210315124313.114842-2-krzysztof.kozlowski@canonical.com commit 61342bc64d03d88fbdddde6247f490504257f36d Author: Krzysztof Kozlowski Date: Mon Mar 15 13:43:11 2021 +0100 ARM: dts: exynos: replace deprecated NTC/Murata compatibles The compatibles with "ntc" vendor prefix become deprecated and "murata" should be used. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210315124313.114842-1-krzysztof.kozlowski@canonical.com commit e312c97ea253f076f11ac38cbe81075a48557f65 Author: Liu xuzhi Date: Thu Mar 18 17:31:31 2021 -0700 fs/ext2/: fix misspellings using codespell tool A typo is found out by codespell tool in 1107th lines of super.c: $ codespell ./fs/ext2/ ./super.c:1107: fileystem ==> filesystem Fix a typo found by codespell. Link: https://lore.kernel.org/r/20210319003131.484738-1-liu.xuzhi@zte.com.cn Signed-off-by: Liu xuzhi Signed-off-by: Jan Kara commit ea35d8677811296730e762a2888cda3f01d13a89 Author: Sergey Senozhatsky Date: Fri Mar 19 14:45:08 2021 +0900 MAINTAINERS: update Senozhatsky email address I don't check my @gmail.com addresses often enough these days. Signed-off-by: Sergey Senozhatsky Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210319054508.124762-1-senozhatsky@chromium.org commit 8518c6486c2b8355e0781f8ee53c3c3f8427d96c Author: huangjianghui Date: Fri Mar 19 09:38:54 2021 +0800 ALSA: hda: Fix spelling mistakes Signed-off-by: huangjianghui Link: https://lore.kernel.org/r/20210319013854.48830-1-huangjianghui@uniontech.com Signed-off-by: Takashi Iwai commit 9f961c2e08741579aa53095d0dbffbcb25a9ae66 Author: Marco Elver Date: Fri Mar 5 20:42:05 2021 +0100 lib/vsprintf: do not show no_hash_pointers message multiple times Do not show no_hash_pointers message multiple times if the option was passed more than once (e.g. via generated command line). Signed-off-by: Marco Elver Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210305194206.3165917-1-elver@google.com commit 67a175a9707920abd0f437d64d86f3e66d992d2f Author: Bhaskar Chowdhury Date: Thu Mar 18 16:30:46 2021 +0530 drm/meson: Fix few typo s/initialy/initially/ s/desined/designed/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20210318110046.14830-1-unixbhaskar@gmail.com commit e5dd4e2181f70129f38af1ec36902608e681f84d Author: Bhaskar Chowdhury Date: Fri Mar 19 10:07:01 2021 +0530 drm/i915/display: Fix a typo s/nothign/nothing/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210319043701.14105-1-unixbhaskar@gmail.com commit fcf044891c84e38fc90eb736b818781bccf94e38 Author: Florian Fainelli Date: Thu Mar 18 21:03:33 2021 -0700 ARM: Qualify enabling of swiotlb_init() We do not need a SWIOTLB unless we have DRAM that is addressable beyond the arm_dma_limit. Compare max_pfn with arm_dma_pfn_limit to determine whether we do need a SWIOTLB to be initialized. Fixes: ad3c7b18c5b3 ("arm: use swiotlb for bounce buffering on LPAE configs") Signed-off-by: Florian Fainelli Signed-off-by: Konrad Rzeszutek Wilk commit 2cbc2776efe4faed0e17c48ae076aa03a0fcc61f Author: Christoph Hellwig Date: Thu Mar 18 17:14:24 2021 +0100 swiotlb: remove swiotlb_nr_tbl All callers just use it to check if swiotlb is active at all, for which they can just use is_swiotlb_active. In the longer run drivers need to stop using is_swiotlb_active as well, but let's do the simple step first. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 2d29960af0bee8cc6731b9bd3964850c9e7a6840 Author: Christoph Hellwig Date: Thu Mar 18 17:14:23 2021 +0100 swiotlb: dynamically allocate io_tlb_default_mem Instead of allocating ->list and ->orig_addr separately just do one dynamic allocation for the actual io_tlb_mem structure. This simplifies a lot of the initialization code, and also allows to just check io_tlb_default_mem to see if swiotlb is in use. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 73f620951b2b594bdc38722c0d647c3b3312af7a Author: Claire Chang Date: Thu Mar 18 17:14:22 2021 +0100 swiotlb: move global variables into a new io_tlb_mem structure Added a new struct, io_tlb_mem, as the IO TLB memory pool descriptor and moved relevant global variables into that struct. This will be useful later to allow for restricted DMA pool. Signed-off-by: Claire Chang [hch: rebased] Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit cba3ebfc008e89a58788b2055e82c95331aaefa7 Author: Lee Jones Date: Wed Mar 17 09:12:29 2021 +0000 scsi: ibmvscsi_tgt: Remove duplicate section 'NOTE' Fixes the following W=1 kernel build warning(s): drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c:136: warning: duplicate section name 'NOTE' Link: https://lore.kernel.org/r/20210317091230.2912389-36-lee.jones@linaro.org Cc: Michael Cyr Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Dave Boutcher Cc: Santiago Leon Cc: Linda Xie Cc: FUJITA Tomonori Cc: "Nicholas A. Bellinger" Cc: "Bryant G. Ly" Cc: linux-scsi@vger.kernel.org Cc: target-devel@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit dd9c772971485d611d790a8d88546f8126de82ea Author: Lee Jones Date: Wed Mar 17 09:12:28 2021 +0000 scsi: ibmvscsi: Fix a bunch of misdocumentation Fixes the following W=1 kernel build warning(s): drivers/scsi/ibmvscsi/ibmvfc.c:331: warning: Function parameter or member 'vhost' not described in 'ibmvfc_get_err_result' drivers/scsi/ibmvscsi/ibmvfc.c:653: warning: Excess function parameter 'job_step' description in 'ibmvfc_del_tgt' drivers/scsi/ibmvscsi/ibmvfc.c:773: warning: Function parameter or member 'queue' not described in 'ibmvfc_init_event_pool' drivers/scsi/ibmvscsi/ibmvfc.c:773: warning: Function parameter or member 'size' not described in 'ibmvfc_init_event_pool' drivers/scsi/ibmvscsi/ibmvfc.c:823: warning: Function parameter or member 'queue' not described in 'ibmvfc_free_event_pool' drivers/scsi/ibmvscsi/ibmvfc.c:1413: warning: Function parameter or member 'vhost' not described in 'ibmvfc_gather_partition_info' drivers/scsi/ibmvscsi/ibmvfc.c:1483: warning: Function parameter or member 'queue' not described in 'ibmvfc_get_event' drivers/scsi/ibmvscsi/ibmvfc.c:1483: warning: Excess function parameter 'vhost' description in 'ibmvfc_get_event' drivers/scsi/ibmvscsi/ibmvfc.c:1630: warning: Function parameter or member 't' not described in 'ibmvfc_timeout' drivers/scsi/ibmvscsi/ibmvfc.c:1630: warning: Excess function parameter 'evt' description in 'ibmvfc_timeout' drivers/scsi/ibmvscsi/ibmvfc.c:1893: warning: Function parameter or member 'shost' not described in 'ibmvfc_queuecommand' drivers/scsi/ibmvscsi/ibmvfc.c:1893: warning: Excess function parameter 'done' description in 'ibmvfc_queuecommand' drivers/scsi/ibmvscsi/ibmvfc.c:2324: warning: Function parameter or member 'rport' not described in 'ibmvfc_match_rport' drivers/scsi/ibmvscsi/ibmvfc.c:2324: warning: Excess function parameter 'device' description in 'ibmvfc_match_rport' drivers/scsi/ibmvscsi/ibmvfc.c:3133: warning: Function parameter or member 'evt_doneq' not described in 'ibmvfc_handle_crq' drivers/scsi/ibmvscsi/ibmvfc.c:3317: warning: Excess function parameter 'reason' description in 'ibmvfc_change_queue_depth' drivers/scsi/ibmvscsi/ibmvfc.c:3390: warning: Function parameter or member 'attr' not described in 'ibmvfc_show_log_level' drivers/scsi/ibmvscsi/ibmvfc.c:3413: warning: Function parameter or member 'attr' not described in 'ibmvfc_store_log_level' drivers/scsi/ibmvscsi/ibmvfc.c:3413: warning: Function parameter or member 'count' not described in 'ibmvfc_store_log_level' drivers/scsi/ibmvscsi/ibmvfc.c:4121: warning: Function parameter or member 'done' not described in '__ibmvfc_tgt_get_implicit_logout_evt' drivers/scsi/ibmvscsi/ibmvfc.c:4438: warning: Function parameter or member 't' not described in 'ibmvfc_adisc_timeout' drivers/scsi/ibmvscsi/ibmvfc.c:4438: warning: Excess function parameter 'tgt' description in 'ibmvfc_adisc_timeout' drivers/scsi/ibmvscsi/ibmvfc.c:4641: warning: Function parameter or member 'target' not described in 'ibmvfc_alloc_target' drivers/scsi/ibmvscsi/ibmvfc.c:4641: warning: Excess function parameter 'scsi_id' description in 'ibmvfc_alloc_target' drivers/scsi/ibmvscsi/ibmvfc.c:5068: warning: Function parameter or member 'evt' not described in 'ibmvfc_npiv_logout_done' drivers/scsi/ibmvscsi/ibmvfc.c:5068: warning: Excess function parameter 'vhost' description in 'ibmvfc_npiv_logout_done' Link: https://lore.kernel.org/r/20210317091230.2912389-35-lee.jones@linaro.org Cc: Tyrel Datwyler Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Brian King Cc: linux-scsi@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 841d7df0d416dc9859f2f957c7bb0830125bd537 Author: Lee Jones Date: Wed Mar 17 09:12:27 2021 +0000 scsi: ibmvscsi: Fix a bunch of kernel-doc related issues Fixes the following W=1 kernel build warning(s): drivers/scsi/ibmvscsi/ibmvscsi.c:143: warning: Function parameter or member 'hostdata' not described in 'ibmvscsi_release_crq_queue' drivers/scsi/ibmvscsi/ibmvscsi.c:143: warning: Function parameter or member 'max_requests' not described in 'ibmvscsi_release_crq_queue' drivers/scsi/ibmvscsi/ibmvscsi.c:143: warning: expecting prototype for release_crq_queue(). Prototype was for ibmvscsi_release_crq_queue() instead drivers/scsi/ibmvscsi/ibmvscsi.c:286: warning: expecting prototype for reset_crq_queue(). Prototype was for ibmvscsi_reset_crq_queue() instead drivers/scsi/ibmvscsi/ibmvscsi.c:328: warning: Function parameter or member 'max_requests' not described in 'ibmvscsi_init_crq_queue' drivers/scsi/ibmvscsi/ibmvscsi.c:328: warning: expecting prototype for initialize_crq_queue(). Prototype was for ibmvscsi_init_crq_queue() instead drivers/scsi/ibmvscsi/ibmvscsi.c:414: warning: expecting prototype for reenable_crq_queue(). Prototype was for ibmvscsi_reenable_crq_queue() instead drivers/scsi/ibmvscsi/ibmvscsi.c:536: warning: expecting prototype for ibmvscsi_free(). Prototype was for free_event_struct() instead drivers/scsi/ibmvscsi/ibmvscsi.c:558: warning: expecting prototype for get_evt_struct(). Prototype was for get_event_struct() instead drivers/scsi/ibmvscsi/ibmvscsi.c:587: warning: Function parameter or member 'evt_struct' not described in 'init_event_struct' drivers/scsi/ibmvscsi/ibmvscsi.c:587: warning: Excess function parameter 'evt' description in 'init_event_struct' drivers/scsi/ibmvscsi/ibmvscsi.c:608: warning: Function parameter or member 'cmd' not described in 'set_srp_direction' drivers/scsi/ibmvscsi/ibmvscsi.c:608: warning: Function parameter or member 'srp_cmd' not described in 'set_srp_direction' drivers/scsi/ibmvscsi/ibmvscsi.c:608: warning: Function parameter or member 'numbuf' not described in 'set_srp_direction' drivers/scsi/ibmvscsi/ibmvscsi.c:641: warning: Function parameter or member 'evt_struct' not described in 'unmap_cmd_data' drivers/scsi/ibmvscsi/ibmvscsi.c:683: warning: Function parameter or member 'evt_struct' not described in 'map_sg_data' drivers/scsi/ibmvscsi/ibmvscsi.c:757: warning: Function parameter or member 'evt_struct' not described in 'map_data_for_srp_cmd' drivers/scsi/ibmvscsi/ibmvscsi.c:783: warning: Function parameter or member 'error_code' not described in 'purge_requests' drivers/scsi/ibmvscsi/ibmvscsi.c:846: warning: Function parameter or member 't' not described in 'ibmvscsi_timeout' drivers/scsi/ibmvscsi/ibmvscsi.c:846: warning: Excess function parameter 'evt_struct' description in 'ibmvscsi_timeout' drivers/scsi/ibmvscsi/ibmvscsi.c:1043: warning: Function parameter or member 'cmnd' not described in 'ibmvscsi_queuecommand_lck' drivers/scsi/ibmvscsi/ibmvscsi.c:1043: warning: expecting prototype for ibmvscsi_queue(). Prototype was for ibmvscsi_queuecommand_lck() instead drivers/scsi/ibmvscsi/ibmvscsi.c:1351: warning: expecting prototype for init_host(). Prototype was for enable_fast_fail() instead drivers/scsi/ibmvscsi/ibmvscsi.c:1464: warning: Function parameter or member 'hostdata' not described in 'init_adapter' drivers/scsi/ibmvscsi/ibmvscsi.c:1475: warning: Function parameter or member 'evt_struct' not described in 'sync_completion' drivers/scsi/ibmvscsi/ibmvscsi.c:1488: warning: Function parameter or member 'cmd' not described in 'ibmvscsi_eh_abort_handler' drivers/scsi/ibmvscsi/ibmvscsi.c:1488: warning: expecting prototype for ibmvscsi_abort(). Prototype was for ibmvscsi_eh_abort_handler() instead drivers/scsi/ibmvscsi/ibmvscsi.c:1627: warning: Function parameter or member 'cmd' not described in 'ibmvscsi_eh_device_reset_handler' drivers/scsi/ibmvscsi/ibmvscsi.c:1893: warning: Excess function parameter 'reason' description in 'ibmvscsi_change_queue_depth' drivers/scsi/ibmvscsi/ibmvscsi.c:2221: warning: Function parameter or member 'vdev' not described in 'ibmvscsi_probe' drivers/scsi/ibmvscsi/ibmvscsi.c:2221: warning: Function parameter or member 'id' not described in 'ibmvscsi_probe' drivers/scsi/ibmvscsi/ibmvscsi.c:2221: warning: expecting prototype for Called by bus code for each adapter(). Prototype was for ibmvscsi_probe() instead drivers/scsi/ibmvscsi/ibmvscsi.c:2381: warning: cannot understand function prototype: 'const struct vio_device_id ibmvscsi_device_table[] = ' [mkp: fix checkpatch whitespace warning] Link: https://lore.kernel.org/r/20210317091230.2912389-34-lee.jones@linaro.org Cc: Tyrel Datwyler Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Colin DeVilbiss Cc: Santiago Leon Cc: Dave Boutcher Cc: linux-scsi@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a690baa47fd171f01ef9ec9f8c4ab89bfffa80c5 Author: Lee Jones Date: Wed Mar 17 09:12:30 2021 +0000 scsi: cxlflash: Fix some misnaming related doc-rot Fixes the following W=1 kernel build warning(s): drivers/scsi/cxlflash/vlun.c:48: warning: Function parameter or member 'release' not described in 'marshal_clone_to_rele' drivers/scsi/cxlflash/vlun.c:48: warning: Excess function parameter 'rele' description in 'marshal_clone_to_rele' drivers/scsi/cxlflash/vlun.c:238: warning: Function parameter or member 'bali' not described in 'validate_alloc' drivers/scsi/cxlflash/vlun.c:238: warning: Excess function parameter 'ba_lun_info' description in 'validate_alloc' drivers/scsi/cxlflash/vlun.c:308: warning: Function parameter or member 'to_clone' not described in 'ba_clone' drivers/scsi/cxlflash/vlun.c:308: warning: Excess function parameter 'to_free' description in 'ba_clone' drivers/scsi/cxlflash/vlun.c:369: warning: Function parameter or member 'lli' not described in 'init_vlun' drivers/scsi/cxlflash/vlun.c:369: warning: Excess function parameter 'lun_info' description in 'init_vlun' Link: https://lore.kernel.org/r/20210317091230.2912389-37-lee.jones@linaro.org Cc: "Manoj N. Kumar" Cc: "Matthew R. Ochs" Cc: Uma Krishnan Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 32b3edfd28f843e84e7db8ceb32c7a62a35b5ba6 Author: Lee Jones Date: Wed Mar 17 09:12:26 2021 +0000 scsi: cxlflash: Fix a few misnaming issues Fixes the following W=1 kernel build warning(s): drivers/scsi/cxlflash/superpipe.c:38: warning: Function parameter or member 'release' not described in 'marshal_rele_to_resize' drivers/scsi/cxlflash/superpipe.c:38: warning: Excess function parameter 'rele' description in 'marshal_rele_to_resize' drivers/scsi/cxlflash/superpipe.c:51: warning: Function parameter or member 'release' not described in 'marshal_det_to_rele' drivers/scsi/cxlflash/superpipe.c:51: warning: Excess function parameter 'rele' description in 'marshal_det_to_rele' drivers/scsi/cxlflash/superpipe.c:528: warning: expecting prototype for rhte_format1(). Prototype was for rht_format1() instead Link: https://lore.kernel.org/r/20210317091230.2912389-33-lee.jones@linaro.org Cc: "Manoj N. Kumar" Cc: "Matthew R. Ochs" Cc: Uma Krishnan Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit cf0ad7a15ac5a5f5985493c293824459e486192f Author: Lee Jones Date: Wed Mar 17 09:12:25 2021 +0000 scsi: cxlflash: Fix a little doc-rot Fixes the following W=1 kernel build warning(s): drivers/scsi/cxlflash/main.c:1369: warning: Function parameter or member 'hwq' not described in 'process_hrrq' drivers/scsi/cxlflash/main.c:1369: warning: Excess function parameter 'afu' description in 'process_hrrq' drivers/scsi/cxlflash/main.c:2005: warning: Function parameter or member 'index' not described in 'init_mc' drivers/scsi/cxlflash/main.c:3303: warning: Function parameter or member 'lunprov' not described in 'cxlflash_lun_provision' drivers/scsi/cxlflash/main.c:3303: warning: Excess function parameter 'arg' description in 'cxlflash_lun_provision' drivers/scsi/cxlflash/main.c:3397: warning: Function parameter or member 'afu_dbg' not described in 'cxlflash_afu_debug' drivers/scsi/cxlflash/main.c:3397: warning: Excess function parameter 'arg' description in 'cxlflash_afu_debug' Link: https://lore.kernel.org/r/20210317091230.2912389-32-lee.jones@linaro.org Cc: "Manoj N. Kumar" Cc: "Matthew R. Ochs" Cc: Uma Krishnan Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 188f513dd22c6b304a3a89c2919a8569ef0a7c36 Author: Lee Jones Date: Wed Mar 17 09:12:24 2021 +0000 scsi: isci: remote_node_table: Provide some missing params and remove others Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/remote_node_table.c:113: warning: Function parameter or member 'group_table_index' not described in 'sci_remote_node_table_clear_group_index' drivers/scsi/isci/remote_node_table.c:113: warning: Excess function parameter 'set_index' description in 'sci_remote_node_table_clear_group_index' drivers/scsi/isci/remote_node_table.c:262: warning: Function parameter or member 'group_index' not described in 'sci_remote_node_table_set_group' drivers/scsi/isci/remote_node_table.c:383: warning: Function parameter or member 'group_table_index' not described in 'sci_remote_node_table_allocate_single_remote_node' drivers/scsi/isci/remote_node_table.c:383: warning: Excess function parameter 'table_index' description in 'sci_remote_node_table_allocate_single_remote_node' drivers/scsi/isci/remote_node_table.c:516: warning: Function parameter or member 'remote_node_index' not described in 'sci_remote_node_table_release_single_remote_node' drivers/scsi/isci/remote_node_table.c:562: warning: Function parameter or member 'remote_node_index' not described in 'sci_remote_node_table_release_triple_remote_node' drivers/scsi/isci/remote_node_table.c:588: warning: Function parameter or member 'remote_node_index' not described in 'sci_remote_node_table_release_remote_node_index' Link: https://lore.kernel.org/r/20210317091230.2912389-31-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit d2d480f132e8d1c280f85bb3c324cee7d81fdf78 Author: Lee Jones Date: Wed Mar 17 09:12:23 2021 +0000 scsi: isci: remote_node_context: Demote kernel-doc abuse Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/remote_node_context.c:206: warning: Function parameter or member 'rnc' not described in 'sci_remote_node_context_notify_user' drivers/scsi/isci/remote_node_context.c:206: warning: expecting prototype for This method just calls the user callback function and then resets the(). Prototype was for sci_remote_node_context_notify_user() instead Link: https://lore.kernel.org/r/20210317091230.2912389-30-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7292a8b039c579a4e7eda880ea8c0be53ac16f43 Author: Lee Jones Date: Wed Mar 17 09:12:22 2021 +0000 scsi: isci: port: Fix a bunch of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/port.c:130: warning: Function parameter or member 'iport' not described in 'sci_port_get_properties' drivers/scsi/isci/port.c:130: warning: Function parameter or member 'prop' not described in 'sci_port_get_properties' drivers/scsi/isci/port.c:130: warning: Excess function parameter 'port' description in 'sci_port_get_properties' drivers/scsi/isci/port.c:130: warning: Excess function parameter 'properties' description in 'sci_port_get_properties' drivers/scsi/isci/port.c:243: warning: Function parameter or member 'isci_phy' not described in 'isci_port_link_down' drivers/scsi/isci/port.c:243: warning: Function parameter or member 'isci_port' not described in 'isci_port_link_down' drivers/scsi/isci/port.c:243: warning: Excess function parameter 'phy' description in 'isci_port_link_down' drivers/scsi/isci/port.c:243: warning: Excess function parameter 'port' description in 'isci_port_link_down' drivers/scsi/isci/port.c:318: warning: Function parameter or member 'isci_port' not described in 'isci_port_hard_reset_complete' drivers/scsi/isci/port.c:318: warning: Excess function parameter 'port' description in 'isci_port_hard_reset_complete' drivers/scsi/isci/port.c:398: warning: Cannot understand * drivers/scsi/isci/port.c:544: warning: Function parameter or member 'iport' not described in 'sci_port_construct_dummy_rnc' drivers/scsi/isci/port.c:544: warning: Excess function parameter 'sci_port' description in 'sci_port_construct_dummy_rnc' drivers/scsi/isci/port.c:692: warning: Function parameter or member 'iport' not described in 'sci_port_general_link_up_handler' drivers/scsi/isci/port.c:692: warning: Function parameter or member 'iphy' not described in 'sci_port_general_link_up_handler' drivers/scsi/isci/port.c:692: warning: Excess function parameter 'sci_port' description in 'sci_port_general_link_up_handler' drivers/scsi/isci/port.c:692: warning: Excess function parameter 'sci_phy' description in 'sci_port_general_link_up_handler' drivers/scsi/isci/port.c:719: warning: wrong kernel-doc identifier on line: drivers/scsi/isci/port.c:756: warning: Function parameter or member 'iport' not described in 'sci_port_link_detected' drivers/scsi/isci/port.c:756: warning: Function parameter or member 'iphy' not described in 'sci_port_link_detected' drivers/scsi/isci/port.c:756: warning: expecting prototype for if the(). Prototype was for sci_port_link_detected() instead drivers/scsi/isci/port.c:821: warning: wrong kernel-doc identifier on line: drivers/scsi/isci/port.c:885: warning: Function parameter or member 'iport' not described in 'sci_port_post_dummy_request' drivers/scsi/isci/port.c:885: warning: Excess function parameter 'sci_port' description in 'sci_port_post_dummy_request' drivers/scsi/isci/port.c:909: warning: Function parameter or member 'iport' not described in 'sci_port_abort_dummy_request' drivers/scsi/isci/port.c:909: warning: expecting prototype for This will alow the hardware to(). Prototype was for sci_port_abort_dummy_request() instead drivers/scsi/isci/port.c:926: warning: Cannot understand * drivers/scsi/isci/port.c:1017: warning: Cannot understand * drivers/scsi/isci/port.c:1199: warning: Function parameter or member 'iport' not described in 'sci_port_add_phy' drivers/scsi/isci/port.c:1199: warning: Function parameter or member 'iphy' not described in 'sci_port_add_phy' drivers/scsi/isci/port.c:1199: warning: Excess function parameter 'sci_port' description in 'sci_port_add_phy' drivers/scsi/isci/port.c:1199: warning: Excess function parameter 'sci_phy' description in 'sci_port_add_phy' drivers/scsi/isci/port.c:1270: warning: Function parameter or member 'iport' not described in 'sci_port_remove_phy' drivers/scsi/isci/port.c:1270: warning: Function parameter or member 'iphy' not described in 'sci_port_remove_phy' drivers/scsi/isci/port.c:1270: warning: Excess function parameter 'sci_port' description in 'sci_port_remove_phy' drivers/scsi/isci/port.c:1270: warning: Excess function parameter 'sci_phy' description in 'sci_port_remove_phy' [mkp: fixed typo alow->allow] Link: https://lore.kernel.org/r/20210317091230.2912389-29-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a8604e44514d772785764298ccad3c5974fdee78 Author: Lee Jones Date: Wed Mar 17 09:12:21 2021 +0000 scsi: isci: request: Fix doc-rot issue relating to 'ireq' param Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/request.c:496: warning: Function parameter or member 'ireq' not described in 'scu_sata_request_construct_task_context' drivers/scsi/isci/request.c:496: warning: Excess function parameter 'sci_req' description in 'scu_sata_request_construct_task_context' Link: https://lore.kernel.org/r/20210317091230.2912389-28-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 242e15d7a4f4087903e7a472e724f92c896d5b6e Author: Lee Jones Date: Wed Mar 17 09:12:20 2021 +0000 scsi: isci: remote_device: Fix a bunch of doc-rot issues Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/remote_device.c:299: warning: Function parameter or member 'ihost' not described in 'isci_remote_device_not_ready' drivers/scsi/isci/remote_device.c:299: warning: Function parameter or member 'idev' not described in 'isci_remote_device_not_ready' drivers/scsi/isci/remote_device.c:299: warning: Function parameter or member 'reason' not described in 'isci_remote_device_not_ready' drivers/scsi/isci/remote_device.c:299: warning: Excess function parameter 'isci_host' description in 'isci_remote_device_not_ready' drivers/scsi/isci/remote_device.c:299: warning: Excess function parameter 'isci_device' description in 'isci_remote_device_not_ready' drivers/scsi/isci/remote_device.c:1015: warning: Function parameter or member 'idev' not described in 'sci_remote_device_destruct' drivers/scsi/isci/remote_device.c:1015: warning: Excess function parameter 'remote_device' description in 'sci_remote_device_destruct' drivers/scsi/isci/remote_device.c:1249: warning: Function parameter or member 'iport' not described in 'sci_remote_device_construct' drivers/scsi/isci/remote_device.c:1249: warning: Function parameter or member 'idev' not described in 'sci_remote_device_construct' drivers/scsi/isci/remote_device.c:1249: warning: Excess function parameter 'sci_port' description in 'sci_remote_device_construct' drivers/scsi/isci/remote_device.c:1249: warning: Excess function parameter 'sci_dev' description in 'sci_remote_device_construct' drivers/scsi/isci/remote_device.c:1275: warning: Function parameter or member 'iport' not described in 'sci_remote_device_da_construct' drivers/scsi/isci/remote_device.c:1275: warning: Function parameter or member 'idev' not described in 'sci_remote_device_da_construct' drivers/scsi/isci/remote_device.c:1311: warning: Function parameter or member 'iport' not described in 'sci_remote_device_ea_construct' drivers/scsi/isci/remote_device.c:1311: warning: Function parameter or member 'idev' not described in 'sci_remote_device_ea_construct' drivers/scsi/isci/remote_device.c:1453: warning: Function parameter or member 'idev' not described in 'sci_remote_device_start' drivers/scsi/isci/remote_device.c:1453: warning: Excess function parameter 'remote_device' description in 'sci_remote_device_start' drivers/scsi/isci/remote_device.c:1513: warning: Function parameter or member 'ihost' not described in 'isci_remote_device_alloc' drivers/scsi/isci/remote_device.c:1513: warning: Function parameter or member 'iport' not described in 'isci_remote_device_alloc' drivers/scsi/isci/remote_device.c:1513: warning: expecting prototype for This function builds the isci_remote_device when a libsas dev_found message(). Prototype was for isci_remote_device_alloc() instead drivers/scsi/isci/remote_device.c:1558: warning: Function parameter or member 'ihost' not described in 'isci_remote_device_stop' drivers/scsi/isci/remote_device.c:1558: warning: Function parameter or member 'idev' not described in 'isci_remote_device_stop' drivers/scsi/isci/remote_device.c:1558: warning: Excess function parameter 'isci_host' description in 'isci_remote_device_stop' drivers/scsi/isci/remote_device.c:1558: warning: Excess function parameter 'isci_device' description in 'isci_remote_device_stop' drivers/scsi/isci/remote_device.c:1592: warning: Function parameter or member 'dev' not described in 'isci_remote_device_gone' drivers/scsi/isci/remote_device.c:1592: warning: Excess function parameter 'domain_device' description in 'isci_remote_device_gone' drivers/scsi/isci/remote_device.c:1614: warning: Function parameter or member 'dev' not described in 'isci_remote_device_found' drivers/scsi/isci/remote_device.c:1614: warning: Excess function parameter 'domain_device' description in 'isci_remote_device_found' Link: https://lore.kernel.org/r/20210317091230.2912389-27-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 29faa5ce26ae7880821220b08a457ac2a87b3f0c Author: Lee Jones Date: Wed Mar 17 09:12:19 2021 +0000 scsi: isci: port_config: Fix a bunch of doc-rot and demote abuses Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/port_config.c:76: warning: Cannot understand * drivers/scsi/isci/port_config.c:105: warning: Cannot understand * drivers/scsi/isci/port_config.c:148: warning: Cannot understand * drivers/scsi/isci/port_config.c:376: warning: Cannot understand * drivers/scsi/isci/port_config.c:607: warning: Function parameter or member 'ihost' not described in 'sci_apc_agent_link_up' drivers/scsi/isci/port_config.c:607: warning: Function parameter or member 'port_agent' not described in 'sci_apc_agent_link_up' drivers/scsi/isci/port_config.c:607: warning: Function parameter or member 'iport' not described in 'sci_apc_agent_link_up' drivers/scsi/isci/port_config.c:607: warning: Function parameter or member 'iphy' not described in 'sci_apc_agent_link_up' drivers/scsi/isci/port_config.c:607: warning: Excess function parameter 'scic' description in 'sci_apc_agent_link_up' drivers/scsi/isci/port_config.c:607: warning: Excess function parameter 'sci_port' description in 'sci_apc_agent_link_up' drivers/scsi/isci/port_config.c:607: warning: Excess function parameter 'sci_phy' description in 'sci_apc_agent_link_up' drivers/scsi/isci/port_config.c:623: warning: Cannot understand * drivers/scsi/isci/port_config.c:701: warning: Cannot understand * Link: https://lore.kernel.org/r/20210317091230.2912389-26-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ad276048f1bce4d97040cde64eeef61a552c708e Author: Lee Jones Date: Wed Mar 17 09:12:18 2021 +0000 scsi: isci: remote_node_context: Fix one function header and demote a couple more Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/remote_node_context.c:77: warning: Cannot understand * drivers/scsi/isci/remote_node_context.c:167: warning: Cannot understand * drivers/scsi/isci/remote_node_context.c:206: warning: Cannot understand * Link: https://lore.kernel.org/r/20210317091230.2912389-25-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 103d61927ed34243964918459fb3f346d59be766 Author: Lee Jones Date: Wed Mar 17 09:12:17 2021 +0000 scsi: isci: remote_node_table: Fix a bunch of kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/remote_node_table.c:66: warning: Incorrect use of kernel-doc format: * drivers/scsi/isci/remote_node_table.c:80: warning: Function parameter or member 'remote_node_table' not described in 'sci_remote_node_table_get_group_index' drivers/scsi/isci/remote_node_table.c:80: warning: Function parameter or member 'group_table_index' not described in 'sci_remote_node_table_get_group_index' drivers/scsi/isci/remote_node_table.c:80: warning: expecting prototype for This file contains the implementation of the SCIC_SDS_REMOTE_NODE_TABLE(). Prototype was for sci_remote_node_table_get_group_index() instead drivers/scsi/isci/remote_node_table.c:101: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:131: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:161: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:194: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:227: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:256: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:283: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:310: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:368: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:428: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:465: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:508: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:553: warning: Cannot understand * drivers/scsi/isci/remote_node_table.c:576: warning: Cannot understand * Link: https://lore.kernel.org/r/20210317091230.2912389-24-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 0afdee03f2e78941a494b5a7386c39966c4a5c0b Author: Lee Jones Date: Wed Mar 17 09:12:16 2021 +0000 scsi: isci: task: Demote non-conformant header and remove superfluous param Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/task.c:383: warning: Function parameter or member 'isci_host' not described in 'isci_task_send_lu_reset_sas' drivers/scsi/isci/task.c:383: warning: Function parameter or member 'isci_device' not described in 'isci_task_send_lu_reset_sas' drivers/scsi/isci/task.c:677: warning: Excess function parameter 'lun' description in 'isci_task_query_task' Link: https://lore.kernel.org/r/20210317091230.2912389-23-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 44b7ca9661287d8eb6899e6476c617f2621d2e28 Author: Lee Jones Date: Wed Mar 17 09:12:15 2021 +0000 scsi: isci: host: Fix bunch of kernel-doc related issues Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/host.c:93: warning: Cannot understand * drivers/scsi/isci/host.c:108: warning: Function parameter or member 'x' not described in 'NORMALIZE_PUT_POINTER' drivers/scsi/isci/host.c:121: warning: Function parameter or member 'x' not described in 'NORMALIZE_EVENT_POINTER' drivers/scsi/isci/host.c:130: warning: Function parameter or member 'x' not described in 'NORMALIZE_GET_POINTER' drivers/scsi/isci/host.c:139: warning: Function parameter or member 'x' not described in 'NORMALIZE_GET_POINTER_CYCLE_BIT' drivers/scsi/isci/host.c:146: warning: Function parameter or member 'x' not described in 'COMPLETION_QUEUE_CYCLE_BIT' drivers/scsi/isci/host.c:646: warning: Function parameter or member 'ihost' not described in 'isci_host_start_complete' drivers/scsi/isci/host.c:646: warning: Excess function parameter 'isci_host' description in 'isci_host_start_complete' drivers/scsi/isci/host.c:680: warning: Function parameter or member 'ihost' not described in 'sci_controller_get_suggested_start_timeout' drivers/scsi/isci/host.c:680: warning: Excess function parameter 'controller' description in 'sci_controller_get_suggested_start_timeout' drivers/scsi/isci/host.c:903: warning: Function parameter or member 'ihost' not described in 'sci_controller_start_next_phy' drivers/scsi/isci/host.c:903: warning: Excess function parameter 'scic' description in 'sci_controller_start_next_phy' drivers/scsi/isci/host.c:1159: warning: Function parameter or member 'ihost' not described in 'sci_controller_stop' drivers/scsi/isci/host.c:1159: warning: Excess function parameter 'controller' description in 'sci_controller_stop' drivers/scsi/isci/host.c:1184: warning: Function parameter or member 'ihost' not described in 'sci_controller_reset' drivers/scsi/isci/host.c:1184: warning: Excess function parameter 'controller' description in 'sci_controller_reset' drivers/scsi/isci/host.c:1352: warning: Function parameter or member 'ihost' not described in 'sci_controller_set_interrupt_coalescence' drivers/scsi/isci/host.c:1352: warning: Excess function parameter 'controller' description in 'sci_controller_set_interrupt_coalescence' drivers/scsi/isci/host.c:2498: warning: Function parameter or member 'ihost' not described in 'sci_controller_allocate_remote_node_context' drivers/scsi/isci/host.c:2498: warning: Function parameter or member 'idev' not described in 'sci_controller_allocate_remote_node_context' drivers/scsi/isci/host.c:2498: warning: expecting prototype for This method allocates remote node index and the reserves the remote node(). Prototype was for sci_controller_allocate_remote_node_context() instead drivers/scsi/isci/host.c:2721: warning: Function parameter or member 'ihost' not described in 'sci_controller_start_task' drivers/scsi/isci/host.c:2721: warning: Function parameter or member 'idev' not described in 'sci_controller_start_task' drivers/scsi/isci/host.c:2721: warning: Function parameter or member 'ireq' not described in 'sci_controller_start_task' drivers/scsi/isci/host.c:2721: warning: Excess function parameter 'controller' description in 'sci_controller_start_task' drivers/scsi/isci/host.c:2721: warning: Excess function parameter 'remote_device' description in 'sci_controller_start_task' drivers/scsi/isci/host.c:2721: warning: Excess function parameter 'task_request' description in 'sci_controller_start_task' Link: https://lore.kernel.org/r/20210317091230.2912389-22-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit db35a083535719d8b0bb5070f8d4f1de95d33aef Author: Lee Jones Date: Wed Mar 17 09:12:14 2021 +0000 scsi: isci: request: Fix a myriad of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/request.c:211: warning: wrong kernel-doc identifier on line: drivers/scsi/isci/request.c:414: warning: wrong kernel-doc identifier on line: drivers/scsi/isci/request.c:472: warning: Function parameter or member 'ireq' not described in 'scu_ssp_task_request_construct_task_context' drivers/scsi/isci/request.c:472: warning: expecting prototype for The(). Prototype was for scu_ssp_task_request_construct_task_context() instead drivers/scsi/isci/request.c:501: warning: Function parameter or member 'ireq' not described in 'scu_sata_request_construct_task_context' drivers/scsi/isci/request.c:501: warning: expecting prototype for This method is will fill in the SCU Task Context for any type of SATA(). Prototype was for scu_sata_request_construct_task_context() instead drivers/scsi/isci/request.c:597: warning: Cannot understand * drivers/scsi/isci/request.c:785: warning: expecting prototype for sci_req_tx_bytes(). Prototype was for SCU_TASK_CONTEXT_SRAM() instead drivers/scsi/isci/request.c:1399: warning: Cannot understand * drivers/scsi/isci/request.c:1446: warning: Cannot understand * drivers/scsi/isci/request.c:2465: warning: Function parameter or member 'task' not described in 'isci_request_process_response_iu' drivers/scsi/isci/request.c:2465: warning: Excess function parameter 'sas_task' description in 'isci_request_process_response_iu' drivers/scsi/isci/request.c:2501: warning: Function parameter or member 'task' not described in 'isci_request_set_open_reject_status' drivers/scsi/isci/request.c:2524: warning: Function parameter or member 'idev' not described in 'isci_request_handle_controller_specific_errors' drivers/scsi/isci/request.c:2524: warning: Function parameter or member 'task' not described in 'isci_request_handle_controller_specific_errors' drivers/scsi/isci/request.c:3337: warning: Function parameter or member 'idev' not described in 'isci_io_request_build' drivers/scsi/isci/request.c:3337: warning: Excess function parameter 'sci_device' description in 'isci_io_request_build' [mkp: fix typo reported by checkpatch] Link: https://lore.kernel.org/r/20210317091230.2912389-21-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6ab7ca5139b76ab92141bfd4fe42a077d7ba0af5 Author: Lee Jones Date: Wed Mar 17 09:12:13 2021 +0000 scsi: isci: phy: Provide function name and demote non-conforming header Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/phy.c:354: warning: Function parameter or member 'iphy' not described in 'phy_get_non_dummy_port' drivers/scsi/isci/phy.c:354: warning: expecting prototype for If the phy is(). Prototype was for phy_get_non_dummy_port() instead drivers/scsi/isci/phy.c:371: warning: Function parameter or member 'iphy' not described in 'sci_phy_set_port' drivers/scsi/isci/phy.c:371: warning: Function parameter or member 'iport' not described in 'sci_phy_set_port' Link: https://lore.kernel.org/r/20210317091230.2912389-20-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6af1d9bd90519e669a37a74333b14fd98f916792 Author: Lee Jones Date: Wed Mar 17 09:12:10 2021 +0000 scsi: isci: phy: Fix a few different kernel-doc related issues Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/phy.c:354: warning: Function parameter or member 'iphy' not described in 'phy_get_non_dummy_port' drivers/scsi/isci/phy.c:354: warning: expecting prototype for If the phy is(). Prototype was for phy_get_non_dummy_port() instead drivers/scsi/isci/phy.c:364: warning: wrong kernel-doc identifier on line: drivers/scsi/isci/phy.c:401: warning: wrong kernel-doc identifier on line: drivers/scsi/isci/phy.c:611: warning: Function parameter or member 'iphy' not described in 'sci_phy_complete_link_training' drivers/scsi/isci/phy.c:611: warning: Excess function parameter 'sci_phy' description in 'sci_phy_complete_link_training' drivers/scsi/isci/phy.c:1170: warning: Cannot understand * drivers/scsi/isci/phy.c:1222: warning: Cannot understand * drivers/scsi/isci/phy.c:1432: warning: Function parameter or member 'sas_phy' not described in 'isci_phy_control' drivers/scsi/isci/phy.c:1432: warning: Excess function parameter 'phy' description in 'isci_phy_control' Link: https://lore.kernel.org/r/20210317091230.2912389-17-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 2efd8631d6a5c73cd3a749a9193660750fd936bb Author: Lee Jones Date: Wed Mar 17 09:12:12 2021 +0000 scsi: fnic: Kernel-doc headers must contain the function name Fixes the following W=1 kernel build warning(s): drivers/scsi/fnic/fnic_fcs.c:308: warning: expecting prototype for Check if the Received FIP FLOGI frame is rejected(). Prototype was for is_fnic_fip_flogi_reject() instead Link: https://lore.kernel.org/r/20210317091230.2912389-19-lee.jones@linaro.org Cc: Satish Kharat Cc: Sesidhar Baddela Cc: Karan Tilak Kumar Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit c7eab0704c305606d7db2a698005acee8f129ad1 Author: Lee Jones Date: Wed Mar 17 09:12:11 2021 +0000 scsi: fnic: Demote non-conformant kernel-doc headers Fixes the following W=1 kernel build warning(s): drivers/scsi/fnic/fnic_scsi.c:183: warning: Function parameter or member 'fnic' not described in '__fnic_set_state_flags' drivers/scsi/fnic/fnic_scsi.c:183: warning: Function parameter or member 'st_flags' not described in '__fnic_set_state_flags' drivers/scsi/fnic/fnic_scsi.c:183: warning: Function parameter or member 'clearbits' not described in '__fnic_set_state_flags' drivers/scsi/fnic/fnic_scsi.c:2296: warning: Function parameter or member 'fnic' not described in 'fnic_scsi_host_start_tag' drivers/scsi/fnic/fnic_scsi.c:2296: warning: Function parameter or member 'sc' not described in 'fnic_scsi_host_start_tag' drivers/scsi/fnic/fnic_scsi.c:2316: warning: Function parameter or member 'fnic' not described in 'fnic_scsi_host_end_tag' drivers/scsi/fnic/fnic_scsi.c:2316: warning: Function parameter or member 'sc' not described in 'fnic_scsi_host_end_tag' Link: https://lore.kernel.org/r/20210317091230.2912389-18-lee.jones@linaro.org Cc: Satish Kharat Cc: Sesidhar Baddela Cc: Karan Tilak Kumar Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 38cb57602369cf194556460a52bd18e53c76e13d Author: Bhaskar Chowdhury Date: Fri Mar 19 04:59:45 2021 +0530 selftests: net: forwarding: Fix a typo s/verfied/verified/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit a90a8c607570c8912479917a6878c05cfb57b724 Author: Lee Jones Date: Wed Mar 17 09:12:09 2021 +0000 scsi: be2iscsi: Demote incomplete/non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_main.c:4937: warning: Function parameter or member 'data' not described in 'beiscsi_show_boot_tgt_info' drivers/scsi/be2iscsi/be_main.c:4937: warning: Function parameter or member 'type' not described in 'beiscsi_show_boot_tgt_info' drivers/scsi/be2iscsi/be_main.c:4937: warning: Function parameter or member 'buf' not described in 'beiscsi_show_boot_tgt_info' Link: https://lore.kernel.org/r/20210317091230.2912389-16-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-drivers@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a8d548b0b3eea1d2bd35aec8900d8f11f2e4c3f1 Author: Lee Jones Date: Wed Mar 17 09:12:08 2021 +0000 scsi: mpt3sas: Fix a few kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/scsi/mpt3sas/mpt3sas_scsih.c:763: warning: Function parameter or member 'sas_address' not described in '__mpt3sas_get_sdev_by_addr' drivers/scsi/mpt3sas/mpt3sas_scsih.c:763: warning: expecting prototype for mpt3sas_get_sdev_by_addr(). Prototype was for __mpt3sas_get_sdev_by_addr() instead drivers/scsi/mpt3sas/mpt3sas_scsih.c:4535: warning: expecting prototype for _scsih_check_for_pending_internal_cmds(). Prototype was for mpt3sas_check_for_pending_internal_cmds() instead drivers/scsi/mpt3sas/mpt3sas_scsih.c:6188: warning: Function parameter or member 'port_entry' not described in '_scsih_look_and_get_matched_port_entry' drivers/scsi/mpt3sas/mpt3sas_scsih.c:6188: warning: Function parameter or member 'matched_port_entry' not described in '_scsih_look_and_get_matched_port_entry' drivers/scsi/mpt3sas/mpt3sas_scsih.c:6188: warning: Function parameter or member 'count' not described in '_scsih_look_and_get_matched_port_entry' drivers/scsi/mpt3sas/mpt3sas_scsih.c:6959: warning: Function parameter or member 'port' not described in 'mpt3sas_expander_remove' drivers/scsi/mpt3sas/mpt3sas_scsih.c:10494: warning: expecting prototype for mpt3sas_scsih_reset_handler(). Prototype was for mpt3sas_scsih_pre_reset_handler() instead drivers/scsi/mpt3sas/mpt3sas_scsih.c:10536: warning: expecting prototype for mpt3sas_scsih_reset_handler(). Prototype was for mpt3sas_scsih_reset_done_handler() instead drivers/scsi/mpt3sas/mpt3sas_scsih.c:12303: warning: expecting prototype for scsih__ncq_prio_supp(). Prototype was for scsih_ncq_prio_supp() instead Link: https://lore.kernel.org/r/20210317091230.2912389-15-lee.jones@linaro.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: MPT-FusionLinux.pdl@avagotech.com Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a364a147b1dcb3c993c4ff1e7b13fa1643288bfb Author: Lee Jones Date: Wed Mar 17 09:12:07 2021 +0000 scsi: pmcraid: Correct function name pmcraid_show_adapter_id() in header Fixes the following W=1 kernel build warning(s): drivers/scsi/pmcraid.c:4079: warning: expecting prototype for pmcraid_show_io_adapter_id(). Prototype was for pmcraid_show_adapter_id() instead Link: https://lore.kernel.org/r/20210317091230.2912389-14-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Anil Ravindranath Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 9eb292eb2ef748ed6b9acae365e8c3a6c51541af Author: Lee Jones Date: Wed Mar 17 09:12:06 2021 +0000 scsi: myrs: Add missing ':' to make the kernel-doc checker happy Fixes the following W=1 kernel build warning(s): drivers/scsi/myrs.c:1965: warning: Function parameter or member 'dev' not described in 'myrs_is_raid' drivers/scsi/myrs.c:1978: warning: Function parameter or member 'dev' not described in 'myrs_get_resync' drivers/scsi/myrs.c:2002: warning: Function parameter or member 'dev' not described in 'myrs_get_state' Link: https://lore.kernel.org/r/20210317091230.2912389-13-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Linux GmbH Cc: "Leonard N. Zubkoff" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit c548a6250627853ca59adf6823b0053ea3b6bfb7 Author: Lee Jones Date: Wed Mar 17 09:12:05 2021 +0000 scsi: a100u2w: Fix some misnaming and formatting issues Fixes the following W=1 kernel build warning(s): drivers/scsi/a100u2w.c:278: warning: expecting prototype for orc_exec_sb(). Prototype was for orc_exec_scb() instead drivers/scsi/a100u2w.c:596: warning: Function parameter or member 'target' not described in 'orc_device_reset' drivers/scsi/a100u2w.c:739: warning: Function parameter or member 'host' not described in 'orchid_abort_scb' drivers/scsi/a100u2w.c:739: warning: Function parameter or member 'scb' not described in 'orchid_abort_scb' drivers/scsi/a100u2w.c:915: warning: expecting prototype for inia100_queue(). Prototype was for inia100_queue_lck() instead Link: https://lore.kernel.org/r/20210317091230.2912389-12-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Doug Ledford Cc: Christoph Hellwig Cc: Alan Cox Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 100ec495e01e270fc3fbcea44eaad181e4c8c688 Author: Lee Jones Date: Wed Mar 17 09:12:04 2021 +0000 scsi: initio: Fix a few kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/scsi/initio.c:560: warning: Excess function parameter 'num_scbs' description in 'initio_init' drivers/scsi/initio.c:1899: warning: expecting prototype for int_initio_scsi_resel(). Prototype was for int_initio_resel() instead drivers/scsi/initio.c:2615: warning: expecting prototype for i91u_queuecommand(). Prototype was for i91u_queuecommand_lck() instead drivers/scsi/initio.c:2667: warning: Function parameter or member 'dev' not described in 'i91u_biosparam' drivers/scsi/initio.c:2667: warning: expecting prototype for i91u_biospararm(). Prototype was for i91u_biosparam() instead drivers/scsi/initio.c:2740: warning: Function parameter or member 'host_mem' not described in 'i91uSCBPost' drivers/scsi/initio.c:2740: warning: Function parameter or member 'cblk_mem' not described in 'i91uSCBPost' drivers/scsi/initio.c:2740: warning: Excess function parameter 'host' description in 'i91uSCBPost' drivers/scsi/initio.c:2740: warning: Excess function parameter 'cmnd' description in 'i91uSCBPost' Link: https://lore.kernel.org/r/20210317091230.2912389-11-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Bas Vermeulen Cc: Christoph Hellwig Cc: Brian Macy Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 33c8ef953ece49f7a5cdb08f20cdfefb8c308581 Author: Lee Jones Date: Wed Mar 17 09:12:03 2021 +0000 scsi: dc395x: Fix some function param descriptions Fixes the following W=1 kernel build warning(s): drivers/scsi/dc395x.c:4353: warning: Function parameter or member 'acb' not described in 'adapter_init' drivers/scsi/dc395x.c:4353: warning: Function parameter or member 'io_port_len' not described in 'adapter_init' drivers/scsi/dc395x.c:4353: warning: Excess function parameter 'host' description in 'adapter_init' Link: https://lore.kernel.org/r/20210317091230.2912389-10-lee.jones@linaro.org Cc: Oliver Neukum Cc: Ali Akcaagac Cc: Jamie Lenehan Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "C.L. Huang" Cc: Erich Chen Cc: Kurt Garloff Cc: dc395x@twibble.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f1d50e8ee5c9d9a3b1dd481d9c06e54eea65ada6 Author: Lee Jones Date: Wed Mar 17 09:12:02 2021 +0000 scsi: be2iscsi: Ensure function follows directly after its header Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_main.c:4935: warning: expecting prototype for beiscsi_show_boot_tgt_info(). Prototype was for BEISCSI_SYSFS_ISCSI_BOOT_FLAGS() instead Link: https://lore.kernel.org/r/20210317091230.2912389-9-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-drivers@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3e2f4679ea03bab1bc351e7500ce892e485a6879 Author: Lee Jones Date: Wed Mar 17 09:12:01 2021 +0000 scsi: aic94xx: Correct misspelling of function asd_dump_seq_state() Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_dump.c:729: warning: expecting prototype for ads_dump_seq_state(). Prototype was for asd_dump_seq_state() instead Link: https://lore.kernel.org/r/20210317091230.2912389-8-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Lee Jones Cc: David Chaw Cc: Luben Tuikov Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ad907c54e36fdc4e9eb8ac54b4d5a774111bc8e3 Author: Lee Jones Date: Wed Mar 17 09:12:00 2021 +0000 scsi: sd: Fix function name in header Fixes the following W=1 kernel build warning(s): drivers/scsi/sd.c:1537: warning: expecting prototype for sd_ioctl(). Prototype was for sd_ioctl_common() instead Link: https://lore.kernel.org/r/20210317091230.2912389-7-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Drew Eckhardt Cc: Eric Youngdale Cc: Jirka Hanika Cc: Richard Gooch Cc: Torben Mathiasen Cc: Alex Davis Cc: Douglas Gilbert Cc: Badari Pulavarty Cc: willy@debian.org Cc: Kurt Garloff Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3673b7b0007b81ee9f136a19d3b3d65eda461794 Author: Lee Jones Date: Wed Mar 17 09:11:59 2021 +0000 scsi: pmcraid: Fix a whole host of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/scsi/pmcraid.c:455: warning: Function parameter or member 'intrs' not described in 'pmcraid_enable_interrupts' drivers/scsi/pmcraid.c:455: warning: Excess function parameter 'intr' description in 'pmcraid_enable_interrupts' drivers/scsi/pmcraid.c:543: warning: Function parameter or member '' not described in 'pmcraid_ioa_reset' drivers/scsi/pmcraid.c:543: warning: expecting prototype for pmcraid_bist_done(). Prototype was for pmcraid_ioa_reset() instead drivers/scsi/pmcraid.c:603: warning: Function parameter or member 't' not described in 'pmcraid_reset_alert_done' drivers/scsi/pmcraid.c:603: warning: Excess function parameter 'cmd' description in 'pmcraid_reset_alert_done' drivers/scsi/pmcraid.c:638: warning: Function parameter or member '' not described in 'pmcraid_notify_ioastate' drivers/scsi/pmcraid.c:638: warning: Function parameter or member 'u32' not described in 'pmcraid_notify_ioastate' drivers/scsi/pmcraid.c:638: warning: expecting prototype for pmcraid_reset_alert(). Prototype was for pmcraid_notify_ioastate() instead drivers/scsi/pmcraid.c:687: warning: Function parameter or member 't' not described in 'pmcraid_timeout_handler' drivers/scsi/pmcraid.c:687: warning: Excess function parameter 'cmd' description in 'pmcraid_timeout_handler' drivers/scsi/pmcraid.c:858: warning: expecting prototype for pmcraid_fire_command(). Prototype was for _pmcraid_fire_command() instead drivers/scsi/pmcraid.c:972: warning: Function parameter or member '' not described in 'pmcraid_querycfg' drivers/scsi/pmcraid.c:972: warning: expecting prototype for pmcraid_get_fwversion_done(). Prototype was for pmcraid_querycfg() instead drivers/scsi/pmcraid.c:1398: warning: Function parameter or member 'aen_msg' not described in 'pmcraid_notify_aen' drivers/scsi/pmcraid.c:1398: warning: Function parameter or member 'data_size' not described in 'pmcraid_notify_aen' drivers/scsi/pmcraid.c:1398: warning: Excess function parameter 'type' description in 'pmcraid_notify_aen' drivers/scsi/pmcraid.c:1781: warning: Function parameter or member '' not described in 'pmcraid_initiate_reset' drivers/scsi/pmcraid.c:1781: warning: expecting prototype for pmcraid_process_ldn(). Prototype was for pmcraid_initiate_reset() instead drivers/scsi/pmcraid.c:1887: warning: Function parameter or member '' not described in 'pmcraid_reinit_buffers' drivers/scsi/pmcraid.c:1887: warning: expecting prototype for pmcraid_reset_enable_ioa(). Prototype was for pmcraid_reinit_buffers() instead drivers/scsi/pmcraid.c:2704: warning: Function parameter or member 'timeout' not described in 'pmcraid_reset_device' drivers/scsi/pmcraid.c:3025: warning: expecting prototype for pmcraid_eh_xxxx_reset_handler(). Prototype was for pmcraid_eh_device_reset_handler() instead drivers/scsi/pmcraid.c:3327: warning: expecting prototype for pmcraid_queuecommand(). Prototype was for pmcraid_queuecommand_lck() instead drivers/scsi/pmcraid.c:3437: warning: Function parameter or member 'inode' not described in 'pmcraid_chr_open' drivers/scsi/pmcraid.c:3437: warning: Function parameter or member 'filep' not described in 'pmcraid_chr_open' drivers/scsi/pmcraid.c:3437: warning: expecting prototype for pmcraid_open(). Prototype was for pmcraid_chr_open() instead drivers/scsi/pmcraid.c:3457: warning: Function parameter or member 'fd' not described in 'pmcraid_chr_fasync' drivers/scsi/pmcraid.c:3457: warning: Function parameter or member 'filep' not described in 'pmcraid_chr_fasync' drivers/scsi/pmcraid.c:3457: warning: Function parameter or member 'mode' not described in 'pmcraid_chr_fasync' drivers/scsi/pmcraid.c:3457: warning: expecting prototype for pmcraid_fasync(). Prototype was for pmcraid_chr_fasync() instead drivers/scsi/pmcraid.c:3574: warning: Function parameter or member 'ioctl_cmd' not described in 'pmcraid_ioctl_passthrough' drivers/scsi/pmcraid.c:3574: warning: Function parameter or member 'buflen' not described in 'pmcraid_ioctl_passthrough' drivers/scsi/pmcraid.c:3574: warning: Excess function parameter 'cmd' description in 'pmcraid_ioctl_passthrough' drivers/scsi/pmcraid.c:3905: warning: Function parameter or member 'filep' not described in 'pmcraid_chr_ioctl' drivers/scsi/pmcraid.c:3905: warning: Function parameter or member 'cmd' not described in 'pmcraid_chr_ioctl' drivers/scsi/pmcraid.c:3905: warning: Function parameter or member 'arg' not described in 'pmcraid_chr_ioctl' drivers/scsi/pmcraid.c:3905: warning: expecting prototype for pmcraid_ioctl(). Prototype was for pmcraid_chr_ioctl() instead drivers/scsi/pmcraid.c:3969: warning: cannot understand function prototype: 'const struct file_operations pmcraid_fops = ' drivers/scsi/pmcraid.c:3993: warning: Function parameter or member 'attr' not described in 'pmcraid_show_log_level' drivers/scsi/pmcraid.c:4015: warning: Function parameter or member 'attr' not described in 'pmcraid_store_log_level' drivers/scsi/pmcraid.c:4055: warning: Function parameter or member 'attr' not described in 'pmcraid_show_drv_version' drivers/scsi/pmcraid.c:4081: warning: Function parameter or member 'attr' not described in 'pmcraid_show_adapter_id' drivers/scsi/pmcraid.c:4081: warning: expecting prototype for pmcraid_show_io_adapter_id(). Prototype was for pmcraid_show_adapter_id() instead drivers/scsi/pmcraid.c:4600: warning: Function parameter or member 'pinstance' not described in 'pmcraid_allocate_cmd_blocks' drivers/scsi/pmcraid.c:5153: warning: Function parameter or member 'minor' not described in 'pmcraid_release_minor' Link: https://lore.kernel.org/r/20210317091230.2912389-6-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Anil Ravindranath Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 59863cb53d80adc421092203eeef98708ddca0cb Author: Lee Jones Date: Wed Mar 17 09:11:58 2021 +0000 scsi: sd_zbc: Place function name into header Fixes the following W=1 kernel build warning(s): drivers/scsi/sd_zbc.c:137: warning: wrong kernel-doc identifier on line: Link: https://lore.kernel.org/r/20210317091230.2912389-5-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Hannes Reinecke Cc: Le Moal Cc: Shaun Tancheff Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 5ccd626516e186ea2669b654c91af5be8b3773dd Author: Lee Jones Date: Wed Mar 17 09:11:57 2021 +0000 scsi: mvumi: Fix formatting and doc-rot issues Fixes the following W=1 kernel build warning(s): drivers/scsi/mvumi.c:191: warning: Function parameter or member 'sg_count' not described in 'mvumi_make_sgl' drivers/scsi/mvumi.c:1301: warning: Function parameter or member 'ob_frame' not described in 'mvumi_complete_cmd' drivers/scsi/mvumi.c:2084: warning: Function parameter or member 'shost' not described in 'mvumi_queue_command' drivers/scsi/mvumi.c:2084: warning: Excess function parameter 'done' description in 'mvumi_queue_command' Link: https://lore.kernel.org/r/20210317091230.2912389-4-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Marvell Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 637b5c3ebc1c2ca4f802fa2def950fed1f5877e6 Author: Lee Jones Date: Wed Mar 17 09:11:56 2021 +0000 scsi: ipr: Fix incorrect function names in their headers Fixes the following W=1 kernel build warning(s): drivers/scsi/ipr.c:5335: warning: expecting prototype for ipr_eh_dev_reset(). Prototype was for __ipr_eh_dev_reset() instead drivers/scsi/ipr.c:5594: warning: expecting prototype for ipr_eh_abort(). Prototype was for ipr_scan_finished() instead drivers/scsi/ipr.c:5616: warning: expecting prototype for ipr_eh_host_reset(). Prototype was for ipr_eh_abort() instead drivers/scsi/ipr.c:6725: warning: expecting prototype for ipr_info(). Prototype was for ipr_ioa_info() instead [mkp: tweaked ipr_scan_finished() comment] Link: https://lore.kernel.org/r/20210317091230.2912389-3-lee.jones@linaro.org Cc: Brian King Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 12a1b740f2251b6218b3f593e812786be9cdf421 Author: Lee Jones Date: Wed Mar 17 09:11:55 2021 +0000 scsi: myrb: Demote non-conformant kernel-doc headers and fix others Fixes the following W=1 kernel build warning(s): drivers/scsi/myrb.c:91: warning: Function parameter or member 'pdev' not described in 'myrb_create_mempools' drivers/scsi/myrb.c:91: warning: Function parameter or member 'cb' not described in 'myrb_create_mempools' drivers/scsi/myrb.c:141: warning: Function parameter or member 'cb' not described in 'myrb_destroy_mempools' drivers/scsi/myrb.c:153: warning: Function parameter or member 'cmd_blk' not described in 'myrb_reset_cmd' drivers/scsi/myrb.c:164: warning: Function parameter or member 'cb' not described in 'myrb_qcmd' drivers/scsi/myrb.c:164: warning: Function parameter or member 'cmd_blk' not described in 'myrb_qcmd' drivers/scsi/myrb.c:187: warning: Function parameter or member 'cb' not described in 'myrb_exec_cmd' drivers/scsi/myrb.c:187: warning: Function parameter or member 'cmd_blk' not described in 'myrb_exec_cmd' drivers/scsi/myrb.c:208: warning: Function parameter or member 'cb' not described in 'myrb_exec_type3' drivers/scsi/myrb.c:208: warning: Function parameter or member 'op' not described in 'myrb_exec_type3' drivers/scsi/myrb.c:208: warning: Function parameter or member 'addr' not described in 'myrb_exec_type3' drivers/scsi/myrb.c:231: warning: Function parameter or member 'cb' not described in 'myrb_exec_type3D' drivers/scsi/myrb.c:231: warning: Function parameter or member 'op' not described in 'myrb_exec_type3D' drivers/scsi/myrb.c:231: warning: Function parameter or member 'sdev' not described in 'myrb_exec_type3D' drivers/scsi/myrb.c:231: warning: Function parameter or member 'pdev_info' not described in 'myrb_exec_type3D' drivers/scsi/myrb.c:341: warning: Function parameter or member 'cb' not described in 'myrb_get_errtable' drivers/scsi/myrb.c:388: warning: Function parameter or member 'cb' not described in 'myrb_get_ldev_info' drivers/scsi/myrb.c:440: warning: Function parameter or member 'cb' not described in 'myrb_get_rbld_progress' drivers/scsi/myrb.c:440: warning: Function parameter or member 'rbld' not described in 'myrb_get_rbld_progress' drivers/scsi/myrb.c:472: warning: Function parameter or member 'cb' not described in 'myrb_update_rbld_progress' drivers/scsi/myrb.c:533: warning: Function parameter or member 'cb' not described in 'myrb_get_cc_progress' drivers/scsi/myrb.c:580: warning: Function parameter or member 'cb' not described in 'myrb_bgi_control' drivers/scsi/myrb.c:671: warning: Function parameter or member 'cb' not described in 'myrb_hba_enquiry' drivers/scsi/myrb.c:782: warning: Function parameter or member 'cb' not described in 'myrb_set_pdev_state' drivers/scsi/myrb.c:782: warning: Function parameter or member 'sdev' not described in 'myrb_set_pdev_state' drivers/scsi/myrb.c:782: warning: Function parameter or member 'state' not described in 'myrb_set_pdev_state' drivers/scsi/myrb.c:808: warning: Function parameter or member 'cb' not described in 'myrb_enable_mmio' drivers/scsi/myrb.c:808: warning: Function parameter or member 'mmio_init_fn' not described in 'myrb_enable_mmio' drivers/scsi/myrb.c:913: warning: Function parameter or member 'cb' not described in 'myrb_get_hba_config' drivers/scsi/myrb.c:1200: warning: Function parameter or member 'cb' not described in 'myrb_unmap' drivers/scsi/myrb.c:1236: warning: Function parameter or member 'cb' not described in 'myrb_cleanup' drivers/scsi/myrb.c:2249: warning: Function parameter or member 'dev' not described in 'myrb_is_raid' drivers/scsi/myrb.c:2260: warning: Function parameter or member 'dev' not described in 'myrb_get_resync' drivers/scsi/myrb.c:2287: warning: Function parameter or member 'dev' not described in 'myrb_get_state' drivers/scsi/myrb.c:2493: warning: Function parameter or member 'cb' not described in 'myrb_err_status' drivers/scsi/myrb.c:2493: warning: Function parameter or member 'error' not described in 'myrb_err_status' drivers/scsi/myrb.c:2493: warning: Function parameter or member 'parm0' not described in 'myrb_err_status' drivers/scsi/myrb.c:2493: warning: Function parameter or member 'parm1' not described in 'myrb_err_status' Link: https://lore.kernel.org/r/20210317091230.2912389-2-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Linux GmbH Cc: "Leonard N. Zubkoff" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 45d59ab3edca82e2cb1b0964e544e4a3c10a972d Author: Lee Jones Date: Wed Mar 17 09:11:25 2021 +0000 scsi: nsp32: Correct expected types in debug print formatting Fixes the following W=1 kernel build warning(s): drivers/scsi/nsp32.c: In function ‘nsp32_setup_sg_table’: drivers/scsi/nsp32.c:879:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘unsigned int’ [-Wformat=] drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’ drivers/scsi/nsp32.c:879:52: note: format string is defined here drivers/scsi/nsp32.c: In function ‘nsp32_detect’: drivers/scsi/nsp32.c:2719:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘int’ [-Wformat=] drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’ drivers/scsi/nsp32.c:2719:22: note: format string is defined here drivers/scsi/nsp32.c:2719:6: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘int’ [-Wformat=] drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’ drivers/scsi/nsp32.c:2719:28: note: format string is defined here drivers/scsi/nsp32.c: In function ‘nsp32_suspend’: drivers/scsi/nsp32.c:3267:23: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 6 has type ‘pm_message_t’ {aka ‘struct pm_message’} [-Wformat=] drivers/scsi/nsp32.c:280:69: note: in definition of macro ‘nsp32_msg’ drivers/scsi/nsp32.c:3267:56: note: format string is defined here Link: https://lore.kernel.org/r/20210317091125.2910058-9-lee.jones@linaro.org Cc: GOTO Masanori Cc: YOKOTA Hiroshi Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: gotom@debian.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 72444bbd047f4510ad1f01978103299690abf07e Author: Lee Jones Date: Wed Mar 17 09:11:24 2021 +0000 scsi: isci: Make local function port_state_name() static Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/port.c:65:13: warning: no previous prototype for ‘port_state_name’ [-Wmissing-prototypes] Link: https://lore.kernel.org/r/20210317091125.2910058-8-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ab3f2d15fc11ec0e6f05c607159afa5f0528174e Author: Lee Jones Date: Wed Mar 17 09:11:23 2021 +0000 scsi: isci: Make local function isci_remote_device_wait_for_resume_from_abort() static Fixes the following W=1 kernel build warning(s): drivers/scsi/isci/remote_device.c:1387:6: warning: no previous prototype for ‘isci_remote_device_wait_for_resume_from_abort’ [-Wmissing-prototypes] Link: https://lore.kernel.org/r/20210317091125.2910058-7-lee.jones@linaro.org Cc: Artur Paszkiewicz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 886eb6d590d1852714e4eff17c3b19096db62b83 Author: Lee Jones Date: Wed Mar 17 09:11:22 2021 +0000 scsi: sim710: Remove unused variable 'err' from sim710_init() Take the opportunity to rework the comment a little. Fixes the following W=1 kernel build warning(s): drivers/scsi/sim710.c: In function ‘sim710_init’: drivers/scsi/sim710.c:216:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210317091125.2910058-6-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Richard Hirst Cc: c by Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f466690bda03aa2c04c19ff6e63effd1a5a5d7ec Author: Lee Jones Date: Wed Mar 17 09:11:21 2021 +0000 scsi: FlashPoint: Remove unused variable 'TID' from FlashPoint_AbortCCB() Fixes the following W=1 kernel build warning(s): drivers/scsi/FlashPoint.c: In function ‘FlashPoint_AbortCCB’: drivers/scsi/FlashPoint.c:1618:16: warning: variable ‘TID’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210317091125.2910058-5-lee.jones@linaro.org Cc: Khalid Aziz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Khalid Aziz Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 94685e7a8cf6441a128a0e0855067648ce379a05 Author: Lee Jones Date: Wed Mar 17 09:11:20 2021 +0000 scsi: nsp32: Remove or exclude unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/nsp32.c: In function ‘nsp32_selection_autoscsi’: drivers/scsi/nsp32.c:584:17: warning: variable ‘execph’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c: In function ‘nsp32_msgout_occur’: drivers/scsi/nsp32.c:1785:7: warning: variable ‘new_sgtp’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c: In function ‘nsp32_analyze_sdtr’: drivers/scsi/nsp32.c:2227:20: warning: variable ‘syncnum’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c:2223:20: warning: variable ‘synct’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c: In function ‘nsp32_do_bus_reset’: drivers/scsi/nsp32.c:2841:17: warning: variable ‘intrdat’ set but not used [-Wunused-but-set-variable] drivers/scsi/nsp32.c: In function ‘nsp32_getprom_param’: drivers/scsi/nsp32.c:2912:11: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210317091125.2910058-4-lee.jones@linaro.org Cc: GOTO Masanori Cc: YOKOTA Hiroshi Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: gotom@debian.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 66730771543f5fe72363a99035307feedcb1f7d3 Author: Lee Jones Date: Wed Mar 17 09:11:19 2021 +0000 scsi: nsp32: Supply __printf(x, y) formatting for nsp32_message() Fixes the following W=1 kernel build warning(s): drivers/scsi/nsp32.c: In function ‘nsp32_message’: drivers/scsi/nsp32.c:318:2: warning: function ‘nsp32_message’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Link: https://lore.kernel.org/r/20210317091125.2910058-3-lee.jones@linaro.org Cc: GOTO Masanori Cc: YOKOTA Hiroshi Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: gotom@debian.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 5c9e2596ed1dae031358b647f53cc6ee290e2124 Author: Lee Jones Date: Wed Mar 17 09:11:18 2021 +0000 scsi: BusLogic: Supply __printf(x, y) formatting for blogic_msg() Fixes the following W=1 kernel build warning(s): In file included from drivers/scsi/BusLogic.c:51: drivers/scsi/BusLogic.c: In function ‘blogic_msg’: drivers/scsi/BusLogic.c:3591:2: warning: function ‘blogic_msg’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Link: https://lore.kernel.org/r/20210317091125.2910058-2-lee.jones@linaro.org Cc: Khalid Aziz Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "Leonard N. Zubkoff" Cc: linux-scsi@vger.kernel.org Acked-by: Khalid Aziz Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit dea6328b2ea811b8f2f4d5d3829aaa8d7449b6dc Merge: 1816bf1f53cbc 5588796e89777 Author: David S. Miller Date: Thu Mar 18 19:51:12 2021 -0700 Merge branch 'gro-retpoline' Alexander Lobakin says: ==================== net: avoid retpoline overhead on VLAN and TEB GRO dev_gro_receive() uses indirect calls for IP GRO functions, but it works only for the outermost headers and untagged frames. Simple VLAN tag before an IP header restores the performance hit. This simple series straightens the GRO calls for IP headers going after VLAN tag or inner Ethernet header (GENEVE, NvGRE, VxLAN) for retpolined kernels. ==================== commit 5588796e89777318267ff13f2bf322b2c48843af Author: Alexander Lobakin Date: Thu Mar 18 18:42:39 2021 +0000 ethernet: avoid retpoline overhead on TEB (GENEVE, NvGRE, VxLAN) GRO The two most popular headers going after Ethernet are IPv4 and IPv6. Retpoline overhead for them is addressed only in dev_gro_receive(), when they lie right after the outermost Ethernet header. Use the indirect call wrappers in TEB (Transparent Ethernet Bridging, such as GENEVE, NvGRE, VxLAN etc.) GRO receive code to reduce the penalty when processing the inner headers. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 4a6e7ec93a602b1e386704aeb0ce76bfc1ba8030 Author: Alexander Lobakin Date: Thu Mar 18 18:42:34 2021 +0000 vlan/8021q: avoid retpoline overhead on GRO The two most popular headers going after VLAN are IPv4 and IPv6. Retpoline overhead for them is addressed only in dev_gro_receive(), when they lie right after the outermost Ethernet header. Use the indirect call wrappers in VLAN GRO receive code to reduce the penalty on receiving tagged frames (when hardware stripping is off or not available). Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 86af2c82c28499b4b509d6b15637a96bd829201b Author: Alexander Lobakin Date: Thu Mar 18 18:42:30 2021 +0000 gro: add combined call_gro_receive() + INDIRECT_CALL_INET() helper call_gro_receive() is used to limit GRO recursion, but it works only with callback pointers. There's a combined version of call_gro_receive() + INDIRECT_CALL_2() in , but it doesn't check for IPv6 modularity. Add a similar new helper to cover both of these. It can and will be used to avoid retpoline overhead when IP header lies behind another offloaded proto. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit e75ec151c1088c1aa7a49ff16a2adcaddb24a861 Author: Alexander Lobakin Date: Thu Mar 18 18:42:23 2021 +0000 gro: make net/gro.h self-contained If some source file includes , but doesn't include : In file included from net/8021q/vlan_core.c:7: ./include/net/gro.h:6:1: warning: data definition has no type or storage class 6 | INDIRECT_CALLABLE_DECLARE(struct sk_buff *ipv6_gro_receive(struct list_head *, | ^~~~~~~~~~~~~~~~~~~~~~~~~ ./include/net/gro.h:6:1: error: type defaults to ‘int’ in declaration of ‘INDIRECT_CALLABLE_DECLARE’ [-Werror=implicit-int] [...] Include directly. It's small and won't pull lots of dependencies. Also add some incomplete struct declarations to be fully stacked. Fixes: 04f00ab2275f ("net/core: move gro function declarations to separate header ") Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 1816bf1f53cbc3b92f61a03eb4ad8f07637e6438 Author: Bhaskar Chowdhury Date: Fri Mar 19 01:33:42 2021 +0530 Fix a typo s/serisouly/seriously/ ...and the sentence construction. Signed-off-by: Bhaskar Chowdhury Signed-off-by: David S. Miller commit 035e9f471691a16c32b389c8b2f236043a2a50d7 Author: Bart Van Assche Date: Tue Mar 16 20:26:48 2021 -0700 scsi: sbitmap: Silence a debug kernel warning triggered by sbitmap_put() All sbitmap code uses implied preemption protection to update sb->alloc_hint except sbitmap_put(). Using implied preemption protection is safe since the value of sb->alloc_hint only affects performance of sbitmap allocations but not their correctness. Change this_cpu_ptr() in sbitmap_put() into raw_cpu_ptr() to suppress the following kernel warning that appears with preemption debugging enabled (CONFIG_DEBUG_PREEMPT): BUG: using smp_processor_id() in preemptible [00000000] code: scsi_eh_0/152 caller is debug_smp_processor_id+0x17/0x20 CPU: 1 PID: 152 Comm: scsi_eh_0 Tainted: G W 5.12.0-rc1-dbg+ #6 Call Trace: show_stack+0x52/0x58 dump_stack+0xaf/0xf3 check_preemption_disabled+0xce/0xd0 debug_smp_processor_id+0x17/0x20 scsi_device_unbusy+0x13a/0x1c0 [scsi_mod] scsi_finish_command+0x4d/0x290 [scsi_mod] scsi_eh_flush_done_q+0x1e7/0x280 [scsi_mod] ata_scsi_port_error_handler+0x592/0x750 [libata] ata_scsi_error+0x1a0/0x1f0 [libata] scsi_error_handler+0x19e/0x330 [scsi_mod] kthread+0x222/0x250 ret_from_fork+0x1f/0x30 Link: https://lore.kernel.org/r/20210317032648.9080-1-bvanassche@acm.org Fixes: c548e62bcf6a ("scsi: sbitmap: Move allocation hint into sbitmap") Cc: Hannes Reinecke Cc: Omar Sandoval Reviewed-by: Ming Lei Reviewed-by: Christoph Hellwig Signed-off-by: Bart Van Assche Signed-off-by: Martin K. Petersen commit b1ebd3b0e4664c4aa8362bd8abb61861dff61849 Author: Mike Christie Date: Thu Mar 18 17:58:58 2021 -0500 scsi: target: Fix htmldocs warning in target_submit_prep() Fix warning: drivers/target/target_core_transport.c:1661: WARNING: Block quote ends without a blank line; unexpected unindent. Link: https://lore.kernel.org/r/20210318225858.11863-1-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 3b5f3c0d0548b8d963030b8728e380d6d57aa471 Author: Yue Hu Date: Thu Mar 18 17:55:36 2021 +0800 scsi: ufs: core: Tidy up WB configuration code There are similar code implementations for WB configuration in ufshcd_wb_{ctrl, toggle_flush_during_h8, toggle_flush}. Extract the common parts to create a new helper with a flag parameter to reduce code duplication. Meanwhile, rename ufshcd_wb_ctrl() to ufshcd_wb_toggle() for better readability. And remove unnecessary log messages from ufshcd_wb_config() since relevant toggle function will emit messages. Also change ufshcd_wb_toggle_flush{__during_h8} to void type accordingly. Link: https://lore.kernel.org/r/20210318095536.2048-1-zbestahu@gmail.com Reviewed-by: Avri Altman Signed-off-by: Yue Hu Signed-off-by: Martin K. Petersen commit 69a1709e2ec84b3846327d34d0749a6f2e7803dd Author: Bhaskar Chowdhury Date: Wed Mar 17 15:42:38 2021 +0530 scsi: fusion: Fix a typo in the file mptbase.h s/contets/contents/ Link: https://lore.kernel.org/r/20210317101238.2627574-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit bcf064bc2a3be706d63c3dc23b00d4e9a0771662 Author: Bhaskar Chowdhury Date: Wed Mar 17 14:52:40 2021 +0530 scsi: fnic: Rudimentary spelling fixes Rudimentary typo fixes throughout the fnic_trace.c file. Link: https://lore.kernel.org/r/20210317092240.927822-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit ac5669bf79d976f5903e0acb98ccd5c1cb7789c8 Author: ganjisheng Date: Tue Mar 16 10:51:41 2021 +0800 scsi: 53c700: Fix spelling of conditions Link: https://lore.kernel.org/r/20210316025141.824-1-qiumibaozi_1@163.com Signed-off-by: ganjisheng Signed-off-by: Martin K. Petersen commit 1bf5fa1a2916b779055d97fbb4e0fdd90dadcf63 Author: Bhaskar Chowdhury Date: Mon Mar 15 07:46:10 2021 +0530 scsi: qla1280: Spelling fixes s/quantites/quantities/ s/Unfortunely/Unfortunately/ Link: https://lore.kernel.org/r/20210315021610.2089087-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit 2ed0fc2b9a798177fb41ccc7db5c5f3b59985a65 Author: Jiapeng Chong Date: Tue Mar 9 17:37:48 2021 +0800 scsi: csiostor: Assign boolean values to a bool variable Fix the following coccicheck warnings: ./drivers/scsi/csiostor/csio_scsi.c:150:9-10: WARNING: return of 0/1 in function 'csio_scsi_itnexus_loss_error' with return type bool. Link: https://lore.kernel.org/r/1615282668-36935-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 2af0bf34ae1fa2c340457aa525fdc23c019bbeef Author: Yang Li Date: Tue Mar 9 14:41:04 2021 +0800 scsi: 3w-sas: Remove unneeded variable 'retval' Fix the following coccicheck warning: ./drivers/scsi/3w-sas.c:866:5-11: Unneeded variable: "retval". Return "1" on line 898 Link: https://lore.kernel.org/r/1615272064-42109-1-git-send-email-yang.lee@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Martin K. Petersen commit 59f90f5e6c80a46ac5c19d11830b07a0ebd714af Author: Jiapeng Chong Date: Thu Feb 18 18:16:11 2021 +0800 scsi: mvumi: Use true and false for bool variable Fix the following coccicheck warnings: ./drivers/scsi/mvumi.c:69:9-10: WARNING: return of 0/1 in function 'tag_is_empty' with return type bool. Link: https://lore.kernel.org/r/1613643371-122635-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit 37067b97930931c3fe77cf8a3a6d6d43b708808b Author: Suganath Prabu S Date: Fri Mar 5 15:59:04 2021 +0530 scsi: mpt3sas: Update driver version to 37.101.00.00 Update driver version to 37.101.00.00. Link: https://lore.kernel.org/r/20210305102904.7560-8-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit c569de899bb41b7e8302636a76bf73bbdb80075a Author: Suganath Prabu S Date: Fri Mar 5 15:59:03 2021 +0530 scsi: mpt3sas: Force reply post array allocations to be within same 4 GB region According to the MPI specification, reply post array buffers can not cross a 4 GB boundary. While allocating, if any buffer crosses the 4 GB boundary, then: - Release the already allocated memory pools; and - Reallocate them by changing the DMA coherent mask to 32-bit Link: https://lore.kernel.org/r/20210305102904.7560-7-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 2e4e8587327b37431e3205d09f541420d9d19266 Author: Suganath Prabu S Date: Fri Mar 5 15:59:02 2021 +0530 scsi: mpt3sas: Force reply post buffer allocations to be within same 4 GB region According to the MPI specification, reply post buffers can not cross a 4 GB boundary. While allocating, if any buffer crosses the 4 GB boundary, then: - Release the already allocated memory pools; and - Reallocate them by changing the DMA coherent mask to 32-bit Link: https://lore.kernel.org/r/20210305102904.7560-6-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 58501fd9375f76369c602a0b751a95d3376878e2 Author: Suganath Prabu S Date: Fri Mar 5 15:59:01 2021 +0530 scsi: mpt3sas: Force reply buffer allocations to be within same 4 GB region According to the MPI specification, reply buffers can not cross a 4 GB boundary. While allocating, if any buffer crosses the 4 GB boundary, then: - Release the already allocated memory pools; and - Reallocate them by changing the DMA coherent mask to 32-bit Link: https://lore.kernel.org/r/20210305102904.7560-5-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 970ac2bb70e79a90eeb75496a523b8f1705d7a8c Author: Suganath Prabu S Date: Fri Mar 5 15:59:00 2021 +0530 scsi: mpt3sas: Force sense buffer allocations to be within same 4 GB region According to the MPI specification, sense buffers can not cross a 4 GB boundary. While allocating, if any buffer crosses the 4 GB boundary, then: - Release the already allocated memory pools; and - Reallocate them by changing the DMA coherent mask to 32-bit Link: https://lore.kernel.org/r/20210305102904.7560-4-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 7dd847dae1c48f4a58f3ba672ed9141a2a774805 Author: Suganath Prabu S Date: Fri Mar 5 15:58:59 2021 +0530 scsi: mpt3sas: Force chain buffer allocations to be within same 4 GB region According to the MPI specification, chain buffers can not cross a 4 GB boundary. While allocating, if any buffer crosses the 4 GB boundary, then: - Release the already allocated memory pools; and - Reallocate them by changing the DMA coherent mask to 32-bit Link: https://lore.kernel.org/r/20210305102904.7560-3-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit 84b9000a4b27836b17f3c6828fb8101bababeb7f Merge: df291e54ccca0 e768929de1e45 Author: David S. Miller Date: Thu Mar 18 19:16:10 2021 -0700 Merge branch 'ionic-fixes' Shannon Nelson says: ==================== ionic fixes These are a few little fixes and cleanups found while working on other features and more testing. ==================== commit e768929de1e4521ff3b3d5e8a74d62e7eeb50cf9 Author: Shannon Nelson Date: Thu Mar 18 17:48:10 2021 -0700 ionic: protect adminq from early destroy Don't destroy the adminq while there is an outstanding request. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 9e8eaf8427b6e07e8359a565f1f43c499fce6fa7 Author: Shannon Nelson Date: Thu Mar 18 17:48:09 2021 -0700 ionic: stop watchdog when in broken state Up to now we've been ignoring any error return from the queue starting in the link status check, so we fix that here. If the driver had to reset and couldn't get things running properly again, for example after a Tx Timeout and the FW is not responding to commands, don't let the link watchdog try to restart the queues. At this point the user can try to DOWN and UP the device to clear the errors. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 8c775344c76806c75c4bf94f8ba1e6ac3c069b62 Author: Shannon Nelson Date: Thu Mar 18 17:48:08 2021 -0700 ionic: block actions during fw reset Block some actions while the FW is in a reset activity and the queues are not configured. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit acc606d3e4cd8d03a368fb207a0ae868d8cbe9d7 Author: Shannon Nelson Date: Thu Mar 18 17:48:07 2021 -0700 ionic: update ethtool support bits for BASET Add support in get_link_ksettings for a couple of new BASET connections. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 9b761574fefcead1c9c86b338a321e7ef392b833 Author: Shannon Nelson Date: Thu Mar 18 17:48:06 2021 -0700 ionic: fix unchecked reference We can get to the counter without going through the pointer that the robot complained about. Reported-by: kernel test robot Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 2103ed2fab7de8df7ad035d8a3053e1ba3cb76e2 Author: Shannon Nelson Date: Thu Mar 18 17:48:05 2021 -0700 ionic: simplify the intr_index use in txq_init The qcq->intr.index was set when the queue was allocated, there is no need to reach around to find it. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 25cc5a5fac15c8e140c17f7c13c6874736f3e883 Author: Shannon Nelson Date: Thu Mar 18 17:48:04 2021 -0700 ionic: code cleanup details Catch a couple of missing macro name uses, fix a couple of misspellings, etc. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit df291e54ccca0ef357f07a7b89263f7918d6ed7a Author: Vladimir Oltean Date: Fri Mar 19 01:36:36 2021 +0200 net: ocelot: support multiple bridges The ocelot switches are a bit odd in that they do not have an STP state to put the ports into. Instead, the forwarding configuration is delayed from the typical port_bridge_join into stp_state_set, when the port enters the BR_STATE_FORWARDING state. I can only guess that the implementation of this quirk is the reason that led to the simplification of the driver such that only one bridge could be offloaded at a time. We can simplify the data structures somewhat, and introduce a per-port bridge device pointer and STP state, similar to how the LAG offload works now (there we have a per-port bonding device pointer and TX enabled state). This allows offloading multiple bridges with relative ease, while still keeping in place the quirk to delay the programming of the PGIDs. We actually need this change now because we need to remove the bogus restriction from ocelot_bridge_stp_state_set that ocelot->bridge_mask needs to contain BIT(port), otherwise that function is a no-op. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d25fde64d1c271277b801c57a954037f80babbd1 Author: Horatiu Vultur Date: Thu Mar 18 20:29:38 2021 +0100 net: ocelot: Fix deletetion of MRP entries from MAC table When a MRP ring was deleted or disabled, the driver was iterating over the ports to detect if any other MPR rings exists and in case it didn't exist it would delete the MAC table entry. But the problem was that it used the last iterated port to delete the MAC table entry and this could be a NULL port. The fix consists of using the port on which the function was called. Fixes: 7c588c3e96e9733a ("net: ocelot: Extend MRP") Reported-by: Dan Carpenter Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 536e1004d273cf55d0e6c6ab6bfe74dc60464cd2 Author: Xie He Date: Thu Mar 18 12:07:47 2021 -0700 net: lapbether: Close the LAPB device before its underlying Ethernet device closes When a virtual LAPB device's underlying Ethernet device closes, the LAPB device is also closed. However, currently the LAPB device is closed after the Ethernet device closes. It would be better to close it before the Ethernet device closes. This would allow the LAPB device to transmit a last frame to notify the other side that it is disconnecting. Signed-off-by: Xie He Signed-off-by: David S. Miller commit 0f9651bb3ade97de3576b982513296c8783ad8bc Author: Colin Ian King Date: Thu Mar 18 16:14:28 2021 +0000 octeontx2-af: Remove redundant initialization of pointer pfvf The pointer pfvf 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") Fixes: 56bcef528bd8 ("octeontx2-af: Use npc_install_flow API for promisc and broadcast entries") Signed-off-by: Colin Ian King Signed-off-by: David S. Miller commit 269aa0301224dc001676322c0305b0d02c93b7bb Author: Johan Hovold Date: Thu Mar 18 17:01:42 2021 +0100 net: cdc_ncm: drop redundant driver-data assignment The driver data for the data interface has already been set by usb_driver_claim_interface() so drop the subsequent redundant assignment. Note that this also avoids setting the driver data three times in case of a combined interface. Signed-off-by: Johan Hovold Signed-off-by: David S. Miller commit 92a310cdcf8120c2d007254f53b927c89c417fc6 Author: zuoqilin Date: Thu Mar 18 21:36:40 2021 +0800 nfc/fdp: Simplify the return expression of fdp_nci_open() Simplify the return expression. Signed-off-by: zuoqilin Signed-off-by: David S. Miller commit a835f9034efbb699f307575bead2607c2fbc93ac Author: Xiong Zhenwu Date: Thu Mar 18 04:52:13 2021 -0700 /net/core/: fix misspellings using codespell tool A typo is found out by codespell tool in 1734th line of drop_monitor.c: $ codespell ./net/core/ ./net/core/drop_monitor.c:1734: guarnateed ==> guaranteed Fix a typo found by codespell. Signed-off-by: Xiong Zhenwu Signed-off-by: David S. Miller commit 7f1330c1b19d99aab0b0e9e09fae612871766964 Author: Xiong Zhenwu Date: Thu Mar 18 04:39:41 2021 -0700 /net/hsr: fix misspellings using codespell tool A typo is found out by codespell tool in 111th line of hsr_debugfs.c: $ codespell ./net/hsr/ net/hsr/hsr_debugfs.c:111: Debufs ==> Debugfs Fix typos found by codespell. Signed-off-by: Xiong Zhenwu Signed-off-by: David S. Miller commit 21e0b8fc16087e5d3f280caaa3a02d360ff53dd3 Author: Lee Jones Date: Thu Mar 18 10:40:34 2021 +0000 of: of_net: Provide function name and param description Fixes the following W=1 kernel build warning(s): drivers/of/of_net.c:104: warning: Function parameter or member 'np' not described in 'of_get_mac_address' drivers/of/of_net.c:104: warning: expecting prototype for mac(). Prototype was for of_get_mac_address() instead Cc: Andrew Lunn Cc: Heiner Kallweit Cc: Russell King Cc: Rob Herring Cc: Frank Rowand Cc: netdev@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Lee Jones Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 76da35dc99afb460b9c335182ba6a3e7ff924186 Author: Wong, Vee Khee Date: Wed Mar 17 09:32:47 2021 +0800 stmmac: intel: Add PSE and PCH PTP clock source selection Intel mGbE variant implemented in EHL and TGL can be set to select different clock frequency based on GPO bits in MAC_GPIO_STATUS register. We introduce a new "void (*ptp_clk_freq_config)(void *priv)" in platform data so that if a platform is required to configure the frequency of clock source, in this case Intel mGBE does, the platform-specific configuration of the PTP clock setting is done when stmmac_ptp_register() is called. Signed-off-by: Wong, Vee Khee Signed-off-by: Voon Weifeng Co-developed-by: Ong Boon Leong Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit d7417ee918582504076ec1a74dfcd5fe1f55696c Merge: 44b958a686183 8d1d8298eb007 Author: David S. Miller Date: Thu Mar 18 16:24:06 2021 -0700 Merge branch 'mv88e6xxx-offload-bridge-flags' Tobias Waldekranz says: ==================== net: dsa: mv88e6xxx: Offload bridge port flags Add support for offloading learning and broadcast flooding flags. With this in place, mv88e6xx supports offloading of all bridge port flags that are currently supported by the bridge. Broadcast flooding is somewhat awkward to control as there is no per-port bit for this like there is for unknown unicast and unknown multicast. Instead we have to update the ATU entry for the broadcast address for all currently used FIDs. v2 -> v3: - Only return a netdev from dsa_port_to_bridge_port if the port is currently bridged (Vladimir & Florian) v1 -> v2: - Ensure that mv88e6xxx_vtu_get handles VID 0 (Vladimir) - Fixed off-by-one in mv88e6xxx_port_set_assoc_vector (Vladimir) - Fast age all entries on port when disabling learning (Vladimir) - Correctly detect bridge flags on LAG ports (Vladimir) ==================== Signed-off-by: David S. Miller commit 8d1d8298eb00756cc525e12a133a5cc37cfdf992 Author: Tobias Waldekranz Date: Thu Mar 18 20:25:40 2021 +0100 net: dsa: mv88e6xxx: Offload bridge broadcast flooding flag These switches have two modes of classifying broadcast: 1. Broadcast is multicast. 2. Broadcast is its own unique thing that is always flooded everywhere. This driver uses the first option, making sure to load the broadcast address into all active databases. Because of this, we can support per-port broadcast flooding by (1) making sure to only set the subset of ports that have it enabled whenever joining a new bridge or VLAN, and (2) by updating all active databases whenever the setting is changed on a port. Signed-off-by: Tobias Waldekranz Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 041bd545e1249906b997645ee71f40df21417f17 Author: Tobias Waldekranz Date: Thu Mar 18 20:25:39 2021 +0100 net: dsa: mv88e6xxx: Offload bridge learning flag Allow a user to control automatic learning per port. Many chips have an explicit "LearningDisable"-bit that can be used for this, but we opt for setting/clearing the PAV instead, as it works on all devices at least as far back as 6083. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 7b9f16fe401c98cd3e1cb92d02bb7184a6d9e4c1 Author: Tobias Waldekranz Date: Thu Mar 18 20:25:38 2021 +0100 net: dsa: mv88e6xxx: Flood all traffic classes on standalone ports In accordance with the comment in dsa_port_bridge_leave, standalone ports shall be configured to flood all types of traffic. This change aligns the mv88e6xxx driver with that policy. Previously a standalone port would initially not egress any unknown traffic, but after joining and then leaving a bridge, it would. This does not matter that much since we only ever send FROM_CPUs on standalone ports, but it seems prudent to make sure that the initial values match those that are applied after a bridging/unbridging cycle. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 0806dd4654145e70e4a4c5b06ddad4cd7a121fdf Author: Tobias Waldekranz Date: Thu Mar 18 20:25:37 2021 +0100 net: dsa: mv88e6xxx: Use standard helper for broadcast address Use the conventional declaration style of a MAC address in the kernel (u8 addr[ETH_ALEN]) for the broadcast address, then set it using the existing helper. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 34065c58306dab883deb323f2edf6074f2225c19 Author: Tobias Waldekranz Date: Thu Mar 18 20:25:36 2021 +0100 net: dsa: mv88e6xxx: Remove some bureaucracy around querying the VTU The hardware has a somewhat quirky protocol for reading out the VTU entry for a particular VID. But there is no reason why we cannot create a better API for ourselves in the driver. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d89ef4b8b39cdb88675b2629b35dc9ffdf5ca347 Author: Tobias Waldekranz Date: Thu Mar 18 20:25:35 2021 +0100 net: dsa: mv88e6xxx: Provide generic VTU iterator Move the intricacies of correctly iterating over the VTU to a common implementation. Signed-off-by: Tobias Waldekranz Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit ffcec3f257ccc2bf27642b9b1d97d2141f9cfcec Author: Tobias Waldekranz Date: Thu Mar 18 20:25:34 2021 +0100 net: dsa: mv88e6xxx: Avoid useless attempts to fast-age LAGs When a port is a part of a LAG, the ATU will create dynamic entries belonging to the LAG ID when learning is enabled. So trying to fast-age those out using the constituent port will have no effect. Unfortunately the hardware does not support move operations on LAGs so there is no obvious way to transform the request to target the LAG instead. Instead we document this known limitation and at least avoid wasting any time on it. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit cc76ce9e8dc659561ee62876da2cffc03fb58cc5 Author: Tobias Waldekranz Date: Thu Mar 18 20:25:33 2021 +0100 net: dsa: Add helper to resolve bridge port from DSA port In order for a driver to be able to query a bridge for information about itself, e.g. reading out port flags, it has to use a netdev that is known to the bridge. In the simple case, that is just the netdev representing the port, e.g. swp0 or swp1 in this example: br0 / \ swp0 swp1 But in the case of an offloaded lag, this will be the bond or team interface, e.g. bond0 in this example: br0 / bond0 / \ swp0 swp1 Add a helper that hides some of this complexity from the drivers. Then, redefine dsa_port_offloads_bridge_port using the helper to avoid double accounting of the set of possible offloaded uppers. Signed-off-by: Tobias Waldekranz Reviewed-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 44b958a686183287d0b8977a6700f956c82bef94 Merge: 5108802abcb97 99e75a37bd0af Author: David S. Miller Date: Thu Mar 18 16:20:35 2021 -0700 Merge branch 'ipa-32bit' Alex Elder says: ==================== net: ipa: support 32-bit targets There is currently a configuration dependency that restricts IPA to be supported only on 64-bit machines. There are only a few things that really require that, and those are fixed in this series. The last patch in the series removes the CONFIG_64BIT build dependency for IPA. Version 2 of this series uses upper_32_bits() rather than creating a new function to extract bits out of a DMA address. Version 3 of uses lower_32_bits() as well. ==================== Signed-off-by: David S. Miller commit 99e75a37bd0af8eb8a0560f48091672b1b6d9218 Author: Alex Elder Date: Thu Mar 18 13:59:30 2021 -0500 net: ipa: relax 64-bit build requirement We currently assume the IPA driver is built only for a 64 bit kernel. When this constraint was put in place it eliminated some do_div() calls, replacing them with the "/" and "%" operators. We now only use these operations on u32 and size_t objects. In a 32-bit kernel build, size_t will be 32 bits wide, so there remains no reason to use do_div() for divide and modulo. A few recent commits also fix some code that assumes that DMA addresses are 64 bits wide. With that, we can get rid of the 64-bit build requirement. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit e5d4e96b44cf20330c970c3e30ea0a8c3a23feca Author: Alex Elder Date: Thu Mar 18 13:59:29 2021 -0500 net: ipa: fix table alignment requirement We currently have a build-time check to ensure that the minimum DMA allocation alignment satisfies the constraint that IPA filter and route tables must point to rules that are 128-byte aligned. But what's really important is that the actual allocated DMA memory has that alignment, even if the minimum is smaller than that. Remove the BUILD_BUG_ON() call checking against minimim DMA alignment and instead verify at rutime that the allocated memory is properly aligned. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 3c54b7be5d3677f37dfcd68afcc1d8e2b677a5b9 Author: Alex Elder Date: Thu Mar 18 13:59:28 2021 -0500 net: ipa: use upper_32_bits() Use upper_32_bits() to extract the high-order 32 bits of a DMA address. This avoids doing a 32-position shift on a DMA address if it happens not to be 64 bits wide. Use lower_32_bits() to extract the low-order 32 bits (because that's what it's for). Suggested-by: Florian Fainelli Signed-off-by: Alex Elder Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit d2fd2311de909a7f4e99b4bd11a19e6b671d6a6b Author: Alex Elder Date: Thu Mar 18 13:59:27 2021 -0500 net: ipa: fix assumptions about DMA address size Some build time checks in ipa_table_validate_build() assume that a DMA address is 64 bits wide. That is more restrictive than it has to be. A route or filter table is 64 bits wide no matter what the size of a DMA address is on the AP. The code actually uses a pointer to __le64 to access table entries, and a fixed constant IPA_TABLE_ENTRY_SIZE to describe the size of those entries. Loosen up two checks so they still verify some requirements, but such that they do not assume the size of a DMA address is 64 bits. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 5108802abcb979cec1de97a77f4d704bc8fcd446 Merge: c2ed62b9975e3 d96a8c693d0a0 Author: David S. Miller Date: Thu Mar 18 16:18:38 2021 -0700 Merge branch 's390-qeth-next' Julian Wiedmann says: ==================== s390/qeth: updates 2021-03-18 please apply the following patch series for qeth to netdev's net-next tree. This brings two small optimizations (replace a hard-coded GFP_ATOMIC, pass through the NAPI budget to enable napi_consume_skb()), and removes some redundant VLAN filter code. ==================== Signed-off-by: David S. Miller commit d96a8c693d0a09cd89efbb17373ded5b275b2960 Author: Julian Wiedmann Date: Thu Mar 18 19:54:56 2021 +0100 s390/qeth: remove RX VLAN filter stubs in L3 driver The callbacks have been slimmed down to a level where they no longer do any actual work. So stop pretending that we support the NETIF_F_HW_VLAN_CTAG_FILTER feature. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit ad4bbd7285ad0f04f2cfd8bada1755c3c5c75143 Author: Julian Wiedmann Date: Thu Mar 18 19:54:55 2021 +0100 s390/qeth: enable napi_consume_skb() for pending TX buffers Pending TX buffers are completed from the same NAPI code as normal TX buffers. Pass the NAPI budget to qeth_tx_complete_buf() so that the freeing of the completed skbs can be deferred. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit e47ded97f9728da5ced038c627c6b607e9706a13 Author: Julian Wiedmann Date: Thu Mar 18 19:54:54 2021 +0100 s390/qeth: allocate initial TX Buffer structs with GFP_KERNEL qeth_init_qdio_out_buf() is typically called during initialization, and the GFP_ATOMIC is only needed for a very specific & rare case during TX completion. Allow callers to specify a gfp mask, so that the initialization path can select GFP_KERNEL. While at it also clarify the function name. Signed-off-by: Julian Wiedmann Signed-off-by: David S. Miller commit 6d8b271682e2e0ff6a793c76803a5506b5535a5a Merge: fdc13979f91e6 a0964f526df6f Author: Alexei Starovoitov Date: Thu Mar 18 16:14:23 2021 -0700 Merge branch 'BPF static linking' Andrii Nakryiko says: ==================== This patch set adds new libbpf APIs and their bpftool integration that allows to perform static linking of BPF object files. Currently no extern resolution across object files is performed. This is going to be the focus of the follow up patches. But, given amount of code and logic necessary to perform just basic functionality of linking together mostly independent BPF object files, it was decided to land basic BPF linker code and logic first and extend it afterwards. The motivation for BPF static linking is to provide the functionality that is naturally assumed for user-space development process: ability to structure application's code without artificial restrictions of having all the code and data (variables and maps) inside a single source code file. This enables better engineering practices of splitting code into well-encapsulated parts. It provides ability to hide internal state from other parts of the code base through static variables and maps. It is also a first steps towards having generic reusable BPF libraries. Please see individual patches (mostly #6 and #7) for more details. Patch #10 passes all test_progs' individual BPF .o files through BPF static linker, which is supposed to be a no-op operation, so is essentially validating that BPF static linker doesn't produce corrupted ELF object files. Patch #11 adds Makefile infra to be able to specify multi-file BPF object files and adds the first multi-file test to validate correctness. v3->v4: - fix Makefile copy/paste error of diff'ing invalid object files (Alexei); - fix uninitialized obj_name variable that could lead to bogus object names being used during skeleton generation (kernel-patches CI); v2->v3: - added F(F(F(X))) = F(F(X)) test for all linked BPF object files (Alexei); - used reallocarray() more consistently in few places (Alexei); - improved bash completions for `gen object` (Quentin); - dropped .bpfo extension, but had to add optional `name OBJECT_FILE` parameter (path #8) to `gen skeleton` command to specify desired object name during skeleton generation; - fixed bug of merging DATASECS of special "license" and "version" sections. Linker currently strictly validates that all versions and licenses matches exactly and keeps only ELF symbols and BTF DATASEC from the very first object file with license/version. For all other object files, we ignore ELF symbols, but weren't ignoring DATASECs, which caused further problems of not being able to find a corresponding ELF symbol, if variable name differs between two files (which we test deliberately in multi-file linking selftest). The fix is to ignore BTF DATASECS; v1->v2: - extracted `struct strset` to manage unique set of strings both for BTF and ELF SYMTAB (patch #4, refactors btf and btf_dedup logic as well) (Alexei); - fixed bugs in bpftool gen command; renamed it to `gen object`, added BASH completions and extended/updated man page (Quentin). ==================== Signed-off-by: Alexei Starovoitov commit a0964f526df6facd4e12a4c416185013026eecf9 Author: Andrii Nakryiko Date: Thu Mar 18 12:40:36 2021 -0700 selftests/bpf: Add multi-file statically linked BPF object file test Add Makefile infra to specify multi-file BPF object files (and derivative skeletons). Add first selftest validating BPF static linker can merge together successfully two independent BPF object files and resulting object and skeleton are correct and usable. Use the same F(F(F(X))) = F(F(X)) identity test on linked object files as for the case of single BPF object files. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-13-andrii@kernel.org commit 14137f3c62186799b01eea8a338f90c9cbc57f00 Author: Andrii Nakryiko Date: Thu Mar 18 12:40:35 2021 -0700 selftests/bpf: Pass all BPF .o's through BPF static linker Pass all individual BPF object files (generated from progs/*.c) through `bpftool gen object` command to validate that BPF static linker doesn't corrupt them. As an additional sanity checks, validate that passing resulting object files through linker again results in identical ELF files. Exact same ELF contents can be guaranteed only after two passes, as after the first pass ELF sections order changes, and thus .BTF.ext data sections order changes. That, in turn, means that strings are added into the final BTF string sections in different order, so .BTF strings data might not be exactly the same. But doing another round of linking afterwards should result in the identical ELF file, which is checked with additional `diff` command. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-12-andrii@kernel.org commit cab62c37be057379a2a17b1b2eacd9dcba1e14dc Author: Andrii Nakryiko Date: Thu Mar 18 12:40:34 2021 -0700 selftests/bpf: Re-generate vmlinux.h and BPF skeletons if bpftool changed Trigger vmlinux.h and BPF skeletons re-generation if detected that bpftool was re-compiled. Otherwise full `make clean` is required to get updated skeletons, if bpftool is modified. Fixes: acbd06206bbb ("selftests/bpf: Add vmlinux.h selftest exercising tracing of syscalls") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-11-andrii@kernel.org commit d80b2fcbe0a023619e0fc73112f2a02c2662f6ab Author: Andrii Nakryiko Date: Thu Mar 18 12:40:33 2021 -0700 bpftool: Add `gen object` command to perform BPF static linking Add `bpftool gen object ...` command to statically link multiple BPF ELF object files into a single output BPF ELF object file. This patch also updates bash completions and man page. Man page gets a short section on `gen object` command, but also updates the skeleton example to show off workflow for BPF application with two .bpf.c files, compiled individually with Clang, then resulting object files are linked together with `gen object`, and then final object file is used to generate usable BPF skeleton. This should help new users understand realistic workflow w.r.t. compiling mutli-file BPF application. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20210318194036.3521577-10-andrii@kernel.org commit c41226654550b0a8aa75e91ce0a1cdb6ce2316ee Author: Andrii Nakryiko Date: Thu Mar 18 12:40:32 2021 -0700 bpftool: Add ability to specify custom skeleton object name Add optional name OBJECT_NAME parameter to `gen skeleton` command to override default object name, normally derived from input file name. This allows much more flexibility during build time. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-9-andrii@kernel.org commit 8fd27bf69b864b1c2a6e64cf5673603f3959a6ef Author: Andrii Nakryiko Date: Thu Mar 18 12:40:31 2021 -0700 libbpf: Add BPF static linker BTF and BTF.ext support Add .BTF and .BTF.ext static linking logic. When multiple BPF object files are linked together, their respective .BTF and .BTF.ext sections are merged together. BTF types are not just concatenated, but also deduplicated. .BTF.ext data is grouped by type (func info, line info, core_relos) and target section names, and then all the records are concatenated together, preserving their relative order. All the BTF type ID references and string offsets are updated as necessary, to take into account possibly deduplicated strings and types. BTF DATASEC types are handled specially. Their respective var_secinfos are accumulated separately in special per-section data and then final DATASEC types are emitted at the very end during bpf_linker__finalize() operation, just before emitting final ELF output file. BTF data can also provide "section annotations" for some extern variables. Such concept is missing in ELF, but BTF will have DATASEC types for such special extern datasections (e.g., .kconfig, .ksyms). Such sections are called "ephemeral" internally. Internally linker will keep metadata for each such section, collecting variables information, but those sections won't be emitted into the final ELF file. Also, given LLVM/Clang during compilation emits BTF DATASECS that are incomplete, missing section size and variable offsets for static variables, BPF static linker will initially fix up such DATASECs, using ELF symbols data. The final DATASECs will preserve section sizes and all variable offsets. This is handled correctly by libbpf already, so won't cause any new issues. On the other hand, it's actually a nice property to have a complete BTF data without runtime adjustments done during bpf_object__open() by libbpf. In that sense, BPF static linker is also a BTF normalizer. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-8-andrii@kernel.org commit faf6ed321cf61fafa17444fe01e7e336b8e89acc Author: Andrii Nakryiko Date: Thu Mar 18 12:40:30 2021 -0700 libbpf: Add BPF static linker APIs Introduce BPF static linker APIs to libbpf. BPF static linker allows to perform static linking of multiple BPF object files into a single combined resulting object file, preserving all the BPF programs, maps, global variables, etc. Data sections (.bss, .data, .rodata, .maps, maps, etc) with the same name are concatenated together. Similarly, code sections are also concatenated. All the symbols and ELF relocations are also concatenated in their respective ELF sections and are adjusted accordingly to the new object file layout. Static variables and functions are handled correctly as well, adjusting BPF instructions offsets to reflect new variable/function offset within the combined ELF section. Such relocations are referencing STT_SECTION symbols and that stays intact. Data sections in different files can have different alignment requirements, so that is taken care of as well, adjusting sizes and offsets as necessary to satisfy both old and new alignment requirements. DWARF data sections are stripped out, currently. As well as LLLVM_ADDRSIG section, which is ignored by libbpf in bpf_object__open() anyways. So, in a way, BPF static linker is an analogue to `llvm-strip -g`, which is a pretty nice property, especially if resulting .o file is then used to generate BPF skeleton. Original string sections are ignored and instead we construct our own set of unique strings using libbpf-internal `struct strset` API. To reduce the size of the patch, all the .BTF and .BTF.ext processing was moved into a separate patch. The high-level API consists of just 4 functions: - bpf_linker__new() creates an instance of BPF static linker. It accepts output filename and (currently empty) options struct; - bpf_linker__add_file() takes input filename and appends it to the already processed ELF data; it can be called multiple times, one for each BPF ELF object file that needs to be linked in; - bpf_linker__finalize() needs to be called to dump final ELF contents into the output file, specified when bpf_linker was created; after bpf_linker__finalize() is called, no more bpf_linker__add_file() and bpf_linker__finalize() calls are allowed, they will return error; - regardless of whether bpf_linker__finalize() was called or not, bpf_linker__free() will free up all the used resources. Currently, BPF static linker doesn't resolve cross-object file references (extern variables and/or functions). This will be added in the follow up patch set. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-7-andrii@kernel.org commit 9af44bc5d4d70b37c9ada24d8e0367b34b805bd3 Author: Andrii Nakryiko Date: Thu Mar 18 12:40:29 2021 -0700 libbpf: Add generic BTF type shallow copy API Add btf__add_type() API that performs shallow copy of a given BTF type from the source BTF into the destination BTF. All the information and type IDs are preserved, but all the strings encountered are added into the destination BTF and corresponding offsets are rewritten. BTF type IDs are assumed to be correct or such that will be (somehow) modified afterwards. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-6-andrii@kernel.org commit 90d76d3ececc74bf43b2a97f178dadfa1e52be54 Author: Andrii Nakryiko Date: Thu Mar 18 12:40:28 2021 -0700 libbpf: Extract internal set-of-strings datastructure APIs Extract BTF logic for maintaining a set of strings data structure, used for BTF strings section construction in writable mode, into separate re-usable API. This data structure is going to be used by bpf_linker to maintains ELF STRTAB section, which has the same layout as BTF strings section. Suggested-by: Alexei Starovoitov Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-5-andrii@kernel.org commit 3b029e06f624efa90c9a4354e408acf134adb185 Author: Andrii Nakryiko Date: Thu Mar 18 12:40:27 2021 -0700 libbpf: Rename internal memory-management helpers Rename btf_add_mem() and btf_ensure_mem() helpers that abstract away details of dynamically resizable memory to use libbpf_ prefix, as they are not BTF-specific. No functional changes. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-4-andrii@kernel.org commit f36e99a45dbe76949eb99bba413c67eda5cd2591 Author: Andrii Nakryiko Date: Thu Mar 18 12:40:26 2021 -0700 libbpf: Generalize BTF and BTF.ext type ID and strings iteration Extract and generalize the logic to iterate BTF type ID and string offset fields within BTF types and .BTF.ext data. Expose this internally in libbpf for re-use by bpf_linker. Additionally, complete strings deduplication handling for BTF.ext (e.g., CO-RE access strings), which was previously missing. There previously was no case of deduplicating .BTF.ext data, but bpf_linker is going to use it. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-3-andrii@kernel.org commit e14ef4bf011192b61b48c4f3a35b3041140073ff Author: Andrii Nakryiko Date: Thu Mar 18 12:40:25 2021 -0700 libbpf: Expose btf_type_by_id() internally btf_type_by_id() is internal-only convenience API returning non-const pointer to struct btf_type. Expose it outside of btf.c for re-use. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210318194036.3521577-2-andrii@kernel.org commit f15a0a732aefb46f999c2a8aa8f9f16e71cec5b2 Author: Joerg Roedel Date: Fri Mar 12 13:38:24 2021 +0100 x86/sev-es: Replace open-coded hlt-loops with sev_es_terminate() There are a few places left in the SEV-ES C code where hlt loops and/or terminate requests are implemented. Replace them all with calls to sev_es_terminate(). Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210312123824.306-9-joro@8bytes.org commit fef81c86262879d4b1176ef51a834c15b805ebb9 Author: Joerg Roedel Date: Fri Mar 12 13:38:23 2021 +0100 x86/boot/compressed/64: Check SEV encryption in the 32-bit boot-path Check whether the hypervisor reported the correct C-bit when running as an SEV guest. Using a wrong C-bit position could be used to leak sensitive data from the guest to the hypervisor. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210312123824.306-8-joro@8bytes.org commit e927e62d8e370ebfc0d702fec22bc752249ebcef Author: Joerg Roedel Date: Fri Mar 12 13:38:22 2021 +0100 x86/boot/compressed/64: Add CPUID sanity check to 32-bit boot-path The 32-bit #VC handler has no GHCB and can only handle CPUID exit codes. It is needed by the early boot code to handle #VC exceptions raised in verify_cpu() and to get the position of the C-bit. But the CPUID information comes from the hypervisor which is untrusted and might return results which trick the guest into the no-SEV boot path with no C-bit set in the page-tables. All data written to memory would then be unencrypted and could leak sensitive data to the hypervisor. Add sanity checks to the 32-bit boot #VC handler to make sure the hypervisor does not pretend that SEV is not enabled. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210312123824.306-7-joro@8bytes.org commit 1ccdbf748d862bc2ea106fa9f2300983c77860fe Author: Joerg Roedel Date: Wed Mar 10 09:43:22 2021 +0100 x86/boot/compressed/64: Add 32-bit boot #VC handler Add a #VC exception handler which is used when the kernel still executes in protected mode. This boot-path already uses CPUID, which will cause #VC exceptions in an SEV-ES guest. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210312123824.306-6-joro@8bytes.org commit c2ed62b9975e3e47a8b12f5fc4ed7958104b427b Merge: 6859d91549341 75b2758abc355 Author: David S. Miller Date: Thu Mar 18 14:56:23 2021 -0700 Merge branch 'net-xps-improve-the-xps-maps-handling' Antoine Tenart says: ==================== net: xps: improve the xps maps handling This series aims at fixing various issues with the xps code, including out-of-bound accesses and use-after-free. While doing so we try to improve the xps code maintainability and readability. The main change is moving dev->num_tc and dev->nr_ids in the xps maps, to avoid out-of-bound accesses as those two fields can be updated after the maps have been allocated. This allows further reworks, to improve the xps code readability and allow to stop taking the rtnl lock when reading the maps in sysfs. The maps are moved to an array in net_device, which simplifies the code a lot. One future improvement may be to remove the use of xps_map_mutex from net/core/dev.c, but that may require extra care. Thanks! Antoine Since v3: - Removed the 3 patches about the rtnl lock and __netif_set_xps_queue as there are extra issues. Those patches were not tied to the others, and I'll see want can be done as a separate effort. - One small fix in patch 12. Since v2: - Patches 13-16 are new to the series. - Fixed another issue I found while preparing v3 (use after free of old xps maps). - Kept the rtnl lock when calling netdev_get_tx_queue and netdev_txq_to_tc. - Use get_device/put_device when using the sb_dev. - Take the rtnl lock in mlx5 and virtio_net when calling netif_set_xps_queue. - Fixed a coding style issue. Since v1: - Reordered the patches to improve readability and avoid introducing issues in between patches. - Use dev_maps->nr_ids to allocate the mask in xps_queue_show but still default to nr_cpu_ids/dev->num_rx_queues in xps_queue_show when dev_maps hasn't been allocated yet for backward compatibility.:w ==================== Signed-off-by: David S. Miller commit 75b2758abc355c410dd335d45b2d40f920e27cde Author: Antoine Tenart Date: Thu Mar 18 19:37:52 2021 +0100 net: NULL the old xps map entries when freeing them In __netif_set_xps_queue, old map entries from the old dev_maps are freed but their corresponding entry in the old dev_maps aren't NULLed. Fix this. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 2d05bf015308275f7c67a780f70026077285cfc0 Author: Antoine Tenart Date: Thu Mar 18 19:37:51 2021 +0100 net: fix use after free in xps When setting up an new dev_maps in __netif_set_xps_queue, we remove and free maps from unused CPUs/rx-queues near the end of the function; by calling remove_xps_queue. However it's possible those maps are also part of the old not-freed-yet dev_maps, which might be used concurrently. When that happens, a map can be freed while its corresponding entry in the old dev_maps table isn't NULLed, leading to: "BUG: KASAN: use-after-free" in different places. This fixes the map freeing logic for unused CPUs/rx-queues, to also NULL the map entries from the old dev_maps table. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 2db6cdaebac83c13acb165594b09282fa03cec89 Author: Antoine Tenart Date: Thu Mar 18 19:37:50 2021 +0100 net-sysfs: move the xps cpus/rxqs retrieval in a common function Most of the xps_cpus_show and xps_rxqs_show functions share the same logic. Having it in two different functions does not help maintenance. This patch moves their common logic into a new function, xps_queue_show, to improve this. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit d7be87a687cc261d663dcf97c01056f71398f9f9 Author: Antoine Tenart Date: Thu Mar 18 19:37:49 2021 +0100 net-sysfs: move the rtnl unlock up in the xps show helpers Now that nr_ids and num_tc are stored in the xps dev_maps, which are RCU protected, we do not have the need to protect the maps in the rtnl lock. Move the rtnl unlock up so we reduce the rtnl locking section. We also increase the reference count on the subordinate device if any, as we don't want this device to be freed while we use it (now that the rtnl lock isn't protecting it in the whole function). Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 132f743b01b85b8fae7e1f298bfd81a66b9389a8 Author: Antoine Tenart Date: Thu Mar 18 19:37:48 2021 +0100 net: improve queue removal readability in __netif_set_xps_queue Improve the readability of the loop removing tx-queue from unused CPUs/rx-queues in __netif_set_xps_queue. The change should only be cosmetic. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 402fbb992e13fc57e917ac7c0a07a8a3e2385858 Author: Antoine Tenart Date: Thu Mar 18 19:37:47 2021 +0100 net: add an helper to copy xps maps to the new dev_maps This patch adds an helper, xps_copy_dev_maps, to copy maps from dev_maps to new_dev_maps at a given index. The logic should be the same, with an improved code readability and maintenance. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 044ab86d431b59b88966457dbb62679f274ec442 Author: Antoine Tenart Date: Thu Mar 18 19:37:46 2021 +0100 net: move the xps maps to an array Move the xps maps (xps_cpus_map and xps_rxqs_map) to an array in net_device. That will simplify a lot the code removing the need for lots of if/else conditionals as the correct map will be available using its offset in the array. This should not modify the xps maps behaviour in any way. Suggested-by: Alexander Duyck Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 6f36158e058409ec5ceb4290541e77ae2648fc86 Author: Antoine Tenart Date: Thu Mar 18 19:37:45 2021 +0100 net: remove the xps possible_mask Remove the xps possible_mask. It was an optimization but we can just loop from 0 to nr_ids now that it is embedded in the xps dev_maps. That simplifies the code a bit. Suggested-by: Alexander Duyck Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 5478fcd0f48322e04ae6c173ad3a1959e066dc83 Author: Antoine Tenart Date: Thu Mar 18 19:37:44 2021 +0100 net: embed nr_ids in the xps maps Embed nr_ids (the number of cpu for the xps cpus map, and the number of rxqs for the xps cpus map) in dev_maps. That will help not accessing out of bound memory if those values change after dev_maps was allocated. Suggested-by: Alexander Duyck Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 255c04a87f4381849fce9ed81e5efabf78a71a30 Author: Antoine Tenart Date: Thu Mar 18 19:37:43 2021 +0100 net: embed num_tc in the xps maps The xps cpus/rxqs map is accessed using dev->num_tc, which is used when allocating the map. But later updates of dev->num_tc can lead to having a mismatch between the maps and how they're accessed. In such cases the map values do not make any sense and out of bound accesses can occur (that can be easily seen using KASAN). This patch aims at fixing this by embedding num_tc into the maps, using the value at the time the map is created. This brings two improvements: - The maps can be accessed using the embedded num_tc, so we know for sure we won't have out of bound accesses. - Checks can be made before accessing the maps so we know the values retrieved will make sense. We also update __netif_set_xps_queue to conditionally copy old maps from dev_maps in the new one only if the number of traffic classes from both maps match. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 73f5e52b15e3aa4ef641264228cd9069b1948149 Author: Antoine Tenart Date: Thu Mar 18 19:37:42 2021 +0100 net-sysfs: make xps_cpus_show and xps_rxqs_show consistent Make the implementations of xps_cpus_show and xps_rxqs_show to converge, as the two share the same logic but diverted over time. This should not modify their behaviour but will help future changes and improve maintenance. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit d9a063d207f0e538b0f5aa8b04a6c14f88906a6d Author: Antoine Tenart Date: Thu Mar 18 19:37:41 2021 +0100 net-sysfs: store the return of get_netdev_queue_index in an unsigned int In net-sysfs, get_netdev_queue_index returns an unsigned int. Some of its callers use an unsigned long to store the returned value. Update the code to be consistent, this should only be cosmetic. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit ea4fe7e842f6c7f972d795a8efc167c4bb33b62f Author: Antoine Tenart Date: Thu Mar 18 19:37:40 2021 +0100 net-sysfs: convert xps_cpus_show to bitmap_zalloc Use bitmap_zalloc instead of zalloc_cpumask_var in xps_cpus_show to align with xps_rxqs_show. This will improve maintenance and allow us to factorize the two functions. The function should behave the same. Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller commit 6859d91549341c2ad769d482de58129f080c0f04 Author: Rafał Miłecki Date: Thu Mar 18 09:01:43 2021 +0100 net: dsa: bcm_sf2: fix BCM4908 RGMII reg(s) BCM4908 has only 1 RGMII reg for controlling port 7. Fixes: 73b7a6047971 ("net: dsa: bcm_sf2: support BCM4908's integrated switch") Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 55cfeb396965c3906a84d09a9c487d065e37773b Author: Rafał Miłecki Date: Thu Mar 18 09:01:42 2021 +0100 net: dsa: bcm_sf2: add function finding RGMII register Simple macro like REG_RGMII_CNTRL_P() is insufficient as: 1. It doesn't validate port argument 2. It doesn't support chipsets with non-lineral RGMII regs layout Missing port validation could result in getting register offset from out of array. Random memory -> random offset -> random reads/writes. It affected e.g. BCM4908 for REG_RGMII_CNTRL_P(7). Fixes: a78e86ed586d ("net: dsa: bcm_sf2: Prepare for different register layouts") Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit a5538a777b73b35750ed1ffff8c1ef539e861624 Author: Álvaro Fernández Rojas Date: Wed Mar 17 10:23:17 2021 +0100 net: dsa: b53: mmap: Add device tree support Add device tree support to b53_mmap.c while keeping platform devices support. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: David S. Miller commit 7b78702ed75707d08dbe302d21e67d0112cbd144 Merge: 09bef8326853d 9f298959191b0 Author: David S. Miller Date: Thu Mar 18 14:34:08 2021 -0700 Merge branch 'stmmac-EST-interrupts-and-ethtool' Mohammad Athari Bin Ismail says: ==================== net: stmmac: EST interrupts and ethtool This patchset adds support for handling EST interrupts and reporting EST errors. Additionally, the errors are added into ethtool statistic. ==================== Signed-off-by: David S. Miller commit 9f298959191b0a3a8451ad308a68a9d697ea6819 Author: Ong Boon Leong Date: Thu Mar 18 08:50:53 2021 +0800 net: stmmac: Add EST errors into ethtool statistic Below EST errors are added into ethtool statistic: 1) Constant Gate Control Error (CGCE): The counter "mtl_est_cgce" increases everytime CGCE interrupt is triggered. 2) Head-of-Line Blocking due to Scheduling (HLBS): The counter "mtl_est_hlbs" increases everytime HLBS interrupt is triggered. 3) Head-of-Line Blocking due to Frame Size (HLBF): The counter "mtl_est_hlbf" increases everytime HLBF interrupt is triggered. 4) Base Time Register error (BTRE): The counter "mtl_est_btre" increases everytime BTRE interrupt is triggered but BTRL not reaches maximum value of 15. 5) Base Time Register Error Loop Count (BTRL) reaches maximum value: The counter "mtl_est_btrlm" increases everytime BTRE interrupt is triggered and BTRL value reaches maximum value of 15. Please refer to MTL_EST_STATUS register in DesignWare Cores Ethernet Quality-of-Service Databook for more detail explanation. Signed-off-by: Ong Boon Leong Signed-off-by: Voon Weifeng Co-developed-by: Mohammad Athari Bin Ismail Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: David S. Miller commit e49aa315cb01828e7aec0710f3b954e80ba70dd8 Author: Voon Weifeng Date: Thu Mar 18 08:50:52 2021 +0800 net: stmmac: EST interrupts handling and error reporting Enabled EST related interrupts as below: 1) Constant Gate Control Error (CGCE) 2) Head-of-Line Blocking due to Scheduling (HLBS) 3) Head-of-Line Blocking due to Frame Size (HLBF). 4) Base Time Register error (BTRE) 5) Switch to S/W owned list Complete (SWLC) For HLBS, the user will get the info of all the queues that shows this error. For HLBF, the user will get the info of all the queue with the latest frame size which causes the error. Frame size 0 indicates no error. The ISR handling takes place when EST feature is enabled by user. Signed-off-by: Voon Weifeng Signed-off-by: Ong Boon Leong Co-developed-by: Mohammad Athari Bin Ismail Signed-off-by: Mohammad Athari Bin Ismail Signed-off-by: David S. Miller commit 09bef8326853d61e81bcd95f955c7688cea09c97 Merge: 31222162557ca 0e039f5cf86ce Author: David S. Miller Date: Thu Mar 18 14:17:51 2021 -0700 Merge branch 'stmmac-vlan-priority-rx-steering' Ong Boon Leong says: ==================== stmmac: add VLAN priority based RX steering The current tc flower implementation in stmmac supports both L3 and L4 filter offloading. This patch adds the support of VLAN priority based RX frame steering into different Rx Queues. The patches have been tested on both configuration test (include L3/L4) and traffic test (multi VLAN ping streams with RX Frame Steering) below:- > tc qdisc delete dev eth0 ingress > tc qdisc del dev eth0 parent root 2&> /dev/null > tc qdisc del dev eth0 parent ffff: 2&> /dev/null > tc qdisc add dev eth0 ingress > tc filter add dev eth0 parent ffff: protocol ip flower dst_ip 192.168.0.1 \ src_ip 192.168.1.1 ip_proto tcp dst_port 5201 src_port 6201 action drop > tc filter add dev eth0 parent ffff: protocol ip flower dst_ip 192.168.0.2 \ src_ip 192.168.1.2 ip_proto tcp dst_port 5202 src_port 6202 action drop > tc filter show dev eth0 ingress filter parent ffff: protocol ip pref 49151 flower chain 0 filter parent ffff: protocol ip pref 49151 flower chain 0 handle 0x1 eth_type ipv4 ip_proto tcp dst_ip 192.168.0.2 src_ip 192.168.1.2 dst_port 5202 src_port 6202 in_hw in_hw_count 1 action order 1: gact action drop random type none pass val 0 index 2 ref 1 bind 1 filter parent ffff: protocol ip pref 49152 flower chain 0 filter parent ffff: protocol ip pref 49152 flower chain 0 handle 0x1 eth_type ipv4 ip_proto tcp dst_ip 192.168.0.1 src_ip 192.168.1.1 dst_port 5201 src_port 6201 in_hw in_hw_count 1 action order 1: gact action drop random type none pass val 0 index 1 ref 1 bind 1 > tc qdisc delete dev eth0 ingress > tc qdisc del dev eth0 parent root 2&> /dev/null > tc qdisc del dev eth0 parent ffff: 2&> /dev/null > tc qdisc add dev eth0 ingress > tc qdisc add dev eth0 root mqprio num_tc 4 \ map 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 \ queues 1@0 1@1 1@2 1@3 hw 0 > tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 0 hw_tc 3 > tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 1 hw_tc 2 > tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 2 hw_tc 1 > tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 3 hw_tc 0 > tc filter show dev eth0 ingress filter parent ffff: protocol 802.1Q pref 49149 flower chain 0 filter parent ffff: protocol 802.1Q pref 49149 flower chain 0 handle 0x1 hw_tc 0 vlan_prio 3 in_hw in_hw_count 1 filter parent ffff: protocol 802.1Q pref 49150 flower chain 0 filter parent ffff: protocol 802.1Q pref 49150 flower chain 0 handle 0x1 hw_tc 1 vlan_prio 2 in_hw in_hw_count 1 filter parent ffff: protocol 802.1Q pref 49151 flower chain 0 filter parent ffff: protocol 802.1Q pref 49151 flower chain 0 handle 0x1 hw_tc 2 vlan_prio 1 in_hw in_hw_count 1 filter parent ffff: protocol 802.1Q pref 49152 flower chain 0 filter parent ffff: protocol 802.1Q pref 49152 flower chain 0 handle 0x1 hw_tc 3 vlan_prio 0 in_hw in_hw_count 1 > tc qdisc delete dev eth0 ingress > ip address flush dev eth0 > ip address add 169.254.1.11/24 dev eth0 > ip link delete dev eth0.vlan1 2> /dev/null > ip link add link eth0 name eth0.vlan1 type vlan id 1 > ip address flush dev eth0.vlan1 2> /dev/null > ip address add 169.254.11.11/24 dev eth0.vlan1 > ip link delete dev eth0.vlan2 2> /dev/null > ip link add link eth0 name eth0.vlan2 type vlan id 2 > ip address flush dev eth0.vlan2 2> /dev/null > ip address add 169.254.12.11/24 dev eth0.vlan2 > ip link delete dev eth0.vlan3 2> /dev/null > ip link add link eth0 name eth0.vlan3 type vlan id 3 > ip address flush dev eth0.vlan3 2> /dev/null > ip address add 169.254.13.11/24 dev eth0.vlan3 > ip link delete dev eth0.vlan4 2> /dev/null > ip link add link eth0 name eth0.vlan4 type vlan id 4 > ip address flush dev eth0.vlan4 2> /dev/null > ip address add 169.254.14.11/24 dev eth0.vlan4 > ip address flush dev eth0 > ip address add 169.254.1.22/24 dev eth0 > ip link delete dev eth0.vlan1 2> /dev/null > ip link add link eth0 name eth0.vlan1 type vlan id 1 > ip address flush dev eth0.vlan1 2> /dev/null > ip address add 169.254.11.22/24 dev eth0.vlan1 > ip link delete dev eth0.vlan2 2> /dev/null > ip link add link eth0 name eth0.vlan2 type vlan id 2 > ip address flush dev eth0.vlan2 2> /dev/null > ip address add 169.254.12.22/24 dev eth0.vlan2 > ip link delete dev eth0.vlan3 2> /dev/null > ip link add link eth0 name eth0.vlan3 type vlan id 3 > ip address flush dev eth0.vlan3 2> /dev/null > ip address add 169.254.13.22/24 dev eth0.vlan3 > ip link delete dev eth0.vlan4 2> /dev/null > ip link add link eth0 name eth0.vlan4 type vlan id 4 > ip address flush dev eth0.vlan4 2> /dev/null > ip address add 169.254.14.22/24 dev eth0.vlan4 > mkdir -p /sys/fs/cgroup/net_prio/grp0 > echo eth0 0 > /sys/fs/cgroup/net_prio/grp0/net_prio.ifpriomap > echo eth0.vlan1 0 > /sys/fs/cgroup/net_prio/grp0/net_prio.ifpriomap > mkdir -p /sys/fs/cgroup/net_prio/grp1 > echo eth0 0 > /sys/fs/cgroup/net_prio/grp1/net_prio.ifpriomap > echo eth0.vlan2 1 > /sys/fs/cgroup/net_prio/grp1/net_prio.ifpriomap > mkdir -p /sys/fs/cgroup/net_prio/grp2 > echo eth0 0 > /sys/fs/cgroup/net_prio/grp2/net_prio.ifpriomap > echo eth0.vlan3 2 > /sys/fs/cgroup/net_prio/grp2/net_prio.ifpriomap > mkdir -p /sys/fs/cgroup/net_prio/grp3 > echo eth0 0 > /sys/fs/cgroup/net_prio/grp3/net_prio.ifpriomap > echo eth0.vlan4 3 > /sys/fs/cgroup/net_prio/grp3/net_prio.ifpriomap > tc qdisc del dev eth0 parent root 2&> /dev/null > tc qdisc del dev eth0 parent ffff: 2&> /dev/null > tc qdisc add dev eth0 ingress > tc qdisc add dev eth0 root mqprio num_tc 4 map 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 queues 1@0 1@1 1@2 1@3 hw 0 > tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 0 hw_tc 0 > tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 1 hw_tc 1 > tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 2 hw_tc 2 > tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 3 hw_tc 3 > ip link set eth0.vlan1 type vlan egress-qos-map 0:0 > ip link set eth0.vlan2 type vlan egress-qos-map 1:1 > ip link set eth0.vlan3 type vlan egress-qos-map 2:2 > ip link set eth0.vlan4 type vlan egress-qos-map 3:3 > tc filter show dev eth0 ingress filter parent ffff: protocol 802.1Q pref 49149 flower chain 0 filter parent ffff: protocol 802.1Q pref 49149 flower chain 0 handle 0x1 hw_tc 3 vlan_prio 3 in_hw in_hw_count 1 filter parent ffff: protocol 802.1Q pref 49150 flower chain 0 filter parent ffff: protocol 802.1Q pref 49150 flower chain 0 handle 0x1 hw_tc 2 vlan_prio 2 in_hw in_hw_count 1 filter parent ffff: protocol 802.1Q pref 49151 flower chain 0 filter parent ffff: protocol 802.1Q pref 49151 flower chain 0 handle 0x1 hw_tc 1 vlan_prio 1 in_hw in_hw_count 1 filter parent ffff: protocol 802.1Q pref 49152 flower chain 0 filter parent ffff: protocol 802.1Q pref 49152 flower chain 0 handle 0x1 hw_tc 0 vlan_prio 0 in_hw in_hw_count 1 > echo 1 > /proc/irq/131/smp_affinity > echo 1 > /proc/irq/132/smp_affinity > echo 4 > /proc/irq/133/smp_affinity > echo 4 > /proc/irq/134/smp_affinity > echo 4 > /proc/irq/135/smp_affinity > echo 4 > /proc/irq/136/smp_affinity > echo 2 > /proc/irq/137/smp_affinity > echo 2 > /proc/irq/138/smp_affinity > ping -i 0.001 169.254.11.22 2&> /dev/null & > PID1="$!" > echo $PID1 > /sys/fs/cgroup/net_prio/grp0/cgroup.procs > ping -i 0.001 169.254.12.22 2&> /dev/null & > PID2="$!" > echo $PID2 > /sys/fs/cgroup/net_prio/grp1/cgroup.procs > ping -i 0.001 169.254.13.22 2&> /dev/null & > PID3="$!" > echo $PID3 > /sys/fs/cgroup/net_prio/grp2/cgroup.procs > ping -i 0.001 169.254.14.22 2&> /dev/null & > PID4="$!" > echo $PID4 > /sys/fs/cgroup/net_prio/grp3/cgroup.procs > ping -i 0.001 169.254.11.11 2&> /dev/null & > PID1="$!" > echo $PID1 > /sys/fs/cgroup/net_prio/grp0/cgroup.procs > ping -i 0.001 169.254.12.11 2&> /dev/null & > PID2="$!" > echo $PID2 > /sys/fs/cgroup/net_prio/grp1/cgroup.procs > ping -i 0.001 169.254.13.11 2&> /dev/null & > PID3="$!" > echo $PID3 > /sys/fs/cgroup/net_prio/grp2/cgroup.procs > ping -i 0.001 169.254.14.11 2&> /dev/null & > PID4="$!" > echo $PID4 > /sys/fs/cgroup/net_prio/grp3/cgroup.procs > watch -n 0.5 -d "cat /proc/interrupts | grep eth0" 131: 251918 41 0 0 IR-PCI-MSI 477184-edge eth0:rx-0 132: 18969 1 0 0 IR-PCI-MSI 477185-edge eth0:tx-0 133: 0 0 295872 0 IR-PCI-MSI 477186-edge eth0:rx-1 134: 0 0 16136 0 IR-PCI-MSI 477187-edge eth0:tx-1 135: 0 0 288042 0 IR-PCI-MSI 477188-edge eth0:rx-2 136: 0 0 16135 0 IR-PCI-MSI 477189-edge eth0:tx-2 137: 0 211177 0 0 IR-PCI-MSI 477190-edge eth0:rx-3 138: 2 16144 0 0 IR-PCI-MSI 477191-edge eth0:tx-3 139: 0 0 0 0 IR-PCI-MSI 477192-edge eth0:rx-4 140: 0 0 0 0 IR-PCI-MSI 477193-edge eth0:tx-4 141: 0 0 0 0 IR-PCI-MSI 477194-edge eth0:rx-5 142: 0 0 0 0 IR-PCI-MSI 477195-edge eth0:tx-5 143: 0 0 0 0 IR-PCI-MSI 477196-edge eth0:rx-6 144: 0 0 0 0 IR-PCI-MSI 477197-edge eth0:tx-6 145: 0 0 0 0 IR-PCI-MSI 477198-edge eth0:rx-7 146: 0 0 0 0 IR-PCI-MSI 477199-edge eth0:tx-7 157: 0 0 0 0 IR-PCI-MSI 477210-edge eth0:safety-ue ==================== Signed-off-by: David S. Miller commit 0e039f5cf86ce2fcb62077a163e7ff3d7b7b7cf3 Author: Ong Boon Leong Date: Fri Mar 19 01:22:04 2021 +0800 net: stmmac: add RX frame steering based on VLAN priority in tc flower We extend tc flower to support configuration of VLAN priority-based RX frame steering hardware offloading. To map VLAN to Traffic Class : $ tc filter add dev parent ffff: protocol 802.1Q flower \ vlan_prio hw_tc Note: < N whereby "tc qdisc ... num_tc N ..." To delete all tc flower configurations: $ tc qdisc delete dev ingress Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit bd0f670e793137fac1f8cc95f1feac99cc081cba Author: Ong Boon Leong Date: Fri Mar 19 01:22:03 2021 +0800 net: stmmac: restructure tc implementation for RX VLAN Priority steering The current tc_add_flow() and tc_del_flow() use hardware L3 & L4 filters as offloading. The number of L3/L4 filters is read from L3L4FNUM field from MAC_HW_Feature1 register and is used to alloc priv->tc_entries[]. For RX frame steering based on VLAN priority offloading, we use MAC_RXQ_CTRL2 & MAC_RXQ_CTRL3 registers and all VLAN priority level can be configured independent from L3 & L4 filters. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 7c585c9dffa5cd5155cdd0e41c52b403d13626d8 Author: Richard Guy Briggs Date: Thu Mar 18 15:19:11 2021 -0400 audit: document /proc/PID/sessionid Describe the /proc/PID/loginuid interface in Documentation/ABI/stable that was added 2008-03-13 in commit 1e0bd7550ea9 ("[PATCH] export sessionid alongside the loginuid in procfs") Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 1dd34cfcfd070c12ebe146078b64deaa83cf5b2e Author: Richard Guy Briggs Date: Thu Mar 18 15:19:10 2021 -0400 audit: document /proc/PID/loginuid Describe the /proc/PID/loginuid interface in Documentation/ABI/stable that was added 2005-02-01 by commit 1e2d1492e178 ("[PATCH] audit: handle loginuid through proc") Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit c43223755075acb6e3aa9c7ee89eeabdcf5ccda8 Author: Richard Guy Briggs Date: Wed Mar 17 21:48:59 2021 -0400 MAINTAINERS: update audit files Add files maintaned by the audit subsystem. Files from arch/*/*/*audit*.[ch] and arch/x86/include/asm/audit.h were not added due to concern of the list not holding up over time. There exist already exceptions that caused the need for this specificity. Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 389e4ecf5fec9464320971ec707893ccec5a04d1 Author: Yue Hu Date: Wed Feb 24 14:39:27 2021 +0800 cpufreq: schedutil: Call sugov_update_next_freq() before check to fast_switch_enabled Note that sugov_update_next_freq() may return false, that means the caller sugov_fast_switch() will do nothing except fast switch check. Similarly, sugov_deferred_update() also has unnecessary operations of raw_spin_{lock,unlock} in sugov_update_single_freq() for that case. So, let's call sugov_update_next_freq() before the fast switch check to avoid unnecessary behaviors above. Accordingly, update interface definition to sugov_deferred_update() and remove sugov_fast_switch() since we will call cpufreq_driver_fast_switch() directly instead. Signed-off-by: Yue Hu Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki commit a740561201ebf75326188e4e899fe9c2526046be Author: Pu Wen Date: Tue Mar 2 10:01:08 2021 +0800 powercap: Add Hygon Fam18h RAPL support Enable Hygon Fam18h RAPL support for the power capping framework. Signed-off-by: Pu Wen Signed-off-by: Rafael J. Wysocki commit c1df456d0f06eb9275c1cd4c66548fc5738ea428 Author: Ulf Hansson Date: Thu Mar 4 20:28:43 2021 +0100 PM: domains: Don't runtime resume devices at genpd_prepare() Runtime resuming a device upfront in the genpd_prepare() callback, to check if there is a wakeup pending for it, seems like an unnecessary thing to do. The PM core already manages these kind of things in a common way in __device_suspend(), via calling pm_runtime_barrier() and pm_wakeup_pending(). Therefore, let's simply drop this behaviour from genpd_prepare(). Note that, this change is applicable only for devices that are attached to a genpd that has the GENPD_FLAG_ACTIVE_WAKEUP set (Renesas, Mediatek, and Rockchip platforms). Moreover, a driver that needs to restore power for its device to re-configure it for a system wakeup, may still call pm_runtime_get_sync(), for example, to do this. Signed-off-by: Ulf Hansson Signed-off-by: Rafael J. Wysocki commit 31222162557ca85808b9985de7e519041561f455 Merge: a04be4b6b539c e638a83f167ee Author: David S. Miller Date: Thu Mar 18 11:37:22 2021 -0700 Merge branch 'octeon-tc-offloads' Naveen Mamindlapalli says: ==================== Add tc hardware offloads This patch series adds support for tc hardware offloads. Patch #1 adds support for offloading flows that matches IP tos and IP protocol which will be used by tc hw offload support. Also added ethtool n-tuple filter to code to offload the flows matching the above fields. Patch #2 adds tc flower hardware offload support on ingress traffic. Patch #3 adds TC flower offload stats. Patch #4 adds tc TC_MATCHALL egress ratelimiting offload. * tc flower hardware offload in PF driver The driver parses the flow match fields and actions received from the tc subsystem and adds/delete MCAM rules for the same. Each flow contains set of match and action fields. If the action or fields are not supported, the rule cannot be offloaded to hardware. The tc uses same set of MCAM rules allocated for ethtool n-tuple filters. So, at a time only one entity can offload the flows to hardware, they're made mutually exclusive in the driver. Following match and actions are supported. Match: Eth dst_mac, EtherType, 802.1Q {vlan_id,vlan_prio}, vlan EtherType, IP proto {tcp,udp,sctp,icmp,icmp6}, IPv4 tos, IPv4{dst_ip,src_ip}, L4 proto {dst_port|src_port number}. Actions: drop, accept, vlan pop, redirect to another port on the device. The Hardware stats are also supported. Currently only packet counter stats are updated. * tc egress rate limiting support Added TC-MATCHALL classifier offload with police action applied for all egress traffic on the specified interface. ==================== Signed-off-by: David S. Miller commit e638a83f167ee9c4abd3faa3be460afe5a688490 Author: Sunil Goutham Date: Thu Mar 18 15:32:15 2021 +0530 octeontx2-pf: TC_MATCHALL egress ratelimiting offload Add TC_MATCHALL egress ratelimiting offload support with POLICE action for entire traffic going out of the interface. Eg: To ratelimit egress traffic to 100Mbps $ ethtool -K eth0 hw-tc-offload on $ tc qdisc add dev eth0 clsact $ tc filter add dev eth0 egress matchall skip_sw \ action police rate 100Mbit burst 16Kbit HW supports a max burst size of ~128KB. Only one ratelimiting filter can be installed at a time. Signed-off-by: Sunil Goutham Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit d8ce30e0cf76afe2dd1acfd3f64f66a8afdfa539 Author: Naveen Mamindlapalli Date: Thu Mar 18 15:32:14 2021 +0530 octeontx2-pf: add tc flower stats handler for hw offloads Add support to get the stats for tc flower flows that are offloaded to hardware. To support this feature, added a new AF mbox handler which returns the MCAM entry stats for a flow that has hardware stat counter enabled. Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit 1d4d9e42c2406bc7599f5a5b7a49b71dced34b1e Author: Naveen Mamindlapalli Date: Thu Mar 18 15:32:13 2021 +0530 octeontx2-pf: Add tc flower hardware offload on ingress traffic This patch adds support for tc flower hardware offload on ingress traffic. Since the tc-flower filter rules use the same set of MCAM rules as the n-tuple filters, the n-tuple filters and tc flower rules are mutually exclusive. When one of the feature is enabled using ethtool, the other feature is disabled in the driver. By default the driver enables n-tuple filters during initialization. The following flow keys are supported. -> Ethernet: dst_mac -> L2 proto: all protocols -> VLAN (802.1q): vlan_id/vlan_prio -> IPv4: dst_ip/src_ip/ip_proto{tcp|udp|sctp|icmp}/ip_tos -> IPv6: ip_proto{icmpv6} -> L4(tcp/udp/sctp): dst_port/src_port The following flow actions are supported. -> drop -> accept -> redirect -> vlan pop The flow action supports multiple actions when vlan pop is specified as the first action. The redirect action supports redirecting to the PF/VF of same PCI device. Redirecting to other PCI NIX devices is not supported. Example #1: Add a tc filter rule to drop UDP traffic with dest port 80 # ethtool -K eth0 hw-tc-offload on # tc qdisc add dev eth0 ingress # tc filter add dev eth0 protocol ip parent ffff: flower ip_proto \ udp dst_port 80 action drop Example #2: Add a tc filter rule to redirect ingress traffic on eth0 with vlan id 3 to eth6 (ex: eth0 vf0) after stripping the vlan hdr. # ethtool -K eth0 hw-tc-offload on # tc qdisc add dev eth0 ingress # tc filter add dev eth0 parent ffff: protocol 802.1Q flower \ vlan_id 3 vlan_ethtype ipv4 action vlan pop action mirred \ ingress redirect dev eth6 Example #3: List the ingress filter rules # tc -s filter show dev eth4 ingress Example #4: Delete tc flower filter rule with handle 0x1 # tc filter del dev eth0 ingress protocol ip pref 49152 \ handle 1 flower Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit 2b9cef6679020938666a81f3b6e743cdfcb8b32d Author: Naveen Mamindlapalli Date: Thu Mar 18 15:32:12 2021 +0530 octeontx2-pf: Add ip tos and ip proto icmp/icmpv6 flow offload support Add support for programming the HW MCAM match key with IP tos, IP(v6) proto icmp/icmpv6, allowing flow offload rules to be installed using those fields. The NPC HW extracts layer type, which will be used as a matching criteria for different IP protocols. The ethtool n-tuple filter logic has been updated to parse the IP tos and l4proto for HW offloading. l4proto tcp/udp/sctp/ah/esp/icmp are supported. See example usage below. Ex: Redirect l4proto icmp to vf 0 queue 0 ethtool -U eth0 flow-type ip4 l4proto 1 action vf 0 queue 0 Ex: Redirect flow with ip tos 8 to vf 0 queue 0 ethtool -U eth0 flow-type ip4 tos 8 vf 0 queue 0 Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit d484b8bfc6fa71a088e4ac85d9ce11aa0385867e Author: Artem Bityutskiy Date: Mon Mar 8 16:31:46 2021 +0200 intel_idle: update ICX C6 data Change IceLake Xeon C6 latency from 128 us to 170 us. The latency was measured with the "wult" tool and corresponds to the 99.99th percentile when measuring with the "nic" method. Note, the 128 us figure correspond to the median latency, but in intel_idle we use the "worst case" latency figure instead. C6 target residency was increased from 384 us to 600 us, which may result in less C6 residency in some workloads. This value was tested and compared to values 384, and 1000. Value 600 is a reasonable tradeoff between power and performance. Signed-off-by: Artem Bityutskiy Acked-by: Zhang Rui Signed-off-by: Rafael J. Wysocki commit 5b08709313718e95ba06ef49aa82f964a605bd9c Author: Marc Zyngier Date: Thu Mar 18 18:30:26 2021 +0000 KVM: arm64: Fix host's ZCR_EL2 restore on nVHE We re-enter the EL1 host with CPTR_EL2.TZ set in order to be able to lazily restore ZCR_EL2 when required. However, the same CPTR_EL2 configuration also leads to trapping when ZCR_EL2 is accessed from EL2. Duh! Clear CPTR_EL2.TZ *before* writing to ZCR_EL2. Fixes: beed09067b42 ("KVM: arm64: Trap host SVE accesses when the FPSIMD state is dirty") Reported-by: Will Deacon Signed-off-by: Marc Zyngier commit bb9faeccbd6c05c6c2525be90f663f8694dd8bf6 Merge: cdd23ae6e68f5 a2cc1568dc500 Author: Mark Brown Date: Thu Mar 18 17:52:22 2021 +0000 Merge series "ASoC: codecs: remove cppcheck warnings" from Pierre-Louis Bossart : Lots of small fixes in various codec drivers that should have no functional impact. Pierre-Louis Bossart (23): ASoC: ab8500-codec: remove useless structure ASoC: ad1836: remove useless return ASoC: adau1977: remove useless return ASoC: cros_ec_codec: remove null pointer dereference warning ASoC: cx2070x: remove useless assignment ASoC: cx2070x: remove duplicate else branch ASoC: da7219-aad: remove useless initialization ASoC: hdac_hdmi: remove useless initializations ASoC: hdac_hdmi: align function arguments ASoC: hdmi-codec: remove useless initialization ASoC: hdmi-codec: remove unused spk_mask member ASoC: max98090: remove useless assignment ASoC: mt6358: remove useless initializations ASoC: mt6359: remove useless assignment ASoC: nau8825: remove useless assignment ASoC: pcm1681: remove useless assignment ASoC: sigmadsp: align function prototype ASoC: sti-sas: remove unused struct members ASoC: tas2562: remove useless assignment ASoC: tas2562: remove warning on return value ASoC: tas2770: remove useless initialization ASoC: tlv320dac33: clarify expression ASoC: tscs454: remove useless test on PLL disable sound/soc/codecs/ab8500-codec.c | 7 ------- sound/soc/codecs/ad1836.c | 2 -- sound/soc/codecs/adau1977.c | 2 -- sound/soc/codecs/cros_ec_codec.c | 2 +- sound/soc/codecs/cx2072x.c | 11 ++++------- sound/soc/codecs/da7219-aad.c | 2 +- sound/soc/codecs/hdac_hdmi.c | 14 +++++++------- sound/soc/codecs/hdac_hdmi.h | 2 +- sound/soc/codecs/hdmi-codec.c | 3 +-- sound/soc/codecs/max98090.c | 2 +- sound/soc/codecs/mt6358.c | 4 ++-- sound/soc/codecs/mt6359.c | 4 ++-- sound/soc/codecs/nau8825.c | 2 +- sound/soc/codecs/pcm1681.c | 2 +- sound/soc/codecs/sigmadsp.h | 2 +- sound/soc/codecs/sti-sas.c | 3 --- sound/soc/codecs/tas2562.c | 3 +-- sound/soc/codecs/tas2770.c | 2 +- sound/soc/codecs/tlv320dac33.c | 2 +- sound/soc/codecs/tscs454.c | 7 ++++++- 20 files changed, 32 insertions(+), 46 deletions(-) -- 2.25.1 commit cdd23ae6e68f5d1ee40e0de304a42c94dc98dc22 Merge: ad83b1adc58d6 b5571449e6186 Author: Mark Brown Date: Thu Mar 18 17:52:21 2021 +0000 Merge series "Fix reset controls and RPM of NVIDIA Tegra ASoC drivers" from Dmitry Osipenko : Hi, This series adds missing hardware reset controls to I2S and AC97 drivers, corrects runtime PM usage and drivers probe/remove order. Currently drivers happen to work properly because reset is implicitly deasserted by tegra-clk driver, but clk driver shouldn't touch the resets and we need to fix it because this breaks other Tegra drivers. Previously we fixed the resets of the AHUB and HDMI codec drivers, but turned out that we missed the I2C and AC97 drivers. Thanks to Paul Fertser for testing the pending clk patches and finding that audio got broken on Tegra20 AC100 netbook because of the missing I2S reset. Changelog: v5: - After taking another look at the drivers I noticed couple more things that could be improved. These new patches correct runtime PM and probe/remove order of the drivers: ASoC: tegra20: spdif: Correct driver removal order ASoC: tegra20: spdif: Remove handing of disabled runtime PM ASoC: tegra20: i2s: Add system level suspend-resume callbacks ASoC: tegra20: i2s: Correct driver removal order ASoC: tegra20: i2s: Use devm_clk_get() ASoC: tegra20: i2s: Remove handing of disabled runtime PM ASoC: tegra30: i2s: Correct driver removal order ASoC: tegra30: i2s: Use devm_clk_get() ASoC: tegra30: i2s: Remove handing of disabled runtime PM ASoC: tegra30: ahub: Reset global variable ASoC: tegra30: ahub: Correct suspend-resume callbacks ASoC: tegra30: ahub: Remove handing of disabled runtime PM v4: - Added missing prototype for reset_control_bulk_put(). v3: - Fixed reset stubs for !CONFIG_RESET_CONTROLLER. v2: - After some more testing I found that I2S control logic doesn't require I2S clock to be enabled for resetting. Hence it's fine to have I2S to be reset by parent AHUB driver, so I dropped "tegra30: i2s: Add reset control" patch. - While I was double-checking resets on Tegra30, I found that that Tegra30 I2S driver has a broken runtime PM which doesn't restore hardware state on resume and it's lost after AHUB RPM-resume. Thus, added this new patch "tegra30: i2s: Restore hardware state on runtime PM resume". - Added new patches which switch AHUB driver to use reset-bulk API. I took the RFC patch from Philipp Zabel, fixed it and added devm_reset_control_bulk_optional_get_exclusive_released() that will be useful for further Tegra GPU patches. This is a minor improvement which makes code cleaner. Dmitry Osipenko (16): ASoC: tegra20: ac97: Add reset control ASoC: tegra20: i2s: Add reset control ASoC: tegra30: i2s: Restore hardware state on runtime PM resume ASoC: tegra30: ahub: Switch to use reset-bulk API ASoC: tegra20: spdif: Correct driver removal order ASoC: tegra20: spdif: Remove handing of disabled runtime PM ASoC: tegra20: i2s: Add system level suspend-resume callbacks ASoC: tegra20: i2s: Correct driver removal order ASoC: tegra20: i2s: Use devm_clk_get() ASoC: tegra20: i2s: Remove handing of disabled runtime PM ASoC: tegra30: i2s: Correct driver removal order ASoC: tegra30: i2s: Use devm_clk_get() ASoC: tegra30: i2s: Remove handing of disabled runtime PM ASoC: tegra30: ahub: Reset global variable ASoC: tegra30: ahub: Correct suspend-resume callbacks ASoC: tegra30: ahub: Remove handing of disabled runtime PM Philipp Zabel (1): reset: Add reset_control_bulk API drivers/reset/core.c | 215 ++++++++++++++++++++++ include/linux/reset.h | 315 ++++++++++++++++++++++++++++++++ sound/soc/tegra/tegra20_ac97.c | 21 +++ sound/soc/tegra/tegra20_ac97.h | 1 + sound/soc/tegra/tegra20_i2s.c | 60 +++--- sound/soc/tegra/tegra20_i2s.h | 1 + sound/soc/tegra/tegra20_spdif.c | 16 +- sound/soc/tegra/tegra30_ahub.c | 168 ++++++----------- sound/soc/tegra/tegra30_ahub.h | 5 +- sound/soc/tegra/tegra30_i2s.c | 65 ++----- 10 files changed, 667 insertions(+), 200 deletions(-) -- 2.30.2 base-commit: a38fd8748464831584a19438cbb3082b5a2dab15 commit 9a6944fee68e25084130386c608c5ac8db487581 Author: Steven Rostedt (VMware) Date: Thu Feb 25 22:00:57 2021 -0500 tracing: Add a verifier to check string pointers for trace events It is a common mistake for someone writing a trace event to save a pointer to a string in the TP_fast_assign() and then display that string pointer in the TP_printk() with %s. The problem is that those two events may happen a long time apart, where the source of the string may no longer exist. The proper way to handle displaying any string that is not guaranteed to be in the kernel core rodata section, is to copy it into the ring buffer via the __string(), __assign_str() and __get_str() helper macros. Add a check at run time while displaying the TP_printk() of events to make sure that every %s referenced is safe to dereference, and if it is not, trigger a warning and only show the address of the pointer, and the dereferenced string if it can be safely retrieved with a strncpy_from_kernel_nofault() call. In order to not have to copy the parsing of vsnprintf() formats, or even exporting its code, the verifier relies on vsnprintf() being able to modify the va_list that is passed to it, and it remains modified after it is called. This is the case for some architectures like x86_64, but other architectures like x86_32 pass the va_list to vsnprintf() as a value not a reference, and the verifier can not use it to parse the non string arguments. Thus, at boot up, it is checked if vsnprintf() modifies the passed in va_list or not, and a static branch will disable the verifier if it's not compatible. Signed-off-by: Steven Rostedt (VMware) commit f2616c772c768485de18e7fcb2816bcdcd098339 Author: Steven Rostedt (VMware) Date: Wed Mar 17 13:34:35 2021 -0400 seq_buf: Add seq_buf_terminate() API In the case that the seq_buf buffer needs to be printed directly, add a way to make sure that the buffer is safe to read by forcing a nul terminating character at the end of the string, or the last byte of the buffer if the string has overflowed. Signed-off-by: Steven Rostedt (VMware) commit 5013f454a352cce8e62162976026a9c472595e42 Author: Steven Rostedt (VMware) Date: Thu Feb 25 16:51:23 2021 -0500 tracing: Add check of trace event print fmts for dereferencing pointers Trace events record data into the ring buffer at the time of the event. The trace event has a printf logic to display the recorded data at a much later time when the user reads the trace file. This makes using dereferencing pointers unsafe if the dereferenced pointer points to the original source. The safe way to handle this is to create an array within the trace event and copy the source into the array. Then the dereference pointer may point to that array. As this is a easy mistake to make, a check is added to examine all trace event print fmts to make sure that they are safe to use. This only checks the various %p* dereferenced pointers like %pB, %pR, etc. It does not handle dereferencing of strings, as there are some use cases that are OK to dereference the source. That will be dealt with differently. Signed-off-by: Steven Rostedt (VMware) commit e0196ae732343adfe8d854d88b3c0aae9595152f Author: Colin Ian King Date: Thu Mar 11 09:40:22 2021 +0000 ftrace: Fix spelling mistake "disabed" -> "disabled" There is a spelling mistake in a comment, fix it. Link: https://lkml.kernel.org/r/20210311094022.5978-1-colin.king@canonical.com Signed-off-by: Colin Ian King Signed-off-by: Steven Rostedt (VMware) commit 421d9d1bea6545543c00ffba4c83f369510de9a1 Author: Xu Wang Date: Mon Mar 8 02:24:59 2021 +0000 tools/latency-collector: Remove unneeded semicolon Fix semicolon.cocci warning: tools/tracing/latency/latency-collector.c:1021:2-3: Unneeded semicolon Link: https://lkml.kernel.org/r/20210308022459.59881-1-vulab@iscas.ac.cn Reviewed-by: Viktor Rosendahl Signed-off-by: Xu Wang Signed-off-by: Steven Rostedt (VMware) commit 2b7d2fe76f9c844af6f150d0f7a76c62dcfe7679 Author: Cao jin Date: Thu Mar 11 16:52:13 2021 +0800 bootconfig: Update prototype of setup_boot_config() Parameter "cmdline" has no use, drop it. Link: https://lkml.kernel.org/r/20210311085213.27680-1-jojing64@gmail.com Acked-by: Masami Hiramatsu Signed-off-by: Cao jin Signed-off-by: Steven Rostedt (VMware) commit d8279bfc5e9598682f657606d3830ab65932cfe4 Author: Steven Rostedt (VMware) Date: Tue Mar 16 12:41:07 2021 -0400 tracing: Add tracing_event_time_stamp() API Add a tracing_event_time_stamp() API that checks if the event passed in is not on the ring buffer but a pointer to the per CPU trace_buffered_event which does not have its time stamp set yet. If it is a pointer to the trace_buffered_event, then just return the current time stamp that the ring buffer would produce. Otherwise, return the time stamp from the event. Link: https://lkml.kernel.org/r/20210316164114.131996180@goodmis.org Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit a948c69d6fb1ba749a958a8a87d4eecdda28989d Author: Steven Rostedt (VMware) Date: Tue Mar 16 12:41:06 2021 -0400 ring-buffer: Add verifier for using ring_buffer_event_time_stamp() The ring_buffer_event_time_stamp() must be only called by an event that has not been committed yet, and is on the buffer that is passed in. This was used to help debug converting the histogram logic over to using the new time stamp code, and was proven to be very useful. Add a verifier that can check that this is the case, and extra WARN_ONs to catch unexpected use cases. Link: https://lkml.kernel.org/r/20210316164113.987294354@goodmis.org Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit b94bc80df64823e676b506f8de7dcf6a688d681e Author: Steven Rostedt (VMware) Date: Tue Mar 16 12:41:05 2021 -0400 tracing: Use a no_filter_buffering_ref to stop using the filter buffer Currently, the trace histograms relies on it using absolute time stamps to trigger the tracing to not use the temp buffer if filters are set. That's because the histograms need the full timestamp that is saved in the ring buffer. That is no longer the case, as the ring_buffer_event_time_stamp() can now return the time stamp for all events without all triggering a full absolute time stamp. Now that the absolute time stamp is an unrelated dependency to not using the filters. There's nothing about having absolute timestamps to keep from using the filter buffer. Instead, change the interface to explicitly state to disable filter buffering that the histogram logic can use. Link: https://lkml.kernel.org/r/20210316164113.847886563@goodmis.org Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit efe6196a6bc5bbc84b856316c4687fd24566a95c Author: Steven Rostedt (VMware) Date: Tue Mar 16 12:41:04 2021 -0400 ring-buffer: Allow ring_buffer_event_time_stamp() to return time stamp of all events Currently, ring_buffer_event_time_stamp() only returns an accurate time stamp of the event if it has an absolute extended time stamp attached to it. To make it more robust, use the event_stamp() in case the event does not have an absolute value attached to it. This will allow ring_buffer_event_time_stamp() to be used in more cases than just histograms, and it will also allow histograms to not require including absolute values all the time. Link: https://lkml.kernel.org/r/20210316164113.704830885@goodmis.org Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit b47e330231acbf4506b049643145cc64268a1940 Author: Steven Rostedt (VMware) Date: Tue Mar 16 12:41:03 2021 -0400 tracing: Pass buffer of event to trigger operations The ring_buffer_event_time_stamp() is going to be updated to extract the time stamp for the event without needing it to be set to have absolute values for all events. But to do so, it needs the buffer that the event is on as the buffer saves information for the event before it is committed to the buffer. If the trace buffer is disabled, a temporary buffer is used, and there's no access to this buffer from the current histogram triggers, even though it is passed to the trace event code. Pass the buffer that the event is on all the way down to the histogram triggers. Link: https://lkml.kernel.org/r/20210316164113.542448131@goodmis.org Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit 8672e4948d0c44272cc05f8ff563dbf6b6c1289f Author: Steven Rostedt (VMware) Date: Tue Mar 16 12:41:02 2021 -0400 ring-buffer: Add a event_stamp to cpu_buffer for each level of nesting Add a place to save the current event time stamp for each level of nesting. This will be used to retrieve the time stamp of the current event before it is committed. Link: https://lkml.kernel.org/r/20210316164113.399089673@goodmis.org Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit e20044f7e9ae2b5395ca3ae9bd0907fdf43357a7 Author: Steven Rostedt (VMware) Date: Tue Mar 16 12:41:01 2021 -0400 ring-buffer: Separate out internal use of ring_buffer_event_time_stamp() The exported use of ring_buffer_event_time_stamp() is going to become different than how it is used internally. Move the internal logic out into a static function called rb_event_time_stamp(), and have the internal callers call that instead. Link: https://lkml.kernel.org/r/20210316164113.257790481@goodmis.org Reviewed-by: Tom Zanussi Signed-off-by: Steven Rostedt (VMware) commit f998d7d545a2248faf5a4311240941dfe813eedc Author: Darrick J. Wong Date: Wed Mar 17 21:17:36 2021 -0700 quota: report warning limits for realtime space quotas Report the number of warnings that a user will get for exceeding the soft limit of a realtime volume. This plugs a gap needed before we can land a realtime quota implementation for XFS in the next cycle. Link: https://lore.kernel.org/r/20210318041736.GB22094@magnolia Signed-off-by: Darrick J. Wong Signed-off-by: Jan Kara commit c8a4b35f5063c256451a3508e9f0b9e6b49debbb Author: Marc Zyngier Date: Wed Mar 10 13:34:26 2021 +0000 KVM: arm64: Force SCTLR_EL2.WXN when running nVHE As the EL2 nVHE object is nicely split into sections and that we already use differenciating permissions for data and code, we can enable SCTLR_EL2.WXN so that we don't have to worry about misconfiguration of the page tables. Flip the WXN bit and get the ball running! Acked-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit fe2c8d19189e23a951e45fdb73aade25b1665bce Author: Marc Zyngier Date: Wed Mar 10 13:33:20 2021 +0000 KVM: arm64: Turn SCTLR_ELx_FLAGS into INIT_SCTLR_EL2_MMU_ON Only the nVHE EL2 code is using this define, so let's make it plain that it is EL2 only, and refactor it to contain all the bits we need when configuring the EL2 MMU, and only those. Acked-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit bc6ddaa67abc9345370b219d07b079d25665f868 Author: Marc Zyngier Date: Wed Mar 10 13:32:53 2021 +0000 KVM: arm64: Use INIT_SCTLR_EL2_MMU_OFF to disable the MMU on KVM teardown Instead of doing a RMW on SCTLR_EL2 to disable the MMU, use the existing define that loads the right set of bits. Acked-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit 45879a57751d272ced9ed5ccfd28c58e2095ceb7 Author: Marc Zyngier Date: Wed Mar 10 13:25:57 2021 +0000 arm64: Use INIT_SCTLR_EL1_MMU_OFF to disable the MMU on CPU restart Instead of doing a RMW on SCTLR_EL1 to disable the MMU, use the existing define that loads the right set of bits. Acked-by: Will Deacon Acked-by: Mark Rutland Signed-off-by: Marc Zyngier commit 79419e13e8082cc15d174df979a363528e31f2e7 Author: Joerg Roedel Date: Wed Mar 10 09:43:21 2021 +0100 x86/boot/compressed/64: Setup IDT in startup_32 boot path This boot path needs exception handling when it is used with SEV-ES. Setup an IDT and provide a helper function to write IDT entries for use in 32-bit protected mode. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210312123824.306-5-joro@8bytes.org commit 0c289ff81c24033777fab23019039f11e1449ba4 Author: Joerg Roedel Date: Wed Mar 10 09:43:20 2021 +0100 x86/boot/compressed/64: Reload CS in startup_32 Exception handling in the startup_32 boot path requires the CS selector to be correctly set up. Reload it from the current GDT. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210312123824.306-4-joro@8bytes.org commit eab696d8e8b9c9d600be6fad8dd8dfdfaca6ca7c Author: Joerg Roedel Date: Fri Mar 12 13:38:18 2021 +0100 x86/sev: Do not require Hypervisor CPUID bit for SEV guests A malicious hypervisor could disable the CPUID intercept for an SEV or SEV-ES guest and trick it into the no-SEV boot path, where it could potentially reveal secrets. This is not an issue for SEV-SNP guests, as the CPUID intercept can't be disabled for those. Remove the Hypervisor CPUID bit check from the SEV detection code to protect against this kind of attack and add a Hypervisor bit equals zero check to the SME detection path to prevent non-encrypted guests from trying to enable SME. This handles the following cases: 1) SEV(-ES) guest where CPUID intercept is disabled. The guest will still see leaf 0x8000001f and the SEV bit. It can retrieve the C-bit and boot normally. 2) Non-encrypted guests with intercepted CPUID will check the SEV_STATUS MSR and find it 0 and will try to enable SME. This will fail when the guest finds MSR_K8_SYSCFG to be zero, as it is emulated by KVM. But we can't rely on that, as there might be other hypervisors which return this MSR with bit 23 set. The Hypervisor bit check will prevent that the guest tries to enable SME in this case. 3) Non-encrypted guests on SEV capable hosts with CPUID intercept disabled (by a malicious hypervisor) will try to boot into the SME path. This will fail, but it is also not considered a problem because non-encrypted guests have no protection against the hypervisor anyway. [ bp: s/non-SEV/non-encrypted/g ] Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Acked-by: Tom Lendacky Link: https://lkml.kernel.org/r/20210312123824.306-3-joro@8bytes.org commit b099155e2df7dadf8b1ad9828158b89f5639f654 Author: Joerg Roedel Date: Wed Mar 10 09:43:19 2021 +0100 x86/boot/compressed/64: Cleanup exception handling before booting kernel Disable the exception handling before booting the kernel to make sure any exceptions that happen during early kernel boot are not directed to the pre-decompression code. Signed-off-by: Joerg Roedel Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210312123824.306-2-joro@8bytes.org commit afb4a37778491eae010a43edebea32ff2d45f01c Merge: 229164175ff0c 1e28eed17697b Author: Borislav Petkov Date: Thu Mar 18 16:43:11 2021 +0100 Merge tag 'v5.12-rc3' into x86/seves Pick up dependent SEV-ES urgent changes which went into -rc3 to base new work ontop. Signed-off-by: Borislav Petkov commit fdc13979f91e664717f47eb8c49094e4b7f202e3 Author: Lorenzo Bianconi Date: Mon Mar 8 12:06:58 2021 +0100 bpf, devmap: Move drop error path to devmap for XDP_REDIRECT We want to change the current ndo_xdp_xmit drop semantics because it will allow us to implement better queue overflow handling. This is working towards the larger goal of a XDP TX queue-hook. Move XDP_REDIRECT error path handling from each XDP ethernet driver to devmap code. According to the new APIs, the driver running the ndo_xdp_xmit pointer, will break tx loop whenever the hw reports a tx error and it will just return to devmap caller the number of successfully transmitted frames. It will be devmap responsibility to free dropped frames. Move each XDP ndo_xdp_xmit capable driver to the new APIs: - veth - virtio-net - mvneta - mvpp2 - socionext - amazon ena - bnxt - freescale (dpaa2, dpaa) - xen-frontend - qede - ice - igb - ixgbe - i40e - mlx5 - ti (cpsw, cpsw-new) - tun - sfc Signed-off-by: Lorenzo Bianconi Signed-off-by: Daniel Borkmann Reviewed-by: Ioana Ciornei Reviewed-by: Ilias Apalodimas Reviewed-by: Camelia Groza Acked-by: Edward Cree Acked-by: Jesper Dangaard Brouer Acked-by: Shay Agroskin Link: https://lore.kernel.org/bpf/ed670de24f951cfd77590decf0229a0ad7fd12f6.1615201152.git.lorenzo@kernel.org commit 3231307e399a411db07d7d7927df38c4a4b88353 Author: Mika Westerberg Date: Mon Dec 28 13:01:39 2020 +0200 thunderbolt: Add support for USB4 DROM USB4 router DROM differs sligthly from Thunderbolt 1-3 DROM. For instance it does not include UID and CRC8 in the header section, and it has product descriptor genereric entry to describe the product IDs and related information. If the "Version" field in the DROM header section reads 3 it means the router only has USB4 DROM and if it reads 1 it means the router supports TBT3 compatible DROM. For this reason, update the DROM parsing code to support "pure" USB4 DROMs too. While there drop the extra empty line at the end of tb_drom_read(). Signed-off-by: Mika Westerberg commit e23a5afd013c15909169c56751f8d7dac67a68eb Author: Mika Westerberg Date: Mon Dec 28 12:47:02 2020 +0200 thunderbolt: Check quirks in tb_switch_add() This makes it more visible on the main path of adding router. Signed-off-by: Mika Westerberg commit 5adab6cc45c448dd329fceec9aca4f4d4c0559c5 Author: Mika Westerberg Date: Fri Jan 8 16:32:19 2021 +0200 thunderbolt: Add KUnit tests for DMA tunnels Add a couple of tests to check DMA tunneling functionality. Signed-off-by: Mika Westerberg commit 15a4c7e8f916f4826b0bb541663798af3a1294bd Author: Mika Westerberg Date: Mon May 4 17:00:38 2020 +0300 thunderbolt: Add KUnit tests for XDomain properties This adds KUnit tests for parsing, formatting and copying of XDomain properties. Signed-off-by: Mika Westerberg commit 952400756dfc7311defbcafca795efe85dd858b3 Author: Mika Westerberg Date: Fri Jan 8 16:33:03 2021 +0200 net: thunderbolt: Align the driver to the USB4 networking spec The USB4 networking spec (USB4NET) recommends different timeouts, and also suggest that the driver sets the 64k frame support flag in the properties block. Make the networking driver to honor this. Signed-off-by: Mika Westerberg commit 180b0689425c6fb2b35e69a3316ee38371a782df Author: Mika Westerberg Date: Fri Jan 8 16:25:39 2021 +0200 thunderbolt: Allow multiple DMA tunnels over a single XDomain connection Currently we have had an artificial limitation of a single DMA tunnel per XDomain connection. However, hardware wise there is no such limit and software based connection manager can take advantage of all the DMA rings available on the host to establish tunnels. For this reason make the tb_xdomain_[enable|disable]_paths() to take the DMA ring and HopID as parameter instead of storing them in the struct tb_xdomain. We also add API functions to allocate input and output HopIDs of the XDomain connection that the service drivers can use instead of hard-coding. Also convert the two existing service drivers over to this API. Signed-off-by: Mika Westerberg commit 5cfdd300b7b1e6f2390cf0d71040a8c26297bef7 Author: Mika Westerberg Date: Thu Mar 4 13:44:48 2021 +0200 thunderbolt: Drop unused tb_port_set_initial_credits() This function is not used anymore in the driver so we can remove it. Signed-off-by: Mika Westerberg commit e5876559b579975e054fdf747c08077628fad175 Author: Mika Westerberg Date: Thu Jan 14 20:27:58 2021 +0300 thunderbolt: Use dedicated flow control for DMA tunnels The USB4 inter-domain service spec recommends using dedicated flow control scheme so update the driver accordingly. Signed-off-by: Mika Westerberg commit 46b494f286812a88caba28dd0810cf3a55747431 Author: Mika Westerberg Date: Fri Jan 8 14:57:19 2021 +0200 thunderbolt: Add support for maxhopid XDomain property USB4 inter-domain spec mandates that the compatible hosts expose a new property "maxhopid" that tells the connection manager on the other side what is the maximum supported input HopID over the connection. Since this is depend on the lane adapter the cable is connected it needs to be filled in dynamically. For this reason we take a copy of the global properties and fill then for each XDomain connection upon first connect, and then keep updating it if the generation changes as services are being added/removed. We also take advantage of this copy to fill in the hostname. We also expose this maxhopid as an attribute under each XDomain device. While there drop kernel-doc entry for property_lock which seems to be left there when the structure was originally introduced. Signed-off-by: Mika Westerberg commit 7d3084c0b77c6c417a16fc1c5bf3bc3149d20fab Author: Mika Westerberg Date: Fri Jan 8 14:38:24 2021 +0200 thunderbolt: Add tb_property_copy_dir() This function takes a deep copy of the properties. We need this in order to support more dynamic properties per XDomain connection as required by the USB4 inter-domain service spec. Signed-off-by: Mika Westerberg commit 3bb163331e3acafb217f4259b1987e5f56b0456a Author: Mika Westerberg Date: Fri Jan 8 14:17:39 2021 +0200 thunderbolt: Align XDomain protocol timeouts with the spec The USB4 inter-domain service spec has slightly different recommended timeouts for the XDomain protocol so align the driver with those. Signed-off-by: Mika Westerberg commit a6932c3f9ef3aa0c61fae4ff591f1f01783a45b4 Author: Mika Westerberg Date: Fri Jan 8 14:05:06 2021 +0200 thunderbolt: Use pseudo-random number as initial property block generation As recommended by USB4 inter-domain service spec use pseudo-random value instead of zero as initial XDomain property block generation value. Signed-off-by: Mika Westerberg commit 8ccbed2476f2a615d5045a7c5c7b459db7dd9263 Author: Mika Westerberg Date: Fri Jan 8 12:55:49 2021 +0200 thunderbolt: Do not re-establish XDomain DMA paths automatically This step is actually not needed. The service drivers themselves will handle this once they have negotiated the service up and running again with the remote side. Also dropping this makes it easier to add support for multiple DMA tunnels over a single XDomain connection. Signed-off-by: Mika Westerberg commit d29c59b1a4dc74ab0b27c540f39e766906d30e29 Author: Mika Westerberg Date: Thu Dec 17 15:24:56 2020 +0300 thunderbolt: Add more logging to XDomain connections Currently the driver is pretty quiet when another host is connected which makes debugging possible issues harder. For this reason add more logging on debug level that can be turned on as needed. While there log the host-to-host connection on info level analogous to routers and retimers. Signed-off-by: Mika Westerberg commit fea627003606d4220d3f7dcb65e8a144c8b4d5d9 Author: Mika Westerberg Date: Fri Jan 8 12:45:05 2021 +0200 Documentation / thunderbolt: Drop speed/lanes entries for XDomain These are actually not needed as we already have similar entries that apply to all devices on the Thunderbolt bus. Cc: Isaac Hazan Signed-off-by: Mika Westerberg commit 7f0a34d7900b8403d3068755856b86bcc790c5a3 Author: Mika Westerberg Date: Tue Dec 29 13:44:57 2020 +0200 thunderbolt: Decrease control channel timeout for software connection manager When the firmware connection manager is not proxying between the software and the hardware we can decrease the timeout for control packets significantly. The USB4 spec recommends 10 ms +- 1 ms but we use slightly larger value (100 ms) which is recommendation from Intel Thunderbolt firmware folks. When firmware connection manager is running then we keep using the existing 5000 ms. To implement this we move the control channel allocation to tb_domain_alloc(), and pass the timeout from that function to the tb_ctl_alloc(). Then make both connection manager implementations pass the timeout when they alloc the domain structure. While there update kernel-doc of struct tb_ctl to match the reality. Signed-off-by: Mika Westerberg commit bda83aeca3cfa8a5aacfe93ba4baf1be81c21f61 Author: Mika Westerberg Date: Tue Dec 22 13:40:31 2020 +0200 thunderbolt: Do not pass timeout for tb_cfg_reset() There is only one user for this function and it passes the default timeout to it anyway, so remove the parameter completely. This is also needed in the subsequent patch where we allow connection manager implementations to use different timeout for non-raw control channel messages. Signed-off-by: Mika Westerberg commit 61ec15e5534b1adcfc30cb2cf408144c6cd621f2 Author: Mika Westerberg Date: Mon Dec 28 13:17:13 2020 +0200 thunderbolt: Disable retry logic for intra-domain control packets In most cases the response packet is lost because the router in question was disconnected by the user. Resending the control packet in that case just adds unnecessary delays, so disable that for intra-domain control packets. For inter-domain (XDomain) packets we continue retrying. This also aligns the driver better what the Intel connection manager firmware is doing. Signed-off-by: Mika Westerberg commit 51ab30eb2ad4c4a61f827dc18863cd70dc46dc32 Author: Jarkko Sakkinen Date: Thu Mar 18 01:53:30 2021 +0200 x86/sgx: Replace section->init_laundry_list with sgx_dirty_page_list During normal runtime, the "ksgxd" daemon behaves like a version of kswapd just for SGX. But, before it starts acting like kswapd, its first job is to initialize enclave memory. Currently, the SGX boot code places each enclave page on a epc_section->init_laundry_list. Once it starts up, the ksgxd code walks over that list and populates the actual SGX page allocator. However, the per-section structures are going away to make way for the SGX NUMA allocator. There's also little need to have a per-section structure; the enclave pages are all treated identically, and they can be placed on the correct allocator list from metadata stored in the enclave page (struct sgx_epc_page) itself. Modify sgx_sanitize_section() to take a single page list instead of taking a section and deriving the list from there. Signed-off-by: Jarkko Sakkinen Signed-off-by: Borislav Petkov Acked-by: Dave Hansen Link: https://lkml.kernel.org/r/20210317235332.362001-1-jarkko.sakkinen@intel.com commit 48073935b9a4f820733937bd40a74c1c389caee6 Author: Bjorn Andersson Date: Thu Mar 11 16:24:41 2021 -0800 remoteproc: qcom: wcnss: Allow specifying firmware-name Introduce a firmware-name property, in order to be able to support device/platform specific firmware for the wireless connectivity subsystem; in line with other Qualcomm remoteproc drivers. Acked-by: Mathieu Poirier Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210312002441.3273183-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit b34c0f8fff40bdb6c856222aa9076a05d649fa62 Author: Ankit Nautiyal Date: Tue Mar 9 10:09:14 2021 +0530 drm/i915/display: Remove FRL related code from disable DP sequence for older platforms Remove code for resetting frl related members from intel_disable_dp, as this is not applicable for older platforms. Signed-off-by: Ankit Nautiyal Reviewed-by: Ville Syrjälä Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210309043915.1921-3-ankit.k.nautiyal@intel.com commit e9269650db2f5b4aeeafced1a42b2e51d10bcdf5 Author: Dmitry Baryshkov Date: Wed Feb 10 16:34:58 2021 +0300 arm64: dts: qcom: qrb5165-rb5: switch into using GPIO for SPI0 CS On the GENI SPI controller is is not very efficient if the chip select line is controlled by the QUP itself (see 37dd4b777942 ("arm64: dts: qcom: sc7180: Provide pinconf for SPI to use GPIO for CS") for the details). Configure SPI0 CS pin as a GPIO. Signed-off-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210210133458.1201066-5-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit eb97ccbba0fe5978cd73b133ee99203aab6ff2bf Author: Dmitry Baryshkov Date: Wed Feb 10 16:34:57 2021 +0300 arm64: dts: qcom: sm8250: add pinctrl for SPI using GPIO as a CS GENI SPI controller shows several issues if it manages the CS on its own (see 37dd4b777942 ("arm64: dts: qcom: sc7180: Provide pinconf for SPI to use GPIO for CS")) for the details. Provide pinctrl entries for SPI controllers using the same CS pin but in GPIO mode. Signed-off-by: Dmitry Baryshkov Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/20210210133458.1201066-4-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit c88f9ecc0ef37bad089816dc7ebb8a69626a8892 Author: Dmitry Baryshkov Date: Wed Feb 10 16:34:56 2021 +0300 arm64: dts: qcom: sm8250: further split of spi pinctrl config Split "default" device tree nodes into common "data-clk" nodes and "cs" nodes which might differ from board to board depending on how the slave chips are wired. Reviewed-by: Douglas Anderson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210210133458.1201066-3-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit d3769729dbad61501571014e1263bb1fd97359c2 Author: Dmitry Baryshkov Date: Wed Feb 10 16:34:55 2021 +0300 arm64: dts: qcom: sm8250: split spi pinctrl config As discussed on linux-arm-msm list, start splitting sm8250 pinctrl settings into generic and board-specific parts. The first part to receive such treatment is the spi, so split spi pinconf to the board device tree. Reviewed-by: Douglas Anderson Signed-off-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20210210133458.1201066-2-dmitry.baryshkov@linaro.org Signed-off-by: Bjorn Andersson commit d9f6e12fb0b7fcded0bac34b8293ec46f80dfc33 Author: Ingo Molnar Date: Thu Mar 18 15:28:01 2021 +0100 x86: Fix various typos in comments Fix ~144 single-word typos in arch/x86/ code comments. Doing this in a single commit should reduce the churn. Signed-off-by: Ingo Molnar Cc: Borislav Petkov Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Paolo Bonzini Cc: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org commit 14ff3ed86e2c1700345f411b90a78f62867f217e Merge: 81519f778830d 1e28eed17697b Author: Ingo Molnar Date: Thu Mar 18 15:27:03 2021 +0100 Merge tag 'v5.12-rc3' into x86/cleanups, to refresh the tree Signed-off-by: Ingo Molnar commit 6e94095c5566c946a487fa1f7212b60699fb52c5 Author: Daniel Kiss Date: Thu Mar 11 19:23:07 2021 +0000 KVM: arm64: Enable SVE support for nVHE Now that KVM is equipped to deal with SVE on nVHE, remove the code preventing it from being used as well as the bits of documentation that were mentioning the incompatibility. Acked-by: Will Deacon Signed-off-by: Daniel Kiss Signed-off-by: Marc Zyngier commit 8c8010d69c1322734a272eb95dbbf42b5190e565 Author: Marc Zyngier Date: Thu Mar 11 18:29:55 2021 +0000 KVM: arm64: Save/restore SVE state for nVHE Implement the SVE save/restore for nVHE, following a similar logic to that of the VHE implementation: - the SVE state is switched on trap from EL1 to EL2 - no further changes to ZCR_EL2 occur as long as the guest isn't preempted or exit to userspace - ZCR_EL2 is reset to its default value on the first SVE access from the host EL1, and ZCR_EL1 restored to the default guest value in vcpu_put() Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit beed09067b428a7e84a53b05c1de1f93c8460e91 Author: Marc Zyngier Date: Wed Mar 17 16:50:39 2021 +0000 KVM: arm64: Trap host SVE accesses when the FPSIMD state is dirty ZCR_EL2 controls the upper bound for ZCR_EL1, and is set to a potentially lower limit when the guest uses SVE. In order to restore the SVE state on the EL1 host, we must first reset ZCR_EL2 to its original value. To make it as lazy as possible on the EL1 host side, set the SVE trapping in place when exiting from the guest. On the first EL1 access to SVE, ZCR_EL2 will be restored to its full glory. Suggested-by: Andrew Scull Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit b145a8437aab2799969f6ad8e384b557872333c2 Author: Marc Zyngier Date: Fri Mar 12 14:30:52 2021 +0000 KVM: arm64: Save guest's ZCR_EL1 before saving the FPSIMD state Make sure the guest's ZCR_EL1 is saved before we save/flush the state. This will be useful in later patches. Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 0a9a98fda3a24b0775ace4be096290b221f2f6a5 Author: Marc Zyngier Date: Thu Mar 11 15:07:14 2021 +0000 KVM: arm64: Map SVE context at EL2 when available When running on nVHE, and that the vcpu supports SVE, map the SVE state at EL2 so that KVM can access it. Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 52029198c1cec1e21513d74f87363a0408f28650 Author: Marc Zyngier Date: Tue Mar 16 08:52:40 2021 +0000 KVM: arm64: Rework SVE host-save/guest-restore In order to keep the code readable, move the host-save/guest-restore sequences in their own functions, with the following changes: - the hypervisor ZCR is now set from C code - ZCR_EL2 is always used as the EL2 accessor This results in some minor assembler macro rework. No functional change intended. Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 71ce1ae56e4d43a0c568e2d4bfb154cd15306a82 Author: Marc Zyngier Date: Thu Mar 18 09:43:03 2021 +0000 arm64: sve: Provide a conditional update accessor for ZCR_ELx A common pattern is to conditionally update ZCR_ELx in order to avoid the "self-synchronizing" effect that writing to this register has. Let's provide an accessor that does exactly this. Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 1066cfbdfa3f5c401870fad577fe63d1171a5bcd Author: Guru Das Srinagesh Date: Wed Mar 10 16:39:52 2021 -0800 regmap-irq: Extend sub-irq to support non-fixed reg strides Qualcomm's MFD chips have a top level interrupt status register and sub-irqs (peripherals). When a bit in the main status register goes high, it means that the peripheral corresponding to that bit has an unserviced interrupt. If the bit is not set, this means that the corresponding peripheral does not. Commit a2d21848d9211d ("regmap: regmap-irq: Add main status register support") introduced the sub-irq logic that is currently applied only when reading status registers, but not for any other functions like acking or masking. Extend the use of sub-irq to all other functions, with two caveats regarding the specification of offsets: - Each member of the sub_reg_offsets array should be of length 1 - The specified offsets should be the unequal strides for each sub-irq device. In QCOM's case, all the *_base registers are to be configured to the base addresses of the first sub-irq group, with offsets of each subsequent group calculated as a difference from these addresses. Continuing from the example mentioned in the cover letter: /* * Address of MISC_INT_MASK = 0x1011 * Address of TEMP_ALARM_INT_MASK = 0x2011 * Address of GPIO01_INT_MASK = 0x3011 * * Calculate offsets as: * offset_0 = 0x1011 - 0x1011 = 0 (to access MISC's * registers) * offset_1 = 0x2011 - 0x1011 = 0x1000 * offset_2 = 0x3011 - 0x1011 = 0x2000 */ static unsigned int sub_unit0_offsets[] = {0}; static unsigned int sub_unit1_offsets[] = {0x1000}; static unsigned int sub_unit2_offsets[] = {0x2000}; static struct regmap_irq_sub_irq_map chip_sub_irq_offsets[] = { REGMAP_IRQ_MAIN_REG_OFFSET(sub_unit0_offsets), REGMAP_IRQ_MAIN_REG_OFFSET(sub_unit0_offsets), REGMAP_IRQ_MAIN_REG_OFFSET(sub_unit0_offsets), }; static struct regmap_irq_chip chip_irq_chip = { --------8<-------- .not_fixed_stride = true, .mask_base = MISC_INT_MASK, .type_base = MISC_INT_TYPE, .ack_base = MISC_INT_ACK, .sub_reg_offsets = chip_sub_irq_offsets, --------8<-------- }; Signed-off-by: Guru Das Srinagesh Link: https://lore.kernel.org/r/526562423eaa58b4075362083f561841f1d6956c.1615423027.git.gurus@codeaurora.org Signed-off-by: Mark Brown commit ad83b1adc58d6693036fd330d6af95a33564eaae Author: Brent Lu Date: Wed Mar 17 19:08:24 2021 +0800 ASoC: Intel: sof_rt5682: Add ALC1015Q-VB speaker amp support This patch adds jsl_rt5682_rt1015p which supports the RT5682 headset codec and ALC1015Q-VB speaker amplifier combination on JasperLake platform. This driver also supports ALC1015Q-CG if running in auto-mode. Following table shows the audio interface support of the two amplifiers. | ALC1015Q-CG | ALC1015Q-VB ===================================== I2C | Yes | No Auto-mode | 48K, 64fs | 16k, 32fs | 48k, 32fs | 48k, 64fs Signed-off-by: Brent Lu Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210317110824.20814-1-brent.lu@intel.com Signed-off-by: Mark Brown commit 7ec79d3850d0cb6dc52e6aa472886ab3adf15863 Author: Jack Yu Date: Thu Mar 11 10:58:09 2021 +0800 ASoC: rt1019: add rt1019 amplifier driver This is initial amplifier driver for rt1019. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20210311025809.31852-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 8dd855334736f275e9de71096d816c8d9da46bf7 Author: Bhaskar Chowdhury Date: Sun Mar 14 04:48:50 2021 +0530 ASoC: Fix a typo in the file rt5682.txt s/drving/driving/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210313231850.17278-1-unixbhaskar@gmail.com Signed-off-by: Mark Brown commit bef2897d31b97852d80b38e9376ed5ef3a90b309 Author: Nick Desaulniers Date: Sun Mar 14 18:39:08 2021 -0700 ASoC: Intel: Skylake: skl-topology: fix -frame-larger-than sound/soc/intel/skylake/skl-topology.c:3613:13: warning: stack frame size of 1304 bytes in function 'skl_tplg_complete' [-Wframe-larger-than=] struct snd_ctl_elem_value is 1224 bytes in my configuration. Heap allocate it, then free it within the current frame. Suggested-by: Andy Shevchenko Signed-off-by: Nick Desaulniers Link: https://lore.kernel.org/r/20210315013908.217219-1-nick.desaulniers@gmail.com Signed-off-by: Mark Brown commit e4e4e89482eafab0774ac0f93dc998eea84e626c Author: Vignesh Raghavendra Date: Thu Mar 18 17:07:57 2021 +0530 arm64: dts: ti: k3-am64-evm/sk: Add OSPI flash DT node Both AM64 EVM and SK have a 512Mb S28HS512T Octal SPI NOR flash. Add DT node for the same. Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20210318113757.21012-2-vigneshr@ti.com commit 81623c55868475c4a81c7cdce38191c92ea37022 Author: Vignesh Raghavendra Date: Thu Mar 18 17:07:56 2021 +0530 arm64: dts: ti: k3-am64-main: Add OSPI node AM64 SoC has a single Octal SPI (OSPI) instance under Flash SubSystem (FSS). Add DT entry for the same. Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20210318113757.21012-1-vigneshr@ti.com commit fad4e18fe4dccacf68418da01e98c4b8fb590023 Author: Vignesh Raghavendra Date: Thu Mar 18 17:04:43 2021 +0530 arm64: dts: ti: k3-am64-main: Add ADC nodes AM64 SoC has a single ADC IP with 8 channels. Add DT node for the same. Default usecase is to control ADC from non Linux core on the system on AM642 GP EVM, therefore mark the node as reserved in k3-am642-evm.dts file. ADC lines are not pinned out on AM642 SK board, therefore disable the node in k3-am642-sk.dts file. Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210318113443.20036-1-vigneshr@ti.com commit a2cc1568dc50020a807c94bd14a053dd54e9c35e Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:46 2021 -0600 ASoC: tscs454: remove useless test on PLL disable cppcheck warning: sound/soc/codecs/tscs454.c:730:37: style: Same value in both branches of ternary operator. [duplicateValueTernary] val = pll1 ? FV_PLL1CLKEN_DISABLE : FV_PLL2CLKEN_DISABLE; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-24-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 39e69cef0aa9f6897161a11ed84362f5805c43fd Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:45 2021 -0600 ASoC: tlv320dac33: clarify expression cppcheck warning: sound/soc/codecs/tlv320dac33.c:1074:43: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] (dac33->alarm_threshold % period_size ? ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ffab1215bdbea7358051f8dd87b1240e4c6d56e6 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:44 2021 -0600 ASoC: tas2770: remove useless initialization cppcheck warning: sound/soc/codecs/tas2770.c:109:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2e40b21cd4f697a761f1c5e4f08aac1a5c6c6018 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:43 2021 -0600 ASoC: tas2562: remove warning on return value cppcheck warning: sound/soc/codecs/tas2562.c:530:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/tas2562.c:525:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/tas2562.c:530:9: note: Returning identical expression 'ret' return ret; ^ Fix with return 0 Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e83c47861c266f704d2344f51031ee67a93309ab Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:42 2021 -0600 ASoC: tas2562: remove useless assignment cppcheck throws a warning: sound/soc/codecs/tas2562.c:203:4: style: Assignment of function parameter has no effect outside the function. [uselessAssignmentArg] tx_mask &= ~(1 << right_slot); ^ This assignment seems to come from a copy/paste but the value is indeed not used. Let's remove it. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 02a70d7f26e7a3d87c9a5af39ca399b52a451a1a Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:41 2021 -0600 ASoC: sti-sas: remove unused struct members cppcheck warnings: sound/soc/codecs/sti-sas.c:54:25: style: struct member 'sti_dac_audio::field' is never used. [unusedStructMember] struct regmap_field **field; ^ sound/soc/codecs/sti-sas.c:55:24: style: struct member 'sti_dac_audio::rst' is never used. [unusedStructMember] struct reset_control *rst; ^ sound/soc/codecs/sti-sas.c:61:25: style: struct member 'sti_spdif_audio::field' is never used. [unusedStructMember] struct regmap_field **field; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 17d74e68e9765d9549acf1c36caa8b7559dc99ce Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:40 2021 -0600 ASoC: sigmadsp: align function prototype cppcheck warning: sound/soc/codecs/sigmadsp.c:736:60: style:inconclusive: Function 'sigmadsp_setup' argument 2 names different: declaration 'rate' definition 'samplerate'. [funcArgNamesDifferent] int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int samplerate) ^ sound/soc/codecs/sigmadsp.h:62:60: note: Function 'sigmadsp_setup' argument 2 names different: declaration 'rate' definition 'samplerate'. int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int rate); ^ sound/soc/codecs/sigmadsp.c:736:60: note: Function 'sigmadsp_setup' argument 2 names different: declaration 'rate' definition 'samplerate'. int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int samplerate) ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f10280d5c59b8d83ae9e9e2307075cc7ad32a6b8 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:39 2021 -0600 ASoC: pcm1681: remove useless assignment cppcheck warning: sound/soc/codecs/pcm1681.c:87:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, val = -1, enable = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a3966b254c481ee1890f75d809a52e5aa358c4b1 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:38 2021 -0600 ASoC: nau8825: remove useless assignment cppcheck warning: sound/soc/codecs/nau8825.c:2113:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d068ab4eab0de3224b32ac37234d4d33452d5b01 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:37 2021 -0600 ASoC: mt6359: remove useless assignment cppcheck warning: sound/soc/codecs/mt6359.c:242:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:260:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:274:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:274:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2b5e8cd53ffad8c586d8a9d47087fdb058a21287 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:36 2021 -0600 ASoC: mt6358: remove useless initializations cppcheck warnings: sound/soc/codecs/mt6358.c:334:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6358.c:350:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ 185/930 files checked 25% done Checking sound/soc/codecs/mt6359.c ... sound/soc/codecs/mt6359.c:274:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ sound/soc/codecs/mt6359.c:274:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 226a783f3dcf7f565c173627d565135424ee0be9 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:35 2021 -0600 ASoC: max98090: remove useless assignment cppcheck warning: sound/soc/codecs/max98090.c:1835:16: style: Variable 'test_diff' is assigned a value that is never used. [unreadVariable] int test_diff = INT_MAX; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9ad869fee5c598d914fa5cf8fb26f5e106e90956 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:34 2021 -0600 ASoC: hdmi-codec: remove unused spk_mask member fix cppcheck warning: sound/soc/codecs/hdmi-codec.c:25:16: style: struct member 'hdmi_codec_channel_map_table::spk_mask' is never used. [unusedStructMember] unsigned long spk_mask; /* speaker position bit mask */ ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 3c011ef344cddd15be0a9b2256f7886f6b5eeec5 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:33 2021 -0600 ASoC: hdmi-codec: remove useless initialization Fix cppcheck warning: sound/soc/codecs/hdmi-codec.c:745:5: style: Redundant initialization for 'cf'. The initialized value is overwritten before it is read. [redundantInitialization] cf = dai->playback_dma_data; ^ sound/soc/codecs/hdmi-codec.c:738:31: note: cf is initialized struct hdmi_codec_daifmt *cf = dai->playback_dma_data; ^ sound/soc/codecs/hdmi-codec.c:745:5: note: cf is overwritten cf = dai->playback_dma_data; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 997994d7e6fab713d1c03843c9698919e64cc135 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:32 2021 -0600 ASoC: hdac_hdmi: align function arguments cppcheck warning: sound/soc/codecs/hdac_hdmi.c:1882:54: style:inconclusive: Function 'hdac_hdmi_jack_init' argument 2 names different: declaration 'pcm' definition 'device'. [funcArgNamesDifferent] int hdac_hdmi_jack_init(struct snd_soc_dai *dai, int device, ^ sound/soc/codecs/hdac_hdmi.h:5:54: note: Function 'hdac_hdmi_jack_init' argument 2 names different: declaration 'pcm' definition 'device'. int hdac_hdmi_jack_init(struct snd_soc_dai *dai, int pcm, ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 426b3bbcee199e1e96ec62b1c1d9cb7019a84efb Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:31 2021 -0600 ASoC: hdac_hdmi: remove useless initializations Cppcheck complains a lot about possible null pointer dereferences but it's again a case of useless initializations to NULL. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f8a684a4c2c9a6f922453f0e5dc6d20b1bdb082b Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:30 2021 -0600 ASoC: da7219-aad: remove useless initialization cppcheck warning: sound/soc/codecs/da7219-aad.c:118:22: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int report = 0, ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Adam Thomson Link: https://lore.kernel.org/r/20210312182246.5153-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8d41c1ab248fa6e6bfd4728a31eec6d3b9e0f924 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:29 2021 -0600 ASoC: cx2070x: remove duplicate else branch cppcheck warning: sound/soc/codecs/cx2072x.c:1436:10: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] } else if (type & 0x4) { ^ sound/soc/codecs/cx2072x.c:1439:5: note: Found duplicate branches for 'if' and 'else'. } else { ^ sound/soc/codecs/cx2072x.c:1436:10: note: Found duplicate branches for 'if' and 'else'. } else if (type & 0x4) { ^ The last two branches do the same thing and can be collapsed together. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20210312182246.5153-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4d753b6642ee7304fc56f9fc463bb69ec641a037 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:28 2021 -0600 ASoC: cx2070x: remove useless assignment Cppcheck warning: sound/soc/codecs/cx2072x.c:830:26: style: Variable 'reg1.r.rx_data_one_line' is reassigned a value before the old one has been used. [redundantAssignment] reg1.r.rx_data_one_line = 1; ^ sound/soc/codecs/cx2072x.c:782:26: note: reg1.r.rx_data_one_line is assigned reg1.r.rx_data_one_line = 1; ^ sound/soc/codecs/cx2072x.c:830:26: note: reg1.r.rx_data_one_line is overwritten reg1.r.rx_data_one_line = 1; ^ sound/soc/codecs/cx2072x.c:831:26: style: Variable 'reg1.r.tx_data_one_line' is reassigned a value before the old one has been used. [redundantAssignment] reg1.r.tx_data_one_line = 1; ^ sound/soc/codecs/cx2072x.c:783:26: note: reg1.r.tx_data_one_line is assigned reg1.r.tx_data_one_line = 1; ^ sound/soc/codecs/cx2072x.c:831:26: note: reg1.r.tx_data_one_line is overwritten reg1.r.tx_data_one_line = 1; ^ Likely copy/paste. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Link: https://lore.kernel.org/r/20210312182246.5153-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 157c4df677569daad6f204c63cfaf226c941bf03 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:27 2021 -0600 ASoC: cros_ec_codec: remove null pointer dereference warning Cppcheck complains of a possible issue: sound/soc/codecs/cros_ec_codec.c:98:10: warning: Possible null pointer dereference: in [nullPointer] memcpy(in, msg->data, insize); ^ sound/soc/codecs/cros_ec_codec.c:162:34: note: Calling function 'send_ec_host_command', 5th argument 'NULL' value is 0 (uint8_t *)&p, sizeof(p), NULL, 0); ^ sound/soc/codecs/cros_ec_codec.c:98:10: note: Null pointer dereference memcpy(in, msg->data, insize); ^ In practice the access to the pointer is protected by another argument, but this is likely to fool other static analysis tools. Add a test to avoid doing the memcpy if the pointer is NULL or the size is zero. Signed-off-by: Pierre-Louis Bossart Acked-by: Enric Balletbo i Serra Link: https://lore.kernel.org/r/20210312182246.5153-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5b349c8f355ae4bd1de462f1f1b6164d14796b0e Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:26 2021 -0600 ASoC: adau1977: remove useless return Cppcheck warning: sound/soc/codecs/adau1977.c:242:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/adau1977.c:239:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/adau1977.c:242:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ca6b3a6ca047d23b9b2a54af9f7f4d6f41200719 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:25 2021 -0600 ASoC: ad1836: remove useless return Cppcheck warning: sound/soc/codecs/ad1836.c:311:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/ad1836.c:308:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/ad1836.c:311:9: note: Returning identical expression 'ret' return ret; ^ Likely copy/paste between adc and dac cases. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 73b4fe4a03db519977a22cdf34303bd0ac21c69d Author: Pierre-Louis Bossart Date: Fri Mar 12 12:22:24 2021 -0600 ASoC: ab8500-codec: remove useless structure Cppcheck warnings: sound/soc/codecs/ab8500-codec.c:117:20: style: struct member 'ab8500_codec_drvdata_dbg::vaud' is never used. [unusedStructMember] struct regulator *vaud; ^ sound/soc/codecs/ab8500-codec.c:118:20: style: struct member 'ab8500_codec_drvdata_dbg::vamic1' is never used. [unusedStructMember] struct regulator *vamic1; ^ sound/soc/codecs/ab8500-codec.c:119:20: style: struct member 'ab8500_codec_drvdata_dbg::vamic2' is never used. [unusedStructMember] struct regulator *vamic2; ^ sound/soc/codecs/ab8500-codec.c:120:20: style: struct member 'ab8500_codec_drvdata_dbg::vdmic' is never used. [unusedStructMember] struct regulator *vdmic; ^ The structure is never used, remove. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312182246.5153-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b5571449e6186bd37e8da16e7bce53f621c05e72 Author: Dmitry Osipenko Date: Sun Mar 14 18:44:59 2021 +0300 ASoC: tegra30: ahub: Remove handing of disabled runtime PM Runtime PM is always available on Tegra since commit 40b2bb1b132a ("ARM: tegra: enforce PM requirement"), hence there is no need to handle the case of a disabled RPM by Tegra drivers. Remove handing of a disabled runtime PM from Tegra30 AHUB driver. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-18-digetx@gmail.com Signed-off-by: Mark Brown commit e2965c2ca139e780dc353cef1474103bb037136e Author: Dmitry Osipenko Date: Sun Mar 14 18:44:58 2021 +0300 ASoC: tegra30: ahub: Correct suspend-resume callbacks Tegra30 AHUB driver always syncs hardware state on a runtime PM resume, hence there is no needed to re-sync the state on system resume. Replace the suspend-resume callbacks with a generic helpers which ensure that AHUB is suspended using RPM callbacks across system suspend-resume. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-17-digetx@gmail.com Signed-off-by: Mark Brown commit 5d956e3cb806870012c443bc265e6ac6188d3c36 Author: Dmitry Osipenko Date: Sun Mar 14 18:44:57 2021 +0300 ASoC: tegra30: ahub: Reset global variable Tegra30 AHUB uses global variable that is never reset by the driver on a probe failure and on driver removal, meaning that driver will never try to re-probe and can't be unbound. Make driver to reset the variable. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-16-digetx@gmail.com Signed-off-by: Mark Brown commit b5f6f781fcb27b3ae5a2f04312a190115b5cbbd1 Author: Dmitry Osipenko Date: Sun Mar 14 18:44:56 2021 +0300 ASoC: tegra30: i2s: Remove handing of disabled runtime PM Runtime PM is always available on Tegra since commit 40b2bb1b132a ("ARM: tegra: enforce PM requirement"), hence there is no need to handle the case of a disabled RPM by Tegra drivers. Remove handing of a disabled runtime PM from Tegra30 I2S driver. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-15-digetx@gmail.com Signed-off-by: Mark Brown commit 52674aef9eb678f30d99f77fd53f6c564d5e2d92 Author: Dmitry Osipenko Date: Sun Mar 14 18:44:55 2021 +0300 ASoC: tegra30: i2s: Use devm_clk_get() Use resource-managed variant of clk_get() to simplify code. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-14-digetx@gmail.com Signed-off-by: Mark Brown commit f852e1e4acf4ebde4c960bab6f89407fa18ca489 Author: Dmitry Osipenko Date: Sun Mar 14 18:44:54 2021 +0300 ASoC: tegra30: i2s: Correct driver removal order Tegra30 I2S driver has a wrong driver removal order, which should be opposite to the registration order, but it's not. In particular the runtime PM is disabled in a wrong order. Fix the order. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-13-digetx@gmail.com Signed-off-by: Mark Brown commit 80ec4a4cb36d3f8bb56b5aa89faceb1145ef7aea Author: Dmitry Osipenko Date: Sun Mar 14 18:44:53 2021 +0300 ASoC: tegra20: i2s: Remove handing of disabled runtime PM Runtime PM is always available on Tegra since commit 40b2bb1b132a ("ARM: tegra: enforce PM requirement"), hence there is no need to handle the case of a disabled RPM by Tegra drivers. Remove handing of a disabled runtime PM from Tegra20 I2S driver. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-12-digetx@gmail.com Signed-off-by: Mark Brown commit d3c6ef98dadd1e500445e4c5a9d684cbf3182c7d Author: Dmitry Osipenko Date: Sun Mar 14 18:44:52 2021 +0300 ASoC: tegra20: i2s: Use devm_clk_get() Use resource-managed variant of clk_get() to simplify code. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-11-digetx@gmail.com Signed-off-by: Mark Brown commit ca6e960ed6b10ba9236da8b3614574bb4524c65e Author: Dmitry Osipenko Date: Sun Mar 14 18:44:51 2021 +0300 ASoC: tegra20: i2s: Correct driver removal order Tegra20 I2S driver has a wrong driver removal order, which should be opposite to the registration order, but it's not. In particular the runtime PM is disabled in a wrong order. Fix the order. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-10-digetx@gmail.com Signed-off-by: Mark Brown commit e33fdd9bee12be35d080bfd4acc9d1e3a0d04001 Author: Dmitry Osipenko Date: Sun Mar 14 18:44:50 2021 +0300 ASoC: tegra20: i2s: Add system level suspend-resume callbacks Add system level suspend-resume callbacks in order to ensure that I2S is gated before system is suspended. This puts Tegra20 I2S driver on par with the Tegra30 I2S driver. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-9-digetx@gmail.com Signed-off-by: Mark Brown commit c53b396f0dd49a626ea2b1fc0a8b9e0a0bf95d4d Author: Dmitry Osipenko Date: Sun Mar 14 18:44:49 2021 +0300 ASoC: tegra20: spdif: Remove handing of disabled runtime PM Runtime PM is always available on Tegra since commit 40b2bb1b132a ("ARM: tegra: enforce PM requirement"), hence there is no need to handle the case of a disabled RPM by Tegra drivers. Remove handing of a disabled runtime PM from Tegra20 SPDIF driver. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-8-digetx@gmail.com Signed-off-by: Mark Brown commit 0911f154a2ae264ee2a7c868c1267a102396d016 Author: Dmitry Osipenko Date: Sun Mar 14 18:44:48 2021 +0300 ASoC: tegra20: spdif: Correct driver removal order Tegra20 SPDIF driver has a wrong driver removal order, which should be opposite to the registration order, but it's not. In particular the runtime PM is disabled in a wrong order. Fix the order. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-7-digetx@gmail.com Signed-off-by: Mark Brown commit 050086eb6dc945207b1db1d15cd81e9366dfd2f1 Author: Dmitry Osipenko Date: Sun Mar 14 18:44:47 2021 +0300 ASoC: tegra30: ahub: Switch to use reset-bulk API Switch to use reset-bulk API in order to make code cleaner. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-6-digetx@gmail.com Signed-off-by: Mark Brown commit 48d71395896d54eec989179dd265e569fcecb15a Author: Philipp Zabel Date: Sun Mar 14 18:44:46 2021 +0300 reset: Add reset_control_bulk API Follow the clock and regulator subsystems' lead and add a bulk API for reset controls. Signed-off-by: Philipp Zabel Tested-by: Dmitry Osipenko Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-5-digetx@gmail.com Signed-off-by: Mark Brown commit 0bbcecaaab15a74ba69f93df46c753f2a64eadca Author: Dmitry Osipenko Date: Sun Mar 14 18:44:45 2021 +0300 ASoC: tegra30: i2s: Restore hardware state on runtime PM resume Tegra30 I2S driver syncs regmap cache only on resume from system suspend, but hardware is reset across the runtime suspend because RPM of the parent AHUB driver resets the I2S hardware, hence h/w state is lost after each RPM resume. The problem isn't visible because hardware happens to be fully reprogrammed after each RPM resume. Move hardware syncing to RPM resume in order to restore h/w state properly. Fixes: ed9ce1ed2239 ("ASoC: tegra: ahub: Reset hardware properly") Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-4-digetx@gmail.com Signed-off-by: Mark Brown commit 9c648ef82d7d4696e80b286d37dae07b67a9a32d Author: Dmitry Osipenko Date: Sun Mar 14 18:44:44 2021 +0300 ASoC: tegra20: i2s: Add reset control The I2S reset may be asserted at a boot time, in particular this is the case on Tegra20 AC100 netbook. Tegra20 I2S driver doesn't manage the reset control and currently it happens to work because reset is implicitly deasserted by the tegra-clk driver when I2S clock is enabled. The I2S permanently stays in a reset once tegra-clk is fixed to not touch the resets, which it shouldn't be doing. Add reset control to the Tegra20 I2S driver. Note that I2S reset was always specified in Tegra20 device-tree, hence DTB ABI changes aren't required. Tested-by: Paul Fertser # T20 AC100 Reported-by: Paul Fertser Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-3-digetx@gmail.com Signed-off-by: Mark Brown commit a46b78247b852345ae4458711a4aec6744a7838c Author: Dmitry Osipenko Date: Sun Mar 14 18:44:43 2021 +0300 ASoC: tegra20: ac97: Add reset control Tegra20 AC97 driver doesn't manage the AC97 controller reset, relying on implicit deassertion of the reset by tegra-clk driver, which needs to be fixed since this behaviour is unacceptable by other Tegra drivers. Add explicit reset control to the Tegra20 AC97 driver. Note that AC97 reset was always specified in Tegra20 device-tree, hence DTB ABI changes aren't required. Signed-off-by: Dmitry Osipenko Link: https://lore.kernel.org/r/20210314154459.15375-2-digetx@gmail.com Signed-off-by: Mark Brown commit f8d1ff107d2cdd59cdc6cce11722e351b4b328ae Author: Ashutosh Dixit Date: Wed Mar 17 18:40:12 2021 -0500 drm/i915: Disable pread/pwrite ioctl's for future platforms (v3) The rationale for this change is roughly as follows: 1. The functionality can be done entirely in userspace with a combination of mmap + memcpy 2. The only reason anyone in userspace is still using it is because someone implemented bo_subdata that way in libdrm ages ago and they're all too lazy to write the 5 lines of code to do a map. 3. This falls cleanly into the category of things which will only get more painful with local memory support. These ioctls aren't used much anymore by "real" userspace drivers. Vulkan has never used them and neither has the iris GL driver. The old i965 GL driver does use PWRITE for glBufferSubData but it only supports up through Gen11; Gen12 was never enabled in i965. The compute driver has never used PREAD/PWRITE. The only remaining user is the media driver which uses it exactly twice and they're easily removed [1] so expecting them to drop it going forward is reasonable. IGT changes which handle this kernel change have also been submitted [2]. [1] https://github.com/intel/media-driver/pull/1160 [2] https://patchwork.freedesktop.org/series/81384/ v2 (Jason Ekstrand): - Improved commit message with the status of all usermode drivers - A more future-proof platform check v3 (Jason Ekstrand): - Drop the HAS_LMEM checks as they're already covered by the version checks Signed-off-by: Ashutosh Dixit Signed-off-by: Jason Ekstrand Reviewed-by: Jason Ekstrand Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210317234014.2271006-4-jason@jlekstrand.net commit 2eb8e1a69d9f8cc9c0a75e327f854957224ba421 Author: Jason Ekstrand Date: Wed Mar 17 18:40:11 2021 -0500 drm/i915/gem: Drop relocation support on all new hardware (v6) The Vulkan driver in Mesa for Intel hardware never uses relocations if it's running on a version of i915 that supports at least softpin which all versions of i915 supporting Gen12 do. On the OpenGL side, Gen12+ is only supported by iris which never uses relocations. The older i965 driver in Mesa does use relocations but it only supports Intel hardware through Gen11 and has been deprecated for all hardware Gen9+. The compute driver also never uses relocations. This only leaves the media driver which is supposed to be switching to softpin going forward. Making softpin a requirement for all future hardware seems reasonable. There is one piece of hardware enabled by default in i915: RKL which was enabled by e22fa6f0a976 which has not yet landed in drm-next so this almost but not really a userspace API change for RKL. If it becomes a problem, we can always add !IS_ROCKETLAKE(eb->i915) to the condition. Rejecting relocations starting with newer Gen12 platforms has the benefit that we don't have to bother supporting it on platforms with local memory. Given how much CPU touching of memory is required for relocations, not having to do so on platforms where not all memory is directly CPU-accessible carries significant advantages. v2 (Jason Ekstrand): - Allow TGL-LP platforms as they've already shipped v3 (Jason Ekstrand): - WARN_ON platforms with LMEM support in case the check is wrong v4 (Jason Ekstrand): - Call out Rocket Lake in the commit message v5 (Jason Ekstrand): - Drop the HAS_LMEM check as it's already covered by the version check v6 (Jason Ekstrand): - Move the check to eb_validate_vma() with all the other exec_object validation checks. Signed-off-by: Jason Ekstrand Reviewed-by: Zbigniew Kempczyński Reviewed-by: Maarten Lankhorst Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210317234014.2271006-3-jason@jlekstrand.net commit b5b6f6a610127b17f20c0ca03dd27beee4ddc2b2 Author: Jason Ekstrand Date: Wed Mar 17 18:40:10 2021 -0500 drm/i915/gem: Drop legacy execbuffer support (v2) libdrm has supported the newer execbuffer2 ioctl and using it by default when it exists since libdrm commit b50964027bef which landed Mar 2, 2010. The i915 and i965 drivers in Mesa at the time both used libdrm and so did the Intel X11 back-end. The SNA back-end for X11 has always used execbuffer2. v2 (Jason Ekstrand): - Add a comment saying what Linux version it's being removed in. Signed-off-by: Jason Ekstrand Acked-by: Keith Packard Acked-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210317234014.2271006-2-jason@jlekstrand.net commit 4cf1d8719aab0ad89690abb1d37ecf4552778420 Author: Bhaskar Chowdhury Date: Thu Mar 18 16:07:39 2021 +0530 drm: Few typo fixes s/instatiated/instantiated/ s/unreference/unreferenced/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210318103739.27849-1-unixbhaskar@gmail.com commit bb91c9ee518cd7353f2301f4bd6b65ea42a750d4 Author: Govind Singh Date: Fri Jan 29 00:18:15 2021 +0530 remoteproc: qcom: wcss: explicitly request exclusive reset control Use request exclusive reset control for wcss reset controls. Signed-off-by: Govind Singh Signed-off-by: Gokul Sriram Palanisamy Link: https://lore.kernel.org/r/1611859695-11824-5-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson commit 0af65b9b915e52019aee91db3e1f8b39a7ec8d08 Author: Govind Singh Date: Fri Jan 29 00:18:14 2021 +0530 remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404 Add non PAS WCSS remoteproc driver support for QCS404 SOC. Add WCSS q6 bootup and shutdown sequence handled from Application Processor SubSystem(APSS). Signed-off-by: Govind Singh Signed-off-by: Gokul Sriram Palanisamy Link: https://lore.kernel.org/r/1611859695-11824-4-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson commit 34364712fcc48d589e88517395021a14f82fad2e Author: Govind Singh Date: Fri Jan 29 00:18:13 2021 +0530 dt-bindings: remoteproc: qcom: Add Q6V5 Modem PIL binding for QCS404 Add a new modem compatible string for Qualcomm QCS404 SoCs Signed-off-by: Govind Singh Signed-off-by: Gokul Sriram Palanisamy Acked-by: Rob Herring Link: https://lore.kernel.org/r/1611859695-11824-3-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson commit 6549f42c3d179575cd1466c4fd65d76680e49fed Author: Govind Singh Date: Fri Jan 29 00:18:12 2021 +0530 remoteproc: qcom: wcss: populate hardcoded param using driver data Q6 based WiFi fw loading is supported across different targets, ex: IPQ8074/QCS404. In order to support different fw names/pas id etc, populate hardcoded param using driver data. Signed-off-by: Govind Singh Signed-off-by: Gokul Sriram Palanisamy Link: https://lore.kernel.org/r/1611859695-11824-2-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson commit 6e71d2b2a2b717c3bddbe72cdf48dd07d53f8364 Author: Mathieu Poirier Date: Fri Mar 12 09:24:53 2021 -0700 remoteproc: Refactor function rproc_cdev_release() Refactor function rproc_cdev_release() to take into account the current state of the remote processor when choosing the state to transition to. Signed-off-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210312162453.1234145-18-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 5daaeb5f07ed0681b734864dde58dcadab115963 Author: Mathieu Poirier Date: Fri Mar 12 09:24:52 2021 -0700 remoteproc: Properly deal with a detach request when attached This patch introduces the capability to detach a remote processor that has been attached to by the remoteproc core. For that to happen a rproc::ops::detach() operation needs to be available. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-17-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit d2008a96833082713094ba8a545141be1b01b266 Author: Mathieu Poirier Date: Fri Mar 12 09:24:51 2021 -0700 remoteproc: Properly deal with a stop request when attached Allow a remote processor that was started by another entity to be switched off by the remoteproc core. For that to happen a rproc::ops::stop() operation needs to be available. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-16-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 83d4e6712c3b1a7dd5b43251737ea3d7d0a460f4 Author: Mathieu Poirier Date: Fri Mar 12 09:24:50 2021 -0700 remoteproc: Properly deal with a start request when attached This patch takes into account scenarios where a remote processor has been attached to when receiving a "start" command from sysfs. As with the case with the running state, the command can't be carried out if the remote processor is already in operation. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-15-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 800dad0025ecb9ca8c885414cab070f8cc40e81e Author: Mathieu Poirier Date: Fri Mar 12 09:24:49 2021 -0700 remoteproc: Properly deal with a kernel panic when attached The panic handler operation of registered remote processors should also be called when remote processors have been attached to. Signed-off-by: Mathieu Poirier Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-14-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 8088dd4d9316964901b13df09a20ee0f917f414d Author: Mathieu Poirier Date: Fri Mar 12 09:24:48 2021 -0700 remoteproc: Properly deal with the resource table when stopping When a remote processor that was attached to is stopped, special care must be taken to make sure the shutdown process is similar to what it would be had it been started by the remoteproc core. This patch takes care of that by making a copy of the resource table currently used by the remote processor. From that point on the copy is used, as if the remote processor had been started by the remoteproc core. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Reported-by: kernel test robot Link: https://lore.kernel.org/r/20210312162453.1234145-13-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 9dc9507f1880fb6225e3e058cb5219b152cbf198 Author: Mathieu Poirier Date: Fri Mar 12 09:24:47 2021 -0700 remoteproc: Properly deal with the resource table when detaching If it is possible to detach the remote processor, keep an untouched copy of the resource table. That way we can start from the same resource table without having to worry about original values or what elements the startup code has changed when re-attaching to the remote processor. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-12-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit d3962a397885518a85d2dc6b0c51e6594f71c30f Author: Mathieu Poirier Date: Fri Mar 12 09:24:46 2021 -0700 remoteproc: Introduce function rproc_detach() Introduce function rproc_detach() to enable the remoteproc core to release the resources associated with a remote processor without stopping its operation. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-11-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 6070203fe43335a02b7fd103bae582095411adc5 Author: Mathieu Poirier Date: Fri Mar 12 09:24:45 2021 -0700 remoteproc: Introduce function __rproc_detach() Introduce function __rproc_detach() to perform the same kind of operation as rproc_stop(), but instead of switching off the remote processor using rproc->ops->stop(), it uses rproc->ops->detach(). That way it is possible for the core to release the resources associated with a remote processor while the latter is kept operating. Signed-off-by: Mathieu Poirier Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-10-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 7f3bd0c019cb813448d867c17c9b9dad205a13eb Author: Mathieu Poirier Date: Fri Mar 12 09:24:44 2021 -0700 remoteproc: Add new detach() remoteproc operation Add an new detach() operation in order to support scenarios where the remoteproc core is going away but the remote processor is kept operating. This could be the case when the system is rebooted or when the platform driver is removed. Signed-off-by: Mathieu Poirier Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-9-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 6e20a05104e55dc0e4899db8110013d521d20a6e Author: Arnaud POULIQUEN Date: Fri Mar 12 09:24:43 2021 -0700 remoteproc: stm32: Move memory parsing to rproc_ops Some actions such as memory resources reallocation are needed when trying to reattach a co-processor. Use the prepare() operation for these actions. Co-developed-by: Mathieu Poirier Signed-off-by: Mathieu Poirier Signed-off-by: Arnaud POULIQUEN Link: https://lore.kernel.org/r/20210312162453.1234145-8-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 8a471396d21ca499d89d4071b2b670258f009ffa Author: Mathieu Poirier Date: Fri Mar 12 09:24:42 2021 -0700 remoteproc: stm32: Move resource table setup to rproc_ops Move the setting of the resource table installed by an external entity to rproc_ops::get_loaded_rsc_table(). This is to support scenarios where a remote processor has been attached to but is detached at a later stage. To re-attach the remote processor, the address of the resource table needs to be available at a later time than the platform driver's probe() function. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-7-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 1a631382be1d22ddab0582dae3498b3d28e2e44a Author: Mathieu Poirier Date: Fri Mar 12 09:24:41 2021 -0700 remoteproc: Add new get_loaded_rsc_table() to rproc_ops Add a new get_loaded_rsc_table() operation in order to support scenarios where the remoteproc core has booted a remote processor and detaches from it. When re-attaching to the remote processor, the core needs to know where the resource table has been placed in memory. Signed-off-by: Mathieu Poirier Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-6-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 76f4c87587e2ff41e9b9867ffde2137f27ba39b9 Author: Mathieu Poirier Date: Fri Mar 12 09:24:40 2021 -0700 remoteproc: Properly represent the attached state There is a need to know when a remote processor has been attached to rather than booted by the remoteproc core. In order to avoid manipulating two variables, i.e rproc::autonomous and rproc::state, get rid of the former and simply use the newly introduced RPROC_ATTACHED state. Signed-off-by: Mathieu Poirier Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-5-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 4196d18903f94090f0a223d65de25e3bf50a3d13 Author: Mathieu Poirier Date: Fri Mar 12 09:24:39 2021 -0700 remoteproc: Add new RPROC_ATTACHED state Add a new RPROC_ATTACHED 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: Peng Fan Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-4-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 6a6c4dc0e5de5dc4fec0ccda417c26f5814be380 Author: Mathieu Poirier Date: Fri Mar 12 09:24:38 2021 -0700 remoteproc: Rename function rproc_actuate() Rename function rproc_actuate() to rproc_attach(). That way it is easy to understand that it does the opposite of rproc_detach(). Signed-off-by: Mathieu Poirier Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-3-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 16324fc8def1c08a92261089aaf503aca3381aa6 Author: Mathieu Poirier Date: Fri Mar 12 09:24:37 2021 -0700 remoteproc: Remove useless check in rproc_del() Whether started at probe() time or thereafter from the command line, a remote processor needs to be shut down before the final cleanup phases can happen. Otherwise the system may be left in an unpredictable state where the remote processor is expecting the remoteproc core to be providing services when in fact it no longer exist. Invariably calling rproc_shutdown() is fine since it will return immediately if the remote processor has already been switched off. Signed-off-by: Mathieu Poirier Reviewed-by: Peng Fan Reviewed-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210312162453.1234145-2-mathieu.poirier@linaro.org Signed-off-by: Bjorn Andersson commit 3d2ee78906af5f08d499d6aa3aa504406fa38106 Author: Bjorn Andersson Date: Fri Mar 12 15:20:02 2021 -0800 remoteproc: qcom_q6v5_mss: Validate p_filesz in ELF loader Analog to the issue in the common mdt_loader code the MSS ELF loader does not validate that p_filesz bytes will fit in the memory region and that the loaded segments are not truncated. Fix this in the same way as proposed for the mdt_loader. Reviewed-by: Mathieu Poirier Fixes: 135b9e8d1cd8 ("remoteproc: qcom_q6v5_mss: Validate modem blob firmware size before load") Link: https://lore.kernel.org/r/20210312232002.3466791-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 9af2a2a9c64ee68a5dc8271d54235609191f1cd1 Author: Bjorn Andersson Date: Thu Mar 11 16:26:05 2021 -0800 remoteproc: qcom_q6v5_mss: Provide errors for firmware-name parsing Failing to read the "firmware-name" DT property without informing the developer is annoying, add some helpful debug prints. Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210312002605.3273255-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit c0a950d182c47dfd798de3cb00562785ca293a9a Author: Jani Nikula Date: Wed Mar 17 18:36:53 2021 +0200 drm/i915/bios: add intel_bios_encoder_data to encoder, use for iboost Add intel_bios_encoder_data pointer to encoder, and use it for hdmi and dp iboost. For starters, we only set the encoder->devdata for DDI encoders, i.e. we can only use it for data that is used by DDI encoders. Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/4bc49244ce68e136e5b21db4c4e6554bec9ac0fb.1615998927.git.jani.nikula@intel.com commit f08fbe6a8c6478f076ebb521b489f8972430dc30 Author: Jani Nikula Date: Wed Mar 17 18:36:52 2021 +0200 drm/i915/bios: start using intel_bios_encoder_data for Type-C USB and TBT Stop caching the information in ddi_port_info. We're phasing out ddi_port_info usage completely, and prefer using the VBT child device information directly using the provided helpers. v2: - Remove supports_typec_usb & supports_tbt from ddi_vbt_port_info (Lucas) Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/b04bd183e7554aeb4bc3962af90d63171aa32fc2.1615998927.git.jani.nikula@intel.com commit 45c0673aac97e0615c28d49f3b100403d20673bc Author: Jani Nikula Date: Wed Mar 17 18:36:51 2021 +0200 drm/i915/bios: start using the intel_bios_encoder_data directly Start using struct intel_bios_encoder_data directly. We'll start sanitizing the child device data directly as well, instead of the cached data in ddi_port_info[]. The one downside here is having to store a non-const pointer back to intel_bios_encoder_data. Eventually we'll be able to have a direct pointer from encoder to intel_bios_encoder_data, removing the need to go through the ddi_port_info[] array altogether. And we'll be able to remove all the cached data in ddi_port_info[]. v2: - Remove supports_dp and supports_edp from ddi_port_info too - Add devdata != NULL check in intel_bios_is_port_edp() Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi # v1 Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/061df32a012ff640060920fcd730fb23f8717ee8.1615998927.git.jani.nikula@intel.com commit dbc137422b4b25d404dc3b200e2018763d7567f9 Author: Jani Nikula Date: Wed Mar 17 18:36:50 2021 +0200 drm/i915/bios: save a higher level pointer in ddi_vbt_port_info[] We'll be needing the intel_bios_encoder_data pointer going forward, and it's just easier to store the higher level pointer in the ddi_vbt_port_info[] array. Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/89717516e99afccfecf1a7c6c938b8349f65e985.1615998927.git.jani.nikula@intel.com commit d0ab409d05fe533ec8d253c2a3d9c33c650967a3 Author: Jani Nikula Date: Wed Mar 17 18:36:49 2021 +0200 drm/i915/bios: add helper functions to check output support These will be exposed to the rest of the driver and replace other functions. Everything will operate on the child devices. v2: - Rebased, removed stray blank line - Also abstracted intel_bios_encoder_supports_crt (Lucas) Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2bd40ccc093796d16300742d1789d78ffac3c450.1615998927.git.jani.nikula@intel.com commit 7371fa342a126108b992485fe2b412fa0cce8c05 Author: Jani Nikula Date: Wed Mar 17 18:36:48 2021 +0200 drm/i915/bios: add i915 backpointer to intel_bios_encoder_data We'll be needing it in the future. Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/026b737b122273d256f4247e9b0c84529aa391fd.1615998927.git.jani.nikula@intel.com commit 3162d05765f343a270334326a46a15ebac13aff9 Author: Jani Nikula Date: Wed Mar 17 18:36:47 2021 +0200 drm/i915/bios: rename display_device_data to intel_bios_encoder_data Make the naming suitable for exposing to the rest of the driver as an opaque type. No functional changes. Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/cb97c858de6e6afa96092db6d96e685fda006984.1615998927.git.jani.nikula@intel.com commit 51f5748179d47609e3fb62dc69cf58a879ce1bb5 Author: Jani Nikula Date: Wed Mar 17 18:36:46 2021 +0200 drm/i915/bios: create fake child devices on missing VBT Instead of initialing data directly in ddi_port_info array, create fake child devices for default outputs when the VBT is missing. This makes further unification of output handling easier. This will make intel_bios_is_port_present() return true for the fake child devices. This may cause subtle changes in a handful of places. Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/91675b40a78bd04bf138598d979661257181880d.1615998927.git.jani.nikula@intel.com commit 3ae04c0c7e63d266b48b6dff8a9e2375f6120570 Author: Jani Nikula Date: Wed Mar 17 18:36:45 2021 +0200 drm/i915/bios: limit default outputs to ports A through F There are two main cases where the default outputs are useful when the VBT is missing: - There are some DDI-platform Chromebooks out there that do not have a VBT, which worked by coincidence because of the default outputs. The machines need to continue to work. - Early platform enabling when the VBT might not be available. (This could be circumvented by using the i915.vbt_firmware parameter.) Prepare for generating fake child devices for the default outputs by limiting the number of outputs. We don't want to generate excessive amounts of fake child devices. This could be perhaps be limited even more in the future, but match what's possible on all DDI platforms. Note that limiting the defaults to non-TypeC ports in commit 828ccb31cf41 ("drm/i915/icl: Add TypeC ports only if VBT is present") is a more strict limit, and makes this a no-op on recent platforms. v2: Rewrote commit message Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/5c9c9743af1c7265a2c976d582b7a6685ec0c414.1615998927.git.jani.nikula@intel.com commit e20e4037fcb6e3ee647324a88bced6e243e646a7 Author: Jani Nikula Date: Wed Mar 17 18:36:44 2021 +0200 drm/i915/bios: limit default outputs by platform on missing VBT Pre-DDI and non-CHV aren't using the information created here anyway, so don't bother setting the defaults for them. This should be a non-functional change, but is separated here to catch any regressions in a single commit. Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/41526a4eee5fb0de8d7f1ffe4c09965b63ccbaa8.1615998927.git.jani.nikula@intel.com commit 95bbede5a27e750e04b547dd04bfdbe4f0dc3fbd Author: Jani Nikula Date: Wed Mar 17 18:36:43 2021 +0200 drm/i915/bios: move aux ch and ddc checks at a lower level Unify the code paths at the higher level. Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/44559ef456015f65a863c3d89a9bea9157d13a05.1615998927.git.jani.nikula@intel.com commit 894d17398f2c7c49d1a5478ababf8775acc6bacb Author: Jani Nikula Date: Wed Mar 17 18:36:42 2021 +0200 drm/i915/bios: reduce indent in sanitize_ddc_pin and sanitize_aux_ch Reduce indent with an early return. No functional changes. Reviewed-by: Lucas De Marchi [Jani: fixed a couple of comment typos while applying.] Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/17288137452f731a820e737582672f836660a26f.1615998927.git.jani.nikula@intel.com commit ef0096e40139f40d96d36b753d09664bc0708432 Author: Jani Nikula Date: Wed Mar 17 18:36:41 2021 +0200 drm/i915/bios: store bdb version in i915 We'll be needing the version in more places in the future, so avoid the need to pass it around. No functional changes. v2: Rebased Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä # v1 Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/c2a4189241bf0946d27e12804b1ba7d098c7d483.1615998927.git.jani.nikula@intel.com commit dbd440d8e08879c4dfb57406a9883456fbf44476 Author: Jani Nikula Date: Wed Mar 17 18:36:40 2021 +0200 drm/i915/bios: mass convert dev_priv to i915 Time to just yank out the bandage. No functional changes. v2: Rebased Cc: Lucas De Marchi Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä # v1 Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/93fe9e8be2e6120b085d09e49aafdf52f5ccd725.1615998927.git.jani.nikula@intel.com commit 0b4f5c95fba2ec004960e2bcf849548a863f7495 Author: Mark Pearson Date: Thu Mar 11 12:48:43 2021 -0500 platform/x86: thinkpad_acpi: check dytc version for lapmode sysfs Lenovo platforms with DYTC versions earlier than version 5 don't set the lapmode interface correctly, causing issues with thermald on older platforms. Add checking to only create the dytc_lapmode interface for version 5 and later. Fixes: 1ac09656bded ("platform/x86: thinkpad_acpi: Add palm sensor support") Signed-off-by: Mark Pearson Link: https://lore.kernel.org/r/20210311174843.3161-1-markpearson@lenovo.com Signed-off-by: Hans de Goede commit a908a716696eee75bf85199cde2b0989290536d1 Author: Hans de Goede Date: Sun Mar 7 16:18:00 2021 +0100 ASoC/extcon: arizona: Move arizona jack code to sound/soc/codecs/arizona-jack.c The jack handling for arizona codecs is being refactored so that it is done directly by the codec drivers, instead of having an extcon-driver bind to a separate "arizona-extcon" child-device for this. drivers/mfd/arizona-core.c has already been updated to no longer instantiate an "arizona-extcon" child-device for the arizona codecs. This means that the "arizona-extcon" driver is no longer useful (there are no longer any devices for it to bind to). This commit drops the extcon Kconfig / Makefile bits and moves drivers/extcon/extcon-arizona.c to sound/soc/codecs/arizona-jack.c . This is a preparation patch for converting the arizona extcon-driver into a helper library for letting the arizona codec-drivers directly report jack state through the standard sound/soc/soc-jack.c functions. Signed-off-by: Hans de Goede Acked-by: Charles Keepax Tested-by: Charles Keepax Acked-by: Chanwoo Choi Signed-off-by: Lee Jones commit 505eb8df97d9a6c51f5168f69984d116e9c27470 Author: Hans de Goede Date: Sun Mar 7 16:17:59 2021 +0100 extcon: arizona: Always use pm_runtime_get_sync() when we need the device to be awake Before this commit the extcon-arizona code was mixing pm_runtime_get() and pm_runtime_get_sync() in different places. In all places where pm_runtime_get[_sync]() is called, the code makes use of the device immediately after the call. This means that we should always use pm_runtime_get_sync(). Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Acked-by: Chanwoo Choi Signed-off-by: Lee Jones commit ece2619fe8edc703b872136057090627e8a19ab4 Author: Hans de Goede Date: Sun Mar 7 16:17:58 2021 +0100 extcon: arizona: Fix flags parameter to the gpiod_get("wlf,micd-pol") call The initial value of the GPIO should match the info->micd_modes[0].gpio value. arizona_extcon_probe() already stores the necessary flag in a mode variable, but instead of passing mode as flags to the gpiod_get() it was using a hardcoded GPIOD_OUT_LOW. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Acked-by: Chanwoo Choi Signed-off-by: Lee Jones commit e5b499f6fb17bc95a813e85d0796522280203806 Author: Hans de Goede Date: Sun Mar 7 16:17:57 2021 +0100 extcon: arizona: Fix various races on driver unbind We must free/disable all interrupts and cancel all pending works before doing further cleanup. Before this commit arizona_extcon_remove() was doing several register writes to shut things down before disabling the IRQs and it was cancelling only 1 of the 3 different works used. Move all the register-writes shutting things down to after the disabling of the IRQs and add the 2 missing cancel_delayed_work_sync() calls. This fixes various possible races on driver unbind. One of which would always trigger on devices using the mic-clamp feature for jack detection. The ARIZONA_MICD_CLAMP_MODE_MASK update was done before disabling the IRQs, causing: 1. arizona_jackdet() to run 2. detect a jack being inserted (clamp disabled means jack inserted) 3. call arizona_start_mic() which: 3.1 Enables the MICVDD regulator 3.2 takes a pm_runtime_reference And this was all happening after the ARIZONA_MICD_ENA bit clearing, which would undo 3.1 and 3.2 because the ARIZONA_MICD_CLAMP_MODE_MASK update was being done after the ARIZONA_MICD_ENA bit clearing. So this means that arizona_extcon_remove() would exit with 1. MICVDD enabled and 2. The pm_runtime_reference being unbalanced. MICVDD still being enabled caused the following oops when the regulator is released by the devm framework: [ 2850.745757] ------------[ cut here ]------------ [ 2850.745827] WARNING: CPU: 2 PID: 2098 at drivers/regulator/core.c:2123 _regulator_put.part.0+0x19f/0x1b0 [ 2850.745835] Modules linked in: extcon_arizona ... ... [ 2850.746909] Call Trace: [ 2850.746932] regulator_put+0x2d/0x40 [ 2850.746946] release_nodes+0x22a/0x260 [ 2850.746984] __device_release_driver+0x190/0x240 [ 2850.747002] driver_detach+0xd4/0x120 ... [ 2850.747337] ---[ end trace f455dfd7abd9781f ]--- Note this oops is just one of various theoretically possible races caused by the wrong ordering inside arizona_extcon_remove(), this fixes the ordering fixing all possible races, including the reported oops. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Acked-by: Chanwoo Choi Signed-off-by: Lee Jones commit c309a3e8793f7e01c4a4ec7960658380572cb576 Author: Hans de Goede Date: Sun Mar 7 16:17:56 2021 +0100 extcon: arizona: Fix some issues when HPDET IRQ fires after the jack has been unplugged When the jack is partially inserted and then removed again it may be removed while the hpdet code is running. In this case the following may happen: 1. The "JACKDET rise" or ""JACKDET fall" IRQ triggers 2. arizona_jackdet runs and takes info->lock 3. The "HPDET" IRQ triggers 4. arizona_hpdet_irq runs, blocks on info->lock 5. arizona_jackdet calls arizona_stop_mic() and clears info->hpdet_done 6. arizona_jackdet releases info->lock 7. arizona_hpdet_irq now can continue running and: 7.1 Calls arizona_start_mic() (if a mic was detected) 7.2 sets info->hpdet_done Step 7 is undesirable / a bug: 7.1 causes the device to stay in a high power-state (with MICVDD enabled) 7.2 causes hpdet to not run on the next jack insertion, which in turn causes the EXTCON_JACK_HEADPHONE state to never get set This fixes both issues by skipping these 2 steps when arizona_hpdet_irq runs after the jack has been unplugged. Signed-off-by: Hans de Goede Reviewed-by: Andy Shevchenko Acked-by: Charles Keepax Tested-by: Charles Keepax Acked-by: Chanwoo Choi Signed-off-by: Lee Jones commit 4e0b9ea85e6fb7654a3d28c23bbde736ce1592ae Author: Hans de Goede Date: Sun Mar 7 16:17:55 2021 +0100 mfd: arizona: Drop arizona-extcon cells The arizona jack-dection handling is being reworked so that the codec-child-device drivers directly handle jack-detect themselves, so it is no longer necessary to instantiate "arizona-extcon" child-devices. Signed-off-by: Hans de Goede Acked-by: Charles Keepax Tested-by: Charles Keepax Signed-off-by: Lee Jones commit 468f3477ef8bda1beeb91dd7f423c9bc248ac39d Author: Marc Zyngier Date: Fri Mar 12 14:38:43 2021 +0000 KVM: arm64: Introduce vcpu_sve_vq() helper The KVM code contains a number of "sve_vq_from_vl(vcpu->arch.sve_max_vl)" instances, and we are about to add more. Introduce vcpu_sve_vq() as a shorthand for this expression. Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 985d3a1beab543875e0c857ce263cad8233923bb Author: Marc Zyngier Date: Thu Mar 11 19:18:42 2021 +0000 KVM: arm64: Let vcpu_sve_pffr() handle HYP VAs The vcpu_sve_pffr() returns a pointer, which can be an interesting thing to do on nVHE. Wrap the pointer with kern_hyp_va(), and take this opportunity to remove the unnecessary casts (sve_state being a void *). Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 83857371d4cbeff8551fa770e045be9c6b04715c Author: Marc Zyngier Date: Thu Mar 11 13:51:44 2021 +0000 KVM: arm64: Use {read,write}_sysreg_el1 to access ZCR_EL1 Switch to the unified EL1 accessors for ZCR_EL1, which will make things easier for nVHE support. Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 297b8603e356ad82c1345cc75fad4d89310a3c34 Author: Marc Zyngier Date: Thu Mar 11 11:52:38 2021 +0000 KVM: arm64: Provide KVM's own save/restore SVE primitives as we are about to change the way KVM deals with SVE, provide KVM with its own save/restore SVE primitives. No functional change intended. Acked-by: Will Deacon Signed-off-by: Marc Zyngier commit 71581562ee36032d2d574a9b23ad4af6d6a64cf7 Author: Wolfram Sang Date: Fri Mar 12 12:57:34 2021 +0100 i2c: bail out early when RDWR parameters are wrong The buggy parameters currently get caught later, but emit a noisy WARN. Userspace should not be able to trigger this, so add similar checks much earlier. Also avoids some unneeded code paths, of course. Apply kernel coding stlye to a comment while here. Reported-by: syzbot+ffb0b3ffa6cfbc7d7b3f@syzkaller.appspotmail.com Tested-by: syzbot+ffb0b3ffa6cfbc7d7b3f@syzkaller.appspotmail.com Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit fd6c3f45bf300b57e45b1b87786907bcb61f61e1 Author: Rafael J. Wysocki Date: Fri Mar 5 19:28:30 2021 +0100 i2c: i2c-scmi: Drop unused ACPI_MODULE_NAME definition The ACPI_MODULE_NAME() definition is only used by the message printing macros from ACPICA that are not used by the code in question, so it is redundant. Drop it. No functional impact. Signed-off-by: Rafael J. Wysocki Signed-off-by: Wolfram Sang commit f1e1bf76bc20f617945dc44226067a07ccf02bea Author: Wolfram Sang Date: Fri Feb 12 18:03:50 2021 +0100 i2c: powermac: remove uncertainty about SMBUS_BLOCK transfers The driver does the correct thing, so no need to question it. Signed-off-by: Wolfram Sang Signed-off-by: Wolfram Sang commit 309d984bcfcaceb39edf1835f7e378e4192e7a21 Merge: fa3134262eb87 aa47ad3f853ae Author: Hans de Goede Date: Thu Mar 18 11:59:44 2021 +0100 Merge tag 'ib-mfd-platform-x86-v5.13' into review-hans Immutable branch between MFD and Platform/x86 due for the v5.13 merge window commit 82531dfdf163319cbeaa969c734ebf8d84456810 Author: Ulrich Hecht Date: Fri Feb 12 17:45:41 2021 +0100 i2c: rcar: implement atomic transfers Implements atomic transfers. Tested by rebooting an r8a7790 Lager board after connecting the i2c-rcar controller to the PMIC in arch/arm/boot/dts/r8a7790-lager.dts like so: compatible = "i2c-demux-pinctrl"; pinctrl-names = "default"; pinctrl-0 = <&pmic_irq_pins>; - i2c-parent = <&iic3>, <&i2c3>; + i2c-parent = <&i2c3>, <&iic3>; i2c-bus-name = "i2c-pwr"; #address-cells = <1>; #size-cells = <0>; Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Signed-off-by: Wolfram Sang commit b87752528fe562f01034168b7e4c476b200bc456 Author: Alain Volmat Date: Fri Feb 5 09:51:44 2021 +0100 i2c: stm32f7: indicate the address being accessed on errors To help debugging issues, add the address of the slave being accessed when getting an error. Signed-off-by: Alain Volmat Signed-off-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 9449a558549978c1fe9af340164b17fa7d12af16 Author: Alain Volmat Date: Fri Feb 5 09:51:42 2021 +0100 i2c: stm32f7: add support for DNF i2c-digital-filter binding Add the support for the i2c-digital-filter binding, allowing to enable the digital filter via the device-tree and indicate its value in the DT. Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 83c3408f7b9c6b0aa8441204801a15a6c1c0665c Author: Alain Volmat Date: Fri Feb 5 09:51:41 2021 +0100 i2c: stm32f7: support DT binding i2c-analog-filter Replace driver internally coded enabling/disabling of the analog-filter with the DT binding "i2c-analog-filter". Signed-off-by: Alain Volmat Reviewed-by: Pierre-Yves MORDRET Signed-off-by: Wolfram Sang commit 396bd6f3d9f659d7ce324806bf3cd6677385f8fd Author: Jacob Pan Date: Tue Mar 2 02:14:00 2021 -0800 iommu/vt-d: Calculate and set flags for handle_mm_fault Page requests are originated from the user page fault. Therefore, we shall set FAULT_FLAG_USER.  FAULT_FLAG_REMOTE indicates that we are walking an mm which is not guaranteed to be the same as the current->mm and should not be subject to protection key enforcement. Therefore, we should set FAULT_FLAG_REMOTE to avoid faults when both SVM and PKEY are used. References: commit 1b2ee1266ea6 ("mm/core: Do not enforce PKEY permissions on remote mm access") Reviewed-by: Raj Ashok Acked-by: Lu Baolu Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/1614680040-1989-5-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit 78a523fe73b81b4447beb2d6c78c9fafae24eebb Author: Jacob Pan Date: Tue Mar 2 02:13:59 2021 -0800 iommu/vt-d: Reject unsupported page request modes When supervisor/privilige mode SVM is used, we bind init_mm.pgd with a supervisor PASID. There should not be any page fault for init_mm. Execution request with DMA read is also not supported. This patch checks PRQ descriptor for both unsupported configurations, reject them both with invalid responses. Fixes: 1c4f88b7f1f92 ("iommu/vt-d: Shared virtual address in scalable mode") Acked-by: Lu Baolu Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/1614680040-1989-4-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit bb0f61533dfd6aa815a2719720c77d13f840b683 Author: Jacob Pan Date: Tue Mar 2 02:13:58 2021 -0800 iommu/vt-d: Enable write protect propagation from guest Write protect bit, when set, inhibits supervisor writes to the read-only pages. In guest supervisor shared virtual addressing (SVA), write-protect should be honored upon guest bind supervisor PASID request. This patch extends the VT-d portion of the IOMMU UAPI to include WP bit. WPE bit of the supervisor PASID entry will be set to match CPU CR0.WP bit. Signed-off-by: Sanjay Kumar Signed-off-by: Jacob Pan Acked-by: Lu Baolu Link: https://lore.kernel.org/r/1614680040-1989-3-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit f68c7f539b6e9712e941212ab95a1feb5a0bf3b3 Author: Jacob Pan Date: Tue Mar 2 02:13:57 2021 -0800 iommu/vt-d: Enable write protect for supervisor SVM Write protect bit, when set, inhibits supervisor writes to the read-only pages. In supervisor shared virtual addressing (SVA), where page tables are shared between CPU and DMA, IOMMU PASID entry WPE bit should match CR0.WP bit in the CPU. This patch sets WPE bit for supervisor PASIDs if CR0.WP is set. Signed-off-by: Sanjay Kumar Signed-off-by: Jacob Pan Acked-by: Lu Baolu Link: https://lore.kernel.org/r/1614680040-1989-2-git-send-email-jacob.jun.pan@linux.intel.com Signed-off-by: Joerg Roedel commit f281854fa743f3474b2d0d69533301f48cf0e184 Author: Borislav Petkov Date: Mon Mar 15 13:55:14 2021 +0100 tools/x86/kcpuid: Add AMD leaf 0x8000001E Contains core IDs, node IDs and other topology info. Signed-off-by: Borislav Petkov Acked-by: Feng Tang Link: https://lkml.kernel.org/r/20210315125901.30315-2-bp@alien8.de commit e20f67026b5ead2afc5627e98b45e6b65e7fb38c Author: Borislav Petkov Date: Mon Mar 15 13:08:35 2021 +0100 tools/x86/kcpuid: Check last token too Input lines like 0x8000001E, 0, EAX, 31:0, Extended APIC ID where the short name is missing lead to a segfault because the loop takes the long name for the short name and tokens[5] becomes NULL which explodes later in strcpy(). Check its value too before further processing. Signed-off-by: Borislav Petkov Acked-by: Feng Tang Link: https://lkml.kernel.org/r/20210315125901.30315-1-bp@alien8.de commit 6ca69e5841f01ccbfa45e56577e1b33e14e53504 Author: Lu Baolu Date: Thu Mar 18 08:53:40 2021 +0800 iommu/vt-d: Report more information about invalidation errors When the invalidation queue errors are encountered, dump the information logged by the VT-d hardware together with the pending queue invalidation descriptors. Signed-off-by: Ashok Raj Tested-by: Guo Kaijie Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20210318005340.187311-1-baolu.lu@linux.intel.com Signed-off-by: Joerg Roedel commit dec991e4722d763130c8ccd92523f2a173f8a7cd Author: Kyung Min Park Date: Sun Mar 14 13:15:34 2021 -0700 iommu/vt-d: Disable SVM when ATS/PRI/PASID are not enabled in the device Currently, the Intel VT-d supports Shared Virtual Memory (SVM) only when IO page fault is supported. Otherwise, shared memory pages can not be swapped out and need to be pinned. The device needs the Address Translation Service (ATS), Page Request Interface (PRI) and Process Address Space Identifier (PASID) capabilities to be enabled to support IO page fault. Disable SVM when ATS, PRI and PASID are not enabled in the device. Signed-off-by: Kyung Min Park Acked-by: Lu Baolu Link: https://lore.kernel.org/r/20210314201534.918-1-kyung.min.park@intel.com Signed-off-by: Joerg Roedel commit 44511ab344c755d1f216bf421e92fbc2777e87fe Author: Greg Kroah-Hartman Date: Tue Feb 16 16:50:20 2021 +0100 time/debug: Remove dentry pointer for debugfs There is no need to keep the dentry pointer around for the created debugfs file, as it is only needed when removing it from the system. When it is to be removed, ask debugfs itself for the pointer, to save on storage and make things a bit simpler. Signed-off-by: Greg Kroah-Hartman Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210216155020.1012407-1-gregkh@linuxfoundation.org commit f706bb59204ba1c47e896b456c97977fc97b7964 Author: Andy Lutomirski Date: Thu Mar 4 09:01:55 2021 -0800 selftests/x86: Add a missing .note.GNU-stack section to thunks_32.S test_syscall_vdso_32 ended up with an executable stacks because the asm was missing the annotation that says that it is modern and doesn't need an executable stack. Add the annotation. This was missed in commit aeaaf005da1d ("selftests/x86: Add missing .note.GNU-stack sections"). Fixes: aeaaf005da1d ("selftests/x86: Add missing .note.GNU-stack sections") Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/487ed5348a43c031b816fa7e9efedb75dc324299.1614877299.git.luto@kernel.org commit 371d7955e3102fe38daf06de4ed9bfd29864354b Author: Robin Murphy Date: Fri Mar 5 16:35:23 2021 +0000 iommu/iova: Improve restart logic When restarting after searching below the cached node fails, resetting the start point to the anchor node is often overly pessimistic. If allocations are made with mixed limits - particularly in the case of the opportunistic 32-bit allocation for PCI devices - this could mean significant time wasted walking through the whole populated upper range just to reach the initial limit. We can improve on that by implementing a proper tree traversal to find the first node above the relevant limit, and set the exact start point. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/076b3484d1e5057b95d8c387c894bd6ad2514043.1614962123.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 7ae31cec5b70e301788b95de543abb56748dcfb6 Author: Robin Murphy Date: Fri Mar 5 16:35:22 2021 +0000 iommu/iova: Add rbtree entry helper Repeating the rb_entry() boilerplate all over the place gets old fast. Before adding yet more instances, add a little hepler to tidy it up. Signed-off-by: Robin Murphy Link: https://lore.kernel.org/r/03931d86c0ad71f44b29394e3a8d38bfc32349cd.1614962123.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit 3542dcb15cef66c0b9e6c3b33168eb657e0d9520 Author: Robin Murphy Date: Fri Mar 5 16:32:34 2021 +0000 iommu/dma: Resurrect the "forcedac" option In converting intel-iommu over to the common IOMMU DMA ops, it quietly lost the functionality of its "forcedac" option. Since this is a handy thing both for testing and for performance optimisation on certain platforms, reimplement it under the common IOMMU parameter namespace. For the sake of fixing the inadvertent breakage of the Intel-specific parameter, remove the dmar_forcedac remnants and hook it up as an alias while documenting the transition to the new common parameter. Fixes: c588072bba6b ("iommu/vt-d: Convert intel iommu driver to the iommu ops") Signed-off-by: Robin Murphy Acked-by: Lu Baolu Reviewed-by: John Garry Link: https://lore.kernel.org/r/7eece8e0ea7bfbe2cd0e30789e0d46df573af9b0.1614961776.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel commit b23e4fc4e3faed0b8b604079c44a244da3ec941a Author: Chunyan Zhang Date: Fri Mar 5 17:32:16 2021 +0800 iommu: add Unisoc IOMMU basic driver This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20210305093216.201897-3-zhang.lyra@gmail.com Signed-off-by: Joerg Roedel commit 13d190ffac9437a3a1af7563bd0befab248b2004 Author: Chunyan Zhang Date: Fri Mar 5 17:32:15 2021 +0800 dt-bindings: iommu: add bindings for sprd IOMMU This IOMMU module can be used by Unisoc's multimedia devices, such as display, Image codec(jpeg) and a few signal processors, including VSP(video), GSP(graphic), ISP(image), and CPP(camera pixel processor), etc. Signed-off-by: Chunyan Zhang Link: https://lore.kernel.org/r/20210305093216.201897-2-zhang.lyra@gmail.com Signed-off-by: Joerg Roedel commit b9abb19fa5fd2d8a4be61c6cd4b2a48aa1a17f9c Author: Shameer Kolothum Date: Wed Mar 3 17:36:11 2021 +0000 iommu: Check dev->iommu in iommu_dev_xxx functions The device iommu probe/attach might have failed leaving dev->iommu to NULL and device drivers may still invoke these functions resulting in a crash in iommu vendor driver code. Hence make sure we check that. Fixes: a3a195929d40 ("iommu: Add APIs for multiple domains per device") Signed-off-by: Shameer Kolothum Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20210303173611.520-1-shameerali.kolothum.thodi@huawei.com Signed-off-by: Joerg Roedel commit 20ad01363a72c8378bd382a026d17c0eef2793cc Author: Mahak Gupta Date: Thu Mar 18 00:08:46 2021 +0530 staging: octeon-usb: Match alignment with open parenthesis This patches fixes the checks- 'Alignment should match open parenthesis' of 'checkpatch.pl'. Signed-off-by: Mahak Gupta Link: https://lore.kernel.org/r/20210317183846.4867-1-gmahak1@gmail.com Signed-off-by: Greg Kroah-Hartman commit b0c3683f31ffbfc13014a44fda2bccdae1dc11ad Author: Fabio Aiuto Date: Wed Mar 17 11:51:44 2021 +0100 staging: rtl8723bs: remove unused code blocks completed Remove related item in TODO list ------------------------------------------------------- searched for other unused code blocks: grep -r '^\(#ifdef \|#if defined(\|#ifndef \)CONFIG_' \ drivers/staging/rtl8723bs/ drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM) drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:#if defined(CONFIG_PM) drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:#if defined(CONFIG_WEXT_PRIV) drivers/staging/rtl8723bs/include/drv_conf.h:#ifndef CONFIG_RTW_HIQ_FILTER drivers/staging/rtl8723bs/include/autoconf.h:#ifndef CONFIG_WIRELESS_EXT all blocks left are checked by existing defines. Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210317105144.3732-1-fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6574fe5b1e3e11f5cfccedc065d82cda167d8042 Author: zhaoxiao Date: Wed Mar 17 11:32:19 2021 +0800 Staging: rtl8192u: fixed a whitespace coding style issue Removed additional whitespaces in the r8192U_wx.c file. Signed-off-by: zhaoxiao Link: https://lore.kernel.org/r/20210317033219.621-1-zhaoxiao@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 566b2369aaaa62f3844d5bf5647d756793b283ad Author: Qiang Ma Date: Tue Mar 16 20:05:00 2021 +0800 staging: rtl8723bs/core: add spaces between operators Add spaces between operators for a better readability in function 'rtw_seccalctkipmic'. Signed-off-by: Qiang Ma Link: https://lore.kernel.org/r/20210316120500.351-1-maqianga@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 8dafccf1bc6327df18130bf4c889ab2eb355eed8 Author: Fabio Aiuto Date: Tue Mar 16 16:33:18 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_MULTI_VIR_IFACES remove conditional code blocks checked by unused CONFIG_MULTI_VIR_IFACES cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/dfc3cf4234dbe166a75068a8405b43be0070d375.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit d5cb5c16c6af01bebe6f4c99f7f8731094e683f8 Author: Fabio Aiuto Date: Tue Mar 16 16:33:00 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_R871X_TEST remove conditional code blocks checked by unused CONFIG_R871X_TEST cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/108837d49bfc158ba9ffa21a06c31a9a0e7fba97.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit f71b544d2d39613a0c4d3081afbddc13740985de Author: Fabio Aiuto Date: Tue Mar 16 16:32:47 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_BSD_RX_USE_MBUF remove conditional code blocks checked by unused CONFIG_BSD_RX_USE_MBUF cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/b65806d8bbbb686af247d945cc25e73234e4cbb4.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ba961cd85e0171bd971b5f70e4e96f84c942b5d2 Author: Fabio Aiuto Date: Tue Mar 16 16:32:30 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_RX_INDICATE_QUEUE remove conditional code blocks checked by unused CONFIG_RX_INDICATE_QUEUE cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0f677a975f92b38f6ad1ff21c1006855a075692b.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 89fa9845be00c5df3b7bca003bd23a13bd828a18 Author: Fabio Aiuto Date: Tue Mar 16 16:32:15 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SINGLE_RECV_BUF remove conditional code blocks checked by unused CONFIG_SINGLE_RECV_BUF cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/8e86b8adb1dcec67a7d437a362105bb96f370686.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 041dfdd718ea015b55cfae658a0561d77f0a3dad Author: Fabio Aiuto Date: Tue Mar 16 16:32:01 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_USB_VENDOR* remove conditional code blocks checked by unused CONFIG_USB_VENDOR family defines cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/037983b85ccc2747284c9002a51c28a7290321ea.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5f6f67f675d0a1fe42491ee179a03d6890572642 Author: Fabio Aiuto Date: Tue Mar 16 16:31:42 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_LAYER2_ROAMING_ACTIVE remove conditional code blocks checked by unused CONFIG_LAYER2_ROAMING_ACTIVE cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/db002fc802d266f09a1e990a7717a2cacf0ed7a1.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit e3197c4710cc568933c1628d223deecbc8681f0b Author: Fabio Aiuto Date: Tue Mar 16 16:31:25 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_VALIDATE_SSID remove conditional code blocks checked by unused CONFIG_VALIDATE_SSID cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/d1eb0c9ca2309f87e346ce71febb870872bf2cff.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b4f0c92b1096c6ab8af5a402ae206ed522b5d833 Author: Fabio Aiuto Date: Tue Mar 16 16:30:56 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ remove conditional code blocks checked by unused CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/ae8f1ff89a3642449b1d2f9951001b0a3ef01b91.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 48e237ab6f35ffdf3c0e7935954cc2393a5f9e95 Author: Fabio Aiuto Date: Tue Mar 16 16:30:43 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_DISABLE_MCS13TO15 remove conditional code blocks checked by unused CONFIG_DISABLE_MCS13TO15 cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/54e5805534f920d8c443874b759560a6127c8db8.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 65f183001f6ee39b9e46deb1873b5064eacf062e Author: Fabio Aiuto Date: Tue Mar 16 16:30:33 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_INTERRUPT_BASED_TXBCN* remove conditional code blocks checked by unused CONFIG_INTERRUPT_BASED_TXBCN family defines cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/9157000821fd6febf25566b8c712fad1995c7c78.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit b7743b8251311202c04b12f40ff4b8532e16e4f5 Author: Fabio Aiuto Date: Tue Mar 16 16:30:19 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_CMCC_TEST remove conditional code blocks checked by unused CONFIG_CMCC_TEST cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/c5f84efa3c593a897f0498568a41d8638f7f0f8a.1615907632.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 78619cace833c64a71791d9e50b038dfb7935571 Author: Fabio Aiuto Date: Tue Mar 16 15:27:21 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_GPIO_API remove conditional code blocks checked by unused CONFIG_GPIO_API cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Changes in v2: rebase of conflicting code in public staging-testing Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210316142714.GA3368@agape.jhs Signed-off-by: Greg Kroah-Hartman commit dc365d2cc579200bc3752ddb941e046e3a16962c Author: Fabio Aiuto Date: Tue Mar 16 15:04:11 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_AP_WOWLAN remove conditional code blocks checked by unused CONFIG_AP_WOWLAN cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Changes in v2: rebase of conflicting code with public tree Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210316140359.GA2858@agape.jhs Signed-off-by: Greg Kroah-Hartman commit 8b2a95eea7c131b22458df9a316f863d46daf48b Author: Shreya Ajith Date: Tue Mar 16 18:01:18 2021 +0530 staging:rtl8723bs:core:rtw_wlan_util:fixed indentation coding style issue Fixed the indentation of the else part of the conditional statement. Signed-off-by: Shreya Ajith Link: https://lore.kernel.org/r/20210316123118.GA2312@shreya-VirtualBox Signed-off-by: Greg Kroah-Hartman commit 29420aeb4c66e303ac211c5b880275822409c68c Author: Bhaskar Chowdhury Date: Wed Mar 17 14:56:24 2021 +0530 staging: wimax: i2400m: Mundane typo fix in the file driver.c s/procesing/processing/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210317092624.1138207-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81534d4835de52758176909f3e446f1d49809241 Author: Linus Walleij Date: Thu Mar 18 09:43:09 2021 +0100 Bluetooth: btbcm: Add BCM4330 and BCM4334 compatibles Add the missing brcm,bcm4330-bt and brcm,bcm4334-bt to the match table so device trees can use this compatible as well and not need to use the fallback brcm,bcm4329-bt. Signed-off-by: Linus Walleij Signed-off-by: Marcel Holtmann commit 71793730ebfdbd1b15c6648a67e8d42b83eb131d Author: Linus Walleij Date: Thu Mar 18 09:43:08 2021 +0100 Bluetooth: btbcm: Add BCM4334 DT binding BCM4334 was missing from the binding. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Marcel Holtmann commit f03480be045354d8e904c4e08d6d6a2dcb343220 Author: Marco Cesati Date: Wed Mar 17 23:21:30 2021 +0100 Staging: rtl8723bs: fix names in HalBtc8723b2Ant.h This commit converts names of structs / enums in hal/HalBtc8723b2Ant.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-44-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1d18754145611e5bd7a1e44a4861f32118410963 Author: Marco Cesati Date: Wed Mar 17 23:21:29 2021 +0100 Staging: rtl8723bs: fix names in odm_NoiseMonitor.h This commit converts names of structs / enums in hal/odm_NoiseMonitor.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-43-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4970f56ced5a454b9b906e653ccc0415e813ba29 Author: Marco Cesati Date: Wed Mar 17 23:21:28 2021 +0100 Staging: rtl8723bs: fix in odm_DynamicBBPowerSaving.h This commit converts names of structs / enums in hal/odm_DynamicBBPowerSaving.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-42-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit f8010da6556d5c39053bd9494380d8d9b7239d77 Author: Marco Cesati Date: Wed Mar 17 23:21:27 2021 +0100 Staging: rtl8723bs: fix names in odm.h This commit converts names of structs / enums in hal/odm.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-41-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 172dc47dfafab7088a2af57ffdd3f0a2c4228d32 Author: Marco Cesati Date: Wed Mar 17 23:21:26 2021 +0100 Staging: rtl8723bs: fix names in HalPhyRf.h This commit converts names of structs / enums in hal/HalPhyRf.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-40-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c10f844f362aaec7036151d83704f6e25073f64 Author: Marco Cesati Date: Wed Mar 17 23:21:25 2021 +0100 Staging: rtl8723bs: fix names in odm_CfoTracking.h This commit converts names of structs / enums in hal/odm_CfoTracking.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-39-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit ba08ce20ac9034ff6371c010d6ce9ab2519afec7 Author: Marco Cesati Date: Wed Mar 17 23:21:24 2021 +0100 Staging: rtl8723bs: fix names in hal_btcoex.c This commit converts names of structs / enums in hal/hal_btcoex.c from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-38-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 86d6c0aef5034c5918b13e4a891aa877abd167dc Author: Marco Cesati Date: Wed Mar 17 23:21:23 2021 +0100 Staging: rtl8723bs: fix names in odm_DIG.h This commit converts names of structs / enums in hal/odm_DIG.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-37-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit aa59bcb4649871a49cfe970a4ea3c620678d4dfb Author: Marco Cesati Date: Wed Mar 17 23:21:22 2021 +0100 Staging: rtl8723bs: fix names in odm_types.h This commit converts names of structs / enums in hal/odm_types.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-36-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 96334fbb04743f9d40d1b849887b47fd442b86ed Author: Marco Cesati Date: Wed Mar 17 23:21:21 2021 +0100 Staging: rtl8723bs: fix names in HalBtc8723b1Ant.h This commit converts names of structs / enums in hal/HalBtc8723b1Ant.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-35-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a3a98c2f4fab88433739c0aff1178ad2b5a31067 Author: Marco Cesati Date: Wed Mar 17 23:21:20 2021 +0100 Staging: rtl8723bs: fix names in odm_HWConfig.h This commit converts names of structs / enums in hal/odm_HWConfig.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-34-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2283b6b76b1c62e3dc464f03bc147f17b8ef42df Author: Marco Cesati Date: Wed Mar 17 23:21:19 2021 +0100 Staging: rtl8723bs: fix names in odm_EdcaTurboCheck.h This commit converts names of structs / enums in hal/odm_EdcaTurboCheck.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-33-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9b747b01afaa1d3ee27fdd5dafe7a3d24bd34680 Author: Marco Cesati Date: Wed Mar 17 23:21:18 2021 +0100 Staging: rtl8723bs: fix names in HalBtcOutSrc.h This commit converts names of structs / enums in hal/HalBtcOutSrc.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-32-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6711c9304d098a2c9a192b81ddbb7d01fbb221e9 Author: Marco Cesati Date: Wed Mar 17 23:21:17 2021 +0100 Staging: rtl8723bs: fix names in odm_interface.h This commit converts names of structs / enums in hal/odm_interface.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-31-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 621a8a8337506714214e723b40185640fd3f3c95 Author: Marco Cesati Date: Wed Mar 17 23:21:16 2021 +0100 Staging: rtl8723bs: fix names in hal_btcoex.h This commit converts names of structs / enums in include/hal_btcoex.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-30-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9d3c9ecd06309c881ad0a73293c8c9e485b8f4c6 Author: Marco Cesati Date: Wed Mar 17 23:21:15 2021 +0100 Staging: rtl8723bs: fix names in rtw_efuse.h This commit converts names of structs / enums in include/rtw_efuse.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-29-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 419b8a056d3a577907188678e3b4b4c6a35671e3 Author: Marco Cesati Date: Wed Mar 17 23:21:14 2021 +0100 Staging: rtl8723bs: fix names in ieee80211.h This commit converts names of structs / enums in include/ieee80211.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-28-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 61eae13d3b9f64b80bd9386d6d612f7b13583a71 Author: Marco Cesati Date: Wed Mar 17 23:21:13 2021 +0100 Staging: rtl8723bs: fix names in hal_data.h This commit converts names of structs / enums in include/hal_data.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-27-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9dc654dc83461d5642c7fc10d7c3d97e0d6a7347 Author: Marco Cesati Date: Wed Mar 17 23:21:12 2021 +0100 Staging: rtl8723bs: fix names in sta_info.h This commit converts names of structs / enums in include/sta_info.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-26-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2330ebbab9beb3388163aed0bd861fd94a6c0e86 Author: Marco Cesati Date: Wed Mar 17 23:21:11 2021 +0100 Staging: rtl8723bs: fix names in hal_com_phycfg.h This commit converts names of structs / enums in include/hal_com_phycfg.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-25-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit b765c78f253156aa2af36d3c17b0f4f4708d14c8 Author: Marco Cesati Date: Wed Mar 17 23:21:10 2021 +0100 Staging: rtl8723bs: fix names in HalPwrSeqCmd.h This commit converts names of structs / enums in include/HalPwrSeqCmd.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-24-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 80e3e599828a609b022d2cae5d6f57e04962a845 Author: Marco Cesati Date: Wed Mar 17 23:21:09 2021 +0100 Staging: rtl8723bs: fix names in rtw_rf.h This commit converts names of structs / enums in include/rtw_rf.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-23-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a26a28b5bac6374b1dfc6523b259f450a4df4c8e Author: Marco Cesati Date: Wed Mar 17 23:21:08 2021 +0100 Staging: rtl8723bs: fix names in rtw_xmit.h This commit converts names of structs / enums in include/rtw_xmit.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-22-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit f0e46c47f66765ab12234149f3a9a55d73f435cc Author: Marco Cesati Date: Wed Mar 17 23:21:07 2021 +0100 Staging: rtl8723bs: fix names in rtw_mlme_ext.h This commit converts names of structs / enums in include/rtw_mlme_ext.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-21-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit ae92c1e5576e83b46c2fca6ed2548b3e6fe463c9 Author: Marco Cesati Date: Wed Mar 17 23:21:06 2021 +0100 Staging: rtl8723bs: fix names in hal_phy.h This commit converts names of structs / enums in include/hal_phy.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-20-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 30bd370f74d11e2a85f5dad5b86288d91f7b94ec Author: Marco Cesati Date: Wed Mar 17 23:21:05 2021 +0100 Staging: rtl8723bs: fix names in rtl8723b_hal.h This commit converts names of structs / enums in include/rtl8723b_hal.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-19-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 07e80bb55aaef310da7f843dd197a215e916194d Author: Marco Cesati Date: Wed Mar 17 23:21:04 2021 +0100 Staging: rtl8723bs: fix names in wifi.h This commit converts names of structs / enums in include/wifi.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-18-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 35f25566a9cf8b4761932dfa14381c7b55b6bc2d Author: Marco Cesati Date: Wed Mar 17 23:21:03 2021 +0100 Staging: rtl8723bs: fix names in HalVerDef.h This commit converts names of structs / enums in include/HalVerDef.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-17-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a85d5137938ddb78c7f629625b224c443f49714c Author: Marco Cesati Date: Wed Mar 17 23:21:02 2021 +0100 Staging: rtl8723bs: fix names in rtl8723b_xmit.h This commit converts names of structs / enums in include/rtl8723b_xmit.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-16-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit dc9a4304e11b7d159bac2a5c024b510f914a528b Author: Marco Cesati Date: Wed Mar 17 23:21:01 2021 +0100 Staging: rtl8723bs: fix names in hal_com_h2c.h This commit converts names of structs / enums in include/hal_com_h2c.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-15-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit f85bfaabd033f53623e252735aa334217932c9cd Author: Marco Cesati Date: Wed Mar 17 23:21:00 2021 +0100 Staging: rtl8723bs: fix names in rtw_security.h This commit converts names of structs / enums in include/rtw_security.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-14-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 708df7dbc22fc10b96a8626d7c107fd12e785b85 Author: Marco Cesati Date: Wed Mar 17 23:20:59 2021 +0100 Staging: rtl8723bs: fix names in osdep_service.h This commit converts names of structs / enums in include/osdep_service.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-13-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0ba388402379af0ad48ac70bbf9011a5b88007a1 Author: Marco Cesati Date: Wed Mar 17 23:20:58 2021 +0100 Staging: rtl8723bs: fix names in hal_intf.h This commit converts names of structs / enums in include/hal_intf.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-12-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6a938aefb8dd90937e8dab355d27bcd9c1e6d668 Author: Marco Cesati Date: Wed Mar 17 23:20:57 2021 +0100 Staging: rtl8723bs: fix names in rtw_cmd.h This commit converts names of structs / enums in include/rtw_cmd.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-11-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 127375e43beefaed5a697e285a20e2cdbe74ef36 Author: Marco Cesati Date: Wed Mar 17 23:20:56 2021 +0100 Staging: rtl8723bs: fix names in rtw_mp.h This commit converts names of structs / enums in include/rtw_mp.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-10-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit f1e0583a1afae8e62472a8942c8a7258f683d1cc Author: Marco Cesati Date: Wed Mar 17 23:20:55 2021 +0100 Staging: rtl8723bs: fix names in rtw_ht.h This commit converts names of structs / enums in include/rtw_ht.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-9-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 891e0d36283154fd8c77fb264dc40a2354a5289f Author: Marco Cesati Date: Wed Mar 17 23:20:54 2021 +0100 Staging: rtl8723bs: fix names in drv_types.h This commit converts names of structs / enums in include/drv_types.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-8-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9413ea743403e98141072770c0db5906ec5e28b0 Author: Marco Cesati Date: Wed Mar 17 23:20:53 2021 +0100 Staging: rtl8723bs: fix names in rtw_recv.h This commit converts names of structs / enums in include/rtw_recv.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-7-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 58a972025173587d76a85cda49f35b3eeafe37d5 Author: Marco Cesati Date: Wed Mar 17 23:20:52 2021 +0100 Staging: rtl8723bs: fix names in rtw_eeprom.h This commit converts names of structs / enums in include/rtw_eeprom.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-6-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2f08440c3a28c447dc817422b30d53d76e099344 Author: Marco Cesati Date: Wed Mar 17 23:20:51 2021 +0100 Staging: rtl8723bs: fix names in hal_com.h This commit converts names of structs / enums in include/hal_com.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-5-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7c74d13b61eb78b5f0091ee1fe583d5ca47ecdb6 Author: Marco Cesati Date: Wed Mar 17 23:20:50 2021 +0100 Staging: rtl8723bs: fix names in rtw_pwrctrl.h This commit converts names of structs / enums in include/rtw_pwrctrl.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-4-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9e4b6c19cf7b2220232caf28409ac8cba6fbc5a8 Author: Marco Cesati Date: Wed Mar 17 23:20:49 2021 +0100 Staging: rtl8723bs: fix names in wlan_bssdef.h This commit converts names of structs / enums in include/wlan_bssdef.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-3-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit c2e0b9a7a6ffccbbea09c13c733fbd721bbe1727 Author: Marco Cesati Date: Wed Mar 17 23:20:48 2021 +0100 Staging: rtl8723bs: fix names in rtw_mlme.h This commit converts names of structs / enums in include/rtw_mlme.h from ALL_CAPS format to lowercase Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210317222130.29528-2-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a08b9f2f2267421092bf4b882a9461858216ed47 Author: Aditya Srivastava Date: Thu Mar 18 02:09:32 2021 +0530 ALSA: ctxfi: fix comment syntax in file headers The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are files in sound/pci/ctxfi which follow this syntax in their file headers, i.e. start with '/**' like comments, which causes unexpected warnings from kernel-doc. E.g., running scripts/kernel-doc -none on sound/pci/ctxfi/ctresource.c causes this warning: "warning: wrong kernel-doc identifier on line: * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved." Similarly for other files too. Provide a simple fix by replacing the kernel-doc like comment syntax with general format, i.e. "/*", to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210317203932.23993-1-yashsri421@gmail.com Signed-off-by: Takashi Iwai commit cbdce7a3620c7daff6b8a2cb27b41bb0a2e6f78d Author: Aditya Srivastava Date: Thu Mar 18 01:51:44 2021 +0530 ALSA: asihpi: fix comment syntax in file headers The opening comment mark '/**' is used for highlighting the beginning of kernel-doc comments. There are files in sound/pci/asihpi which follow this syntax in their file headers, i.e. start with '/**' like comments, which causes unexpected warnings from kernel-doc. E.g., running scripts/kernel-doc -none on sound/pci/asihpi/hpidspcd.h causes this warning: "warning: Cannot understand on line 4 - I thought it was a doc line" Provide a simple fix by replacing the kernel-doc like comment syntax with general format, i.e. "/*", to prevent kernel-doc from parsing it. Signed-off-by: Aditya Srivastava Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210317202144.20290-1-yashsri421@gmail.com Signed-off-by: Takashi Iwai commit e00943e916782ae17ca05d654779a84f09481ab8 Author: Badhri Jagan Sridharan Date: Wed Mar 17 23:56:04 2021 -0700 usb: typec: tcpm: PD3.0 sinks can send Discover Identity even in device mode >From 6.4.4.2 Structured VDM: • Either Port May be an Initiator of Structured VDMs except for the Enter Mode and Exit Mode Commands which Shall only be initiated by the DFP." The above implies that when PD3.0 link is established PD3.0 sinks can send out discover identity command/AMS once PD negotiation is done. This allows discovering identity for PD3.0 UFP ports as well. Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210318065604.3757307-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 18106234c0e99f21bd50574d92dbd26d9b97d789 Author: Colin Ian King Date: Thu Mar 11 09:25:29 2021 +0000 usb: mtu3: Fix spelling mistake "disabed" -> "disabled" The variable u3_ports_disabed contains a spelling mistake, rename it to u3_ports_disabled. Reviewed-by: Chunfeng Yun Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210311092529.4898-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 6a154ec9ef6762c774cd2b50215c7a8f0f08a862 Author: Pawel Laszczak Date: Mon Mar 15 08:17:48 2021 +0100 usb: webcam: Invalid size of Processing Unit Descriptor According with USB Device Class Definition for Video Device the Processing Unit Descriptor bLength should be 12 (10 + bmControlSize), but it has 11. Invalid length caused that Processing Unit Descriptor Test Video form CV tool failed. To fix this issue patch adds bmVideoStandards into uvc_processing_unit_descriptor structure. The bmVideoStandards field was added in UVC 1.1 and it wasn't part of UVC 1.0a. Reviewed-by: Laurent Pinchart Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20210315071748.29706-1-pawell@gli-login.cadence.com Signed-off-by: Greg Kroah-Hartman commit 98f11978bdcef447c27a18735cea28b81847b8b3 Author: Pawel Laszczak Date: Mon Mar 15 07:59:25 2021 +0100 usb: gadget: uvc: Updating bcdUVC field to 0x0110 Command Verifier during UVC Descriptor Tests (Class Video Control Interface Descriptor Test Video) complains about: Video Control Interface Header bcdUVC is 0x0100. USB Video Class specification 1.0 has been replaced by 1.1 specification (UVC: 6.2.26) Class Video Control Interface Descriptor bcdUVC is not 1.1 Reviewed-by: Laurent Pinchart Signed-off-by: Pawel Laszczak Reviewed-by: Peter Chen Link: https://lore.kernel.org/r/20210315065926.30152-1-pawell@gli-login.cadence.com Signed-off-by: Greg Kroah-Hartman commit 26adde04acdff14a1f28d4a5dce46a8513a3038b Author: Pawel Laszczak Date: Mon Mar 8 13:53:38 2021 +0100 usb: gadget: uvc: add bInterval checking for HS mode Patch adds extra checking for bInterval passed by configfs. The 5.6.4 chapter of USB Specification (rev. 2.0) say: "A high-bandwidth endpoint must specify a period of 1x125 µs (i.e., a bInterval value of 1)." The issue was observed during testing UVC class on CV. I treat this change as improvement because we can control bInterval by configfs. Reviewed-by: Peter Chen Reviewed-by: Laurent Pinchart Signed-off-by: Pawel Laszczak Link: https://lore.kernel.org/r/20210308125338.4824-1-pawell@gli-login.cadence.com Signed-off-by: Greg Kroah-Hartman commit 064ece8d7ca78f7ee5470e553fd3cb71842e0115 Author: He Fengqing Date: Tue Mar 16 04:14:30 2021 +0000 drivers: usb: Fix a typo in dwc3-qcom.c This patch fix a spelling typo in dwc3-qcom.c Signed-off-by: He Fengqing Link: https://lore.kernel.org/r/20210316041430.2203546-1-hefengqing@huawei.com Signed-off-by: Greg Kroah-Hartman commit a1aea351d4dbac820524af61764fb63d1eb26b5c Author: Bhaskar Chowdhury Date: Tue Mar 16 10:22:43 2021 +0530 usb: host: Mundane spello fix in the file sl811_cs.c s/seting/setting/ Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210316045243.3500228-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit a55235820dcdbc7af0ac72844c6d25ae5454e8bf Author: Badhri Jagan Sridharan Date: Tue Mar 16 15:13:04 2021 -0700 usb: typec: tcpci: Added few missing TCPCI register definitions This change adds some of the register bit definitions from the TCPCI spec: https://www.usb.org/sites/default/files/documents/ usb-port_controller_specification_rev2.0_v1.0_0.pdf Reviewed-by: Guenter Roeck Signed-off-by: Badhri Jagan Sridharan Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210316221304.391206-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 742a658bad18b962cfce5a85acb5fdfe24be6c5c Author: Heiko Thiery Date: Wed Mar 17 13:11:37 2021 +0100 arm64: configs: Enable PCIe support for imx8mq boards Enable PCI_IMX6 to get PCI support for imx8mq boards like imx8mq-evk, imx8mq-kontron-pitx-imx8m and imx8mq-zii-ultra. The driver only has build-in support and cannot be compiled as module. Signed-off-by: Heiko Thiery Signed-off-by: Shawn Guo commit 5337af7918bedde9713cd223ce5df74b3d6c7d7a Author: Rafał Miłecki Date: Wed Mar 17 09:16:31 2021 +0100 arm64: dts: broadcom: bcm4908: add Ethernet TX irq This hardware supports two interrupts, one per DMA channel (RX and TX). Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 1cb8f3e2d8fe7533c26df9925a83bd3d185b312e Author: Arnd Bergmann Date: Wed Jan 20 14:25:37 2021 +0100 hwspinlock: remove sirf driver The CSR SiRF prima2/atlas platforms are getting removed, so this driver is no longer needed. Cc: Barry Song Link: https://lore.kernel.org/linux-arm-kernel/20210120124812.2800027-1-arnd@kernel.org/T/ Signed-off-by: Arnd Bergmann Link: https://lore.kernel.org/r/20210120132537.2285157-1-arnd@kernel.org Signed-off-by: Bjorn Andersson commit 6b28276512fdfc010e25c833973328e51a56eafb Merge: 97a19caf1b1f6 c53a3355eb297 Author: Alexei Starovoitov Date: Wed Mar 17 18:48:05 2021 -0700 Merge branch 'Provide NULL and KERNEL_VERSION macros in bpf_helpers.h' Andrii Nakryiko says: ==================== Provide NULL and KERNEL_VERSION macros in bpf_helpers.h. Patch #2 removes such custom NULL definition from one of the selftests. v2->v3: - instead of vmlinux.h, do this in bpf_helpers.h; - added KERNEL_VERSION, which comes up periodically as well; - I dropped strict compilation patches for now, because we run into new warnings (e.g., not checking read() result) in kernel-patches CI, which I can't even reproduce locally. Also -Wdiscarded-qualifiers pragma for jit_disasm.c is not supported by Clang, it needs to be -Wincompatible-pointer-types-discards-qualifiers for Clang; we don't have to deal with that in this patch set; v1->v2: - fix few typos and wrong copy/paste; - fix #pragma push -> pop. ==================== Signed-off-by: Alexei Starovoitov commit c53a3355eb2976fc4eb4d42862db0eea205045a1 Author: Andrii Nakryiko Date: Wed Mar 17 13:05:10 2021 -0700 selftests/bpf: drop custom NULL #define in skb_pkt_end selftest Now that bpftool generates NULL definition as part of vmlinux.h, drop custom NULL definition in skb_pkt_end.c. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20210317200510.1354627-3-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 9ae2c26e43248b722e79fe867be38062c9dd1e5f Author: Andrii Nakryiko Date: Wed Mar 17 13:05:09 2021 -0700 libbpf: provide NULL and KERNEL_VERSION macros in bpf_helpers.h Given that vmlinux.h is not compatible with headers like stddef.h, NULL poses an annoying problem: it is defined as #define, so is not captured in BTF, so is not emitted into vmlinux.h. This leads to users either sticking to explicit 0, or defining their own NULL (as progs/skb_pkt_end.c does). But it's easy for bpf_helpers.h to provide (conditionally) NULL definition. Similarly, KERNEL_VERSION is another commonly missed macro that came up multiple times. So this patch adds both of them, along with offsetof(), that also is typically defined in stddef.h, just like NULL. This might cause compilation warning for existing BPF applications defining their own NULL and/or KERNEL_VERSION already: progs/skb_pkt_end.c:7:9: warning: 'NULL' macro redefined [-Wmacro-redefined] #define NULL 0 ^ /tmp/linux/tools/testing/selftests/bpf/tools/include/vmlinux.h:4:9: note: previous definition is here #define NULL ((void *)0) ^ It is trivial to fix, though, so long-term benefits outweight temporary inconveniences. Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/r/20210317200510.1354627-2-andrii@kernel.org Signed-off-by: Alexei Starovoitov commit 97a19caf1b1f6a9d4f620a9d51405a1973bd4641 Author: Yonghong Song Date: Wed Mar 17 10:41:32 2021 -0700 bpf: net: Emit anonymous enum with BPF_TCP_CLOSE value explicitly The selftest failed to compile with clang-built bpf-next. Adding LLVM=1 to your vmlinux and selftest build will use clang. The error message is: progs/test_sk_storage_tracing.c:38:18: error: use of undeclared identifier 'BPF_TCP_CLOSE' if (newstate == BPF_TCP_CLOSE) ^ 1 error generated. make: *** [Makefile:423: /bpf-next/tools/testing/selftests/bpf/test_sk_storage_tracing.o] Error 1 The reason for the failure is that BPF_TCP_CLOSE, a value of an anonymous enum defined in uapi bpf.h, is not defined in vmlinux.h. gcc does not have this problem. Since vmlinux.h is derived from BTF which is derived from vmlinux DWARF, that means gcc-produced vmlinux DWARF has BPF_TCP_CLOSE while llvm-produced vmlinux DWARF does not have. BPF_TCP_CLOSE is referenced in net/ipv4/tcp.c as BUILD_BUG_ON((int)BPF_TCP_CLOSE != (int)TCP_CLOSE); The following test mimics the above BUILD_BUG_ON, preprocessed with clang compiler, and shows gcc DWARF contains BPF_TCP_CLOSE while llvm DWARF does not. $ cat t.c enum { BPF_TCP_ESTABLISHED = 1, BPF_TCP_CLOSE = 7, }; enum { TCP_ESTABLISHED = 1, TCP_CLOSE = 7, }; int test() { do { extern void __compiletime_assert_767(void) ; if ((int)BPF_TCP_CLOSE != (int)TCP_CLOSE) __compiletime_assert_767(); } while (0); return 0; } $ clang t.c -O2 -c -g && llvm-dwarfdump t.o | grep BPF_TCP_CLOSE $ gcc t.c -O2 -c -g && llvm-dwarfdump t.o | grep BPF_TCP_CLOSE DW_AT_name ("BPF_TCP_CLOSE") Further checking clang code find clang actually tried to evaluate condition at compile time. If it is definitely true/false, it will perform optimization and the whole if condition will be removed before generating IR/debuginfo. This patch explicited add an expression after the above mentioned BUILD_BUG_ON in net/ipv4/tcp.c like (void)BPF_TCP_ESTABLISHED to enable generation of debuginfo for the anonymous enum which also includes BPF_TCP_CLOSE. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210317174132.589276-1-yhs@fb.com commit 0ce7cf4127f14078ca598ba9700d813178a59409 Author: Pablo Neira Ayuso Date: Thu Mar 18 01:25:05 2021 +0100 netfilter: nftables: update table flags from the commit phase Do not update table flags from the preparation phase. Store the flags update into the transaction, then update the flags from the commit phase. Signed-off-by: Pablo Neira Ayuso commit ee5ee188e2c2518c38337361b1d2825cf80fbaa0 Author: tangchunyou Date: Wed Mar 17 15:24:43 2021 +0800 drm/mediatek: cec: Delete redundant printing of return value platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: tangchunyou Signed-off-by: Chun-Kuang Hu commit 4accca4399cf73e3c97ef0695280afd1729bf60d Author: Wang Qing Date: Sat Mar 13 15:48:02 2021 +0800 drm/mediatek: dpi: Delete redundant printing of return value platform_get_irq() has already checked and printed the return value, the printing here is nothing special, it is not necessary at all. Signed-off-by: Wang Qing Signed-off-by: Chun-Kuang Hu commit 1b9cd7690a1ef68c8f3756cae1ab88bf86660f0b Author: Pablo Neira Ayuso Date: Wed Mar 17 15:56:40 2021 +0100 netfilter: flowtable: refresh timeout after dst and writable checks Refresh the timeout (and retry hardware offload) once the skbuff dst is confirmed to be current and after the skbuff is made writable. Signed-off-by: Pablo Neira Ayuso commit e5075c0badaaac245a6fa0b4625b5cd714d8ade3 Author: Pablo Neira Ayuso Date: Wed Mar 17 15:55:28 2021 +0100 netfilter: flowtable: call dst_check() to fall back to classic forwarding In case the route is stale, pass up the packet to the classic forwarding path for re-evaluation and schedule this flow entry for removal. Signed-off-by: Pablo Neira Ayuso commit f4401262b927b84d2f1861e347627fa0d77d4eb7 Author: Pablo Neira Ayuso Date: Wed Mar 17 15:55:25 2021 +0100 netfilter: flowtable: fast NAT functions never fail Simplify existing fast NAT routines by returning void. After the skb_try_make_writable() call consolidation, these routines cannot ever fail. Signed-off-by: Pablo Neira Ayuso commit 4f08f173d08cad4664e447e580dc0c5aa6332db3 Author: Pablo Neira Ayuso Date: Wed Mar 17 15:55:11 2021 +0100 netfilter: flowtable: move FLOW_OFFLOAD_DIR_MAX away from enumeration This allows to remove the default case which should not ever happen and that was added to avoid gcc warnings on unhandled FLOW_OFFLOAD_DIR_MAX enumeration case. Signed-off-by: Pablo Neira Ayuso commit 2babb46c8c825e5039bbf0c273d82df3210dd43b Author: Pablo Neira Ayuso Date: Wed Mar 17 15:54:43 2021 +0100 netfilter: flowtable: move skb_try_make_writable() before NAT in IPv4 For consistency with the IPv6 flowtable datapath and to make sure the skbuff is writable right before the NAT header updates. Signed-off-by: Pablo Neira Ayuso commit 2fc11745c3ffa324643c1e6d8cf8f5273d9f9571 Author: Pablo Neira Ayuso Date: Wed Mar 17 15:53:09 2021 +0100 netfilter: flowtable: consolidate skb_try_make_writable() call Fetch the layer 4 header size to be mangled by NAT when building the tuple, then use it to make writable the network and the transport headers. After this update, the NAT routines now assumes that the skbuff area is writable. Do the pointer refetch only after the single skb_try_make_writable() call. Signed-off-by: Pablo Neira Ayuso commit d4a96be65423296e42091b0b79973b8d446e7798 Author: YueHaibing Date: Thu Mar 11 13:55:59 2021 +0800 netfilter: conntrack: Remove unused variable declaration commit e97c3e278e95 ("tproxy: split off ipv6 defragmentation to a separate module") left behind this. Signed-off-by: YueHaibing Signed-off-by: Pablo Neira Ayuso commit c2168e6bd7ec50cedb69b3be1ba6146e28893c69 Author: Gustavo A. R. Silva Date: Fri Mar 5 02:42:09 2021 -0600 netfilter: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Acked-by: Florian Westphal Signed-off-by: Gustavo A. R. Silva Signed-off-by: Pablo Neira Ayuso commit 2ed37183abb70233146dc82f19cb1cbceed2b505 Author: Oz Shlomo Date: Wed Mar 3 14:59:53 2021 +0200 netfilter: flowtable: separate replace, destroy and stats to different workqueues Currently the flow table offload replace, destroy and stats work items are executed on a single workqueue. As such, DESTROY and STATS commands may be backloged after a burst of REPLACE work items. This scenario can bloat up memory and may cause active connections to age. Instatiate add, del and stats workqueues to avoid backlogs of non-dependent actions. Provide sysfs control over the workqueue attributes, allowing userspace applications to control the workqueue cpumask. Signed-off-by: Oz Shlomo Reviewed-by: Paul Blakey Signed-off-by: Pablo Neira Ayuso commit a04be4b6b539cfce52181f6f8f15a823d99f520c Author: Michael Tretter Date: Wed Mar 17 17:16:09 2021 +0100 net: macb: simplify clk_init with dev_err_probe On some platforms, e.g., the ZynqMP, devm_clk_get can return -EPROBE_DEFER if the clock controller, which is implemented in firmware, has not been probed yet. As clk_init is only called during probe, use dev_err_probe to simplify the error message and hide it for -EPROBE_DEFER. Signed-off-by: Michael Tretter Acked-by: Nicolas Ferre Signed-off-by: David S. Miller commit 06debd6e1b28029e6e77c41e59a162868f377897 Merge: 51c3b916a4d7e 2b25fb31a38d4 Author: Dave Airlie Date: Thu Mar 18 08:06:29 2021 +1000 Merge tag 'drm-intel-next-2021-03-16' of git://anongit.freedesktop.org/drm/drm-intel into drm-next Highlights: - Alderlake S enabling, via topic branch (Aditya, Anusha, Caz, José, Lucas, Matt, Tejas) - Refactor display code to shrink intel_display.c etc. (Dave) - Support more gen 9 and Tigerlake PCH combinations (Lyude, Tejas) - Add eDP MSO support (Jani) Display: - Refactor to support multiple PSR instances (Gwan-gyeong) - Link training debug logging updates (Sean) - Updates to eDP fixed mode handling (Jani) - Disable PSR2 on JSL/EHL (Edmund) - Support DDR5 and LPDDR5 for bandwidth computation (Clint, José) - Update VBT DP max link rate table (Shawn) - Disable the QSES check for HDCP2.2 over MST (Juston) - PSR updates, refactoring, selective fetch (José, Gwan-gyeong) - Display init sequence refactoring (Lucas) - Limit LSPCON to gen 9 and 10 platforms (Ankit) - Fix DDI lane polarity per VBT info (Uma) - Fix HDMI vswing programming location in mode set (Ville) - Various display improvements and refactorings and cleanups (Ville) - Clean up DDI clock routing and readout (Ville) - Workaround async flip + VT-d corruption on HSW/BDW (Ville) - SAGV watermark fixes and cleanups (Ville) - Silence pipe tracepoint WARNs (Ville) Other: - Remove require_force_probe protection from RKL, may need to be revisited (Tejas) - Detect loss of MMIO access (Matt) - GVT display improvements - drm/i915: Disable runtime power management during shutdown (Imre) - Perf/OA updates (Umesh) - Remove references to struct drm_device.pdev, via topic branch (Thomas) - Backmerge (Jani) Signed-off-by: Dave Airlie From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87v99rnk1g.fsf@intel.com commit 4cb50d00fe96ea13b97caddb89cfc301571cbc63 Merge: ac1bbf8a81d3d 6584b26020fc5 Author: David S. Miller Date: Wed Mar 17 14:44:19 2021 -0700 Merge branch 'mv88e6393x' Marek Behún says: ==================== Add support for mv88e6393x family of Marvell after 2 months I finally had time to send v17 of Amethyst patches. This series is tested on Marvell CN9130-CRB. Changes since v16: - dropped patches adding 5gbase-r, since they are already merged - rebased onto net-next/master - driver API renamed set_egress_flood() method into 2 methods for ucast/mcast floods, so this is fixed Changes from v15: - put 10000baseKR_Full back into phylink_validate method for Amethyst, it seems I misunderstood the meaning behind things and removed it from v15 - removed erratum 3.7, since the procedure is done anyway in mv88e6390_serdes_pcs_config - renumbered errata 3.6 and 3.8 to 4.6 and 4.8, according to newer version of the errata document - refactored errata code a little and removed duplicate macro definitions (for example MV88E6390_SGMII_CONTROL is already called MV88E6390_SGMII_BMCR) Changes from v14: - added my Signed-off-by tags to Pavana's patches, since I am sending them (as suggested by Andrew) - added documentation to second patch adding 5gbase-r mode (as requested by Russell) - added Reviewed-by tags - applied Vladimir's suggestions: - reduced indentation level in mv88e6xxx_set_egress_port and mv88e6393x_serdes_port_config - removed 10000baseKR_Full from mv88e6393x_phylink_validate - removed PHY_INTERFACE_MODE_10GKR from mv88e6xxx_port_set_cmode Changes from v13: - added patch that wraps .set_egress_port into mv88e6xxx_set_egress_port, so that we do not have to set chip->*gress_dest_port members in every implementation of this method - for the patch that adds Amethyst support: - added more information into commit message - added these methods for mv88e6393x_ops: .port_sync_link .port_setup_message_port .port_max_speed_mode (new implementation needed) .atu_get_hash .atu_set_hash .serdes_pcs_config .serdes_pcs_an_restart .serdes_pcs_link_up - this device can set upstream port per port, so implement .port_set_upstream_port instead of .set_cpu_port - removed USXGMII cmode (not yet supported, working on it) - added debug messages into mv88e6393x_port_set_speed_duplex - added Amethyst errata 4.5 (EEE should be disabled on SERDES ports) - fixed 5gbase-r serdes configuration and interrupt handling - refactored mv88e6393x_serdes_setup_errata - refactored mv88e6393x_port_policy_write - added patch implementing .port_set_policy for Amethyst ==================== Signed-off-by: David S. Miller commit 6584b26020fc5bb586d6e9f621eb8a7343a6ed33 Author: Marek Behún Date: Wed Mar 17 14:46:43 2021 +0100 net: dsa: mv88e6xxx: implement .port_set_policy for Amethyst The 16-bit Port Policy CTL register from older chips is on 6393x changed to Port Policy MGMT CTL, which can access more data, but indirectly and via 8-bit registers. The original 16-bit value is divided into first two 8-bit register in the Port Policy MGMT CTL. We can therefore use the previous code to compute the mask and shift, and then - if 0 <= shift < 8, we access register 0 in Port Policy MGMT CTL - if 8 <= shift < 16, we access register 1 in Port Policy MGMT CTL There are in fact other possible policy settings for Amethyst which could be added here, but this can be done in the future. Signed-off-by: Marek Behún Reviewed-by: Pavana Sharma Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit de776d0d316f7230d96ac1aa1df354d880476c1f Author: Pavana Sharma Date: Wed Mar 17 14:46:42 2021 +0100 net: dsa: mv88e6xxx: add support for mv88e6393x family The Marvell 88E6393X device is a single-chip integration of a 11-port Ethernet switch with eight integrated Gigabit Ethernet (GbE) transceivers and three 10-Gigabit interfaces. This patch adds functionalities specific to mv88e6393x family (88E6393X, 88E6193X and 88E6191X). The main differences between previous devices and this one are: - port 0 can be a SERDES port - all SERDESes are one-lane, eg. no XAUI nor RXAUI - on the other hand the SERDESes can do USXGMII, 10GBASER and 5GBASER (on 6191X only one SERDES is capable of more than 1g; USXGMII is not yet supported with this change) - Port Policy CTL register is changed to Port Policy MGMT CTL register, via which several more registers can be accessed indirectly - egress monitor port is configured differently - ingress monitor/CPU/mirror ports are configured differently and can be configured per port (ie. each port can have different ingress monitor port, for example) - port speed AltBit works differently than previously - PHY registers can be also accessed via MDIO address 0x18 and 0x19 (on previous devices they could be accessed only via Global 2 offsets 0x18 and 0x19, which means two indirections; this feature is not yet leveraged with thiis commit) Co-developed-by: Ashkan Boldaji Signed-off-by: Ashkan Boldaji Signed-off-by: Pavana Sharma Co-developed-by: Marek Behún Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit 2fda45f019fd4feca5ed672dbb8323375adbdcfb Author: Marek Behún Date: Wed Mar 17 14:46:41 2021 +0100 net: dsa: mv88e6xxx: wrap .set_egress_port method There are two implementations of the .set_egress_port method, and both of them, if successful, set chip->*gress_dest_port variable. To avoid code repetition, wrap this method into mv88e6xxx_set_egress_port. Signed-off-by: Marek Behún Reviewed-by: Pavana Sharma Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 193c5b2698e3915a66ae79702858396d6e6fc9f5 Author: Pavana Sharma Date: Wed Mar 17 14:46:40 2021 +0100 net: dsa: mv88e6xxx: change serdes lane parameter type from u8 type to int Returning 0 is no more an error case with MV88E6393 family which has serdes lane numbers 0, 9 or 10. So with this change .serdes_get_lane will return lane number or -errno (-ENODEV or -EOPNOTSUPP). Signed-off-by: Pavana Sharma Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: Marek Behún Signed-off-by: David S. Miller commit ac1bbf8a81d3d3b0a318c82b88742f4282fb91d8 Author: dingsenjie Date: Wed Mar 17 20:30:30 2021 +0800 ethernet/microchip:remove unneeded variable: "ret" remove unneeded variable: "ret". Signed-off-by: dingsenjie Signed-off-by: David S. Miller commit f0744a84f36140a18d8f4c63114ad90a133a946c Author: dingsenjie Date: Wed Mar 17 20:29:33 2021 +0800 ethernet/broadcom:remove unneeded variable: "ret" remove unneeded variable: "ret". Signed-off-by: dingsenjie Signed-off-by: David S. Miller commit db2f2842e6f56027b1a29c7b16dc40482f41563b Author: Ong Boon Leong Date: Wed Mar 17 09:01:23 2021 +0800 net: stmmac: add per-queue TX & RX coalesce ethtool support Extending the driver to support per-queue RX and TX coalesce settings in order to support below commands: To show per-queue coalesce setting:- $ ethtool --per-queue queue_mask --show-coalesce To set per-queue coalesce setting:- $ ethtool --per-queue queue_mask --coalesce \ [rx-usecs N] [rx-frames M] [tx-usecs P] [tx-frames Q] Signed-off-by: Ong Boon Leong Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 2c6b02185cc608c19a22691fadc6ca2cd114c286 Author: Juergen Gross Date: Thu Feb 11 08:09:53 2021 +0100 irq: Simplify condition in irq_matrix_reserve() The if condition in irq_matrix_reserve() can be much simpler. While at it fix a typo in the comment. Signed-off-by: Juergen Gross Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210211070953.5914-1-jgross@suse.com commit 6ef4f40993e7ba1f132845c211dbba711af0623e Merge: f16569420d597 0929ff71cf927 Author: David S. Miller Date: Wed Mar 17 12:34:35 2021 -0700 Merge branch 'dsa-doc-fixups' Vladimir Oltean says: ==================== DSA/switchdev documentation fixups These are some small fixups after the recently merged documentation update. ==================== Signed-off-by: David S. Miller commit 0929ff71cf9272a2b47d6708fc7eff9c381db7b7 Author: Vladimir Oltean Date: Wed Mar 17 19:44:58 2021 +0200 Documentation: networking: dsa: mention that the master is brought up automatically Since commit 9d5ef190e561 ("net: dsa: automatically bring up DSA master when opening user port"), DSA manages the administrative status of the host port automatically. Update the configuration steps to reflect this. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit e322bacb914d5cb69783045f3c639521827b30e8 Author: Vladimir Oltean Date: Wed Mar 17 19:44:57 2021 +0200 Documentation: networking: dsa: demote subsections to simple emphasized words "make htmldocs" complains: configuration.rst:165: WARNING: duplicate label networking/dsa/configuration:single port, other instance in (...) configuration.rst:212: WARNING: duplicate label networking/dsa/configuration:bridge, other instance in (...) configuration.rst:252: WARNING: duplicate label networking/dsa/configuration:gateway, other instance in (...) And for good reason, because the "single port", "bridge" and "gateway" use cases are replicated twice, once for normal taggers and twice for DSA_TAG_PROTO_NONE. So when trying to reference these sections via a hyperlink such as: https://www.kernel.org/doc/html/latest/networking/dsa/configuration.html#single-port it will always reference the first occurrence, and never the second one. This change makes the "single port", "bridge" and "gateway" configuration examples consistent with the formatting used in the "Configuration showcases" subsection. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8794be45cd456089b0582b7e72c686baa9d6f9b7 Author: Vladimir Oltean Date: Wed Mar 17 19:44:56 2021 +0200 Documentation: networking: dsa: add missing new line in devlink section "make htmldocs" produces these warnings: Documentation/networking/dsa/dsa.rst:468: WARNING: Unexpected indentation. Documentation/networking/dsa/dsa.rst:477: WARNING: Block quote ends without a blank line; unexpected unindent. Fixes: 8411abbcad8e ("Documentation: networking: dsa: mention integration with devlink") Reported-by: Stephen Rothwell Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 6b38c57198366a86dd73fb250db5dfcbdc45763f Author: Vladimir Oltean Date: Wed Mar 17 19:44:55 2021 +0200 Documentation: networking: switchdev: add missing "and" word Even though this is clear from the context, it is nice to actually be grammatically correct. Fixes: 0f22ad45f47c ("Documentation: networking: switchdev: clarify device driver behavior") Reported-by: Ido Schimmel Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit cfeb961a2b5f1a7c6e0dc43a1673b28fab05baf8 Author: Vladimir Oltean Date: Wed Mar 17 19:44:54 2021 +0200 Documentation: networking: switchdev: separate bulleted items with new line It looks like "make htmldocs" produces this warning: Documentation/networking/switchdev.rst:482: WARNING: Unexpected indentation. Fixes: 0f22ad45f47c ("Documentation: networking: switchdev: clarify device driver behavior") Reported-by: Stephen Rothwell Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit f16569420d597987cca0d966809a882f04d3f465 Merge: 930a3a622935e 058fa3d915eac Author: David S. Miller Date: Wed Mar 17 12:29:40 2021 -0700 Merge branch 'octeontx2-refactor' Naveen Mamindlapalli says: ==================== refactor code related to npc install flow This patchset refactors and cleans up the code associated with the npc install flow API, specifically to eliminate different code paths while installing MCAM rules by AF and PF. This makes the code easier to understand and maintain. Also added support for multi channel NIX promisc entry. ==================== Signed-off-by: David S. Miller commit 058fa3d915eac6e0babbe3c4776e8ca382415c2c Author: Naveen Mamindlapalli Date: Wed Mar 17 19:05:38 2021 +0530 octeontx2-af: Modify the return code for unsupported flow keys The mbox handler npc_install_flow returns ENOTSUPP for unsupported flow keys. This patch modifies the return value to AF driver defined error code for debugging purpose. Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit b6b0e3667e1b2c796cd282d5ec385d5864ccb1ce Author: Subbaraya Sundeep Date: Wed Mar 17 19:05:37 2021 +0530 octeontx2-af: Avoid duplicate unicast rule in mcam_rules list A mcam rule described by mcam_rule struct has all the info such as the hardware MCAM entry number, match criteria and corresponding action etc. All mcam rules are stored in a linked list mcam->rules. When adding/updating a rule to the mcam->rules it is checked if a rule already exists for the mcam entry. If the rule already exists, the same rule is updated instead of creating new rule. This way only one mcam_rule exists for the only one default unicast entry installed by AF. But a PF/VF can get different NIXLF (or default unicast entry number) after a attach-detach-attach sequence. When that happens mcam_rules list end up with two default unicast rules. Fix the problem by deleting the default unicast rule list node always when disabling mcam rules. Signed-off-by: Subbaraya Sundeep Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit 56bcef528bd87d66ddf81f0fb1b8837cce1b2667 Author: Naveen Mamindlapalli Date: Wed Mar 17 19:05:36 2021 +0530 octeontx2-af: Use npc_install_flow API for promisc and broadcast entries Use npc_install_flow mailbox API for installing the default promisc and broadcast match entries. Earlier these entries were installed using low level npc_config_mcam_entry API, which does not store these rules and is not available when the rules are dumped using debugfs. Added chan_mask field to npc_install_flow_req to calculate channel mask when channel count is greater than 1 and configure the channel mask in entry kw_mask. Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit d450a23515e00b3c0701f4ae7f3e47dc71aa7bca Author: Nalla, Pradeep Date: Wed Mar 17 19:05:35 2021 +0530 octeontx2-af: Add support for multi channel in NIX promisc entry This patch adds support for multi channel NIX promisc entry. Packets sent on all those channels by the host should be received by the interface to which those channels belong. Channel count, if greater than 1, should be power of 2 as only one promisc entry is available for the interface. Key mask is modified such that incoming packets from channel base to channel count are directed to the same pci function. Signed-off-by: Nalla, Pradeep Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit 63f925dc55b33e8c4edd0de5e83904cd179d3095 Author: Naveen Mamindlapalli Date: Wed Mar 17 19:05:34 2021 +0530 octeontx2-af: refactor function npc_install_flow for default entry This patch refactors npc_install_flow function to install AF installed default MCAM entries similar to other MCAM entries installed by PF/VF. As a result the code would be more readable and easy to maintain. Modified npc_verify_entry and npc_verify_channel to properly check MCAM rules installed by AF. Signed-off-by: Naveen Mamindlapalli Signed-off-by: David S. Miller commit 930a3a622935e7cf28445f61826253f8eee56f45 Merge: 07bcf6855184a 1724c97d2f9dd Author: David S. Miller Date: Wed Mar 17 12:26:28 2021 -0700 Merge branch 'mlxsw-vlan-=vxlan' mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2 Ido Schimmel says: ==================== This patchset allows user space to simultaneously configure both 802.1d and 802.1ad VxLAN bridges on Spectrum-2 and later ASICs. 802.1ad VxLAN bridges are still forbidden on Spectrum-1. The reason for the current limitation is that up until now the EtherType that was pushed to decapsulated VxLAN packets was a property of the tunnel port, of which there is only one. This meant that a 802.1ad VxLAN bridge could not be configured if the tunnel port was already configured to push a 802.1q tag. This patchset improves the situation by making two changes. First, decapsulated packets are marked as having their EtherType decided by the egress port. Second, local ports member in the bridge (e.g., swp1) are configured to set the correct egress EtherType. Patchset overview: Patch #1 adds a register required for the first change Patches #2-#3 add the register required for the second change and a corresponding API Patch #4 prepares the driver for the split in behavior between Spectrum-1 and later ASICs Patch #5 performs the two above mentioned changes to allow the driver to support simultaneous 802.1ad and 802.1d VxLAN bridges on Spectrum-2 and later ASICs Patch #6 adds a selftest Patch #7 removes a selftest that verified the limitation that was lifted by this patchset ==================== Signed-off-by: David S. Miller commit 1724c97d2f9ddcfe2e372f9b02d6efde15b885b0 Author: Amit Cohen Date: Wed Mar 17 12:35:29 2021 +0200 selftests: mlxsw: spectrum-2: Remove q_in_vni_veto test q_in_vni_veto.sh is not needed anymore because VxLAN with an 802.1ad bridge and VxLAN with an 802.1d bridge can coexist. Remove the test. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 35f15ab378fa7e1eaa25798076a457523b5ace75 Author: Amit Cohen Date: Wed Mar 17 12:35:28 2021 +0200 selftests: forwarding: Add test for dual VxLAN bridge Configure VxLAN with an 802.1ad bridge and VxLAN with an 802.1d bridge at the same time in same switch, verify that traffic passed as expected. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit bf677bd25a9956bbeb9b4e13cb0c786c814d917e Author: Amit Cohen Date: Wed Mar 17 12:35:27 2021 +0200 mlxsw: Allow 802.1d and .1ad VxLAN bridges to coexist on Spectrum>=2 Currently only one EtherType can be configured for pushing in tunnels because EtherType is configured using SPVID.et_vlan for tunnel port. This behavior is forbidden by comparing mlxsw_sp_nve_config struct for each new tunnel, the struct contains 'ethertype' field which means that only one EtherType is legal at any given time. Remove 'ethertype' field to allow creating VxLAN devices with different bridges. To allow using several types of VxLAN bridges at the same time, the EtherType should be determined at the egress port. This behavior is achieved by setting SPVID to decide which EtherType to push at egress and for each local_port which is member in 802.1ad bridge, set SPEVET.et_vlan to ether_type1 (i.e., 0x88A8). Use switchdev_ops->init() to set different mlxsw_sp_bridge_ops for different ASICs in order to be able to split the behavior when port joins / leaves an 802.1ad bridge in different ASICs. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 0f74fa5617305aa555db7cbc8c19b8eff4806efe Author: Amit Cohen Date: Wed Mar 17 12:35:26 2021 +0200 mlxsw: Add struct mlxsw_sp_switchdev_ops per ASIC A subsequent patch will need to implement different set of operations when a port joins / leaves an 802.1ad bridge, based on the ASIC type. Prepare for this change by allowing to initialize the bridge module based on the ASIC type via 'struct mlxsw_sp_switchdev_ops'. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 114a465d890a4fa2e3c0a49001cd47d3e804bf54 Author: Amit Cohen Date: Wed Mar 17 12:35:25 2021 +0200 mlxsw: spectrum: Add mlxsw_sp_port_egress_ethtype_set() A subsequent patch will cause decapsulated packets to have their EtherType determined by the egress port. Add mlxsw_sp_port_egress_ethtype_set() which will be called when a port joins an 802.1ad bridge, so that it will set an 802.1ad EtherType on decapsulated packets transmitted through it, instead of the default 802.1q EtherType. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit d8f4da73cea7438d95c6d6a54ec0a76dbccac02e Author: Amit Cohen Date: Wed Mar 17 12:35:24 2021 +0200 mlxsw: reg: Add Switch Port Egress VLAN EtherType Register SPEVET configures which EtherType to push at egress for packets incoming through a local port for which 'SPVID.egr_et_set' is set. The next patches will use SPEVET to configure EtherType 0x88A8 and 0x8100 for local ports member in 802.1ad and 802.1q bridges, respectively. This allows using dual VxLAN bridges (802.1d and 802.1ad at the same time). Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 1b35293b7afc5bdd6731502c6bba11a04a71512a Author: Amit Cohen Date: Wed Mar 17 12:35:23 2021 +0200 mlxsw: reg: Add egr_et_set field to SPVID SPVID.egr_et_set=1 means that when VLAN is pushed at ingress (for untagged packets or for QinQ push mode) then the EtherType is decided at the egress port. The next patches will use this field for VxLAN devices (tunnel port) in order to allow using dual VxLAN bridges (802.1d and 802.1ad at the same time). Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 07bcf6855184a1ceb09e1dedc57a603aefe4978e Merge: 73a2218cb268f 46c5176c586c8 Author: David S. Miller Date: Wed Mar 17 12:24:36 2021 -0700 Merge branch 'b53-legacy-tags' Álvaro Fernández Rojas says: ==================== net: dsa: b53: support legacy tags Legacy Broadcom tags are needed for older switches. ==================== Signed-off-by: David S. Miller commit 46c5176c586c81306bf9e7024c13b95da775490f Author: Álvaro Fernández Rojas Date: Wed Mar 17 11:29:27 2021 +0100 net: dsa: b53: support legacy tags These tags are used on BCM5325, BCM5365 and BCM63xx switches. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 964dbf186eaa84d409c359ddf09c827a3fbe8228 Author: Álvaro Fernández Rojas Date: Wed Mar 17 11:29:26 2021 +0100 net: dsa: tag_brcm: add support for legacy tags Add support for legacy Broadcom tags, which are similar to DSA_TAG_PROTO_BRCM. These tags are used on BCM5325, BCM5365 and BCM63xx switches. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: David S. Miller commit 73a2218cb268ff62f42420cf37acfb2a2d300959 Author: Bhaskar Chowdhury Date: Wed Mar 17 14:30:59 2021 +0530 net: ppp: Mundane typo fixes in the file pppoe.c s/procesing/processing/ s/comparations/comparisons/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 0705ef64d1ff52b817e278ca6e28095585ff31e1 Author: Borislav Petkov Date: Wed Mar 17 11:33:04 2021 +0100 tools/insn: Restore the relative include paths for cross building Building perf on ppc causes: In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:15: util/intel-pt-decoder/../../../arch/x86/lib/insn.c:14:10: fatal error: asm/inat.h: No such file or directory 14 | #include /*__ignore_sync_check__ */ | ^~~~~~~~~~~~ Restore the relative include paths so that the compiler can find the headers. Fixes: 93281c4a9657 ("x86/insn: Add an insn_decode() API") Reported-by: Ian Rogers Reported-by: Stephen Rothwell Signed-off-by: Borislav Petkov Tested-by: Ian Rogers Tested-by: Stephen Rothwell Link: https://lkml.kernel.org/r/20210317150858.02b1bbc8@canb.auug.org.au commit 964e8bedd5a13a662e8e418ed763351c07d0dac7 Author: Arnaud Pouliquen Date: Thu Mar 11 15:04:13 2021 +0100 rpmsg: char: Return an error if device already open The rpmsg_create_ept function is invoked when the device is opened. As only one endpoint must be created per device. It is not possible to open the same device twice. But there is nothing to prevent multi open. Return -EBUSY when device is already opened to have a generic error instead of relying on the back-end to potentially detect the error. Without this patch for instance the GLINK driver return -EBUSY while the virtio bus return -ENOSPC. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210311140413.31725-7-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit c486682ae1e2b149add22f44cf413b3103e3ef39 Author: Arnaud Pouliquen Date: Thu Mar 11 15:04:12 2021 +0100 rpmsg: virtio: Register the rpmsg_char device Instantiate the rpmsg_char device on virtio RPMsg bus creation. This provides the capability, with the RPMSG_CREATE_EPT_IOCTL ioctl, to create RPMsg char device endpoints relying on the rpmsg_chrdev_create_eptdev API. Notice that the created endpoints are attached to the rpmsg_ctldev device, but not associated to a channel. As consequence, the endpoint source and destination addresses have to been specified and there is no channel creation and no name service announcement to inform the remote side. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210311140413.31725-6-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit b4ce7e2ebcc52ff907c5a922bf19c3dfa39dddb1 Author: Arnaud Pouliquen Date: Thu Mar 11 15:04:11 2021 +0100 rpmsg: char: Use rpmsg_sendto to specify the message destination address When the endpoint device is created by the application, a destination address is specified in the rpmsg_channel_info structure. Since the rpmsg_endpoint structure does not store the destination address, this destination address must be specified when sending a message. Replaces rpmsg_send with rpmsg_sendto to allow to specify the destination address. This implementation is requested for compatibly with some rpmsg backends like the virtio backend. For this, the GLINK an SMD drivers have been updated to support the rpmsg_sendto, even if the destination address is ignored for these backends. For these drivers, the rpmsg_send and rpmsg_trysend ops are preserved to avoid breaking the legacy. Signed-off-by: Arnaud Pouliquen Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210311140413.31725-5-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit 809328b40cfb152f75541aa3dcbbe4903098963b Author: Arnaud Pouliquen Date: Thu Mar 11 15:04:10 2021 +0100 rpmsg: Add short description of the IOCTL defined in UAPI. Add a description of the IOCTLs and provide information on the default value of the source and destination addresses. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210311140413.31725-4-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit 3093c3c7c136458af692d5c3d309a66c3c12d9f4 Author: Arnaud Pouliquen Date: Thu Mar 11 15:04:09 2021 +0100 rpmsg: Move RPMSG_ADDR_ANY in user API As the RPMSG_ADDR_ANY is a valid src or dst address that can be set by user applications, migrate its definition in user API. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210311140413.31725-3-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit 60d7b22d25930e5c3e03eca32047e3313fa76897 Author: Arnaud Pouliquen Date: Thu Mar 11 15:04:08 2021 +0100 rpmsg: char: Rename rpmsg_char_init to rpmsg_chrdev_init To be coherent with the other functions which are prefixed by rpmsg_chrdev, rename the rpmsg_char_init function. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20210311140413.31725-2-arnaud.pouliquen@foss.st.com Signed-off-by: Bjorn Andersson commit 007d81a4519f04fa5ced5e9e28bf70cd753c398d Author: Konrad Dybcio Date: Thu Feb 25 22:31:19 2021 +0100 thermal/drivers/qcom/tsens_v1: Enable sensor 3 on MSM8976 The sensor *is* in fact used and does report temperature. Signed-off-by: Konrad Dybcio Acked-by: Thara Gopinath Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210225213119.116550-1-konrad.dybcio@somainline.org commit ad426d7d966b525b73ed5a1842dd830312bbba71 Author: Álvaro Fernández Rojas Date: Wed Mar 17 09:42:01 2021 +0100 net: dsa: b53: relax is63xx() condition BCM63xx switches are present on bcm63xx and bmips devices. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 3600be5f58c18bee490e17c76f51d777a6410f42 Author: Voon Weifeng Date: Wed Mar 17 12:09:04 2021 +0800 net: stmmac: add timestamp correction to rid CDC sync error According to Synopsis DesignWare EQoS Databook, the Clock Domain Cross synchronization error is introduced tue to the clock(GMII Tx/Rx clock) being different at the capture as compared to the PTP clock(clk_ptp_ref_i) that is used to generate the time. The CDC synchronization error is almost equal to 2 times the clock period of the PTP clock(clk_ptp_ref_i). On a Intel Tigerlake platform (with Marvell 88E2110 external PHY): Before applying this patch (with CDC synchronization error): ptp4l[64.044]: rms 8 max 13 freq +30877 +/- 11 delay 216 +/- 0 ptp4l[65.047]: rms 13 max 20 freq +30869 +/- 17 delay 213 +/- 0 ptp4l[66.050]: rms 12 max 20 freq +30857 +/- 11 delay 213 +/- 0 ptp4l[67.052]: rms 11 max 22 freq +30849 +/- 10 delay 215 +/- 0 ptp4l[68.055]: rms 10 max 16 freq +30853 +/- 13 delay 215 +/- 0 ptp4l[69.057]: rms 7 max 13 freq +30848 +/- 9 delay 216 +/- 0 ptp4l[70.060]: rms 8 max 13 freq +30846 +/- 10 delay 216 +/- 0 ptp4l[71.063]: rms 9 max 15 freq +30836 +/- 8 delay 218 +/- 0 After applying this patch (CDC syncrhonization error is taken care of): ptp4l[61.516]: rms 773 max 824 freq +31526 +/- 158 delay 200 +/- 0 ptp4l[62.519]: rms 427 max 596 freq +31668 +/- 39 delay 198 +/- 0 ptp4l[63.522]: rms 113 max 206 freq +31482 +/- 57 delay 198 +/- 0 ptp4l[64.525]: rms 40 max 56 freq +31316 +/- 29 delay 200 +/- 0 ptp4l[65.528]: rms 47 max 56 freq +31255 +/- 17 delay 200 +/- 0 ptp4l[66.531]: rms 26 max 36 freq +31246 +/- 9 delay 200 +/- 0 ptp4l[67.534]: rms 12 max 18 freq +31254 +/- 12 delay 202 +/- 0 ptp4l[68.537]: rms 7 max 12 freq +31263 +/- 10 delay 202 +/- 0 Signed-off-by: Voon Weifeng Signed-off-by: Wong Vee Khee Signed-off-by: David S. Miller commit 04a80a75baa1c80f7e5096147b6173c13ca3d3e0 Author: Aswath Govindraju Date: Wed Mar 17 10:00:06 2021 +0530 arm64: dts: ti: k3-am642-evm: Add USB support AM64 EVM board has a micro USB 2.0 AB connector and the USB0_VBUS is connected with a resistor divider in between. USB0_DRVVBUS pin is muxed between USB0_DRVVBUS and GPIO1_79 signals. Add the corresponding properties and set the pinmux mode for USB subsystem in the evm dts file. Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Kishon Vijay Abraham I Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20210317043007.18272-3-a-govindraju@ti.com commit d06a661309d30b654b74a4633dd78804ef16369f Author: Aswath Govindraju Date: Wed Mar 17 10:00:05 2021 +0530 arm64: dts: ti: k3-am64-main: Add DT node for USB subsystem Add DT node for the single USB subsystem in main dtsi file. Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Kishon Vijay Abraham I Acked-by: Roger Quadros Link: https://lore.kernel.org/r/20210317043007.18272-2-a-govindraju@ti.com commit b7d5e2973e153053dc2689f03dc0d46acf7fcc67 Merge: 5c9e418b0616c 5c8349503d007 Author: David S. Miller Date: Wed Mar 17 11:51:05 2021 -0700 Merge branch 'tipc-cleanups-and-simplifications' Jon Maloy says: ==================== tipc: cleanups and simplifications We do a number of cleanups and simplifications, especially regarding call signatures in the binding table. This makes the code easier to understand and serves as preparation for upcoming functional additions. ==================== Signed-off-by: David S. Miller commit 5c8349503d007f9fa46e90b58f48b60830d6e47d Author: Jon Maloy Date: Tue Mar 16 22:06:23 2021 -0400 tipc: remove some unnecessary warnings We move some warning printouts to more strategic locations to avoid duplicates and yield more detailed information about the reported problem. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 429189acac534378cee113b16fe3f18effac1697 Author: Jon Maloy Date: Tue Mar 16 22:06:22 2021 -0400 tipc: add host-endian copy of user subscription to struct tipc_subscription We reduce and localize the usage of the tipc_sub_xx() macros by adding a corresponding member, with fields set in host-endian format, to struct tipc_subscription. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 09f78b851ea332a67ebaf7b4463a80a4d0d3d747 Author: Jon Maloy Date: Tue Mar 16 22:06:21 2021 -0400 tipc: simplify api between binding table and topology server The function tipc_report_overlap() is called from the binding table with numerous parameters taken from an instance of struct publication. A closer look reveals that it always is safe to send along a pointer to the instance itself, and hence reduce the call signature. We do that in this commit. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 6e44867b01e6998ce4c997dc7921d0fb157c3661 Author: Jon Maloy Date: Tue Mar 16 22:06:20 2021 -0400 tipc: simplify signature of tipc_find_service() We reduce the signature of tipc_find_service() and tipc_create_service(). The reason for doing this might not be obvious, but we plan to let struct tipc_uaddr contain information that is relevant for these functions in a later commit. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 13c9d23f6ac3fa05f1e4f485c1873748912c1d23 Author: Jon Maloy Date: Tue Mar 16 22:06:19 2021 -0400 tipc: simplify signature of tipc_service_find_range() We simplify the signatures of the functions tipc_service_create_range() and tipc_service_find_range(). Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 006ed14ef82b26605bdc8e2706235e2723d825d3 Author: Jon Maloy Date: Tue Mar 16 22:06:18 2021 -0400 tipc: simplify signature of tipc_nametbl_lookup_group() We reduce the signature of tipc_nametbl_lookup_group() by using a struct tipc_uaddr pointer. This entails a couple of minor changes in the functions tipc_send_group_mcast/anycast/unicast/bcast() in socket.c Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 833f867089e5fa8dc67c06d4abb51a256e53416c Author: Jon Maloy Date: Tue Mar 16 22:06:17 2021 -0400 tipc: simplify signature of tipc_nametbl_lookup_mcast_nodes() We follow up the preceding commits by reducing the signature of the function tipc_nametbl_lookup_mcast_nodes(). Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 45ceea2d403b811cb67cff59cfb395deeda733be Author: Jon Maloy Date: Tue Mar 16 22:06:16 2021 -0400 tipc: simplify signature of tipc_namtbl_lookup_mcast_sockets() We reduce the signature of this function according to the same principle as the preceding commits. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 908148bc5046e3503f2758d1d94c43766958d5be Author: Jon Maloy Date: Tue Mar 16 22:06:15 2021 -0400 tipc: refactor tipc_sendmsg() and tipc_lookup_anycast() We simplify the signature if function tipc_nametbl_lookup_anycast(), using address structures instead of discrete integers. This also makes it possible to make some improvements to the functions __tipc_sendmsg() in socket.c and tipc_msg_lookup_dest() in msg.c. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 66db239c4894be1016c3b1afae8e136c28c2da06 Author: Jon Maloy Date: Tue Mar 16 22:06:14 2021 -0400 tipc: rename binding table lookup functions The binding table provides four different lookup functions, which purpose is not obvious neither by their names nor by the (lack of) descriptions. We now give these functions names that better match their purposes, and improve the comments that describe what they are doing. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 2c98da0790634d0ec08ff7856769ffb56ca7c469 Author: Jon Maloy Date: Tue Mar 16 22:06:13 2021 -0400 tipc: simplify signature of tipc_nametbl_withdraw() functions Following the principles of the preceding commits, we reduce the number of parameters passed along in tipc_sk_withdraw(), tipc_nametbl_withdraw() and associated functions. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit a45ffa68573e97fdced4b08aef19efda555f18bc Author: Jon Maloy Date: Tue Mar 16 22:06:12 2021 -0400 tipc: simplify call signatures for publication creation We simplify the call signatures for tipc_nametbl_insert_publ() and tipc_publ_create() so that fewer parameters are passed around. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 50a3499ab853acd5ae5056231a576637af1bed8d Author: Jon Maloy Date: Tue Mar 16 22:06:11 2021 -0400 tipc: simplify signature of tipc_namtbl_publish() Using the new address structure tipc_uaddr, we simplify the signature of function tipc_sk_publish() and tipc_namtbl_publish() so that fewer parameters need to be passed around. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 7823f04f34b89ae65de612adf40b314a61969bf0 Author: Jon Maloy Date: Tue Mar 16 22:06:10 2021 -0400 tipc: introduce new unified address type for internal use We introduce a simplified version of struct sockaddr_tipc, using anonymous unions and structures. Apart from being nicer to work with, this struct will come in handy when we in a later commit add another address type. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit b26b5aa9cebe336028421b0641ed762fef81d178 Author: Jon Maloy Date: Tue Mar 16 22:06:09 2021 -0400 tipc: move creation of publication item one level up in call chain We instantiate struct publication in tipc_nametbl_insert_publ() instead of as currently in tipc_service_insert_publ(). This has the advantage that we can pass a pointer to the publication struct to the next call levels, instead of the numerous individual parameters we pass on now. It also gives us a location to keep the contents of the additional fields we will introduce in a later commit. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 998d3907f419ed5c27728161d34f5ed14be53fc0 Author: Jon Maloy Date: Tue Mar 16 22:06:08 2021 -0400 tipc: re-organize members of struct publication In a future commit we will introduce more members to struct publication. In order to keep this structure comprehensible we now group some of its current fields into the sub-structures where they really belong, - A struct tipc_service_range for the functional address the publication is representing. - A struct tipc_socket_addr for the socket bound to that service range. We also rename the stack variable 'publ' to just 'p' in a few places. This is just as easy to understand in the given context, and keeps the number of wrapped code lines to a minimum. There are no functional changes in this commit. Signed-off-by: Jon Maloy Acked-by: Ying Xue Acked-by: Hoang Le Acked-by: Tung Nguyen Acked-by: Xin Long Signed-off-by: David S. Miller commit 5c9e418b0616cfdc2dd2de99e8d6d8deb1f213eb Merge: 0c88eda9f5590 acebe5b6107c7 Author: David S. Miller Date: Wed Mar 17 11:42:31 2021 -0700 Merge branch 'ethtool-strings' Alexander Duyck says: ==================== ethtool: Factor out common code related to writing ethtool strings This patch set is meant to be a cleanup and refactoring of common code bits from several drivers. Specificlly a number of drivers engage in a pattern where they will use some variant on an sprintf or memcpy to write a string into the ethtool string array and then they will increment their pointer by ETH_GSTRING_LEN. Instead of having each driver implement this independently I am refactoring the code so that we have one central function, ethtool_sprintf that does all this and takes a double pointer to access the data, a formatted string to print, and the variable arguments that are associated with the string. Changes from v1: Fixed usage of char ** vs unsigned char ** in hisilicon drivers Changes from RFC: Renamed ethtool_gsprintf to ethtool_sprintf Fixed reverse xmas tree issue in patch 2 ==================== Reviewed-by: Jesse Brandeburg Signed-off-by: David S. Miller commit acebe5b6107c73aade7f3beca441329ff04823a3 Author: Alexander Duyck Date: Tue Mar 16 17:31:55 2021 -0700 ionic: Update driver to use ethtool_sprintf Update the ionic driver to make use of ethtool_sprintf. In addition add separate functions for Tx/Rx stats strings in order to reduce the total amount of indenting needed in the driver code. Acked-by: Shannon Nelson Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit b82e8118c540cc0d1e3f542bad2e492b600b4a7e Author: Alexander Duyck Date: Tue Mar 16 17:31:46 2021 -0700 bna: Update driver to use ethtool_sprintf Update the bnad_get_strings to make use of ethtool_sprintf and avoid unnecessary line wrapping. To do this we invert the logic for the string set test and instead exit immediately if we are not working with the stats strings. In addition the function is broken up into subfunctions for each area so that we can simply call ethtool_sprintf once for each string in a given subsection. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit 3b78b3067f386e5943a30112f866cd65b3de2d8b Author: Alexander Duyck Date: Tue Mar 16 17:31:37 2021 -0700 vmxnet3: Update driver to use ethtool_sprintf So this patch actually does 3 things. First it removes a stray white space at the start of the variable declaration in vmxnet3_get_strings. Second it flips the logic for the string test so that we exit immediately if we are not looking for the stats strings. Doing this we can avoid unnecessary indentation and line wrapping. Then finally it updates the code to use ethtool_sprintf rather than a memcpy and pointer increment to write the ethtool strings. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit d7a9a01b4e21b9c49559c7e66e6c0dbc7417b7fe Author: Alexander Duyck Date: Tue Mar 16 17:31:29 2021 -0700 virtio_net: Update driver to use ethtool_sprintf Update the code to replace instances of snprintf and a pointer update with just calling ethtool_sprintf. Also replace the char pointer with a u8 pointer to avoid having to recast the pointer type. Acked-by: Michael S. Tsirkin Acked-by: Jason Wang Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit 3ae0ed376d1c2981715c540ba7ad3bf43fec244c Author: Alexander Duyck Date: Tue Mar 16 17:31:20 2021 -0700 netvsc: Update driver to use ethtool_sprintf Replace instances of sprintf or memcpy with a pointer update with ethtool_sprintf. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit efbbe4fb5976bfbba2ac3dbfe52505690e4993c3 Author: Alexander Duyck Date: Tue Mar 16 17:31:11 2021 -0700 ena: Update driver to use ethtool_sprintf Replace instances of snprintf or memcpy with a pointer update with ethtool_sprintf. Acked-by: Arthur Kiyanovski Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit 83cd23974a73b2c8f91983b7130581211aa13522 Author: Alexander Duyck Date: Tue Mar 16 17:31:03 2021 -0700 hisilicon: Update drivers to use ethtool_sprintf Update the hisilicon drivers to make use of ethtool_sprintf. The general idea is to reduce code size and overhead by replacing the repeated pattern of string printf statements and ETH_STRING_LEN counter increments. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit 6a143a7cf94730f57544ea14a987dc025364dbb8 Author: Alexander Duyck Date: Tue Mar 16 17:30:53 2021 -0700 nfp: Replace nfp_pr_et with ethtool_sprintf The nfp_pr_et function is nearly identical to ethtool_sprintf except for the fact that it passes the pointer by value and as a return whereas ethtool_sprintf passes it as a pointer. Since they are so close just update nfp to make use of ethtool_sprintf Reviewed-by: Simon Horman Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit c8d4725e985da50979918f57db137e03cb6c55e8 Author: Alexander Duyck Date: Tue Mar 16 17:30:44 2021 -0700 intel: Update drivers to use ethtool_sprintf Update the Intel drivers to make use of ethtool_sprintf. The general idea is to reduce code size and overhead by replacing the repeated pattern of string printf statements and ETH_STRING_LEN counter increments. Signed-off-by: Alexander Duyck Acked-by: Jesse Brandeburg Signed-off-by: David S. Miller commit 7888fe53b7066c284e172d98d98d1865d6a9e5a0 Author: Alexander Duyck Date: Tue Mar 16 17:30:36 2021 -0700 ethtool: Add common function for filling out strings Add a function to handle the common pattern of printing a string into the ethtool strings interface and incrementing the string pointer by the ETH_GSTRING_LEN. Most of the drivers end up doing this and several have implemented their own versions of this function so it would make sense to consolidate on one implementation. Signed-off-by: Alexander Duyck Signed-off-by: David S. Miller commit 0c88eda9f5590eac0ac7e1963dd1f35b25b39c62 Merge: ebfbc46b35cb7 7dc84de98babc Author: David S. Miller Date: Wed Mar 17 11:22:39 2021 -0700 Merge tag 'mlx5-updates-2021-03-16' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-03-16 mlx5 uplink representor netdev persistence. Before this patchset we used to have separate netdevs for Native NIC mode and Switchdev mode (uplink representor netdev), meaning that if user switches modes between Native to Switchdev and vice versa, the driver would cleanup the current netdev representor and create a new one for the new mode, such behavior created an administrative nightmare for users, where users need to be aware of such loss of both data path and control path configurations, e.g. netdev attributes and arp/route tables, where the later is more painful. A simple solution for this is not to replace the netdev in first place and use a single netdev to serve the uplink/physical port whether it is in switchdev mode or native mode. We already have different HW profiles for each netdev mode, in this series we just replace the HW profile on the fly and we keep the same netdev attached. Refactoring: Some refactoring has been made to overcome some technical difficulties 1) The netdev is created with the maximum amount of tx/rx queues to serve the two profiles. 2) Some ndos are not supported in some modes, so we added a mode check for such cases, e.g legacy sriov ndos must be blocked in switchdev mode. 3) Some mlx5 netdev private attributes need to be moved out of profiles and kept in a persistent place, where the netdev is created e.g devlink port and other global HW resources 4) The netdev devlink port is now always registered with the switch id Implementation: the last three patches implement the mechanism now as the netdev can be shared. 5) Don't recreate the netdev on switchdev mode changes 6) Prevent changing switchdev mode when some netdev operations are active, mostly when TC rules are being processed. This is required since the netdev is kept registered while switchdev mode can be changed. ==================== Signed-off-by: David S. Miller commit fa3134262eb87d0020c8aa9069073ffb9a9fc74d Author: Maximilian Luz Date: Tue Mar 9 17:25:50 2021 +0100 platform/surface: aggregator_registry: Add support for Surface Pro 7+ The Surface Pro 7+ is essentially a refresh of the Surface Pro 7 with updated hardware and a new WSID identifier. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210309162550.302161-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 41fff61d99c1b64136148336c6b46a04de692198 Author: Wei Yongjun Date: Tue Mar 9 13:15:00 2021 +0000 platform/surface: aggregator_registry: Make symbol 'ssam_base_hub_group' static The sparse tool complains as follows: drivers/platform/surface/surface_aggregator_registry.c:355:30: warning: symbol 'ssam_base_hub_group' was not declared. Should it be static? This symbol is not used outside of surface_aggregator_registry.c, so this commit marks it static. Fixes: 797e78564634 ("platform/surface: aggregator_registry: Add base device hub") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Maximilian Luz Link: https://lore.kernel.org/r/20210309131500.1885772-1-weiyongjun1@huawei.com Signed-off-by: Hans de Goede commit f614a1e23a0f7250324c3161d60f0f21cae44dbd Author: Maximilian Luz Date: Mon Mar 8 19:48:19 2021 +0100 docs: driver-api: Add Surface DTX driver documentation Add documentation for the user-space interface of the Surface DTX (detachment system) driver, used on Microsoft Surface Book series devices. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210308184819.437438-4-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit e893d45f11032e61ed5171caea76f689219447ff Author: Maximilian Luz Date: Mon Mar 8 19:48:18 2021 +0100 platform/surface: dtx: Add support for native SSAM devices Add support for native SSAM devices to the DTX driver. This allows support for the Surface Book 3, on which the DTX device is not present in ACPI. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210308184819.437438-3-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 1d609992832e900378b305f9f8dcf0ce8473049e Author: Maximilian Luz Date: Mon Mar 8 19:48:17 2021 +0100 platform/surface: Add DTX driver The Microsoft Surface Book series devices consist of a so-called clipboard part (containing the CPU, touchscreen, and primary battery) and a base part (containing keyboard, secondary battery, and optional discrete GPU). These parts can be separated, i.e. the clipboard can be detached and used as tablet. This detachment process is initiated by pressing a button. On the Surface Book 2 and 3 (targeted with this commit), the Surface Aggregator Module (i.e. the embedded controller on those devices) attempts to send a notification to any listening client driver and waits for further instructions (i.e. whether the detachment process should continue or be aborted). If it does not receive a response in a certain time-frame, the detachment process (by default) continues and the clipboard can be physically separated. In other words, (by default and) without a driver, the detachment process takes about 10 seconds to complete. This commit introduces a driver for this detachment system (called DTX). This driver allows a user-space daemon to control and influence the detachment behavior. Specifically, it forwards any detachment requests to user-space, allows user-space to make such requests itself, and allows handling of those requests. Requests can be handled by either aborting, continuing/allowing, or delaying (i.e. resetting the timeout via a heartbeat commend). The user-space API is implemented via the /dev/surface/dtx miscdevice. In addition, user-space can change the default behavior on timeout from allowing detachment to disallowing it, which is useful if the (optional) discrete GPU is in use. Furthermore, this driver allows user-space to receive notifications about the state of the base, specifically when it is physically removed (as opposed to detachment requested), in what manner it is connected (i.e. in reverse-/tent-/studio- or laptop-mode), and what type of base is connected. Based on this information, the driver also provides a simple tablet-mode switch (aliasing all modes without keyboard access, i.e. tablet-mode and studio-mode to its reported tablet-mode). An implementation of such a user-space daemon, allowing configuration of detachment behavior via scripts (e.g. safely unmounting USB devices connected to the base before continuing) can be found at [1]. [1]: https://github.com/linux-surface/surface-dtx-daemon Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210308184819.437438-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 57097276d567818ffca4cde43139f511efc7880b Author: Jani Nikula Date: Mon Mar 8 15:56:38 2021 +0200 drm/i915: remove unused ADLS_REVID_* macros It's the adls_revid_step_tbl array indexes that matter. Reviewed-by: Lucas De Marchi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/996274d28cf939186a748b4714872b1c31b23adb.1615211711.git.jani.nikula@intel.com commit 0412120153d44410cc47b70f89a183bcd611d282 Author: Yongqiang Niu Date: Fri Jan 29 17:22:08 2021 +0800 soc: mediatek: add mtk mutex support for MT8183 Add mtk mutex support for MT8183 SoC. Signed-off-by: Yongqiang Niu Signed-off-by: Hsin-Yi Wang Reviewed-by: CK Hu Link: https://lore.kernel.org/r/20210129092209.2584718-8-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit ba9e6cab49c1465c2c322dcb03d771d5cbecb692 Author: Thomas Gleixner Date: Tue Mar 9 09:55:58 2021 +0100 rcu: Prevent false positive softirq warning on RT Soft interrupt disabled sections can legitimately be preempted or schedule out when blocking on a lock on RT enabled kernels so the RCU preempt check warning has to be disabled for RT kernels. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Tested-by: Paul E. McKenney Reviewed-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309085727.626304079@linutronix.de commit 47c218dcae6587fb5bce30f1656b13e22391c8e3 Author: Thomas Gleixner Date: Tue Mar 9 09:55:57 2021 +0100 tick/sched: Prevent false positive softirq pending warnings on RT On RT a task which has soft interrupts disabled can block on a lock and schedule out to idle while soft interrupts are pending. This triggers the warning in the NOHZ idle code which complains about going idle with pending soft interrupts. But as the task is blocked soft interrupt processing is temporarily blocked as well which means that such a warning is a false positive. To prevent that check the per CPU state which indicates that a scheduled out task has soft interrupts disabled. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Tested-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309085727.527563866@linutronix.de commit 8b1c04acad082dec76f3f8f7e1fa13493d6cbb79 Author: Thomas Gleixner Date: Tue Mar 9 09:55:56 2021 +0100 softirq: Make softirq control and processing RT aware Provide a local lock based serialization for soft interrupts on RT which allows the local_bh_disabled() sections and servicing soft interrupts to be preemptible. Provide the necessary inline helpers which allow to reuse the bulk of the softirq processing code. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Tested-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309085727.426370483@linutronix.de commit f02fc963e91160e7343933823e8b73a0b2ab0a16 Author: Thomas Gleixner Date: Tue Mar 9 09:55:55 2021 +0100 softirq: Move various protections into inline helpers To allow reuse of the bulk of softirq processing code for RT and to avoid #ifdeffery all over the place, split protections for various code sections out into inline helpers so the RT variant can just replace them in one go. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Tested-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309085727.310118772@linutronix.de commit 6516b386d8a07102aac353daf9c0fe0045faeb74 Author: Thomas Gleixner Date: Tue Mar 9 09:55:54 2021 +0100 irqtime: Make accounting correct on RT vtime_account_irq and irqtime_account_irq() base checks on preempt_count() which fails on RT because preempt_count() does not contain the softirq accounting which is seperate on RT. These checks do not need the full preempt count as they only operate on the hard and softirq sections. Use irq_count() instead which provides the correct value on both RT and non RT kernels. The compiler is clever enough to fold the masking for !RT: 99b: 65 8b 05 00 00 00 00 mov %gs:0x0(%rip),%eax - 9a2: 25 ff ff ff 7f and $0x7fffffff,%eax + 9a2: 25 00 ff ff 00 and $0xffff00,%eax Reported-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Tested-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309085727.153926793@linutronix.de commit 728b478d2d358480b333b42d0e10e0fecb20114c Author: Thomas Gleixner Date: Tue Mar 9 09:55:53 2021 +0100 softirq: Add RT specific softirq accounting RT requires the softirq processing and local bottomhalf disabled regions to be preemptible. Using the normal preempt count based serialization is therefore not possible because this implicitely disables preemption. RT kernels use a per CPU local lock to serialize bottomhalfs. As local_bh_disable() can nest the lock can only be acquired on the outermost invocation of local_bh_disable() and released when the nest count becomes zero. Tasks which hold the local lock can be preempted so its required to keep track of the nest count per task. Add a RT only counter to task struct and adjust the relevant macros in preempt.h. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Tested-by: Paul E. McKenney Reviewed-by: Frederic Weisbecker Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309085726.983627589@linutronix.de commit 6fd4e861250b5c89ad460a9f265caeb1bbbfc323 Author: Thomas Gleixner Date: Tue Mar 9 09:42:17 2021 +0100 tasklets: Switch tasklet_disable() to the sleep wait variant -- NOT FOR IMMEDIATE MERGING -- Now that all users of tasklet_disable() are invoked from sleepable context, convert it to use tasklet_unlock_wait() which might sleep. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084242.726452321@linutronix.de commit f339fc16fba0167d67c4026678ef4c405bca3085 Author: Sebastian Andrzej Siewior Date: Tue Mar 9 09:42:16 2021 +0100 firewire: ohci: Use tasklet_disable_in_atomic() where required tasklet_disable() is invoked in several places. Some of them are in atomic context which prevents a conversion of tasklet_disable() to a sleepable function. The atomic callchains are: ar_context_tasklet() ohci_cancel_packet() tasklet_disable() ... ohci_flush_iso_completions() tasklet_disable() The invocation of tasklet_disable() from at_context_flush() is always in preemptible context. Use tasklet_disable_in_atomic() for the two invocations in ohci_cancel_packet() and ohci_flush_iso_completions(). Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084242.616379058@linutronix.de commit be4017cea0aec6369275df7eafbb09682f810e7e Author: Sebastian Andrzej Siewior Date: Tue Mar 9 09:42:15 2021 +0100 PCI: hv: Use tasklet_disable_in_atomic() The hv_compose_msi_msg() callback in irq_chip::irq_compose_msi_msg is invoked via irq_chip_compose_msi_msg(), which itself is always invoked from atomic contexts from the guts of the interrupt core code. There is no way to change this w/o rewriting the whole driver, so use tasklet_disable_in_atomic() which allows to make tasklet_disable() sleepable once the remaining atomic users are addressed. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Wei Liu Acked-by: Bjorn Helgaas Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084242.516519290@linutronix.de commit 405698ca359a23b1ef1a502ef2bdc4597dc6da36 Author: Sebastian Andrzej Siewior Date: Tue Mar 9 09:42:14 2021 +0100 atm: eni: Use tasklet_disable_in_atomic() in the send() callback The atmdev_ops::send callback which calls tasklet_disable() is invoked with bottom halfs disabled from net_device_ops::ndo_start_xmit(). All other invocations of tasklet_disable() in this driver happen in preemptible context. Change the send() call to use tasklet_disable_in_atomic() which allows tasklet_disable() to be made sleepable once the remaining atomic context usage sites are cleaned up. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084242.415583839@linutronix.de commit 3250aa8a293b1859d76577714a3e1fe95732c721 Author: Sebastian Andrzej Siewior Date: Tue Mar 9 09:42:13 2021 +0100 ath9k: Use tasklet_disable_in_atomic() All callers of ath9k_beacon_ensure_primary_slot() are preemptible / acquire a mutex except for this callchain: spin_lock_bh(&sc->sc_pcu_lock); ath_complete_reset() -> ath9k_calculate_summary_state() -> ath9k_beacon_ensure_primary_slot() It's unclear how that can be distangled, so use tasklet_disable_in_atomic() for now. This allows tasklet_disable() to become sleepable once the remaining atomic users are cleaned up. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Kalle Valo Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084242.313899703@linutronix.de commit 25cf87df1a3a85959bf1bf27df0eb2e6e04b2161 Author: Sebastian Andrzej Siewior Date: Tue Mar 9 09:42:12 2021 +0100 net: sundance: Use tasklet_disable_in_atomic(). tasklet_disable() is used in the timer callback. This might be distangled, but without access to the hardware that's a bit risky. Replace it with tasklet_disable_in_atomic() so tasklet_disable() can be changed to a sleep wait once all remaining atomic users are converted. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084242.209110861@linutronix.de commit c62c38e349c73cad90f59f00fe8070b3648b6d08 Author: Sebastian Andrzej Siewior Date: Tue Mar 9 09:42:11 2021 +0100 net: jme: Replace link-change tasklet with work The link change tasklet disables the tasklets for tx/rx processing while upating hw parameters and then enables the tasklets again. This update can also be pushed into a workqueue where it can be performed in preemptible context. This allows tasklet_disable() to become sleeping. Replace the linkch_task tasklet with a work. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084242.106288922@linutronix.de commit eb2dafbba8b824ee77f166629babd470dd0b1c0a Author: Thomas Gleixner Date: Tue Mar 9 09:42:10 2021 +0100 tasklets: Prevent tasklet_unlock_spin_wait() deadlock on RT tasklet_unlock_spin_wait() spin waits for the TASKLET_STATE_SCHED bit in the tasklet state to be cleared. This works on !RT nicely because the corresponding execution can only happen on a different CPU. On RT softirq processing is preemptible, therefore a task preempting the softirq processing thread can spin forever. Prevent this by invoking local_bh_disable()/enable() inside the loop. In case that the softirq processing thread was preempted by the current task, current will block on the local lock which yields the CPU to the preempted softirq processing thread. If the tasklet is processed on a different CPU then the local_bh_disable()/enable() pair is just a waste of processor cycles. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084241.988908275@linutronix.de commit 697d8c63c4a2991a22a896a5e6adcdbb28fefe56 Author: Peter Zijlstra Date: Tue Mar 9 09:42:09 2021 +0100 tasklets: Replace spin wait in tasklet_kill() tasklet_kill() spin waits for TASKLET_STATE_SCHED to be cleared invoking yield() from inside the loop. yield() is an ill defined mechanism and the result might still be wasting CPU cycles in a tight loop which is especially painful in a guest when the CPU running the tasklet is scheduled out. tasklet_kill() is used in teardown paths and not performance critical at all. Replace the spin wait with wait_var_event(). Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084241.890532921@linutronix.de commit da044747401fc16202e223c9da970ed4e84fd84d Author: Peter Zijlstra Date: Tue Mar 9 09:42:08 2021 +0100 tasklets: Replace spin wait in tasklet_unlock_wait() tasklet_unlock_wait() spin waits for TASKLET_STATE_RUN to be cleared. This is wasting CPU cycles in a tight loop which is especially painful in a guest when the CPU running the tasklet is scheduled out. tasklet_unlock_wait() is invoked from tasklet_kill() which is used in teardown paths and not performance critical at all. Replace the spin wait with wait_var_event(). There are no users of tasklet_unlock_wait() which are invoked from atomic contexts. The usage in tasklet_disable() has been replaced temporarily with the spin waiting variant until the atomic users are fixed up and will be converted to the sleep wait variant later. Signed-off-by: Peter Zijlstra Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084241.783936921@linutronix.de commit b0cd02c2a9494dbf0a1cc7dc7a3b8b400c158d37 Author: Thomas Gleixner Date: Tue Mar 9 09:42:07 2021 +0100 tasklets: Use spin wait in tasklet_disable() temporarily To ease the transition use spin waiting in tasklet_disable() until all usage sites from atomic context have been cleaned up. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084241.685352806@linutronix.de commit ca5f625118955fc544c3cb3dee7055d33ecadafb Author: Thomas Gleixner Date: Tue Mar 9 09:42:06 2021 +0100 tasklets: Provide tasklet_disable_in_atomic() Replacing the spin wait loops in tasklet_unlock_wait() with wait_var_event() is not possible as a handful of tasklet_disable() invocations are happening in atomic context. All other invocations are in teardown paths which can sleep. Provide tasklet_disable_in_atomic() and tasklet_unlock_spin_wait() to convert the few atomic use cases over, which allows to change tasklet_disable() and tasklet_unlock_wait() in a later step. Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084241.563164193@linutronix.de commit 6951547a1399c8f56468ed93bea8f769b891aec3 Author: Thomas Gleixner Date: Tue Mar 9 09:42:05 2021 +0100 tasklets: Use static inlines for stub implementations Inlines exist for a reason. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084241.407702697@linutronix.de commit d2da74d1278a1b51ef18beafa9da770f0db1c617 Author: Thomas Gleixner Date: Tue Mar 9 09:42:04 2021 +0100 tasklets: Replace barrier() with cpu_relax() in tasklet_unlock_wait() A barrier() in a tight loop which waits for something to happen on a remote CPU is a pointless exercise. Replace it with cpu_relax() which allows HT siblings to make progress. Signed-off-by: Thomas Gleixner Tested-by: Sebastian Andrzej Siewior Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210309084241.249343366@linutronix.de commit 90f093fa8ea48e5d991332cee160b761423d55c1 Author: Piotr Figiel Date: Fri Feb 26 14:51:56 2021 +0100 rseq, ptrace: Add PTRACE_GET_RSEQ_CONFIGURATION request For userspace checkpoint and restore (C/R) a way of getting process state containing RSEQ configuration is needed. There are two ways this information is going to be used: - to re-enable RSEQ for threads which had it enabled before C/R - to detect if a thread was in a critical section during C/R Since C/R preserves TLS memory and addresses RSEQ ABI will be restored using the address registered before C/R. Detection whether the thread is in a critical section during C/R is needed to enforce behavior of RSEQ abort during C/R. Attaching with ptrace() before registers are dumped itself doesn't cause RSEQ abort. Restoring the instruction pointer within the critical section is problematic because rseq_cs may get cleared before the control is passed to the migrated application code leading to RSEQ invariants not being preserved. C/R code will use RSEQ ABI address to find the abort handler to which the instruction pointer needs to be set. To achieve above goals expose the RSEQ ABI address and the signature value with the new ptrace request PTRACE_GET_RSEQ_CONFIGURATION. This new ptrace request can also be used by debuggers so they are aware of stops within restartable sequences in progress. Signed-off-by: Piotr Figiel Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner Reviewed-by: Michal Miroslaw Reviewed-by: Mathieu Desnoyers Acked-by: Oleg Nesterov Link: https://lkml.kernel.org/r/20210226135156.1081606-1-figiel@google.com commit fa8b90070a80bb1a3042b4b25af4b3ee2c4c27e1 Author: Sascha Hauer Date: Thu Mar 4 13:35:40 2021 +0100 quota: wire up quotactl_path Wire up the quotactl_path syscall added in the previous patch. Link: https://lore.kernel.org/r/20210304123541.30749-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 87df8bcccd2cede62dfb97dc3d4ca1fe66cb4f83 Author: Ayush Garg Date: Wed Mar 17 16:52:14 2021 +0530 Bluetooth: Fix incorrect status handling in LE PHY UPDATE event Skip updation of tx and rx PHYs values, when PHY Update event's status is not successful. Signed-off-by: Ayush Garg Signed-off-by: Marcel Holtmann commit a6cb06ff49fd522aaeecfee7d5952ac6e2ab9d13 Author: Ian Rogers Date: Tue Mar 16 17:55:05 2021 -0700 perf test: Add 30s timeout for wait for daemon start. Retry the ping loop upto 600 times, or approximately 30 seconds, to make sure the test does hang at start up. Signed-off-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/20210317005505.2794804-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 078cbb6f75f16a16fb843a431e83c2f92605bb75 Author: Ian Rogers Date: Tue Mar 16 17:55:04 2021 -0700 perf test: Cleanup daemon if test is interrupted. Reorder daemon_start and daemon_exit as the trap handler is added in daemon_start referencing daemon_exit. Signed-off-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/20210317005505.2794804-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 87cb88d3c00275d7dfd695b2002eb53411a53cfa Author: Ian Rogers Date: Tue Mar 16 17:55:03 2021 -0700 perf test: Remove unused argument Remove unused argument from daemon_exit. Signed-off-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/20210317005505.2794804-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 92bad4a4c755cdf286f6b303dd482a573f2b89e6 Author: Fabio Estevam Date: Tue Mar 16 15:09:22 2021 -0300 spi: imx: Improve driver description "SPI Controller driver" is a too generic description. Make it i.MX specific instead. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210316180922.239805-1-festevam@gmail.com Signed-off-by: Mark Brown commit 9d902c2a9a258e1e17cfcce7ea558b1c427b2757 Author: Colin Ian King Date: Wed Mar 17 09:39:36 2021 +0000 spi: Fix spelling mistake "softwade" -> "software" There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210317093936.5572-1-colin.king@canonical.com Signed-off-by: Mark Brown commit c00f4f2598d334470b49385f811ca8f5c966a63e Author: Bhaskar Chowdhury Date: Wed Mar 17 13:50:42 2021 +0530 ASoC: ti: Fix a typo in the file ams-delta.c s/functonality/functionality/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210317082042.3670745-1-unixbhaskar@gmail.com Signed-off-by: Mark Brown commit 6b2c339df90788ce6aeecee78d6494f262929206 Author: Dirk Behme Date: Wed Mar 17 11:20:12 2021 +0100 softirq: s/BUG/WARN_ONCE/ on tasklet SCHED state not set Replace BUG() with WARN_ONCE() on wrong tasklet state, in order to: - increase the verbosity / aid in debugging - avoid fatal/unrecoverable state Suggested-by: Thomas Gleixner Signed-off-by: Dirk Behme Signed-off-by: Eugeniu Rosca Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210317102012.32399-1-erosca@de.adit-jv.com commit 4faf62b1ef1a9367f7dcf8b7ce509980dfdcee83 Author: Bhaskar Chowdhury Date: Wed Mar 17 09:48:06 2021 +0530 locking/rwsem: Fix comment typo s/folowing/following/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Ingo Molnar Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210317041806.4096156-1-unixbhaskar@gmail.com commit 764de1059b97ca1fe8fe023bb10e736772945c87 Author: Michael G. Katzmann Date: Tue Mar 16 13:17:00 2021 -0400 USB: serial: pl2303: TA & TB alternate divider with non-standard baud rates Use an alternate clock divider algorithm and bit ordering for the TA and TB versions of the pl2303. It was discovered that these variants do not produce the correct baud rates with the existing scheme. see https://lore.kernel.org/r/3aee5708-7961-f464-8c5f-6685d96920d6@IEEE.org Signed-off-by: Michael G. Katzmann Signed-off-by: Johan Hovold commit 8cbc753961e3afc71da527ec7f68ffdfc1f16a93 Author: Johan Hovold Date: Thu Mar 11 17:14:51 2021 +0100 USB: serial: pl2303: add device-type names Add names for the device types to be printed at probe when debugging is enabled. Note that the HXN type is referred to as G for now as that is the name the vendor uses. Signed-off-by: Johan Hovold commit 894758d0571de4675520540c9e093d7e0ed9aae6 Author: Johan Hovold Date: Thu Mar 11 17:14:50 2021 +0100 USB: serial: pl2303: tighten type HXN (G) detection Tighten the detection of the new HXN (G) type instead of assuming that every device which doesn't support the old read request is an HXN. Signed-off-by: Johan Hovold commit ca82f648d6d4f5cb21717d250bb08aa6b0bce660 Author: Johan Hovold Date: Thu Mar 11 17:14:49 2021 +0100 USB: serial: pl2303: rename legacy PL2303H type Rename the legacy type which is supposedly a PL2303H which came in two variants (and which we handle the same way). Signed-off-by: Johan Hovold commit 8a7bf7510d1f43994b39a677e561af4ee6a1a0ae Author: Johan Hovold Date: Thu Mar 11 17:14:48 2021 +0100 USB: serial: pl2303: amend and tighten type detection Add support for detecting the HX, TA, TB and HXD device types and refuse to bind to any unknown types. Note that the HX type includes the XA variant, while the HXD type includes the EA, RA and SA variants. Signed-off-by: Johan Hovold commit e5f48c812679ff46c8fe5e0c4a9f2881cb56ea1a Author: Johan Hovold Date: Thu Mar 11 17:14:47 2021 +0100 USB: serial: pl2303: clean up type detection Clean up the type detection somewhat in preparation for adding support for more types. Note this also fixes the type debug printk for the new HXN type. Signed-off-by: Johan Hovold commit a854fb61b8040c91d66cf2f725ec403567e888bf Author: Fabio Estevam Date: Mon Mar 15 09:35:31 2021 +0100 arm64: defconfig: Enable the Hantro decoder Enable the Hantro decoder driver so it can be enabled by default on i.MX8M and Rockchip platforms. Signed-off-by: Fabio Estevam Reviewed-by: Guido Günther Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 2ff8a1eeb5aa8bb471f3756a695b8b69841eb61f Author: Steen Hegelund Date: Thu Feb 18 17:14:50 2021 +0100 phy: Add Sparx5 ethernet serdes PHY driver Add the Microchip Sparx5 ethernet serdes PHY driver for the 6G, 10G and 25G interfaces available in the Sparx5 SoC. Signed-off-by: Bjarni Jonasson Signed-off-by: Steen Hegelund Reviewed-by: Andrew Lunn Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210218161451.3489955-4-steen.hegelund@microchip.com Signed-off-by: Vinod Koul commit 6c172e73690e59ba74ecf12139d841b8651693f8 Author: Steen Hegelund Date: Thu Feb 18 17:14:49 2021 +0100 phy: Add media type and speed serdes configuration interfaces Provide new phy configuration interfaces for media type and speed that allows e.g. PHYs used for ethernet to be configured with this information. Signed-off-by: Lars Povlsen Signed-off-by: Steen Hegelund Reviewed-by: Andrew Lunn Reviewed-by: Alexandre Belloni Acked-By: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210218161451.3489955-3-steen.hegelund@microchip.com Signed-off-by: Vinod Koul commit 13f99ac6c3586f030621e0b5f7bc598d6392d0a0 Author: Steen Hegelund Date: Thu Feb 18 17:14:48 2021 +0100 dt-bindings: phy: Add sparx5-serdes bindings Document the Sparx5 ethernet serdes phy driver bindings. Signed-off-by: Lars Povlsen Signed-off-by: Steen Hegelund Reviewed-by: Rob Herring Reviewed-by: Andrew Lunn Reviewed-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210218161451.3489955-2-steen.hegelund@microchip.com Signed-off-by: Vinod Koul commit febe5ba3178dc01738bed3c38bf176291859a60d Author: Seiya Wang Date: Tue Mar 16 19:14:41 2021 +0800 dt-bindings: phy: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of UFS M-Phy for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20210316111443.3332-9-seiya.wang@mediatek.com Signed-off-by: Vinod Koul commit 06c7af60e0e8b1e055eac57fd189ad2781dd4f21 Author: Seiya Wang Date: Tue Mar 16 19:14:40 2021 +0800 dt-bindings: phy: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of T-Phy for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20210316111443.3332-8-seiya.wang@mediatek.com Signed-off-by: Vinod Koul commit 5c932d16d5f25c46c0a33a75dbbf67e24077f8b2 Merge: d9de0cbd5b1f6 4709b21a0566b Author: Vinod Koul Date: Wed Mar 17 12:04:10 2021 +0530 Merge tag 'ti-serdes-for-5.13' into next TI Serdes changes for 5.13 commit 4709b21a0566bee2f00b1bd8fb926c08dd838438 Author: Kishon Vijay Abraham I Date: Wed Mar 10 16:57:45 2021 +0530 dt-bindings: ti-serdes-mux: Add defines for AM64 SoC AM64 has a single lane SERDES which can be configured to be used with either PCIe or USB. Define the possilbe values for the SERDES function in AM64 SoC here. Signed-off-by: Kishon Vijay Abraham I Acked-by: Peter Rosin Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210310112745.3445-4-kishon@ti.com Signed-off-by: Vinod Koul commit eaabb5595f99f357d8755573785ee62dbb649061 Author: Kishon Vijay Abraham I Date: Wed Mar 10 16:57:44 2021 +0530 dt-bindings: phy: cadence-torrent: Add binding for refclk driver Add binding for refclk driver used to route the refclk out of torrent SERDES. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210310112745.3445-3-kishon@ti.com Signed-off-by: Vinod Koul commit 6c363eafc4d637ac4bd83d4a7dd06dd3cfbe7c5f Author: Kishon Vijay Abraham I Date: Wed Mar 10 16:57:43 2021 +0530 dt-bindings: phy: ti,phy-j721e-wiz: Add bindings for AM64 SERDES Wrapper Add bindings for AM64 SERDES Wrapper. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210310112745.3445-2-kishon@ti.com Signed-off-by: Vinod Koul commit d6adc251dd2fede6aaaf6c39f7e4ad799eda3758 Author: Suganath Prabu S Date: Fri Mar 5 15:58:58 2021 +0530 scsi: mpt3sas: Force PCIe scatterlist allocations to be within same 4 GB region According to the MPI specification, PCIe SGL buffers can not cross a 4 GB boundary. While allocating, if any buffer crosses the 4 GB boundary, then: - Release the already allocated memory pools; and - Reallocate them by changing the DMA coherent mask to 32-bit Link: https://lore.kernel.org/r/20210305102904.7560-2-suganath-prabu.subramani@broadcom.com Signed-off-by: Suganath Prabu S Signed-off-by: Martin K. Petersen commit a1c4d7741323eff1d9c5baca8337ac3ac4630649 Author: Gustavo A. R. Silva Date: Wed Mar 10 17:59:51 2021 -0600 scsi: mpt3sas: Replace unnecessary dynamic allocation with a static one Dynamic memory allocation isn't actually needed and it can be replaced by statically allocating memory for struct object io_unit_pg3 with 36 hardcoded entries for its GPIOVal array. Also, this helps the with ongoing efforts to enable -Warray-bounds by fixing the following warning: drivers/scsi/mpt3sas/mpt3sas_ctl.c: In function ‘BRM_status_show’: drivers/scsi/mpt3sas/mpt3sas_ctl.c:3257:63: warning: array subscript 24 is above array bounds of ‘U16[1]’ {aka ‘short unsigned int[1]’} [-Warray-bounds] 3257 | backup_rail_monitor_status = le16_to_cpu(io_unit_pg3->GPIOVal[24]); ./include/uapi/linux/byteorder/little_endian.h:36:51: note: in definition of macro ‘__le16_to_cpu’ 36 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x)) | ^ drivers/scsi/mpt3sas/mpt3sas_ctl.c:3257:31: note: in expansion of macro ‘le16_to_cpu’ 3257 | backup_rail_monitor_status = le16_to_cpu(io_unit_pg3->GPIOVal[24]); Link: https://github.com/KSPP/linux/issues/109 Link: https://lore.kernel.org/lkml/202103101058.16ED27BE3@keescook/ Link: https://lore.kernel.org/r/20210310235951.GA108661@embeddedor Reviewed-by: Kees Cook Signed-off-by: Gustavo A. R. Silva Signed-off-by: Martin K. Petersen commit b2c57925df1ffc9c930629a39c1680035f735ffb Author: Adrian Hunter Date: Fri Mar 12 10:06:20 2021 +0200 scsi: ufs: ufs-pci: Add support for Intel LKF Add PCI ID and callbacks to support Intel LKF. This includes the ability to use an ACPI device-specific method (DSM) to perform a UFS device reset. Link: https://lore.kernel.org/r/20210312080620.13311-1-adrian.hunter@intel.com Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 4f5e51c0ebf04278081caa871b4186789bc98b1c Author: Caleb Connolly Date: Wed Mar 10 15:34:01 2021 +0000 scsi: ufs: core: Remove version check This check is redundant as all UFS versions are currently supported. Link: https://lore.kernel.org/r/20210310153215.371227-4-caleb@connolly.tech Reviewed-by: Bean Huo Co-developed-by: Nitin Rawat Signed-off-by: Nitin Rawat Signed-off-by: Caleb Connolly Signed-off-by: Martin K. Petersen commit f065aca20a2664fd94a3b4cb65eb6cf1e23f4f1b Author: Caleb Connolly Date: Wed Mar 10 15:33:51 2021 +0000 scsi: ufs: qcom: Use ufshci_version() function Replace the UFSHCI_VERSION_xy macros. Link: https://lore.kernel.org/r/20210310153215.371227-3-caleb@connolly.tech Reviewed-by: Bean Huo Signed-off-by: Caleb Connolly Signed-off-by: Martin K. Petersen commit 5142881801786a0658a8df16986b31e76a09760d Author: Caleb Connolly Date: Wed Mar 10 15:33:42 2021 +0000 scsi: ufs: core: Use a function to calculate versions Update the driver to use a function for referencing the UFS version. This replaces the UFSHCI_VERSION_xy macros, and supports comparisons where they did not. Link: https://lore.kernel.org/r/20210310153215.371227-2-caleb@connolly.tech Suggested-by: Christoph Hellwig Reviewed-by: Christoph Hellwig Reviewed-by: Bean Huo Signed-off-by: Caleb Connolly Signed-off-by: Martin K. Petersen commit 2a8561b78e377f48aa638d7cd203628b6dfc2519 Author: Yue Hu Date: Wed Mar 10 16:27:41 2021 +0800 scsi: ufs: core: Remove unnecessary ret in ufshcd_populate_vreg() The local variable 'ret' is always zero. Remove it and return 0 at the end of the function. Link: https://lore.kernel.org/r/20210310082741.647-1-zbestahu@gmail.com Signed-off-by: Yue Hu Signed-off-by: Martin K. Petersen commit 4517e77eb83d875c61e11dec01dec4ad49e4c5e7 Author: Vinod Koul Date: Thu Feb 4 22:22:34 2021 +0530 scsi: ufs: dt-bindings: Add sm8250, sm8350 compatible strings Document "qcom,sm8250-ufshc" and "qcom,sm8350-ufshc" compatible string. Use of "qcom,sm8250-ufshc" is already present upstream, so add misiing documentation. "qcom,sm8350-ufshc" is for UFS HC found in SM8350 SoC. Link: https://lore.kernel.org/r/20210204165234.61939-1-vkoul@kernel.org Reviewed-by: Bjorn Andersson Reviewed-by: Rob Herring Signed-off-by: Vinod Koul Signed-off-by: Martin K. Petersen commit 3d9c3dcc58e968403f29767726407bc680e087b5 Author: Michael Kelley Date: Tue Feb 23 14:44:54 2021 -0800 scsi: storvsc: Enable scatterlist entry lengths > 4Kbytes storvsc currently sets .dma_boundary to limit scatterlist entries to 4 Kbytes, which is less efficient with huge pages that offer large chunks of contiguous physical memory. Improve the algorithm for creating the Hyper-V guest physical address PFN array so that scatterlist entries with lengths > 4Kbytes are handled. As a result, remove the .dma_boundary setting. The improved algorithm also adds support for scatterlist entries with offsets >= 4Kbytes, which is supported by many other SCSI low-level drivers. And it retains support for architectures where possibly PAGE_SIZE != HV_HYP_PAGE_SIZE (such as ARM64). Link: https://lore.kernel.org/r/1614120294-1930-1-git-send-email-mikelley@microsoft.com Reviewed-by: Vitaly Kuznetsov Signed-off-by: Michael Kelley Signed-off-by: Martin K. Petersen commit 2f100585d04506004b8027ec9bbaee26940a769f Author: Guo Ren Date: Sun Mar 7 10:24:46 2021 +0800 riscv: Enable generic clockevent broadcast When percpu-timers are stopped by deep power saving mode, we need system timer help to broadcast IPI_TIMER. This is first introduced by broken x86 hardware, where the local apic timer stops in C3 state. But many other architectures(powerpc, mips, arm, hexagon, openrisc, sh) have supported the infrastructure to deal with Power Management issues. Signed-off-by: Guo Ren Reviewed-by: Anup Patel Signed-off-by: Palmer Dabbelt commit 6bcd4ea717f3d26edf3da397c82fc9c2236f4f27 Author: Christoph Hellwig Date: Mon Mar 1 08:44:33 2021 +0100 xen-swiotlb: remove the unused size argument from xen_swiotlb_fixup Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit a98f565462f0fca9096e8f53933364dc2a74bc90 Author: Christoph Hellwig Date: Mon Mar 1 08:44:32 2021 +0100 xen-swiotlb: split xen_swiotlb_init Split xen_swiotlb_init into a normal an an early case. That makes both much simpler and more readable, and also allows marking the early code as __init and x86-only. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 5d0538b2b884f7fd239f6ab3b667148dc57123f1 Author: Christoph Hellwig Date: Mon Mar 1 08:44:31 2021 +0100 swiotlb: lift the double initialization protection from xen-swiotlb Lift the double initialization protection from xen-swiotlb to the core code to avoid exposing too many swiotlb internals. Also upgrade the check to a warning as it should not happen. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit cbce99527ca7c4e98db9890651d5e9dfc2fb89ac Author: Christoph Hellwig Date: Mon Mar 1 08:44:30 2021 +0100 xen-swiotlb: remove xen_io_tlb_start and xen_io_tlb_nslabs The xen_io_tlb_start and xen_io_tlb_nslabs variables are now only used in xen_swiotlb_init, so replace them with local variables. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 4035b43da6daa51668830becfe8537841414946b Author: Christoph Hellwig Date: Mon Mar 1 08:44:29 2021 +0100 xen-swiotlb: remove xen_set_nslabs The xen_set_nslabs function is a little weird, as it has just one caller, that caller passes a global variable as the argument, which is then overriden in the function and a derivative of it returned. Just add a cpp symbol for the default size using a readable constant and open code the remaining three lines in the caller. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 6223d1cef7b462de9aeede5846e6dcdbbd1c4d60 Author: Christoph Hellwig Date: Mon Mar 1 08:44:28 2021 +0100 xen-swiotlb: use io_tlb_end in xen_swiotlb_dma_supported Use the existing variable that holds the physical address for xen_io_tlb_end to simplify xen_swiotlb_dma_supported a bit, and remove the otherwise unused xen_io_tlb_end variable and the xen_virt_to_bus helper. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 16bc75f3aa3963588b13b01f6dad589f85d9f733 Author: Christoph Hellwig Date: Mon Mar 1 08:44:27 2021 +0100 xen-swiotlb: use is_swiotlb_buffer in is_xen_swiotlb_buffer Use the is_swiotlb_buffer to check if a physical address is a swiotlb buffer. This works because xen-swiotlb does use the same buffer as the main swiotlb code, and xen_io_tlb_{start,end} are just the addresses for it that went through phys_to_virt. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 80808d273a3f075196d1a26463f65d4c9d2891c8 Author: Christoph Hellwig Date: Mon Mar 1 08:44:26 2021 +0100 swiotlb: split swiotlb_tbl_sync_single Split swiotlb_tbl_sync_single into two separate funtions for the to device and to cpu synchronization. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 2bdba622c351259317b0294c6e9fe243b2404316 Author: Christoph Hellwig Date: Mon Mar 1 08:44:25 2021 +0100 swiotlb: move orig addr and size validation into swiotlb_bounce Move the code to find and validate the original buffer address and size from the callers into swiotlb_bounce. This means a tiny bit of extra work in the swiotlb_map path, but avoids code duplication and a leads to a better code structure. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 2973073a80b46daebc352c31d09d95d16cf6876e Author: Christoph Hellwig Date: Mon Mar 1 08:44:24 2021 +0100 swiotlb: remove the alloc_size parameter to swiotlb_tbl_unmap_single Now that swiotlb remembers the allocation size there is no need to pass it back to swiotlb_tbl_unmap_single. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 9906aa5bd6f5a13c9c5488d5426893a7b38b550f Author: Christoph Hellwig Date: Mon Mar 1 08:44:23 2021 +0100 powerpc/svm: stop using io_tlb_start Use the local variable that is passed to swiotlb_init_with_tbl for freeing the memory in the failure case to isolate the code a little better from swiotlb internals. Signed-off-by: Christoph Hellwig Signed-off-by: Konrad Rzeszutek Wilk commit 7dc84de98babc709910947b24e8cd1c2e01c7857 Author: Roi Dayan Date: Wed Sep 16 10:11:47 2020 +0300 net/mlx5: E-Switch, Protect changing mode while adding rules We re-use the native NIC port net device instance for the Uplink representor, a driver currently cannot unbind TC setup callback actively, hence protect changing E-Switch mode while adding rules. Signed-off-by: Roi Dayan Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit c55479d0cb6a28029844d0e90730704a0fb5efd3 Author: Roi Dayan Date: Wed Sep 16 10:11:42 2020 +0300 net/mlx5: E-Switch, Change mode lock from mutex to rw semaphore E-Switch mode change routine will take the write lock to prevent any consumer to access the E-Switch resources while E-Switch is going through a mode change. In the next patch E-Switch consumers (e.g vport representors) will take read_lock prior to accessing E-Switch resources to prevent E-Switch mode changing in the middle of the operation. Signed-off-by: Roi Dayan Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit 7a9fb35e8c3a67145fca262c304de65cb2f83abf Author: Roi Dayan Date: Wed Sep 16 10:11:33 2020 +0300 net/mlx5e: Do not reload ethernet ports when changing eswitch mode When switching modes between legacy and switchdev and back, do not reload ethernet interfaces. just change the profile from nic profile to uplink rep profile in switchdev mode. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit fec2b4bb39d961e5a804c34b7184e2cbbb2d7c2c Author: Roi Dayan Date: Thu Jan 14 16:05:56 2021 +0200 net/mlx5e: Unregister eth-reps devices first When we clean all the interfaces, i.e. rescan or reload module, we need to clean eth-reps devices first, before eth devices. We will re-use the native NIC port net device instance for the Uplink representor. Changing eswitch mode will skip destroying the eth device so the net device won't be destroyed and only change the profile. Creating uplink eth-rep will initialize the representor related resources. In that sense when we destroy all devices we first need to destroy eth-rep devices so uplink eth-rep will clean all representor related resources and only then destroy the eth device which will destroy rest of the resources and the net device. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit c27971d08abecc91f06214dacc66ce3ce2662a44 Author: Roi Dayan Date: Wed Oct 28 11:21:26 2020 +0200 net/mlx5: Move devlink port from mlx5e priv to mlx5e resources We re-use the native NIC port net device instance for the Uplink representor, and the devlink port. When changing profiles we reset the mlx5e priv but we should still use the devlink port so move it to mlx5e resources. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit c276aae8c19d65e21a43c2690c7c7dafea0e97fa Author: Roi Dayan Date: Tue Jan 26 11:51:04 2021 +0200 net/mlx5: Move mlx5e hw resources into a sub object This is to separate between resources attributes and other attributes we will want to use. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 5a65d85dc7f4532755750aab645c46a47219fd1a Author: Roi Dayan Date: Wed Oct 21 10:28:50 2020 +0300 net/mlx5e: Register nic devlink port with switch id We will re-use the native NIC port net device instance for the Uplink representor. Since the netdev will be kept registered while we engage switchdev mode also the devlink will be kept registered. Register the nic devlink port with switch id so it will be available when changing profiles. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 865d6d1c2df8e60260499efba2cd0537fdb8ca72 Author: Roi Dayan Date: Tue Oct 20 12:26:51 2020 +0300 net/mlx5e: Move devlink port register and unregister calls We will re-use the native NIC port net device instance for the Uplink representor. As such we also don't want to unregister/register the devlink port as part of the profile. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 2ff349c5edfe3ea3c017dab28a1912f337a6500c Author: Roi Dayan Date: Wed Sep 16 10:11:26 2020 +0300 net/mlx5e: Verify dev is present in some ndos We will re-use the native NIC port net device instance for the Uplink representor. While changing profiles private resources are not available but some ndos are not checking if the netdev is present. So for those ndos check the netdev is present in the driver before accessing the private resources. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit c97a2c06919ae8cf09773b8dfa24909ccfba9316 Author: Roi Dayan Date: Wed Sep 16 10:11:07 2020 +0300 net/mlx5e: Use nic mode netdev ndos and ethtool ops for uplink representor Remove dedicated uplink rep netdev ndos and ethtools ops. We will re-use the native NIC port net device instance and ethtool ops for the Uplink representor. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit ee5260307c54f9b1b964a44863751ac220424844 Author: Roi Dayan Date: Wed Sep 16 10:11:01 2020 +0300 net/mlx5e: Add offload stats ndos to nic netdev ops We will re-use the native NIC port net device instance for the Uplink representor, hence same ndos must be used. Signed-off-by: Roi Dayan Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit ec9457a6f64af41bb2b295efa34992903b0768a9 Author: Roi Dayan Date: Wed Sep 16 10:10:56 2020 +0300 net/mlx5e: Distinguish nic and esw offload in tc setup block cb We will re-use the native NIC port net device instance for the Uplink representor, hence same ndos will be used. Now we need to distinguish in the TC callback if the mode is legacy or switchdev and set the proper flag. Signed-off-by: Roi Dayan Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 1aa48ca6aa9fe7d59b853d2edd295e0486547700 Author: Roi Dayan Date: Wed Sep 16 10:10:48 2020 +0300 net/mlx5e: Allow legacy vf ndos only if in legacy mode We will re-use the native NIC port net device instance for the Uplink representor. Several VF ndo ops are not relevant in switchdev mode. Disallow them when eswitch mode is not legacy as a preparation. Signed-off-by: Roi Dayan Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit f031dbd530eae5db3ff03510207772df68f5d9e6 Author: Saeed Mahameed Date: Sun Mar 22 23:22:20 2020 -0700 net/mlx5e: Same max num channels for both nic and uplink profiles In downstream patches NIC netdev can change profile dynamically from NIC mode to uplink mode and vise-versa. It is required that both profiles must advertise the same max amount of tx/rx queues. Signed-off-by: Saeed Mahameed Reviewed-by: Roi Dayan commit 7a126a43a3dcf0fa6b9f7f2fe3ce82102517afe3 Author: Roi Dayan Date: Wed Sep 16 10:11:20 2020 +0300 net: Change dev parameter to const in netif_device_present() Not all ndos check the present bit before calling the ndo and the driver may want to check it. Sometimes the dev parameter passed as const so we pass it to netif_device_present() as const. Since netif_device_present() doesn't modify dev parameter anyway, declare it as const. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit ebfbc46b35cb70b9fbd88f376d7a33b79f60adff Author: Flavio Leitner Date: Tue Mar 16 17:14:27 2021 -0300 openvswitch: Warn over-mtu packets only if iface is UP. It is not unusual to have the bridge port down. Sometimes it has the old MTU, which is fine since it's not being used. However, the kernel spams the log with a warning message when a packet is going to be sent over such port. Fix that by warning only if the interface is UP. Signed-off-by: Flavio Leitner Signed-off-by: David S. Miller commit 56901d483bf14ca729a6c4e06d2b49590b9f1971 Author: Ravi Bangoria Date: Tue Mar 16 21:00:48 2021 +0530 selftests/bpf: Use nanosleep() syscall instead of sleep() in get_cgroup_id Glibc's sleep() switched to clock_nanosleep() from nanosleep(), and thus syscalls:sys_enter_nanosleep tracepoint is not hitting which is causing testcase failure. Instead of depending on glibc sleep(), call nanosleep() systemcall directly. Before: # ./get_cgroup_id_user ... main:FAIL:compare_cgroup_id kern cgid 0 user cgid 483 After: # ./get_cgroup_id_user ... main:PASS:compare_cgroup_id Signed-off-by: Ravi Bangoria Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20210316153048.136447-1-ravi.bangoria@linux.ibm.com commit ebda107e5f222a086c83ddf6d1ab1da97dd15810 Author: Jiapeng Chong Date: Tue Mar 16 15:59:37 2021 +0800 selftests/bpf: Fix warning comparing pointer to 0 Fix the following coccicheck warnings: ./tools/testing/selftests/bpf/progs/fexit_test.c:77:15-16: WARNING comparing pointer to 0. ./tools/testing/selftests/bpf/progs/fexit_test.c:68:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/1615881577-3493-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 01035bcc0f9195a19a76c8a006b3c520428acb61 Author: David S. Miller Date: Tue Mar 16 15:52:15 2021 -0700 Revert "net: socket: use BIT() for MSG_*" This reverts commit 0bb3262c0248d44aea3be31076f44beb82a7b120. Breaks things on mips64/qemu Reported-by: Guenter Roeck Signed-off-by: David S. Miller commit 35db476a29854d9afdb01482ef8cc17863a8e231 Merge: 0d405970828d1 2ed2c5f039110 Author: David S. Miller Date: Tue Mar 16 15:49:52 2021 -0700 Merge branch 'ocelot-mrp' Horatiu Vultur says: ==================== net: ocelot: Extend MRP This patch series extends the current support of MRP in Ocelot driver. Currently the forwarding of the frames happened in SW because all frames were trapped to CPU. With this patch the MRP frames will be forward in HW. v1 -> v2: - create a patch series instead of single patch - rename ocelot_mrp_find_port to ocelot_mrp_find_partner_port - rename PGID_MRP to PGID_BLACKHOLE - use GFP_KERNEL instead of GFP_ATOMIC - fix other whitespace issues ==================== Signed-off-by: David S. Miller commit 2ed2c5f0391106406ead3a74bfa571575eafe8b6 Author: Horatiu Vultur Date: Tue Mar 16 21:10:19 2021 +0100 net: ocelot: Remove ocelot_xfh_get_cpuq Now when extracting frames from CPU the cpuq is not used anymore so remove it. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 7c588c3e96e9733a2a8a40caefd26c9189416821 Author: Horatiu Vultur Date: Tue Mar 16 21:10:18 2021 +0100 net: ocelot: Extend MRP This patch extends MRP support for Ocelot. It allows to have multiple rings and when the node has the MRC role it forwards MRP Test frames in HW. For MRM there is no change. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit ebb1bb401303ffac0ee994ba8ed9dfd24bb2ac5f Author: Horatiu Vultur Date: Tue Mar 16 21:10:17 2021 +0100 net: ocelot: Add PGID_BLACKHOLE Add a new PGID that is used not to forward frames anywhere. It is used by MRP to make sure that MRP Test frames will not reach CPU port. Signed-off-by: Horatiu Vultur Signed-off-by: David S. Miller commit 0d405970828d1165f4e235a4f75121b00ffa903f Merge: 46bb5a9c8b8d6 bb52073645a61 Author: David S. Miller Date: Tue Mar 16 15:34:15 2021 -0700 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 40GbE Intel Wired LAN Driver Updates 2021-03-16 This series contains updates to i40e, ixgbe, and ice drivers. Magnus Karlsson says: Optimize run_xdp_zc() for the XDP program verdict being XDP_REDIRECT in the xsk zero-copy path. This path is only used when having AF_XDP zero-copy on and in that case most packets will be directed to user space. This provides around 100k extra packets in throughput on my server when running l2fwd in xdpsock. ==================== Signed-off-by: David S. Miller commit 46bb5a9c8b8d6d99aa9e11a799e1e1da9efe7b6a Merge: 5bdbdb823f03c 0f967d9e5a20a Author: David S. Miller Date: Tue Mar 16 15:32:23 2021 -0700 Merge branch 'mlxsw-Add-support-for-egress-and-policy-based-sampling' Ido Schimmel says: ==================== mlxsw: Add support for egress and policy-based sampling So far mlxsw only supported ingress sampling using matchall classifier. This series adds support for egress sampling and policy-based sampling using flower classifier on Spectrum-2 and newer ASICs. As such, it is now possible to issue these commands: # tc filter add dev swp1 egress pref 1 proto all matchall action sample rate 100 group 1 # tc filter add dev swp2 ingress pref 1 proto ip flower dst_ip 198.51.100.1 action sample rate 100 group 2 When performing egress sampling (using either matchall or flower) the ASIC is able to report the end-to-end latency which is passed to the psample module. Series overview: Patches #1-#3 are preparations without any functional changes Patch #4 generalizes the idea of sampling triggers and creates a hash table to track active sampling triggers in preparation for egress and policy-based triggers. The motivation is explained in the changelog Patch #5 flips mlxsw to start using this hash table instead of storing ingress sampling triggers as an attribute of the sampled port Patch #6 finally adds support for egress sampling using matchall classifier Patches #7-#8 add support for policy-based sampling using flower classifier Patches #9 extends the mlxsw sampling selftest to cover the new triggers Patch #10 makes sure that egress sampling configuration only fails on Spectrum-1 ==================== Signed-off-by: David S. Miller commit 0f967d9e5a20aeee51bb004295e83c2c913cceda Author: Ido Schimmel Date: Tue Mar 16 17:03:03 2021 +0200 selftests: mlxsw: Test egress sampling limitation on Spectrum-1 only Make sure egress sampling configuration only fails on Spectrum-1, given that mlxsw now supports it on Spectrum-{2,3}. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit f0b692c4ee2fdd0d4291fe3cbde156792896895e Author: Ido Schimmel Date: Tue Mar 16 17:03:02 2021 +0200 selftests: mlxsw: Add tc sample tests for new triggers Test that packets are sampled when tc-sample is used with matchall egress binding and flower classifier. Verify that when performing sampling on egress the end-to-end latency is reported as metadata. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 45aad0b7043da88244622a65773dae24fd1dd4da Author: Ido Schimmel Date: Tue Mar 16 17:03:01 2021 +0200 mlxsw: spectrum_acl: Offload FLOW_ACTION_SAMPLE Implement support for action sample when used with a flower classifier by implementing the required sampler_add() / sampler_del() callbacks and registering an Rx listener for the sampled packets. The sampler_add() callback returns an error for Spectrum-1 as the functionality is not supported. In Spectrum-{2,3} the callback creates a mirroring agent towards the CPU. The agent's identifier is used by the policy engine code to mirror towards the CPU with probability. The Rx listener for the sampled packet is registered with the 'policy engine' mirroring reason and passes trapped packets to the psample module after looking up their parameters (e.g., sampling group). Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit ca19ea63f739c7a4e5dad64951706fea789e1f1a Author: Ido Schimmel Date: Tue Mar 16 17:03:00 2021 +0200 mlxsw: core_acl_flex_actions: Add mirror sampler action Add core functionality required to support mirror sampler action in the policy engine. The switch driver (e.g., 'mlxsw_spectrum') is required to implement the sampler_add() / sampler_del() callbacks that perform the necessary configuration before the sampler action can be installed. The next patch will implement it for Spectrum-{2,3}, while Spectrum-1 will return an error, given it is not supported. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 54d0e963f683362418424f9ce61884a6e1cced38 Author: Ido Schimmel Date: Tue Mar 16 17:02:59 2021 +0200 mlxsw: spectrum_matchall: Add support for egress sampling Allow user space to install a matchall classifier with sample action on egress. This is only supported on Spectrum-2 onwards, so Spectrum-1 will continue to return an error. Programming the hardware to sample on egress is identical to ingress sampling with the sole change of using a different sampling trigger. Upon receiving a sampled packet, the sampling trigger (ingress vs. egress) will be encoded in the mirroring reason in the Completion Queue Element (CQE). The mirroring reason is used to lookup the sampling parameters (e.g., psample group) which are passed to the psample module. Note that locally generated packets that are sampled are simply consumed. This is done for several reasons. First, such packets do not have an ingress netdev given that their Rx local port is the CPU port. This breaks several basic assumptions. Second, sampling using the same interface (tc), but with flower classifier will not result in locally generated packets being sampled given that such packets are not subject to the policy engine. Third, realistically, this is not a big deal given that the vast majority of the packets being transmitted through the port are not locally generated packets. Fourth, if such packets do need to be sampled, they can be sampled with a 'skip_hw' filter and reported to the same sampling group as the data path packets. The software sampling rate can also be adjusted to fit the rate of the locally generated packets which is much lower than the rate of the data path traffic. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 90f53c53ec4acaa86055f4d2e98767eeb735b42d Author: Ido Schimmel Date: Tue Mar 16 17:02:58 2021 +0200 mlxsw: spectrum: Start using sampling triggers hash table Start using the previously introduced sampling triggers hash table to store sampling parameters instead of storing them as attributes of the sampled port. This makes it easier to introduce new sampling triggers. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 1b9fc42e46dfea0efa39165d906b0f6a05d6b558 Author: Ido Schimmel Date: Tue Mar 16 17:02:57 2021 +0200 mlxsw: spectrum: Track sampling triggers in a hash table Currently, mlxsw supports a single sampling trigger type (i.e., received packet). When sampling is configured on an ingress port, the sampling parameters (e.g., pointer to the psample group) are stored as an attribute of the port, so that they could be passed to psample_sample_packet() when a sampled packet is trapped to the CPU. Subsequent patches are going to add more types of sampling triggers, making it difficult to maintain the current scheme. Instead, store all the active sampling triggers with their associated parameters in a hash table. That way, more trigger types can be easily added. The next patch will flip mlxsw to use the hash table instead of the current scheme. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit e09a59555a3028564f3cb0d10c24ab86f50cbb79 Author: Ido Schimmel Date: Tue Mar 16 17:02:56 2021 +0200 mlxsw: spectrum_matchall: Pass matchall entry to sampling operations The entry will be required by the next patches, so pass it. No functional changes intended. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 559313b2cbb762ee4efa4ab6cd6f800c39984c20 Author: Ido Schimmel Date: Tue Mar 16 17:02:55 2021 +0200 mlxsw: spectrum_matchall: Push sampling checks to per-ASIC operations Push some sampling checks to the per-ASIC operations, as they are no longer relevant for all ASICs. The sampling rate validation against the MPSC maximum rate is only relevant for Spectrum-1, as Spectrum-2 and later ASICs no longer use MPSC register for sampling. The ingress / egress validation is pushed down to the per-ASIC operations since subsequent patches are going to remove it for Spectrum-2 and later ASICs. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 6561df560833952fee3ff8dd11c3b6a2041b3b1a Author: Ido Schimmel Date: Tue Mar 16 17:02:54 2021 +0200 mlxsw: spectrum_matchall: Propagate extack further Due to the differences between Spectrum-1 and later ASICs, some of the checks currently performed at the common code (where extack is available) will need to be pushed to the per-ASIC operations. As a preparation, propagate extack further to maintain proper error reporting. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 5bdbdb823f03caddb281eb733a17450298700818 Merge: 91306d1d131ee 4fe72de61ec81 Author: David S. Miller Date: Tue Mar 16 15:29:49 2021 -0700 Merge branch 'dpaa2-switch-small-cleanup' Ioana Ciornei says: ==================== dpaa2-switch: small cleanup This patch set addresses various low-hanging issues in both dpaa2-switch and dpaa2-eth drivers. Unused ABI functions are removed from dpaa2-switch, all the kernel-doc warnings are fixed up in both drivers and the coding style for the remaining ABIs is fixed-up a bit. ==================== Signed-off-by: David S. Miller commit 4fe72de61ec8168fa0e4922f957992d91621a428 Author: Ioana Ciornei Date: Tue Mar 16 16:55:12 2021 +0200 dpaa2-eth: fixup kdoc warnings Running kernel-doc over the dpaa2-eth driver generates a bunch of warnings. Fix them up by removing code comments for macros which are self-explanatory, respecting the kdoc format for macro documentation and other small changes like describing the expected return values of functions. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 5ac2d254382c095393de06f5b041aad2d91ba35e Author: Ioana Ciornei Date: Tue Mar 16 16:55:11 2021 +0200 dpaa2-switch: fit the function declaration on the same line Multiple ABI function declarations are split unnecessarry on multiple lines. Fix this so that we have a consistent coding style. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 2b7e3f7d1b7e347c328a88f937acd53b2849534a Author: Ioana Ciornei Date: Tue Mar 16 16:55:10 2021 +0200 dpaa2-switch: reduce the size of the if_id bitmap to 64 bits The maximum number of DPAA2 switch interfaces, including the control interface, is 64. Even though this restriction existed from the first place, the command structures which use an interface id bitmap were poorly described and even though a single uint64_t is enough, all of them used an array of 4 uint64_t's. Fix this by reducing the size of the interface id field to a single uint64_t. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 05b363608b5bfb1d55675655bab36486c6df729b Author: Ioana Ciornei Date: Tue Mar 16 16:55:09 2021 +0200 dpaa2-switch: fix kdoc warnings Running kernel-doc over the dpaa2-switch driver generates a bunch of warnings. Fix them up by removing code comments for macros which are self-explanatory and adding a bit more context for the dpsw_if_get_port_mac_addr() function and the fields of the dpsw_vlan_if_cfg structure. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit cba0445633bc91508d9231880a69c74cdad0bbb8 Author: Ioana Ciornei Date: Tue Mar 16 16:55:08 2021 +0200 dpaa2-switch: remove unused ABI functions Cleanup the dpaa2-switch driver a bit by removing any unused MC firmware ABI definitions. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 91306d1d131ee20afe6447668ba3a8f13151b9f4 Author: Zihao Tang Date: Tue Mar 16 17:41:06 2021 +0800 net: ipa: Remove useless error message Fix the following coccicheck report: drivers/net/ipa/gsi.c:1341:2-9: line 1341 is redundant because platform_get_irq() already prints an error Remove dev_err() messages after platform_get_irq_byname() failures. Signed-off-by: Zihao Tang Signed-off-by: Jay Fang Reviewed-by: Alex Elder Signed-off-by: David S. Miller commit 51481c51d3327fa7ef82c610142193313f204529 Merge: 52280f60c9b6e 787a4109f4684 Author: David S. Miller Date: Tue Mar 16 15:13:45 2021 -0700 Merge branch 'switchdev-dsa-docs' Vladimir Oltean says: ==================== Documentation updates for switchdev and DSA Many changes were made to the code but of course the documentation was not kept up to date. This is an attempt to update some of the verbiage. The documentation is still not complete, but it's time to make some more changes to the code first, before documenting the rest. Changes in v2: Integrated feedback from Andrew, Florian, Tobias, Ido, George. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit 787a4109f46847975ffae7d528a55c6b768ef0aa Author: Vladimir Oltean Date: Tue Mar 16 13:24:19 2021 +0200 Documentation: networking: switchdev: fix command for static FDB entries The "bridge fdb add" command provided in the switchdev documentation is junk now, not only because it is syntactically incorrect and rejected by the iproute2 bridge program, but also because it was not updated in light of Arkadi Sharshevsky's radical switchdev refactoring in commit 29ab586c3d83 ("net: switchdev: Remove bridge bypass support from switchdev"). Try to explain what the intended usage pattern is with the new kernel implementation. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 0f22ad45f47cca1f0fd564c7bf4a28f481b95f10 Author: Florian Fainelli Date: Tue Mar 16 13:24:18 2021 +0200 Documentation: networking: switchdev: clarify device driver behavior This patch provides details on the expected behavior of switchdev enabled network devices when operating in a "stand alone" mode, as well as when being bridge members. This clarifies a number of things that recently came up during a bug fixing session on the b53 DSA switch driver. Signed-off-by: Florian Fainelli Signed-off-by: Vladimir Oltean Reviewed-by: Andrew Lunn Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit 6e9530f4c0429ac4d8f58743f047cb67a7e74c35 Author: Vladimir Oltean Date: Tue Mar 16 13:24:17 2021 +0200 Documentation: networking: dsa: add paragraph for the HSR/PRP offload Add a short summary of the methods that a driver writer must implement for offloading a HSR/PRP network interface. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: George McCollister Signed-off-by: David S. Miller commit f8f3c20af1ea27989e01dfc11a3136b380eb6120 Author: Vladimir Oltean Date: Tue Mar 16 13:24:16 2021 +0200 Documentation: networking: dsa: add paragraph for the MRP offload Add a short summary of the methods that a driver writer must implement for getting an MRP instance to work on top of a DSA switch. Cc: Horatiu Vultur Signed-off-by: Vladimir Oltean Reviewed-by: Horatiu Vultur Signed-off-by: David S. Miller commit a9985444f2b5b6e60c7b1faeceebe58367a08915 Author: Vladimir Oltean Date: Tue Mar 16 13:24:15 2021 +0200 Documentation: networking: dsa: add paragraph for the LAG offload Add a short summary of the methods that a driver writer must implement for offloading a link aggregation group, and what is still missing. Cc: Tobias Waldekranz Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 8411abbcad8e73a3b3a27ff6c0d755c6036f4c77 Author: Vladimir Oltean Date: Tue Mar 16 13:24:14 2021 +0200 Documentation: networking: dsa: mention integration with devlink Add a short summary of the devlink features supported by the DSA core. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 5a275f4c2989f6f1fab626c61d34001f28381a18 Author: Vladimir Oltean Date: Tue Mar 16 13:24:13 2021 +0200 Documentation: networking: dsa: document the port_bridge_flags method The documentation was already lagging behind by not mentioning the old version of port_bridge_flags (port_set_egress_floods). So now we are skipping one step and just explaining how a DSA driver should configure address learning and flooding settings. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f4b5c53a03ea76b2abfd71b45aa7363fd2ad0cc1 Author: Vladimir Oltean Date: Tue Mar 16 13:24:12 2021 +0200 Documentation: networking: dsa: remove TODO about porting more vendor drivers On one hand, the link is dead and therefore useless. On the other hand, there are always more drivers to port, but at this stage, DSA does not need to affirm itself as the driver model to use for Ethernet-connected switches (since we already have 15 tagging protocols supported and probably more switch families from various vendors), so there is nothing actionable to do. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f88439918589332a2c5feef225b9644873cd0769 Author: Vladimir Oltean Date: Tue Mar 16 13:24:11 2021 +0200 Documentation: networking: dsa: remove references to switchdev prepare/commit After the recent series containing commit bae33f2b5afe ("net: switchdev: remove the transaction structure from port attributes"), there aren't prepare/commit transactional phases anymore in most of the switchdev objects/attributes, and as a result, there aren't any in the DSA driver API either. So remove this piece. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit f23f1404ebd37b0b0b120180361db3867359cc0c Author: Vladimir Oltean Date: Tue Mar 16 13:24:10 2021 +0200 Documentation: networking: dsa: remove static port count from limitations After Vivien's series from 2019 containing commits 27d4d19d7c82 ("net: dsa: remove limitation of switch index value") and ab8ccae122a4 ("net: dsa: add ports list in the switch fabric"), this is basically no longer true. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller commit 7714ee152cd41bb5d2f725662ab3080a0af1aa91 Author: Vladimir Oltean Date: Tue Mar 16 13:24:09 2021 +0200 Documentation: networking: dsa: rewrite chapter about tagging protocol The chapter about tagging protocols is out of date because it doesn't mention all taggers that have been added since last documentation update. But judging based on that, it will always tend to lag behind, and there's no good reason why we would enumerate the supported hardware. Instead we could do something more useful and explain what there is to know about tagging protocols instead. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn Reviewed-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 0f455371054bd40a69199868af99b80d1f3c4796 Author: Vladimir Oltean Date: Tue Mar 16 13:24:08 2021 +0200 Documentation: networking: update the graphical representation While preparing some slides for a customer presentation, I found the existing high-level view to be a bit confusing, so I modified it a little bit. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Reviewed-by: Tobias Waldekranz Signed-off-by: David S. Miller commit 52280f60c9b6e25b00d43f576690e43baf724d09 Merge: f105f26e45604 3335369bad99c Author: David S. Miller Date: Tue Mar 16 15:04:30 2021 -0700 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== 1GbE Intel Wired LAN Driver Updates 2021-03-15 This series contains updates to e1000e only. Chen Yu says: The NIC is put in runtime suspend status when there is no cable connected. As a result, it is safe to keep non-wakeup NIC in runtime suspended during s2ram because the system does not rely on the NIC plug event nor WoL to wake up the system. Besides that, unlike the s2idle, s2ram does not need to manipulate S0ix settings during suspend. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit f105f26e456040ac5ea451ffed02fe4c48f36ac7 Author: Yejune Deng Date: Tue Mar 16 10:57:36 2021 +0800 net: ipv4: route.c: simplify procfs code proc_creat_seq() that directly take a struct seq_operations, and deal with network namespaces in ->open. Signed-off-by: Yejune Deng Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 08ef1af4de5fe7de9c6d69f1e22e51b66e385d9b Author: Ondrej Mosnacek Date: Wed Feb 24 22:56:28 2021 +0100 perf/core: Fix unconditional security_locked_down() call Currently, the lockdown state is queried unconditionally, even though its result is used only if the PERF_SAMPLE_REGS_INTR bit is set in attr.sample_type. While that doesn't matter in case of the Lockdown LSM, it causes trouble with the SELinux's lockdown hook implementation. SELinux implements the locked_down hook with a check whether the current task's type has the corresponding "lockdown" class permission ("integrity" or "confidentiality") allowed in the policy. This means that calling the hook when the access control decision would be ignored generates a bogus permission check and audit record. Fix this by checking sample_type first and only calling the hook when its result would be honored. Fixes: b0c8fdc7fdb7 ("lockdown: Lock down perf when in confidentiality mode") Signed-off-by: Ondrej Mosnacek Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Paul Moore Link: https://lkml.kernel.org/r/20210224215628.192519-1-omosnace@redhat.com commit ff65338e78418e5970a7aabbabb94c46f2bb821d Author: Namhyung Kim Date: Thu Mar 11 20:54:13 2021 +0900 perf core: Allocate perf_event in the target node memory For cpu events, it'd better allocating them in the corresponding node memory as they would be mostly accessed by the target cpu. Although perf tools sets the cpu affinity before calling perf_event_open, there are places it doesn't (notably perf record) and we should consider other external users too. Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311115413.444407-2-namhyung@kernel.org commit bdacfaf26da166dd56c62f23f27a4b3e71f2d89e Author: Namhyung Kim Date: Thu Mar 11 20:54:12 2021 +0900 perf core: Add a kmem_cache for struct perf_event The kernel can allocate a lot of struct perf_event when profiling. For example, 256 cpu x 8 events x 20 cgroups = 40K instances of the struct would be allocated on a large system. The size of struct perf_event in my setup is 1152 byte. As it's allocated by kmalloc, the actual allocation size would be rounded up to 2K. Then there's 896 byte (~43%) of waste per instance resulting in total ~35MB with 40K instances. We can create a dedicated kmem_cache to avoid such a big unnecessary memory consumption. With this change, I can see below (note this machine has 112 cpus). # grep perf_event /proc/slabinfo perf_event 224 784 1152 7 2 : tunables 24 12 8 : slabdata 112 112 0 The sixth column is pages-per-slab which is 2, and the fifth column is obj-per-slab which is 7. Thus actually it can use 1152 x 7 = 8064 byte in the 8K, and wasted memory is (8192 - 8064) / 7 = ~18 byte per instance. Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311115413.444407-1-namhyung@kernel.org commit 9483409ab5067941860754e78a4a44a60311d276 Author: Namhyung Kim Date: Mon Mar 15 12:34:36 2021 +0900 perf core: Allocate perf_buffer in the target node memory I found the ring buffer pages are allocated in the node but the ring buffer itself is not. Let's convert it to use kzalloc_node() too. Signed-off-by: Namhyung Kim Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210315033436.682438-1-namhyung@kernel.org commit 5531939a4def86bea1e0adbbe0a13ebfbea36ccd Merge: 4d0b93896ff8d 252e3cbf2b623 Author: Alexei Starovoitov Date: Tue Mar 16 12:26:49 2021 -0700 Merge branch 'Build BPF selftests and its libbpf, bpftool in debug mode' Andrii Nakryiko says: ==================== Build BPF selftests and libbpf and bpftool, that are used as part of selftests, in debug mode (specifically, -Og). This makes it much simpler and nicer to do development and/or bug fixing. See patch #4 for some unscientific measurements. This patch set fixes new maybe-unitialized warnings produced in -Og build mode. Patch #1 fixes the blocker which was causing some XDP selftests failures due to non-zero padding in bpf_xdp_set_link_opts, which only happened in debug mode. ==================== Signed-off-by: Alexei Starovoitov commit 252e3cbf2b623422b359b965b94060e8d68597e1 Author: Andrii Nakryiko Date: Sat Mar 13 13:09:20 2021 -0800 selftests/bpf: Build everything in debug mode Build selftests, bpftool, and libbpf in debug mode with DWARF data to facilitate easier debugging. In terms of impact on building and running selftests. Build is actually faster now: BEFORE: make -j60 380.21s user 37.87s system 1466% cpu 28.503 total AFTER: make -j60 345.47s user 37.37s system 1599% cpu 23.939 total test_progs runtime seems to be the same: BEFORE: real 1m5.139s user 0m1.600s sys 0m43.977s AFTER: real 1m3.799s user 0m1.721s sys 0m42.420s Huge difference is being able to debug issues throughout test_progs, bpftool, and libbpf without constantly updating 3 Makefiles by hand (including GDB seeing the source code without any extra incantations). Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210313210920.1959628-5-andrii@kernel.org commit 105b842ba4ef2ddc287645cb33f90b960c16075b Author: Andrii Nakryiko Date: Sat Mar 13 13:09:19 2021 -0800 selftests/bpf: Fix maybe-uninitialized warning in xdpxceiver test xsk_ring_prod__reserve() doesn't necessarily set idx in some conditions, so from static analysis point of view compiler is right about the problems like: In file included from xdpxceiver.c:92: xdpxceiver.c: In function ‘xsk_populate_fill_ring’: /data/users/andriin/linux/tools/testing/selftests/bpf/tools/include/bpf/xsk.h:119:20: warning: ‘idx’ may be used uninitialized in this function [-Wmaybe-uninitialized] return &addrs[idx & fill->mask]; ~~~~^~~~~~~~~~~~ xdpxceiver.c:300:6: note: ‘idx’ was declared here u32 idx; ^~~ xdpxceiver.c: In function ‘tx_only’: xdpxceiver.c:596:30: warning: ‘idx’ may be used uninitialized in this function [-Wmaybe-uninitialized] struct xdp_desc *tx_desc = xsk_ring_prod__tx_desc(&xsk->tx, idx + i); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fix two warnings reported by compiler by pre-initializing variable. Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210313210920.1959628-4-andrii@kernel.org commit 4bbb3583687051ef99966ddaeb1730441b777d40 Author: Andrii Nakryiko Date: Sat Mar 13 13:09:18 2021 -0800 bpftool: Fix maybe-uninitialized warnings Somehow when bpftool is compiled in -Og mode, compiler produces new warnings about possibly uninitialized variables. Fix all the reported problems. Fixes: 2119f2189df1 ("bpftool: add C output format option to btf dump subcommand") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210313210920.1959628-3-andrii@kernel.org commit dde7b3f5f2f458297aeccfd4783e53ab8ca046db Author: Andrii Nakryiko Date: Sat Mar 13 13:09:17 2021 -0800 libbpf: Add explicit padding to bpf_xdp_set_link_opts Adding such anonymous padding fixes the issue with uninitialized portions of bpf_xdp_set_link_opts when using LIBBPF_DECLARE_OPTS macro with inline field initialization: DECLARE_LIBBPF_OPTS(bpf_xdp_set_link_opts, opts, .old_fd = -1); When such code is compiled in debug mode, compiler is generating code that leaves padding bytes uninitialized, which triggers error inside libbpf APIs that do strict zero initialization checks for OPTS structs. Adding anonymous padding field fixes the issue. Fixes: bd5ca3ef93cd ("libbpf: Add function to set link XDP fd while specifying old program") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210313210920.1959628-2-andrii@kernel.org commit 4d0b93896ff8d6795ad8d1b604e41aa850d5a635 Author: Wei Yongjun Date: Thu Mar 11 13:15:05 2021 +0000 bpf: Make symbol 'bpf_task_storage_busy' static The sparse tool complains as follows: kernel/bpf/bpf_task_storage.c:23:1: warning: symbol '__pcpu_scope_bpf_task_storage_busy' was not declared. Should it be static? This symbol is not used outside of bpf_task_storage.c, so this commit marks it static. Fixes: bc235cdb423a ("bpf: Prevent deadlock from recursive bpf_task_storage_[get|delete]") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Alexei Starovoitov Acked-by: Song Liu Link: https://lore.kernel.org/bpf/20210311131505.1901509-1-weiyongjun1@huawei.com commit 6bd45f2e78f31bde335f7720e570a07331031110 Author: Liu xuzhi Date: Thu Mar 11 04:31:03 2021 -0800 kernel/bpf/: Fix misspellings using codespell tool A typo is found out by codespell tool in 34th lines of hashtab.c: $ codespell ./kernel/bpf/ ./hashtab.c:34 : differrent ==> different Fix a typo found by codespell. Signed-off-by: Liu xuzhi Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210311123103.323589-1-liu.xuzhi@zte.com.cn commit ba3b86b9cef0c72ae78173f2c4db8a08bf4d3770 Author: Ilya Leoshkevich Date: Fri Mar 5 00:30:02 2021 +0100 s390/bpf: Implement new atomic ops Implement BPF_AND, BPF_OR and BPF_XOR as the existing BPF_ADD. Since the corresponding machine instructions return the old value, BPF_FETCH happens by itself, the only additional thing that is required is zero-extension. There is no single instruction that implements BPF_XCHG on s390, so use a COMPARE AND SWAP loop. BPF_CMPXCHG, on the other hand, can be implemented by a single COMPARE AND SWAP. Zero-extension is automatically inserted by the verifier. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210304233002.149096-1-iii@linux.ibm.com commit 77f0cae15a39f0263f74fa805d25bba6aff97dac Merge: 5a30833b9a16f e09cf582059ef Author: David S. Miller Date: Tue Mar 16 11:57:57 2021 -0700 Merge branch 'bridge-m,cast-cleanups' Nikolay Aleksandrov says: ==================== net: bridge: mcast: simplify allow/block EHT code The set does two minor cleanups of the EHT allow/block handling code: patch 01 removes code which is unreachable (it was used in initial EHT versions, but isn't anymore) and prepares the allow/block functions to be factored out. Patch 02 factors out common allow/block handling code. There are no functional changes. v2: send patch 02 and the proper version of both patches ==================== Signed-off-by: David S. Miller commit e09cf582059ef4c1e5c496d6494fe4e26482530f Author: Nikolay Aleksandrov Date: Mon Mar 15 19:13:42 2021 +0200 net: bridge: mcast: factor out common allow/block EHT handling We hande EHT state change for ALLOW messages in INCLUDE mode and for BLOCK messages in EXCLUDE mode similarly - create the new set entries with the proper filter mode. We also handle EHT state change for ALLOW messages in EXCLUDE mode and for BLOCK messages in INCLUDE mode in a similar way - delete the common entries (current set and new set). Factor out all the common code as follows: - ALLOW/INCLUDE, BLOCK/EXCLUDE: call __eht_create_set_entries() - ALLOW/EXCLUDE, BLOCK/INCLUDE: call __eht_del_common_set_entries() The set entries creation can be reused in __eht_inc_exc() as well. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 6aa2c371c729a3e3f8c7d4e08e0ff10e706b81d3 Author: Nikolay Aleksandrov Date: Mon Mar 15 19:13:41 2021 +0200 net: bridge: mcast: remove unreachable EHT code In the initial EHT versions there were common functions which handled allow/block messages for both INCLUDE and EXCLUDE modes, but later they were separated. It seems I've left some common code which cannot be reached because the filter mode is checked before calling the respective functions, i.e. the host filter is always in EXCLUDE mode when using __eht_allow_excl() and __eht_block_excl() thus we can drop the host_excl checks inside and simplify the code a bit. Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller commit 5a30833b9a16f8d1aa15de06636f9317ca51f9df Author: DENG Qingfang Date: Tue Mar 16 01:09:40 2021 +0800 net: dsa: mt7530: support MDB and bridge flag operations Support port MDB and bridge flag operations. As the hardware can manage multicast forwarding itself, offload_fwd_mark can be unconditionally set to true. Signed-off-by: DENG Qingfang Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4b9068b74127f33469429b9c0aee984091897cfd Merge: 5acd0cfbfbb5a e239756717b5c Author: David S. Miller Date: Tue Mar 16 11:52:18 2021 -0700 Merge branch 'bcm6368' Álvaro Fernández Rojas says: ==================== net: mdio: Add BCM6368 MDIO mux bus controller This controller is present on BCM6318, BCM6328, BCM6362, BCM6368 and BCM63268 SoCs. v2: add changes suggested by Andrew Lunn and Jakub Kicinski. ==================== Signed-off-by: David S. Miller commit e239756717b5c866958823a1609e2ccf268435be Author: Álvaro Fernández Rojas Date: Mon Mar 15 16:45:28 2021 +0100 net: mdio: Add BCM6368 MDIO mux bus controller This controller is present on BCM6318, BCM6328, BCM6362, BCM6368 and BCM63268 SoCs. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: David S. Miller commit da6557edb9f3f4513b01d9a20a36c2fbc31810a1 Author: Álvaro Fernández Rojas Date: Mon Mar 15 16:45:27 2021 +0100 dt-bindings: net: Add bcm6368-mdio-mux bindings Add documentations for bcm6368 mdio mux driver. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: David S. Miller commit 5acd0cfbfbb5a688da1bfb1a2152b0c855115a35 Author: Xie He Date: Wed Mar 10 23:23:09 2021 -0800 net: lapbether: Prevent racing when checking whether the netif is running There are two "netif_running" checks in this driver. One is in "lapbeth_xmit" and the other is in "lapbeth_rcv". They serve to make sure that the LAPB APIs called in these functions are called before "lapb_unregister" is called by the "ndo_stop" function. However, these "netif_running" checks are unreliable, because it's possible that immediately after "netif_running" returns true, "ndo_stop" is called (which causes "lapb_unregister" to be called). This patch adds locking to make sure "lapbeth_xmit" and "lapbeth_rcv" can reliably check and ensure the netif is running while doing their work. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Xie He Acked-by: Martin Schiller Signed-off-by: David S. Miller commit 3f9c066abcab5bc48ea6bb353d7fc42b94aee786 Merge: 6f0d32509a92d 6ec7a9c2e8be0 Author: David S. Miller Date: Tue Mar 16 11:17:59 2021 -0700 Merge branch 'ipa-qmi-fixes' Alex Elder says: ==================== net: ipa: QMI fixes Mani Sadhasivam discovered some errors in the definitions of some QMI messages used for IPA. This series addresses those errors, and extends the definition of one message type to include some newly-defined fields. ==================== Signed-off-by: David S. Miller commit 6ec7a9c2e8be0bc064e8c25df4f71ee63e978b5f Author: Alex Elder Date: Mon Mar 15 10:21:12 2021 -0500 net: ipa: extend the INDICATION_REGISTER request The specified format of the INDICATION_REGISTER QMI request message has been extended to support two more optional fields: endpoint_desc_ind: sender wishes to receive endpoint descriptor information via an IPA ENDP_DESC indication QMI message bw_change_ind: sender wishes to receive bandwidth change information via an IPA BW_CHANGE indication QMI message Add definitions that permit these fields to be formatted and parsed by the QMI library code. Signed-off-by: Alex Elder Acked-by: Manivannan Sadhasivam Signed-off-by: David S. Miller commit 7ac629e390bd6859c882bb4feb94f56c10e8126b Author: Alex Elder Date: Mon Mar 15 10:21:11 2021 -0500 net: ipa: fix another QMI message definition The ipa_init_modem_driver_req_ei[] encoding array for the INIT_MODEM_DRIVER request message has some errors in it. First, the tlv_type associated with the hw_stats_quota_size field is wrong; it duplicates the valiue used for the hw_stats_quota_base_addr field (0x1f) and should use 0x20 instead. The tlv_type value for the hw_stats_drop_size field also uses the same duplicate value; it should use 0x22 instead. Second, there is no definition for the hw_stats_drop_base_addr field. It is an optional 32-bit enumerated type value. Finally, the hw_stats_quota_base_addr, hw_stats_quota_size, and hw_stats_drop_size fields are defined as enumerated types; they should be unsigned 4-byte values. Reported-by: Manivannan Sadhasivam Signed-off-by: Alex Elder Acked-by: Manivannan Sadhasivam Signed-off-by: David S. Miller commit 8aa683041682c479e321dbbcc34f4c8ee6fcfc5d Author: Alex Elder Date: Mon Mar 15 10:21:10 2021 -0500 net: ipa: fix a duplicated tlv_type value In the ipa_indication_register_req_ei[] encoding array, the tlv_type associated with the ipa_mhi_ready_ind field is wrong. It duplicates the value used for the data_usage_quota_reached field (0x11) and should use value 0x12 instead. Fix this bug. Reported-by: Manivannan Sadhasivam Signed-off-by: Alex Elder Acked-by: Manivannan Sadhasivam Signed-off-by: David S. Miller commit 6f0d32509a92d656d9394788436792d863dff5da Author: Wei Yongjun Date: Mon Mar 15 14:43:23 2021 +0000 net: dsa: sja1105: fix error return code in sja1105_cls_flower_add() The return value 'rc' maybe overwrite to 0 in the flow_action_for_each loop, the error code from the offload not support error handling will not set. This commit fix it to return -EOPNOTSUPP. Fixes: 6a56e19902af ("flow_offload: reject configuration of packet-per-second policing in offload drivers") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Vladimir Oltean Reviewed-by: Dan Carpenter Signed-off-by: David S. Miller commit 6d16eadab6db0c1d61e59fee7ed1ecc2d10269be Author: Álvaro Fernández Rojas Date: Mon Mar 15 15:14:23 2021 +0100 net: dsa: b53: spi: allow device tree probing Add missing of_match_table to allow device tree probing. Signed-off-by: Álvaro Fernández Rojas Signed-off-by: David S. Miller commit 1bf343665057312167750509b0c48e8299293ac5 Author: Calvin Johnson Date: Mon Mar 15 16:19:05 2021 +0530 net: mdio: Alphabetically sort header inclusion Alphabetically sort header inclusion Signed-off-by: Calvin Johnson Signed-off-by: David S. Miller commit 4152c4d0d939e6863f9814d7d346787b19f771f7 Merge: d11233e0dee69 df41a5dad586c Author: Mark Brown Date: Tue Mar 16 17:55:41 2021 +0000 Merge series "spi: Adding support for software nodes" from Heikki Krogerus : Hi, The older API used to supply additional device properties for the devices - so mainly the function device_add_properties() - is going to be removed. The reason why the API will be removed is because it gives false impression that the properties are assigned directly to the devices, which has actually never been the case - the properties have always been assigned to a software fwnode which was then just directly linked with the device when the old API was used. By only accepting device properties instead of complete software nodes, the subsystems remove any change of taking advantage of the other features the software nodes have. The change that is required from the spi subsystem and the drivers is trivial. Basically only the "properties" member in struct spi_board_info, which was a pointer to struct property_entry, is replaced with a pointer to a complete software node. thanks, Heikki Krogerus (4): spi: Add support for software nodes ARM: pxa: icontrol: Constify the software node ARM: pxa: zeus: Constify the software node spi: Remove support for dangling device properties arch/arm/mach-pxa/icontrol.c | 12 ++++++++---- arch/arm/mach-pxa/zeus.c | 6 +++++- drivers/spi/spi.c | 21 ++++++--------------- include/linux/spi/spi.h | 7 +++---- 4 files changed, 22 insertions(+), 24 deletions(-) -- 2.30.1 base-commit: a38fd8748464831584a19438cbb3082b5a2dab15 commit 081634599bb1f159415e4ff87567cd9a4b24124a Merge: 2e2bf6d479616 97f53046d746b Author: Mark Brown Date: Tue Mar 16 17:55:39 2021 +0000 Merge series "ASoC: SOF: debug: cleanups" from Pierre-Louis Bossart : cleanups of allocation and error handling Guennadi Liakhovetski (3): ASoC: SOF: fix debugfs initialisation error handling ASoC: SOF: only allocate debugfs cache buffers for IPC flood entries ASoC: SOF: remove superfluous NULL check in debugfs read sound/soc/sof/core.c | 5 +++-- sound/soc/sof/debug.c | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) -- 2.25.1 commit 68119b3abde2a09402ff26d5cc1fcde9e16516aa Author: Robert Foss Date: Tue Mar 16 18:19:31 2021 +0100 arm64: dts: qcom: sdm845-db845c: Enable ov8856 sensor and connect to ISP Enable camss & ov8856 DT nodes. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20210316171931.812748-23-robert.foss@linaro.org Signed-off-by: Bjorn Andersson commit 2c3d0b325e4df33a6cbbea3ac2e174d8e1deaabe Author: Robert Foss Date: Tue Mar 16 18:19:30 2021 +0100 arm64: dts: qcom: sdm845-db845c: Configure regulators for camss node Add regulator to camss device tree node. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20210316171931.812748-22-robert.foss@linaro.org Signed-off-by: Bjorn Andersson commit d48a6698a6b77da3219630d323239ea0fb426f15 Author: Robert Foss Date: Tue Mar 16 18:19:29 2021 +0100 arm64: dts: qcom: sdm845: Add CAMSS ISP node Add the camss dt node for sdm845. Signed-off-by: Robert Foss Reviewed-by: Andrey Konovalov Link: https://lore.kernel.org/r/20210316171931.812748-21-robert.foss@linaro.org Signed-off-by: Bjorn Andersson commit 84b0aa2e0d91d7974c6cfcb3a1ce230e7366293e Author: Gustavo Pimentel Date: Thu Feb 18 20:04:09 2021 +0100 dmaengine: dw-edma: Add pcim_iomap_table return check Currently, is missing a null check on a pcim_iomap_table() return value and this can lead to a null pointer dereference if the desired BAR wasn't mapped previously. Fix this by adding a null check and returning -ENOMEM. Addresses-Coverity: ("Dereference null return") Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/bc5e6b8632c84660bb6dae454980e9419992ed14.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit b671d098a97f59d6056b34e0a759ec976325c216 Author: Gustavo Pimentel Date: Thu Feb 18 20:04:08 2021 +0100 dmaengine: dw-edma: Revert fix scatter-gather address calculation Reverting the applied patch because it caused a regression on ARC700 platform (32 bits). Fixes: 05655541c950 ("dmaengine: dw-edma: Fix scatter-gather address calculation") Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/1778422e389fe40032e216b59b1b992c61ec9887.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit cb498d7f3b086bcfab642e38aa80600dcebe0e0a Author: Gustavo Pimentel Date: Thu Feb 18 20:04:07 2021 +0100 dmaengine: dw-edma: Change DMA abbreviation from lower into upper case To keep code consistent, some comments with dma keyword written in lower case are now in upper case. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/8c4b3db90767972a2b4cbb6fa818cf0e9c3d6fe3.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit e970dcc4bd8e0a1376e794fc81d41d0fc98262dd Author: Gustavo Pimentel Date: Thu Feb 18 20:04:06 2021 +0100 dmaengine: dw-edma: Fix crash on loading/unloading driver When the driver is compiled as a module and loaded if we try to unload it, the Kernel shows a crash log. This Kernel crash is due to the dma_async_device_unregister() call done after deleting the channels, this patch fixes this issue. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/4aa850c035cf7ee488f1d3fb6dee0e37be0dce0a.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit 5244ac2e2e34d1f558ae690f10882ebe42365ea2 Author: Gustavo Pimentel Date: Thu Feb 18 20:04:05 2021 +0100 dmaengine: dw-edma: Move struct dentry variable from static definition into dw_edma struct Move struct dentry variable from static definition (dw-edma-v0-debugfs.c) into dw_edma struct (dw-edma-core.h) Also the variable was renamed from base_dir to debugfs. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/07c1167b671e7b175700e2e7061cf0b3dd8c6adb.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit da6e0dd54135e51ca858ee231674ba93ca4ba89f Author: Gustavo Pimentel Date: Thu Feb 18 20:04:04 2021 +0100 dmaengine: dw-edma: Change linked list and data blocks offset and sizes Changes the linked list and data blocks offset and sizes to follow the recommendation given by the hardware team for the IPK solution. Although the previous data blocks offset and sizes are still valid and functional, using them that might present some issues related to the IPK solution, since this solution is based on FPGA and might be subjected to timmings constrains. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/f682e7f7f06dc6b2efdd431481d6fb4d762c2c05.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit 31fb8c1ff962d93ed5025f39a6a186207c9805eb Author: Gustavo Pimentel Date: Thu Feb 18 20:04:03 2021 +0100 dmaengine: dw-edma: Improve the linked list and data blocks definition In the previous implementation, the driver assumed that there existed only two memory spaces that would equally distribute the amount of read/write channels. This might not be the case on some other implementations, therefore this patch change this requirement so that each write/read channel has its own linked list and data space well defined, which allows different sizes and locations. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/2e316cb983f8a1e09ce929029f87619dc92a52de.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit f3167dc16378da4abd4ca19d6700170fcdfd5be7 Author: Gustavo Pimentel Date: Thu Feb 18 20:04:02 2021 +0100 dmaengine: dw-edma: Reorder variables to keep consistency In the driver code structure, I tried to keep the code style consistency by writing the write channels instructions first, and then follow by the read channels instructions, mimicking the hardware implementation. However, this code style failed in some cases. This patch fixes that and no functional changes are expected. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/9bd1f86f19df8bb5de502fb85a0c5dc07978a9ba.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit 16b90dd94d3f88b9f43cc06228d2b64d32225e5d Author: Gustavo Pimentel Date: Thu Feb 18 20:04:01 2021 +0100 dmaengine: dw-edma: Improve number of channels check It was added some extra checks to ensure that the driver doesn't try to use more DMA channels than actually are available in hardware. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/cfb2b0a4f97ae9dc83ebe5ea59d6a51d69ea3654.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit 85e7518f42c85d339fac0af9f9d025d7e6717f2d Author: Gustavo Pimentel Date: Thu Feb 18 20:04:00 2021 +0100 dmaengine: dw-edma: Add device_prep_interleave_dma() support Add device_prep_interleave_dma() support to Synopsys DMA driver. This feature implements a similar data transfer mechanism to the scatter-gather implementation. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/73dc36264910654e266ae25814d892a0476e4427.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit 1aef6ffe999eec7b7fdcfad7ffef9c157727ffcb Author: Gustavo Pimentel Date: Thu Feb 18 20:03:59 2021 +0100 dmaengine: dw-edma: Add PCIe VSEC data retrieval support The latest eDMA IP development implements a Vendor-Specific Extended Capability that contains the eDMA BAR, offset, map format, and the number of read/write channels available. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/0b880b8893ff457ffc1b5071a1c7f47e61ceea1c.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit c124fd9a969acaa83f6dfa5e160a99a500af9e4b Author: Gustavo Pimentel Date: Thu Feb 18 20:03:58 2021 +0100 PCI: Add pci_find_vsec_capability() to find a specific VSEC Add pci_find_vsec_capability() to locate a Vendor-Specific Extended Capability with the specified VSEC ID. The Vendor-Specific Extended Capability (VSEC) allows one or more proprietary capabilities defined by the vendor which aren't standard or shared between vendors. Signed-off-by: Gustavo Pimentel Acked-by: Bjorn Helgaas Link: https://lore.kernel.org/r/d89506834fb11c6fa0bd5d515c0dd55b13ac6958.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit e0c1d53891c43a70c9fa85ddb3174ab5afd7e2ec Author: Gustavo Pimentel Date: Thu Feb 18 20:03:57 2021 +0100 dmaengine: dw-edma: Add support for the HDMA feature Add support for the HDMA feature. This new feature enables the current eDMA IP to use a deeper prefetch of the linked list, which reduces the algorithm execution latency observed when loading the elements of the list, causing more stable and higher data transfer. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/5f40f89ef7d6255a12d5b23f34e6e59dcd28861e.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit b79f17517ad8c928c3acb1c89bcca9e242b29c84 Author: Gustavo Pimentel Date: Thu Feb 18 20:03:56 2021 +0100 dmaengine: dw-edma: Fix comments offset characters' alignment Fix comments offset characters' alignment to follow the same structure of similar comments. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/8e0e1e46e1c1a78fe62d08c4ee09fb96254a9393.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit 04e0a39fc10f82a71b84af73351333b184cee578 Author: Gustavo Pimentel Date: Thu Feb 18 20:03:55 2021 +0100 dmaengine: dw-edma: Add writeq() and readq() for 64 bits architectures Add writeq() and readq() for 64 bits architures support. Supporting these two functions will allow the write or the read of eDMA 64 bits registers at once instead of having two consecutive operations. Also, this improvement will allow the PCI optimization transaction messages, which will generate a 64 bits message instead of two messages of 32 bits. Signed-off-by: Gustavo Pimentel Link: https://lore.kernel.org/r/3f1120f7c6003b38ec8b851fc68936007c4d9fd8.1613674948.git.gustavo.pimentel@synopsys.com Signed-off-by: Vinod Koul commit 7cea2a3c505e87a9d6afc78be4a7f7be636a73a7 Author: Amir Goldstein Date: Thu Mar 4 13:29:21 2021 +0200 fanotify: support limited functionality for unprivileged users Add limited support for unprivileged fanotify groups. An unprivileged users is not allowed to get an open file descriptor in the event nor the process pid of another process. An unprivileged user cannot request permission events, cannot set mount/filesystem marks and cannot request unlimited queue/marks. This enables the limited functionality similar to inotify when watching a set of files and directories for OPEN/ACCESS/MODIFY/CLOSE events, without requiring SYS_CAP_ADMIN privileges. The FAN_REPORT_DFID_NAME init flag, provide a method for an unprivileged listener watching a set of directories (with FAN_EVENT_ON_CHILD) to monitor all changes inside those directories. This typically requires that the listener keeps a map of watched directory fid to dirfd (O_PATH), where fid is obtained with name_to_handle_at() before starting to watch for changes. When getting an event, the reported fid of the parent should be resolved to dirfd and fstatsat(2) with dirfd and name should be used to query the state of the filesystem entry. Link: https://lore.kernel.org/r/20210304112921.3996419-3-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 5b8fea65d197f408bb00b251c70d842826d6b70b Author: Amir Goldstein Date: Thu Mar 4 13:29:20 2021 +0200 fanotify: configurable limits via sysfs fanotify has some hardcoded limits. The only APIs to escape those limits are FAN_UNLIMITED_QUEUE and FAN_UNLIMITED_MARKS. Allow finer grained tuning of the system limits via sysfs tunables under /proc/sys/fs/fanotify, similar to tunables under /proc/sys/fs/inotify, with some minor differences. - max_queued_events - global system tunable for group queue size limit. Like the inotify tunable with the same name, it defaults to 16384 and applies on initialization of a new group. - max_user_marks - user ns tunable for marks limit per user. Like the inotify tunable named max_user_watches, on a machine with sufficient RAM and it defaults to 1048576 in init userns and can be further limited per containing user ns. - max_user_groups - user ns tunable for number of groups per user. Like the inotify tunable named max_user_instances, it defaults to 128 in init userns and can be further limited per containing user ns. The slightly different tunable names used for fanotify are derived from the "group" and "mark" terminology used in the fanotify man pages and throughout the code. Considering the fact that the default value for max_user_instances was increased in kernel v5.10 from 8192 to 1048576, leaving the legacy fanotify limit of 8192 marks per group in addition to the max_user_marks limit makes little sense, so the per group marks limit has been removed. Note that when a group is initialized with FAN_UNLIMITED_MARKS, its own marks are not accounted in the per user marks account, so in effect the limit of max_user_marks is only for the collection of groups that are not initialized with FAN_UNLIMITED_MARKS. Link: https://lore.kernel.org/r/20210304112921.3996419-2-amir73il@gmail.com Suggested-by: Jan Kara Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit b8cd0ee8cda68a888a317991c1e918a8cba1a568 Author: Amir Goldstein Date: Thu Mar 4 12:48:26 2021 +0200 fanotify: limit number of event merge attempts Event merges are expensive when event queue size is large, so limit the linear search to 128 merge tests. In combination with 128 size hash table, there is a potential to merge with up to 16K events in the hashed queue. Link: https://lore.kernel.org/r/20210304104826.3993892-6-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 94e00d28a680dff18805ca472b191364347d2234 Author: Amir Goldstein Date: Thu Mar 4 12:48:25 2021 +0200 fsnotify: use hash table for faster events merge In order to improve event merge performance, hash events in a 128 size hash table by the event merge key. The fanotify_event size grows by two pointers, but we just reduced its size by removing the objectid member, so overall its size is increased by one pointer. Permission events and overflow event are not merged so they are also not hashed. Link: https://lore.kernel.org/r/20210304104826.3993892-5-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 6cf9dc238cacee9b0e519d4530181a45639d4503 Author: Christian König Date: Thu Feb 11 13:00:25 2021 +0100 drm/vmwgfx: clean up vmw_move_notify v2 Instead of swapping bo->mem just give old and new as parameters. Also drop unused parameters and code. v2: cleanup stale documentation as well. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210315191432.153826-3-christian.koenig@amd.com commit 5ea143c38e14443c1fe1fa6353e9a752bae1ede7 Author: Christian König Date: Thu Feb 11 12:35:23 2021 +0100 drm/nouveau: clean up nouveau_bo_move_ntfy Just another leftover from a TTM cleanup. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210315191432.153826-2-christian.koenig@amd.com commit f1c68b6a3283032d67546a983d9b4cfae8b179bc Author: Christian König Date: Thu Feb 11 11:08:54 2021 +0100 drm/qxl: clean up qxl_bo_move_notify Remove the unused evict parameter and drop swapping bo->mem. Signed-off-by: Christian König Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20210315191432.153826-1-christian.koenig@amd.com commit 7e3e5c6943994943eb76cab2d3a1806bc10b9045 Author: Amir Goldstein Date: Thu Mar 4 12:48:24 2021 +0200 fanotify: mix event info and pid into merge key hash Improve the merge key hash by mixing more values relevant for merge. For example, all FAN_CREATE name events in the same dir used to have the same merge key based on the dir inode. With this change the created file name is mixed into the merge key. The object id that was used as merge key is redundant to the event info so it is no longer mixed into the hash. Permission events are not hashed, so no need to hash their info. Link: https://lore.kernel.org/r/20210304104826.3993892-4-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 8988f11abb820bacfcc53d498370bfb30f792ec4 Author: Amir Goldstein Date: Thu Mar 4 12:48:23 2021 +0200 fanotify: reduce event objectid to 29-bit hash objectid is only used by fanotify backend and it is just an optimization for event merge before comparing all fields in event. Move the objectid member from common struct fsnotify_event into struct fanotify_event and reduce it to 29-bit hash to cram it together with the 3-bit event type. Events of different types are never merged, so the combination of event type and hash form a 32-bit key for fast compare of events. This reduces the size of events by one pointer and paves the way for adding hashed queue support for fanotify. Link: https://lore.kernel.org/r/20210304104826.3993892-3-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit 6f73171e192366ff7c98af9fb50615ef9615f8a7 Author: Amir Goldstein Date: Thu Mar 4 12:48:22 2021 +0200 fsnotify: allow fsnotify_{peek,remove}_first_event with empty queue Current code has an assumtion that fsnotify_notify_queue_is_empty() is called to verify that queue is not empty before trying to peek or remove an event from queue. Remove this assumption by moving the fsnotify_notify_queue_is_empty() into the functions, allow them to return NULL value and check return value by all callers. This is a prep patch for multi event queues. Link: https://lore.kernel.org/r/20210304104826.3993892-2-amir73il@gmail.com Signed-off-by: Amir Goldstein Signed-off-by: Jan Kara commit c59773d204cc02cc97b4b8dc4cf87a595204cc9d Author: Rob Herring Date: Thu Mar 11 16:36:40 2021 -0700 kbuild: Enable DT undocumented compatible checks dt-validate has an option to warn on any compatible strings which don't match any schema. The option has recently been improved to fix false positives, so let's enable the option. This is useful for tracking compatibles which are undocumented or not yet converted to DT schema. Previously, the only check of undocumented compatible strings has been an imperfect checkpatch.pl check. The option is enabled by default for 'dtbs_check'. This will add more warnings, but some platforms are down to only a handful of these warnings (good job!). There's about 100 cases in the binding examples, so the option is disabled until these are fixed. In the meantime, they can be checked with: make DT_CHECKER_FLAGS=-m dt_binding_check Cc: Maxime Ripard Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210311233640.1581526-2-robh@kernel.org commit 1987c55139c9ebe1bed48490c49cfe266cd35ac8 Author: Julian Wiedmann Date: Tue Mar 16 10:45:13 2021 +0100 s390/dasd: let driver core manage the sysfs attributes Wire up device_driver->dev_groups, so that really_probe() creates the sysfs attributes for us automatically. Signed-off-by: Julian Wiedmann Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20210316094513.2601218-3-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 86f0a011e548774fd8eb952f67bfeb19f3174dd0 Author: Julian Wiedmann Date: Tue Mar 16 10:45:12 2021 +0100 s390/dasd: remove dasd_fba_probe() wrapper commit e03c5941f904 ("s390/dasd: Remove unused parameter from dasd_generic_probe()") allows us to wire the generic callback up directly, avoiding the additional level of indirection. While at it also remove the forward declaration for the dasd_fba_driver struct, it's no longer needed. Signed-off-by: Julian Wiedmann Reviewed-by: Jan Hoeppner Signed-off-by: Stefan Haberland Link: https://lore.kernel.org/r/20210316094513.2601218-2-sth@linux.ibm.com Signed-off-by: Jens Axboe commit 17486960d79b900c45e0bb8fbcac0262848582ba Author: Jiri Kosina Date: Tue Mar 16 15:08:00 2021 +0100 Bluetooth: avoid deadlock between hci_dev->lock and socket lock Commit eab2404ba798 ("Bluetooth: Add BT_PHY socket option") added a dependency between socket lock and hci_dev->lock that could lead to deadlock. It turns out that hci_conn_get_phy() is not in any way relying on hdev being immutable during the runtime of this function, neither does it even look at any of the members of hdev, and as such there is no need to hold that lock. This fixes the lockdep splat below: ====================================================== WARNING: possible circular locking dependency detected 5.12.0-rc1-00026-g73d464503354 #10 Not tainted ------------------------------------------------------ bluetoothd/1118 is trying to acquire lock: ffff8f078383c078 (&hdev->lock){+.+.}-{3:3}, at: hci_conn_get_phy+0x1c/0x150 [bluetooth] but task is already holding lock: ffff8f07e831d920 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: l2cap_sock_getsockopt+0x8b/0x610 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}: lock_sock_nested+0x72/0xa0 l2cap_sock_ready_cb+0x18/0x70 [bluetooth] l2cap_config_rsp+0x27a/0x520 [bluetooth] l2cap_sig_channel+0x658/0x1330 [bluetooth] l2cap_recv_frame+0x1ba/0x310 [bluetooth] hci_rx_work+0x1cc/0x640 [bluetooth] process_one_work+0x244/0x5f0 worker_thread+0x3c/0x380 kthread+0x13e/0x160 ret_from_fork+0x22/0x30 -> #2 (&chan->lock#2/1){+.+.}-{3:3}: __mutex_lock+0xa3/0xa10 l2cap_chan_connect+0x33a/0x940 [bluetooth] l2cap_sock_connect+0x141/0x2a0 [bluetooth] __sys_connect+0x9b/0xc0 __x64_sys_connect+0x16/0x20 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #1 (&conn->chan_lock){+.+.}-{3:3}: __mutex_lock+0xa3/0xa10 l2cap_chan_connect+0x322/0x940 [bluetooth] l2cap_sock_connect+0x141/0x2a0 [bluetooth] __sys_connect+0x9b/0xc0 __x64_sys_connect+0x16/0x20 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae -> #0 (&hdev->lock){+.+.}-{3:3}: __lock_acquire+0x147a/0x1a50 lock_acquire+0x277/0x3d0 __mutex_lock+0xa3/0xa10 hci_conn_get_phy+0x1c/0x150 [bluetooth] l2cap_sock_getsockopt+0x5a9/0x610 [bluetooth] __sys_getsockopt+0xcc/0x200 __x64_sys_getsockopt+0x20/0x30 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae other info that might help us debug this: Chain exists of: &hdev->lock --> &chan->lock#2/1 --> sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP); lock(&chan->lock#2/1); lock(sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP); lock(&hdev->lock); *** DEADLOCK *** 1 lock held by bluetoothd/1118: #0: ffff8f07e831d920 (sk_lock-AF_BLUETOOTH-BTPROTO_L2CAP){+.+.}-{0:0}, at: l2cap_sock_getsockopt+0x8b/0x610 [bluetooth] stack backtrace: CPU: 3 PID: 1118 Comm: bluetoothd Not tainted 5.12.0-rc1-00026-g73d464503354 #10 Hardware name: LENOVO 20K5S22R00/20K5S22R00, BIOS R0IET38W (1.16 ) 05/31/2017 Call Trace: dump_stack+0x7f/0xa1 check_noncircular+0x105/0x120 ? __lock_acquire+0x147a/0x1a50 __lock_acquire+0x147a/0x1a50 lock_acquire+0x277/0x3d0 ? hci_conn_get_phy+0x1c/0x150 [bluetooth] ? __lock_acquire+0x2e1/0x1a50 ? lock_is_held_type+0xb4/0x120 ? hci_conn_get_phy+0x1c/0x150 [bluetooth] __mutex_lock+0xa3/0xa10 ? hci_conn_get_phy+0x1c/0x150 [bluetooth] ? lock_acquire+0x277/0x3d0 ? mark_held_locks+0x49/0x70 ? mark_held_locks+0x49/0x70 ? hci_conn_get_phy+0x1c/0x150 [bluetooth] hci_conn_get_phy+0x1c/0x150 [bluetooth] l2cap_sock_getsockopt+0x5a9/0x610 [bluetooth] __sys_getsockopt+0xcc/0x200 __x64_sys_getsockopt+0x20/0x30 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7fb73df33eee Code: 48 8b 0d 85 0f 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 52 0f 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007fffcfbbbf08 EFLAGS: 00000203 ORIG_RAX: 0000000000000037 RAX: ffffffffffffffda RBX: 0000000000000019 RCX: 00007fb73df33eee RDX: 000000000000000e RSI: 0000000000000112 RDI: 0000000000000018 RBP: 0000000000000000 R08: 00007fffcfbbbf44 R09: 0000000000000000 R10: 00007fffcfbbbf3c R11: 0000000000000203 R12: 0000000000000000 R13: 0000000000000018 R14: 0000000000000000 R15: 0000556fcefc70d0 Fixes: eab2404ba798 ("Bluetooth: Add BT_PHY socket option") Signed-off-by: Jiri Kosina Signed-off-by: Marcel Holtmann commit 5c982c58752118b6c1f295024d3fda5ff22d3c52 Author: Krzysztof Kozlowski Date: Tue Mar 16 11:02:05 2021 +0100 genirq: Fix typos and misspellings in comments No functional change. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20210316100205.23492-1-krzysztof.kozlowski@canonical.com commit 3a0ade0c521a542f8a25e96ce8ea0dfaa532ac75 Author: Davidlohr Bueso Date: Sat Mar 6 13:36:58 2021 -0800 tasklet: Remove tasklet_kill_immediate Ever since RCU was converted to softirq, it has no users. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Acked-by: Paul E. McKenney Link: https://lore.kernel.org/r/20210306213658.12862-1-dave@stgolabs.net commit df41a5dad586c8ead1bb7082b4b6fcb563e02199 Author: Heikki Krogerus Date: Wed Mar 3 18:28:14 2021 +0300 spi: Remove support for dangling device properties >From now on only accepting complete software nodes. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210303152814.35070-5-heikki.krogerus@linux.intel.com Signed-off-by: Mark Brown commit d4272a7adf26c62c5afe86b6829712de519b4a26 Author: Heikki Krogerus Date: Wed Mar 3 18:28:13 2021 +0300 ARM: pxa: zeus: Constify the software node When device properties are supplied to the devices, in reality a software fwnode that holds those properties is created which is then assigned to the device. If the device properties are constant the software node can also be constant. Signed-off-by: Heikki Krogerus Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Link: https://lore.kernel.org/r/20210303152814.35070-4-heikki.krogerus@linux.intel.com Signed-off-by: Mark Brown commit 2df0c4a640c55c0eff7f97907b98ad6fdfedd226 Author: Heikki Krogerus Date: Wed Mar 3 18:28:12 2021 +0300 ARM: pxa: icontrol: Constify the software node When device properties are supplied to the devices, in reality a software fwnode that holds those properties is created which is then assigned to the device. If the device properties are constant the software node can also be constant. Signed-off-by: Heikki Krogerus Cc: Daniel Mack Cc: Haojian Zhuang Cc: Robert Jarzmik Link: https://lore.kernel.org/r/20210303152814.35070-3-heikki.krogerus@linux.intel.com Signed-off-by: Mark Brown commit 47afc77bbfeac163d81c7a675d608c18561aa680 Author: Heikki Krogerus Date: Wed Mar 3 18:28:11 2021 +0300 spi: Add support for software nodes Making it possible for the drivers to assign complete software fwnodes to the devices instead of only the device properties in those nodes. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210303152814.35070-2-heikki.krogerus@linux.intel.com Signed-off-by: Mark Brown commit 2e2bf6d479616a15c54c4e668558f61caffa4db4 Author: Yang Li Date: Thu Mar 4 17:08:01 2021 +0800 ASoC: imx-hdmi: fix platform_no_drv_owner.cocci warnings ./sound/soc/fsl/imx-hdmi.c:226:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/1614848881-29637-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 19c6a63ced5e07e40f3a5255cb1f0fe0d3be7b14 Author: Mikhail Durnev Date: Tue Mar 16 14:47:35 2021 +1000 ASoC: rsnd: core: Check convert rate in rsnd_hw_params snd_pcm_hw_params_set_rate_near can return incorrect sample rate in some cases, e.g. when the backend output rate is set to some value higher than 48000 Hz and the input rate is 8000 Hz. So passing the value returned by snd_pcm_hw_params_set_rate_near to snd_pcm_hw_params will result in "FSO/FSI ratio error" and playing no audio at all while the userland is not properly notified about the issue. If SRC is unable to convert the requested sample rate to the sample rate the backend is using, then the requested sample rate should be adjusted in rsnd_hw_params. The userland will be notified about that change in the returned hw_params structure. Signed-off-by: Mikhail Durnev Link: https://lore.kernel.org/r/1615870055-13954-1-git-send-email-mikhail_durnev@mentor.com Signed-off-by: Mark Brown commit 1d49439c04792a4a3d8299a32b7673ab7ba13b77 Author: Fabio Estevam Date: Mon Mar 15 16:38:42 2021 -0300 ASoC: mx27vis: Remove unused file i.MX has been converted to a devicetree-only platform and asoc-mx27vis.h is no longer used. Get rid of this unused file. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210315193842.183042-1-festevam@gmail.com Signed-off-by: Mark Brown commit 6ad864ed6ac50f11a6d8575fda79991cca8f245c Author: Viorel Suman Date: Tue Mar 16 17:42:16 2021 +0800 ASoC: fsl_spdif: use snd_ctl_boolean_mono_info Remove redundant code and use snd_ctl_boolean_mono_info instead. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1615887736-31217-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 97f53046d746bef513d5fbaac53eedb011968407 Author: Guennadi Liakhovetski Date: Mon Mar 15 11:39:32 2021 -0500 ASoC: SOF: remove superfluous NULL check in debugfs read When reading from IPC flood debugfs entries no need to check whether .cache_buf is NULL - it's impossible since otherwise the initialisation would have failed. This also fixes a klocwork reported issue: passed to function and may be dereferenced there by passing argument 2 to function 'memcpy' at line 510. sound/soc/sof/debug.c:510 | sof_dfsentry_read() Reported-by: Keqiao Zhang Reviewed-by: Ranjani Sridharan Reviewed-by: Xiuli Pan Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210315163932.18663-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 72c35856b5edc3f734be5699e9f6737190a1d897 Author: Guennadi Liakhovetski Date: Mon Mar 15 11:39:31 2021 -0500 ASoC: SOF: only allocate debugfs cache buffers for IPC flood entries snd_sof_debugfs_buf_item() is an exported function and is called from different locations to initialise different debugfs entries. However .cache_buf is only needed for IPC flood entries. Limit allocations respectively. Reviewed-by: Ranjani Sridharan Reviewed-by: Xiuli Pan Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210315163932.18663-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 11fd6d8e097b5b179ea445e0206aaefc47e62845 Author: Guennadi Liakhovetski Date: Mon Mar 15 11:39:30 2021 -0500 ASoC: SOF: fix debugfs initialisation error handling If debugfs initialisation fails partially in sof_probe_continue() some debugfs files and the root directory might have been created successfully. They have to be cleaned up if some of them failed too. Reviewed-by: Ranjani Sridharan Reviewed-by: Xiuli Pan Signed-off-by: Guennadi Liakhovetski Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210315163932.18663-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5ac1b909e5b60cc2735bd9174f631dc2c7f44c5a Author: Seiya Wang Date: Tue Mar 16 19:14:38 2021 +0800 dt-bindings: spi: Add compatible for Mediatek MT8195 This commit adds dt-binding documentation of spi nor for Mediatek MT8195 SoC Platform. Signed-off-by: Seiya Wang Link: https://lore.kernel.org/r/20210316111443.3332-6-seiya.wang@mediatek.com Signed-off-by: Mark Brown commit 40e1a70b4aedf2859a1829991b48ef0ebe650bf2 Author: Noralf Trønnes Date: Sat Mar 13 12:25:45 2021 +0100 drm: Add GUD USB Display driver This adds a USB display driver with the intention that it can be used with future USB interfaced low end displays/adapters. The Linux gadget device driver will serve as the canonical device implementation. The following DRM properties are supported: - Plane rotation - Connector TV properties There is also support for backlight brightness exposed as a backlight device. Display modes can be made available to the host driver either as DRM display modes or through EDID. If both are present, EDID is just passed on to userspace. Performance is preferred over color depth, so if the device supports RGB565, DRM_CAP_DUMB_PREFERRED_DEPTH will return 16. If the device transfer buffer can't fit an uncompressed framebuffer update, the update is split up into parts that do fit. Optimal user experience is achieved by providing damage reports either by setting FB_DAMAGE_CLIPS on pageflips or calling DRM_IOCTL_MODE_DIRTYFB. LZ4 compression is used if the device supports it. The driver supports a one bit monochrome transfer format: R1. This is not implemented in the gadget driver. It is added in preparation for future monochrome e-ink displays. The driver is MIT licensed to smooth the path for any BSD port of the driver. v2: - Use devm_drm_dev_alloc() and drmm_mode_config_init() - drm_fbdev_generic_setup: Use preferred_bpp=0, 16 was a copy paste error - The drm_backlight_helper is dropped, copy in the code - Support protocol version backwards compatibility for device v3: - Use donated Openmoko USB pid - Use direct compression from framebuffer when pitch matches, not only on full frames, so split updates can benefit - Use __le16 in struct gud_drm_req_get_connector_status - Set edid property when the device only provides edid - Clear compression fields in struct gud_drm_req_set_buffer - Fix protocol version negotiation - Remove mode->vrefresh, it's calculated v4: - Drop the status req polling which was a workaround for something that turned out to be a dwc2 udc driver problem - Add a flag for the Linux gadget to require a status request on SET operations. Other devices will only get status req on STALL errors - Use protocol specific error codes (Peter) - Add a flag for devices that want to receive the entire framebuffer on each flush (Lubomir) - Retry a failed framebuffer flush - If mode has changed wait for worker and clear pending damage before queuing up new damage, fb width/height might have changed - Increase error counter on bulk transfer failures - Use DRM_MODE_CONNECTOR_USB - Handle R1 kmalloc error (Peter) - Don't try and replicate the USB get descriptor request standard for the display descriptor (Peter) - Make max_buffer_size optional (Peter), drop the pow2 requirement since it's not necessary anymore. - Don't pre-alloc a control request buffer, it was only 4k - Let gud.h describe the whole protocol explicitly and don't let DRM leak into it (Peter) - Drop display mode .hskew and .vscan from the protocol - Shorten names: s/GUD_DRM_/GUD_/ s/gud_drm_/gud_/ (Peter) - Fix gud_pipe_check() connector picking when switching connector - Drop gud_drm_driver_gem_create_object() cached is default now - Retrieve USB device from struct drm_device.dev instead of keeping a pointer - Honour fb->offsets[0] - Fix mode fetching when connector status is forced - Check EDID length reported by the device - Use drm_do_get_edid() so userspace can overrride EDID - Set epoch counter to signal connector status change - gud_drm_driver can be const now v5: - GUD_DRM_FORMAT_R1: Use non-human ascii values (Daniel) - Change name to: GUD USB Display (Thomas, Simon) - Change one __u32 -> __le32 in protocol header - Always log fb flush errors, unless the previous one failed - Run backlight update in a worker to avoid upsetting lockdep (Daniel) - Drop backlight_ops.get_brightness, there's no readback from the device so it doesn't really add anything. - Set dma mask, needed by dma-buf importers v6: - Use obj-y in Makefile (Peter) - Fix missing le32_to_cpu() when using GUD_DISPLAY_MAGIC (Peter) - Set initial brightness on backlight device v7: - LZ4_compress_default() can return zero, check for that - Fix memory leak in gud_pipe_check() error path (Peter) - Improve debug and error messages (Peter) - Don't pass length in protocol structs (Peter) - Pass USB interface to gud_usb_control_msg() et al. (Peter) - Improve gud_connector_fill_properties() (Peter) - Add GUD_PIXEL_FORMAT_RGB111 (Peter) - Remove GUD_REQ_SET_VERSION (Peter) - Fix DRM_IOCTL_MODE_OBJ_SETPROPERTY and the rotation property - Fix dma-buf import (Thomas) v8: - Forgot to filter RGB111 from reaching userspace - Handle a device that only returns unknown device properties (Peter) - s/GUD_PIXEL_FORMAT_RGB111/GUD_PIXEL_FORMAT_XRGB1111/ (Peter) - Fix R1 and XRGB1111 format conversion - Add FIXME about Big Endian being broken (Peter, Ilia) Cc: Lubomir Rintel Acked-by: Daniel Vetter Reviewed-by: Peter Stuge Tested-by: Peter Stuge Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210313112545.37527-4-noralf@tronnes.org commit 918ce05bbe52df43849a803010b4d2bcd31ea69c Author: Greg Kroah-Hartman Date: Mon Mar 15 16:44:13 2021 +0100 staging: gasket: remove it from the kernel As none of the proposed things that need to be changed in the gasket drivers have ever been done, and there has not been any forward progress to get this out of staging, it seems totally abandonded so remove the code entirely so that people do not spend their time doing tiny cleanups for code that will never get out of staging. If this code is actually being used, it can be reverted simply and then cleaned up properly, but as it is abandoned, let's just get rid of it. Cc: Todd Poynor Cc: Ben Chan Cc: Richard Yeh Acked-by: Rob Springer Link: https://lore.kernel.org/r/20210315154413.3084149-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit dc659a4e852b591771fc2e5abb60f4455b0cf316 Author: Noralf Trønnes Date: Sat Mar 13 12:25:44 2021 +0100 drm/probe-helper: Check epoch counter in output_poll_execute() drm_helper_hpd_irq_event() checks the epoch counter to determine connector status change. This was introduced in commit 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector"). Do the same for output_poll_execute() so it can detect other changes beside connection status value changes. v2: - Add Fixes tag (Daniel) Fixes: 5186421cbfe2 ("drm: Introduce epoch counter to drm_connector") Reviewed-by: Daniel Vetter Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210313112545.37527-3-noralf@tronnes.org commit 757e26712337be6be70f7405c38cc0639957eedc Author: Noralf Trønnes Date: Sat Mar 13 12:25:43 2021 +0100 drm/uapi: Add USB connector type Add a connector type for USB connected display panels. Some examples of what current userspace will name the connector: - Weston: "UNNAMED-%d" - Mutter: "Unknown20-%d" - X: "Unknown20-%d" v2: - Update drm_connector_enum_list - Add examples to commit message Acked-by: Daniel Vetter Signed-off-by: Noralf Trønnes Link: https://patchwork.freedesktop.org/patch/msgid/20210313112545.37527-2-noralf@tronnes.org commit 6e3e14c9385c3cfb35f9da4f495acdd21f9bc25b Author: jeson.gao Date: Mon Mar 15 16:25:37 2021 +0800 thermal/core/power_allocator: Using round the division when re-divvying up power The division is used directly in re-divvying up power, the decimal part will be discarded, devices will get less than the extra_actor_power - 1. if using round the division to make the calculation more accurate. For example: actor0 received more than its max_power, it has the extra_power 759 actor1 received less than its max_power, it require extra_actor_power 395 actor2 received less than its max_power, it require extra_actor_power 365 actor1 and actor2 require the total capped_extra_power 760 using division in re-divvying up power actor1 would actually get the extra_actor_power 394 actor2 would actually get the extra_actor_power 364 if using round the division in re-divvying up power actor1 would actually get the extra_actor_power 394 actor2 would actually get the extra_actor_power 365 Signed-off-by: Jeson Gao Reviewed-by: Lukasz Luba Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1615796737-4688-1-git-send-email-gao.yunxiao6@gmail.com commit 0257aec21b35cc32026960a4ce4c3cb83ea279d9 Author: Fabio Aiuto Date: Mon Mar 15 11:17:37 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_ODM_ADAPTIVITY remove conditional code blocks checked by unused CONFIG_ODM_ADAPTIVITY cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0b2d79045feb7da232a8ffe73b068c9bd59d0284.1615801722.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 50b1bc05219e41f791b12d1584533d2f26c16b95 Author: Fabio Aiuto Date: Mon Mar 15 11:17:22 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_C2H_PACKET_EN remove conditional code blocks checked by unused CONFIG_C2H_PACKET_EN cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/dfb524b34be556c499787b4f057d7c157b577a21.1615801722.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 51b00e7a04995054ca5a45587a5ef0c6b0a35fe7 Author: Fabio Aiuto Date: Mon Mar 15 11:17:09 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SW_CHANNEL_PLAN remove conditional code blocks checked by unused CONFIG_SW_CHANNEL_PLAN cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/fff259ea5895a5875c37ee0cfacd1be6cd5664fb.1615801722.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ea1cc585e910e8746dfbf53c6a40b633d3acab62 Author: Fabio Aiuto Date: Mon Mar 15 11:16:58 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SDIO_TX_TASKLET remove conditional code blocks checked by unused CONFIG_SDIO_TX_TASKLET cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e7f5f364d9f1f6ab271841b203c4de6c82ecfc9f.1615801722.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit f2ee6fee2ea1f59a76a571fcbd1632d87338a894 Author: Fabio Aiuto Date: Mon Mar 15 11:16:47 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_CHECK_BT_HANG remove conditional code blocks checked by unused CONFIG_CHECK_BT_HANG cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e132af0723b34e1ae8a0c4fd6570e45c7bb1402c.1615801722.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9d444d070b08b5e776c43c3354efed89433c8838 Author: Fabio Aiuto Date: Mon Mar 15 11:16:27 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_EXT_CLK remove conditional code blocks checked by unused CONFIG_EXT_CLK cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e50627bb53a8c2d3fcb03a95d8d490e98beff03a.1615801722.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2b25fb31a38d4fe8e745754036052ef8b16fe712 Merge: 41ed4005aa0a9 9317f356df83a Author: Jani Nikula Date: Tue Mar 16 13:42:32 2021 +0200 Merge tag 'gvt-next-2021-03-16' of https://github.com/intel/gvt-linux into drm-intel-next gvt-next-2021-03-16 - Parse accurate vGPU virtual display rate (Colin) - Convert vblank timer as per-vGPU based on current rate (Colin) - spelling fix (Bhaskar) Signed-off-by: Jani Nikula From: Zhenyu Wang Link: https://patchwork.freedesktop.org/patch/msgid/20210316074330.GC1551@zhen-hp.sh.intel.com commit 2c967237f4faef4e37e60846d594b1e22a541f7e Author: Fabio Aiuto Date: Mon Mar 15 11:15:50 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SKIP_SIGNAL_SCALE_MAPPING remove conditional code blocks checked by unused CONFIG_SKIP_SIGNAL_SCALE_MAPPING cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/e21c0b175ba3d8e3310a1f7e94148c10dac7a63c.1615801722.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 29171180e3302ab8a6f6b41ce83d7b1bfef1591c Author: Fabio Aiuto Date: Mon Mar 15 11:15:39 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_BACKGROUND_NOISE_MONITOR remove conditional code blocks checked by unused CONFIG_BACKGROUND_NOISE_MONITOR cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/2872c6f848b8b7aa0dc2d0399123d798f4b18820.1615801722.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2c6accb39c4992ef2bb5c0ae8fc9152067a94165 Author: Fabio Aiuto Date: Mon Mar 15 11:15:26 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_SIGNAL_DISPLAY_DBM remove conditional code blocks checked by unused CONFIG_SIGNAL_DISPLAY_DBM cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/abfd2f2fa0425d8e5d8618dd64ef40b4974c71b4.1615801721.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0960e60e6b4e56abd8b12af1889134fbbfdab807 Author: Fabio Aiuto Date: Mon Mar 15 11:14:38 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_QOS_OPTIMIZATION remove conditional code blocks checked by unused CONFIG_QOS_OPTIMIZATION cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a63664946ac3c79832b7e97c42e825ac5c1ab252.1615801721.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit ff68b038484b2072434f67252c04524923965716 Author: Fabio Aiuto Date: Mon Mar 15 11:14:25 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_HW_PWRP_DETECTION remove conditional code blocks checked by unused CONFIG_HW_PWRP_DETECTION cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a7330c5f934a49ebba43b671d6fb78b50c903504.1615801721.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5306e022ce210453742ae9aad4de9a4ffcf9cb11 Author: Fabio Aiuto Date: Mon Mar 15 11:14:13 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_AUTO_AP_MODE remove conditional code blocks checked by unused CONFIG_AUTO_AP_MODE cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/342607e2b4ba2a19b367705a0b47cac95d601d44.1615801721.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit f5e72ea40f2646a1997ab954f59cd4af712ce2ad Author: zhaoxiao Date: Mon Mar 15 14:12:02 2021 +0800 staging: rtl8192u: fixed no space coding style issue. Added space around the binary operator for readability in r8192U_wx.c file Signed-off-by: zhaoxiao Link: https://lore.kernel.org/r/20210315061202.10219-1-zhaoxiao@uniontech.com Signed-off-by: Greg Kroah-Hartman commit f1bb8a1af024bf9d01015d134580c6dd9bc319bb Author: Qiang Ma Date: Mon Mar 15 11:08:13 2021 +0800 staging: rtl8723bs: add spaces between operators Add spaces between operators for a better readability in function 'rtw_secgetmic'. Signed-off-by: Qiang Ma Link: https://lore.kernel.org/r/20210315030813.19445-1-maqianga@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 16253eca3bde9703ad49478a91b568002a6e1fda Author: Qiang Ma Date: Mon Mar 15 09:56:59 2021 +0800 Staging: rtl8723bs/core: fix space coding style issue Add one space around (on each side of) '*' binary operators. Signed-off-by: Qiang Ma Link: https://lore.kernel.org/r/20210315015659.2402-1-maqianga@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 754db907b27b0755b2f4c8371e0d89929845f67c Author: Madhumitha Prabakaran Date: Sun Mar 14 19:46:41 2021 -0500 staging: vt6655: Rename two dimensional array declaration Rename two dimensional array declaration to fix checkpatch warning: Avoid Camelcase and make the declaration more readable and understandable Signed-off-by: Madhumitha Prabakaran Link: https://lore.kernel.org/r/20210315004641.378933-1-madhumithabiw@gmail.com Signed-off-by: Greg Kroah-Hartman commit ada3334fc1fe850ea8e64de3b5b46d43bf92c72b Author: Fabio Aiuto Date: Sun Mar 14 19:12:40 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_WOWLAN remove conditional code blocks checked by unused CONFIG_WOWLAN cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1d4e09852ff08e7121e9dd6d2d55d819d53ed702.1615744948.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0bb8ece4cb571dde77e93708c137a417a9ad0904 Author: Fabio Aiuto Date: Sun Mar 14 19:12:23 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_PNO_SUPPORT Remove conditional code blocks checked by unused CONFIG_PNO_SUPPORT Cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/a8ba6c7996ba3f08054c433860be2de66b25d942.1615744948.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9dfa23c8de925041b7b45637a1a80a98a22f19dd Author: Sascha Hauer Date: Thu Mar 4 13:35:39 2021 +0100 quota: Add mountpath based quota support Add syscall quotactl_path, a variant of quotactl which allows to specify the mountpath instead of a path of to a block device. The quotactl syscall expects a path to the mounted block device to specify the filesystem to work on. This limits usage to filesystems which actually have a block device. quotactl_path replaces the path to the block device with a path where the filesystem is mounted at. The global Q_SYNC command to sync all filesystems is not supported for this new syscall, otherwise quotactl_path behaves like quotactl. Link: https://lore.kernel.org/r/20210304123541.30749-2-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara commit 2b367a7842331475b6e9b65263bdb3471c3670a7 Author: Marco Cesati Date: Mon Mar 15 18:06:18 2021 +0100 Staging: rtl8723bs: fix spaces in xmit_linux.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #192: FILE: ./os_dep/xmit_linux.c:192: +int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device * pnetdev) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #247: FILE: ./os_dep/xmit_linux.c:247: +int rtw_xmit_entry(struct sk_buff *pkt, struct net_device * pnetdev) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-58-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit c35ddab38cdd31d46976bf8f2240f88886ec4984 Author: Marco Cesati Date: Mon Mar 15 18:06:17 2021 +0100 Staging: rtl8723bs: fix spaces in osdep_service.c This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #50: FILE: ./os_dep/osdep_service.c:50: +inline int _rtw_netif_rx(struct net_device * ndev, struct sk_buff *skb) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-57-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit b559a1cbdf3acb0467c9fe8f6506af976ef1b15d Author: Marco Cesati Date: Mon Mar 15 18:06:16 2021 +0100 Staging: rtl8723bs: fix spaces in os_intfs.c This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #208: FILE: ./os_dep/os_intfs.c:208: +static void loadparam(struct adapter *padapter, struct net_device * pnetdev) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-56-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 96bad5d4a6d183892900b4181da956d339bc4fbe Author: Marco Cesati Date: Mon Mar 15 18:06:15 2021 +0100 Staging: rtl8723bs: fix spaces in xmit_osdep.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #28: FILE: ./include/xmit_osdep.h:28: +extern int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device * pnetdev); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #29: FILE: ./include/xmit_osdep.h:29: +extern int rtw_xmit_entry(struct sk_buff *pkt, struct net_device * pnetdev); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-55-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 95815c0199d8419aeade3cdc988225993e9f11e7 Author: Marco Cesati Date: Mon Mar 15 18:06:14 2021 +0100 Staging: rtl8723bs: fix spaces in rtw_mlme_ext.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #307: FILE: ./include/rtw_mlme_ext.h:307: + char* str; ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #313: FILE: ./include/rtw_mlme_ext.h:313: + char* str; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #592: FILE: ./include/rtw_mlme_ext.h:592: +int WMM_param_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #595: FILE: ./include/rtw_mlme_ext.h:595: +void HT_caps_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #596: FILE: ./include/rtw_mlme_ext.h:596: +void HT_info_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #599: FILE: ./include/rtw_mlme_ext.h:599: +void ERP_IE_handler(struct adapter *padapter, struct ndis_80211_var_ie * pIE); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #606: FILE: ./include/rtw_mlme_ext.h:606: +void update_capinfo(struct adapter * Adapter, u16 updateCap); ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #633: FILE: ./include/rtw_mlme_ext.h:633: +void report_del_sta_event(struct adapter *padapter, unsigned char* MacAddr, unsigned short reason); ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #634: FILE: ./include/rtw_mlme_ext.h:634: +void report_add_sta_event(struct adapter *padapter, unsigned char* MacAddr, int cam_idx); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-54-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit ac16f6068bd87be006ccd0a047320fe7e1d6c8b5 Author: Marco Cesati Date: Mon Mar 15 18:06:13 2021 +0100 Staging: rtl8723bs: fix spaces in rtw_ioctl_set.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #21: FILE: ./include/rtw_ioctl_set.h:21: +u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep * wep); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #25: FILE: ./include/rtw_ioctl_set.h:25: +u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid * ssid); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-53-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5c964d5c599b719cdd41496f6ce044493e31d54f Author: Marco Cesati Date: Mon Mar 15 18:06:12 2021 +0100 Staging: rtl8723bs: fix spaces in rtw_cmd.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)" #789: FILE: ./include/rtw_cmd.h:789: + void (*func)(void*); ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #827: FILE: ./include/rtw_cmd.h:827: +extern u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network* pnetwork); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-52-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit ba79ec94db8f803bdb2134f23ea55509022c3ad2 Author: Marco Cesati Date: Mon Mar 15 18:06:11 2021 +0100 Staging: rtl8723bs: fix spaces in rtl8723b_xmit.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #446: FILE: ./include/rtl8723b_xmit.h:446: +u8 BWMapping_8723B(struct adapter * Adapter, struct pkt_attrib *pattrib); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #447: FILE: ./include/rtl8723b_xmit.h:447: +u8 SCMapping_8723B(struct adapter * Adapter, struct pkt_attrib *pattrib); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-51-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 80345ec4618a5dd35fe2834194e501792486b169 Author: Marco Cesati Date: Mon Mar 15 18:06:10 2021 +0100 Staging: rtl8723bs: fix spaces in recv_osdep.h This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #17: FILE: ./include/recv_osdep.h:17: +extern void rtw_recv_returnpacket(struct net_device * cnxt, struct sk_buff *preturnedpkt); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-50-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0c31a0f7737c74b0cdffbb1bbb7ff09d044e192d Author: Marco Cesati Date: Mon Mar 15 18:06:09 2021 +0100 Staging: rtl8723bs: fix spaces in osdep_service_linux.h This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #123: FILE: ./include/osdep_service_linux.h:123: +extern struct net_device * rtw_alloc_etherdev(int sizeof_priv); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-49-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 310cebf6b0b2e96cae3a344ef022064465a22c9f Author: Marco Cesati Date: Mon Mar 15 18:06:08 2021 +0100 Staging: rtl8723bs: fix spaces in osdep_service.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #97: FILE: ./include/osdep_service.h:97: +int _rtw_netif_rx(struct net_device * ndev, struct sk_buff *skb); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #145: FILE: ./include/osdep_service.h:145: +extern void rtw_free_netdev(struct net_device * netdev); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-48-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a8b9d86cde126f03b4ab06d8d1151858a23191a3 Author: Marco Cesati Date: Mon Mar 15 18:06:07 2021 +0100 Staging: rtl8723bs: fix spaces in osdep_intf.h This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #73: FILE: ./include/osdep_intf.h:73: +void rtw_ndev_destructor(struct net_device * ndev); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-47-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3701b25ca9858fee6bcd0d40d66ad02b306dc9b2 Author: Marco Cesati Date: Mon Mar 15 18:06:06 2021 +0100 Staging: rtl8723bs: fix spaces in ioctl_cfg80211.h This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo*bar" should be "foo *bar" #109: FILE: ./include/ioctl_cfg80211.h:109: +void rtw_cfg80211_rx_action(struct adapter *adapter, u8 *frame, uint frame_len, const char*msg); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-46-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit ba22afe820523a88c3dfc6c5db8f93ee2f158e58 Author: Marco Cesati Date: Mon Mar 15 18:06:05 2021 +0100 Staging: rtl8723bs: fix spaces in ieee80211.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo*bar" should be "foo *bar" #1001: FILE: ./include/ieee80211.h:1001: +u8 *rtw_get_ie(u8*pbuf, signed int index, signed int *len, signed int limit); ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)" #1029: FILE: ./include/ieee80211.h:1029: + for (ie = (void*)buf; (((u8 *)ie) - ((u8 *)buf) + 1) < buf_len; ie = (void*)(((u8 *)ie) + *(((u8 *)ie)+1) + 2)) ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)" #1029: FILE: ./include/ieee80211.h:1029: + for (ie = (void*)buf; (((u8 *)ie) - ((u8 *)buf) + 1) < buf_len; ie = (void*)(((u8 *)ie) + *(((u8 *)ie)+1) + 2)) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1049: FILE: ./include/ieee80211.h:1049: +u16 rtw_mcs_rate(u8 rf_type, u8 bw_40MHz, u8 short_GI, unsigned char * MCS_rate); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-45-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit d9faf1073e5a002d7dad38d2e80ab6c315ae2c9f Author: Marco Cesati Date: Mon Mar 15 18:06:04 2021 +0100 Staging: rtl8723bs: fix spaces in hal_com_phycfg.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #75: FILE: ./include/hal_com_phycfg.h:75: +struct adapter * Adapter, ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #95: FILE: ./include/hal_com_phycfg.h:95: + u8* RateIndex, ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #96: FILE: ./include/hal_com_phycfg.h:96: + s8* PwrByRateVal, ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #97: FILE: ./include/hal_com_phycfg.h:97: + u8* RateNum ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #107: FILE: ./include/hal_com_phycfg.h:107: +struct adapter * padapter, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #141: FILE: ./include/hal_com_phycfg.h:141: +struct adapter * padapter, ERROR:POINTER_LOCATION: "foo* bar" should be "foo *bar" #145: FILE: ./include/hal_com_phycfg.h:145: +u8* Rates, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #167: FILE: ./include/hal_com_phycfg.h:167: + struct adapter * padapter ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #172: FILE: ./include/hal_com_phycfg.h:172: +struct adapter * padapter, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #189: FILE: ./include/hal_com_phycfg.h:189: +struct adapter * Adapter, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #201: FILE: ./include/hal_com_phycfg.h:201: +struct adapter * Adapter ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #206: FILE: ./include/hal_com_phycfg.h:206: +struct adapter * Adapter ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #218: FILE: ./include/hal_com_phycfg.h:218: +struct adapter * Adapter, Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-44-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit dc3a2ea9db64ec9e7c4affb893490128e2c1da18 Author: Marco Cesati Date: Mon Mar 15 18:06:03 2021 +0100 Staging: rtl8723bs: fix spaces in hal_com_h2c.h This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo*bar" should be "foo *bar" #283: FILE: ./include/hal_com_h2c.h:283: +void rtw_get_sec_iv(struct adapter *padapter, u8*pcur_dot11txpn, u8 *StaAddr); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-43-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit cd327ced51240f2d90e76609bc9d4566173efd23 Author: Marco Cesati Date: Mon Mar 15 18:06:02 2021 +0100 Staging: rtl8723bs: fix spaces in hal_com.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #218: FILE: ./include/hal_com.h:218: + struct adapter * Adapter, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #230: FILE: ./include/hal_com.h:230: +void rtw_init_hal_com_default_value(struct adapter * Adapter); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #282: FILE: ./include/hal_com.h:282: + void * pValue1, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #283: FILE: ./include/hal_com.h:283: + void * pValue2); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #285: FILE: ./include/hal_com.h:285: + struct adapter * Adapter, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #287: FILE: ./include/hal_com.h:287: + void * pValue1, Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-42-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 88c15e77e8960dce403d0d10ea4acc10e9aad782 Author: Marco Cesati Date: Mon Mar 15 18:06:01 2021 +0100 Staging: rtl8723bs: fix spaces in drv_types.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)" #210: FILE: ./include/drv_types.h:210: +#define RGTRY_SZ(field) sizeof(((struct registry_priv*) 0)->field) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #404: FILE: ./include/drv_types.h:404: + void * HalData; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #432: FILE: ./include/drv_types.h:432: + void (*intf_start)(struct adapter * adapter); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #433: FILE: ./include/drv_types.h:433: + void (*intf_stop)(struct adapter * adapter); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #435: FILE: ./include/drv_types.h:435: + struct net_device * pnetdev; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #440: FILE: ./include/drv_types.h:440: + struct net_device * old_pnetdev; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-41-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6aa8b0d561b6bafe84762e2eee948cd97bb9f6d0 Author: Marco Cesati Date: Mon Mar 15 18:06:00 2021 +0100 Staging: rtl8723bs: fix spaces in basic_types.h This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)" #16: FILE: ./include/basic_types.h:16: +#define FIELD_OFFSET(s, field) ((__kernel_ssize_t)&((s*)(0))->field) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-40-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit fc05601e66bc703e3cd530766215a93dd9ef61fb Author: Marco Cesati Date: Mon Mar 15 18:05:59 2021 +0100 Staging: rtl8723bs: fix spaces in HalPwrSeqCmd.h This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #116: FILE: ./include/HalPwrSeqCmd.h:116: + struct adapter * padapter, Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-39-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6980b026207db1b7e490cf12dc06563e271b4fbd Author: Marco Cesati Date: Mon Mar 15 18:05:58 2021 +0100 Staging: rtl8723bs: fix spaces in rtl8723b_phycfg.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #597: FILE: ./hal/rtl8723b_phycfg.c:597: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #598: FILE: ./hal/rtl8723b_phycfg.c:598: + struct FAT_T * pDM_FatTable = &pDM_Odm->DM_FatTable; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-38-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3ecd73ee17f776a7be12c7198b3b7d22de62e346 Author: Marco Cesati Date: Mon Mar 15 18:05:57 2021 +0100 Staging: rtl8723bs: fix spaces in rtl8723b_hal_init.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #586: FILE: ./hal/rtl8723b_hal_init.c:586: + struct EFUSE_HAL * pEfuseHal = &pHalData->EfuseHal; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #867: FILE: ./hal/rtl8723b_hal_init.c:867: + struct EFUSE_HAL * pEfuseHal = &pHalData->EfuseHal; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1006: FILE: ./hal/rtl8723b_hal_init.c:1006: + struct EFUSE_HAL * pEfuseHal = &pHalData->EfuseHal; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1149: FILE: ./hal/rtl8723b_hal_init.c:1149: + struct EFUSE_HAL * pEfuseHal = &pHalData->EfuseHal; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1247: FILE: ./hal/rtl8723b_hal_init.c:1247: + struct EFUSE_HAL * pEfuseHal = &pHalData->EfuseHal; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1552: FILE: ./hal/rtl8723b_hal_init.c:1552: + struct PGPKT_STRUCT * pTargetPkt ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1566: FILE: ./hal/rtl8723b_hal_init.c:1566: + struct PGPKT_STRUCT * pTargetPkt, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1571: FILE: ./hal/rtl8723b_hal_init.c:1571: + struct EFUSE_HAL * pEfuseHal = &pHalData->EfuseHal; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1684: FILE: ./hal/rtl8723b_hal_init.c:1684: + struct PGPKT_STRUCT * pTargetPkt, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1721: FILE: ./hal/rtl8723b_hal_init.c:1721: + struct PGPKT_STRUCT * pTargetPkt, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1788: FILE: ./hal/rtl8723b_hal_init.c:1788: + struct PGPKT_STRUCT * pTargetPkt, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1806: FILE: ./hal/rtl8723b_hal_init.c:1806: + struct PGPKT_STRUCT * pTargetPkt, Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-37-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit e3c15adbbffe2a2d1e5dda06ccdafc815cf1c929 Author: Marco Cesati Date: Mon Mar 15 18:05:56 2021 +0100 Staging: rtl8723bs: fix spaces in rtl8723b_dm.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #28: FILE: ./hal/rtl8723b_dm.c:28: + struct DM_ODM_T * pDM_Odm = &(pHalData->odmpriv); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #77: FILE: ./hal/rtl8723b_dm.c:77: + struct DM_ODM_T * pDM_Odm = &(pHalData->odmpriv); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #132: FILE: ./hal/rtl8723b_dm.c:132: + struct DM_ODM_T * pDM_Odm = &(pHalData->odmpriv); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #206: FILE: ./hal/rtl8723b_dm.c:206: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #232: FILE: ./hal/rtl8723b_dm.c:232: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #233: FILE: ./hal/rtl8723b_dm.c:233: + struct DIG_T * pDM_DigTable = &pDM_Odm->DM_DigTable; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-36-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a5b2ee5f96c79e436e82d4797172a74801b8afe0 Author: Marco Cesati Date: Mon Mar 15 18:05:55 2021 +0100 Staging: rtl8723bs: fix spaces in odm_debug.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #165: FILE: ./hal/odm_debug.h:165: +void ODM_InitDebugSetting(struct DM_ODM_T * pDM_Odm); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-35-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 19da159e1f5451d5d7377a37857032895a5c9e6e Author: Marco Cesati Date: Mon Mar 15 18:05:54 2021 +0100 Staging: rtl8723bs: fix spaces in odm_debug.c This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #10: FILE: ./hal/odm_debug.c:10: +void ODM_InitDebugSetting(struct DM_ODM_T * pDM_Odm) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-34-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit fdf5eec368a7de13c7e30591b36955ee7352499c Author: Marco Cesati Date: Mon Mar 15 18:05:53 2021 +0100 Staging: rtl8723bs: fix spaces in odm_RegConfig8723B.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #10: FILE: ./hal/odm_RegConfig8723B.h:10: +void odm_ConfigRFReg_8723B(struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #17: FILE: ./hal/odm_RegConfig8723B.h:17: +void odm_ConfigRF_RadioA_8723B(struct DM_ODM_T * pDM_Odm, u32 Addr, u32 Data); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #19: FILE: ./hal/odm_RegConfig8723B.h:19: +void odm_ConfigMAC_8723B(struct DM_ODM_T * pDM_Odm, u32 Addr, u8 Data); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #21: FILE: ./hal/odm_RegConfig8723B.h:21: +void odm_ConfigBB_AGC_8723B(struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #27: FILE: ./hal/odm_RegConfig8723B.h:27: +void odm_ConfigBB_PHY_REG_PG_8723B(struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #36: FILE: ./hal/odm_RegConfig8723B.h:36: +void odm_ConfigBB_PHY_8723B(struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #42: FILE: ./hal/odm_RegConfig8723B.h:42: +void odm_ConfigBB_TXPWR_LMT_8723B(struct DM_ODM_T * pDM_Odm, Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-33-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 37237d9a29315bd48c3d21b18021bfe63ed0f0f2 Author: Marco Cesati Date: Mon Mar 15 18:05:52 2021 +0100 Staging: rtl8723bs: fix spaces in odm_RegConfig8723B.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #11: FILE: ./hal/odm_RegConfig8723B.c:11: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #109: FILE: ./hal/odm_RegConfig8723B.c:109: +void odm_ConfigRF_RadioA_8723B(struct DM_ODM_T * pDM_Odm, u32 Addr, u32 Data) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #134: FILE: ./hal/odm_RegConfig8723B.c:134: +void odm_ConfigMAC_8723B(struct DM_ODM_T * pDM_Odm, u32 Addr, u8 Data) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #150: FILE: ./hal/odm_RegConfig8723B.c:150: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #173: FILE: ./hal/odm_RegConfig8723B.c:173: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #201: FILE: ./hal/odm_RegConfig8723B.c:201: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #229: FILE: ./hal/odm_RegConfig8723B.c:229: + struct DM_ODM_T * pDM_Odm, Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-32-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 805b0627ef7263d61e02eb985a6057333d31f4fe Author: Marco Cesati Date: Mon Mar 15 18:05:51 2021 +0100 Staging: rtl8723bs: fix spaces in odm_PathDiv.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #12: FILE: ./hal/odm_PathDiv.c:12: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #25: FILE: ./hal/odm_PathDiv.c:25: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-31-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3493bf17d51ef043d811aeff3c4cfac463c8af64 Author: Marco Cesati Date: Mon Mar 15 18:05:50 2021 +0100 Staging: rtl8723bs: fix spaces in odm_NoiseMonitor.c This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #22: FILE: ./hal/odm_NoiseMonitor.c:22: + struct DM_ODM_T * pDM_Odm, Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-30-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3132ed72425fd241de3404e146a2b29d2b0df02d Author: Marco Cesati Date: Mon Mar 15 18:05:49 2021 +0100 Staging: rtl8723bs: fix spaces in odm_HWConfig.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #125: FILE: ./hal/odm_HWConfig.h:125: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #131: FILE: ./hal/odm_HWConfig.h:131: +enum HAL_STATUS ODM_ConfigRFWithTxPwrTrackHeaderFile(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #134: FILE: ./hal/odm_HWConfig.h:134: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #140: FILE: ./hal/odm_HWConfig.h:140: + struct DM_ODM_T * pDM_Odm, enum ODM_BB_Config_Type ConfigType ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #144: FILE: ./hal/odm_HWConfig.h:144: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #150: FILE: ./hal/odm_HWConfig.h:150: +s32 odm_SignalScaleMapping(struct DM_ODM_T * pDM_Odm, s32 CurrSig); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-29-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1b4495f3097960ff5db54d404dadbe92e2a70aed Author: Marco Cesati Date: Mon Mar 15 18:05:48 2021 +0100 Staging: rtl8723bs: fix spaces in odm_HWConfig.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #26: FILE: ./hal/odm_HWConfig.c:26: +s32 odm_SignalScaleMapping(struct DM_ODM_T * pDM_Odm, s32 CurrSig) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #80: FILE: ./hal/odm_HWConfig.c:80: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #93: FILE: ./hal/odm_HWConfig.c:93: + struct PHY_STATUS_RPT_8192CD_T * pPhyStaRpt = (struct PHY_STATUS_RPT_8192CD_T *)pPhyStatus; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #250: FILE: ./hal/odm_HWConfig.c:250: + struct DM_ODM_T * pDM_Odm, struct odm_phy_info *pPhyInfo, struct odm_packet_info *pPktinfo ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #404: FILE: ./hal/odm_HWConfig.c:404: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #418: FILE: ./hal/odm_HWConfig.c:418: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #434: FILE: ./hal/odm_HWConfig.c:434: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #453: FILE: ./hal/odm_HWConfig.c:453: +enum HAL_STATUS ODM_ConfigRFWithTxPwrTrackHeaderFile(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #468: FILE: ./hal/odm_HWConfig.c:468: + struct DM_ODM_T * pDM_Odm, enum ODM_BB_Config_Type ConfigType Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-28-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 55ccab6f4b2a671575f9d1f72534fb15983a5ad7 Author: Marco Cesati Date: Mon Mar 15 18:05:47 2021 +0100 Staging: rtl8723bs: fix spaces in odm_EdcaTurboCheck.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #34: FILE: ./hal/odm_EdcaTurboCheck.c:34: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #61: FILE: ./hal/odm_EdcaTurboCheck.c:61: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #76: FILE: ./hal/odm_EdcaTurboCheck.c:76: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-27-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9702dbe05ec095511631c9e8c2d10fb42969e92b Author: Marco Cesati Date: Mon Mar 15 18:05:46 2021 +0100 Staging: rtl8723bs: fix spaces in odm_DynamicTxPower.c This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #12: FILE: ./hal/odm_DynamicTxPower.c:12: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-26-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit fa858b2279f562e33e58988ad67d994fb2421592 Author: Marco Cesati Date: Mon Mar 15 18:05:45 2021 +0100 Staging: rtl8723bs: fix in odm_DynamicBBPowerSaving.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #12: FILE: ./hal/odm_DynamicBBPowerSaving.c:12: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #25: FILE: ./hal/odm_DynamicBBPowerSaving.c:25: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-25-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit db07a1ca856f534a2c9bc5bcc7384dfbc962d83a Author: Marco Cesati Date: Mon Mar 15 18:05:44 2021 +0100 Staging: rtl8723bs: fix spaces in odm_DIG.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #14: FILE: ./hal/odm_DIG.c:14: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #30: FILE: ./hal/odm_DIG.c:30: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #41: FILE: ./hal/odm_DIG.c:41: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #51: FILE: ./hal/odm_DIG.c:51: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #59: FILE: ./hal/odm_DIG.c:59: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #72: FILE: ./hal/odm_DIG.c:72: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #136: FILE: ./hal/odm_DIG.c:136: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #208: FILE: ./hal/odm_DIG.c:208: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #236: FILE: ./hal/odm_DIG.c:236: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #325: FILE: ./hal/odm_DIG.c:325: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #326: FILE: ./hal/odm_DIG.c:326: + struct DIG_T * pDM_DigTable = &pDM_Odm->DM_DigTable; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #365: FILE: ./hal/odm_DIG.c:365: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #366: FILE: ./hal/odm_DIG.c:366: + struct DIG_T * pDM_DigTable = &pDM_Odm->DM_DigTable; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #438: FILE: ./hal/odm_DIG.c:438: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #469: FILE: ./hal/odm_DIG.c:469: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #470: FILE: ./hal/odm_DIG.c:470: + struct DIG_T * pDM_DigTable = &pDM_Odm->DM_DigTable; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #507: FILE: ./hal/odm_DIG.c:507: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #510: FILE: ./hal/odm_DIG.c:510: + struct DIG_T * pDM_DigTable = &pDM_Odm->DM_DigTable; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #826: FILE: ./hal/odm_DIG.c:826: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #895: FILE: ./hal/odm_DIG.c:895: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #896: FILE: ./hal/odm_DIG.c:896: + struct false_ALARM_STATISTICS * FalseAlmCnt = &(pDM_Odm->FalseAlmCnt); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1065: FILE: ./hal/odm_DIG.c:1065: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1081: FILE: ./hal/odm_DIG.c:1081: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1082: FILE: ./hal/odm_DIG.c:1082: + struct DIG_T * pDM_DigTable = &pDM_Odm->DM_DigTable; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1083: FILE: ./hal/odm_DIG.c:1083: + struct false_ALARM_STATISTICS * pFalseAlmCnt = &(pDM_Odm->FalseAlmCnt); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1137: FILE: ./hal/odm_DIG.c:1137: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1138: FILE: ./hal/odm_DIG.c:1138: + struct false_ALARM_STATISTICS * FalseAlmCnt = &(pDM_Odm->FalseAlmCnt); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1198: FILE: ./hal/odm_DIG.c:1198: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1199: FILE: ./hal/odm_DIG.c:1199: + struct DIG_T * pDM_DigTable = &pDM_Odm->DM_DigTable; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-24-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit d61a481c00fd802c5beb8488a73c8739054586eb Author: Marco Cesati Date: Mon Mar 15 18:05:43 2021 +0100 Staging: rtl8723bs: fix spaces in odm_CfoTracking.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #12: FILE: ./hal/odm_CfoTracking.c:12: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #13: FILE: ./hal/odm_CfoTracking.c:13: + struct CFO_TRACKING * pCfoTrack = &pDM_Odm->DM_CfoTrack; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #42: FILE: ./hal/odm_CfoTracking.c:42: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #52: FILE: ./hal/odm_CfoTracking.c:52: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #53: FILE: ./hal/odm_CfoTracking.c:53: + struct CFO_TRACKING * pCfoTrack = &pDM_Odm->DM_CfoTrack; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #70: FILE: ./hal/odm_CfoTracking.c:70: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #82: FILE: ./hal/odm_CfoTracking.c:82: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #83: FILE: ./hal/odm_CfoTracking.c:83: + struct CFO_TRACKING * pCfoTrack = &pDM_Odm->DM_CfoTrack; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #94: FILE: ./hal/odm_CfoTracking.c:94: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #95: FILE: ./hal/odm_CfoTracking.c:95: + struct CFO_TRACKING * pCfoTrack = &pDM_Odm->DM_CfoTrack; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #121: FILE: ./hal/odm_CfoTracking.c:121: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #122: FILE: ./hal/odm_CfoTracking.c:122: + struct CFO_TRACKING * pCfoTrack = &pDM_Odm->DM_CfoTrack; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #300: FILE: ./hal/odm_CfoTracking.c:300: + struct DM_ODM_T * pDM_Odm = (struct DM_ODM_T *)pDM_VOID; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #302: FILE: ./hal/odm_CfoTracking.c:302: + struct CFO_TRACKING * pCfoTrack = &pDM_Odm->DM_CfoTrack; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-23-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 30cd25c344539cc6da767283cf78d9183239f9db Author: Marco Cesati Date: Mon Mar 15 18:05:42 2021 +0100 Staging: rtl8723bs: fix spaces in odm.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1371: FILE: ./hal/odm.h:1371: +void ODM_TXPowerTrackingCheck(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1374: FILE: ./hal/odm.h:1374: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1382: FILE: ./hal/odm.h:1382: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1388: FILE: ./hal/odm.h:1388: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1398: FILE: ./hal/odm.h:1398: +void odm_TXPowerTrackingInit(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1400: FILE: ./hal/odm.h:1400: +void ODM_DMInit(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1402: FILE: ./hal/odm.h:1402: +void ODM_DMWatchdog(struct DM_ODM_T * pDM_Odm); /* For common use in the future */ ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1404: FILE: ./hal/odm.h:1404: +void ODM_CmnInfoInit(struct DM_ODM_T * pDM_Odm, enum ODM_CMNINFO_E CmnInfo, u32 Value); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1406: FILE: ./hal/odm.h:1406: +void ODM_CmnInfoHook(struct DM_ODM_T * pDM_Odm, enum ODM_CMNINFO_E CmnInfo, void *pValue); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1409: FILE: ./hal/odm.h:1409: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1415: FILE: ./hal/odm.h:1415: +void ODM_CmnInfoUpdate(struct DM_ODM_T * pDM_Odm, u32 CmnInfo, u64 Value); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1417: FILE: ./hal/odm.h:1417: +void ODM_InitAllTimers(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1419: FILE: ./hal/odm.h:1419: +void ODM_CancelAllTimers(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1421: FILE: ./hal/odm.h:1421: +void ODM_ReleaseAllTimers(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1424: FILE: ./hal/odm.h:1424: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1430: FILE: ./hal/odm.h:1430: +void ODM_DynamicARFBSelect(struct DM_ODM_T * pDM_Odm, u8 rate, bool Collision_State); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-22-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8c86ab13640353f5ec0fedd2dba3ba44633eea2b Author: Marco Cesati Date: Mon Mar 15 18:05:41 2021 +0100 Staging: rtl8723bs: fix spaces in odm.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #285: FILE: ./hal/odm.c:285: +void odm_CommonInfoSelfInit(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #287: FILE: ./hal/odm.c:287: +void odm_CommonInfoSelfUpdate(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #289: FILE: ./hal/odm.c:289: +void odm_CmnInfoInit_Debug(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #291: FILE: ./hal/odm.c:291: +void odm_BasicDbgMessage(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #305: FILE: ./hal/odm.c:305: +void odm_RefreshRateAdaptiveMaskCE(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #309: FILE: ./hal/odm.c:309: +void odm_RSSIMonitorInit(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #311: FILE: ./hal/odm.c:311: +void odm_RSSIMonitorCheckCE(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #313: FILE: ./hal/odm.c:313: +void odm_RSSIMonitorCheck(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #315: FILE: ./hal/odm.c:315: +void odm_SwAntDetectInit(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #323: FILE: ./hal/odm.c:323: +void odm_RefreshRateAdaptiveMask(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #325: FILE: ./hal/odm.c:325: +void ODM_TXPowerTrackingCheck(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #327: FILE: ./hal/odm.c:327: +void odm_RateAdaptiveMaskInit(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #330: FILE: ./hal/odm.c:330: +void odm_TXPowerTrackingInit(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #338: FILE: ./hal/odm.c:338: +void odm_InitHybridAntDiv(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #341: FILE: ./hal/odm.c:341: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #349: FILE: ./hal/odm.c:349: +void odm_SetRxIdleAnt(struct DM_ODM_T * pDM_Odm, u8 Ant, bool bDualPath); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #353: FILE: ./hal/odm.c:353: +void odm_HwAntDiv(struct DM_ODM_T * pDM_Odm); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #363: FILE: ./hal/odm.c:363: +void ODM_DMInit(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #393: FILE: ./hal/odm.c:393: +void ODM_DMWatchdog(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #420: FILE: ./hal/odm.c:420: + struct DIG_T * pDM_DigTable = &pDM_Odm->DM_DigTable; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #448: FILE: ./hal/odm.c:448: +void ODM_CmnInfoInit(struct DM_ODM_T * pDM_Odm, enum ODM_CMNINFO_E CmnInfo, u32 Value) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #560: FILE: ./hal/odm.c:560: +void ODM_CmnInfoHook(struct DM_ODM_T * pDM_Odm, enum ODM_CMNINFO_E CmnInfo, void *pValue) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #689: FILE: ./hal/odm.c:689: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #717: FILE: ./hal/odm.c:717: +void ODM_CmnInfoUpdate(struct DM_ODM_T * pDM_Odm, u32 CmnInfo, u64 Value) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #831: FILE: ./hal/odm.c:831: +void odm_CommonInfoSelfInit(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #841: FILE: ./hal/odm.c:841: +void odm_CommonInfoSelfUpdate(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #867: FILE: ./hal/odm.c:867: +void odm_CmnInfoInit_Debug(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #888: FILE: ./hal/odm.c:888: +void odm_BasicDbgMessage(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #935: FILE: ./hal/odm.c:935: +void odm_RateAdaptiveMaskInit(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #937: FILE: ./hal/odm.c:937: + struct ODM_RATE_ADAPTIVE * pOdmRA = &pDM_Odm->RateAdaptive; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #953: FILE: ./hal/odm.c:953: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1083: FILE: ./hal/odm.c:1083: +void odm_RefreshRateAdaptiveMask(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1094: FILE: ./hal/odm.c:1094: +void odm_RefreshRateAdaptiveMaskCE(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1131: FILE: ./hal/odm.c:1131: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1137: FILE: ./hal/odm.c:1137: + struct ODM_RATE_ADAPTIVE * pRA = &pDM_Odm->RateAdaptive; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1196: FILE: ./hal/odm.c:1196: +void odm_RSSIMonitorInit(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1198: FILE: ./hal/odm.c:1198: + struct RA_T * pRA_Table = &pDM_Odm->DM_RA_Table; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1204: FILE: ./hal/odm.c:1204: +void odm_RSSIMonitorCheck(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1217: FILE: ./hal/odm.c:1217: + struct DM_ODM_T * pDM_Odm = &(pHalData->odmpriv); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1234: FILE: ./hal/odm.c:1234: +void odm_RSSIMonitorCheckCE(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1243: FILE: ./hal/odm.c:1243: + struct RA_T * pRA_Table = &pDM_Odm->DM_RA_Table; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1306: FILE: ./hal/odm.c:1306: +static u8 getSwingIndex(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1330: FILE: ./hal/odm.c:1330: +void odm_TXPowerTrackingInit(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1374: FILE: ./hal/odm.c:1374: +void ODM_TXPowerTrackingCheck(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1398: FILE: ./hal/odm.c:1398: +void odm_SwAntDetectInit(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1400: FILE: ./hal/odm.c:1400: + struct SWAT_T * pDM_SWAT_Table = &pDM_Odm->DM_SWAT_Table; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-21-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit d0f08b4181778607fc6cc456c1820f5794bf42bd Author: Marco Cesati Date: Mon Mar 15 18:05:40 2021 +0100 Staging: rtl8723bs: fix spaces in hal_com_phycfg.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #273: FILE: ./hal/hal_com_phycfg.c:273: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #798: FILE: ./hal/hal_com_phycfg.c:798: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1191: FILE: ./hal/hal_com_phycfg.c:1191: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-20-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a2416c4880ddfd9ed02d2126b861115e7e0bda2e Author: Marco Cesati Date: Mon Mar 15 18:05:39 2021 +0100 Staging: rtl8723bs: fix spaces in hal_com.c This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1292: FILE: ./hal/hal_com.c:1292: + struct DM_ODM_T * podmpriv = &pHalData->odmpriv; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-19-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit d53afe6dfce5e51343df2cda7f4591bb1b65177f Author: Marco Cesati Date: Mon Mar 15 18:05:38 2021 +0100 Staging: rtl8723bs: fix spaces in hal_btcoex.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #70: FILE: ./hal/hal_btcoex.c:70: +static u8 halbtcoutsrc_IsBtCoexistAvailable(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #104: FILE: ./hal/hal_btcoex.c:104: +static void halbtcoutsrc_LeaveLps(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #117: FILE: ./hal/hal_btcoex.c:117: +static void halbtcoutsrc_EnterLps(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #130: FILE: ./hal/hal_btcoex.c:130: +static void halbtcoutsrc_NormalLps(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #152: FILE: ./hal/hal_btcoex.c:152: +static void halbtcoutsrc_LeaveLowPower(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #187: FILE: ./hal/hal_btcoex.c:187: +static void halbtcoutsrc_NormalLowPower(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #196: FILE: ./hal/hal_btcoex.c:196: +static void halbtcoutsrc_DisableLowPower(struct BTC_COEXIST * pBtCoexist, u8 bLowPwrDisable) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #205: FILE: ./hal/hal_btcoex.c:205: +static void halbtcoutsrc_AggregationCheck(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #283: FILE: ./hal/hal_btcoex.c:283: +static u32 halbtcoutsrc_GetWifiLinkStatus(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #311: FILE: ./hal/hal_btcoex.c:311: +static u32 halbtcoutsrc_GetBtPatchVer(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #342: FILE: ./hal/hal_btcoex.c:342: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #448: FILE: ./hal/hal_btcoex.c:448: + struct RT_LINK_DETECT_T * plinkinfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #510: FILE: ./hal/hal_btcoex.c:510: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #645: FILE: ./hal/hal_btcoex.c:645: +static void halbtcoutsrc_DisplayFwPwrModeCmd(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #661: FILE: ./hal/hal_btcoex.c:661: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #673: FILE: ./hal/hal_btcoex.c:673: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #685: FILE: ./hal/hal_btcoex.c:685: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #697: FILE: ./hal/hal_btcoex.c:697: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #709: FILE: ./hal/hal_btcoex.c:709: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #749: FILE: ./hal/hal_btcoex.c:749: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #761: FILE: ./hal/hal_btcoex.c:761: + struct BTC_COEXIST * pBtCoexist = (struct BTC_COEXIST *)pBtcContext; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #772: FILE: ./hal/hal_btcoex.c:772: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #785: FILE: ./hal/hal_btcoex.c:785: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #797: FILE: ./hal/hal_btcoex.c:797: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #809: FILE: ./hal/hal_btcoex.c:809: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #821: FILE: ./hal/hal_btcoex.c:821: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #857: FILE: ./hal/hal_btcoex.c:857: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #869: FILE: ./hal/hal_btcoex.c:869: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #891: FILE: ./hal/hal_btcoex.c:891: + struct BTC_COEXIST * pBtCoexist = &GLBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #917: FILE: ./hal/hal_btcoex.c:917: + struct BTC_COEXIST * pBtCoexist; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #963: FILE: ./hal/hal_btcoex.c:963: +void EXhalbtcoutsrc_PowerOnSetting(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #975: FILE: ./hal/hal_btcoex.c:975: +void EXhalbtcoutsrc_InitHwConfig(struct BTC_COEXIST * pBtCoexist, u8 bWifiOnly) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #988: FILE: ./hal/hal_btcoex.c:988: +void EXhalbtcoutsrc_InitCoexDm(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1003: FILE: ./hal/hal_btcoex.c:1003: +void EXhalbtcoutsrc_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1030: FILE: ./hal/hal_btcoex.c:1030: +void EXhalbtcoutsrc_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1053: FILE: ./hal/hal_btcoex.c:1053: +void EXhalbtcoutsrc_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1082: FILE: ./hal/hal_btcoex.c:1082: +void EXhalbtcoutsrc_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 action) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1108: FILE: ./hal/hal_btcoex.c:1108: +void EXhalbtcoutsrc_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, enum RT_MEDIA_STATUS mediaStatus) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1135: FILE: ./hal/hal_btcoex.c:1135: +void EXhalbtcoutsrc_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 pktType) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1166: FILE: ./hal/hal_btcoex.c:1166: +void EXhalbtcoutsrc_BtInfoNotify(struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1184: FILE: ./hal/hal_btcoex.c:1184: +void EXhalbtcoutsrc_HaltNotify(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1197: FILE: ./hal/hal_btcoex.c:1197: +void EXhalbtcoutsrc_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1213: FILE: ./hal/hal_btcoex.c:1213: +void EXhalbtcoutsrc_Periodical(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1258: FILE: ./hal/hal_btcoex.c:1258: +void EXhalbtcoutsrc_DisplayBtCoexInfo(struct BTC_COEXIST * pBtCoexist) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-18-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6bfa2a5adcfadb036a12b1771e42c6081c9a82fe Author: Marco Cesati Date: Mon Mar 15 18:05:37 2021 +0100 Staging: rtl8723bs: fix spaces in HalPhyRf_8723B.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #19: FILE: ./hal/HalPhyRf_8723B.h:19: +void ConfigureTxpowerTrack_8723B(struct TXPWRTRACK_CFG * pConfig); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #22: FILE: ./hal/HalPhyRf_8723B.h:22: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #29: FILE: ./hal/HalPhyRf_8723B.h:29: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #44: FILE: ./hal/HalPhyRf_8723B.h:44: +void ODM_SetIQCbyRFpath(struct DM_ODM_T * pDM_Odm, u32 RFpath); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #49: FILE: ./hal/HalPhyRf_8723B.h:49: +void PHY_LCCalibrate_8723B(struct DM_ODM_T * pDM_Odm); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-17-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 09ee216cd742f08482bcc85793f268bba7dcb777 Author: Marco Cesati Date: Mon Mar 15 18:05:36 2021 +0100 Staging: rtl8723bs: fix spaces in HalPhyRf_8723B.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #57: FILE: ./hal/HalPhyRf_8723B.c:57: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #138: FILE: ./hal/HalPhyRf_8723B.c:138: +static void setCCKFilterCoefficient(struct DM_ODM_T * pDM_Odm, u8 CCKSwingIndex) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #162: FILE: ./hal/HalPhyRf_8723B.c:162: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #188: FILE: ./hal/HalPhyRf_8723B.c:188: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #363: FILE: ./hal/HalPhyRf_8723B.c:363: + struct DM_ODM_T * pDM_Odm, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #371: FILE: ./hal/HalPhyRf_8723B.c:371: + struct ODM_RF_CAL_T * pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #412: FILE: ./hal/HalPhyRf_8723B.c:412: +void ConfigureTxpowerTrack_8723B(struct TXPWRTRACK_CFG * pConfig) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #440: FILE: ./hal/HalPhyRf_8723B.c:440: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #551: FILE: ./hal/HalPhyRf_8723B.c:551: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #765: FILE: ./hal/HalPhyRf_8723B.c:765: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #872: FILE: ./hal/HalPhyRf_8723B.c:872: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1095: FILE: ./hal/HalPhyRf_8723B.c:1095: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1097: FILE: ./hal/HalPhyRf_8723B.c:1097: + struct ODM_RF_CAL_T * pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1175: FILE: ./hal/HalPhyRf_8723B.c:1175: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1177: FILE: ./hal/HalPhyRf_8723B.c:1177: + struct ODM_RF_CAL_T * pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1250: FILE: ./hal/HalPhyRf_8723B.c:1250: +void ODM_SetIQCbyRFpath(struct DM_ODM_T * pDM_Odm, u32 RFpath) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1253: FILE: ./hal/HalPhyRf_8723B.c:1253: + struct ODM_RF_CAL_T * pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1295: FILE: ./hal/HalPhyRf_8723B.c:1295: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1313: FILE: ./hal/HalPhyRf_8723B.c:1313: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1333: FILE: ./hal/HalPhyRf_8723B.c:1333: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1363: FILE: ./hal/HalPhyRf_8723B.c:1363: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1387: FILE: ./hal/HalPhyRf_8723B.c:1387: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1492: FILE: ./hal/HalPhyRf_8723B.c:1492: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1700: FILE: ./hal/HalPhyRf_8723B.c:1700: +static void phy_LCCalibrate_8723B(struct DM_ODM_T * pDM_Odm, bool is2T) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1787: FILE: ./hal/HalPhyRf_8723B.c:1787: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1833: FILE: ./hal/HalPhyRf_8723B.c:1833: + struct ODM_RF_CAL_T * pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2041: FILE: ./hal/HalPhyRf_8723B.c:2041: +void PHY_LCCalibrate_8723B(struct DM_ODM_T * pDM_Odm) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-16-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a7653b2e9fbb1499f502e55adec662b6139e8850 Author: Marco Cesati Date: Mon Mar 15 18:05:35 2021 +0100 Staging: rtl8723bs: fix spaces in HalPhyRf.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #40: FILE: ./hal/HalPhyRf.h:40: +void ConfigureTxpowerTrack(struct DM_ODM_T * pDM_Odm, struct TXPWRTRACK_CFG * pConfig); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #40: FILE: ./hal/HalPhyRf.h:40: +void ConfigureTxpowerTrack(struct DM_ODM_T * pDM_Odm, struct TXPWRTRACK_CFG * pConfig); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #43: FILE: ./hal/HalPhyRf.h:43: +void ODM_ClearTxPowerTrackingState(struct DM_ODM_T * pDM_Odm); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-15-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1a60aeebb289af0851bb8413dd828b0494475b60 Author: Marco Cesati Date: Mon Mar 15 18:05:34 2021 +0100 Staging: rtl8723bs: fix spaces in HalPhyRf.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #26: FILE: ./hal/HalPhyRf.c:26: +void ConfigureTxpowerTrack(struct DM_ODM_T * pDM_Odm, struct TXPWRTRACK_CFG * pConfig) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #26: FILE: ./hal/HalPhyRf.c:26: +void ConfigureTxpowerTrack(struct DM_ODM_T * pDM_Odm, struct TXPWRTRACK_CFG * pConfig) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #39: FILE: ./hal/HalPhyRf.c:39: +void ODM_ClearTxPowerTrackingState(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #77: FILE: ./hal/HalPhyRf.c:77: + struct DM_ODM_T * pDM_Odm = &pHalData->odmpriv; Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-14-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 427afe037ff3ef0ab0e91d57d5a909a580406072 Author: Marco Cesati Date: Mon Mar 15 18:05:33 2021 +0100 Staging: rtl8723bs: fix spaces in HalHWImg8723B_RF.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #18: FILE: ./hal/HalHWImg8723B_RF.h:18: + struct DM_ODM_T * pDM_Odm ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #27: FILE: ./hal/HalHWImg8723B_RF.h:27: + struct DM_ODM_T * pDM_Odm ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #37: FILE: ./hal/HalHWImg8723B_RF.h:37: + struct DM_ODM_T * pDM_Odm Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-13-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2389266236bbc61711f6b1f00dd07f77ac9041e1 Author: Marco Cesati Date: Mon Mar 15 18:05:32 2021 +0100 Staging: rtl8723bs: fix spaces in HalHWImg8723B_RF.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #12: FILE: ./hal/HalHWImg8723B_RF.c:12: + struct DM_ODM_T * pDM_Odm, const u32 Condition1, const u32 Condition2 ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #124: FILE: ./hal/HalHWImg8723B_RF.c:124: + struct DM_ODM_T * pDM_Odm, const u32 Condition1, const u32 Condition2 ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #262: FILE: ./hal/HalHWImg8723B_RF.c:262: +void ODM_ReadAndConfig_MP_8723B_RadioA(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #423: FILE: ./hal/HalHWImg8723B_RF.c:423: +void ODM_ReadAndConfig_MP_8723B_TxPowerTrack_SDIO(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #425: FILE: ./hal/HalHWImg8723B_RF.c:425: + struct ODM_RF_CAL_T * pRFCalibrateInfo = &(pDM_Odm->RFCalibrateInfo); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #758: FILE: ./hal/HalHWImg8723B_RF.c:758: +void ODM_ReadAndConfig_MP_8723B_TXPWR_LMT(struct DM_ODM_T * pDM_Odm) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-12-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 71940c762753b09fdf7c51b3d1ca0954313d1f89 Author: Marco Cesati Date: Mon Mar 15 18:05:31 2021 +0100 Staging: rtl8723bs: fix spaces in HalHWImg8723B_MAC.h This commit fixes the following checkpatch.pl error: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #18: FILE: ./hal/HalHWImg8723B_MAC.h:18: + struct DM_ODM_T * pDM_Odm Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-11-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit fd4ef32f46b0e40f155bfc7577a531d3918ad806 Author: Marco Cesati Date: Mon Mar 15 18:05:30 2021 +0100 Staging: rtl8723bs: fix spaces in HalHWImg8723B_MAC.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #12: FILE: ./hal/HalHWImg8723B_MAC.c:12: + struct DM_ODM_T * pDM_Odm, const u32 Condition1, const u32 Condition2 ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #114: FILE: ./hal/HalHWImg8723B_MAC.c:114: + struct DM_ODM_T * pDM_Odm, const u32 Condition1, const u32 Condition2 ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #231: FILE: ./hal/HalHWImg8723B_MAC.c:231: +void ODM_ReadAndConfig_MP_8723B_MAC_REG(struct DM_ODM_T * pDM_Odm) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-10-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5caf9ae46e600c89ae262a6e3782208d50f76c88 Author: Marco Cesati Date: Mon Mar 15 18:05:29 2021 +0100 Staging: rtl8723bs: fix spaces in HalHWImg8723B_BB.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #18: FILE: ./hal/HalHWImg8723B_BB.h:18: + struct DM_ODM_T * pDM_Odm ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #27: FILE: ./hal/HalHWImg8723B_BB.h:27: + struct DM_ODM_T * pDM_Odm ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #36: FILE: ./hal/HalHWImg8723B_BB.h:36: + struct DM_ODM_T * pDM_Odm Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-9-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1e7330ff64e914009e9ca452d3f4c9a2b50582e3 Author: Marco Cesati Date: Mon Mar 15 18:05:28 2021 +0100 Staging: rtl8723bs: fix spaces in HalHWImg8723B_BB.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #12: FILE: ./hal/HalHWImg8723B_BB.c:12: + struct DM_ODM_T * pDM_Odm, const u32 Condition1, const u32 Condition2 ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #115: FILE: ./hal/HalHWImg8723B_BB.c:115: + struct DM_ODM_T * pDM_Odm, const u32 Condition1, const u32 Condition2 ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #260: FILE: ./hal/HalHWImg8723B_BB.c:260: +void ODM_ReadAndConfig_MP_8723B_AGC_TAB(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #529: FILE: ./hal/HalHWImg8723B_BB.c:529: +void ODM_ReadAndConfig_MP_8723B_PHY_REG(struct DM_ODM_T * pDM_Odm) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #609: FILE: ./hal/HalHWImg8723B_BB.c:609: +void ODM_ReadAndConfig_MP_8723B_PHY_REG_PG(struct DM_ODM_T * pDM_Odm) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-8-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 044e8936f7739c69a405903e3249bc9d637674d5 Author: Marco Cesati Date: Mon Mar 15 18:05:27 2021 +0100 Staging: rtl8723bs: fix spaces in HalBtcOutSrc.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #535: FILE: ./hal/HalBtcOutSrc.h:535: +void EXhalbtcoutsrc_PowerOnSetting(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #536: FILE: ./hal/HalBtcOutSrc.h:536: +void EXhalbtcoutsrc_InitHwConfig(struct BTC_COEXIST * pBtCoexist, u8 bWifiOnly); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #537: FILE: ./hal/HalBtcOutSrc.h:537: +void EXhalbtcoutsrc_InitCoexDm(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #538: FILE: ./hal/HalBtcOutSrc.h:538: +void EXhalbtcoutsrc_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #539: FILE: ./hal/HalBtcOutSrc.h:539: +void EXhalbtcoutsrc_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #540: FILE: ./hal/HalBtcOutSrc.h:540: +void EXhalbtcoutsrc_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #541: FILE: ./hal/HalBtcOutSrc.h:541: +void EXhalbtcoutsrc_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 action); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #543: FILE: ./hal/HalBtcOutSrc.h:543: + struct BTC_COEXIST * pBtCoexist, enum RT_MEDIA_STATUS mediaStatus ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #545: FILE: ./hal/HalBtcOutSrc.h:545: +void EXhalbtcoutsrc_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 pktType); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #547: FILE: ./hal/HalBtcOutSrc.h:547: + struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #549: FILE: ./hal/HalBtcOutSrc.h:549: +void EXhalbtcoutsrc_HaltNotify(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #550: FILE: ./hal/HalBtcOutSrc.h:550: +void EXhalbtcoutsrc_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #551: FILE: ./hal/HalBtcOutSrc.h:551: +void EXhalbtcoutsrc_Periodical(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #555: FILE: ./hal/HalBtcOutSrc.h:555: +void EXhalbtcoutsrc_DisplayBtCoexInfo(struct BTC_COEXIST * pBtCoexist); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-7-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 33796ea407c20fd1b0045367d9dda3147d545164 Author: Marco Cesati Date: Mon Mar 15 18:05:26 2021 +0100 Staging: rtl8723bs: fix spaces in HalBtc8723b2Ant.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #132: FILE: ./hal/HalBtc8723b2Ant.h:132: +void EXhalbtc8723b2ant_PowerOnSetting(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #133: FILE: ./hal/HalBtc8723b2Ant.h:133: +void EXhalbtc8723b2ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bWifiOnly); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #134: FILE: ./hal/HalBtc8723b2Ant.h:134: +void EXhalbtc8723b2ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #135: FILE: ./hal/HalBtc8723b2Ant.h:135: +void EXhalbtc8723b2ant_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #136: FILE: ./hal/HalBtc8723b2Ant.h:136: +void EXhalbtc8723b2ant_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #137: FILE: ./hal/HalBtc8723b2Ant.h:137: +void EXhalbtc8723b2ant_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #138: FILE: ./hal/HalBtc8723b2Ant.h:138: +void EXhalbtc8723b2ant_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #139: FILE: ./hal/HalBtc8723b2Ant.h:139: +void EXhalbtc8723b2ant_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #140: FILE: ./hal/HalBtc8723b2Ant.h:140: +void EXhalbtc8723b2ant_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #142: FILE: ./hal/HalBtc8723b2Ant.h:142: + struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #144: FILE: ./hal/HalBtc8723b2Ant.h:144: +void EXhalbtc8723b2ant_HaltNotify(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #145: FILE: ./hal/HalBtc8723b2Ant.h:145: +void EXhalbtc8723b2ant_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #146: FILE: ./hal/HalBtc8723b2Ant.h:146: +void EXhalbtc8723b2ant_Periodical(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #147: FILE: ./hal/HalBtc8723b2Ant.h:147: +void EXhalbtc8723b2ant_DisplayCoexInfo(struct BTC_COEXIST * pBtCoexist); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-6-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a178f0c25e9f3ed2fad7011bc550f0965e7d458c Author: Marco Cesati Date: Mon Mar 15 18:05:25 2021 +0100 Staging: rtl8723bs: fix spaces in HalBtc8723b2Ant.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #19: FILE: ./hal/HalBtc8723b2Ant.c:19: +static struct COEX_DM_8723B_2ANT * pCoexDm = &GLCoexDm8723b2Ant; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #21: FILE: ./hal/HalBtc8723b2Ant.c:21: +static struct COEX_STA_8723B_2ANT * pCoexSta = &GLCoexSta8723b2Ant; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #111: FILE: ./hal/HalBtc8723b2Ant.c:111: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #192: FILE: ./hal/HalBtc8723b2Ant.c:192: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #215: FILE: ./hal/HalBtc8723b2Ant.c:215: +static void halbtc8723b2ant_MonitorBtCtr(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #265: FILE: ./hal/HalBtc8723b2Ant.c:265: +static void halbtc8723b2ant_QueryBtInfo(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #282: FILE: ./hal/HalBtc8723b2Ant.c:282: +static bool halbtc8723b2ant_IsWifiStatusChanged(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #313: FILE: ./hal/HalBtc8723b2Ant.c:313: +static void halbtc8723b2ant_UpdateBtLinkInfo(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #315: FILE: ./hal/HalBtc8723b2Ant.c:315: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #377: FILE: ./hal/HalBtc8723b2Ant.c:377: +static u8 halbtc8723b2ant_ActionAlgorithm(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #379: FILE: ./hal/HalBtc8723b2Ant.c:379: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #552: FILE: ./hal/HalBtc8723b2Ant.c:552: + struct BTC_COEXIST * pBtCoexist, u8 dacSwingLvl ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #576: FILE: ./hal/HalBtc8723b2Ant.c:576: + struct BTC_COEXIST * pBtCoexist, u8 decBtPwrLvl ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #597: FILE: ./hal/HalBtc8723b2Ant.c:597: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 decBtPwrLvl ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #631: FILE: ./hal/HalBtc8723b2Ant.c:631: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 fwDacSwingLvl ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #666: FILE: ./hal/HalBtc8723b2Ant.c:666: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #689: FILE: ./hal/HalBtc8723b2Ant.c:689: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bRxRfShrinkOn ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #723: FILE: ./hal/HalBtc8723b2Ant.c:723: + struct BTC_COEXIST * pBtCoexist, bool bLowPenaltyRa ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #751: FILE: ./hal/HalBtc8723b2Ant.c:751: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bLowPenaltyRa ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #785: FILE: ./hal/HalBtc8723b2Ant.c:785: +static void halbtc8723b2ant_SetDacSwingReg(struct BTC_COEXIST * pBtCoexist, u32 level) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #798: FILE: ./hal/HalBtc8723b2Ant.c:798: + struct BTC_COEXIST * pBtCoexist, bool bSwDacSwingOn, u32 swDacSwingLvl ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #809: FILE: ./hal/HalBtc8723b2Ant.c:809: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #853: FILE: ./hal/HalBtc8723b2Ant.c:853: + struct BTC_COEXIST * pBtCoexist, bool bAgcTableEn ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #913: FILE: ./hal/HalBtc8723b2Ant.c:913: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bAgcTableEn ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #947: FILE: ./hal/HalBtc8723b2Ant.c:947: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #984: FILE: ./hal/HalBtc8723b2Ant.c:984: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1050: FILE: ./hal/HalBtc8723b2Ant.c:1050: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1099: FILE: ./hal/HalBtc8723b2Ant.c:1099: + struct BTC_COEXIST * pBtCoexist, bool bEnable ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1120: FILE: ./hal/HalBtc8723b2Ant.c:1120: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bEnable ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1148: FILE: ./hal/HalBtc8723b2Ant.c:1148: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1187: FILE: ./hal/HalBtc8723b2Ant.c:1187: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1199: FILE: ./hal/HalBtc8723b2Ant.c:1199: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1211: FILE: ./hal/HalBtc8723b2Ant.c:1211: + struct BTC_COEXIST * pBtCoexist, u8 antPosType, bool bInitHwCfg, bool bWifiOff ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1214: FILE: ./hal/HalBtc8723b2Ant.c:1214: + struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1305: FILE: ./hal/HalBtc8723b2Ant.c:1305: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bTurnOn, u8 type ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1437: FILE: ./hal/HalBtc8723b2Ant.c:1437: +static void halbtc8723b2ant_CoexAllOff(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1453: FILE: ./hal/HalBtc8723b2Ant.c:1453: +static void halbtc8723b2ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1465: FILE: ./hal/HalBtc8723b2Ant.c:1465: +static void halbtc8723b2ant_ActionBtInquiry(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1493: FILE: ./hal/HalBtc8723b2Ant.c:1493: +static bool halbtc8723b2ant_IsCommonAction(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1594: FILE: ./hal/HalBtc8723b2Ant.c:1594: + struct BTC_COEXIST * pBtCoexist, bool bScoHid, bool bTxPause, u8 maxInterval ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2044: FILE: ./hal/HalBtc8723b2Ant.c:2044: +static void halbtc8723b2ant_ActionSco(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2099: FILE: ./hal/HalBtc8723b2Ant.c:2099: +static void halbtc8723b2ant_ActionHid(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2160: FILE: ./hal/HalBtc8723b2Ant.c:2160: +static void halbtc8723b2ant_ActionA2dp(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2241: FILE: ./hal/HalBtc8723b2Ant.c:2241: +static void halbtc8723b2ant_ActionA2dpPanHs(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2291: FILE: ./hal/HalBtc8723b2Ant.c:2291: +static void halbtc8723b2ant_ActionPanEdr(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2349: FILE: ./hal/HalBtc8723b2Ant.c:2349: +static void halbtc8723b2ant_ActionPanHs(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2399: FILE: ./hal/HalBtc8723b2Ant.c:2399: +static void halbtc8723b2ant_ActionPanEdrA2dp(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2460: FILE: ./hal/HalBtc8723b2Ant.c:2460: +static void halbtc8723b2ant_ActionPanEdrHid(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2524: FILE: ./hal/HalBtc8723b2Ant.c:2524: +static void halbtc8723b2ant_ActionHidA2dpPanEdr(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2584: FILE: ./hal/HalBtc8723b2Ant.c:2584: +static void halbtc8723b2ant_ActionHidA2dp(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2659: FILE: ./hal/HalBtc8723b2Ant.c:2659: +static void halbtc8723b2ant_RunCoexistMechanism(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2758: FILE: ./hal/HalBtc8723b2Ant.c:2758: +static void halbtc8723b2ant_WifiOffHwCfg(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2783: FILE: ./hal/HalBtc8723b2Ant.c:2783: +static void halbtc8723b2ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bBackUp) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2817: FILE: ./hal/HalBtc8723b2Ant.c:2817: +void EXhalbtc8723b2ant_PowerOnSetting(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2819: FILE: ./hal/HalBtc8723b2Ant.c:2819: + struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2869: FILE: ./hal/HalBtc8723b2Ant.c:2869: +void EXhalbtc8723b2ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bWifiOnly) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2874: FILE: ./hal/HalBtc8723b2Ant.c:2874: +void EXhalbtc8723b2ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2881: FILE: ./hal/HalBtc8723b2Ant.c:2881: +void EXhalbtc8723b2ant_DisplayCoexInfo(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2883: FILE: ./hal/HalBtc8723b2Ant.c:2883: + struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2884: FILE: ./hal/HalBtc8723b2Ant.c:2884: + struct BTC_STACK_INFO * pStackInfo = &pBtCoexist->stackInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2885: FILE: ./hal/HalBtc8723b2Ant.c:2885: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3262: FILE: ./hal/HalBtc8723b2Ant.c:3262: +void EXhalbtc8723b2ant_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3279: FILE: ./hal/HalBtc8723b2Ant.c:3279: +void EXhalbtc8723b2ant_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3290: FILE: ./hal/HalBtc8723b2Ant.c:3290: +void EXhalbtc8723b2ant_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3299: FILE: ./hal/HalBtc8723b2Ant.c:3299: +void EXhalbtc8723b2ant_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3308: FILE: ./hal/HalBtc8723b2Ant.c:3308: +void EXhalbtc8723b2ant_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3354: FILE: ./hal/HalBtc8723b2Ant.c:3354: +void EXhalbtc8723b2ant_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3362: FILE: ./hal/HalBtc8723b2Ant.c:3362: + struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3506: FILE: ./hal/HalBtc8723b2Ant.c:3506: +void EXhalbtc8723b2ant_HaltNotify(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3517: FILE: ./hal/HalBtc8723b2Ant.c:3517: +void EXhalbtc8723b2ant_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3531: FILE: ./hal/HalBtc8723b2Ant.c:3531: +void EXhalbtc8723b2ant_Periodical(struct BTC_COEXIST * pBtCoexist) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-5-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit cb8096dfaeae5ddae45be24c242dbef4491ff286 Author: Marco Cesati Date: Mon Mar 15 18:05:24 2021 +0100 Staging: rtl8723bs: fix spaces in HalBtc8723b1Ant.h This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #170: FILE: ./hal/HalBtc8723b1Ant.h:170: +void EXhalbtc8723b1ant_PowerOnSetting(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #171: FILE: ./hal/HalBtc8723b1Ant.h:171: +void EXhalbtc8723b1ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bWifiOnly); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #172: FILE: ./hal/HalBtc8723b1Ant.h:172: +void EXhalbtc8723b1ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #173: FILE: ./hal/HalBtc8723b1Ant.h:173: +void EXhalbtc8723b1ant_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #174: FILE: ./hal/HalBtc8723b1Ant.h:174: +void EXhalbtc8723b1ant_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #175: FILE: ./hal/HalBtc8723b1Ant.h:175: +void EXhalbtc8723b1ant_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #176: FILE: ./hal/HalBtc8723b1Ant.h:176: +void EXhalbtc8723b1ant_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #177: FILE: ./hal/HalBtc8723b1Ant.h:177: +void EXhalbtc8723b1ant_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #178: FILE: ./hal/HalBtc8723b1Ant.h:178: +void EXhalbtc8723b1ant_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 type); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #180: FILE: ./hal/HalBtc8723b1Ant.h:180: + struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #182: FILE: ./hal/HalBtc8723b1Ant.h:182: +void EXhalbtc8723b1ant_HaltNotify(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #183: FILE: ./hal/HalBtc8723b1Ant.h:183: +void EXhalbtc8723b1ant_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #184: FILE: ./hal/HalBtc8723b1Ant.h:184: +void EXhalbtc8723b1ant_Periodical(struct BTC_COEXIST * pBtCoexist); ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #185: FILE: ./hal/HalBtc8723b1Ant.h:185: +void EXhalbtc8723b1ant_DisplayCoexInfo(struct BTC_COEXIST * pBtCoexist); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-4-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit f6009a61910a82318b3a44318784c5592c125bb7 Author: Marco Cesati Date: Mon Mar 15 18:05:23 2021 +0100 Staging: rtl8723bs: fix spaces in HalBtc8723b1Ant.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #12: FILE: ./hal/HalBtc8723b1Ant.c:12: +static struct COEX_DM_8723B_1ANT * pCoexDm = &GLCoexDm8723b1Ant; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #14: FILE: ./hal/HalBtc8723b1Ant.c:14: +static struct COEX_STA_8723B_1ANT * pCoexSta = &GLCoexSta8723b1Ant; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #154: FILE: ./hal/HalBtc8723b1Ant.c:154: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u32 disRateMask ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #169: FILE: ./hal/HalBtc8723b1Ant.c:169: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #207: FILE: ./hal/HalBtc8723b1Ant.c:207: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #234: FILE: ./hal/HalBtc8723b1Ant.c:234: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #260: FILE: ./hal/HalBtc8723b1Ant.c:260: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #288: FILE: ./hal/HalBtc8723b1Ant.c:288: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #317: FILE: ./hal/HalBtc8723b1Ant.c:317: +static void halbtc8723b1ant_QueryBtInfo(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #334: FILE: ./hal/HalBtc8723b1Ant.c:334: +static void halbtc8723b1ant_MonitorBtCtr(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #395: FILE: ./hal/HalBtc8723b1Ant.c:395: +static void halbtc8723b1ant_MonitorWiFiCtr(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #481: FILE: ./hal/HalBtc8723b1Ant.c:481: +static bool halbtc8723b1ant_IsWifiStatusChanged(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #516: FILE: ./hal/HalBtc8723b1Ant.c:516: +static void halbtc8723b1ant_UpdateBtLinkInfo(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #518: FILE: ./hal/HalBtc8723b1Ant.c:518: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #580: FILE: ./hal/HalBtc8723b1Ant.c:580: +static u8 halbtc8723b1ant_ActionAlgorithm(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #582: FILE: ./hal/HalBtc8723b1Ant.c:582: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #808: FILE: ./hal/HalBtc8723b1Ant.c:808: + struct BTC_COEXIST * pBtCoexist, bool bLowPenaltyRa ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #836: FILE: ./hal/HalBtc8723b1Ant.c:836: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bLowPenaltyRa ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #853: FILE: ./hal/HalBtc8723b1Ant.c:853: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #890: FILE: ./hal/HalBtc8723b1Ant.c:890: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #933: FILE: ./hal/HalBtc8723b1Ant.c:933: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 type ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #991: FILE: ./hal/HalBtc8723b1Ant.c:991: + struct BTC_COEXIST * pBtCoexist, bool bEnable ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1012: FILE: ./hal/HalBtc8723b1Ant.c:1012: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bEnable ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1046: FILE: ./hal/HalBtc8723b1Ant.c:1046: + struct BTC_COEXIST * pBtCoexist, u8 lpsVal, u8 rpwmVal ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1057: FILE: ./hal/HalBtc8723b1Ant.c:1057: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, u8 lpsVal, u8 rpwmVal ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1108: FILE: ./hal/HalBtc8723b1Ant.c:1108: + struct BTC_COEXIST * pBtCoexist, bool bLowPenaltyRA ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1121: FILE: ./hal/HalBtc8723b1Ant.c:1121: + struct BTC_COEXIST * pBtCoexist, u8 antPosType, bool bInitHwCfg, bool bWifiOff ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1124: FILE: ./hal/HalBtc8723b1Ant.c:1124: + struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1310: FILE: ./hal/HalBtc8723b1Ant.c:1310: + struct BTC_COEXIST * pBtCoexist, u8 byte1, u8 byte2, u8 byte3, u8 byte4, u8 byte5 ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1364: FILE: ./hal/HalBtc8723b1Ant.c:1364: + struct BTC_COEXIST * pBtCoexist, bool bForceExec, bool bTurnOn, u8 type ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1367: FILE: ./hal/HalBtc8723b1Ant.c:1367: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1664: FILE: ./hal/HalBtc8723b1Ant.c:1664: +static bool halbtc8723b1ant_IsCommonAction(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1755: FILE: ./hal/HalBtc8723b1Ant.c:1755: + struct BTC_COEXIST * pBtCoexist, u8 wifiStatus ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1944: FILE: ./hal/HalBtc8723b1Ant.c:1944: + struct BTC_COEXIST * pBtCoexist, bool bNewPsState ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #1966: FILE: ./hal/HalBtc8723b1Ant.c:1966: + struct BTC_COEXIST * pBtCoexist, u8 psType, u8 lpsVal, u8 rpwmVal ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2014: FILE: ./hal/HalBtc8723b1Ant.c:2014: +static void halbtc8723b1ant_ActionWifiMultiPort(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2022: FILE: ./hal/HalBtc8723b1Ant.c:2022: +static void halbtc8723b1ant_ActionHs(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2028: FILE: ./hal/HalBtc8723b1Ant.c:2028: +static void halbtc8723b1ant_ActionBtInquiry(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2030: FILE: ./hal/HalBtc8723b1Ant.c:2030: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2070: FILE: ./hal/HalBtc8723b1Ant.c:2070: + struct BTC_COEXIST * pBtCoexist, u8 wifiStatus ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2073: FILE: ./hal/HalBtc8723b1Ant.c:2073: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2090: FILE: ./hal/HalBtc8723b1Ant.c:2090: + struct BTC_COEXIST * pBtCoexist, u8 wifiStatus ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2095: FILE: ./hal/HalBtc8723b1Ant.c:2095: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2144: FILE: ./hal/HalBtc8723b1Ant.c:2144: +static void halbtc8723b1ant_ActionWifiNotConnected(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2155: FILE: ./hal/HalBtc8723b1Ant.c:2155: + struct BTC_COEXIST * pBtCoexist ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2158: FILE: ./hal/HalBtc8723b1Ant.c:2158: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2189: FILE: ./hal/HalBtc8723b1Ant.c:2189: + struct BTC_COEXIST * pBtCoexist ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2192: FILE: ./hal/HalBtc8723b1Ant.c:2192: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2213: FILE: ./hal/HalBtc8723b1Ant.c:2213: +static void halbtc8723b1ant_ActionWifiConnectedScan(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2215: FILE: ./hal/HalBtc8723b1Ant.c:2215: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2246: FILE: ./hal/HalBtc8723b1Ant.c:2246: + struct BTC_COEXIST * pBtCoexist ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2249: FILE: ./hal/HalBtc8723b1Ant.c:2249: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2270: FILE: ./hal/HalBtc8723b1Ant.c:2270: +static void halbtc8723b1ant_ActionWifiConnected(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2390: FILE: ./hal/HalBtc8723b1Ant.c:2390: +static void halbtc8723b1ant_RunSwCoexistMechanism(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2449: FILE: ./hal/HalBtc8723b1Ant.c:2449: +static void halbtc8723b1ant_RunCoexistMechanism(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2451: FILE: ./hal/HalBtc8723b1Ant.c:2451: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2582: FILE: ./hal/HalBtc8723b1Ant.c:2582: +static void halbtc8723b1ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2596: FILE: ./hal/HalBtc8723b1Ant.c:2596: + struct BTC_COEXIST * pBtCoexist, ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2651: FILE: ./hal/HalBtc8723b1Ant.c:2651: +void EXhalbtc8723b1ant_PowerOnSetting(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2653: FILE: ./hal/HalBtc8723b1Ant.c:2653: + struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2703: FILE: ./hal/HalBtc8723b1Ant.c:2703: +void EXhalbtc8723b1ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bWifiOnly) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2708: FILE: ./hal/HalBtc8723b1Ant.c:2708: +void EXhalbtc8723b1ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2723: FILE: ./hal/HalBtc8723b1Ant.c:2723: +void EXhalbtc8723b1ant_DisplayCoexInfo(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2725: FILE: ./hal/HalBtc8723b1Ant.c:2725: + struct BTC_BOARD_INFO * pBoardInfo = &pBtCoexist->boardInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2726: FILE: ./hal/HalBtc8723b1Ant.c:2726: + struct BTC_STACK_INFO * pStackInfo = &pBtCoexist->stackInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #2727: FILE: ./hal/HalBtc8723b1Ant.c:2727: + struct BTC_BT_LINK_INFO * pBtLinkInfo = &pBtCoexist->btLinkInfo; ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3186: FILE: ./hal/HalBtc8723b1Ant.c:3186: +void EXhalbtc8723b1ant_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3212: FILE: ./hal/HalBtc8723b1Ant.c:3212: +void EXhalbtc8723b1ant_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3230: FILE: ./hal/HalBtc8723b1Ant.c:3230: +void EXhalbtc8723b1ant_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3320: FILE: ./hal/HalBtc8723b1Ant.c:3320: +void EXhalbtc8723b1ant_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3377: FILE: ./hal/HalBtc8723b1Ant.c:3377: +void EXhalbtc8723b1ant_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3447: FILE: ./hal/HalBtc8723b1Ant.c:3447: +void EXhalbtc8723b1ant_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 type) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3536: FILE: ./hal/HalBtc8723b1Ant.c:3536: + struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3701: FILE: ./hal/HalBtc8723b1Ant.c:3701: +void EXhalbtc8723b1ant_HaltNotify(struct BTC_COEXIST * pBtCoexist) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3716: FILE: ./hal/HalBtc8723b1Ant.c:3716: +void EXhalbtc8723b1ant_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState) ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #3738: FILE: ./hal/HalBtc8723b1Ant.c:3738: +void EXhalbtc8723b1ant_Periodical(struct BTC_COEXIST * pBtCoexist) Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-3-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8c225c483d99fa709d1e6a4654fb807cceaceb8b Author: Marco Cesati Date: Mon Mar 15 18:05:22 2021 +0100 Staging: rtl8723bs: fix spaces in rtw_cmd.c This commit fixes the following checkpatch.pl errors: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #206: FILE: ./core/rtw_cmd.c:206: +static void c2h_wk_callback(struct work_struct * work); Reviewed-by: Dan Carpenter Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210315170618.2566-2-marcocesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 50db2050faf854cbaf4b6557a7a8ca21bff302ae Author: Lars-Peter Clausen Date: Sat Mar 13 13:53:11 2021 +0100 dmaengine: xilinx: Introduce synchronize() callback The Xilinx dmaengine driver uses a tasklet to process completed descriptors and execute their callbacks. Currently consumers of the DMA channel have to no method of synchronization against this tasklet when using the Xilinx dmaengine drivers. This can lead to race conditions when the consumer frees resources that are accessed in the callback before the tasklet has finished running. It is not enough to just call dmaengine_terminal_all() since on a multi-processor system the tasklet can run concurrently to it and might call the callback after dmaengine_terminate_all() has already finished. To mitigate this issue implement the synchronize() callback for the driver, which will wait until the tasklet has finished. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20210313125311.4823-1-lars@metafoo.de Signed-off-by: Vinod Koul commit c8aebc1346522d3569690867ce3996642ad52e01 Author: Vladimir Barinov Date: Fri Mar 12 18:47:35 2021 +0100 arm64: dts: renesas: r8a77980: Fix vin4-7 endpoint binding This fixes the bindings in media framework: The CSI40 is endpoint number 2 The CSI41 is endpoint number 3 Signed-off-by: Vladimir Barinov Reviewed-by: Niklas Söderlund Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210312174735.2118212-1-niklas.soderlund+renesas@ragnatech.se Fixes: 3182aa4e0bf4d0ee ("arm64: dts: renesas: r8a77980: add CSI2/VIN support") Signed-off-by: Geert Uytterhoeven commit f8bade6c9a6213c2c5ba6e5bf32415ecab6e41e5 Merge: ccf953d8f3d68 51c3b916a4d7e Author: Maxime Ripard Date: Tue Mar 16 09:06:23 2021 +0100 Merge drm/drm-next into drm-misc-next Noralf needs some patches in 5.12-rc3, and we've been delaying the 5.12 merge due to the swap issue so it looks like a good time. Signed-off-by: Maxime Ripard commit 9346ff0bc6ff3c3a495d50a43b57df8fed7bc562 Author: Fabio Estevam Date: Mon Mar 15 20:58:00 2021 -0300 rtc: mxc: Remove unneeded of_match_ptr() i.MX is a DT-only platform, so of_match_ptr() can be safely removed. Remove the unneeded of_match_ptr(). Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210315235800.200137-1-festevam@gmail.com commit 6a82582d9fa438045191074856f47165334f2777 Author: Michael Zaidman Date: Fri Feb 19 18:36:44 2021 +0200 HID: ft260: add usb hid to i2c host bridge driver The FTDI FT260 chip implements USB to I2C/UART bridges through two USB HID class interfaces. The first - for I2C, and the second for UART. Each interface is independent, and the kernel detects it as a separate USB hidraw device. This commit adds I2C host adapter support. Signed-off-by: Michael Zaidman Tested-by: Aaron Jones (FTDI-UK) commit 7a114444af813ee35dbe0ef6d26ffb56b309549b Author: Stefan Binding Date: Mon Mar 15 19:07:16 2021 +0000 ALSA: hda/cirrus: Make CS8409 driver more generic by using fixups. CS8409/CS42L42 Driver currently does most of the platform specific setup inside the main body of the code, however, this setup can be moved into fixup functions, to make the driver more generic. Making the driver more generic, allows the driver to use the cs_parse_auto_config function in the patch function. This function forces all of the ADCs to be permanently powered, which means the cap_sync_hook function is no longer needed to restart the stream, when the jack has been ejected. Since the codec is re-initialized on every init/resume, there is no need to add specific verbs to be run on init, and instead these can be combined with the initialization verbs, which are run on init. In addition, the extra fixup verbs are no longer required, since this is taken care of elsewhere. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 [ Use fallthrough macro instead of comment -- tiwai ] Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210315190716.47686-5-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 9f8de3b7d789693008b65a4849bc444e81fcfe5a Author: Stefan Binding Date: Mon Mar 15 19:07:15 2021 +0000 ALSA: hda/cirrus: Fix CS42L42 Headset Mic volume control name Existing name "Headset Mic Volume Control" causes multiple Microphone entries to appear in UI. Using name "Mic Volume Control" ensures only a single Microphone entry exists when the Headset is connected. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov BugLink: https://bugs.launchpad.net/bugs/1918378 Reported-and-tested-by: You-Sheng Yang Link: https://lore.kernel.org/r/20210315190716.47686-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 61a9aba19f4482984dc7ec5c04c54bf51166cff2 Author: Stefan Binding Date: Mon Mar 15 19:07:14 2021 +0000 ALSA: hda/cirrus: Cleanup patch_cirrus.c code. Minor changes, clean up code, remove unnecessary initialization of variables, reduced number of warnings from ./scripts/checkpatch.pl from 19 to 0 Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210315190716.47686-3-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit fb3447d5842b71ec960da1b8a3ca5ee5f46a5327 Author: Stefan Binding Date: Mon Mar 15 19:07:13 2021 +0000 ALSA: hda/cirrus: Add error handling into CS8409 I2C functions Also removing 2 redundant cs8409_i2c_read() calls, as we already did read them in a code above. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210315190716.47686-2-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 51c3b916a4d7e24b4918925965867fdd9bd8dd59 Merge: 1e28eed17697b 762949bb1da78 Author: Dave Airlie Date: Tue Mar 16 16:45:12 2021 +1000 Merge tag 'drm-misc-next-2021-03-03' of git://anongit.freedesktop.org/drm/drm-misc into drm-next drm-misc-next for 5.13: UAPI Changes: Cross-subsystem Changes: Core Changes: - %p4cc printk format modifier - atomic: introduce drm_crtc_commit_wait, rework atomic plane state helpers to take the drm_commit_state structure - dma-buf: heaps rework to return a struct dma_buf - simple-kms: Add plate state helpers - ttm: debugfs support, removal of sysfs Driver Changes: - Convert drivers to shadow plane helpers - arc: Move to drm/tiny - ast: cursor plane reworks - gma500: Remove TTM and medfield support - mxsfb: imx8mm support - panfrost: MMU IRQ handling rework - qxl: rework to better handle resources deallocation, locking - sun4i: Add alpha properties for UI and VI layers - vc4: RPi4 CEC support - vmwgfx: doc cleanup Signed-off-by: Dave Airlie From: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210303100600.dgnkadonzuvfnu22@gilmour commit 9e40641f62cd812b21f2c73b5cfb3346eb466dea Author: Jeffrey Hugo Date: Wed Mar 10 13:49:25 2021 -0700 bus: mhi: core: Check state before processing power_down We cannot process a power_down if the power state is DISABLED. There is no valid mhi_ctxt in that case, so attepting to process the power_down will likely result in a null pointer dereference. If the power state is DISABLED, there is nothing to do anyways, so just bail early. Signed-off-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1615409365-8165-1-git-send-email-jhugo@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 68731852f6e58d19f692971dc84deb64265f6d3f Author: Fan Wu Date: Wed Mar 10 13:40:03 2021 -0700 bus: mhi: core: Return EAGAIN if MHI ring is full Currently ENOMEM is returned when MHI ring is full. This error code is very misleading. Change to EAGAIN instead. Signed-off-by: Fan Wu Signed-off-by: Jeffrey Hugo Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1615408803-7016-1-git-send-email-jhugo@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 23f50b5ac331c8c27c421a7116618355508e8427 Author: Pedro Tammela Date: Mon Mar 15 14:29:51 2021 +0100 bpf: selftests: Remove unused 'nospace_err' in tests for batched ops in array maps This seems to be a reminiscent from the hashmap tests. Signed-off-by: Pedro Tammela Signed-off-by: Andrii Nakryiko Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210315132954.603108-1-pctammela@gmail.com commit d94436a5d1a0ac8bcad29eb6735384940ae15603 Author: Masanari Iida Date: Mon Mar 15 21:44:54 2021 +0900 samples: bpf: Fix a spelling typo in do_hbm_test.sh This patch fixes a spelling typo in do_hbm_test.sh Signed-off-by: Masanari Iida Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210315124454.1744594-1-standby24x7@gmail.com commit 0205e9de42911404902728911b03fc1469242419 Author: Pedro Tammela Date: Sun Mar 14 18:38:38 2021 +0100 libbpf: Avoid inline hint definition from 'linux/stddef.h' Linux headers might pull 'linux/stddef.h' which defines '__always_inline' as the following: #ifndef __always_inline #define __always_inline inline #endif This becomes an issue if the program picks up the 'linux/stddef.h' definition as the macro now just hints inline to clang. This change now enforces the proper definition for BPF programs regardless of the include order. Signed-off-by: Pedro Tammela Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210314173839.457768-1-pctammela@gmail.com commit 6d8a154f1dd7f6b0a1c291d94012b39e085e016a Author: Yangtao Li Date: Sun Mar 14 19:34:06 2021 +0300 drm/panfrost: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Reviewed-by: Steven Price Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 864a270189cfc34c3158412459fc81836289c2a5 Author: Yangtao Li Date: Sun Mar 14 19:34:05 2021 +0300 drm/lima: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 411281d24bb84889f31ddd9d733f495b29e10a8b Author: Yangtao Li Date: Sun Mar 14 19:34:03 2021 +0300 mmc: sdhci-msm: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 6504dcae67ad5fc241217c23825e5649f53c09fc Author: Yangtao Li Date: Sun Mar 14 19:34:02 2021 +0300 spi: spi-qcom-qspi: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Acked-by: Mark Brown Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit cfb12911ffb0ed38c7c420efb9d5dc8494e28109 Author: Yangtao Li Date: Sun Mar 14 19:34:01 2021 +0300 spi: spi-geni-qcom: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Acked-by: Mark Brown Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 300894a6fef7f78432372c8096b7c9b455832560 Author: Yangtao Li Date: Sun Mar 14 19:34:00 2021 +0300 serial: qcom_geni_serial: Convert to use resource-managed OPP API Use resource-managed OPP API to simplify code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 9edf48a4bfb75456f7612972a4750a12d8a83702 Author: Dmitry Osipenko Date: Sun Mar 14 19:33:59 2021 +0300 opp: Change return type of devm_pm_opp_attach_genpd() Make devm_pm_opp_attach_genpd() to return error code instead of opp_table pointer in order to have return type consistent with the other resource-managed OPP helpers. Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit c41c8a3485b0b36b7e308eeff8716eb77093596a Author: Dmitry Osipenko Date: Sun Mar 14 19:33:58 2021 +0300 opp: Change return type of devm_pm_opp_register_set_opp_helper() Make devm_pm_opp_register_set_opp_helper() to return error code instead of opp_table pointer in order to have return type consistent with the other resource-managed OPP helpers. Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 74c7dbe0f8f096970ad236e04ace1610686acce2 Merge: 578ce0468f0b5 633eddf120ac1 Author: David S. Miller Date: Mon Mar 15 21:27:06 2021 -0700 Merge branch 'ionic-tx-updates' Shannon Nelson says: ==================== ionic Tx updates Just as the Rx path recently got a face lift, it is time for the Tx path to get some attention. The original TSO-to-descriptor mapping was ugly and convoluted and needed some deep work. This series pulls the dma mapping out of the descriptor frag mapping loop and makes the dma mapping more generic for use in the non-TSO case. ==================== Signed-off-by: David S. Miller commit 633eddf120ac148c05db45fc8fd878af54f72eaa Author: Shannon Nelson Date: Mon Mar 15 19:31:36 2021 -0700 ionic: aggregate Tx byte counting calls Gather the Tx packet and byte counts and call netdev_tx_completed_queue() only once per clean cycle. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 19fef72cb4ba4c3c25bf89f4e73fdcefb9fd7bd2 Author: Shannon Nelson Date: Mon Mar 15 19:31:35 2021 -0700 ionic: simplify tx clean The descriptor mappings are set up the same way whether or not it is a TSO, so we don't need separate logic for the two cases. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 2da479ca0814c604454616ad1de813ab662e23cd Author: Shannon Nelson Date: Mon Mar 15 19:31:34 2021 -0700 ionic: generic tx skb mapping Make the new ionic_tx_map_tso() usable by the non-TSO paths, and pull the call up a level into ionic_tx() before calling the csum or no-csum routines. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 5b039241fe3a31b67fbffb07082c6d9d972204f8 Author: Shannon Nelson Date: Mon Mar 15 19:31:33 2021 -0700 ionic: simplify TSO descriptor mapping One issue with the original TSO code was that it was working too hard to deal with skb layouts that were never going to show up, such as an skb->data that was longer than a single descriptor's length. The other issue was trying to arrange the fragment dma mapping at the same time as figuring out the descriptors needed. There was just too much going on at the same time. Now we do the dma mapping first, which sets up the buffers with skb->data in buf[0] and the remaining frags in buf[1..n-1]. Next we spread the bufs across the descriptors needed, where each descriptor gets up to mss number of bytes. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 578ce0468f0b5ccc3771ce60fd77d408cd0f9b09 Merge: 0f13b5e6bf283 86ca860e12ec0 Author: David S. Miller Date: Mon Mar 15 20:41:59 2021 -0700 Merge branch 'net-qualcomm-rmnet-stop-using-C-bit-fields' Alex Elder says: ==================== net: qualcomm: rmnet: stop using C bit-fields Version 6 is the same as version 5, but has been rebased on updated net-next/master. With any luck, the patches I'm sending out this time won't contain garbage. Version 5 of this series responds to a suggestion made by Alexander Duyck, to determine the offset to the checksummed range of a packet using skb_network_header_len() on patch 2. I have added his Reviewed-by tag to all (other) patches, and removed Bjorn's from patch 2. The change required some updates to the subsequent patches, and I reordered some assignments in a minor way in the last patch. I don't expect any more discussion on this series (but will respond if there is any). So at this point I would really appreciate it if KS and/or Sean would offer a review, or at least acknowledge it. I presume you two are able to independently test the code as well, so I request that, and hope you are willing to do so. Version 4 of this series is here: https://lore.kernel.org/netdev/20210315133455.1576188-1-elder@linaro.org ==================== Signed-off-by: David S. Miller commit 86ca860e12ec0feab7d721d3b05e60fb86613540 Author: Alex Elder Date: Mon Mar 15 16:51:51 2021 -0500 net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header Replace the use of C bit-fields in the rmnet_map_ul_csum_header structure with a single two-byte (big endian) structure member, and use masks to encode or get values within it. The content of these fields can be accessed using simple bitwise AND and OR operations on the (host byte order) value of the new structure member. Previously rmnet_map_ipv4_ul_csum_header() would update C bit-field values in host byte order, then forcibly fix their byte order using a combination of byte swap operations and types. Instead, just compute the value that needs to go into the new structure member and save it with a simple byte-order conversion. Make similar simplifications in rmnet_map_ipv6_ul_csum_header(). Finally, in rmnet_map_checksum_uplink_packet() a set of assignments zeroes every field in the upload checksum header. Replace that with a single memset() operation. Signed-off-by: Alex Elder Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit cc1b21ba6251c8dd8e4e86018c9fdba85df0d219 Author: Alex Elder Date: Mon Mar 15 16:51:50 2021 -0500 net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer Replace the use of C bit-fields in the rmnet_map_dl_csum_trailer structure with a single one-byte field, using constant field masks to encode or get at embedded values. Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 16653c16d282e768763b2e8cc78f75df8fd53992 Author: Alex Elder Date: Mon Mar 15 16:51:49 2021 -0500 net: qualcomm: rmnet: use masks instead of C bit-fields The actual layout of bits defined in C bit-fields (e.g. int foo : 3) is implementation-defined. Structures defined in address this by specifying all bit-fields twice, to cover two possible layouts. I think this pattern is repetitive and noisy, and I find the whole notion of compiler "bitfield endianness" to be non-intuitive. Stop using C bit-fields for the command/data flag and the pad length fields in the rmnet_map structure, and define a single-byte flags field instead. Define a mask for the single-bit "command" flag, and another mask for the encoded pad length. The content of both fields can be accessed using a simple bitwise AND operation. Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 9d131d044f89a808f947d49f1a1865815c610158 Author: Alex Elder Date: Mon Mar 15 16:51:48 2021 -0500 net: qualcomm: rmnet: kill RMNET_MAP_GET_*() accessor macros The following macros, defined in "rmnet_map.h", assume a socket buffer is provided as an argument without any real indication this is the case. RMNET_MAP_GET_MUX_ID() RMNET_MAP_GET_CD_BIT() RMNET_MAP_GET_PAD() RMNET_MAP_GET_CMD_START() RMNET_MAP_GET_LENGTH() What they hide is pretty trivial accessing of fields in a structure, and it's much clearer to see this if we do these accesses directly. So rather than using these accessor macros, assign a local variable of the map header pointer type to the socket buffer data pointer, and derereference that pointer variable. In "rmnet_map_data.c", use sizeof(object) rather than sizeof(type) in one spot. Also, there's no need to byte swap 0; it's all zeros irrespective of endianness. Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 50c62a111c4855510b0d8a2d8e50214172166b61 Author: Alex Elder Date: Mon Mar 15 16:51:47 2021 -0500 net: qualcomm: rmnet: simplify some byte order logic In rmnet_map_ipv4_ul_csum_header() and rmnet_map_ipv6_ul_csum_header() the offset within a packet at which checksumming should commence is calculated. This calculation involves byte swapping and a forced type conversion that makes it hard to understand. Simplify this by computing the offset in host byte order, then converting the result when assigning it into the header field. Signed-off-by: Alex Elder Signed-off-by: David S. Miller commit 45f3a13c816656c9d3d311880d90286341644d9b Author: Alex Elder Date: Mon Mar 15 16:51:46 2021 -0500 net: qualcomm: rmnet: mark trailer field endianness The fields in the checksum trailer structure used for QMAP protocol RX packets are all big-endian format, so define them that way. It turns out these fields are never actually used by the RMNet code. The start offset is always assumed to be zero, and the length is taken from the other packet headers. So making these fields explicitly big endian has no effect on the behavior of the code. Signed-off-by: Alex Elder Reviewed-by: Bjorn Andersson Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 471ee95ccca9c417344453f73a39681cfde39af1 Author: Bodo Stroesser Date: Wed Mar 10 19:44:58 2021 +0100 scsi: target: tcmu: Adjust parameter in call to tcmu_blocks_release() In commit f7c89771d07d ("scsi: target: tcmu: Replace radix_tree with XArray") the meaning of last parameter of tcmu_blocks_release() was changed. So in the callers we should subtract 1 from the previous parameter. Unfortunately that change got lost at one of the two places where tcmu_blocks_release() is called. That does not lead to any problems, but we should adjust it anyway. Link: https://lore.kernel.org/r/20210310184458.10741-1-bostroesser@gmail.com Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 3335369bad99c40b3513da2d165e6ae83f3f3c8b Author: Chen Yu Date: Tue Dec 1 09:22:09 2020 +0800 e1000e: Remove the runtime suspend restriction on CNP+ Although there is platform issue of runtime suspend support on CNP, it would be more flexible to let the user decide whether to disable runtime or not because: 1. This can be done in userspace via echo on > /sys/devices/pci0000\:00/0000\:00\:1f.d/power/control 2. More and more NICs would support runtime suspend, disabling the runtime suspend on them by default would impact the validation. Only disable runtime suspend on CNP in case of any user space regression. Signed-off-by: Chen Yu Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit ccf8b940e5fdd331231a7442cd80f0e83336cfd3 Author: Chen Yu Date: Tue Dec 1 09:21:50 2020 +0800 e1000e: Leverage direct_complete to speed up s2ram The NIC is put in runtime suspend status when there is no cable connected. As a result, it is safe to keep non-wakeup NIC in runtime suspended during s2ram because the system does not rely on the NIC plug event nor WoL to wake up the system. Besides that, unlike the s2idle, s2ram does not need to manipulate S0ix settings during suspend. This patch introduces the .prepare() for e1000e so that if the NIC is runtime suspended the subsequent suspend/resume hooks will be skipped so as to speed up the s2ram. The pm core will check whether the NIC is a wake up device so there's no need to check it again in .prepare(). DPM_FLAG_SMART_PREPARE flag should be set during probe to ask the pci subsystem to honor the driver's prepare() result. Besides, the NIC remains runtime suspended after resumed from s2ram as there is no need to resume it. Tested on i7-2600K with 82579V NIC Before the patch: e1000e 0000:00:19.0: pci_pm_suspend+0x0/0x160 returned 0 after 225146 usecs e1000e 0000:00:19.0: pci_pm_resume+0x0/0x90 returned 0 after 140588 usecs After the patch: echo disabled > //sys/devices/pci0000\:00/0000\:00\:19.0/power/wakeup becomes 0 usecs because the hooks will be skipped. Suggested-by: Kai-Heng Feng Signed-off-by: Chen Yu Tested-by: Dvora Fuxbrumer Signed-off-by: Tony Nguyen commit 720efdd23f963612d0a8c7072293aff119c6f915 Author: Wang Qing Date: Sat Mar 13 10:41:15 2021 +0800 scsi: qla2xxx: Use dma_pool_zalloc() Use dma_pool_zalloc() instead of dma_pool_alloc() and memset(). Link: https://lore.kernel.org/r/1615603275-14303-1-git-send-email-wangqing@vivo.com Reviewed-by: Himanshu Madhani Signed-off-by: Wang Qing Signed-off-by: Martin K. Petersen commit 475bff65c431013057c4b6b150bce259e80d0adf Author: Lee Jones Date: Fri Mar 12 09:47:38 2021 +0000 scsi: 3w-sas: Remove unused variables 'sglist' and 'tw_dev' Fixes the following W=1 kernel build warning(s): drivers/scsi/3w-sas.c: In function ‘twl_scsiop_execute_scsi’: drivers/scsi/3w-sas.c:298:22: warning: variable ‘sglist’ set but not used [-Wunused-but-set-variable] drivers/scsi/3w-sas.c: In function ‘twl_scsi_biosparam’: drivers/scsi/3w-sas.c:1411:23: warning: variable ‘tw_dev’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210312094738.2207817-31-lee.jones@linaro.org Cc: Adam Radford Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ea7fb5344ad00accb016cad11f88bfd0e8cbcca1 Author: Lee Jones Date: Fri Mar 12 09:47:37 2021 +0000 scsi: 3w-9xxx: Remove a few set but unused variables Fixes the following W=1 kernel build warning(s): drivers/scsi/3w-9xxx.c: In function ‘twa_empty_response_queue’: drivers/scsi/3w-9xxx.c:942:24: warning: variable ‘response_que_value’ set but not used [-Wunused-but-set-variable] drivers/scsi/3w-9xxx.c: In function ‘twa_scsi_biosparam’: drivers/scsi/3w-9xxx.c:1701:23: warning: variable ‘tw_dev’ set but not used [-Wunused-but-set-variable] drivers/scsi/3w-9xxx.c: In function ‘twa_scsiop_execute_scsi’: drivers/scsi/3w-9xxx.c:1812:22: warning: variable ‘sglist’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210312094738.2207817-30-lee.jones@linaro.org Cc: Adam Radford Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6c31cb74a1ce84ea13cebade1203322b998c98fc Author: Lee Jones Date: Fri Mar 12 09:47:36 2021 +0000 scsi: 3w-xxxx: Remove 2 unused variables 'response_que_value' and 'tw_dev' Fixes the following W=1 kernel build warning(s): drivers/scsi/3w-xxxx.c: In function ‘tw_empty_response_que’: drivers/scsi/3w-xxxx.c:463:24: warning: variable ‘response_que_value’ set but not used [-Wunused-but-set-variable] drivers/scsi/3w-xxxx.c: In function ‘tw_scsi_biosparam’: drivers/scsi/3w-xxxx.c:1345:23: warning: variable ‘tw_dev’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210312094738.2207817-29-lee.jones@linaro.org Cc: Adam Radford Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Joel Jacobson Cc: de Melo Cc: Andre Hedrick Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3cb0cfb557cd9b07e15d8e4e4540f7a2794da189 Author: Lee Jones Date: Fri Mar 12 09:47:35 2021 +0000 scsi: myrs: Remove a couple of unused 'status' variables Fixes the following W=1 kernel build warning(s): drivers/scsi/myrs.c: In function ‘consistency_check_show’: drivers/scsi/myrs.c:1193:16: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] drivers/scsi/myrs.c: In function ‘myrs_get_resync’: drivers/scsi/myrs.c:1984:5: warning: variable ‘status’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210312094738.2207817-28-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Linux GmbH Cc: "Leonard N. Zubkoff" Cc: linux-scsi@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6b71f60ca205a02b80e07f930fe1be378568fc92 Author: Lee Jones Date: Fri Mar 12 09:47:34 2021 +0000 scsi: atp870u: Fix naming and demote incorrect and non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/scsi/atp870u.c:623: warning: expecting prototype for atp870u_queuecommand(). Prototype was for atp870u_queuecommand_lck() instead drivers/scsi/atp870u.c:724: warning: Function parameter or member 'dev' not described in 'send_s870' drivers/scsi/atp870u.c:724: warning: Function parameter or member 'c' not described in 'send_s870' drivers/scsi/atp870u.c:724: warning: Excess function parameter 'host' description in 'send_s870' Link: https://lore.kernel.org/r/20210312094738.2207817-27-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Marcelo Tosatti Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 167b7e6bfbf52c739642659239200874bb388fff Author: Lee Jones Date: Fri Mar 12 09:47:33 2021 +0000 scsi: dc395x: Fix incorrect naming in function headers Fixes the following W=1 kernel build warning(s): drivers/scsi/dc395x.c:980: warning: expecting prototype for dc395x_queue_command(). Prototype was for dc395x_queue_command_lck() instead drivers/scsi/dc395x.c:4263: warning: expecting prototype for adapter_init_host(). Prototype was for adapter_init_scsi_host() instead drivers/scsi/dc395x.c:4353: warning: Function parameter or member 'acb' not described in 'adapter_init' drivers/scsi/dc395x.c:4353: warning: Function parameter or member 'io_port_len' not described in 'adapter_init' drivers/scsi/dc395x.c:4353: warning: expecting prototype for init_adapter(). Prototype was for adapter_init() instead Link: https://lore.kernel.org/r/20210312094738.2207817-26-lee.jones@linaro.org Cc: Oliver Neukum Cc: Ali Akcaagac Cc: Jamie Lenehan Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "C.L. Huang" Cc: Erich Chen Cc: Kurt Garloff Cc: dc395x@twibble.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit fb5b29b2ad3f4ef0f0dda2ee267994cf8efb190d Author: Lee Jones Date: Fri Mar 12 09:47:32 2021 +0000 scsi: a100u2w: Remove unused variable 'bios_phys' Fixes the following W=1 kernel build warning(s): drivers/scsi/a100u2w.c: In function ‘inia100_probe_one’: drivers/scsi/a100u2w.c:1092:8: warning: variable ‘bios_phys’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210312094738.2207817-25-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Doug Ledford Cc: Christoph Hellwig Cc: Alan Cox Cc: linux-scsi@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 78e40ac8b6960eb8b33b369a55eb46b4563a4b62 Author: Lee Jones Date: Fri Mar 12 09:47:31 2021 +0000 scsi: initio: Remove unused variable 'prev' Fixes the following W=1 kernel build warning(s): drivers/scsi/initio.c: In function ‘initio_find_busy_scb’: drivers/scsi/initio.c:869:30: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable] Link: https://lore.kernel.org/r/20210312094738.2207817-24-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Bas Vermeulen Cc: Christoph Hellwig Cc: Brian Macy Cc: linux-scsi@vger.kernel.org Reviewed-by: Christoph Hellwig Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 0a386beb7ebdcc475a57327d4ab1eb6fa6a7c678 Author: Lee Jones Date: Fri Mar 12 09:47:30 2021 +0000 scsi: bnx2i: Fix bnx2i_set_ccell_info()'s name in description Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2i/bnx2i_sysfs.c:118: warning: expecting prototype for bnx2i_get_link_state(). Prototype was for bnx2i_set_ccell_info() instead Link: https://lore.kernel.org/r/20210312094738.2207817-23-lee.jones@linaro.org Cc: Nilesh Javali Cc: Manish Rangankar Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Anil Veerabhadrappa Cc: Eddie Wai Cc: QLogic-Storage-Upstream@qlogic.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ab4bab7a977da3382232e1a585ed84634c831289 Author: Lee Jones Date: Fri Mar 12 09:47:29 2021 +0000 scsi: be2iscsi: Fix beiscsi_phys_port()'s name in header Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_mgmt.c:1270: warning: expecting prototype for beiscsi_phys_port(). Prototype was for beiscsi_phys_port_disp() instead Link: https://lore.kernel.org/r/20210312094738.2207817-22-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-drivers@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a905a1dce8bfc1c057ff7eae9e1d99a818af3007 Author: Lee Jones Date: Fri Mar 12 09:47:28 2021 +0000 scsi: be2iscsi: Provide missing function name in header Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_main.c:4934: warning: expecting prototype for Boot flag info for iscsi(). Prototype was for BEISCSI_SYSFS_ISCSI_BOOT_FLAGS() instead Link: https://lore.kernel.org/r/20210312094738.2207817-21-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-drivers@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 1b8a7ee9308e4e81ff02ed853a38ed23d386190b Author: Lee Jones Date: Fri Mar 12 09:47:27 2021 +0000 scsi: be2iscsi: Fix incorrect naming of beiscsi_iface_config_vlan() Fixes the following W=1 kernel build warning(s): drivers/scsi/be2iscsi/be_iscsi.c:312: warning: expecting prototype for beiscsi_set_vlan_tag(). Prototype was for beiscsi_iface_config_vlan() instead Link: https://lore.kernel.org/r/20210312094738.2207817-20-lee.jones@linaro.org Cc: Subbu Seetharaman Cc: Ketan Mukadam Cc: Jitendra Bhivare Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-drivers@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 1c666a3e0a54e0d6df6dee5790cc93ed69aff095 Author: Lee Jones Date: Fri Mar 12 09:47:26 2021 +0000 scsi: esas2r: Supply __printf(x, y) formatting for esas2r_log_master() Fixes the following W=1 kernel build warning(s): drivers/scsi/esas2r/esas2r_log.c: In function ‘esas2r_log_master’: drivers/scsi/esas2r/esas2r_log.c:155:3: warning: function ‘esas2r_log_master’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Link: https://lore.kernel.org/r/20210312094738.2207817-19-lee.jones@linaro.org Cc: Bradley Grove Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 181883786427dab3f89724993c407c5831df09e3 Author: Lee Jones Date: Fri Mar 12 09:47:25 2021 +0000 scsi: cxgbi: cxgb3: Fix misnaming of ddp_setup_conn_digest() Fixes the following W=1 kernel build warning(s): drivers/scsi/cxgbi/cxgb3i/cxgb3i.c:1189: warning: expecting prototype for cxgb3i_setup_conn_digest(). Prototype was for ddp_setup_conn_digest() instead Link: https://lore.kernel.org/r/20210312094738.2207817-18-lee.jones@linaro.org Cc: Karen Xie Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Dimitris Michailidis Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit d5db88b0ce89075e7a107ca90ced22508f1d42a9 Author: Lee Jones Date: Fri Mar 12 09:47:24 2021 +0000 scsi: ufs: cdns-pltfrm: Supply function names for headers Fixes the following W=1 kernel build warning(s): drivers/scsi/ufs/cdns-pltfrm.c:109: warning: expecting prototype for Sets HCLKDIV register value based on the core_clk(). Prototype was for cdns_ufs_set_hclkdiv() instead drivers/scsi/ufs/cdns-pltfrm.c:144: warning: wrong kernel-doc identifier on line: drivers/scsi/ufs/cdns-pltfrm.c:160: warning: wrong kernel-doc identifier on line: drivers/scsi/ufs/cdns-pltfrm.c:176: warning: wrong kernel-doc identifier on line: Link: https://lore.kernel.org/r/20210312094738.2207817-17-lee.jones@linaro.org Cc: Alim Akhtar Cc: Avri Altman Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Stanley Chu Cc: Jan Kotas Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f6b35a75042b212c8eb81846ece1da6b471e5b56 Author: Lee Jones Date: Fri Mar 12 09:47:23 2021 +0000 scsi: lpfc: Fix kernel-doc formatting issue Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_nvme.c:2021: warning: Function parameter or member 'vport' not described in 'lpfc_nvme_create_localport' Link: https://lore.kernel.org/r/20210312094738.2207817-16-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a7a11b6cfec2c3dc77b8206966f371dfafabea47 Author: Lee Jones Date: Fri Mar 12 09:47:22 2021 +0000 scsi: bfa: Move a large struct from the stack onto the heap Fixes the following W=1 kernel build warning(s): drivers/scsi/bfa/bfa_fcs_lport.c: In function ‘bfa_fcs_lport_fdmi_build_rhba_pyld’: drivers/scsi/bfa/bfa_fcs_lport.c:2152:1: warning: the frame size of 1200 bytes is larger than 1024 bytes [-Wframe-larger-than=] Link: https://lore.kernel.org/r/20210312094738.2207817-15-lee.jones@linaro.org Cc: Anil Gurumurthy Cc: Sudarsana Kalluru Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3145d2d69e1600d924aaf23199e63995b1ea108b Author: Lee Jones Date: Fri Mar 12 09:47:21 2021 +0000 scsi: lpfc: Fix a few incorrectly named functions Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_bsg.c:3591: warning: expecting prototype for lpfc_bsg_mbox_ext_cleanup(). Prototype was for lpfc_bsg_mbox_ext_session_reset() instead drivers/scsi/lpfc/lpfc_bsg.c:3885: warning: expecting prototype for lpfc_bsg_sli_cfg_mse_read_cmd_ext(). Prototype was for lpfc_bsg_sli_cfg_read_cmd_ext() instead drivers/scsi/lpfc/lpfc_bsg.c:4371: warning: expecting prototype for lpfc_bsg_mbox_ext_abort_req(). Prototype was for lpfc_bsg_mbox_ext_abort() instead Link: https://lore.kernel.org/r/20210312094738.2207817-14-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 2c6400b7824323326e591d42ab2620d0b7b90b0b Author: Lee Jones Date: Fri Mar 12 09:47:20 2021 +0000 scsi: lpfc: Fix incorrectly documented function lpfc_debugfs_commonxripools_data() Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_debugfs.c:405: warning: expecting prototype for lpfc_debugfs_common_xri_data(). Prototype was for lpfc_debugfs_commonxripools_data() instead Link: https://lore.kernel.org/r/20210312094738.2207817-13-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit dc49ab48a77c48b3334ec57c2163f92721b06b5e Author: Lee Jones Date: Fri Mar 12 09:47:19 2021 +0000 scsi: qla2xxx: Fix a couple of misdocumented functions Fixes the following W=1 kernel build warning(s): drivers/scsi/qla2xxx/qla_target.c:6476: warning: expecting prototype for qla_tgt_lport_register(). Prototype was for qlt_lport_register() instead drivers/scsi/qla2xxx/qla_target.c:6546: warning: expecting prototype for qla_tgt_lport_deregister(). Prototype was for qlt_lport_deregister() instead Link: https://lore.kernel.org/r/20210312094738.2207817-12-lee.jones@linaro.org Cc: Nilesh Javali Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Vladislav Bolkhovitin Cc: Nathaniel Clark Cc: "Nicholas A. Bellinger" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a736e44904422ade7af4ac50c64f58617ae4b7ba Author: Lee Jones Date: Fri Mar 12 09:47:18 2021 +0000 scsi: qla2xxx: Fix incorrectly named function qla8044_check_temp() Fixes the following W=1 kernel build warning(s): drivers/scsi/qla2xxx/qla_nx2.c:2038: warning: expecting prototype for qla4_8xxx_check_temp(). Prototype was for qla8044_check_temp() instead Link: https://lore.kernel.org/r/20210312094738.2207817-11-lee.jones@linaro.org Cc: Nilesh Javali Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 782a1ab33f71b898497b2d035a056e5e198df82b Author: Lee Jones Date: Fri Mar 12 09:47:17 2021 +0000 scsi: mpt3sas: Fix some kernel-doc misnaming issues Fixes the following W=1 kernel build warning(s): drivers/scsi/mpt3sas/mpt3sas_ctl.c:463: warning: expecting prototype for mpt3sas_ctl_reset_handler(). Prototype was for mpt3sas_ctl_pre_reset_handler() instead drivers/scsi/mpt3sas/mpt3sas_ctl.c:495: warning: expecting prototype for mpt3sas_ctl_reset_handler(). Prototype was for mpt3sas_ctl_clear_outstanding_ioctls() instead drivers/scsi/mpt3sas/mpt3sas_ctl.c:512: warning: expecting prototype for mpt3sas_ctl_reset_handler(). Prototype was for mpt3sas_ctl_reset_done_handler() instead drivers/scsi/mpt3sas/mpt3sas_ctl.c:2771: warning: expecting prototype for _ ctl_ioctl_compat(). Prototype was for _ctl_ioctl_compat() instead drivers/scsi/mpt3sas/mpt3sas_ctl.c:2789: warning: expecting prototype for _ ctl_mpt2_ioctl_compat(). Prototype was for _ctl_mpt2_ioctl_compat() instead drivers/scsi/mpt3sas/mpt3sas_ctl.c:3061: warning: expecting prototype for sas_address_show(). Prototype was for host_sas_address_show() instead drivers/scsi/mpt3sas/mpt3sas_ctl.c:3682: warning: expecting prototype for diag_trigger_scsi_show(). Prototype was for diag_trigger_mpi_show() instead drivers/scsi/mpt3sas/mpt3sas_ctl.c:3941: warning: expecting prototype for sas_ncq_io_prio_show(). Prototype was for sas_ncq_prio_enable_show() instead Link: https://lore.kernel.org/r/20210312094738.2207817-10-lee.jones@linaro.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: MPT-FusionLinux.pdl@avagotech.com Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 381095668d51387657e456e2962f0bcc3e1044e3 Author: Lee Jones Date: Fri Mar 12 09:47:16 2021 +0000 scsi: qla2xxx: Fix a couple of misnamed functions Fixes the following W=1 kernel build warning(s): drivers/scsi/qla2xxx/qla_mr.c:525: warning: expecting prototype for qlafx00_warm_reset(). Prototype was for qlafx00_soc_cpu_reset() instead drivers/scsi/qla2xxx/qla_mr.c:2869: warning: expecting prototype for qlafx00x_mbx_completion(). Prototype was for qlafx00_mbx_completion() instead Link: https://lore.kernel.org/r/20210312094738.2207817-9-lee.jones@linaro.org Cc: Nilesh Javali Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 775b4d65a6fb539d0e1e7a9028279bd0821dbd94 Author: Lee Jones Date: Fri Mar 12 09:47:15 2021 +0000 scsi: libfc: Fix misspelling of fc_fcp_destroy() Fixes the following W=1 kernel build warning(s): drivers/scsi/libfc/fc_fcp.c:2255: warning: expecting prototype for fc_fcp_destory(). Prototype was for fc_fcp_destroy() instead Link: https://lore.kernel.org/r/20210312094738.2207817-8-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 54cb88dc3083e5dbdba48600de6a6542c48a3e13 Author: Lee Jones Date: Fri Mar 12 09:47:14 2021 +0000 scsi: mpt3sas: Fix a couple of misdocumented functions/params Fixes the following W=1 kernel build warning(s): drivers/scsi/mpt3sas/mpt3sas_transport.c:71: warning: Function parameter or member 'phy' not described in '_transport_get_port_id_by_sas_phy' drivers/scsi/mpt3sas/mpt3sas_transport.c:354: warning: Function parameter or member 'port_id' not described in '_transport_expander_report_manufacture' drivers/scsi/mpt3sas/mpt3sas_transport.c:354: warning: expecting prototype for transport_expander_report_manufacture(). Prototype was for _transport_expander_report_manufacture() instead drivers/scsi/mpt3sas/mpt3sas_transport.c:684: warning: Function parameter or member 'hba_port' not described in 'mpt3sas_transport_port_add' drivers/scsi/mpt3sas/mpt3sas_transport.c:684: warning: Excess function parameter 'port' description in 'mpt3sas_transport_port_add' Link: https://lore.kernel.org/r/20210312094738.2207817-7-lee.jones@linaro.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: MPT-FusionLinux.pdl@avagotech.com Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 0dbea7c188739b6a38d940fb12694c485eb1a8b1 Author: Lee Jones Date: Fri Mar 12 09:47:13 2021 +0000 scsi: libfc: Fix incorrect naming of fc_rport_adisc_resp() Fixes the following W=1 kernel build warning(s): drivers/scsi/libfc/fc_rport.c:1500: warning: expecting prototype for fc_rport_els_adisc_resp(). Prototype was for fc_rport_adisc_resp() instead Link: https://lore.kernel.org/r/20210312094738.2207817-6-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a3dbf5145d01cdb41b726283afa10a6ff8b0977c Author: Lee Jones Date: Fri Mar 12 09:47:12 2021 +0000 scsi: lpfc: Fix a bunch of misnamed functions Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_attr.c:880: warning: expecting prototype for lpfc_state_show(). Prototype was for lpfc_link_state_show() instead drivers/scsi/lpfc/lpfc_attr.c:3834: warning: expecting prototype for lpfc_tgt_queue_depth_store(). Prototype was for lpfc_tgt_queue_depth_set() instead drivers/scsi/lpfc/lpfc_attr.c:4027: warning: expecting prototype for lpfc_topology_set(). Prototype was for lpfc_topology_store() instead drivers/scsi/lpfc/lpfc_attr.c:4481: warning: expecting prototype for lpfc_link_speed_set(). Prototype was for lpfc_link_speed_store() instead drivers/scsi/lpfc/lpfc_attr.c:4879: warning: expecting prototype for lpfc_request_firmware_store(). Prototype was for lpfc_request_firmware_upgrade_store() instead drivers/scsi/lpfc/lpfc_attr.c:5235: warning: expecting prototype for lpfc_state_show(). Prototype was for lpfc_fcp_cpu_map_show() instead Link: https://lore.kernel.org/r/20210312094738.2207817-5-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 0bb87e01d81575bf6b0007752e637f3253410553 Author: Lee Jones Date: Fri Mar 12 09:47:11 2021 +0000 scsi: lpfc: Fix a bunch of kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_scsi.c:746: warning: expecting prototype for lpfc_release_scsi_buf(). Prototype was for lpfc_release_scsi_buf_s3() instead drivers/scsi/lpfc/lpfc_scsi.c:979: warning: expecting prototype for App checking is required for(). Prototype was for BG_ERR_CHECK() instead drivers/scsi/lpfc/lpfc_scsi.c:3701: warning: Function parameter or member 'vport' not described in 'lpfc_scsi_prep_cmnd_buf' drivers/scsi/lpfc/lpfc_scsi.c:3701: warning: Excess function parameter 'phba' description in 'lpfc_scsi_prep_cmnd_buf' drivers/scsi/lpfc/lpfc_scsi.c:3717: warning: Function parameter or member 'fcpi_parm' not described in 'lpfc_send_scsi_error_event' drivers/scsi/lpfc/lpfc_scsi.c:3717: warning: Excess function parameter 'rsp_iocb' description in 'lpfc_send_scsi_error_event' drivers/scsi/lpfc/lpfc_scsi.c:3837: warning: Function parameter or member 'fcpi_parm' not described in 'lpfc_handle_fcp_err' drivers/scsi/lpfc/lpfc_scsi.c:3837: warning: expecting prototype for lpfc_handler_fcp_err(). Prototype was for lpfc_handle_fcp_err() instead drivers/scsi/lpfc/lpfc_scsi.c:4021: warning: Function parameter or member 'wcqe' not described in 'lpfc_fcp_io_cmd_wqe_cmpl' drivers/scsi/lpfc/lpfc_scsi.c:4021: warning: Excess function parameter 'pwqeOut' description in 'lpfc_fcp_io_cmd_wqe_cmpl' drivers/scsi/lpfc/lpfc_scsi.c:4621: warning: Function parameter or member 'vport' not described in 'lpfc_scsi_prep_cmnd_buf_s3' drivers/scsi/lpfc/lpfc_scsi.c:4621: warning: Excess function parameter 'phba' description in 'lpfc_scsi_prep_cmnd_buf_s3' drivers/scsi/lpfc/lpfc_scsi.c:4698: warning: Function parameter or member 'vport' not described in 'lpfc_scsi_prep_cmnd_buf_s4' drivers/scsi/lpfc/lpfc_scsi.c:4698: warning: Excess function parameter 'phba' description in 'lpfc_scsi_prep_cmnd_buf_s4' drivers/scsi/lpfc/lpfc_scsi.c:4954: warning: expecting prototype for lpfc_taskmgmt_def_cmpl(). Prototype was for lpfc_tskmgmt_def_cmpl() instead drivers/scsi/lpfc/lpfc_scsi.c:5094: warning: expecting prototype for lpfc_poll_rearm_time(). Prototype was for lpfc_poll_rearm_timer() instead Link: https://lore.kernel.org/r/20210312094738.2207817-4-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 11eea9b3fd4d424fcfc1acbb4ae5c25c21fb6edb Author: Lee Jones Date: Fri Mar 12 09:47:10 2021 +0000 scsi: ufs: core: Fix incorrectly named ufshcd_find_max_sup_active_icc_level() Fixes the following W=1 kernel build warning(s): drivers/scsi/ufs/ufshcd.c:7142: warning: expecting prototype for ufshcd_calc_icc_level(). Prototype was for ufshcd_find_max_sup_active_icc_level() instead Link: https://lore.kernel.org/r/20210312094738.2207817-3-lee.jones@linaro.org Cc: Alim Akhtar Cc: Avri Altman Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Santosh Yaraganavi Cc: Vinayak Holikatti Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit cf9e575e62a4c2dbb665490cf35da043890e5751 Author: Lee Jones Date: Fri Mar 12 09:47:09 2021 +0000 scsi: mpt3sas: Fix a bunch of potential naming doc-rot Fixes the following W=1 kernel build warning(s): drivers/scsi/mpt3sas/mpt3sas_config.c:1795: warning: expecting prototype for mpt3sas_config_set_driver_trigger_pg0(). Prototype was for _config_set_driver_trigger_pg0() instead drivers/scsi/mpt3sas/mpt3sas_config.c:1929: warning: expecting prototype for mpt3sas_config_set_driver_trigger_pg1(). Prototype was for _config_set_driver_trigger_pg1() instead drivers/scsi/mpt3sas/mpt3sas_config.c:2080: warning: expecting prototype for mpt3sas_config_set_driver_trigger_pg2(). Prototype was for _config_set_driver_trigger_pg2() instead drivers/scsi/mpt3sas/mpt3sas_config.c:2240: warning: expecting prototype for mpt3sas_config_set_driver_trigger_pg3(). Prototype was for _config_set_driver_trigger_pg3() instead drivers/scsi/mpt3sas/mpt3sas_config.c:2397: warning: expecting prototype for mpt3sas_config_set_driver_trigger_pg4(). Prototype was for _config_set_driver_trigger_pg4() instead Link: https://lore.kernel.org/r/20210312094738.2207817-2-lee.jones@linaro.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: MPT-FusionLinux.pdl@avagotech.com Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 2111ba8781da6067e869329886fc717cbd7d93e2 Author: Lee Jones Date: Wed Mar 3 14:46:31 2021 +0000 scsi: mpt3sas: Move a little data from the stack onto the heap Fixes the following W=1 kernel build warning(s): drivers/scsi/mpt3sas/mpt3sas_scsih.c: In function ‘_scsih_scan_for_devices_after_reset’: drivers/scsi/mpt3sas/mpt3sas_scsih.c:10473:1: warning: the frame size of 1064 bytes is larger than 1024 bytes [-Wframe-larger-than=] Link: https://lore.kernel.org/r/20210303144631.3175331-31-lee.jones@linaro.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: MPT-FusionLinux.pdl@avagotech.com Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e015e0ded1351f281202fc1d138fc862ec01d1d4 Author: Lee Jones Date: Wed Mar 3 14:46:29 2021 +0000 scsi: mpt3sas: Fix misspelling of _base_put_smid_default_atomic() Fixes the following W=1 kernel build warning(s): drivers/scsi/mpt3sas/mpt3sas_base.c:4185: warning: expecting prototype for _base_put_smid_default(). Prototype was for _base_put_smid_default_atomic() instead Link: https://lore.kernel.org/r/20210303144631.3175331-29-lee.jones@linaro.org Cc: Sathya Prakash Cc: Sreekanth Reddy Cc: Suganath Prabu Subramani Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: MPT-FusionLinux.pdl@avagotech.com Cc: MPT-FusionLinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3884ce1539b0875a2860fd8d2c2d39c2ddcfa35b Author: Lee Jones Date: Wed Mar 3 14:46:28 2021 +0000 scsi: lpfc: Fix incorrect naming of __lpfc_update_fcf_record() Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_hbadisc.c:1505: warning: expecting prototype for lpfc_update_fcf_record(). Prototype was for __lpfc_update_fcf_record() instead Link: https://lore.kernel.org/r/20210303144631.3175331-28-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 4a4db603d0b7bab41b49f70d39e88c4c7f95dd89 Author: Lee Jones Date: Wed Mar 3 14:46:27 2021 +0000 scsi: libfc: Fix some possible copy/paste issues Fixes the following W=1 kernel build warning(s): drivers/scsi/libfc/fc_lport.c:710: warning: expecting prototype for fc_rport_enter_ready(). Prototype was for fc_lport_enter_ready() instead drivers/scsi/libfc/fc_lport.c:759: warning: expecting prototype for fc_lport_set_port_id(). Prototype was for fc_lport_set_local_id() instead drivers/scsi/libfc/fc_lport.c:1400: warning: expecting prototype for fc_rport_enter_dns(). Prototype was for fc_lport_enter_dns() instead drivers/scsi/libfc/fc_lport.c:1516: warning: expecting prototype for fc_rport_enter_fdmi(). Prototype was for fc_lport_enter_fdmi() instead drivers/scsi/libfc/fc_lport.c:1647: warning: expecting prototype for fc_rport_enter_logo(). Prototype was for fc_lport_enter_logo() instead drivers/scsi/libfc/fc_lport.c:1789: warning: expecting prototype for fc_rport_enter_flogi(). Prototype was for fc_lport_enter_flogi() instead Link: https://lore.kernel.org/r/20210303144631.3175331-27-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 964bc8c4adb343c1142749a7e7276ef293c2d7af Author: Lee Jones Date: Wed Mar 3 14:46:26 2021 +0000 scsi: lpfc: Fix formatting and misspelling issues Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_ct.c:153: warning: Function parameter or member 'ct_req' not described in 'lpfc_ct_reject_event' drivers/scsi/lpfc/lpfc_ct.c:153: warning: Function parameter or member 'rx_id' not described in 'lpfc_ct_reject_event' drivers/scsi/lpfc/lpfc_ct.c:153: warning: Function parameter or member 'ox_id' not described in 'lpfc_ct_reject_event' drivers/scsi/lpfc/lpfc_ct.c:283: warning: Function parameter or member 'ctiocbq' not described in 'lpfc_ct_handle_mibreq' drivers/scsi/lpfc/lpfc_ct.c:283: warning: Excess function parameter 'ctiocb' description in 'lpfc_ct_handle_mibreq' Link: https://lore.kernel.org/r/20210303144631.3175331-26-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7df1daed3330e78d0bafe09cfd4aa0eb1da199ec Author: Lee Jones Date: Wed Mar 3 14:46:25 2021 +0000 scsi: aacraid: Fix misspelling of _aac_rx_init() Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/rx.c:544: warning: expecting prototype for aac_rx_init(). Prototype was for _aac_rx_init() instead Link: https://lore.kernel.org/r/20210303144631.3175331-25-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "PMC-Sierra, Inc" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit f11c8b42423f3b32c30bd985333e7378226b832d Author: Lee Jones Date: Wed Mar 3 14:46:24 2021 +0000 scsi: qla2xxx: Fix some incorrect formatting/spelling issues Fixes the following W=1 kernel build warning(s): drivers/scsi/qla2xxx/qla_gs.c:1259: warning: expecting prototype for qla2x00_snd_rft_id(). Prototype was for qla2x00_sns_rft_id() instead drivers/scsi/qla2xxx/qla_gs.c:1492: warning: expecting prototype for qla2x00_prep_ct_req(). Prototype was for qla2x00_prep_ct_fdmi_req() instead drivers/scsi/qla2xxx/qla_gs.c:1596: warning: expecting prototype for perform HBA attributes registration(). Prototype was for qla2x00_hba_attributes() instead drivers/scsi/qla2xxx/qla_gs.c:1851: warning: expecting prototype for perform Port attributes registration(). Prototype was for qla2x00_port_attributes() instead drivers/scsi/qla2xxx/qla_gs.c:2284: warning: expecting prototype for perform RPRT registration(). Prototype was for qla2x00_fdmi_rprt() instead Link: https://lore.kernel.org/r/20210303144631.3175331-24-lee.jones@linaro.org Cc: Nilesh Javali Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Nilesh Javali Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 7cdaf12ea50afd7512114eb21bc6bf4428c9006c Author: Lee Jones Date: Wed Mar 3 14:46:23 2021 +0000 scsi: pm8001: Fix a bunch of doc-rotted function headers Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm80xx_hwi.c:1427: warning: expecting prototype for pm8001_chip_init(). Prototype was for pm80xx_chip_init() instead drivers/scsi/pm8001/pm80xx_hwi.c:1584: warning: expecting prototype for pm8001_chip_soft_rst(). Prototype was for pm80xx_chip_soft_rst() instead drivers/scsi/pm8001/pm80xx_hwi.c:1711: warning: expecting prototype for pm8001_chip_interrupt_enable(). Prototype was for pm80xx_chip_intx_interrupt_enable() instead drivers/scsi/pm8001/pm80xx_hwi.c:1722: warning: expecting prototype for pm8001_chip_intx_interrupt_disable(). Prototype was for pm80xx_chip_intx_interrupt_disable() instead drivers/scsi/pm8001/pm80xx_hwi.c:1733: warning: expecting prototype for pm8001_chip_interrupt_enable(). Prototype was for pm80xx_chip_interrupt_enable() instead drivers/scsi/pm8001/pm80xx_hwi.c:1752: warning: expecting prototype for pm8001_chip_interrupt_disable(). Prototype was for pm80xx_chip_interrupt_disable() instead drivers/scsi/pm8001/pm80xx_hwi.c:4192: warning: expecting prototype for pm8001_chip_smp_req(). Prototype was for pm80xx_chip_smp_req() instead drivers/scsi/pm8001/pm80xx_hwi.c:4775: warning: expecting prototype for pm8001_chip_phy_stop_req(). Prototype was for pm80xx_chip_phy_stop_req() instead drivers/scsi/pm8001/pm80xx_hwi.c:4907: warning: expecting prototype for pm8001_chip_isr(). Prototype was for pm80xx_chip_isr() instead Link: https://lore.kernel.org/r/20210303144631.3175331-23-lee.jones@linaro.org Cc: Jack Wang Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 241b37ac5859434974f8638af9f555a9253c5ed8 Author: Lee Jones Date: Wed Mar 3 14:46:22 2021 +0000 scsi: aic94xx: Remove code that has been unused for at least 13 years Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_dump.c:731: warning: expecting prototype for asd_dump_ddb_site(). Prototype was for asd_dump_target_ddb() instead drivers/scsi/aic94xx/aic94xx_dump.c:875: warning: expecting prototype for ads_dump_seq_state(). Prototype was for asd_dump_seq_state() instead Link: https://lore.kernel.org/r/20210303144631.3175331-22-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: David Chaw Cc: Luben Tuikov Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a7f4242d120740f549f729b4d18e73b589c889e5 Author: Lee Jones Date: Wed Mar 3 14:46:21 2021 +0000 scsi: bnx2fc: Fix misnaming of bnx2fc_free_session_resc() Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2fc/bnx2fc_tgt.c:831: warning: expecting prototype for bnx2i_free_session_resc(). Prototype was for bnx2fc_free_session_resc() instead Link: https://lore.kernel.org/r/20210303144631.3175331-21-lee.jones@linaro.org Cc: Saurav Kashyap Cc: Javed Hasan Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Prakash Gollapudi Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e39c31a7435af49d03604fb89f035198bf7f5f45 Author: Lee Jones Date: Wed Mar 3 14:46:20 2021 +0000 scsi: qla4xxx: Fix kernel-doc formatting and misnaming issue Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_mbx.c:47: warning: wrong kernel-doc identifier on line: drivers/scsi/qla4xxx/ql4_mbx.c:947: warning: expecting prototype for qla4xxx_set_fwddb_entry(). Prototype was for qla4xxx_set_ddb_entry() instead Link: https://lore.kernel.org/r/20210303144631.3175331-20-lee.jones@linaro.org Cc: Nilesh Javali Cc: Manish Rangankar Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Nilesh Javali Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 6b87e435e4bccd696f47ea73f9483ae2cfc62aec Author: Lee Jones Date: Wed Mar 3 14:46:19 2021 +0000 scsi: pm8001: Fix some misnamed function descriptions Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_hwi.c:1183: warning: expecting prototype for pm8001_chip_interrupt_enable(). Prototype was for pm8001_chip_intx_interrupt_enable() instead drivers/scsi/pm8001/pm8001_hwi.c:1257: warning: expecting prototype for pm8001_chip_intx_interrupt_disable(). Prototype was for pm8001_chip_interrupt_disable() instead drivers/scsi/pm8001/pm8001_hwi.c:3235: warning: expecting prototype for asd_get_attached_sas_addr(). Prototype was for pm8001_get_attached_sas_addr() instead drivers/scsi/pm8001/pm8001_hwi.c:3555: warning: expecting prototype for fw_flash_update_resp(). Prototype was for pm8001_mpi_fw_flash_update_resp() instead Link: https://lore.kernel.org/r/20210303144631.3175331-19-lee.jones@linaro.org Cc: Jack Wang Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 8514e2f1e2c6d78537eb66585b69ab59138e0220 Author: Lee Jones Date: Wed Mar 3 14:46:18 2021 +0000 scsi: lpfc: Fix a bunch of kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/scsi/lpfc/lpfc_sli.c:9654: warning: expecting prototype for lpfc_sli_iocb2wqe(). Prototype was for lpfc_sli4_iocb2wqe() instead drivers/scsi/lpfc/lpfc_sli.c:10439: warning: Function parameter or member 'phba' not described in 'lpfc_sli_issue_fcp_io' drivers/scsi/lpfc/lpfc_sli.c:10439: warning: Function parameter or member 'ring_number' not described in 'lpfc_sli_issue_fcp_io' drivers/scsi/lpfc/lpfc_sli.c:10439: warning: Function parameter or member 'piocb' not described in 'lpfc_sli_issue_fcp_io' drivers/scsi/lpfc/lpfc_sli.c:10439: warning: Function parameter or member 'flag' not described in 'lpfc_sli_issue_fcp_io' drivers/scsi/lpfc/lpfc_sli.c:14189: warning: expecting prototype for lpfc_sli4_sp_process_cq(). Prototype was for __lpfc_sli4_sp_process_cq() instead drivers/scsi/lpfc/lpfc_sli.c:14754: warning: expecting prototype for lpfc_sli4_hba_process_cq(). Prototype was for lpfc_sli4_dly_hba_process_cq() instead drivers/scsi/lpfc/lpfc_sli.c:17230: warning: expecting prototype for lpfc_sli4_free_xri(). Prototype was for __lpfc_sli4_free_xri() instead drivers/scsi/lpfc/lpfc_sli.c:18950: warning: expecting prototype for lpfc_sli4_free_rpi(). Prototype was for __lpfc_sli4_free_rpi() instead Link: https://lore.kernel.org/r/20210303144631.3175331-18-lee.jones@linaro.org Cc: James Smart Cc: Dick Kennedy Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Sumit Semwal Cc: "Christian König" Cc: linux-scsi@vger.kernel.org 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 53616df28199b2555cccddcfede7098ba51bd789 Author: Lee Jones Date: Wed Mar 3 14:46:17 2021 +0000 scsi: aacraid: Repair formatting issue in aac_handle_sa_aif()'s header Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commsup.c:334: warning: expecting prototype for fib_deallocate(). Prototype was for fib_dealloc() instead drivers/scsi/aacraid/commsup.c:1961: warning: expecting prototype for aac_handle_sa_aif Handle a message from the firmware(). Prototype was for aac_handle_sa_aif() instead Link: https://lore.kernel.org/r/20210303144631.3175331-17-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Sumit Semwal Cc: "Christian König" Cc: "PMC-Sierra, Inc" Cc: linux-scsi@vger.kernel.org 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 52bb80f18def787e98a9f97a7cabbe71e4879996 Author: Lee Jones Date: Wed Mar 3 14:46:16 2021 +0000 scsi: qla2xxx: Replace __qla2x00_marker()'s missing underscores Fixes the following W=1 kernel build warning(s): drivers/scsi/qla2xxx/qla_iocb.c:508: warning: expecting prototype for qla2x00_marker(). Prototype was for __qla2x00_marker() instead Link: https://lore.kernel.org/r/20210303144631.3175331-16-lee.jones@linaro.org Cc: Nilesh Javali Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Nilesh Javali Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3528b9abbd065d541b30feadd2bc1e6900c97fc8 Author: Lee Jones Date: Wed Mar 3 14:46:15 2021 +0000 scsi: aic94xx: Fix asd_erase_nv_sector()'s header Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_sds.c:1253: warning: expecting prototype for asd_hwi_erase_nv_sector(). Prototype was for asd_erase_nv_sector() instead Link: https://lore.kernel.org/r/20210303144631.3175331-15-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Jason Yan Cc: John Garry Cc: "Gustavo A. R. Silva" Cc: Luben Tuikov Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 3978e59b6d6cf3a0c8f056768fa1a646a1d3d27d Author: Lee Jones Date: Wed Mar 3 14:46:14 2021 +0000 scsi: pm8001: Fix incorrectly named functions in headers Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_ctl.c:313: warning: expecting prototype for pm8001_ctl_sas_address_show(). Prototype was for pm8001_ctl_host_sas_address_show() instead drivers/scsi/pm8001/pm8001_ctl.c:530: warning: expecting prototype for pm8001_ctl_aap_log_show(). Prototype was for pm8001_ctl_iop_log_show() instead Link: https://lore.kernel.org/r/20210303144631.3175331-14-lee.jones@linaro.org Cc: Jack Wang Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit ecef0c9e6407ced2237e867ee68bf12f67105b00 Author: Lee Jones Date: Wed Mar 3 14:46:13 2021 +0000 scsi: qla4xxx: Fix formatting issues - missing '-' and '_' Fixes the following W=1 kernel build warning(s): drivers/scsi/qla4xxx/ql4_os.c:631: warning: expecting prototype for qla4xxx_create chap_list(). Prototype was for qla4xxx_create_chap_list() instead drivers/scsi/qla4xxx/ql4_os.c:9643: warning: expecting prototype for gets called if(). Prototype was for qla4xxx_pci_mmio_enabled() instead Link: https://lore.kernel.org/r/20210303144631.3175331-13-lee.jones@linaro.org Cc: Nilesh Javali Cc: Manish Rangankar Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Nilesh Javali Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 62690c056ac086b2cead9d29a15f5c1bae811aab Author: Lee Jones Date: Wed Mar 3 14:46:12 2021 +0000 scsi: pm8001: Provide function name 'pm8001_I_T_nexus_reset()' in header Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_sas.c:989: warning: expecting prototype for and hard reset for(). Prototype was for pm8001_I_T_nexus_reset() instead Link: https://lore.kernel.org/r/20210303144631.3175331-12-lee.jones@linaro.org Cc: Jack Wang Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 52ffc08d9454c0270ec734f2695b76ee0f1cbaf6 Author: Lee Jones Date: Wed Mar 3 14:46:11 2021 +0000 scsi: bnx2fc: Fix typo in bnx2fc_indicate_kcqe() Fixes the following W=1 kernel build warning(s): drivers/scsi/bnx2fc/bnx2fc_hwi.c:1344: warning: expecting prototype for bnx2fc_indicae_kcqe(). Prototype was for bnx2fc_indicate_kcqe() instead Link: https://lore.kernel.org/r/20210303144631.3175331-11-lee.jones@linaro.org Cc: Saurav Kashyap Cc: Javed Hasan Cc: GR-QLogic-Storage-Upstream@marvell.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Prakash Gollapudi Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 4c4b8cf5a1090fcaacdad7363be6ab3b758d87ff Author: Lee Jones Date: Wed Mar 3 14:46:10 2021 +0000 scsi: aacraid: Fix incorrect spelling of aac_send_raw_srb() Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/commctrl.c:480: warning: expecting prototype for aac_send_raw_scb(). Prototype was for aac_send_raw_srb() instead Link: https://lore.kernel.org/r/20210303144631.3175331-10-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "PMC-Sierra, Inc" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit bd1050e13889d65c7b849d4939bbbf2432083c8a Author: Lee Jones Date: Wed Mar 3 14:46:09 2021 +0000 scsi: pm8001: Provide function name and fix a misspelling Fixes the following W=1 kernel build warning(s): drivers/scsi/pm8001/pm8001_init.c:192: warning: expecting prototype for tasklet for 64 msi(). Prototype was for pm8001_tasklet() instead drivers/scsi/pm8001/pm8001_init.c:872: warning: expecting prototype for pm8001_set_phy_settings_ven_117c_12Gb(). Prototype was for pm8001_set_phy_settings_ven_117c_12G() instead Link: https://lore.kernel.org/r/20210303144631.3175331-9-lee.jones@linaro.org Cc: Jack Wang Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Kumar Santhanam Cc: Sangeetha Gnanasekaran Cc: Nikith Ganigarakoppal Cc: linux-scsi@vger.kernel.org Acked-by: Jack Wang Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit a80218c7c565360e91844c3b9f11a054a8d0a2c6 Author: Lee Jones Date: Wed Mar 3 14:46:08 2021 +0000 scsi: aacraid: Fix a few incorrectly named functions Fixes the following W=1 kernel build warning(s): drivers/scsi/aacraid/aachba.c:796: warning: expecting prototype for aac_probe_container(). Prototype was for aac_probe_container_callback1() instead drivers/scsi/aacraid/aachba.c:850: warning: expecting prototype for InqStrCopy(). Prototype was for inqstrcpy() instead drivers/scsi/aacraid/aachba.c:1814: warning: expecting prototype for Process topology change(). Prototype was for aac_get_safw_ciss_luns() instead Link: https://lore.kernel.org/r/20210303144631.3175331-8-lee.jones@linaro.org Cc: Adaptec OEM Raid Solutions Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: "PMC-Sierra, Inc" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 577c65b07a5508fb413c8e1fcac79af23be31111 Author: Lee Jones Date: Wed Mar 3 14:46:07 2021 +0000 scsi: aic94xx: Fix a couple of misnamed function names Fixes the following W=1 kernel build warning(s): drivers/scsi/aic94xx/aic94xx_hwi.c:910: warning: expecting prototype for ads_rbi_exsi_isr(). Prototype was for asd_rbi_exsi_isr() instead drivers/scsi/aic94xx/aic94xx_hwi.c:1156: warning: expecting prototype for asd_start_timers(). Prototype was for asd_start_scb_timers() instead Link: https://lore.kernel.org/r/20210303144631.3175331-7-lee.jones@linaro.org Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Lee Jones Cc: Luben Tuikov Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit dc173575097f7ce71e818c4e6a403aff7c9497b2 Author: Lee Jones Date: Wed Mar 3 14:46:06 2021 +0000 scsi: fcoe: Fix a couple of incorrectly named functions Fixes the following W=1 kernel build warning(s): drivers/scsi/fcoe/fcoe_ctlr.c:1314: warning: expecting prototype for fcoe_ctlr_recv_els(). Prototype was for fcoe_ctlr_recv_clr_vlink() instead drivers/scsi/fcoe/fcoe_ctlr.c:2963: warning: expecting prototype for fcoe_ctlr_vlan_disk_reply(). Prototype was for fcoe_ctlr_vlan_disc_reply() instead Link: https://lore.kernel.org/r/20210303144631.3175331-6-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit d4f5ae21597bb2b8dc3919434aa78c4dc2dcfb00 Author: Lee Jones Date: Wed Mar 3 14:46:05 2021 +0000 scsi: megaraid_mbox: Fix function name megaraid_queue_command_lck() in description Fixes the following W=1 kernel build warning(s): drivers/scsi/megaraid/megaraid_mbox.c:1438: warning: expecting prototype for megaraid_queue_command(). Prototype was for megaraid_queue_command_lck() instead Link: https://lore.kernel.org/r/20210303144631.3175331-5-lee.jones@linaro.org Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Atul Mukker Cc: Sreenivas Bagalkote Cc: Manoj Jose Cc: megaraidlinux@lsi.com Cc: megaraidlinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 276f9aa2530a32dd7833e277f492098bc7ff7d06 Author: Lee Jones Date: Wed Mar 3 14:46:04 2021 +0000 scsi: fcoe: Fix function name fcoe_set_vport_symbolic_name() in description Fixes the following W=1 kernel build warning(s): drivers/scsi/fcoe/fcoe.c:2782: warning: expecting prototype for fcoe_vport_set_symbolic_name(). Prototype was for fcoe_set_vport_symbolic_name() instead Link: https://lore.kernel.org/r/20210303144631.3175331-4-lee.jones@linaro.org Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit 616f6d8d9e16e9e1c54b71b796aceecdc4dc9bc4 Author: Lee Jones Date: Wed Mar 3 14:46:03 2021 +0000 scsi: megaraid_sas: Fix a bunch of misnamed functions in their headers Fixes the following W=1 kernel build warning(s): drivers/scsi/megaraid/megaraid_sas_base.c:483: warning: expecting prototype for megasas_clear_interrupt_xscale(). Prototype was for megasas_clear_intr_xscale() instead drivers/scsi/megaraid/megaraid_sas_base.c:666: warning: expecting prototype for megasas_clear_interrupt_ppc(). Prototype was for megasas_clear_intr_ppc() instead drivers/scsi/megaraid/megaraid_sas_base.c:795: warning: expecting prototype for megasas_clear_interrupt_skinny(). Prototype was for megasas_clear_intr_skinny() instead drivers/scsi/megaraid/megaraid_sas_base.c:943: warning: expecting prototype for megasas_clear_interrupt_gen2(). Prototype was for megasas_clear_intr_gen2() instead drivers/scsi/megaraid/megaraid_sas_base.c:4902: warning: expecting prototype for opcode(). Prototype was for megasas_host_device_list_query() instead drivers/scsi/megaraid/megaraid_sas_base.c:5173: warning: expecting prototype for megasas_get_controller_info(). Prototype was for megasas_get_ctrl_info() instead Link: https://lore.kernel.org/r/20210303144631.3175331-3-lee.jones@linaro.org Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: megaraidlinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit bbb2c0374552d429d55ee5e28cac4f9f112f6a80 Author: Lee Jones Date: Wed Mar 3 14:46:02 2021 +0000 scsi: megaraid_mm: Fix incorrect function name in header Fixes the following W=1 kernel build warning(s): drivers/scsi/megaraid/megaraid_mm.c:505: warning: expecting prototype for mraid_mm_attch_buf(). Prototype was for mraid_mm_attach_buf() instead Link: https://lore.kernel.org/r/20210303144631.3175331-2-lee.jones@linaro.org Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: megaraidlinux.pdl@broadcom.com Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Martin K. Petersen commit e512a9e9f44db4fad09d3c747c07311a643dd356 Author: Andy Shevchenko Date: Mon Mar 15 17:00:57 2021 -0700 Input: tsc2007 - make use of device properties Device property API allows to gather device resources from different sources, such as ACPI. Convert the drivers to unleash the power of device property API. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210314210951.645783-2-andy.shevchenko@gmail.com Signed-off-by: Dmitry Torokhov commit cee451c9d57ee170f123adacd70391dfb7a0b1a6 Author: Andy Shevchenko Date: Mon Mar 15 16:49:53 2021 -0700 Input: tsc2007 - convert to GPIO descriptors This converts the driver to use GPIO descriptors. Note that it now uses logical polarity and thus nagation has been dropped. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210314210951.645783-1-andy.shevchenko@gmail.com Signed-off-by: Dmitry Torokhov commit 198da7be18c47637d69cdab1f65581b04ebd759d Author: Fabio Estevam Date: Mon Mar 15 14:20:29 2021 -0300 rtc: imxdi: Convert to a DT-only driver i.MX has been converted to a DT-only platform, so make the driver depend on OF, remove the CONFIG_OF ifdefery and remove of_match_ptr(). Signed-off-by: Fabio Estevam Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210315172029.173250-1-festevam@gmail.com commit 6e00b6d0083ea5f529b057e87c0236747871b6a8 Author: Heiko Schocher Date: Tue Mar 9 14:47:19 2021 +0100 rtc: rv3028: correct weekday register usage The datasheet for the rv3028 says the weekday has exact 3 bits and in chapter 3.4.0 for the "3h–Weekday" register it says: """ This register holds the current day of the week. Each value represents one weekday that is assigned by the user. Values will range from 0 to 6 The weekday counter is simply a 3-bit counter which counts up to 6 and then resets to 0. """ So do not code weekday bitwise instead, use the raw values from 0-6. Tested on "PHYTEC phyBOARD-Pollux i.MX8MP" board. Signed-off-by: Heiko Schocher Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210309134719.1494062-1-hs@denx.de commit 0f13b5e6bf283a086b6d5b47be1ecf05a341eb9b Author: Alex Elder Date: Mon Mar 15 10:01:18 2021 -0500 net: ipa: make ipa_table_hash_support() inline In review, Alexander Duyck suggested that ipa_table_hash_support() was trivial enough that it could be implemented as a static inline function in the header file. But the patch had already been accepted. Implement his suggestion. Signed-off-by: Alex Elder Reviewed-by: Alexander Duyck Signed-off-by: David S. Miller commit 6e3bac3eba448a438840ab8152cb8bbfcb8787b8 Author: Ivan Bornyakov Date: Mon Mar 15 17:19:26 2021 +0300 net: phy: add Marvell 88X2222 transceiver support Add basic support for the Marvell 88X2222 multi-speed ethernet transceiver. This PHY provides data transmission over fiber-optic as well as Twinax copper links. The 88X2222 supports 2 ports of 10GBase-R and 1000Base-X on the line-side interface. The host-side interface supports 4 ports of 10GBase-R, RXAUI, 1000Base-X and 2 ports of XAUI. This driver, however, supports only XAUI on the host-side and 1000Base-X/10GBase-R on the line-side, for now. The SGMII is also supported over 1000Base-X. Interrupts are not supported. Internal registers access compliant with the Clause 45 specification. Signed-off-by: Ivan Bornyakov Signed-off-by: David S. Miller commit 63fe60596b9bff7d28bbfe9a3ca57ef77b8dcd26 Merge: 91de5ac99a6e5 8f2f83765eb0c Author: David S. Miller Date: Mon Mar 15 14:46:34 2021 -0700 Merge branch 'stmmac-clocks' Joakim Zhang says: ==================== net: stmmac: implement clocks management This patch set tries to implement clocks management, and takes i.MX platform as an example. --- ChangeLogs: V1->V2: * change to pm runtime mechanism. * rename function: _enable() -> _config() * take MDIO bus into account, it needs clocks when interface is closed. * reverse Christmass tree. V2->V3: * slightly simple the code according to Andrew's suggesstion and also add tag: Reviewed-by: Andrew Lunn ==================== Signed-off-by: David S. Miller commit 8f2f83765eb0c402fdf77bc8a81d6435b5aa98b7 Author: Joakim Zhang Date: Mon Mar 15 20:16:48 2021 +0800 net: stmmac: dwmac-imx: add platform level clocks management for i.MX Split clocks settings from init callback into clks_config callback, which could support platform level clocks management. Reviewed-by: Andrew Lunn Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit b4d45aee6635197d257f3469413837cd94fc11f4 Author: Joakim Zhang Date: Mon Mar 15 20:16:47 2021 +0800 net: stmmac: add platform level clocks management This patch intends to add platform level clocks management. Some platforms may have their own special clocks, they also need to be managed dynamically. If you want to manage such clocks, please implement clks_config callback. Reviewed-by: Andrew Lunn Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 5ec55823438e850c91c6b92aec93fb04ebde29e2 Author: Joakim Zhang Date: Mon Mar 15 20:16:46 2021 +0800 net: stmmac: add clocks management for gmac driver This patch intends to add clocks management for stmmac driver: If CONFIG_PM enabled: 1. Keep clocks disabled after driver probed. 2. Enable clocks when up the net device, and disable clocks when down the net device. If CONFIG_PM disabled: Keep clocks always enabled after driver probed. Note: 1. It is fine for ethtool, since the way of implementing ethtool_ops::begin in stmmac is only can be accessed when interface is enabled, so the clocks are ticked. 2. The MDIO bus has a different life cycle to the MAC, need ensure clocks are enabled when _mdio_read/write() need clocks, because these functions can be called while the interface it not opened. Reviewed-by: Andrew Lunn Signed-off-by: Joakim Zhang Signed-off-by: David S. Miller commit 936d3685e62436a378f02b8b74759b054d4aeca1 Author: Arnd Bergmann Date: Thu Feb 25 14:42:04 2021 +0100 rtc: tps65910: include linux/property.h The added device_property_present() call causes a build failure in some configurations because of the missing header: drivers/rtc/rtc-tps65910.c:422:7: error: implicit declaration of function 'device_property_present' [-Werror,-Wimplicit-function-declaration] Fixes: 454ba154a62c ("rtc: tps65910: Support wakeup-source property") Signed-off-by: Arnd Bergmann Reviewed-by: Dmitry Osipenko Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210225134215.2263694-1-arnd@kernel.org commit 49ab51b01ec6fd837ae3efe2e0cdb41fcf5cf048 Author: Paul E. McKenney Date: Thu Feb 11 15:40:05 2021 -0800 tools/memory-model: Add access-marking documentation This commit adapts the "Concurrency bugs should fear the big bad data-race detector (part 2)" LWN article (https://lwn.net/Articles/816854/) to kernel-documentation form. This allows more easily updating the material as needed. Suggested-by: Thomas Gleixner [ paulmck: Apply Marco Elver feedback. ] [ paulmck: Update per Akira Yokosawa feedback. ] Reviewed-by: Marco Elver Signed-off-by: Paul E. McKenney commit e02691b7ef51c5fac0eee5a6ebde45ce92958fae Author: Frederic Weisbecker Date: Tue Feb 23 01:10:02 2021 +0100 rcu/nocb: Move trace_rcu_nocb_wake() calls outside nocb_lock when possible Those tracing calls don't need to be under ->nocb_lock. This commit therefore moves them outside of that lock. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney commit 0efdf14a9f83618335a0849df3586808bff36cfb Author: Frederic Weisbecker Date: Tue Feb 23 01:10:01 2021 +0100 rcu/nocb: Remove stale comment above rcu_segcblist_offload() This commit removes a stale comment claiming that the cblist must be empty before changing the offloading state. This claim was correct back when the offloaded state was defined exclusively at boot. Reported-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney commit 76d00b494d7962e88d4bbd4135f34aba9019c67f Author: Frederic Weisbecker Date: Tue Feb 23 01:10:00 2021 +0100 rcu/nocb: Disable bypass when CPU isn't completely offloaded Currently, the bypass is flushed at the very last moment in the deoffloading procedure. However, this approach leads to a larger state space than would be preferred. This commit therefore disables the bypass at soon as the deoffloading procedure begins, then flushes it. This guarantees that the bypass remains empty and thus out of the way of the deoffloading procedure. Symmetrically, this commit waits to enable the bypass until the offloading procedure has completed. Reported-by: Paul E. McKenney Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit b2fcf2102049f6e56981e0ab3d9b633b8e2741da Author: Frederic Weisbecker Date: Tue Feb 23 01:09:59 2021 +0100 rcu/nocb: Fix missed nocb_timer requeue This sequence of events can lead to a failure to requeue a CPU's ->nocb_timer: 1. There are no callbacks queued for any CPU covered by CPU 0-2's ->nocb_gp_kthread. Note that ->nocb_gp_kthread is associated with CPU 0. 2. CPU 1 enqueues its first callback with interrupts disabled, and thus must defer awakening its ->nocb_gp_kthread. It therefore queues its rcu_data structure's ->nocb_timer. At this point, CPU 1's rdp->nocb_defer_wakeup is RCU_NOCB_WAKE. 3. CPU 2, which shares the same ->nocb_gp_kthread, also enqueues a callback, but with interrupts enabled, allowing it to directly awaken the ->nocb_gp_kthread. 4. The newly awakened ->nocb_gp_kthread associates both CPU 1's and CPU 2's callbacks with a future grace period and arranges for that grace period to be started. 5. This ->nocb_gp_kthread goes to sleep waiting for the end of this future grace period. 6. This grace period elapses before the CPU 1's timer fires. This is normally improbably given that the timer is set for only one jiffy, but timers can be delayed. Besides, it is possible that kernel was built with CONFIG_RCU_STRICT_GRACE_PERIOD=y. 7. The grace period ends, so rcu_gp_kthread awakens the ->nocb_gp_kthread, which in turn awakens both CPU 1's and CPU 2's ->nocb_cb_kthread. Then ->nocb_gb_kthread sleeps waiting for more newly queued callbacks. 8. CPU 1's ->nocb_cb_kthread invokes its callback, then sleeps waiting for more invocable callbacks. 9. Note that neither kthread updated any ->nocb_timer state, so CPU 1's ->nocb_defer_wakeup is still set to RCU_NOCB_WAKE. 10. CPU 1 enqueues its second callback, this time with interrupts enabled so it can wake directly ->nocb_gp_kthread. It does so with calling wake_nocb_gp() which also cancels the pending timer that got queued in step 2. But that doesn't reset CPU 1's ->nocb_defer_wakeup which is still set to RCU_NOCB_WAKE. So CPU 1's ->nocb_defer_wakeup and its ->nocb_timer are now desynchronized. 11. ->nocb_gp_kthread associates the callback queued in 10 with a new grace period, arranges for that grace period to start and sleeps waiting for it to complete. 12. The grace period ends, rcu_gp_kthread awakens ->nocb_gp_kthread, which in turn wakes up CPU 1's ->nocb_cb_kthread which then invokes the callback queued in 10. 13. CPU 1 enqueues its third callback, this time with interrupts disabled so it must queue a timer for a deferred wakeup. However the value of its ->nocb_defer_wakeup is RCU_NOCB_WAKE which incorrectly indicates that a timer is already queued. Instead, CPU 1's ->nocb_timer was cancelled in 10. CPU 1 therefore fails to queue the ->nocb_timer. 14. CPU 1 has its pending callback and it may go unnoticed until some other CPU ever wakes up ->nocb_gp_kthread or CPU 1 ever calls an explicit deferred wakeup, for example, during idle entry. This commit fixes this bug by resetting rdp->nocb_defer_wakeup everytime we delete the ->nocb_timer. It is quite possible that there is a similar scenario involving ->nocb_bypass_timer and ->nocb_defer_wakeup. However, despite some effort from several people, a failure scenario has not yet been located. However, that by no means guarantees that no such scenario exists. Finding a failure scenario is left as an exercise for the reader, and the "Fixes:" tag below relates to ->nocb_bypass_timer instead of ->nocb_timer. Fixes: d1b222c6be1f (rcu/nocb: Add bypass callback queueing) Cc: Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Boqun Feng Reviewed-by: Neeraj Upadhyay Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 9640dcab974fb7fba086d30fd9f0ec08b8876d12 Author: Jiapeng Chong Date: Wed Feb 24 16:30:29 2021 +0800 rcu: Make nocb_nobypass_lim_per_jiffy static RCU triggerse the following sparse warning: kernel/rcu/tree_plugin.h:1497:5: warning: symbol 'nocb_nobypass_lim_per_jiffy' was not declared. Should it be static? This commit therefore makes this variable static. Reported-by: Abaci Robot Reported-by: Frederic Weisbecker Signed-off-by: Jiapeng Chong Signed-off-by: Paul E. McKenney commit 565cfb9e64dac1aadf7e2130fcda19a1c018df66 Author: Sangmoon Kim Date: Tue Mar 2 20:55:15 2021 +0900 rcu/tree: Add a trace event for RCU CPU stall warnings This commit adds a trace event which allows tracing the beginnings of RCU CPU stall warnings on systems where sysctl_panic_on_rcu_stall is disabled. The first parameter is the name of RCU flavor like other trace events. The second parameter indicates whether this is a stall of an expedited grace period, a self-detected stall of a normal grace period, or a stall of a normal grace period detected by some CPU other than the one that is stalled. RCU CPU stall warnings are often caused by external-to-RCU issues, for example, in interrupt handling or task scheduling. Therefore, this event uses TRACE_EVENT, not TRACE_EVENT_RCU, to avoid requiring those interested in tracing RCU CPU stalls to rebuild their kernels with CONFIG_RCU_TRACE=y. Reviewed-by: Uladzislau Rezki (Sony) Reviewed-by: Neeraj Upadhyay Signed-off-by: Sangmoon Kim Signed-off-by: Paul E. McKenney commit 7e937220afa3eada0d4611b31e4e3c60770e39b4 Author: Paul E. McKenney Date: Fri Feb 26 11:25:29 2021 -0800 rcu: Add explicit barrier() to __rcu_read_unlock() Because preemptible RCU's __rcu_read_unlock() is an external function, the rough equivalent of an implicit barrier() is inserted by the compiler. Except that there is a direct call to __rcu_read_unlock() in that same file, and compilers are getting to the point where they might choose to inline the fastpath of the __rcu_read_unlock() function. This commit therefore adds an explicit barrier() to the very beginning of __rcu_read_unlock(). Signed-off-by: Paul E. McKenney commit e589c7c72315f7e52ebb5cffc19615dc18d0cc50 Author: Paul E. McKenney Date: Tue Feb 23 10:07:09 2021 -0800 docs: Correctly spell Stephen Hemminger's name This commit replaces "Steve" with the his real name, which is "Stephen". Reported-by: Stephen Hemminger Signed-off-by: Paul E. McKenney commit 1c0c4bc1ceb580851b2d76fdef9712b3bdae134b Author: Paul E. McKenney Date: Fri Feb 12 16:20:40 2021 -0800 softirq: Don't try waking ksoftirqd before it has been spawned If there is heavy softirq activity, the softirq system will attempt to awaken ksoftirqd and will stop the traditional back-of-interrupt softirq processing. This is all well and good, but only if the ksoftirqd kthreads already exist, which is not the case during early boot, in which case the system hangs. One reproducer is as follows: tools/testing/selftests/rcutorture/bin/kvm.sh --allcpus --duration 2 --configs "TREE03" --kconfig "CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y CONFIG_NO_HZ_IDLE=y CONFIG_HZ_PERIODIC=n" --bootargs "threadirqs=1" --trust-make This commit therefore adds a couple of existence checks for ksoftirqd and forces back-of-interrupt softirq processing when ksoftirqd does not yet exist. With this change, the above test passes. Reported-by: Sebastian Andrzej Siewior Reported-by: Uladzislau Rezki Cc: Peter Zijlstra Cc: Thomas Gleixner [ paulmck: Remove unneeded check per Sebastian Siewior feedback. ] Reviewed-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 2e1614f7d61e407f1a8e7935a2903a6fa3cb0b11 Author: Luiz Augusto von Dentz Date: Mon Mar 15 14:39:29 2021 -0700 Bluetooth: SMP: Convert BT_ERR/BT_DBG to bt_dev_err/bt_dev_dbg This converts instances of BT_ERR and BT_DBG to bt_dev_err and bt_dev_dbg which can be enabled at runtime when BT_FEATURE_DEBUG is enabled. Note: Not all instances could be converted as some are exercised by selftest. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit a8f2a68e42d19e6fc1e0eb6eaef548ef07b19d75 Author: Gao Xiang Date: Wed Mar 10 03:15:50 2021 +0800 Documentation: sysrq: update description about sysrq crash After commit 8341f2f222d7 ("sysrq: Use panic() to force a crash"), a crash was not generated by dereferencing a NULL pointer anymore. Let's update documentation as well to make it less misleading. Signed-off-by: Gao Xiang Cc: Matthias Kaehlcke Cc: Greg Kroah-Hartman Cc: Jonathan Corbet Cc: Zefan Li Link: https://lore.kernel.org/r/20210309191550.3955601-1-hsiangkao@redhat.com Signed-off-by: Jonathan Corbet commit 7cf3b1dd6aa603fd80969e9e7160becf1455a0eb Author: Luiz Augusto von Dentz Date: Mon Mar 15 13:04:37 2021 -0700 Bluetooth: L2CAP: Fix not checking for maximum number of DCID When receiving L2CAP_CREDIT_BASED_CONNECTION_REQ the remote may request more channels than allowed by the spec (10 octecs = 5 CIDs) so this checks if the number of channels is bigger than the maximum allowed and respond with an error. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit c06632a4ec3a7b823f0e9c04cd4836135bba44bf Author: Sonny Sasaka Date: Mon Mar 15 10:30:59 2021 -0700 Bluetooth: Cancel le_scan_restart work when stopping discovery Not cancelling it has caused a bug where passive background scanning is disabled out of the blue, preventing BLE keyboards/mice to reconnect. Here is how it happens: After hci_req_stop_discovery, there is still le_scan_restart_work scheduled. Invocation of le_scan_restart_work causes a harmful le_scan_disable_work to be scheduled. This le_scan_disable_work will eventually disable passive scanning when the timer fires. Sample btmon trace: < HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 Type: Passive (0x00) Interval: 367.500 msec (0x024c) Window: 37.500 msec (0x003c) Own address type: Public (0x00) Filter policy: Accept all advertisement (0x00) > HCI Event: Command Complete (0x0e) plen 4 LE Set Scan Parameters (0x08|0x000b) ncmd 1 Status: Success (0x00) < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 Scanning: Enabled (0x01) Filter duplicates: Disabled (0x00) > HCI Event: Command Complete (0x0e) plen 4 LE Set Scan Enable (0x08|0x000c) ncmd 2 Status: Success (0x00) ... < HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 Scanning: Disabled (0x00) Filter duplicates: Disabled (0x00) > HCI Event: Command Complete (0x0e) plen 4 LE Set Scan Enable (0x08|0x000c) ncmd 2 Status: Success (0x00) // Background scanning is not working here onwards. Reviewed-by: Abhishek Pandit-Subedi Signed-off-by: Sonny Sasaka Signed-off-by: Marcel Holtmann commit 91de5ac99a6e53ade273722b3335bba1c262899d Merge: 29c35da103471 7310fe538ea5c Author: David S. Miller Date: Mon Mar 15 12:53:12 2021 -0700 Merge branch 'net-pcs-stmmac=add-C37-AN-SGMII-support' Ong Boon Leong says: ==================== net: pcs, stmmac: add C37 AN SGMII support This patch series adds MAC-side SGMII support to stmmac driver and it is changed as follow:- 1/6: Refactor the current C73 implementation in pcs-xpcs to prepare for adding C37 AN later. 2/6: Add MAC-side SGMII C37 AN support to pcs-xpcs 3,4/6: make phylink_parse_mode() to work for non-DT platform so that we can use stmmac platform_data to set it. 5/6: Make stmmac_open() to only skip PHY init if C73 is used, otherwise C37 AN will need phydev to be connected to phylink. 6/6: Finally, add pcs-xpcs SGMII interface support to Intel mGbE controller. The patch series have been tested on EHL CRB PCH TSN (eth2) controller that has Marvell 88E1512 PHY attached over SGMII interface and the iterative tests of speed change (AN) + ping test have been successful. [63446.009295] intel-eth-pci 0000:00:1e.4 eth2: Link is Down [63449.986365] intel-eth-pci 0000:00:1e.4 eth2: Link is Up - 1Gbps/Full - flow control off [63449.987625] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready [63451.248064] intel-eth-pci 0000:00:1e.4 eth2: Link is Down [63454.082366] intel-eth-pci 0000:00:1e.4 eth2: Link is Up - 100Mbps/Full - flow control off [63454.083650] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready [63456.465179] intel-eth-pci 0000:00:1e.4 eth2: Link is Down [63459.202367] intel-eth-pci 0000:00:1e.4 eth2: Link is Up - 10Mbps/Full - flow control off [63459.203639] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready [63460.882832] intel-eth-pci 0000:00:1e.4 eth2: Link is Down [63464.322366] intel-eth-pci 0000:00:1e.4 eth2: Link is Up - 1Gbps/Full - flow control off ==================== Signed-off-by: David S. Miller commit 7310fe538ea5c966a773cbc39272ef145f8d05ae Author: Ong Boon Leong Date: Mon Mar 15 13:27:11 2021 +0800 stmmac: intel: add pcs-xpcs for Intel mGbE controller Intel mGbE controller such as those in EHL & TGL uses pcs-xpcs driver for SGMII interface. To ensure mdio bus scanning does not assign phy_device to MDIO-addressable entities like intel serdes and pcs-xpcs, we set up to phy_mask to skip them. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit c62808e8105f6a0872ac716c0030e97af81e4cf0 Author: Ong Boon Leong Date: Mon Mar 15 13:27:10 2021 +0800 net: stmmac: ensure phydev is attached to phylink for C37 AN As the support for MAC-side SGMII C37 AN is added to pcs-xpcs, phydev should be attached to phylink during driver's open(). So, we change the condition to "Not C73 AN" instead. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit e5e5b771f684c22b25c67df85d2deb43901f7b95 Author: Ong Boon Leong Date: Mon Mar 15 13:27:09 2021 +0800 net: stmmac: make in-band AN mode parsing is supported for non-DT Not all platform uses DT, so phylink_parse_mode() will skip in-band setup of pl->supported and pl->link_config.advertising entirely. So, we add the setting of ovr_an_inband flag to make it works for non-DT platform. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit ab39385021d1e0b4cd6cc521dc35c2fe659bbddf Author: Ong Boon Leong Date: Mon Mar 15 13:27:08 2021 +0800 net: phylink: make phylink_parse_mode() support non-DT platform Certain platform does not support DT, so we make phylink_parse_mode() to allow non-DT platform to use it to setup in-band AN advertising. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit b97b5331b8ab7f60fb880e0c31c9b09b73d2fa4e Author: Ong Boon Leong Date: Mon Mar 15 13:27:07 2021 +0800 net: pcs: add C37 SGMII AN support for intel mGbE controller XPCS IP supports C37 SGMII AN process and it is used in intel multi-GbE controller as MAC-side SGMII. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 07a4bc51fc732b3618fd46dc51609948933064a4 Author: Ong Boon Leong Date: Mon Mar 15 13:27:06 2021 +0800 net: pcs: rearrange C73 functions to prepare for C37 support later The current implementation for XPCS is validated for C73, so we rename them to have _c73 suffix and introduce a set of functions to use an_mode flag to switch between C73 and C37 AN later. Signed-off-by: Ong Boon Leong Signed-off-by: David S. Miller commit 29c35da103471d7fc39839192bead60fbf3ba1f9 Author: Bhaskar Chowdhury Date: Mon Mar 15 07:23:22 2021 +0530 net: ethernet: neterion: Fix a typo in the file s2io.c s/structue/structure/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 6f05a1224174a67a71a196e9e776b1ce72aa4a3d Author: Bhaskar Chowdhury Date: Mon Mar 15 07:18:47 2021 +0530 net: ethernet: intel: igb: Typo fix in the file igb_main.c s/structue/structure/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit a7dde236b3173c54195900dd46ffc5730de1a216 Author: Bhaskar Chowdhury Date: Mon Mar 15 03:52:21 2021 +0530 ethernet: amazon: ena: A typo fix in the file ena_com.h Mundane typo fix. Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Acked-by: Shay Agroskin Signed-off-by: David S. Miller commit 9cb24ea051857f2a7ab85c42842c5baa40497e53 Author: Alexey Dobriyan Date: Sun Mar 14 18:24:02 2021 +0300 atm: delete include/linux/atm_suni.h This file has been effectively empty since 2.3.99-pre3 ! Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller commit acdff0df54264d187b648b80bc18265f0698f1ad Author: Jianlin Lv Date: Sun Mar 14 22:56:29 2021 +0800 bonding: Added -ENODEV interpret for slaves option When the incorrect interface name is stored in the slaves/active_slave option of the bonding sysfs, the kernel does not record the log that interface does not exist. This patch adds a log for -ENODEV error, which will facilitate users to figure out such issue. Signed-off-by: Jianlin Lv Signed-off-by: David S. Miller commit 3eca1cfbc1e854aafd1672d408c4b8fc602a20e3 Author: Jonathan Neuschäfer Date: Fri Mar 12 16:28:03 2021 +0100 docs: Group arch-specific documentation under "CPU Architectures" To declutter the top-level table of contents (the side bar), this patch reduces the architecture-specfic documentation to one top-level item, "CPU Architectures". Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20210312152804.2110703-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 8f64860f8b567cc4f8ac854a65cbf6337404c520 Author: Lorenzo Bianconi Date: Sun Mar 14 15:49:19 2021 +0100 net: export dev_set_threaded symbol For wireless devices (e.g. mt76 driver) multiple net_devices belongs to the same wireless phy and the napi object is registered in a dummy netdevice related to the wireless phy. Export dev_set_threaded in order to be reused in device drivers enabling threaded NAPI. Signed-off-by: Lorenzo Bianconi Signed-off-by: David S. Miller commit 0860b72d535f869e26252df66d4f634e1655f84a Author: Jiele zhao Date: Mon Mar 8 02:03:58 2021 +0000 security/loadpin: Update the changing interface in the source code. Loadpin cmdline interface "enabled" has been renamed to "enforce" for a long time, but the User Description Document was not updated. (Meaning unchanged) And kernel_read_file* were moved from linux/fs.h to its own linux/kernel_read_file.h include file. So update that change here. Signed-off-by: Jiele zhao Link: https://lore.kernel.org/r/20210308020358.102836-1-unclexiaole@gmail.com Signed-off-by: Jonathan Corbet commit db7284a6ccc4a6d7714645141f7dcee0fcb4e57d Author: Kurt Kanzenbach Date: Sun Mar 14 13:52:08 2021 +0100 net: dsa: hellcreek: Offload bridge port flags The switch implements unicast and multicast filtering per port. Add support for it. By default filtering is disabled. Signed-off-by: Kurt Kanzenbach Signed-off-by: David S. Miller commit e3c2b1edd5904e326295937aaa34d891f15b7c5e Author: Geert Uytterhoeven Date: Tue Mar 9 14:06:50 2021 +0100 docs: dt: submitting-patches: Fix grammar in subsystem section Reword the subsystem bindings section to make sense, from a grammatical point of view. Signed-off-by: Geert Uytterhoeven Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210309130650.2318419-1-geert+renesas@glider.be Signed-off-by: Jonathan Corbet commit 6bfef171d0d74cb050112e0e49feb20bfddf7f42 Author: Barry Song Date: Tue Feb 23 13:32:30 2021 +1300 Documentation/features: mark BATCHED_UNMAP_TLB_FLUSH doesn't apply to ARM64 BATCHED_UNMAP_TLB_FLUSH is used on x86 to do batched tlb shootdown by sending one IPI to TLB flush all entries after unmapping pages rather than sending an IPI to flush each individual entry. On arm64, tlb shootdown is done by hardware. Flush instructions are innershareable. The local flushes are limited to the boot (1 per CPU) and when a task is getting a new ASID. So marking this feature as "TODO" is not proper. ".." isn't good as well. So this patch adds a "N/A" for this kind of features which are not needed on some architectures. Signed-off-by: Barry Song Acked-by: Will Deacon Cc: Mel Gorman Cc: Andy Lutomirski Cc: Catalin Marinas Cc: Will Deacon Link: https://lore.kernel.org/r/20210223003230.11976-1-song.bao.hua@hisilicon.com Signed-off-by: Jonathan Corbet commit d0c4c07e7b38113796aeb7ec57c9f0bb4c3503b0 Author: Jonathan Corbet Date: Mon Mar 15 13:10:53 2021 -0600 docs/zh_cn: Fix a couple of reference warnings Just put in the relevant file names and let automarkup handle the rest. Fixes: 550c8399d017 ("docs/zh_CN: Add zh_CN/admin-guide/README.rst") Reported-by: Stephen Rothwell Signed-off-by: Jonathan Corbet commit bb52073645a618ab4d93c8d932fb8faf114c55bc Author: Magnus Karlsson Date: Wed Dec 2 16:07:24 2020 +0100 ice: optimize for XDP_REDIRECT in xsk path Optimize ice_run_xdp_zc() for the XDP program verdict being XDP_REDIRECT in the xsk zero-copy path. This path is only used when having AF_XDP zero-copy on and in that case most packets will be directed to user space. This provides a little over 100k extra packets in throughput on my server when running l2fwd in xdpsock. Signed-off-by: Magnus Karlsson Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen commit 7d52fe2eaddfa3d7255d43c3e89ebf2748b7ea7a Author: Magnus Karlsson Date: Wed Dec 2 16:07:23 2020 +0100 ixgbe: optimize for XDP_REDIRECT in xsk path Optimize ixgbe_run_xdp_zc() for the XDP program verdict being XDP_REDIRECT in the xsk zero-copy path. This path is only used when having AF_XDP zero-copy on and in that case most packets will be directed to user space. This provides a little under 100k extra packets in throughput on my server when running l2fwd in xdpsock. Signed-off-by: Magnus Karlsson Tested-by: Vishakha Jambekar Signed-off-by: Tony Nguyen commit 346497c78d15cdd5bdc3b642a895009359e5457f Author: Magnus Karlsson Date: Wed Dec 2 16:07:22 2020 +0100 i40e: optimize for XDP_REDIRECT in xsk path Optimize i40e_run_xdp_zc() for the XDP program verdict being XDP_REDIRECT in the xsk zero-copy path. This path is only used when having AF_XDP zero-copy on and in that case most packets will be directed to user space. This provides a little over 100k extra packets in throughput on my server when running l2fwd in xdpsock. Signed-off-by: Magnus Karlsson Tested-by: George Kuruvinakunnel Signed-off-by: Tony Nguyen commit fdebeae0d75d03dc54eb68cb09bd6604a590b502 Author: Bhaskar Chowdhury Date: Sat Mar 13 11:40:29 2021 +0530 docs: admin-guide: cgroup-v1: Fix typos in the file memory.rst s/overcommited/overcommitted/ s/Overcommiting/Overcommitting/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210313061029.28024-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 98c5ec77c7c5e19e2112825525db5cede8d3f939 Author: Yury Norov Date: Thu Feb 25 05:56:59 2021 -0800 ARM64: enable GENERIC_FIND_FIRST_BIT ARM64 doesn't implement find_first_{zero}_bit in arch code and doesn't enable it in a config. It leads to using find_next_bit() which is less efficient: 0000000000000000 : 0: aa0003e4 mov x4, x0 4: aa0103e0 mov x0, x1 8: b4000181 cbz x1, 38 c: f9400083 ldr x3, [x4] 10: d2800802 mov x2, #0x40 // #64 14: 91002084 add x4, x4, #0x8 18: b40000c3 cbz x3, 30 1c: 14000008 b 3c 20: f8408483 ldr x3, [x4], #8 24: 91010045 add x5, x2, #0x40 28: b50000c3 cbnz x3, 40 2c: aa0503e2 mov x2, x5 30: eb02001f cmp x0, x2 34: 54ffff68 b.hi 20 // b.pmore 38: d65f03c0 ret 3c: d2800002 mov x2, #0x0 // #0 40: dac00063 rbit x3, x3 44: dac01063 clz x3, x3 48: 8b020062 add x2, x3, x2 4c: eb02001f cmp x0, x2 50: 9a829000 csel x0, x0, x2, ls // ls = plast 54: d65f03c0 ret ... 0000000000000118 <_find_next_bit.constprop.1>: 118: eb02007f cmp x3, x2 11c: 540002e2 b.cs 178 <_find_next_bit.constprop.1+0x60> // b.hs, b.nlast 120: d346fc66 lsr x6, x3, #6 124: f8667805 ldr x5, [x0, x6, lsl #3] 128: b4000061 cbz x1, 134 <_find_next_bit.constprop.1+0x1c> 12c: f8667826 ldr x6, [x1, x6, lsl #3] 130: 8a0600a5 and x5, x5, x6 134: ca0400a6 eor x6, x5, x4 138: 92800005 mov x5, #0xffffffffffffffff // #-1 13c: 9ac320a5 lsl x5, x5, x3 140: 927ae463 and x3, x3, #0xffffffffffffffc0 144: ea0600a5 ands x5, x5, x6 148: 54000120 b.eq 16c <_find_next_bit.constprop.1+0x54> // b.none 14c: 1400000e b 184 <_find_next_bit.constprop.1+0x6c> 150: d346fc66 lsr x6, x3, #6 154: f8667805 ldr x5, [x0, x6, lsl #3] 158: b4000061 cbz x1, 164 <_find_next_bit.constprop.1+0x4c> 15c: f8667826 ldr x6, [x1, x6, lsl #3] 160: 8a0600a5 and x5, x5, x6 164: eb05009f cmp x4, x5 168: 540000c1 b.ne 180 <_find_next_bit.constprop.1+0x68> // b.any 16c: 91010063 add x3, x3, #0x40 170: eb03005f cmp x2, x3 174: 54fffee8 b.hi 150 <_find_next_bit.constprop.1+0x38> // b.pmore 178: aa0203e0 mov x0, x2 17c: d65f03c0 ret 180: ca050085 eor x5, x4, x5 184: dac000a5 rbit x5, x5 188: dac010a5 clz x5, x5 18c: 8b0300a3 add x3, x5, x3 190: eb03005f cmp x2, x3 194: 9a839042 csel x2, x2, x3, ls // ls = plast 198: aa0203e0 mov x0, x2 19c: d65f03c0 ret ... 0000000000000238 : 238: a9bf7bfd stp x29, x30, [sp, #-16]! 23c: aa0203e3 mov x3, x2 240: d2800004 mov x4, #0x0 // #0 244: aa0103e2 mov x2, x1 248: 910003fd mov x29, sp 24c: d2800001 mov x1, #0x0 // #0 250: 97ffffb2 bl 118 <_find_next_bit.constprop.1> 254: a8c17bfd ldp x29, x30, [sp], #16 258: d65f03c0 ret Enabling find_{first,next}_bit() would also benefit for_each_{set,clear}_bit(). On A-53 find_first_bit() is almost twice faster than find_next_bit(), according to lib/find_bit_benchmark (thanks to Alexey for testing): GENERIC_FIND_FIRST_BIT=n: [7126084.948181] find_first_bit: 47389224 ns, 16357 iterations [7126085.032315] find_first_bit: 19048193 ns, 655 iterations GENERIC_FIND_FIRST_BIT=y: [ 84.158068] find_first_bit: 27193319 ns, 16406 iterations [ 84.233005] find_first_bit: 11082437 ns, 656 iterations GENERIC_FIND_FIRST_BIT=n bloats the kernel despite that it disables generation of find_{first,next}_bit(): yury:linux$ scripts/bloat-o-meter vmlinux vmlinux.ffb add/remove: 4/1 grow/shrink: 19/251 up/down: 564/-1692 (-1128) ... Overall, GENERIC_FIND_FIRST_BIT=n is harmful both in terms of performance and code size, and it's better to have GENERIC_FIND_FIRST_BIT enabled. Tested-by: Alexey Klimov Signed-off-by: Yury Norov Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210225135700.1381396-2-yury.norov@gmail.com Signed-off-by: Catalin Marinas commit ed938a4bfc58cd86eddcb4b1c9d582a435ffcf7b Author: Mark Brown Date: Thu Mar 4 17:44:07 2021 +0000 arm64: defconfig: Use DEBUG_INFO_REDUCED We've had DEBUG_INFO enabled for arm64 defconfigs since the initial commit. This is probably not that frequently used but substantially inflates the size of the build tree and amount of I/O needed during the build. This was causing issues with storage usage in some automated CI environments which don't expect defconfigs to be quite this big, and generally increases the resource consumption for both them and people doing local builds. The main use case for the debug info is decoding things with scripts/faddr2line but that doesn't need the full DEBUG_INFO, DEBUG_INFO_REDUCED is enough for it, so enable that by default. Without this patch my build tree is 6.8G, with it the size drops to 2G (smaller than the 6.4G for allmodconfig!). Suggested-by: Catalin Marinas Reported-by: Guillaume Tucker Signed-off-by: Mark Brown Acked-by: Kevin Hilman Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210304174407.17537-1-broonie@kernel.org Signed-off-by: Catalin Marinas commit e2b0d9987920f3dc727e08a1bf42296be9b5d6da Author: Rob Herring Date: Thu Mar 11 16:36:39 2021 -0700 dt-bindings: Bump dtschema version required to v2021.2.1 There's several dependencies in dtschema since v2020.8.1 we need, so let's bump the version required to v2021.2.1. Specifically, the graph.yaml schema and improved undocumented compatible check are needed. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210311233640.1581526-1-robh@kernel.org commit 6d8d67988b1a2db04d9d6083a729e8abfeb725d7 Author: Shawn Guo Date: Thu Mar 11 10:41:02 2021 +0800 pinctrl: qcom: sc8180x: add ACPI probe support It adds ACPI probe support for pinctrl-sc8180x driver. We have one problem with ACPI table, i.e. GIO0 (TLMM) block has one single memory resource to cover 3 tiles defined by SC8180X. To follow the hardware layout of 3 tiles which is already supported DT probe, it adds one function to replace the original single memory resource with 3 named ones for tiles. With that, We can map memory for ACPI in the same way as DT. Signed-off-by: Shawn Guo Reviewed-by: Bjorn Andersson Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210311024102.15450-1-shawn.guo@linaro.org Signed-off-by: Linus Walleij commit 6503b9f29a47cdb4ebd6c36d8bbb018418415c2a Author: Manu Bretelle Date: Wed Mar 10 10:23:05 2021 -0800 bpf: Add getter and setter for SO_REUSEPORT through bpf_{g,s}etsockopt Augment the current set of options that are accessible via bpf_{g,s}etsockopt to also support SO_REUSEPORT. Signed-off-by: Manu Bretelle Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210310182305.1910312-1-chantra@fb.com commit 552bad043709af377aa963a5db0b2bac0b0b2fab Author: Lina Iyer Date: Thu Mar 11 19:42:17 2021 -0800 pinctrl: qcom: sm8350: add GPIO wakeup interrupt map GPIOs that can be configured as wakeup sources, have their interrupt lines routed to PDC interrupt controller. Provide the interrupt map of the GPIO to its wakeup capable interrupt parent. Signed-off-by: Lina Iyer Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Link: https://lore.kernel.org/r/20210312034218.3324410-1-bjorn.andersson@linaro.org Signed-off-by: Linus Walleij commit 79321e752aff36569fb2b5b121f6e1dca9fc5f74 Author: Tudor Ambarus Date: Mon Mar 15 07:56:34 2021 +0200 mtd: spi-nor: core: Update comment about the default flash parameters s/legacy/default. spi_nor_info_init_params initializes some default flash parameters and settings that can be overwritten when parsing SFDP, or by fixup hooks. There's nothing legacy about them, they are just some default settings, if not otherwise discovered or specified. Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20210315055634.17332-1-tudor.ambarus@microchip.com commit a580293a19fc49b2745019075f9fa8561a6a0b32 Author: Tudor Ambarus Date: Sat Mar 6 11:50:00 2021 +0200 mtd: spi-nor: Get rid of duplicated argument in spi_nor_parse_sfdp() spi_nor_parse_sfdp(nor, nor->params); passes for the second argument a member within the first argument. Drop the second argument and obtain it directly from the first, and do it across all the children functions. This is a follow up for 'commit 69a8eed58cc0 ("mtd: spi-nor: Don't copy self-pointing struct around")' Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20210306095002.22983-4-tudor.ambarus@microchip.com commit 8758888c3d7873004b4ebf516430cba70bbcf39a Author: Tudor Ambarus Date: Sat Mar 6 11:49:59 2021 +0200 mtd: spi-nor: core: Add vdbg msg for spi_nor_erase_multi_sectors() Useful when debugging non-uniform erase. Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20210306095002.22983-3-tudor.ambarus@microchip.com commit 786a0a75d0f34a8fd6863a5c7d47ed0d2c3169fa Author: Tudor Ambarus Date: Sat Mar 6 11:49:58 2021 +0200 mtd: spi-nor: core: Advance erase after the erase cmd has been completed addr and len were gratuitously updated even when spi_nor_wait_till_ready() failed. Wait for the erase cmd to complete and then advance the erase. Signed-off-by: Tudor Ambarus Reviewed-by: Pratyush Yadav Link: https://lore.kernel.org/r/20210306095002.22983-2-tudor.ambarus@microchip.com commit 320fcd6bbd2b500923db518902c2c640242d2b50 Author: Dan Carpenter Date: Fri Mar 12 10:42:52 2021 +0300 regulator: bd9576: Fix return from bd957x_probe() The probe() function returns an uninitialized variable in the success path. There is no need for the "err" variable at all, just delete it. Fixes: b014e9fae7e7 ("regulator: Support ROHM BD9576MUF and BD9573MUF") Signed-off-by: Dan Carpenter Reviewed-by: Matti Vaittinen Link: https://lore.kernel.org/r/YEsbfLJfEWtnRpoU@mwanda Signed-off-by: Mark Brown commit 6a37d750037827d385672acdebf5788fc2ffa633 Author: Michal Simek Date: Fri Mar 12 08:31:34 2021 +0100 pinctrl: core: Set ret to 0 when group is skipped Static analyzer tool found that the ret variable is not initialized but code expects ret value >=0 when pinconf is skipped in the first pinmux loop. The same expectation is for pinmux in a pinconf loop. That's why initialize ret to 0 to avoid uninitialized ret value in first loop or reusing ret value from first loop in second. Addresses-Coverity: ("Uninitialized variables") Signed-off-by: Michal Simek Cc: Dan Carpenter Reviewed-by: Colin Ian King Link: https://lore.kernel.org/r/e5203bae68eb94b4b8b4e67e5e7b4d86bb989724.1615534291.git.michal.simek@xilinx.com Signed-off-by: Linus Walleij commit 301cddc21a157a3072d789a3097857202e550a24 Author: Peter Zijlstra Date: Fri Mar 12 12:32:55 2021 +0100 objtool/x86: Use asm/nops.h Since the kernel will rely on a single canonical set of NOPs, make sure objtool uses the exact same ones. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210312115749.136357911@infradead.org commit 47386ce36f904583d45c82087d992a50ad612c8b Author: Jia-Ju Bai Date: Sat Mar 6 04:51:22 2021 -0800 pinctrl: ti: fix error return code of ti_iodelay_probe() When ti_iodelay_pinconf_init_dev() fails, no error return code of ti_iodelay_probe() is assigned. To fix this bug, ret is assigned with the return value of ti_iodelay_pinconf_init_dev(), and then ret is checked. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210306125122.15043-1-baijiaju1990@gmail.com Signed-off-by: Linus Walleij commit be786ac5a6c4bf4ef3e4c569a045d302c1e60fe6 Author: Jianqun Xu Date: Fri Mar 5 08:39:07 2021 +0800 pinctrl: rockchip: make driver be tristate module Make pinctrl-rockchip driver to be tristate module, support to build as a module, this is useful for GKI. Reviewed-by: Heiko Stuebner Signed-off-by: Jianqun Xu Link: https://lore.kernel.org/r/20210305003907.1692515-3-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit 25fda51ca33b3d7977c351ab9420b32df3289b5f Author: Jianqun Xu Date: Fri Mar 5 08:39:06 2021 +0800 arm64: remove select PINCTRL_ROCKCHIP from ARCH_ROCKCHIP Prepare to make pinctrl driver of rockchip to be module able, this patch remove the select of PINCTRL_ROCKCHIP from ARCH_ROCKCHIP. Signed-off-by: Jianqun Xu Link: https://lore.kernel.org/r/20210305003907.1692515-2-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit 024c79520ff5f8cfb9666cdb877af30c554c540f Author: Jianqun Xu Date: Fri Mar 5 16:06:58 2021 +0800 kernel/irq: export irq_gc_set_wake Module driver may use irq_gc_set_wake. Signed-off-by: Jianqun Xu Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20210305080658.2422114-1-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit b991f8c3622c8c9d01a1ada382682a731932e651 Author: Michal Simek Date: Wed Mar 10 09:16:54 2021 +0100 pinctrl: core: Handling pinmux and pinconf separately Right now the handling order depends on how entries are coming which is corresponding with order in DT. We have reached the case with DT overlays where conf and mux descriptions are exchanged which ends up in sequence that firmware has been asked to perform configuration before requesting the pin. The patch is enforcing the order that pin is requested all the time first followed by pin configuration. This change will ensure that firmware gets requests in the right order. Signed-off-by: Michal Simek Link: https://lore.kernel.org/r/cfbe01f791c2dd42a596cbda57e15599969b57aa.1615364211.git.michal.simek@xilinx.com Signed-off-by: Linus Walleij commit 57c0a4f0a071be916e534d6f6e52dcf0cd8df8ba Author: Vinod Koul Date: Mon Mar 8 22:18:45 2021 +0530 pinctrl: qcom: spmi-gpio: Add support for PM8350 and friends Add support for the PM8350, PM8350B, PM8350C, PMK8350, PMR735A and PMR735B GPIO support to the Qualcomm PMIC GPIO driver. Signed-off-by: Vinod Koul Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210308164845.3210393-2-vkoul@kernel.org Signed-off-by: Linus Walleij commit 975bad7cbd34352f164dccc98f8292f4efb3a374 Author: Vinod Koul Date: Mon Mar 8 22:18:44 2021 +0530 dt-bindings: pinctrl: qcom-pmic-gpio: Add pm8350 and friends Add support for the PM8350, PM8350B, PM8350C, PMK8350, PMR735A and PMR735B GPIO support to the Qualcomm PMIC GPIO binding. Signed-off-by: Vinod Koul Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210308164845.3210393-1-vkoul@kernel.org Signed-off-by: Linus Walleij commit a89dfde3dc3c2dbf56910af75e2d8b11ec5308f6 Author: Peter Zijlstra Date: Fri Mar 12 12:32:54 2021 +0100 x86: Remove dynamic NOP selection This ensures that a NOP is a NOP and not a random other instruction that is also a NOP. It allows simplification of dynamic code patching that wants to verify existing code before writing new instructions (ftrace, jump_label, static_call, etc..). Differentiating on NOPs is not a feature. This pessimises 32bit (DONTCARE) and 32bit on 64bit CPUs (CARELESS). 32bit is not a performance target. Everything x86_64 since AMD K10 (2007) and Intel IvyBridge (2012) is fine with using NOPL (as opposed to prefix NOP). And per FEATURE_NOPL being required for x86_64, all x86_64 CPUs can use NOPL. So stop caring about NOPs, simplify things and get on with life. [ The problem seems to be that some uarchs can only decode NOPL on a single front-end port while others have severe decode penalties for excessive prefixes. All modern uarchs can handle both, except Atom, which has prefix penalties. ] [ Also, much doubt you can actually measure any of this on normal workloads. ] After this, FEATURE_NOPL is unused except for required-features for x86_64. FEATURE_K8 is only used for PTI. [ bp: Kernel build measurements showed ~0.3s slowdown on Sandybridge which is hardly a slowdown. Get rid of X86_FEATURE_K7, while at it. ] Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Borislav Petkov Acked-by: Alexei Starovoitov # bpf Acked-by: Linus Torvalds Link: https://lkml.kernel.org/r/20210312115749.065275711@infradead.org commit 6859bc0e78c6a699599cbb21404fdb6c8125da74 Author: Changbin Du Date: Mon Mar 15 22:30:47 2021 +0800 perf stat: Improve readability of shadow stats This adds function convert_unit_double() and selects appropriate unit for shadow stats between K/M/G. $ sudo perf stat -a -- sleep 1 Before: Unit 'M' is selected even the number is very small. Performance counter stats for 'system wide': 4,003.06 msec cpu-clock # 3.998 CPUs utilized 16,179 context-switches # 0.004 M/sec 161 cpu-migrations # 0.040 K/sec 4,699 page-faults # 0.001 M/sec 6,135,801,925 cycles # 1.533 GHz (83.21%) 5,783,308,491 stalled-cycles-frontend # 94.26% frontend cycles idle (83.21%) 4,543,694,050 stalled-cycles-backend # 74.05% backend cycles idle (66.49%) 4,720,130,587 instructions # 0.77 insn per cycle # 1.23 stalled cycles per insn (83.28%) 753,848,078 branches # 188.318 M/sec (83.61%) 37,457,747 branch-misses # 4.97% of all branches (83.48%) 1.001283725 seconds time elapsed After: $ sudo perf stat -a -- sleep 2 Performance counter stats for 'system wide': 8,005.52 msec cpu-clock # 3.999 CPUs utilized 10,715 context-switches # 1.338 K/sec 785 cpu-migrations # 98.057 /sec 102 page-faults # 12.741 /sec 1,948,202,279 cycles # 0.243 GHz 2,816,470,932 stalled-cycles-frontend # 144.57% frontend cycles idle 2,661,172,207 stalled-cycles-backend # 136.60% backend cycles idle 464,172,105 instructions # 0.24 insn per cycle # 6.07 stalled cycles per insn 91,567,662 branches # 11.438 M/sec 7,756,054 branch-misses # 8.47% of all branches 2.002040043 seconds time elapsed v2: o do not change 'sec' to 'cpu-sec'. o use convert_unit_double to implement convert_unit. Signed-off-by: Changbin Du Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210315143047.3867-1-changbin.du@gmail.com Signed-off-by: Arnaldo Carvalho de Melo commit 4a03af3ee399e87934e18ae720dda72c52f0050c Author: Arnaldo Carvalho de Melo Date: Mon Mar 15 11:27:24 2021 -0300 perf stat: Elaborate use cases for the -n/--null command line option The existing text was way too terse, pick the intended usage from the cset that introduced this option. Twitter: https://twitter.com/_monoid/status/1371461130175004672?s=20 Signed-off-by: Arnaldo Carvalho de Melo commit 41ed4005aa0a9d1d9d1ab8e056b0c5f6a4b12407 Author: Sean Paul Date: Wed Mar 10 16:47:57 2021 -0500 drm/i915/dp_link_training: Convert DRM_DEBUG_KMS to drm_dbg_kms One instance of DRM_DEBUG_KMS was leftover in dp_link_training, convert it to the new shiny. Signed-off-by: Sean Paul Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210310214845.29021-2-sean@poorly.run commit 65e3fe107ed7fa1b2726e63e83070e089d12c419 Author: Sean Paul Date: Wed Mar 10 16:47:56 2021 -0500 drm/i915/dp_link_training: Add newlines to debug messages This patch adds some newlines which are missing from debug messages. This will prevent logs from being stacked up in dmesg. Signed-off-by: Sean Paul Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210310214845.29021-1-sean@poorly.run commit 5497b23e870c45486e8caf1116ccbb592443bff3 Author: Shunsuke Nakamura Date: Mon Mar 8 19:53:41 2021 +0900 perf vendor events arm64: Add Fujitsu A64FX pmu event Add pmu events for A64FX. Documentation source: https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_PMU_Events_v1.2.pdf Signed-off-by: Nakamura, Shunsuke/中村 俊介 Reviewed-by: John Garry Tested-by: Masayoshi Mizuma Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210308105342.746940-3-nakamura.shun@fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo commit 8efd1634542d9255023d7c2ec2194e8908450b12 Author: Shunsuke Nakamura Date: Mon Mar 8 19:53:40 2021 +0900 perf vendor events arm64: Add more common and uarch events Add the following events.[1] Common architectural events: - L2I_TLB_REFILL - L2I_TLB - SIMD_INST_RETIRED - SVE_INST_RETIRED Common microarchitectural events: - UOP_SPEC - SVE_MATH_SPEC - FP_SPEC - FP_FMA_SPEC - FP_RECPE_SPEC - FP_CVT_SPEC - ASE_SVE_INT_SPEC - SVE_PRED_SPEC - SVE_MOVPRFX_SPEC - SVE_MOVPRFX_U_SPEC - ASE_SVE_LD_SPEC - ASE_SVE_ST_SPEC - PRF_SPEC - BASE_LD_REG_SPEC - BASE_ST_REG_SPEC - SVE_LDR_REG_SPEC - SVE_STR_REG_SPEC - SVE_LDR_PREG_SPEC - SVE_STR_PREG_SPEC - SVE_PRF_CONTIG_SPEC - ASE_SVE_LD_MULTI_SPEC - ASE_SVE_ST_MULTI_SPEC - SVE_LD_GATHER_SPEC - SVE_ST_SCATTER_SPEC - SVE_PRF_GATHER_SPEC - SVE_LDFF_SPEC - FP_SCALE_OPS_SPEC - FP_FIXED_OPS_SPEC - FP_HP_SCALE_OPS_SPEC - FP_HP_FIXED_OPS_SPEC - FP_SP_SCALE_OPS_SPEC - FP_SP_FIXED_OPS_SPEC - FP_DP_SCALE_OPS_SPEC - FP_DP_FIXED_OPS_SPEC Reference document is at the following: [1] https://github.com/fujitsu/A64FX/blob/master/doc/A64FX_PMU_Events_v1.2.pdf Signed-off-by: Nakamura, Shunsuke/中村 俊介 Reviewed-by: John Garry Tested-by: Masayoshi Mizuma Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Mathieu Poirier Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Will Deacon Cc: linux-arm-kernel@lists.infradead.org Link: http://lore.kernel.org/lkml/20210308105342.746940-2-nakamura.shun@fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo commit 908a4f778dc7cc0087a862bf43c8bba8821b610c Merge: 80a064dbd556c f774117c96f94 Author: Sudeep Holla Date: Mon Mar 15 13:27:00 2021 +0000 Merge branch 'ib-iio-scmi-5.12-rc2-take3' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into for-next/scmi * 'ib-iio-scmi-5.12-rc2-take3' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio: iio/scmi: Adding support for IIO SCMI Based Sensors commit 80a064dbd556cde36f0b7f1778e8d8a1dc50f19f Author: Nicola Mazzucato Date: Thu Feb 18 22:23:25 2021 +0000 scmi-cpufreq: Get opp_shared_cpus from opp-v2 for EM By design, SCMI performance domains define the granularity of performance controls, they do not describe any underlying hardware dependencies (although they may match in many cases). It is therefore possible to have some platforms where hardware may have the ability to control CPU performance at different granularity and choose to describe fine-grained performance control through SCMI. In such situations, the energy model would be provided with inaccurate information based on controls, while it still needs to know the performance boundaries. To restore correct functionality, retrieve information of CPUs under the same performance domain from operating-points-v2 in DT, and pass it on to EM. Link: https://lore.kernel.org/r/20210218222326.15788-3-nicola.mazzucato@arm.com Acked-by: Viresh Kumar Signed-off-by: Nicola Mazzucato Signed-off-by: Sudeep Holla commit 71a37cd6a59dc58df3f4e58db3f4f04c9e69da43 Author: Nicola Mazzucato Date: Thu Feb 18 22:23:24 2021 +0000 scmi-cpufreq: Remove deferred probe The current implementation of the scmi_cpufreq_init() function returns -EPROBE_DEFER when the OPP table is not populated. In practice the cpufreq core cannot handle this error code. Therefore, fix the return value and clarify the error message. Link: https://lore.kernel.org/r/20210218222326.15788-2-nicola.mazzucato@arm.com Acked-by: Viresh Kumar Signed-off-by: Nicola Mazzucato Signed-off-by: Sudeep Holla commit d9df28ba587f646b50a7e307bbb0e6f85c7deb21 Author: Robin Murphy Date: Fri Mar 5 17:33:18 2021 +0000 arm64: dts: juno: Enable more SMMUs Now that PCI inbound window restrictions are handled generically between the of_pci resource parsing and the IOMMU layer, and described in the Juno DT, we can finally enable the PCIe SMMU without the risk of DMA mappings inadvertently allocating unusable addresses. Similarly, the relevant support for IOMMU mappings for peripheral transfers has been hooked up in the pl330 driver for ages, so we can happily enable the DMA SMMU without that breaking anything either. Link: https://lore.kernel.org/r/a730070d718cb119f77c8ca1782a0d4189bfb3e7.1614965598.git.robin.murphy@arm.com Signed-off-by: Robin Murphy Signed-off-by: Sudeep Holla commit 4ac4d146cb63cd4709c4729e5eca563e38106195 Author: Robin Murphy Date: Fri Mar 5 17:33:17 2021 +0000 arm64: dts: juno: Describe PCI dma-ranges The PLDA root complex on Juno relies on an address-based lookup table to generate AXI attributes for inbound PCI transactions, and as such will not pass any transaction not matching any programmed address range. The standard firmware configuration programs 3 entries covering the GICv2m MSI doorbell and the 2 DRAM regions, so add a "dma-ranges" property to describe those usable inbound windows. Link: https://lore.kernel.org/r/720d0a9a42e33148fcac45cd39a727093a32bf32.1614965598.git.robin.murphy@arm.com Signed-off-by: Robin Murphy Signed-off-by: Sudeep Holla commit a7672d1df5737009bd5339b80da429da7ceb9964 Author: Arnaldo Carvalho de Melo Date: Mon Mar 15 10:13:22 2021 -0300 perf evlist: Change the COMM when preparing the workload It was reported that --exclude-perf wasn't working, as tracepoints were appearing in 'perf script' output as having the 'perf' COMM, that is just the window in evlist__prepare_workload() after the fork() and before the execvp() call for workloads specified in the command line. Example: # perf record -e kmem:kmalloc --filter 'bytes_alloc<650 && bytes_alloc>620' --exclude-perf -e kmem:kfree --exclude-perf -aR sleep 30 Then: # perf script perf 15905 [009] 1498.356094: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) perf 15905 [009] 1498.356116: kmem:kfree: call_site=free_bprm+0x8f ptr=(nil) perf 15905 [009] 1498.356116: kmem:kfree: call_site=do_execveat_common+0x19d ptr=0xffff9cf750421c00 perf 15905 [009] 1498.356138: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) perf 15905 [009] 1498.356148: kmem:kfree: call_site=free_bprm+0x8f ptr=(nil) perf 15905 [009] 1498.356148: kmem:kfree: call_site=do_execveat_common+0x19d ptr=0xffff9cf750421c00 perf 15905 [009] 1498.356168: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) perf 15905 [009] 1498.356176: kmem:kfree: call_site=free_bprm+0x8f ptr=(nil) perf 15905 [009] 1498.356348: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) perf 15905 [014] 1498.356386: kmem:kfree: call_site=security_compute_sid.part.0+0x3b2 ptr=(nil) perf 15905 [014] 1498.356423: kmem:kfree: call_site=load_elf_binary+0x207 ptr=0xffff9cf5b2a34220 perf 15905 [014] 1498.356694: kmem:kfree: call_site=__free_slab+0xb5 ptr=0xffff9cf6d0b3b000 sleep 15905 [014] 1498.356739: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) Use prctl() to show that that is just the preparation of the workload: # perf script perf-exec 19036 [009] 2199.357582: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) perf-exec 19036 [009] 2199.357604: kmem:kfree: call_site=free_bprm+0x8f ptr=(nil) perf-exec 19036 [009] 2199.357604: kmem:kfree: call_site=do_execveat_common+0x19d ptr=0xffff9cf786459800 perf-exec 19036 [009] 2199.357630: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) perf-exec 19036 [000] 2199.358277: kmem:kfree: call_site=__free_slab+0xb5 ptr=0xffff9cf786fb9c00 perf-exec 19036 [000] 2199.358278: kmem:kfree: call_site=__free_slab+0xb5 ptr=0xffff9cf786458200 perf-exec 19036 [000] 2199.358279: kmem:kfree: call_site=__free_slab+0xb5 ptr=0xffff9cf786458600 sleep 19036 [000] 2199.358316: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) sleep 19036 [000] 2199.358323: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=(nil) sleep 19036 [000] 2199.358330: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=0xffff9cf58be2d000 sleep 19036 [000] 2199.358337: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=0xffff9cf58be2d000 sleep 19036 [000] 2199.358339: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=0xffff9cf58be2d000 sleep 19036 [000] 2199.358341: kmem:kfree: call_site=perf_event_mmap+0x279 ptr=0xffff9cf58be2d000 Reporter: zhanweiw Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212213 Signed-off-by: Arnaldo Carvalho de Melo commit 2d4177c01b4e7496c7d47b31865f8c85bffb3604 Author: Borislav Petkov Date: Sat Mar 13 14:56:16 2021 +0100 tools/x86/kcpuid: Add AMD Secure Encryption leaf Add the 0x8000001f leaf's fields. Signed-off-by: Borislav Petkov Acked-by: Feng Tang Link: https://lkml.kernel.org/r/20210313140118.17010-1-bp@alien8.de commit f935178b5c1c32ff803b15892a8ba85a1280cb01 Author: Borislav Petkov Date: Mon Nov 23 23:19:03 2020 +0100 x86/insn: Make insn_complete() static ... and move it above the only place it is used. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-22-bp@alien8.de commit 404b639e510b36136ef15b08ca8a022845ed87db Author: Borislav Petkov Date: Sun Nov 22 18:12:37 2020 +0100 x86/insn: Remove kernel_insn_init() Now that it is not needed anymore, drop it. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-21-bp@alien8.de commit 62660b0fd238253aff951479a2adf1f06a231422 Author: Borislav Petkov Date: Mon Nov 23 23:00:16 2020 +0100 tools/perf: Convert to insn_decode() Simplify code, no functional changes. Signed-off-by: Borislav Petkov Cc: Arnaldo Carvalho de Melo Link: https://lkml.kernel.org/r/20210304174237.31945-20-bp@alien8.de commit a277ce601cd1c75412a82dfcff547b3173098ef0 Author: Borislav Petkov Date: Sun Nov 22 18:11:10 2020 +0100 x86/tools/insn_sanity: Convert to insn_decode() Simplify code, no functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-19-bp@alien8.de commit c7e41b099be40112d53daccef8553e99e455e0d6 Author: Borislav Petkov Date: Fri Nov 20 17:37:06 2020 +0100 tools/objtool: Convert to insn_decode() Simplify code, no functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-18-bp@alien8.de commit 0c925c61dae18ee3cb93a61cc9dd9562a066034d Author: Borislav Petkov Date: Fri Nov 20 15:01:20 2020 +0100 x86/tools/insn_decoder_test: Convert to insn_decode() Simplify code, no functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-17-bp@alien8.de commit 88afc23922137cd3efdb0f0b6722785c9f6a35eb Author: Borislav Petkov Date: Tue Nov 17 15:26:12 2020 +0100 x86/uprobes: Convert to insn_decode() Simplify code, no functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-16-bp@alien8.de commit 0101947dbcc3204f08fb5b69a21dbd4b1535cad6 Author: Jisheng Zhang Date: Wed Feb 10 14:44:09 2021 +0800 tee: optee: add invoke_fn tracepoints Add tracepoints to retrieve information about the invoke_fn. This would help to measure how many invoke_fn are triggered and how long it takes to complete one invoke_fn call. Signed-off-by: Jisheng Zhang Reviewed-by: Steven Rostedt (VMware) Signed-off-by: Jens Wiklander commit 0be7f42d6fcce111f487283d596594c6da6588b0 Author: Borislav Petkov Date: Mon Nov 16 18:38:45 2020 +0100 x86/traps: Convert to insn_decode() Simplify code, no functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-15-bp@alien8.de commit 5e32c64bb6912bdddc05216655dd37e848b717af Author: Borislav Petkov Date: Mon Nov 16 18:21:23 2020 +0100 x86/sev-es: Convert to insn_decode() Simplify code, no functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-14-bp@alien8.de commit 99e4b0de4d663e247f068bb5e014593b624a4ef0 Author: Borislav Petkov Date: Tue Feb 23 11:28:02 2021 +0100 x86/sev-es: Split vc_decode_insn() Split it into two helpers - a user- and a kernel-mode one for readability. Yes, the original function body is not that convoluted but splitting it makes following through that code trivial than having to pay attention to each little difference when in user or in kernel mode. No functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-13-bp@alien8.de commit d9de0cbd5b1f6b51c92a40937945f26a35d848ff Author: Rafał Miłecki Date: Tue Mar 9 19:26:16 2021 +0100 dt-bindings: phy: brcm,brcmstb-usb-phy: add power-domains On BCM4908 USB PHY is managed using power controller so it needs describing properly using the power-domains. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20210309182616.25783-1-zajec5@gmail.com Signed-off-by: Vinod Koul commit 261ab1fd5c5d2d7ff7d5bab3f5db3c69c4bcea58 Author: Rafał Miłecki Date: Fri Mar 5 16:24:06 2021 +0100 phy: phy-brcm-usb: select SOC_BRCMSTB on brcmstb only phy-brcm-usb has some conditional init code required on selected brcmstb devices. Execution of that code depends on family / product detected by brcmstb soc code. For ARCH_BCM4908 brcmstb soc code always return 0 values as ids. Don't bother selecting & compiling that redundant driver. Depends-on: 149ae80b1d50 ("soc: bcm: brcmstb: add stubs for getting platform IDs") Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Link: https://lore.kernel.org/r/20210305152406.2588-1-zajec5@gmail.com Signed-off-by: Vinod Koul commit 77e768ec1391dc0d6cd89822aa60b9a1c1bd8128 Author: Borislav Petkov Date: Mon Nov 16 18:10:11 2020 +0100 x86/kprobes: Convert to insn_decode() Simplify code, improve decoding error checking. Signed-off-by: Borislav Petkov Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20210304174237.31945-12-bp@alien8.de commit d0dde32dda5dd63a785f1b0d4a56055110f00e37 Author: Gustavo A. R. Silva Date: Fri Mar 5 04:02:19 2021 -0600 phy: qcom-usb-hs: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210305100219.GA142595@embeddedor Signed-off-by: Vinod Koul commit 1580f488ea8c6a62d002be364248c34c2f2e430b Author: Borislav Petkov Date: Fri Nov 6 19:39:08 2020 +0100 x86/mce: Convert to insn_decode() Simplify code, no functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-11-bp@alien8.de commit 63c66cde7bbcc79aac14b25861c5b2495eede57b Author: Borislav Petkov Date: Fri Nov 6 19:37:25 2020 +0100 x86/alternative: Use insn_decode() No functional changes, just simplification. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-10-bp@alien8.de commit 8c98a605544cfdec21d32fcf8fc855dc439f608f Author: Borislav Petkov Date: Fri Nov 6 16:36:24 2020 +0100 perf/x86/intel/ds: Check return values of insn decoder functions branch_type() doesn't need to call the full insn_decode() because it doesn't need it in all cases thus leave the calls separate. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-9-bp@alien8.de commit 3204a7fb98a3bccd0004ea0f2769fbeadc2c2dba Author: Masahiro Yamada Date: Sun Feb 28 15:10:26 2021 +0900 kbuild: prefix $(srctree)/ to some included Makefiles VPATH is used in Kbuild to make pattern rules search for prerequisites in both $(objtree) and $(srctree). Some of *.c, *.S files are not real sources, but generated by tools such as flex, bison, perl. In contrast, I doubt the benefit of --include-dir=$(abs_srctree) because it is always clear which Makefiles are real sources, and which are not. So, my hope is to add $(srctree)/ prefix to all check-in Makefiles, then remove --include-dir=$(abs_srctree) flag in the future. I am touching only some Kbuild core parts for now. Treewide fixes will be needed to achieve this goal. Signed-off-by: Masahiro Yamada commit 2ff49881d606d5e0d5b27cb6066c8a18689bd341 Author: Borislav Petkov Date: Fri Nov 6 16:33:34 2020 +0100 perf/x86/intel/ds: Check insn_get_length() retval intel_pmu_pebs_fixup_ip() needs only the insn length so use the appropriate helper instead of a full decode. A full decode differs only in running insn_complete() on the decoded insn but that is not needed here. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-8-bp@alien8.de commit 514ef77607b9ff184c11b88e8f100bc27f07460d Author: Borislav Petkov Date: Thu Nov 5 17:53:20 2020 +0100 x86/boot/compressed/sev-es: Convert to insn_decode() Other than simplifying the code there should be no functional changes resulting from this. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-7-bp@alien8.de commit 6e8c83d2a3afbfd5ee019ec720b75a42df515caa Author: Borislav Petkov Date: Thu Nov 19 19:20:18 2020 +0100 x86/insn-eval: Handle return values from the decoder Now that the different instruction-inspecting functions return a value, test that and return early from callers if error has been encountered. While at it, do not call insn_get_modrm() when calling insn_get_displacement() because latter will make sure to call insn_get_modrm() if ModRM hasn't been parsed yet. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-6-bp@alien8.de commit 93281c4a96572a34504244969b938e035204778d Author: Borislav Petkov Date: Tue Nov 3 17:28:30 2020 +0100 x86/insn: Add an insn_decode() API Users of the instruction decoder should use this to decode instruction bytes. For that, have insn*() helpers return an int value to denote success/failure. When there's an error fetching the next insn byte and the insn falls short, return -ENODATA to denote that. While at it, make insn_get_opcode() more stricter as to whether what has seen so far is a valid insn and if not. Copy linux/kconfig.h for the tools-version of the decoder so that it can use IS_ENABLED(). Also, cast the INSN_MODE_KERN dummy define value to (enum insn_mode) for tools use of the decoder because perf tool builds with -Werror and errors out with -Werror=sign-compare otherwise. Signed-off-by: Borislav Petkov Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20210304174237.31945-5-bp@alien8.de commit 00f2e6f668b05c259f3f8d1e943318bcad8486e7 Author: Junlin Yang Date: Tue Feb 16 16:27:39 2021 +0800 phy: ti: j721e-wiz: add missing of_node_put Fix OF node leaks by calling of_node_put in for_each_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210216082739.1414-1-angkery@163.com Signed-off-by: Vinod Koul commit 6b5371adc3e56da66085aeef7e70bc8c33e6264c Author: Junlin Yang Date: Tue Feb 16 16:48:47 2021 +0800 phy: rockchip-typec: add missing of_node_put Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210216084847.1544-1-angkery@163.com Signed-off-by: Vinod Koul commit d30c7b820be5c4777fe6c3b0c21f9d0064251e51 Author: Borislav Petkov Date: Mon Feb 22 13:34:40 2021 +0100 x86/insn: Add a __ignore_sync_check__ marker Add an explicit __ignore_sync_check__ marker which will be used to mark lines which are supposed to be ignored by file synchronization check scripts, its advantage being that it explicitly denotes such lines in the code. Signed-off-by: Borislav Petkov Reviewed-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20210304174237.31945-4-bp@alien8.de commit 508ef28674c1fe6ac388586cb31dc0f0bbc4172c Author: Borislav Petkov Date: Mon Nov 2 19:12:16 2020 +0100 x86/insn: Add @buf_len param to insn_init() kernel-doc comment It wasn't documented so add it. No functional changes. Signed-off-by: Borislav Petkov Acked-by: Masami Hiramatsu Link: https://lkml.kernel.org/r/20210304174237.31945-3-bp@alien8.de commit 7bc057dd65ab02995f21fa3b0f9d97261cd5aa2a Author: Amelie Delaunay Date: Mon Feb 8 12:46:59 2021 +0100 phy: stm32: register usbphyc as clock provider of ck_usbo_48m clock ck_usbo_48m is generated by usbphyc PLL and used by OTG controller for Full-Speed use cases with dedicated Full-Speed transceiver. ck_usbo_48m is available as soon as the PLL is enabled. Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20210208114659.15269-3-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 12810cb9c2be12b0da64d295711fa932e9836ec9 Author: Amelie Delaunay Date: Mon Feb 8 12:46:58 2021 +0100 dt-bindings: phy: phy-stm32-usbphyc: add #clock-cells property usbphyc provides a unique clock called ck_usbo_48m. STM32 USB OTG needs a 48Mhz clock (utmifs_clk48) for Full-Speed operation. ck_usbo_48m is a possible parent clock for USB OTG 48Mhz clock. ck_usbo_48m is available as soon as the PLL is enabled. Signed-off-by: Amelie Delaunay Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210208114659.15269-2-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul commit 9e761296c52dcdb1aaa151b65bd39accb05740d9 Author: Borislav Petkov Date: Mon Nov 2 18:47:34 2020 +0100 x86/insn: Rename insn_decode() to insn_decode_from_regs() Rename insn_decode() to insn_decode_from_regs() to denote that it receives regs as param and uses registers from there during decoding. Free the former name for a more generic version of the function. No functional changes. Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210304174237.31945-2-bp@alien8.de commit 0d391319809ec2999565fbb92de712a83cef861b Merge: aa7680f6fe21b 229164175ff0c Author: Borislav Petkov Date: Mon Mar 15 10:49:59 2021 +0100 Merge 'x86/seves' into x86/core Pick up dependent changes. Signed-off-by: Borislav Petkov commit aa7680f6fe21ba92c3d633e345f85d4125cd56f1 Merge: d0962f2b24c99 1e28eed17697b Author: Borislav Petkov Date: Mon Mar 15 10:49:00 2021 +0100 Merge tag 'v5.12-rc3' into x86/core Pick up dependent SEV-ES urgent changes to base new work ontop. Signed-off-by: Borislav Petkov commit be0bdd67fda9468156c733976688f6487d0c42f7 Author: Umesh Nerlige Ramappa Date: Fri Mar 5 13:09:47 2021 -0800 i915/perf: Start hrtimer only if sampling the OA buffer SAMPLE_OA parameter enables sampling of OA buffer and results in a call to init the OA buffer which initializes the OA unit head/tail pointers. The OA_EXPONENT parameter controls the periodicity of the OA reports in the OA buffer and results in starting a hrtimer. Before gen12, all use cases required the use of the OA buffer and i915 enforced this setting when vetting out the parameters passed. In these platforms the hrtimer was enabled if OA_EXPONENT was passed. This worked fine since it was implied that SAMPLE_OA is always passed. With gen12, this changed. Users can use perf without enabling the OA buffer as in OAR use cases. While an OAR use case should ideally not start the hrtimer, we see that passing an OA_EXPONENT parameter will start the hrtimer even though SAMPLE_OA is not specified. This results in an uninitialized OA buffer, so the head/tail pointers used to track the buffer are zero. This itself does not fail, but if we ran a use-case that SAMPLED the OA buffer previously, then the OA_TAIL register is still pointing to an old value. When the timer callback runs, it ends up calculating a wrong/large number of available reports. Since we do a spinlock_irq_save and start processing a large number of reports, NMI watchdog fires and causes a crash. Start the timer only if SAMPLE_OA is specified. v2: - Drop SAMPLE OA check when appending samples (Ashutosh) - Prevent read if OA buffer is not being sampled Fixes: 00a7f0d7155c ("drm/i915/tgl: Add perf support on TGL") Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Ashutosh Dixit Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20210305210947.58751-1-umesh.nerlige.ramappa@intel.com commit e817ee5f2f95ca58a3b961ae4acfd3885e830b9c Author: Christoph Hellwig Date: Thu Jan 28 14:47:29 2021 +0100 dma-iommu: implement ->alloc_noncontiguous Implement support for allocating a non-contiguous DMA region. Signed-off-by: Christoph Hellwig Reviewed-by: Tomasz Figa Tested-by: Ricardo Ribalda commit 8230ce9a4e206fa1be17d66245f87cae2935d7d2 Author: Christoph Hellwig Date: Thu Jan 28 14:44:15 2021 +0100 dma-iommu: refactor iommu_dma_alloc_remap Split out a new helper that only allocates a sg_table worth of memory without mapping it into contiguous kernel address space. Signed-off-by: Christoph Hellwig Reviewed-by: Tomasz Figa Tested-by: Ricardo Ribalda commit 7d5b5738d1514e9dd8ed452660e2a4d25beb9483 Author: Christoph Hellwig Date: Thu Jan 28 14:54:18 2021 +0100 dma-mapping: add a dma_alloc_noncontiguous API Add a new API that returns a potentiall virtually non-contigous sg_table and a DMA address. This API is only properly implemented for dma-iommu and will simply return a contigious chunk as a fallback. The intent is that drivers can use this API if either: - no kernel mapping or only temporary kernel mappings are required. That is as a better replacement for DMA_ATTR_NO_KERNEL_MAPPING - a kernel mapping is required for cached and DMA mapped pages, but the driver also needs the pages to e.g. map them to userspace. In that sense it is a replacement for some aspects of the recently removed and never fully implemented DMA_ATTR_NON_CONSISTENT Signed-off-by: Christoph Hellwig Reviewed-by: Tomasz Figa Tested-by: Ricardo Ribalda commit 198c50e2ccff5c78ddbe0cb01593ac32458deb69 Author: Christoph Hellwig Date: Mon Feb 1 18:12:02 2021 +0100 dma-mapping: refactor dma_{alloc,free}_pages Factour out internal versions without the dma_debug calls in preparation for callers that will need different dma_debug calls. Note that this changes the dma_debug calls to get the not page aligned size values, but as long as alloc and free agree on one variant we are fine. Signed-off-by: Christoph Hellwig Reviewed-by: Tomasz Figa Tested-by: Ricardo Ribalda commit eedb0b12d091a21909b5e84d9f3e5e649305bd12 Author: Christoph Hellwig Date: Thu Jan 28 14:53:22 2021 +0100 dma-mapping: add a dma_mmap_pages helper Add a helper to map memory allocated using dma_alloc_pages into a user address space, similar to the dma_alloc_attrs function for coherent allocations. Signed-off-by: Christoph Hellwig Reviewed-by: Tomasz Figa Tested-by: Ricardo Ribalda commit 4a98623d5d90175c0f99d185171e60807391e487 Author: Sean Christopherson Date: Tue Mar 9 14:42:07 2021 -0800 KVM: x86/mmu: Mark the PAE roots as decrypted for shadow paging Set the PAE roots used as decrypted to play nice with SME when KVM is using shadow paging. Explicitly skip setting the C-bit when loading CR3 for PAE shadow paging, even though it's completely ignored by the CPU. The extra documentation is nice to have. Note, there are several subtleties at play with NPT. In addition to legacy shadow paging, the PAE roots are used for SVM's NPT when either KVM is 32-bit (uses PAE paging) or KVM is 64-bit and shadowing 32-bit NPT. However, 32-bit Linux, and thus KVM, doesn't support SME. And 64-bit KVM can happily set the C-bit in CR3. This also means that keeping __sme_set(root) for 32-bit KVM when NPT is enabled is conceptually wrong, but functionally ok since SME is 64-bit only. Leave it as is to avoid unnecessary pollution. Fixes: d0ec49d4de90 ("kvm/x86/svm: Support Secure Memory Encryption within KVM") Cc: stable@vger.kernel.org Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210309224207.1218275-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c834e5e44fc15acd4e8a894d462535021c80533e Author: Sean Christopherson Date: Tue Mar 9 14:42:06 2021 -0800 KVM: x86/mmu: Use '0' as the one and only value for an invalid PAE root Use '0' to denote an invalid pae_root instead of '0' or INVALID_PAGE. Unlike root_hpa, the pae_roots hold permission bits and thus are guaranteed to be non-zero. Having to deal with both values leads to bugs, e.g. failing to set back to INVALID_PAGE, warning on the wrong value, etc... Signed-off-by: Sean Christopherson Message-Id: <20210309224207.1218275-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 978c834a669160e9794c551ee324286ebeb414c0 Author: Sean Christopherson Date: Fri Mar 5 10:31:23 2021 -0800 KVM: VMX: Track root HPA instead of EPTP for paravirt Hyper-V TLB flush Track the address of the top-level EPT struct, a.k.a. the root HPA, instead of the EPTP itself for Hyper-V's paravirt TLB flush. The paravirt API takes only the address, not the full EPTP, and in theory tracking the EPTP could lead to false negatives, e.g. if the HPA matched but the attributes in the EPTP do not. In practice, such a mismatch is extremely unlikely, if not flat out impossible, given how KVM generates the EPTP. Opportunsitically rename the related fields to use the 'root' nomenclature, and to prefix them with 'hv_' to connect them to Hyper-V's paravirt TLB flushing. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 14072e56958cc167a049d2be0aca78c733777d25 Author: Sean Christopherson Date: Fri Mar 5 10:31:22 2021 -0800 KVM: VMX: Skip additional Hyper-V TLB EPTP flushes if one fails Skip additional EPTP flushes if one fails when processing EPTPs for Hyper-V's paravirt TLB flushing. If _any_ flush fails, KVM falls back to a full global flush, i.e. additional flushes are unnecessary (and will likely fail anyways). Continue processing the loop unless a mismatch was already detected, e.g. to handle the case where the first flush fails and there is a yet-to-be-detected mismatch. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ee36656f0ac3658e98eccc2bcea6b25a081d8ece Author: Sean Christopherson Date: Fri Mar 5 10:31:21 2021 -0800 KVM: VMX: Define Hyper-V paravirt TLB flush fields iff Hyper-V is enabled Ifdef away the Hyper-V specific fields in structs kvm_vmx and vcpu_vmx as each field has only a single reference outside of the struct itself that isn't already wrapped in ifdeffery (and both are initialization). vcpu_vmx.ept_pointer in particular should be wrapped as it is valid if and only if Hyper-v is active, i.e. non-Hyper-V code cannot rely on it to actually track the current EPTP (without additional code changes). Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c82f1b670fd09b7aaa0856ae24d96ce0fa6230d3 Author: Sean Christopherson Date: Fri Mar 5 10:31:20 2021 -0800 KVM: VMX: Explicitly check for hv_remote_flush_tlb when loading pgd Explicitly check that kvm_x86_ops.tlb_remote_flush() points at Hyper-V's implementation for PV flushing instead of assuming that a non-NULL implementation means running on Hyper-V. Wrap the related logic in ifdeffery as hv_remote_flush_tlb() is defined iff CONFIG_HYPERV!=n. Short term, the explicit check makes it more obvious why a non-NULL tlb_remote_flush() triggers EPTP shenanigans. Long term, this will allow TDX to define its own implementation of tlb_remote_flush() without running afoul of Hyper-V. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d0a2d45654c7b117236d8b276a6b8b8bf071e342 Author: Sean Christopherson Date: Fri Mar 5 10:31:19 2021 -0800 KVM: VMX: Don't invalidate hv_tlb_eptp if the new EPTP matches Don't invalidate the common EPTP, and thus trigger rechecking of EPTPs across all vCPUs, if the new EPTP matches the old/common EPTP. In all likelihood this is a meaningless optimization, but there are (uncommon) scenarios where KVM can reload the same EPTP. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit cdbd4b40e70c63e15554120cf486194fd16cb905 Author: Sean Christopherson Date: Fri Mar 5 10:31:18 2021 -0800 KVM: VMX: Invalidate hv_tlb_eptp to denote an EPTP mismatch Drop the dedicated 'ept_pointers_match' field in favor of stuffing 'hv_tlb_eptp' with INVALID_PAGE to mark it as invalid, i.e. to denote that there is at least one EPTP mismatch. Use a local variable to track whether or not a mismatch is detected so that hv_tlb_eptp can be used to skip redundant flushes. No functional change intended. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 446f7f11553028feee34d5cfcf25a87969283255 Author: Sean Christopherson Date: Fri Mar 5 10:31:17 2021 -0800 KVM: VMX: Do Hyper-V TLB flush iff vCPU's EPTP hasn't been flushed Combine the for-loops for Hyper-V TLB EPTP checking and flushing, and in doing so skip flushes for vCPUs whose EPTP matches the target EPTP. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 288bee28094e45829c1e02df9ccf33abc9309ad8 Author: Sean Christopherson Date: Fri Mar 5 10:31:16 2021 -0800 KVM: VMX: Fold Hyper-V EPTP checking into it's only caller Fold check_ept_pointer_match() into hv_remote_flush_tlb_with_range() in preparation for combining the kvm_for_each_vcpu loops of the ==CHECK and !=MATCH statements. No functional change intended. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b68aa15cca5673dd5b14a22e4ebfe2c6585d61c1 Author: Sean Christopherson Date: Fri Mar 5 10:31:15 2021 -0800 KVM: VMX: Stash kvm_vmx in a local variable for Hyper-V paravirt TLB flush Capture kvm_vmx in a local variable instead of polluting hv_remote_flush_tlb_with_range() with to_kvm_vmx(kvm). No functional change intended. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a4038ef1aa63a140f8ba062257febe4e5bbb9448 Author: Sean Christopherson Date: Fri Mar 5 10:31:14 2021 -0800 KVM: VMX: Track common EPTP for Hyper-V's paravirt TLB flush Explicitly track the EPTP that is common to all vCPUs instead of grabbing vCPU0's EPTP when invoking Hyper-V's paravirt TLB flush. Tracking the EPTP will allow optimizing the checks when loading a new EPTP and will also allow dropping ept_pointer_match, e.g. by marking the common EPTP as invalid. This also technically fixes a bug where KVM could theoretically flush an invalid GPA if all vCPUs have an invalid root. In practice, it's likely impossible to trigger a remote TLB flush in such a scenario. In any case, the superfluous flush is completely benign. Reviewed-by: Vitaly Kuznetsov Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e83bc09caf1671ec1c14621668cde2816902e2ea Author: Sean Christopherson Date: Fri Mar 5 10:31:13 2021 -0800 KVM: x86: Get active PCID only when writing a CR3 value Retrieve the active PCID only when writing a guest CR3 value, i.e. don't get the PCID when using EPT or NPT. The PCID is especially problematic for EPT as the bits have different meaning, and so the PCID and must be manually stripped, which is annoying and unnecessary. And on VMX, getting the active PCID also involves reading the guest's CR3 and CR4.PCIDE, i.e. may add pointless VMREADs. Opportunistically rename the pgd/pgd_level params to root_hpa and root_level to better reflect their new roles. Keep the function names, as "load the guest PGD" is still accurate/correct. Last, and probably least, pass root_hpa as a hpa_t/u64 instead of an unsigned long. The EPTP holds a 64-bit value, even in 32-bit mode, so in theory EPT could support HIGHMEM for 32-bit KVM. Never mind that doing so would require changing the MMU page allocators and reworking the MMU to use kmap(). Signed-off-by: Sean Christopherson Signed-off-by: Sean Christopherson Message-Id: <20210305183123.3978098-2-seanjc@google.com> Reviewed-by: Vitaly Kuznetsov Signed-off-by: Paolo Bonzini commit 7531b47c8a358405e713b8070055c365f3172d74 Author: Uros Bizjak Date: Fri Feb 26 13:56:21 2021 +0100 KVM/SVM: Move vmenter.S exception fixups out of line Avoid jump by moving exception fixups out of line. Cc: Sean Christopherson Cc: Paolo Bonzini Signed-off-by: Uros Bizjak Message-Id: <20210226125621.111723-1-ubizjak@gmail.com> Signed-off-by: Paolo Bonzini commit bb4cdf3af9395d50c731d86c15454105a31eb9e3 Author: Sean Christopherson Date: Thu Feb 25 12:47:49 2021 -0800 KVM: x86/mmu: Dump reserved bits if they're detected on non-MMIO SPTE Debugging unexpected reserved bit page faults sucks. Dump the reserved bits that (likely) caused the page fault to make debugging suck a little less. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-25-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 715f1079eee12f629b2de5c8a9489124a5af0a18 Author: Sean Christopherson Date: Thu Feb 25 12:47:48 2021 -0800 KVM: x86/mmu: Use low available bits for removed SPTEs Use low "available" bits to tag REMOVED SPTEs. Using a high bit is moderately costly as it often causes the compiler to generate a 64-bit immediate. More importantly, this makes it very clear REMOVED_SPTE is a value, not a flag. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-24-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 7a51393ae0f6287f9b2bdd138f5a091b7c302c1f Author: Sean Christopherson Date: Thu Feb 25 12:47:47 2021 -0800 KVM: x86/mmu: Use is_removed_spte() instead of open coded equivalents Use the is_removed_spte() helper instead of open coding the check. No functional change intended. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-23-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8f366ae6d8c5eaaae086016934802954abb8959e Author: Sean Christopherson Date: Thu Feb 25 12:47:46 2021 -0800 KVM: x86/mmu: Tweak auditing WARN for A/D bits to !PRESENT (was MMIO) Tweak the MMU_WARN that guards against weirdness when querying A/D status to fire on a !MMU_PRESENT SPTE, as opposed to a MMIO SPTE. Attempting to query A/D status on any kind of !MMU_PRESENT SPTE, MMIO or otherwise, indicates a KVM bug. Case in point, several now-fixed bugs were identified by enabling this new WARN. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-22-seanjc@google.com> Signed-off-by: Paolo Bonzini commit edea7c4fc215c7ee1cc98363b016ad505cbac9f7 Author: Sean Christopherson Date: Thu Feb 25 12:47:45 2021 -0800 KVM: x86/mmu: Use a dedicated bit to track shadow/MMU-present SPTEs Introduce MMU_PRESENT to explicitly track which SPTEs are "present" from the MMU's perspective. Checking for shadow-present SPTEs is a very common operation for the MMU, particularly in hot paths such as page faults. With the addition of "removed" SPTEs for the TDP MMU, identifying shadow-present SPTEs is quite costly especially since it requires checking multiple 64-bit values. On 64-bit KVM, this reduces the footprint of kvm.ko's .text by ~2k bytes. On 32-bit KVM, this increases the footprint by ~200 bytes, but only because gcc now inlines several more MMU helpers, e.g. drop_parent_pte(). We now need to drop bit 11, used for the MMU_PRESENT flag, from the set of bits used to store the generation number in MMIO SPTEs. Otherwise MMIO SPTEs with bit 11 set would get false positives for is_shadow_present_spte() and lead to a variety of fireworks, from oopses to likely hangs of the host kernel. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-21-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 613a3f3797528be489d280c35c4f6ebfcbe77e9e Author: Sean Christopherson Date: Thu Feb 25 12:47:44 2021 -0800 KVM: x86/mmu: Use high bits for host/mmu writable masks for EPT SPTEs Use bits 57 and 58 for HOST_WRITABLE and MMU_WRITABLE when using EPT. This will allow using bit 11 as a constant MMU_PRESENT, which is desirable as checking for a shadow-present SPTE is one of the most common SPTE operations in KVM, particular in hot paths such as page faults. EPT is short on low available bits; currently only bit 11 is the only always-available bit. Bit 10 is also available, but only while KVM doesn't support mode-based execution. On the other hand, PAE paging doesn't have _any_ high available bits. Thus, using bit 11 is the only feasible option for MMU_PRESENT. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-20-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5fc3424f8b854584f8f6fb6ea03f1419487fdc96 Author: Sean Christopherson Date: Thu Feb 25 12:47:43 2021 -0800 KVM: x86/mmu: Make Host-writable and MMU-writable bit locations dynamic Make the location of the HOST_WRITABLE and MMU_WRITABLE configurable for a given KVM instance. This will allow EPT to use high available bits, which in turn will free up bit 11 for a constant MMU_PRESENT bit. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-19-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e7b7bdea77f3277fe49f714c983d0f38f7cb0d86 Author: Sean Christopherson Date: Thu Feb 25 12:47:42 2021 -0800 KVM: x86/mmu: Move logic for setting SPTE masks for EPT into the MMU proper Let the MMU deal with the SPTE masks to avoid splitting the logic and knowledge across the MMU and VMX. The SPTE masks that are used for EPT are very, very tightly coupled to the MMU implementation. The use of available bits, the existence of A/D types, the fact that shadow_x_mask even exists, and so on and so forth are all baked into the MMU implementation. Cross referencing the params to the masks is also a nightmare, as pretty much every param is a u64. A future patch will make the location of the MMU_WRITABLE and HOST_WRITABLE bits MMU specific, to free up bit 11 for a MMU_PRESENT bit. Doing that change with the current kvm_mmu_set_mask_ptes() would be an absolute mess. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-18-seanjc@google.com> Signed-off-by: Paolo Bonzini commit d6b87f256591cf6be78825db6a09a5218666e539 Author: Sean Christopherson Date: Thu Feb 25 12:47:41 2021 -0800 KVM: x86/mmu: Co-locate code for setting various SPTE masks Squish all the code for (re)setting the various SPTE masks into one location. With the split code, it's not at all clear that the masks are set once during module initialization. This will allow a future patch to clean up initialization of the masks without shuffling code all over tarnation. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-17-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ec761cfd353f3b37072cda095d245c155c7cdb0f Author: Sean Christopherson Date: Thu Feb 25 12:47:40 2021 -0800 KVM: x86/mmu: Move initial kvm_mmu_set_mask_ptes() call into MMU proper Move kvm_mmu_set_mask_ptes() into mmu.c as prep for future cleanup of the mask initialization code. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c4827eabe1a89ca82335a9e90bf8ed19a63ba063 Author: Sean Christopherson Date: Thu Feb 25 12:47:39 2021 -0800 KVM: x86/mmu: Document dependency bewteen TDP A/D type and saved bits Document that SHADOW_ACC_TRACK_SAVED_BITS_SHIFT is directly dependent on bits 53:52 being used to track the A/D type. Remove PT64_SECOND_AVAIL_BITS_SHIFT as it is at best misleading, and at worst wrong. For PAE paging, which arguably is a variant of PT64, the bits are reserved. For MMIO SPTEs the bits are not available as they're used for the MMIO generation. For access tracked SPTEs, they are also not available as bits 56:54 are used to store the original RX bits. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b0de568018a6cd216ae060c33832e898f870abed Author: Sean Christopherson Date: Thu Feb 25 12:47:38 2021 -0800 KVM: x86/mmu: Use MMIO SPTE bits 53 and 52 for the MMIO generation Use bits 53 and 52 for the MMIO generation now that they're not used to identify MMIO SPTEs. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8a406c89532c91ee50688d4e728474dd09a11be3 Author: Sean Christopherson Date: Thu Feb 25 12:47:37 2021 -0800 KVM: x86/mmu: Rename and document A/D scheme for TDP SPTEs Rename the various A/D status defines to explicitly associated them with TDP. There is a subtle dependency on the bits in question never being set when using PAE paging, as those bits are reserved, not available. I.e. using these bits outside of TDP (technically EPT) would cause explosions. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b09763da4dd8434171c63b32e0b89cf3d689f4b9 Author: Sean Christopherson Date: Thu Feb 25 12:47:36 2021 -0800 KVM: x86/mmu: Add module param to disable MMIO caching (for testing) Add a module param to disable MMIO caching so that it's possible to test the related flows without access to the necessary hardware. Using shadow paging with 64-bit KVM and 52 bits of physical address space must disable MMIO caching as there are no reserved bits to be had. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8120337a4c5502118e255b170799040eefe2f280 Author: Sean Christopherson Date: Thu Feb 25 12:47:35 2021 -0800 KVM: x86/mmu: Stop using software available bits to denote MMIO SPTEs Stop tagging MMIO SPTEs with specific available bits and instead detect MMIO SPTEs by checking for their unique SPTE value. The value is guaranteed to be unique on shadow paging and NPT as setting reserved physical address bits on any other type of SPTE would consistute a KVM bug. Ditto for EPT, as creating a WX non-MMIO would also be a bug. Note, this approach is also future-compatibile with TDX, which will need to reflect MMIO EPT violations as #VEs into the guest. To create an EPT violation instead of a misconfig, TDX EPTs will need to have RWX=0, But, MMIO SPTEs will also be the only case where KVM clears SUPPRESS_VE, so MMIO SPTEs will still be guaranteed to have a unique value within a given MMU context. The main motivation is to make it easier to reason about which types of SPTEs use which available bits. As a happy side effect, this frees up two more bits for storing the MMIO generation. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c236d9623f7801e89a7b13e29df6709f0b216961 Author: Sean Christopherson Date: Thu Feb 25 12:47:34 2021 -0800 KVM: x86/mmu: Rename 'mask' to 'spte' in MMIO SPTE helpers The value returned by make_mmio_spte() is a SPTE, it is not a mask. Name it accordingly. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3849e0924ef14a245aa292ecaa9accdc4792012c Author: Sean Christopherson Date: Thu Feb 25 12:47:33 2021 -0800 KVM: x86/mmu: Drop redundant trace_kvm_mmu_set_spte() in the TDP MMU Remove TDP MMU's call to trace_kvm_mmu_set_spte() that is done for both shadow-present SPTEs and MMIO SPTEs. It's fully redundant for the former, and unnecessary for the latter. This aligns TDP MMU tracing behavior with that of the legacy MMU. Fixes: 33dd3574f5fe ("kvm: x86/mmu: Add existing trace points to TDP MMU") Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a54aa15c6bda3ca7e2f9e040ba968a1da303e24f Author: Sean Christopherson Date: Thu Feb 25 12:47:32 2021 -0800 KVM: x86/mmu: Handle MMIO SPTEs directly in mmu_set_spte() Now that it should be impossible to convert a valid SPTE to an MMIO SPTE, handle MMIO SPTEs early in mmu_set_spte() without going through set_spte() and all the logic for removing an existing, valid SPTE. The other caller of set_spte(), FNAME(sync_page)(), explicitly handles MMIO SPTEs prior to calling set_spte(). This simplifies mmu_set_spte() and set_spte(), and also "fixes" an oddity where MMIO SPTEs are traced by both trace_kvm_mmu_set_spte() and trace_mark_mmio_spte(). Note, mmu_spte_set() will WARN if this new approach causes KVM to create an MMIO SPTE overtop a valid SPTE. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 30ab5901da57f16b919edfc4c5f8edf9311ba9c3 Author: Sean Christopherson Date: Thu Feb 25 12:47:31 2021 -0800 KVM: x86/mmu: Don't install bogus MMIO SPTEs if MMIO caching is disabled If MMIO caching is disabled, e.g. when using shadow paging on CPUs with 52 bits of PA space, go straight to MMIO emulation and don't install an MMIO SPTE. The SPTE will just generate a !PRESENT #PF, i.e. can't actually accelerate future MMIO. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e0c378684b6545ad2d4403bb701d0ac4932b4e95 Author: Sean Christopherson Date: Thu Feb 25 12:47:30 2021 -0800 KVM: x86/mmu: Retry page faults that hit an invalid memslot Retry page faults (re-enter the guest) that hit an invalid memslot instead of treating the memslot as not existing, i.e. handling the page fault as an MMIO access. When deleting a memslot, SPTEs aren't zapped and the TLBs aren't flushed until after the memslot has been marked invalid. Handling the invalid slot as MMIO means there's a small window where a page fault could replace a valid SPTE with an MMIO SPTE. The legacy MMU handles such a scenario cleanly, but the TDP MMU assumes such behavior is impossible (see the BUG() in __handle_changed_spte()). There's really no good reason why the legacy MMU should allow such a scenario, and closing this hole allows for additional cleanups. Fixes: 2f2fad0897cb ("kvm: x86/mmu: Add functions to handle changed TDP SPTEs") Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 44aaa0150bfd576dc5043094fd1a23699cf280e8 Author: Sean Christopherson Date: Thu Feb 25 12:47:29 2021 -0800 KVM: x86/mmu: Disable MMIO caching if MMIO value collides with L1TF Disable MMIO caching if the MMIO value collides with the L1TF mitigation that usurps high PFN bits. In practice this should never happen as only CPUs with SME support can generate such a collision (because the MMIO value can theoretically get adjusted into legal memory), and no CPUs exist that support SME and are susceptible to L1TF. But, closing the hole is trivial. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ec89e643867148ab4a2a856a38717d2e89692be7 Author: Sean Christopherson Date: Thu Feb 25 12:47:28 2021 -0800 KVM: x86/mmu: Bail from fast_page_fault() if SPTE is not shadow-present Bail from fast_page_fault() if the SPTE is not a shadow-present SPTE. Functionally, this is not strictly necessary as the !is_access_allowed() check will eventually reject the fast path, but an early check on shadow-present skips unnecessary checks and will allow a future patch to tweak the A/D status auditing to warn if KVM attempts to query A/D bits without first ensuring the SPTE is a shadow-present SPTE. Note, is_shadow_present_pte() is quite expensive at this time, i.e. this might be a net negative in the short term. A future patch will optimize is_shadow_present_pte() to a single AND operation and remedy the issue. Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 64bb2769d700f56dbb2f95705bb0732acddd00bf Author: Sean Christopherson Date: Thu Feb 25 12:47:27 2021 -0800 KVM: x86/mmu: Check for shadow-present SPTE before querying A/D status When updating accessed and dirty bits, check that the new SPTE is present before attempting to query its A/D bits. Failure to confirm the SPTE is present can theoretically cause a false negative, e.g. if a MMIO SPTE replaces a "real" SPTE and somehow the PFNs magically match. Realistically, this is all but guaranteed to be a benign bug. Fix it up primarily so that a future patch can tweak the MMU_WARN_ON checking A/D status to fire if the SPTE is not-present. Fixes: f8e144971c68 ("kvm: x86/mmu: Add access tracking for tdp_mmu") Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210225204749.1512652-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 203219571330a591bc60b84ab052dbe0ccc52827 Author: Sean Christopherson Date: Thu Feb 25 17:03:29 2021 -0800 KVM: x86/mmu: Add convenience wrapper for acting on single hva in TDP MMU Add a TDP MMU helper to handle a single HVA hook, the name is a nice reminder that the flow in question is operating on a single HVA. No functional change intended. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210226010329.1766033-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c1b91493ed31cd73fec7f3d385b00b4d42d59349 Author: Sean Christopherson Date: Thu Feb 25 17:03:28 2021 -0800 KVM: x86/mmu: Add typedefs for rmap/iter handlers Add typedefs for the MMU handlers that are invoked when walking the MMU SPTEs (rmaps in legacy MMU) to act on a host virtual address range. No functional change intended. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210226010329.1766033-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e12b785e52fc26d5456b16d5a6e1968cd1deab41 Author: Sean Christopherson Date: Thu Feb 25 17:03:27 2021 -0800 KVM: x86/mmu: Use 'end' param in TDP MMU's test_age_gfn() Use the @end param when aging a GFN instead of hardcoding the walk to a single GFN. Unlike tdp_set_spte(), which simply cannot work with more than one GFN, aging multiple GFNs would not break, though admittedly it would be weird. Be nice to the casual reader and don't make them puzzle out why the end GFN is unused. No functional change intended. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210226010329.1766033-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 74fe0f547454a19a033b03ac55cf248e28f11db6 Author: Sean Christopherson Date: Thu Feb 25 17:03:26 2021 -0800 KVM: x86/mmu: WARN if TDP MMU's set_tdp_spte() sees multiple GFNs WARN if set_tdp_spte() is invoked with multipel GFNs. It is specifically a callback to handle a single host PTE being changed. Consuming the @end parameter also eliminates the confusing 'unused' parameter. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210226010329.1766033-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f055ab634c838a5f9d6c352c2d6d6a9042918ee9 Author: Sean Christopherson Date: Thu Feb 25 17:03:25 2021 -0800 KVM: x86/mmu: Remove spurious TLB flush from TDP MMU's change_pte() hook Remove an unnecessary remote TLB flush from set_tdp_spte(), the TDP MMu's hook for handling change_pte() invocations from the MMU notifier. If the new host PTE is writable, the flush is completely redundant as there are no futher changes to the SPTE before the post-loop flush. If the host PTE is read-only, then the primary MMU is responsible for ensuring that the contents of the old and new pages are identical, thus it's safe to let the guest continue reading both the old and new pages. KVM must only ensure the old page cannot be referenced after returning from its callback; this is handled by the post-loop flush. Fixes: 1d8dd6b3f12b ("kvm: x86/mmu: Support changed pte notifier in tdp MMU") Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210226010329.1766033-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 422e2e17066ca04515e159c42570a3521d83d30b Author: Maxim Levitsky Date: Thu Feb 25 17:41:33 2021 +0200 KVM: x86: mmu: initialize fault.async_page_fault in walk_addr_generic This field was left uninitialized by a mistake. Signed-off-by: Maxim Levitsky Message-Id: <20210225154135.405125-3-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit b97f074583736c42fb36f2da1164e28c73758912 Author: Maxim Levitsky Date: Thu Feb 25 17:41:32 2021 +0200 KVM: x86: determine if an exception has an error code only when injecting it. A page fault can be queued while vCPU is in real paged mode on AMD, and AMD manual asks the user to always intercept it (otherwise result is undefined). The resulting VM exit, does have an error code. Signed-off-by: Maxim Levitsky Message-Id: <20210225154135.405125-2-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini commit 8173396e94c10dccde5e890f1bb31d11c05cae68 Author: Cathy Avery Date: Mon Mar 1 15:08:44 2021 -0500 KVM: nSVM: Optimize vmcb12 to vmcb02 save area copies Use the vmcb12 control clean field to determine which vmcb12.save registers were marked dirty in order to minimize register copies when switching from L1 to L2. Those vmcb12 registers marked as dirty need to be copied to L0's vmcb02 as they will be used to update the vmcb state cache for the L2 VMRUN. In the case where we have a different vmcb12 from the last L2 VMRUN all vmcb12.save registers must be copied over to L2.save. Tested: kvm-unit-tests kvm selftests Fedora L1 L2 Suggested-by: Paolo Bonzini Signed-off-by: Cathy Avery Message-Id: <20210301200844.2000-1-cavery@redhat.com> Signed-off-by: Paolo Bonzini commit d00b99c514b33a3f40dbb3e730b14a283401aa8e Author: Babu Moger Date: Wed Feb 17 10:56:04 2021 -0500 KVM: SVM: Add support for Virtual SPEC_CTRL Newer AMD processors have a feature to virtualize the use of the SPEC_CTRL MSR. Presence of this feature is indicated via CPUID function 0x8000000A_EDX[20]: GuestSpecCtrl. Hypervisors are not required to enable this feature since it is automatically enabled on processors that support it. A hypervisor may wish to impose speculation controls on guest execution or a guest may want to impose its own speculation controls. Therefore, the processor implements both host and guest versions of SPEC_CTRL. When in host mode, the host SPEC_CTRL value is in effect and writes update only the host version of SPEC_CTRL. On a VMRUN, the processor loads the guest version of SPEC_CTRL from the VMCB. When the guest writes SPEC_CTRL, only the guest version is updated. On a VMEXIT, the guest version is saved into the VMCB and the processor returns to only using the host SPEC_CTRL for speculation control. The guest SPEC_CTRL is located at offset 0x2E0 in the VMCB. The effective SPEC_CTRL setting is the guest SPEC_CTRL setting or'ed with the hypervisor SPEC_CTRL setting. This allows the hypervisor to ensure a minimum SPEC_CTRL if desired. This support also fixes an issue where a guest may sometimes see an inconsistent value for the SPEC_CTRL MSR on processors that support this feature. With the current SPEC_CTRL support, the first write to SPEC_CTRL is intercepted and the virtualized version of the SPEC_CTRL MSR is not updated. When the guest reads back the SPEC_CTRL MSR, it will be 0x0, instead of the actual expected value. There isn’t a security concern here, because the host SPEC_CTRL value is or’ed with the Guest SPEC_CTRL value to generate the effective SPEC_CTRL value. KVM writes with the guest's virtualized SPEC_CTRL value to SPEC_CTRL MSR just before the VMRUN, so it will always have the actual value even though it doesn’t appear that way in the guest. The guest will only see the proper value for the SPEC_CTRL register if the guest was to write to the SPEC_CTRL register again. With Virtual SPEC_CTRL support, the save area spec_ctrl is properly saved and restored. So, the guest will always see the proper value when it is read back. Signed-off-by: Babu Moger Message-Id: <161188100955.28787.11816849358413330720.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit f333374e108e7e4cd104591035c9e24ba050706d Author: Babu Moger Date: Thu Jan 28 18:43:22 2021 -0600 x86/cpufeatures: Add the Virtual SPEC_CTRL feature Newer AMD processors have a feature to virtualize the use of the SPEC_CTRL MSR. Presence of this feature is indicated via CPUID function 0x8000000A_EDX[20]: GuestSpecCtrl. When present, the SPEC_CTRL MSR is automatically virtualized. Signed-off-by: Babu Moger Acked-by: Borislav Petkov Message-Id: <161188100272.28787.4097272856384825024.stgit@bmoger-ubuntu> Signed-off-by: Paolo Bonzini commit cc3ed80ae69f454c3d904af9f65394a540099723 Author: Maxim Levitsky Date: Wed Feb 10 18:54:36 2021 +0200 KVM: nSVM: always use vmcb01 to for vmsave/vmload of guest state This allows to avoid copying of these fields between vmcb01 and vmcb02 on nested guest entry/exit. Signed-off-by: Maxim Levitsky Signed-off-by: Paolo Bonzini commit fb0c4a4fee5a35b4e531b57e42231868d1fedb18 Author: Paolo Bonzini Date: Tue Feb 9 07:10:43 2021 -0500 KVM: SVM: move VMLOAD/VMSAVE to C code Thanks to the new macros that handle exception handling for SVM instructions, it is easier to just do the VMLOAD/VMSAVE in C. This is safe, as shown by the fact that the host reload is already done outside the assembly source. Signed-off-by: Paolo Bonzini commit c8781feaf1b590dd4363b76327088561cbeaa6f5 Author: Sean Christopherson Date: Thu Feb 4 16:57:50 2021 -0800 KVM: SVM: Skip intercepted PAUSE instructions after emulation Skip PAUSE after interception to avoid unnecessarily re-executing the instruction in the guest, e.g. after regaining control post-yield. This is a benign bug as KVM disables PAUSE interception if filtering is off, including the case where pause_filter_count is set to zero. Signed-off-by: Sean Christopherson Message-Id: <20210205005750.3841462-10-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 32c23c7d5275d41818807801be44cbba03045fc8 Author: Sean Christopherson Date: Thu Feb 4 16:57:49 2021 -0800 KVM: SVM: Don't manually emulate RDPMC if nrips=0 Remove bizarre code that causes KVM to run RDPMC through the emulator when nrips is disabled. Accelerated emulation of RDPMC doesn't rely on any additional data from the VMCB, and SVM has generic handling for updating RIP to skip instructions when nrips is disabled. Signed-off-by: Sean Christopherson Message-Id: <20210205005750.3841462-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c483c45471b94f59c76cf45b676eb08318a9519a Author: Sean Christopherson Date: Thu Feb 4 16:57:48 2021 -0800 KVM: x86: Move RDPMC emulation to common code Move the entirety of the accelerated RDPMC emulation to x86.c, and assign the common handler directly to the exit handler array for VMX. SVM has bizarre nrips behavior that prevents it from directly invoking the common handler. The nrips goofiness will be addressed in a future patch. Signed-off-by: Sean Christopherson Message-Id: <20210205005750.3841462-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 5ff3a351f687fdd23051e7474f62788c57a7a613 Author: Sean Christopherson Date: Thu Feb 4 16:57:47 2021 -0800 KVM: x86: Move trivial instruction-based exit handlers to common code Move the trivial exit handlers, e.g. for instructions that KVM "emulates" as nops, to common x86 code. Assign the common handlers directly to the exit handler arrays and drop the vendor trampolines. Opportunistically use pr_warn_once() where appropriate. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210205005750.3841462-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 92f9895c146d7378f442dfc25a276c06150dfbd7 Author: Sean Christopherson Date: Thu Feb 4 16:57:46 2021 -0800 KVM: x86: Move XSETBV emulation to common code Move the entirety of XSETBV emulation to x86.c, and assign the function directly to both VMX's and SVM's exit handlers, i.e. drop the unnecessary trampolines. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210205005750.3841462-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2ac636a6ea4dae8260639e8df5c457c0c74cafa9 Author: Sean Christopherson Date: Thu Feb 4 16:57:45 2021 -0800 KVM: nSVM: Add VMLOAD/VMSAVE helper to deduplicate code Add another helper layer for VMLOAD+VMSAVE, the code is identical except for the one line that determines which VMCB is the source and which is the destination. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210205005750.3841462-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 3a87c7e0d176ff73c9ef5d58d89ad65f3be31d1b Author: Sean Christopherson Date: Tue Mar 2 09:45:15 2021 -0800 KVM: nSVM: Add helper to synthesize nested VM-Exit without collateral Add a helper to consolidate boilerplate for nested VM-Exits that don't provide any data in exit_info_*. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210302174515.2812275-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit cb6a32c2b8777ad31a02e585584d869251a790e3 Author: Sean Christopherson Date: Tue Mar 2 09:45:14 2021 -0800 KVM: x86: Handle triple fault in L2 without killing L1 Synthesize a nested VM-Exit if L2 triggers an emulated triple fault instead of exiting to userspace, which likely will kill L1. Any flow that does KVM_REQ_TRIPLE_FAULT is suspect, but the most common scenario for L2 killing L1 is if L0 (KVM) intercepts a contributory exception that is _not_intercepted by L1. E.g. if KVM is intercepting #GPs for the VMware backdoor, a #GP that occurs in L2 while vectoring an injected #DF will cause KVM to emulate triple fault. Cc: Boris Ostrovsky Cc: Jim Mattson Signed-off-by: Sean Christopherson Message-Id: <20210302174515.2812275-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 63129754178c5514f04bf6bdb891e33dfe58e58d Author: Paolo Bonzini Date: Tue Mar 2 14:40:39 2021 -0500 KVM: SVM: Pass struct kvm_vcpu to exit handlers (and many, many other places) Refactor the svm_exit_handlers API to pass @vcpu instead of @svm to allow directly invoking common x86 exit handlers (in a future patch). Opportunistically convert an absurd number of instances of 'svm->vcpu' to direct uses of 'vcpu' to avoid pointless casting. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210205005750.3841462-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 2a32a77cefa662773197b362db8e4190027c89fa Author: Paolo Bonzini Date: Thu Feb 18 09:51:06 2021 -0500 KVM: SVM: merge update_cr0_intercept into svm_set_cr0 The logic of update_cr0_intercept is pointlessly complicated. All svm_set_cr0 is compute the effective cr0 and compare it with the guest value. Inlining the function and simplifying the condition clarifies what it is doing. Signed-off-by: Paolo Bonzini commit 11f0cbf0c6050f2d8b3a24fc2ab8535bcaad54ea Author: Sean Christopherson Date: Wed Feb 3 16:01:17 2021 -0800 KVM: nSVM: Trace VM-Enter consistency check failures Use trace_kvm_nested_vmenter_failed() and its macro magic to trace consistency check failures on nested VMRUN. Tracing such failures by running the buggy VMM as a KVM guest is often the only way to get a precise explanation of why VMRUN failed. Signed-off-by: Sean Christopherson Message-Id: <20210204000117.3303214-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 648fc8ae37147889ab326deb24ed3354e60cd9f8 Author: Sean Christopherson Date: Wed Feb 3 16:01:16 2021 -0800 KVM: x86: Move nVMX's consistency check macro to common code Move KVM's CC() macro to x86.h so that it can be reused by nSVM. Debugging VM-Enter is as painful on SVM as it is on VMX. Rename the more visible macro to KVM_NESTED_VMENTER_CONSISTENCY_CHECK to avoid any collisions with the uber-concise "CC". Signed-off-by: Sean Christopherson Message-Id: <20210204000117.3303214-12-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6906e06db9b04fff7d45d942c17bc9fa681322a3 Author: Krish Sadhukhan Date: Tue Oct 6 19:06:52 2020 +0000 KVM: nSVM: Add missing checks for reserved bits to svm_set_nested_state() The path for SVM_SET_NESTED_STATE needs to have the same checks for the CPU registers, as we have in the VMRUN path for a nested guest. This patch adds those missing checks to svm_set_nested_state(). Suggested-by: Sean Christopherson Signed-off-by: Krish Sadhukhan Message-Id: <20201006190654.32305-3-krish.sadhukhan@oracle.com> Signed-off-by: Paolo Bonzini commit c08f390a75c14fb9f8115d74ae9b7a6142a659b3 Author: Paolo Bonzini Date: Tue Nov 17 02:51:35 2020 -0500 KVM: nSVM: only copy L1 non-VMLOAD/VMSAVE data in svm_set_nested_state() The VMLOAD/VMSAVE data is not taken from userspace, since it will not be restored on VMEXIT (it will be copied from VMCB02 to VMCB01). For clarity, replace the wholesale copy of the VMCB save area with a copy of that state only. Signed-off-by: Paolo Bonzini commit 4bb170a5430b9ea9589ded486d8fbb0df99de377 Author: Paolo Bonzini Date: Mon Nov 16 06:38:19 2020 -0500 KVM: nSVM: do not mark all VMCB02 fields dirty on nested vmexit Since L1 and L2 now use different VMCBs, most of the fields remain the same in VMCB02 from one L2 run to the next. Since KVM itself is not looking at VMCB12's clean field, for now not much can be optimized. However, in the future we could avoid more copies if the VMCB12's SEG and DT sections are clean. Signed-off-by: Paolo Bonzini commit 7ca62d1322503bfd8e7beaf315441a6a2714d6a0 Author: Paolo Bonzini Date: Mon Nov 16 06:38:19 2020 -0500 KVM: nSVM: do not mark all VMCB01 fields dirty on nested vmexit Since L1 and L2 now use different VMCBs, most of the fields remain the same from one L1 run to the next. svm_set_cr0 and other functions called by nested_svm_vmexit already take care of clearing the corresponding clean bits; only the TSC offset is special. Signed-off-by: Paolo Bonzini commit 7c3ecfcd31936e85aa6eb90156d07308b899a76f Author: Paolo Bonzini Date: Mon Nov 16 06:13:15 2020 -0500 KVM: nSVM: do not copy vmcb01->control blindly to vmcb02->control Most fields were going to be overwritten by vmcb12 control fields, or do not matter at all because they are filled by the processor on vmexit. Therefore, we need not copy them from vmcb01 to vmcb02 on vmentry. Signed-off-by: Paolo Bonzini commit 9e8f0fbfff1a7787658ce1add0625f59c4faf0ef Author: Paolo Bonzini Date: Tue Nov 17 05:15:41 2020 -0500 KVM: nSVM: rename functions and variables according to vmcbXY nomenclature Now that SVM is using a separate vmcb01 and vmcb02 (and also uses the vmcb12 naming) we can give clearer names to functions that write to and read from those VMCBs. Likewise, variables and parameters can be renamed from nested_vmcb to vmcb12. Signed-off-by: Paolo Bonzini commit 193015adf40d0465c240d4e9a7b6e4b84b531f8b Author: Cathy Avery Date: Tue Jan 12 11:43:13 2021 -0500 KVM: nSVM: Track the ASID generation of the vmcb vmrun through the vmcb This patch moves the asid_generation from the vcpu to the vmcb in order to track the ASID generation that was active the last time the vmcb was run. If sd->asid_generation changes between two runs, the old ASID is invalid and must be changed. Suggested-by: Paolo Bonzini Signed-off-by: Cathy Avery Message-Id: <20210112164313.4204-3-cavery@redhat.com> Signed-off-by: Paolo Bonzini commit af18fa775d07aeb92d4598df5364a21489aa4141 Author: Cathy Avery Date: Tue Jan 12 11:43:12 2021 -0500 KVM: nSVM: Track the physical cpu of the vmcb vmrun through the vmcb This patch moves the physical cpu tracking from the vcpu to the vmcb in svm_switch_vmcb. If either vmcb01 or vmcb02 change physical cpus from one vmrun to the next the vmcb's previous cpu is preserved for comparison with the current cpu and the vmcb is marked dirty if different. This prevents the processor from using old cached data for a vmcb that may have been updated on a prior run on a different processor. It also moves the physical cpu check from svm_vcpu_load to pre_svm_run as the check only needs to be done at run. Suggested-by: Paolo Bonzini Signed-off-by: Cathy Avery Message-Id: <20210112164313.4204-2-cavery@redhat.com> Signed-off-by: Paolo Bonzini commit 4995a3685f1b768648187ed20bea3366f5f76228 Author: Cathy Avery Date: Wed Jan 13 07:07:52 2021 -0500 KVM: SVM: Use a separate vmcb for the nested L2 guest svm->vmcb will now point to a separate vmcb for L1 (not nested) or L2 (nested). The main advantages are removing get_host_vmcb and hsave, in favor of concepts that are shared with VMX. We don't need anymore to stash the L1 registers in hsave while L2 runs, but we need to copy the VMLOAD/VMSAVE registers from VMCB01 to VMCB02 and back. This more or less has the same cost, but code-wise nested_svm_vmloadsave can be reused. This patch omits several optimizations that are possible: - for simplicity there is some wholesale copying of vmcb.control areas which can go away. - we should be able to better use the VMCB01 and VMCB02 clean bits. - another possibility is to always use VMCB01 for VMLOAD and VMSAVE, thus avoiding the copy of VMLOAD/VMSAVE registers from VMCB01 to VMCB02 and back. Tested: kvm-unit-tests kvm self tests Loaded fedora nested guest on fedora Signed-off-by: Cathy Avery Message-Id: <20201011184818.3609-3-cavery@redhat.com> [Fix conflicts; keep VMCB02 G_PAT up to date whenever guest writes the PAT MSR; do not copy CR4 over from VMCB01 as it is not needed anymore; add a few more comments. - Paolo] Signed-off-by: Paolo Bonzini commit a3322d5cd87fef5ec0037fd1b14068a533f9a60f Author: Sean Christopherson Date: Thu Mar 4 17:10:45 2021 -0800 KVM: nSVM: Set the shadow root level to the TDP level for nested NPT Override the shadow root level in the MMU context when configuring NPT for shadowing nested NPT. The level is always tied to the TDP level of the host, not whatever level the guest happens to be using. Fixes: 096586fda522 ("KVM: nSVM: Correctly set the shadow NPT root level in its MMU role") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-2-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6d1b867d045699d6ce0dfa0ef35d1b87dd36db56 Author: Sean Christopherson Date: Thu Mar 4 17:10:56 2021 -0800 KVM: SVM: Don't strip the C-bit from CR2 on #PF interception Don't strip the C-bit from the faulting address on an intercepted #PF, the address is a virtual address, not a physical address. Fixes: 0ede79e13224 ("KVM: SVM: Clear C-bit from the page fault address") Cc: stable@vger.kernel.org Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-13-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 73ad160693dc3baf230d76cf44c3207defad6e21 Author: Sean Christopherson Date: Thu Mar 4 17:11:01 2021 -0800 KVM: x86/mmu: WARN on NULL pae_root or lm_root, or bad shadow root level WARN if KVM is about to dereference a NULL pae_root or lm_root when loading an MMU, and convert the BUG() on a bad shadow_root_level into a WARN (now that errors are handled cleanly). With nested NPT, botching the level and sending KVM down the wrong path is all too easy, and the on-demand allocation of pae_root and lm_root means bugs crash the host. Obviously, KVM could unconditionally allocate the roots, but that's arguably a worse failure mode as it would potentially corrupt the guest instead of crashing it. Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-18-seanjc@google.com> Signed-off-by: Paolo Bonzini commit a91f387b4bfedab595a987ad41e75d8839a958bf Author: Sean Christopherson Date: Thu Mar 4 17:11:00 2021 -0800 KVM: x86/mmu: Sync roots after MMU load iff load as successful For clarity, explicitly skip syncing roots if the MMU load failed instead of relying on the !VALID_PAGE check in kvm_mmu_sync_roots(). Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-17-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 61a1773e2e01140729f06cd2d2ee9ff83cc1d256 Author: Sean Christopherson Date: Thu Mar 4 17:10:59 2021 -0800 KVM: x86/mmu: Unexport MMU load/unload functions Unexport the MMU load and unload helpers now that they are no longer used (incorrectly) in vendor code. Opportunistically move the kvm_mmu_sync_roots() declaration into mmu.h, it should not be exposed to vendor code. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-16-seanjc@google.com> Signed-off-by: Paolo Bonzini commit f66c53b3b94f658590e1012bf6d922f8b7e01bda Author: Sean Christopherson Date: Thu Mar 4 17:10:58 2021 -0800 KVM: x86: Defer the MMU unload to the normal path on an global INVPCID Defer unloading the MMU after a INVPCID until the instruction emulation has completed, i.e. until after RIP has been updated. On VMX, this is a benign bug as VMX doesn't touch the MMU when skipping an emulated instruction. However, on SVM, if nrip is disabled, the emulator is used to skip an instruction, which would lead to fireworks if the emulator were invoked without a valid MMU. Fixes: eb4b248e152d ("kvm: vmx: Support INVPCID in shadow paging mode") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-15-seanjc@google.com> Signed-off-by: Paolo Bonzini commit c805f5d5585ab5e0cdac6b1ccf7086eb120fb7db Author: Sean Christopherson Date: Thu Mar 4 17:10:57 2021 -0800 KVM: nVMX: Defer the MMU reload to the normal path on an EPTP switch Defer reloading the MMU after a EPTP successful EPTP switch. The VMFUNC instruction itself is executed in the previous EPTP context, any side effects, e.g. updating RIP, should occur in the old context. Practically speaking, this bug is benign as VMX doesn't touch the MMU when skipping an emulated instruction, nor does queuing a single-step #DB. No other post-switch side effects exist. Fixes: 41ab93727467 ("KVM: nVMX: Emulate EPTP switching for the L1 hypervisor") Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-14-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 17e368d94af77c1533bfd4136e080a33a6330282 Author: Sean Christopherson Date: Thu Mar 4 17:10:54 2021 -0800 KVM: x86/mmu: Set the C-bit in the PDPTRs and LM pseudo-PDPTRs Set the C-bit in SPTEs that are set outside of the normal MMU flows, specifically the PDPDTRs and the handful of special cased "LM root" entries, all of which are shadow paging only. Note, the direct-mapped-root PDPTR handling is needed for the scenario where paging is disabled in the guest, in which case KVM uses a direct mapped MMU even though TDP is disabled. Fixes: d0ec49d4de90 ("kvm/x86/svm: Support Secure Memory Encryption within KVM") Cc: stable@vger.kernel.org Cc: Brijesh Singh Cc: Tom Lendacky Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-11-seanjc@google.com> Signed-off-by: Paolo Bonzini commit e49e0b7bf370ebed369f7f0466f349aac5ff12f1 Author: Sean Christopherson Date: Thu Mar 4 17:10:52 2021 -0800 KVM: x86/mmu: Fix and unconditionally enable WARNs to detect PAE leaks Exempt NULL PAE roots from the check to detect leaks, since kvm_mmu_free_roots() doesn't set them back to INVALID_PAGE. Stop hiding the WARNs to detect PAE root leaks behind MMU_WARN_ON, the hidden WARNs obviously didn't do their job given the hilarious number of bugs that could lead to PAE roots being leaked, not to mention the above false positive. Opportunistically delete a warning on root_hpa being valid, there's nothing special about 4/5-level shadow pages that warrants a WARN. Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-9-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6e0918aec49a5f89ca22c60c60cb5d20d8c9af29 Author: Sean Christopherson Date: Thu Mar 4 17:10:51 2021 -0800 KVM: x86/mmu: Check PDPTRs before allocating PAE roots Check the validity of the PDPTRs before allocating any of the PAE roots, otherwise a bad PDPTR will cause KVM to leak any previously allocated roots. Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-8-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 6e6ec58485746eb64487bd49bf5cd90ded3d2cf6 Author: Sean Christopherson Date: Thu Mar 4 17:10:50 2021 -0800 KVM: x86/mmu: Ensure MMU pages are available when allocating roots Hold the mmu_lock for write for the entire duration of allocating and initializing an MMU's roots. This ensures there are MMU pages available and thus prevents root allocations from failing. That in turn fixes a bug where KVM would fail to free valid PAE roots if a one of the later roots failed to allocate. Add a comment to make_mmu_pages_available() to call out that the limit is a soft limit, e.g. KVM will temporarily exceed the threshold if a page fault allocates multiple shadow pages and there was only one page "available". Note, KVM _still_ leaks the PAE roots if the guest PDPTR checks fail. This will be addressed in a future commit. Cc: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-7-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 748e52b9b7368017d3fccb486914804ed4577b42 Author: Sean Christopherson Date: Thu Mar 4 17:10:49 2021 -0800 KVM: x86/mmu: Allocate pae_root and lm_root pages in dedicated helper Move the on-demand allocation of the pae_root and lm_root pages, used by nested NPT for 32-bit L1s, into a separate helper. This will allow a future patch to hold mmu_lock while allocating the non-special roots so that make_mmu_pages_available() can be checked once at the start of root allocation, and thus avoid having to deal with failure in the middle of root allocation. Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-6-seanjc@google.com> Signed-off-by: Paolo Bonzini commit ba0a194ffbfb4168a277fb2116e8362013e2078f Author: Sean Christopherson Date: Thu Mar 4 17:10:48 2021 -0800 KVM: x86/mmu: Allocate the lm_root before allocating PAE roots Allocate lm_root before the PAE roots so that the PAE roots aren't leaked if the memory allocation for the lm_root happens to fail. Note, KVM can still leak PAE roots if mmu_check_root() fails on a guest's PDPTR, or if mmu_alloc_root() fails due to MMU pages not being available. Those issues will be fixed in future commits. Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-5-seanjc@google.com> Signed-off-by: Paolo Bonzini commit b37233c911cbecd22a8a2a80137efe706c727d76 Author: Sean Christopherson Date: Thu Mar 4 17:10:47 2021 -0800 KVM: x86/mmu: Capture 'mmu' in a local variable when allocating roots Grab 'mmu' and do s/vcpu->arch.mmu/mmu to shorten line lengths and yield smaller diffs when moving code around in future cleanup without forcing the new code to use the same ugly pattern. No functional change intended. Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-4-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 04d45551a1eefbea42655da52f56e846c0af721a Author: Sean Christopherson Date: Thu Mar 4 17:10:46 2021 -0800 KVM: x86/mmu: Alloc page for PDPTEs when shadowing 32-bit NPT with 64-bit Allocate the so called pae_root page on-demand, along with the lm_root page, when shadowing 32-bit NPT with 64-bit NPT, i.e. when running a 32-bit L1. KVM currently only allocates the page when NPT is disabled, or when L0 is 32-bit (using PAE paging). Note, there is an existing memory leak involving the MMU roots, as KVM fails to free the PAE roots on failure. This will be addressed in a future commit. Fixes: ee6268ba3a68 ("KVM: x86: Skip pae_root shadow allocation if tdp enabled") Fixes: b6b80c78af83 ("KVM: x86/mmu: Allocate PAE root array when using SVM's 32-bit NPT") Cc: stable@vger.kernel.org Reviewed-by: Ben Gardon Signed-off-by: Sean Christopherson Message-Id: <20210305011101.3597423-3-seanjc@google.com> Signed-off-by: Paolo Bonzini commit 8747fb3b14dda3a3e8f934ceb8beab9bd34d927e Author: Jiri Slaby Date: Tue Mar 2 07:22:08 2021 +0100 USB: serial: io_edgeport: drop unneeded forward declarations Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use. Signed-off-by: Jiri Slaby Reviewed-by: Greg Kroah-Hartman [ johan: update the prototype comments ] Signed-off-by: Johan Hovold commit bf260466c89f4a447c53dc704238cfc3685e05d2 Author: Jiri Slaby Date: Tue Mar 2 07:22:07 2021 +0100 USB: serial: keyspan: drop unneeded forward declarations Forward declarations make the code larger, harder to follow and rewrite. Harder as the declarations are often omitted from global changes. Remove forward declarations which are not really needed, i.e. when the definition of the function is before its first use. Signed-off-by: Jiri Slaby Reviewed-by: Greg Kroah-Hartman Signed-off-by: Johan Hovold commit 43c11d91fb1e4c41309db3d233ac1e048cdc8dd0 Author: Dongli Zhang Date: Fri Mar 5 14:57:47 2021 -0800 KVM: x86: to track if L1 is running L2 VM The new per-cpu stat 'nested_run' is introduced in order to track if L1 VM is running or used to run L2 VM. An example of the usage of 'nested_run' is to help the host administrator to easily track if any L1 VM is used to run L2 VM. Suppose there is issue that may happen with nested virtualization, the administrator will be able to easily narrow down and confirm if the issue is due to nested virtualization via 'nested_run'. For example, whether the fix like commit 88dddc11a8d6 ("KVM: nVMX: do not use dangling shadow VMCS after guest reset") is required. Cc: Joe Jin Signed-off-by: Dongli Zhang Message-Id: <20210305225747.7682-1-dongli.zhang@oracle.com> Signed-off-by: Paolo Bonzini commit 13ce240a932fe9c809ec6e79ffc5a4d4ecf534ee Author: Zong-Zhe Yang Date: Tue Mar 9 14:01:21 2021 +0800 rtw88: 8822c: support FW crash dump when FW crash Although FW crash logs are already supported for dumping in driver, the logs may not be sufficient to analyze field issues. To improve this part, we add a support to dump FW memory. When driver receives FW crash notifications, driver uses DDMA, which is a HW ability, to copy specified FW memory to FW fifo. Driver can then dump these information from FW fifo. With this support, not only FW crash log but also specified FW memory will be dumped while FW crash. Besides, specified registers are also dumped. This feature is implemeted on 8822C first due to difference of FW layouts between ICs. In addition, we add a debugfs to trigger FW crash. It can simulate the process of crash, dump and reset. Through it, we can also check if a reset is ongoing. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210309060121.9099-1-pkshih@realtek.com commit 50773696301bdd083af57bad82bb99779719f0c7 Author: Ajay Singh Date: Thu Feb 25 04:23:10 2021 +0000 wilc1000: use wilc handler as cookie in request_threaded_irq() Use same cookie for request_threaded_irq() & free_irq() to properly free IRQ during module unload. free_irq() already uses *wilc* handler so the changes are required for request_threaded_irq(). Signed-off-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210225042302.17048-1-ajay.kathat@microchip.com commit e21b6e5a54628cd3935f200049d4430c25c54e03 Author: Marcus Folkesson Date: Wed Feb 24 17:37:06 2021 +0100 wilc1000: write value to WILC_INTR2_ENABLE register Write the value instead of reading it twice. Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver") Signed-off-by: Marcus Folkesson Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210224163706.519658-1-marcus.folkesson@gmail.com commit f135a1571a0579bebed625e3af0b1fcae6dff7c5 Author: David Mosberger-Tang Date: Wed Feb 24 03:33:23 2021 +0000 wilc1000: Support chip sleep over SPI chip_allow_sleep() only supported wakeup via SDIO, which made the driver unusable over SPI. This code is a straight forward port from the driver in the linux-at91 repository. Signed-off-by: David Mosberger-Tang Acked-by: Ajay Singh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210224033317.1507603-1-davidm@egauge.net commit 4a7ea94377c928355f778bd2f5cac73757935425 Author: wengjianfeng Date: Tue Feb 23 15:54:38 2021 +0800 rtw88: remove unnecessary variable The variable ret is defined at the beginning and initialized to 0 until the function returns ret, and the variable ret is not reassigned.Therefore, we do not need to define the variable ret, just return 0 directly at the end of the function. Signed-off-by: wengjianfeng Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210223075438.13676-1-samirweng1979@163.com commit 5b492c7dbddaba4a1c1d4e72ec974ee459b4afe7 Author: Ping-Ke Shih Date: Fri Feb 19 13:41:40 2021 +0800 rtw88: coex: add power off setting Clear WL/BT on/off bit in scoreboard register that is used to exchange WL/BT status. Since the status is preserved after warm reboot, we must clear it when WL is going to down. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210219054140.7835-1-pkshih@realtek.com commit 1193a7de6ef447db3e9b40cbdcc742ddc434b35a Merge: 2117fce81f6b8 26f6979237293 Author: Kalle Valo Date: Mon Mar 15 10:12:41 2021 +0200 Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git ath.git patches for v5.13. Major changes: ath11k * add initial support for QCN9074, but not enabled yet due to firmware problems * enable radar detection for 160MHz secondary segment * handle beacon misses in station mode commit aa403f257e992eac33cd9afd1d87ce9299f6db7a Merge: 14b02f023c094 1e28eed17697b Author: Greg Kroah-Hartman Date: Mon Mar 15 08:45:20 2021 +0100 Merge 5.12-rc3 into usb-next We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 280def1e1c17d35b21206881937d4498bcc1f503 Merge: 3d82be8be6fdf 1e28eed17697b Author: Greg Kroah-Hartman Date: Mon Mar 15 08:43:49 2021 +0100 Merge 5.12-rc3 into tty-next Resolves a merge issue with: drivers/tty/hvc/hvcs.c and we want the tty/serial fixes from 5.12-rc3 in here as well. Signed-off-by: Greg Kroah-Hartman commit 83be46e944f630fde26ce03cb93f61a3066448e3 Merge: f8096ff38d5f6 1e28eed17697b Author: Greg Kroah-Hartman Date: Mon Mar 15 08:36:41 2021 +0100 Merge v5.12-rc3 into char-misc-next We need the char/misc fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit e9d503fef7da2cc0610ce9cd056d0347ec9cafc4 Author: Lee Jones Date: Fri Mar 12 11:02:39 2021 +0000 pcmcia: rsrc_nonstatic: Fix call-back function as reference formatting Fixes the following W=1 kernel build warning(s): drivers/pcmcia/rsrc_nonstatic.c:349: warning: Function parameter or member 'value' not described in 'do_validate_mem' drivers/pcmcia/rsrc_nonstatic.c:349: warning: Excess function parameter 'validate' description in 'do_validate_mem' drivers/pcmcia/rsrc_nonstatic.c:407: warning: Function parameter or member 'value' not described in 'do_mem_probe' drivers/pcmcia/rsrc_nonstatic.c:407: warning: Excess function parameter 'validate' description in 'do_mem_probe' drivers/pcmcia/rsrc_nonstatic.c:407: warning: Excess function parameter 'fallback' description in 'do_mem_probe' Signed-off-by: Lee Jones [linux@dominikbrodowski.net: removed list of CCs] Signed-off-by: Dominik Brodowski commit 1d26d6f2cbd049b4be295db2d6328d6bcfd50af7 Author: Lee Jones Date: Fri Mar 12 11:02:38 2021 +0000 pcmcia: pcmcia_resource: Fix some kernel-doc formatting/disparities and demote others Fixes the following W=1 kernel build warning(s): drivers/pcmcia/pcmcia_resource.c:160: warning: Function parameter or member 'p_dev' not described in 'pcmcia_access_config' drivers/pcmcia/pcmcia_resource.c:160: warning: Function parameter or member 'where' not described in 'pcmcia_access_config' drivers/pcmcia/pcmcia_resource.c:160: warning: Function parameter or member 'val' not described in 'pcmcia_access_config' drivers/pcmcia/pcmcia_resource.c:160: warning: Function parameter or member 'accessf' not described in 'pcmcia_access_config' drivers/pcmcia/pcmcia_resource.c:194: warning: Function parameter or member 'p_dev' not described in 'pcmcia_read_config_byte' drivers/pcmcia/pcmcia_resource.c:194: warning: Function parameter or member 'where' not described in 'pcmcia_read_config_byte' drivers/pcmcia/pcmcia_resource.c:194: warning: Function parameter or member 'val' not described in 'pcmcia_read_config_byte' drivers/pcmcia/pcmcia_resource.c:207: warning: Function parameter or member 'p_dev' not described in 'pcmcia_write_config_byte' drivers/pcmcia/pcmcia_resource.c:207: warning: Function parameter or member 'where' not described in 'pcmcia_write_config_byte' drivers/pcmcia/pcmcia_resource.c:207: warning: Function parameter or member 'val' not described in 'pcmcia_write_config_byte' drivers/pcmcia/pcmcia_resource.c:728: warning: Function parameter or member 'p_dev' not described in 'pcmcia_setup_isa_irq' drivers/pcmcia/pcmcia_resource.c:728: warning: Function parameter or member 'type' not described in 'pcmcia_setup_isa_irq' drivers/pcmcia/pcmcia_resource.c:793: warning: Function parameter or member 'p_dev' not described in 'pcmcia_setup_irq' Signed-off-by: Lee Jones [linux@dominikbrodowski.net: removed list of CCs] Signed-off-by: Dominik Brodowski commit 6562e2cb8c7fa2f4982cdb28a2740a3bb7ec2c43 Author: Lee Jones Date: Fri Mar 12 11:02:37 2021 +0000 pcmcia: ds: Fix function name disparity in header Fixes the following W=1 kernel build warning(s): drivers/pcmcia/ds.c:96: warning: expecting prototype for pcmcia_store_new_id(). Prototype was for new_id_store() instead Signed-off-by: Lee Jones [linux@dominikbrodowski.net: removed list of CCs] Signed-off-by: Dominik Brodowski commit f4468bbbe25eae0839aeada937c4ac8d9a5086d9 Author: Lee Jones Date: Fri Mar 12 11:02:36 2021 +0000 pcmcia: pcmcia_cis: Demote non-conforming kernel-doc headers to standard kernel-doc Fixes the following W=1 kernel build warning(s): drivers/pcmcia/pcmcia_cis.c:129: warning: Function parameter or member 'flags' not described in 'pcmcia_io_cfg_data_width' drivers/pcmcia/pcmcia_cis.c:154: warning: Function parameter or member 'tuple' not described in 'pcmcia_do_loop_config' drivers/pcmcia/pcmcia_cis.c:154: warning: Function parameter or member 'parse' not described in 'pcmcia_do_loop_config' drivers/pcmcia/pcmcia_cis.c:154: warning: Function parameter or member 'priv' not described in 'pcmcia_do_loop_config' drivers/pcmcia/pcmcia_cis.c:300: warning: Function parameter or member 'tuple' not described in 'pcmcia_do_loop_tuple' drivers/pcmcia/pcmcia_cis.c:300: warning: Function parameter or member 'parse' not described in 'pcmcia_do_loop_tuple' drivers/pcmcia/pcmcia_cis.c:300: warning: Function parameter or member 'priv' not described in 'pcmcia_do_loop_tuple' drivers/pcmcia/pcmcia_cis.c:351: warning: Function parameter or member 'p_dev' not described in 'pcmcia_do_get_tuple' drivers/pcmcia/pcmcia_cis.c:351: warning: Function parameter or member 'tuple' not described in 'pcmcia_do_get_tuple' drivers/pcmcia/pcmcia_cis.c:351: warning: Function parameter or member 'priv' not described in 'pcmcia_do_get_tuple' drivers/pcmcia/pcmcia_cis.c:399: warning: Function parameter or member 'p_dev' not described in 'pcmcia_do_get_mac' drivers/pcmcia/pcmcia_cis.c:399: warning: Function parameter or member 'tuple' not described in 'pcmcia_do_get_mac' drivers/pcmcia/pcmcia_cis.c:399: warning: Function parameter or member 'priv' not described in 'pcmcia_do_get_mac' Signed-off-by: Lee Jones [linux@dominikbrodowski.net: removed list of CCs] Signed-off-by: Dominik Brodowski commit cc448baf85c8f25282189b7f81c85c3bf10dfd9f Author: Lee Jones Date: Fri Mar 12 11:02:35 2021 +0000 pcmcia: cistpl: Demote non-conformant kernel-doc headers to standard comments Fixes the following W=1 kernel build warning(s): drivers/pcmcia/cistpl.c:88: warning: Function parameter or member 's' not described in 'set_cis_map' drivers/pcmcia/cistpl.c:88: warning: Function parameter or member 'card_offset' not described in 'set_cis_map' drivers/pcmcia/cistpl.c:88: warning: Function parameter or member 'flags' not described in 'set_cis_map' drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 's' not described in 'pcmcia_read_cis_mem' drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 'attr' not described in 'pcmcia_read_cis_mem' drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 'addr' not described in 'pcmcia_read_cis_mem' drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 'len' not described in 'pcmcia_read_cis_mem' drivers/pcmcia/cistpl.c:136: warning: Function parameter or member 'ptr' not described in 'pcmcia_read_cis_mem' drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 's' not described in 'pcmcia_write_cis_mem' drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 'attr' not described in 'pcmcia_write_cis_mem' drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 'addr' not described in 'pcmcia_write_cis_mem' drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 'len' not described in 'pcmcia_write_cis_mem' drivers/pcmcia/cistpl.c:217: warning: Function parameter or member 'ptr' not described in 'pcmcia_write_cis_mem' drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 's' not described in 'read_cis_cache' drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 'attr' not described in 'read_cis_cache' drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 'addr' not described in 'read_cis_cache' drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 'len' not described in 'read_cis_cache' drivers/pcmcia/cistpl.c:289: warning: Function parameter or member 'ptr' not described in 'read_cis_cache' drivers/pcmcia/cistpl.c:372: warning: Function parameter or member 's' not described in 'verify_cis_cache' drivers/pcmcia/cistpl.c:412: warning: Function parameter or member 's' not described in 'pcmcia_replace_cis' drivers/pcmcia/cistpl.c:412: warning: Function parameter or member 'data' not described in 'pcmcia_replace_cis' drivers/pcmcia/cistpl.c:412: warning: Function parameter or member 'len' not described in 'pcmcia_replace_cis' Signed-off-by: Lee Jones [linux@dominikbrodowski.net: removed list of CCs] Signed-off-by: Dominik Brodowski commit f20a7596a0c13947405e961a8adb77abeddc989f Author: Lee Jones Date: Fri Mar 12 11:02:34 2021 +0000 pcmcia: rsrc_nonstatic: Demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/pcmcia/rsrc_nonstatic.c:265: warning: Function parameter or member 's' not described in 'readable' drivers/pcmcia/rsrc_nonstatic.c:265: warning: Function parameter or member 'res' not described in 'readable' drivers/pcmcia/rsrc_nonstatic.c:265: warning: Function parameter or member 'count' not described in 'readable' drivers/pcmcia/rsrc_nonstatic.c:296: warning: Function parameter or member 's' not described in 'checksum' drivers/pcmcia/rsrc_nonstatic.c:296: warning: Function parameter or member 'res' not described in 'checksum' drivers/pcmcia/rsrc_nonstatic.c:296: warning: Function parameter or member 'value' not described in 'checksum' drivers/pcmcia/rsrc_nonstatic.c:349: warning: Function parameter or member 'value' not described in 'do_validate_mem' drivers/pcmcia/rsrc_nonstatic.c:349: warning: Excess function parameter 'validate' description in 'do_validate_mem' drivers/pcmcia/rsrc_nonstatic.c:407: warning: Function parameter or member 'value' not described in 'do_mem_probe' drivers/pcmcia/rsrc_nonstatic.c:407: warning: Excess function parameter 'validate' description in 'do_mem_probe' drivers/pcmcia/rsrc_nonstatic.c:407: warning: Excess function parameter 'fallback' description in 'do_mem_probe' Signed-off-by: Lee Jones [linux@dominikbrodowski.net: removed list of CCs] Signed-off-by: Dominik Brodowski commit cd2b4f14edaba60f4f8d429d46e3636202a30f5e Author: Uwe Kleine-König Date: Mon Mar 1 18:38:47 2021 +0100 pcmcia: ds: Remove if with always false condition pcmcia_device_remove() is only ever called by the driver core with dev->driver pointing to a valid driver. Signed-off-by: Uwe Kleine-König [linux@dominikbrodowski.net: shorten commit message, fix reference to pcmcia_device_probe] Signed-off-by: Dominik Brodowski commit b828324bba8f575fde487a91fec07303789dda8a Merge: 0ba8b68b5b30a 1e28eed17697b Author: Greg Kroah-Hartman Date: Mon Mar 15 07:52:17 2021 +0100 Merge 5.12-rc3 into staging-next We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman commit 610a5e288394c63b18dc8bcefe5dac9a978bdbef Author: Fabio Estevam Date: Mon Mar 8 16:11:14 2021 -0300 ARM: dts: imx7d-mba7: Remove unsupported PCI properties disable-gpio' and 'power-on-gpio' are not valid properties according to Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt. Remove the unsupported properties. Signed-off-by: Fabio Estevam Reviewed-by: Bruno Thomsen Reviewed-by: Matthias Schiffer Signed-off-by: Shawn Guo commit bbc4c8a53171977461264678a26f5f3d188a5c86 Author: Tim Harvey Date: Mon Mar 8 15:59:40 2021 -0300 ARM: dts: imx6qdl-gw*: Remove unnecessary #address-cells/#size-cells Remove the unnecessary #address-cells/#size-cells to avoid warnings from W=1 build like this: arch/arm/boot/dts/imx6qdl-gw52xx.dtsi:33.12-78.4: Warning (avoid_unnecessary_addr_size): /gpio-keys: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Tim Harvey [fabio: Make the warning messages more succint] Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 2343e697fa366a26bac7633315724dc0382dab56 Author: Fabio Estevam Date: Mon Mar 8 15:59:39 2021 -0300 ARM: dts: imx6dl-plybas: Fix gpio-keys W=1 warnings Remove the unnecessary #address-cells/#size-cells and rename the node names to fix the following W=1 dtc warnings: arch/arm/boot/dts/imx6dl-plybas.dts:26.13-30.5: Warning (unit_address_vs_reg): /gpio_keys/button@20: node has a unit name, but no reg or ranges property arch/arm/boot/dts/imx6dl-plybas.dts:32.13-36.5: Warning (unit_address_vs_reg): /gpio_keys/button@21: node has a unit name, but no reg or ranges property arch/arm/boot/dts/imx6dl-plybas.dts:20.12-37.4: Warning (avoid_unnecessary_addr_size): /gpio_keys: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property Signed-off-by: Fabio Estevam Reviewed-by: Oleksij Rempel Signed-off-by: Shawn Guo commit e0ece1860d0f74e23f8e64216a76d693c2c8dd06 Author: Ian Ray Date: Mon Mar 8 16:18:29 2021 +0100 ARM: dts: imx: bx50v3: Define GPIO line names Define GPIO line names for b450v3, b650v3, and b850v3. Signed-off-by: Ian Ray Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit 4ec79ac7fa7cef5ee8f1fa1f85c3644166aaf6a8 Author: Sebastian Reichel Date: Mon Mar 8 16:18:28 2021 +0100 ARM: dts: imx: bx50v3: i2c GPIOs are open drain Explicitly mark I2C GPIOs as open drain to fix the following kernel message being printed: enforced open drain please flag it properly in DT/ACPI DSDT/board file Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit b0884cf28fa32c06d9649ed585d688a9cbdf18e1 Author: Sebastian Reichel Date: Mon Mar 8 16:18:27 2021 +0100 ARM: dts: imx6q-ba16: improve PHY information Add PHY voltage supply information fixing the following kernel message: 2188000.ethernet supply phy not found, using dummy regulator Also add PHY clock information to avoid depending on the bootloader programming correct values. The bootloader also sets some reserved registers in the PHY as advised by Qualcomm, which is not supported by the bindings/kernel driver, so the reset GPIO has not been added intentionally. Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit f285369a2832bd53442ad44bb1a5efa841e58603 Author: Sebastian Reichel Date: Mon Mar 8 16:18:26 2021 +0100 ARM: dts: imx6q-ba16: add USB OTG VBUS enable GPIO Add VBUS regulator GPIO information, so that USB OTG port can also be used in host mode. Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit 0f22183206a73274ebf4d8bcb33c6704bc1463a7 Author: Horia Geantă Date: Sun Mar 7 22:56:29 2021 +0200 ARM: dts: ls1021a: mark crypto engine dma coherent Crypto engine (CAAM) on LS1021A platform is configured HW-coherent, mark accordingly the DT node. Signed-off-by: Horia Geantă Signed-off-by: Shawn Guo commit ce8da614934245c1c2264770c7c49090e3b34080 Author: Philippe Schenker Date: Thu Mar 4 10:31:39 2021 +0100 ARM: dts: colibri-imx6ull: Change drive strength for usdhc2 The current setting reflects about 86 Ohms of source-impedance on the SDIO signals where the WiFi board is hooked up. PCB traces are routed with 50 Ohms impedance and there are no serial resistors on those traces. This commit changes the source-impedance to 52 Ohms to better match our hardware design. The impedances given in this commit message refer to 3.3V operation. Signed-off-by: Philippe Schenker Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 952d23b0533d7d4c1bfa3819e289a469da299bf1 Author: Alexander Shiyan Date: Mon Feb 15 08:20:19 2021 +0300 ARM: dts: imx6ql-pfla02: Move "hog" pins into corresponded pin groups Move the "hog" pins to the corresponding pin groups for SPI, ENET, PMIC, LEDs, so that these pins can be used for different purposes when the respective drivers are disabled. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo commit 51c045ec31958be881973733766d7ceb67c3e7aa Author: Alexander Shiyan Date: Sun Feb 14 09:30:38 2021 +0300 ARM: dts: imx6qdl-phytec-pbab01: Select synchronous mode for AUDMUX Board uses 4-wire synchronous mode for audio, so add SYN bit for PTCR AUDMUX registers. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo commit 5e27eeec3b89078f3590b64ce71e239e292200b0 Author: Alexander Shiyan Date: Sun Feb 14 09:12:43 2021 +0300 ARM: dts: imx6qdl-ts7970: Drop redundant "fsl,mode" option The operating mode is used for the AC97 interface only, so lets drop the excess fsl,mode item from SSI node. Signed-off-by: Alexander Shiyan Signed-off-by: Shawn Guo commit a10419db66a87a1e02994682c2cf7031f6880bf3 Author: Fabio Estevam Date: Sat Feb 13 22:41:55 2021 -0300 ARM: dts: imx53-qsb: Describe the esdhc1 card detect pin The micro SD card slot uses GPIO3_13 as card detect pin, so describe it in the devicetree. This was noticed when converting imx53-qsb board to driver model in U-Boot as the micro SD card was not getting detected. Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit 70f7025c854c7edc6965ec2ef4230d09ebb9ffd7 Author: Colin Ian King Date: Thu Mar 11 11:17:27 2021 +0000 bus: mhi: core: remove redundant initialization of variables state and ee The variables state and ee are being initialized with values that are never read and are being updated later with a new values. The initializations are redundant and can be removed. Signed-off-by: Colin Ian King Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210311111727.8433-1-colin.king@canonical.com Signed-off-by: Manivannan Sadhasivam commit 980129a4827444dc51b9a07c0c51923970318475 Author: Dong Aisheng Date: Fri Mar 5 21:17:47 2021 +0800 arm64: defconfig: add imx8qm pinctrl support Except MX8QM pinctrl driver is missing, all other necessary drivers for a booting are reused from MX8QXP which are already enabled in defconfig. Cc: Catalin Marinas Cc: Will Deacon Cc: Sascha Hauer Cc: Fabio Estevam Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit c7ae9d5dae71661caf955cac1f72f0253ea5e9e0 Author: Adrien Grassein Date: Tue Feb 23 20:16:52 2021 +0100 arm64: defconfig: Enable wm8960 audio driver. This driver is used by the Nitrogen8m Mini SBC. Signed-off-by: Adrien Grassein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit bc6bf2e0fd9c42ec77bdfcc4634016ce840a9d83 Author: Guido Günther Date: Sun Feb 21 12:07:09 2021 +0100 arm64: defconfig: Enable asoc simple mux This is needed to model the mic input mux on the Librem 5 devkit. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo commit 65198789898be0b0b6fe0c3b61f601a9285377e3 Author: Guido Günther Date: Fri Feb 19 11:04:37 2021 +0100 arm64: defconfig: Enable devfreq support for i.MX8MQ This is needed to make DRAM frequency scaling via devfreq as used on the Librem 5 and Librem 5 Devkit. With the interconnect support enabled we now need imx devfreq on top to make this work. Signed-off-by: Guido Günther Signed-off-by: Martin Kepplinger Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 6f96852619d5f3d39e3dc371ac3fe5fe1717a061 Author: Marek Vasut Date: Sun Feb 28 22:18:34 2021 +0100 arm64: dts: freescale: Add support EQOS MAC on phyBOARD-Pollux-i.MX8MP The board has both MACs routed out, enable the EQOS. Signed-off-by: Marek Vasut Cc: Dong Aisheng Cc: Heiko Schocher Cc: NXP Linux Team Cc: Peng Fan Cc: Teresa Remmet Signed-off-by: Shawn Guo commit ec4d1196f1138b47966dddaf26e8959892a1c861 Author: Marek Vasut Date: Sun Feb 28 22:18:33 2021 +0100 arm64: dts: imx8mp: add eqos node and alias Add EQOS GMAC node per Documentation/devicetree/bindings/net/imx-dwmac.txt , leave out the nvmem entries as that is not yet available, so the MAC has to be passed in via DT by the bootloader. Signed-off-by: Marek Vasut Cc: Dong Aisheng Cc: Heiko Schocher Cc: NXP Linux Team Cc: Peng Fan Cc: Teresa Remmet Signed-off-by: Shawn Guo commit 6cecf54dfbcc77dbee2dab3922b0d23885d9c336 Author: Jagan Teki Date: Fri Feb 26 00:54:04 2021 +0530 arm64: dts: imx8mm: Add Engicam i.Core MX8M Mini EDIMM2.2 Starter Kit Engicam EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board. Genaral features: - LCD 7" C.Touch - microSD slot - Ethernet 1Gb - Wifi/BT - 2x LVDS Full HD interfaces - 3x USB 2.0 - 1x USB 3.0 - HDMI Out - Mini PCIe - MIPI CSI - 2x CAN - Audio Out i.Core MX8M Mini is an EDIMM SoM based on NXP i.MX8M Mini from Engicam. i.Core MX8M Mini needs to mount on top of this Evaluation board for creating complete i.Core MX8M Mini EDIMM2.2 Starter Kit. PCIe, DSI, CSI nodes will add it into imx8mm-engicam-edimm2.2.dtsi once Mainline Linux supported. Add support for it. Signed-off-by: Matteo Lisi Signed-off-by: Jagan Teki Signed-off-by: Shawn Guo commit 21480ffda0da794c26a206203c28620ecd5765bb Author: Jagan Teki Date: Fri Feb 26 00:54:02 2021 +0530 arm64: dts: imx8mm: Add Engicam i.Core MX8M Mini C.TOUCH 2.0 Engicam C.TOUCH 2.0 is an EDIMM compliant general purpose Carrier board. Genaral features: - Ethernet 10/100 - Wifi/BT - USB Type A/OTG - Audio Out - CAN - LVDS panel connector i.Core MX8M Mini is an EDIMM SoM based on NXP i.MX8M Mini from Engicam. i.Core MX8M Mini needs to mount on top of this Carrier board for creating complete i.Core MX8M Mini C.TOUCH 2.0 board. Add support for it. Signed-off-by: Matteo Lisi Signed-off-by: Jagan Teki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 60ac35268f85bcebc313f653999564eaa9624793 Author: Jagan Teki Date: Fri Feb 26 00:54:01 2021 +0530 arm64: dts: imx8mm: Add Engicam i.Core MX8M Mini SoM i.Core MX8M Mini is an EDIMM SoM based on NXP i.MX8M Mini from Engicam. General features: - NXP i.MX8M Mini - Up to 2GB LDDR4 - 8/16GB eMMC - Gigabit Ethernet - USB 2.0 Host/OTG - PCIe Gen2 interface - I2S - MIPI DSI to LVDS - rest of i.MX8M Mini features i.Core MX8M Mini needs to mount on top of Engicam baseboards for creating complete platform solutions. Add support for it. Signed-off-by: Matteo Lisi Signed-off-by: Jagan Teki Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 4e43cd636bb121f2087254f3e72bd41db852bced Author: Peng Fan Date: Thu Feb 25 11:10:02 2021 +0800 arm64: dts: imx8qxp: correct usdhc clock-names sequence Per dt-bindings, the clock-names sequence should be ipg ahb per to pass dtbs_check. Signed-off-by: Peng Fan Signed-off-by: Shawn Guo commit 40ba2eda0a7b727fc5cea1a6a097b5608f44695d Author: Adrien Grassein Date: Tue Feb 23 20:16:51 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: add audio Add audio description and pin muxing. Signed-off-by: Adrien Grassein Signed-off-by: Shawn Guo commit 80fa5d604d16a1056014f8ca2649b90596f1c1db Author: Adrien Grassein Date: Tue Feb 23 20:16:50 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: add FlexSPI Add FlexSPI description an pin muxing. Signed-off-by: Adrien Grassein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit b399c13f0b4af8dbec756bccc52afa7d2a69a3e6 Author: Adrien Grassein Date: Tue Feb 23 20:16:49 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: add PWMs Add description for the four PWMs. Signed-off-by: Adrien Grassein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 2b6e7da251e3ae412d2ef6877a0e4c8f060225f0 Author: Adrien Grassein Date: Tue Feb 23 20:16:48 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: rework UART 2 Remove useless clocks in UART 2 Signed-off-by: Adrien Grassein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 88a151795ef310cfe79cccf9b7058fe40f58d5d2 Author: Adrien Grassein Date: Tue Feb 23 20:16:47 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: add UARTs Add description and pin muxing for UARTs. Signed-off-by: Adrien Grassein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 421f715c7316cdba9f4ffe24a468b1fbd00b1273 Author: Adrien Grassein Date: Tue Feb 23 20:16:46 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: add USB support Add description of USB. usbotg2 seems to not working on all boards (including ones from variscite). Signed-off-by: Adrien Grassein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit f37cd7560d3b6a1bb99ef5a1bce7125ca919f07c Author: Adrien Grassein Date: Tue Feb 23 20:16:45 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: rework USDHC1 Add VMMC and VQMMC description for USDHC1 (eMMC). There are comming directly from the alimentation stage, so add the vref_3V3 fixed regulator. Signed-off-by: Adrien Grassein Signed-off-by: Shawn Guo commit 94b736d7284365de1a82b3e8b206e2d339d2341f Author: Adrien Grassein Date: Tue Feb 23 20:16:44 2021 +0100 arm64: dts: imx8mm-nitrogen-r2: add wifi/bt chip Add usdhc3 description which corresponds to the wifi/bt chip Signed-off-by: Adrien Grassein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit d779f4c92ac3446720905b4095f4de7aa9712800 Author: Guido Günther Date: Sun Feb 21 12:07:11 2021 +0100 arm64: dts: librem5-devkit: Move headphone detection to sound card This allows for automatic output source switching in userspace. Enable the pullup on the GPIO to actually make it trigger and mark it as active-high since detection is reversed otherwise. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo commit 15094482fc595346a3ba0e66fd59bb80d1e56c6c Author: Guido Günther Date: Sun Feb 21 12:07:10 2021 +0100 arm64: dts: librem5-devkit: Add mux for built-in vs headset mic Add mux so we can select either headset or built-in microphone input. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo commit 39a346d923e2d93342d2037b410d8ba9c44e3c2d Author: Guido Günther Date: Sun Feb 21 12:07:08 2021 +0100 arm64: dts: librem5-devkit: "Drop Line In Jack" The SGTL500s LINEINL and LINEINR are N/C. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo commit 6f46f7ff8037d06ab7857d1f096e035d682d955c Author: Guido Günther Date: Sun Feb 21 12:07:07 2021 +0100 arm64: dts: librem5-devkit: Add speaker amplifier Wire up the amplifier that drives the builtin speaker. Signed-off-by: Guido Günther Signed-off-by: Shawn Guo commit 5b65f39ddcc19d9355b8e1101138bb71ef004330 Author: Guido Günther Date: Sun Feb 21 12:07:06 2021 +0100 arm64: dts: librem5-devkit: Use a less generic codec name The codec is currently named after the chip but it should be named like the device itself since otherwise it's impossible to distinguish it from other devices using the same codec (e.g. in alsa's UCM). Signed-off-by: Guido Günther Signed-off-by: Shawn Guo commit 1cec010bbb74d49a866efb572ed5a2852d9beab2 Author: Martin Kepplinger Date: Fri Feb 19 11:04:39 2021 +0100 arm64: dts: imx8mq-librem5-r2: set nearlevel to 120 On Birch I can never reach 220 and hence the display would never turn off. Tests suggest 120 to be a good threshold value for all Birch devices. Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 3a0eac4a8c46c15e792493599bd657f966a0c83a Author: Angus Ainslie Date: Fri Feb 19 11:04:38 2021 +0100 arm64: dts: librem5: protect some partitions of the nor-flash These sections should be read only as they contain important data. Signed-off-by: Angus Ainslie Signed-off-by: Martin Kepplinger Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit e7fb3a7479437a46e3e832a353c3a06650b4c0a6 Author: Guido Günther Date: Fri Feb 19 11:04:36 2021 +0100 arm64: dts: librem5: Drop assigned-clocks from SAI2 IMX8MQ_AUDIO_PLL1 and IMX8MQ_AUDIO_PLL2 are setup to the same rates right on the clock controller. Signed-off-by: Guido Günther Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 28034d1b5158d7e1584d1d279053cd495f8de0c7 Author: Guido Günther Date: Fri Feb 19 11:04:35 2021 +0100 arm64: dts: imx8mq-librem5-devkit: Drop buck3 startup-ramp-delay The PMIC driver now sets appropriate default delays. Signed-off-by: Guido Günther Signed-off-by: Martin Kepplinger Signed-off-by: Shawn Guo commit 54c327393a1f5339a3d63cf4268a5390b62b13b4 Author: Adam Ford Date: Sun Feb 14 14:17:42 2021 -0600 arm64: dts: imx8mn-beacon: Enable SDR104 on WiFi SDIO interface Enable 100Mhz and 200MHz pinmux and corrsesponding voltage supplies to enable SDR104 on usdhc1 connecting the WiFi chip. Signed-off-by: Adam Ford Signed-off-by: Shawn Guo commit dfee46f17b4a5e84a8a0a4eb77b083370105862e Author: Michael Walle Date: Tue Feb 9 01:52:59 2021 +0100 arm64: dts: ls1028a: add interrupt to Root Complex Event Collector The legacy interrupt INT_A is hardwired to the event collector. RCEC is bascially supported starting with v5.11. Having a correct interrupt, will make RCEC at least probe correctly. There are still issues with how RCEC is implemented in the RCiEP on the LS1028A. RCEC will report an error, but it cannot find the correct subdevice. Signed-off-by: Michael Walle Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean Signed-off-by: Shawn Guo commit dbd3120cf0f7f8b485ad3ecaf7f55b67611f118a Author: Fabio Estevam Date: Mon Feb 8 11:33:27 2021 -0300 arm64: dts: imx8mm-nitrogen-r2: Pass the i2c3 unit name Pass the i2c3 unit name to fix the following W=1 build warning: arch/arm64/boot/dts/freescale/imx8mm-nitrogen-r2.dts:159.8-172.5: Warning (unit_address_vs_reg): /soc@0/bus@30800000/i2c@30a40000/i2cmux@70/i2c3: node has a reg or ranges property, but no unit name Signed-off-by: Fabio Estevam Signed-off-by: Shawn Guo commit c2b652e3811175d44ca63641629b45f045cb99c5 Author: Serge Semin Date: Mon Feb 8 16:51:45 2021 +0300 ARM: dts: ls1021a: Harmonize DWC USB3 DT nodes name In accordance with the DWC USB3 bindings the corresponding node name is suppose to comply with the Generic USB HCD DT schema, which requires the USB nodes to have the name acceptable by the regexp: "^usb(@.*)?" . Make sure the "snps,dwc3"-compatible nodes are correctly named. Signed-off-by: Serge Semin Acked-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit efd9d2419cfc16d1a8fc2a7f0e7ae79bd69faa09 Author: Dima Azarkin Date: Sun Jan 31 18:54:46 2021 +0300 ARM: dts: imx6qdl-wandboard: add scl/sda gpios definitions for i2c bus recovery The i2c bus on imx6qdl-wandboard has intermittent issues where SDA can freeze on low level at the end of transaction so the bus can no longer work. This impacts reading of EDID data leading to incorrect TV resolution and no audio. This scenario is improved by adding scl/sda gpios definitions to implement the i2c bus recovery mechanism. Signed-off-by: Dima Azarkin Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 36034ae5bbccdb855951e75fd2b32676ad864313 Author: Sebastian Reichel Date: Wed Jan 27 18:40:23 2021 +0100 ARM: dts: imx: Mark IIM as syscon on i.MX51/i.MX53 IIM contains system fuses with information like SoC unique ID (serial) on i.MX51 and i.MX53. Add "syscon" compatible allowing simple access. Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit 7c040ba9e71b3f5c1977eac71b0aeed16be387e6 Author: Andreas Kemnade Date: Mon Jan 25 20:08:04 2021 +0100 ARM: dts: imx6sl-tolino-shine2hd: Add Netronix embedded controller For now, the driver detects an incompatible version, but since that can be handled by auto-detection, add the controller to the devicetree now. Only PWM seems to be available, there is no RTC in that controller. Signed-off-by: Andreas Kemnade Reviewed-by: Jonathan Neuschäfer Signed-off-by: Shawn Guo commit ad28c3bd7e27d09b179267f549245911199a8373 Author: Jonathan Neuschäfer Date: Sun Jan 24 22:41:27 2021 +0100 ARM: dts: imx50-kobo-aura: Add Netronix embedded controller Enable the Netronix EC on the Kobo Aura ebook reader. Several features are still missing: - Frontlight/backlight. The vendor kernel drives the frontlight LED using the PWM output of the EC and an additional boost pin that increases the brightness. - Battery monitoring - Interrupts for RTC alarm and low-battery events Signed-off-by: Jonathan Neuschäfer Signed-off-by: Shawn Guo commit 51b786203e56d87006762cd35bd5e1483937fbee Author: Dong Aisheng Date: Fri Mar 5 21:17:32 2021 +0800 dt-bindings: mailbox: mu: add imx8qm support Add imx8qm support Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit a6fcc75e39f12ac63051a29d9fec50aa349e6dc6 Author: Dong Aisheng Date: Fri Mar 5 21:17:30 2021 +0800 dt-bindings: arm: fsl: add imx8qm boards compatible string Add imx8qm boards compatible string Cc: devicetree@vger.kernel.org Acked-by: Rob Herring Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit b77af8ae105d71f3cf413906fa721775d7d99070 Author: Heiko Thiery Date: Wed Mar 3 22:10:03 2021 +0100 dt-bindings: arm: fsl: add Kontron pITX-imx8m board Add the Kontron pITX-imx8m board. Signed-off-by: Heiko Thiery Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit 6d148838295eadd3b7009ad5a036d1ea1250795b Author: Jagan Teki Date: Fri Feb 26 00:54:03 2021 +0530 dt-bindings: arm: fsl: Add Engicam i.Core MX8M Mini EDIMM2.2 Starter Kit i.Core MX8M Mini is an EDIMM SoM based on NXP i.MX8M Mini from Engicam. EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board from Engicam. i.Core MX8M Mini needs to mount on top of this Evaluation board for creating complete i.Core MX8M Mini EDIMM2.2 Starter Kit. Add bindings for it. Signed-off-by: Jagan Teki Acked-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Signed-off-by: Shawn Guo commit 97ecda7f87b831e449d5f4240a53a53b149cfa85 Author: Jagan Teki Date: Fri Feb 26 00:54:00 2021 +0530 dt-bindings: arm: fsl: Add Engicam i.Core MX8M Mini C.TOUCH 2.0 i.Core MX8M Mini is an EDIMM SoM based on NXP i.MX8M Mini from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. i.Core MX8M Mini needs to mount on top of this Carrier board for creating complete i.Core MX8M Mini C.TOUCH 2.0 board. Add bindings for it. Signed-off-by: Jagan Teki Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Shawn Guo commit eccfc840dc2a6d71da5007edb715a8e29cc2e28d Author: Peng Fan Date: Thu Feb 25 11:10:01 2021 +0800 dt-bindings: clock: imx8qxp-lpcg: correct the example clock-names Align with all other i.MX using the mmc controller, align the clock-names. Signed-off-by: Peng Fan Acked-by: Rob Herring Signed-off-by: Shawn Guo commit f21a468832f43fdc896e29d1ed8488ba45eeb630 Author: Nobuhiro Iwamatsu Date: Mon Mar 1 17:39:37 2021 +0900 ARM: imx: Kconfig: Fix typo in help Fix typo from i.MX31 to i.MX35 in i.MX35's help. Signed-off-by: Nobuhiro Iwamatsu Reviewed-by: Fabio Estevam Signed-off-by: Shawn Guo commit 4ae20f26a157febe8c87bde5433be86bdc793a62 Author: Bhaskar Chowdhury Date: Fri Feb 5 14:08:31 2021 +0530 ARM: mach-imx: Fix a spelling in the file pm-imx5.c s/confgiured/configured/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Shawn Guo commit 893cfb99734f903cfbfca2d1beb4f3d4d8171932 Author: Dong Aisheng Date: Fri Mar 5 21:17:48 2021 +0800 firmware: imx: scu-pd: do not power off console domain Do not power off console domain in runtime pm. Signed-off-by: Dong Aisheng Signed-off-by: Shawn Guo commit 1168935b962b240aeaec844855549c2e818fd965 Author: Sebastian Reichel Date: Wed Jan 27 18:40:24 2021 +0100 soc: imx: add i.MX51/i.MX53 unique id support i.MX51 and i.MX53 SoCs have a 64-bit SoC unique ID stored in IIM, which can be used as SoC serial number. The same feature is already implemented for i.MX6/i.MX7, so this complements support to earlier SoCs. Signed-off-by: Sebastian Reichel Signed-off-by: Shawn Guo commit 3d5cfbb69508db7d092475be01c66edc86066717 Author: Yangtao Li Date: Sun Mar 14 19:33:57 2021 +0300 opp: Add devres wrapper for dev_pm_opp_of_add_table Add devres wrapper for dev_pm_opp_of_add_table() to simplify drivers code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 9c4f220f3dc260e325c92e8588ade2affcb6528c Author: Yangtao Li Date: Sun Mar 14 19:33:56 2021 +0300 opp: Add devres wrapper for dev_pm_opp_set_supported_hw Add devres wrapper for dev_pm_opp_set_supported_hw() to simplify drivers code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 32aee78bc5184c7a51a081939721e97cfad4a44e Author: Yangtao Li Date: Sun Mar 14 19:33:55 2021 +0300 opp: Add devres wrapper for dev_pm_opp_set_regulators Add devres wrapper for dev_pm_opp_set_regulators() to simplify drivers code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit a74f681c3710b47a093d910ca7c6666b3d1e3a2c Author: Yangtao Li Date: Sun Mar 14 19:33:54 2021 +0300 opp: Add devres wrapper for dev_pm_opp_set_clkname Add devres wrapper for dev_pm_opp_set_clkname() to simplify drivers code. Signed-off-by: Yangtao Li Signed-off-by: Dmitry Osipenko Signed-off-by: Viresh Kumar commit 87602aeb8ad5bb1b2e23285a9d1322ac033f86c9 Author: Daniel Lezcano Date: Sun Mar 14 12:13:33 2021 +0100 thermal/drivers/cpufreq_cooling: Remove unused list There is a list with the purpose of grouping the cpufreq cooling device together as described in the comments but actually it is unused, the code evolved since 2012 and the list was no longer needed. Delete the remaining unused list related code. Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20210314111333.16551-5-daniel.lezcano@linaro.org commit 6fd1b186d900acf4cef9d3c23ec2839022a46345 Author: Daniel Lezcano Date: Sun Mar 14 12:13:32 2021 +0100 thermal/drivers/cpuidle_cooling: Use device name instead of auto-numbering Currently the naming of a cooling device is just a cooling technique followed by a number. When there are multiple cooling devices using the same technique, it is impossible to clearly identify the related device as this one is just a number. For instance: thermal-idle-0 thermal-idle-1 thermal-idle-2 thermal-idle-3 etc ... The 'thermal' prefix is redundant with the subsystem namespace. This patch removes the 'thermal prefix and changes the number by the device name. So the naming above becomes: idle-cpu0 idle-cpu1 idle-cpu2 idle-cpu3 etc ... Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Acked-by: Viresh Kumar Link: https://lore.kernel.org/r/20210314111333.16551-4-daniel.lezcano@linaro.org commit f8d354e821b268c23a6cd548b7154e55c3954496 Author: Daniel Lezcano Date: Sun Mar 14 12:13:31 2021 +0100 thermal/drivers/devfreq_cooling: Use device name instead of auto-numbering Currently the naming of a cooling device is just a cooling technique followed by a number. When there are multiple cooling devices using the same technique, it is impossible to clearly identify the related device as this one is just a number. For instance: thermal-devfreq-0 thermal-devfreq-1 etc ... The 'thermal' prefix is redundant with the subsystem namespace. This patch removes the 'thermal' prefix and changes the number by the device name. So the naming above becomes: devfreq-5000000.gpu devfreq-1d84000.ufshc etc ... Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20210314111333.16551-3-daniel.lezcano@linaro.org commit ef37d1f9acb57b7a5993e93ae582ba5f4108919e Author: Daniel Lezcano Date: Sun Mar 14 12:13:30 2021 +0100 thermal/drivers/cpufreq_cooling: Use device name instead of auto-numbering Currently the naming of a cooling device is just a cooling technique followed by a number. When there are multiple cooling devices using the same technique, it is impossible to clearly identify the related device as this one is just a number. For instance: thermal-cpufreq-0 thermal-cpufreq-1 etc ... The 'thermal' prefix is redundant with the subsystem namespace. This patch removes the 'thermal' prefix and changes the number by the device name. So the naming above becomes: cpufreq-cpu0 cpufreq-cpu4 etc ... Signed-off-by: Daniel Lezcano Acked-by: Viresh Kumar Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20210314111333.16551-2-daniel.lezcano@linaro.org commit 58483761810087e5ffdf36e84ac1bf26df909097 Author: Daniel Lezcano Date: Sun Mar 14 12:13:29 2021 +0100 thermal/drivers/core: Use a char pointer for the cooling device name We want to have any kind of name for the cooling devices as we do no longer want to rely on auto-numbering. Let's replace the cooling device's fixed array by a char pointer to be allocated dynamically when registering the cooling device, so we don't limit the length of the name. Rework the error path at the same time as we have to rollback the allocations in case of error. Tested with a dummy device having the name: "Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch" A village on the island of Anglesey (Wales), known to have the longest name in Europe. Signed-off-by: Daniel Lezcano Reviewed-by: Lukasz Luba Tested-by: Ido Schimmel Link: https://lore.kernel.org/r/20210314111333.16551-1-daniel.lezcano@linaro.org commit c3a6d6a1dfc8a9bf12d79a0b1a30cb24c92a2ddf Author: Matthias Schiffer Date: Wed Mar 3 10:54:20 2021 +0100 power: supply: bq27xxx: make status more robust There are multiple issues in bq27xxx_battery_status(): - On BQ28Q610 is was observed that the "full" flag may be set even while the battery is charging or discharging. With the current logic to make "full" override everything else, it look a very long time (>20min) for the status to change from "full" to "discharging" after unplugging the supply on a device with low power consumption - The POWER_SUPPLY_STATUS_NOT_CHARGING check depends on power_supply_am_i_supplied(), which will not work when the supply doesn't exist as a separate device known to Linux We can solve both issues by deriving the status from the current instead of the flags field. The flags are now only used to distinguish "full" from "not charging", and to determine the sign of the current on BQ27XXX_O_ZERO devices. Signed-off-by: Matthias Schiffer Signed-off-by: Sebastian Reichel commit c4d57c22ac65bd503716062a06fad55a01569cac Author: Matthias Schiffer Date: Wed Mar 3 10:54:19 2021 +0100 power: supply: bq27xxx: fix power_avg for newer ICs On all newer bq27xxx ICs, the AveragePower register contains a signed value; in addition to handling the raw value as unsigned, the driver code also didn't convert it to µW as expected. At least for the BQ28Z610, the reference manual incorrectly states that the value is in units of 1mW and not 10mW. I have no way of knowing whether the manuals of other supported ICs contain the same error, or if there are models that actually use 1mW. At least, the new code shouldn't be *less* correct than the old version for any device. power_avg is removed from the cache structure, se we don't have to extend it to store both a signed value and an error code. Always getting an up-to-date value may be desirable anyways, as it avoids inconsistent current and power readings when switching between charging and discharging. Signed-off-by: Matthias Schiffer Signed-off-by: Sebastian Reichel commit b67fdcb7099e9c640bad625c4dd6399debb3376a Author: Matthias Schiffer Date: Wed Mar 3 10:54:18 2021 +0100 power: supply: bq27xxx: fix sign of current_now for newer ICs Commit cd060b4d0868 ("power: supply: bq27xxx: fix polarity of current_now") changed the sign of current_now for all bq27xxx variants, but on BQ28Z610 I'm now seeing negated values *with* that patch. The GTA04/Openmoko device that was used for testing uses a BQ27000 or BQ27010 IC, so I assume only the BQ27XXX_O_ZERO code path was incorrect. Revert the behaviour for newer ICs. Fixes: cd060b4d0868 "power: supply: bq27xxx: fix polarity of current_now" Signed-off-by: Matthias Schiffer Signed-off-by: Sebastian Reichel commit 17e499a7d6b52ff3be565a2f6184883dd1fdd9af Author: Dinghao Liu Date: Wed Mar 3 20:12:36 2021 +0800 power: supply: axp20x_usb_power: Add missing check in axp20x_usb_power_probe There are two regmap_update_bits() calls but only one of them has return value check, which is odd. Add a return value check and terminate the execution flow on failure just like the other call. Signed-off-by: Dinghao Liu Signed-off-by: Sebastian Reichel commit 32826341058bf8d63456289a8bf48648ad17c897 Author: Linus Walleij Date: Fri Mar 5 11:01:08 2021 +0100 power: supply: z2_battery: Drop unused variable The kernel test robot reports an unused variable in the Z2 battery code caused by a recent commit. Fixes: a3b4388ea19b ("power: supply: z2_battery: Convert to GPIO descriptors") Reported-by: kernel test robot Signed-off-by: Linus Walleij Signed-off-by: Sebastian Reichel commit 2117fce81f6b862aac0673abe8df0c60dca64bfa Merge: c6baf7eeb0cf8 bb24d592e66eb Author: David S. Miller Date: Sun Mar 14 15:00:44 2021 -0700 Merge branch 'psample-Add-additional-metadata-attributes' Ido Schimmel says: ==================== psample: Add additional metadata attributes This series extends the psample module to expose additional metadata to user space for packets sampled via act_sample. The new metadata (e.g., transit delay) can then be consumed by applications such as hsflowd [1] for better network observability. netdevsim is extended with a dummy psample implementation that periodically reports "sampled" packets to the psample module. In addition to testing of the psample module, it enables the development and demonstration of user space applications (e.g., hsflowd) that are interested in the new metadata even without access to specialized hardware (e.g., Spectrum ASIC) that can provide it. mlxsw is also extended to provide the new metadata to psample. A Wireshark dissector for psample netlink packets [2] will be submitted upstream after the kernel patches are accepted. In addition, a libpcap capture module for psample is currently in the works. Eventually, users should be able to run: # tshark -i psample In order to consume sampled packets along with their metadata. Series overview: Patch #1 makes it easier to extend the metadata provided to psample Patch #2 adds the new metadata attributes to psample Patch #3 extends netdevsim to periodically report "sampled" packets to psample. Various debugfs knobs are added to control the reporting Patch #4 adds a selftest over netdevsim Patches #5-#10 gradually add support for the new metadata in mlxsw Patch #11 adds a selftest over mlxsw [1] https://sflow.org/draft4_sflow_transit.txt [2] https://gitlab.com/amitcohen1/wireshark/-/commit/3d711143024e032aef1b056dd23f0266c54fab56 ==================== Signed-off-by: David S. Miller commit bb24d592e66eb059e086595510e0f0b064e4114d Author: Ido Schimmel Date: Sun Mar 14 14:19:40 2021 +0200 selftests: mlxsw: Add tc sample tests Test that packets are sampled when tc-sample is used and that reported metadata is correct. Two sets of hosts (with and without LAG) are used, since metadata extraction in mlxsw is a bit different when LAG is involved. # ./tc_sample.sh TEST: tc sample rate (forward) [ OK ] TEST: tc sample rate (local receive) [ OK ] TEST: tc sample maximum rate [ OK ] TEST: tc sample group conflict test [ OK ] TEST: tc sample iif [ OK ] TEST: tc sample lag iif [ OK ] TEST: tc sample oif [ OK ] TEST: tc sample lag oif [ OK ] TEST: tc sample out-tc [ OK ] TEST: tc sample out-tc-occ [ OK ] Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2073c600444349b18a80b0b38dc20df92fd74155 Author: Ido Schimmel Date: Sun Mar 14 14:19:39 2021 +0200 mlxsw: spectrum: Report extra metadata to psample module Make use of the previously added metadata and report it to the psample module. The metadata is read from the skb's control block, which was initialized by the bus driver (i.e., 'mlxsw_pci') after decoding the packet's Completion Queue Element (CQE). Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 48990bef1e6880613b142cea4f3962dd51458bd6 Author: Ido Schimmel Date: Sun Mar 14 14:19:38 2021 +0200 mlxsw: spectrum: Remove mlxsw_sp_sample_receive() The function resolves the psample sampling group from the Rx port because this is the only form of sampling the driver currently supports. Subsequent patches are going to add support for Tx-based and policy-based sampling, in which case the sampling group would not be resolved from the Rx port. Therefore, move this code to the Rx-specific sampling listener. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit e1f78ecdfd59d560c42bc04b9bfb746ef8a9dfb1 Author: Ido Schimmel Date: Sun Mar 14 14:19:37 2021 +0200 mlxsw: spectrum: Remove unnecessary RCU read-side critical section Since commit 7d8e8f3433dc ("mlxsw: core: Increase scope of RCU read-side critical section"), all Rx handlers are called from an RCU read-side critical section. Remove the unnecessary rcu_read_lock() / rcu_read_unlock(). Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 5ab6dc9fa2720cbbbdf2686c06a90c9a6c86b6fd Author: Ido Schimmel Date: Sun Mar 14 14:19:36 2021 +0200 mlxsw: pci: Set extra metadata in skb control block Packets that are mirrored / sampled to the CPU have extra metadata encoded in their corresponding Completion Queue Element (CQE). Retrieve this metadata from the CQE and set it in the skb control block so that it could be accessed by the switch driver (i.e., 'mlxsw_spectrum'). Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit d4cabaadeaad96ebaa415b6a7ca00390645a89ec Author: Ido Schimmel Date: Sun Mar 14 14:19:35 2021 +0200 mlxsw: Create dedicated field for Rx metadata in skb control block Next patch will need to encode more Rx metadata in the skb control block, so create a dedicated field for it and move the cookie index there. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit e0eeede3d23337382e328e0fea4f7794e5a959d2 Author: Ido Schimmel Date: Sun Mar 14 14:19:34 2021 +0200 mlxsw: pci: Add more metadata fields to CQEv2 The Completion Queue Element version 2 (CQEv2) includes various metadata fields for packets that are mirrored / sampled to the CPU. Add these fields so that they could be used by a later patch. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit f26b30918dac568425811f71fd21a53ed2307f44 Author: Ido Schimmel Date: Sun Mar 14 14:19:33 2021 +0200 selftests: netdevsim: Test psample functionality Test various aspects of psample functionality over netdevsim and in particular test that the psample module correctly reports the provided metadata. Example: # ./psample.sh TEST: psample enable / disable [ OK ] TEST: psample group number [ OK ] TEST: psample metadata [ OK ] Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit a8700c3dd0a48f379d269ac6ddcf8bd857042771 Author: Ido Schimmel Date: Sun Mar 14 14:19:32 2021 +0200 netdevsim: Add dummy psample implementation Allow netdevsim to report "sampled" packets to the psample module by periodically generating packets from a work queue. The behavior can be enabled / disabled (default) and the various meta data attributes can be controlled via debugfs knobs. This implementation enables both testing of the psample module with all the optional attributes as well as development of user space applications on top of psample such as hsflowd and a Wireshark dissector for psample generic netlink packets. Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 07e1a5809b595df6e125504dff6245cb2c8ed3de Author: Ido Schimmel Date: Sun Mar 14 14:19:31 2021 +0200 psample: Add additional metadata attributes Extend psample to report the following attributes when available: * Output traffic class as a 16-bit value * Output traffic class occupancy in bytes as a 64-bit value * End-to-end latency of the packet in nanoseconds resolution * Software timestamp in nanoseconds resolution (always available) * Packet's protocol. Needed for packet dissection in user space (always available) Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit a03e99d39f1943ec88f6fd3b0b9f34c20663d401 Author: Ido Schimmel Date: Sun Mar 14 14:19:30 2021 +0200 psample: Encapsulate packet metadata in a struct Currently, callers of psample_sample_packet() pass three metadata attributes: Ingress port, egress port and truncated size. Subsequent patches are going to add more attributes (e.g., egress queue occupancy), which also need an indication whether they are valid or not. Encapsulate packet metadata in a struct in order to keep the number of arguments reasonable. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit c6baf7eeb0cf82f6a90a703f6548250fc85cfdcc Merge: 3f79eb3c3a6ab d206121faf8bb Author: David S. Miller Date: Sun Mar 14 14:48:26 2021 -0700 Merge branch 'skbuff-micro-optimize-flow-dissection' Alexander Lobakin says: ==================== skbuff: micro-optimize flow dissection This little number makes all of the flow dissection functions take raw input data pointer as const (1-5) and shuffles the branches in __skb_header_pointer() according to their hit probability. The result is +20 Mbps per flow/core with one Flow Dissector pass per packet. This affects RPS (with software hashing), drivers that use eth_get_headlen() on their Rx path and so on. From v2 [1]: - reword some commit messages as a potential fix for NIPA; - no functional changes. From v1 [0]: - rebase on top of the latest net-next. This was super-weird, but I double-checked that the series applies with no conflicts, and then on Patchwork it didn't; - no other changes. [0] https://lore.kernel.org/netdev/20210312194538.337504-1-alobakin@pm.me [1] https://lore.kernel.org/netdev/20210313113645.5949-1-alobakin@pm.me ==================== Signed-off-by: David S. Miller commit d206121faf8bb2239cd970af0bd32f5203780427 Author: Alexander Lobakin Date: Sun Mar 14 11:11:50 2021 +0000 skbuff: micro-optimize {,__}skb_header_pointer() {,__}skb_header_pointer() helpers exist mainly for preventing accesses-beyond-end of the linear data. In the vast majorify of cases, they bail out on the first condition. All code going after is mostly a fallback. Mark the most common branch as 'likely' one to move it in-line. Also, skb_copy_bits() can return negative values only when the input arguments are invalid, e.g. offset is greater than skb->len. It can be safely marked as 'unlikely' branch, assuming that hotpath code provides sane input to not fail here. These two bump the throughput with a single Flow Dissector pass on every packet (e.g. with RPS or driver that uses eth_get_headlen()) on 20 Mbps per flow/core. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 59753ce8b196de60211a989c75ece8aeb0d9d57c Author: Alexander Lobakin Date: Sun Mar 14 11:11:41 2021 +0000 ethernet: constify eth_get_headlen()'s data argument It's used only for flow dissection, which now takes constant data pointers. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 805a25f3a1bdf4aafd0af412ce1e47d0cb6c7628 Author: Alexander Lobakin Date: Sun Mar 14 11:11:32 2021 +0000 linux/etherdevice.h: misc trailing whitespace cleanup Caught by the text editor. Fix it separately from the actual changes. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit f96533cded173b3b019001a505a746c3cd8fc323 Author: Alexander Lobakin Date: Sun Mar 14 11:11:23 2021 +0000 flow_dissector: constify raw input data argument Flow Dissector code never modifies the input buffer, neither skb nor raw data. Make 'data' argument const for all of the Flow dissector's functions. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit e3305138da47f0ae2241e5daa18af276e1e54457 Author: Alexander Lobakin Date: Sun Mar 14 11:11:14 2021 +0000 skbuff: make __skb_header_pointer()'s data argument const The function never modifies the input buffer, so 'data' argument can be marked as const. This implies one harmless cast-away. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit dac06b32c705dc8824479b03eee826b4f6615ab2 Author: Alexander Lobakin Date: Sun Mar 14 11:11:00 2021 +0000 flow_dissector: constify bpf_flow_dissector's data pointers BPF Flow dissection programs are read-only and don't touch input buffers. Mark 'data' and 'data_end' in struct bpf_flow_dissector as const in preparation for global input constifying. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 3f79eb3c3a6abaa8f9900b5e40994060d7341cbc Merge: f4e6d7cdbfae5 d0eed5c325149 Author: David S. Miller Date: Sun Mar 14 14:41:09 2021 -0700 Merge branch 'gro-micro-optimize-dev_gro_receive' Alexander Lobakin says: ==================== gro: micro-optimize dev_gro_receive() This random series addresses some of suboptimal constructions used in the main GRO entry point. The main body is gro_list_prepare() simplification and pointer usage optimization in dev_gro_receive() itself. Being mostly cosmetic, it gives like +10 Mbps on my setup to both TCP and UDP (both single- and multi-flow). Since v1 [0]: - drop the replacement of bucket index calculation with reciprocal_scale() since it makes absolutely no sense (Eric); - improve stack usage in dev_gro_receive() (Eric); - reverse the order of patches to avoid changes superseding. [0] https://lore.kernel.org/netdev/20210312162127.239795-1-alobakin@pm.me ==================== Signed-off-by: David S. Miller commit d0eed5c325149002c364a1439ae1afe1992beae4 Author: Alexander Lobakin Date: Sat Mar 13 20:30:14 2021 +0000 gro: give 'hash' variable in dev_gro_receive() a less confusing name 'hash' stores not the flow hash, but the index of the GRO bucket corresponding to it. Change its name to 'bucket' to avoid confusion while reading lines like '__set_bit(hash, &napi->gro_bitmask)'. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 9dc2c313378528afe1bddf12cad88dbfe0998820 Author: Alexander Lobakin Date: Sat Mar 13 20:30:10 2021 +0000 gro: consistentify napi->gro_hash[x] access in dev_gro_receive() GRO bucket index doesn't change through the entire function. Store a pointer to the corresponding bucket instead of its member and use it consistently through the function. It is performance-safe since &gro_list->list == gro_list. Misc: remove superfluous braces around single-line branches. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit 0ccf4d50d14f360dfae5b25b8ffcb27f98e591f0 Author: Alexander Lobakin Date: Sat Mar 13 20:30:05 2021 +0000 gro: simplify gro_list_prepare() gro_list_prepare() always returns &napi->gro_hash[bucket].list, without any variations. Moreover, it uses 'napi' argument only to have access to this list, and calculates the bucket index for the second time (firstly it happens at the beginning of dev_gro_receive()) to do that. Given that dev_gro_receive() already has an index to the needed list, just pass it as the first argument to eliminate redundant calculations, and make gro_list_prepare() return void. Also, both arguments of gro_list_prepare() can be constified since this function can only modify the skbs from the bucket list. Signed-off-by: Alexander Lobakin Signed-off-by: David S. Miller commit f4e6d7cdbfae502788bc468295b232dec76ee57e Author: Florian Fainelli Date: Fri Mar 12 13:11:01 2021 -0800 net: dsa: bcm_sf2: Fill in BCM4908 CFP entries The BCM4908 switch has 256 CFP entrie, update that setting so CFP can be used. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit bd49fea7586b9d39a38846e9ef4ac056e4eb6e59 Author: Shachar Raindel Date: Fri Mar 12 15:45:27 2021 -0800 hv_netvsc: Add a comment clarifying batching logic The batching logic in netvsc_send is non-trivial, due to a combination of the Linux API and the underlying hypervisor interface. Add a comment explaining why the code is written this way. Signed-off-by: Shachar Raindel Signed-off-by: Haiyang Zhang Reviewed-by: Dexuan Cui Signed-off-by: David S. Miller commit 0f88e6f35b314500ba4c2f7d62c4598bf2c1229b Merge: 6f16290933993 c8fd4852022ca Author: David S. Miller Date: Sun Mar 14 14:22:38 2021 -0700 Merge branch 'pktgen-scripts-improvements' Igor Russkikh says: ==================== pktgen: scripts improvements Please consider small improvements to pktgen scripts we use in our environment. Adding delay parameter through command line, Adding new -a (append) parameter to make flex runs v3: change us to ns in docs v2: Review comments from Jesper CC: Jesper Dangaard Brouer ==================== Signed-off-by: David S. Miller commit c8fd4852022ca8ae85ac4d30d05950eaf506b828 Author: Igor Russkikh Date: Thu Mar 11 11:32:53 2021 +0100 samples: pktgen: new append mode To configure various complex flows we for sure can create custom pktgen init scripts, but sometimes thats not that easy. New "-a" (append) option in all the existing sample scripts allows to append more "devices" into pktgen threads. The most straightforward usecases for that are: - using multiple devices. We have to generate full linerate on all physical functions (ports) of our multiport device. - pushing multiple flows (with different packet options) Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit ef700f2ea27e54f640c3957374469132e8bf46f5 Author: Igor Russkikh Date: Thu Mar 11 11:32:52 2021 +0100 samples: pktgen: allow to specify delay parameter via new opt DELAY may now be explicitly specified via common parameter -w Signed-off-by: Igor Russkikh Signed-off-by: David S. Miller commit 0ba8b68b5b30ad3cba7ed8b6323ff6a127017ff4 Author: HyeonggonYoo <42.hyeyoo@gmail.com> Date: Sun Mar 14 12:08:58 2021 +0000 Staging: rtl8723bs: fixed a brace coding style Fixed a coding style issue - unnecessary braces for single statement Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Link: https://lore.kernel.org/r/20210314120858.37951-1-42.hyeyoo@gmail.com Signed-off-by: Greg Kroah-Hartman commit ebf4824798184d4a86214d570c04cf390c5edfa8 Author: Edmundo Carmona Antoranz Date: Sun Mar 14 08:59:43 2021 -0600 staging: vt6655: remove duplicate code In the definition of vnt_init_bands(), there are two sections of code that are very similar. Unifying them through a new function that takes care of initialization of a single band. Signed-off-by: Edmundo Carmona Antoranz Link: https://lore.kernel.org/r/20210314145943.1933245-3-eantoranz@gmail.com Signed-off-by: Greg Kroah-Hartman commit c170f1687bcff6ea809725098035a104f13dd6e4 Author: Edmundo Carmona Antoranz Date: Sun Mar 14 08:59:42 2021 -0600 staging: vt6655: correct documentation warnings Both arguments to set_channel have changed their names and their types. Correct the discrepancy in the function documentation to get rid of four warnings: drivers/staging/vt6655/channel.c:165: warning: Function parameter or member 'priv' not described in 'set_channel' drivers/staging/vt6655/channel.c:165: warning: Function parameter or member 'ch' not described in 'set_channel' drivers/staging/vt6655/channel.c:165: warning: Excess function parameter 'pDeviceHandler' description in 'set_channel' drivers/staging/vt6655/channel.c:165: warning: Excess function parameter 'uConnectionChannel' description in 'set_channel' Signed-off-by: Edmundo Carmona Antoranz Link: https://lore.kernel.org/r/20210314145943.1933245-2-eantoranz@gmail.com Signed-off-by: Greg Kroah-Hartman commit 97919a5764f8b9570cb6380c3a887a75479d5cd5 Author: Ivan Safonov Date: Sun Mar 14 12:02:47 2021 +0300 staging:r8188eu: use ieee80211_is_ctl instead IsFrameTypeCtrl IsFrameTypeCtrl() duplicate ieee80211_is_ctl(). Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20210314090247.21181-5-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8aea42ea5f60a10a1e0138cc7f2ee12b853ad41a Author: Ivan Safonov Date: Sun Mar 14 12:02:46 2021 +0300 staging:r8188eu: replace cap_* definitions with native kernel WLAN_CAPABILITY_* cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions, improve code consistency. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20210314090247.21181-4-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit c6df973f69f24a73566eb03850e9cc6de3128086 Author: Ivan Safonov Date: Sun Mar 14 12:02:45 2021 +0300 staging:r8188eu: remove unused definitions from wifi.h These definitions are not used and will not be useful in the future. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20210314090247.21181-3-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 703b830fab82dea9e5cde4de180f4943e1df8fde Author: Ivan Safonov Date: Sun Mar 14 12:02:44 2021 +0300 staging:r8188eu: replace get_(d|s)a with ieee80211_get_(D|S)A get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions. Remove get_(d|s)a, use ieee80211_get_(D|S)A instead. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20210314090247.21181-2-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit dff20ceb9116be0c5ddd9591bce648ecc6281abb Author: Gabriele Modena Date: Sat Mar 13 18:35:32 2021 +0100 staging: wimax: fix quoted string split across lines in op-rfkill.c This commit fixes the following checkpatch.pl warning: WARNING: quoted string split across lines + dev_err(dev, "WIMAX_GNL_RFKILL: can't find RFKILL_STATE " + "attribute\n"); Signed-off-by: Gabriele Modena Link: https://lore.kernel.org/r/590fcf33a97025019e5c3b3a915fec9bbe24aa4c.1615652628.git.gabriele.modena@gmail.com Signed-off-by: Greg Kroah-Hartman commit 23df3c40da780a146767f5ad3d3883e3f77d6fff Author: Gabriele Modena Date: Sat Mar 13 18:35:31 2021 +0100 staging: wimax: add a blank line after declaration in op-rfkill.c This commit fixes the following checkpatch.pl warning: WARNING: Missing a blank line after declarations + struct device *dev = wimax_dev_to_dev(wimax_dev); + d_fnstart(3, dev, "(wimax_dev %p)\n", wimax_dev); Signed-off-by: Gabriele Modena Link: https://lore.kernel.org/r/1ee3795245816a81609749c82c3d369ea0cbf466.1615652628.git.gabriele.modena@gmail.com Signed-off-by: Greg Kroah-Hartman commit 49b47c9e656c94502441c5c1b9827f4812b78918 Author: Gabriele Modena Date: Sat Mar 13 18:35:30 2021 +0100 staging: wimax: fix block comment style check in op-rfkill.c This commit fixes the following checkpatch.pl warning: WARNING: Block comments use a trailing */ on a separate line + * considering the radios are all off. */ Signed-off-by: Gabriele Modena Link: https://lore.kernel.org/r/752f22ec19c8e5bc249589ca4c5edef770396aff.1615652628.git.gabriele.modena@gmail.com Signed-off-by: Greg Kroah-Hartman commit 0102ecac649157fb4738d19cec9d6531ef88a8b1 Author: Fabio Aiuto Date: Fri Mar 12 19:34:06 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_TCP_CSUM_OFFLOAD_RX remove conditional code blocks checked by unused CONFIG_TCP_CSUM_OFFLOAD_RX cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/0975dcb60dfb6abdc6a3233283908bd57472c225.1615572985.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8ac51bf0fab33829a6d14e0d63f8621ed847d783 Author: Fabio Aiuto Date: Fri Mar 12 19:33:26 2021 +0100 staging: rtl8723bs: remove unused code blocks conditioned by never set CONFIG_PNO_SET_DEBUG Remove conditional code block checked by unused CONFIG_PNO_SET_DEBUG Cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/1a2eaead1b848c26892497fe34841b29e5eaeec2.1615572985.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman commit 63d6c98168916f0c18f7bb7a28e27efd95524409 Author: Wang Qing Date: Sat Mar 13 11:33:48 2021 +0800 mips: kernel: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe() debugfs_create_file_unsafe does not protect the fops handed to it against file removal. DEFINE_DEBUGFS_ATTRIBUTE makes the fops aware of the file lifetime and thus protects it against removal. Signed-off-by: Wang Qing Signed-off-by: Thomas Bogendoerfer commit c6972fb9ba8aab384568665411015b7deb8a8609 Author: Huang Pei Date: Sat Mar 13 09:39:27 2021 +0800 MIPS: clean up CONFIG_MIPS_PGD_C0_CONTEXT handling +. LOONGSON64 use 0x98xx_xxxx_xxxx_xxxx as xphys cached, instread of 0xa8xx_xxxx_xxxx_xxxx +. let CONFIG_MIPS_PGD_C0_CONTEXT depend on 64bit +. cast CAC_BASE into u64 to silence warning on MIPS32 CP0 Context has enough room for wraping pgd into its 41-bit PTEBase field. +. For XPHYS, the trick is that pgd is 4kB aligned, and the PABITS <= 53, only save 53 - 12 = 41 bits, aka : bit[63:59] | 0000 00 | bit[53:12] | 0000 0000 0000 +. for CKSEG0, only save 29 - 12 = 17 bits when switching pgd, only need to save bit[53:12] or bit[28:12] into CP0 Context's bit[63:23], see folling asm generated at run time tlbmiss_handler_setup_pgd: .set push .set noreorder dsra a2, a0, 29 move a3, a0 dins a0, zero, 29, 35 daddiu a2, a2, 4 //for CKSEG0, a2 from 0xfffffffffffffffc //into 0 movn a0, a3, a2 dsll a0, a0, 11 jr ra dmtc0 a0, CP0_CONTEXT .set pop when using it on page walking dmfc0 k0, CP0_CONTEXT dins k0, zero, 0, 23 // zero badv2 ori k0, k0, (CAC_BASE >> 53) // *prefix* with bit[63:59] drotr k0, k0, 11 // kick it in the right place Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit 6f1629093399303bf19d6fcd5144061d1e25ec23 Author: Jakub Kicinski Date: Fri Mar 12 16:30:26 2021 -0800 docs: net: add missing devlink health cmd - trigger Documentation is missing and it's not very clear what this callback is for - presumably testing the recovery? Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit 3cc9b29ac0e1739091ccfe9ada2ffdd230312f2e Author: Jakub Kicinski Date: Fri Mar 12 16:30:25 2021 -0800 docs: net: tweak devlink health documentation Minor tweaks and improvement of wording about the diagnose callback. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller commit e127906b68b49ddb3ecba39ffa36a329c48197d3 Author: Jonathan McDowell Date: Sat Mar 13 13:18:26 2021 +0000 net: stmmac: Set FIFO sizes for ipq806x Commit eaf4fac47807 ("net: stmmac: Do not accept invalid MTU values") started using the TX FIFO size to verify what counts as a valid MTU request for the stmmac driver. This is unset for the ipq806x variant. Looking at older patches for this it seems the RX + TXs buffers can be up to 8k, so set appropriately. (I sent this as an RFC patch in June last year, but received no replies. I've been running with this on my hardware (a MikroTik RB3011) since then with larger MTUs to support both the internal qca8k switch and VLANs with no problems. Without the patch it's impossible to set the larger MTU required to support this.) Signed-off-by: Jonathan McDowell Signed-off-by: David S. Miller commit 6fadbdd6dd3260120bde3f2e471125d4fbce168c Author: Sanjana Srinidhi Date: Sat Mar 13 14:06:49 2021 +0530 drivers: net: vxlan.c: Fix declaration issue Added a blank line after structure declaration. This is done to maintain code uniformity. Signed-off-by: Sanjana Srinidhi Signed-off-by: David S. Miller commit 65c7bc1b7a66f2cb0bafcefd9e15e1de44ac7ea7 Author: Bhaskar Chowdhury Date: Sat Mar 13 11:15:36 2021 +0530 net: ethernet: marvell: Fixed typo in the file sky2.c s/calclation/calculation/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit b8eccf2a0dc98f400dd48b6538c8f000544b96d8 Merge: ebc71a3804350 292cd449fee3a Author: David S. Miller Date: Sat Mar 13 14:30:48 2021 -0800 Merge branch 'dsa-hewllcreek-dumps' Kurt Kanzenbach says: ==================== net: dsa: hellcreek: Add support for dumping tables add support for dumping the VLAN and FDB table via devlink. As the driver uses internal VLANs and static FDB entries, this is a useful debugging feature. Changes since v1: * Drop memory reporting as there are better APIs to expose this * Move comment to VLAN patch Previous versions: * https://lkml.kernel.org/netdev/20210311175344.3084-1-kurt@kmk-computers.de/ ==================== Signed-off-by: David S. Miller commit 292cd449fee3a67541fab2626efb8af6a72b4c69 Author: Kurt Kanzenbach Date: Sat Mar 13 10:39:39 2021 +0100 net: dsa: hellcreek: Add devlink FDB region Allow to dump the FDB table via devlink. This is a useful debugging feature. Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit eb5f3d3141805fd22b2fb49a23536cc3f30dd752 Author: Kurt Kanzenbach Date: Sat Mar 13 10:39:38 2021 +0100 net: dsa: hellcreek: Move common code to helper There are two functions which need to populate fdb entries. Move that to a helper function. Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit e81813fb56350641d8d3ba6bb6811ecaab934f10 Author: Kurt Kanzenbach Date: Sat Mar 13 10:39:37 2021 +0100 net: dsa: hellcreek: Use boolean value hellcreek_select_vlan() takes a boolean instead of an integer. So, use false accordingly. Signed-off-by: Kurt Kanzenbach Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit ba2d1c28886ceacd7da96466529f7929eaf3a498 Author: Kurt Kanzenbach Date: Sat Mar 13 10:39:36 2021 +0100 net: dsa: hellcreek: Add devlink VLAN region Allow to dump the VLAN table via devlink. This especially useful, because the driver internally leverages VLANs for the port separation. These are not visible via the bridge utility. Signed-off-by: Kurt Kanzenbach Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit ebc71a3804350b3ed8d730e3d68515e2e183fd99 Merge: 361f7e4a7501a b1de0f01b0115 Author: David S. Miller Date: Sat Mar 13 14:27:56 2021 -0800 Merge tag 'batadv-next-pullrequest-20210312' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== There is only a single patch this time: - Use netif_rx_any_context(), by Sebastian Andrzej Siewior ==================== Signed-off-by: David S. Miller commit 361f7e4a7501aad686128e8b1d18783667a4617a Merge: 4849d9beb8c9d 2ffe0395288aa Author: David S. Miller Date: Sat Mar 13 14:18:10 2021 -0800 Merge branch 'pps-policing' Simon Horman says: ==================== net/sched: act_police: add support for packet-per-second policing This series enhances the TC policer action implementation to allow a policer action instance to enforce a rate-limit based on packets-per-second, configurable using a packet-per-second rate and burst parameters. In the hope of aiding review this is broken up into three patches. * [PATCH 1/3] flow_offload: add support for packet-per-second policing Add support for this feature to the flow_offload API that is used to allow programming flows, including TC rules and their actions, into hardware. * [PATCH 2/3] flow_offload: reject configuration of packet-per-second policing in offload drivers Teach all exiting users of the flow_offload API that allow offload of policer action instances to reject offload if packet-per-second rate limiting is configured: none support it at this time * [PATCH 3/3] net/sched: act_police: add support for packet-per-second policing With the above ground-work in place add the new feature to the TC policer action itself With the above in place the feature may be used. As follow-ups we plan to provide: * Corresponding updates to iproute2 * Corresponding self tests (which depend on the iproute2 changes) * Hardware offload support for the NFP driver Key changes since v2: * Added patches 1 and 2, which makes adding patch 3 safe for existing hardware offload of the policer action * Re-worked patch 3 so that a TC policer action instance may be configured for packet-per-second or byte-per-second rate limiting, but not both. * Corrected kdoc usage ==================== Signed-off-by: David S. Miller commit 2ffe0395288aa237ff7e0143366bd1cd57bfc5b7 Author: Baowen Zheng Date: Fri Mar 12 15:08:31 2021 +0100 net/sched: act_police: add support for packet-per-second policing Allow a policer action to enforce a rate-limit based on packets-per-second, configurable using a packet-per-second rate and burst parameters. e.g. tc filter add dev tap1 parent ffff: u32 match \ u32 0 0 police pkts_rate 3000 pkts_burst 1000 Testing was unable to uncover a performance impact of this change on existing features. Signed-off-by: Baowen Zheng Signed-off-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 6a56e19902af01da447cd3104d5a6e8d01792ee1 Author: Baowen Zheng Date: Fri Mar 12 15:08:30 2021 +0100 flow_offload: reject configuration of packet-per-second policing in offload drivers A follow-up patch will allow users to configures packet-per-second policing in the software datapath. In preparation for this, teach all drivers that support offload of the policer action to reject such configuration as currently none of them support it. Signed-off-by: Baowen Zheng Signed-off-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 25660156f4cc4cf0cb55deda69f999dab554b750 Author: Xingfeng Hu Date: Fri Mar 12 15:08:29 2021 +0100 flow_offload: add support for packet-per-second policing Allow flow_offload API to configure packet-per-second policing using rate and burst parameters. Dummy implementations of tcf_police_rate_pkt_ps() and tcf_police_burst_pkt() are supplied which return 0, the unconfigured state. This is to facilitate splitting the offload, driver, and TC code portion of this feature into separate patches with the aim of providing a logical flow for review. And the implementation of these helpers will be filled out by a follow-up patch. Signed-off-by: Xingfeng Hu Signed-off-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: David S. Miller commit 4849d9beb8c9dc2cc6ebd5d6f1eead944e1a52cf Merge: 5ab6f96a12f4f b47cfe1f402db Author: David S. Miller Date: Sat Mar 13 14:11:29 2021 -0800 Merge branch 'hns3-imp-phys' Huazhong Tan says: ==================== net: hns3: support imp-controlled PHYs This series adds support for imp-controlled PHYs in the HNS3 ethernet driver. ==================== Signed-off-by: David S. Miller commit b47cfe1f402dbf10279b8f12131388fdff9d2259 Author: Guangbin Huang Date: Fri Mar 12 16:50:16 2021 +0800 net: hns3: add phy loopback support for imp-controlled PHYs If the imp-controlled PHYs feature is enabled, driver can not call phy driver interface to set loopback anymore and needs to send command to firmware to start phy loopback. Driver reuses the existing firmware command 0x0315 to start phy loopback, just add a setting bit in this command. As this command is not only for serdes loopback anymore, rename this command to "xxx_COMMON_LOOPBACK", and modify function name, macro name and logs related to it. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 024712f51e5711d69ced729fb3398819ed6e8b53 Author: Guangbin Huang Date: Fri Mar 12 16:50:15 2021 +0800 net: hns3: add ioctl support for imp-controlled PHYs When the imp-controlled PHYs feature is enabled, driver will not register mdio bus. In order to support ioctl ops for phy tool to read or write phy register in this case, the firmware implement a new command for driver and driver implement ioctl by using this new command. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 57a8f46b1bd3f5f43b06f48aab7c1f7ca0936be3 Author: Guangbin Huang Date: Fri Mar 12 16:50:14 2021 +0800 net: hns3: add get/set pause parameters support for imp-controlled PHYs When the imp-controlled PHYs feature is enabled, phydev is NULL. In this case, the autoneg is always off when user uses ethtool -a command to get pause parameters because hclge_get_pauseparam() uses phydev to check whether device is TP port. To fit this new feature, use media type to check whether device is TP port. And when user set pause parameters, these parameters need to always set to mac, no matter whether autoneg is off. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit f5f2b3e4dcc0e944dc33b522df84576679fbd8eb Author: Guangbin Huang Date: Fri Mar 12 16:50:13 2021 +0800 net: hns3: add support for imp-controlled PHYs IMP(Intelligent Management Processor) firmware add a new feature to take control of PHYs for some new devices, PF driver adds support for this feature. Driver queries device's capability to check whether IMP supports this feature, it will tell IMP to enable this feature by firmware compatible command if it is supported. Signed-off-by: Guangbin Huang Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 7996dfd6ed2899e5ea838a31577e49b88ed150f5 Author: Bhaskar Chowdhury Date: Sat Mar 13 11:02:22 2021 +0530 clk: at91: Trivial typo fixes in the file sama7g5.c s/critial/critical/ ......two different places s/parrent/parent/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210313053222.14706-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Stephen Boyd commit 35a796315c493f601450f309b1ccfae0a38f3a5e Author: Rasmus Villemoes Date: Fri Mar 5 01:33:34 2021 +0100 clk: use clk_core_enable_lock() a bit more Use clk_core_enable_lock() and clk_core_disable_lock() in a few places rather than open-coding them. Signed-off-by: Rasmus Villemoes Link: https://lore.kernel.org/r/20210305003334.575831-1-linux@rasmusvillemoes.dk Signed-off-by: Stephen Boyd commit 5ccb9f9cf05bbd729430c6d6d30d40c96a15c56a Author: Rafał Miłecki Date: Fri Mar 12 12:01:20 2021 +0100 arm64: dts: broadcom: bcm4908: set Asus GT-AC5300 port 7 PHY mode Port 7 is connected to the external BCM53134S switch using RGMII. Fixes: 527a3ac9bdf8 ("arm64: dts: broadcom: bcm4908: describe internal switch") Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 6a30934a5470a0ce7ea32b0c6b600accfae94b1a Author: Rafał Miłecki Date: Wed Mar 10 08:46:03 2021 +0100 arm64: dts: broadcom: bcm4908: add TP-Link Archer C2300 V1 Archer C2300 V1 is a home router based on the BCM4906 (2 CPU cores). It has 512 MiB of RAM, NAND flash, USB 2.0 and USB 3.0 ports, 4 LAN ports, 1 WAN port. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit b3de2a12d1a61d90a4d86c9840acc7d05066137f Author: Rafał Miłecki Date: Wed Mar 10 08:46:02 2021 +0100 dt-bindings: arm: bcm: document TP-Link Archer C2300 binding One more BCM4906 based device. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring Signed-off-by: Florian Fainelli commit f774117c96f94c7c4d2f076e4cacc80218b0df48 Author: Jyoti Bhayana Date: Tue Mar 9 23:12:59 2021 +0000 iio/scmi: Adding support for IIO SCMI Based Sensors This change provides ARM SCMI Protocol based IIO device. This driver provides support for Accelerometer and Gyroscope using SCMI Sensor Protocol extensions added in the SCMIv3.0 ARM specification Reported-by: kernel test robot Signed-off-by: Jyoti Bhayana Link: https://lore.kernel.org/r/20210212172235.507028-2-jbhayana@google.com Signed-off-by: Jonathan Cameron Link: https://lore.kernel.org/r/20210309231259.78050-2-jbhayana@google.com Signed-off-by: Jonathan Cameron commit c4ab036a2f41184ba969f86dda73be361c9ab39d Author: Al Viro Date: Tue Feb 23 17:44:08 2021 -0500 spufs: fix bogosity in S_ISGID handling clearing everything *except* S_ISGID (including the S_IFDIR, among other things) is wrong. Just use init_inode_owner() and be done with that... Acked-by: Arnd Bergmann Signed-off-by: Al Viro commit b577d0cd2104fdfcf0ded3707540a12be8ddd8b0 Author: Al Viro Date: Sun Jan 31 14:37:39 2021 -0500 9p: missing chunk of "fs/9p: Don't update file type when updating file attributes" In commit 45089142b149 Aneesh had missed one (admittedly, very unlikely to hit) case in v9fs_stat2inode_dotl(). However, the same considerations apply there as well - we have no business whatsoever to change ->i_rdev or the file type. Signed-off-by: Al Viro commit e34d657fc56855eca8c68c0ead3ca4feac5f34dc Author: Al Viro Date: Tue Feb 9 23:47:49 2021 -0500 openpromfs: don't do unlock_new_inode() until the new inode is set up Signed-off-by: Al Viro commit a612c07dd20107280751ceeb46692f7653bba424 Author: Al Viro Date: Wed Feb 10 00:01:06 2021 -0500 hostfs_mknod(): don't bother with init_special_inode() read_name() in the end of hostfs_mknod() will DTRT Signed-off-by: Al Viro commit 4d66952a2032cf6b65183fc4a8d8039304c70d48 Author: Al Viro Date: Wed Feb 10 21:23:04 2021 -0500 cifs: have cifs_fattr_to_inode() refuse to change type on live inode ... instead of trying to do that in the callers (and missing some, at that) Signed-off-by: Al Viro commit 3bcb39b086bf8d7c3cff013564f86162ec497d90 Author: Al Viro Date: Wed Feb 10 22:13:03 2021 -0500 cifs: have ->mkdir() handle race with another client sanely if we have mkdir request reported successful *and* simulating lookup gets us a non-directory (which is possible if another client has managed to get rmdir and create in between), the sane action is not to mangle ->i_mode of non-directory inode to S_IFDIR | mode, it's "report success and return with dentry negative unhashed" - that way the next lookup will do the right thing. Signed-off-by: Al Viro commit 4ab5260dab28109979a1b47a8996c9922219927f Author: Al Viro Date: Thu Feb 11 15:04:35 2021 -0500 do_cifs_create(): don't set ->i_mode of something we had not created If the file had existed before we'd called ->atomic_open() (without O_EXCL, that is), we have no more business setting ->i_mode than we would setting ->i_uid or ->i_gid. We also have no business doing either if another client has managed to get unlink+mkdir between ->open() and cifs_inode_get_info(). Signed-off-by: Al Viro commit 4a378d8a0d9606e97bddb0389cbc2009c6fc006c Author: Al Viro Date: Fri Feb 12 13:22:38 2021 -0500 gfs2: be careful with inode refresh 1) gfs2_dinode_in() should *not* touch ->i_rdev on live inodes; even "zero and immediately reread the same value from dinode" is broken - have it overlap with ->release() of char device and you can get all kinds of bogus behaviour. 2) mismatch on inode type on live inodes should be treated as fs corruption rather than blindly setting ->i_mode. Signed-off-by: Al Viro commit 60606ecad1881566ae1c76e2b921b6c07407e2cf Author: Al Viro Date: Sat Feb 13 22:39:18 2021 -0500 ocfs2_inode_lock_update(): make sure we don't change the type bits of i_mode ... even if another node has gone insane. Fail with -ESTALE if it detects an attempt to change the type bits. Signed-off-by: Al Viro commit e89f00d602b16284ee29677501f39126dd26ee3a Author: Al Viro Date: Sat Feb 13 23:03:20 2021 -0500 orangefs_inode_is_stale(): i_mode type bits do *not* form a bitmap... Signed-off-by: Al Viro commit e98f93e7ca71da61bc2ae7f433022e80bcb07d21 Author: Al Viro Date: Sun Feb 14 00:12:23 2021 -0500 vboxsf: don't allow to change the inode type vboxsf_init_inode() is used both for initial setup of inode and for metadata updates. Tell it whether we are updating a live inode or setting up a new instance and have it refuse to change type in the former case. [fixed the braino caught by Hans de Goede ] Signed-off-by: Al Viro commit 5ab6f96a12f4f28d5a283dcf46b004cc653246a1 Merge: 7c678829efa89 0deaeabf27126 Author: David S. Miller Date: Fri Mar 12 17:50:42 2021 -0800 Merge branch 'sh_eth-reg-defs' Sergey Shtylyov says: ==================== sh_eth: Improve the register/bit definitions in the Ether driver Here are 4 patches against DaveM's 'net-next' repo. Mainly I'm renaming the register *enum* tags/entries to match the SoC manuals,and also moving the RX-TX descriptor *enum*s closer to the corresponding *struct*s... ==================== Signed-off-by: David S. Miller commit 0deaeabf271262f0b13a23b49fb1c7e9b9bcbd50 Author: Sergey Shtylyov Date: Fri Mar 12 23:47:02 2021 +0300 sh_eth: place RX/TX descriptor *enum*s after their *struct*s Place the RX/TX descriptor bit *enum*s where they belong -- after the corresponding RX/TX descriptor *struct*s and, while at it, switch to declaring one *enum* entry per line... Signed-off-by: Sergey Shtylyov Signed-off-by: David S. Miller commit e2dccaf194dd81f4cb7fcc2b8effc10a83302a48 Author: Sergey Shtylyov Date: Fri Mar 12 23:45:48 2021 +0300 sh_eth: rename *enum*s still not matching register names Finally, rename the rest of the *enum* tags still not (exactly) matching the abbreviated register names from the manuals... Signed-off-by: Sergey Shtylyov Signed-off-by: David S. Miller commit 4585b72d97cc9f50b29a3c9774222c09fed92240 Author: Sergey Shtylyov Date: Fri Mar 12 23:44:53 2021 +0300 sh_eth: rename PSR bits In all the SoC manuals (except R-Car gen2) the PHY status register's name is abbreviated to PSR with the only valid bit 0 named LMON. Follow the suit and rename the corresponding *enum* tag/entry. Signed-off-by: Sergey Shtylyov Signed-off-by: David S. Miller commit bc9d992ca4d240657dba8fe722ce327bd743b35f Author: Sergey Shtylyov Date: Fri Mar 12 23:43:46 2021 +0300 sh_eth: rename TRSCER bits In all the SoC manuals the TRSCER register bits match the corresponding EESR registers's bits, but only on the R-Car gen2 SoC those are named RINT and TINT. Follow the suit and rename the *enum* tag/entries from DESC_I_* to TRSCER_*. Signed-off-by: Sergey Shtylyov Signed-off-by: David S. Miller commit 7c678829efa89e23a8556f5e4d9621c51995fb6e Merge: e9e90a70cc2d5 d2c4333a801c7 Author: David S. Miller Date: Fri Mar 12 17:47:46 2021 -0800 Merge branch 'mptcp-Include-multiple-address-ids-in-RM_ADDR' Mat Martineau says: ==================== mptcp: Include multiple address ids in RM_ADDR Here's a patch series from the MPTCP tree that extends the capabilities of the MPTCP RM_ADDR header. MPTCP peers can exchange information about their IP addresses that are available for additional MPTCP subflows. IP addresses are advertised with an ADD_ADDR header type, and those advertisements are revoked with the RM_ADDR header type. RFC 8684 allows the RM_ADDR header to include more than one address ID, so multiple advertisements can be revoked in a single header. Previous kernel versions have only used RM_ADDR with a single address ID, so multiple removals required multiple packets. Patches 1-4 plumb address id list structures around the MPTCP code, where before only a single address ID was passed. Patches 5-8 make use of the address lists at the path manager layer that tracks available addresses for both peers. Patches 9-11 update the selftests to cover the new use of RM_ADDR with multiple address IDs. ==================== Signed-off-by: David S. Miller commit d2c4333a801c73a8bc2e4bde75b573e2d1014436 Author: Geliang Tang Date: Fri Mar 12 17:16:21 2021 -0800 selftests: mptcp: add testcases for removing addrs This patch added the testcases for removing a list of addresses. Used the netlink to flush the addresses in the testcases. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit f87744ad42446c8510296f11fdc73f6e6f1376cc Author: Geliang Tang Date: Fri Mar 12 17:16:20 2021 -0800 selftests: mptcp: set addr id for removing testcases The removing testcases can only delete the addresses from id 1, this patch added the support for deleting the addresses from any id that user set. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 7028ba8ac9683b7e4f4db4db63a306d7497e7150 Author: Geliang Tang Date: Fri Mar 12 17:16:19 2021 -0800 selftests: mptcp: add invert argument for chk_rm_nr Some of the removing testcases used two zeros as arguments for chk_rm_nr like this: chk_rm_nr 0 0. This doesn't mean that no RM_ADDR has been sent. It only means that RM_ADDR had been sent in the opposite direction that chk_rm_nr is checking. This patch added a new argument invert for chk_rm_nr to allow it can check the RM_ADDR from the opposite direction. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 0e4a3e68862b7844c87126628082ae97c066b9da Author: Geliang Tang Date: Fri Mar 12 17:16:18 2021 -0800 mptcp: remove a list of addrs when flushing This patch invoked mptcp_nl_remove_addrs_list to remove a list of addresses when the netlink flushes addresses, instead of using mptcp_nl_remove_subflow_and_signal_addr to remove them one by one. And dropped the unused parameter net in __flush_addrs too. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 06faa22710342bca5e9c249634199c650799fce6 Author: Geliang Tang Date: Fri Mar 12 17:16:17 2021 -0800 mptcp: remove multi addresses and subflows in PM This patch implemented the function to remove a list of addresses and subflows, named mptcp_nl_remove_addrs_list, which had a input parameter rm_list as the removing addresses list. In mptcp_nl_remove_addrs_list, traverse all the existing msk sockets to invoke mptcp_pm_remove_addrs_and_subflows to remove a list of addresses for each msk socket. In mptcp_pm_remove_addrs_and_subflows, traverse all the addresses in the removing addresses list, to find whether this address is in the conn_list or anno_list. If it is, put the address ID into the removing address list or the removing subflow list, and pass the two lists to mptcp_pm_remove_addr and mptcp_pm_remove_subflow. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit ddd14bb85dd8d26e10a2ce4f9606879b94e81888 Author: Geliang Tang Date: Fri Mar 12 17:16:16 2021 -0800 mptcp: remove multi subflows in PM This patch dealt with removing multi subflows in PM: In mptcp_pm_remove_subflow, changed the input parameter local_id as an list of removing address ids, and passed the list to mptcp_pm_nl_rm_subflow_received. In mptcp_pm_nl_rm_subflow_received, iterated each address id from the received ids list. Then shut down and closed each address id's subsocket. In mptcp_nl_remove_subflow_and_signal_addr, put the single address id into an ids list, and passed it to mptcp_pm_remove_subflow. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit d0b698ca9a27e90b641804fc2fb49ae3719c0904 Author: Geliang Tang Date: Fri Mar 12 17:16:15 2021 -0800 mptcp: remove multi addresses in PM This patch dropped the member rm_id of struct mptcp_pm_data. Use rm_list_rx in mptcp_pm_nl_rm_addr_received instead of using rm_id. In mptcp_pm_nl_rm_addr_received, iterated each address id from pm.rm_list_rx, then shut down and closed each address id's subsocket. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit b5c55f334c7f75b59b2d14be0abb7c827a016059 Author: Geliang Tang Date: Fri Mar 12 17:16:14 2021 -0800 mptcp: add rm_list_rx in mptcp_pm_data This patch added a new member rm_list_rx for struct mptcp_pm_data as an list of the removing address ids on the incoming direction. Initialized its nr field to zero in mptcp_pm_data_init. In mptcp_pm_rm_addr_received, set it as the input rm_list. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 5c4a824dcb589f3da2574dd99e761063e7d5529d Author: Geliang Tang Date: Fri Mar 12 17:16:13 2021 -0800 mptcp: add rm_list in mptcp_options_received This patch changed the member rm_id in struct mptcp_options_received as a list of the removing address ids, and renamed it to rm_list. In mptcp_parse_option, parsed the RM_ADDR suboption and filled them into the rm_list in struct mptcp_options_received. In mptcp_incoming_options, passed this rm_list to the function mptcp_pm_rm_addr_received. It also changed the parameter type of mptcp_pm_rm_addr_received. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit cbde2787189632160a2fc09786d17648a8b191c5 Author: Geliang Tang Date: Fri Mar 12 17:16:12 2021 -0800 mptcp: add rm_list_tx in mptcp_pm_data This patch added a new member rm_list_tx for struct mptcp_pm_data as the removing address list on the outgoing direction. Initialize its nr field to zero in mptcp_pm_data_init. In mptcp_pm_remove_anno_addr, put the single address id into an removing list, and passed it to mptcp_pm_remove_addr. In mptcp_pm_remove_addr, save the input rm_list to rm_list_tx in struct mptcp_pm_data. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit 6445e17af7c58b8a9be8ebf400b04c65202f6497 Author: Geliang Tang Date: Fri Mar 12 17:16:11 2021 -0800 mptcp: add rm_list in mptcp_out_options This patch defined a new struct mptcp_rm_list, the ids field was an array of the removing address ids, the nr field was the valid number of removing address ids in the array. The array size was definced as a new macro MPTCP_RM_IDS_MAX. Changed the member rm_id of struct mptcp_out_options to rm_list. In mptcp_established_options_rm_addr, invoked mptcp_pm_rm_addr_signal to get the rm_list. According the number of addresses in it, calculated the padded RM_ADDR suboption length. And saved the ids array in struct mptcp_out_options's rm_list member. In mptcp_write_options, iterated each address id from struct mptcp_out_options's rm_list member, set the invalid ones as TCPOPT_NOP, then filled them into the RM_ADDR suboption. Changed TCPOLEN_MPTCP_RM_ADDR_BASE from 4 to 3. Signed-off-by: Geliang Tang Signed-off-by: Mat Martineau Signed-off-by: David S. Miller commit e9e90a70cc2d5690b84c7ca2f604e09a85222bb1 Merge: b202923d3a932 b8a07c4cea04c Author: David S. Miller Date: Fri Mar 12 17:44:10 2021 -0800 Merge branch 'resil-nhgroups-netdevsim-selftests' Petr Machata says: ==================== net: Resilient NH groups: netdevsim, selftests Support for resilient next-hop groups was added in a previous patch set. Resilient next hop groups add a layer of indirection between the SKB hash and the next hop. Thus the hash is used to reference a hash table bucket, which is then used to reference a particular next hop. This allows the system more flexibility when assigning SKB hash space to next hops. Previously, each next hop had to be assigned a continuous range of SKB hash space. With a hash table as an intermediate layer, it is possible to reassign next hops with a hash table bucket granularity. In turn, this mends issues with traffic flow redirection resulting from next hop removal or adjustments in next-hop weights. This patch set introduces mock offloading of resilient next hop groups by the netdevsim driver, and a suite of selftests. - Patch #1 adds a netdevsim-specific lock to protect next-hop hashtable. Previously, netdevsim relied on RTNL to maintain mutual exclusion. Patch #2 extracts a helper to make the following patches clearer. - Patch #3 implements the support for offloading of resilient next-hop groups. - Patch #4 introduces a new debugfs interface to set activity on a selected next-hop bucket. This simulates how HW can periodically report bucket activity, and buckets thus marked are expected to be exempt from migration to new next hops when the group changes. - Patches #5 and #6 clean up the fib_nexthop selftests. - Patches #7, #8 and #9 add tests for resilient next hop groups. Patch #7 adds resilient-hashing counterparts to fib_nexthops.sh. Patch #8 adds a new traffic test for resilient next-hop groups. Patch #9 adds a new traffic test for tunneling. - Patch #10 actually leverages the netdevsim offload to implement a suite of algorithmic tests that verify how and when buckets are migrated under various simulated workload scenarios. The overall plan is to contribute approximately the following patchsets: 1) Nexthop policy refactoring (already pushed) 2) Preparations for resilient next hop groups (already pushed) 3) Implementation of resilient next hop group (already pushed) 4) Netdevsim offload plus a suite of selftests (this patchset) 5) Preparations for mlxsw offload of resilient next-hop groups 6) mlxsw offload including selftests Interested parties can look at the complete code at [2]. [1] https://tools.ietf.org/html/rfc2992 [2] https://github.com/idosch/linux/commits/submit/res_integ_v1 ==================== Signed-off-by: David S. Miller commit b8a07c4cea04c14008f34880424852d38ae03758 Author: Ido Schimmel Date: Fri Mar 12 17:50:26 2021 +0100 selftests: netdevsim: Add test for resilient nexthop groups offload API Test various aspects of the resilient nexthop group offload API on top of the netdevsim implementation. Both good and bad flows are tested. Signed-off-by: Ido Schimmel Co-developed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 902280cacc0367dcaa8be8261e02ead932a1488d Author: Ido Schimmel Date: Fri Mar 12 17:50:25 2021 +0100 selftests: forwarding: Add resilient multipath tunneling nexthop test Add a resilient nexthop objects version of gre_multipath_nh.sh. Test that both IPv4 and IPv6 overlays work with resilient nexthop groups where the nexthops are two GRE tunnels. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 386e3792b52a4d815aefb30d8c049484dce7bdd2 Author: Ido Schimmel Date: Fri Mar 12 17:50:24 2021 +0100 selftests: forwarding: Add resilient hashing test Verify that IPv4 and IPv6 multipath forwarding works correctly with resilient nexthop groups and with different weights. Test that when the idle timer is not zero, the resilient groups are not rebalanced - because the nexthop buckets are considered active - and the initial weights (1:1) are used. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 557205f47dc47afeaf80707845cda8ec79ea4cb0 Author: Ido Schimmel Date: Fri Mar 12 17:50:23 2021 +0100 selftests: fib_nexthops: Test resilient nexthop groups Add test cases for resilient nexthop groups. Exhaustive forwarding tests are added separately under net/forwarding/. Examples: # ./fib_nexthops.sh -t basic_res Basic resilient nexthop group functional tests ---------------------------------------------- TEST: Add a nexthop group with default parameters [ OK ] TEST: Get a nexthop group with default parameters [ OK ] TEST: Get a nexthop group with non-default parameters [ OK ] TEST: Add a nexthop group with 0 buckets [ OK ] TEST: Replace nexthop group parameters [ OK ] TEST: Get a nexthop group after replacing parameters [ OK ] TEST: Replace idle timer [ OK ] TEST: Get a nexthop group after replacing idle timer [ OK ] TEST: Replace unbalanced timer [ OK ] TEST: Get a nexthop group after replacing unbalanced timer [ OK ] TEST: Replace with no parameters [ OK ] TEST: Get a nexthop group after replacing no parameters [ OK ] TEST: Replace nexthop group type - implicit [ OK ] TEST: Replace nexthop group type - explicit [ OK ] TEST: Replace number of nexthop buckets [ OK ] TEST: Get a nexthop group after replacing with invalid parameters [ OK ] TEST: Dump all nexthop buckets [ OK ] TEST: Dump all nexthop buckets in a group [ OK ] TEST: Dump all nexthop buckets with a specific nexthop device [ OK ] TEST: Dump all nexthop buckets with a specific nexthop identifier [ OK ] TEST: Dump all nexthop buckets in a non-existent group [ OK ] TEST: Dump all nexthop buckets in a non-resilient group [ OK ] TEST: Dump all nexthop buckets using a non-existent device [ OK ] TEST: Dump all nexthop buckets with invalid 'groups' keyword [ OK ] TEST: Dump all nexthop buckets with invalid 'fdb' keyword [ OK ] TEST: Get a valid nexthop bucket [ OK ] TEST: Get a nexthop bucket with valid group, but invalid index [ OK ] TEST: Get a nexthop bucket from a non-resilient group [ OK ] TEST: Get a nexthop bucket from a non-existent group [ OK ] Tests passed: 29 Tests failed: 0 # ./fib_nexthops.sh -t ipv4_large_res_grp IPv4 large resilient group (128k buckets) ----------------------------------------- TEST: Dump large (x131072) nexthop buckets [ OK ] Tests passed: 1 Tests failed: 0 # ./fib_nexthops.sh -t ipv6_large_res_grp IPv6 large resilient group (128k buckets) ----------------------------------------- TEST: Dump large (x131072) nexthop buckets [ OK ] Tests passed: 1 Tests failed: 0 # ./fib_nexthops.sh -t ipv4_res_torture IPv4 runtime resilient nexthop group torture -------------------------------------------- TEST: IPv4 resilient nexthop group torture test [ OK ] Tests passed: 1 Tests failed: 0 # ./fib_nexthops.sh -t ipv6_res_torture IPv6 runtime resilient nexthop group torture -------------------------------------------- TEST: IPv6 resilient nexthop group torture test [ OK ] Tests passed: 1 Tests failed: 0 # ./fib_nexthops.sh -t ipv4_res_grp_fcnal IPv4 resilient groups functional -------------------------------- TEST: Nexthop group updated when entry is deleted [ OK ] TEST: Nexthop buckets updated when entry is deleted [ OK ] TEST: Nexthop group updated after replace [ OK ] TEST: Nexthop buckets updated after replace [ OK ] TEST: Nexthop group updated when entry is deleted - nECMP [ OK ] TEST: Nexthop buckets updated when entry is deleted - nECMP [ OK ] TEST: Nexthop group updated after replace - nECMP [ OK ] TEST: Nexthop buckets updated after replace - nECMP [ OK ] Tests passed: 8 Tests failed: 0 # ./fib_nexthops.sh -t ipv6_res_grp_fcnal IPv6 resilient groups functional -------------------------------- TEST: Nexthop group updated when entry is deleted [ OK ] TEST: Nexthop buckets updated when entry is deleted [ OK ] TEST: Nexthop group updated after replace [ OK ] TEST: Nexthop buckets updated after replace [ OK ] TEST: Nexthop group updated when entry is deleted - nECMP [ OK ] TEST: Nexthop buckets updated when entry is deleted - nECMP [ OK ] TEST: Nexthop group updated after replace - nECMP [ OK ] TEST: Nexthop buckets updated after replace - nECMP [ OK ] Tests passed: 8 Tests failed: 0 Signed-off-by: Ido Schimmel Co-developed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit a8f9952d218d816ff1a13c9385edd821a8da527d Author: Ido Schimmel Date: Fri Mar 12 17:50:22 2021 +0100 selftests: fib_nexthops: List each test case in a different line The lines with the IPv4 and IPv6 test cases are already very long and more test cases will be added in subsequent patches. List each test case in a different line to make it easier to extend the test with more test cases. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 8e815284a5f9351973a5860447941823acf1182d Author: Ido Schimmel Date: Fri Mar 12 17:50:21 2021 +0100 selftests: fib_nexthops: Declutter test output Before: # ./fib_nexthops.sh -t ipv4_torture IPv4 runtime torture -------------------- TEST: IPv4 torture test [ OK ] ./fib_nexthops.sh: line 213: 19376 Killed ipv4_del_add_loop1 ./fib_nexthops.sh: line 213: 19377 Killed ipv4_grp_replace_loop ./fib_nexthops.sh: line 213: 19378 Killed ip netns exec me ping -f 172.16.101.1 > /dev/null 2>&1 ./fib_nexthops.sh: line 213: 19380 Killed ip netns exec me ping -f 172.16.101.2 > /dev/null 2>&1 ./fib_nexthops.sh: line 213: 19381 Killed ip netns exec me mausezahn veth1 -B 172.16.101.2 -A 172.16.1.1 -c 0 -t tcp "dp=1-1023, flags=syn" > /dev/null 2>&1 Tests passed: 1 Tests failed: 0 # ./fib_nexthops.sh -t ipv6_torture IPv6 runtime torture -------------------- TEST: IPv6 torture test [ OK ] ./fib_nexthops.sh: line 213: 24453 Killed ipv6_del_add_loop1 ./fib_nexthops.sh: line 213: 24454 Killed ipv6_grp_replace_loop ./fib_nexthops.sh: line 213: 24456 Killed ip netns exec me ping -f 2001:db8:101::1 > /dev/null 2>&1 ./fib_nexthops.sh: line 213: 24457 Killed ip netns exec me ping -f 2001:db8:101::2 > /dev/null 2>&1 ./fib_nexthops.sh: line 213: 24458 Killed ip netns exec me mausezahn -6 veth1 -B 2001:db8:101::2 -A 2001:db8:91::1 -c 0 -t tcp "dp=1-1023, flags=syn" > /dev/null 2>&1 Tests passed: 1 Tests failed: 0 After: # ./fib_nexthops.sh -t ipv4_torture IPv4 runtime torture -------------------- TEST: IPv4 torture test [ OK ] Tests passed: 1 Tests failed: 0 # ./fib_nexthops.sh -t ipv6_torture IPv6 runtime torture -------------------- TEST: IPv6 torture test [ OK ] Tests passed: 1 Tests failed: 0 Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit c6385c0b67c527b298111775bc89a7407ba1581e Author: Ido Schimmel Date: Fri Mar 12 17:50:20 2021 +0100 netdevsim: Allow reporting activity on nexthop buckets A key component of the resilient hashing algorithm is the hash buckets' activity. If a bucket is active, it will not be populated with a new nexthop in order not to break existing flows. Therefore, in order to easily and thoroughly test the algorithm, we need to be in full control over the reported activity. Add a debugfs interface that allows user space to have netdevsim report a nexthop bucket within a resilient nexthop group as active. For example: # echo 10 23 > /sys/kernel/debug/netdevsim/netdevsim10/fib/nexthop_bucket_activity Will mark bucket 23 in nexthop group 10 as active. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit d8eaa4facacbb13425d4097bd066e28958a5716f Author: Ido Schimmel Date: Fri Mar 12 17:50:19 2021 +0100 netdevsim: Add support for resilient nexthop groups Allow resilient nexthop groups to be programmed and account their occupancy according to their number of buckets. The nexthop group itself as well as its buckets are marked with hardware flags (i.e., 'RTNH_F_TRAP'). Replacement of a single nexthop bucket can fail using the following debugfs knob: # cat /sys/kernel/debug/netdevsim/netdevsim10/fib/fail_nexthop_bucket_replace N # echo 1 > /sys/kernel/debug/netdevsim/netdevsim10/fib/fail_nexthop_bucket_replace # cat /sys/kernel/debug/netdevsim/netdevsim10/fib/fail_nexthop_bucket_replace Y Replacement of a resilient nexthop group can fail using the following debugfs knob: # cat /sys/kernel/debug/netdevsim/netdevsim10/fib/fail_res_nexthop_group_replace N # echo 1 > /sys/kernel/debug/netdevsim/netdevsim10/fib/fail_res_nexthop_group_replace # cat /sys/kernel/debug/netdevsim/netdevsim10/fib/fail_res_nexthop_group_replace Y This enables testing of various error paths. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 40ff83711f76d30265140827b46066dd3db2db79 Author: Ido Schimmel Date: Fri Mar 12 17:50:18 2021 +0100 netdevsim: Create a helper for setting nexthop hardware flags Instead of calling nexthop_set_hw_flags(), call a helper. It will be used to also set nexthop bucket flags in a subsequent patch. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 86927c9c4d4e59b75a680f1e7922dca717cba24d Author: Petr Machata Date: Fri Mar 12 17:50:17 2021 +0100 netdevsim: fib: Introduce a lock to guard nexthop hashtable Currently netdevsim relies on RTNL to maintain exclusivity in accessing the nexthop hash table. However, bucket notification may be called without RTNL having been held. Instead, introduce a custom lock to guard the table. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Signed-off-by: David S. Miller commit b202923d3a93296c2e2627eee0222dfef3606777 Merge: a9349f08ec6c1 287f93ded67f4 Author: David S. Miller Date: Fri Mar 12 17:09:34 2021 -0800 Merge branch 'ptp-warnings' Lee Jones says: ==================== Rid W=1 warnings from PTP This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. ==================== Signed-off-by: David S. Miller commit 287f93ded67f48fd7126ee37e98103c6cf52eb0f Author: Lee Jones Date: Fri Mar 12 11:09:10 2021 +0000 ptp: ptp_p: Demote non-conformant kernel-doc headers and supply a param description Fixes the following W=1 kernel build warning(s): drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'control' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'event' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'addend' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'accum' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'test' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ts_compare' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'rsystime_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'rsystime_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'systime_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'systime_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'trgt_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'trgt_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'asms_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'asms_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'amms_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'amms_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ch_control' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ch_event' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'tx_snap_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'tx_snap_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'rx_snap_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'rx_snap_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'src_uuid_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'src_uuid_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'can_status' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'can_snap_lo' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'can_snap_hi' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ts_sel' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'ts_st' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'reserve1' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'stl_max_set_en' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'stl_max_set' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'reserve2' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:78: warning: Function parameter or member 'srst' not described in 'pch_ts_regs' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'regs' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'ptp_clock' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'caps' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'exts0_enabled' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'exts1_enabled' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'mem_base' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'mem_size' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'irq' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'pdev' not described in 'pch_dev' drivers/ptp/ptp_pch.c:121: warning: Function parameter or member 'register_lock' not described in 'pch_dev' drivers/ptp/ptp_pch.c:128: warning: Function parameter or member 'station' not described in 'pch_params' drivers/ptp/ptp_pch.c:291: warning: Function parameter or member 'pdev' not described in 'pch_set_station_address' Cc: Richard Cochran Cc: LAPIS SEMICONDUCTOR Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 9ec04c71ab206dbc95c79abdfc647df965a2cb91 Author: Lee Jones Date: Fri Mar 12 11:09:09 2021 +0000 ptp: ptp_clockmatrix: Demote non-kernel-doc header to standard comment Fixes the following W=1 kernel build warning(s): drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds drivers/ptp/ptp_clockmatrix.c:1408: warning: Cannot understand * @brief Maximum absolute value for write phase offset in picoseconds Cc: Richard Cochran Cc: IDT-support-1588@lm.renesas.com Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit f90fc37f289cd0886ef3a12b2ea33b93b8d9d360 Author: Lee Jones Date: Fri Mar 12 11:09:08 2021 +0000 ptp_pch: Move 'pch_*()' prototypes to shared header Fixes the following W=1 kernel build warning(s): drivers/ptp/ptp_pch.c:193:6: warning: no previous prototype for ‘pch_ch_control_write’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:201:5: warning: no previous prototype for ‘pch_ch_event_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:212:6: warning: no previous prototype for ‘pch_ch_event_write’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:220:5: warning: no previous prototype for ‘pch_src_uuid_lo_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:231:5: warning: no previous prototype for ‘pch_src_uuid_hi_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:242:5: warning: no previous prototype for ‘pch_rx_snap_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:259:5: warning: no previous prototype for ‘pch_tx_snap_read’ [-Wmissing-prototypes] drivers/ptp/ptp_pch.c:300:5: warning: no previous prototype for ‘pch_set_station_address’ [-Wmissing-prototypes] Cc: Richard Cochran (maintainer:PTP HARDWARE CLOCK SUPPORT) Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Flavio Suligoi Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit 257382c54e8cf33042f184f24d5c9d739e1f48cb Author: Lee Jones Date: Fri Mar 12 11:09:07 2021 +0000 ptp_pch: Remove unused function 'pch_ch_control_read()' Fixes the following W=1 kernel build warning(s): drivers/ptp/ptp_pch.c:182:5: warning: no previous prototype for ‘pch_ch_control_read’ [-Wmissing-prototypes] Cc: Richard Cochran (maintainer:PTP HARDWARE CLOCK SUPPORT) Cc: "David S. Miller" Cc: Jakub Kicinski Cc: Flavio Suligoi Cc: netdev@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: David S. Miller commit a9349f08ec6c1251d41ef167d27a15cc39bc5b97 Author: Rafał Miłecki Date: Fri Mar 12 11:41:08 2021 +0100 net: dsa: bcm_sf2: setup BCM4908 internal crossbar On some SoCs (e.g. BCM4908, BCM631[345]8) SF2 has an integrated crossbar. It allows connecting its selected external ports to internal ports. It's used by vendors to handle custom Ethernet setups. BCM4908 has following 3x2 crossbar. On Asus GT-AC5300 rgmii is used for connecting external BCM53134S switch. GPHY4 is usually used for WAN port. More fancy devices use SerDes for 2.5 Gbps Ethernet. ┌──────────┐ SerDes ─── 0 ─┤ │ │ 3x2 ├─ 0 ─── switch port 7 GPHY4 ─── 1 ─┤ │ │ crossbar ├─ 1 ─── runner (accelerator) rgmii ─── 2 ─┤ │ └──────────┘ Use setup data based on DT info to configure BCM4908's switch port 7. Right now only GPHY and rgmii variants are supported. Handling SerDes can be implemented later. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 01488a0ccd9abe15565bed50a45afcddbb0fe199 Author: Rafał Miłecki Date: Fri Mar 12 11:41:07 2021 +0100 net: dsa: bcm_sf2: store PHY interface/mode in port structure It's needed later for proper switch / crossbar setup. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli Signed-off-by: David S. Miller commit 6ad086009f87f65043c2a2c0efa27e3915c50e6e Author: Shubhankar Kuranagatti Date: Fri Mar 12 13:00:05 2021 +0530 net: ipv4: route.c: Fix indentation of multi line comment. All comment lines inside the comment block have been aligned. Every line of comment starts with a * (uniformity in code). Signed-off-by: Shubhankar Kuranagatti Signed-off-by: David S. Miller commit 12bb508bfe5a564c36864b12253db23cac83bfa1 Author: Rafał Miłecki Date: Thu Mar 11 13:35:21 2021 +0100 net: broadcom: bcm4908_enet: support TX interrupt It appears that each DMA channel has its own interrupt and both rings can be configured (the same way) to handle interrupts. 1. Make ring interrupts code generic (make it operate on given ring) 2. Move napi to ring (so each has its own) 3. Make IRQ handler generic (match ring against received IRQ number) 4. Add (optional) support for TX interrupt Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller commit ab4dda7a8cb7e55ea3d92fd5e249cf6f5396028c Author: Rafał Miłecki Date: Thu Mar 11 13:35:20 2021 +0100 dt-bindings: net: bcm4908-enet: add optional TX interrupt I discovered that hardware actually supports two interrupts, one per DMA channel (RX and TX). Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller commit 26d2e0426aacaf4c128dc57111f0d460ab20e8b5 Merge: c232f81b0a00f e276e5e40e925 Author: David S. Miller Date: Fri Mar 12 16:44:46 2021 -0800 Merge branch 'macb-fixed-link-fixes' Robert Hancock says: ==================== macb SGMII fixed-link fixes Some fixes to the macb driver for use in SGMII mode with a fixed-link (such as for chip-to-chip connectivity). ==================== Signed-off-by: David S. Miller commit e276e5e40e92582db3814d8b2b28150862c7a50f Author: Robert Hancock Date: Thu Mar 11 14:18:13 2021 -0600 net: macb: Disable PCS auto-negotiation for SGMII fixed-link mode When using a fixed-link configuration in SGMII mode, it's not really sensible to have auto-negotiation enabled since the link settings are fixed by definition. In other configurations, such as an SGMII connection to a PHY, it should generally be enabled. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller commit 8fab174b78f74f10e4d900fe6da6c9047b0b35b5 Author: Robert Hancock Date: Thu Mar 11 14:18:12 2021 -0600 net: macb: poll for fixed link state in SGMII mode When using a fixed-link configuration with GEM in SGMII mode, such as for a chip-to-chip interconnect, the link state was always showing as established regardless of the actual connectivity state. We can monitor the pcs_link_state bit in the Network Status register to determine whether the PCS link state is actually up. Signed-off-by: Robert Hancock Signed-off-by: David S. Miller commit c232f81b0a00f01c7dd1f888b806637c0d4b3d68 Merge: bfdfe7fc1bf9e a3222a2da0a2d Author: David S. Miller Date: Fri Mar 12 16:36:07 2021 -0800 Merge tag 'mlx5-updates-2021-03-12' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== mlx5-updates-2021-03-12 1) TC support for ICMP parameters 2) TC connection tracking with mirroring 3) A round of trivial fixups and cleanups ==================== Signed-off-by: David S. Miller commit 18cda8018a4b5f4819e02ad2cabf40c3666c6366 Author: Wei Yongjun Date: Fri Mar 12 08:04:20 2021 +0000 remoteproc: imx_rproc: fix return value check in imx_rproc_addr_init() In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: ecadcc47492c ("remoteproc: imx_rproc: use devm_ioremap") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210312080420.277151-1-weiyongjun1@huawei.com Signed-off-by: Bjorn Andersson commit a3222a2da0a2d6c7682252d4bfdff05721a82b95 Author: Maor Dickman Date: Sun Jan 24 15:56:36 2021 +0200 net/mlx5e: Allow to match on ICMP parameters Support matching on ICMPv4/6 type and code parameters using misc3 section of match parameters. Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 69e2916ebce4410c0f6ba6c59c4f6e9eb228e5ec Author: Paul Blakey Date: Mon Sep 21 11:49:26 2020 +0300 net/mlx5: CT: Add support for mirroring Add support for mirroring before the CT action by spliting the pre ct rule. Mirror outputs are done first on the tc chain,prio table rule (the fwd rule), which will then forward to a per port fwd table. On this fwd table, we insert the original pre ct rule that forwards to ct/ct nat table. Signed-off-by: Paul Blakey Signed-off-by: Maor Dickman Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 287e0df021e877c2aa5f4750b2a0575070471ddb Author: Alaa Hleihel Date: Thu Dec 31 16:24:51 2020 +0200 net/mlx5: Display the command index in command mailbox dump Multiple commands can be printed at the same time which can lead to wrong order of their lines in dmesg output. As a result, it's hard to match data dumps to the correct command or which command was fully dumped at some point. Fix this by displaying the corresponding command index, and also indicate when a command was fully dumped. Signed-off-by: Alaa Hleihel Signed-off-by: Saeed Mahameed commit 2119bda642c49c732409574ce699e4845e95df48 Author: Arnd Bergmann Date: Mon Mar 8 16:32:57 2021 +0100 net/mlx5e: allocate 'indirection_rqt' buffer dynamically Increasing the size of the indirection_rqt array from 128 to 256 bytes pushed the stack usage of the mlx5e_hairpin_fill_rqt_rqns() function over the warning limit when building with clang and CONFIG_KASAN: drivers/net/ethernet/mellanox/mlx5/core/en_tc.c:970:1: error: stack frame size of 1180 bytes in function 'mlx5e_tc_add_nic_flow' [-Werror,-Wframe-larger-than=] Using dynamic allocation here is safe because the caller does the same, and it reduces the stack usage of the function to just a few bytes. Signed-off-by: Arnd Bergmann Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit e16cf9d754b93b0cb715ebb981e57cae200c19c9 Author: Tariq Toukan Date: Wed Feb 17 11:43:28 2021 +0200 net/mlx5e: Dump ICOSQ WQE descriptor on CQE with error events Dump the ICOSQ's WQE descriptor when a completion with error is received. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 991b2654605b455a94dac73e14b23480e7e20991 Author: Maxim Mikityanskiy Date: Fri Jan 29 18:43:31 2021 +0200 net/mlx5e: Use net_prefetchw instead of prefetchw in MPWQE TX datapath Commit e20f0dbf204f ("net/mlx5e: RX, Add a prefetch command for small L1_CACHE_BYTES") switched to using net_prefetchw at all places in mlx5e. In the same time frame, commit 5af75c747e2a ("net/mlx5e: Enhanced TX MPWQE for SKBs") added one more usage of prefetchw. When these two changes were merged, this new occurrence of prefetchw wasn't replaced with net_prefetchw. This commit fixes this last occurrence of prefetchw in mlx5e_tx_mpwqe_session_start, making the same change that was done in mlx5e_xdp_mpwqe_session_start. Signed-off-by: Maxim Mikityanskiy Reviewed-by: Saeed Mahameed Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit bca08a9145015d14e285dc4c24614dd5212ffb8d Author: Roi Dayan Date: Tue Mar 9 18:25:59 2021 +0200 net/mlx5e: Remove redundant newline in NL_SET_ERR_MSG_MOD Fix the following coccicheck warnings: drivers/net/ethernet/mellanox/mlx5/core/devlink.c:145:29-66: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD drivers/net/ethernet/mellanox/mlx5/core/devlink.c:140:29-77: WARNING avoid newline at end of message in NL_SET_ERR_MSG_MOD Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 093bd764693711667e7f0dfd95dfa1b938efcec9 Author: Mark Zhang Date: Tue Feb 2 13:28:29 2021 +0200 net/mlx5: Read congestion counters from all ports when lag is active Read congestion counters from all ports in any lag mode rather than only in RoCE lag mode (e.g., VF lag). Signed-off-by: Mark Zhang Reviewed-by: Saeed Mahameed Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed commit 7976092241645be4d7ee46ebc894b29a74351daa Author: Jiapeng Chong Date: Mon Feb 22 17:56:59 2021 +0800 net/mlx5: remove unneeded semicolon Fix the following coccicheck warnings: ./drivers/net/ethernet/mellanox/mlx5/core/sf/devlink.c:495:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Parav Pandit Signed-off-by: Saeed Mahameed commit ad2c99ca758126bac9f4c198e8e231e9e7d375dd Author: Junlin Yang Date: Wed Mar 3 10:40:19 2021 +0800 net/mlx5: use kvfree() for memory allocated with kvzalloc() It is allocated with kvzalloc(), the corresponding release function should not be kfree(), use kvfree() instead. Generated by: scripts/coccinelle/api/kfree_mismatch.cocci Signed-off-by: Junlin Yang Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit cc82a2e6c8af956d894fa58a040dc0d532dd9978 Author: Yevgeny Kliteynik Date: Sat Feb 6 22:41:41 2021 +0200 net/mlx5: DR, Add missing vhca_id consume from STEv1 The field source_eswitch_owner_vhca_id was not consumed in the same way as in STEv0. Added the missing set. Fixes: 10b694186410 ("net/mlx5: DR, Add HW STEv1 match logic") Signed-off-by: Alex Vesker Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 1412477882470bf72763e105e735bbec232b126f Author: Yevgeny Kliteynik Date: Sat Feb 6 15:39:25 2021 +0200 net/mlx5: DR, Remove unneeded rx_decap_l3 function for STEv1 Remove the dr_ste_v1_set_rx_decap_l3 function that was replaced by another function - fixing a rebase error. Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 0142f09764752de8df211a42f0733531f96f4626 Author: Yevgeny Kliteynik Date: Sat Feb 6 15:20:41 2021 +0200 net/mlx5: DR, Fixed typo in STE v0 "reforamt" -> "reformat" Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed commit 54d796b86eb3a5f99e22dca58b8e991ebcadd826 Merge: 6e35f4281caee 9f47c9c8bddc7 Author: Mark Brown Date: Fri Mar 12 22:54:34 2021 +0000 Merge series "AsoC: rt5640/rt5651: Volume control fixes" from Hans de Goede : Hi All, Here is a resent of the remaining patches from my "[PATCH 0/5] AsoC: rt5640/rt5651: Volume control fixes" series, with the controversial "[PATCH 3/5] ASoC: rt5640: Add emulated 'DAC1 Playback Switch' control" patch dropped, and these remaining 2 patches rebased to still apply with that patch dropped. Regards, Hans Hans de Goede (2): ASoC: rt5640: Rename 'Mono DAC Playback Volume' to 'DAC2 Playback Volume' ASoC: Intel: bytcr_rt5640: Add used AIF to the components string sound/soc/codecs/rt5640.c | 6 +++--- sound/soc/intel/boards/bytcr_rt5640.c | 11 ++++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) -- 2.30.1 commit 6e35f4281caeeb4a6fd244e57322c1e07a1cc385 Merge: ee427ea4f1267 f7b61287cf174 Author: Mark Brown Date: Fri Mar 12 22:54:33 2021 +0000 Merge series "ASoC: samsung: remove cppcheck warnings" from Pierre-Louis Bossart : v4: corrected Fixes tag Added added Krzysztof Kozlowski's r-v-b tag reverted patch2 to v2 since this is the agreement. v3: Added Sylwester tag Rebased and squashed fix with initial patch which was merged at some point but can't be found in broonie/for-next (not sure what happened?) Corrected patch subjects to tm2_wm5110 Reverted second patch to initial v1, after agreement between Krzysztof and Sylwester v2: added Krzysztof Kozlowski's tags added fix for first patch already merged as suggested by Krzysztof Kozlowski moved variable to lower scope in patch6 Pierre-Louis Bossart (2): ASoC: samsung: tm2_wm5110: check of of_parse return value ASoC: samsung: tm2_wm5110: remove shadowed variable sound/soc/samsung/tm2_wm5110.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.25.1 commit 40a5aa1f54ab6057230db4c39524df0e49fe730b Author: Bjorn Andersson Date: Tue Jan 5 16:10:04 2021 -0800 arm64: dts: qcom: pm8150: Enable RTC The PM8150 comes with everything the RTC needs, so let's just leave it enabled instead of having to explicitly enable it for all boards. In effect this patch enables the RTC on the SM8150 MTP and the SM8250 HDK. Acked-by: Dmitry Baryshkov Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210106001004.4081508-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 1bb73841ea7a88765db7f641a90120490f1f4aee Author: Jiri Slaby Date: Tue Mar 2 07:21:33 2021 +0100 PCI: Remove MicroGate SyncLink device IDs The drivers were removed in a1f714b44e34 (tty: Remove redundant synclink driver) and 3d608a591b2b (tty: Remove redundant synclinkmp driver). Remove the PCI device ID entries as well. Link: https://lore.kernel.org/r/20210302062214.29627-3-jslaby@suse.cz Signed-off-by: Jiri Slaby Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit 5504a69a4219170ad00fe5eebc57672a357813ad Author: Richard Guy Briggs Date: Thu Mar 11 11:38:05 2021 -0500 audit: further cleanup of AUDIT_FILTER_ENTRY deprecation Remove the list parameter from the function call since the exit filter list is the only remaining list used by this function. This cleans up commit 5260ecc2e048 ("audit: deprecate the AUDIT_FILTER_ENTRY filter") Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore commit 0823427989c11240ad0f23561e66ff31a927018f Author: Jaegeuk Kim Date: Mon Mar 1 17:28:16 2021 -0800 f2fs: expose # of overprivision segments This is useful when checking conditions during checkpoint=disable in Android. Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3c0315424f5e3d2a4113c7272367bee1e8e6a174 Author: Eric Biggers Date: Thu Mar 4 21:43:10 2021 -0800 f2fs: fix error handling in f2fs_end_enable_verity() f2fs didn't properly clean up if verity failed to be enabled on a file: - It left verity metadata (pages past EOF) in the page cache, which would be exposed to userspace if the file was later extended. - It didn't truncate the verity metadata at all (either from cache or from disk) if an error occurred while setting the verity bit. Fix these bugs by adding a call to truncate_inode_pages() and ensuring that we truncate the verity metadata (both from cache and from disk) in all error paths. Also rework the code to cleanly separate the success path from the error paths, which makes it much easier to understand. Finally, log a message if f2fs_truncate() fails, since it might otherwise fail silently. Reported-by: Yunlei He Fixes: 95ae251fe828 ("f2fs: add fs-verity support") Cc: # v5.4+ Signed-off-by: Eric Biggers Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 28e18ee636ba28532dbe425540af06245a0bbecb Author: Colin Ian King Date: Thu Mar 4 09:21:18 2021 +0000 f2fs: fix a redundant call to f2fs_balance_fs if an error occurs The uninitialized variable dn.node_changed does not get set when a call to f2fs_get_node_page fails. This uninitialized value gets used in the call to f2fs_balance_fs() that may or not may not balances dirty node and dentry pages depending on the uninitialized state of the variable. Fix this by only calling f2fs_balance_fs if err is not set. Thanks to Jaegeuk Kim for suggesting an appropriate fix. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 2a3407607028 ("f2fs: call f2fs_balance_fs only when node was changed") Signed-off-by: Colin Ian King Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1153db095fd6c5cc59425171ddef4a4c83464643 Author: Chao Yu Date: Tue Mar 2 16:35:32 2021 +0800 f2fs: remove unused file_clear_encrypt() - file_clear_encrypt() was never be used, remove it. - In addition, relocating macros for cleanup. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 36e4d95891ed37eb98a660babec749be3fb35fd9 Author: huangjianan@oppo.com Date: Mon Mar 1 12:58:44 2021 +0800 f2fs: check if swapfile is section-alligned If the swapfile isn't created by pin and fallocate, it can't be guaranteed section-aligned, so it may be selected by f2fs gc. When gc_pin_file_threshold is reached, the address of swapfile may change, but won't be synchronized to swap_extent, so swap will write to wrong address, which will cause data corruption. Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 1da66103837077df70ddf7a49c46dfd025001a60 Author: huangjianan@oppo.com Date: Sat Feb 27 20:02:30 2021 +0800 f2fs: fix last_lblock check in check_swap_activate_fast Because page_no < sis->max guarantees that the while loop break out normally, the wrong check contidion here doesn't cause a problem. Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit ebc29b62a166e9116cd8159e9798044d02130279 Author: huangjianan@oppo.com Date: Sat Feb 27 20:02:29 2021 +0800 f2fs: remove unnecessary IS_SWAPFILE check Now swapfile in f2fs directly submit IO to blockdev according to swapfile extents reported by f2fs when swapon, therefore there is no need to check IS_SWAPFILE when exec filesystem operation. Signed-off-by: Huang Jianan Signed-off-by: Guo Weichao Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4260c4067fbba55a90037fe3ee32eff087749f83 Author: Gustavo A. R. Silva Date: Wed Feb 24 13:03:13 2021 -0600 f2fs: 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]. Refactor the code according to the use of a flexible-array member in struct f2fs_checkpoint, instead of a one-element arrays. Notice that a temporary pointer to void '*tmp_ptr' was used in order to fix the following errors when using a flexible array instead of a one element array in struct f2fs_checkpoint: CC [M] fs/f2fs/dir.o In file included from fs/f2fs/dir.c:13: fs/f2fs/f2fs.h: In function ‘__bitmap_ptr’: fs/f2fs/f2fs.h:2227:40: error: invalid use of flexible array member 2227 | return &ckpt->sit_nat_version_bitmap + offset + sizeof(__le32); | ^ fs/f2fs/f2fs.h:2227:49: error: invalid use of flexible array member 2227 | return &ckpt->sit_nat_version_bitmap + offset + sizeof(__le32); | ^ fs/f2fs/f2fs.h:2238:40: error: invalid use of flexible array member 2238 | return &ckpt->sit_nat_version_bitmap + offset; | ^ make[2]: *** [scripts/Makefile.build:287: fs/f2fs/dir.o] Error 1 make[1]: *** [scripts/Makefile.build:530: fs/f2fs] Error 2 make: *** [Makefile:1819: fs] Error 2 [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/603647e4.DeEFbl4eqljuwAUe%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 72f85881249e3a7403434631b9a9f934cdd1a83d Author: Geert Uytterhoeven Date: Fri Feb 26 16:51:42 2021 +0100 f2fs: compress: Allow modular (de)compression algorithms If F2FS_FS is modular, enabling the compressions options F2FS_FS_{LZ4,LZ4HZ,LZO,LZORLE,ZSTD} will make the (de)compression algorithms {LZ4,LZ4HC,LZO,ZSTD}_{,DE}COMPRESS builtin instead of modular, as the former depend on an intermediate boolean F2FS_FS_COMPRESSION, which in-turn depends on tristate F2FS_FS. Indeed, if a boolean symbol A depends directly on a tristate symbol B and selects another tristate symbol C: tristate B tristate C bool A depends on B select C and B is modular, then C will also be modular. However, if there is an intermediate boolean D in the dependency chain between A and B: tristate B tristate C bool D depends on B bool A depends on D select C then the modular state won't propagate from B to C, and C will be builtin instead of modular. As modular dependency propagation through intermediate symbols is obscure, fix this in a robust way by moving the selection of tristate (de)compression algorithms from the boolean compression options to the tristate main F2FS_FS option. Signed-off-by: Geert Uytterhoeven Reviewed-by: Chao Yu Reviewed-by: Masahiro Yamada Signed-off-by: Jaegeuk Kim commit 43f8c47ea7d59c7b2270835f1d7c4618a1ea27b6 Author: Chao Yu Date: Mon Feb 22 18:07:33 2021 +0800 f2fs: check discard command number before traversing discard pending list In trim thread, let's add a condition to check discard command number before traversing discard pending list, it can avoid unneeded traversing if there is no discard command. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3b42c741b1bf52ee9ed6fba5f9636d80ddacf73f Author: Chao Yu Date: Sat Feb 20 17:38:43 2021 +0800 f2fs: update comments for explicit memory barrier Add more detailed comments for explicit memory barrier used by f2fs, in order to enhance code readability. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 4831675c6be59dbe8e0b2a53dc237111f9307a4b Author: Chao Yu Date: Sat Feb 20 17:38:42 2021 +0800 f2fs: remove unused FORCE_FG_GC macro FORCE_FG_GC was introduced by commit 6aefd93b0137 ("f2fs: introduce background_gc=sync mount option"), but never be used, remove it. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit cd6ee739b8ee49cf5f3d7c9a0f663f9f0c5afe1b Author: Chao Yu Date: Sat Feb 20 17:38:41 2021 +0800 f2fs: avoid unused f2fs_show_compress_options() LKP reports: fs/f2fs/super.c:1516:20: warning: unused function 'f2fs_show_compress_options' [-Wunused-function] static inline void f2fs_show_compress_options(struct seq_file *seq, Fix this issue by covering f2fs_show_compress_options() with CONFIG_F2FS_FS_COMPRESSION macro. Fixes: 4c8ff7095bef ("f2fs: support data compression") Reported-by: kernel test robot Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 3ab0598e6d860ef49d029943ba80f627c15c15d6 Author: Chao Yu Date: Sat Feb 20 17:35:41 2021 +0800 f2fs: fix panic during f2fs_resize_fs() f2fs_resize_fs() hangs in below callstack with testcase: - mkfs 16GB image & mount image - dd 8GB fileA - dd 8GB fileB - sync - rm fileA - sync - resize filesystem to 8GB kernel BUG at segment.c:2484! Call Trace: allocate_segment_by_default+0x92/0xf0 [f2fs] f2fs_allocate_data_block+0x44b/0x7e0 [f2fs] do_write_page+0x5a/0x110 [f2fs] f2fs_outplace_write_data+0x55/0x100 [f2fs] f2fs_do_write_data_page+0x392/0x850 [f2fs] move_data_page+0x233/0x320 [f2fs] do_garbage_collect+0x14d9/0x1660 [f2fs] free_segment_range+0x1f7/0x310 [f2fs] f2fs_resize_fs+0x118/0x330 [f2fs] __f2fs_ioctl+0x487/0x3680 [f2fs] __x64_sys_ioctl+0x8e/0xd0 do_syscall_64+0x33/0x80 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The root cause is we forgot to check that whether we have enough space in resized filesystem to store all valid blocks in before-resizing filesystem, then allocator will run out-of-space during block migration in free_segment_range(). Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 7dede88659df38f96128ab3922c50dde2d29c574 Author: Chao Yu Date: Sat Feb 20 17:35:40 2021 +0800 f2fs: fix to allow migrating fully valid segment F2FS_IOC_FLUSH_DEVICE/F2FS_IOC_RESIZE_FS needs to migrate all blocks of target segment to other place, no matter the segment has partially or fully valid blocks. However, after commit 803e74be04b3 ("f2fs: stop GC when the victim becomes fully valid"), we may skip migration due to target segment is fully valid, result in failing the ioctl interface, fix this. Fixes: 803e74be04b3 ("f2fs: stop GC when the victim becomes fully valid") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim commit c67c8c0f47eb0bf49d6cf165389554e379443968 Author: xuyehan Date: Tue Feb 23 09:31:43 2021 +0800 f2fs: fix a spelling error Delete the letter 'e' before 'number' Signed-off-by: xuyehan Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 2a4bd0c37c87f9f82b6265ec7e716d2a2d4b0c71 Author: jiahao Date: Fri Feb 19 20:46:32 2021 +0800 f2fs: fix a spacing coding style Add a space before the plus. Signed-off-by: jiahao Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim commit 26bf30902c10473ba38f220d3401a61c56d8db3b Author: Tariq Toukan Date: Wed Mar 10 23:09:15 2021 -0800 net/mlx5: Use order-0 allocations for EQs Currently we are allocating high-order page for EQs. In case of fragmented system, VF hot remove/add in VMs for example, there isn't enough contiguous memory for EQs allocation, which results in crashing of the VM. Therefore, use order-0 fragments for the EQ allocations instead. Performance tests: ConnectX-5 100Gbps, CPU: Intel(R) Xeon(R) CPU E5-2697 v3 @ 2.60GHz Performance tests show no sensible degradation. Signed-off-by: Tariq Toukan Signed-off-by: Shay Drory Signed-off-by: Saeed Mahameed commit c3e666f1ada9cbfbe5465f122f9a2d63ddfd25ed Author: Mark Bloch Date: Wed Mar 10 23:09:14 2021 -0800 net/mlx5: Add IFC bits needed for single FDB mode Currently we operate in a mode where each eswitch manager has a separate FDB. In order to combine these multiple FDBs we expose new caps to allow this: - Set root flow table which isn't native. - Set FDB a different selection mode when in LAG mode. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 3a46f4fb55ffd46e475e3fc53b1252f722cf647e Author: Mark Bloch Date: Wed Mar 10 23:09:13 2021 -0800 net/mlx5: E-Switch, Refactor send to vport to be more generic Now that each representor stores a pointer to the managing E-Switch use that information when creating the send-to-vport rules. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 658cfceb6267974056cb50adde8a93a15967c665 Author: Mark Bloch Date: Wed Mar 10 23:09:12 2021 -0800 RDMA/mlx5: Use representor E-Switch when getting netdev and metadata Now that a pointer to the managing E-Switch is stored in the representor use it. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Acked-by: Jason Gunthorpe Signed-off-by: Saeed Mahameed commit 59c904c8fffd903c1dae5fc6a402b88fa6dfc874 Author: Mark Bloch Date: Wed Mar 10 23:09:11 2021 -0800 net/mlx5: E-Switch, Add eswitch pointer to each representor Store the managing E-Switch of each representor. This will be used when a representor is created on eswitch manager 0 but the vport belongs to eswitch manager 1. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 7d97822a8ceccf9b4b3297465f0b2c1cfd4161f9 Author: Mark Bloch Date: Wed Mar 10 23:09:10 2021 -0800 net/mlx5: E-Switch, Add match on vhca id to default send rules Match on the vhca id of the E-Switch owner when creating the send-to-vport representor rules. Signed-off-by: Mark Bloch Reviewed-by: Saeed Mahameed Signed-off-by: Saeed Mahameed commit 59079438a664559bb1f6f5fe85e306962ef9286e Author: Mikhael Goikhman Date: Wed Mar 10 23:09:09 2021 -0800 net/mlx5: Remove unused mlx5_core_health member recover_work The code related to health->recover_work was removed in commit 63cbc552eebf ("net/mlx5: Handle SW reset of FW in error flow") Fix struct mlx5_core_health accordingly. Signed-off-by: Mikhael Goikhman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed commit 027d7166e17869cb46c9224a4b47b00b61408924 Author: Zheng Yongjun Date: Wed Mar 10 23:09:08 2021 -0800 net/mlx5: simplify the return expression of mlx5_esw_offloads_pair() Simplify the return expression. Signed-off-by: Zheng Yongjun Signed-off-by: Saeed Mahameed commit 540ec76d31473c04a195a8501f6ee50b6295626b Author: Saeed Mahameed Date: Wed Mar 10 23:09:07 2021 -0800 net/mlx5: Cleanup prototype warning Cleanup W=1 warning: drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c:49: warning: expecting prototype for Set lag port affinity(). Prototype was for mlx5_lag_set_port_affinity() instead Signed-off-by: Saeed Mahameed commit ee427ea4f12672e5d7874abaa634ddee0ff2bb97 Author: Robin Gong Date: Fri Mar 5 17:19:37 2021 +0800 ASoC: fsl_asrc_dma: request dma channel from specific controller Request dma channel from specific dma controller instead of generic dma controller list, otherwise, may get the wrong dma controller if there are multi dma controllers such as i.MX8MP. Signed-off-by: Robin Gong Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1614935977-21638-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 9f47c9c8bddc79e770ed19366840b9c2ab280ac1 Author: Hans de Goede Date: Sun Mar 7 16:05:03 2021 +0100 ASoC: Intel: bytcr_rt5640: Add used AIF to the components string Depending on which AIF is used the UCM profile needs to setup a different path through the rt5640's "Digital Mixer Path" graph. ATM the UCM profiles solve this by just enabling paths to the outputs / from the input from both AIF1 and AIF2 and then relying on the DAPM framework to power-down the parts of the graph connected to the unused AIF. But in order to be able to use hardware-volumecontrol and to use the hardware mute controls, which are necessary for mute LED control, the UCM profiles need to know which AIF is actually being used. Add a new "aif:1" or "aif:2" part to the component string to provide info about the used AIF to userspace / to the UCM profiles. Note the size of byt_rt5640_components is not increased because the size of 32 chars already is big enough. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307150503.34906-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit 40e4046913a34dd187c94f66c0f43facbff0f430 Author: Hans de Goede Date: Sun Mar 7 16:05:02 2021 +0100 ASoC: rt5640: Rename 'Mono DAC Playback Volume' to 'DAC2 Playback Volume' Rename 'Mono DAC Playback Volume' to 'DAC2 Playback Volume' and move it from rt5640_specific_snd_controls[] to rt5640_snd_controls[]. The RT5640_DAC2_DIG_VOL register controlled by this mixer-element has nothing to do with the Mono (Amplified) output which is only available on the ALC5640 chip and not on the ALC5642 chip. The RT5640_DAC2_DIG_VOL volume-control is the main volume control for audio coming from the I2S2 / AIF2 input of the chip and as such is also available on the ALC5642. This commit results in the following userspace visible changes: 1. On devices with an ACL5640 codec, the 'Mono DAC Playback Volume' control is renamed to 'DAC2 Playback Volume' allowing the alsa-lib mixer code to properly group it with the 'DAC2 Playback Switch' which is controlling the mute bits in the RT5640_DAC2_DIG_VOL register. Note the removal of the 'Mono DAC Playback Volume' is not an issue for userspace because the UCM profiles do not use it (the UCM profiles are shared betweent the 5640 and 5642 and only the 5640 had this control). 2. On devices with an ACL5642 codec, there now will be a new 'DAC2 Playback Volume', grouped with the 'DAC2 Playback Switch' Having a complete 'DAC2 Playback Volume' / 'DAC2 Playback Switch' pair on both variants will allow enabling hardware-volume control by setting the UCM PlaybackMasterElem to "DAC2" on devices where the I2S2/AIF2 interface of the codec is used. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210307150503.34906-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit f7b61287cf17486dd09438115a993d699db2ab3b Author: Pierre-Louis Bossart Date: Fri Mar 12 12:02:31 2021 -0600 ASoC: samsung: tm2_wm5110: remove shadowed variable cppcheck warning: sound/soc/samsung/tm2_wm5110.c:552:26: style: Local variable 'args' shadows outer variable [shadowVariable] struct of_phandle_args args; ^ sound/soc/samsung/tm2_wm5110.c:504:25: note: Shadowed declaration struct of_phandle_args args; ^ sound/soc/samsung/tm2_wm5110.c:552:26: note: Shadow variable struct of_phandle_args args; ^ Move the top-level variable to the lower scope where it's needed. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210312180231.2741-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d58970da324732686529655c21791cef0ee547c4 Author: Pierre-Louis Bossart Date: Fri Mar 12 12:02:30 2021 -0600 ASoC: samsung: tm2_wm5110: check of of_parse return value cppcheck warning: sound/soc/samsung/tm2_wm5110.c:605:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = devm_snd_soc_register_component(dev, &tm2_component, ^ sound/soc/samsung/tm2_wm5110.c:554:7: note: ret is assigned ret = of_parse_phandle_with_args(dev->of_node, "i2s-controller", ^ sound/soc/samsung/tm2_wm5110.c:605:6: note: ret is overwritten ret = devm_snd_soc_register_component(dev, &tm2_component, ^ The args is a stack variable, so it could have junk (uninitialized) therefore args.np could have a non-NULL and random value even though property was missing. Later could trigger invalid pointer dereference. There's no need to check for args.np because args.np won't be initialized on errors. Fixes: 8d1513cef51a ("ASoC: samsung: Add support for HDMI audio on TM2 board") Cc: Suggested-by: Krzysztof Kozlowski Reviewed-by: Krzysztof Kozlowski Reviewed-by: Sylwester Nawrocki Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312180231.2741-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bfdfe7fc1bf9e8c16e4254236c3c731bfea6bdc5 Author: Jonathan Neuschäfer Date: Thu Mar 11 18:22:34 2021 +0100 docs: networking: phy: Improve placement of parenthesis "either" is outside the parentheses, so the matching "or" should be too. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 464b489a7885d6a89b0dfa7b7f1f56e2db80700d Author: Jack Yu Date: Fri Mar 12 02:45:15 2021 +0000 ASoC: rt1015p: add acpi device id for rt1015p Add acpi device id for rt1015p. Signed-off-by: Jack Yu Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/949671bd00c14b6d9aa5e85cc14be5d4@realtek.com Signed-off-by: Mark Brown commit b7c7203a1f751348f35fc4bcb157572d303f7573 Author: Hans de Goede Date: Fri Mar 12 12:48:50 2021 +0100 ASoC: Intel: bytcr_rt5640: Enable jack-detect support on Asus T100TAF The Asus T100TAF uses the same jack-detect settings as the T100TA, this has been confirmed on actual hardware. Add these settings to the T100TAF quirks to enable jack-detect support on the T100TAF. Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210312114850.13832-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit d11233e0dee693fa28cd5023a0e4a212f4c80ed4 Merge: 12ef51b116693 05d8a019eb057 Author: Mark Brown Date: Fri Mar 12 18:05:11 2021 +0000 Merge series "spi: finalize 'delay_usecs' removal/transition" from Alexandru Ardelean : A while back I started the introduction of the 'spi_delay' data type: https://lore.kernel.org/linux-spi/20190926105147.7839-1-alexandru.ardelean@analog.com/ Users of the 'delay_usecs' were removed from drivers. Now it's time to remove the 'delay_usecs' from the SPI subsystem and use only the 'delay' field. This changeset adapts all SPI drivers to do without 'delay_usecs'. Additionally, for greybus we need to adapt it to use the 'delay' in nano-seconds and convert it to micro-seconds. Alexandru Ardelean (10): spi: spi-axi-spi-engine: remove usage of delay_usecs spi: bcm63xx-spi: don't check 'delay_usecs' field spi: spi-bcm-qspi: replace 'delay_usecs' with 'delay.value' check spi: spi-sh: replace 'delay_usecs' with 'delay.value' in pr_debug spi: spi-tegra20-flash: don't check 'delay_usecs' field for spi transfer staging: greybus: spilib: use 'spi_delay_to_ns' for getting xfer delay spi: spi-falcon: remove check for 'delay_usecs' spi: fsl-espi: remove usage of 'delay_usecs' field spi: core: remove 'delay_usecs' field from spi_transfer spi: docs: update info about 'delay_usecs' Documentation/spi/spi-summary.rst | 7 +++++-- drivers/spi/spi-axi-spi-engine.c | 12 ++++-------- drivers/spi/spi-bcm-qspi.c | 2 +- drivers/spi/spi-bcm63xx.c | 2 +- drivers/spi/spi-falcon.c | 2 +- drivers/spi/spi-fsl-espi.c | 17 +++++------------ drivers/spi/spi-sh.c | 4 ++-- drivers/spi/spi-tegra20-sflash.c | 3 +-- drivers/spi/spi.c | 1 - drivers/staging/greybus/spilib.c | 5 ++++- include/linux/spi/spi.h | 12 ------------ 11 files changed, 24 insertions(+), 43 deletions(-) -- 2.29.2 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel commit c00af5f32ce1940a6ff204a8b90fcf3119fbb7e6 Merge: 14667403a5631 531590bb40f82 Author: Mark Brown Date: Fri Mar 12 18:05:09 2021 +0000 Merge series "ASoC: soc-pcm: cleanup each functions" from Kuninori Morimoto : Hi Mark These are v2 of soc-pcm cleanup patches. These has no relationship to each other. My 1 concern is [3/8] patch. I think it is no problem, but I'm not 100% sure why current code was such code. Pierre-Louis / Liam might about something. v1 -> v2 - soc_cpu/codec_dai_name() is now inline function - rename soc_pcm_care_symmetry() to soc_pcm_update_symmetry() v2 -> v3 - log fix at [6/8] - Thus, it will be minus users at (2). + Thus, users will be a negative number at (2) Link: https://lore.kernel.org/r/87tupuqqc8.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87tupqpg9x.wl-kuninori.morimoto.gx@renesas.com Kuninori Morimoto (8): ASoC: soc-pcm: check DAI activity under soc_pcm_apply_symmetry() ASoC: soc-pcm: add soc_cpu/codec_dai_name() macro ASoC: soc-pcm: direct copy at snd_soc_set_runtime_hwparams() ASoC: soc-pcm: add soc_pcm_update_symmetry() ASoC: soc-pcm: add soc_hw_sanity_check() ASoC: soc-pcm: fixup dpcm_be_dai_startup() user count ASoC: soc-pcm: remove unneeded !rtd->dai_link check ASoC: soc-pcm: share DPCM BE DAI stop operation include/sound/soc-dpcm.h | 8 +- sound/soc/soc-compress.c | 2 +- sound/soc/soc-pcm.c | 243 ++++++++++++++++----------------------- 3 files changed, 105 insertions(+), 148 deletions(-) -- 2.25.1 commit f67cc6a91d88b0f924e895249c217b2c61461db1 Author: Vinod Koul Date: Fri Mar 12 10:57:37 2021 +0530 arm64: dts: qcom: sm8350-mtp: Add PMICs SM8350-MTP features PM8350, PM8350B, PM8350C, PMK8350, PMR735A and PMR735B. PMICs Add the dtsi for these PMICs to MTP. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210312052737.3558801-9-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 93e7195946020e010578e374e9829587a8b162d0 Author: Vinod Koul Date: Fri Mar 12 10:57:36 2021 +0530 arm64: dts: qcom: pmr735B: Add base dts file Add base DTS file for PMR735B along with GPIO node Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210312052737.3558801-8-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 59319dee210943c69f53ec1d4df3efc9321b2919 Author: Vinod Koul Date: Fri Mar 12 10:57:35 2021 +0530 arm64: dts: qcom: pmr735a: Add base dts file Add base DTS file for PMR735A along with GPIO node Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210312052737.3558801-7-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 58befd8f60e6291110852c7bacc7ad5d53c7e9bd Author: Vinod Koul Date: Fri Mar 12 10:57:34 2021 +0530 arm64: dts: qcom: pm8350c: Add base dts file Add base DTS file for PM8350C along with GPIO node Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210312052737.3558801-6-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 950775d9cb70e864f2c49eb8061469f1ce473cb6 Author: Vinod Koul Date: Fri Mar 12 10:57:33 2021 +0530 arm64: dts: qcom: pm8350b: Add base dts file Add base DTS file for PM8350B along with GPIO node Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210312052737.3558801-5-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 094da73ff0e5701e42ee14d2f4c36b8958096c4e Author: Vinod Koul Date: Fri Mar 12 10:57:32 2021 +0530 arm64: dts: qcom: pm8350: Add base dts file Add base DTS file for PM8350 along with GPIO node Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210312052737.3558801-4-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 712d68d128bc7353aa00b2b8616cb42f053f423c Author: Vinod Koul Date: Fri Mar 12 10:57:31 2021 +0530 arm64: dts: qcom: pmk8350: Add base dts file Add base DTS file for PMK8350 along with GPIO node Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210312052737.3558801-3-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 389cd7acbb2f94f3fc91938dc877f273ce5a207b Author: Vinod Koul Date: Fri Mar 12 10:57:30 2021 +0530 arm64: dts: qcom: sm8350: Add spmi node Add SPMI node found in SM8350 SoC Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210312052737.3558801-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 55c9731662b8bf0bc48aabdbf9f54d779bc072a1 Author: Bhaskar Chowdhury Date: Fri Mar 12 17:12:07 2021 +0530 staging: wimax: i2400m: Mundane typos fix in the file tx.c s/exahusted/exhausted/ s/caleed/called/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210312114207.3624-1-unixbhaskar@gmail.com Signed-off-by: Greg Kroah-Hartman commit 88208fa7787cbefda09525fdafdc8e2ca8cf790f Author: Atul Gopinathan Date: Wed Mar 10 16:13:54 2021 +0530 staging: rtl8192u: ieee80211: Remove braces for single line blocks Remove braces around those `if` and `for` blocks which contain a single line and therefore fix the Checkpatch warning of the following type: "WARNING: braces {} are not necessary for single statement blocks" Signed-off-by: Atul Gopinathan Link: https://lore.kernel.org/r/20210310104353.14531-1-atulgopinathan@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7b2b5d27cbd31d58ff90a9868e1892caa52f999c Author: Selvakumar Elangovan Date: Tue Mar 9 20:30:37 2021 +0530 staging: rtl8712: fixed whitespace coding style issue Removed additional whitespaces in the rtl8712_xmit.h file. Signed-off-by: Selvakumar Elangovan Link: https://lore.kernel.org/r/20210309150037.17883-1-selvakumar16197@gmail.com Signed-off-by: Greg Kroah-Hartman commit f6a4ac8fd29caf51154222caec62287050e22c68 Author: Selvakumar Elangovan Date: Tue Mar 9 19:55:47 2021 +0530 staging: rtl8712: fixed no space coding style issue Added space around the binary operator for readability in rtl8712_xmit.h file Signed-off-by: Selvakumar Elangovan Link: https://lore.kernel.org/r/20210309142547.16974-1-selvakumar16197@gmail.com Signed-off-by: Greg Kroah-Hartman commit ce8d69deeae15df97d7b3872e3f601ff862ead63 Author: Fabio Aiuto Date: Fri Mar 12 11:51:37 2021 +0100 staging: rtl8723bs: put quoted string in a single line fix the following checkpatch issues: WARNING: quoted string split across lines + DBG_871X("HT: STA %pM HT Capabilities " + "Info: 0x%04x\n", MAC_ARG(psta->hwaddr), ht_capab); WARNING: quoted string split across lines + DBG_871X("%s STA %pM - no " + "greenfield, num of non-gf stations %d\n", WARNING: quoted string split across lines + DBG_871X("%s STA %pM - 20 MHz HT, " + "num of 20MHz HT STAs %d\n", Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210312105134.GA6079@agape.jhs Signed-off-by: Greg Kroah-Hartman commit 3dbd2e627780b9af782181f84a9d45b9d5a8968f Author: Hao Peng Date: Fri Mar 12 09:07:52 2021 +0800 staging: rtl8723bs: remove extra lines Remove extra lines in many functions in hal_intf.c. Signed-off-by: Hao Peng Link: https://lore.kernel.org/r/20210312010752.27448-1-penghaob@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 88b895e08d87851f5327cc45adab53074bc0f21a Author: Hao Peng Date: Fri Mar 12 08:59:34 2021 +0800 staging: rtl8723bs: remove extra space Remove extra space in hal_intf.c. Signed-off-by: Hao Peng Link: https://lore.kernel.org/r/20210312005934.21895-1-penghaob@uniontech.com Signed-off-by: Greg Kroah-Hartman commit 87a12e95df856d140e53bd700a69bc32c1abca84 Author: Colin Ian King Date: Thu Mar 11 09:33:04 2021 +0000 staging: rtl8723bs: Fix spelling mistake "disabed" -> "disabled" There is a spelling mistake in a comment, fix it. Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210311093304.5573-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 0345785ebed3d56c26f6259fa580b9c01f33591d Author: Fabio Aiuto Date: Wed Mar 10 23:27:31 2021 +0100 staging: rtl8723bs: align and beautify comments fix the following checkpatch warnings: WARNING: Block comments use * on subsequent lines + /* + AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k -- WARNING: Block comments use * on subsequent lines +/* +op_mode Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210310222728.GA3246@agape.jhs Signed-off-by: Greg Kroah-Hartman commit 3f8efa1606327d2714b6a2afc68e3bae6728920d Author: Fabio Aiuto Date: Wed Mar 10 10:37:23 2021 +0100 staging: rtl8723bs: remove unused code block Remove conditional code block checked by unused CONFIG_GPIO_WAKEUP Cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210310093719.GA8646@agape.jhs Signed-off-by: Greg Kroah-Hartman commit 3499037e997dc3b8ef0db216fcd8d5a0d855d227 Author: Marco Cesati Date: Fri Mar 12 09:26:38 2021 +0100 staging: rtl8723bs: remove typedefs in odm_DynamicBBPowerSaving.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #11: FILE: hal/odm_DynamicBBPowerSaving.h:11: +typedef struct _Dynamic_Power_Saving_ { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-34-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4cfc1074eb7de277ebfc0fcd6b415e531a9aa468 Author: Marco Cesati Date: Fri Mar 12 09:26:37 2021 +0100 staging: rtl8723bs: remove typedefs in hal_btcoex.c This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #23: FILE: hal/hal_btcoex.c:23: +typedef struct _btcoexdbginfo { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-33-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit d7c2b41f40fe997bd1cc10282bd4bd653c99aca7 Author: Marco Cesati Date: Fri Mar 12 09:26:36 2021 +0100 staging: rtl8723bs: remove typedefs in odm_DIG.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #11: FILE: hal/odm_DIG.h:11: +typedef struct _Dynamic_Initial_Gain_Threshold_ { WARNING: do not add new typedefs #62: FILE: hal/odm_DIG.h:62: +typedef struct false_ALARM_STATISTICS { WARNING: do not add new typedefs #80: FILE: hal/odm_DIG.h:80: +typedef enum tag_Dynamic_Init_Gain_Operation_Type_Definition { WARNING: do not add new typedefs #91: FILE: hal/odm_DIG.h:91: +typedef enum tag_ODM_PauseDIG_Type { WARNING: do not add new typedefs #96: FILE: hal/odm_DIG.h:96: +typedef enum tag_ODM_PauseCCKPD_Type { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-32-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9a8dfb50d26afa335f056797367ea956fb4980a1 Author: Marco Cesati Date: Fri Mar 12 09:26:35 2021 +0100 staging: rtl8723bs: remove typedefs in hal_btcoex.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #14: FILE: include/hal_btcoex.h:14: +typedef struct _BT_COEXIST { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-31-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1dad326cfd60b0664b69522d7c9ee04d2b29c306 Author: Marco Cesati Date: Fri Mar 12 09:26:34 2021 +0100 staging: rtl8723bs: remove typedefs in rtw_efuse.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #60: FILE: include/rtw_efuse.h:60: +typedef struct PG_PKT_STRUCT_A { WARNING: do not add new typedefs #68: FILE: include/rtw_efuse.h:68: +typedef struct _EFUSE_HAL { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-30-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 00d5865c960a6de5a8b7cbdcd24d3c33cc307c0a Author: Marco Cesati Date: Fri Mar 12 09:26:33 2021 +0100 staging: rtl8723bs: remove typedefs in osdep_service_linux.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #43: FILE: include/osdep_service_linux.h:43: + typedef spinlock_t _lock; WARNING: do not add new typedefs #44: FILE: include/osdep_service_linux.h:44: + typedef struct mutex _mutex; WARNING: do not add new typedefs #45: FILE: include/osdep_service_linux.h:45: + typedef struct timer_list _timer; WARNING: do not add new typedefs #52: FILE: include/osdep_service_linux.h:52: + typedef struct sk_buff _pkt; WARNING: do not add new typedefs #53: FILE: include/osdep_service_linux.h:53: + typedef unsigned char _buffer; WARNING: do not add new typedefs #55: FILE: include/osdep_service_linux.h:55: + typedef int _OS_STATUS; WARNING: do not add new typedefs #57: FILE: include/osdep_service_linux.h:57: + typedef unsigned long _irqL; WARNING: do not add new typedefs #58: FILE: include/osdep_service_linux.h:58: + typedef struct net_device * _nic_hdl; WARNING: do not add new typedefs #62: FILE: include/osdep_service_linux.h:62: + typedef void timer_hdl_return; WARNING: do not add new typedefs #63: FILE: include/osdep_service_linux.h:63: + typedef void* timer_hdl_context; WARNING: do not add new typedefs #65: FILE: include/osdep_service_linux.h:65: + typedef struct work_struct _workitem; Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-29-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit d495c5503d1339cb57ab0bab428e43fd062d0678 Author: Marco Cesati Date: Fri Mar 12 09:26:32 2021 +0100 staging: rtl8723bs: remove typedefs in basic_types.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #16: FILE: include/basic_types.h:16: +typedef signed int sint; Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-28-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 95cf028829cfc3fba576865136253f4b49d829fb Author: Marco Cesati Date: Fri Mar 12 09:26:31 2021 +0100 staging: rtl8723bs: remove typedefs in ieee80211.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #128: FILE: include/ieee80211.h:128: +typedef enum _RATEID_IDX_ { WARNING: do not add new typedefs #142: FILE: include/ieee80211.h:142: +typedef enum _RATR_TABLE_MODE { WARNING: do not add new typedefs #986: FILE: include/ieee80211.h:986: +typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes; Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-27-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 41ec878176044c5c5c60b9cbd05ab033f8e24a32 Author: Marco Cesati Date: Fri Mar 12 09:26:30 2021 +0100 staging: rtl8723bs: remove typedefs in sta_info.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #34: FILE: include/sta_info.h:34: +typedef struct _RSSI_STA { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-26-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 16f84d63f1f7c2a08592e1ca87419aed31c16064 Author: Marco Cesati Date: Fri Mar 12 09:26:29 2021 +0100 staging: rtl8723bs: remove typedefs in HalPwrSeqCmd.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #85: FILE: include/HalPwrSeqCmd.h:85: +typedef enum _PWRSEQ_CMD_DELAY_UNIT_ { WARNING: do not add new typedefs #90: FILE: include/HalPwrSeqCmd.h:90: +typedef struct _WL_PWR_CFG_ { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-25-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit d44d0312b3fd064dbc936ebc6fdb7b6a74bf38f2 Author: Marco Cesati Date: Fri Mar 12 09:26:28 2021 +0100 staging: rtl8723bs: remove typedefs in rtw_mlme_ext.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #118: FILE: include/rtw_mlme_ext.h:118: +typedef enum _RT_CHANNEL_DOMAIN { WARNING: do not add new typedefs #186: FILE: include/rtw_mlme_ext.h:186: +typedef enum _RT_CHANNEL_DOMAIN_2G { WARNING: do not add new typedefs #198: FILE: include/rtw_mlme_ext.h:198: +typedef enum _RT_CHANNEL_DOMAIN_5G { WARNING: do not add new typedefs #241: FILE: include/rtw_mlme_ext.h:241: +typedef struct _RT_CHANNEL_PLAN { WARNING: do not add new typedefs #246: FILE: include/rtw_mlme_ext.h:246: +typedef struct _RT_CHANNEL_PLAN_2G { WARNING: do not add new typedefs #251: FILE: include/rtw_mlme_ext.h:251: +typedef struct _RT_CHANNEL_PLAN_5G { WARNING: do not add new typedefs #256: FILE: include/rtw_mlme_ext.h:256: +typedef struct _RT_CHANNEL_PLAN_MAP { WARNING: do not add new typedefs #273: FILE: include/rtw_mlme_ext.h:273: +typedef enum _HT_IOT_PEER { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-24-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 23004f3b7393981948def0bd64d251700a998f5c Author: Marco Cesati Date: Fri Mar 12 09:26:27 2021 +0100 staging: rtl8723bs: remove typedefs in rtl8723b_hal.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #173: FILE: include/rtl8723b_hal.h:173: +typedef enum _C2H_EVT { WARNING: do not add new typedefs #189: FILE: include/rtl8723b_hal.h:189: +typedef struct _C2H_EVT_HDR { WARNING: do not add new typedefs #195: FILE: include/rtl8723b_hal.h:195: +typedef enum tag_Package_Definition { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-23-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit f30c26236c4158dca18d9469fb8197d595797dbe Author: Marco Cesati Date: Fri Mar 12 09:26:26 2021 +0100 staging: rtl8723bs: remove typedefs in HalVerDef.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #11: FILE: include/HalVerDef.h:11: +typedef enum tag_HAL_IC_Type_Definition { WARNING: do not add new typedefs #25: FILE: include/HalVerDef.h:25: +typedef enum tag_HAL_CHIP_Type_Definition { WARNING: do not add new typedefs #32: FILE: include/HalVerDef.h:32: +typedef enum tag_HAL_Cut_Version_Definition { WARNING: do not add new typedefs #47: FILE: include/HalVerDef.h:47: +typedef enum tag_HAL_Manufacturer_Version_Definition { WARNING: do not add new typedefs #53: FILE: include/HalVerDef.h:53: +typedef enum tag_HAL_RF_Type_Definition { WARNING: do not add new typedefs #64: FILE: include/HalVerDef.h:64: +typedef struct tag_HAL_VERSION { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-22-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 07d4ad3e4676b6006caf1cc85db2385c2667408a Author: Marco Cesati Date: Fri Mar 12 09:26:25 2021 +0100 staging: rtl8723bs: remove typedefs in rtl8723b_xmit.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #62: FILE: include/rtl8723b_xmit.h:62: +typedef struct txdesc_8723b { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-21-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit bb5aedbecb79571f123392be639b3c7b5361b1ce Author: Marco Cesati Date: Fri Mar 12 09:26:24 2021 +0100 staging: rtl8723bs: remove typedefs in hal_com_h2c.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #251: FILE: include/hal_com_h2c.h:251: +typedef struct _RSVDPAGE_LOC { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-20-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 65fb2f98c9166cd04b29900e398b7fc66a54beea Author: Marco Cesati Date: Fri Mar 12 09:26:23 2021 +0100 staging: rtl8723bs: remove typedefs in rtw_security.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #87: FILE: include/rtw_security.h:87: +typedef struct _RT_PMKID_LIST { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-19-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2c9b5a030e77f7a904ecbca83ae14e4ce8adf281 Author: Marco Cesati Date: Fri Mar 12 09:26:22 2021 +0100 staging: rtl8723bs: remove typedefs in osdep_service.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #83: FILE: include/osdep_service.h:83: +typedef enum mstat_status { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-18-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 4399c37cfd097ed79ba0a9626fa62fd4c707d01e Author: Marco Cesati Date: Fri Mar 12 09:26:21 2021 +0100 staging: rtl8723bs: remove typedefs in rtw_mp.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #52: FILE: include/rtw_mp.h:52: +typedef struct _MPT_CONTEXT { WARNING: do not add new typedefs #268: FILE: include/rtw_mp.h:268: +typedef struct _IOCMD_STRUCT_ { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-17-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8b6caa1555f14c4c7f6b8e0a44ea7602d3fd12f2 Author: Marco Cesati Date: Fri Mar 12 09:26:20 2021 +0100 staging: rtl8723bs: remove typedefs in wlan_bssdef.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #130: FILE: include/wlan_bssdef.h:130: +typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION { WARNING: do not add new typedefs #148: FILE: include/wlan_bssdef.h:148: +typedef struct _NDIS_802_11_KEY { WARNING: do not add new typedefs #157: FILE: include/wlan_bssdef.h:157: +typedef struct _NDIS_802_11_REMOVE_KEY { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-16-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5b8ee2af457baa126adb3d30833fae9eb41791f4 Author: Marco Cesati Date: Fri Mar 12 09:26:19 2021 +0100 staging: rtl8723bs: remove typedefs in rtw_ioctl_set.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #13: FILE: include/rtw_ioctl_set.h:13: +typedef struct _BSSIDInfo { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-15-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8497bcd99451f74630a320ea34a36383f40f8a1a Author: Marco Cesati Date: Fri Mar 12 09:26:18 2021 +0100 staging: rtl8723bs: remove typedefs in rtw_ht.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #40: FILE: include/rtw_ht.h:40: +typedef enum AGGRE_SIZE { WARNING: do not add new typedefs #51: FILE: include/rtw_ht.h:51: +typedef enum _RT_HT_INF0_CAP { WARNING: do not add new typedefs #62: FILE: include/rtw_ht.h:62: +typedef enum _RT_HT_INF1_CAP { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-14-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7fa19d064a149630899c8e5d9957ac8be6b2de2a Author: Marco Cesati Date: Fri Mar 12 09:26:17 2021 +0100 staging: rtl8723bs: remove typedefs in drv_types.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #374: FILE: include/drv_types.h:374: +typedef enum _DRIVER_STATE { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-13-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 84e4a52d6951f7ea29f58350578d2c17b6906203 Author: Marco Cesati Date: Fri Mar 12 09:26:16 2021 +0100 staging: rtl8723bs: remove typedefs in hal_com.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #168: FILE: include/hal_com.h:168: +typedef enum _RT_MEDIA_STATUS { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-12-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit e1d700a59977f8c680dba79f876bab04b47806c4 Author: Marco Cesati Date: Fri Mar 12 09:26:15 2021 +0100 staging: rtl8723bs: remove typedefs in rtw_eeprom.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #45: FILE: include/rtw_eeprom.h:45: +typedef enum _RT_CUSTOMER_ID { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-11-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 88e5d8626327a18f6ae5a64cfe1549b73ec3651c Author: Marco Cesati Date: Fri Mar 12 09:26:14 2021 +0100 staging: rtl8723bs: remove typedefs in odm_types.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #18: FILE: hal/odm_types.h:18: +typedef enum _HAL_STATUS { WARNING: do not add new typedefs #33: FILE: hal/odm_types.h:33: +typedef enum _RT_SPINLOCK_TYPE { WARNING: do not add new typedefs #77: FILE: hal/odm_types.h:77: + typedef struct timer_list RT_TIMER, *PRT_TIMER; WARNING: do not add new typedefs #78: FILE: hal/odm_types.h:78: + typedef void *RT_TIMER_CALL_BACK; Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-10-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 1cd767554132305ad106c5fbb0d954f01a377490 Author: Marco Cesati Date: Fri Mar 12 09:26:13 2021 +0100 staging: rtl8723bs: remove typedefs in odm_HWConfig.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #33: FILE: hal/odm_HWConfig.h:33: +typedef struct _Phy_Rx_AGC_Info { WARNING: do not add new typedefs #41: FILE: hal/odm_HWConfig.h:41: +typedef struct _Phy_Status_Rpt_8192cd { WARNING: do not add new typedefs #80: FILE: hal/odm_HWConfig.h:80: +typedef struct _Phy_Status_Rpt_8812 { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-9-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 26482bed813b10b7e6780abcd7ca8bfe59a57753 Author: Marco Cesati Date: Fri Mar 12 09:26:12 2021 +0100 staging: rtl8723bs: remove typedefs in odm_EdcaTurboCheck.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #11: FILE: hal/odm_EdcaTurboCheck.h:11: +typedef struct _EDCA_TURBO_ { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-8-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 41da002ed06dcb8dd34442ac5d4a99fe87e969cc Author: Marco Cesati Date: Fri Mar 12 09:26:11 2021 +0100 staging: rtl8723bs: remove typedefs in odm_interface.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #42: FILE: hal/odm_interface.h:42: +typedef enum _ODM_H2C_CMD { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-7-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit f61ada8c23db0f0b3eeccd13c67e1df5d86b4372 Author: Marco Cesati Date: Fri Mar 12 09:26:10 2021 +0100 staging: rtl8723bs: remove typedefs in odm_NoiseMonitor.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #27: FILE: hal/odm_NoiseMonitor.h:27: +typedef struct _ODM_NOISE_MONITOR_ { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-6-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6d12413cae3059bb3cf837f2cee84b9707ceb5cd Author: Marco Cesati Date: Fri Mar 12 09:26:09 2021 +0100 staging: rtl8723bs: remove typedefs in odm_CfoTracking.h This commit fixes the following checkpatch.pl warning: WARNING: do not add new typedefs #15: FILE: hal/odm_CfoTracking.h:15: +typedef struct _CFO_TRACKING_ { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-5-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 694a76b996c78d7b1178bb4d624e94d75da1e831 Author: Marco Cesati Date: Fri Mar 12 09:26:08 2021 +0100 staging: rtl8723bs: remove typedefs in odm.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #95: FILE: hal/odm.h:95: +typedef struct _Rate_Adaptive_Table_ { WARNING: do not add new typedefs #99: FILE: hal/odm.h:99: +typedef struct _RX_High_Power_ { WARNING: do not add new typedefs #129: FILE: hal/odm.h:129: +typedef struct _SW_Antenna_Switch_ { WARNING: do not add new typedefs #181: FILE: hal/odm.h:181: +typedef struct _ODM_RATE_ADAPTIVE { WARNING: do not add new typedefs #280: FILE: hal/odm.h:280: +typedef enum tag_Dynamic_ODM_Support_Ability_Type { WARNING: do not add new typedefs #300: FILE: hal/odm.h:300: +typedef struct _ODM_STA_INFO { WARNING: do not add new typedefs #328: FILE: hal/odm.h:328: +typedef enum _ODM_Common_Info_Definition { WARNING: do not add new typedefs #418: FILE: hal/odm.h:418: +typedef enum _ODM_Support_Ability_Definition { WARNING: do not add new typedefs #449: FILE: hal/odm.h:449: +typedef enum tag_ODM_Support_Interface_Definition { WARNING: do not add new typedefs #455: FILE: hal/odm.h:455: +typedef enum tag_ODM_Support_IC_Type_Definition { WARNING: do not add new typedefs #460: FILE: hal/odm.h:460: +typedef enum tag_ODM_Cut_Version_Definition { WARNING: do not add new typedefs #475: FILE: hal/odm.h:475: +typedef enum tag_ODM_Fab_Version_Definition { WARNING: do not add new typedefs #484: FILE: hal/odm.h:484: +typedef enum tag_ODM_RF_Path_Bit_Definition { WARNING: do not add new typedefs #495: FILE: hal/odm.h:495: +typedef enum tag_ODM_RF_Type_Definition { WARNING: do not add new typedefs #516: FILE: hal/odm.h:516: +typedef enum tag_ODM_MAC_PHY_Mode_Definition { WARNING: do not add new typedefs #522: FILE: hal/odm.h:522: +typedef enum tag_BT_Coexist_Definition { WARNING: do not add new typedefs #530: FILE: hal/odm.h:530: +typedef enum tag_Operation_Mode_Definition { WARNING: do not add new typedefs #543: FILE: hal/odm.h:543: +typedef enum tag_Wireless_Mode_Definition { WARNING: do not add new typedefs #555: FILE: hal/odm.h:555: +typedef enum tag_Band_Type_Definition { WARNING: do not add new typedefs #563: FILE: hal/odm.h:563: +typedef enum tag_Secondary_Channel_Offset_Definition { WARNING: do not add new typedefs #570: FILE: hal/odm.h:570: +typedef enum tag_Security_Definition { WARNING: do not add new typedefs #582: FILE: hal/odm.h:582: +typedef enum tag_Bandwidth_Definition { WARNING: do not add new typedefs #593: FILE: hal/odm.h:593: +typedef enum tag_Board_Definition { WARNING: do not add new typedefs #605: FILE: hal/odm.h:605: +typedef enum tag_ODM_Package_Definition { WARNING: do not add new typedefs #612: FILE: hal/odm.h:612: +typedef enum tag_ODM_TYPE_GPA_Definition { WARNING: do not add new typedefs #617: FILE: hal/odm.h:617: +typedef enum tag_ODM_TYPE_APA_Definition { WARNING: do not add new typedefs #622: FILE: hal/odm.h:622: +typedef enum tag_ODM_TYPE_GLNA_Definition { WARNING: do not add new typedefs #629: FILE: hal/odm.h:629: +typedef enum tag_ODM_TYPE_ALNA_Definition { WARNING: do not add new typedefs #637: FILE: hal/odm.h:637: +typedef enum tag_CCA_Path { WARNING: do not add new typedefs #643: FILE: hal/odm.h:643: +typedef struct _ODM_RA_Info_ { WARNING: do not add new typedefs #675: FILE: hal/odm.h:675: +typedef struct _IQK_MATRIX_REGS_SETTING { WARNING: do not add new typedefs #683: FILE: hal/odm.h:683: +typedef struct ODM_RF_Calibration_Structure { WARNING: do not add new typedefs #788: FILE: hal/odm.h:788: +typedef struct _FAST_ANTENNA_TRAINNING_ { WARNING: do not add new typedefs #828: FILE: hal/odm.h:828: +typedef enum _FAT_STATE { WARNING: do not add new typedefs #833: FILE: hal/odm.h:833: +typedef enum _ANT_DIV_TYPE { WARNING: do not add new typedefs #843: FILE: hal/odm.h:843: +typedef struct _ODM_PATH_DIVERSITY_ { WARNING: do not add new typedefs #852: FILE: hal/odm.h:852: +typedef enum _BASEBAND_CONFIG_PHY_REG_PG_VALUE_TYPE { WARNING: do not add new typedefs #860: FILE: hal/odm.h:860: +typedef struct _ANT_DETECTED_INFO { WARNING: do not add new typedefs #870: FILE: hal/odm.h:870: +typedef struct DM_Out_Source_Dynamic_Mechanism_Structure { WARNING: do not add new typedefs #1229: FILE: hal/odm.h:1229: + typedef enum _ODM_RF_CONTENT { WARNING: do not add new typedefs #1236: FILE: hal/odm.h:1236: +typedef enum _ODM_BB_Config_Type { WARNING: do not add new typedefs #1246: FILE: hal/odm.h:1246: +typedef enum _ODM_RF_Config_Type { WARNING: do not add new typedefs #1251: FILE: hal/odm.h:1251: +typedef enum _ODM_FW_Config_Type { WARNING: do not add new typedefs #1262: FILE: hal/odm.h:1262: +typedef enum _RT_STATUS { WARNING: do not add new typedefs #1319: FILE: hal/odm.h:1319: +typedef enum tag_1R_CCA_Type_Definition { WARNING: do not add new typedefs #1325: FILE: hal/odm.h:1325: +typedef enum tag_RF_Type_Definition { WARNING: do not add new typedefs #1334: FILE: hal/odm.h:1334: +typedef enum tag_SW_Antenna_Switch_Definition { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-4-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 743c5f852e54e8f1937e9f62a0440d0493fa06f7 Author: Marco Cesati Date: Fri Mar 12 09:26:07 2021 +0100 staging: rtl8723bs: remove typedefs in rtw_mlme.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #84: FILE: include/rtw_mlme.h:84: +typedef enum _RT_SCAN_TYPE { WARNING: do not add new typedefs #137: FILE: include/rtw_mlme.h:137: +typedef struct _RT_LINK_DETECT_T { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-3-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 29a91bc271746b4717fa584a1be95bedbd0c73cd Author: Marco Cesati Date: Fri Mar 12 09:26:06 2021 +0100 staging: rtl8723bs: remove typedefs in HalBtcOutSrc.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #47: FILE: hal/HalBtcOutSrc.h:47: +typedef enum _BTC_POWERSAVE_TYPE { WARNING: do not add new typedefs #54: FILE: hal/HalBtcOutSrc.h:54: +typedef enum _BTC_BT_REG_TYPE { WARNING: do not add new typedefs #63: FILE: hal/HalBtcOutSrc.h:63: +typedef enum _BTC_CHIP_INTERFACE { WARNING: do not add new typedefs #71: FILE: hal/HalBtcOutSrc.h:71: +typedef enum _BTC_CHIP_TYPE { WARNING: do not add new typedefs #81: FILE: hal/HalBtcOutSrc.h:81: +typedef enum _BTC_MSG_TYPE { WARNING: do not add new typedefs #167: FILE: hal/HalBtcOutSrc.h:167: +typedef struct _BTC_BOARD_INFO { WARNING: do not add new typedefs #177: FILE: hal/HalBtcOutSrc.h:177: +typedef enum _BTC_DBG_OPCODE { WARNING: do not add new typedefs #187: FILE: hal/HalBtcOutSrc.h:187: +typedef enum _BTC_RSSI_STATE { WARNING: do not add new typedefs #200: FILE: hal/HalBtcOutSrc.h:200: +typedef enum _BTC_WIFI_ROLE { WARNING: do not add new typedefs #208: FILE: hal/HalBtcOutSrc.h:208: +typedef enum _BTC_WIFI_BW_MODE { WARNING: do not add new typedefs #215: FILE: hal/HalBtcOutSrc.h:215: +typedef enum _BTC_WIFI_TRAFFIC_DIR { WARNING: do not add new typedefs #221: FILE: hal/HalBtcOutSrc.h:221: +typedef enum _BTC_WIFI_PNP { WARNING: do not add new typedefs #228: FILE: hal/HalBtcOutSrc.h:228: +typedef enum _BT_WIFI_COEX_STATE { WARNING: do not add new typedefs #239: FILE: hal/HalBtcOutSrc.h:239: +typedef enum _BTC_GET_TYPE { WARNING: do not add new typedefs #281: FILE: hal/HalBtcOutSrc.h:281: +typedef enum _BTC_SET_TYPE { WARNING: do not add new typedefs #321: FILE: hal/HalBtcOutSrc.h:321: +typedef enum _BTC_DBG_DISP_TYPE { WARNING: do not add new typedefs #328: FILE: hal/HalBtcOutSrc.h:328: +typedef enum _BTC_NOTIFY_TYPE_IPS { WARNING: do not add new typedefs #334: FILE: hal/HalBtcOutSrc.h:334: +typedef enum _BTC_NOTIFY_TYPE_LPS { WARNING: do not add new typedefs #340: FILE: hal/HalBtcOutSrc.h:340: +typedef enum _BTC_NOTIFY_TYPE_SCAN { WARNING: do not add new typedefs #346: FILE: hal/HalBtcOutSrc.h:346: +typedef enum _BTC_NOTIFY_TYPE_ASSOCIATE { WARNING: do not add new typedefs #352: FILE: hal/HalBtcOutSrc.h:352: +typedef enum _BTC_NOTIFY_TYPE_MEDIA_STATUS { WARNING: do not add new typedefs #358: FILE: hal/HalBtcOutSrc.h:358: +typedef enum _BTC_NOTIFY_TYPE_SPECIAL_PACKET { WARNING: do not add new typedefs #366: FILE: hal/HalBtcOutSrc.h:366: +typedef enum _BTC_NOTIFY_TYPE_STACK_OPERATION { WARNING: do not add new typedefs #374: FILE: hal/HalBtcOutSrc.h:374: +typedef enum _BTC_ANTENNA_POS { WARNING: do not add new typedefs #412: FILE: hal/HalBtcOutSrc.h:412: +typedef struct _BTC_BT_INFO { WARNING: do not add new typedefs #440: FILE: hal/HalBtcOutSrc.h:440: +typedef struct _BTC_STACK_INFO { WARNING: do not add new typedefs #455: FILE: hal/HalBtcOutSrc.h:455: +typedef struct _BTC_BT_LINK_INFO { WARNING: do not add new typedefs #468: FILE: hal/HalBtcOutSrc.h:468: +typedef struct _BTC_STATISTICS { WARNING: do not add new typedefs #487: FILE: hal/HalBtcOutSrc.h:487: +typedef struct _BTC_COEXIST { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210312082638.25512-2-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5dac808aceb62bb7481908efb9ce402f5127157d Author: Ville Syrjälä Date: Fri Mar 5 17:36:10 2021 +0200 drm/i915: s/plane_res_b/blocks/ etc. Rename a bunch of the skl+ watermark struct members to have sensible names. Avoids me having to think what plane_res_b/etc. means. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-7-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit a5941b475028676165525b1bdf259a9088ea2e96 Author: Ville Syrjälä Date: Fri Mar 5 17:36:09 2021 +0200 drm/i915: Extract skl_check_wm_level() and skl_check_nv12_wm_level() Make the code more typo proof by extracting small helpers that do the "do we have enough DDB for the WM level?" checks in a consistent manner. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-6-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 18ffd6de8c50fdbb925e421f70ea0d1a60f81528 Author: Ville Syrjälä Date: Fri Mar 5 17:36:08 2021 +0200 drm/i915: Calculate min_ddb_alloc for trans_wm Let's make all the "do we have enough DDB for this WM level?" checks use min_ddb_alloc. To achieve that we need to populate this for the transition watermarks as well. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-5-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit f0dfaa982b7936dfd751502bf89fbd8c07e02943 Author: Ville Syrjälä Date: Fri Mar 5 17:36:07 2021 +0200 drm/i915: Check SAGV wm min_ddb_alloc rather than plane_res_b For non-transition watermarks we are supposed to check min_ddb_alloc rather than plane_res_b when determining if we have enough DDB space for it. A bit too much copy pasta made me check the wrong thing. Cc: Stanislav Lisovskiy Fixes: df4a50a35e2c ("drm/i915: Zero out SAGV wm when we don't have enough DDB for it") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-4-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit cdf64625e8d090db6abd13d1b3d71c8d77844801 Author: Ville Syrjälä Date: Fri Mar 5 17:36:06 2021 +0200 drm/i915: Tighten SAGV constraint for pre-tgl Say we have two planes enabled with watermarks configured as follows: plane A: wm0=enabled/can_sagv=false, wm1=enabled/can_sagv=true plane B: wm0=enabled/can_sagv=true, wm1=disabled This is possible since the latency we use to calculate can_sagv may not be the same for both planes due to skl_needs_memory_bw_wa(). In this case skl_crtc_can_enable_sagv() will see that both planes have enabled at least one watermark level with can_sagv==true, and thus proceeds to allow SAGV. However, since plane B does not have wm1 enabled plane A can't actually use it either. Thus we are now running with SAGV enabled, but plane A can't actually tolerate the extra latency it imposes. To remedy this only allow SAGV on if the highest common enabled watermark level for all active planes can tolerate the extra SAGV latency. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210305153610.12177-3-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit b7a7053ab2ec558b8ae4e55f62ea8f1f58e14f5c Author: Ville Syrjälä Date: Sat Feb 20 12:33:03 2021 +0200 drm/i915: Workaround async flip + VT-d corruption on HSW/BDW On HSW/BDW with VT-d active the first tile row scanned out after the first async flip of the frame often ends up corrupted. Whether the corruption happens or not depends on the scanline on which the async flip happens, but the behaviour seems very consistent. Ie. the same set of scanlines (which are most scanlines) always show the corruption. And another set of scanlines (far less of them) never shows the corruption. I discovered that disabling the fetch-stride stretching feature cures the corruption. This is some kind of TLB related prefetch thing AFAIK. We already disable it on SNB primary planes due to a documented workaround. The hardware folks indicated that disabling this should be fine, so let's go with that. And while we're here, let's document the relevant bits on all pre-skl platforms. Fixes: 2a636e240c77 ("drm/i915: Implement async flip for ivb/hsw") Fixes: cda195f13abd ("drm/i915: Implement async flips for bdw") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210220103303.3448-1-ville.syrjala@linux.intel.com Reviewed-by: Karthik B S commit c5a210453cf5c9140947533168077f518a01b4cd Author: Paul Cercueil Date: Sun Mar 7 19:28:30 2021 +0000 MIPS: ingenic: gcw0: SPI panel does not require active-high CS The NT39016 panel is a fun beast, even though the documentation states that the CS line is active-low, it will work just fine if the CS line is configured as active-high, but it won't work if the CS line is forced low or forced high. Since it did actually work with the spi-cs-high property, this is not a bugfix, but we should nonetheless remove that property to match the documentation. Signed-off-by: Paul Cercueil Signed-off-by: Thomas Bogendoerfer commit 85a217750ccc1f360f14c4ddca6970388369420e Author: Paul Cercueil Date: Sun Mar 7 19:28:29 2021 +0000 dt-bindings: panel/kingdisplay,kd035g6-54nt: Remove spi-cs-high The NT39016 panel is a fun beast, even though the documentation states that the CS line is active-low, it will work just fine if the CS line is configured as active-high, but it won't work if the CS line is forced low or forced high. Since it did actually work with the spi-cs-high property, this is not a bugfix, but we should nonetheless remove that property from the example to match the documentation. Signed-off-by: Paul Cercueil Acked-by: Rob Herring Signed-off-by: Thomas Bogendoerfer commit f52da4ccfec9192e17f5c16260dfdd6d3ea76f65 Author: Rafał Miłecki Date: Mon Mar 8 10:03:20 2021 +0100 firmware: bcm47xx_nvram: inline code checking NVRAM size Separated function was not improving code quality much (or at all). Moreover it expected possible flash end address as argument and it was returning NVRAM size. The new code always operates on offsets which means less logic and less calculations. Signed-off-by: Rafał Miłecki Signed-off-by: Thomas Bogendoerfer commit 98b68324f67236e8c9152976535dc1f27fb67ba8 Author: Rafał Miłecki Date: Mon Mar 8 10:03:19 2021 +0100 firmware: bcm47xx_nvram: look for NVRAM with for instead of while This loop requires variable initialization, stop condition and post iteration increment. It's pretty much a for loop definition. Signed-off-by: Rafał Miłecki Signed-off-by: Thomas Bogendoerfer commit 298923cf999cecd2ef06df126f85a3d68da8c4d8 Author: Rafał Miłecki Date: Mon Mar 8 10:03:18 2021 +0100 firmware: bcm47xx_nvram: extract code copying NVRAM This simplifies function finding NVRAM. It doesn't directly deal with NVRAM structure anymore and is a bit smaller. Signed-off-by: Rafał Miłecki Signed-off-by: Thomas Bogendoerfer commit 0a24b51a3264a3f942a75025ea5ff6133c8989b0 Author: Rafał Miłecki Date: Mon Mar 8 10:03:17 2021 +0100 firmware: bcm47xx_nvram: add helper checking for NVRAM This avoids duplicating code doing casting and checking for NVRAM magic. Signed-off-by: Rafał Miłecki Signed-off-by: Thomas Bogendoerfer commit fb009cbdd0693bd633f11e99526617b3d392cfad Author: Rafał Miłecki Date: Mon Mar 8 10:03:16 2021 +0100 firmware: bcm47xx_nvram: rename finding function and its variables 1. Use "bcm47xx_" function name prefix for consistency 2. It takes flash start as argument so s/iobase/flash_start/ 3. "off" was used for finding flash end so just call it "flash_size" Signed-off-by: Rafał Miłecki Signed-off-by: Thomas Bogendoerfer commit 14b02f023c094767ffc21156fbb40be52ed2b4f2 Author: Heikki Krogerus Date: Wed Mar 10 13:46:30 2021 +0300 usb: typec: tipd: Separate file for tracepoint creation Creating the tracepoints only when tracing is enabled. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210310104630.77945-4-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 2786d8618a92f4108092b5f20044b06fca83f389 Author: Heikki Krogerus Date: Wed Mar 10 13:46:29 2021 +0300 usb: typec: tps6598x: Move the driver under its own subdirectory The driver consist of multiple files. Grouping all of them under a separate directory drivers/usb/typec/tipd/. Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210310104630.77945-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 3adab6a1691a69c5e86bf10a9217d7dc6d02eb01 Author: Heikki Krogerus Date: Wed Mar 10 13:46:28 2021 +0300 usb: typec: tps6598x: Fix tracepoint header file There were two typos in the precompiler conditions. Fixes: 65a2f67d9945 ("usb: typec: tps6598x: Add trace event for IRQ events") Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210310104630.77945-2-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit aecb1e452d9e9de593b58330eb0279671be04436 Author: Badhri Jagan Sridharan Date: Wed Mar 10 14:35:36 2021 -0800 usb: typec: tcpci: Refactor tcpc_presenting_cc1_rd macro Defining one macro instead of two for tcpc_presenting_*_rd. This is a follow up of the comment left by Heikki Krogerus. https://patchwork.kernel.org/project/linux-usb/patch/ 20210304070931.1947316-1-badhri@google.com/ Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210310223536.3471243-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 12ef51b116693bd77395a19ba135df68ee1673f0 Author: Alain Volmat Date: Fri Mar 12 11:35:29 2021 +0100 spi: stm32: avoid ifdef CONFIG_PM for pm callbacks Avoid CONFIG_PM preprocessor check for pm suspend/resume callbacks and identify the functions with __maybe_unused. Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1615545329-5496-1-git-send-email-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit 05d8a019eb057d14cdf9483318a7ee8b35a69cda Author: Alexandru Ardelean Date: Mon Mar 8 16:55:02 2021 +0200 spi: docs: update info about 'delay_usecs' The 'delay_usecs' field is no longer present on the spi_transfer struct. This change updates the doc to mention the usage of the (relatively) new 'delay' field. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-11-aardelean@deviqon.com Signed-off-by: Mark Brown commit 3ab1cce553378fc0df1b1d26d7e23d03bd4dd3b6 Author: Alexandru Ardelean Date: Mon Mar 8 16:55:01 2021 +0200 spi: core: remove 'delay_usecs' field from spi_transfer The 'delay' field in the spi_transfer struct is meant to replace the 'delay_usecs' field. However some cleanup was required to remove the uses of 'delay_usecs'. Now that it's been cleaned up, we can remove it from the kernel tree. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-10-aardelean@deviqon.com Signed-off-by: Mark Brown commit 55a47532fa4c5dc3291d796dd21cc80034b5d067 Author: Alexandru Ardelean Date: Mon Mar 8 16:55:00 2021 +0200 spi: fsl-espi: remove usage of 'delay_usecs' field The 'delay_usecs' field is being removed from the spi_transfer struct. This change removes it from the SPI FSL ESPI driver. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-9-aardelean@deviqon.com Signed-off-by: Mark Brown commit a886010c69718988756fd7873522caa0f26af398 Author: Alexandru Ardelean Date: Mon Mar 8 16:54:59 2021 +0200 spi: spi-falcon: remove check for 'delay_usecs' The 'delay_usecs' field is being removed from the spi_transfer struct. This change removes it from the SPI Falcon driver. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-8-aardelean@deviqon.com Signed-off-by: Mark Brown commit 33a23423ca0a08b488791fc9d4ca53f4bea4e45b Author: Alexandru Ardelean Date: Mon Mar 8 16:54:58 2021 +0200 staging: greybus: spilib: use 'spi_delay_to_ns' for getting xfer delay The intent is the removal of the 'delay_usecs' field from the spi_transfer struct, as there is a 'delay' field that does the same thing. The spi_delay_to_ns() can be used to get the transfer delay. It works by using the 'delay_usecs' field first (if it is non-zero), and finally uses the 'delay' field. Since the 'delay_usecs' field is going away, this change makes use of the spi_delay_to_ns() function. This also means dividing the return value of the function by 1000, to convert it to microseconds. To prevent any potential faults when converting to microseconds and since the result of spi_delay_to_ns() is int, the delay is being computed in 32 bits and then clamped between 0 & U16_MAX. Signed-off-by: Alexandru Ardelean Acked-by: Viresh Kumar Acked-by: Rui Miguel Silva Acked-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210308145502.1075689-7-aardelean@deviqon.com Signed-off-by: Mark Brown commit 7ca660f8212b2fbeb0f3133c3a6fa8805777a877 Author: Alexandru Ardelean Date: Mon Mar 8 16:54:57 2021 +0200 spi: spi-tegra20-flash: don't check 'delay_usecs' field for spi transfer The 'delay_usecs' field was handled for backwards compatibility in case there were some users that still configured SPI delay transfers with this field. They should all be removed by now. So we can remove the 'delay_usecs' handling in this driver. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-6-aardelean@deviqon.com Signed-off-by: Mark Brown commit 506d1a1b441e058e318d8d81141295ff76927367 Author: Alexandru Ardelean Date: Mon Mar 8 16:54:56 2021 +0200 spi: spi-sh: replace 'delay_usecs' with 'delay.value' in pr_debug The 'delay_usecs' field is going away. The replacement for it is the 'delay' field. So, we should print the 'delay.value' value instead. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-5-aardelean@deviqon.com Signed-off-by: Mark Brown commit 66a3aadec42aa001c62ae9a637398d853880a02b Author: Alexandru Ardelean Date: Mon Mar 8 16:54:55 2021 +0200 spi: spi-bcm-qspi: replace 'delay_usecs' with 'delay.value' check The 'delay_usecs' field is going away. The replacement for it is the 'delay' field. So, we should check for 'delay.value' being non-zero. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-4-aardelean@deviqon.com Signed-off-by: Mark Brown commit e7f2d4c6aacd0a2cded363bb14ef9b6e752798fd Author: Alexandru Ardelean Date: Mon Mar 8 16:54:54 2021 +0200 spi: bcm63xx-spi: don't check 'delay_usecs' field The 'delay_usecs' field was handled for backwards compatibility in case there were some users that still configured SPI delay transfers with this field. They should all be removed by now. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-3-aardelean@deviqon.com Signed-off-by: Mark Brown commit 93c941448994a728e691f7dce9ea6475e352b09c Author: Alexandru Ardelean Date: Mon Mar 8 16:54:53 2021 +0200 spi: spi-axi-spi-engine: remove usage of delay_usecs The 'delay_usecs' field was handled for backwards compatibility in case there were some users that still configured SPI delay transfers with this field. They should all be removed by now. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210308145502.1075689-2-aardelean@deviqon.com Signed-off-by: Mark Brown commit 14667403a5631ce2fd2935d90c6d36f7975f61f3 Author: Pierre-Louis Bossart Date: Wed Mar 10 18:49:04 2021 -0600 ASoC: mediatek: mt8173: rename local irq variable cppcheck warning: sound/soc/mediatek/mt8173/mt8173-afe-pcm.c:929:28: style: Local variable 'irq' shadows outer argument [shadowArgument] struct mtk_base_afe_irq *irq; ^ sound/soc/mediatek/mt8173/mt8173-afe-pcm.c:914:47: note: Shadowed declaration static irqreturn_t mt8173_afe_irq_handler(int irq, void *dev_id) ^ sound/soc/mediatek/mt8173/mt8173-afe-pcm.c:929:28: note: Shadow variable struct mtk_base_afe_irq *irq; ^ Not a great idea to have two 'irq' variables in the same function... Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210311004904.121205-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d9cdc1335622866c52a463325b3aaea9844cff1b Author: Pierre-Louis Bossart Date: Wed Mar 10 18:49:03 2021 -0600 ASoC: mediatek: mt2701: rename shadowed array cppcheck warning: sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:406:36: style: Local variable 'memif_data' shadows outer variable [shadowVariable] const struct mtk_base_memif_data *memif_data; ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:977:41: note: Shadowed declaration static const struct mtk_base_memif_data memif_data[MT2701_MEMIF_NUM] = { ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:406:36: note: Shadow variable const struct mtk_base_memif_data *memif_data; ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:431:36: style: Local variable 'memif_data' shadows outer variable [shadowVariable] const struct mtk_base_memif_data *memif_data; ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:977:41: note: Shadowed declaration static const struct mtk_base_memif_data memif_data[MT2701_MEMIF_NUM] = { ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:431:36: note: Shadow variable const struct mtk_base_memif_data *memif_data; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210311004904.121205-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 57f1379e77a7432759e2f35b720c71863e2d83bc Author: Pierre-Louis Bossart Date: Wed Mar 10 18:49:02 2021 -0600 ASoC: mediatek: mt2701: align function prototype cppcheck warnings: sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c:102:30: style:inconclusive: Function 'mt2701_afe_enable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. [funcArgNamesDifferent] struct mt2701_i2s_path *i2s_path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h:21:30: note: Function 'mt2701_afe_enable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c:102:30: note: Function 'mt2701_afe_enable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *i2s_path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c:128:32: style:inconclusive: Function 'mt2701_afe_disable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. [funcArgNamesDifferent] struct mt2701_i2s_path *i2s_path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h:24:32: note: Function 'mt2701_afe_disable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *path, ^ sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c:128:32: note: Function 'mt2701_afe_disable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *i2s_path, ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210311004904.121205-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2e5e57f085a3243aae7e4af88dc2c40e5ff4d3be Author: Pierre-Louis Bossart Date: Wed Mar 10 18:49:01 2021 -0600 ASoC: mediatek: mtk-btcvsd: remove useless assignment cppcheck warning: sound/soc/mediatek/common/mtk-btcvsd.c:783:34: style: Variable 'avail' is assigned a value that is never used. [unreadVariable] int written_size = count, avail = 0, cur_write_idx, write_size, cont; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210311004904.121205-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2b0a9946bf9e182b77d500ac182f73d5078c7ef1 Author: Bhaskar Chowdhury Date: Fri Mar 12 14:27:38 2021 +0530 ata: Trivial spelling fixes in the file pata_ns87415.c Trivial spelling fixes. Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210312085738.9372-1-unixbhaskar@gmail.com Signed-off-by: Jens Axboe commit 1906cf27fcc07075ccfccf138fe269f8a95d7795 Author: Lee Jones Date: Mon Feb 1 14:39:40 2021 +0000 ata: pata_pdc2027x: Fix some incorrect function names and parameter docs Fixes the following W=1 kernel build warning(s): drivers/ata/pata_pdc2027x.c:209: warning: expecting prototype for pdc2027x_pata_cable_detect(). Prototype was for pdc2027x_cable_detect() instead drivers/ata/pata_pdc2027x.c:262: warning: expecting prototype for pdc2720x_mode_filter(). Prototype was for pdc2027x_mode_filter() instead drivers/ata/pata_pdc2027x.c:513: warning: Function parameter or member 'board_idx' not described in 'pdc_adjust_pll' drivers/ata/pata_pdc2027x.c:513: warning: expecting prototype for adjust_pll(). Prototype was for pdc_adjust_pll() instead drivers/ata/pata_pdc2027x.c:599: warning: expecting prototype for detect_pll_input_clock(). Prototype was for pdc_detect_pll_input_clock() instead Cc: Jens Axboe Cc: Albert Lee Cc: Andre Hedrick Cc: Frank Tiernan Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 92a5e8827c9e1a851d8c7967e70fe247d4427f7d Author: Lee Jones Date: Mon Feb 1 14:39:39 2021 +0000 ata: pata_optidma: Fix a function misnaming, a formatting issue and a missing description Fixes the following W=1 kernel build warning(s): drivers/ata/pata_optidma.c:298: warning: expecting prototype for optidma_make_bits(). Prototype was for optidma_make_bits43() instead drivers/ata/pata_optidma.c:319: warning: Function parameter or member 'r_failed' not described in 'optidma_set_mode' drivers/ata/pata_optidma.c:361: warning: Function parameter or member 'pdev' not described in 'optiplus_with_udma' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit efd2cbe82f503e6fa3509987c7d46f39c7bd37a1 Author: Lee Jones Date: Mon Feb 1 14:39:38 2021 +0000 ata: pata_jmicron: Fix incorrectly documented function parameter Fixes the following W=1 kernel build warning(s): drivers/ata/pata_jmicron.c:135: warning: Function parameter or member 'id' not described in 'jmicron_init_one' drivers/ata/pata_jmicron.c:135: warning: Excess function parameter 'ent' description in 'jmicron_init_one' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit a446e2fb552207d33ac08b609e997f2e4a501288 Author: Lee Jones Date: Mon Feb 1 14:39:37 2021 +0000 ata: pata_marvell: Fix incorrectly documented function parameter Fixes the following W=1 kernel build warning(s): drivers/ata/pata_marvell.c:125: warning: Function parameter or member 'id' not described in 'marvell_init_one' drivers/ata/pata_marvell.c:125: warning: Excess function parameter 'ent' description in 'marvell_init_one' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 2780645c6da8a595f73c503783d9247256448b2d Author: Lee Jones Date: Mon Feb 1 14:39:36 2021 +0000 ata: pata_hpt3x2n: Fix possible doc-rotted function name Fixes the following W=1 kernel build warning(s): drivers/ata/pata_hpt3x2n.c:247: warning: expecting prototype for hpt3x2n_bmdma_end(). Prototype was for hpt3x2n_bmdma_stop() instead Cc: Jens Axboe Cc: Andre Hedrick Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 4fabc4b67a923a804ae39f7a6a55ed10debcd103 Author: Lee Jones Date: Mon Feb 1 14:39:35 2021 +0000 ata: pata_cs5520: Add a couple of missing param descriptions Fixes the following W=1 kernel build warning(s): drivers/ata/pata_cs5520.c:61: warning: Function parameter or member 'pio' not described in 'cs5520_set_timings' drivers/ata/pata_cs5520.c:257: warning: Function parameter or member 'mesg' not described in 'cs5520_pci_device_suspend' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 2d35ba9e5a9386519a394c5f9131c54796313af3 Author: Lee Jones Date: Mon Feb 1 14:39:34 2021 +0000 ata: pata_atiixp: Fix a function name and supply description for 'pio' Fixes the following W=1 kernel build warning(s): drivers/ata/pata_atiixp.c:103: warning: Function parameter or member 'pio' not described in 'atiixp_set_pio_timing' drivers/ata/pata_atiixp.c:241: warning: expecting prototype for atiixp_dma_stop(). Prototype was for atiixp_bmdma_stop() instead Cc: Jens Axboe Cc: ATI Inc Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 9c7d0b2ac49253fd43d220141ed288c60e57ad7f Author: Lee Jones Date: Mon Feb 1 14:39:33 2021 +0000 ata: pata_artop: Repair possible copy/paste issue in 'artop_6210_qc_defer()'s header Fixes the following W=1 kernel build warning(s): drivers/ata/pata_artop.c:278: warning: expecting prototype for artop_6210_qc_defer(). Prototype was for artop6210_qc_defer() instead Cc: Jens Axboe Cc: Andre Hedrick Cc: Thibaut VARENE Cc: Alessandro Zummo Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit f18e1faa09f034021fb17f70faaee7e8df4beb5f Author: Lee Jones Date: Mon Feb 1 14:39:32 2021 +0000 ata: pata_amd: Fix incorrectly named function in the header Fixes the following W=1 kernel build warning(s): drivers/ata/pata_amd.c:331: warning: expecting prototype for nv_probe_init(). Prototype was for nv_pre_reset() instead Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 764e3bc4e95b5353da039da382968580124253ec Author: Lee Jones Date: Mon Feb 1 14:39:31 2021 +0000 ata: pata_ali: Supply description for 'ali_20_filter()'s 'mask' param Fixes the following W=1 kernel build warning(s): drivers/ata/pata_ali.c:119: warning: Function parameter or member 'mask' not described in 'ali_20_filter' Cc: Jens Axboe Cc: CJ Cc: Andre Hedrick Cc: Alan Cox Cc: Clear Zhang Cc: linux-ide@vger.kernel.org Cc: and cc Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit f3a23c2cdf55237a13357735776d2f6dabed46ef Author: Lee Jones Date: Mon Feb 1 14:39:30 2021 +0000 ata: sata_mv: Fix worthy headers and demote others Fixes the following W=1 kernel build warning(s): drivers/ata/sata_mv.c:1162: warning: Function parameter or member 'ap' not described in 'mv_start_edma' drivers/ata/sata_mv.c:1162: warning: Function parameter or member 'port_mmio' not described in 'mv_start_edma' drivers/ata/sata_mv.c:1162: warning: Function parameter or member 'protocol' not described in 'mv_start_edma' drivers/ata/sata_mv.c:1162: warning: Excess function parameter 'base' description in 'mv_start_edma' drivers/ata/sata_mv.c:1535: warning: Function parameter or member 'enable_bmdma' not described in 'mv_bmdma_enable_iie' drivers/ata/sata_mv.c:1535: warning: expecting prototype for mv_bmdma_enable(). Prototype was for mv_bmdma_enable_iie() instead drivers/ata/sata_mv.c:1930: warning: Function parameter or member 'ap' not described in 'mv_bmdma_stop_ap' drivers/ata/sata_mv.c:1930: warning: expecting prototype for mv_bmdma_stop(). Prototype was for mv_bmdma_stop_ap() instead drivers/ata/sata_mv.c:2228: warning: Function parameter or member 'ap' not described in 'mv_send_fis' drivers/ata/sata_mv.c:3263: warning: Function parameter or member 'hpriv' not described in 'mv6_reset_hc' drivers/ata/sata_mv.c:3263: warning: Function parameter or member 'n_hc' not described in 'mv6_reset_hc' drivers/ata/sata_mv.c:3541: warning: Function parameter or member 'hpriv' not described in 'soc_is_65n' drivers/ata/sata_mv.c:3541: warning: expecting prototype for soc_is_65(). Prototype was for soc_is_65n() instead Cc: Jens Axboe Cc: Mark Lord Cc: ALWAYS copy Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 6864e78186e0f8804c29b60308189fd701fe36dc Author: Lee Jones Date: Mon Feb 1 14:39:29 2021 +0000 ata: ahci_xgene: Fix incorrect naming of 'xgene_ahci_handle_broken_edge_irq()'s 'host' param Fixes the following W=1 kernel build warning(s): drivers/ata/ahci_xgene.c:564: warning: Function parameter or member 'host' not described in 'xgene_ahci_handle_broken_edge_irq' drivers/ata/ahci_xgene.c:564: warning: Excess function parameter 'ata_host' description in 'xgene_ahci_handle_broken_edge_irq' Cc: Jens Axboe Cc: Loc Ho Cc: Tuan Phan Cc: Suman Tripathi Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit a51746f47153b45c865146a4b083693c2faea4aa Author: Lee Jones Date: Mon Feb 1 14:39:28 2021 +0000 ata: pata_hpt37x: Fix some function misnaming and missing param issues Fixes the following W=1 kernel build warning(s): drivers/ata/pata_hpt37x.c:283: warning: Function parameter or member 'mask' not described in 'hpt370_filter' drivers/ata/pata_hpt37x.c:301: warning: Function parameter or member 'mask' not described in 'hpt370a_filter' drivers/ata/pata_hpt37x.c:473: warning: expecting prototype for hpt370_bmdma_end(). Prototype was for hpt370_bmdma_stop() instead drivers/ata/pata_hpt37x.c:567: warning: expecting prototype for hpt37x_bmdma_end(). Prototype was for hpt37x_bmdma_stop() instead Cc: Jens Axboe Cc: Andre Hedrick Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit d6c2aaaee4fb2574abfe75be3707a375db81e74d Author: Lee Jones Date: Mon Feb 1 14:39:27 2021 +0000 ata: pata_hpt366: Provide missing description for 'hpt366_filter()'s 'mask' param Fixes the following W=1 kernel build warning(s): drivers/ata/pata_hpt366.c:200: warning: Function parameter or member 'mask' not described in 'hpt366_filter' Cc: Jens Axboe Cc: Andre Hedrick Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 73b90681d2d55dba93baeb049ce0464d7939e5ca Author: Lee Jones Date: Mon Feb 1 14:39:26 2021 +0000 ata: pata_amd: Remove superfluous, add missing and fix broken params Fixes the following W=1 kernel build warning(s): drivers/ata/pata_amd.c:179: warning: Excess function parameter 'adev' description in 'amd_fifo_setup' drivers/ata/pata_amd.c:331: warning: Function parameter or member 'link' not described in 'nv_pre_reset' drivers/ata/pata_amd.c:331: warning: Function parameter or member 'deadline' not described in 'nv_pre_reset' drivers/ata/pata_amd.c:331: warning: expecting prototype for nv_probe_init(). Prototype was for nv_pre_reset() instead Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 5c16c0ce50954498282230588258e0e7b6d08dfb Author: Lee Jones Date: Mon Feb 1 14:39:25 2021 +0000 ata: pata_artop: Fix a function name and parameter description Fixes the following W=1 kernel build warning(s): drivers/ata/pata_artop.c:278: warning: expecting prototype for artop_6210_qc_defer(). Prototype was for artop6210_qc_defer() instead drivers/ata/pata_artop.c:359: warning: Function parameter or member 'id' not described in 'artop_init_one' drivers/ata/pata_artop.c:359: warning: Excess function parameter 'ent' description in 'artop_init_one' Cc: Jens Axboe Cc: Andre Hedrick Cc: Thibaut VARENE Cc: Alessandro Zummo Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 325fe2088fc9af68914edfae6453214f9e3caaf7 Author: Lee Jones Date: Mon Feb 1 14:39:24 2021 +0000 ata: pata_ali: Repair some misnamed kernel-doc issues Fixes the following W=1 kernel build warning(s): drivers/ata/pata_ali.c:119: warning: Function parameter or member 'mask' not described in 'ali_20_filter' drivers/ata/pata_ali.c:119: warning: Excess function parameter 'ap' description in 'ali_20_filter' drivers/ata/pata_ali.c:322: warning: Function parameter or member 'qc' not described in 'ali_check_atapi_dma' drivers/ata/pata_ali.c:322: warning: Excess function parameter 'adev' description in 'ali_check_atapi_dma' Cc: Jens Axboe Cc: CJ Cc: Andre Hedrick Cc: Alan Cox Cc: Clear Zhang Cc: linux-ide@vger.kernel.org Cc: and cc Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 32db9fad69390774bbbd4fd0659b96a7837a2348 Author: Lee Jones Date: Mon Feb 1 14:39:23 2021 +0000 ata: libata-pmp: Fix misspelling of 'val' Fixes the following W=1 kernel build warning(s): drivers/ata/libata-pmp.c:76: warning: Function parameter or member 'val' not described in 'sata_pmp_write' drivers/ata/libata-pmp.c:76: warning: Excess function parameter 'r_val' description in 'sata_pmp_write' Cc: Jens Axboe Cc: Tejun Heo Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 842a5e584ee5bf9ecdb0c9a31c3dae18b9396ed4 Author: Lee Jones Date: Mon Feb 1 14:39:22 2021 +0000 ata: libata-sata: Fix function names in header comments Fixes the following W=1 kernel build warning(s): drivers/ata/libata-sata.c:1085: warning: expecting prototype for port_alloc(). Prototype was for ata_sas_port_alloc() instead drivers/ata/libata-sata.c:1140: warning: expecting prototype for ata_port_stop(). Prototype was for ata_sas_port_stop() instead Cc: Jens Axboe Cc: Tejun Heo Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 882184bec5503c449a772662235f8aad46a93f9f Author: Lee Jones Date: Mon Feb 1 14:39:21 2021 +0000 ata: libata-transport: Fix some potential doc-rot issues Fixes the following W=1 kernel build warning(s): drivers/ata/libata-transport.c:258: warning: Function parameter or member 'ap' not described in 'ata_tport_delete' drivers/ata/libata-transport.c:258: warning: Excess function parameter 'port' description in 'ata_tport_delete' drivers/ata/libata-transport.c:384: warning: Function parameter or member 'link' not described in 'ata_tlink_delete' drivers/ata/libata-transport.c:384: warning: Excess function parameter 'port' description in 'ata_tlink_delete' drivers/ata/libata-transport.c:640: warning: Function parameter or member 'ata_dev' not described in 'ata_tdev_delete' drivers/ata/libata-transport.c:640: warning: Excess function parameter 'port' description in 'ata_tdev_delete' Cc: Jens Axboe Cc: linux-ide@vger.kernel.org Signed-off-by: Lee Jones Signed-off-by: Jens Axboe commit 0ed0283f0297d0bb6b34a831a4989dd58f4c8368 Author: Dinghao Liu Date: Wed Mar 3 15:34:08 2021 +0800 sata_dwc_460ex: Fix missing check in sata_dwc_isr The return value of ata_qc_from_tag() is checked in the whole kernel except for two calls in sata_dwc_isr(), which may lead to null-pointer-dereference. Add return value checks to avoid such case. Signed-off-by: Dinghao Liu Signed-off-by: Jens Axboe commit 9a9d3abe24bb6b820e50190147ac880fd0b168f6 Author: Piyush Mehta Date: Mon Feb 8 23:33:56 2021 +0530 ata: ahci: ceva: Update the driver to support xilinx GT phy SATA controller used in Xilinx ZynqMP platform uses xilinx GT phy which has 4 GT lanes and can be used by 4 peripherals at a time. SATA controller uses 1 GT phy lane among the 4 GT lanes. To configure the GT lane for the SATA controller, the below sequence is expected. 1. Assert the SATA controller reset. 2. Configure the xilinx GT phy lane for SATA controller (phy_init). 3. De-assert the SATA controller reset. 4. Wait for PLL of the GT lane used by SATA to be locked (phy_power_on). The ahci_platform_enable_resources() by default does the phy_init() and phy_power_on() but the default sequence doesn't work with Xilinx platforms. Because of this reason, updated the driver to support the new sequence. Added cevapriv->rst check, for backward compatibility with the older sequence. If the reset controller is not available, then the SATA controller will configure with the older sequences. Signed-off-by: Piyush Mehta Acked-by: Michal Simek Signed-off-by: Jens Axboe commit 3c0198c8f30e6e203e050a924aab888f380fe9e3 Author: Piyush Mehta Date: Mon Feb 8 23:33:55 2021 +0530 dt-bindings: ata: ahci: ceva: Update documentation for CEVA Controller This patch updates the documentation for the CEVA controller for adding the optional properties for 'phys' and 'resets'. Signed-off-by: Piyush Mehta Acked-by: Rob Herring Signed-off-by: Jens Axboe commit 531590bb40f827fb3c4398148af0797f95bbaee2 Author: Kuninori Morimoto Date: Tue Mar 9 10:08:17 2021 +0900 ASoC: soc-pcm: share DPCM BE DAI stop operation soc-pcm has very similar but different DPCM BE DAI stop operation at 1) dpcm_be_dai_startup() error case rollback 2) dpcm_be_dai_startup_unwind() 3) dpcm_be_dai_shutdown() The differences are 1) for rollback 2) Doesn't check by snd_soc_dpcm_be_can_update() (Is this bug ?) 3) Do soc_pcm_hw_free() if it was not !OPENed and !HW_FREEed, and call soc_pcm_close(). We can share same code by 1) hw_free is not needed. Needs last dpcm as rollback. 2) hw_free is not needed. 3) hw_free is needed. This patch adds new dpcm_be_dai_stop() and share these 3. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87a6rduoam.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 20048a9a4070d046a868c3be3b4f7bdc139cc203 Author: Kuninori Morimoto Date: Tue Mar 9 10:08:12 2021 +0900 ASoC: soc-pcm: remove unneeded !rtd->dai_link check rtd->dai_link is setuped at soc_new_pcm_runtime(), thus "rtd->dai_link == NULL" is never happen. This patch removes unneeded !rtd->dai_link check Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87blbtuoar.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1db19c151819dea7a0dc4d888250d25abaf229ca Author: Kuninori Morimoto Date: Tue Mar 9 10:08:08 2021 +0900 ASoC: soc-pcm: fixup dpcm_be_dai_startup() user count At dpcm_be_dai_startup_unwind(), it indicates error message at (1) if this function was called with no users. But, it doesn't use "continue" here. Thus, users will be a negative number at (2) void dpcm_be_dai_startup_unwind(...) { ... for_each_dpcm_be(...) { ... (1) if (be->dpcm[stream].users == 0) dev_err(...); (2) if (--be->dpcm[stream].users != 0) continue; At dpcm_be_dai_startup(), it indicates error message if user reached to MAX USERS at (A). But, it doesn't use "continue" here. Thus, it will be over MAX USERS at (B). int dpcm_be_dai_startup(...) { ... for_each_dpcm_be(...) { ... (A) if (be->dpcm[stream].users == DPCM_MAX_BE_USERS) dev_err(...); (B) if (be->dpcm[stream].users++ != 0) continue; These are just bug. This patch fixup these. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87czw9uoav.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit c393281a3c1cb252735c46efbf8501a3782f9afa Author: Kuninori Morimoto Date: Tue Mar 9 10:08:02 2021 +0900 ASoC: soc-pcm: add soc_hw_sanity_check() Current soc_pcm_open() is checking runtime->hw parameters, but having such function is very helpful for reading code. This patch adds new soc_hw_sanity_check() and checks runtime->hw parameters there. And print its debug message there, too. Debug message print out timing is exchanged after this patch, but it is not a big deal, because it is for debug. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87eegpuob1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 68cbc557375e22e921c9fd007dfcb35faeff4908 Author: Kuninori Morimoto Date: Tue Mar 9 10:07:57 2021 +0900 ASoC: soc-pcm: add soc_pcm_update_symmetry() Current soc-pcm has soc_pcm_has_symmetry() and using it as if (soc_pcm_has_symmetry(substream)) substream->runtime->hw.info |= SNDRV_PCM_INFO_JOINT_DUPLEX; We want to share same operation as same function. This patch adds soc_pcm_update_symmetry() and pack above code in one function. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ft15uob6.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 56e749ba756fdc2eff332b8eadda8fca231ad782 Author: Kuninori Morimoto Date: Tue Mar 9 10:07:53 2021 +0900 ASoC: soc-pcm: direct copy at snd_soc_set_runtime_hwparams() snd_soc_set_runtime_hwparams() is called from each driver to initialize hw parameters, but coping each parameters one-by-one. Current code is not copying all parameters, but no big effect if we do it. This patch copies all parameters by simple code. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7lluoba.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6fb8944cd2892e018d13955c2d51579a30744904 Author: Kuninori Morimoto Date: Tue Mar 9 10:07:48 2021 +0900 ASoC: soc-pcm: add soc_cpu/codec_dai_name() macro soc-pcm needs DAI name and it will be "multicpu/multicodec" if it has many DAIs. But current code is using very verbose for it. This patch uses macro and makes code simple. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87im61uobf.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit f8fc9ec56f341c2a7aa263049340b11c9956962f Author: Kuninori Morimoto Date: Tue Mar 9 10:07:42 2021 +0900 ASoC: soc-pcm: check DAI activity under soc_pcm_apply_symmetry() soc_pcm_apply_symmetry() is used like below in all cases. if (snd_soc_dai_active(dai)) { err = soc_pcm_apply_symmetry(fe_substream, dai); ... } Because of this style, the code is deep nested. This patch checks it under soc_pcm_apply_symmetry(), and makes code simple. static int soc_pcm_apply_symmetry(...) { ... => if (!snd_soc_dai_active(...)) return 0; ... } => ret = soc_pcm_apply_symmetry(); if (ret < 0) ... Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0qhuobl.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 8d559a64f00b59af9cc02b803ff52f6e6880a651 Author: Antonio Borneo Date: Fri Mar 12 11:34:46 2021 +0100 spi: stm32: drop devres version of spi_register_master A call to spi_unregister_master() triggers calling remove() for all the spi devices binded to the spi master. Some spi device driver requires to "talk" with the spi device during the remove(), e.g.: - a LCD panel like drivers/gpu/drm/panel/panel-lg-lg4573.c will turn off the backlighting sending a command over spi. This implies that the spi master must be fully functional when spi_unregister_master() is called, either if it is called explicitly in the master's remove() code or implicitly by the devres framework. Devres calls devres_release_all() to release all the resources "after" the remove() of the spi master driver (check code of __device_release_driver() in drivers/base/dd.c). If the spi master driver has an empty remove() then there would be no issue; the devres_release_all() will release everything in reverse order w.r.t. probe(). But if code in spi master driver remove() disables the spi or makes it not functional (like in this spi-stm32), then devres cannot be used safely for unregistering the spi master and the binded spi devices. Replace devm_spi_register_master() with spi_register_master() and add spi_unregister_master() as first action in remove(). Fixes: dcbe0d84dfa5 ("spi: add driver for STM32 SPI controller") Signed-off-by: Antonio Borneo Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/1615545286-5395-1-git-send-email-alain.volmat@foss.st.com Signed-off-by: Mark Brown commit ccf953d8f3d68e85e577e843fdcde8872b0a9769 Author: Matthew Wilcox (Oracle) Date: Wed Mar 10 18:55:30 2021 +0000 fb_defio: Remove custom address_space_operations There's no need to give the page an address_space. Leaving the page->mapping as NULL will cause the VM to handle set_page_dirty() the same way that it's handled now, and that was the only reason to set the address_space in the first place. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: William Kucharski Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210310185530.1053320-1-willy@infradead.org commit 8613385cb2856e2ee9c4efb1f95eeaca0e1a0963 Author: Daniel Vetter Date: Wed Feb 3 16:29:21 2021 +0100 dma-fence: Document recoverable page fault implications Recently there was a fairly long thread about recoreable hardware page faults, how they can deadlock, and what to do about that. While the discussion is still fresh I figured good time to try and document the conclusions a bit. This documentation section explains what's the potential problem, and the remedies we've discussed, roughly ordered from best to worst. v2: Linus -> Linux typoe (Dave) v3: - Make it clear drivers only need to implement one option (Christian) - Make it clearer that implicit sync is out the window with exclusive fences (Christian) - Add the fairly theoretical option of segementing the memory (either statically or through dynamic checks at runtime for which piece of memory is managed how) and explain why it's not a great idea (Felix) References: https://lore.kernel.org/dri-devel/20210107030127.20393-1-Felix.Kuehling@amd.com/ Reviewed-by: Christian König Acked-by: Thomas Hellström Reviewed-by: Felix Kuehling c: Dave Airlie Cc: Maarten Lankhorst Cc: Thomas Hellström Cc: "Christian König" Cc: Jerome Glisse Cc: Felix Kuehling Signed-off-by: Daniel Vetter Cc: Sumit Semwal Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20210203152921.2429937-1-daniel.vetter@ffwll.ch commit aa31e559f7f9267cc65ac7029bdf19b5b3635eaf Author: Philipp Zabel Date: Fri Mar 5 10:12:36 2021 +0100 crypto: sun4i-ss - simplify optional reset handling As of commit bb475230b8e5 ("reset: make optional functions really optional"), the reset framework API calls use NULL pointers to describe optional, non-present reset controls. This allows to unconditionally return errors from devm_reset_control_get_optional_exclusive. Signed-off-by: Philipp Zabel Signed-off-by: Herbert Xu commit e5f9f41d5e62004c913bfd4ddf06abe032f5ce1c Author: Álvaro Fernández Rojas Date: Fri Mar 5 08:01:32 2021 +0100 hwrng: bcm2835 - add reset support BCM6368 devices need to reset the IPSEC controller in order to generate true random numbers. This is what BCM6368 produces without a reset: root@OpenWrt:/# cat /dev/hwrng | rngtest -c 1000 rngtest 6.10 Copyright (c) 2004 by Henrique de Moraes Holschuh This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. rngtest: starting FIPS tests... rngtest: bits received from input: 20000032 rngtest: FIPS 140-2 successes: 0 rngtest: FIPS 140-2 failures: 1000 rngtest: FIPS 140-2(2001-10-10) Monobit: 2 rngtest: FIPS 140-2(2001-10-10) Poker: 1000 rngtest: FIPS 140-2(2001-10-10) Runs: 1000 rngtest: FIPS 140-2(2001-10-10) Long run: 30 rngtest: FIPS 140-2(2001-10-10) Continuous run: 0 rngtest: input channel speed: (min=37.253; avg=320.827; max=635.783)Mibits/s rngtest: FIPS tests speed: (min=12.141; avg=15.034; max=16.428)Mibits/s rngtest: Program run time: 1336176 microseconds Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Philipp Zabel Acked-by: Florian Fainelli Signed-off-by: Herbert Xu commit 381345820db55bf8e7289de047c24c00a2e3690d Author: Álvaro Fernández Rojas Date: Fri Mar 5 08:01:31 2021 +0100 dt-bindings: rng: bcm2835: document reset support brcm,bcm6368-rng controllers require resetting the IPSEC clock in order to get a functional RNG. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Acked-by: Florian Fainelli Signed-off-by: Herbert Xu commit 0618e07ea3e0981d7765b43d3f7db39e739842eb Author: Álvaro Fernández Rojas Date: Fri Mar 5 08:01:30 2021 +0100 dt-bindings: rng: bcm2835: add clock constraints brcm,bcm6368-rng controllers require enabling the IPSEC clock in order to get a functional RNG. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Rob Herring Acked-by: Florian Fainelli Signed-off-by: Herbert Xu commit 7cc05071f930a631040fea16a41f9d78771edc49 Author: Hui Tang Date: Fri Mar 5 14:35:02 2021 +0800 crypto: qat - fix use of 'dma_map_single' DMA_TO_DEVICE synchronisation must be done after the last modification of the memory region by the software and before it is handed off to the device. Signed-off-by: Hui Tang Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Herbert Xu commit 792b32fad548281e1b7fe14df9063a96c54b32a2 Author: Hui Tang Date: Fri Mar 5 14:35:01 2021 +0800 crypto: qat - fix unmap invalid dma address 'dma_mapping_error' return a negative value if 'dma_addr' is equal to 'DMA_MAPPING_ERROR' not zero, so fix initialization of 'dma_addr'. Signed-off-by: Hui Tang Signed-off-by: Herbert Xu commit 282894556b8349d3c095eedadc4dde9495d48445 Author: Jia-Ju Bai Date: Thu Mar 4 17:57:17 2021 -0800 crypto: sun8i-ce - fix error return code in sun8i_ce_prng_generate() When dma_mapping_error() returns an error, no error return code of sun8i_ce_prng_generate() is assigned. To fix this bug, err is assigned with -EFAULT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 90274769cf7926a7a14f1cd3f47b66de76e0adb4 Author: Meng Yu Date: Thu Mar 4 14:35:50 2021 +0800 crypto: hisilicon/hpre - add 'CURVE25519' algorithm Enable 'CURVE25519' algorithm in Kunpeng 930. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot Signed-off-by: Herbert Xu commit 8fb9340e178ad32084fc189e6a2b2abfbc091df7 Author: Meng Yu Date: Thu Mar 4 14:35:49 2021 +0800 crypto: ecc - add curve25519 params and expose them 1. Add curve 25519 parameters in 'crypto/ecc_curve_defs.h'; 2. Add curve25519 interface 'ecc_get_curve25519_param' in 'include/crypto/ecc_curve.h', to make its parameters be exposed to everyone in kernel tree. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 05e7b906aa7c8690906135dc86ab0fc12ee37481 Author: Meng Yu Date: Thu Mar 4 14:35:48 2021 +0800 crypto: hisilicon/hpre - add 'ECDH' algorithm 1. Enable 'ECDH' algorithm in Kunpeng 930; 2. HPRE ECDH Support: ecdh-nist-p192, ecdh-nist-p256. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 14bb76768275a056a91d249525a717019fd46663 Author: Meng Yu Date: Thu Mar 4 14:35:47 2021 +0800 crypto: ecc - expose ecc curves Move 'ecc_get_curve' to 'include/crypto/ecc_curve.h', so everyone in kernel tree can easily get ecc curve params; Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 6763f5ea2d9ac9b5a34a374ee637b5e4f1f525dd Author: Meng Yu Date: Thu Mar 4 14:35:46 2021 +0800 crypto: ecdh - move curve_id of ECDH from the key to algorithm name 1. crypto and crypto/atmel-ecc: Move curve id of ECDH from the key into the algorithm name instead in crypto and atmel-ecc, so ECDH algorithm name change form 'ecdh' to 'ecdh-nist-pxxx', and we cannot use 'curve_id' in 'struct ecdh'; 2. crypto/testmgr and net/bluetooth: Modify 'testmgr.c', 'testmgr.h' and 'net/bluetooth' to adapt the modification. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reported-by: kernel test robot Signed-off-by: Herbert Xu commit 9b94ae729068f6608ec7364dea891ee86dd3dad2 Author: Meng Yu Date: Thu Mar 4 14:35:45 2021 +0800 crypto: hisilicon/hpre - add algorithm type Algorithm type is brought in to get hardware HPRE queue to support different algorithms. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Signed-off-by: Herbert Xu commit 8123455a648581ed08b1740e4fc33863eb353687 Author: Meng Yu Date: Thu Mar 4 14:35:44 2021 +0800 crypto: hisilicon/hpre - add version adapt to new algorithms A new generation of accelerator Kunpeng930 has appeared, and the corresponding driver needs to be updated to support some new algorithms of Kunpeng930. To be compatible with Kunpeng920, we add parameter 'struct hisi_qm *qm' to sec_algs_(un)register to identify the chip's version. Signed-off-by: Meng Yu Reviewed-by: Zaibo Xu Reviewed-by: Longfang Liu Signed-off-by: Herbert Xu commit 1877c73b7c03c9f15c397e4e278ad3f551475ecf Author: Tom Lendacky Date: Wed Mar 3 16:31:09 2021 -0600 crypto: ccp - Don't initialize SEV support without the SEV feature If SEV has been disabled (e.g. through BIOS), the driver probe will still issue SEV firmware commands. The SEV INIT firmware command will return an error in this situation, but the error code is a general error code that doesn't highlight the exact reason. Add a check for X86_FEATURE_SEV in sev_dev_init() and emit a meaningful message and skip attempting to initialize the SEV firmware if the feature is not enabled. Since building the SEV code is dependent on X86_64, adding the check won't cause any build problems. Cc: John Allen Cc: Brijesh Singh Signed-off-by: Tom Lendacky Reviewed-By: Brijesh Singh Signed-off-by: Herbert Xu commit 83681f2bebb34dbb3f03fecd8f570308ab8b7c2c Author: Ard Biesheuvel Date: Tue Mar 2 21:33:03 2021 +0100 crypto: api - check for ERR pointers in crypto_destroy_tfm() Given that crypto_alloc_tfm() may return ERR pointers, and to avoid crashes on obscure error paths where such pointers are presented to crypto_destroy_tfm() (such as [0]), add an ERR_PTR check there before dereferencing the second argument as a struct crypto_tfm pointer. [0] https://lore.kernel.org/linux-crypto/000000000000de949705bc59e0f6@google.com/ Reported-by: syzbot+12cf5fbfdeba210a89dd@syzkaller.appspotmail.com Reviewed-by: Eric Biggers Signed-off-by: Ard Biesheuvel Signed-off-by: Herbert Xu commit 98b5ef3e97b16eaeeedb936f8bda3594ff84a70e Author: Colin Ian King Date: Tue Mar 2 16:34:46 2021 +0000 crypto: sun8i-ss - Fix memory leak of object d when dma_iv fails to map In the case where the dma_iv mapping fails, the return error path leaks the memory allocated to object d. Fix this by adding a new error return label and jumping to this to ensure d is free'd before the return. Addresses-Coverity: ("Resource leak") Fixes: ac2614d721de ("crypto: sun8i-ss - Add support for the PRNG") Signed-off-by: Colin Ian King Acked-by: Corentin Labbe Tested-by: Corentin Labbe Acked-by: Corentin Labbe Signed-off-by: Herbert Xu commit 3729095cc139ac7ad90d687bf7e8da41a51c2534 Author: Tian Tao Date: Mon Mar 1 11:54:12 2021 +0800 crypto: cavium - remove unused including Remove including that don't need it. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit 7ea39973d1e5a73a7443c0ed96faec83224a80e3 Author: Tian Tao Date: Mon Mar 1 11:24:53 2021 +0800 hwrng: pic32 - Use device-managed registration API Use devm_hwrng_register to get rid of manual unregistration. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit ae8351284b74bf93eb4d2b67178f2e9a09c19932 Author: Tian Tao Date: Mon Mar 1 10:43:48 2021 +0800 hwrng: cctrng - Use device-managed registration API Use devm_hwrng_register to get rid of manual unregistration. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit dd647b125505646d5143ce6e3117cf5ee9ec228a Author: Huang Pei Date: Tue Mar 9 16:02:10 2021 +0800 MIPS: loongson64: alloc pglist_data at run time Loongson64 allocates arrays of pglist_data statically and is located at Node 0, and cpu from Nodes other than 0 need remote access to pglist_data and zone info. Delay pglist_data allocation till run time, and make it NUMA-aware Signed-off-by: Huang Pei Signed-off-by: Thomas Bogendoerfer commit 3382665a5c5de586cd6e93f9e892527d0775a1bb Author: Gil Fine Date: Tue Mar 9 11:23:30 2021 +0200 thunderbolt: debugfs: Show all accessible dwords Currently, when first failure occurs while reading of the block, we stop reading the block and jump to the next capability. This doesn't cover the case of block with "holes" of inaccessible dwords, followed by accessible dwords. This patch address this problem. In case of failure while reading the complete block in one transaction, (because of one or more dwords is inaccessible), we read the remaining dwords of the block dword-by-dword, one dword per transaction, till the end of the block. By doing this, we handle the case of block with "holes" of inaccessible dwords, followed by accessible dwords. The accessible dwords are shown with the fields: E.g.: 0x01eb 236 0x05 0x06 0x0000d166 While the inaccesible dwords are shown as: E.g.: 0x01ed Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 76e0c88dbd2498487044b9705641de306d8f23ab Author: Qing Zhang Date: Thu Mar 4 19:00:57 2021 +0800 MIPS: Loongson64: Move loongson_system_configuration to loongson.h The purpose of separating loongson_system_configuration from boot_param.h is to keep the other structure consistent with the firmware. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang Acked-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit fc841062221f6ff18b408c7ac31b1af7c9d8a0b6 Author: Qing Zhang Date: Thu Mar 4 19:00:56 2021 +0800 MIPS: Loongson64: Remove unused sysconf members We don't need them anymore, They are uniform on all Loongson64 systems and have been fixed in DeviceTree.loongson3_platform_init is replaced with DTS + driver. Signed-off-by: Jiaxun Yang Signed-off-by: Qing Zhang Acked-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit eb445a15fa6910dd25b2fc1217ac39f47104b7d6 Author: Liam Beguin Date: Fri Dec 11 14:12:41 2020 -0500 phy: tusb1210: use bitmasks to set VENDOR_SPECIFIC2 Start by reading the content of the VENDOR_SPECIFIC2 register and update each bit field based on device properties when defined. The use of bit masks prevents fields from overriding each other and enables users to clear bits which are set by default, like datapolarity in this instance. Signed-off-by: Liam Beguin Link: https://lore.kernel.org/r/20201211191241.21306-1-liambeguin@gmail.com Signed-off-by: Vinod Koul commit 015acd5d3addb0e2cae1c4e1ed81d5f0a1c785ad Author: Vinod Koul Date: Fri Feb 26 16:36:22 2021 +0530 MAINTAINERS: Add linux-phy list and patchwork Linux-phy subsystem gained mailing list and a patchwork instance. Add the details to MAINTAINERS file Signed-off-by: Vinod Koul commit c15b99ae2ba9ea30da3c7cd4765b8a4707e530a6 Author: Ilya Lipnitskiy Date: Sat Mar 6 20:17:24 2021 -0800 MIPS: pci-mt7620: fix PLL lock check Upstream a long-standing OpenWrt patch [0] that fixes MT7620 PCIe PLL lock check. The existing code checks the wrong register bit: PPLL_SW_SET is not defined in PPLL_CFG1 and bit 31 of PPLL_CFG1 is marked as reserved in the MT7620 Programming Guide. The correct bit to check for PLL lock is PPLL_LD (bit 23). Also reword the error message for clarity. Without this change it is unlikely that this driver ever worked with mainline kernel. [0]: https://lists.infradead.org/pipermail/lede-commits/2017-July/004441.html Signed-off-by: Ilya Lipnitskiy Cc: John Crispin Cc: linux-mips@vger.kernel.org Cc: linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org Signed-off-by: Thomas Bogendoerfer commit cd26db59fceecefc4f821e84cb936eba7a727262 Author: Álvaro Fernández Rojas Date: Wed Feb 24 10:38:56 2021 +0100 mips: bmips: bcm63268: include dt-bindings Now that there are proper device tree bindings we can start using them. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 28898eeb4120e5ce3eab0c1975cfd594da9021c1 Author: Álvaro Fernández Rojas Date: Wed Feb 24 10:38:55 2021 +0100 mips: bmips: bcm6368: include dt-bindings Now that there are proper device tree bindings we can start using them. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit e00f4ec39fb397137ebfb92fbb64b028a644eaf9 Author: Álvaro Fernández Rojas Date: Wed Feb 24 10:38:54 2021 +0100 mips: bmips: bcm6362: include dt-bindings Now that there are proper device tree bindings we can start using them. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit a3eeec1c31cdf9422965ae7de66353aa335c33bb Author: Álvaro Fernández Rojas Date: Wed Feb 24 10:38:53 2021 +0100 mips: bmips: bcm6358: include dt-bindings Now that there are proper device tree bindings we can start using them. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 1e4388a16188d21eebc1ccbc85888006642e422c Author: Álvaro Fernández Rojas Date: Wed Feb 24 10:38:52 2021 +0100 mips: bmips: bcm6328: include dt-bindings Now that there are proper device tree bindings we can start using them. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit c0a4e8b0f35278b46aabd91d7cd343f3aa48703a Author: Álvaro Fernández Rojas Date: Wed Feb 24 10:38:51 2021 +0100 mips: bmips: bcm3368: include dt-bindings Now that there are proper device tree bindings we can start using them. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 3df83c9168a707b704c9a7a28887e0ad5a861ae2 Author: Álvaro Fernández Rojas Date: Wed Feb 24 10:38:50 2021 +0100 mips: dts: brcm: allow including header files Change /include/ with #include in order to be able to include header files from dt-bindings. Signed-off-by: Álvaro Fernández Rojas Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit f076835a8bf2aa6ea48f718e4506587c815ab99f Author: Junlin Yang Date: Thu Mar 11 10:07:56 2021 +0800 esp6: remove a duplicative condition Fixes coccicheck warnings: ./net/ipv6/esp6_offload.c:319:32-34: WARNING !A || A && B is equivalent to !A || B Signed-off-by: Junlin Yang Signed-off-by: Steffen Klassert commit 1d9bfacd52ece918b7861e205202912231ca6166 Author: Jiapeng Chong Date: Mon Mar 1 18:46:02 2021 +0800 esp4: Simplify the calculation of variables Fix the following coccicheck warnings: ./net/ipv4/esp4.c:757:16-18: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Steffen Klassert commit c5929afafbafb1b0b9a14b07452a846cfca7a22e Author: Geert Uytterhoeven Date: Wed Mar 10 11:32:13 2021 +0100 ARM: shmobile: defconfig: Refresh for v5.12-rc2 Refresh the defconfig for Renesas ARM systems: - Drop CONFIG_ENABLE_MUST_CHECK=n (removed in commit 1967939462641d8b ("Compiler Attributes: remove CONFIG_ENABLE_MUST_CHECK")). Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210310103213.2529983-1-geert+renesas@glider.be commit 92c406ed0a7f2810c4498e2b6bea81c6b61c03e8 Author: Yoshihiro Shimoda Date: Fri Mar 12 11:54:20 2021 +0900 arm64: dts: renesas: r8a77961: Add CAN nodes Add the device nodes for all CAN nodes on R-Car M3-W+. Signed-off-by: Yoshihiro Shimoda Tested-by: Yusuke Goda Link: https://lore.kernel.org/r/20210312025420.529339-3-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 7e2a95d953534ec6297c6ff2356ce8e20da04126 Author: Phong Hoang Date: Thu Mar 11 10:29:38 2021 +0100 arm64: dts: renesas: r8a779a0: Add CMT support This patch adds CMT{0|1|2|3} device nodes for R-Car V3U (r8a779a0) SoC. Signed-off-by: Phong Hoang [wsa: rebased, double checked values, corrected sorting] Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210311092939.3129-3-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit a6d354b52dde8e1e5545a5571bf394c16a396575 Author: Niklas Söderlund Date: Wed Mar 10 12:09:51 2021 +0100 arm64: dts: renesas: r8a779a0: Add thermal support Add support for thermal. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210310110951.3299524-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 4adcf4c28f6dc191187359bfceee5ab5fe91a50e Author: Tony Lindgren Date: Fri Mar 12 10:23:48 2021 +0200 bus: ti-sysc: Warn about old dtb for dra7 and omap4/5 Let's warn if an old incomplete dtb is detected. We now assume the dtb is complete and does not depend on the legacy platform data. Signed-off-by: Tony Lindgren commit 0eedab655ec1817d450085dcb12219726cb415ff Author: Wolfram Sang Date: Thu Mar 11 10:29:37 2021 +0100 clk: renesas: r8a779a0: Add CMT clocks Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210311092939.3129-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 95acd758fe4bcbbf6e43a7229e2518facb87212f Author: Niklas Söderlund Date: Wed Mar 10 11:45:54 2021 +0100 clk: renesas: r8a7795: Add TMU clocks Add TMU{0,1,2,3,4} clocks. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210310104554.3281912-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit f21af4257cf3ec82736083dabc5fa230efebf61c Author: Tony Lindgren Date: Fri Mar 12 10:11:24 2021 +0200 ARM: OMAP2+: Stop building legacy code for dra7 and omap4/5 With the recent changes we are now booting am3/4, dra7, and omap4/5 without legacy data using devicetree, simple-pm-bus and genpd. Let's not initialize and build the legacy data unless CONFIG_OMAP_HWMOD is selected based on the SoCs enabled in .config. Signed-off-by: Tony Lindgren commit 1f6c45ac5fd70ab59136ab5babc7def269f3f509 Author: Mauro Carvalho Chehab Date: Fri Mar 12 08:16:03 2021 +0100 atomisp: don't let it go past pipes array In practice, IA_CSS_PIPE_ID_NUM should never be used when calling atomisp_q_video_buffers_to_css(), as the driver should discover the right pipe before calling it. Yet, if some pipe parsing issue happens, it could end using it. So, add a WARN_ON() to prevent such case. Reported-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab commit 2f5339582e7b540851bfb37e184d4dee0ab9e387 Author: Viresh Kumar Date: Wed Mar 10 08:25:27 2021 +0530 arch_topology: Export arch_freq_scale and helpers It is possible now for other parts of the kernel to provide their own implementation of sched_freq_tick() and they can very well be modules themselves (like CPPC cpufreq driver, which is going to use these in a later commit). Export arch_freq_scale and topology_{set|clear}_scale_freq_source(). Reviewed-by: Ionela Voinescu Tested-by: Ionela Voinescu Tested-by: Vincent Guittot Signed-off-by: Viresh Kumar commit c561740e7cfefaf3003a256f3a0cd9f8a069137c Author: Srinivas Kandagatla Date: Tue Mar 9 10:20:25 2021 +0000 arm64: dts: qcom: db845c: fix correct powerdown pin for WSA881x WSA881x powerdown pin is connected to GPIO1 not gpio2, so correct this. This was working so far due to a shift bug in gpio driver, however once that is fixed this will stop working, so fix this! Fixes: 89a32a4e769cc ("arm64: dts: qcom: db845c: add analog audio support") Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210309102025.28405-1-srinivas.kandagatla@linaro.org Signed-off-by: Bjorn Andersson commit 5215206d8b1574c4ba8915a61fe841c376d51ed2 Merge: 8176f8c0f095c ac3959fd0dcc0 Author: David S. Miller Date: Thu Mar 11 18:35:31 2021 -0800 Merge branch 'tcp-delayed-completions' Eric Dumazet says: ==================== tcp: better deal with delayed TX completions Jakub and Neil reported an increase of RTO timers whenever TX completions are delayed a bit more (by increasing NIC TX coalescing parameters) While problems have been there forever, second patch might introduce some regressions so I prefer not backport them to stable releases before things settle. Many thanks to FB team for their help and tests. Few packetdrill tests need to be changed to reflect the improvements brought by this series. ==================== Signed-off-by: David S. Miller commit ac3959fd0dcc0e49298ea5cadfe257db0e58ef8b Author: Eric Dumazet Date: Thu Mar 11 12:35:06 2021 -0800 tcp: remove obsolete check in __tcp_retransmit_skb() TSQ provides a nice way to avoid bufferbloat on individual socket, including retransmit packets. We can get rid of the old heuristic: /* Do not sent more than we queued. 1/4 is reserved for possible * copying overhead: fragmentation, tunneling, mangling etc. */ if (refcount_read(&sk->sk_wmem_alloc) > min_t(u32, sk->sk_wmem_queued + (sk->sk_wmem_queued >> 2), sk->sk_sndbuf)) return -EAGAIN; This heuristic was giving false positives according to Jakub, whenever TX completions are delayed above RTT. (Ack packets are processed by TCP stack before clones are orphaned/freed) Signed-off-by: Eric Dumazet Reported-by: Jakub Kicinski Cc: Neal Cardwell Cc: Yuchung Cheng Signed-off-by: David S. Miller commit a7abf3cd76e1e190a2c22afe5ffd0f695c7641b0 Author: Eric Dumazet Date: Thu Mar 11 12:35:05 2021 -0800 tcp: consider using standard rtx logic in tcp_rcv_fastopen_synack() Jakub reported Data included in a Fastopen SYN that had to be retransmit would have to wait for an RTO if TX completions are slow, even with prior fix. This is because tcp_rcv_fastopen_synack() does not use standard rtx logic, meaning TSQ handler exits early in tcp_tsq_write() because tp->lost_out == tp->retrans_out Lets make tcp_rcv_fastopen_synack() use standard rtx logic, by using tcp_mark_skb_lost() on the skb thats needs to be sent again. Not this raised a warning in tcp_fastretrans_alert() during my tests since we consider the data not being aknowledged by the receiver does not mean packet was lost on the network. Signed-off-by: Eric Dumazet Reported-by: Jakub Kicinski Cc: Neal Cardwell Cc: Yuchung Cheng Signed-off-by: David S. Miller commit f4dae54e486d528d4dd98df116e7a522bbf12667 Author: Eric Dumazet Date: Thu Mar 11 12:35:04 2021 -0800 tcp: plug skb_still_in_host_queue() to TSQ Jakub and Neil reported an increase of RTO timers whenever TX completions are delayed a bit more (by increasing NIC TX coalescing parameters) Main issue is that TCP stack has a logic preventing a packet being retransmit if the prior clone has not yet been orphaned or freed. This logic came with commit 1f3279ae0c13 ("tcp: avoid retransmits of TCP packets hanging in host queues") Thankfully, in the case skb_still_in_host_queue() detects the initial clone is still in flight, it can use TSQ logic that will eventually retry later, at the moment the clone is freed or orphaned. Signed-off-by: Eric Dumazet Reported-by: Neil Spring Reported-by: Jakub Kicinski Cc: Neal Cardwell Cc: Yuchung Cheng Signed-off-by: David S. Miller commit 8176f8c0f095c9df44994a33f19b55e7c847df7f Author: Tong Zhang Date: Wed Mar 10 23:27:55 2021 -0500 isdn: remove extra spaces in the header file fix some coding style issues in the isdn header Signed-off-by: Tong Zhang Signed-off-by: David S. Miller commit c07ea1b49515cee57cb17af677ae3fbb6d135af2 Author: Bjorn Andersson Date: Tue Mar 9 19:57:10 2021 -0800 dt-bindings: arm: qcom: Add SM8350 HDK Document the SM8350 Hardware Development Kit (HDK). Reviewed-by: Vinod Koul Reported-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210310035710.2816699-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit befc5ac94eb10ce04e7bf4bbd7dff403a7b5d25e Author: Stephen Boyd Date: Thu Mar 11 13:12:41 2021 -0800 arm64: dts: qcom: sc7180: Drop duplicate dp_hot_plug_det node in trogdor This moved from being trogdor specific to being part of the general sc7180.dtsi SoC file in commit 681a607ad21a ("arm64: dts: qcom: sc7180: Add DisplayPort HPD pin dt node"). Then we dropped the pinconf from the general sc7180.dtsi file in commit 8d079bf20410 ("arm64: dts: qcom: sc7180: Drop pinconf on dp_hot_plug_det") and added it back to the trogdor dts file in commit f772081f4883 ("arm64: dts: qcom: sc7180: Add "dp_hot_plug_det" pinconf for trogdor"). As part of this we managed to forget to drop the old copy in the trogdor dts. Let's do it now. Signed-off-by: Stephen Boyd [dianders: updated desc] Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210311131008.1.I85fc8146c0ee47e261faa0c54dd621467b81952d@changeid Signed-off-by: Bjorn Andersson commit 790158579c8e663081e7d708d57e8ac6d69dca4e Author: Shawn Guo Date: Wed Mar 3 11:31:06 2021 +0800 arm64: dts: qcom: sm8350: fix number of pins in 'gpio-ranges' The last cell of 'gpio-ranges' should be number of GPIO pins, and in case of qcom platform it should match msm_pinctrl_soc_data.ngpio rather than msm_pinctrl_soc_data.ngpio - 1. This fixes the problem that when the last GPIO pin in the range is configured with the following call sequence, it always fails with -EPROBE_DEFER. pinctrl_gpio_set_config() pinctrl_get_device_gpio_range() pinctrl_match_gpio_range() Fixes: b7e8f433a673 ("arm64: dts: qcom: Add basic devicetree support for SM8350 SoC") Cc: Vinod Koul Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210303033106.549-5-shawn.guo@linaro.org Signed-off-by: Bjorn Andersson commit e526cb03e2aed42866a0919485a3d8ac130972cf Author: Shawn Guo Date: Wed Mar 3 11:31:05 2021 +0800 arm64: dts: qcom: sm8250: fix number of pins in 'gpio-ranges' The last cell of 'gpio-ranges' should be number of GPIO pins, and in case of qcom platform it should match msm_pinctrl_soc_data.ngpio rather than msm_pinctrl_soc_data.ngpio - 1. This fixes the problem that when the last GPIO pin in the range is configured with the following call sequence, it always fails with -EPROBE_DEFER. pinctrl_gpio_set_config() pinctrl_get_device_gpio_range() pinctrl_match_gpio_range() Fixes: 16951b490b20 ("arm64: dts: qcom: sm8250: Add TLMM pinctrl node") Cc: Bjorn Andersson Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210303033106.549-4-shawn.guo@linaro.org Signed-off-by: Bjorn Andersson commit de3abdf3d15c6e7f456e2de3f9da78f3a31414cc Author: Shawn Guo Date: Wed Mar 3 11:31:04 2021 +0800 arm64: dts: qcom: sm8150: fix number of pins in 'gpio-ranges' The last cell of 'gpio-ranges' should be number of GPIO pins, and in case of qcom platform it should match msm_pinctrl_soc_data.ngpio rather than msm_pinctrl_soc_data.ngpio - 1. This fixes the problem that when the last GPIO pin in the range is configured with the following call sequence, it always fails with -EPROBE_DEFER. pinctrl_gpio_set_config() pinctrl_get_device_gpio_range() pinctrl_match_gpio_range() Fixes: e13c6d144fa0 ("arm64: dts: qcom: sm8150: Add base dts file") Cc: Vinod Koul Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210303033106.549-3-shawn.guo@linaro.org Signed-off-by: Bjorn Andersson commit 02058fc3839df65ff64de2a6b1c5de8c9fd705c1 Author: Shawn Guo Date: Wed Mar 3 11:31:03 2021 +0800 arm64: dts: qcom: sdm845: fix number of pins in 'gpio-ranges' The last cell of 'gpio-ranges' should be number of GPIO pins, and in case of qcom platform it should match msm_pinctrl_soc_data.ngpio rather than msm_pinctrl_soc_data.ngpio - 1. This fixes the problem that when the last GPIO pin in the range is configured with the following call sequence, it always fails with -EPROBE_DEFER. pinctrl_gpio_set_config() pinctrl_get_device_gpio_range() pinctrl_match_gpio_range() Fixes: bc2c806293c6 ("arm64: dts: qcom: sdm845: Add gpio-ranges to TLMM node") Cc: Evan Green Signed-off-by: Shawn Guo Link: https://lore.kernel.org/r/20210303033106.549-2-shawn.guo@linaro.org Signed-off-by: Bjorn Andersson commit 1608784b6129c8bbb4744b3b3e01c07c9d5a7f8d Author: Rajendra Nayak Date: Thu Mar 11 16:56:01 2021 +0530 arm64: dts: qcom: sc7280: Add rpmh power-domain node Add the DT node for the rpmhpd power controller on SC7280 SoCs. Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1615461961-17716-15-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 0ef5463c7a5648f7a8e8a1424865050b96639dde Author: Maulik Shah Date: Thu Mar 11 16:56:00 2021 +0530 arm64: dts: qcom: sc7280: Add cpuidle states Add cpuidle states for little and big cpus. The latency values are preliminary placeholders and will be updated once testing provides the real numbers. Signed-off-by: Maulik Shah Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1615461961-17716-14-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 14abf8dfe3643e164c7cab85c819754a46034798 Author: satya priya Date: Thu Mar 11 16:55:59 2021 +0530 arm64: dts: qcom: sc7280: Add SPMI PMIC arbiter device for SC7280 Add SPMI PMIC arbiter device to communicate with PMICs attached to SPMI bus. Signed-off-by: satya priya Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1615461961-17716-13-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 0e51f883daa91366921a8dd9db7987e78b633c03 Author: Sai Prakash Ranjan Date: Thu Mar 11 16:55:58 2021 +0530 arm64: dts: qcom: sc7280: Add APSS watchdog node Add APSS (Application Processor Subsystem) watchdog DT node for SC7280 SoC. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1615461961-17716-12-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit e9d7397467885a607814dd62ba955bcdc311b3d3 Author: Maulik Shah Date: Thu Mar 11 16:55:56 2021 +0530 arm64: dts: qcom: sc7280: Add reserved memory for fw Add fw reserved memory area for CPUCP (CPUSS control processor) and AOP (Always ON processor) Signed-off-by: Maulik Shah Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1615461961-17716-10-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit c73ed10440082e9656929999b4cb11da1d6e9669 Author: Sai Prakash Ranjan Date: Thu Mar 11 16:55:55 2021 +0530 arm64: dts: qcom: sc7280: Add device node for APPS SMMU Adding device node for APPS SMMU available on SC7280 chipset. This is shared among the multiple client devices such as display, video, usb, mmc and others. Signed-off-by: Sai Prakash Ranjan Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1615461961-17716-9-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit ab7772de86120066e917e48144c969871aa35e93 Author: Rajendra Nayak Date: Thu Mar 11 16:55:53 2021 +0530 arm64: dts: qcom: SC7280: Add rpmhcc clock controller node Add rpmhcc clock controller node for SC7280. Also add references to rpmhcc clocks in gcc. Signed-off-by: Taniya Das Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1615461961-17716-7-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 3450bb5b9570a22f9777ad071787c9581cf6f854 Author: Maulik Shah Date: Thu Mar 11 16:55:52 2021 +0530 arm64: dts: qcom: sc7280: Add RSC and PDC devices Add PDC interrupt controller along with apps RSC device. Also add reserved memory for command_db. Signed-off-by: Maulik Shah Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1615461961-17716-6-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 7a1f4e7f740de9c2f405f617e349152b5735692a Author: Rajendra Nayak Date: Thu Mar 11 16:55:50 2021 +0530 arm64: dts: qcom: sc7280: Add basic dts/dtsi files for sc7280 soc Add initial device tree support for the sc7280 SoC and the IDP boards based on this SoC Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/1615461961-17716-4-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 36dc1681c96bb4f684c467a552139478e3dcc719 Author: Rajendra Nayak Date: Thu Mar 11 16:55:48 2021 +0530 dt-bindings: arm: qcom: Document sc7280 SoC and board Document the sc7280 SoC and the IDP board bindings Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Acked-by: Rob Herring Link: https://lore.kernel.org/r/1615461961-17716-2-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 9208c19f21248c69f3446039e0a65030945a57f7 Author: Bjorn Andersson Date: Mon Mar 8 10:21:13 2021 -0800 arm64: dts: qcom: Introduce SM8350 HDK Add initial DTS for the Snapdragon 888 Mobile Hardware Development Kit, aka SM8350 HDK. This initial version describes debug UART, UFS storage, the three USB connectors and remoteprocs. Reviewed-by: Konrad Dybcio Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210308182113.1284966-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 9ad3c08f6f1b1e9882d7ab1344082006a940ccd8 Author: Vinod Koul Date: Mon Mar 8 11:38:13 2021 +0530 dt-bindings: arm: qcom: Document sony boards for apq8094 Document the various sony boards for apq8094. These are used in various sony dts files but not documented Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210308060826.3074234-6-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit c0dffc3fcebd92f720997b7ccc77701c0b8edcfc Author: Vinod Koul Date: Mon Mar 8 11:38:12 2021 +0530 arm64: dts: qcom: msm8994: don't use empty memory node We expect bootloader to full memory details but passing empty values gives warning, so add a default value arch/arm64/boot/dts/qcom/apq8094-sony-xperia-kitakami-karin_windy.dt.yaml: /: memory: False schema does not allow {'device_type': ['memory'], 'reg': [[0, 0, 0, 0]]} Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210308060826.3074234-5-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit ddfb3fc482fc5b809ad479a936fd2b24dbca34ba Author: Vinod Koul Date: Mon Mar 8 11:38:11 2021 +0530 dt-bindings: arm: qcom: Document ipq6018-cp01 board Document the ipq6018-cp01 board. It was missing leading to warning: arch/arm64/boot/dts/qcom/ipq6018-cp01-c1.dt.yaml: /: compatible: 'oneOf' conditional failed, one must be fixed: ['qcom,ipq6018-cp01', 'qcom,ipq6018'] is too short ['qcom,ipq6018-cp01', 'qcom,ipq6018'] is too long Additional items are not allowed ('qcom,ipq6018' was unexpected) Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210308060826.3074234-4-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 74f417ca592c64992fffa01dbbc1077b01056399 Author: Vinod Koul Date: Mon Mar 8 11:38:10 2021 +0530 arm64: dts: qcom: msm8916: don't use empty memory node We expect bootloader to full memory details but passing empty values gives warning, so add a default value arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml: /: memory: False schema does not allow {'device_type': ['memory'], 'reg': [[0, 0, 0, 0]]} Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210308060826.3074234-3-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit acf050ab5d01545d18ec33b4d23054756adafcb4 Author: Vinod Koul Date: Mon Mar 8 11:38:09 2021 +0530 arm64: dts: qcom: apq8016-sbc: drop qcom,sbc apq8016-sbc is one of the compaitibles for this board, but is not documented, so drop it. This fixes these two warns: arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml: /: compatible: ['qcom,apq8016-sbc', 'qcom,apq8016', 'qcom,sbc'] is not valid under any of the given schemas (Possible causes of the failure): arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml: /: compatible: ['qcom,apq8016-sbc', 'qcom,apq8016', 'qcom,sbc'] is too long arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml: /: compatible:0: 'qcom,apq8016-sbc' is not one of ['qcom,apq8064-cm-qs600', 'qcom,apq8064-ifc6410'] arch/arm64/boot/dts/qcom/apq8016-sbc.dt.yaml: /: compatible:0: 'qcom,apq8016-sbc' is not one of ['qcom,apq8074-dragonboard'] Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210308060826.3074234-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit e440e30e26dd6b0424002ad0ddcbbcea783efd85 Author: Douglas Anderson Date: Thu Feb 18 14:55:09 2021 -0800 arm64: dts: qcom: sc7180: Avoid glitching SPI CS at bootup on trogdor At boot time the following happens: 1. Device core gets ready to probe our SPI driver. 2. Device core applies SPI controller's "default" pinctrl. 3. Device core calls the SPI driver's probe() function which will eventually setup the chip select GPIO as "unasserted". Thinking about the above, we can find: a) For SPI devices that the BIOS inits (Cr50 and EC), the BIOS would have had them configured as "GENI" pins and not as "GPIO" pins. b) It turns out that our BIOS also happens to init these pins as "output" (even though it doesn't need to since they're not muxed as GPIO) but leaves them at the default state of "low". c) As soon as we apply the "default" chip select it'll switch the function to GPIO and stop driving the chip select high (which is how "GENI" was driving it) and start driving it low. d) As of commit 9378f46040be ("UPSTREAM: spi: spi-geni-qcom: Use the new method of gpio CS control"), when the SPI core inits things it inits the GPIO to be "deasserted". Prior to that commit the GPIO was left untouched until first use. e) When the first transaction happens we'll assert the chip select and then deassert it after done. So before the commit to change us to use gpio descriptors we used to have a _really long_ assertion of chip select before our first transaction (because it got pulled down and then the first "assert" was a no-op). That wasn't great but (apparently) didn't cause any real harm. After the commit to change us to use gpio descriptors we end up glitching the chip select line during probe. It would go low and then high with no data transferred. The other side ought to be robust against this, but it certainly could cause some confusion. It's known to at least cause an error message on the EC console and it's believed that, under certain timing conditions, it could be getting the EC into a confused state causing the EC driver to fail to probe. Let's fix things to avoid the glitch. We'll add an extra pinctrl entry that sets the value of the pin to output high (CS deasserted) before doing anything else. We'll do this in its own pinctrl node that comes before the normal pinctrl entries to ensure that the order is correct and that this gets applied before the mux change. This change is in the trogdor board file rather than in the SoC dtsi file because chip select polarity can be different depending on what's hooked up and it doesn't feel worth it to spam the SoC dtsi file with both options. The board file would need to pick the right one anyway. Reviewed-by: Stephen Boyd Fixes: cfbb97fde694 ("arm64: dts: qcom: Switch sc7180-trogdor to control SPI CS via GPIO") Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210218145456.1.I1da01a075dd86e005152f993b2d5d82dd9686238@changeid Signed-off-by: Bjorn Andersson commit 1e6e6e7a080ca3c1e807473e067ef04d4d005097 Author: Sandeep Maheswaram Date: Thu Jul 9 00:40:17 2020 +0530 arm64: dts: qcom: sc7180: Use pdc interrupts for USB instead of GIC interrupts Using pdc interrupts for USB instead of GIC interrupts to support wake up in case xo shutdown. Reviewed-by: Stephen Boyd Signed-off-by: Sandeep Maheswaram Link: https://lore.kernel.org/r/1594235417-23066-4-git-send-email-sanm@codeaurora.org Signed-off-by: Bjorn Andersson commit 7d47b2cb1aed68ea70f3502f51f1eeecc7880857 Author: Douglas Anderson Date: Mon Mar 1 13:34:37 2021 -0800 arm64: dts: qcom: Add sc7180-trogdor-coachz skus This is a trogdor variant. This is mostly a grab from the downstream tree with notable exceptions: - I skip -rev0. This was a super early build and there's no advantage of long term support. - I remove sound node since sound hasn't landed upstream yet. Cc: Gwendal Grignou Cc: Matthias Kaehlcke Cc: Stephen Boyd Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210301133318.v2.13.I3d1f5f8a3bf31e8014229df0d4cfdff20e9cc90f@changeid Signed-off-by: Bjorn Andersson commit 082607825afb355793d7b8c51316e3c326598f38 Author: Douglas Anderson Date: Mon Mar 1 13:34:36 2021 -0800 arm64: dts: qcom: Add sc7180-trogdor-pompom skus This is a trogdor variant. This is mostly a grab from the downstream tree with notable exceptions: - I skip -rev0. This was a super early build and there's no advantage of long term support. - In -rev1 I translate the handling of the USB hub like is done for similar boards. See the difference between the downstream and upstream 'sc7180-trogdor-lazor-r0.dts' for an example. This will need to be resolved when proper support for the USB hub is figured out upstream. - I remove sound node since sound hasn't landed upstream yet. - In incorporate the pending for the keyboard. Cc: Philip Chen Cc: Matthias Kaehlcke Cc: Stephen Boyd Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210301133318.v2.12.If93a01b30d20dccacbad4be8ddc519dc20a51a1e@changeid Signed-off-by: Bjorn Andersson commit 2c26adb8dbab4ae263dea873dd07a300fc2b0807 Author: Douglas Anderson Date: Mon Mar 1 13:34:35 2021 -0800 arm64: dts: qcom: Add sc7180-lazor-limozeen skus This is a SKU variant of lazor. Add it. This squashes the downstream patches to support this hardware. NOTES: - The non-touch SKU actually has "innolux,n116bca-ea1" but that driver is still pending in simple-panel. The bindings have been Acked though [1]. Things work well enough with the "innolux,n116bge" timings for now, though. - The wonky special dts just for "-rev4" arguably doesn't need to go upstream since they weren't widely distributed, but since a few people have them we might as well. If it ever causes problems we can delete it. [1] https://lore.kernel.org/r/20210115144345.v2.4.I6889e21811df6adaff5c5b8a8c80fda0669ab3a5@changeid Cc: Stephen Boyd Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210301133318.v2.11.I556326b24441e22c8c429ce383cc157c7aaef44b@changeid Signed-off-by: Bjorn Andersson commit d1559628c20f0451b27e98303dbc7d784b341a8f Author: Matthias Kaehlcke Date: Mon Mar 1 13:34:34 2021 -0800 arm64: dts: qcom: sc7180: Set up lazor r3+ as sc7180-lite SKUs Lazor rev3 and later use the 'lite' version of the SC7180 SoC. Reviewed-by: Stephen Boyd Cc: Stephen Boyd Signed-off-by: Matthias Kaehlcke [dianders: Adjust commit message which referred to downstream history] Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210301133318.v2.10.Ia3795e192f5bbe17e6714e45fcb0bf5acdbd4c17@changeid Signed-off-by: Bjorn Andersson commit a4ebb84a0985b377374ed005eb546dc005e56aca Author: Abhishek Kumar Date: Mon Mar 1 13:34:33 2021 -0800 arm64: dts: qcom: sc7180: add GO_LAZOR variant property for lazor For trogdor, in the latest board-2.bin file, new BDF with variant name GO_LAZOR has been introduced, so we need this property set, for GO_LAZOR BDF to be picked. Cc: Philip Chen Signed-off-by: Abhishek Kumar [dianders: adjusted subject line and sort order] Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210301133318.v2.9.I4a38fe64dd79c54af80d7e4ef5940f8cf4f86e75@changeid Signed-off-by: Bjorn Andersson commit a307a9773420dc7d385991f61fbede2fe100bd78 Author: Venkata Lakshmi Narayana Gubba Date: Mon Mar 1 13:34:32 2021 -0800 arm64: dts: qcom: sc7180: Remove clock for bluetooth on Trogdor Removed voting for RPMH_RF_CLK2 which is not required as it is getting managed by BT SoC through SW_CTRL line. Cc: Matthias Kaehlcke Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210301133318.v2.8.I80c268f163e6d49a70af1238be442b5de400c579@changeid Signed-off-by: Bjorn Andersson commit 1a5d8ff0d6cc464e58b231bdfb68308c375de33a Author: Alexandru M Stan Date: Mon Mar 1 13:34:31 2021 -0800 arm64: dts: qcom: sc7180-trogdor: Remove fp control pins in prep for coachz Removed the pinctrl and pin{mux,conf} for the control pins because: 1. The only need for them is for userspace control via flash_fp_mcu 2. cros-ec doesn't know what to do with them, and even if it did, it would interfere with flash_fp_mcu at the most inopportune times Since we're not using hogs, we rely on AP firmware to set all the control pins correctly. Reviewed-by: Stephen Boyd Cc: Stephen Boyd Cc: Craig Hesling Signed-off-by: Alexandru M Stan [dianders: adjusted since coachz isn't upstream yet] Reviewed-by; Matthias Kaehlcke Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210301133318.v2.7.Ifd7b86f826b18410eada75758a7bca1eebfa336d@changeid Signed-off-by: Bjorn Andersson commit fcd66fe65da38b5e7542df93a05b4dab41b9a44c Author: Stephen Boyd Date: Mon Mar 1 13:34:30 2021 -0800 arm64: dts: qcom: Disable camera clk on sc7180-trogdor devices by default We only want to use this clk driver on CoachZ devices. Disable it for all other Trogdor boards. NOTE: CoachZ devices aren't yet supported upstream so until it is this is just disabled for all trogdor. Cc: Tomasz Figa Signed-off-by: Stephen Boyd [dianders:adjusted since no coachz upstream yet] Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210301133318.v2.6.I22522b0c9db505ee43ed08e8d5d9e8fe632e7447@changeid Signed-off-by: Bjorn Andersson commit 5643caa82e48c221f30d585bd807b9d69ac7ad3e Author: Stephen Boyd Date: Mon Mar 1 13:34:29 2021 -0800 arm64: dts: qcom: trogdor: Only wakeup from pen eject Configure the pen to be a wakeup source only when the pen is ejected instead of both when the pen is ejected and inserted. This corresponds to wake source requirements. Signed-off-by: Stephen Boyd Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210301133318.v2.5.Ib9672bfbe639c96c85408d6f0217a2609eb0b70f@changeid Signed-off-by: Bjorn Andersson commit f415e0f596347c8080613e245904f5a6528abd4c Author: Douglas Anderson Date: Mon Mar 1 13:34:28 2021 -0800 arm64: dts: qcom: Unify the sc7180-trogdor panel nodes Let's avoid a bit of duplication by pushing this up to the trogdor.dtsi file. Suggested-by: Stephen Boyd Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210301133318.v2.4.I1483fac4c5ae4b2d7660290ff85d69945292618f@changeid Signed-off-by: Bjorn Andersson commit ce2500242959d1cfa6016b9071479bc73ce3e17e Author: Douglas Anderson Date: Mon Mar 1 13:34:27 2021 -0800 arm64: dts: qcom: Prep sc7180-trogdor trackpad IRQ for new boards The trackpad interrupt got renamed and also moved to a new GPIO on newer boards. Let's do the move in the "trogdor.dtsi" file and then undo it in the two old boards. NOTE: since none of the new boards have device trees yet, this change looks silly on its own but it will make sense after more boards are supported. Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210301133318.v2.3.Iddf6dc8102aa4fbc3847936226fc7bf2e2cd315c@changeid Signed-off-by: Bjorn Andersson commit b4b2c20d6236d486cebb9d495ccd93e8d8dba1b4 Author: Douglas Anderson Date: Mon Mar 1 13:34:26 2021 -0800 arm64: dts: qcom: Move sc7180 MI2S config to board files and make pulldown In general pinconf belongs in board files, not SoC files. Move it to the only current user (trogdor). Also adjust the drive strengths and pulls. Cc: V Sujith Kumar Reddy Cc: Srinivasa Rao Mandadapu Cc: Tzung-Bi Shih Cc: Judy Hsiao Signed-off-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210301133318.v2.2.Id27e7e6f90c29bf623fa4880e18a14ba1dffd2d2@changeid Signed-off-by: Bjorn Andersson commit 58fd7ae621e76c4f493e4666116110bc2d4f7131 Author: Stephen Boyd Date: Mon Mar 1 13:34:25 2021 -0800 arm64: dts: qcom: sc7180: Update dts for DP phy inside QMP phy Drop the old node and add the new one in its place. Cc: Stephen Boyd Cc: Jeykumar Sankaran Cc: Chandan Uddaraju Cc: Vara Reddy Cc: Tanmay Shah Cc: Rob Clark Signed-off-by: Stephen Boyd [dianders: Adjusted due to DP not itself not in upstream dts yet] Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20210301133318.v2.1.Iad06142ceb8426ce5492737bf3d9162ed0dd2b55@changeid Signed-off-by: Bjorn Andersson commit ccbb3abb23a532880b6468e82ca99dd98c149060 Author: Vinod Koul Date: Tue Feb 16 16:47:03 2021 +0530 arm64: dts: qcom: sm8350: Add cpufreq node Add cpufreq node and reference it for the CPUs. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210216111703.1838663-1-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 6d91e2011115b18363a862711157ec503e4c8d68 Author: Vinod Koul Date: Fri Feb 12 17:25:32 2021 +0530 arm64: dts: qcom: sm8350: Use enums for GCC Now that we have GCC define, use the enums instead of numbers in the DTS Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210212115532.1339942-8-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit da97c882a25bd86efec7dbce9d10a91e9ee5fd7a Author: Vinod Koul Date: Fri Feb 12 17:25:31 2021 +0530 arm64: dts: qcom: sm8350-mtp: Enable remoteprocs This enabled the four remoteprocs found in SM8350, audio, compute, modem and sensor for MTP platform and adds firmware for them. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210212115532.1339942-7-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 177fcf0aeda2b7da677c3812b4b6f98c8584da60 Author: Vinod Koul Date: Fri Feb 12 17:25:30 2021 +0530 arm64: dts: qcom: sm8350: Add remoteprocs Add remoteproc nodes for the audio, compute and sensor cores, define glink for each one. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210212115532.1339942-6-vkoul@kernel.org [bjorn: Replaced rpmhpd defines with constants, for now] Signed-off-by: Bjorn Andersson commit 03a41991d4f66ebc71badc0d69908df7f46f33ee Author: Vinod Koul Date: Fri Feb 12 17:25:29 2021 +0530 arm64: dts: qcom: sm8350: Add SMP2P nodes SMP2P is used for interrupting and being interrupted about remoteproc state changes related to the audio, compute, modem and sensor subsystems. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210212115532.1339942-5-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 774890c9368cd10466ab4a79bb560fcc0a0b272a Author: Vinod Koul Date: Fri Feb 12 17:25:28 2021 +0530 arm64: dts: qcom: sm8350: Add rmtfs node Add the rmtfs as a reserved memory node. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210212115532.1339942-4-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 90f57509fecbf091003aca8ae4f4b043b4d5285b Author: Vinod Koul Date: Fri Feb 12 17:25:27 2021 +0530 arm64: dts: qcom: sm8350: Add rpmhpd node This adds RPMH power domain found in SM8350 SoC Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210212115532.1339942-3-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 4f23d2a557ca8192911ee8100245a9dc3098dbc1 Author: Vinod Koul Date: Fri Feb 12 17:25:26 2021 +0530 arm64: dts: qcom: sm8350: fix typo Fix the typo s/Limaited/Limited Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210212115532.1339942-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 2fc19af68abe0897d2d2c30270610e06e5ad93bd Author: Vinod Koul Date: Thu Feb 4 22:39:07 2021 +0530 arm64: dts: qcom: sm8350-mtp: add regulator names Add the property "regulator-names" to the regulators as given in schematics so that it is easier to understand the regulators being used Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210204170907.63545-7-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 694103bc11f09b72a0deaa273c81dd820af8f0d0 Author: Vinod Koul Date: Thu Feb 4 22:39:06 2021 +0530 arm64: dts: qcom: sm8350-mtp: enable UFS nodes Enabled the UFS node found in SM8350-MTP platform, also add the regulators associated with UFS HC and UFS phy to these nodes. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210204170907.63545-6-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 59c7cf814783467b253457230d763a0513f2771c Author: Vinod Koul Date: Thu Feb 4 22:39:05 2021 +0530 arm64: dts: qcom: sm8350: Add UFS nodes This adds UFS HC and UFS phy nodes to the SM8350 DTS Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210204170907.63545-5-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 054b40a6111ffffc5aaadf0551f0e13b8dd41d7e Author: Jack Pham Date: Thu Feb 4 22:39:04 2021 +0530 arm64: dts: qcom: sm8350-mtp: enable USB nodes Enable both USB controllers and associated hsphy and qmp phy nodes on sm8350 MTP. Designate the usb_1 instance as peripheral-mode only until proper PMIC based Type-C dual-role handling is supported. TODO: the second USB controller is exposed to a microAB port. Dual- role can be supported for this by adding the "usb-role-switch" property as well as defining a USB connector node with a "gpio-usb-b-connector" compatible. However, this requires GPIO support from PM8350 which is still missing. Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210116013802.1609-3-jackp@codeaurora.org Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210204170907.63545-4-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit e780fb318fe5e77b8193c17d1c96fdb8e61c711d Author: Jack Pham Date: Thu Feb 4 22:39:03 2021 +0530 arm64: dts: qcom: sm8350: add USB and PHY device nodes Add device nodes for the two instances each of USB3 controllers, QMP SS PHYs and SNPS HS PHYs. Signed-off-by: Jack Pham Link: https://lore.kernel.org/r/20210116013802.1609-2-jackp@codeaurora.org Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210204170907.63545-3-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 187f65b7f004f99e6816a868e453e9427144ef61 Author: Vinod Koul Date: Thu Feb 4 22:39:02 2021 +0530 arm64: dts: qcom: sm8350: Add apss_smmu node This adds apss_smmu node to SM8350 DTS Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210204170907.63545-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit 29a3349543e4ce3fe4e2a761403cc629e3534c67 Author: Sai Prakash Ranjan Date: Tue Feb 16 15:17:49 2021 +0530 arm64: dts: qcom: sm8250: Fix timer interrupt to specify EL2 physical timer ARM architected timer interrupts DT property specifies EL2/HYP physical interrupt and not EL2/HYP virtual interrupt for the 4th interrupt property. As per interrupt documentation for SM8250 SoC, the EL2/HYP physical timer interrupt is 10 and EL2/HYP virtual timer interrupt is 12, so fix the 4th timer interrupt to be EL2 physical timer interrupt (10 in this case). Fixes: 60378f1a171e ("arm64: dts: qcom: sm8250: Add sm8250 dts file") Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/744e58f725d279eb2b049a7da42b0f09189f4054.1613468366.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 794d3e309e44c99158d0166b1717f297341cf3ab Author: Sai Prakash Ranjan Date: Tue Feb 16 15:17:48 2021 +0530 arm64: dts: qcom: sm8350: Fix level triggered PMU interrupt polarity As per interrupt documentation for SM8350 SoC, the polarity for level triggered PMU interrupt is low, fix this. Fixes: b7e8f433a673 ("arm64: dts: qcom: Add basic devicetree support for SM8350 SoC") Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/ca57409198477f7815e32a6a7467dcdc9b93dc4f.1613468366.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 93138ef5ac923b10f81575d35dbcb83136cbfc40 Author: Sai Prakash Ranjan Date: Tue Feb 16 15:17:47 2021 +0530 arm64: dts: qcom: sm8250: Fix level triggered PMU interrupt polarity As per interrupt documentation for SM8250 SoC, the polarity for level triggered PMU interrupt is low, fix this. Fixes: 60378f1a171e ("arm64: dts: qcom: sm8250: Add sm8250 dts file") Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/96680a1c6488955c9eef7973c28026462b2a4ec0.1613468366.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 97832fa80596445f0431eb37a2dcf2ec8fb23289 Author: Sai Prakash Ranjan Date: Tue Mar 2 12:58:04 2021 +0530 arm64: dts: qcom: sm8350: Rename the qmp node to power-controller Use the generic DT node name "power-controller" for AOSS message ram instead of the protocol name QMP(Qualcomm Messaging Protocol) since it is used for power management requests. Reviewed-by: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/15005f1441594670adcd60a300c88e41d79cad27.1614669585.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 43f14a0b4f847491c06b03405f2347e8e7d8f5ac Author: Sai Prakash Ranjan Date: Tue Mar 2 12:58:03 2021 +0530 arm64: dts: qcom: sm8250: Rename the qmp node to power-controller Use the generic DT node name "power-controller" for AOSS message ram instead of the protocol name QMP(Qualcomm Messaging Protocol) since it is used for power management requests. Reviewed-by: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/044fe2e590e166060de65f074df6874ec3a79531.1614669585.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit f81c1e518f3ed3cf6205262c900e39dee8af9510 Author: Sai Prakash Ranjan Date: Tue Mar 2 12:58:02 2021 +0530 arm64: dts: qcom: sdm845: Rename the qmp node to power-controller Use the generic DT node name "power-controller" for AOSS message ram instead of the protocol name QMP(Qualcomm Messaging Protocol) since it is used for power management requests. Reviewed-by: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/55416e116dda4aad977bb050451d328b1f6b00d3.1614669585.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 26d06feace1c06f4d63a1b92d49f8bd172b3595b Author: Sai Prakash Ranjan Date: Tue Mar 2 12:58:01 2021 +0530 arm64: dts: qcom: sc7180: Rename the qmp node to power-controller Use the generic DT node name "power-controller" for AOSS message ram instead of the protocol name QMP(Qualcomm Messaging Protocol) since it is used for power management requests. Reviewed-by: Stephen Boyd Suggested-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/e96d665d1e98b46a189a57e39575ae0debf37172.1614669585.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit e4ffe8d5f048f66b04eace6add4f3013823e9a33 Author: Matthias Kaehlcke Date: Thu Feb 25 10:33:37 2021 -0800 arm64: dts: qcom: sc7180: trogdor: Use ADC TM channel 0 instead of 1 for charger temperature On trogdor the ADC thermal monitor is used for monitoring certain device temperatures. All trogdor boards have at least a thermistor for the charger temperature, optionally they may have others. Currently the ADC thermal monitor is configured to use channel 1 for the charger temperature. Given that all trogdor boards have the charger thermistor it makes more sense to use channel 0, and then let boards with other thermistors use channels 1, 2, 3, rather than 0, 2, 3. Reviewed-by: Stephen Boyd Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210225103330.v2.4.I67e29f2854bad22e3581d6a6e1879b9fc8abbdea@changeid Signed-off-by: Bjorn Andersson commit 38f3267def6511171aef0f056ad172686903603f Author: Matthias Kaehlcke Date: Thu Feb 25 10:33:36 2021 -0800 arm64: dts: qcom: sc7180: trogdor: Fix trip point config of charger thermal zone The trip point configuration of the charger thermal zone for trogdor is missing a node for the critical trip point. Add the missing node. Reviewed-by: Stephen Boyd Reviewed-by: Douglas Anderson Fixes: bb06eb3607e9 ("arm64: qcom: sc7180: trogdor: Add ADC nodes and thermal zone for charger thermistor") Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210225103330.v2.3.Ife7768b6b4765026c9d233ad4982da0e365ddbca@changeid Signed-off-by: Bjorn Andersson commit 29edb44d1fce01585637ca71c462bd3a5b283aee Author: Matthias Kaehlcke Date: Thu Feb 25 10:33:35 2021 -0800 arm64: dts: qcom: sc7180: Disable charger thermal zone for lazor Lazor is stuffed with a 47k NTC as thermistor for the charger temperature which currently isn't supported by the PM6150 ADC driver. Disable the charger thermal zone to avoid the use of bogus temperature values. Reviewed-by: Stephen Boyd Signed-off-by: Matthias Kaehlcke Link: https://lore.kernel.org/r/20210225103330.v2.2.Ia4c1022191d09fe8c56a16486b77796b83ffcae4@changeid Signed-off-by: Bjorn Andersson commit e37584d1d86ba2574425c1e96fe2f43c949e1a66 Author: Matthias Kaehlcke Date: Thu Feb 25 10:33:34 2021 -0800 arm64: dts: qcom: sc7180: trogdor: Add label to charger thermal zone Some revisions of trogdor boards use a thermistor for the charger temperature which currently isn't supported by the PM6150 ADC driver. This results in bogus temperature readings. Add a label to the charger thermal zone to facilitate disabling of the thermal zone on affected boards. Signed-off-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reviewed-by: Stephen Boyd Link: https://lore.kernel.org/r/20210225103330.v2.1.I6a426324db3d98d6cfae8adf2598831bb30bba74@changeid Signed-off-by: Bjorn Andersson commit ddd6b7267fe6e3c5a48e2e4eda18f354595c6d65 Author: Rajendra Nayak Date: Thu Mar 11 16:55:49 2021 +0530 dt-bindings: firmware: scm: Add sc7280 support Add compatible for sc7280 SoC Signed-off-by: Rajendra Nayak Reviewed-by: Stephen Boyd Acked-by: Rob Herring Link: https://lore.kernel.org/r/1615461961-17716-3-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit f2590e4b3bc4cd65620f94d281cd95c2e833621e Author: Stephen Boyd Date: Wed May 20 23:04:25 2020 -0700 soc: qcom: rpmh-rsc: Fold WARN_ON() into if condition Move the WARN_ON() into the if condition so the compiler can see that the branch is unlikely() and possibly optimize it better. Cc: Maulik Shah Reviewed-by: Douglas Anderson Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200521060425.24285-4-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit a07766206baf6272226df577fce920e931706006 Author: Stephen Boyd Date: Wed May 20 23:04:24 2020 -0700 soc: qcom: rpmh-rsc: Loop over fewer bits in irq handler readl() returns a u32, and BITS_PER_LONG is different on 32-bit vs. 64-bit architectures. Let's loop over the possible bits set in that type instead of looping over more bits than we ever may need to. Cc: Maulik Shah Reviewed-by: Douglas Anderson Reviewed-by: Bjorn Andersson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200521060425.24285-3-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 814a0d46301ab6d41ad4ed198451c56ed9c8c05a Author: Stephen Boyd Date: Wed May 20 23:04:23 2020 -0700 soc: qcom: rpmh-rsc: Remove tcs_is_free() API This API does very little. Let's replace all the callsites with the normal operations that would be done on top of the bitmap that tcs_in_use is. This simplifies and reduces the code size. Reviewed-by: Maulik Shah Reviewed-by: Douglas Anderson Cc: Maulik Shah Cc: Douglas Anderson Signed-off-by: Stephen Boyd Link: https://lore.kernel.org/r/20200521060425.24285-2-swboyd@chromium.org Signed-off-by: Bjorn Andersson commit 62fef634ef20cb447434568b17f41d1b35ab3821 Author: Sibi Sankar Date: Tue Mar 9 11:21:46 2021 +0530 soc: qcom: smem: Update max processor count Update max processor count to reflect the number of co-processors on SC7280 SoCs. Signed-off-by: Sibi Sankar Link: https://lore.kernel.org/r/1615269111-25559-2-git-send-email-sibis@codeaurora.org Signed-off-by: Bjorn Andersson commit ce6e674a589ebf56215bfae9065922a6aefc3b12 Author: Sai Prakash Ranjan Date: Thu Feb 25 15:00:23 2021 +0530 soc: qcom: aoss: Add AOSS QMP support for SC7280 Add AOSS QMP support for SC7280 SoC. Reviewed-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/d311b75428da7d87638208490fa9a64b5ef15d6f.1614244789.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit 28822aeae414582f6645c140d110778f3f0fd322 Author: Sai Prakash Ranjan Date: Thu Feb 25 15:00:22 2021 +0530 dt-bindings: soc: qcom: aoss: Add SC7280 compatible Add SC7280 AOSS QMP compatible to the list of possible bindings. Acked-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/8584e915f42405a7a4a799133a09d0d4aa65d2a8.1614244789.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit f6a07be633018ad516673106afc28b9d6d94548e Author: Sai Prakash Ranjan Date: Thu Feb 25 15:00:18 2021 +0530 soc: qcom: llcc: Add configuration data for SC7280 Add LLCC configuration data for SC7280 SoC. Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/348fcb76ea837c043f2e493c6df8aa5ebb182c92.1614244789.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit cfe53781fc5f1c3cfed9513ebdcc3e87074de718 Author: Sai Prakash Ranjan Date: Thu Feb 25 15:00:17 2021 +0530 dt-bindings: arm: msm: Add LLCC for SC7280 Add LLCC compatible for SC7280 SoC. Acked-by: Rob Herring Reviewed-by: Stephen Boyd Signed-off-by: Sai Prakash Ranjan Link: https://lore.kernel.org/r/f3b32d437d7c1165a74ceec2cd52ff56b496e5a3.1614244789.git.saiprakash.ranjan@codeaurora.org Signed-off-by: Bjorn Andersson commit b469010d56d18c70d3e8578053ab96a94608dde1 Author: Bhaskar Chowdhury Date: Sun Mar 7 03:05:42 2021 +0530 soc: qcom: Fix typos in the file qmi_encdec.c Rudimentory spelling fixes throughout the file. s/descibing/describing/ s/inforation/information/ Signed-off-by: Bhaskar Chowdhury Link: https://lore.kernel.org/r/20210306213542.19413-1-unixbhaskar@gmail.com Signed-off-by: Bjorn Andersson commit 9937447d83ab9c7372999f3340df62a3ee32b52c Author: Rajendra Nayak Date: Tue Mar 2 11:18:12 2021 +0530 soc: qcom: rpmhpd: Add sc7280 powerdomains Add the power domains exposed by RPMH in the Qualcomm Technologies Inc sc7280 platform Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1614664092-9394-2-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 9a3e49d749800e1f3e0185db0092d449a543843b Author: Rajendra Nayak Date: Tue Mar 2 11:18:11 2021 +0530 dt-bindings: power: rpmpd: Add sc7280 to rpmpd binding Add compatible and constants for the power domains exposed by the RPMH in the Qualcomm Technologies Inc sc7280 platform. Signed-off-by: Rajendra Nayak Link: https://lore.kernel.org/r/1614664092-9394-1-git-send-email-rnayak@codeaurora.org Signed-off-by: Bjorn Andersson commit 639c85628757044fee608079a7185b4dbde6bdab Author: Vinod Koul Date: Wed Feb 10 16:12:57 2021 +0530 soc: qcom: rpmhpd: Add SM8350 power domains This adds the power domains found in SM8350 SoC. Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210210104257.339462-2-vkoul@kernel.org Signed-off-by: Bjorn Andersson commit f20b61b86a7503940cbe3da7f346e54adb86e7e4 Author: Vinod Koul Date: Wed Feb 10 16:12:56 2021 +0530 dt-bindings: power: Add rpm power domain bindings for SM8350 Add RPM power domain bindings for the SM8350 SoC Acked-by: Rob Herring Signed-off-by: Vinod Koul Link: https://lore.kernel.org/r/20210210104257.339462-1-vkoul@kernel.org [bjorn: Added dt-bindings include file changes from the driver patch] Signed-off-by: Bjorn Andersson commit 97bc84bbd4de3c060b68aea4d546c7f21c4d6814 Author: Hoang Huu Le Date: Thu Mar 11 10:33:23 2021 +0700 tipc: clean up warnings detected by sparse This patch fixes the following warning from sparse: net/tipc/monitor.c:263:35: warning: incorrect type in assignment (different base types) net/tipc/monitor.c:263:35: expected unsigned int net/tipc/monitor.c:263:35: got restricted __be32 [usertype] [...] net/tipc/node.c:374:13: warning: context imbalance in 'tipc_node_read_lock' - wrong count at exit net/tipc/node.c:379:13: warning: context imbalance in 'tipc_node_read_unlock' - unexpected unlock net/tipc/node.c:384:13: warning: context imbalance in 'tipc_node_write_lock' - wrong count at exit net/tipc/node.c:389:13: warning: context imbalance in 'tipc_node_write_unlock_fast' - unexpected unlock net/tipc/node.c:404:17: warning: context imbalance in 'tipc_node_write_unlock' - unexpected unlock [...] net/tipc/crypto.c:1201:9: warning: incorrect type in initializer (different address spaces) net/tipc/crypto.c:1201:9: expected struct tipc_aead [noderef] __rcu *__tmp net/tipc/crypto.c:1201:9: got struct tipc_aead * [...] Acked-by: Jon Maloy Signed-off-by: Hoang Huu Le Signed-off-by: David S. Miller commit 1980d37565061ab44bdc2f9e4da477d3b9752e81 Author: Hoang Le Date: Thu Mar 11 10:33:22 2021 +0700 tipc: convert dest node's address to network order (struct tipc_link_info)->dest is in network order (__be32), so we must convert the value to network order before assigning. The problem detected by sparse: net/tipc/netlink_compat.c:699:24: warning: incorrect type in assignment (different base types) net/tipc/netlink_compat.c:699:24: expected restricted __be32 [usertype] dest net/tipc/netlink_compat.c:699:24: got int Acked-by: Jon Maloy Signed-off-by: Hoang Le Signed-off-by: David S. Miller commit 1520929e26d54bc3c9e024ee91eee5a19c56b95b Merge: 1bc61c9dd4f10 cf31190ae0b78 Author: David S. Miller Date: Thu Mar 11 16:22:39 2021 -0800 Merge branch 'mlxsw-Implement-sampling-using-mirroring' Ido Schimmel says: ==================== mlxsw: Implement sampling using mirroring So far, sampling was implemented using a dedicated sampling mechanism that is available on all Spectrum ASICs. Spectrum-2 and later ASICs support sampling by mirroring packets to the CPU port with probability. This method has a couple of advantages compared to the legacy method: * Extra metadata per-packet: Egress port, egress traffic class, traffic class occupancy and end-to-end latency * Ability to sample packets on egress / per-flow as opposed to only ingress This series should not result in any user-visible changes and its aim is to convert Spectrum-2 and later ASICs to perform sampling by mirroring to the CPU port with probability. Future submissions will expose the additional metadata and enable sampling using more triggers (e.g., egress). Series overview: Patches #1-#3 extend the SPAN (mirroring) module to accept new parameters required for sampling. See individual commit messages for detailed explanation. Patch #4-#5 split sampling support between Spectrum-1 and later ASIC while still using the legacy method for all ASIC generations. Patch #6 converts Spectrum-2 and later ASICs to perform sampling by mirroring to the CPU port with probability. ==================== Signed-off-by: David S. Miller commit cf31190ae0b788159a9874f0b28bbfde994741cd Author: Ido Schimmel Date: Thu Mar 11 14:24:16 2021 +0200 mlxsw: spectrum_matchall: Implement sampling using mirroring Spectrum-2 and later ASICs support sampling of packets by mirroring to the CPU with probability. There are several advantages compared to the legacy dedicated sampling mechanism: * Extra metadata per-packet: Egress port, egress traffic class, traffic class occupancy and end-to-end latency * Ability to sample packets on egress / per-flow Convert Spectrum-2 and later ASICs to perform sampling by mirroring to the CPU with probability. Subsequent patches will add support for egress / per-flow sampling and expose the extra metadata. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 34a277212c67a395b47b715aa89c4b4e2c957d42 Author: Ido Schimmel Date: Thu Mar 11 14:24:15 2021 +0200 mlxsw: spectrum_trap: Split sampling traps between ASICs Sampling of ingress packets is supported using a dedicated sampling mechanism on all Spectrum ASICs. However, Spectrum-2 and later ASICs support more sophisticated sampling by mirroring packets to the CPU. As a preparation for more advanced sampling configurations, split the trap configuration used for sampled packets between Spectrum-1 and later ASICs. This is needed since packets that are mirrored to the CPU are trapped via a different trap identifier compared to packets that are sampled using the dedicated sampling mechanism. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 20afb9bc480d0bfe3d1abcb934d79b2cdc19acbf Author: Ido Schimmel Date: Thu Mar 11 14:24:14 2021 +0200 mlxsw: spectrum_matchall: Split sampling support between ASICs Sampling of ingress packets is supported using a dedicated sampling mechanism on all Spectrum ASICs. However, Spectrum-2 and later ASICs support more sophisticated sampling by mirroring packets to the CPU. As a preparation for more advanced sampling configurations, split the sampling operations between Spectrum-1 and later ASICs. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 2dcbd9207b3380c0efd89b2805dfc4e867470eb9 Author: Ido Schimmel Date: Thu Mar 11 14:24:13 2021 +0200 mlxsw: spectrum_span: Add SPAN probability rate support Currently, every packet that matches a mirroring trigger (e.g., received packets, buffer dropped packets) is mirrored. Spectrum-2 and later ASICs support mirroring with probability, where every 1 in N matched packets is mirrored. Extend the API that creates the binding between the trigger and the SPAN agent with a probability rate parameter, which is an attribute of the trigger. Set it to '1' to maintain existing behavior. Subsequent patches will use it to perform more sophisticated sampling, by mirroring packets to the CPU with probability. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit fa3faeb7aedbfbd7e30eb25a25058a2cce1010fb Author: Ido Schimmel Date: Thu Mar 11 14:24:12 2021 +0200 mlxsw: reg: Extend mirroring registers with probability rate field The MPAR and MPAGR registers are used to configure the binding between the mirroring trigger (e.g., received packet) and the SPAN agent. Add probability rate field, which will allow us to support sampling by mirroring to the CPU. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 5c7659eba873df8929f4bffd352906f625d4cfec Author: Ido Schimmel Date: Thu Mar 11 14:24:11 2021 +0200 mlxsw: spectrum_span: Add SPAN session identifier support When packets are mirrored to the CPU, the trap identifier with which the packets are trapped is determined according to the session identifier of the SPAN agent performing the mirroring. Packets that are trapped for the same logical reason (e.g., buffer drops) should use the same session identifier. Currently, a single session is implicitly supported (identifier 0) and is used for packets that are mirrored to the CPU due to buffer drops (e.g., early drop). Subsequent patches are going to mirror packets to the CPU due to sampling, which will require a different session identifier. Prepare for that by making the session identifier an attribute of the SPAN agent. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 7610ab57de5616631b664ea31c11bad527810391 Author: Jason Gunthorpe Date: Thu Mar 4 15:05:01 2021 +0200 RDMA/mlx5: Allow larger pages in DevX umem The umem DMA list calculation was locked at 4k pages due to confusion around how this API works and is used when larger pages are present. The conclusion is: - umem's cannot extend past what is mapped into the process, so creating a lage page size and referring to a sub-range is not allowed - umem's must always have a page offset of zero, except for sub PAGE_SIZE umems - The feature of umem_offset to create multiple objects inside a umem is buggy and isn't used anyplace. Thus we can assume all users of the current API have umem_offset == 0 as well Provide a new page size calculator that limits the DMA list to the VA range and enforces umem_offset == 0. Allow user space to specify the page sizes which it can accept, this bitmap must be derived from the intended use of the umem, based on per-usage HW limitations. Link: https://lore.kernel.org/r/20210304130501.1102577-4-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 2904bb37b35d07be7bfa3fb4a0fc1a3daa6678b3 Author: Yishai Hadas Date: Thu Mar 4 15:05:00 2021 +0200 IB/core: Split uverbs_get_const/default to consider target type Change uverbs_get_const/uverbs_get_const_default to work properly with both signed/unsigned parameters. Current APIs mix s64 and u64 which leads to incorrect check when u64 value was supplied and its upper bit was set. In that case uverbs_get_const() / uverbs_get_const_default() lower bound check may fail unexpectedly, target is unsigned (lower bound is 0) but value became negative as of the s64 usage. Split to have two different APIs, no change to callers as the required API will be called internally according to the target type. Link: https://lore.kernel.org/r/20210304130501.1102577-3-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3f32dc0f4601b180bbfd7b5adc7f82557f1408d0 Author: Yishai Hadas Date: Thu Mar 4 15:04:59 2021 +0200 IB/core: Drop WARN_ON() from ib_umem_find_best_pgsz() The WARN_ON() issued as part of ib_umem_find_best_pgsz() blocked cases when only page sizes larger than PAGE_SIZE were set, drop it to enable those cases. In addition, there is no need to have a specific check for zero pgsz_bitmap, the function will do its job and return 0 at the end if nothing match will be found. Link: https://lore.kernel.org/r/20210304130501.1102577-2-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1bc61c9dd4f100804d71dba313305df9187d7553 Merge: 2a0186a37700b 9f4d9283388d9 Author: David S. Miller Date: Thu Mar 11 16:17:43 2021 -0800 Merge tag 'mlx5-updates-2021-03-11' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux Saeed Mahameed says: ==================== This series provides some cleanups to mlx5 driver For more information please see tag log below. Please pull and let me know if there is any problem. mlx5-updates-2021-03-11 Cleanups for mlx5 driver 1) Fix build warnings form Arnd and Vlad 2) Leon improves locking for driver load/unload flows 3) From Roi, Lockdep false dependency warning 4) Other trivial cleanups ==================== Signed-off-by: David S. Miller commit 2a0186a37700b0d5b8cc40be202a62af44f02fa2 Merge: 1d5d0a078672d 15e1dd5703066 Author: David S. Miller Date: Thu Mar 11 16:13:00 2021 -0800 Merge branch 'nexthop-Resilient-next-hop-groups' Petr Machata says: ==================== nexthop: Resilient next-hop groups At this moment, there is only one type of next-hop group: an mpath group. Mpath groups implement the hash-threshold algorithm, described in RFC 2992[1]. To select a next hop, hash-threshold algorithm first assigns a range of hashes to each next hop in the group, and then selects the next hop by comparing the SKB hash with the individual ranges. When a next hop is removed from the group, the ranges are recomputed, which leads to reassignment of parts of hash space from one next hop to another. RFC 2992 illustrates it thus: +-------+-------+-------+-------+-------+ | 1 | 2 | 3 | 4 | 5 | +-------+-+-----+---+---+-----+-+-------+ | 1 | 2 | 4 | 5 | +---------+---------+---------+---------+ Before and after deletion of next hop 3 under the hash-threshold algorithm. Note how next hop 2 gave up part of the hash space in favor of next hop 1, and 4 in favor of 5. While there will usually be some overlap between the previous and the new distribution, some traffic flows change the next hop that they resolve to. If a multipath group is used for load-balancing between multiple servers, this hash space reassignment causes an issue that packets from a single flow suddenly end up arriving at a server that does not expect them, which may lead to TCP reset. If a multipath group is used for load-balancing among available paths to the same server, the issue is that different latencies and reordering along the way causes the packets to arrive in the wrong order. Resilient hashing is a technique to address the above problem. Resilient next-hop group has another layer of indirection between the group itself and its constituent next hops: a hash table. The selection algorithm uses a straightforward modulo operation on the SKB hash to choose a hash table bucket, then reads the next hop that this bucket contains, and forwards traffic there. This indirection brings an important feature. In the hash-threshold algorithm, the range of hashes associated with a next hop must be continuous. With a hash table, mapping between the hash table buckets and the individual next hops is arbitrary. Therefore when a next hop is deleted the buckets that held it are simply reassigned to other next hops: +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|1|1|1|2|2|2|2|3|3|3|3|4|4|4|4|5|5|5|5| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ v v v v +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|1|1|1|2|2|2|2|1|2|4|5|4|4|4|4|5|5|5|5| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Before and after deletion of next hop 3 under the resilient hashing algorithm. When weights of next hops in a group are altered, it may be possible to choose a subset of buckets that are currently not used for forwarding traffic, and use those to satisfy the new next-hop distribution demands, keeping the "busy" buckets intact. This way, established flows are ideally kept being forwarded to the same endpoints through the same paths as before the next-hop group change. This patch set adds the implementation of resilient next-hop groups. In a nutshell, the algorithm works as follows. Each next hop has a number of buckets that it wants to have, according to its weight and the number of buckets in the hash table. In case of an event that might cause bucket allocation change, the numbers for individual next hops are updated, similarly to how ranges are updated for mpath group next hops. Following that, a new "upkeep" algorithm runs, and for idle buckets that belong to a next hop that is currently occupying more buckets than it wants (it is "overweight"), it migrates the buckets to one of the next hops that has fewer buckets than it wants (it is "underweight"). If, after this, there are still underweight next hops, another upkeep run is scheduled to a future time. Chances are there are not enough "idle" buckets to satisfy the new demands. The algorithm has knobs to select both what it means for a bucket to be idle, and for whether and when to forcefully migrate buckets if there keeps being an insufficient number of idle ones. To illustrate the usage, consider the following commands: # ip nexthop add id 1 via 192.0.2.2 dev dummy1 # ip nexthop add id 2 via 192.0.2.3 dev dummy1 # ip nexthop add id 10 group 1/2 type resilient \ buckets 8 idle_timer 60 unbalanced_timer 300 The last command creates a resilient next-hop group. It will have 8 buckets, each bucket will be considered idle when no traffic hits it for at least 60 seconds, and if the table remains out of balance for 300 seconds, it will be forcefully brought into balance. If not present in netlink message, the idle timer defaults to 120 seconds, and there is no unbalanced timer, meaning the group may remain unbalanced indefinitely. The value of 120 is the default in Cumulus implementation of resilient next-hop groups. To a degree the default is arbitrary, the only value that certainly does not make sense is 0. Therefore going with an existing deployed implementation is reasonable. Unbalanced time, i.e. how long since the last time that all nexthops had as many buckets as they should according to their weights, is reported when the group is dumped: # ip nexthop show id 10 id 10 group 1/2 type resilient buckets 8 idle_timer 60 unbalanced_timer 300 unbalanced_time 0 When replacing next hops or changing weights, if one does not specify some parameters, their value is left as it was: # ip nexthop replace id 10 group 1,2/2 type resilient # ip nexthop show id 10 id 10 group 1,2/2 type resilient buckets 8 idle_timer 60 unbalanced_timer 300 unbalanced_time 0 It is also possible to do a dump of individual buckets (and now you know why there were only 8 of them in the example above): # ip nexthop bucket show id 10 id 10 index 0 idle_time 5.59 nhid 1 id 10 index 1 idle_time 5.59 nhid 1 id 10 index 2 idle_time 8.74 nhid 2 id 10 index 3 idle_time 8.74 nhid 2 id 10 index 4 idle_time 8.74 nhid 1 id 10 index 5 idle_time 8.74 nhid 1 id 10 index 6 idle_time 8.74 nhid 1 id 10 index 7 idle_time 8.74 nhid 1 Note the two buckets that have a shorter idle time. Those are the ones that were migrated after the nexthop replace command to satisfy the new demand that nexthop 1 be given 6 buckets instead of 4. The patchset proceeds as follows: - Patches #1 and #2 are small refactoring patches. - Patch #3 adds a new flag to struct nh_group, is_multipath. This flag is meant to be set for all nexthop groups that in general have several nexthops from which they choose, and avoids a more expensive dispatch based on reading several flags, one for each nexthop group type. - Patch #4 contains defines of new UAPI attributes and the new next-hop group type. At this point, the nexthop code is made to bounce the new type. As the resilient hashing code is gradually added in the following patch sets, it will remain dead. The last patch will make it accessible. This patch also adds a suite of new messages related to next hop buckets. This approach was taken instead of overloading the information on the existing RTM_{NEW,DEL,GET}NEXTHOP messages for the following reasons. First, a next-hop group can contain a large number of next-hop buckets (4k is not unheard of). This imposes limits on the amount of information that can be encoded for each next-hop bucket given a netlink message is limited to 64k bytes. Second, while RTM_NEWNEXTHOPBUCKET is only used for notifications at this point, in the future it can be extended to provide user space with control over next-hop buckets configuration. - Patch #5 contains the meat of the resilient next-hop group support. - Patches #6 and #7 implement support for notifications towards the drivers. - Patch #8 adds an interface for the drivers to report resilient hash table bucket activity. Drivers will be able to report through this interface whether traffic is hitting a given bucket. - Patch #9 adds an interface for the drivers to report whether a given hash table bucket is offloaded or trapping traffic. - In patches #10, #11, #12 and #13, UAPI is implemented. This includes all the code necessary for creation of resilient groups, bucket dumping and getting, and bucket migration notifications. - In patch #14 the next-hop groups are finally made available. The overall plan is to contribute approximately the following patchsets: 1) Nexthop policy refactoring (already pushed) 2) Preparations for resilient next-hop groups (already pushed) 3) Implementation of resilient next-hop groups (this patchset) 4) Netdevsim offload plus a suite of selftests 5) Preparations for mlxsw offload of resilient next-hop groups 6) mlxsw offload including selftests Interested parties can look at the current state of the code at [2] and [3]. [1] https://tools.ietf.org/html/rfc2992 [2] https://github.com/idosch/linux/commits/submit/res_integ_v1 [3] https://github.com/idosch/iproute2/commits/submit/res_v1 ==================== Signed-off-by: David S. Miller commit 15e1dd570306680269a4738d8e6c721f0924aa03 Author: Petr Machata Date: Thu Mar 11 19:03:25 2021 +0100 nexthop: Enable resilient next-hop groups Now that all the code is in place, stop rejecting requests to create resilient next-hop groups. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 0b4818aabcd6508a2545acb809f4acea034cea9c Author: Petr Machata Date: Thu Mar 11 19:03:24 2021 +0100 nexthop: Notify userspace about bucket migrations Nexthop replacements et.al. are notified through netlink, but if a delayed work migrates buckets on the background, userspace will stay oblivious. Notify these as RTM_NEWNEXTHOPBUCKET events. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 187d4c6b97967b8d023ccb981742f8605a1b1cb7 Author: Petr Machata Date: Thu Mar 11 19:03:23 2021 +0100 nexthop: Add netlink handlers for bucket get Allow getting (but not setting) individual buckets to inspect the next hop mapped therein, idle time, and flags. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 8a1bbabb034d5cf6a4788acb4fc6ce0a1dfd6177 Author: Petr Machata Date: Thu Mar 11 19:03:22 2021 +0100 nexthop: Add netlink handlers for bucket dump Add a dump handler for resilient next hop buckets. When next-hop group ID is given, it walks buckets of that group, otherwise it walks buckets of all groups. It then dumps the buckets whose next hops match the given filtering criteria. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit a2601e2b1e7ecd3831f2fbb1ad43bbdb2918e2e6 Author: Petr Machata Date: Thu Mar 11 19:03:21 2021 +0100 nexthop: Add netlink handlers for resilient nexthop groups Implement the netlink messages that allow creation and dumping of resilient nexthop groups. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit cfc15c1dbb0b7574498eef453b8ddb534e408551 Author: Ido Schimmel Date: Thu Mar 11 19:03:20 2021 +0100 nexthop: Allow reporting activity of nexthop buckets The kernel periodically checks the idle time of nexthop buckets to determine if they are idle and can be re-populated with a new nexthop. When the resilient nexthop group is offloaded to hardware, the kernel will not see activity on nexthop buckets unless it is reported from hardware. Add a function that can be periodically called by device drivers to report activity on nexthop buckets after querying it from the underlying device. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 56ad5ba344dea9c914331da8754f5ba7cede9941 Author: Ido Schimmel Date: Thu Mar 11 19:03:19 2021 +0100 nexthop: Allow setting "offload" and "trap" indication of nexthop buckets Add a function that can be called by device drivers to set "offload" or "trap" indication on nexthop buckets following nexthop notifications and other changes such as a neighbour becoming invalid. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 7c37c7e00411b3d1e0c5292368317aca69d1f324 Author: Petr Machata Date: Thu Mar 11 19:03:18 2021 +0100 nexthop: Implement notifiers for resilient nexthop groups Implement the following notifications towards drivers: - NEXTHOP_EVENT_REPLACE, when a resilient nexthop group is created. - NEXTHOP_EVENT_BUCKET_REPLACE any time there is a change in assignment of next hops to hash table buckets. That includes replacements, deletions, and delayed upkeep cycles. Some bucket notifications can be vetoed by the driver, to make it possible to propagate bucket busy-ness flags from the HW back to the algorithm. Some are however forced, e.g. if a next hop is deleted, all buckets that use this next hop simply must be migrated, whether the HW wishes so or not. - NEXTHOP_EVENT_RES_TABLE_PRE_REPLACE, before a resilient nexthop group is replaced. Usually the driver will get the bucket notifications as well, and could veto those. But in some cases, a bucket may not be migrated immediately, but during delayed upkeep, and that is too late to roll the transaction back. This notification allows the driver to take a look and veto the new proposed group up front, before anything is committed. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit b8f090d0beb185007e5305f7c8aaf3f38fba3dda Author: Ido Schimmel Date: Thu Mar 11 19:03:17 2021 +0100 nexthop: Add data structures for resilient group notifications Add data structures that will be used for in-kernel notifications about addition / deletion of a resilient nexthop group and about changes to a hash bucket within a resilient group. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 283a72a5599e80750699d2021830a294ed9ab3f3 Author: Petr Machata Date: Thu Mar 11 19:03:16 2021 +0100 nexthop: Add implementation of resilient next-hop groups At this moment, there is only one type of next-hop group: an mpath group, which implements the hash-threshold algorithm. To select a next hop, hash-threshold algorithm first assigns a range of hashes to each next hop in the group, and then selects the next hop by comparing the SKB hash with the individual ranges. When a next hop is removed from the group, the ranges are recomputed, which leads to reassignment of parts of hash space from one next hop to another. While there will usually be some overlap between the previous and the new distribution, some traffic flows change the next hop that they resolve to. That causes problems e.g. as established TCP connections are reset, because the traffic is forwarded to a server that is not familiar with the connection. Resilient hashing is a technique to address the above problem. Resilient next-hop group has another layer of indirection between the group itself and its constituent next hops: a hash table. The selection algorithm uses a straightforward modulo operation to choose a hash bucket, and then reads the next hop that this bucket contains, and forwards traffic there. This indirection brings an important feature. In the hash-threshold algorithm, the range of hashes associated with a next hop must be continuous. With a hash table, mapping between the hash table buckets and the individual next hops is arbitrary. Therefore when a next hop is deleted the buckets that held it are simply reassigned to other next hops. When weights of next hops in a group are altered, it may be possible to choose a subset of buckets that are currently not used for forwarding traffic, and use those to satisfy the new next-hop distribution demands, keeping the "busy" buckets intact. This way, established flows are ideally kept being forwarded to the same endpoints through the same paths as before the next-hop group change. In a nutshell, the algorithm works as follows. Each next hop has a number of buckets that it wants to have, according to its weight and the number of buckets in the hash table. In case of an event that might cause bucket allocation change, the numbers for individual next hops are updated, similarly to how ranges are updated for mpath group next hops. Following that, a new "upkeep" algorithm runs, and for idle buckets that belong to a next hop that is currently occupying more buckets than it wants (it is "overweight"), it migrates the buckets to one of the next hops that has fewer buckets than it wants (it is "underweight"). If, after this, there are still underweight next hops, another upkeep run is scheduled to a future time. Chances are there are not enough "idle" buckets to satisfy the new demands. The algorithm has knobs to select both what it means for a bucket to be idle, and for whether and when to forcefully migrate buckets if there keeps being an insufficient number of idle buckets. There are three users of the resilient data structures. - The forwarding code accesses them under RCU, and does not modify them except for updating the time a selected bucket was last used. - Netlink code, running under RTNL, which may modify the data. - The delayed upkeep code, which may modify the data. This runs unlocked, and mutual exclusion between the RTNL code and the delayed upkeep is maintained by canceling the delayed work synchronously before the RTNL code touches anything. Later it restarts the delayed work if necessary. The RTNL code has to implement next-hop group replacement, next hop removal, etc. For removal, the mpath code uses a neat trick of having a backup next hop group structure, doing the necessary changes offline, and then RCU-swapping them in. However, the hash tables for resilient hashing are about an order of magnitude larger than the groups themselves (the size might be e.g. 4K entries), and it was felt that keeping two of them is an overkill. Both the primary next-hop group and the spare therefore use the same resilient table, and writers are careful to keep all references valid for the forwarding code. The hash table references next-hop group entries from the next-hop group that is currently in the primary role (i.e. not spare). During the transition from primary to spare, the table references a mix of both the primary group and the spare. When a next hop is deleted, the corresponding buckets are not set to NULL, but instead marked as empty, so that the pointer is valid and can be used by the forwarding code. The buckets are then migrated to a new next-hop group entry during upkeep. The only times that the hash table is invalid is the very beginning and very end of its lifetime. Between those points, it is always kept valid. This patch introduces the core support code itself. It does not handle notifications towards drivers, which are kept as if the group were an mpath one. It does not handle netlink either. The only bit currently exposed to user space is the new next-hop group type, and that is currently bounced. There is therefore no way to actually access this code. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 710ec5622306de8c071637ee41ddf4c9bd17e75a Author: Ido Schimmel Date: Thu Mar 11 19:03:15 2021 +0100 nexthop: Add netlink defines and enumerators for resilient NH groups - RTM_NEWNEXTHOP et.al. that handle resilient groups will have a new nested attribute, NHA_RES_GROUP, whose elements are attributes NHA_RES_GROUP_*. - RTM_NEWNEXTHOPBUCKET et.al. is a suite of new messages that will currently serve only for dumping of individual buckets of resilient next hop groups. For nexthop group buckets, these messages will carry a nested attribute NHA_RES_BUCKET, whose elements are attributes NHA_RES_BUCKET_*. There are several reasons why a new suite of messages is created for nexthop buckets instead of overloading the information on the existing RTM_{NEW,DEL,GET}NEXTHOP messages. First, a nexthop group can contain a large number of nexthop buckets (4k is not unheard of). This imposes limits on the amount of information that can be encoded for each nexthop bucket given a netlink message is limited to 64k bytes. Second, while RTM_NEWNEXTHOPBUCKET is only used for notifications at this point, in the future it can be extended to provide user space with control over nexthop buckets configuration. - The new group type is NEXTHOP_GRP_TYPE_RES. Note that nexthop code is adjusted to bounce groups with that type for now. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: David Ahern Signed-off-by: Petr Machata Signed-off-by: David S. Miller commit 90e1a9e21326887fe0aef6c25ad36464953a961e Author: Petr Machata Date: Thu Mar 11 19:03:14 2021 +0100 nexthop: Add a dedicated flag for multipath next-hop groups With the introduction of resilient nexthop groups, there will be two types of multipath groups: the current hash-threshold "mpath" ones, and resilient groups. Both are multipath, but to determine the fact, the system needs to consider two flags. This might prove costly in the datapath. Therefore, introduce a new flag, that should be set for next-hop groups that have more than one nexthop, and should be considered multipath. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 96a856256a43b88202f2ac8933092940146102ed Author: Petr Machata Date: Thu Mar 11 19:03:13 2021 +0100 nexthop: __nh_notifier_single_info_init(): Make nh_info an argument The cited function currently uses rtnl_dereference() to get nh_info from a handed-in nexthop. However, under the resilient hashing scheme, this function will not always be called under RTNL, sometimes the mutual exclusion will be achieved differently. Therefore move the nh_info extraction from the function to its callers to make it possible to use a different synchronization guarantee. Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 597f48e46b6e9142d30eaa5881c1b98338f092db Author: Petr Machata Date: Thu Mar 11 19:03:12 2021 +0100 nexthop: Pass nh_config to replace_nexthop() Currently, replace assumes that the new group that is given is a fully-formed object. But mpath groups really only have one attribute, and that is the constituent next hop configuration. This may not be universally true. From the usability perspective, it is desirable to allow the replace operation to adjust just the constituent next hop configuration and leave the group attributes as such intact. But the object that keeps track of whether an attribute was or was not given is the nh_config object, not the next hop or next-hop group. To allow (selective) attribute updates during NH group replacement, propagate `cfg' to replace_nexthop() and further to replace_nexthop_grp(). Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel Reviewed-by: David Ahern Signed-off-by: David S. Miller commit 6fe6e568639859db960c8fcef19a2ece1c2d7eae Author: Mark Zhang Date: Thu Mar 4 14:45:17 2021 +0200 RDMA/mlx5: Fix mlx5 rates to IB rates map Correct the map between mlx5 rates and corresponding ib rates, as they don't always have a fixed offset between them. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Link: https://lore.kernel.org/r/20210304124517.1100608-4-leon@kernel.org Signed-off-by: Mark Zhang Reviewed-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 7852546f524595245382a919e752468f73421451 Author: Maor Gottlieb Date: Thu Mar 4 14:45:15 2021 +0200 RDMA/mlx5: Fix query RoCE port mlx5_is_roce_enabled returns the devlink RoCE init value, therefore it should be used only when driver is loaded. Instead we just need to read the roce_en field. In addition, rename mlx5_is_roce_enabled to mlx5_is_roce_init_enabled. Fixes: 7a58779edd75 ("IB/mlx5: Improve query port for representor port") Link: https://lore.kernel.org/r/20210304124517.1100608-2-leon@kernel.org Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 1d5d0a078672d36fa958ca3495c66d399c1808b9 Merge: 6c6095214a6c3 fbbc5bc2ab8c5 Author: David S. Miller Date: Thu Mar 11 16:09:21 2021 -0800 Merge branch 'seg6-next' Julien Massonneau says: ==================== SRv6: SRH processing improvements Add support for IPv4 decapsulation in ipv6_srh_rcv() and ignore routing header with segments left equal to 0 for seg6local actions that doesn't perfom decapsulation. ==================== Signed-off-by: David S. Miller commit fbbc5bc2ab8c525f4aba4346249e3adc52d8e2c0 Author: Julien Massonneau Date: Thu Mar 11 16:53:19 2021 +0100 seg6: ignore routing header with segments left equal to 0 When there are 2 segments routing header, after an End.B6 action for example, the second SRH will never be handled by an action, packet will be dropped when the first SRH has segments left equal to 0. For actions that doesn't perform decapsulation (currently: End, End.X, End.T, End.B6, End.B6.Encaps), this patch adds the IP6_FH_F_SKIP_RH flag in arguments for ipv6_find_hdr(). Signed-off-by: Julien Massonneau Signed-off-by: David S. Miller commit ee90c6ba341f7f72858196f15912c8b6b7d032e8 Author: Julien Massonneau Date: Thu Mar 11 16:53:18 2021 +0100 seg6: add support for IPv4 decapsulation in ipv6_srh_rcv() As specified in IETF RFC 8754, section 4.3.1.2, if the upper layer header is IPv4 or IPv6, perform IPv6 decapsulation and resubmit the decapsulated packet to the IPv4 or IPv6 module. Only IPv6 decapsulation was implemented. This patch adds support for IPv4 decapsulation. Link: https://tools.ietf.org/html/rfc8754#section-4.3.1.2 Signed-off-by: Julien Massonneau Signed-off-by: David S. Miller commit 14d05b552b5dbc75d664b8afe875114735673ffc Author: Jason Gunthorpe Date: Thu Mar 4 14:07:45 2021 +0200 RDMA/mlx5: Rename mlx5_mr_cache_invalidate() to revoke_mr() Now that this is only used in a few places in mr.c give it a sensible name. It has nothing to do with the cache and can be invoked on any MR. DMA is stopped and the user cannot touch the MR any further once it completes. Link: https://lore.kernel.org/r/20210304120745.1090751-5-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e6fb246ccafbdfc86e0750af021628132fdbceac Author: Jason Gunthorpe Date: Thu Mar 4 14:07:44 2021 +0200 RDMA/mlx5: Consolidate MR destruction to mlx5_ib_dereg_mr() Now that the SRCU stuff has been removed the entire MR destroy logic can be made a lot simpler. Currently there are many different ways to destroy a MR and it makes it really hard to do this task correctly. Route all destruction through mlx5_ib_dereg_mr() and make it work for all situations. Since it turns out all the different MR types do basically the same thing this removes a lot of knowledge of MR internals from ODP and leaves ODP just exporting an operation to clean up children. This fixes a few weird corner cases bugs and firmly uses the correct ordering of the MR destruction: - Stop parallel access to the mkey via the ODP xarray - Stop DMA - Release the umem - Clean up ODP children - Free/Recycle the MR Link: https://lore.kernel.org/r/20210304120745.1090751-4-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit f18ec422311767738ef4033b61e91cae07163b22 Author: Jason Gunthorpe Date: Thu Mar 4 14:07:43 2021 +0200 RDMA/mlx5: Use a union inside mlx5_ib_mr The struct mlx5_ib_mr can be used for three different things, but only one at a time: - In the user MR cache - As a kernel MR - As a user MR Overlay the three things into a single union with the following rules: - If the mr is found on the cache_ent->head list then it is a cache MR and umem == NULL. The entire union is zero after the MR is removed from the cache. - If umem != NULL or type == IB_MR_TYPE_USER then it is a user MR. - If umem == NULL then it is a kernel MR This reduces the size of struct mlx5_ib_mr to 552 bytes from 702. The only place the three flows overlap in the code is during dereg, so add a few extra checks along there. Link: https://lore.kernel.org/r/20210304120745.1090751-3-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit a639e66703ee45745dc4057c7c2013ed9e1963a7 Author: Jason Gunthorpe Date: Thu Mar 4 14:07:42 2021 +0200 RDMA/mlx5: Zero out ODP related items in the mlx5_ib_mr All of the ODP code assumes when it calls mlx5_mr_cache_alloc() the ODP related fields are zero'd. This is true if the MR was just allocated, but if the MR is recycled through the cache then the values are never zero'd. This causes a bug in the odp_stats, they don't reset when the MR is reallocated, also is_odp_implicit is never 0'd. So we can use memset on a block of the mlx5_ib_mr reorganize the structure to put all the data that can be zero'd by the cache at the end. It is organized as an anonymous struct because the next patch will make this a union. Delete the unused smr_info. Don't set the kernel only desc_size on the user path. No longer any need to zero mr->parent before freeing it, the memset() will get it now. Fixes: a3de94e3d61e ("IB/mlx5: Introduce ODP diagnostic counters") Link: https://lore.kernel.org/r/20210304120745.1090751-2-leon@kernel.org Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 6c6095214a6c3d822d9b2561eccf8ee52e91107b Merge: c53d21af674ad e8194f3262055 Author: David S. Miller Date: Thu Mar 11 16:01:10 2021 -0800 Merge branch 'hns3-next' Huazhong Tan says: ==================== net: hns3: two updates for -next This series includes two updates for the HNS3 ethernet driver. ==================== Acked-by: Jakub Kicinski Signed-off-by: David S. Miller commit e8194f3262055bc2e6e2b7c02f9de2c3d2ef7fc9 Author: Yufeng Mo Date: Thu Mar 11 10:14:12 2021 +0800 net: hns3: use pause capability queried from firmware For maintainability and compatibility, add support to use pause capability queried from firmware, and add debugfs support to dump this capability. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 433ccce83504a44d8e07ac2c5282ed24095af602 Author: Yufeng Mo Date: Thu Mar 11 10:14:11 2021 +0800 net: hns3: use FEC capability queried from firmware For maintainability and compatibility, add support to use FEC capability queried from firmware. Signed-off-by: Yufeng Mo Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller commit 32548870d438aba3c4a13f07efb73a8b86de507d Author: Wenpeng Liang Date: Thu Mar 4 10:55:58 2021 +0800 RDMA/hns: Add support for XRC on HIP09 The HIP09 supports XRC transport service, it greatly saves the number of QPs required to connect all processes in a large cluster. Link: https://lore.kernel.org/r/1614826558-35423-1-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit 43395d9e091220695d2503fccc6f4fc9785d1bee Author: Krzysztof Wilczyński Date: Thu Mar 11 00:17:17 2021 +0000 PCI: Fix kernel-doc errors Fix kernel-doc formatting errors, function names that don't match the doc, and some missing parameter documentation. These are reported by: make W=1 drivers/pci/ No functional change intended. [bhelgaas: squashed into one patch since this only changes comments] Link: https://lore.kernel.org/r/20210311001724.423356-1-kw@linux.com Link: https://lore.kernel.org/r/20210311001724.423356-2-kw@linux.com Link: https://lore.kernel.org/r/20210311001724.423356-3-kw@linux.com Link: https://lore.kernel.org/r/20210311001724.423356-4-kw@linux.com Link: https://lore.kernel.org/r/20210311001724.423356-5-kw@linux.com Link: https://lore.kernel.org/r/20210311001724.423356-6-kw@linux.com Link: https://lore.kernel.org/r/20210311001724.423356-7-kw@linux.com Link: https://lore.kernel.org/r/20210311001724.423356-8-kw@linux.com Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas commit 9f4d9283388d9069dcf4d68ae9a212d7f0e6a985 Author: Roi Dayan Date: Tue Mar 9 18:16:52 2021 +0200 net/mlx5e: Alloc flow spec using kvzalloc instead of kzalloc flow spec is not small and we do allocate it using kvzalloc in most places of the driver. fix rest of the places to use kvzalloc to avoid failure in allocation when memory is too fragmented. Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 61e9508f1e5e5f7a32f51904cbde66f8fdcb452e Author: Eli Cohen Date: Mon Feb 8 11:07:53 2021 +0200 net/mlx5: Avoid unnecessary operation fs_get_obj retrieves the container of fs_parent_node just to pass the same value as &fs_ns->node. Just pass fs_parent_node to init_root_tree_recursive() to get exactly the same effect. Signed-off-by: Eli Cohen Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 03e219c4cf842d65c9e6f3d72f9c02d5cb3f578f Author: Saeed Mahameed Date: Mon Dec 14 14:07:19 2020 -0800 net/mlx5e: rep: Improve reg_cX conditions There is no point of calculating reg_c1 or overriding reg_c0 if we are going to abort the function. Signed-off-by: Saeed Mahameed Reviewed-by: Roi Dayan commit 3094552bcd726682ded98e4f4aa97a7c6646f638 Author: Roi Dayan Date: Wed Mar 3 10:36:02 2021 +0200 net/mlx5: SF, Fix return type Fix the following coccicheck warnings: drivers/net/ethernet/mellanox/mlx5/core/sf/dev/dev.h:50:8-9: WARNING: return of 0/1 in function 'mlx5_sf_dev_allocated' with return type bool Signed-off-by: Roi Dayan Signed-off-by: Saeed Mahameed commit 51ada5a52379e4dbf69cba70be6a348413f7a01f Author: Saeed Mahameed Date: Tue Feb 16 13:42:22 2021 -0800 net/mlx5e: mlx5_tc_ct_init does not fail mlx5_tc_ct_init() either returns a valid pointer or a NULL, either way the caller can continue, remove IS_ERR check from callers as it has no effect. Reported-by: Dan Carpenter Signed-off-by: Saeed Mahameed commit fbeab6be054c60d935578ad8c35885c29a958a04 Author: Vlad Buslov Date: Mon Mar 1 11:43:58 2021 +0200 net/mlx5: Fix indir stable stubs Some of the stubs for CONFIG_MLX5_CLS_ACT==disabled are missing "static inline" in their definition which causes the following compilation warnings: In file included from drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c:41: >> drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:34:1: warning: no previous prototype for function 'mlx5_esw_indir_table_init' [-Wmissing-prototypes] mlx5_esw_indir_table_init(void) ^ drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:33:1: note: declare 'static' if the function is not intended to be used outside of this translation unit struct mlx5_esw_indir_table * ^ static >> drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:40:1: warning: no previous prototype for function 'mlx5_esw_indir_table_destroy' [-Wmissing-prototypes] mlx5_esw_indir_table_destroy(struct mlx5_esw_indir_table *indir) ^ drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:39:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void ^ static >> drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:61:1: warning: no previous prototype for function 'mlx5_esw_indir_table_needed' [-Wmissing-prototypes] mlx5_esw_indir_table_needed(struct mlx5_eswitch *esw, ^ drivers/net/ethernet/mellanox/mlx5/core/esw/indir_table.h:60:1: note: declare 'static' if the function is not intended to be used outside of this translation unit bool ^ static 3 warnings generated. Add "static inline" prefix to signatures of stubs that were missing it. Reported-by: kernel test robot Signed-off-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 5632817b144fa9de3ae14f89c43312338cf269f1 Author: Vlad Buslov Date: Mon Mar 1 11:28:15 2021 +0200 net/mlx5e: Add missing include When CONFIG_IPV6 is disabled the header nexthop.h is not included by fib_notifier.h which causes tc_tun_encap.c to fail to compile: In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:5: In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.h:7: In file included from drivers/net/ethernet/mellanox/mlx5/core/en/tc_priv.h:7: In file included from drivers/net/ethernet/mellanox/mlx5/core/en_tc.h:40: drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:5: warning: no previous prototype for function 'mlx5e_tc_tun_update_header_ipv6' [-Wmissing-prototypes] int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, ^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int mlx5e_tc_tun_update_header_ipv6(struct mlx5e_priv *priv, ^ static >> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: error: implicit declaration of function 'fib_info_nh' [-Werror,-Wimplicit-function-declaration] fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev; ^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:12: note: did you mean 'fib_info_put'? include/net/ip_fib.h:528:20: note: 'fib_info_put' declared here static inline void fib_info_put(struct fib_info *fi) ^ >> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1510:42: error: member reference type 'int' is not a pointer fib_dev = fib_info_nh(fen_info->fi, 0)->fib_nh_dev; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ include/net/ip_fib.h:113:21: note: expanded from macro 'fib_nh_dev' #define fib_nh_dev nh_common.nhc_dev ^ >> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:13: error: incomplete definition of type 'struct fib6_entry_notifier_info' fen_info = container_of(info, struct fib6_entry_notifier_info, info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/kernel.h:694:51: note: expanded from macro 'container_of' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ include/linux/compiler_types.h:256:74: note: expanded from macro '__same_type' #define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) ^ include/linux/build_bug.h:39:58: note: expanded from macro 'BUILD_BUG_ON_MSG' #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ include/linux/compiler_types.h:320:22: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:308:23: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/compiler_types.h:300:9: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^~~~~~~~~ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info' struct fib6_entry_notifier_info *fen_info; ^ >> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:13: error: offsetof of incomplete type 'struct fib6_entry_notifier_info' fen_info = container_of(info, struct fib6_entry_notifier_info, info); ^ ~~~~~~ include/linux/kernel.h:697:21: note: expanded from macro 'container_of' ((type *)(__mptr - offsetof(type, member))); }) ^ ~~~~ include/linux/stddef.h:17:32: note: expanded from macro 'offsetof' #define offsetof(TYPE, MEMBER) __compiler_offsetof(TYPE, MEMBER) ^ ~~~~ include/linux/compiler_types.h:140:35: note: expanded from macro '__compiler_offsetof' #define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ^ ~ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info' struct fib6_entry_notifier_info *fen_info; ^ >> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1552:11: error: assigning to 'struct fib6_entry_notifier_info *' from incompatible type 'void' fen_info = container_of(info, struct fib6_entry_notifier_info, info); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1553:12: error: implicit declaration of function 'fib6_info_nh_dev' [-Werror,-Wimplicit-function-declaration] fib_dev = fib6_info_nh_dev(fen_info->rt); ^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1553:37: error: incomplete definition of type 'struct fib6_entry_notifier_info' fib_dev = fib6_info_nh_dev(fen_info->rt); ~~~~~~~~^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info' struct fib6_entry_notifier_info *fen_info; ^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1555:14: error: incomplete definition of type 'struct fib6_entry_notifier_info' fen_info->rt->fib6_dst.plen != 128) ~~~~~~~~^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info' struct fib6_entry_notifier_info *fen_info; ^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1562:39: error: incomplete definition of type 'struct fib6_entry_notifier_info' memcpy(&key.endpoint_ip.v6, &fen_info->rt->fib6_dst.addr, ~~~~~~~~^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info' struct fib6_entry_notifier_info *fen_info; ^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1563:24: error: incomplete definition of type 'struct fib6_entry_notifier_info' sizeof(fen_info->rt->fib6_dst.addr)); ~~~~~~~~^ drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c:1546:9: note: forward declaration of 'struct fib6_entry_notifier_info' struct fib6_entry_notifier_info *fen_info; ^ 1 warning and 10 errors generated. Manually include net/nexthop.h in tc_tun_encap.c. Reported-by: kernel test robot Signed-off-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 87f77a6797971579a1da497ac01b692bafbc6cca Author: Arnd Bergmann Date: Thu Feb 25 13:54:54 2021 +0100 net/mlx5e: fix mlx5e_tc_tun_update_header_ipv6 dummy definition The alternative implementation of this function in a header file is declared as a global symbol, and gets added to every .c file that includes it, which leads to a link error: arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlx5/core/en_rx.o: in function `mlx5e_tc_tun_update_header_ipv6': en_rx.c:(.text+0x0): multiple definition of `mlx5e_tc_tun_update_header_ipv6'; drivers/net/ethernet/mellanox/mlx5/core/en_main.o:en_main.c:(.text+0x0): first defined here Mark it 'static inline' like the other functions here. Signed-off-by: Arnd Bergmann Reviewed-by: Vlad Buslov Signed-off-by: Saeed Mahameed commit 76e68d950a170fb5cf70165bb442ba9636a19232 Author: Roi Dayan Date: Thu Nov 19 14:20:44 2020 +0200 net/mlx5e: CT, Avoid false lock dependency warning To avoid false lock dependency warning set the ct_entries_ht lock class different than the lock class of the ht being used when deleting last flow from a group and then deleting a group, we get into del_sw_flow_group() which call rhashtable_destroy on fg->ftes_hash which will take ht->mutex but it's different than the ht->mutex here. ====================================================== WARNING: possible circular locking dependency detected 5.10.0-rc2+ #8 Tainted: G O ------------------------------------------------------ revalidator23/24009 is trying to acquire lock: ffff888128d83828 (&node->lock){++++}-{3:3}, at: mlx5_del_flow_rules+0x83/0x7a0 [mlx5_core] but task is already holding lock: ffff8881081ef518 (&ht->mutex){+.+.}-{3:3}, at: rhashtable_free_and_destroy+0x37/0x720 which lock already depends on the new lock. Signed-off-by: Roi Dayan Reviewed-by: Paul Blakey Signed-off-by: Saeed Mahameed commit fe06992b04a90767cee921b22fb2cb09c93447a8 Author: Leon Romanovsky Date: Tue Nov 3 18:46:31 2020 +0200 net/mlx5: Check returned value from health recover sequence MLX5_INTERFACE_STATE_UP is far from being reliable check for success to recover, because it can be changed any time and health logic doesn't have any locks to protect from it. The locks are not needed here because health recover is good to have, but not must to success, so rely on the returned value from the mlx5_recover_device() as a marker for success/failure. Reviewed-by: Moshe Shemesh Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 7ad67a20f28fd20e63aeb1e095a9bd86bc5b1495 Author: Leon Romanovsky Date: Tue Nov 3 15:17:10 2020 +0200 net/mlx5: Don't rely on interface state bit The check of MLX5_INTERFACE_STATE_UP is completely useless, because the FW tracer cleanup is called on every change of the interface and it ensures that notifier is disabled together with canceling all the pending works. Reviewed-by: Moshe Shemesh Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 7e615b9978021a034124166d4fa3dc4fc0ea4b16 Author: Leon Romanovsky Date: Tue Nov 3 14:42:45 2020 +0200 net/mlx5: Remove second FW tracer check The FW tracer check is called twice, so delete one of them. Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 6dea2f7eff9659049f90922283756830364e6278 Author: Leon Romanovsky Date: Mon Nov 2 16:54:43 2020 +0200 net/mlx5: Separate probe vs. reload flows The mix between probe/unprobe and reload flows causes to have an extra mutex lock intf_state_mutex that generates LOCKDEP warning between it and devlink_mutex. As a preparation for the future removal, separate those flows. Reviewed-by: Moshe Shemesh Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit d89edb36070572e1b8889009fc3c143e7c290e16 Author: Leon Romanovsky Date: Mon Nov 2 16:02:14 2020 +0200 net/mlx5: Remove impossible checks of interface state The interface state is constant at this stage and checked before calling to the register/unregister reserved GIDs. There is no need to double check it. Reviewed-by: Moshe Shemesh Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit 7bef147a6ab6e686f4e3c6eadbda56d4ad9833ba Author: Saeed Mahameed Date: Thu Dec 3 11:55:16 2020 +0200 net/mlx5: Don't skip vport check Users of mlx5_eswitch_get_vport() are required to check return value prior to passing mlx5_vport further. Fix all the places to do not skip that check. Reviewed-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Saeed Mahameed commit c53d21af674adf9c4ba7b65d29fa4a37a9f19e8f Author: Jiapeng Chong Date: Thu Mar 11 15:11:01 2021 +0800 netdevsim: fib: Remove redundant code Fix the following coccicheck warnings: ./drivers/net/netdevsim/fib.c:874:5-8: Unneeded variable: "err". Return "0" on line 889. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller commit 6e5a1fff9096ecd259dedcbbdc812aa90986a40e Author: Arnd Bergmann Date: Mon Mar 8 16:24:48 2021 +0100 PCI: Avoid building empty drivers There are harmless warnings when compile testing the kernel with CONFIG_TRIM_UNUSED_KSYMS: drivers/pci/controller/dwc/pcie-al.o: no symbols drivers/pci/controller/pci-thunder-ecam.o: no symbols drivers/pci/controller/pci-thunder-pem.o: no symbols The problem here is that the host drivers get built even when the configuration symbols are all disabled, as they pretend to not be drivers but are silently enabled because of the promise that ACPI-based systems need no drivers. Add back the normal symbols to have these drivers built, and change the logic to otherwise only build them when both CONFIG_PCI_QUIRKS and CONFIG_ACPI are enabled. As a side-effect, this enables compile-testing the drivers on other architectures, which in turn needs the acpi_get_rc_resources() function to be defined. Link: https://lore.kernel.org/r/20210308152501.2135937-3-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Reviewed-by: Robert Richter commit 16f7ae5906dfbeff54f74ec75d0563bb3a87ab0b Author: Arnd Bergmann Date: Mon Mar 8 16:24:47 2021 +0100 PCI: thunder: Fix compile testing Compile-testing these drivers is currently broken. Enabling it causes a couple of build failures though: drivers/pci/controller/pci-thunder-ecam.c:119:30: error: shift count >= width of type [-Werror,-Wshift-count-overflow] drivers/pci/controller/pci-thunder-pem.c:54:2: error: implicit declaration of function 'writeq' [-Werror,-Wimplicit-function-declaration] drivers/pci/controller/pci-thunder-pem.c:392:8: error: implicit declaration of function 'acpi_get_rc_resources' [-Werror,-Wimplicit-function-declaration] Fix them with the obvious one-line changes. Link: https://lore.kernel.org/r/20210308152501.2135937-2-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Robert Richter commit 59521c3c4b902b3749103cc7b8e64579317173e9 Author: Arnd Bergmann Date: Mon Mar 8 16:24:46 2021 +0100 PCI: al: Select CONFIG_PCI_ECAM Compile-testing this driver without ECAM support results in a link failure: ld.lld: error: undefined symbol: pci_ecam_map_bus >>> referenced by pcie-al.c >>> pci/controller/dwc/pcie-al.o:(al_pcie_map_bus) in archive drivers/built-in.a Select CONFIG_ECAM like the other drivers do. Link: https://lore.kernel.org/r/20210308152501.2135937-1-arnd@kernel.org Signed-off-by: Arnd Bergmann Signed-off-by: Bjorn Helgaas Reviewed-by: Krzysztof Wilczyński commit b0bade515d360800fc701e1a965cf41adcc4ec1b Author: Florian Fainelli Date: Wed Mar 10 14:12:43 2021 -0800 net: phy: Expose phydev::dev_flags through sysfs phydev::dev_flags contains a bitmask of configuration bits requested by the consumer of a PHY device (Ethernet MAC or switch) towards the PHY driver. Since these flags are often used for requesting LED or other type of configuration being able to quickly audit them without instrumenting the kernel is useful. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller commit b923561fabc33664b25470b101857712339e1021 Author: Linus Walleij Date: Mon Feb 15 16:34:47 2021 +0100 iio: adc: mt6360: Include right header To get access to the big endian byte order parsing helpers drivers need to include and nothing else. Cc: Gene Chen Suggested-by: Harvey Harrison Signed-off-by: Linus Walleij Link: https://lore.kernel.org/r/20210215153447.48457-1-linus.walleij@linaro.org Signed-off-by: Jonathan Cameron commit 15aacc980dcb326ef33dfc32772faea1067f9178 Author: Nuno Sa Date: Thu Feb 18 12:40:39 2021 +0100 iio: adis: add helpers for locking Add some helpers to lock and unlock the device. As this is such a simple change, we update all the users that were using the lock already in this patch. Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210218114039.216091-5-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 3b15e6a532b30691e7c464e7d74c2d699c23d439 Author: Nuno Sá Date: Thu Feb 18 12:40:38 2021 +0100 dt-bindings: adis16475: remove property `adi,scaled-output-hz` is no longer used by the driver. Acked-by: Rob Herring Signed-off-by: Nuno Sá Link: https://lore.kernel.org/r/20210218114039.216091-4-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 39c024b51b5607e9d2fc6c04c2573e4a778c728d Author: Nuno Sa Date: Thu Feb 18 12:40:37 2021 +0100 iio: adis16475: improve sync scale mode handling With this patch, we don't force users to define the IMU scaled internal sampling rate once in the devicetree. Now it's dynamically calculated at runtime depending on the desired output rate given by users. Calculating the sync_scale dynamically gives us better chances of achieving a perfect/integer value for DEC_RATE (thus giving more flexibility). The math is: 1. lcm of the input clock and the desired output rate. 2. get the highest multiple of the previous result lower than the adis max rate. 3. The last result becomes the IMU sample rate. Use that to calculate SYNC_SCALE and DEC_RATE (to get the user output rate). Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210218114039.216091-3-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit 0463e60f087069adf25a815cd88753946aca2565 Author: Nuno Sa Date: Thu Feb 18 12:40:36 2021 +0100 iio: adis16480: fix pps mode sampling frequency math When using PPS mode, the input clock needs to be scaled so that we have an IMU sample rate between (optimally) 4000 and 4250. After this, we can use the decimation filter to lower the sampling rate in order to get what the user wants. Optimally, the user sample rate is a multiple of both the IMU sample rate and the input clock. Hence, calculating the sync_scale dynamically gives us better chances of achieving a perfect/integer value for DEC_RATE. The math here is: 1. lcm of the input clock and the desired output rate. 2. get the highest multiple of the previous result lower than the adis max rate. 3. The last result becomes the IMU sample rate. Use that to calculate SYNC_SCALE and DEC_RATE (to get the user output rate). Fixes: 326e2357553d3 ("iio: imu: adis16480: Add support for external clock") Signed-off-by: Nuno Sa Link: https://lore.kernel.org/r/20210218114039.216091-2-nuno.sa@analog.com Signed-off-by: Jonathan Cameron commit aa29cf932fb345e111cd7fef04320846fa73e372 Author: Alexandru Ardelean Date: Fri Feb 19 11:01:34 2021 +0200 iio: adc: adi-axi-adc: fix typo in doc-string The channels are of type iio_chan_spec, not axi_adc_chan_spec. They were in some earlier version, but forgot to rename in the doc-string. Fixes: ef04070692a21 ("iio: adc: adi-axi-adc: add support for AXI ADC IP core") Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210219090134.48057-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 63cd35f34d2e75dde3dd3ab51ae09b5daad755e7 Author: Alexandru Ardelean Date: Wed Feb 17 10:34:34 2021 +0200 iio: Documentation: update definitions for bufferY and scan_elements Since the new change to the IIO buffer infrastructure, the buffer/ and scan_elements/ directories have been merged into bufferY/ to have some attributes available per-buffer. This change updates the ABI docs to reflect this change. The hwfifo attributes are not updated, as for now these should be used via the legacy buffer/ directory until they are moved into core. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210217083438.37865-2-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 477bd010c20efc377c55e6077b0526201a7a33b3 Author: Mircea Caprioru Date: Wed Feb 17 09:41:02 2021 +0200 iio: dac: ad5686: Add support for AD5673R/AD5677R The AD5673R/AD5677R are low power, 16-channel, 12-/16-bit buffered voltage output digital-to-analog converters (DACs). They include a 2.5 V internal reference (enabled by default). These devices are very similar to AD5674R/AD5679R, except that they have an i2c interface. Signed-off-by: Mircea Caprioru Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210217074102.23148-1-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 9a6df4b1ab0e467f23ccdcbb82700cfb3eaf44a3 Author: Hans de Goede Date: Mon Feb 15 20:10:03 2021 +0100 iio: documentation: Document accelerometer label use Some 2-in-1 laptops / convertibles with 360° (yoga-style) hinges, have 2 accelerometers, 1 in their base and 1 in their display. In many cases the kernel can detect the location of each accelerometer based on e.g. information from the ACPI tables. It is important for userspace to know the location of the 2 accelerometers. Rather then adding a new sysfs-attribute for this we can relay this information to userspace by using standardized label strings for this. This mirrors how this is done for proximity sensors. This commit documents 2 new standardized label strings for this purpose: "accel-base" "accel-display" Note the "base" and "display" suffixes were chosen to match the values used for the systemd/udev hwdb.d/60-sensor.hwdb file's ACCEL_LOCATION property. Cc: Dmitry Torokhov Cc: Mark Pearson Cc: Bastien Nocera Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210215191003.698888-2-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 6505dfab33c519368e54ae7f3ea1bf4d9916fdc5 Author: Hans de Goede Date: Mon Feb 15 20:10:02 2021 +0100 iio: documentation: Document proximity sensor label use Add an entry to Documentation/ABI/testing/sysfs-bus-iio for the new device label sysfs-attribute support. And document the standardized labels which may be used with proximity sensors to hint userspace about the intended use of the sensor. Using labels to differentiate between the multiple proximity sensors which a modern laptop/tablet may have was discussed in this thread: https://lore.kernel.org/linux-iio/9f9b0ff6-3bf1-63c4-eb36-901cecd7c4d9@redhat.com/ As mentioned there the "proximity-wifi*" labels are already being used in this manner on some chromebooks, see e.g.: arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi arch/arm64/boot/dts/qcom/sc7180-trogdor-lte-sku.dtsi And the "proximity-palmrest" and "proximity-lap" labels are intended to be used with the lap and palmrest sensors found in recent Lenovo ThinkPad models. Cc: Dmitry Torokhov Cc: Mark Pearson Cc: Bastien Nocera Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210215191003.698888-1-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 3a826f7c64080ec2789abc229d8012430fa092b7 Author: Ye Xiang Date: Sun Feb 7 15:00:48 2021 +0800 iio: Add relative hysteresis in ABI documentation Add relative hysteresis in ABI documentation for als sensor. Signed-off-by: Ye Xiang Link: https://lore.kernel.org/r/20210207070048.23935-4-xiang.ye@intel.com Signed-off-by: Jonathan Cameron commit 84dbc231a6f56c810fdd1908c723c0c23c9e169b Author: Ye Xiang Date: Sun Feb 7 15:00:47 2021 +0800 iio: hid-sensor-als: Add relative hysteresis support Hid sensor als use relative hysteresis, this patch adds the support. Signed-off-by: Ye Xiang Link: https://lore.kernel.org/r/20210207070048.23935-3-xiang.ye@intel.com Signed-off-by: Jonathan Cameron commit 1c71a2863a0c56123e5a67880cf658083c0a0b1e Author: Ye Xiang Date: Sun Feb 7 15:00:46 2021 +0800 iio: Add relative sensitivity support Some hid sensors may use relative sensitivity such as als sensor. This patch adds relative sensitivity checking for all hid sensors. Signed-off-by: Ye Xiang Acked-by: Jiri Kosina Link: https://lore.kernel.org/r/20210207070048.23935-2-xiang.ye@intel.com Signed-off-by: Jonathan Cameron commit 4efd13c3c2bc9a5fc37fa34b7d4d2ec1bdf0d127 Author: Ye Xiang Date: Mon Feb 1 13:49:21 2021 +0800 hid-sensors: Add more data fields for sensitivity checking Before, when reading/writing the hysteresis of als, incli-3d, press, and rotation sensor, we will get invalid argument error. This patch add more sensitivity data fields for these sensors, so that these sensors can get sensitivity index and return correct hysteresis value. Signed-off-by: Ye Xiang Link: https://lore.kernel.org/r/20210201054921.18214-3-xiang.ye@intel.com Signed-off-by: Jonathan Cameron commit 0e41fd515f94dcfcc24b6e510d29528431e46f60 Author: Ye Xiang Date: Mon Feb 1 13:49:20 2021 +0800 iio: hid-sensors: Move get sensitivity attribute to hid-sensor-common No functional change has been made with this patch. The main intent here is to reduce code repetition of getting sensitivity attribute. In the current implementation, sensor_hub_input_get_attribute_info() is called from multiple drivers to get attribute info for sensitivity field. Moving this to common place will avoid code repetition. Signed-off-by: Ye Xiang Acked-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210201054921.18214-2-xiang.ye@intel.com Signed-off-by: Jonathan Cameron commit 6bc5ebe8aa08637355cd891e596b5bce63497cb5 Author: Luca Ceresoli Date: Mon Feb 15 15:35:11 2021 +0100 docs: iio: mark "repeat" sysfs attribute as optional Show that this field is optional, just like the shift value. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20210215143511.25471-6-luca@lucaceresoli.net Signed-off-by: Jonathan Cameron commit 218977dcdb2aac1ec0492b51e8473ca6d3387c50 Author: Luca Ceresoli Date: Mon Feb 15 15:35:10 2021 +0100 docs: iio: fix bullet list formatting This 2nd-level bullet list is not properly ReST-formatted and thus it gets rendered as a unique paragraph quite unreadable. Fix by adding spaces as needed. While there also swap "shift" and "repeat" so they are in the correct order. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20210215143511.25471-5-luca@lucaceresoli.net Signed-off-by: Jonathan Cameron commit bd9a013d2988321ef1122e41874f9cbd141e480a Author: Luca Ceresoli Date: Mon Feb 15 15:35:09 2021 +0100 docs: iio: document the 'index' attribute too Two out of three attributes are documented, document the third one too. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20210215143511.25471-4-luca@lucaceresoli.net Signed-off-by: Jonathan Cameron commit f2163c1e365bef19bb371933272f2327d286fbbb Author: Luca Ceresoli Date: Mon Feb 15 15:35:08 2021 +0100 docs: iio: fix directory naming This directory is a, well, directory, not a file. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20210215143511.25471-3-luca@lucaceresoli.net Signed-off-by: Jonathan Cameron commit c1d82dbcb0a6b660bc44f7e9c1ba606b671f1b71 Author: Luca Ceresoli Date: Mon Feb 15 15:35:07 2021 +0100 docs: iio: fix example formatting This line is part of the code snippet, so it has to be nested in order to be rendered correctly. Signed-off-by: Luca Ceresoli Link: https://lore.kernel.org/r/20210215143511.25471-2-luca@lucaceresoli.net Signed-off-by: Jonathan Cameron commit b624fd14a9275bd546b63cf103cee6c9f57a4f55 Author: Julia Lawall Date: Tue Feb 9 22:13:15 2021 +0100 iio: use getter/setter functions Use getter and setter functions, for a variety of data types. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20210209211315.1261791-1-Julia.Lawall@inria.fr Signed-off-by: Jonathan Cameron commit 8827faab2c8b52e848071a039a945db6f3ae8365 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:43 2021 +0200 tools: iio: convert iio_generic_buffer to use new IIO buffer API This change makes use of the new IIO buffer API to read data from an IIO buffer. It doesn't read the /sys/bus/iio/devices/iio:deviceX/scan_elements dir anymore, it reads /sys/bus/iio/devices/iio:deviceX/bufferY, where all the scan_elements have been merged together with the old/classical buffer attributes. And it makes use of the new IIO_BUFFER_GET_FD_IOCTL ioctl to get an FD for the IIO buffer for which to read data from. It also does a quick sanity check to see that -EBUSY is returned if reading the chardev after the ioctl() has succeeded. This was tested with the following cases: 1. Tested buffer0 works with ioctl() 2. Tested that buffer0 can't be opened via /dev/iio:deviceX after ioctl() This check should be omitted under normal operation; it's being done here to check that the driver change is sane 3. Moved valid buffer0 to be buffer1, and tested that data comes from it Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-25-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit ebe5112535b5cf389ca7d337cf6a0c1d885f9880 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:42 2021 +0200 tools: iio: privatize globals and functions in iio_generic_buffer.c file Mostly a tidy-up. But also helps to understand the limits of scope of these functions and globals. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-24-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit a605c8f4e71c35fddb9b13785f4ea5c24e273aa2 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:41 2021 +0200 tools: iio: make iioutils_get_type() private in iio_utils This is a bit of a tidy-up, but also helps with extending the iioutils_get_type() function a bit, as we don't need to use it outside of the iio_utils.c file. So, we'll need to update it only in one place. With this change, the 'unsigned' types are updated to 'unsigned int' in the iioutils_get_type() function definition. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-23-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 0d596bb2ad0dbefc7c3e6072acb64b379888ee3d Author: Alexandru Ardelean Date: Mon Feb 15 12:40:40 2021 +0200 iio: core: rename 'dev' -> 'indio_dev' in iio_device_alloc() The 'dev' variable name usually refers to 'struct device' types. However in iio_device_alloc() this was used for the 'struct iio_dev' type, which was sometimes causing minor confusions. This change renames the variable to 'indio_dev', which is the usual name used around IIO for 'struct iio_dev' type objects. It makes grepping a bit easier as well. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-22-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit f73f7f4da581875f9b1f2fb8ebd1ab15ed634488 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:39 2021 +0200 iio: buffer: add ioctl() to support opening extra buffers for IIO device With this change, an ioctl() call is added to open a character device for a buffer. The ioctl() number is 'i' 0x91, which follows the IIO_GET_EVENT_FD_IOCTL ioctl. The ioctl() will return an FD for the requested buffer index. The indexes are the same from the /sys/iio/devices/iio:deviceX/bufferY (i.e. the Y variable). Since there doesn't seem to be a sane way to return the FD for buffer0 to be the same FD for the /dev/iio:deviceX, this ioctl() will return another FD for buffer0 (or the first buffer). This duplicate FD will be able to access the same buffer object (for buffer0) as accessing directly the /dev/iio:deviceX chardev. Also, there is no IIO_BUFFER_GET_BUFFER_COUNT ioctl() implemented, as the index for each buffer (and the count) can be deduced from the '/sys/bus/iio/devices/iio:deviceX/bufferY' folders (i.e the number of bufferY folders). Used following C code to test this: ------------------------------------------------------------------- #include #include #include #include #include #define IIO_BUFFER_GET_FD_IOCTL _IOWR('i', 0x91, int) int main(int argc, char *argv[]) { int fd; int fd1; int ret; if ((fd = open("/dev/iio:device0", O_RDWR))<0) { fprintf(stderr, "Error open() %d errno %d\n",fd, errno); return -1; } fprintf(stderr, "Using FD %d\n", fd); fd1 = atoi(argv[1]); ret = ioctl(fd, IIO_BUFFER_GET_FD_IOCTL, &fd1); if (ret < 0) { fprintf(stderr, "Error for buffer %d ioctl() %d errno %d\n", fd1, ret, errno); close(fd); return -1; } fprintf(stderr, "Got FD %d\n", fd1); close(fd1); close(fd); return 0; } ------------------------------------------------------------------- Results are: ------------------------------------------------------------------- # ./test 0 Using FD 3 Got FD 4 # ./test 1 Using FD 3 Got FD 4 # ./test 2 Using FD 3 Got FD 4 # ./test 3 Using FD 3 Got FD 4 # ls /sys/bus/iio/devices/iio\:device0 buffer buffer0 buffer1 buffer2 buffer3 dev in_voltage_sampling_frequency in_voltage_scale in_voltage_scale_available name of_node power scan_elements subsystem uevent ------------------------------------------------------------------- iio:device0 has some fake kfifo buffers attached to an IIO device. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-21-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit ee708e6baacd3afdace9b721c25fbbe106cebb94 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:38 2021 +0200 iio: buffer: introduce support for attaching more IIO buffers With this change, calling iio_device_attach_buffer() will actually attach more buffers. Right now this doesn't do any validation of whether a buffer is attached twice; maybe that can be added later (if needed). Attaching a buffer more than once should yield noticeably bad results. The first buffer is the legacy buffer, so a reference is kept to it. At this point, accessing the data for the extra buffers (that are added after the first one) isn't possible yet. The iio_device_attach_buffer() is also changed to return an error code, which for now is -ENOMEM if the array could not be realloc-ed for more buffers. To adapt to this new change iio_device_attach_buffer() is called last in all place where it's called. The realloc failure is a bit difficult to handle during un-managed calls when unwinding, so it's better to have this as the last error in the setup_buffer calls. At this point, no driver should call iio_device_attach_buffer() directly, it should call one of the {devm_}iio_triggered_buffer_setup() or devm_iio_kfifo_buffer_setup() or devm_iio_dmaengine_buffer_setup() functions. This makes iio_device_attach_buffer() a bit easier to handle. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-20-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 738f6ba1180046904402ffbe210fbd2fa2c4b050 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:37 2021 +0200 iio: dummy: iio_simple_dummy_buffer: use triggered buffer core calls The iio_simple_dummy_configure_buffer() function is essentially a re-implementation of the iio_triggered_buffer_setup() function. This change makes use of the iio_triggered_buffer_setup() function. The reason is so that we don't have to modify the iio_device_attach_buffer() function in this driver as well. One minor drawback is that the pollfunc name may not be 100% identical with the one in the original code, but since it's an example, it should be a big problem. This change does a minor re-arranging of the included iio headers, as a minor tidy-up. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-19-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 0224af85a77be1ebdf5256f0d6738b0f7250f41d Author: Alexandru Ardelean Date: Mon Feb 15 12:40:36 2021 +0200 iio: buffer: move __iio_buffer_free_sysfs_and_mask() before alloc The __iio_buffer_free_sysfs_and_mask() function will be used in iio_buffer_alloc_sysfs_and_mask() when multiple buffers will be attached to the IIO device. This will need to be used to cleanup resources on each buffer, when the buffers cleanup unwind will occur on the error path. The move is done in this patch to make the patch that adds multiple buffers per IIO device a bit cleaner. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-18-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit be24dcb113675f72c2b95c96a55d8aae4964cdc6 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:35 2021 +0200 iio: core: wrap iio device & buffer into struct for character devices In order to keep backwards compatibility with the current chardev mechanism, and in order to add support for multiple buffers per IIO device, we need to pass both the IIO device & IIO buffer to the chardev. This is particularly needed for the iio_buffer_read_outer() function, where we need to pass another buffer object than 'indio_dev->buffer'. Since we'll also open some chardevs via anon inodes, we can pass extra buffers in that function by assigning another object to the iio_dev_buffer_pair object. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-17-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 4991f3ea2aec5dd8c5abdb40a360258dd71eddf4 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:34 2021 +0200 iio: buffer: dmaengine: obtain buffer object from attribute The reference to the IIO buffer object is stored on the attribute object. So we need to unwind it to obtain it. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-16-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 15097c7a1adc0554ce8eb6f5fd6758d063bfea44 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:33 2021 +0200 iio: buffer: wrap all buffer attributes into iio_dev_attr This change wraps all buffer attributes into iio_dev_attr objects, and assigns a reference to the IIO buffer they belong to. With the addition of multiple IIO buffers per one IIO device, we need a way to know which IIO buffer is being enabled/disabled/controlled. We know that all buffer attributes are device_attributes. So we can wrap them with a iio_dev_attr types. In the iio_dev_attr type, we can also hold a reference to an IIO buffer. So, we end up being able to allocate wrapped attributes for all buffer attributes (even the one from other drivers). The neat part with this mechanism, is that we don't need to add any extra cleanup, because these attributes are being added to a dynamic list that will get cleaned up via iio_free_chan_devattr_list(). With this change, the 'buffer->scan_el_dev_attr_list' list is being renamed to 'buffer->buffer_attr_list', effectively merging (or finalizing the merge) of the buffer/ & scan_elements/ attributes internally. Accessing these new buffer attributes can now be done via 'to_iio_dev_attr(attr)->buffer' inside the show/store handlers. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-15-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 3e3d11b2e43b9a967d98261250c19636b893b7ed Author: Alexandru Ardelean Date: Mon Feb 15 12:40:32 2021 +0200 iio: add reference to iio buffer on iio_dev_attr This change adds a reference to a 'struct iio_buffer' object on the iio_dev_attr object. This way, we can use the created iio_dev_attr objects on per-buffer basis (since they're allocated anyway). A minor downside of this change is that the number of parameters on __iio_add_chan_devattr() grows by 1. This looks like it could do with a bit of a re-think. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-14-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit d9a625744ed0e452f5c495cd8c51eed4b6623a4c Author: Alexandru Ardelean Date: Mon Feb 15 12:40:31 2021 +0200 iio: core: merge buffer/ & scan_elements/ attributes With this change, we create a new directory for the IIO device called buffer0, under which both the old buffer/ and scan_elements/ are stored. This is done to simplify the addition of multiple IIO buffers per IIO device. Otherwise we would need to add a bufferX/ and scan_elementsX/ directory for each IIO buffer. With the current way of storing attribute groups, we can't have directories stored under each other (i.e. scan_elements/ under buffer/), so the best approach moving forward is to merge their attributes. The old/legacy buffer/ & scan_elements/ groups are not stored on the opaque IIO device object. This way the IIO buffer can have just a single attribute_group object, saving a bit of memory when adding multiple IIO buffers. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-13-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit e2b4d7aca9db5c1f0789e5a8e0fd1f4953d0be9e Author: Alexandru Ardelean Date: Mon Feb 15 12:40:30 2021 +0200 iio: buffer: group attr count and attr alloc If we want to merge the attributes of the buffer/ and scan_elements/ directories, we'll need to count all attributes first, then (depending on the attribute group) either allocate 2 attribute groups, or a single one. Historically an IIO buffer was described by 2 subdirectories under /sys/bus/iio/iio:devicesX (i.e. buffer/ and scan_elements/); these subdirs were actually 2 separate attribute groups on the iio_buffer object. Moving forward, if we want to allow more than one buffer per IIO device, keeping 2 subdirectories for each IIO buffer is a bit cumbersome (especially for userpace ABI). So, we will merge the attributes of these 2 subdirs under a /sys/bus/iio/iio:devicesX/bufferY subdirectory. To do this, we need to count all attributes first, and then distribute them based on which buffer this is. For the first buffer, we'll need to also allocate the legacy 2 attribute groups (for buffer/ and scan_elements/), and also a /sys/bus/iio/iio:devicesX/buffer0 attribute group. For buffer1 and above, just a single attribute group will be allocated (the merged one). Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-12-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 32f171724e5cbecc80594fb6eced057cfdd6eb6f Author: Alexandru Ardelean Date: Mon Feb 15 12:40:29 2021 +0200 iio: core: rework iio device group creation Up until now, the device groups that an IIO device had were limited to 6. Two of these groups would account for buffer attributes (the buffer/ and scan_elements/ directories). Since we want to add multiple buffers per IIO device, this number may not be enough, when adding a second buffer. So, this change reallocates the groups array whenever an IIO device group is added, via a iio_device_register_sysfs_group() helper. This also means that the groups array should be assigned to 'indio_dev.dev.groups' really late, right before {cdev_}device_add() is called to do the entire setup. And we also must take care to free this array when the sysfs resources are being cleaned up. With this change we can also move the 'groups' & 'groupcounter' fields to the iio_dev_opaque object. Up until now, this didn't make a whole lot of sense (especially since we weren't sure how multibuffer support would look like in the end). But doing it now kills one birds with one stone. An alternative, would be to add a configurable Kconfig symbol CONFIG_IIO_MAX_BUFFERS_PER_DEVICE (or something like that) and compute a static maximum of the groups we can support per IIO device. But that would probably annoy a few people since that would make the system less configurable. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-11-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit e64506bf69b680975c47dcbca2a33fc672b368b5 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:28 2021 +0200 iio: core-trigger: make iio_device_register_trigger_consumer() an int return Oddly enough the noop function is an int-return. This one seems to be void. This change converts it to int, because we want to change how groups are registered. With that change this function could error out with -ENOMEM. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-10-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 8ebaa3ff1e71d428912423f7f4f8001bfb368cc5 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:27 2021 +0200 iio: core: register chardev only if needed We only need a chardev if we need to support buffers and/or events. With this change, a chardev will be created only if an IIO buffer is attached OR an event_interface is configured. Otherwise, no chardev will be created, and the IIO device will get registered with the 'device_add()' call. Quite a lot of IIO devices don't really need a chardev, so this is a minor improvement to the IIO core, as the IIO device will take up (slightly) fewer resources. In order to not create a chardev, we mostly just need to not initialize the indio_dev->dev.devt field. If that is un-initialized, cdev_device_add() behaves like device_add(). This change has a small chance of breaking some userspace ABI, because it removes un-needed chardevs. While these chardevs (that are being removed) have always been unusable, it is likely that some scripts may check their existence (for whatever logic). And we also hope that before opening these chardevs, userspace would have already checked for some pre-conditions to make sure that opening these chardevs makes sense. For the most part, there is also the hope that it would be easier to change userspace code than revert this. But in the case that reverting this is required, it should be easy enough to do it. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-9-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit c127161865bc21a3fc6adad07b38ce8276ba2f8e Author: Alexandru Ardelean Date: Mon Feb 15 12:40:26 2021 +0200 docs: ioctl-number.rst: reserve IIO subsystem ioctl() space Currently, only the 'i' 0x90 ioctl() actually exists and is defined in 'include/uapi/linux/iio/events.h'. It's the IIO_GET_EVENT_FD_IOCTL, which is used to retrieve and FD for reading events from an IIO device. We will want to add more ioct() numbers, so with this change the 'i' 0x90-0x9F space is reserved for IIO ioctl() calls. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-8-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit a02c09e42b3ed6cefae671e302835f1f04bf474e Author: Alexandru Ardelean Date: Mon Feb 15 12:40:25 2021 +0200 iio: buffer-dma,adi-axi-adc: introduce devm_iio_dmaengine_buffer_setup() This change does a conversion of the devm_iio_dmaengine_buffer_alloc() to devm_iio_dmaengine_buffer_setup(). This will allocate an IIO DMA buffer and attach it to the IIO device, similar to devm_iio_triggered_buffer_setup() (though the underlying code is different, the final logic is the same). Since the only user of the devm_iio_dmaengine_buffer_alloc() was the adi-axi-adc driver, this change does the replacement in a single go in the driver. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-7-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 99f6e8215b627730e2e6d371430a1f81e8ed6c27 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:24 2021 +0200 iio: kfifo: un-export devm_iio_kfifo_allocate() function At this point all drivers should use devm_iio_kfifo_buffer_setup() instead of manually allocating via devm_iio_kfifo_allocate() and assigning ops and modes. With this change, the devm_iio_kfifo_allocate() will be made private to the IIO core, since all drivers should call either devm_iio_kfifo_buffer_setup() or devm_iio_triggered_buffer_setup() to create a kfifo buffer. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-6-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit e03ed893e2cf7305183b3314ae80daa1e97667b2 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:23 2021 +0200 iio: accel: sca3000: use devm_iio_kfifo_buffer_setup() helper This change makes use of the devm_iio_kfifo_buffer_setup() helper, however the unwind order is changed. The life-time of the kfifo object is attached to the parent device object. This is to make the driver a bit more consistent with the other IIO drivers, even though (as it is now before this change) it shouldn't be a problem. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-5-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 17395ce299211a8148ee45d1d71eb740a3fec48d Author: Alexandru Ardelean Date: Mon Feb 15 12:40:22 2021 +0200 iio: make use of devm_iio_kfifo_buffer_setup() helper All drivers that already call devm_iio_kfifo_allocate() & iio_device_attach_buffer() are simple to convert to iio_device_attach_kfifo_buffer() in a single go. This change does that; the unwind order is preserved. What is important, is that the devm_iio_kfifo_buffer_setup() be called after the indio_dev->modes is assigned, to make sure that INDIO_BUFFER_SOFTWARE flag is set and not overridden by the assignment to indio_dev->modes. Also, the INDIO_BUFFER_SOFTWARE has been removed from the assignments of 'indio_dev->modes' because it is set by devm_iio_kfifo_buffer_setup(). Signed-off-by: Alexandru Ardelean Reviewed-by: Gwendal Grignou Reviewed-by: Matt Ranostay x Link: https://lore.kernel.org/r/20210215104043.91251-4-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit e36db6a06937c6fce3291f0c362d4f757b8ec703 Author: Alexandru Ardelean Date: Mon Feb 15 12:40:21 2021 +0200 iio: kfifo: add devm_iio_kfifo_buffer_setup() helper This change adds the devm_iio_kfifo_buffer_setup() helper/short-hand, which groups the simple routine of allocating a kfifo buffers via devm_iio_kfifo_allocate() and calling iio_device_attach_buffer(). The mode_flags parameter is required, as the IIO kfifo supports 2 modes: INDIO_BUFFER_SOFTWARE & INDIO_BUFFER_TRIGGERED. The setup_ops parameter is optional. This function will be a bit more useful when needing to define multiple buffers per IIO device. The naming for this function has been inspired from iio_triggered_buffer_setup() since that one does a kfifo alloc + a pollfunc alloc. So, this should have a more familiar ring to what it is. Signed-off-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210215104043.91251-3-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron commit 0bf49ffbfe949df21e95b8f95b5f308db379ac74 Author: Lars-Peter Clausen Date: Tue Dec 15 20:17:43 2020 +0100 iio: Add basic unit test for iio_format_value() The IIO core provides a function to do formatting of fixedpoint numbers. In the past there have been some issues with the implementation of the function where for example negative numbers were not handled correctly. Introduce a basic unit test based on kunit that tests the function and ensures that the generated output matches the expected output. This gives us some confidence that future modifications to the function implementation will not break ABI compatibility. To run the unit tests follow the kunit documentation and add CONFIG_IIO=y CONFIG_IIO_TEST_FORMAT=y to the .kunitconfig and run > ./tools/testing/kunit/kunit.py run Configuring KUnit Kernel ... Building KUnit Kernel ... Starting KUnit Kernel ... ============================================================ ======== [PASSED] iio-format ======== [PASSED] iio_test_iio_format_value_integer [PASSED] iio_test_iio_format_value_fixedpoint [PASSED] iio_test_iio_format_value_fractional [PASSED] iio_test_iio_format_value_fractional_log2 [PASSED] iio_test_iio_format_value_multiple ============================================================ Testing complete. 21 tests run. 0 failed. 0 crashed. Elapsed time: 8.242s total, 0.001s configuring, 3.865s building, 0.000s running Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201215191743.2725-3-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 38a52cdef5b3ba2e4ac6b24a073a231e04d2c552 Author: Lars-Peter Clausen Date: Tue Dec 15 20:17:42 2020 +0100 iio: iio_format_value(): Fix IIO_VAL_FRACTIONAL_LOG2 values between -1.0 and 0.0 When formatting a value using IIO_VAL_FRACTIONAL_LOG2 and the values is between -1 and 0 the sign is omitted. We need the same trick as for IIO_VAL_FRACTIONAL to make sure this gets formatted correctly. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201215191743.2725-2-lars@metafoo.de Signed-off-by: Jonathan Cameron commit 2646a95df94e5d2aaeb22fa912179831ebd0095b Author: Lars-Peter Clausen Date: Tue Dec 15 20:17:41 2020 +0100 iio: iio_format_value(): Use signed temporary for IIO_VAL_FRACTIONAL_LOG2 IIO_VAL_FRACTIONAL_LOG2 works with signed values, yet the temporary we use is unsigned. This works at the moment because the variable is implicitly cast to signed everywhere where it is used. But it will certainly be cleaner to use a signed variable in the first place. Signed-off-by: Lars-Peter Clausen Link: https://lore.kernel.org/r/20201215191743.2725-1-lars@metafoo.de Signed-off-by: Jonathan Cameron commit a04e3db5146e49807bb6000302fd2d9efbd964c1 Author: Bhaskar Chowdhury Date: Wed Feb 10 14:27:04 2021 +0530 iio: proximity: sx9500: Fix a spelling postive to positive s/postive/positive/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210210085704.1228068-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Cameron commit 30132fe46669a16846fa5412f92040a2fb9243ec Author: Hans de Goede Date: Sun Feb 7 17:09:01 2021 +0100 iio: accel: kxcjk-1013: Set label based on accel-location on 2-accel yoga-style 2-in-1s Some 2-in-1 laptops / convertibles with 360° (yoga-style) hinges, use 2 KXCJ91008 accelerometers: 1 in their display using an ACPI HID of "KIOX010A"; and 1 in their base using an ACPI HID of "KIOX020A" Since in this case we know the location of each accelerometer, set the label for the accelerometers to the standardized "accel-display" resp. "accel-base" labels. This way userspace can use the labels to get the location. This was tested on a Medion Akoya E2228T MD60250. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210207160901.110643-4-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 788348a5f788f976908231962c6d9ee9d1e6f2db Author: Hans de Goede Date: Sun Feb 7 17:09:00 2021 +0100 iio: accel: bmc150: Set label based on accel-location on 2-accel yoga-style 2-in-1s Some 2-in-1 laptops / convertibles with 360° (yoga-style) hinges, use 2 bmc150 accelerometers, defined by a single BOSC0200 ACPI device node (1 in their base and 1 in their display). Since in this case we know the location of each accelerometer, set the label for the accelerometers to the standardized "accel-display" resp. "accel-base" labels. This way userspace can use the labels to get the location. This was tested on a Lenovo ThinkPad Yoga 11e 4th gen (N3450 CPU). Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210207160901.110643-3-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit 6f71bf1991b6f04dc87a4f5b9d6823535f51a50d Author: Hans de Goede Date: Sun Feb 7 17:08:59 2021 +0100 iio: core: Allow drivers to specify a label without it coming from of Only set indio_dev->label from of/dt if there actually is a label specified in of. This allows drivers to set a label without this being overwritten with NULL when there is no label specified in of. This is esp. useful on devices where of is not used at all, such as your typical x86/ACPI device. Signed-off-by: Hans de Goede Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210207160901.110643-2-hdegoede@redhat.com Signed-off-by: Jonathan Cameron commit f3c52f01b4274239c1945aca1f27360b20b83f39 Author: Tomislav Denis Date: Tue Feb 2 09:41:07 2021 +0100 bindings: iio: adc: Add documentation for ADS131E0x ADC driver Add a device tree binding documentation for Texas Instruments ADS131E0x ADC family driver. Signed-off-by: Tomislav Denis Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210202084107.3260-3-tomislav.denis@avl.com Signed-off-by: Jonathan Cameron commit d935eddd2799f2559d3c909e5977c0a85a5af1b7 Author: Tomislav Denis Date: Tue Feb 2 09:41:06 2021 +0100 iio: adc: Add driver for Texas Instruments ADS131E0x ADC family The ADS131E0x are a family of multichannel, simultaneous sampling, 24-bit, delta-sigma, analog-to-digital converters (ADCs) with a built-in programmable gain amplifier (PGA), internal reference and an onboard oscillator. Datasheet: https://www.ti.com/lit/ds/symlink/ads131e08.pdf Signed-off-by: Tomislav Denis Link: https://lore.kernel.org/r/20210202084107.3260-2-tomislav.denis@avl.com Signed-off-by: Jonathan Cameron commit c19ae6be7555abbee985d73372d0e78878a337f8 Author: Mike Looijmans Date: Mon Jan 25 16:07:32 2021 +0100 iio: accel: Add support for the Bosch-Sensortec BMI088 The BMI088 is a combined module with both accelerometer and gyroscope. This adds the accelerometer driver support for the SPI interface. The gyroscope part is already supported by the BMG160 driver. Signed-off-by: Mike Looijmans Reviewed-by: Linus Walleij Link: https://lore.kernel.org/r/20210125150732.23873-2-mike.looijmans@topic.nl Signed-off-by: Jonathan Cameron commit 14aae60174db9415b2db8a9d57586a11d8280961 Author: Mike Looijmans Date: Mon Jan 25 16:07:31 2021 +0100 dt-bindings: iio: accel: Add bmi088 accelerometer bindings This adds the device-tree bindings for the Bosch Sensortec BMI088 IMU, the accelerometer part. Signed-off-by: Mike Looijmans Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210125150732.23873-1-mike.looijmans@topic.nl Signed-off-by: Jonathan Cameron commit 0071aa300271a4c6328e4d2c43f53c5a91ddd2ba Author: zuoqilin Date: Thu Jan 28 10:19:05 2021 +0800 iio:adc:dac:ad5791 typo fix of regster change 'regster' to 'register' Signed-off-by: zuoqilin Link: https://lore.kernel.org/r/20210128021905.963-1-zuoqilin1@163.com Signed-off-by: Jonathan Cameron commit 53fa791ada020da84dcd1c1c595510a4ca588693 Author: Peter Meerwald-Stadler Date: Mon Jan 25 20:56:54 2021 +0100 MAINTAINERS: iio: move Peter Meerwald-Stadler to CREDITS Haven't had much time lately and moved on to different things. Thanks Jonathan for the gentle introduction to Linux land. Signed-off-by: Peter Meerwald-Stadler Reviewed-by: Matt Ranostay Link: https://lore.kernel.org/r/20210125195654.580465-1-pmeerw@pmeerw.net Signed-off-by: Jonathan Cameron commit 8a09054f3e8afd0521309b15baab716fa7454785 Author: Ahmad Fatoum Date: Mon Jan 25 20:48:23 2021 +0100 iio: adc: stm32-adc: enable timestamping for non-DMA usage For non-DMA usage, we have an easy way to associate a timestamp with a sample: iio_pollfunc_store_time stores a timestamp in the primary trigger IRQ handler and stm32_adc_trigger_handler runs in the IRQ thread to push out the buffer along with the timestamp. For this to work, the driver needs to register an IIO_TIMESTAMP channel. Do this. For DMA, it's not as easy, because we don't push the buffers out of stm32_adc_trigger, but out of stm32_adc_dma_buffer_done, which runs in a tasklet scheduled after a DMA completion. Preferably, the DMA controller would copy us the timestamp into that buffer as well. Until this is implemented, restrict timestamping support to only PIO. For low-frequency sampling, PIO is probably good enough. Cc: Holger Assmann Acked-by: Fabrice Gasnier Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20210125194824.30549-1-a.fatoum@pengutronix.de Signed-off-by: Jonathan Cameron commit 6c3b615379d7cd90d2f70b3cf9860c5a4910546a Author: Ye Xiang Date: Sat Jan 30 18:25:46 2021 +0800 iio: hid-sensor-rotation: Fix quaternion data not correct Because the data of HID_USAGE_SENSOR_ORIENT_QUATERNION defined by ISH FW is s16, but quaternion data type is in_rot_quaternion_type(le:s16/32X4>>0), need to transform data type from s16 to s32 May require manual backporting. Fixes: fc18dddc0625 ("iio: hid-sensors: Added device rotation support") Signed-off-by: Ye Xiang Link: https://lore.kernel.org/r/20210130102546.31397-1-xiang.ye@intel.com Cc: Signed-off-by: Jonathan Cameron commit e357e81fcf115bce68f3c8ca76cfc89caf24ec5a Author: William Breathitt Gray Date: Sat Jan 30 11:37:03 2021 +0900 counter: 104-quad-8: Remove IIO counter ABI The IIO counter driver has been superseded by the Counter subsystem as discussed in [1]. This patch removes the IIO counter ABI from the 104-QUAD-8 driver. [1] https://lore.kernel.org/lkml/20210119104105.000010df@Huawei.com/ Cc: Syed Nayyar Waris Signed-off-by: William Breathitt Gray Link: https://lore.kernel.org/r/98a39983d5df761c058a469d1346fd8ffdef8516.1611973018.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron commit 01f68f067dc39df9c9d95d759ee61517eb4b0fcf Author: Fabrice Gasnier Date: Fri Jan 29 14:22:22 2021 +0100 counter: stm32-lptimer-cnt: remove iio counter abi Currently, the STM32 LP Timer counter driver registers into both IIO and counter subsystems, which is redundant. Remove the IIO counter ABI and IIO registration from the STM32 LP Timer counter driver since it's been superseded by the Counter subsystem as discussed in [1]. Keep only the counter subsystem related part. Move a part of the ABI documentation into a driver comment. This also removes a duplicate ABI warning $ scripts/get_abi.pl validate ... /sys/bus/iio/devices/iio:deviceX/in_count0_preset is defined 2 times: ./Documentation/ABI/testing/sysfs-bus-iio-timer-stm32:100 ./Documentation/ABI/testing/sysfs-bus-iio-lptimer-stm32:0 [1] https://lkml.org/lkml/2021/1/19/347 Acked-by: William Breathitt Gray Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/1611926542-2490-1-git-send-email-fabrice.gasnier@foss.st.com Signed-off-by: Jonathan Cameron commit c03e2df6e1d51f4e1252318275007214a3bd8e85 Author: Jonathan Cameron Date: Sun Jan 24 19:10:22 2021 +0000 iio:adc:stm32-adc: Add HAS_IOMEM dependency Seems that there are config combinations in which this driver gets enabled and hence selects the MFD, but with out HAS_IOMEM getting pulled in via some other route. MFD is entirely contained in an if HAS_IOMEM block, leading to the build issue in this bugzilla. https://bugzilla.kernel.org/show_bug.cgi?id=209889 Cc: Signed-off-by: Jonathan Cameron commit f40e8005305418522eeff217cb72e806eeaa3598 Author: Ahmad Fatoum Date: Thu Jan 21 16:39:44 2021 +0100 iio: st_sensors: fix typo in comment s/timetamping/timestamping/ Cc: trivial@kernel.org Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20210121153945.5499-1-a.fatoum@pengutronix.de Signed-off-by: Jonathan Cameron commit ee47ed08d75e8f16b3cf882061ee19c2ea19dd6c Author: Florian Fainelli Date: Wed Mar 10 10:52:26 2021 -0800 net: dsa: b53: Add debug prints in b53_vlan_enable() Having dynamic debug prints in b53_vlan_enable() has been helpful to uncover a recent but update the function to indicate the port being configured (or -1 for initial setup) and include the global VLAN enabled and VLAN filtering enable status. Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller commit 086877a12f36f7fffaaeb3b7842cf409093e13b8 Author: Ville Syrjälä Date: Wed Mar 10 21:43:51 2021 +0200 drm/i915: Tolerate bogus DPLL selection Let's check that we actually found the PLL before doing the port_clock readout, just in case the hardware was severly misprogrammed by the previous guy. Not sure the hw would even survive such misprogramming without hanging but no real harm in checking anyway. Cc: Karthik B S Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210310194351.6233-1-ville.syrjala@linux.intel.com Reviewed-by: Karthik B S commit 054ac8ad5ebe4a69e1f0e842483821ddbe560121 Author: Juergen Gross Date: Thu Mar 11 15:23:19 2021 +0100 x86/paravirt: Have only one paravirt patch function There is no need any longer to have different paravirt patch functions for native and Xen. Eliminate native_patch() and rename paravirt_patch_default() to paravirt_patch(). Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-15-jgross@suse.com commit fafe5e74229fd3f425e3cbfc68b90e615aa6d62f Author: Juergen Gross Date: Thu Mar 11 15:23:18 2021 +0100 x86/paravirt: Switch functions with custom code to ALTERNATIVE Instead of using paravirt patching for custom code sequences use ALTERNATIVE for the functions with custom code replacements. Instead of patching an ud2 instruction for unpopulated vector entries into the caller site, use a simple function just calling BUG() as a replacement. Simplify the register defines for assembler paravirt calling, as there isn't much usage left. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-14-jgross@suse.com commit 00aa3193ab7a04b25bb8c68e377815696eb5bf56 Author: Juergen Gross Date: Thu Mar 11 15:23:17 2021 +0100 x86/paravirt: Add new PVOP_ALT* macros to support pvops in ALTERNATIVEs Instead of using paravirt patching for custom code sequences add support for using ALTERNATIVE handling combined with paravirt call patching. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-13-jgross@suse.com commit ae755b5a45482b5de4d96d6f35823076af77445e Author: Juergen Gross Date: Thu Mar 11 15:23:16 2021 +0100 x86/paravirt: Switch iret pvops to ALTERNATIVE The iret paravirt op is rather special as it is using a jmp instead of a call instruction. Switch it to ALTERNATIVE. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-12-jgross@suse.com commit 0b8d366a942fd48a83dfa728e9f8a8d8b20e735f Author: Juergen Gross Date: Thu Mar 11 15:23:15 2021 +0100 x86/paravirt: Simplify paravirt macros The central pvops call macros ____PVOP_CALL() and ____PVOP_VCALL() are looking very similar now. The main differences are using PVOP_VCALL_ARGS or PVOP_CALL_ARGS, which are identical, and the return value handling. So drop PVOP_VCALL_ARGS and instead of ____PVOP_VCALL() just use (void)____PVOP_CALL(long, ...). Note that it isn't easily possible to just redefine ____PVOP_VCALL() to use ____PVOP_CALL() instead, as this would require further hiding of commas in macro parameters. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-11-jgross@suse.com commit 33634e42e38be61f320183dfc264b9caba292d4e Author: Juergen Gross Date: Thu Mar 11 15:23:14 2021 +0100 x86/paravirt: Remove no longer needed 32-bit pvops cruft PVOP_VCALL4() is only used for Xen PV, while PVOP_CALL4() isn't used at all. Keep PVOP_CALL4() for 64 bits due to symmetry reasons. This allows to remove the 32-bit definitions of those macros leading to a substantial simplification of the paravirt macros, as those were the only ones needing non-empty "pre" and "post" parameters. PVOP_CALLEE2() and PVOP_VCALLEE2() are used nowhere, so remove them. Another no longer needed case is special handling of return types larger than unsigned long. Replace that with a BUILD_BUG_ON(). DISABLE_INTERRUPTS() is used in 32-bit code only, so it can just be replaced by cli. INTERRUPT_RETURN in 32-bit code can be replaced by iret. ENABLE_INTERRUPTS is used nowhere, so it can be removed. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-10-jgross@suse.com commit 4e6292114c741221479046515b1aa8145cf1e3f6 Author: Juergen Gross Date: Thu Mar 11 15:23:13 2021 +0100 x86/paravirt: Add new features for paravirt patching For being able to switch paravirt patching from special cased custom code sequences to ALTERNATIVE handling some X86_FEATURE_* are needed as new features. This enables to have the standard indirect pv call as the default code and to patch that with the non-Xen custom code sequence via ALTERNATIVE patching later. Make sure paravirt patching is performed before alternatives patching. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-9-jgross@suse.com commit c33d516a1c742b7bf576975ba9e174e18272223b Author: Jack Wang Date: Mon Feb 22 15:15:51 2021 +0100 RDMA/rtrs-clt: Use rdma_event_msg in log It's easier to understand a string instead of enum. Link: https://lore.kernel.org/r/20210222141551.54345-2-jinpu.wang@cloud.ionos.com Signed-off-by: Jack Wang Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit 3b89e92c2a95a39c38a3808f4528e502a39bd94d Author: Jack Wang Date: Mon Feb 22 15:15:50 2021 +0100 RDMA/rtrs: Use new shared CQ mechanism Have the driver use shared CQs which provids a ~10%-20% improvement during test. Instead of opening a CQ for each QP per connection, 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. Link: https://lore.kernel.org/r/20210222141551.54345-1-jinpu.wang@cloud.ionos.com Signed-off-by: Jack Wang Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe commit e180f76d06412bb412ab675dadeb8c2b64da1dcf Author: Jan Kiszka Date: Thu Mar 11 15:33:43 2021 +0100 arm64: dts: ti: Add support for Siemens IOT2050 boards Add support for two Siemens SIMATIC IOT2050 variants, Basic and Advanced. They are based on the TI AM6528 GP and AM6548 SOCs HS, thus differ in their number of cores and availability of security features. Furthermore the Advanced version comes with more RAM, an eMMC and a few internal differences. Based on original version by Le Jin. Signed-off-by: Jan Kiszka Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://new.siemens.com/global/en/products/automation/pc-based/iot-gateways/simatic-iot2050.html Link: https://github.com/siemens/meta-iot2050 Link: https://lore.kernel.org/r/4fb05969102d14d230e03ca4312ef9706efa61e6.1615473223.git.jan.kiszka@siemens.com commit 807a2b86269e6eea9ac9d4cd3aafccf8478449ee Author: Jan Kiszka Date: Thu Mar 11 15:33:42 2021 +0100 dt-bindings: arm: ti: Add bindings for Siemens IOT2050 boards These boards are based on AM6528 GP and AM6548 HS SOCs. Signed-off-by: Jan Kiszka Signed-off-by: Nishanth Menon Acked-by: Rob Herring Link: https://lore.kernel.org/r/173ce7d928ed9f352af7673dd44c6c76a1466eb5.1615473223.git.jan.kiszka@siemens.com commit 61a9114b891f0a4e5e4bee2bc93745343234973e Author: Jan Kiszka Date: Thu Mar 11 15:33:41 2021 +0100 dt-bindings: Add Siemens vendor prefix Add prefix for Siemens AG. Signed-off-by: Jan Kiszka Signed-off-by: Nishanth Menon Acked-by: Rob Herring Link: https://lore.kernel.org/r/4750c25ded8d1d5791c14b0e7b450a2a918eea36.1615473223.git.jan.kiszka@siemens.com commit 2fe2a2c7a97c9bc32acc79154b75e754280f7867 Author: Juergen Gross Date: Thu Mar 11 15:23:12 2021 +0100 x86/alternative: Use ALTERNATIVE_TERNARY() in _static_cpu_has() _static_cpu_has() contains a completely open coded version of ALTERNATIVE_TERNARY(). Replace that with the macro instead. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210311142319.4723-8-jgross@suse.com commit c2e4bfe0eef313eeb1c4c9d921be7a9d91d5d71a Author: Davidlohr Bueso Date: Fri Feb 26 09:50:29 2021 -0800 kernel/futex: Explicitly document pi_lock for pi_state owner fixup This seems to belong in the serialization and lifetime rules section. pi_state_update_owner() will take the pi_mutex's owner's pi_lock to do whatever fixup, successful or not. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210226175029.50335-4-dave@stgolabs.net commit a3f2428d2b9c9ca70f52818774a2f6e0e30a0f0b Author: Davidlohr Bueso Date: Fri Feb 26 09:50:28 2021 -0800 kernel/futex: Move hb unlock out of unqueue_me_pi() This improves the code readability, and the locking more obvious as it becomes symmetric for the caller. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210226175029.50335-3-dave@stgolabs.net commit a1565aa4699847febfdfd6af3bf06ca17a9e16af Author: Davidlohr Bueso Date: Fri Feb 26 09:50:27 2021 -0800 kernel/futex: Make futex_wait_requeue_pi() only call fixup_owner() A small cleanup that allows for fixup_pi_state_owner() only to be called from fixup_owner(), and make requeue_pi uniformly call fixup_owner() regardless of the state in which the fixup is actually needed. Of course this makes the caller's first pi_state->owner != current check redundant, but that should't really matter. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210226175029.50335-2-dave@stgolabs.net commit 9a4b99fce659c03699f1cb5003ebe7c57c084d49 Author: Davidlohr Bueso Date: Fri Feb 26 09:50:26 2021 -0800 kernel/futex: Kill rt_mutex_next_owner() Update wake_futex_pi() and kill the call altogether. This is possible because: (i) The case of fixup_owner() in which the pi_mutex was stolen from the signaled enqueued top-waiter which fails to trylock and doesn't see a current owner of the rtmutex but needs to acknowledge an non-enqueued higher priority waiter, which is the other alternative. This used to be handled by rt_mutex_next_owner(), which guaranteed fixup_pi_state_owner('newowner') never to be nil. Nowadays the logic is handled by an EAGAIN loop, without the need of rt_mutex_next_owner(). Specifically: c1e2f0eaf015 (futex: Avoid violating the 10th rule of futex) 9f5d1c336a10 (futex: Handle transient "ownerless" rtmutex state correctly) (ii) rt_mutex_next_owner() and rt_mutex_top_waiter() are semantically equivalent, as of: c28d62cf52d7 (locking/rtmutex: Handle non enqueued waiters gracefully in remove_waiter()) So instead of keeping the call around, just use the good ole rt_mutex_top_waiter(). No change in semantics. Signed-off-by: Davidlohr Bueso Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/r/20210226175029.50335-1-dave@stgolabs.net commit 2df7062002d0263bde70b453f671bb4f8493e169 Author: Peng Fan Date: Sat Mar 6 19:24:25 2021 +0800 remoteproc: imx_proc: enable virtio/mailbox Use virtio/mailbox to build connection between Remote Proccessors and Linux. Add work queue to handle incoming messages. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1615029865-23312-11-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 8f2d8961640f0346cbe892273c3260a0d30c1931 Author: Peng Fan Date: Sat Mar 6 19:24:24 2021 +0800 remoteproc: imx_rproc: ignore mapping vdev regions vdev regions are vdev0vring0, vdev0vring1, vdevbuffer and similar. They are handled by remoteproc common code, no need to map in imx rproc driver. Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/1615029865-23312-10-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 4ab8f9607aad6323826c9b945dee52e565975fcc Author: Peng Fan Date: Sat Mar 6 19:24:23 2021 +0800 remoteproc: imx_rproc: support i.MX8MQ/M Add i.MX8MQ dev/sys addr map and configuration data structure i.MX8MM share i.MX8MQ settings. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1615029865-23312-9-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit b29b4249f8f0cad1a1787cbe59e638ff23d489ed Author: Peng Fan Date: Sat Mar 6 19:24:22 2021 +0800 remoteproc: imx_rproc: add i.MX specific parse fw hook The hook is used to parse memory-regions and load resource table from the address the remote processor published. Reviewed-by: Richard Zhu Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1615029865-23312-8-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit ecadcc47492cc73a9bb92fbf16098192df514b87 Author: Peng Fan Date: Sat Mar 6 19:24:21 2021 +0800 remoteproc: imx_rproc: use devm_ioremap We might need to map an region multiple times, becaue the region might be shared between remote processors, such i.MX8QM with dual M4 cores. So use devm_ioremap, not devm_ioremap_resource. Reviewed-by: Oleksij Rempel Reviewed-by: Richard Zhu Signed-off-by: Peng Fan Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/1615029865-23312-7-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 1896b3d82c555eaec6f6bde0c8d12377060bb22d Author: Peng Fan Date: Sat Mar 6 19:24:20 2021 +0800 remoteproc: imx_rproc: correct err message It is using devm_ioremap, so not devm_ioremap_resource. Correct the error message and print out sa/size. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1615029865-23312-6-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 40df0a91b2a5228ded8e5f75b80d28c96c6831cd Author: Peng Fan Date: Sat Mar 6 19:24:19 2021 +0800 remoteproc: add is_iomem to da_to_va Introduce an extra parameter is_iomem to da_to_va, then the caller could take the memory as normal memory or io mapped memory. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Reported-by: kernel test robot Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1615029865-23312-5-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 2cfc056ef2c28b4961bff5e2f6deed94afb14024 Author: Peng Fan Date: Sat Mar 6 19:24:18 2021 +0800 remoteproc: introduce is_iomem to rproc_mem_entry Introduce is_iomem to indicate this piece memory is iomem or not. Reviewed-by: Bjorn Andersson Reviewed-by: Mathieu Poirier Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1615029865-23312-4-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit bc403b4dfcbcefe489c94df9e568b8f57c2aaae7 Author: Peng Fan Date: Sat Mar 6 19:24:17 2021 +0800 dt-bindings: remoteproc: imx_rproc: add i.MX8MQ/M support Add i.MX8MQ/M support, also include mailbox for rpmsg/virtio usage. Reviewed-by: Rob Herring Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1615029865-23312-3-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 9e4c31799cbdcf271b81e1ed169cd2c131c4e079 Author: Peng Fan Date: Sat Mar 6 19:24:16 2021 +0800 dt-bindings: remoteproc: convert imx rproc bindings to json-schema Convert the imx rproc binding to DT schema format using json-schema. Reviewed-by: Rob Herring Signed-off-by: Peng Fan Link: https://lore.kernel.org/r/1615029865-23312-2-git-send-email-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson commit 2bf2346159bc99cf0679e25be20f4daca60f3f5c Author: Jindong Yue Date: Wed Feb 24 13:58:25 2021 +0800 remoteproc: core: Remove casting to rproc_handle_resource_t There are four different callback functions that are used for the rproc_handle_resource_t callback that all have different second parameter types. rproc_handle_vdev -> struct fw_rsc_vdev rproc_handle_trace -> struct fw_rsc_trace rproc_handle_devmem -> struct fw_rsc_devmem rproc_handle_carveout -> struct fw_rsc_carveout These callbacks are cast to rproc_handle_resource_t so that there is no error about incompatible pointer types. Unfortunately, this is a Clang's Control-Flow Integrity checking violation, which verifies that the callback function's types match the prototypes exactly before jumping. [ 7.275750] Kernel panic - not syncing: CFI failure (target: rproc_handle_vdev+0x0/0x4) [ 7.283763] CPU: 2 PID: 1 Comm: init Tainted: G C O 5.4.70-03301-g527af2c96672 #17 [ 7.292463] Hardware name: NXP i.MX8MPlus EVK board (DT) [ 7.297779] Call trace: [ 7.300232] dump_backtrace.cfi_jt+0x0/0x4 [ 7.304337] show_stack+0x18/0x24 [ 7.307660] dump_stack+0xb8/0x114 [ 7.311069] panic+0x164/0x3d4 [ 7.314130] __ubsan_handle_cfi_check_fail_abort+0x0/0x14 [ 7.319533] perf_proc_update_handler+0x0/0xcc [ 7.323983] __cfi_check+0x63278/0x6a290 [ 7.327913] rproc_boot+0x3f8/0x738 [ 7.331404] rproc_add+0x68/0x110 [ 7.334738] imx_rproc_probe+0x5e4/0x708 [imx_rproc] [ 7.339711] platform_drv_probe+0xac/0xf0 [ 7.343726] really_probe+0x260/0x65c [ 7.347393] driver_probe_device+0x64/0x100 [ 7.351580] device_driver_attach+0x6c/0xac [ 7.355766] __driver_attach+0xdc/0x184 [ 7.359609] bus_for_each_dev+0x98/0x104 [ 7.363537] driver_attach+0x24/0x30 [ 7.367117] bus_add_driver+0x100/0x1e0 [ 7.370958] driver_register+0x78/0x114 [ 7.374800] __platform_driver_register+0x44/0x50 [ 7.379514] init_module+0x20/0xfe8 [imx_rproc] [ 7.384049] do_one_initcall+0x190/0x348 [ 7.387979] do_init_module+0x5c/0x210 [ 7.391731] load_module+0x2fbc/0x3590 [ 7.395485] __arm64_sys_finit_module+0xb8/0xec [ 7.400025] el0_svc_common+0xb4/0x19c [ 7.403777] el0_svc_handler+0x74/0x98 [ 7.407531] el0_svc+0x8/0xc [ 7.410419] SMP: stopping secondary CPUs [ 7.414648] Kernel Offset: disabled [ 7.418142] CPU features: 0x00010002,2000200c [ 7.422501] Memory Limit: none To fix this, change the second parameter of all functions to void * and use a local variable with the correct type so that everything works properly. With this, we can remove casting to rproc_handle_resource_t for these functions. Signed-off-by: Jindong Yue Reviewed-by: Peng Fan Reviewed-by: Sami Tolvanen Reviewed-by: Mathieu Poirier Link: https://lore.kernel.org/r/20210224055825.7417-1-jindong.yue@nxp.com Signed-off-by: Bjorn Andersson commit 780a980e2b047768130ddb68d39fbde84b049630 Author: Yang Li Date: Wed Feb 24 16:20:29 2021 +0800 remoteproc: pru: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Fix the following coccicheck warning: ./drivers/remoteproc/pru_rproc.c:247:0-23: WARNING: pru_rproc_debug_ss_fops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Reviewed-by: Mathieu Poirier Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1614154829-42461-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Bjorn Andersson commit f675ba125bd38acb95d84da04e5fd89aa36cc429 Author: Gal Pressman Date: Thu Mar 11 17:09:21 2021 +0200 RDMA/core: Remove unused req_ncomp_notif device operation The request_ncomp_notif device operation and function are unused, remove them. Link: https://lore.kernel.org/r/20210311150921.23726-1-galpress@amazon.com Signed-off-by: Gal Pressman Signed-off-by: Jason Gunthorpe commit 065cac6c686d755e8379ee1e8d00e7c7ba79f49a Author: Yang Li Date: Tue Mar 2 17:16:38 2021 +0800 of: property: Remove unneeded return variable This patch removes unneeded return variables, using only '0' instead. It fixes the following warning detected by coccinelle: ./drivers/of/property.c:1371:5-8: Unneeded variable: "ret". Return "0" on line 1388 Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1614676598-105267-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Rob Herring commit 886db32398aba36937e3a61bc093bf4d859cfaf8 Author: Thiago Jung Bauermann Date: Fri Feb 19 21:52:04 2021 -0300 powerpc/kexec_file: Restore FDT size estimation for kdump kernel kexec_fdt_totalsize_ppc64() includes the base FDT size in its size calculation, but commit 3c985d31ad66 ("powerpc: Use common of_kexec_alloc_and_setup_fdt()") changed the kexec code to use the generic function of_kexec_alloc_and_setup_fdt() which already includes the base FDT size. That change made the code overestimate the size a bit by counting twice the space required for the kernel command line and /chosen properties. Therefore change kexec_fdt_totalsize_ppc64() to calculate just the extra space needed by the kdump kernel, and change the function name so that it better reflects what the function is now doing. Signed-off-by: Thiago Jung Bauermann Reviewed-by: Lakshmi Ramasubramanian Reviewed-by: Hari Bathini Acked-by: Michael Ellerman [robh: reword commit msg as no longer a fix from merging to branches] Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210220005204.1417200-1-bauerman@linux.ibm.com commit ebd9c2ae369a45bdd9f8615484db09be58fc242b Author: Eric Snowberg Date: Fri Jan 22 13:10:54 2021 -0500 integrity: Load mokx variables into the blacklist keyring During boot the Secure Boot Forbidden Signature Database, dbx, is loaded into the blacklist keyring. Systems booted with shim have an equivalent Forbidden Signature Database called mokx. Currently mokx is only used by shim and grub, the contents are ignored by the kernel. Add the ability to load mokx into the blacklist keyring during boot. Signed-off-by: Eric Snowberg Suggested-by: James Bottomley Signed-off-by: David Howells Reviewed-by: Jarkko Sakkinen cc: keyrings@vger.kernel.org Link: https://lore.kernel.org/r/c33c8e3839a41e9654f41cc92c7231104931b1d7.camel@HansenPartnership.com/ Link: https://lore.kernel.org/r/20210122181054.32635-5-eric.snowberg@oracle.com/ # v5 Link: https://lore.kernel.org/r/161428674320.677100.12637282414018170743.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/161433313205.902181.2502803393898221637.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161529607422.163428.13530426573612578854.stgit@warthog.procyon.org.uk/ # v3 commit d1f044103dad70c1cec0a8f3abdf00834fec8b98 Author: Eric Snowberg Date: Fri Jan 22 13:10:53 2021 -0500 certs: Add ability to preload revocation certs Add a new Kconfig option called SYSTEM_REVOCATION_KEYS. If set, this option should be the filename of a PEM-formated file containing X.509 certificates to be included in the default blacklist keyring. DH Changes: - Make the new Kconfig option depend on SYSTEM_REVOCATION_LIST. - Fix SYSTEM_REVOCATION_KEYS=n, but CONFIG_SYSTEM_REVOCATION_LIST=y[1][2]. - Use CONFIG_SYSTEM_REVOCATION_LIST for extract-cert[3]. - Use CONFIG_SYSTEM_REVOCATION_LIST for revocation_certificates.o[3]. Signed-off-by: Eric Snowberg Acked-by: Jarkko Sakkinen Signed-off-by: David Howells cc: Randy Dunlap cc: keyrings@vger.kernel.org Link: https://lore.kernel.org/r/e1c15c74-82ce-3a69-44de-a33af9b320ea@infradead.org/ [1] Link: https://lore.kernel.org/r/20210303034418.106762-1-eric.snowberg@oracle.com/ [2] Link: https://lore.kernel.org/r/20210304175030.184131-1-eric.snowberg@oracle.com/ [3] Link: https://lore.kernel.org/r/20200930201508.35113-3-eric.snowberg@oracle.com/ Link: https://lore.kernel.org/r/20210122181054.32635-4-eric.snowberg@oracle.com/ # v5 Link: https://lore.kernel.org/r/161428673564.677100.4112098280028451629.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/161433312452.902181.4146169951896577982.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161529606657.163428.3340689182456495390.stgit@warthog.procyon.org.uk/ # v3 commit 2565ca7f5ec1a98d51eea8860c4ab923f1ca2c85 Author: Eric Snowberg Date: Fri Jan 22 13:10:52 2021 -0500 certs: Move load_system_certificate_list to a common function Move functionality within load_system_certificate_list to a common function, so it can be reused in the future. DH Changes: - Added inclusion of common.h to common.c (Eric [1]). Signed-off-by: Eric Snowberg Acked-by: Jarkko Sakkinen Signed-off-by: David Howells cc: keyrings@vger.kernel.org Link: https://lore.kernel.org/r/EDA280F9-F72D-4181-93C7-CDBE95976FF7@oracle.com/ [1] Link: https://lore.kernel.org/r/20200930201508.35113-2-eric.snowberg@oracle.com/ Link: https://lore.kernel.org/r/20210122181054.32635-3-eric.snowberg@oracle.com/ # v5 Link: https://lore.kernel.org/r/161428672825.677100.7545516389752262918.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/161433311696.902181.3599366124784670368.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161529605850.163428.7786675680201528556.stgit@warthog.procyon.org.uk/ # v3 commit 56c5812623f95313f6a46fbf0beee7fa17c68bbf Author: Eric Snowberg Date: Fri Jan 22 13:10:51 2021 -0500 certs: Add EFI_CERT_X509_GUID support for dbx entries This fixes CVE-2020-26541. The Secure Boot Forbidden Signature Database, dbx, contains a list of now revoked signatures and keys previously approved to boot with UEFI Secure Boot enabled. The dbx is capable of containing any number of EFI_CERT_X509_SHA256_GUID, EFI_CERT_SHA256_GUID, and EFI_CERT_X509_GUID entries. Currently when EFI_CERT_X509_GUID are contained in the dbx, the entries are skipped. Add support for EFI_CERT_X509_GUID dbx entries. When a EFI_CERT_X509_GUID is found, it is added as an asymmetrical key to the .blacklist keyring. Anytime the .platform keyring is used, the keys in the .blacklist keyring are referenced, if a matching key is found, the key will be rejected. [DH: Made the following changes: - Added to have a config option to enable the facility. This allows a Kconfig solution to make sure that pkcs7_validate_trust() is enabled.[1][2] - Moved the functions out from the middle of the blacklist functions. - Added kerneldoc comments.] Signed-off-by: Eric Snowberg Signed-off-by: David Howells Reviewed-by: Jarkko Sakkinen cc: Randy Dunlap cc: Mickaël Salaün cc: Arnd Bergmann cc: keyrings@vger.kernel.org Link: https://lore.kernel.org/r/20200901165143.10295-1-eric.snowberg@oracle.com/ # rfc Link: https://lore.kernel.org/r/20200909172736.73003-1-eric.snowberg@oracle.com/ # v2 Link: https://lore.kernel.org/r/20200911182230.62266-1-eric.snowberg@oracle.com/ # v3 Link: https://lore.kernel.org/r/20200916004927.64276-1-eric.snowberg@oracle.com/ # v4 Link: https://lore.kernel.org/r/20210122181054.32635-2-eric.snowberg@oracle.com/ # v5 Link: https://lore.kernel.org/r/161428672051.677100.11064981943343605138.stgit@warthog.procyon.org.uk/ Link: https://lore.kernel.org/r/161433310942.902181.4901864302675874242.stgit@warthog.procyon.org.uk/ # v2 Link: https://lore.kernel.org/r/161529605075.163428.14625520893961300757.stgit@warthog.procyon.org.uk/ # v3 Link: https://lore.kernel.org/r/bc2c24e3-ed68-2521-0bf4-a1f6be4a895d@infradead.org/ [1] Link: https://lore.kernel.org/r/20210225125638.1841436-1-arnd@kernel.org/ [2] commit 67cc24ac17fe2a2496456c8ca281ef89f7a6fd89 Author: Douglas Anderson Date: Mon Feb 22 08:17:24 2021 -0800 drm: panel: simple: Set enable delay for BOE NV110WTM-N61 Panel power sequence says timing T8 (time from link idle to turn on the backlight) should be at least 50 ms. This is what the .enable delay in simple-panel is for, so set it. NOTE: this overlaps with the 80 ms .prepare_to_enable delay on purpose. The data sheet says that at least 80 ms needs to pass between HPD going high and turning on the backlight and that at least 50 ms needs to pass between the link idle and the backlight going on. Thus it works like this on the system in front of me: * In bridge chip pre_enable call drm_panel_prepare() * drm_panel_prepare() -> panel_simple_prepare() * Wait for HPD GPIO to go high. * Start counting for 80 ms (store in prepared_time) * In bridge chip enable, train link then call drm_panel_enable() * drm_panel_enable() -> panel_simple_enable() * panel_simple_enable() does hardcoded 50 ms delay then enforces 80 ms from HPD going high (in case the bridge took less than 30 ms to enable / link train). * drm_panel_enable() -> backlight_enable(). Signed-off-by: Douglas Anderson Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210222081716.1.I1a45aece5d2ac6a2e73bbec50da2086e43e0862b@changeid commit 0befe3a0c6126a464caa19c335afff95fb543971 Merge: 6f2cd36f78ef8 9dc21a066bb6b Author: Mark Brown Date: Thu Mar 11 16:16:35 2021 +0000 Merge series "ASoC: mediatek: mt8183-mt6358: support machine driver for rt1015p" from Tzung-Bi Shih : The series reuses mt8183-mt6358-ts3a227-max98357.c for supporting machine driver with rt1015p speaker amplifier. The 1st patch adds document for the new proposed compatible string. The 2nd patch changes the machine driver to support "RT1015P" codec. Tzung-Bi Shih (2): ASoC: dt-bindings: mt8183: add compatible string for using rt1015p ASoC: mediatek: mt8183: support machine driver with rt1015p .../sound/mt8183-mt6358-ts3a227-max98357.txt | 1 + sound/soc/mediatek/Kconfig | 1 + .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 29 +++++++++++++++++++ 3 files changed, 31 insertions(+) -- 2.31.0.rc2.261.g7f71774620-goog commit 6f2cd36f78ef8b441ecbc930c45536ec20a661f6 Merge: c68fded79a9fe 8ea9e29cc7fc9 Author: Mark Brown Date: Thu Mar 11 16:16:34 2021 +0000 Merge series "ASoC: codecs: wolfson: remove cppcheck warnings" from Pierre-Louis Bossart : There should be no functionality change, just minor fixes to make warnings go away. Pierre-Louis Bossart (10): ASoC: arizona: fix function argument ASoC: madera: align function prototype ASoC: wm2200: remove unused structure ASoC: wm8903: remove useless assignments ASoC: wm8958-dsp2: rename local 'control' arrays ASoC: wm8978: clarify expression ASoC: wm8994: align function prototype ASoC: wm8996: clarify expression ASoC: wm_adsp: simplify return value ASoC: wm_hubs: align function prototype sound/soc/codecs/arizona.h | 2 +- sound/soc/codecs/madera.h | 2 +- sound/soc/codecs/wm2200.c | 7 ------- sound/soc/codecs/wm8903.c | 2 -- sound/soc/codecs/wm8958-dsp2.c | 16 ++++++++-------- sound/soc/codecs/wm8978.c | 2 +- sound/soc/codecs/wm8994.h | 2 +- sound/soc/codecs/wm8996.c | 2 +- sound/soc/codecs/wm_adsp.c | 2 +- sound/soc/codecs/wm_hubs.h | 2 +- 10 files changed, 15 insertions(+), 24 deletions(-) -- 2.25.1 commit 51d35631c9704b5e5219de15904809367a774297 Author: Douglas Anderson Date: Fri Jan 15 14:44:20 2021 -0800 drm/panel-simple: Add N116BCA-EA1 This panel is quite similar to the similarly named N116BGE panel (the nominal timings are, in fact identical). However, let's add a new entry because the full range of clocks listed for N116BGE aren't supported for N116BCA-EA1, at least according to the datasheet. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210115144345.v2.5.I3c01f3aab8335cb509da7009d8938c1a27a266dc@changeid commit 339c3e80ad3d978ac51566a6a7035e20d5136bde Author: Douglas Anderson Date: Fri Jan 15 14:44:19 2021 -0800 dt-bindings: dt-bindings: display: simple: Add N116BCA-EA1 Another simple eDP panel. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Acked-by: Rob Herring Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210115144345.v2.4.I6889e21811df6adaff5c5b8a8c80fda0669ab3a5@changeid commit 87b497179f5c7c524dd00a6c0d464a390cc74db0 Author: Douglas Anderson Date: Fri Jan 15 14:44:18 2021 -0800 drm/panel-simple: Retry if we timeout waiting for HPD On an Innolux N116BCA panel that I have in front of me, sometimes HPD simply doesn't assert no matter how long you wait for it. As per the very wise advice of The IT Crowd ("Have you tried turning it off and on again?") it appears that power cycling is enough to kick this panel back into a sane state. >From tests on this panel, it appears that leaving it powered off for a while stimulates the problem. Adding a 6 second sleep at the start of panel_simple_prepare_once() makes it happen fairly reliably and, with this delay, I saw up to 3 retries needed sometimes. Without the 6 second sleep, however, the panel came up much more reliably the first time or after only 1 retry. While it's unknown what the problems are with this panel (and probably the hardware should be debugged), adding a few retries to the power on routine doesn't seem insane. Even if this panel's problems are attributed to the fact that it's pre-production and/or can be fixed, retries clearly can help in some cases and really don't hurt. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210115144345.v2.3.I6916959daa7c5c915e889442268d23338de17923@changeid commit 6ec52621e77c81079e7d3858cca00344d4266a89 Author: Douglas Anderson Date: Fri Jan 15 14:44:17 2021 -0800 drm/panel-simple: Don't wait longer for HPD than hpd_absent_delay If a panel has an hpd_absent_delay specified then we know exactly how long the maximum time is before HPD must be asserted. That means we can use it as a timeout for polling the HPD pin instead of using an arbitrary timeout. This is especially useful for dealing with panels that periodically fail to power on and need to be retried. We can detect the problem sooner. Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210115144345.v2.2.I183b1817610d7a82fdd3bc852e96d2985df9623f@changeid commit 5e7222a3674ea7422370779884dd53aabe9e4a9d Author: Douglas Anderson Date: Fri Jan 15 14:44:16 2021 -0800 drm/panel-simple: Undo enable if HPD never asserts If the HPD signal never asserts in panel_simple_prepare() and we return an error, we should unset the enable GPIO and disable the regulator to make it consistent for the caller. At the moment I have some hardware where HPD sometimes doesn't assert. Obviously that needs to be debugged, but this patch makes it so that if I add a retry that I can make things work. Fixes: 48834e6084f1 ("drm/panel-simple: Support hpd-gpios for delaying prepare()") Signed-off-by: Douglas Anderson Reviewed-by: Stephen Boyd Reviewed-by: Linus Walleij Signed-off-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210115144345.v2.1.I33fcbd64ab409cfe4f9491bf449f51925a4d3281@changeid commit e208b3c4a9748b2c17aa09ba663b5096ccf82dce Author: Juergen Gross Date: Thu Mar 11 15:23:11 2021 +0100 x86/alternative: Support ALTERNATIVE_TERNARY Add ALTERNATIVE_TERNARY support for replacing an initial instruction with either of two instructions depending on a feature: ALTERNATIVE_TERNARY "default_instr", FEATURE_NR, "feature_on_instr", "feature_off_instr" which will start with "default_instr" and at patch time will, depending on FEATURE_NR being set or not, patch that with either "feature_on_instr" or "feature_off_instr". [ bp: Add comment ontop. ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-7-jgross@suse.com commit dda7bb76484978316bb412a353789ebc5901de36 Author: Juergen Gross Date: Thu Mar 11 15:23:10 2021 +0100 x86/alternative: Support not-feature Add support for alternative patching for the case a feature is not present on the current CPU. For users of ALTERNATIVE() and friends, an inverted feature is specified by applying the ALT_NOT() macro to it, e.g.: ALTERNATIVE(old, new, ALT_NOT(feature)); Committer note: The decision to encode the NOT-bit in the feature bit itself is because a future change which would make objtool generate such alternative calls, would keep the code in objtool itself fairly simple. Also, this allows for the alternative macros to support the NOT feature without having to change them. Finally, the u16 cpuid member encoding the X86_FEATURE_ flags is not an ABI so if more bits are needed, cpuid itself can be enlarged or a flags field can be added to struct alt_instr after having considered the size growth in either cases. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210311142319.4723-6-jgross@suse.com commit a0e2bf7cb7006b5a58ee81f4da4fe575875f2781 Author: Juergen Gross Date: Thu Mar 11 15:23:09 2021 +0100 x86/paravirt: Switch time pvops functions to use static_call() The time pvops functions are the only ones left which might be used in 32-bit mode and which return a 64-bit value. Switch them to use the static_call() mechanism instead of pvops, as this allows quite some simplification of the pvops implementation. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-5-jgross@suse.com commit 6ea312d95e0226b306bb4b8ee3a0727d880378cb Author: Juergen Gross Date: Thu Mar 11 15:23:08 2021 +0100 static_call: Add function to query current function Some users of paravirtualized functions need to query which function has been specified in a pv_ops vector element. In order to be able to switch such paravirtualized functions to static_calls instead, there needs to be a function to query the function which will be called via static_call(). Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-4-jgross@suse.com commit b046664872dd78a8bebe3d5f3bb9da9baa93f5ca Author: Juergen Gross Date: Thu Mar 11 15:23:07 2021 +0100 static_call: Move struct static_call_key definition to static_call_types.h Having the definition of static_call() in static_call_types.h makes no sense as long struct static_call_key isn't defined there, as the generic implementation of static_call() is referencing this structure. So move the definition of struct static_call_key to static_call_types.h. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210311142319.4723-3-jgross@suse.com commit 5e21a3ecad1500e35b46701e7f3f232e15d78e69 Author: Juergen Gross Date: Thu Mar 11 15:23:06 2021 +0100 x86/alternative: Merge include files Merge arch/x86/include/asm/alternative-asm.h into arch/x86/include/asm/alternative.h in order to make it easier to use common definitions later. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210311142319.4723-2-jgross@suse.com commit 4fb6c04683aa5b45f3876f45465e13265e09eb56 Author: Aswath Govindraju Date: Tue Mar 9 21:53:15 2021 +0530 arm64: dts: ti: k3-am642-evm: Add support for SPI EEPROM Add pinmux details and device tree node for the EEPROM attached to SPI0 module in main domain. Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210309162315.22743-1-a-govindraju@ti.com commit efbdf2e9183bd5e75c64d251c6b673ca61ea01b3 Author: Pratyush Yadav Date: Fri Mar 5 21:09:26 2021 +0530 arm64: dts: ti: k3-j7200-som-p0: Add nodes for OSPI0 TI J7200 has the Cadence OSPI controller for interfacing with OSPI flashes. Add its node to allow using SPI flashes. Signed-off-by: Pratyush Yadav Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210305153926.3479-4-p.yadav@ti.com commit 7c172b30a540644fa53051e947d6712be5d6d6ce Author: Pratyush Yadav Date: Fri Mar 5 21:09:25 2021 +0530 arm64: dts: ti: am654-base-board: Enable 8D-8D-8D mode on OSPI Set the Tx bus width to 8 so 8D-8D-8D mode can be selected. Change the frequency to 25 MHz. This is the frequency that the flash has been successfully tested with in Octal DTR mode. The total performance should still increase since 8D-8D-8D mode should be at least twice as fast as 1S-1S-8S mode. Signed-off-by: Pratyush Yadav Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210305153926.3479-3-p.yadav@ti.com commit 4c20ee99dd1a36ab89c6a8c51ed25e9328d8a8cc Author: Pratyush Yadav Date: Fri Mar 5 21:09:24 2021 +0530 arm64: dts: ti: k3-j721e-som-p0: Enable 8D-8D-8D mode on OSPI Set the Tx bus width to 8 so 8D-8D-8D mode can be selected. Change the frequency to 25 MHz. This is the frequency that the flash has been successfully tested with in Octal DTR mode. The total performance should still increase since 8D-8D-8D mode should be at least twice as fast as 1S-1S-8S mode. Signed-off-by: Pratyush Yadav Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210305153926.3479-2-p.yadav@ti.com commit eb8f6194e8074d7b00642dd75cf04d13e1b218e4 Author: Aswath Govindraju Date: Fri Mar 5 11:11:04 2021 +0530 arm64: dts: ti: k3-j721e-main: Update the speed modes supported and their itap delay values for MMCSD subsystems According to latest errata of J721e [1], HS400 mode is not supported in MMCSD0 subsystem (i2024) and SDR104 mode is not supported in MMCSD1/2 subsystems (i2090). Therefore, replace mmc-hs400-1_8v with mmc-hs200-1_8v in MMCSD0 subsystem and add a sdhci mask to disable SDR104 speed mode. Also, update the itap delay values for all the MMCSD subsystems according the latest J721e data sheet[2] [1] - https://www.ti.com/lit/er/sprz455/sprz455.pdf [2] - https://www.ti.com/lit/ds/symlink/tda4vm.pdf Fixes: cd48ce86a4d0 ("arm64: dts: ti: k3-j721e-common-proc-board: Add support for SD card UHS modes") Signed-off-by: Aswath Govindraju Signed-off-by: Nishanth Menon Reviewed-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210305054104.10153-1-a-govindraju@ti.com commit 6674a90bb141496f56ce840c22f2f2ddccc5d397 Author: Jan Kiszka Date: Sat Feb 20 13:49:51 2021 +0100 arm64: dts: ti: k3-am65-mcu: Add RTI watchdog entry Add the DT entry for a watchdog based on RTI1. On SR1.0 silicon, it requires additional firmware on the MCU R5F cores to handle the expiry, e.g. https://github.com/siemens/k3-rti-wdt. As this firmware will also lock the power domain to protect it against premature shutdown, mark it shared. Signed-off-by: Jan Kiszka Signed-off-by: Nishanth Menon Acked-by: Praneeth Bajjuri Link: https://lore.kernel.org/r/279c20fa-6e5e-4f88-9cd1-f76297a28a19@web.de commit c68fded79a9fe1376a60049f2ab45d611969de5c Author: Pierre-Louis Bossart Date: Wed Mar 10 13:39:27 2021 -0600 ASoC: soc-core: fix DMI handling When DMI information is not present, trying to assign the card long name results in the following warning. WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name! The initial solution suggested was to test if the card device is an ACPI one. This causes a regression visible to userspace on all Intel platforms, with UCM unable to load card profiles based on DMI information: the card devices are not necessarily ACPI ones, e.g. when the parent creates platform devices on Intel devices. To fix this problem, this patch exports the existing dmi_available variable and tests it in the ASoC core. Fixes: c014170408bc ("ASoC: soc-core: Prevent warning if no DMI table is present") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Takashi Iwai Acked-by: Jean Delvare Link: https://lore.kernel.org/r/20210310193928.108850-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9dc21a066bb6bff55d889f22460f1bf236a9a4a3 Author: Tzung-Bi Shih Date: Thu Mar 11 11:31:51 2021 +0800 ASoC: mediatek: mt8183: support machine driver with rt1015p Supports machine driver with rt1015p ("mt8183_mt6358_ts3a227_rt1015p"). Embeds in the 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/20210311033151.1818603-3-tzungbi@google.com Signed-off-by: Mark Brown commit 5fd6b9b8b1c477fb695e3ae313ffb70b3cc88dc9 Author: Tzung-Bi Shih Date: Thu Mar 11 11:31:50 2021 +0800 ASoC: dt-bindings: mt8183: add compatible string for using rt1015p Machines with rt1015p should use the compatible string "mt8183-mt6358-ts3a227-rt1015p". Signed-off-by: Tzung-Bi Shih Link: https://lore.kernel.org/r/20210311033151.1818603-2-tzungbi@google.com Signed-off-by: Mark Brown commit 8ea9e29cc7fc966885018628e123f4113f1ce4b2 Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:32 2021 -0600 ASoC: wm_hubs: align function prototype cppcheck warnings: sound/soc/codecs/wm_hubs.c:1194:11: style:inconclusive: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. [funcArgNamesDifferent] int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.h:59:11: note: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. int micbias1_dly, int micbias2_dly, ^ sound/soc/codecs/wm_hubs.c:1194:11: note: Function 'wm_hubs_handle_analogue_pdata' argument 8 names different: declaration 'micbias1_dly' definition 'micbias1_delay'. int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.c:1194:31: style:inconclusive: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. [funcArgNamesDifferent] int micbias1_delay, int micbias2_delay, ^ sound/soc/codecs/wm_hubs.h:59:29: note: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. int micbias1_dly, int micbias2_dly, ^ sound/soc/codecs/wm_hubs.c:1194:31: note: Function 'wm_hubs_handle_analogue_pdata' argument 9 names different: declaration 'micbias2_dly' definition 'micbias2_delay'. int micbias1_delay, int micbias2_delay, ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 492df5b0748ada592119dc19dd713e4a60c4e69f Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:31 2021 -0600 ASoC: wm_adsp: simplify return value cppcheck warning: sound/soc/codecs/wm_adsp.c:2092:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/wm_adsp.c:2070:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/wm_adsp.c:2092:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ea80d4991b76dc101b87228b74515d818ff03bcd Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:30 2021 -0600 ASoC: wm8996: clarify expression cppcheck warning: sound/soc/codecs/wm8996.c:2109:23: style: Clarify calculation precedence for '/' and '?'. [clarifyCalculation] timeout = timeout/2 ? : 1; ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b564fdb756918557fb4ca5086e67929bd2eafdd6 Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:29 2021 -0600 ASoC: wm8994: align function prototype cppcheck warning: sound/soc/codecs/wm8994.c:3923:26: style:inconclusive: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. [funcArgNamesDifferent] wm1811_micdet_cb det_cb, void *det_cb_data, ^ sound/soc/codecs/wm8994.h:53:26: note: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. wm1811_micdet_cb cb, void *det_cb_data, ^ sound/soc/codecs/wm8994.c:3923:26: note: Function 'wm8958_mic_detect' argument 3 names different: declaration 'cb' definition 'det_cb'. wm1811_micdet_cb det_cb, void *det_cb_data, ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 729d42a4ab1a7bc9f4b5c37c57a3a4270333351f Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:28 2021 -0600 ASoC: wm8978: clarify expression cppcheck warning: sound/soc/codecs/wm8978.c:727:57: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] enum wm8978_sysclk_src current_clk_id = clking & 0x100 ? ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d28a9dfeb8071b9ac0e79c8b8b4a0111c3b54c70 Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:27 2021 -0600 ASoC: wm8958-dsp2: rename local 'control' arrays cppcheck complains about shadowed variables: sound/soc/codecs/wm8958-dsp2.c:926:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:926:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:952:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:952:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:978:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:978:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:1006:27: style: Local variable 'control' shadows outer variable [shadowVariable] struct snd_kcontrol_new control[] = { ^ sound/soc/codecs/wm8958-dsp2.c:900:17: note: Shadowed declaration struct wm8994 *control = wm8994->wm8994; ^ sound/soc/codecs/wm8958-dsp2.c:1006:27: note: Shadow variable struct snd_kcontrol_new control[] = { ^ fix by adding a prefix related to each control. Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 13119a311aeb5a91ea751f10e4158a86361c2f08 Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:26 2021 -0600 ASoC: wm8903: remove useless assignments cppcheck warnings: sound/soc/codecs/wm8903.c:1552:11: style: Variable 'best_val' is assigned a value that is never used. [unreadVariable] best_val = ((clk_sys * 10) / bclk_divs[0].ratio) - bclk; ^ sound/soc/codecs/wm8903.c:1559:12: style: Variable 'best_val' is assigned a value that is never used. [unreadVariable] best_val = cur_val; ^ Indeed what matters in the code is the blck_div, the best_val is assigned but never tested or used. Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 43fe3fe8b31685ccb2e248799ce3e9f9a15938fb Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:25 2021 -0600 ASoC: wm2200: remove unused structure cppcheck complains about some members not being used, but it's really the entire structure that is never used anywhere. Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b6021b5623b93da05375ae8060f8e8d5dcae0ba9 Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:24 2021 -0600 ASoC: madera: align function prototype cppcheck warning: sound/soc/codecs/madera.c:3372:51: style:inconclusive: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. [funcArgNamesDifferent] int madera_init_dai(struct madera_priv *priv, int id) ^ sound/soc/codecs/madera.h:433:51: note: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int madera_init_dai(struct madera_priv *priv, int dai); ^ sound/soc/codecs/madera.c:3372:51: note: Function 'madera_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int madera_init_dai(struct madera_priv *priv, int id) ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4988f0cc254a1955d5c3244298055f5f7b538e6b Author: Pierre-Louis Bossart Date: Wed Mar 10 18:43:23 2021 -0600 ASoC: arizona: fix function argument Cppcheck warning: sound/soc/codecs/arizona.c:2042:53: style:inconclusive: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. [funcArgNamesDifferent] int arizona_init_dai(struct arizona_priv *priv, int id) ^ sound/soc/codecs/arizona.h:320:53: note: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int arizona_init_dai(struct arizona_priv *priv, int dai); ^ sound/soc/codecs/arizona.c:2042:53: note: Function 'arizona_init_dai' argument 2 names different: declaration 'dai' definition 'id'. int arizona_init_dai(struct arizona_priv *priv, int id) ^ Signed-off-by: Pierre-Louis Bossart Acked-by: Charles Keepax Link: https://lore.kernel.org/r/20210311004332.120901-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 429fc6f9550eb4bd2b012831bafbb64dc318ae4b Author: Tian Tao Date: Wed Mar 3 09:39:46 2021 +0800 drm/vboxvideo: Use managed VRAM-helper initialization updated to use drmm_vram_helper_init(). Signed-off-by: Tian Tao Reviewed-by: Hans de Goede Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/1614735587-6621-1-git-send-email-tiantao6@hisilicon.com commit b8da9b10e26cee58eba7b0fd72717127edfb316b Author: Luo Longjun Date: Thu Feb 25 22:58:29 2021 -0500 fs/locks: print full locks information Commit fd7732e033e3 ("fs/locks: create a tree of dependent requests.") has put blocked locks into a tree. So, with a for loop, we can't check all locks information. To solve this problem, we should traverse the tree. Signed-off-by: Luo Longjun Signed-off-by: Jeff Layton commit 618655131894d14e59cec59481efc6b46ed747c8 Author: Jitao Shi Date: Mon Feb 8 09:42:21 2021 +0800 dt-bindings: mediatek,dpi: add mt8192 to mediatek,dpi Add compatible "mediatek,mt8192-dpi" for the mt8192 dpi. Signed-off-by: Jitao Shi Acked-by: Rob Herring Signed-off-by: Chun-Kuang Hu commit 8b2b99fd7931cee3c1fffe4f37bd67583384b505 Author: Jitao Shi Date: Mon Feb 1 11:36:03 2021 +0800 drm/mediatek: dsi: Fine tune the line time caused by EOTp Enabling EoTp will make the line time larger, so the hfp and hbp should be reduced to keep line time. Signed-off-by: Jitao Shi Signed-off-by: Chun-Kuang Hu commit c87d1c4b5b9a86454d928e68d6f1a437a95ed41c Author: Jitao Shi Date: Mon Feb 1 11:36:02 2021 +0800 drm/mediatek: dsi: Use symbolized register definition For HSTX_CKLP_EN and DIS_EOT, use symbolized register definition instead of magic number. Signed-off-by: Jitao Shi Signed-off-by: Chun-Kuang Hu commit be7507bdd705bd28c8e6091e1717b4a53dbd7b8c Author: Rob Herring Date: Tue Feb 23 15:50:57 2021 -0600 dt-bindings: display: mediatek, dpi: Convert to use graph schema Update the mediatek,dpi binding to use the graph schema. Missed this one from the mass conversion since it's not part of drm-misc. Cc: Chun-Kuang Hu Cc: Philipp Zabel Cc: Matthias Brugger Cc: CK Hu Cc: Jitao shi Cc: dri-devel@lists.freedesktop.org Cc: linux-mediatek@lists.infradead.org Signed-off-by: Rob Herring Signed-off-by: Chun-Kuang Hu commit 3ba6d1ff041f07cfbbe1fdf0f25094590d7e543e Author: Gustavo A. R. Silva Date: Fri Mar 5 02:29:53 2021 -0600 mtd: rawnand: stm32_fmc2: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a couple of warnings by explicitly adding a couple of break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210305082953.GA137771@embeddedor commit fe1bc21f447289670c331d4826aea8f3ff38ae6e Author: Gustavo A. R. Silva Date: Fri Mar 5 02:25:59 2021 -0600 mtd: rawnand: fsmc: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210305082559.GA137646@embeddedor commit 36a016a572cad7e5626b13c98b414302d2b10929 Author: Gustavo A. R. Silva Date: Fri Mar 5 02:23:56 2021 -0600 mtd: onenand: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210305082356.GA137489@embeddedor commit 0975b633871cb77c3be7f1deb9feb885e3e86b9c Author: Gustavo A. R. Silva Date: Fri Mar 5 02:22:24 2021 -0600 mtd: mtdchar: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210305082224.GA137360@embeddedor commit c6f51f1f5527946a83da930b43da2e37dc741dc2 Author: Gustavo A. R. Silva Date: Fri Mar 5 02:19:33 2021 -0600 mtd: cfi: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements and a return instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Acked-by: Vignesh Raghavendra Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210305081933.GA137147@embeddedor commit 312e3f8aefb5dc9c2f052ba0ee35a2fd6baa5bcd Author: Colin Ian King Date: Thu Mar 11 09:30:54 2021 +0000 thermal: Fix spelling mistake "disabed" -> "disabled" There is a spelling mistake in a comment, fix it. Signed-off-by: Colin Ian King Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210311093054.5338-1-colin.king@canonical.com commit adc0496104b64b4e6a75627f8a03cd4dfd3e8bbc Author: Jagan Teki Date: Sun Feb 28 21:13:23 2021 +0530 ARM: dts: stm32: Add Engicam i.Core STM32MP1 EDIMM2.2 Starter Kit Engicam EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board. Genaral features: - LCD 7" C.Touch - microSD slot - Ethernet 1Gb - Wifi/BT - 2x LVDS Full HD interfaces - 3x USB 2.0 - 1x USB 3.0 - HDMI Out - Mini PCIe - MIPI CSI - 2x CAN - Audio Out i.Core STM32MP1 is an EDIMM SoM based on STM32MP157A from Engicam. i.Core STM32MP1 needs to mount on top of this Evaluation board for creating complete i.Core STM32MP1 EDIMM2.2 Starter Kit. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: Alexandre Torgue commit 2533c9565d2d751654ec0d0fb27818f0f2ed1ac2 Author: Jagan Teki Date: Sun Feb 28 21:13:22 2021 +0530 dt-bindings: arm: stm32: Add Engicam i.Core STM32MP1 EDIMM2.2 Starter Kit i.Core STM32MP1 is an EDIMM SoM based on STM32MP157A from Engicam. EDIMM2.2 Starter Kit is an EDIMM 2.2 Form Factor Capacitive Evaluation Board from Engicam. i.Core STM32MP1 needs to mount on top of this Evaluation board for creating complete i.Core STM32MP1 EDIMM2.2 Starter Kit. Add bindings for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit 6ca2898df59f71faa42c9f7b1f9bf78e3f1a89d7 Author: Jagan Teki Date: Sun Feb 28 21:13:21 2021 +0530 ARM: dts: stm32: Add Engicam i.Core STM32MP1 C.TOUCH 2.0 Engicam C.TOUCH 2.0 is an EDIMM compliant general purpose Carrier board. Genaral features: - Ethernet 10/100 - Wifi/BT - USB Type A/OTG - Audio Out - CAN - LVDS panel connector i.Core STM32MP1 is an EDIMM SoM based on STM32MP157A from Engicam. i.Core STM32MP1 needs to mount on top of this Carrier board for creating complete i.Core STM32MP1 C.TOUCH 2.0 board. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: Alexandre Torgue commit 30f9a9da4ee13c0aa2469ffaf98466f265b1a6e2 Author: Jagan Teki Date: Sun Feb 28 21:13:20 2021 +0530 ARM: dts: stm32: Add Engicam i.Core STM32MP1 SoM i.Core STM32MP1 is an EDIMM SoM based on STM32MP157A from Engicam. General features: - STM32MP157A - Up to 1GB DDR3L - 4GB eMMC - 10/100 Ethernet - USB 2.0 Host/OTG - I2S - MIPI DSI to LVDS - rest of STM32MP157A features i.Core STM32MP1 needs to mount on top of Engicam baseboards for creating complete platform solutions. Add support for it. Signed-off-by: Jagan Teki Signed-off-by: Alexandre Torgue commit 111d2346d4b2b172bfa69ea7860d13fbcd4d1cd3 Author: Jagan Teki Date: Sun Feb 28 21:13:19 2021 +0530 dt-bindings: arm: stm32: Add Engicam i.Core STM32MP1 C.TOUCH 2.0 i.Core STM32MP1 is an EDIMM SoM based on STM32MP157A from Engicam. C.TOUCH 2.0 is a general purpose carrier board with capacitive touch interface support. i.Core STM32MP1 needs to mount on top of this Carrier board for creating complete i.Core STM32MP1 C.TOUCH 2.0 board. Add bindings for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit 1d278204cbaa125fc8290fad4d3f46edd17f8f6d Author: Jagan Teki Date: Sun Feb 28 21:13:18 2021 +0530 ARM: dts: stm32: Add Engicam MicroGEA STM32MP1 MicroDev 2.0 7" OF 7" OF is a capacitive touch 7" Open Frame panel solutions with - 7" AUO B101AW03 LVDS panel - EDT, FT5526 Touch MicroGEA STM32MP1 is a STM32MP157A based Micro SoM. MicroDev 2.0 is a general purpose miniature carrier board with CAN, LTE and LVDS panel interfaces. MicroGEA STM32MP1 needs to mount on top of MicroDev 2.0 board with pluged 7" OF for creating complete MicroGEA STM32MP1 MicroDev 2.0 7" Open Frame Solution board. Add support for it. Signed-off-by: Matteo Lisi Signed-off-by: Francesco Utel Signed-off-by: Mirko Ardinghi Signed-off-by: Jagan Teki Signed-off-by: Alexandre Torgue commit 0427cea13800f811ff6762d4a6a532c5f3f0014a Author: Jagan Teki Date: Sun Feb 28 21:13:17 2021 +0530 dt-bindings: arm: stm32: Add Engicam MicroGEA STM32MP1 MicroDev 2.0 7" OF MicroGEA STM32MP1 is a STM32MP157A based Micro SoM. MicroDev 2.0 is a general purpose miniature carrier board with CAN, LTE and LVDS panel interfaces. 7" OF is a capacitive touch 7" Open Frame panel solutions. MicroGEA STM32MP1 needs to mount on top of MicroDev 2.0 board with pluged 7" OF for creating complete MicroGEA STM32MP1 MicroDev 2.0 7" Open Frame Solution board. Add bindings for it. Acked-by: Rob Herring Signed-off-by: Jagan Teki Signed-off-by: Alexandre Torgue commit f838dae7afd008f801b589185be12bc32c444ca5 Author: Jagan Teki Date: Sun Feb 28 21:13:16 2021 +0530 ARM: dts: stm32: Add Engicam MicroGEA STM32MP1 MicroDev 2.0 board MicroDev 2.0 is a general purpose miniature carrier board with CAN, LTE and LVDS panel interfaces. Genaral features: - Ethernet 10/100 - USB Type A - Audio Out - microSD - LVDS panel connector - Wifi/BT (option) - UMTS LTE with sim connector (option) MicroGEA STM32MP1 is a STM32MP157A based Micro SoM. MicroGEA STM32MP1 needs to mount on top of this MicroDev 2.0 board for creating complete MicroGEA STM32MP1 MicroDev 2.0 Carrier board. Add support for it. Signed-off-by: Matteo Lisi Signed-off-by: Francesco Utel Signed-off-by: Mirko Ardinghi Signed-off-by: Jagan Teki Signed-off-by: Alexandre Torgue commit 0be81dfaeaf897027c86946ca41e0b5ecf68fdac Author: Jagan Teki Date: Sun Feb 28 21:13:15 2021 +0530 ARM: dts: stm32: Add Engicam MicroGEA STM32MP1 SoM MicroGEA STM32MP1 is a STM32MP157A based Micro SoM. General features: - STM32MP157AAC - Up to 1GB DDR3L-800 - 512MB Nand flash - I2S MicroGEA STM32MP1 needs to mount on top of Engicam MicroDev carrier boards for creating complete platform solutions. Add support for it. Signed-off-by: Matteo Lisi Signed-off-by: Francesco Utel Signed-off-by: Mirko Ardinghi Signed-off-by: Jagan Teki Signed-off-by: Alexandre Torgue commit 546203893173898f299c8eb7820eca6218d8503d Author: Jagan Teki Date: Sun Feb 28 21:13:14 2021 +0530 dt-bindings: arm: stm32: Add Engicam MicroGEA STM32MP1 MicroDev 2.0 MicroGEA STM32MP1 is a STM32MP157A based Micro SOM. MicroDev 2.0 is a general purpose miniature carrier board with CAN, LTE and LVDS panel interfaces. MicroGEA STM32MP1 needs to mount on top of this MicroDev 2.0 board for creating complete MicroGEA STM32MP1 MicroDev 2.0 Carrier board. Add bindings for it. Signed-off-by: Jagan Teki Reviewed-by: Rob Herring Signed-off-by: Alexandre Torgue commit a1429f3d3029b65cd4032f6218d5290911377ce4 Author: Valentin CARON - foss Date: Thu Feb 11 12:07:03 2021 +0100 ARM: dts: stm32: fix usart 2 & 3 pinconf to wake up with flow control Modify usart 2 & 3 pins to allow wake up from low power mode while the hardware flow control is activated. UART RTS pin need to stay configure in idle mode to receive characters in order to wake up. Fixes: 842ed898a757 ("ARM: dts: stm32: add usart2, usart3 and uart7 pins in stm32mp15-pinctrl") Signed-off-by: Valentin Caron Signed-off-by: Alexandre Torgue commit 620b90d30c08684dc6ebee07c72755d997f9d1f6 Author: Jia-Ju Bai Date: Sun Mar 7 19:44:46 2021 -0800 mtd: maps: fix error return code of physmap_flash_remove() When platform_get_drvdata() returns NULL to info, no error return code of physmap_flash_remove() is assigned. To fix this bug, err is assigned with -EINVAL in this case Fixes: 73566edf9b91 ("[MTD] Convert physmap to platform driver") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210308034446.3052-1-baijiaju1990@gmail.com commit b87b6d2d6f540e29c3f98e1572d64e560d73d6c1 Author: Wei Yongjun Date: Thu Mar 4 06:46:00 2021 +0000 mtd: parsers: ofpart: make symbol 'bcm4908_partitions_quirks' static The sparse tool complains as follows: drivers/mtd/parsers/ofpart_core.c:25:32: warning: symbol 'bcm4908_partitions_quirks' was not declared. Should it be static? This symbol is not used outside of ofpart_core.c, so this commit marks it static. Fixes: 457da931b608 ("mtd: parsers: ofpart: support BCM4908 fixed partitions") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210304064600.3279138-1-weiyongjun1@huawei.com commit 1cb3ff130f4d97dec2d1bee968a87f5d6e24dd60 Author: Laurent Pinchart Date: Mon Feb 15 05:27:41 2021 +0100 media: imx: imx7_mipi_csis: Print shadow registers in mipi_csis_dump_regs() Print the value of the ISP shadow registers in mipi_csis_dump_regs() as this can help debugging. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4fe5bb0b666ee53cf0faa778422cc2997d8d091a Author: Laurent Pinchart Date: Mon Feb 15 05:27:40 2021 +0100 media: imx: imx7_mipi_csis: Use register macros in mipi_csis_dump_regs() Replace hardcoded register addresses in the MIPI_CSIS_DBG_CTRL() function with macros. While at it, update the printed name of the registers to match the datasheet, and short them by address. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7b437a246aadf85569d442d93513505f1fcc80f0 Author: Laurent Pinchart Date: Mon Mar 1 17:41:23 2021 +0100 media: imx: imx7_mipi_csis: Rename register macros to match datasheet Rename several register macros to match the names from the documentation. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 547e9437b00c7dd76caeed87571f18d930e3a66d Author: Laurent Pinchart Date: Mon Feb 15 05:27:38 2021 +0100 media: imx: imx7_mipi_csis: Make ISP registers macros take channel ID Replace the per-channel ISP registers macros with a single one that take the channel as a parameter. Only channel 0 is supported for now, but this will make support for multiple channels easier. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e3851164a52d56d0a40fe714c9ab3cd006948159 Author: Laurent Pinchart Date: Mon Feb 15 05:27:37 2021 +0100 media: imx: imx7_mipi_csis: Define macros for DPHY_BCTRL_L fields Define macros for the fields of the MIPI_CSIS_DPHY_BCTRL_L register, based on the i.MX8MM datasheet. The numerical value written to the register, taken from the i.MX7D code, is unchanged, and corresponds to a 20.0MHz Tx escape clock frequency according to the documentation of the register from the i.MX8MM. Whether the other fields are applicable to the i.MX7D is unknown. While at it, rename the DPHY[BS]CTRL register names to DPHY_[BS]CTRL to match the datasheet. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d73228a730d877fbbd2f64bc4f6a8e8f9f8f7dcc Author: Laurent Pinchart Date: Mon Feb 15 05:27:36 2021 +0100 media: imx: imx7_mipi_csis: Fully initialize MIPI_CSIS_DPHYCTRL register When setting the CSIS parameters, write the MIPI_CSIS_DPHYCTRL register fully instead of modifying selected fields, as the register doesn't contain any reserved fields that need to be preserved. This simplifies initialization slightly, and ensures that the register value doesn't depend on its previous state (before a warm reboot for instance). Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6eac0eecd092c92f870e76af6c9a5c26fa647e55 Author: Laurent Pinchart Date: Mon Feb 15 05:27:35 2021 +0100 media: imx: imx7_mipi_csis: Turn register access macros into functions Make it easier to instrument register access (for instance with printk-based logging) by turning the macros into inline functions. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 74f815840e66428aa035914adcb6d220ced6b00d Author: Laurent Pinchart Date: Mon Mar 1 17:40:19 2021 +0100 media: imx: imx7_mipi_csis: Calculate Ths_settle from source lane rate The Ths_settle timing parameter depends solely on the lane data rate of the source. Calculate it at runtime instead of requiring it to be specified in the device tree. Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bef63005e3ad6d8be6f4fd0d7e6e6a83a7b4a351 Author: Laurent Pinchart Date: Mon Feb 15 05:27:33 2021 +0100 media: imx: imx7_mipi_csis: Move link setup check out of locked section Checking if the link setup operation is called for the sink or source pad doesn't require any locking. Move it out of the section protected by the mutex. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 57b94933ebb8b2d31516d269e4eb11eb2c2833fb Author: Laurent Pinchart Date: Mon Feb 15 05:27:32 2021 +0100 media: imx: imx7_mipi_csis: Inline mipi_csis_set_hsync_settle() The mipi_csis_set_hsync_settle() is small, called from a single place, and misnamed (HS stands for high speed, not horizontal sync). Inline it in its only caller, and refactor the HSSETTLE register field macros while at it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit aeceec5e924bc4a0af730ba637dcbc61f1ac8036 Author: Laurent Pinchart Date: Mon Feb 15 05:27:31 2021 +0100 media: imx: imx7_mipi_csis: Fix UYVY8 media bus format CSI-2 uses, as a convention, 1Xn media bus formats. Replace MEDIA_BUS_FMT_UYVY8_2X8 with MEDIA_BUS_FMT_UYVY8_1X16, and set the width value accordingly. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0445bc5324db4b457d81accf420013e6eca7778b Author: Laurent Pinchart Date: Mon Feb 15 05:27:30 2021 +0100 media: imx: imx7_mipi_csis: Drop 10-bit YUV support The data type specified for 10-bit YUV is the same as 8-bit YUV. This is wrong, and has thus clearly not been tested. Instead of fixing data type without being able to test it, drop it. It can be added back later when someone will have access to a 10-bit YUV source to this it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6e1de0062768ffaf780fd4a07f98723174653052 Author: Laurent Pinchart Date: Mon Feb 15 05:27:29 2021 +0100 media: imx: imx7_mipi_csis: Avoid double get of wrap clock The wrap clock is retrieved with the other clocks using devm_clk_bulk_get(), and retrieved independently with a specific devm_clk_get() call. The latter isn't needed, replace it with usage of the wrap clock from the bulk array. As the wrap clock is mandatory, simplify its usage further by removing conditionals. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 421ba86abfa6878dcf0095aeae4972fc78210bdd Author: Laurent Pinchart Date: Mon Feb 15 05:27:28 2021 +0100 media: imx: imx7_mipi_csis: Make source .s_power() optional The .s_power() subdev operation is optional, don't error out when the source doesn't implement it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dd4191054b92b08c585ab8ebaa68ac996398964d Author: Laurent Pinchart Date: Mon Feb 15 05:27:27 2021 +0100 media: imx: imx7_mipi_csis: Fix input size alignment The alignments given to the v4l_bound_align_image() are expressed in bytes, while the function expects them to be expressed as a power of two. Fix it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5c7cf0f3f006e270e04cafb638cdefb41101c2a5 Author: Laurent Pinchart Date: Mon Feb 15 05:27:26 2021 +0100 media: imx: imx7_mipi_csis: Acquire reset control without naming it The device has a single reset line, there's thus no need to name it explicitly when calling devm_reset_control_get_exclusive(). Drop the name in preparation for the removal of the reset-names property in the DT binding. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 43664fa55c59192d60b9ee14d3a9f607bbe4141c Author: Laurent Pinchart Date: Mon Feb 15 05:27:21 2021 +0100 media: imx: imx7_media-csi: Create immutable link to source device The CSI subdev has a single source, the input video mux. There's thus a single link between the source and the CSI, which can be made immutable and enabled to simplify configuration. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dbedd2f4901e8e86f78d30b7f586a1987d83a69e Author: Laurent Pinchart Date: Mon Feb 15 05:27:20 2021 +0100 media: v4l2-mc: Add link flags to v4l2_create_fwnode_links_to_pad() Add a flags argument to the v4l2_create_fwnode_links_to_pad() function to specify the link flags. This allows drivers to create immutable links for instance. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 42849cf0869fc8df5fa7c9cfdbd7dceb59d0f93a Author: Laurent Pinchart Date: Mon Feb 15 05:27:19 2021 +0100 media: imx: imx7_media-csi: Add support for additional Bayer patterns The CSI driver only supports the BGGR Bayer patterns currently. The hardware supports all patterns (the only pattern-dependent hardware operation is statistics calculation, as de-bayering isn't supported), enable them in the driver too. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ef08345c4cce56c0b1f0b04f2cf7cfb540aa5c4f Author: Laurent Pinchart Date: Mon Feb 15 05:27:18 2021 +0100 media: imx: imx7-media-csi: Don't enable SOF and EOF interrupts The SOF and EOF interrupts are not used. Don't enable them. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eacc813b31a0aa2a530ca034abf7029f954c8195 Author: Laurent Pinchart Date: Mon Feb 15 05:27:17 2021 +0100 media: imx: imx7-media-csi: Remove double reflash of DMA controller The DMA controller needs to be reflashed after being configured. There is however no need to do it twice, once in imx7_csi_configure() and once in imx7_csi_sw_reset(), called from imx7_csi_enable(). Remove the former. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 30122594cd5b4747d1572fafe0128f8975fa9837 Author: Laurent Pinchart Date: Mon Feb 15 05:27:16 2021 +0100 media: imx: imx7-media-csi: Don't double-enable the RxFIFO The RxFIFO is enabled by imx7_csi_dmareq_rff_enable() in both imx7_csi_init() and imx7_csi_enable(). Enabling it once is enough, remove the former. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 67c98cb1ac7c8e7a3e1babf5d67613ee99f32269 Author: Laurent Pinchart Date: Mon Feb 15 05:27:15 2021 +0100 media: imx: imx7-media-csi: Don't double-enable the CSI The CSI is enabled at the end of imx7_csi_sw_reset(), called from imx7_csi_enable(), as well as at the end of imx7_csi_enable(). The latter is enough, remove the former. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bc023b5a333af11752c46afa5969292fc974b7c3 Author: Laurent Pinchart Date: Mon Feb 15 05:27:14 2021 +0100 media: imx: imx7-media-csi: Simplify imx7_csi_rx_fifo_clear() There's no need to read the CSICR1 register before each write in imx7_csi_rx_fifo_clear(). Simplify the function. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b5cbab5e1a2f9a7b3fa096ee625d0da2bac13345 Author: Laurent Pinchart Date: Mon Feb 15 05:27:13 2021 +0100 media: imx: imx7-media-csi: Set RFF burst type in imx7_csi_configure() The RFF burst type is set in imx7_csi_dmareq_rff_enable(), which doesn't match the function name. Move it to imx7_csi_configure(). Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d525febdb7a1778de349ce78761667ad7053b5e5 Author: Laurent Pinchart Date: Mon Feb 15 05:27:12 2021 +0100 media: imx: imx7-media-csi: Clear all configurable CSICR18 fields When configuring the CSI in imx7_csi_configure(), the CSICR18 is set through a read-modify-write cycle to avoid affecting fields whose usage isn't clear. The function then sets fields depending on whether the input is interlaced or progressive, and from the parallel input or the CSI-2 receiver. Those bits are only set and never cleared. For instance, when switching from a CSI-2 source to the parallel input, the BIT_DATA_FROM_MIPI will stay set. Fix this issue by first clearing all the fields we need to configure. Add BIT_CSI_HW_ENABLE to the set of fields being cleared, as the CSI needs to start in the disabled state. This allows dropping the call to imx7_csi_hw_disable() in imx7_csi_sw_reset(). Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 49a72bb614dc49754d57ca114c2a08e4fecdb148 Author: Laurent Pinchart Date: Mon Feb 15 05:27:11 2021 +0100 media: imx: imx7-media-csi: Merge all config in imx7_csi_configure() Merge all the configuration steps (imx7_csi_buf_stride_set(), imx7_csi_deinterlace_enable(), imx7_csi_set_imagpara() and imx7_csi_init_default()) in the imx7_csi_configure() function. This simplifies the configuration procedure by removing most read-update-write cycles, and makes the code generally more readable. imx7_csi_init_default() is kept as it is also called from imx7_csi_deinit(). This will be addressed separately. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5f09f37a7db95f5b625c6ede05ea499e3c051b36 Author: Laurent Pinchart Date: Mon Feb 15 05:27:10 2021 +0100 media: imx: imx7-media-csi: Don't set the buffer stride when disabling There's no need to set the buffer stride to 0 when disabling the CSI. Remove the extraneous register write. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f7134e4514a80ecc78a89dd905d11dee0cc5c548 Author: Laurent Pinchart Date: Mon Feb 15 05:27:09 2021 +0100 media: imx: imx7-media-csi: Set the MIPI data type based on the bus code The MIPI CSI-2 data type depends solely on the media bus code on the sink pad. Deriving it from the pixel format is confusing. Simplify the code. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit df221c963985fb51fed62e9b2fe7a8c83e77316a Author: Laurent Pinchart Date: Mon Feb 15 05:27:08 2021 +0100 media: imx: imx7-media-csi: Merge hw_reset() with init_interface() The imx7_csi_hw_reset() and imx7_csi_init_interface() functions are always called together. Merge them. This allows simplifying the code by avoiding duplicated register writes. As the imx7_csi_hw_reset() function didn't perform a hardware reset by initialized the registers to reset defaults (in addition to resetting the frame counter), name the resulting function imx7_csi_init_default() as it sets default values. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f2635a9aa0c8214f96c68a86001240c611b5b378 Author: Laurent Pinchart Date: Mon Feb 15 05:27:07 2021 +0100 media: imx: imx7-media-csi: Merge streaming_start() with csi_enable() The imx7_csi_streaming_start() function just wraps imx7_csi_enable(). Call the latter directly. Similarly, merge imx7_csi_streaming_stop() and imx7_csi_disable() as they're both called from a single location only. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ff43ca9119786bdf686623d269713343f08ab48c Author: Laurent Pinchart Date: Mon Feb 15 05:27:06 2021 +0100 media: imx: imx7-media-csi: Move CSI configuration before source start There's no reason to delay the CSI configuration and the DMA setup after starting the source. Move it before, simplifying error handling at stream start. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b0f4a7f77c1dfed248db12f7ca0e5374c116d39f Author: Laurent Pinchart Date: Mon Feb 15 05:27:05 2021 +0100 media: imx: imx7-media-csi: Split imx7_csi_dma_stop() The imx7_csi_dma_stop() function performs two operations, it waits for DMA to be complete, and then cleans up and frees buffers. Split the second part out to a new imx7_csi_dma_cleanup() function to match imx7_csi_dma_setup(), in preparation for a stream start refactoring. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit be1158f0f644bca4083d9255053f9bd4d5129dc4 Author: Laurent Pinchart Date: Mon Feb 15 05:27:04 2021 +0100 media: imx: imx7-media-csi: Rename imx7_csi_dma_start() to *_setup() The imx7_csi_dma_start() doesn't start DMA. Rename it to imx7_csi_dma_setup() to avoid confusion. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3c1dbc71c6465687af2211d60673d4b52c082fd0 Author: Laurent Pinchart Date: Mon Feb 15 05:27:03 2021 +0100 media: imx: imx7-media-csi: Don't lock access to is_csi2 The is_csi2 field can't be accessed concurrently by imx7_csi_pad_link_validate() and imx7_csi_configure(), as the latter is called from imx7_csi_s_stream(), which is called after link validation. Drop the lock. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c6f02291d114b76b081930ba0e0bacd655ad4128 Author: Laurent Pinchart Date: Mon Feb 15 05:27:02 2021 +0100 media: imx: imx7-media-csi: Fix source type identification The code in imx7_csi_pad_link_validate() that checks the type of the source incorrectly handles devices that have no parallel input. In that case, the source entity of the CSI is the CSI-2 receiver, not the video mux, and the driver will proceed to check the type of the source of the CSI-2 receiver. Make the code more explicit to fix this, by handling the three cases (parallel input only, CSI-2 receiver only, and video mux) separately. Note that the driver will not correctly handle the case where only a parallel input is present, and the external entity connected to the parallel input reports a MEDIA_ENT_F_VID_IF_BRIDGE or MEDIA_ENT_F_VID_MUX function. This was broken already, and should be fixed separately. Fixes: f5ffb81f5137 ("media: imx7: csi: Fix pad link validation") Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 66f469c1b4843b4797c1aba2955c44abc58bdc54 Author: Laurent Pinchart Date: Mon Feb 15 05:27:01 2021 +0100 media: imx: imx7-media-csi: Validate capture format in .link_validate() Move capture format validation from imx7_csi_configure() to .link_validate(). This simplifies error handling at stream on time, as imx7_csi_configure) now becomes a void function. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit db04bef6f1d2e8f21400ae954d6ce3ddf972df2e Author: Laurent Pinchart Date: Mon Feb 15 05:27:00 2021 +0100 media: imx: imx7-media-csi: Reorganize code in sections To prepare for a major rework of the hardware initialization, and make the code easier to read, reorder functions to group them in sections. No functional change is included. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 37b48094169a917ae2436bae4459db060a3b2e9d Author: Laurent Pinchart Date: Mon Feb 15 05:26:59 2021 +0100 media: imx: imx7-media-csi: Tidy up register fields macros Describe multi-bit fields with parameterized macros where applicable, and use them to replace manual shifts and hardcoded numerical values. Add macros for the CSICR2 fields used in the driver. While at it, align the indentation for all macros, and use lower-case hex numbers. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9206d3b48b6ab4b5c2dfc79734a2f97d7b70b963 Author: Laurent Pinchart Date: Mon Feb 15 05:26:58 2021 +0100 media: imx: imx7-media-csi: Replace CSICR*_RESET_VAL with values The CSICR*_RESET_VAL macros only obfuscate code. Use their value directly, replacing the numerical value with the macros that describe register bits. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 61c699bfb013a0f3e4378a0bf3c18450d7ef5b70 Author: Laurent Pinchart Date: Mon Feb 15 05:26:57 2021 +0100 media: imx: imx7-media-csi: Create immutable link to capture device The i.MX7 camera pipeline is simple, with the CSI connected directly to the capture device without any other option. There's thus no need to allow link configurable by userspace. Make it immutable. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit fbd36bceb8160968e5edf796c449e962c6f311a5 Author: Laurent Pinchart Date: Mon Feb 15 05:26:56 2021 +0100 media: imx: imx7-media-csi: Move (de)init from link setup to .s_stream() There's no need to initialize the CSI every time a link is enabled (and de-initialize it when a link is disabled). Move initialization to .s_stream() instead. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit dbeecb112cb462e680a4af493ef256fa27e5997a Author: Laurent Pinchart Date: Mon Feb 15 05:26:55 2021 +0100 media: imx: imx7-media-csi: Remove control handler The control handler isn't used, drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ab7d9fed90561257bc98f1593a4c337447a8efed Author: Laurent Pinchart Date: Mon Feb 15 05:26:54 2021 +0100 media: imx: capture: Support creating immutable link to capture device When the subdevice connected to the capture device has a single possible sink, there's no point in making the link mutable. Support creating immutable links. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c24ead998ed13de1cb90d6bbb855cf52abd226ec Author: Laurent Pinchart Date: Mon Feb 15 05:26:53 2021 +0100 media: imx: imx7-media-csi: Disable legacy video node API Support for the MC-centric API has been tested on the i.MX7. Enable it for that platform. i.MX6 should be converted next. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a1060d0789b1790f21c1649172aaca56ed6b4f0e Author: Laurent Pinchart Date: Mon Feb 15 05:26:52 2021 +0100 media: imx: capture: Expose V4L2_CAP_IO_MC for the MC-centric API Report to userspace that the MC-centric API is MC-centric by exposing the V4L2_CAP_IO_MC. This requires adding support for mbus code filtering in format enumeration, as required by V4L2_CAP_IO_MC. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b41e932604257d162f3f9223d8659c755b5a66a8 Author: Laurent Pinchart Date: Mon Feb 15 05:26:51 2021 +0100 media: imx: capture: Decouple video node from source with MC-centric API When operating in MC-centric mode, the behaviour of video nodes shall not be influenced by the active configuration of the source subdev. Add a set of ioctl handlers that implement this mode, and select them when support for the legacy API is not requested. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5e14568ccbdf62955b30459f78f96195be37bf20 Author: Laurent Pinchart Date: Mon Feb 15 05:26:50 2021 +0100 media: imx: capture: Simplify __capture_legacy_try_fmt() The __capture_legacy_try_fmt() function returns two values through pointer arguments. One is a compose rectangle, which duplicates informationr returned through the subdev format argument, and can thus be removed. The other is the imx_media_pixfmt, which can be returned by value instead. Simplify the implementation of __capture_legacy_try_fmt() by dropping the retcc and compose arguments, and returning the imx_media_pixfmt by value. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a9512b261afd1aec188d3b3a760b69115e0d1209 Author: Laurent Pinchart Date: Mon Feb 15 05:26:49 2021 +0100 media: imx: capture: Simplify capture_validate_fmt() implementation capture_validate_fmt() delegates the media bus format to pixel format conversion to __capture_legacy_try_fmt(). It turns out that this can be simplified quite a lot: - The format lookup from media bus code can be performed by the recently added capture_find_format() function instead of receiving the information from a side effect of __capture_legacy_try_fmt(). - The validation of the pixel format size isn't needed, as they duplicate the validation of the compose rectangle. The pixel format size is directly derived from the size of the incoming stream, which is stored in the compose rectangle. If the compose rectangle is valid, the pixel format size will be valid too. By removing the validation of the pixel format size and using capture_find_format() to lookup the format, we can stop using __capture_legacy_try_fmt() and simplify capture_validate_fmt(). Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 7edcce6cc082f5b164382e0ca3291ade5c164fdb Author: Laurent Pinchart Date: Mon Feb 15 05:26:48 2021 +0100 media: imx: capture: Extract format lookup from __capture_legacy_try_fmt Extract the format lookup code from __capture_legacy_try_fmt() to a separate function, it will be reused when validating the video node format at stream start time. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cc271b6754691af74d710b761eaf027e3743e243 Author: Laurent Pinchart Date: Mon Feb 15 05:26:47 2021 +0100 media: imx: capture: Return -EPIPE from __capture_legacy_try_fmt() The correct return code to report an invalid pipeline configuration is -EPIPE. Return it instead of -EINVAL from __capture_legacy_try_fmt() when the capture format doesn't match the media bus format of the connected subdev. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6cc209445c194b1e45bccdd5d0c22b2c38e315cc Author: Laurent Pinchart Date: Mon Feb 15 05:26:46 2021 +0100 media: imx: capture: Pass v4l2_pix_format to __capture_legacy_try_fmt() The __capture_legacy_try_fmt() function only needs the v4l2_pix_format embedded in the v4l2_format argument it receives. Pass it the v4l2_pix_format directly, allowing on caller to allocate a smaller structure on the stack. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 96fe421e8db5202b48c881d29c6379b977730d42 Author: Laurent Pinchart Date: Mon Feb 15 05:26:45 2021 +0100 media: imx: capture: Remove unneeded variable in __capture_legacy_try_fmt The __capture_legacy_try_fmt() function doesn't need two imx_media_pixfmt pointer variables. Remove one of them. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 49e1b5d6492b6b71a4dd3e20d6c2f84be91f830f Author: Laurent Pinchart Date: Mon Feb 15 05:26:44 2021 +0100 media: imx: capture: Add a mechanism to disable control inheritance Add a parameter to the imx_media_capture_device_init() function to select between the legacy and MC-centric API. When selecting the MC-centric API, the video node doesn't inherit controls from subdevs anymore. All callers are updated to use the legacy API for now, preserving the existing behaviour. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3a8548247830824ca6332f05af2a9bef0ff6a494 Author: Laurent Pinchart Date: Mon Feb 15 05:26:43 2021 +0100 media: imx: capture: Rename ioctl operations with legacy prefix The i.MX media drivers implement a legacy video node API, where the format of the video node is influenced by the active format of the connected subdev (both for enumeration and for the get, set and try format ioctls), and where controls exposed by the subdevs in the pipeline are inherited by the video node. At the same time, the drivers implement the media controller API and expose subdev video nodes to userspace. Those two modes of operation are incompatible and should not be exposed together. Furthermore, the legacy API gets in the way of proper enumeration of pixel formats on the video node, as it prevents compliance with the V4L2 specification. As a first step towards fixing this, rename all V4L2 video node ioctl handlers with a legacy prefix. This will allow implementing a new set of ioctls in parallel and gradually switching drivers. Add a task to the TODO file for the removal of the legacy API. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 300852e3cc13c52a5ffda734701f588b5d94c491 Author: Laurent Pinchart Date: Mon Feb 15 05:26:42 2021 +0100 media: imx: capture: Rename querycap handler to capture_querycap For consistency with all the other ioctl handlers, rename vidioc_querycap() to capture_querycap(). Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Steve Longerbeam Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 024b2f9cd225d152ddaeeaa67d410d565e4bcbe4 Author: Laurent Pinchart Date: Mon Feb 15 05:26:41 2021 +0100 media: imx: capture: Move default format init to a separate function To prepare for more complex default format initialization and keep imx_media_capture_device_register() simple, extract the format initialization code to a separate function. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0d966feb6bd087fd8392cee0ef76475714c162a4 Author: Laurent Pinchart Date: Mon Feb 15 05:26:40 2021 +0100 media: imx: capture: Store v4l2_pix_format in imx_media_video_dev The imx_media_video_dev structure stores the active format on the video node in an instance of v4l2_format. This wastes memory when all we need is the information contained in the smaller v4l2_pix_format sub-structure. Replace v4l2_format by v4l2_pix_format to save memory. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 1f4e7241704baa2f9c52627439a32a92625e1f06 Author: Laurent Pinchart Date: Mon Feb 15 05:26:39 2021 +0100 media: imx: capture: Register the video device after completing init When the video device is registered, it can get used by userspace immediately. Its initialization must thus be fully complete. Ensure this by registering the video device after all initialization steps. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8e574216979ec74283262938f1708d40152cc3a6 Author: Laurent Pinchart Date: Mon Feb 15 05:26:38 2021 +0100 media: imx: capture: Initialize video_device programmatically Overwriting the whole video_device isn't future-proof as it would overwrite any field initialized by video_device_alloc(). Furthermore, the current implementation modifies the global template video_device as if it were a per-instance structure, which is bad practice. To fix all this, initialize the video device programmatically in imx_media_capture_device_init(). Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b517f562e0389c0653d1ddd1819bf95d0fcc4ff6 Author: Laurent Pinchart Date: Mon Feb 15 05:26:37 2021 +0100 media: imx: capture: Move queue and ctrl handler init to init function Move the initialization of the vb2 queue and the control handler to the imx_media_capture_device_init() function. There's no need to delay them until the registration time. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cf56ac08795a923cb2b30b0479e0a6a020dd7d72 Author: Laurent Pinchart Date: Mon Feb 15 05:26:36 2021 +0100 media: imx: capture: Remove capture_priv stop field The stop field in the capture_priv structure is only set, never read. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b3a300996cbed69feccdf896f94911d08643bfe8 Author: Laurent Pinchart Date: Mon Feb 15 05:26:35 2021 +0100 media: imx: capture: Clean up capture_priv structure Document all the fields of the capture_priv structure and group them by purpose. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e2c073c7d452118f789f0a4618fa5089e1824f1f Author: Laurent Pinchart Date: Mon Feb 15 05:26:34 2021 +0100 media: imx: capture: Handle errors from v4l2_fh_open() If the call to v4l2_fh_open() fails, return the error code instead of proceeding normally as if nothing happened. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5722a1742606665fe81b1b277dbdfe5b0f698194 Author: Laurent Pinchart Date: Mon Feb 15 05:26:33 2021 +0100 media: imx: capture: Remove forward declaration of capture_qops The forward declaration of capture_qops isn't needed, remove it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6cf8b135a398791edcfcb759230c347359299dde Author: Laurent Pinchart Date: Mon Feb 15 05:26:32 2021 +0100 media: imx: capture: Use device name to construct bus_info The v4l2_capability bus_info field is meant to locate the device in the system. Using a subdev name isn't a good fit, the device name is a much better option. Use it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit d415448a836bd3ef0635391733ff778c921dad88 Author: Laurent Pinchart Date: Mon Feb 15 05:26:31 2021 +0100 media: imx: capture: Use dev_* instead of v4l2_* to log messages The imx-media-capture helpers operate a video device node, but abuse the v4l2_* subdev print functions to log messages. We have a struct device pointer available, use it instead with the dev_* functions. This reduces dependencies from imx-media-capture to the connected subdev. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 82bedfbf663ae9380d8386c532edae69b8f359f5 Author: Laurent Pinchart Date: Mon Feb 15 05:26:30 2021 +0100 media: imx: utils: Add ability to filter pixel formats by mbus code Add a media bus code argument to the imx_media_enum_pixel_formats(). If set to a non-zero value, the function will only consider pixel formats that match the given media bus code. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0ab05d7f7d24c893ee40632cfa0deda5153f6762 Author: Laurent Pinchart Date: Mon Feb 15 05:26:29 2021 +0100 media: imx: Set default sizes through macros in all drivers All drivers use 640x480 as the default size, but they all hardcode those values. Create two global macros named IMX_MEDIA_DEF_PIX_WIDTH and IMX_MEDIA_DEF_PIX_HEIGHT to store the default size, and use them through the code. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 772cb7f2cfd12c165f842ded88285ef23be11f2d Author: Laurent Pinchart Date: Mon Feb 15 05:26:28 2021 +0100 media: imx: Compile imx6-media-objs only for CONFIG_VIDEO_IMX_CSI imx6-media-objs contains a set of objects that are specific to the i.MX6 IPU-based media subsystem. They're not needed for the i.MX7 CSI. Only compile them if CONFIG_VIDEO_IMX_CSI is selected. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Ezequiel Garcia Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 34632e762325529f35dfd03878bb449ad917248a Author: Laurent Pinchart Date: Mon Feb 15 05:26:27 2021 +0100 media: imx: Drop manual dependency on VIDEO_IMX_MEDIA The VIDEO_IMX_CSI and VIDEO_IMX7_CSI symbols are defined in a section guarded by VIDEO_IMX_MEDIA. There's no need to duplicate that with a "depends on" statement. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8ab63c4cc3bd380c09b0cbe2eb18903ff65563eb Author: Laurent Pinchart Date: Mon Feb 15 05:26:26 2021 +0100 media: imx: Move dependency on VIDEO_DEV to common Kconfig symbol All the i.MX staging media drivers depend on VIDEO_DEV. Move the dependency to the common VIDEO_IMX_MEDIA symbol to avoid repeating it. While at it, sort the dependencies and selections alphabetically. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e6668bbaa5f96eb999cd37fcc95792f6609265b4 Author: Laurent Pinchart Date: Mon Feb 15 05:26:25 2021 +0100 media: imx: Drop dependency on I2C The i.MX staging media drivers don't depend on I2C. Drop the dependency from Kconfig. Signed-off-by: Laurent Pinchart Reviewed-by: Rui Miguel Silva Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit efb8225ce66516eabd8882e1682d5e370bdf862e Author: Christophe JAILLET Date: Sat Jan 30 07:32:00 2021 +0100 media: ngene: 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 in all cases, it is called from a probe function and no lock is taken in the between. The call chain is: ngene_probe (probe function, used in ngene-cards.c) --> ngene_get_buffers --> AllocCommonBuffers (call dma_alloc_coherent) --> create_ring_buffer (call dma_alloc_coherent) --> AllocateRingBuffers (call dma_alloc_coherent) @@ @@ - 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: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 225d0dbdb2b1e7beae181aec25f4aca2e7a82332 Author: Colin Ian King Date: Thu Jan 28 17:59:11 2021 +0100 media: drxj: remove redundant assignments to variable image_to_select The variable image_to_select 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. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit eea62d6d471a08fe1a18c6c4ddccfde24a005beb Author: Wolfram Sang Date: Wed Jan 27 11:33:57 2021 +0100 media: i2c: adv7511: remove open coded version of SMBus block read The open coded version differs from the one in the core in one way: the buffer will be always copied back, even when the transfer failed. Be more robust: use the block read from the I2C core and propagate a potential errno further to the sanity checks. Signed-off-by: Wolfram Sang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cb1318fd80c37085e63a79a1fe96fd82399d9469 Author: Brad Love Date: Tue Jan 26 05:52:06 2021 +0100 media: cx23885: Fix various Hauppauge device analog capture inputs Reports indicated S-Video capture did not work on HVR1265_K4, so all devices on hand were audited and corrected to become fully functional. ImpactVCB-e - Remove extraneous composite inputs - Fix S-Video inputs HVR5525 - Add routing and config for composite capture - Add routing and config for S-Video capture - Add routing for audio on both composite/S-Video HVR1265_K4 - Remove non-existent composite capture - Add routing and config for S-Video capture Signed-off-by: Brad Love Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5f864cfbf59bfed2057bd214ce7fbf6ad420d54b Author: Brad Love Date: Tue Jan 26 05:52:05 2021 +0100 media: cx23885: add more quirks for reset DMA on some AMD IOMMU The folowing AMD IOMMU are affected by the RiSC engine stall, requiring a reset to maintain continual operation. After being added to the broken_dev_id list the systems are functional long term. 0x1481 is the PCI ID for the IOMMU found on Starship/Matisse 0x1419 is the PCI ID for the IOMMU found on 15h (Models 10h-1fh) family 0x5a23 is the PCI ID for the IOMMU found on RD890S/RD990 Signed-off-by: Brad Love Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6f097ddb8072323b688f8fbd6729e70fcc26ff5c Author: Jonathan Neuschäfer Date: Fri Jan 1 17:02:11 2021 +0100 media: dvbdev: Switch to new kerneldoc syntax for named variable macro argument The syntax without dots is available since commit 43756e347f21 ("scripts/kernel-doc: Add support for named variable macro arguments"). The same HTML output is produced with and without this patch. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3536169f8531c2c5b153921dc7d1ac9fd570cda7 Author: Jae Hyun Yoo Date: Mon Dec 21 23:32:25 2020 +0100 media: aspeed: fix clock handling logic Video engine uses eclk and vclk for its clock sources and its reset control is coupled with eclk so the current clock enabling sequence works like below. Enable eclk De-assert Video Engine reset 10ms delay Enable vclk It introduces improper reset on the Video Engine hardware and eventually the hardware generates unexpected DMA memory transfers that can corrupt memory region in random and sporadic patterns. This issue is observed very rarely on some specific AST2500 SoCs but it causes a critical kernel panic with making a various shape of signature so it's extremely hard to debug. Moreover, the issue is observed even when the video engine is not actively used because udevd turns on the video engine hardware for a short time to make a query in every boot. To fix this issue, this commit changes the clock handling logic to make the reset de-assertion triggered after enabling both eclk and vclk. Also, it adds clk_unprepare call for a case when probe fails. clk: ast2600: fix reset settings for eclk and vclk Video engine reset setting should be coupled with eclk to match it with the setting for previous Aspeed SoCs which is defined in clk-aspeed.c since all Aspeed SoCs are sharing a single video engine driver. Also, reset bit 6 is defined as 'Video Engine' reset in datasheet so it should be de-asserted when eclk is enabled. This commit fixes the setting. Fixes: d2b4387f3bdf ("media: platform: Add Aspeed Video Engine driver") Signed-off-by: Jae Hyun Yoo Reviewed-by: Joel Stanley Reviewed-by: Eddie James Fixes: d3d04f6c330a ("clk: Add support for AST2600 SoC") Reviewed-by: Joel Stanley Acked-by: Stephen Boyd Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit cbe8373ca7e7cbb4b263b6bf222ccc19f5e119d2 Author: Dafna Hirschfeld Date: Wed Dec 9 17:15:10 2020 +0100 media: rkisp1: rsz: crash fix when setting src format When setting the source media bus code in the resizer, we first check that the current media bus code in the source is yuv encoded format. This is done by retrieving the data from the formats list of the isp entity. This cause a crash when the media bus code on the source is YUYV8_1_5X8 which is not supported by the isp entity. Instead we should test the sink format of the resizer which is guaranteed to be supported by the isp entity. Fixes: 251b6eebb6c49 ("media: staging: rkisp1: rsz: Add support to more YUV encoded mbus codes on src pad") Signed-off-by: Dafna Hirschfeld Acked-by: Helen Koike Tested-by: Sebastian Fricke Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit ab954c4325a63d4ef55ff86592df65357b311ec9 Author: Tom Rix Date: Fri Nov 27 17:38:36 2020 +0100 media: b2c2: remove trailing semicolon in macro definition The macro use will already have a semicolon. Signed-off-by: Tom Rix Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8938c48fa25b491842ece9eb38f0bea0fcbaca44 Author: Yang Yingliang Date: Tue Nov 17 03:50:41 2020 +0100 media: omap4iss: return error code when omap4iss_get() failed If omap4iss_get() failed, it need return error code in iss_probe(). Fixes: 59f0ad807681 ("[media] v4l: omap4iss: Add support for OMAP4...") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 73605de01f57c0e4dceeaa5245632bcf6ebde947 Author: Davidlohr Bueso Date: Sun Nov 1 20:54:24 2020 +0100 media: media/siano: kill pointless kmutex definitions Use the mutex api instead of renaming the calls for this driver. Signed-off-by: Davidlohr Bueso Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit b5fe86307e42e3a62c58c6b6a54c8db55b2632ae Author: Qinglang Miao Date: Mon Sep 21 15:10:37 2020 +0200 media: ngene: simplify the return expression of eeprom_write_ushort() Simplify the return expression. Signed-off-by: Qinglang Miao Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 3101010f7d661957989fd37e457501563fe348dc Author: Liu Shixin Date: Mon Sep 21 10:24:38 2020 +0200 media: anysee: simplify the return expression of anysee_ci_* function Simplify the return expression. Signed-off-by: Liu Shixin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit e56429b09d5e0802b86f84ec7c24025886c9f88b Author: Tasos Sahanidis Date: Wed Mar 3 19:52:53 2021 +0100 media: saa7146: use sg_dma_len when building pgtable The new AMD IOMMU DMA implementation concatenates sglist entries under certain conditions, and because saa7146 accessed the length member directly, it did not support this scenario. This fixes IO_PAGE_FAULTs by using the sg_dma_len macro. Fixes: be62dbf554c5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api") Signed-off-by: Tasos Sahanidis Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4e1cb753c04d74e06d7ca826ea0bcb02526af03e Author: Tasos Sahanidis Date: Wed Mar 3 19:30:18 2021 +0100 media: saa7134: use sg_dma_len when building pgtable The new AMD IOMMU DMA implementation concatenates sglist entries under certain conditions, and because saa7134 accessed the length member directly, it did not support this scenario. This fixes IO_PAGE_FAULTs and choppy DMA audio by using the sg_dma_len macro. Fixes: be62dbf554c5 ("iommu/amd: Convert AMD iommu driver to the dma-iommu api") Signed-off-by: Tasos Sahanidis Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit a4184b4f99019f5d91b3a1bb1905af986e002aa4 Author: Hans Verkuil Date: Wed Mar 3 13:55:10 2021 +0100 media: fix incorrect kernel doc usages This patch fixes the following trivial warnings w.r.t. kernel-doc usage: drivers/media/common/videobuf2/frame_vector.c:38: warning: Excess function parameter 'gup_flags' description in 'get_vaddr_frames' drivers/media/dvb-core/dvb_ca_en50221.c:193: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1014: warning: expecting prototype for Wake up the DVB CA thread(). Prototype was for dvb_ca_en50221_thread_wakeup() instead drivers/media/dvb-core/dvb_ca_en50221.c:1023: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1081: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1112: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1327: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1411: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1426: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1582: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1693: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1743: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1772: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1830: warning: wrong kernel-doc identifier on line: drivers/media/dvb-core/dvb_ca_en50221.c:1922: warning: wrong kernel-doc identifier on line: drivers/media/rc/img-ir/img-ir-hw.c:628: warning: expecting prototype for img_ir_decoder_compatable(). Prototype was for img_ir_decoder_compatible() instead drivers/media/v4l2-core/v4l2-jpeg.c:461: warning: expecting prototype for jpeg_parse_header(). Prototype was for v4l2_jpeg_parse_header() instead drivers/media/platform/vsp1/vsp1_dl.c:166: warning: expecting prototype for struct vsp1_cmd_pool. Prototype was for struct vsp1_dl_cmd_pool instead drivers/media/platform/mtk-vpu/mtk_vpu.c:28: warning: expecting prototype for is a tiny processor controlling video hardware(). Prototype was for INIT_TIMEOUT_MS() instead drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c:73: warning: expecting prototype for struct vp9_fb_info. Prototype was for struct vp9_ref_buf instead drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c:85: warning: expecting prototype for struct vp9_fb_info. Prototype was for struct vp9_sf_ref_fb instead drivers/media/tuners/mt2063.c:1404: warning: expecting prototype for fLO_FractionalTerm(). Prototype was for MT2063_fLO_FractionalTerm() instead drivers/media/tuners/mt2063.c:1465: warning: expecting prototype for CalcLO2Mult(). Prototype was for MT2063_CalcLO2Mult() instead drivers/media/usb/pwc/pwc-dec23.c:640: warning: wrong kernel-doc identifier on line: drivers/media/platform/exynos4-is/media-dev.c:820: warning: expecting prototype for __fimc_md_create_fimc_links(). Prototype was for __fimc_md_create_fimc_sink_links() instead drivers/media/i2c/s5k6aa.c:426: warning: expecting prototype for s5k6aa_configure_pixel_clock(). Prototype was for s5k6aa_configure_pixel_clocks() instead drivers/media/i2c/imx274.c:700: warning: wrong kernel-doc identifier on line: drivers/media/i2c/imx274.c:735: warning: wrong kernel-doc identifier on line: drivers/media/i2c/imx274.c:983: warning: wrong kernel-doc identifier on line: Most are missing or mistyped function names. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 5cde22fcc7271812a7944c47b40100df15908358 Author: Colin Ian King Date: Thu Feb 25 16:43:27 2021 +0100 media: vivid: fix assignment of dev->fbuf_out_flags Currently the chroma_flags and alpha_flags are being zero'd with a bit-wise mask and the following statement should be bit-wise or'ing in the new flag bits but instead is making a direct assignment. Fix this by using the |= operator rather than an assignment. Addresses-Coverity: ("Unused value") Fixes: ef834f7836ec ("[media] vivid: add the video capture and output parts") Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 29a42595c8dc4235630d39c8b8e88ed3c594c23f Author: Tomi Valkeinen Date: Tue Feb 16 07:44:55 2021 +0100 media: v4l2-subdev.rst: typo fix Fix a typo in the text. Signed-off-by: Tomi Valkeinen Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6e47269cb3f5317949efc74140df48c8c176a9ab Author: Jiapeng Chong Date: Mon Feb 8 11:04:46 2021 +0100 media: ti-vpe: Simplify bool comparison Fix the following coccicheck warning: ./drivers/media/platform/ti-vpe/vpdma.c:946:5-26: WARNING: Comparison to bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 71bb1b99a24f9653bdccaad2c25d007ba524074a Author: Johan Fjeldtvedt Date: Tue Mar 2 12:50:56 2021 +0100 media: cec-notifier: also search for HDMI devices on I2C Currently the cec_notifier_parse_hdmi_phandle function can only be used if the HDMI device associated with the CEC device is a platform device. Extend the function to cover I2C devices as well, as there do exist some I2C HDMI devices which don't handle CEC internally and need an external CEC adapter. [hverkuil: add missing linux/i2c.h header] [hverkuil: only attempt to find the i2c device if CONFIG_I2C is set] Signed-off-by: Johan Fjeldtvedt Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 9c39be40c0155c43343f53e3a439290c0fec5542 Author: Pavel Skripkin Date: Mon Mar 1 21:38:26 2021 +0100 media: drivers/media/usb: fix memory leak in zr364xx_probe syzbot reported memory leak in zr364xx_probe()[1]. The problem was in invalid error handling order. All error conditions rigth after v4l2_ctrl_handler_init() must call v4l2_ctrl_handler_free(). Reported-by: syzbot+efe9aefc31ae1e6f7675@syzkaller.appspotmail.com Signed-off-by: Pavel Skripkin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 18a4ca76ada464b3240f194800d41ea21fbb4229 Author: Dafna Hirschfeld Date: Mon Mar 1 18:18:34 2021 +0100 media: rkisp1: params: remove extra 'if' conditions There is a repeating code pattern: if (a || b) { if (a) ... if (b) ... } In this pattern, the first 'if' is redundant. The code can be replaced with: if (a) ... if (b) ... Signed-off-by: Dafna Hirschfeld Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 4fade8329ab2be2b902fce8db3625fd12234b873 Author: Arnd Bergmann Date: Fri Feb 26 15:07:14 2021 +0100 media: mtk: fix mtk-smi dependency The mtk-smi driver can now be built as a loadable module, but this leads to a build time regression when the drivers that depend on it are built-in: aarch64-linux-ld: drivers/media/platform/mtk-mdp/mtk_mdp_comp.o: in function `mtk_mdp_comp_clock_on': mtk_mdp_comp.c:(.text.mtk_mdp_comp_clock_on+0x54): undefined reference to `mtk_smi_larb_get' aarch64-linux-ld: drivers/media/platform/mtk-mdp/mtk_mdp_comp.o: in function `mtk_mdp_comp_clock_off': mtk_mdp_comp.c:(.text.mtk_mdp_comp_clock_off+0x12c): undefined reference to `mtk_smi_larb_put' Add a dependency on the interface, but keep allowing compile-testing without that driver, as it was originally intended. Fixes: 50fc8d9232cd ("memory: mtk-smi: Allow building as module") Signed-off-by: Arnd Bergmann Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 24df8b74c8b2fb42c49ffe8585562da0c96446ff Author: Julian Braha Date: Thu Feb 25 09:06:58 2021 +0100 media: drivers: media: pci: sta2x11: fix Kconfig dependency on GPIOLIB When STA2X11_VIP is enabled, and GPIOLIB is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for VIDEO_ADV7180 Depends on [n]: MEDIA_SUPPORT [=y] && GPIOLIB [=n] && VIDEO_V4L2 [=y] && I2C [=y] Selected by [y]: - STA2X11_VIP [=y] && MEDIA_SUPPORT [=y] && MEDIA_PCI_SUPPORT [=y] && MEDIA_CAMERA_SUPPORT [=y] && PCI [=y] && VIDEO_V4L2 [=y] && VIRT_TO_BUS [=y] && I2C [=y] && (STA2X11 [=n] || COMPILE_TEST [=y]) && MEDIA_SUBDRV_AUTOSELECT [=y] This is because STA2X11_VIP selects VIDEO_ADV7180 without selecting or depending on GPIOLIB, despite VIDEO_ADV7180 depending on GPIOLIB. Signed-off-by: Julian Braha Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit c3bf67e80532829b886795a743c86f89b18e51d3 Author: dingsenjie Date: Tue Feb 23 09:36:54 2021 +0100 media: media/usb:Remove superfluous "breaks" in the ttusb_dec.c Remove superfluous "breaks", as there is a "return" before them. Signed-off-by: dingsenjie Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 8bca663a0aee0d86aa04808a7325ea80c576d99c Author: dingsenjie Date: Tue Feb 23 09:20:31 2021 +0100 media: media/usb:Remove superfluous "breaks" Remove superfluous "breaks", as there is a "return" before them. Signed-off-by: dingsenjie Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit f0b8bbd367bbd3dd32c28ddcb98801bd94461a5f Author: zuoqilin Date: Mon Feb 22 14:13:17 2021 +0100 media: media/i2c: remove unneeded variable: "ret" remove unneeded variable: "ret" Signed-off-by: zuoqilin Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0aa3bdca3850b73623b377aa1da54c29979259a6 Author: Yang Li Date: Mon Feb 22 09:08:01 2021 +0100 media: solo6x10: Switch to using the new API kobj_to_dev() fixed the following coccicheck: ./drivers/media/pci/solo6x10/solo6x10-core.c:371:60-61: WARNING opportunity for kobj_to_dev() Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 2f90857781bb6e73666fdec2293b7f81cd2a0805 Author: Vladimir Lypak Date: Wed Feb 17 23:11:34 2021 +0100 media: qcom: camss: Fix overflows in clock rate calculations Because of u32 type being used to store pixel clock rate, expression used to calculate pipeline clocks (pixel_clock * bpp) produces wrong value due to integer overflow. This patch changes data type used to store, pass and retrieve pixel_clock from u32 to u64 to make this mistake less likely to be repeated in the future. Signed-off-by: Vladimir Lypak Acked-by: Robert Foss Signed-off-by: Andrey Konovalov Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 78c2cc28df4a1f6f971d455da9b70d5540bd3de8 Author: Andrey Konovalov Date: Wed Feb 17 23:11:33 2021 +0100 media: camss: use v4l2_get_link_freq() to calculate the relevant clocks There are places in the camss driver where camss_get_pixel_clock() is called to get the pixel rate (using V4L2_CID_PIXEL_RATE control) and to calculate the link frequency from it. There is a case when this would not work: when V4L2_CID_PIXEL_RATE gets the rate at which the pixels are read (sampled) from the sensor's pixel array, and this rate is different from the pixel transmission rate over the CSI link, the link frequency value can't be calculated from the pixel rate. One needs to use V4L2_CID_LINK_FREQ to get the link frequency in this case. Replace such calls to camss_get_pixel_clock() with calls to a wrapper around v4l2_get_link_freq(). v4l2_get_link_freq() tries V4L2_CID_LINK_FREQ first, and if it is not implemented by the camera sensor driver, falls back to V4L2_CID_PIXEL_RATE to calculate the link frequency value from. Calls to camss_get_pixel_clock() from vfe_[check,set]_clock_rates() are left intact as it looks like this VFE clock does depend on the rate the pixel samples comes out of the camera sensor, not on the frequency at which the link between the sensor and the CSI receiver operates. Signed-off-by: Andrey Konovalov Acked-by: Robert Foss Reviewed-by: Jacopo Mondi Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 67012d97df931b1be24efa0cac06f20d5be062eb Author: Andrey Konovalov Date: Thu Feb 18 18:16:40 2021 +0100 media: v4l: common: v4l2_get_link_freq: add printing a warning Print a warning if V4L2_CID_LINK_FREQ control is not implemented. Signed-off-by: Andrey Konovalov Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 937da4fd2ca125a6024ef86816e07590d657ed90 Author: Bhaskar Chowdhury Date: Sat Feb 13 16:13:20 2021 +0100 media: drivers: media: pci: cx18: Spelling fix of minimze to minimize in the file cx18-av-audio.c s/minimze/minimize/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 611ce3395e34cc20cb07c507314d77c1bb4a06ca Author: Bhaskar Chowdhury Date: Sat Feb 13 16:08:05 2021 +0100 media: drivers: media: pci: cx18: Couple of spell fixes in the file cx18-av-core.c s/minimze/minimize/ s/initallize/initialize/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 911edeff2264bc307f242c3aab8331ef5800295a Author: Bhaskar Chowdhury Date: Sat Feb 13 16:00:14 2021 +0100 media: drivers/media/pci/cx18: Fix a spelling minimze to minimize in the file cx18-firmware.c s/minimze/minimize/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 18490a1ad8ea624820c2b86d05edc9b7bd456e9b Author: Julia Lawall Date: Tue Feb 9 22:13:33 2021 +0100 media: use getter/setter functions Use getter and setter functions, for a variety of data types. Signed-off-by: Julia Lawall Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 21ea3defde62fb9441049d1cea282807b7d773d4 Author: Nicolas Dufresne Date: Tue Feb 9 18:22:33 2021 +0100 media: doc: h264/hevc: Clarify _START_CODE_NONE meaning As some hardware have a knob to enable or disable emulation prevention bytes removal, driver writers ended up wondering what exactly the START_CODE_NONE modes meant in this regards. This patch clarify what is expected with a reference to the specification. Reported-by: John Cox Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6a49401e15b5ea41503a6905f99f3b32f0a534fb Author: Rikard Falkeborn Date: Sat Feb 6 22:21:39 2021 +0100 media: usbtv: constify static structs Constify two static structs which are never modified to allow the compiler to put them in read-only memory. The only usage of norm_params is only read from it in usbtv_configure_for_norm(). Making it const shrinks the resulting ko-file with 300 bytes (tested with gcc 10). The only usage of usbtv_ioctl_ops is to put its address to the ioctl_ops field in the video_device struct. Making it const moves ~1kb to read-only memory. Signed-off-by: Rikard Falkeborn Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 6b45fbfa53099259c8038e0626dec8f197d19857 Author: Bhaskar Chowdhury Date: Fri Feb 5 10:21:17 2021 +0100 media: include: media: davinci: Fixed up few trivial spellings in the file isif.h Several spelling fixes throughout the file. Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Acked-by: Lad Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 0c8be47d4a72702382637775d61584a1f097f071 Author: Colin Ian King Date: Thu Feb 4 18:08:50 2021 +0100 media: platform: sti: make a const arrays static, makes object smaller Don't populate the const arrays on the stack but instead it static. Makes the object code smaller by 8 bytes: Before: text data bss dec hex filename 12504 4568 0 17072 42b0 media/platform/sti/hva/hva-h264.o After: text data bss dec hex filename 12272 4792 0 17064 42a8 media/platform/sti/hva/hva-h264.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit bcbe55dc7b41c333970bde85eddfc5ac23e87433 Author: Andrzej Pietrasiewicz Date: Thu Feb 4 17:16:59 2021 +0100 media: uapi: Correct doc comment in H264 uAPI struct v4l2_ctrl_h264_pps members obviously match picture parameter syntax, not sequence parameter syntax. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab commit 34d5fc1e0da1698783efd227c6cc46f0f4124148 Author: Bastien Nocera Date: Tue Jan 26 18:40:33 2021 +0100 media: rc: add keymap for Xbox 360 Universal Media remote Captured using a raw IR receiver. Manual linked in the remote definition itself. Signed-off-by: Bastien Nocera Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit c49206786ee252f28b7d4d155d1fff96f145a05d Author: Takashi Iwai Date: Mon Feb 1 09:32:47 2021 +0100 media: dvb-usb: Fix use-after-free access dvb_usb_device_init() copies the properties to the own data, so that the callers can release the original properties later (as done in the commit 299c7007e936 ("media: dw2102: Fix memleak on sequence of probes")). However, it also stores dev->desc pointer that is a reference to the original properties data. Since dev->desc is referred later, it may result in use-after-free, in the worst case, leading to a kernel Oops as reported. This patch addresses the problem by allocating and copying the properties at first, then get the desc from the copied properties. Reported-and-tested-by: Stefan Seyfried BugLink: http://bugzilla.opensuse.org/show_bug.cgi?id=1181104 Reviewed-by: Robert Foss Cc: Signed-off-by: Takashi Iwai Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 13a79f14ab285120bc4977e00a7c731e8143f548 Author: Takashi Iwai Date: Mon Feb 1 09:32:46 2021 +0100 media: dvb-usb: Fix memory leak at error in dvb_usb_device_init() dvb_usb_device_init() allocates a dvb_usb_device object, but it doesn't release the object by itself even at errors. The object is released in the callee side (dvb_usb_init()) in some error cases via dvb_usb_exit() call, but it also missed the object free in other error paths. And, the caller (it's only dvb_usb_device_init()) doesn't seem caring the resource management as well, hence those memories are leaked. This patch assures releasing the memory at the error path in dvb_usb_device_init(). Now dvb_usb_init() frees the resources it allocated but leaves the passed dvb_usb_device object intact. In turn, the dvb_usb_device object is released in dvb_usb_device_init() instead. We could use dvb_usb_exit() function for releasing everything in the callee (as it was used for some error cases in the original code), but releasing the passed object in the callee is non-intuitive and error-prone. So I took this approach (which is more standard in Linus kernel code) although it ended with a bit more open codes. Along with the change, the patch makes sure that USB intfdata is reset and don't return the bogus pointer to the caller of dvb_usb_device_init() at the error path, too. Cc: Signed-off-by: Takashi Iwai Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit e5f3b2f4f2377434dc9118db47191d2f72533ab9 Author: Brad Love Date: Tue Feb 2 02:40:30 2021 +0100 media: em28xx: Add pid for bulk revision of Hauppauge 461eV2 Manufacturing has switched from ISOC to bulk transport, the pid has accordingly changed to signify this. 0x2013:0x0461 is an ISOC 461e v2 0x2013:0x8461 is a bulk transport 461e v2 Signed-off-by: Brad Love Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 042c122f4a306869177debae751ef5592aef504d Author: Brad Love Date: Tue Feb 2 02:40:29 2021 +0100 media: em28xx: Add pid for bulk revision of Hauppauge 461e Manufacturing has switched from ISOC to bulk transport, the pid has accordingly changed to signify this. 0x2013:0x0258 is an ISOC 461e 0x2013:0x8258 is a bulk transport 461e Signed-off-by: Brad Love Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 3f9fcc4c84c6493988ab7dc4e82bf836be56714e Author: Christian Hewitt Date: Mon Feb 1 21:59:51 2021 +0100 media: rc: add keymap for minix-neo remote Add a keymap and bindings for the simple IR (NEC) remote used with Minix 'NEO' branded Android STB devices. Signed-off-by: Christian Hewitt Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0ec694d6718a9fab0f49a280557feb257c9d7843 Author: Sean Young Date: Mon Feb 22 14:46:42 2021 +0100 media: ite-cir: in_use is not needed The in_use variable is set to true when a lirc file is opened, and ir transmit can only be done by writing to a lirc file descriptor. As a result when in_use is read, it is always true, so we might as well remove it. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 28c7afb07ccfc0a939bb06ac1e7afe669901c65a Author: Sean Young Date: Mon Feb 22 09:08:35 2021 +0100 media: ite-cir: check for receive overflow It's best if this condition is reported. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0b16cd575d6d8be4327918576ffa02bbdfc523e6 Author: Sean Young Date: Sun Feb 21 21:16:45 2021 +0100 media: ite-cir: move runtime information into driver data The carrier, duty cycle etc are not device dependent, and they can be changed at runtime. By moving them into the allocated struct, we can make the device specific structures smaller, and we no longer need to copy the struct. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit cc83573c46f6d12eb83cd3965a76d0890b879f17 Author: Sean Young Date: Sat Feb 20 13:41:37 2021 +0100 media: ite-cir: carrier and duty cycle can be set via ioctl The lirc ioctls should be used for this, not module parameters. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 17e327a67e2a0f73b1c1cae7403035944ae713f1 Author: Sean Young Date: Sat Feb 20 11:43:47 2021 +0100 media: ite-cir: use standard logging and reduce noise Remove lots of superfluous debug messages which just log the function name. Also, there is no need to announce the various parameters of the device. This can be discovered via lirc ioctl if needed. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 0b2c7dcff345c32795164fc596d22542718c1600 Author: Sean Young Date: Sat Feb 20 11:04:41 2021 +0100 media: ite-cir: set parent device This ensure that the rc device shows up correctly in sysfs. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit 112902fc14518732d9c41be2e7e971aabcd31a2d Author: Sean Young Date: Sun Feb 21 11:05:12 2021 +0100 media: ite-cir: remove unused fields These fields are not referenced anywhere. Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit dd354506911a4aaa81aa09f4769268cb14b37cbe Author: Daode Huang Date: Fri Feb 5 10:39:11 2021 +0100 media: rc/ite-cir: replace spin_lock_irqsave by spin_lock in hard IRQ It is redundant to do irqsave and irqrestore in hardIRQ context. Signed-off-by: Daode Huang Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab commit c4a1bff9507fbeb1a13389cd51cb100b65de3c59 Author: Mauro Carvalho Chehab Date: Thu Mar 4 15:56:09 2021 +0100 media: v4l docs: move some cross-reference identifiers Sphinx doesn't allow placing those cross-reference identifies everywhere. Misplacing them cause those warnings: Documentation/userspace-api/media/v4l/hist-v4l2.rst:818: WARNING: undefined label: control-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/hist-v4l2.rst:853: WARNING: undefined label: reserved-formats (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/pixfmt-v4l2.rst:47: WARNING: undefined label: reserved-formats (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/subdev-formats.rst:39: WARNING: undefined label: v4l2-subdev-mbus-code-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/subdev-formats.rst:53: WARNING: undefined label: v4l2-subdev-mbus-code-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/subdev-formats.rst:67: WARNING: undefined label: v4l2-subdev-mbus-code-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/subdev-formats.rst:83: WARNING: undefined label: v4l2-subdev-mbus-code-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/subdev-formats.rst:97: WARNING: undefined label: v4l2-subdev-mbus-code-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/subdev-formats.rst:140: WARNING: undefined label: v4l2-subdev-mbus-code-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-decoder-cmd.rst:75: WARNING: undefined label: decoder-cmds (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-dqevent.rst:234: WARNING: undefined label: control-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-g-dv-timings.rst:156: WARNING: undefined label: dv-bt-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst:41: WARNING: undefined label: ctrl-class (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst:246: WARNING: undefined label: ctrl-class (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-g-ext-ctrls.rst:269: WARNING: undefined label: ctrl-class (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-g-modulator.rst:100: WARNING: undefined label: modulator-txsubchans (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-g-tuner.rst:119: WARNING: undefined label: tuner-rxsubchans (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst:167: WARNING: undefined label: control-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst:245: WARNING: undefined label: control-flags (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst:396: WARNING: undefined label: ctrl-class (if the link has no caption the label must precede a section header) Documentation/userspace-api/media/v4l/vidioc-subdev-enum-mbus-code.rst:73: WARNING: undefined label: v4l2-subdev-mbus-code-flags (if the link has no caption the label must precede a section header) Reported-by: Stephen Rothwell Signed-off-by: Mauro Carvalho Chehab commit f82c0bd4a5dd82044b82c90cecc5da0c5c0fa4ac Author: Mauro Carvalho Chehab Date: Wed Mar 3 17:33:27 2021 +0100 media: vbi_hsync.svg: fix the viewports At least at pdf output, part of the VBI drawings are not visible. Signed-off-by: Mauro Carvalho Chehab commit f9f81841bba3e76aaeed5a50bb5c756811b75234 Author: Mauro Carvalho Chehab Date: Wed Mar 3 17:19:22 2021 +0100 media: dev-overlay.rst: cleanup the xvideo example It makes more sense to place the xvideo example at the body, keeping the footnote only to justify the design decision. While this makes the text better, it also fixes the PDF output. Signed-off-by: Mauro Carvalho Chehab commit fea13a6935c79896a53a8ede32b0b6f6bce5042c Author: Mauro Carvalho Chehab Date: Thu Dec 10 11:39:46 2020 +0100 media: docs: uAPI: fix table output in LaTeX/PDF format There are lots of tables that are not properly displayed in LaTeX/PDF. Fix the tablecolumns, add longtable where needed and LaTeX formatting macros, in order to address such issues. Signed-off-by: Mauro Carvalho Chehab commit 4a1873f5bf2bed7c1d7ed5bc18bf0878d79f4ff7 Author: Mauro Carvalho Chehab Date: Thu Dec 10 11:38:23 2020 +0100 media: pixfmt-yuv-planar.rst: fix PDF OUTPUT Add missing format macros for the tables there to be properly output. While here, also remove the empty ".. note::" markup. It should be noticed that ".. [1]" markups will generate footnotes, and not a note within the main text body. Signed-off-by: Mauro Carvalho Chehab commit 86d3a055a46749eaf3c15c3cba8b8a137de7073a Author: Mauro Carvalho Chehab Date: Thu Dec 10 11:34:21 2020 +0100 media: ext-ctrls-codec-stateless.rst: fix an H-264 table format The Picture Parameter Set Flags table for H-264 doesn't output well on PDF. There are missing format instructions for LaTeX, and the columns are too long. Reduce the size of the second column, as 16 bits is more than enough for the current flags usage, and add the needed bits for it to be properly output in PDF format. Signed-off-by: Mauro Carvalho Chehab commit b58398f2285513cdb30602dd51ef00d409e8df88 Author: Mauro Carvalho Chehab Date: Thu Dec 10 11:30:15 2020 +0100 media: buffer.rst: fix a PDF output issue Sphinx/LaTeX doesn't work well with literal blocks. Due to that, V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF ends being writing outside the table (and even outside the page). We need to not only change the table size and font size, but also to change the message, in order to avoid this bug. So, improve the text a little bit, while ensuring that the literal will be written at the beginning of the second line. Signed-off-by: Mauro Carvalho Chehab commit e89dbb12b677acb36035911e530c771b76ce4cd4 Author: Mauro Carvalho Chehab Date: Thu Dec 10 08:36:04 2020 +0100 media: docs: pixfmt: use section titles for bayer formats The bayer formats have a subtitle, specifying how many bits they use. Add a title markup to those, as otherwise they look weird, specially at the PDF output. Signed-off-by: Mauro Carvalho Chehab commit 43774190ffde90a63a1ca7b8309d7ad6a69cb312 Author: Mauro Carvalho Chehab Date: Thu Dec 10 08:31:21 2020 +0100 media: ext-ctrls-jpeg.rst: cleanup V4L2_CID_JPEG_COMPRESSION_QUALITY text The text is repeating the name of the control, which causes it to be displayed outside the page with PDF output. Besides that, this is the only JPEG control doing that. Removing the name duplication doesn't affect the description, but, instead, make it nicer. Signed-off-by: Mauro Carvalho Chehab commit 235ad7e647871131ca988b126b928c1a6adc829b Author: Mauro Carvalho Chehab Date: Thu Dec 10 08:27:12 2020 +0100 media: ext-ctrls-codec.rst: simplify a few tables Those tables nicely fits on PDF output without any hack. Yet, they are using a very small font, and have tabularcolumns. Clean it up, and convert it to an ASCII artwork, as it makes easier to see that no hacks are needed to display it ;-) Signed-off-by: Mauro Carvalho Chehab commit da3e2702cacc44d079b5f2fa236406c7648785c8 Author: Mauro Carvalho Chehab Date: Thu Dec 10 08:22:46 2020 +0100 media: ext-ctrls-codec.rst: add a missing profile description One of the MPEG-4 profiles has a missing description. Add it. Signed-off-by: Mauro Carvalho Chehab commit f23f5c709427e2b76b7280a1361a84a67aa0162b Author: Mauro Carvalho Chehab Date: Thu Dec 10 08:20:11 2020 +0100 media: ext-ctrls-codec-stateless.rst: change a FWHT flag description Instead of using "- 1", use "minus one". The reason is that, if the table is split like: V4L2_FWHT_FL_COMPONENTS_NUM_MSK 0x00070000 The number of color components - 1. One might not realize the meaning of the second line. As a side effect, using text instead of arabic numbers is more appropriate for formal documents like this spec. Signed-off-by: Mauro Carvalho Chehab commit 571610162bc5c8e1c862614a24fa9e9162933c12 Author: Mauro Carvalho Chehab Date: Thu Dec 10 08:13:48 2020 +0100 media: docs: sliced-vbi: fix V4L2_SLICED_WSS_625 docs While fixing issues with PDF generation, I noticed that bit 8 was missing for WSS 625 format. While here, convert the literal block into a tables, as it becomes more visible. I opted to move the payload into a separate table, as Sphinx has troubles with complex nested tables. This way, it should work fine on both html and LaTeX/PDF formats. Signed-off-by: Mauro Carvalho Chehab commit a78801a4431d62f36c6579cb420a61e22d1172c1 Author: Mauro Carvalho Chehab Date: Thu Dec 10 08:08:20 2020 +0100 media: control.rst: use a table for V4L2_CID_POWER_LINE The default way to document control enums is via tables. Use one here too. As the table is simple, just use ASCII artwork. Signed-off-by: Mauro Carvalho Chehab commit b0b6ef0bb27343bdd376ccfcbde132d844bdc6c5 Author: Mauro Carvalho Chehab Date: Thu Dec 10 08:05:14 2020 +0100 media: colorspaces-details.rst: drop tabularcolumns Those tables have small cells that fit nicely without requiring line beaks. So, they don't need tabular columns, as Sphinx/LaTeX can adjust the width on such tables. Signed-off-by: Mauro Carvalho Chehab commit 8f62f59f83c3bc902af91c80732cfcd17e0d7069 Author: Baruch Siach Date: Wed Mar 3 18:48:16 2021 +0200 mtd: parsers: qcom: incompatible with spi-nor 4k sectors Partition size and offset value are in block size units, which is the same as 'erasesize'. But when 4K sectors are enabled erasesize is set to 4K. Bail out in that case. Fixes: 803eb124e1a64 ("mtd: parsers: Add Qcom SMEM parser") Reviewed-by: Manivannan Sadhasivam Signed-off-by: Baruch Siach Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/0a2611f885b894274436ded3ca78bc0440fca74a.1614790096.git.baruch@tkos.co.il commit c95310e1b33eae9767af9698aa976d5301f37203 Author: Miquel Raynal Date: Wed Mar 3 09:46:34 2021 +0100 mtd: parsers: qcom: Fix error condition qcom_smem_get() does not return NULL, and even if it did, the NULL condition is usually not an error but a success condition and should not trigger an error trace. Let's replace IS_ERR_OR_NULL() by IS_ERR(). This fixes the following smatch warning: drivers/mtd/parsers/qcomsmempart.c:109 parse_qcomsmem_part() warn: passing zero to 'PTR_ERR' Reported-by: kernel test robot Reported-by: Dan Carpenter Fixes: 803eb124e1a6 ("mtd: parsers: Add Qcom SMEM parser") Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210303084634.12796-1-miquel.raynal@bootlin.com commit 2d751203aacf86a1b301a188d8551c7da91043ab Author: Rafał Miłecki Date: Tue Mar 2 20:00:12 2021 +0100 mtd: parsers: ofpart: limit parsing of deprecated DT syntax For backward compatibility ofpart still supports the old syntax like: spi-flash@0 { compatible = "jedec,spi-nor"; reg = <0x0>; partition@0 { label = "bootloader"; reg = <0x0 0x100000>; }; }; (without "partitions" subnode). There is no reason however to support nested partitions without a clear "compatible" string like: partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "bootloader"; reg = <0x0 0x100000>; partition@0 { label = "config"; reg = <0x80000 0x80000>; }; }; }; (we never officially supported or documented that). Make sure ofpart doesn't attempt to parse above. Cc: Ansuel Smith Signed-off-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210302190012.1255-1-zajec5@gmail.com commit c1a74160eaf1ac218733b371158432b52601beff Author: Venkata Lakshmi Narayana Gubba Date: Thu Mar 11 12:33:40 2021 +0530 Bluetooth: hci_qca: Add device_may_wakeup support Based on device may wakeup status, Bluez stack will enable/disable passive scanning with whitelist in BT controller while suspending. As interrupt from BT SoC is handled by UART driver,we need to use device handle of UART driver to get the status of device may wakeup Signed-off-by: Venkata Lakshmi Narayana Gubba Signed-off-by: Marcel Holtmann commit 9c896eeca4578507faa067d62daa2d66b1541bc8 Author: Wolfram Sang Date: Wed Mar 10 20:32:27 2021 +0100 ALSA: ppc: keywest: remove outdated comment The I2C attach_adapter callback is gone. Remove this reference. Signed-off-by: Wolfram Sang Link: https://lore.kernel.org/r/20210310193227.333140-1-wsa@kernel.org Signed-off-by: Takashi Iwai commit 81519f778830d1ab02274eeaaeab6797fdc4ec52 Author: Cao jin Date: Thu Mar 11 16:39:19 2021 +0800 x86/setup: Remove unused RESERVE_BRK_ARRAY() Since a13f2ef168cb ("x86/xen: remove 32-bit Xen PV guest support"), RESERVE_BRK_ARRAY() has no user anymore so drop it. Update related comments too. Signed-off-by: Cao jin Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20210311083919.27530-1-jojing64@gmail.com commit 6d19628f539fccf899298ff02ee4c73e4bf6df3f Author: Luiz Augusto von Dentz Date: Wed Mar 10 14:13:08 2021 -0800 Bluetooth: SMP: Fail if remote and local public keys are identical This fails the pairing procedure when both remote and local non-debug public keys are identical. Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Marcel Holtmann commit a620bbaa3510a6f14f6643bf232390ad1c821c80 Author: Michael Kelley Date: Wed Mar 10 10:47:49 2021 -0800 asm-generic/hyperv: Add missing function prototypes per -W1 warnings Add two function prototypes for -W1 warnings generated by the kernel test robot. Reported-by: kernel test robot Signed-off-by: Michael Kelley Link: https://lore.kernel.org/r/1615402069-39462-1-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 55cc33fab5ac9f7e2a97aa7c564e8b35355886d5 Author: Alexandre Belloni Date: Thu Mar 11 09:48:09 2021 +0100 rtc: m48t59: use platform_get_irq_optional The IRQ is optional, avoid the error message by using platform_get_irq_optional. Signed-off-by: Alexandre Belloni commit bb17230c61a6424b622e92006ec52ba23aa5a967 Author: Rafał Miłecki Date: Mon Mar 1 11:58:23 2021 +0100 mtd: parsers: ofpart: support BCM4908 fixed partitions Some devices use fixed partitioning with some partitions requiring some extra logic. E.g. BCM4908 may have multiple firmware partitions but detecting currently used one requires checking bootloader parameters. To support such cases without duplicating a lot of code (without copying most of the ofpart.c code) support for post-parsing callback was added. BCM4908 support in ofpart can be enabled using config option and results in compiling & executing a specific callback. It simply reads offset of currently used firmware partition from the DT. Bootloader specifies it using the "brcm_blparms" property. Signed-off-by: Rafał Miłecki Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210301105823.31032-1-zajec5@gmail.com commit 462d69a2dc3d6d8289d99479961632411b9d30ad Author: Tomas Winkler Date: Thu Feb 25 16:33:29 2021 +0200 mtd: mtdcore: constify name param in mtd_bdi_init The bdi name is not modified by the function, it should be const. Signed-off-by: Tomas Winkler Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210225143329.430012-1-tomas.winkler@intel.com commit 1ca890d325c8ec11e553c706b339bf07a6450696 Author: Baruch Siach Date: Tue Feb 23 13:47:04 2021 +0200 mtd: parsers: extend Qcom SMEM parser to SPI flash The Qcom MIBIB partition might be stored on SPI flash devices, and the parser works in this case just as well: [ 1.404229] spi_qup 78b5000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64 [ 1.408078] spi-nor spi0.0: found mx25u6435f, expected n25q128a11 [ 1.415016] spi-nor spi0.0: mx25u6435f (8192 Kbytes) [ 1.420756] 12 qcomsmem partitions found on MTD device spi0.0 [ 1.425739] Creating 12 MTD partitions on "spi0.0": [ 1.431381] 0x000000000000-0x00000000c000 : "0:sbl1" [ 1.437058] 0x00000000c000-0x00000000d000 : "0:mibib" [ 1.442143] 0x00000000d000-0x000000027000 : "0:qsee" [ 1.447057] 0x000000027000-0x000000028000 : "0:devcfg" [ 1.452088] 0x000000028000-0x00000002a000 : "0:rpm" [ 1.457065] 0x00000002a000-0x00000002b000 : "0:cdt" [ 1.461832] 0x00000002b000-0x00000002c000 : "0:appsblenv" [ 1.466736] 0x00000002c000-0x000000036000 : "0:appsbl" [ 1.472248] 0x000000036000-0x00000003a000 : "0:art" [ 1.477297] 0x00000003a000-0x00000003e000 : "config" [ 1.482047] 0x00000003e000-0x00000004e000 : "data" [ 1.487257] 0x00000004e000-0x000000200000 : "0:hlos" Remove dependency on MTD_NAND_QCOM. Update the Kconfig prompt and help text accordingly. Cc: Manivannan Sadhasivam Signed-off-by: Baruch Siach Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/7f558e888a41c5b1fd4ca0427b3976531c51a876.1614080824.git.baruch@tkos.co.il commit 1ad55288829c78e85bfe7d0c86d75415adf5f305 Author: Alexander Sverdlin Date: Wed Feb 17 22:18:45 2021 +0100 mtd: char: Get rid of Big MTD Lock Get rid of central chrdev MTD lock, which prevents simultaneous operations on completely independent physical MTD chips. Replace it with newly introduced per-master mutex. Signed-off-by: Alexander Sverdlin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210217211845.43364-2-alexander.sverdlin@nokia.com commit ecd400ce5f97e03aed6bef9bc4efb1befdbf779b Author: Alexander Sverdlin Date: Wed Feb 17 22:18:44 2021 +0100 mtd: char: Drop mtd_mutex usage from mtdchar_open() It looks unnecessary in the function, remove it from the function having in mind to remove it completely. Signed-off-by: Alexander Sverdlin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210217211845.43364-1-alexander.sverdlin@nokia.com commit cb4543054c5c4fd33df960b41d7b483ebca8e786 Author: David Bauer Date: Wed Feb 17 20:53:20 2021 +0100 mtd: don't lock when recursively deleting partitions When recursively deleting partitions, don't acquire the masters partition lock twice. Otherwise the process ends up in a deadlocked state. Fixes: 46b5889cc2c5 ("mtd: implement proper partition handling") Signed-off-by: David Bauer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210217195320.893253-1-mail@david-bauer.net commit d38c2b93258a0e19dee3b04c2156f6c9077bd498 Author: Dejin Zheng Date: Sun Feb 14 00:46:00 2021 +0800 mtd: rfd_ftl: Use module_mtd_blktrans to register driver Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-9-zhengdejin5@gmail.com commit 2dd8b55e2c28caec3cbaefd0480d276f30e152cd Author: Dejin Zheng Date: Sun Feb 14 00:45:59 2021 +0800 mtd: nftlcore: Use module_mtd_blktrans to register driver Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-8-zhengdejin5@gmail.com commit 1d5b7d479e7e180425ab2f02049c031ffe3b2c43 Author: Dejin Zheng Date: Sun Feb 14 00:45:58 2021 +0800 mtd: mtdswap: Use module_mtd_blktrans to register driver Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-7-zhengdejin5@gmail.com commit b1f9604f4d2aa4ca211e48b00feb5b831bd46982 Author: Dejin Zheng Date: Sun Feb 14 00:45:57 2021 +0800 mtd: mtdblock_ro: Use module_mtd_blktrans to register driver Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-6-zhengdejin5@gmail.com commit 27b08bf3c3387b064dceedb34e8add7bb159386d Author: Dejin Zheng Date: Sun Feb 14 00:45:56 2021 +0800 mtd: mtdblock: Use module_mtd_blktrans to register driver Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-5-zhengdejin5@gmail.com commit f7e39bb7f8ee0bb14778f597e90740e6eea4e011 Author: Dejin Zheng Date: Sun Feb 14 00:45:55 2021 +0800 mtd: inftlcore: Use module_mtd_blktrans to register driver Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-4-zhengdejin5@gmail.com commit c45f07399db2f69f428fa7c7a4177968ae53c736 Author: Dejin Zheng Date: Sun Feb 14 00:45:54 2021 +0800 mtd: ftl: Use module_mtd_blktrans to register driver Removing some boilerplate by using module_mtd_blktrans instead of calling register and unregister in the otherwise empty init/exit functions. Signed-off-by: Dejin Zheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-3-zhengdejin5@gmail.com commit 6cfeb41a825913f3dcb131d6556cc9d1c4072015 Author: Dejin Zheng Date: Sun Feb 14 00:45:53 2021 +0800 mtd: Add helper macro for register_mtd_blktrans boilerplate This patch introduces the module_mtd_blktrans macro which is a convenience macro for mtd blktrans modules similar to module_platform_driver. It is intended to be used by drivers which init/exit section does nothing but register/unregister the mtd blktrans driver. By using this macro it is possible to eliminate a few lines of boilerplate code per mtd blktrans driver. Signed-off-by: Dejin Zheng Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210213164600.409061-2-zhengdejin5@gmail.com commit 683313993dbe1651c7aa00bb42a041d70e914925 Author: Gustavo A. R. Silva Date: Fri Feb 12 04:40:22 2021 -0600 mtd: physmap: physmap-bt1-rom: Fix unintentional stack access Cast &data to (char *) in order to avoid unintentionally accessing the stack. Notice that data is of type u32, so any increment to &data will be in the order of 4-byte chunks, and this piece of code is actually intended to be a byte offset. Fixes: b3e79e7682e0 ("mtd: physmap: Add Baikal-T1 physically mapped ROM support") Addresses-Coverity-ID: 1497765 ("Out-of-bounds access") Cc: stable@vger.kernel.org Signed-off-by: Gustavo A. R. Silva Acked-by: Serge Semin Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210212104022.GA242669@embeddedor commit 55fbb9ba4f06cb6aff32daca1e1910173c13ec51 Author: Manivannan Sadhasivam Date: Tue Mar 2 18:57:57 2021 +0530 mtd: rawnand: qcom: Return actual error code instead of -ENODEV In qcom_probe_nand_devices() function, the error code returned by qcom_nand_host_init_and_register() is converted to -ENODEV in the case of failure. This poses issue if -EPROBE_DEFER is returned when the dependency is not available for a component like parser. So let's restructure the error handling logic a bit and return the actual error code in case of qcom_nand_host_init_and_register() failure. Fixes: c76b78d8ec05 ("mtd: nand: Qualcomm NAND controller driver") Signed-off-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal commit 08608adb520e51403be7592c2214846fa440a23a Author: Manivannan Sadhasivam Date: Tue Mar 2 18:57:56 2021 +0530 mtd: Handle possible -EPROBE_DEFER from parse_mtd_partitions() There are chances that the parse_mtd_partitions() function will return -EPROBE_DEFER in mtd_device_parse_register(). This might happen when the dependency is not available for the parser. For instance, on SDX55 the MTD_QCOMSMEM_PARTS parser depends on the QCOM_SMEM driver to parse the partitions defined in the shared memory region. With the current flow, the error returned from parse_mtd_partitions() will be discarded in favor of trying to add the fallback partition. This will prevent the driver to end up in probe deferred pool and the partitions won't be parsed even after the QCOM_SMEM driver is available. Fix this issue by bailing out of mtd_device_parse_register() when -EPROBE_DEFER error is returned from parse_mtd_partitions() function and propagate the error code to the driver core for probing later. Fixes: 5ac67ce36cfe ("mtd: move code adding (registering) partitions to the parse_mtd_partitions()") Signed-off-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal commit f5200c14242fb8fa4a9b93f7fd4064d237e58785 Author: Álvaro Fernández Rojas Date: Wed Feb 24 09:02:10 2021 +0100 mtd: rawnand: brcmnand: fix OOB R/W with Hamming ECC Hamming ECC doesn't cover the OOB data, so reading or writing OOB shall always be done without ECC enabled. This is a problem when adding JFFS2 cleanmarkers to erased blocks. If JFFS2 clenmarkers are added to the OOB with ECC enabled, OOB bytes will be changed from ff ff ff to 00 00 00, reporting incorrect ECC errors. Fixes: 27c5b17cd1b1 ("mtd: nand: add NAND driver "library" for Broadcom STB NAND controller") Signed-off-by: Álvaro Fernández Rojas Acked-by: Brian Norris Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210224080210.23686-1-noltari@gmail.com commit 503ee5aad43054a26cfd5cc592a31270c05539cd Author: Md Sadre Alam Date: Wed Feb 24 01:09:01 2021 +0530 mtd: rawnand: qcom: update last code word register From QPIC v2 onwards a new register got added to read last code word.Add support for this READ_LOCATION_LAST_CW_n register. In the case of QPIC v2, codewords 0, 1 and 2 will be accessed through READ_LOCATION_n, while codeword 3 will be accessed through READ_LOCATION_LAST_CW_n. Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1614109141-7531-5-git-send-email-mdalam@codeaurora.org commit e7a307f21a514ce7aacee492011589999456d820 Author: Md Sadre Alam Date: Wed Feb 24 01:09:00 2021 +0530 mtd: rawnand: qcom: Add helper to configure location register Create a nandc_set_read_loc() helper to abstract the configuration of the location register. QPIC v2 onwards features a separate location register for the last codeword, so introducing this extra helper which will simplify the addition of QPIC v2 support. Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1614109141-7531-4-git-send-email-mdalam@codeaurora.org commit 622d3fc8de7d88def6e2b7cb00432e9c7c595c0b Author: Md Sadre Alam Date: Wed Feb 24 01:08:59 2021 +0530 mtd: rawnand: qcom: Rename parameter name in macro Rename the parameters of the nandc_set_read_loc() macro to avoid the confusion between is_last_read_loc which is last location in a read code word and last_cw which is last code word of a page data. Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1614109141-7531-3-git-send-email-mdalam@codeaurora.org commit b057e498fdaff82092710b0d7c553d3375b2e314 Author: Md Sadre Alam Date: Wed Feb 24 01:08:58 2021 +0530 mtd: rawnand: qcom: Add helper to check last code word Add the qcom_nandc_is_last_cw() helper which checks if the input cw index is the last one or not. Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1614109141-7531-2-git-send-email-mdalam@codeaurora.org commit 9a7c39e23d7059ba6ef231d941dd820643bd5ce2 Author: Md Sadre Alam Date: Wed Feb 24 01:08:57 2021 +0530 mtd: rawnand: qcom: Convert nandc to chip in Read/Write helper This change will convert nandc to chip in Read/Write helper, this change is needed because if we wnated to access number of steps in Read/Write helper then we need to get the chip->ecc.steps, currentlly its not possible.After this change we can directly acces chip->ecc.steps in Read/Write helper. Signed-off-by: Md Sadre Alam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1614109141-7531-1-git-send-email-mdalam@codeaurora.org commit e7a97528e3c787802d8c643d6ab2f428511bb047 Author: Dan Carpenter Date: Mon Feb 15 18:58:49 2021 +0300 mtd: rawnand: fsmc: Fix error code in fsmc_nand_probe() If dma_request_channel() fails then the probe fails and it should return a negative error code, but currently it returns success. fixes: 4774fb0a48aa ("mtd: nand/fsmc: Add DMA support") Signed-off-by: Dan Carpenter Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/YCqaOZ83OvPOzLwh@mwanda commit 469b992489852b500d39048aa0013639dfe9f2e6 Author: Reto Schneider Date: Thu Feb 11 12:36:19 2021 +0100 mtd: spinand: gigadevice: Support GD5F1GQ5UExxG The relevant changes to the already existing GD5F1GQ4UExxG support has been determined by consulting the GigaDevice product change notice AN-0392-10, version 1.0 from November 30, 2020. As the overlaps are huge, variable names have been generalized accordingly. Apart from the lowered ECC strength (4 instead of 8 bits per 512 bytes), the new device ID, and the extra quad IO dummy byte, no changes had to be taken into account. New hardware features are not supported, namely: - Power on reset - Unique ID - Double transfer rate (DTR) - Parameter page - Random data quad IO The inverted semantic of the "driver strength" register bits, defaulting to 100% instead of 50% for the Q5 devices, got ignored as the driver has never touched them anyway. The no longer supported "read from cache during block erase" functionality is not reflected as the current SPI NAND core does not support it anyway. Implementation has been tested on MediaTek MT7688 based GARDENA smart Gateways using both, GigaDevice GD5F1GQ5UEYIG and GD5F1GQ4UBYIG. Signed-off-by: Reto Schneider Reviewed-by: Frieder Schrempf Reviewed-by: Stefan Roese Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210211113619.3502-1-code@reto-schneider.ch commit 8ffbec7df4d64446cb0479261524c490a2c7529e Author: Sascha Hauer Date: Fri Feb 5 15:27:25 2021 +0100 mtd: nand: fix error handling in nand_prog_page_op() #2 On success nand_exec_prog_page_op() returns the NAND status byte, but on failure it returns a negative error code. nand_prog_page_op() interprets the return value as NAND status byte without error checking. This means a failure in nand_exec_prog_page_op() can go through unnoticed. The straight forward fix would be to add the missing error checking. To clean the code a bit we can move the nand status check to nand_prog_page_op(). This way we can get rid of the overloaded return value from nand_exec_prog_page_op() and return a plain error code which is less error prone. nand_exec_prog_page_op() is only called from one other place and in this call the 'prog' parameter is false in which case the nand status check is skipped, so it's correct to not add the NAND status check there. Signed-off-by: Sascha Hauer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210205142725.13225-2-s.hauer@pengutronix.de commit ec9e0203a3598d979d6151703e673c8cb186304d Author: Sascha Hauer Date: Fri Feb 5 15:27:24 2021 +0100 mtd: nand: fix error handling in nand_prog_page_op() #1 On success chip->legacy.waitfunc() returns the NAND status byte, but on failure it returns a negative error code. This was never tested for and instead the return value was interpreted as NAND status without error checking. Add the missing error check. Signed-off-by: Sascha Hauer Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210205142725.13225-1-s.hauer@pengutronix.de commit 0646493edd02e4c872b37258e4e248eb9df4f25b Author: Md Sadre Alam Date: Sun Jan 31 01:37:16 2021 +0530 mtd: rawnand: qcom: Update register macro name for 0x2c offset This change will remove unused register name macro NAND_DEV1_ECC_CFG. Since this register was only available in QPIC version 1.4.20 ipq40xx and it was not used. In QPIC version 1.5 on wards this register got removed.In QPIC version 2.0 0x2c offset is updated with register NAND_AUTO_STATUS_EN So adding this register macro NAND_AUTO_STATUS_EN with offset 0x2c. Signed-off-by: Md Sadre Alam Reviewed-by: Manivannan Sadhasivam Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/1612037236-7954-1-git-send-email-mdalam@codeaurora.org commit bf3816d28f0778de0d3d00a2a65525e19e5dbad2 Author: Miquel Raynal Date: Wed Jan 27 21:30:20 2021 +0100 mtd: nand: ecc-hamming: Use the public nsteps field The software Hamming ECC engine stores the nsteps variable in its own private structure while it is also exported as a public ECC field. Let's get rid of the redundant private one and let's use the nand_ecc_context structure when possible. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-10-miquel.raynal@bootlin.com commit 3e66843c74289b294b91547edd364c5a6fdef45b Author: Miquel Raynal Date: Wed Jan 27 21:30:19 2021 +0100 mtd: nand: ecc-bch: Use the public nsteps field The software BCH ECC engine stores the nsteps variable in its own private structure while it is also exported as a public ECC field. Let's get rid of the redundant private one and let's use the nand_ecc_context structure when possible. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-9-miquel.raynal@bootlin.com commit 49894937fc11662491a675a03f3f3c5b308763d4 Author: Miquel Raynal Date: Wed Jan 27 21:30:18 2021 +0100 mtd: rawnand: omap: Use ECC information from the generic structures As part of a previous fix, we imported the BCH internal structure in order to get information about the BCH engine configuration. It is best not to access private structure so instead, a small rework has been done to export more information from the ECC engines. Now, let's use these. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-8-miquel.raynal@bootlin.com commit 5b9215acb5182355a8a3c9f0a930e6b51c6eea57 Author: Miquel Raynal Date: Wed Jan 27 21:30:17 2021 +0100 mtd: rawnand: Try not to use the ECC private structures Most of the time, there is no need to use the software ECC Hamming and BCH algorithms private context to know their configuration. All the data has been stored by their ->init_ctx() hook in the generic NAND ECC engine structure, so use this one when possible. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-7-miquel.raynal@bootlin.com commit ba4a40a483da86d76bd69957c21fcb975b8405ae Author: Miquel Raynal Date: Wed Jan 27 21:30:16 2021 +0100 mtd: nand: Add a helper to retrieve the number of ECC bytes per step This operation is very common and deserves a helper. It of course only works after the ECC engine initialization. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-6-miquel.raynal@bootlin.com commit e3554b10babd8ee1cf43bfc840ef4657eb1d12aa Author: Miquel Raynal Date: Wed Jan 27 21:30:15 2021 +0100 mtd: nand: Add a helper to retrieve the number of ECC steps This operation is very common and deserves a helper. It of course only works after the ECC engine initialization. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-5-miquel.raynal@bootlin.com commit 12e0df0c6f60baf10f6ecb78a086bf1048ad9d8b Author: Miquel Raynal Date: Wed Jan 27 21:30:14 2021 +0100 mtd: nand: ecc-hamming: Populate the public nsteps field Advertize the actual number of steps that will actually be used by the driver by populating the public field. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-4-miquel.raynal@bootlin.com commit 7cd37e7e958bbc1038b90c126162532a4afaa9f8 Author: Miquel Raynal Date: Wed Jan 27 21:30:13 2021 +0100 mtd: nand: ecc-bch: Populate the public nsteps field Advertize the actual number of steps that will actually be used by the driver by populating the public field. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-3-miquel.raynal@bootlin.com commit 2bc611844b5d2c43b63bdf71ae6395fa7a6566cc Author: Miquel Raynal Date: Wed Jan 27 21:30:12 2021 +0100 mtd: nand: Let ECC engines advertize the exact number of steps This is an information that might be useful for specific uses, so export it, which might avoid having to guess the number of steps when necessary. Signed-off-by: Miquel Raynal Tested-by: Adam Ford #logicpd Torpedo Link: https://lore.kernel.org/linux-mtd/20210127203020.9574-2-miquel.raynal@bootlin.com commit 35bb28ece90dfb7f72b77ba529f25f79323d9581 Merge: aaca50ef45ed2 a38fd87484648 Author: Jani Nikula Date: Thu Mar 11 08:19:46 2021 +0200 Merge drm/drm-next into drm-intel-next Sync up with upstream. Signed-off-by: Jani Nikula commit c053c4eb5a0f010fcd301cf764b59cb783b4979b Author: Heikki Krogerus Date: Thu Mar 4 12:03:12 2021 +0300 ipmi: Handle device properties with software node API The old device property API is going to be removed. Replacing the device_add_properties() call with the software node API equivalent, device_create_managed_software_node(). Signed-off-by: Heikki Krogerus Message-Id: <20210304090312.26827-1-heikki.krogerus@linux.intel.com> Signed-off-by: Corey Minyard commit dcd10526ac5a0d6cc94ce60b9acfca458163277b Author: Liguang Zhang Date: Mon Mar 1 22:05:15 2021 +0800 ipmi:ssif: make ssif_i2c_send() void This function actually needs no return value. So remove the unneeded check and make it void. Signed-off-by: Liguang Zhang Message-Id: <20210301140515.18951-1-zhangliguang@linux.alibaba.com> Signed-off-by: Corey Minyard commit c6ddd5f1c3f3254034f8e9ba741af4a3b0260998 Author: Terry Duncan Date: Wed Feb 24 20:50:27 2021 -0800 ipmi: Refine retry conditions for getting device id Rarely but still failures are observed while getting BMC device ID so this commit changes the condition to retry to get device id when cc is not IPMI_CC_NO_ERROR. Signed-off-by: Terry Duncan Signed-off-by: Jae Hyun Yoo Message-Id: <20210225045027.9344-1-jae.hyun.yoo@linux.intel.com> Signed-off-by: Corey Minyard commit 34bb975126419e86bc3b95e200dc41de6c6ca69c Author: Bhaskar Chowdhury Date: Thu Mar 11 04:21:23 2021 +0530 net: fddi: skfp: Mundane typo fixes throughout the file smt.h Few spelling fixes throughout the file. Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: David S. Miller commit 6b9c8f46af9da611c1fb2f281c927b11f08e568d Author: Shubhankar Kuranagatti Date: Thu Mar 11 02:43:43 2021 +0530 net: ipv4: route.c: fix space before tab The extra space before tab space has been removed. Signed-off-by: Shubhankar Kuranagatti Signed-off-by: David S. Miller commit f2050d91394445e9ac1d6077d05aa0c9c0d9c22f Merge: eeada4105d735 a25edab93b287 Author: David S. Miller Date: Wed Mar 10 15:34:28 2021 -0800 Merge branch 'ionic-next' Shannon Nelson says: ==================== ionic Rx updates The ionic driver's Rx path is due for an overhaul in order to better use memory buffers and to clean up the data structures. The first two patches convert the driver to using page sharing between buffers so as to lessen the page alloc and free overhead. The remaining patches clean up the structs and fastpath code for better efficency. ==================== Signed-off-by: David S. Miller commit a25edab93b2877f3e20673464286a589678b87c2 Author: Shannon Nelson Date: Wed Mar 10 11:26:31 2021 -0800 ionic: simplify use of completion types Make better use of our struct types and type checking by passing the actual Rx or Tx completion type rather than a generic void pointer type. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 55eda6bbe0c87c577376472f8bf381ef1c023303 Author: Shannon Nelson Date: Wed Mar 10 11:26:30 2021 -0800 ionic: rebuild debugfs on qcq swap With a reconfigure of each queue is needed a rebuild of the matching debugfs information. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 89e572e7369fd9ad9c6b07b023bc6e5e9abcd4de Author: Shannon Nelson Date: Wed Mar 10 11:26:29 2021 -0800 ionic: simplify rx skb alloc Remove an unnecessary layer over rx skb allocation. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit f37bc3462e80d2dac9f0b2868720782a94dfb523 Author: Shannon Nelson Date: Wed Mar 10 11:26:28 2021 -0800 ionic: optimize fastpath struct usage Clean up a couple of struct uses to make for better fast path access. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 4b0a7539a3728f0fd7a11087d64371e8c28b4723 Author: Shannon Nelson Date: Wed Mar 10 11:26:27 2021 -0800 ionic: implement Rx page reuse Rework the Rx buffer allocations to use pages twice when using normal MTU in order to cut down on buffer allocation and mapping overhead. Instead of tracking individual pages, in which we may have wasted half the space when using standard 1500 MTU, we track buffers which use half pages, so we can use the second half of the page rather than allocate and map a new page once the first buffer has been used. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 2b5720f26908571ff98bb279a6cb15f3b2660bb0 Author: Shannon Nelson Date: Wed Mar 10 11:26:26 2021 -0800 ionic: move rx_page_alloc and free Move ionic_rx_page_alloc() and ionic_rx_page_free() to earlier in the file to make the next patch easier to review. Signed-off-by: Shannon Nelson Signed-off-by: David S. Miller commit 1211f4e9ae138614bee4e19e0637b220b94e04ad Merge: a9c80b03e586f 7e8bbe24cb8b2 Author: Andrii Nakryiko Date: Wed Mar 10 13:38:08 2021 -0800 Merge branch 'libbpf/xsk cleanups' Björn Töpel says: ==================== This series removes a header dependency from xsk.h, and moves libbpf_util.h into xsk.h. More details in each commit! Thank you, Björn ==================== Signed-off-by: Andrii Nakryiko commit 7e8bbe24cb8b20e2719ec58bf6937ab2e484add2 Author: Björn Töpel Date: Wed Mar 10 09:09:29 2021 +0100 libbpf: xsk: Move barriers from libbpf_util.h to xsk.h The only user of libbpf_util.h is xsk.h. Move the barriers to xsk.h, and remove libbpf_util.h. The barriers are used as an implementation detail, and should not be considered part of the stable API. Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210310080929.641212-3-bjorn.topel@gmail.com commit 2882c48bf8f2fb9ec31cbb68be6b979da48f880d Author: Björn Töpel Date: Wed Mar 10 09:09:28 2021 +0100 libbpf: xsk: Remove linux/compiler.h header In commit 291471dd1559 ("libbpf, xsk: Add libbpf_smp_store_release libbpf_smp_load_acquire") linux/compiler.h was added as a dependency to xsk.h, which is the user-facing API. This makes it harder for userspace application to consume the library. Here the header inclusion is removed, and instead {READ,WRITE}_ONCE() is added explicitly. Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210310080929.641212-2-bjorn.topel@gmail.com commit a9c80b03e586fd3819089fbd33c38fb65ad5e00c Author: Jiapeng Chong Date: Wed Mar 10 15:18:34 2021 +0800 bpf: Fix warning comparing pointer to 0 Fix the following coccicheck warning: ./tools/testing/selftests/bpf/progs/fentry_test.c:67:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1615360714-30381-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 04ea63e34a2ee85cfd38578b3fc97b2d4c9dd573 Author: Jiapeng Chong Date: Wed Mar 10 14:22:46 2021 +0800 selftests/bpf: Fix warning comparing pointer to 0 Fix the following coccicheck warning: ./tools/testing/selftests/bpf/progs/test_global_func10.c:17:12-13: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/1615357366-97612-1-git-send-email-jiapeng.chong@linux.alibaba.com commit eeada4105d735c68f04a081363ad66f408a56b65 Merge: 157611c895d99 f48298d3fbfaa Author: David S. Miller Date: Wed Mar 10 13:30:36 2021 -0800 Merge branch 'dpaa2-switch-next' Ioana Ciornei says: ==================== dpaa2-switch: CPU terminated traffic and move out of staging This patch set adds support for Rx/Tx capabilities on DPAA2 switch port interfaces as well as fixing up some major blunders in how we take care of the switching domains. The last patch actually moves the driver out of staging now that the minimum requirements are met. I am sending this directly towards the net-next tree so that I can use the rest of the development cycle adding new features on top of the current driver without worrying about merge conflicts between the staging and net-next tree. The control interface is comprised of 3 queues in total: Rx, Rx error and Tx confirmation. In this patch set we only enable Rx and Tx conf. All switch ports share the same queues when frames are redirected to the CPU. Information regarding the ingress switch port is passed through frame metadata - the flow context field of the descriptor. NAPI instances are also shared between switch net_devices and are enabled when at least on one of the switch ports .dev_open() was called and disabled when no switch port is still up. Since the last version of this feature was submitted to the list, I reworked how the switching and flooding domains are taken care of by the driver, thus the switch is now able to also add the control port (the queues that the CPU can dequeue from) into the flooding domains of a port (broadcast, unknown unicast etc). With this, we are able to receive and sent traffic from the switch interfaces. Also, the capability to properly partition the DPSW object into multiple switching domains was added so that when not under a bridge, the ports are not actually capable to switch between them. This is possible by adding a private FDB table per switch interface. When multiple switch interfaces are under the same bridge, they will all use the same FDB table. Another thing that is fixed in this patch set is how the driver handles VLAN awareness. The DPAA2 switch is not capable to run as VLAN unaware but this was not reflected in how the driver responded to requests to change the VLAN awareness. In the last patch, this is fixed by describing the switch interfaces as Rx VLAN filtering on [fixed] and declining any request to join a VLAN unaware bridge. ==================== Signed-off-by: David S. Miller commit f48298d3fbfaadedd7e7bd1cdcbb3f1291a8d42d Author: Ioana Ciornei Date: Wed Mar 10 14:14:52 2021 +0200 staging: dpaa2-switch: move the driver out of staging Now that the dpaa2-switch driver has basic I/O capabilities on the switch port net_devices and multiple bridging domains are supported, move the driver out of staging. The dpaa2-switch driver is placed right next to the dpaa2-eth driver since, in the near future, they will be sharing most of the data path. I didn't implement code reuse in this patch series because I wanted to keep it as small as possible. Also, the README is removed from staging with the intention to add proper rst documentation afterwards to actually match was is supported by the driver. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 1c4928fc2929a502f01d4b7001a37db51309ceb9 Author: Ioana Ciornei Date: Wed Mar 10 14:14:51 2021 +0200 staging: dpaa2-switch: prevent joining a bridge while VLAN uppers are present Each time a switch port joins a bridge, it will start to use a FDB table common with all the other switch ports that are under the same bridge. This means that any VLAN added prior to a bridge join, will retain its previous FDB table destination. With this patch, I choose to restrict when a switch port can change it's upper device (either join or leave) so that the driver does not have to delete all the previously installed VLANs from the previous FDB and add them into the new one. Thus, in the PRECHANGEUPPER notification we check if there are any VLAN type upper devices and if that's true, deny the CHANGEUPPER. This way, the user is not restricted in the topology but rather in the order in which the setup is done: it must first create the bridging domain layout and after that add the necessary VLAN devices if necessary. The teardown is similar, the VLAN devices will need to be destroyed prior to a change in the bridging layout. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 685b480145c15b81c411ad8b9a6b74a472274793 Author: Ioana Ciornei Date: Wed Mar 10 14:14:50 2021 +0200 staging: dpaa2-switch: add fast-ageing on bridge leave Upon leaving a bridge, any MAC addresses learnt on the switch port prior to this point have to be removed so that we preserve the bridging domain configuration. Restructure the dpaa2_switch_port_fdb_dump() function in order to have a common dpaa2_switch_fdb_iterate() function between the FDB dump callback and the fast age procedure. To accomplish this, add a new callback - dpaa2_switch_fdb_cb_t - which will be called on each MAC addr and, depending on the situation, will either dump the FDB entry into a netlink message or will delete the address from the FDB table, in case of the fast-age. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit d671407fccbb022ab6004bd8a8d5f1e970f2ba2e Author: Ioana Ciornei Date: Wed Mar 10 14:14:49 2021 +0200 staging: dpaa2-switch: accept only vlan-aware upper devices The DPAA2 Switch is not capable to handle traffic in a VLAN unaware fashion, thus the previous handling of both the accepted upper devices and the SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING flag was wrong. Fix this by checking if the bridge that we are joining is indeed VLAN aware, if not return an error. Also, the RX VLAN filtering feature is defined as 'on [fixed]' and the .ndo_vlan_rx_add_vid() and .ndo_vlan_rx_kill_vid() callbacks are implemented just by recreating a switchdev_obj_port_vlan object and then calling the same functions used on the switchdev notifier path. In addition, changing the vlan_filtering flag to 0 on a bridge under which a DPAA2 switch interface is present is not supported, thus rejected when SWITCHDEV_ATTR_ID_BRIDGE_VLAN_FILTERING is received with such a request. This patch is also adding the use of the switchdev_handle_port_attr_set function so that we can iterate through all the lower devices of the bridge that the notification was received on and actually catch if the user is trying to change the vlan_filtering state. Since on a VLAN filtering change the net_device is the bridge, we also move the dpaa2_switch_port_dev_check call so that we do not return NOTIFY_DONE right away. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 16abb6ad6abc5ffe45d1e03e9263530b263de2a1 Author: Ioana Ciornei Date: Wed Mar 10 14:14:48 2021 +0200 staging: dpaa2-switch: move the notifier register to module_init() Move the notifier blocks register into the module_init() step, instead of object probe, so that all DPSW devices probed by the dpaa2-switch driver can use the same notifiers. This will enable us to have a more straightforward approach in determining if an event is intended for an object managed by this driver or not. Previously, the dpaa2_switch_port_dev_check() function was forced to also check the notifier block beside the net_device_ops structure to determine if the event is for us or not. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 539dda3c5d190c5088b5e57944b1b482fcb464de Author: Ioana Ciornei Date: Wed Mar 10 14:14:47 2021 +0200 staging: dpaa2-switch: properly setup switching domains Until now, the DPAA2 switch was not capable to properly setup its switching domains depending on the existence, or lack thereof, of a upper bridge device. This meant that all switch ports of a DPSW object were switching by default even though they were not under the same bridge device. Another issue was the inability to actually add the CPU in the flooding domains (broadcast, unknown unicast etc) of a particular switch port. This meant that a simple ping on a switch interface was not possible since no broadcast ARP frame would actually reach the CPU queues. This patch tries to fix exactly these problems by: * Creating and managing a FDB table for each flooding domain. This means that when a switch interface is not bridged it will use its own FDB table. While in bridged mode all DPAA2 switch interfaces under the same upper will use the same FDB table, thus leverage the same FDB entries. * Adding a new MC firmware command - dpsw_set_egress_flood() - through which the driver can setup the flooding domains as needed. For example, when the switch interface is standalone, thus not in a bridge with any other DPAA2 switch port, it will setup its broadcast and unknown unicast flooding domains to only include the control interface (the queues that reach the CPU and the driver can dequeue from). This flooding domain changes when the interface joins a bridge and is configured to include, beside the control interface, all other DPAA2 switch interfaces. We impose a minimum limit of FDB tables available equal to the number of switch interfaces so that we guarantee that, in the maximal configuration - all interfaces are standalone, each switch port will have a private FDB table. At the same time, we only probe DPSW objects that have the flooding and broadcast replicators configured to be per FDB (DPSW_*_PER_FDB). Without this, the dpaa2-switch driver would not be able to configure multiple switching domains. At probe time, a FDB table will be allocated for each port. At a bridge join event, the switch port will either continue to use the current FDB table (if it's the first dpaa2-switch port to join that bridge) or will switch to use the FDB table associated with the port that it's already under the bridge. If a FDB switch is necessary, the private FDB table which was previously used will be returned to the pool of unused FDBs. Upon a bridge leave, the switch port needs a private FDB table thus it will search and get the first unused FDB table. This way, all the other ports remaining under the bridge will continue to use the same FDB table. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 613c0a5810b79610db8535c3816b0c149675f8ee Author: Ioana Ciornei Date: Wed Mar 10 14:14:46 2021 +0200 staging: dpaa2-switch: enable the control interface Enable the CTRL_IF of the switch object, now that all the pieces are in place (buffer and queue management, interrupts, NAPI instances etc). Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7fd94d86b7f4a7f71223bdc1348b897411f2224b Author: Ioana Ciornei Date: Wed Mar 10 14:14:45 2021 +0200 staging: dpaa2-switch: add .ndo_start_xmit() callback Implement the .ndo_start_xmit() callback for the switch port interfaces. For each of the switch ports, gather the corresponding queue destination ID (QDID) necessary for Tx enqueueing. We'll reserve 64 bytes for software annotations, where we keep a skb backpointer used on the Tx confirmation side for releasing the allocated memory. At the moment, we only support linear skbs. Also, add support for the Tx confirmation path which for the most part shares the code path with the normal Rx queue. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 0b1b71370458860579831e77485883fcf2e8fbbe Author: Ioana Ciornei Date: Wed Mar 10 14:14:44 2021 +0200 staging: dpaa2-switch: handle Rx path on control interface The dpaa2-ethsw supports only one Rx queue that is shared by all switch ports. This means that information about which port was the ingress port for a specific frame needs to be passed in metadata. In our case, the Flow Context (FLC) field from the frame descriptor holds this information. Besides the interface ID of the ingress port we also receive the virtual QDID of the port. Below is a visual description of the 64 bits of FLC. 63 47 31 15 0 +---------------------------------------------------+ | | | | | | RESERVED | IF_ID | RESERVED | IF QDID | | | | | | +---------------------------------------------------+ Because all switch ports share the same Rx and Tx conf queues, NAPI management takes into consideration when there is at least one switch interface open to enable the NAPI instance. The Rx path is common, for the most part, for both Rx and Tx conf with the mention that each of them has its own consume function of a frame descriptor. Dequeueing from a FQ, consuming dequeued store and also the NAPI poll function is common between both queues. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 04abc97d3ef789b018a7328e5069bcc6f44ff54a Author: Ioana Ciornei Date: Wed Mar 10 14:14:43 2021 +0200 staging: dpaa2-switch: setup dpio Setup interrupts on the control interface queues. We do not force an exact affinity between the interrupts received from a specific queue and a cpu. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 2877e4f7e189bd8e89b85bfda04fbde319057f50 Author: Ioana Ciornei Date: Wed Mar 10 14:14:42 2021 +0200 staging: dpaa2-switch: setup buffer pool and RX path rings Allocate and setup a buffer pool, needed on the Rx path of the control interface. Also, define the Rx buffer size seen by the WRIOP from the PAGE_SIZE buffers seeded. Also, create the needed Rx rings for both frame queues used on the control interface. On the Rx path, when a pull-dequeue operation is performed on a software portal, available frame descriptors are put in a ring - a DMA memory storage - for further usage. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 26d419f36a23acfaf38cd5e95a539701b2bb4559 Author: Ioana Ciornei Date: Wed Mar 10 14:14:41 2021 +0200 staging: dpaa2-switch: get control interface attributes Introduce a new structure to hold all necessary info related to an RX queue for the control interface and populate the FQ IDs. We only have one Rx queue and one Tx confirmation queue on the control interface, both shared by all the switch ports. Also, increase the minimum version of the object supported by the driver since for a basic switch driver support we'll be in need for some ABIs added in the latest version of firmware. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5dda9a7921c7574ba02939eb3552145aa02c44d9 Author: Ioana Ciornei Date: Wed Mar 10 14:14:40 2021 +0200 staging: dpaa2-switch: remove obsolete .ndo_fdb_{add|del} callbacks Since the dpaa2-switch already listens for SWITCHDEV_FDB_ADD_TO_DEVICE / SWITCHDEV_FDB_DEL_TO_DEVICE events emitted by the bridge, we don't need the bridge bypass operations, and now is a good time to delete them. All 'bridge fdb' commands need the 'master' flag specified now. In fact, having the obsolete .ndo_fdb_{add|del} callbacks would even complicate the bridge leave/join procedures without any real benefit. Every FDB entry is installed in an FDB ID as far as the hardware is concerned, and the dpaa2-switch ports change their FDB ID when they join or leave a bridge. So we would need to manually delete these FDB entries when the FDB ID changes. That's because, unlike FDB entries added through switchdev, where the bridge automatically deletes those on leave, there isn't anybody who will remove the static FDB entries installed via the bridge bypass operations upon a change in the upper device. Note that we still need .ndo_fdb_dump though. The dpaa2-switch does not emit any interrupts when a new address is learnt, so we cannot keep the bridge FDB in sync with the hardware FDB. Therefore, we need this callback to get a chance to print the FDB entries that were dynamically learnt by our hardware. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 282d47de29c766621b4d340aff89f6c239fc47e2 Author: Ioana Ciornei Date: Wed Mar 10 14:14:39 2021 +0200 staging: dpaa2-switch: fix up initial forwarding configuration done by firmware By default, the DPSW object is configured with VLAN ID 1 in the VLAN table, which all ports are member of. This entry in the VLAN table selects the same FDB ID for all ports, meaning that forwarding between ports is permitted. This is unlike the switchdev model, where each port should operate as standalone by default. To make the switch operate in standalone ports mode, we need the VLAN table to select a unique FDB ID for each port. In order to do that, we need to simply delete the VLAN 1 created automatically by firmware, and let dpaa2_switch_port_init take over, by readding VLAN ID 1, but pointing towards a unique FDB ID. Signed-off-by: Ioana Ciornei Signed-off-by: David S. Miller commit 93a4d0ab1e444f83fa79b85981e6c4818bb580dc Author: Ioana Ciornei Date: Wed Mar 10 14:14:38 2021 +0200 staging: dpaa2-switch: remove broken learning and flooding support This patch is removing the current configuration of learning and flooding states per switch port because they are essentially broken in terms of integration with the switchdev APIs and the bridge understanding of these states. First of all, the learning state is a per switch port configuration while the dpaa2-switch driver was using it to configure the entire bridging domain. This is broken since the software learning state could be out of sync with the hardware state when ports from the same bridging domain are configured by the user with different learning parameters. The BR_FLOOD flag has been misinterpreted as well. Instead of denoting whether unicast traffic for which there is no FDB entry will be flooded towards a given port, the dpaa2-switch used the flag to configure whether or not a frame with an unknown destination received on a given port should be flooded or not. In summary, it was used as ingress setting instead of a egress one. Also, remove the unnecessary call to dpsw_if_set_broadcast() and the API definition. The HW default is to let all switch ports to be able to flood broadcast traffic thus there is no need to call the API again. Instead of trying to patch things up, just remove the support for the moment so that we'll add it back cleanly once the driver is out of staging. Signed-off-by: Ioana Ciornei Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller commit 157611c895d99e12808b01d0fecc451842e1d754 Merge: e2359fad458a3 7a5222cb7a56f Author: David S. Miller Date: Wed Mar 10 13:14:15 2021 -0800 Merge branch 'enetc-cleanups' Vladimir Oltean says: ==================== Refactoring/cleanup for NXP ENETC This series performs the following: - makes the API for Control Buffer Descriptor Rings in enetc_cbdr.c a bit more tightly knit. - moves more logic into enetc_rxbd_next to make the callers simpler - moves more logic into enetc_refill_rx_ring to make the callers simpler - removes forward declarations - simplifies the probe path to unify probing for used and unused PFs. Nothing radical. ==================== Signed-off-by: David S. Miller commit 7a5222cb7a56fc186141b816a4c68adf42ce523f Author: Vladimir Oltean Date: Wed Mar 10 14:03:51 2021 +0200 net: enetc: make enetc_refill_rx_ring update the consumer index Since commit fd5736bf9f23 ("enetc: Workaround for MDIO register access issue"), enetc_refill_rx_ring no longer updates the RX BD ring's consumer index, that is left to be done by the caller. This has led to bugs such as the ones found in 96a5223b918c ("net: enetc: remove bogus write to SIRXIDR from enetc_setup_rxbdr") and 3a5d12c9be6f ("net: enetc: keep RX ring consumer index in sync with hardware"), so it is desirable that we move back the update of the consumer index into enetc_refill_rx_ring. The trouble with that is the different MDIO locking context for the two callers of enetc_refill_rx_ring: - enetc_clean_rx_ring runs under enetc_lock_mdio() - enetc_setup_rxbdr runs outside enetc_lock_mdio() Simplify the callers of enetc_refill_rx_ring by making enetc_setup_rxbdr explicitly take enetc_lock_mdio() around the call. It will be the only place in need of ensuring the hot accessors can be used. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 0486185ee2442ce8fa4d4345509b439ca6b4a717 Author: Vladimir Oltean Date: Wed Mar 10 14:03:50 2021 +0200 net: enetc: remove forward declaration for enetc_map_tx_buffs There is no other reason why this forward declaration exists rather than poor ordering of the functions. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 8580b3c3d786e739e6073438d1da0218ca436939 Author: Vladimir Oltean Date: Wed Mar 10 14:03:49 2021 +0200 net: enetc: remove forward-declarations of enetc_clean_{rx,tx}_ring This patch moves the NAPI enetc_poll after enetc_clean_rx_ring such that we can delete the forward declarations. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 7f071a450b08801a14c4f6eecdb6881492dd8860 Author: Vladimir Oltean Date: Wed Mar 10 14:03:48 2021 +0200 net: enetc: use enum enetc_active_offloads The active_offloads variable of enetc_ndev_priv has an enum type, use it. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit c027aa9201eb9af8067282d4b8a7ce7523cd3c8d Author: Vladimir Oltean Date: Wed Mar 10 14:03:47 2021 +0200 net: enetc: simplify callers of enetc_rxbd_next When we iterate through the BDs in the RX ring, the software producer index (which is already passed by value to enetc_rxbd_next) lags behind, and we end up with this funny looking "++i == rx_ring->bd_count" check so that we drag it after us. Let's pass the software producer index "i" by reference, so that enetc_rxbd_next can increment it by itself (mod rx_ring->bd_count), especially since enetc_rxbd_next has to increment the index anyway. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 4b47c0b81ffd9b395b5afc3ef41c69cceb6a8576 Author: Vladimir Oltean Date: Wed Mar 10 14:03:46 2021 +0200 net: enetc: don't initialize unused ports from a separate code path Since commit 3222b5b613db ("net: enetc: initialize RFS/RSS memories for unused ports too") there is a requirement to initialize the memories of unused PFs too, which has left the probe path in a bit of a rough shape, because we basically have a minimal initialization path for unused PFs which is separate from the main initialization path. Now that initializing a control BD ring is as simple as calling enetc_setup_cbdr, let's move that outside of enetc_alloc_si_resources (unused PFs don't need classification rules, so no point in allocating them just to free them later). But enetc_alloc_si_resources is called both for PFs and for VFs, so now that enetc_setup_cbdr is no longer called from this common function, it means that the VF probe path needs to explicitly call enetc_setup_cbdr too. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 5b4daa7f1256669fe4eb215c77a88c55ad24f26e Author: Vladimir Oltean Date: Wed Mar 10 14:03:45 2021 +0200 net: enetc: pass bd_count as an argument to enetc_setup_cbdr It makes no sense from an API perspective to first initialize some portion of struct enetc_cbdr outside enetc_setup_cbdr, then leave that function to initialize the rest. enetc_setup_cbdr should be able to perform all initialization given a zero-initialized struct enetc_cbdr. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 0bfde022b345763df70fdc73bcb5ab8943589487 Author: Vladimir Oltean Date: Wed Mar 10 14:03:44 2021 +0200 net: enetc: squash clear_cbdr and free_cbdr into teardown_cbdr All call sites call enetc_clear_cbdr and enetc_free_cbdr one after another, so let's combine the two functions into a single method named enetc_teardown_cbdr which does both, and in the same order. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 27f9025d49416e35bd7f1cedc9edd0388612501f Author: Vladimir Oltean Date: Wed Mar 10 14:03:43 2021 +0200 net: enetc: save the mode register address inside struct enetc_cbdr enetc_clear_cbdr depends on struct enetc_hw because it must disable the ring through a register write. We'd like to remove that dependency, so let's do what's already done with the producer and consumer indices, which is to save the iomem address in a variable kept in struct enetc_cbdr. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 24be14e3260ad8f5b926da8ad0bc0067435e7340 Author: Vladimir Oltean Date: Wed Mar 10 14:03:42 2021 +0200 net: enetc: squash enetc_alloc_cbdr and enetc_setup_cbdr enetc_alloc_cbdr and enetc_setup_cbdr are always called one after another, so we can simplify the callers and make enetc_setup_cbdr do everything that's needed. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 01121ab73924d355091d9c8a3b593a361ea4a5ae Author: Vladimir Oltean Date: Wed Mar 10 14:03:41 2021 +0200 net: enetc: save the DMA device for enetc_free_cbdr We shouldn't need to pass the struct device *dev to enetc CBDR APIs over and over again, so save this inside struct enetc_cbdr::dma_dev and avoid calling it from the enetc_free_cbdr functions. This breaks the dependency of the cbdr API from struct enetc_si (the station interface). Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit 176769d10f96aa695786b000c9cacb13e48189f9 Author: Vladimir Oltean Date: Wed Mar 10 14:03:40 2021 +0200 net: enetc: move the CBDR API to enetc_cbdr.c Since there is a dedicated file in this driver for interacting with control BD rings, it makes sense to move these functions there. Signed-off-by: Vladimir Oltean Signed-off-by: David S. Miller commit d9b7eae8e3424c3480fe9f40ebafbb0c96426e4c Author: Qiuxu Zhuo Date: Mon Feb 22 09:17:17 2021 +0800 PCI/RCEC: Fix RCiEP device to RCEC association rcec_assoc_rciep() used "rciep->devfn" (a single byte encoding both the device and function number) as the device number to check whether the corresponding bit was set in the RCEC's Association Bitmap for RCiEPs. But per PCIe r5.0, sec 7.9.10.2, "Association Bitmap for RCiEPs", the 32-bit bitmap contains one bit per device. That bit applies to all functions of the device. Fix rcec_assoc_rciep() to convert the value of "rciep->devfn" to a device number to ensure that RCiEP devices are correctly associated with the RCEC. Reported-and-tested-by: Wen Jin Fixes: 507b460f8144 ("PCI/ERR: Add pcie_link_rcec() to associate RCiEPs") Link: https://lore.kernel.org/r/20210222011717.43266-1-qiuxu.zhuo@intel.com Signed-off-by: Qiuxu Zhuo Signed-off-by: Bjorn Helgaas Reviewed-by: Sean V Kelley commit e2359fad458a396df0673bc5d876f44ce700439d Merge: a3c392302aba5 4e052626b1a86 Author: David S. Miller Date: Wed Mar 10 13:08:15 2021 -0800 Merge branch 'defxx-updates' Maciej W. Rozycki says: ==================== FDDI: defxx: CSR access fixes and improvements As a lab upgrade I have recently replaced a dated 32-bit x86 server with a new POWER9 system. One of the purposes of the system has been providing network based resources to clients over my FDDI network. As such the new server has also received a new DEFPA FDDI network adapter. As it turned out the interface did not work with the driver as shipped by the most recent stable Debian release (Linux version 5.9.15) for ppc64el. Symptoms were inconclusive, and the DEFPA adapter turned out to have a manufacturing defect as well, however eventually I have figured out the PCIe host bridge used with the system, Power Systems Host Bridge 4 (PHB4), does not (anymore) implement PCI I/O transactions, while the binary defxx driver as shipped by Debian comes configured for port I/O, and then a bug in resource handling causes the driver to try and use an unassigned port I/O range for adapter's PDQ main ASIC's CSR access. Fortunately the PFI PCI interface ASIC used with the DEFPA adapter has been designed such as to provide for both PCI I/O and PCI memory accesses to be used for PDQ CSR access, via a pair of BARs to be alternatively used. Originally the defxx driver only supported port I/O access, but in the course of interfacing it to the TURBOchannel bus I had to implement MMIO access too, and while at it I have added a kernel configuration option to globally switch between port I/O and MMIO at compilation time, however conservatively defaulting to port I/O for EISA bus support where the use of MMIO currently requires the adapter to have been suitably configured via ECU (EISA Configuration Utility), supplied externally. With the kernel configuration option set to MMIO the DEFPA interface works correctly with my POWER9 system. Therefore I have prepared this small patch series consisting of a pair of conservative bug fixes, to be backported to stable branches, and then a pair of improvements for the robustness of the driver. So changes 1/4 and 2/4 apply both to net and net-next, and then changes 3/4 and 4/4 apply on top of them to net-next only. In particular there are diff context dependencies going like this: 1/4 -> 3/4 -> 4/4. Let me know if this submission needs to be sorted differently. See individual change descriptions for further details as to the actual changes made. NB the ESIC interface chip used for slave address decoding with the DEFEA EISA adapter has decoding implemented for address bits 31:10 and therefore supports full 32-bit range for the allocation of the CSR decoding window. For DOS compatibility reasons ECU however only allows allocations between 0x000c0000 and 0x000effff. Given that for other compatibility reasons EISA is subtractively decoded on mixed PCI/EISA systems we could allocate an MMIO region from arbitrary unoccupied memory space and program the ESIC suitably without regard for that compatibility limitation. In fact I have a proof-of-concept change and it seems to work reliably. However with these patches applied the driver continues supporting port I/O as fallback and the EISA product ID register is located in the EISA slot-specific port I/O address space, so any EISA system however modern (sounds like a joke, eh?) also has to support port I/O access somehow. So while I think such a dynamic MMIO allocation would be an example of good engineering, but it would require changes to our EISA core and therefore it may have had sense 25 years ago when EISA was still mainstream, but not nowadays when EISA systems are I suppose more of a curiosity rather than the usual equipment. This patch series has been thoroughly verified with Linux 5.11.0 as released and then a Raptor Talos II POWER9 system and a Malta 5Kc MIPS64 system for PCI DEFPA adapter support, an Advanced Integrated Research 486EI x86 system for EISA DEFEA adapter support, and a Digital Equipment DECstation 5000 model 260 MIPS III system for TURBOchannel DEFTA adapter support, covering both port I/O and MMIO operation where applicable. ==================== Signed-off-by: David S. Miller commit 4e052626b1a86988f92e60afd4a05f088b75c7bb Author: Maciej W. Rozycki Date: Wed Mar 10 13:03:24 2021 +0100 FDDI: defxx: Use driver's name with resource requests Replace repeated "defxx" strings with a reference to the DRV_NAME macro and then use the driver's name rather that the bus address with resource requests so as to have contents of /proc/iomem and /proc/ioports more meaningful to the user, in line with what drivers usually do. So rather than say: 5000-50ff : DEC FDDIcontroller/EISA Adapter 5000-503f : 00:05 5040-5043 : 00:05 5400-54ff : DEC FDDIcontroller/EISA Adapter 5800-58ff : DEC FDDIcontroller/EISA Adapter 5c00-5cff : DEC FDDIcontroller/EISA Adapter 5c80-5cbf : 00:05 or: 620c080020000-620c08002007f : 0031:02:04.0 620c080020000-620c08002007f : 0031:02:04.0 620c080030000-620c08003ffff : 0031:02:04.0 or: 1f100000-1f10003f : tc2 we report: 5000-50ff : DEC FDDIcontroller/EISA Adapter 5000-503f : defxx 5040-5043 : defxx 5400-54ff : DEC FDDIcontroller/EISA Adapter 5800-58ff : DEC FDDIcontroller/EISA Adapter 5c00-5cff : DEC FDDIcontroller/EISA Adapter 5c80-5cbf : defxx and: 620c080020000-620c08002007f : 0031:02:04.0 620c080020000-620c08002007f : defxx 620c080030000-620c08003ffff : 0031:02:04.0 and: 1f100000-1f10003f : defxx respectively for the DEFEA (EISA), DEFPA (PCI), and DEFTA (TURBOchannel) adapters. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit 795e272e54746e97fde54454873d384d5012cc9d Author: Maciej W. Rozycki Date: Wed Mar 10 13:03:19 2021 +0100 FDDI: defxx: Implement dynamic CSR I/O address space selection Recent versions of the PCI Express specification have deprecated support for I/O transactions and actually some PCIe host bridges, such as Power Systems Host Bridge 4 (PHB4), do not implement them. Conversely a DEFEA adapter can have its MMIO decoding disabled with ECU (EISA Configuration Utility) and therefore not available for us with the resource allocation infrastructure we implement. However either I/O address space will always be available for use with the DEFEA (EISA) and DEFPA (PCI) adapters and both have double address decoding implemented in hardware for Control and Status Register access. The two kinds of adapters can be present both at once in a single mixed PCI/EISA system. For the DEFTA (TURBOchannel) variant there is no issue as there has been no port I/O address space defined for that bus. To make people's life easier and the driver more robust remove the DEFXX_MMIO configuration option so as to rather than making the choice for the I/O address space to use at build time for all the adapters installed in the system let the driver choose the most suitable address space dynamically on a case-by-case basis at run time. Make MMIO the default and resort to port I/O should the default fail for some reason. This way multiple adapters installed in one system can use different I/O address spaces each, in particular in the presence of DEFEA adapters in a pure-EISA or a mixed EISA/PCI system (it is expected that DEFPA boards will use MMIO in normal circumstances). The choice of the I/O address space to use continues being reported by the driver on startup, e.g.: eisa 00:05: EISA: slot 5: DEC3002 detected defxx: v1.12 2021/03/10 Lawrence V. Stefani and others 00:05: DEFEA at I/O addr = 0x5000, IRQ = 10, Hardware addr = 00-00-f8-c8-b3-b6 00:05: registered as fddi0 and: defxx: v1.12 2021/03/10 Lawrence V. Stefani and others 0031:02:04.0: DEFPA at MMIO addr = 0x620c080020000, IRQ = 57, Hardware addr = 00-60-6d-93-91-98 0031:02:04.0: registered as fddi0 and: defxx: v1.12 2021/03/10 Lawrence V. Stefani and others tc2: DEFTA at MMIO addr = 0x1f100000, IRQ = 21, Hardware addr = 08-00-2b-b0-8b-1e tc2: registered as fddi0 so there is no need to add further information. The change is supposed to cause a negligible performance hit as I/O accessors will now have code executed conditionally at run time. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit 193ced4a79599352d63cb8c9e2f0c6043106eb6a Author: Maciej W. Rozycki Date: Wed Mar 10 13:03:14 2021 +0100 FDDI: defxx: Make MMIO the configuration default except for EISA Recent versions of the PCI Express specification have deprecated support for I/O transactions and actually some PCIe host bridges, such as Power Systems Host Bridge 4 (PHB4), do not implement them. The default kernel configuration choice for the defxx driver is the use of I/O ports rather than MMIO for PCI and EISA systems. It may have made sense as a conservative backwards compatible choice back when MMIO operation support was added to the driver as a part of TURBOchannel bus support. However nowadays this configuration choice makes the driver unusable with systems that do not implement I/O transactions for PCIe. Make DEFXX_MMIO the configuration default then, except where configured for EISA. This exception is because an EISA adapter can have its MMIO decoding disabled with ECU (EISA Configuration Utility) and therefore not available with the resource allocation infrastructure we implement, while port I/O is always readily available as it uses slot-specific addressing, directly mapped to the slot an option card has been placed in and handled with our EISA bus support core. Conversely a kernel that supports modern systems which may not have I/O transactions implemented for PCIe will usually not be expected to handle legacy EISA systems. The change of the default will make it easier for people, including but not limited to distribution packagers, to make a working choice for the driver. Update the option description accordingly and while at it replace the potentially ambiguous PIO acronym with IOP for "port I/O" vs "I/O ports" according to our nomenclature used elsewhere. Signed-off-by: Maciej W. Rozycki Fixes: e89a2cfb7d7b ("[TC] defxx: TURBOchannel support") Cc: stable@vger.kernel.org # v2.6.21+ Signed-off-by: David S. Miller commit f626ca682912fab55dff15469ce893ae16b65c7e Author: Maciej W. Rozycki Date: Wed Mar 10 13:03:09 2021 +0100 FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR Recent versions of the PCI Express specification have deprecated support for I/O transactions and actually some PCIe host bridges, such as Power Systems Host Bridge 4 (PHB4), do not implement them. For those systems the PCI BARs that request a mapping in the I/O space have the length recorded in the corresponding PCI resource set to zero, which makes it unassigned: # lspci -s 0031:02:04.0 -v 0031:02:04.0 FDDI network controller: Digital Equipment Corporation PCI-to-PDQ Interface Chip [PFI] FDDI (DEFPA) (rev 02) Subsystem: Digital Equipment Corporation FDDIcontroller/PCI (DEFPA) Flags: bus master, medium devsel, latency 136, IRQ 57, NUMA node 8 Memory at 620c080020000 (32-bit, non-prefetchable) [size=128] I/O ports at [disabled] Memory at 620c080030000 (32-bit, non-prefetchable) [size=64K] Capabilities: [50] Power Management version 2 Kernel driver in use: defxx Kernel modules: defxx # Regardless the driver goes ahead and requests it (here observed with a Raptor Talos II POWER9 system), resulting in an odd /proc/ioport entry: # cat /proc/ioports 00000000-ffffffffffffffff : 0031:02:04.0 # Furthermore, the system gets confused as the driver actually continues and pokes at those locations, causing a flood of messages being output to the system console by the underlying system firmware, like: defxx: v1.11 2014/07/01 Lawrence V. Stefani and others defxx 0031:02:04.0: enabling device (0140 -> 0142) LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010000 IPMI: dropping non severe PEL event LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010014 IPMI: dropping non severe PEL event LPC[000]: Got SYNC no-response error. Error address reg: 0xd0010014 IPMI: dropping non severe PEL event and so on and so on (possibly intermixed actually, as there's no locking between the kernel and the firmware in console port access with this particular system, but cleaned up above for clarity), and once some 10k of such pairs of the latter two messages have been produced an interace eventually shows up in a useless state: 0031:02:04.0: DEFPA at I/O addr = 0x0, IRQ = 57, Hardware addr = 00-00-00-00-00-00 This was not expected to happen as resource handling was added to the driver a while ago, because it was not known at that time that a PCI system would be possible that cannot assign port I/O resources, and oddly enough `request_region' does not fail, which would have caught it. Correct the problem then by checking for the length of zero for the CSR resource and bail out gracefully refusing to register an interface if that turns out to be the case, producing messages like: defxx: v1.11 2014/07/01 Lawrence V. Stefani and others 0031:02:04.0: Cannot use I/O, no address set, aborting 0031:02:04.0: Recompile driver with "CONFIG_DEFXX_MMIO=y" Keep the original check for the EISA MMIO resource as implemented, because in that case the length is hardwired to 0x400 as a consequence of how the compare/mask address decoding works in the ESIC chip and it is only the base address that is set to zero if MMIO has been disabled for the adapter in EISA configuration, which in turn could be a valid bus address in a legacy-free system implementing PCI, especially for port I/O. Where the EISA MMIO resource has been disabled for the adapter in EISA configuration this arrangement keeps producing messages like: eisa 00:05: EISA: slot 5: DEC3002 detected defxx: v1.11 2014/07/01 Lawrence V. Stefani and others 00:05: Cannot use MMIO, no address set, aborting 00:05: Recompile driver with "CONFIG_DEFXX_MMIO=n" 00:05: Or run ECU and set adapter's MMIO location with the last two lines now swapped for easier handling in the driver. There is no need to check for and catch the case of a port I/O resource not having been assigned for EISA as the adapter uses the slot-specific I/O space, which gets assigned by how EISA has been specified and maps directly to the particular slot an option card has been placed in. And the EISA variant of the adapter has additional registers that are only accessible via the port I/O space anyway. While at it factor out the error message calls into helpers and fix an argument order bug with the `pr_err' call now in `dfx_register_res_err'. Signed-off-by: Maciej W. Rozycki Fixes: 4d0438e56a8f ("defxx: Clean up DEFEA resource management") Cc: stable@vger.kernel.org # v3.19+ Signed-off-by: David S. Miller commit a3c392302aba558c3ef805ea488538c154c3fd0c Merge: 13fdb9403d9ec 4734a750f4674 Author: David S. Miller Date: Wed Mar 10 13:04:58 2021 -0800 Merge branch 'mlxsw-misc-updates' Ido Schimmel says: ==================== mlxsw: Misc updates This patch set contains miscellaneous updates for mlxsw. Patches #1-#2 reword an extack message to make it clearer and fix a comment. Patch #3 bumps the minimum firmware version enforced by mlxsw. This is needed for two upcoming features: Resilient hashing and per-flow sampling. Patches #4-#6 improve the information reported via devlink-health for 'fw_fatal' events. ==================== Signed-off-by: David S. Miller commit 4734a750f4674631ab9896189810b57700597aa7 Author: Danielle Ratson Date: Wed Mar 10 13:02:20 2021 +0200 mlxsw: Adjust some MFDE fields shift and size to fw implementation MFDE.irisc_id and MFDE.event_id were adjusted according to what is actually implemented in firmware. Adjust the shift and size of these fields in mlxsw as well. Note that the displacement of the first field is not a regression. It was always incorrect and therefore reported "0". Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 315afd2068a861650510f31cfed11c138062172a Author: Danielle Ratson Date: Wed Mar 10 13:02:19 2021 +0200 mlxsw: core: Expose MFDE.log_ip to devlink health Add the MFDE.log_ip field to devlink health reporter in order to ease firmware debug. This field encodes the instruction pointer that triggered the CR space timeout. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit ff12ba3ad78db47f8c824841259c7cc188f37f19 Author: Danielle Ratson Date: Wed Mar 10 13:02:18 2021 +0200 mlxsw: reg: Extend MFDE register with new log_ip field Extend MFDE (Monitoring FW Debug) register with new field specifying the instruction pointer that triggered the CR space timeout. Signed-off-by: Danielle Ratson Reviewed-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 2ab781c2ccf477012489e30ad0f1c1aa42398437 Author: Petr Machata Date: Wed Mar 10 13:02:17 2021 +0200 mlxsw: spectrum: Bump minimum FW version to xx.2008.2406 The indicated version fixes the following two issues: - MIRROR_SAMPLER_ACTION.mirror_probability_rate inverted. This has implication for per-flow sampling. - When adjacency is replaced-if-inactive (RATR.opcode=3), bad parameter was reported when replacing an active entry. This breaks offload of resilient next-hop groups. Signed-off-by: Petr Machata Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 675e5a1e1afa4cb20337f83c9e885cae977c87cc Author: Amit Cohen Date: Wed Mar 10 13:02:16 2021 +0200 mlxsw: reg: Fix comment about slot_index field in PMAOS register The comment did not include the register name. Add `pmaos` to align the comment with other comments. Signed-off-by: Amit Cohen Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 825e8885779d62c34eb78769fe32caab92b08a98 Author: Danielle Ratson Date: Wed Mar 10 13:02:15 2021 +0200 mlxsw: spectrum: Reword an error message for Q-in-Q veto 'Uppers' is not clear enough for all users when referring to upper devices. Reword the error message so it will be clearer. Signed-off-by: Danielle Ratson Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller commit 13fdb9403d9ec41ab237d039db6c263788a2b587 Author: Shubhankar Kuranagatti Date: Thu Mar 11 02:03:14 2021 +0530 net: ipv6: route.c:fix indentation The series of space has been replaced by tab space wherever required. Signed-off-by: Shubhankar Kuranagatti Signed-off-by: David S. Miller commit 847cbfc014adafeac401e19e349b0fd524f201c3 Author: Vladimir Oltean Date: Wed Mar 10 16:50:44 2021 +0200 net: add a helper to avoid issues with HW TX timestamping and SO_TXTIME As explained in commit 29d98f54a4fe ("net: enetc: allow hardware timestamping on TX queues with tc-etf enabled"), hardware TX timestamping requires an skb with skb->tstamp = 0. When a packet is sent with SO_TXTIME, the skb->skb_mstamp_ns corrupts the value of skb->tstamp, so the drivers need to explicitly reset skb->tstamp to zero after consuming the TX time. Create a helper named skb_txtime_consumed() which does just that. All drivers which offload TC_SETUP_QDISC_ETF should implement it, and it would make it easier to assess during review whether they do the right thing in order to be compatible with hardware timestamping or not. Suggested-by: Vinicius Costa Gomes Signed-off-by: Vladimir Oltean Acked-by: Vinicius Costa Gomes Signed-off-by: David S. Miller commit aa27b8f7a048f1cf888b1cb67160e26e069a263c Author: Maciej W. Rozycki Date: Wed Mar 10 13:02:54 2021 +0100 FDDI: defza: Update my e-mail address Following the recent update to MAINTAINERS update my e-mail address. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit 4d248c0deea53af92c170cdfb1a127c07ccc190d Author: Maciej W. Rozycki Date: Wed Mar 10 13:02:49 2021 +0100 FDDI: defxx: Update my e-mail address Following the recent update to MAINTAINERS update my e-mail address. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit e56763ee50a3f28d2f70355ca43fb78d8539a183 Author: Maciej W. Rozycki Date: Wed Mar 10 13:02:42 2021 +0100 FDDI: if_fddi.h: Update my e-mail address Following the recent update to MAINTAINERS update my e-mail address. Signed-off-by: Maciej W. Rozycki Signed-off-by: David S. Miller commit 58c04397f74b7e949751663ac1dbfb4e964c389d Author: Ido Schimmel Date: Wed Mar 10 12:33:20 2021 +0200 sched: act_sample: Implement stats_update callback Implement this callback in order to get the offloaded stats added to the kernel stats. Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Reviewed-by: Jiri Pirko Signed-off-by: David S. Miller commit 762c1adb1c15655307b079393f14f098d135f051 Author: Yang Li Date: Wed Mar 10 16:53:04 2021 +0800 isdn: mISDN: remove unneeded variable 'ret' Fix the following coccicheck warning: ./drivers/isdn/mISDN/dsp_core.c:956:6-9: Unneeded variable: "err". Return "0" on line 1001 Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: David S. Miller commit 3559c1ea4336636c886002996d50805365d3055c Author: Rafał Miłecki Date: Wed Mar 10 09:48:13 2021 +0100 net: broadcom: bcm4908_enet: read MAC from OF BCM4908 devices have MAC address accessible using NVMEM so it's needed to use OF helper for reading it. Signed-off-by: Rafał Miłecki Signed-off-by: David S. Miller commit 1ddc3229ad3c40840c24a699ada5cfeb4319b578 Author: Yunsheng Lin Date: Wed Mar 10 16:28:58 2021 +0800 skbuff: remove some unnecessary operation in skb_segment_list() gro list uses skb_shinfo(skb)->frag_list to link two skb together, and NAPI_GRO_CB(p)->last->next is used when there are more skb, see skb_gro_receive_list(). gso expects that each segmented skb is linked together using skb->next, so only the first skb->next need to set to skb_shinfo(skb)-> frag_list when doing gso list segment. It is the same reason that nskb->next does not need to be set to list_skb before goto the error handling, because nskb->next already pointers to list_skb. And nskb is also the last skb at the end of loop, so remove tail variable and use nskb instead. Signed-off-by: Yunsheng Lin Signed-off-by: David S. Miller commit 134639e9cc0f921c2c3ad44a5bea00219f8b0ada Author: Gustavo A. R. Silva Date: Wed Mar 10 00:07:01 2021 -0600 qed: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding a couple of break statements instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Reviewed-by: Igor Russkikh Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 71ae2cb30531725dbc53329e2aac42294692a008 Author: Gustavo A. R. Silva Date: Tue Mar 9 23:45:22 2021 -0600 net: plip: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 90d181ca488f466904ea59dd5c836f766b69c71b Author: Gustavo A. R. Silva Date: Tue Mar 9 23:43:45 2021 -0600 net: rose: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by explicitly adding multiple break statements instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit b1866bfff9223e4d15727e05a865b744a163eff2 Author: Gustavo A. R. Silva Date: Tue Mar 9 23:42:43 2021 -0600 net: core: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit ecd1c6a51fcc0389d0dd3e3ea70edab3520f487d Author: Gustavo A. R. Silva Date: Tue Mar 9 23:41:15 2021 -0600 net: bridge: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Acked-by: Nikolay Aleksandrov Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 5646fba6eaff6b8da23f6e29b88218b4de4dac78 Author: Gustavo A. R. Silva Date: Tue Mar 9 23:39:41 2021 -0600 net: ax25: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 4cdbe58b4b3c98153790e0a2dcb1b0ec97d03c9a Author: Gustavo A. R. Silva Date: Tue Mar 9 23:38:11 2021 -0600 decnet: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 2a86b4a7f7ff8413490134104d7bdad7a693deaf Author: Gustavo A. R. Silva Date: Tue Mar 9 23:37:02 2021 -0600 net: cassini: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 097c8ff042e3430a148d624b3c5bf0677dce3007 Author: Gustavo A. R. Silva Date: Tue Mar 9 23:34:53 2021 -0600 net: 3c509: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit fdeadd6e49b32115c233e5b090dac419b9922a1b Author: Gustavo A. R. Silva Date: Tue Mar 9 23:33:16 2021 -0600 net: mscc: ocelot: Fix fall-through warnings for Clang In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning by explicitly adding a break statement instead of just letting the code fall through to the next case. Signed-off-by: Gustavo A. R. Silva Reviewed-by: Vladimir Oltean Link: https://github.com/KSPP/linux/issues/115 Signed-off-by: David S. Miller commit 537a0c5c4218329990dc8973068f3bfe5c882623 Author: Gustavo A. R. Silva Date: Tue Mar 9 23:30:20 2021 -0600 net: fddi: skfp: smt: 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]. Refactor the code according to the use of flexible-array members in smt_sif_operation structure, instead of one-element arrays. Also, make use of the struct_size() helper instead of the open-coded version to calculate the size of the struct-with-flex-array. Additionally, make use of the typeof operator to properly determine the object type to be passed to macro smtod(). Also, this helps the ongoing efforts to enable -Warray-bounds by fixing the following warnings: CC [M] drivers/net/fddi/skfp/smt.o drivers/net/fddi/skfp/smt.c: In function ‘smt_send_sif_operation’: drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ | ^~~ drivers/net/fddi/skfp/smt.c:1084:30: warning: array subscript 1 is above array bounds of ‘struct smt_p_lem[1]’ [-Warray-bounds] 1084 | smt_fill_lem(smc,&sif->lem[i],i) ; | ~~~~~~~~^~~ In file included from drivers/net/fddi/skfp/h/smc.h:42, from drivers/net/fddi/skfp/smt.c:15: drivers/net/fddi/skfp/h/smt.h:767:19: note: while referencing ‘lem’ 767 | struct smt_p_lem lem[1] ; /* phy lem status */ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.10/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Signed-off-by: Gustavo A. R. Silva Signed-off-by: David S. Miller commit 3e6f20e09a455d95e61c60d03a9994848b0f853c Author: Yejune Deng Date: Wed Mar 10 11:23:43 2021 +0800 net/rds: Drop duplicate sin and sin6 assignments There is no need to assign the msg->msg_name to sin or sin6, because there is DECLARE_SOCKADDR statement. Signed-off-by: Yejune Deng Signed-off-by: David S. Miller commit 4b18d5d1b2bab6d6ee20854c570bf29b560e9734 Author: Wang Qing Date: Wed Mar 10 11:06:46 2021 +0800 net: ethernet: chelsiofix: spelling typo of 'rewriteing' rewriteing -> rewriting Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit 67a580aad1797938a1492f41f3f1447e751969e8 Author: Wang Qing Date: Wed Mar 10 11:06:03 2021 +0800 drivers: isdn: mISDN: fix spelling typo of 'wheter' wheter -> whether Signed-off-by: Wang Qing Signed-off-by: David S. Miller commit 97c2c69e1926260c78c7f1c0b2c987934f1dc7a1 Author: Xuan Zhuo Date: Wed Mar 10 10:24:45 2021 +0800 virtio-net: support XDP when not more queues The number of queues implemented by many virtio backends is limited, especially some machines have a large number of CPUs. In this case, it is often impossible to allocate a separate queue for XDP_TX/XDP_REDIRECT, then xdp cannot be loaded to work, even xdp does not use the XDP_TX/XDP_REDIRECT. This patch allows XDP_TX/XDP_REDIRECT to run by reuse the existing SQ with __netif_tx_lock() hold when there are not enough queues. Signed-off-by: Xuan Zhuo Reviewed-by: Dust Li Acked-by: Jason Wang Signed-off-by: David S. Miller commit 0bb3262c0248d44aea3be31076f44beb82a7b120 Author: Menglong Dong Date: Tue Mar 9 17:51:35 2021 -0800 net: socket: use BIT() for MSG_* The bit mask for MSG_* seems a little confused here. Replace it with BIT() to make it clear to understand. Signed-off-by: Menglong Dong Signed-off-by: David S. Miller commit e35ecb466eb63c2311783208547633f90742d06d Author: Bernard Metzler Date: Fri Feb 19 15:34:41 2021 +0100 RDMA/iwcm: Allow AFONLY binding for IPv6 addresses Binding IPv6 address/port to AF_INET6 domain only is provided via rdma_set_afonly(), but was not signalled to the provider. Applications like NFS/RDMA bind the same port to both IPv4 and IPv6 addresses simultaneously and thus rely on it working correctly. Link: https://lore.kernel.org/r/20210219143441.1068-1-bmt@zurich.ibm.com Tested-by: Chuck Lever Tested-by: Benjamin Coddington Signed-off-by: Bernard Metzler Signed-off-by: Jason Gunthorpe commit a348ff97ffb840b9d74b0e64b3e0e6002187d224 Author: Rafał Miłecki Date: Tue Mar 9 19:44:09 2021 +0100 arm64: dts: broadcom: bcm4908: fix switch parent node name Ethernet switch and MDIO are grouped using "simple-bus". It's not allowed to use "ethernet-switch" node name as it isn't a switch. Replace it with "bus". Fixes: 527a3ac9bdf8 ("arm64: dts: broadcom: bcm4908: describe internal switch") Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit cbaca2c467dc25a163107e14a53b7925214eab17 Author: Rafał Miłecki Date: Fri Feb 19 06:50:30 2021 +0100 arm64: dts: broadcom: bcm4908: describe firmware partitions BCM4908 bootloader supports multiple firmware partitions and has its own bindings defined for them. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 6224415c0389ba6661825746312163a64ece8f3a Author: Rafał Miłecki Date: Fri Feb 19 06:50:29 2021 +0100 arm64: dts: broadcom: bcm4908: add remaining Netgear R8000P LEDs There are a few more GPIO connected LEDs there didn't get described initially. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 0f00571f94339fa27f592d157ccc0b909dc0625e Author: Lang Cheng Date: Tue Feb 23 20:20:33 2021 +0800 RDMA/hns: Use new SQ doorbell register for HIP09 HIP09 uses new address space to map SQ doorbell registers, the doorbell of each QP is isolated based on the size of 64KB, which can improve the performance in concurrency scenarios. Link: https://lore.kernel.org/r/1614082833-23130-1-git-send-email-liweihang@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Weihang Li Signed-off-by: Jason Gunthorpe commit b18adee4ce4443399963826b5d28d9e63d40740c Author: Mark Brown Date: Tue Mar 9 19:41:25 2021 +0000 stacktrace: Move documentation for arch_stack_walk_reliable() to header Currently arch_stack_walk_reliable() is documented with an identical comment in both x86 and S/390 implementations which is a bit redundant. Move this to the header and convert to kerneldoc while we're at it. Signed-off-by: Mark Brown Signed-off-by: Borislav Petkov Reviewed-by: Miroslav Benes Acked-by: Vasily Gorbik Acked-by: Randy Dunlap Link: https://lkml.kernel.org/r/20210309194125.652-1-broonie@kernel.org commit 4d5f52838d11981c4d76cdc4e73230120de1ac85 Author: Bhaumik Bhatt Date: Tue Mar 9 10:46:35 2021 -0800 bus: mhi: Make firmware image optional for controller Some controllers can opt to not have MHI download a firmware image to have the device bootup and can find the device in a pass through execution environment, ready to go. Thus, MHI controllers for those devices do not need fw_image defined. Make it optional to accommodate different bootup modes. Suggested-by: Loic Poulain Signed-off-by: Bhaumik Bhatt Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1615315595-37750-1-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 6403298c58d4858d93648f553abf0bcbd2dfaca2 Author: Jeffrey Hugo Date: Fri Feb 12 14:27:23 2021 -0700 bus: mhi: core: Fix check for syserr at power_up The check to see if we have reset the device after detecting syserr at power_up is inverted. wait_for_event_timeout() returns 0 on failure, and a positive value on success. The check is looking for non-zero as a failure, which is likely to incorrectly cause a device init failure if syserr was detected at power_up. Fix this. Fixes: e18d4e9fa79b ("bus: mhi: core: Handle syserr during power_up") Signed-off-by: Jeffrey Hugo Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1613165243-23359-1-git-send-email-jhugo@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit aaca4233ea037394ecd0a96a40966f5954a48bfa Author: Bhaumik Bhatt Date: Wed Feb 24 15:23:05 2021 -0800 bus: mhi: core: Update debug prints to include local device state Update debug prints to include local device in the BHI interrupt handler. This helps show transitions better between MHI states. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/1614208985-20851-5-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit ef2126c4e2ea2b92f543fae00a2a0332e4573c48 Author: Bhaumik Bhatt Date: Wed Feb 24 15:23:04 2021 -0800 bus: mhi: core: Process execution environment changes serially In current design, whenever the BHI interrupt is fired, the execution environment is updated. This can cause race conditions and impede ongoing power up/down processing. For example, if a power down is in progress, MHI host updates to a local "disabled" execution environment. If a BHI interrupt fires later, that value gets replaced with one from the BHI EE register. This impacts the controller as it does not expect multiple RDDM execution environment change status callbacks as an example. Another issue would be that the device can enter mission mode and the execution environment is updated, while device creation for SBL channels is still going on due to slower PM state worker thread run, leading to multiple attempts at opening the same channel. Ensure that EE changes are handled only from appropriate places and occur one after another and handle only PBL modes or RDDM EE changes as critical events directly from the interrupt handler. Simplify handling by waiting for SYS ERROR before handling RDDM. This also makes sure that we use the correct execution environment to notify the controller driver when the device resets to one of the PBL execution environments. Signed-off-by: Bhaumik Bhatt Reviewed-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614208985-20851-4-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 4884362f6977fc05cbec736625665241c0e0732f Author: Bhaumik Bhatt Date: Wed Feb 24 15:23:03 2021 -0800 bus: mhi: core: Download AMSS image from appropriate function During full boot chain firmware download, the PM state worker downloads the AMSS image after a blocking wait for the SBL execution environment change when running in PBL transition itself. Improve this design by having the host download the AMSS image from the SBL transition of PM state worker thread when a DEV_ST_TRANSITION_SBL is queued instead of the blocking wait. Signed-off-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Reviewed-by: Loic Poulain Link: https://lore.kernel.org/r/1614208985-20851-3-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 925089c1900f588615db5bf4e1d9064a5f2c18c7 Author: Bhaumik Bhatt Date: Wed Feb 24 15:23:02 2021 -0800 bus: mhi: core: Destroy SBL devices when moving to mission mode Currently, client devices are created in SBL or AMSS (mission mode) and only destroyed after power down or SYS ERROR. When moving between certain execution environments, such as from SBL to AMSS, no clean-up is required. This presents an issue where SBL-specific channels are left open and client drivers now run in an execution environment where they cannot operate. Fix this by expanding the mhi_destroy_device() to do an execution environment specific clean-up if one is requested. Close the gap and destroy devices in such scenarios that allow SBL client drivers to clean up once device enters mission mode. Signed-off-by: Bhaumik Bhatt Reviewed-by: Loic Poulain Reviewed-by: Hemant Kumar Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614208985-20851-2-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit 020d3b26c07abe274ac17f64999bbd3bf3342195 Author: Loic Poulain Date: Fri Mar 5 17:14:01 2021 +0100 bus: mhi: Early MHI resume failure in non M3 state MHI suspend/resume are symmetric and balanced procedures. If device is not in M3 state on a resume, that means something happened behind our back. In this case resume is aborted and error reported, to let the controller handle the situation. This is mainly requested for system wide suspend-resume operation in PCI context which may lead to power-down/reset of the controller which will then lose its MHI context. In such cases, PCI driver is supposed to recover and reinitialize the device. Signed-off-by: Loic Poulain Reviewed-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614960841-20233-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 8de5ad99414347ad08e6ebc2260be1d2e009cb9a Author: Bhaumik Bhatt Date: Tue Mar 9 10:44:50 2021 -0800 bus: mhi: core: Add missing checks for MMIO register entries As per documentation, fields marked as (required) in an MHI controller structure need to be populated by the controller driver before calling mhi_register_controller(). Ensure all required pointers and non-zero fields are present in the controller before proceeding with the registration. Signed-off-by: Bhaumik Bhatt Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1615315490-36017-1-git-send-email-bbhatt@codeaurora.org Signed-off-by: Manivannan Sadhasivam commit e5b53b5be677b3e78960974d4c36acc752505f53 Author: Loic Poulain Date: Mon Feb 15 16:42:33 2021 +0100 bus: mhi: core: Rename debugfs directory name Use MHI controller device name instead of the 'bus' device name as debugfs dir name (e.g. /sys/kernel/debug/mhi0). That aligns with sysfs device name. Signed-off-by: Loic Poulain Tested-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam Reviewed-by: Jeffrey Hugo Link: https://lore.kernel.org/r/1613403753-1457-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 0ecc1c70dcd32c0f081b173a1a5d89952686f271 Author: Loic Poulain Date: Fri Feb 26 11:53:02 2021 +0100 bus: mhi: core: Fix invalid error returning in mhi_queue mhi_queue returns an error when the doorbell is not accessible in the current state. This can happen when the device is in non M0 state, like M3, and needs to be waken-up prior ringing the DB. This case is managed earlier by triggering an asynchronous M3 exit via controller resume/suspend callbacks, that in turn will cause M0 transition and DB update. So, since it's not an error but just delaying of doorbell update, there is no reason to return an error. This also fixes a use after free error for skb case, indeed a caller queuing skb will try to free the skb if the queueing fails, but in that case queueing has been done. Fixes: a8f75cb348fd ("mhi: core: Factorize mhi queuing") Signed-off-by: Loic Poulain Reviewed-by: Jeffrey Hugo Reviewed-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614336782-5809-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 0fccbf0a3b690b162f53b13ed8bc442ea33437dc Author: Loic Poulain Date: Wed Feb 24 11:18:50 2021 +0100 bus: mhi: pci_generic: Remove WQ_MEM_RECLAIM flag from state workqueue A recent change created a dedicated workqueue for the state-change work with WQ_HIGHPRI (no strong reason for that) and WQ_MEM_RECLAIM flags, but the state-change work (mhi_pm_st_worker) does not guarantee forward progress under memory pressure, and will even wait on various memory allocations when e.g. creating devices, loading firmware, etc... The work is then not part of a memory reclaim path... Moreover, this causes a warning in check_flush_dependency() since we end up in code that flushes a non-reclaim workqueue: [ 40.969601] workqueue: WQ_MEM_RECLAIM mhi_hiprio_wq:mhi_pm_st_worker [mhi] is flushing !WQ_MEM_RECLAIM events_highpri:flush_backlog [ 40.969612] WARNING: CPU: 4 PID: 158 at kernel/workqueue.c:2607 check_flush_dependency+0x11c/0x140 [ 40.969733] Call Trace: [ 40.969740] __flush_work+0x97/0x1d0 [ 40.969745] ? wake_up_process+0x15/0x20 [ 40.969749] ? insert_work+0x70/0x80 [ 40.969750] ? __queue_work+0x14a/0x3e0 [ 40.969753] flush_work+0x10/0x20 [ 40.969756] rollback_registered_many+0x1c9/0x510 [ 40.969759] unregister_netdevice_queue+0x94/0x120 [ 40.969761] unregister_netdev+0x1d/0x30 [ 40.969765] mhi_net_remove+0x1a/0x40 [mhi_net] [ 40.969770] mhi_driver_remove+0x124/0x250 [mhi] [ 40.969776] device_release_driver_internal+0xf0/0x1d0 [ 40.969778] device_release_driver+0x12/0x20 [ 40.969782] bus_remove_device+0xe1/0x150 [ 40.969786] device_del+0x17b/0x3e0 [ 40.969791] mhi_destroy_device+0x9a/0x100 [mhi] [ 40.969796] ? mhi_unmap_single_use_bb+0x50/0x50 [mhi] [ 40.969799] device_for_each_child+0x5e/0xa0 [ 40.969804] mhi_pm_st_worker+0x921/0xf50 [mhi] Fixes: 8f7039787687 ("bus: mhi: core: Move to using high priority workqueue") Signed-off-by: Loic Poulain Reviewed-by: Bhaumik Bhatt Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614161930-8513-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit d3800c1dce24c7964f37663b3a5549e93f345a5c Author: Loic Poulain Date: Fri Mar 5 20:16:48 2021 +0100 bus: mhi: pci_generic: Add support for runtime PM When the device is idle it is possible to move it into the lowest MHI PM state (M3). In that mode, all MHI operations are suspended and the PCI device can be safely put into PCI D3 state. The device is then resumed from D3/M3 either because of host initiated MHI operation (e.g. buffer TX) or because the device (modem) has triggered wake-up via PME feature (e.g. on incoming data). Same procedures can be used for system wide or runtime suspend/resume. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614971808-22156-6-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit e89878aa4b79a834d5c90abb96efcd64396c2163 Author: Loic Poulain Date: Fri Mar 5 20:16:47 2021 +0100 bus: mhi: pci_generic: Use generic PCI power management The PCI core can take care of proper PCI suspend/resume operations, but this is discarded when the driver saves PCI state by its own. This currently prevents the PCI core to enable PME (for modem initiated D3 exit) which is requested for proper runtime pm support. This change deletes explicit PCI state-saving and state-set from suspend callback, letting the PCI doing the appropriate work. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614971808-22156-5-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit e3e5e6508fc1c0e98a5a264853713dd30a60e5e5 Author: Loic Poulain Date: Fri Mar 5 20:16:46 2021 +0100 bus: mhi: pci_generic: No-Op for device_wake operations The wake_db register presence is highly speculative and can fuze MHI devices. Indeed, currently the wake_db register address is defined at entry 127 of the 'Channel doorbell array', thus writing to this address is equivalent to ringing the doorbell for channel 127, causing trouble with some devics (e.g. SDX24 based modems) that get an unexpected channel 127 doorbell interrupt. This change fixes that issue by setting wake get/put as no-op for pci_generic devices. The wake device sideband mechanism seems really specific to each device, and is AFAIK not defined by the MHI spec. It also removes zeroing initialization of wake_db register during MMIO initialization, the register being set via wake_get/put accessors few cycles later during M0 transition. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614971808-22156-4-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 59d05b71729b96d809b89e70640b9332d559b20f Author: Loic Poulain Date: Fri Mar 5 20:16:45 2021 +0100 bus: mhi: pci_generic: Add SDX24 based modem support Add generic info for SDX24 based modems. Also add the FIREHOSE channels used by the flash-programmer firmware loaded in EDL mode. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614971808-22156-3-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit ac4bf60bbaa090d3abfc5a340bd01ae933fadacf Author: Loic Poulain Date: Fri Mar 5 20:16:44 2021 +0100 bus: mhi: pci_generic: Introduce quectel EM1XXGR-L support Add support for EM1XXGR-L modems, this modem series is based on SDX24 qcom chip. The modem is mainly based on MBIM protocol for both the data and control path. The drivers for these channels (mhi-net-mbim and mhi_uci) are not yet part of the kernel but will be integrated by different series. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614971808-22156-2-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 9ea48efdc528b019588a03417517c25fe7368684 Author: Loic Poulain Date: Fri Mar 5 20:16:43 2021 +0100 bus: mhi: pci_generic: Parametrable element count for events Not all hardwares need to use the same number of event ring elements. This change makes this parametrable. Signed-off-by: Loic Poulain Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/r/1614971808-22156-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Manivannan Sadhasivam commit 043d7f9713b765f26b4341528d96931eb5446653 Author: Tiezhu Yang Date: Mon Mar 8 14:48:18 2021 +0800 MIPS: Enable some missed configs in loongson3_defconfig to support bpftrace bpftrace is a high-level tracing language for Linux enhanced Berkeley Packet Filter (eBPF) available in recent Linux kernels (4.x). bpftrace uses LLVM as a backend to compile scripts to BPF-bytecode and makes use of BCC for interacting with the Linux BPF system, as well as existing Linux tracing capabilities: kernel dynamic tracing (kprobes), user-level dynamic tracing (uprobes), and tracepoints. According to Linux Kernel Requirements in bpftrace/INSTALL.md [1], the kernel needs to be built with the following options: CONFIG_BPF=y CONFIG_BPF_SYSCALL=y CONFIG_BPF_JIT=y CONFIG_HAVE_EBPF_JIT=y CONFIG_BPF_EVENTS=y CONFIG_FTRACE_SYSCALLS=y CONFIG_FUNCTION_TRACER=y CONFIG_HAVE_DYNAMIC_FTRACE=y CONFIG_DYNAMIC_FTRACE=y CONFIG_HAVE_KPROBES=y CONFIG_KPROBES=y CONFIG_KPROBE_EVENTS=y CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_UPROBES=y CONFIG_UPROBE_EVENTS=y CONFIG_DEBUG_FS=y So enable some missed configs in loongson3_defconfig to make sure the above configs are set after make loongson3_defconfig. [1] https://github.com/iovisor/bpftrace/blob/master/INSTALL.md Signed-off-by: Tiezhu Yang Signed-off-by: Thomas Bogendoerfer commit c024e8f665c92ccbdd389643f3dd9342297810ee Author: Bhaskar Chowdhury Date: Fri Mar 5 07:35:35 2021 +0530 MIPS: BCM63xx: Spello fix in the file clk.c s/revelant/relevant/ Signed-off-by: Bhaskar Chowdhury Acked-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit 6228bd65288af02cd8cc2417c9c4bf05e1caf935 Author: Masahiro Yamada Date: Mon Mar 1 23:48:25 2021 +0900 mips: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts mips to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Bogendoerfer commit ecbba30fbf45dceaaf0e8010638283e7aa94a4df Author: Masahiro Yamada Date: Mon Mar 1 23:48:24 2021 +0900 mips: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts mips to use scripts/syscalltbl.sh. This also unifies syscall_table_32_o32.h and syscall_table_64_o32.h into syscall_table_o32.h. The offset parameters are unneeded here; __SYSCALL(nr, entry) is defined as 'PTR entry', so the parameter 'nr' is not used in the first place. With this commit, syscall tables and generated files are straight mapped, which makes things easier to understand. syscall_n32.tbl --> syscall_table_n32.h syscall_n64.tbl --> syscall_table_n64.h syscall_o32.tbl --> syscall_table_o32.h Then, the abi parameters are also unneeded. Signed-off-by: Masahiro Yamada Signed-off-by: Thomas Bogendoerfer commit 45c7e8af4a5e3f0bea4ac209eea34118dd57ac64 Author: Thomas Bogendoerfer Date: Mon Mar 1 16:29:57 2021 +0100 MIPS: Remove KVM_TE support After removal of the guest part of KVM TE (trap and emulate), also remove the host part. Signed-off-by: Thomas Bogendoerfer commit a1515ec7204edca770c07929df8538fcdb03ad46 Author: Thomas Bogendoerfer Date: Mon Mar 1 16:29:56 2021 +0100 MIPS: Remove KVM_GUEST support KVM_GUEST is broken and unmaintained, so let's remove it. Reviewed-by: Huacai Chen Reviewed-by: Jiaxun Yang Signed-off-by: Thomas Bogendoerfer commit 87aaf2523cad65faeabd8564b6b39f9431f32879 Merge: 04100459caa98 bd67b711bfaa0 Author: Thomas Bogendoerfer Date: Wed Mar 10 15:15:47 2021 +0100 Merge tag 'mips-fixes_5.12_1' into mips-next - fixes for boot breakage because of misaligned FDTs - fix for overwritten exception handlers - enable MIPS optimized crypto for all MIPS CPUs to improve wireguard performance commit 1ae6478b0e6b22e6031b4917d1187d23bdc1ca72 Author: Drew Fustini Date: Mon Mar 1 21:30:59 2021 -0800 docs/pinctrl: document debugfs files Document debugfs directories and files created for pinctrl subsystem. Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Tony Lindgren Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20210302053059.1049035-5-drew@beagleboard.org Signed-off-by: Linus Walleij commit 5513b411ea5b6bf1f1aa3a704eca0a4b352ab9c5 Author: Drew Fustini Date: Mon Mar 1 21:30:58 2021 -0800 Documentation: rename pinctl to pin-control pinctl is not ideal as pinctrl (with an 'r') is much more common. Linus state that pin-control.rst would be the best name for the documentation. Link: https://lore.kernel.org/linux-gpio/20210126050817.GA187797@x1/#t Suggested-by: Linus Walleij Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20210302053059.1049035-4-drew@beagleboard.org Signed-off-by: Linus Walleij commit 6199f6becc869d30ca9394ca0f7a484bf9d598eb Author: Drew Fustini Date: Mon Mar 1 21:30:57 2021 -0800 pinctrl: pinmux: Add pinmux-select debugfs file Add "pinmux-select" to debugfs which will activate a pin function for a given pin group: echo "" > pinmux-select The write operation pinmux_select() handles this by checking that the names map to valid selectors and then calling ops->set_mux(). The existing "pinmux-functions" debugfs file lists the pin functions registered for the pin controller. For example: function: pinmux-uart0, groups = [ pinmux-uart0-pins ] function: pinmux-mmc0, groups = [ pinmux-mmc0-pins ] function: pinmux-mmc1, groups = [ pinmux-mmc1-pins ] function: pinmux-i2c0, groups = [ pinmux-i2c0-pins ] function: pinmux-i2c1, groups = [ pinmux-i2c1-pins ] function: pinmux-spi1, groups = [ pinmux-spi1-pins ] To activate function pinmux-i2c1 on group pinmux-i2c1-pins: echo "pinmux-i2c1-pins pinmux-i2c1" > pinmux-select Reviewed-by: Andy Shevchenko Reviewed-by: Tony Lindgren Reviewed-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20210302053059.1049035-3-drew@beagleboard.org Signed-off-by: Linus Walleij commit 47473813bdcb8c5ffa87f6d2ccb378b9b0882c83 Author: Drew Fustini Date: Mon Mar 1 21:30:56 2021 -0800 pinctrl: use to octal permissions for debugfs files Switch over pinctrl debugfs files to use octal permissions as they are preferred over symbolic permissions. Refer to commit f90774e1fd27 ("checkpatch: look for symbolic permissions and suggest octal instead"). Note: S_IFREG flag is added to the mode by __debugfs_create_file() in fs/debugfs/inode.c Suggested-by: Joe Perches Suggested-by: Andy Shevchenko Reviewed-by: Andy Shevchenko Reviewed-by: Geert Uytterhoeven Reviewed-by: Tony Lindgren Signed-off-by: Drew Fustini Link: https://lore.kernel.org/r/20210302053059.1049035-2-drew@beagleboard.org Signed-off-by: Linus Walleij commit d2cd54c24e80b3da2d3071311a280aa19b782438 Author: Yang Li Date: Fri Feb 26 09:34:57 2021 +0800 pinctrl: ingenic: add missing call to of_node_put() In one of the error paths of the for_each_child_of_node() loop in ingenic_gpio_probe, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/pinctrl/pinctrl-ingenic.c:2485:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 2489. Reported-by: Abaci Robot Signed-off-by: Yang Li Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/1614303297-24178-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Linus Walleij commit b37c35781d9ad929c150b2b0b1eb0070a312585b Author: Jianqun Xu Date: Tue Feb 23 18:19:37 2021 +0800 pinctrl: rockchip: clear int status when driver probed Some devices may do gpio interrupt trigger and make an int status before pinctrl driver probed, then the gpio handler will keep complain untill the device driver works to stop trigger. Signed-off-by: Ziyuan Xu Signed-off-by: Jianqun Xu Reviewed-by: Heiko Stuebner Link: https://lore.kernel.org/r/20210223101937.273085-1-jay.xu@rock-chips.com Signed-off-by: Linus Walleij commit 35b25fd32b5f138b796664c8183afc0515d9dc89 Author: Maulik Shah Date: Fri Feb 12 10:29:34 2021 +0530 pinctrl: qcom: sc7280: Add GPIO wakeup interrupt map GPIOs that can be configured as wakeup sources, have their interrupt lines routed to PDC interrupt controller. Provide the interrupt map of the GPIO to its wakeup capable interrupt parent. Signed-off-by: Maulik Shah Signed-off-by: Rajendra Nayak Acked-by: Bjorn Andersson Link: https://lore.kernel.org/r/1613105974-28181-1-git-send-email-rnayak@codeaurora.org Signed-off-by: Linus Walleij commit ffeaa23aa001b46b5fb35cb5e3f5ddb796d9b462 Author: Junlin Yang Date: Mon Feb 15 18:36:43 2021 +0800 pinctrl: stm32: add missing of_node_put Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210215103643.898-1-angkery@163.com Acked-by: Fabien Dessenne Signed-off-by: Linus Walleij commit a7db796b305bba7b4fd78eac2c50647a7cafe0f7 Author: Konstantin Porotchkin Date: Tue Feb 16 13:31:18 2021 +0200 pinctrl: armada-cp110 - fix MPP54/MPP55 functions The function name is used for selecting MPP functionality and should be unique within function names of the same pin. This patch fixes function names for MPP54 and MPP55 that have two different functions named the same. Signed-off-by: Konstantin Porotchkin Link: https://lore.kernel.org/r/20210216113118.17484-3-kostap@marvell.com Signed-off-by: Linus Walleij commit b24236f5543335a2953612a13541d5a3e039e8b7 Author: Konstantin Porotchkin Date: Tue Feb 16 13:31:17 2021 +0200 pinctrl: cp110-system-controller: fix the pin function names Fix the pin function names for MPP54 and MPP55. Signed-off-by: Konstantin Porotchkin Link: https://lore.kernel.org/r/20210216113118.17484-2-kostap@marvell.com Signed-off-by: Linus Walleij commit ba434267d07661f3e3712e4e5429ba599b32ab0e Author: Junlin Yang Date: Tue Feb 16 16:02:31 2021 +0800 pinctrl: equilibrium: add missing of_node_put Fix OF node leaks by calling of_node_put in for_each_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210216080231.1303-1-angkery@163.com Signed-off-by: Linus Walleij commit 9468e7b031876935230182628f8d5f216c071784 Author: Niklas Söderlund Date: Wed Mar 10 12:07:16 2021 +0100 dt-bindings: thermal: rcar-gen3-thermal: Support five TSC nodes on r8a779a0 When adding support for V3U (r8a779a0) it was incorrectly recorded it supports four nodes, while in fact it supports five. The fifth node is named TSC0 and breaks the existing naming schema starting at 1. Work around this by separately defining the reg property for V3U and others. Restore the maximum number of nodes to three for other compatibles as it was before erroneously increasing it for V3U. Fixes: d7fdfb6541f3be88 ("dt-bindings: thermal: rcar-gen3-thermal: Add r8a779a0 support") Signed-off-by: Niklas Söderlund Reviewed-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210310110716.3297544-1-niklas.soderlund+renesas@ragnatech.se commit 64682e1b774475c9f156163ca2ab39cc36f60254 Merge: 9bcf56c9647ac b7d00776ebf79 Author: Mark Brown Date: Tue Mar 9 19:04:34 2021 +0000 Merge series "Report jack and button detection + Capture Support" from Lucas Tanure : Hi All, Here is a patch series for reporting to user space jack and button events and add the support for Capture. With some cleanups and fixes along the way. Regards, Lucas Tanure Lucas Tanure (12): ASoC: cs42l42: Fix Bitclock polarity inversion ASoC: cs42l42: Fix channel width support ASoC: cs42l42: Fix mixer volume control ASoC: cs42l42: Don't enable/disable regulator at Bias Level ASoC: cs42l42: Always wait at least 3ms after reset ASoC: cs42l42: Remove power if the driver is being removed ASoC: cs42l42: Disable regulators if probe fails ASoC: cs42l42: Provide finer control on playback path ASoC: cs42l42: Set clock source for both ways of stream ASoC: cs42l42: Add Capture Support ASoC: cs42l42: Report jack and button detection ASoC: cs42l42: Use bclk from hw_params if set_sysclk was not called Richard Fitzgerald (3): ASoC: cs42l42: Wait at least 150us after writing SCLK_PRESENT ASoC: cs42l42: Only start PLL if it is needed ASoC: cs42l42: Wait for PLL to lock before switching to it sound/soc/codecs/cs42l42.c | 435 +++++++++++++++++++++---------------- sound/soc/codecs/cs42l42.h | 41 +++- 2 files changed, 282 insertions(+), 194 deletions(-) -- 2.30.1 commit 9bcf56c9647acfd70fa4917de925b3bb04103e34 Merge: 542712826f8d3 ac922edc80aa0 Author: Mark Brown Date: Tue Mar 9 19:04:33 2021 +0000 Merge series "Add I2S-MCC support for Microchip's SAMA7G5" from Codrin Ciubotariu : SAMA7G5 includes an updated version of I2S-MCC, found previously on SAM9X60. This controller includes 8 data pins, 4 for playback and 4 for capture. For I2S and LEFT_J formats, these pins can be used to send/receive up to 8 audio channels. For DSP_A, with TDM, any pins pair (DIN/DOUT) from these 4 can be selected to send/receive data. This version also includes 2 FIFOs (send and receive). This patch set starts by moving the driver's bindings to yaml and continues with adding a new compatible for the SAMA7G5 variant, followed by the changes needed for I2S/LEFT_J support, TDM pin pair selection and FIFO support, exclusively for SAMA7G5. Changes in v2: - moved DT binding conversion patch from the beginning to the end of the patch serieses - patches that update the DT binding are modified to change .txt file instead of .yaml Codrin Ciubotariu (7): dt-bindings: mchp,i2s-mcc: Add SAMA7G5 to binding ASoC: mchp-i2s-mcc: Add compatible for SAMA7G5 ASoC: mchp-i2s-mcc: Add multi-channel support for I2S and LEFT_J formats dt-bindings: mchp,i2s-mcc: Add property to specify pin pair for TDM ASoC: mchp-i2s-mcc: Add support to select TDM pins ASoC: mchp-i2s-mcc: Add FIFOs support ASoC: convert Microchip I2SMCC binding to yaml .../bindings/sound/mchp,i2s-mcc.yaml | 108 ++++++++++++ .../bindings/sound/mchp-i2s-mcc.txt | 43 ----- sound/soc/atmel/Kconfig | 3 + sound/soc/atmel/mchp-i2s-mcc.c | 161 +++++++++++++++--- 4 files changed, 252 insertions(+), 63 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/mchp,i2s-mcc.yaml delete mode 100644 Documentation/devicetree/bindings/sound/mchp-i2s-mcc.txt -- 2.27.0 commit 542712826f8d3b0a72e66d7feec2dedba5dfa297 Author: Shuming Fan Date: Tue Mar 9 16:58:27 2021 +0800 ASoC: rt5682: add delay time of workqueue to control next IRQ event This patch keeps the delay time (50 ms) for jack detection and zero delay time for the button press. This patch improves the reaction of the button press. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20210309085827.32032-1-shumingf@realtek.com Tested-by Curtis Malainey Signed-off-by: Mark Brown commit d59cfc6544dc19a1d1c1e47d95dd2150da3daf56 Author: Wei Yongjun Date: Tue Mar 9 13:14:55 2021 +0000 ASoC: rt715-sdca: Remove unused including Remove including that don't need it. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210309131455.1883120-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit d3223608c5bcd938bcf751702ebf4a8b130976da Author: Wei Yongjun Date: Tue Mar 9 13:14:58 2021 +0000 ASoC: rt715-sdca: Fix return value check in rt715_sdca_sdw_probe() In case of error, the function devm_regmap_init_sdw_mbq() and devm_regmap_init_sdw() returns ERR_PTR() not NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 393c52d2d109 ("ASoC: rt715-sdca: Add RT715 sdca vendor-specific driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210309131458.1884899-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit b7d00776ebf79402216434ce24a87f072e1438e1 Author: Richard Fitzgerald Date: Sat Mar 6 18:55:53 2021 +0000 ASoC: cs42l42: Wait for PLL to lock before switching to it The PLL should have locked before using it to supply MCLK. Signed-off-by: Richard Fitzgerald Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-16-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 882589bb707ba78d25dd193beefde97e00a3da6b Author: Richard Fitzgerald Date: Sat Mar 6 18:55:52 2021 +0000 ASoC: cs42l42: Only start PLL if it is needed The PLL is only needed for sclk < 11289600 Hz and cs42l42_pll_config() will not configure it for higher rates. So it must only be enabled when it is needed. Signed-off-by: Richard Fitzgerald Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-15-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 0ea23660c7170124fc06ec363b4d2adfa350cf2f Author: Richard Fitzgerald Date: Sat Mar 6 18:55:51 2021 +0000 ASoC: cs42l42: Wait at least 150us after writing SCLK_PRESENT There must be a delay of at least 150us after writing SCLK_PRESENT before issuing another I2C write. This is done using struct reg_sequence because it can specify a delay after the write and the whole sequence is written atomically. Signed-off-by: Richard Fitzgerald Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-14-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 2cdba9b045c745139ae56227d71f261f5d3c6fae Author: Lucas Tanure Date: Sat Mar 6 18:55:50 2021 +0000 ASoC: cs42l42: Use bclk from hw_params if set_sysclk was not called Add support for reading the source clock from snd_soc_params_to_bclk so the machine driver is not required to call cs42l42_set_sysclk Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-13-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit c5b8ee0879bcdc5082d42fe92d3c235b74feef37 Author: Lucas Tanure Date: Sat Mar 6 18:55:49 2021 +0000 ASoC: cs42l42: Report jack and button detection Report the Jack events to the user space through ALSA. Also moves request_threaded_irq() to component_probe so it don't get interrupts before the initialization the struct snd_soc_jack. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-12-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 585e7079de0eac555bcdfe6284e439ee05fb18cb Author: Lucas Tanure Date: Sat Mar 6 18:55:48 2021 +0000 ASoC: cs42l42: Add Capture Support Add support for capture path on headseat pins Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-11-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 43fc357199f90c0e6ee7082fb0a989b0560be2d6 Author: Lucas Tanure Date: Sat Mar 6 18:55:47 2021 +0000 ASoC: cs42l42: Set clock source for both ways of stream Move the enable/disable of clocks to cs42l42_mute_stream so the record path also get clocks. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-10-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 621d65f3b868611df62ae4dc4eb1a37b85e4e8c0 Author: Lucas Tanure Date: Sat Mar 6 18:55:46 2021 +0000 ASoC: cs42l42: Provide finer control on playback path Removing cs42l42_hpdrv_evt that enables the entire chain and replace by a set of widgets that can better define the codec Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-9-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 1abca8e1c77bd9c5f5c0bed21c5b075b6852a178 Author: Lucas Tanure Date: Sat Mar 6 18:55:45 2021 +0000 ASoC: cs42l42: Disable regulators if probe fails In case of cs42l42_i2c_probe() fail, the regulators were left enabled. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-8-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 2b869e0ea598263e0fd60872430899fa0660b2fa Author: Lucas Tanure Date: Sat Mar 6 18:55:44 2021 +0000 ASoC: cs42l42: Remove power if the driver is being removed Ensure the power supplies are turned off when removing the driver Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210306185553.62053-7-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit ac922edc80aa0b83f4760e3086bc154fdc2a4837 Author: Codrin Ciubotariu Date: Mon Mar 1 19:09:05 2021 +0200 ASoC: convert Microchip I2SMCC binding to yaml This patch converts the Microchip I2SMCC bindings to DT schema format using json-schema. Signed-off-by: Codrin Ciubotariu Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210301170905.835091-8-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 32432b8eea2d1bc05d1175f63bf5cd6d2a50c917 Merge: 7ad4d237e7c4a ddaa9bea4ffab Author: Mark Brown Date: Mon Mar 8 16:41:22 2021 +0000 Merge series "Report jack and button detection + Capture Support" from Lucas Tanure : Hi All, Here is a patch series for reporting to user space jack and button events and add the support for Capture. With some cleanups and fixes along the way. Regards, Lucas Tanure Lucas Tanure (12): ASoC: cs42l42: Fix Bitclock polarity inversion ASoC: cs42l42: Fix channel width support ASoC: cs42l42: Fix mixer volume control ASoC: cs42l42: Don't enable/disable regulator at Bias Level ASoC: cs42l42: Always wait at least 3ms after reset ASoC: cs42l42: Remove power if the driver is being removed ASoC: cs42l42: Disable regulators if probe fails ASoC: cs42l42: Provide finer control on playback path ASoC: cs42l42: Set clock source for both ways of stream ASoC: cs42l42: Add Capture Support ASoC: cs42l42: Report jack and button detection ASoC: cs42l42: Use bclk from hw_params if set_sysclk was not called Richard Fitzgerald (3): ASoC: cs42l42: Wait at least 150us after writing SCLK_PRESENT ASoC: cs42l42: Only start PLL if it is needed ASoC: cs42l42: Wait for PLL to lock before switching to it sound/soc/codecs/cs42l42.c | 437 +++++++++++++++++++++---------------- sound/soc/codecs/cs42l42.h | 41 +++- 2 files changed, 282 insertions(+), 196 deletions(-) -- 2.30.1 commit 7ad4d237e7c4a5dcc71cf438f646744b4484f1da Author: Shuming Fan Date: Tue Mar 2 17:15:06 2021 +0800 ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver This is the initial codec driver for rt711 SDCA version. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20210302091506.18745-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 3f004d2dc118e5e5d0162a077618aaa4bff9e555 Author: Hans de Goede Date: Sun Mar 7 00:02:23 2021 +0100 ASoC: rt5645: The ALC3270 variant does not have a headset-mic pin The Asus T100HA and T101HA 2-in-1s use a rt5645 family codec and always report that a headset (rather then headphones) are plugged in even when regular headphones are plugged in. And when a headset is used, then the headset-microphone does not work. According to RealTek the ALC3270 variant used in these devices does not support headsets only headphones. Since the ALC3270 is a budget version of the regular ALC5645 codec, I assume that it is using a package with less pins and the headset-mic pin is simply not connected. Detect if the codec is an ALC3270 based on the ACPI HID and if it is an ALC3270 then always report SND_JACK_MICROPHONE as false, so that userspace will not try to use the not-connected headset-mic. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210306230223.516566-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit 452801cabc0a0f0cb742e98617d3f0e8a2b11295 Author: Hans de Goede Date: Sun Mar 7 00:02:22 2021 +0100 ASoC: rt5645: Move rt5645_platform_data to sound/soc/codecs/rt5645.c sound/soc/codecs/rt5645.c is the only user of the rt5645_platform_data, move its definition to sound/soc/codecs/rt5645.c and remove the now empty include/sound/rt5645.h file. Note since the DMI quirk mechanism uses pointers to the rt5645_platform_data struct we can NOT simply add its members to the rt5645_priv struct and completely remove the struct. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210306230223.516566-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit cc2d7429d65c7ea9dc2f84694f47b030248d0d89 Author: Tang Bin Date: Sun Mar 7 15:21:33 2021 +0800 ASoC: codecs/jz4770: Remove superfluous error message The function devm_platform_ioremap_resource has already contained error message if failed, so remove superfluous dev_err here. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20210307072133.10832-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown commit 20d17057f0a8c7bfecfb9e05bd5ba33a100a9a15 Author: Jack Yu Date: Tue Mar 2 18:30:42 2021 +0800 ASoC: rt715-sdca: Add RT715 sdca vendor-specific driver This is initial sdca version of codec driver for rt715. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20210302103042.19528-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit 90b2d37338791311df484d671b262b2ee392962c Author: Tang Bin Date: Tue Mar 2 20:50:02 2021 +0800 ASoC: fsl_xcvr: Use devm_platform_ioremap_resource_byname() to simplify code In this function, devm_platform_ioremap_resource_byname() should be suitable to simplify code. Signed-off-by: Tang Bin Link: https://lore.kernel.org/r/20210302125002.23900-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown commit aa4890f673f9d54d3cb0ea156acfe41958ea7f08 Author: Shengjiu Wang Date: Mon Mar 8 10:34:37 2021 +0800 ASoC: wm8962: Relax bit clock divider searching With S20_3LE format case, the sysclk = rate * 384, the bclk = rate * 20 * 2, there is no proper bclk divider for 384 / 40, because current condition needs exact match. So driver fails to configure the clocking: wm8962 3-001a: Unsupported BCLK ratio 9 Fix this by relaxing bitclk divider searching, so that when no exact value can be derived from sysclk pick the closest value greater than expected bitclk. Signed-off-by: Shengjiu Wang Reviewed-by: Daniel Baluta Acked-by: Charles Keepax Link: https://lore.kernel.org/r/1615170877-25918-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 98537d5c925711f65b4a88eef571d2cf0d2c51ac Merge: d639089a8468a f323ecedf3221 Author: Mark Brown Date: Thu Mar 4 00:52:07 2021 +0000 Merge series "ASoC: remove more make W=1 warnings" from Pierre-Louis Bossart : These warnings get in the way of automation/CI, let's remove them. Pierre-Louis Bossart (9): ASoC: cs4270: fix kernel-doc ASoC: jz4760: fix set but not used warning ASoC: rt5631: fix kernel-doc warning ASoC: sigmadsp-regmap: fix kernel-doc warning ASoC: amd: renoir: remove invalid kernel-doc comment ASoC: fsl: fsl_ssi: fix kernel-doc warning ASoC: fsl: fsl_easrc: fix kernel-doc warning ASoC: Intel: bytcr_wm5102: remove unused static variable ASoC: qcom: q6dsp: fix kernel-doc warning sound/soc/amd/renoir/rn-pci-acp3x.c | 2 +- sound/soc/codecs/cs4270.c | 1 + sound/soc/codecs/jz4760.c | 4 ++-- sound/soc/codecs/rt5631.c | 2 +- sound/soc/codecs/sigmadsp-regmap.c | 2 +- sound/soc/fsl/fsl_easrc.c | 2 +- sound/soc/fsl/fsl_ssi.c | 2 +- sound/soc/intel/boards/bytcr_wm5102.c | 8 -------- sound/soc/qcom/qdsp6/q6afe.c | 2 +- 9 files changed, 9 insertions(+), 16 deletions(-) -- 2.25.1 commit d639089a8468a7a143044f6bb32116da055aedb5 Merge: 51bc908fccb1b f1a1da09faa3a Author: Mark Brown Date: Thu Mar 4 00:52:05 2021 +0000 Merge series "ASoC: realtek: fix cppcheck warnings" from Pierre-Louis Bossart : Lots of trivial issues that make cppcheck too verbose. There shouldn't be any functionality change with this patchset. Pierre-Louis Bossart (24): ASoC: rt1011: use logical OR ASoC: rt1011: remove redundant test ASoC: rt1011: clarify expression ASoC: rt1015: clarify expression ASoC: rt1016: clarify expression ASoC: rt1305: clarify expression ASoC: rt1308: clarify expression ASoC: rt5640: clarify expression ASoC: rt5645: use logical OR ASoC: rt5645: clarify expression ASoC: rt5651: clarify expression ASoC: rt5651: remove useless assignment ASoC: rt5659: clarify expression ASoC: rt5660: clarify expression ASoC: rt5663: clarify expression ASoC: rt5665: clarify expression ASoC: rt5668: clarify expression ASoC: rt5668: remove useless assignments ASoC: rt5670: clarify expression ASoC: rt5677: clarify expression ASoC: rt5677: remove useless assignment ASoC: rt5682: clarify expression ASoC: rt5682: remove useless assignments ASoC: rt5682: remove useless initialization sound/soc/codecs/rt1011.c | 47 ++++++++++++++++++--------------------- sound/soc/codecs/rt1015.c | 5 +++-- sound/soc/codecs/rt1016.c | 7 +++--- sound/soc/codecs/rt1305.c | 4 ++-- sound/soc/codecs/rt1308.c | 8 +++---- sound/soc/codecs/rt5640.c | 6 ++--- sound/soc/codecs/rt5645.c | 6 ++--- sound/soc/codecs/rt5651.c | 6 ++--- sound/soc/codecs/rt5659.c | 4 ++-- sound/soc/codecs/rt5660.c | 4 ++-- sound/soc/codecs/rt5663.c | 4 ++-- sound/soc/codecs/rt5665.c | 4 ++-- sound/soc/codecs/rt5668.c | 8 +++---- sound/soc/codecs/rt5670.c | 4 ++-- sound/soc/codecs/rt5677.c | 6 ++--- sound/soc/codecs/rt5682.c | 12 +++++----- 16 files changed, 67 insertions(+), 68 deletions(-) -- 2.25.1 commit 51bc908fccb1b4ed322626185a786b790d081111 Author: Colin Ian King Date: Wed Mar 3 09:18:35 2021 +0000 ASoC: fsl: fsl_easrc: Fix uninitialized variable st2_mem_alloc A previous cleanup commit removed the ininitialization of st2_mem_alloc. Fix this by restoring the original behaviour by initializing it to zero. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: e80382fe721f ("ASoC: fsl: fsl_easrc: remove useless assignments") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210303091835.5024-1-colin.king@canonical.com Signed-off-by: Mark Brown commit a5e78cfbd50e33c19236f32693516380d1a61c34 Author: Yang Li Date: Wed Mar 3 17:08:01 2021 +0800 ASoC: codecs: fix platform_no_drv_owner.cocci warnings ./sound/soc/codecs/lpass-rx-macro.c:3588:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1614762481-102466-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 3d01f5ee19c37c2dcaa937f060014dfd46a8ab2f Author: Wei Yongjun Date: Wed Mar 3 06:40:41 2021 +0000 ASoC: rt1316: Fix return value check in rt1316_sdw_probe() In case of error, the function devm_regmap_init_sdw() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: a262057df513 ("ASoC: rt1316: Add RT1316 SDCA vendor-specific driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210303064041.898281-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown commit 5d90fef6809138f0d31271b06940950896671677 Author: Fabio Estevam Date: Tue Mar 2 11:28:17 2021 -0300 ASoC: sgtl5000: Fix identation of .driver elements The .driver elements are not correctly idented. Fix the identation of the .driver elements. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210302142817.2141923-1-festevam@gmail.com Signed-off-by: Mark Brown commit 4c869beda489efa3accfc6ca3177c01b97bea99e Author: Tang Bin Date: Tue Mar 2 21:56:30 2021 +0800 ASoC: codec: Omit superfluous error message in jz4760_codec_probe() The function devm_platform_ioremap_resource has already contained error message, so remove the redundant dev_err here. Signed-off-by: Tang Bin Acked-by: Paul Cercueil Link: https://lore.kernel.org/r/20210302135630.11456-1-tangbin@cmss.chinamobile.com Signed-off-by: Mark Brown commit f323ecedf3221b4827c19a41a73f08a2da16ca11 Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:26 2021 -0600 ASoC: qcom: q6dsp: fix kernel-doc warning make W=1 warning: sound/soc/qcom/qdsp6/q6afe.c:1460: warning: expecting prototype for q6afe_dam_port_prepare(). Prototype was for q6afe_cdc_dma_port_prepare() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 45468f2cfe9679eaeb7b7371b880548c5b74bede Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:25 2021 -0600 ASoC: Intel: bytcr_wm5102: remove unused static variable make W=1 warning: sound/soc/intel/boards/bytcr_wm5102.c:216:40: error: ‘byt_wm5102_dai_params’ defined but not used [-Werror=unused-const-variable=] 216 | static const struct snd_soc_pcm_stream byt_wm5102_dai_params = { | ^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9d02a3021833d19d3c1ddfb4f26e9f58772ce89f Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:24 2021 -0600 ASoC: fsl: fsl_easrc: fix kernel-doc warning make W=1 warning: sound/soc/fsl/fsl_easrc.c:383: warning: wrong kernel-doc identifier on line: * Scale filter coefficients (64 bits float) Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6a9287f5beef9787a14b0ad63ef8078d9a409f22 Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:23 2021 -0600 ASoC: fsl: fsl_ssi: fix kernel-doc warning make W=1 warning: sound/soc/fsl/fsl_ssi.c:371: warning: expecting prototype for fsl_ssi_irq(). Prototype was for fsl_ssi_isr() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7655e32685e809fd56daf02436a0826e08368805 Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:22 2021 -0600 ASoC: amd: renoir: remove invalid kernel-doc comment make W=1 warning: sound/soc/amd/renoir/rn-pci-acp3x.c:24: warning: wrong kernel-doc identifier on line: * dmic_acpi_check = -1 - Use ACPI/DMI method to detect the DMIC hardware presence at runtime Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5dd902d99ebb63f490d73277340745e0bd9ea7f2 Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:21 2021 -0600 ASoC: sigmadsp-regmap: fix kernel-doc warning make W=1 warning: sound/soc/codecs/sigmadsp-regmap.c:42: warning: expecting prototype for devm_sigmadsp_init_i2c(). Prototype was for devm_sigmadsp_init_regmap() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 79d77f7fd1de16ea5d5c778f426007edaeb4c365 Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:20 2021 -0600 ASoC: rt5631: fix kernel-doc warning make W=1 warning: sound/soc/codecs/rt5631.c:446: warning: expecting prototype for onebit_depop_power_stage(). Prototype was for depop_seq_power_stage() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c5036b86678fcc17bc49f85b03bd1a0ac8524646 Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:19 2021 -0600 ASoC: jz4760: fix set but not used warning make W=1 warning: sound/soc/codecs/jz4760.c: In function ‘jz4760_codec_startup’: sound/soc/codecs/jz4760.c:201:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] 201 | int ret; | ^~~ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 80cd73094c4096b3ce4d57cb8cf2c3e341c6de97 Author: Pierre-Louis Bossart Date: Tue Mar 2 14:59:18 2021 -0600 ASoC: cs4270: fix kernel-doc Add missing parameter (which happens to be ignored) Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302205926.49063-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f1a1da09faa3a875ede33386863ea363270be097 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:27 2021 -0600 ASoC: rt5682: remove useless initialization cppcheck complains about a possible null pointer dereference, but the problem is rather an useless initialization before walking through a list. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-25-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ec6aa9b59dbfb6db9447d09977d574f77a31392a Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:26 2021 -0600 ASoC: rt5682: remove useless assignments cppcheck warnings: sound/soc/codecs/rt5682.c:1234:6: style: Redundant initialization for 'idx'. The initialized value is overwritten before it is read. [redundantInitialization] idx = rt5682_div_sel(rt5682, dmic_clk_rate, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5682.c:1228:10: note: idx is initialized int idx = -EINVAL, dmic_clk_rate = 3072000; ^ sound/soc/codecs/rt5682.c:1234:6: note: idx is overwritten idx = rt5682_div_sel(rt5682, dmic_clk_rate, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5682.c:1263:6: style: Redundant initialization for 'idx'. The initialized value is overwritten before it is read. [redundantInitialization] idx = rt5682_div_sel(rt5682, ref, div_f, ARRAY_SIZE(div_f)); ^ sound/soc/codecs/rt5682.c:1248:25: note: idx is initialized int ref, val, reg, idx = -EINVAL; ^ sound/soc/codecs/rt5682.c:1263:6: note: idx is overwritten idx = rt5682_div_sel(rt5682, ref, div_f, ARRAY_SIZE(div_f)); ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-24-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit e699b2c89f8302c600d3373ae0ab12689bbf0da5 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:25 2021 -0600 ASoC: rt5682: clarify expression cppcheck warning: sound/soc/codecs/rt5682.c:2401:65: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5682_PLL_M_SFT | Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-23-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 51cb94f6c34017845030f3c20668412469345ef0 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:24 2021 -0600 ASoC: rt5677: remove useless assignment cppcheck warning: sound/soc/codecs/rt5677.c:5335:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0, loop, i, reg_irq, virq; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-22-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ae052909d1b1c8dcc2406f11eb3b5f9193dc3d2f Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:23 2021 -0600 ASoC: rt5677: clarify expression cppcheck warning: sound/soc/codecs/rt5677.c:4571:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5677_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-21-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7ad9b8d28d3f2997b4af0a074e6f609ffb5d32a7 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:22 2021 -0600 ASoC: rt5670: clarify expression cppcheck warning: sound/soc/codecs/rt5670.c:2519:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5670_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-20-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 6fa5445685150dee9930cdfe7a96353a4dcc1d50 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:21 2021 -0600 ASoC: rt5668: remove useless assignments cppcheck warnings: sound/soc/codecs/rt5668.c:1177:6: style: Redundant initialization for 'idx'. The initialized value is overwritten before it is read. [redundantInitialization] idx = rt5668_div_sel(rt5668, 1500000, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5668.c:1174:10: note: idx is initialized int idx = -EINVAL; ^ sound/soc/codecs/rt5668.c:1177:6: note: idx is overwritten idx = rt5668_div_sel(rt5668, 1500000, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5668.c:1202:6: style: Redundant initialization for 'idx'. The initialized value is overwritten before it is read. [redundantInitialization] idx = rt5668_div_sel(rt5668, ref, div, ARRAY_SIZE(div)); ^ sound/soc/codecs/rt5668.c:1191:25: note: idx is initialized int ref, val, reg, idx = -EINVAL; ^ sound/soc/codecs/rt5668.c:1202:6: note: idx is overwritten idx = rt5668_div_sel(rt5668, ref, div, ARRAY_SIZE(div)); ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-19-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 17de60946a65fb013753ff2d7d01f890cb82d446 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:20 2021 -0600 ASoC: rt5668: clarify expression cppcheck warning: sound/soc/codecs/rt5668.c:2185:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5668_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-18-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 17d78e93114887033f0be1c3c574004d437f7608 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:19 2021 -0600 ASoC: rt5665: clarify expression cppcheck warning: sound/soc/codecs/rt5665.c:4388:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5665_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-17-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ca1107d305b58a9b47ac071e1547490327bff007 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:18 2021 -0600 ASoC: rt5663: clarify expression cppcheck warning: bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5663_PLL_M_SHIFT | ^ sound/soc/codecs/rt5663.c:2955:63: style: Boolean result is used in Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-16-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9fd72391ae8fa0811603c7489b8afacd66f5f5e6 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:17 2021 -0600 ASoC: rt5660: clarify expression cppcheck warning: sound/soc/codecs/rt5660.c:1060:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5660_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-15-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bb133ec21f865a03b8798b57815461fe0e7e6ec8 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:16 2021 -0600 ASoC: rt5659: clarify expression cppcheck warning: sound/soc/codecs/rt5659.c:3515:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5659_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-14-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9b9adc5b749d2f31885f36e2adc6c13af70543bd Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:15 2021 -0600 ASoC: rt5651: remove useless assignment cppcheck warning: sound/soc/codecs/rt5651.c:1786:13: style: Variable 'report' is assigned a value that is never used. [unreadVariable] int report = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 33eaffe3706ab93ced1b4477f6598a5502028ce3 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:14 2021 -0600 ASoC: rt5651: clarify expression cppcheck warning: sound/soc/codecs/rt5659.c:3515:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5659_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fa0eb20cb38d8e41ff097b985755ba62e1b32b24 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:13 2021 -0600 ASoC: rt5645: clarify expression cppcheck warning: sound/soc/codecs/rt5645.c:2959:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5645_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5864cf7f26aed303c96bcc56f8c8af914fac9bfb Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:12 2021 -0600 ASoC: rt5645: use logical OR cppcheck warning: sound/soc/codecs/rt5645.c:693:37: style:inconclusive: Boolean expression 'reg>=420&®<=461' is used in bitwise operation. Did you mean '||'? [bitwiseOnBoolean] if ((reg >= 0x1a4 && reg <= 0x1cd) | (reg >= 0x1e5 && reg <= 0x1f8) | ^ sound/soc/codecs/rt5645.c:693:70: style:inconclusive: Boolean expression 'reg==177' is used in bitwise operation. Did you mean '||'? [bitwiseOnBoolean] if ((reg >= 0x1a4 && reg <= 0x1cd) | (reg >= 0x1e5 && reg <= 0x1f8) | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4fbd2978944cff4e747f132cf86254956bb2f045 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:11 2021 -0600 ASoC: rt5640: clarify expression cppcheck warning: sound/soc/codecs/rt5640.c:1923:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT5640_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 1dd9cca701468b6285dea5188efc9aa28aabbf56 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:10 2021 -0600 ASoC: rt1308: clarify expression cppcheck warning: sound/soc/codecs/rt1308.c:676:40: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] pll_code.k_code << RT1308_PLL1_K_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9e884eed54c4138bfb77da18016131a6ec1b0af7 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:09 2021 -0600 ASoC: rt1305: clarify expression cppcheck warning: sound/soc/codecs/rt1305.c:853:63: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1305_PLL_1_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit a426017ed5932141da4f09a35ed562bc845fa281 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:08 2021 -0600 ASoC: rt1016: clarify expression cppcheck warning: sound/soc/codecs/rt1016.c:503:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1016_PLL_M_SFT | ^ sound/soc/codecs/rt1016.c:506:40: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] pll_code.k_bp << RT1016_PLL_K_BP_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4354ad55cde7c50c738d11edf302549537bce504 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:07 2021 -0600 ASoC: rt1015: clarify expression cppcheck warning: sound/soc/codecs/rt1015.c:894:61: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1015_PLL_M_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5a2429926549a8828f7dedd690b498eb9ce0296a Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:06 2021 -0600 ASoC: rt1011: clarify expression cppcheck warning: sound/soc/codecs/rt1011.c:1781:63: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] (pll_code.m_bp ? 0 : pll_code.m_code) << RT1011_PLL1_QM_SFT | ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7e66f16251eb59410257a1e5e279e6c949f53171 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:05 2021 -0600 ASoC: rt1011: remove redundant test cppcheck warning: sound/soc/codecs/rt1011.c:1994:6: style: Condition 'tx_slotnum' is always true [knownConditionTrueFalse] if (tx_slotnum) ^ sound/soc/codecs/rt1011.c:1895:24: note: Assuming that condition '!tx_slotnum' is not redundant if (tx_slotnum > 2 || !tx_slotnum) { ^ sound/soc/codecs/rt1011.c:1994:6: note: Condition 'tx_slotnum' is always true if (tx_slotnum) ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f7c5c16875c2d2b6e1a7f4f1915d125b79be4951 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:25:04 2021 -0600 ASoC: rt1011: use logical OR cppcheck complains a lot about mixing booleans and bitwise operations. There is no good reason to use && and |, fix with || Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302212527.55158-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7942bf0671721f760992861d712e3dfaafe1720e Merge: 842860f45dbdd 5ed26a834b83a Author: Mark Brown Date: Tue Mar 2 14:50:45 2021 +0000 Merge series "ASoC: Intel: soc-acpi: remove unused TigerLake configurations" from Pierre-Louis Bossart : Remove two machine descriptors which were added for development on Intel RVPs but are no longer used or productized. This will not have any impact on end-users. The corresponding cleanup was applied in the SOF topologies. Pierre-Louis Bossart (2): ASoC: Intel: soc-acpi: remove unused TGL table with rt5682 only ASoC: Intel: soc-acpi: remove TGL RVP mixed SoundWire/TDM config .../intel/common/soc-acpi-intel-tgl-match.c | 23 ------------------- 1 file changed, 23 deletions(-) -- 2.25.1 commit 842860f45dbddbac30e94f7b2edca535209f7b7d Merge: e443858258a2e ead2a3e43f0a6 Author: Mark Brown Date: Tue Mar 2 14:50:44 2021 +0000 Merge series "Add I2S-MCC support for Microchip's SAMA7G5" from Codrin Ciubotariu : SAMA7G5 includes an updated version of I2S-MCC, found previously on SAM9X60. This controller includes 8 data pins, 4 for playback and 4 for capture. For I2S and LEFT_J formats, these pins can be used to send/receive up to 8 audio channels. For DSP_A, with TDM, any pins pair (DIN/DOUT) from these 4 can be selected to send/receive data. This version also includes 2 FIFOs (send and receive). This patch set starts by moving the driver's bindings to yaml and continues with adding a new compatible for the SAMA7G5 variant, followed by the changes needed for I2S/LEFT_J support, TDM pin pair selection and FIFO support, exclusively for SAMA7G5. Changes in v2: - moved DT binding conversion patch from the beginning to the end of the patch serieses - patches that update the DT binding are modified to change .txt file instead of .yaml Codrin Ciubotariu (7): dt-bindings: mchp,i2s-mcc: Add SAMA7G5 to binding ASoC: mchp-i2s-mcc: Add compatible for SAMA7G5 ASoC: mchp-i2s-mcc: Add multi-channel support for I2S and LEFT_J formats dt-bindings: mchp,i2s-mcc: Add property to specify pin pair for TDM ASoC: mchp-i2s-mcc: Add support to select TDM pins ASoC: mchp-i2s-mcc: Add FIFOs support ASoC: convert Microchip I2SMCC binding to yaml .../bindings/sound/mchp,i2s-mcc.yaml | 108 ++++++++++++ .../bindings/sound/mchp-i2s-mcc.txt | 43 ----- sound/soc/atmel/Kconfig | 3 + sound/soc/atmel/mchp-i2s-mcc.c | 161 +++++++++++++++--- 4 files changed, 252 insertions(+), 63 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/mchp,i2s-mcc.yaml delete mode 100644 Documentation/devicetree/bindings/sound/mchp-i2s-mcc.txt -- 2.27.0 commit e443858258a2e29eee96e919589448855aa2735e Author: Ranjani Sridharan Date: Mon Mar 1 09:01:57 2021 -0800 ASoC: SOF: Intel: hda: enable async suspend The skylake driver disabled async suspend to prevent disabling the DSP before the card was suspended during system suspend. This code was carried over to the SOF driver. But, there is no risk of the DSP getting disabled before the card is suspended with the SOF driver. Therefore, it is safe to enable async suspend and thereby optimize the system resume time. Reviewed-by: Kai Vehmanen Reviewed-by: Pierre-Louis Bossart Signed-off-by: Ranjani Sridharan Link: https://lore.kernel.org/r/20210301170157.36584-1-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown commit ee00e0bf7e4fe6c253219680b339add32686efee Author: Fabio Estevam Date: Mon Mar 1 16:33:28 2021 -0300 ASoC: wm8524: Do not print probe defer error On an imx8mq-evk the following error is seen: [ 1.375809] wm8524-codec audio-codec: Failed to get mute line: -517 It happens because the codec driver may probe prior to the imx gpio driver, which causes a probe defer. Change to dev_err_probe() to avoid printing this error. Reported-by: Chris Healy Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210301193328.2123511-1-festevam@gmail.com Signed-off-by: Mark Brown commit 7810ea4c8f74ff904ac1ea06dde9201af566d679 Author: Pierre-Louis Bossart Date: Mon Mar 1 10:53:47 2021 -0600 ASoC: Intel: atom: fix kernel-doc v5.12-rc1 flags new warnings with make W=1, fix missing or broken function descriptors. sound/soc/intel/atom/sst/sst_loader.c:85: warning: expecting prototype for sst_start_merrifield(). Prototype was for sst_start_mrfld() instead sound/soc/intel/atom/sst/sst_acpi.c:339: warning: expecting prototype for intel_sst_remove(). Prototype was for sst_acpi_remove() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210301165349.114952-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2fb8711095a1f8b545b2cae307d9b0fc9591e36b Author: Pierre-Louis Bossart Date: Mon Mar 1 11:46:59 2021 -0600 ASoC: soc-dai: fix kernel-doc v5.12-rc1 flags new warnings with make W=1, fix missing or broken function descriptors. sound/soc/soc-dai.c:167: warning: expecting prototype for snd_soc_xlate_tdm_slot(). Prototype was for snd_soc_xlate_tdm_slot_mask() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210301174659.117122-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 075d7da7d6b42db90039a95f102d7d999ecc410e Author: Pierre-Louis Bossart Date: Mon Mar 1 11:46:39 2021 -0600 ASoC: codecs: nau8825: fix kernel-doc v5.12-rc1 flags new warnings with make W=1, fix missing or broken function descriptors. sound/soc/codecs/nau8825.c:298: warning: wrong kernel-doc identifier on line: * Ramp up the headphone volume change gradually to target level. sound/soc/codecs/nau8825.c:358: warning: expecting prototype for This func(). Prototype was for nau8825_intlog10_dec3() instead sound/soc/codecs/nau8825.c:411: warning: wrong kernel-doc identifier on line: * computes cross talk suppression sidetone gain. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210301174639.117017-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5ed26a834b83a368f2c026f22db9becc56fd37f9 Author: Pierre-Louis Bossart Date: Mon Mar 1 17:56:37 2021 -0600 ASoC: Intel: soc-acpi: remove TGL RVP mixed SoundWire/TDM config The TGL RVP can be configured in many ways. We initially supported a mixed configuration with RT711 in SoundWire mode and RT1308 in TDM mode. However Intel teams no longer have any hardware with this configuration and there are no commercially-available devices using it either, so let's remove this entry. The corresponding topology will also be removed from the SOF tree. This patch partially reverts Commit d985d208bf8f ("ASoC: Intel: common: add match tables for TGL w/ SoundWire") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210301235637.1177525-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4e8d9fe7f09bd975b85382af9fd301645ee8c0e8 Author: Pierre-Louis Bossart Date: Mon Mar 1 17:56:36 2021 -0600 ASoC: Intel: soc-acpi: remove unused TGL table with rt5682 only This patch partially reverts Commit 095ee71907ea ("ASoC: Intel: common: add match table for TGL RT5682 SoundWire driver"). This commit was added as an enabling patch before the Maxim98373 codec driver was available. This codec is now fully functional and the topology with only RT5682 no longer maintained or used. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Kai Vehmanen Reviewed-by: Bard Liao Reviewed-by: Rander Wang Link: https://lore.kernel.org/r/20210301235637.1177525-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit ead2a3e43f0a6556e464a83ffba7d7baacf0d426 Author: Codrin Ciubotariu Date: Mon Mar 1 19:09:02 2021 +0200 ASoC: mchp, i2s-mcc: Add property to specify pin pair for TDM SAMA7G5's I2S-MCC has 4 pairs of DIN/DOUT pins. Since TDM only uses a single pair of pins for synchronous capture and playback, the controller needs to be told which of the pair is connected. This can be mentioned using the new "microchip,tdm-data-pair" property. The property is optional, needed only if TDM is used, and if it's missing DIN/DOUT 0 pins will be used by default. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210301170905.835091-5-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 153bb1feefd2a7c907d65ccf89953feb1548e60f Author: Codrin Ciubotariu Date: Mon Mar 1 19:08:59 2021 +0200 ASoC: mchp,i2s-mcc: Add SAMA7G5 to binding SAMA7G5 includes an updated version of the I2S-MCC driver, that includes 3 more DIN/DOUT pin pairs for multi-channel. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210301170905.835091-2-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 16135d66309a5ca67e05cd7d0b1b038597a0b0a3 Author: Codrin Ciubotariu Date: Mon Mar 1 19:09:04 2021 +0200 ASoC: mchp-i2s-mcc: Add FIFOs support I2S-MCC found on SAMA7G5 includes 2 FIFOs (capture and playback). When FIFOs are enabled, bits I2SMCC_ISRA.TXLRDYx and I2SMCC_ISRA.TXRRDYx must not be used. Bits I2SMCC_ISRB.TXFFRDY and I2SMCC_ISRB.RXFFRDY must be used instead. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210301170905.835091-7-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit bfdca489751ff765ee606c85bda1680040dedd8e Author: Codrin Ciubotariu Date: Mon Mar 1 19:09:03 2021 +0200 ASoC: mchp-i2s-mcc: Add support to select TDM pins SAMA7G5's I2S-MCC has 4 pairs of DIN/DOUT pins. Since TDM only uses a single pair of pins for synchronous capture and playback, the controller needs to be told which of the pair is connected. This can be mentioned using the "microchip,tdm-data-pair" property from DT. The property is optional, useful only if TDM is used. If it's missing, DIN/DOUT 0 pins will be used by default. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210301170905.835091-6-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 13c1629d758aae97f329d25714e26edde4e5cf3e Author: Codrin Ciubotariu Date: Mon Mar 1 19:09:01 2021 +0200 ASoC: mchp-i2s-mcc: Add multi-channel support for I2S and LEFT_J formats The latest I2S-MCC available in SAMA7G5 supports multi-channel for I2S and Left-Justified formats. For this, the new version uses 8 (4 * 2) input and output pins, with each pin being responsible for 2 channels. This sums up to a total of 8 channels for synchronous capture and playback. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210301170905.835091-4-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit 99ac2f8d1508f31ecf28d5af0ce384bf0a033f90 Author: Codrin Ciubotariu Date: Mon Mar 1 19:09:00 2021 +0200 ASoC: mchp-i2s-mcc: Add compatible for SAMA7G5 Microchip's new SAMA7G5 includes an updated I2S-MCC compatible with the previous version found on SAM9X60. The new controller includes 8 (4 * 2) input and output data pins for up to 8 channels for I2S and Left-Justified formats. Signed-off-by: Codrin Ciubotariu Link: https://lore.kernel.org/r/20210301170905.835091-3-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown commit fa576ff64f5d4d67848051ee3f7340519098a98a Merge: ef1ed5b855f60 b6e499bcb32f0 Author: Mark Brown Date: Mon Mar 1 23:31:55 2021 +0000 Merge series "ASoC: rsnd: cleanup ppcheck warning for Renesas sound driver" from Kuninori Morimoto : Hi Mark, Pierre-Louis These patches are based on below patch-set which from Pierre-Louis, and cleanup cppcheck warnings for Rensas sound driver. [3/5] has Reported-by Pierre-Louis tag. Subject: [PATCH 0/8] ASoC: sh: remove cppcheck warnings Date: Fri, 19 Feb 2021 17:16:27 -0600 Kuninori Morimoto (5): ASoC: rsnd: cleanup ppcheck warning for ssiu.c ASoC: rsnd: cleanup ppcheck warning for ssi.c ASoC: rsnd: cleanup ppcheck warning for core.c ASoC: rsnd: cleanup ppcheck warning for cmd.c ASoC: rsnd: cleanup ppcheck warning for adg.c sound/soc/sh/rcar/adg.c | 15 +++++++------- sound/soc/sh/rcar/cmd.c | 15 +++++++------- sound/soc/sh/rcar/core.c | 32 +++++++++++++--------------- sound/soc/sh/rcar/ssi.c | 45 ++++++++++++++++++++-------------------- sound/soc/sh/rcar/ssiu.c | 22 +++++++++++--------- 5 files changed, 64 insertions(+), 65 deletions(-) -- 2.25.1 commit ef1ed5b855f605af0f659015c5fd6a98cfcb6964 Merge: 3766623b5c449 eb0d22d793e82 Author: Mark Brown Date: Mon Mar 1 23:31:53 2021 +0000 Merge series "drop unneeded snd_soc_dai_set_drvdata" from Julia Lawall : snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. --- sound/soc/fsl/fsl_micfil.c | 2 -- sound/soc/fsl/fsl_sai.c | 2 -- sound/soc/fsl/fsl_xcvr.c | 1 - sound/soc/mxs/mxs-saif.c | 10 ---------- sound/soc/pxa/mmp-sspa.c | 1 - sound/soc/sunxi/sun4i-i2s.c | 2 -- 6 files changed, 18 deletions(-) commit 3766623b5c44968298955eceb25d29967b593f42 Merge: d59748076b89b b7e41867a4c9e Author: Mark Brown Date: Mon Mar 1 23:31:52 2021 +0000 Merge series "ASoC: sh: remove cppcheck warnings" from Pierre-Louis Bossart : No functional changes except for patch 4 where a missing error check was added for consistency. Pierre-Louis Bossart (8): ASoC: sh: dma-sh7760: remove unused variable ASoC: sh: rcar: align function prototypes ASoC: sh: rcar: simplify return ASoC: sh: rcar: core: rename shadowing variables ASoC: sh: rcar: ctu: add missing error check ASoC: sh: rcar: ssi: remove redundant assignment ASoC: sh: siu_pcm: remove useless assignment ASoC: sh: siu_pcm: remove unused variable sound/soc/sh/dma-sh7760.c | 1 - sound/soc/sh/rcar/core.c | 14 +++++++------- sound/soc/sh/rcar/ctu.c | 2 ++ sound/soc/sh/rcar/rsnd.h | 6 +++--- sound/soc/sh/rcar/ssi.c | 1 - sound/soc/sh/siu_pcm.c | 6 +----- 6 files changed, 13 insertions(+), 17 deletions(-) -- 2.25.1 commit d59748076b89bd895d313008912db6a02b7ed33a Merge: 260fe5535b693 bd029fc868347 Author: Mark Brown Date: Mon Mar 1 23:31:51 2021 +0000 Merge series "ASoC: core: remove cppcheck warnings" from Pierre-Louis Bossart : This is the first batch of cleanups to make cppcheck more usable, currently we have way too many warnings that drown real issues. Pierre-Louis Bossart (6): ASoC: soc-ops: remove useless assignment ASoC: soc-pcm: remove redundant assignment ASoC: soc-pcm: remove shadowing variable ASoC: soc-pcm: add error log ASoC: soc-topology: clarify expression ASoC: generic: simple-card-utils: remove useless assignment sound/soc/generic/simple-card-utils.c | 2 +- sound/soc/soc-ops.c | 2 +- sound/soc/soc-pcm.c | 4 ++-- sound/soc/soc-topology.c | 16 ++++++++-------- 4 files changed, 12 insertions(+), 12 deletions(-) -- 2.25.1 commit 260fe5535b693f7ac763f77e3267b5a7b34ace9c Merge: 4ea62149dc62d c856cef731ddf Author: Mark Brown Date: Mon Mar 1 23:31:50 2021 +0000 Merge series "ASoC: samsung: remove cppcheck warnings" from Pierre-Louis Bossart : No functional changes except for patch 2 and 3 where missing error checks were added for consistency. Pierre-Louis Bossart (6): ASoC: samsung: i2s: remove unassigned variable ASoC: samsung: s3c24xx_simtec: add missing error check ASoC: samsung: smdk_wm8994: add missing return ASoC: samsung: snow: remove useless test ASoC: samsung: tm2_wm5110: check of_parse return value ASoC: samsung: tm2_wm5510: remove shadowing variable sound/soc/samsung/i2s.c | 3 +-- sound/soc/samsung/s3c24xx_simtec.c | 5 +++++ sound/soc/samsung/smdk_wm8994.c | 1 + sound/soc/samsung/snow.c | 5 +---- sound/soc/samsung/tm2_wm5110.c | 3 +-- 5 files changed, 9 insertions(+), 8 deletions(-) -- 2.25.1 commit 4ea62149dc62d06dc39eb4870e04fda1a34360c3 Merge: 029448a8560f9 4fe28461e289e Author: Mark Brown Date: Mon Mar 1 23:31:49 2021 +0000 Merge series "soc-pcm: tidyup snd_pcm_hardware setup for FE/BE" from Kuninori Morimoto : Hi Mark These patches tidyup snd_pcm_hardware setup for FE/BE. [1/5] changes behavior, but I think it is bug-fix. Kuninori Morimoto (5): ASoC: soc-pcm: remove strange format storing ASoC: soc-pcm: unpack dpcm_init_runtime_hw() ASoC: soc-pcm: add dpcm_runtime_setup_fe() ASoC: soc-pcm: add dpcm_runtime_setup() ASoC: soc-pcm: unpack dpcm_set_fe_runtime() sound/soc/soc-pcm.c | 79 +++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 43 deletions(-) -- 2.25.1 commit 029448a8560f92e235ba7d30ff0b1fb458d279de Merge: 7817317e2ffad b86fe83448b45 Author: Mark Brown Date: Mon Mar 1 23:31:48 2021 +0000 Merge series "ASoC: fsl: remove cppcheck warnings" from Pierre-Louis Bossart : Nothing critical and no functional changes. The only change that needs attention if the 'fsl_ssi: remove unnecessary tests' patch, where variables are to zero, then tested to set register fields. Either the tests are indeed redundant or the entire programming sequence is incorrect. Pierre-Louis Bossart (9): ASoC: fsl: fsl_asrc: remove useless assignment ASoC: fsl: fsl_dma: remove unused variable ASoC: fsl: fsl_easrc: remove useless assignments ASoC: fsl: fsl_esai: clarify expression ASoC: fsl: fsl_ssi: remove unnecessary tests ASoC: fsl: imx-hdmi: remove unused structure members ASoC: fsl: mpc5200: signed parameter in snprintf format ASoC: fsl: mpc8610: remove useless assignment ASoC: fsl: p1022_ds: remove useless assignment sound/soc/fsl/fsl_asrc.c | 2 +- sound/soc/fsl/fsl_dma.c | 3 --- sound/soc/fsl/fsl_easrc.c | 6 +++--- sound/soc/fsl/fsl_esai.c | 2 +- sound/soc/fsl/fsl_ssi.c | 5 ++--- sound/soc/fsl/imx-hdmi.c | 4 ---- sound/soc/fsl/mpc5200_dma.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- 9 files changed, 10 insertions(+), 18 deletions(-) -- 2.25.1 commit 7817317e2ffada7d0a872c4b0babc0943fb4b8d7 Merge: 893bc891d39d1 c4fd082e46627 Author: Mark Brown Date: Mon Mar 1 23:31:47 2021 +0000 Merge series "ASoC: rt*: Constify static structs" from Rikard Falkeborn : Constify a number of static structs that are never modified in RealTek codecs. The most important patches are the first two, which constifies snd_soc_dai_ops and sdw_slave_ops, both which contain function pointers. The other two patches are for good measure, since I was already touching the code there. When doing this, I discovered sound/soc/codecs/rt1016.c is not in a Makefile, so there is not really any way to build it (I added locally to the Makefile to compile-test my changes). Is this expected or an oversight? Rikard Falkeborn (4): ASoC: rt*: Constify static struct sdw_slave_ops ASoC: rt*: Constify static struct snd_soc_dai_ops ASoC: rt*: Constify static struct acpi_device_id ASoc: rt5631: Constify static struct coeff_clk_div sound/soc/codecs/rt1011.c | 2 +- sound/soc/codecs/rt1015.c | 4 ++-- sound/soc/codecs/rt1016.c | 4 ++-- sound/soc/codecs/rt1305.c | 2 +- sound/soc/codecs/rt1308-sdw.c | 2 +- sound/soc/codecs/rt1308.c | 2 +- sound/soc/codecs/rt5631.c | 2 +- sound/soc/codecs/rt5682-sdw.c | 4 ++-- sound/soc/codecs/rt700-sdw.c | 2 +- sound/soc/codecs/rt700.c | 2 +- sound/soc/codecs/rt711-sdw.c | 2 +- sound/soc/codecs/rt711.c | 2 +- sound/soc/codecs/rt715-sdw.c | 2 +- sound/soc/codecs/rt715.c | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) -- 2.30.1 commit 893bc891d39d17bac05fc242ffacfe516e7791fb Merge: 2b719fd20f327 4b4f2119f9851 Author: Mark Brown Date: Mon Mar 1 23:31:46 2021 +0000 Merge series "ASoC: qcom: remove cppcheck warnings" from Pierre-Louis Bossart : Second batch of cleanups for Qualcomm SOCs and codecs. The only functional change is the addition of a missing error check in the last patch. Pierre-Louis Bossart (10): ASoC: qcom: lpass-hdmi: remove useless return ASoC: qcom: lpass-platform: remove useless assignment ASoC: qcom: q6dsp-dai: clarify expression ASoC: qcom: q6afe: remove useless assignments ASoC: qcom: q6afe: align function prototype ASoC: qcom: q6asm: align function prototypes ASoC: wcd-clsh-v2: align function prototypes ASoC: wcd9335: clarify return value ASoC: wcd934x: remove useless return ASoC: lpass-wsa-macro: add missing test sound/soc/codecs/lpass-wsa-macro.c | 2 ++ sound/soc/codecs/wcd-clsh-v2.h | 6 +++--- sound/soc/codecs/wcd9335.c | 2 +- sound/soc/codecs/wcd934x.c | 2 -- sound/soc/qcom/lpass-hdmi.c | 4 ---- sound/soc/qcom/lpass-platform.c | 2 +- sound/soc/qcom/qdsp6/q6afe-dai.c | 2 +- sound/soc/qcom/qdsp6/q6afe.c | 5 ++--- sound/soc/qcom/qdsp6/q6afe.h | 2 +- sound/soc/qcom/qdsp6/q6asm.h | 6 +++--- 10 files changed, 14 insertions(+), 19 deletions(-) -- 2.25.1 commit 2b719fd20f327f81270b0ab99159f61da3bbac34 Author: Shuming Fan Date: Tue Feb 23 17:07:59 2021 +0800 ASoC: rt1316: Add RT1316 SDCA vendor-specific driver This is the initial amplifier driver for rt1316 SDCA version. Signed-off-by: Shuming Fan Link: https://lore.kernel.org/r/20210223090759.15323-1-shumingf@realtek.com Signed-off-by: Mark Brown commit 1b99d50b9709a2cddaba4a7faf1862b4f7bec865 Author: Cezary Rojewski Date: Mon Jan 25 12:54:41 2021 +0100 ASoC: Intel: Skylake: Compile when any configuration is selected Skylake is dependent on SND_SOC_INTEL_SKYLAKE (aka "all SST platforms") whereas selecting specific configuration such as KBL-only will not cause driver code to compile. Switch to SND_SOC_INTEL_SKYLAKE_COMMON dependency so selecting any configuration causes the driver to be built. Reported-by: Kai-Heng Feng Suggested-by: Amadeusz Sławiński Fixes: 35bc99aaa1a3 ("ASoC: Intel: Skylake: Add more platform granularity") Signed-off-by: Cezary Rojewski Link: https://lore.kernel.org/r/20210125115441.10383-1-cezary.rojewski@intel.com Signed-off-by: Mark Brown commit 5f160cbe76bfdb097ebf5514a4562e8dc658d5d2 Author: Viorel Suman Date: Mon Feb 22 17:09:50 2021 +0800 ASoC: fsl_xcvr: move reset assert into runtime_resume Move reset assert into runtime_resume since we cannot rely on reset assert state when the device is put out from suspend. Signed-off-by: Viorel Suman Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1613984990-5534-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 1372c76802bed271ddcfdd71b6fe3ea9254e6277 Author: Kai Vehmanen Date: Wed Feb 24 16:15:41 2021 +0200 ASoC: SOF: Intel: hda: turn off display power in resume Turn off display power at the end of controller resume flow. This is now possible with the changes done in commit 87fc20e4a0cb ("ASoC: SOF: Intel: hda: use hdac_ext fine-grained link management"). As codec driver is able to request the HDA link to be brought back up, the controller no longer needs to blindly keep display power enabled. Co-developed-by: Sathyanarayana Nujella Signed-off-by: Sathyanarayana Nujella Signed-off-by: Kai Vehmanen Reviewed-by: Ranjani Sridharan Reviewed-by: Keyon Jie Link: https://lore.kernel.org/r/20210224141541.3331254-1-kai.vehmanen@linux.intel.com Signed-off-by: Mark Brown commit 1730ef62874dbdc53dc2abfa430f09f0b304bafc Author: Colin Ian King Date: Fri Feb 26 18:56:53 2021 +0000 ASoC: Intel: boards: sof-wm8804: add check for PLL setting Currently the return from snd_soc_dai_set_pll is not checking for failure, this is the only driver in the kernel that ignores this, so it probably should be added for sake of completeness. Fix this by adding an error return check. Addresses-Coverity: ("Unchecked return value") Fixes: f139546fb7d4 ("ASoC: Intel: boards: sof-wm8804: support for Hifiberry Digiplus boards") Signed-off-by: Colin Ian King Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210226185653.1071321-1-colin.king@canonical.com Signed-off-by: Mark Brown commit ff5687854323533668ec06dd38808bae9a984f68 Author: Colin Ian King Date: Mon Feb 15 20:05:01 2021 +0000 ASoC: codecs: lpass-rx-macro: remove redundant initialization of variable hph_pwr_mode The variable hph_pwr_mode 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. Signed-off-by: Colin Ian King Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210215200501.90697-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 907e0cdebc1f36623ca8ce6a6376abb1ad56e93d Author: Shengjiu Wang Date: Mon Feb 22 16:40:20 2021 +0800 ASoC: fsl_sai: Add pm qos cpu latency support On SoCs such as i.MX7ULP, cpuidle has some levels which may disable system/bus clocks, so need to add pm_qos to prevent cpuidle from entering low level idles and make sure system/bus clocks are enabled when sai is active. Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1613983220-5373-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 13fba3e873b1f21ed3de6596568ef02d31050b6f Author: dingsenjie Date: Wed Feb 24 16:54:07 2021 +0800 ASoC: uniphier: Simplify the return expression of uniphier_aio_startup Simplify the return expression in the aio-cpu.c. Signed-off-by: dingsenjie Link: https://lore.kernel.org/r/20210224085407.22120-1-dingsenjie@163.com Signed-off-by: Mark Brown commit 933f98be60a7b9c287acb081fb5d6659dd5e0441 Author: Krzysztof Kozlowski Date: Sun Feb 21 16:30:24 2021 +0100 ASoC: constify of_phandle_args in snd_soc_get_dai_name() The pointer to of_phandle_args passed to snd_soc_get_dai_name() and of_xlate_dai_name() implementations is not modified. Since it is being used only to translate passed OF node to a DAI name, it should not be modified, so mark it as const for correctness and safer code. Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210221153024.453583-1-krzk@kernel.org Signed-off-by: Mark Brown commit b6e499bcb32f07364cf62e7022032f1c0632f76c Author: Kuninori Morimoto Date: Thu Feb 25 09:25:23 2021 +0900 ASoC: rsnd: cleanup ppcheck warning for adg.c This patch cleanups below ppcheck warning. sound/soc/sh/rcar/adg.c:67:9: style: The scope of the variable 'ratio' can be reduced. [variableScope] int i, ratio; ^ sound/soc/sh/rcar/adg.c:114:6: style: The scope of the variable 'idx' can be reduced. [variableScope] int idx, sel, div, step; ^ sound/soc/sh/rcar/adg.c:114:21: style: The scope of the variable 'step' can be reduced. [variableScope] int idx, sel, div, step; ^ sound/soc/sh/rcar/adg.c:397:14: style: The scope of the variable 'clk' can be reduced. [variableScope] struct clk *clk; ^ Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87ft1lro24.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 31dbf7acc6a3abf84c2cb3c2312283ed8691de5b Author: Kuninori Morimoto Date: Thu Feb 25 09:25:19 2021 +0900 ASoC: rsnd: cleanup ppcheck warning for cmd.c This patch cleanups below ppcheck warning. sound/soc/sh/rcar/cmd.c:46:20: style: The scope of the variable 'src' can be reduced. [variableScope] struct rsnd_mod *src; ^ sound/soc/sh/rcar/cmd.c:47:27: style: The scope of the variable 'tio' can be reduced. [variableScope] struct rsnd_dai_stream *tio; ^ sound/soc/sh/rcar/cmd.c:145:13: style: The scope of the variable 'ret' can be reduced. [variableScope] int i, nr, ret; ^ Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87h7m1ro28.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit e539943c664e58a7005959f2c902d1fbda464b59 Author: Kuninori Morimoto Date: Thu Feb 25 09:25:14 2021 +0900 ASoC: rsnd: cleanup ppcheck warning for core.c This patch cleanups below ppcheck warning. sound/soc/sh/rcar/core.c:233:26: style: The scope of the variable 'io' can be reduced. [variableScope] struct rsnd_dai_stream *io; ^ sound/soc/sh/rcar/core.c:489:19: style: The scope of the variable 'mod' can be reduced. [variableScope] struct rsnd_mod *mod; ^ sound/soc/sh/rcar/core.c:1064:9: style: The scope of the variable 'j' can be reduced. [variableScope] int i, j; ^ sound/soc/sh/rcar/core.c:1143:19: style: The scope of the variable 'mod' can be reduced. [variableScope] struct rsnd_mod *mod; ^ sound/soc/sh/rcar/core.c:1261:22: style: The scope of the variable 'playback' can be reduced. [variableScope] struct device_node *playback, *capture; ^ sound/soc/sh/rcar/core.c:1261:33: style: The scope of the variable 'capture' can be reduced. [variableScope] struct device_node *playback, *capture; ^ sound/soc/sh/rcar/core.c:1419:29: style: The scope of the variable 'be_params' can be reduced. [variableScope] struct snd_pcm_hw_params *be_params; ^ sound/soc/sh/rcar/core.c:1369:22: style: Local variable 'rdai' shadows outer variable [shadowVariable] struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i); ^ sound/soc/sh/rcar/core.c:1338:19: note: Shadowed declaration struct rsnd_dai *rdai; ^ sound/soc/sh/rcar/core.c:1369:22: note: Shadow variable struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i); ^ sound/soc/sh/rcar/core.c:1380:22: style: Local variable 'rdai' shadows outer variable [shadowVariable] struct rsnd_dai *rdai = rsnd_rdai_get(priv, dai_i); ^ Reported-by: Pierre-Louis Bossart Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87im6hro2d.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 0779baa812cf27325ad1d43a917144f50ffd2142 Author: Kuninori Morimoto Date: Thu Feb 25 09:25:08 2021 +0900 ASoC: rsnd: cleanup ppcheck warning for ssi.c This patch cleanups below ppcheck warning. sound/soc/sh/rcar/ssi.c:170:19: style: The scope of the variable 'mod' can be reduced. [variableScope] struct rsnd_mod *mod; ^ sound/soc/sh/rcar/ssi.c:535:6: style: The scope of the variable 'i' can be reduced. [variableScope] int i; ^ sound/soc/sh/rcar/ssi.c:1212:19: style: The scope of the variable 'mod' can be reduced. [variableScope] struct rsnd_mod *mod; ^ sound/soc/sh/rcar/ssi.c:328:16: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] ssi->cr_clk = FORCE | rsnd_rdai_width_to_swl(rdai) | ^ sound/soc/sh/rcar/ssi.c:387:12: portability: Shifting signed 32-bit value by 31 bits is implementation-defined behaviour [shiftTooManyBitsSigned] cr_own |= FORCE | rsnd_rdai_width_to_swl(rdai); ^ Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87k0qxro2j.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 929cc78260550e82fc481c8c9428ec2aa589d88c Author: Kuninori Morimoto Date: Thu Feb 25 09:25:02 2021 +0900 ASoC: rsnd: cleanup ppcheck warning for ssiu.c This patch cleanups below ppcheck warning. sound/soc/sh/rcar/ssiu.c:212:10: style: The scope of the variable 'shift' can be reduced. [variableScope] int i, shift; ^ sound/soc/sh/rcar/ssiu.c:337:19: style: The scope of the variable 'mod' can be reduced. [variableScope] struct rsnd_mod *mod; ^ sound/soc/sh/rcar/ssiu.c:362:22: style: The scope of the variable 'np' can be reduced. [variableScope] struct device_node *np; ^ sound/soc/sh/rcar/ssiu.c:363:19: style: The scope of the variable 'mod' can be reduced. [variableScope] struct rsnd_mod *mod; ^ sound/soc/sh/rcar/ssiu.c:366:6: style: The scope of the variable 'i' can be reduced. [variableScope] int i; ^ sound/soc/sh/rcar/ssiu.c:397:13: style: The scope of the variable 'ret' can be reduced. [variableScope] int i, nr, ret; ^ Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87lfbdro2p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit eb0d22d793e82c126ce922fda387c29fe26a2bff Author: Julia Lawall Date: Sat Feb 13 11:19:07 2021 +0100 ASoC: fsl: drop unneeded snd_soc_dai_set_drvdata snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. The problem was fixed usingthe following semantic patch: (http://coccinelle.lip6.fr/) // @@ expression x,y,e; @@ x = dev_get_drvdata(y->dev) ... when != x = e - snd_soc_dai_set_drvdata(y,x); @@ expression x,y,e; @@ x = snd_soc_dai_get_drvdata(y) ... when != x = e - snd_soc_dai_set_drvdata(y,x); // Signed-off-by: Julia Lawall Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20210213101907.1318496-5-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 36785fec16bed809f622bd523c4cabdfefa9e836 Author: Julia Lawall Date: Sat Feb 13 11:19:06 2021 +0100 ASoC: sun4i-i2s: drop unneeded snd_soc_dai_set_drvdata snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. The problem was fixed usingthe following semantic patch: (http://coccinelle.lip6.fr/) // @@ expression x,y,e; @@ x = dev_get_drvdata(y->dev) ... when != x = e - snd_soc_dai_set_drvdata(y,x); @@ expression x,y,e; @@ x = snd_soc_dai_get_drvdata(y) ... when != x = e - snd_soc_dai_set_drvdata(y,x); // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20210213101907.1318496-4-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit b8fdf60931440296912e35bfe08b351fd3c37d11 Author: Julia Lawall Date: Sat Feb 13 11:19:05 2021 +0100 ASoC: mxs-saif: drop unneeded snd_soc_dai_set_drvdata snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. The problem was fixed usingthe following semantic patch: (http://coccinelle.lip6.fr/) // @@ expression x,y,e; @@ x = dev_get_drvdata(y->dev) ... when != x = e - snd_soc_dai_set_drvdata(y,x); @@ expression x,y,e; @@ x = snd_soc_dai_get_drvdata(y) ... when != x = e - snd_soc_dai_set_drvdata(y,x); // In this case, the whole probe function then does nothing, so drop it. Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20210213101907.1318496-3-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit 64ca77d9f55afbbe5e63b1d290cade4acfb8e4fa Author: Julia Lawall Date: Sat Feb 13 11:19:04 2021 +0100 ASoC: mmp-sspa: drop unneeded snd_soc_dai_set_drvdata snd_soc_dai_set_drvdata is not needed when the set data comes from snd_soc_dai_get_drvdata or dev_get_drvdata. The problem was fixed usingthe following semantic patch: (http://coccinelle.lip6.fr/) // @@ expression x,y,e; @@ x = dev_get_drvdata(y->dev) ... when != x = e - snd_soc_dai_set_drvdata(y,x); @@ expression x,y,e; @@ x = snd_soc_dai_get_drvdata(y) ... when != x = e - snd_soc_dai_set_drvdata(y,x); // Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/20210213101907.1318496-2-Julia.Lawall@inria.fr Signed-off-by: Mark Brown commit b7e41867a4c9e3613494fbda1c5995f9ed39f3f1 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:16:35 2021 -0600 ASoC: sh: siu_pcm: remove unused variable cppcheck warning: sound/soc/sh/siu_pcm.c:225:8: style: Variable 'virt' is assigned a value that is never used. [unreadVariable] virt = PERIOD_OFFSET(rt->dma_area, ^ It's not clear what this variable was needed for, remove it. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219231635.5749-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit eeff1df1fa13126f6024eb6dd0075b3182a3e011 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:16:34 2021 -0600 ASoC: sh: siu_pcm: remove useless assignment cppcheck warning: sound/soc/sh/siu_pcm.c:375:5: style: Redundant initialization for 'rt'. The initialized value is overwritten before it is read. [redundantInitialization] rt = siu_stream->substream->runtime; ^ sound/soc/sh/siu_pcm.c:366:30: note: rt is initialized struct snd_pcm_runtime *rt = ss->runtime; ^ sound/soc/sh/siu_pcm.c:375:5: note: rt is overwritten rt = siu_stream->substream->runtime; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219231635.5749-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9946871c608739b76c95d62aed70f9ee4f2d6747 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:16:33 2021 -0600 ASoC: sh: rcar: ssi: remove redundant assignment cppcheck warning: sound/soc/sh/rcar/ssi.c:403:6: style: Redundant initialization for 'wsr'. The initialized value is overwritten before it is read. [redundantInitialization] wsr = ssi->wsr; ^ sound/soc/sh/rcar/ssi.c:372:11: note: wsr is initialized u32 wsr = ssi->wsr; ^ sound/soc/sh/rcar/ssi.c:403:6: note: wsr is overwritten wsr = ssi->wsr; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219231635.5749-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4862811f87350c3656e86dfc3ce310d0390d48ab Author: Pierre-Louis Bossart Date: Fri Feb 19 17:16:32 2021 -0600 ASoC: sh: rcar: ctu: add missing error check cppcheck warning: sound/soc/sh/rcar/ctu.c:212:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU SV0", ^ sound/soc/sh/rcar/ctu.c:205:6: note: ret is assigned ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU Pass", ^ sound/soc/sh/rcar/ctu.c:212:6: note: ret is overwritten ret = rsnd_kctrl_new_m(mod, io, rtd, "CTU SV0", ^ All the kcontrol creations are checked for errors, except for one. Add the missing error check. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219231635.5749-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 652fc90f9de4ab0ba023cbdf5b0853f9447d7966 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:16:30 2021 -0600 ASoC: sh: rcar: simplify return cppcheck warning: sound/soc/sh/rcar/core.c:219:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/sh/rcar/core.c:210:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/sh/rcar/core.c:219:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219231635.5749-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit d29a60604fe6cb8d4dc1782dbfe893dacb7f57e2 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:16:29 2021 -0600 ASoC: sh: rcar: align function prototypes cppcheck warnings: sound/soc/sh/rcar/adg.c:208:51: style:inconclusive: Function 'rsnd_adg_set_cmd_timsel_gen2' argument 1 names different: declaration 'mod' definition 'cmd_mod'. [funcArgNamesDifferent] int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *cmd_mod, ^ sound/soc/sh/rcar/rsnd.h:608:51: note: Function 'rsnd_adg_set_cmd_timsel_gen2' argument 1 names different: declaration 'mod' definition 'cmd_mod'. int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *mod, ^ sound/soc/sh/rcar/adg.c:208:51: note: Function 'rsnd_adg_set_cmd_timsel_gen2' argument 1 names different: declaration 'mod' definition 'cmd_mod'. int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *cmd_mod, ^ sound/soc/sh/rcar/adg.c:322:44: style:inconclusive: Function 'rsnd_adg_ssi_clk_stop' argument 1 names different: declaration 'mod' definition 'ssi_mod'. [funcArgNamesDifferent] int rsnd_adg_ssi_clk_stop(struct rsnd_mod *ssi_mod) ^ sound/soc/sh/rcar/rsnd.h:600:44: note: Function 'rsnd_adg_ssi_clk_stop' argument 1 names different: declaration 'mod' definition 'ssi_mod'. int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod); ^ sound/soc/sh/rcar/adg.c:322:44: note: Function 'rsnd_adg_ssi_clk_stop' argument 1 names different: declaration 'mod' definition 'ssi_mod'. int rsnd_adg_ssi_clk_stop(struct rsnd_mod *ssi_mod) ^ sound/soc/sh/rcar/adg.c:329:49: style:inconclusive: Function 'rsnd_adg_ssi_clk_try_start' argument 1 names different: declaration 'mod' definition 'ssi_mod'. [funcArgNamesDifferent] int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *ssi_mod, unsigned int rate) ^ sound/soc/sh/rcar/rsnd.h:601:49: note: Function 'rsnd_adg_ssi_clk_try_start' argument 1 names different: declaration 'mod' definition 'ssi_mod'. int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate); ^ sound/soc/sh/rcar/adg.c:329:49: note: Function 'rsnd_adg_ssi_clk_try_start' argument 1 names different: declaration 'mod' definition 'ssi_mod'. int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *ssi_mod, unsigned int rate) ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219231635.5749-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 77150b5a5a473ec35c0bf6f1a8b966329ad9439d Author: Pierre-Louis Bossart Date: Fri Feb 19 17:16:28 2021 -0600 ASoC: sh: dma-sh7760: remove unused variable cppcheck warning: sound/soc/sh/dma-sh7760.c:180:6: style: Unused variable: ret [unusedVariable] int ret; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219231635.5749-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit bd029fc86834760276171bd2301d6c43e45a65b0 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:19:21 2021 -0600 ASoC: generic: simple-card-utils: remove useless assignment cppcheck warning: sound/soc/generic/simple-card-utils.c:258:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210218221921.88991-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 47108a61b2f7f5a9eb13f88691f03147c4f9fc40 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:19:20 2021 -0600 ASoC: soc-topology: clarify expression cppcheck warning: sound/soc/soc-topology.c:1676:52: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES ? 1 : 0; ^ sound/soc/soc-topology.c:1680:55: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS ? ^ sound/soc/soc-topology.c:1685:57: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] flags & SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS ? ^ sound/soc/soc-topology.c:1768:52: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES ? 1 : 0; ^ sound/soc/soc-topology.c:1772:55: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS ? ^ sound/soc/soc-topology.c:1777:57: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] flags & SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS ? ^ sound/soc/soc-topology.c:1782:48: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] flags & SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP ? ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210218221921.88991-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 61456212e80ee274828d2d14fcc7b9364dfc0744 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:19:19 2021 -0600 ASoC: soc-pcm: add error log cppcheck warning: sound/soc/soc-pcm.c:1907:6: style: Variable 'err' is assigned a value that is never used. [unreadVariable] err = dpcm_be_dai_hw_free(fe, stream); ^ it's not clear why dpcm_be_dai_hw_free() is sometimes called without testing the error status, and sometimes an error message is provided. When in doubt, add an error message for consistency. This may have to be revisited. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210218221921.88991-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 61b9eedd93b1f55e922dfd3ac3cb844e2b69b808 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:19:18 2021 -0600 ASoC: soc-pcm: remove shadowing variable cppcheck warning: sound/soc/soc-pcm.c:1718:7: style: Local variable 'i' shadows outer variable [shadowVariable] int i; ^ sound/soc/soc-pcm.c:1696:6: note: Shadowed declaration int i; ^ sound/soc/soc-pcm.c:1718:7: note: Shadow variable int i; ^ the second variable seems totally unnecessary. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210218221921.88991-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 9dbe774091b0e473509221f7dcef0795b5380298 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:19:17 2021 -0600 ASoC: soc-pcm: remove redundant assignment cppcheck warning: sound/soc/soc-pcm.c:2398:7: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = -EINVAL; ^ sound/soc/soc-pcm.c:2395:7: note: ret is assigned ret = -EINVAL; ^ sound/soc/soc-pcm.c:2398:7: note: ret is overwritten ret = -EINVAL; ^ This looks like a copy/paste or git merge issue. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210218221921.88991-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7ca5f04946176ae9611bb80e3ec3d3fa300b7cff Author: Pierre-Louis Bossart Date: Thu Feb 18 16:19:16 2021 -0600 ASoC: soc-ops: remove useless assignment cppcheck warning: sound/soc/soc-ops.c:410:35: style: Variable 'val2' is assigned a value that is never used. [unreadVariable] unsigned int val, val_mask, val2 = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210218221921.88991-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c856cef731ddfde68ec21a827919aef68e37fb27 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:09:16 2021 -0600 ASoC: samsung: snow: remove useless test cppcheck warning: sound/soc/samsung/snow.c:112:2: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] if (rtd->num_codecs > 1) ^ sound/soc/samsung/snow.c:114:2: note: Found duplicate branches for 'if' and 'else'. else ^ sound/soc/samsung/snow.c:112:2: note: Found duplicate branches for 'if' and 'else'. if (rtd->num_codecs > 1) ^ Signed-off-by: Pierre-Louis Bossart Fixes: 7de6b6bc1a58 ("ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer") Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210219230918.5058-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit fbb123e248c127f9bccdd6181487bcad1275c137 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:09:15 2021 -0600 ASoC: samsung: smdk_wm8994: add missing return cppcheck warning: sound/soc/samsung/smdk_wm8994.c:179:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = devm_snd_soc_register_card(&pdev->dev, card); ^ sound/soc/samsung/smdk_wm8994.c:166:8: note: ret is assigned ret = -EINVAL; ^ sound/soc/samsung/smdk_wm8994.c:179:6: note: ret is overwritten ret = devm_snd_soc_register_card(&pdev->dev, card); ^ The initial authors bothered to set ret to -EINVAL and throw a dev_err() message, so it looks like there is a missing return to avoid continuing if the property is missing. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210219230918.5058-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 0587e83c5d8bc09af005bd736234b480a8fd66f2 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:09:14 2021 -0600 ASoC: samsung: s3c24xx_simtec: add missing error check cppcheck warning: sound/soc/samsung/s3c24xx_simtec.c:191:7: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] ret = snd_soc_dai_set_clkdiv(cpu_dai, S3C24XX_DIV_PRESCALER, ^ Looking at the code, it's not clear why the return value is checked in the two other cases but not here, so mirror the behavior and add a check. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210219230918.5058-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 5a81abc2ea3d7cc094b3bef16b0fb0157b8ced0f Author: Pierre-Louis Bossart Date: Fri Feb 19 17:09:13 2021 -0600 ASoC: samsung: i2s: remove unassigned variable cppcheck warning: sound/soc/samsung/i2s.c:1159:18: style: Variable 'dai' is not assigned a value. [unassignedVariable] struct i2s_dai *dai; ^ This variable is only used for a sizeof(*dai). Signed-off-by: Pierre-Louis Bossart Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210219230918.5058-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4fe28461e289e7209dc969d5878997069f5be157 Author: Kuninori Morimoto Date: Mon Feb 22 09:47:36 2021 +0900 ASoC: soc-pcm: unpack dpcm_set_fe_runtime() dpcm_fe_dai_startup() (= A) calls dpcm_set_fe_runtime() (= B) to setup DPCM runtime. From *naming point of view*, it sounds like setup function for FE. (A) static int dpcm_fe_dai_startup(...) { ... (B) dpcm_set_fe_runtime(...); ... } But in dpcm_set_fe_runtime() (= B), It setups FE by dpcm_runtime_setup_fe() (= X), and setups BE by dpcm_runtime_merge_xxx() (= Y). (B) static void dpcm_set_fe_runtime(...) { ... (X) dpcm_runtime_setup_fe(...); ^ dpcm_runtime_setup_be_format(...); (Y) dpcm_runtime_setup_be_chan(...); v dpcm_runtime_setup_be_rate(...); } These means that the function which is called as xxx_fe_xxx() is setups both FE and BE. This is confusable and can be hot bed for bug. Now dpcm_set_fe_runtime() (= B) is simple enough and confusable naming, let's unpack it at dpcm_fe_dai_startup(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87mtvxvsgn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 1b8cb123f3dd6f205541299e2a573237452a6ffe Author: Kuninori Morimoto Date: Mon Feb 22 09:47:34 2021 +0900 ASoC: soc-pcm: add dpcm_runtime_setup() dpcm_fe_dai_startup() (= A) calls dpcm_set_fe_runtime() (= B) to setup DPCM runtime. From *naming point of view*, it sounds like setup function for FE. (A) static int dpcm_fe_dai_startup(...) { ... (B) dpcm_set_fe_runtime(...); ... } But in dpcm_set_fe_runtime() (= B), It setups FE by dpcm_runtime_setup_fe() (= X), and setups BE by dpcm_runtime_merge_xxx() (= Y). (B) static void dpcm_set_fe_runtime(...) { ... (X) dpcm_runtime_setup_fe(...); ^ dpcm_runtime_merge_format(...); (Y) dpcm_runtime_merge_chan(...); v dpcm_runtime_merge_rate(...); } These means that the function which is called as xxx_fe_xxx() is setups both FE and BE. This is confusable and can be hot bed for bug. This patch renames unclear dpcm_runtime_merge_xxx() (= Y) to more clear dpcm_runtime_setup_be_xxx(). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87o8gdvsgr.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 5f53898af1a2bf753f111ec1c7ed668fe6557b76 Author: Kuninori Morimoto Date: Mon Feb 22 09:47:26 2021 +0900 ASoC: soc-pcm: add dpcm_runtime_setup_fe() dpcm_fe_dai_startup() (= A) calls dpcm_set_fe_runtime() (= B) to setup DPCM runtime. From *naming point of view*, it sounds like setup function for FE. (A) static int dpcm_fe_dai_startup(...) { ... (B) dpcm_set_fe_runtime(...); ... } But in dpcm_set_fe_runtime() (= B), It setups FE by for_each loop (= X), and setups BE by dpcm_runtime_merge_xxx() (= Y). (B) static void dpcm_set_fe_runtime(...) { ... ^ for_each_rtd_cpu_dais(...) { | ... (X) soc_pcm_hw_update_rate(...); | soc_pcm_hw_update_chan(...); | soc_pcm_hw_update_format(...); v } ^ dpcm_runtime_merge_format(...); (Y) dpcm_runtime_merge_chan(...); v dpcm_runtime_merge_rate(...); } These means that the function which is called as xxx_fe_xxx() is setups both FE and BE. This is confusable and can be hot bed for bug. To tidyup it, as 1st step, this patch adds new dpcm_runtime_setup_fe() for (X). Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87pn0tvsgx.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 7f4a763642cc8d5f49e64a3611de8f62102c9d31 Author: Kuninori Morimoto Date: Mon Feb 22 09:47:19 2021 +0900 ASoC: soc-pcm: unpack dpcm_init_runtime_hw() dpcm_init_runtime_hw() is now just verbose function. This patch unpacks it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87r1l9vsh4.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit 6053a840f711fbb4e36fad06880be11db37d3cdc Author: Kuninori Morimoto Date: Mon Feb 22 09:46:57 2021 +0900 ASoC: soc-pcm: remove strange format storing dpcm_init_runtime_hw() (= A) is used from dpcm_set_fe_runtime() (= B) with for_each_rtd_cpu_dais() loop (= C), and it checks formats (= D). (A) static void dpcm_init_runtime_hw(...) { ... ^ if (runtime->hw.formats) | (D1) runtime->hw.formats &= stream->formats; (D) else | (D2) runtime->hw.formats = stream->formats; v } (B) static void dpcm_set_fe_runtime(...) { ... (C) for_each_rtd_cpu_dais(rtd, i, cpu_dai) { ... (A) dpcm_init_runtime_hw(...); } } If this for_each_rtd_cpu_dais() loop (= C) calls dpcm_init_runtime_hw() (= A) multiple times, this means it is Multi-CPU. If we focus to format operation at (D), using mask (= D1) is understandable because it restricts unsupported format. But, enabling format when zero format case (= D2) is very strange, because it might enables unsupported format. This runtime->hw.formats is initialized by ULLONG_MAX at soc_pcm_hw_init(), thus becoming zero format means it can't use such format. And doing this strange format operation is only here. This patch removes strange format operation (= D2), and use standard soc_pcm_hw_update_format() for it. Signed-off-by: Kuninori Morimoto Link: https://lore.kernel.org/r/87sg5pvshq.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown commit b86fe83448b45254cf39bc4f7db739b29488d72a Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:37 2021 -0600 ASoC: fsl: p1022_ds: remove useless assignment cppcheck warning: sound/soc/fsl/p1022_ds.c:344:6: style: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization] ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", &mdata->dai[0], ^ sound/soc/fsl/p1022_ds.c:203:10: note: ret is initialized int ret = -ENODEV; ^ sound/soc/fsl/p1022_ds.c:344:6: note: ret is overwritten ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", &mdata->dai[0], ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit f5036db354d9cc0d2261758e3dada3894d378dbb Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:36 2021 -0600 ASoC: fsl: mpc8610: remove useless assignment cppcheck warning: sound/soc/fsl/mpc8610_hpcd.c:333:6: style: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization] ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", ^ sound/soc/fsl/mpc8610_hpcd.c:193:10: note: ret is initialized int ret = -ENODEV; ^ sound/soc/fsl/mpc8610_hpcd.c:333:6: note: ret is overwritten ret = fsl_asoc_get_dma_channel(np, "fsl,playback-dma", ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 91ab7743112bf2414cd6264dbadb94deef51855a Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:35 2021 -0600 ASoC: fsl: mpc5200: signed parameter in snprintf format cppcheck warning: sound/soc/fsl/mpc5200_dma.c:414:2: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] snprintf(psc_dma->name, sizeof psc_dma->name, "PSC%u", psc_dma->id); ^ Also fix sizeof use, missing parentheses reported by checkpatch.pl Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 4a6202f0cef51714bcc46728cdf8153da49d2785 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:34 2021 -0600 ASoC: fsl: imx-hdmi: remove unused structure members cppcheck warning: sound/soc/fsl/imx-hdmi.c:21:16: style: struct member 'cpu_priv::sysclk_freq' is never used. [unusedStructMember] unsigned long sysclk_freq[2]; ^ Additional checks show the sysclk_dir member is also not used. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 2fb563567bc425b9a7371f1432c62e25627e1754 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:33 2021 -0600 ASoC: fsl: fsl_ssi: remove unnecessary tests cppcheck warnings: sound/soc/fsl/fsl_ssi.c:767:34: style: Condition 'div2' is always false [knownConditionTrueFalse] stccr = SSI_SxCCR_PM(pm + 1) | (div2 ? SSI_SxCCR_DIV2 : 0) | ^ sound/soc/fsl/fsl_ssi.c:722:9: note: Assignment 'div2=0', assigned value is 0 div2 = 0; ^ sound/soc/fsl/fsl_ssi.c:767:34: note: Condition 'div2' is always false stccr = SSI_SxCCR_PM(pm + 1) | (div2 ? SSI_SxCCR_DIV2 : 0) | ^ sound/soc/fsl/fsl_ssi.c:768:4: style: Condition 'psr' is always false [knownConditionTrueFalse] (psr ? SSI_SxCCR_PSR : 0); ^ sound/soc/fsl/fsl_ssi.c:721:8: note: Assignment 'psr=0', assigned value is 0 psr = 0; ^ sound/soc/fsl/fsl_ssi.c:768:4: note: Condition 'psr' is always false (psr ? SSI_SxCCR_PSR : 0); ^ Upon further analysis, the variables 'div2' and 'psr' are set to zero and never modified. All the tests can be removed. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8f6fef01a5ba48b416d1dc7e910268e03d270a10 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:32 2021 -0600 ASoC: fsl: fsl_esai: clarify expression cppcheck warning: sound/soc/fsl/fsl_esai.c:307:16: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] clk_id % 2 ? "extal" : "fsys"); ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 062b85216886bbb5e318705c479838563bfdd9d2 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:31 2021 -0600 ASoC: fsl: fsl_easrc: remove useless assignments cppcheck warnings: sound/soc/fsl/fsl_easrc.c:751:53: style: Variable 'st2_mem_alloc' is assigned a value that is never used. [unreadVariable] int st1_chanxexp, st1_mem_alloc = 0, st2_mem_alloc = 0; ^ sound/soc/fsl/fsl_easrc.c:1331:11: style: Variable 'size' is assigned a value that is never used. [unreadVariable] int size = 0; ^ Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b035a9efda2889c4d6064b67100bba6eff17af32 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:30 2021 -0600 ASoC: fsl: fsl_dma: remove unused variable cppcheck warning: sound/soc/fsl/fsl_dma.c:411:10: style: Variable 'channel' is assigned a value that is never used. [unreadVariable] channel = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? 0 : 1; ^ Removing this line shows the variable isn't needed any longer so remove declaration as well. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit b296743576220b745938fde62e4f8ad25a195985 Author: Pierre-Louis Bossart Date: Fri Feb 19 17:29:29 2021 -0600 ASoC: fsl: fsl_asrc: remove useless assignment cppcheck warning: sound/soc/fsl/fsl_asrc.c:613:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, j = 0; ^ The same issue occurs for the 'j' variable. Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210219232937.6440-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit c4fd082e466277b82fe2c0480b19f9398652302b Author: Rikard Falkeborn Date: Wed Feb 24 22:19:18 2021 +0100 ASoc: rt5631: Constify static struct coeff_clk_div coeff_div is only read from, so make it const to show the intent. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210224211918.39109-5-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 3084e5f7f75339451d8bb39dede700c37e588b8c Author: Rikard Falkeborn Date: Wed Feb 24 22:19:17 2021 +0100 ASoC: rt*: Constify static struct acpi_device_id These are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210224211918.39109-4-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit f9e56a34cda2189a1d1611bdff1f6d1d0fb460e5 Author: Rikard Falkeborn Date: Wed Feb 24 22:19:16 2021 +0100 ASoC: rt*: Constify static struct snd_soc_dai_ops The only usage of them is to assign their address to the ops field in the snd_soc_dai_driver struct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210224211918.39109-3-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 628fc9d9a0e6e52fd3116b5591cb4e90473db9ad Author: Rikard Falkeborn Date: Wed Feb 24 22:19:15 2021 +0100 ASoC: rt*: Constify static struct sdw_slave_ops The only usage of these is to assign their address to the ops field in the sdw_driver struct, which is a pointer to const. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210224211918.39109-2-rikard.falkeborn@gmail.com Signed-off-by: Mark Brown commit 4b4f2119f98518c86c5651771ad9db9070c76de4 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:16 2021 -0600 ASoC: lpass-wsa-macro: add missing test cppcheck warning: sound/soc/codecs/lpass-wsa-macro.c:958:6: style: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment] ret = wsa_macro_set_prim_interpolator_rate(dai, (u8) rate_val, sample_rate); ^ sound/soc/codecs/lpass-wsa-macro.c:946:6: note: ret is assigned ret = wsa_macro_set_mix_interpolator_rate(dai, (u8) rate_val, sample_rate); ^ sound/soc/codecs/lpass-wsa-macro.c:958:6: note: ret is overwritten ret = wsa_macro_set_prim_interpolator_rate(dai, (u8) rate_val, sample_rate); ^ set_mix_interpolator_rate can return -EINVAL, add a test and bail on error. Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 7faaea14feeeb88177ecf8a640a203c319960d43 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:15 2021 -0600 ASoC: wcd934x: remove useless return cppcheck warning: sound/soc/codecs/wcd934x.c:1571:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/wcd934x.c:1568:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/wcd934x.c:1571:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8d2f2d7ff3c69e1b7a2d1424e4d2dc8a6fe77849 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:14 2021 -0600 ASoC: wcd9335: clarify return value cppcheck warning: sound/soc/codecs/wcd9335.c:5216:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/codecs/wcd9335.c:5211:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/codecs/wcd9335.c:5216:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 77af06de30139fbddae67dd9db70d7ccc53b1955 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:13 2021 -0600 ASoC: wcd-clsh-v2: align function prototypes cppcheck warnings: sound/soc/codecs/wcd-clsh-v2.c:523:28: style:inconclusive: Function 'wcd_clsh_ctrl_set_state' argument 2 names different: declaration 'event' definition 'clsh_event'. [funcArgNamesDifferent] enum wcd_clsh_event clsh_event, ^ sound/soc/codecs/wcd-clsh-v2.h:45:28: note: Function 'wcd_clsh_ctrl_set_state' argument 2 names different: declaration 'event' definition 'clsh_event'. enum wcd_clsh_event event, ^ sound/soc/codecs/wcd-clsh-v2.c:523:28: note: Function 'wcd_clsh_ctrl_set_state' argument 2 names different: declaration 'event' definition 'clsh_event'. enum wcd_clsh_event clsh_event, ^ sound/soc/codecs/wcd-clsh-v2.c:524:12: style:inconclusive: Function 'wcd_clsh_ctrl_set_state' argument 3 names different: declaration 'state' definition 'nstate'. [funcArgNamesDifferent] int nstate, ^ sound/soc/codecs/wcd-clsh-v2.h:46:12: note: Function 'wcd_clsh_ctrl_set_state' argument 3 names different: declaration 'state' definition 'nstate'. int state, ^ sound/soc/codecs/wcd-clsh-v2.c:524:12: note: Function 'wcd_clsh_ctrl_set_state' argument 3 names different: declaration 'state' definition 'nstate'. int nstate, ^ sound/soc/codecs/wcd-clsh-v2.c:557:69: style:inconclusive: Function 'wcd_clsh_ctrl_alloc' argument 1 names different: declaration 'component' definition 'comp'. [funcArgNamesDifferent] struct wcd_clsh_ctrl *wcd_clsh_ctrl_alloc(struct snd_soc_component *comp, ^ sound/soc/codecs/wcd-clsh-v2.h:40:31: note: Function 'wcd_clsh_ctrl_alloc' argument 1 names different: declaration 'component' definition 'comp'. struct snd_soc_component *component, ^ sound/soc/codecs/wcd-clsh-v2.c:557:69: note: Function 'wcd_clsh_ctrl_alloc' argument 1 names different: declaration 'component' definition 'comp'. struct wcd_clsh_ctrl *wcd_clsh_ctrl_alloc(struct snd_soc_component *comp, ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit be79e73e3adbcb8912b005c6485ed0e1590480e4 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:12 2021 -0600 ASoC: qcom: q6asm: align function prototypes cppcheck warnings: sound/soc/qcom/qdsp6/q6asm.c:502:16: style:inconclusive: Function 'q6asm_map_memory_regions' argument 4 names different: declaration 'bufsz' definition 'period_sz'. [funcArgNamesDifferent] size_t period_sz, unsigned int periods) ^ sound/soc/qcom/qdsp6/q6asm.h:150:16: note: Function 'q6asm_map_memory_regions' argument 4 names different: declaration 'bufsz' definition 'period_sz'. size_t bufsz, unsigned int bufcnt); ^ sound/soc/qcom/qdsp6/q6asm.c:502:16: note: Function 'q6asm_map_memory_regions' argument 4 names different: declaration 'bufsz' definition 'period_sz'. size_t period_sz, unsigned int periods) ^ sound/soc/qcom/qdsp6/q6asm.c:502:40: style:inconclusive: Function 'q6asm_map_memory_regions' argument 5 names different: declaration 'bufcnt' definition 'periods'. [funcArgNamesDifferent] size_t period_sz, unsigned int periods) ^ sound/soc/qcom/qdsp6/q6asm.h:150:36: note: Function 'q6asm_map_memory_regions' argument 5 names different: declaration 'bufcnt' definition 'periods'. size_t bufsz, unsigned int bufcnt); ^ sound/soc/qcom/qdsp6/q6asm.c:502:40: note: Function 'q6asm_map_memory_regions' argument 5 names different: declaration 'bufcnt' definition 'periods'. size_t period_sz, unsigned int periods) ^ sound/soc/qcom/qdsp6/q6asm.c:823:47: style:inconclusive: Function 'q6asm_get_session_id' argument 1 names different: declaration 'ac' definition 'c'. [funcArgNamesDifferent] int q6asm_get_session_id(struct audio_client *c) ^ sound/soc/qcom/qdsp6/q6asm.h:146:47: note: Function 'q6asm_get_session_id' argument 1 names different: declaration 'ac' definition 'c'. int q6asm_get_session_id(struct audio_client *ac); ^ sound/soc/qcom/qdsp6/q6asm.c:823:47: note: Function 'q6asm_get_session_id' argument 1 names different: declaration 'ac' definition 'c'. int q6asm_get_session_id(struct audio_client *c) ^ sound/soc/qcom/qdsp6/q6asm.c:1573:52: style:inconclusive: Function 'q6asm_write_async' argument 6 names different: declaration 'flags' definition 'wflags'. [funcArgNamesDifferent] uint32_t msw_ts, uint32_t lsw_ts, uint32_t wflags) ^ sound/soc/qcom/qdsp6/q6asm.h:100:52: note: Function 'q6asm_write_async' argument 6 names different: declaration 'flags' definition 'wflags'. uint32_t msw_ts, uint32_t lsw_ts, uint32_t flags); ^ sound/soc/qcom/qdsp6/q6asm.c:1573:52: note: Function 'q6asm_write_async' argument 6 names different: declaration 'flags' definition 'wflags'. uint32_t msw_ts, uint32_t lsw_ts, uint32_t wflags) ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 32d4e59cb39de508698ae4db5707af23c3835e4c Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:11 2021 -0600 ASoC: qcom: q6afe: align function prototype cppcheck warning: sound/soc/qcom/qdsp6/q6afe.c:1101:63: style:inconclusive: Function 'q6afe_set_lpass_clock' argument 3 names different: declaration 'clk_src' definition 'attri'. [funcArgNamesDifferent] int q6afe_set_lpass_clock(struct device *dev, int clk_id, int attri, ^ sound/soc/qcom/qdsp6/q6afe.h:236:63: note: Function 'q6afe_set_lpass_clock' argument 3 names different: declaration 'clk_src' definition 'attri'. int q6afe_set_lpass_clock(struct device *dev, int clk_id, int clk_src, ^ sound/soc/qcom/qdsp6/q6afe.c:1101:63: note: Function 'q6afe_set_lpass_clock' argument 3 names different: declaration 'clk_src' definition 'attri'. int q6afe_set_lpass_clock(struct device *dev, int clk_id, int attri, ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 12900bacb4f358f8921e4dcf7e3f28aac3a37d8b Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:10 2021 -0600 ASoC: qcom: q6afe: remove useless assignments cppcheck warnings: sound/soc/qcom/qdsp6/q6afe.c:848:25: note: Assignment 'p=NULL', assigned value is 0 struct q6afe_port *p = NULL; ^ sound/soc/qcom/qdsp6/q6afe.c:854:7: note: Null pointer dereference if (p->token == token) { ^ sound/soc/qcom/qdsp6/q6afe.c:939:8: style: Redundant initialization for 'wait'. The initialized value is overwritten before it is read. [redundantInitialization] wait = &port->wait; ^ sound/soc/qcom/qdsp6/q6afe.c:933:26: note: wait is initialized wait_queue_head_t *wait = &port->wait; ^ sound/soc/qcom/qdsp6/q6afe.c:939:8: note: wait is overwritten wait = &port->wait; ^ sound/soc/qcom/qdsp6/q6afe.c:1191:10: style: Redundant initialization for 'port_id'. The initialized value is overwritten before it is read. [redundantInitialization] port_id = port->id; ^ sound/soc/qcom/qdsp6/q6afe.c:1186:14: note: port_id is initialized int port_id = port->id; ^ sound/soc/qcom/qdsp6/q6afe.c:1191:10: note: port_id is overwritten port_id = port->id; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 18bcac6ed7464844bc18eaa362b0920f6d48bef6 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:09 2021 -0600 ASoC: qcom: q6dsp-dai: clarify expression cppcheck warning: sound/soc/qcom/qdsp6/q6afe-dai.c:264:35: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] tdm->slot_mask = (dai->id & 0x1 ? tx_mask : rx_mask) & cap_mask; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 64298706dcc99d1d1fe0882f1ddeb9a3ab5526da Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:08 2021 -0600 ASoC: qcom: lpass-platform: remove useless assignment cppcheck warning: sound/soc/qcom/lpass-platform.c:791:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = -EINVAL; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 8106efdce03673d5ba963ced2db47d669d2dec82 Author: Pierre-Louis Bossart Date: Thu Feb 18 16:29:07 2021 -0600 ASoC: qcom: lpass-hdmi: remove useless return cppcheck warning: sound/soc/qcom/lpass-hdmi.c:189:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/qcom/lpass-hdmi.c:186:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/qcom/lpass-hdmi.c:189:9: note: Returning identical expression 'ret' return ret; ^ sound/soc/qcom/lpass-hdmi.c:206:9: warning: Identical condition and return expression 'ret', return value is always 0 [identicalConditionAfterEarlyExit] return ret; ^ sound/soc/qcom/lpass-hdmi.c:203:6: note: If condition 'ret' is true, the function will return/exit if (ret) ^ sound/soc/qcom/lpass-hdmi.c:206:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210218222916.89809-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 45ee8b79d67905ac57408b30314757981531def9 Author: Yang Li Date: Fri Feb 26 09:39:35 2021 +0800 regulator: add missing call to of_node_put() In one of the error paths of the for_each_child_of_node() loop, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/regulator/scmi-regulator.c:343:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 347. Reported-by: Abaci Robot Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1614303575-27436-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Mark Brown commit 1e50433c5705c7e5d6733458e387866289f9b544 Author: Axel Lin Date: Tue Feb 16 14:01:28 2021 +0800 regulator: pf8x00: Use regulator_map_voltage_ascend for pf8x00_buck7_ops The voltages in pf8x00_sw7_voltages are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin Reviewed-by: Jagan Teki Reviewed-by: Adrien Grassein Link: https://lore.kernel.org/r/20210216060128.126938-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 438421b07bf84988a819a635cd8bdf6a4d7f72f2 Author: AngeloGioacchino Del Regno Date: Thu Feb 25 22:35:13 2021 +0100 regulator: spmi: Add support for ULT LV_P50 and ULT P300 The ULT LV_P50 shares the same configuration as the other ULT LV_Pxxx and the ULT P300 shares the same as the other ULT Pxxx. These two regulator types are found on PM8950 and its variants. Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20210225213514.117031-1-konrad.dybcio@somainline.org Signed-off-by: Mark Brown commit eca1851aa3e110d742ad966ef3e787ad979131cb Merge: e9e7fce0384b4 8fb4acb880e94 Author: Mark Brown Date: Mon Mar 1 14:12:01 2021 +0000 Merge existing fixes from regulator/for-5.12 commit 31890269c0a031e704f995bbd39e1fd77a381207 Author: Jay Fang Date: Thu Mar 4 18:47:52 2021 +0800 spi: cadence-quadspi: Silence shiftTooManyBitsSigned warning drivers/spi/spi-cadence-quadspi.c:267:18: warning: Shifting signed 32-bit value by 31 bits is undefined behaviour [shiftTooManyBitsSigned] return reg & (1 << CQSPI_REG_CONFIG_IDLE_LSB); ^ Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1614854872-8694-1-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown commit 2c94b1b7dda187f654f925f32985d9121431730e Merge: 260864f797f25 529bee9ed1b50 Author: Mark Brown Date: Thu Mar 4 15:02:40 2021 +0000 Merge series "parport: Introduce module_parport_driver() and use it" from Andy Shevchenko : Introduce module_parport_driver() and use it. Greg or Mark, since we have this series tagged, can somebody of you pick it up? Changelog v3: - added tag on patch 1 (Sudip) - Cc'ed to Greg Andy Shevchenko (3): parport: Introduce module_parport_driver() helper macro spi: butterfly: Switch to use module_parport_driver() spi: lm70llp: Switch to use module_parport_driver() drivers/spi/spi-butterfly.c | 13 +------------ drivers/spi/spi-lm70llp.c | 13 +------------ include/linux/parport.h | 12 +++++++++++- 3 files changed, 13 insertions(+), 25 deletions(-) base-commit: fe07bfda2fb9cdef8a4d4008a409bb02f35f1bd8 -- 2.30.1 commit 260864f797f259143c52cd8b031a5727a3bedc5c Author: Mason Zhang Date: Fri Feb 26 19:01:10 2021 +0800 spi: mt6779: update spi document this patch update spi document for MT6779 SOC. Signed-off-by: Mason Zhang Link: https://lore.kernel.org/r/20210226110109.30500-1-Mason.Zhang@mediatek.com Signed-off-by: Mark Brown commit 32f298481add01d8c39e11a414bdc4d5037541ed Author: Kuldeep Singh Date: Tue Mar 2 18:19:34 2021 +0530 spi: spi-nxp-fspi: Add imx8dxl support Add support for nxp,imx8dxl-fspi, do the bindings document. Signed-off-by: Kuldeep Singh Link: https://lore.kernel.org/r/20210302124936.1972546-3-kuldeep.singh@nxp.com Signed-off-by: Mark Brown commit 82ce7d0e74b6f6d1fcddfc674e3f4d3d65965511 Author: Kuldeep Singh Date: Tue Mar 2 18:19:36 2021 +0530 spi: spi-nxp-fspi: Implement errata workaround for LS1028A Errata ERR050568 description says that "Flash access by FlexSPI AHB command may not work with platform frequency equal to 300 MHz" on LS1028A. By default, smaller length reads(equal to RX FIFO size) are done by IP bus and larger length reads using AHB bus. For adding errata workaround, use IP bus to read entire flash contents and disable AHB path when platform frequency is 300Mhz. Signed-off-by: Kuldeep Singh Link: https://lore.kernel.org/r/20210302124936.1972546-5-kuldeep.singh@nxp.com Signed-off-by: Mark Brown commit c791e3c31cb209e6f25a5f3767707d16c1a6069a Author: Han Xu Date: Tue Mar 2 18:19:35 2021 +0530 spi: spi-nxp-fspi: Add imx8dxl driver support Add driver support for imx8dxl which support read through IP bus only and disable AHB bus due to an IC errata. Use the pre-defined quirk FSPI_QUIRK_USE_IP_ONLY directly in device-type data to disable AHB read. Signed-off-by: Han Xu Signed-off-by: Kuldeep Singh Link: https://lore.kernel.org/r/20210302124936.1972546-4-kuldeep.singh@nxp.com Signed-off-by: Mark Brown commit 31e92cbfb9cd9f7dcb2c04858f6cdcb3cbca914f Author: Kuldeep Singh Date: Tue Mar 2 18:19:33 2021 +0530 spi: spi-nxp-fspi: Add support for IP read only Add support for disabling AHB bus and read entire flash contents via IP bus only. Please note, this enables IP bus read using a quirk which can be enabled directly in device-type data or in existence of an errata where AHB bus may need to be disabled. Signed-off-by: Kuldeep Singh Link: https://lore.kernel.org/r/20210302124936.1972546-2-kuldeep.singh@nxp.com Signed-off-by: Mark Brown commit 87d62d8fa66622d75a76836ecc0fd2edbbcb38d3 Author: Junlin Yang Date: Mon Feb 15 19:04:25 2021 +0800 spi: cadence-quadspi: add missing of_node_put Fix OF node leaks by calling of_node_put in for_each_available_child_of_node when the cycle returns. Generated by: scripts/coccinelle/iterators/for_each_child.cocci Signed-off-by: Junlin Yang Link: https://lore.kernel.org/r/20210215110425.1012-1-angkery@163.com Signed-off-by: Mark Brown commit 120a9e8155cbc0f50315f79a18cb03a1ee6f3211 Author: Tudor Ambarus Date: Thu Feb 18 15:28:40 2021 +0200 spi: atmel: Drop unused variable The DMA cap mask is no longer used since: commit 7758e390699f ("spi: atmel: remove compat for non DT board when requesting dma chan") Drop it now. Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210218132840.131898-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit e50989527faeafb79f45a0f7529ba8e01dff1fff Author: Arnd Bergmann Date: Fri Feb 26 15:00:48 2021 +0100 spi: rockchip: avoid objtool warning Building this file with clang leads to a an unreachable code path causing a warning from objtool: drivers/spi/spi-rockchip.o: warning: objtool: rockchip_spi_transfer_one()+0x2e0: sibling call from callable instruction with modified stack frame Change the unreachable() into an error return that can be handled if it ever happens, rather than silently crashing the kernel. Fixes: 65498c6ae241 ("spi: rockchip: support 4bit words") Signed-off-by: Arnd Bergmann Acked-by: Pratyush Yadav Link: https://lore.kernel.org/r/20210226140109.3477093-1-arnd@kernel.org Signed-off-by: Mark Brown commit abdc5db39d7202a4038bf9041ee8b3e1ea03bc0d Author: Alexander Sverdlin Date: Mon Feb 22 03:32:43 2021 +0100 spi: omap2-mcspi: Activate pinctrl idle state during runtime suspend Set the (optional) idle pinctrl state during runtime suspend. This is the same schema used in PL022 driver and can help with HW designs sharing the SPI lines for different purposes. Signed-off-by: Alexander Sverdlin Link: https://lore.kernel.org/r/20210222023243.491432-1-alexander.sverdlin@gmail.com Signed-off-by: Mark Brown commit d098738eb3a14d8a08c6866dd63b5134bcb11782 Merge: ffb597b2bd3cd 216e8e80057a9 Author: Mark Brown Date: Mon Mar 1 14:12:10 2021 +0000 Merge existing fixes from spi/for-5.12 commit 529bee9ed1b507d668dec8529f7a436e7bfd559e Author: Andy Shevchenko Date: Wed Mar 3 11:16:42 2021 +0200 spi: lm70llp: Switch to use module_parport_driver() Switch to use module_parport_driver() to reduce boilerplate code. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210303091642.23929-4-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 8c7e98f74cebf22f693494c0a7fe9afe77bd6576 Author: Andy Shevchenko Date: Wed Mar 3 11:16:41 2021 +0200 spi: butterfly: Switch to use module_parport_driver() Switch to use module_parport_driver() to reduce boilerplate code. Note, device_initcall() is a default for module_init(). Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210303091642.23929-3-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit a0521f70aee008f8b574f13ebdf0010f2f90db62 Author: Andy Shevchenko Date: Wed Mar 3 11:16:40 2021 +0200 parport: Introduce module_parport_driver() helper macro Introduce module_parport_driver() helper macro to reduce boilerplate in the existing and new code. Signed-off-by: Andy Shevchenko Acked-by: Sudip Mukherjee Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210303091642.23929-2-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown commit 45c7eaeb29d67224db4ba935deb575586a1fda09 Author: Jia-Ju Bai Date: Wed Mar 10 04:24:23 2021 -0800 thermal: thermal_of: Fix error return code of thermal_of_populate_bind_params() When kcalloc() returns NULL to __tcbp or of_count_phandle_with_args() returns zero or -ENOENT to count, no error return code of thermal_of_populate_bind_params() is assigned. To fix these bugs, ret is assigned with -ENOMEM and -ENOENT in these cases, respectively. Fixes: a92bab8919e3 ("of: thermal: Allow multiple devices to share cooling map") Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210310122423.3266-1-baijiaju1990@gmail.com commit 2d7ee6989a3ba60607cf1708192d40618965f432 Author: Hsin-Yi Wang Date: Mon Feb 1 17:30:49 2021 +0800 arm64: dts: mediatek: mt8183: evb: Add domain supply for mfg Add domain supply node for mt8183-evb Signed-off-by: Hsin-Yi Wang Link: https://lore.kernel.org/r/20210201093049.87285-1-hsinyi@chromium.org Signed-off-by: Matthias Brugger commit ffb597b2bd3cd78b9bfb68f536743cd46dbb2cc4 Author: David Bauer Date: Wed Mar 3 17:08:37 2021 +0100 spi: ath79: remove spi-master setup and cleanup assignment This removes the assignment of setup and cleanup functions for the ath79 target. Assigning the setup-method will lead to 'setup_transfer' not being assigned in spi_bitbang_init. Because of this, performing any TX/RX operation will lead to a kernel oops. Also drop the redundant cleanup assignment, as it's also assigned in spi_bitbang_init. Signed-off-by: David Bauer Link: https://lore.kernel.org/r/20210303160837.165771-2-mail@david-bauer.net Signed-off-by: Mark Brown commit 19e2132174583beb90c1bd3e9c842bc6d5c944d1 Author: David Bauer Date: Wed Mar 3 17:08:36 2021 +0100 spi: ath79: always call chipselect function spi-bitbang has to call the chipselect function on the ath79 SPI driver in order to communicate with the SPI slave device, as the ath79 SPI driver has three dedicated chipselect lines but can also be used with GPIOs for the CS lines. Fixes commit 4a07b8bcd503 ("spi: bitbang: Make chipselect callback optional") Signed-off-by: David Bauer Link: https://lore.kernel.org/r/20210303160837.165771-1-mail@david-bauer.net Signed-off-by: Mark Brown commit fb8695e3749ee6f19e0b524ec6dd78b1f8a82586 Author: Álvaro Fernández Rojas Date: Tue Feb 23 16:18:51 2021 +0100 spi: bcm63xx-hsspi: fix pm_runtime The driver sets auto_runtime_pm to true, but it doesn't call pm_runtime_enable(), which results in "Failed to power device" when PM support is enabled. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210223151851.4110-3-noltari@gmail.com Signed-off-by: Mark Brown commit 2d13f2ff60732a7f7accc250da8856650beb0d6f Author: Álvaro Fernández Rojas Date: Tue Feb 23 16:18:50 2021 +0100 spi: bcm63xx-spi: fix pm_runtime The driver sets auto_runtime_pm to true, but it doesn't call pm_runtime_enable(), which results in "Failed to power device" when PM support is enabled. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210223151851.4110-2-noltari@gmail.com Signed-off-by: Mark Brown commit 1d309cd688a76fb733f0089d36dc630327b32d59 Author: Tudor Ambarus Date: Thu Feb 18 15:09:50 2021 +0200 spi: spi-ti-qspi: Free DMA resources Release the RX channel and free the dma coherent memory when devm_spi_register_master() fails. Fixes: 5720ec0a6d26 ("spi: spi-ti-qspi: Add DMA support for QSPI mmap read") Cc: stable@vger.kernel.org Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210218130950.90155-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit e41a962f82e7afb5b1ee644f48ad0b3aee656268 Author: Meng Li Date: Fri Feb 26 10:17:37 2021 +0800 regmap: set debugfs_name to NULL after it is freed There is a upstream commit cffa4b2122f5("regmap:debugfs: Fix a memory leak when calling regmap_attach_dev") that adds a if condition when create name for debugfs_name. With below function invoking logical, debugfs_name is freed in regmap_debugfs_exit(), but it is not created again because of the if condition introduced by above commit. regmap_reinit_cache() regmap_debugfs_exit() ... regmap_debugfs_init() So, set debugfs_name to NULL after it is freed. Fixes: cffa4b2122f5 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev") Signed-off-by: Meng Li Link: https://lore.kernel.org/r/20210226021737.7690-1-Meng.Li@windriver.com Signed-off-by: Mark Brown commit 569519de002fafde35f889a8ea0348eae6ccc20f Merge: 083516ad540a1 54bc4edb3e52c 2584d7e7f87ad 229e1e1146e4f Author: Tony Lindgren Date: Wed Mar 10 14:19:20 2021 +0200 Merge branches 'omap-for-v5.13/genpd-dra7', 'omap-for-v5.13/genpd-omap4' and 'omap-for-v5.13/genpd-omap5' into omap-for-v5.13/genpd-drop-legacy Merge together branches dropping legacy data to avoid a minor merge conflict. commit 083516ad540a1104a0ae5ae7e83f2a2d8e39d2bc Merge: ecb4c5c0961bc e1d4a11d68b69 e180887946137 Author: Tony Lindgren Date: Wed Mar 10 14:16:34 2021 +0200 Merge tags 'genpd-dts-dra7', 'genpd-dts-omap4' and 'genpd-dts-omap5' into omap-for-v5.13/dts-genpd Merge together genpd related dts changes to provide base for dropping the legacy data to prevent merge conflicts and to send dts changes separately. commit 229e1e1146e4f525725253fd7eeeabb07131ec8f Author: Tony Lindgren Date: Wed Mar 10 14:05:02 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 hwmod We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit e98cf7e694863a9208709f39213f9060ffea026f Author: Tony Lindgren Date: Wed Mar 10 14:05:02 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 l3 We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 5b9a7b0d2f2a6632b8cc857162eecc337a581f0e Author: Tony Lindgren Date: Wed Mar 10 14:05:01 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 l4_cfg We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 8a325319464125b04fc4d4d264a7267faa4319e0 Author: Tony Lindgren Date: Wed Mar 10 14:05:01 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 l4_per We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit a91560500c2a732b78605a786a1a1316b3029a87 Author: Tony Lindgren Date: Wed Mar 10 14:05:00 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 l4_wkup We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 21206c8f2cb5c4bb6b4a306ce129eadf842e0600 Author: Tony Lindgren Date: Wed Mar 10 14:05:00 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 sata 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 3c648501f8fb0bb1a65be736b272fd02cd0b7392 Author: Tony Lindgren Date: Wed Mar 10 14:05:00 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 mpu 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 aa820b664f88281955f4ed0c9312829e1d572afa Author: Tony Lindgren Date: Wed Mar 10 14:04:59 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 emif 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 1006777ef4a12a556f04e692f3ab8c5823482218 Author: Tony Lindgren Date: Wed Mar 10 14:04:59 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap5 dmm 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 e180887946137ccb4b6aeb172872cb1368cfe219 Author: Tony Lindgren Date: Wed Mar 10 14:04:58 2021 +0200 ARM: dts: Configure simple-pm-bus for omap5 l3 We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit abd1d31d82920726c3cdd46fb016d93ada919639 Author: Tony Lindgren Date: Wed Mar 10 14:04:58 2021 +0200 ARM: dts: Configure simple-pm-bus for omap5 l4_cfg We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 6fe4ff901607fbab2b93b7e8f9404bfcb93f685e Author: Tony Lindgren Date: Wed Mar 10 14:04:58 2021 +0200 ARM: dts: Configure simple-pm-bus for omap5 l4_per We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 689919e6e2b9d27027625b352351f4597e3c25dc Author: Tony Lindgren Date: Wed Mar 10 14:04:57 2021 +0200 ARM: dts: Configure simple-pm-bus for omap5 l4_wkup We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit d1d16959fea79c0dc6290cef732d5d0a821e14df Author: Tony Lindgren Date: Wed Mar 10 14:04:57 2021 +0200 ARM: dts: Move omap5 l3-noc to a separate node In preparation for probing l3 with simple-pm-bus and genpd, we must move l3 noc to a separate node. This is to prevent omap_l3_noc.c driver from claiming the whole l3 instance before simple-pm-bus has a chance to probe. Signed-off-by: Tony Lindgren commit a571cc394194543cc039ad92545e059a840a8e12 Author: Tony Lindgren Date: Wed Mar 10 14:04:57 2021 +0200 ARM: dts: Move omap5 mmio-sram out of l3 interconnect We need mmio-sram early for omap4_sram_init() for IO barrier init, and will be moving l3 interconnect to probe with simple-pm-bus that probes at module_init() time. So let's move mmio-sram out of l3 to prepare for that. Otherwise we will get the following after probing the interconnects with simple-pm-bus: omap4_sram_init:Unable to get sram pool needed to handle errata I688 Signed-off-by: Tony Lindgren commit 41ccb6623711da26c5e6b34f3e05e271857bebb4 Author: Tony Lindgren Date: Wed Mar 10 14:04:56 2021 +0200 ARM: dts: Configure interconnect target module for omap5 sata We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" peroperty to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Note that the old sysc register offset is wrong, the real offset is at 0x1100 as listed in TRM for SATA_SYSCONFIG register. Looks like we've been happily using sata on the bootloader configured sysconfig register and nobody noticed. Also the old register range for SATAMAC_wrapper registers is wrong at 7 while it should be 8. But that too seems harmless. There is also an L3 parent interconnect range that we don't seem to be using. That can be added as needed later on. Signed-off-by: Tony Lindgren commit 5f89cdc1034c16a1d130d6c9e1a43a55e2c42f03 Author: Tony Lindgren Date: Wed Mar 10 14:04:56 2021 +0200 ARM: dts: Configure interconnect target module for omap5 gpmc We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" property to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Signed-off-by: Tony Lindgren commit 0e666eb531ea74892cd3314806cbf721ba0ec04f Author: Tony Lindgren Date: Wed Mar 10 14:04:55 2021 +0200 ARM: dts: Configure interconnect target module for omap5 mpu We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Signed-off-by: Tony Lindgren commit 9921f0b9d07a70079d2eabf4a4f61ac815b21bbb Author: Tony Lindgren Date: Wed Mar 10 14:04:55 2021 +0200 ARM: dts: Configure interconnect target module for omap5 emif We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" property to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Signed-off-by: Tony Lindgren commit 84864f8d2c4e413ab88ec98e538517fff2fbd9a8 Author: Tony Lindgren Date: Wed Mar 10 14:04:54 2021 +0200 ARM: dts: Configure interconnect target module for omap5 dmm We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" property to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Signed-off-by: Tony Lindgren commit 2584d7e7f87ad0a57683dda8e7f17d8630c2eefc Author: Tony Lindgren Date: Wed Mar 10 14:04:37 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 hwmod We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 3e1ea524d6db00b432eb93897f9de7091af9e549 Author: Tony Lindgren Date: Wed Mar 10 14:04:37 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 l3 We can now probe interconnects with simple-pm-bus and genpd. Let's drop the legacy data along with the ti,hwmods property and flip over to using simple-pm-bus instead of simple-bus. Signed-off-by: Tony Lindgren commit 058b4880a840ba680f1c4c8b0f65fcc3f0663066 Author: Tony Lindgren Date: Wed Mar 10 14:04:36 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 l4_cfg We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 6dd3c9259767ed69bb2cb713fa22dcb67e57ca3f Author: Tony Lindgren Date: Wed Mar 10 14:04:36 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 l4_per We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit e9c5aafaab598ff51b89d18b15f0241fe8b78fba Author: Tony Lindgren Date: Wed Mar 10 14:04:35 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 l4_wkup We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 229f3477d64c28882cad34f8d9d4ad582b13af23 Author: Tony Lindgren Date: Wed Mar 10 14:04:35 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 mpu 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 88b187916898dda8ca340649085836dabbff655e Author: Tony Lindgren Date: Wed Mar 10 14:04:35 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 debugss 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 a8876b4a3d68a10a91771d295a5e65ce2c802c0d Author: Tony Lindgren Date: Wed Mar 10 14:04:34 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 emif 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 35c34fbcbfd00fcd23c70d4ec54fdb53318f4d5c Author: Tony Lindgren Date: Wed Mar 10 14:04:34 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 dmm 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 e1d4a11d68b695cdf82d8da5f0c0d237652fb376 Author: Tony Lindgren Date: Wed Mar 10 14:04:33 2021 +0200 ARM: dts: Prepare for simple-pm-bus for omap4 l3 Let's configure omap4 l3 for power-domain and clocks in preparation for starting to use simple-pm-bus. We will flip over to using simple-pm-bus later on after dropping the legacy data for all the devices on l3 interconnect. Signed-off-by: Tony Lindgren commit 40dbf5b13f23137fc02b17a0fb1df7c0567eb91d Author: Tony Lindgren Date: Wed Mar 10 14:04:33 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 control modules 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. Signed-off-by: Tony Lindgren commit eb586ea39f266d168063678b5fbddf10ba3eb8c2 Author: Tony Lindgren Date: Wed Mar 10 14:04:33 2021 +0200 ARM: OMAP2+: Drop legacy platform data for omap4 iss 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. Signed-off-by: Tony Lindgren commit 9a1d0c2837c93e6a7e31e2865ff730dcf8f26d56 Author: Tony Lindgren Date: Wed Mar 10 14:04:32 2021 +0200 ARM: dts: Configure simple-pm-bus for omap4 l4_cfg We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 67dcfdc4a63b34f24102f70fca42477aceed578b Author: Tony Lindgren Date: Wed Mar 10 14:04:32 2021 +0200 ARM: dts: Configure simple-pm-bus for omap4 l4_per We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit d978b69fa7b20604bb3113b541dd74cbf2a395cf Author: Tony Lindgren Date: Wed Mar 10 14:04:31 2021 +0200 ARM: dts: Configure simple-pm-bus for omap4 l4_wkup We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit bacc83e5eef9ba4a10ed36a8b657da226ebf66db Author: Tony Lindgren Date: Wed Mar 10 14:04:31 2021 +0200 ARM: dts: Move omap4 l3-noc to a separate node In preparation for probing l3 with simple-pm-bus and genpd, we must move l3 noc to a separate node. This is to prevent omap_l3_noc.c driver from claiming the whole l3 instance before simple-pm-bus has a chance to probe. Signed-off-by: Tony Lindgren commit fbe8285d65a9e7c69fdbe6cc069d33581302c72d Author: Tony Lindgren Date: Wed Mar 10 14:04:31 2021 +0200 ARM: dts: Move omap4 mmio-sram out of l3 interconnect We need mmio-sram early for omap4_sram_init() for IO barrier init, and will be moving l3 interconnect to probe with simple-pm-bus that probes at module_init() time. So let's move mmio-sram out of l3 to prepare for that. Otherwise we will get the following after probing the interconnects with simple-pm-bus: omap4_sram_init:Unable to get sram pool needed to handle errata I688 Signed-off-by: Tony Lindgren commit e55cc3f0404c6bb22ca843a6d16fae2ca193ca09 Author: Tony Lindgren Date: Wed Mar 10 14:04:30 2021 +0200 ARM: dts: Configure interconnect target module for omap4 mpu We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Signed-off-by: Tony Lindgren commit 932ddde183185b33c92c5b7810cbdbb792cfcafd Author: Tony Lindgren Date: Wed Mar 10 14:04:30 2021 +0200 ARM: dts: Configure interconnect target module for omap4 debugss We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" property to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Signed-off-by: Tony Lindgren commit 0600dabe34cc03909bd1c973b41fa7e0adc52966 Author: Tony Lindgren Date: Wed Mar 10 14:04:29 2021 +0200 ARM: dts: Configure interconnect target module for omap4 emif We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" property to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Signed-off-by: Tony Lindgren commit fe85baacd73be867812c5bf869970eeceeac6c46 Author: Tony Lindgren Date: Wed Mar 10 14:04:29 2021 +0200 ARM: dts: Configure interconnect target module for omap4 dmm We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" property to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Let's also use GIC_SPI and IRQ_TYPE_LEVEL_HIGH defines while at it. Signed-off-by: Tony Lindgren commit 398c66ed22fa85d44d5ff3c12efc282c98c4da89 Author: Tony Lindgren Date: Wed Mar 10 14:04:29 2021 +0200 ARM: dts: Configure power-domain for omap4 dts iss Configure power-domain for omap4 dts iss in preparation to probing devices with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 345ac6b17b18915478aa2cd7c3d87ea6e68a87c7 Author: Tony Lindgren Date: Wed Mar 10 14:04:28 2021 +0200 ARM: dts: Configure power-domain for omap4 gfx Configure power-domain for omap4 dts gfx in preparation to probing devices with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 7440e912b0fe755d80b958a65859ebabb5338cf8 Author: Zhang Yunkai Date: Sat Mar 6 04:34:15 2021 -0800 thermal:ti-soc-thermal: Remove duplicate include in ti-bandgap 'of_device.h' included in 'ti-bandgap.c' is duplicated. It is also included in the 25th line. Signed-off-by: Zhang Yunkai Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210306123415.219441-1-zhang.yunkai@zte.com.cn commit 54bc4edb3e52c3c7d1f715f3780977a0425626ad Author: Tony Lindgren Date: Wed Mar 10 14:03:55 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 hwmod We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit ecb4c5c0961bce27199a89f9fa6759b36c59a1c8 Author: Tony Lindgren Date: Wed Mar 10 14:03:50 2021 +0200 ARM: dts: Configure simple-pm-bus for dra7 l3 We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 53fb6ae97af4ea377f13f168968da8e91d0d3ffd Author: Tony Lindgren Date: Wed Mar 10 14:03:54 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 l3 We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit e93e4104a23acff82dc8d7e7414a0e01defecac5 Author: Tony Lindgren Date: Wed Mar 10 14:03:49 2021 +0200 ARM: dts: Configure simple-pm-bus for dra7 l4_cfg We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit b5ac9dedc14b6b14c11bd650a3c6932f52c38ce6 Author: Tony Lindgren Date: Wed Mar 10 14:03:54 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 l4_cfg We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit bdfafc8e2b3d9587e4bacdf0c25a70c2b429a6d7 Author: Tony Lindgren Date: Wed Mar 10 14:03:49 2021 +0200 ARM: dts: Configure simple-pm-bus for dra7 l4_per3 We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit b3db9b25ffc7fbd52f102fb81a8bb201bb04fbdb Author: Tony Lindgren Date: Wed Mar 10 14:03:53 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 l4_per3 We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 26c36e16d45e3e18bb8d9a082c0799e471e647d6 Author: Tony Lindgren Date: Wed Mar 10 14:03:49 2021 +0200 ARM: dts: Configure simple-pm-bus for dra7 l4_per2 We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit ca319f4f41a3bf76f1875fcc5003ba1a99443f8b Author: Tony Lindgren Date: Wed Mar 10 14:03:53 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 l4_per2 We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit f483a3e123410bd1c78af295bf65feffb6769a98 Author: Tony Lindgren Date: Wed Mar 10 14:03:48 2021 +0200 ARM: dts: Configure simple-pm-bus for dra7 l4_per1 We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 47a4b458c18484f9e3fb6c358054dae3984940e0 Author: Tony Lindgren Date: Wed Mar 10 14:03:53 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 l4_per1 We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 9a75368b6426739e8b798592f084cb682d760568 Author: Tony Lindgren Date: Wed Mar 10 14:03:48 2021 +0200 ARM: dts: Configure simple-pm-bus for dra7 l4_wkup We can now probe interconnects with device tree only configuration using simple-pm-bus and genpd. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 3e09b7d201c6b0429fd34c6ff5db9161497ed9fe Author: Tony Lindgren Date: Wed Mar 10 14:03:52 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 l4_wkup We can now probe interconnects with simple-pm-bus and genpd. Signed-off-by: Tony Lindgren commit 27559a8bd436495b5bbda63b9657eb14a345f266 Author: Tony Lindgren Date: Wed Mar 10 14:03:47 2021 +0200 ARM: dts: Configure interconnect target module for dra7 dmm We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" peroperty to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 860e246443576bad7604e9df07446f5fd5ce88ff Author: Tony Lindgren Date: Wed Mar 10 14:03:52 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 dmm 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 f5d0aba7c198ea653df92c1afb94484c9f0fc483 Author: Tony Lindgren Date: Wed Mar 10 14:03:47 2021 +0200 ARM: dts: Configure interconnect target module for dra7 mpu We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 66b2f7fee19655b0322bbdac1a769a30557f7123 Author: Tony Lindgren Date: Wed Mar 10 14:03:51 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 mpu 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 8af15365a36845c4c15d4c8046ddccff331d5263 Author: Tony Lindgren Date: Wed Mar 10 14:03:47 2021 +0200 ARM: dts: Configure interconnect target module for dra7 sata We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" peroperty to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Note that the old sysc register offset is wrong, the real offset is at 0x1100 as listed in TRM for SATA_SYSCONFIG register. Looks like we've been happily using sata on the bootloader configured sysconfig register and nobody noticed. Also the old register range for SATAMAC_wrapper registers is wrong at 7 while it should be 8. But that too seems harmless. There is also an L3 parent interconnect range that we don't seem to be using. That can be added as needed later on. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 98feab31ac491400f28b76a04dabd18ce21e91ba Author: Tony Lindgren Date: Wed Mar 10 14:03:51 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 sata 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 e2d637b069783f9db6cc76b8296f830f937a64f3 Author: Tony Lindgren Date: Wed Mar 10 14:03:46 2021 +0200 ARM: dts: Configure interconnect target module for dra7 qspi We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" peroperty to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Cc: Vignesh Raghavendra Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 786018cf552df44e9cf3b407ffcce432651ae66c Author: Tony Lindgren Date: Wed Mar 10 14:03:51 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 qspi 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. Cc: Vignesh Raghavendra Signed-off-by: Tony Lindgren commit 7f2659ce657e87cb7f47e6b15099608eaa1349ac Author: Tony Lindgren Date: Wed Mar 10 14:03:46 2021 +0200 ARM: dts: Move dra7 l3 noc to a separate node In order to prepare for probing l3 with genpd, we need to move l3 noc into a separate node for l3 interconnect to have it's own regs, and to avoid it claiming more than it needs for the io regions. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit b22199e4a1f67672bff2f4057d8362610a9a3a4b Author: Tony Lindgren Date: Wed Mar 10 14:03:50 2021 +0200 ARM: OMAP2+: Drop legacy platform data for dra7 pcie 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. Cc: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 075249bc554614199f893061082741c1b2ceac29 Author: Tony Lindgren Date: Wed Mar 10 14:03:45 2021 +0200 ARM: dts: Properly configure dra7 edma sysconfig registers Looks like the TRM is not listing the sysconfig for edma, let's add it based on am437x TRM edma registers as listed in sections "Table 10-26. EDMA3CC Registers" and "Table 10-99. EDMA3TC Registers". Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 785d943c768ef631271d1ed5caef1c162e001d6b Author: Tony Lindgren Date: Wed Mar 10 14:03:45 2021 +0200 ARM: dts: Configure interconnect target module for dra7 pcie We can now probe devices with device tree only configuration using ti-sysc interconnect target module driver. Let's configure the module, but keep the legacy "ti,hwmods" peroperty to avoid new boot time warnings. The legacy property will be removed in later patches together with the legacy platform data. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit c761028ef5e27f477fe14d2b134164c584fc21ee Author: Tony Lindgren Date: Wed Mar 10 14:03:45 2021 +0200 ARM: dts: Update pcie ranges for dra7 In order to update pcie to probe with ti-sysc and genpd, let's update the pcie ranges to not use address 0 for 0x20000000 and 0x30000000. The range for 0 is typically used for child devices as the offset from the module base. In the following patches, we will update pcie to probe with ti-sysc, and the patches become a bit confusing to read compared to other similar modules unless we update the ranges first. So let's just use the full addresses for ranges for the 0x20000000 and 0x30000000 ranges. Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit e259c2926c016dd815e5547412356d378fc1f589 Author: Tony Lindgren Date: Wed Mar 10 14:01:00 2021 +0200 PCI: pci-dra7xx: Prepare for deferred probe with module_platform_driver After updating pci-dra7xx driver to probe with ti-sysc and genpd, I noticed that dra7xx_pcie_probe() would not run if a power-domains property was configured for the interconnect target module. Turns out that module_platform_driver_probe uses platform_driver_probe(), while builtin_platform_driver uses platform_driver_register(). Only platform_driver_register() works for deferred probe as noted in the comments for __platform_driver_probe() in drivers/base/platform.c with a line saying "Note that this is incompatible with deferred probing". With module_platform_driver_probe, we have platform_driver_probe() produce -ENODEV error at device_initcall() level, and no further attempts are done. Let's fix this by using module_platform_driver instead. Note this is not an issue currently as we probe devices with simple-bus, and only is needed as we start probing the device with ti-sysc, or when probed with simple-pm-bus. Note that we must now also remove __init for probe related functions to avoid a section mismatch warning. Cc: linux-pci@vger.kernel.org Cc: Bjorn Helgaas Cc: Lorenzo Pieralisi Tested-by: Kishon Vijay Abraham I Signed-off-by: Tony Lindgren commit 7f7acef8571a239568abaf5f3dc7694d18ae970b Author: Tony Lindgren Date: Mon Mar 8 11:35:08 2021 +0200 clk: ti: omap5: Add missing gpmc and ocmc clkctrl The gpmc clock is needed to update omap5 to boot with genpd with the related devicetree patches. The ocmc clock is currently not used but let's add it so we have all the clocks for the l3main2 defined. Cc: Stephen Boyd Cc: Tero Kristo Signed-off-by: Tony Lindgren commit bc0b964da3f692a08f648f0dac328785ada38f68 Author: Tony Lindgren Date: Mon Mar 8 11:35:08 2021 +0200 soc: ti: omap-prm: Allow hardware supported retention when idle When moving the l4 interconnect instances to probe with simple-pm-bus and genpd, we will have l4per and core domains stop idling unless we configure the domain bits to allow retention when idle. As the TI SoCs have hardware autoidle capabilities, this is safe to do. The domains will only enter retention on WFI when none of the devices on the domain block autoidle in the hardware. This follows what we are already currently doing. Cc: Santosh Shilimkar Cc: Tero Kristo Signed-off-by: Tony Lindgren commit a15de032a72d511431294331f4bb47245f18b801 Author: Tony Lindgren Date: Mon Mar 8 11:35:08 2021 +0200 ARM: OMAP2+: Init both prm and prcm nodes early for clocks We need to probe both prm and prcm nodes early for clocks as they are needed by system timers. Signed-off-by: Tony Lindgren commit 5f7259a578e9c6759255996b86be5bed41d62193 Author: Tony Lindgren Date: Mon Mar 8 11:35:09 2021 +0200 bus: ti-sysc: Check for old incomplete dtb Let's be nice and show an error on the SoCs about old imcomplete devicetree if the dtb is still using "simple-bus" instead of "simple-pm-bus" for the root OCP node. Signed-off-by: Tony Lindgren commit 7fd49ca05be35a85c424a3ca8df931bd70c34535 Author: Niklas Söderlund Date: Tue Mar 9 17:24:19 2021 +0100 thermal: rcar_gen3_thermal: Add support for up to five TSC nodes Add support for up to five TSC nodes. The new THCODE values are taken from the example in the datasheet. Signed-off-by: Niklas Söderlund Acked-by: Geert Uytterhoeven Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210309162419.2621359-1-niklas.soderlund+renesas@ragnatech.se commit 76d6329534ae3b2f344aa72cc978ef4cfd69c0c8 Author: Bhaskar Chowdhury Date: Fri Mar 5 07:13:48 2021 +0530 thermal: Fix couple of spellos in the file sun8i_thermal.c s/calibartion/calibration/ s/undocummented/undocumented/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210305014348.17412-1-unixbhaskar@gmail.com commit 6606800192008bd2929c55614697645f53e07427 Author: Bhaskar Chowdhury Date: Fri Mar 5 07:23:20 2021 +0530 thermal: Fix a typo in the file soctherm.c s/calibaration/calibration/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210305015320.7614-1-unixbhaskar@gmail.com commit e042e95bcab34b2265b0aaeb497030ea13c6c251 Author: Tang Bin Date: Mon Feb 22 14:11:05 2021 +0800 thermal: amlogic: Omit superfluous error message in amlogic_thermal_probe() The function devm_platform_ioremap_resource has already contains error message, so remove the redundant dev_err here. Signed-off-by: Tang Bin Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20210222061105.6008-1-tangbin@cmss.chinamobile.com commit eac013a0b7041f5cfc8feedf429a767675350102 Author: Manivannan Sadhasivam Date: Tue Jan 26 11:56:01 2021 +0200 MAINTAINERS: Add entry for ATC260x PMIC Signed-off-by: Manivannan Sadhasivam [cristian: change binding doc file path, add file patterns for onkey and poweroff drivers, fix ordering, add myself as co-maintainer] Signed-off-by: Cristian Ciocaltea Signed-off-by: Lee Jones commit 44f6b6a50ee3ff91baef7c99d9552aa5b97a890e Author: Cristian Ciocaltea Date: Tue Jan 26 11:56:00 2021 +0200 input: atc260x: Add onkey driver for ATC260x PMICs The Actions Semi ATC260x PMICs are able to manage an onkey button. This driver exposes the ATC260x onkey as an input device. It can also be configured to force a system reset on a long key-press with an adjustable duration. The currently supported chip variants are ATC2603C and ATC2609A. Signed-off-by: Cristian Ciocaltea Acked-by: Dmitry Torokhov Signed-off-by: Lee Jones commit f7cb7fe34db9f32e8b1c13ecc823112480b875f8 Author: Cristian Ciocaltea Date: Tue Jan 26 11:55:59 2021 +0200 mfd: Add MFD driver for ATC260x PMICs Add initial support for the Actions Semi ATC260x PMICs which integrates Audio Codec, Power management, Clock generation and GPIO controller blocks. For the moment this driver only supports Regulator, Poweroff and Onkey functionalities for the ATC2603C and ATC2609A chip variants. Since the PMICs can be accessed using both I2C and SPI buses, the following driver structure has been adopted: -----> atc260x-core.c (Implements core functionalities) / ATC260x --------> atc260x-i2c.c (Implements I2C interface) \ -----> atc260x-spi.c (Implements SPI interface - TODO) Co-developed-by: Manivannan Sadhasivam Signed-off-by: Manivannan Sadhasivam Signed-off-by: Cristian Ciocaltea Signed-off-by: Lee Jones commit cf469562fc59b4dc7835e6497cdea0814eed1ef3 Author: Cristian Ciocaltea Date: Tue Jan 26 11:55:58 2021 +0200 dt-bindings: mfd: Add Actions Semi ATC260x PMIC binding Add devicetree binding for Actions Semi ATC260x PMICs. Signed-off-by: Cristian Ciocaltea Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 44a8c5a9dab3dab205c56e7fe05d6015866c144e Author: Cristian Ciocaltea Date: Tue Jan 26 11:55:57 2021 +0200 dt-bindings: input: Add reset-time-sec common property Add a new common property 'reset-time-sec' to be used in conjunction with the devices supporting the key pressed reset feature. Signed-off-by: Cristian Ciocaltea Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit edbda8f78723580e384ea15d2efb8680f7824ed3 Author: Jonathan Neuschäfer Date: Sun Jan 24 22:41:26 2021 +0100 MAINTAINERS: Add entry for Netronix embedded controller Let's make sure I'll notice when there are patches for the NTXEC drivers. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Lee Jones commit 435af89786c674583b188f7322fee5c03894b8b7 Author: Jonathan Neuschäfer Date: Sun Jan 24 22:41:25 2021 +0100 rtc: New driver for RTC in Netronix embedded controller With this driver, mainline Linux can keep its time and date in sync with the vendor kernel. Advanced functionality like alarm and automatic power-on is not yet supported. Signed-off-by: Jonathan Neuschäfer Acked-by: Alexandre Belloni Signed-off-by: Lee Jones commit 9fc0486f948f00f90cba4da9e3b2b58ff00b2a53 Author: Jonathan Neuschäfer Date: Sun Jan 24 22:41:24 2021 +0100 pwm: ntxec: Add driver for PWM function in Netronix EC The Netronix EC provides a PWM output which is used for the backlight on some ebook readers. This patches adds a driver for the PWM output. The .get_state callback is not implemented, because the PWM state can't be read back from the hardware. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Uwe Kleine-König Acked-by: Thierry Reding Signed-off-by: Lee Jones commit eceae583930666a69ab805eee8e81f9699bf6930 Author: Jonathan Neuschäfer Date: Sun Jan 24 22:41:23 2021 +0100 mfd: Add base driver for Netronix embedded controller The Netronix embedded controller is a microcontroller found in some e-book readers designed by the original design manufacturer Netronix, Inc. It contains RTC, battery monitoring, system power management, and PWM functionality. This driver implements register access and version detection. Third-party hardware documentation is available at: https://github.com/neuschaefer/linux/wiki/Netronix-MSP430-embedded-controller The EC supports interrupts, but the driver doesn't make use of them so far. Signed-off-by: Jonathan Neuschäfer Signed-off-by: Lee Jones commit 01929c71334a075971b96837763d4dc0befc5fa5 Author: Jonathan Neuschäfer Date: Sun Jan 24 22:41:22 2021 +0100 dt-bindings: mfd: Add binding for Netronix embedded controller This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and is typically implemented as a TI MSP430 microcontroller. It controls different functions of the system, such as power on/off, RTC, PWM for the backlight. The exact functionality provided can vary between boards. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit 012e3b174fe7d2620b19ccb685f8211cff2ba747 Author: Jonathan Neuschäfer Date: Sun Jan 24 22:41:21 2021 +0100 dt-bindings: Add vendor prefix for Netronix, Inc. Netronix, Inc. (http://www.netronixinc.com/) makes ebook reader board designs, which are for example used in Kobo and Tolino devices. An alternative prefix for Netronix would be "ntx", which is already used in code released by Netronix. It is shorter, but perhaps less clear. Signed-off-by: Jonathan Neuschäfer Acked-by: Rob Herring Signed-off-by: Lee Jones commit 42fc191d60e6d5fd8c52e7afa8bccdc912947ce4 Author: Matti Vaittinen Date: Wed Mar 10 10:11:44 2021 +0200 mfd: bd9576: Add safety limit/monitoring registers ROHM BD9576 contains safety features like over/under voltage detection, over curren detection and over temperature detection. Add the configuration register information. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit e4560879fddf34c39ed2d4f0fb6a0489839796ce Author: Matti Vaittinen Date: Wed Mar 10 10:09:04 2021 +0200 MAINTAINERS: Add ROHM BD9576MUF and BD9573MUF drivers Add maintainer entries for ROHM BD9576MUF and ROHM BD9573MUF drivers. MFD, regulator and watchdog drivers were introduced for these PMICs. Signed-off-by: Matti Vaittinen Acked-by: Guenter Roeck Signed-off-by: Lee Jones commit b237bcac557ac30a4064863f582e06073248392a Author: Matti Vaittinen Date: Wed Mar 10 10:08:36 2021 +0200 wdt: Support wdt on ROHM BD9576MUF and BD9573MUF Add Watchdog support for ROHM BD9576MUF and BD9573MUF PMICs which are mainly used to power the R-Car series processors. The watchdog is pinged using a GPIO and enabled using another GPIO. Additionally watchdog time-out can be configured to HW prior starting the watchdog. Watchdog timeout can be configured to detect only delayed ping or in a window mode where also too fast pings are detected. Signed-off-by: Matti Vaittinen Reviewed-by: Guenter Roeck Signed-off-by: Lee Jones commit 0e9692607f94ecc59aedc0ecfd2348124c743412 Author: Matti Vaittinen Date: Wed Mar 10 10:08:02 2021 +0200 mfd: bd9576: Add IRQ support BD9573 and BD9576 support set of "protection" interrupts for "fatal" issues. Those lead to SOC reset as PMIC shuts the power outputs. Thus there is no relevant IRQ handling for them. Few "detection" interrupts were added to the BD9576 with the idea that SOC could take some recovery-action before error gets unrecoverable. Unfortunately the BD9576 interrupt logic was not re-evaluated. IRQs are not designed to be properly acknowleged - and IRQ line is kept active for whole duration of error condition (in comparison to informing only about state change). For above reason, do not consider missing IRQ as error. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit b1b3ced389795d2671e88dd3e9e07a48dc9632fc Author: Matti Vaittinen Date: Wed Mar 10 10:06:05 2021 +0200 mfd: Support ROHM BD9576MUF and BD9573MUF Add core support for ROHM BD9576MUF and BD9573MUF PMICs which are mainly used to power the R-Car series processors. Signed-off-by: Matti Vaittinen Signed-off-by: Lee Jones commit bd4cefe20e3ded06ee2a2629a73ecb40a08f4eaf Author: Matti Vaittinen Date: Wed Mar 10 10:05:08 2021 +0200 dt_bindings: mfd: Add ROHM BD9576MUF and BD9573MUF PMICs Add bindings for ROHM BD9576MUF and BD9573MUF PMICs. These PMICs are primarily intended to be used to power the R-Car series processors. They provide 6 power outputs, safety features and a watchdog with two functional modes. Signed-off-by: Matti Vaittinen Reviewed-by: Rob Herring Signed-off-by: Lee Jones commit aa47ad3f853ae72c32b7e46dfc8bc2c8dc2dbad7 Author: David E. Box Date: Wed Feb 24 12:10:05 2021 -0800 mfd: intel_pmt: Add support for DG1 Adds PMT Telemetry aggregator support for the DG1 graphics PCIe card. The device does not have the DVSEC region in its PCI config space so hard code the discovery table data in the driver. Also requires a fix for DG1 in the Telemetry driver for how the ACCESS_TYPE field is used. Signed-off-by: David E. Box Reviewed-by: Hans de Goede Signed-off-by: Lee Jones commit a1a5c1c3df282dc122508a17500317266ef19e46 Author: David E. Box Date: Wed Feb 24 12:10:04 2021 -0800 mfd: intel_pmt: Fix nuisance messages and handling of disabled capabilities Some products will be available that have PMT capabilities that are not supported. Remove the warnings in this instance to avoid nuisance messages and confusion. Also return an error code for capabilities that are disabled by quirk to prevent them from keeping the driver loaded if only disabled capabilities are found. Fixes: 4f8217d5b0ca ("mfd: Intel Platform Monitoring Technology support") Signed-off-by: David E. Box Reviewed-by: Hans de Goede Signed-off-by: Lee Jones commit 596e6e1c03cadf93ab37d3cdea672a01889356cb Author: Phong Hoang Date: Fri Mar 5 15:32:58 2021 +0100 arm64: dts: renesas: r8a779a0: Add TMU support This patch adds TMU{0|1|2|3|4} device nodes for R-Car V3U (r8a779a0) SoC. Signed-off-by: Phong Hoang [wsa: rebased, double checked values] Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210305143259.12622-3-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 544c939e4c67d1824ed89bdefb3ccd1f0d74e826 Author: Geert Uytterhoeven Date: Thu Mar 4 16:32:57 2021 +0100 arm64: dts: renesas: falcon: Add Ethernet sub-board Add a DTS file for the Falcon Ethernet sub-board (RTP0RC779A0ETS0010S), and include it from the main r8a779a0-falcon.dts. For now its contents are limited to the Board ID EEPROM. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/20210304153257.4059277-4-geert+renesas@glider.be commit 7ed6bc9679637ef8775dc1def68989b617a840b2 Author: Geert Uytterhoeven Date: Thu Mar 4 16:32:56 2021 +0100 arm64: dts: renesas: falcon: Add CSI/DSI sub-board Add a DTS file for the Falcon CSI/DSI sub-board (RTP0RC779A0DCS0010S), and include it from the main r8a779a0-falcon.dts. For now its contents are limited to the Board ID EEPROM. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/20210304153257.4059277-3-geert+renesas@glider.be commit 405daa39b22b5b89fba9cea1d25fcc0871ba1eae Author: Geert Uytterhoeven Date: Thu Mar 4 16:32:55 2021 +0100 arm64: dts: renesas: falcon: Add I2C EEPROM nodes Add device nodes for the I2C EEPROMs on the Falcon CPU and BreakOut boards. Signed-off-by: Geert Uytterhoeven Reviewed-by: Wolfram Sang Tested-by: Wolfram Sang Link: https://lore.kernel.org/r/20210304153257.4059277-2-geert+renesas@glider.be commit a4be49e75a1587391937ffaee29f0e0645546a9f Author: Geert Uytterhoeven Date: Thu Mar 4 10:49:45 2021 +0100 ARM: dts: rza2mevb: Upstream Linux requires SDRAM As upstream Linux does not support XIP (eXecute-In-Place) for ARMv7-A platforms that are part of the ARCH_MULTIPLATFORM framework, it cannot run in the 8 MiB of HyperRAM present on the RZ/A2M CPU board. Hence the 64 MiB of SDRAM on the sub-board needs to be enabled, which has the following ramifications: - SCIF4 connected to the on-board USB-serial can no longer be used as the serial console, - Instead, SCIF2 is used as the serial console, by connecting a 3.3V TTL USB-to-Serial adapter to the CMOS camera connector, - The first Ethernet channel can no longer be used, - USB Channel 1 loses the overcurrent input signal. Based on the Linux-4.19 BSP for RZ/A2. Signed-off-by: Geert Uytterhoeven Acked-by: Chris Brandt Link: https://lore.kernel.org/r/20210304094945.4003097-1-geert+renesas@glider.be commit b1158c5e14b30396bb92f63a7a26ad7b85e70c06 Author: Geert Uytterhoeven Date: Wed Mar 3 15:05:29 2021 +0100 arm64: dts: renesas: Consolidate Salvator-X(S) HDMI0 handling Now all Salvator-X(S) SoC/board combinations have support for HDMI sound, all HDMI0 connector and sound descriptions are identical. Replace them by shared descriptions in salvator-common.dtsi, to reduce duplication. Signed-off-by: Geert Uytterhoeven Acked-by: Kuninori Morimoto Link: https://lore.kernel.org/r/20210303140529.3941670-1-geert+renesas@glider.be commit f7adcca27edf05fc1f061a9e5de059fe179f0e1c Author: Niklas Söderlund Date: Tue Mar 9 12:49:30 2021 +0100 pinctrl: renesas: r8a77965: Add vin4_g8 and vin5_high8 pins This patch adds vin4_g8 and vin5_high8 support to the R8A77965 SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Link: https://lore.kernel.org/r/20210309114930.2433711-5-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 2a9e4f74cd57fb7091d4ad627ec58bfd75b50722 Author: Niklas Söderlund Date: Tue Mar 9 12:49:29 2021 +0100 pinctrl: renesas: r8a77990: Add vin4_g8 and vin5_high8 pins This patch adds vin4_g8 and vin5_high8 support to the R8A77990 SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Link: https://lore.kernel.org/r/20210309114930.2433711-4-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 3d250efb8c32bdcf29e307de624afd25b6c1bff7 Author: Niklas Söderlund Date: Tue Mar 9 12:49:28 2021 +0100 pinctrl: renesas: r8a7796: Add vin4_g8 and vin5_high8 pins This patch adds vin4_g8 and vin5_high8 support to the R8A7796 SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Link: https://lore.kernel.org/r/20210309114930.2433711-3-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit 5f79bbb28be2f09e99ef3477179128af2d8e6f64 Author: Niklas Söderlund Date: Tue Mar 9 12:49:27 2021 +0100 pinctrl: renesas: r8a77951: Add vin4_g8 and vin5_high8 pins This patch adds vin4_g8 and vin5_high8 support to the R8A77951 SoC. Signed-off-by: Niklas Söderlund Reviewed-by: Jacopo Mondi Link: https://lore.kernel.org/r/20210309114930.2433711-2-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit c66424ea75640a205c34d0ba6986307179516fd4 Author: Niklas Söderlund Date: Tue Mar 9 17:55:38 2021 +0100 clk: renesas: r8a779a0: Add TSC clock Implement support for the TSC clock on V3U. Signed-off-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210309165538.2682268-1-niklas.soderlund+renesas@ragnatech.se Signed-off-by: Geert Uytterhoeven commit c52f4f839a33b1757aae25af41fc0037645e341c Author: Wolfram Sang Date: Fri Mar 5 15:32:57 2021 +0100 clk: renesas: r8a779a0: Add TMU clocks Also add CL16MCK source clock for TMU0. Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund Link: https://lore.kernel.org/r/20210305143259.12622-2-wsa+renesas@sang-engineering.com Signed-off-by: Geert Uytterhoeven commit 225be60f3853572f682b7ad3d0c1d4008edb6c6b Author: Konrad Dybcio Date: Sun Feb 28 13:41:04 2021 +0100 dt-bindings: backlight: qcom-wled: Add PMI8994 compatible Document the newly added PMI8994 compatible. Signed-off-by: Konrad Dybcio Acked-by: Rob Herring Signed-off-by: Lee Jones commit 13c2235b2b2870675195f0b551275d1abdd81068 Author: Edmundo Carmona Antoranz Date: Sat Mar 6 15:07:39 2021 -0600 sched: Remove unnecessary variable from schedule_tail() Since 565790d28b1 (sched: Fix balance_callback(), 2020-05-11), there is no longer a need to reuse the result value of the call to finish_task_switch() inside schedule_tail(), therefore the variable used to hold that value (rq) is no longer needed. Signed-off-by: Edmundo Carmona Antoranz Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210306210739.1370486-1-eantoranz@gmail.com commit 1e17fb8edc5ad6587e9303ccdebce853bc8cf30c Author: Clement Courbet Date: Wed Mar 3 14:46:53 2021 -0800 sched: Optimize __calc_delta() A significant portion of __calc_delta() time is spent in the loop shifting a u64 by 32 bits. Use `fls` instead of iterating. This is ~7x faster on benchmarks. The generic `fls` implementation (`generic_fls`) is still ~4x faster than the loop. Architectures that have a better implementation will make use of it. For example, on x86 we get an additional factor 2 in speed without dedicated implementation. On GCC, the asm versions of `fls` are about the same speed as the builtin. On Clang, the versions that use fls are more than twice as slow as the builtin. This is because the way the `fls` function is written, clang puts the value in memory: https://godbolt.org/z/EfMbYe. This bug is filed at https://bugs.llvm.org/show_bug.cgi?idI406. ``` name cpu/op BM_Calc<__calc_delta_loop> 9.57ms Â=B112% BM_Calc<__calc_delta_generic_fls> 2.36ms Â=B113% BM_Calc<__calc_delta_asm_fls> 2.45ms Â=B113% BM_Calc<__calc_delta_asm_fls_nomem> 1.66ms Â=B112% BM_Calc<__calc_delta_asm_fls64> 2.46ms Â=B113% BM_Calc<__calc_delta_asm_fls64_nomem> 1.34ms Â=B115% BM_Calc<__calc_delta_builtin> 1.32ms Â=B111% ``` Signed-off-by: Clement Courbet Signed-off-by: Josh Don Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210303224653.2579656-1-joshdon@google.com commit 60a35ba9141f06b67150ce3544bc595d049b0d83 Author: Fabio Estevam Date: Wed Mar 3 23:32:20 2021 -0300 usb: usb-mx2: Remove unused file i.MX21 support has been dropped, so remove such unused file. Signed-off-by: Fabio Estevam Link: https://lore.kernel.org/r/20210304023220.2362407-1-festevam@gmail.com Signed-off-by: Greg Kroah-Hartman commit f2d90e07b5df2c7745ae66d2d48cc350d3f1c7d2 Author: Wei Yongjun Date: Mon Mar 8 09:48:39 2021 +0000 usb: typec: stusb160x: fix return value check in stusb160x_probe() In case of error, the function device_get_named_child_node() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: da0cb6310094 ("usb: typec: add support for STUSB160x Type-C controller family") Reported-by: Hulk Robot Reviewed-by: Heikki Krogerus Reviewed-by: Amelie Delaunay Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210308094839.3586773-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 604c75893a01c8a3b5bd6dac55535963cd44c3f5 Author: Wei Yongjun Date: Mon Mar 8 09:48:41 2021 +0000 usb: typec: tps6598x: Fix return value check in tps6598x_probe() In case of error, the function device_get_named_child_node() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 18a6c866bb19 ("usb: typec: tps6598x: Add USB role switching logic") Reported-by: Hulk Robot Reviewed-by: Heikki Krogerus Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210308094841.3587751-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 493d0856de5eb9fd040a09475ea2cb5576984a6e Author: Yang Li Date: Mon Mar 8 14:35:30 2021 +0800 usb: typec: tcpm: turn tcpm_ams_finish into void function This function always return '0' and no callers use the return value. So make it a void function. This eliminates the following coccicheck warning: ./drivers/usb/typec/tcpm/tcpm.c:778:5-8: Unneeded variable: "ret". Return "0" on line 794 Reported-by: Abaci Robot Reviewed-by: Heikki Krogerus Signed-off-by: Yang Li Link: https://lore.kernel.org/r/1615185330-118246-1-git-send-email-yang.lee@linux.alibaba.com Signed-off-by: Greg Kroah-Hartman commit 19c234a14eafca78e0bc14ffb8be3891096ce147 Author: Badhri Jagan Sridharan Date: Wed Mar 3 23:09:31 2021 -0800 usb: typec: tcpci: Check ROLE_CONTROL while interpreting CC_STATUS While interpreting CC_STATUS, ROLE_CONTROL has to be read to make sure that CC1/CC2 is not forced presenting Rp/Rd. >From the TCPCI spec: 4.4.5.2 ROLE_CONTROL (Normative): The TCPM shall write B6 (DRP) = 0b and B3..0 (CC1/CC2) if it wishes to control the Rp/Rd directly instead of having the TCPC perform DRP toggling autonomously. When controlling Rp/Rd directly, the TCPM writes to B3..0 (CC1/CC2) each time it wishes to change the CC1/CC2 values. This control is used for TCPM-TCPC implementing Source or Sink only as well as when a connection has been detected via DRP toggling but the TCPM wishes to attempt Try.Src or Try.Snk. Table 4-22. CC_STATUS Register Definition: If (ROLE_CONTROL.CC1 = Rd) or ConnectResult=1) 00b: SNK.Open (Below maximum vRa) 01b: SNK.Default (Above minimum vRd-Connect) 10b: SNK.Power1.5 (Above minimum vRd-Connect) Detects Rp-1.5A 11b: SNK.Power3.0 (Above minimum vRd-Connect) Detects Rp-3.0A If (ROLE_CONTROL.CC2=Rd) or (ConnectResult=1) 00b: SNK.Open (Below maximum vRa) 01b: SNK.Default (Above minimum vRd-Connect) 10b: SNK.Power1.5 (Above minimum vRd-Connect) Detects Rp 1.5A 11b: SNK.Power3.0 (Above minimum vRd-Connect) Detects Rp 3.0A Fixes: 74e656d6b0551 ("staging: typec: Type-C Port Controller Interface driver (tcpci)") Acked-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210304070931.1947316-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit 365038f24b3e9d2b7c9e499f03f432040e28a35c Author: Chunfeng Yun Date: Mon Mar 8 10:52:07 2021 +0800 usb: common: move function's kerneldoc next to its definition Following a general rule, add the kerneldoc for a function next to it's definition, but not next to its declaration in a header file. Suggested-by: Alan Stern Suggested-by: Greg Kroah-Hartman Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/c4d2e010ae2bf67cdfa0b55e6d1deb9339d9d3dc.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit f18b6edbce448e34eaf00767b19476cdb5030ec6 Author: Chunfeng Yun Date: Mon Mar 8 10:52:06 2021 +0800 usb: xhci-mtk: print debug info of endpoint interval Print bInterval and convert it into the time expressed in us or ms unit, this is the key info when allocate bandwidth failed. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/f7a9fa7a812296fcd6c603bfa9853076144018d6.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit fb95c7cf5600b7b74412f27dfb39a1e13fd8a90d Author: Chunfeng Yun Date: Mon Mar 8 10:52:05 2021 +0800 usb: common: add function to get interval expressed in us unit Add a new function to convert bInterval into the time expressed in 1us unit. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/25c8a09b055f716c1e5bf11fea72c3418f844482.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 14295a150050acfc3a1260ee3d2114b0b824199f Author: Chunfeng Yun Date: Mon Mar 8 10:52:04 2021 +0800 usb: xhci-mtk: support to build xhci-mtk-hcd.ko Currently xhci-hcd.ko building depends on USB_XHCI_MTK, this is not flexible for some cases. For example: USB_XHCI_HCD is y, and USB_XHCI_MTK is m, then we can't implement extended functions if only update xhci-mtk.ko This patch is used to remove the dependence. Acked-by: Mathias Nyman Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/0b62e21ddfacc1c2874726dd27ccab80c993f303.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit dc9d3b2c4e8d94c95d4c685eabcec97c60119fa7 Author: Chunfeng Yun Date: Mon Mar 8 10:52:03 2021 +0800 usb: xhci-mtk: remove declaration of xhci_mtk_setup() Move xhci_driver_overrides struct variable after definition of xhci_mtk_setup(), then we can remove it's declaration. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/cf627d611a5c59508371cc3360cb402b70825fd8.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit ccda8c224c0701caac007311d06a2de9543a7590 Author: Chunfeng Yun Date: Mon Mar 8 10:52:02 2021 +0800 usb: xhci-mtk: add some schedule error number This is used to provide more information about which case causes bandwidth schedule failure. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/9771f44093053b581e9c4be4b7fb68d9fcecad08.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit bf7da03ae46af445123266959025166aaafd3205 Author: Chunfeng Yun Date: Mon Mar 8 10:52:01 2021 +0800 usb: xhci-mtk: rebuild the way to get bandwidth domain Rebuild the function get_bw_index(), get the bandwidth domain directly instead its index of domain array. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/de618970301702c57bd352bf87df48bc17c699dd.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 11fdcc3937b11c61aa097181c60445683150f3b3 Author: Chunfeng Yun Date: Mon Mar 8 10:52:00 2021 +0800 usb: xhci-mtk: use @tt_info to check the FS/LS device is under a HS hub If the LS/FS device is connected to an external HS hub, the member @tt_info in xhci_virt_device struct in not NULL, use it to check whether a LS/FS device is under an exernal HS hub, then no need get the slot context of this device. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/8117df52f16bd03087e486d7d740a183b6dd634a.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 6009bea08ad79cc862720fc2dd1ae9f0942f41ee Author: Chunfeng Yun Date: Mon Mar 8 10:51:59 2021 +0800 usb: xhci-mtk: add a member @speed in mu3h_sch_ep_info struct This is used to drop parameter @udev for some functions, meanwhile remove some unused @udev parameter. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/cda0833e44d6027cc8fdee1e29ce2b5b2a6ac03d.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 9132799d4ae0ce1f137c6bf21f13cd319fd11703 Author: Chunfeng Yun Date: Mon Mar 8 10:51:58 2021 +0800 usb: xhci-mtk: use clear type instead of void Use struct usb_host_endpoint instead of void to declare the member @ep of mu3h_sch_ep_info struct. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/e9790eb4b959f9f843433fa5048c76772cc59061.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit b707c13f98233e91ab46e89563ff5abf7813967f Author: Chunfeng Yun Date: Mon Mar 8 10:51:57 2021 +0800 usb: xhci-mtk: remove unnecessary members of mu3h_sch_tt struct The members @usb_tt and @tt_port in mu3h_sch_tt struct are not used after initialization, so can be removed Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/9afecc2411895a3c76658df26ebca1c961a39fbb.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 44b948287a94380967f7a0b832b7020ee4f449ee Author: Chunfeng Yun Date: Mon Mar 8 10:51:56 2021 +0800 usb: xhci-mtk: add a function to get bandwidth boundary This is used to simplify unit test. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/805b3ba66c2f02a52de4440212519aaa58463039.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 338af695fffb12a9407c376ce0cebce896c15050 Author: Chunfeng Yun Date: Mon Mar 8 10:51:55 2021 +0800 usb: xhci-mtk: add a function to (un)load bandwidth info Extract a function to load/unload bandwidth info, and remove a dummy check of TT offset. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/6fbc000756a4a4a7efbce651b785fee7561becb6.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 4a56adf4fafbc41ceffce0c3f385f59d4fc3c16a Author: Chunfeng Yun Date: Mon Mar 8 10:51:54 2021 +0800 usb: xhci-mtk: use @sch_tt to check whether need do TT schedule It's clearer to use @sch_tt to check whether need do TT schedule, no function is changed. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/324a76782ccaf857a8f01f67aee435e8ec7d0e28.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 1bf661daf6b084bc4d753f55b54f35dc98709685 Author: Chunfeng Yun Date: Mon Mar 8 10:51:53 2021 +0800 usb: xhci-mtk: add only one extra CS for FS/LS INTR In USB2 Spec: "11.18.5 TT Response Generation In general, there will be two (or more) complete-split transactions scheduled for a periodic endpoint. However, for interrupt endpoints, the maximum size of the full-/low-speed transaction guarantees that it can never require more than two complete-split transactions. Two complete-split transactions are only required when the transaction spans a microframe boundary." Due to the maxp is 64, and less then 188 (at most in one microframe), seems never span boundary, so use only one CS for FS/LS interrupt transfer, this will save some bandwidth. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/5b9ff09f53d23cf9e5c5437db4ffc18b798bf60c.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 7c986fbc16ae6b2f914a3ebf06a3a4a8d9bb0b7c Author: Chunfeng Yun Date: Mon Mar 8 10:51:52 2021 +0800 usb: xhci-mtk: get the microframe boundary for ESIT Tune the boundary for FS/LS ESIT due to CS: For ISOC out-ep, the controller starts transfer data after the first SS; for others, the data is already transferred before the last CS. Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/49e5a269a47984f3126a70c3fb471b0c2874b8c2.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit e19ee44a3d07c232f9241024dab1ebd0748cdf5f Author: Chunfeng Yun Date: Mon Mar 8 10:51:51 2021 +0800 usb: xhci-mtk: improve bandwidth scheduling with TT When the USB headset is plug into an external hub, sometimes can't set config due to not enough bandwidth, so need improve LS/FS INT/ISOC bandwidth scheduling with TT. Fixes: 54f6a8af3722 ("usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints") Cc: stable Signed-off-by: Yaqii Wu Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/2f30e81400a59afef5f8231c98149169c7520519.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 5fa5827566e3affa1657ccf9b22706c06a5d021a Author: Chunfeng Yun Date: Mon Mar 8 10:51:50 2021 +0800 usb: xhci-mtk: remove or operator for setting schedule parameters Side effect may happen if use or operator to set schedule parameters when the parameters are already set before. Set them directly due to other bits are reserved. Fixes: 54f6a8af3722 ("usb: xhci-mtk: skip dropping bandwidth of unchecked endpoints") Cc: stable Signed-off-by: Chunfeng Yun Link: https://lore.kernel.org/r/d287899e6beb2fc1bfb8900c75a872f628ecde55.1615170625.git.chunfeng.yun@mediatek.com Signed-off-by: Greg Kroah-Hartman commit 0f3edf99c2393656cdf6dc8596c0e2d983a7d591 Author: Ray Chi Date: Wed Mar 3 17:58:02 2021 +0800 usb: dwc3: document usb_psy in struct dwc3 The new struct member was added to struct dwc3, but a documentation was missing: drivers/usb/dwc3/core.h:1273: warning: Function parameter or member 'usb_psy' not described in 'dwc3' Reported-by: Stephen Rothwell Signed-off-by: Ray Chi Link: https://lore.kernel.org/r/20210303095802.2801733-1-raychi@google.com Signed-off-by: Greg Kroah-Hartman commit b0bf77cd389d12f61d1d79aa54e1ec03b68a8a11 Author: Colin Ian King Date: Wed Mar 3 09:58:26 2021 +0000 usb: dwc3: Fix dereferencing of null dwc->usb_psy Currently the null check logic on dwc->usb_psy is inverted as it allows calls to power_supply_put with a null dwc->usb_psy causing a null pointer dereference. Fix this by removing the ! operator. Addresses-Coverity: ("Dereference after null check") Fixes: 59fa3def35de ("usb: dwc3: add a power supply for current control") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210303095826.6143-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 92d1e87e627a6e5c9c5111adb95b6eae8df124c7 Author: Greg Kroah-Hartman Date: Fri Feb 26 11:23:56 2021 +0100 USB: remove usb_bus_type from usb.h We have 2 forward declarations of usb_bus_type, one in the system-wide usb.h and the other in the "USB core only header file". This variable is not exported from the USB core, so remove the declaration from usb.h as it does not need to be there. Cc: Thomas Zimmermann Cc: linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20210226102356.716746-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 153e140d1eeeabb0a504835a15a2b4d29c5c9d6c Author: Greg Kroah-Hartman Date: Tue Feb 16 15:46:45 2021 +0100 USB: typec: tcpm: create debugfs subdir for the driver The single debugfs file for this driver really is a log file, so make a subdir and call it "log" to make it obvious this is what it is for. This makes cleanup simpler as we just remove the whole directory, no need to handle individual files anymore. Cc: Guenter Roeck Cc: Heikki Krogerus Cc: linux-usb@vger.kernel.org Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210216144645.3813043-6-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 24a16199d9fa77db7310eb90729d80e9d0598cc1 Author: Greg Kroah-Hartman Date: Tue Feb 16 15:46:44 2021 +0100 USB: typec: fusb302: create debugfs subdir for the driver The single debugfs file for this driver really is a log file, so make a subdir and call it "log" to make it obvious this is what it is for. This makes cleanup simpler as we just remove the whole directory, no need to handle individual files anymore. Cc: Guenter Roeck Cc: Heikki Krogerus Cc: linux-usb@vger.kernel.org Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210216144645.3813043-5-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 5649d86f537887c2be88689986ec4dd493d4babe Author: Greg Kroah-Hartman Date: Tue Feb 16 15:46:43 2021 +0100 USB: host: uhci: remove dentry pointer for debugfs There is no need to keep the dentry pointer around for the created debugfs file, as it is only needed when removing it from the system. When it is to be removed, ask debugfs itself for the pointer, to save on storage and make things a bit simpler. And, no one noticed that a __maybe_unused dentry * in uhci_start() really was unused, so remove that as it's obviously not needed, and hasn't been for quite some time. Cc: Alan Stern Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20210216144645.3813043-4-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 82d4afcfa9b507c983bb261ad1d6d13cb52d6e06 Author: Greg Kroah-Hartman Date: Tue Feb 16 15:46:42 2021 +0100 USB: host: sl811: remove dentry pointer for debugfs There is no need to keep the dentry pointer around for the created debugfs file, as it is only needed when removing it from the system. When it is to be removed, ask debugfs itself for the pointer, to save on storage and make things a bit simpler. Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20210216144645.3813043-3-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7347f4b95f645f7c89b9294ca1b561c25d05a224 Author: Greg Kroah-Hartman Date: Tue Feb 16 15:46:41 2021 +0100 USB: host: isp1362: remove dentry pointer for debugfs There is no need to keep the dentry pointer around for the created debugfs file, as it is only needed when removing it from the system. When it is to be removed, ask debugfs itself for the pointer, to save on storage and make things a bit simpler. Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20210216144645.3813043-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 7c7b971d71e754cdb46d7268749fa2f7064d6df3 Author: Greg Kroah-Hartman Date: Tue Feb 16 15:46:40 2021 +0100 USB: host: isp116x: remove dentry pointer for debugfs There is no need to keep the dentry pointer around for the created debugfs file, as it is only needed when removing it from the system. When it is to be removed, ask debugfs itself for the pointer, to save on storage and make things a bit simpler. Cc: Olav Kongas Cc: linux-usb@vger.kernel.org Link: https://lore.kernel.org/r/20210216144645.3813043-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit b9d9137d29b27f4ad023af2b1259fc9a154f7577 Author: Martin Devera Date: Sat Feb 27 22:55:28 2021 +0100 usb: dwc2: Add STM32 related debugfs entries These are entries related to STM32MP1 PHY control. Acked-by: Minas Harutyunyan Signed-off-by: Martin Devera Link: https://lore.kernel.org/r/20210227215528.12752-1-devik@eaxlabs.cz Signed-off-by: Greg Kroah-Hartman commit 4294a8c2b8db914b029801cf2a2ba438e8785714 Author: kernel test robot Date: Sat Feb 13 21:09:55 2021 +0100 usb: chipidea: tegra: fix flexible_array.cocci warnings Zero-length and one-element arrays are deprecated, see Documentation/process/deprecated.rst Flexible-array members should be used instead. Generated by: scripts/coccinelle/misc/flexible_array.cocci Fixes: fc53d5279094 ("usb: chipidea: tegra: Support host mode") CC: Peter Geis Reported-by: kernel test robot Reviewed-by: Dmitry Osipenko Signed-off-by: kernel test robot Signed-off-by: Julia Lawall Link: https://lore.kernel.org/r/alpine.DEB.2.22.394.2102132108040.2720@hadrien Signed-off-by: Greg Kroah-Hartman commit 292f750f43d06ea269323b5a6e40aab10e033162 Author: Colin Ian King Date: Wed Feb 17 21:01:24 2021 +0000 USB: gadget: dummy-hcd: remove redundant initialization of variable 'value' The variable 'value' is being initialized with 1 that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Signed-off-by: Colin Ian King Addresses-Coverity: ("Unused value") Link: https://lore.kernel.org/r/20210217210124.197780-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman commit 9c174b57c98e78310a15cf9808cf417fa4a65d9b Author: Greg Kroah-Hartman Date: Tue Feb 16 11:14:32 2021 +0100 USB: core: no need to save usb_devices_root There is no need to save the usb_devices debugfs file as we only need it when removing it, so have the debugfs code look it up when it is needed instead, saving the storage. Link: https://lore.kernel.org/r/YCubCA/trHAF7PtF@kroah.com Signed-off-by: Greg Kroah-Hartman commit 70be046404efd82ab75595a4fb73cb751e2e1372 Author: Chen Lin Date: Mon Feb 15 18:15:30 2021 +0800 usb: gadget: storage: Remove unused function pointer typedef fsg_routine_t Remove the 'fsg_routine_t' typedef as it is not used. Signed-off-by: Chen Lin Link: https://lore.kernel.org/r/1613384130-3028-1-git-send-email-chen45464546@163.com Signed-off-by: Greg Kroah-Hartman commit e21a2e0a0f6021cfc9239ec94e883bd119c330ef Author: Wei Ming Chen Date: Sun Feb 14 20:19:29 2021 +0800 usb: gadget: function: fix typo in f_printer.c In line 824, it is trying to enable `out_ep`, so I believe that in line 826, it should print `out_ep` instead of `in_ep`. Signed-off-by: Wei Ming Chen Link: https://lore.kernel.org/r/20210214121929.9750-1-jj251510319013@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3287f58bcba6c6fa6167624b443a668782fac26d Author: Badhri Jagan Sridharan Date: Thu Feb 25 02:11:04 2021 -0800 usb: typec: tcpm: Wait for vbus discharge to VSAFE0V before toggling When vbus auto discharge is enabled, TCPM can sometimes be faster than the TCPC i.e. TCPM can go ahead and move the port to unattached state (involves disabling vbus auto discharge) before TCPC could effectively discharge vbus to VSAFE0V. This leaves vbus with residual charge and increases the decay time which prevents tsafe0v from being met. This change makes TCPM waits for a maximum of tSafe0V(max) for vbus to discharge to VSAFE0V before transitioning to unattached state and re-enable toggling. If vbus discharges to vsafe0v sooner, then, transition to unattached state happens right away. Also, while in SNK_READY, when auto discharge is enabled, drive disconnect based on vbus turning off instead of Rp disappearing on CC pins. Rp disappearing on CC pins is almost instanteous compared to vbus decay. Sink detach: [ 541.703058] CC1: 3 -> 0, CC2: 0 -> 0 [state SNK_READY, polarity 0, disconnected] [ 541.703331] Setting voltage/current limit 5000 mV 0 mA [ 541.727235] VBUS on [ 541.749650] VBUS off [ 541.749653] pending state change SNK_READY -> SNK_UNATTACHED @ 650 ms [rev3 NONE_AMS] [ 541.749944] VBUS VSAFE0V [ 541.749945] state change SNK_READY -> SNK_UNATTACHED [rev3 NONE_AMS] [ 541.750806] Disable vbus discharge ret:0 [ 541.907345] Start toggling [ 541.922799] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, disconnected] Source detach: [ 2555.310414] state change SRC_SEND_CAPABILITIES -> SRC_READY [rev3 POWER_NEGOTIATION] [ 2555.310675] AMS POWER_NEGOTIATION finished [ 2555.310679] cc:=3 [ 2593.645886] CC1: 0 -> 0, CC2: 2 -> 0 [state SRC_READY, polarity 1, disconnected] [ 2593.645919] pending state change SRC_READY -> SNK_UNATTACHED @ 650 ms [rev3 NONE_AMS] [ 2593.648419] VBUS off [ 2593.648960] VBUS VSAFE0V [ 2593.648965] state change SRC_READY -> SNK_UNATTACHED [rev3 NONE_AMS] [ 2593.649962] Disable vbus discharge ret:0 [ 2593.890322] Start toggling [ 2593.925663] CC1: 0 -> 0, CC2: 0 -> 0 [state TOGGLING, polarity 0, Fixes: f321a02caebd ("usb: typec: tcpm: Implement enabling Auto Discharge disconnect support") Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus Signed-off-by: Badhri Jagan Sridharan Link: https://lore.kernel.org/r/20210225101104.1680697-1-badhri@google.com Signed-off-by: Greg Kroah-Hartman commit ced0e777e6ff48d821ecdc56d42b0c98795d895a Author: Guido Günther Date: Mon Feb 15 12:46:45 2021 +0100 usb: typec: tps6598x: Add trace event for data status This is useful to debug DP negotiation and pin assignment even when the firmware does all the work. Reviewed-by: Heikki Krogerus Signed-off-by: Guido Günther Link: https://lore.kernel.org/r/1125497fb83eac13fa1ee532759b91ce03770572.1613389531.git.agx@sigxcpu.org Signed-off-by: Greg Kroah-Hartman commit 9c9c1ddbf6332f625fa82b7b28d1a93c17c3e4c5 Author: Guido Günther Date: Mon Feb 15 12:46:44 2021 +0100 usb: typec: tps6598x: Add trace event for power status register Together with the PD status register this is vital for debugging power negotiations at runtime. Reviewed-by: Heikki Krogerus Signed-off-by: Guido Günther Link: https://lore.kernel.org/r/3c92da489fa03d6fe67ac18443c48dccb1bf048a.1613389531.git.agx@sigxcpu.org Signed-off-by: Greg Kroah-Hartman commit 02a9ada7eb8830523d5feea4509f413cf8d0e333 Author: Guido Günther Date: Mon Feb 15 12:46:43 2021 +0100 usb: typec: tps6598x: Add trace event for status register This allows to trace status information which helps to debug problems with role switching, etc. We don't use the generic FIELD_GET() to reduce the macro size since we otherwise trip up sparse. Reviewed-by: Heikki Krogerus Signed-off-by: Guido Günther Link: https://lore.kernel.org/r/d24742be3c98382cbef17047f3eecf0f7d807f31.1613389531.git.agx@sigxcpu.org Signed-off-by: Greg Kroah-Hartman commit 95cd85a9d493c34e70e97736f859316d52c7bd61 Author: Guido Günther Date: Mon Feb 15 12:46:42 2021 +0100 usb: typec: tps6598x: Add trace event for IRQ events Allow to get irq event information via the tracing framework. This allows to inspect USB-C negotiation at runtime. Reviewed-by: Heikki Krogerus Signed-off-by: Guido Günther Link: https://lore.kernel.org/r/11444ae487d69da98ec20a18f2e49259e68319e3.1613389531.git.agx@sigxcpu.org Signed-off-by: Greg Kroah-Hartman commit 99288de36020c5a6976df77e53ac449b0f75c97f Author: Ray Chi Date: Mon Feb 22 19:51:49 2021 +0800 usb: dwc3: add an alternate path in vbus_draw callback This patch adds an alternate path in vbus_draw callback through power supply property POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT. Signed-off-by: Ray Chi Link: https://lore.kernel.org/r/20210222115149.3606776-3-raychi@google.com Signed-off-by: Greg Kroah-Hartman commit 6f0764b5adea18d70c3fab32d5f940678bcbd865 Author: Ray Chi Date: Mon Feb 22 19:51:48 2021 +0800 usb: dwc3: add a power supply for current control Currently, VBUS draw callback does no action when the generic PHYs are used. This patch adds an additional path to control charging current through power supply interface. Signed-off-by: Ray Chi Link: https://lore.kernel.org/r/20210222115149.3606776-2-raychi@google.com Signed-off-by: Greg Kroah-Hartman commit 3d82be8be6fdf38543fa3ae9c35beda4a8a8d067 Author: Erwan Le Ray Date: Thu Mar 4 17:23:08 2021 +0100 serial: stm32: add support for "flush_buffer" ops Add the support for "flush_buffer" ops in order to flush any write buffers, reset any DMA state and stop any ongoing DMA transfers when the port->state->xmit circular buffer is cleared. Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-14-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 3db1d52466dc11dca4e47ef12a6e6e97f846af62 Author: Erwan Le Ray Date: Thu Mar 4 17:23:07 2021 +0100 serial: stm32: fix tx_empty condition In "tx_empty", we should poll TC bit in both DMA and PIO modes (instead of TXE) to check transmission data register has been transmitted independently of the FIFO mode. TC indicates that both transmit register and shift register are empty. When shift register is empty, tx_empty should return TIOCSER_TEMT instead of TC value. Cleans the USART_CR_TC TCCF register define (transmission complete clear flag) as it is duplicate of USART_ICR_TCCF. Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-13-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 9f77d19207a0e8ba814c8ceb22e90ce7cb2aef64 Author: Erwan Le Ray Date: Thu Mar 4 17:23:06 2021 +0100 serial: stm32: add FIFO flush when port is closed Transmission complete error is sent when ISR_TC is not set. If port closure is requested despite data in TDR / TX FIFO has not been sent (because of flow control), ISR_TC is not set and error message is sent on port closure but also when a new port is opened. Flush the data when port is closed, so the error isn't printed twice upon next port opening. Fixes: 64c32eab6603 ("serial: stm32: Add support of TC bit status check") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-12-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 315e2d8a125ad77a1bc28f621162713f3e7aef48 Author: Erwan Le Ray Date: Thu Mar 4 17:23:05 2021 +0100 serial: stm32: fix FIFO flush in startup and set_termios Fifo flush set USART_RQR register by calling stm32_usart_set_bits routine (Read/Modify/Write). USART_RQR register is a write only register. So, read before write isn't correct / relevant to flush the FIFOs. Replace stm32_usart_set_bits call by writel_relaxed. Fixes: 84872dc448fe ("serial: stm32: add RX and TX FIFO flush") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-11-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit f16b90c2d9db3e6ac719d1946b9d335ca4ab33f3 Author: Erwan Le Ray Date: Thu Mar 4 17:23:04 2021 +0100 serial: stm32: call stm32_transmit_chars locked stm32_transmit_chars should be called under lock also in tx DMA callback. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20210304162308.8984-10-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 71b25f4df9849799d84d9345c636aac097316052 Author: Krzysztof Kozlowski Date: Fri Feb 12 17:39:04 2021 +0100 dt-bindings: serial: samsung: add DMA properties The Samsung SoC UART nodes have usually DMA so dtschema has to reflect this to fix dtbs_check warnings like: arch/arm/boot/dts/exynos4210-smdkv310.dt.yaml: serial@13800000: 'dma-names', 'dmas' do not match any of the regexes: 'pinctrl-[0-9]+' Signed-off-by: Krzysztof Kozlowski Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210212163905.70171-1-krzk@kernel.org Signed-off-by: Greg Kroah-Hartman commit fb4f2e04ac13e7c400e6b86afbbd314a5a2a7e8d Author: Erwan Le Ray Date: Thu Mar 4 17:23:03 2021 +0100 serial: stm32: fix tx dma completion, release channel This patch add a proper release of dma channels when completing dma tx. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-9-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit cebeddd6d0d9f839b9df2930b6a768b54913a763 Author: Wei Yongjun Date: Fri Mar 5 03:49:29 2021 +0000 serial: liteuart: fix return value check in liteuart_probe() In case of error, the function devm_platform_get_and_ioremap_resource() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Fixes: 1da81e5562fa ("drivers/tty/serial: add LiteUART driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20210305034929.3234352-1-weiyongjun1@huawei.com Signed-off-by: Greg Kroah-Hartman commit 436c97936001776f16153771ee887f125443e974 Author: Erwan Le Ray Date: Thu Mar 4 17:23:02 2021 +0100 serial: stm32: fix a deadlock in set_termios CTS/RTS GPIOs support that has been added recently to STM32 UART driver has introduced scheduled code in a set_termios part protected by a spin lock. This generates a potential deadlock scenario: Chain exists of: &irq_desc_lock_class --> console_owner --> &port_lock_key Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&port_lock_key); lock(console_owner); lock(&port_lock_key); lock(&irq_desc_lock_class); *** DEADLOCK *** 4 locks held by stty/766: Move the scheduled code after the spinlock. Fixes: 6cf61b9bd7cc ("tty: serial: Add modem control gpio support for STM32 UART") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-8-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 81171e7d31a63e0e7f5c83701f097695e60a12db Author: Heikki Krogerus Date: Thu Mar 4 11:13:11 2021 +0300 serial: 8250_exar: Constify the software nodes Software node is always created for additional device properties. If the properties are constant, the software node can also be constant. Reviewed-by: Andy Shevchenko Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210304081311.17340-1-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman commit 12761869f0efa524348e2ae31827fd52eebf3f0d Author: Erwan Le Ray Date: Thu Mar 4 17:23:01 2021 +0100 serial: stm32: fix wake-up flag handling This patch fixes several issue with wake-up handling: - the WUF irq is handled several times at wake-up - the USART is disabled / enabled at suspend to set wake-up flag. It can cause glitches during RX. This patch fix those issues: - clear wake-up flag and disable wake-up irq in WUF irq handling - enable wake-up from low power on start bit detection at port configuration - Unmask the wake-up flag irq at suspend and mask it at resume In addition, pm_wakeup_event handling is moved from receice_chars to WUF irq handling. Fixes: 270e5a74fe4c ("serial: stm32: add wakeup mechanism") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-7-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit b89cfc05a275404bcfec83e2bdf8aea9a6c6e4bb Author: Hector Martin Date: Fri Mar 5 06:39:00 2021 +0900 tty: serial: samsung_tty: Add earlycon support for Apple UARTs Earlycon support is identical to S3C2410, but Apple SoCs also need MMIO mapped as nGnRnE. This is handled generically for normal drivers including the normal UART path here, but earlycon uses fixmap and runs before that scaffolding is ready. Since this is the only case where we need this fix, it makes more sense to do it here in the UART driver instead of introducing a whole fdt nonposted-mmio resolver just for earlycon/fixmap. Suggested-by: Arnd Bergmann Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210304213902.83903-26-marcan@marcan.st Signed-off-by: Greg Kroah-Hartman commit ad7676812437a00a4c6be155fc17926069f99084 Author: Erwan Le Ray Date: Thu Mar 4 17:23:00 2021 +0100 serial: stm32: fix a deadlock condition with wakeup event Deadlock issue is seen when enabling CONFIG_PROVE_LOCKING=Y, and uart console as wakeup source. Deadlock occurs when resuming from low power mode if system is waked up via usart console. The deadlock is triggered 100% when also disabling console suspend prior to go to suspend. Simplified call stack, deadlock condition: - stm32_console_write <-- spin_lock already held - print_circular_bug - pm_wakeup_dev_event <-- triggers lockdep as seen above - stm32_receive_chars - stm32_interrupt <-- wakeup via uart console, takes the lock So, revisit spin_lock in stm32-usart driver: - there is no need to hold the lock to access ICR (atomic clear of status flags) - only hold the lock inside stm32_receive_chars() routine (no need to call pm_wakeup_dev_event with lock held) - keep stm32_transmit_chars() routine called with lock held Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver") Signed-off-by: Erwan Le Ray Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20210304162308.8984-6-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit fcbba344907afe26da487f1ed0b0e285c06a547b Author: Hector Martin Date: Fri Mar 5 06:38:59 2021 +0900 tty: serial: samsung_tty: Add support for Apple UARTs Apple SoCs are a distant descendant of Samsung designs and use yet another variant of their UART style, with different interrupt handling. In particular, this variant has the following differences with existing ones: * It includes a built-in interrupt controller with different registers, using only a single platform IRQ * Internal interrupt sources are treated as edge-triggered, even though the IRQ output is level-triggered. This chiefly affects the TX IRQ path: the driver can no longer rely on the TX buffer empty IRQ immediately firing after TX is enabled, but instead must prime the FIFO with data directly. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210304213902.83903-25-marcan@marcan.st Signed-off-by: Greg Kroah-Hartman commit 25a8e7611da5513b388165661b17173c26e12c04 Author: Erwan Le Ray Date: Thu Mar 4 17:22:59 2021 +0100 serial: stm32: fix TX and RX FIFO thresholds TX and RX FIFO thresholds may be cleared after suspend/resume, depending on the low power mode. Those configurations (done in startup) are not effective for UART console, as: - the reference manual indicates that FIFOEN bit can only be written when the USART is disabled (UE=0) - a set_termios (where UE is set) is requested firstly for console enabling, before the startup. Fixes: 84872dc448fe ("serial: stm32: add RX and TX FIFO flush") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-5-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit b8466833391ed3362c1195aa0373198bdeddf881 Author: Hector Martin Date: Fri Mar 5 06:38:58 2021 +0900 dt-bindings: serial: samsung: Add apple,s5l-uart compatible Apple mobile devices originally used Samsung SoCs (starting with the S5L8900), and their current in-house SoCs continue to use compatible UART peripherals. We'll call this UART variant apple,s5l-uart. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20210304213902.83903-24-marcan@marcan.st Signed-off-by: Greg Kroah-Hartman commit f264c6f6aece81a9f8fbdf912b20bd3feb476a7a Author: Erwan Le Ray Date: Thu Mar 4 17:22:58 2021 +0100 serial: stm32: fix incorrect characters on console Incorrect characters are observed on console during boot. This issue occurs when init/main.c is modifying termios settings to open /dev/console on the rootfs. This patch adds a waiting loop in set_termios to wait for TX shift register empty (and TX FIFO if any) before stopping serial port. Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-4-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit 0906db90c722c9fa3d41e69c02ee962b8304da21 Author: Hector Martin Date: Fri Mar 5 06:38:57 2021 +0900 tty: serial: samsung_tty: Use devm_ioremap_resource This picks up the non-posted I/O mode needed for Apple platforms to work properly. This removes the request/release functions, which are no longer necessary, since devm_ioremap_resource takes care of that already. Most other drivers already do it this way, anyway. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210304213902.83903-23-marcan@marcan.st Signed-off-by: Greg Kroah-Hartman commit f4518a8a75f5be1a121b0c95ad9c6b1eb27d920e Author: Erwan Le Ray Date: Thu Mar 4 17:22:57 2021 +0100 serial: stm32: fix startup by enabling usart for reception RX is configured, but usart is not enabled in startup function. Kernel documentation specifies that startup should enable the port for reception. Fix the startup by enabling usart for reception. Fixes: 84872dc448fe ("serial: stm32: add RX and TX FIFO flush") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-3-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit ad5613b98a48e71a13fdb945593c7e485ed49b55 Author: Hector Martin Date: Fri Mar 5 06:38:56 2021 +0900 tty: serial: samsung_tty: IRQ rework * Split out s3c24xx_serial_tx_chars from s3c24xx_serial_tx_irq, where only the latter acquires the port lock. This will be necessary on platforms which have edge-triggered IRQs, as we need to call s3c24xx_serial_tx_chars to kick off transmission from outside IRQ context, with the port lock held. * Rename s3c24xx_serial_rx_chars to s3c24xx_serial_rx_irq for consistency with the above. All it does now is call two other functions anyway. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210304213902.83903-22-marcan@marcan.st Signed-off-by: Greg Kroah-Hartman commit 87fd0741d6dcf63ebdb14050c2b921ae14c7f307 Author: Erwan Le Ray Date: Thu Mar 4 17:22:56 2021 +0100 serial: stm32: fix probe and remove order for dma The probe and remove orders are wrong as the uart_port is registered before saving device data in the probe, and unregistered after DMA resource deallocation in the remove. uart_port registering should be done at the end of probe and unregistering should be done at the begin of remove to avoid resource allocation issues. Fix probe and remove orders. This enforce resource allocation occur at proper time. Terminate both DMA rx and tx transfers before removing device. Move pm_runtime after uart_remove_one_port() call in remove() to keep the probe error path. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray Link: https://lore.kernel.org/r/20210304162308.8984-2-erwan.leray@foss.st.com Signed-off-by: Greg Kroah-Hartman commit aaf144059ba474229b6475866ec8cf16a5780871 Author: Hector Martin Date: Fri Mar 5 06:38:55 2021 +0900 tty: serial: samsung_tty: Add s3c24xx_port_type This decouples the TTY layer PORT_ types, which are exposed to userspace, from the driver-internal flag of what kind of port this is. This removes s3c24xx_serial_has_interrupt_mask, which was just checking for a specific type anyway. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210304213902.83903-21-marcan@marcan.st Signed-off-by: Greg Kroah-Hartman commit 646891638301dad90e4dab9bc23e939575ad8012 Author: Hector Martin Date: Fri Mar 5 06:38:53 2021 +0900 tty: serial: samsung_tty: Separate S3C64XX ops structure Instead of patching a single global ops structure depending on the port type, use a separate s3c64xx_serial_ops for the S3C64XX type. This allows us to mark the structures as const. Also split out s3c64xx_serial_shutdown into a separate function now that we have a separate ops structure; this avoids excessive branching control flow and mirrors s3c64xx_serial_startup. tx_claimed and rx_claimed are only used in the S3C24XX functions. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210304213902.83903-19-marcan@marcan.st Signed-off-by: Greg Kroah-Hartman commit 19d48787e31563b57f4f5549e926fbee46b394da Author: Hector Martin Date: Fri Mar 5 06:38:54 2021 +0900 tty: serial: samsung_tty: Add ucon_mask parameter This simplifies the code by removing the only distinction between the S3C2410 and S3C2440 codepaths. Signed-off-by: Hector Martin Reviewed-by: Krzysztof Kozlowski Tested-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210304213902.83903-20-marcan@marcan.st Signed-off-by: Greg Kroah-Hartman commit 196ebe5c000afbfe67b8561f716e365174552bd7 Author: Julian Braha Date: Wed Feb 24 23:42:48 2021 -0500 drivers: tty: serial: IMX_EARLYCON: fix Kconfig dependency on SERIAL_CORE When SERIAL_IMX_EARLYCON is enabled, and SERIAL_CORE is disabled, Kbuild gives the following warning: WARNING: unmet direct dependencies detected for SERIAL_EARLYCON Depends on [n]: TTY [=y] && HAS_IOMEM [=y] && SERIAL_CORE [=n] Selected by [y]: - SERIAL_IMX_EARLYCON [=y] && TTY [=y] && HAS_IOMEM [=y] && (ARCH_MXC [=y] || COMPILE_TEST [=n]) && OF [=y] This is because SERIAL_IMX_EARLYCON selects SERIAL_EARLYCON, without selecting SERIAL_CORE, despite that config option depending on SERIAL_CORE. Signed-off-by: Julian Braha Link: https://lore.kernel.org/r/20210225044248.4745-1-julianbraha@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6bfbfcfc58005ee12d37b56a5e722618ef6bee8f Author: Jiri Slaby Date: Tue Mar 2 07:22:14 2021 +0100 tty: make everyone's write_room return >= 0 The tty line disciplines don't expect tty_operations::write_room to return negative values. Fix the five drivers which violate this. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-44-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 10eb63e5a9b243181f0e87033875f94f3698afda Author: Jiri Slaby Date: Tue Mar 2 07:22:13 2021 +0100 tty: make everyone's chars_in_buffer return >= 0 The tty line disciplines don't expect tty_operations::chars_in_buffer to return negative values. Fix the two drivers which violate this. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-43-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ab78b0c9fa9dfc02f823aac9f8174d4ee0585057 Author: Jiri Slaby Date: Tue Mar 2 07:22:12 2021 +0100 tty: cleanup tty_chars_in_buffer There is no need for 'else' when the 'if' part already returned. This makes tty_chars_in_buffer similar to tty_write_room too. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-42-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b93db97e1ca08e500305bc46b08c72e2232c4be1 Author: Jiri Slaby Date: Tue Mar 2 07:22:11 2021 +0100 tty: n_gsm, remove duplicates of parameters dp, f, and i are only duplicates of gsmld_receive_buf's parameters. Use the parameters directly (cp, fp, and count) and delete these local variables. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-41-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9d7fd54f2a2e1f4f7248fd4bc9e1e223c1cc54cc Author: Jiri Slaby Date: Tue Mar 2 07:22:10 2021 +0100 tty: hvc, drop unneeded forward declarations Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use. Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Tyrel Datwyler Acked-by: Uwe Kleine-König Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-40-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit b9b90fe655c0bd816847ac1bcbf179cfa2981ecb Author: Jiri Slaby Date: Tue Mar 2 07:22:09 2021 +0100 tty: synclink_gt, drop unneeded forward declarations Forward declarations make the code larger and rewrites harder. Harder as they are often omitted from global changes. Remove forward declarations which are not really needed, i.e. the definition of the function is before its first use. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-39-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a846dcf9d7295dd45493002fdde081f1667a85d3 Author: Jiri Slaby Date: Tue Mar 2 07:22:06 2021 +0100 tty: localise ptychar and make it const ptychar was not const, so mark it as such. And move this variable to the only place where it's used. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-36-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a872ab4d6d191cca1ce84b945e394bd6a8d84dd9 Author: Jiri Slaby Date: Tue Mar 2 07:22:05 2021 +0100 tty: let tty_unregister_driver return void Now that noone checks the return value, switch the return type of tty_unregister_driver to void. We can do that as we always return zero. Generally, drivers are not allowed to call tty_unregister_driver while there are open devices. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-35-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 6c2e6317c975c3cef1e08482a6ed8b734831ffbe Author: Jiri Slaby Date: Tue Mar 2 07:22:04 2021 +0100 tty: do not check tty_unregister_driver's return value These drivers check tty_unregister_driver return value. But they don't handle a failure correctly (they free the driver in any case). So stop checking tty_unregister_driver return value and remove also the prints. In the next patch, tty_unregister_driver's return type will be switched to void. Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Cc: Jiri Kosina Cc: David Sterba Reviewed-by: Max Filippov Acked-by: David Sterba Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-34-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ba444ea3bc9377c0445990da1ce7d5eb33b099d8 Author: Jiri Slaby Date: Tue Mar 2 07:22:03 2021 +0100 tty: xtensa/iss, make rs_init static To fix the warning: warning: no previous prototype for 'rs_init' Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-33-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 5a1a8425c4436b7a7596a0cce7857bc058c6c360 Author: Jiri Slaby Date: Tue Mar 2 07:22:02 2021 +0100 tty: xtensa/iss, setup the timer statically Use DEFINE_TIMER and avoid runtime initialization of the serial_timer. Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-32-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit bd5b219425692f4a353d07f5b182e9c71bbcffc2 Author: Jiri Slaby Date: Tue Mar 2 07:22:01 2021 +0100 tty: xtensa/iss, remove stale comments These are likely taken over from amiserial. iss doesn't do anything of that. Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-31-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0894b13467a2771bd282e280cd5cc7049285c4e7 Author: Jiri Slaby Date: Tue Mar 2 07:22:00 2021 +0100 tty: xtensa/iss, don't reassign to tty->port We already do tty_port_link_device in rs_init, so we don't need to reassign a port to tty->port. It would be too late in tty::ops::open anyway. Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-30-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit a32c97fd42639648707a7e0fe7abeb1f6954b27e Author: Jiri Slaby Date: Tue Mar 2 07:21:59 2021 +0100 tty: xtensa/iss, drop serial_version & serial_name There is no need to print the information during module load. Neither to print some artificial version. So drop these strings and a print. Cc: Chris Zankel Cc: Max Filippov Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-29-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 5c58097eeb9a4bc67a81dfcd95e328e59f3f0ae1 Author: Jiri Slaby Date: Tue Mar 2 07:21:58 2021 +0100 tty: vcc, remove useless tty checks All these functions are called with a valid tty pointer, no need to check that. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-28-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9af6f74d671ef3e5d3062511f229287e9f844b36 Author: Jiri Slaby Date: Tue Mar 2 07:21:57 2021 +0100 tty: vcc, use name strings directly Do not define global variables for driver/device names, use the strings directly. Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-27-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7330019160757744706cd559da935fae193058e5 Author: Jiri Slaby Date: Tue Mar 2 07:21:56 2021 +0100 tty: vcc, drop version dump The version number is artificial, no need to dump it to logs during initialization. Cc: "David S. Miller" Cc: Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-26-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4c472fc02e2a0f4c4e9a1c69f4b63c36df150e40 Author: Jiri Slaby Date: Tue Mar 2 07:21:55 2021 +0100 tty: vcc, make globals static These are used only in this unit, so make them static. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-25-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 0da4c58df1ce79daaae317ed9f4fe962b53de3a6 Author: Jiri Slaby Date: Tue Mar 2 07:21:54 2021 +0100 tty: nozomi, remove useless debug prints These are either commented out or can be printed by tracing mechanisms. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-24-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 83e826bf8f4ffd7d3370822d47c0c62732ee5402 Author: Jiri Slaby Date: Tue Mar 2 07:21:53 2021 +0100 tty: nozomi, remove init/exit messages Remove useless prints from init and exit functions. The version is artificial anyway. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-23-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit d01a83590b7d8c647337fb641b5bf09a0a8b0da2 Author: Jiri Slaby Date: Tue Mar 2 07:21:52 2021 +0100 tty: nozomi, remove struct buffer It is unused. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-22-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit df11abeb2e6007c11c611f66ae564ab52775fb24 Author: Jiri Slaby Date: Tue Mar 2 07:21:51 2021 +0100 tty: jsm_tty, make char+error handling readable The code for char+error handling in jsm_input was complete mess of letters. Introduce 3 new local variables and use them with care. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-21-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 2daedb1d1e453da14819d13e11bcd33b8cf85fa9 Author: Jiri Slaby Date: Tue Mar 2 07:21:50 2021 +0100 tty: con3215, remove tty->driver_data casts Casts of 'void *' pointer are superfluous. So remove them. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux390@de.ibm.com Cc: linux-s390@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-20-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 56e9d0f95ad0118750b67af8fbf2920a6f930faf Author: Jiri Slaby Date: Tue Mar 2 07:21:49 2021 +0100 tty: con3215, remove unneeded tty checks There is no need to check tty in these functions as it's always non-NULL. So remove the tests. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux390@de.ibm.com Cc: linux-s390@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-19-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 51f62a311c6d34b9529448271bb34e705cc5868f Author: Jiri Slaby Date: Tue Mar 2 07:21:48 2021 +0100 tty: con3215, remove tasklet for tty_wakeup tty_wakeup is safe to be called from all contexts. No need to schedule a tasklet for that. Let us call it directly like in other drivers. And delete the tasklet completely. Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: linux390@de.ibm.com Cc: linux-s390@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-18-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 11771e0bf13c9fefc31481a4ebc9271b4d495892 Author: Jiri Slaby Date: Tue Mar 2 07:21:47 2021 +0100 net: nfc: nci: drop nci_uart_default_recv nci_uart_register returns -EINVAL immediately when nu->ops.recv is not set. So the same 'if' later never triggers so nci_uart_default_recv is never used. Drop it. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-17-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit c2a5a45c0276a2e183250f35f1db0a032ba00459 Author: Jiri Slaby Date: Tue Mar 2 07:21:46 2021 +0100 net: nfc: nci: drop nci_uart_ops::recv_buf There is noone setting nci_uart_ops::recv_buf, so the default one (nci_uart_default_recv_buf) is always used. So drop this hook, move nci_uart_default_recv_buf before the use in nci_uart_tty_receive and remove unused parameter flags. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-16-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 9f3698e97df00dd5af8275a9433a7036be9388e9 Author: Jiri Slaby Date: Tue Mar 2 07:21:45 2021 +0100 net: nfc: nci: remove memset of nci_uart_drivers nci_uart_drivers is a global definition, so there is no need to initialize its memory to zero during module load. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-15-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 8ff694972fe4ba0d25396d8dee8f1c8894538aa3 Author: Jiri Slaby Date: Tue Mar 2 07:21:44 2021 +0100 net: caif: inline register_ldisc register_ldisc only calls tty_register_ldisc. Inline register_ldisc into the only caller of register_ldisc, i.e. caif_ser_init. Now, caif_ser_init is symmetric to caif_ser_exit in this regard. Cc: "David S. Miller" Cc: Jakub Kicinski Cc: netdev@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-14-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7a9ca6329807122b53955673ef453423d3e1a3ab Author: Jiri Slaby Date: Tue Mar 2 07:21:43 2021 +0100 tty: 8250/serial_cs, propagate errors in simple_config The caller expects from the others (pfc_config and multi_config) to return standard error values. So do the same for simple_config too. We invert the if condition to handle the error case. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-13-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 7e3d3c08f17cf082dbfc86386a2e327ccb080c16 Author: Jiri Slaby Date: Tue Mar 2 07:21:42 2021 +0100 tty: 8250, cleanup em485 timers Initialize the variables directly by initializers in definitions. This is expected/usual for these kind of callback. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-12-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 60294d86f27c9d075ca9b700b7786cef706546b5 Author: Jiri Slaby Date: Tue Mar 2 07:21:41 2021 +0100 tty: 8250, use ms_to_ktime This really eliminates multiplications from the assembly. I would have thought they are optimized by inlining ktime_set, but not on x86_64 with gcc 10. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-11-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit f751ae1cbbf955d56162be85221c1f97c53a0683 Author: Jiri Slaby Date: Tue Mar 2 07:21:40 2021 +0100 tty: imx, use ms_to_ktime This really eliminates multiplications from the assembly. I would have thought they are optimized by inlining ktime_set, but not on x86_64 with gcc 10. Cc: Shawn Guo Cc: Sascha Hauer Cc: Pengutronix Kernel Team Cc: Fabio Estevam Cc: NXP Linux Team Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-10-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 5e30d3bf51ebb17f27bf66ae367cb0550857507a Author: Jiri Slaby Date: Tue Mar 2 07:21:39 2021 +0100 tty: n_tty, set tty_ldisc_ops::owner Set tty_ldisc_ops::owner to THIS_MODULE. This has no effect currently as n_tty cannot be built as a module. If someone ever tries to modularize tty, we wouldn't manage module's reference count as in other ldiscs. So fix this just in case. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-9-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 981b22b8777df7de070be1803f6d7ed4f634a43c Author: Jiri Slaby Date: Tue Mar 2 07:21:38 2021 +0100 tty: remove TTY_LDISC_MAGIC First, it is never checked. Second, use of it as a debugging aid is at least questionable. With the current tools, I don't think anyone used this kind of thing for debugging purposes for years. On the top of that, e.g. serdev does not set this field of tty_ldisc_ops at all. So get rid of this legacy. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-8-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 3b00b6af7a5bd7fd7e5189ccaad0e0cfb7dc7785 Author: Jiri Slaby Date: Tue Mar 2 07:21:37 2021 +0100 tty: rocket, remove the driver While the driver is still marked as maintained in MAINTAINERS, Comtrol does not really care about this ancient driver. They are still manufacturing serial devices, but those are controlled only by out-of-tree drivers. Comtrol didn't answer my pings, so this driver is apparently unmaintained. Aside from that, the driver was untouched for years, only whole-tree changes happened during the past years. The driver needs much more care, so drop it for now. If someone steps up to reintroduce it, they need to clean it up first. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-7-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 67b1544a55c94b62f68488d5fcbc93cca293dc32 Author: Jiri Slaby Date: Tue Mar 2 07:21:36 2021 +0100 tty: isicom, remove this orphan The Isicom driver was orphaned by commit d86b3001a1a6 (MAINTAINERS: orphan isicom) 10 years ago. Noone stepped up to take care of them and to fix all the issues the driver has. So it's time to drop the driver with all its traces. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-6-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit f76edd8f7ce06cdff2fe5b6b39a49644c684a161 Author: Jiri Slaby Date: Tue Mar 2 07:21:35 2021 +0100 tty: cyclades, remove this orphan The Cyclades driver was orphaned by commit d459883e6c54 (MAINTAINERS: remove two dead e-mail) 13 years ago. Noone stepped up to take care of them and to fix all the issues the driver has. On the top of that, there is no way to obtain the firmware for Z cards from the vendor as cyclades.com ceased to exist. So it's time to drop the driver with all its traces. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-5-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 5a3c96e964097d5a16b360e69bdd93ba6e26d7cd Author: Jiri Slaby Date: Tue Mar 2 07:21:34 2021 +0100 vgacon: comment on vga_rolled_over Long time ago, I figured out what this number is good for and documented that locally. But never submitted, so do it now. Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-4-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 00025161b2d931f97d72418114abf73bfb51ae4c Author: Jiri Slaby Date: Tue Mar 2 07:21:33 2021 +0100 PCI: remove synclink entries from pci_ids The drivers were removed in a1f714b44e34 (tty: Remove redundant synclink driver) and 3d608a591b2b (tty: Remove redundant synclinkmp driver). So remove also the PCI ID entries. Cc: Bjorn Helgaas Cc: linux-pci@vger.kernel.org Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-3-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit ae6acf479be131fcd8523f655b416b7be66b68b2 Author: Jiri Slaby Date: Tue Mar 2 07:21:32 2021 +0100 MAINTAINERS: drop cyclades.com reference cyclades.com is a dead domain. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-2-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 078b23267d5f08f827fbaf9f2247226520c00dc1 Author: Jiri Slaby Date: Tue Mar 2 07:21:31 2021 +0100 MAINTAINERS: orphan mxser I cannot maintain this driver for years due to missing HW. Let's orphan the entry in MAINTAINERS. And likely drop the driver later as these devices are likely gone from this world. Mxser provides different (out-of-tree) drivers for their current devices. Signed-off-by: Jiri Slaby Link: https://lore.kernel.org/r/20210302062214.29627-1-jslaby@suse.cz Signed-off-by: Greg Kroah-Hartman commit 4dec5f1af694526db760dfbb47211236e556e27c Author: Greg Kroah-Hartman Date: Tue Feb 16 15:59:00 2021 +0100 tty: serial: pch_uart.c: remove debugfs dentry pointer No need to keep around the dentry pointer for the debugfs file if all it is used for is to remove it when we are wanting to clean up, as the pointer can be looked up directly from debugfs instead. This also removes pointless #ifdef CONFIG_DEBUG_FS brackets as the compiler is smart enough to handle this properly if debugfs is disabled without us having to worry about it. Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Link: https://lore.kernel.org/r/20210216145900.3835160-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit c972c2d821ca3eda001a20dbe2ca0b4718838caf Author: Klemen Košir Date: Wed Mar 3 18:01:34 2021 +0900 staging: unisys: visornic: Fix repeated words in comments This patch removes some repeated words in code comments. Signed-off-by: Klemen Košir Link: https://lore.kernel.org/r/20210303090134.16007-1-klemen.kosir@kream.io Signed-off-by: Greg Kroah-Hartman commit 8b20129b94b3ccca1c9394c3adef0eb940316fc7 Author: Song Chen Date: Tue Jan 12 16:25:40 2021 +0800 staging: unisys: visornic: enhance visornic to use channel_interrupt visornic uses timer to check the response queue and drain it if needed periodically. On the other hand, visorbus provides periodic work to serve such request, therefore, timer should be replaced by channel_interrupt. Signed-off-by: Song Chen Link: https://lore.kernel.org/r/1610439940-5590-1-git-send-email-chensong_2000@189.cn Signed-off-by: Greg Kroah-Hartman commit 1e37da45ce624bcd074443208b8a5b1c39dd4231 Author: Kumar Kartikeya Dwivedi Date: Sun Feb 21 21:12:59 2021 +0530 staging/greybus: eliminate use of NAME_SIZE for strings Instead, depend on the size of the destination buffer for easier refactoring. Signed-off-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/r/20210221154258.119503-1-memxor@gmail.com Signed-off-by: Greg Kroah-Hartman commit f63a044747fef2bf14dc37b74bfed2735c70350d Author: Gustavo A. R. Silva Date: Wed Mar 3 20:02:28 2021 -0600 staging: rtl8188eu: Replace one-element array with flexible-array in struct ndis_802_11_var_ie 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]. Use flexible-array member in struct ndis_802_11_var_ie, instead of one-element array. Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warning: drivers/staging/rtl8188eu/core/rtw_wlan_util.c: In function ‘HT_caps_handler’: drivers/staging/rtl8188eu/core/rtw_wlan_util.c:665:65: warning: array subscript 2 is above array bounds of ‘u8[1]’ {aka ‘unsigned char[1]’} [-Warray-bounds] 665 | if ((pmlmeinfo->HT_caps.ampdu_params_info & 0x3) > (pIE->data[i] & 0x3)) | ~~~~~~~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Signed-off-by: Gustavo A. R. Silva Link: https://lore.kernel.org/r/20210304020228.GA45139@embeddedor Signed-off-by: Greg Kroah-Hartman commit 74dbe4034b37c9df9d282459d95e4601e1bd4b18 Author: Marco Cesati Date: Fri Mar 5 11:01:46 2021 +0100 staging: HalBtc8723b1Ant: remove useless typedef's This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #24: FILE: hal/HalBtc8723b1Ant.h:24: +typedef enum _BT_INFO_SRC_8723B_1ANT { WARNING: do not add new typedefs #31: FILE: hal/HalBtc8723b1Ant.h:31: +typedef enum _BT_8723B_1ANT_BT_STATUS { WARNING: do not add new typedefs #41: FILE: hal/HalBtc8723b1Ant.h:41: +typedef enum _BT_8723B_1ANT_WIFI_STATUS { WARNING: do not add new typedefs #51: FILE: hal/HalBtc8723b1Ant.h:51: +typedef enum _BT_8723B_1ANT_COEX_ALGO { WARNING: do not add new typedefs #66: FILE: hal/HalBtc8723b1Ant.h:66: +typedef struct _COEX_DM_8723B_1ANT { WARNING: do not add new typedefs #121: FILE: hal/HalBtc8723b1Ant.h:121: +typedef struct _COEX_STA_8723B_1ANT { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210305100146.30687-1-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 8512b8ffadeb202a3a3e5b2d9621a5c2890fedce Author: Marco Cesati Date: Fri Mar 5 11:11:51 2021 +0100 staging: HalBtc8723b2Ant: remove useless typedef's This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #19: FILE: hal/HalBtc8723b2Ant.h:19: +typedef enum _BT_INFO_SRC_8723B_2ANT { WARNING: do not add new typedefs #26: FILE: hal/HalBtc8723b2Ant.h:26: +typedef enum _BT_8723B_2ANT_BT_STATUS { WARNING: do not add new typedefs #36: FILE: hal/HalBtc8723b2Ant.h:36: +typedef enum _BT_8723B_2ANT_COEX_ALGO { WARNING: do not add new typedefs #51: FILE: hal/HalBtc8723b2Ant.h:51: +typedef struct _COEX_DM_8723B_2ANT { WARNING: do not add new typedefs #104: FILE: hal/HalBtc8723b2Ant.h:104: +typedef struct _COEX_STA_8723B_2ANT { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210305101151.13137-1-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit 266f28f803a916a38a6b3953dfbafc56882c82c4 Author: Denis Efremov Date: Fri Mar 5 18:50:01 2021 +0300 staging: rtl8723bs: remove duplicate pstat->hwaddr check IS_MCAST(pstat->hwaddr) checked twice in a row in odm_RefreshRateAdaptiveMaskCE(). Remove the second check. Signed-off-by: Denis Efremov Link: https://lore.kernel.org/r/20210305155001.61951-1-efremov@linux.com Signed-off-by: Greg Kroah-Hartman commit 61842e760b0c2956aa131ca0b13fd9206632766c Author: Marco Cesati Date: Fri Mar 5 15:49:06 2021 +0100 staging: rtl8723bs: remove useless typedef's in HalPhyRf.h This commit fixes the following checkpatch.pl warnings: WARNING: do not add new typedefs #11: FILE: hal/HalPhyRf.h:11: +typedef enum _SPUR_CAL_METHOD { WARNING: do not add new typedefs #16: FILE: hal/HalPhyRf.h:16: +typedef enum _PWRTRACK_CONTROL_METHOD { WARNING: do not add new typedefs #27: FILE: hal/HalPhyRf.h:27: +typedef struct _TXPWRTRACK_CFG { Signed-off-by: Marco Cesati Link: https://lore.kernel.org/r/20210305144906.18850-1-marco.cesati@gmail.com Signed-off-by: Greg Kroah-Hartman commit a8ecbb916e11593f203c96d51121142469870e58 Author: Fabio Aiuto Date: Fri Mar 5 20:17:16 2021 +0100 staging: rtl8723bs: removed unused code block Removed conditional code block checked by unused CONFIG_TX_BCAST2UNI This patch does the cleaning required in TODO file: find and remove code blocks guarded by never set CONFIG_FOO defines Signed-off-by: Fabio Aiuto Link: https://lore.kernel.org/r/20210305191713.GA2466@agape.jhs Signed-off-by: Greg Kroah-Hartman commit afbd10d98a1053d290108b489588c4006c2b8752 Author: Michael Straube Date: Sat Mar 6 09:11:33 2021 +0100 staging: rtl8188eu: rename parameters of odm_phy_status_query() Rename parameters of odm_phy_status_query() to avoid camel case. pDM_Odm -> dm_odm pPhyInfo -> phy_info pPhyStatus -> phy_status pPktinfo -> pkt_info Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210306081133.1272-2-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit edccaa4ced65267ec6ef213e2116481a7b8267da Author: Michael Straube Date: Sat Mar 6 09:11:32 2021 +0100 staging: rtl8188eu: rename ODM_PhyStatusQuery() Rename ODM_PhyStatusQuery() to odm_phy_status_query() to avoid camel case. Signed-off-by: Michael Straube Link: https://lore.kernel.org/r/20210306081133.1272-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5866bce00deecd87c46e8c3e86e6cf0b3fe2bca1 Author: Jia-Ju Bai Date: Sat Mar 6 05:22:45 2021 -0800 staging: vc04_services: vchiq_arm: fix error return code of vchiq_release_internal() and vchiq_use_internal() When arm_state is NULL, no error return code of vchiq_release_internal() and vchiq_use_internal() is assigned. To fix this bug, ret is assigned with VCHIQ_ERROR. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Link: https://lore.kernel.org/r/20210306132245.16811-1-baijiaju1990@gmail.com Signed-off-by: Greg Kroah-Hartman commit 275b6bd538c473df588868e53587f0f4f3378da3 Author: Giovanni Gherdovich Date: Sat Mar 6 15:13:22 2021 +0100 staging: ralink-gdma: Check return code of device_reset The device_reset() function is marked as "__must_check", thus the static analysis tool "sparse" complains that in ralink-gdma its return value is ignored. Log a warning in case it returns an error. Signed-off-by: Giovanni Gherdovich Link: https://lore.kernel.org/r/20210306141322.7516-1-bobdc9664@seznam.cz Signed-off-by: Greg Kroah-Hartman commit 60df0e7aaa70cbf86c7cdbbced048572a36017c3 Author: Darryl T. Agostinelli Date: Mon Mar 8 08:48:39 2021 -0600 staging: wimax: i2400m: fix some incorrect type warnings Fix some "incorrect type in assignment" warnings reported by sparse in fw.c sparse warnings: wimax/i2400m/fw.c:266:27: warning: cast to restricted __le32 wimax/i2400m/fw.c:266:25: warning: incorrect type in assignment (different base types) wimax/i2400m/fw.c:267:27: warning: cast to restricted __le32 wimax/i2400m/fw.c:267:25: warning: incorrect type in assignment (different base types) wimax/i2400m/fw.c:268:27: warning: cast to restricted __le32 wimax/i2400m/fw.c:268:25: warning: incorrect type in assignment (different base types) wimax/i2400m/fw.c:269:27: warning: cast to restricted __le32 wimax/i2400m/fw.c:269:25: warning: incorrect type in assignment (different base types) Signed-off-by: Darryl T. Agostinelli Link: https://lore.kernel.org/r/20210308144839.2364329-1-dagostinelli@gmail.com Signed-off-by: Greg Kroah-Hartman commit a9b0abf7a7bc75a68221564c3d2ab6ff90236062 Author: karthik alapati Date: Sun Feb 21 21:01:28 2021 +0530 staging: wimax/i2400m: convert __le32 type to host byte-order fix sparse type warning by converting __le32 types to host byte-order types before comparison Signed-off-by: karthik alapati Link: https://lore.kernel.org/r/87f93e091f736cb422f1d557fa5a2ac752f057a8.1613921277.git.mail@karthek.com Signed-off-by: Greg Kroah-Hartman commit 0c37baae130df39b19979bba88bde2ee70a33355 Author: karthik alapati Date: Sun Feb 21 21:01:05 2021 +0530 staging: wimax/i2400m: fix byte-order issue fix sparse byte-order warnings by converting host byte-order type to __le16 byte-order types before assigning to hdr.length Signed-off-by: karthik alapati Link: https://lore.kernel.org/r/0ae5c5c4c646506d8be871e7be5705542671a1d5.1613921277.git.mail@karthek.com Signed-off-by: Greg Kroah-Hartman commit d278360a3b3301c9e2bfb6a350cb2763edd9ee23 Author: Nikolay Kyx Date: Tue Mar 2 16:32:17 2021 +0300 staging: rtl8192e: remove redundant variable shadowing In function rtl92e_start_adapter() automatic variable 'i' referenced only within certain loops, used as iteration counter. Control flow can't get into such loop w/o 'i = 0' assignment. It's redundant to shadow this variable by creating scope around loop. This patch fixes the following sparse warning: warning: symbol 'i' shadows an earlier one Signed-off-by: Nikolay Kyx Link: https://lore.kernel.org/r/20210302133217.145994-1-knv418@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7f33733cf131faf3ba25e82788f0d615be4d836e Author: William Durand Date: Mon Mar 1 21:53:34 2021 +0000 staging: rtl8192e: reformat rx_ts_record struct This change uses a space instead of tabs between the type and name of each member of the struct. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-10-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 3b32b210c0717d286fd49dfa4b2c73911f6f92da Author: William Durand Date: Mon Mar 1 21:53:33 2021 +0000 staging: rtl8192e: rename RxLastFragNum to rx_last_frag_num in rx_ts_record struct Rename RxLastFragNum to rx_last_frag_num to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-9-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 6d852649821da76bde3d006fd12908eb72bbeb01 Author: William Durand Date: Mon Mar 1 21:53:32 2021 +0000 staging: rtl8192e: rename RxLastSeqNum to rx_last_seq_num in rx_ts_record struct Rename RxLastSeqNum to rx_last_seq_num to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-8-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit a860e1bb9f72737b047ea051d9ff7085f8e047df Author: William Durand Date: Mon Mar 1 21:53:31 2021 +0000 staging: rtl8192e: rename RxAdmittedBARecord to rx_admitted_ba_record in rx_ts_record struct Rename RxAdmittedBARecord to rx_admitted_ba_record to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-7-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit d36d3096c848394d8248a6774b3f04b56099f66b Author: William Durand Date: Mon Mar 1 21:53:30 2021 +0000 staging: rtl8192e: rename RxPktPendingTimer to rx_pkt_pending_timer in rx_ts_record struct Rename RxPktPendingTimer to rx_pkt_pending_timer to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-6-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit bd1b2779dbf541974e407674c7b6080848a7d418 Author: William Durand Date: Mon Mar 1 21:53:29 2021 +0000 staging: rtl8192e: rename RxPendingPktList to rx_pending_pkt_list in rx_ts_record struct Rename RxPendingPktList to rx_pending_pkt_list to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-5-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 57f1e71e1a5e23435f5ca33cf220ae4eb30a1e98 Author: William Durand Date: Mon Mar 1 21:53:28 2021 +0000 staging: rtl8192e: rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq in rx_ts_record struct Rename RxTimeoutIndicateSeq to rx_timeout_indicate_seq to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-4-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit b9788755a499d21bcfc5097b8c8cc99bb9826c77 Author: William Durand Date: Mon Mar 1 21:53:27 2021 +0000 staging: rtl8192e: rename RxIndicateSeq to rx_indicate_seq in rx_ts_record struct Rename RxIndicateSeq to rx_indicate_seq to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-3-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 58ea1b1dda1438e0b9c3f860617d0d178cb41aca Author: William Durand Date: Mon Mar 1 21:53:26 2021 +0000 staging: rtl8192e: rename TsCommonInfo to ts_common_info in rx_ts_record struct Rename TsCommonInfo to ts_common_info to silence a checkpatch warning about CamelCase. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210301215335.767-2-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 6d108d064c27928d1bbae22c8f7f81d8efb021fb Author: Candy Febriyanto Date: Mon Mar 1 22:00:11 2021 +0700 staging: rtl8723bs: os_dep: Replace sprintf with scnprintf The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. In one block of the translate_scan function sprintf is only called once (it's not being used to concatenate strings) so there is no need to keep the pointer "p", remove it. Reviewed-by: Dan Carpenter Signed-off-by: Candy Febriyanto Link: https://lore.kernel.org/r/d76c5f1db8dbf02ac0ab954b0971ce24e5a8b9bd.1614610197.git.cfebriyanto@gmail.com Signed-off-by: Greg Kroah-Hartman commit 2a02059e4f9ed59817d8c238f93bb8e5c58562ad Author: Candy Febriyanto Date: Mon Mar 1 22:01:50 2021 +0700 staging: rtl8723bs: hal: Replace sprintf with scnprintf The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. Also avoid unnecessarily passing "%s" on some of the function calls. Reviewed-by: Hans de Goede Signed-off-by: Candy Febriyanto Link: https://lore.kernel.org/r/ed564fb9e325f757b2b937df37689d40b96d8831.1614610197.git.cfebriyanto@gmail.com Signed-off-by: Greg Kroah-Hartman commit 41b25593bc7e7df60e40a352b21f2ebfa9d9f53f Author: Candy Febriyanto Date: Mon Mar 1 21:58:17 2021 +0700 staging: rtl8723bs: core: Replace sprintf with scnprintf The use of sprintf with format string here means that there is a risk that the writes will go out of bounds, replace it with scnprintf. In on_action_public_default the variable "cnt" isn't being used for anything meaningful so remove it. Reviewed-by: Hans de Goede Signed-off-by: Candy Febriyanto Link: https://lore.kernel.org/r/6c260641164d6856fc4447555fe739124cb27c19.1614610197.git.cfebriyanto@gmail.com Signed-off-by: Greg Kroah-Hartman commit 5fc95c4034d11f79595d2bcb4bc6fbe316fe51a1 Author: Ivan Safonov Date: Sun Feb 28 01:22:37 2021 +0300 staging:rtl8712: replace cap_* definitions with native kernel WLAN_CAPABILITY_* cap_* definitions duplicate WLAN_CAPABILITY_*. Remove cap_* definitions, improve code consistency. Reviewed-by: Mike Ximing Chen Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20210227222236.581490-5-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit e93aa38475d6bc5b077b3007982e5ddc071b747d Author: Ivan Safonov Date: Sun Feb 28 01:22:36 2021 +0300 staging:rtl8712: use IEEE80211_FCTL_* kernel definitions _TO_DS_, _FROM_DS_, _MORE_FRAG_, _RETRY_, _PWRMGT_, _MORE_DATA_, _PRIVACY_, _ORDER_ definitions are duplicate IEEE80211_FCTL_* kernel definitions. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20210227222236.581490-4-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 99b83fd48d927fdf171e90390ab4115c89484aaf Author: Ivan Safonov Date: Sun Feb 28 01:22:35 2021 +0300 staging:rtl8712: remove unused definitions from wifi.h These definitions are not used and will not be useful in the future. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20210227222236.581490-3-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit c198059ed7be3a7f8a96a8cf2ee5db4b3b143390 Author: Ivan Safonov Date: Sun Feb 28 01:22:34 2021 +0300 staging:rtl8712: replace get_(d|s)a with ieee80211_get_(D|S)A get_da()/get_sa() duplicate native ieee80211_get_(D|S)A functions. Remove get_(d|s)a, use ieee80211_get_(D|S)A instead. Signed-off-by: Ivan Safonov Link: https://lore.kernel.org/r/20210227222236.581490-2-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9b2bb2e3cf055d95fceeba6248d24284e3015803 Author: Lee Gibson Date: Fri Feb 26 11:48:00 2021 +0000 staging: fwserial: minor coding style fix Fixes this checkpatch warning WARNING: Integer promotion: Using 'h' in '%04hx' is unnecessary Signed-off-by: Lee Gibson Link: https://lore.kernel.org/r/20210226114800.316897-1-leegib@gmail.com Signed-off-by: Greg Kroah-Hartman commit 036695a65e4f4a731bce35cfc4ee6c05a86bd015 Author: Ian Abbott Date: Mon Mar 1 16:57:57 2021 +0000 staging: comedi: dt2814: Clear stale AI data on detach When the Comedi "detach" handler is called, it is possible that an extra A/D conversion (triggered during termination of a Comedi asynchronous command) is still in progress. In that case, the FINISH bit in the Status register will eventually get set and there will be stale data waiting to be read from the A/D Data register. The interrupt handler will also be called if still connected at the time. That should all be mostly harmless, but it would be better to wait for any such conversion to complete and clear any stale data during the "detach". Add a custom "detach" handler `dt2814_detach()` to do that if an interrupt handler has been set up. (There is no need to do it if no interrupt handler was set up because Comedi asynchronous command support is disabled in that case.) Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210301165757.243065-7-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 04b2dcca27774655ea96f335c14745b48741e443 Author: Ian Abbott Date: Mon Mar 1 16:57:56 2021 +0000 staging: comedi: dt2814: Remove struct dt2814_private The `ntrig` member of the `struct dt2814_private` pointed to by `dev->private` is no longer used as a counter to determine the end of acquisition for a Comedi asynchronous command. The other member `curadscan` is also unused. Remove the allocation of the private data during initialization and remove the definition of `struct dt2814_private` since they are no longer needed. Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210301165757.243065-6-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 3d7b3101bfeaf6a33e3b4fe4ca08419d057edb5f Author: Ian Abbott Date: Mon Mar 1 16:57:55 2021 +0000 staging: comedi: dt2814: Fix asynchronous command interrupt handling The support for asynchronous commands in this driver is currently broken. If interrupts are enabled, the interrupt handler is called at the end of every A/D conversion. A/D conversions could be due to software-triggered conversions resulting from Comedi `INSN_READ` instruction handling, or due to timer-trigger conversions enabled when a Comedi asynchronous command is set up. We only want the interrupt handler to read a sample from the A/D Data register for timer-triggered conversions, but currently it always reads the A/D Data register. Since the A/D Data register is read twice (to read a 12-bit value from an 8-bit register), that probably interferes with the reading for software-triggered conversions. The interrupt handler does not currently do anything with the data, it just ignores it. It should be written to the Comedi buffer if handling an asynchronous command. Other problems are that the driver has no Comedi `cancel` handler to call when the asynchronous command is being stopped manually, and it does not handle "infinite" acquisitions (when the command's `stop_src == TRIG_NONE`) properly. Change the interrupt handler to check the timer enable (ENB) bit to check the asynchronous command is active and return early if not enabled. Also check the error (ERR) and "conversion complete" (FINISH) bits, and return early if neither is set. Then the sample can be read from the A/D Data register to clear the ERR and FINISH bits. If the ERR bit was set, terminate the acquisition with an error, otherwise write the data to the Comedi buffer and check for end of acquisition. Replace the current check for end of acquisition, using the count of completed scans in `scans_done` (updated by calls to `comedi_buf_write_samples()`) when `stop_src == TRIG_COUNT`) and allowing "infinite" acquisitions when `stop_src == TRIG_NONE`. Add a `cancel` handler function `dt2814_ai_cancel()` that will be called when the end of acquisition event is processed and when the acquisition is stopped manually. It turns off the timer enable (ENB) bit in the Control register, leaving the current channel selected. Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210301165757.243065-5-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 5fc336c6101ec9cca37a062253c01c0429c44a16 Author: Ian Abbott Date: Mon Mar 1 16:57:54 2021 +0000 staging: comedi: dt2814: Call dt2814_ai_clear() during initialization The Comedi "attach" handler `dt2814_attach()` writes to the Control register to turn off the timer enable 'ENB' bit, which triggers a conversion. It then sleeps awhile and checks the Status register, returning an error if the ERR bit is set. However, the ERR bit could have been set due to the conversion being triggered while the A/D converter was busy (unlikely) or due to the conversion being triggered before some previous sample had been read from the A/D Data register. Replace the existing code with a call to `dt2814_ai_clear()` which waits for any conversion to finish and then clears any unread data or error condition. A non-zero return value from `dt2814_ai_clear()` indicates a time-out while waiting for the A/D converter to become non-busy. Return an error in that case. Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210301165757.243065-4-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 46ffba0622f7171208fa2ec9d9d4ddc51c9ae1b4 Author: Ian Abbott Date: Mon Mar 1 16:57:53 2021 +0000 staging: comedi: dt2814: Don't wait for conversion in interrupt handler When the interrupt handler decides the final sample has been acquired, it turns off the timer enable (ENB) bit in the Command register. That triggers another A/D conversion. The interrupt handler currently waits for that to finish and then reads the resulting, unwanted sample. Since the functions for handling Comedi read instructions and for setting up asynchronous commands now call `dt2814_ai_clear()` to wait for and discard any spurious A/D conversion, let's remove that code from the interrupt handler. Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210301165757.243065-3-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit 7a3f3a7005cba9cfc1a0d50978f3eb7f3094e02f Author: Ian Abbott Date: Mon Mar 1 16:57:52 2021 +0000 staging: comedi: dt2814: Clear stale AI data before operation When performing a Comedi read instruction or setting up an asynchronous command on the AI subdevice, clear any stale data on the A/D registers by waiting for the Status register's BUSY bit to clear (if set) and then if the FINISH or ERR bit is set, reading the A/D Data register twice to clear the stale data. Signed-off-by: Ian Abbott Link: https://lore.kernel.org/r/20210301165757.243065-2-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman commit a0d1a3864cad089eef3e0458d1abc31e9e101751 Author: Shubhrajyoti Datta Date: Wed Feb 24 18:40:39 2021 +0530 staging: clocking-wizard: Remove the hardcoding of the clock outputs The number of output clocks are configurable in the hardware. Currently the driver registers the maximum number of outputs. Fix the same by registering only the outputs that are there. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1614172241-17326-8-git-send-email-shubhrajyoti.datta@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 91d695d71841ab4ed7d26e27ee194aed03328095 Author: Shubhrajyoti Datta Date: Wed Feb 24 18:40:38 2021 +0530 staging: clocking-wizard: Add support for fractional support Currently the set rate granularity is to integral divisors. Add support for the fractional divisors. Only the first output0 is fractional in the hardware. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1614172241-17326-7-git-send-email-shubhrajyoti.datta@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 5a853722eb32188647a541802d51d0db423b9baf Author: Shubhrajyoti Datta Date: Wed Feb 24 18:40:37 2021 +0530 staging: clocking-wizard: Add support for dynamic reconfiguration The patch adds support for dynamic reconfiguration of clock output rate. Output clocks are registered as dividers and set rate callback function is used for dynamic reconfiguration. Signed-off-by: Shubhrajyoti Datta Co-developed-by: Chirag Parekh Link: https://lore.kernel.org/r/1614172241-17326-6-git-send-email-shubhrajyoti.datta@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 92a7590427d6661bc657c08624355db6c3874b9a Author: Shubhrajyoti Datta Date: Wed Feb 24 18:40:36 2021 +0530 staging: clocking-wizard: Allow changing of parent rate for single output If there is only one output then allow changing of the parent rate. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1614172241-17326-5-git-send-email-shubhrajyoti.datta@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 87a40bfb09f213b433ef137eed73b365b808a784 Author: Shubhrajyoti Datta Date: Wed Feb 24 18:40:35 2021 +0530 staging: clocking-wizard: Update the fixed factor divisors Update the fixed factor clock registration to register the divisors. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1614172241-17326-4-git-send-email-shubhrajyoti.datta@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 17aa33ff569980a7f17def2bf9553cf972b6ef53 Author: Shubhrajyoti Datta Date: Wed Feb 24 18:40:34 2021 +0530 staging: clocking-wizard: Rename speed-grade to xlnx,speed-grade Rename speed-grade to xlnx,speed-grade Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1614172241-17326-3-git-send-email-shubhrajyoti.datta@xilinx.com Signed-off-by: Greg Kroah-Hartman commit b03dea259384624fde51809f96eecc8053a6ce86 Author: Shubhrajyoti Datta Date: Wed Feb 24 18:40:33 2021 +0530 staging: clocking-wizard: Fix kernel-doc warning Fix the clocking wizard main structure kernel documentation. Signed-off-by: Shubhrajyoti Datta Link: https://lore.kernel.org/r/1614172241-17326-2-git-send-email-shubhrajyoti.datta@xilinx.com Signed-off-by: Greg Kroah-Hartman commit 70c090af3e26a37134d92883e3f8f117bfa10431 Author: William Durand Date: Sat Feb 20 17:29:09 2021 +0000 staging: rtl8192e: reformat bss_ht struct This change uses a space instead of tabs between the type and name of each member of the struct. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-14-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit f7138484766bc3632f12ad9730a78fb62bf0e925 Author: William Durand Date: Sat Feb 20 17:29:08 2021 +0000 staging: rtl8192e: rename bdHT1R to bd_ht_1r in bss_ht struct Rename bdHT1R to bd_ht_1r to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-13-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 6628c6743f1e19d01c5d790e55b73dee991e6d94 Author: William Durand Date: Sat Feb 20 17:29:07 2021 +0000 staging: rtl8192e: rename RT2RT_HT_Mode to rt2rt_ht_mode in bss_ht struct Rename RT2RT_HT_Mode to rt2rt_ht_mode to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-12-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit fe403d4b7bcfb79e01dc47406d56b13cd8577e52 Author: William Durand Date: Sat Feb 20 17:29:06 2021 +0000 staging: rtl8192e: rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time in bss_ht struct Rename bdRT2RTLongSlotTime to bd_rt2rt_long_slot_time to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-11-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 3f1f39fb6c4a42b3c41849dd6db1c44c5a333a29 Author: William Durand Date: Sat Feb 20 17:29:05 2021 +0000 staging: rtl8192e: rename bdRT2RTAggregation to bd_rt2rt_aggregation in bss_ht struct Rename bdRT2RTAggregation to bd_rt2rt_aggregation to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-10-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit e6378e21f5e31fb2ef0663895a625264371e0974 Author: William Durand Date: Sat Feb 20 17:29:04 2021 +0000 staging: rtl8192e: rename bdBandWidth to bd_bandwidth in bss_ht struct Rename bdBandWidth to bd_bandwidth to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-9-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 2fbcd6ded92beee4b434fefd3bec9eb524cf03be Author: William Durand Date: Sat Feb 20 17:29:03 2021 +0000 staging: rtl8192e: rename bdHTSpecVer to bd_ht_spec_ver in bss_ht struct Rename bdHTSpecVer to bd_ht_spec_ver to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-8-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 060d3f6cb8ba579b305eb70f4569fc73289a1141 Author: William Durand Date: Sat Feb 20 17:29:02 2021 +0000 staging: rtl8192e: rename bdHTInfoLen to bd_ht_info_len in bss_ht struct Rename bdHTInfoLen to bd_ht_info_len to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-7-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 2408ee9e3ce07d12ac1ffc5fdaad9b1792479a7f Author: William Durand Date: Sat Feb 20 17:29:01 2021 +0000 staging: rtl8192e: rename bdHTInfoBuf to bd_ht_info_buf in bss_ht struct Rename bdHTInfoBuf to bd_ht_info_buf to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-6-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 20e90635661639094ead83cc3eb6aaae7e3b631c Author: William Durand Date: Sat Feb 20 17:29:00 2021 +0000 staging: rtl8192e: rename bdHTCapLen to bd_ht_cap_len in bss_ht struct Rename bdHTCapLen to bd_ht_cap_len to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-5-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit b87b210833b9359e1222fb4c76970442ab1d6148 Author: William Durand Date: Sat Feb 20 17:28:59 2021 +0000 staging: rtl8192e: rename bdHTCapBuf to bd_ht_cap_buf in bss_ht struct Rename bdHTCapBuf to bd_ht_cap_buf to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-4-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit b3b55bd7fc89ceb68f615b0b391119b182337c97 Author: William Durand Date: Sat Feb 20 17:28:58 2021 +0000 staging: rtl8192e: rename bdSupportHT to bd_support_ht in bss_ht struct Rename bdSupportHT to bd_support_ht to silence a checkpatch warning about CamelCase. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-3-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit f9316389513eb5ac4efbf11171ed02a83719e322 Author: William Durand Date: Sat Feb 20 17:28:57 2021 +0000 staging: rtl8192e: remove blank line in bss_ht struct Fix a checkpatch warning about a blank line after an open curly brace. Reviewed-by: Dan Carpenter Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210220172909.15812-2-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 305c9947ccaf2441fda6149a6120b437a352b2d4 Author: Hassan Shahbazi Date: Tue Feb 23 08:42:29 2021 +0200 staging: wimax: fix code style issues Fixes 'WARNING: Missing a blank line after declarations' generated by checkpatch.pl script. Signed-off-by: Hassan Shahbazi Link: https://lore.kernel.org/r/20210223064227.62631-1-h.shahbazi.git@gmail.com Signed-off-by: Greg Kroah-Hartman commit 81091cfa6080af9b7844fbddd1b0aa57fec1aefb Author: Bastien Maureille Date: Mon Feb 22 19:18:14 2021 +0100 staging: vc04_services: fix indent in vchiq_debugfs_node Fix checkpatch.pl warning regarding space indents and replace it with tabs to comply with kernel coding style. Signed-off-by: Bastien Maureille Link: https://lore.kernel.org/r/20210222181812.268909-1-bastien.maureille@gmail.com Signed-off-by: Greg Kroah-Hartman commit 861cdbdd4d70f7a4998cfb834ffca7dbcdcde890 Author: Simone Serra Date: Wed Feb 24 00:41:02 2021 +0100 staging: rt8192u: Move constant in comparison to the RHS Fixes checkpatch warning: WARNING: Comparisons should place the constant on the right side of the test Signed-off-by: Simone Serra Link: https://lore.kernel.org/r/20210223234102.15784-1-serrazimone@gmail.com Signed-off-by: Greg Kroah-Hartman commit 216f4356708ad4322f8795b21f8110dfab427437 Author: Amrit Khera Date: Mon Feb 22 15:45:42 2021 +0530 staging: wimax: Fix block comment style issue in stack.c This change fixes a checkpatch warning for "Block comments use * on subsequent lines". It removes the unnecessary block comment. Signed-off-by: Amrit Khera Link: https://lore.kernel.org/r/20210222101541.2571-1-amritkhera98@gmail.com Signed-off-by: Greg Kroah-Hartman commit 520e9b032b9ef600c0a78c01f2279b40181bc498 Author: George Xanthakis Date: Sun Feb 21 19:05:42 2021 +0200 staging: android: Remove filename reference from file This commit fixes a checkpatch warning that references the filename in the the file comments. Signed-off-by: George Xanthakis Link: https://lore.kernel.org/r/20210221170542.45309-1-kompiouterakias@gmail.com Signed-off-by: Greg Kroah-Hartman commit edee4528987d18e3397f2a7159d3b24da575bfd0 Author: Fatih Yildirim Date: Sun Feb 21 23:28:55 2021 +0300 staging: comedi dt2814: Removed unused variables Removed unused variables. Acked-by: Ian Abbott Signed-off-by: Fatih Yildirim Link: https://lore.kernel.org/r/20210221202855.12442-1-yildirim.fatih@gmail.com Signed-off-by: Greg Kroah-Hartman commit 3c5378ed9781ecb45834dcc0ad544fed8ad08797 Author: Rajesh Kumbhakar Date: Sun Feb 21 05:39:51 2021 -0800 staging: wimax: i2400m: add space before open parenthesis fixing ERROR: space required before the open parenthesis '(' Signed-off-by: Rajesh Kumbhakar Link: https://lore.kernel.org/r/20210221133951.21234-1-sssraj.sssraj@gmail.com Signed-off-by: Greg Kroah-Hartman commit 47b6079e6f894975e514bff7d6134af2bf6bda9a Author: Nikolay Kyx Date: Sun Feb 21 16:22:46 2021 +0300 staging: kpc2000: code style: fix line length issue This patch fixes the following checkpatch.pl warning: WARNING: line length of 124 exceeds 100 columns in file kpc2000_i2c.c Signed-off-by: Nikolay Kyx Link: https://lore.kernel.org/r/20210221132246.1154-2-knv418@gmail.com Signed-off-by: Greg Kroah-Hartman commit bba80c8482bcd39f74e305adba30b057b880c8a8 Author: Nikolay Kyx Date: Sun Feb 21 16:22:45 2021 +0300 staging: kpc2000: code style: match alignment with open parenthesis This patch fixes the following checkpatch.pl check: CHECK: Alignment should match open parenthesis in files kpc2000_i2c.c kpc2000_spi.c Signed-off-by: Nikolay Kyx Link: https://lore.kernel.org/r/20210221132246.1154-1-knv418@gmail.com Signed-off-by: Greg Kroah-Hartman commit 061c43a35462d2c93b8a986f17fbe4e2eded84a5 Author: William Durand Date: Fri Feb 19 23:33:52 2021 +0000 staging: rtl8192e: fix alignment issues in rtllib_wx.c Fixes "Alignment should match open parenthesis" issues reported by checkpatch.pl in the `rtllib_wx.c` file. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219233352.2298-1-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit d970d17cab7a6da409e5c0d5f80b786718459b2d Author: William Durand Date: Fri Feb 19 23:11:28 2021 +0000 staging: rtl8192e: reformat ba_record struct This change uses a space instead of tabs between the type and name of each member of the struct. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219231128.27119-8-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 34fea352823c0fa6cd70b84b07d7b0e0390bf059 Author: William Durand Date: Fri Feb 19 23:11:27 2021 +0000 staging: rtl8192e: rename BaStartSeqCtrl to ba_start_seq_ctrl in ba_record struct Fixes a checkpatch CHECK issue. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219231128.27119-7-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 092bc4e78e5128bf5aa9737487707210dd5ffa11 Author: William Durand Date: Fri Feb 19 23:11:26 2021 +0000 staging: rtl8192e: rename BaTimeoutValue to ba_timeout_value in ba_record struct Fixes a checkpatch CHECK issue. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219231128.27119-6-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit ffa3d0a13d90419bc766824241a0b13ac6f4fcf0 Author: William Durand Date: Fri Feb 19 23:11:25 2021 +0000 staging: rtl8192e: rename BaParamSet to ba_param_set in ba_record struct Fixes a checkpatch CHECK issue. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219231128.27119-5-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 142867ea2a83e4c05d0118320be137d981c9808a Author: William Durand Date: Fri Feb 19 23:11:24 2021 +0000 staging: rtl8192e: rename DialogToken to dialog_token in ba_record struct Fixes a checkpatch CHECK issue. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219231128.27119-4-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit ba05a6198467f2624e506edd47576d0ca252453b Author: William Durand Date: Fri Feb 19 23:11:23 2021 +0000 staging: rtl8192e: rename bValid to b_valid in ba_record struct Fixes a checkpatch CHECK issue. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219231128.27119-3-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit a318d0b1072f8fa436335a2288d567d9e744abf1 Author: William Durand Date: Fri Feb 19 23:11:22 2021 +0000 staging: rtl8192e: rename Timer to timer in ba_record struct Fixes a checkpatch CHECK issue. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219231128.27119-2-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 53c72c4ca8e55b2045c717cd951228261477a448 Author: William Durand Date: Fri Feb 19 16:14:00 2021 +0000 staging: rtl8192e: rename TID to tid in delba_param_set union This change uses lowercase for a field name to be more consistent with the rest of the union. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219161400.29316-6-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit b3d5b115ba9960511867908b832db4d864943a76 Author: William Durand Date: Fri Feb 19 16:13:59 2021 +0000 staging: rtl8192e: rename Initiator to initiator in delba_param_set union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219161400.29316-5-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 248a73b161042a1990ae06c03141038d9335a21f Author: William Durand Date: Fri Feb 19 16:13:58 2021 +0000 staging: rtl8192e: rename Reserved to reserved in delba_param_set union This change uses lowercase for a field name to be more consistent with the rest of the union. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219161400.29316-4-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit d6afdc536132170d9cdf073cc7de7a39387498b3 Author: William Durand Date: Fri Feb 19 16:13:57 2021 +0000 staging: rtl8192e: rename shortData to short_data in delba_param_set union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219161400.29316-3-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit ca3301b85d1068053db050ca7c26f098b2c8a0e2 Author: William Durand Date: Fri Feb 19 16:13:56 2021 +0000 staging: rtl8192e: rename charData to char_data in delba_param_set union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219161400.29316-2-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit c1abfd8cd821badf42222972ea7002550e6b2664 Author: Kurt Manucredo Date: Fri Feb 19 18:23:54 2021 +0000 staging: rtl8723bs: fix code style comparison warning checkpatch gives the following WARNING: WARNING: Comparisons should place the constant on the right side of the test this patch fixes the coding style warning. Signed-off-by: Kurt Manucredo Link: https://lore.kernel.org/r/20210219182331.8-1-fuzzybritches@protonmail.com Signed-off-by: Greg Kroah-Hartman commit dcda7248088aaed772fc3ef1a344293ae9b4dbce Author: Ashish Vara Date: Fri Feb 19 23:44:33 2021 +0530 staging: gasket: removed unnecessary debug message to fix coding style warning removed unnecessary out of memory message to fix coding style warning. Signed-off-by: Ashish Vara Link: https://lore.kernel.org/r/0c041d98-9b0f-95a3-3b19-ff94243a0bbc@yahoo.com Signed-off-by: Greg Kroah-Hartman commit 05196d33ce409eef158e064af91cdb3fd7aa639e Author: Mayank Suman Date: Fri Feb 19 23:11:14 2021 +0530 staging: gasket Fix comparison with Null Comparison with NULL is redundant as pointer will evaluate to true if is non-NULL. The change was suggested by checkpatch.pl. Signed-off-by: Mayank Suman Link: https://lore.kernel.org/r/PS1PR04MB2934D85E82A3730349F56FE9D6849@PS1PR04MB2934.apcprd04.prod.outlook.com Signed-off-by: Greg Kroah-Hartman commit 6c231d8e157126a726968da02b478d6601f29758 Author: Shreesh Adiga <16567adigashreesh@gmail.com> Date: Fri Feb 19 22:37:37 2021 +0530 staging: octeon: cleanup unnecessary parentheses in ethernet-spmi.c checkpatch.pl reported issue of unnecessary parentheses for the expression. It has been removed to fix the report. Signed-off-by: Shreesh Adiga <16567adigashreesh@gmail.com> Link: https://lore.kernel.org/r/20210219170737.1138083-1-16567adigashreesh@gmail.com Signed-off-by: Greg Kroah-Hartman commit 06b51f4bd5d24494f73fca13cd1ee0ebeadb4ce0 Author: Nikolay Kyx Date: Fri Feb 19 18:49:17 2021 +0300 staging: fwserial: match alignment with open parenthesis This patch fixes the following checkpatch.pl check: CHECK: Alignment should match open parenthesis in file fwserial.c Signed-off-by: Nikolay Kyx Link: https://lore.kernel.org/r/20210219154917.23388-1-knv418@gmail.com Signed-off-by: Greg Kroah-Hartman commit e1d3944f41b5b8d53b4c9ca7594a7c137c8f5bca Author: Du Cheng Date: Fri Feb 19 23:05:27 2021 +0800 staging: rtl8192u: remove unnecessary return in r8190_rtl8256.c remove the unnecessary return at the end of function phy_set_rf8256_ofdm_tx_power(), reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng Link: https://lore.kernel.org/r/20210219150527.8358-2-ducheng2@gmail.com Signed-off-by: Greg Kroah-Hartman commit 6e03efd2f5cdba53a80c275cc1095099ec9e5800 Author: Du Cheng Date: Fri Feb 19 23:05:26 2021 +0800 staging: rtl8192u: fix RT_TRACE() in r8190_rtl8256.c use MACRO __func__ instead of the literal names for RT_TRACE() in phy_set_rf8256_bandwidth() and phy_rf8256_config_para_file(), as reported by scripts/checkpatch.pl. Signed-off-by: Du Cheng Link: https://lore.kernel.org/r/20210219150527.8358-1-ducheng2@gmail.com Signed-off-by: Greg Kroah-Hartman commit 9ba732a5b070d54c9651d6c91bc6e226df948579 Author: Amrit Khera Date: Fri Feb 19 20:12:31 2021 +0530 staging: greybus: Fix blank line style issue in sdio.c This change fixes a checkpatch check for "Please don't use multiple blank lines". Signed-off-by: Amrit Khera Link: https://lore.kernel.org/r/20210219144230.32055-1-amritkhera98@gmail.com Signed-off-by: Greg Kroah-Hartman commit 99783dd57e9bb309ff1041db5bfbd518d3e44701 Author: shivang upadhyay Date: Fri Feb 19 15:38:03 2021 +0530 staging: sm750fb: added identifier names for function declarations checkpatch.pl complains about not having identifiers names in function declarations . This patch uses the same names as are used in source file sm750_accel.c , but with snake case. Signed-off-by: shivang upadhyay Link: https://lore.kernel.org/r/20210219100803.5311-1-oroz3x@gmail.com Signed-off-by: Greg Kroah-Hartman commit e7f659b10b915be1e2ddc4ce045345cf4d57694f Author: Alaa Emad Date: Fri Feb 19 12:18:12 2021 +0200 staging: hikey9xx: fix warning styling issues Fix "WARNING: please, no space before tabs" styling issue in hi6421-spmi-pmic.c for lines 51,52,53 and 69. Signed-off-by: Alaa Emad Link: https://lore.kernel.org/r/20210219101812.3483-1-alaaemadhossney.ae@gmail.com Signed-off-by: Greg Kroah-Hartman commit bfe3388fe12536851b9c8b418a5f4666149f7e98 Author: William Durand Date: Fri Feb 19 10:12:06 2021 +0000 staging: rtl8192e: rename TID to tid in ba_param_set union This change uses lowercase for a field name to be more consistent with the rest of the union. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219101206.18036-7-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit a6850f14ea6ab5610b637beee39089bbcbb86f9c Author: William Durand Date: Fri Feb 19 10:12:05 2021 +0000 staging: rtl8192e: rename AMSDU_Support to amsdu_support in ba_param_set union This change does not fix a checkpatch issue but it is more consistent with the rest of the union. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219101206.18036-6-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit a6d242d4ad08511144ff294aed7e142b59c3c07b Author: William Durand Date: Fri Feb 19 10:12:04 2021 +0000 staging: rtl8192e: rename BufferSize to buffer_size in ba_param_set union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219101206.18036-5-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 4320b7bdd93cd61b806bc7a80e4388c7dd96025f Author: William Durand Date: Fri Feb 19 10:12:03 2021 +0000 staging: rtl8192e: rename BAPolicy to ba_policy in ba_param_set union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219101206.18036-4-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 113030ce24dcee6bc9368bf7b260e18a15f3fd99 Author: William Durand Date: Fri Feb 19 10:12:02 2021 +0000 staging: rtl8192e: rename shortData to short_data in ba_param_set union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219101206.18036-3-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 424e6a16c4aac79f8ddca67baaf43bb49df2de65 Author: William Durand Date: Fri Feb 19 10:12:01 2021 +0000 staging: rtl8192e: rename charData to char_data in ba_param_set union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210219101206.18036-2-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 62964172d9c1178ed7015b0396628bbddd67bd4d Author: Muhammad Usama Anjum Date: Thu Feb 18 14:21:54 2021 +0500 staging: wimax/i2400m: don't change the endianness of one byte variable It is wrong to change the endianness of a variable which has just one byte size. Sparse warnings fixed: drivers/staging//wimax/i2400m/control.c:452:17: warning: cast to restricted __le32 drivers/staging//wimax/i2400m/control.c:452:17: warning: cast to restricted __le32 drivers/staging//wimax/i2400m/op-rfkill.c:159:14: warning: cast to restricted __le32 drivers/staging//wimax/i2400m/op-rfkill.c:160:14: warning: cast to restricted __le32 Signed-off-by: Muhammad Usama Anjum Link: https://lore.kernel.org/r/20210218092154.GA46388@LEGION Signed-off-by: Greg Kroah-Hartman commit 2917b109b36ac38ed258d488c993e1b867ad863b Author: Florian Ziegler Date: Fri Feb 19 00:22:15 2021 +0100 staging: vt6656: Fix alignment of function args Align function arguments to fix checkpatch.pl CHECK message and rewrap to match the file's style. Signed-off-by: Florian Ziegler Link: https://lore.kernel.org/r/20210218232215.17508-1-florian.ziegler@posteo.de Signed-off-by: Greg Kroah-Hartman commit 85922358fac966d69127524aff37b69d8437040e Author: Suryashankar Das Date: Thu Feb 18 23:54:15 2021 +0530 staging: rtl8188eu: Format comments This patch fixes the checkpatch.pl warnings: WARNING: Block comments use * on subsequent lines WARNING: Block comments should align the * on each line Signed-off-by: Suryashankar Das Link: https://lore.kernel.org/r/20210218182414.49107-1-suryashankardas.2002@gmail.com Signed-off-by: Greg Kroah-Hartman commit 72fd8d532404e520c9880ae1295c09543c1ca85e Author: Sean Behan Date: Wed Feb 17 09:21:15 2021 -0500 staging: emxx_udc: remove unused variable driver_desc When building with W=1 (or however you found it), there is a warning that this variable is unused. It is not used so remove it to fix the warning. Signed-off-by: Sean Behan Link: https://lore.kernel.org/r/20210217142118.7107-1-codebam@riseup.net Signed-off-by: Greg Kroah-Hartman commit 41b873caff9231b7b79eac247622014009e6f0c6 Author: Du Cheng Date: Tue Feb 16 18:19:45 2021 +0800 staging: qlge: fix comment style in qlge_main.c fix the closing of a one-line block comment, marked incorrect by scripts/checkpatch.pl. Signed-off-by: Du Cheng Link: https://lore.kernel.org/r/20210216101945.187474-1-ducheng2@gmail.com Signed-off-by: Greg Kroah-Hartman commit b3ff279e95f10bea3d359318102d54af748847d7 Author: Chen Lin Date: Mon Feb 15 21:02:54 2021 +0800 staging: rtl8723bs: Remove unused function pointer typedef wi_act_func Remove the 'wi_act_func' typedef as it is not used. Signed-off-by: Chen Lin Link: https://lore.kernel.org/r/1613394174-3826-1-git-send-email-chen45464546@163.com Signed-off-by: Greg Kroah-Hartman commit cedbc3ac57db56612b864f398f1faaf453d9dea8 Author: William Durand Date: Sun Feb 14 14:03:32 2021 +0000 staging: rtl8192e: rename SeqNum to seq_num in sequence_control union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210214140332.16175-4-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit a6a3dd375230411ee4ef1716fc5e3ee414e1dbeb Author: William Durand Date: Sun Feb 14 14:03:31 2021 +0000 staging: rtl8192e: rename FragNum to frag_num in sequence_control union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210214140332.16175-3-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit c3f1bca83edd56528aee67b0e01eb843452730f7 Author: William Durand Date: Sun Feb 14 14:03:30 2021 +0000 staging: rtl8192e: rename ShortData to short_data in sequence_control union Fixes a checkpatch CHECK message. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210214140332.16175-2-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 29b205e72b326f87d25a328c6d0ecb4a30b7d73c Author: Davidson Francis Date: Mon Feb 15 16:44:41 2021 -0300 staging: rtl8192e: Fix comparisons to NULL Checkpatch prefers the shorter version (x / !x) over (!= NULL / == NULL), respectively. Signed-off-by: Davidson Francis Link: https://lore.kernel.org/r/20210215194441.11430-1-davidsondfgl@gmail.com Signed-off-by: Greg Kroah-Hartman commit 733f0742a9c9814c59483a95cb0f1113599441d4 Author: William Durand Date: Sat Feb 13 14:54:21 2021 +0000 staging: rtl8192e: fix typo in a function name There is a typo here where it says "qurey" but "query" was intended. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210213145421.31031-1-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 46e6567359c434ddc74d264fd6be8727ec83d885 Author: William Durand Date: Sat Feb 13 09:01:12 2021 +0000 staging: rtl8192e: fix typo in a comment This patch fixes a checkpatch warning by deleting a repeated word. Signed-off-by: William Durand Link: https://lore.kernel.org/r/20210213090112.24616-1-will+git@drnd.me Signed-off-by: Greg Kroah-Hartman commit 7964844ee51ef8e93d5051c2cdda8c6f9febad7b Author: Rajat Asthana Date: Fri Feb 19 00:07:57 2021 +0530 staging: wfx: Fix alignment style issue in sta.c This change fixes a checkpatch error for "Alignment should match open parenthesis". Signed-off-by: Rajat Asthana Link: https://lore.kernel.org/r/20210218183757.72995-1-thisisrast7@gmail.com Signed-off-by: Greg Kroah-Hartman commit 021bbe0017f85886be429931921e3a798b38a503 Author: zhuo1angt@outlook.com Date: Sun Feb 14 05:40:54 2021 +0800 staging: wfx: logical continuations should be on the previous line Move logical and operator to previous line to comply with the standard kernel coding style. Signed-off-by: Zhuoran He Link: https://lore.kernel.org/r/ME4P282MB080872A776B92CCC33A4B1EFF98A9@ME4P282MB0808.AUSP282.PROD.OUTLOOK.COM Signed-off-by: Greg Kroah-Hartman commit 164142847d1198ce41c5b47100943bb7bb1b475b Author: Chen Lin Date: Tue Feb 16 11:54:06 2021 +0800 staging: wlan-ng: Remove unused function pointer typedef freebuf_method_t Remove the 'freebuf_method_t' typedef as it is not used. Signed-off-by: Chen Lin Link: https://lore.kernel.org/r/1613447646-4678-1-git-send-email-chen45464546@163.com Signed-off-by: Greg Kroah-Hartman commit 5bc510b23e78baedc09fc471fcb3618639539c84 Author: Pritthijit Nath Date: Wed Feb 17 21:12:55 2021 +0530 staging: wlan-ng: Fixed incorrect type warning in p80211netdev.c This change fixes a sparse warning "incorrect type in argument 1 (different address spaces)". Reviewed-by: Ivan Safonov Signed-off-by: Pritthijit Nath Link: https://lore.kernel.org/r/20210217154255.112115-1-pritthijit.nath@icloud.com Signed-off-by: Greg Kroah-Hartman commit ad0bd9ff4954bdb9b1f9c942801798dc11b3fe0f Author: Selvakumar Elangovan Date: Wed Feb 17 12:37:10 2021 +0530 Staging: mt7621-pci: fixed a blank line coding style issue Removed an unnecessary blank line before closing brace reported by checkpatch.pl Reviewed-by: Sergio Paracuellos Signed-off-by: Selvakumar Elangovan Link: https://lore.kernel.org/r/20210217070710.7359-1-selvakumar16197@gmail.com Signed-off-by: Greg Kroah-Hartman commit 7e197d3afa234dc9c529ca3736da93404585c7cd Author: Phillip Potter Date: Mon Feb 15 23:34:40 2021 +0000 staging: rtl8723bs: remove rx_logs/tx_logs/int_logs from drv_types.h Remove the rx_logs/tx_logs/int_logs struct definitions and their inclusion within struct adapter as fields, from include/drv_types.h. They were conditionally compiled based on CONFIG_DBG_COUNTER which now has no other users in the driver, and were only ever accessed in a write only fashion via the DBG_COUNTER macro, which has also been removed. Reviewed-by: Dan Carpenter Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210215233440.80617-7-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 811c47005e52c506f5a5f68d1eb92853ca0f3be0 Author: Phillip Potter Date: Mon Feb 15 23:34:39 2021 +0000 staging: rtl8723bs: remove DBG_COUNTER definition from rtw_debug.h Remove DBG_COUNTER macro definition from include/rtw_debug.h, as all uses of it have now been removed and it is no longer required. The DBG_COUNTER incremented values were never actually used anywhere else in the driver. Reviewed-by: Dan Carpenter Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210215233440.80617-6-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 8b7b8784188d79a7d615528acbedc0a8a555f22a Author: Phillip Potter Date: Mon Feb 15 23:34:38 2021 +0000 staging: rtl8723bs: remove DBG_COUNTER calls from core/rtw_recv.c Remove all DBG_COUNTER macro calls from core/rtw_recv.c, as the corresponding variables are only ever written to and not used. This makes the code cleaner, and is necessary prior to removing the DBG_COUNTER definition itself. Reviewed-by: Dan Carpenter Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210215233440.80617-5-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 1337bd9871f59510e40362f42fc4444d14790c52 Author: Phillip Potter Date: Mon Feb 15 23:34:37 2021 +0000 staging: rtl8723bs: remove DBG_COUNTER calls from core/rtw_xmit.c Remove all DBG_COUNTER macro calls from core/rtw_xmit.c, as the corresponding variables are only ever written to and not used. This makes the code cleaner, and is necessary prior to removing the DBG_COUNTER definition itself. Reviewed-by: Dan Carpenter Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210215233440.80617-4-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit 7b3df1c76360a3b2ec86187329237f7c9968564d Author: Phillip Potter Date: Mon Feb 15 23:34:36 2021 +0000 staging: rtl8723bs: remove DBG_COUNTER calls from os_dep/xmit_linux.c Remove all DBG_COUNTER macro calls from os_dep/xmit_linux.c, as the corresponding variables are only ever written to and not used. This makes the code cleaner, and is necessary prior to removing the DBG_COUNTER definition itself. Reviewed-by: Dan Carpenter Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210215233440.80617-3-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit de69e2b3f10594d37433033ad6e2cf6954d89409 Author: Phillip Potter Date: Mon Feb 15 23:34:35 2021 +0000 staging: rtl8723bs: remove DBG_COUNTER calls from os_dep/recv_linux.c Remove all DBG_COUNTER macro calls from os_dep/recv_linux.c, as the corresponding variables are only ever written to and not used. This makes the code cleaner, and is necessary prior to removing the DBG_COUNTER definition itself. Reviewed-by: Dan Carpenter Signed-off-by: Phillip Potter Link: https://lore.kernel.org/r/20210215233440.80617-2-phil@philpotter.co.uk Signed-off-by: Greg Kroah-Hartman commit f8096ff38d5f62d8a2c473e1bec0163a1b2b86d8 Author: Dinghao Liu Date: Mon Mar 1 20:50:57 2021 +0800 drivers: misc: ad525x_dpot: Add missing check in dpot_read_spi The use of dpot_read_r8d8() after checking dpot->uid is similar. However, we check the return value and return an error code only in one path, which is odd. Link: https://lore.kernel.org/r/20210301125057.28819-1-dinghao.liu@zju.edu.cn Signed-off-by: Dinghao Liu Signed-off-by: Greg Kroah-Hartman commit bc6350167ef4e003e463c25417b48a446e48001d Author: Greg Kroah-Hartman Date: Tue Feb 16 16:08:28 2021 +0100 drivers: habanalabs: remove unused dentry pointer for debugfs files The dentry for the created debugfs file was being saved, but never used anywhere. As the pointer isn't needed for anything, and the debugfs files are being properly removed by removing the parent directory, remove the saved pointer as well, saving a tiny bit of memory and logic. Cc: Oded Gabbay Cc: Arnd Bergmann Cc: Tomer Tayar Cc: Moti Haimovski Cc: Omer Shpigelman Cc: Ofir Bitton Cc: linux-kernel@vger.kernel.org Reviewed-by: Oded Gabbay Signed-off-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210216150828.3855810-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit 37b85bd5f20cbe28140d370a840738b6f2e85cbf Author: Greg Kroah-Hartman Date: Tue Feb 16 16:12:09 2021 +0100 drivers: vmw_balloon: remove dentry pointer for debugfs There is no need to keep the dentry pointer around for the created debugfs file, as it is only needed when removing it from the system. When it is to be removed, ask debugfs itself for the pointer, to save on storage and make things a bit simpler. Cc: Nadav Amit Cc: "VMware, Inc." Cc: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Acked-by: Nadav Amit Link: https://lore.kernel.org/r/20210216151209.3954129-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit fb11de92ac6e4af0b22a79b93602b175603cd30a Author: Greg Kroah-Hartman Date: Tue Feb 16 16:04:10 2021 +0100 virtio_console: remove pointless check for debugfs_create_dir() It is impossible for debugfs_create_dir() to return NULL, so checking for it gives people a false sense that they actually are doing something if an error occurs. As there is no need to ever change kernel logic if debugfs is working "properly" or not, there is no need to check the return value of debugfs calls, so remove the checks here as they will never be triggered and are wrong. Cc: Amit Shah Cc: Arnd Bergmann Cc: virtualization@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Amit Shah Link: https://lore.kernel.org/r/20210216150410.3844635-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman commit ea16ef967ec88bd67466d564d461c3fdf7f85bd9 Author: Jingle Wu Date: Sun Mar 7 18:23:25 2021 -0800 Input: elan_i2c - reduce the resume time for new devices Newer controllers, such as Voxel, Delbin, Magple, Bobba and others, do not need to be reset after issuing power-on command, and skipping reset saves at least 100ms from resume time. Note that if first attempt of re-initializing device fails we will not be skipping reset on the subsequent ones. Signed-off-by: Jingle Wu Link: https://lore.kernel.org/r/20210226073537.4926-1-jingle.wu@emc.com.tw Signed-off-by: Dmitry Torokhov commit 01e055c120a46e78650b5f903088badbbdaae9ad Author: Viresh Kumar Date: Wed Mar 10 08:21:04 2021 +0530 arch_topology: Allow multiple entities to provide sched_freq_tick() callback This patch attempts to make it generic enough so other parts of the kernel can also provide their own implementation of scale_freq_tick() callback, which is called by the scheduler periodically to update the per-cpu arch_freq_scale variable. The implementations now need to provide 'struct scale_freq_data' for the CPUs for which they have hardware counters available, and a callback gets registered for each possible CPU in a per-cpu variable. The arch specific (or ARM AMU) counters are updated to adapt to this and they take the highest priority if they are available, i.e. they will be used instead of CPPC based counters for example. The special code to rebuild the sched domains, in case invariance status change for the system, is moved out of arm64 specific code and is added to arch_topology.c. Note that this also defines SCALE_FREQ_SOURCE_CPUFREQ but doesn't use it and it is added to show that cpufreq is also acts as source of information for FIE and will be used by default if no other counters are supported for a platform. Reviewed-by: Ionela Voinescu Tested-by: Ionela Voinescu Acked-by: Will Deacon # for arm64 Tested-by: Vincent Guittot Signed-off-by: Viresh Kumar commit eec73529a9321616ed13cf732cd21a17eb1a2836 Author: Viresh Kumar Date: Wed Mar 10 08:16:40 2021 +0530 arch_topology: Rename freq_scale as arch_freq_scale Rename freq_scale to a less generic name, as it will get exported soon for modules. Since x86 already names its own implementation of this as arch_freq_scale, lets stick to that. Suggested-by: Will Deacon Signed-off-by: Viresh Kumar commit 0ef6845c8c1c1d46bda4e8325f6f23b199e8daac Author: Jay Cornwall Date: Fri Mar 6 11:42:21 2020 -0600 drm/amdkfd: Add aldebaran trap handler support Similar to arcturus, but ARCH/ACC VGPRs may now be split unevenly. A new field in SQ_WAVE_GPR_ALLOC tracks the boundary between the two sets of VGPRs. Squash below patches: drm/amdkfd: Use preprocessor for IP-specific trap handler code drm/amdkfd: Fix VGPR restore race in gfx8/gfx9 trap handler drm/amdkfd: Remove duplicated code in gfx9 trap handler drm/amdkfd: Separate ARCH/ACC VGPR restore in trap handler drm/amdkfd: Reverse order of ARCH/ACC VGPR restore in trap handler Signed-off-by: Jay Cornwall Signed-off-by: Alex Deucher commit 5af81c6e6e6ba3d0409241a77cc1f0ba0e39df42 Author: Kevin Wang Date: Thu Mar 5 21:33:41 2020 +0800 drm/amdgpu: add aldebaran sdma firmware support (v2) add sdma firmware load support for soc model v2: drop some emulator leftovers (Alex) Signed-off-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Le Ma Signed-off-by: Alex Deucher commit 36e22d59dd10e4261079dcec6a44fc22b2a435e0 Author: Yong Zhao Date: Fri Nov 29 13:51:16 2019 -0500 drm/amdkfd: Add Aldebaran KFD support Add initial KFD support. Signed-off-by: Yong Zhao Signed-off-by: Alex Deucher commit c00a18ec0bd58f348626bd0029f1544427a8feb0 Author: Le Ma Date: Tue Nov 12 15:44:49 2019 +0800 drm/amdgpu: set ip blocks for aldebaran Set ip blocks and asic family id Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 759eb38ed147925527118da3240fc28c063e8639 Author: Le Ma Date: Mon Nov 18 18:14:36 2019 +0800 drm/amdgpu: correct mmBIF_SDMA4_DOORBELL_RANGE address for aldebaran On aldebaran, mmBIF_SDMA4_DOORBELL_RANGE isn't right next to mmBIF_SDMA3_DOORBELL_RANGE. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit b61a273e5d70edd8ea4be3c1cb0ab2fee9ef6667 Author: Le Ma Date: Tue Nov 12 17:17:10 2019 +0800 drm/amdgpu: add sdma block support for aldebaran Add initial sdma support for aldebaran, and this asic has 5 sdma instances. v2: remove adundant condition check Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit cdf545f35f8f031432106a163583d3540d253c45 Author: Le Ma Date: Tue Nov 12 16:52:46 2019 +0800 drm/amdgpu: add gfx v9 block support for aldebaran Add gfx initial support Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit d39da7dab14042fb7c10ee5fdc888a9ad3da362f Author: Le Ma Date: Tue Nov 12 16:16:03 2019 +0800 drm/amdgpu: set fw load type for aldebaran Set backdoor loading way in current phase v2: change case location to not break other asics Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 85e395506bfa9934b4bd0fc9bdc979f44c7c33b0 Author: Le Ma Date: Tue Nov 12 15:06:01 2019 +0800 drm/amdgpu: add gmc v9 block support for Aldebaran Add gfx memory controller support Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit f37945d50ff5194449ae1a8f53e862c2bcf43464 Author: Le Ma Date: Sat Sep 5 23:15:48 2020 +0800 drm/amdgpu: add mmhub support for aldebaran (v3) v1: dupilcate mmhub_v1_7.c from mmhub_v1_0.c because mmhub register address for aldebaran is different from existing asics (Le) v2: switch to latest mmhub_v9_4_2 register headers (Hawking) v3: squash in init VM_L2_CNTL3 default value for mmhub v1_7 Signed-off-by: Le Ma Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher commit 7906af5e9d635782800aad4a3c5b1e2176867ffc Author: Le Ma Date: Tue Nov 12 12:03:24 2019 +0800 drm/amdgpu: add soc15 common ip block support for aldebaran Initialize aldebaran common ip block Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 42719073b44ebb1b9083e305531522d1e04750e7 Author: Le Ma Date: Tue Nov 12 11:24:01 2019 +0800 drm/amdgpu: add gpu_info fw parse support for aldebaran Parses asic configurations stored in gpu_info firmware and make them available for driver to use. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 42b72608ae228e8a27bb601d7344004e37bf5e7b Author: Le Ma Date: Sat Sep 5 22:53:24 2020 +0800 drm/amdgpu: add register base init for aldebaran (v2) v1: add aldebaran_reg_base_init function to initialize register base for aldebaran (Le) v2: update VCN HWIP and initialize base offset (James) Signed-off-by: Le Ma Signed-off-by: James Zhu Reviewed-by: Hawking Zhang Reviewed-by: Leo Liu Acked-by: Evan Quan Signed-off-by: Alex Deucher commit dd9dd42528308f0534d2be261ba062f948af70c8 Author: Hawking Zhang Date: Sat Sep 5 22:10:52 2020 +0800 drm/amd/include: add ip offset header for aldebaran (v5) v1: re-use arct ip base offset array for aldebaran (Le) v2: create aldebaran ip base offset array for major ip blocks (Hawking) v3: re-use arct VCN ip base offset array for aldebaran (James) v4: correct MP1 ip base offset array (Hawking) v5: update VCN ip base offset array to aldebaran one (Hawking) Signed-off-by: Hawking Zhang Signed-off-by: Le Ma Signed-off-by: James Zhu Reviewed-by: Leo Liu Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit d46b417a918b66f17de85baf9ff033b1482fcc5e Author: Le Ma Date: Mon Nov 11 18:01:34 2019 +0800 drm/amdgpu: add aldebaran asic type Add aldebaran in amdgpu_asic_name array and amdgpu_asic_type enum Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Acked-by: Evan Quan Signed-off-by: Alex Deucher commit b77a9fdf526b8eca954d8f11a93847ddb65168d8 Author: Hawking Zhang Date: Mon Dec 7 20:37:25 2020 +0800 drm/amdgpu: add vcn v2_6_0 ip headers (v3) v1: Add vcn v2_6_0 register offset and shift masks in header files (Hawking) v2: Clean up vcn v2_6_0 registers (Alex) v3: update registers (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit b28f2165d0640c6ca5f0a605f1a77133621b903c Author: Hawking Zhang Date: Wed Dec 16 12:22:14 2020 +0800 drm/amdgpu: add umc v6_7_0 ip headers (v3) v1: Add umc v6_7_0 register offset and shift masks in header files (Hawking) v2: Clean up registers (Alex) v3: update registers (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit f19e49a27f956f4f61612d4fbf764917a36ec461 Author: Hawking Zhang Date: Mon Dec 7 20:35:36 2020 +0800 drm/amdgpu: add thm v13_0_2 ip headers (v3) v1: Add thm v13_0_2 register offset and shift masks in header files (Hawking) v2: Clean up thm v13_0_2 registers (Alex) v3: update registers (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit ca853314e78b0a65c20b6a889a23c31f918d4aa2 Author: Hawking Zhang Date: Mon Dec 7 20:42:54 2020 +0800 drm/amdgpu: add sdma v4_4_0 ip headers (v2) Add sdma v4_4_0 register offset and shift masks in header files v2: update registers (Alex) Signed-off-by: Hawking Zhang Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit be547828c0649eef0abb0662403d8f506aed774c Author: Hawking Zhang Date: Mon Dec 7 20:32:28 2020 +0800 drm/amdgpu: add smuio v13_0_2 ip headers (v3) v1: Add smuio v13_0_2 register offset and shift masks in header files (Hawking) v2: Clean up smuio v13_0_2 registers (Alex) v3: update registers (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit b8d037b32c5b1013bedc898ba8c25122415a7b3d Author: Hawking Zhang Date: Mon Dec 7 20:19:53 2020 +0800 drm/amdgpu: add mp v13_0_2 ip headers (v3) v1: Add mp v13_0_2 register offset and shift masks in header files (Hawking) v2: Clean up mp v13_0_2 registers (Alex) v3: update registers (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit b9dd2add842c0e4d50cbafe135356c2431fdbc8b Author: Hawking Zhang Date: Mon Dec 7 20:17:45 2020 +0800 drm/amdgpu: add mmhub v1_7 ip headers (v3) v1: Add mmhub v1_7 register offset and shift masks in header files (Hawking) v2: Clean up mmhub v1_7 registers (Alex) v3: Update registers (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 301a16138285ebfce961dbaa7d9da86c26ca7428 Author: Hawking Zhang Date: Mon Dec 7 20:14:03 2020 +0800 drm/amdgpu: add gc v9_4_2 ip headers (v3) v1: Add gc v9_4_2 register offset and shift masks in header files (Hawking) v2: Clean up gc v9_4_2 registers (Alex) v3: update registers (Alex) Signed-off-by: Hawking Zhang Signed-off-by: Alex Deucher Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit 4524a0b159028c2910dfe40469ed6512c455df61 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:45 2021 -0800 scsi: target: core: file: Don't duplicate memset(0xff) The function fd_do_prot_fill() is called from two callers fd_do_prot_unmap() and fd_format_prot(). Both callers initialize the passed buffer to 0xff with memset(). Move the memset() call to fd_do_prot_fill() to avoid duplication. Link: https://lore.kernel.org/r/20210228055645.22253-24-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit 4db6dfe62c5f76ce9eef28967c2e2000efde10d5 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:42 2021 -0800 scsi: target: core: pr: Initialize arrays at declaration time Avoids calling memset(). Link: https://lore.kernel.org/r/20210228055645.22253-21-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-22-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-23-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit 2d4e2daf4fed37c267893466753e0a46bcac5fb1 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:35 2021 -0800 scsi: target: configfs: Initialize arrays at declaration time Avoids calling memset(). Link: https://lore.kernel.org/r/20210228055645.22253-14-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-15-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-16-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-17-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-18-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-19-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-20-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit c22659fbb98b24538b1a049fb5504f5a756d09a0 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:34 2021 -0800 scsi: target: iscsi: Initialize arrays at declaration time Avoids calling memset(). Link: https://lore.kernel.org/r/20210228055645.22253-13-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit c4d81e7c53e7c51b903f20a197399fe30fcc3529 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:33 2021 -0800 scsi: target: iscsi: Remove unused macro PRINT_BUF Remove unused macro to fix the following compilation warning: drivers/target//iscsi/iscsi_target_util.c:31: warning: macro "PRINT_BUFF" is not used [-Wunused-macros] #define PRINT_BUFF(buff, len) \ Link: https://lore.kernel.org/r/20210228055645.22253-12-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit 91ce84a3d789667cb0e967d2bb1272ffd114ea2f Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:32 2021 -0800 scsi: target: iscsi: Remove unused macro TEXT_LEN Remove unused macro to fix the following compilation warning: drivers/target//iscsi/iscsi_target_nego.c:31: warning: macro "TEXT_LEN" is not used [-Wunused-macros] #define TEXT_LEN 4096 Link: https://lore.kernel.org/r/20210228055645.22253-11-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit fdc1339a421dca3ec2571f20a85214b5e37197f5 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:31 2021 -0800 scsi: target: iscsi: Remove unused macro ISCSI_INST_LAST_FAILURE_TYPE Remove unused macro to fix the following compilation warning: drivers/target//iscsi/iscsi_target_stat.c:31: warning: macro "ISCSI_INST_LAST_FAILURE_TYPE" is not used [-Wunused-macros] #define ISCSI_INST_LAST_FAILURE_TYPE 0 Link: https://lore.kernel.org/r/20210228055645.22253-10-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit c3a27351d6db8e4e6729feb83124c09c9958a983 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:29 2021 -0800 scsi: target: core: Remove unused macros NONE and ISPRINT Remove the unuseds macro to fix the following compilation warnings: drivers/target//target_core_stat.c:34: warning: macro "NONE" is not used [-Wunused-macros] #define NONE "None" drivers/target//iscsi/iscsi_target_stat.c:36: warning: macro "ISPRINT" is not used [-Wunused-macros] #define ISPRINT(a) ((a >= ' ') && (a <= '~')) Link: https://lore.kernel.org/r/20210228055645.22253-8-chaitanya.kulkarni@wdc.com Link: https://lore.kernel.org/r/20210228055645.22253-9-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit 5cfb5b0258a08cc76822343af648604713d7d995 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:27 2021 -0800 scsi: target: core: Get rid of warning in compare_and_write_do_cmp() Rename function local variable i to sg_cnt so we can get rid of the shadow variable compilation warning: unsigned int i; ^ int i; ^ Link: https://lore.kernel.org/r/20210228055645.22253-6-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit 2c958a8c1f15f56a528769f4e1402e33e7a4b90e Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:28 2021 -0800 scsi: target: pscsi: Remove unused macro ISPRINT Remove unused macro to fix the following compilation warning: drivers/target//target_core_pscsi.c:37: warning: macro "ISPRINT" is not used [-Wunused-macros] #define ISPRINT(a) ((a >= ' ') && (a <= '~')) Link: https://lore.kernel.org/r/20210228055645.22253-7-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit fd48c056a32ed6e7754c7c475490f3bed54ed378 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:26 2021 -0800 scsi: target: pscsi: Fix warning in pscsi_complete_cmd() This fixes a compilation warning in pscsi_complete_cmd(): drivers/target/target_core_pscsi.c: In function ‘pscsi_complete_cmd’: drivers/target/target_core_pscsi.c:624:5: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */ Link: https://lore.kernel.org/r/20210228055645.22253-5-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit c151eddbef7eb67322e8187d763953e9c70d4bac Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:25 2021 -0800 scsi: target: iblock: Fix type of logs_per_phys According to ilog2() it expects 32/64 bit unsigned value. "  147  * ilog2 - log base 2 of 32-bit or a 64-bit unsigned value" Replace type of logs_per_phys from int to unsigned int. Link: https://lore.kernel.org/r/20210228055645.22253-4-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit a2c6c6a3b1ff4c1094f10ee581309d80568649a0 Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:24 2021 -0800 scsi: target: iblock: Trim line longer than 80 characters Trim the line that is longer than 80 characters, which is inconsistent with the rest of the code. Link: https://lore.kernel.org/r/20210228055645.22253-3-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit bc9e0e366fceda0b7c534a210258357a229aea7a Author: Chaitanya Kulkarni Date: Sat Feb 27 21:56:23 2021 -0800 scsi: target: iblock: Remove an extra argument The two arguments to the functions op and opf which are REQ_OP_XXX and REQ_XXX flags belong to the two different namespaces, i.e. they can be combined safely given that REQ_OP_XXX takes 8 bits of the flags and rest is available to REQ_XXX flags. Replace op and op_flag arguments with opf. Link: https://lore.kernel.org/r/20210228055645.22253-2-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie Reviewed-by: Johannes Thumshirn Signed-off-by: Chaitanya Kulkarni Signed-off-by: Martin K. Petersen commit 1080782f13e3604351e690bd2fa84ebc3b4847f6 Author: Bodo Stroesser Date: Fri Mar 5 20:00:09 2021 +0100 scsi: target: tcmu: Use GFP_NOIO while handling cmds or holding cmdr_lock Especially when using tcmu with tcm_loop, memory allocations with GFP_KERNEL for a LUN can cause write back to the same LUN. So we have to use GFP_NOIO when allocation is done while handling commands or while holding cmdr_lock. Link: https://lore.kernel.org/r/20210305190009.32242-1-bostroesser@gmail.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit f7c89771d07dce0e0ac6c4d8d2048d9aa7e1542c Author: Bodo Stroesser Date: Wed Feb 24 19:53:35 2021 +0100 scsi: target: tcmu: Replace radix_tree with XArray An attempt from Matthew Wilcox to replace radix-tree usage by XArray in tcmu more than 1 year ago unfortunately got lost. I rebased that work on latest tcmu and tested it. Link: https://lore.kernel.org/r/20210224185335.13844-3-bostroesser@gmail.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit d3cbb743c3624352333fd6139fc32f17433fca2d Author: Bodo Stroesser Date: Wed Feb 24 19:53:34 2021 +0100 scsi: target: tcmu: Replace IDR by XArray An attempt from Matthew Wilcox to replace IDR usage by XArray in tcmu more than 1 year ago unfortunately got lost. I rebased that work on latest tcmu and tested it. Link: https://lore.kernel.org/r/20210224185335.13844-2-bostroesser@gmail.com Reviewed-by: Mike Christie Signed-off-by: Bodo Stroesser Signed-off-by: Martin K. Petersen commit 083d248b2d44ab7513b2410121a4ac5de267d0ee Author: zuoqilin Date: Thu Mar 4 13:51:20 2021 +0800 scsi: FlashPoint: Fix typo Change 'defualt' to 'default'. Link: https://lore.kernel.org/r/20210304055120.2221-1-zuoqilin1@163.com Acked-by: Khalid Aziz Signed-off-by: zuoqilin Signed-off-by: Martin K. Petersen commit 18c2a59a419009601d09c13e0ee8e5be826a95d8 Author: Jiapeng Chong Date: Thu Mar 4 17:28:44 2021 +0800 scsi: ibmvfc: Switch to using kobj_to_dev() Fix the following coccicheck warnings: ./drivers/scsi/ibmvscsi/ibmvfc.c:3483:60-61: WARNING opportunity for kobj_to_dev(). Link: https://lore.kernel.org/r/1614850124-54111-1-git-send-email-jiapeng.chong@linux.alibaba.com Reported-by: Abaci Robot Acked-by: Tyrel Datwyler Signed-off-by: Jiapeng Chong Signed-off-by: Martin K. Petersen commit b4388e3db56a371c5a8ef8116358028a66278297 Author: Zhang Yunkai Date: Sat Mar 6 03:47:06 2021 -0800 scsi: ufs: Remove duplicate include in ufshcd 'blkdev.h' included in 'ufshcd.c' is included twice. Link: https://lore.kernel.org/r/20210306114706.217873-1-zhang.yunkai@zte.com.cn Reviewed-by: Bean Huo Signed-off-by: Zhang Yunkai Signed-off-by: Martin K. Petersen commit 014ace23a5ec3a030bd98dba2f0ad4f1d0c724bf Author: Bhaskar Chowdhury Date: Mon Mar 1 18:47:36 2021 +0530 scsi: qla4xxx: Fix a typo s/circuting/circuiting/ Link: https://lore.kernel.org/r/20210301131736.14236-1-unixbhaskar@gmail.com Acked-by: Randy Dunlap Signed-off-by: Bhaskar Chowdhury Signed-off-by: Martin K. Petersen commit 9ec3d4c1056533d09092f9f2b055d48f925506fe Author: Igor Pylypiv Date: Thu Mar 4 22:09:08 2021 -0800 scsi: pm80xx: Replace magic numbers with device state defines This improves the code readability. Link: https://lore.kernel.org/r/20210305060908.2476850-1-ipylypiv@google.com Acked-by: Jack Wang Signed-off-by: Igor Pylypiv Signed-off-by: Martin K. Petersen commit 5b1be37f773b24885a6066732661c804bc32bf53 Author: Igor Pylypiv Date: Mon Mar 1 10:18:47 2021 -0800 scsi: pm80xx: Remove list entry from pm8001_ccb_info List entry is not used. Link: https://lore.kernel.org/r/20210301181847.2893199-1-ipylypiv@google.com Acked-by: Jack Wang Signed-off-by: Igor Pylypiv Signed-off-by: Martin K. Petersen commit 9530141455c968938a913d602a236c2a7b0322e1 Author: Kefeng Wang Date: Thu Feb 25 15:03:03 2021 +0800 riscv: Add ARCH_HAS_FORTIFY_SOURCE FORTIFY_SOURCE could detect various overflows at compile and run time. ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built and run with CONFIG_FORTIFY_SOURCE. Select it in RISCV. See more about this feature from commit 6974f0c4555e ("include/linux/string.h: add the option of fortified string.h functions"). Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit f6e5aedf470bd4522732595a85688052e3cbc03f Author: Kefeng Wang Date: Thu Feb 25 14:54:17 2021 +0800 riscv: Add support for memtest The riscv [rv32_]defconfig enabled CONFIG_MEMTEST, but memtest feature is not supported in RISCV. Add early_memtest() to support for memtest. Signed-off-by: Kefeng Wang Signed-off-by: Palmer Dabbelt commit c1acda9807e2bbe1d2026b44f37d959d6d8266c8 Merge: 05a59d79793d4 32f91529e2bdb Author: David S. Miller Date: Tue Mar 9 18:07:05 2021 -0800 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next Alexei Starovoitov says: ==================== pull-request: bpf-next 2021-03-09 The following pull-request contains BPF updates for your *net-next* tree. We've added 90 non-merge commits during the last 17 day(s) which contain a total of 114 files changed, 5158 insertions(+), 1288 deletions(-). The main changes are: 1) Faster bpf_redirect_map(), from Björn. 2) skmsg cleanup, from Cong. 3) Support for floating point types in BTF, from Ilya. 4) Documentation for sys_bpf commands, from Joe. 5) Support for sk_lookup in bpf_prog_test_run, form Lorenz. 6) Enable task local storage for tracing programs, from Song. 7) bpf_for_each_map_elem() helper, from Yonghong. ==================== Signed-off-by: David S. Miller commit 32f91529e2bdbe0d92edb3ced41dfba4beffa84a Merge: 11d39cfeecfc9 ee75aef23afe6 Author: Daniel Borkmann Date: Wed Mar 10 01:06:34 2021 +0100 Merge branch 'bpf-xdp-redirect' Björn Töpel says: ==================== This two patch series contain two optimizations for the bpf_redirect_map() helper and the xdp_do_redirect() function. The bpf_redirect_map() optimization is about avoiding the map lookup dispatching. Instead of having a switch-statement and selecting the correct lookup function, we let bpf_redirect_map() be a map operation, where each map has its own bpf_redirect_map() implementation. This way the run-time lookup is avoided. The xdp_do_redirect() patch restructures the code, so that the map pointer indirection can be avoided. Performance-wise I got 4% improvement for XSKMAP (sample:xdpsock/rx-drop), and 8% (sample:xdp_redirect_map) on my machine. v5->v6: Removed REDIR enum, and instead use map_id and map_type. (Daniel) Applied Daniel's fixups on patch 1. (Daniel) v4->v5: Renamed map operation to map_redirect. (Daniel) v3->v4: Made bpf_redirect_map() a map operation. (Daniel) v2->v3: Fix build when CONFIG_NET is not set. (lkp) v1->v2: Removed warning when CONFIG_BPF_SYSCALL was not set. (lkp) Cleaned up case-clause in xdp_do_generic_redirect_map(). (Toke) Re-added comment. (Toke) rfc->v1: Use map_id, and remove bpf_clear_redirect_map(). (Toke) Get rid of the macro and use __always_inline. (Jesper) ==================== Signed-off-by: Daniel Borkmann commit ee75aef23afe6e88497151c127c13ed69f41aaa2 Author: Björn Töpel Date: Mon Mar 8 12:29:07 2021 +0100 bpf, xdp: Restructure redirect actions The XDP_REDIRECT implementations for maps and non-maps are fairly similar, but obviously need to take different code paths depending on if the target is using a map or not. Today, the redirect targets for XDP either uses a map, or is based on ifindex. Here, the map type and id are added to bpf_redirect_info, instead of the actual map. Map type, map item/ifindex, and the map_id (if any) is passed to xdp_do_redirect(). For ifindex-based redirect, used by the bpf_redirect() XDP BFP helper, a special map type/id are used. Map type of UNSPEC together with map id equal to INT_MAX has the special meaning of an ifindex based redirect. Note that valid map ids are 1 inclusive, INT_MAX exclusive ([1,INT_MAX[). In addition to making the code easier to follow, using explicit type and id in bpf_redirect_info has a slight positive performance impact by avoiding a pointer indirection for the map type lookup, and instead use the cacheline for bpf_redirect_info. Since the actual map is not passed via bpf_redirect_info anymore, the map lookup is only done in the BPF helper. This means that the bpf_clear_redirect_map() function can be removed. The actual map item is RCU protected. The bpf_redirect_info flags member is not used by XDP, and not read/written any more. The map member is only written to when required/used, and not unconditionally. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Reviewed-by: Maciej Fijalkowski Acked-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210308112907.559576-3-bjorn.topel@gmail.com commit e6a4750ffe9d701c4d55212b14b615e63571d235 Author: Björn Töpel Date: Mon Mar 8 12:29:06 2021 +0100 bpf, xdp: Make bpf_redirect_map() a map operation Currently the bpf_redirect_map() implementation dispatches to the correct map-lookup function via a switch-statement. To avoid the dispatching, this change adds bpf_redirect_map() as a map operation. Each map provides its bpf_redirect_map() version, and correct function is automatically selected by the BPF verifier. A nice side-effect of the code movement is that the map lookup functions are now local to the map implementation files, which removes one additional function call. Signed-off-by: Björn Töpel Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210308112907.559576-2-bjorn.topel@gmail.com commit 11d39cfeecfc9d92a5faa2a55c228e796478e0cb Author: Andrii Nakryiko Date: Mon Mar 8 20:43:22 2021 -0800 selftests/bpf: Fix compiler warning in BPF_KPROBE definition in loop6.c Add missing return type to BPF_KPROBE definition. Without it, compiler generates the following warning: progs/loop6.c:68:12: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] BPF_KPROBE(trace_virtqueue_add_sgs, void *unused, struct scatterlist **sgs, ^ 1 warning generated. Fixes: 86a35af628e5 ("selftests/bpf: Add a verifier scale test with unknown bounded loop") Signed-off-by: Andrii Nakryiko Signed-off-by: Alexei Starovoitov Signed-off-by: Daniel Borkmann Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210309044322.3487636-1-andrii@kernel.org commit 406e98afffe975982f63ea5d21bf9a47a81b56ee Author: Rafał Miłecki Date: Fri Feb 19 06:50:28 2021 +0100 arm64: dts: broadcom: bcm4908: describe Netgear R8000P switch R8000P model has 4 LAN ports and 1 WAN port. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit b1bbe48eec190b6a35f400c5a3ec6b0fc8fc3fe6 Author: Rafał Miłecki Date: Fri Feb 19 06:50:27 2021 +0100 arm64: dts: broadcom: bcm4908: describe Ethernet controller BCM4908 SoCs have an integrated Ethernet controller. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 3c321ba794ca6383a4aa68ea803e18cc6ad44412 Author: Rafał Miłecki Date: Fri Feb 19 06:50:26 2021 +0100 arm64: dts: broadcom: bcm4908: describe USB PHY BCM4908 uses slightly modified STB family USB PHY. It handles OHCI/EHCI and XHCI. It requires powering up using the PMB. Signed-off-by: Rafał Miłecki Signed-off-by: Florian Fainelli commit 436cb709f8a9fd1a52e00e830e715c63191c2e63 Author: Colin Ian King Date: Wed Feb 24 15:13:49 2021 +0000 i3c: master: svc: remove redundant assignment to cmd->read_len The assignment of xfer_len to cmd->read_len appears to be redundant as the next statement re-assigns the value 0 to it. Clean up the code by removing the redundant first assignment. Addresses-Coverity: ("Unused value") Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver") Signed-off-by: Colin Ian King Reviewed-by: Miquel Raynal Signed-off-by: Alexandre Belloni Link: https://lore.kernel.org/r/20210224151349.202332-1-colin.king@canonical.com commit db16e07269c2b4346e4332e43f04e447ef14fd2f Author: Juergen Gross Date: Tue Mar 9 14:48:04 2021 +0100 x86/alternative: Drop unused feature parameter from ALTINSTR_REPLACEMENT() The macro ALTINSTR_REPLACEMENT() doesn't make use of the feature parameter, so drop it. Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov Acked-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20210309134813.23912-4-jgross@suse.com commit 34c9a7c5b70cdbc58540a0f1c984c11fd185e160 Merge: a0d73acc1e4bc ccb0e23ca2744 Author: Alexei Starovoitov Date: Tue Mar 9 10:59:46 2021 -0800 Merge branch 'Add clang-based BTF_KIND_FLOAT tests' Ilya Leoshkevich says: ==================== The two tests here did not make it into the main BTF_KIND_FLOAT series because of dependency on LLVM. v0: https://lore.kernel.org/bpf/20210226202256.116518-10-iii@linux.ibm.com/ v1 -> v0: Per Alexei's suggestion, document the required LLVM commit. v1: https://lore.kernel.org/bpf/20210305170844.151594-1-iii@linux.ibm.com/ v1 -> v2: Per Andrii's suggestions, use double in core_reloc_size___diff_sz and non-pointer member in btf_dump_test_case_syntax. ==================== Signed-off-by: Alexei Starovoitov commit ccb0e23ca27445e2408f52944660f9e5e5d1c4b1 Author: Ilya Leoshkevich Date: Tue Mar 9 01:56:49 2021 +0100 selftests/bpf: Add BTF_KIND_FLOAT to btf_dump_test_case_syntax Check that dumping various floating-point types produces a valid C code. Suggested-by: Andrii Nakryiko Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210309005649.162480-3-iii@linux.ibm.com commit 3fcd50d6f9a963a21e142d71be135eff6a374d2d Author: Ilya Leoshkevich Date: Tue Mar 9 01:56:48 2021 +0100 selftests/bpf: Add BTF_KIND_FLOAT to test_core_reloc_size Verify that bpf_core_field_size() is working correctly with floats. Also document the required clang version. Suggested-by: John Fastabend Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210309005649.162480-2-iii@linux.ibm.com commit 34731ed13e8a8ca95fa0dca466537396b5f2d1af Author: Arnd Bergmann Date: Mon Mar 8 16:30:46 2021 +0100 leds: lgm: fix gpiolib dependency Without gpiolib, the driver fails to build: drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip' struct gpio_chip chip; ^ include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip' struct gpio_chip; ^ drivers/leds/blink/leds-lgm-sso.c:263:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration] gpiod_set_value(led->gpiod, val); ^ drivers/leds/blink/leds-lgm-sso.c:263:3: note: did you mean 'gpio_set_value'? include/linux/gpio.h:168:20: note: 'gpio_set_value' declared here static inline void gpio_set_value(unsigned gpio, int value) ^ drivers/leds/blink/leds-lgm-sso.c:345:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration] gpiod_set_value(led->gpiod, 1); ^ Add the dependency in Kconfig. Fixes: c3987cd2bca3 ("leds: lgm: Add LED controller driver for LGM SoC") Signed-off-by: Arnd Bergmann Signed-off-by: Pavel Machek commit 4c842af368398ad061ba5c8fc4855f5d251d370b Author: Suman Anna Date: Thu Mar 4 10:07:12 2021 -0600 arm64: dts: ti: k3-j721e-main: Add ICSSG nodes Add the DT nodes for the ICSSG0 and ICSSG1 processor subsystems that are present on the K3 J721E SoCs. The two ICSSGs are identical to each other for the most part, with the ICSSG1 supporting slightly enhanced features for supporting SGMII PRU Ethernet. Each ICSSG instance is represented by a PRUSS subsystem node and other child nodes. These nodes are enabled by default. The ICSSGs on K3 J721E SoCs are revised versions of the ICSSG on the first AM65x SR1.0 SoCs. The PRU IRAMs are slightly smaller, and the IP includes two new auxiliary PRU cores called Tx_PRUs. The Tx_PRUs have 6 KB of IRAMs and leverage the same host interrupts as the regular PRU cores. All The ICSSG host interrupts intended towards the main Arm core are also shared with other processors on the SoC, and can be partitioned as per system integration needs. The ICSSG subsystem node contains the entire address space. The various sub-modules of the ICSSG are represented as individual child nodes (so platform devices themselves) of the PRUSS subsystem node. These include the two PRU cores, two RTU cores, two Tx_PRU cores and the interrupt controller. All the Data RAMs are represented within a child node of its own named 'memories' without any compatible. The Real Time Media Independent Interface controller (MII_RT), the Gigabit capable MII_G_RT and the CFG sub-module are represented as syscon nodes. The ICSSG CFG sub-module provides two internal clock muxes, and these are represented as children of the CFG child node 'clocks' by the 'coreclk-mux' and iepclk-mux' clk nodes. The default parents for these mux clocks are also defined using the assigned-clock-parents property. The DT nodes use all standard properties. The regs property in the PRU/RTU/Tx_PRU nodes define the addresses for the Instruction RAM, the Debug and Control sub-modules for that PRU core. The firmware for each PRU/RTU/Tx_PRU core is defined through a 'firmware-name' property. The default names for the firmware images for each PRU, RTU and Tx_PRU cores are defined as follows (these can be adjusted either in derivative board dts files or through sysfs at runtime if required): ICSSG0 PRU0 Core : j7-pru0_0-fw ; PRU1 Core : j7-pru0_1-fw ICSSG0 RTU0 Core : j7-rtu0_0-fw ; RTU1 Core : j7-rtu0_1-fw ICSSG0 Tx_PRU0 Core : j7-txpru0_0-fw ; Tx_PRU1 Core : j7-txpru0_1-fw ICSSG1 PRU0 Core : j7-pru1_0-fw ; PRU1 Core : j7-pru1_1-fw ICSSG1 RTU0 Core : j7-rtu1_0-fw ; RTU1 Core : j7-rtu1_1-fw ICSSG1 Tx_PRU0 Core : j7-txpru1_0-fw ; Tx_PRU1 Core : j7-txpru1_1-fw Note: 1. The ICSSG INTC on J721E SoCs share all the host interrupts with other processors, so use the 'ti,irqs-reserved' property in derivative board dts files _if_ any of them should not be handled by the host OS. 2. There are few more sub-modules like the Industrial Ethernet Peripherals (IEPs), MDIO, PWM, UART that do not have bindings and so will be added in the future. Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210304160712.8452-3-s-anna@ti.com commit 9818d1a09e980a9ca5575f83c8499f2e6a8545d7 Author: Suman Anna Date: Thu Mar 4 10:07:11 2021 -0600 arm64: dts: ti: k3-am65-main: Add ICSSG nodes Add the DT nodes for the ICSSG0, ICSSG1 and ICSSG2 processor subsystems that are present on the K3 AM65x SoCs. The three ICSSGs are identical to each other for the most part, with the ICSSG2 supporting slightly enhanced features for supporting SGMII PRU Ethernet. Each ICSSG instance is represented by a PRUSS subsystem node. These nodes are enabled by default. The ICSSGs on K3 AM65x SoCs are super-sets of the PRUSS on the AM57xx/ 6AK2G SoCs except for larger Shared Data RAM and the lack of a PRU-ICSS crossbar. They include two auxiliary PRU cores called RTUs and few other additional sub-modules. The interrupt integration is also different on the K3 AM65x SoCs and are propagated through various SoC-level Interrupt Router and Interrupt Aggregator blocks. The AM65x SR2.0 SoCs have a revised ICSSG IP that is based off the subsequent IP used on J721E SoCs, and has two new auxiliary PRU cores called Tx_PRUs. The Tx_PRUs have 6 KB of IRAMs and leverage the same host interrupts as the regular PRU cores. The Broadside (BS) RAM within each core is also sized differently w.r.t SR1.0. The ICSSG subsystem node contains the entire address space. The various sub-modules of the ICSSG are represented as individual child nodes (so platform devices themselves) of the PRUSS subsystem node. These include the various PRU cores and the interrupt controller. All the Data RAMs are represented within a child node of its own named 'memories' without any compatible. The Real Time Media Independent Interface controllers (MII_RT and MII_G_RT), and the CFG sub-module are represented as syscon nodes. The ICSSG CFG module has clock muxes for IEP clock and CORE clock, these clk nodes are added under the CFG child node 'clocks'. The default parents for these mux clocks are also assigned. The DT nodes use all standard properties. The regs property in the PRU/RTU/Tx_PRU nodes define the addresses for the Instruction RAM, the Debug and Control sub-modules for that PRU core. The firmware for each PRU/RTU/Tx_PRU core is defined through a 'firmware-name' property. The default names for the firmware images for each PRU, RTU and Tx_PRU cores are defined as follows (these can be adjusted either in derivative board dts files or through sysfs at runtime if required): ICSSG0 PRU0 Core : am65x-pru0_0-fw ; PRU1 Core : am65x-pru0_1-fw ICSSG0 RTU0 Core : am65x-rtu0_0-fw ; RTU1 Core : am65x-rtu0_1-fw ICSSG0 Tx_PRU0 Core : am65x-txpru0_0-fw ; Tx_PRU1 Core : am65x-txpru0_1-fw ICSSG1 PRU0 Core : am65x-pru1_0-fw ; PRU1 Core : am65x-pru1_1-fw ICSSG1 RTU0 Core : am65x-rtu1_0-fw ; RTU1 Core : am65x-rtu1_1-fw ICSSG1 Tx_PRU0 Core : am65x-txpru1_0-fw ; Tx_PRU1 Core : am65x-txpru1_1-fw ICSSG2 PRU0 Core : am65x-pru2_0-fw ; PRU1 Core : am65x-pru2_1-fw ICSSG2 RTU0 Core : am65x-rtu2_0-fw ; RTU1 Core : am65x-rtu2_1-fw ICSSG2 Tx_PRU0 Core : am65x-txpru2_0-fw ; Tx_PRU1 Core : am65x-txpru2_1-fw Note: 1. The ICSSG nodes are all added as per the SR2.0 device. Any sub-module IP differences need to be handled within the driver using SoC device match logic or separate dts/overlay files (if needs to be supported) with the Tx_PRU nodes expected to be disabled at the minimum. 2. The ICSSG INTC on AM65x SoCs share 5, 6, 7 host interrupts with other processors, so use the 'ti,irqs-reserved' property in derivative board dts files _if_ any of them should not be handled by the host OS. 3. There are few more sub-modules like the Industrial Ethernet Peripherals (IEPs), MDIO, PWM, UART that do not have bindings and so will be added in the future. Signed-off-by: Suman Anna Signed-off-by: Roger Quadros Signed-off-by: Nishanth Menon Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210304160712.8452-2-s-anna@ti.com commit 9d232469bcd772dbedb9e75a165c681b920524ee Author: Alexander Aring Date: Mon Mar 1 17:05:20 2021 -0500 fs: dlm: add shutdown hook This patch fixes issues which occurs when dlm lowcomms synchronize their workqueues but dlm application layer already released the lockspace. In such cases messages like: dlm: gfs2: release_lockspace final free dlm: invalid lockspace 3841231384 from 1 cmd 1 type 11 are printed on the kernel log. This patch is solving this issue by introducing a new "shutdown" hook before calling "stop" hook when the lockspace is going to be released finally. This should pretend any dlm messages sitting in the workqueues during or after lockspace removal. It's necessary to call dlm_scand_stop() as I instrumented dlm_lowcomms_get_buffer() code to report a warning after it's called after dlm_midcomms_shutdown() functionality, see below: WARNING: CPU: 1 PID: 3794 at fs/dlm/midcomms.c:1003 dlm_midcomms_get_buffer+0x167/0x180 Modules linked in: joydev iTCO_wdt intel_pmc_bxt iTCO_vendor_support drm_ttm_helper ttm pcspkr serio_raw i2c_i801 i2c_smbus drm_kms_helper virtio_scsi lpc_ich virtio_balloon virtio_console xhci_pci xhci_pci_renesas cec qemu_fw_cfg drm [last unloaded: qxl] CPU: 1 PID: 3794 Comm: dlm_scand Tainted: G W 5.11.0+ #26 Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.13.0-2.module+el8.3.0+7353+9de0a3cc 04/01/2014 RIP: 0010:dlm_midcomms_get_buffer+0x167/0x180 Code: 5d 41 5c 41 5d 41 5e 41 5f c3 0f 0b 45 31 e4 5b 5d 4c 89 e0 41 5c 41 5d 41 5e 41 5f c3 4c 89 e7 45 31 e4 e8 3b f1 ec ff eb 86 <0f> 0b 4c 89 e7 45 31 e4 e8 2c f1 ec ff e9 74 ff ff ff 0f 1f 80 00 RSP: 0018:ffffa81503f8fe60 EFLAGS: 00010202 RAX: 0000000000000008 RBX: ffff8f969827f200 RCX: 0000000000000001 RDX: 0000000000000000 RSI: ffffffffad1e89a0 RDI: ffff8f96a5294160 RBP: 0000000000000001 R08: 0000000000000000 R09: ffff8f96a250bc60 R10: 00000000000045d3 R11: 0000000000000000 R12: ffff8f96a250bc60 R13: ffffa81503f8fec8 R14: 0000000000000070 R15: 0000000000000c40 FS: 0000000000000000(0000) GS:ffff8f96fbc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055aa3351c000 CR3: 000000010bf22000 CR4: 00000000000006e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: dlm_scan_rsbs+0x420/0x670 ? dlm_uevent+0x20/0x20 dlm_scand+0xbf/0xe0 kthread+0x13a/0x150 ? __kthread_bind_mask+0x60/0x60 ret_from_fork+0x22/0x30 To synchronize all dlm scand messages we stop it right before shutdown hook. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit eec054b5a7cfe6d1f1598a323b05771ee99857b5 Author: Alexander Aring Date: Mon Mar 1 17:05:19 2021 -0500 fs: dlm: flush swork on shutdown This patch fixes the flushing of send work before shutdown. The function cancel_work_sync() is not the right workqueue functionality to use here as it would cancel the work if the work queues itself. In cases of EAGAIN in send() for dlm message we need to be sure that everything is send out before. The function flush_work() will ensure that every send work is be done inclusive in EAGAIN cases. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit df9e06b800ed025411ce9ab348299b3ef258cf8b Author: Alexander Aring Date: Mon Mar 1 17:05:18 2021 -0500 fs: dlm: remove unaligned memory access handling This patch removes unaligned memory access handling for receiving midcomms messages. This handling will not fix the unaligned memory access in general. All messages should be length aligned to 8 bytes, there exists cases where this isn't the case. It's part of the sending handling to not send such messages. As the sending handling itself, with the internal allocator of page buffers, can occur in unaligned memory access of dlm message fields we just ignore that problem for now as it seems this code is used by architecture which can handle it. This patch adds a comment to take care about that problem in a major bump of dlm protocol. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 710176e8363f269c6ecd73d203973b31ace119d3 Author: Alexander Aring Date: Mon Mar 1 17:05:17 2021 -0500 fs: dlm: check on minimum msglen size This patch adds an additional check for minimum dlm header size which is an invalid dlm message and signals a broken stream. A msglen field cannot be less than the dlm header size because the field is inclusive header lengths. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit f0747ebf48f362ebfc93bc383d6be2b8c8f05b5a Author: Alexander Aring Date: Mon Mar 1 17:05:16 2021 -0500 fs: dlm: simplify writequeue handling This patch cleans up the current dlm sending allocator handling by using some named macros, list functionality and removes some goto statements. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit e1a7cbce53f6524e28421b980464a36f0fa9631c Author: Alexander Aring Date: Mon Mar 1 17:05:15 2021 -0500 fs: dlm: use GFP_ZERO for page buffer This patch uses GFP_ZERO for allocate a page for the internal dlm sending buffer allocator instead of calling memset zero after every allocation. An already allocated space will never be reused again. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit c45674fbdda138814ca21138475219c96fa5aa1f Author: Alexander Aring Date: Mon Mar 1 17:05:14 2021 -0500 fs: dlm: change allocation limits While running tcpkill I experienced invalid header length values while receiving to check that a node doesn't try to send a invalid dlm message we also check on applications minimum allocation limit. Also use DEFAULT_BUFFER_SIZE as maximum allocation limit. The define LOWCOMMS_MAX_TX_BUFFER_LEN is to calculate maximum buffer limits on application layer, future midcomms layer will subtract their needs from this define. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 517461630d1c25ee4dfc1dee80973a64189d6ccf Author: Alexander Aring Date: Mon Mar 1 17:05:13 2021 -0500 fs: dlm: add check if dlm is currently running This patch adds checks for dlm config attributes regarding to protocol parameters as it makes only sense to change them when dlm is not running. It also adds a check for valid protocol specifiers and return invalid argument if they are not supported. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 8aa9540b49e0833feba75dbf4f45babadd0ed215 Author: Alexander Aring Date: Mon Mar 1 17:05:12 2021 -0500 fs: dlm: add errno handling to check callback This allows to return individual errno values for the config attribute check callback instead of returning invalid argument only. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit e9a470acd930574be812663708dfad6f6f94d80a Author: Alexander Aring Date: Mon Mar 1 17:05:11 2021 -0500 fs: dlm: set subclass for othercon sock_mutex This patch sets the lockdep subclass for the othercon socket mutex. In various places the connection socket mutex is held while locking the othercon socket mutex. This patch will remove lockdep warnings when such case occurs. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit b30a624f50d9b637ffe9ef3cf4c53abd5bc607d1 Author: Alexander Aring Date: Mon Mar 1 17:05:10 2021 -0500 fs: dlm: set connected bit after accept This patch sets the CF_CONNECTED bit when dlm accepts a connection from another node. If we don't set this bit, next time if the connection socket gets writable it will assume an event that the connection is successfully connected. However that is only the case when the connection did a connect. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit e125fbeb538e5e35a00c6c8150a5361bef34814c Author: Alexander Aring Date: Mon Mar 1 17:05:09 2021 -0500 fs: dlm: fix mark setting deadlock This patch fixes an deadlock issue when dlm_lowcomms_close() is called. When dlm_lowcomms_close() is called the clusters_root.subsys.su_mutex is held to remove configfs items. At this time we flushing (e.g. cancel_work_sync()) the workers of send and recv workqueue. Due the fact that we accessing configfs items (mark values), these workers will lock clusters_root.subsys.su_mutex as well which are already hold by dlm_lowcomms_close() and ends in a deadlock situation. [67170.703046] ====================================================== [67170.703965] WARNING: possible circular locking dependency detected [67170.704758] 5.11.0-rc4+ #22 Tainted: G W [67170.705433] ------------------------------------------------------ [67170.706228] dlm_controld/280 is trying to acquire lock: [67170.706915] ffff9f2f475a6948 ((wq_completion)dlm_recv){+.+.}-{0:0}, at: __flush_work+0x203/0x4c0 [67170.708026] but task is already holding lock: [67170.708758] ffffffffa132f878 (&clusters_root.subsys.su_mutex){+.+.}-{3:3}, at: configfs_rmdir+0x29b/0x310 [67170.710016] which lock already depends on the new lock. The new behaviour adds the mark value to the node address configuration which doesn't require to held the clusters_root.subsys.su_mutex by accessing mark values in a separate datastructure. However the mark values can be set now only after a node address was set which is the case when the user is using dlm_controld. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 92c48950b43f4a767388cf87709d8687151a641f Author: Alexander Aring Date: Mon Mar 1 17:05:08 2021 -0500 fs: dlm: fix debugfs dump This patch fixes the following message which randomly pops up during glocktop call: seq_file: buggy .next function table_seq_next did not update position index The issue is that seq_read_iter() in fs/seq_file.c also needs an increment of the index in an non next record case as well which this patch fixes otherwise seq_read_iter() will print out the above message. Signed-off-by: Alexander Aring Signed-off-by: David Teigland commit 7fe968d200436980708c893d87601ffac7d4cb7f Author: Vignesh Raghavendra Date: Thu Mar 4 23:10:38 2021 +0200 arm64: dts: ti: k3-am642-sk: Add CPSW DT nodes AM642 SK board has 2 CPSW3g ports connected through TI DP83867 PHYs. Add DT entries for the same. Signed-off-by: Vignesh Raghavendra Signed-off-by: Grygorii Strashko Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210304211038.12511-5-grygorii.strashko@ti.com commit 985204ecae1c37d55372874ff9146231d28fccc6 Author: Vignesh Raghavendra Date: Thu Mar 4 23:10:37 2021 +0200 arm64: dts: ti: k3-am642-evm: add CPSW3g DT nodes On am642-evm the CPSW3g ext. Port1 is directly connected to TI DP83867 PHY and Port2 is connected to TI DP83869 PHY which is shared with ICSS subsystem. The TI DP83869 PHY MII interface is configured using pinmux for CPSW3g, while MDIO bus is connected through GPIO controllable 2:1 TMUX154E switch (MDIO GPIO MUX) which has to be configured to route MDIO bus from CPSW3g to TI DP83869 PHY. Hence add networking support for am642-evm: - add CPSW3g MDIO and RGMII pinmux entries for both ext. ports; - add CPSW3g nodes; - add mdio-mux-multiplexer DT nodes to represent above topology. Signed-off-by: Vignesh Raghavendra Signed-off-by: Grygorii Strashko Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210304211038.12511-4-grygorii.strashko@ti.com commit e7ae26a30e87751e3a5b02ed4d8993a460b0e2b0 Author: Grygorii Strashko Date: Thu Mar 4 23:10:36 2021 +0200 arm64: dts: ti: k3-am64-main: add main CPTS entry Add DT node for the Main domain CPTS. Signed-off-by: Grygorii Strashko Signed-off-by: Vignesh Raghavendra Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210304211038.12511-3-grygorii.strashko@ti.com commit 3753b12877b62bea3bed44431ad0cf6906cb3fdf Author: Vignesh Raghavendra Date: Thu Mar 4 23:10:35 2021 +0200 arm64: dts: ti: k3-am64-main: Add CPSW DT node Add CPSW3g DT node with two external ports, MDIO and CPTS support. For CPSW3g DMA channels the ASEL is set to 15 (AM642x per DMA channel coherency feature), so that CPSW DMA channel participates in Coherency and thus avoid need to cache maintenance for SKBs. This improves bidirectional TCP performance by up to 100Mbps (on 1G link). Signed-off-by: Vignesh Raghavendra Signed-off-by: Grygorii Strashko Signed-off-by: Nishanth Menon Reviewed-by: Lokesh Vutla Link: https://lore.kernel.org/r/20210304211038.12511-2-grygorii.strashko@ti.com commit b605d4f66f5149168bd9e8317ddc9f6b9bdaa1df Author: Jan Kiszka Date: Thu Feb 11 20:32:56 2021 +0100 arm64: dts: ti: k3-am65-main: Add device_type to pcie*_rc nodes This is demanded by the parent binding of ti,am654-pcie-rc, see Documentation/devicetree/bindings/pci/designware-pcie.txt. Signed-off-by: Jan Kiszka Signed-off-by: Nishanth Menon Reviewed-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/881dfd6c75423efce1d10261909939cd5ef19937.1613071976.git.jan.kiszka@siemens.com commit 4867caf42b3f06f215d5ca82c7163c334ccbc08d Author: Lokesh Vutla Date: Sat Feb 27 00:12:51 2021 +0530 arm64: dts: ti: Add support for AM642 SK AM642 StarterKit (SK) board is a low cost, small form factor board designed for TI’s AM642 SoC. It supports the following interfaces: * 2 GB LPDDR4 RAM * x2 Gigabit Ethernet interfaces capable of working in switch and MAC mode * x1 USB 3.0 Type-A port * x1 UHS-1 capable µSD card slot * 2.4/5 GHz WLAN + Bluetooth 4.2 through WL1837 * 512 Mbit OSPI flash * x2 UART through UART-USB bridge * XDS110 for onboard JTAG debug using USB * Temperature sensors, user push buttons and LEDs * 40-pin Raspberry Pi compatible GPIO header * 24-pin header for peripherals in MCU island (I2C, UART, SPI, IO) * 54-pin header for Programmable Realtime Unit (PRU) IO pins * Interface for remote automation. Includes: * power measurement and reset control * boot mode change Add basic support for AM642 SK. Signed-off-by: Lokesh Vutla Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Vignesh Raghavendra Signed-off-by: Sekhar Nori Signed-off-by: Nishanth Menon Tested-by: Kishon Vijay Abraham I Link: https://lore.kernel.org/r/20210226184251.26451-3-lokeshvutla@ti.com commit bb795cc6bdd3b6e9f2ee9b78b86e0a8a4a10488d Author: Lokesh Vutla Date: Sat Feb 27 00:12:50 2021 +0530 dt-bindings: arm: ti: Add bindings for AM642 SK AM642 StarterKit (SK) board is a low cost, small form factor board designed for TI’s AM642 SoC. Add DT binding documentation for AM642 SK. Signed-off-by: Lokesh Vutla Signed-off-by: Nishanth Menon Tested-by: Kishon Vijay Abraham I Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210226184251.26451-2-lokeshvutla@ti.com commit 1e6550d35c245e10c3a8fd7c7a9f96d7b905ba05 Author: Dave Gerlach Date: Fri Feb 26 08:42:57 2021 -0600 arm64: dts: ti: Add support for AM642 EVM The AM642 EValuation Module (EVM) is a board that provides access to various peripherals available on the AM642 SoC, such as PCIe, USB 2.0, CPSW Ethernet, ADC, and more. Introduce support for the AM642 EVM to enable mmc boot, including enabling UART and I2C on the board. Signed-off-by: Aswath Govindraju Signed-off-by: Faiz Abbas Signed-off-by: Suman Anna Signed-off-by: Nishanth Menon Signed-off-by: Dave Gerlach Tested-by: Kishon Vijay Abraham I Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20210226144257.5470-6-d-gerlach@ti.com commit 943f172312d3005fcbffb085e6c500623c0db9fe Author: Peter Ujfalusi Date: Fri Feb 26 08:42:56 2021 -0600 arm64: dts: ti: k3-am64-main: Enable DMA support Add the nodes for DMSS INTA, BCDMA and PKTDMA to enable the use of the DMAs in the system. Signed-off-by: Peter Ujfalusi Signed-off-by: Dave Gerlach Signed-off-by: Nishanth Menon Tested-by: Kishon Vijay Abraham I Reviewed-by: Grygorii Strashko Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210226144257.5470-5-d-gerlach@ti.com commit 8abae9389bdbf047ffb5190efc6fddc509536f3a Author: Dave Gerlach Date: Fri Feb 26 08:42:55 2021 -0600 arm64: dts: ti: Add support for AM642 SoC The AM642 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration to enable applications such as Motor Drives, PLC, Remote IO and IoT Gateways. Some highlights of this SoC are: * Dual Cortex-A53s in a single cluster, two clusters of dual Cortex-R5F MCUs, and a single Cortex-M4F. * Two Gigabit Industrial Communication Subsystems (ICSSG). * Integrated Ethernet switch supporting up to a total of two external ports. * PCIe-GEN2x1L, USB3/USB2, 2xCAN-FD, eMMC and SD, UFS, OSPI memory controller, QSPI, I2C, eCAP/eQEP, ePWM, ADC, among other peripherals. * Centralized System Controller for Security, Power, and Resource Management (DMSC). See AM64X Technical Reference Manual (SPRUIM2, Nov 2020) for further details: https://www.ti.com/lit/pdf/spruim2 Introduce basic support for the AM642 SoC to enable ramdisk or MMC boot. Introduce the sdhci, i2c, spi, and uart MAIN domain periperhals under cbass_main and the i2c, spi, and uart MCU domain periperhals under cbass_mcu. Signed-off-by: Suman Anna Signed-off-by: Faiz Abbas Signed-off-by: Aswath Govindraju Signed-off-by: Dave Gerlach Signed-off-by: Nishanth Menon Tested-by: Kishon Vijay Abraham I Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20210226144257.5470-4-d-gerlach@ti.com commit 1818a28fffda55c7ec3235db6ed771c6fc737fa1 Author: Dave Gerlach Date: Fri Feb 26 08:42:54 2021 -0600 dt-bindings: pinctrl: k3: Introduce pinmux definitions for AM64 Add pinctrl macros for AM64 SoC. These macro definitions are similar to that of previous platforms, but adding new definitions to avoid any naming confusions in the soc dts files. Unlike what checkpatch insists, we do not need parentheses enclosing the values for this macro as we do intend it to generate two separate values as has been done for other similar platforms. Signed-off-by: Dave Gerlach Signed-off-by: Nishanth Menon Tested-by: Kishon Vijay Abraham I Reviewed-by: Grygorii Strashko Reviewed-by: Suman Anna Acked-by: Rob Herring Link: https://lore.kernel.org/r/20210226144257.5470-3-d-gerlach@ti.com commit 785a32310f35cfebb48c90f0f389c00fb7921e41 Author: Dave Gerlach Date: Fri Feb 26 08:42:53 2021 -0600 dt-bindings: arm: ti: Add bindings for AM642 SoC The AM642 SoC belongs to the K3 Multicore SoC architecture platform, providing advanced system integration to enable applications such as Motor Drives, PLC, Remote IO and IoT Gateways. Some highlights of this SoC are: * Dual Cortex-A53s in a single cluster, two clusters of dual Cortex-R5F MCUs, and a single Cortex-M4F. * Two Gigabit Industrial Communication Subsystems (ICSSG). * Integrated Ethernet switch supporting up to a total of two external ports. * PCIe-GEN2x1L, USB3/USB2, 2xCAN-FD, eMMC and SD, UFS, OSPI memory controller, QSPI, I2C, eCAP/eQEP, ePWM, ADC, among other peripherals. * Centralized System Controller for Security, Power, and Resource Management (DMSC). See AM64X Technical Reference Manual (SPRUIM2, Nov 2020) for further details: https://www.ti.com/lit/pdf/spruim2 Signed-off-by: Dave Gerlach Signed-off-by: Nishanth Menon Tested-by: Kishon Vijay Abraham I Reviewed-by: Rob Herring Reviewed-by: Grygorii Strashko Link: https://lore.kernel.org/r/20210226144257.5470-2-d-gerlach@ti.com commit f38a1644832792ece8c63c9a5d9cd7122c62bf64 Author: Ray Chi Date: Mon Mar 8 21:31:46 2021 +0800 power: supply: core: provide function stubs if CONFIG_POWER_SUPPLY=n Fix build error when CONFIG_POWER_SUPPLY is not enabled. The build error occurs in mips (cavium_octeon_defconfig). mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_remove': drivers/usb/dwc3/core.c:1657: undefined reference to `power_supply_put' mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_get_properties': drivers/usb/dwc3/core.c:1270: undefined reference to `power_supply_get_by_name' mips-linux-gnu-ld: drivers/usb/dwc3/core.o: in function `dwc3_probe': drivers/usb/dwc3/core.c:1632: undefined reference to `power_supply_put' Fixes: 59fa3def35de ("usb: dwc3: add a power supply for current control") Reported-by: Naresh Kamboju Signed-off-by: Ray Chi Signed-off-by: Sebastian Reichel commit b603e810f740e76b6a67089c06d7f4442b187a9a Author: Simon Ser Date: Thu Mar 4 23:08:37 2021 +0100 drm/uapi: document kernel capabilities Document all of the DRM_CAP_* defines. v2 (Pekka): - Describe what the bit depth is - Expand on preferred dumb buffer memory access patterns - Explain what a PRIME buffer is - Mention DRM_IOCTL_PRIME_FD_TO_HANDLE and DRM_IOCTL_PRIME_HANDLE_TO_FD - Explicitly reference CLOCK_REALTIME and CLOCK_MONOTONIC - Make it clear DRM_CAP_CRTC_IN_VBLANK_EVENT applies to both DRM_EVENT_VBLANK and DRM_EVENT_FLIP_COMPLETE v3 (Daniel): - Specify kernel versions for caps that don't depend on drivers - Make it clear dumb buffers caps are only about dumb buffers Signed-off-by: Simon Ser Acked-by: Daniel Vetter Reviewed-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/msgid/20210308123421.747836-1-contact@emersion.fr commit 83ff0f93b0803700b018f6cce06f50439dc1348c Author: Jiapeng Chong Date: Tue Mar 9 18:11:09 2021 +0800 perf machine: Assign boolean values to a bool variable Fix the following coccicheck warnings: ./tools/perf/util/machine.c:2041:9-10: WARNING: return of 0/1 in function 'symbol__match_regex' with return type bool. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko 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 Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/1615284669-82139-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 1f042de2d5c7a69d5ac403a022185164bbe0f51c Author: Jiapeng Chong Date: Tue Mar 9 17:12:25 2021 +0800 perf tools: use ARRAY_SIZE Fix the following cppcheck warnings: ./tools/perf/tests/demangle-ocaml-test.c:29:34-35: WARNING: Use ARRAY_SIZE. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1615281145-2122-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 905203411d8b96cf931dacc359982108a5893c9b Author: Arnaldo Carvalho de Melo Date: Tue Mar 9 09:03:40 2021 -0300 perf stat: Fixup __perf_stat_evsel__is() prefix This is a perf_stat_evsel method, so should have that as its prefix, previously it was swapped as __perf_evsel_stat__is(). Signed-off-by: Arnaldo Carvalho de Melo commit 297e69bfa4c7aa27259dd456af1377e868337043 Author: Arnaldo Carvalho de Melo Date: Tue Mar 9 08:59:21 2021 -0300 perf script: Fixup 'struct evsel_script' method prefix They all operate on 'struct evsel_script' instances, so should be prefixed with evsel_script__, not with perf_evsel_script__. Signed-off-by: Arnaldo Carvalho de Melo commit 377f8331d0565e6f71ba081c894029a92d0c7e77 Author: xndcn Date: Fri Mar 5 23:18:19 2021 +0800 drm/virtio: fix possible leak/unlock virtio_gpu_object_array virtio_gpu_object array is not freed or unlocked in some failed cases. Signed-off-by: xndcn Link: http://patchwork.freedesktop.org/patch/msgid/20210305151819.14330-1-xndchn@gmail.com Signed-off-by: Gerd Hoffmann commit 26f6979237293e93d3f165a0f3af9d967596b2c4 Author: Lavanya Suresh Date: Fri Feb 26 17:30:59 2021 +0530 ath11k: Add support for STA to handle beacon miss When AP goes down without any indication to STA, firmware detects missing beacon, and sends wmi roam event with reason BEACON_MISS to the host. Added support for STA mode to trigger disassociation from AP, on receiving this event from firmware. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01717-QCAHKSWPL_SILICONZ-1 Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Lavanya Suresh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1614340859-28867-1-git-send-email-lavaks@codeaurora.org commit f277eb0500b4ee1cbe9db8615761f19b5a5520c9 Author: Sriram R Date: Wed Feb 24 14:32:41 2021 +0530 ath11k: Update signal filled flag during sta_statistics drv op Currently, though the peer rssi information is updated to station dump from driver sta_statistics mac op, the info doesn't get updated since the NL80211_STA_INFO_SIGNAL filled flag is not set in station info. Hence update this flag while filling the rssi info. Tested on: IPQ8074 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/20210224090241.3098-1-srirrama@codeaurora.org commit 018e3fa8e7ff087629e5285cc14d1a6ca9bebc8b Author: Youghandhar Chintala Date: Wed Feb 24 09:00:10 2021 +0200 ath10k: skip the wait for completion to recovery in shutdown path Currently in the shutdown callback we wait for recovery to complete before freeing up the resources. This results in additional two seconds delay during the shutdown and thereby increase the shutdown time. As an attempt to take less time during shutdown, remove the wait for recovery completion in the shutdown callback and added an API to freeing the reosurces in which they were common for shutdown and removing the module. Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 Signed-off-by: Youghandhar Chintala Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210223142908.23374-1-youghand@codeaurora.org commit 08cbcb9702566a3c2c2af3a1e5899b72c162f45d Author: Joel Stanley Date: Thu Feb 11 10:35:30 2021 +0100 ARM: 9060/1: kexec: Remove unused kexec_reinit callback The last (only?) user of this was removed in commit ba364fc752da ("ARM: Kirkwood: Remove mach-kirkwood"), back in v3.17. Link: https://lore.kernel.org/r/20210210235243.398810-1-joel@jms.id.au Signed-off-by: Joel Stanley Reviewed-by: Arnd Bergmann Signed-off-by: Russell King commit 95731b8ee63ec9419822a51cd9878fa32582fdd2 Author: Ard Biesheuvel Date: Thu Feb 11 09:25:34 2021 +0100 ARM: 9059/1: cache-v7: get rid of mini-stack Now that we have reduced the number of registers that we need to preserve when calling v7_invalidate_l1 from the boot code, we can use scratch registers to preserve the remaining ones, and get rid of the mini stack entirely. This works around any issues regarding cache behavior in relation to the uncached accesses to this memory, which is hard to get right in the general case (i.e., both bare metal and under virtualization) While at it, switch v7_invalidate_l1 to using ip as a scratch register instead of r4. This makes the function AAPCS compliant, and removes the need to stash r4 in ip across the call. Acked-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit f9e7a99fb6b86aa6a00e53b34ee6973840e005aa Author: Ard Biesheuvel Date: Thu Feb 11 09:23:09 2021 +0100 ARM: 9058/1: cache-v7: refactor v7_invalidate_l1 to avoid clobbering r5/r6 The cache invalidation code in v7_invalidate_l1 can be tweaked to re-read the associativity from CCSIDR, and keep the way identifier component in a single register that is assigned in the outer loop. This way, we need 2 registers less. Given that the number of sets is typically much larger than the associativity, rearrange the code so that the outer loop has the fewer number of iterations, ensuring that the re-read of CCSIDR only occurs a handful of times in practice. Fix the whitespace while at it, and update the comment to indicate that this code is no longer a clone of anything else. Acked-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit c0e50736e826b51ddc437e6cf0dc68f07e4ad16b Author: Ard Biesheuvel Date: Thu Feb 11 09:19:46 2021 +0100 ARM: 9057/1: cache-v7: add missing ISB after cache level selection A write to CSSELR needs to complete before its results can be observed via CCSIDR. So add a ISB to ensure that this is the case. Acked-by: Nicolas Pitre Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit c4e792d1acce31c2eb7b9193ab06ab94de05bf42 Author: Ard Biesheuvel Date: Fri Feb 5 19:23:00 2021 +0100 ARM: 9056/1: decompressor: fix BSS size calculation for LLVM ld.lld The LLVM ld.lld linker uses a different symbol type for __bss_start, resulting in the calculation of KBSS_SZ to be thrown off. Up until now, this has gone unnoticed as it only affects the appended DTB case, but pending changes for ARM in the way the decompressed kernel is cleaned from the caches has uncovered this problem. On a ld.lld build: $ nm vmlinux |grep bss_ c1c22034 D __bss_start c1c86e98 B __bss_stop resulting in $ readelf -s arch/arm/boot/compressed/vmlinux | grep bss_size 433: c1c86e98 0 NOTYPE GLOBAL DEFAULT ABS _kernel_bss_size which is obviously incorrect, and may cause the cache clean to access unmapped memory, or cause the size calculation to wrap, resulting in no cache clean to be performed at all. Fix this by updating the sed regex to take D type symbols into account. Link: https://lore.kernel.org/linux-arm-kernel/6c65bcef-d4e7-25fa-43cf-2c435bb61bb9@collabora.com/ Link: https://lore.kernel.org/linux-arm-kernel/20210205085220.31232-1-ardb@kernel.org/ Cc: # v4.19+ Reviewed-by: Nick Desaulniers Tested-by: Nick Desaulniers Reported-by: Guillaume Tucker Reported-by: "kernelci.org bot" Signed-off-by: Ard Biesheuvel Signed-off-by: Russell King commit f85f1baaa18932a041fd2b1c2ca6cfd9898c7d2b Author: Claudio Imbrenda Date: Tue Mar 2 13:36:44 2021 +0100 KVM: s390: split kvm_s390_logical_to_effective Split kvm_s390_logical_to_effective to a generic function called _kvm_s390_logical_to_effective. The new function takes a PSW and an address and returns the address with the appropriate bits masked off. The old function now calls the new function with the appropriate PSW from the vCPU. This is needed to avoid code duplication for vSIE. Signed-off-by: Claudio Imbrenda Reviewed-by: Christian Borntraeger Cc: stable@vger.kernel.org # for VSIE: correctly handle MVPG when in VSIE Link: https://lore.kernel.org/r/20210302174443.514363-2-imbrenda@linux.ibm.com Signed-off-by: Christian Borntraeger commit 87e28a15c42cc592009c32a8c20e5789059027c2 Author: Pierre Morel Date: Mon Sep 7 15:26:07 2020 +0200 KVM: s390: diag9c (directed yield) forwarding When we intercept a DIAG_9C from the guest we verify that the target real CPU associated with the virtual CPU designated by the guest is running and if not we forward the DIAG_9C to the target real CPU. To avoid a diag9c storm we allow a maximal rate of diag9c forwarding. The rate is calculated as a count per second defined as a new parameter of the s390 kvm module: diag9c_forwarding_hz . The default value of 0 is to not forward diag9c. Signed-off-by: Pierre Morel Link: https://lore.kernel.org/r/1613997661-22525-2-git-send-email-pmorel@linux.ibm.com Reviewed-by: Cornelia Huck Signed-off-by: Christian Borntraeger commit 38860756a19042c2159178f57ec6e147b13ddfc2 Author: Bhaskar Chowdhury Date: Sat Feb 13 21:02:27 2021 +0530 KVM: s390: Fix comment spelling in kvm_s390_vcpu_start() s/oustanding/outstanding/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210213153227.1640682-1-unixbhaskar@gmail.com Signed-off-by: Janosch Frank Signed-off-by: Christian Borntraeger commit 1224451bb6f938023dd7fa4e7ba43bfb185bc9e3 Author: Daniel Lezcano Date: Mon Mar 8 14:30:37 2021 +0100 PM / devfreq: Register devfreq as a cooling device on demand Currently the default behavior is to manually having the devfreq backend to register themselves as a devfreq cooling device. Instead of adding the code in the drivers for the thermal cooling device registering, let's provide a flag in the devfreq's profile to tell the common devfreq code to register the newly created devfreq as a cooling device. Suggested-by: Chanwoo Choi Signed-off-by: Daniel Lezcano Reviewed-by: Steven Price Reviewed-by: Lukasz Luba Signed-off-by: Chanwoo Choi commit 431c3be16bd08728325814320e3603ec3284d542 Author: Xiong Zhenwu Date: Mon Mar 8 03:19:39 2021 -0800 selinux: fix misspellings using codespell tool A typo is f out by codespell tool in 422th line of security.h: $ codespell ./security/selinux/include/ ./security.h:422: thie ==> the, this Fix a typo found by codespell. Signed-off-by: Xiong Zhenwu [PM: subject line tweaks] Signed-off-by: Paul Moore commit 63ddf1baa0e34c8e2cc2dde3adb67d56984cef7a Author: Xiong Zhenwu Date: Mon Mar 8 03:03:38 2021 -0800 selinux: fix misspellings using codespell tool A typo is found out by codespell tool in 16th line of hashtab.c $ codespell ./security/selinux/ss/ ./hashtab.c:16: rouding ==> rounding Fix a typo found by codespell. Signed-off-by: Xiong Zhenwu [PM: subject line tweak] Signed-off-by: Paul Moore commit 2554a48f44370a8a73e23c58c389ae9d33effb4b Author: Lakshmi Ramasubramanian Date: Fri Feb 12 08:37:09 2021 -0800 selinux: measure state and policy capabilities SELinux stores the configuration state and the policy capabilities in kernel memory. Changes to this data at runtime would have an impact on the security guarantees provided by SELinux. Measuring this data through IMA subsystem provides a tamper-resistant way for an attestation service to remotely validate it at runtime. Measure the configuration state and policy capabilities by calling the IMA hook ima_measure_critical_data(). To enable SELinux data measurement, the following steps are required: 1, Add "ima_policy=critical_data" to the kernel command line arguments to enable measuring SELinux data at boot time. For example, BOOT_IMAGE=/boot/vmlinuz-5.11.0-rc3+ root=UUID=fd643309-a5d2-4ed3-b10d-3c579a5fab2f ro nomodeset security=selinux ima_policy=critical_data 2, Add the following rule to /etc/ima/ima-policy measure func=CRITICAL_DATA label=selinux Sample measurement of SELinux state and policy capabilities: 10 2122...65d8 ima-buf sha256:13c2...1292 selinux-state 696e...303b Execute the following command to extract the measured data from the IMA's runtime measurements list: grep "selinux-state" /sys/kernel/security/integrity/ima/ascii_runtime_measurements | tail -1 | cut -d' ' -f 6 | xxd -r -p The output should be a list of key-value pairs. For example, initialized=1;enforcing=0;checkreqprot=1;network_peer_controls=1;open_perms=1;extended_socket_class=1;always_check_network=0;cgroup_seclabel=1;nnp_nosuid_transition=1;genfs_seclabel_symlinks=0; To verify the measurement is consistent with the current SELinux state reported on the system, compare the integer values in the following files with those set in the IMA measurement (using the following commands): - cat /sys/fs/selinux/enforce - cat /sys/fs/selinux/checkreqprot - cat /sys/fs/selinux/policy_capabilities/[capability_file] Note that the actual verification would be against an expected state and done on a separate system (likely an attestation server) requiring "initialized=1;enforcing=1;checkreqprot=0;" for a secure state and then whatever policy capabilities are actually set in the expected policy (which can be extracted from the policy itself via seinfo, for example). Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Stephen Smalley Suggested-by: Paul Moore Signed-off-by: Paul Moore commit 7fa2e79a6bb924fa4b2de5766dab31f0f47b5ab6 Author: Vivek Goyal Date: Thu Feb 11 13:03:03 2021 -0500 selinux: Allow context mounts for unpriviliged overlayfs Now overlayfs allow unpriviliged mounts. That is root inside a non-init user namespace can mount overlayfs. This is being added in 5.11 kernel. Giuseppe tried to mount overlayfs with option "context" and it failed with error -EACCESS. $ su test $ unshare -rm $ mkdir -p lower upper work merged $ mount -t overlay -o lowerdir=lower,workdir=work,upperdir=upper,userxattr,context='system_u:object_r:container_file_t:s0' none merged This fails with -EACCESS. It works if option "-o context" is not specified. Little debugging showed that selinux_set_mnt_opts() returns -EACCESS. So this patch adds "overlay" to the list, where it is fine to specific context from non init_user_ns. Reported-by: Giuseppe Scrivano Signed-off-by: Vivek Goyal [PM: trimmed the changelog from the description] Signed-off-by: Paul Moore commit a5907065ac1ab5cbcceea2a9ac0c40c1bef255fa Author: Bhaskar Chowdhury Date: Fri Mar 5 15:39:23 2021 +0530 docs: livepatch: Fix a typo and remove the unnecessary gaps in a sentence s/varibles/variables/ ...and remove leading spaces from a sentence. Signed-off-by: Bhaskar Chowdhury Acked-by: Joe Lawrence Acked-by: Petr Mladek Link: https://lore.kernel.org/r/20210305100923.3731-1-unixbhaskar@gmail.com [jc: performed suggested prepositional tweak] Signed-off-by: Jonathan Corbet commit 1f7faca2f924d3e7a9d475bd9a24583a7f2a051b Author: Peter Xu Date: Mon Mar 1 19:06:46 2021 -0500 docs: filesystem: Update smaps vm flag list to latest We've missed a few documentation when adding new VM_* flags. Add the missing pieces so they'll be in sync now. Signed-off-by: Peter Xu Link: https://lore.kernel.org/r/20210302000646.432358-1-peterx@redhat.com Signed-off-by: Jonathan Corbet commit 3b4c963243b1cac1882c2a557152d5444580a751 Author: Mauro Carvalho Chehab Date: Wed Mar 3 16:58:00 2021 +0100 docs: conf.py: adjust the LaTeX document output Changeset f546ff0c0c07 ("Move our minimum Sphinx version to 1.7") cleaned up some compatibility issues with previous Sphinx versions, but it also dropped the PDF margin sets. Without that, the media documentation won't build fine, as the margins are too wide to display texts with monospaced fonts. While here, align the "latex_elements = {" values, and add a few other sphinxsetup configs in order to allow Sphinx to wrap long lines on literal blocks. Fixes: f546ff0c0c07 ("Move our minimum Sphinx version to 1.7") Signed-off-by: Mauro Carvalho Chehab Documentation/conf.py | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) Link: https://lore.kernel.org/r/911fbac185dd09c7df715cf4153361b81f04b7ad.1614787053.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit 00b072c011c540b269d2d7f6fbc17c3b33b445d0 Author: Barry Song Date: Tue Mar 2 21:41:59 2021 +1300 Documentation/admin-guide: kernel-parameters: correct the architectures for numa_balancing X86 isn't the only architecture supporting NUMA_BALANCING. ARM64, PPC, S390 and RISCV also support it: arch$ git grep NUMA_BALANCING arm64/Kconfig: select ARCH_SUPPORTS_NUMA_BALANCING arm64/configs/defconfig:CONFIG_NUMA_BALANCING=y arm64/include/asm/pgtable.h:#ifdef CONFIG_NUMA_BALANCING powerpc/configs/powernv_defconfig:CONFIG_NUMA_BALANCING=y powerpc/configs/ppc64_defconfig:CONFIG_NUMA_BALANCING=y powerpc/configs/pseries_defconfig:CONFIG_NUMA_BALANCING=y powerpc/include/asm/book3s/64/pgtable.h:#ifdef CONFIG_NUMA_BALANCING powerpc/include/asm/book3s/64/pgtable.h:#ifdef CONFIG_NUMA_BALANCING powerpc/include/asm/book3s/64/pgtable.h:#endif /* CONFIG_NUMA_BALANCING */ powerpc/include/asm/book3s/64/pgtable.h:#ifdef CONFIG_NUMA_BALANCING powerpc/include/asm/book3s/64/pgtable.h:#endif /* CONFIG_NUMA_BALANCING */ powerpc/include/asm/nohash/pgtable.h:#ifdef CONFIG_NUMA_BALANCING powerpc/include/asm/nohash/pgtable.h:#endif /* CONFIG_NUMA_BALANCING */ powerpc/platforms/Kconfig.cputype: select ARCH_SUPPORTS_NUMA_BALANCING riscv/Kconfig: select ARCH_SUPPORTS_NUMA_BALANCING riscv/include/asm/pgtable.h:#ifdef CONFIG_NUMA_BALANCING s390/Kconfig: select ARCH_SUPPORTS_NUMA_BALANCING s390/configs/debug_defconfig:CONFIG_NUMA_BALANCING=y s390/configs/defconfig:CONFIG_NUMA_BALANCING=y s390/include/asm/pgtable.h:#ifdef CONFIG_NUMA_BALANCING x86/Kconfig: select ARCH_SUPPORTS_NUMA_BALANCING if X86_64 x86/include/asm/pgtable.h:#ifdef CONFIG_NUMA_BALANCING x86/include/asm/pgtable.h:#endif /* CONFIG_NUMA_BALANCING */ On the other hand, setup_numabalancing() is implemented in mm/mempolicy.c which doesn't depend on architectures. Signed-off-by: Barry Song Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt Cc: Mel Gorman Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Albert Ou Cc: "Paul E. McKenney" Cc: Randy Dunlap Cc: Andrew Morton Cc: Thomas Gleixner Cc: Mauro Carvalho Chehab Cc: Viresh Kumar Cc: Mike Kravetz Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210302084159.33688-1-song.bao.hua@hisilicon.com Signed-off-by: Jonathan Corbet commit c44456f296187ced1edc59a74263e424681a7b0c Author: Jonathan Neuschäfer Date: Mon Mar 1 22:47:21 2021 +0100 docs: kvm: Fix a typo ("althought") Signed-off-by: Jonathan Neuschäfer Link: https://lore.kernel.org/r/20210301214722.2310911-1-j.neuschaefer@gmx.net Signed-off-by: Jonathan Corbet commit 5af38859efc3f5419a9f7478a30af098f863c603 Author: Yanteng Si Date: Mon Mar 1 03:10:54 2021 +0800 docs/zh_CN: add riscv index.rst translation This patch translates Documentation/riscv/index.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210228191054.6048-5-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit b52e2a6e662b6bf7bd2f024e62cf8471eda8fcdc Author: Yanteng Si Date: Mon Mar 1 03:10:53 2021 +0800 docs/zh_CN: add riscv pmu.rst translation This patch translates Documentation/riscv/pmu.rst into Chinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210228191054.6048-4-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit cb07e0977a6271472cec1e50dad4b5a8035c353d Author: Yanteng Si Date: Mon Mar 1 03:10:52 2021 +0800 docs/zh_CN: add riscv patch-acceptance.rst translation This patch translates Documentation/riscv/patch-acceptance.rst into Chineae. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210228191054.6048-3-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit d619afd344463c2c9b7e994fd798a957cec5f019 Author: Yanteng Si Date: Mon Mar 1 03:10:51 2021 +0800 docs/zh_CN:add riscv boot-image-header.rst translation This patch translates Documentation/riscv/boot-image-header.rst intoChinese. Signed-off-by: Yanteng Si Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210228191054.6048-2-siyanteng@loongson.cn Signed-off-by: Jonathan Corbet commit 8bd490e4fc44d24447ed075f96c7cfec264a7c0e Author: Randy Dunlap Date: Tue Mar 2 14:35:23 2021 -0800 input: Documentation: corrections for uinput.rst Fix a typo (supportinf -> supporting). Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-9-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 5c1841152b62279541c9d98580e60d4aabb041b2 Author: Randy Dunlap Date: Tue Mar 2 14:35:22 2021 -0800 input: Documentation: corrections for input-programming.rst Drop a repeated word. Fix punctuation of "eg." to "e.g." Fix punctuation of "ie" to "i.e." Add hyphentation to non-zero. Capitalize PM (for Power Management). Capitalize ID (for Identifier). Change "," in a run-on sentence to ";". Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-8-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 365c6a3e0f2e0e9da42cf4b04f3eb71f27e47989 Author: Randy Dunlap Date: Tue Mar 2 14:35:21 2021 -0800 input: Documentation: corrections for notifier.rst Add 'ledstate' to the keyboard_notifier_param struct info and tell which header file contains that struct. Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-7-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 338b660bff7bbdc02f07899f2b6dec57b667871e Author: Randy Dunlap Date: Tue Mar 2 14:35:20 2021 -0800 input: Documentation: corrections for multi-touch-protocol.rst Correct hyphenation, spelling, and capitalization. Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Henrik Rydberg Link: https://lore.kernel.org/r/20210302223523.20130-6-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit ebe14885ab54beb63502fa84c8b7e3941385aee6 Author: Randy Dunlap Date: Tue Mar 2 14:35:19 2021 -0800 input: Documentation: corrections for gameport-programming.rst Use "E.g." instead of "Eg.". Use correct index for buttons[] array. Update all of struct gameport's descriptions. Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-5-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit a9600c98582a2c64dc87b60cb6260eb20e66f557 Author: Randy Dunlap Date: Tue Mar 2 14:35:18 2021 -0800 input: Documentation: update related file names in ff.rst Change other related documentation file names from .txt to .rst and be more explicit about their paths/locations. Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Johann Deneux Cc: Anssi Hannula Link: https://lore.kernel.org/r/20210302223523.20130-4-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 61be51c1a6bad534b6e69cb2685e29e1d17641f2 Author: Randy Dunlap Date: Tue Mar 2 14:35:17 2021 -0800 input: Documentation: corrections for event-codes.rst Fix hyphenation, typos, capitalization, and a referenced file name (.txt -> .rst). Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-3-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit d1c34bb205050756812cdf0aa252732e4438f7e5 Author: Randy Dunlap Date: Tue Mar 2 14:35:16 2021 -0800 input: Documentation: corrections for input.rst Fix grammar, punctuation, and spelling. Signed-off-by: Randy Dunlap Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Link: https://lore.kernel.org/r/20210302223523.20130-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit 0b54c2e34be7987b5e0ffc0aa0e7dced7301cc1f Author: Mauro Carvalho Chehab Date: Wed Mar 3 09:42:14 2021 +0100 scripts/kernel-doc: ignore identifier on anonymous enums When anonymous enums are used, the identifier is empty. While, IMO, it should be avoided the usage of such enums, adding support for it is not hard. So, postpone the check for empty identifiers to happen only at the dump phase. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/055ad57879f1b9381b90879e00f72fde1c3a5647.1614760910.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet commit e85d92b3bc3b7062f18b24092a65ec427afa8148 Author: Martin Kepplinger Date: Wed Mar 3 10:16:46 2021 +0100 Documentation: dynamic-debug-howto: fix example dynamic debug is "expecting pairs of match-spec " so the example for all files of which the paths include "usb" there is "file" missing. Signed-off-by: Martin Kepplinger Link: https://lore.kernel.org/r/20210303091646.773111-1-martin.kepplinger@puri.sm Signed-off-by: Jonathan Corbet commit 459d7ed81223ba4ed634d50231219c7a3f9f4a01 Author: Geert Uytterhoeven Date: Wed Mar 3 14:38:45 2021 +0100 docs: driver-model: device: Add ATTRIBUTE_GROUPS() example Add a paragraph about the ATTRIBUTE_GROUPS() helper macro, and use it in the example. Retain the old description, as it is still useful in case of multiple groups. Change the names of the group(s) structures, to match the ATTRIBUTE_GROUPS() macro. Signed-off-by: Geert Uytterhoeven Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210303133845.3939403-3-geert+renesas@glider.be Signed-off-by: Jonathan Corbet commit d944f0b1156c87c2c1994befab72816457ec738d Author: Geert Uytterhoeven Date: Wed Mar 3 14:38:44 2021 +0100 docs: driver-model: device: Add DEVICE_ATTR_{RO,RW} examples bus.rst, driver.rst, and hwmon-kernel-api.rst refer to the DEVICE_ATTR_* macros for devices, but device.rst does not mention them. Add a paragraph about these helper macros, and use them in the examples. Retain the old description, as it is still useful for less common values of mode. Change the names of the example "show" and "store" methods, to match the expectations of the DEVICE_ATTR_* macros. Signed-off-by: Geert Uytterhoeven Reviewed-by: Greg Kroah-Hartman Link: https://lore.kernel.org/r/20210303133845.3939403-2-geert+renesas@glider.be Signed-off-by: Jonathan Corbet commit 0e2c578cba9d83663cce1abe584d65364408f0b5 Author: Wu XiangCheng Date: Thu Mar 4 16:01:50 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/unicode.rst Add translation zh_CN/admin-guide/unicode.rst, and link it to zh_CN/admin-guide/index.rst while clean its todo entry. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210304080148.GA16612@mipc Signed-off-by: Jonathan Corbet commit 550c8399d0175e200794938ec2a5f227b3dc43ec Author: Wu XiangCheng Date: Thu Mar 4 16:01:32 2021 +0800 docs/zh_CN: Add zh_CN/admin-guide/README.rst Add translation zh_CN/admin-guide/README.rst, and link it to zh_CN/admin-guide/index.rst while clean its todo entry. Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210304080131.GA16539@mipc Signed-off-by: Jonathan Corbet commit 4eba99315c9fb3c684a054a4a33dfb15709598b5 Author: hjh Date: Thu Mar 4 17:45:55 2021 +0800 PATCH Documentation translations:translate sound/hd-audio/controls to chinese Signed-off-by: hjh Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/20210304094556.5858-1-huangjianghui@uniontech.com Signed-off-by: Jonathan Corbet commit 084aa00162bda02bcab501c2b0a0ea9252d291b2 Author: Aditya Srivastava Date: Sat Mar 6 17:05:10 2021 +0530 scripts: kernel-doc: fix attribute capture in function parsing Currently, kernel-doc warns for function prototype parsing on the presence of attributes "__attribute_const__" and "__flatten" in the definition. There are 166 occurrences in ~70 files in the kernel tree for "__attribute_const__" and 5 occurrences in 4 files for "__flatten". Out of 166, there are 3 occurrences in three different files with "__attribute_const__" and a preceding kernel-doc; and, 1 occurrence in ./mm/percpu.c for "__flatten" with a preceding kernel-doc. All other occurrences have no preceding kernel-doc. Add support for "__attribute_const__" and "__flatten" attributes. A quick evaluation by running 'kernel-doc -none' on kernel-tree reveals that no additional warning or error has been added or removed by the fix. Suggested-by: Lukas Bulwahn Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210306113510.31023-1-yashsri421@gmail.com Signed-off-by: Jonathan Corbet commit 6dbc975f4845d0326cfc82fc8b0246ce97bf84f8 Author: Wu XiangCheng Date: Fri Mar 5 13:28:48 2021 +0800 docs/zh_CN: Improve zh_CN/process/8.Conclusion.rst Improve language and grammar of zh_CN/process/8.Conclusion.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/8311d04c5528442ecae241062fbb1a7eded0b4f6.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit dc4bdca8c365522da49b941d8f67ab0714952f7d Author: Wu XiangCheng Date: Fri Mar 5 13:28:26 2021 +0800 docs/zh_CN: Improve zh_CN/process/7.AdvancedTopics Improve language and grammar of zh_CN/process/7.AdvancedTopics.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/e1579cfc77eb0cc31fb7402e8742dbc364b9086e.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 1ba336902c7413f7dc6f45ab50fd87445d16c964 Author: Wu XiangCheng Date: Fri Mar 5 13:28:07 2021 +0800 docs/zh_CN: Improve zh_CN/process/6.Followthrough Improve language and grammar of zh_CN/process/6.Followthrough.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/2024bbd647208fcb1c8b3db036e6f492bbdb2464.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 75cc66836d9eea2c00aefc6730893adb97e41b18 Author: Wu XiangCheng Date: Fri Mar 5 13:27:48 2021 +0800 docs/zh_CN: Improve zh_CN/process/5.Posting.rst Improve language and grammar of zh_CN/process/5.Posting.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/e2e8e109c7709ebbed9f536cbe49f6f56f38d5bf.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 34c27e7a4ef5cfa5f6cda749b2e7ecd3654c9780 Author: Wu XiangCheng Date: Fri Mar 5 13:27:24 2021 +0800 docs/zh_CN: Improve zh_CN/process/4.Coding.rst Improve language and grammar of zh_CN/process/4.Coding.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/66d6ec99bdd0f41c91951d33eb0fa7c4748019a4.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 84e13b01fb4450b04241befe3beaea048ce835b6 Author: Wu XiangCheng Date: Fri Mar 5 13:27:04 2021 +0800 docs/zh_CN: Improve zh_CN/process/3.Early-stage.rst Improve language and grammar of zh_CN/process/3.Early-stage.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/501394c36239abe67966529595e10fa1aea22cd0.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 25236a4a93964579c842657a5efecaf46386a1c6 Author: Wu XiangCheng Date: Fri Mar 5 13:26:41 2021 +0800 docs/zh_CN: Improve zh_CN/process/2.Process.rst Sync and improve language & grammar of zh_CN/process/2.Process.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/526409b6a93af6d14e0bb14b630fced9a9ffe98d.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 72d85e3bf0b1932b9b78b3657bb448bbcbf4a944 Author: Wu XiangCheng Date: Fri Mar 5 13:26:24 2021 +0800 docs/zh_CN: Improve zh_CN/process/1.Intro.rst Improve language and grammar of zh_CN/process/1.Intro.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/ed025a9071811f354b53d4b6e8e1d0976b34f34a.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 575fbfa69e50d8fec61b16e384034cb1ffc4c033 Author: Wu XiangCheng Date: Fri Mar 5 13:26:02 2021 +0800 docs/zh_CN: Improve zh_CN/process/index.rst Improve language and grammar of zh_CN/process/index.rst Signed-off-by: Wu XiangCheng Reviewed-by: Alex Shi Link: https://lore.kernel.org/r/aace391070859555c0378f93506e46fcdb8dbf93.1614920267.git.bobwxc@email.cn Signed-off-by: Jonathan Corbet commit 9146658cc49a1dbed5ece140f658be884e189ade Author: Akira Yokosawa Date: Thu Jan 14 23:09:07 2021 +0900 tools/memory-model: Remove reference to atomic_ops.rst atomic_ops.rst was removed by commit f0400a77ebdc ("atomic: Delete obsolete documentation"). Remove the broken link in tools/memory-model/Documentation/simple.txt. Cc: Peter Zijlstra Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit ba46b21bbdf8c1e8f054f44e7db7d6684720ef78 Author: Mauro Carvalho Chehab Date: Wed Jan 13 11:59:20 2021 +0100 doc: Update rcu_dereference.rst reference Changeset b00aedf978aa ("doc: Convert to rcu_dereference.txt to rcu_dereference.rst") renamed: Documentation/RCU/rcu_dereference.txt to: Documentation/RCU/rcu_dereference.rst. Update its cross-reference accordingly. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit bd0ccc4afca2d6ae0029cae35c4f1d2e2ade7579 Author: Marco Elver Date: Fri Jan 15 18:09:53 2021 +0100 kcsan: Add missing license and copyright headers Adds missing license and/or copyright headers for KCSAN source files. Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit f6a149140321274cbd955dee50798fe191841f94 Author: Marco Elver Date: Wed Jan 13 17:05:57 2021 +0100 kcsan: Switch to KUNIT_CASE_PARAM for parameterized tests Since KUnit now support parameterized tests via KUNIT_CASE_PARAM, update KCSAN's test to switch to it for parameterized tests. This simplifies parameterized tests and gets rid of the "parameters in case name" workaround (hack). At the same time, we can increase the maximum number of threads used, because on systems with too few CPUs, KUnit allows us to now stop at the maximum useful threads and not unnecessarily execute redundant test cases with (the same) limited threads as had been the case before. Reviewed-by: David Gow Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit a146fed56f8a06a6f17ac11ebdc7ca3f396bcb55 Author: Marco Elver Date: Wed Jan 13 17:05:56 2021 +0100 kcsan: Make test follow KUnit style recommendations Per recently added KUnit style recommendations at Documentation/dev-tools/kunit/style.rst, make the following changes to the KCSAN test: 1. Rename 'kcsan-test.c' to 'kcsan_test.c'. 2. Rename suite name 'kcsan-test' to 'kcsan'. 3. Rename CONFIG_KCSAN_TEST to CONFIG_KCSAN_KUNIT_TEST and default to KUNIT_ALL_TESTS. Reviewed-by: David Gow Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit e36299efe7d749976fbdaaf756dee6ef32543c2c Author: Marco Elver Date: Wed Mar 3 10:38:45 2021 +0100 kcsan, debugfs: Move debugfs file creation out of early init Commit 56348560d495 ("debugfs: do not attempt to create a new file before the filesystem is initalized") forbids creating new debugfs files until debugfs is fully initialized. This means that KCSAN's debugfs file creation, which happened at the end of __init(), no longer works. And was apparently never supposed to work! However, there is no reason to create KCSAN's debugfs file so early. This commit therefore moves its creation to a late_initcall() callback. Cc: "Rafael J. Wysocki" Cc: stable Fixes: 56348560d495 ("debugfs: do not attempt to create a new file before the filesystem is initalized") Reviewed-by: Greg Kroah-Hartman Signed-off-by: Marco Elver Signed-off-by: Paul E. McKenney commit 4cd54518c3d8afadd11ebd6ad4f03b00859f5e85 Author: Paul E. McKenney Date: Thu Feb 11 11:54:43 2021 -0800 torture: Reverse jittering and duration parameters for jitter.sh Remote rcutorture testing requires that jitter.sh continue to be invoked from the generated script for local runs, but that it instead be invoked on the remote system for distributed runs. This argues for common jitterstart and jitterstop scripts. But it would be good for jitterstart and jitterstop to control the name and location of the "jittering" file, while continuing to have the duration controlled by the caller of these new scripts. This commit therefore reverses the order of the jittering and duration parameters for jitter.sh, so that the jittering parameter precedes the duration parameter. Signed-off-by: Paul E. McKenney commit 1f922db8eef015f261480347aaf79fa9a25728f2 Author: Paul E. McKenney Date: Thu Feb 11 10:56:42 2021 -0800 torture: Eliminate jitter_pids file Now that there is a reliable way to convince the jitter.sh scripts to stop, the jitter_pids file is not needed, nor is the code that kills all the PIDs contained in this file. This commit therefore eliminates this file and the code using it. Signed-off-by: Paul E. McKenney commit 37812c9429722824859788cf754dd3e33f546908 Author: Paul E. McKenney Date: Thu Feb 11 10:39:28 2021 -0800 torture: Use "jittering" file to control jitter.sh execution Currently, jitter.sh execution is controlled by a time limit and by the "kill" command. The former allowed jitter.sh to run uselessly past the end of a set of runs that panicked during boot, and the latter is vulnerable to PID reuse. This commit therefore introduces a "jittering" file in the date-stamp directory within "res" that must be present for the jitter.sh scripts to continue executing. The time limit is still in place in order to avoid disturbing runs featuring large trace dumps, but the removal of the "jittering" file handles the panic-during-boot scenario without relying on PIDs. Signed-off-by: Paul E. McKenney commit b674100e630bf9211d7edce06b5d734b125a74ee Author: Paul E. McKenney Date: Wed Feb 10 16:28:44 2021 -0800 torture: Use file-based protocol to mark batch's runs complete Currently, the script generated by kvm.sh does a "wait" to wait on both the current batch's guest OSes and any jitter.sh scripts. This works, but makes it hard to abstract the jittering so that common code can be used for both local and distributed runs. This commit therefore uses "build.run" files in scenario directories, and these files are removed after the corresponding scenario's guest OS has completed. Note that --build-only runs do not create build.run files because they also do not create guest OSes and do not run any jitter.sh scripts. Signed-off-by: Paul E. McKenney commit 3c43ce53fdb39921f4ee71c65dc100296e15640f Author: Paul E. McKenney Date: Wed Feb 10 15:15:13 2021 -0800 torture: Move build/run synchronization files into scenario directories Currently the bN.ready and bN.wait files are placed in the rcutorture directory, which really is not at all a good place for run-specific files. This commit therefore renames these files to build.ready and build.wait and then moves them into the scenario directories within the "res" directory, for example, into tools/testing/selftests/rcutorture/res/2021.02.10-15.08.23/TINY01. Signed-off-by: Paul E. McKenney commit aebf8c7bf6d508dfb4255db8f7355ca819d9e6c9 Author: Paul E. McKenney Date: Thu Jan 28 10:17:26 2021 -0800 refscale: Disable verbose torture-test output Given large numbers of threads, the quantity of torture-test output is sufficient to sometimes result in RCU CPU stall warnings. The probability of these stall warnings was greatly reduced by batching the output, but the warnings were not eliminated. However, the actual test only depends on console output that is printed even when refscale.verbose=0. This commit therefore causes this test to run with refscale.verbose=0. Signed-off-by: Paul E. McKenney commit 0e7457b550233314394574c6bdc890de9131daf5 Author: Paul E. McKenney Date: Thu Jan 28 10:15:02 2021 -0800 rcuscale: Disable verbose torture-test output Given large numbers of threads, the quantity of torture-test output is sufficient to sometimes result in RCU CPU stall warnings. The probability of these stall warnings was greatly reduced by batching the output, but the warnings were not eliminated. However, the actual test only depends on console output that is printed even when rcuscale.verbose=0. This commit therefore causes this test to run with rcuscale.verbose=0. Signed-off-by: Paul E. McKenney commit f9d2f1e2c426ad6c4d7661cc7d90be4de2c4f7a4 Author: Paul E. McKenney Date: Thu Feb 4 17:20:45 2021 -0800 torture: Improve readability of the testid.txt file The testid.txt file was intended for occasional in extremis use, but now that the new "bare-metal" file references it, it might see more use. This commit therefore labels sections of output and adds spacing to make it easier to see what needs to be done to make a bare-metal build tree match an rcutorture build tree. Of course, you can avoid this whole issue by building your bare-metal kernel in the same directory in which you ran rcutorture, but that might not always be an option. Signed-off-by: Paul E. McKenney commit a8dafbf3a5465bea6d9b45a4f011ba9b56d8b267 Author: Paul E. McKenney Date: Wed Feb 3 15:44:29 2021 -0800 torture: Provide bare-metal modprobe-based advice In some environments, the torture-testing use of virtualization is inconvenient. In such cases, the modprobe and rmmod commands may be used to do torture testing, but significant setup is required to build, boot, and modprobe a kernel so as to match a given torture-test scenario. This commit therefore creates a "bare-metal" file in each results directory containing steps to run the corresponding scenario using the modprobe command on bare metal. For example, the contents of this file after using kvm.sh to build an rcutorture TREE01 kernel, perhaps with the --buildonly argument, is as follows: To run this scenario on bare metal: 1. Set your bare-metal build tree to the state shown in this file: /home/git/linux-rcu/tools/testing/selftests/rcutorture/res/2021.02.04-17.10.19/testid.txt 2. Update your bare-metal build tree's .config based on this file: /home/git/linux-rcu/tools/testing/selftests/rcutorture/res/2021.02.04-17.10.19/TREE01/ConfigFragment 3. Make the bare-metal kernel's build system aware of your .config updates: $ yes "" | make oldconfig 4. Build your bare-metal kernel. 5. Boot your bare-metal kernel with the following parameters: maxcpus=8 nr_cpus=43 rcutree.gp_preinit_delay=3 rcutree.gp_init_delay=3 rcutree.gp_cleanup_delay=3 rcu_nocbs=0-1,3-7 6. Start the test with the following command: $ modprobe rcutorture nocbs_nthreads=8 nocbs_toggle=1000 fwd_progress=0 onoff_interval=1000 onoff_holdoff=30 n_barrier_cbs=4 stat_interval=15 shutdown_secs=120 test_no_idle_hz=1 verbose=1 7. After some time, end the test with the following command: $ rmmod rcutorture 8. Copy your bare-metal kernel's .config file, overwriting this file: /home/git/linux-rcu/tools/testing/selftests/rcutorture/res/2021.02.04-17.10.19/TREE01/.config 9. Copy the console output from just before the modprobe to just after the rmmod into this file: /home/git/linux-rcu/tools/testing/selftests/rcutorture/res/2021.02.04-17.10.19/TREE01/console.log 10. Check for runtime errors using the following command: $ tools/testing/selftests/rcutorture/bin/kvm-recheck.sh /home/git/linux-rcu/tools/testing/selftests/rcutorture/res/2021.02.04-17.10.19 Signed-off-by: Paul E. McKenney commit 3d4977b68101b38c3f9d3be3d89e17ef1fdfc1d3 Author: Paul E. McKenney Date: Thu Jan 28 16:38:19 2021 -0800 torture: Allow 1G of memory for torture.sh kvfree testing Yes, I do recall a time when 512MB of memory was a lot of mass storage, much less main memory, but the rcuscale kvfree_rcu() testing invoked by torture.sh can sometimes exceed it on large systems, resulting in OOM. This commit therefore causes torture.sh to pase the "--memory 1G" argument to kvm.sh to reserve a full gigabyte for this purpose. Signed-off-by: Paul E. McKenney commit a519d21480d330918bd522499a323432c31b6ec2 Author: Paul E. McKenney Date: Tue Jan 5 10:50:32 2021 -0800 torturescript: Don't rerun failed rcutorture builds If the build fails when running multiple instances of a given rcutorture scenario, for example, using the kvm.sh --configs "8*RUDE01" argument, the build will be rerun an additional seven times. This is in some sense correct, but it can waste significant time. This commit therefore checks for a prior failed build and simply copies over that build's output. Signed-off-by: Paul E. McKenney commit 0a27fff30a5e561dc77e9cb1bf9cf462e1735179 Author: Stephen Zhang Date: Sat Jan 23 17:54:17 2021 +0800 rcutorture: Replace rcu_torture_stall string with %s This commit replaces a hard-coded "rcu_torture_stall" string in a pr_alert() format with "%s" and __func__. Signed-off-by: Stephen Zhang Signed-off-by: Paul E. McKenney commit 4ac9de07b24f93a87ad38c497ad00fe2451203e7 Author: Stephen Zhang Date: Sat Jan 23 16:34:01 2021 +0800 torture: Replace torture_init_begin string with %s This commit replaces a hard-coded "torture_init_begin" string in a pr_alert() format with "%s" and __func__. Signed-off-by: Stephen Zhang Signed-off-by: Paul E. McKenney commit a434dd10cd843c7348e7c54c77eb0fac27beceb4 Author: Paul E. McKenney Date: Thu Feb 25 10:26:00 2021 -0800 rcu-tasks: Add block comment laying out RCU Tasks Trace design This commit adds a block comment that gives a high-level overview of how RCU tasks trace grace periods progress. It also adds a note about how exiting tasks are handled, plus it gives an overview of the memory ordering. Reported-by: Peter Zijlstra Reported-by: Mathieu Desnoyers [ paulmck: Fix commit log per Mathieu Desnoyers feedback. ] Signed-off-by: Paul E. McKenney commit 85b86994284820ec070182ec269e6e79735f523a Author: Lukas Bulwahn Date: Mon Jan 25 08:41:05 2021 +0100 rcu-tasks: Rectify kernel-doc for struct rcu_tasks The command 'find ./kernel/rcu/ | xargs ./scripts/kernel-doc -none' reported an issue with the kernel-doc of struct rcu_tasks. This commit rectifies the kernel-doc, such that no issues remain for ./kernel/rcu/. Signed-off-by: Lukas Bulwahn Signed-off-by: Paul E. McKenney commit 8126c57f00cea3502a017b7c76df1fac58f89e88 Author: Paul E. McKenney Date: Wed Feb 10 13:25:58 2021 -0800 torture: Make jitter.sh handle large systems The current jitter.sh script expects cpumask bits to fit into whatever the awk interpreter uses for an integer, which clearly does not hold for even medium-sized systems these days. This means that on a large system, only the first 32 or 64 CPUs (depending) are subjected to jitter.sh CPU-time perturbations. This commit therefore computes a given CPU's cpumask using text manipulation rather than arithmetic shifts. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney commit 7308e0240410d3644c9d7cc6263079a58e3effeb Author: Paul E. McKenney Date: Wed Jan 27 13:57:16 2021 -0800 rcu: Make rcu_read_unlock_special() expedite strict grace periods In kernels built with CONFIG_RCU_STRICT_GRACE_PERIOD=y, every grace period is an expedited grace period. However, rcu_read_unlock_special() does not treat them that way, instead allowing the deferred quiescent state to be reported whenever. This commit therefore adds a check of this Kconfig option that causes rcu_read_unlock_special() to treat all grace periods as expedited for CONFIG_RCU_STRICT_GRACE_PERIOD=y kernels. Signed-off-by: Paul E. McKenney commit 5e59fba573e64cffc3a7a3113fff2336d652f45a Author: Paul E. McKenney Date: Fri Jan 15 13:30:38 2021 -0800 rcutorture: Fix testing of RCU priority boosting Currently, rcutorture refuses to test RCU priority boosting in CONFIG_HOTPLUG_CPU=y kernels, which are the only kind normally built on x86 these days. This commit therefore updates rcutorture's tests of RCU priority boosting to make them safe for CPU hotplug. However, these tests will fail unless TIMER_SOFTIRQ runs at realtime priority, which does not happen in current mainline. This commit therefore also refuses to test RCU priority boosting except in kernels built with CONFIG_PREEMPT_RT=y. While in the area, this commt adds some debug output at boost-fail time that helps diagnose the cause of the failure, for example, failing to run TIMER_SOFTIRQ at realtime priority. Cc: Sebastian Andrzej Siewior Cc: Scott Wood Cc: Thomas Gleixner Signed-off-by: Paul E. McKenney commit e2b949d54392ad890bb10fb8954d967e2fcd7503 Author: Paul E. McKenney Date: Thu Jan 14 16:11:04 2021 -0800 rcutorture: Make TREE03 use real-time tree.use_softirq setting TREE03 tests RCU priority boosting, which is a real-time feature. It would also be good if it tested something closer to what is actually used by the real-time folks. This commit therefore adds tree.use_softirq=0 to the TREE03 kernel boot parameters in TREE03.boot. Signed-off-by: Paul E. McKenney commit 39bbfc62cc90d33f8f5f940464d08075e0275f8a Author: Paul E. McKenney Date: Thu Jan 14 10:39:31 2021 -0800 rcu: Expedite deboost in case of deferred quiescent state Historically, a task that has been subjected to RCU priority boosting is deboosted at rcu_read_unlock() time. However, with the advent of deferred quiescent states, if the outermost rcu_read_unlock() was invoked with either bottom halves, interrupts, or preemption disabled, the deboosting will be delayed for some time. During this time, a low-priority process might be incorrectly running at a high real-time priority level. Fortunately, rcu_read_unlock_special() already provides mechanisms for forcing a minimal deferral of quiescent states, at least for kernels built with CONFIG_IRQ_WORK=y. These mechanisms are currently used when expedited grace periods are pending that might be blocked by the current task. This commit therefore causes those mechanisms to also be used in cases where the current task has been or might soon be subjected to RCU priority boosting. Note that this applies to all kernels built with CONFIG_RCU_BOOST=y, regardless of whether or not they are also built with CONFIG_PREEMPT_RT=y. This approach assumes that kernels build for use with aggressive real-time applications are built with CONFIG_IRQ_WORK=y. It is likely to be far simpler to enable CONFIG_IRQ_WORK=y than to implement a fast-deboosting scheme that works correctly in its absence. While in the area, alphabetize the rcu_preempt_deferred_qs_handler() function's local variables. Cc: Sebastian Andrzej Siewior Cc: Scott Wood Cc: Lai Jiangshan Cc: Thomas Gleixner Signed-off-by: Paul E. McKenney commit 55adc3e1c82a25e99e9efef4f2b14b8b4806918a Author: Frederic Weisbecker Date: Thu Jan 28 18:12:13 2021 +0100 rcu/nocb: Rename nocb_gp_update_state to nocb_gp_update_state_deoffloading The name nocb_gp_update_state() is unenlightening, so this commit changes it to nocb_gp_update_state_deoffloading(). This function now does what its name says, updates state and returns true if the CPU corresponding to the specified rcu_data structure is in the process of being de-offloaded. Reported-by: Paul E. McKenney Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit ec711bc12c777b1165585f59f7a6c35a89e04cc3 Author: Frederic Weisbecker Date: Thu Jan 28 18:12:10 2021 +0100 rcu/nocb: Only (re-)initialize segcblist when needed on CPU up At the start of a CPU-hotplug operation, the incoming CPU's callback list can be in a number of states: 1. Disabled and empty. This is the case when the boot CPU has not invoked call_rcu(), when a non-boot CPU first comes online, and when a non-offloaded CPU comes back online. In this case, it is both necessary and permissible to initialize ->cblist. Because either the CPU is currently running with interrupts disabled (boot CPU) or is not yet running at all (other CPUs), it is not necessary to acquire ->nocb_lock. In this case, initialization is required. 2. Disabled and non-empty. This cannot occur, because early boot call_rcu() invocations enable the callback list before enqueuing their callback. 3. Enabled, whether empty or not. In this case, the callback list has already been initialized. This case occurs when the boot CPU has executed an early boot call_rcu() and also when an offloaded CPU comes back online. In both cases, there is no need to initialize the callback list: In the boot-CPU case, the CPU has not (yet) gone offline, and in the offloaded case, the rcuo kthreads are taking care of business. Because it is not necessary to initialize the callback list, it is also not necessary to acquire ->nocb_lock. Therefore, checking if the segcblist is enabled suffices. This commit therefore initializes the callback list at rcutree_prepare_cpu() time only if that list is disabled. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney commit 8a682b3974c36853b52fc8ede14dee966e96e19f Author: Frederic Weisbecker Date: Thu Jan 28 18:12:12 2021 +0100 rcu/nocb: Avoid confusing double write of rdp->nocb_cb_sleep The nocb_cb_wait() function first sets the rdp->nocb_cb_sleep flag to true by after invoking the callbacks, and then sets it back to false if it finds more callbacks that are ready to invoke. This is confusing and will become unsafe if this flag is ever read locklessly. This commit therefore writes it only once, based on the state after both callback invocation and checking. Reported-by: Paul E. McKenney Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 64305db2856b969a5d48e8f3a5b0d06b5594591c Author: Frederic Weisbecker Date: Thu Jan 28 18:12:09 2021 +0100 rcu/nocb: Forbid NOCB toggling on offline CPUs It makes no sense to de-offload an offline CPU because that CPU will never invoke any remaining callbacks. It also makes little sense to offload an offline CPU because any pending RCU callbacks were migrated when that CPU went offline. Yes, it is in theory possible to use a number of tricks to permit offloading and deoffloading offline CPUs in certain cases, but in practice it is far better to have the simple and deterministic rule "Toggling the offload state of an offline CPU is forbidden". For but one example, consider that an offloaded offline CPU might have millions of callbacks queued. Best to just say "no". This commit therefore forbids toggling of the offloaded state of offline CPUs. Reported-by: Paul E. McKenney Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 5de2e5bb80aeef82f75fff76120874cdc86f935d Author: Frederic Weisbecker Date: Thu Jan 28 18:12:08 2021 +0100 rcu/nocb: Comment the reason behind BH disablement on batch processing This commit explains why softirqs need to be disabled while invoking callbacks, even when callback processing has been offloaded. After all, invoking callbacks concurrently is one thing, but concurrently invoking the same callback is quite another. Reported-by: Boqun Feng Reported-by: Paul E. McKenney Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 3820b513a2e33d6dee1caa3b4815f92079cb9890 Author: Frederic Weisbecker Date: Thu Nov 12 01:51:21 2020 +0100 rcu/nocb: Detect unsafe checks for offloaded rdp Provide CONFIG_PROVE_RCU sanity checks to ensure we are always reading the offloaded state of an rdp in a safe and stable way and prevent from its value to be changed under us. We must either hold the barrier mutex, the cpu-hotplug lock (read or write) or the nocb lock. Local non-preemptible reads are also safe. NOCB kthreads and timers have their own means of synchronization against the offloaded state updaters. Cc: Josh Triplett Cc: Steven Rostedt Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Thomas Gleixner Cc: Boqun Feng Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit 0d3dd2c8eadb7d4404b8788f552fb2b824fe2c7e Author: Paul E. McKenney Date: Mon Dec 7 21:23:36 2020 -0800 rcutorture: Add crude tests for mem_dump_obj() This commit adds a few crude tests for mem_dump_obj() to rcutorture runs. Just to prevent bitrot, you understand! Signed-off-by: Paul E. McKenney commit 5bb1bb353cfe343fc3c84faf06f72ba309fde541 Author: Paul E. McKenney Date: Thu Jan 7 13:46:11 2021 -0800 mm: Don't build mm_dump_obj() on CONFIG_PRINTK=n kernels The mem_dump_obj() functionality adds a few hundred bytes, which is a small price to pay. Except on kernels built with CONFIG_PRINTK=n, in which mem_dump_obj() messages will be suppressed. This commit therefore makes mem_dump_obj() be a static inline empty function on kernels built with CONFIG_PRINTK=n and excludes all of its support functions as well. This avoids kernel bloat on systems that cannot use mem_dump_obj(). Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Suggested-by: Andrew Morton Signed-off-by: Paul E. McKenney commit 686fe1bf6bcce3ce9fc03c9d9035c643c320ca46 Author: Uladzislau Rezki (Sony) Date: Wed Feb 17 19:51:10 2021 +0100 rcuscale: Add kfree_rcu() single-argument scale test The single-argument variant of kfree_rcu() is currently not tested by any member of the rcutoture test suite. This commit therefore adds rcuscale code to test it. This testing is controlled by two new boolean module parameters, kfree_rcu_test_single and kfree_rcu_test_double. If one is set and the other not, only the corresponding variant is tested, otherwise both are tested, with the variant to be tested determined randomly on each invocation. Both of these module parameters are initialized to false, so setting either to true will test only that variant. Suggested-by: Paul E. McKenney Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit ee6ddf58475cce8a3d3697614679cd8cb4a6f583 Author: Uladzislau Rezki (Sony) Date: Fri Jan 29 21:05:05 2021 +0100 kvfree_rcu: Use same set of GFP flags as does single-argument Running an rcuscale stress-suite can lead to "Out of memory" of a system. This can happen under high memory pressure with a small amount of physical memory. For example, a KVM test configuration with 64 CPUs and 512 megabytes can result in OOM when running rcuscale with below parameters: ../kvm.sh --torture rcuscale --allcpus --duration 10 --kconfig CONFIG_NR_CPUS=64 \ --bootargs "rcuscale.kfree_rcu_test=1 rcuscale.kfree_nthreads=16 rcuscale.holdoff=20 \ rcuscale.kfree_loops=10000 torture.disable_onoff_at_boot" --trust-make [ 12.054448] kworker/1:1H invoked oom-killer: gfp_mask=0x2cc0(GFP_KERNEL|__GFP_NOWARN), order=0, oom_score_adj=0 [ 12.055303] CPU: 1 PID: 377 Comm: kworker/1:1H Not tainted 5.11.0-rc3+ #510 [ 12.055416] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.12.0-1 04/01/2014 [ 12.056485] Workqueue: events_highpri fill_page_cache_func [ 12.056485] Call Trace: [ 12.056485] dump_stack+0x57/0x6a [ 12.056485] dump_header+0x4c/0x30a [ 12.056485] ? del_timer_sync+0x20/0x30 [ 12.056485] out_of_memory.cold.47+0xa/0x7e [ 12.056485] __alloc_pages_slowpath.constprop.123+0x82f/0xc00 [ 12.056485] __alloc_pages_nodemask+0x289/0x2c0 [ 12.056485] __get_free_pages+0x8/0x30 [ 12.056485] fill_page_cache_func+0x39/0xb0 [ 12.056485] process_one_work+0x1ed/0x3b0 [ 12.056485] ? process_one_work+0x3b0/0x3b0 [ 12.060485] worker_thread+0x28/0x3c0 [ 12.060485] ? process_one_work+0x3b0/0x3b0 [ 12.060485] kthread+0x138/0x160 [ 12.060485] ? kthread_park+0x80/0x80 [ 12.060485] ret_from_fork+0x22/0x30 [ 12.062156] Mem-Info: [ 12.062350] active_anon:0 inactive_anon:0 isolated_anon:0 [ 12.062350] active_file:0 inactive_file:0 isolated_file:0 [ 12.062350] unevictable:0 dirty:0 writeback:0 [ 12.062350] slab_reclaimable:2797 slab_unreclaimable:80920 [ 12.062350] mapped:1 shmem:2 pagetables:8 bounce:0 [ 12.062350] free:10488 free_pcp:1227 free_cma:0 ... [ 12.101610] Out of memory and no killable processes... [ 12.102042] Kernel panic - not syncing: System is deadlocked on memory [ 12.102583] CPU: 1 PID: 377 Comm: kworker/1:1H Not tainted 5.11.0-rc3+ #510 [ 12.102600] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.12.0-1 04/01/2014 Because kvfree_rcu() has a fallback path, memory allocation failure is not the end of the world. Furthermore, the added overhead of aggressive GFP settings must be balanced against the overhead of the fallback path, which is a cache miss for double-argument kvfree_rcu() and a call to synchronize_rcu() for single-argument kvfree_rcu(). The current choice of GFP_KERNEL|__GFP_NOWARN can result in longer latencies than a call to synchronize_rcu(), so less-tenacious GFP flags would be helpful. Here is the tradeoff that must be balanced: a) Minimize use of the fallback path, b) Avoid pushing the system into OOM, c) Bound allocation latency to that of synchronize_rcu(), and d) Leave the emergency reserves to use cases lacking fallbacks. This commit therefore changes GFP flags from GFP_KERNEL|__GFP_NOWARN to GFP_KERNEL|__GFP_NORETRY|__GFP_NOMEMALLOC|__GFP_NOWARN. This combination leaves the emergency reserves alone and can initiate reclaim, but will not invoke the OOM killer. Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit 3e7ce7a187fc6aaa9fda1310a2b8da8770342ff7 Author: Uladzislau Rezki (Sony) Date: Fri Jan 29 17:16:03 2021 +0100 kvfree_rcu: Replace __GFP_RETRY_MAYFAIL by __GFP_NORETRY __GFP_RETRY_MAYFAIL can spend quite a bit of time reclaiming, and this can be wasted effort given that there is a fallback code path in case memory allocation fails. __GFP_NORETRY does perform some light-weight reclaim, but it will fail under OOM conditions, allowing the fallback to be taken as an alternative to hard-OOMing the system. There is a four-way tradeoff that must be balanced: 1) Minimize use of the fallback path; 2) Avoid full-up OOM; 3) Do a light-wait allocation request; 4) Avoid dipping into the emergency reserves. Signed-off-by: Uladzislau Rezki (Sony) Acked-by: Michal Hocko Signed-off-by: Paul E. McKenney commit 7ffc9ec8eac196cbd85669a4d7920cd80f186a51 Author: Paul E. McKenney Date: Wed Jan 20 13:38:08 2021 -0800 kvfree_rcu: Make krc_this_cpu_unlock() use raw_spin_unlock_irqrestore() The krc_this_cpu_unlock() function does a raw_spin_unlock() immediately followed by a local_irq_restore(). This commit saves a line of code by merging them into a raw_spin_unlock_irqrestore(). This transformation also reduces scheduling latency because raw_spin_unlock_irqrestore() responds immediately to a reschedule request. In contrast, local_irq_restore() does a scheduling-oblivious enabling of interrupts. Reported-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney commit b01b405092b7940bd366053a27ed54a87c84e96a Author: Paul E. McKenney Date: Wed Jan 20 17:21:47 2021 +0100 kvfree_rcu: Use __GFP_NOMEMALLOC for single-argument kvfree_rcu() This commit applies the __GFP_NOMEMALLOC gfp flag to memory allocations carried out by the single-argument variant of kvfree_rcu(), thus avoiding this can-sleep code path from dipping into the emergency reserves. Acked-by: Michal Hocko Suggested-by: Michal Hocko Signed-off-by: Paul E. McKenney commit 148e3731d124079a036b3acf780f3d35c1b9c0aa Author: Uladzislau Rezki (Sony) Date: Wed Jan 20 17:21:46 2021 +0100 kvfree_rcu: Directly allocate page for single-argument case Single-argument kvfree_rcu() must be invoked from sleepable contexts, so we can directly allocate pages. Furthermmore, the fallback in case of page-allocation failure is the high-latency synchronize_rcu(), so it makes sense to do these page allocations from the fastpath, and even to permit limited sleeping within the allocator. This commit therefore allocates if needed on the fastpath using GFP_KERNEL|__GFP_RETRY_MAYFAIL. This also has the beneficial effect of leaving kvfree_rcu()'s per-CPU caches to the double-argument variant of kvfree_rcu(), given that the double-argument variant cannot directly invoke the allocator. [ paulmck: Add add_ptr_to_bulk_krc_lock header comment per Michal Hocko. ] Signed-off-by: Uladzislau Rezki (Sony) Signed-off-by: Paul E. McKenney commit e75956bd00cf4246067c6aee7751faf313233435 Author: Mauro Carvalho Chehab Date: Thu Jan 14 08:22:02 2021 +0100 rcu: Fix kfree_rcu() docbook errors After commit 5130b8fd0690 ("rcu: Introduce kfree_rcu() single-argument macro"), kernel-doc now emits two warnings: ./include/linux/rcupdate.h:884: warning: Excess function parameter 'ptr' description in 'kfree_rcu' ./include/linux/rcupdate.h:884: warning: Excess function parameter 'rhf' description in 'kfree_rcu' This commit added some macro magic in order to call two different versions of kfree_rcu(), the first having just one argument and the second having two arguments. That makes it difficult to document the kfree_rcu() arguments in the docboook header. In order to make clearer that this macro accepts optional arguments, this commit uses macro concatenation so that this macro changes from: #define kfree_rcu kvfree_rcu to: #define kfree_rcu(ptr, rhf...) kvfree_rcu(ptr, ## rhf) That not only helps kernel-doc understand the macro arguments, but also provides a better C definition that makes clearer that the first argument is mandatory and the second one is optional. Fixes: 5130b8fd0690 ("rcu: Introduce kfree_rcu() single-argument macro") Tested-by: Uladzislau Rezki (Sony) Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Paul E. McKenney commit 5bb1369d4bea078dd1298dfc2c6ce781d9e34dde Author: Akira Yokosawa Date: Sat Jan 16 00:11:45 2021 +0900 rculist: Replace reference to atomic_ops.rst The hlist_nulls_for_each_entry_rcu() docbook header references the atomic_ops.rst file, which was removed in commit f0400a77ebdc ("atomic: Delete obsolete documentation"). This commit therefore substitutes a section in memory-barriers.txt discussing the use of barrier() in loops. Cc: Peter Zijlstra Signed-off-by: Akira Yokosawa Signed-off-by: Paul E. McKenney commit 6494ccb93271bee596a12db32ff44867d5be2321 Author: Zhouyi Zhou Date: Mon Jan 11 09:08:59 2021 +0800 rcu: Remove spurious instrumentation_end() in rcu_nmi_enter() In rcu_nmi_enter(), there is an erroneous instrumentation_end() in the second branch of the "if" statement. Oddly enough, "objtool check -f vmlinux.o" fails to complain because it is unable to correctly cover all cases. Instead, objtool visits the third branch first, which marks following trace_rcu_dyntick() as visited. This commit therefore removes the spurious instrumentation_end(). Fixes: 04b25a495bd6 ("rcu: Mark rcu_nmi_enter() call to rcu_cleanup_after_idle() noinstr") Reported-by Neeraj Upadhyay Signed-off-by: Zhouyi Zhou Signed-off-by: Paul E. McKenney commit 47fcbc8dd62f15dc75916225ebacdc3bca9c12b2 Author: Neeraj Upadhyay Date: Mon Jan 11 17:15:58 2021 +0530 rcu: Fix CPU-offline trace in rcutree_dying_cpu The condition in the trace_rcu_grace_period() in rcutree_dying_cpu() is backwards, so that it uses the string "cpuofl" when the offline CPU is blocking the current grace period and "cpuofl-bgp" otherwise. Given that the "-bgp" stands for "blocking grace period", this is at best misleading. This commit therefore switches these strings in order to correctly trace whether the outgoing cpu blocks the current grace period. Signed-off-by: Neeraj Upadhyay Signed-off-by: Paul E. McKenney commit d3ad5bbc4da70c25ad6b386e038e711d0755767b Author: Frederic Weisbecker Date: Wed Jan 6 23:07:15 2021 +0100 rcu: Remove superfluous rdp fetch Cc: Rafael J. Wysocki Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Ingo Molnar Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney commit c71c39b344f7eec9d4492913f22126b03bb7b746 Author: Paul E. McKenney Date: Thu Jan 21 15:56:53 2021 -0800 rcutorture: Use "all" and "N" in "nohz_full" and "rcu_nocbs" This commit uses the shiny new "all" and "N" cpumask options to decouple the "nohz_full" and "rcu_nocbs" kernel boot parameters in the TREE04.boot and TREE08.boot files from the CONFIG_NR_CPUS options in the TREE04 and TREE08 files. Reported-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 3e70df91f961b9df7ab3c0ae1934bdf15454c536 Author: Paul Gortmaker Date: Sun Feb 21 03:08:27 2021 -0500 rcu: deprecate "all" option to rcu_nocbs= With the core bitmap support now accepting "N" as a placeholder for the end of the bitmap, "all" can be represented as "0-N" and has the advantage of not being specific to RCU (or any other subsystem). So deprecate the use of "all" by removing documentation references to it. The support itself needs to remain for now, since we don't know how many people out there are using it currently, but since it is in an __init area anyway, it isn't worth losing sleep over. Cc: Yury Norov Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Josh Triplett Acked-by: Yury Norov Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 99c58d1adbca25fb3ee2469bf0904e1e3e021f7e Author: Paul Gortmaker Date: Sun Feb 21 03:08:26 2021 -0500 lib: test_bitmap: add tests for "N" alias These are copies of existing tests, with just 31 --> N. This ensures the recently added "N" alias transparently works in any normally numeric fields of a region specification. Cc: Yury Norov Cc: Rasmus Villemoes Cc: Andy Shevchenko Acked-by: Yury Norov Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 2c4885d24e64941702a8f81c8e83289823ba35d0 Author: Paul Gortmaker Date: Sun Feb 21 03:08:25 2021 -0500 lib: bitmap: support "N" as an alias for size of bitmap While this is done for all bitmaps, the original use case in mind was for CPU masks and cpulist_parse() as described below. It seems that a common configuration is to use the 1st couple cores for housekeeping tasks. This tends to leave the remaining ones to form a pool of similarly configured cores to take on the real workload of interest to the user. So on machine A - with 32 cores, it could be 0-3 for "system" and then 4-31 being used in boot args like nohz_full=, or rcu_nocbs= as part of setting up the worker pool of CPUs. But then newer machine B is added, and it has 48 cores, and so while the 0-3 part remains unchanged, the pool setup cpu list becomes 4-47. Multiple deployment becomes easier when we can just simply replace 31 and 47 with "N" and let the system substitute in the actual number at boot; a number that it knows better than we do. Cc: Yury Norov Cc: Peter Zijlstra Cc: "Paul E. McKenney" Cc: Rasmus Villemoes Cc: Andy Shevchenko Suggested-by: Yury Norov # move it from CPU code Acked-by: Yury Norov Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit f3c869caef648c541a7445f2a6ba2196d343f542 Author: Paul Gortmaker Date: Sun Feb 21 03:08:24 2021 -0500 lib: bitmap: move ERANGE check from set_region to check_region It makes sense to do all the checks in check_region() and not 1/2 in check_region and 1/2 in set_region. Since set_region is called immediately after check_region, the net effect on runtime is zero, but it gets rid of an if (...) return... Cc: Yury Norov Cc: Rasmus Villemoes Cc: Andy Shevchenko Acked-by: Yury Norov Reviewed-by: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 9d7a3366b7028ae8dd16a0d7585cbf11b03b42a0 Author: Paul Gortmaker Date: Sun Feb 21 03:08:23 2021 -0500 lib: bitmap: fold nbits into region struct This will reduce parameter passing and enable using nbits as part of future dynamic region parameter parsing. Cc: Yury Norov Cc: Rasmus Villemoes Cc: Andy Shevchenko Suggested-by: Yury Norov Acked-by: Yury Norov Reviewed-by: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 97330db3af9a41302d1ccb0f495fcb5b5da2cc44 Author: Paul Gortmaker Date: Sun Feb 21 03:08:22 2021 -0500 lib: test_bitmap: add more start-end:offset/len tests There are inputs to bitmap_parselist() that would probably never be entered manually by a person, but might result from some kind of automated input generator. Things like ranges of length 1, or group lengths longer than nbits, overlaps, or offsets of zero. Adding these tests serve two purposes: 1) document what might seem odd but nonetheless valid input. 2) don't regress from what we currently accept as valid. Cc: Yury Norov Cc: Rasmus Villemoes Cc: Andy Shevchenko Acked-by: Yury Norov Reviewed-by: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 6fef5905fbd691aeb91093056b27d5ee7b106097 Author: Paul Gortmaker Date: Sun Feb 21 03:08:21 2021 -0500 lib: test_bitmap: add tests to trigger ERANGE case. Add tests that specify a valid range, but one that is outside the width of the bitmap for which it is to be applied to. These should trigger an -ERANGE response from the code. Cc: Yury Norov Cc: Rasmus Villemoes Cc: Andy Shevchenko Acked-by: Yury Norov Reviewed-by: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 494215fbf298787e4ead16e4c68634d241336b02 Author: Paul Gortmaker Date: Sun Feb 21 03:08:20 2021 -0500 lib: test_bitmap: clearly separate ERANGE from EINVAL tests. This block of tests was meant to find/flag incorrect use of the ":" and "/" separators (syntax errors) and invalid (zero) group len. However they were specified with an 8 bit width and 32 bit operations, so they really contained two errors (EINVAL and ERANGE). Promote them to 32 bit so it is clear what they are meant to target. Then we can add tests specific for ERANGE (no syntax errors, just doing 32bit op on 8 bit width, plus a typical 9-on-8 fencepost error). Cc: Yury Norov Cc: Rasmus Villemoes Cc: Andy Shevchenko Acked-by: Yury Norov Reviewed-by: Andy Shevchenko Signed-off-by: Paul Gortmaker Signed-off-by: Paul E. McKenney commit 229164175ff0c61ff581e6bf37fbfcb608b6e9bb Author: Tom Lendacky Date: Thu Mar 4 16:40:11 2021 -0600 x86/virtio: Have SEV guests enforce restricted virtio memory access An SEV guest requires that virtio devices use the DMA API to allow the hypervisor to successfully access guest memory as needed. The VIRTIO_F_VERSION_1 and VIRTIO_F_ACCESS_PLATFORM features tell virtio to use the DMA API. Add arch_has_restricted_virtio_memory_access() for x86, to fail the device probe if these features have not been set for the device when running as an SEV guest. [ bp: Fix -Wmissing-prototypes warning Reported-by: kernel test robot ] Signed-off-by: Tom Lendacky Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/b46e0211f77ca1831f11132f969d470a6ffc9267.1614897610.git.thomas.lendacky@amd.com commit dce92f6b11c3174737bd65eaf933458909b633ff Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:30 2021 -0800 arm64: Enable passing IMA log to next kernel on kexec Update CONFIG_KEXEC_FILE to select CONFIG_HAVE_IMA_KEXEC, if CONFIG_IMA is enabled, to indicate that the IMA measurement log information is present in the device tree for ARM64. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Thiago Jung Bauermann Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-14-nramas@linux.microsoft.com commit cd42f1db09d43e769b46a97a778bbd53428756b5 Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:29 2021 -0800 powerpc: Delete unused function delete_fdt_mem_rsv() delete_fdt_mem_rsv() defined in "arch/powerpc/kexec/file_load.c" has been renamed to fdt_find_and_del_mem_rsv(), and moved to "drivers/of/kexec.c". Remove delete_fdt_mem_rsv() in "arch/powerpc/kexec/file_load.c". Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-13-nramas@linux.microsoft.com commit 28db15d49c5f776e1a29927a60b4f85d2356178f Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:28 2021 -0800 kexec: Use fdt_appendprop_addrrange() to add ima buffer to FDT fdt_appendprop_addrrange() function adds a property, with the given name, to the device tree at the given node offset, and also sets the address and size of the property. This function should be used to add "linux,ima-kexec-buffer" property to the device tree and set the address and size of the IMA measurement buffer, instead of using custom function. Use fdt_appendprop_addrrange() to add "linux,ima-kexec-buffer" property to the device tree. This property holds the address and size of the IMA measurement buffer that needs to be passed from the current kernel to the next kernel across kexec system call. Remove custom code that is used in setup_ima_buffer() to add "linux,ima-kexec-buffer" property to the device tree. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-12-nramas@linux.microsoft.com commit fee3ff99bc67604fba77f19da0106f3ec52b1956 Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:27 2021 -0800 powerpc: Move arch independent ima kexec functions to drivers/of/kexec.c The functions defined in "arch/powerpc/kexec/ima.c" handle setting up and freeing the resources required to carry over the IMA measurement list from the current kernel to the next kernel across kexec system call. These functions do not have architecture specific code, but are currently limited to powerpc. Move remove_ima_buffer() and setup_ima_buffer() calls into of_kexec_alloc_and_setup_fdt() defined in "drivers/of/kexec.c". Move the remaining architecture independent functions from "arch/powerpc/kexec/ima.c" to "drivers/of/kexec.c". Delete "arch/powerpc/kexec/ima.c" and "arch/powerpc/include/asm/ima.h". Remove references to the deleted files and functions in powerpc and in ima. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Tested-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-11-nramas@linux.microsoft.com commit 39652741c80bb0006214cf81ba9707d2dc372292 Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:26 2021 -0800 powerpc: Enable passing IMA log to next kernel on kexec CONFIG_HAVE_IMA_KEXEC is enabled to indicate that the IMA measurement log information is present in the device tree. This should be selected only if CONFIG_IMA is enabled. Update CONFIG_KEXEC_FILE to select CONFIG_HAVE_IMA_KEXEC, if CONFIG_IMA is enabled, to indicate that the IMA measurement log information is present in the device tree for powerpc. Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Thiago Jung Bauermann Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-10-nramas@linux.microsoft.com commit 0c605158be32104bb85cbd12fb575e6f1e17d3e7 Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:25 2021 -0800 powerpc: Move ima buffer fields to struct kimage The fields ima_buffer_addr and ima_buffer_size in "struct kimage_arch" for powerpc are used to carry forward the IMA measurement list across kexec system call. These fields are not architecture specific, but are currently limited to powerpc. arch_ima_add_kexec_buffer() defined in "arch/powerpc/kexec/ima.c" sets ima_buffer_addr and ima_buffer_size for the kexec system call. This function does not have architecture specific code, but is currently limited to powerpc. Move ima_buffer_addr and ima_buffer_size to "struct kimage". Set ima_buffer_addr and ima_buffer_size in ima_add_kexec_buffer() in security/integrity/ima/ima_kexec.c. Co-developed-by: Prakhar Srivastava Signed-off-by: Prakhar Srivastava Signed-off-by: Lakshmi Ramasubramanian Suggested-by: Will Deacon Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-9-nramas@linux.microsoft.com commit 3c985d31ad661a2cc0ad0a55105046fc56a7b1fd Author: Rob Herring Date: Sun Feb 21 09:49:24 2021 -0800 powerpc: Use common of_kexec_alloc_and_setup_fdt() The code for setting up the /chosen node in the device tree and updating the memory reservation for the next kernel has been moved to of_kexec_alloc_and_setup_fdt() defined in "drivers/of/kexec.c". Use the common of_kexec_alloc_and_setup_fdt() to setup the device tree and update the memory reservation for kexec for powerpc. Signed-off-by: Rob Herring Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-8-nramas@linux.microsoft.com commit ac10be5cdbfa852139658d52c2f1c608782ce992 Author: Rob Herring Date: Sun Feb 21 09:49:23 2021 -0800 arm64: Use common of_kexec_alloc_and_setup_fdt() The code for setting up the /chosen node in the device tree and updating the memory reservation for the next kernel has been moved to of_kexec_alloc_and_setup_fdt() defined in "drivers/of/kexec.c". Use the common of_kexec_alloc_and_setup_fdt() to setup the device tree and update the memory reservation for kexec for arm64. Signed-off-by: Rob Herring Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-7-nramas@linux.microsoft.com commit b30be4dc733e5067b56def359b0823f1e54ded8c Author: Rob Herring Date: Sun Feb 21 09:49:22 2021 -0800 of: Add a common kexec FDT setup function Both arm64 and powerpc do essentially the same FDT /chosen setup for kexec. The differences are either omissions that arm64 should have or additional properties that will be ignored. The setup code can be combined and shared by both powerpc and arm64. The differences relative to the arm64 version: - If /chosen doesn't exist, it will be created (should never happen). - Any old dtb and initrd reserved memory will be released. - The new initrd and elfcorehdr are marked reserved. - "linux,booted-from-kexec" is set. The differences relative to the powerpc version: - "kaslr-seed" and "rng-seed" may be set. - "linux,elfcorehdr" is set. - Any existing "linux,usable-memory-range" is removed. Combine the code for setting up the /chosen node in the FDT and updating the memory reservation for kexec, for powerpc and arm64, in of_kexec_alloc_and_setup_fdt() and move it to "drivers/of/kexec.c". Signed-off-by: Rob Herring Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-6-nramas@linux.microsoft.com commit 179350f00e0663cea76af83b843078eebe1bfbf4 Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:21 2021 -0800 x86: Use ELF fields defined in 'struct kimage' ELF related fields elf_headers, elf_headers_sz, and elf_load_addr have been moved from 'struct kimage_arch' to 'struct kimage'. Use the ELF fields defined in 'struct kimage'. Suggested-by: Rob Herring Reported-by: kernel test robot Signed-off-by: Lakshmi Ramasubramanian Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-5-nramas@linux.microsoft.com commit e6635bab530d953c1030a9318fd5501cd601e520 Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:20 2021 -0800 powerpc: Use ELF fields defined in 'struct kimage' ELF related fields elf_headers, elf_headers_sz, and elfcorehdr_addr have been moved from 'struct kimage_arch' to 'struct kimage' as elf_headers, elf_headers_sz, and elf_load_addr respectively. Use the ELF fields defined in 'struct kimage'. Suggested-by: Rob Herring Reported-by: kernel test robot Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-4-nramas@linux.microsoft.com commit 7b558cc3564e6c9ab2047c82e4a555e1d771ea1b Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:19 2021 -0800 arm64: Use ELF fields defined in 'struct kimage' ELF related fields elf_headers, elf_headers_sz, and elf_headers_mem have been moved from 'struct kimage_arch' to 'struct kimage' as elf_headers, elf_headers_sz, and elf_load_addr respectively. Use the ELF fields defined in 'struct kimage'. Suggested-by: Rob Herring Reported-by: kernel test robot Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-3-nramas@linux.microsoft.com commit 9336a5f64b54d2913fb5daa1ac0280ff36f1c5ed Author: Lakshmi Ramasubramanian Date: Sun Feb 21 09:49:18 2021 -0800 kexec: Move ELF fields to struct kimage ELF related fields elf_headers, elf_headers_sz, and elf_load_addr are defined in architecture specific 'struct kimage_arch' for x86, powerpc, and arm64. The name of these fields are different in these architectures that makes it hard to have a common code for setting up the device tree for kexec system call. Move the ELF fields to 'struct kimage' defined in include/linux/kexec.h so common code can use it. Suggested-by: Rob Herring Reported-by: kernel test robot Signed-off-by: Lakshmi Ramasubramanian Reviewed-by: Thiago Jung Bauermann Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20210221174930.27324-2-nramas@linux.microsoft.com commit a0d73acc1e4bc1c542701e37b2e0e233fe6a271d Author: Jean-Philippe Brucker Date: Mon Mar 8 19:28:31 2021 +0100 selftests/bpf: Fix typo in Makefile The selftest build fails when trying to install the scripts: rsync: [sender] link_stat "tools/testing/selftests/bpf/test_docs_build.sh" failed: No such file or directory (2) Fix the filename. Fixes: a01d935b2e09 ("tools/bpf: Remove bpf-helpers from bpftool docs") Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210308182830.155784-1-jean-philippe@linaro.org commit a6aac408c56112f73d28ea8567c29b2a7fe8fccc Author: Jean-Philippe Brucker Date: Mon Mar 8 19:25:22 2021 +0100 libbpf: Fix arm64 build The macro for libbpf_smp_store_release() doesn't build on arm64, fix it. Fixes: 291471dd1559 ("libbpf, xsk: Add libbpf_smp_store_release libbpf_smp_load_acquire") Signed-off-by: Jean-Philippe Brucker Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210308182521.155536-1-jean-philippe@linaro.org commit 145e1da374bcba14c9ca069646f68b76c422612a Author: Raghavendra Rao Ananta Date: Wed Mar 3 13:47:02 2021 -0800 remoteproc: sysfs: Use sysfs_emit instead of sprintf For security reasons sysfs_emit() is preferred over sprintf(). Hence, convert the remoteproc's sysfs show functions accordingly. Signed-off-by: Raghavendra Rao Ananta Signed-off-by: Siddharth Gupta Link: https://lore.kernel.org/r/1614808022-26062-1-git-send-email-sidgup@codeaurora.org Signed-off-by: Bjorn Andersson commit ebf1bef3612f6b49ad52c1312f41bd2161774bfc Author: Rafael J. Wysocki Date: Fri Mar 5 19:43:54 2021 +0100 hwmon: acpi_power_meter: Get rid of ACPICA message printing Use acpi_evaluation_failure_warn() introduced previously instead of the ACPICA-specific ACPI_EXCEPTION() macro to log warning messages regarding ACPI object evaluation failures and use dev_err() instead of ACPI_EXCEPTION() to log _PMC package parsing failures, which is consistent with the other messages printed by the code in question. Next, drop the ACPI_MODULE_NAME() definition only used by the ACPICA message printing macro. Signed-off-by: Rafael J. Wysocki Acked-by: Guenter Roeck commit 94e17d606ec9a4c3af7421b79e4fb235d07861b4 Author: Rafael J. Wysocki Date: Fri Mar 5 19:42:29 2021 +0100 IIO: acpi-als: Get rid of ACPICA message printing Use acpi_evaluation_failure_warn() introduced previously instead of the ACPICA-specific ACPI_EXCEPTION() macro to log warning messages regarding ACPI object evaluation failures and drop the ACPI_MODULE_NAME() definition only used by the ACPICA message printing macro. Signed-off-by: Rafael J. Wysocki Acked-by: Jonathan Cameron commit 4c324548f09fec413b4ee589174dabacfe17d953 Author: Rafael J. Wysocki Date: Fri Mar 5 19:41:44 2021 +0100 ACPI: utils: Introduce acpi_evaluation_failure_warn() Quite a few users of ACPI objects want to log a warning message if the evaluation fails which is a repeating pattern, so introduce a helper function for that purpose and convert some code where it is open-coded to using it. No intentional functional impact. Signed-off-by: Rafael J. Wysocki commit a030fee8db446aaf928c9c0960a21e319886ffdc Merge: 3aadd86e5669f 2c25fabdd5f69 Author: Rafael J. Wysocki Date: Mon Mar 8 19:10:07 2021 +0100 Merge branch 'acpi-processor' Merge topic branch depended on by the following material. commit 2c25fabdd5f69fb3d33b052dbb21c4d2d9ae4308 Author: Rafael J. Wysocki Date: Fri Mar 5 19:40:36 2021 +0100 ACPI: processor: perflib: Eliminate redundant status check One of the "status != AE_NOT_FOUND" checks in acpi_processor_get_platform_limit() is redundant, so rearrange the code to eliminate it. No functional impact. Signed-off-by: Rafael J. Wysocki commit ec866be6ec547c9e1cc4451f04250e08b5fe67c7 Author: Michael Kelley Date: Tue Mar 2 13:38:22 2021 -0800 clocksource/drivers/hyper-v: Move handling of STIMER0 interrupts STIMER0 interrupts are most naturally modeled as per-cpu IRQs. But because x86/x64 doesn't have per-cpu IRQs, the core STIMER0 interrupt handling machinery is done in code under arch/x86 and Linux IRQs are not used. Adding support for ARM64 means adding equivalent code using per-cpu IRQs under arch/arm64. A better model is to treat per-cpu IRQs as the normal path (which it is for modern architectures), and the x86/x64 path as the exception. Do this by incorporating standard Linux per-cpu IRQ allocation into the main SITMER0 driver code, and bypass it in the x86/x64 exception case. For x86/x64, special case code is retained under arch/x86, but no STIMER0 interrupt handling code is needed under arch/arm64. No functional change. Signed-off-by: Michael Kelley Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/1614721102-2241-11-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 4c78738ead4e195c7032c31fe56135c1b00e1784 Author: Michael Kelley Date: Tue Mar 2 13:38:21 2021 -0800 clocksource/drivers/hyper-v: Set clocksource rating based on Hyper-V feature On x86/x64, the TSC clocksource is available in a Hyper-V VM only if Hyper-V provides the TSC_INVARIANT flag. The rating on the Hyper-V Reference TSC page clocksource is currently set so that it will not override the TSC clocksource in this case. Alternatively, if the TSC clocksource is not available, then the Hyper-V clocksource is used. But on ARM64, the Hyper-V Reference TSC page clocksource should override the ARM arch counter, since the Hyper-V clocksource provides scaling and offsetting during live migrations that is not provided for the ARM arch counter. To get the needed behavior for both x86/x64 and ARM64, tweak the logic by defaulting the Hyper-V Reference TSC page clocksource rating to a large value that will always override. If the Hyper-V TSC_INVARIANT flag is set, then reduce the rating so that it will not override the TSC. While the logic for getting there is slightly different, the net result in the normal cases is no functional change. Signed-off-by: Michael Kelley Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/1614721102-2241-10-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit eb3e1d370b4c57be1acbb9de51a7deaa036eff4b Author: Michael Kelley Date: Tue Mar 2 13:38:20 2021 -0800 clocksource/drivers/hyper-v: Handle sched_clock differences inline While the Hyper-V Reference TSC code is architecture neutral, the pv_ops.time.sched_clock() function is implemented for x86/x64, but not for ARM64. Current code calls a utility function under arch/x86 (and coming, under arch/arm64) to handle the difference. Change this approach to handle the difference inline based on whether GENERIC_SCHED_CLOCK is present. The new approach removes code under arch/* since the difference is tied more to the specifics of the Linux implementation than to the architecture. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/1614721102-2241-9-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit e4ab4658f1cff14c82202132f7af2cb5c2741469 Author: Michael Kelley Date: Tue Mar 2 13:38:19 2021 -0800 clocksource/drivers/hyper-v: Handle vDSO differences inline While the driver for the Hyper-V Reference TSC and STIMERs is architecture neutral, vDSO is implemented for x86/x64, but not for ARM64. Current code calls into utility functions under arch/x86 (and coming, under arch/arm64) to handle the difference. Change this approach to handle the difference inline based on whether VDSO_CLOCK_MODE_HVCLOCK is present. The new approach removes code under arch/* since the difference is tied more to the specifics of the Linux implementation than to the architecture. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Acked-by: Daniel Lezcano Link: https://lore.kernel.org/r/1614721102-2241-8-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit d608715d4771cf2d63de07a5d7b026b6f52a70a5 Author: Michael Kelley Date: Tue Mar 2 13:38:18 2021 -0800 Drivers: hv: vmbus: Move handling of VMbus interrupts VMbus interrupts are most naturally modelled as per-cpu IRQs. But because x86/x64 doesn't have per-cpu IRQs, the core VMbus interrupt handling machinery is done in code under arch/x86 and Linux IRQs are not used. Adding support for ARM64 means adding equivalent code using per-cpu IRQs under arch/arm64. A better model is to treat per-cpu IRQs as the normal path (which it is for modern architectures), and the x86/x64 path as the exception. Do this by incorporating standard Linux per-cpu IRQ allocation into the main VMbus driver, and bypassing it in the x86/x64 exception case. For x86/x64, special case code is retained under arch/x86, but no VMbus interrupt handling code is needed under arch/arm64. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Link: https://lore.kernel.org/r/1614721102-2241-7-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 946f4b8680b8ad177f6489e023a1d95e82d502e2 Author: Michael Kelley Date: Tue Mar 2 13:38:17 2021 -0800 Drivers: hv: vmbus: Handle auto EOI quirk inline On x86/x64, Hyper-V provides a flag to indicate auto EOI functionality, but it doesn't on ARM64. Handle this quirk inline instead of calling into code under arch/x86 (and coming, under arch/arm64). No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Link: https://lore.kernel.org/r/1614721102-2241-6-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit b548a7742791e7818bc2780b2354b9714fd8f8d9 Author: Michael Kelley Date: Tue Mar 2 13:38:16 2021 -0800 Drivers: hv: vmbus: Move hyperv_report_panic_msg to arch neutral code With the new Hyper-V MSR set function, hyperv_report_panic_msg() can be architecture neutral, so move it out from under arch/x86 and merge into hv_kmsg_dump(). This move also avoids needing a separate implementation under arch/arm64. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Link: https://lore.kernel.org/r/1614721102-2241-5-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit f3c5e63c3690fc64e5a7a2b3e4f9f5ff1fa25584 Author: Michael Kelley Date: Tue Mar 2 13:38:15 2021 -0800 Drivers: hv: Redo Hyper-V synthetic MSR get/set functions Current code defines a separate get and set macro for each Hyper-V synthetic MSR used by the VMbus driver. Furthermore, the get macro can't be converted to a standard function because the second argument is modified in place, which is somewhat bad form. Redo this by providing a single get and a single set function that take a parameter specifying the MSR to be operated on. Fixup usage of the get function. Calling locations are no more complex than before, but the code under arch/x86 and the upcoming code under arch/arm64 is significantly simplified. Also standardize the names of Hyper-V synthetic MSRs that are architecture neutral. But keep the old x86-specific names as aliases that can be removed later when all references (particularly in KVM code) have been cleaned up in a separate patch series. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Link: https://lore.kernel.org/r/1614721102-2241-4-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit 5e4e6ddf8d74068fd6bb7922dabcfa2c0f506c39 Author: Michael Kelley Date: Tue Mar 2 13:38:14 2021 -0800 x86/hyper-v: Move hv_message_type to architecture neutral module The definition of enum hv_message_type includes arch neutral and x86/x64-specific values. Ideally there would be a way to put the arch neutral values in an arch neutral module, and the arch specific values in an arch specific module. But C doesn't provide a way to extend enum types. As a compromise, move the entire definition into an arch neutral module, to avoid duplicating the arch neutral values for x86/x64 and for ARM64. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Link: https://lore.kernel.org/r/1614721102-2241-3-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit ca48739e59df31d16c27dbcd9ea2ea61d7caa9fb Author: Michael Kelley Date: Tue Mar 2 13:38:13 2021 -0800 Drivers: hv: vmbus: Move Hyper-V page allocator to arch neutral code The Hyper-V page allocator functions are implemented in an architecture neutral way. Move them into the architecture neutral VMbus module so a separate implementation for ARM64 is not needed. No functional change. Signed-off-by: Michael Kelley Reviewed-by: Boqun Feng Link: https://lore.kernel.org/r/1614721102-2241-2-git-send-email-mikelley@microsoft.com Signed-off-by: Wei Liu commit f850a4cad27c3cfeb89fd28c768d5e6821bf178f Author: Vasanth Date: Fri Feb 19 22:43:11 2021 +0530 drivers: hv: Fix whitespace errors Fixed checkpatch warning and errors on hv driver. Signed-off-by: Vasanth Mathivanan Link: https://lore.kernel.org/r/20210219171311.421961-1-vasanth3g@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Wei Liu commit 0e9fed92c67cb886b3308df4890126d75db2ad67 Author: Christian Hewitt Date: Mon Feb 1 21:05:08 2021 +0000 arm64: dts: meson: add initial device-tree for Minix NEO U9-H Minix NEO U9-H is based on the Amlogic Q200 reference board with an S912-H chip and the following specs: - 2GB DDR3 RAM - 16GB eMMC - 10/100/1000 Base-T Ethernet - AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1) - RTC chip - HDMI 2.1 video - S/PDIF optical output - ES8323 audio codec - Analogue headphone output - 3x USB 2.0 ports (1x OTG) - IR receiver - 1x Power LED (white) - 1x Power button (rear) - 1x Update/Reset button (underside) - 1x micro SD card slot Tested-by: Wes Bradley Signed-off-by: Christian Hewitt Reviewed-by: Neil Armstrong Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210201210508.1528-2-christianshewitt@gmail.com commit 15c4dd131ce576f0150fadf7a3264c865b051eba Author: Christian Hewitt Date: Mon Feb 1 21:05:07 2021 +0000 dt-bindings: arm: amlogic: add support for the Minix NEO U9-H The Minix NEO U9-H is a small form-factor Android STB based on the Amlogic Q200 reference board with an S912-H chip. Signed-off-by: Christian Hewitt Acked-by: Rob Herring Signed-off-by: Kevin Hilman Link: https://lore.kernel.org/r/20210201210508.1528-1-christianshewitt@gmail.com commit bbb41728e61a602ec76cbfec2a49ccc763d305b7 Merge: 299194a914512 291471dd15595 Author: Andrii Nakryiko Date: Mon Mar 8 08:51:01 2021 -0800 Merge branch 'load-acquire/store-release barriers for' Björn Töpel says: ==================== This two-patch series introduces load-acquire/store-release barriers for the AF_XDP rings. For most contemporary architectures, this is more effective than a SPSC ring based on smp_{r,w,}mb() barriers. More importantly, load-acquire/store-release semantics make the ring code easier to follow. This is effectively the change done in commit 6c43c091bdc5 ("documentation: Update circular buffer for load-acquire/store-release"), but for the AF_XDP rings. Both libbpf and the kernel-side are updated. Full details are outlined in the commits! Thanks to the LKMM-folks (Paul/Alan/Will) for helping me out in this complicated matter! Changelog v1[1]->v2: * Expanded the commit message for patch 1, and included the LKMM litmus tests. Hopefully this clear things up. (Daniel) * Clarified why the smp_mb()/smp_load_acquire() is not needed in (A); control dependency with load to store. (Toke) [1] https://lore.kernel.org/bpf/20210301104318.263262-1-bjorn.topel@gmail.com/ Thanks, Björn ==================== Signed-off-by: Andrii Nakryiko commit 291471dd1559528a4c2ad5026eff94ed1030562b Author: Björn Töpel Date: Fri Mar 5 10:41:13 2021 +0100 libbpf, xsk: Add libbpf_smp_store_release libbpf_smp_load_acquire Now that the AF_XDP rings have load-acquire/store-release semantics, move libbpf to that as well. The library-internal libbpf_smp_{load_acquire,store_release} are only valid for 32-bit words on ARM64. Also, remove the barriers that are no longer in use. Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210305094113.413544-3-bjorn.topel@gmail.com commit a23b3f5697e6cf8affa7adf3e967e5ab569ea757 Author: Björn Töpel Date: Fri Mar 5 10:41:12 2021 +0100 xsk: Update rings for load-acquire/store-release barriers Currently, the AF_XDP rings uses general smp_{r,w,}mb() barriers on the kernel-side. On most modern architectures load-acquire/store-release barriers perform better, and results in simpler code for circular ring buffers. This change updates the XDP socket rings to use load-acquire/store-release barriers. It is important to note that changing from the old smp_{r,w,}mb() barriers, to load-acquire/store-release barriers does not break compatibility. The old semantics work with the new one, and vice versa. As pointed out by "Documentation/memory-barriers.txt" in the "SMP BARRIER PAIRING" section: "General barriers pair with each other, though they also pair with most other types of barriers, albeit without multicopy atomicity. An acquire barrier pairs with a release barrier, but both may also pair with other barriers, including of course general barriers." How different barriers behaves and pairs is outlined in "tools/memory-model/Documentation/cheatsheet.txt". In order to make sure that compatibility is not broken, LKMM herd7 based litmus tests can be constructed and verified. We generalize the XDP socket ring to a one entry ring, and create two scenarios; One where the ring is full, where only the consumer can proceed, followed by the producer. One where the ring is empty, where only the producer can proceed, followed by the consumer. Each scenario is then expanded to four different tests: general producer/general consumer, general producer/acqrel consumer, acqrel producer/general consumer, acqrel producer/acqrel consumer. In total eight tests. The empty ring test: C spsc-rb+empty // Simple one entry ring: // prod cons allowed action prod cons // 0 0 => prod => 1 0 // 0 1 => cons => 0 0 // 1 0 => cons => 1 1 // 1 1 => prod => 0 1 {} // We start at prod==0, cons==0, data==0, i.e. nothing has been // written to the ring. From here only the producer can start, and // should write 1. Afterwards, consumer can continue and read 1 to // data. Can we enter state prod==1, cons==1, but consumer observed // the incorrect value of 0? P0(int *prod, int *cons, int *data) { ... producer } P1(int *prod, int *cons, int *data) { ... consumer } exists( 1:d=0 /\ prod=1 /\ cons=1 ); The full ring test: C spsc-rb+full // Simple one entry ring: // prod cons allowed action prod cons // 0 0 => prod => 1 0 // 0 1 => cons => 0 0 // 1 0 => cons => 1 1 // 1 1 => prod => 0 1 { prod = 1; } // We start at prod==1, cons==0, data==1, i.e. producer has // written 0, so from here only the consumer can start, and should // consume 0. Afterwards, producer can continue and write 1 to // data. Can we enter state prod==0, cons==1, but consumer observed // the write of 1? P0(int *prod, int *cons, int *data) { ... producer } P1(int *prod, int *cons, int *data) { ... consumer } exists( 1:d=1 /\ prod=0 /\ cons=1 ); where P0 and P1 are: P0(int *prod, int *cons, int *data) { int p; p = READ_ONCE(*prod); if (READ_ONCE(*cons) == p) { WRITE_ONCE(*data, 1); smp_wmb(); WRITE_ONCE(*prod, p ^ 1); } } P0(int *prod, int *cons, int *data) { int p; p = READ_ONCE(*prod); if (READ_ONCE(*cons) == p) { WRITE_ONCE(*data, 1); smp_store_release(prod, p ^ 1); } } P1(int *prod, int *cons, int *data) { int c; int d = -1; c = READ_ONCE(*cons); if (READ_ONCE(*prod) != c) { smp_rmb(); d = READ_ONCE(*data); smp_mb(); WRITE_ONCE(*cons, c ^ 1); } } P1(int *prod, int *cons, int *data) { int c; int d = -1; c = READ_ONCE(*cons); if (smp_load_acquire(prod) != c) { d = READ_ONCE(*data); smp_store_release(cons, c ^ 1); } } The full LKMM litmus tests are found at [1]. On x86-64 systems the l2fwd AF_XDP xdpsock sample performance increases by 1%. This is mostly due to that the smp_mb() is removed, which is a relatively expensive operation on these platforms. Weakly-ordered platforms, such as ARM64 might benefit even more. [1] https://github.com/bjoto/litmus-xsk Signed-off-by: Björn Töpel Signed-off-by: Andrii Nakryiko Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210305094113.413544-2-bjorn.topel@gmail.com commit 1a0252abb6ff8312f28d4d8bc2b115ffa9c5d6c6 Author: Bjorn Andersson Date: Fri Mar 5 18:10:21 2021 -0800 arm64: defconfig: Enable Qualcomm SM8350 TLMM and GCC Enable the Qualcomm SM8350 TLMM pinctrl and GCC clock drivers. They need to be builtin to ensure that the UART is allowed to probe before user space needs a console. Reviewed-by: Vinod Koul Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210306021021.1173860-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson commit 299194a91451263020c73dd2a3b7e0218c88dbd0 Author: Jiri Olsa Date: Fri Mar 5 14:40:50 2021 +0100 selftests/bpf: Fix test_attach_probe for powerpc uprobes When testing uprobes we the test gets GEP (Global Entry Point) address from kallsyms, but then the function is called locally so the uprobe is not triggered. Fixing this by adjusting the address to LEP (Local Entry Point) for powerpc arch plus instruction check stolen from ppc_function_entry function pointed out and explained by Michael and Naveen. Signed-off-by: Jiri Olsa Signed-off-by: Andrii Nakryiko Acked-by: Naveen N. Rao Link: https://lore.kernel.org/bpf/20210305134050.139840-1-jolsa@kernel.org commit aaca50ef45ed247d98a66c0a754d1be93ff35dde Author: Ville Syrjälä Date: Wed Feb 24 16:42:14 2021 +0200 drm/i915: Extend icl_sanitize_encoder_pll_mapping() to all DDI platforms Now that all the encoder clock stuff is uniformly abstracted for all hsw+ platforms, let's extend icl_sanitize_encoder_pll_mapping() to cover all of them. Not sure there is a particular benefit in doing so, but less special cases always makes me happy. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210224144214.24803-7-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit 0fbd869427749347a1cc927df16a16e18c0814b8 Author: Ville Syrjälä Date: Wed Feb 24 16:42:13 2021 +0200 drm/i915: Add encoder->is_clock_enabled() Support reading out the current state of the DDI clock. Not sure we really want this. Seems a bit excessive just to restore the debug print to icl_sanitize_encoder_pll_mapping()? But maybe there's more use for it? Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210224144214.24803-6-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit 351221ffc5e5a183031bb424ab8b434e3a074b23 Author: Ville Syrjälä Date: Wed Feb 24 16:42:12 2021 +0200 drm/i915: Move DDI clock readout to encoder->get_config() Move the *_get_ddi_pll() stuff into the encodet->get_config() hook. There it neatly sits next to the matching .{enable,disable}_clock() functions. In order to avoid excessive boilerplate I changed the behaviour such that all platforms now do the readout via crtc_state->port_dpll[]. ICL+ TC is still a bit special due to TBTPLL not having a functional .get_freq(). Should probably change that by adopting the LCPLL approach, but that would require a fairly substantial rework of the DPLL ID handling. So leave it for later. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210224144214.24803-5-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit d0f1bfc615a893187bf7ba27ccde852dc83320bf Author: Ville Syrjälä Date: Wed Feb 24 16:42:11 2021 +0200 drm/i915: Use pipes instead crtc indices in PLL state tracking All the other places we have use pipes instead of crtc indices when tracking resource usage. Life is easier when we do it the same way always, so switch the dpll mgr to using pipes as well. Looks like it was actually mixing these up in some cases so it would not even have worked correctly except when the device has a contiguous set of pipes starting from pipe A. Granted, that is the typical case but supposedly it may not always hold on modern hw. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210224144214.24803-4-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit 7d3d8f853cbe981ffe98c71328d67d3b3d16a79b Author: Ville Syrjälä Date: Thu Feb 25 18:12:25 2021 +0200 drm/i915: Do intel_dpll_readout_hw_state() after encoder readout The clock readout for DDI encoders needs to moved into the encoders. To that end intel_dpll_readout_hw_state() needs to happen after the encoder readout as otherwise it can't correctly populate the PLL crtc_mask/active_mask bitmasks. v2: Populate DPLL ref clocks before the encoder->get_config() Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210225161225.30746-1-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit 356ce0ea7eb46f29fbb3061a9cccff5ab81d0378 Author: Ville Syrjälä Date: Wed Feb 24 16:42:09 2021 +0200 drm/i915: Call primary encoder's .get_config() from MST .get_config() Stop assuming intel_ddi_get_config() is all we need from the primary encoder, and instead call it via the .get_config() vfunc. This will allow customized .get_config() for the primary, which I plan to use to handle the differences in the clock readout between various platforms. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210224144214.24803-2-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit 73d677e9f379934807741dd068ca31872ed4d387 Author: Quanyang Wang Date: Mon Mar 8 19:54:37 2021 +0800 arm64: dts: zynqmp: Remove si5328 device nodes The function of_i2c_get_board_info will call of_modalias_node to check if a device_node contains "compatible" string. But for the device si5328 at zcu102/zcu106 boards, there is no proper DT bindings for them. So remove si5328 device nodes from dts files to eliminate the error info in the boot message: i2c i2c-10: of_i2c: modalias failure on /axi/i2c@ff030000/i2c-mux@74/i2c@4/clock-generator@69 i2c i2c-10: Failed to create I2C device for /axi/i2c@ff030000/i2c-mux@74/i2c@4/clock-generator@69 Signed-off-by: Quanyang Wang Link: https://lore.kernel.org/r/20210308115437.2232847-1-quanyang.wang@windriver.com Signed-off-by: Michal Simek commit b06112cd5e08b4ba1c0bf460d50b9d183ec74e2b Author: Laurent Pinchart Date: Sun Mar 7 01:09:15 2021 +0200 arm64: dts: zynqmp: Add power domain for the DisplayPort DMA controller The DisplayPort DMA controller (DPDMA) is located in the same power domain as the DisplayPort Subsystem (DPSUB). Specify the power domain in the device tree. Signed-off-by: Laurent Pinchart Link: https://lore.kernel.org/r/20210306230915.14979-1-laurent.pinchart@ideasonboard.com Signed-off-by: Michal Simek commit 3aadd86e5669f6bdb7c082e06c0ffadb4f987375 Author: Rafael J. Wysocki Date: Mon Feb 22 20:00:43 2021 +0100 ACPI: Drop unused ACPI_*_COMPONENT definitions and update documentation Drop the definitions of the following symbols: ACPI_SBS_COMPONENT ACPI_FAN_COMPONENT ACPI_CONTAINER_COMPONENT ACPI_MEMORY_DEVICE_COMPONENT that are not used in a meaningful way any more and update the ACPI debug documentation to avoid confusing users by making the impression that the ACPICA debug can be used for anything other than ACPICA itself, which is incorrect. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit e6a55ccbd5647fcb44a6389682e8f522998a5773 Author: Rafael J. Wysocki Date: Mon Feb 22 19:59:54 2021 +0100 ACPI: sysfs: Get rid of ACPICA message printing Replace the only ACPI_EXCEPTION() instance in sysfs.c with a pr_warn() call, drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not used any more and drop the ACPI_SYSTEM_COMPONENT definition that would not be used any more in a meaningful way after the above changes. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit 68eab52e712bba006333a7a2297a4d3b9ce49012 Merge: 52af99c3f55ff de972fd8c456c Author: Rafael J. Wysocki Date: Mon Mar 8 16:54:00 2021 +0100 Merge branch 'acpi-pci' Merge the ACPI PCI topic branch depended on by the following material. commit a13f7794df46b6bd305c0d5b21c6d5f439b2f7d3 Author: Rafael J. Wysocki Date: Mon Feb 22 20:01:38 2021 +0100 ACPI: HED: Drop unused ACPI_MODULE_NAME() definition ACPI_MODULE_NAME() is only used by ACPICA message printing which in turn is not used by the ACPI HED driver, so drop that definition from there. No functional impact. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit 52af99c3f55ff0afd815eac0271db2e1751af55c Author: Rafael J. Wysocki Date: Mon Feb 22 19:59:13 2021 +0100 ACPI: processor: Get rid of ACPICA message printing The ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() macros are used for message printing in the ACPICA code and they should not be used elsewhere. Special configuration (either kernel command line or sysfs-based) is needed to see the messages printed by them and the format of those messages is also special and convoluted. For this reason, replace all of the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances in the ACPI processor driver with corresponding dev_*(), acpi_handle_*() and pr_*() calls depending on the context in which they appear. Also drop the ACPI_PROCESSOR_COMPONENT definition that is not going to be necessary any more. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit 54e051920726caacc39b331647cdada93ee880da Author: Rafael J. Wysocki Date: Wed Feb 24 19:37:12 2021 +0100 ACPI: processor: idle: Drop extra prefix from pr_notice() Drop "ACPI: " from the pr_noitice() instance in acpi_processor_cstate_first_run_checks(), because pr_fmt() causes that prefix to be added to the message already. Reported-by: Hanjun Guo Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit 41103b3bbe37bbefe78562f915f799598e2b560c Author: Tian Tao Date: Tue Feb 23 08:56:29 2021 +0800 ACPI: processor: Remove initialization of static variable Address the following checkpatch error: ERROR: do not initialise statics to false Signed-off-by: Tian Tao [ rjw: Subject and changelog edits ] Signed-off-by: Rafael J. Wysocki commit de972fd8c456c7d2c19d22f179d853b4d28a7b01 Author: Rafael J. Wysocki Date: Fri Feb 19 19:17:44 2021 +0100 ACPI: PCI: Replace direct printk() invocations in pci_link.c Replace the direct printk() invocations in pci_link.c with (mostly corresponding) acpi_handle_*() calls relative to the ACPI handle of the given link device, which allows the AML corresponding to those messages to be identified more easily, or with pr_*() calls. While at it, add a pr_fmt() definition ot pci_link.c, make acpi_pci_link_check_possible() print all messages with acpi_handle_debug() for consistency and replace the (not-so- reliable) KERN_CONT-based message line composition in acpi_pci_link_add() with two pr_info() and a series of acpi_handle_debug() calls (the latter for the possible IRQs). Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit 866d6cdf353ac81ca0a55d0ad4be91222d856336 Author: Rafael J. Wysocki Date: Fri Feb 19 19:16:54 2021 +0100 ACPI: PCI: Drop ACPI_PCI_COMPONENT that is not used any more After dropping all of the code using ACPI_PCI_COMPONENT drop the definition of it too and update the documentation to remove all ACPI_PCI_COMPONENT references from it. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit c02b2fcd75060bcd497094b0e55359b8ac765186 Author: Rafael J. Wysocki Date: Fri Feb 19 19:16:10 2021 +0100 ACPI: PCI: Replace ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() The ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() macros are used for message printing in the ACPICA code and they should not be used elsewhere. Special configuration (either kernel command line or sysfs-based) is needed to see the messages printed by them and the format of those messages is also special and convoluted. For this reason, replace all of the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances in pci_link.c with acpi_handle_*() calls relative to the ACPI handle of the given link device (wherever that handle is readily available) or pr_debug() invocations. While at it, make acpi_pci_link_check_current() print all messages with pr_debug(), because all of them are in the same category (_CRS return buffer issues) and they all should be printed at the same log level. Also make acpi_pci_link_set() use acpi_handle_*() for printing all messages for consistency. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit bf5144a612f31baaf2cb2294dc92dd19d461ca67 Author: Rafael J. Wysocki Date: Fri Feb 19 19:15:27 2021 +0100 ACPI: PCI: IRQ: Consolidate printing diagnostic messages The code in pci_irq.c prints diagnostic messages using different and inconsistent methods. The majority of them are printed with the help of the dev_*() familiy of logging functions, but ACPI_DEBUG_PRINT() and ACPI_DEBUG_PRINT_RAW() are still used in some places which requires the ACPICA debug to be enabled additionally which is a nuisance and one message is printed using the raw printk(). To consolidate the printing of messages in that code, convert all of the ACPI_DEBUG_PRINT() instances in it into dev_dbg(), which is consistent with the way the other messages are printed by it, replace the only ACPI_DEBUG_PRINT_RAW() instance with pr_debug() and make it use pr_warn() istead of printk(KERN_WARNING ). Also add a pr_fmt() definition to that file and drop the _COMPONENT and ACPI_MODULE_NAME() definitions that are not used any more after the above changes. Signed-off-by: Rafael J. Wysocki Reviewed-by: Hanjun Guo commit d00745da644d42c2f97293eb3fe19cfd5c0b073c Author: Kiran K Date: Mon Mar 8 18:46:01 2021 +0530 Bluetooth: btintel: Fix offset calculation boot address parameter Boot address parameter was not getting updated properly due to wrong offset Signed-off-by: Kiran K Signed-off-by: Marcel Holtmann commit dcc354572d094b9dcf7c532c7263ab55dd376587 Author: Lee Jones Date: Wed Mar 3 14:24:30 2021 +0000 clk: sunxi: Demote non-conformant kernel-doc headers Headers must describe their parameters. Fixes the following W=1 kernel build warning(s): drivers/clk/sunxi/clk-sun9i-core.c:27: warning: Function parameter or member 'req' not described in 'sun9i_a80_get_pll4_factors' drivers/clk/sunxi/clk-sun9i-core.c:100: warning: Function parameter or member 'req' not described in 'sun9i_a80_get_gt_factors' drivers/clk/sunxi/clk-sun9i-core.c:155: warning: Function parameter or member 'req' not described in 'sun9i_a80_get_ahb_factors' drivers/clk/sunxi/clk-sun9i-core.c:235: warning: Function parameter or member 'req' not described in 'sun9i_a80_get_apb1_factors' drivers/clk/sunxi/clk-usb.c:22: warning: cannot understand function prototype: 'struct usb_reset_data ' drivers/clk/sunxi/clk-sun6i-ar100.c:26: warning: Function parameter or member 'req' not described in 'sun6i_get_ar100_factors' Cc: "Emilio López" Cc: Michael Turquette Cc: Stephen Boyd Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: Boris BREZILLON Cc: linux-clk@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Lee Jones Acked-by: Stephen Boyd Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210303142430.3168703-1-lee.jones@linaro.org commit 531fdbeedeb89bd32018a35c6e137765c9cc9e97 Author: Samuel Holland Date: Sun Jan 3 04:00:07 2021 -0600 arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection On boards where the only peripheral connected to PL0/PL1 is an X-Powers PMIC, configure the connection to use the RSB bus rather than the I2C bus. Compared to the I2C controller that shares the pins, the RSB controller allows a higher bus frequency, and it is more CPU-efficient. Signed-off-by: Samuel Holland Acked-by: Maxime Ripard Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210103100007.32867-5-samuel@sholland.org commit 4313e3523373f6b313d4218b51418f53475bcce5 Author: Al Viro Date: Fri Jan 29 17:32:40 2021 -0500 ecryptfs: get rid of pointless dget/dput in ->symlink() and ->link() calls in ->unlink(), ->rmdir() and ->rename() make sense - we want to prevent the underlying dentries going negative there. In ->symlink() and ->link() they are absolutely pointless. Signed-off-by: Al Viro commit a64b89088bb1413bb84424f0b16a4d1f9bb0e947 Author: Al Viro Date: Sun Jan 3 20:51:48 2021 -0500 coredump.h: move CONFIG_COREDUMP-only stuff inside the ifdef Signed-off-by: Al Viro commit d0f1088b31db2d03497a74ca67755df5515f8ff4 Author: Al Viro Date: Sun Mar 8 09:16:37 2020 -0400 coredump: don't bother with do_truncate() have dump_skip() just remember how much needs to be skipped, leave actual seeks/writing zeroes to the next dump_emit() or the end of coredump output, whichever comes first. And instead of playing with do_truncate() in the end, just write one NUL at the end of the last gap (if any). Signed-off-by: Al Viro commit e41d237818598c0b17458b4d0416b091a7959e55 Author: Al Viro Date: Sun Dec 27 16:59:56 2020 -0500 qib_fs: switch to simple_recursive_removal() Signed-off-by: Al Viro commit 6e1eb04a87f954eb06a89ee6034c166351dfff6e Author: David Howells Date: Wed Feb 10 08:59:52 2021 +0000 afs: Fix updating of i_mode due to 3rd party change Fix afs_apply_status() to mask off the irrelevant bits from status->mode when OR'ing them into i_mode. This can happen when a 3rd party chmod occurs. Also fix afs_inode_init_from_status() to mask off the mode bits when initialising i_mode. Fixes: 260a980317da ("[AFS]: Add "directory write" support.") Reported-by: Al Viro Signed-off-by: David Howells Signed-off-by: Al Viro commit ed94f87c2b123241ae5644cf82327e2da653adb6 Author: Jeff Layton Date: Thu Feb 25 15:04:16 2021 -0500 ceph: don't allow type or device number to change on non-I_NEW inodes Al pointed out that a malicious or broken MDS could change the type or device number of a given inode number. It may also be possible for the MDS to reuse an old inode number. Ensure that we never allow fill_inode to change the type part of the i_mode or the i_rdev unless I_NEW is set. Throw warnings if the MDS ever changes these on us mid-stream, and return an error. Don't set i_rdev directly, and rely on init_special_inode to do it. Also, fix up error handling in the callers of ceph_get_inode. In handle_cap_grant, check for and warn if the inode type changes, and only overwrite the mode if it didn't. Reported-by: Al Viro Signed-off-by: Jeff Layton Signed-off-by: Al Viro commit 3e10a15ffc8d77f05e655d14fd48c0b790dede35 Author: Jeff Layton Date: Thu Feb 25 15:04:15 2021 -0500 ceph: fix up error handling with snapdirs There are several warts in the snapdir error handling. The -EOPNOTSUPP return in __snapfh_to_dentry is currently lost, and the call to ceph_handle_snapdir is not currently checked at all. Fix all of this up and eliminate a BUG_ON in ceph_get_snapdir. We can handle that case with a warning and return an error. Signed-off-by: Jeff Layton Signed-off-by: Al Viro commit 6e3e2c4362e41a2f18e3f7a5ad81bd2f49a47b85 Author: Al Viro Date: Mon Mar 1 20:37:10 2021 -0500 new helper: inode_wrong_type() inode_wrong_type(inode, mode) returns true if setting inode->i_mode to given value would've changed the inode type. We have enough of those checks open-coded to make a helper worthwhile. Signed-off-by: Al Viro commit a4bb294c61923eacacf55a2a5a9253ed7de68fa9 Author: Pieter Beers Date: Thu Mar 4 20:14:55 2021 +0100 ARM: dts: sunxi: h2-plus-bananapi-m2-zero: Add HDMI out Add HDMI out, including the display engine, to the BananaPi M2 Zero. Signed-off-by: Pieter Beers Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210304191456.2895-2-pjbrs@floorenpj.xs4all.nl commit ddaa9bea4ffaba50f814585f294a5d98641b41ad Author: Lucas Tanure Date: Fri Mar 5 17:34:32 2021 +0000 ASoC: cs42l42: Always wait at least 3ms after reset This delay is part of the power-up sequence defined in the datasheet. A runtime_resume is a power-up so must also include the delay. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.195740-6-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 9ad4f9ea976e05d4eba62ea58c7c7c45705b80a1 Author: Lucas Tanure Date: Fri Mar 5 17:34:31 2021 +0000 ASoC: cs42l42: Don't enable/disable regulator at Bias Level dev_pm_ops already enable/disable the codec if not in use Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.195740-5-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit a2ddc577ee4641889bf105d4d6e05be415bd4462 Author: Lucas Tanure Date: Fri Mar 5 17:34:30 2021 +0000 ASoC: cs42l42: Fix mixer volume control The minimum value is 0x3f (-63dB), which also is mute Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.195740-4-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 3656667e66858fef45017c8e7c73e9918ed23915 Author: Lucas Tanure Date: Fri Mar 5 17:34:29 2021 +0000 ASoC: cs42l42: Fix channel width support Remove the hard coded 32 bits width and replace with the correct width calculated by params_width. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.195740-3-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 97e2b5e5dcd543cd4d85ecb1bfa2a9721a08f411 Author: Lucas Tanure Date: Fri Mar 5 17:34:28 2021 +0000 ASoC: cs42l42: Fix Bitclock polarity inversion The driver was setting bit clock polarity opposite to intended polarity. Also simplify the code by grouping ADC and DAC clock configurations into a single field. Signed-off-by: Lucas Tanure Link: https://lore.kernel.org/r/20210305173442.195740-2-tanureal@opensource.cirrus.com Signed-off-by: Mark Brown commit 210e4c89ef61432040c6cd828fefa441f4887186 Author: Arnaldo Carvalho de Melo Date: Mon Mar 8 11:17:51 2021 -0300 perf symbols: Fix dso__fprintf_symbols_by_name() to return the number of printed chars The 'ret' variable was initialized to zero but then it was not updated from the fprintf() return, fix it. Reported-by: Yang Li cc: Alexander Shishkin cc: Ingo Molnar cc: Jiri Olsa cc: Mark Rutland cc: Namhyung Kim Cc: Peter Zijlstra Cc: Srikar Dronamraju Fixes: 90f18e63fbd00513 ("perf symbols: List symbols in a dso in ascending name order") Signed-off-by: Arnaldo Carvalho de Melo commit edf208591724e66682cc5aa0b61035800757a49a Author: Yannick Fertre Date: Mon Feb 22 09:22:57 2021 +0000 drm/stm: dsi: Avoid printing errors for -EPROBE_DEFER Don't print error when probe deferred error is returned. Signed-off-by: Raphael Gallais-Pou Signed-off-by: Yannick Fertre Tested-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20210222092205.32086-2-raphael.gallais-pou@foss.st.com commit 2942a671a37b61186e1073c76a17b1a631111f83 Author: Ian Rogers Date: Sun Mar 7 14:30:24 2021 -0800 tools include: Add __sum16 and __wsum definitions. This adds definitions available in the uapi version. Explanation: In the kernel include of types.h the uapi version is included. In tools the uapi/linux/types.h and linux/types.h are distinct. For BPF programs a definition of __wsum is needed by the generated bpf_helpers.h. The definition comes either from a generated vmlinux.h or from that may be transitively included from bpf.h. The perf build prefers linux/types.h over uapi/linux/types.h for *. To allow tools/perf/util/bpf_skel/bpf_prog_profiler.bpf.c to compile with the same include path used for perf then these definitions are necessary. There is likely a wider conversation about exactly how types.h should be specified and the include order used by the perf build - it is somewhat confusing that tools/include/uapi/linux/bpf.h is using the non-uapi types.h. *see tools/perf/Makefile.config: ... INC_FLAGS += -I$(srctree)/tools/include/ INC_FLAGS += -I$(srctree)/tools/arch/$(SRCARCH)/include/uapi INC_FLAGS += -I$(srctree)/tools/include/uapi ... The include directories are scanned from left-to-right: https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html As tools/include/linux/types.h appears before tools/include/uapi/linux/types.h then I say it is preferred. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Alexei Starovoitov Cc: Andrii Nakryiko 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: Tiezhu Yang Cc: Yonghong Song Cc: bpf@vger.kernel.org Cc: netdev@vger.kernel.org Link: http://lore.kernel.org/lkml/20210307223024.4081067-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 9b4ab638c49ef6ea5f2f47bc5ce3eef3c9bb6e2d Author: Benjamin Li Date: Mon Mar 8 15:13:40 2021 +0200 interconnect: qcom: icc-rpm: record slave RPM id in error log Add slave RPM ID to assist with identifying incorrect RPM config. Signed-off-by: Benjamin Li Reviewed-by: Jun Nie Link: https://lore.kernel.org/r/20210205015205.22947-2-benl@squareup.com Signed-off-by: Georgi Djakov commit 009ef05f98129aa91c62c3baab859ba593a15bb2 Merge: 2777b81b379df 144c79ef33536 Author: Arnaldo Carvalho de Melo Date: Mon Mar 8 10:11:33 2021 -0300 Merge remote-tracking branch 'torvalds/master' into perf/core To pick up the fixes sent for v5.12 and continue development based on v5.12-rc2, i.e. without the swap on file bug. This also gets a slightly newer and better tools/perf/arch/arm/util/cs-etm.c patch version, using the BIT() macro, that had already been slated to v5.13 but ended up going to v5.12-rc1 on an older version. Signed-off-by: Arnaldo Carvalho de Melo commit f80a1d41432869dd78dfe8373060371918a05326 Author: AngeloGioacchino Del Regno Date: Mon Mar 8 15:09:45 2021 +0200 interconnect: qcom: Add SDM660 interconnect provider driver Introduce a driver for the Qualcomm interconnect busses found in the SDM630/SDM636/SDM660 SoCs. The topology consists of several NoCs that are controlled by a remote processor that collects the aggregated bandwidth for each master-slave pairs. On a note, these chips are managing the "bus QoS" in a "hybrid" fashion: some of the paths in the topology are managed through (and by, of course) the RPM uC, while some others are "AP Owned", meaning that the AP shall do direct writes to the appropriate QoS registers for the specific paths and ports, instead of sending an indication to the RPM and leaving the job to that one. Signed-off-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20201017133718.31327-3-kholk11@gmail.com Signed-off-by: Georgi Djakov commit 33ad2800348e6c20f05b86ef01e8216fc3e3c762 Author: AngeloGioacchino Del Regno Date: Mon Mar 8 15:09:45 2021 +0200 dt-bindings: interconnect: Add bindings for Qualcomm SDM660 NoC Add the bindings for the Qualcomm SDM660-class NoC, valid for SDM630, SDM636, SDM660 and SDA variants. Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Rob Herring Link: https://lore.kernel.org/r/20201017133718.31327-2-kholk11@gmail.com Signed-off-by: Georgi Djakov commit ac4eb83ab255de9c31184df51fd1534ba36fd212 Author: Christian König Date: Sat Feb 20 09:50:42 2021 +0100 drm/sched: select new rq even if there is only one v3 This is necessary when changing priorities of an entity. v2: test the sched_list instead of num_sched. v3: set the sched_list to NULL when there is only one entry Signed-off-by: Christian König Reviewed-by: Sonny Jiang Link: https://patchwork.freedesktop.org/patch/msgid/20210305125155.2312-1-christian.koenig@amd.com commit d0962f2b24c99889a386f0658c71535f56358f77 Author: Andy Lutomirski Date: Sat Feb 13 11:19:45 2021 -0800 x86/entry/32: Remove leftover macros after stackprotector cleanups Now that nonlazy-GS mode is gone, remove the macros from entry_32.S that obfuscated^Wabstracted GS handling. The assembled output is identical before and after this patch. Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/b1543116f0f0e68f1763d90d5f7fcec27885dff5.1613243844.git.luto@kernel.org commit 3fb0fdb3bbe7aed495109b3296b06c2409734023 Author: Andy Lutomirski Date: Sat Feb 13 11:19:44 2021 -0800 x86/stackprotector/32: Make the canary into a regular percpu variable On 32-bit kernels, the stackprotector canary is quite nasty -- it is stored at %gs:(20), which is nasty because 32-bit kernels use %fs for percpu storage. It's even nastier because it means that whether %gs contains userspace state or kernel state while running kernel code depends on whether stackprotector is enabled (this is CONFIG_X86_32_LAZY_GS), and this setting radically changes the way that segment selectors work. Supporting both variants is a maintenance and testing mess. Merely rearranging so that percpu and the stack canary share the same segment would be messy as the 32-bit percpu address layout isn't currently compatible with putting a variable at a fixed offset. Fortunately, GCC 8.1 added options that allow the stack canary to be accessed as %fs:__stack_chk_guard, effectively turning it into an ordinary percpu variable. This lets us get rid of all of the code to manage the stack canary GDT descriptor and the CONFIG_X86_32_LAZY_GS mess. (That name is special. We could use any symbol we want for the %fs-relative mode, but for CONFIG_SMP=n, gcc refuses to let us use any name other than __stack_chk_guard.) Forcibly disable stackprotector on older compilers that don't support the new options and turn the stack canary into a percpu variable. The "lazy GS" approach is now used for all 32-bit configurations. Also makes load_gs_index() work on 32-bit kernels. On 64-bit kernels, it loads the GS selector and updates the user GSBASE accordingly. (This is unchanged.) On 32-bit kernels, it loads the GS selector and updates GSBASE, which is now always the user base. This means that the overall effect is the same on 32-bit and 64-bit, which avoids some ifdeffery. [ bp: Massage commit message. ] Signed-off-by: Andy Lutomirski Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/c0ff7dba14041c7e5d1cae5d4df052f03759bef3.1613243844.git.luto@kernel.org commit c6b2f240bf8d5604e6507aff15d5c441944c2f89 Author: Feng Tang Date: Fri Mar 5 15:21:18 2021 +0800 tools/x86: Add a kcpuid tool to show raw CPU features End users frequently want to know what features their processor supports, independent of what the kernel supports. /proc/cpuinfo is great. It is omnipresent and since it is provided by the kernel it is always as up to date as the kernel. But, it could be ambiguous about processor features which can be disabled by the kernel at boot-time or compile-time. There are some user space tools showing more raw features, but they are not bound with kernel, and go with distros. Many end users are still using old distros with new kernels (upgraded by themselves), and may not upgrade the distros only to get a newer tool. So here arise the need for a new tool, which * shows raw CPU features read from the CPUID instruction * will be easier to update compared to existing userspace tooling (perhaps distributed like perf) * inherits "modern" kernel development process, in contrast to some of the existing userspace CPUID tools which are still being developed without git and distributed in tarballs from non-https sites. * Can produce output consistent with /proc/cpuinfo to make comparison easier. The CPUID leaf definitions are kept in an .csv file which allows for updating only that file to add support for new feature leafs. This is based on prototype code from Borislav Petkov (http://sr71.net/~dave/intel/stupid-cpuid.c). [ bp: - Massage, add #define _GNU_SOURCE to fix implicit declaration of function ‘strcasestr' warning - remove superfluous newlines - fallback to cpuid.csv in the current dir if none found - fix typos - move comments over the lines instead of sideways. ] Originally-from: Borislav Petkov Suggested-by: Dave Hansen Suggested-by: Borislav Petkov Signed-off-by: Feng Tang Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/1614928878-86075-1-git-send-email-feng.tang@intel.com commit 6840a150b9daf35e4d21ab9780d0a03b4ed74a5b Author: Mike Travis Date: Fri Mar 5 10:28:53 2021 -0600 x86/platform/uv: Set section block size for hubless architectures Commit bbbd2b51a2aa ("x86/platform/UV: Use new set memory block size function") added a call to set the block size value that is needed by the kernel to set the boundaries in the section list. This was done for UV Hubbed systems but missed in the UV Hubless setup. Fix that mistake by adding that same set call for hubless systems, which support the same NVRAMs and Intel BIOS, thus the same problem occurs. [ bp: Massage commit message. ] Fixes: bbbd2b51a2aa ("x86/platform/UV: Use new set memory block size function") Signed-off-by: Mike Travis Signed-off-by: Borislav Petkov Reviewed-by: Steve Wahl Reviewed-by: Russ Anderson Link: https://lkml.kernel.org/r/20210305162853.299892-1-mike.travis@hpe.com commit 62acbbb661a1a7eb3ee155fe029a4901f4d5cc45 Author: Kiran K Date: Mon Mar 8 16:44:54 2021 +0530 Bluetooth: btusb: print firmware file name on error loading firmware print the firmware file name on error loading from fie system Signed-off-by: Kiran K Signed-off-by: Marcel Holtmann commit 505a27a7342912f25ef3d9dabd6a08857e76efc2 Author: John Ogness Date: Wed Mar 3 11:15:28 2021 +0100 printk: console: remove unnecessary safe buffer usage Upon registering a console, safe buffers are activated when setting up the sequence number to replay the log. However, these are already protected by @console_sem and @syslog_lock. Remove the unnecessary safe buffer usage. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-16-john.ogness@linutronix.de commit a4f987653241db9fa1f99531b430cebb83f1eae1 Author: John Ogness Date: Wed Mar 3 11:15:27 2021 +0100 printk: kmsg_dump: remove _nolock() variants kmsg_dump_rewind() and kmsg_dump_get_line() are lockless, so there is no need for _nolock() variants. Remove these functions and switch all callers of the _nolock() variants. The functions without _nolock() were chosen because they are already exported to kernel modules. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-15-john.ogness@linutronix.de commit 996e966640ddea7b535cbe7b749e87a3b24f37e8 Author: John Ogness Date: Wed Mar 3 11:15:26 2021 +0100 printk: remove logbuf_lock Since the ringbuffer is lockless, there is no need for it to be protected by @logbuf_lock. Remove @logbuf_lock. @console_seq, @exclusive_console_stop_seq, @console_dropped are protected by @console_lock. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-14-john.ogness@linutronix.de commit f9f3f02db98bbe678a8e57fe9432b196174744a3 Author: John Ogness Date: Wed Mar 3 11:15:25 2021 +0100 printk: introduce a kmsg_dump iterator Rather than storing the iterator information in the registered kmsg_dumper structure, create a separate iterator structure. The kmsg_dump_iter structure can reside on the stack of the caller, thus allowing lockless use of the kmsg_dump functions. Update code that accesses the kernel logs using the kmsg_dumper structure to use the new kmsg_dump_iter structure. For kmsg_dumpers, this also means adding a call to kmsg_dump_rewind() to initialize the iterator. All this is in preparation for removal of @logbuf_lock. Signed-off-by: John Ogness Reviewed-by: Kees Cook # pstore Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-13-john.ogness@linutronix.de commit 5f6c7648e556f41a3064bb6dceb9e102c50b618d Author: John Ogness Date: Wed Mar 3 11:15:24 2021 +0100 printk: kmsg_dumper: remove @active field All 6 kmsg_dumpers do not benefit from the @active flag: (provide their own synchronization) - arch/powerpc/kernel/nvram_64.c - arch/um/kernel/kmsg_dump.c - drivers/mtd/mtdoops.c - fs/pstore/platform.c (only dump on KMSG_DUMP_PANIC, which does not require synchronization) - arch/powerpc/platforms/powernv/opal-kmsg.c - drivers/hv/vmbus_drv.c The other 2 kmsg_dump users also do not rely on @active: (hard-code @active to always be true) - arch/powerpc/xmon/xmon.c - kernel/debug/kdb/kdb_main.c Therefore, @active can be removed. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-12-john.ogness@linutronix.de commit 636babdc06961f173696cb664550b4cc239dde2e Author: John Ogness Date: Wed Mar 3 11:15:23 2021 +0100 printk: add syslog_lock The global variables @syslog_seq, @syslog_partial, @syslog_time and write access to @clear_seq are protected by @logbuf_lock. Once @logbuf_lock is removed, these variables will need their own synchronization method. Introduce @syslog_lock for this purpose. @syslog_lock is a raw_spin_lock for now. This simplifies the transition to removing @logbuf_lock. Once @logbuf_lock and the safe buffers are removed, @syslog_lock can change to spin_lock. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-11-john.ogness@linutronix.de commit 35b2b1634849ac19b2dd28cae6c97b64c4299830 Author: John Ogness Date: Wed Mar 3 11:15:22 2021 +0100 printk: use atomic64_t for devkmsg_user.seq @user->seq is indirectly protected by @logbuf_lock. Once @logbuf_lock is removed, @user->seq will be no longer safe from an atomicity point of view. In preparation for the removal of @logbuf_lock, change it to atomic64_t to provide this safety. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-10-john.ogness@linutronix.de commit 7d7a23a91c915f6a90b2a636b130c53e0fe5154c Author: John Ogness Date: Wed Mar 3 11:15:21 2021 +0100 printk: use seqcount_latch for clear_seq kmsg_dump_rewind_nolock() locklessly reads @clear_seq. However, this is not done atomically. Since @clear_seq is 64-bit, this cannot be an atomic operation for all platforms. Therefore, use a seqcount_latch to allow readers to always read a consistent value. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-9-john.ogness@linutronix.de commit cf5b0208fda4602d0ef383a86e942fb3dcb8852b Author: John Ogness Date: Wed Mar 3 11:15:20 2021 +0100 printk: introduce CONSOLE_LOG_MAX Instead of using "LOG_LINE_MAX + PREFIX_MAX" for temporary buffer sizes, introduce CONSOLE_LOG_MAX. This represents the maximum size that is allowed to be printed to the console for a single record. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-8-john.ogness@linutronix.de commit 4260e0e5510158d704898603331e5365ebe957de Author: John Ogness Date: Wed Mar 3 11:15:19 2021 +0100 printk: consolidate kmsg_dump_get_buffer/syslog_print_all code The logic for finding records to fit into a buffer is the same for kmsg_dump_get_buffer() and syslog_print_all(). Introduce a helper function find_first_fitting_seq() to handle this logic. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-7-john.ogness@linutronix.de commit 726b5097701a8d46f5354be780e1a11fc4ca1187 Author: John Ogness Date: Wed Mar 3 11:15:18 2021 +0100 printk: refactor kmsg_dump_get_buffer() kmsg_dump_get_buffer() requires nearly the same logic as syslog_print_all(), but uses different variable names and does not make use of the ringbuffer loop macros. Modify kmsg_dump_get_buffer() so that the implementation is as similar to syslog_print_all() as possible. A follow-up commit will move this common logic into a separate helper function. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-6-john.ogness@linutronix.de commit e831e400f73b0e7aa4629200c2ef71e068262414 Author: John Ogness Date: Wed Mar 3 11:15:17 2021 +0100 printk: kmsg_dump: remove unused fields struct kmsg_dumper still contains some fields that were used to iterate the old ringbuffer. They are no longer used. Remove them and update the struct documentation. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-5-john.ogness@linutronix.de commit bb07b16c44b2c6ddbafa44bb06454719002e828e Author: John Ogness Date: Wed Mar 3 11:15:16 2021 +0100 printk: limit second loop of syslog_print_all The second loop of syslog_print_all() subtracts lengths that were added in the first loop. With commit b031a684bfd0 ("printk: remove logbuf_lock writer-protection of ringbuffer") it is possible that records are (over)written during syslog_print_all(). This allows the possibility of the second loop subtracting lengths that were never added in the first loop. This situation can result in syslog_print_all() filling the buffer starting from a later record, even though there may have been room to fit the earlier record(s) as well. Fixes: b031a684bfd0 ("printk: remove logbuf_lock writer-protection of ringbuffer") Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-4-john.ogness@linutronix.de commit 40ddbbac7f16eb91f9f2bbc414f283102052ce14 Author: John Ogness Date: Wed Mar 3 11:15:15 2021 +0100 mtd: mtdoops: synchronize kmsg_dumper The kmsg_dumper can be called from any context and CPU, possibly from multiple CPUs simultaneously. Since the writing of the buffer can occur from a later scheduled work queue, the oops buffer must be protected against simultaneous dumping. Use an atomic bit to mark when the buffer is protected. Release the protection in between setting the buffer and the actual writing in order for a possible panic (immediate write) to be written during the scheduling of a previous oops (delayed write). An atomic bit (rather than a spinlock) was chosen so that no scheduling or preemption side-effects would be introduced. The MTD kmsg_dumper may dump directly or it may be delayed (via scheduled work). Depending on the context, different MTD callbacks are used. For example, mtd_write() expects to be called in a non-atomic context and may take a mutex. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-3-john.ogness@linutronix.de commit fdd2c1f4e2c2e2fee1d95d18b4b06bc0d15c368a Author: John Ogness Date: Wed Mar 3 11:15:14 2021 +0100 um: synchronize kmsg_dumper The kmsg_dumper can be called from any context and CPU, possibly from multiple CPUs simultaneously. Since a static buffer is used to retrieve the kernel logs, this buffer must be protected against simultaneous dumping. Skip dumping if another context is already dumping. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20210303101528.29901-2-john.ogness@linutronix.de commit d59b8faa047ead7187e333ac967b8df40870ce2c Author: Gil Fine Date: Tue Feb 16 15:04:27 2021 +0200 thunderbolt: Drop unused functions tb_switch_is_[ice|tiger]_lake() Drop the two functions not used anymore in the driver. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit 815f421b6f6d1aedc3ebc73bf46887e02e4349fd Author: Gil Fine Date: Tue Feb 16 15:04:26 2021 +0200 thunderbolt: debugfs: Handle fail reading block There are cases when reading block of dwords in single transaction fail, for several reasons, mostly if HW publish to implement all of the dwords, while actually it doesn't or if some dwords not accessible for read for security reasons. We handle these cases by trying to read the block, dword-by-dword, one dword per transaction, till we get a failure. Signed-off-by: Gil Fine Signed-off-by: Mika Westerberg commit a9cdf68092908313320c6959c4e1bdfdb7103613 Author: Jagan Teki Date: Tue Mar 2 23:27:00 2021 +0530 drm/stm: ltdc: Use simple encoder STM ltdc driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Jagan Teki Acked-by: Thomas Zimmermann Tested-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20210302175700.28640-1-jagan@amarulasolutions.com commit 87eaede45385e384faf5b15d9c718a951667bdd0 Author: Heikki Krogerus Date: Thu Mar 4 11:20:23 2021 +0300 platform/x86: touchscreen_dmi: Handle device properties with software node API The old device property API (device_add_properties()) is going to be removed. Replacing the it with the software node API equivalent, device_create_managed_software_node(). Signed-off-by: Heikki Krogerus Link: https://lore.kernel.org/r/20210304082023.17689-1-heikki.krogerus@linux.intel.com Signed-off-by: Hans de Goede commit 2b329f5694aec86107931584413c7d2ebc6b548d Author: Uwe Kleine-König Date: Mon Mar 1 17:04:04 2021 +0100 platform/x86: wmi: Make remove callback return void The driver core ignores the return value of struct bus_type::remove() (and so wmi_dev_remove()) because there is only little that can be done. To simplify the quest to make this function return void, let struct wmi_driver::remove() return void, too. All implementers of this callback return 0 already and this way it should be obvious to driver authors that returning an error code is a bad idea. Signed-off-by: Uwe Kleine-König Reviewed-by: Pali Rohár Link: https://lore.kernel.org/r/20210301160404.1677064-1-u.kleine-koenig@pengutronix.de Signed-off-by: Hans de Goede commit 2478907572fdd7cf285720f16513e956b3528854 Author: Rafael J. Wysocki Date: Wed Feb 24 19:41:44 2021 +0100 platform: x86: ACPI: Get rid of ACPICA message printing A few x86 platform drivers use ACPI_DEBUG_PRINT() or ACPI_EXCEPTION() for printing messages, but that is questionable, because those macros belong to ACPICA and they should not be used elsewhere. In addition, ACPI_DEBUG_PRINT() requires special enabling to allow it to actually print the message, which is a nuisance, and the _COMPONENT symbol generally needed for that is not defined in any of the files in question. For this reason, replace the ACPI_DEBUG_PRINT() in lg-laptop.c with pr_debug() and the one in xo15-ebook.c with acpi_handle_debug() (with the additional benefit that the source object can be identified more easily after this change). Also drop the ACPI_MODULE_NAME() definitions that are only used by the ACPICA message printing macros from those files and from wmi.c and surfacepro3_button.c (while at it). Signed-off-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/2074665.VPHYfYaQb6@kreacher [hdegoede@redhat.com: Drop acer-wmi.c chunk, a similar patch was already merged] Signed-off-by: Hans de Goede commit d9ff4ec3324fa34dad0e7ea2e3500536fe216b49 Author: Alban Bedel Date: Mon Feb 22 15:15:59 2021 +0100 platform/x86: intel-hid: Support Lenovo ThinkPad X1 Tablet Gen 2 Like a few other system the Lenovo ThinkPad X1 Tablet Gen 2 miss the HEBC method, which prevent the power button from working. Add a quirk to enable the button array on this system family and fix the power button. Signed-off-by: Alban Bedel Tested-by: Alexander Kobel Link: https://lore.kernel.org/r/20210222141559.3775-1-albeu@free.fr Signed-off-by: Hans de Goede commit 4296f679ca50f97c4973715f1e9e72357d2eb251 Author: Elia Devito Date: Sun Feb 21 23:13:40 2021 +0100 platform/x86: hp-wmi: add platform profile support Implement support for cool, balanced and performance thermal profile Signed-off-by: Elia Devito Link: https://lore.kernel.org/r/20210221221339.12395-1-eliadevito@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit d7da7534272f7b42629042a5b6fa51debca9201e Author: Elia Devito Date: Sun Feb 21 22:02:57 2021 +0100 platform/x86: hp-wmi: rename "thermal policy" to "thermal profile" rename "thermal policy" with the more appropriate term "thermal profile" Signed-off-by: Elia Devito Link: https://lore.kernel.org/r/20210221210256.68198-1-eliadevito@gmail.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit b81c6ce9a87ca45085798b87012748c42925e504 Author: Petr Vaněk Date: Tue Feb 16 22:36:13 2021 +0100 platform/x86: Fix typo in Kconfig uses by -> used by Signed-off-by: Petr Vaněk Reviewed-by: Mark Gross Link: https://lore.kernel.org/r/YCw6zavnfeHRGWgr@arkam Signed-off-by: Hans de Goede commit 8b6077b8de81bb191f7939af9dd0eabd064b5f0b Author: Hans de Goede Date: Tue Feb 16 16:24:54 2021 +0100 MAINTAINERS: update MELLANOX HARDWARE PLATFORM SUPPORT maintainers The "MELLANOX HARDWARE PLATFORM SUPPORT" is maintained as part of the pdx86 tree. But when Mark and I took over as new pdx86 maintainers the "MELLANOX HARDWARE PLATFORM SUPPORT" MAINTAINERS entry was not updated. Update the entry now. Signed-off-by: Hans de Goede Acked-by: Andy Shevchenko Acked-by: Mark Gross Link: https://lore.kernel.org/r/20210216152454.11878-1-hdegoede@redhat.com commit 0a053f01fe6d7f92d36b5db1bcdbfc4f71e2bce0 Author: Alexander Kobel Date: Sat Feb 13 16:13:36 2021 +0100 platform/x86: thinkpad_acpi: Handle keyboard cover attach/detach events Those events occur when a keyboard cover is attached to a ThinkPad X1 Tablet series device. Typically, they are used to switch from normal to tablet mode in userspace; e.g., to offer touch keyboard choices when focus goes to a text box and no keyboard is attached, or to enable autorotation of the display according to the builtin orientation sensor. intel-vtbn already recognizes those events. To avoid sending duplicate events to userspace, they are simply ignored. Thus, this patch only avoids warnings about unknown and unhandled HKEYs 0x4012 and 0x4013. For more information about the background and potential improvements for different types of attachment options, such as the Pico cartridge dock module, see https://lore.kernel.org/platform-driver-x86/38cb8265-1e30-d547-9e12-b4ae290be737@a-kobel.de/ Signed-off-by: Alexander Kobel Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/83a0e45f-590d-0c7d-0afd-00a5a6322bd0@a-kobel.de Signed-off-by: Hans de Goede commit 03ee318391707e822eb915f4f30fe42c78b9d89b Author: Maximilian Luz Date: Thu Mar 4 20:05:24 2021 +0100 platform/surface: aggregator: Make SSAM_DEFINE_SYNC_REQUEST_x define static functions The SSAM_DEFINE_SYNC_REQUEST_x() macros are intended to reduce boiler-plate code for SSAM request definitions by defining a wrapper function for the specified request. The client device variants of those macros, i.e. SSAM_DEFINE_SYNC_REQUEST_CL_x() in particular rely on the multi-device (MD) variants, e.g.: #define SSAM_DEFINE_SYNC_REQUEST_CL_R(name, rtype, spec...) \ SSAM_DEFINE_SYNC_REQUEST_MD_R(__raw_##name, rtype, spec) \ int name(struct ssam_device *sdev, rtype *ret) \ { \ return __raw_##name(sdev->ctrl, sdev->uid.target, \ sdev->uid.instance, ret); \ } This now creates the problem that it is not possible to declare the generated functions static via static SSAM_DEFINE_SYNC_REQUEST_CL_R(...) as this will only apply to the function defined by the multi-device macro, i.e. SSAM_DEFINE_SYNC_REQUEST_MD_R(). Thus compiling with `-Wmissing-prototypes' rightfully complains that there is a 'static' keyword missing. To solve this, make all SSAM_DEFINE_SYNC_REQUEST_x() macros define static functions. Non-client-device macros are also changed for consistency. In general, we expect those functions to be only used locally in the respective drivers for the corresponding interfaces, so having to define a wrapper function to be able to export this should be the odd case out. Reported-by: kernel test robot Fixes: b78b4982d763 ("platform/surface: Add platform profile driver") Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210304190524.1172197-1-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 47f25032c0e34ea492e88a68db373c92eae1d70a Author: Tudor Ambarus Date: Mon Mar 8 11:23:33 2021 +0200 MAINTAINERS: Add Michael and Pratyush as designated reviewers for SPI NOR It's already been the case for some time that Michael and Pratyush are reviewing SPI NOR patches. Update MAINTAINERS to reflect reality. Signed-off-by: Tudor Ambarus Acked-by: Michael Walle Acked-by: Pratyush Yadav Acked-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210308092333.80521-2-tudor.ambarus@microchip.com commit 9951bb259dd0794db39beb63899104da9579efcc Author: Jason Gerecke Date: Thu Feb 11 11:30:59 2021 -0800 HID: hiddev: Return specific error codes on connect failure The only caller of this function only cares about gross success/failure but we still might as well resolve the following smatch warning and fix the other error paths as well: hiddev.c:894 hiddev_connect() warn: returning -1 instead of -ENOMEM is sloppy Signed-off-by: Jason Gerecke Signed-off-by: Jiri Kosina commit f567d6ef8606fb427636e824c867229ecb5aefab Author: Maxim Mikityanskiy Date: Sun Feb 7 16:47:40 2021 +0200 HID: plantronics: Workaround for double volume key presses Plantronics Blackwire 3220 Series (047f:c056) sends HID reports twice for each volume key press. This patch adds a quirk to hid-plantronics for this product ID, which will ignore the second volume key press if it happens within 5 ms from the last one that was handled. The patch was tested on the mentioned model only, it shouldn't affect other models, however, this quirk might be needed for them too. Auto-repeat (when a key is held pressed) is not affected, because the rate is about 3 times per second, which is far less frequent than once in 5 ms. Fixes: 81bb773faed7 ("HID: plantronics: Update to map volume up/down controls") Signed-off-by: Maxim Mikityanskiy Signed-off-by: Jiri Kosina commit 434f77092eeb42d3ab4484f71921450d7f8966e5 Author: Hans de Goede Date: Thu Feb 4 21:56:17 2021 +0100 HID: logitech-dj: Handle newer quad/bt2.0 receivers in HID proxy mode The Dinovo Edge and Dinovo Mini keyboards with builtin touchpad come with a different version of the quad/bt2.0 combo receivers shipped with the MX5000 and MX5500 keyboards. These receivers are compatible with one another, e.g. the Dinovo Edge keyboard can be paired with the MX5000 receiver. Like the MX5x00 receivers in HID proxy mode these receivers present themselves as a hub with multiple USB-HID devices, one for the keyboard and one for the mouse. Where they differ is that the mouse USB-device has 2 input reports for reporting mice events. It has the exact same INPUT(2) report as the MX5x00 receivers, but it also has a second INPUT(5) mouse report which is different; and when the Dinovo receivers are paired with the Dinovo keyboards the second INPUT(5) mouse report is actually used for events on the builtin touchpad. Add support for handling the Dinovo quad/bluetooth-2.0 combo receivers in HID proxy mode to logitech-dj, like we already do for the similar MX5000 and MX5500 receivers. This adds battery monitoring functionality (through logitech-hidpp) and fixes the Phone (Fn + F1) and "[A]" - "[D]" (Fn + F9 - F12) hotkeys not working on the Dinovo Edge. Note these receivers present themselves as a hub with 2 separate USB devices for the keyboard and mouse; and the logitech-dj code needs to bind to both devices (just as with the MX5x00 receivers). Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 751cb6518ceffa44263a9a1ea89d92830497d35d Author: Hans de Goede Date: Thu Feb 4 21:56:16 2021 +0100 HID: logitech-dj: Use hid-ids.h defines for USB device-ids for all supported devices The logitech-dj code already uses hid-ids.h defines for almost all devices it supports. Lets be consistent: add and use hid-ids.h defines for the G700, MX5000 and MX5500 receivers too. Also add / update some comments to make the comment style in the hid_device_id table consistent too. Signed-off-by: Hans de Goede Signed-off-by: Jiri Kosina commit 09141ec0e4efede4fb5e2aa68cb819fba974325c Author: Dave Hansen Date: Thu Mar 5 09:47:06 2020 -0800 x86: Remove duplicate TSC DEADLINE MSR definitions There are two definitions for the TSC deadline MSR in msr-index.h, one with an underscore and one without. Axe one of them and move all the references over to the other one. [ bp: Fixup the MSR define in handle_fastpath_set_msr_irqoff() too. ] Signed-off-by: Dave Hansen Signed-off-by: Borislav Petkov Link: https://lkml.kernel.org/r/20200305174706.0D6B8EE4@viggo.jf.intel.com commit 0960941043a19c0413b30dc5e88a55c593fda1cb Author: Andy Shevchenko Date: Fri Feb 26 21:32:25 2021 +0200 HID: i2c-hid: acpi: Drop redundant ACPI_PTR() The driver depends on ACPI, ACPI_PTR() resolution is always the same. Otherwise a compiler may produce a warning. That said, the rule of thumb either ugly ifdeffery with ACPI_PTR or none should be used in a driver. Signed-off-by: Andy Shevchenko Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit a3836a02c5f20c4cbc09e463e9f7a7555c77d70d Author: Andy Shevchenko Date: Fri Feb 26 21:32:24 2021 +0200 HID: i2c-hid: acpi: Move GUID out of function and described it Move static GUID variable out of the function and add a comment how it looks like in the human readable representation. While at it, include uuid.h since the guid_t type is defined in it. Signed-off-by: Andy Shevchenko Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 4cecff8f1d0e52300e925ea6056acfd12cbc1bf2 Author: Andy Shevchenko Date: Fri Feb 26 21:32:23 2021 +0200 HID: i2c-hid: acpi: Switch to new style i2c-driver probe function Switch to the new style i2c-driver probe_new probe function. Signed-off-by: Andy Shevchenko Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit 6d97010eb9ff2d00955c42595e4a1a7fff988992 Author: Andy Shevchenko Date: Fri Feb 26 21:32:22 2021 +0200 HID: i2c-hid: acpi: Get ACPI companion only once and reuse it Currently the ACPI companion and handle are retrieved and checked a few times in different functions. Instead get ACPI companion only once and reuse it everywhere. Signed-off-by: Andy Shevchenko Acked-by: Benjamin Tissoires Signed-off-by: Jiri Kosina commit f2dc0755fc9b4628d38e4832ecf207ce135b93ae Author: Tony Lindgren Date: Mon Mar 8 11:35:07 2021 +0200 bus: ti-sysc: Detect more modules for debugging We want to see what the interconnect target module names are for debugging. Signed-off-by: Tony Lindgren commit 4700a00755fb5a4bb5109128297d6fd2d1272ee6 Author: Tony Lindgren Date: Mon Mar 8 11:35:07 2021 +0200 bus: ti-sysc: Probe for l4_wkup and l4_cfg interconnect devices first We want to probe l4_wkup and l4_cfg interconnect devices first to avoid issues with missing resources. Otherwise we attempt to probe l4_per devices first causing pointless deferred probe and also annoyingh renumbering of the MMC devices for example. Signed-off-by: Tony Lindgren commit 7bad5af826aba00487fed9a3300d3f43f0cba11b Author: Tony Lindgren Date: Mon Mar 8 11:35:06 2021 +0200 bus: ti-sysc: Fix initializing module_pa for modules without sysc register We have interconnect target modules with no known registers using only clocks and resets, but we still want to detect them based on the module IO range. So let's call sysc_parse_and_check_child_range() earlier so we have module_pa properly initialized. Fixes: 2928135c93f8 ("bus: ti-sysc: Support modules without control registers") Signed-off-by: Tony Lindgren commit 429db43e84e3f99531a6184b05c4f1cd539da94b Author: Fabrizio Castro Date: Thu Feb 25 22:51:42 2021 +0000 clk: renesas: r8a77965: Add DAB clock This patch adds the DAB clock to the R8A77965 SoC. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/20210225225147.29920-3-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 12a7f8ce829753314ced2b3f73579f2b5d91722e Author: Fabrizio Castro Date: Thu Feb 25 22:51:41 2021 +0000 clk: renesas: r8a77990: Add DAB clock This patch adds the DAB clock to the R8A77990 SoC. Signed-off-by: Fabrizio Castro Link: https://lore.kernel.org/r/20210225225147.29920-2-fabrizio.castro.jz@renesas.com Signed-off-by: Geert Uytterhoeven commit 2f40796671f03c0eb193f44c7d4a6855ab9b30f6 Author: Linus Walleij Date: Fri Mar 5 19:37:36 2021 +0100 Bluetooth: btbcm: Obtain and handle reset GPIO Obtain and drive the optional reset GPIO line if this is not hardwired in the platform. This is needed on the Samsung GT-I9070 mobile phone. The invers of power is used, this should be OK to apply simultaneously as the power signal according to figures 47-51 on pages 159-161 in the BCM4330 datasheet. Signed-off-by: Linus Walleij Signed-off-by: Marcel Holtmann commit 7820ee1c4757d888c2255b8eb7f74b8d1e5ac555 Author: Linus Walleij Date: Fri Mar 5 19:37:35 2021 +0100 Bluetooth: btbcm: Rewrite bindings in YAML and add reset This rewrites the Broadcom bluetooth bindings in YAML and adds a GPIO handle for the BT_RST_N line as used on some platforms. The Ingenic UART binding was using this binding in its example DTS fragment, however mistakenly using "vcc-supply" for what is called "vbat-supply". The proper DTS files and the code in the kernel all use "vbat-supply" so fix up the example in this patch so we ge a clean check. Cc: devicetree@vger.kernel.org Signed-off-by: Linus Walleij Signed-off-by: Marcel Holtmann commit 1d9ffbc6b185561c65a5a599562dbb6c5d66e7d1 Author: Geert Uytterhoeven Date: Tue Feb 16 13:39:58 2021 +0100 soc: renesas: rmobile-sysc: Mark fwnode when PM domain is added Currently, there are two drivers binding to the R-Mobile System Controller (SYSC): - The rmobile-sysc driver registers PM domains from a core_initcall(), and does not use a platform driver, - The optional rmobile-reset driver registers a reset handler, and does use a platform driver. As fw_devlink only considers devices, commit bab2d712eeaf9d60 ("PM: domains: Mark fwnodes when their powerdomain is added/removed") works only for PM Domain drivers where the DT node is a real device node, and not for PM Domain drivers using a hierarchical representation inside a subnode. Hence if fw_devlink is enabled, probing of on-chip devices that are part of the SYSC PM domain is deferred until the optional rmobile-reset driver has been bound. If the rmobile-reset driver is not available, this will never happen, and thus lead to complete system boot failures. Fix this by explicitly marking the fwnode initialized. Suggested-by: Saravana Kannan Signed-off-by: Geert Uytterhoeven Acked-by: Saravana Kannan Link: https://lore.kernel.org/r/20210216123958.3180014-1-geert+renesas@glider.be commit 2fb72440b697e1f2cb12790873df159160c22bcf Author: Geert Uytterhoeven Date: Fri Feb 5 14:21:41 2021 +0100 soc: renesas: rmobile-sysc: Remove unneeded platform includes As of commit b587288001f05c0e ("ARM: shmobile: R-Mobile: Remove legacy PM Domain code"), the R-Mobile System Controller driver no longer handles the adding of platform devices to PM Domains, but delegates that to the PM Domain core code. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210205132141.1920137-1-geert+renesas@glider.be commit d765a4f302cc046ca23453ba990d21120ceadbbd Author: Yoshihiro Shimoda Date: Mon Mar 1 20:06:26 2021 +0900 arm64: dts: renesas: Add mmc aliases into board dts files After the commit 7320915c8861 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.14"), the order of /dev/mmcblkN was not fixed in some SoCs which have multiple sdhi controllers. So, we were hard to use an sdhi device as rootfs by using the kernel parameter like "root=/dev/mmcblkNpM". According to the discussion on a mainling list [1], we can add mmc aliases to fix the issue. So, add such aliases into Renesas arm64 board dts files. Notes that mmc0 is an eMMC channel if available. [1] https://lore.kernel.org/linux-arm-kernel/CAPDyKFptyEQNJu8cqzMt2WRFZcwEdjDiytMBp96nkoZyprTgmA@mail.gmail.com/ Fixes: 7320915c8861 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.14") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1614596786-22326-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit e8ae8db17029f2057b65bfb8abc1650bbd8492ef Author: Yuya Hamamachi Date: Wed Feb 17 18:06:03 2021 +0900 arm64: dts: renesas: r8a77961-ulcb: add HDMI Display support This patch enables HDMI Display on M3ULCB with R-Car M3-W+. Signed-off-by: Yuya Hamamachi Link: https://lore.kernel.org/r/20210217090603.1517-1-yuya.hamamachi.sx@renesas.com Signed-off-by: Geert Uytterhoeven commit da926e813fc7f9f0912fa413981a1f5ba63a536d Author: Yoshihiro Shimoda Date: Fri Feb 12 21:01:56 2021 +0900 ARM: dts: renesas: Add mmc aliases into R-Car Gen2 board dts files After set PROBE_PREFER_ASYNCHRONOUS flag on the mmc host drivers, the order of /dev/mmcblkN was not fixed in some SoCs which have multiple SDHI and/or MMCIF controllers. So, we were hard to use such a device as rootfs by using the kernel parameter like "root=/dev/mmcblkNpM". According to the discussion on a mainling list [1], we can add mmc aliases to fix the issue. So, add such aliases into R-Car Gen2 board dts files. Note that, since R-Car Gen2 is even more complicated about SDHI and/or MMCIF channels variations and they share pins, add the aliases into board dts files instead of SoC dtsi files. [1] https://lore.kernel.org/linux-arm-kernel/CAPDyKFptyEQNJu8cqzMt2WRFZcwEdjDiytMBp96nkoZyprTgmA@mail.gmail.com/ Fixes: 7320915c8861 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.14") Fixes: 21b2cec61c04 ("mmc: Set PROBE_PREFER_ASYNCHRONOUS for drivers that existed in v4.4") Signed-off-by: Yoshihiro Shimoda Link: https://lore.kernel.org/r/1613131316-30994-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Geert Uytterhoeven commit 3ebf49c020217d2a322fedc3ea1fe6eec0460f09 Author: Geert Uytterhoeven Date: Thu Feb 4 14:05:17 2021 +0100 arm64: dts: renesas: Group tuples in pin control properties To improve human readability and enable automatic validation, the tuples in "pinctrl-*" properties should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210204130517.1647073-6-geert+renesas@glider.be commit 86a5feadedeeaee689e3f1279ff8dc214bf6e084 Author: Geert Uytterhoeven Date: Thu Feb 4 14:05:16 2021 +0100 arm64: dts: renesas: Group tuples in playback and capture properties To improve human readability and enable automatic validation, the tuples in "playback" and "capture" properties in sound device nodes should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210204130517.1647073-5-geert+renesas@glider.be commit de16af56663214c94cf1c1c88703a14a03f698d9 Author: Geert Uytterhoeven Date: Thu Feb 4 14:05:15 2021 +0100 ARM: dts: renesas: Group tuples in pin control properties To improve human readability and enable automatic validation, the tuples in "pinctrl-*" properties should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210204130517.1647073-4-geert+renesas@glider.be commit 23d2ed63cda07c614b85a8c5b9ccd13cfc627482 Author: Geert Uytterhoeven Date: Thu Feb 4 14:05:14 2021 +0100 ARM: dts: renesas: Group tuples in playback and capture properties To improve human readability and enable automatic validation, the tuples in "playback" and "capture" properties in sound device nodes should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210204130517.1647073-3-geert+renesas@glider.be commit e0f0c7066f20052845008b59012d544b059d071c Author: Geert Uytterhoeven Date: Thu Feb 4 14:05:13 2021 +0100 ARM: dts: renesas: Group tuples in APMU cpus properties To improve human readability and enable automatic validation, the tuples in "cpus" properties in device nodes for Advanced Power Management Units for AP-System Core (APMU) should be grouped using angle brackets. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210204130517.1647073-2-geert+renesas@glider.be commit 22650045d9399bc760e34307e947599ebbb87be3 Author: Lad Prabhakar Date: Fri Jan 22 12:34:24 2021 +0100 ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors The 8-bit ov7725 sensors can also be connected to the camera daughter board. This patch creates a separate dtsi file to describe an ov7725 sensor, and includes it multiple times in r8a7742-iwg21d-q7-dbcm-ca.dts. The user can (un)comment #include statements depending on the cameras connected. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das [geert: describe a single camera in the .dtsi, include multiple times] Signed-off-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210122113424.2833127-3-geert+renesas@glider.be commit 97ed7c0a638d95452d3852f66e81dba8105ed58d Author: Lad Prabhakar Date: Fri Jan 22 12:34:23 2021 +0100 ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Separate out ov5640 nodes The camera daughter board can also be connected to 8-bit ov7725 sensors, so in preparation for configurable option to choose depending on the camera's connected separate out the ov5640 nodes in a dtsi file. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das [geert: describe a single camera in the .dtsi, include multiple times] Signed-off-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar Link: https://lore.kernel.org/r/20210122113424.2833127-2-geert+renesas@glider.be commit 0f9c4296485b1b65e1d5cc409054a3f79651cd45 Author: Jianhui Zhao Date: Mon Mar 8 14:42:50 2021 +0800 docs: gpu: fix typo Signed-off-by: Jianhui Zhao Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20210308064250.3681707-1-zhaojh329@gmail.com commit ae2177cf318d169e349319b24a26881ba0e5248f Author: Andy Shevchenko Date: Thu Mar 4 16:08:20 2021 +0200 mtd: spi-nor: intel-spi: Move platform data header to x86 subfolder In order to group x86 related platform data move intel-spi.h to x86 folder. While at it, remove duplicate inclusion in C file. Signed-off-by: Andy Shevchenko [ta: s/x85/x86] Signed-off-by: Tudor Ambarus Reviewed-by: Vignesh Raghavendra Link: https://lore.kernel.org/r/20210304140820.56692-1-andriy.shevchenko@linux.intel.com commit 04fc298c7d0877695847e8662d1b5b29a19c2723 Author: Michael Walle Date: Sat Mar 6 00:45:52 2021 +0100 mtd: spi-nor: use is_power_of_2() There is already a function to check if an integer is a power of 2. Use it. Signed-off-by: Michael Walle Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210305234552.19204-1-michael@walle.cc commit ad117c558e838f9fa93af265d8f9dd54e87e15b1 Author: Lucas Stach Date: Sun Mar 7 21:40:37 2021 -0800 Input: exc3000 - add type sysfs attribute Add a sysfs attribute to query the type of the touchscreen device. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20210125182527.1225245-5-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov commit c929ac9eb85acf9217eb812369bbd4cf65a772e0 Author: Lucas Stach Date: Sun Mar 7 21:40:01 2021 -0800 Input: exc3000 - fix firmware version query for device in bootloader If the device is stuck in bootloader (maybe due to blank or corrupted application firmware) it won't answer a query for the firmware version. Fall back to returning the bootloader version in that case. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20210125182527.1225245-4-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov commit 102feb1ddfd00d0c6115ae3372058012dc16418c Author: Lucas Stach Date: Sun Mar 7 21:35:54 2021 -0800 Input: exc3000 - factor out vendor data request Factor out the vendor data i2c request handling to make it reusable for other functions. Also don't cache the model and firmware version string in the device private data as we never use the cached version, but always read from the device. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20210125182527.1225245-3-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov commit a63d0120a2dd89eabf24b415b27208e190e989b0 Author: Lucas Stach Date: Sun Mar 7 21:10:57 2021 -0800 Input: exc3000 - split MT event handling from IRQ handler Split out the multitouch event handling into its own function to allow other events to be handled in the IRQ handler without disturbing the MT handling. Now that things are separated a bit more, stop treating vendor data requests special by cehcking for a locked mutex, but just look at the event ID to figure out if the message is a MT report or a vendor data query reply. Signed-off-by: Lucas Stach Link: https://lore.kernel.org/r/20210125182527.1225245-2-l.stach@pengutronix.de Signed-off-by: Dmitry Torokhov commit ff013330fbdb2782e9001787db6c0b6415cdad77 Author: Shuhao Mai Date: Mon Feb 8 15:53:03 2021 +0800 mtd: spi-nor: winbond: Add support for w25q512jvq Add support for w25q512jvq. This is of the same series chip with w25q256jv, which is already supported, but with size doubled and different JEDEC ID. Tested on Intel whitley platform with dd from/to the flash for read/write respectly, and flash_erase for erasing the flash. Signed-off-by: Shuhao Mai [ta: put flash_info flags in order, first SPI_NOR_DUAL_READ, then SPI_NOR_QUAD_READ] Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210208075303.4200-1-shuhao.mai.1990@gmail.com commit 2601cbaa7eb089d8a5c97c40b04f496bf1c7b196 Author: Krzysztof Kozlowski Date: Sun Sep 6 16:21:45 2020 +0200 ARM: dts: exynos: add input clock to CMU in Exynos4412 Odroid Commit 68605101460e ("ARM: dts: exynos: Add support for audio over HDMI for Odroid X/X2/U3") added assigned clocks under Clock Management Unit. However the dtschema expects "clocks" property if "assigned-clocks" are used. Add reference to input clock to silence the dtschema warnings: arch/arm/boot/dts/exynos4412-odroidu3.dt.yaml: clock-controller@10030000: 'clocks' is a dependency of 'assigned-clocks' Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20200906142146.21266-2-krzk@kernel.org commit ca881b97dbe1ce3ed94e20ae185b246435d86ead Author: Krzysztof Kozlowski Date: Thu Mar 4 08:52:14 2021 +0100 MAINTAINERS: use Krzysztof Kozlowski's Canonical address Since I plan to use my Canonical address for reviews and other maintenance activities, reflect this in MAINTAINERS to avoid any confusion. Cc: Krzysztof Kozlowski Cc: Arnd Bergmann Cc: Olof Johansson Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210304075751.9201-1-krzysztof.kozlowski@canonical.com commit 396e589a72dc51c624c54772d0b52980eded2bcc Author: Krzysztof Kozlowski Date: Fri Feb 12 17:37:29 2021 +0100 arm64: dts: exynos: re-order Slim SSS clocks to match dtschema The dtschema expects pclk (APB clock) followed by aclk (AXI/AHB clock): arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: slim-sss@11140000: clock-names:0: 'pclk' was expected arch/arm64/boot/dts/exynos/exynos5433-tm2.dt.yaml: slim-sss@11140000: clock-names:1: 'aclk' was expected Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20210212163729.69882-1-krzk@kernel.org commit 214e6ec8c9f5a3353d3282b3ff475d3ee86cc21a Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:26 2020 +0100 ARM: dts: s5pv210: correct fuel gauge interrupt trigger level on Fascinate family The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct. Fixes: 99bb20321f0e ("ARM: dts: s5pv210: Correct fuelgauge definition on Aries") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-10-krzk@kernel.org commit 8987efbb17c2522be8615085df9a14da2ab53d34 Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:25 2020 +0100 ARM: dts: exynos: correct PMIC interrupt trigger level on Snow The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware. Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races. Fixes: c61248afa819 ("ARM: dts: Add max77686 RTC interrupt to cros5250-common") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-9-krzk@kernel.org commit f6368c60561370e4a92fac22982a3bd656172170 Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:24 2020 +0100 ARM: dts: exynos: correct PMIC interrupt trigger level on SMDK5250 The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware. Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races. Fixes: 47580e8d94c2 ("ARM: dts: Specify MAX77686 pmic interrupt for exynos5250-smdk5250") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-8-krzk@kernel.org commit fbe9c9bb2e929865500a0985735f81c0142accad Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:23 2020 +0100 ARM: dts: exynos: correct PMIC interrupt trigger level on P4 Note family The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware. Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races. Fixes: f48b5050c301 ("ARM: dts: exynos: add Samsung's Exynos4412-based P4 Note boards") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-7-krzk@kernel.org commit 6503c568e97a52f8b7a3109718db438e52e59485 Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:22 2020 +0100 ARM: dts: exynos: correct PMIC interrupt trigger level on Odroid X/U3 family The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware. Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races. Fixes: eea6653aae7b ("ARM: dts: Enable PMIC interrupts for exynos4412-odroid-common") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-6-krzk@kernel.org commit e52dcd6e70fab51f53292e53336ecb007bb60889 Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:21 2020 +0100 ARM: dts: exynos: correct PMIC interrupt trigger level on Midas family The Maxim PMIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware. Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races. Fixes: 15dfdfad2d4a ("ARM: dts: Add basic dts for Exynos4412-based Trats 2 board") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-5-krzk@kernel.org commit 15107e443ab8c6cb35eff10438993e4bc944d9ae Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:20 2020 +0100 ARM: dts: exynos: correct MUIC interrupt trigger level on Midas family The Maxim MUIC datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. Without specifying the interrupt type in Devicetree, kernel might apply some fixed configuration, not necessarily working for this hardware. Additionally, the interrupt line is shared so using level sensitive interrupt is here especially important to avoid races. Fixes: 7eec1266751b ("ARM: dts: Add Maxim 77693 PMIC to exynos4412-trats2") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-4-krzk@kernel.org commit 8a45f33bd36efbb624198cfa9fdf1f66fd1c3d26 Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:19 2020 +0100 ARM: dts: exynos: correct fuel gauge interrupt trigger level on Midas family The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct. Fixes: e8614292cd41 ("ARM: dts: Add Maxim 77693 fuel gauge node for exynos4412-trats2") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-3-krzk@kernel.org commit c731a16e2cf424a462c7d42c33d6acd613576508 Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:18 2020 +0100 ARM: dts: exynos: correct fuel gauge interrupt trigger level on P4 Note family The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct. Fixes: f48b5050c301 ("ARM: dts: exynos: add Samsung's Exynos4412-based P4 Note boards") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-2-krzk@kernel.org commit 46799802136670e00498f19898f1635fbc85f583 Author: Krzysztof Kozlowski Date: Thu Dec 10 22:25:17 2020 +0100 ARM: dts: exynos: correct fuel gauge interrupt trigger level on GT-I9100 The Maxim fuel gauge datasheets describe the interrupt line as active low with a requirement of acknowledge from the CPU. The falling edge interrupt will mostly work but it's not correct. Fixes: 8620cc2f99b7 ("ARM: dts: exynos: Add devicetree file for the Galaxy S2") Signed-off-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20201210212534.216197-1-krzk@kernel.org commit 4e0af00e84368884c2a703b9e27fcabc7fa0bc87 Author: Timon Baetz Date: Sat Jan 30 17:29:31 2021 +0000 ARM: dts: exynos: add charger supply for I9100 The regulator is used for charging control by max8997_charger driver on GT-I9100 phone. Signed-off-by: Timon Baetz Link: https://lore.kernel.org/r/20210130172747.2022977-3-timon.baetz@protonmail.com Signed-off-by: Krzysztof Kozlowski commit e004c3e67b6459c99285b18366a71af467d869f5 Author: Colin Ian King Date: Tue Feb 23 19:38:21 2021 +0000 memory: gpmc: fix out of bounds read and dereference on gpmc_cs[] Currently the array gpmc_cs is indexed by cs before it cs is range checked and the pointer read from this out-of-index read is dereferenced. Fix this by performing the range check on cs before the read and the following pointer dereference. Addresses-Coverity: ("Negative array index read") Fixes: 9ed7a776eb50 ("ARM: OMAP2+: Fix support for multiple devices on a GPMC chip select") Signed-off-by: Colin Ian King Reviewed-by: Tony Lindgren Link: https://lore.kernel.org/r/20210223193821.17232-1-colin.king@canonical.com Signed-off-by: Krzysztof Kozlowski commit 7b4957684e5d813fcbdc98144e3cc5c4467b3e2e Author: Paul Cercueil Date: Sun Jan 24 08:55:52 2021 +0000 drm/ingenic: Fix non-OSD mode Even though the JZ4740 did not have the OSD mode, it had (according to the documentation) two DMA channels, but there is absolutely no information about how to select the second DMA channel. Make the ingenic-drm driver work in non-OSD mode by using the foreground0 plane (which is bound to the DMA0 channel) as the primary plane, instead of the foreground1 plane, which is the primary plane when in OSD mode. Fixes: 3c9bea4ef32b ("drm/ingenic: Add support for OSD mode") Cc: # v5.8+ Signed-off-by: Paul Cercueil Acked-by: Daniel Vetter Tested-by: H. Nikolaus Schaller Link: https://patchwork.freedesktop.org/patch/msgid/20210124085552.29146-5-paul@crapouillou.net commit b9dd23bb03fe241ccb774c59b05d5cbac07895dc Author: Stefan Binding Date: Sat Mar 6 11:19:34 2021 +0000 ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control CS8409 does not support Volume Control for NIDs 0x24 (the Headphones), or 0x34 (The Headset Mic). However, CS42L42 codec does support gain control for both. We can add support for Volume Controls, by writing the the CS42L42 regmap via i2c commands, using custom info, get and put volume functions, saved in the control. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210306111934.4832-5-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit b73df04187ebb52edf3f7e502bb245c5ccab2763 Author: Vitaly Rodionov Date: Sat Mar 6 11:19:33 2021 +0000 ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec. In the case of CS8409 we do not have unsol events from NID's 0x24 and 0x34 where hs mic and hp are connected. Companion codec CS42L42 will generate interrupt via gpio 4 to notify jack events. We have to overwrite standard snd_hda_jack_unsol_event(), read CS42L42 jack detect status registers and then notify status via generic snd_hda_jack_unsol_event() call. Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3505. Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210306111934.4832-4-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 6cc7e93f46a5ce9f65ad3c6c6f645f1d831a8fa4 Author: Vitaly Rodionov Date: Sat Mar 6 11:19:32 2021 +0000 ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec. Dell's laptops Inspiron 3500, Inspiron 3501, Inspiron 3505 are using Cirrus Logic CS8409 HDA bridge with CS42L42 companion codec. The CS8409 is a multichannel HD audio routing controller. CS8409 includes support for four channels of digital microphone data and two bidirectional ASPs for up to 32 channels of TDM data or 4 channels of I2S data. The CS8409 is intended to be used with a remote companion codec that implements high performance analog functions in close physical proximity to the end-equipment audio port or speaker driver. The CS42L42 is a low-power audio codec with integrated MIPI SoundWire interface or I2C/I2S/TDM interfaces designed for portable applications. It provides a high-dynamic range, stereo DAC for audio playback and a mono high-dynamic-range ADC for audio capture CS42L42 is connected to CS8409 HDA bridge via I2C and I2S. CS8409 CS42L42 ------- -------- ASP1.A TX --> ASP_SDIN ASP1.A RX <-- ASP_SDOUT GPIO5 --> RST# GPIO4 <-- INT# GPIO3 <-- WAKE# GPIO7 <-> I2C SDA GPIO6 --> I2C CLK Tested on DELL Inspiron-3500, DELL Inspiron-3501, DELL Inspiron-3505 This patch will register CS8409 with sound card and create input/output paths and two input devices, initialise CS42L42 companion codec and configure it for ASP TX/RX TDM mode, 24bit, 48kHz. cat /proc/asound/pcm 00-00: CS8409 Analog : CS8409 Analog : playback 1 : capture 1 00-03: HDMI 0 : HDMI 0 : playback 1 dmesg snd_hda_codec_cirrus hdaudioC0D0: autoconfig for CS8409: line_outs=1 (0x2c/0x0/0x0/0x0/0x0) type:speaker snd_hda_codec_cirrus hdaudioC0D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) snd_hda_codec_cirrus hdaudioC0D0: hp_outs=1 (0x24/0x0/0x0/0x0/0x0) snd_hda_codec_cirrus hdaudioC0D0: mono: mono_out=0x0 snd_hda_codec_cirrus hdaudioC0D0: inputs: snd_hda_codec_cirrus hdaudioC0D0: Internal Mic=0x44 snd_hda_codec_cirrus hdaudioC0D0: Mic=0x34 input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8 input: HDA Intel PCH Headset Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9 Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210306111934.4832-3-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit b95a913cb368edcb606d844a6dc6240093d87020 Author: Vitaly Rodionov Date: Sat Mar 6 11:19:31 2021 +0000 ALSA: hda/cirrus: Increase AUTO_CFG_MAX_INS from 8 to 18 In preparation to support Cirrus Logic CS8409 HDA bridge on new Dell platforms it is nessasary to increase AUTO_CFG_MAX_INS and AUTO_CFG_NUM_INPUTS values. Currently AUTO_CFG_MAX_INS is limited to 8, but Cirrus Logic HDA bridge CS8409 has 18 input pins, 16 ASP receivers and 2 DMIC inputs. We have to increase this value to 18, so generic code can handle this correctly. Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Signed-off-by: Vitaly Rodionov Link: https://lore.kernel.org/r/20210306111934.4832-2-vitalyr@opensource.cirrus.com Signed-off-by: Takashi Iwai commit 59117306e0d0e152acb72e89cc22f060a3c6a50a Merge: 04f7791b7a4ba 575483e90a329 Author: Takashi Iwai Date: Sun Mar 7 09:16:24 2021 +0100 Merge tag 'tags/virtio_snd-5.12-rc2' into for-next ALSA: add virtio sound driver This series implements a driver part of the virtio sound device specification v8 [1]. The driver supports PCM playback and capture substreams, jack and channel map controls. A message-based transport is used to write/read PCM frames to/from a device. As a device part was used OpenSynergy proprietary implementation. v7 changes: - Moved the snd_pcm_period_elapsed() call from the interrupt handler to the kernel worker for being consistent with the non-atomic mode of the PCM device. - Removed SNDRV_PCM_INFO_RESUME flag. Now ops->prepare() sets the parameters for the substream if it was previously suspended. - Some additional code readability improvements/comments. [1] https://lists.oasis-open.org/archives/virtio-dev/202003/msg00185.html Link: https://lore.kernel.org/r/20210302164709.3142702-1-anton.yakovlev@opensynergy.com commit 575483e90a3292c2afceb7161732046e411d6fdd Author: Anton Yakovlev Date: Tue Mar 2 17:47:09 2021 +0100 ALSA: virtio: introduce device suspend/resume support All running PCM substreams are stopped on device suspend and restarted on device resume. Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-10-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit 19325fedf245ca932c58a629d3888a9a393534ab Author: Anton Yakovlev Date: Tue Mar 2 17:47:08 2021 +0100 ALSA: virtio: introduce PCM channel map support Enumerate all available PCM channel maps and create ALSA controls. Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-9-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit ca61a41f389c80db091db9d4ad5a651e2b4c9f70 Author: Anton Yakovlev Date: Tue Mar 2 17:47:07 2021 +0100 ALSA: virtio: introduce jack support Enumerate all available jacks and create ALSA controls. At the moment jacks have a simple implementation and can only be used to receive notifications about a plugged in/out device. Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-8-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit da76e9f3e43a7195c69d370ee514cccae6517c76 Author: Anton Yakovlev Date: Tue Mar 2 17:47:06 2021 +0100 ALSA: virtio: PCM substream operators Introduce the operators required for the operation of substreams. Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-7-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit f40a28679e0b7cb3a9cc6627a8dbb40961990f0a Author: Anton Yakovlev Date: Tue Mar 2 17:47:05 2021 +0100 ALSA: virtio: handling control and I/O messages for the PCM device The driver implements a message-based transport for I/O substream operations. Before the start of the substream, the hardware buffer is sliced into I/O messages, the number of which is equal to the current number of periods. The size of each message is equal to the current size of one period. I/O messages are organized in an ordered queue. The completion of the I/O message indicates an elapsed period (the only exception is the end of the stream for the capture substream). Upon completion, the message is automatically re-added to the end of the queue. Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-6-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit 29b96bf50ba958eb5f097cdc3fbd4c1acf9547a2 Author: Anton Yakovlev Date: Tue Mar 2 17:47:04 2021 +0100 ALSA: virtio: build PCM devices and substream hardware descriptors Like the HDA specification, the virtio sound device specification links PCM substreams, jacks and PCM channel maps into functional groups. For each discovered group, a PCM device is created, the number of which coincides with the group number. Introduce the module parameters for setting the hardware buffer parameters: pcm_buffer_ms [=160] pcm_periods_min [=2] pcm_periods_max [=16] pcm_period_ms_min [=10] pcm_period_ms_max [=80] Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-5-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit 9d45e514da88ff74fc24ffb34e7d6eb92576440b Author: Anton Yakovlev Date: Tue Mar 2 17:47:03 2021 +0100 ALSA: virtio: handling control messages The control queue can be used by different parts of the driver to send commands to the device. Control messages can be either synchronous or asynchronous. The lifetime of a message is controlled by a reference count. Introduce a module parameter to set the message completion timeout: msg_timeout_ms [=1000] Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-4-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit de3a9980d8c34b2479173e809afa820473db676a Author: Anton Yakovlev Date: Tue Mar 2 17:47:02 2021 +0100 ALSA: virtio: add virtio sound driver Introduce skeleton of the virtio sound driver. The driver implements the virtio sound device specification, which has become part of the virtio standard. Initial initialization of the device, virtqueues and creation of an empty ALSA sound device. Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-3-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit 0ae0337f929a970ee8d83e0e95e6b8d05562ce3b Author: Anton Yakovlev Date: Tue Mar 2 17:47:01 2021 +0100 uapi: virtio_ids: add a sound device type ID from OASIS spec The OASIS virtio spec defines a sound device type ID that is not present in the header yet. Signed-off-by: Anton Yakovlev Link: https://lore.kernel.org/r/20210302164709.3142702-2-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai commit 1406f0f3440265deec6932fd611549b07ac76e89 Author: Yang Li Date: Fri Feb 26 09:23:06 2021 +0800 crypto: nx - add missing call to of_node_put() In one of the error paths of the for_each_child_of_node() loop, add missing call to of_node_put(). Fix the following coccicheck warning: ./drivers/crypto/nx/nx-common-powernv.c:927:1-23: WARNING: Function "for_each_child_of_node" should have of_node_put() before return around line 936. Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Herbert Xu commit e40ff6f3eaa25cbf3cbe75d4480802ad1cbb1147 Author: Kai Ye Date: Tue Feb 23 11:42:04 2021 +0800 crypto: testmgr - delete some redundant code Delete sg_data function, because sg_data function definition same as sg_virt(), so need to delete it and use sg_virt() replace to sg_data(). Signed-off-by: Kai Ye Reviewed-by: Eric Biggers Signed-off-by: Herbert Xu commit f0ba303badfe4daf860c4a36d7651594a31066cf Author: Tian Tao Date: Fri Feb 19 19:19:18 2021 +0800 hwrng: omap - Fix included header from 'asm' This commit fixes the checkpatch warning: WARNING: Use #include instead of drivers/char/hw_random/omap-rng.c:34 Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit 664b0f41ce2e8286c471fd8865d005f594733bdc Author: Krzysztof Kozlowski Date: Fri Feb 12 17:35:26 2021 +0100 crypto: s5p-sss - initialize APB clock after the AXI bus clock for SlimSSS The driver for Slim Security Subsystem (SlimSSS) on Exynos5433 takes two clocks - aclk (AXI/AHB clock) and pclk (APB/Advanced Peripheral Bus clock). The "aclk", as main high speed bus clock, is enabled first. Then the "pclk" is enabled. However the driver assigned reversed names for lookup of these clocks from devicetree, so effectively the "pclk" was enabled first. Although it might not matter in reality, the correct order is to enable first main/high speed bus clock - "aclk". Also this was the intention of the actual code. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Herbert Xu commit 1dbc6a1e25be8575d6c4114d1d2b841a796507f7 Author: Corentin Labbe Date: Fri Feb 12 09:46:10 2021 +0100 crypto: sun8i-ss - fix result memory leak on error path This patch fixes a memory leak on an error path. Fixes: d9b45418a917 ("crypto: sun8i-ss - support hash algorithms") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Corentin Labbe Signed-off-by: Herbert Xu commit 4139fd587320da311fca9c4da231dc850d4f4a22 Author: Thara Gopinath Date: Thu Feb 11 15:01:28 2021 -0500 crypto: qce - Remove totallen and offset in qce_start totallen is used to get the size of the data to be transformed. This is also available via nbytes or cryptlen in the qce_sha_reqctx and qce_cipher_ctx. Similarly offset convey nothing for the supported encryption and authentication transformations and is always 0. Remove these two redundant parameters in qce_start. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 62e4842842f3711b0674aa96742cfbec2c074d3f Author: Thara Gopinath Date: Thu Feb 11 15:01:27 2021 -0500 crypto: qce - Remover src_tbl from qce_cipher_reqctx src_table is unused and hence remove it from struct qce_cipher_reqctx Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 24cbcc9427a35ef95e2c7651a361e5b462f10b8e Author: Thara Gopinath Date: Thu Feb 11 15:01:26 2021 -0500 crypto: qce - Set data unit size to message length for AES XTS transformation Set the register REG_ENCR_XTS_DU_SIZE to cryptlen for AES XTS transformation. Anything else causes the engine to return back wrong results. Acked-by: Bjorn Andersson Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 25b71d61d6317212274b822e1cdbb03e499eea43 Author: Thara Gopinath Date: Thu Feb 11 15:01:25 2021 -0500 crypto: qce - Improve the conditions for requesting AES fallback cipher The following are the conditions for requesting AES fallback cipher. - AES-192 - AES-XTS request with len <= 512 byte (Allow messages of length less than 512 bytes for all other AES encryption algorithms other than AES XTS) - AES-XTS request with len > QCE_SECTOR_SIZE and is not a multiple of it Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 02d0dae3ce2adb5549c7f6c6e714181ed6ee100d Author: Thara Gopinath Date: Thu Feb 11 15:01:24 2021 -0500 crypto: qce - Set ivsize to 0 for ecb(aes) ECB transformations do not have an IV and hence set the ivsize to 0 for ecb(aes). Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 44b45cdea4e3d31a3be14fd7e2b8e1584b3e670c Author: Thara Gopinath Date: Thu Feb 11 15:01:23 2021 -0500 crypto: qce - Return error for non-blocksize data(ECB/CBC algorithms) ECB/CBC encryption/decryption requires the data to be blocksize aligned. Crypto engine hangs on non-block sized operations for these algorithms. Return invalid data if data size is not blocksize aligned for these algorithms. Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit f08789462255d0a2858b1d600be4099a2980a328 Author: Thara Gopinath Date: Thu Feb 11 15:01:22 2021 -0500 crypto: qce - Return error for zero length messages Crypto engine BAM dma does not support 0 length data. Return unsupported if zero length messages are passed for transformation. Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 42f730a47beee3b8df9a55ed8a3009eb0fe5bd3f Author: Thara Gopinath Date: Thu Feb 11 15:01:21 2021 -0500 crypto: qce - Return unsupported if any three keys are same for DES3 algorithms Return unsupported if any three keys are same for DES3 algorithms since CE does not support this and the operation causes the engine to hang. Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit f0d078dd6c490535ccd7f1694813295dae99814e Author: Thara Gopinath Date: Thu Feb 11 15:01:20 2021 -0500 crypto: qce - Return unsupported if key1 and key 2 are same for AES XTS algorithm Crypto engine does not support key1 = key2 for AES XTS algorithm; the operation hangs the engines. Return -EINVAL in case key1 and key2 are the same. Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 38de3cf21fc057f37ae6fb1f46a6fbe852792789 Author: Thara Gopinath Date: Thu Feb 11 15:01:19 2021 -0500 crypto: qce - Hold back a block of data to be transferred as part of final If the available data to transfer is exactly a multiple of block size, save the last block to be transferred in qce_ahash_final (with the last block bit set) if this is indeed the end of data stream. If not this saved block will be transferred as part of next update. If this block is not held back and if this is indeed the end of data stream, the digest obtained will be wrong since qce_ahash_final will see that rctx->buflen is 0 and return doing nothing which in turn means that a digest will not be copied to the destination result buffer. qce_ahash_final cannot be made to alter this behavior and allowed to proceed if rctx->buflen is 0 because the crypto engine BAM does not allow for zero length transfers. Reviewed-by: Bjorn Andersson Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit a01dc5c1f755899aa23e7e2cfdb146913b18a48c Author: Thara Gopinath Date: Thu Feb 11 15:01:18 2021 -0500 crypto: qce - Restore/save ahash state with custom struct in export/import Export and import interfaces save and restore partial transformation states. The partial states were being stored and restored in struct sha1_state for sha1/hmac(sha1) transformations and sha256_state for sha256/hmac(sha256) transformations.This led to a bunch of corner cases where improper state was being stored and restored. A few of the corner cases that turned up during testing are: - wrong byte_count restored if export/import is called twice without h/w transaction in between - wrong buflen restored back if the pending buffer length is exactly the block size. - wrong state restored if buffer length is 0. To fix these issues, save and restore the partial transformation state using the newly introduced qce_sha_saved_state struct. This ensures that all the pieces required to properly restart the transformation is captured and restored back Signed-off-by: Thara Gopinath Signed-off-by: Herbert Xu commit 2eee428d8212265af09d349b74746be03513382e Author: Wei Yongjun Date: Wed Feb 10 07:45:27 2021 +0000 crypto: keembay-ocs-aes - Fix error return code in kmb_ocs_aes_probe() Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 885743324513 ("crypto: keembay - Add support for Keem Bay OCS AES/SM4") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Daniele Alessandrelli Signed-off-by: Herbert Xu commit 662c1c5618aaf71f99ada3105b99668a503605ae Author: Wei Yongjun Date: Wed Feb 10 07:43:50 2021 +0000 crypto: keembay-ocs-hcu - Fix error return code in kmb_ocs_hcu_probe() Fix to return negative error code -ENOMEM from the error handling case instead of 0, as done elsewhere in this function. Fixes: 472b04444cd3 ("crypto: keembay - Add Keem Bay OCS HCU driver") Reported-by: Hulk Robot Signed-off-by: Wei Yongjun Reviewed-by: Daniele Alessandrelli Signed-off-by: Herbert Xu commit 4ab6093ba4b1a29da192da666a73d74f54fde649 Author: Herbert Xu Date: Wed Feb 10 18:15:57 2021 +1100 crypto: serpent - Fix sparse byte order warnings This patch fixes the byte order markings in serpent. Signed-off-by: Herbert Xu Tested-by: Ard Biesheuvel # arm64 big-endian Signed-off-by: Herbert Xu commit 9ae219b199314790180da30fce231317142770dc Author: Tang Bin Date: Wed Feb 10 11:16:37 2021 +0800 crypto: amlogic - Fix unnecessary check in meson_crypto_probe() The function meson_crypto_probe() is only called with an openfirmware platform device. Therefore there is no need to check that the passed in device is NULL. Signed-off-by: Tang Bin Signed-off-by: Herbert Xu commit e06da499d69a0b34d5824c5fde38f1f7e1eb9833 Author: Tian Tao Date: Wed Feb 10 09:14:58 2021 +0800 hwrng: bcm2835 - remove redundant null check clk_prepare_enable() and clk_disable_unprepare() will check NULL clock parameter, so It is not necessary to add additional checks. Signed-off-by: Tian Tao Acked-by: Florian Fainelli Signed-off-by: Herbert Xu commit f17a25cb1776c5712e950aaf326528ae652a086c Author: Bhaskar Chowdhury Date: Tue Feb 9 10:28:55 2021 +0000 crypto: qat - fix spelling mistake: "messge" -> "message" Trivial fix to spelling mistake in adf_pf2vf_msg.c and adf_vf2pf_msg.c. s/messge/message/ Signed-off-by: Bhaskar Chowdhury Signed-off-by: Giovanni Cabiddu Signed-off-by: Herbert Xu commit 8fb7bd312fdb7e38261515b53f7dbd2665bda6ad Author: Tian Tao Date: Tue Feb 9 16:03:37 2021 +0800 hwrng: xiphera-trng - use devm_platform_ioremap_resource() to simplify Use devm_platform_ioremap_resource() to simplify the code. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit 6131e970770da0e1d667f96efafd3f859aa4ea74 Author: Eric Biggers Date: Mon Feb 8 18:28:16 2021 -0800 crypto: arm/blake2b - drop unnecessary return statement Neither crypto_unregister_shashes() nor the module_exit function return a value, so the explicit 'return' is unnecessary. Signed-off-by: Eric Biggers Signed-off-by: Herbert Xu commit 3e2ccc7454510e0990104eaf6f24f34be121dabb Author: Tian Tao Date: Tue Feb 9 09:35:34 2021 +0800 hwrng: ba431 - Use device-managed registration Use device-managed registration, so we can delete the ba431_trng_remove. Signed-off-by: Tian Tao Signed-off-by: Herbert Xu commit da3c6c836fb1a0b9f08a7efabbfb7e31a0c816f7 Author: Yang Li Date: Mon Feb 8 17:10:38 2021 +0800 crypto: powepc/sha1 - remove unneeded semicolon Eliminate the following coccicheck warning: ./arch/powerpc/crypto/sha1-spe-glue.c:110:2-3: Unneeded semicolon Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Herbert Xu commit 6329d73d318f0c7995484f540f4f57d29f94bc5f Author: Heinrich Schuchardt Date: Sat Feb 6 09:41:20 2021 +0100 docs: arm: /chosen node parameters Add missing items to table of parameters set in the /chosen node by the EFI stub. Signed-off-by: Heinrich Schuchardt Link: https://lore.kernel.org/r/20210206084120.43305-1-xypron.glpk@gmx.de Signed-off-by: Jonathan Corbet commit 4722e2a2432f5fc7c7678478059f0b2c03eb77a3 Author: Randy Dunlap Date: Tue Feb 9 20:25:26 2021 -0800 Docs: add fs/eventpoll to docbooks Add fs/eventpoll.c to the filesystem api-summary book. Signed-off-by: Randy Dunlap Cc: Jonathan Corbet Cc: linux-doc@vger.kernel.org Cc: Andrew Morton Cc: Alexander Viro Link: https://lore.kernel.org/r/20210210042526.23174-2-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit a6c67fee9cf09552a6d37724a91e1183a06a79cb Author: Randy Dunlap Date: Mon Mar 1 15:25:51 2021 -0700 fs: eventpoll: fix comments & kernel-doc notation Use the documented kernel-doc format for function Return: descriptions. Begin constant values in kernel-doc comments with '%'. Remove kernel-doc "/**" from 2 functions that are not documented with kernel-doc notation. Fix typos, punctuation, & grammar. Also fix a few kernel-doc warnings: ../fs/eventpoll.c:1883: warning: Function parameter or member 'ep' not described in 'ep_loop_check_proc' ../fs/eventpoll.c:1883: warning: Excess function parameter 'priv' description in 'ep_loop_check_proc' ../fs/eventpoll.c:1932: warning: Function parameter or member 'ep' not described in 'ep_loop_check' ../fs/eventpoll.c:1932: warning: Excess function parameter 'from' description in 'ep_loop_check' Signed-off-by: Randy Dunlap Cc: Andrew Morton Cc: Alexander Viro Signed-off-by: Jonathan Corbet commit 26bea42771c553f1b0dddb48875688f0e85477a4 Author: Randy Dunlap Date: Wed Feb 10 10:22:48 2021 -0800 Documentation: ioctl: add entry for nsfs.h All userspace ioctls major/magic number should be documented in Documentation/userspace-api/ioctl/ioctl-number.rst, so add the entry for . Signed-off-by: Randy Dunlap Cc: Andrey Vagin Cc: Serge Hallyn Cc: Eric W. Biederman Cc: linux-doc@vger.kernel.org Cc: Jonathan Corbet Link: https://lore.kernel.org/r/20210210182248.18101-1-rdunlap@infradead.org Signed-off-by: Jonathan Corbet commit c9491aad97e67e45216d5181a2dc56ebf1a0bc04 Author: Kees Cook Date: Wed Feb 10 15:40:05 2021 -0800 Documentation: Replace more lkml.org links with lore As started by commit 05a5f51ca566 ("Documentation: Replace lkml.org links with lore"), replace a few more scattered lkml.org links with lore to better use a single source that's more likely to stay available long-term. Signed-off-by: Kees Cook Link: https://lore.kernel.org/r/20210210234005.2236201-1-keescook@chromium.org Signed-off-by: Jonathan Corbet commit 7331b30f8f350663d50db8074a45910470b6d65f Author: Lubomir Rintel Date: Mon Feb 15 23:08:39 2021 +0100 docs: arm: marvell: clarify some unimportant Armada 6x0 details MMP2 is used in XO-1.75 and MMP3 is now supported in mainline. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20210215220839.423709-4-lkundrak@v3.sk Signed-off-by: Jonathan Corbet commit 807d246798d5ee0283588485094af38803b1ba76 Author: Lubomir Rintel Date: Mon Feb 15 23:08:37 2021 +0100 docs: arm: marvell: replace stale links with archive links Marvell has an annoying habit of moving stuff around their web site every full moon, and often just removing documents altogether. At this point basically none but four of the links still works and even those that work today weren't working for a long period of time previously. That is a shame because (short of the product briefs) the documents tend to be quite useful. Let's replace them with known working versions of IA's Wayback Machine links. That seems to be about the only way of getting a URL that's going to work the next week. Signed-off-by: Lubomir Rintel Link: https://lore.kernel.org/r/20210215220839.423709-2-lkundrak@v3.sk Signed-off-by: Jonathan Corbet commit 875f82cb374b16e2edd700c4270f372247199b1e Author: Borislav Petkov Date: Mon Feb 15 15:19:49 2021 +0100 Documentation/submitting-patches: Extend commit message layout description Add more blurb about the level of detail that should be contained in a patch's commit message. Extend and make more explicit what text should be added under the --- line. Extend examples and split into more easily palatable paragraphs. This has been partially carved out from a tip subsystem handbook patchset by Thomas Gleixner: https://lkml.kernel.org/r/20181107171010.421878737@linutronix.de and incorporates follow-on comments. Signed-off-by: Borislav Petkov Reviewed-by: Robert Richter Link: https://lore.kernel.org/r/20210215141949.GB21734@zn.tnic [jc: Tweaked "example subjects" wording] Signed-off-by: Jonathan Corbet commit 315c4e45f10d216b371d2e2eddef228bbafaec72 Author: Thorsten Leemhuis Date: Mon Feb 15 18:28:57 2021 +0100 docs: reporting-issues.rst: explain how to decode stack traces Replace placeholder text about decoding stack traces with a section that properly describes what a typical user should do these days. To make it works for them, add a paragraph in an earlier section to ensure people build their kernels with everything that's needed to decode stack traces later. Signed-off-by: Thorsten Leemhuis Reviewed-by: Qais Yousef Acked-by: Vlastimil Babka Link: https://lore.kernel.org/r/20210215172857.382285-1-linux@leemhuis.info Signed-off-by: Jonathan Corbet commit 692180345da62cb96a49fcc7808a1929634ba70b Author: Lukas Bulwahn Date: Fri Feb 26 15:08:27 2021 +0530 MAINTAINERS: clarify responsibility for checkpatch documentation As discussed, Dwaipayan and Lukas take the responsibility for maintaining the checkpatch documentation that is currently being built up. To be sure that the checkpatch maintainers and the corresponding documentation maintainers can keep the content synchronized, add them as reviewers to the counterpart. Signed-off-by: Lukas Bulwahn Signed-off-by: Dwaipayan Ray Link: https://lore.kernel.org/lkml/bcee822d1934772f47702ee257bc735c8f467088.camel@perches.com/ Link: https://lore.kernel.org/r/20210226093827.12700-4-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet commit 52178ce01335d9d76611c3a5198b8778cb9b03f5 Author: Dwaipayan Ray Date: Fri Feb 26 15:08:26 2021 +0530 checkpatch: add verbose mode Add a new verbose mode to checkpatch.pl to emit additional verbose test descriptions. The verbose mode is optional and can be enabled by the flag -v or --verbose. The test descriptions are parsed from the checkpatch documentation file at `Documentation/dev-tools/checkpatch.rst`. The test descriptions in the docs are kept in a fixed format grouped by usage. Some examples of this format are: **LINE_SPACING** Vertical space is wasted given the limited number of lines an editor window can display when multiple blank lines are used. **MISSING_SIGN_OFF** The patch is missing a Signed-off-by line. A signed-off-by line should be added according to Developer's certificate of Origin. To avoid lengthy output, the verbose description is printed only for the first instance of a particular message type. The --verbose option cannot be used along with the --terse option. Verbose mode can be used with the --list-types option. The --list-types output also supports color coding now. Signed-off-by: Dwaipayan Ray Link: https://lore.kernel.org/r/20210226093827.12700-3-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet commit 2eecbab86400f002c4a541efd357b02945735020 Author: Dwaipayan Ray Date: Fri Feb 26 15:08:25 2021 +0530 docs: add documentation for checkpatch Add documentation for kernel script checkpatch.pl. This documentation is also parsed by checkpatch to enable a verbose mode. The checkpatch message types are grouped by usage. Under each group the types are described briefly. 34 of such types are documented. Signed-off-by: Dwaipayan Ray Link: https://lore.kernel.org/r/20210226093827.12700-2-dwaipayanray1@gmail.com Signed-off-by: Jonathan Corbet commit 378261870a0fdef80f2a24fa16895d0a6c2e5c05 Author: Flavio Suligoi Date: Tue Feb 23 12:13:24 2021 +0100 docs: watchdog: fix obsolete include file reference in pcwd The file linux/pcwd.h is not more present in the kernel sources. Its information is now moved into the file: include/uapi/linux/watchdog.h Signed-off-by: Flavio Suligoi Link: https://lore.kernel.org/r/20210223111324.309285-1-f.suligoi@asem.it Signed-off-by: Jonathan Corbet commit 1364c67875251cd254c4fbbe10650e8a603493d8 Author: Geert Uytterhoeven Date: Thu Feb 25 10:11:24 2021 +0100 docs: driver-model: Remove obsolete device class documentation None of this is valid since v2.5.69. Signed-off-by: Geert Uytterhoeven Link: https://lore.kernel.org/r/20210225091124.686078-1-geert+renesas@glider.be Signed-off-by: Jonathan Corbet commit a746fe32cd362c8bba523a97123129ede4f5b75a Author: Aditya Srivastava Date: Thu Feb 25 20:20:33 2021 +0530 scripts: kernel-doc: fix typedef support for struct/union parsing Currently, there are ~1290 occurrences in 447 files in the kernel tree 'typedef struct/union' syntax for defining some struct/union. However, kernel-doc currently does not support that syntax. Of the ~1290 occurrences, there are four occurrences in ./include/linux/zstd.h with typedef struct/union syntax and a preceding kernel-doc; all other occurrences have no preceding kernel-doc. Add support for parsing struct/union following this syntax. Signed-off-by: Aditya Srivastava Link: https://lore.kernel.org/r/20210225145033.11431-1-yashsri421@gmail.com Signed-off-by: Jonathan Corbet commit 1eff491fc44b9a1cd3483e289b987c2d00441f20 Author: Yang Shi Date: Thu Feb 25 18:12:54 2021 -0800 doc: memcontrol: add description for oom_kill When debugging an oom issue, I found the oom_kill counter of memcg is confusing. At the first glance without checking document, I thought it just counts for memcg oom, but it turns out it counts both global and memcg oom. The cgroup v2 documents it, but the description is missed for cgroup v1. Signed-off-by: Yang Shi Reviewed-by: Shakeel Butt Acked-by: Michal Hocko Acked-by: Chris Down Link: https://lore.kernel.org/r/20210226021254.3980-1-shy828301@gmail.com Signed-off-by: Jonathan Corbet commit abe4a3996e5f8c43ed579051d661e2104d7bda61 Author: Bhaskar Chowdhury Date: Tue Mar 2 01:40:52 2021 +0530 docs: sphinx: Fix couple of spellings in the file rstFlatTable.py s/automaticly/automatically/ s/buidler/builder/ ..and a sentence construction fix. Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Link: https://lore.kernel.org/r/20210301201052.11067-1-unixbhaskar@gmail.com Signed-off-by: Jonathan Corbet commit 2777b81b379df772defd654bc4d3fa82dca17a4b Author: Martin Liska Date: Mon Feb 15 12:34:46 2021 +0100 perf annotate: Show full source location with 'l' hotkey Right now, when Line numbers are displayed, one can't easily find a source file that the line corresponds to. When a source line is selected and 'l' is pressed, full source file location is displayed in perf UI footer line. The hotkey works only for source code lines. Signed-off-by: Martin Liška Tested-by: Arnaldo Carvalho de Melo Link: http://lore.kernel.org/lkml/25a6384f-d862-5dda-4fec-8f0555599c75@suse.cz Signed-off-by: Arnaldo Carvalho de Melo commit a78e724f4eb487517f03a6044d7a554c8823fe49 Author: Xiong Zhenwu Date: Fri Mar 5 01:22:12 2021 -0800 perf bench: Fix misspellings using codespell $ codespell ./tool/perf/bench tools/perf/bench/inject-buildid.c:375: tihs ==> this Fix a typo found by codespell. Signed-off-by: Xiong Zhenwu Cc: Alexander Shishkin Cc: Ian Rogers Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20210305092212.204923-1-xiong.zhenwu@zte.com.cn Signed-off-by: Arnaldo Carvalho de Melo commit 44e176501c557460de954572435baa4ae34d2a35 Author: Martin Liska Date: Fri Feb 26 11:01:24 2021 +0100 perf config: Add annotate.demangle{,_kernel} Committer notes: This allows setting this in from the command line: $ perf config annotate.demangle $ perf config annotate.demangle=yes $ perf config annotate.demangle annotate.demangle=yes $ cat ~/.perfconfig # this file is auto-generated. [report] sort-order = srcline [annotate] demangle = yes $ $ $ perf config annotate.demangle_kernel $ perf config annotate.demangle_kernel=yes $ perf config annotate.demangle_kernel annotate.demangle_kernel=yes $ cat ~/.perfconfig # this file is auto-generated. [report] sort-order = srcline [annotate] demangle = yes demangle_kernel = yes $ Signed-off-by: Martin Liška Tested-by: Arnaldo Carvalho de Melo Link: https://lore.kernel.org/r/c96aabe7-791f-9503-295f-3147a9d19b60@suse.cz Signed-off-by: Arnaldo Carvalho de Melo commit 509bbd75f7ff878b5e3f78b9e14ba4b6e16dc3b0 Author: Ian Rogers Date: Sat Mar 6 00:08:40 2021 -0800 perf bpf: Minor whitespace cleanup. Missed space after #include. Signed-off-by: Ian Rogers Acked-by: Song Liu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210306080840.3785816-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 7e1df64edeb294767f0976a7784fe1dbbe9f4394 Author: Ian Rogers Date: Sat Mar 6 00:08:39 2021 -0800 perf tools: Enable warnings when compiling BPF programs Add -Wall -Werror when compiling BPF skeletons. Signed-off-by: Ian Rogers Acked-by: Song Liu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210306080840.3785816-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 35276a4f058df23507987ef6d2426ea9673f5e35 Author: Ian Rogers Date: Sat Mar 6 00:08:38 2021 -0800 perf skel: Remove some unused variables. Fixes -Wall warnings. Signed-off-by: Ian Rogers Acked-by: Song Liu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lore.kernel.org/lkml/20210306080840.3785816-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 2552e38dc8ad601ff8defb8051126277a165a991 Author: Dmitry Osipenko Date: Tue Mar 2 13:10:27 2021 +0300 power: supply: smb347-charger: Clean up whitespaces in the code Improve formatting of the code by removing unnecessary whitespaces. Signed-off-by: Dmitry Osipenko Signed-off-by: Sebastian Reichel commit d33b3f7e34a108ce4ad2ed11b0111aa804666c99 Author: Dmitry Osipenko Date: Tue Mar 2 13:10:26 2021 +0300 power: supply: smb347-charger: Improve interrupt initialization A previous commit attempted to fix IRQ usage in a case where interrupt is failed to initialize, but it missed couple more cases that could be improved. The interrupt could be undefined and then everything related to interrupt shouldn't be touched by driver. Secondly, we shouldn't ignore errors that aren't directly related to enabling interrupt in hardware, like enabling h/w write-access or requesting interrupt. Improve interrupt initialization in the driver in order to handle the missing cases. Signed-off-by: Dmitry Osipenko Signed-off-by: Sebastian Reichel commit c8bbab8f2d5f8b292d568449584bef7ef10d609e Author: Krzysztof Kozlowski Date: Wed Feb 10 18:21:08 2021 +0100 power: supply: s3c_adc_battery: remove unused pdata in suspend/resume The "pdata" local variable is not used in suspend/resume handlers since commit 7776bcd241e0 ("power: supply: s3c-adc-battery: Convert to GPIO descriptors"): drivers/power/supply/s3c_adc_battery.c: In function ‘s3c_adc_bat_suspend’: drivers/power/supply/s3c_adc_battery.c:405:28: warning: unused variable ‘pdata’ [-Wunused-variable] drivers/power/supply/s3c_adc_battery.c: In function ‘s3c_adc_bat_resume’: drivers/power/supply/s3c_adc_battery.c:422:28: warning: unused variable ‘pdata’ [-Wunused-variable] Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit d6ce6e81085221ccf7899291a0fa1ffbe31d5218 Author: Krzysztof Kozlowski Date: Wed Feb 10 18:21:07 2021 +0100 power: supply: s3c_adc_battery: add SPDX license identifier Add SPDX license identifier and replace license boilerplate. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit f05d29333bb4b35d31f0704096e98fb8c2d1e85a Author: Krzysztof Kozlowski Date: Wed Feb 10 18:21:06 2021 +0100 MAINTAINERS: power: supply: add entry for S3C ADC battery driver The S3C ADC battery driver is a very old piece of code but still used by (very old as well) S3C24xx platforms (iPAQ h1930/h1940/rx1950). Currently the header file is not covered by maintainers file, so it might look abandoned. Add a new entry for entire S3C ADC battery driver with Krzysztof Kozlowski as maintainer (as Krzysztof maintains still Samsung S3C24xx platform) to indicate that some basic review can take place. However considering that the S3C24xx platform is quite old with only few users currently and Krzysztof does not have the actual hardware, let's mark the driver as "Odd fixes". Cc: Sebastian Reichel Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel commit bf3841073bf34c9568ee5d6a6020b3902b3eef81 Author: Martin Ashby Date: Thu Feb 18 07:42:50 2021 -0500 power: supply: cw2015: Add CHARGE_NOW support CHARGE_NOW is expected by some user software (such as waybar) instead of 'CAPACITY', in order to correctly calculate remaining battery life. Signed-off-by: Martin Ashby Reviewed-by: Tobias Schramm Tested-by: Tobias Schramm Signed-off-by: Sebastian Reichel commit c018b5322a449ec98888b734805d0bc0ed7b2da0 Author: Jiapeng Chong Date: Wed Feb 24 15:15:10 2021 +0800 power: supply: max8997-charger: remove unneeded semicolon Fix the following coccicheck warnings: ./drivers/power/supply/max8997_charger.c:266:3-4: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Sebastian Reichel commit 6f1e376cfc6864a2f46538db909bbd5253c3c146 Author: Nava kishore Manne Date: Thu Feb 11 10:41:48 2021 +0530 fpga: Add support for Xilinx DFX AXI Shutdown manager This patch adds support for Xilinx Dynamic Function eXchange(DFX) AXI shutdown manager IP. It can be used to safely handling the AXI traffic on a Reconfigurable Partition when it is undergoing dynamic reconfiguration and there by preventing system deadlock that may occur if AXI transactions are interrupted during reconfiguration. PR-Decoupler and AXI shutdown manager are completely different IPs. But both the IP registers are compatible and also both belong to the same sub-system (fpga-bridge).So using same driver for both IP's. Signed-off-by: Nava kishore Manne Reviewed-by: Tom Rix Signed-off-by: Moritz Fischer commit 71c3980b8cc8ddaa523a3061392f5298c4798206 Author: Nava kishore Manne Date: Thu Feb 11 10:41:47 2021 +0530 dt-bindings: fpga: Add compatible value for Xilinx DFX AXI shutdown manager This patch Adds compatible value for Xilinx Dynamic Function eXchnage(DFX) AXI Shutdown manager IP. Signed-off-by: Nava kishore Manne Reviewed-by: Tom Rix Reviewed-by: Rob Herring Signed-off-by: Moritz Fischer commit 2d6e820c4e9e7a6d681a413cca6c7dc53b420c97 Author: Michal Simek Date: Thu Feb 4 14:36:11 2021 +0100 fpga: xilinx-pr-decoupler: Simplify code by using dev_err_probe() Use already prepared dev_err_probe() introduced by commit a787e5400a1c ("driver core: add device probe log helper"). It simplifies EPROBE_DEFER handling. Signed-off-by: Michal Simek Signed-off-by: Moritz Fischer commit 484a58607a808c3721917f5ca5fba7eff809e4df Author: Luca Ceresoli Date: Thu Feb 4 13:13:13 2021 +0100 fpga: fpga-mgr: xilinx-spi: fix error messages on -EPROBE_DEFER The current code produces an error message on devm_gpiod_get() errors even when the error is -EPROBE_DEFER, which should be silent. This has been observed producing a significant amount of messages like: xlnx-slave-spi spi1.1: Failed to get PROGRAM_B gpio: -517 Fix and simplify code by using the dev_err_probe() helper function. Signed-off-by: Luca Ceresoli Fixes: dd2784c01d93 ("fpga manager: xilinx-spi: check INIT_B pin during write_init") Fixes: 061c97d13f1a ("fpga manager: Add Xilinx slave serial SPI driver") Signed-off-by: Moritz Fischer commit a500fc918f7b8dc3dff2e6c74f3e73e856c18248 Merge: d43f17a1da253 bdb1050ee1faa Author: Ingo Molnar Date: Sat Mar 6 13:00:58 2021 +0100 Merge branch 'locking/core' into x86/mm, to resolve conflict There's a non-trivial conflict between the parallel TLB flush framework and the IPI flush debugging code - merge them manually. Conflicts: kernel/smp.c Signed-off-by: Ingo Molnar commit d43f17a1da25373580ebb466de7d0641acbf6fd6 Author: Peter Zijlstra Date: Tue Mar 2 08:02:43 2021 +0100 smp: Micro-optimize smp_call_function_many_cond() Call the generic send_call_function_single_ipi() function, which will avoid the IPI when @last_cpu is idle. Signed-off-by: Peter Zijlstra Signed-off-by: Ingo Molnar Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar commit a5aa5ce300597224ec76dacc8e63ba3ad7a18bbd Author: Nadav Amit Date: Sat Feb 20 15:17:12 2021 -0800 smp: Inline on_each_cpu_cond() and on_each_cpu() Simplify the code and avoid having an additional function on the stack by inlining on_each_cpu_cond() and on_each_cpu(). Suggested-by: Peter Zijlstra Signed-off-by: Nadav Amit [ Minor edits. ] Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210220231712.2475218-10-namit@vmware.com commit 1608e4cf31b88c8c448ce13aa1d77969dda6bdb7 Author: Nadav Amit Date: Sat Feb 20 15:17:11 2021 -0800 x86/mm/tlb: Remove unnecessary uses of the inline keyword The compiler is smart enough without these hints. Suggested-by: Dave Hansen Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20210220231712.2475218-9-namit@vmware.com commit 291c4011dd7ac0cd0cebb727a75ee5a50d16dcf7 Author: Nadav Amit Date: Sat Feb 20 15:17:10 2021 -0800 cpumask: Mark functions as pure cpumask_next_and() and cpumask_any_but() are pure, and marking them as such seems to generate different and presumably better code for native_flush_tlb_multi(). Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20210220231712.2475218-8-namit@vmware.com commit 09c5272e48614a30598e759c3c7bed126d22037d Author: Nadav Amit Date: Sat Feb 20 15:17:09 2021 -0800 x86/mm/tlb: Do not make is_lazy dirty for no reason Blindly writing to is_lazy for no reason, when the written value is identical to the old value, makes the cacheline dirty for no reason. Avoid making such writes to prevent cache coherency traffic for no reason. Suggested-by: Dave Hansen Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20210220231712.2475218-7-namit@vmware.com commit 2f4305b19fe6a2a261d76c21856c5598f7d878fe Author: Nadav Amit Date: Sat Feb 20 15:17:08 2021 -0800 x86/mm/tlb: Privatize cpu_tlbstate cpu_tlbstate is mostly private and only the variable is_lazy is shared. This causes some false-sharing when TLB flushes are performed. Break cpu_tlbstate intro cpu_tlbstate and cpu_tlbstate_shared, and mark each one accordingly. Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20210220231712.2475218-6-namit@vmware.com commit 4ce94eabac16b1d2c95762b40f49e5654ab288d7 Author: Nadav Amit Date: Sat Feb 20 15:17:07 2021 -0800 x86/mm/tlb: Flush remote and local TLBs concurrently To improve TLB shootdown performance, flush the remote and local TLBs concurrently. Introduce flush_tlb_multi() that does so. Introduce paravirtual versions of flush_tlb_multi() for KVM, Xen and hyper-v (Xen and hyper-v are only compile-tested). While the updated smp infrastructure is capable of running a function on a single local core, it is not optimized for this case. The multiple function calls and the indirect branch introduce some overhead, and might make local TLB flushes slower than they were before the recent changes. Before calling the SMP infrastructure, check if only a local TLB flush is needed to restore the lost performance in this common case. This requires to check mm_cpumask() one more time, but unless this mask is updated very frequently, this should impact performance negatively. Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Reviewed-by: Michael Kelley # Hyper-v parts Reviewed-by: Juergen Gross # Xen and paravirt parts Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20210220231712.2475218-5-namit@vmware.com commit 6035152d8eebe16a5bb60398d3e05dc7799067b0 Author: Nadav Amit Date: Sat Feb 20 15:17:06 2021 -0800 x86/mm/tlb: Open-code on_each_cpu_cond_mask() for tlb_is_not_lazy() Open-code on_each_cpu_cond_mask() in native_flush_tlb_others() to optimize the code. Open-coding eliminates the need for the indirect branch that is used to call is_lazy(), and in CPUs that are vulnerable to Spectre v2, it eliminates the retpoline. In addition, it allows to use a preallocated cpumask to compute the CPUs that should be. This would later allow us not to adapt on_each_cpu_cond_mask() to support local and remote functions. Note that calling tlb_is_not_lazy() for every CPU that needs to be flushed, as done in native_flush_tlb_multi() might look ugly, but it is equivalent to what is currently done in on_each_cpu_cond_mask(). Actually, native_flush_tlb_multi() does it more efficiently since it avoids using an indirect branch for the matter. Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20210220231712.2475218-4-namit@vmware.com commit 4c1ba3923e6c8aa736e40f481a278c21b956c072 Author: Nadav Amit Date: Sat Feb 20 15:17:05 2021 -0800 x86/mm/tlb: Unify flush_tlb_func_local() and flush_tlb_func_remote() The unification of these two functions allows to use them in the updated SMP infrastrucutre. To do so, remove the reason argument from flush_tlb_func_local(), add a member to struct tlb_flush_info that says which CPU initiated the flush and act accordingly. Optimize the size of flush_tlb_info while we are at it. Unfortunately, this prevents us from using a constant tlb_flush_info for arch_tlbbatch_flush(), but in a later stage we may be able to inline tlb_flush_info into the IPI data, so it should not have an impact eventually. Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20210220231712.2475218-3-namit@vmware.com commit a32a4d8a815c4eb6dc64b8962dc13a9dfae70868 Author: Nadav Amit Date: Sat Feb 20 15:17:04 2021 -0800 smp: Run functions concurrently in smp_call_function_many_cond() Currently, on_each_cpu() and similar functions do not exploit the potential of concurrency: the function is first executed remotely and only then it is executed locally. Functions such as TLB flush can take considerable time, so this provides an opportunity for performance optimization. To do so, modify smp_call_function_many_cond(), to allows the callers to provide a function that should be executed (remotely/locally), and run them concurrently. Keep other smp_call_function_many() semantic as it is today for backward compatibility: the called function is not executed in this case locally. smp_call_function_many_cond() does not use the optimized version for a single remote target that smp_call_function_single() implements. For synchronous function call, smp_call_function_single() keeps a call_single_data (which is used for synchronization) on the stack. Interestingly, it seems that not using this optimization provides greater performance improvements (greater speedup with a single remote target than with multiple ones). Presumably, holding data structures that are intended for synchronization on the stack can introduce overheads due to TLB misses and false-sharing when the stack is used for other purposes. Signed-off-by: Nadav Amit Signed-off-by: Ingo Molnar Reviewed-by: Dave Hansen Link: https://lore.kernel.org/r/20210220231712.2475218-2-namit@vmware.com commit 59eca2fa1934de42d8aa44d3bef655c92ea69703 Author: Pu Wen Date: Tue Mar 2 10:02:17 2021 +0800 x86/cpu/hygon: Set __max_die_per_package on Hygon Set the maximum DIE per package variable on Hygon using the nodes_per_socket value in order to do per-DIE manipulations for drivers such as powercap. Signed-off-by: Pu Wen Signed-off-by: Borislav Petkov Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20210302020217.1827-1-puwen@hygon.cn commit bdb1050ee1faaec1e78c15de8b1959176f26c655 Author: Shuah Khan Date: Fri Feb 26 17:07:00 2021 -0700 ath10k: Detect conf_mutex held ath10k_drain_tx() calls ath10k_drain_tx() must not be called with conf_mutex held as workers can use that also. Add call to lockdep_assert_not_held() on conf_mutex to detect if conf_mutex is held by the caller. The idea for this patch stemmed from coming across the comment block above the ath10k_drain_tx() while reviewing the conf_mutex holds during to debug the conf_mutex lock assert in ath10k_debug_fw_stats_request(). Adding detection to assert on conf_mutex hold will help detect incorrect usages that could lead to locking problems when async worker routines try to call this routine. Signed-off-by: Shuah Khan Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Kalle Valo Link: https://lore.kernel.org/linux-wireless/871rdmu9z9.fsf@codeaurora.org/ commit f8cfa46608f8aa5ca5421ce281ab314129c15411 Author: Shuah Khan Date: Fri Feb 26 17:06:59 2021 -0700 lockdep: Add lockdep lock state defines Adds defines for lock state returns from lock_is_held_type() based on Johannes Berg's suggestions as it make it easier to read and maintain the lock states. These are defines and a enum to avoid changes to lock_is_held_type() and lockdep_is_held() return types. Updates to lock_is_held_type() and __lock_is_held() to use the new defines. Signed-off-by: Shuah Khan Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/linux-wireless/871rdmu9z9.fsf@codeaurora.org/ commit 3e31f94752e454bdd0ca4a1d046ee21f80c166c5 Author: Shuah Khan Date: Fri Feb 26 17:06:58 2021 -0700 lockdep: Add lockdep_assert_not_held() Some kernel functions must be called without holding a specific lock. Add lockdep_assert_not_held() to be used in these functions to detect incorrect calls while holding a lock. lockdep_assert_not_held() provides the opposite functionality of lockdep_assert_held() which is used to assert calls that require holding a specific lock. Incorporates suggestions from Peter Zijlstra to avoid misfires when lockdep_off() is employed. The need for lockdep_assert_not_held() came up in a discussion on ath10k patch. ath10k_drain_tx() and i915_vma_pin_ww() are examples of functions that can use lockdep_assert_not_held(). Signed-off-by: Shuah Khan Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/linux-wireless/871rdmu9z9.fsf@codeaurora.org/ commit 864b435514b286c0be2a38a02f487aa28d990ef8 Author: Jason Gerecke Date: Thu Feb 11 13:48:48 2021 -0800 x86/jump_label: Mark arguments as const to satisfy asm constraints When compiling an external kernel module with `-O0` or `-O1`, the following compile error may be reported: ./arch/x86/include/asm/jump_label.h:25:2: error: impossible constraint in ‘asm’ 25 | asm_volatile_goto("1:" | ^~~~~~~~~~~~~~~~~ It appears that these lower optimization levels prevent GCC from detecting that the key/branch arguments can be treated as constants and used as immediate operands. To work around this, explicitly add the `const` label. Signed-off-by: Jason Gerecke Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Steven Rostedt (VMware) Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/20210211214848.536626-1-jason.gerecke@wacom.com commit a5aabace5fb8abf2adcfcf0fe54c089b20d71755 Author: Juergen Gross Date: Mon Mar 1 11:13:36 2021 +0100 locking/csd_lock: Add more data to CSD lock debugging In order to help identifying problems with IPI handling and remote function execution add some more data to IPI debugging code. There have been multiple reports of CPUs looping long times (many seconds) in smp_call_function_many() waiting for another CPU executing a function like tlb flushing. Most of these reports have been for cases where the kernel was running as a guest on top of KVM or Xen (there are rumours of that happening under VMWare, too, and even on bare metal). Finding the root cause hasn't been successful yet, even after more than 2 years of chasing this bug by different developers. Commit: 35feb60474bf4f7 ("kernel/smp: Provide CSD lock timeout diagnostics") tried to address this by adding some debug code and by issuing another IPI when a hang was detected. This helped mitigating the problem (the repeated IPI unlocks the hang), but the root cause is still unknown. Current available data suggests that either an IPI wasn't sent when it should have been, or that the IPI didn't result in the target CPU executing the queued function (due to the IPI not reaching the CPU, the IPI handler not being called, or the handler not seeing the queued request). Try to add more diagnostic data by introducing a global atomic counter which is being incremented when doing critical operations (before and after queueing a new request, when sending an IPI, and when dequeueing a request). The counter value is stored in percpu variables which can be printed out when a hang is detected. The data of the last event (consisting of sequence counter, source CPU, target CPU, and event type) is stored in a global variable. When a new event is to be traced, the data of the last event is stored in the event related percpu location and the global data is updated with the new event's data. This allows to track two events in one data location: one by the value of the event data (the event before the current one), and one by the location itself (the current event). A typical printout with a detected hang will look like this: csd: Detected non-responsive CSD lock (#1) on CPU#1, waiting 5000000003 ns for CPU#06 scf_handler_1+0x0/0x50(0xffffa2a881bb1410). csd: CSD lock (#1) handling prior scf_handler_1+0x0/0x50(0xffffa2a8813823c0) request. csd: cnt(00008cc): ffff->0000 dequeue (src cpu 0 == empty) csd: cnt(00008cd): ffff->0006 idle csd: cnt(0003668): 0001->0006 queue csd: cnt(0003669): 0001->0006 ipi csd: cnt(0003e0f): 0007->000a queue csd: cnt(0003e10): 0001->ffff ping csd: cnt(0003e71): 0003->0000 ping csd: cnt(0003e72): ffff->0006 gotipi csd: cnt(0003e73): ffff->0006 handle csd: cnt(0003e74): ffff->0006 dequeue (src cpu 0 == empty) csd: cnt(0003e7f): 0004->0006 ping csd: cnt(0003e80): 0001->ffff pinged csd: cnt(0003eb2): 0005->0001 noipi csd: cnt(0003eb3): 0001->0006 queue csd: cnt(0003eb4): 0001->0006 noipi csd: cnt now: 0003f00 The idea is to print only relevant entries. Those are all events which are associated with the hang (so sender side events for the source CPU of the hanging request, and receiver side events for the target CPU), and the related events just before those (for adding data needed to identify a possible race). Printing all available data would be possible, but this would add large amounts of data printed on larger configurations. Signed-off-by: Juergen Gross [ Minor readability edits. Breaks col80 but is far more readable. ] Signed-off-by: Ingo Molnar Tested-by: Paul E. McKenney Link: https://lore.kernel.org/r/20210301101336.7797-4-jgross@suse.com commit de7b09ef658d637eed0584eaba30884e409aef31 Author: Juergen Gross Date: Mon Mar 1 11:13:35 2021 +0100 locking/csd_lock: Prepare more CSD lock debugging In order to be able to easily add more CSD lock debugging data to struct call_function_data->csd move the call_single_data_t element into a sub-structure. Signed-off-by: Juergen Gross Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210301101336.7797-3-jgross@suse.com commit 8d0968cc6b8ffd8496c2ebffdfdc801f949a85e5 Author: Juergen Gross Date: Mon Mar 1 11:13:34 2021 +0100 locking/csd_lock: Add boot parameter for controlling CSD lock debugging Currently CSD lock debugging can be switched on and off via a kernel config option only. Unfortunately there is at least one problem with CSD lock handling pending for about 2 years now, which has been seen in different environments (mostly when running virtualized under KVM or Xen, at least once on bare metal). Multiple attempts to catch this issue have finally led to introduction of CSD lock debug code, but this code is not in use in most distros as it has some impact on performance. In order to be able to ship kernels with CONFIG_CSD_LOCK_WAIT_DEBUG enabled even for production use, add a boot parameter for switching the debug functionality on. This will reduce any performance impact of the debug coding to a bare minimum when not being used. Signed-off-by: Juergen Gross [ Minor edits. ] Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210301101336.7797-2-jgross@suse.com commit cbe16f35bee6880becca6f20d2ebf6b457148552 Author: Barry Song Date: Wed Mar 3 11:49:15 2021 +1300 genirq: Add IRQF_NO_AUTOEN for request_irq/nmi() Many drivers don't want interrupts enabled automatically via request_irq(). So they are handling this issue by either way of the below two: (1) irq_set_status_flags(irq, IRQ_NOAUTOEN); request_irq(dev, irq...); (2) request_irq(dev, irq...); disable_irq(irq); The code in the second way is silly and unsafe. In the small time gap between request_irq() and disable_irq(), interrupts can still come. The code in the first way is safe though it's subobtimal. Add a new IRQF_NO_AUTOEN flag which can be handed in by drivers to request_irq() and request_nmi(). It prevents the automatic enabling of the requested interrupt/nmi in the same safe way as #1 above. With that the various usage sites of #1 and #2 above can be simplified and corrected. Signed-off-by: Barry Song Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Cc: dmitry.torokhov@gmail.com Link: https://lore.kernel.org/r/20210302224916.13980-2-song.bao.hua@hisilicon.com commit 900b4df347bbac4874149a226143a556909faba8 Author: Peter Zijlstra Date: Fri Feb 26 11:32:30 2021 +0100 objtool: Parse options from OBJTOOL_ARGS Teach objtool to parse options from the OBJTOOL_ARGS environment variable. This enables things like: $ OBJTOOL_ARGS="--backup" make O=defconfig-build/ kernel/ponies.o to obtain both defconfig-build/kernel/ponies.o{,.orig} and easily inspect what objtool actually did. Suggested-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/20210226110004.252553847@infradead.org commit a2f605f9ff57397d05a8e2f282b78a69f574d305 Author: Peter Zijlstra Date: Fri Feb 26 11:18:24 2021 +0100 objtool: Collate parse_options() users Ensure there's a single place that parses check_options, in preparation for extending where to get options from. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/20210226110004.193108106@infradead.org commit 8ad15c6900840e8a2163012f4581c52127622e02 Author: Peter Zijlstra Date: Fri Feb 26 10:59:59 2021 +0100 objtool: Add --backup Teach objtool to write backups files, such that it becomes easier to see what objtool did to the object file. Backup files will be ${name}.orig. Suggested-by: Borislav Petkov Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Borislav Petkov Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/YD4obT3aoXPWl7Ax@hirez.programming.kicks-ass.net commit 36d92e43d01cbeeec99abdf405362243051d6b3f Author: Peter Zijlstra Date: Fri Feb 12 09:13:00 2021 +0100 objtool,x86: More ModRM sugar Better helpers to decode ModRM. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Link: https://lkml.kernel.org/r/YCZB/ljatFXqQbm8@hirez.programming.kicks-ass.net commit 961d83b9073b1ce5834af50d3c69e5e2461c6fd3 Author: Peter Zijlstra Date: Wed Feb 10 14:11:30 2021 +0100 objtool,x86: Rewrite ADD/SUB/AND Support sign extending and imm8 forms. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nick Desaulniers Link: https://lkml.kernel.org/r/20210211173627.588366777@infradead.org commit 78df6245c3c82484200b9f8e306dc86fb19e9c02 Author: Peter Zijlstra Date: Wed Feb 10 11:47:35 2021 +0100 objtool,x86: Support %riz encodings When there's a SIB byte, the register otherwise denoted by r/m will then be denoted by SIB.base REX.b will now extend this. SIB.index == SP is magic and notes an index value zero. This means that there's a bunch of alternative (longer) encodings for the same thing. Eg. 'ModRM.mod != 3, ModRM.r/m = AX' can be encoded as 'ModRM.mod != 3, ModRM.r/m = SP, SIB.base = AX, SIB.index = SP' which is actually 4 different encodings because the value of SIB.scale is irrelevant, giving rise to 5 different but equal encodings. Support these encodings and clean up the SIB handling in general. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nick Desaulniers Link: https://lkml.kernel.org/r/20210211173627.472967498@infradead.org commit 16ef7f159c503c7befec7018ee0e82fdc311721e Author: Peter Zijlstra Date: Tue Feb 9 19:59:43 2021 +0100 objtool,x86: Simplify register decode Since the CFI_reg number now matches the instruction encoding order do away with the op_to_cfi_reg[] and use direct assignment. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nick Desaulniers Link: https://lkml.kernel.org/r/20210211173627.362004522@infradead.org commit ffc7e74f36a2c7424da262a32a0bbe59669677ef Author: Peter Zijlstra Date: Tue Feb 9 21:41:13 2021 +0100 objtool,x86: Rewrite LEAVE Since we can now have multiple stack-ops per instruction, we don't need to special case LEAVE and can simply emit the composite operations. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nick Desaulniers Link: https://lkml.kernel.org/r/20210211173627.253273977@infradead.org commit 2ee0c363492f1acc1082125218e6a80c0d7d502b Author: Peter Zijlstra Date: Tue Feb 9 21:29:16 2021 +0100 objtool,x86: Rewrite LEA decode Current LEA decoding is a bunch of special cases, properly decode the instruction, with exception of full SIB and RIP-relative modes. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nick Desaulniers Link: https://lkml.kernel.org/r/20210211173627.143250641@infradead.org commit d473b18b2ef62563fb874f9cae6e123f99129e3f Author: Peter Zijlstra Date: Tue Feb 9 20:18:21 2021 +0100 objtool,x86: Renumber CFI_reg Make them match the instruction encoding numbering. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nick Desaulniers Link: https://lkml.kernel.org/r/20210211173627.033720313@infradead.org commit d54dba41999498b38a40940e1123019d50b26496 Author: Peter Zijlstra Date: Thu Feb 11 13:03:28 2021 +0100 objtool: Allow UNWIND_HINT to suppress dodgy stack modifications rewind_stack_do_exit() UNWIND_HINT_FUNC /* Prevent any naive code from trying to unwind to our caller. */ xorl %ebp, %ebp movq PER_CPU_VAR(cpu_current_top_of_stack), %rax leaq -PTREGS_SIZE(%rax), %rsp UNWIND_HINT_REGS call do_exit Does unspeakable things to the stack, which objtool currently fails to detect due to a limitation in instruction decoding. This will be rectified after which the above will result in: arch/x86/entry/entry_64.o: warning: objtool: .text+0xab: unsupported stack register modification Allow the UNWIND_HINT on the next instruction to suppress this, it will overwrite the state anyway. Suggested-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Josh Poimboeuf Tested-by: Nick Desaulniers Link: https://lkml.kernel.org/r/20210211173626.918498579@infradead.org commit 4117cebf1a9fcbf35b9aabf0e37b6c5eea296798 Author: Chengming Zhou Date: Wed Mar 3 11:46:59 2021 +0800 psi: Optimize task switch inside shared cgroups The commit 36b238d57172 ("psi: Optimize switching tasks inside shared cgroups") only update cgroups whose state actually changes during a task switch only in task preempt case, not in task sleep case. We actually don't need to clear and set TSK_ONCPU state for common cgroups of next and prev task in sleep case, that can save many psi_group_change especially when most activity comes from one leaf cgroup. sleep before: psi_dequeue() while ((group = iterate_groups(prev))) # all ancestors psi_group_change(prev, .clear=TSK_RUNNING|TSK_ONCPU) psi_task_switch() while ((group = iterate_groups(next))) # all ancestors psi_group_change(next, .set=TSK_ONCPU) sleep after: psi_dequeue() nop psi_task_switch() while ((group = iterate_groups(next))) # until (prev & next) psi_group_change(next, .set=TSK_ONCPU) while ((group = iterate_groups(prev))) # all ancestors psi_group_change(prev, .clear=common?TSK_RUNNING:TSK_RUNNING|TSK_ONCPU) When a voluntary sleep switches to another task, we remove one call of psi_group_change() for every common cgroup ancestor of the two tasks. Co-developed-by: Muchun Song Signed-off-by: Muchun Song Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20210303034659.91735-5-zhouchengming@bytedance.com commit fddc8bab531e217806b84906681324377d741c6c Author: Johannes Weiner Date: Wed Mar 3 11:46:58 2021 +0800 psi: Pressure states are unlikely Move the unlikely branches out of line. This eliminates undesirable jumps during wakeup and sleeps for workloads that aren't under any sort of resource pressure. Signed-off-by: Johannes Weiner Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20210303034659.91735-4-zhouchengming@bytedance.com commit 7fae6c8171d20ac55402930ee8ae760cf85dff7b Author: Chengming Zhou Date: Wed Mar 3 11:46:57 2021 +0800 psi: Use ONCPU state tracking machinery to detect reclaim Move the reclaim detection from the timer tick to the task state tracking machinery using the recently added ONCPU state. And we also add task psi_flags changes checking in the psi_task_switch() optimization to update the parents properly. In terms of performance and cost, this ONCPU task state tracking is not cheaper than previous timer tick in aggregate. But the code is simpler and shorter this way, so it's a maintainability win. And Johannes did some testing with perf bench, the performace and cost changes would be acceptable for real workloads. Thanks to Johannes Weiner for pointing out the psi_task_switch() optimization things and the clearer changelog. Co-developed-by: Muchun Song Signed-off-by: Muchun Song Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20210303034659.91735-3-zhouchengming@bytedance.com commit e7fcd762282332f765af2035a9568fb126fa3c01 Author: Chengming Zhou Date: Wed Mar 3 11:46:56 2021 +0800 psi: Add PSI_CPU_FULL state The FULL state doesn't exist for the CPU resource at the system level, but exist at the cgroup level, means all non-idle tasks in a cgroup are delayed on the CPU resource which used by others outside of the cgroup or throttled by the cgroup cpu.max configuration. Co-developed-by: Muchun Song Signed-off-by: Muchun Song Signed-off-by: Chengming Zhou Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Johannes Weiner Link: https://lkml.kernel.org/r/20210303034659.91735-2-zhouchengming@bytedance.com commit 585b6d2723dc927ebc4ad884c4e879e4da8bc21f Author: Barry Song Date: Wed Feb 24 16:09:44 2021 +1300 sched/topology: fix the issue groups don't span domain->span for NUMA diameter > 2 As long as NUMA diameter > 2, building sched_domain by sibling's child domain will definitely create a sched_domain with sched_group which will span out of the sched_domain: +------+ +------+ +-------+ +------+ | node | 12 |node | 20 | node | 12 |node | | 0 +---------+1 +--------+ 2 +-------+3 | +------+ +------+ +-------+ +------+ domain0 node0 node1 node2 node3 domain1 node0+1 node0+1 node2+3 node2+3 + domain2 node0+1+2 | group: node0+1 | group:node2+3 <-------------------+ when node2 is added into the domain2 of node0, kernel is using the child domain of node2's domain2, which is domain1(node2+3). Node 3 is outside the span of the domain including node0+1+2. This will make load_balance() run based on screwed avg_load and group_type in the sched_group spanning out of the sched_domain, and it also makes select_task_rq_fair() pick an idle CPU outside the sched_domain. Real servers which suffer from this problem include Kunpeng920 and 8-node Sun Fire X4600-M2, at least. Here we move to use the *child* domain of the *child* domain of node2's domain2 as the new added sched_group. At the same, we re-use the lower level sgc directly. +------+ +------+ +-------+ +------+ | node | 12 |node | 20 | node | 12 |node | | 0 +---------+1 +--------+ 2 +-------+3 | +------+ +------+ +-------+ +------+ domain0 node0 node1 +- node2 node3 | domain1 node0+1 node0+1 | node2+3 node2+3 | domain2 node0+1+2 | group: node0+1 | group:node2 <-------------------+ While the lower level sgc is re-used, this patch only changes the remote sched_groups for those sched_domains playing grandchild trick, therefore, sgc->next_update is still safe since it's only touched by CPUs that have the group span as local group. And sgc->imbalance is also safe because sd_parent remains the same in load_balance and LB only tries other CPUs from the local group. Moreover, since local groups are not touched, they are still getting roughly equal size in a TL. And should_we_balance() only matters with local groups, so the pull probability of those groups are still roughly equal. Tested by the below topology: qemu-system-aarch64 -M virt -nographic \ -smp cpus=8 \ -numa node,cpus=0-1,nodeid=0 \ -numa node,cpus=2-3,nodeid=1 \ -numa node,cpus=4-5,nodeid=2 \ -numa node,cpus=6-7,nodeid=3 \ -numa dist,src=0,dst=1,val=12 \ -numa dist,src=0,dst=2,val=20 \ -numa dist,src=0,dst=3,val=22 \ -numa dist,src=1,dst=2,val=22 \ -numa dist,src=2,dst=3,val=12 \ -numa dist,src=1,dst=3,val=24 \ -m 4G -cpu cortex-a57 -kernel arch/arm64/boot/Image w/o patch, we get lots of "groups don't span domain->span": [ 0.802139] CPU0 attaching sched-domain(s): [ 0.802193] domain-0: span=0-1 level=MC [ 0.802443] groups: 0:{ span=0 cap=1013 }, 1:{ span=1 cap=979 } [ 0.802693] domain-1: span=0-3 level=NUMA [ 0.802731] groups: 0:{ span=0-1 cap=1992 }, 2:{ span=2-3 cap=1943 } [ 0.802811] domain-2: span=0-5 level=NUMA [ 0.802829] groups: 0:{ span=0-3 cap=3935 }, 4:{ span=4-7 cap=3937 } [ 0.802881] ERROR: groups don't span domain->span [ 0.803058] domain-3: span=0-7 level=NUMA [ 0.803080] groups: 0:{ span=0-5 mask=0-1 cap=5843 }, 6:{ span=4-7 mask=6-7 cap=4077 } [ 0.804055] CPU1 attaching sched-domain(s): [ 0.804072] domain-0: span=0-1 level=MC [ 0.804096] groups: 1:{ span=1 cap=979 }, 0:{ span=0 cap=1013 } [ 0.804152] domain-1: span=0-3 level=NUMA [ 0.804170] groups: 0:{ span=0-1 cap=1992 }, 2:{ span=2-3 cap=1943 } [ 0.804219] domain-2: span=0-5 level=NUMA [ 0.804236] groups: 0:{ span=0-3 cap=3935 }, 4:{ span=4-7 cap=3937 } [ 0.804302] ERROR: groups don't span domain->span [ 0.804520] domain-3: span=0-7 level=NUMA [ 0.804546] groups: 0:{ span=0-5 mask=0-1 cap=5843 }, 6:{ span=4-7 mask=6-7 cap=4077 } [ 0.804677] CPU2 attaching sched-domain(s): [ 0.804687] domain-0: span=2-3 level=MC [ 0.804705] groups: 2:{ span=2 cap=934 }, 3:{ span=3 cap=1009 } [ 0.804754] domain-1: span=0-3 level=NUMA [ 0.804772] groups: 2:{ span=2-3 cap=1943 }, 0:{ span=0-1 cap=1992 } [ 0.804820] domain-2: span=0-5 level=NUMA [ 0.804836] groups: 2:{ span=0-3 mask=2-3 cap=3991 }, 4:{ span=0-1,4-7 mask=4-5 cap=5985 } [ 0.804944] ERROR: groups don't span domain->span [ 0.805108] domain-3: span=0-7 level=NUMA [ 0.805134] groups: 2:{ span=0-5 mask=2-3 cap=5899 }, 6:{ span=0-1,4-7 mask=6-7 cap=6125 } [ 0.805223] CPU3 attaching sched-domain(s): [ 0.805232] domain-0: span=2-3 level=MC [ 0.805249] groups: 3:{ span=3 cap=1009 }, 2:{ span=2 cap=934 } [ 0.805319] domain-1: span=0-3 level=NUMA [ 0.805336] groups: 2:{ span=2-3 cap=1943 }, 0:{ span=0-1 cap=1992 } [ 0.805383] domain-2: span=0-5 level=NUMA [ 0.805399] groups: 2:{ span=0-3 mask=2-3 cap=3991 }, 4:{ span=0-1,4-7 mask=4-5 cap=5985 } [ 0.805458] ERROR: groups don't span domain->span [ 0.805605] domain-3: span=0-7 level=NUMA [ 0.805626] groups: 2:{ span=0-5 mask=2-3 cap=5899 }, 6:{ span=0-1,4-7 mask=6-7 cap=6125 } [ 0.805712] CPU4 attaching sched-domain(s): [ 0.805721] domain-0: span=4-5 level=MC [ 0.805738] groups: 4:{ span=4 cap=984 }, 5:{ span=5 cap=924 } [ 0.805787] domain-1: span=4-7 level=NUMA [ 0.805803] groups: 4:{ span=4-5 cap=1908 }, 6:{ span=6-7 cap=2029 } [ 0.805851] domain-2: span=0-1,4-7 level=NUMA [ 0.805867] groups: 4:{ span=4-7 cap=3937 }, 0:{ span=0-3 cap=3935 } [ 0.805915] ERROR: groups don't span domain->span [ 0.806108] domain-3: span=0-7 level=NUMA [ 0.806130] groups: 4:{ span=0-1,4-7 mask=4-5 cap=5985 }, 2:{ span=0-3 mask=2-3 cap=3991 } [ 0.806214] CPU5 attaching sched-domain(s): [ 0.806222] domain-0: span=4-5 level=MC [ 0.806240] groups: 5:{ span=5 cap=924 }, 4:{ span=4 cap=984 } [ 0.806841] domain-1: span=4-7 level=NUMA [ 0.806866] groups: 4:{ span=4-5 cap=1908 }, 6:{ span=6-7 cap=2029 } [ 0.806934] domain-2: span=0-1,4-7 level=NUMA [ 0.806953] groups: 4:{ span=4-7 cap=3937 }, 0:{ span=0-3 cap=3935 } [ 0.807004] ERROR: groups don't span domain->span [ 0.807312] domain-3: span=0-7 level=NUMA [ 0.807386] groups: 4:{ span=0-1,4-7 mask=4-5 cap=5985 }, 2:{ span=0-3 mask=2-3 cap=3991 } [ 0.807686] CPU6 attaching sched-domain(s): [ 0.807710] domain-0: span=6-7 level=MC [ 0.807750] groups: 6:{ span=6 cap=1017 }, 7:{ span=7 cap=1012 } [ 0.807840] domain-1: span=4-7 level=NUMA [ 0.807870] groups: 6:{ span=6-7 cap=2029 }, 4:{ span=4-5 cap=1908 } [ 0.807952] domain-2: span=0-1,4-7 level=NUMA [ 0.807985] groups: 6:{ span=4-7 mask=6-7 cap=4077 }, 0:{ span=0-5 mask=0-1 cap=5843 } [ 0.808045] ERROR: groups don't span domain->span [ 0.808257] domain-3: span=0-7 level=NUMA [ 0.808571] groups: 6:{ span=0-1,4-7 mask=6-7 cap=6125 }, 2:{ span=0-5 mask=2-3 cap=5899 } [ 0.808848] CPU7 attaching sched-domain(s): [ 0.808860] domain-0: span=6-7 level=MC [ 0.808880] groups: 7:{ span=7 cap=1012 }, 6:{ span=6 cap=1017 } [ 0.808953] domain-1: span=4-7 level=NUMA [ 0.808974] groups: 6:{ span=6-7 cap=2029 }, 4:{ span=4-5 cap=1908 } [ 0.809034] domain-2: span=0-1,4-7 level=NUMA [ 0.809055] groups: 6:{ span=4-7 mask=6-7 cap=4077 }, 0:{ span=0-5 mask=0-1 cap=5843 } [ 0.809128] ERROR: groups don't span domain->span [ 0.810361] domain-3: span=0-7 level=NUMA [ 0.810400] groups: 6:{ span=0-1,4-7 mask=6-7 cap=5961 }, 2:{ span=0-5 mask=2-3 cap=5903 } w/ patch, we don't get "groups don't span domain->span" any more: [ 1.486271] CPU0 attaching sched-domain(s): [ 1.486820] domain-0: span=0-1 level=MC [ 1.500924] groups: 0:{ span=0 cap=980 }, 1:{ span=1 cap=994 } [ 1.515717] domain-1: span=0-3 level=NUMA [ 1.515903] groups: 0:{ span=0-1 cap=1974 }, 2:{ span=2-3 cap=1989 } [ 1.516989] domain-2: span=0-5 level=NUMA [ 1.517124] groups: 0:{ span=0-3 cap=3963 }, 4:{ span=4-5 cap=1949 } [ 1.517369] domain-3: span=0-7 level=NUMA [ 1.517423] groups: 0:{ span=0-5 mask=0-1 cap=5912 }, 6:{ span=4-7 mask=6-7 cap=4054 } [ 1.520027] CPU1 attaching sched-domain(s): [ 1.520097] domain-0: span=0-1 level=MC [ 1.520184] groups: 1:{ span=1 cap=994 }, 0:{ span=0 cap=980 } [ 1.520429] domain-1: span=0-3 level=NUMA [ 1.520487] groups: 0:{ span=0-1 cap=1974 }, 2:{ span=2-3 cap=1989 } [ 1.520687] domain-2: span=0-5 level=NUMA [ 1.520744] groups: 0:{ span=0-3 cap=3963 }, 4:{ span=4-5 cap=1949 } [ 1.520948] domain-3: span=0-7 level=NUMA [ 1.521038] groups: 0:{ span=0-5 mask=0-1 cap=5912 }, 6:{ span=4-7 mask=6-7 cap=4054 } [ 1.522068] CPU2 attaching sched-domain(s): [ 1.522348] domain-0: span=2-3 level=MC [ 1.522606] groups: 2:{ span=2 cap=1003 }, 3:{ span=3 cap=986 } [ 1.522832] domain-1: span=0-3 level=NUMA [ 1.522885] groups: 2:{ span=2-3 cap=1989 }, 0:{ span=0-1 cap=1974 } [ 1.523043] domain-2: span=0-5 level=NUMA [ 1.523092] groups: 2:{ span=0-3 mask=2-3 cap=4037 }, 4:{ span=4-5 cap=1949 } [ 1.523302] domain-3: span=0-7 level=NUMA [ 1.523352] groups: 2:{ span=0-5 mask=2-3 cap=5986 }, 6:{ span=0-1,4-7 mask=6-7 cap=6102 } [ 1.523748] CPU3 attaching sched-domain(s): [ 1.523774] domain-0: span=2-3 level=MC [ 1.523825] groups: 3:{ span=3 cap=986 }, 2:{ span=2 cap=1003 } [ 1.524009] domain-1: span=0-3 level=NUMA [ 1.524086] groups: 2:{ span=2-3 cap=1989 }, 0:{ span=0-1 cap=1974 } [ 1.524281] domain-2: span=0-5 level=NUMA [ 1.524331] groups: 2:{ span=0-3 mask=2-3 cap=4037 }, 4:{ span=4-5 cap=1949 } [ 1.524534] domain-3: span=0-7 level=NUMA [ 1.524586] groups: 2:{ span=0-5 mask=2-3 cap=5986 }, 6:{ span=0-1,4-7 mask=6-7 cap=6102 } [ 1.524847] CPU4 attaching sched-domain(s): [ 1.524873] domain-0: span=4-5 level=MC [ 1.524954] groups: 4:{ span=4 cap=958 }, 5:{ span=5 cap=991 } [ 1.525105] domain-1: span=4-7 level=NUMA [ 1.525153] groups: 4:{ span=4-5 cap=1949 }, 6:{ span=6-7 cap=2006 } [ 1.525368] domain-2: span=0-1,4-7 level=NUMA [ 1.525428] groups: 4:{ span=4-7 cap=3955 }, 0:{ span=0-1 cap=1974 } [ 1.532726] domain-3: span=0-7 level=NUMA [ 1.532811] groups: 4:{ span=0-1,4-7 mask=4-5 cap=6003 }, 2:{ span=0-3 mask=2-3 cap=4037 } [ 1.534125] CPU5 attaching sched-domain(s): [ 1.534159] domain-0: span=4-5 level=MC [ 1.534303] groups: 5:{ span=5 cap=991 }, 4:{ span=4 cap=958 } [ 1.534490] domain-1: span=4-7 level=NUMA [ 1.534572] groups: 4:{ span=4-5 cap=1949 }, 6:{ span=6-7 cap=2006 } [ 1.534734] domain-2: span=0-1,4-7 level=NUMA [ 1.534783] groups: 4:{ span=4-7 cap=3955 }, 0:{ span=0-1 cap=1974 } [ 1.536057] domain-3: span=0-7 level=NUMA [ 1.536430] groups: 4:{ span=0-1,4-7 mask=4-5 cap=6003 }, 2:{ span=0-3 mask=2-3 cap=3896 } [ 1.536815] CPU6 attaching sched-domain(s): [ 1.536846] domain-0: span=6-7 level=MC [ 1.536934] groups: 6:{ span=6 cap=1005 }, 7:{ span=7 cap=1001 } [ 1.537144] domain-1: span=4-7 level=NUMA [ 1.537262] groups: 6:{ span=6-7 cap=2006 }, 4:{ span=4-5 cap=1949 } [ 1.537553] domain-2: span=0-1,4-7 level=NUMA [ 1.537613] groups: 6:{ span=4-7 mask=6-7 cap=4054 }, 0:{ span=0-1 cap=1805 } [ 1.537872] domain-3: span=0-7 level=NUMA [ 1.537998] groups: 6:{ span=0-1,4-7 mask=6-7 cap=6102 }, 2:{ span=0-5 mask=2-3 cap=5845 } [ 1.538448] CPU7 attaching sched-domain(s): [ 1.538505] domain-0: span=6-7 level=MC [ 1.538586] groups: 7:{ span=7 cap=1001 }, 6:{ span=6 cap=1005 } [ 1.538746] domain-1: span=4-7 level=NUMA [ 1.538798] groups: 6:{ span=6-7 cap=2006 }, 4:{ span=4-5 cap=1949 } [ 1.539048] domain-2: span=0-1,4-7 level=NUMA [ 1.539111] groups: 6:{ span=4-7 mask=6-7 cap=4054 }, 0:{ span=0-1 cap=1805 } [ 1.539571] domain-3: span=0-7 level=NUMA [ 1.539610] groups: 6:{ span=0-1,4-7 mask=6-7 cap=6102 }, 2:{ span=0-5 mask=2-3 cap=5845 } Signed-off-by: Barry Song Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Tested-by: Meelis Roos Link: https://lkml.kernel.org/r/20210224030944.15232-1-song.bao.hua@hisilicon.com commit 453e41085183980087f8a80dada523caf1131c3c Author: Vincent Donnefort Date: Tue Feb 16 10:35:06 2021 +0000 cpu/hotplug: Add cpuhp_invoke_callback_range() Factorizing and unifying cpuhp callback range invocations, especially for the hotunplug path, where two different ways of decrementing were used. The first one, decrements before the callback is called: cpuhp_thread_fun() state = st->state; st->state--; cpuhp_invoke_callback(state); The second one, after: take_down_cpu()|cpuhp_down_callbacks() cpuhp_invoke_callback(st->state); st->state--; This is problematic for rolling back the steps in case of error, as depending on the decrement, the rollback will start from N or N-1. It also makes tracing inconsistent, between steps run in the cpuhp thread and the others. Additionally, avoid useless cpuhp_thread_fun() loops by skipping empty steps. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20210216103506.416286-4-vincent.donnefort@arm.com commit 62f250694092dd5fef9900dc3126f07110bf9d48 Author: Vincent Donnefort Date: Tue Feb 16 10:35:05 2021 +0000 cpu/hotplug: CPUHP_BRINGUP_CPU failure exception The atomic states (between CPUHP_AP_IDLE_DEAD and CPUHP_AP_ONLINE) are triggered by the CPUHP_BRINGUP_CPU step. If the latter fails, no atomic state can be rolled back. DEAD callbacks too can't fail and disallow recovery. As a consequence, during hotunplug, the fail injection interface should prohibit all states from CPUHP_BRINGUP_CPU to CPUHP_ONLINE. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20210216103506.416286-3-vincent.donnefort@arm.com commit 3ae70c251f344976428d1f6ee61ea7b4e170fec3 Author: Vincent Donnefort Date: Tue Feb 16 10:35:04 2021 +0000 cpu/hotplug: Allowing to reset fail injection Currently, the only way of resetting the fail injection is to trigger a hotplug, hotunplug or both. This is rather annoying for testing and, as the default value for this file is -1, it seems pretty natural to let a user write it. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: https://lkml.kernel.org/r/20210216103506.416286-2-vincent.donnefort@arm.com commit b89997aa88f0b07d8a6414c908af75062103b8c9 Author: Vincent Donnefort Date: Thu Feb 25 16:58:20 2021 +0000 sched/pelt: Fix task util_est update filtering Being called for each dequeue, util_est reduces the number of its updates by filtering out when the EWMA signal is different from the task util_avg by less than 1%. It is a problem for a sudden util_avg ramp-up. Due to the decay from a previous high util_avg, EWMA might now be close enough to the new util_avg. No update would then happen while it would leave ue.enqueued with an out-of-date value. Taking into consideration the two util_est members, EWMA and enqueued for the filtering, ensures, for both, an up-to-date value. This is for now an issue only for the trace probe that might return the stale value. Functional-wise, it isn't a problem, as the value is always accessed through max(enqueued, ewma). This problem has been observed using LISA's UtilConvergence:test_means on the sd845c board. No regression observed with Hackbench on sd845c and Perf-bench sched pipe on hikey/hikey960. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Dietmar Eggemann Reviewed-by: Vincent Guittot Link: https://lkml.kernel.org/r/20210225165820.1377125-1-vincent.donnefort@arm.com commit 39a2a6eb5c9b66ea7c8055026303b3aa681b49a5 Author: Valentin Schneider Date: Thu Feb 25 17:56:56 2021 +0000 sched/fair: Fix shift-out-of-bounds in load_balance() Syzbot reported a handful of occurrences where an sd->nr_balance_failed can grow to much higher values than one would expect. A successful load_balance() resets it to 0; a failed one increments it. Once it gets to sd->cache_nice_tries + 3, this *should* trigger an active balance, which will either set it to sd->cache_nice_tries+1 or reset it to 0. However, in case the to-be-active-balanced task is not allowed to run on env->dst_cpu, then the increment is done without any further modification. This could then be repeated ad nauseam, and would explain the absurdly high values reported by syzbot (86, 149). VincentG noted there is value in letting sd->cache_nice_tries grow, so the shift itself should be fixed. That means preventing: """ If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined. """ Thus we need to cap the shift exponent to BITS_PER_TYPE(typeof(lefthand)) - 1. I had a look around for other similar cases via coccinelle: @expr@ position pos; expression E1; expression E2; @@ ( E1 >> E2@pos | E1 >> E2@pos ) @cst depends on expr@ position pos; expression expr.E1; constant cst; @@ ( E1 >> cst@pos | E1 << cst@pos ) @script:python depends on !cst@ pos << expr.pos; exp << expr.E2; @@ # Dirty hack to ignore constexpr if exp.upper() != exp: coccilib.report.print_report(pos[0], "Possible UB shift here") The only other match in kernel/sched is rq_clock_thermal() which employs sched_thermal_decay_shift, and that exponent is already capped to 10, so that one is fine. Fixes: 5a7f55590467 ("sched/fair: Relax constraint on task's load during load balance") Reported-by: syzbot+d7581744d5fd27c9fbe1@syzkaller.appspotmail.com Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Link: http://lore.kernel.org/r/000000000000ffac1205b9a2112f@google.com commit 736cc6b31102236a55470c72523ed0a65eb3f804 Author: Vincent Donnefort Date: Thu Feb 25 08:36:12 2021 +0000 sched/fair: use lsub_positive in cpu_util_next() The sub_positive local version is saving an explicit load-store and is enough for the cpu_util_next() usage. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Quentin Perret Reviewed-by: Dietmar Eggemann Link: https://lkml.kernel.org/r/20210225083612.1113823-3-vincent.donnefort@arm.com commit 0372e1cf70c28de6babcba38ef97b6ae3400b101 Author: Vincent Donnefort Date: Thu Feb 25 08:36:11 2021 +0000 sched/fair: Fix task utilization accountability in compute_energy() find_energy_efficient_cpu() (feec()) computes for each perf_domain (pd) an energy delta as follows: feec(task) for_each_pd base_energy = compute_energy(task, -1, pd) -> for_each_cpu(pd) -> cpu_util_next(cpu, task, -1) energy_delta = compute_energy(task, dst_cpu, pd) -> for_each_cpu(pd) -> cpu_util_next(cpu, task, dst_cpu) energy_delta -= base_energy Then it picks the best CPU as being the one that minimizes energy_delta. cpu_util_next() estimates the CPU utilization that would happen if the task was placed on dst_cpu as follows: max(cpu_util + task_util, cpu_util_est + _task_util_est) The task contribution to the energy delta can then be either: (1) _task_util_est, on a mostly idle CPU, where cpu_util is close to 0 and _task_util_est > cpu_util. (2) task_util, on a mostly busy CPU, where cpu_util > _task_util_est. (cpu_util_est doesn't appear here. It is 0 when a CPU is idle and otherwise must be small enough so that feec() takes the CPU as a potential target for the task placement) This is problematic for feec(), as cpu_util_next() might give an unfair advantage to a CPU which is mostly busy (2) compared to one which is mostly idle (1). _task_util_est being always bigger than task_util in feec() (as the task is waking up), the task contribution to the energy might look smaller on certain CPUs (2) and this breaks the energy comparison. This issue is, moreover, not sporadic. By starving idle CPUs, it keeps their cpu_util < _task_util_est (1) while others will maintain cpu_util > _task_util_est (2). Fix this problem by always using max(task_util, _task_util_est) as a task contribution to the energy (ENERGY_UTIL). The new estimated CPU utilization for the energy would then be: max(cpu_util, cpu_util_est) + max(task_util, _task_util_est) compute_energy() still needs to know which OPP would be selected if the task would be migrated in the perf_domain (FREQUENCY_UTIL). Hence, cpu_util_next() is still used to estimate the maximum util within the pd. Signed-off-by: Vincent Donnefort Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Quentin Perret Reviewed-by: Dietmar Eggemann Link: https://lkml.kernel.org/r/20210225083612.1113823-2-vincent.donnefort@arm.com commit 39b6a429c30482c349f1bb3746470fe473cbdb0f Author: Vincent Guittot Date: Wed Feb 24 14:30:07 2021 +0100 sched/fair: Reduce the window for duplicated update Start to update last_blocked_load_update_tick to reduce the possibility of another cpu starting the update one more time Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210224133007.28644-8-vincent.guittot@linaro.org commit c6f886546cb8a38617cdbe755fe50d3acd2463e4 Author: Vincent Guittot Date: Wed Feb 24 14:30:06 2021 +0100 sched/fair: Trigger the update of blocked load on newly idle cpu Instead of waking up a random and already idle CPU, we can take advantage of this_cpu being about to enter idle to run the ILB and update the blocked load. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210224133007.28644-7-vincent.guittot@linaro.org commit 6553fc18179113a11835d5fde1735259f8943a55 Author: Vincent Guittot Date: Wed Feb 24 14:30:05 2021 +0100 sched/fair: Reorder newidle_balance pulled_task tests Reorder the tests and skip useless ones when no load balance has been performed and rq lock has not been released. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210224133007.28644-6-vincent.guittot@linaro.org commit 7a82e5f52a3506bc35a4dc04d53ad2c9daf82e7f Author: Vincent Guittot Date: Wed Feb 24 14:30:04 2021 +0100 sched/fair: Merge for each idle cpu loop of ILB Remove the specific case for handling this_cpu outside for_each_cpu() loop when running ILB. Instead we use for_each_cpu_wrap() and start with the next cpu after this_cpu so we will continue to finish with this_cpu. update_nohz_stats() is now used for this_cpu too and will prevents unnecessary update. We don't need a special case for handling the update of nohz.next_balance for this_cpu anymore because it is now handled by the loop like others. Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210224133007.28644-5-vincent.guittot@linaro.org commit 64f84f273592d17dcdca20244168ad9f525a39c3 Author: Vincent Guittot Date: Wed Feb 24 14:30:03 2021 +0100 sched/fair: Remove unused parameter of update_nohz_stats idle load balance is the only user of update_nohz_stats and doesn't use force parameter. Remove it Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210224133007.28644-4-vincent.guittot@linaro.org commit ab2dde5e98db23387147fb4e7a52b6cf8141cdb3 Author: Vincent Guittot Date: Wed Feb 24 14:30:02 2021 +0100 sched/fair: Remove unused return of _nohz_idle_balance The return of _nohz_idle_balance() is not used anymore so we can remove it Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210224133007.28644-3-vincent.guittot@linaro.org commit 0826530de3cbdc89e60a89e86def94a5f0fc81ca Author: Vincent Guittot Date: Wed Feb 24 14:30:01 2021 +0100 sched/fair: Remove update of blocked load from newidle_balance newidle_balance runs with both preempt and irq disabled which prevent local irq to run during this period. The duration for updating the blocked load of CPUs varies according to the number of CPU cgroups with non-decayed load and extends this critical period to an uncontrolled level. Remove the update from newidle_balance and trigger a normal ILB that will take care of the update instead. This reduces the IRQ latency from O(nr_cgroups * nr_nohz_cpus) to O(nr_cgroups). Signed-off-by: Vincent Guittot Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Reviewed-by: Valentin Schneider Link: https://lkml.kernel.org/r/20210224133007.28644-2-vincent.guittot@linaro.org commit 183f47fcaa54a5ffe671d990186d330ac8c63b10 Author: Sebastian Andrzej Siewior Date: Thu Feb 18 18:31:24 2021 +0100 kcov: Remove kcov include from sched.h and move it to its users. The recent addition of in_serving_softirq() to kconv.h results in compile failure on PREEMPT_RT because it requires task_struct::softirq_disable_cnt. This is not available if kconv.h is included from sched.h. It is not needed to include kconv.h from sched.h. All but the net/ user already include the kconv header file. Move the include of the kconv.h header from sched.h it its users. Additionally include sched.h from kconv.h to ensure that everything task_struct related is available. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar Acked-by: Johannes Berg Acked-by: Andrey Konovalov Link: https://lkml.kernel.org/r/20210218173124.iy5iyqv3a4oia4vv@linutronix.de commit e140749c9f194d65f5984a5941e46758377c93c0 Author: Valentin Schneider Date: Thu Feb 25 10:22:30 2021 +0100 sched: Simplify migration_cpu_stop() Since, when ->stop_pending, only the stopper can uninstall p->migration_pending. This could simplify a few ifs, because: (pending != NULL) => (pending == p->migration_pending) Also, the fatty comment above affine_move_task() probably needs a bit of gardening. Signed-off-by: Valentin Schneider Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Ingo Molnar commit e93d757c3f33c8a09f4aae579da4dc4500707471 Author: Justin Ernst Date: Fri Feb 19 12:28:52 2021 -0600 x86/platform/uv: Fix indentation warning in Documentation/ABI/testing/sysfs-firmware-sgi_uv Commit c9624cb7db1c ("x86/platform/uv: Update sysfs documentation") misplaced the first line of a codeblock section, causing the reported warning message: Documentation/ABI/testing/sysfs-firmware-sgi_uv:2: WARNING: Unexpected indentation. Move the misplaced line below the required blank line to remove the warning message. Fixes: c9624cb7db1c ("x86/platform/uv: Update sysfs documentation") Reported-by: Stephen Rothwell Signed-off-by: Justin Ernst Signed-off-by: Borislav Petkov Acked-by: Mike Travis Link: https://lkml.kernel.org/r/20210219182852.385297-1-justin.ernst@hpe.com commit f3db3365c069c2a8505cdee8033fe3d22d2fe6c0 Author: Borislav Petkov Date: Tue Feb 23 12:03:19 2021 +0100 x86/sev-es: Remove subtraction of res variable vc_decode_insn() calls copy_from_kernel_nofault() by way of vc_fetch_insn_kernel() to fetch 15 bytes max of opcodes to decode. copy_from_kernel_nofault() returns negative on error and 0 on success. The error case is handled by returning ES_EXCEPTION. In the success case, the ret variable which contains the return value is 0 so there's no need to subtract it from MAX_INSN_SIZE when initializing the insn buffer for further decoding. Remove it. No functional changes. Signed-off-by: Borislav Petkov Reviewed-by: Joerg Roedel Link: https://lkml.kernel.org/r/20210223111130.16201-1-bp@alien8.de commit 70c9d959226b7c5c48c119e2c1cfc1424f87b023 Author: Jiri Slaby Date: Wed Mar 3 07:43:57 2021 +0100 x86/vdso: Use proper modifier for len's format specifier in extract() Commit 8382c668ce4f ("x86/vdso: Add support for exception fixup in vDSO functions") prints length "len" which is size_t. Compilers now complain when building on a 32-bit host: HOSTCC arch/x86/entry/vdso/vdso2c ... In file included from arch/x86/entry/vdso/vdso2c.c:162: arch/x86/entry/vdso/vdso2c.h: In function 'extract64': arch/x86/entry/vdso/vdso2c.h:38:52: warning: format '%lu' expects argument of \ type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} So use proper modifier (%zu) for size_t. [ bp: Massage commit message. ] Fixes: 8382c668ce4f ("x86/vdso: Add support for exception fixup in vDSO functions") Signed-off-by: Jiri Slaby Signed-off-by: Borislav Petkov Acked-by: Jarkko Sakkinen Link: https://lkml.kernel.org/r/20210303064357.17056-1-jslaby@suse.cz commit aebf0a11a8c1fb6444d1365db97f90672199a867 Author: Maximilian Luz Date: Fri Feb 12 12:54:39 2021 +0100 platform/surface: aggregator_registry: Add HID subsystem devices Add HID subsystem (TC=0x15) devices. These devices need to be registered for 7th-generation Surface models. On previous generations, these devices are either provided as platform devices via ACPI (Surface Laptop 1 and 2) or implemented as standard USB device. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210212115439.1525216-7-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit b78b4982d7637ededbc40b5f4aa59394acee8a60 Author: Maximilian Luz Date: Thu Feb 11 21:17:03 2021 +0100 platform/surface: Add platform profile driver Add a driver to provide platform profile support on 5th- and later generation Microsoft Surface devices with a Surface System Aggregator Module. On those devices, the platform profile can be used to influence cooling behavior and power consumption. For example, the default 'quiet' profile limits fan noise and in turn sacrifices performance of the discrete GPU found on Surface Books. Its full performance can only be unlocked on the 'performance' profile. Signed-off-by: Maximilian Luz Reviewed-by: Hans de Goede Link: https://lore.kernel.org/r/20210211201703.658240-5-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit f68aaf85e08e75a0588c14e9936dfd8edf098e89 Author: Maximilian Luz Date: Fri Feb 12 12:54:38 2021 +0100 platform/surface: aggregator_registry: Add DTX device Add the detachment system (DTX) SSAM device for the Surface Book 3. This device is accessible under the base (TC=0x11) subsystem. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210212115439.1525216-6-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 7b5ee8d095ef27bcb90d8e405c5c7568481ce220 Author: Maximilian Luz Date: Fri Feb 12 12:54:37 2021 +0100 platform/surface: aggregator_registry: Add platform profile device Add the SSAM platform profile device to the SSAM device registry. This device is accessible under the thermal subsystem (TC=0x03) and needs to be registered for all Surface models. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210212115439.1525216-5-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 17590927f7684b297a64ac64b332dd589d64d5a5 Author: Maximilian Luz Date: Fri Feb 12 12:54:36 2021 +0100 platform/surface: aggregator_registry: Add battery subsystem devices Add battery subsystem (TC=0x02) devices (battery and AC) to the SSAM device registry. These devices need to be registered for 7th-generation Surface models. On 5th- and 6th-generation models, these devices are handled via the standard ACPI battery/AC interface, which in turn accesses the same SSAM interface via the Surface ACPI Notify (SAN) driver. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210212115439.1525216-4-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 797e78564634275ed4fe6b3f586c4b96eb1d86bc Author: Maximilian Luz Date: Fri Feb 12 12:54:35 2021 +0100 platform/surface: aggregator_registry: Add base device hub The Surface Book 3 has a detachable base part. While the top part (so-called clipboard) contains the CPU, touchscreen, and primary battery, the base contains, among other things, a keyboard, touchpad, and secondary battery. Those devices do not react well to being accessed when the base part is detached and should thus be removed and added in sync with the base. To facilitate this, we introduce a virtual base device hub, which automatically removes or adds the devices registered under it. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210212115439.1525216-3-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit fc622b3d36e6d91330fb21506b9ad1e3206a4dde Author: Maximilian Luz Date: Fri Feb 12 12:54:34 2021 +0100 platform/surface: Set up Surface Aggregator device registry The Surface System Aggregator Module (SSAM) subsystem provides various functionalities, which are separated by spreading them across multiple devices and corresponding drivers. Parts of that functionality / some of those devices, however, can (as far as we currently know) not be auto-detected by conventional means. While older (specifically 5th- and 6th-)generation models do advertise most of their functionality via standard platform devices in ACPI, newer generations do not. As we are currently also not aware of any feasible way to query said functionalities dynamically, this poses a problem. There is, however, a device in ACPI that seems to be used by Windows for identifying different Surface models: The Windows Surface Integration Device (WSID). This device seems to have a HID corresponding to the overall set of functionalities SSAM provides for the associated model. This commit introduces a registry providing non-detectable device information via software nodes. In addition, a SSAM platform hub driver is introduced, which takes care of creating and managing the SSAM devices specified in this registry. This approach allows for a hierarchical setup akin to ACPI and is easily extendable, e.g. via firmware node properties. Note that this commit only provides the basis for the platform hub and registry, and does not add any content to it. The registry will be expanded in subsequent commits. Signed-off-by: Maximilian Luz Link: https://lore.kernel.org/r/20210212115439.1525216-2-luzmaximilian@gmail.com Signed-off-by: Hans de Goede commit 04100459caa98450cc0f4375f73d9643a31f454f Author: Christoph Hellwig Date: Mon Mar 1 08:38:32 2021 +0100 MIPS: force CONFIG_PCI to on for IP27 and IP30 These are PCI based systems, so not enabling the support is rather pointless. Additionally the random configѕ generated by the build bot for IP27 and IP30 builds without PCI fail to buіld. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer commit bb28b9f70f20f9a0447d96446353ed2841861234 Author: Christoph Hellwig Date: Mon Mar 1 08:38:31 2021 +0100 MIPS: bmips: include for phys_to_dma Ensure this file has a prototype for phys_to_dma and dma_to_phys. Signed-off-by: Christoph Hellwig Acked-by: Florian Fainelli Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Bogendoerfer commit 81e1d6510dc93c7bf3a129a563ac204897b0bd9e Author: Christoph Hellwig Date: Mon Mar 1 08:38:30 2021 +0100 MIPS: pci-ar2315: include for phys_to_dma Ensure this file has a prototype for phys_to_dma and dma_to_phys. Signed-off-by: Christoph Hellwig Signed-off-by: Thomas Bogendoerfer commit 1f4e5f0341d831e50a91b4db6a5cb50a8ca76d97 Author: Yang Li Date: Wed Feb 24 16:10:06 2021 +0800 mips: cavium: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Fix the following coccicheck warning: ./arch/mips/cavium-octeon/oct_ilm.c:65:0-23: WARNING: reset_statistics_ops should be defined with DEFINE_DEBUGFS_ATTRIBUTE Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Thomas Bogendoerfer commit bab1dde31db5413d4c75c99cf3f08c4a2e1c1b9d Author: Alexander Lobakin Date: Thu Feb 25 05:57:00 2021 -0800 MIPS: enable GENERIC_FIND_FIRST_BIT MIPS doesn't have architecture-optimized bitsearching functions, like find_{first,next}_bit() etc. It's absolutely harmless to enable GENERIC_FIND_FIRST_BIT as this functionality is not new at all and well-tested. It provides more optimized code and saves some .text memory (32 R2): add/remove: 4/1 grow/shrink: 1/53 up/down: 216/-372 (-156) Users of for_each_set_bit() like hotpath gic_handle_shared_int() will also benefit from this. Suggested-by: Yury Norov Signed-off-by: Alexander Lobakin Signed-off-by: Yury Norov Signed-off-by: Thomas Bogendoerfer commit 5a4fa44f5e1bca67577de631f94d76448f60f4c6 Author: Jason A. Donenfeld Date: Sun Feb 28 00:02:36 2021 +0100 MIPS: select CPU_MIPS64 for remaining MIPS64 CPUs CPU_MIPS64 is supposed to be selected for CPUs that implement a revision of the MIPS64 ISA. While it contains the generic ones, it forgot about Octeon and Loongson in its list, which are indeed MIPS64 processors. This commit adds these missing CPUs to the auto-selection list. Cc: Maciej W. Rozycki Cc: Thomas Bogendoerfer Cc: Ralf Baechle Cc: George Cherian Cc: Huacai Chen Cc: Jiaxun Yang Signed-off-by: Jason A. Donenfeld Signed-off-by: Thomas Bogendoerfer commit 682629839adc9e427cd41ac3506a24ed3a4dc0a8 Author: Adrian Schmutzler Date: Thu Feb 25 17:07:13 2021 +0100 mips: octeon: Add Ubiquiti E300 board This board is used in Ubiquiti EdgeRouter 4. Signed-off-by: Adrian Schmutzler Signed-off-by: Thomas Bogendoerfer commit 4f62d0a22fcabaa4477c6b8d7bf2860d819959cc Author: Álvaro Fernández Rojas Date: Wed Feb 24 08:33:36 2021 +0100 mips: smp-bmips: fix CPU mappings When booting bmips with SMP enabled on a BCM6358 running on CPU #1 instead of CPU #0, the current CPU mapping code produces the following: - smp_processor_id(): 0 - cpu_logical_map(0): 1 - cpu_number_map(0): 1 This is because SMP isn't supported on BCM6358 since it has a shared TLB, so it is disabled and max_cpus is decreased from 2 to 1. Signed-off-by: Álvaro Fernández Rojas Reviewed-by: Florian Fainelli Signed-off-by: Thomas Bogendoerfer commit ee5e12e78b7930f797765cd809d7325c1b4b9dcb Author: Lukas Bulwahn Date: Mon Feb 22 17:19:05 2021 +0100 MIPS: SGI-IP27: fix spelling in Copyright This is a Copyright line, and just a typo slipped through. Signed-off-by: Lukas Bulwahn Reviewed-by: Huacai Chen Reviewed-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer commit 46060be6d8400ac0e1965b90a29fde96981a2ba7 Author: Tobias Schramm Date: Thu Feb 18 12:20:01 2021 +0100 clk: sunxi-ng: v3s: use sigma-delta modulation for audio-pll Previously it was not possible to achieve clock rates of 24.576MHz and 22.5792MHz, which are commonly required core clocks for the i2s peripheral of v3s based SoCs. Add support for those clock rates through the audio pll's sigma-delta modulator. Signed-off-by: Tobias Schramm Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210218112001.479018-2-t.schramm@manjaro.org commit 7e206078c970ba11bf531eb34ff55de8ba9bbb23 Author: Pascal Roeleven Date: Wed Feb 24 11:52:40 2021 +0100 ARM: dts: sun4i: Add support for Topwise A721 tablet The Topwise A721/LY-F1 tablet is a tablet sold around 2012 under different brands. The mainboard mentions A721 clearly, so this tablet is best known under this name. Signed-off-by: Pascal Roeleven Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210224105240.47754-3-dev@pascalroeleven.nl commit db54ca6b6e6d4a92588a12740e59973b36eea3dc Author: Pascal Roeleven Date: Wed Feb 24 11:52:39 2021 +0100 dt-bindings: arm: Add Topwise A721 Add the bindings for Topwise A721 tablet Signed-off-by: Pascal Roeleven Acked-by: Rob Herring Signed-off-by: Maxime Ripard Link: https://lore.kernel.org/r/20210224105240.47754-2-dev@pascalroeleven.nl commit 189bef235dd3202c612920cd95afc126d12f36ad Author: Samuel Holland Date: Sun Jan 17 23:50:40 2021 -0600 arm64: dts: allwinner: Move wakeup-capable IRQs to r_intc All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. In addition to the external NMI input, which is already routed through r_intc, these include PIO and R_PIO (gpio-keys), the LRADC, and the RTC. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Signed-off-by: Chen-Yu Tsai commit 73088dfee635e2a5cf2230464a75b5f106da531c Author: Samuel Holland Date: Sun Jan 17 23:50:39 2021 -0600 arm64: dts: allwinner: Use the new r_intc binding The binding of R_INTC was updated to allow specifying interrupts other than the external NMI, since routing those interrupts through the R_INTC driver allows using them for wakeup. Update the device trees to use the new binding. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Signed-off-by: Chen-Yu Tsai commit 994e5818392c814c512d94edef036b4c0c08337d Author: Samuel Holland Date: Sun Jan 17 23:50:38 2021 -0600 ARM: dts: sunxi: Move wakeup-capable IRQs to r_intc All IRQs that can be used to wake up the system must be routed through r_intc, so they are visible to firmware while the system is suspended. In addition to the external NMI input, which is already routed through r_intc, these include PIO and R_PIO (gpio-keys), the LRADC, and the RTC. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Signed-off-by: Chen-Yu Tsai commit 3fb01dedfe446789f4686e57ef1b58acbdb3ec99 Author: Samuel Holland Date: Sun Jan 17 23:50:37 2021 -0600 ARM: dts: sunxi: h3/h5: Add r_intc node The H3 and H5 SoCs have an additional interrupt controller in the RTC power domain that can be used to enable wakeup for certain IRQs. Add a node for it. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Signed-off-by: Chen-Yu Tsai commit 9fdef3c3d8c20f9a502905f5d1be59c88b874422 Author: Samuel Holland Date: Sun Jan 17 23:50:36 2021 -0600 ARM: dts: sunxi: Use the new r_intc binding The binding of R_INTC was updated to allow specifying interrupts other than the external NMI, since routing those interrupts through the R_INTC driver allows using them for wakeup. Update the device trees to use the new binding. Acked-by: Maxime Ripard Signed-off-by: Samuel Holland Signed-off-by: Chen-Yu Tsai commit 256becd450172eec74566f1aa7819ce80181d7e1 Author: Xuesen Huang Date: Fri Mar 5 20:33:47 2021 +0800 selftests, bpf: Extend test_tc_tunnel test with vxlan Add BPF_F_ADJ_ROOM_ENCAP_L2_ETH flag to the existing tests which encapsulates the ethernet as the inner l2 header. Update a vxlan encapsulation test case. Signed-off-by: Xuesen Huang Signed-off-by: Li Wang Signed-off-by: Daniel Borkmann Acked-by: Willem de Bruijn Link: https://lore.kernel.org/bpf/20210305123347.15311-1-hxseverything@gmail.com commit 37ba52c6bd13a31fa35008dc0b5790a1b57de7eb Author: Holger Hoffstätte Date: Fri Mar 5 15:23:18 2021 +0100 drm/amdgpu/display: use GFP_ATOMIC in dcn21_validate_bandwidth_fp() After fixing nested FPU contexts caused by 41401ac67791 we're still seeing complaints about spurious kernel_fpu_end(). As it turns out this was already fixed for dcn20 in commit f41ed88cbd ("drm/amdgpu/display: use GFP_ATOMIC in dcn20_validate_bandwidth_internal") but never moved forward to dcn21. Signed-off-by: Holger Hoffstätte Signed-off-by: Alex Deucher commit b42c68fac891d8c23c81cdfd66f82864c2353d7b Author: Holger Hoffstätte Date: Fri Mar 5 12:39:21 2021 +0100 drm/amd/display: Fix nested FPU context in dcn21_validate_bandwidth() Commit 41401ac67791 added FPU wrappers to dcn21_validate_bandwidth(), which was correct. Unfortunately a nested function alredy contained DC_FP_START()/DC_FP_END() calls, which results in nested FPU context enter/exit and complaints by kernel_fpu_begin_mask(). This can be observed e.g. with 5.10.20, which backported 41401ac67791 and now emits the following warning on boot: WARNING: CPU: 6 PID: 858 at arch/x86/kernel/fpu/core.c:129 kernel_fpu_begin_mask+0xa5/0xc0 Call Trace: dcn21_calculate_wm+0x47/0xa90 [amdgpu] dcn21_validate_bandwidth_fp+0x15d/0x2b0 [amdgpu] dcn21_validate_bandwidth+0x29/0x40 [amdgpu] dc_validate_global_state+0x3c7/0x4c0 [amdgpu] The warning is emitted due to the additional DC_FP_START/END calls in patch_bounding_box(), which is inlined into dcn21_calculate_wm(), its only caller. Removing the calls brings the code in line with dcn20 and makes the warning disappear. Fixes: 41401ac67791 ("drm/amd/display: Add FPU wrappers to dcn21_validate_bandwidth()") Signed-off-by: Holger Hoffstätte Signed-off-by: Alex Deucher commit 96e27e8d919e52f30ea6b717e3cb70faa0b102cd Author: Gustavo A. R. Silva Date: Wed Mar 3 13:04:58 2021 -0600 drm/radeon/si_dpm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE 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]. Refactor the code according to the use of a flexible-array member in struct SISLANDS_SMC_SWSTATE, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warnings: drivers/gpu/drm/radeon/si_dpm.c: In function ‘si_convert_power_state_to_smc’: drivers/gpu/drm/radeon/si_dpm.c:2350:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2350 | smc_state->levels[i].dpm2.MaxPS = (u8)((SISLANDS_DPM2_MAX_PULSE_SKIP * (max_sclk - min_sclk)) / max_sclk); | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/si_dpm.c:2351:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2351 | smc_state->levels[i].dpm2.NearTDPDec = SISLANDS_DPM2_NEAR_TDP_DEC; | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/si_dpm.c:2352:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2352 | smc_state->levels[i].dpm2.AboveSafeInc = SISLANDS_DPM2_ABOVE_SAFE_INC; | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/si_dpm.c:2353:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2353 | smc_state->levels[i].dpm2.BelowSafeInc = SISLANDS_DPM2_BELOW_SAFE_INC; | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/si_dpm.c:2354:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2354 | smc_state->levels[i].dpm2.PwrEfficiencyRatio = cpu_to_be16(pwr_efficiency_ratio); | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/si_dpm.c:5105:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 5105 | smc_state->levels[i + 1].aT = cpu_to_be32(a_t); | ~~~~~~~~~~~~~~~~~^~~~~~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/603f9a8f.aDLrpMFzzSApzVYQ%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 08f3dddb715cc62fa13a6bb7a95c856519d910df Author: Colin Ian King Date: Wed Mar 3 13:25:10 2021 +0000 drm/amdgpu/display: remove redundant continue statement The continue statement in a for-loop is redudant and can be removed. Clean up the code to address this. Addresses-Coverity: ("Continue as no effect") Fixes: b6f91fc183f7 ("drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work") Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit d0c048560a041789d64f95dcb18be11040b3be9b Author: Colin Ian King Date: Wed Mar 3 14:06:54 2021 +0000 drm/amd/display: 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: Alex Deucher commit 864f8b848bab8af73955c82be0d6b48e2ae51b6b Author: Jiapeng Chong Date: Thu Mar 4 16:01:35 2021 +0800 drm/amdgpu/display: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:956:52-57: WARNING: conversion to bool not needed here. ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8311:16-21: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 7c20984795d7c26a8993ca2bd2c1cbad312b2ffa Author: Takashi Iwai Date: Wed Feb 3 13:42:41 2021 +0100 drm/amd/display: Add a backlight module option There seem devices that don't work with the aux channel backlight control. For allowing such users to test with the other backlight control method, provide a new module option, aux_backlight, to specify enabling or disabling the aux backport support explicitly. As default, the aux support is detected by the hardware capability. v2: make the backlight option generic in case we add future backlight types (Alex) BugLink: https://bugzilla.opensuse.org/show_bug.cgi?id=1180749 BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1438 Reviewed-by: Nicholas Kazlauskas Signed-off-by: Takashi Iwai Signed-off-by: Alex Deucher commit f275e8759c872d0a2a53dce0a49c02fe10263010 Author: Alex Deucher Date: Thu Dec 10 01:45:12 2020 -0500 drm/amdgpu/display: handle aux backlight in backlight_get_brightness Need to fetch it via aux. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 10ba4d0c35d8820f354a42d0336537c01d0ae25c Author: Alex Deucher Date: Thu Dec 10 01:20:08 2020 -0500 drm/amdgpu/display: don't assert in set backlight function It just spams the logs. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 3c8e99cc1297c041fb3ef43304b88d5658ec6a16 Author: Alex Deucher Date: Thu Dec 10 01:18:40 2020 -0500 drm/amdgpu/display: simplify backlight setting Avoid the extra wrapper function. Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit 1b1cbf92292095662d156ad7455e16ed6d6cb1d9 Author: Alex Deucher Date: Wed Mar 3 10:18:53 2021 -0500 drm/amdgpu/dc: fill in missing call to atom cmd table for pll adjust v2 We set up the parameters, but never called the atom table. Reviewed-by: Harry Wentland Signed-off-by: Alex Deucher commit 58aa7790193af8fdf655b200d1ec46ad92899fbf Author: Alex Deucher Date: Fri Feb 26 17:09:38 2021 -0500 drm/amdgpu: enable TMZ by default on Raven asics This has been stable for a while. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 7c9631af792b3d104499061b965a8fea224ff63d Author: Jay Cornwall Date: Thu Feb 25 14:56:35 2021 -0600 drm/amdkfd: Move set_trap_handler out of dqm->ops Trap handler is set per-process per-device and is unrelated to queue management. Move implementation closer to TMA setup code. Signed-off-by: Jay Cornwall Reviewed-by: Felix Kuehling Signed-off-by: Alex Deucher commit 47c45c39d1a440830dbbf4c01c95b749765ed163 Author: Felix Kuehling Date: Thu Sep 10 15:06:53 2020 -0400 drm/amdkfd: Use a new capability bit for SRAM ECC Existing, buggy user mode breaks when SRAM ECC is correctly reported as "enabled". To avoid breaking existing user mode, deprecate that bit and leave it as 0. Define a new bit to report the actual SRAM ECC mode that new, correct user mode can use in the future. Fixes: 7ec177bdcfc1 ("drm/amdkfd: fix set kfd node ras properties value") Signed-off-by: Felix Kuehling Reviewed-by: Kent Russell Signed-off-by: Alex Deucher commit a00aacdf00b14b5afbb87f63bcc24a15ecd57452 Author: Emily Deng Date: Fri Mar 5 17:03:52 2021 +0800 drm/amdgpu: Fix some unload driver issues If have memory leak, maybe it will have issue in ttm_bo_force_list_clean-> ttm_mem_evict_first. Set adev->gart.ptr to null to avoid to call amdgpu_gmc_set_pte_pde to cause ptr issue pointer when calling amdgpu_gart_unbind in amdgpu_bo_fini which is after gart_fini. Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit bb0cd09be45ea457f25fdcbcb3d6cf2230f26c46 Author: Emily Deng Date: Thu Mar 4 19:30:51 2021 +0800 drm/amdgpu: Fix some unload driver issues When unloading driver after killing some applications, it will hit sdma flush tlb job timeout which is called by ttm_bo_delay_delete. So to avoid the job submit after fence driver fini, call ttm_bo_lock_delayed_workqueue before fence driver fini. And also put drm_sched_fini before waiting fence. Signed-off-by: Emily Deng Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 3c73683c2394891ef3076718fbdba162040bedf1 Author: Jingwen Chen Date: Fri Mar 5 14:06:34 2021 +0800 drm/amd/amdgpu: add fini virt data exchange to ip_suspend [Why] when try to shutdown guest vm in sriov mode, virt data exchange is not fini. After vram lost, trying to write vram could hang cpu. [How] add fini virt data exchange in ip_suspend Signed-off-by: Jingwen Chen Reviewed-by: Jack Zhang Signed-off-by: Alex Deucher commit 8f211fe8ac7c4f334ef5b38d32228cc7eb2a1643 Author: Feifei Xu Date: Wed Mar 3 18:42:40 2021 +0800 drm/amdgpu: add sdma 4_x interrupts printing Add VM_HOLE/DOORBELL_INVALID_BE/POLL_TIMEOUT/SRBMWRITE interrupt info printing. Signed-off-by: Feifei Xu Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e528556577a04a5a2021d08e1096eb41f78b8ea9 Author: Feifei Xu Date: Thu Mar 4 11:52:06 2021 +0800 drm/amdgpu: simplify the sdma 4_x MGCG/MGLS logic. SDMA 4_x asics share the same MGCG/MGLS setting. Signed-off-by: Feifei Xu Reviewed-by: Alex Deucher Reviewed-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 9a65df19310859bbc185a4bb8ed45fe1479bd8f2 Author: Wayne Lin Date: Tue Mar 2 13:21:07 2021 +0800 drm/amd/display: Use PSP TA to read out crc [Why & How] To read back crc by sending command READ_ROI_CRC to PSP TA to ask it to read out crc of crc window. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 21cd403ec64cdae24d0add77c111132b6119ad01 Author: Wayne Lin Date: Tue Jan 19 17:20:52 2021 +0800 drm/amd/display: Change to set crc window by dmcu fw [Why & How] To have crc window being unchanged, we have dmcu to keep monitoring crc window registers. In order not to have driver and dmcu change crc registers at the same time, have work of changing crc window to be done by dmcu fw. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 0d7e6dc06a94ce78f2f9ab23d9f30d60b126fa10 Author: Wayne Lin Date: Tue Jan 19 17:19:17 2021 +0800 drm/amd/display: Process crc window at DMCU [Why & How] Add additional MCP_SCP commands for starting/stopping updaing crc window at DMCU Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 86bc221918925a0bbb49043e3936e898e009b43b Author: Wayne Lin Date: Tue Mar 2 11:52:20 2021 +0800 drm/amd/display: Support crc on specific region [Why] To support feature that calculates CRTC CRC value on specific region (crc window). [How] 1. Use debugfs to specify crtc crc window 2. Use vline0 IRQ to write crtc crc window Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8e7b6fee9b03d683a5c2dff0689dc27a681562e9 Author: Wayne Lin Date: Tue Feb 9 16:52:22 2021 +0800 drm/amd/display: Fix crc_src is not thread safe [Why & How] Find out that referring to crtc_state->crc_src is not thread safe. Move crc_src from dm_crtc_state to dm_irq_params to fix this. Signed-off-by: Wayne Lin Reviewed-by: Nicholas Kazlauskas Acked-by: Eryk Brol Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e49db376345290eeaed696557fa432b2420c7216 Author: Tom St Denis Date: Thu Mar 4 10:52:09 2021 -0500 drm/amd/amdgpu: Add missing BASE_IDX to dcn register The register mmOTG1_OTG_BLANK_CONTROL was missing BASE_IDX value. Signed-off-by: Tom St Denis Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit c79fe9b436690209954f908a41b19e0bf575877a Author: Leo (Hanghong) Ma Date: Thu Mar 4 10:26:52 2021 -0500 drm/amdgpu: add DMUB trace event IRQ source define [Why & How] We use DMCUB outbox0 interrupt to log DMCUB trace buffer events as Linux kernel traces, so need to add some irq source related defination in the header files; Reviewed-by: Harry Wentland Signed-off-by: Leo (Hanghong) Ma Signed-off-by: Alex Deucher commit d8cce9306801cfbf709055677f7896905094ff95 Author: Arunpravin Date: Mon Mar 1 15:45:13 2021 +0530 drm/amd/pm/swsmu: clean up user profile function Remove unnecessary comments, enable restore mode using '|=' operator, fixes the alignment to improve the code readability. v2: Move all restoration flag check to bitwise '&' operator Signed-off-by: Arunpravin Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 4215a11923362ec53e85dfe25160beeebf41fd2c Author: Horace Chen Date: Thu Feb 25 15:22:51 2021 +0800 drm/amdgpu: enable one vf mode on sienna cichlid vf sienna cichlid needs one vf mode which allows vf to set and get clock status from guest vm. So now expose the required interface and allow some smu request on VF mode. Also since this asic blocked direct MMIO access, use KIQ to send SMU request under sriov vf. OD use same command as getting pp table which is not allowed for sienna cichlid, so remove OD feature under sriov vf. Signed-off-by: Horace Chen Reviewed-by: Monk Liu Signed-off-by: Alex Deucher commit 152bb95c38c3460f077c8e97f6576b2656a4d974 Author: Evan Quan Date: Mon Mar 1 12:20:09 2021 +0800 drm/amd/pm: update existing gpu_metrics interfaces V2 Update the gpu_metrics interface implementations to use the latest upgraded data structures. V2: fit the data type change of energy_accumulator Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit 2ce13b014cad14e5a6a385cc13212570f7314b52 Author: Evan Quan Date: Fri Feb 26 15:11:45 2021 +0800 drm/amd/pm: correct gpu metrics related data structures V3 To make sure they are naturally aligned. Also updating the data type for link_speed/width for future PCIE5 support. V2: define new structures with minor version bumped V3: update data type of energy_accumulator as 64bit and drop unnecessary padding members Signed-off-by: Evan Quan Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit d01b59c9ae94560fbcceaafeef39784d72765033 Author: Xuesen Huang Date: Thu Mar 4 14:40:46 2021 +0800 bpf: Add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets encapsulation. But that is not appropriate when pushing Ethernet header. Add an option to further specify encap L2 type and set the inner_protocol as ETH_P_TEB. Suggested-by: Willem de Bruijn Signed-off-by: Xuesen Huang Signed-off-by: Zhiyong Cheng Signed-off-by: Li Wang Signed-off-by: Daniel Borkmann Acked-by: Willem de Bruijn Link: https://lore.kernel.org/bpf/20210304064046.6232-1-hxseverything@gmail.com commit 603a945e55bddc9265bb40d27fd1de3ab3d0316b Author: Ville Syrjälä Date: Thu Mar 4 19:04:21 2021 +0200 drm/i915: Fix DSI TE max_vblank_count handling commit 33267703df15 ("drm/i915/dsi: Enable software vblank counter") claims to get the mode_flags from the crtc_state, but in fact does not. Fix it to do it right. Cc: Vandita Kulkarni Cc: Jani Nikula Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210304170421.10901-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 2c6afc3675bc0d4e38b8b47425d8150810482874 Author: Ville Syrjälä Date: Thu Mar 4 19:04:20 2021 +0200 drm/i915: Return zero as the scanline counter for disabled pipes We print the scanline counters as unsigned integers so the -1 here just makes the debugs/traces look a bit messy. Zero seems equally valid for this usecase. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210304170421.10901-4-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula commit 9bb475cd31fa6e724225841689495a9c86fac037 Author: Ville Syrjälä Date: Thu Mar 4 19:04:19 2021 +0200 drm/i915: Don't try to query the frame counter for disabled pipes For platforms/outputs without hardware frame counters we can't call drm_crtc_accurate_vblank_count() when the vblank support is disabled or we just get a WARN due to the crtc timings (vblank->hwmode) being considered invalid. Note that until the pipe in question has been enabled and drm_crtc_set_max_vblank_count() has been called on it we would also take this path on platforms which have a working frame counter. So getting the WARN is rather likely on any platform unless you always boot with lots of displays plugged in. Also even on hardware with a working frame counter we may not be able to read the actual frame counter register on disabled pipes due the relevant power well being disabled. Ie. would just result in the unclaimed reg spew. So let's just avoid all this an directly report zero in case the pipe is disabled. Reported-by: Steven Rostedt (VMware) Tested-by: Steven Rostedt (VMware) Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210304170421.10901-3-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä commit e43539f87a6d7bd18c2df82130bbdeda5b399516 Author: Ville Syrjälä Date: Thu Mar 4 19:04:18 2021 +0200 drm/i915: Move pipe enable/disable tracepoints to intel_crtc_vblank_{on,off}() On platforms/outputs without a working frame counter we rely on the vblank code to cook up the frame counter from the timestamps. That requires that vblank support is enabled. Thus we need to move the pipe enable/disable tracepoints to the other side of the drm_vblank_{on,off}() calls. There shouldn't really be much happening between these old and new call sites so the tracepoints should still provide reasonable data. The alternative would be to give up on having the frame counter values in the trace which would render the tracepoints more or less pointless. v2: Missed one case in intel_ddi_post_disable() Drop the now useless i915_trace.h includes Reported-by: Steven Rostedt (VMware) Tested-by: Steven Rostedt (VMware) Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210304170421.10901-2-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä commit 04f7791b7a4ba6ff3f53b3f3978b353924d10e78 Author: Hui Wang Date: Fri Mar 5 17:26:08 2021 +0800 ALSA: hda - bind headset buttons to the headphone jack With the HDA driver, if the headset buttons are supported, an audio Jack will be created for them. This audio Jack is a bit confusing to users since it can't report headphone/mic insertion events but it claims to support these events. And in addition, the driver already builds a headphone Jack and a mic Jack, and most of those buttons are used for headphone playback, so do some change to bind those buttons to the headphone Jack. After this change, the key events are generated from NID 0x55, and are reported to the input layer via headphone jack (NID 0x21). If there is no headphone Jack, then build an audio jack to support those buttons same as previously. Signed-off-by: Hui Wang Link: https://lore.kernel.org/r/20210305092608.109599-1-hui.wang@canonical.com Signed-off-by: Takashi Iwai commit bce8623135fbe54bd86797df72cb85bfe4118b6e Author: Jiapeng Chong Date: Wed Mar 3 15:52:10 2021 +0800 selftests/bpf: Simplify the calculation of variables Fix the following coccicheck warnings: ./tools/testing/selftests/bpf/test_sockmap.c:735:35-37: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/1614757930-17197-1-git-send-email-jiapeng.chong@linux.alibaba.com commit 46ac034f769fcd50d3d554041a3879a0cdf2ee57 Author: Jiapeng Chong Date: Wed Mar 3 15:20:35 2021 +0800 bpf: Simplify the calculation of variables Fix the following coccicheck warnings: ./tools/bpf/bpf_dbg.c:1201:55-57: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/1614756035-111280-1-git-send-email-jiapeng.chong@linux.alibaba.com commit b0d3df486fcfb08810915c5fa95692cd8ec79298 Merge: 2374e0f1c7068 b4f894633fa14 Author: Alexei Starovoitov Date: Thu Mar 4 19:11:30 2021 -0800 Merge branch 'PROG_TEST_RUN support for sk_lookup programs' Lorenz Bauer says: ==================== We don't have PROG_TEST_RUN support for sk_lookup programs at the moment. So far this hasn't been a problem, since we can run our tests in a separate network namespace. For benchmarking it's nice to have PROG_TEST_RUN, so I've gone and implemented it. Based on discussion on the v1 I've dropped support for testing multiple programs at once. Changes since v3: - Use bpf_test_timer prefix (Andrii) Changes since v2: - Fix test_verifier failure (Alexei) Changes since v1: - Add sparse annotations to the t_* functions - Add appropriate type casts in bpf_prog_test_run_sk_lookup - Drop running multiple programs ==================== Signed-off-by: Alexei Starovoitov commit b4f894633fa14d7d46ba7676f950b90a401504bb Author: Lorenz Bauer Date: Wed Mar 3 10:18:16 2021 +0000 selftests: bpf: Don't run sk_lookup in verifier tests sk_lookup doesn't allow setting data_in for bpf_prog_run. This doesn't play well with the verifier tests, since they always set a 64 byte input buffer. Allow not running verifier tests by setting bpf_test.runs to a negative value and don't run the ctx access case for sk_lookup. We have dedicated ctx access tests so skipping here doesn't reduce coverage. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210303101816.36774-6-lmb@cloudflare.com commit abab306ff04b570e817be3f026068fe9a5d99fbb Author: Lorenz Bauer Date: Wed Mar 3 10:18:15 2021 +0000 selftests: bpf: Check that PROG_TEST_RUN repeats as requested Extend a simple prog_run test to check that PROG_TEST_RUN adheres to the requested repetitions. Convert it to use BPF skeleton. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210303101816.36774-5-lmb@cloudflare.com commit 509b2937bce90089fd2785db9f27951a3d850c34 Author: Lorenz Bauer Date: Wed Mar 3 10:18:14 2021 +0000 selftests: bpf: Convert sk_lookup ctx access tests to PROG_TEST_RUN Convert the selftests for sk_lookup narrow context access to use PROG_TEST_RUN instead of creating actual sockets. This ensures that ctx is populated correctly when using PROG_TEST_RUN. Assert concrete values since we now control remote_ip and remote_port. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210303101816.36774-4-lmb@cloudflare.com commit 7c32e8f8bc33a5f4b113a630857e46634e3e143b Author: Lorenz Bauer Date: Wed Mar 3 10:18:13 2021 +0000 bpf: Add PROG_TEST_RUN support for sk_lookup programs Allow to pass sk_lookup programs to PROG_TEST_RUN. User space provides the full bpf_sk_lookup struct as context. Since the context includes a socket pointer that can't be exposed to user space we define that PROG_TEST_RUN returns the cookie of the selected socket or zero in place of the socket pointer. We don't support testing programs that select a reuseport socket, since this would mean running another (unrelated) BPF program from the sk_lookup test handler. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210303101816.36774-3-lmb@cloudflare.com commit 607b9cc92bd7208338d714a22b8082fe83bcb177 Author: Lorenz Bauer Date: Wed Mar 3 10:18:12 2021 +0000 bpf: Consolidate shared test timing code Share the timing / signal interruption logic between different implementations of PROG_TEST_RUN. There is a change in behaviour as well. We check the loop exit condition before checking for pending signals. This resolves an edge case where a signal arrives during the last iteration. Instead of aborting with EINTR we return the successful result to user space. Signed-off-by: Lorenz Bauer Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210303101816.36774-2-lmb@cloudflare.com commit 2374e0f1c7068d60b71e7ab50eff52c48be697e2 Merge: 13ec0216c3ace 242029f42691e Author: Alexei Starovoitov Date: Thu Mar 4 18:39:46 2021 -0800 Merge branch 'Improve BPF syscall command documentation' Joe Stringer says: ==================== The state of bpf(2) manual pages today is not exactly ideal. For the most part, it was written several years ago and has not kept up with the pace of development in the kernel tree. For instance, out of a total of ~35 commands to the BPF syscall available today, when I pull the kernel-man-pages tree today I find just 6 documented commands: The very basics of map interaction and program load. In contrast, looking at bpf-helpers(7), I am able today to run one command[0] to fetch API documentation of the very latest eBPF helpers that have been added to the kernel. This documentation is up to date because kernel maintainers enforce documenting the APIs as part of the feature submission process. As far as I can tell, we rely on manual synchronization from the kernel tree to the kernel-man-pages tree to distribute these more widely, so all locations may not be completely up to date. That said, the documentation does in fact exist in the first place which is a major initial hurdle to overcome. Given the relative success of the process around bpf-helpers(7) to encourage developers to document their user-facing changes, in this patch series I explore applying this technique to bpf(2) as well. Unfortunately, even with bpf(2) being so out-of-date, there is still a lot of content to convert over. In particular, the following aspects of the bpf syscall could also be individually be generated from separate documentation in the header: * BPF syscall commands * BPF map types * BPF program types * BPF program subtypes (aka expected_attach_type) * BPF attachment points Rather than tackle everything at once, I have focused in this series on the syscall commands, "enum bpf_cmd". This series is structured to first import what useful descriptions there are from the kernel-man-pages tree, then piece-by-piece document a few of the syscalls in more detail in cases where I could find useful documentation from the git tree or from a casual read of the code. Not all documentation is comprehensive at this point, but a basis is provided with examples that can be further enhanced with subsequent follow-up patches. Note, the series in its current state only includes documentation around the syscall commands themselves, so in the short term it doesn't allow us to automate bpf(2) generation; Only one section of the man page could be replaced. Though if there is appetite for this approach, this should be trivial to improve on, even if just by importing the remaining static text from the kernel-man-pages tree. Following that, the series enhances the python scripting around parsing the descriptions from the header files and generating dedicated ReStructured Text and troff output. Finally, to expose the new text and reduce the likelihood of having it get out of date or break the docs parser, it is added to the selftests and exposed through the kernel documentation web pages. The eventual goal of this effort would be to extend the kernel UAPI headers such that each of the categories I had listed above (commands, maps, progs, hooks) have dedicated documentation in the kernel tree, and that developers must update the comments in the headers to document the APIs prior to patch acceptance, and that we could auto-generate the latest version of the bpf(2) manual pages based on a few static description sections combined with the dynamically-generated output from the header. This patch series can also be found at the following location on GitHub: https://github.com/joestringer/linux/tree/submit/bpf-command-docs_v2 Thanks also to Quentin Monnet for initial review. [0]: make -C tools/testing/selftests/bpf docs v2: * Remove build infrastructure in favor of kernel-doc directives * Shift userspace-api docs under Documentation/userspace-api/ebpf * Fix scripts/bpf_doc.py syscall --header (throw unsupported error) * Improve .gitignore handling of newly autogenerated files ==================== Acked-by: Jonathan Corbet Signed-off-by: Alexei Starovoitov commit 242029f42691e05ac09b31b98221421bd564375e Author: Joe Stringer Date: Tue Mar 2 09:19:47 2021 -0800 tools: Sync uapi bpf.h header with latest changes Synchronize the header after all of the recent changes. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210302171947.2268128-16-joe@cilium.io commit 6197e5b7b1b5acd1e9b04bdf3527c694d84a27e2 Author: Joe Stringer Date: Tue Mar 2 09:19:46 2021 -0800 docs/bpf: Add bpf() syscall command reference Generate the syscall command reference from the UAPI header file and include it in the main bpf docs page. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210302171947.2268128-15-joe@cilium.io commit accbd33a9b0328777899a85d148040e4d8921d87 Author: Joe Stringer Date: Tue Mar 2 09:19:45 2021 -0800 selftests/bpf: Test syscall command parsing Add building of the bpf(2) syscall commands documentation as part of the docs building step in the build. This allows us to pick up on potential parse errors from the docs generator script as part of selftests. The generated manual pages here are not intended for distribution, they are just a fragment that can be integrated into the other static text of bpf(2) to form the full manual page. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-14-joe@cilium.io commit 62b379a233a79e6f4d2e8b14750ae8fa13b8caf8 Author: Joe Stringer Date: Tue Mar 2 09:19:44 2021 -0800 selftests/bpf: Templatize man page generation Previously, the Makefile here was only targeting a single manual page so it just hardcoded a bunch of individual rules to specifically handle build, clean, install, uninstall for that particular page. Upcoming commits will generate manual pages for an additional section, so this commit prepares the makefile first by converting the existing targets into an evaluated set of targets based on the manual page name and section. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210302171947.2268128-13-joe@cilium.io commit a01d935b2e0916d32cb567f90c32a0c4eb46993c Author: Joe Stringer Date: Tue Mar 2 09:19:43 2021 -0800 tools/bpf: Remove bpf-helpers from bpftool docs This logic is used for validating the manual pages from selftests, so move the infra under tools/testing/selftests/bpf/ and rely on selftests for validation rather than tying it into the bpftool build. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210302171947.2268128-12-joe@cilium.io commit a67882a221e348ab1c925b47efdfec8b11272d3f Author: Joe Stringer Date: Tue Mar 2 09:19:42 2021 -0800 scripts/bpf: Add syscall commands printer Add a new target to bpf_doc.py to support generating the list of syscall commands directly from the UAPI headers. Assuming that developer submissions keep the main header up to date, this should allow the man pages to be automatically generated based on the latest API changes rather than requiring someone to separately go back through the API and describe each command. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210302171947.2268128-11-joe@cilium.io commit 923a932c982fd71856f80dbeaaa3ca41a75e89e0 Author: Joe Stringer Date: Tue Mar 2 09:19:41 2021 -0800 scripts/bpf: Abstract eBPF API target parameter Abstract out the target parameter so that upcoming commits, more than just the existing "helpers" target can be called to generate specific portions of docs from the eBPF UAPI headers. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Link: https://lore.kernel.org/bpf/20210302171947.2268128-10-joe@cilium.io commit 0cb804547927c05f6aa7e28c8d4a1e02fec1a6d4 Author: Joe Stringer Date: Tue Mar 2 09:19:40 2021 -0800 bpf: Document BPF_MAP_*_BATCH syscall commands Based roughly on the following commits: * Commit cb4d03ab499d ("bpf: Add generic support for lookup batch op") * Commit 057996380a42 ("bpf: Add batch ops to all htab bpf map") * Commit aa2e93b8e58e ("bpf: Add generic support for update and delete batch ops") Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Brian Vazquez Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-9-joe@cilium.io commit 5d999994e05d62d4f53059540652014cf83cddfe Author: Joe Stringer Date: Tue Mar 2 09:19:39 2021 -0800 bpf: Document BPF_PROG_QUERY syscall command Commit 468e2f64d220 ("bpf: introduce BPF_PROG_QUERY command") originally introduced this, but there have been several additions since then. Unlike BPF_PROG_ATTACH, it appears that the sockmap progs are not able to be queried so far. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-8-joe@cilium.io commit 2a3fdca4e3bc7a01316277ba26f4090c4b19bf7c Author: Joe Stringer Date: Tue Mar 2 09:19:38 2021 -0800 bpf: Document BPF_PROG_TEST_RUN syscall command Based on a brief read of the corresponding source code. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-7-joe@cilium.io commit 32e76b187a90de5809d68c2ef3e3964176dacaf0 Author: Joe Stringer Date: Tue Mar 2 09:19:37 2021 -0800 bpf: Document BPF_PROG_ATTACH syscall command Document the prog attach command in more detail, based on git commits: * commit f4324551489e ("bpf: add BPF_PROG_ATTACH and BPF_PROG_DETACH commands") * commit 4f738adba30a ("bpf: create tcp_bpf_ulp allowing BPF to monitor socket TX/RX data") * commit f4364dcfc86d ("media: rc: introduce BPF_PROG_LIRC_MODE2") * commit d58e468b1112 ("flow_dissector: implements flow dissector BPF hook") Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-6-joe@cilium.io commit 8aacb3c8d1a32b23c82645051bba55f0ae6c103b Author: Joe Stringer Date: Tue Mar 2 09:19:36 2021 -0800 bpf: Document BPF_PROG_PIN syscall command Commit b2197755b263 ("bpf: add support for persistent maps/progs") contains the original implementation and git logs, used as reference for this documentation. Also pull in the filename restriction as documented in commit 6d8cb045cde6 ("bpf: comment why dots in filenames under BPF virtual FS are not allowed") Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-5-joe@cilium.io commit 6690523bccb3e44cfcc4b2c995767e6814046e34 Author: Joe Stringer Date: Tue Mar 2 09:19:35 2021 -0800 bpf: Document BPF_F_LOCK in syscall commands Document the meaning of the BPF_F_LOCK flag for the map lookup/update descriptions. Based on commit 96049f3afd50 ("bpf: introduce BPF_F_LOCK flag"). Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-4-joe@cilium.io commit f67c9cbf6c581468f6c7144d497565cfc7918c31 Author: Joe Stringer Date: Tue Mar 2 09:19:34 2021 -0800 bpf: Add minimal bpf() command documentation Introduce high-level descriptions of the intent and return codes of the bpf() syscall commands. Subsequent patches may further flesh out the content to provide a more useful programming reference. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-3-joe@cilium.io commit 7799e4d9d84f6f8231dfd9dca4da5f4b2f0aa932 Author: Joe Stringer Date: Tue Mar 2 09:19:33 2021 -0800 bpf: Import syscall arg documentation These descriptions are present in the man-pages project from the original submissions around 2015-2016. Import them so that they can be kept up to date as developers extend the bpf syscall commands. These descriptions follow the pattern used by scripts/bpf_helpers_doc.py so that we can take advantage of the parser to generate more up-to-date man page writing based upon these headers. Some minor wording adjustments were made to make the descriptions more consistent for the description / return format. Signed-off-by: Joe Stringer Signed-off-by: Alexei Starovoitov Reviewed-by: Quentin Monnet Acked-by: Toke Høiland-Jørgensen Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210302171947.2268128-2-joe@cilium.io Co-authored-by: Alexei Starovoitov Co-authored-by: Michael Kerrisk commit 13ec0216c3ace494ea8fafab5aa6925a5bc41796 Merge: 86a35af628e53 6be6a0baffc13 Author: Alexei Starovoitov Date: Thu Mar 4 17:58:16 2021 -0800 Merge branch 'Add BTF_KIND_FLOAT support' Ilya Leoshkevich says: ==================== Some BPF programs compiled on s390 fail to load, because s390 arch-specific linux headers contain float and double types. Introduce support for such types by representing them using the new BTF_KIND_FLOAT. This series deals with libbpf, bpftool, in-kernel BTF parser as well as selftests and documentation. There are also pahole and LLVM parts: * https://github.com/iii-i/dwarves/commit/btf-kind-float-v2 * https://reviews.llvm.org/D83289 but they should go in after the libbpf part is integrated. --- v0: https://lore.kernel.org/bpf/20210210030317.78820-1-iii@linux.ibm.com/ v0 -> v1: Per Andrii's suggestion, remove the unnecessary trailing u32. v1: https://lore.kernel.org/bpf/20210216011216.3168-1-iii@linux.ibm.com/ v1 -> v2: John noticed that sanitization corrupts BTF, because new and old sizes don't match. Per Yonghong's suggestion, use a modifier type (which has the same size as the float type) as a replacement. Per Yonghong's suggestion, add size and alignment checks to the kernel BTF parser. v2: https://lore.kernel.org/bpf/20210219022543.20893-1-iii@linux.ibm.com/ v2 -> v3: Based on Yonghong's suggestions: Use BTF_KIND_CONST instead of BTF_KIND_TYPEDEF and make sure that the C code generated from the sanitized BTF is well-formed; fix size calculation in tests and use NAME_TBD everywhere; limit allowed sizes to 2, 4, 8, 12 and 16 (this should also fix m68k and nds32le builds). v3: https://lore.kernel.org/bpf/20210220034959.27006-1-iii@linux.ibm.com/ v3 -> v4: More fixes for the Yonghong's findings: fix the outdated comment in bpf_object__sanitize_btf() and add the error handling there (I've decided to check uint_id and uchar_id too in order to simplify debugging); add bpftool output example; use div64_u64_rem() instead of % in order to fix the linker error. Also fix the "invalid BTF_INFO" test (new commit, #4). v4: https://lore.kernel.org/bpf/20210222214917.83629-1-iii@linux.ibm.com/ v4 -> v5: Fixes for the Andrii's findings: Use BTF_KIND_STRUCT instead of BTF_KIND_TYPEDEF for sanitization; check byte_sz in libbpf; move btf__add_float; remove relo support; add a dedup test (new commit, #7). v5: https://lore.kernel.org/bpf/20210223231459.99664-1-iii@linux.ibm.com/ v5 -> v6: Fixes for further findings by Andrii: split whitespace issue fix into a separate patch; add 12-byte float to "float test #1, well-formed". v6: https://lore.kernel.org/bpf/20210224234535.106970-1-iii@linux.ibm.com/ v6 -> v7: John suggested to add a comment explaining why sanitization does not preserve the type name, as well as what effect it has on running the code on the older kernels. Yonghong has asked to add a comment explaining why we are not checking the alignment very precisely in the kernel. John suggested to add a bpf_core_field_size test (commit #9). Based on Alexei's feedback [1] I'm proceeding with the BTF_KIND_FLOAT approach. [1] https://lore.kernel.org/bpf/CAADnVQKWPODWZ2RSJ5FJhfYpxkuV0cvSAL1O+FSr9oP1ercoBg@mail.gmail.com/ ==================== Signed-off-by: Alexei Starovoitov commit 6be6a0baffc1357b6d2023155753f111624c4fec Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:56 2021 +0100 bpf: Document BTF_KIND_FLOAT in btf.rst Also document the expansion of the kind bitfield. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210226202256.116518-11-iii@linux.ibm.com commit 7999cf7df899caf244236dcc11cce844347dab4a Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:54 2021 +0100 selftests/bpf: Add BTF_KIND_FLOAT to the existing deduplication tests Check that floats don't interfere with struct deduplication, that they are not merged with another kinds and that floats of different sizes are not merged with each other. Suggested-by: Andrii Nakryiko Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226202256.116518-9-iii@linux.ibm.com commit 7e72aad3a15c06e40e3ccd2352e5010e978f1acf Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:53 2021 +0100 selftest/bpf: Add BTF_KIND_FLOAT tests Test the good variants as well as the potential malformed ones. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226202256.116518-8-iii@linux.ibm.com commit b1828f0b04828aa8cccadf00a702f459caefeed9 Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:52 2021 +0100 bpf: Add BTF_KIND_FLOAT support On the kernel side, introduce a new btf_kind_operations. It is similar to that of BTF_KIND_INT, however, it does not need to handle encodings and bit offsets. Do not implement printing, since the kernel does not know how to format floating-point values. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210226202256.116518-7-iii@linux.ibm.com commit eea154a852e827c003215f7beed3e10f05471a86 Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:51 2021 +0100 selftests/bpf: Use the 25th bit in the "invalid BTF_INFO" test The bit being checked by this test is no longer reserved after introducing BTF_KIND_FLOAT, so use the next one instead. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210226202256.116518-6-iii@linux.ibm.com commit 737e0f919a8d2a313618d8ac67d50e8223bc5d74 Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:50 2021 +0100 tools/bpftool: Add BTF_KIND_FLOAT support Only dumping support needs to be adjusted, the code structure follows that of BTF_KIND_INT. Example plain and JSON outputs: [4] FLOAT 'float' size=4 {"id":4,"kind":"FLOAT","name":"float","size":4} Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210226202256.116518-5-iii@linux.ibm.com commit 22541a9eeb0d968c133aaebd95fa59da3208e705 Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:49 2021 +0100 libbpf: Add BTF_KIND_FLOAT support The logic follows that of BTF_KIND_INT most of the time. Sanitization replaces BTF_KIND_FLOATs with equally-sized empty BTF_KIND_STRUCTs on older kernels, for example, the following: [4] FLOAT 'float' size=4 becomes the following: [4] STRUCT '(anon)' size=4 vlen=0 With dwarves patch [1] and this patch, the older kernels, which were failing with the floating-point-related errors, will now start working correctly. [1] https://github.com/iii-i/dwarves/commit/btf-kind-float-v2 Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226202256.116518-4-iii@linux.ibm.com commit 1b1ce92b24331b569a444858fc487a1ca19dc778 Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:48 2021 +0100 libbpf: Fix whitespace in btf_add_composite() comment Remove trailing space. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210226202256.116518-3-iii@linux.ibm.com commit 8fd886911a6a99acf4a8facf619a2e7b5225be78 Author: Ilya Leoshkevich Date: Fri Feb 26 21:22:47 2021 +0100 bpf: Add BTF_KIND_FLOAT to uapi Add a new kind value and expand the kind bitfield. Signed-off-by: Ilya Leoshkevich Signed-off-by: Alexei Starovoitov Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210226202256.116518-2-iii@linux.ibm.com commit a81a38cc6ddaf128c7ca9e3fffff21c243f33c97 Author: Melanie Plageman (Microsoft) Date: Wed Feb 24 23:29:48 2021 +0000 scsi: storvsc: Parameterize number hardware queues Add ability to set the number of hardware queues with new module parameter, storvsc_max_hw_queues. The default value remains the number of CPUs. This functionality is useful in some environments (e.g. Microsoft Azure) where decreasing the number of hardware queues has been shown to improve performance. Link: https://lore.kernel.org/r/20210224232948.4651-1-melanieplageman@gmail.com Reviewed-by: Michael Kelley Signed-off-by: Melanie Plageman (Microsoft) Signed-off-by: Martin K. Petersen commit 67073c69c8902d5f23845b3689360853826fcfb8 Author: James Smart Date: Mon Mar 1 09:18:21 2021 -0800 scsi: lpfc: Update copyrights for 12.8.0.7 and 12.8.0.8 changes For the files modified in 2021 via the 12.8.0.7 and 12.8.0.8 patch sets, update the copyright for 2021. Link: https://lore.kernel.org/r/20210301171821.3427-23-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ef53d5e1b8e49c673672db9c3c2e6c64dd7a0fbb Author: James Smart Date: Mon Mar 1 09:18:20 2021 -0800 scsi: lpfc: Update lpfc version to 12.8.0.8 Update lpfc version to 12.8.0.8. Link: https://lore.kernel.org/r/20210301171821.3427-22-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 69b8eff25c8beb8073d82ebb4cfb8a241540feba Author: James Smart Date: Mon Mar 1 09:18:19 2021 -0800 scsi: lpfc: Correct function header comments related to ndlp reference counting Code inspection revealed stale comments in function headers for functions that call lpfc_prep_els_iocb(). Changes in ndlp reference counting were not reflected in function headers. Update the stale comments in function headers to more accurately indicate ndlp reference counting. Link: https://lore.kernel.org/r/20210301171821.3427-21-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit cdf811606bd8cac4b0c6fe140acc6511d37542f9 Author: James Smart Date: Mon Mar 1 09:18:18 2021 -0800 scsi: lpfc: Reduce LOG_TRACE_EVENT logging for vports Lots of discovery messages are flooding the console log when testing NPIV. Informational message for vports should have LOG_VPORT associated with it as opposed to LOG_TRACE_EVENT. Link: https://lore.kernel.org/r/20210301171821.3427-20-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit a94a40eb64f15f8374699a114cd24fbbf48048ed Author: James Smart Date: Mon Mar 1 09:18:17 2021 -0800 scsi: lpfc: Change wording of invalid pci reset log message Message 8347 Invalid device found log message is logged when an LPe12000 adapter is installed. The log message is supposed to indicate an unsupported pci reset adapter rather than an invalid device. Change the wording to: Incapable PCI reset device. Link: https://lore.kernel.org/r/20210301171821.3427-19-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9628aace0d1f74f81baaa353f38e929fb4580248 Author: James Smart Date: Mon Mar 1 09:18:16 2021 -0800 scsi: lpfc: Fix crash caused by switch reboot Driver is causing a crash in __lpfc_sli_release_iocbq_s4() when it dereferences the els_wq which is NULL. Validate the pring for the els_wq before dereferencing. Reorg the code to move the pring assignment closer to where it is actually used. Link: https://lore.kernel.org/r/20210301171821.3427-18-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit debbc1e2b978bbacd629e30d93d8eaba1592c358 Author: James Smart Date: Mon Mar 1 09:18:15 2021 -0800 scsi: lpfc: Fix pt2pt state transition causing rmmod hang On a setup with a dual port HBA and both ports direct connected, an rmmod hangs momentarily when we log an Illegal State Transition. Once it resumes, a nodelist not empty logic is hit, which forces rmmod to cleanup and exit. We're missing a state transition case in the discovery engine. Fix by adding a case for a DEVICE_RM event while in the unmapped state to avoid illegal state transition log message. Link: https://lore.kernel.org/r/20210301171821.3427-17-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit bb6fd33e3a0cf4325a8114f2f2fece881713973c Author: James Smart Date: Mon Mar 1 09:18:14 2021 -0800 scsi: lpfc: Fix nodeinfo debugfs output The debugfs nodeinfo output gets jumbled when no rpri or a defer entry is displayed. The misalignment makes it difficult to read. Change the format to consistently print out a 4 character rpi, and turn defer into a suffix. Link: https://lore.kernel.org/r/20210301171821.3427-16-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 309b477462df7542355ac984674a6e89c01c89aa Author: James Smart Date: Mon Mar 1 09:18:13 2021 -0800 scsi: lpfc: Fix ADISC handling that never frees nodes While testing target port swap test with ADISC enabled, several nodes remain in UNUSED state. These nodes are never freed and rmmod hangs for long time before finising with "0233 Nodelist not empty" error. During PLOGI completion lpfc_plogi_confirm_nport() looks for existing nodes with same WWPN. If found, the existing node is used to continue discovery. The node on which plogi was performed is freed. When ADISC is enabled, an ADISC els request is triggered in response to an RSCN. It's possible that the ADISC may be rejected by the remote port causing the ADISC completion handler to clear the port and node name in the node. If this occurs, if a PLOGI is received it causes a node lookup based on wwpn to now fail, causing the port swap logic to kick in which allocates a new node and swaps to it. This effectively orphans the original node structure. Fix the situation by detecting when the lookup fails and forgo the node swap and node allocation by using the node on which the PLOGI was issued. Link: https://lore.kernel.org/r/20210301171821.3427-15-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 143753059b8b957f1cf4355338a3e3a32f3a85bf Author: James Smart Date: Mon Mar 1 09:18:12 2021 -0800 scsi: lpfc: Fix PLOGI ACC to be transmit after REG_LOGIN The driver is seeing a scenario where PLOGI response was issued and traffic is arriving while the adapter is still setting up the login context. This is resulting in errors handling the traffic. Change the driver so that PLOGI response is sent after the login context has been setup to avoid the situation. Link: https://lore.kernel.org/r/20210301171821.3427-14-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9dd83f75fc8c2403508d4dbe4b9ebde15ee0bbab Author: James Smart Date: Mon Mar 1 09:18:11 2021 -0800 scsi: lpfc: Fix dropped FLOGI during pt2pt discovery recovery When connected in pt2pt mode, there is a scenario where the remote port significantly delays sending a response to our FLOGI, but acts on the FLOGI it sent us and proceeds to PLOGI/PRLI. The FLOGI ends up timing out and kicks off recovery logic. End result is a lot of unnecessary state changes and lots of discovery messages being logged. Fix by terminating the FLOGI and noop'ing its completion if we have already accepted the remote ports FLOGI and are now processing PLOGI. Link: https://lore.kernel.org/r/20210301171821.3427-13-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 148bc64d38fe314475a074c4f757ec9d84537d1c Author: James Smart Date: Mon Mar 1 09:18:10 2021 -0800 scsi: lpfc: Fix status returned in lpfc_els_retry() error exit path An unlikely error exit path from lpfc_els_retry() returns incorrect status to a caller, erroneously indicating that a retry has been successfully issued or scheduled. Change error exit path to indicate no retry. Link: https://lore.kernel.org/r/20210301171821.3427-12-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8e9a3250dc61ac1a3b8e4c98ed255fdb4d40cddc Author: James Smart Date: Mon Mar 1 09:18:09 2021 -0800 scsi: lpfc: Fix use after free in lpfc_els_free_iocb There are several code paths where the following sequence occurs: - An ndlp pointer is assigned to an iocb via a nlp_get() - An attempt is made to issue the iocb, but it fails - The failure case does a put on the ndlp then calls lpfc_els_free_iocb() The put may free the ndlp structure, but the els_free_iocb may reference the now-stale ndlp pointer and cause a crash. Fix by ensuring that the lpfc_els_free_iocb() occurs before the lpfc_nlp_put(). While fixing, refactor the code to better ensure this calling sequence. Link: https://lore.kernel.org/r/20210301171821.3427-11-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 8dd1c125f7f838abad009b64bff5f0a11afe3cb6 Author: James Smart Date: Mon Mar 1 09:18:08 2021 -0800 scsi: lpfc: Fix null pointer dereference in lpfc_prep_els_iocb() It is possible to call lpfc_issue_els_plogi() passing a did for which no matching ndlp is found. A call is then made to lpfc_prep_els_iocb() with a null pointer to a lpfc_nodelist structure resulting in a null pointer dereference. Fix by returning an error status if no valid ndlp is found. Fix up comments regarding ndlp reference counting. Link: https://lore.kernel.org/r/20210301171821.3427-10-jsmart2021@gmail.com Fixes: 4430f7fd09ec ("scsi: lpfc: Rework locations of ndlp reference taking") Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit ae960d78ec3ab19023d19d134b066eb453aff602 Author: James Smart Date: Mon Mar 1 09:18:07 2021 -0800 scsi: lpfc: Fix unnecessary null check in lpfc_release_scsi_buf lpfc_fcp_io_cmd_wqe_cmpl() is intended to mirror lpfc_nvme_io_cmd_wqe_cmpl() for sli4 fcp completions. When the routine was added, lpfc_fcp_io_cmd_wqe_cmpl() included a null pointer check for phba. However, phba is definitely valid, being dereferenced by the calling routine and used later in the routine itself. Remove the unnecessary null check. Link: https://lore.kernel.org/r/20210301171821.3427-9-jsmart2021@gmail.com Fixes: 96e209be6ecb ("scsi: lpfc: Convert SCSI I/O completions to SLI-3 and SLI-4 handlers") Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit bd4f5100424d17d4e560d6653902ef8e49b2fc1f Author: James Smart Date: Mon Mar 1 09:18:06 2021 -0800 scsi: lpfc: Fix pt2pt connection does not recover after LOGO On a pt2pt setup, between 2 initiators, if one side issues a a LOGO, there is no relogin attempt. The FC specs are grey in this area on which port (higher wwn or not) is to re-login. As there is no spec guidance, unconditionally re-PLOGI after the logout to ensure a login is re-established. Link: https://lore.kernel.org/r/20210301171821.3427-8-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 6b6eaf8a5330a4ab37a0d562f24228226e6ac630 Author: James Smart Date: Mon Mar 1 09:18:05 2021 -0800 scsi: lpfc: Fix lpfc_els_retry() possible null pointer dereference Driver crashed in lpfc_debugfs_disc_trc() due to null ndlp pointer. In some calling cases, the ndlp is null and the did is looked up. Fix by using the local did variable that is set appropriately based on ndlp value. Link: https://lore.kernel.org/r/20210301171821.3427-7-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 618e2ee146d414481c39af61fb018f50bee4ad33 Author: James Smart Date: Mon Mar 1 09:18:04 2021 -0800 scsi: lpfc: Fix FLOGI failure due to accessing a freed node After an initial successful FLOGI into the switch, if a subsequent FLOGI fails the driver crashed accessing a node struct. On FLOGI error, the flogi completion logic triggers the final dereference on the node structure without checking if it is registered with a backend. The devloss logic is triggered after node is freed leading to the access of freed node. Fix by adjusting the error path to not take the final dereferece if there is an outstanding transport registration. Let the transport devloss call remove the final reference. Link: https://lore.kernel.org/r/20210301171821.3427-6-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 2693f5deed16e302297fa591862dd9cc560ec3b5 Author: James Smart Date: Mon Mar 1 09:18:03 2021 -0800 scsi: lpfc: Fix stale node accesses on stale RRQ request Whenever an RRQ needs to be triggered, the DID from the node structure and node pointer are stored in the RRQ data structure and the RRQ is scheduled for later transmission. However, at the point in time that the timer triggers, there's no validation on the node pointer. Reference counters may have freed the structure. Additionally the DID in the node may no longer be valid. Fix by not tracking the node pointer in the RRQ, only the DID. At the time of the timer expiration, look up the node with the did and if present, send the RRQ. If no node exists, no need to send the RRQ. Link: https://lore.kernel.org/r/20210301171821.3427-5-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 68a6a66c5168f3995baed3fc5bee2d4515eb16d0 Author: James Smart Date: Mon Mar 1 09:18:02 2021 -0800 scsi: lpfc: Fix reftag generation sizing errors An LBA is 8 bytes. The driver generates a reftag from the LBA but the reftag is 4 bytes. Thus scsi_get_lba() could return a value that exceeds our reftag size. Fix by converting all the code to calling the common routine t10_pi_ref_tag() which returns a u32, thus ensuring a consistent 4byte value. Also correct a few code lines that access LBA directly and ensure 64-bit data types are used. Link: https://lore.kernel.org/r/20210301171821.3427-4-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 58c36e80ee2d3836080b22ba965aa09454c070d6 Author: James Smart Date: Mon Mar 1 09:18:01 2021 -0800 scsi: lpfc: Fix vport indices in lpfc_find_vport_by_vpid() Calls to lpfc_find_vport_by_vpid() for the highest indexed vport fails with error, "2936 Could not find Vport mapped to vpi XXX". Our vport indices in the loop and if-clauses were off by one. Correct the vpid range used for vpi lookup to include the highest possible vpid. Link: https://lore.kernel.org/r/20210301171821.3427-3-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 9302154c07bff4e7f7f43c506a1ac84540303d06 Author: James Smart Date: Mon Mar 1 09:18:00 2021 -0800 scsi: lpfc: Fix incorrect dbde assignment when building target abts wqe The wqe_dbde field indicates whether a Data BDE is present in Words 0:2 and should therefore should be clear in the abts request wqe. By setting the bit we can be misleading fw into error cases. Clear the wqe_dbde field. Link: https://lore.kernel.org/r/20210301171821.3427-2-jsmart2021@gmail.com Co-developed-by: Dick Kennedy Signed-off-by: Dick Kennedy Signed-off-by: James Smart Signed-off-by: Martin K. Petersen commit 771f712ba5b0c6a54534421db98f560526a238a4 Author: Douglas Gilbert Date: Wed Mar 3 20:41:07 2021 -0500 scsi: scsi_debug: Fix cmd duration calculation In some cases, sdebug_defer::cmpl_ts (completion timestamp) wasn't being properly set when REQ_HIPRI was given. Fix that and improve code to only call ktime_get_boottime_ns() for commands with REQ_HIPRI set as cmpl_ts is only used in that case. Link: https://lore.kernel.org/r/20210304014107.307625-1-dgilbert@interlog.com Signed-off-by: Douglas Gilbert Signed-off-by: Martin K. Petersen commit 4309ea74b0c30f00c6a93b94db018ebb416dc14c Author: Kashyap Desai Date: Mon Feb 15 13:10:48 2021 +0530 scsi: core: Set shost as hctx driver_data hctx->driver_data is not set for SCSI currently. Set hctx->driver_data = shost. Link: https://lore.kernel.org/r/20210215074048.19424-6-kashyap.desai@broadcom.com Suggested-by: John Garry Reviewed-by: John Garry Reviewed-by: Hannes Reinecke Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 4a0c6f432d153156f8f73078c4e6fa43bd3a1752 Author: Douglas Gilbert Date: Mon Feb 15 13:10:47 2021 +0530 scsi: scsi_debug: Add new defer type for mq_poll Add a new sdeb_defer_type enumeration: SDEB_DEFER_POLL for requests that have REQ_HIPRI set in cmd_flags field. It is expected that these requests will be polled via the mq_poll entry point which is driven by calls to blk_poll() in the block layer. Therefore timer events are not 'wired up' in the normal fashion. There are still cases with short delays (e.g. < 10 microseconds) where by the time the command response processing occurs, the delay is already exceeded in which case the code calls scsi_done() directly. In such cases there is no window for mq_poll() to be called. Add 'mq_polls' counter that increments on each scsi_done() called via the mq_poll entry point. Can be used to show (with 'cat /proc/scsi/scsi_debug/') that blk_poll() is causing completions rather than some other mechanism. Link: https://lore.kernel.org/r/20210215074048.19424-5-kashyap.desai@broadcom.com Tested-by: Kashyap Desai Signed-off-by: Douglas Gilbert Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit c4b57d89bad8282c9f461e6b3308df160c50ff8e Author: Kashyap Desai Date: Mon Feb 15 13:10:46 2021 +0530 scsi: scsi_debug: mq_poll support Add support of the mq_poll interface to scsi_debug. This feature requires shared host tag support in kernel and driver. Signed-off-by: Kashyap Desai Acked-by: Douglas Gilbert Tested-by: Douglas Gilbert Reviewed-by: Hannes Reinecke Link: https://lore.kernel.org/r/20210215074048.19424-4-kashyap.desai@broadcom.com Cc: dgilbert@interlog.com Cc: linux-block@vger.kernel.org Signed-off-by: Martin K. Petersen commit 9e4bec5b2a230066a0dc9f79f24b4c1bcb668c5a Author: Kashyap Desai Date: Mon Feb 15 13:10:45 2021 +0530 scsi: megaraid_sas: mq_poll support Implement mq_poll interface support in megaraid_sas. This feature requires shared host tag support in kernel and driver. The driver can work in non-IRQ mode which means there will not be any MSI-x vector associated for poll_queues. The MegaRAID hardware has a single submission queue and multiple reply queues. However, using the shared host tagset support will enable the driver to simulate multiple hardware queues. Change driver to allocate some extra reply queues which will be marked as poll_queues. These poll_queues will not have associated MSI-x vectors. All I/O completions on these queues will be done through the IOPOLL interface. megaraid_sas with 8 poll_queues and using the io_uring hiprio=1 setting can reach 3.2M IOPS with zero interrupts generated by the hardware. The IOPOLL feature can be enabled using module parameter poll_queues. Link: https://lore.kernel.org/r/20210215074048.19424-3-kashyap.desai@broadcom.com Cc: sumit.saxena@broadcom.com Cc: chandrakanth.patil@broadcom.com Cc: linux-block@vger.kernel.org Reviewed-by: Hannes Reinecke Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit af1830956dc3dca0c87b2d679f7c91a8fe0331e1 Author: Kashyap Desai Date: Mon Feb 15 13:10:44 2021 +0530 scsi: core: Add mq_poll support to SCSI layer Currently IOPOLL support is only available in block layer. This patch adds mq_poll support to the SCSI layer. Link: https://lore.kernel.org/r/20210215074048.19424-2-kashyap.desai@broadcom.com Cc: sumit.saxena@broadcom.com Cc: chandrakanth.patil@broadcom.com Cc: linux-block@vger.kernel.org Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Signed-off-by: Kashyap Desai Signed-off-by: Martin K. Petersen commit 39ae3edda325e9cf9e978c9788affe88231f3b34 Author: Mike Christie Date: Sat Feb 27 11:00:06 2021 -0600 scsi: target: core: Make completion affinity configurable It may not always be best to complete the IO on same CPU as it was submitted on. This commit allows userspace to configure it. This has been useful for vhost-scsi where we have a single thread for submissions and completions. If we force the completion on the submission CPU we may be adding conflicts with what the user has setup in the lower levels with settings like the block layer rq_affinity or the driver's IRQ or softirq (the network's rps_cpus value) settings. We may also want to set it up where the vhost thread runs on CPU N and does its submissions/completions there, and then have LIO do its completion booking on CPU M, but can't configure the lower levels due to issues like using dm-multipath with lots of paths (the path selector can throw commands all over the system because it's only taking into account latency/throughput at its level). The new setting is in: /sys/kernel/config/target/$fabric/$target/param/cmd_completion_affinity Writing: -1 -> Gives the current default behavior of completing on the submission CPU. -2 -> Completes the cmd on the CPU the lower layers sent it to us from. > 0 -> Completes on the CPU userspace has specified. Link: https://lore.kernel.org/r/20210227170006.5077-26-michael.christie@oracle.com Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 3d75948b8320ac167ec2efe5a8ebf44bdcb3cc14 Author: Mike Christie Date: Sat Feb 27 11:00:05 2021 -0600 scsi: target: core: Flush submission work during TMR processing If a cmd is on the submission workqueue then the TMR code will miss it, and end up returning task not found or success for LUN resets. The fabric driver might then tell the initiator that the running cmds have been handled when they are about to run. This adds a flush when we are processing TMRs to make sure queued cmds do not run after returning the TMR response. Link: https://lore.kernel.org/r/20210227170006.5077-25-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Bodo Stroesser Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 6888da8179fd4cfff4c6b62d5587ec2cd21e316d Author: Mike Christie Date: Sat Feb 27 11:00:04 2021 -0600 scsi: target: tcmu: Add backend plug/unplug callouts This patch adds plug/unplug callouts for tcmu, so we can avoid the number of times we switch to userspace. Using this driver with tcm_loop is a common config, and dependng on the nr_hw_queues (nr_hw_queues=1 performs much better) and fio jobs (lower num jobs around 4) this patch can increase IOPS by only around 5-10% because we hit other issues like the big per tcmu device mutex. Link: https://lore.kernel.org/r/20210227170006.5077-24-michael.christie@oracle.com Reviewed-by: Bodo Stroesser Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 415ccd9811da38aed04f54051c8ae87699c4e6c2 Author: Mike Christie Date: Sat Feb 27 11:00:03 2021 -0600 scsi: target: iblock: Add backend plug/unplug callouts This patch adds plug/unplug callouts for iblock. For an initiator driver like iSCSI which wants to pass multiple cmds to its xmit thread instead of one cmd at a time, this increases IOPS by around 10% with vhost-scsi (combined with the last patches we can see a total 40-50% increase). For driver combos like tcm_loop and faster drivers like the iSER initiator, we can still see IOPS increase by 20-30% when tcm_loop's nr_hw_queues setting is also increased. Link: https://lore.kernel.org/r/20210227170006.5077-23-michael.christie@oracle.com Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 302990ac3b1b1a2b7b66f59a5c88038a51fbe18e Author: Mike Christie Date: Sat Feb 27 11:00:02 2021 -0600 scsi: target: core: Fix backend plugging target_core_iblock is plugging and unplugging on every command and this is causing perf issues for drivers that prefer batched cmds. With recent patches we can now take multiple cmds from a fabric driver queue and then pass them down the backend drivers in a batch. This patch adds this support by adding 2 callouts to the backend for plugging and unplugging the device. Subsequent commits will add support for iblock and tcmu device plugging. Link: https://lore.kernel.org/r/20210227170006.5077-22-michael.christie@oracle.com Reviewed-by: Bodo Stroesser Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 802ec4f672ed64fc3e6a09aa0e4a92a018383767 Author: Mike Christie Date: Sat Feb 27 11:00:01 2021 -0600 scsi: target: core: Cleanup cmd flag bits We have a couple holes in the cmd flags definitions. This cleans up the definitions to fix that and make it easier to read. Link: https://lore.kernel.org/r/20210227170006.5077-21-michael.christie@oracle.com Reviewed-by: Chaitanya Kulkarni Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 1130b499b4a74baa8248002a4fd4275bf137b7f4 Author: Mike Christie Date: Sat Feb 27 11:00:00 2021 -0600 scsi: target: tcm_loop: Use LIO wq cmd submission helper Convert loop to use the LIO wq cmd submission helper. Link: https://lore.kernel.org/r/20210227170006.5077-20-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Bodo Stroesser Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit e0eb5d38b732b011cd9ed5b1bf9f59b83c2500d3 Author: Mike Christie Date: Sat Feb 27 10:59:59 2021 -0600 scsi: target: tcm_loop: Use block cmd allocator for se_cmds Make tcm_loop use the block layer cmd allocator for se_cmds instead of using the tcm_loop_cmd_cache. In the future when we can use the host tags for internal requests like TMFs we can completely kill the tcm_loop_cmd_cache. Link: https://lore.kernel.org/r/20210227170006.5077-19-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 6ec29cb8ad333c1b4efd3acaf7451538c30220ae Author: Mike Christie Date: Sat Feb 27 10:59:58 2021 -0600 scsi: target: vhost-scsi: Use LIO wq cmd submission helper Convert vhost-scsi to use the LIO wq cmd submission helper. Link: https://lore.kernel.org/r/20210227170006.5077-18-michael.christie@oracle.com Signed-off-by: Mike Christie Reviewed-by: Stefan Hajnoczi Signed-off-by: Martin K. Petersen commit eb44ce8c8c7d3b45f9204c7f34577960c00d5919 Author: Mike Christie Date: Sat Feb 27 10:59:57 2021 -0600 scsi: target: core: Add workqueue based cmd submission loop and vhost/scsi do their target cmd submission from driver workqueues. This allows them to avoid an issue where the backend may block waiting for resources like tags/requests, mem/locks, etc and that ends up blocking their entire submission path and for the case of vhost-scsi both the submission and completion path. This patch adds a helper drivers can use to submit from a LIO workqueue. This code will then be extended in the next patches to fix the plugging of backend devices. We are only converting vhost/loop initially, but the workqueue based submission will work for other drivers and have similar benefits where the main target loops will not end up blocking one some backend resource. Link: https://lore.kernel.org/r/20210227170006.5077-17-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Bodo Stroesser Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 08694199477da412baf1852c6d1bf5fedbd40c7e Author: Mike Christie Date: Sat Feb 27 10:59:56 2021 -0600 scsi: target: core: Add gfp_t arg to target_cmd_init_cdb() tcm_loop could be used like a normal block device, so we can't use GFP_KERNEL and should use GFP_NOIO. This adds a gfp_t arg to target_cmd_init_cdb() and converts the users. For every driver but loop GFP_KERNEL is kept. This will also be useful in subsequent patches where loop needs to do target_submit_prep() from interrupt context to get a ref to the se_device, and so it will need to use GFP_ATOMIC. Link: https://lore.kernel.org/r/20210227170006.5077-16-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 0fa50a8b1244e7fc7363712e2c14a27db740cdcb Author: Mike Christie Date: Sat Feb 27 10:59:55 2021 -0600 scsi: target: core: Remove target_submit_cmd_map_sgls() Convert target_submit_cmd() to do its own calls and then remove target_submit_cmd_map_sgls() since no one uses it. Link: https://lore.kernel.org/r/20210227170006.5077-15-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Bodo Stroesser Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 47edc84f3376980cc2f573d25844c0260e756166 Author: Mike Christie Date: Sat Feb 27 10:59:54 2021 -0600 scsi: target: tcm_fc: Convert to new submission API target_submit_cmd() is now only for simple drivers that do their own sync during shutdown and do not use target_stop_session(). tcm_fc uses target_stop_session() to sync session shutdown with LIO core, so we use target_init_cmd(), target_submit_prep(), target_submit(), because target_init_cmd() will now detect the target_stop_session() call and return an error. Link: https://lore.kernel.org/r/20210227170006.5077-14-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 1f48b065dad168eebc4f184e97d4aab7a732bd6a Author: Mike Christie Date: Sat Feb 27 10:59:53 2021 -0600 scsi: target: xen-scsiback: Convert to new submission API target_submit_cmd_map_sgls() is being removed, so convert xen to the new submission API. This has it use target_init_cmd(), target_submit_prep(), or target_submit() because we need to have LIO core map sgls which is now done in target_submit_prep(). target_init_cmd() will never fail for xen because it does its own sync during session shutdown, so we can remove that code. Note: xen never calls target_stop_session() so target_submit_cmd_map_sgls() never failed (in the new API target_init_cmd() handles target_stop_session() being called when cmds are being submitted). If it were to have used target_stop_session() and got an error, we would have hit a refcount bug like xen and usb, because it does: if (rc < 0) { transport_send_check_condition_and_sense(se_cmd, TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0); transport_generic_free_cmd(se_cmd, 0); } transport_send_check_condition_and_sense() calls queue_status which calls scsiback_cmd_done->target_put_sess_cmd. We do an extra transport_generic_free_cmd() call above which would have dropped the refcount to -1 and the refcount code would spit out errors. Link: https://lore.kernel.org/r/20210227170006.5077-13-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit eb929804db7c3525bc302aa043369193edd36542 Author: Mike Christie Date: Sat Feb 27 10:59:52 2021 -0600 scsi: target: vhost-scsi: Convert to new submission API target_submit_cmd_map_sgls() is being removed, so convert vhost-scsi to the new submission API. This has it use target_init_cmd(), target_submit_prep(), target_submit() because we need to have LIO core map sgls which is now done in target_submit_prep(), and in the next patches we will do the target_submit step from the LIO workqueue. Note: vhost-scsi never calls target_stop_session() so target_submit_cmd_map_sgls() never failed (in the new API target_init_cmd() handles target_stop_session() being called when cmds are being submitted). If it were to have used target_stop_session() and got an error, we would have hit a refcount bug like xen and usb, because it does: if (rc < 0) { transport_send_check_condition_and_sense(se_cmd, TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE, 0); transport_generic_free_cmd(se_cmd, 0); } transport_send_check_condition_and_sense() calls queue_status which does transport_generic_free_cmd(), and then we do an extra transport_generic_free_cmd() call above which would have dropped the refcount to -1 and the refcount code would spit out errors. Link: https://lore.kernel.org/r/20210227170006.5077-12-michael.christie@oracle.com Cc: "Michael S. Tsirkin" Cc: Stefan Hajnoczi Reviewed-by: Christoph Hellwig Reviewed-by: Stefan Hajnoczi Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 12340930a3e10a3bec110f808be9eeb301969abf Author: Mike Christie Date: Sat Feb 27 10:59:51 2021 -0600 scsi: target: usb: gadget: Convert to new submission API target_submit_cmd() is now only for simple drivers that do their own sync during shutdown and do not use target_stop_session(). It will never return a failure, so we can remove that code from the driver. Note: Before these patches target_submit_cmd() would never return an error for usb since it does not use target_stop_session(). If it did then we would have hit a refcount error here: transport_send_check_condition_and_sense(se_cmd, TCM_UNSUPPORTED_SCSI_OPCODE, 1); transport_generic_free_cmd(&cmd->se_cmd, 0); transport_send_check_condition_and_sense() calls queue_status and the driver can sometimes do transport_generic_free_cmd() from there via uasp_status_data_cmpl(). In that case, the above transport_generic_free_cmd() would then hit a refcount error. So that other use of the above error path in the driver is also probably wrong, but someone with the hardware needs to fix that. Link: https://lore.kernel.org/r/20210227170006.5077-11-michael.christie@oracle.com Cc: Felipe Balbi Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit c7e086b8d7539f1eafa7748e9c1c19bf33dd269f Author: Mike Christie Date: Sat Feb 27 10:59:50 2021 -0600 scsi: target: sbp_target: Convert to new submission API target_submit_cmd() is now only for simple drivers that do their own sync during shutdown and do not use target_stop_session(). It will never return a failure, so we can remove that code from the driver. Link: https://lore.kernel.org/r/20210227170006.5077-10-michael.christie@oracle.com Cc: Chris Boot Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 17ae18a6efed92ce1bb1a61fa9e7360d3d8fd5b9 Author: Mike Christie Date: Sat Feb 27 10:59:49 2021 -0600 scsi: target: tcm_loop: Convert to new submission API target_submit_cmd_map_sgls() is being removed, so convert loop to the new submission API. Even though loop does its own shutdown sync, this has loop use target_init_cmd()/target_submit_prep()/target_submit() since it needed to map sgls and in the next patches it will use the API to use LIO's workqueue. Link: https://lore.kernel.org/r/20210227170006.5077-9-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 919ba0ad7d5a52cb83ae9aebe4500d8bed0a0830 Author: Mike Christie Date: Sat Feb 27 10:59:48 2021 -0600 scsi: target: qla2xxx: Convert to new submission API target_submit_cmd() is now only for simple drivers that do their own sync during shutdown and do not use target_stop_session(). tcm_qla2xxx uses target_stop_session() to sync session shutdown with LIO core, so we use target_init_cmd()/target_submit_prep()/target_submit(), because target_init_cmd() will detect the target_stop_session() call and return an error. Link: https://lore.kernel.org/r/20210227170006.5077-8-michael.christie@oracle.com Cc: Nilesh Javali Tested-by: Laurence Oberman Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 7d676851de8485ccf99288134eee184e9fd5dac0 Author: Mike Christie Date: Sat Feb 27 10:59:47 2021 -0600 scsi: target: ibmvscsi_tgt: Convert to new submission API target_submit_cmd() is now only for simple drivers that do their own sync during shutdown and do not use target_stop_session(). It will never return a failure, so we can remove that code from the driver. Link: https://lore.kernel.org/r/20210227170006.5077-7-michael.christie@oracle.com Cc: Michael Cyr Reviewed-by: Christoph Hellwig Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 50ab9c47f51dbe3419e414ac6880273f58ac2849 Author: Mike Christie Date: Sat Feb 27 10:59:46 2021 -0600 scsi: target: srpt: Convert to new submission API target_submit_cmd_map_sgls() is being removed, so convert srpt to the new submission API. srpt uses target_stop_session() to sync session shutdown with LIO core, so we use target_init_cmd()/target_submit_prep()/target_submit(), because target_init_cmd() will detect the target_stop_session() call and return an error. Link: https://lore.kernel.org/r/20210227170006.5077-6-michael.christie@oracle.com Cc: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 750a1d93f90583a270eb62f36e6d32ebbb6af779 Author: Mike Christie Date: Sat Feb 27 10:59:45 2021 -0600 scsi: target: core: Break up target_submit_cmd_map_sgls() This breaks up target_submit_cmd_map_sgls() into 3 helpers: - target_init_cmd(): Do the basic general setup and get a refcount to the session to make sure the caller can execute the cmd. - target_submit_prep(): Do the mapping, cdb processing and get a ref to the LUN. - target_submit(): Pass the cmd to LIO core for execution. The above functions must be used by drivers that either: 1. Rely on LIO for session shutdown synchronization by calling target_stop_session(). 2. Need to map sgls. When the next patches are applied then simple drivers that do not need the extra functionality above can use target_submit_cmd() and not worry about failures being returned and how to handle them, since many drivers were getting this wrong and would have hit refcount bugs. Also, by breaking target_submit_cmd_map_sgls() up into these 3 helper functions, we can allow the later patches to do the init/prep from interrupt context and then do the submission from a workqueue. Link: https://lore.kernel.org/r/20210227170006.5077-5-michael.christie@oracle.com Cc: Bart Van Assche Cc: Juergen Gross Cc: Hannes Reinecke Cc: Nilesh Javali Cc: Michael Cyr Cc: Chris Boot Cc: Felipe Balbi Cc: "Michael S. Tsirkin" Cc: Stefan Hajnoczi Tested-by: Laurence Oberman Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit a78b713618c02752310b2be7da465a34fb660ed9 Author: Mike Christie Date: Sat Feb 27 10:59:44 2021 -0600 scsi: target: core: Rename transport_init_se_cmd() Rename transport_init_se_cmd() to __target_init_cmd() to reflect that it is more of an internal function that drivers should normally not use and because we are going to add a new init function in the next patches. Link: https://lore.kernel.org/r/20210227170006.5077-4-michael.christie@oracle.com Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit cb222a013dca1872deeb49fe8c7176f8aa656d5f Author: Mike Christie Date: Sat Feb 27 10:59:43 2021 -0600 scsi: target: core: Drop kref_get_unless_zero() in target_get_sess_cmd() The kref_get_unless_zero() use in target_get_sess_cmd() was added in: commit 1b4c59b7a1d0 ("target: fix potential race window in target_sess_cmd_list_waiting()")' but it does not seem to do anything. The original patch might have thought we could have added the cmd to the sess_wait_list and then target_wait_for_sess_cmds could do a put before target_get_sess_cmd did its get. That wouldn't happen because we do the get first then grab the sess lock and put it on the list. It is also not needed now, because the sess_cmd_list does not exist anymore and we instead wait on the session cmd_count. The other problem with the commit is that several target_submit_cmd_map_sgls()/target_submit_cmd() callers do not handle the error case properly if it were to ever happen. These drivers think they have their normal refcount on the cmd and in many cases do a transport_generic_free_cmd() plus target_put_sess_cmd() so they would have fired off the refcount WARN/BUGs. This patch just changes the kref_get_unless_zero() to kref_get(). Link: https://lore.kernel.org/r/20210227170006.5077-3-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit a9294d86743298c87fd9c39d9ddebf4b04d5da10 Author: Mike Christie Date: Sat Feb 27 10:59:42 2021 -0600 scsi: target: core: Move t_task_cdb initialization Prepare to split target_submit_cmd_map_sgls() so the initialization and submission part can be called at different times. If the init part fails we can reference the t_task_cdb early in some of the logging and tracing code. Move it to transport_init_se_cmd() so we don't hit NULL pointer crashes. Link: https://lore.kernel.org/r/20210227170006.5077-2-michael.christie@oracle.com Tested-by: Laurence Oberman Reviewed-by: Christoph Hellwig Reviewed-by: Himanshu Madhani Signed-off-by: Mike Christie Signed-off-by: Martin K. Petersen commit 020b0f0a31920e5b7e7e120d4560453b67b70733 Author: Ming Lei Date: Fri Jan 22 10:33:17 2021 +0800 scsi: core: Replace sdev->device_busy with sbitmap SCSI currently uses an atomic variable to track queue depth for each attached device. The queue depth depends on many factors such as transport type and device implementation. In addition, the SCSI device queue depth is not a static entity but changes over time as a result of congestion management. While blk-mq currently tracks queue depth for each hctx, it can't easily be changed to accommodate the SCSI per-device requirement. The current approach of using an atomic variable doesn't scale well when there are lots of CPU cores and the disk is very fast. IOPS can be substantially impacted by the atomic in the hot path. Replace the atomic variable sdev->device_busy with an sbitmap for tracking the SCSI device queue depth. It has been observed that IOPS is improved ~30% by this patchset in the following test: 1) test machine(32 logical CPU cores) Thread(s) per core: 2 Core(s) per socket: 8 Socket(s): 2 NUMA node(s): 2 Model name: Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz 2) setup scsi_debug: modprobe scsi_debug virtual_gb=128 max_luns=1 submit_queues=32 delay=0 max_queue=256 3) fio script: fio --rw=randread --size=128G --direct=1 --ioengine=libaio --iodepth=2048 \ --numjobs=32 --bs=4k --group_reporting=1 --group_reporting=1 --runtime=60 \ --loops=10000 --name=job1 --filename=/dev/sdN [mkp: fix device_busy reference in mpt3sas] Link: https://lore.kernel.org/r/20210122023317.687987-14-ming.lei@redhat.com Link: https://lore.kernel.org/linux-block/20200119071432.18558-6-ming.lei@redhat.com/ Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Cc: Hannes Reinecke Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit ca44532139514f5fb0a5a081cd8576e4abe54e65 Author: Ming Lei Date: Fri Jan 22 10:33:16 2021 +0800 scsi: core: Make sure sdev->queue_depth is <= max(shost->can_queue, 1024) Limit SCSI device's queue depth to max(host->can_queue, 1024) in scsi_change_queue_depth(). 1024 is big enough for saturating current fast SCSI LUN(SSD or RAID volume on multiple SSDs). Also single hardware queue depth is usually enough for saturating single LUN because per-core performance is often considered in storage design. This patch is needed for replacing sdev->device_busy with sbitmap which has to be pre-allocated with reasonable max depth. Link: https://lore.kernel.org/r/20210122023317.687987-13-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 8278807abd338f2246b6ae8057f2ec61a80a5614 Author: Ming Lei Date: Fri Jan 22 10:33:15 2021 +0800 scsi: core: Add scsi_device_busy() wrapper Add scsi_device_busy() helper to prepare drivers for tracking device queue depth via sbitmap_queue. Link: https://lore.kernel.org/r/20210122023317.687987-12-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 6cb9b15238a389a8892a6ed08f5c68a0ac45d720 Author: Kashyap Desai Date: Fri Jan 22 10:33:14 2021 +0800 scsi: megaraid_sas: Replace sdev_busy with local counter Use local tracking of per-sdev outstanding command since sdev_busy in SCSI mid layer is improved for performance reason using sbitmap (earlier it was atomic variable). Link: https://lore.kernel.org/r/20210122023317.687987-11-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Reviewed-by: Hannes Reinecke Signed-off-by: Kashyap Desai Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 9ebb4d70dc0e0e8989a13d156020db9d55fcfafd Author: Ming Lei Date: Fri Jan 22 10:33:13 2021 +0800 scsi: core: Put hot fields of scsi_host_template in one cacheline The following three fields of scsi_host_template are referenced in the SCSI I/O submission hot path. Put them together in one cacheline: - cmd_size - queuecommand - commit_rqs Link: https://lore.kernel.org/r/20210122023317.687987-10-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Cc: Hannes Reinecke Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 2a5a24aa83382a88c43d18a901fab66e6ffe1199 Author: Ming Lei Date: Fri Jan 22 10:33:12 2021 +0800 scsi: blk-mq: Return budget token from .get_budget callback SCSI uses a global atomic variable to track queue depth for each LUN/request queue. This doesn't scale well when there are lots of CPU cores and the disk is very fast. It has been observed that IOPS is affected a lot by tracking queue depth via sdev->device_busy in the I/O path. Return budget token from .get_budget callback. The budget token can be passed to driver so that we can replace the atomic variable with sbitmap_queue and alleviate the scaling problems that way. Link: https://lore.kernel.org/r/20210122023317.687987-9-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit d022d18c045fc2ccf92d0f14cf80f98eb0a8e119 Author: Ming Lei Date: Fri Jan 22 10:33:11 2021 +0800 scsi: blk-mq: Add callbacks for storing & retrieving budget token Since SCSI is the only driver which requires dispatch budget move the token from struct request to struct scsi_cmnd. Link: https://lore.kernel.org/r/20210122023317.687987-8-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Cc: Hannes Reinecke Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 2d13b1ea9f4affdaa7af0e0e4a1358d28f80c54f Author: Ming Lei Date: Fri Jan 22 10:33:10 2021 +0800 scsi: sbitmap: Add sbitmap_calculate_shift() helper Move code for calculating default shift into a public helper which can be used by SCSI. Link: https://lore.kernel.org/r/20210122023317.687987-7-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit cbb9950b41dd9dfb7c2be3429ba09f83b8b1ff98 Author: Ming Lei Date: Fri Jan 22 10:33:09 2021 +0800 scsi: sbitmap: Export sbitmap_weight SCSI's .device_busy will be converted to sbitmap and sbitmap_weight is needed. Export the helper. The only existing user of sbitmap_weight() uses it to find out how many bits are set and not cleared. Align sbitmap_weight() meaning with this usage model. Link: https://lore.kernel.org/r/20210122023317.687987-6-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit c548e62bcf6adc7066ff201e9ecc88e536dd8890 Author: Ming Lei Date: Fri Jan 22 10:33:08 2021 +0800 scsi: sbitmap: Move allocation hint into sbitmap Allocation hint should have belonged to sbitmap. Also, when sbitmap's depth is high and there is no need to use mulitple wakeup queues, user can benefit from percpu allocation hint too. Move allocation hint into sbitmap, then SCSI device queue can benefit from allocation hint when converting to plain sbitmap. Convert vhost/scsi.c to use sbitmap allocation with percpu alloc hint. This is more efficient than the previous approach. Link: https://lore.kernel.org/r/20210122023317.687987-5-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Cc: Mike Christie Cc: virtualization@lists.linux-foundation.org Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit bf2c4282a10a92810ba83e85677a5273d6ca0df5 Author: Ming Lei Date: Fri Jan 22 10:33:07 2021 +0800 scsi: sbitmap: Add helpers for updating allocation hint Add helpers for updating allocation hint so that we can avoid duplicate code. Prepare for moving allocation hint into sbitmap. Link: https://lore.kernel.org/r/20210122023317.687987-4-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Cc: Hannes Reinecke Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit efe1f3a1d5833c0ddd61ee50dbef8908f65a0a5e Author: Ming Lei Date: Fri Jan 22 10:33:06 2021 +0800 scsi: sbitmap: Maintain allocation round_robin in sbitmap Currently the allocation round_robin info is maintained by sbitmap_queue. However, bit allocation really belongs to sbitmap. Move it there. Link: https://lore.kernel.org/r/20210122023317.687987-3-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Cc: Hannes Reinecke Cc: virtualization@lists.linux-foundation.org Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 4ec591790356f0e5a95f8d278b0cfd04aea2ae52 Author: Ming Lei Date: Fri Jan 22 10:33:05 2021 +0800 scsi: sbitmap: Remove sbitmap_clear_bit_unlock No one uses this helper any more, so kill it. Link: https://lore.kernel.org/r/20210122023317.687987-2-ming.lei@redhat.com Cc: Omar Sandoval Cc: Kashyap Desai Cc: Sumanesh Samanta Cc: Ewan D. Milne Cc: Hannes Reinecke Tested-by: Sumanesh Samanta Reviewed-by: Hannes Reinecke Reviewed-by: Johannes Thumshirn Signed-off-by: Ming Lei Signed-off-by: Martin K. Petersen commit 7deedfdaeccfec5a9c41dbb83f1725cf11e3ff39 Author: Adrian Hunter Date: Tue Feb 9 08:24:37 2021 +0200 scsi: ufs: ufs-debugfs: Add user-defined exception event rate limiting An enabled user-specified exception event that does not clear quickly will repeatedly cause the handler to run. That could unduly disturb the driver behaviour being tested or debugged. To prevent that add debugfs file exception_event_rate_limit_ms. When a exception event happens, it is disabled, and then after a period of time (default 20ms) the exception event is enabled again. Note that if the driver also has that exception event enabled, it will not be disabled. Link: https://lore.kernel.org/r/20210209062437.6954-5-adrian.hunter@intel.com Acked-by: Bean Huo Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit cd4694756188dcca0f631e60da26053be1ffdc91 Author: Adrian Hunter Date: Tue Feb 9 08:24:36 2021 +0200 scsi: ufs: ufs-debugfs: Add user-defined exception_event_mask Allow users to enable specific exception events via debugfs. The bits enabled by the driver ee_drv_ctrl are separated from the bits enabled by the user ee_usr_ctrl. The control mask ee_mask_ctrl is the logical-or of those two. A mutex is needed to ensure that the masks match what was written to the device. Link: https://lore.kernel.org/r/20210209062437.6954-4-adrian.hunter@intel.com Acked-by: Bean Huo Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 37b97b18704f77f711e7a2c532fcad00268ac025 Author: Adrian Hunter Date: Tue Feb 9 08:24:35 2021 +0200 scsi: ufs: Add exception event definitions For readability and completeness, add exception event definitions. Link: https://lore.kernel.org/r/20210209062437.6954-3-adrian.hunter@intel.com Reviewed-by: Bean Huo Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit f7733625ec2f7bd628e4fd5014f72a2983830a74 Author: Adrian Hunter Date: Tue Feb 9 08:24:34 2021 +0200 scsi: ufs: Add exception event tracepoint Currently, exception event status can be read from wExceptionEventStatus attribute (sysfs file attributes/exception_event_status under the UFS host controller device directory). Polling that attribute to track UFS exception events is impractical, so add a tracepoint to track exception events for testing and debugging purposes. Note, by the time the exception event status is read, the exception event may have cleared, so the value can be zero - see example below. Note also, only enabled exception events can be reported. A subsequent patch adds the ability for users to enable selected exception events via debugfs. Example with driver instrumented to enable all exception events: # echo 1 > /sys/kernel/debug/tracing/events/ufs/ufshcd_exception_event/enable ... do some I/O ... # cat /sys/kernel/debug/tracing/trace # tracer: nop # # entries-in-buffer/entries-written: 3/3 #P:5 # # _-----=> irqs-off # / _----=> need-resched # | / _---=> hardirq/softirq # || / _--=> preempt-depth # ||| / delay # TASK-PID CPU# |||| TIMESTAMP FUNCTION # | | | |||| | | kworker/2:2-173 [002] .... 731.486419: ufshcd_exception_event: 0000:00:12.5: status 0x0 kworker/2:2-173 [002] .... 732.608918: ufshcd_exception_event: 0000:00:12.5: status 0x4 kworker/2:2-173 [002] .... 732.609312: ufshcd_exception_event: 0000:00:12.5: status 0x4 Link: https://lore.kernel.org/r/20210209062437.6954-2-adrian.hunter@intel.com Reviewed-by: Avri Altman Reviewed-by: Bean Huo Signed-off-by: Adrian Hunter Signed-off-by: Martin K. Petersen commit 86a35af628e539f7ae9796f1984761e8d3232ac0 Author: Yonghong Song Date: Fri Feb 26 14:38:10 2021 -0800 selftests/bpf: Add a verifier scale test with unknown bounded loop The original bcc pull request https://github.com/iovisor/bcc/pull/3270 exposed a verifier failure with Clang 12/13 while Clang 4 works fine. Further investigation exposed two issues: Issue 1: LLVM may generate code which uses less refined value. The issue is fixed in LLVM patch: https://reviews.llvm.org/D97479 Issue 2: Spills with initial value 0 are marked as precise which makes later state pruning less effective. This is my rough initial analysis and further investigation is needed to find how to improve verifier pruning in such cases. With the above LLVM patch, for the new loop6.c test, which has smaller loop bound compared to original test, I got: $ test_progs -s -n 10/16 ... stack depth 64 processed 390735 insns (limit 1000000) max_states_per_insn 87 total_states 8658 peak_states 964 mark_read 6 #10/16 loop6.o:OK Use the original loop bound, i.e., commenting out "#define WORKAROUND", I got: $ test_progs -s -n 10/16 ... BPF program is too large. Processed 1000001 insn stack depth 64 processed 1000001 insns (limit 1000000) max_states_per_insn 91 total_states 23176 peak_states 5069 mark_read 6 ... #10/16 loop6.o:FAIL The purpose of this patch is to provide a regression test for the above LLVM fix and also provide a test case for further analyzing the verifier pruning issue. Signed-off-by: Yonghong Song Signed-off-by: Daniel Borkmann Cc: Zhenwei Pi Link: https://lore.kernel.org/bpf/20210226223810.236472-1-yhs@fb.com commit 6ed6e1c761f6c8391af654facbbbf1748ae9f386 Author: Cong Wang Date: Mon Mar 1 10:48:05 2021 -0800 skmsg: Add function doc for skb->_sk_redir This should fix the following warning: include/linux/skbuff.h:932: warning: Function parameter or member '_sk_redir' not described in 'sk_buff' Reported-by: Lorenz Bauer Signed-off-by: Cong Wang Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Acked-by: Lorenz Bauer Link: https://lore.kernel.org/bpf/20210301184805.8174-1-xiyou.wangcong@gmail.com commit d0c5ac04e7feedbc069f26f4dcbf35b521ae7fc5 Author: Linus Walleij Date: Thu Mar 4 01:41:38 2021 +0100 drm/mcde/panel: Inverse misunderstood flag A recent patch renaming MIPI_DSI_MODE_EOT_PACKET to MIPI_DSI_MODE_NO_EOT_PACKET brought to light the misunderstanding in the current MCDE driver and all its associated panel drivers that MIPI_DSI_MODE_EOT_PACKET would mean "use EOT packet" when in fact it means the reverse. Fix it up by implementing the flag right in the MCDE DSI driver and remove the flag from panels that actually want the EOT packet. Suggested-by: Nicolas Boichat Signed-off-by: Linus Walleij Reviewed-by: Nicolas Boichat Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE") Fixes: 899f24ed8d3a ("drm/panel: Add driver for Novatek NT35510-based panels") Fixes: ac1d6d74884e ("drm/panel: Add driver for Samsung S6D16D0 panel") Fixes: 435e06c06cb2 ("drm/panel: s6e63m0: Add DSI transport") Fixes: 8152c2bfd780 ("drm/panel: Add driver for Sony ACX424AKP panel") Link: https://patchwork.freedesktop.org/patch/msgid/20210304004138.1785057-1-linus.walleij@linaro.org commit bc71194e889741eb54a3dcc35fc79215fa9449d2 Author: Jani Nikula Date: Tue Mar 2 13:03:02 2021 +0200 drm/i915/edp: enable eDP MSO during link training If the source and sink support MSO, enable it during link training. v4: Divide DRRS pixel clock by link count before M/N calculation v3: Adjust timings, refer to splitter v2: Limit MSO to pipe A using ->pipe_mask Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2711 Cc: Nischal Varide Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/66da48b4b3c5ccffaac7989097cd96d6c6af8243.1614682842.git.jani.nikula@intel.com commit 512005d949287c2a38f4d65f285b7fb9f8244ed0 Author: Jani Nikula Date: Tue Mar 2 13:03:01 2021 +0200 drm/i915/edp: modify fixed and downclock modes for MSO In the case of MSO (Multi-SST Operation), the EDID contains the timings for a single panel segment. We'll want to hide the fact from userspace, and expose modes that span the entire display. Don't modify the EDID, as the userspace should not use that for modesetting, only modify the actual modes. v3: Use pixel overlap if available. v2: Rename intel_dp_mso_mode_fixup -> intel_edp_mso_mode_fixup Cc: Nischal Varide Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2862284eb033bb0ffc96134b7d5b11bf29e4587f.1614682842.git.jani.nikula@intel.com commit 5bc4fab7e79206926718c3d39cb70cbee22ef4ac Author: Jani Nikula Date: Tue Mar 2 13:03:00 2021 +0200 drm/i915/mso: add splitter state check For starters, we expect the state to be zero, as we don't enable MSO anywhere. v2: Refer to splitter. Cc: Nischal Varide Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/459a332f3cdce941c57312150872559db68f88c1.1614682842.git.jani.nikula@intel.com commit 5b616a2958da0c75a6083e82859ca33be7662562 Author: Jani Nikula Date: Tue Mar 2 13:02:59 2021 +0200 drm/i915/mso: add splitter state readout for platforms that support it Add splitter configuration to crtc state, and read it where supported. Also add splitter state dumping. The stream splitter will be required for eDP MSO. v4: - Catch invalid splitter configuration (Uma) v3: - Convert segment timings to full panel timings. - Refer to splitter instead of mso in crtc state. - Dump splitter state. v2: Add warning for mso being enabled on pipes other than A. Cc: Nischal Varide Cc: Uma Shankar Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/95cbe1c9d45edf3e3ec252e49fb49055def98155.1614682842.git.jani.nikula@intel.com commit ff02db13e9bfa01e0d66c5fa53da29bd1f1b208a Author: Daniel Winkler Date: Wed Mar 3 11:15:23 2021 -0800 Bluetooth: Allow scannable adv with extended MGMT APIs An issue was found, where if a bluetooth client requests a broadcast advertisement with scan response data, it will not be properly registered with the controller. This is because at the time that the hci_cp_le_set_scan_param structure is created, the scan response will not yet have been received since it comes in a second MGMT call. With empty scan response, the request defaults to a non-scannable PDU type. On some controllers, the subsequent scan response request will fail due to incorrect PDU type, and others will succeed and not use the scan response. This fix allows the advertising parameters MGMT call to include a flag to let the kernel know whether a scan response will be coming, so that the correct PDU type is used in the first place. A bluetoothd change is also incoming to take advantage of it. To test this, I created a broadcast advertisement with scan response data and registered it on the hatch chromebook. Without this change, the request fails, and with it will succeed. Reviewed-by: Alain Michaud Reviewed-by: Sonny Sasaka Reviewed-by: Miao-chen Chou Signed-off-by: Daniel Winkler Signed-off-by: Marcel Holtmann commit e5b0ad69c97a04f42834b24a6a0323ab15ccc9bb Author: Abhishek Pandit-Subedi Date: Wed Mar 3 08:34:04 2021 -0800 Bluetooth: Remove unneeded commands for suspend During suspend, there are a few scan enable and set event filter commands that don't need to be sent unless there are actual BR/EDR devices capable of waking the system. Check the HCI_PSCAN bit before writing scan enable and use a new dev flag, HCI_EVENT_FILTER_CONFIGURED to control whether to clear the event filter. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka Reviewed-by: Alain Michaud Signed-off-by: Marcel Holtmann commit 2e989f82181cd414599c6afbc5a666356a3d1dd1 Author: Jin Yao Date: Fri Feb 19 15:00:05 2021 +0800 perf report: Create option to disable raw event ordering Warning "dso not found" is reported when using "perf report -D". 66702781413407 0x32c0 [0x30]: PERF_RECORD_SAMPLE(IP, 0x2): 28177/28177: 0x55e493e00563 period: 106578 addr: 0 ... thread: perf:28177 ...... dso: 66702727832429 0x9dd8 [0x38]: PERF_RECORD_COMM exec: triad_loop:28177/28177 The PERF_RECORD_SAMPLE event (timestamp: 66702781413407) should be after the PERF_RECORD_COMM event (timestamp: 66702727832429), but it's early processed. So for most of cases, it makes sense to keep the event ordered even for dump mode. But it would be also useful to disable ordered_events for reporting raw dump to see events as they are stored in the perf.data file. So now, set ordered_events by default to true and add a new option 'disable-order' to disable it. For example, perf report -D --disable-order Fixes: 977f739b7126b ("perf report: Disable ordered_events for raw dump") Signed-off-by: Jin Yao Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ingo Molnar Cc: Jin Yao Cc: Kan Liang Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20210219070005.12397-1-yao.jin@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo commit 81db00a4ea625c88925b00df9673472bd1b8c77f Author: Jiapeng Chong Date: Thu Feb 25 14:07:00 2021 +0800 perf metric: Remove unneeded semicolon Fix the following coccicheck warnings: ./tools/perf/tests/parse-metric.c:101:2-3: Unneeded semicolon. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/1614233220-67326-1-git-send-email-jiapeng.chong@linux.alibaba.com Signed-off-by: Arnaldo Carvalho de Melo commit 3e3527f5b765c6f479ba55e5a570ee9538589a74 Author: Lee Jones Date: Wed Mar 3 13:42:36 2021 +0000 drm/amd/display/dc/dce/dce_aux: Remove duplicate line causing 'field overwritten' issue Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:59: drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_11_2_sh_mask.h:10014:58: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro ‘AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE__SHIFT’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:127:2: note: in expansion of macro ‘AUX_SF’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:177:2: note: in expansion of macro ‘DCE_AUX_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_11_2_sh_mask.h:10014:58: note: (near initialization for ‘aux_shift.AUX_SW_AUTOINCREMENT_DISABLE’) drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro ‘AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE__SHIFT’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:127:2: note: in expansion of macro ‘AUX_SF’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:177:2: note: in expansion of macro ‘DCE_AUX_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_11_2_sh_mask.h:10013:56: warning: initialized field overwritten [-Woverride-init] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro ‘AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE_MASK’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:127:2: note: in expansion of macro ‘AUX_SF’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce112/dce112_resource.c:181:2: note: in expansion of macro ‘DCE_AUX_MASK_SH_LIST’ drivers/gpu/drm/amd/amdgpu/../include/asic_reg/dce/dce_11_2_sh_mask.h:10013:56: note: (near initialization for ‘aux_mask.AUX_SW_AUTOINCREMENT_DISABLE’) drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:214:16: note: in expansion of macro ‘AUX_SW_DATA__AUX_SW_AUTOINCREMENT_DISABLE_MASK’ drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.h:127:2: note: in expansion of macro ‘AUX_SF’ Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Cc: "Christian König" Cc: David Airlie Cc: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Alex Deucher commit 8e6fafd5a22e7a2eb216f5510db7aab54cc545c1 Author: Dan Carpenter Date: Tue Mar 2 14:15:48 2021 +0300 drm/amd/display: Fix off by one in hdmi_14_process_transaction() The hdcp_i2c_offsets[] array did not have an entry for HDCP_MESSAGE_ID_WRITE_CONTENT_STREAM_TYPE so it led to an off by one read overflow. I added an entry and copied the 0x0 value for the offset from similar code in drivers/gpu/drm/amd/display/modules/hdcp/hdcp_ddc.c. I also declared several of these arrays as having HDCP_MESSAGE_ID_MAX entries. This doesn't change the code, but it's just a belt and suspenders approach to try future proof the code. Fixes: 4c283fdac08a ("drm/amd/display: Add HDCP module") Reviewed-by: Bhawanpreet Lakha Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher commit 8dbc2ccac5a65c5b57e3070e36a3dc97c7970d96 Author: Colin Ian King Date: Wed Mar 3 00:27:59 2021 +0000 drm/radeon: fix copy of uninitialized variable back to userspace Currently the ioctl command RADEON_INFO_SI_BACKEND_ENABLED_MASK can copy back uninitialised data in value_tmp that pointer *value points to. This can occur when rdev->family is less than CHIP_BONAIRE and less than CHIP_TAHITI. Fix this by adding in a missing -EINVAL so that no invalid value is copied back to userspace. Addresses-Coverity: ("Uninitialized scalar variable) Cc: stable@vger.kernel.org # 3.13+ Fixes: 439a1cfffe2c ("drm/radeon: expose render backend mask to the userspace") Reviewed-by: Christian König Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 147ab7a187511a97d723cdec69b485e8aad237a5 Author: Chen Li Date: Wed Mar 3 11:54:56 2021 +0800 drm/amdgpu: correct DRM_ERROR for kvmalloc_array This may avoid debug confusion. Reviewed-by: Christian König Signed-off-by: Chen Li Signed-off-by: Alex Deucher commit b4d916ee0e947f727b48c5abfc1fa5aed3243763 Author: Chen Li Date: Wed Mar 3 11:53:20 2021 +0800 drm/amdgpu: Use kvmalloc for CS chunks The number of chunks/chunks_array may be passed in by userspace and can be large. Reviewed-by: Christian König Signed-off-by: Chen Li Signed-off-by: Alex Deucher commit fec432f557ebbd05975b07db43e5375593e6cad5 Author: Jiapeng Chong Date: Wed Mar 3 17:17:45 2021 +0800 drm/amdgpu: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:2252:40-45: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 43fb6c195dee0f4d6844ec2936257f99473fa057 Author: Kevin Wang Date: Tue Mar 2 15:54:00 2021 +0800 drm/amdgpu: fix parameter error of RREG32_PCIE() in amdgpu_regs_pcie the register offset isn't needed division by 4 to pass RREG32_PCIE() Signed-off-by: Kevin Wang Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher commit e7bdf00e0040e6092305397831ea58fc2107c5d6 Author: Kevin Wang Date: Mon Mar 1 16:53:41 2021 +0800 drm/amdgpu: add SECURE DISPLAY TA firmware info in debugfs add SECUREDISPLAY TA firmware info in amdgpu_fimrware_info() Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 4d5ae731c4b73bd47c57dccdff776cdc59d483f0 Author: Kevin Wang Date: Mon Mar 1 16:51:16 2021 +0800 drm/amdgpu: refine PSP TA firmware info print in debugfs refine PSP TA firmware info print in amdgpu_firmware_info(). Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 183b451d9f4304455106794fd658f18d0acb15ff Author: Xiaojian Du Date: Tue Mar 2 17:46:52 2021 +0800 drm/amd/pm: correct the name of one function for vangogh This patch is to correct the name of one function for vangogh. This function is used to print the clock levels of all kinds of IP components. Signed-off-by: Xiaojian Du Reviewed-by: Kevin Wang Signed-off-by: Alex Deucher commit db6c5b85c3e852c8ebcf65e61dac6cb1a72047ed Author: Jiapeng Chong Date: Mon Mar 1 14:49:47 2021 +0800 drm/amd/display: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c:298:33-38: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit c014170408bcd2e8fc726802ed16794d358742ff Author: Jon Hunter Date: Wed Mar 3 11:55:26 2021 +0000 ASoC: soc-core: Prevent warning if no DMI table is present Many systems do not use ACPI and hence do not provide a DMI table. On non-ACPI systems a warning, such as the following, is printed on boot. WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name! The variable 'dmi_available' is not exported and so currently cannot be used by kernel modules without adding an accessor. However, it is possible to use the function is_acpi_device_node() to determine if the sound card is an ACPI device and hence indicate if we expect a DMI table to be present. Therefore, call is_acpi_device_node() to see if we are using ACPI and only parse the DMI table if we are booting with ACPI. Signed-off-by: Jon Hunter Link: https://lore.kernel.org/r/20210303115526.419458-1-jonathanh@nvidia.com Signed-off-by: Mark Brown commit a49388bd2b75fc7529481b291925a431ecaef65c Author: Ville Syrjälä Date: Fri Feb 26 17:32:04 2021 +0200 drm/i915: Clean up verify_wm_state() Get rid of the nonsense cursor special case in verify_wm_state() by just iterating through all the planes. And let's use the canonical [PLANE:..] style in the debug prints while at it. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210226153204.1270-8-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 5516e89d18f3aeaaf6bdf2db8d767065e77b6a79 Author: Ville Syrjälä Date: Fri Feb 26 17:32:03 2021 +0200 drm/i915: Check tgl+ SAGV watermarks properly We know which WM0 (normal vs. SAGV) we supposedly programmed into the hardware, so just check against that instead of accepting either watermark as valid. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210226153204.1270-7-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 5f25e6a4afd8a5b9b5f4f4a3b31e7a3f55a4a1cb Author: Ville Syrjälä Date: Fri Feb 26 17:32:02 2021 +0200 drm/i915: Introduce SAGV transtion watermark Seems to me that if we calculate WM0 using the bumped up SAGV latency we need to calculate the transition watermark accordingly. Track it alongside the other watermarks. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210226153204.1270-6-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit a68aa48d4ed848bfc0f4edb5e3bb23eae50abcdf Author: Ville Syrjälä Date: Fri Feb 26 17:32:01 2021 +0200 drm/i915: Stuff SAGV watermark into a sub-structure We'll want a SAGV transition watermark as well. Prepare for that by collecting SAGV wm0 into a sub-strcture. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210226153204.1270-5-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit f11449d28ce92859008f728e7a6b39f36cc7773c Author: Ville Syrjälä Date: Fri Feb 26 17:32:00 2021 +0200 drm/i915: Print wm changes if sagv_wm0 changes Let's consider sagv_wm0 as well when deciding whether to dump out the watermark changes. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210226153204.1270-4-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit df4a50a35e2cae77b51ca5e39a19a61272055117 Author: Ville Syrjälä Date: Fri Feb 26 17:31:59 2021 +0200 drm/i915: Zero out SAGV wm when we don't have enough DDB for it Let's handle the SAGV WM0 more like the other wm levels and just totally zero it out when we don't have the DDB space to back it up. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210226153204.1270-3-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 2871b2fde449c2567a2d46a3635356cbc97c9740 Author: Ville Syrjälä Date: Fri Feb 26 17:31:58 2021 +0200 drm/i915: Fix TGL+ plane SAGV watermark programming When we switch between SAGV on vs. off we need to reprogram all plane wateramrks accordingly. Currently skl_wm_add_affected_planes() totally ignores the SAGV watermark and just assumes we will use the normal WM0. Fix this by utilizing skl_plane_wm_level() which picks the correct watermark based on use_sagv_wm. Thus we will force an update on all the planes whose watermark registers need to be reprogrammed. Cc: Stanislav Lisovskiy Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210226153204.1270-2-ville.syrjala@linux.intel.com Reviewed-by: Stanislav Lisovskiy commit 899f9d7bbc01bacefe3b124d4655678ad299177d Author: Ville Syrjälä Date: Tue Feb 16 18:00:35 2021 +0200 drm/i915: Readout conn_state->max_bpc Populate conn_state->max_bpc with something sensible from the start. Otherwise it's possible that we get to compute_sink_pipe_bpp() with max_bpc==0. The specific scenario goes as follows: 1. Initial connector state allocated with max_bpc==0 2. Trigger a modeset on the crtc feeding the connector, without actually adding the connector to the commit 3. drm_atomic_connector_check() is skipped because the connector has not yet been added, hence conn_state->max_bpc retains its current value 4. drm_atomic_helper_check_modeset() -> drm_atomic_add_affected_connectors() -> the connector is now part of the commit 5. compute_baseline_pipe_bpp() -> MISSING_CASE(max_bpc==0) Note that pipe_bpp itself may not be populated on pre-g4x machines, in which case we just fall back to max_bpc==8 and let .compute_config() limit the resulting pipe_bpp further if necessary. Cc: Daniel Vetter Reported-by: Chris Wilson Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210216160035.4780-1-ville.syrjala@linux.intel.com Tested-by: Chris Wilson Reviewed-by: José Roberto de Souza commit 2c48653c1bc3aa6894e45e6037c7693949008816 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:54:30 2021 -0600 ALSA: pci: vx222: fix kernel-doc warning make W=1 warnings: sound/pci/vx222/vx222_ops.c:86: warning: expecting prototype for snd_vx_inb(). Prototype was for vx2_inb() instead sound/pci/vx222/vx222_ops.c:97: warning: expecting prototype for snd_vx_outb(). Prototype was for vx2_outb() instead sound/pci/vx222/vx222_ops.c:110: warning: expecting prototype for snd_vx_inl(). Prototype was for vx2_inl() instead sound/pci/vx222/vx222_ops.c:121: warning: expecting prototype for snd_vx_outl(). Prototype was for vx2_outl() instead sound/pci/vx222/vx222_ops.c:221: warning: expecting prototype for vx_setup_pseudo_dma(). Prototype was for vx2_setup_pseudo_dma() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302215430.87309-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 06495facbb05126017b2badb78d747a0c5d53295 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:54:29 2021 -0600 ALSA: pci: mixart: fix kernel-doc warning make W=1 warning: sound/pci/mixart/mixart_hwdep.c:36: warning: expecting prototype for exit with a timeout(). Prototype was for mixart_wait_nice_for_register_value() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302215430.87309-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 60fd71150391cf6be0276f3be1e71f7196547302 Author: Pierre-Louis Bossart Date: Tue Mar 2 15:54:28 2021 -0600 ALSA: vx: fix kernel-doc warning make W=1 warning: sound/drivers/vx/vx_core.c:410: warning: expecting prototype for snd_vx_boot_xilinx(). Prototype was for snd_vx_load_boot_image() instead Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210302215430.87309-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai commit 303dcc25b5c782547eb13b9f29426de843dd6f34 Author: Andrii Nakryiko Date: Tue Mar 2 16:40:10 2021 -0800 tools/runqslower: Allow substituting custom vmlinux.h for the build Just like was done for bpftool and selftests in ec23eb705620 ("tools/bpftool: Allow substituting custom vmlinux.h for the build") and ca4db6389d61 ("selftests/bpf: Allow substituting custom vmlinux.h for selftests build"), allow to provide pre-generated vmlinux.h for runqslower build. Signed-off-by: Andrii Nakryiko Acked-by: Martin KaFai Lau Acked-by: Yonghong Song Link: https://lore.kernel.org/bpf/20210303004010.653954-1-andrii@kernel.org commit cec3295b246b5555f6de7570d25a13a2754de245 Author: Lyude Paul Date: Tue Feb 16 21:53:37 2021 -0500 drm/i915/icp+: Use icp_hpd_irq_setup() instead of spt_hpd_irq_setup() While reviewing patches for handling workarounds related to gen9 bc, Imre from Intel discovered that we're using spt_hpd_irq_setup() on ICP+ PCHs despite it being almost the same as icp_hpd_irq_setup(). Since we need to be calling icp_hpd_irq_setup() to ensure that CML-S/TGP platforms function correctly anyway, let's move platforms using PCH_ICP which aren't handled by gen11_hpd_irq_setup() over to icp_hpd_irq_setup(). Cc: Tejas Upadhyay Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210217025337.1929015-2-lyude@redhat.com commit 59b7cb44cffde6ab5b8ace1aef9b79f50be1c3eb Author: Tejas Upadhyay Date: Wed Feb 17 13:00:16 2021 -0500 drm/i915/gen9bc: Handle TGP PCH during suspend/resume For Legacy S3 suspend/resume GEN9 BC needs to enable and setup TGP PCH. v2: * Move Wa_14010685332 into it's own function - vsyrjala * Add TODO comment about figuring out if we can move this workaround - imre v3: * Rename cnp_irq_post_reset() to cnp_display_clock_wa() * Add TODO item mentioning we need to clarify which platforms this workaround applies to * Just use ibx_irq_reset() in gen8_irq_reset(). This code should be functionally equivalent on gen9 bc to the code v2 added * Drop icp_hpd_irq_setup() call in spt_hpd_irq_setup(), this looks to be more or less identical to spt_hpd_irq_setup() minus additionally enabling one port. Will update i915 to use icp_hpd_irq_setup() for ICP in a separate patch. v4: * Revert Wa_14010685332 system list in comments to how it was before * Add back HAS_PCH_SPLIT() check before calling ibx_irq_reset() Cc: Matt Roper Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul Reviewed-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210217180016.1937401-1-lyude@redhat.com commit 762949bb1da78941b25e63f7e952af037eee15a9 Author: Lionel Landwerlin Date: Tue Mar 2 20:44:27 2021 +0200 drm: fix drm_mode_create_blob comment Just a silly mistake Signed-off-by: Lionel Landwerlin Suggested-by: Ben Widawsky Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20210302184427.1301264-1-lionel.g.landwerlin@intel.com commit 3fcb4f01deedfa290e903e030956b8e1a5cb764f Author: Chen Li Date: Tue Mar 2 14:42:12 2021 +0800 drm/radeon: Use kvmalloc for CS chunks The number of chunks/chunks_array may be passed in by userspace and can be large. It has been observed to cause kcalloc failures from trinity fuzzy test: WARNING: CPU: 0 PID: 5487 at mm/page_alloc.c:4385 __alloc_pages_nodemask+0x2d8/0x14d0 Obviously, the required order in this case is larger than MAX_ORDER. So, just use kvmalloc instead. Reviewed-by: Christian König Signed-off-by: Chen Li Signed-off-by: Alex Deucher commit 7c7dd77489540d676c2b72304825c6175621e362 Author: Arnd Bergmann Date: Thu Feb 25 16:01:02 2021 +0100 drm/amd/display: Fix an uninitialized index variable clang points out that the new logic uses an always-uninitialized array index: drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9810:38: warning: variable 'i' is uninitialized when used here [-Wuninitialized] timing = &edid->detailed_timings[i]; ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9720:7: note: initialize the variable 'i' to silence this warning My best guess is that the index should have been returned by the parse_hdmi_amd_vsdb() function that walks an array here, so do that. Fixes: f9b4f20c4777 ("drm/amd/display: Add Freesync HDMI support to DM") Reviewed-by: Nick Desaulniers Signed-off-by: Arnd Bergmann Signed-off-by: Alex Deucher commit 6302aead150e8ffb9abe82683e8e30d519e69024 Author: Colin Ian King Date: Tue Mar 2 14:05:09 2021 +0000 drm/amd/display: fix the return of the uninitialized value in ret Currently if stream->signal is neither SIGNAL_TYPE_DISPLAY_PORT_MST or SIGNAL_TYPE_DISPLAY_PORT then variable ret is uninitialized and this is checked for > 0 at the end of the function. Ret should be initialized, I believe setting it to zero is a correct default. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: bd0c064c161c ("drm/amd/display: Add return code instead of boolean for future use") Reviewed-by: Harry Wentland Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 03e0dbcd10c4b3f5bb99804b19bb4b9a2d1af394 Author: Alex Deucher Date: Mon Mar 1 10:42:50 2021 -0500 drm/amdgpu: enable BACO runpm by default on sienna cichlid and navy flounder It works fine and was only disabled because primary GPUs don't enter runpm if there is a console bound to the fbdev due to the kmap. This will at least allow runpm on secondary cards. Reviewed-by: Evan Quan Reviewed-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit 9598173d14f5bc6f2f3a8617dd63a66d3f1e82f0 Author: Alex Deucher Date: Thu Feb 25 10:21:49 2021 -0500 drm/amdgpu: Only check for S0ix if AMD_PMC is configured The S0ix check only makes sense if the AMD PMC driver is present. We need to use the legacy S3 pathes when the PMC driver is not present. Reviewed-by: Prike Liang Reviewed-by: Rajneesh Bhardwaj Signed-off-by: Alex Deucher commit b6f91fc183f758461b9462cc93e673adbbf95c2d Author: Xiaogang Chen Date: Thu Feb 25 12:06:34 2021 -0500 drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work amdgpu DM handles INTERRUPT_LOW_IRQ_CONTEXT interrupt(hpd, hpd_rx) by using work queue and uses single work_struct. If new interrupt is recevied before the previous handler finished, new interrupts(same type) will be discarded and driver just sends "amdgpu_dm_irq_schedule_work FAILED" message out. If some important hpd, hpd_rx related interrupts are missed by driver the hot (un)plug devices may cause system hang or instability, such as issues with system resume from S3 sleep with mst device connected. This patch dynamically allocates new amdgpu_dm_irq_handler_data for new interrupts if previous INTERRUPT_LOW_IRQ_CONTEXT interrupt work has not been handled. So the new interrupt works can be queued to the same workqueue_struct, instead of discard the new interrupts. All allocated amdgpu_dm_irq_handler_data are put into a single linked list and will be reused after. Signed-off-by: Xiaogang Chen Reviewed-by: Aurabindo Pillai Signed-off-by: Alex Deucher commit a8a2e13486343fe84c54681dd3c43ff926eb5927 Author: Vladimir Stempen Date: Thu Feb 25 19:09:46 2021 -0500 drm/amd/display: Fix 64 bit modulus operation using div64 API [why] Synchronization displays with different timings feature uses reminder of 64 bit division (modulus operator) , which is not supported by 32 bit platforms [how] Use div64 API for 64 bit modulus Signed-off-by: Vladimir Stempen Tested-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 783bf4035cb7f2707ad760fbc06f6be01a553f0a Author: Vladimir Stempen Date: Wed Feb 24 14:02:32 2021 -0500 drm/amd/display: Fix 64 bit divisions on 32 bit platforms by using div64 API [why] Synchronization displays with different timings feature uses division operator for 64 bit division, which is not supported by 32 bit platforms [how] Use div64 API for 64 bit division Signed-off-by: Vladimir Stempen Tested-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit 640a28b50c4ad502b931750f13a5f743449e5755 Author: Jonathan Kim Date: Tue Feb 23 16:17:16 2021 -0500 drm/amdgpu: add missing df counter disable write Request to stop DF performance counters is missing the actual write to the controller register. Reported-by: Chris Freehill Signed-off-by: Jonathan Kim Acked-by: Alex Deucher Reviewed-by: Harish Kasiviswanathan Signed-off-by: Alex Deucher commit b8cc3e504622e7d0f9c34bb5bdd523c5b4f88345 Author: Dillon Varone Date: Fri Feb 19 11:48:21 2021 -0500 drm/amd/display: Fix HSplit causing increase in DSC Slice Count [Why?] HSplit should not affect DSC slice count. Can cause improper timings to be applied for certain modes. [How?] No longer change DSC Slice count based on HSplit. Tested-by: Daniel Wheeler Signed-off-by: Dillon Varone Reviewed-by: Dmytro Laktyushkin Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit dbc43d5fdf48e4e558338fcaef8c9d19521d1c2e Author: Hugo Hu Date: Wed Jan 20 15:54:11 2021 +0800 drm/amd/display: treat memory as a single-channel for asymmetric memory [Why] 1. Driver use umachannelnumber to calculate watermarks for stutter. In asymmetric memory config, the actual bandwidth is less than dual-channel. The bandwidth should be the same as single-channel. 2. We found single rank dimm need additional delay time for stutter. [How] Get information from each DIMM. Treat memory config as a single-channel for asymmetric memory in bandwidth calculating. Add additional delay time for single rank dimm. Tested-by: Daniel Wheeler Signed-off-by: Hugo Hu Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c839292754b7710713d9bb59ba8401bc44261ef4 Author: Aric Cyr Date: Mon Feb 22 09:39:35 2021 -0500 drm/amd/display: 3.2.125 DC version 3.2.125 brings improvements in multiple areas. In summary, we highlight: - DSC fixes - Enable ASSR - Firmware relase 0.0.54 - eDP interface refactor for multiple eDP Tested-by: Daniel Wheeler Signed-off-by: Aric Cyr Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit be1748bcdfe0a8f53b890c4c88a155672523559e Author: Anthony Koo Date: Fri Feb 19 17:23:27 2021 -0500 drm/amd/display: [FW Promotion] Release 0.0.54 Tested-by: Daniel Wheeler Signed-off-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 70732504c53b2d3aae2cebc457515a304672d5bb Author: Yongqiang Sun Date: Fri Feb 19 14:50:23 2021 -0500 drm/amd/display: Implement dmub trace event [Why & How] DMUB FW send trace event via outbox0 interrupt. Driver will handle it. Tested-by: Daniel Wheeler Signed-off-by: Yongqiang Sun Reviewed-by: Tony Cheng Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 8039bc7130ef4206a58e4dc288621bc97eba08eb Author: Wyatt Wood Date: Fri Feb 19 12:21:47 2021 -0500 drm/amd/display: Return invalid state if GPINT times out [Why] GPINT timeout is causing PSR_STATE_0 to be returned when it shouldn't. We must guarantee that PSR is fully disabled before doing hw programming on driver-side. [How] Return invalid state if GPINT command times out. Let existing retry logic send the GPINT until successful. Tested-by: Daniel Wheeler Signed-off-by: Wyatt Wood Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 45a1261b393bd3dc24d1ae8a55249c0897df0c88 Author: Jake Wang Date: Fri Feb 5 14:46:20 2021 -0500 drm/amd/display: Refactored DC interfaces to support multiple eDP [Why & How] Some existing DC interfaces are optimized to return a single eDP link/stream. Refactored those DC interfaces to support multiple eDP. Tested-by: Daniel Wheeler Signed-off-by: Jake Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit cca912e0a6b49f45c588e7cc50d3ad13bb859ca5 Author: Eryk Brol Date: Fri Feb 12 15:25:22 2021 -0500 drm/amd/display: Add max bpc debugfs [Why] Useful for testing when setting a max bpc value higher than the default is required [How] Allow for reading/writing of the max_requested_bpc property of the connector Tested-by: Daniel Wheeler Signed-off-by: Eryk Brol Signed-off-by: Ilya Bakoulin Reviewed-by: Mikita Lipski Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4cda3243ec63c63f8b48b45a71b5096ccfe94b12 Author: Max.Tseng Date: Mon Feb 8 15:08:27 2021 +0800 drm/amd/display: Add flag for building infopacket [why] Add flag to build infopacket in SDP v1.3 format Tested-by: Daniel Wheeler Signed-off-by: Max.Tseng Reviewed-by: Anthony Koo Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit e1f4328f22c0c2c4401326123f05d6ab60e5ff09 Author: Jimmy Kizito Date: Tue Jan 5 10:17:05 2021 -0500 drm/amd/display: Update link encoder object creation [Why] Currently the creation of link encoder objects is tightly coupled to the creation of link objects. Decoupling link encoder object creation is a preliminary step in the process of allowing link encoders to be dynamically assigned to links. [How] Add "minimal" link encoder objects which are not associated with any link until required. Tested-by: Daniel Wheeler Signed-off-by: Jimmy Kizito Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit 4f8e37dbaf584de6d38f58b3000b0bfd7eaf2ff6 Author: Meenakshikumar Somasundaram Date: Fri Jan 22 01:25:56 2021 -0500 drm/amd/display: Support for DMUB AUX [WHY] To process AUX transactions with DMUB using inbox1 and outbox1 mail boxes. [HOW] 1) Added inbox1 command DMUB_CMD__DP_AUX_ACCESS to issue AUX commands to DMUB in dc_process_dmub_aux_transfer_async(). DMUB processes AUX cmd with DCN and sends reply back in an outbox1 message triggering an outbox1 interrupt to driver. 2) In existing driver implementation, AUX commands are processed synchronously by configuring DCN reg. But in DMUB AUX, driver sends an inbox1 message and waits for a conditional variable (CV) which will be signaled by outbox1 ISR. 3) As the driver holds dal and dc locks while waiting for CV, the outbox1 ISR is registered with noMutexWait set to true, which allows ISR to run and signal CV. This sets a constraint on ISR to not modify variables such as dc, dmub, etc. 4) Created dmub_outbox.c with dmub_enable_outbox_notification() to enable outbox1 mailbox. 5) New mailbox address ranges allocated for outbox1 of size DMUB_RB_SIZE. Created dmub functions for Outbox1: dmub_dcn20_setup_out_mailbox(), dmub_dcn20_get_outbox1_wptr() and dmub_dcn20_set_outbox1_rptr(). 6) Added functions dc_stat_get_dmub_notification() and dmub_srv_stat_get_notification() to retrieve Outbox1 message. 7) Currently, DMUB doesn't opens DDC in AUX mode before issuing AUX transaction. A workaround is added in dce_aux_transfer_dmub_raw() to open in DDC in AUX mode for every AUX transaction. 8) Added dc debug option enable_dmub_aux_for_legacy_ddc enable/disable DMUB AUX. This debug option is checked dce_aux_transfer_with_retries() to select the method to process AUX transactions. Tested-by: Daniel Wheeler Signed-off-by: Meenakshikumar Somasundaram Reviewed-by: Jun Lei Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit c524c1c9a78f12137da0447e085411cbbd89ab0b Author: Evan Quan Date: Sat Feb 20 11:58:51 2021 +0800 drm/amd/pm: optimize the link width/speed retrieving V2 By using the information provided by PMFW when available. V2: put those structures shared around SMU V11 ASICs in smu_v11_0.h Signed-off-by: Evan Quan Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 7d6c13ef466d817418a04d5f7cd1e572a63b8c57 Author: Evan Quan Date: Sat Feb 20 10:45:32 2021 +0800 drm/amd/pm: bump Navi1x driver if version and related data structures V2 New changes were involved for the SmuMetrics structure. Signed-off-by: Evan Quan Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 3e9e62c780b19a59b9608f8920e6c6b3f5e2a17d Author: Kevin Wang Date: Mon Mar 1 10:45:11 2021 +0800 drm/amdgpu: correct TA RAP firmware information print error miss RAP TA in loop. (when i == 4) Fix: drm/amdgpu: add RAP TA version print in amdgpu_firmware_info Signed-off-by: Kevin Wang Reported-by: Candice Li Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher commit 5cb08553f7f2536f2f5a9142a060af2a77c1d5dc Author: Abhishek Pandit-Subedi Date: Mon Mar 1 12:06:04 2021 -0800 Bluetooth: Notify suspend on le conn failed When suspending, Bluetooth disconnects all connected peers devices. If an LE connection is started but isn't completed, we will see an LE Create Connection Cancel instead of an HCI disconnect. This just adds a check to see if an LE cancel was the last disconnected device and wake the suspend thread when that is the case. Signed-off-by: Abhishek Pandit-Subedi Reviewed-by: Archie Pusaka Signed-off-by: Marcel Holtmann commit 9dc12e4ccd97c07d5c9ed9ea4a75a5e16bc3700e Author: David Hildenbrand Date: Mon Mar 1 12:47:49 2021 +0100 microblaze: tag highmem_setup() with __meminit With commit a0cd7a7c4bc0 ("mm: simplify free_highmem_page() and free_reserved_page()") the kernel test robot complains about a warning: WARNING: modpost: vmlinux.o(.text.unlikely+0x23ac): Section mismatch in reference from the function highmem_setup() to the function .meminit.text:memblock_is_reserved() This has been broken ever since microblaze added highmem support, because memblock_is_reserved() was already tagged with "__init" back then - most probably the function always got inlined, so we never stumbled over it. We need __meminit because __init_memblock defaults to that without CONFIG_ARCH_KEEP_MEMBLOCK" and __init_memblock is not used outside memblock code. Reported-by: kernel test robot Fixes: 2f2f371f8907 ("microblaze: Highmem support") Cc: Andrew Morton Cc: Michal Simek Cc: Mike Rapoport Cc: Andrew Morton Cc: Thomas Gleixner Cc: Arvind Sankar Cc: Ira Weiny Cc: Randy Dunlap Cc: Oscar Salvador Cc: Anshuman Khandual Signed-off-by: David Hildenbrand Reviewed-by: Oscar Salvador Link: https://lore.kernel.org/r/20210301114749.47914-1-david@redhat.com Signed-off-by: Michal Simek commit 8e1488a46dcf73b1f1916d95421e303dbf773fb4 Author: Suzuki K Poulose Date: Wed Feb 24 09:48:35 2021 -0700 perf cs-etm: Detect pid in VMID for kernel running at EL2 The PID of the task could be traced as VMID when the kernel is running at EL2. Teach the decoder to look for VMID when the CONTEXTIDR (Arm32) or CONTEXTIDR_EL1 (Arm64) is invalid but we have a valid VMID. Signed-off-by: Suzuki K Poulose Co-developed-by: Leo Yan Reviewed-by: Mathieu Poirier Cc: Al Grant Cc: Mike Leach Link: https://lore.kernel.org/r/20210213113220.292229-6-leo.yan@linaro.org Link: https://lore.kernel.org/r/20210224164835.3497311-7-mathieu.poirier@linaro.org Signed-off-by: Leo Yan Signed-off-by: Arnaldo Carvalho de Melo commit 290c323008db6e3a44d981a46b56f7f166979a04 Author: Pierre-Louis Bossart Date: Mon Mar 1 18:34:10 2021 -0600 ASoC: SOF: Intel: unregister DMIC device on probe error We only unregister the platform device during the .remove operation, but if the probe fails we will never reach this sequence. Suggested-by: Bard Liao Fixes: dd96daca6c83e ("ASoC: SOF: Intel: Add APL/CNL HW DSP support") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210302003410.1178535-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown commit 47f0d94c203751ddcfdb296fcf15df20fffcef0c Author: Leo Yan Date: Wed Feb 24 09:48:34 2021 -0700 perf cs-etm: Add helper cs_etm__get_pid_fmt() This patch adds helper function cs_etm__get_pid_fmt(), by passing parameter "traceID", it returns the PID format. Signed-off-by: Leo Yan Reviewed-by: Mathieu Poirier Reviewed-by: Suzuki K Poulose Cc: Mike Leach Link: https://lore.kernel.org/r/20210213113220.292229-5-leo.yan@linaro.org Link: https://lore.kernel.org/r/20210224164835.3497311-6-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 30cb76aabfb4deab4ffef54882f86df319b4d862 Author: Suzuki K Poulose Date: Wed Feb 24 09:48:33 2021 -0700 perf cs-etm: Support PID tracing in config If the kernel is running at EL2, the pid of a task is exposed via VMID instead of the CONTEXTID. Add support for this in the perf tool. This patch respects user setting if user has specified any configs from "contextid", "contextid1" or "contextid2"; otherwise, it dynamically sets config based on PMU format "contextid". Signed-off-by: Suzuki K Poulose Co-developed-by: Leo Yan Signed-off-by: Leo Yan Reviewed-by: Mike Leach Reviewed-by: Mathieu Poirier Cc: Al Grant Link: https://lore.kernel.org/r/20210213113220.292229-4-leo.yan@linaro.org Link: https://lore.kernel.org/r/20210224164835.3497311-5-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 8c559e8d68630d64d932bada633705f6551427df Author: Suzuki K Poulose Date: Wed Feb 24 09:48:32 2021 -0700 perf cs-etm: Fix bitmap for option When set option with macros ETM_OPT_CTXTID and ETM_OPT_TS, it wrongly takes these two values (14 and 28 prespectively) as bit masks, but actually both are the offset for bits. But this doesn't lead to further failure due to the AND logic operation will be always true for ETM_OPT_CTXTID / ETM_OPT_TS. This patch uses the BIT() macro for option bits, thus it can request the correct bitmaps for "contextid" and "timestamp" when calling cs_etm_set_option(). Signed-off-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier Reviewed-by: Mike Leach Link: https://lore.kernel.org/r/20210213113220.292229-3-leo.yan@linaro.org Link: https://lore.kernel.org/r/20210224164835.3497311-4-mathieu.poirier@linaro.org [Extract the change as a separate patch for easier review] Signed-off-by: Leo Yan Signed-off-by: Arnaldo Carvalho de Melo commit 2bb4ccbd95d7fbf58540c8d3d55cbabc8fb95e28 Author: Leo Yan Date: Wed Feb 24 09:48:31 2021 -0700 tools headers UAPI: Update tools' copy of linux/coresight-pmu.h To get the changes in the commit: "coresight: etm-perf: Clarify comment on perf options". Signed-off-by: Leo Yan Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier Cc: Mike Leach Link: https://lore.kernel.org/r/20210213113220.292229-2-leo.yan@linaro.org Link: https://lore.kernel.org/r/20210224164835.3497311-3-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 42b2b570b34afb5fb9dc16ac77cb332194136a85 Author: Mike Leach Date: Wed Feb 24 09:48:30 2021 -0700 perf cs-etm: Update ETM metadata format The current fixed metadata version format (version 0), means that adding metadata parameter items renders files from a previous version of perf unreadable. Per CPU parameters appear in a fixed order, but there is no field to indicate the number of ETM parameters per CPU. This patch updates the per CPU parameter blocks to include a NR_PARAMs value which indicates the number of parameters in the block. The header version is incremented to 1. Fixed ordering is retained, new ETM parameters are added to the end of the list. The reader code is updated to be able to read current version 0 files, For version 1, the reader will read the number of parameters in the per CPU block. This allows the reader to process older or newer files that may have different numbers of parameters than in use at the time perf was built. Signed-off-by: Mike Leach Reviewed-by: Leo Yan Tested-by: Leo Yan Link: https://lore.kernel.org/r/20210202214040.32349-1-mike.leach@linaro.org Link: https://lore.kernel.org/r/20210224164835.3497311-2-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo commit 83bf6fb8b076c72fe42e7d0fab5a5c98b5e2a11a Author: Paul A. Clarke Date: Wed Feb 24 12:14:36 2021 -0600 perf vendor events power9: Remove unsupported metrics Several metrics are defined based on unsupported / non-existent events, and silently discarded. Remove them for good code hygiene and to avoid confusion. Signed-off-by: Paul A. Clarke Reviewed-by: Kajol Jain Cc: Ananth N Mavinakayanahalli Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Naveen N. Rao Cc: Sukadev Bhattiprolu Link: https://lore.kernel.org/r/20210224181436.782091-1-pc@us.ibm.com Signed-off-by: Arnaldo Carvalho de Melo commit 34968b9327c83589e2867af3c5b9fd993666a514 Author: Nicholas Fraser Date: Wed Feb 24 14:59:16 2021 -0500 perf buildid-cache: Add test for PE executable This builds on the previous changes to tests/shell/buildid.sh, adding tests for a PE file. It adds it to the build-id cache manually and, if Wine is available, runs it under "perf record" and verifies that it was added automatically. If wine is not installed, only warnings are printed; the test can still exit 0. Signed-off-by: Nicholas Fraser Reviewed-by: Jiri Olsa Cc: Alexander Shishkin Cc: Huw Davies Cc: Ian Rogers Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ulrich Czekalla Link: http://lore.kernel.org/lkml/790bfe67-2155-a426-7130-ae7c45cb055b@codeweavers.com Signed-off-by: Arnaldo Carvalho de Melo commit 9bb8b74bdb186bd378cd5d510e8261538ca40094 Author: Ian Rogers Date: Thu Nov 19 22:30:37 2020 -0800 perf docs: Add man pages to see also Add all other man pages to the "see also" list except for perf-script-perl and perf-script-python that are linked to from perf-script. Signed-off-by: Ian Rogers Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20201120063037.3166069-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo commit 64f416c86973fc56bdabd1b842a6b29dad400f0a Author: Masahiro Yamada Date: Mon Mar 1 23:23:03 2021 +0900 microblaze: syscalls: switch to generic syscallhdr.sh Many architectures duplicate similar shell scripts. This commit converts microblaze to use scripts/syscallhdr.sh. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210301142303.343727-2-masahiroy@kernel.org Signed-off-by: Michal Simek commit ce372128a79bc2db9966302fb1e3608194455ca7 Author: Masahiro Yamada Date: Mon Mar 1 23:23:02 2021 +0900 microblaze: syscalls: switch to generic syscalltbl.sh Many architectures duplicate similar shell scripts. This commit converts microblaze to use scripts/syscalltbl.sh. Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20210301142303.343727-1-masahiroy@kernel.org Signed-off-by: Michal Simek commit 1db6295db904c736c2013efdf0a493105d62c332 Author: Daniel Vetter Date: Fri Feb 26 14:36:47 2021 +0100 drm/arcpgu: Really delete file Somehow this got forgotten when I applied the patch in commit e2c406ea0b0d398a4afda5702957064cc74f8c25 Author: Daniel Vetter Date: Tue Jan 12 09:43:54 2021 +0100 drm/arc: Inline arcpgu_crtc.c Fixes: e2c406ea0b0d ("drm/arc: Inline arcpgu_crtc.c") Cc: Thomas Zimmermann Cc: Eugeniy Paltsev Cc: Daniel Vetter Cc: Sam Ravnborg Cc: Alexey Brodkin Signed-off-by: Daniel Vetter Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210226133647.1403642-1-daniel.vetter@ffwll.ch commit d49c3e711c2b79841bc5c5cf5b46144bb681e380 Author: dingsenjie Date: Tue Mar 2 11:40:53 2021 +0800 ALSA: ps3: fix spelling typo of values vaules -> values Signed-off-by: dingsenjie Link: https://lore.kernel.org/r/20210302034053.34524-1-dingsenjie@163.com Signed-off-by: Takashi Iwai commit b8db8be812cb2c08cd8f6d12c6c773c198be83f1 Author: Nicolas MURE Date: Mon Mar 1 16:27:29 2021 +0100 ALSA: usb-audio: fix Pioneer DJM-850 control label info Unlike the other DJM, the value to set the "CD/LINE" and "LINE" capture control options are inverted. This fix makes sure that the displayed info label while using `alsamixer` matches the input switches label on the DJM-850 mixer. Signed-off-by: Nicolas MURE Link: https://lore.kernel.org/r/20210301152729.18094-5-nicolas.mure2019@gmail.com Signed-off-by: Takashi Iwai commit 1a2a94a4392d5d1e5e25cc127573452f4c7fa9b8 Author: Nicolas MURE Date: Mon Mar 1 16:27:28 2021 +0100 ALSA: usb-audio: Configure Pioneer DJM-850 samplerate Send an `URB_CONTROL out` USB frame to the device to configure its samplerate. This should be done before using the device for audio streaming (capture or playback). See https://github.com/nm2107/Pioneer-DJM-850-driver-reverse-engineering/blob/172fb9a61055960c88c67b7c416fe5bf3609807b/doc/windows-dvs/framerate-setting/README.md Signed-off-by: Nicolas MURE Link: https://lore.kernel.org/r/20210301152729.18094-4-nicolas.mure2019@gmail.com Signed-off-by: Takashi Iwai commit 7687850b95b4883b7a4778be45576d8288603ee6 Author: Nicolas MURE Date: Mon Mar 1 16:27:27 2021 +0100 ALSA: usb-audio: Declare Pioneer DJM-850 mixer controls Declare audio capture controls to choose the audio source, and also to set the capture level (in dB). See https://github.com/nm2107/Pioneer-DJM-850-driver-reverse-engineering/blob/172fb9a61055960c88c67b7c416fe5bf3609807b/doc/windows-djm-850-setting-utility/mixer-output-tab/README.md Signed-off-by: Nicolas MURE Link: https://lore.kernel.org/r/20210301152729.18094-3-nicolas.mure2019@gmail.com Signed-off-by: Takashi Iwai commit a3c30b0cb6d05f5bf66d1a5d42e876f31753a447 Author: Nicolas MURE Date: Mon Mar 1 16:27:26 2021 +0100 ALSA: usb-audio: Add Pioneer DJM-850 to quirks-table Declare the Pioneer DJM-850 interfaces for capture and playback. See https://github.com/nm2107/Pioneer-DJM-850-driver-reverse-engineering/blob/172fb9a61055960c88c67b7c416fe5bf3609807b/doc/usb-device-specifications.md for the complete device spec. Signed-off-by: Nicolas MURE Link: https://lore.kernel.org/r/20210301152729.18094-2-nicolas.mure2019@gmail.com Signed-off-by: Takashi Iwai commit 927a4c7b7ec14fbb0cd3d7ce1071b96fb5588982 Merge: eb596e0fd13c8 2c9119001dcb1 Author: Takashi Iwai Date: Tue Mar 2 10:17:36 2021 +0100 Merge branch 'for-linus' into for-next Back-merge of 5.12 devel branch for applying the further Pioneer DJM patches. Signed-off-by: Takashi Iwai commit d27f8feaf8543cc0e315f8ea13c9d99222bdd783 Merge: 4d4e677a68e77 e4ffab875d32b Author: Mark Brown Date: Mon Mar 1 23:31:40 2021 +0000 Merge series "AsoC: rt5640/rt5651: Volume control fixes" from Hans de Goede : Hi All, Here is a series of rt5640/rt5651 volume-control fixes which I wrote while working on a bytcr-rt5640 UCM profile patch-series adding hardware-volume control to devices using this UCM profile. The UCM series will also work on older kernels, but it works best on kernels with this series applied, giving e.g. finer grained volume control and support for hardware muting the outputs. Regards, Hans Hans de Goede (5): ASoC: rt5640: Fix dac- and adc- vol-tlv values being off by a factor of 10 ASoC: rt5651: Fix dac- and adc- vol-tlv values being off by a factor of 10 ASoC: rt5640: Add emulated 'DAC1 Playback Switch' control ASoC: rt5640: Rename 'Mono DAC Playback Volume' to 'DAC2 Playback Volume' ASoC: Intel: bytcr_rt5640: Add used AIF to the components string sound/soc/codecs/rt5640.c | 106 +++++++++++++++++++++++--- sound/soc/codecs/rt5640.h | 4 + sound/soc/codecs/rt5651.c | 4 +- sound/soc/intel/boards/bytcr_rt5640.c | 11 ++- 4 files changed, 111 insertions(+), 14 deletions(-) -- 2.30.1 commit d9fd5a718977702f2fd112a081b62572e39f24db Author: Tiezhu Yang Date: Thu Feb 4 11:35:24 2021 +0800 perf tools: Generate mips syscalls_n64.c syscall table Grab a copy of arch/mips/kernel/syscalls/syscall_n64.tbl and use it to generate tools/perf/arch/mips/include/generated/asm/syscalls_n64.c file, this is similar with commit 1b700c997500 ("perf tools: Build syscall table .c header from kernel's syscall_64.tbl") Signed-off-by: Tiezhu Yang Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Juxin Gao Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Thomas Bogendoerfer Cc: Xuefeng Li Cc: linux-mips@vger.kernel.org Link: http://lore.kernel.org/lkml/1612409724-3516-4-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Arnaldo Carvalho de Melo commit b5f184fbdb03b4fcc1141de34dd5ec964ca5d99e Author: Tiezhu Yang Date: Thu Feb 4 11:35:23 2021 +0800 perf tools: Support MIPS unwinding and dwarf-regs Map perf APIs (perf_reg_name/get_arch_regstr/unwind__arch_reg_id) with MIPS specific registers. [ayan@wavecomp.com: repick this patch for unwinding userstack backtrace by perf and libunwind on MIPS based CPU.] [yangtiezhu@loongson.cn: Add sample_reg_masks[] to fix build error, silence some checkpatch errors and warnings, and also separate the original patches into two parts (MIPS kernel and perf tools) to merge easily.] The original patches: https://lore.kernel.org/patchwork/patch/1126521/ https://lore.kernel.org/patchwork/patch/1126520/ Committer notes: Do it as __perf_reg_name() to cope with: 067012974c8ae31a ("perf tools: Fix arm64 build error with gcc-11") Signed-off-by: Tiezhu Yang Cc: Alexander Shishkin Cc: Archer Yan Cc: David Daney Cc: Jianlin Lv Cc: Jiri Olsa Cc: Juxin Gao Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Xuefeng Li Cc: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org Link: http://lore.kernel.org/lkml/1612409724-3516-3-git-send-email-yangtiezhu@loongson.cn Signed-off-by: Archer Yan Signed-off-by: David Daney Signed-off-by: Ralf Baechle Signed-off-by: Arnaldo Carvalho de Melo commit 4d4e677a68e770b84c87d1438d9f4e161658536a Author: Hans de Goede Date: Sun Feb 28 17:04:41 2021 +0100 ASoC: es8316: Simplify adc_pga_gain_tlv table Most steps in this table are steps of 3dB (300 centi-dB), so we can simplify the table. This not only reduces the amount of space it takes inside the kernel, this also makes alsa-lib's mixer code actually accept the table, where as before this change alsa-lib saw the "ADC PGA Gain" control as a control without a dB scale. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210228160441.241110-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit d74fcdc51afd431ca9d956e032e14d12f0ee4153 Author: Benjamin Rood Date: Fri Feb 19 13:33:08 2021 -0500 ASoC: sgtl5000: set DAP_AVC_CTRL register to correct default value on probe According to the SGTL5000 datasheet [1], the DAP_AVC_CTRL register has the following bit field definitions: | BITS | FIELD | RW | RESET | DEFINITION | | 15 | RSVD | RO | 0x0 | Reserved | | 14 | RSVD | RW | 0x1 | Reserved | | 13:12 | MAX_GAIN | RW | 0x1 | Max Gain of AVC in expander mode | | 11:10 | RSVD | RO | 0x0 | Reserved | | 9:8 | LBI_RESP | RW | 0x1 | Integrator Response | | 7:6 | RSVD | RO | 0x0 | Reserved | | 5 | HARD_LMT_EN | RW | 0x0 | Enable hard limiter mode | | 4:1 | RSVD | RO | 0x0 | Reserved | | 0 | EN | RW | 0x0 | Enable/Disable AVC | The original default value written to the DAP_AVC_CTRL register during sgtl5000_i2c_probe() was 0x0510. This would incorrectly write values to bits 4 and 10, which are defined as RESERVED. It would also not set bits 12 and 14 to their correct RESET values of 0x1, and instead set them to 0x0. While the DAP_AVC module is effectively disabled because the EN bit is 0, this default value is still writing invalid values to registers that are marked as read-only and RESERVED as well as not setting bits 12 and 14 to their correct default values as defined by the datasheet. The correct value that should be written to the DAP_AVC_CTRL register is 0x5100, which configures the register bits to the default values defined by the datasheet, and prevents any writes to bits defined as 'read-only'. Generally speaking, it is best practice to NOT attempt to write values to registers/bits defined as RESERVED, as it generally produces unwanted/undefined behavior, or errors. Also, all credit for this patch should go to my colleague Dan MacDonald for finding this error in the first place. [1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf Signed-off-by: Benjamin Rood Reviewed-by: Fabio Estevam Link: https://lore.kernel.org/r/20210219183308.GA2117@ubuntu-dev Signed-off-by: Mark Brown commit e4ffab875d32bf4ffa37b5cd725ace9e15d1707d Author: Hans de Goede Date: Fri Feb 26 15:38:14 2021 +0100 ASoC: rt5651: Fix dac- and adc- vol-tlv values being off by a factor of 10 The adc_vol_tlv volume-control has a range from -17.625 dB to +30 dB, not -176.25 dB to + 300 dB. This wrong scale is esp. a problem in userspace apps which translate the dB scale to a linear scale. With the logarithmic dB scale being of by a factor of 10 we loose all precision in the lower area of the range when apps translate things to a linear scale. E.g. the 0 dB default, which corresponds with a value of 47 of the 0 - 127 range for the control, would be shown as 0/100 in alsa-mixer. Since the centi-dB values used in the TLV struct cannot represent the 0.375 dB step size used by these controls, change the TLV definition for them to specify a min and max value instead of min + stepsize. Note this mirrors commit 3f31f7d9b540 ("ASoC: rt5670: Fix dac- and adc- vol-tlv values being off by a factor of 10") which made the exact same change to the rt5670 codec driver. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210226143817.84287-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit 24a7b77daed8f973bf8a5ed2f83344f44f9f6396 Author: Hans de Goede Date: Fri Feb 26 15:38:13 2021 +0100 ASoC: rt5640: Fix dac- and adc- vol-tlv values being off by a factor of 10 The adc_vol_tlv volume-control has a range from -17.625 dB to +30 dB, not -176.25 dB to + 300 dB. This wrong scale is esp. a problem in userspace apps which translate the dB scale to a linear scale. With the logarithmic dB scale being of by a factor of 10 we loose all precision in the lower area of the range when apps translate things to a linear scale. E.g. the 0 dB default, which corresponds with a value of 47 of the 0 - 127 range for the control, would be shown as 0/100 in alsa-mixer. Since the centi-dB values used in the TLV struct cannot represent the 0.375 dB step size used by these controls, change the TLV definition for them to specify a min and max value instead of min + stepsize. Note this mirrors commit 3f31f7d9b540 ("ASoC: rt5670: Fix dac- and adc- vol-tlv values being off by a factor of 10") which made the exact same change to the rt5670 codec driver. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210226143817.84287-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit 79bfe480a0a0b259ab9fddcd2fe52c03542b1196 Author: Nobuhiro Iwamatsu Date: Tue Feb 16 00:58:49 2021 +0900 firmware: xilinx: Remove zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE) zynqmp_pm_get_eemi_ops() was removed in commit 4db8180ffe7c: "Firmware: xilinx: Remove eemi ops for fpga related APIs", but not in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE). Any driver who want to communicate with PMC using EEMI APIs use the functions provided for each function This removed zynqmp_pm_get_eemi_ops() in IS_REACHABLE(CONFIG_ZYNQMP_FIRMWARE), and also modify the documentation for this driver. Fixes: 4db8180ffe7c ("firmware: xilinx: Remove eemi ops for fpga related APIs") Signed-off-by: Nobuhiro Iwamatsu Link: https://lore.kernel.org/r/20210215155849.2425846-1-iwamatsu@nigauri.org Signed-off-by: Michal Simek commit f1f21bece82c76a56a96988ec7d51ccc033d8949 Author: Tejas Patel Date: Sun Feb 7 22:31:23 2021 -0800 firmware: xilinx: Fix dereferencing freed memory Fix smatch warning: drivers/firmware/xilinx/zynqmp.c:1288 zynqmp_firmware_remove() error: dereferencing freed memory 'feature_data' Use hash_for_each_safe for safe removal of hash entry. Fixes: acfdd18591ea ("firmware: xilinx: Use hash-table for api feature check") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Tejas Patel Signed-off-by: Rajan Vaja Link: https://lore.kernel.org/r/1612765883-22018-1-git-send-email-rajan.vaja@xilinx.com Signed-off-by: Michal Simek commit eb596e0fd13c83b4a66559a45b57b71aac340d30 Author: George Harker Date: Fri Feb 26 21:26:16 2021 +0000 ALSA: usb-audio: generate midi streaming substream names from jack names A number of devices have named substreams which are hard to remember / decypher from MIDI n names. Eg. Korg puts a pass through on one substream and iConnectivity devices name the connections. This makes it easier to connect to the correct device. Devices which handle naming through quirks are unaffected by this change. Addresses TODO comment in sound/usb/midi.c Signed-off-by: George Harker Link: https://lore.kernel.org/r/20210226212617.24616-1-george@george-graphics.co.uk Signed-off-by: Takashi Iwai commit d6e68c57e35b69b31d9fa5a61b37c840973db362 Author: George Harker Date: Fri Feb 26 21:24:56 2021 +0000 ALSA: usb-audio: use usb headers rather than define structs locally Use struct definitions from linux/usb/midi.h rather than locally define the structs in sound/usb/midi.c. Signed-off-by: George Harker Link: https://lore.kernel.org/r/20210226212457.24538-1-george@george-graphics.co.uk Signed-off-by: Takashi Iwai commit d9c05d22da797297e66fe3e6b9edbef86352be1c Merge: fe07bfda2fb9c d0e185616a033 Author: Takashi Iwai Date: Mon Mar 1 09:18:26 2021 +0100 Merge branch 'for-linus' into for-next commit fbde4ae7e15f71b57d194c5730189ac883622891 Author: Jan Beulich Date: Tue Feb 23 17:41:03 2021 +0100 drm/xen: adjust Kconfig By having selected DRM_XEN, I was assuming I would build the frontend driver. As it turns out this is a dummy option, and I have really not been building this (because I had DRM disabled). Make it a promptless one, moving the "depends on" to the other, real option, and "select"ing the dummy one. Signed-off-by: Jan Beulich Reviewed-by: Oleksandr Andrushchenko Signed-off-by: Oleksandr Andrushchenko Link: https://patchwork.freedesktop.org/patch/msgid/54ae54f9-1ba9-900b-a56f-f48e2c9a82b0@suse.com commit 9317f356df83a5caeccae2e343d1a569929bcfc9 Author: Bhaskar Chowdhury Date: Mon Feb 22 13:48:38 2021 +0530 drm/i915/gvt: Fixed couple of spellings in the file gtt.c s/negtive/negative/ s/possilbe/possible/ Signed-off-by: Bhaskar Chowdhury Acked-by: Randy Dunlap Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20210222081838.30328-1-unixbhaskar@gmail.com commit b01739fb865a268aec617f6bb5d2ef498da72697 Author: Colin Xu Date: Fri Feb 26 12:46:30 2021 +0800 drm/i915/gvt: Refactor GVT vblank emulator for vGPU virtual display Current vblank emulator uses single hrtimer at 16ms period for all vGPUs, which introduces three major issues: - 16ms matches the refresh rate at 62.5Hz (instead of 60Hz) which doesn't follow standard timing. This leads to some frame drop or glitch issue during video playback. SW expects a vsync interval of 16.667ms or higher precision for an accurate 60Hz refresh rate. However current vblank emulator only works at 16ms. - Doesn't respect the fact that with current virtual EDID timing set, not all resolutions are running at 60Hz. For example, current virtual EDID also supports refresh rate at 56Hz, 59.97Hz, 60Hz, 75Hz, etc. - Current vblank emulator use single hrtimer for all vGPUs. Regardsless the possibility that different guests could run in different resolutions, all vsync interrupts are injected at 16ms interval with same hrtimer. Based on previous patch which decode guest expected refresh rate from vreg, the vblank emulator refactor patch makes following changes: - Change the vblank emulator hrtimer from gvt global to per-vGPU. By doing this, each vGPU display can operates at different refresh rates. Currently only one dislay is supported for each vGPU so per-vGPU hrtimer is enough. If multiple displays are supported per-vGPU in future, we can expand to per-PIPE further. - Change the fixed hrtimer period from 16ms to dynamic based on vreg. GVT is expected to emulate the HW as close as possible. So reflacting the accurate vsync interrupt interval is more correct than fixed 16ms. - Change the vblank timer period and start the timer on PIPECONF change. The initial period is updated to 16666667 based on 60Hz refresh rate. According to PRM, PIPECONF controls the timing generator of the connected display on this pipe, so it's safe to stop hrtimer on PIPECONF disabling, and re-start hrtimer at new period on enabling. Other changes including: - Move vblank_timer_fn from irq.c into display.c. - Clean per-vGPU vblank timer at clean_display instead of clean_irq. To run quick test, launch a web browser and goto URL: www.displayhz.com The actual refresh rate from guest can now always match guest settings. V2: Rebase to 5.11. Remove unused intel_gvt_clean_irq(). Simplify enable logic in update_vblank_emulation(). (zhenyu) Loop all vGPU by idr when check all vblank timer. (zhenyu) Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20210226044630.284269-1-colin.xu@intel.com Reviewed-by: Zhenyu Wang commit 6a4500c7b83f9e4470dd20cf89f691abd132d090 Author: Colin Xu Date: Fri Feb 26 12:45:59 2021 +0800 drm/i915/gvt: Get accurate vGPU virtual display refresh rate from vreg Guest OS builds up its timing mode list based on the virtual EDID as simulated by GVT. However since there are several timings supported in the virtual EDID, and each timing can also support several modes (resolution and refresh rate), current emulated vblank period (16ms) may not always be correct and could lead to miss-sync behavior in guest. Guest driver will setup new resolution and program vregs accordingly and it should always follows GEN PRM. Based on the simulated display regs by GVT, it's safe to decode the actual refresh rate using by guest from vreg only. Current implementation only enables PIPE_A and PIPE_A is always tied to TRANSCODER_A in HW. GVT may simulate DP monitor on PORT_B or PORT_D based on the caller. So we can find out which DPLL is used by PORT_x which connected to TRANSCODER_A and calculate the DP bit rate from the DPLL frequency. Then DP stream clock (pixel clock) can be calculated from DP link M/N and DP bit rate. Finally, get the refresh rate from pixel clock, H total and V total. The per-vGPU accurate refresh rate is not used yet but only stored, until per-vGPU vblank timer is enabled. Then each vGPU can have different and accurate refresh rate per-guest driver configuration. Refer to PRM for GEN display and VESA timing standard for more details. V2: Rebase to 5.11. Correctly calculate DP link rate for BDW and BXT. Use GVT_DEFAULT_REFRESH_RATE instead of hardcoded to 60 as init refresh. Typo fix. (zhenyu) Signed-off-by: Colin Xu Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20210226044559.283622-1-colin.xu@intel.com Reviewed-by: Zhenyu Wang commit dce38c8b029978425c9ede92f7a6f63e0196827d Author: Jiapeng Chong Date: Fri Feb 26 17:42:07 2021 +0800 drm/amd/display/dc/dce/dmub_psr: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/dc/dce/dmub_psr.c:273:16-21: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 0ee56acc4b555e56d5b190644eb98834c410ce9d Author: Jiapeng Chong Date: Fri Feb 26 17:17:16 2021 +0800 drm/amd/pm/swsmu: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c:924:47-52: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 11003c68b158c07b95e4ba3630a86aff9c442ee7 Author: Dennis Li Date: Fri Feb 26 09:17:10 2021 +0800 drm/amdgpu: remove unnecessary reading for epprom header If the number of badpage records exceed the threshold, driver has updated both epprom header and control->tbl_hdr.header before gpu reset, therefore GPU recovery thread no need to read epprom header directly. v2: merge amdgpu_ras_check_err_threshold into amdgpu_ras_eeprom_check_err_threshold Signed-off-by: Dennis Li Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit e0cd93b7e307cf6920fbc699df04d073c9004c22 Author: Shirish S Date: Thu Feb 25 21:07:21 2021 +0530 amdgpu/pm: read_sensor() report failure apporpriately report -ENOTSUPP instead of -EINVAL, so that if userspace fails to read sensor data can figure it out the failure correctly. Signed-off-by: Shirish S Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit e9995d4a3026b104724700397ee9db4cd75445dc Author: Evan Quan Date: Fri Feb 19 16:18:47 2021 +0800 drm/amd/pm: correct Arcturus mmTHM_BACO_CNTL register address Arcturus has a different register address from other SMU V11 ASICs. Signed-off-by: Evan Quan Acked-by: Guchun Chen Signed-off-by: Alex Deucher commit 4890d4e94da09e5b16d598af4d0d9179ec5a7700 Author: Kevin Wang Date: Fri Feb 26 12:01:16 2021 +0800 drm/amdgpu: add RAP TA version print in amdgpu_firmware_info add RAP TA version print in amdgpu_firmware_info. Signed-off-by: Kevin Wang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher commit 439e6bbb3b854fb04f2b979f0e698b63df1a8e0d Author: Jiapeng Chong Date: Thu Feb 25 17:19:02 2021 +0800 drm/amd/display: remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp_cm.c:243:67-72: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 7271a5c2aefc142ba9380842c58fea6c47fc635d Author: Yang Li Date: Thu Feb 25 17:02:08 2021 +0800 drm/amdgpu: Replace DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE Fix the following coccicheck warning: ./drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1589:0-23: WARNING: fops_ib_preempt should be defined with DEFINE_DEBUGFS_ATTRIBUTE ./drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:1592:0-23: WARNING: fops_sclk_set should be defined with DEFINE_DEBUGFS_ATTRIBUTE Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Alex Deucher commit 5b2e2c096954c59d95184bd039412c16cbbe279e Author: Alex Deucher Date: Wed Feb 24 15:46:59 2021 -0500 drm/amdgpu/swsmu/vangogh: Only use RLCPowerNotify msg for disable Per discussions with PMFW team, the driver only needs to notify the PMFW when the RLC is disabled. The RLC FW will notify the PMFW directly when it's enabled. Acked-by: Evan Quan Signed-off-by: Alex Deucher commit 9d489afd3128c7558bd1921886b91f296ef64f3e Author: Alex Deucher Date: Wed Feb 24 12:21:07 2021 -0500 drm/amdgpu/pm: make unsupported power profile messages debug Making them an error confuses users and the errors are harmless as not all asics support all profiles. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1488 Acked-by: Nirmoy Das Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 6f786950b1ff051c6dd913b1bb3aaa9b57befcbf Author: Alex Deucher Date: Tue Feb 2 11:11:45 2021 -0500 drm/amdgpu/codec: drop the internal codec index And just use the ioctl index. They are the same. Reviewed-by: Christian König Signed-off-by: Alex Deucher commit b50368da619fb1b721ea3c8fd6a28a719233f6ee Author: Alex Deucher Date: Tue Jan 19 14:26:02 2021 -0500 drm/amdgpu: bump driver version for new video codec INFO ioctl query So mesa can check when to query the kernel vs use hardcoded codec bandwidth data. Reviewed-by: Christian König Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit f35e9bdb06fbfa8a6fe9d25390fbee2ee5e7a329 Author: Alex Deucher Date: Thu Jan 7 16:48:01 2021 -0500 drm/amdgpu: add INFO ioctl support for querying video caps (v4) We currently hardcode these in mesa, but querying them from the kernel makes more sense since there may be board specific limitations that the kernel driver is better suited to determining. Userpace patches that use this interface: https://gitlab.freedesktop.org/leoliu/drm/-/commits/info_video_caps https://gitlab.freedesktop.org/leoliu/mesa/-/commits/info_video_caps v2: reorder the codecs to better align with mesa v3: add max_pixels_per_frame to handle the portrait case, squash in memory leak fix v4: drop extra break Reviewed-by: Christian König Reviewed-by: Leo Liu (v2) Signed-off-by: Alex Deucher commit 3b246e8b6a97b7786f49433effea2aff39e58166 Author: Alex Deucher Date: Thu Jan 7 18:48:12 2021 -0500 drm/amdgpu: add video decode/encode cap tables and asic callbacks (v3) For each asic family. Will be used to populate tables for the new INFO ioctl query. v2: add max_pixels_per_frame to handle the portrait case v3: fix copy paste typos Reviewed-by: Christian König Reviewed-by: Leo Liu (v1) Signed-off-by: Alex Deucher commit 9269bf186897d60a8314f970673fd34669ea7747 Author: Alex Deucher Date: Thu Jan 7 17:18:54 2021 -0500 drm/amdgpu: add asic callback for querying video codec info (v3) This will be used by a new INFO ioctl query to fetch the decode and encode capabilities from the kernel driver rather than hardcoding them in mesa. This gives us more fine grained control of capabilities using information that is only availabl in the kernel (e.g., platform limitations or bandwidth restrictions). v2: reorder the codecs to better align with mesa v3: add max_pixels_per_frame to handle the portrait case Reviewed-by: Christian König Reviewed-by: Leo Liu (v2) Signed-off-by: Alex Deucher commit 6f59f229f8ed7af21917335f8271cde441b1c95f Author: Aurabindo Pillai Date: Thu Dec 10 13:48:23 2020 -0500 drm/amd/display: Skip modeset for front porch change [Why] A seamless transition between modes can be performed if the new incoming mode has the same timing parameters as the optimized mode on a display with a variable vtotal min/max. Smooth video playback usecases can be enabled with this seamless transition by switching to a new mode which has a refresh rate matching the video. [How] Skip full modeset if userspace requested a compatible freesync mode which only differs in the front porch timing from the current mode. Signed-off-by: Aurabindo Pillai Acked-by: Christian König Reviewed-by: Nicholas Kazlauskas Signed-off-by: Alex Deucher commit d10cd527f5e5f70d5d71e8b224a025c3e73b57ba Author: Aurabindo Pillai Date: Thu Dec 10 13:48:22 2020 -0500 drm/amd/display: Add freesync video modes based on preferred modes [Why] While possible for userspace to create and add custom mode based off the optimized mode for the connected display which differs only in front porch timing, this patch set adds a list of common video modes in advance. The list of common video refresh rates is small, well known and the optimized mode has specific requirements to be able to enable HW frame doubling and tripling so it makes most sense to create the modes that video players will need in advance. The optimized mode matches the preferred mode resolution but has the highest refresh rate available to enable the largest front porch extension. [How] Find the optimized mode and store it on the connector so we can check it later during our optimized modeset. Prepopulate the mode list with a list of common video mades based on the optimized mode (but with a longer front porch) if the panel doesn't support a variant of the mode natively. Signed-off-by: Aurabindo Pillai Acked-by: Christian König Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher commit 0eb1af2e820594aa27cac04f9d44a0cf1186eae6 Author: Aurabindo Pillai Date: Thu Dec 10 13:48:21 2020 -0500 drm/amd/display: Add module parameter for freesync video mode [Why] This option shall be opt-in by default since it is a temporary solution until long term solution is agreed upon which may require userspace interface changes. This feature give the user a seamless experience when freesync aware programs (media players for instance) switches to a compatible freesync mode when playing videos. Enabling this feature also have the potential side effect of causing higher power consumption due to running a mode with lower resolution and base clock frequency with the highest base clock supported on the monitor as per its advertised modes. There has been precedent of manufacturing modes in the kernel. In AMDGPU, the existing usage are for common modes and scaling modes. Other driver have a similar approach as well. [How] Adds a module parameter to enable freesync video mode modeset optimization. Enabling this mode allows the driver to skip a full modeset when a freesync compatible mode is requested by the userspace. This parameter will also add some additional modes that are within the connected monitor's VRR range corresponding to common video modes, which media players can use for a seamless experience while making use of freesync. Signed-off-by: Aurabindo Pillai Acked-by: Christian König Reviewed-by: Shashank Sharma Signed-off-by: Alex Deucher commit 5392b2af97dc5802991f953eb2687e538da4688c Author: Ramesh Errabolu Date: Wed Feb 24 20:48:06 2021 -0600 drm/amdgpu: Remove amdgpu_device arg from free_sgt api (v2) Currently callers have to provide handle of amdgpu_device, which is not used by the implementation. It is unlikely this parameter will become useful in future, thus removing it v2: squash in unused variable fix Reviewed-by: Christian König Signed-off-by: Ramesh Errabolu Signed-off-by: Alex Deucher commit 8f8c80f430096726a5d8701ca80564bce06fa8da Author: Jingwen Chen Date: Thu Feb 25 17:08:02 2021 +0800 drm/amd/amdgpu: move inc gpu_reset_counter after drm_sched_stop Move gpu_reset_counter after drm_sched_stop to avoid race condition caused by job submitted between reset_count +1 and drm_sched_stop. Signed-off-by: Jingwen Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 8f4828d0a104d961d5eb850d0aef1530fc24e370 Author: Darren Powell Date: Mon Dec 7 19:20:01 2020 -0500 amdgpu/pm: Powerplay API for smu , updates to some pm functions v3: updated to include new clocks od_vddgfx_offset, od_cclk Context mismatch with revision v3 to patch 0003 Modified Functions smu_sys_set_pp_table() - modifed signature to match Powerplay API set_pp_table smu_force_performance_level() - modifed arg0 to match Powerplay API force_performance_level smu_od_edit_dpm_table() - modifed arg0 to match Powerplay API odn_edit_dpm_table Other Changes smu_od_edit_dpm_table() - removed call to task(READJUST_POWER_STATE) after COMMIT_TABLE, now handled in calling function amdgpu_set_power_dpm_force_performance_level() - now checks thermal for swsmu systems before trying to change level amdgpu_set_pp_od_clk_voltage() - now attempts to set fine_grain_clock_vol before swsmu edit dpm table Signed-off-by: Darren Powell Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit bc7d6c12054dcd3d652bf3f62eacab3b6e121f06 Author: Darren Powell Date: Thu Dec 3 16:50:49 2020 -0500 amdgpu/pm: Powerplay API for smu , changed 4 dpm functions to use API v2: fix errors and warnings flagged by checkpatch v3: Context mismatch with revision v3 to patch 0003 New Functions smu_get_mclk - implementation of the Powerplay API function get_mclk smu_get_sclk - implementation of the Powerplay API function get_sclk smu_handle_dpm_task - implementation of the Powerplay API function dispatch_tasks Modified Functions smu_dpm_set_power_gate - - modifed arg0 to match Powerplay API set_powergating_by_smu Other Changes removed special smu handling in dpm functions and called through Powerplay API call to smu_dpm_set_power_gate via Powerplay API now locks mutex for UVD and VCE Signed-off-by: Darren Powell Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 2ea092e5d391f747ddd28e091c3825c920b9d661 Author: Darren Powell Date: Wed Nov 4 00:33:58 2020 -0500 amdgpu/pm: Powerplay API for smu , changes to clock and profile mode functions v3: updated to include new clocks vclk, dclk, od_vddgfx_offset, od_cclk Added forward declaration for function smu_force_smuclk_levels to resolve clash with other commits Resolved context clashes with other commits and v3 updates to patches 0003, 0004 v2: fix errors flagged by checkpatch New Functions smu_bump_power_profile_mode() - changes profile mode assuming calling function already has mutex smu_force_ppclk_levels() - accepts Powerplay enum pp_clock_type to specify clock to change smu_print_ppclk_levels() - accepts Powerplay enum pp_clock_type to request clock levels amdgpu_get_pp_dpm_clock() - accepts Powerplay enum pp_clock_type to request clock levels and allows all the amdgpu_get_pp_dpm_$CLK functions to have a single codepath amdgpu_set_pp_dpm_clock() - accepts Powerplay enum pp_clock_type to set clock levels and allows all the amdgpu_set_pp_dpm_$CLK functions to have a single codepath Modified Functions smu_force_smuclk_levels - changed function name to make clear difference to smu_force_ppclk_levels smu_force_ppclk_levels() - modifed signature to implement Powerplay API force_clock_level - calls smu_force_smuclk_levels smu_print_smuclk_levels - changed function name to make clear difference to smu_print_ppclk_levels smu_print_ppclk_levels() - modifed signature to implement Powerplay API force_clock_level - calls smu_print_smuclk_levels smu_sys_get_gpu_metrics - modifed arg0 to match Powerplay API get_gpu_metrics smu_get_power_profile_mode - modifed arg0 to match Powerplay API get_power_profile_mode smu_set_power_profile_mode - modifed arg0 to match Powerplay API set_power_profile_mode - removed arg lock_needed, mutex always locked, internal functions can call smu_bump if they already hold lock smu_switch_power_profile - now calls smu_bump as already holds mutex lock smu_adjust_power_state_dynamic - now calls smu_bump as already holds mutex lock amdgpu_get_pp_od_clk_voltage - uses smu_print_ppclk_levels amdgpu_{set,get}_pp_dpm_$CLK - replace logic with call helper function amdgpu_{set,get}_pp_dpm_clock() CLK ={sclk, mclk, socclk, fclk, dcefclk, pci, vclkd, dclk} Other Changes added 5 smu Powerplay functions to swsmu_dpm_funcs removed special smu handling in pm functions and called through Powerplay API Signed-off-by: Darren Powell Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 9ab5001a99e1f1006192cf59915feeb9f03108bb Author: Darren Powell Date: Tue Nov 3 19:45:14 2020 -0500 amdgpu/pm: Powerplay API for smu , changed 5 dpm powergating & sensor functions to use API v2: add comment to highlight assignment that changes uint32_t value to int fix errors flagged by checkpatch.pl New Functions smu_get_baco_capability() - Implement Powerplay API get_asic_baco_capability smu_baco_set_state() - Implement Powerplay API set_asic_baco_state Modified Functions smu_read_sensor() - modifed signature to match Powerplay API read_sensor Other Changes added 3 above smu Powerplay functions to swsmu_dpm_funcs removed special smu handling in 5 dpm functions and called through Powerplay API Signed-off-by: Darren Powell Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 8dfc8c53c3c4144fce1c601e874eda79148cc88a Author: Darren Powell Date: Sun Nov 1 01:16:49 2020 -0400 amdgpu/pm: Powerplay API for smu , changed 9 pm power functions to use API v2: remove check for error during swsmu amdgpu_dpm_get_pp_num_states() call to match previous powerplay behaviour v3: removed smu implementation of powerplay get_power_limit Resolved context clashes with other commits Modified Files smu_set_power_limit() - modifed arg0 to match Powerplay API set_power_limit smu_sys_get_pp_table() - modifed signature to match Powerplay API get_pp_table smu_get_power_num_states() - modifed arg0 to match Powerplay API get_pp_num_states smu_get_current_power_state() - modifed arg0 to match Powerplay API get_current_power_state smu_sys_get_pp_feature_mask() - modifed signature to match Powerplay API get_ppfeature_status smu_sys_set_pp_feature_mask() - modifed arg0 to match Powerplay API set_ppfeature_status Other Changes added 6 above smu Powerplay functions to swsmu_dpm_funcs removed special smu handling of above functions and called through Powerplay API Signed-off-by: Darren Powell Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit f46587bcede5a27c8a5e8f8839228c4548460092 Author: Darren Powell Date: Fri Oct 30 22:46:24 2020 -0400 amdgpu/pm: Powerplay API for smu , changed 6 pm hwmon fan functions to use API v2: changed error return value of smu_get_fan_control_mode to AMD_FAN_CTRL_NONE fixed type in amdgpu_hwmon_get_pwm1_enable() print statement fixed indent flagged by checkpatch.pl Modified Functions smu_set_fan_speed_rpm() - modifed arg0 to match Powerplay API set_fan_speed_rpm smu_get_fan_control_mode() - modifed signature to match Powerplay API get_fan_control_mode smu_set_fan_control_mode() - modifed signature to match Powerplay API set_fan_control_mode smu_get_fan_speed_percent() - modifed signature to match Powerplay API get_fan_speed_percent smu_set_fan_speed_percent() - modifed signature to match Powerplay API set_fan_speed_percent smu_get_fan_speed_rpm() - modifed arg0 to match Powerplay API get_fan_speed_rpm Other Changes added 6 above smu fan Powerplay functions to swsmu_dpm_funcs removed special smu handling of above functions and called through Powerplay API Signed-off-by: Darren Powell Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit bab0f602918d9fa55d55784d2498336af16f2342 Author: Darren Powell Date: Thu Oct 29 18:19:35 2020 -0400 amdgpu/pm: Powerplay API for smu , changed 6 dpm reset functions to use API Modified Functions smu_set_xgmi_pstate() - modifed arg0 to match Powerplay API set_xgmi_pstate smu_mode2_reset() - modifed arg0 to match Powerplay API asic_reset_mode_2 smu_switch_power_profile() - modifed arg0 to match Powerplay API switch_power_profile smu_set_mp1_state() - modifed arg0 to match Powerplay API set_mp1_state smu_set_df_cstate() - modifed arg0 to match Powerplay API set_df_cstate smu_enable_mgpu_fan_boost() - modifed arg0 to match Powerplay API enable_mgpu_fan_boost Other Changes added above smu reset Powerplay functions to swsmu_dpm_funcs removed special smu handling of above functions and called through Powerplay API Signed-off-by: Darren Powell Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 4df144f80d5b67895317833a5e7b9ecc34642bec Author: Darren Powell Date: Sat Oct 24 21:28:00 2020 -0400 amdgpu/pm: Powerplay API for smu , added get_performance_level v2: updated the structure name to swsmu_pm_funcs Modified Functions smu_get_performance_level() - modifed arg0 to match Powerplay API get_performance_level Other Changes added a new structure swsmu_dpm_funcs to hold smu functions for Powerplay API removed special smu handling from amdgpu_get_power_dpm_force_performance_level Signed-off-by: Darren Powell Reviewed-by: Alex Deucher Reviewed-by: Evan Quan Signed-off-by: Alex Deucher commit 996aede28094465381e977f249ab07fecb6e7e87 Author: Changfeng Date: Wed Feb 24 16:01:43 2021 +0800 drm/amdgpu: decline max_me for mec2_fw remove in renoir/arcturus The value of max_me in amdgpu_gfx_rlc_setup_cp_table should reduce to 4 when mec2_fw is removed on asic renoir/arcturus. Or it will cause kernel NULL pointer when modprobe driver. Signed-off-by: Changfeng Reviewed-by: Huang Rui Signed-off-by: Alex Deucher commit 650bc7ae006448573a762dd6002396591dcc98d9 Author: Asher.Song Date: Wed Feb 24 18:41:34 2021 +0800 drm/amdgpu:disable VCN for Navi12 SKU Navi12 0x7360/C7 SKU has no video support, so remove it. Reviewed-by: Guchun Chen Signed-off-by: Asher.Song Signed-off-by: Alex Deucher commit f89b881c81d9a6481fc17b46b351ca38f5dd6f3a Author: Dennis Li Date: Mon Feb 22 18:22:57 2021 +0800 drm/amdgpu: reserve backup pages for bad page retirment To ensure user has a constant of VRAM accessible in run-time, driver reserves limit backup pages when init, and return ones when bad pages retired, to keep no change of unused memory size. v2: refine codes to calculate badpags threshold Reviewed-by: Hawking Zhang Signed-off-by: Dennis Li Signed-off-by: Alex Deucher commit 85e142cb42a1e7b33971bf035dae432d8670c46b Author: Ian Denhardt Date: Tue Feb 23 21:24:00 2021 -0500 tools, bpf_asm: Exit non-zero on errors ... so callers can correctly detect failure. Signed-off-by: Ian Denhardt Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/b0bea780bc292f29e7b389dd062f20adc2a2d634.1614201868.git.ian@zenhack.net commit 04883a079968e6250a4549f6fadb6427c534885e Author: Ian Denhardt Date: Tue Feb 23 21:15:31 2021 -0500 tools, bpf_asm: Hard error on out of range jumps Per discussion at [0] this was originally introduced as a warning due to concerns about breaking existing code, but a hard error probably makes more sense, especially given that concerns about breakage were only speculation. [0] https://lore.kernel.org/bpf/c964892195a6b91d20a67691448567ef528ffa6d.camel@linux.ibm.com/T/#t Signed-off-by: Ian Denhardt Signed-off-by: Daniel Borkmann Acked-by: Ilya Leoshkevich Link: https://lore.kernel.org/bpf/a6b6c7516f5d559049d669968e953b4a8d7adea3.1614201868.git.ian@zenhack.net commit cc0f83530934dda0ce1dd01990d2f37f8c3f0d92 Merge: 86fd166575c38 6b9e3331347ee Author: Alexei Starovoitov Date: Fri Feb 26 12:55:43 2021 -0800 Merge branch 'bpf: add bpf_for_each_map_elem() helper' Yonghong Song says: ==================== This patch set introduced bpf_for_each_map_elem() helper. The helper permits bpf program iterates through all elements for a particular map. The work originally inspired by an internal discussion where firewall rules are kept in a map and bpf prog wants to check packet 5 tuples against all rules in the map. A bounded loop can be used but it has a few drawbacks. As the loop iteration goes up, verification time goes up too. For really large maps, verification may fail. A helper which abstracts out the loop itself will not have verification time issue. A recent discussion in [1] involves to iterate all hash map elements in bpf program. Currently iterating all hashmap elements in bpf program is not easy if key space is really big. Having a helper to abstract out the loop itself is even more meaningful. The proposed helper signature looks like: long bpf_for_each_map_elem(map, callback_fn, callback_ctx, flags) where callback_fn is a static function and callback_ctx is a piece of data allocated on the caller stack which can be accessed by the callback_fn. The callback_fn signature might be different for different maps. For example, for hash/array maps, the signature is long callback_fn(map, key, val, callback_ctx) In the rest of series, Patches 1/2/3/4 did some refactoring. Patch 5 implemented core kernel support for the helper. Patches 6 and 7 added hashmap and arraymap support. Patches 8/9 added libbpf support. Patch 10 added bpftool support. Patches 11 and 12 added selftests for hashmap and arraymap. [1]: https://lore.kernel.org/bpf/20210122205415.113822-1-xiyou.wangcong@gmail.com/ Changelogs: v4 -> v5: - rebase on top of bpf-next. v3 -> v4: - better refactoring of check_func_call(), calculate subprogno outside of __check_func_call() helper. (Andrii) - better documentation (like the list of supported maps and their callback signatures) in uapi header. (Andrii) - implement and use ASSERT_LT in selftests. (Andrii) - a few other minor changes. v2 -> v3: - add comments in retrieve_ptr_limit(), which is in sanitize_ptr_alu(), to clarify the code is not executed for PTR_TO_MAP_KEY handling, but code is manually tested. (Alexei) - require BTF for callback function. (Alexei) - simplify hashmap/arraymap callback return handling as return value [0, 1] has been enforced by the verifier. (Alexei) - also mark global subprog (if used in ld_imm64) as RELO_SUBPROG_ADDR. (Andrii) - handle the condition to mark RELO_SUBPROG_ADDR properly. (Andrii) - make bpftool subprog insn offset dumping consist with pcrel calls. (Andrii) v1 -> v2: - setup callee frame in check_helper_call() and then proceed to verify helper return value as normal (Alexei) - use meta data to keep track of map/func pointer to avoid hard coding the register number (Alexei) - verify callback_fn return value range [0, 1]. (Alexei) - add migrate_{disable, enable} to ensure percpu value is the one bpf program expects to see. (Alexei) - change bpf_for_each_map_elem() return value to the number of iterated elements. (Andrii) - Change libbpf pseudo_func relo name to RELO_SUBPROG_ADDR and use more rigid checking for the relocation. (Andrii) - Better format to print out subprog address with bpftool. (Andrii) - Use bpf_prog_test_run to trigger bpf run, instead of bpf_iter. (Andrii) - Other misc changes. ==================== Signed-off-by: Alexei Starovoitov commit 6b9e3331347ee9e84fe5c71d3eba7ec204f9bb25 Author: Yonghong Song Date: Fri Feb 26 12:49:34 2021 -0800 selftests/bpf: Add arraymap test for bpf_for_each_map_elem() helper A test is added for arraymap and percpu arraymap. The test also exercises the early return for the helper which does not traverse all elements. $ ./test_progs -n 45 #45/1 hash_map:OK #45/2 array_map:OK #45 for_each:OK Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204934.3885756-1-yhs@fb.com commit 9de7f0fdab326a37c9f741f0f6c0f1cbc320a5ab Author: Yonghong Song Date: Fri Feb 26 12:49:33 2021 -0800 selftests/bpf: Add hashmap test for bpf_for_each_map_elem() helper A test case is added for hashmap and percpu hashmap. The test also exercises nested bpf_for_each_map_elem() calls like bpf_prog: bpf_for_each_map_elem(func1) func1: bpf_for_each_map_elem(func2) func2: $ ./test_progs -n 45 #45/1 hash_map:OK #45 for_each:OK Summary: 1/1 PASSED, 0 SKIPPED, 0 FAILED Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204933.3885657-1-yhs@fb.com commit f1f9f0d8d737b9a1c5d15635bf5696643626fd39 Author: Yonghong Song Date: Fri Feb 26 12:49:31 2021 -0800 bpftool: Print subprog address properly With later hashmap example, using bpftool xlated output may look like: int dump_task(struct bpf_iter__task * ctx): ; struct task_struct *task = ctx->task; 0: (79) r2 = *(u64 *)(r1 +8) ; if (task == (void *)0 || called > 0) ... 19: (18) r2 = subprog[+17] 30: (18) r2 = subprog[+25] ... 36: (95) exit __u64 check_hash_elem(struct bpf_map * map, __u32 * key, __u64 * val, struct callback_ctx * data): ; struct bpf_iter__task *ctx = data->ctx; 37: (79) r5 = *(u64 *)(r4 +0) ... 55: (95) exit __u64 check_percpu_elem(struct bpf_map * map, __u32 * key, __u64 * val, void * unused): ; check_percpu_elem(struct bpf_map *map, __u32 *key, __u64 *val, void *unused) 56: (bf) r6 = r3 ... 83: (18) r2 = subprog[-47] Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204931.3885458-1-yhs@fb.com commit 53eddb5e04ac5c53a4ccef9f1f900562a5a75246 Author: Yonghong Song Date: Fri Feb 26 12:49:30 2021 -0800 libbpf: Support subprog address relocation A new relocation RELO_SUBPROG_ADDR is added to capture subprog addresses loaded with ld_imm64 insns. Such ld_imm64 insns are marked with BPF_PSEUDO_FUNC and will be passed to kernel. For bpf_for_each_map_elem() case, kernel will check that the to-be-used subprog address must be a static function and replace it with proper actual jited func address. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204930.3885367-1-yhs@fb.com commit b8f871fa32ad392759bc70090fa8c60d9f10625c Author: Yonghong Song Date: Fri Feb 26 12:49:29 2021 -0800 libbpf: Move function is_ldimm64() earlier in libbpf.c Move function is_ldimm64() close to the beginning of libbpf.c, so it can be reused by later code and the next patch as well. There is no functionality change. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204929.3885295-1-yhs@fb.com commit 06dcdcd4b9e84ee78d865c928b1d43bb71829251 Author: Yonghong Song Date: Fri Feb 26 12:49:28 2021 -0800 bpf: Add arraymap support for bpf_for_each_map_elem() helper This patch added support for arraymap and percpu arraymap. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204928.3885192-1-yhs@fb.com commit 314ee05e2fc601a7bece14376547d2b7a04bab67 Author: Yonghong Song Date: Fri Feb 26 12:49:27 2021 -0800 bpf: Add hashtab support for bpf_for_each_map_elem() helper This patch added support for hashmap, percpu hashmap, lru hashmap and percpu lru hashmap. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204927.3885020-1-yhs@fb.com commit 69c087ba6225b574afb6e505b72cb75242a3d844 Author: Yonghong Song Date: Fri Feb 26 12:49:25 2021 -0800 bpf: Add bpf_for_each_map_elem() helper The bpf_for_each_map_elem() helper is introduced which iterates all map elements with a callback function. The helper signature looks like long bpf_for_each_map_elem(map, callback_fn, callback_ctx, flags) and for each map element, the callback_fn will be called. For example, like hashmap, the callback signature may look like long callback_fn(map, key, val, callback_ctx) There are two known use cases for this. One is from upstream ([1]) where a for_each_map_elem helper may help implement a timeout mechanism in a more generic way. Another is from our internal discussion for a firewall use case where a map contains all the rules. The packet data can be compared to all these rules to decide allow or deny the packet. For array maps, users can already use a bounded loop to traverse elements. Using this helper can avoid using bounded loop. For other type of maps (e.g., hash maps) where bounded loop is hard or impossible to use, this helper provides a convenient way to operate on all elements. For callback_fn, besides map and map element, a callback_ctx, allocated on caller stack, is also passed to the callback function. This callback_ctx argument can provide additional input and allow to write to caller stack for output. If the callback_fn returns 0, the helper will iterate through next element if available. If the callback_fn returns 1, the helper will stop iterating and returns to the bpf program. Other return values are not used for now. Currently, this helper is only available with jit. It is possible to make it work with interpreter with so effort but I leave it as the future work. [1]: https://lore.kernel.org/bpf/20210122205415.113822-1-xiyou.wangcong@gmail.com/ Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204925.3884923-1-yhs@fb.com commit 282a0f46d6cda7cf843cd77c9b53b4d1d9e31302 Author: Yonghong Song Date: Fri Feb 26 12:49:24 2021 -0800 bpf: Change return value of verifier function add_subprog() Currently, verifier function add_subprog() returns 0 for success and negative value for failure. Change the return value to be the subprog number for success. This functionality will be used in the next patch to save a call to find_subprog(). Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204924.3884848-1-yhs@fb.com commit 1435137573f9c75455903e8cd01f84d6e092ea16 Author: Yonghong Song Date: Fri Feb 26 12:49:23 2021 -0800 bpf: Refactor check_func_call() to allow callback function Later proposed bpf_for_each_map_elem() helper has callback function as one of its arguments. This patch refactored check_func_call() to permit callback function which sets callee state. Different callback functions may have different callee states. There is no functionality change for this patch. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204923.3884627-1-yhs@fb.com commit bc2591d63fc91bd5a9aaff145148a224d892bdb8 Author: Yonghong Song Date: Fri Feb 26 12:49:22 2021 -0800 bpf: Factor out verbose_invalid_scalar() Factor out the function verbose_invalid_scalar() to verbose print if a scalar is not in a tnum range. There is no functionality change and the function will be used by later patch which introduced bpf_for_each_map_elem(). Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204922.3884375-1-yhs@fb.com commit efdb22de7dcd3b24b8154b3c3ba496f62afea00c Author: Yonghong Song Date: Fri Feb 26 12:49:20 2021 -0800 bpf: Factor out visit_func_call_insn() in check_cfg() During verifier check_cfg(), all instructions are visited to ensure verifier can handle program control flows. This patch factored out function visit_func_call_insn() so it can be reused in later patch to visit callback function calls. There is no functionality change for this patch. Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210226204920.3884136-1-yhs@fb.com commit 86fd166575c38c17ecd3a6b8fb9c64fa19871486 Author: Ilya Leoshkevich Date: Wed Feb 24 12:14:45 2021 +0100 selftests/bpf: Copy extras in out-of-srctree builds Building selftests in a separate directory like this: make O="$BUILD" -C tools/testing/selftests/bpf and then running: cd "$BUILD" && ./test_progs -t btf causes all the non-flavored btf_dump_test_case_*.c tests to fail, because these files are not copied to where test_progs expects to find them. Fix by not skipping EXT-COPY when the original $(OUTPUT) is not empty (lib.mk sets it to $(shell pwd) in that case) and using rsync instead of cp: cp fails because e.g. urandom_read is being copied into itself, and rsync simply skips such cases. rsync is already used by kselftests and therefore is not a new dependency. Signed-off-by: Ilya Leoshkevich Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210224111445.102342-1-iii@linux.ibm.com commit 2854436612c4d2606c9246ce2976ab6634276337 Author: KP Singh Date: Thu Feb 25 16:19:47 2021 +0000 selftests/bpf: Propagate error code of the command to vmtest.sh When vmtest.sh ran a command in a VM, it did not record or propagate the error code of the command. This made the script less "script-able". The script now saves the error code of the said command in a file in the VM, copies the file back to the host and (when available) uses this error code instead of its own. Signed-off-by: KP Singh Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210225161947.1778590-1-kpsingh@kernel.org commit 1e0ab70778bd86a90de438cc5e1535c115a7c396 Merge: a83586a7ddba2 ff9614b81be65 Author: Alexei Starovoitov Date: Fri Feb 26 12:28:04 2021 -0800 Merge branch 'sock_map: clean up and refactor code for BPF_SK_SKB_VERDICT' Cong Wang says: ==================== From: Cong Wang This patchset is the first series of patches separated out from the original large patchset, to make reviews easier. This patchset does not add any new feature or change any functionality but merely cleans up the existing sockmap and skmsg code and refactors it, to prepare for the patches followed up. This passed all BPF selftests. To see the big picture, the original whole patchset is available on github: https://github.com/congwang/linux/tree/sockmap and this patchset is also available on github: https://github.com/congwang/linux/tree/sockmap1 --- v7: add 1 trivial cleanup patch define a mask for sk_redir fix CONFIG_BPF_SYSCALL in include/net/udp.h make sk_psock_done_strp() static move skb_bpf_redirect_clear() to sk_psock_backlog() v6: fix !CONFIG_INET case v5: improve CONFIG_BPF_SYSCALL dependency add 3 trivial cleanup patches v4: reuse skb dst instead of skb ext fix another Kconfig error v3: fix a few Kconfig compile errors remove an unused variable add a comment for bpf_convert_data_end_access() v2: split the original patchset compute data_end with bpf_convert_data_end_access() get rid of psock->bpf_running reduce the scope of CONFIG_BPF_STREAM_PARSER do not add CONFIG_BPF_SOCK_MAP ==================== Signed-off-by: Alexei Starovoitov commit ff9614b81be65d648ec4615b593c6e4b2dac6375 Author: Cong Wang Date: Tue Feb 23 10:49:34 2021 -0800 skmsg: Remove unused sk_psock_stop() declaration It is not defined or used anywhere. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-10-xiyou.wangcong@gmail.com commit 533342322276b06b4db260c413ce907238851e9b Author: Cong Wang Date: Tue Feb 23 10:49:33 2021 -0800 skmsg: Get rid of sk_psock_bpf_run() It is now nearly identical to bpf_prog_run_pin_on_cpu() and it has an unused parameter 'psock', so we can just get rid of it and call bpf_prog_run_pin_on_cpu() directly. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-9-xiyou.wangcong@gmail.com commit cd81cefb1abc52bd164f4d9760cd22eadc0e4468 Author: Cong Wang Date: Tue Feb 23 10:49:32 2021 -0800 skmsg: Make __sk_psock_purge_ingress_msg() static It is only used within skmsg.c so can become static. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-8-xiyou.wangcong@gmail.com commit 4675e234b9e15159894b90ead9340e1dc202b670 Author: Cong Wang Date: Tue Feb 23 10:49:31 2021 -0800 sock_map: Make sock_map_prog_update() static It is only used within sock_map.c so can become static. Suggested-by: Jakub Sitnicki Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-7-xiyou.wangcong@gmail.com commit ae8b8332fbb512f53bf50ff6a7586dd0f90ed18a Author: Cong Wang Date: Tue Feb 23 10:49:30 2021 -0800 sock_map: Rename skb_parser and skb_verdict These two eBPF programs are tied to BPF_SK_SKB_STREAM_PARSER and BPF_SK_SKB_STREAM_VERDICT, rename them to reflect the fact they are only used for TCP. And save the name 'skb_verdict' for general use later. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Reviewed-by: Lorenz Bauer Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-6-xiyou.wangcong@gmail.com commit e3526bb92a2084cdaec6cb2855bcec98b280426c Author: Cong Wang Date: Tue Feb 23 10:49:29 2021 -0800 skmsg: Move sk_redir from TCP_SKB_CB to skb Currently TCP_SKB_CB() is hard-coded in skmsg code, it certainly does not work for any other non-TCP protocols. We can move them to skb ext, but it introduces a memory allocation on fast path. Fortunately, we only need to a word-size to store all the information, because the flags actually only contains 1 bit so can be just packed into the lowest bit of the "pointer", which is stored as unsigned long. Inside struct sk_buff, '_skb_refdst' can be reused because skb dst is no longer needed after ->sk_data_ready() so we can just drop it. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-5-xiyou.wangcong@gmail.com commit 16137b09a66f2b75090f1e56a9ba0e27ef845ebc Author: Cong Wang Date: Tue Feb 23 10:49:28 2021 -0800 bpf: Compute data_end dynamically with JIT code Currently, we compute ->data_end with a compile-time constant offset of skb. But as Jakub pointed out, we can actually compute it in eBPF JIT code at run-time, so that we can competely get rid of ->data_end. This is similar to skb_shinfo(skb) computation in bpf_convert_shinfo_access(). Suggested-by: Jakub Sitnicki Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-4-xiyou.wangcong@gmail.com commit 5a685cd94b21a88efa6be77169eddef525368034 Author: Cong Wang Date: Tue Feb 23 10:49:27 2021 -0800 skmsg: Get rid of struct sk_psock_parser struct sk_psock_parser is embedded in sk_psock, it is unnecessary as skb verdict also uses ->saved_data_ready. We can simply fold these fields into sk_psock, and get rid of ->enabled. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-3-xiyou.wangcong@gmail.com commit 887596095ec2a9ea39ffcf98f27bf2e77c5eb512 Author: Cong Wang Date: Tue Feb 23 10:49:26 2021 -0800 bpf: Clean up sockmap related Kconfigs As suggested by John, clean up sockmap related Kconfigs: Reduce the scope of CONFIG_BPF_STREAM_PARSER down to TCP stream parser, to reflect its name. Make the rest sockmap code simply depend on CONFIG_BPF_SYSCALL and CONFIG_INET, the latter is still needed at this point because of TCP/UDP proto update. And leave CONFIG_NET_SOCK_MSG untouched, as it is used by non-sockmap cases. Signed-off-by: Cong Wang Signed-off-by: Alexei Starovoitov Reviewed-by: Lorenz Bauer Acked-by: John Fastabend Acked-by: Jakub Sitnicki Link: https://lore.kernel.org/bpf/20210223184934.6054-2-xiyou.wangcong@gmail.com commit a83586a7ddba25065ec37323c05deb9019ce4fa9 Author: Hangbin Liu Date: Tue Feb 23 21:14:57 2021 +0800 bpf: Remove blank line in bpf helper description comment Commit 34b2021cc616 ("bpf: Add BPF-helper for MTU checking") added an extra blank line in bpf helper description. This will make bpf_helpers_doc.py stop building bpf_helper_defs.h immediately after bpf_check_mtu(), which will affect future added functions. Fixes: 34b2021cc616 ("bpf: Add BPF-helper for MTU checking") Signed-off-by: Hangbin Liu Signed-off-by: Daniel Borkmann Acked-by: Jesper Dangaard Brouer Link: https://lore.kernel.org/bpf/20210223131457.1378978-1-liuhangbin@gmail.com Signed-off-by: Alexei Starovoitov commit 201cf3976c065fc47ab260302d06690f73587df9 Author: mark-yw.chen Date: Tue Feb 23 14:27:40 2021 +0800 Bluetooth: btusb: Fix incorrect type in assignment and uninitialized symbol Warnings: drivers/bluetooth/btusb.c:3775 btusb_mtk_setup() error: uninitialized symbol 'fw_version'. -> add initial value for fw_version. Warnings: sparse: sparse: incorrect type in assignment (different base types) -> add le32_to_cpu to fix incorrect type in assignment. Signed-off-by: mark-yw.chen Signed-off-by: Marcel Holtmann commit 3edc5782fb64c97946f4f321141cb4f46c9da825 Author: Rasmus Moorats Date: Thu Feb 18 13:11:24 2021 +0200 Bluetooth: btusb: support 0cb5:c547 Realtek 8822CE device Some Xiaomi RedmiBook laptop models use the 0cb5:c547 USB identifier for their Bluetooth device, so load the appropriate firmware for Realtek 8822CE. -Device(0cb5:c547) from /sys/kernel/debug/usb/devices T: Bus=01 Lev=01 Prnt=01 Port=03 Cnt=02 Dev#= 3 Spd=12 MxCh= 0 D: Ver= 1.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0cb5 ProdID=c547 Rev= 0.00 S: Manufacturer=Realtek S: Product=Bluetooth Radio S: SerialNumber=00e04c000001 C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms Signed-off-by: Rasmus Moorats Signed-off-by: Marcel Holtmann commit 43c5026be77a8f1d109532b96f45f3434dfd5293 Merge: e6ac593372aad b267e5a458a71 Author: Alexei Starovoitov Date: Fri Feb 26 12:08:49 2021 -0800 Merge branch 'selftests/bpf: xsk improvements and new stats' Ciara Loftus says: ==================== This series attempts to improve the xsk selftest framework by: 1. making the default output less verbose 2. adding an optional verbose flag to both the test_xsk.sh script and xdpxceiver app. 3. renaming the debug option in the app to to 'dump-pkts' and add a flag to the test_xsk.sh script which enables the flag in the app. 4. changing how tests are launched - now they are launched from the xdpxceiver app instead of the script. Once the improvements are made, a new set of tests are added which test the xsk statistics. The output of the test script now looks like: ./test_xsk.sh PREREQUISITES: [ PASS ] 1..10 ok 1 PASS: SKB NOPOLL ok 2 PASS: SKB POLL ok 3 PASS: SKB NOPOLL Socket Teardown ok 4 PASS: SKB NOPOLL Bi-directional Sockets ok 5 PASS: SKB NOPOLL Stats ok 6 PASS: DRV NOPOLL ok 7 PASS: DRV POLL ok 8 PASS: DRV NOPOLL Socket Teardown ok 9 PASS: DRV NOPOLL Bi-directional Sockets ok 10 PASS: DRV NOPOLL Stats # Totals: pass:10 fail:0 xfail:0 xpass:0 skip:0 error:0 XSK KSELFTESTS: [ PASS ] v2->v3: * Rename dump-pkts to dump_pkts in test_xsk.sh * Add examples of flag usage to test_xsk.sh v1->v2: * Changed '-d' flag in the shell script to '-D' to be consistent with the xdpxceiver app. * Renamed debug mode to 'dump-pkts' which better reflects the behaviour. * Use libpf APIs instead of calls to ss for configuring xdp on the links * Remove mutex init & destroy for each stats test * Added a description for each of the new statistics tests * Distinguish between exiting due to initialisation failure vs test failure This series applies on commit d310ec03a34e92a77302edb804f7d68ee4f01ba0 Ciara Loftus (3): selftests/bpf: expose and rename debug argument selftests/bpf: restructure xsk selftests selftests/bpf: introduce xsk statistics tests ==================== Signed-off-by: Alexei Starovoitov commit b267e5a458a719f3f5eaaaebe87c5f4a13584832 Author: Ciara Loftus Date: Tue Feb 23 16:23:04 2021 +0000 selftests/bpf: Introduce xsk statistics tests This commit introduces a range of tests to the xsk testsuite for validating xsk statistics. A new test type called 'stats' is added. Within it there are four sub-tests. Each test configures a scenario which should trigger the given error statistic. The test passes if the statistic is successfully incremented. The four statistics for which tests have been created are: 1. rx dropped Increase the UMEM frame headroom to a value which results in insufficient space in the rx buffer for both the packet and the headroom. 2. tx invalid Set the 'len' field of tx descriptors to an invalid value (umem frame size + 1). 3. rx ring full Reduce the size of the RX ring to a fraction of the fill ring size. 4. fill queue empty Do not populate the fill queue and then try to receive pkts. Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20210223162304.7450-5-ciara.loftus@intel.com commit d3e3bf5b4c673e79c5a11608f53d4e0059a7ec79 Author: Ciara Loftus Date: Tue Feb 23 16:23:03 2021 +0000 selftests/bpf: Restructure xsk selftests Prior to this commit individual xsk tests were launched from the shell script 'test_xsk.sh'. When adding a new test type, two new test configurations had to be added to this file - one for each of the supported XDP 'modes' (skb or drv). Should zero copy support be added to the xsk selftest framework in the future, three new test configurations would need to be added for each new test type. Each new test type also typically requires new CLI arguments for the xdpxceiver program. This commit aims to reduce the overhead of adding new tests, by launching the test configurations from within the xdpxceiver program itself, using simple loops. Every test is run every time the C program is executed. Many of the CLI arguments can be removed as a result. Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Reviewed-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20210223162304.7450-4-ciara.loftus@intel.com commit d2b0dfd5d1f94fe74ed580b5a1d5fdb5bf11f2fb Author: Ciara Loftus Date: Tue Feb 23 16:23:02 2021 +0000 selftests/bpf: Expose and rename debug argument Launching xdpxceiver with -D enables what was formerly know as 'debug' mode. Rename this mode to 'dump-pkts' as it better describes the behavior enabled by the option. New usage: ./xdpxceiver .. -D or ./xdpxceiver .. --dump-pkts Also make it possible to pass this flag to the app via the test_xsk.sh shell script like so: ./test_xsk.sh -D Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210223162304.7450-3-ciara.loftus@intel.com commit ecde60614d5ed60fde1c80b38b71582a3ea2e662 Author: Magnus Karlsson Date: Tue Feb 23 16:23:01 2021 +0000 selftest/bpf: Make xsk tests less verbose Make the xsk tests less verbose by only printing the essentials. Currently, it is hard to see if the tests passed or not due to all the printouts. Move the extra printouts to a verbose option, if further debugging is needed when a problem arises. To run the xsk tests with verbose output: ./test_xsk.sh -v Signed-off-by: Magnus Karlsson Signed-off-by: Ciara Loftus Signed-off-by: Alexei Starovoitov Acked-by: Maciej Fijalkowski Link: https://lore.kernel.org/bpf/20210223162304.7450-2-ciara.loftus@intel.com commit e6ac593372aadacc14e02b198e4a1acfef1db595 Author: Brendan Jackman Date: Wed Feb 17 10:45:09 2021 +0000 bpf: Rename fixup_bpf_calls and add some comments This function has become overloaded, it actually does lots of diverse things in a single pass. Rename it to avoid confusion, and add some concise commentary. Signed-off-by: Brendan Jackman Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210217104509.2423183-1-jackmanb@google.com commit 523a4cf491b3c9e2d546040d57250f1a0ca84f03 Author: Dmitrii Banshchikov Date: Fri Feb 26 00:26:29 2021 +0400 bpf: Use MAX_BPF_FUNC_REG_ARGS macro Instead of using integer literal here and there use macro name for better context. Signed-off-by: Dmitrii Banshchikov Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210225202629.585485-1-me@ubique.spb.ru commit 817eab2fdc86c4d71c6401c72f25165db6b06dcd Author: Zack Rusin Date: Wed Feb 17 13:55:21 2021 -0500 drm/vmwgfx: Bump the minor version and cleanup logging We should advertise the reworked fifo/cmd handling and huge pages support. Also while bumping the version number lets cleanup the logging, there's no point in logging whether we're atomic (we always are) or what repo we use (it's always in kernel now). Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20210224163034.918430-1-zackr@vmware.com commit a7d24d9582f8cc24fabd11c458950ac94710566a Merge: 9c8f21e6f8856 ced47e30ab8b3 Author: Alexei Starovoitov Date: Fri Feb 26 11:51:48 2021 -0800 Merge branch 'bpf: enable task local storage for tracing' Song Liu says: ==================== This set enables task local storage for non-BPF_LSM programs. It is common for tracing BPF program to access per-task data. Currently, these data are stored in hash tables with pid as the key. In bcc/libbpftools [1], 9 out of 23 tools use such hash tables. However, hash table is not ideal for many use case. Task local storage provides better usability and performance for BPF programs. Please refer to 6/6 for some performance comparison of task local storage vs. hash table. Changes v5 => v6: 1. Add inc/dec bpf_task_storage_busy in bpf_local_storage_map_free(). Changes v4 => v5: 1. Fix build w/o CONFIG_NET. (kernel test robot) 2. Remove unnecessary check for !task_storage_ptr(). (Martin) 3. Small changes in commit logs. Changes v3 => v4: 1. Prevent deadlock from recursive calls of bpf_task_storage_[get|delete]. (2/6 checks potential deadlock and fails over, 4/6 adds a selftest). Changes v2 => v3: 1. Make the selftest more robust. (Andrii) 2. Small changes with runqslower. (Andrii) 3. Shortern CC list to make it easy for vger. Changes v1 => v2: 1. Do not allocate task local storage when the task is being freed. 2. Revise the selftest and added a new test for a task being freed. 3. Minor changes in runqslower. ==================== Acked-by: Martin KaFai Lau Signed-off-by: Alexei Starovoitov commit ced47e30ab8b3ed986e28411f63e041b51c1fdf8 Author: Song Liu Date: Thu Feb 25 15:43:19 2021 -0800 bpf: runqslower: Use task local storage Replace hashtab with task local storage in runqslower. This improves the performance of these BPF programs. The following table summarizes average runtime of these programs, in nanoseconds: task-local hash-prealloc hash-no-prealloc handle__sched_wakeup 125 340 3124 handle__sched_wakeup_new 2812 1510 2998 handle__sched_switch 151 208 991 Note that, task local storage gives better performance than hashtab for handle__sched_wakeup and handle__sched_switch. On the other hand, for handle__sched_wakeup_new, task local storage is slower than hashtab with prealloc. This is because handle__sched_wakeup_new accesses the data for the first time, so it has to allocate the data for task local storage. Once the initial allocation is done, subsequent accesses, as those in handle__sched_wakeup, are much faster with task local storage. If we disable hashtab prealloc, task local storage is much faster for all 3 functions. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210225234319.336131-7-songliubraving@fb.com commit 4b0d2d4156cfb9f27d8e52a33d3522a78002fca1 Author: Song Liu Date: Thu Feb 25 15:43:18 2021 -0800 bpf: runqslower: Prefer using local vmlimux to generate vmlinux.h Update the Makefile to prefer using $(O)/vmlinux, $(KBUILD_OUTPUT)/vmlinux (for selftests) or ../../../vmlinux. These two files should have latest definitions for vmlinux.h. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20210225234319.336131-6-songliubraving@fb.com commit c540957a4d1d13934e93e53ce3056ac4108ffc29 Author: Song Liu Date: Thu Feb 25 15:43:17 2021 -0800 selftests/bpf: Test deadlock from recursive bpf_task_storage_[get|delete] Add a test with recursive bpf_task_storage_[get|delete] from fentry programs on bpf_local_storage_lookup and bpf_local_storage_update. Without proper deadlock prevent mechanism, this test would cause deadlock. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210225234319.336131-5-songliubraving@fb.com commit 1f87dcf116adedd6b9f47258d4fdf4fa9ce74002 Author: Song Liu Date: Thu Feb 25 15:43:16 2021 -0800 selftests/bpf: Add non-BPF_LSM test for task local storage Task local storage is enabled for tracing programs. Add two tests for task local storage without CONFIG_BPF_LSM. The first test stores a value in sys_enter and read it back in sys_exit. The second test checks whether the kernel allows allocating task local storage in exit_creds() (which it should not). Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20210225234319.336131-4-songliubraving@fb.com commit bc235cdb423a2daed6f337676006a66557429cd1 Author: Song Liu Date: Thu Feb 25 15:43:15 2021 -0800 bpf: Prevent deadlock from recursive bpf_task_storage_[get|delete] BPF helpers bpf_task_storage_[get|delete] could hold two locks: bpf_local_storage_map_bucket->lock and bpf_local_storage->lock. Calling these helpers from fentry/fexit programs on functions in bpf_*_storage.c may cause deadlock on either locks. Prevent such deadlock with a per cpu counter, bpf_task_storage_busy. We need this counter to be global, because the two locks here belong to two different objects: bpf_local_storage_map and bpf_local_storage. If we pick one of them as the owner of the counter, it is still possible to trigger deadlock on the other lock. For example, if bpf_local_storage_map owns the counters, it cannot prevent deadlock on bpf_local_storage->lock when two maps are used. Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210225234319.336131-3-songliubraving@fb.com commit a10787e6d58c24b51e91c19c6d16c5da89fcaa4b Author: Song Liu Date: Thu Feb 25 15:43:14 2021 -0800 bpf: Enable task local storage for tracing programs To access per-task data, BPF programs usually creates a hash table with pid as the key. This is not ideal because: 1. The user need to estimate the proper size of the hash table, which may be inaccurate; 2. Big hash tables are slow; 3. To clean up the data properly during task terminations, the user need to write extra logic. Task local storage overcomes these issues and offers a better option for these per-task data. Task local storage is only available to BPF_LSM. Now enable it for tracing programs. Unlike LSM programs, tracing programs can be called in IRQ contexts. Helpers that access task local storage are updated to use raw_spin_lock_irqsave() instead of raw_spin_lock_bh(). Tracing programs can attach to functions on the task free path, e.g. exit_creds(). To avoid allocating task local storage after bpf_task_storage_free(). bpf_task_storage_get() is updated to not allocate new storage when the task is not refcounted (task->usage == 0). Signed-off-by: Song Liu Signed-off-by: Alexei Starovoitov Acked-by: KP Singh Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210225234319.336131-2-songliubraving@fb.com commit 2da9a1a2b2f95d6bd98c5f81fb7d05ec22a1f04b Author: Daniel Vetter Date: Mon Feb 22 11:06:08 2021 +0100 drm/compat: more dummy implementations drm_noop really doesn't do much, and who cares about the permission checks. So let's delete some code. Acked-by: Maxime Ripard Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210222100608.400730-1-daniel.vetter@ffwll.ch commit e926c474ebee404441c838d18224cd6f246a71b7 Author: Daniel Vetter Date: Mon Feb 22 11:06:43 2021 +0100 drm/compat: Clear bounce structures Some of them have gaps, or fields we don't clear. Native ioctl code does full copies plus zero-extends on size mismatch, so nothing can leak. But compat is more hand-rolled so need to be careful. None of these matter for performance, so just memset. Also I didn't fix up the CONFIG_DRM_LEGACY or CONFIG_DRM_AGP ioctl, those are security holes anyway. Acked-by: Maxime Ripard Reported-by: syzbot+620cf21140fc7e772a5d@syzkaller.appspotmail.com # vblank ioctl Cc: syzbot+620cf21140fc7e772a5d@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210222100643.400935-1-daniel.vetter@ffwll.ch commit 1045a5c04e16716870cc953872e703258e7896de Author: Hans de Goede Date: Wed Feb 24 11:50:52 2021 +0100 ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 10-p0XX OVCD current threshold When I added the quirk for the "HP Pavilion x2 10-p0XX" I copied the byt_rt5640_quirk_table[] entry for the HP Pavilion x2 10-k0XX / 10-n0XX models since these use almost the same settings. While doing this I accidentally also copied and kept the non-standard OVCD_TH_1500UA setting used on those models. This too low threshold is causing headsets to often be seen as headphones (without a headset-mic) and when correctly identified it is causing ghost play/pause button-presses to get detected. Correct the HP Pavilion x2 10-p0XX quirk to use the default OVCD_TH_2000UA setting, fixing these problems. Fixes: fbdae7d6d04d ("ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks") Signed-off-by: Hans de Goede Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210224105052.42116-1-hdegoede@redhat.com Signed-off-by: Mark Brown commit 19bafac4f56f42c499e7343d884b7878204652d3 Author: Rikard Falkeborn Date: Wed Feb 10 00:48:17 2021 +0100 drm/nouveau/ttm: constify static vm_operations_struct The only usage of nouveau_ttm_vm_ops is to assign its address to the vm_ops field in the vm_area_struct struct. Make it const to allow the compiler to put it in read-only memory Signed-off-by: Rikard Falkeborn Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210209234817.55112-4-rikard.falkeborn@gmail.com Signed-off-by: Christian König commit b6d4abc9ae627b071fef91c64a5ad8f884bbbc45 Author: Rikard Falkeborn Date: Wed Feb 10 00:48:16 2021 +0100 drm/radeon/ttm: constify static vm_operations_struct The only usage of radeon_ttm_vm_ops is to assign its address to the vm_ops field in the vm_area_struct struct. Make it const to allow the compiler to put it in read-only memory Signed-off-by: Rikard Falkeborn Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210209234817.55112-3-rikard.falkeborn@gmail.com Signed-off-by: Christian König commit fff72bb569ee97a5dafe287e6b9ff4ecdf4f6d6d Author: Rikard Falkeborn Date: Wed Feb 10 00:48:15 2021 +0100 drm/amdgpu/ttm: constify static vm_operations_struct The only usage of amdgpu_ttm_vm_ops is to assign its address to the vm_ops field in the vm_area_struct struct. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210209234817.55112-2-rikard.falkeborn@gmail.com Signed-off-by: Christian König commit 2eebbdbaab5fcde967c76892bf568a701c62e1d7 Author: John Stultz Date: Tue Feb 9 19:48:18 2021 +0000 dma-buf: heaps: Fix the name used when exporting dmabufs to be the actual heap name By default dma_buf_export() sets the exporter name to be KBUILD_MODNAME. Unfortunately this may not be identical to the string used as the heap name (ie: "system" vs "system_heap"). This can cause some minor confusion with tooling, and there is the future potential where multiple heap types may be exported by the same module (but would all have the same name). So to avoid all this, set the exporter exp_name to the heap name. Cc: Daniel Vetter Cc: Sumit Semwal Cc: Liam Mark Cc: Chris Goldsworthy Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz Acked-by: Daniel Vetter Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20210209194818.2459062-2-john.stultz@linaro.org commit 98cd02da467cb4a319b7041d6242de8a4a33e833 Author: John Stultz Date: Tue Feb 9 19:48:17 2021 +0000 dma-buf: dma-heap: Provide accessor to get heap name It can be useful to access the name for the heap, so provide an accessor to do so. Cc: Daniel Vetter Cc: Sumit Semwal Cc: Liam Mark Cc: Chris Goldsworthy Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz Acked-by: Daniel Vetter Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20210209194818.2459062-1-john.stultz@linaro.org commit ad2c28bd9a4083816fa45a7e90c2486cde8a9873 Author: xinhui pan Date: Wed Feb 24 11:28:08 2021 +0800 drm/ttm: Do not add non-system domain BO into swap list BO would be added into swap list if it is validated into system domain. If BO is validated again into non-system domain, say, VRAM domain. It actually should not be in the swap list. Signed-off-by: xinhui pan Acked-by: Guchun Chen Acked-by: Alex Deucher Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/20210224032808.150465-1-xinhui.pan@amd.com Signed-off-by: Christian König commit 3ade7a69e82c4405e2b1f4a87b32029532207ae2 Author: Daniel Vetter Date: Tue Jan 12 09:43:58 2021 +0100 drm/arc: Move to drm/tiny Because it is. v2: Delete now unused crtc funcs (0day) Acked-by: Thomas Zimmermann Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-15-daniel.vetter@ffwll.ch commit 50dcc3ab492adf7e88bf1ab7ee80d7712038ce75 Author: Daniel Vetter Date: Tue Jan 12 09:43:57 2021 +0100 drm/arc: Initialize sim connector before display pipe That way we can get rid of this final piece of init code, and use the simple pipe helpers as intended. v2: Fix indent (Sam) Acked-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-14-daniel.vetter@ffwll.ch commit 2c43a895c54669b5c24e0944312e2a285eeb06d7 Author: Daniel Vetter Date: Tue Jan 12 09:43:56 2021 +0100 drm/arc: Inline remaining files At less than 500 lines total feels like the right thing to do. Also noticed that the simple wrapper around drm_connector_cleanup can be dropped. Acked-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Cc: Alexey Brodkin Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-13-daniel.vetter@ffwll.ch commit 3ea66a794fdc9522512ace3267fb25bf1c1953f1 Author: Daniel Vetter Date: Tue Jan 12 09:43:55 2021 +0100 drm/arc: Inline arcpgu_drm_hdmi_init Really not worth the function, much less the separate file now that almost all the code is gone. Acked-by: Thomas Zimmermann Cc: Eugeniy Paltsev Cc: Alexey Brodkin Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-12-daniel.vetter@ffwll.ch commit e2c406ea0b0d398a4afda5702957064cc74f8c25 Author: Daniel Vetter Date: Tue Jan 12 09:43:54 2021 +0100 drm/arc: Inline arcpgu_crtc.c Really not big anymore. Note that we no longer clamp all errors to ENODEV, highlighted by Sam. v2: Fixup update function, bug reported by Eugeniy v3: Delete now unused crtc funcs (0day) v4: Move encoder removal to right patch (Sam). Acked-by: Thomas Zimmermann Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Sam Ravnborg Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-11-daniel.vetter@ffwll.ch commit 0a9422d279e9d07bfe070eedee482f1a43821802 Author: Daniel Vetter Date: Tue Jan 12 09:43:53 2021 +0100 drm/arc: Drop crtc check in arc_pgu_update It's redundant, drm core guarantees that state->fb is set iff state->crtc is set. v2: I had a misconception about simple helpers here and thought they filter this out. They don't. Issue reported by Eugeniy. Acked-by: Thomas Zimmermann Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-10-daniel.vetter@ffwll.ch commit 3bc8a91a830b9c79377058bad64f485865ee5ba0 Author: Daniel Vetter Date: Tue Jan 12 09:43:52 2021 +0100 drm/arc: Convert to drm_simple_kms_pipe_helper Really straighforward, only slight issue is that the sim connector is created after the pipe is set up, so can't use the helpers perfectly yet. Subsequent patches will fix that. Aside from lots of deleting code no functional changes in here. v2: Delete now unused crtc funcs (0day) v3: Move endcoder setup removal to right patch (Sam) Acked-by: Thomas Zimmermann Cc: Sam Ravnborg Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-9-daniel.vetter@ffwll.ch commit daaddeb0c9c0313d41d7e6364fee52f734dfa1be Author: Daniel Vetter Date: Tue Jan 12 09:43:51 2021 +0100 drm/arc: Align with simple pipe helpers Simple pipe helpers only have an enable and disable hook, no more mode_set_nofb. Call it from our enable hook to align with that conversions. Atomic helpers always call mode_set_nofb and enable together, so there's no functional change here. Acked-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-8-daniel.vetter@ffwll.ch commit c9e88a2ab5b411b5b41940e9e5b4b15d647d64d6 Author: Daniel Vetter Date: Tue Jan 12 09:43:50 2021 +0100 drm/arc: Use drmm_mode_config_cleanup With autocleanup through drm_device management we can delete all the code. Possible now that there's no confusion against devm_kzalloc'ed structures anymore. I inlined arcpgu_setup_mode_config because it's tiny and the newly needed return value handling would have been more ... Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-7-daniel.vetter@ffwll.ch commit be5207ae897ed394d55988e001eba6f10f554040 Author: Daniel Vetter Date: Tue Jan 12 09:43:49 2021 +0100 drm/arc: Drop surplus connector registration drm_connector_register does nothing before drm_dev_register(), it is meant for hotpluggable connectors only. Same for the unregister side. Acked-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-6-daniel.vetter@ffwll.ch commit 1aae52630d99f8f4e62fa64d33ecfa32c3533d4a Author: Daniel Vetter Date: Tue Jan 12 09:43:48 2021 +0100 drm/arc: Embedd a drm_connector for sim case Removes the last devm_kzalloc, which means we're now prepared to use drmm_mode_config_cleanup! Acked-by: Thomas Zimmermann Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-5-daniel.vetter@ffwll.ch commit 418fa908025a27136b3254c741956a2b3352f70b Author: Daniel Vetter Date: Tue Jan 12 09:43:47 2021 +0100 drm/arc: Embedded a drm_simple_display_pipe This is a prep step to convert arc over to the simple kms helpers, for now we just use this as an embedding container to drop all the various allocations. Big change is the removal of the various devm_kzalloc, which have the wrong lifetimes anyway. Acked-by: Sam Ravnborg Acked-by: Thomas Zimmermann Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-4-daniel.vetter@ffwll.ch commit 4eaf70d43d88911204082e475fd861917712805f Author: Daniel Vetter Date: Tue Jan 12 09:43:46 2021 +0100 drm/arc: Delete arcpgu_priv->fb Leftover from the conversion to the generic fbdev emulation. Cc: Eugeniy Paltsev Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-3-daniel.vetter@ffwll.ch commit 11cecb0d18c4972defe192d05e33360c9569e6a1 Author: Daniel Vetter Date: Tue Jan 12 09:43:45 2021 +0100 drm/arc: Stop using drm_device->dev_private Upcasting using a container_of macro is more typesafe, faster and easier for the compiler to optimize. Cc: Eugeniy Paltsev Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-2-daniel.vetter@ffwll.ch commit 8db0002ab6b9ac446c07acd53ec096fbdccc8bbd Author: Daniel Vetter Date: Tue Jan 12 09:43:44 2021 +0100 drm/arc: Switch to devm_drm_dev_alloc - Need to embedded the drm_device, but for now we keep the usual pointer chasing. - No more devm_kzalloc, which fixes a lifetime issues on driver remove. - No more drm_dev_put, that's done by devm_ now. Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: Alexey Brodkin Link: https://patchwork.freedesktop.org/patch/msgid/20210112084358.2771527-1-daniel.vetter@ffwll.ch commit cdea72518a2b38207146e92e1c9e2fac15975679 Author: Noralf Trønnes Date: Fri Feb 19 13:22:03 2021 +0100 drm/shmem-helpers: vunmap: Don't put pages for dma-buf dma-buf importing was reworked in commit 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing"). Before that commit drm_gem_shmem_prime_import_sg_table() did set ->pages_use_count=1 and drm_gem_shmem_vunmap_locked() could call drm_gem_shmem_put_pages() unconditionally. Now without the use count set, put pages is called also on dma-bufs. Fix this by only putting pages if it's not imported. Signed-off-by: Noralf Trønnes Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing") Cc: Daniel Vetter Cc: Thomas Zimmermann Acked-by: Thomas Zimmermann Tested-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219122203.51130-1-noralf@tronnes.org commit c129b49825530942f344ed3e0e6a72568ad3e3e2 Author: Maxime Ripard Date: Fri Feb 19 13:00:31 2021 +0100 drm/todo: Remove the drm_atomic_state todo item Only planes' prepare_fb and cleanup_fb, and encoders' atomic_check and atomic_mode_set hooks remain with an object state and not the global drm_atomic_state. prepare_fb and cleanup_fb operate by design on a given state and depending on the calling site can operate on either the old or new state, so it doesn't really make much sense to convert them. The encoders' atomic_check and atomic_mode_set operate on the CRTC and connector state connected to them since encoders don't have a state of their own. Without those state pointers, we would need to get the CRTC through the drm_connector_state crtc pointer. However, in order to get the drm_connector_state pointer, we would need to get the connector itself and while usually we have a single connector connected to the encoder, we can't really get it from the encoder at the moment since it could be behind any number of bridges. While this could be addressed by (for example) listing all the connectors and finding the one that has the encoder as its source, it feels like an unnecessary rework for something that is slowly getting replaced by bridges. Since all the users that matter have been converted, let's remove the TODO item. Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-11-maxime@cerno.tech commit 37418bf14c1392260d633e3b4448b78c2f15044a Author: Maxime Ripard Date: Fri Feb 19 13:00:30 2021 +0100 drm: Use state helper instead of the plane state pointer Many drivers reference the plane->state pointer in order to get the current plane state in their atomic_update or atomic_disable hooks, which would be the new plane state in the global atomic state since _swap_state happened when those hooks are run. Use the drm_atomic_get_new_plane_state helper to get that state to make it more obvious. This was made using the coccinelle script below: @ plane_atomic_func @ identifier helpers; identifier func; @@ ( static const struct drm_plane_helper_funcs helpers = { ..., .atomic_disable = func, ..., }; | static const struct drm_plane_helper_funcs helpers = { ..., .atomic_update = func, ..., }; ) @ adds_new_state @ identifier plane_atomic_func.func; identifier plane, state; identifier new_state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { ... - struct drm_plane_state *new_state = plane->state; + struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, plane); ... } @ include depends on adds_new_state @ @@ #include @ no_include depends on !include && adds_new_state @ @@ + #include #include Reviewed-by: Ville Syrjälä Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20210219120032.260676-1-maxime@cerno.tech commit 977697e20b3d758786b67edc33941e5c410ffe4d Author: Maxime Ripard Date: Fri Feb 19 13:00:29 2021 +0100 drm/atomic: Pass the full state to planes atomic disable and update The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's convert the remaining helpers to provide a consistent interface, this time with the planes atomic_update and atomic_disable. The conversion was done using the coccinelle script below, built tested on all the drivers. @@ identifier plane, plane_state; symbol state; @@ struct drm_plane_helper_funcs { ... void (*atomic_update)(struct drm_plane *plane, - struct drm_plane_state *plane_state); + struct drm_atomic_state *state); ... } @@ identifier plane, plane_state; symbol state; @@ struct drm_plane_helper_funcs { ... void (*atomic_disable)(struct drm_plane *plane, - struct drm_plane_state *plane_state); + struct drm_atomic_state *state); ... } @ plane_atomic_func @ identifier helpers; identifier func; @@ ( static const struct drm_plane_helper_funcs helpers = { ..., .atomic_update = func, ..., }; | static const struct drm_plane_helper_funcs helpers = { ..., .atomic_disable = func, ..., }; ) @@ struct drm_plane_helper_funcs *FUNCS; identifier f; identifier crtc_state; identifier plane, plane_state, state; expression e; @@ f(struct drm_crtc_state *crtc_state) { ... struct drm_atomic_state *state = e; <+... ( - FUNCS->atomic_disable(plane, plane_state) + FUNCS->atomic_disable(plane, state) | - FUNCS->atomic_update(plane, plane_state) + FUNCS->atomic_update(plane, state) ) ...+> } @@ identifier plane_atomic_func.func; identifier plane; symbol state; @@ func(struct drm_plane *plane, - struct drm_plane_state *state) + struct drm_plane_state *old_plane_state) { <... - state + old_plane_state ...> } @ ignores_old_state @ identifier plane_atomic_func.func; identifier plane, old_state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_state) { ... when != old_state } @ adds_old_state depends on plane_atomic_func && !ignores_old_state @ identifier plane_atomic_func.func; identifier plane, plane_state; @@ func(struct drm_plane *plane, struct drm_plane_state *plane_state) { + struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane); ... } @ depends on plane_atomic_func @ identifier plane_atomic_func.func; identifier plane, plane_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *plane_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_old_state @ @@ #include @ no_include depends on !include && adds_old_state @ @@ + #include #include @@ identifier plane_atomic_func.func; identifier plane, state; identifier plane_state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { ... struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane); <+... - plane_state->state + state ...+> } Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-9-maxime@cerno.tech commit 9c8f21e6f8856a96634e542a58ef3abf27486801 Author: Xuan Zhuo Date: Thu Feb 18 20:50:45 2021 +0000 xsk: Build skb by page (aka generic zerocopy xmit) This patch is used to construct skb based on page to save memory copy overhead. This function is implemented based on IFF_TX_SKB_NO_LINEAR. Only the network card priv_flags supports IFF_TX_SKB_NO_LINEAR will use page to directly construct skb. If this feature is not supported, it is still necessary to copy data to construct skb. ---------------- Performance Testing ------------ The test environment is Aliyun ECS server. Test cmd: ``` xdpsock -i eth0 -t -S -s ``` Test result data: size 64 512 1024 1500 copy 1916747 1775988 1600203 1440054 page 1974058 1953655 1945463 1904478 percent 3.0% 10.0% 21.58% 32.3% Signed-off-by: Xuan Zhuo Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Reviewed-by: Dust Li Acked-by: Magnus Karlsson Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210218204908.5455-6-alobakin@pm.me commit 3914d88f7608e6c2e80e344474fa289370c32451 Author: Alexander Lobakin Date: Thu Feb 18 20:50:31 2021 +0000 xsk: Respect device's headroom and tailroom on generic xmit path xsk_generic_xmit() allocates a new skb and then queues it for xmitting. The size of new skb's headroom is desc->len, so it comes to the driver/device with no reserved headroom and/or tailroom. Lots of drivers need some headroom (and sometimes tailroom) to prepend (and/or append) some headers or data, e.g. CPU tags, device-specific headers/descriptors (LSO, TLS etc.), and if case of no available space skb_cow_head() will reallocate the skb. Reallocations are unwanted on fast-path, especially when it comes to XDP, so generic XSK xmit should reserve the spaces declared in dev->needed_headroom and dev->needed tailroom to avoid them. Note on max(NET_SKB_PAD, L1_CACHE_ALIGN(dev->needed_headroom)): Usually, output functions reserve LL_RESERVED_SPACE(dev), which consists of dev->hard_header_len + dev->needed_headroom, aligned by 16. However, on XSK xmit hard header is already here in the chunk, so hard_header_len is not needed. But it'd still be better to align data up to cacheline, while reserving no less than driver requests for headroom. NET_SKB_PAD here is to double-insure there will be no reallocations even when the driver advertises no needed_headroom, but in fact need it (not so rare case). Fixes: 35fcde7f8deb ("xsk: support for Tx") Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: Magnus Karlsson Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210218204908.5455-5-alobakin@pm.me commit ab5bd583b9289666e918f9e5f672d33ccdfd49b2 Author: Xuan Zhuo Date: Thu Feb 18 20:50:17 2021 +0000 virtio-net: Support IFF_TX_SKB_NO_LINEAR flag Virtio net supports the case where the skb linear space is empty, so add priv_flags. Signed-off-by: Xuan Zhuo Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: Michael S. Tsirkin Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210218204908.5455-4-alobakin@pm.me commit c2ff53d8049f30098153cd2d1299a44d7b124c57 Author: Xuan Zhuo Date: Thu Feb 18 20:50:02 2021 +0000 net: Add priv_flags for allow tx skb without linear In some cases, we hope to construct skb directly based on the existing memory without copying data. In this case, the page will be placed directly in the skb, and the linear space of skb is empty. But unfortunately, many the network card does not support this operation. For example Mellanox Technologies MT27710 Family [ConnectX-4 Lx] will get the following error message: mlx5_core 0000:3b:00.1 eth1: Error cqe on cqn 0x817, ci 0x8, qn 0x1dbb, opcode 0xd, syndrome 0x1, vendor syndrome 0x68 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000030: 00 00 00 00 60 10 68 01 0a 00 1d bb 00 0f 9f d2 WQE DUMP: WQ size 1024 WQ cur size 0, WQE index 0xf, len: 64 00000000: 00 00 0f 0a 00 1d bb 03 00 00 00 08 00 00 00 00 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000020: 00 00 00 2b 00 08 00 00 00 00 00 05 9e e3 08 00 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 mlx5_core 0000:3b:00.1 eth1: ERR CQE on SQ: 0x1dbb So a priv_flag is added here to indicate whether the network card supports this feature. Suggested-by: Alexander Lobakin Signed-off-by: Xuan Zhuo Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210218204908.5455-3-alobakin@pm.me commit 2463e073497385ef63c220571013a2b89e9b95cc Author: Alexander Lobakin Date: Thu Feb 18 20:49:41 2021 +0000 netdevice: Add missing IFF_PHONY_HEADROOM self-definition This is harmless for now, but can be fatal for future refactors. Fixes: 871b642adebe3 ("netdev: introduce ndo_set_rx_headroom") Signed-off-by: Alexander Lobakin Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Link: https://lore.kernel.org/bpf/20210218204908.5455-2-alobakin@pm.me commit 41016fe1028e4b0ee6f436f928564699898ec2b0 Author: Maxime Ripard Date: Fri Feb 19 13:00:28 2021 +0100 drm: Rename plane->state variables in atomic update and disable Some drivers are storing the plane->state pointer in atomic_update and atomic_disable in a variable simply called state, while the state passed as an argument is called old_state. In order to ease subsequent reworks and to avoid confusing or inconsistent names, let's rename those variables to new_state. This was done using the following coccinelle script, plus some manual changes for mtk and tegra. @ plane_atomic_func @ identifier helpers; identifier func; @@ ( static const struct drm_plane_helper_funcs helpers = { ..., .atomic_disable = func, ..., }; | static const struct drm_plane_helper_funcs helpers = { ..., .atomic_update = func, ..., }; ) @ moves_new_state_old_state @ identifier plane_atomic_func.func; identifier plane; symbol old_state; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_state) { ... - struct drm_plane_state *state = plane->state; + struct drm_plane_state *new_state = plane->state; ... } @ depends on moves_new_state_old_state @ identifier plane_atomic_func.func; identifier plane; identifier old_state; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_state) { <... - state + new_state ...> } @ moves_new_state_oldstate @ identifier plane_atomic_func.func; identifier plane; symbol oldstate; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *oldstate) { ... - struct drm_plane_state *state = plane->state; + struct drm_plane_state *newstate = plane->state; ... } @ depends on moves_new_state_oldstate @ identifier plane_atomic_func.func; identifier plane; identifier old_state; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_state) { <... - state + newstate ...> } @ moves_new_state_old_pstate @ identifier plane_atomic_func.func; identifier plane; symbol old_pstate; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_pstate) { ... - struct drm_plane_state *state = plane->state; + struct drm_plane_state *new_pstate = plane->state; ... } @ depends on moves_new_state_old_pstate @ identifier plane_atomic_func.func; identifier plane; identifier old_pstate; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_pstate) { <... - state + new_pstate ...> } Reviewed-by: Ville Syrjälä Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-8-maxime@cerno.tech commit e05162c017e2e14b94dfd4e55d2f006a9a642c6d Author: Maxime Ripard Date: Fri Feb 19 13:00:27 2021 +0100 drm: Store new plane state in a variable for atomic_update and disable In order to store the new plane state in a subsequent helper, let's move the plane->state dereferences into a variable. This was done using the following coccinelle script, plus some hand changes for vmwgfx: @ plane_atomic_func @ identifier helpers; identifier func; @@ ( static const struct drm_plane_helper_funcs helpers = { ..., .atomic_disable = func, ..., }; | static const struct drm_plane_helper_funcs helpers = { ..., .atomic_update = func, ..., }; ) @ has_new_state_old_state @ identifier plane_atomic_func.func; identifier plane; identifier new_state; symbol old_state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_state) { ... struct drm_plane_state *new_state = plane->state; ... } @ depends on !has_new_state_old_state @ identifier plane_atomic_func.func; identifier plane; symbol old_state; @@ func(struct drm_plane *plane, struct drm_plane_state *old_state) { + struct drm_plane_state *new_state = plane->state; <+... - plane->state + new_state ...+> } @ has_new_state_state @ identifier plane_atomic_func.func; identifier plane; identifier new_state; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *state) { ... struct drm_plane_state *new_state = plane->state; ... } @ depends on !has_new_state_state @ identifier plane_atomic_func.func; identifier plane; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *state) { + struct drm_plane_state *new_plane_state = plane->state; <+... - plane->state + new_plane_state ...+> } @ has_new_state_old_s @ identifier plane_atomic_func.func; identifier plane; identifier new_state; symbol old_s; @@ func(struct drm_plane *plane, struct drm_plane_state *old_s) { ... struct drm_plane_state *new_state = plane->state; ... } @ depends on !has_new_state_old_s @ identifier plane_atomic_func.func; identifier plane; symbol old_s; @@ func(struct drm_plane *plane, struct drm_plane_state *old_s) { + struct drm_plane_state *new_s = plane->state; <+... - plane->state + new_s ...+> } Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://lore.kernel.org/r/20210219120032.260676-1-maxime@cerno.tech commit 0b6aaf9d76f0420be015b97724ff764844d7c46d Author: Maxime Ripard Date: Fri Feb 19 13:00:26 2021 +0100 drm: Use state helper instead of plane state pointer in atomic_check Many drivers reference the plane->state pointer in order to get the current plane state in their atomic_check hook, which would be the old plane state in the global atomic state since _swap_state hasn't happened when atomic_check is run. Use the drm_atomic_get_old_plane_state helper to get that state to make it more obvious. This was made using the coccinelle script below: @ plane_atomic_func @ identifier helpers; identifier func; @@ static struct drm_plane_helper_funcs helpers = { ..., .atomic_check = func, ..., }; @ replaces_old_state @ identifier plane_atomic_func.func; identifier plane, state, plane_state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { ... - struct drm_plane_state *plane_state = plane->state; + struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane); ... } @@ identifier plane_atomic_func.func; identifier plane, state, plane_state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { struct drm_plane_state *plane_state = drm_atomic_get_old_plane_state(state, plane); <... - plane->state + plane_state ...> } @ adds_old_state @ identifier plane_atomic_func.func; identifier plane, state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { + struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane); <... - plane->state + old_plane_state ...> } @ include depends on adds_old_state || replaces_old_state @ @@ #include @ no_include depends on !include && (adds_old_state || replaces_old_state) @ @@ + #include #include Reviewed-by: Ville Syrjälä Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-6-maxime@cerno.tech commit dec92020671c48da231189eb06a5f755f492f87f Author: Maxime Ripard Date: Fri Feb 19 13:00:25 2021 +0100 drm: Use the state pointer directly in planes atomic_check Now that atomic_check takes the global atomic state as a parameter, we don't need to go through the pointer in the plane state. This was done using the following coccinelle script: @ plane_atomic_func @ identifier helpers; identifier func; @@ static struct drm_plane_helper_funcs helpers = { ..., .atomic_check = func, ..., }; @@ identifier plane_atomic_func.func; identifier plane, state; identifier plane_state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { ... - struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); <... when != plane_state - plane_state->state + state ...> } @@ identifier plane_atomic_func.func; identifier plane, state; identifier plane_state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { ... struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); <... - plane_state->state + state ...> } Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-5-maxime@cerno.tech commit 7c11b99a8e58c0875c4d433c6aea10e9fb93beb1 Author: Maxime Ripard Date: Fri Feb 19 13:00:24 2021 +0100 drm/atomic: Pass the full state to planes atomic_check The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's convert all the remaining helpers to provide a consistent interface, starting with the planes atomic_check. The conversion was done using the coccinelle script below plus some manual changes for vmwgfx, built tested on all the drivers. @@ identifier plane, plane_state; symbol state; @@ struct drm_plane_helper_funcs { ... int (*atomic_check)(struct drm_plane *plane, - struct drm_plane_state *plane_state); + struct drm_atomic_state *state); ... } @ plane_atomic_func @ identifier helpers; identifier func; @@ static const struct drm_plane_helper_funcs helpers = { ..., .atomic_check = func, ..., }; @@ struct drm_plane_helper_funcs *FUNCS; identifier f; identifier dev; identifier plane, plane_state, state; @@ f(struct drm_device *dev, struct drm_atomic_state *state) { <+... - FUNCS->atomic_check(plane, plane_state) + FUNCS->atomic_check(plane, state) ...+> } @ ignores_new_state @ identifier plane_atomic_func.func; identifier plane, new_plane_state; @@ func(struct drm_plane *plane, struct drm_plane_state *new_plane_state) { ... when != new_plane_state } @ adds_new_state depends on plane_atomic_func && !ignores_new_state @ identifier plane_atomic_func.func; identifier plane, new_plane_state; @@ func(struct drm_plane *plane, struct drm_plane_state *new_plane_state) { + struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); ... } @ depends on plane_atomic_func @ identifier plane_atomic_func.func; identifier plane, new_plane_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *new_plane_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_new_state @ @@ #include @ no_include depends on !include && adds_new_state @ @@ + #include #include Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-4-maxime@cerno.tech commit 6af70eb3b40edfc8bdf2373cdc2bcf9d5a20c8c7 Author: Maxime Ripard Date: Fri Feb 19 13:00:23 2021 +0100 drm/atmel-hlcdc: Rename custom plane state variable Subsequent reworks will pass the global atomic state in the function prototype, and atomic_check and atomic_update already have such a variable already. Let's change them to ease the rework. Acked-by: Sam Ravnborg Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-3-maxime@cerno.tech commit ba5c1649465d40a0557e67bc9819ef687a7d99f4 Author: Maxime Ripard Date: Fri Feb 19 13:00:22 2021 +0100 drm: Rename plane atomic_check state names Most drivers call the argument to the plane atomic_check hook simply state, which is going to conflict with the global atomic state in a later rework. Let's rename it to new_plane_state (or new_state depending on the convention used in the driver). This was done using the coccinelle script below, and built tested: @ plane_atomic_func @ identifier helpers; identifier func; @@ static const struct drm_plane_helper_funcs helpers = { .atomic_check = func, }; @ has_old_state @ identifier plane_atomic_func.func; identifier plane; expression e; symbol old_state; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *state) { ... struct drm_plane_state *old_state = e; ... } @ depends on has_old_state @ identifier plane_atomic_func.func; identifier plane; symbol old_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *state + struct drm_plane_state *new_state ) { <+... - state + new_state ...+> } @ has_state @ identifier plane_atomic_func.func; identifier plane; symbol state; @@ func(struct drm_plane *plane, struct drm_plane_state *state) { ... } @ depends on has_state @ identifier plane_atomic_func.func; identifier plane; symbol old_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *state + struct drm_plane_state *new_plane_state ) { <+... - state + new_plane_state ...+> } Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-2-maxime@cerno.tech commit 5ddb0bd4ddc35d9c9376d109398f84277bb8d25e Author: Maxime Ripard Date: Fri Feb 19 13:00:21 2021 +0100 drm/atomic: Pass the full state to planes async atomic check and update The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's start convert all the remaining helpers to provide a consistent interface, starting with the planes atomic_async_check and atomic_async_update. The conversion was done using the coccinelle script below, built tested on all the drivers. @@ identifier plane, plane_state; symbol state; @@ struct drm_plane_helper_funcs { ... int (*atomic_async_check)(struct drm_plane *plane, - struct drm_plane_state *plane_state); + struct drm_atomic_state *state); ... } @@ identifier plane, plane_state; symbol state; @@ struct drm_plane_helper_funcs { ... void (*atomic_async_update)(struct drm_plane *plane, - struct drm_plane_state *plane_state); + struct drm_atomic_state *state); ... } @ plane_atomic_func @ identifier helpers; identifier func; @@ ( static const struct drm_plane_helper_funcs helpers = { ..., .atomic_async_check = func, ..., }; | static const struct drm_plane_helper_funcs helpers = { ..., .atomic_async_update = func, ..., }; ) @@ struct drm_plane_helper_funcs *FUNCS; identifier f; identifier dev; identifier plane, plane_state, state; @@ f(struct drm_device *dev, struct drm_atomic_state *state) { <+... - FUNCS->atomic_async_check(plane, plane_state) + FUNCS->atomic_async_check(plane, state) ...+> } @@ struct drm_plane_helper_funcs *FUNCS; identifier f; identifier dev; identifier plane, plane_state, state; @@ f(struct drm_device *dev, struct drm_atomic_state *state) { <+... - FUNCS->atomic_async_update(plane, plane_state) + FUNCS->atomic_async_update(plane, state) ...+> } @@ identifier mtk_plane_atomic_async_update; identifier plane; symbol new_state, state; expression e; @@ void mtk_plane_atomic_async_update(struct drm_plane *plane, struct drm_plane_state *new_state) { ... - struct mtk_plane_state *state = e; + struct mtk_plane_state *new_plane_state = e; <+... - state + new_plane_state ...+> } @@ identifier plane_atomic_func.func; identifier plane; symbol state; @@ func(struct drm_plane *plane, - struct drm_plane_state *state) + struct drm_plane_state *new_plane_state) { <... - state + new_plane_state ...> } @ ignores_new_state @ identifier plane_atomic_func.func; identifier plane, new_plane_state; @@ func(struct drm_plane *plane, struct drm_plane_state *new_plane_state) { ... when != new_plane_state } @ adds_new_state depends on plane_atomic_func && !ignores_new_state @ identifier plane_atomic_func.func; identifier plane, new_plane_state; @@ func(struct drm_plane *plane, struct drm_plane_state *new_plane_state) { + struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); ... } @ depends on plane_atomic_func @ identifier plane_atomic_func.func; identifier plane, plane_state; @@ func(struct drm_plane *plane, - struct drm_plane_state *plane_state + struct drm_atomic_state *state ) { ... } @ include depends on adds_new_state @ @@ #include @ no_include depends on !include && adds_new_state @ @@ + #include #include @@ identifier plane_atomic_func.func; identifier plane, state; identifier plane_state; @@ func(struct drm_plane *plane, struct drm_atomic_state *state) { ... struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); <+... - plane_state->state + state ...+> } Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210219120032.260676-1-maxime@cerno.tech commit d919d3d6cdb31d0f9fe06c880f683a24f2838813 Author: Wayne Lin Date: Wed Feb 24 18:15:21 2021 +0800 drm/dp_mst: Set CLEAR_PAYLOAD_ID_TABLE as broadcast [Why & How] According to DP spec, CLEAR_PAYLOAD_ID_TABLE is a path broadcast request message and current implementation is incorrect. Fix it. Signed-off-by: Wayne Lin Cc: stable@vger.kernel.org Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210224101521.6713-3-Wayne.Lin@amd.com commit 419e91ea3143bf26991442465ac64d9461e98d96 Author: Wayne Lin Date: Wed Feb 24 18:15:20 2021 +0800 drm/dp_mst: Revise broadcast msg lct & lcr [Why & How] According to DP spec, broadcast message LCT equals to 1 and LCR equals to 6. Current implementation is incorrect. Fix it. In addition, revise a bit the hdr->rad handling to include broadcast case. Signed-off-by: Wayne Lin Cc: stable@vger.kernel.org Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210224101521.6713-2-Wayne.Lin@amd.com commit 8fb4acb880e9467adca913e51adf5c1f96fbbeb9 Author: satya priya Date: Wed Feb 24 14:03:11 2021 +0530 regulator: qcom-rpmh: Use correct buck for S1C regulator Use correct buck, that is, pmic5_hfsmps515 for S1C regulator of PM8350C PMIC. Signed-off-by: satya priya Link: https://lore.kernel.org/r/1614155592-14060-7-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown commit 62861a478e06d87dbfbb0ed3684056ba19a9886e Author: satya priya Date: Wed Feb 24 14:03:08 2021 +0530 regulator: qcom-rpmh: Correct the pmic5_hfsmps515 buck Correct the REGULATOR_LINEAR_RANGE and n_voltges for pmic5_hfsmps515 buck. Signed-off-by: satya priya Link: https://lore.kernel.org/r/1614155592-14060-4-git-send-email-skakit@codeaurora.org Signed-off-by: Mark Brown commit fa27f54021df1dba488adc69c146fb2ba7f394b5 Merge: 741c8397e5d0b 982042931c255 Author: Mark Brown Date: Wed Feb 24 16:28:50 2021 +0000 Merge series "ASoC: rt5670: Various kcontrol fixes" from Hans de Goede : Hi All, While working on adding hardware-volume control support to the UCM profile for the rt5672 and on adding LED trigger support to the rt5670 codec driver. I hit / noticed a couple of issues this series fixes these issues. Regards, Hans Hans de Goede (4): ASoC: rt5670: Remove 'OUT Channel Switch' control ASoC: rt5670: Remove 'HP Playback Switch' control ASoC: rt5670: Remove ADC vol-ctrl mute bits poking from Sto1 ADC mixer settings ASoC: rt5670: Add emulated 'DAC1 Playback Switch' control sound/soc/codecs/rt5670.c | 110 +++++++++++++++++++++++++++++++++----- sound/soc/codecs/rt5670.h | 9 ++-- 2 files changed, 101 insertions(+), 18 deletions(-) -- 2.30.1 commit b9fc8b4a591811546fec2dbef7e9f809362100c9 Author: Grant Seltzer Date: Mon Feb 22 19:58:46 2021 +0000 bpf: Add kernel/modules BTF presence checks to bpftool feature command This adds both the CONFIG_DEBUG_INFO_BTF and CONFIG_DEBUG_INFO_BTF_MODULES kernel compile option to output of the bpftool feature command. This is relevant for developers that want to account for data structure definition differences between kernels. Signed-off-by: Grant Seltzer Signed-off-by: Andrii Nakryiko Signed-off-by: Daniel Borkmann Acked-by: Martin KaFai Lau Link: https://lore.kernel.org/bpf/20210222195846.155483-1-grantseltzer@gmail.com commit 6c65a582ee7616ee6b86eb954b0daac959dc5cc3 Author: Jiapeng Chong Date: Tue Feb 23 11:43:33 2021 +0800 drm/amdgpu: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/amdgpu/athub_v2_1.c:79:40-45: WARNING: conversion to bool not needed here. ./drivers/gpu/drm/amd/amdgpu/athub_v2_1.c:81:40-45: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit eb0709ba077a21ea921a6aa7f5332aad2492727b Author: Souptick Joarder Date: Tue Feb 23 00:55:31 2021 +0530 drm/amdgpu/display: initialize the variable 'i' >> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9804:38: >> warning: variable 'i' is uninitialized when used here >> [-Wuninitialized] timing = &edid->detailed_timings[i]; ^ drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:9714:7: note: initialize the variable 'i' to silence this warning int i; ^ = 0 1 warning generated. Initialize the variable 'i'. Reported-by: kernel test robot Signed-off-by: Souptick Joarder Signed-off-by: Alex Deucher commit b2576c3bf4ce9b992e1c1fbb1cffe0d606702621 Author: Sonny Jiang Date: Sun Jan 31 09:44:51 2021 -0500 drm/amdgpu/vcn3.0: add wptr/rptr reset/update for share memory Because of dpg, the rptr/wptr need to be saved on fw shared memory, and restore them back in RBC_RB_RPTR/WPTR in kernel at power up. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher commit 4588f7b7dd5f09e70b6e223490a0d054c3d64071 Author: Stylon Wang Date: Tue Feb 23 18:32:09 2021 +0800 drm/amd/display: Enable ASSR in DM This patch enables ASSR if display declares such support in DPCD. Signed-off-by: Stylon Wang Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit f8f70c1371d304f42d4a1242d8abcbda807d0bed Author: John Clements Date: Tue Feb 23 17:03:08 2021 +0800 drm/amdgpu: disable mec2 fw bin loading disable mec2 fw bin loading and reference on unsupported ASIC Reviewed-by: Hawking Zhang Signed-off-by: John Clements Signed-off-by: Alex Deucher commit 211fe484a624ee63d55063960ec6de8f959fead7 Author: Tao Zhou Date: Mon Feb 22 16:26:53 2021 +0800 drm/amdgpu: fix wrong executable setting for dimgrey_cavefish_reg_init.c Remove executable configuration for the file. Reported-by: Ming Wang Signed-off-by: Tao Zhou Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit b00978de90752ba7ff73a3cab2de3fa1264ab932 Author: Prike Liang Date: Mon Feb 22 14:04:12 2021 +0800 drm/amdgpu: fix shutdown and poweroff process failed with s0ix In the shutdown and poweroff opt on the s0i3 system we still need un-gate the gfx clock gating and power gating before destory amdgpu device. Fixes: 628c36d7b238e2 ("drm/amdgpu: update amdgpu device suspend/resume sequence for s0i3 support") Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1499 Signed-off-by: Alex Deucher Signed-off-by: Prike Liang Reviewed-by: Alex Deucher commit cd48758c82520aa20ac1b7b74fe5cefd4a46fd6a Author: Jiapeng Chong Date: Sat Feb 20 16:35:10 2021 +0800 drm/amdgpu/sdma5.2: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1621:40-45: WARNING: conversion to bool not needed here. ./drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c:1619:40-45: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 2f97d8b788b33062ac05d3808fbced9e4610ee40 Author: Jiapeng Chong Date: Sat Feb 20 15:15:52 2021 +0800 drm/amd/display/dc/core/dc_link_ddc: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c:544:34-39: WARNING: conversion to bool not needed here. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 94576d03d137094cd2ff1815bb26282509220398 Author: Jiapeng Chong Date: Sat Feb 20 10:55:06 2021 +0800 drm/amdgpu/swsmu/navi1x: Remove unnecessary conversion to bool Fix the following coccicheck warnings: ./drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c:900:47-52: WARNING: conversion to bool not needed here. Reviewed-by: Evan Quan Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Signed-off-by: Alex Deucher commit 8addf37c24226acb4f67d87a7569ac8f53e822b7 Author: Nathan Chancellor Date: Thu Feb 18 15:48:50 2021 -0700 drm/amd/pm/swsmu: Avoid using structure_size uninitialized in smu_cmn_init_soft_gpu_metrics Clang warns: drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:764:2: warning: variable 'structure_size' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:770:23: note: uninitialized use occurs here memset(header, 0xFF, structure_size); ^~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:753:25: note: initialize the variable 'structure_size' to silence this warning uint16_t structure_size; ^ = 0 1 warning generated. Return in the default case, as the size of the header will not be known. Fixes: de4b7cd8cb87 ("drm/amd/pm/swsmu: unify the init soft gpu metrics function") Link: https://github.com/ClangBuiltLinux/linux/issues/1304 Reviewed-by: Kevin Wang Signed-off-by: Nathan Chancellor Signed-off-by: Alex Deucher commit afdd1de0f9e71dc5115416a47224829ad55cc9a4 Author: Mario Kleiner Date: Fri Feb 12 23:29:54 2021 +0100 drm/amd/display: Allow spatial dither to 10 bpc on all DCE Spatial dithering to 10 bpc depth was disabled for all DCE's. Testing on DCE-8.3 and DCE-11.2 did not show any obvious ill effects, but a measureable precision improvement (via colorimeter) when displaying a fp16 framebuffer to a 10 bpc DP or HDMI connected HDR-10 monitor. v2: enable it for all DCEs (Alex) Signed-off-by: Mario Kleiner Cc: Alex Deucher Reviewed-by: Mario Kleiner (v2) Signed-off-by: Alex Deucher commit d7faf6f5347baec5cc774f3d46557f8782d87ee9 Author: Qingqing Zhuo Date: Tue Feb 9 16:36:41 2021 -0500 drm/amd/display: Fix system hang after multiple hotplugs (v3) [Why] mutex_lock() was introduced in dm_disable_vblank(), which could be called in an IRQ context. Waiting in IRQ would cause issues like kernel lockup, etc. [How] Handle code that requires mutex lock on a different thread. v2: squash in compilation fix without CONFIG_DRM_AMD_DC_DCN (Alex) v3: squash in warning fix (Wei) Signed-off-by: Qingqing Zhuo Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org commit 216e8e80057a9f0b6366327881acf88eaf9f1fd4 Author: Álvaro Fernández Rojas Date: Tue Feb 23 16:18:51 2021 +0100 spi: bcm63xx-hsspi: fix pm_runtime The driver sets auto_runtime_pm to true, but it doesn't call pm_runtime_enable(), which results in "Failed to power device" when PM support is enabled. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210223151851.4110-3-noltari@gmail.com Signed-off-by: Mark Brown commit 73ae625da5c36300fccd809738e7c68f49ebce35 Author: Álvaro Fernández Rojas Date: Tue Feb 23 16:18:50 2021 +0100 spi: bcm63xx-spi: fix pm_runtime The driver sets auto_runtime_pm to true, but it doesn't call pm_runtime_enable(), which results in "Failed to power device" when PM support is enabled. Signed-off-by: Álvaro Fernández Rojas Link: https://lore.kernel.org/r/20210223151851.4110-2-noltari@gmail.com Signed-off-by: Mark Brown commit ef4848a6532ba0b241d3b6cad70378ff2c5615ca Author: Frieder Schrempf Date: Mon Feb 22 16:08:04 2021 +0100 regulator: pca9450: Fix return value when failing to get sd-vsel GPIO This fixes the return value of pca9450_i2c_probe() to use the correct error code when getting the sd-vsel GPIO fails. Signed-off-by: Frieder Schrempf Link: https://lore.kernel.org/r/20210222150809.208942-1-frieder.schrempf@kontron.de Signed-off-by: Mark Brown commit 741c8397e5d0b339fb3e614a9ff5cb4bf7ae1a65 Author: Shengjiu Wang Date: Wed Feb 24 14:57:52 2021 +0800 ASoC: ak5558: Add MODULE_DEVICE_TABLE Add missed MODULE_DEVICE_TABLE for the driver can be loaded automatically at boot. Fixes: 920884777480 ("ASoC: ak5558: Add support for AK5558 ADC driver") Cc: Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1614149872-25510-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit f84b4524005238fc9fd5cf615bb426fa40a99494 Author: Shengjiu Wang Date: Wed Feb 24 14:57:51 2021 +0800 ASoC: ak4458: Add MODULE_DEVICE_TABLE Add missed MODULE_DEVICE_TABLE for the driver can be loaded automatically at boot. Fixes: 08660086eff9 ("ASoC: ak4458: Add support for AK4458 DAC driver") Cc: Signed-off-by: Shengjiu Wang Link: https://lore.kernel.org/r/1614149872-25510-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown commit 982042931c255e2e7f196c24f1e5d6de780e04f9 Author: Hans de Goede Date: Mon Feb 15 15:21:18 2021 +0100 ASoC: rt5670: Add emulated 'DAC1 Playback Switch' control For reliable output-mute LED control we need a "DAC1 Playback Switch" control. The "DAC Playback volume" control is the only control in the path from the DAC1 data input to the speaker output, so the UCM profile for the speaker output will have its PlaybackMixerElem set to "DAC1". But userspace (pulseaudio) will set the "DAC1 Playback Volume" control to its softest setting (which is not fully muted) while still showing the speaker as being enabled at a low volume in the UI. If we were to set the SNDRV_CTL_ELEM_ACCESS_SPK_LED on the "DAC1 Playback Volume" control, this would mean then what pressing KEY_VOLUMEDOWN the speaker-mute LED (embedded in the volume-mute toggle key) would light while the UI is still showing the speaker as being enabled at a low volume, meaning that the UI and the LED are out of sync. Only after an _extra_ KEY_VOLUMEDOWN press would the UI show the speaker as being muted. The path from DAC1 data input to the speaker output does have a digital mixer with DAC1's data as one of its inputs direclty after the "DAC1 Playback Volume" control. This commit adds an emulated "DAC1 Playback Switch" control by: 1. Declaring the enable flag for that mixers DAC1 input as well as the "DAC1 Playback Switch" control both as SND_SOC_NOPM controls. 2. Storing the settings of both controls as driver-private data 3. Only clearing the mute flag for the DAC1 input of that mixer if the stored values indicate both controls are enabled. This is a preparation patch for adding "audio-mute" LED trigger support. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210215142118.308516-5-hdegoede@redhat.com Signed-off-by: Mark Brown commit 674e4ff4c2326c6e3f8ddc73c61910bf32228720 Author: Hans de Goede Date: Mon Feb 15 15:21:17 2021 +0100 ASoC: rt5670: Remove ADC vol-ctrl mute bits poking from Sto1 ADC mixer settings The SND_SOC_DAPM_MIXER declaration for "Sto1 ADC MIXL" and "Sto1 ADC MIXR" was using the mute bits from the RT5670_STO1_ADC_DIG_VOL control as mixer master mute bits. But these bits are already exposed to userspace as controls as part of the "ADC Capture Volume" / "ADC Capture Switch" control pair: SOC_DOUBLE("ADC Capture Switch", RT5670_STO1_ADC_DIG_VOL, RT5670_L_MUTE_SFT, RT5670_R_MUTE_SFT, 1, 1), SOC_DOUBLE_TLV("ADC Capture Volume", RT5670_STO1_ADC_DIG_VOL, RT5670_L_VOL_SFT, RT5670_R_VOL_SFT, 127, 0, adc_vol_tlv), Both the fact that the mute bits belong to the same reg as the vol-ctrl and the "Digital Mixer Path" diagram in the datasheet clearly shows that these mute bits are not part of the mixer and having 2 separate controls poking at the same bits is a bad idea. Remove the master-mute bits settings from the "Sto1 ADC MIXL" and "Sto1 ADC MIXR" DAPM widget declarations, avoiding these bits getting poked from 2 different places. This should not cause any issues for userspace. AFAICT the rt567x codecs are only used on x86/ACPI devices and the UCM profiles used there already set the "ADC Capture Switch" as needed. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210215142118.308516-4-hdegoede@redhat.com Signed-off-by: Mark Brown commit 8022f09883e827855d86173756caa07b891100f0 Author: Hans de Goede Date: Mon Feb 15 15:21:16 2021 +0100 ASoC: rt5670: Remove 'HP Playback Switch' control The RT5670_L_MUTE_SFT and RT5670_R_MUTE_SFT bits (bits 15 and 7) of the RT5670_HP_VOL register are set / unset by the headphones deplop code run by rt5670_hp_event() on SND_SOC_DAPM_POST_PMU / SND_SOC_DAPM_PRE_PMD. So we should not also export a control to userspace which toggles these same bits. This should not cause any issues for userspace. AFAICT the rt567x codecs are only used on x86/ACPI devices and the UCM profiles used there do not use the "HP Playback Switch" control. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210215142118.308516-3-hdegoede@redhat.com Signed-off-by: Mark Brown commit 30be2641848b2450f0f1b62e3a8aea42e14db640 Author: Hans de Goede Date: Mon Feb 15 15:21:15 2021 +0100 ASoC: rt5670: Remove 'OUT Channel Switch' control The "OUT Channel Switch" control is a left over from code copied from thr rt5640 codec driver. With the rt5640 codec driver the output volume controls have 2 pairs of mute bits: bit 7, 15: Mute Control for Spk/Headphone/Line Output Port bit 6, 14: Mute Control for Spk/Headphone/Line Volume Channel Bits 7 and 15 are normal mute bits on the rt5670/5672 which are controlled by 2 dapm widgets: SND_SOC_DAPM_SWITCH("LOUT L Playback", SND_SOC_NOPM, 0, 0, &lout_l_enable_control), SND_SOC_DAPM_SWITCH("LOUT R Playback", SND_SOC_NOPM, 0, 0, &lout_r_enable_control), But on the 5670/5672 bit 6 is always reserved, where as bit 14 is "LOUT Differential Mode" on the 5670 and also reserved on the 5672. So the "OUT Channel Switch" control which is controlling bits 6+14 of the "LINE Output Control" register is bogus -> remove it. This should not cause any issues for userspace. AFAICT the rt567x codecs are only used on x86/ACPI devices and the UCM profiles used there do not use the "OUT Channel Switch" control. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20210215142118.308516-2-hdegoede@redhat.com Signed-off-by: Mark Brown commit c73927183f2b85bf1a06d75d2b51be72aff42358 Author: Imre Deak Date: Mon Feb 22 23:04:00 2021 +0200 drm/i915/tgl+: Sanitize the DDI LANES/IO and AUX power domain names In Bspec the TGL TypeC ports are TC1-6, the AUX power well request flags are USBC1-6/TBT1-6, so for clarity use these names in the port power domain names instead of the D-I terminology (which Bspec uses only for the ICL TypeC ports). A domain name should follow the _ format. Add the new aliases based on this, leaving a change to rename all the rest accordingly for a follow-up. No functional change. v2: Add comment to commit log about unifying domain names. (Jose) Cc: Souza Jose Signed-off-by: Imre Deak Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210222210400.940158-1-imre.deak@intel.com commit e3de5bb7ac1a4cb262f8768924fd3ef6182b10bb Author: Pradeep Kumar Chitrapu Date: Thu Feb 18 10:27:08 2021 -0800 ath11k: fix thermal temperature read Fix dangling pointer in thermal temperature event which causes incorrect temperature read. Tested-on: IPQ8074 AHB WLAN.HK.2.4.0.1-00041-QCAHKSWPL_SILICONZ-1 Signed-off-by: Pradeep Kumar Chitrapu Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210218182708.8844-1-pradeepc@codeaurora.org commit 3808a18043a8d16ea1bc0ebe59c864f73413dbbf Author: Miaoqing Pan Date: Thu Feb 18 14:45:09 2021 +0800 ath11k: fix potential wmi_mgmt_tx_queue race condition There is a potential race condition between skb_queue_len() and skb_queue_tail(), the former may get old value before updated by the latter. So use skb_queue_len_lockless() instead. And also use '>=', in case we queue a few SKBs simultaneously. Found while discussing a similar fix for ath10k: https://patchwork.kernel.org/project/linux-wireless/patch/1608515579-1066-1-git-send-email-miaoqing@codeaurora.org/ No functional changes, compile tested only. Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1613630709-704-1-git-send-email-miaoqing@codeaurora.org commit 097e9f0714555e5da72c7ebc5377107fdf10e57d Author: Kalle Valo Date: Mon Feb 22 09:35:56 2021 +0200 ath11k: qmi: cosmetic changes to error messages Change the error messages to follow the style used in ath11k. Also include error values in the messages which didn't have that. No functional changes, compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1613569421-14177-2-git-send-email-kvalo@codeaurora.org commit bf458d79cfc46f7fc7a77c1cfd91323050922e11 Author: Kalle Valo Date: Mon Feb 22 09:35:49 2021 +0200 ath11k: qmi: add more debug messages To make it easier to follow the qmi event flow. No functional changes, compile tested only. Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1613569421-14177-1-git-send-email-kvalo@codeaurora.org commit 66922f850910056a2a3193388dd69b900e824717 Author: Mario Kleiner Date: Sun Jan 24 05:40:10 2021 +0100 drm: Fix HDMI_STATIC_METADATA_TYPE1 constant According to the CTA 861.G spec, HDMI_STATIC_METADATA_TYPE1 is not 1, but zero, so fix this enum. While this doesn't cause problems in the kernel yet, as the constant isn't actively used by drivers yet, it did create confusion while debugging HDR problems in yours truly, and also potential bugs in userspace components, as the wrong enum propagates to components, e.g., like it did already into intel-gpu-tools (tests/kms_hdr.c) or is used as wrong reference when writing future new userspace HDR components like compositors. Fixes: fbb5d0353c62 ("drm: Add HDR source metadata property") Signed-off-by: Mario Kleiner Cc: Uma Shankar Cc: Shashank Sharma Cc: Ville Syrjälä Reviewed-by: Simon Ser Signed-off-by: Simon Ser Link: https://patchwork.freedesktop.org/patch/msgid/20210124044010.18678-1-mario.kleiner.de@gmail.com commit 62c211bb9e1bee0083d8061ce0012f538ac754c3 Author: Gwan-gyeong Mun Date: Mon Feb 22 23:30:06 2021 +0200 drm/i915/display: Do not allow DC3CO if PSR SF is enabled Even though GEN12+ HW supports PSR + DC3CO, DMC's HW DC3CO exit mechanism has an issue with using of Selective Fecth and PSR2 manual tracking. And as some GEN12+ platforms (RKL, ADL-S) don't support PSR2 HW tracking, Selective Fetch will be enabled by default on that platforms. Therefore if the system enables PSR Selective Fetch / PSR manual tracking, it does not allow DC3CO dc state, in that case. When this DC3CO exit issue is addressed while PSR Selective Fetch is enabled, this restriction should be removed. v2: Address Jose's review comment. - Fix typo - Move check routine of DC3CO ability to tgl_dc3co_exitline_compute_config() v3: Change the check routine of enablement of psr2 sel fetch. (Jose) Cc: José Roberto de Souza Cc: Anshuman Gupta 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/20210222213006.1609085-1-gwan-gyeong.mun@intel.com commit 9fd914d917da05641b42cab7d40bdf8ab06dac3b Author: Alexander Shiyan Date: Tue Feb 16 14:42:21 2021 +0300 ASoC: fsl_ssi: Fix TDM slot setup for I2S mode When using the driver in I2S TDM mode, the _fsl_ssi_set_dai_fmt() function rewrites the number of slots previously set by the fsl_ssi_set_dai_tdm_slot() function to 2 by default. To fix this, let's use the saved slot count value or, if TDM is not used and the slot count is not set, proceed as before. Fixes: 4f14f5c11db1 ("ASoC: fsl_ssi: Fix number of words per frame for I2S-slave mode") Signed-off-by: Alexander Shiyan Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20210216114221.26635-1-shc_work@mail.ru Signed-off-by: Mark Brown commit 2d003ec15396cc8ffa2a887605c98a967de3078d Author: Colin Ian King Date: Mon Feb 15 16:33:13 2021 +0000 ASoC: codecs: lpass-rx-macro: Fix uninitialized variable ec_tx There is potential read of the uninitialized variable ec_tx if the call to snd_soc_component_read fails or returns an unrecognized w->name. To avoid this corner case, initialize ec_tx to -1 so that it is caught later when ec_tx is bounds checked. Addresses-Coverity: ("Uninitialized scalar variable") Fixes: 4f692926f562 ("ASoC: codecs: lpass-rx-macro: add dapm widgets and route") Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20210215163313.84026-1-colin.king@canonical.com Signed-off-by: Mark Brown commit 84b7725536d82e99b7564a079b8627f3be692a13 Author: Arnaldo Carvalho de Melo Date: Tue Feb 23 09:56:50 2021 -0300 tools headers UAPI: Sync kvm.h headers with the kernel sources To pick the changes in: d9a47edabc4f9481 ("KVM: PPC: Book3S HV: Introduce new capability for 2nd DAWR") 8d4e7e80838f45d3 ("KVM: x86: declare Xen HVM shared info capability and add test case") 40da8ccd724f7ca2 ("KVM: x86/xen: Add event channel interrupt vector upcall") These new IOCTLs are now supported on 'perf trace': $ tools/perf/trace/beauty/kvm_ioctl.sh > before $ cp include/uapi/linux/kvm.h tools/include/uapi/linux/kvm.h $ tools/perf/trace/beauty/kvm_ioctl.sh > after $ diff -u before after --- before 2021-02-23 09:55:46.229058308 -0300 +++ after 2021-02-23 09:55:57.509308058 -0300 @@ -91,6 +91,10 @@ [0xc1] = "GET_SUPPORTED_HV_CPUID", [0xc6] = "X86_SET_MSR_FILTER", [0xc7] = "RESET_DIRTY_RINGS", + [0xc8] = "XEN_HVM_GET_ATTR", + [0xc9] = "XEN_HVM_SET_ATTR", + [0xca] = "XEN_VCPU_GET_ATTR", + [0xcb] = "XEN_VCPU_SET_ATTR", [0xe0] = "CREATE_DEVICE", [0xe1] = "SET_DEVICE_ATTR", [0xe2] = "GET_DEVICE_ATTR", $ Addressing this 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: David Woodhouse Cc: Paul Mackerras Cc: Ravi Bangoria Signed-off-by: Arnaldo Carvalho de Melo commit 20e32b9cb0c61c9264efcb16d8e3a80d3738ff2b Author: Arnaldo Carvalho de Melo Date: Tue Feb 23 09:51:17 2021 -0300 tools headers UAPI s390: Sync ptrace.h kernel headers To pick up the changes from: 56e62a7370283601 ("s390: convert to generic entry") That only adds two new defines, so shouldn't cause problems when building the BPF selftests. Silencing this perf build warning: Warning: Kernel ABI header at 'tools/arch/s390/include/uapi/asm/ptrace.h' differs from latest version at 'arch/s390/include/uapi/asm/ptrace.h' diff -u tools/arch/s390/include/uapi/asm/ptrace.h arch/s390/include/uapi/asm/ptrace.h Cc: Hendrik Brueckner Cc: Sven Schnelle Cc: Vasily Gorbik Signed-off-by: Arnaldo Carvalho de Melo commit 867a9148298b42dee341b780ddfd706415a1253e Author: Arnaldo Carvalho de Melo Date: Tue Feb 23 09:48:05 2021 -0300 perf arch powerpc: Sync powerpc syscall.tbl with the kernel sources To get the changes in: fbcee2ebe8edbb6a ("powerpc/32: Always save non volatile GPRs at syscall entry") That shouldn't cause any change in tooling, just silences the following tools/perf/ build warning: Warning: Kernel ABI header at 'tools/perf/arch/powerpc/entry/syscalls/syscall.tbl' differs from latest version at 'arch/powerpc/kernel/syscalls/syscall.tbl' Cc: Christophe Leroy Cc: Michael Ellerman Signed-off-by: Arnaldo Carvalho de Melo commit ed72adf64979ee2b5aa9f1c74fb45b2bf592ad2a Author: Arnaldo Carvalho de Melo Date: Tue Feb 23 09:44:37 2021 -0300 tools headers UAPI: Sync openat2.h with the kernel sources To pick the changes in: 99668f618062816c ("fs: expose LOOKUP_CACHED through openat2() RESOLVE_CACHED") That don't result in any change in tooling, only silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/openat2.h' differs from latest version at 'include/uapi/linux/openat2.h' diff -u tools/include/uapi/linux/openat2.h include/uapi/linux/openat2.h Cc: Al Viro Cc: Jens Axboe Signed-off-by: Arnaldo Carvalho de Melo commit 4a8176fd62aa7fa86599efcbd3631af272b109d8 Author: Arnaldo Carvalho de Melo Date: Tue Feb 23 09:21:00 2021 -0300 tools headers UAPI: Sync drm/i915_drm.h with the kernel sources To pick the changes in: 8c3b1ba0e7ea9a80 ("drm/i915/gt: Track the overall awake/busy time") 348fb0cb0a79bce0 ("drm/i915/pmu: Deprecate I915_PMU_LAST and optimize state tracking") That don't result in any change in tooling: $ tools/perf/trace/beauty/drm_ioctl.sh > before $ cp include/uapi/drm/i915_drm.h tools/include/uapi/drm/i915_drm.h $ tools/perf/trace/beauty/drm_ioctl.sh > after $ diff -u before after $ Only silences this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/drm/i915_drm.h' differs from latest version at 'include/uapi/drm/i915_drm.h' diff -u tools/include/uapi/drm/i915_drm.h include/uapi/drm/i915_drm.h Cc: Chris Wilson Cc: Tvrtko Ursulin Signed-off-by: Arnaldo Carvalho de Melo commit 1f043a687e47b9b3c0469ad8d2021708981536af Author: Arnaldo Carvalho de Melo Date: Tue Feb 23 09:16:45 2021 -0300 tools headers UAPI: Update tools's copy of drm.h headers Picking the changes from: 0e0dc448005583a6 ("drm/doc: demote old doc-comments in drm.h") Silencing these perf build warnings: Warning: Kernel ABI header at 'tools/include/uapi/drm/drm.h' differs from latest version at 'include/uapi/drm/drm.h' diff -u tools/include/uapi/drm/drm.h include/uapi/drm/drm.h No changes in tooling as these are just C comment documentation changes. Cc: Simon Ser Signed-off-by: Arnaldo Carvalho de Melo commit d71cbff1cdae2d8ddd2a7279db67a1412f41d89d Author: Daniel Vetter Date: Thu Jan 21 16:29:50 2021 +0100 drm/vkms: Annotate vblank timer This is needed to signal the fences from page flips, annotate it accordingly. We need to annotate entire timer callback since if we get stuck anywhere in there, then the timer stops, and hence fences stop. Just annotating the top part that does the vblank handling isn't enough. Tested-by: Melissa Wen Reviewed-by: Rodrigo Siqueira 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 Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210121152959.1725404-3-daniel.vetter@ffwll.ch commit 53fc08c23a323884d11b178d12ce55043690eb0f Author: Daniel Vetter Date: Thu Jan 21 16:29:52 2021 +0100 drm/komeda: Annotate dma-fence critical section in commit path Like the helpers, nothing special. Well except not, because we the critical section extends until after hw_done(), since that's the last thing which could hold up a subsequent atomic commit. That means the wait_for_flip_done is included, but that's not a problem, we're allowed to call dma_fence_wait() from signalling critical sections. Even on our own fence (which this does), it's just a bit confusing. But in a way those last 2 function calls are already part of the fence signalling critical section for the next atomic commit. Reading this I'm wondering why komeda waits for flip_done() before calling hw_done(), which is a bit backwards (but hey hw can be special). Might be good to throw a comment in there that explains why, because the original commit that added this just doesn't. v2: Small rebase Reviewed-by: James Qian Wang (v1) Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210121152959.1725404-5-daniel.vetter@ffwll.ch commit 9e5eb5e1b60a547067c2b305461c71d1c2f2bffa Author: Daniel Vetter Date: Thu Jan 21 16:29:53 2021 +0100 drm/malidp: Annotate dma-fence critical section in commit path Again needs to be put right after the call to drm_atomic_helper_commit_hw_done(), since that's the last thing which can hold up a subsequent atomic commit. No surprises here. Acked-by: Liviu Dudau Signed-off-by: Daniel Vetter Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Link: https://patchwork.freedesktop.org/patch/msgid/20210121152959.1725404-6-daniel.vetter@ffwll.ch commit eec44d44a3d2d00c8f663f13555d3dd280b1ea3f Author: Daniel Vetter Date: Thu Jan 21 16:29:54 2021 +0100 drm/atmel: Use drm_atomic_helper_commit One of these drivers that predates the nonblocking support in helpers, and hand-rolled its own thing. Entirely not anything specific here, we can just delete it all and replace it with the helper version. Could also perhaps use the drm_mode_config_helper_suspend/resume stuff, for another few lines deleted. But I'm not looking at that stuff, I'm just going through all the atomic commit functions and make sure they have properly annotated dma-fence critical sections everywhere. v2: - Also delete the workqueue (Sam) - drop the @commit kerneldoc, I missed that one. Reviewed-by: Sam Ravnborg Signed-off-by: Daniel Vetter Cc: Sam Ravnborg Cc: Boris Brezillon Cc: Nicolas Ferre Cc: Alexandre Belloni Cc: Ludovic Desroches Cc: linux-arm-kernel@lists.infradead.org Link: https://patchwork.freedesktop.org/patch/msgid/20210121152959.1725404-7-daniel.vetter@ffwll.ch commit 250aa22920cd5d956a5d3e9c6a43d671c2bae217 Author: Daniel Vetter Date: Thu Jan 21 16:29:56 2021 +0100 drm/omapdrm: Annotate dma-fence critical section in commit path Nothing special, just put the end right after hw_done(). Note that in one path there's a wait for the flip/update to complete. But as far as I understand from comments and code that's only relevant for modesets, and skipped if there wasn't a modeset done on a given crtc. For a bit more clarity pull the hw_done() call out of the if/else, that way it's a bit clearer flow. But happy to shuffle this around as is seen fit. Reviewed-by: Tomi Valkeinen Signed-off-by: Daniel Vetter Cc: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20210121152959.1725404-9-daniel.vetter@ffwll.ch commit a1891b9136d9b77b24d40a98785b8ded11d0fec0 Author: Daniel Vetter Date: Thu Jan 21 16:29:58 2021 +0100 drm/tegra: Annotate dma-fence critical section in commit path Again ends just after drm_atomic_helper_commit_hw_done(), but with the twist that we need to make sure we're only annotate the custom version. And not the other clause which just calls drm_atomic_helper_commit_tail_rpm(), which is already annotated. Signed-off-by: Daniel Vetter Acked-by: Thierry Reding Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20210121152959.1725404-11-daniel.vetter@ffwll.ch commit 4d56a4f08391857ba93465de489707b66adad114 Author: Daniel Vetter Date: Thu Jan 21 16:29:59 2021 +0100 drm/tidss: Annotate dma-fence critical section in commit path Ends right after hw_done(), totally standard case. Acked-by: Jyri Sarha Signed-off-by: Daniel Vetter Cc: Jyri Sarha Cc: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20210121152959.1725404-12-daniel.vetter@ffwll.ch commit 820c1707177c6fe96beed7f8cc842a683afbf890 Author: Thomas Zimmermann Date: Mon Feb 22 15:17:56 2021 +0100 drm/gem: Move drm_gem_fb_prepare_fb() to GEM atomic helpers The function drm_gem_fb_prepare_fb() is a helper for atomic modesetting, but currently located next to framebuffer helpers. Move it to GEM atomic helpers, rename it slightly and adopt the drivers. Same for the rsp simple-pipe helper. Compile-tested with x86-64, aarch64 and arm. The patch is fairly large, but there are no functional changes. v3: * remove out-comented line in drm_gem_framebuffer_helper.h (Maxime) v2: * rename to drm_gem_plane_helper_prepare_fb() (Daniel) * add tutorial-style documentation Signed-off-by: Thomas Zimmermann Acked-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210222141756.7864-1-tzimmermann@suse.de commit 1e3489136968a55be364f49633636030cc53860a Author: Aric Cyr Date: Tue Feb 16 10:21:11 2021 -0500 drm/amd/display: 3.2.124 Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0abd224edc7842ae56c847d6dffb42ecc107693a Author: Anthony Koo Date: Tue Feb 16 11:48:03 2021 -0500 drm/amd/display: [FW Promotion] Release 0.0.53 Signed-off-by: Anthony Koo Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 9422f2fafef620363736d67d9d4add434684b04e Author: Aric Cyr Date: Fri Feb 12 18:30:08 2021 -0500 drm/amd/display: reduce scope for local var [Why] No reason to have uninitialized var at top of function [How] Move it to minimum scope where it's actuallty used Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 6ad98e8aeb0106f453bb154933e8355849244990 Author: Aric Cyr Date: Fri Feb 12 18:13:59 2021 -0500 drm/amd/display: Don't optimize bandwidth before disabling planes [Why] There is a window of time where we optimize bandwidth due to no streams enabled will enable PSTATE changing but HUBPs are not disabled yet. This results in underflow counter increasing in some hotplug scenarios. [How] Set the optimize-bandwidth flag for later processing once all the HUBPs are properly disabled. Signed-off-by: Aric Cyr Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 77a2b7265f20ee827e527eaa6f82b87e88388947 Author: Vladimir Stempen Date: Tue Dec 29 15:01:12 2020 -0500 drm/amd/display: Synchronize displays with different timings [why] Vendor based fan noise improvement [how] Report timing synchronizable when DP streams time frame difference is less than 0.05 percent. Adjust DP DTOs and sync displays using MASTER_UPDATE_LOCK_DB_X_Y Signed-off-by: Vladimir Stempen Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 860b0cf52a239a422b89cd652393e1f1c81e161d Author: Yongqiang Sun Date: Mon Jan 25 16:08:22 2021 -0500 drm/amd/display: move trace buffer to uncached memory. [Why & How] Move dmub trace buffer to uncached memory. Signed-off-by: Yongqiang Sun Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 349a19b2f1b01e713268c7de9944ad669ccdf369 Author: Eryk Brol Date: Tue Feb 9 17:09:52 2021 -0500 drm/amd/display: Check for DSC support instead of ASIC revision [why] This check for ASIC revision is no longer useful and causes lightup issues after a topology change in MST DSC scenario. In this case, DSC configs should be recalculated for the new topology. This check prevented that from happening on certain ASICs that do, in fact, support DSC. [how] Change the ASIC revision to instead check if DSC is supported. Signed-off-by: Eryk Brol Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e664609e43bc2d25f1a2b170a5d59e2a8541a0a2 Author: Anthony Wang Date: Wed Feb 10 09:08:26 2021 -0500 drm/amd/display: enable audio on DP seamless boot [Why] Some external displays with DP can use seamless boot, but their audio endpoints are only enabled after hotplug. On boot, these displays inherit UEFI timings without properly initializing audio. [How] Enable display audio when seamless booting with an external monitor over DP. Signed-off-by: Anthony Wang Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c6341f008a315bdfddcca93892bfe702fb7b8dbe Author: Anthony Wang Date: Tue Feb 9 14:42:35 2021 -0500 drm/amd/display: disable seamless boot for DP MST [Why] Seamless boot over DP MST is not POR, but is not explicitly disabled. [How] Add check for DP MST and return false in dc_validate_seamless_boot_timing. Signed-off-by: Anthony Wang Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit c69eb74049e79eb7d60cdc4db82e75b9709ec835 Author: Stylon Wang Date: Wed Jan 27 16:07:33 2021 +0800 drm/amd/display: Refactor debugfs entries for all connectors [Why] Debugfs entries being moved from DP/eDP only to be available on all connectors are cluttering the code. [How] Refactor the registration of these debugfs entries. Signed-off-by: Stylon Wang Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 0885fe46fe2be4b304c71c3bf87f38d94bb2fc10 Author: Eric Bernstein Date: Fri Feb 5 13:53:31 2021 -0500 drm/amd/display: Remove Assert from dcn10_get_dig_frontend [Why] In some cases, this function is called when DIG BE is not connected to DIG FE, in which case a value of zero isn't invalid and assert should not be hit. [How] Remove assert and handle ENGINE_ID_UNKNOWN result in calling function. Signed-off-by: Eric Bernstein Acked-by: Bindu Ramamurthy Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 3bef92ca4240781399cfab1e844061b80b64a96c Author: Rodrigo Siqueira Date: Fri Feb 5 14:15:11 2021 -0500 drm/amd/display: Add vupdate_no_lock interrupts for DCN2.1 When run igt@kms_vrr in a device that uses DCN2.1 architecture, we noticed multiple failures. Furthermore, when we tested a VRR demo, we noticed a system hang where the mouse pointer still works, but the entire system freezes; in this case, we don't see any dmesg warning or failure messages kernel. This happens due to a lack of vupdate_no_lock interrupt, making the userspace wait eternally to get the event back. For fixing this issue, we need to add the vupdate_no_lock interrupt in the interrupt list. Signed-off-by: Rodrigo Siqueira Acked-by: Bindu Ramamurthy Signed-off-by: Alex Deucher commit d4a9ffdf713304219d31252a6765e3bb29bf4c1a Author: Nirmoy Das Date: Mon Feb 22 17:23:44 2021 -0500 drm/amdgpu: remove unused variable from struct amdgpu_bo Fixes: 62914a99dee5a ("drm/amdgpu: Use mmu_interval_insert instead of hmm_mirror") Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 172e4ee233f322d6d38a438f9c1177c03f37b241 Author: Felix Kuehling Date: Fri Feb 12 01:37:52 2021 -0500 drm/amdkfd: Cleanup kfd_process if init_cwsr_apu fails If init_cwsr_apu fails, we currently leave the kfd_process structure in place anyway. The next kfd_open will then succeed, using the existing kfd_process structure. Fix that by cleaning up the kfd_process after a failure in init_cwsr_apu. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit 3248b6d3cbcd7f7f9e7cd03feb90cee1b563172a Author: Felix Kuehling Date: Fri Feb 12 01:36:47 2021 -0500 drm/amdkfd: Use mmu_notifier_get We use mmu_notifier_put to free the MMU notifier. That needs to be paired with mmu_notifier_get to work correctly. Othewrise the next patch would cause a kernel oops. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Signed-off-by: Alex Deucher commit 263a4febd1cce668b63dfd523220686085b4f587 Author: Anson Jacob Date: Thu Feb 18 19:42:57 2021 -0500 Revert "drm/amd/display: reuse current context instead of recreating one" This reverts commit 8866a67ab86cc0812e65c04f1ef02bcc41e24d68. Reason for revert: This breaks hotplug of HDMI on some systems, resulting in a blank screen. Caused general hangs on boot/hotplugs. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1487 Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1492 Bug: https://bugzilla.kernel.org/show_bug.cgi?id=211649 Signed-off-by: Anson Jacob Reviewed-by: Bhawanpreet Lakha Acked-by: Alex Deucher Signed-off-by: Alex Deucher commit 63e654f65d7cf588813c5b75beafe2d3114719b0 Author: Jani Nikula Date: Thu Feb 11 16:52:15 2021 +0200 drm/i915/reg: add stream splitter configuration definitions The splitter configuration is required for eDP MSO. Bspec: 50174 Cc: Nischal Varide Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/443ad1fbf908800ee4e09315cb6a7ba26c64d136.1613054234.git.jani.nikula@intel.com commit de46dbe4b755c24e11655f69abb008a9573c9cba Author: Jani Nikula Date: Thu Feb 11 16:52:14 2021 +0200 drm/i915/edp: read sink MSO configuration for eDP 1.4+ Read and debug log the eDP sink MSO configuration. Do not actually do anything with the information yet besides logging. FIXME: The pixel overlap is present in DisplayID 2.0, but we don't have parsing for that. Assume zero for now. We could also add quirks for non-zero pixel overlap before DisplayID 2.0 parsing. v3: Add placeholder for pixel overlap. v2: Rename intel_dp_mso_init -> intel_edp_mso_init Cc: Nischal Varide Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/24ef61574e5af12cd86d5b85afbfbd4ac2f9de25.1613054234.git.jani.nikula@intel.com commit f886261735fca91e3bdec0e56c86a5e71e4eea67 Author: Jani Nikula Date: Thu Feb 11 16:52:13 2021 +0200 drm/i915/edp: always add fixed mode to probed modes in ->get_modes() Unconditionally add fixed mode to probed modes even if EDID is present and has modes. Prepare for cases where the fixed mode is not present in EDID (such as eDP MSO). Cc: Nischal Varide Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/6979f123f3e4ed948333f1b181202bbced3c3e85.1613054234.git.jani.nikula@intel.com commit 8733932a72d73e2ae31e38ca995fb538aa2149e3 Author: Jani Nikula Date: Thu Feb 11 16:52:12 2021 +0200 drm/i915/edp: reject modes with dimensions other than fixed mode Be more strict about filtering modes for eDP. Cc: Nischal Varide Reviewed-by: Uma Shankar Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/feb4c3b2b9c4da56a840bdb3c0e7fd0e58ee50de.1613054234.git.jani.nikula@intel.com commit c093056b67a3dd45cf6fc2f2b7902053338891f1 Author: Jani Nikula Date: Thu Feb 11 16:52:11 2021 +0200 drm/dp: add MSO related DPCD registers Add DPCD register definitions for eDP 1.4 Multi-SST Operation. Cc: Nischal Varide Cc: dri-devel@lists.freedesktop.org Reviewed-by: Uma Shankar Acked-by: Daniel Vetter Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/ab57627f373ec4a80494bb51ea51080810d9bfb0.1613054234.git.jani.nikula@intel.com commit 1b6872fe1efc5d8d78f5a3a54830e05b557ab3e9 Author: José Roberto de Souza Date: Tue Feb 9 10:14:39 2021 -0800 drm/i915/display: Set source_support even if panel do not support PSR This will set the right value of source_support when the port encoder/port supports PSR but sink don't. This change will also be needed in future for panel replay as psr struct needs to be initialized even if disconnected or current sink don't support PSR. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210209181439.215104-4-jose.souza@intel.com commit 3816139c8a4fe5e1fb901b51e94b98822a6e4108 Author: José Roberto de Souza Date: Tue Feb 9 10:14:38 2021 -0800 drm/i915/display: Remove some redundancy around CAN_PSR() If source_support is set the platform supports PSR so no need to check it again at every CAN_PSR(). Also removing the intel_dp_is_edp() calls, if sink_support is set the sink connected is for sure a eDP panel. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210209181439.215104-3-jose.souza@intel.com commit 774ab4ff15c020f5b38b45958ee22193d06a17d7 Author: José Roberto de Souza Date: Tue Feb 9 10:14:37 2021 -0800 drm/i915/display: Only write to register in intel_psr2_program_trans_man_trk_ctl() There is no support for two pipes one transcoder for PSR and if we had that the current code should not use cpu_transcoder. Also I can't see a scenario where crtc_state->enable_psr2_sel_fetch is set and PSR is not enabled and if by a bug it happens PSR HW will just ignore any value in set in PSR2_MAN_TRK_CTL. So dropping all the rest and keeping the same behavior that we have with intel_psr2_program_plane_sel_fetch(). Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210209181439.215104-2-jose.souza@intel.com commit a22af61d438e0de3196af21d0387499d999a1698 Author: José Roberto de Souza Date: Tue Feb 9 10:14:36 2021 -0800 drm/i915/display: Rename for_each_intel_encoder.*_can_psr to for_each_intel_encoder.*_with_psr for_each_intel_encoder.*_"can_psr" sounds strange, in my opinion "with_psr" is better. Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210209181439.215104-1-jose.souza@intel.com commit b3c15f78befc6031de7d5bcb683d37018b20c425 Author: Tudor Ambarus Date: Thu Feb 18 15:09:50 2021 +0200 spi: spi-ti-qspi: Free DMA resources Release the RX channel and free the dma coherent memory when devm_spi_register_master() fails. Fixes: 5720ec0a6d26 ("spi: spi-ti-qspi: Add DMA support for QSPI mmap read") Cc: stable@vger.kernel.org Signed-off-by: Tudor Ambarus Link: https://lore.kernel.org/r/20210218130950.90155-1-tudor.ambarus@microchip.com Signed-off-by: Mark Brown commit be86c3fd26c708da4bef59162efd41ec4f4666c5 Author: Axel Lin Date: Mon Feb 15 11:48:13 2021 +0800 regulator: mt6315: Return REGULATOR_MODE_INVALID for invalid mode -EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: Axel Lin Link: https://lore.kernel.org/r/20210215034813.45510-1-axel.lin@ingics.com Signed-off-by: Mark Brown commit 2979ef760e73e2a1a34cd4da5d2c78371dfe1028 Author: Jack Yu Date: Mon Feb 22 17:00:57 2021 +0800 ASoC: rt1015: enable BCLK detection after calibration Enable BCLK detection after calibration. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20210222090057.29532-2-jack.yu@realtek.com Signed-off-by: Mark Brown commit 7fb08871c38ba9e871d20d64f3a27409baf7b754 Author: Jack Yu Date: Mon Feb 22 17:00:56 2021 +0800 ASoC: rt1015: fix i2c communication error Remove 0x100 cache re-sync to solve i2c communication error. Signed-off-by: Jack Yu Link: https://lore.kernel.org/r/20210222090057.29532-1-jack.yu@realtek.com Signed-off-by: Mark Brown commit ffe9aa48d9fc636a8b6d05538d6fb281c1954c32 Author: José Roberto de Souza Date: Tue Feb 9 12:50:36 2021 -0800 drm/i915/display: Allow PSR2 selective fetch to be enabled at run-time Right now CI is blacklisting module reload, so we need to be able to enable PSR2 selective fetch in run time to test this feature before enable it by default. Changes in IGT will also be needed. v2: - Fixed handling of I915_PSR_DEBUG_ENABLE_SEL_FETCH in intel_psr_debug_set() Cc: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210209205036.351076-1-jose.souza@intel.com commit dc739820ff90acccd013f6bb420222978a982791 Author: Tong Zhang Date: Sun Feb 21 21:33:22 2021 -0500 drm/ast: fix memory leak when unload the driver a connector is leaked upon module unload, it seems that we should do similar to sample driver as suggested in drm_drv.c. Adding drm_atomic_helper_shutdown() in ast_pci_remove to prevent leaking. [ 153.822134] WARNING: CPU: 0 PID: 173 at drivers/gpu/drm/drm_mode_config.c:504 drm_mode_config_cle0 [ 153.822698] Modules linked in: ast(-) drm_vram_helper drm_ttm_helper ttm [last unloaded: ttm] [ 153.823197] CPU: 0 PID: 173 Comm: modprobe Tainted: G W 5.11.0-03615-g55f62bc873474 [ 153.823708] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-48-gd9c812dda519-4 [ 153.824333] RIP: 0010:drm_mode_config_cleanup+0x418/0x470 [ 153.824637] Code: 0c 00 00 00 00 48 8b 84 24 a8 00 00 00 65 48 33 04 25 28 00 00 00 75 65 48 81 c0 [ 153.825668] RSP: 0018:ffff888103c9fb70 EFLAGS: 00010212 [ 153.825962] RAX: ffff888102b0d100 RBX: ffff888102b0c298 RCX: ffffffff818d8b2b [ 153.826356] RDX: dffffc0000000000 RSI: 000000007fffffff RDI: ffff888102b0c298 [ 153.826748] RBP: ffff888103c9fba0 R08: 0000000000000001 R09: ffffed1020561857 [ 153.827146] R10: ffff888102b0c2b7 R11: ffffed1020561856 R12: ffff888102b0c000 [ 153.827538] R13: ffff888102b0c2d8 R14: ffff888102b0c2d8 R15: 1ffff11020793f70 [ 153.827935] FS: 00007f24bff456a0(0000) GS:ffff88815b400000(0000) knlGS:0000000000000000 [ 153.828380] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 153.828697] CR2: 0000000001c39018 CR3: 0000000103c90000 CR4: 00000000000006f0 [ 153.829096] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 153.829486] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 153.829883] Call Trace: [ 153.830024] ? drmm_mode_config_init+0x930/0x930 [ 153.830281] ? cpumask_next+0x16/0x20 [ 153.830488] ? mnt_get_count+0x66/0x80 [ 153.830699] ? drm_mode_config_cleanup+0x470/0x470 [ 153.830972] drm_managed_release+0xed/0x1c0 [ 153.831208] drm_dev_release+0x3a/0x50 [ 153.831420] release_nodes+0x39e/0x410 [ 153.831631] ? devres_release+0x40/0x40 [ 153.831852] device_release_driver_internal+0x158/0x270 [ 153.832143] driver_detach+0x76/0xe0 [ 153.832344] bus_remove_driver+0x7e/0x100 [ 153.832568] pci_unregister_driver+0x28/0xf0 [ 153.832821] __x64_sys_delete_module+0x268/0x300 [ 153.833086] ? __ia32_sys_delete_module+0x300/0x300 [ 153.833357] ? call_rcu+0x372/0x4f0 [ 153.833553] ? fpregs_assert_state_consistent+0x4d/0x60 [ 153.833840] ? exit_to_user_mode_prepare+0x2f/0x130 [ 153.834118] do_syscall_64+0x33/0x40 [ 153.834317] entry_SYSCALL_64_after_hwframe+0x44/0xae [ 153.834597] RIP: 0033:0x7f24bfec7cf7 [ 153.834797] Code: 48 89 57 30 48 8b 04 24 48 89 47 38 e9 1d a0 02 00 48 89 f8 48 89 f7 48 89 d6 41 [ 153.835812] RSP: 002b:00007fff72e6cb58 EFLAGS: 00000202 ORIG_RAX: 00000000000000b0 [ 153.836234] RAX: ffffffffffffffda RBX: 00007f24bff45690 RCX: 00007f24bfec7cf7 [ 153.836623] RDX: 00000000ffffffff RSI: 0000000000000080 RDI: 0000000001c2fb10 [ 153.837018] RBP: 0000000001c2fac0 R08: 2f2f2f2f2f2f2f2f R09: 0000000001c2fac0 [ 153.837408] R10: fefefefefefefeff R11: 0000000000000202 R12: 0000000001c2fac0 [ 153.837798] R13: 0000000001c2f9d0 R14: 0000000000000000 R15: 0000000000000001 [ 153.838194] ---[ end trace b92031513bbe596c ]--- [ 153.838441] [drm:drm_mode_config_cleanup] *ERROR* connector VGA-1 leaked! Signed-off-by: Tong Zhang Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210222023322.984885-1-ztong0001@gmail.com commit a6c0fd3d5a8bac08b0d79301be23f961e9038d60 Author: Kai-Heng Feng Date: Fri Jan 29 16:43:27 2021 +0800 efifb: Ensure graphics device for efifb stays at PCI D0 We are seeing root ports on some desktop boards support D3cold for discrete graphics card. So when efifb is in use while graphics device isn't bound to a driver, PCI and ACPI will put the graphics to D3cold when runtime suspend kicks in, makes efifb stop working. So ensure the graphics device won't be runtime suspended, to keep efifb work all the time. Signed-off-by: Kai-Heng Feng Reviewed-by: Alex Deucher Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210129084327.986630-1-kai.heng.feng@canonical.com commit 14ebaeeff8d0f2d5d59b6df6b59f54345839f9d9 Author: Shuah Khan Date: Wed Feb 17 14:18:01 2021 -0700 Revert "ath9k: fix ath_tx_process_buffer() potential null ptr dereference" This reverts commit a56c14bb21b296fb6d395164ab62ef2e419e5069. ath_tx_process_buffer() doesn't dereference or check sta and passes it to ath_tx_complete_aggr() and ath_tx_complete_buf(). ath_tx_complete_aggr() checks the pointer before use. No problem here. ath_tx_complete_buf() doesn't check or dereference sta and passes it on to ath_tx_complete(). ath_tx_complete() doesn't check or dereference sta, but assigns it to tx_info->status.status_driver_data[0] ath_tx_complete_buf() is called from ath_tx_complete_aggr() passing null ieee80211_sta pointer. There is a potential for dereference later on, if and when the tx_info->status.status_driver_data[0]is referenced. In addition, the rcu read lock might be released before referencing the contents. ath_tx_complete_buf() should be fixed to check sta perhaps? Worth looking into. Reverting this patch because it doesn't solve the problem and introduces memory leak by skipping buffer completion if the pointer (sta) is NULL. Fixes: a56c14bb21b2 ("ath9k: fix ath_tx_process_buffer() potential null ptr dereference") Signed-off-by: Shuah Khan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210217211801.22540-1-skhan@linuxfoundation.org commit 6b7abacb9cbe45894a385ea1766fd4febbd6e0df Author: Kalle Valo Date: Wed Feb 17 21:16:40 2021 +0200 ath11k: print hardware name and version during initialisation This way it's easy for the user to find what device is actually installed. This also helps reporting bugs. Screenshot: [ 459.988812] ath11k_pci 0000:06:00.0: BAR 0: assigned [mem 0xdb000000-0xdbffffff 64bit] [ 459.988867] ath11k_pci 0000:06:00.0: enabling device (0000 -> 0002) [ 459.997048] ath11k_pci 0000:06:00.0: qca6390 hw2.0 [ 460.058093] mhi mhi0: Requested to power ON [ 460.059741] mhi mhi0: Power on setup success [ 460.476924] ath11k_pci 0000:06:00.0: chip_id 0x0 chip_family 0xb board_id 0xff soc_id 0xffffffff [ 460.477032] ath11k_pci 0000:06:00.0: fw_version 0x101c06cc fw_build_timestamp 2020-06-24 19:50 fw_build_id Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1613589400-18891-1-git-send-email-kvalo@codeaurora.org commit c00697b59251f795fa5278cfe4d81407f76a450b Author: Tian Tao Date: Fri Feb 19 10:30:11 2021 +0800 drm/drv: Remove initialization of static variables Address the following checkpatch errors: ERROR: do not initialise statics to false Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/1613701811-32037-1-git-send-email-tiantao6@hisilicon.com commit b60e320bf35971e67b6afabd5614c6196b3be95d Author: Lee Shawn C Date: Thu Feb 18 13:23:33 2021 +0800 drm/i915/vbt: update DP max link rate table According to Bspec #20124, max link rate table for DP was updated at BDB version 230. Max link rate can support upto UHBR. After migrate to BDB v230, the definition for LBR, HBR2 and HBR3 were changed. For backward compatibility. If BDB version was from 216 to 229. Driver have to follow original rule to configure DP max link rate value from VBT. v2: split the mapping table to two for old and new BDB definition. v3: return link rate instead of assigning it. v4: remove the useless variable. Cc: Ville Syrjala Cc: Imre Deak Cc: Jani Nikula Cc: Cooper Chiou Cc: William Tseng Signed-off-by: Lee Shawn C [vsyrjala: Try to retain the comment that VBT version 216 added some of this] Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210218052333.16109-1-shawn.c.lee@intel.com commit 0345bae1776b24e2b591f50b1bfe63001fd40efb Author: Gerd Hoffmann Date: Wed Feb 17 13:32:13 2021 +0100 drm/qxl: add lock asserts to qxl_bo_vmap_locked + qxl_bo_vunmap_locked Try avoid re-introducing locking bugs. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-12-kraxel@redhat.com commit b4b27f08f9f96d98040b37905bd9caf6b48b1430 Author: Gerd Hoffmann Date: Wed Feb 17 13:32:12 2021 +0100 drm/qxl: rework cursor plane Add helper functions to create and move the cursor. Create the cursor_bo in prepare_fb callback, in the atomic_commit callback we only send the update command to the host. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-11-kraxel@redhat.com commit ab422b01e06e4fb4e5036b6eca3bc36903838295 Author: Gerd Hoffmann Date: Wed Feb 17 13:32:11 2021 +0100 drm/qxl: move shadow handling to new qxl_prepare_shadow() Pure code motion, no functional change. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-10-kraxel@redhat.com commit cb981987b401ff18e4bd6fc08a91e187ac043da0 Author: Gerd Hoffmann Date: Wed Feb 17 13:32:10 2021 +0100 drm/qxl: fix monitors object vmap Use the correct vmap variant. We don't hold a reservation here, so we can't use the _locked variant. We can drop the pin because qxl_bo_vmap will do that for us. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-9-kraxel@redhat.com commit 61cc6d9513a93fba795bfd3d95e1dce125467e4f Author: Gerd Hoffmann Date: Wed Feb 17 13:32:09 2021 +0100 drm/qxl: fix prime vmap Use the correct vmap variant. We don't have a reservation here, so we can't use the _locked version. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-8-kraxel@redhat.com commit dce39226180afca473057084acab63bba99fcc4e Author: Gerd Hoffmann Date: Wed Feb 17 13:32:08 2021 +0100 drm/qxl: add qxl_bo_vmap/qxl_bo_vunmap Add vmap/vunmap variants which reserve (and pin) the bo. They can be used in case the caller doesn't hold a reservation for the bo. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-7-kraxel@redhat.com commit f7ed28e13f82710b4b17049bf5d6cf9e818eb23c Author: Gerd Hoffmann Date: Wed Feb 17 13:32:07 2021 +0100 drm/qxl: rename qxl_bo_kmap -> qxl_bo_vmap_locked Append _locked to Make clear that these functions should be called with reserved bo's only. While being at it also rename kmap -> vmap. No functional change. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-6-kraxel@redhat.com commit 19089b760e56c97458c272e90e43da761b05cf12 Author: Gerd Hoffmann Date: Wed Feb 17 13:32:06 2021 +0100 drm/qxl: fix lockdep issue in qxl_alloc_release_reserved Call qxl_bo_unpin (which does a reservation) without holding the release_mutex lock. Fixes lockdep (correctly) warning on a possible deadlock. Fixes: 65ffea3c6e73 ("drm/qxl: unpin release objects") Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-5-kraxel@redhat.com commit 4fff19ae427548d8c37260c975a4b20d3c040ec6 Author: Gerd Hoffmann Date: Wed Feb 17 13:32:05 2021 +0100 drm/qxl: use ttm bo priorities Allow to set priorities for buffer objects. Use priority 1 for surface and cursor command releases. Use priority 0 for drawing command releases. That way the short-living drawing commands are first in line when it comes to eviction, making it *much* less likely that ttm_bo_mem_force_space() picks something which can't be evicted and throws an error after waiting a while without success. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-4-kraxel@redhat.com commit 42c4551aca94c987ea70b31f496d602de8dad283 Author: Gerd Hoffmann Date: Wed Feb 17 13:32:04 2021 +0100 drm/qxl: more fence wait rework Move qxl_io_notify_oom() call into wait condition. That way the driver will call it again if one call wasn't enough. Also allows to remove the extra dma_fence_is_signaled() check and the goto. Fixes: 5a838e5d5825 ("drm/qxl: simplify qxl_fence_wait") Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-3-kraxel@redhat.com commit 26fe1f4c550dae06ae4af3299bbef6b9d78c4ba0 Author: Gerd Hoffmann Date: Wed Feb 17 13:32:03 2021 +0100 drm/qxl: properly handle device init failures Specifically do not try release resources which where not allocated in the first place. Cc: Tong Zhang Tested-by: Tong Zhang Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210217123213.2199186-2-kraxel@redhat.com commit 0e86d3d4fc52334942033d4c507a366ce201e398 Author: Yang Li Date: Thu Feb 18 15:34:04 2021 +0800 drm/amd/display: Simplify bool conversion Fix the following coccicheck warning: ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:8142:16-21: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Signed-off-by: Yang Li Signed-off-by: Alex Deucher commit ca1203d7d7295c49e5707d7def457bdc524a8edb Author: Huang Rui Date: Wed Feb 10 12:27:43 2021 +0800 drm/amd/pm: do not issue message while write "r" into pp_od_clk_voltage We should commit the value after restore them back to default as well. $ echo "r" > pp_od_clk_voltage $ echo "c" > pp_od_clk_voltage Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher commit 0b7421f0a6a41a8ce60c4dadf6f9e7c62fbd2f1f Author: Aurabindo Pillai Date: Thu Feb 4 08:21:35 2021 -0500 drm/amd/display: Old sequence for HUBP blank New proposed sequence for HUBP blanking causes regressions where the hardware would fail to enter blank which triggers an assert in the new sequence. This change brings back the old sequence. Fixes: 985faf2c4ecb60 ("drm/amd/display: New sequence for HUBP blank") Signed-off-by: Aurabindo Pillai Signed-off-by: Bhawanpreet Lakha Reviewed-by: Rodrigo Siqueira Signed-off-by: Alex Deucher commit ea1b8c9b837c18e2322d1b91ac3c1af8a4f7a455 Author: Nirmoy Das Date: Tue Feb 16 15:33:42 2021 +0100 drm/amdgpu: mark local function as static Mark amdgpu_ras_debugfs_create_ctrl_node() as static. Fixes: eb14235668777b ("drm/amdgpu: do not keep debugfs dentry") Reported-by: kernel test robot Reviewed-by: Alex Deucher Signed-off-by: Nirmoy Das Signed-off-by: Alex Deucher commit 97628eb5ac2069a08105699f23b5e07ef1937658 Author: Aric Cyr Date: Mon Feb 8 09:04:29 2021 -0500 drm/amd/display: 3.2.123 DC version 3.2.123 brings improvements in multiple areas. In summary, we highlight: - Firmware release 0.0.52 - Bug fixes on MPC OGAM sequence, display experience, etc. - Improvements on timing, transmitter control, etc. Signed-off-by: Aric Cyr Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e5e258180e436e0da21fd0e6d30abe8999b7204a Author: Anthony Koo Date: Fri Feb 5 21:04:44 2021 -0500 drm/amd/display: [FW Promotion] Release 0.0.52 [How] Add new aux cmd fields for acquire and release Signed-off-by: Anthony Koo Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit dc75f476a61f7452cbe7fef1bcc1e743b99dc9eb Author: Eric Bernstein Date: Wed Jan 27 18:04:14 2021 -0500 drm/amd/display: Implement transmitter control v1.7 [Why] Moving definition of transmitter control from atomfirmware to internal header. [How] Update the command table code to call 1.7 and make it the default fallback path. Signed-off-by: Eric Bernstein Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 399d9bd66e2c14ee1051b55b27ffd5914d663c7b Author: Chris Park Date: Wed Feb 3 12:12:35 2021 -0500 drm/amd/display: AVMUTE simplification [Why] Simplify AVMUTE logic in coding [How] Avoid multiple calls on TMDS AVMUTE as updated logic now demands it. Signed-off-by: Chris Park Reviewed-by: Charlene Liu Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit bbaef585913b4b9ba63b0f9d694c4529e9c89438 Author: Sung Lee Date: Thu Feb 4 08:21:15 2021 -0500 drm/amd/display: Copy over soc values before bounding box creation [Why] With certain fclock overclocks, state 1 may be chosen as the closest clock level. This may result in this state being empty if not populated beforehand, resulting in black screens and screen corruption. [How] Copy over all soc states to clock_limits before bounding box creation to avoid any cases with empty states. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Reviewed-by: Yongqiang Sun Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit f9b4f20c4777bd305ef04f9485294692bc65968c Author: Stylon Wang Date: Fri Dec 4 12:08:31 2020 +0800 drm/amd/display: Add Freesync HDMI support to DM [Why] Add necessary support for Freesync HDMI in Linux DM [How] - Support Freesync HDMI by calling DC interace - Report Freesync capability to vrr_range debugfs from DRM - Depends on coming DMCU/DMUB firmware to enable feature Signed-off-by: Stylon Wang Reviewed-by: Nicholas Kazlauskas Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 00e9d4c0ab1470853eb26d6a41ecb94194063287 Author: Sung Lee Date: Wed Feb 3 17:08:39 2021 -0500 drm/amd/display: Populate dcn2.1 bounding box before state duplication [Why] If system is overclocked, only 1 bounding box state will be sent by SMU. This results in an empty state being copied for DML calculations causing black screens and corruption. [How] Fully populate bounding box before duplicating last state. Signed-off-by: Sung Lee Reviewed-by: Tony Cheng Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 737b2b536a30a467c405d75f2287e17828838a13 Author: Nicholas Kazlauskas Date: Wed Feb 3 10:11:30 2021 -0500 drm/amd/display: Fix MPC OGAM power on/off sequence [Why] Color corruption can occur on bootup into a login manager that applies a non-linear gamma LUT because the LUT may not actually be powered on before writing. It's cleared on the next full pipe reprogramming as we switch to LUTB from LUTA and the pipe accessing the LUT has taken it out of light sleep mode. [How] The MPCC_OGAM_MEM_PWR_FORCE register does not force the current power mode when set to 0. It only forces when set light sleep, deep sleep or shutdown. The register to actually force power on and ignore sleep modes is MPCC_OGAM_MEM_PWR_DIS - a value of 0 will enable power requests and a value of 1 will disable them. When PWR_FORCE!=0 is combined with PWR_DIS=0 then MPCC OGAM memory is forced into the state specified by the force bits. If PWR_FORCE is 0 then it respects the mode specified by MPCC_OGAM_MEM_LOW_PWR_MODE if the RAM LUT is not in use. We set that bit to shutdown on low power, but otherwise it inherits from bootup defaults. So for the fix: 1. Update the sequence to "force" power on when needed We can use MPCC_OGAM_MEM_PWR_DIS for this to turn on the memory even when the block is in bypass and pending to be enabled for the next frame. We need this for both low power enabled or disabled. If we don't set this then we can run into issues when we first program the LUT from bootup. 2. Don't apply FORCE_SEL Once we enable power requests with DIS=0 we run into the issue of the RAM being forced into light sleep and being unusable for display output. Leave this 0 like we used to for DCN20. 3. Rely on MPCC OGAM init to determine light sleep/deep sleep MPC low power debug mode isn't enabled on any ASIC currently but we'll respect the setting determined during init if it is. Lightly tested as working with IGT tests and desktop color adjustment. 4. Change the MPC resource default for DCN30 It was interleaving the dcn20 and dcn30 versions before depending on the sequence. 5. REG_WAIT for it to be on whenever we're powering up the memory Otherwise we can write register values too early and we'll get corruption. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Eric Yang Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit ecdfc5c92f921f2983f73368920ac0d4b0ee425b Author: Nicholas Kazlauskas Date: Thu Jan 14 10:58:42 2021 -0500 drm/amd/display: Add dc_dmub_srv helpers for in/out DMCUB commands [Why] We added these in DMCUB for runtime feature detection but we didn't have helpers to call these with DC error handling/logging. [How] Add helpers. Signed-off-by: Nicholas Kazlauskas Reviewed-by: Eric Yang Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit efe213e5a57e0cd92fa4f328dc1963d330549982 Author: Martin Leung Date: Tue Feb 2 16:28:05 2021 -0500 drm/amd/display: changing sr exit latency [Why] Hardware team remeasured, need to update timings to increase latency slightly and avoid intermittent underflows. [How] sr exit latency update. Signed-off-by: Martin Leung Reviewed-by: Alvin Lee Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit e7a30ade740f576315dba5f9801836f209bbebf3 Author: Wesley Chalmers Date: Wed Jan 27 15:23:18 2021 -0500 Revert "drm/amd/display: Unblank hubp based on plane visibility" This reverts commit fd1c85d3ac2ccfec33b007399e6677b41899a888 [Why] We are not implementing the planned new HW sequence to disable HUBP. [How] Revert most related changes to minimize possibility of regression. Signed-off-by: Wesley Chalmers Reviewed-by: Martin Leung Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 292496767ad7e1aca4ed3ee103c21a656d77d139 Author: Wesley Chalmers Date: Wed Jan 27 15:22:55 2021 -0500 Revert "drm/amd/display: New path for enabling DPG" This reverts commit f8e792dc5c45d306a542b9ee991ae80e1c78e4c5 [Why] We are not implementing the planned new HW sequence for HUBP disable. [How] Revert most related changes to minimize regressions. Signed-off-by: Wesley Chalmers Reviewed-by: Martin Leung Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 99929cf0576adc7cf9e999ab14e0246225853217 Author: Lewis Huang Date: Mon Feb 1 11:26:03 2021 +0800 drm/amd/display: remove global optimize seamless boot stream count [Why] In following sequence driver will add counter twice on same edp stream. 1. Boot into OS. 2. Set timing with edp only. 3. Set timing with edp and external monitor. 4. Set visibility on for edp. Step 2 and 3 will add seamless boot counter twice and subtract it once in step 4. [How] Remove global counter and calculate it is used. Signed-off-by: Lewis Huang Reviewed-by: Martin Leung Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 51a192438bb4cbfa58127e5076b3849e29ec1c4d Author: Po-Ting Chen Date: Thu Jan 28 15:26:56 2021 +0800 drm/amd/display: Change ABM sample rate [Why] To get the pixel statistics on every frame, change ABM sample rate from 2 to 1. [How] Change LS, HS and BL sample rate to 1. Signed-off-by: Po-Ting Chen Reviewed-by: Anthony Koo Acked-by: Qingqing Zhuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher commit 5b54d6797994fe93432970145c93b9747a3c8d6c Author: Nirmoy Das Date: Wed Feb 17 18:34:30 2021 -0500 drm/radeon: do not use drm middle layer for debugfs (v2) Use debugfs API directly instead of drm middle layer. v2: squash in build fix (Alex) Signed-off-by: Nirmoy Das Acked-by: Christian König Signed-off-by: Alex Deucher commit e7fa81bbc33e6e5bc9f94ca16add07db85fe08f4 Author: Nirmoy Das Date: Mon Feb 15 16:12:44 2021 +0100 drm/radeon: add rdev in ring struct Retrieving radeon device struct from ring struct will be used in next patch where debugfs's show function can only pass one private data pointer. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 475f9aaaaa78082433aed463c5a695d7391151ac Author: Chen Lin Date: Mon Feb 15 18:21:29 2021 +0800 drm/radeon: Remove unused function pointer typedef radeon_packet3_check_t Remove the 'radeon_packet3_check_t' typedef as it is not used. Reviewed-by: Christian König Signed-off-by: Chen Lin Signed-off-by: Alex Deucher commit 434fb1e7444a2efc3a4ebd950c7f771ebfcffa31 Author: Gustavo A. R. Silva Date: Wed Feb 10 17:49:27 2021 -0600 drm/radeon/nislands_smc.h: Replace one-element array with flexible-array member in struct NISLANDS_SMC_SWSTATE 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]. Use flexible-array member in struct NISLANDS_SMC_SWSTATE, instead of one-element array. Also, this helps with the ongoing efforts to enable -Warray-bounds by fixing the following warnings: drivers/gpu/drm/radeon/ni_dpm.c: In function ‘ni_convert_power_state_to_smc’: drivers/gpu/drm/radeon/ni_dpm.c:2521:20: warning: array subscript 1 is above array bounds of ‘NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2521 | smc_state->levels[i].dpm2.MaxPS = | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/ni_dpm.c:2523:20: warning: array subscript 1 is above array bounds of ‘NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2523 | smc_state->levels[i].dpm2.NearTDPDec = NISLANDS_DPM2_NEAR_TDP_DEC; | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/ni_dpm.c:2524:20: warning: array subscript 1 is above array bounds of ‘NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2524 | smc_state->levels[i].dpm2.AboveSafeInc = NISLANDS_DPM2_ABOVE_SAFE_INC; | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/ni_dpm.c:2525:20: warning: array subscript 1 is above array bounds of ‘NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2525 | smc_state->levels[i].dpm2.BelowSafeInc = NISLANDS_DPM2_BELOW_SAFE_INC; | ~~~~~~~~~~~~~~~~~^~~ drivers/gpu/drm/radeon/ni_dpm.c:2526:35: warning: array subscript 1 is above array bounds of ‘NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2526 | smc_state->levels[i].stateFlags |= | ^~ drivers/gpu/drm/radeon/ni_dpm.c:2526:35: warning: array subscript 1 is above array bounds of ‘NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2526 | smc_state->levels[i].stateFlags |= | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ 2527 | ((i != (state->performance_level_count - 1)) && power_boost_limit) ? | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2528 | PPSMC_STATEFLAG_POWERBOOST : 0; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/radeon/ni_dpm.c:2442:20: warning: array subscript 1 is above array bounds of ‘NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] 2442 | smc_state->levels[i + 1].aT = cpu_to_be32(a_t); [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/6023ed54.BfIY+9Uz81I6nq19%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit c3af46fcfbc6f4668c99614157e6bfe865de26e4 Author: Gustavo A. R. Silva Date: Wed Feb 10 17:26:00 2021 -0600 drm/amd/pm: Replace one-element array with flexible-array in struct _ATOM_Vega10_GFXCLK_Dependency_Table 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]. Use flexible-array member in struct _ATOM_Vega10_GFXCLK_Dependency_Table, instead of one-element array. Also, this helps with the ongoing efforts to enable -Warray-bounds and fix the following warning: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c: In function ‘vega10_get_pp_table_entry_callback_func’: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega10_hwmgr.c:3113:30: warning: array subscript 4 is above array bounds of ‘ATOM_Vega10_GFXCLK_Dependency_Record[1]’ {aka ‘struct _ATOM_Vega10_GFXCLK_Dependency_Record[1]’} [-Warray-bounds] 3113 | gfxclk_dep_table->entries[4].ulClk; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~ [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/6023ff3d.WY3sSCkGRQPdPlVo%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit 0e1aa13ca3ffdd1e626532a3924ac80686939848 Author: Gustavo A. R. Silva Date: Wed Feb 10 16:40:31 2021 -0600 drm/amd/pm: Replace one-element array with flexible-array in struct SISLANDS_SMC_SWSTATE 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]. Refactor the code according to the use of a flexible-array member in struct SISLANDS_SMC_SWSTATE, instead of a one-element array, and use the struct_size() helper to calculate the size for the allocation. Also, this helps with the ongoing efforts to enable -Warray-bounds and fix the following warnings: drivers/gpu/drm/amd/amdgpu/../pm/powerplay/si_dpm.c:2448:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/si_dpm.c:2449:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/si_dpm.c:2450:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/si_dpm.c:2451:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/si_dpm.c:2452:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] drivers/gpu/drm/amd/amdgpu/../pm/powerplay/si_dpm.c:5570:20: warning: array subscript 1 is above array bounds of ‘SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’ {aka ‘struct SISLANDS_SMC_HW_PERFORMANCE_LEVEL[1]’} [-Warray-bounds] [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/79 Link: https://github.com/KSPP/linux/issues/109 Build-tested-by: kernel test robot Link: https://lore.kernel.org/lkml/6023be58.sk66L%2FV4vuSJI5mI%25lkp@intel.com/ Signed-off-by: Gustavo A. R. Silva Signed-off-by: Alex Deucher commit ce7c670dd1422a3de7e77bac81c82e7427134c50 Author: Colin Ian King Date: Wed Feb 10 12:03:30 2021 +0000 drm/amd/pm: fix spelling mistake in various messages "power_dpm_force_perfomance_level" There are spelling mistakes in error and warning messages, the text power_dpm_force_perfomance_level is missing a letter r and should be power_dpm_force_performance_level. Fix them. Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher commit 98d28ac2f511a29d608326e50e3b1061ec18e9f3 Author: Nirmoy Das Date: Mon Feb 15 15:26:45 2021 -0500 drm/amdgpu: do not use drm middle layer for debugfs Use debugfs API directly instead of drm middle layer. This also includes following debugfs file output changes: 1 amdgpu_evict_vram/amdgpu_evict_gtt output will not contain any braces. e.g. (0) --> 0 2 amdgpu_gpu_recover output will print return value of amdgpu_device_gpu_recover() instead of not so important "gpu recover" message. v2: * checkpatch.pl: use '0444' instead of S_IRUGO. * remove S_IFREG from mode. * remove mode variable. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 373720f79d56697f0f63cbda50111d6eb6dbad2f Author: Nirmoy Das Date: Sun Feb 14 21:56:55 2021 +0100 drm/amd/pm: do not use drm middle layer for debugfs Use debugfs API directly instead of drm middle layer. v2: * checkpatch.pl: use '0444' instead of S_IRUGO. * remove S_IFREG from mode. * remove mode variable. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit afd3a359c452c5ee529a6b1d660ebf1176765463 Author: Nirmoy Das Date: Sun Feb 14 21:26:45 2021 +0100 drm/amd/display: do not use drm middle layer for debugfs Use debugfs API directly instead of drm middle layer. v2: * checkpatch.pl: use '0444' instead of S_IRUGO. * remove S_IFREG from mode. * remove mode variable. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 0299bef975d6683824c5769075e7106a39d96b84 Author: Nirmoy Das Date: Thu Feb 11 15:33:30 2021 +0100 drm/amdgpu: remove CONFIG_DRM_AMDGPU_GART_DEBUGFS Removed unused CONFIG_DRM_AMDGPU_GART_DEBUGFS code. We can use umr instead of this gart debugfs. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit ba3d9406a093c00f8bb274fe38dd10475a17181f Author: Nirmoy Das Date: Wed Feb 10 16:19:20 2021 +0100 drm/radeon: cleanup debugfs Remove unnecessary debugfs dentries and also radeon_ttm_debugfs_fini() as drm_debugfs_cleanup() will recursively remove debugfs files. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 88293c03c87e4db28890dd4e4ccb3640eadb4a08 Author: Nirmoy Das Date: Wed Feb 10 14:10:12 2021 +0100 drm/amdgpu: do not keep debugfs dentry Cleanup unnecessary debugfs dentries and surrounding functions. v3: remove return value check for debugfs_create_file() v2: remove ttm_debugfs_entries array. do not init variables. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Alex Deucher commit 1835bf459df752d13f9fbae37a521a471172d3d1 Author: Ville Syrjälä Date: Wed Feb 17 18:20:50 2021 +0200 drm/i915: Wait for scanout to stop when sanitizing planes When we sanitize planes let's wait for the scanout to stop before we let the subsequent code tear down the ggtt mappings and whatnot. Cures an underrun on my ivb when I boot with VT-d enabled and the BIOS fb gets thrown out due to stolen being considered unusable with VT-d active. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210217162050.13803-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 7e07c68f06a248441b485249de4c4115cba262cc Author: Ville Syrjälä Date: Fri Feb 5 22:23:22 2021 +0200 drm/i915: Nuke INTEL_OUTPUT_FORMAT_INVALID We tend to use output_format!=RGB as a shorthand for YCbCr, but this fails if we have a disabled crtc where output_format==INVALID. We're now getting some fail from intel_color_check() when we have: hw.enable==false hw.ctm!=NULL output_format==INVALID Let's avoid that by throwing INTEL_OUTPUT_FORMAT_INVALID to the dumpster, and thus everything defaults to RGB when the crtc is disabled. This does beg the deeper question of how much of the state should we in fact be validating when hw/uapi.enable==false. And should we even be doing the uapi->hw copy when uapi.enable==false? So far I've not been able to come up with satisfactory answers for myself, so I'm putting it off for the moment. Cc: Lee Shawn C Fixes: 0aa5c3835c8a ("drm/i915: support two CSC module on gen11 and later") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2964 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205202322.27608-1-ville.syrjala@linux.intel.com Reviewed-by: José Roberto de Souza commit def26cd4bae27efdfcf95559ddf64db91d65670f Author: Dario Binacchi Date: Tue Feb 16 21:22:25 2021 +0100 drm/tilcdc: fix raster control register setting The fdd property of the tilcdc_panel_info structure must set the reqdly bit field (bit 12 to 19) of the raster control register. The previous statement set the least significant bit instead. Signed-off-by: Dario Binacchi Reviewed-by: Tomi Valkeinen Reviewed-by: Jyri Sarha Tested-by: Jyri Sarha Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20210216202225.12861-1-dariobin@libero.it commit 1b4f3a9846f9e37b71427321cf50ce2e44af330f Author: Tian Tao Date: Mon Feb 8 10:32:56 2021 +0800 drm/tilcdc: replace spin_lock_irqsave by spin_lock in hard IRQ The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao Reviewed-by: Jyri Sarha Tested-by: Jyri Sarha Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/1612751576-42512-1-git-send-email-tiantao6@hisilicon.com commit f0297cc0fd2bded129ccc1e00528d06362b6075d Author: Imre Deak Date: Tue Feb 16 14:34:48 2021 +0200 drm/dp_mst: Tune down the WARN modesetting a port with full_pbn=0 It's possible to modeset a connector/mst port that has a 0 full_pbn value: if the sink on the port deasserts its HPD and a branch device reports this via a CSN with the port's ddps=0 and pdt!=NONE the driver clears full_pbn, but the corresponding connector can be still modesetted. This happened on a DELL U2719D monitor as the branch device and an LG 27UL650-W daisy-chained to it, the LG monitor generating a long HPD pulse (doing this for some reason always when waking up from some power saving state). Tune down the WARN about this scenario to a debug message. v2: Use the correct atomic debug message level. (Lyude) References: https://gitlab.freedesktop.org/drm/intel/-/issues/1917 Cc: Lyude Paul Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210216123448.410545-1-imre.deak@intel.com commit 1b588c82f63ebef55bccac4f0ca9c2825b9a9ae4 Author: Sebastian Andrzej Siewior Date: Mon Feb 8 23:38:10 2021 +0100 video: fbdev: amba-clcd: Always use msleep() for waiting The driver uses in_atomic() to distinguish between mdelay() and msleep(). The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. I traced the usage of in_interrupt() back to its initial merge: bfe694f833643 ("[ARM] Add ARM AMBA CLCD framebuffer driver.") https://git.kernel.org/history/history/c/bfe694f833643 The driver has been removed and added back in the meantime. I've been looking for the IRQ context as described in the comment and couldn't find it. The functions calling clcdfb_sleep() also call conditionally backlight_update_status() which acquires a mutex. If it is okay to acquire a mutex then it is okay to use msleep() since both functions must be used in preemptible context. Replace clcdfb_sleep() with msleep(). Cc: Peter Collingbourne Cc: Russell King Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210208223810.388502-4-bigeasy@linutronix.de commit 51be84fc4d3a61d8ac7a9a1e5b03da7f1880c2b0 Author: Ahmed S. Darwish Date: Mon Feb 8 23:38:09 2021 +0100 video: omapfb: Remove WARN_ON(in_interrupt()). dsi_sync_vc() uses in_interrupt() to create a warning if the function is used in non-preemptible context. The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. The wait_for_completion() function (used in dsi_sync_vc_vp() and dsi_sync_vc_l4() has already a check if it is invoked from proper context. Remove WARN_ON(in_interrupt()) from the driver. Cc: linux-omap@vger.kernel.org Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210208223810.388502-3-bigeasy@linutronix.de commit 6e4863dbb5612f3166c1c8d1e261254d02a95627 Author: Ahmed S. Darwish Date: Mon Feb 8 23:38:08 2021 +0100 video: omap: Remove in_interrupt() usage. alloc_req() uses in_interrupt() to detect if it is safe to use down(). The usage of in_interrupt() in drivers is phased out and Linus clearly requested that code which changes behaviour depending on context should either be separated or the context be conveyed in an argument passed by the caller, which usually knows the context. The semaphore is used as a counting semaphore, initialized with the number of slots in the request pool minus IRQ_REQ_POOL_SIZE - which are reserved for the in_interrupt() user to ensure that a request is always available. The preemptible user will block on the semphore waiting for a request to become available in case there are no requests available. Replace in_interrupt() with a `can_sleep' argument to indicate if it is safe to block on the sempahore. Cc: linux-omap@vger.kernel.org Signed-off-by: Ahmed S. Darwish Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210208223810.388502-2-bigeasy@linutronix.de commit 788f805e8c0a10679fdfa7c6d0e21465e3b62de5 Author: Lavanya Suresh Date: Wed Feb 17 11:45:45 2021 +0200 ath11k: Enable radar detection for 160MHz secondary segment WMI_CHAN_INFO_DFS_FREQ2 needs to be set in wmi vdev start command chan info parameter, to enable radar detection for secondary segment in 160MHz. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01717-QCAHKSWPL_SILICONZ-1 Signed-off-by: Lavanya Suresh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1613480547-28810-1-git-send-email-lavaks@codeaurora.org commit 096b625fab8f9d88d9b436288a64b70080219d4b Author: Lavanya Suresh Date: Wed Feb 17 11:45:45 2021 +0200 ath11k: Fix sounding dimension config in HE cap Number of Sounding dimensions config received from firmware for bandwidth above 80MHz is cleared, and proper value is not set again. So not resetting it to accept the config from firmware. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01689-QCAHKSWPL_SILICONZ-1 Signed-off-by: Lavanya Suresh Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1613460136-7170-1-git-send-email-lavaks@codeaurora.org commit 44bd8e1cdc7c1c388b378b2a8ba434bba491afe9 Author: José Roberto de Souza Date: Fri Feb 12 10:22:00 2021 -0800 drm/i915: Remove dead code from skl_pipe_wm_get_hw_state() There is nothing else to be executed after this if block. Signed-off-by: José Roberto de Souza Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210212182201.155043-2-jose.souza@intel.com commit b2423184ac3352a52fc7562fa0e7d23435fe67b9 Author: Nathan Chancellor Date: Tue Feb 16 14:29:54 2021 -0700 drm/i915: Enable -Wuninitialized -Wunintialized was disabled in commit c5627461490e ("drm/i915: Disable -Wuninitialized") because there were two warnings that were false positives. The first was due to DECLARE_WAIT_QUEUE_HEAD_ONSTACK, which was fixed in LLVM 9.0.0. The second was in busywait_stop, which was fixed in LLVM 10.0.0 (issue 415). The kernel's minimum version for LLVM is 10.0.1 so this warning can be safely enabled, where it has already caught a couple bugs. Link: https://github.com/ClangBuiltLinux/linux/issues/220 Link: https://github.com/ClangBuiltLinux/linux/issues/415 Link: https://github.com/ClangBuiltLinux/linux/issues/499 Link: https://github.com/llvm/llvm-project/commit/2e040398f8d691cc378c1abb098824ff49f3f28f Link: https://github.com/llvm/llvm-project/commit/c667cdc850c2aa821ffeedbc08c24bc985c59edd Fixes: c5627461490e ("drm/i915: Disable -Wuninitialized") References: 2ea4a7ba9bf6 ("drm/i915/gt: Avoid uninitialized use of rpcurupei in frequency_show") References: 2034c2129bc4 ("drm/i915/display: Ensure that ret is always initialized in icl_combo_phy_verify_state") Reported-by: Arnd Bergmann Signed-off-by: Nathan Chancellor Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210216212953.24458-1-nathan@kernel.org commit 92f1d09ca4ed4a84b0a187f797b111e2c6299d56 Author: Sakari Ailus Date: Tue Feb 16 17:57:22 2021 +0200 drm: Switch to %p4cc format modifier Switch DRM drivers from drm_get_format_name() to %p4cc. This gets rid of a large number of temporary variables at the same time. Signed-off-by: Sakari Ailus Reviewed-by: Petr Mladek Reviewed-by: Andy Shevchenko Acked-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210216155723.17109-4-sakari.ailus@linux.intel.com commit e927e1e0f0dd3e353d5556503a71484008692c82 Author: Sakari Ailus Date: Tue Feb 16 17:57:21 2021 +0200 v4l: ioctl: Use %p4cc printk modifier to print FourCC codes Now that we can print FourCC codes directly using printk, make use of the feature in V4L2 core. Signed-off-by: Sakari Ailus Acked-by: Mauro Carvalho Chehab Reviewed-by: Petr Mladek Reviewed-by: Andy Shevchenko Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210216155723.17109-3-sakari.ailus@linux.intel.com commit af612e43de6d27df51a7636229be7d33fe3ab7b5 Author: Sakari Ailus Date: Tue Feb 16 17:57:20 2021 +0200 lib/vsprintf: Add support for printing V4L2 and DRM fourccs Add a printk modifier %p4cc (for pixel format) for printing V4L2 and DRM pixel formats denoted by fourccs. The fourcc encoding is the same for both so the same implementation can be used. Suggested-by: Mauro Carvalho Chehab Signed-off-by: Sakari Ailus Reviewed-by: Petr Mladek Reviewed-by: Sergey Senozhatsky Reviewed-by: Andy Shevchenko Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210216155723.17109-2-sakari.ailus@linux.intel.com commit 4d36cf070249564546f07a3fe5456e29dbbc1593 Author: Thomas Zimmermann Date: Tue Feb 9 14:46:32 2021 +0100 drm/ast: Move all of the cursor-update functionality to atomic_update We used to update the cursor image in prepare_fb. Move all this code to atomic_update (where it belongs). The generic helper for shadow-buffered planes now implement the cursor plane's prepare_fb. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-11-tzimmermann@suse.de commit 385131f3a1542987a015508e3f4e23b4163bc616 Author: Thomas Zimmermann Date: Tue Feb 9 14:46:31 2021 +0100 drm/ast: Store each HW cursor offset after pinning the rsp BO As HW cursor BOs never move, we can store the offset in VRAM in the cursor-plane's HWC state. This removes the last possible source of runtime errors from atomic_update. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-10-tzimmermann@suse.de commit 84810d6a74b7b033b8dda13f0df0c953759f5e4c Author: Thomas Zimmermann Date: Tue Feb 9 14:46:30 2021 +0100 drm/ast: Map HW cursor BOs permanently The BOs of the hardware cursor are now mapped permanently while the cursor plane is being used. This reduces the CPU overhead of the cursor plane's atomic_update function. The change also resolves a problem with the vmap call in the commit tail. The vmap implementation could acquire the DMA reservation lock on the BO, which is not allowed that late in the atomic update. Removing the vmap call from atomic_update fixes the issue. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-9-tzimmermann@suse.de commit afee7e958b9f9996c8eb9d464f604c6430edeefa Author: Thomas Zimmermann Date: Tue Feb 9 14:46:29 2021 +0100 drm/ast: Store cursor BOs in cursor plane The cursor uses two BOs in video RAM to implement double buffering. Store both in struct ast_cursor_plane. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-8-tzimmermann@suse.de commit a0ba992d1738af83b6d479721c0be3c4317b2df3 Author: Thomas Zimmermann Date: Tue Feb 9 14:46:28 2021 +0100 drm/ast: Add cursor-plane data structure Cursor state is currently located throughout struct ast_private. Having struct ast_cursor_plane as dedicated data structure for cursors helps to organize the modesetting code. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-7-tzimmermann@suse.de commit 718c22865fc0a9c821e21eacba46829516901374 Author: Thomas Zimmermann Date: Tue Feb 9 14:46:27 2021 +0100 drm/ast: Inline ast cursor-update functions into modesetting code The logic for cursor updates is now located in the cursor plane's modesetting code. A number of helper functions remain to modify the rsp registers and image. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-6-tzimmermann@suse.de commit 22b6591f7ccb36142dcc0659746649eb9b4856d9 Author: Thomas Zimmermann Date: Tue Feb 9 14:46:26 2021 +0100 drm/ast: Allocate HW cursor BOs during cursor-plane initialization The BOs are eventually released by the cursor plane's destroy callback. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-5-tzimmermann@suse.de commit 616048af6dde5c1c3abfdbd8bf1aca4805cb158f Author: Thomas Zimmermann Date: Tue Feb 9 14:46:25 2021 +0100 drm/ast: Initialize planes in helper functions This change will help with inlining cursor functions into modesetting code. The primary plane's field used to be cleared with memset(). This has been dropped as the memory is always allocated with kzalloc(). Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-4-tzimmermann@suse.de commit ee4a92d690f30f3793df942939726bec0338e65b Author: Thomas Zimmermann Date: Tue Feb 9 14:46:24 2021 +0100 drm/ast: Fix invalid usage of AST_MAX_HWC_WIDTH in cursor atomic_check Use AST_MAX_HWC_HEIGHT for setting offset_y in the cursor plane's atomic_check. The code used AST_MAX_HWC_WIDTH instead. This worked because both constants has the same value. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-3-tzimmermann@suse.de commit 4a11bd1e88af130f50a72e0f54391c1c7d268e03 Author: Thomas Zimmermann Date: Tue Feb 9 14:46:23 2021 +0100 drm/ast: Add constants for VGACRCB register bits Set the bits in VGACRCB with constants. Alo move the rsp code into a helper function. Signed-off-by: Thomas Zimmermann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-2-tzimmermann@suse.de commit 4e80946197a83a6115e308334618449b77696d6a Author: Anilkumar Kolli Date: Tue Feb 16 09:16:25 2021 +0200 ath11k: add qcn9074 pci device support QCN9074 is PCI based 11ax radio. - has 2G/5G/6G variants. - has NSS 2x2 and 4x4 variants. QCN9074 uses 45MB of HOST DDR memory, target requests host memory in segments, each segment is of 2MB size and is physcial contiguous and use static window configuration. Currently there are still two issues with QCN9074, see below. So we don't add QCN9074 PCI id yet to make sure the driver is loaded. The id will be added only after the issues are fixed. Issue 1: ath11k_pci 0000:06:00.0: qmi failed memory request, err = -110 ath11k_pci 0000:06:00.0: qmi failed to respond fw mem req:-110 Issue 2: ath11k_pci 0000:06:00.0: firmware crashed: MHI_CB_SYS_ERROR ath11k_pci 0000:06:00.0: qmi failed set mode request, mode: 0, err = -110 ath11k_pci 0000:06:00.0: qmi failed to send wlan fw mode:-110 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-12-git-send-email-akolli@codeaurora.org commit 7dc67af063e3f0237c864504bb2188ada753b804 Author: Karthikeyan Periyasamy Date: Tue Feb 16 09:16:24 2021 +0200 ath11k: add extended interrupt support for QCN9074 Update the specific hw ring mask for QCN9074. Update the timestamp information while processing DP and CE interrupts. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-11-git-send-email-akolli@codeaurora.org commit 6289ac2b7182d418ee68e5c0f3f83d383d7a72ed Author: Karthikeyan Periyasamy Date: Tue Feb 16 09:16:23 2021 +0200 ath11k: add CE interrupt support for QCN9074 Define host CE configuration for QCN9074 since the max CE count is six. Available MSI interrupt is five so cannot able to map the ce_id directly for the msi_data_idx. Added get_ce_msi_idx ops in ath11k_hif_ops to get the CE MSI idx which is used to initialize the CE ring. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-10-git-send-email-akolli@codeaurora.org commit e678fbd401b9bdca9d1bd64065abfcc87ae66b94 Author: Karthikeyan Periyasamy Date: Tue Feb 16 09:16:23 2021 +0200 ath11k: add data path support for QCN9074 hal rx descriptor is different for QCN9074 target type. since rx_msdu_end, rx_msdu_start, rx_mpdu_start elements are in different placement/alignment. In order to have generic data path, introduce platform specific hal rx descriptor access ops in ath11k_hw_ops. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-9-git-send-email-akolli@codeaurora.org commit 6fe6f68fef7f7d5f6b5b62fde78de91cdc528c58 Author: Karthikeyan Periyasamy Date: Tue Feb 16 09:16:22 2021 +0200 ath11k: add hal support for QCN9074 Define the hal ring address and ring meta descriptor mask for QCN9074. Move the platform specific address to the ath11k_hw_regs. Define tx_mesh_enable ops in ath11k_hw_ops since its accessing platform specific TCL descriptor. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-8-git-send-email-akolli@codeaurora.org commit 480a73610c95511e42fb7d0359b523f66883e51a Author: Karthikeyan Periyasamy Date: Tue Feb 16 09:16:17 2021 +0200 ath11k: add static window support for register access Three window slots can be configure. First window slot dedicate for dynamic selection and remaining two slots dedicate for static selection. To optimise the window selection, frequent registers (UMAC, CE) are configure in static window slot. so that we minimise the window selection. Other registers are configure in dynamic window slot. Get the window start address from the respective offset and access the read/write register. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-7-git-send-email-akolli@codeaurora.org commit a233811ef60081192a2b13ce23253671114308d8 Author: Anilkumar Kolli Date: Tue Feb 16 09:16:08 2021 +0200 ath11k: Add qcn9074 mhi controller config Add MHI config for QCN9074 also populate ath11k_hw_params for QCN9074. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-6-git-send-email-akolli@codeaurora.org commit 5f67d306155e6a757f0b6b2b061e3ea13f44c536 Author: Anilkumar Kolli Date: Tue Feb 16 09:16:03 2021 +0200 ath11k: Update memory segment count for qcn9074 QCN9074 FW requests three types memory segments during the boot, qmi mem seg type 1 of size 15728640 qmi mem seg type 4 of size 3735552 qmi mem seg type 3 of size 1048576 Segment type 3 is for M3 coredump memory. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-5-git-send-email-akolli@codeaurora.org commit fa5f473d764398a09f7deea3a042a1130ee50e90 Author: Anilkumar Kolli Date: Tue Feb 16 09:15:53 2021 +0200 ath11k: qmi: increase the number of fw segments QCN9074 firmware uses 20MB of HOST DDR memory, fw requests the memory in segmnets of size 1MB/512KB/256KB. Increase the number of fw memory segments to 52. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-4-git-send-email-akolli@codeaurora.org commit 16001e4b2e681b8fb5e7bc50db5522081d46347a Author: Anilkumar Kolli Date: Tue Feb 16 09:15:48 2021 +0200 ath11k: Move qmi service_ins_id to hw_params qmi service_ins_id is unique for QCA6390 and QCN9074, this is needed for adding QCN9074 support. No functional changes. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-3-git-send-email-akolli@codeaurora.org commit 7a3aed0c3c36cc08a1b123d752f141797f6ba79a Author: Anilkumar Kolli Date: Tue Feb 16 09:15:35 2021 +0200 ath11k: Refactor ath11k_msi_config Move ath11k_msi_config to array of structures to add multiple pci devices support. No functional changes. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1 Signed-off-by: Anilkumar Kolli Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1612946530-28504-2-git-send-email-akolli@codeaurora.org commit 97a24a701c13f608a57a0969fb99b029c24151b4 Author: Ville Syrjälä Date: Fri Feb 5 23:46:34 2021 +0200 drm/i915: s/dev_priv/i915/ for the remainder of DDI clock routing Convert the remaining 'dev_priv's to 'i915's in the DDI clock routing functions. Cc: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-16-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit dc1ddac65664524b15f013e6eb56365b957b23bc Author: Ville Syrjälä Date: Fri Feb 5 23:46:33 2021 +0200 drm/i915: Relocate icl_sanitize_encoder_pll_mapping() Move icl_sanitize_encoder_pll_mapping() out from the middle of the .{enable,disable}_clock() functions. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-15-ville.syrjala@linux.intel.com commit 87bd8498690b4adc916ef35dd3b4d72ec83e5fa6 Author: Ville Syrjälä Date: Fri Feb 5 23:46:32 2021 +0200 drm/i915: Use .disable_clock() for pll sanitation Instead of every new platform having yet another masive copy of the whole PLL sanitation code, let's just reuse the .disable_clock() hook for this purpose. We do need to plug this into the ICL+ DSI code for that, but fortunately it already has a suitable function we can use. We do lose the debug message though on account of not bothering to check if the clock is actually enabled or not before turning it off. We could introduce yet another vfunc to query the current state, but not sure it's worth the hassle? Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-14-ville.syrjala@linux.intel.com commit 40b316d4b0865358a846ca3c9df9d443b10d3c4d Author: Ville Syrjälä Date: Fri Feb 5 23:46:31 2021 +0200 drm/i915: Split adl-s/rkl from icl_ddi_combo_{enable,disable}_clock() Since .{enable,disable}_clock() are already vfuncs it's a bit silly to have if-ladders inside them. Just provide specialized version for adl-s and rkl so we don't need any of that. v2: s/dev_priv/i915/ (Lucas) Fix typos in platform names (Lucas) Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-13-ville.syrjala@linux.intel.com commit 9c6a5c35470b576cc9d8fd1da1eee09f5014b1fd Author: Ville Syrjälä Date: Fri Feb 5 23:46:30 2021 +0200 drm/i915: Extract _cnl_ddi_{enable,disable}_clock() All the DPCLKA_CFGCR handling follows a common pattern. Let's extract that to a small helper that just takes a few parameters each caller can customize. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-12-ville.syrjala@linux.intel.com commit f67a008e02e5751296300f9e7aa1028afc4a4964 Author: Ville Syrjälä Date: Fri Feb 5 23:46:29 2021 +0200 drm/i915: Sprinkle WARN(!pll) into icl/dg1 .clock_enable() The other DDI .enable_clock() functions are trying to protect us against pll==NULL. A bit tempted to throw out all the WARNs as just unnecessary noise, but I guess they might have some use when poking around the shared_dpll code (not sure it wouldn't oops elsewhere though). So let's unify it all and sprinkle in the missing WARNs for icl/dg1. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-11-ville.syrjala@linux.intel.com commit be317ca0a338ab3976d7c74975458638d0cedf90 Author: Ville Syrjälä Date: Fri Feb 5 23:46:28 2021 +0200 drm/i915: Sprinkle a few missing locks around shared DDI clock registers The current code attempts to protect the RMWs into global clock routing registers with a mutex, but forgets to do so in a few places. Let's remedy that. Note that at the moment we serialize all modesets onto single wq, so this shouldn't actually matter. But maybe one day we wish to attempt parallel modesets again... Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-10-ville.syrjala@linux.intel.com commit 7815ed88c6cfba414a6ed5be6be2318fbe7e8b4e Author: Ville Syrjälä Date: Fri Feb 5 23:46:27 2021 +0200 drm/i915: Use intel_de_rmw() for DDI clock routing The DDI clock routing programming is riddled with shared registers, forcing us to do a lot of RMW. Switch over to intel_de_rmw() to make that a bit less obnoxious. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-9-ville.syrjala@linux.intel.com commit 36ecb0ec105412aa7e7c89991a7cff90bf90b2f1 Author: Ville Syrjälä Date: Fri Feb 5 23:46:26 2021 +0200 drm/i915: Extract icl+ .{enable,disable}_clock() vfuncs For ICL+ we have several styles of clock routing for DDIs: 1) TC DDI + TC PHY -> needs DDI_CLK_SEL==MG/TBT part form intel_ddi_clk_{select,disable}() and ICL_DPCLKA_CFGCR0_TC_CLK_OFF part form icl_{map,unmap}_plls_to_ports() 2) ICL/TGL combo DDI + combo PHY -> just need the stuff from icl_{map,unmap}_plls_to_ports() 3) JSL/EHL TC DDI + combo PHY -> needs DDI_CLK_SEL==MG part from intel_ddi_clk_{select,disable}() and the full combo style clock selection from icl_{map,unmap}_plls_to_ports() 4) ADLS/RKL -> these use both TC and combo DDIs with combo PHYs, however they always use the full combo style clock selection as per icl_{map,unmap}_plls_to_ports() and do not use DDI_CLK_SEL at all, thus get treated the same as 2) We extract all that from the current mess in the following way: 1) icl_ddi_tc_{enable,disable}_clock() 2) icl_ddi_combo_{enable,disable}_clock() 3) jsl_ddi_tc_{enable,disable}_clock() 4) for now we reuse icl_ddi_combo_{enable,disable}_clock() here v2: s/dev_priv/i915/ (Lucas) Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-8-ville.syrjala@linux.intel.com commit 35bb6b1a0d19ef619cdfe2bcf6d95c0625f9492e Author: Ville Syrjälä Date: Fri Feb 5 23:46:25 2021 +0200 drm/i915: Convert DG1 over to .{enable,disable}_clock() Replace dg1_{map,unmap}_plls_to_ports() with the appropriate encoder vfuncs. And let's relocate the disable function next to the enable function while at it. Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-7-ville.syrjala@linux.intel.com commit 2c7b1d340f194cff57373500240b3a44f20059cc Author: Ville Syrjälä Date: Fri Feb 5 23:46:24 2021 +0200 drm/i195: Extract cnl_ddi_{enable,disable}_clock() Extract the DDI clock routing for CNL into the new vfuncs. v2: s/dev_priv/i915/ (Lucas) Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-6-ville.syrjala@linux.intel.com commit 38e31f1acd643f27881e2a5a3e117e265b38d78f Author: Ville Syrjälä Date: Fri Feb 5 23:46:23 2021 +0200 drm/i915: Extract skl_ddi_{enable,disable}_clock() Extract the DDI clock routing clode for skl/derivatives into the new encoder vfuncs. v2: s/dev_priv/i915/ (Lucas) Reviewed-by: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-5-ville.syrjala@linux.intel.com commit d135368d1632b77da3804c65309392011f8de687 Author: Ville Syrjälä Date: Fri Feb 5 23:46:22 2021 +0200 drm/i915: Extract hsw_ddi_{enable,disable}_clock() Yank out the HSW/BDW code from intel_ddi_clk_{select,disable}() and put it into the new encoder .{enable,disable}_clock() vfuncs. v2: s/dev_priv/i915/ (Lucas) v3: Deal with FDI Reviewed-by: Lucas De Marchi #v2 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-4-ville.syrjala@linux.intel.com commit c133df699412ef2ab06509507a970a8e2533a716 Author: Ville Syrjälä Date: Fri Feb 5 23:46:21 2021 +0200 drm/i915: Introduce .{enable,disable}_clock() encoder vfuncs The current code dealing with the clock routing for DDI encoders is a maintenance nightmare. Let's start cleaning it up by allowing the encoder to provide vfuncs for enablign/disabling the clock. We leave them initially unimplemented, falling back to the old if-else approach. v2: Convert the FDI enable sequence Reviewed-by: Lucas De Marchi #v2 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-3-ville.syrjala@linux.intel.com commit ad9529824cafbee214dbf580228e4c390dc61a58 Author: Ville Syrjälä Date: Fri Feb 5 23:46:20 2021 +0200 drm/i915: Use intel_ddi_clk_select() for FDI We want to put all DDI clock routing code into one place. Unify the FDI enable sequence to use the standard function instead of hand rolling its own. The disable sequence already uses the normal thing. Cc: Lucas De Marchi Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210205214634.19341-2-ville.syrjala@linux.intel.com Reviewed-by: Lucas De Marchi commit 9c349dbd07523ed175b7f5ec42c4b4a1bc7ae1df Author: Colin Ian King Date: Fri Feb 12 11:36:27 2021 +0000 ath11k: debugfs: Fix spelling mistake "Opportunies" -> "Opportunities" There is a spelling mistake in some debug text, fix this. Signed-off-by: Colin Ian King Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20210212113627.212787-1-colin.king@canonical.com commit a56c14bb21b296fb6d395164ab62ef2e419e5069 Author: Shuah Khan Date: Sat Feb 13 07:58:47 2021 +0200 ath9k: fix ath_tx_process_buffer() potential null ptr dereference ath_tx_process_buffer() references ieee80211_find_sta_by_ifaddr() return pointer (sta) outside null check. Fix it by moving the code block under the null check. This problem was found while reviewing code to debug RCU warn from ath10k_wmi_tlv_parse_peer_stats_info() and a subsequent manual audit of other callers of ieee80211_find_sta_by_ifaddr() that don't hold RCU read lock. Signed-off-by: Shuah Khan Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/43ed9abb9e8d7112f3cc168c2f8c489e253635ba.1613090339.git.skhan@linuxfoundation.org commit 99e360442f223dd40fc23ae07c7a263836fd27e6 Author: Marek Vasut Date: Wed Jan 27 12:07:56 2021 +0100 drm/stm: Fix bus_flags handling The drm_display_mode_to_videomode() does not populate DISPLAY_FLAGS_DE_LOW or DISPLAY_FLAGS_PIXDATA_NEGEDGE flags in struct videomode. Therefore, no matter what polarity the next bridge or display might require, these flags are never set, and thus the LTDC GCR_DEPOL and GCR_PCPOL bits are never set and the LTDC behaves as if both DISPLAY_FLAGS_PIXDATA_POSEDGE and DISPLAY_FLAGS_DE_HIGH were always set. The fix for this problem is taken almost verbatim from MXSFB driver. In case there is a bridge attached to the LTDC, the bridge might have extra polarity requirements, so extract bus_flags from the bridge and use them for LTDC configuration. Otherwise, extract bus_flags from the connector, which is the display. Fixes: b759012c5fa7 ("drm/stm: Add STM32 LTDC driver") Signed-off-by: Marek Vasut Signed-off-by: Yannick Fertre Cc: Alexandre Torgue Cc: Antonio Borneo Cc: Benjamin Gaignard Cc: Maxime Coquelin Cc: Philippe Cornu Cc: Sam Ravnborg Cc: Vincent Abriou Cc: Yannick Fertre Cc: linux-arm-kernel@lists.infradead.org Cc: linux-stm32@st-md-mailman.stormreply.com To: dri-devel@lists.freedesktop.org Tested-by: Yannick Fertre Signed-off-by: Philippe Cornu Link: https://patchwork.freedesktop.org/patch/msgid/20210127110756.125570-1-marex@denx.de commit 0eae01bea643413758e78ca8f07be2b1ba234e36 Author: Boris Brezillon Date: Fri Feb 5 12:17:57 2021 +0100 drm/panfrost: Stay in the threaded MMU IRQ handler until we've handled all IRQs Doing a hw-irq -> threaded-irq round-trip is counter-productive, stay in the threaded irq handler as long as we can. v2: * Rework the loop to avoid a goto Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Reviewed-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20210205111757.585248-4-boris.brezillon@collabora.com commit f45da8204ff1707c529a8769f5467ff16f504b26 Author: Boris Brezillon Date: Fri Feb 5 12:17:56 2021 +0100 drm/panfrost: Don't try to map pages that are already mapped We allocate 2MB chunks at a time, so it might appear that a page fault has already been handled by a previous page fault when we reach panfrost_mmu_map_fault_addr(). Bail out in that case to avoid mapping the same area twice. Cc: Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210205111757.585248-3-boris.brezillon@collabora.com commit 3aa0a80fc692c9959c261f4c5bfe9c23ddd90562 Author: Boris Brezillon Date: Fri Feb 5 12:17:55 2021 +0100 drm/panfrost: Clear MMU irqs before handling the fault When a fault is handled it will unblock the GPU which will continue executing its shader and might fault almost immediately on a different page. If we clear interrupts after handling the fault we might miss new faults, so clear them before. Cc: Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210205111757.585248-2-boris.brezillon@collabora.com commit f3243b75dbc7f305806adaaca379338e25dba755 Author: Lucas De Marchi Date: Fri Feb 12 20:27:56 2021 -0800 drm/i915: move intel_init_audio_hooks inside display intel_init_audio_hooks() sets up hooks in the display struct and only makes sense when we have display. Move it inside intel_init_display_hooks() so it isn't called when we don't have display. Signed-off-by: Lucas De Marchi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210213042756.953007-4-lucas.demarchi@intel.com commit 141b415f9f9fd23ecd1ebebc14f7e1d3765d74d1 Author: Lucas De Marchi Date: Fri Feb 12 20:27:55 2021 -0800 drm/i915/display: move register functions to display/ Now that all display-related functions are grouped in i915_driver_register(), move them to display/ so we reduce the amount of display calls from the rest of the driver. Signed-off-by: Lucas De Marchi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210213042756.953007-3-lucas.demarchi@intel.com commit ef7eff1aae10acd81ab266e7d843e0db52279d16 Author: Lucas De Marchi Date: Fri Feb 12 20:27:54 2021 -0800 drm/i915: group display-related register calls intel_gt_driver_register() may be called earlier than intel_opregion_register() and acpi_video_register(), so move it up. intel_display_debugfs_register() may be called later, together with the other display-related initializations. There is a slight change in behavior that sysfs files will show up before the display-related debugfs files, but that shouldn't be a problem - userspace shouldn't be relying in debugfs. This allows us to group all the display-related calls under a single check for "HAS_DISPLAY()" that can be later moved to a better place. Signed-off-by: Lucas De Marchi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210213042756.953007-2-lucas.demarchi@intel.com commit ec3e00b4ee2768a457d9b6278c0dfac05473abd1 Author: Lucas De Marchi Date: Fri Feb 12 20:27:53 2021 -0800 drm/i915: stop registering if drm_dev_register() fails If drm_dev_register() fails there is no reason to continue registering the driver and initializing. Signed-off-by: Lucas De Marchi Reviewed-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20210213042756.953007-1-lucas.demarchi@intel.com commit b1de0f01b0115575982cf24c88b35106449e9aa7 Author: Sebastian Andrzej Siewior Date: Sat Feb 13 18:02:04 2021 +0100 batman-adv: Use netif_rx_any_context(). The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. The attempt to consolidate the code by passing an arguemnt or by distangling it failed due lack of knowledge about this driver and because the call chains are hard to follow. As a stop gap use netif_rx_any_context() which invokes the correct code path depending on context and confines the in_interrupt() usage to core code. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Sven Eckelmann Signed-off-by: Simon Wunderlich commit 29b6f88d60ddcaf813d1adc757d84fad4a6153c6 Author: Matt Roper Date: Fri Feb 12 13:19:25 2021 -0800 drm/i915: Try to detect sudden loss of MMIO access In rare circumstances bugs in PCI programming, broken BIOS, or failing hardware can cause the CPU to lose access to the MMIO BAR on dgfx platforms. This is a pretty catastrophic failure since all register reads come back with values of 0xFFFFFFFF. Let's check for this special case while doing our usual checks for unclaimed registers; the FPGA_DBG register we use for those checks on modern platforms has some unused bits that will always read back as 0 when things are behaving properly; we can use them as canaries to detect when MMIO itself has suddenly broken and try to print a more informative error message in the logs. v2: Let the detection function still return 'true' if we've lost our MMIO access. We'll still get an extra false positive message about an unclaimed register access, but we'll still honor the 'mmio_debug' limit and not spam the log. (Lucas) Cc: Lucas De Marchi Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210212211925.3418280-2-matthew.d.roper@intel.com Reviewed-by: Lucas De Marchi commit a321c3c6d8dda2a34d4b5d76115a9a42f67158a3 Author: Matt Roper Date: Fri Feb 12 14:20:49 2021 -0800 drm/i915: FPGA_DBG is display-specific Although the bspec's description doesn't make it very clear, the hardware architects have confirmed that the FPGA_DBG register that we use to check for unclaimed MMIO accesses is display-specific and will only properly flag unclaimed MMIO transactions for registers in the display range. If a platform doesn't have display, FPGA_DBG itself will not be available and should not be checked. Let's move the feature flag into intel_device_info.display to more accurately reflect this. Given that we now know FPGA_DBG is display-specific, it could be argued that we should only check it on out intel_de_*() functions. However let's not make that change right now; keeping the checks in all of the existing locations still helps us catch cases where regular intel_uncore_*() functions use bad MMIO offset math / base addresses and accidentally wind up landing within an unused area within the display MMIO range. It will also help catch cases where userspace-initiated MMIO (e.g., IGT's intel_reg tool) attempt to read bad offsets within the display range. v2: Add missing hunk with the update to the HAS_FPGA_DBG_UNCLAIMED macro. (CI) Cc: Lucas De Marchi Signed-off-by: Matt Roper Reviewed-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210212222049.3516344-1-matthew.d.roper@intel.com commit 70da7521e11939ebf2e3d2b4cd91d30d0d02e3c4 Author: Lyude Paul Date: Tue Feb 9 15:11:09 2021 -0500 drm/i915/gen9_bc: Add W/A for missing STRAP config on TGP PCH + CML combos Apparently the new gen9_bc platforms that Intel has introduced don't provide us with a STRAP config register to read from for initializing DDI B, C, and D detection. So, workaround this by hard-coding our strap config in intel_setup_outputs(). Changes since v4: * Split this into it's own commit Cc: Matt Roper Cc: Jani Nikula Cc: Ville Syrjala [originally from Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210209212832.1401815-5-lyude@redhat.com commit c8455098c67914c59d07f01819469e2e6f76f358 Author: Lyude Paul Date: Tue Feb 9 14:16:28 2021 -0500 drm/i915/gen9_bc: Introduce HPD pin mappings for TGP PCH + CML combos Next, let's start introducing the HPD pin mappings for Intel's new gen9_bc platform in order to make hotplugging display connectors work. Since gen9_bc is just a TGP PCH along with a CML CPU, except with the same HPD mappings as ICL, we simply add a skl_hpd_pin function that is shared between gen9 and gen9_bc which handles both the traditional gen9 HPD pin mappings and the Icelake HPD pin mappings that gen9_bc uses. Changes since v4: * Split this into its own commit * Introduce skl_hpd_pin() like vsyrjala suggested and use that instead of sticking our HPD pin mappings in TGP code Cc: Matt Roper Cc: Jani Nikula Cc: Ville Syrjala [originally from Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210209212832.1401815-4-lyude@redhat.com commit e074ffe6ef342b9a9a5a8a2c3f719d9305a3e71b Author: Umesh Nerlige Ramappa Date: Wed Feb 10 11:01:06 2021 -0800 i915/perf: Drop the check for report reason in OA After fixing the OA_TAIL_PTR corruption, there are no more reports with reason field of zero. Drop the check for report reason. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20210210190106.8586-1-umesh.nerlige.ramappa@intel.com commit 1007377002ea665ede38e18ca7122c94b05394ca Author: Christian König Date: Thu Feb 11 11:04:23 2021 +0100 drm/vram-helper: cleanup drm_gem_vram_bo_driver_move_notify Swapping bo->mem was completely unecessary. Cleanup the function which is just a leftover from a TTM cleanup. Signed-off-by: Christian König Reviewed-by: Thomas Zimmermann Tested-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210211131659.276275-1-christian.koenig@amd.com commit 357b5592e018b0faa9d49f1f8b58a4966391bcbd Author: Anshuman Gupta Date: Thu Feb 11 19:35:02 2021 +0530 drm/i915/debugfs: HDCP capability enc NULL check DP-MST connector encoder initializes at modeset Adding a connector->encoder NULL check in order to avoid any NULL pointer dereference. intel_hdcp_enable() already handle this but debugfs can also invoke the intel_{hdcp,hdcp2_capable}. Handling it gracefully. v2: - Use necessary lock and NULL check in i915_hdcp_sink_capability_show. [Imre] Reviewed-by: Imre Deak Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210211140502.22786-1-anshuman.gupta@intel.com commit 885d3e5b6f08afda80e55d2682237a2bc599a7fd Author: Lucas De Marchi Date: Wed Jun 24 17:11:16 2020 -0700 drm/i915/display: fix comment on skl straps We are not checking for specific SKUs and feedback from HW team is that it may not work since it was supposed to be fixed by the same time straps stopped to be used. So, just update comment. v2: Instead of removing the check, just update the comment since feedback from HW team was that it actually may not work Signed-off-by: Lucas De Marchi Reviewed-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20200625001120.22810-3-lucas.demarchi@intel.com commit d20630802f9fc8daf3026bc96b35c02ad17693b5 Author: Lyude Paul Date: Tue Feb 9 14:07:45 2021 -0500 drm/i915/gen9_bc: Introduce TGP PCH DDC pin mappings With the introduction of gen9_bc, where Intel combines Cometlake CPUs with a Tigerpoint PCH, we'll need to introduce new DDC pin mappings for this platform in order to make all of the display connectors work. So, let's do that. Changes since v4: * Split this into it's own patch - vsyrjala Changes since v5: * Rename gen9bc_port_to_ddc_pin() to gen9bc_tgp_port_to_ddc_pin() Cc: Matt Roper Cc: Jani Nikula Cc: Ville Syrjala [originally from Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210209212832.1401815-3-lyude@redhat.com commit 4b97039e90bf895a7a1db47411079f0cffe395f6 Author: Lyude Paul Date: Tue Feb 9 14:13:05 2021 -0500 drm/i915/gen9_bc: Recognize TGP PCH + CML combos Since Intel has introduced the gen9_bc platform, a combination of Tigerpoint PCHs and CML CPUs, let's recognize such platforms as valid and avoid WARNing on them. Changes since v4: * Split this into it's own patch - vsyrjala Cc: Matt Roper Cc: Jani Nikula Cc: Ville Syrjala [originally from Tejas's work] Signed-off-by: Tejas Upadhyay Signed-off-by: Lyude Paul Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20210209212832.1401815-2-lyude@redhat.com commit aaab24bb25e9fc4c8f3a1d9a593d3ace2c4af243 Author: Uma Shankar Date: Thu Feb 11 17:12:09 2021 +0530 drm/i915/display: Handle lane polarity for DDI port Lane Reversal is required for some of the DDI ports. This information is populated in VBT and driver should read the same and set the polarity while enabling the port. This patch handles the same. It helps fix a display blankout issue on DP ports on certain platforms. Signed-off-by: Uma Shankar Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210211114209.23866-1-uma.shankar@intel.com commit b1afb87a351ed7af76a7d110b0ec735c9a2518b9 Author: Zack Rusin Date: Mon Feb 8 15:43:49 2021 -0500 drm/vmwgfx: Remove pointless code There's no need to check for the presence of the hotplug property just to return because this is the end of the function so we're returning either way. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20210209161700.335611-2-zackr@vmware.com commit e3dc5523841f28298b5a65d9091d5a75db2b61fb Author: Zack Rusin Date: Mon Feb 8 14:48:44 2021 -0500 drm/vmwgfx: Correctly set the name of the preferred mode Our sysfs "modes" entries were broken because our preffered mode never had its name set correctly. This resulted in the first entry simply being called "preferred" followed by a list of other resolutions. Lets fix it by actually setting the name of mode (which is its resolution). This allows one to quickly validate the modes set by the open-vm-tools. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger Link: https://patchwork.freedesktop.org/patch/msgid/20210209161700.335611-1-zackr@vmware.com commit cfc51a73871a85e936ccc2a826c2ea7570f57e95 Author: Roland Scheidegger Date: Fri Feb 5 02:04:46 2021 +0100 drm/vmwgfx: add some 16:9 / 16:10 default resolutions The default list was old and in particular lacking all common 16:9 resolutions, as well as some newer 16:10 ones. This makes them selectable in resolution change lists, which can be quite useful (for instance in case auto-fit isn't enabled). Signed-off-by: Roland Scheidegger Reviewed-by: Martin Krastev Reviewed-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210205010446.26559-1-sroland@vmware.com commit b305fc7490b39de8ad8f06c760e2f5c556889e13 Author: José Roberto de Souza Date: Tue Feb 9 09:42:38 2021 -0800 drm/i915/display: Add DDR5 and LPDDR5 BW buddy page entries Set the right BW buddy page mask for new memory types. BSpec: 49218 Cc: Clint Taylor Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20210209174238.153278-1-jose.souza@intel.com commit 5dd331d4d8caa62624b7b025332ce64feea4192b Author: Julia Lawall Date: Tue Feb 9 22:13:04 2021 +0100 drm: use getter/setter functions Use getter and setter functions, for platform_device structures and a mipi_dsi_device structure. Signed-off-by: Julia Lawall Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210209211304.1261740-1-Julia.Lawall@inria.fr commit f66aaab828e726986d9d5daa2b637b2712464a15 Author: Daniel Vetter Date: Tue Feb 9 11:15:23 2021 +0100 drm/vblank: Document drm_crtc_vblank_restore constraints I got real badly confused when trying to review a fix from Ville for this. Let's try to document better what's required for this, and check the minimal settings at runtime - we can't check ofc that there's indeed no races in the driver callback. Also noticed that the drm_vblank_restore version is unused, so lets unexport that while at it. Reviewed-by: Ville Syrjälä Cc: Ville Syrjala Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210209101523.2954281-1-daniel.vetter@ffwll.ch commit c0f6f0c471a378a6da5ac99a086ba63e1a8570bb Author: Roman Stratiienko Date: Thu Jan 28 13:39:40 2021 +0200 drm/sun4i: Add alpha property for sun8i and sun50i VI layer DE3.0 VI layers supports plane-global alpha channel. DE2.0 FCC block have GLOBAL_ALPHA register that can be used as alpha source for blender. Add alpha property to the DRM plane and connect it to the corresponding registers in the mixer. Do not add alpha property for V3s SOC that have DE2.0 and 2 VI planes. Signed-off-by: Roman Stratiienko Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210128113940.347013-3-r.stratiienko@gmail.com commit 0ee29373f0317502dd6d6d2202db189e3bc48f4c Author: Roman Stratiienko Date: Thu Jan 28 13:39:39 2021 +0200 drm/sun4i: Add alpha property for sun8i UI layer DE2.0 and DE3.0 UI layers supports plane-global alpha channel. Add alpha property to the DRM plane and connect it to the corresponding registers in mixer. Signed-off-by: Roman Stratiienko Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210128113940.347013-2-r.stratiienko@gmail.com commit bce724fa58e67d24fe9eddb40ebb665fbe4bd7e8 Author: Joel Stanley Date: Tue Feb 9 23:07:34 2021 +1030 drm/aspeed: Use dt matching for default register values There are minor differences in the values for the threshold value and the scan line size between families of ASPEED SoC. Additionally the SCU registers for the output control and scratch registers differ between families. This adds device tree matching to parameterise these values, allowing us to add support for the AST2400 now, and in the future the AST2600. Reviewed-by: Jeremy Kerr Signed-off-by: Joel Stanley Link: https://patchwork.freedesktop.org/patch/msgid/20210209123734.130483-3-joel@jms.id.au commit 92614ad540171382d856e178cd2073377f2d1a7c Author: Joel Stanley Date: Tue Feb 9 23:07:33 2021 +1030 drm/aspeed: Look up syscon by phandle This scales better to multiple families of SoC. The lookup by compatible can be removed in a future change. The fallback path is for the ast2500 platform only. Other platforms will be added with the new style, so they won't need fallback paths. Signed-off-by: Joel Stanley Reviewed-by: Andrew Jeffery Link: https://patchwork.freedesktop.org/patch/msgid/20210209123734.130483-2-joel@jms.id.au commit 5ffb9afaa909f1a254adab67f2d0557a5cead2e9 Author: Ville Syrjälä Date: Tue Feb 9 04:19:18 2021 +0200 drm/i915: Warn when releasing a frontbuffer while in use Let's scream if we are about to release a frontbuffer which is still in use. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210209021918.16234-3-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit 553c23bdb4775130f333f07a51b047276bc53f79 Author: Ville Syrjälä Date: Tue Feb 9 04:19:17 2021 +0200 drm/i915: Fix overlay frontbuffer tracking We don't have a persistent fb holding a reference to the frontbuffer object, so every time we do the get+put we throw the frontbuffer object immediately away. And so the next time around we get a pristine frontbuffer object with bits==0 even for the old vma. This confuses the frontbuffer tracking code which understandably expects the old frontbuffer to have the overlay's bit set. Fix this by hanging on to the frontbuffer reference until the next flip. And just to make this a bit more clear let's track the frontbuffer explicitly instead of just grabbing it via the old vma. Cc: stable@vger.kernel.org Cc: Chris Wilson Cc: Joonas Lahtinen Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/1136 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210209021918.16234-2-ville.syrjala@linux.intel.com Fixes: 8e7cb1799b4f ("drm/i915: Extract intel_frontbuffer active tracking") Reviewed-by: Chris Wilson commit 59fb8218c8e5001f854e7d5fdb5fb135cba58102 Author: Ville Syrjälä Date: Tue Feb 9 04:19:16 2021 +0200 drm/i915: Disallow plane x+w>stride on ilk+ with X-tiling ilk+ planes get notably unhappy when the plane x+w exceeds the stride. This wasn't a problem previously because we always aligned SURF to the closest tile boundary so the x offset never got particularly large. But now with async flips we have to align to 256KiB instead and thus this becomes a real issue. On ilk/snb/ivb it looks like the accesses just wrap early to the next tile row when scanout goes past the SURF+n*stride boundary, hsw/bdw suffer more heavily and start to underrun constantly. i965/g4x appear to be immune. vlv/chv I've not yet checked. Let's borrow another trick from the skl+ code and search backwards for a better SURF offset in the hopes of getting the x offset below the limit. IIRC when I ran into a similar issue on skl years ago it was causing the hardware to fall over pretty hard as well. And let's be consistent and include i965/g4x in the check as well, just in case I just got super lucky somehow when I wasn't able to reproduce the issue. Not that it really matters since we still use 4k SURF alignment for i965/g4x anyway. Fixes: 6ede6b0616b2 ("drm/i915: Implement async flips for vlv/chv") Fixes: 4bb18054adc4 ("drm/i915: Implement async flip for ilk/snb") Fixes: 2a636e240c77 ("drm/i915: Implement async flip for ivb/hsw") Fixes: cda195f13abd ("drm/i915: Implement async flips for bdw") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210209021918.16234-1-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson commit f1a75f4dd8edf272b6b7cdccf6ba6254ec9d15fa Author: Quanyang Wang Date: Tue Feb 9 16:24:15 2021 +0800 drm/tilcdc: send vblank event when disabling crtc When run xrandr to change resolution on Beaglebone Black board, it will print the error information: root@beaglebone:~# xrandr -display :0 --output HDMI-1 --mode 720x400 [drm:drm_crtc_commit_wait] *ERROR* flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:32:tilcdc crtc] commit wait timed out [drm:drm_crtc_commit_wait] *ERROR* flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:34:HDMI-A-1] commit wait timed out [drm:drm_crtc_commit_wait] *ERROR* flip_done timed out [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:31:plane-0] commit wait timed out tilcdc 4830e000.lcdc: already pending page flip! This is because there is operation sequence as below: drm_atomic_connector_commit_dpms(mode is DRM_MODE_DPMS_OFF): ... drm_atomic_helper_setup_commit <- init_completion(commit_A->flip_done) drm_atomic_helper_commit_tail tilcdc_crtc_atomic_disable tilcdc_plane_atomic_update <- drm_crtc_send_vblank_event in tilcdc_crtc_irq is skipped since tilcdc_crtc->enabled is 0 tilcdc_crtc_atomic_flush <- drm_crtc_send_vblank_event is skipped since crtc->state->event is set to be NULL in tilcdc_plane_atomic_update drm_mode_setcrtc: ... drm_atomic_helper_setup_commit <- init_completion(commit_B->flip_done) drm_atomic_helper_wait_for_dependencies drm_crtc_commit_wait <- wait for commit_A->flip_done completing Just as shown above, the steps which could complete commit_A->flip_done are all skipped and commit_A->flip_done will never be completed. This will result a time-out ERROR when drm_crtc_commit_wait check the commit_A->flip_done. So add drm_crtc_send_vblank_event in tilcdc_crtc_atomic_disable to complete commit_A->flip_done. Fixes: cb345decb4d2 ("drm/tilcdc: Use standard drm_atomic_helper_commit") Signed-off-by: Quanyang Wang Reviewed-by: Jyri Sarha Tested-by: Jyri Sarha Signed-off-by: Jyri Sarha Link: https://patchwork.freedesktop.org/patch/msgid/20210209082415.382602-1-quanyang.wang@windriver.com commit ed89fff973828d3f36f4577d8ea8d5a48794fca5 Author: Christian König Date: Fri Dec 18 19:55:08 2020 +0100 drm/ttm: drop sysfs directory Not used any more. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210208133226.36955-3-christian.koenig@amd.com commit f07069da6b4c5f937d6df2de6504394845513964 Author: Christian König Date: Tue Nov 17 13:52:28 2020 +0100 drm/ttm: move memory accounting into vmwgfx v4 This is just another feature which is only used by VMWGFX, so move it into the driver instead. I've tried to add the accounting sysfs file to the kobject of the drm minor, but I'm not 100% sure if this works as expected. v2: fix typo in KFD and avoid 64bit divide v3: fix init order in VMWGFX v4: use pdev sysfs reference instead of drm Signed-off-by: Christian König Reviewed-by: Zack Rusin (v3) Tested-by: Nirmoy Das Link: https://patchwork.freedesktop.org/patch/msgid/20210208133226.36955-2-christian.koenig@amd.com commit d4bd7776a7ac504510656c0053a55c0cfd1ebc96 Author: Christian König Date: Mon Nov 16 13:47:11 2020 +0100 drm/ttm: rework ttm_tt page limit v4 TTM implements a rather extensive accounting of allocated memory. There are two reasons for this: 1. It tries to block userspace allocating a huge number of very small BOs without accounting for the kmalloced memory. 2. Make sure we don't over allocate and run into an OOM situation during swapout while trying to handle the memory shortage. This is only partially a good idea. First of all it is perfectly valid for an application to use all of system memory, limiting it to 50% is not really acceptable. What we need to take care of is that the application is held accountable for the memory it allocated. This is what control mechanisms like memcg and the normal Linux page accounting already do. Making sure that we don't run into an OOM situation while trying to cope with a memory shortage is still a good idea, but this is also not very well implemented since it means another opportunity of recursion from the driver back into TTM. So start to rework all of this by implementing a shrinker callback which allows for TT object to be swapped out if necessary. v2: Switch from limit to shrinker callback. v3: fix gfp mask handling, use atomic for swapable_pages, add debugfs v4: drop the extra gfp_mask checks Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210208133226.36955-1-christian.koenig@amd.com commit 8a945edd183d296cd1125a2724fb0f3c77d8e9b3 Author: Christian König Date: Tue Feb 9 14:15:53 2021 +0100 drm/ttm: fix removal of bo_count sysfs file Only a zombie leftover from rebasing. Signed-off-by: Christian König Fixes: 3763d635deaa ("drm/ttm: add debugfs directory v2") Reported-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210209131756.24650-1-christian.koenig@amd.com commit 48e2b69683e26b703c768bc34926edfeaa16cbb3 Author: Thomas Zimmermann Date: Tue Feb 9 13:10:42 2021 +0100 drm/vboxvideo: Implement cursor plane with struct drm_shadow_plane_state Functions in the atomic commit tail are not allowed to acquire the dmabuf's reservation lock. So we cannot legally call the GEM object's vmap functionality in atomic_update. Instead use struct drm_shadow_plane_state and friends. It vmaps the framebuffer BOs in prepare_fb and vunmaps them in cleanup_fb. The cursor plane state stores the mapping's address. The pinning of the BO is implicitly done by vmap. As an extra benefit, there's no source of runtime errors left in atomic_update. v2: * rebase patch onto struct drm_shadow_plane_state Signed-off-by: Thomas Zimmermann Reviewed-by: Hans de Goede Tested-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20210209121042.24098-3-tzimmermann@suse.de commit 9dc9067dce20b2ac7e1ba376485190e4a8b2675f Author: Thomas Zimmermann Date: Tue Feb 9 13:10:41 2021 +0100 drm/gem: Export helpers for shadow-buffered planes Export the helpers for shadow-buffered planes. These will be used by several drivers. v3: * fix documentation typos and formatting (Daniel) Signed-off-by: Thomas Zimmermann Reviewed-by: Daniel Vetter Tested-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20210209121042.24098-2-tzimmermann@suse.de commit f48993e5d26b079e8c80fff002499a213dbdb1b4 Author: Imre Deak Date: Mon Feb 8 17:43:03 2021 +0200 drm/i915/tgl+: Make sure TypeC FIA is powered up when initializing it The TypeC FIA can be powered down if the TC-COLD power state is allowed, so block the TC-COLD state when initializing the FIA. Note that this isn't needed on ICL where the FIA is never modular and which has no generic way to block TC-COLD (except for platforms with a legacy TypeC port and on those too only via these legacy ports, not via a DP-alt/TBT port). Cc: # v5.10+ Cc: José Roberto de Souza Reported-by: Paul Menzel Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3027 Signed-off-by: Imre Deak Link: https://patchwork.freedesktop.org/patch/msgid/20210208154303.6839-1-imre.deak@intel.com Reviewed-by: Jos� Roberto de Souza commit 9dd55dfe2e1b727eb4756f893814a03e67cb8327 Author: Patrik Jakobsson Date: Mon Feb 1 14:26:17 2021 +0100 drm/gma500: Never wait for blits Blits cannot happen anymore since we removed the 2d accel code. Stop checking for a busy blitter and remove the remaining blitter code. Signed-off-by: Patrik Jakobsson Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-6-patrik.r.jakobsson@gmail.com commit 5c209d8056b9763ce544ecd7dadb3782cdaf96ed Author: Patrik Jakobsson Date: Mon Feb 1 14:26:16 2021 +0100 drm/gma500: psb_spank() doesn't need it's own file Since everything else in accel_2d.c got removed we can move psb_spank() into psb_drv.c where it is used. Signed-off-by: Patrik Jakobsson Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-5-patrik.r.jakobsson@gmail.com commit 93b0bb58677e8d74bed2346c66086b2934c03e3a Author: Patrik Jakobsson Date: Mon Feb 1 14:26:15 2021 +0100 drm/gma500: Unify crtc helpers CDV crtc helpers are identical to other chips so use gma_ prefix for the crtc helper struct and remove the CDV copy. Signed-off-by: Patrik Jakobsson Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-4-patrik.r.jakobsson@gmail.com commit 45c7f1b4aaf0f5bc86665c274d1de9f3e151d8d4 Author: Patrik Jakobsson Date: Mon Feb 1 14:26:14 2021 +0100 drm/gma500/cdv: Remove unused tv out paths Afaik tv out is not available on Cedarview and the code isn't doing anything so remove it. Signed-off-by: Patrik Jakobsson Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-3-patrik.r.jakobsson@gmail.com commit 23e7cce45ca4983b7124fe7ab0ee969b0d7cc8d8 Author: Patrik Jakobsson Date: Mon Feb 1 14:26:13 2021 +0100 drm/gma500: Remove unused DPST support DPST never got enabled so remove it. We keep the reg save/restore code just for safety. Signed-off-by: Patrik Jakobsson Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-2-patrik.r.jakobsson@gmail.com commit ab7a34670277c8b6f60ea1aca7c786be5c86fd57 Author: Patrik Jakobsson Date: Mon Feb 1 14:26:12 2021 +0100 drm/gma500/cdv: Remove unused code for crt init Clearly never been used so just remove it. Signed-off-by: Patrik Jakobsson Reviewed-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210201132617.1233-1-patrik.r.jakobsson@gmail.com commit e40f97ef12772f8eb04b6a155baa1e0e2e8f3ecc Author: Thomas Zimmermann Date: Tue Feb 9 12:27:21 2021 +0100 drm/gma500: Drop DRM_GMA600 config option With support for the MID-only Medfield chips removed, simply build the complete driver if DRM_GMA500 has been selected. Anyone who wants to enable one of the chips would probably also want the rest. Signed-off-by: Thomas Zimmermann Fixes: 837f23bb4b60 ("drm/gma500: Drop DRM_GMA3600 config option") Cc: Patrik Jakobsson Cc: dri-devel@lists.freedesktop.org Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20210209112721.3421-1-tzimmermann@suse.de commit 5e4b7385f374e10e94e6378cf7d030b66a342a0c Author: Umesh Nerlige Ramappa Date: Mon Feb 8 09:40:29 2021 -0800 i915/perf: Add additional OA formats for gen12 Gen12 supports additional OA formats as compared to what was added earlier. Include the additional OA formats. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20210208174029.45621-3-umesh.nerlige.ramappa@intel.com commit 0f15c5b00634898f573f478f3700b5f4b7a2b727 Author: Umesh Nerlige Ramappa Date: Mon Feb 8 09:40:28 2021 -0800 i915/perf: Move OA formats to single array Variations in OA formats in the different gens has led to creation of several sparse arrays to store the formats. Move oa formats into a single array and format_mask to check for platform specific oa formats. Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20210208174029.45621-2-umesh.nerlige.ramappa@intel.com commit 77892f4f050e73e5998c4f3a12b1e459680be7f6 Author: Umesh Nerlige Ramappa Date: Mon Feb 8 09:40:27 2021 -0800 i915/perf: Store a mask of valid OA formats for a platform Validity of an OA format is checked by using a sparse array of formats per gen. Instead maintain a mask of supported formats for a platform in the perf object. v2: Use set_bit and test_bit style for the format_mask (Chris) Signed-off-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by: Lionel Landwerlin Link: https://patchwork.freedesktop.org/patch/msgid/20210208174029.45621-1-umesh.nerlige.ramappa@intel.com commit 6f02e9df2ac2e327df80d9bb7dc90cf60890e2f7 Author: Sebastian Andrzej Siewior Date: Tue Feb 9 00:31:16 2021 +0100 drm/gma500: Remove in_atomic() usage. The driver is using msleep() if it is safe to use based on in_atomic(). This is not needed this macro is only used from i2c_algorithm::master_xfer() which is always invoked from preemptible context. Remove in_atomic() because it is superfluous. Remove wait_for_atomic() because it has no users. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210208233119.391103-2-bigeasy@linutronix.de commit e22fa6f0a9760297295c621fdcd4e29cf32fcfbd Author: Tejas Upadhyay Date: Mon Nov 30 18:18:55 2020 +0530 drm/i915/rkl: Remove require_force_probe protection Removing force probe protection from RKL platform. Did not observe warnings, errors, flickering or any visual defects while doing ordinary tasks like browsing and editing documents in a two monitor setup. Signed-off-by: Tejas Upadhyay Acked-by: Chris Wilson Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20201130124855.319226-1-tejaskumarx.surendrakumar.upadhyay@intel.com commit 5ceeb328637a01e0e54e2618cff129c6a1c31dba Author: Thomas Zimmermann Date: Mon Feb 8 12:55:38 2021 +0100 drm/udl: Move vmap out of commit tail Vmap operations may acquire the dmabuf reservation lock, which is not allowed within atomic commit-tail functions. Therefore move vmap and vunmap from the damage handler into prepare_fb and cleanup_fb callbacks. The mapping is provided as GEM shadow-buffered plane. The functions in the commit tail use the pre-established mapping for damage handling. Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210208115538.6430-8-tzimmermann@suse.de commit 4ac0868d43b0874d466f248bb767c549bbd741b7 Author: Thomas Zimmermann Date: Mon Feb 8 12:55:37 2021 +0100 drm/gm12u320: Move vmap out of commit tail Vmap operations may acquire the dmabuf reservation lock, which is not allowed within atomic commit-tail functions. Therefore move vmap and vunmap from the damage handler into prepare_fb and cleanup_fb callbacks. The mapping is provided as GEM shadow-buffered plane. The functions in the commit tail use the pre-established mapping for damage handling. Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210208115538.6430-7-tzimmermann@suse.de commit 681a2c5dfd31e61774fcc8a82809aeb7d0773656 Author: Thomas Zimmermann Date: Mon Feb 8 12:55:36 2021 +0100 drm/cirrus: Move vmap out of commit tail Vmap operations may acquire the dmabuf reservation lock, which is not allowed within atomic commit-tail functions. Therefore move vmap and vunmap from the damage handler into prepare_fb and cleanup_fb callbacks. The mapping is provided as GEM shadow-buffered plane. The functions in the commit tail use the pre-established mapping for damage handling. Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210208115538.6430-6-tzimmermann@suse.de commit 4862ffaec523fe24cce6943bf78aa7ea1ba77039 Author: Thomas Zimmermann Date: Mon Feb 8 12:55:35 2021 +0100 drm/mgag200: Move vmap out of commit tail Vmap operations may acquire the dmabuf reservation lock, which is not allowed within atomic commit-tail functions. Therefore move vmap and vunmap from the damage handler into prepare_fb and cleanup_fb callbacks. The mapping is provided as GEM shadow-buffered plane. The functions in the commit tail use the pre-established mapping for damage handling. Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210208115538.6430-5-tzimmermann@suse.de commit 6dd7b6ce43acd70f75ae285fee8eeb2dd4933dce Author: Thomas Zimmermann Date: Mon Feb 8 12:55:34 2021 +0100 drm: Add additional atomic helpers for shadow-buffered planes Several drivers use GEM buffer objects as shadow buffers for the actual framebuffer memory. Right now, drivers do these vmap operations in their commit tail, which is actually not allowed by the locking rules for the dma-buf reservation lock. The involved BO has to be vmapped in the plane's prepare_fb callback and vunmapped in cleanup_fb. This patch introduces atomic helpers for such shadow planes. Plane functions manage the plane state for shadow planes. The provided implementations for prepare_fb and cleanup_fb vmap and vunmap all BOs of struct drm_plane_state.fb. The mappings are afterwards available in the plane's commit-tail functions. For now, all rsp drivers use the simple KMS helpers, so we add the plane callbacks and wrappers for simple KMS. The internal plane functions can later be exported as needed. v3: * documentation fixes v2: * make duplicate_state interface compatible with struct drm_plane_funcs Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210208115538.6430-4-tzimmermann@suse.de commit db0c6bd2c0c0dada8927cd46a7c34c316a3a6c04 Author: Thomas Zimmermann Date: Mon Feb 8 12:55:33 2021 +0100 drm/gem: Export drm_gem_vmap() and drm_gem_vunmap() The symbols will be required by the upcoming helpers for shadow-buffered planes. Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann Reported-by: kernel test robot Link: https://patchwork.freedesktop.org/patch/msgid/20210208115538.6430-3-tzimmermann@suse.de commit 40f302adbd3930bf60258c79506a69748624f6b5 Author: Thomas Zimmermann Date: Mon Feb 8 12:55:32 2021 +0100 drm/simple-kms: Add plane-state helpers Just like regular plane-state helpers, drivers can use these new callbacks to create and destroy private plane state. v2: * make duplicate_state interface compatible with struct drm_plane_funcs Signed-off-by: Thomas Zimmermann Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann Link: https://patchwork.freedesktop.org/patch/msgid/20210208115538.6430-2-tzimmermann@suse.de commit 81637a6ede89b95b6ea7b2f8c594676881110890 Author: Ankit Nautiyal Date: Mon Feb 8 11:25:54 2021 +0530 drm/i915: Fix HAS_LSPCON macro for platforms between GEN9 and GEN10 Legacy LSPCON chip from MCA and Parade is only used for platforms between GEN9 and GEN10. Fixing the HAS_LSPCON macro to reflect the same. Signed-off-by: Ankit Nautiyal Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210208055554.24357-1-ankit.k.nautiyal@intel.com commit 714b1cdb02ee670be1ec5b1190377fef3845acd9 Author: Dave Airlie Date: Fri Feb 5 16:48:42 2021 +0200 drm/i915: refactor skylake scaler code into new file. This moves the code from various places and consolidates it into one new file. v2: - rename skl_program_plane -> skl_program_plane_scaler (Ville) - also move skl_pfit_enable, and consequently make some skl_scaler_* functions static to skl_scaler.c (Ville) Signed-off-by: Dave Airlie Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/2fa703ffc7b96a41c392fd5ebbd2e6e4ffb6fb05.1612536383.git.jani.nikula@intel.com commit 2a3014490cd18a5d0a95c6efd406cf90d69e2a44 Author: Dave Airlie Date: Fri Feb 5 16:48:41 2021 +0200 drm/i915: migrate i9xx plane get config Migrate this code out like the skylake code. Signed-off-by: Dave Airlie Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/c003bd458a6bcc703e9e2fb05731fb7124012e8c.1612536383.git.jani.nikula@intel.com commit 12edd6ab14b400460807309158eaa344ba1d43e4 Author: Dave Airlie Date: Fri Feb 5 16:48:40 2021 +0200 drm/i915: migrate pll enable/disable code to intel_dpll.[ch] This moves the older i9xx/vlv/chv enable/disable to dpll file. Signed-off-by: Dave Airlie Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/7fa8c76b0f07f3ede9efd7c1f989f33fbc8c53a3.1612536383.git.jani.nikula@intel.com commit 92ae3db4c1e1dc195b92055ac07ade216e5cb699 Author: Dave Airlie Date: Fri Feb 5 16:48:39 2021 +0200 drm/i915: move is_ccs_modifier to an inline There is no need for this to be out of line. Reviewed-by: Ville Syrjälä Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/bb73a151b7b780f927edeb7e121449446592805d.1612536383.git.jani.nikula@intel.com commit 14cebc1fc4344af22bbff82687c458229b674b88 Author: Dave Airlie Date: Fri Feb 5 16:48:38 2021 +0200 drm/i915: split fb scalable checks into g4x and skl versions This just cleans these up a bit. Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/c91d924e93965515d2017dbf3c89c245ff6d52ea.1612536383.git.jani.nikula@intel.com commit d471008b00c1a0f0bee3beaabf962106bbc9f47d Author: Dave Airlie Date: Fri Feb 5 16:48:37 2021 +0200 drm/i915: move pipe update code into crtc. (v2) Daniel suggested this should move here. v2: move vrr code. Signed-off-by: Dave Airlie Signed-off-by: Jani Nikula Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/738c7aaeb63c7d2357ddd932f18787ec8a3cefeb.1612536383.git.jani.nikula@intel.com commit 46d12f911821f7bef99b24a1f7c63bbb51766515 Author: Dave Airlie Date: Fri Feb 5 16:48:36 2021 +0200 drm/i915: migrate skl planes code new file (v5) Rework the plane init calls to do the gen test one level higher. Rework some of the plane helpers so they can live in new file, there is still some scope to clean up the plane/fb interactions later. v2: drop atomic code back, rename file to Ville suggestions, add header file. v3: move scaler bits back v4: drop wrong new includes (Ville) v5: integrate the ccs gen12 changes v6: fix unrelated code movement (Ville) Signed-off-by: Dave Airlie [Jani: fixed up sparse warnings.] Signed-off-by: Jani Nikula Reported-by: kernel test robot Reported-by: Dan Carpenter Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/4e88a5c6b9ab3b93cc2b6c7d78c26ae86f6abbd0.1612536383.git.jani.nikula@intel.com commit 1d048afe7e52462d6b2a31dd6ee09c4475f39b4b Author: Christian Hewitt Date: Wed Jan 27 19:40:47 2021 +0000 drm/lima: add governor data with pre-defined thresholds This patch adapts the panfrost pre-defined thresholds change [0] to the lima driver to improve real-world performance. The upthreshold value has been set to ramp GPU frequency to max freq faster (compared to panfrost) to compensate for the lower overall performance of utgard devices. [0] https://patchwork.kernel.org/project/dri-devel/patch/20210121170445.19761-1-lukasz.luba@arm.com/ Signed-off-by: Christian Hewitt Reviewed-by: Lukasz Luba Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20210127194047.21462-1-christianshewitt@gmail.com commit 904beebb3eb501e473d23f59de9c2d5173564a24 Author: Lukasz Luba Date: Wed Jan 27 10:51:21 2021 +0000 drm/lima: Use delayed timer as default in devfreq profile Devfreq framework supports 2 modes for monitoring devices. Use delayed timer as default instead of deferrable timer in order to monitor the GPU status regardless of CPU idle. Signed-off-by: Lukasz Luba Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20210127105121.20345-1-lukasz.luba@arm.com commit 0c9d59c3dbcfb6a5871c03d34f4d22cd3d3de41f Author: Colin Ian King Date: Thu Feb 4 19:11:56 2021 +0000 drm/mgag200: make a const array static, makes object smaller Don't populate the const array m_div_val on the stack but instead make it static. Makes the object code smaller by 29 bytes: Before: text data bss dec hex filename 34736 4552 0 39288 9978 drivers/gpu/drm/mgag200/mgag200_mode.o After: text data bss dec hex filename 34625 4616 0 39241 9949 drivers/gpu/drm/mgag200/mgag200_mode.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Reviewed-by: Thomas Zimmermann Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210204191156.110778-1-colin.king@canonical.com commit 3c4442aa22878091f16c8d9592f5f5b6a94d1556 Author: Ville Syrjälä Date: Thu Feb 4 04:08:46 2021 +0200 drm/i915: Use intel_hdmi_port_clock() more Replace the hand rolled intel_hdmi_port_clock() stuff with the real thing. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210204020846.2094-2-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit 6499f925dd4709ef755e919be355b9e8de6038a3 Author: Ville Syrjälä Date: Thu Feb 4 04:08:45 2021 +0200 drm/i915: Index min_{cdclk,voltage_level}[] with pipe min_cdclk[] and min_voltage_level[] are supposed to be indexed with the pipe. Fix up a few cases where we index via the crtc index (via the atomic iterators) instead. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210204020846.2094-1-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit dcb38f79126e37cfcc95bb80bc86775dfdc39fec Author: Dave Airlie Date: Thu Feb 4 21:43:19 2021 +0200 drm/i915: migrate hsw fdi code to new file. Daniel asked for this, but it's a bit messy and I'm not sure how best to clean it up yet. Signed-off-by: Dave Airlie [Jani: also moved fdi buf trans to intel_fdi.c.] Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/44491f2465549ea5c2e48cde5437fa232f77ab96.1612467466.git.jani.nikula@intel.com commit 99092a976c8c3632bbdc021a149970b1c069b74b Author: Dave Airlie Date: Thu Feb 4 21:43:18 2021 +0200 drm/i915: refactor ddi translations into a separate file (v2) Ville suggested this, these tables are probably better being standalone. This fixes up the cnl/bxt interfaces to be like the others, the intel one I left alone since it has a few extra entrypoints. v2: add back missing rocketlake bits. Reviewed-by: Ville Syrjälä Signed-off-by: Dave Airlie [Jani: made some functions static] Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/def9eed2581d71863ccdf35f323b525facc2482c.1612467466.git.jani.nikula@intel.com commit 64218f91ab49a8aa1d0e5793cc9e29f03a93639b Author: José Roberto de Souza Date: Thu Feb 4 07:33:57 2021 -0800 drm/i915: Make psr_safest_params and enable_psr2_sel_fetch parameters read only By mistake those 2 parameters were defined as read and write in the .h file while in the .c file it is read only. The intention here was to be read only to avoid the need of additional handling. Cc: Gwan-gyeong Mun Cc: Petri Latvala Signed-off-by: José Roberto de Souza Reviewed-by: Gwan-gyeong Mun Link: https://patchwork.freedesktop.org/patch/msgid/20210204153357.39681-1-jose.souza@intel.com commit c5c874a8352918555c79b8af5a25f7e543c84844 Author: Edmund Dea Date: Thu Feb 4 09:58:30 2021 -0800 drm/i915/display: Remove PSR2 on JSL and EHL While JSL and EHL eDP transcoder supports PSR2, the phy of this platforms only supports eDP 1.3, so removing PSR2 support as this feature was added in eDP 1.4. Signed-off-by: Edmund Dea Signed-off-by: José Roberto de Souza Reviewed-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210204175830.97857-1-jose.souza@intel.com commit 759cd2a6d1bf1a129e7705992198ff8bd1d2fed4 Author: Gwan-gyeong Mun Date: Thu Feb 4 15:40:15 2021 +0200 drm/i915/display: Support Multiple Transcoders' PSR status on debugfs In order to support the PSR state of each transcoder, it adds i915_psr_status to sub-directory of each transcoder. v2: Change using of Symbolic permissions 'S_IRUGO' to using of octal permissions '0444' v5: Addressed JJani Nikula's review comments - Remove checking of Gen12 for i915_psr_status. - Add check of HAS_PSR() - Remove meaningless check routine. Signed-off-by: Gwan-gyeong Mun Cc: José Roberto de Souza Cc: Jani Nikula Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210204134015.419036-2-gwan-gyeong.mun@intel.com commit b64d6c51380b7dea17d5503a250ca9cc84025453 Author: Gwan-gyeong Mun Date: Thu Feb 4 15:40:14 2021 +0200 drm/i915/display: Support PSR Multiple Instances It is a preliminary work for supporting multiple EDP PSR and DP PanelReplay. And it refactors singleton PSR to Multi Transcoder supportable PSR. And this moves and renames the i915_psr structure of drm_i915_private's to intel_dp's intel_psr structure. It also causes changes in PSR interrupt handling routine for supporting multiple transcoders. But it does not change the scenario and timing of enabling and disabling PSR. And it not support multiple pipes with a single transcoder PSR case yet. v2: Fix indentation and add comments v3: Remove Blank line v4: Rebased v5: Rebased and Addressed Anshuman's review comment. - Move calling of intel_psr_init() to intel_dp_init_connector() v6: Address Anshuman's review comments - Remove wrong comments and add comments for a limit of supporting of a single pipe PSR v7: Update intel_psr_compute_config() for supporting multiple transcoder PSR on BDW+ v8: Address Anshuman's review comments - Replace DRM_DEBUG_KMS with drm_dbg_kms() / DRM_WARN with drm_warn() v9: Fix commit message v10: Rebased v11: Address Jose's review comment. - Reorder calling order of intel_psr2_program_trans_man_trk_ctl(). - In order to reduce changes keep the old name for drm_i915_private. - Change restrictions of multiple instances of PSR. v12: Address Jose's review comment. - Change the calling of intel_psr2_program_trans_man_trk_ctl() into commit_pipe_config(). - Change a checking order of CAN_PSR() and connector_status to original on i915_psr_sink_status_show(). - Drop unneeded intel_dp_update_pipe() function. - In order to wait a specific encoder which belong to crtc_state on intel_psr_wait_for_idle(), add checking of encoder. - Add an whitespace to comments. v13: Rebased and Address Jose's review comment. - Add and use for_each_intel_psr_enabled_encoder() macro. - In order to use correct frontbuffer_bit for each pipe, fix intel_psr_invalidate() and intel_psr_flush(). - Remove redundant or unneeded codes. - Update comments. v14: Address Jose's review comment - Add and use for_each_intel_encoder_can_psr() macro and for_each_intel_encoder_mask_can_psr() macro. - Add source_support member variable into intel_psr structure. - Update CAN_PSR() macro that checks source_support. - Move encoder's PSR availity check to psr_init() from psr_compute_config(). - Remove redundant or unneeded codes. v15: Remove wrong mutex lock/unlock of PSR from intel_psr2_program_trans_man_trk_ctl() Signed-off-by: Gwan-gyeong Mun Cc: José Roberto de Souza Cc: Juha-Pekka Heikkila Cc: Anshuman Gupta Reviewed-by: Anshuman Gupta Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210204134015.419036-1-gwan-gyeong.mun@intel.com commit 1f1257a67ca34deb9708814c491053be8520644b Author: Clint Taylor Date: Thu Feb 4 12:04:58 2021 -0800 drm/i915/display: support ddr5 mem types Add DDR5 and LPDDR5 return values from punit fw. BSPEC: 54023 Cc: Matt Roper Cc: José Roberto de Souza Signed-off-by: Clint Taylor Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210204200458.21875-1-clinton.a.taylor@intel.com commit 41751b3e5c1ac656a86f8d45a8891115281b729e Author: Ville Syrjälä Date: Wed Feb 3 11:30:44 2021 +0200 drm/i915: Reject 446-480MHz HDMI clock on GLK The BXT/GLK DPLL can't generate certain frequencies. We already reject the 233-240MHz range on both. But on GLK the DPLL max frequency was bumped from 300MHz to 594MHz, so now we get to also worry about the 446-480MHz range (double the original problem range). Reject any frequency within the higher problematic range as well. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3000 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210203093044.30532-1-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola commit f2f12eb9c32bc7a714276d8862efac2e7c41bcbe Author: Christian König Date: Tue Feb 2 12:40:01 2021 +0100 drm/scheduler: provide scheduler score externally Allow multiple schedulers to share the load balancing score. This is useful when one engine has different hw rings. Signed-off-by: Christian König Reviewed-and-Tested-by: Leo Liu Link: https://patchwork.freedesktop.org/patch/msgid/20210204144405.2737-1-christian.koenig@amd.com commit f4a84e165e6d58606097dd07b5b78767a94b870c Author: Gerd Hoffmann Date: Thu Feb 4 15:57:11 2021 +0100 drm/qxl: allocate dumb buffers in ram dumb buffers are shadowed anyway, so there is no need to store them in device memory. Use QXL_GEM_DOMAIN_CPU (TTM_PL_SYSTEM) instead. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-11-kraxel@redhat.com commit 5a838e5d5825c85556011478abde708251cc0776 Author: Gerd Hoffmann Date: Thu Feb 4 15:57:10 2021 +0100 drm/qxl: simplify qxl_fence_wait Now that we have the new release_event wait queue we can just use that in qxl_fence_wait() and simplify the code a lot. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-10-kraxel@redhat.com commit 5f6c871fe919999774e8535ea611a6f84ee43ee4 Author: Gerd Hoffmann Date: Thu Feb 4 15:57:09 2021 +0100 drm/qxl: properly free qxl releases Reorganize qxl_device_fini() a bit. Add missing unpin() calls. Count releases. Add wait queue for releases. That way qxl_device_fini() can easily wait until everything is ready for proper shutdown. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-9-kraxel@redhat.com commit a7709b9b89a67f3ead2d188b1d0c261059b1f291 Author: Gerd Hoffmann Date: Thu Feb 4 15:57:08 2021 +0100 drm/qxl: handle shadow in primary destroy qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-8-kraxel@redhat.com commit 76aefa4d274a003a6b6d1ab8b76cfa7b82549356 Author: Gerd Hoffmann Date: Thu Feb 4 15:57:07 2021 +0100 drm/qxl: properly pin/unpin shadow Suggested-by: Thomas Zimmermann Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-7-kraxel@redhat.com commit 4ca77c513537700d3fae69030879f781dde1904c Author: Gerd Hoffmann Date: Thu Feb 4 15:57:06 2021 +0100 drm/qxl: release shadow on shutdown In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-6-kraxel@redhat.com commit 65ffea3c6e738f37bb15ff3ee480415c793df893 Author: Gerd Hoffmann Date: Thu Feb 4 15:57:05 2021 +0100 drm/qxl: unpin release objects Balances the qxl_create_bo(..., pinned=true, ...); call in qxl_release_bo_alloc(). Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-5-kraxel@redhat.com commit f8752f14c964e9b7e160f491e4b0a0377914e18f Author: Gerd Hoffmann Date: Thu Feb 4 15:57:04 2021 +0100 drm/qxl: use drmm_mode_config_init Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-4-kraxel@redhat.com commit 93d8da8d7efbf690c0a9eaca798acc0c625245e6 Author: Gerd Hoffmann Date: Thu Feb 4 15:57:03 2021 +0100 Revert "drm/qxl: do not run release if qxl failed to init" This reverts commit b91907a6241193465ca92e357adf16822242296d. Patch is broken, it effectively makes qxl_drm_release() a nop because on normal driver shutdown qxl_drm_release() is called *after* drm_dev_unregister(). Fixes: b91907a62411 ("drm/qxl: do not run release if qxl failed to init") Cc: Tong Zhang Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20210204145712.1531203-3-kraxel@redhat.com commit 7962893ecb853aa7c8925ce237ab6c4274cfc1c7 Author: Imre Deak Date: Wed Jan 27 20:19:09 2021 +0200 drm/i915: Disable runtime power management during shutdown At least on some TGL platforms PUNIT wants to access some display HW registers, but it doesn't handle display power management (disabling DC states as required) and so this register access will lead to a hang. To prevent this disable runtime power management for poweroff and reboot. v2: - Add code comment clarifying the requirement of display power states. (Ville) Reported-and-tested-by: Khaled Almahallawy Signed-off-by: Imre Deak Reviewed-by: Khaled Almahallawy Reviewed-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210127181909.128094-1-imre.deak@intel.com commit 6fec777c11968b5ed770ca9c37306f66387bdfd3 Author: Imre Deak Date: Mon Feb 1 14:01:45 2021 +0200 drm/dp_mst: Use DP_MST_LOGICAL_PORT_0 instead of magic number Use the macro defined for the first logical port instead of the corresponding magic number. Cc: Lyude Paul Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210201120145.350258-4-imre.deak@intel.com commit e0305024e76e3bd4849d199af1d7415d95ce82c0 Author: Imre Deak Date: Mon Feb 1 14:01:44 2021 +0200 drm/dp_mst: Remove redundant tile property setting drm_get_edid() already updates the tile property since commit 2de3a078497b ("drm/dp: Set the connector's TILE property even for DP SST connectors") so no need to update it after calling this function. Cc: Lyude Paul Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210201120145.350258-3-imre.deak@intel.com commit 468091531c2e5c49f55d8c6f1d036ce997d24e13 Author: Imre Deak Date: Mon Feb 1 14:01:43 2021 +0200 drm/dp_mst: Don't cache EDIDs for physical ports Caching EDIDs for physical ports prevents updating the EDID if a port gets reconnected via a Connection Status Notification message, fix this. Fixes: db1a07956968 ("drm/dp_mst: Handle SST-only branch device case") Cc: Wayne Lin Cc: Lyude Paul Signed-off-by: Imre Deak Reviewed-by: Lyude Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210201120145.350258-2-imre.deak@intel.com commit 58a92bcec33b82d79d051214310cc9b8d3901dc7 Author: Colin Ian King Date: Wed Feb 3 11:08:03 2021 +0000 drm/i915/display: fix spelling mistake "Couldnt" -> "Couldn't" There is a spelling mistake in a drm_dbg message. Fix it. Signed-off-by: Colin Ian King Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210203110803.17894-1-colin.king@canonical.com commit b91907a6241193465ca92e357adf16822242296d Author: Tong Zhang Date: Tue Feb 2 23:07:27 2021 -0500 drm/qxl: do not run release if qxl failed to init if qxl_device_init() fail, drm device will not be registered, in this case, do not run qxl_drm_release() [ 5.258534] ================================================================== [ 5.258931] BUG: KASAN: user-memory-access in qxl_destroy_monitors_object+0x42/0xa0 [qxl] [ 5.259388] Write of size 8 at addr 00000000000014dc by task modprobe/95 [ 5.259754] [ 5.259842] CPU: 0 PID: 95 Comm: modprobe Not tainted 5.11.0-rc6-00007-g88bb507a74ea #62 [ 5.260309] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-48-gd9c812dda54 [ 5.260917] Call Trace: [ 5.261056] dump_stack+0x7d/0xa3 [ 5.261245] kasan_report.cold+0x10c/0x10e [ 5.261475] ? qxl_destroy_monitors_object+0x42/0xa0 [qxl] [ 5.261789] check_memory_region+0x17c/0x1e0 [ 5.262029] qxl_destroy_monitors_object+0x42/0xa0 [qxl] [ 5.262332] qxl_modeset_fini+0x9/0x20 [qxl] [ 5.262595] qxl_drm_release+0x22/0x30 [qxl] [ 5.262841] drm_dev_release+0x32/0x50 [ 5.263047] release_nodes+0x39e/0x410 [ 5.263253] ? devres_release+0x40/0x40 [ 5.263462] really_probe+0x2ea/0x420 [ 5.263664] driver_probe_device+0x6d/0xd0 [ 5.263888] device_driver_attach+0x82/0x90 [ 5.264116] ? device_driver_attach+0x90/0x90 [ 5.264353] __driver_attach+0x60/0x100 [ 5.264563] ? device_driver_attach+0x90/0x90 [ 5.264801] bus_for_each_dev+0xe1/0x140 [ 5.265014] ? subsys_dev_iter_exit+0x10/0x10 [ 5.265251] ? klist_node_init+0x61/0x80 [ 5.265464] bus_add_driver+0x254/0x2a0 [ 5.265673] driver_register+0xd3/0x150 [ 5.265882] ? 0xffffffffc0048000 [ 5.266064] do_one_initcall+0x84/0x250 [ 5.266274] ? trace_event_raw_event_initcall_finish+0x150/0x150 [ 5.266596] ? unpoison_range+0xf/0x30 [ 5.266801] ? ____kasan_kmalloc.constprop.0+0x84/0xa0 [ 5.267082] ? unpoison_range+0xf/0x30 [ 5.267287] ? unpoison_range+0xf/0x30 [ 5.267491] do_init_module+0xf8/0x350 [ 5.267697] load_module+0x3fe6/0x4340 [ 5.267902] ? vm_unmap_ram+0x1d0/0x1d0 [ 5.268115] ? module_frob_arch_sections+0x20/0x20 [ 5.268375] ? __do_sys_finit_module+0x108/0x170 [ 5.268624] __do_sys_finit_module+0x108/0x170 [ 5.268865] ? __ia32_sys_init_module+0x40/0x40 [ 5.269111] ? file_open_root+0x200/0x200 [ 5.269330] ? do_sys_open+0x85/0xe0 [ 5.269527] ? filp_open+0x50/0x50 [ 5.269714] ? exit_to_user_mode_prepare+0xfc/0x130 [ 5.269978] do_syscall_64+0x33/0x40 [ 5.270176] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 5.270450] RIP: 0033:0x7fa3f685bcf7 [ 5.270646] Code: 48 89 57 30 48 8b 04 24 48 89 47 38 e9 1d a0 02 00 48 89 f8 48 89 f7 48 89 d1 [ 5.271634] RSP: 002b:00007ffca83048d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139 [ 5.272037] RAX: ffffffffffffffda RBX: 0000000001e94a70 RCX: 00007fa3f685bcf7 [ 5.272416] RDX: 0000000000000000 RSI: 0000000001e939e0 RDI: 0000000000000003 [ 5.272794] RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001 [ 5.273171] R10: 00007fa3f68bf300 R11: 0000000000000246 R12: 0000000001e939e0 [ 5.273550] R13: 0000000000000000 R14: 0000000001e93bd0 R15: 0000000000000001 [ 5.273928] ================================================================== Signed-off-by: Tong Zhang Link: http://patchwork.freedesktop.org/patch/msgid/20210203040727.868921-1-ztong0001@gmail.com Signed-off-by: Gerd Hoffmann commit eb988a2ee500d3297a1de048dc3c77b6c354e650 Author: Dan Carpenter Date: Wed Feb 3 12:54:24 2021 +0300 drm/virtio: fix an error code in virtio_gpu_init() If devm_request_mem_region() fails this code currently returns success but it should return -EBUSY. Fixes: 6076a9711dc5 ("drm/virtio: implement blob resources: probe for host visible region") Signed-off-by: Dan Carpenter Link: http://patchwork.freedesktop.org/patch/msgid/YBpy0GS7GfmafMfe@mwanda Signed-off-by: Gerd Hoffmann commit 5823cca39d585e4b4a32b1292eed0015da9c3276 Author: Daniel Vetter Date: Fri Jan 22 14:36:23 2021 +0100 drm/todo: Add entry for moving to dma_resv_lock Requested by Thomas. I think it justifies a new level, since I tried to make some forward progress on this last summer, and gave up (for now). This is very tricky. Acked-by: Thomas Zimmermann Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Link: https://patchwork.freedesktop.org/patch/msgid/20210122133624.1751802-1-daniel.vetter@ffwll.ch commit 09b20988ff29eecc422484c266bee61b2fe58d8c Author: Ye Bin Date: Sat Jan 23 09:30:14 2021 +0800 drm/nouveau: remove set but not used variable ‘pdev’ in nouveau_bios_init Fix follow warning: drivers/gpu/drm/nouveau/nouveau_bios.c:2086:18: warning: variable ‘pdev’ set but not used [-Wunused-but-set-variable] struct pci_dev *pdev; ^~~~ Reported-by: Hulk Robot Signed-off-by: Ye Bin Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210123013014.3815870-1-yebin10@huawei.com commit 75ec69c79ebcae0ad16baf2249e378f5b02bdc12 Author: Zack Rusin Date: Thu Jan 28 12:35:22 2021 -0500 drm/vmwgfx: Fix some memory leaks on errors Dan noticed some issues with pci_release_region, this builds upon that and fixes some other lingering issues. As part of this we also can stop trying to manually free our managed device; there's no need for it, it will be cleaned up automatically for us. Fixes: 8772c0bb58bb ("drm/vmwgfx: Cleanup pci resource allocation") Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger Reported-by: kernel test robot Reported-by: Dan Carpenter Link: https://patchwork.freedesktop.org/patch/msgid/20210128173756.121525-1-zackr@vmware.com commit f0c5a89e534b43bfef8e7bf7baa5624cd84e1e18 Author: Bernard Zhao Date: Tue Feb 2 04:23:38 2021 -0800 drm/vc4: remove unneeded variable: "ret" remove unneeded variable: "ret". Signed-off-by: Bernard Zhao Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210202122338.15351-1-bernard@vivo.com commit 482f3ef0b0e3c4783a7e2130c71d5545b068bcbb Author: Joseph Schulte Date: Mon Jan 25 08:48:15 2021 -0600 drm: replace drm_modeset_lock_all() in drm_client_modeset_dpms_legacy() This patch helps complete Use DRM_MODESET_LOCK_ALL* helpers instead of boilerplate todo in Documentation/gpu/todo.rst Signed-off-by: Joseph Schulte Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20210125144815.8389-1-joeschulte.js@gmail.com commit eaf9a3465d9b1fd1dc5a9a151380d84ac3789964 Merge: 29e9255901336 9ff06c3853009 Author: Jani Nikula Date: Tue Feb 2 14:39:24 2021 +0200 Merge tag 'topic/drm-device-pdev-2021-02-02' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next Driver Changes: - drm/i915: Remove references to struct drm_device.pdev Signed-off-by: Jani Nikula From: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/87y2g6fxxv.fsf@intel.com commit 9ff06c38530099b197b6389193e8cc34ab60288f Author: Thomas Zimmermann Date: Thu Jan 28 14:31:25 2021 +0100 drm/i915/gvt: Remove references to struct drm_device.pdev Using struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210128133127.2311-4-tzimmermann@suse.de commit e322551f47d2305965a41a19d7a4bc7032a567c9 Author: Thomas Zimmermann Date: Thu Jan 28 14:31:24 2021 +0100 drm/i915/gt: Remove references to struct drm_device.pdev Using struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210128133127.2311-3-tzimmermann@suse.de commit 8ff5446a7ca47cffec206af679763a2e4cb1199a Author: Thomas Zimmermann Date: Thu Jan 28 14:31:23 2021 +0100 drm/i915: Remove references to struct drm_device.pdev Using struct drm_device.pdev is deprecated. Convert i915 to struct drm_device.dev. No functional changes. v6: * also remove assignment in selftests/ in a later patch (Chris) v5: * remove assignment in later patch (Chris) v3: * rebased v2: * move gt/ and gvt/ changes into separate patches Signed-off-by: Thomas Zimmermann Reviewed-by: Chris Wilson Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210128133127.2311-2-tzimmermann@suse.de commit 29e92559013360c43886e7fb229ed12fd96f46ef Merge: 6ee8d38125789 4043277ad18fc Author: Jani Nikula Date: Tue Feb 2 12:50:04 2021 +0200 Merge tag 'topic/adl-s-enabling-2021-02-01-1' of git://anongit.freedesktop.org/drm/drm-intel into drm-intel-next Driver Changes: - Add basic support for Alder Lake S, to be shared between drm-intel-next and drm-intel-gt-next Signed-off-by: Jani Nikula # Conflicts: # drivers/gpu/drm/i915/i915_drv.h From: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210202025620.2212559-1-lucas.demarchi@intel.com commit 576a08e008e2e3ed7c7ff3d96b3e813f5fdb2b5e Author: Christian König Date: Mon Feb 1 10:09:07 2021 +0100 drm/v3d/v3d_sched: fix scheduler callbacks return status Looks like this was not correctly adjusted. Signed-off-by: Christian König Acked-by: Daniel Vetter Fixes: a6a1f036c74e ("drm/scheduler: Job timeout handler returns status (v3)") Link: https://patchwork.freedesktop.org/patch/msgid/20210201091159.177853-1-christian.koenig@amd.com commit 4043277ad18fc7cb9a79d0d043063fb5f42a6f06 Author: Aditya Swarup Date: Fri Jan 29 10:29:45 2021 -0800 drm/i915/adl_s: Add GT and CTX WAs for ADL-S - Extend Wa_1606931601 and Wa_1409804808 to ADL-S. - Extend Wa_14010919138 and Wa_14010229206 to ADL-S (Madhumitha) - Extend Wa_22010271021 to ADLS (cyokoyam) v2: - Extend Wa_1409804808 and remove unnecessary branching/redundant adls workaround placeholder functions. - Split WAs properly based on previous platforms and applicable ADLS WA. Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Madhumitha Tolakanahalli Pradeep Signed-off-by: Aditya Swarup Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210129182945.217078-9-aditya.swarup@intel.com commit ea27113ea90cb1f689e5b5234ebf6323e838efff Author: Aditya Swarup Date: Fri Jan 29 10:29:44 2021 -0800 drm/i915/adl_s: Add display WAs for ADL-S - Extend permanent driver WA Wa_1409767108, Wa_14010685332 and Wa_14011294188 to adl-s. - Extend permanent driver WA Wa_1606054188 to adl-s. - Add Wa_14011765242 for adl-s A0 stepping. Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Aditya Swarup Reviewed-by: José Roberto de Souza Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210129182945.217078-8-aditya.swarup@intel.com commit 918cc934682f4385506dbf95beed4f4bfd1e377f Author: Tejas Upadhyay Date: Fri Jan 29 10:29:43 2021 -0800 drm/i915/adl_s: Update memory bandwidth parameters Just like RKL, the ADL_S platform also has different memory characteristics from past platforms. Update the values used by our memory bandwidth calculations accordingly. v2: Fix minor nitpick for shifting ADLS case above RKL(based on platform order).(mdroper) Bspec: 64631 Cc: Matt Roper Cc: Lucas De Marchi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Signed-off-by: Tejas Upadhyay Signed-off-by: Aditya Swarup Reviewed-by: Anusha Srivatsa Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210129182945.217078-7-aditya.swarup@intel.com commit 75b81fbbcad2648195fd1323b95c3a77393e4ad1 Author: Anusha Srivatsa Date: Fri Jan 29 10:29:42 2021 -0800 drm/i915/adl_s: Load DMC Load DMC on ADL_S v2.01. This is the first offcial release of DMC for ADL_S. Cc: Jani Nikula Cc: Imre Deak Cc: Matt Roper Cc: Lucas De Marchi Cc: Aditya Swarup Signed-off-by: Anusha Srivatsa Signed-off-by: Aditya Swarup Reviewed-by: Aditya Swarup Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210129182945.217078-6-aditya.swarup@intel.com commit a75816e8410e01574e4d8ea13573fc1cdac2e4f5 Author: José Roberto de Souza Date: Fri Jan 29 10:29:41 2021 -0800 drm/i915/display: Add HAS_D12_PLANE_MINIMIZATION - As RKL and ADL-S only have 5 planes, primary and 4 sprites and the cursor plane, let's group the handling together under HAS_D12_PLANE_MINIMIZATION. - Also use macro to select pipe irq fault error mask. BSpec: 49251 Cc: Lucas De Marchi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Signed-off-by: José Roberto de Souza Signed-off-by: Aditya Swarup Reviewed-by: Anusha Srivatsa Link: https://patchwork.freedesktop.org/patch/msgid/20210129182945.217078-5-aditya.swarup@intel.com commit 51ecb30e74d027e35771d5f552f86c118a8048b0 Author: Matt Roper Date: Fri Jan 29 10:29:40 2021 -0800 drm/i915/adl_s: Re-use TGL GuC/HuC firmware ADL-S, like RKL, uses the same internal device ID for the GuC and HuC as TGL did, making them all firmware-compatible. Let's re-use TGL's firmware for ADL-S. Bspec: 50668 Cc: John Harrison Cc: Lucas De Marchi Signed-off-by: Matt Roper Signed-off-by: Aditya Swarup Reviewed-by: Anusha Srivatsa Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210129182945.217078-4-aditya.swarup@intel.com commit a7ffb8154d698cdcf5cad3f859f2cd7efb73ae82 Author: Lucas De Marchi Date: Fri Jan 29 10:29:39 2021 -0800 drm/i915/adl_s: Add power wells TGL power wells can be re-used for ADL-S with the exception of the fake power well for TC_COLD, just like DG-1. BSpec: 53597 Bspec: 49231 Cc: Imre Deak Cc: Matt Roper Cc: Aditya Swarup Signed-off-by: Lucas De Marchi Signed-off-by: Aditya Swarup Reviewed-by: Matt Roper Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210129182945.217078-3-aditya.swarup@intel.com commit b4cd8dd367ad1ec0e1aba45a59800361140b458a Author: Matt Roper Date: Fri Jan 29 10:29:38 2021 -0800 drm/i915/adl_s: Update PHY_MISC programming ADL-S switches up which PHYs are considered a master to other PHYs; PHY-C is no longer a master, but PHY-D is now. Bspec: 49291 Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Lucas De Marchi Signed-off-by: Matt Roper Signed-off-by: Aditya Swarup Reviewed-by: Aditya Swarup Signed-off-by: José Roberto de Souza Link: https://patchwork.freedesktop.org/patch/msgid/20210129182945.217078-2-aditya.swarup@intel.com commit 8180cc3752329a599b168ba0f8b93baec9054cdd Author: Thomas Zimmermann Date: Fri Jan 29 10:56:04 2021 +0100 drm/gma500: Remove dependency on TTM The gma500 driver does not use TTM. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-6-tzimmermann@suse.de commit 6455af65e978479336309f6c83ce1fc632a2f535 Author: Thomas Zimmermann Date: Fri Jan 29 10:56:03 2021 +0100 drm/gma500: Remove CONFIG_X86 conditionals from source files Remove the CONFIG_X86 conditionals from the source code. The driver already depends on X86 in the Kconfig file. Also, no one has been trying to build it on a non-x86 platform recently, or they would have noticed that drm_ttm_cache_flush() doesn't exist. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-5-tzimmermann@suse.de commit 6ee8d381257891c7fd2d620e9d2db1be9f0f7bf5 Author: Jani Nikula Date: Wed Jan 27 10:45:34 2021 +0200 drm/i915/bios: tidy up child device debug logging Make the child device details easier to read by turning this: [drm:parse_ddi_port [i915]] Port B VBT info: CRT:0 DVI:1 HDMI:1 DP:0 eDP:0 LSPCON:0 USB-Type-C:0 TBT:0 DSC:0 [drm:parse_ddi_port [i915]] VBT HDMI level shift for port B: 8 [drm:parse_ddi_port [i915]] VBT DP max link rate for port B: 810000 [drm:parse_ddi_port [i915]] Port C VBT info: CRT:0 DVI:1 HDMI:1 DP:1 eDP:0 LSPCON:0 USB-Type-C:0 TBT:0 DSC:0 [drm:parse_ddi_port [i915]] VBT HDMI level shift for port C: 8 [drm:parse_ddi_port [i915]] VBT (e)DP boost level for port C: 3 [drm:parse_ddi_port [i915]] VBT HDMI boost level for port C: 1 [drm:parse_ddi_port [i915]] VBT DP max link rate for port C: 810000 into this: [drm:parse_ddi_port [i915]] Port B VBT info: CRT:0 DVI:1 HDMI:1 DP:0 eDP:0 LSPCON:0 USB-Type-C:0 TBT:0 DSC:0 [drm:parse_ddi_port [i915]] Port B VBT HDMI level shift: 8 [drm:parse_ddi_port [i915]] Port B VBT DP max link rate: 810000 [drm:parse_ddi_port [i915]] Port C VBT info: CRT:0 DVI:1 HDMI:1 DP:1 eDP:0 LSPCON:0 USB-Type-C:0 TBT:0 DSC:0 [drm:parse_ddi_port [i915]] Port C VBT HDMI level shift: 8 [drm:parse_ddi_port [i915]] Port C VBT (e)DP boost level: 3 [drm:parse_ddi_port [i915]] Port C VBT HDMI boost level: 1 [drm:parse_ddi_port [i915]] Port C VBT DP max link rate: 810000 Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210127084534.24406-1-jani.nikula@intel.com commit 837f23bb4b6002fe2be5dd70de7735133e0f2f28 Author: Thomas Zimmermann Date: Fri Jan 29 10:56:02 2021 +0100 drm/gma500: Drop DRM_GMA3600 config option With support for the MID-related chips removed, only support for desktop chips is left in the driver. So just build the complete driver if DRM_GMA500 has been selected. Anyone who wants to enable the Poulsbo code would probably also want the Cedarview code. [Patrik: Fixed conflict due to Oaktrail not being dropped] Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-4-tzimmermann@suse.de commit b51035c200bd3423ae5b6b98b54735ef424dc746 Author: Thomas Zimmermann Date: Fri Jan 29 10:56:00 2021 +0100 drm/gma500: Remove Medfield support Medfield is an outdated mobile platform with apparently no users left. Remove it from gma500. Signed-off-by: Thomas Zimmermann Signed-off-by: Patrik Jakobsson Link: https://patchwork.freedesktop.org/patch/msgid/20210129095604.32423-2-tzimmermann@suse.de commit e4abd7ad2b779c6309237a79bdcc5a128fb755ef Author: Joe Perches Date: Mon Aug 24 21:56:05 2020 -0700 dma-buf: Avoid comma separated statements Use semicolons and braces. Signed-off-by: Joe Perches Reviewed-by: Christian König Link: https://patchwork.freedesktop.org/patch/msgid/990bf6f33ccaf73ad56eb4bea8bd2c0db5e90a31.1598331148.git.joe@perches.com Signed-off-by: Christian König commit ee0735ff4633a30ffcc1ea5ce073d9490692a3ea Author: Juston Li Date: Tue Jan 26 22:50:34 2021 -0800 drm/i915/hdcp: disable the QSES check for HDCP2.2 over MST Like the patch to disable QSES for HDCP 1.4 over MST https://patchwork.freedesktop.org/patch/415297/ the HDCP2.2 spec doesn't require QSES as well and we've seen QSES not supported on a couple HDCP2.2 docks so far (Dell WD19 and Lenovo LDC-G2) Remove it for now until we get a better idea of how widely supported QSES is and how to support it optionally. Signed-off-by: Juston Li Reviewed-by: Anshuman Gupta Signed-off-by: Anshuman Gupta Link: https://patchwork.freedesktop.org/patch/msgid/20210127065034.2501119-4-juston.li@intel.com commit 902af369942f8d0a6bdaa8466ff0d84d3d9b03a8 Author: Zheng Yongjun Date: Thu Dec 24 21:22:33 2020 +0800 ecryptfs: use DEFINE_MUTEX() for mutex lock mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Signed-off-by: Zheng Yongjun Signed-off-by: Tyler Hicks commit d0eb2d867cf3dbba79ef4c678797e6b58638392c Author: Tom Rix Date: Fri Nov 27 08:05:13 2020 -0800 eCryptfs: add a semicolon Function like macros should have a semicolon. Signed-off-by: Tom Rix [tyhicks: Remove the trailing semicolin from the macro's definition, as suggested by Joe Perches] Signed-off-by: Tyler Hicks commit de499781c97d96703af8a32d2b5e37fdb5b51568 Author: Qinglang Miao Date: Fri Nov 27 17:44:38 2020 +0800 drm/lima: fix reference leak in lima_pm_busy pm_runtime_get_sync will increment pm usage counter even it failed. Forgetting to putting operation will result in a reference leak here. A new function pm_runtime_resume_and_get is introduced in [0] to keep usage counter balanced. So We fix the reference leak by replacing it with new function. [0] commit dd8088d5a896 ("PM: runtime: Add pm_runtime_resume_and_get to deal with usage counter") Fixes: 50de2e9ebbc0 ("drm/lima: enable runtime pm") Reported-by: Hulk Robot Signed-off-by: Qinglang Miao Signed-off-by: Qiang Yu Link: https://patchwork.freedesktop.org/patch/msgid/20201127094438.121003-1-miaoqinglang@huawei.com commit 5b6a9ba9f6cefa41b2dd9b0c9ba36646b81ce0a1 Author: Ville Syrjälä Date: Thu Jan 28 17:59:48 2021 +0200 drm/i915: Don't check tc_mode unless dealing with a TC PHY We shouldn't really trust tc_mode on non-TC PHYs since we never initialize it explicitly. So let's check for the PHY type first. Fortunately TC_PORT_TBT_ALT happens to be zero so I don't think there's an actual bug here, just a possibility for a future one if someone rearranges the enum values. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210128155948.13678-5-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit c9b69041f0e0f3b6f2019c81ffe3b732f605ea00 Author: Ville Syrjälä Date: Thu Jan 28 17:59:47 2021 +0200 drm/i915: Move HDMI vswing programming to the right place The documented programming sequence indicates the correct point for the vswing programming is just before we enable the DDI. Make it so. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210128155948.13678-4-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 1e0cb7bef35f0d1aed383bf69a209df218b807c9 Author: Ville Syrjälä Date: Thu Jan 28 17:59:46 2021 +0200 drm/i915: Power up combo PHY lanes for for HDMI as well Currently we only explicitly power up the combo PHY lanes for DP. The spec says we should do it for HDMI as well. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210128155948.13678-3-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit 5cdf706fb91a6e4e6af799bb957c4d598e6a067b Author: Ville Syrjälä Date: Thu Jan 28 17:59:45 2021 +0200 drm/i915: Extract intel_ddi_power_up_lanes() Reduce the copypasta by pulling the combo PHY lane power up stuff into a helper. We'll have a third user soon. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210128155948.13678-2-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit f8c6b615b921d8a1bcd74870f9105e62b0bceff3 Author: Ville Syrjälä Date: Thu Jan 28 17:59:44 2021 +0200 drm/i915: Skip vswing programming for TBT In thunderbolt mode the PHY is owned by the thunderbolt controller. We are not supposed to touch it. So skip the vswing programming as well (we already skipped the other steps not applicable to TBT). Touching this stuff could supposedly interfere with the PHY programming done by the thunderbolt controller. Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20210128155948.13678-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak commit a6a1f036c74e3d2a3a56b3140492c7c3ecb879f3 Author: Luben Tuikov Date: Wed Jan 20 15:09:59 2021 -0500 drm/scheduler: Job timeout handler returns status (v3) This patch does not change current behaviour. The driver's job timeout handler now returns status indicating back to the DRM layer whether the device (GPU) is no longer available, such as after it's been unplugged, or whether all is normal, i.e. current behaviour. All drivers which make use of the drm_sched_backend_ops' .timedout_job() callback have been accordingly renamed and return the would've-been default value of DRM_GPU_SCHED_STAT_NOMINAL to restart the task's timeout timer--this is the old behaviour, and is preserved by this patch. v2: Use enum as the status of a driver's job timeout callback method. v3: Return scheduler/device information, rather than task information. Cc: Alexander Deucher Cc: Andrey Grodzovsky Cc: Christian König Cc: Daniel Vetter Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: Qiang Yu Cc: Rob Herring Cc: Tomeu Vizoso Cc: Steven Price Cc: Alyssa Rosenzweig Cc: Eric Anholt Reported-by: kernel test robot Signed-off-by: Luben Tuikov Acked-by: Alyssa Rosenzweig Acked-by: Christian König Acked-by: Steven Price Signed-off-by: Christian König Link: https://patchwork.freedesktop.org/patch/415095/ commit f3ebd4e6b692ab7af464561410a1f05dfc850823 Author: Dan Carpenter Date: Mon Jan 25 11:45:37 2021 +0300 drm/vmwgfx/vmwgfx_drv: Fix an error path in vmw_setup_pci_resources() The devm_memremap() function never returns NULL, it returns error pointers so the test needs to be fixed. Also we need to call pci_release_regions() to avoid a memory leak. Fixes: be4f77ac6884 ("drm/vmwgfx: Cleanup fifo mmio handling") Signed-off-by: Dan Carpenter Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/YA6FMboLhnE3uSvb@mwanda commit e7cbc68a28e14c51e354f94831bd03cdf7ec6cea Author: Maxime Ripard Date: Mon Jan 11 15:23:07 2021 +0100 dt-binding: display: bcm2711-hdmi: Add CEC and hotplug interrupts The CEC and hotplug interrupts were missing when that binding was introduced, let's add them in now that we've figured out how it works. Signed-off-by: Maxime Ripard Acked-by: Dave Stevenson Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-14-maxime@cerno.tech commit 4d03ed7ad731a2cf922fa37246fb7068a52f18ff Author: Maxime Ripard Date: Mon Jan 11 15:23:06 2021 +0100 drm/vc4: hdmi: Don't register the CEC adapter if there's no interrupts We introduced the BCM2711 support to the vc4 HDMI controller with 5.10, but this was lacking any of the interrupts of the CEC controller so we have to deal with the backward compatibility. Do so by simply ignoring the CEC setup if the DT doesn't have the interrupts property. Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-13-maxime@cerno.tech commit f551863af919edd60f76a24126da3ac10294ace1 Author: Dom Cobley Date: Mon Jan 11 15:23:05 2021 +0100 drm/vc4: hdmi: Remove cec_available flag Now that our HDMI controller supports CEC for the BCM2711, let's remove that flag. Reviewed-by: Dave Stevenson Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-12-maxime@cerno.tech commit ad6380e9aaf459c22006c73fd3d4dd6f41e8f048 Author: Maxime Ripard Date: Mon Jan 11 15:23:04 2021 +0100 drm/vc4: hdmi: Support BCM2711 CEC interrupt setup The HDMI controller found in the BCM2711 has an external interrupt controller for the CEC and hotplug interrupt shared between the two instances. Let's add a variant flag to register a single interrupt handler and deals with the interrupt handler setup, or two interrupt handlers relying on an external irqchip. Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-11-maxime@cerno.tech commit 0c38490a031071c0d81b400949f43ea6f4b0cd8f Author: Maxime Ripard Date: Mon Jan 11 15:23:03 2021 +0100 drm/vc4: hdmi: Split the interrupt handlers The BCM2711 has two different interrupt sources to transmit and receive CEC messages, provided through an external interrupt chip shared between the two HDMI interrupt controllers. The rest of the CEC controller is identical though so we need to change a bit the code organisation to share the code as much as possible, yet still allowing to register independent handlers. Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-10-maxime@cerno.tech commit cd7f016c93b697dea79a884162cbf7311283fe12 Author: Maxime Ripard Date: Mon Jan 11 15:23:02 2021 +0100 drm/vc4: hdmi: Introduce a CEC clock While the BCM2835 had the CEC clock derived from the HSM clock, the BCM2711 has a dedicated parent clock for it. Let's introduce a separate clock for it so that we can handle both cases. Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-9-maxime@cerno.tech commit a9dd0b9a5c3e11c79e6ff9c7fdf07c471732dcb6 Author: Maxime Ripard Date: Mon Jan 11 15:23:01 2021 +0100 drm/vc4: hdmi: Update the CEC clock divider on HSM rate change As part of the enable sequence we might change the HSM clock rate if the pixel rate is different than the one we were already dealing with. On the BCM2835 however, the CEC clock derives from the HSM clock so any rate change will need to be reflected in the CEC clock divider to output 40kHz. Fixes: cd4cb49dc5bb ("drm/vc4: hdmi: Adjust HSM clock rate depending on pixel rate") Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-8-maxime@cerno.tech commit f1ceb9d10043683b89e5e5e5848fb4e855295762 Author: Maxime Ripard Date: Mon Jan 11 15:23:00 2021 +0100 drm/vc4: hdmi: Compute the CEC clock divider from the clock rate The CEC clock divider needs to output a frequency of 40kHz from the HSM rate on the BCM2835. The driver used to have a fixed frequency for it, but that changed for the BCM2711 and we now need to compute it dynamically to maintain the proper rate. Fixes: cd4cb49dc5bb ("drm/vc4: hdmi: Adjust HSM clock rate depending on pixel rate") Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-7-maxime@cerno.tech commit b06eecb5158e5f3eb47b9d05aea8c259985cc5f7 Author: Dom Cobley Date: Mon Jan 11 15:22:59 2021 +0100 drm/vc4: hdmi: Restore cec physical address on reconnect Currently we call cec_phys_addr_invalidate on a hotplug deassert. That may be due to a TV power cycling, or an AVR being switched on (and switching edid). This makes CEC unusable since our controller wouldn't have a physical address anymore. Set it back up again on the hotplug assert. Fixes: 15b4511a4af6 ("drm/vc4: add HDMI CEC support") Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard Acked-by: Dave Stevenson Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-6-maxime@cerno.tech commit 303085bc11bb7aebeeaaf09213f99fd7aa539a34 Author: Dom Cobley Date: Mon Jan 11 15:22:58 2021 +0100 drm/vc4: hdmi: Fix up CEC registers The commit 311e305fdb4e ("drm/vc4: hdmi: Implement a register layout abstraction") forgot one CEC register, and made a copy and paste mistake for another one. Fix those mistakes. Fixes: 311e305fdb4e ("drm/vc4: hdmi: Implement a register layout abstraction") Reviewed-by: Dave Stevenson Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-5-maxime@cerno.tech commit e9c9481f373eb7344f9e973eb28fc6e9d0f46485 Author: Dom Cobley Date: Mon Jan 11 15:22:57 2021 +0100 drm/vc4: hdmi: Fix register offset with longer CEC messages The code prior to 311e305fdb4e ("drm/vc4: hdmi: Implement a register layout abstraction") was relying on the fact that the register offset was incremented by 4 for each readl call. That worked since the register width is 4 bytes. However, since that commit the HDMI_READ macro is now taking an enum, and the offset doesn't increment by 4 but 1 now. Divide the index by 4 to fix this. Fixes: 311e305fdb4e ("drm/vc4: hdmi: Implement a register layout abstraction") Reviewed-by: Dave Stevenson Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-4-maxime@cerno.tech commit 7155334f15f360f5c98391c5c7e12af4c13395c4 Author: Dom Cobley Date: Mon Jan 11 15:22:56 2021 +0100 drm/vc4: hdmi: Move hdmi reset to bind The hdmi reset got moved to a later point in the commit 9045e91a476b ("drm/vc4: hdmi: Add reset callback"). However, the reset now occurs after vc4_hdmi_cec_init and so tramples the setup of registers like HDMI_CEC_CNTRL_1 This only affects pi0-3 as on pi4 the cec registers are in a separate block Fixes: 9045e91a476b ("drm/vc4: hdmi: Add reset callback") Reviewed-by: Dave Stevenson Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard Acked-by: Hans Verkuil Tested-by: Hans Verkuil Link: https://patchwork.freedesktop.org/patch/msgid/20210111142309.193441-3-maxime@cerno.tech commit bbd13d6a7b2e2ed05740a527a63db4f7bd6cb57e Author: Menglong Dong Date: Tue Jan 26 17:51:17 2021 -0800 drm/omap: dsi: fix unreachable code in dsi_vc_send_short() The 'r' in dsi_vc_send_short() is of type 'unsigned int', so the 'r < 0' can't be true. Fix this by introducing a 'err' of type 'int' insteaded. Fixes: 1ed6253856cb ("drm/omap: dsi: switch dsi_vc_send_long/short to mipi_dsi_msg") Signed-off-by: Menglong Dong Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Link: https://patchwork.freedesktop.org/patch/msgid/20210127015117.23267-1-dong.menglong@zte.com.cn commit 52401eb8e3fced097628507e1d3056cc81d51ed9 Author: Matt Roper Date: Mon Jan 25 06:07:53 2021 -0800 drm/i915/adl_s: Update combo PHY master/slave relationships ADL-S switches up which PHYs are considered a master to other PHYs; PHY-C is no longer a master, but PHY-D is now. Bspec: 49291 Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Lucas De Marchi Signed-off-by: Matt Roper Signed-off-by: Aditya Swarup Reviewed-by: Anusha Srivatsa Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-11-aditya.swarup@intel.com commit 18c283df5a0ece65ac1cfc6f1e2867fd24636252 Author: Aditya Swarup Date: Mon Jan 25 06:07:52 2021 -0800 drm/i915/adl_s: Add vbt port and aux channel settings for adls - ADL-S driver internal mapping uses PORT D, E, F, G for Combo phy B, C, D and E. - Add ADLS specific port mappings for vbt port dvo settings. - Select appropriate AUX CH specific to ADLS based on port mapping. Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Aditya Swarup Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-10-aditya.swarup@intel.com commit 7dc1f92f27f8d7046ff4bd4cb113b1f522b175e8 Author: Aditya Swarup Date: Mon Jan 25 06:07:51 2021 -0800 drm/i915/adl_s: Add adl-s ddc pin mapping ADL-S requires TC pins to set up ddc for Combo PHY B, C, D and E. Combo PHY A still uses the old ddc pin mapping. From VBT, ddc pin info suggests the following mapping: VBT DRIVER DDI B->ddc_pin=2 should translate to PORT_D->0x9 DDI C->ddc_pin=3 should translate to PORT_E->0xa DDI D->ddc_pin=4 should translate to PORT_F->0xb DDI E->ddc_pin=5 should translate to PORT_G->0xc Adding pin map to facilitate this translation as we cannot use existing icl ddc pin map due to conflict with DDI B and DDI C info. Bspec:20124 v2: Replace IS_ALDERLAKE_S() with HAS_PCH_ADP() as the pin map pairing depends on the PCH being used rather than the platform.(mdroper) v3: - Modify adls_port_to_ddc_pin() to make PHY_A the special case for check, else return pin mapping based on correct arithmetic with phy offset. Remove redundant platform checks and use HAS_PCH_ADP() instead of IS_ALDERLAKE_S() in intel_hdmi_ddc_pin().(mdroper) Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Aditya Swarup Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-9-aditya.swarup@intel.com commit e341c618acde39ea9bfd83d8262b4c4c70e92a5b Author: Aditya Swarup Date: Mon Jan 25 06:07:50 2021 -0800 drm/i915/adl_s: Initialize display for ADL-S Initialize display outputs for ADL-S. ADL-S has 5 display outputs -> 1 eDP, 2 HDMI and 2 DP++ outputs. v2: - Use PORT_TCx instead of PORT_D,E.. to stay consistent with other platforms.(mdroper) Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Aditya Swarup Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-8-aditya.swarup@intel.com commit d6d2bc996e45073db16d1da1dde2116f3c86955c Author: Aditya Swarup Date: Mon Jan 25 06:07:49 2021 -0800 drm/i915/adl_s: Configure Port clock registers for ADL-S Add changes to configure port clock registers for ADL-S. Combo phy port clocks are configured by DPCLKA_CFGCR0 and DPCLKA_CFGCR1 registers. The DDI to internal clock mappings in DPCLKA_CFGCR0 register for ADL-S translates to DDI A -> DDIA DDI B -> USBC1 DDI I -> USBC2 For DPCLKA_CFGCR1 DDI J -> USBC3 DDI K -> USBC4 Bspec: 50287 Bspec: 53812 Bspec: 53723 v2: Replace I915_READ() with intel_de_read().(Jani) v3: - Use reg variable to assign ADLS specific registers inorder to replace branching with intel_de_read/write() calls.(mdroper) - Reuse icl_get_ddi_pll() for ADLS to fix issue with updating active dpll on driver load.(aswarup) Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Aditya Swarup Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-7-aditya.swarup@intel.com commit 80d0f76588b55e5226d65776bb5fca7360837f1d Author: Aditya Swarup Date: Mon Jan 25 06:07:48 2021 -0800 drm/i915/adl_s: Configure DPLL for ADL-S Add changes for configuring DPLL for ADL-S - Reusing DG1 DPLL 2 & DPLL 3 for ADL-S - Extend CNL macro to choose DPLL_ENABLE for ADL-S. - Select CFGCR0 and CFGCR1 for ADL-S plls. On BSpec: 53720 PLL arrangement dig for adls: DPLL2 cfgcr is programmed using _ADLS_DPLL3_CFGCR(0/1) DPLL3 cfgcr is programmed using _ADLS_DPLL4_CFGCR(0/1) v2 (Lucas): add missing update_ref_clks Bspec: 50288 Bspec: 50289 Bspec: 49443 v3 : Adding another bit to HDPORT_DPLL_USED_MASK bitfield for DPLL3_USED.(mdroper) Bspec: 53707 v4: BSpec 53723 has been updated with note - DPLL2 is controlled by DPLL4 CFGCR 0/1.(mdroper) Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Cc: Lucas De Marchi Signed-off-by: Aditya Swarup Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-6-aditya.swarup@intel.com commit a84b4bd1172b8394d5540b51b3cf0f76c0dff17a Author: Anusha Srivatsa Date: Mon Jan 25 06:07:47 2021 -0800 drm/i915/adl_s: Add PHYs for Alderlake S Alderlake-S has 5 combo phys, add reg definitions for combo phys and update the port to phy helper for ADL-S. v2: - Change IS_GEN() >= 12 to IS_TIGERLAKE() in intel_phy_is_tc() and return false for platforms RKL,DG1 and ADLS.(mdroper) Cc: Lucas De Marchi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Signed-off-by: Anusha Srivatsa Signed-off-by: Aditya Swarup Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-5-aditya.swarup@intel.com commit fa58c9e4e36402ae3dfaa05914df9d22e2d4d458 Author: Anusha Srivatsa Date: Mon Jan 25 06:07:46 2021 -0800 drm/i915/adl_s: Add Interrupt Support ADLS follows ICP/TGP like interrupts. v2: Use "INTEL_PCH_TYPE(dev_priv) >= PCH_ICP" of hpd_icp (Lucas) Cc: Lucas De Marchi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: Matt Roper Cc: José Roberto de Souza Signed-off-by: Anusha Srivatsa Signed-off-by: Aditya Swarup Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-4-aditya.swarup@intel.com commit fb51970b8d115842821005032d0a34f7fec7f5fe Author: Anusha Srivatsa Date: Mon Jan 25 06:07:45 2021 -0800 drm/i915/adl_s: Add PCH support Add support for Alderpoint(ADP) PCH used with Alderlake-S. v2: - Use drm_dbg_kms and drm_WARN_ON based on Jani's feedback.(aswarup) Cc: Matt Roper Cc: Lucas De Marchi Cc: Caz Yokoyama Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Signed-off-by: Anusha Srivatsa Signed-off-by: Aditya Swarup Reviewed-by: Matt Roper Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210125140753.347998-3-aditya.swarup@intel.com commit c6bba9e5fedf1391a52f1cd21d1ed6ac5fd99e55 Author: Caz Yokoyama Date: Mon Jan 25 16:17:44 2021 -0800 x86/gpu: Add Alderlake-S stolen memory support Alderlake-S is a Gen 12 based hybrid processor architecture. As it belongs to Gen 12 family, it uses the same GTT stolen memory settings like its predecessors - ICL(Gen 11) and TGL(Gen 12). Inherit gen11 and gen 9 quirks for determining base and size of stolen memory. Bspec: 52055 Bspec: 49589 Bspec: 49636 Cc: Lucas De Marchi Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Cc: x86@kernel.org Cc: Ingo Molnar Cc: Thomas Gleixner Cc: Borislav Petkov Signed-off-by: Caz Yokoyama Signed-off-by: Aditya Swarup Reviewed-by: Lucas De Marchi Acked-by: Borislav Petkov Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210126001744.29442-2-aditya.swarup@intel.com commit 97ecfff41e269d9c3114db85225bf1e493470a8f Author: Simon Ser Date: Fri Jan 15 12:06:26 2021 +0100 drm/doc: document the type plane property Add a new entry for "type" in the section for standard plane properties. v3: improve paragraph about mixing legacy IOCTLs with explicit usage, note that a driver may support cursors without cursor planes (Daniel) v4: fixing rebase gone wrong v5: - Fix typo (Daniel) - Mention CAP_ATOMIC instead of CAP_UNIVERSAL_PLANES when referring to atomic test-only commits (Daniel) - Add newlines at end of sections (Daniel) Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Reviewed-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/msgid/20210115110626.12233-2-contact@emersion.fr commit 7e5d1e122dff5d83069f9b77afa2618f32f115ba Author: Simon Ser Date: Fri Jan 15 12:06:25 2021 +0100 drm/doc: fix drm_plane_type docs The docs for enum drm_plane_type mention legacy IOCTLs, however the plane type is not tied to legacy IOCTLs, the drm_cursor.primary and cursor fields are. Add a small paragraph to reference these. Instead, document expectations for primary and cursor planes for non-legacy userspace. Note that these docs are for driver developers, not userspace developers, so internal kernel APIs are mentionned. Signed-off-by: Simon Ser Reviewed-by: Daniel Vetter Acked-by: Pekka Paalanen Link: https://patchwork.freedesktop.org/patch/msgid/20210115110626.12233-1-contact@emersion.fr commit 25e524bfbda19b3d9c7fdb234e3fe2fba10e28f7 Author: Marek Vasut Date: Sat Jan 16 00:23:04 2021 +0200 dt-bindings: display: mxsfb: Add compatible for i.MX8MM NXP's i.MX8MM has an LCDIF as well. Signed-off-by: Marek Vasut Reviewed-by: Laurent Pinchart Signed-off-by: Laurent Pinchart Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20210115222304.5427-4-laurent.pinchart@ideasonboard.com commit 5d16e40dd70298f8e35c727df56a05a49326c044 Author: Laurent Pinchart Date: Sat Jan 16 00:23:03 2021 +0200 dt-bindings: display: mxsfb: Add and fix compatible strings Additional compatible strings have been added in DT source for the i.MX6SL, i.MX6SLL, i.MX6UL and i.MX7D without updating the bindings. Most of the upstream DT sources use the fsl,imx28-lcdif compatible string, which mostly predates the realization that the LCDIF in the i.MX6 and newer SoCs have extra features compared to the i.MX28. Update the bindings to add the missing compatible strings, with the correct fallback values. This fails to validate some of the upstream DT sources. Instead of adding the incorrect compatible fallback to the binding, the sources should be updated separately. Signed-off-by: Laurent Pinchart Reviewed-by: Sam Ravnborg Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20210115222304.5427-3-laurent.pinchart@ideasonboard.com commit 3b1b42fde9113e8c9cb6ba8a1648f8c140924561 Author: Laurent Pinchart Date: Sat Jan 16 00:23:02 2021 +0200 dt-bindings: display: mxsfb: Convert binding to YAML Convert the mxsfb binding to YAML. The deprecated binding is dropped, as neither the DT sources nor the driver support it anymore. The converted binding is named fsl,lcdif.yaml to match the usual bindings naming scheme. The compatible strings are messy, and DT sources use different kinds of combination of documented and undocumented values. Keep it simple for now, and update the example to make it valid. Aligning the binding with the existing DT sources will be performed separately. Signed-off-by: Laurent Pinchart Reviewed-by: Sam Ravnborg Reviewed-by: Rob Herring Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20210115222304.5427-2-laurent.pinchart@ideasonboard.com commit 1f8644d56e91f1c3cbeb1a36c3a998397d06b9dc Author: Lukasz Luba Date: Thu Jan 21 17:04:45 2021 +0000 drm/panfrost: Add governor data with pre-defined thresholds The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the governor decision, e.g. how fast to increase the frequency or how rapidly limit the frequency. This patch adds needed governor data with thresholds values gathered experimentally in different workloads. Signed-off-by: Lukasz Luba Reviewed-by: Steven Price Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20210121170445.19761-1-lukasz.luba@arm.com commit a78e7a51d2fa9d2f482b462be4299784c884d988 Author: Veera Sundaram Sankaran Date: Fri Jan 15 16:31:47 2021 -0800 drm/drm_vblank: set the dma-fence timestamp during send_vblank_event The explicit out-fences in crtc are signaled as part of vblank event, indicating all framebuffers present on the Atomic Commit request are scanned out on the screen. Though the fence signal and the vblank event notification happens at the same time, triggered by the same hardware vsync event, the timestamp set in both are different. With drivers supporting precise vblank timestamp the difference between the two timestamps would be even higher. This might have an impact on use-mode frameworks using these fence timestamps for purposes other than simple buffer usage. For instance, the Android framework [1] uses the retire-fences as an alternative to vblank when frame-updates are in progress. Set the fence timestamp during send vblank event using a new drm_send_event_timestamp_locked variant to avoid discrepancies. [1] https://android.googlesource.com/platform/frameworks/native/+/master/ services/surfaceflinger/Scheduler/Scheduler.cpp#397 Changes in v2: - Use drm_send_event_timestamp_locked to update fence timestamp - add more information to commit text Changes in v3: - use same backend helper function for variants of drm_send_event to avoid code duplications Changes in v4: - remove WARN_ON from drm_send_event_timestamp_locked Signed-off-by: Veera Sundaram Sankaran Reviewed-by: John Stultz Signed-off-by: Sumit Semwal [sumits: minor parenthesis alignment correction] Link: https://patchwork.freedesktop.org/patch/msgid/1610757107-11892-2-git-send-email-veeras@codeaurora.org commit 5a164ac4dbd21b82bcdc03186d40e455ff467fdc Author: Veera Sundaram Sankaran Date: Fri Jan 15 16:31:46 2021 -0800 dma-fence: allow signaling drivers to set fence timestamp Some drivers have hardware capability to get the precise HW timestamp of certain events based on which the fences are triggered. The delta between the event HW timestamp & current HW reference timestamp can be used to calculate the timestamp in kernel's CLOCK_MONOTONIC time domain. This allows it to set accurate timestamp factoring out any software and IRQ latencies. Add a timestamp variant of fence signal function, dma_fence_signal_timestamp to allow drivers to update the precise timestamp for fences. Changes in v2: - Add a new fence signal variant instead of modifying fence struct Changes in v3: - Add timestamp domain information to commit-text and dma_fence_signal_timestamp documentation Signed-off-by: Veera Sundaram Sankaran Reviewed-by: John Stultz Signed-off-by: Sumit Semwal [sumits: minor parenthesis alignment] Link: https://patchwork.freedesktop.org/patch/msgid/1610757107-11892-1-git-send-email-veeras@codeaurora.org commit c7f59e3dd60313071a989227dcb69094f499d310 Author: John Stultz Date: Tue Jan 19 20:45:08 2021 +0000 dma-buf: heaps: Rework heap allocation hooks to return struct dma_buf instead of fd Every heap needs to create a dmabuf and then export it to a fd via dma_buf_fd(), so to consolidate things a bit, have the heaps just return a struct dmabuf * and let the top level dma_heap_buffer_alloc() call handle creating the fd via dma_buf_fd(). Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: John Stultz Signed-off-by: Sumit Semwal [sumits: minor reword of commit message] Link: https://patchwork.freedesktop.org/patch/msgid/20210119204508.9256-3-john.stultz@linaro.org commit 14a117252f57839bdf0123a1c888a96102e3a843 Author: John Stultz Date: Tue Jan 19 20:45:06 2021 +0000 dma-buf: system_heap: Make sure to return an error if we abort If we abort from the allocation due to a fatal_signal_pending(), be sure we report an error so any return code paths don't trip over the fact that the allocation didn't succeed. Cc: Sumit Semwal Cc: Liam Mark Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep Patil Cc: Daniel Mentz Cc: Chris Goldsworthy Cc: Ørjan Eide Cc: Robin Murphy Cc: Ezequiel Garcia Cc: Simon Ser Cc: James Jones Cc: linux-media@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Suggested-by: Suren Baghdasaryan Signed-off-by: John Stultz Signed-off-by: Sumit Semwal Link: https://patchwork.freedesktop.org/patch/msgid/20210119204508.9256-1-john.stultz@linaro.org commit 6a56d09bdab7c9d17ca2cf70c62ec162bbb972f7 Author: Daniel Vetter Date: Thu Jan 21 12:29:19 2021 +0100 drm: Update todo.rst Internship season is starting, let's review this. One thing that's pending is Maxime's work to roll out drm_atomic_state pointers to all callbacks, he said he'll remove that entry once it's all done. v2: Fix typos (Maxime) Acked-by: Maxime Ripard 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/20210121112919.1460322-1-daniel.vetter@ffwll.ch commit 8af8a109b34fa88b8b91f25d11485b37d37549c3 Author: Christian König Date: Thu Oct 1 14:51:40 2020 +0200 drm/ttm: device naming cleanup Rename ttm_bo_device to ttm_device. Rename ttm_bo_driver to ttm_device_funcs. Rename ttm_bo_global to ttm_global. Move global and device related functions to ttm_device.[ch]. No functional change. Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/415222/ commit b99c2c95412c0b85accdafe9e32ba1e84d240f55 Author: Maxime Ripard Date: Mon Jan 11 09:44:01 2021 +0100 drm: Introduce a drm_crtc_commit_wait helper There's currently four users of the same logic to wait for a commit to be flipped: three for the CRTCs, connectors and planes in drm_atomic_helper_wait_for_dependencies, and one in vc4. Let's consolidate this a bit to avoid any code duplication. Suggested-by: Daniel Vetter Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard Link: https://patchwork.freedesktop.org/patch/msgid/20210111084401.117152-1-maxime@cerno.tech commit d1a73c641afd2617bd80bce8b71a096fc5b74b7e Author: Zack Rusin Date: Thu Jan 14 18:38:16 2021 -0500 drm/vmwgfx: Make sure we unpin no longer needed buffers We were not correctly unpinning no longer needed buffers. In particular vmw_buffer_object, which is internally often pinned on creation wasn't unpinned on destruction and none of the internal MOB buffers were unpinned before being put back. Technically this existed for a long time but commit 57fcd550eb15 ("drm/ttm: Warn on pinning without holding a reference") introduced a WARN_ON which was filling up the kernel logs rather quickly. Quite frankly internal usage of vmw_buffer_object and in general pinning needs to be refactored in vmwgfx but for now this makes it work. Signed-off-by: Zack Rusin Reviewed-by: Martin Krastev Reviewed-by: Roland Scheidegger Fixes: 57fcd550eb15 ("drm/ttm: Warn on pinning without holding a reference") Link: https://patchwork.freedesktop.org/patch/414984/?series=86052&rev=1 Cc: Huang Rui Cc: Christian König Cc: Daniel Vetter Cc: Christian Koenig Cc: dri-devel@lists.freedesktop.org commit ca230ab18791f418faac19d00f3c35e2dbc25dfe Author: Bjorn Andersson Date: Wed Jan 20 09:59:22 2021 -0800 dt-bindings: dp-connector: Drop maxItems from -supply The meta-schema recently gained a definition for the common -supply$ property, which denotes that maxItems is not a valid property. Drop this to clear up the binding validation error. Fixes: a46c112512de ("dt-bindings: dp-connector: add binding for DisplayPort connector") Signed-off-by: Bjorn Andersson Signed-off-by: Rob Herring Link: https://patchwork.freedesktop.org/patch/msgid/20210120175922.1579835-1-bjorn.andersson@linaro.org commit 81ad7f9f78e4ff80e95be8282423f511b84f1166 Author: Jared Baldridge Date: Wed Jan 20 12:56:26 2021 -0800 drm: Added orientation quirk for OneGX1 Pro The OneGX1 Pro has a fairly unique combination of generic strings, but we additionally match on the BIOS date just to be safe. Signed-off-by: Jared Baldridge Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/41288ccb-1012-486b-81c1-a24c31850c91@www.fastmail.com commit 0883d63b19bbd6bb09f27786e768c1af09aa0ede Author: Caz Yokoyama Date: Tue Jan 19 11:29:31 2021 -0800 drm/i915/adl_s: Add ADL-S platform info and PCI ids - Add the initial platform information for Alderlake-S. - Specify ppgtt_size value - Add dma_mask_size - Add ADLS REVIDs - HW tracking(Selective Update Tracking Enable) has been removed from ADLS. Disable PSR2 till we enable software/ manual tracking. v2: - Add support for different ADLS SOC steppings to select correct GT/DISP stepping based on Bspec 53655 based on feedback from Matt Roper.(aswarup) v3: - Make display/gt steppings info generic for reuse with TGL and ADLS. - Modify the macros to reuse tgl_revids_get() - Add HTI support to adls device info.(mdroper) v4: - Rebase on TGL patch for applying WAs based on stepping info from Matt Roper's feedback.(aswarup) v5: - Replace macros with PCI IDs in revid to stepping table. v6: remove stray adls_revids (Lucas) Bspec: 53597 Bspec: 53648 Bspec: 53655 Bspec: 48028 Bspec: 53650 BSpec: 50422 Cc: José Roberto de Souza Cc: Matt Roper Cc: Lucas De Marchi Cc: Anusha Srivatsa Cc: Jani Nikula Cc: Ville Syrjälä Cc: Imre Deak Signed-off-by: Caz Yokoyama Signed-off-by: Aditya Swarup Reviewed-by: Lucas De Marchi Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210119192931.1116500-2-lucas.demarchi@intel.com commit 7e6c064ed834c86bb517841b72bed146d1a2d36d Author: Aditya Swarup Date: Tue Jan 19 11:29:30 2021 -0800 drm/i915/tgl: Use TGL stepping info for applying WAs TGL adds another level of indirection for applying WA based on stepping information rather than PCI REVID. So change TGL_REVID enum into stepping enum and use PCI REVID as index into revid to stepping table to fetch correct display and GT stepping for application of WAs as suggested by Matt Roper. Cc: Matt Roper Cc: Lucas De Marchi Cc: José Roberto de Souza Signed-off-by: Aditya Swarup Reviewed-by: Matt Roper Signed-off-by: Lucas De Marchi Link: https://patchwork.freedesktop.org/patch/msgid/20210119192931.1116500-1-lucas.demarchi@intel.com commit 7621350c6bb20fb6ab7eb988833ab96eac3dcbef Author: Christian König Date: Fri Jan 15 14:32:39 2021 +0100 drm/syncobj: make lockdep complain on WAIT_FOR_SUBMIT v3 DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT can't be used when we hold locks since we are basically waiting for userspace to do something. Holding a lock while doing so can trivial deadlock with page faults etc... So make lockdep complain when a driver tries to do this. v2: Add lockdep_assert_none_held() macro. v3: Add might_sleep() and also use lockdep_assert_none_held() in the IOCTL path. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Acked-by: Peter Zijlstra (Intel) Link: https://patchwork.freedesktop.org/patch/414944/ commit f987c9e0f537222e90dd3214bfc481860fe2abe0 Author: Christian König Date: Tue Nov 17 16:35:24 2020 +0100 drm/ttm: optimize ttm pool shrinker a bit Only initialize the DMA coherent pools if they are used. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/414957/ commit 568517686f50a13f0995d341222405c5ad50d955 Author: Christian König Date: Fri Dec 18 16:11:22 2020 +0100 drm/ttm: add debugfs entry to test pool shrinker v2 Useful for testing. v2: add fs_reclaim_acquire()/_release() Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/414955/ commit ba051901d10ff6d6636f2fbe3fe01fb2b5eb48ce Author: Christian König Date: Tue Nov 17 16:28:30 2020 +0100 drm/ttm: add a debugfs file for the global page pools Instead of printing this on the per device pool. Signed-off-by: Christian König Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/414956/ commit 3763d635deaa755c7849074d144c74086565591e Author: Christian König Date: Tue Nov 17 15:48:08 2020 +0100 drm/ttm: add debugfs directory v2 As far as I can tell the buffer_count was never used by an userspace application. The number of BOs in the system is far better suited in debugfs than sysfs and we now should be able to add other information here as well. v2: add that additionally to sysfs Signed-off-by: Christian König Acked-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/414954/ commit e1827807e8d9d5b67c21aa565697211df3f23d25 Author: Lauri Kasanen Date: Fri Jan 15 16:01:02 2021 +0200 video: fbdev: simplefb: Add "r5g5b5a1" mode Add "r5g5b5a1" which is used on the N64. Signed-off-by: Lauri Kasanen Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20210115160102.cf4c85db9f815758716f086f@gmx.com commit 5269a618eec7f8bbc659658865138cd218d834f9 Author: Peter Robinson Date: Mon Dec 28 18:39:34 2020 +0000 video: fbdev: simplefb: Fix info message during probe The info message was showing the mapped address for the framebuffer. To avoid security problems, all virtual addresses are converted to __ptrval__, so the message has pointless information: simple-framebuffer 3ea9b000.framebuffer: framebuffer at 0x3ea9b000, 0x12c000 bytes, mapped to 0x(____ptrval____) Drop the extraneous bits to clean up the message: simple-framebuffer 3ea9b000.framebuffer: framebuffer at 0x3ea9b000, 0x12c000 bytes Signed-off-by: Peter Robinson Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Link: https://patchwork.freedesktop.org/patch/msgid/20201228183934.1117012-1-pbrobinson@gmail.com commit d14413946f42acaf706c3c440ec2c72125a20b86 Author: Lee Jones Date: Fri Jan 15 18:16:01 2021 +0000 drm/vmwgfx/ttm_object: Reorder header to immediately precede its struct Also add missing description for 'refcount' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/ttm_object.c:60: error: Cannot parse struct or union! Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Dave Airlie Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-30-lee.jones@linaro.org commit 0283c74d4212e3acbe897010cc3fdbc4c5fb1737 Author: Lee Jones Date: Fri Jan 15 18:15:42 2021 +0000 drm/vmwgfx/vmwgfx_thp: Add description for 'vmw_thp_manager's member 'manager' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_thp.c:21: warning: Function parameter or member 'manager' not described in 'vmw_thp_manager' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-11-lee.jones@linaro.org commit f322f32a694b7b355cf5ed545e23278c9d0d5d1f Author: Lee Jones Date: Fri Jan 15 18:15:41 2021 +0000 drm/vmwgfx/ttm_object: Demote half-assed headers and fix-up another Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/ttm_object.c:60: error: Cannot parse struct or union! drivers/gpu/drm/vmwgfx/ttm_object.c:97: warning: Function parameter or member 'mem_glob' not described in 'ttm_object_device' drivers/gpu/drm/vmwgfx/ttm_object.c:97: warning: Function parameter or member 'ops' not described in 'ttm_object_device' drivers/gpu/drm/vmwgfx/ttm_object.c:97: warning: Function parameter or member 'dmabuf_release' not described in 'ttm_object_device' drivers/gpu/drm/vmwgfx/ttm_object.c:97: warning: Function parameter or member 'dma_buf_size' not described in 'ttm_object_device' drivers/gpu/drm/vmwgfx/ttm_object.c:97: warning: Function parameter or member 'idr' not described in 'ttm_object_device' drivers/gpu/drm/vmwgfx/ttm_object.c:128: warning: Function parameter or member 'rcu_head' not described in 'ttm_ref_object' drivers/gpu/drm/vmwgfx/ttm_object.c:128: warning: Function parameter or member 'tfile' not described in 'ttm_ref_object' drivers/gpu/drm/vmwgfx/ttm_object.c:582: warning: Function parameter or member 'dmabuf' not described in 'get_dma_buf_unless_doomed' drivers/gpu/drm/vmwgfx/ttm_object.c:582: warning: Excess function parameter 'dma_buf' description in 'get_dma_buf_unless_doomed' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: Dave Airlie Cc: Rob Clark Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-10-lee.jones@linaro.org commit dc03b634f37a845f5671cb44863d4dfdfd4bca46 Author: Lee Jones Date: Fri Jan 15 18:15:40 2021 +0000 drm/vmwgfx/vmwgfx_validation: Add some missing struct member/function param descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_validation.c:85: warning: Function parameter or member 'dirty' not described in 'vmw_validation_res_node' drivers/gpu/drm/vmwgfx/vmwgfx_validation.c:85: warning: Function parameter or member 'dirty_set' not described in 'vmw_validation_res_node' drivers/gpu/drm/vmwgfx/vmwgfx_validation.c:216: warning: Function parameter or member 'res' not described in 'vmw_validation_find_res_dup' drivers/gpu/drm/vmwgfx/vmwgfx_validation.c:216: warning: Excess function parameter 'vbo' description in 'vmw_validation_find_res_dup' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-9-lee.jones@linaro.org commit 9983a31d4a0867fb68ab88cacc855d9bca15ecb0 Author: Lee Jones Date: Fri Jan 15 18:15:39 2021 +0000 drm/vmwgfx/vmwgfx_blit: Add description for 'vmw_bo_cpu_blit's 'diff' param Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_blit.c:452: warning: Function parameter or member 'diff' not described in 'vmw_bo_cpu_blit' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-8-lee.jones@linaro.org commit 7db8a4eb280f11d8bacb35a58dc915f32a41b99c Author: Lee Jones Date: Fri Jan 15 18:15:37 2021 +0000 drm/vmwgfx/vmwgfx_msg: Fix misspelling of 'msg' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_msg.c:261: warning: Function parameter or member 'msg' not described in 'vmw_send_msg' drivers/gpu/drm/vmwgfx/vmwgfx_msg.c:261: warning: Excess function parameter 'logmsg' description in 'vmw_send_msg' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-6-lee.jones@linaro.org commit e8fb41ac6026a66a193feab930545a9c11b9df45 Author: Lee Jones Date: Fri Jan 15 18:15:36 2021 +0000 drm/vmwgfx/vmwgfx_binding: Provide some missing param descriptions and remove others Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:340: warning: Function parameter or member 'shader_slot' not described in 'vmw_binding_add' drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:340: warning: Function parameter or member 'slot' not described in 'vmw_binding_add' drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:376: warning: Function parameter or member 'from' not described in 'vmw_binding_transfer' drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:498: warning: Function parameter or member 'to' not described in 'vmw_binding_state_commit' drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:498: warning: Excess function parameter 'ctx' description in 'vmw_binding_state_commit' drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:498: warning: Excess function parameter 'scrubbed' description in 'vmw_binding_state_commit' drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:520: warning: Function parameter or member 'cbs' not described in 'vmw_binding_rebind_all' drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:520: warning: Excess function parameter 'ctx' description in 'vmw_binding_rebind_all' drivers/gpu/drm/vmwgfx/vmwgfx_binding.c:795: warning: Function parameter or member 'shader_slot' not described in 'vmw_emit_set_sr' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-5-lee.jones@linaro.org commit a5434770468b8bbca3fa25750a18a960e39f0c76 Author: Lee Jones Date: Fri Jan 15 18:15:35 2021 +0000 drm/vmwgfx/vmwgfx_so: Add description for 'vmw_view's 'rcu' member Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_so.c:73: warning: Function parameter or member 'rcu' not described in 'vmw_view' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-4-lee.jones@linaro.org commit 3894709e83691be9655088c275ff2c61c8f284fd Author: Lee Jones Date: Fri Jan 15 18:15:34 2021 +0000 drm/vmwgfx/vmwgfx_cotable: Fix a couple of simple documentation problems Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c:72: warning: Function parameter or member 'unbind_func' not described in 'vmw_cotable_info' drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c:308: warning: Function parameter or member 'val_buf' not described in 'vmw_cotable_unbind' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-3-lee.jones@linaro.org commit 94dda6ad4cad27bc257b4b9c5e1fbd2f47708ed9 Author: Lee Jones Date: Fri Jan 15 18:15:33 2021 +0000 drm/vmwgfx/vmwgfx_cmdbuf: Fix misnaming of 'headers' should be plural Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:137: warning: Function parameter or member 'headers' not described in 'vmw_cmdbuf_man' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181601.3432599-2-lee.jones@linaro.org commit 1856a91691e40e4fb83f7fe3241c5574b1d3db38 Author: Lee Jones Date: Fri Jan 15 18:13:13 2021 +0000 drm/vmwgfx/vmwgfx_stdu: Add some missing param/member descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:77: warning: Function parameter or member 'pitch' not described in 'vmw_stdu_dirty' drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:125: warning: Function parameter or member 'content_fb_type' not described in 'vmw_screen_target_display_unit' drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:125: warning: Function parameter or member 'display_width' not described in 'vmw_screen_target_display_unit' drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:125: warning: Function parameter or member 'display_height' not described in 'vmw_screen_target_display_unit' drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:125: warning: Function parameter or member 'cpp' not described in 'vmw_screen_target_display_unit' drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c:682: warning: Function parameter or member 'user_fence_rep' not described in 'vmw_kms_stdu_dma' Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-41-lee.jones@linaro.org commit 43ebfe61c3928573a5ef8d80c2f5300aa5c904c0 Author: Lee Jones Date: Fri Jan 15 18:13:12 2021 +0000 drm/vmwgfx/vmwgfx_cmdbuf_res: Remove unused variable 'ret' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c: In function ‘vmw_cmdbuf_res_revert’: drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c:162:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: VMware Graphics Cc: Roland Scheidegger Cc: Zack Rusin Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-40-lee.jones@linaro.org commit 17ef20f1f5edabdcaf4f1bcb07f7587b109e5f1f Author: Lee Jones Date: Fri Jan 15 18:13:10 2021 +0000 drm/vmwgfx/vmwgfx_cmdbuf: Fix a bunch of missing or incorrectly formatted/named params Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:58: warning: Function parameter or member 'block_submission' not described in 'vmw_cmdbuf_context' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:109: warning: cannot understand function prototype: 'struct vmw_cmdbuf_man ' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:164: warning: Function parameter or member 'handle' not described in 'vmw_cmdbuf_header' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:257: warning: Function parameter or member 'header' not described in '__vmw_cmdbuf_header_free' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:380: warning: Function parameter or member 'notempty' not described in 'vmw_cmdbuf_ctx_process' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:1168: warning: Function parameter or member 'context' not described in 'vmw_cmdbuf_preempt' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c:1193: warning: Function parameter or member 'context' not described in 'vmw_cmdbuf_startstop' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-38-lee.jones@linaro.org commit ad2ae41599030cd9ebb3585b35d31423a593f753 Author: Lee Jones Date: Fri Jan 15 18:13:09 2021 +0000 drm/vmwgfx/vmwgfx_shader: Demote kernel-doc abuses and fix-up worthy headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_shader.c:134: warning: Function parameter or member 'res' not described in 'vmw_res_to_shader' drivers/gpu/drm/vmwgfx/vmwgfx_shader.c:663: warning: Function parameter or member 'base' not described in 'vmw_user_shader_base_to_res' drivers/gpu/drm/vmwgfx/vmwgfx_shader.c:695: warning: Function parameter or member 'p_base' not described in 'vmw_user_shader_base_release' drivers/gpu/drm/vmwgfx/vmwgfx_shader.c:965: warning: Function parameter or member 'dev_priv' not described in 'vmw_compat_shader_add' drivers/gpu/drm/vmwgfx/vmwgfx_shader.c:965: warning: Function parameter or member 'size' not described in 'vmw_compat_shader_add' drivers/gpu/drm/vmwgfx/vmwgfx_shader.c:965: warning: Excess function parameter 'tfile' description in 'vmw_compat_shader_add' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-37-lee.jones@linaro.org commit 3a79c5e3e653e912d1b1939e8746fb51b2a87860 Author: Lee Jones Date: Fri Jan 15 18:13:08 2021 +0000 drm/vmwgfx/vmwgfx_cmdbuf_res: Rename param description and remove another Also fix a small formatting issue. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c:83: warning: Function parameter or member 'res_type' not described in 'vmw_cmdbuf_res_lookup' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c:83: warning: Excess function parameter 'resource_type' description in 'vmw_cmdbuf_res_lookup' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c:161: warning: Excess function parameter 'man' description in 'vmw_cmdbuf_res_revert' drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c:330: warning: Cannot understand * Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-36-lee.jones@linaro.org commit cde3435af618c7d2f9c7d598087250fa897fa2bf Author: Lee Jones Date: Fri Jan 15 18:13:06 2021 +0000 drm/vmwgfx/vmwgfx_surface: Fix some kernel-doc related issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:55: warning: Function parameter or member 'prime' not described in 'vmw_user_surface' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:55: warning: Function parameter or member 'backup_base' not described in 'vmw_user_surface' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:78: warning: cannot understand function prototype: 'struct vmw_surface_dirty ' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:173: warning: Function parameter or member 'header' not described in 'vmw_surface_dma' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:173: warning: Function parameter or member 'body' not described in 'vmw_surface_dma' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:173: warning: Function parameter or member 'cb' not described in 'vmw_surface_dma' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:173: warning: Function parameter or member 'suffix' not described in 'vmw_surface_dma' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:181: warning: Function parameter or member 'header' not described in 'vmw_surface_define' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:181: warning: Function parameter or member 'body' not described in 'vmw_surface_define' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:189: warning: Function parameter or member 'header' not described in 'vmw_surface_destroy' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:189: warning: Function parameter or member 'body' not described in 'vmw_surface_destroy' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:555: warning: Function parameter or member 'readback' not described in 'vmw_legacy_srf_unbind' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:1067: warning: Function parameter or member 'res' not described in 'vmw_gb_surface_create' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:1067: warning: Excess function parameter 'srf' description in 'vmw_gb_surface_create' drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:1067: warning: Excess function parameter 'cmd_space' description in 'vmw_gb_surface_create' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-34-lee.jones@linaro.org commit 2cbf4b730baee143337ac7ebe176e11b9a453638 Author: Lee Jones Date: Fri Jan 15 18:13:02 2021 +0000 drm/vmwgfx/vmwgfx_scrn: Demote unworthy kernel-doc headers and update others Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:90: warning: cannot understand function prototype: 'struct vmw_screen_object_unit ' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:122: warning: Function parameter or member 'dev_priv' not described in 'vmw_sou_fifo_create' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:122: warning: Function parameter or member 'sou' not described in 'vmw_sou_fifo_create' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:122: warning: Function parameter or member 'x' not described in 'vmw_sou_fifo_create' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:122: warning: Function parameter or member 'y' not described in 'vmw_sou_fifo_create' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:122: warning: Function parameter or member 'mode' not described in 'vmw_sou_fifo_create' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:168: warning: Function parameter or member 'dev_priv' not described in 'vmw_sou_fifo_destroy' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:168: warning: Function parameter or member 'sou' not described in 'vmw_sou_fifo_destroy' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:283: warning: Function parameter or member 'state' not described in 'vmw_sou_crtc_atomic_enable' drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c:293: warning: Function parameter or member 'state' not described in 'vmw_sou_crtc_atomic_disable' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-30-lee.jones@linaro.org commit ea7161977bea66c5fe89abe22aa6bf1e7020f84d Author: Lee Jones Date: Fri Jan 15 18:13:01 2021 +0000 drm/vmwgfx/vmwgfx_context: Demote kernel-doc abuses Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_context.c:121: warning: Function parameter or member 'dev_priv' not described in 'vmw_context_cotables_unref' drivers/gpu/drm/vmwgfx/vmwgfx_context.c:121: warning: Function parameter or member 'uctx' not described in 'vmw_context_cotables_unref' drivers/gpu/drm/vmwgfx/vmwgfx_context.c:681: warning: Function parameter or member 'base' not described in 'vmw_user_context_base_to_res' drivers/gpu/drm/vmwgfx/vmwgfx_context.c:707: warning: Function parameter or member 'p_base' not described in 'vmw_user_context_base_release' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-29-lee.jones@linaro.org commit 36074f2d58516736dce78c01876371c85059623e Author: Lee Jones Date: Fri Jan 15 18:13:00 2021 +0000 drm/vmwgfx/vmwgfx_bo: Remove superfluous param description and supply another Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:142: warning: Excess function parameter 'pin' description in 'vmw_bo_pin_in_vram_or_gmr' drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:647: warning: Function parameter or member 'p_base' not described in 'vmw_user_bo_alloc' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-28-lee.jones@linaro.org commit c6771b6338c83ad3042777069673fb347b5d7588 Author: Lee Jones Date: Fri Jan 15 18:12:59 2021 +0000 drm/vmwgfx/vmwgfx_fence: Add, remove and demote various documentation params/headers Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:82: warning: Function parameter or member 'event' not described in 'vmw_event_fence_action' drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:113: warning: Function parameter or member 'f' not described in 'vmw_fence_obj_destroy' drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:261: warning: Function parameter or member 'work' not described in 'vmw_fence_work_func' drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:720: warning: Function parameter or member 'fman' not described in 'vmw_fence_fifo_down' drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:963: warning: Function parameter or member 'fence' not described in 'vmw_fence_obj_add_action' drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:963: warning: Function parameter or member 'action' not described in 'vmw_fence_obj_add_action' drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:1021: warning: Function parameter or member 'tv_sec' not described in 'vmw_event_fence_action_queue' drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:1021: warning: Function parameter or member 'tv_usec' not described in 'vmw_event_fence_action_queue' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-27-lee.jones@linaro.org commit 3a839da0e255ba0d4d7073b6afdf1355927f580e Author: Lee Jones Date: Fri Jan 15 18:12:56 2021 +0000 drm/vmwgfx/vmwgfx_overlay: Demote kernel-doc abuses to standard comment blocks Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:48: warning: cannot understand function prototype: 'struct vmw_overlay ' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:98: warning: Function parameter or member 'dev_priv' not described in 'vmw_overlay_send_put' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:98: warning: Function parameter or member 'buf' not described in 'vmw_overlay_send_put' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:98: warning: Function parameter or member 'arg' not described in 'vmw_overlay_send_put' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:98: warning: Function parameter or member 'interruptible' not described in 'vmw_overlay_send_put' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:186: warning: Function parameter or member 'dev_priv' not described in 'vmw_overlay_send_stop' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:186: warning: Function parameter or member 'stream_id' not described in 'vmw_overlay_send_stop' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:186: warning: Function parameter or member 'interruptible' not described in 'vmw_overlay_send_stop' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:228: warning: Function parameter or member 'dev_priv' not described in 'vmw_overlay_move_buffer' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:228: warning: Function parameter or member 'buf' not described in 'vmw_overlay_move_buffer' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:228: warning: Function parameter or member 'pin' not described in 'vmw_overlay_move_buffer' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:228: warning: Function parameter or member 'inter' not described in 'vmw_overlay_move_buffer' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:253: warning: Function parameter or member 'dev_priv' not described in 'vmw_overlay_stop' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:253: warning: Function parameter or member 'stream_id' not described in 'vmw_overlay_stop' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:253: warning: Function parameter or member 'pause' not described in 'vmw_overlay_stop' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:253: warning: Function parameter or member 'interruptible' not described in 'vmw_overlay_stop' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:301: warning: Function parameter or member 'dev_priv' not described in 'vmw_overlay_update_stream' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:301: warning: Function parameter or member 'buf' not described in 'vmw_overlay_update_stream' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:301: warning: Function parameter or member 'arg' not described in 'vmw_overlay_update_stream' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:301: warning: Function parameter or member 'interruptible' not described in 'vmw_overlay_update_stream' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:364: warning: Function parameter or member 'dev_priv' not described in 'vmw_overlay_resume_all' drivers/gpu/drm/vmwgfx/vmwgfx_overlay.c:398: warning: Function parameter or member 'dev_priv' not described in 'vmw_overlay_pause_all' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-24-lee.jones@linaro.org commit c88c25a629b05d5f15fa978bbda6da1927914052 Author: Lee Jones Date: Fri Jan 15 18:12:53 2021 +0000 drm/vmwgfx/vmwgfx_kms: Update worthy function headers and demote others Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:37: drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:483: warning: Function parameter or member 'new_state' not described in 'vmw_du_cursor_plane_atomic_check' drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:483: warning: Excess function parameter 'state' description in 'vmw_du_cursor_plane_atomic_check' drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:1069: warning: Function parameter or member 'vfb' not described in 'vmw_framebuffer_pin' drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:1281: warning: Function parameter or member 'dev_priv' not described in 'vmw_kms_srf_ok' drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:1907: warning: Function parameter or member 'crtc' not described in 'vmw_get_vblank_counter' drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:1915: warning: Function parameter or member 'crtc' not described in 'vmw_enable_vblank' drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:1923: warning: Function parameter or member 'crtc' not described in 'vmw_disable_vblank' drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:2131: warning: Function parameter or member 'mode' not described in 'vmw_guess_mode_timing' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-21-lee.jones@linaro.org commit 47c617bf5333f304259113555572483219e1a6bc Author: Lee Jones Date: Fri Jan 15 18:12:46 2021 +0000 drm/vmwgfx/vmwgfx_ldu: Supply descriptions for 'state' function parameter Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c:55: warning: cannot understand function prototype: 'struct vmw_legacy_display_unit ' drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c:218: warning: Function parameter or member 'state' not described in 'vmw_ldu_crtc_atomic_enable' drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c:228: warning: Function parameter or member 'state' not described in 'vmw_ldu_crtc_atomic_disable' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-14-lee.jones@linaro.org commit b8441a4d298b86b45f5aee595548278b8ac75391 Author: Lee Jones Date: Fri Jan 15 18:12:45 2021 +0000 drm/vmwgfx/vmwgfx_fifo: Demote non-conformant kernel-doc header Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c:299: warning: Function parameter or member 'dev_priv' not described in 'vmw_local_fifo_reserve' drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c:299: warning: Function parameter or member 'bytes' not described in 'vmw_local_fifo_reserve' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-13-lee.jones@linaro.org commit a38feeaac2521dc84166dcdd16097377122a1923 Author: Lee Jones Date: Fri Jan 15 18:12:44 2021 +0000 drm/vmwgfx/vmwgfx_ttm_buffer: Supply some missing parameter descriptions Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:275: warning: Function parameter or member 'p_offset' not described in 'vmw_piter_start' drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c:676: warning: Function parameter or member 'evict' not described in 'vmw_move_notify' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-12-lee.jones@linaro.org commit ba6080915be7d01eb29827106cbc938dc323085a Author: Lee Jones Date: Fri Jan 15 18:12:43 2021 +0000 drm/vmwgfx/vmwgfx_resource: Fix worthy function headers demote some others Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:215: warning: Excess function parameter 'obj_type' description in 'vmw_resource_init' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:303: warning: Excess function parameter 'p_res' description in 'vmw_user_resource_noref_lookup_handle' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:328: warning: Function parameter or member 'dev_priv' not described in 'vmw_user_lookup_handle' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:328: warning: Function parameter or member 'tfile' not described in 'vmw_user_lookup_handle' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:328: warning: Function parameter or member 'handle' not described in 'vmw_user_lookup_handle' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:328: warning: Function parameter or member 'out_surf' not described in 'vmw_user_lookup_handle' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:328: warning: Function parameter or member 'out_buf' not described in 'vmw_user_lookup_handle' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:398: warning: Function parameter or member 'dirtying' not described in 'vmw_resource_do_validate' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:601: warning: Function parameter or member 'interruptible' not described in 'vmw_resource_reserve' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:601: warning: Function parameter or member 'no_backup' not described in 'vmw_resource_reserve' drivers/gpu/drm/vmwgfx/vmwgfx_resource.c:987: warning: Function parameter or member 'interruptible' not described in 'vmw_resource_pin' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-11-lee.jones@linaro.org commit 043948cfc8235192ac6ccc2333c4555abde008d9 Author: Lee Jones Date: Fri Jan 15 18:12:42 2021 +0000 drm/vmwgfx/vmwgfx_ioctl: Provide missing '@' sign required by kernel-doc Fixes the following W=1 kernel build warning(s): In file included from drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c:30: drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c:448: warning: Function parameter or member 'offset' not described in 'vmw_fops_read' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-10-lee.jones@linaro.org commit e68cefd105c1d76e7d5a1aed4d16ad60b68214e8 Author: Lee Jones Date: Fri Jan 15 18:12:41 2021 +0000 drm/vmwgfx/vmwgfx_drv: Fix some kernel-doc misdemeanours Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:164: warning: Function parameter or member 'ioctl' not described in 'VMW_IOCTL_DEF' drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:164: warning: Function parameter or member 'func' not described in 'VMW_IOCTL_DEF' drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:164: warning: Function parameter or member 'flags' not described in 'VMW_IOCTL_DEF' drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:170: warning: cannot understand function prototype: 'const struct drm_ioctl_desc vmw_ioctls[] = ' drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:542: warning: Function parameter or member 'dev_priv' not described in 'vmw_get_initial_size' drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:611: warning: Function parameter or member 'dev_priv' not described in 'vmw_dma_masks' drivers/gpu/drm/vmwgfx/vmwgfx_drv.c:611: warning: Excess function parameter 'dev' description in 'vmw_dma_masks' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-9-lee.jones@linaro.org commit d8713d6684a4eb61ed4c0e48bb0fdf1462e4823e Author: Lee Jones Date: Fri Jan 15 18:12:40 2021 +0000 drm/vmwgfx/vmwgfx_kms: Mark vmw_{cursor,primary}_plane_formats as __maybe_unused Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:256:23: warning: ‘vmw_cursor_plane_formats’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:248:23: warning: ‘vmw_primary_plane_formats’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:256:23: warning: ‘vmw_cursor_plane_formats’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:248:23: warning: ‘vmw_primary_plane_formats’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:256:23: warning: ‘vmw_cursor_plane_formats’ defined but not used [-Wunused-const-variable=] drivers/gpu/drm/vmwgfx/vmwgfx_kms.h:248:23: warning: ‘vmw_primary_plane_formats’ defined but not used [-Wunused-const-variable=] Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-8-lee.jones@linaro.org commit abd64e5f6ccc0835e31b528a8aef44c4e10ed8c4 Author: Lee Jones Date: Fri Jan 15 18:12:37 2021 +0000 drm/vmwgfx/vmwgfx_kms: Remove unused variable 'ret' from 'vmw_du_primary_plane_atomic_check()' Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_kms.c: In function ‘vmw_du_primary_plane_atomic_check’: drivers/gpu/drm/vmwgfx/vmwgfx_kms.c:460:31: warning: variable ‘vcs’ set but not used [-Wunused-but-set-variable] Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-5-lee.jones@linaro.org commit 7450bf769814a2423dfa8021a5a01bfa1b9e79db Author: Lee Jones Date: Fri Jan 15 18:12:36 2021 +0000 drm/vmwgfx/vmwgfx_execbuf: Fix some kernel-doc related issues Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:89: warning: Enum value 'vmw_res_rel_max' not described in enum 'vmw_resource_relocation_type' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:136: warning: Function parameter or member 'func' not described in 'vmw_cmd_entry' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:136: warning: Function parameter or member 'cmd_name' not described in 'vmw_cmd_entry' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:212: warning: Function parameter or member 'res' not described in 'vmw_cmd_ctx_first_setup' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:523: warning: Function parameter or member 'sw_context' not described in 'vmw_resource_relocation_add' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:523: warning: Excess function parameter 'list' description in 'vmw_resource_relocation_add' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:653: warning: Function parameter or member 'p_res' not described in 'vmw_cmd_res_check' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:653: warning: Excess function parameter 'p_val' description in 'vmw_cmd_res_check' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1716: warning: Function parameter or member 'res' not described in 'vmw_cmd_res_switch_backup' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:1716: warning: Excess function parameter 'val_node' description in 'vmw_cmd_res_switch_backup' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3757: warning: Function parameter or member 'file_priv' not described in 'vmw_execbuf_fence_commands' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3757: warning: Function parameter or member 'dev_priv' not described in 'vmw_execbuf_fence_commands' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3757: warning: Function parameter or member 'p_fence' not described in 'vmw_execbuf_fence_commands' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3757: warning: Function parameter or member 'p_handle' not described in 'vmw_execbuf_fence_commands' drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:3954: warning: Function parameter or member 'kernel_commands' not described in 'vmw_execbuf_cmdbuf' Cc: VMware Graphics Cc: Roland Scheidegger Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: dri-devel@lists.freedesktop.org Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Signed-off-by: Lee Jones Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210115181313.3431493-4-lee.jones@linaro.org commit 6dd6b7643e723b4779e59c8ad97bd5db6ff3bb12 Author: Thomas Zimmermann Date: Mon Jan 18 14:14:19 2021 +0100 drm/vmwgfx: Remove reference to struct drm_device.pdev Using struct drm_device.pdev is deprecated in favor of drm_device.dev. The reference to the field was reintroduced during a rebase. Signed-off-by: Thomas Zimmermann Fixes: 9703bb329206 ("drm/vmwgfx: Switch to a managed drm device") Reviewed-by: Zack Rusin Cc: Zack Rusin Cc: Martin Krastev Cc: Roland Scheidegger Cc: VMware Graphics Cc: dri-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20210118131420.15874-6-tzimmermann@suse.de commit 3cb4d29a2633170208c96240c7e85148679ceee3 Author: Jean Delvare Date: Thu Oct 29 14:32:35 2020 +0100 MAINTAINERS: The DMI/SMBIOS tree has moved I switched from quilt to git as requested by Stephen Rothwell. Update the link to the new place. Signed-off-by: Jean Delvare Cc: Stephen Rothwell commit e26f023e01ef26b4138bc1099af309bdc4523d23 Author: Kai-Chuan Hsieh Date: Wed Oct 28 09:51:50 2020 +0100 firmware/dmi: Include product_sku info to modalias Some Dell platforms rely on modalias to customize configuration, the product sku can be more specific for the hardware. Add product_sku to modalias for better utilization. Signed-off-by: Kai-Chuan Hsieh Signed-off-by: Jean Delvare